From b78bfd9ad51e1bb2d1641fcc7766ac57d8043c55 Mon Sep 17 00:00:00 2001 From: Dave Griffin Date: Thu, 25 Oct 2012 10:33:24 +0100 Subject: [PATCH 001/623] Finished option to customise Processor Tray serial in MacPro --- i386/config/settings-template.h | 4 ++++ i386/libsaio/smbios/dynamic_data.h | 11 ++++++++--- i386/libsaio/smbios/getters.h | 9 +++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 263eba5..0732192 100644 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -331,6 +331,10 @@ #undef USE_STATIC_CPU_DATA // Prevent boot failures due to wrong settings (until I figured out what we are missing). #endif +#if TARGET_MODEL & MACPRO + #define STATIC_SMBOARDSERIAL "SOMEBOARDNMBR" // Example only! +#endif + #define OVERRIDE_DYNAMIC_MEMORY_DETECTION 0 // Set to 0 by default. Change this to 0 only when your SMBIOS data (type 17) is correct, or when // you want/need to override some/all of the SMBIOS data. // diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index 99f62fe..91f25d6 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -54,9 +54,9 @@ struct SMBStructure requiredStructures[] = { { kSMBTypeBIOSInformation /* 0 */ , 0, 5, false, 0 }, { kSMBTypeSystemInformation /* 1 */ , 6, 10, false, 0 }, - { kSMBTypeBaseBoard /* 2 */ , 11, 12, false, 0 }, + { kSMBTypeBaseBoard /* 2 */ , 11, 14, false, 0 }, { kSMBUnused /* 3 */ , 0, 0, false, 0 }, - { kSMBTypeProcessorInformation /* 4 */ , 13, 14, true, 0 }, + { kSMBTypeProcessorInformation /* 4 */ , 15, 16, true, 0 }, { kSMBUnused /* 5 */ , 0, 0, false, 0 }, { kSMBUnused /* 6 */ , 0, 0, false, 0 }, { kSMBUnused /* 7 */ , 0, 0, false, 0 }, @@ -69,7 +69,7 @@ struct SMBStructure requiredStructures[] = { kSMBUnused /* 14 */ , 0, 0, false, 0 }, { kSMBUnused /* 15 */ , 0, 0, false, 0 }, { kSMBUnused /* 16 */ , 0, 0, false, 0 }, - { kSMBTypeMemoryDevice /* 17 */ , 15, 19, true, 0 } + { kSMBTypeMemoryDevice /* 17 */ , 17, 21, true, 0 } }; @@ -130,6 +130,11 @@ struct SMBProperty SMBProperties[] = { kSMBTypeBaseBoard, 0x04, kSMBString, .plainData = APPLE_INC }, { kSMBTypeBaseBoard, 0x05, kSMBString, .plainData = SMB_BOARD_PRODUCT }, + +#if TARGET_MODEL & MACPRO + { kSMBTypeBaseBoard, 0x07, kSMBString, .plainData = STATIC_SMBOARDSERIAL }, + { kSMBTypeBaseBoard, 0x0d, kSMBByte, .getSMBByte = getBoardType }, +#endif //------------------------------------------------------------------------------------------------ diff --git a/i386/libsaio/smbios/getters.h b/i386/libsaio/smbios/getters.h index 9c9b100..54aade3 100755 --- a/i386/libsaio/smbios/getters.h +++ b/i386/libsaio/smbios/getters.h @@ -346,3 +346,12 @@ static SMBDWord getBIOSFeaturesEX(void) { return (0x010002c1); } + +//============================================================================== + +#if TARGET_MODEL & MACPRO +static SMBByte getBoardType(void) +{ + return 0x0b; // Some logic here or just return 11/0x0b. +} +#endif From 946bd41ae3c6880cfdd6903b8191a29c30ccf00d Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 11:03:56 +0300 Subject: [PATCH 002/623] Update for RevoBoot v1.5.10/v1.5.20 --- Makefile | 185 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 124 insertions(+), 61 deletions(-) diff --git a/Makefile b/Makefile index 8216a1e..40a2c4c 100644 --- a/Makefile +++ b/Makefile @@ -1,27 +1,30 @@ # -# Makefile for RevoBoot +# File: RevoBoot/Makefile +# +# Updates: +# +# - Major cleanup (PikerAlpha, October 2012). +# - Output improvements (PikerAlpha, October 2012). +# - Default build target is now Mountain Lion (PikerAlpha, October 2012). +# - PRODUCT_MODEL_TARGET for target build model added (PikerAlpha, October 2012). +# - Creates RevoBoot/config/SETTINGS when missing (PikerAlpha, October 2012). +# - Copies settings-template.h to SETTINGS/ModelnameNN.h when missing (PikerAlpha, October 2012). +# - Automatic ACPI/EFI/SMBIOS data selection (PikerAlpha, October 2012). +# + +# +# Include Apple makefile definitions. # export USE_APPLE_PB_SUPPORT = all -# CFLAGS = -O $(MORECPP) -arch i386 -g -DEFINES= -CONFIG = hd LIBDIR = libsa INC = -I. -I$(LIBDIR) -ifneq "" "$(wildcard /bin/mkdirs)" - MKDIRS = /bin/mkdirs -else - MKDIRS = /bin/mkdir -p -endif -AS = as -LD = ld + PAX = /bin/pax OBJROOT = `pwd`/obj SYMROOT = `pwd`/sym -DSTROOT = `pwd`/dst -SRCROOT = /tmp # # Export version number (picked up by i386/libsaio/Makefile) @@ -31,69 +34,129 @@ export PRODUCT_VERSION_NUMBER = `cat ../../VERSION` EXCLUDE = --exclude=.DS_Store --exclude=sym --exclude=obj --exclude=*.sh -ARCHLESS_RC_CFLAGS=`echo $(RC_CFLAGS) | sed 's/-arch [a-z0-9]*//g'` +# +# Search paths. +# VPATH = $(OBJROOT):$(SYMROOT) -GENERIC_SUBDIRS = - # -# Export target OS type (picked up by i386/libsaio/Makefile) +# Check if OS build target is specified (example: make mountain-lion). # -ifeq ($(MAKECMDGOALS), mountain-lion) +ifeq ($(MAKECMDGOALS),) + # + # No OS build target given. Build for Mountain Lion (default). + # MAKE_TARGET_OS = 6; + MAKEGOAL = mountain-lion else - ifeq ($(MAKECMDGOALS), lion) - MAKE_TARGET_OS = 2; + # + # Setting MAKE_TARGET_OS and MAKEGOAL based on OS build target. + # + ifeq ($(MAKECMDGOALS), mountain-lion) + MAKE_TARGET_OS = 6; + MAKEGOAL = mountain-lion else - MAKE_TARGET_OS = 1; + ifeq ($(MAKECMDGOALS), lion) + MAKE_TARGET_OS = 2; + MAKEGOAL = lion + else ifeq ($(MAKECMDGOALS), legacy) + MAKE_TARGET_OS = 1; + MAKEGOAL = legacy + endif endif endif +# +# Export our make goal i.e. mountain-lion, lion or legacy (snow-leopard or leopard). +# + +export MAKEGOAL + +# +# Export OS build target (picked up by: i386/libsaio/Makefile). +# + export PRODUCT_OS_TARGET = `echo $(MAKE_TARGET_OS)` -lion: all -mountain-lion: all - -all: $(SYMROOT) $(OBJROOT) - @if [ -z "$(RC_ARCHS)" ]; then \ - RC_ARCHS="i386"; \ - fi; \ - SUBDIRS="$(GENERIC_SUBDIRS) $$RC_ARCHS"; \ - for i in $$SUBDIRS; \ - do \ - if [ -d $$i ]; then \ - echo ================= make $@ for $$i =================; \ - ( OBJROOT=$(OBJROOT)/$${i}; \ - SYMROOT=$(SYMROOT)/$${i}; \ - DSTROOT=$(DSTROOT); \ - XCFLAGS=$(ARCHLESS_RC_CFLAGS); \ - GENSUBDIRS="$(GENERIC_SUBDIRS)"; \ - for x in $$GENSUBDIRS; \ - do \ - if [ "$$x" == "$$i" ]; then \ - XCFLAGS="$(RC_CFLAGS)"; \ - break; \ - fi \ - done; \ - echo "$$OBJROOT $$SYMROOT $$DSTROOT"; \ - cd $$i; ${MAKE} \ - "OBJROOT=$$OBJROOT" \ - "SYMROOT=$$SYMROOT" \ - "DSTROOT=$$DSTROOT" \ - "SRCROOT=$$SRCROOT" \ - "RC_ARCHS=$$RC_ARCHS" \ - "TARGET=$$i" \ - "RC_CFLAGS=$$XCFLAGS" $@ \ - ) || exit $$?; \ - else \ - echo "========= Nothing to build for $$i ========="; \ - fi; \ - done +# +# Check if a target model was specified (example: make MODEL=16 mountain-lion). +# + +ifdef MODEL + # + # MODEL=[MacModelNN] specified, export target model as PRODUCT_MODEL_TARGET. + # + ifneq ($(MODEL),) + export MAKE_TARGET_MODEL = $(MODEL) + # + # Include static ACPI/EFI/SMBIOS data file per model identifier. + # + DATA_FILE = $(MODEL) + else + export MAKE_TARGET_MODEL = default + # + # Include default/empty static data file (no model identifier specified). + # + DATA_FILE = data.h + endif +else + # + # Include default settings template (no model identifier specified). + # + export MAKE_TARGET_MODEL = default + # + # Include default/empty static data file (no model identifier specified). + # + DATA_FILE = data.h +endif + +# +# Export target filenames for static ACPI, EFI and SMBIOS data. +# + +export MAKE_ACPI_DATA_FILE = ACPI/$(DATA_FILE) +export MAKE_EFI_DATA_FILE = EFI/$(DATA_FILE) +export MAKE_SMBIOS_DATA_FILE = SMBIOS/$(DATA_FILE) + +# +# Our one and only build target directory. +# + +ARCH_DIR=i386 + +CONFIG_DIR=$(ARCH_DIR)/config + +SETTINGS_DIR=$(CONFIG_DIR)/SETTINGS +SETTINGS_FILE=$(SETTINGS_DIR)/$(MAKE_TARGET_MODEL).h + +$(MAKEGOAL): $(SYMROOT) $(OBJROOT) + @if [ ! -d $(SETTINGS_DIR) ]; then \ + /bin/mkdir -p $(SETTINGS_DIR); \ + fi; + + @if [ ! -f $(SETTINGS_FILE) ]; then \ + cp -n $(CONFIG_DIR)/settings-template.h $(SETTINGS_FILE); \ + fi; + + @if [ -d $(ARCH_DIR) ]; then \ + echo ================= make MODEL=$(MAKE_TARGET_MODEL) $@ for: RevoBoot/$(ARCH_DIR) =================; \ + ( OBJROOT=$(OBJROOT)/$(ARCH_DIR); \ + SYMROOT=$(SYMROOT)/$(ARCH_DIR); \ + XCFLAGS="$(RC_CFLAGS)"; \ + echo "$$OBJROOT $$SYMROOT"; \ + cd $(ARCH_DIR); ${MAKE} \ + "OBJROOT=$$OBJROOT" \ + "SYMROOT=$$SYMROOT" \ + "RC_ARCHS=$(ARCH_DIR)" \ + "TARGET=$(ARCH_DIR)" \ + "RC_CFLAGS=$$XCFLAGS" $@ \ + ) || exit $$?; \ + fi; clean: rm -rf sym obj dst out.log -$(SYMROOT) $(OBJROOT) $(DSTROOT): - @$(MKDIRS) $@ +$(SYMROOT) $(OBJROOT): + @/bin/mkdir -p $@ From 190e0962dc46f1482e21943648a00592422e7943 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 11:05:00 +0300 Subject: [PATCH 003/623] Updating version info for RevoBoot v1.5.20 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 4ada1d8..a7ccabd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.00 +1.5.20 From a094b2215235ac7fa6f63dc6f28306d8572d7c6e Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 11:06:14 +0300 Subject: [PATCH 004/623] Now cleanly defaults to Mountain Lion --- r | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r b/r index ce7791e..74d7e5c 100755 --- a/r +++ b/r @@ -1,4 +1,4 @@ make clean clear -make mountain-lion > out.log +make > out.log From e5804efb7942ef5e8428bc14666a4fb98d65237c Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 11:08:14 +0300 Subject: [PATCH 005/623] Update for RevoBoot v1.5.10/v1.5.20 --- i386/MakeInc.dir | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/i386/MakeInc.dir b/i386/MakeInc.dir index 77611ac..ddb327c 100755 --- a/i386/MakeInc.dir +++ b/i386/MakeInc.dir @@ -1,16 +1,11 @@ # -# Common makefile targets. +# File: RevoBoot/i386/MakeInc.dir # -# Define these variables (if desired) in directory makefiles: -# DIRS_NEEDED -# INSTALLDIR -# SRCROOT +# Updates: # -ifneq "" "$(wildcard /bin/mkdirs)" - MKDIRS = /bin/mkdirs -else - MKDIRS = /bin/mkdir -p -endif +# - Major cleanup (PikerAlpha, October 2012). +# + # # Use /usr/bin/gcc instead of /usr/bin/cc (symbolic link to clang in Xcode 4.3.2 and greater). @@ -26,22 +21,6 @@ CC = gcc #OMIT_FRAME_POINTER_CFLAG=-fomit-frame-pointer OMIT_FRAME_POINTER_CFLAG= -installsrc:: $(SRCROOT) - cp $(ALLSRC) $(SRCROOT) - cd $(SRCROOT); chmod a-w $(ALLSRC) - -install:: installhdrs - @if [ -z "$(RC_ARCHS)" -o -n "$(RC_i386)" ]; then \ - $(MAKE) install_i386 OBJROOT=${OBJROOT} \ - SYMROOT=${SYMROOT} DSTROOT=${DSTROOT} \ - SRCROOT=${SRCROOT}; \ - else \ - echo i386 not selected - null build.; \ - fi - -install_i386:: all - -installhdrs:: .SUFFIXES: .s .i .c .o @@ -69,5 +48,5 @@ boot2.o: $(OBJROOT)/%.o: %.s $(CC) $(CPPFLAGS) -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $< -$(DIRS_NEEDED) $(INSTALLDIR) $(SRCROOT): - $(MKDIRS) $@ +$(DIRS_NEEDED): # $(INSTALLDIR) $(SRCROOT): + @/bin/mkdir -p $@ From ce6b5d0381a77da925174705427b894791e9190e Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 11:08:48 +0300 Subject: [PATCH 006/623] Update for RevoBoot v1.5.10/v1.5.20 --- i386/MakePaths.dir | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/i386/MakePaths.dir b/i386/MakePaths.dir index 978ddf4..b4b04c5 100755 --- a/i386/MakePaths.dir +++ b/i386/MakePaths.dir @@ -1,9 +1,15 @@ +# +# File: RevoBoot/i386/MakePaths.dir +# +# Updates: +# +# - Major cleanup (PikerAlpha, October 2012). +# + + # # Default paths for subdirectories. # OBJROOT=../../obj/i386/$(DIR) SYMROOT=../../sym/i386 -DSTROOT=../../dst/i386 -SRCROOT=/tmp - From 28be76c2098a74c8b21f90f7065a14b8a6a9f93b Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 11:09:46 +0300 Subject: [PATCH 007/623] Update for RevoBoot v1.5.10/v1.5.20 --- i386/Makefile | 49 ++++++++++++++++++------------------------------- 1 file changed, 18 insertions(+), 31 deletions(-) diff --git a/i386/Makefile b/i386/Makefile index 7d96cf6..a7ee5b7 100644 --- a/i386/Makefile +++ b/i386/Makefile @@ -1,49 +1,36 @@ # -# Makefile for RevoBoot +# File: RevoBoot/i386/Makefile +# +# Updates: +# +# - Major cleanup (PikerAlpha, October 2012). +# - Output improvements (PikerAlpha, October 2012). # - -CFLAGS = -O $(MORECPP) -arch i386 -g -static -CONFIG = hd -LIBDIR = libsa -INC = -I. -I$(LIBDIR) -ifneq "" "$(wildcard /bin/mkdirs)" - MKDIRS = /bin/mkdirs -else - MKDIRS = /bin/mkdir -p -endif -AS = as -LD = ld # # These paths are only valid in subdirectories of this directory. # -OBJROOT=`pwd`/../../obj/i386 -SYMROOT=`pwd`/../../sym/i386 -DSTROOT=`pwd`/../../dst/i386 -SRCROOT=/tmp +OBJROOT=../i386/obj/i386 +SYMROOT=../i386/sym/i386 -VPATH = $(OBJROOT):$(SYMROOT) +# VPATH = $(OBJROOT):$(SYMROOT) # -# The build over here is important. +# The build order here is important. # SUBDIRS = util libsa libsaio boot2 -lion: all -mountain-lion: all -all: +$(MAKEGOAL): @for i in ${SUBDIRS}; \ do \ - echo ================= make $@ for $$i =================; \ - ( cd $$i; ${MAKE} \ - "OBJROOT=$(OBJROOT)/$$i" \ - "SYMROOT=$(SYMROOT)" \ - "DSTROOT=$(DSTROOT)" \ - "SRCROOT=$(SRCROOT)" \ - "RC_ARCHS=$(RC_ARCHS)" \ - "RC_CFLAGS=$(RC_CFLAGS)" $@ \ - ) || exit $$?; \ + echo ================= make MODEL=$(PRODUCT_MODEL_TARGET) $@ for: RevoBoot/i386/$$i =================; \ + ( cd $$i; ${MAKE} \ + "OBJROOT=$(OBJROOT)/$$i" \ + "SYMROOT=$(SYMROOT)" \ + "RC_ARCHS=$(RC_ARCHS)" \ + "RC_CFLAGS=$(RC_CFLAGS)" $@ \ + ) || exit $$?; \ done From 4530f8ff11223e5aacfdfb50f24defb70daef659 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 11:10:47 +0300 Subject: [PATCH 008/623] Update for RevoBoot v1.5.10/v1.5.20 --- i386/libsaio/Makefile | 46 +++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/i386/libsaio/Makefile b/i386/libsaio/Makefile index 12e36a9..0bff17d 100644 --- a/i386/libsaio/Makefile +++ b/i386/libsaio/Makefile @@ -1,10 +1,18 @@ -DIR = libsaio +# +# File: RevoBoot/i386/libsaio/Makefile +# +# Updates: +# +# - Major cleanup (PikerAlpha, October 2012). +# - DMAKE_TARGET_MODEL added (PikerAlpha, October 2012). +# - Static data selectors added (PikerAlpha, October 2012). +# + + include ../MakePaths.dir UTILDIR = ../util LIBSADIR = ../libsa -INSTALLDIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/standalone -#SYMROOT= OPTIM = -Os -Oz DEBUG = -DNOTHING @@ -14,23 +22,15 @@ CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost \ -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ -DREVOBOOT_VERSION_INFO=\"RevoBoot\ v$(PRODUCT_VERSION_NUMBER)\" \ -DMAKE_TARGET_OS=$(PRODUCT_OS_TARGET) \ + -DSETTINGS_FILE=SETTINGS/$(MAKE_TARGET_MODEL).h \ + -DACPI_DATA_FILE=$(MAKE_ACPI_DATA_FILE) \ + -DEFI_DATA_FILE=$(MAKE_EFI_DATA_FILE) \ + -DSMBIOS_DATA_FILE=$(MAKE_SMBIOS_DATA_FILE) \ -fno-builtin -static $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float - -DEFINES= -CONFIG = hd INC = -I. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) -ifneq "" "$(wildcard /bin/mkdirs)" - MKDIRS = /bin/mkdirs -else - MKDIRS = /bin/mkdir -p -endif -AS = as -LD = ld -# LIBS= -lc_static -LIBS= VPATH = $(OBJROOT):$(SYMROOT) @@ -44,21 +44,10 @@ SAIO_OBJS = table.o asm.o bios.o biosfn.o \ SAIO_EXTERN_OBJS = console.o -SFILES = -CFILES = -HFILES = -EXPORTED_HFILES = -INSTALLED_HFILES = -OTHERFILES = Makefile -ALLSRC = $(SFILES) $(CFILES) \ - $(HFILES) $(OTHERFILES) LIBS = libsaio.a DIRS_NEEDED = $(OBJROOT) $(SYMROOT) -lion: all -mountain-lion: all - -all: $(DIRS_NEEDED) libsaio.h $(LIBS) +$(MAKEGOAL): $(DIRS_NEEDED) libsaio.h $(LIBS) libsaio.a: $(SAIO_EXTERN_OBJS) $(SAIO_OBJS) rm -f $(SYMROOT)/$(@F) @@ -66,6 +55,3 @@ libsaio.a: $(SAIO_EXTERN_OBJS) $(SAIO_OBJS) ranlib $(SYMROOT)/$(@F) include ../MakeInc.dir - -# dependencies --include $(OBJROOT)/Makedep From 5a382902e0908bc4ef422d6968d076878fe10181 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 11:12:15 +0300 Subject: [PATCH 009/623] Update for RevoBoot v1.5.10/v1.5.20 --- i386/libsa/Makefile | 62 +++++++++++---------------------------------- 1 file changed, 15 insertions(+), 47 deletions(-) diff --git a/i386/libsa/Makefile b/i386/libsa/Makefile index 633e3b3..773acac 100644 --- a/i386/libsa/Makefile +++ b/i386/libsa/Makefile @@ -1,70 +1,38 @@ -DIR = libsa +# +# File: RevoBoot/i386/libsa/Makefile +# +# Updates: +# +# - Major cleanup (PikerAlpha, October 2012). +# + + include ../MakePaths.dir UTILDIR = ../util LIBSAIODIR = ../libsaio -INSTALL_SA_DIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/standalone -INSTALL_MD_DIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/machdep/i386 OPTIM = -Os -Oz CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Werror \ - -fno-builtin -static $(OMIT_FRAME_POINTER_CFLAG) \ - -mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ - -march=pentium4 -msse2 -mfpmath=sse -msoft-float + -fno-builtin -static $(OMIT_FRAME_POINTER_CFLAG) \ + -DSETTINGS_FILE=SETTINGS/$(MAKE_TARGET_MODEL).h \ + -mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ + -march=pentium4 -msse2 -mfpmath=sse -msoft-float INC = -I. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSAIODIR) -ifneq "" "$(wildcard /bin/mkdirs)" - MKDIRS = /bin/mkdirs -else - MKDIRS = /bin/mkdir -p -endif -AS = as -LD = ld -# LIBS= -lc_static -LIBS= VPATH = $(OBJROOT):$(SYMROOT) -#SA_OBJS = prf.o printf.o zalloc.o \ -# string.o strtol.o error.o \ -# setjmp.o qsort.o efi_tables.o -SA_OBJS = prf.o printf.o zalloc.o \ - string.o strtol.o \ - setjmp.o efi_tables.o +SA_OBJS = prf.o printf.o zalloc.o string.o strtol.o setjmp.o efi_tables.o -SFILES = setjmp.s -#CFILES = prf.c printf.c zalloc.c \ -# string.c strtol.c error.c \ -# qsort.c efi_tables.c -CFILES = prf.c printf.c zalloc.c \ - string.c strtol.c \ - efi_tables.c - -HFILES = allocate.h -EXPORTED_HFILES = libsa.h allocate.h -INSTALLED_SA_HFILES = libsa.h -OTHERFILES = Makefile -ALLSRC = $(SFILES) $(CFILES) $(HFILES) $(OTHERFILES) LIBS = libsa.a DIRS_NEEDED = $(OBJROOT) $(SYMROOT) -lion: all -mountain-lion: all - -all: $(DIRS_NEEDED) $(LIBS) +$(MAKEGOAL): $(DIRS_NEEDED) $(LIBS) libsa.a: $(SA_OBJS) rm -f $(SYMROOT)/$(@F) ar q $(SYMROOT)/$(@F) $^ ranlib $(SYMROOT)/$(@F) -$(INSTALL_SA_DIR) $(INSTALL_MD_DIR): - $(MKDIRS) $@ - -installhdrs:: $(INSTALL_SA_DIR) $(INSTALL_MD_DIR) - cp $(INSTALLED_SA_HFILES) $(INSTALL_SA_DIR) - include ../MakeInc.dir - -# dependencies --include $(OBJROOT)/Makedep From e6f1d0c38775b33ac74fe517a47693d4d7e8c615 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 11:13:03 +0300 Subject: [PATCH 010/623] Update for RevoBoot v1.5.10/v1.5.20 --- i386/boot2/Makefile | 63 +++++++++++++++++---------------------------- 1 file changed, 23 insertions(+), 40 deletions(-) diff --git a/i386/boot2/Makefile b/i386/boot2/Makefile index 0c368d7..7c0970d 100644 --- a/i386/boot2/Makefile +++ b/i386/boot2/Makefile @@ -1,37 +1,31 @@ -# Makefile for i386 boot program -# define FLOPPY and SMALL using DEFINES macro as necessary +# +# File: RevoBoot/i386/boot2/Makefile +# +# Updates: +# +# - Support for self compiled libcc_kext.a added (PikerAlpha, October 2012). +# - Major cleanup (PikerAlpha, October 2012). +# -DIR = boot2 include ../MakePaths.dir OPTIM = -Os -Oz CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Werror \ -fno-builtin -DSAIO_INTERNAL_USER -static $(OMIT_FRAME_POINTER_CFLAG) \ -DMAKE_TARGET_OS=$(PRODUCT_OS_TARGET) \ + -DSETTINGS_FILE=SETTINGS/$(MAKE_TARGET_MODEL).h \ -mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -DEFINES= -CONFIG = hd -SYMDIR = $(SYMROOT) LIBSADIR = ../libsa LIBSAIODIR = ../libsaio UTILDIR = ../util -INC = -I. -I.. -I$(SYMDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(UTILDIR) - -ifneq "" "$(wildcard /bin/mkdirs)" - MKDIRS = /bin/mkdirs -else - MKDIRS = /bin/mkdir -p -endif - -AS = as -LD = gcc +INC = -I. -I.. -I$(SYMROOT) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(UTILDIR) -LIBS= -L$(SYMDIR) -lsaio -lsa -LIBDEP= $(SYMDIR)/libsaio.a $(SYMDIR)/libsa.a +LIBS = -L$(SYMROOT) -lsaio -lsa +LIBDEP = $(SYMROOT)/libsaio.a $(SYMROOT)/libsa.a # # build_gcc no longer builds libgcc.a and libcc_kext.a with 'all' target @@ -51,48 +45,37 @@ ifeq ($(wildcard $(LIBCC)),) LIBCC= `find /usr/llvm-gcc-*/lib/gcc/*/*/ -name \libcc_kext.a` endif -OTHER_FILES = -INSTALLDIR = $(DSTROOT)/usr/standalone/i386 VPATH = $(OBJROOT):$(SYMROOT) # -# The ordering is important; +# The order of object filenames below is important; # OBJS = boot2.o boot.o bootlogo.o graphics.o drivers.o options.o lzss.o -UTILDIR = ../util -SFILES = boot2.s -CFILES = boot.c bootlogo.c graphics.c drivers.c options.c -HFILES = boot.h bootlogo.h - -OTHERFILES = Makefile -ALLSRC = $(FOREIGNSRC) $(FOREIGNBIN) $(SFILES) $(CFILES) $(HFILES) $(OTHERFILES) DIRS_NEEDED = $(OBJROOT) $(SYMROOT) BOOT2ADDR = 20200 -MAXBOOTSIZE = 392704 -lion: all -mountain-lion: all +# +# Set maximum size of the booter to 128KB (should be more than sufficient). +# +MAXBOOTSIZE = 131072 -all: $(DIRS_NEEDED) boot +$(MAKEGOAL): $(DIRS_NEEDED) boot boot: machOconv $(OBJS) $(LIBDEP) $(UTILDIR)/ld_classic -static -preload -segaddr __INIT $(BOOT2ADDR) \ - -arch i386 -segalign 20 \ + -arch i386 -segalign 20 \ -o $(SYMROOT)/boot.sys $(filter %.o,$^) $(LIBS) $(LIBCC) machOconv $(SYMROOT)/boot.sys $(SYMROOT)/boot size $(SYMROOT)/boot.sys ls -l $(SYMROOT)/boot @( size=`ls -l $(SYMROOT)/boot | awk '{ print $$5}'` ; \ - if expr "$$size" ">" "$(MAXBOOTSIZE)" > /dev/null ;\ + if expr "$$size" ">" "$(MAXBOOTSIZE)" > /dev/null ; \ then \ - echo "Booter executable larger than $(MAXBOOTSIZE) bytes" ;\ - rm $(SYMROOT)/boot ;\ - exit 1;\ + echo "Error: Booter executable larger than $(MAXBOOTSIZE) bytes" ; \ + rm $(SYMROOT)/boot ; \ + exit 1 ; \ fi) include ../MakeInc.dir - -#dependencies --include $(OBJROOT)/Makedep From 2aced469506a483bc6a392f6709bae655394a390 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 11:14:00 +0300 Subject: [PATCH 011/623] Update for RevoBoot v1.5.10/v1.5.20 --- i386/config/data.h | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/i386/config/data.h b/i386/config/data.h index c3a566c..bd56edc 100755 --- a/i386/config/data.h +++ b/i386/config/data.h @@ -1,19 +1,31 @@ /* * Copyright (c) 2009 Master Chief. - * Refactored by DHP in 2010-2011. + * + * This file, included by acpi.c, efi.c and smbios.c includes data files + * for the target build model (based on MODEL=MacModelNN) or default.h + * + * Updates: + * + * - Refactored by DHP in 2010-2011. + * - Automatic model data selection (PikerAlpha, October 2012). + * */ -#if PATCH_ACPI_TABLE_DATA && INCLUDE_ACPI_DATA +#if (PATCH_ACPI_TABLE_DATA && INCLUDE_ACPI_DATA) #undef INCLUDE_ACPI_DATA - #include "acpi/data.h" -#elif INJECT_EFI_DEVICE_PROPERTIES && INCLUDE_EFI_DATA + #include STRING(ACPI_DATA_FILE) +#endif + +#if (INJECT_EFI_DEVICE_PROPERTIES && INCLUDE_EFI_DATA) #undef INCLUDE_EFI_DATA - #include "efi/data.h" -#elif USE_STATIC_SMBIOS_DATA && INCLUDE_SMBIOS_DATA + #include STRING(EFI_DATA_FILE) +#endif + +#if (USE_STATIC_SMBIOS_DATA && INCLUDE_SMBIOS_DATA) #undef INCLUDE_SMBIOS_DATA - #include "smbios/data.h" + #include STRING(SMBIOS_DATA_FILE) #endif From fea70a66c944ce5f27854cb20d1e6bbed1108492 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 11:15:15 +0300 Subject: [PATCH 012/623] Update for RevoBoot v1.5.10/v1.5.20 --- i386/config/settings.h | 386 +---------------------------------------- 1 file changed, 6 insertions(+), 380 deletions(-) diff --git a/i386/config/settings.h b/i386/config/settings.h index 263eba5..ae4c0f9 100644 --- a/i386/config/settings.h +++ b/i386/config/settings.h @@ -1,387 +1,13 @@ /* - * Copyright (c) 2009 Master Chief. All rights reserved. - * - * Note: This is an essential part of the build process for RevoBoot v1.5.00 and greater. + * Copyright (c) 2009 Master Chief. * * Updates: * - * - Latest cleanups and additional directives added by DHP in 2011. - * - Static CPU data simplified by DHP in Juni 2011 (thanks to MC and flAked for the idea). - * - Automatic creation / injection of SSDT_PR.aml added by DHP in June 2011. - * - New compiler directive (BOOT_TURBO_BOOST_RATIO) added by Jeroen (June 2011). - * - SMBIOS data logic moved to preprocessor code (PikerAlpha, October 2012). - * - STATIC_MODEL_NAME moved to libsaio/i386/SMBIOS/model_data.h (PikerAlpha, October 2012). - * - STATIC_MAC_PRODUCT_NAME moved to libsaio/i386/SMBIOS/model_data.h (PikerAlpha, October 2012). - * - STATIC_SMBIOS_MODEL_ID rrenamed to TARGET_MODEL (PikerAlpha, October 2012). - * - OVERRIDE_DYNAMIC_PRODUCT_DETECTION removed/no longer supported (PikerAlpha, October 2012). - * - INTEL_CORE_TECHNOLOGY per default set to 1 (PikerAlpha, October 2012). - * + * - Read settings file based on given model identifier (PikerAlpha, October 2012). */ +#define TO_STRING_DO(a) #a +#define STRING(a) TO_STRING_DO(a) +#define INCLUDE_FILE STRING(SETTINGS_FILE) -//--------------------------------------------------------------- ACPI.C ------------------------------------------------------------------- - - -#define ACPI_10_SUPPORT 0 // Set to 0 by Default. Set to 1 for ACPI 1.0 compliant BIOS versions. - // - // Note: Must go first (before acpi/essentials) since it is used there, - // and requires you to set PATCH_ACPI_TABLE_DATA to 1. - - -#define PATCH_ACPI_TABLE_DATA 1 // Set to 1 by default (enabling patching). Use 0 to keep the original - // unmodified ACPI tables, but please note (very well) that this is - // only supported by very few motherboards / BIOS'es. You may also - // need a kext like OSXRestart.kext to be able to restart your system, - // this due to a possibly broken FACP table in your BIOS! - // - // Note: Requires one of the following STATIC_* and/or LOAD_* settings: - - -#define USE_STATIC_ACPI_BASE_ADDRESS 0 // Set to 0 by default. Use 1 only after gathering the base address! - // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. - - -#if USE_STATIC_ACPI_BASE_ADDRESS - #define STATIC_ACPI_BASE_ADDRESS 0x000f0450 // Set DEBUG_ACPI to 1 to get this address. -#endif - - -#define STATIC_APIC_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when you want to inject a modified copy - // with say stripped out unused CPU's or other required modifications. - // - // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. - - -#define STATIC_APIC2_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when you want to inject a second APIC - // (ACPI-1) table data for additional CPU core support. - // - // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. - - -#define STATIC_DSDT_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when you want to inject static DSDT data. - - -#define STATIC_ECDT_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when want to inject a custom ECDT table. - // - // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. - - -#define STATIC_FACS_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when want to inject a custom FACS table. - // - // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. - - -#define STATIC_HPET_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when you want to inject a static copy - // of a custom HPET table. - // - // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. - - -#define STATIC_SSDT_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when you want to inject modifications - // that can / should be done from this ACPI table. - // - // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. - - -#define STATIC_SSDT_GPU_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when you want to inject modifications - // for your graphics card (like I do for my ATI PCI-E card). - // - // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. - - -#define STATIC_SSDT_PR_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when you want to inject your Intel - // SpeedStep related modifications (like I do). - // - // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. - - -#define STATIC_SSDT_SATA_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when want to inject SATA related modifications. - // - // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. - - -#define STATIC_SSDT_USB_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when want to inject USB related modifications. - // - // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. - - -#define LOAD_DSDT_TABLE_FROM_EXTRA_ACPI 1 // Set to 0 by default. Use 1 when your setup requires a modified DSDT table - // and you want to load: /Extra/ACPI/dsdt.aml instead of injecting a static - // DSDT table from: RevoBoot/i386/config/ACPI/data.h - // - // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. - - -#define LOAD_SSDT_TABLE_FROM_EXTRA_ACPI 0 // Set to 1 by default. Use 0 only after you've converted your SSDT into - // STATIC_SSDT_TABLE_INJECTION in: RevoBoot/i386/config/ACPI/data.h - // or when you don't want/need to load /Extra/ACPI/SSDT.aml - // - // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. - - -#define LOAD_EXTRA_ACPI_TABLES (LOAD_DSDT_TABLE_FROM_EXTRA_ACPI || LOAD_SSDT_TABLE_FROM_EXTRA_ACPI) - - -#define AUTOMATIC_SSDT_PR_CREATION 1 // Set to 0 by default (support for Sandy Bridge only). - // - // This injects a custom SSDT (in configure mode) with: - // - // Use 1 to inject: P/C-State definition blocks. - // Use 2 to inject: Processor (CPUn, 0x0n, 0x00000410, 0x06) {...} declaration blocks. - // Use 3 to inject: Both of the above. - // Use 4 to inject: Device (SBUS) {...} which is required for Power Management. - // Use 5 to inject: P/C-State definition blocks plus the former (Device SBUS). - // Use 7 to inject: All of the above. - // - // Notes: Device SBUS can only be injected when it isn't part of other ACPI tables! - // This feature should only be used once, to extract the SSDT_PR from ioreg - // and use it as STATIC_SSDT_PR_TABLE_DATA in RevoBoot/i386/config/ACPI/data.h - - -#if AUTOMATIC_SSDT_PR_CREATION && STATIC_SSDT_PR_TABLE_INJECTION == 0 - #define MAX_NUMBER_OF_P_STATES 22 // The i5-2500K need 18 for the base-range (1600-3300) plus 4 for the Turbo modes. - // The i7-2600K need 19 for the base-range (1600-3400) plus 4 for the Turbo modes. - // The i7-2700K need 20 for the base-range (1600-3500) plus 4 for the Turbo modes. - // The i7-3770K need 20 for the base-range (1600-3500) plus 4 for the Turbo modes. - // Low power (mobility) processors might need an extended range! - // - // Note: AICPUPM wants a P-State for each 100 MHz bank or it will fail (see note below). - -#define DROP_FACTORY_SSDT_TABLES 1 // Set to 1 by default (this setting is required). - // - // Note: Do not change this setting (must drop SSDT tables). - -#define NUMBER_OF_TURBO_STATES 4 // Set to 4 by default. - // - // Note: Make sure to add a full range, one P-State for each 100 MHz when OC'ing - // or AICPIPM will fail with: "P-State Stepper Error 18 at step N on CPU N" - -#define OVERRIDE_ACPI_METHODS 0 // Set to 0 by default (do nothing). - // Use 1 to override Method _PTS in a static SSDT or Extra/ACPI/SSDT.aml - // Use 2 to override Method _WAK in a static SSDT or Extra/ACPI/SSDT.aml - // Use 3 to override both _PTS and _WAK. - // - // Note: This changes the underscore of _PTS and/or _WAK into a "Z" which - // allows you to inject a customized copy from /Extra/ACPI/SSDT.aml -#else - #define OVERRIDE_ACPI_METHODS 0 // Set to 0 by default (do nothing). - - #define DROP_FACTORY_SSDT_TABLES 0 // Set to 0 by default. Use 1 with caution (might disable SpeedStep). -#endif - -#define REPLACE_EXISTING_SSDT_TABLES 0 // Set to 0 by default. Use 1 with caution (might disable SpeedStep). - // - // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. - -#define APPLE_STYLE_ACPI 0 // Set to 0 by default. Use 1 to change the OEMID's to Mac likes. - // - // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1 and keep in mind that this can - // only change the headers of injected/replaced tables. Not the factory tables. - - -#define DEBUG_ACPI 0 // Set to 0 by default. Use 1 when things don't seem to work for you. - - -//--------------------------------------------------------------- BOOT.C ------------------------------------------------------------------- - - -#define PRE_LINKED_KERNEL_SUPPORT 1 // Set to 1 by default. Change this to 0 to disable the use of pre-linked kernels. - -#define MUST_ENABLE_A20 0 // Set to 0 by default. Change this to 1 when your hardware requires it. - -#define SAFE_MALLOC 0 // Set to 0 by default. Change this to 1 when booting halts with a memory allocation error. - -#define DEBUG_BOOT 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. - - -//---------------------------------------------------------------- CPU.C ------------------------------------------------------------------- - - -#define USE_STATIC_CPU_DATA 1 // Set to 0 by default (dynamic data collection). Change this to 1 to use static data. - -#define CPU_VENDOR_ID CPU_VENDOR_INTEL // CPU_VENDOR_AMD is not supported. - -#define INTEL_CORE_TECHNOLOGY 1 // Set to 1 by default. Use 0 for older non Intel Core CPU's (removes unused code). - // - // Warning: Do not use 0 on Core Technology CPU's or sysctl's machdep.tsc.frequency will be - // initialized with the wrong value (various things, like the spinner will go mad). - -#define OC_BUSRATIO_CORRECTION 0 // Set to 0 by default. Change this to busratio-100 (OC'ed systems with a changed busratio). - -#define BOOT_TURBO_RATIO 0 // Set to 0 by default. Change this to the desired (and supported) max turbo multiplier. - // - // Example: 0x2800 for 4.0 GHz on a i7-2600. - -#define DEBUG_CPU 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. - // Note: CPU info data will not be displayed when USE_STATIC_CPU_DATA is set to 1 - -#if DEBUG_CPU -#define DEBUG_CPU_TURBO_RATIOS 0 // Set to 0 by default. Change this to 1 when you want to check the core ratio. - -#define DEBUG_CST_SUPPORT 0 // Set to 0 by default. Change this to 1 to check the in BIOS enabled C-States. - -#define DEBUG_TSS_SUPPORT 0 // Set to 0 by default. Change this to 1 to check the T-State Clock Modulation. - -#define DEBUG_CPU_TDP 0 // Set to 0 by default. Change this to 1 when you want to check the TDP. -#endif - -//---------------------------------------------------------- CPU/STATIC_DATA.C ------------------------------------------------------------- - - -#if USE_STATIC_CPU_DATA - #define STATIC_CPU_Type 0x602 // kSMBTypeOemProcessorType - used in: libsaio/SMBIOS/dynamic_data.h - - #define STATIC_CPU_NumThreads 4 // Used in: i386/libsaio/ACPI/ssdt_pr_generator.h - - #define STATIC_CPU_FSBFrequency 100000000ULL // 9 digits + ULL - used in: i386/libsaio/efi.c - - #define STATIC_CPU_QPISpeed 0 // kSMBTypeOemProcessorBusSpeed (0 for Sandy Bridge / Jaketown). -#endif - -#define STATIC_CPU_NumCores 4 // Set to 4 by default. Must be set to the number of cores for your processor! - // - // Note: Used in i386/libsaio/ACPI/ssdt_pr_generator.h, cpu.c and platform.c - // for both static and dynamic CPU data. - -//--------------------------------------------------------------- DISK.C ------------------------------------------------------------------- - - -#define EFI_SYSTEM_PARTITION_SUPPORT 0 // Set to 0 by default. Set this to 1 when your system boots from the hidden EFI partition. - -#define LEGACY_BIOS_READ_SUPPORT 0 // Set to 0 by default. Change this to 1 for crappy old BIOSes. - -#define LION_FILEVAULT_SUPPORT 0 // Set to 0 by default. Setting this to 1 will make RevoBoot skip encrypted boot partitions - // and boot from the Recovery HD partition instead (when available). - -#define APPLE_RAID_SUPPORT 0 // Set to 0 by default. Change this to 1 for Apple Software RAID support. - -#define DEBUG_DISK 0 // Set to 0 by default. Change it to 1 when things don't seem to work for you. - - -//------------------------------------------------------------- DRIVERS.C ------------------------------------------------------------------- - - -#define DEBUG_DRIVERS 0 // Set to 0 by default. Change it to 1 when things don't seem to work for you. - - -//---------------------------------------------------------------- EFI.C ------------------------------------------------------------------- - - -#define APPLE_STYLE_EFI 1 // Set to 1 by default. Change this to 1 to add additional 'Mac-like' properties. - -#define INJECT_EFI_DEVICE_PROPERTIES 0 // Set to 0 by default. Change this to 1 when you need to inject 'device-properties'. - // - // Note: Required when not setting device-properties from your DSDT/SSDT. - -#define EFI_64_BIT 1 // Set to 1 by default for EFI64 on 64-bit platforms. Supporting both - // 32 and 64-bit boot modes (using arch=i386/x86_64 under Kernel Flags). - // - // Change this to 0 for 32-bit only platforms (think Intel Atom CPU) - // or when you want to boot with EFI32 (for testing) on a 64-bit - // platform, but then you must make a small change in platform.c (see comment in file). - // - // Note: Do not change this setting, unless you know what you are doing. - -#define STATIC_SMSERIALNUMBER "SOMESRLNUMBR" // Example only! - -#define STATIC_SYSTEM_SERIAL_NUMBER { 'S', 'O', 'M', 'E', 'S', 'R', 'L', 'N', 'U', 'M', 'B', 'R' } // Example only! - -#define STATIC_SYSTEM_ID { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F } // Example only! - -#define DEBUG_EFI 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. - -#define EFI_DEBUG_MODE 0 // Set to 0 by default (for OS X 10.7 LION only). - - -//------------------------------------------------------------- GRAPHICS.C ----------------------------------------------------------------- - -#define USE_STATIC_DISPLAY_RESOLUTION 1 // Set to 0 by default. Use 1 when you need to override the resolution detection features - // in RevoBoot, which may not be supported by your BIOS and/or display (monitor). - -#define STATIC_SCREEN_WIDTH 1900 // Used (in RevoBoot v1.0.35 and greater) when USE_STATIC_DISPLAY_RESOLUTION is 1 and when - // USE_STATIC_DISPLAY_RESOLUTION is 0 but getResolutionFromEDID() isn't supported (failed). - -#define STATIC_SCREEN_HEIGHT 1200 // Used (in RevoBoot v1.0.35 and greater) when USE_STATIC_DISPLAY_RESOLUTION is 1 and when - // USE_STATIC_DISPLAY_RESOLUTION is 0 but getResolutionFromEDID() isn't supported (failed). - -#define DEBUG_BOOT_GRAPHICS 0 // Set to 0 by default. Use 1 when to see debug info. - - -//------------------------------------------------------------ STRINGDATA.H ---------------------------------------------------------------- - -#define LION_FILEVAULT_SUPPORT 0 // Set to 0 by default. Setting this to 1 will make RevoBoot skip encrypted boot partitions - // and boot from the Recovery HD partition instead (when available). - -#if LION_FILEVAULT_SUPPORT - #define LION_RECOVERY_SUPPORT 1 // Make RevoBoot search for the Recovery HD partition and boot from it (when available). -#else - #define LION_RECOVERY_SUPPORT 0 // Set to 0 by default. Setting this to 1 will make RevoBoot search for the Recovery HD and - // try to boot from it, when it is properly setup and modified for RevoBoot. -#endif - -#define LION_INSTALL_SUPPORT 0 // Set to 0 by default. Setting this to 1 will make RevoBoot search in specific directories - // for com.apple.Boot.plist – required for Mac like Lion OS X installations. - -//-------------------------------------------------------------- SMBIOS.C ------------------------------------------------------------------ - - -#define USE_STATIC_SMBIOS_DATA 0 // Set to 0 by default (dynamic data collection). Change this to 1 to use static data. - -#if (USE_STATIC_SMBIOS_DATA == 0 && USE_STATIC_CPU_DATA == 1) - #undef USE_STATIC_CPU_DATA // Prevent boot failures due to wrong settings (until I figured out what we are missing). -#endif - -#define OVERRIDE_DYNAMIC_MEMORY_DETECTION 0 // Set to 0 by default. Change this to 0 only when your SMBIOS data (type 17) is correct, or when - // you want/need to override some/all of the SMBIOS data. - // - // Note: Defaults to n MB 1066 DDR3 when set to 0 (to prevent errors in Profile Manager). - - -#define TARGET_MODEL MACMINI // Set to MACMINI by default. Supported models are: - // - // IMAC and IMAC_131, IMAC_122, IMAC_111, IMAC_121 - // MACBOOK and MACBOOK_41 - // MACBOOKAIR and MACBOOKAIR_42, MACBOOKAIR_41 - // MACBOOKPRO and MACBOOKPRO_101, MACBOOKPRO_91, MACBOOKPRO_83, MACBOOKPRO_82, - // MACBOOKPRO_81, MACBOOKPRO_61 - // MACMINI and MACMINI_53, MACMINI_52, MACMINI_51 - // MACPRO and MACPRO_51, MACPRO_41, MACPRO_31 - // - // Note: MACMINI (without _NNN) selects the default model (last one i.e. MACMINI_51). - -#define DEBUG_SMBIOS 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. - - -//-------------------------------------------------------------- PLATFORM.C ---------------------------------------------------------------- - - -#if USE_STATIC_SMBIOS_DATA - // Do nothing. -#elif OVERRIDE_DYNAMIC_MEMORY_DETECTION - // Setup RAM module info. Please note that you may have to expand this when you have more RAM modules. - #define STATIC_RAM_SLOTS 4 // Number of RAM slots on mainboard. - - #define STATIC_RAM_VENDORS { "Corsair", "N/A", "Corsair", "N/A", 0 } // Use "N/A" for empty RAM banks. - - #define DYNAMIC_RAM_OVERRIDE_TYPE 0 // Set to 0 by default. See libsaio/platform.h for supported values. - - #define DYNAMIC_RAM_OVERRIDE_SIZE 0 // Set to 0 by default. Change this to 1 when you want to use override values (see below). - -#if DYNAMIC_RAM_OVERRIDE_SIZE - #define DYNAMIC_RAM_OVERRIDE_SIZES { SMB_MEM_SIZE_2GB, SMB_MEM_BANK_EMPTY, SMB_MEM_SIZE_2GB, SMB_MEM_BANK_EMPTY, 0 } // See libsaio/platform.h for other values. -#endif - - #define DYNAMIC_RAM_OVERRIDE_FREQUENCY 0 // Set to 0 by default. Change this to the frequency that you want to use as override value. - - #define STATIC_RAM_PART_NUMBERS { "PartNum#0", "N/A", "PartNum#2", "N/A", 0 } // Use "N/A" for empty RAM banks. - - #define STATIC_RAM_SERIAL_NUMBERS { "Serial#0", "N/A", "Serial#2", "N/A", 0 } // Use "N/A" for empty RAM banks. -#endif - -#define INCLUDE_MPS_TABLE 0 // Set to 0 by default. Change this to 1 when you want to include the MP table. - -#define DEBUG_PLATFORM 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. - - -//================================================================= END ==================================================================== - +#include INCLUDE_FILE From d52f639f9681422e4243aae245c80f9fd68d3d78 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 11:29:46 +0300 Subject: [PATCH 013/623] Build support for optional model identifier (example: Macmini51) --- r | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r b/r index 74d7e5c..d75375a 100755 --- a/r +++ b/r @@ -1,4 +1,4 @@ make clean clear -make > out.log +make MODEL=%1 > out.log From 412daa8e5da88ccad8d50d018f140249db08b516 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 11:31:16 +0300 Subject: [PATCH 014/623] Moving file extensions --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 40a2c4c..76d6f57 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ ifdef MODEL # # Include default/empty static data file (no model identifier specified). # - DATA_FILE = data.h + DATA_FILE = data endif else # @@ -109,16 +109,16 @@ else # # Include default/empty static data file (no model identifier specified). # - DATA_FILE = data.h + DATA_FILE = data endif # # Export target filenames for static ACPI, EFI and SMBIOS data. # -export MAKE_ACPI_DATA_FILE = ACPI/$(DATA_FILE) -export MAKE_EFI_DATA_FILE = EFI/$(DATA_FILE) -export MAKE_SMBIOS_DATA_FILE = SMBIOS/$(DATA_FILE) +export MAKE_ACPI_DATA_FILE = ACPI/$(DATA_FILE).h +export MAKE_EFI_DATA_FILE = EFI/$(DATA_FILE).h +export MAKE_SMBIOS_DATA_FILE = SMBIOS/$(DATA_FILE).h # # Our one and only build target directory. From 0cd25765d471da68b363a2a781dfb33c786646a6 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 11:33:48 +0300 Subject: [PATCH 015/623] Fix typo --- r | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r b/r index d75375a..1d06cf0 100755 --- a/r +++ b/r @@ -1,4 +1,4 @@ make clean clear -make MODEL=%1 > out.log +make MODEL=$1 > out.log From ef159e73d99d11398fa6be186d83eee1f7da91a6 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 11:48:31 +0300 Subject: [PATCH 016/623] Copy data-template.h for new configurations --- Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Makefile b/Makefile index 76d6f57..bbe91ec 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ # - Creates RevoBoot/config/SETTINGS when missing (PikerAlpha, October 2012). # - Copies settings-template.h to SETTINGS/ModelnameNN.h when missing (PikerAlpha, October 2012). # - Automatic ACPI/EFI/SMBIOS data selection (PikerAlpha, October 2012). +# - Copies ACPI/EFI/SMBIOS/data-template.h for new conigurations (PikerAlpha, October 2012). # # @@ -132,6 +133,18 @@ SETTINGS_DIR=$(CONFIG_DIR)/SETTINGS SETTINGS_FILE=$(SETTINGS_DIR)/$(MAKE_TARGET_MODEL).h $(MAKEGOAL): $(SYMROOT) $(OBJROOT) + @if [ ! -f $(ARCH_DIR)/config/$(MAKE_ACPI_DATA_FILE) ]; then \ + cp -n $(ARCH_DIR)/config/ACPI/data-template.h $(ARCH_DIR)/config/$(MAKE_ACPI_DATA_FILE); \ + fi; + + @if [ ! -f $(ARCH_DIR)/config/$(MAKE_EFI_DATA_FILE) ]; then \ + cp -n $(ARCH_DIR)/config/EFI/data-template.h $(ARCH_DIR)/config/$(MAKE_EFI_DATA_FILE); \ + fi; + + @if [ ! -f $(ARCH_DIR)/config/$(MAKE_SMBIOS_DATA_FILE) ]; then \ + cp -n $(ARCH_DIR)/config/SMBIOS/data-template.h $(ARCH_DIR)/config/$(MAKE_SMBIOS_DATA_FILE); \ + fi; + @if [ ! -d $(SETTINGS_DIR) ]; then \ /bin/mkdir -p $(SETTINGS_DIR); \ fi; From 1826d9262d2060cb5370809d8652ee6f8e4b7730 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 12:00:44 +0300 Subject: [PATCH 017/623] Update for RevoBoot v1.5.10/v1.5.20 --- i386/util/Makefile | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/i386/util/Makefile b/i386/util/Makefile index 87e8d42..8a4883c 100644 --- a/i386/util/Makefile +++ b/i386/util/Makefile @@ -1,34 +1,27 @@ # -# Until I can remove the dependency on the appkit, -# we'll just keep the generated files in this directory -# and install them directly, rather than generating them again. +#File: RevoBoot/i386/util/Makefile # +# Updates: +# +# - Major cleanup (PikerAlpha, October 2012). +# + -DIR = util include ../MakePaths.dir VPATH = $(OBJROOT):$(SYMROOT) -INSTALLDIR = $(DSTROOT)/usr/standalone/i386 -LOCALBIN = $(DSTROOT)/usr/local/bin - OPTIM = -Os -Oz CFLAGS = $(RC_CFLAGS) $(OPTIM) -Wmost -Werror -g + LDFLAGS = -CFILES = md.c machOconv.c -ALLSRC = $(CFILES) $(MFILES) $(HFILES) $(EXPORT_HFILES) +DEFINES= PROGRAMS = md machOconv -OUTFILES = $(PROGRAMS) - DIRS_NEEDED = $(OBJROOT) $(SYMROOT) $(LANGDIR) -lion: all - -mountain-lion: all - -all: $(DIRS_NEEDED) $(PROGRAMS) +$(MAKEGOAL): $(DIRS_NEEDED) $(PROGRAMS) machOconv: machOconv.o $(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $(SYMROOT)/$(@F) machOconv.o @@ -36,7 +29,3 @@ md: $(CC) -mdynamic-no-pic -Wall -dead_strip -arch i386 -mmacosx-version-min=10.5 md.c -o $(SYMROOT)/md include ../MakeInc.dir - -#dependencies --include $(OBJROOT)/Makedep - From a7b40d41e074fdb8633e3a57872394c5c4391247 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 12:09:30 +0300 Subject: [PATCH 018/623] Bug fix, typo and cleanups for RevoBoot v1.5.20 --- i386/config/settings-template.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 0732192..82fa634 100644 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -12,9 +12,10 @@ * - SMBIOS data logic moved to preprocessor code (PikerAlpha, October 2012). * - STATIC_MODEL_NAME moved to libsaio/i386/SMBIOS/model_data.h (PikerAlpha, October 2012). * - STATIC_MAC_PRODUCT_NAME moved to libsaio/i386/SMBIOS/model_data.h (PikerAlpha, October 2012). - * - STATIC_SMBIOS_MODEL_ID rrenamed to TARGET_MODEL (PikerAlpha, October 2012). + * - STATIC_SMBIOS_MODEL_ID renamed to TARGET_MODEL (PikerAlpha, October 2012). * - OVERRIDE_DYNAMIC_PRODUCT_DETECTION removed/no longer supported (PikerAlpha, October 2012). * - INTEL_CORE_TECHNOLOGY per default set to 1 (PikerAlpha, October 2012). + * - INJECT_EFI_DEVICE_PROPERTIES per default set to 1 (PikerAlpha, October 2012). * */ @@ -216,13 +217,13 @@ // Note: CPU info data will not be displayed when USE_STATIC_CPU_DATA is set to 1 #if DEBUG_CPU -#define DEBUG_CPU_TURBO_RATIOS 0 // Set to 0 by default. Change this to 1 when you want to check the core ratio. + #define DEBUG_CPU_TURBO_RATIOS 0 // Set to 0 by default. Change this to 1 when you want to check the core ratio. -#define DEBUG_CST_SUPPORT 0 // Set to 0 by default. Change this to 1 to check the in BIOS enabled C-States. + #define DEBUG_CST_SUPPORT 0 // Set to 0 by default. Change this to 1 to check the in BIOS enabled C-States. -#define DEBUG_TSS_SUPPORT 0 // Set to 0 by default. Change this to 1 to check the T-State Clock Modulation. + #define DEBUG_TSS_SUPPORT 0 // Set to 0 by default. Change this to 1 to check the T-State Clock Modulation. -#define DEBUG_CPU_TDP 0 // Set to 0 by default. Change this to 1 when you want to check the TDP. + #define DEBUG_CPU_TDP 0 // Set to 0 by default. Change this to 1 when you want to check the TDP. #endif //---------------------------------------------------------- CPU/STATIC_DATA.C ------------------------------------------------------------- @@ -233,7 +234,7 @@ #define STATIC_CPU_NumThreads 4 // Used in: i386/libsaio/ACPI/ssdt_pr_generator.h - #define STATIC_CPU_FSBFrequency 100000000ULL // 9 digits + ULL - used in: i386/libsaio/efi.c + #define STATIC_CPU_FSBFrequency 100000000ULL // 9 digits + ULL - used in: RevoBoot/i386/libsaio/efi.c #define STATIC_CPU_QPISpeed 0 // kSMBTypeOemProcessorBusSpeed (0 for Sandy Bridge / Jaketown). #endif @@ -331,10 +332,6 @@ #undef USE_STATIC_CPU_DATA // Prevent boot failures due to wrong settings (until I figured out what we are missing). #endif -#if TARGET_MODEL & MACPRO - #define STATIC_SMBOARDSERIAL "SOMEBOARDNMBR" // Example only! -#endif - #define OVERRIDE_DYNAMIC_MEMORY_DETECTION 0 // Set to 0 by default. Change this to 0 only when your SMBIOS data (type 17) is correct, or when // you want/need to override some/all of the SMBIOS data. // @@ -353,6 +350,10 @@ // // Note: MACMINI (without _NNN) selects the default model (last one i.e. MACMINI_51). +#if TARGET_MODEL & MACPRO + #define STATIC_SMBOARDSERIAL "SOMEBOARDNMBR" // Example only! +#endif + #define DEBUG_SMBIOS 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. From b923535229bebe6ebd290b971ae48dbb6b4b1475 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 12:11:46 +0300 Subject: [PATCH 019/623] New Macmini6 data added for RevoBoot v1.5.21 --- i386/libsaio/smbios/model_data.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index bf1ce85..92a435c 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -136,7 +136,19 @@ // ------------------------------------------------------------------------------------- #define SMB_FAMILY "Macmini" - #if (TARGET_MODEL == MACMINI_53) + #if (TARGET_MODEL == MACMINI_62) + // Intel Core i7-3615QM @ 2.30 GHz (4 cores - 8 threads) + #define SMB_BIOS_VERSION "MM61.88Z.0106.B00.1208091121" + #define SMB_PRODUCT_NAME "Macmini6,2" + #define SMB_BOARD_PRODUCT "Mac-F65AE981FFA204ED" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '2' } + #elif (TARGET_MODEL == MACMINI_61) + // Intel Core i5-3210M @ 2.50 GH (2 cores - 4 theeads) + #define SMB_BIOS_VERSION "MM61.88Z.0106.B00.1208091121" + #define SMB_PRODUCT_NAME "Macmini6,1" + #define SMB_BOARD_PRODUCT "Mac-031AEE4D24BFF0B1" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '1' } + #elif (TARGET_MODEL == MACMINI_53) // Intel Core i7-2635QM @ 2.0GHz (4 cores - 8 threads) #define SMB_BIOS_VERSION "MM51.88Z.0077.B10.1201241549" #define SMB_PRODUCT_NAME "Macmini5,3" From b75feb8d161f5332716f92fa4bc79af287d334c0 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 12:25:20 +0300 Subject: [PATCH 020/623] Update for RevoBoot v.1.5.21 --- CHANGES | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/CHANGES b/CHANGES index e8624a6..39637a7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,30 @@ +RevoBoot v1.5.21 +================ +- Model data for new Macmini6,N added (PikerAlpha, October 2012). +- VERSION updated to v1.5.21 + + +RevoBoot v1.5.20 +================ +- Automatic data selection for ACPI/EFI and SMBIOS data (PikerAlpha, October 2012) +- Copies ACPI/EFI/SMBIOS/data-template.h to [your model.h] for new configurations (PikerAlpha, October 2012) + + +RevoBoot v1.5.10 +================ +- Makefiles cleaned up/optimized (PikerAlpha, October 2012). +- make now defaults to Mountain Lion (PikerAlpha, October 2012). +- MODEL=[your model] argument added to makefiles (PikerAlpha, October 2012). +- MODEL=$1 added to RevoBoot/r for optional model identifier (PikerAlpha, October 2012). +- make now creates RevoBoot/i386/config/SETTINGS when missing (PikerAlpha, October 2012). +- Makefile now copies settings-template.h to SETTINGS/[your model.h] when missing (PikerAlpha, October 2012). + + +RevoBoot v1.5.01 +================ +- MacPro SMBIOS board serial/type added (dgsga, October 2012). + + RevoBoot v1.5.00 ================ - RevoBoot project forked (PikerAlpha, October 2012). From 267063d55f36649f3532c6ea84abc17968703995 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 12:25:46 +0300 Subject: [PATCH 021/623] Updating version info for RevoBoot v1.5.21 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index a7ccabd..07a45d7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.20 +1.5.21 From 989102f4b831fc5d2ff899f560a313103c70410d Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 12:31:16 +0300 Subject: [PATCH 022/623] Typo --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 00f967b..579854f 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -RevoBoot can now be build with Xcode 4.5.1 on Mountain Lion. See change log for instructions. +RevoBoot can now be built with Xcode 4.5.1 on Mountain Lion. See change log for instructions. Please note that RevoBoot must be configured for your hardware so start reading our WiKi. See also: From 9d7ffbd79e6b5c35a656bfde043a5c78ff82c3a7 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 12:41:02 +0300 Subject: [PATCH 023/623] Cleanup/update for RevoBoot v.1.5.20 --- .gitignore | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index f491c27..85c4e54 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,14 @@ .DS_Store -data-hp.h -data-asus.h -settings-hp.h -setting-asus.h + +i386/config/SETTINGS/*.h + +i386/config/ACPI/default.h +i386/config/ACPI/*Mac*.h + +i386/config/EFI/default.h +i386/config/EFI/*Mac*.h + +i386/config/SMBIOS/default.h +i386/config/SMBIOS/*Mac*.h + +i386/util/libcc_kext.a \ No newline at end of file From adbeeb748cb0025b20fed44d413e6993af7567d0 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 12:43:58 +0300 Subject: [PATCH 024/623] No longer used in RevoBoot v1.5.20 --- i386/config/ACPI/data.h | 97 ----------------------------------------- 1 file changed, 97 deletions(-) diff --git a/i386/config/ACPI/data.h b/i386/config/ACPI/data.h index 6a80eac..e69de29 100755 --- a/i386/config/ACPI/data.h +++ b/i386/config/ACPI/data.h @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2009 Master Chief. All rights reserved. - * - * Note: This is an essential part of the build process for Revolution v0.6.43 and greater. - * - * - * Latest cleanups and additional directives added by DHP in 2011 - */ - - -//--------------------------------------------------------- ESSENTIAL ACPI TABLES ------------------------------------------------------------- - - -#if STATIC_APIC_TABLE_INJECTION - #define STATIC_APIC_TABLE_DATA \ - /* 0x0000 */ // Insert your APIC table replacement here (optional). -#endif - - -#if STATIC_ECDT_TABLE_INJECTION - #define STATIC_ECDT_TABLE_DATA \ - /* 0x0000 */ // Insert your ECDT table replacement here (optional). -#endif - - -#if STATIC_HPET_TABLE_INJECTION - #define STATIC_HPET_TABLE_DATA \ - /* 0x0000 */ // Insert your HPET table replacement here (optional). -#endif - - -#if STATIC_MCFG_TABLE_INJECTION - #define STATIC_MCFG_TABLE_DATA \ - /* 0x0000 */ // Insert your MCFG table replacement here (optional). -#endif - - -#if STATIC_SBST_TABLE_INJECTION - #define STATIC_SBST_TABLE_DATA \ - /* 0x0000 */ // Insert your SBST table replacement here (optional). -#endif - - -#if STATIC_SSDT_TABLE_INJECTION - #define STATIC_SSDT_TABLE_DATA \ - /* 0x0000 */ // Insert your SSDT table replacement here (optional). -#endif - - -//--------------------------------------------------------- SECONDARY ACPI TABLES ------------------------------------------------------------- - - -#if STATIC_DSDT_TABLE_INJECTION - #define STATIC_DSDT_TABLE_DATA \ - /* 0x0000 */ // Insert your DSDT table replacement here (optional). -#endif - - -#if STATIC_FACS_TABLE_INJECTION - #define STATIC_FACS_TABLE_DATA \ - /* 0x0000 */ // Insert your FACS table replacement here (optional). -#endif - - -//---------------------------------------------------------- OPTIONAL ACPI TABLES ------------------------------------------------------------- - - -#if STATIC_APIC2_TABLE_INJECTION - #define STATIC_APIC2_TABLE_DATA \ - /* 0x0000 */ // Insert a second APIC table (replacement) here (optional). -#endif - - -#if STATIC_SSDT_GPU_TABLE_INJECTION - #define STATIC_SSDT_GPU_TABLE_DATA \ - /* 0x0000 */ // Insert your SSDT_GPU table replacement here (optional). -#endif - - -#if STATIC_SSDT_PR_TABLE_INJECTION - #define STATIC_SSDT_PR_TABLE_DATA \ - /* 0x0000 */ // Insert your SSDT_PR table replacement here (optional). -#endif - - -#if STATIC_SSDT_SATA_TABLE_INJECTION - #define STATIC_SSDT_SATA_TABLE_DATA \ - /* 0x0000 */ // Insert your SSDT_SATA table replacement here (optional). -#endif - - -#if STATIC_SSDT_USB_TABLE_INJECTION - #define STATIC_SSDT_USB_TABLE_DATA \ - /* 0x0000 */ // Insert your SSDT_USB table replacement here (optional). -#endif - -//================================================================= END ==================================================================== From f3874b7a2803da7581b6957213601bc3c56312f9 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 12:47:09 +0300 Subject: [PATCH 025/623] File no longer used in RevoBoot v1.5.10 (can be removed) --- i386/config/data-template.h | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/i386/config/data-template.h b/i386/config/data-template.h index c3a566c..e69de29 100755 --- a/i386/config/data-template.h +++ b/i386/config/data-template.h @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2009 Master Chief. - * Refactored by DHP in 2010-2011. - */ - - -#if PATCH_ACPI_TABLE_DATA && INCLUDE_ACPI_DATA - #undef INCLUDE_ACPI_DATA - #include "acpi/data.h" - -#elif INJECT_EFI_DEVICE_PROPERTIES && INCLUDE_EFI_DATA - #undef INCLUDE_EFI_DATA - #include "efi/data.h" - -#elif USE_STATIC_SMBIOS_DATA && INCLUDE_SMBIOS_DATA - #undef INCLUDE_SMBIOS_DATA - #include "smbios/data.h" - -#endif From 6ea29185adb673496df515efb86bbf2c775fb39f Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 13:22:50 +0300 Subject: [PATCH 026/623] Quick update for RevoBoot v1.5.10/v1.5.20 --- i386/config/README | 50 +++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/i386/config/README b/i386/config/README index dfacdef..e9dc128 100644 --- a/i386/config/README +++ b/i386/config/README @@ -4,8 +4,9 @@ RevoBoot comes with configuration templates of which some you need to change: ACPI/data-template.h -------------------- -This file is optional. Only required when you want to inject static ACPI table data. -Copy/rename the file to data.h and add your (modified) ACPI tables. +RevoBoot's build process will copy this file for new configurations to the target modelidentifier +and use it, but only when you didn't already do this yourself. Make all required changes in +the new file only or it won't be used at all. Note: We use 'factory tables' for the original ACPI tables in the BIOS and 'modified' for new/modified ACPI tables. @@ -14,8 +15,9 @@ Note: We use 'factory tables' for the original ACPI tables in the BIOS and 'modi EFI/data-template.h ------------------- -This file is optional. Only required when you want/need to inject EFI device properties. -Copy/rename the file to data.h and add your EFI device properties. +RevoBoot's build process will copy this file for new configurations to the target modelidentifier +and use it, but only when you didn't already do this yourself. Make all required changes in +the new file only or it won't be used at all. Note: A simple HOWTO will (hopefully) soon be added to the EFI directory. @@ -23,36 +25,38 @@ Note: A simple HOWTO will (hopefully) soon be added to the EFI directory. SMBIOS/data-template.h ---------------------- -This file is optional. Only required when you want to inject static ACPI table data. -Copy/rename the file to data.h and add your static SMBIOS data. +RevoBoot's build process will copy this file for new configurations to the target modelidentifier +and use it, but only when you didn't already do this yourself. Make all required changes in +the new file only or it won't be used at all. Note: You can extract the SMBIOS table data with: /smbios/tools/smbios2struct2 Make instruction are included in the source code. +settings.h +---------- + +This file selects the target settings file based on the specified model identifier. Using +make MODEL=Macmini51 or use ./r Macmini51 (examples) makes it select RevoBoot/i386/config/SETTINGS/Macmini51.h +All future changes need to be made in this file, or they won't be picked up. + + settings-template.h ------------------- -This is the default configuration template for RevoBoot. Every possible option can be found in it. -You have to either copy or rename this file to settings.h and change it so that it matches your -hardware configuration. +RevoBoot's build process first checks RevoBoot/i386/config/SETTINGS/*.h per target model identifier +(example: Macmini51,h) and use it, or copies RevoBoot/i386/config/settings-template.h to the target model +identifier (when the file is missing) to prevent build errors. +People with working RevoBoot configurations can simply copy their settings.h to SETTINGS/[your model].h +This will allow the RevoBoot build process to compile without errors, but make sure to use the latest +preprocessor options. -data-template.h ---------------- -RevoBoot has one main include file for static data in the ACPI, EFI and SMBIOS directories. -This enables you to add files for different target configurations there. Here's an example -for two setups: - -#include "ACPI/data-hp.h" -#include "EFI/data-hp.h" -#include "SMBIOS/data-hp.h" +ACPI/EFI/SMBIOS/data.h +---------------------- -or (not both): +These are RevoBoot's main data selector files to support (optional) static data. -#include "ACPI/data-asus.h" -#include "EFI/data-asus.h" -#include "SMBIOS/data-asus.h" +Note: Do not change this file! -Note: We plan to add a make option for this. To let it select the files for the target configuration. From fd2c2f589877ae9120de009862c21fb4d64ec022 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 14:44:40 +0300 Subject: [PATCH 027/623] ignore build/log stuff --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 85c4e54..c15d8f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,9 @@ .DS_Store +out.log +obj/* +sym/* + i386/config/SETTINGS/*.h i386/config/ACPI/default.h From 8f24a5099c6487164e86e367ff7f28390645d63a Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Fri, 26 Oct 2012 14:49:57 +0300 Subject: [PATCH 028/623] Changed usage: ./c USBDRIVE --- c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c b/c index 892a658..1928ec4 100755 --- a/c +++ b/c @@ -1,3 +1,3 @@ -sudo cp sym/i386/boot /Volumes/USBBOOT/ -sudo diskutil unmount /Volumes/USBBOOT +sudo cp sym/i386/boot /Volumes/$1/ +sudo diskutil unmount /Volumes/$1 From 5a3421aab1cdcb5371dcd20f00c35e3234a3b594 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sat, 27 Oct 2012 01:01:56 +0300 Subject: [PATCH 029/623] New MacBookPro10,2 and Macmini6,[2/1] added --- i386/libsaio/platform.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 9205b14..9053cd8 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -64,6 +64,7 @@ #define MACBOOK_AIR_42 MACBOOK_AIR | (1 << 15) #define MACBOOK_AIR_41 MACBOOK_AIR // Defaults to MacBookAir4,1 +#define MACBOOK_PRO_102 MACBOOK_PRO | (6 << 15) #define MACBOOK_PRO_101 MACBOOK_PRO | (5 << 15) #define MACBOOK_PRO_91 MACBOOK_PRO | (4 << 15) #define MACBOOK_PRO_83 MACBOOK_PRO | (3 << 15) @@ -71,6 +72,8 @@ #define MACBOOK_PRO_81 MACBOOK_PRO | (1 << 15) #define MACBOOK_PRO_61 MACBOOK_PRO // Defaults to MacBookPro8,1 +#define MACMINI_62 (MACMINI | (4 << 15)) +#define MACMINI_61 (MACMINI | (3 << 15)) #define MACMINI_53 (MACMINI | (2 << 15)) #define MACMINI_52 (MACMINI | (1 << 15)) #define MACMINI_51 MACMINI // Defaults to Macmini5,1 From f4e3ef9cb3f050f376f4dddba82c8efbecd19153 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sat, 27 Oct 2012 01:06:24 +0300 Subject: [PATCH 030/623] MacBookPro10,2 added --- i386/libsaio/smbios/model_data.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 92a435c..9039b23 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -20,6 +20,7 @@ * - EFI/SMBIOS data logic moved to preprocessor code (PikerAlpha, October 2012). * - SMB_PRODUCT_NAME renamed/moved over from settings.h (PikerAlpha, October 2012). * - EFI_MODEL_NAME renamed/moved over from settings.h (PikerAlpha, October 2012). + * - Data for new MacBookPro and Macmini added (PikerAlpha, October 2012). * * Credits: * - blackosx, DB1, dgsga, FKA, humph, scrax and STLVNUB (testers). @@ -95,14 +96,20 @@ // ------------------------------------------------------------------------------------- #define SMB_FAMILY "MacBookPro" - #if (TARGET_MODEL == MACBOOK_PRO_101) - // Intel Core i7-3720QM @ 2.60 GHz - 4 cores / 8 threads. + #if (TARGET_MODEL == MACBOOK_PRO_102) + // Intel Core i7-3520QM @ 2.90 GHz - 2 cores / 4 threads. + #define SMB_BIOS_VERSION "MBP102.88Z.00FE.B00.1207181057" + #define SMB_PRODUCT_NAME "MacBookPro10,2" + #define SMB_BOARD_PRODUCT "MMac-AFD8A9D944EA4843" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '0', ',', '2' } + #elif (TARGET_MODEL == MACBOOK_PRO_101) + // Intel Core i7-3720QM @ 2.60 GHz - 4 cores / 8 threads. #define SMB_BIOS_VERSION "MBP101.88Z.00EE.B00.1205101839" #define SMB_PRODUCT_NAME "MacBookPro10,1" #define SMB_BOARD_PRODUCT "Mac-C3EC7CD22292981F" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '0', ',', '1' } #elif (TARGET_MODEL == MACBOOK_PRO_91) - // Intel Core i7-3820QM @ 2.70 GHz - 4 cores / 8 threads. + // Intel Core i7-3820QM @ 2.70 GHz - 4 cores / 8 threads. #define SMB_BIOS_VERSION "MBP91.88Z.00D3.B00.1203211536" #define SMB_PRODUCT_NAME "MacBookPro9,1" #define SMB_BOARD_PRODUCT "Mac-4B7AC7E43945597E" From b37e401c90bbddce4828cd8529e3097f41436bbc Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sat, 27 Oct 2012 01:07:55 +0300 Subject: [PATCH 031/623] Typo --- i386/libsaio/smbios/model_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 9039b23..bd8cc19 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -100,7 +100,7 @@ // Intel Core i7-3520QM @ 2.90 GHz - 2 cores / 4 threads. #define SMB_BIOS_VERSION "MBP102.88Z.00FE.B00.1207181057" #define SMB_PRODUCT_NAME "MacBookPro10,2" - #define SMB_BOARD_PRODUCT "MMac-AFD8A9D944EA4843" + #define SMB_BOARD_PRODUCT "Mac-AFD8A9D944EA4843" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '0', ',', '2' } #elif (TARGET_MODEL == MACBOOK_PRO_101) // Intel Core i7-3720QM @ 2.60 GHz - 4 cores / 8 threads. From 7336203d0319753f711abf1e91bc0934e669f986 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sat, 27 Oct 2012 15:10:54 +0300 Subject: [PATCH 032/623] Use CONFIG_DIR and data-template.h instead of data.h --- Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index bbe91ec..2c101ae 100644 --- a/Makefile +++ b/Makefile @@ -100,7 +100,7 @@ ifdef MODEL # # Include default/empty static data file (no model identifier specified). # - DATA_FILE = data + DATA_FILE = data-template endif else # @@ -110,7 +110,7 @@ else # # Include default/empty static data file (no model identifier specified). # - DATA_FILE = data + DATA_FILE = data-template endif # @@ -133,16 +133,16 @@ SETTINGS_DIR=$(CONFIG_DIR)/SETTINGS SETTINGS_FILE=$(SETTINGS_DIR)/$(MAKE_TARGET_MODEL).h $(MAKEGOAL): $(SYMROOT) $(OBJROOT) - @if [ ! -f $(ARCH_DIR)/config/$(MAKE_ACPI_DATA_FILE) ]; then \ - cp -n $(ARCH_DIR)/config/ACPI/data-template.h $(ARCH_DIR)/config/$(MAKE_ACPI_DATA_FILE); \ + @if [ ! -f $(CONFIG_DIR)/$(MAKE_ACPI_DATA_FILE) ]; then \ + cp -n $(CONFIG_DIR)/ACPI/data-template.h $(CONFIG_DIR)/$(MAKE_ACPI_DATA_FILE); \ fi; - @if [ ! -f $(ARCH_DIR)/config/$(MAKE_EFI_DATA_FILE) ]; then \ - cp -n $(ARCH_DIR)/config/EFI/data-template.h $(ARCH_DIR)/config/$(MAKE_EFI_DATA_FILE); \ + @if [ ! -f $(CONFIG_DIR)/$(MAKE_EFI_DATA_FILE) ]; then \ + cp -n $(CONFIG_DIR)/EFI/data-template.h $(CONFIG_DIR)/$(MAKE_EFI_DATA_FILE); \ fi; - @if [ ! -f $(ARCH_DIR)/config/$(MAKE_SMBIOS_DATA_FILE) ]; then \ - cp -n $(ARCH_DIR)/config/SMBIOS/data-template.h $(ARCH_DIR)/config/$(MAKE_SMBIOS_DATA_FILE); \ + @if [ ! -f $(CONFIG_DIR)/$(MAKE_SMBIOS_DATA_FILE) ]; then \ + cp -n $(CONFIG_DIR)/SMBIOS/data-template.h $(CONFIG_DIR)/$(MAKE_SMBIOS_DATA_FILE); \ fi; @if [ ! -d $(SETTINGS_DIR) ]; then \ From 173260ccb8690810ca19a179bb0ccf536413a7ed Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sat, 27 Oct 2012 15:13:02 +0300 Subject: [PATCH 033/623] Update for RevoBoot v1.5.22 --- CHANGES | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index 39637a7..3a80320 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +RevoBoot v1.5.22 +================ +- Bug fix in RevoBoot/Makefile (PikerAlpha, October 2012). +- VERSION updated to v1.5.22 + + RevoBoot v1.5.21 ================ - Model data for new Macmini6,N added (PikerAlpha, October 2012). From f9c98adb51040d67671df436f2605efb6fae734c Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sat, 27 Oct 2012 15:13:41 +0300 Subject: [PATCH 034/623] Updating version info for RevoBoot v1.5.22 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 07a45d7..d532fd9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.21 +1.5.22 From 00012ca3f6b931a25ca9e359c524811d7dba2a6b Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sat, 27 Oct 2012 20:00:19 +0300 Subject: [PATCH 035/623] STATIC_SMSERIALNUMBER -> SMB_BOARD_SERIAL_NUMBER --- i386/config/settings-template.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 82fa634..966bcbc 100644 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -283,8 +283,6 @@ // // Note: Do not change this setting, unless you know what you are doing. -#define STATIC_SMSERIALNUMBER "SOMESRLNUMBR" // Example only! - #define STATIC_SYSTEM_SERIAL_NUMBER { 'S', 'O', 'M', 'E', 'S', 'R', 'L', 'N', 'U', 'M', 'B', 'R' } // Example only! #define STATIC_SYSTEM_ID { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F } // Example only! @@ -350,8 +348,8 @@ // // Note: MACMINI (without _NNN) selects the default model (last one i.e. MACMINI_51). -#if TARGET_MODEL & MACPRO - #define STATIC_SMBOARDSERIAL "SOMEBOARDNMBR" // Example only! +#if (TARGET_MODEL & MACPRO) + #define SMB_BOARD_SERIAL_NUMBER "SOMESRLNUMBR" // Example only! #endif #define DEBUG_SMBIOS 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. From 0c34f1d57763caf112ad5b0e77fe2540582e8a10 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sat, 27 Oct 2012 20:05:03 +0300 Subject: [PATCH 036/623] Bug fix and cleanups --- i386/libsaio/smbios/dynamic_data.h | 120 ++++++++++++++++------------- 1 file changed, 66 insertions(+), 54 deletions(-) diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index 91f25d6..f7c0356 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -11,6 +11,7 @@ * - SMBIOS data logic moved to preprocessor code (PikerAlpha, October 2012). * - SMBProperties changed for speed and simplicity (PikerAlpha, October 2012). * - Calls with SMBProperties.keyString cleaned up (PikerAlpha, October 2012). + * - Fixed requiredStructures.start/stop values (PikerAlpha, October 2012). * * Credits: * - Kabyl (see notes in source code) @@ -36,6 +37,18 @@ #include "smbios.h" #include "model_data.h" +#if (TARGET_MODEL & MACPRO) + /* + * Number of additional properties for MacPro models. + */ + #define PROBOARD 2 +#else + /* + * No additional properties for other Mac models. + */ + #define PROBOARD 0 +#endif + //------------------------------------------------------------------------------ struct SMBStructure @@ -52,24 +65,24 @@ struct SMBStructure struct SMBStructure requiredStructures[] = { - { kSMBTypeBIOSInformation /* 0 */ , 0, 5, false, 0 }, - { kSMBTypeSystemInformation /* 1 */ , 6, 10, false, 0 }, - { kSMBTypeBaseBoard /* 2 */ , 11, 14, false, 0 }, - { kSMBUnused /* 3 */ , 0, 0, false, 0 }, - { kSMBTypeProcessorInformation /* 4 */ , 15, 16, true, 0 }, - { kSMBUnused /* 5 */ , 0, 0, false, 0 }, - { kSMBUnused /* 6 */ , 0, 0, false, 0 }, - { kSMBUnused /* 7 */ , 0, 0, false, 0 }, - { kSMBUnused /* 8 */ , 0, 0, false, 0 }, - { kSMBUnused /* 9 */ , 0, 0, false, 0 }, - { kSMBUnused /* 10 */ , 0, 0, false, 0 }, - { kSMBUnused /* 11 */ , 0, 0, false, 0 }, - { kSMBUnused /* 12 */ , 0, 0, false, 0 }, - { kSMBUnused /* 13 */ , 0, 0, false, 0 }, - { kSMBUnused /* 14 */ , 0, 0, false, 0 }, - { kSMBUnused /* 15 */ , 0, 0, false, 0 }, - { kSMBUnused /* 16 */ , 0, 0, false, 0 }, - { kSMBTypeMemoryDevice /* 17 */ , 17, 21, true, 0 } + { kSMBTypeBIOSInformation /* 0 */ , 0, 5, false, 0 }, + { kSMBTypeSystemInformation /* 1 */ , 6, 10, false, 0 }, + { kSMBTypeBaseBoard /* 2 */ , (11 + PROBOARD), (12 + PROBOARD), false, 0 }, + { kSMBUnused /* 3 */ , 0, 0, false, 0 }, + { kSMBTypeProcessorInformation /* 4 */ , (13 + PROBOARD), (14 + PROBOARD), true, 0 }, + { kSMBUnused /* 5 */ , 0, 0, false, 0 }, + { kSMBUnused /* 6 */ , 0, 0, false, 0 }, + { kSMBUnused /* 7 */ , 0, 0, false, 0 }, + { kSMBUnused /* 8 */ , 0, 0, false, 0 }, + { kSMBUnused /* 9 */ , 0, 0, false, 0 }, + { kSMBUnused /* 10 */ , 0, 0, false, 0 }, + { kSMBUnused /* 11 */ , 0, 0, false, 0 }, + { kSMBUnused /* 12 */ , 0, 0, false, 0 }, + { kSMBUnused /* 13 */ , 0, 0, false, 0 }, + { kSMBUnused /* 14 */ , 0, 0, false, 0 }, + { kSMBUnused /* 15 */ , 0, 0, false, 0 }, + { kSMBUnused /* 16 */ , 0, 0, false, 0 }, + { kSMBTypeMemoryDevice /* 17 */ , (15 + PROBOARD), (19 + PROBOARD), true, 0 } }; @@ -103,64 +116,63 @@ struct SMBProperty }; #define APPLE_INC "Apple Inc." -#define SMB_SYSTEM_VERSION "1.0" //------------------------------------------------------------------------------ struct SMBProperty SMBProperties[] = { - //------------------------------------------------------------------------------------------------ + //---------------------------------------------------------------------------------------------------- - { kSMBTypeBIOSInformation, 0x04, kSMBString, .plainData = APPLE_INC }, - { kSMBTypeBIOSInformation, 0x05, kSMBString, .plainData = SMB_BIOS_VERSION }, - { kSMBTypeBIOSInformation, 0x06, kSMBWord, .getSMBWord = getBIOSLocation }, - { kSMBTypeBIOSInformation, 0x08, kSMBString, .getSMBString = getBIOSDate }, - { kSMBTypeBIOSInformation, 0x0a, kSMBQWord, .getSMBQWord = getBIOSFeatures }, - { kSMBTypeBIOSInformation, 0x12, kSMBDWord, .getSMBDWord = getBIOSFeaturesEX }, - - //------------------------------------------------------------------------------------------------ + { kSMBTypeBIOSInformation, 0x04, kSMBString, .plainData = APPLE_INC }, + { kSMBTypeBIOSInformation, 0x05, kSMBString, .plainData = SMB_BIOS_VERSION }, + { kSMBTypeBIOSInformation, 0x06, kSMBWord, .getSMBWord = getBIOSLocation }, + { kSMBTypeBIOSInformation, 0x08, kSMBString, .getSMBString = getBIOSDate }, + { kSMBTypeBIOSInformation, 0x0a, kSMBQWord, .getSMBQWord = getBIOSFeatures }, + { kSMBTypeBIOSInformation, 0x12, kSMBDWord, .getSMBDWord = getBIOSFeaturesEX }, + + //---------------------------------------------------------------------------------------------------- - { kSMBTypeSystemInformation, 0x04, kSMBString, .plainData = APPLE_INC }, - { kSMBTypeSystemInformation, 0x05, kSMBString, .plainData = SMB_PRODUCT_NAME }, - { kSMBTypeSystemInformation, 0x06, kSMBString, .plainData = SMB_SYSTEM_VERSION }, - { kSMBTypeSystemInformation, 0x07, kSMBString, .plainData = STATIC_SMSERIALNUMBER }, - { kSMBTypeSystemInformation, 0x1a, kSMBString, .plainData = SMB_FAMILY }, + { kSMBTypeSystemInformation, 0x04, kSMBString, .plainData = APPLE_INC }, + { kSMBTypeSystemInformation, 0x05, kSMBString, .plainData = SMB_PRODUCT_NAME }, + { kSMBTypeSystemInformation, 0x06, kSMBString, .plainData = "1.0" }, + { kSMBTypeSystemInformation, 0x07, kSMBString, .plainData = STATIC_SMSERIALNUMBER }, + { kSMBTypeSystemInformation, 0x1a, kSMBString, .plainData = SMB_FAMILY }, - //------------------------------------------------------------------------------------------------ + //---------------------------------------------------------------------------------------------------- - { kSMBTypeBaseBoard, 0x04, kSMBString, .plainData = APPLE_INC }, - { kSMBTypeBaseBoard, 0x05, kSMBString, .plainData = SMB_BOARD_PRODUCT }, - -#if TARGET_MODEL & MACPRO - { kSMBTypeBaseBoard, 0x07, kSMBString, .plainData = STATIC_SMBOARDSERIAL }, - { kSMBTypeBaseBoard, 0x0d, kSMBByte, .getSMBByte = getBoardType }, + { kSMBTypeBaseBoard, 0x04, kSMBString, .plainData = APPLE_INC }, + { kSMBTypeBaseBoard, 0x05, kSMBString, .plainData = SMB_BOARD_PRODUCT }, + +#if (TARGET_MODEL & MACPRO) + { kSMBTypeBaseBoard, 0x07, kSMBString, .plainData = SMB_BOARD_SERIAL_NUMBER }, + { kSMBTypeBaseBoard, 0x0d, kSMBByte, .getSMBByte = getBoardType }, #endif + + //---------------------------------------------------------------------------------------------------- - //------------------------------------------------------------------------------------------------ - - { kSMBTypeProcessorInformation, 0x12, kSMBWord, .getSMBWord = getFSBFrequency }, - { kSMBTypeProcessorInformation, 0x14, kSMBWord, .getSMBWord = getCPUFrequency }, + { kSMBTypeProcessorInformation, 0x12, kSMBWord, .getSMBWord = getFSBFrequency }, + { kSMBTypeProcessorInformation, 0x14, kSMBWord, .getSMBWord = getCPUFrequency }, - //------------------------------------------------------------------------------------------------ + //---------------------------------------------------------------------------------------------------- #if DYNAMIC_RAM_OVERRIDE_SIZE - { kSMBTypeMemoryDevice, 0x0c, kSMBWord, .getSMBWord = getRAMSize }, + { kSMBTypeMemoryDevice, 0x0c, kSMBWord, .getSMBWord = getRAMSize }, #endif - { kSMBTypeMemoryDevice, 0x10, kSMBString, .getSMBString = NULL }, - { kSMBTypeMemoryDevice, 0x11, kSMBString, .getSMBString = NULL }, + { kSMBTypeMemoryDevice, 0x10, kSMBString, .getSMBString = NULL }, + { kSMBTypeMemoryDevice, 0x11, kSMBString, .getSMBString = NULL }, #if DYNAMIC_RAM_OVERRIDE_TYPE - { kSMBTypeMemoryDevice, 0x12, kSMBByte, .getSMBByte = getRAMType }, + { kSMBTypeMemoryDevice, 0x12, kSMBByte, .getSMBByte = getRAMType }, #endif #if DYNAMIC_RAM_OVERRIDE_FREQUENCY - { kSMBTypeMemoryDevice, 0x15, kSMBWord, .getSMBWord = getRAMFrequency }, + { kSMBTypeMemoryDevice, 0x15, kSMBWord, .getSMBWord = getRAMFrequency }, #endif - { kSMBTypeMemoryDevice, 0x17, kSMBString, .getSMBString = getRAMVendor }, - { kSMBTypeMemoryDevice, 0x18, kSMBString, .getSMBString = getRAMSerialNumber }, - { kSMBTypeMemoryDevice, 0x1a, kSMBString, .getSMBString = getRAMPartNumber }, + { kSMBTypeMemoryDevice, 0x17, kSMBString, .getSMBString = getRAMVendor }, + { kSMBTypeMemoryDevice, 0x18, kSMBString, .getSMBString = getRAMSerialNumber }, + { kSMBTypeMemoryDevice, 0x1a, kSMBString, .getSMBString = getRAMPartNumber }, }; @@ -266,7 +278,7 @@ void setupSMBIOS(void) newtablesPtr += 8; } -#if DYNAMIC_RAM_OVERRIDE_SIZE || DYNAMIC_RAM_OVERRIDE_TYPE || DYNAMIC_RAM_OVERRIDE_FREQUENCY +#if (DYNAMIC_RAM_OVERRIDE_SIZE || DYNAMIC_RAM_OVERRIDE_TYPE || DYNAMIC_RAM_OVERRIDE_FREQUENCY) requiredStructures[17].stop = (sizeof(SMBProperties) / sizeof(SMBProperties[0])) -1; #endif From 5658ac96ffe79ce51e89a1fca25d456fc2a3e0db Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sat, 27 Oct 2012 20:06:05 +0300 Subject: [PATCH 037/623] Updating version info for RevoBoot v1.5.23 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index d532fd9..249319e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.22 +1.5.23 From 5c9837d1f785a5d5d6c5d7c5435443f7f1bd609f Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sat, 27 Oct 2012 20:07:35 +0300 Subject: [PATCH 038/623] Update for RevoBoot v1.5.23 --- CHANGES | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index 3a80320..4b80611 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +RevoBoot v1.5.23 +================ +- Bug fix and cleanups in RevoBoot/i386/libsaio/SMBIOS/dynamic_data.h (PikerAlpha, October 2012). +- VERSION updated to v1.5.23 + + RevoBoot v1.5.22 ================ - Bug fix in RevoBoot/Makefile (PikerAlpha, October 2012). From 61d2aa501bde305e79a0a711a6006b5f6a07420d Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sat, 27 Oct 2012 20:17:25 +0300 Subject: [PATCH 039/623] Comment only --- i386/config/data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/config/data.h b/i386/config/data.h index bd56edc..768bafc 100755 --- a/i386/config/data.h +++ b/i386/config/data.h @@ -14,7 +14,7 @@ #if (PATCH_ACPI_TABLE_DATA && INCLUDE_ACPI_DATA) #undef INCLUDE_ACPI_DATA - + // The STRING (macro) is defined in RevoBoot/i386/config/settings.h #include STRING(ACPI_DATA_FILE) #endif From 14d5d57b5a2da605ec6f60b6f10f9135ac58ffdf Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sat, 27 Oct 2012 20:19:57 +0300 Subject: [PATCH 040/623] Cleanup only --- i386/config/settings.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/i386/config/settings.h b/i386/config/settings.h index ae4c0f9..ad4fcb4 100644 --- a/i386/config/settings.h +++ b/i386/config/settings.h @@ -8,6 +8,5 @@ #define TO_STRING_DO(a) #a #define STRING(a) TO_STRING_DO(a) -#define INCLUDE_FILE STRING(SETTINGS_FILE) -#include INCLUDE_FILE +#include STRING(SETTINGS_FILE) From 3f254d25fbf6a030870af5375ae63950e6496b5a Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sun, 28 Oct 2012 09:45:35 +0100 Subject: [PATCH 041/623] Updating version info for RevoBoot v1.5.25 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 249319e..32461d5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.23 +1.5.25 From f1fe27b04d94119a73f31918ecb0852e9b7f66ad Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sun, 28 Oct 2012 09:47:30 +0100 Subject: [PATCH 042/623] New static data paths for RevoBoot v1.5.25 --- i386/libsaio/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/Makefile b/i386/libsaio/Makefile index 0bff17d..0c3c64f 100644 --- a/i386/libsaio/Makefile +++ b/i386/libsaio/Makefile @@ -23,9 +23,9 @@ CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost \ -DREVOBOOT_VERSION_INFO=\"RevoBoot\ v$(PRODUCT_VERSION_NUMBER)\" \ -DMAKE_TARGET_OS=$(PRODUCT_OS_TARGET) \ -DSETTINGS_FILE=SETTINGS/$(MAKE_TARGET_MODEL).h \ - -DACPI_DATA_FILE=$(MAKE_ACPI_DATA_FILE) \ - -DEFI_DATA_FILE=$(MAKE_EFI_DATA_FILE) \ - -DSMBIOS_DATA_FILE=$(MAKE_SMBIOS_DATA_FILE) \ + -DACPI_DATA_FILE=../../config/$(MAKE_ACPI_DATA_FILE) \ + -DEFI_DATA_FILE=../config/$(MAKE_EFI_DATA_FILE) \ + -DSMBIOS_DATA_FILE=../../config/$(MAKE_SMBIOS_DATA_FILE) \ -fno-builtin -static $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float From 3bcbf0ceee0bf183666c3111662a310724a949f1 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sun, 28 Oct 2012 09:50:41 +0100 Subject: [PATCH 043/623] New static data paths for RevoBoot v1.5.25 --- i386/libsaio/smbios/static_data.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/smbios/static_data.h b/i386/libsaio/smbios/static_data.h index 5cf2938..eccaefb 100755 --- a/i386/libsaio/smbios/static_data.h +++ b/i386/libsaio/smbios/static_data.h @@ -3,6 +3,7 @@ * * Updates: * - Dynamic and static SMBIOS data gathering added by DHP in 2010. + * - New path for static EFI data (PikerAlpha, October 2012). * * Credits: * - blackosx, DB1, dgsga, FKA, humph, scrax and STLVNUB (testers). @@ -13,8 +14,8 @@ #include "essentials.h" -#define INCLUDE_SMBIOS_DATA 1 -#include "../../config/data.h" +// The STRING (macro) is defined in RevoBoot/i386/config/settings.h +#include STRING(SMBIOS_DATA_FILE) static uint32_t SMBIOS_Table[] = { From f6f699a408cdc55f85871f6538e53a8757ab0adc Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sun, 28 Oct 2012 09:55:19 +0100 Subject: [PATCH 044/623] Use model identifier as filename for static data --- i386/libsaio/efi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index d19557b..86e913e 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -31,16 +31,13 @@ * - STATIC_MODEL_NAME moved over from settings.h (PikerAlpha, October 2012). * - STATIC_MODEL_NAME renamed to EFI_MODEL_NAME (PikerAlpha, October 2012). * - Now no longer includes platform.h (PikerAlpha, October 2012). + * - Data selector moved over from RevoBoot/i386/config/data.h (PikerAlpha, October 2012). * */ #include "efi/fake_efi.h" -#define INCLUDE_EFI_DATA 1 - -#include "../config/data.h" - //============================================================================== void initEFITree(void) @@ -177,6 +174,8 @@ void initEFITree(void) gPlatform.EFI.Nodes.Chosen = chosenNode; #if INJECT_EFI_DEVICE_PROPERTIES + // The STRING (macro) is defined in RevoBoot/i386/config/settings.h + #include STRING(EFI_DATA_FILE) static EFI_UINT8 const EFI_DEVICE_PROPERTIES[] = { From 355af009c007124c0a44cf4709f62ddbbdfd89bb Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sun, 28 Oct 2012 09:56:53 +0100 Subject: [PATCH 045/623] Use model identifier as filename for static data --- i386/libsaio/acpi/static_data.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/i386/libsaio/acpi/static_data.h b/i386/libsaio/acpi/static_data.h index 8bf28d2..e9bb4e7 100755 --- a/i386/libsaio/acpi/static_data.h +++ b/i386/libsaio/acpi/static_data.h @@ -1,19 +1,18 @@ /* - * Copyright 2009 by Master Chief. + * Static data overrides for ACPI tables. Copyright 2009 by Master Chief. * - * Refactored (dynamic and static ACPI patching) by DHP in 2010/2011. + * Updates: + * - Refactored (dynamic and static ACPI patching) by DHP in 2010/2011. + * - Data selector moved over from RevoBoot/i386/config/data.h (PikerAlpha, October 2012). */ #ifndef __LIBSAIO_ACPI_STATIC_DATA_H #define __LIBSAIO_ACPI_STATIC_DATA_H -#define INCLUDE_ACPI_DATA 1 +// The STRING (macro) is defined in RevoBoot/i386/config/settings.h +#include STRING(ACPI_DATA_FILE) -#include "../config/data.h" - -// The STATIC_xxx_TABLE_DATA's here will get replaced with the data from private_data.h - -// Static data overrides for essential tables. +// The STATIC_xxx_TABLE_DATA's here will get replaced with the data from RevoBoot/i386/config/ACPI/[default/MacmodelNN].h static uint32_t APIC_Table[] = { From 717befbc7e8904d9e6c62deff22b5f2702d33db7 Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sun, 28 Oct 2012 09:59:10 +0100 Subject: [PATCH 046/623] No longer included with RevoBoot v1.5.25 --- i386/config/data.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/i386/config/data.h b/i386/config/data.h index 768bafc..40de3d1 100755 --- a/i386/config/data.h +++ b/i386/config/data.h @@ -8,10 +8,15 @@ * * - Refactored by DHP in 2010-2011. * - Automatic model data selection (PikerAlpha, October 2012). - * + * - Static ACPI data selector moved to RevoBoot/i386/libsaio/ACPI/static_data.h (PikerAlpha, October 2012). + * - Static EFI data selector moved to RevoBoot/i386/libsaio/efi.c (PikerAlpha, October 2012). + * - Static SMBIOS data selector moved to RevoBoot/i386/libsaio/SMBIOS/dynamic_data.h (PikerAlpha, October 2012). + * - This file is no longer included with RevoBoot v1.5.25 (PikerAlpha, October 2012). */ +!!__WHEN_YOU_SEE_THIS_STUPID_ERROR_THAN_SOMETHING_IS_WRONG__!! + #if (PATCH_ACPI_TABLE_DATA && INCLUDE_ACPI_DATA) #undef INCLUDE_ACPI_DATA // The STRING (macro) is defined in RevoBoot/i386/config/settings.h From 997d1c68c6adc75ab9a6c3fc363c1f7f6f581d7d Mon Sep 17 00:00:00 2001 From: Piker-Alpha Date: Sun, 28 Oct 2012 10:05:00 +0100 Subject: [PATCH 047/623] Updating version info for RevoBoot v1.5.25 --- CHANGES | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES b/CHANGES index 4b80611..a9e4902 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,11 @@ +RevoBoot v1.5.25 +================ +- RevoBoot/i386/config/data.h is no longer included with (PikerAlpha, October 2012). +- New static data paths in RevoBoot/i386/libsaio/Makefile (PikerAlpha, October 2012). +- Use model identifier as filename for static data (PikerAlpha, October 2012). +- VERSION updated to v1.5.25 + + RevoBoot v1.5.23 ================ - Bug fix and cleanups in RevoBoot/i386/libsaio/SMBIOS/dynamic_data.h (PikerAlpha, October 2012). From dc979bd5d2294f8f67b64de8894aedcb859e4fb8 Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 11:48:14 +0100 Subject: [PATCH 048/623] Read/use MacModelNN from RevoBoot/MODEL --- r | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/r b/r index 1d06cf0..73954b6 100755 --- a/r +++ b/r @@ -1,4 +1,28 @@ -make clean clear -make MODEL=$1 > out.log +make clean +# +# Check argument for Mac model. +# +if [[ "$1" =~ [iMac|Mac] ]]; + then + # + # Use specified MacModelNN from argument. + # + make MODEL=$1 > out.log + else + # + # Check RevoBoot/MODEL for default model. + # + if [ -f MODEL ]; then + # + # Get MacModelNN from MODEL (assuming it to be correct). + # + make MODEL=`cat MODEL` > out.log + else + # + # No default model found. + # + make > out.log + fi; +fi From 79b2403bd3afa7d92dfb161a3406fbca9d69fcf6 Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 11:51:42 +0100 Subject: [PATCH 049/623] Patch for RevoBoot v1.5.30 --- i386/libsaio/acpi/patcher.h | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/i386/libsaio/acpi/patcher.h b/i386/libsaio/acpi/patcher.h index f1617a8..d9eb40c 100644 --- a/i386/libsaio/acpi/patcher.h +++ b/i386/libsaio/acpi/patcher.h @@ -7,6 +7,7 @@ * - Refactorized for Revolution by DHP in 2010. * - A complete new implementation written for RevoBoot by DHP in 2011. * - Automatic SSDT_PR creation added by DHP in June 2011. + * - Call loadBinaryData from loadACPITable (PikerAlpha, October 2012). */ @@ -26,33 +27,32 @@ int loadACPITable(int tableIndex) { _ACPI_DEBUG_DUMP("loadACPITable(%s / ", customTables[tableIndex].name); - char dirspec[32]; - sprintf (dirspec, "/Extra/ACPI/%s.aml", customTables[tableIndex].name); - int fd = open(dirspec, 0); + char dirSpec[32] = ""; + sprintf(dirSpec, "/Extra/ACPI/%s.aml", customTables[tableIndex].name); - if (fd < 0) - { - _ACPI_DEBUG_DUMP("Error: File not found.)\n"); - - return -1; - } + void * tableAddress = (void *)kLoadAddr; - int fileSize = file_size(fd); - void * kernelAddress = malloc(fileSize); + /* + * loadBinaryData calls LoadFile (both in sys.c) to load table data into a + * load buffer at kLoadAddr (defined in memory.h) and copies it into a new + * allocated memory block (kLoadAddr gets overwritten by the next call). + */ + long fileSize = loadBinaryData(dirSpec, &tableAddress); - if (kernelAddress) + if (fileSize) { - read(fd, kernelAddress, fileSize); - } + _ACPI_DEBUG_DUMP("%d bytes).\n", fileSize); - close(fd); + // 'tableAddress' is copied into kernel memory later on (see setupACPI). + customTables[tableIndex].table = tableAddress; + customTables[tableIndex].tableLength = fileSize; - _ACPI_DEBUG_DUMP("%d bytes).\n", fileSize); + return 0; + } - customTables[tableIndex].table = kernelAddress; - customTables[tableIndex].tableLength = fileSize; + _ACPI_DEBUG_DUMP("Error: File not found.)\n"); - return 0; + return -1; } From c943b110603cb703cbf4993e1b792eca2e953401 Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 11:54:00 +0100 Subject: [PATCH 050/623] Patch for RevoBoot v1.5.30 --- i386/libsaio/load.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index dad895a..51e8cf1 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -427,3 +427,31 @@ static long DecodeSymbolTable(long cmdBase) return 0; } + + +//============================================================================== +// Public function (RevoBoot v1.5.30 and greater). Called from our ACPI patcher +// which looks in /Extra/ACPI/ for [TableName].aml but it is also used in two +// other places, being libsaio/efi.c and libsaio/SMBIOS/static_data.h This to +// get static (binary) data from /Extra/[EFI/SMBIOS]/[FileName].bin + +long loadBinaryData(char *aFilePath, void **aMemoryAddress) +{ + long fileSize = LoadFile(aFilePath); + + printf("fileSize is: %ld", fileSize); + + if (fileSize > 0) + { + *aMemoryAddress = (void *)malloc(fileSize); + + if (aMemoryAddress) + { + memcpy(*aMemoryAddress, (void *)kLoadAddr, fileSize); + + return fileSize; + } + } + + return 0; +} From 61494d2695e31fe682a4963fcabc39d03def5d82 Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 11:58:59 +0100 Subject: [PATCH 051/623] Patch for RevoBoot v1.5.30 --- i386/libsaio/efi.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index 86e913e..720c054 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -32,6 +32,7 @@ * - STATIC_MODEL_NAME renamed to EFI_MODEL_NAME (PikerAlpha, October 2012). * - Now no longer includes platform.h (PikerAlpha, October 2012). * - Data selector moved over from RevoBoot/i386/config/data.h (PikerAlpha, October 2012). + * - Get static EFI data (optional) from /Extra/EFI/[MacModelNN].bin (PikerAlpha, October 2012). * */ @@ -174,17 +175,35 @@ void initEFITree(void) gPlatform.EFI.Nodes.Chosen = chosenNode; #if INJECT_EFI_DEVICE_PROPERTIES - // The STRING (macro) is defined in RevoBoot/i386/config/settings.h - #include STRING(EFI_DATA_FILE) + _EFI_DEBUG_DUMP("Injecting static EFI device-properties [%s]\n", SMB_PRODUCT_NAME); - static EFI_UINT8 const EFI_DEVICE_PROPERTIES[] = - { - STATIC_EFI_DEVICE_PROPERTIES - }; + #if LOAD_STATIC_EFI_DATA_FROM_EXTRA + extern long loadBinaryData(char *aFilePath, void **aMemoryAddress); + + char dirSpec[32] = ""; + sprintf(dirSpec, "/Extra/EFI/%s", STRING(STATIC_DATA_FILENAME)); + + void * staticEFIData = (void *)kLoadAddr; + + _EFI_DEBUG_DUMP("Loading: %s\n", dirSpec); - _EFI_DEBUG_DUMP("Injecting EFI device-properties\n"); + long fileSize = loadBinaryData(dirSpec, &staticEFIData); + + if (fileSize) + { + DT__AddProperty(efiNode, "device-properties", fileSize, (EFI_CHAR8*) staticEFIData); + } + #else + // The STRING (macro) is defined in RevoBoot/i386/config/settings.h + #include STRING(EFI_DATA_FILE) + + static EFI_UINT8 const EFI_DEVICE_PROPERTIES[] = + { + STATIC_EFI_DEVICE_PROPERTIES + }; - DT__AddProperty(efiNode, "device-properties", sizeof(EFI_DEVICE_PROPERTIES), (EFI_CHAR8*) &EFI_DEVICE_PROPERTIES); + DT__AddProperty(efiNode, "device-properties", sizeof(EFI_DEVICE_PROPERTIES), (EFI_CHAR8*) &EFI_DEVICE_PROPERTIES); + #endif #endif _EFI_DEBUG_DUMP("Exiting initEFITree()\n"); From 3870a4a37fda52a1b140ae2d1ebfeb3bf399b3dd Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 12:07:05 +0100 Subject: [PATCH 052/623] Patch for RevoBoot v1.5.30 --- i386/boot2/boot.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 50f3e56..71ccc49 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -204,7 +204,14 @@ void boot(int biosdev) } } +#if (LOAD_STATIC_EFI_DATA_FROM_EXTRA == 0) + /* + * We can only make this call here when static EFI is included from + * RevoBoot/i386/config/EFI/[MacModelNN.h] Not when the data is read + * from: /Extra/ because then: RevoBoot/i386/libsaio/platform.c calls it. + */ initPartitionChain(); +#endif #define loadCABootPlist() loadSystemConfig(&bootInfo->bootConfig) From 7b91930e279385ab3653570c758d6566a789125e Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 12:09:53 +0100 Subject: [PATCH 053/623] Patch for RevoBoot v1.5.30 --- i386/libsaio/platform.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/i386/libsaio/platform.c b/i386/libsaio/platform.c index 11af0fa..78c4f9d 100644 --- a/i386/libsaio/platform.c +++ b/i386/libsaio/platform.c @@ -276,5 +276,13 @@ void initPlatform(int biosDevice) initKernelBootConfig(); +#if (LOAD_STATIC_EFI_DATA_FROM_EXTRA) + /* + * We need to call this much earlier in the boot process when static EFI data + * is read from: /Extra/EFI[MacModelNN.bin]. Otherwise LoadFile (load.c) fails. + */ + initPartitionChain(); +#endif + initEFITree(); } From 6654d641d5a1225d79e3a6b097d8046d9f018639 Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 12:14:09 +0100 Subject: [PATCH 054/623] Patch for RevoBoot v1.5.30 --- i386/libsaio/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/Makefile b/i386/libsaio/Makefile index 0c3c64f..bc5c4e1 100644 --- a/i386/libsaio/Makefile +++ b/i386/libsaio/Makefile @@ -6,9 +6,9 @@ # - Major cleanup (PikerAlpha, October 2012). # - DMAKE_TARGET_MODEL added (PikerAlpha, October 2012). # - Static data selectors added (PikerAlpha, October 2012). +# - STATIC_DATA_FILENAME added (PikerAlpha, October 2012). # - include ../MakePaths.dir UTILDIR = ../util @@ -23,6 +23,7 @@ CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost \ -DREVOBOOT_VERSION_INFO=\"RevoBoot\ v$(PRODUCT_VERSION_NUMBER)\" \ -DMAKE_TARGET_OS=$(PRODUCT_OS_TARGET) \ -DSETTINGS_FILE=SETTINGS/$(MAKE_TARGET_MODEL).h \ + -DSTATIC_DATA_FILENAME=$(MAKE_TARGET_MODEL).bin \ -DACPI_DATA_FILE=../../config/$(MAKE_ACPI_DATA_FILE) \ -DEFI_DATA_FILE=../config/$(MAKE_EFI_DATA_FILE) \ -DSMBIOS_DATA_FILE=../../config/$(MAKE_SMBIOS_DATA_FILE) \ From e0fc38e372d5df9d6908c87150c781ae875daca4 Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 12:18:27 +0100 Subject: [PATCH 055/623] Patch for RevoBoot v1.5.30 --- i386/libsaio/acpi/patcher.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i386/libsaio/acpi/patcher.h b/i386/libsaio/acpi/patcher.h index d9eb40c..cf760a0 100644 --- a/i386/libsaio/acpi/patcher.h +++ b/i386/libsaio/acpi/patcher.h @@ -20,9 +20,12 @@ extern ACPI_RSDP * getACPIBaseAddress(); #include "ssdt_pr_generator.h" #endif + #if LOAD_EXTRA_ACPI_TABLES && (LOAD_DSDT_TABLE_FROM_EXTRA_ACPI || LOAD_SSDT_TABLE_FROM_EXTRA_ACPI) //============================================================================== +extern long loadBinaryData(char *aFilePath, void **aMemoryAddress); + int loadACPITable(int tableIndex) { _ACPI_DEBUG_DUMP("loadACPITable(%s / ", customTables[tableIndex].name); From 355ce29ceb3ccb2660d6a00574899b3f59207984 Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 12:21:23 +0100 Subject: [PATCH 056/623] Limit debug output (patch for RevoBoot v1.5.30) --- i386/libsaio/device_tree.c | 47 ++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/i386/libsaio/device_tree.c b/i386/libsaio/device_tree.c index d80dd3e..9949fc2 100755 --- a/i386/libsaio/device_tree.c +++ b/i386/libsaio/device_tree.c @@ -79,14 +79,18 @@ Property * DT__AddProperty(Node *node, const char *name, uint32_t length, void * { Property *prop; - _EFI_DEBUG_DUMP("DT__AddProperty([Node '%s'], '%s', %d, 0x%x)\n", DT__GetName(node), name, length, value); +#if (DEBUG_EFI & 2) + _EFI_DEBUG_DUMP("DT__AddProperty([Node '%s'], '%s', %d, 0x%x)\n", DT__GetName(node), name, length, value); +#endif if (freeProperties == NULL) { void *buf = malloc(kAllocSize); int i; + #if (DEBUG_EFI & 2) _EFI_DEBUG_DUMP("Allocating more free properties\n"); + #endif if (buf == 0) { @@ -129,7 +133,9 @@ Property * DT__AddProperty(Node *node, const char *name, uint32_t length, void * node->last_prop = prop; prop->next = 0; - // _EFI_DEBUG_DUMP("Done [0x%x]\n", prop); +#if (DEBUG_EFI & 8) + _EFI_DEBUG_DUMP("Done [0x%x]\n", prop); +#endif DTInfo.numProperties++; DTInfo.totalPropertySize += RoundToLong(length); @@ -155,7 +161,9 @@ Node * DT__AddChild(Node *parent, const char *name) int i; +#if (DEBUG_EFI & 2) _EFI_DEBUG_DUMP("Allocating more free nodes\n"); +#endif bzero(buf, kAllocSize); node = (Node *)buf; @@ -174,13 +182,17 @@ Node * DT__AddChild(Node *parent, const char *name) } } +#if (DEBUG_EFI & 2) _EFI_DEBUG_DUMP("DT__AddChild(0x%x, '%s')\n", parent, name); +#endif node = freeNodes; freeNodes = node->next; +#if (DEBUG_EFI & 2) _EFI_DEBUG_DUMP("Got free node 0x%x\n", node); _EFI_DEBUG_DUMP("prop = 0x%x, children = 0x%x, next = 0x%x\n", node->properties, node->children, node->next); +#endif if (parent == NULL) { @@ -252,7 +264,9 @@ void DT__Finalize(void) Node *node; Property *prop; - // _EFI_DEBUG_DUMP("DT__Finalize\n"); +#if (DEBUG_EFI & 8) + _EFI_DEBUG_DUMP("DT__Finalize\n"); +#endif for (prop = allocedProperties; prop != NULL; prop = prop->next) { @@ -332,7 +346,9 @@ void DT__FlattenDeviceTree(void **buffer_p, uint32_t *length) uint32_t totalSize; void * buf; +#if (DEBUG_EFI & 2) _EFI_DEBUG_DUMP("DT__FlattenDeviceTree(0x%x, 0x%x)\n", buffer_p, length); +#endif #if (DEBUG_EFI & 4) if (buffer_p) @@ -345,7 +361,9 @@ void DT__FlattenDeviceTree(void **buffer_p, uint32_t *length) DTInfo.numProperties * sizeof(DeviceTreeNodeProperty) + DTInfo.totalPropertySize; +#if (DEBUG_EFI & 2) _EFI_DEBUG_DUMP("Total size 0x%x\n", totalSize); +#endif if (buffer_p != 0) { @@ -385,11 +403,16 @@ char * DT__GetName(Node *node) { Property *prop; - //_EFI_DEBUG_DUMP("DT__GetName(0x%x)\n", node); - //_EFI_DEBUG_DUMP("Node properties = 0x%x\n", node->properties); +#if (DEBUG_EFI & 8) + _EFI_DEBUG_DUMP("DT__GetName(0x%x)\n", node); + _EFI_DEBUG_DUMP("Node properties = 0x%x\n", node->properties); +#endif + for (prop = node->properties; prop; prop = prop->next) { - //_EFI_DEBUG_DUMP("Prop '%s'\n", prop->name); +#if (DEBUG_EFI & 8) + _EFI_DEBUG_DUMP("Prop '%s'\n", prop->name); +#endif if (strcmp(prop->name, "name") == 0) { return prop->value; @@ -410,8 +433,10 @@ Node * DT__FindNode(const char *path, bool createIfMissing) char *bp; int i; +#if (DEBUG_EFI & 2) _EFI_DEBUG_DUMP("DT__FindNode('%s', %d)\n", path, createIfMissing); - +#endif + // Start at root node = gPlatform.DT.RootNode; @@ -436,13 +461,15 @@ Node * DT__FindNode(const char *path, bool createIfMissing) { break; // last path entry } - +#if (DEBUG_EFI & 2) _EFI_DEBUG_DUMP("Node '%s'\n", nameBuf); +#endif for (child = node->children; child != 0; child = child->next) { +#if (DEBUG_EFI & 2) _EFI_DEBUG_DUMP("Child 0x%x\n", child); - +#endif if (strcmp(DT__GetName(child), nameBuf) == 0) { break; @@ -451,7 +478,9 @@ Node * DT__FindNode(const char *path, bool createIfMissing) if (child == 0 && createIfMissing) { +#if (DEBUG_EFI & 2) _EFI_DEBUG_DUMP("Creating node\n"); +#endif char *str = malloc(strlen(nameBuf) + 1); // XXX this will leak From 40bb5656888e616ac44043a846437c3884c0d004 Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 12:31:54 +0100 Subject: [PATCH 057/623] Patch for RevoBoot v1.5.30 --- i386/libsaio/acpi/patcher.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/i386/libsaio/acpi/patcher.h b/i386/libsaio/acpi/patcher.h index cf760a0..50f6113 100644 --- a/i386/libsaio/acpi/patcher.h +++ b/i386/libsaio/acpi/patcher.h @@ -13,7 +13,6 @@ extern ACPI_RSDP * getACPIBaseAddress(); - #if PATCH_ACPI_TABLE_DATA #if AUTOMATIC_SSDT_PR_CREATION @@ -21,7 +20,7 @@ extern ACPI_RSDP * getACPIBaseAddress(); #endif -#if LOAD_EXTRA_ACPI_TABLES && (LOAD_DSDT_TABLE_FROM_EXTRA_ACPI || LOAD_SSDT_TABLE_FROM_EXTRA_ACPI) +#if (LOAD_EXTRA_ACPI_TABLES && (LOAD_DSDT_TABLE_FROM_EXTRA_ACPI || LOAD_SSDT_TABLE_FROM_EXTRA_ACPI)) //============================================================================== extern long loadBinaryData(char *aFilePath, void **aMemoryAddress); From c55291cd9741f67e297ddf80236fff80f2da77fd Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 12:33:17 +0100 Subject: [PATCH 058/623] Patch for RevoBoot v1.5.30 --- i386/libsaio/efi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index 720c054..109511d 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -39,6 +39,7 @@ #include "efi/fake_efi.h" + //============================================================================== void initEFITree(void) @@ -47,7 +48,7 @@ void initEFITree(void) static char ACPI[] = "ACPI"; - // The required information should be added to private_data.h + // The information from RevoBoot/i386/libsaio/SMBIOS/model_data.h is used here. static EFI_CHAR16 const MODEL_NAME[] = EFI_MODEL_NAME; static EFI_CHAR16 const SYSTEM_SERIAL_NUMBER[] = STATIC_SYSTEM_SERIAL_NUMBER; From 19e721fa9d974a5ca348aa2cbf2cf30d4b71317c Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 12:38:45 +0100 Subject: [PATCH 059/623] Preparations for RevoBoot v1.5.30 --- CHANGES | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGES b/CHANGES index a9e4902..7c1ce7b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,12 @@ +RevoBoot v1.5.30 +================ +- Move/update /Extra/ data reading to RevoBoot/i386/libsaio/load.c (PikerAlpha, October 2012). +- Option to read /Extra/EFI/[MacModelNN.bin] when static EFI data is used (PikerAlpha, October 2012). +- Option to read /Extra/EFI/[MacModelNN.bin] when static SMBIOS data is used (PikerAlpha, October 2012). +- Makefile changes for above features(PikerAlpha, October 2012). +- VERSION updated to v1.5.30 (SMBIOS changes = WORK IN PROGRESS) + + RevoBoot v1.5.25 ================ - RevoBoot/i386/config/data.h is no longer included with (PikerAlpha, October 2012). From 590d71b9cd5d7b5b257b3d6884ecf699560aa70d Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 13:21:44 +0100 Subject: [PATCH 060/623] Patch for RevoBoot v1.5.30 --- i386/libsaio/smbios.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/i386/libsaio/smbios.c b/i386/libsaio/smbios.c index 4b9b051..d99bb64 100755 --- a/i386/libsaio/smbios.c +++ b/i386/libsaio/smbios.c @@ -1,16 +1,16 @@ /* * Copyright (c) 2009 by Master Chief. - * Dynamic and static SMBIOS data gathering added by DHP in 2010. - * Refactorized by DHP in 2011. + * + * Updates: + * + * - Dynamic and static SMBIOS data gathering added by DHP in 2010. + * - Refactorized by DHP in 2011. + * - Get static EFI data (optional) from /Extra/EFI/[MacModelNN].bin (PikerAlpha, October 2012). */ #include "platform.h" #if USE_STATIC_SMBIOS_DATA - -#include "smbios/static_data.h" - - //============================================================================== void setupSMBIOS(void) @@ -19,15 +19,13 @@ void setupSMBIOS(void) // Allocate 1 page of kernel memory (sufficient for a stripped SMBIOS table). void * kernelMemory = (void *)AllocateKernelMemory(4096); - + // Setup a new Entry Point Structure at the beginning of the newly allocated memory page. struct SMBEntryPoint * newEPS = (struct SMBEntryPoint *) kernelMemory; - int tableLength = sizeof(SMBIOS_Table); + // Include additional/conditional code snippet. + #include "smbios/static_data.h" - // Copy the static SMBIOS data into the newly allocated memory page. Right after the new EPS. - memcpy((kernelMemory + sizeof(* newEPS)), SMBIOS_Table, tableLength); - newEPS->anchor[0] = 0x5f; // _ newEPS->anchor[1] = 0x53; // S newEPS->anchor[2] = 0x4d; // M @@ -69,9 +67,8 @@ void setupSMBIOS(void) _SMBIOS_DEBUG_DUMP("New SMBIOS replacement setup.\n"); _SMBIOS_DEBUG_SLEEP(5); } - #else #include "smbios/dynamic_data.h" -#endif \ No newline at end of file +#endif // #if USE_STATIC_SMBIOS_DATA From ba22e0241e8e073777604ae908265129e43401aa Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 13:23:10 +0100 Subject: [PATCH 061/623] Patch for RevoBoot v1.5.30 --- i386/libsaio/smbios/static_data.h | 40 ++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/i386/libsaio/smbios/static_data.h b/i386/libsaio/smbios/static_data.h index eccaefb..9d10db0 100755 --- a/i386/libsaio/smbios/static_data.h +++ b/i386/libsaio/smbios/static_data.h @@ -4,6 +4,7 @@ * Updates: * - Dynamic and static SMBIOS data gathering added by DHP in 2010. * - New path for static EFI data (PikerAlpha, October 2012). + * - Optionally check /Extra/SMBIOS/[MacModelNN.bin] for static SMBIOS data (PikerAlpha, October 2012). * * Credits: * - blackosx, DB1, dgsga, FKA, humph, scrax and STLVNUB (testers). @@ -14,12 +15,39 @@ #include "essentials.h" -// The STRING (macro) is defined in RevoBoot/i386/config/settings.h -#include STRING(SMBIOS_DATA_FILE) +#if LOAD_STATIC_SMBIOS_DATA_FROM_EXTRA -static uint32_t SMBIOS_Table[] = -{ - STATIC_SMBIOS_DATA // Will get replaced with the data from: config/smbios/data.h -}; + #define STATIC_SMBIOS_DMI_STRUCTURE_COUNT 0 + #define STATIC_SMBIOS_SM_MAX_STRUCTURE_SIZE 0 + + extern long loadBinaryData(char *aFilePath, void **aMemoryAddress); + + int tableLength = 0; + char dirSpec[32] = ""; + sprintf(dirSpec, "/Extra/SMBIOS/%s", STRING(STATIC_DATA_FILENAME)); + + void * staticSMBIOSData = (void *)kLoadAddr; + + _SMBIOS_DEBUG_DUMP("Loading: %s\n", dirSpec); + + long fileSize = loadBinaryData(dirSpec, &staticSMBIOSData); + + if (fileSize) + { + tableLength = (int)fileSize; + + memcpy((kernelMemory + sizeof(* newEPS)), staticSMBIOSData, tableLength); + } +#else + // The STRING (macro) is defined in RevoBoot/i386/config/settings.h + #include STRING(SMBIOS_DATA_FILE) + + static uint32_t SMBIOS_Table[] = + { + STATIC_SMBIOS_DATA // Replaced with data from: RevoBoot/i386/config/SMBIOS/[default/MacModelNN].h + }; + + int tableLength = sizeof(SMBIOS_Table); +#endif #endif /* !__LIBSAIO_SMBIOS_STATIC_DATA_H */ From 8d7298e401d3f0a96c616b6f1b467365c60fe25f Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 13:23:37 +0100 Subject: [PATCH 062/623] Updating version info for RevoBoot v1.5.30 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 32461d5..4578c8a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.25 +1.5.30 From 356b34d788edcd4e835d51f49b26b7cf4df6c73a Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 13:24:59 +0100 Subject: [PATCH 063/623] Updating version info for RevoBoot v1.5.30 --- CHANGES | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 7c1ce7b..3894662 100644 --- a/CHANGES +++ b/CHANGES @@ -2,9 +2,9 @@ RevoBoot v1.5.30 ================ - Move/update /Extra/ data reading to RevoBoot/i386/libsaio/load.c (PikerAlpha, October 2012). - Option to read /Extra/EFI/[MacModelNN.bin] when static EFI data is used (PikerAlpha, October 2012). -- Option to read /Extra/EFI/[MacModelNN.bin] when static SMBIOS data is used (PikerAlpha, October 2012). +- Option to read /Extra/SMBIOS/[MacModelNN.bin] when static SMBIOS data is used (PikerAlpha, October 2012). - Makefile changes for above features(PikerAlpha, October 2012). -- VERSION updated to v1.5.30 (SMBIOS changes = WORK IN PROGRESS) +- VERSION updated to v1.5.30 RevoBoot v1.5.25 From 84fe56a40e16afa7b70aeccb3011c4c6d694a64d Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 13:29:11 +0100 Subject: [PATCH 064/623] Patch for RevoBoot v1.5.30 --- i386/config/settings-template.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 966bcbc..7fab6ba 100644 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -16,6 +16,8 @@ * - OVERRIDE_DYNAMIC_PRODUCT_DETECTION removed/no longer supported (PikerAlpha, October 2012). * - INTEL_CORE_TECHNOLOGY per default set to 1 (PikerAlpha, October 2012). * - INJECT_EFI_DEVICE_PROPERTIES per default set to 1 (PikerAlpha, October 2012). + * - USE_STATIC_EFI_DATA added (PikerAlpha, October 2012). + * - USE_STATIC_SMBIOS_DATA added (PikerAlpha, October 2012). * */ @@ -273,6 +275,9 @@ #define INJECT_EFI_DEVICE_PROPERTIES 0 // Set to 0 by default. Change this to 1 when you need to inject 'device-properties'. // // Note: Required when not setting device-properties from your DSDT/SSDT. +#if INJECT_EFI_DEVICE_PROPERTIES + #define LOAD_STATIC_EFI_DATA_FROM_EXTRA 1 // Set to 0 by default. Change this to 1 to load: /Extra/EFI/[MacModelNN].bin +#endif #define EFI_64_BIT 1 // Set to 1 by default for EFI64 on 64-bit platforms. Supporting both // 32 and 64-bit boot modes (using arch=i386/x86_64 under Kernel Flags). @@ -330,6 +335,10 @@ #undef USE_STATIC_CPU_DATA // Prevent boot failures due to wrong settings (until I figured out what we are missing). #endif +#if USE_STATIC_SMBIOS_DATA + #define LOAD_STATIC_SMBIOS_DATA_FROM_EXTRA 0 // Set to 0 by default. Change this to 1 to load: /Extra/SMBIOS/[MacModelNN].bin +#endif + #define OVERRIDE_DYNAMIC_MEMORY_DETECTION 0 // Set to 0 by default. Change this to 0 only when your SMBIOS data (type 17) is correct, or when // you want/need to override some/all of the SMBIOS data. // From 0b0aad850b93a80771c57f14a3e84fd13f57a948 Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 23:38:49 +0100 Subject: [PATCH 065/623] Updating version info for RevoBoot v1.5.31 --- CHANGES | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES b/CHANGES index 3894662..8310316 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,11 @@ +RevoBoot v1.5.31 +================ +- STATIC_SYSTEM_SERIAL_NUMBER renamed to EFI_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). +- Restored lost STATIC_SMSERIALNUMBER in setings-template.h (PikerAlpha, October 2012). +- STATIC_SMSERIALNUMBER renamed to SMB_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). +- VERSION updated to v1.5.31 + + RevoBoot v1.5.30 ================ - Move/update /Extra/ data reading to RevoBoot/i386/libsaio/load.c (PikerAlpha, October 2012). From 29daa6f798d8aedfe0f10259eae275af71caea13 Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 23:39:24 +0100 Subject: [PATCH 066/623] Updating version info for RevoBoot v1.5.31 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 4578c8a..3b2f552 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.30 +1.5.31 From 823b7524452489d0993bd7e551afcfb459a33aa2 Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 23:42:33 +0100 Subject: [PATCH 067/623] Bug fix for RevoBoot v1.5.31 --- i386/config/settings-template.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 7fab6ba..a94e8a8 100644 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -18,6 +18,9 @@ * - INJECT_EFI_DEVICE_PROPERTIES per default set to 1 (PikerAlpha, October 2012). * - USE_STATIC_EFI_DATA added (PikerAlpha, October 2012). * - USE_STATIC_SMBIOS_DATA added (PikerAlpha, October 2012). + * - STATIC_SYSTEM_SERIAL_NUMBER renamed to EFI_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). + * - Restored lost STATIC_SMSERIALNUMBER (PikerAlpha, October 2012). + * - STATIC_SMSERIALNUMBER renamed to SMB_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). * */ @@ -288,7 +291,7 @@ // // Note: Do not change this setting, unless you know what you are doing. -#define STATIC_SYSTEM_SERIAL_NUMBER { 'S', 'O', 'M', 'E', 'S', 'R', 'L', 'N', 'U', 'M', 'B', 'R' } // Example only! +#define EFI_SYSTEM_SERIAL_NUMBER { 'S', 'O', 'M', 'E', 'S', 'R', 'L', 'N', 'U', 'M', 'B', 'R' } // Example only! #define STATIC_SYSTEM_ID { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F } // Example only! @@ -357,6 +360,9 @@ // // Note: MACMINI (without _NNN) selects the default model (last one i.e. MACMINI_51). +#define SMB_SYSTEM_SERIAL_NUMBER "SOMESRLNUMBR" // Example only! + // Note: Match this with EFI_SYSTEM_SERIAL_NUMBER + #if (TARGET_MODEL & MACPRO) #define SMB_BOARD_SERIAL_NUMBER "SOMESRLNUMBR" // Example only! #endif From d94c42eb4a51a68d840a2bc45d2c44f9fb674a01 Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 23:44:49 +0100 Subject: [PATCH 068/623] Bug fix for RevoBoot v1.5.31 --- i386/libsaio/efi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index 109511d..561e7ab 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -33,6 +33,7 @@ * - Now no longer includes platform.h (PikerAlpha, October 2012). * - Data selector moved over from RevoBoot/i386/config/data.h (PikerAlpha, October 2012). * - Get static EFI data (optional) from /Extra/EFI/[MacModelNN].bin (PikerAlpha, October 2012). + * - STATIC_SYSTEM_SERIAL_NUMBER renamed to EFI_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). * */ @@ -50,7 +51,7 @@ void initEFITree(void) // The information from RevoBoot/i386/libsaio/SMBIOS/model_data.h is used here. static EFI_CHAR16 const MODEL_NAME[] = EFI_MODEL_NAME; - static EFI_CHAR16 const SYSTEM_SERIAL_NUMBER[] = STATIC_SYSTEM_SERIAL_NUMBER; + static EFI_CHAR16 const SYSTEM_SERIAL_NUMBER[] = EFI_SYSTEM_SERIAL_NUMBER; DT__Initialize(); // Add and initialize gPlatform.DT.RootNode From e73a4953db6e465801bda7dc82a8443c456b3c52 Mon Sep 17 00:00:00 2001 From: Pike Date: Tue, 30 Oct 2012 23:47:30 +0100 Subject: [PATCH 069/623] Bug fix for RevoBoot v1.5.31 --- i386/libsaio/smbios/dynamic_data.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index f7c0356..cc92cb1 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -12,6 +12,7 @@ * - SMBProperties changed for speed and simplicity (PikerAlpha, October 2012). * - Calls with SMBProperties.keyString cleaned up (PikerAlpha, October 2012). * - Fixed requiredStructures.start/stop values (PikerAlpha, October 2012). + * - STATIC_SMSERIALNUMBER renamed to SMB_SYSTEM_SERIAL_NUMBER(PikerAlpha, October 2012). * * Credits: * - Kabyl (see notes in source code) @@ -135,7 +136,7 @@ struct SMBProperty SMBProperties[] = { kSMBTypeSystemInformation, 0x04, kSMBString, .plainData = APPLE_INC }, { kSMBTypeSystemInformation, 0x05, kSMBString, .plainData = SMB_PRODUCT_NAME }, { kSMBTypeSystemInformation, 0x06, kSMBString, .plainData = "1.0" }, - { kSMBTypeSystemInformation, 0x07, kSMBString, .plainData = STATIC_SMSERIALNUMBER }, + { kSMBTypeSystemInformation, 0x07, kSMBString, .plainData = SMB_SYSTEM_SERIAL_NUMBER }, { kSMBTypeSystemInformation, 0x1a, kSMBString, .plainData = SMB_FAMILY }, //---------------------------------------------------------------------------------------------------- From 9e2382b61a3e676912edc957244eee78d2240d25 Mon Sep 17 00:00:00 2001 From: Pike Date: Wed, 31 Oct 2012 00:25:35 +0100 Subject: [PATCH 070/623] Changed LOAD_STATIC_EFI_DATA_FROM_EXTRA to the default setting --- i386/config/settings-template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index a94e8a8..3a1c125 100644 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -279,7 +279,7 @@ // // Note: Required when not setting device-properties from your DSDT/SSDT. #if INJECT_EFI_DEVICE_PROPERTIES - #define LOAD_STATIC_EFI_DATA_FROM_EXTRA 1 // Set to 0 by default. Change this to 1 to load: /Extra/EFI/[MacModelNN].bin + #define LOAD_STATIC_EFI_DATA_FROM_EXTRA 0 // Set to 0 by default. Change this to 1 to load: /Extra/EFI/[MacModelNN].bin #endif #define EFI_64_BIT 1 // Set to 1 by default for EFI64 on 64-bit platforms. Supporting both From 42f885b2ae6eb8d7bf8716ea824b83abe519f224 Mon Sep 17 00:00:00 2001 From: Dave Griffin Date: Wed, 31 Oct 2012 20:44:29 +0000 Subject: [PATCH 071/623] Fix settings-template.h for when #define TARGET_MODEL = MACPRO --- i386/config/settings-template.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 3a1c125..bfa3555 100644 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -363,9 +363,7 @@ #define SMB_SYSTEM_SERIAL_NUMBER "SOMESRLNUMBR" // Example only! // Note: Match this with EFI_SYSTEM_SERIAL_NUMBER -#if (TARGET_MODEL & MACPRO) - #define SMB_BOARD_SERIAL_NUMBER "SOMESRLNUMBR" // Example only! -#endif +#define SMB_BOARD_SERIAL_NUMBER "SOMESRLNUMBR" // Example only! #define DEBUG_SMBIOS 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. From ffb2f80ab83dd1d64c4af587f64f11b106eeab0e Mon Sep 17 00:00:00 2001 From: Pike Date: Thu, 1 Nov 2012 12:21:15 +0100 Subject: [PATCH 072/623] Bla bla bla --- README | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README b/README index 579854f..283faec 100644 --- a/README +++ b/README @@ -1,5 +1,28 @@ -RevoBoot can now be built with Xcode 4.5.1 on Mountain Lion. See change log for instructions. +About this project: +This Open Source hobby project is maintained by Pike and dgsga. Two long time supporters of the RevoBoot project. +Note that we do not tolerate/share any (links to) copyrighted material. We only use purchased software and +we won't share any of it. Just get your copy of OS X in the Apple store. Should be affordable for everyone. + + +Mountain Lion Server: +RevoBoot has been confirmed to work with the Server app for Mountain Lion (12C60). + + +Fusion Drive Support: +Apple's new Fusion Drive* is a software implementation to speedup the load process +for frequently used applications, without limiting the storage capacity in a bad way. +See also: http://support.apple.com/kb/HT5446 + +RevoBoot has not yet been confirmed to work with a Fusion Drive. We however expect it to work flawlessly. + + +Xcode Support for Mountain Lion: +RevoBoot can be build on Snow Leopard, Lion and Mountain Lion. The latter requires +Xcode 4.5.1 and a libcc_kext.a from an older version of Xcode. See change log for instructions. + + +Configuration: Please note that RevoBoot must be configured for your hardware so start reading our WiKi. See also: https://github.com/blackosx/RevoBuilder/wiki/Using-RevoBuilder @@ -11,3 +34,5 @@ https://github.com/RevoGirl/RevoBoot/blob/master/i386/config/README There's also RevoBuilder (a great tool for first starters) over at: https://github.com/blackosx/RevoBuilder/wiki/Using-RevoBuilder + +Note: RevoBuilder is most likeky broken for RevoBoot v.1.5.00 and greater! From 22050d70b2c92892c52163cd1a7ae7165631ca44 Mon Sep 17 00:00:00 2001 From: Pike Date: Fri, 2 Nov 2012 23:45:11 +0100 Subject: [PATCH 073/623] Fusion Drive note updated --- README | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/README b/README index 283faec..1f6ac8c 100644 --- a/README +++ b/README @@ -1,25 +1,22 @@ About this project: This Open Source hobby project is maintained by Pike and dgsga. Two long time supporters of the RevoBoot project. -Note that we do not tolerate/share any (links to) copyrighted material. We only use purchased software and -we won't share any of it. Just get your copy of OS X in the Apple store. Should be affordable for everyone. - +Note that we do not tolerate/share any (links to) copyrighted material. We only use purchased software and we won't share any of it. Just get your copy of OS X in the Apple store. Should be affordable for everyone. Mountain Lion Server: RevoBoot has been confirmed to work with the Server app for Mountain Lion (12C60). - Fusion Drive Support: -Apple's new Fusion Drive* is a software implementation to speedup the load process -for frequently used applications, without limiting the storage capacity in a bad way. +Apple's new Fusion Drive* is a software implementation to speedup the boot and load process for frequently used applications, without limiting the storage capacity in a bad way. See also: http://support.apple.com/kb/HT5446 -RevoBoot has not yet been confirmed to work with a Fusion Drive. We however expect it to work flawlessly. +The new Mac's that come with a Fusion Drive boot from the third (Recovery HD like) partition on the SSD. This partition in 134.2 MB in size and is called "Boot OS X". +The Recovery HD partition can be found as third partition on the HDD. Setting up a Fusion Drive on a Mac needs to be done with Internet Recovery. +RevoBoot detects CoreStorage partitions and will boot from the boot helper partition on the SDD. Xcode Support for Mountain Lion: -RevoBoot can be build on Snow Leopard, Lion and Mountain Lion. The latter requires -Xcode 4.5.1 and a libcc_kext.a from an older version of Xcode. See change log for instructions. +RevoBoot can be build on Snow Leopard, Lion and Mountain Lion. The latter requires Xcode 4.5.1 and a libcc_kext.a from an older version of Xcode. See change log for instructions. Configuration: From 652aca3c12db62c9fc17abad74f9d8e785d14c80 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 12:31:34 +0100 Subject: [PATCH 074/623] Typo --- README | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README b/README index 1f6ac8c..9da40cd 100644 --- a/README +++ b/README @@ -7,11 +7,10 @@ Mountain Lion Server: RevoBoot has been confirmed to work with the Server app for Mountain Lion (12C60). Fusion Drive Support: -Apple's new Fusion Drive* is a software implementation to speedup the boot and load process for frequently used applications, without limiting the storage capacity in a bad way. -See also: http://support.apple.com/kb/HT5446 +Apple's new Fusion Drive* is a software implementation to speedup the boot and load process for frequently used applications, without limiting the storage capacity in a bad way. See also: http://support.apple.com/kb/HT5446 -The new Mac's that come with a Fusion Drive boot from the third (Recovery HD like) partition on the SSD. This partition in 134.2 MB in size and is called "Boot OS X". -The Recovery HD partition can be found as third partition on the HDD. Setting up a Fusion Drive on a Mac needs to be done with Internet Recovery. +The new Mac's that come with a Fusion Drive boot from the third (Recovery HD like) partition on the SSD. This partition is 134.2 MB in size and is called "Boot OS X". +The Recovery HD partition can be found as third partition on the HDD. Setting up a Fusion Drive on a Mac need to be done with Internet Recovery. RevoBoot detects CoreStorage partitions and will boot from the boot helper partition on the SDD. From 6839bf37b5013cc0e72535c6a573d8a5b42c5af9 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 12:51:15 +0100 Subject: [PATCH 075/623] Fusion Drive cleanups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change was originally scheduled for RevoBoot v1.5.50 but is now pushed forward and already part of v1.5.32, simply because people are starting to experiment with Apple's Fusion Drive. --- i386/libsaio/disk.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/i386/libsaio/disk.c b/i386/libsaio/disk.c index 8ba0d5c..4ab3e3e 100644 --- a/i386/libsaio/disk.c +++ b/i386/libsaio/disk.c @@ -49,9 +49,13 @@ GPT support added by David Elliott. Based on IOGUIDPartitionScheme.cpp. */ -/*** - * Cleanups and refactoring by DHP in 2010 and 2011. - */ +/* + * Updates: + * - Cleanups and refactoring by DHP in 2010 and 2011. + * - Renamed LION_RECOVERY_SUPPORT to CORE_STARAGE_SUPPORT (PikerAlpha, November 2012). + * - Renamed LION_FILEVAULT_SUPPORT to CORE_STARAGE_SUPPORT (PikerAlpha, November 2012). + * - Renamed encryptedBootPartition to coreStoragePartition (PikerAlpha, November 2012). + */ #include "bootstruct.h" @@ -117,7 +121,7 @@ static struct disk_blk0 * gBootSector = NULL; // Apple_HFS EFI_GUID const GPT_HFS_GUID = { 0x48465300, 0x0000, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; -#if LION_RECOVERY_SUPPORT || APPLE_RAID_SUPPORT +#if CORE_STORAGE_SUPPORT || APPLE_RAID_SUPPORT // Apple_Boot (RAID helper partition and the 650 MB 'Recovery HD' partition). EFI_GUID const GPT_BOOT_GUID = { 0x426F6F74, 0x0000, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; #endif @@ -140,8 +144,8 @@ EFI_GUID const GPT_HFS_GUID = { 0x48465300, 0x0000, 0x11AA, { 0xAA, 0x11, 0x EFI_GUID const GPT_EFISYS_GUID = { 0xC12A7328, 0xF81F, 0x11D2, { 0xBA, 0x4B, 0x00, 0xA0, 0xC9, 0x3E, 0xC9, 0x3B } }; #endif -#if LION_FILEVAULT_SUPPORT - // Apple_CoreStorage (FileVault 2) +#if CORE_STORAGE_SUPPORT + // Apple_CoreStorage (FileVault 2 and Fusion Drive) EFI_GUID const GPT_CORESTORAGE_GUID = { 0x53746F72, 0x6167, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; #endif @@ -560,8 +564,8 @@ BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr) map->next = gDiskBVMap; gDiskBVMap = map; -#if LION_FILEVAULT_SUPPORT - bool encryptedBootPartition = false; +#if CORE_STORAGE_SUPPORT + bool codeStoragePartition = false; #endif for (; gptID <= gptCount; gptID++) @@ -615,16 +619,16 @@ BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr) else #endif -#if LION_FILEVAULT_SUPPORT // Is this an encrypted boot partition? +#if CORE_STORAGE_SUPPORT // Is this a CoreStorage partition? if (efi_guid_compare(&GPT_CORESTORAGE_GUID, (EFI_GUID const *)gptMap->ent_type) == 0) { _DISK_DEBUG_DUMP("Matched: CoreStorage GUID\n"); - encryptedBootPartition = true; + coreStoragePartition = true; continue; // Start searching for the Recovery HD partition. } - else if (!encryptedBootPartition && + else if (!coreStoragePartition && #else // Check for HFS+ partitions. if ( @@ -644,7 +648,7 @@ BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr) } #endif -#if LION_RECOVERY_SUPPORT || APPLE_RAID_SUPPORT +#if CORE_STORAGE_SUPPORT || APPLE_RAID_SUPPORT else if (efi_guid_compare(&GPT_BOOT_GUID, (EFI_GUID const *)gptMap->ent_type) == 0) { _DISK_DEBUG_DUMP("Matched: GPT_BOOT_GUID\n"); From 5271e5f03914f740d1e4a3b9594287e20b465d1a Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 13:30:12 +0100 Subject: [PATCH 076/623] Fusion Drive cleanups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change was originally scheduled for RevoBoot v1.5.50 but is now  pushed forward and already part of v1.5.32, simply because people are  starting to experiment with Apple's Fusion Drive --- i386/boot2/boot.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 71ccc49..90302c4 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -47,7 +47,9 @@ */ /* - * Refactorized by DHP in 2010 and 2011. + * Updates: + * - Refactorized by DHP in 2010 and 2011. + * - Optionally include Recovery HD support code (PikerAlpha, November 2012). */ @@ -193,6 +195,7 @@ void boot(int biosdev) showBootLogo(); #endif +#if LION_RECOVERY_SUPPORT // A bit ugly maybe, but this will be changed sometime soon. while (readKeyboardStatus()) { @@ -203,6 +206,7 @@ void boot(int biosdev) gPlatform.BootRecoveryHD = true; } } +#endif #if (LOAD_STATIC_EFI_DATA_FROM_EXTRA == 0) /* From 59326fb922dd10d56b5593e857bcab8091efe27f Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 13:30:48 +0100 Subject: [PATCH 077/623] Updating version info for RevoBoot v1.5.32 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 3b2f552..6062bd9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.31 +1.5.32 From 08a77be51bc446de73b6a7e7dba5d742dad64154 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 13:36:24 +0100 Subject: [PATCH 078/623] Updating for RevoBoot v1.5.32 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Parts of this change was originally scheduled for RevoBoot v1.5.50 but is now  pushed forward and already part of v1.5.32, simply because people are  starting to experiment with Apple's Fusion Drive --- CHANGES | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGES b/CHANGES index 8310316..914769c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,13 @@ +RevoBoot v1.5.32 +================ +- Optionally include Recovery HD support code in boot.c (PikerAlpha, October 2012). +- Renamed LION_RECOVERY_SUPPORT to CORE_STARAGE_SUPPORT in disk.c (PikerAlpha, October 2012). +- Renamed LION_FILEVAULT_SUPPORT to CORE_STARAGE_SUPPORT in disk.c (PikerAlpha, November 2012). +- Renamed encryptedBootPartition to coreStoragePartition in disk.c (PikerAlpha, October 2012). +- Cleaned up settings-template.h (PikerAlpha, October 2012). +- VERSION updated to v1.5.32 + + RevoBoot v1.5.31 ================ - STATIC_SYSTEM_SERIAL_NUMBER renamed to EFI_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). From 9b0e500a7717cc1b7a538b1d930b398e5a994975 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 13:41:17 +0100 Subject: [PATCH 079/623] Cleanups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change was originally scheduled for RevoBoot v1.5.50 but is now  pushed forward and already part of v1.5.32, simply because people are  starting to experiment with Apple's Fusion Drive --- i386/config/settings-template.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index bfa3555..114bfb8 100644 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -197,6 +197,9 @@ #define SAFE_MALLOC 0 // Set to 0 by default. Change this to 1 when booting halts with a memory allocation error. +#define LION_RECOVERY_SUPPORT 0 // Set to 0 by default. Change this to 1 to make RevoBoot search for the 'Recovery HD' + // partition and, when available, boot from it. + #define DEBUG_BOOT 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. @@ -256,8 +259,13 @@ #define LEGACY_BIOS_READ_SUPPORT 0 // Set to 0 by default. Change this to 1 for crappy old BIOSes. -#define LION_FILEVAULT_SUPPORT 0 // Set to 0 by default. Setting this to 1 will make RevoBoot skip encrypted boot partitions - // and boot from the Recovery HD partition instead (when available). +#if LION_RECOVERY_SUPPORT + #define CORE_STORAGE_SUPPORT 1 // Set to 0 by default since booting from a 'Recovery HD' partition may requires us to skip + // (encrypted) CoreStorage partitions. +#else + #define CORE_STORAGE_SUPPORT 0 // Set to 0 by default. Change this to 1 when you want RevoBoot to boot from the 'Boot OS X' + // (usually the third) partition on a Fusion Drive (requires Mountain Lion 10.8.2). +#endif #define APPLE_RAID_SUPPORT 0 // Set to 0 by default. Change this to 1 for Apple Software RAID support. @@ -314,17 +322,7 @@ #define DEBUG_BOOT_GRAPHICS 0 // Set to 0 by default. Use 1 when to see debug info. -//------------------------------------------------------------ STRINGDATA.H ---------------------------------------------------------------- - -#define LION_FILEVAULT_SUPPORT 0 // Set to 0 by default. Setting this to 1 will make RevoBoot skip encrypted boot partitions - // and boot from the Recovery HD partition instead (when available). - -#if LION_FILEVAULT_SUPPORT - #define LION_RECOVERY_SUPPORT 1 // Make RevoBoot search for the Recovery HD partition and boot from it (when available). -#else - #define LION_RECOVERY_SUPPORT 0 // Set to 0 by default. Setting this to 1 will make RevoBoot search for the Recovery HD and - // try to boot from it, when it is properly setup and modified for RevoBoot. -#endif +//------------------------------------------------------------ STRINGTABLE.H ---------------------------------------------------------------- #define LION_INSTALL_SUPPORT 0 // Set to 0 by default. Setting this to 1 will make RevoBoot search in specific directories // for com.apple.Boot.plist – required for Mac like Lion OS X installations. From f43a90d9b94f22c72d3d206e2805de6be761c836 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 14:11:50 +0100 Subject: [PATCH 080/623] Fix compilation error for plain ./r --- r | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/r b/r index 73954b6..530f117 100755 --- a/r +++ b/r @@ -20,9 +20,9 @@ if [[ "$1" =~ [iMac|Mac] ]]; make MODEL=`cat MODEL` > out.log else # - # No default model found. + # No default model found. Use the default (matches settings-template.h) # - make > out.log + make MODEL=Macmini > out.log fi; fi From d4827d6d871ec7c9dfab408a00814e56437211f4 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 14:30:43 +0100 Subject: [PATCH 081/623] Typos --- i386/libsaio/disk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/disk.c b/i386/libsaio/disk.c index 4ab3e3e..585774c 100644 --- a/i386/libsaio/disk.c +++ b/i386/libsaio/disk.c @@ -565,7 +565,7 @@ BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr) gDiskBVMap = map; #if CORE_STORAGE_SUPPORT - bool codeStoragePartition = false; + bool coreStoragePartition = false; #endif for (; gptID <= gptCount; gptID++) @@ -619,14 +619,14 @@ BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr) else #endif -#if CORE_STORAGE_SUPPORT // Is this a CoreStorage partition? +#if CORE_STORAGE_SUPPORT // Is this a CoreStorage partition? if (efi_guid_compare(&GPT_CORESTORAGE_GUID, (EFI_GUID const *)gptMap->ent_type) == 0) { _DISK_DEBUG_DUMP("Matched: CoreStorage GUID\n"); coreStoragePartition = true; - continue; // Start searching for the Recovery HD partition. + continue; // Start searching for the Recovery HD/Boot OS X partition. } else if (!coreStoragePartition && #else From e15243ed2643ca9968f000e11fb814cf057bc936 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 14:40:30 +0100 Subject: [PATCH 082/623] Removed a debug printf() --- i386/libsaio/load.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index 51e8cf1..2b89f0e 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -439,8 +439,6 @@ long loadBinaryData(char *aFilePath, void **aMemoryAddress) { long fileSize = LoadFile(aFilePath); - printf("fileSize is: %ld", fileSize); - if (fileSize > 0) { *aMemoryAddress = (void *)malloc(fileSize); From 9863ee6f6ab4912ffc439cb2b1778346bb024ac2 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 16:02:26 +0100 Subject: [PATCH 083/623] Fix for static SMBIOS bug for RevoBoot v1.5.33 --- i386/libsaio/smbios/static_data.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/i386/libsaio/smbios/static_data.h b/i386/libsaio/smbios/static_data.h index 9d10db0..a26a48b 100755 --- a/i386/libsaio/smbios/static_data.h +++ b/i386/libsaio/smbios/static_data.h @@ -5,6 +5,7 @@ * - Dynamic and static SMBIOS data gathering added by DHP in 2010. * - New path for static EFI data (PikerAlpha, October 2012). * - Optionally check /Extra/SMBIOS/[MacModelNN.bin] for static SMBIOS data (PikerAlpha, October 2012). + * - Oops. Restoring lost lines (PikerAlpha, November 2012). * * Credits: * - blackosx, DB1, dgsga, FKA, humph, scrax and STLVNUB (testers). @@ -48,6 +49,9 @@ }; int tableLength = sizeof(SMBIOS_Table); + + // Copy the static SMBIOS data into the newly allocated memory page. Right after the new EPS. + memcpy((kernelMemory + sizeof(* newEPS)), SMBIOS_Table, tableLength); #endif #endif /* !__LIBSAIO_SMBIOS_STATIC_DATA_H */ From b0785fde486443ff3f53c47b340e583f4bd4f541 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 16:03:12 +0100 Subject: [PATCH 084/623] Updating version info for RevoBoot v1.5.33 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 6062bd9..a26e0a8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.32 +1.5.33 From 31fe24fe3c9a0107d0b00e41ac0955d78b4a3850 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 16:05:07 +0100 Subject: [PATCH 085/623] Update to RevoBoot v1.5.33 --- CHANGES | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index 914769c..008d1cf 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +RevoBoot v1.5.33 +================ +- Restored lost lines in RevoBoot/i386/libsaio/SMBIOS/static_data.h (PikerAlpha, November 2012). + + RevoBoot v1.5.32 ================ - Optionally include Recovery HD support code in boot.c (PikerAlpha, October 2012). From bb4c68fdb6256ac9d8a63c90f4729e1366e0a5d3 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 18:49:04 +0100 Subject: [PATCH 086/623] Patch for RevoBoot v1.5.34 --- i386/boot2/boot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 90302c4..47d7524 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -46,7 +46,7 @@ * Reworked again by Curtis Galloway (galloway@NeXT.com) */ -/* +/* * Updates: * - Refactorized by DHP in 2010 and 2011. * - Optionally include Recovery HD support code (PikerAlpha, November 2012). @@ -208,7 +208,7 @@ void boot(int biosdev) } #endif -#if (LOAD_STATIC_EFI_DATA_FROM_EXTRA == 0) +#if (LOAD_MODEL_SPECIFIC_EFI_DATA == 0) /* * We can only make this call here when static EFI is included from * RevoBoot/i386/config/EFI/[MacModelNN.h] Not when the data is read From 1f9ac1685c75b709f6f4d85dc7a4a089e5ebbe9a Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 18:50:31 +0100 Subject: [PATCH 087/623] Patch for RevoBoot v1.5.34 --- i386/libsa/libsa.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/i386/libsa/libsa.h b/i386/libsa/libsa.h index 14d3ef8..7cba5a5 100755 --- a/i386/libsa/libsa.h +++ b/i386/libsa/libsa.h @@ -73,16 +73,8 @@ extern char * strdup(const char *s1); extern int strncasecmp(const char * s1, const char * s2, size_t n); #endif -extern uint8_t checksum8( void * start, unsigned int length ); - -#if CHAMELEON - /* - * error.c - */ - - extern int errno; - extern char * strerror(int errnum); -#endif +extern uint8_t checksum8( void * start, unsigned int length); +char * removeChar(char *aSourceString, char aTargetChar); /* * strtol.c From 3280cf8e482fe21f18054e487c449756bb725771 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 18:51:38 +0100 Subject: [PATCH 088/623] Patch for RevoBoot v1.5.34 --- i386/libsa/string.c | 88 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 86 insertions(+), 2 deletions(-) diff --git a/i386/libsa/string.c b/i386/libsa/string.c index 6919fe9..2e58d88 100755 --- a/i386/libsa/string.c +++ b/i386/libsa/string.c @@ -25,6 +25,9 @@ #include "libsa.h" + +//========================================================================== + void * memset(void * dst, int val, size_t len) { asm volatile ( "rep; stosb" @@ -36,6 +39,8 @@ void * memset(void * dst, int val, size_t len) } #if 0 +//========================================================================== + void * memcpy(void * dst, const void * src, size_t len) { asm volatile ( "rep; movsb" @@ -46,17 +51,25 @@ void * memcpy(void * dst, const void * src, size_t len) return dst; } + +//========================================================================== + void bcopy(const void * src, void * dst, size_t len) { memcpy(dst, src, len); } + +//========================================================================== + void bzero(void * dst, size_t len) { memset(dst, 0, len); } #else +//========================================================================== + void * memcpy(void * dst, const void * src, size_t len) { asm volatile ( "cld \n\t" @@ -73,6 +86,9 @@ void * memcpy(void * dst, const void * src, size_t len) return dst; } + +//========================================================================== + void bcopy(const void * src, void * dst, size_t len) { asm volatile ( "cld \n\t" @@ -87,6 +103,9 @@ void bcopy(const void * src, void * dst, size_t len) : "memory", "%edx" ); } + +//========================================================================== + void bzero(void * dst, size_t len) { asm volatile ( "xorl %%eax, %%eax \n\t" @@ -104,20 +123,23 @@ void bzero(void * dst, size_t len) #endif /* #if DONT_USE_GCC_BUILT_IN_STRLEN */ - #define tolower(c) ((int)((c) & ~0x20)) #define toupper(c) ((int)((c) | 0x20)) +//========================================================================== + int strlen(const char * s) { int n = 0; while (*s++) n++; return(n); } - /*#endif*/ + +//========================================================================== /* NOTE: Moved from ntfs.c */ + int memcmp(const void *p1, const void *p2, int len) { while (len--) { @@ -127,6 +149,9 @@ int memcmp(const void *p1, const void *p2, int len) return 0; } + +//========================================================================== + int strcmp(const char * s1, const char * s2) { while (*s1 && (*s1 == *s2)) { @@ -136,6 +161,9 @@ int strcmp(const char * s1, const char * s2) return (*s1 - *s2); } + +//========================================================================== + int strncmp(const char * s1, const char * s2, size_t len) { register int n = len; @@ -145,6 +173,9 @@ int strncmp(const char * s1, const char * s2, size_t len) return(n<0 ? 0 : *s1 - *--s2); } + +//========================================================================== + char * strcpy(char * s1, const char * s2) { register char *ret = s1; @@ -153,6 +184,9 @@ char * strcpy(char * s1, const char * s2) return ret; } + +//========================================================================== + char * strncpy(char * s1, const char * s2, size_t n) { register char *ret = s1; @@ -161,6 +195,9 @@ char * strncpy(char * s1, const char * s2, size_t n) return ret; } + +//========================================================================== + char * strlcpy(char * s1, const char * s2, size_t n) { register char *ret = s1; @@ -170,6 +207,9 @@ char * strlcpy(char * s1, const char * s2, size_t n) return ret; } + +//========================================================================== + char * strstr(const char *in, const char *str) { char c; @@ -193,6 +233,9 @@ char * strstr(const char *in, const char *str) return (char *) (in - 1); } + +//========================================================================== + int ptol(const char *str) { register int c = *str; @@ -205,6 +248,9 @@ int ptol(const char *str) return c; } + +//========================================================================== + int atoi(const char *str) { register int sum = 0; @@ -217,6 +263,9 @@ int atoi(const char *str) return sum; } + +//========================================================================== + char *strncat(char *s1, const char *s2, size_t n) { register char *ret = s1; @@ -228,17 +277,25 @@ char *strncat(char *s1, const char *s2, size_t n) return ret; } + +//========================================================================== + char *strcat(char *s1, const char *s2) { return(strncat(s1, s2, strlen(s2))); } + +//========================================================================== + char *strdup(const char *s1) { return strcpy(malloc(strlen(s1) + 1), s1); } + #if STRNCASECMP +//========================================================================== int strncasecmp(const char *s1, const char *s2, size_t len) { register int n = len; @@ -249,7 +306,10 @@ int strncasecmp(const char *s1, const char *s2, size_t len) } #endif + +//========================================================================== /* COPYRIGHT NOTICE: checksum8 from AppleSMBIOS */ + uint8_t checksum8( void * start, unsigned int length ) { uint8_t csum = 0; @@ -262,3 +322,27 @@ uint8_t checksum8( void * start, unsigned int length ) return csum; } + +#if LOAD_MODEL_SPECIFIC_STATIC_DATA +//========================================================================== + +char * removeChar(char *aSourceString, char aTargetChar) +{ + char *source = aSourceString; + char *destination = aSourceString; + + for (; *source != '\0'; source++) + { + *destination = *source; + + if (*destination != aTargetChar) + { + destination++; + } + } + + *destination = '\0'; + + return (aSourceString); +} +#endif From bdbc525c8d995919cf176cc76f63b96461f1072d Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 18:53:06 +0100 Subject: [PATCH 089/623] Patch for RevoBoot v1.5.34 --- i386/libsaio/disk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/disk.c b/i386/libsaio/disk.c index 585774c..6335e14 100644 --- a/i386/libsaio/disk.c +++ b/i386/libsaio/disk.c @@ -619,7 +619,7 @@ BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr) else #endif -#if CORE_STORAGE_SUPPORT // Is this a CoreStorage partition? +#if CORE_STORAGE_SUPPORT // Is this a CoreStorage partition? if (efi_guid_compare(&GPT_CORESTORAGE_GUID, (EFI_GUID const *)gptMap->ent_type) == 0) { _DISK_DEBUG_DUMP("Matched: CoreStorage GUID\n"); From a80f048ea80ae4cc187a78bbc2e2865c2ecc8466 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 18:54:21 +0100 Subject: [PATCH 090/623] Patch for RevoBoot v1.5.34 --- i386/libsaio/efi.c | 57 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 12 deletions(-) diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index 561e7ab..77f7df7 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -33,7 +33,7 @@ * - Now no longer includes platform.h (PikerAlpha, October 2012). * - Data selector moved over from RevoBoot/i386/config/data.h (PikerAlpha, October 2012). * - Get static EFI data (optional) from /Extra/EFI/[MacModelNN].bin (PikerAlpha, October 2012). - * - STATIC_SYSTEM_SERIAL_NUMBER renamed to EFI_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). + * - STATIC_SYSTEM_SERIAL_NUMBER renamed to EFI_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). * */ @@ -41,6 +41,26 @@ #include "efi/fake_efi.h" +/* #if LOAD_MODEL_SPECIFIC_EFI_DATA +//============================================================================== + +void useStaticEFIProperties(Node * aEFINode) +{ + // The STRING (macro) is defined in RevoBoot/i386/config/settings.h + #include STRING(EFI_DATA_FILE) + + static EFI_UINT8 const EFI_DEVICE_PROPERTIES[] = + { + // Replaced with data from: RevoBoot/i386/config/EFI/[data-template/MacModelNN].h + STATIC_EFI_DEVICE_PROPERTIES + }; + + DT__AddProperty(aEFINode, "device-properties", sizeof(EFI_DEVICE_PROPERTIES), (EFI_CHAR8*) &EFI_DEVICE_PROPERTIES); + + // _EFI_DEBUG_DUMP("Using statically linked EFI device-properties\n"); +} +#endif */ + //============================================================================== void initEFITree(void) @@ -177,33 +197,46 @@ void initEFITree(void) gPlatform.EFI.Nodes.Chosen = chosenNode; #if INJECT_EFI_DEVICE_PROPERTIES - _EFI_DEBUG_DUMP("Injecting static EFI device-properties [%s]\n", SMB_PRODUCT_NAME); + _EFI_DEBUG_DUMP("Injecting static EFI device-properties\n"); - #if LOAD_STATIC_EFI_DATA_FROM_EXTRA - extern long loadBinaryData(char *aFilePath, void **aMemoryAddress); - + #if LOAD_MODEL_SPECIFIC_EFI_DATA char dirSpec[32] = ""; - sprintf(dirSpec, "/Extra/EFI/%s", STRING(STATIC_DATA_FILENAME)); - - void * staticEFIData = (void *)kLoadAddr; + sprintf(dirSpec, "/Extra/EFI/%s.bin", gPlatform.CommaLessModelID); _EFI_DEBUG_DUMP("Loading: %s\n", dirSpec); + void * staticEFIData = (void *)kLoadAddr; + long fileSize = loadBinaryData(dirSpec, &staticEFIData); - - if (fileSize) + + if (fileSize > 0) { DT__AddProperty(efiNode, "device-properties", fileSize, (EFI_CHAR8*) staticEFIData); } + else // No model specific data found. Use static EFI data from RevoBoot/i386/config/EFI + { + // useStaticEFIProperties(efiNode); + // The STRING (macro) is defined in RevoBoot/i386/config/settings.h + #include STRING(EFI_DATA_FILE) + + static EFI_UINT8 const EFI_DEVICE_PROPERTIES[] = + { + // Replaced with data from: RevoBoot/i386/config/EFI/[data-template/MacModelNN].h + STATIC_EFI_DEVICE_PROPERTIES + }; + + DT__AddProperty(efiNode, "device-properties", sizeof(EFI_DEVICE_PROPERTIES), (EFI_CHAR8*) &EFI_DEVICE_PROPERTIES); + } #else // The STRING (macro) is defined in RevoBoot/i386/config/settings.h #include STRING(EFI_DATA_FILE) - + static EFI_UINT8 const EFI_DEVICE_PROPERTIES[] = { + // Replaced with data from: RevoBoot/i386/config/EFI/[data-template/MacModelNN].h STATIC_EFI_DEVICE_PROPERTIES }; - + DT__AddProperty(efiNode, "device-properties", sizeof(EFI_DEVICE_PROPERTIES), (EFI_CHAR8*) &EFI_DEVICE_PROPERTIES); #endif #endif From d00b7b84b93759d89c7e75f519ecb83fcc3f191d Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 18:55:24 +0100 Subject: [PATCH 091/623] Patch for RevoBoot v1.5.34 --- i386/libsaio/acpi.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/i386/libsaio/acpi.c b/i386/libsaio/acpi.c index 3b97a80..baaa8fd 100755 --- a/i386/libsaio/acpi.c +++ b/i386/libsaio/acpi.c @@ -26,6 +26,9 @@ * EFI implementation for Revolution Copyright (c) 2010 by DHP. * All rights reserved. * + * Updates: + * + * - Moved #include to end of file, eliminating need of extern in patcher.h (PikerAlpha, October 2012). */ @@ -72,29 +75,19 @@ void updateACPITableData(struct acpi_2_rsdp * rsdp, struct acpi_2_xsdt * xsdt, i #if APPLE_STYLE_ACPI - //------------------------- Used in acpi/patcher.h ------------------------- - #define _ACPI_SET(target, str, len) strncpy(target, str, len) #define _ACPI_SET_APPLE_OEMID(target) _ACPI_SET((target)->OEMID, "Apple ", 6) #define _ACPI_SET_APPLE_OEMTargetID(target) _ACPI_SET((target)->OEMTableID, "Apple00", 8) - //-------------------------------------------------------------------------- - #else - //--------------------------- Void replacements ---------------------------- - #define _ACPI_SET(target, str, len) #define _ACPI_SET_APPLE_OEMID(target) #define _ACPI_SET_APPLE_OEMTargetID(target) - //-------------------------------------------------------------------------- - #endif -#include "acpi/patcher.h" // Macro's in this include file must be live now. - //============================================================================== // Original version written by macerintel (?). Rewrite by Master Chief in 2009. @@ -136,4 +129,4 @@ struct acpi_2_rsdp * getACPIBaseAddress() #endif } - +#include "acpi/patcher.h" // Macro's in this include file must be live now. From 8c7f7b31629a5db1fd31da86760812a17d293af3 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 18:56:29 +0100 Subject: [PATCH 092/623] Patch for RevoBoot v1.5.34 --- i386/libsaio/acpi/essentials.h | 53 +++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/i386/libsaio/acpi/essentials.h b/i386/libsaio/acpi/essentials.h index 5d1486b..0b66f09 100644 --- a/i386/libsaio/acpi/essentials.h +++ b/i386/libsaio/acpi/essentials.h @@ -53,30 +53,55 @@ typedef struct static_acpi_2_table int tableLength; bool loaded; void * tableAddress; +#if LOAD_MODEL_SPECIFIC_ACPI_DATA + char fileName[32]; +#endif } __attribute__((packed)) ACPITable; static ACPITable customTables[] = { +#if LOAD_MODEL_SPECIFIC_ACPI_DATA // Essential tables. - { "APIC", APIC_Table, sizeof(APIC_Table), false, 0 }, - { "ECDT", ECDT_Table, sizeof(ECDT_Table), false, 0 }, - { "HPET", HPET_Table, sizeof(HPET_Table), false, 0 }, - { "MCFG", MCFG_Table, sizeof(MCFG_Table), false, 0 }, - { "SBST", SBST_Table, sizeof(SBST_Table), false, 0 }, - { "SSDT", SSDT_Table, sizeof(SSDT_Table), false, 0 }, + { "APIC", APIC_Table, sizeof(APIC_Table), false, 0, "" }, + { "ECDT", ECDT_Table, sizeof(ECDT_Table), false, 0, "" }, + { "HPET", HPET_Table, sizeof(HPET_Table), false, 0, "" }, + { "MCFG", MCFG_Table, sizeof(MCFG_Table), false, 0, "" }, + { "SBST", SBST_Table, sizeof(SBST_Table), false, 0, "" }, + { "SSDT", SSDT_Table, sizeof(SSDT_Table), false, 0, "" }, // Special essential tables. - { "DSDT", DSDT_Table, sizeof(DSDT_Table), false, 0 }, - { "FACS", FACS_Table, sizeof(FACS_Table), false, 0 }, + { "DSDT", DSDT_Table, sizeof(DSDT_Table), false, 0, "" }, + { "FACS", FACS_Table, sizeof(FACS_Table), false, 0, "" }, // Optional tables. - { "APIC-1", APIC2_Table, sizeof(APIC2_Table), false, 0 }, - { "SSDT_GPU", SSDT_GPU_Table, sizeof(SSDT_GPU_Table), false, 0 }, - { "SSDT_PR", SSDT_PR_Table, sizeof(SSDT_PR_Table), false, 0 }, - { "SSDT_SATA", SSDT_SATA_Table, sizeof(SSDT_SATA_Table), false, 0 }, - { "SSDT_USB", SSDT_USB_Table, sizeof(SSDT_USB_Table), false, 0 }, - { "", 0, 0, false, 0 } + { "APIC-1", APIC2_Table, sizeof(APIC2_Table), false, 0, "" }, + { "SSDT_GPU", SSDT_GPU_Table, sizeof(SSDT_GPU_Table), false, 0, "" }, + { "SSDT_PR", SSDT_PR_Table, sizeof(SSDT_PR_Table), false, 0, "" }, + { "SSDT_SATA", SSDT_SATA_Table, sizeof(SSDT_SATA_Table), false, 0, "" }, + { "SSDT_USB", SSDT_USB_Table, sizeof(SSDT_USB_Table), false, 0, "" }, + { "", 0, 0, false, 0, "" } +#else + // Essential tables. + { "APIC", APIC_Table, sizeof(APIC_Table), false, 0 }, + { "ECDT", ECDT_Table, sizeof(ECDT_Table), false, 0 }, + { "HPET", HPET_Table, sizeof(HPET_Table), false, 0 }, + { "MCFG", MCFG_Table, sizeof(MCFG_Table), false, 0 }, + { "SBST", SBST_Table, sizeof(SBST_Table), false, 0 }, + { "SSDT", SSDT_Table, sizeof(SSDT_Table), false, 0 }, + + // Special essential tables. + { "DSDT", DSDT_Table, sizeof(DSDT_Table), false, 0 }, + { "FACS", FACS_Table, sizeof(FACS_Table), false, 0 }, + + // Optional tables. + { "APIC-1", APIC2_Table, sizeof(APIC2_Table), false, 0 }, + { "SSDT_GPU", SSDT_GPU_Table, sizeof(SSDT_GPU_Table), false, 0 }, + { "SSDT_PR", SSDT_PR_Table, sizeof(SSDT_PR_Table), false, 0 }, + { "SSDT_SATA", SSDT_SATA_Table, sizeof(SSDT_SATA_Table), false, 0 }, + { "SSDT_USB", SSDT_USB_Table, sizeof(SSDT_USB_Table), false, 0 }, + { "", 0, 0, false, 0 } +#endif }; From 47fd41815feedc99f22e9ee99636803627403066 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 18:57:27 +0100 Subject: [PATCH 093/623] Patch for RevoBoot v1.5.34 --- i386/libsaio/platform.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/platform.c b/i386/libsaio/platform.c index 78c4f9d..5de5caa 100644 --- a/i386/libsaio/platform.c +++ b/i386/libsaio/platform.c @@ -177,8 +177,14 @@ void initPlatform(int biosDevice) gPlatform.MPS.Guid = (EFI_GUID) EFI_MPS_TABLE_GUID; #endif // INCLUDE_MP_TABLE - // Used in boot.c to verify the checksum (adler32) of a pre-linked kernel. - gPlatform.ModelID = SMB_PRODUCT_NAME; + // Used in boot.c to verify the checksum (adler32) of pre-linked kernels. + gPlatform.ModelID = strdup(SMB_PRODUCT_NAME); + +#if LOAD_MODEL_SPECIFIC_STATIC_DATA + // Used in RevoBoot/i386/libsaio/ACPI/patcher.h, RevoBoot/i386/libsaio/efi.c + // and RevoBoot/i386/libsaio/SMBIOS/static_data.h + gPlatform.CommaLessModelID = removeChar(strdup(gPlatform.ModelID), ','); +#endif // Determine system type based on product name. Used in // acpi/patcher.h to update FADT->Preferred_PM_Profile @@ -276,7 +282,7 @@ void initPlatform(int biosDevice) initKernelBootConfig(); -#if (LOAD_STATIC_EFI_DATA_FROM_EXTRA) +#if (LOAD_MODEL_SPECIFIC_EFI_DATA) /* * We need to call this much earlier in the boot process when static EFI data * is read from: /Extra/EFI[MacModelNN.bin]. Otherwise LoadFile (load.c) fails. From a56f855b5d9a993af0887252e1203cdc93180b2c Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 18:57:57 +0100 Subject: [PATCH 094/623] Patch for RevoBoot v1.5.34 --- i386/libsaio/platform.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 9053cd8..e2dca81 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -82,6 +82,10 @@ #define MACPRO_41 MACPRO | (1 << 15) #define MACPRO_31 MACPRO // Defaults to MacPro3,1 +//------------------------------------------------------------------------------ + +// #define LOAD_MODEL_SPECIFIC_STATIC_DATA (LOAD_MODEL_SPECIFIC_ACPI_DATA || LOAD_MODEL_SPECIFIC_EFI_DATA || LOAD_MODEL_SPECIFIC_SMBIOS_DATA) + #include "smbios/model_data.h" //------------------------------------------------------------------------------ @@ -146,7 +150,10 @@ typedef struct _PlatformInfo_t // later updated in boot.c with the actual version info. char * ModelID; // Initialized in platform.c and used in boot.c - +#if LOAD_MODEL_SPECIFIC_STATIC_DATA + char * CommaLessModelID; // Initialized in platform.c and used in i386/libsaio/ACPI/patcher.h, +#endif // i386/libsaio/efi.c and i386/libsaio/SMBIOS/static_data.h + char * KextFileName; // Initialized and used in drivers.c char * KextFileSpec; // Initialized and used in drivers.c char * KextPlistSpec; // Initialized and used in drivers.c @@ -300,7 +307,6 @@ typedef struct _PlatformInfo_t } PlatformInfo_t; - //------------------------------------------------------------------------------ /* cpu/static_data.h & cpu/dynamic_data.h */ From ffe8613938dba7d4934883d73ee4b88092937fa7 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 18:59:01 +0100 Subject: [PATCH 095/623] Patch for RevoBoot v1.5.34 --- i386/libsaio/saio_internal.h | 219 ++++++++++++++++++----------------- 1 file changed, 112 insertions(+), 107 deletions(-) diff --git a/i386/libsaio/saio_internal.h b/i386/libsaio/saio_internal.h index d4da384..c806216 100755 --- a/i386/libsaio/saio_internal.h +++ b/i386/libsaio/saio_internal.h @@ -20,6 +20,12 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ + * + * Updates: + * + * - loadBinaryData(load.c) and toLowerCase(string.c) added (PikerAlpha, October 2012). + * - Tidied up (spaces -> tabs) (PikerAlpha, October 2012). + * */ #ifndef __LIBSAIO_SAIO_INTERNAL_H @@ -28,71 +34,70 @@ #include "saio_types.h" /* asm.s */ -extern void real_to_prot(void); -extern void prot_to_real(void); -extern void halt(void); -extern void startMachKernel(unsigned int address, void *arg); +extern void real_to_prot(void); +extern void prot_to_real(void); +extern void halt(void); +extern void startMachKernel(unsigned int address, void *arg); -// extern void loader(UInt32 code, UInt32 cmdptr); /* bios.s */ -extern void bios(biosBuf_t *bb); +extern void bios(biosBuf_t *bb); -extern int bgetc(void); -extern int biosread(int dev, int cyl, int head, int sec, int num); -extern int ebiosread(int dev, unsigned long long sec, int count); -extern int get_drive_info(int drive, struct driveInfo *dp); -extern void putc(int ch); -extern void putca(int ch, int attr, int repeat); -extern int getc(void); -extern int readKeyboardStatus(void); +extern int bgetc(void); +extern int biosread(int dev, int cyl, int head, int sec, int num); +extern int ebiosread(int dev, unsigned long long sec, int count); +extern int get_drive_info(int drive, struct driveInfo *dp); +extern void putc(int ch); +extern void putca(int ch, int attr, int repeat); +extern int getc(void); +extern int readKeyboardStatus(void); extern unsigned int time18(void); -extern void delay(int ms); +extern void delay(int ms); extern unsigned int get_diskinfo(int dev); -extern int memsize(int i); -extern void video_mode(int mode); -extern void setCursorPosition(int x, int y, int page); -extern void setCursorType(int type); -extern void getCursorPositionAndType(int *x, int *y, int *type); -extern void scollPage(int x1, int y1, int x2, int y2, int attr, int rows, int dir); -extern void clearScreenRows(int y1, int y2); -extern void setActiveDisplayPage( int page ); +extern int memsize(int i); +extern void video_mode(int mode); +extern void setCursorPosition(int x, int y, int page); +extern void setCursorType(int type); +extern void getCursorPositionAndType(int *x, int *y, int *type); +extern void scollPage(int x1, int y1, int x2, int y2, int attr, int rows, int dir); +extern void clearScreenRows(int y1, int y2); +extern void setActiveDisplayPage(int page); extern unsigned long getMemoryMap(struct MemoryRange * rangeArray, unsigned long maxRangeCount, unsigned long * conMemSizePtr, unsigned long * extMemSizePtr); extern unsigned long getExtendedMemorySize(); extern unsigned long getConventionalMemorySize(); -extern void sleep(int n); +extern void sleep(int n); /* efi.c */ -extern void initEFITree(void); -extern void updateEFITree(char *rootUUID); -extern void finalizeEFITree(void); +extern void initEFITree(void); +extern void updateEFITree(char *rootUUID); +extern void finalizeEFITree(void); /* bootstruct.c */ -extern void initKernelBootConfig(void); -extern void finalizeKernelBootConfig(void); -extern void moveKernelBootArgs(void); +extern void initKernelBootConfig(void); +extern void finalizeKernelBootConfig(void); +extern void moveKernelBootArgs(void); /* cache.c */ -extern void CacheReset(); -extern void CacheInit(CICell ih, long blockSize); -extern long CacheRead(CICell ih, char *buffer, long long offset, long length, long cache); +extern void CacheReset(); +extern void CacheInit(CICell ih, long blockSize); +extern long CacheRead(CICell ih, char *buffer, long long offset, long length, long cache); /* console.c */ -extern bool gVerboseMode; -extern bool gErrors; -extern void putchar(int ch); -extern int getchar(void); -extern int printf(const char *format, ...); -extern int error(const char *format, ...); -extern int verbose(const char *format, ...); -extern void stop(const char *format, ...); +extern bool gVerboseMode; +extern bool gErrors; +extern void putchar(int ch); +extern int getchar(void); +extern int printf(const char *format, ...); +extern int error(const char *format, ...); +extern int verbose(const char *format, ...); +extern void stop(const char *format, ...); /* disk.c */ -extern int testBiosread( int biosdev, unsigned long long secno); +extern int testBiosread(int biosdev, unsigned long long secno); extern BVRef diskScanBootVolumes(int biosdev, int *count); extern BVRef diskScanGPTBootVolumes(int biosdev, int *count); extern void diskSeek(BVRef bvr, long long position); @@ -100,94 +105,94 @@ extern int diskRead(BVRef bvr, long addr, long length); extern bool hasBootEFI(BVRef bvr); extern void initPartitionChain(void); -extern BVRef getBVChainForBIOSDev(int biosdev); -extern BVRef newFilteredBVChain(int minBIOSDev, int maxBIOSDev, unsigned int allowFlags, unsigned int denyFlags, int *count); -extern int freeFilteredBVChain(const BVRef chain); -extern int rawDiskRead(BVRef bvr, unsigned int secno, void *buffer, unsigned int len); -extern int rawDiskWrite(BVRef bvr, unsigned int secno, void *buffer, unsigned int len); -extern int readBootSector(int biosdev, unsigned int secno, void *buffer); -extern void turnOffFloppy(void); -extern int testFAT32EFIBootSector( int biosdev, unsigned int secno, void * buffer ); +extern BVRef getBVChainForBIOSDev(int biosdev); +extern BVRef newFilteredBVChain(int minBIOSDev, int maxBIOSDev, unsigned int allowFlags, unsigned int denyFlags, int *count); +extern int freeFilteredBVChain(const BVRef chain); +extern int rawDiskRead(BVRef bvr, unsigned int secno, void *buffer, unsigned int len); +extern int rawDiskWrite(BVRef bvr, unsigned int secno, void *buffer, unsigned int len); +extern int readBootSector(int biosdev, unsigned int secno, void *buffer); +extern void turnOffFloppy(void); +extern int testFAT32EFIBootSector(int biosdev, unsigned int secno, void * buffer); /* hfs_compare.c */ -extern int32_t FastUnicodeCompare(u_int16_t *uniStr1, u_int32_t len1, u_int16_t *uniStr2, u_int32_t len2, int byte_order); -extern void utf_encodestr( const u_int16_t * ucsp, int ucslen, u_int8_t * utf8p, u_int32_t bufsize, int byte_order ); -extern void utf_decodestr(const u_int8_t *utf8p, u_int16_t *ucsp, u_int16_t *ucslen, u_int32_t bufsize, int byte_order ); +extern int32_t FastUnicodeCompare(u_int16_t *uniStr1, u_int32_t len1, u_int16_t *uniStr2, u_int32_t len2, int byte_order); +extern void utf_encodestr(const u_int16_t * ucsp, int ucslen, u_int8_t * utf8p, u_int32_t bufsize, int byte_order); +extern void utf_decodestr(const u_int8_t *utf8p, u_int16_t *ucsp, u_int16_t *ucslen, u_int32_t bufsize, int byte_order); /* load.c */ -extern bool gLoadKernelDrivers; -extern long ThinFatFile(void **binary, unsigned long *length); -extern long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize); +extern bool gLoadKernelDrivers; +extern long ThinFatFile(void **binary, unsigned long *length); +extern long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize); +extern long loadBinaryData(char *aFilePath, void **aMemoryAddress); /* memory.c */ -long AllocateKernelMemory( long inSize ); -long AllocateMemoryRange(char * rangeName, long start, long length, long type); +long AllocateKernelMemory(long inSize); +long AllocateMemoryRange(char * rangeName, long start, long length, long type); /* platform.c */ -extern void enableA20(void); +extern void enableA20(void); /* stringTable.c */ -extern bool getValueForConfigTableKey(config_file_t *config, const char *key, const char **val, int *size); -extern char * newStringForKey(char *key, config_file_t *configBuff); -extern bool getValueForBootKey(const char *line, const char *match, const char **matchval, int *len); -extern bool getValueForKey(const char *key, const char **val, int *size, config_file_t *configBuff); -extern bool getBoolForKey(const char *key, bool *val, config_file_t *configBuff); -extern bool getIntForKey(const char *key, int *val, config_file_t *configBuff); - -extern int loadConfigFile(const char *configFile, config_file_t *configBuff); - -extern int loadSystemConfig(config_file_t *configBuff); - - -extern int loadHelperConfig(config_file_t *configBuff); -extern int loadOverrideConfig(config_file_t *configBuff); - -extern char * newString(const char *oldString); -extern char * getNextArg(char ** ptr, char * val); -extern long ParseXMLFile( char * buffer, TagPtr * dict ); +extern bool getValueForConfigTableKey(config_file_t *config, const char *key, const char **val, int *size); +extern char * newStringForKey(char *key, config_file_t *configBuff); +extern bool getValueForBootKey(const char *line, const char *match, const char **matchval, int *len); +extern bool getValueForKey(const char *key, const char **val, int *size, config_file_t *configBuff); +extern bool getBoolForKey(const char *key, bool *val, config_file_t *configBuff); +extern bool getIntForKey(const char *key, int *val, config_file_t *configBuff); +extern int loadConfigFile(const char *configFile, config_file_t *configBuff); +extern int loadSystemConfig(config_file_t *configBuff); +extern int loadHelperConfig(config_file_t *configBuff); +extern int loadOverrideConfig(config_file_t *configBuff); +extern char * newString(const char *oldString); +extern char * getNextArg(char ** ptr, char * val); +extern long ParseXMLFile(char * buffer, TagPtr * dict); /* sys.c */ -extern BVRef getBootVolumeRef( const char * path, const char ** outPath ); -extern long LoadVolumeFile(BVRef bvr, const char *fileSpec); -extern long LoadFile(const char *fileSpec); -extern long ReadFileAtOffset(const char * fileSpec, void *buffer, uint64_t offset, uint64_t length); -extern long LoadThinFatFile(const char *fileSpec, void **binary); -extern long GetDirEntry(const char *dirSpec, long *dirIndex, const char **name, long *flags, long *time); -extern long GetFileInfo(const char *dirSpec, const char *name,long *flags, long *time); -extern long GetFileBlock(const char *fileSpec, unsigned long long *firstBlock); -extern long GetFSUUID(char *spec, char *uuidStr); -extern long CreateUUIDString(uint8_t uubytes[], int nbytes, char *uuidStr); -extern int openmem(char *buf, int len); -extern int open(const char *str, int how); -extern int close(int fdesc); -extern int file_size(int fdesc); -extern int read(int fdesc, char *buf, int count); -extern int b_lseek(int fdesc, int addr, int ptr); -extern int tell(int fdesc); +extern BVRef getBootVolumeRef(const char * path, const char ** outPath); +extern long LoadVolumeFile(BVRef bvr, const char *fileSpec); +extern long LoadFile(const char *fileSpec); +extern long ReadFileAtOffset(const char * fileSpec, void *buffer, uint64_t offset, uint64_t length); +extern long LoadThinFatFile(const char *fileSpec, void **binary); +extern long GetDirEntry(const char *dirSpec, long *dirIndex, const char **name, long *flags, long *time); +extern long GetFileInfo(const char *dirSpec, const char *name,long *flags, long *time); +extern long GetFileBlock(const char *fileSpec, unsigned long long *firstBlock); +extern long GetFSUUID(char *spec, char *uuidStr); +extern long CreateUUIDString(uint8_t uubytes[], int nbytes, char *uuidStr); +extern int openmem(char *buf, int len); +extern int open(const char *str, int how); +extern int close(int fdesc); +extern int file_size(int fdesc); +extern int read(int fdesc, char *buf, int count); +extern int b_lseek(int fdesc, int addr, int ptr); +extern int tell(int fdesc); extern const char * systemConfigDir(void); -extern struct dirstuff * opendir(const char *path); -extern struct dirstuff * vol_opendir(BVRef bvr, const char *path); -extern int closedir(struct dirstuff *dirp); -extern int readdir(struct dirstuff *dirp, const char **name, long *flags, long *time); -extern int readdir_ext(struct dirstuff * dirp, const char ** name, long * flags, long * time, FinderInfo *finderInfo, long *infoValid); -extern void flushdev(void); -extern void scanBootVolumes(int biosdev, int *count); +extern struct dirstuff * opendir(const char *path); +extern struct dirstuff * vol_opendir(BVRef bvr, const char *path); +extern int closedir(struct dirstuff *dirp); +extern int readdir(struct dirstuff *dirp, const char **name, long *flags, long *time); +extern int readdir_ext(struct dirstuff * dirp, const char ** name, long * flags, long * time, FinderInfo *finderInfo, long *infoValid); +extern void flushdev(void); +extern void scanBootVolumes(int biosdev, int *count); -extern BVRef getBootVolume(BVRef chain, int targetDevice); -extern BVRef getTargetRootVolume(char *rootUUID); -extern BVRef selectBootVolume(BVRef chain); +extern BVRef getBootVolume(BVRef chain, int targetDevice); +extern BVRef getTargetRootVolume(char *rootUUID); +extern BVRef selectBootVolume(BVRef chain); -extern void getBootVolumeDescription(BVRef bvr, char *str, long strMaxLen, bool verbose); +extern void getBootVolumeDescription(BVRef bvr, char *str, long strMaxLen, bool verbose); // Function pointer to be filled in if ramdisks are available -extern int (*p_get_ramdisk_info)(int biosdev, struct driveInfo *dip); -extern int (*p_ramdiskReadBytes)( int biosdev, unsigned int blkno, unsigned int byteoff, unsigned int byteCount, void * buffer ); +extern int (*p_get_ramdisk_info)(int biosdev, struct driveInfo *dip); +extern int (*p_ramdiskReadBytes)(int biosdev, unsigned int blkno, unsigned int byteoff, unsigned int byteCount, void * buffer); + + +/* string.h */ +extern char * toLowerCase(char *aSourceString); #endif /* !__LIBSAIO_SAIO_INTERNAL_H */ From 0b82d821d6e7b0ed688764a5b0df2ba3ba1388ef Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 19:00:05 +0100 Subject: [PATCH 096/623] Patch for RevoBoot v1.5.34 --- i386/libsaio/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/Makefile b/i386/libsaio/Makefile index bc5c4e1..63262be 100644 --- a/i386/libsaio/Makefile +++ b/i386/libsaio/Makefile @@ -26,7 +26,7 @@ CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost \ -DSTATIC_DATA_FILENAME=$(MAKE_TARGET_MODEL).bin \ -DACPI_DATA_FILE=../../config/$(MAKE_ACPI_DATA_FILE) \ -DEFI_DATA_FILE=../config/$(MAKE_EFI_DATA_FILE) \ - -DSMBIOS_DATA_FILE=../../config/$(MAKE_SMBIOS_DATA_FILE) \ + -DSMBIOS_DATA_FILE=../config/$(MAKE_SMBIOS_DATA_FILE) \ -fno-builtin -static $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float From aa11394eb40c936efb2aa8ee5c92c408e1bfb443 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 19:01:47 +0100 Subject: [PATCH 097/623] Patch for RevoBoot v1.5.34 --- i386/libsaio/smbios/dynamic_data.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index cc92cb1..25fa300 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -136,7 +136,7 @@ struct SMBProperty SMBProperties[] = { kSMBTypeSystemInformation, 0x04, kSMBString, .plainData = APPLE_INC }, { kSMBTypeSystemInformation, 0x05, kSMBString, .plainData = SMB_PRODUCT_NAME }, { kSMBTypeSystemInformation, 0x06, kSMBString, .plainData = "1.0" }, - { kSMBTypeSystemInformation, 0x07, kSMBString, .plainData = SMB_SYSTEM_SERIAL_NUMBER }, + { kSMBTypeSystemInformation, 0x07, kSMBString, .plainData = SMB_SYSTEM_SERIAL_NUMBER }, { kSMBTypeSystemInformation, 0x1a, kSMBString, .plainData = SMB_FAMILY }, //---------------------------------------------------------------------------------------------------- @@ -498,4 +498,3 @@ void setupSMBIOS(void) #endif /* !__LIBSAIO_SMBIOS_PATCHER_H */ - From d99c78ef92975ba6f3f49b79751d13e0216ac393 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 19:04:24 +0100 Subject: [PATCH 098/623] Patch for RevoBoot v1.5.34 --- i386/libsaio/acpi/patcher.h | 46 ++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/i386/libsaio/acpi/patcher.h b/i386/libsaio/acpi/patcher.h index 50f6113..acc9233 100644 --- a/i386/libsaio/acpi/patcher.h +++ b/i386/libsaio/acpi/patcher.h @@ -8,11 +8,12 @@ * - A complete new implementation written for RevoBoot by DHP in 2011. * - Automatic SSDT_PR creation added by DHP in June 2011. * - Call loadBinaryData from loadACPITable (PikerAlpha, October 2012). + * - Moved extern declarations to saio_internal.h (PikerAlpha, October 2012). + * - Now using gPlatform.CommaLessModelID instead of gPlatform.ModelID (PikerAlpha, October 2012). + * - Fall back to non-model specific file when model specific file is unavailable (PikerAlpha, October 2012). */ -extern ACPI_RSDP * getACPIBaseAddress(); - #if PATCH_ACPI_TABLE_DATA #if AUTOMATIC_SSDT_PR_CREATION @@ -23,36 +24,53 @@ extern ACPI_RSDP * getACPIBaseAddress(); #if (LOAD_EXTRA_ACPI_TABLES && (LOAD_DSDT_TABLE_FROM_EXTRA_ACPI || LOAD_SSDT_TABLE_FROM_EXTRA_ACPI)) //============================================================================== -extern long loadBinaryData(char *aFilePath, void **aMemoryAddress); - int loadACPITable(int tableIndex) { - _ACPI_DEBUG_DUMP("loadACPITable(%s / ", customTables[tableIndex].name); - - char dirSpec[32] = ""; - sprintf(dirSpec, "/Extra/ACPI/%s.aml", customTables[tableIndex].name); - + char dirSpec[48] = ""; + long fileSize = 0; void * tableAddress = (void *)kLoadAddr; +#if LOAD_MODEL_SPECIFIC_ACPI_DATA + // Example: /Extra/ACPI/DSDT-MacBookPro101.aml + // 0123456789 0123456789 0123456789 1 + sprintf(dirSpec, "/Extra/ACPI/%s-%s.aml", customTables[tableIndex].name, gPlatform.CommaLessModelID); + /* * loadBinaryData calls LoadFile (both in sys.c) to load table data into a * load buffer at kLoadAddr (defined in memory.h) and copies it into a new * allocated memory block (kLoadAddr gets overwritten by the next call). */ - long fileSize = loadBinaryData(dirSpec, &tableAddress); + fileSize = loadBinaryData(dirSpec, &tableAddress); - if (fileSize) + if (fileSize == -1) { - _ACPI_DEBUG_DUMP("%d bytes).\n", fileSize); +#endif + // File: /Extra/ACPI/DSDT-MacBookPro101.aml not found. Try: /Extra/ACPI/dsdt.aml + sprintf(dirSpec, "/Extra/ACPI/%s.aml", customTables[tableIndex].name); + fileSize = loadBinaryData(dirSpec, &tableAddress); +#if LOAD_MODEL_SPECIFIC_ACPI_DATA + } +#endif + + if (fileSize > 0) + { + _ACPI_DEBUG_DUMP("Loading: %s (%d bytes).\n", dirSpec, fileSize); + _ACPI_DEBUG_SLEEP(1); // 'tableAddress' is copied into kernel memory later on (see setupACPI). customTables[tableIndex].table = tableAddress; customTables[tableIndex].tableLength = fileSize; +#if (DEBUG_ACPI && LOAD_MODEL_SPECIFIC_ACPI_DATA) + // Update table name from DSDT.aml to DSDT-Macmini51.aml (DSDT example). + sprintf(customTables[tableIndex].fileName, gPlatform.CommaLessModelID); +#endif + return 0; } - _ACPI_DEBUG_DUMP("Error: File not found.)\n"); + _ACPI_DEBUG_DUMP("Error: File %s not found.)\n", dirSpec); + _ACPI_DEBUG_SLEEP(5); return -1; } @@ -246,7 +264,7 @@ bool patchFACPTable(ENTRIES * xsdtEntries, int tableIndex, int dropOffset) #if STATIC_DSDT_TABLE_INJECTION _ACPI_DEBUG_DUMP("static DSDT data"); #else // STATIC_DSDT_TABLE_INJECTION - _ACPI_DEBUG_DUMP("loaded DSDT.aml"); + _ACPI_DEBUG_DUMP("%s", customTables[DSDT].fileName); #endif // STATIC_DSDT_TABLE_INJECTION _ACPI_DEBUG_DUMP(" @ 0x%x\n", customTables[DSDT].tableAddress); From 4f25936b85881de0c84240c90f50b9c40a5b2675 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 19:06:10 +0100 Subject: [PATCH 099/623] Whitespace fix only --- i386/libsaio/saio_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/saio_internal.h b/i386/libsaio/saio_internal.h index c806216..1bc2fa0 100755 --- a/i386/libsaio/saio_internal.h +++ b/i386/libsaio/saio_internal.h @@ -23,8 +23,8 @@ * * Updates: * - * - loadBinaryData(load.c) and toLowerCase(string.c) added (PikerAlpha, October 2012). - * - Tidied up (spaces -> tabs) (PikerAlpha, October 2012). + * - loadBinaryData(load.c) and toLowerCase(string.c) added (PikerAlpha, October 2012). + * - Tidied up (spaces -> tabs) (PikerAlpha, October 2012). * */ From 4165da1720242ae387aafff7058a1cbd2571ec79 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 19:07:21 +0100 Subject: [PATCH 100/623] Patch for RevoBoot v1.5.34 --- i386/libsaio/smbios.c | 49 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/smbios.c b/i386/libsaio/smbios.c index d99bb64..267a0c6 100755 --- a/i386/libsaio/smbios.c +++ b/i386/libsaio/smbios.c @@ -10,7 +10,34 @@ #include "platform.h" + #if USE_STATIC_SMBIOS_DATA + +#if LOAD_MODEL_SPECIFIC_SMBIOS_DATA +//============================================================================== + +int useStaticSMBIOSData(void * aMemoryAddress) +{ + // The STRING (macro) is defined in RevoBoot/i386/config/settings.h + #include STRING(SMBIOS_DATA_FILE) + + static uint32_t SMBIOS_Table[] = + { + // Replaced with data from: RevoBoot/i386/config/SMBIOS/[data-template/MacModelNN].h + STATIC_SMBIOS_DATA + }; + + _SMBIOS_DEBUG_DUMP("Using statically linked SMBIOS data\n"); + + int tableLength = sizeof(SMBIOS_Table); + + // Copy the static SMBIOS data into the newly allocated memory page. Right after the new EPS. + memcpy(aMemoryAddress, SMBIOS_Table, tableLength); + + return tableLength; +} +#endif /* #if INJECT_EFI_DEVICE_PROPERTIES */ + //============================================================================== void setupSMBIOS(void) @@ -34,7 +61,7 @@ void setupSMBIOS(void) newEPS->entryPointLength = 0x1f; // sizeof(* newEPS) newEPS->majorVersion = 2; newEPS->minorVersion = 4; - newEPS->maxStructureSize = STATIC_SMBIOS_SM_MAX_STRUCTURE_SIZE; // Defined in: config/smbios/data.h + newEPS->maxStructureSize = STATIC_SMBIOS_SM_MAX_STRUCTURE_SIZE; // Defined in RevoBoot/i386/config/SMBIOS/data-template.h newEPS->entryPointRevision = 0; newEPS->formattedArea[0] = 0; @@ -51,9 +78,25 @@ void setupSMBIOS(void) newEPS->dmi.checksum = 0; newEPS->dmi.tableLength = tableLength; newEPS->dmi.tableAddress = (uint32_t) (kernelMemory + sizeof(struct SMBEntryPoint)); - newEPS->dmi.structureCount = STATIC_SMBIOS_DMI_STRUCTURE_COUNT; // Defined in: config/smbios/data.h newEPS->dmi.bcdRevision = 0x24; - + newEPS->dmi.structureCount = STATIC_SMBIOS_DMI_STRUCTURE_COUNT; // Defined in RevoBoot/i386/config/SMBIOS/data-template.h + +#if LOAD_MODEL_SPECIFIC_SMBIOS_DATA + /* + * This is nothing more than a mere stop gap solution, since using the factory values here, instead of walking over + * staticSMBIOSData to get them, may hang the kernel at boot time (will be fixed in a next update of RevoBoot). + */ + if (fileSize > 0) + { + newEPS->maxStructureSize = factoryEPS->maxStructureSize; // Defined in RevoBoot/i386/libsaio/SMBIOS/static_data.h + newEPS->dmi.structureCount = factoryEPS->dmi.structureCount; // Defined in RevoBoot/i386/libsaio/SMBIOS/static_data.h + + _SMBIOS_DEBUG_DUMP("factoryEPS->maxStructureSize : %d\n", factoryEPS->maxStructureSize); + _SMBIOS_DEBUG_DUMP("factoryEPS->dmi.structureCount: %d\n", factoryEPS->dmi.structureCount); + _SMBIOS_DEBUG_SLEEP(1); + } +#endif + // Take care of possible checksum errors newEPS->dmi.checksum = 256 - checksum8(&newEPS->dmi, sizeof(newEPS->dmi)); newEPS->checksum = 256 - checksum8(newEPS, sizeof(* newEPS)); From 1c40333cdbdcc9ba109f861f5ccd8641dd13f0de Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 19:08:37 +0100 Subject: [PATCH 101/623] Patch for RevoBoot v1.5.34 --- i386/libsaio/smbios/static_data.h | 77 +++++++++++++++++++++---------- 1 file changed, 53 insertions(+), 24 deletions(-) diff --git a/i386/libsaio/smbios/static_data.h b/i386/libsaio/smbios/static_data.h index a26a48b..efe7645 100755 --- a/i386/libsaio/smbios/static_data.h +++ b/i386/libsaio/smbios/static_data.h @@ -5,7 +5,7 @@ * - Dynamic and static SMBIOS data gathering added by DHP in 2010. * - New path for static EFI data (PikerAlpha, October 2012). * - Optionally check /Extra/SMBIOS/[MacModelNN.bin] for static SMBIOS data (PikerAlpha, October 2012). - * - Oops. Restoring lost lines (PikerAlpha, November 2012). + * - Get maxStructureSize/structureCount from factory EPS (PikerAlpha, October 2012). * * Credits: * - blackosx, DB1, dgsga, FKA, humph, scrax and STLVNUB (testers). @@ -16,42 +16,71 @@ #include "essentials.h" -#if LOAD_STATIC_SMBIOS_DATA_FROM_EXTRA +int tableLength = 0; - #define STATIC_SMBIOS_DMI_STRUCTURE_COUNT 0 - #define STATIC_SMBIOS_SM_MAX_STRUCTURE_SIZE 0 +#if LOAD_MODEL_SPECIFIC_SMBIOS_DATA - extern long loadBinaryData(char *aFilePath, void **aMemoryAddress); + #define SMBIOS_SEARCH_BASE 0x000F0000 + #define SMBIOS_SEARCH_END 0x000FFFFF + #define SMBIOS_ANCHOR 0x5f4d535f // '_SM_' in Little Endian. + #define SMBIOS_MPS_ANCHOR 0x5f504d5f // '_MP_' in Little Endian. + + _SMBIOS_DEBUG_DUMP("in getEPSAddress()\n"); + + void *baseAddress = (void *)SMBIOS_SEARCH_BASE; + + for(; baseAddress <= (void *)SMBIOS_SEARCH_END; baseAddress += 16) + { + if (*(uint32_t *)baseAddress == SMBIOS_ANCHOR) // _SM_ + { + if (checksum8(baseAddress, sizeof(struct SMBEntryPoint)) == 0) + { + #if INCLUDE_MP_TABLE + // SMBIOS table located. Use this address as starting point. + void * mpsAddress = baseAddress; + + // Now search for the Multi Processor table. + for(; mpsAddress <= (void *)SMBIOS_SEARCH_END; mpsAddress += 16) + { + if (*(uint32_t *)mpsAddress == SMBIOS_MPS_ANCHOR) + { + gPlatform.MP.BaseAddress = (uint32_t)mpsAddress; + break; + } + } + #endif // INCLUDE_MP_TABLE + + break; + + _SMBIOS_DEBUG_DUMP("SMBIOS baseAddress: 0x%08x\n", baseAddress); + } + } + } - int tableLength = 0; char dirSpec[32] = ""; - sprintf(dirSpec, "/Extra/SMBIOS/%s", STRING(STATIC_DATA_FILENAME)); void * staticSMBIOSData = (void *)kLoadAddr; + struct SMBEntryPoint *factoryEPS; + + sprintf(dirSpec, "/Extra/SMBIOS/%s.bin", COMMA_STRIPPED_MODEL_ID); + _SMBIOS_DEBUG_DUMP("Loading: %s\n", dirSpec); long fileSize = loadBinaryData(dirSpec, &staticSMBIOSData); - if (fileSize) + if (fileSize > 0) { - tableLength = (int)fileSize; - - memcpy((kernelMemory + sizeof(* newEPS)), staticSMBIOSData, tableLength); - } -#else - // The STRING (macro) is defined in RevoBoot/i386/config/settings.h - #include STRING(SMBIOS_DATA_FILE) + memcpy((kernelMemory + sizeof(* newEPS)), staticSMBIOSData, fileSize); - static uint32_t SMBIOS_Table[] = + factoryEPS = (struct SMBEntryPoint *) baseAddress; + } + else // File not found. Use static data defined in RevoBoot/i386/config/SMBIOS/ { - STATIC_SMBIOS_DATA // Replaced with data from: RevoBoot/i386/config/SMBIOS/[default/MacModelNN].h - }; - - int tableLength = sizeof(SMBIOS_Table); - - // Copy the static SMBIOS data into the newly allocated memory page. Right after the new EPS. - memcpy((kernelMemory + sizeof(* newEPS)), SMBIOS_Table, tableLength); -#endif + tableLength = useStaticSMBIOSData((kernelMemory + sizeof(* newEPS))); + } +#else + tableLength = useStaticSMBIOSData((kernelMemory + sizeof(* newEPS))); +#endif /* LOAD_MODEL_SPECIFIC_SMBIOS_DATA */ #endif /* !__LIBSAIO_SMBIOS_STATIC_DATA_H */ From ee1791f86f14cffd8d16c762b61f660f7e3a5f64 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 19:23:35 +0100 Subject: [PATCH 102/623] Patch for RevoBoot v1.5.34 --- i386/config/settings-template.h | 230 +++++++++++++++++--------------- 1 file changed, 120 insertions(+), 110 deletions(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 114bfb8..8f553c8 100644 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -1,7 +1,7 @@ /* * Copyright (c) 2009 Master Chief. All rights reserved. * - * Note: This is an essential part of the build process for RevoBoot v1.5.00 and greater. + * Note: This is an essential part of the build process for RevoBoot v1.5.32 and greater. * * Updates: * @@ -15,13 +15,17 @@ * - STATIC_SMBIOS_MODEL_ID renamed to TARGET_MODEL (PikerAlpha, October 2012). * - OVERRIDE_DYNAMIC_PRODUCT_DETECTION removed/no longer supported (PikerAlpha, October 2012). * - INTEL_CORE_TECHNOLOGY per default set to 1 (PikerAlpha, October 2012). - * - INJECT_EFI_DEVICE_PROPERTIES per default set to 1 (PikerAlpha, October 2012). - * - USE_STATIC_EFI_DATA added (PikerAlpha, October 2012). - * - USE_STATIC_SMBIOS_DATA added (PikerAlpha, October 2012). + * - INJECT_EFI_DEVICE_PROPERTIES per default set to 1 (PikerAlpha, October 2012). + * - SMBIOS base board serial# (SMB_BOARD_SERIAL_NUMBER) feature added (dgsga, October 2012). + * - LOAD_STATIC_EFI_DATA_FROM_EXTRA feature added (PikerAlpha, October 2012). + * - LOAD_STATIC_SMBIOS_DATA_FROM_EXTRA feature added (PikerAlpha, October 2012). * - STATIC_SYSTEM_SERIAL_NUMBER renamed to EFI_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). * - Restored lost STATIC_SMSERIALNUMBER (PikerAlpha, October 2012). * - STATIC_SMSERIALNUMBER renamed to SMB_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). - * + * - LOAD_STATIC_ACPI_DATA_FROM_EXTRA added (PikerAlpha, October 2012). + * - LOAD_STATIC_EFI_DATA_FROM_EXTRA renamed to LOAD_MODEL_SPECIFIC_EFI_DATA (PikerAlpha, October 2012). + * - LOAD_STATIC_SMBIOS_DATA_FROM_EXTRA renamed to LOAD_MODEL_SPECIFIC_SMBIOS_DATA (PikerAlpha, October 2012). + * - LOAD_MODEL_SPECIFIC_STATIC_DATA added (PikerAlpha, October 2012). */ @@ -34,10 +38,10 @@ // and requires you to set PATCH_ACPI_TABLE_DATA to 1. -#define PATCH_ACPI_TABLE_DATA 1 // Set to 1 by default (enabling patching). Use 0 to keep the original - // unmodified ACPI tables, but please note (very well) that this is - // only supported by very few motherboards / BIOS'es. You may also - // need a kext like OSXRestart.kext to be able to restart your system, +#define PATCH_ACPI_TABLE_DATA 1 // Set to 1 by default (enabling patching). Use 0 to keep the original + // unmodified ACPI tables, but please note (very well) that this is + // only supported by very few motherboards / BIOS'es. You may also + // need a kext like OSXRestart.kext to be able to restart your system, // this due to a possibly broken FACP table in your BIOS! // // Note: Requires one of the following STATIC_* and/or LOAD_* settings: @@ -52,13 +56,13 @@ #endif -#define STATIC_APIC_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when you want to inject a modified copy +#define STATIC_APIC_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when you want to inject a modified copy // with say stripped out unused CPU's or other required modifications. // // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. -#define STATIC_APIC2_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when you want to inject a second APIC +#define STATIC_APIC2_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when you want to inject a second APIC // (ACPI-1) table data for additional CPU core support. // // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. @@ -77,7 +81,7 @@ // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. -#define STATIC_HPET_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when you want to inject a static copy +#define STATIC_HPET_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when you want to inject a static copy // of a custom HPET table. // // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. @@ -95,7 +99,7 @@ // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. -#define STATIC_SSDT_PR_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when you want to inject your Intel +#define STATIC_SSDT_PR_TABLE_INJECTION 0 // Set to 0 by default. Use 1 when you want to inject your Intel // SpeedStep related modifications (like I do). // // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. @@ -111,15 +115,15 @@ // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. -#define LOAD_DSDT_TABLE_FROM_EXTRA_ACPI 1 // Set to 0 by default. Use 1 when your setup requires a modified DSDT table - // and you want to load: /Extra/ACPI/dsdt.aml instead of injecting a static - // DSDT table from: RevoBoot/i386/config/ACPI/data.h +#define LOAD_DSDT_TABLE_FROM_EXTRA_ACPI 0 // Set to 0 by default. Use 1 when your setup requires a modified DSDT table + // and you want to load: /Extra/ACPI/dsdt.aml instead of injecting a static + // DSDT table from: RevoBoot/i386/config/ACPI/data.h // // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. -#define LOAD_SSDT_TABLE_FROM_EXTRA_ACPI 0 // Set to 1 by default. Use 0 only after you've converted your SSDT into - // STATIC_SSDT_TABLE_INJECTION in: RevoBoot/i386/config/ACPI/data.h +#define LOAD_SSDT_TABLE_FROM_EXTRA_ACPI 1 // Set to 1 by default. Use 0 only after you've converted your SSDT into + // STATIC_SSDT_TABLE_INJECTION in: RevoBoot/i386/config/ACPI/data.h // or when you don't want/need to load /Extra/ACPI/SSDT.aml // // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. @@ -127,8 +131,12 @@ #define LOAD_EXTRA_ACPI_TABLES (LOAD_DSDT_TABLE_FROM_EXTRA_ACPI || LOAD_SSDT_TABLE_FROM_EXTRA_ACPI) +#if LOAD_EXTRA_ACPI_TABLES + #define LOAD_MODEL_SPECIFIC_ACPI_DATA 0 // Set to 0 by default. Use 1 to read: /Extra/ACPI/[XXXX-MacModelNN].aml and + // falls back to: /Extra/ACPI/[XXXX].aml when model specific data is not available. +#endif -#define AUTOMATIC_SSDT_PR_CREATION 1 // Set to 0 by default (support for Sandy Bridge only). +#define AUTOMATIC_SSDT_PR_CREATION 1 // Set to 1 by default (support for Sandy Bridge only). // // This injects a custom SSDT (in configure mode) with: // @@ -138,7 +146,7 @@ // Use 4 to inject: Device (SBUS) {...} which is required for Power Management. // Use 5 to inject: P/C-State definition blocks plus the former (Device SBUS). // Use 7 to inject: All of the above. - // + // // Notes: Device SBUS can only be injected when it isn't part of other ACPI tables! // This feature should only be used once, to extract the SSDT_PR from ioreg // and use it as STATIC_SSDT_PR_TABLE_DATA in RevoBoot/i386/config/ACPI/data.h @@ -153,16 +161,16 @@ // // Note: AICPUPM wants a P-State for each 100 MHz bank or it will fail (see note below). -#define DROP_FACTORY_SSDT_TABLES 1 // Set to 1 by default (this setting is required). + #define DROP_FACTORY_SSDT_TABLES 1 // Set to 1 by default (this setting is required). // // Note: Do not change this setting (must drop SSDT tables). -#define NUMBER_OF_TURBO_STATES 4 // Set to 4 by default. + #define NUMBER_OF_TURBO_STATES 4 // Set to 4 by default. // // Note: Make sure to add a full range, one P-State for each 100 MHz when OC'ing // or AICPIPM will fail with: "P-State Stepper Error 18 at step N on CPU N" -#define OVERRIDE_ACPI_METHODS 0 // Set to 0 by default (do nothing). + #define OVERRIDE_ACPI_METHODS 0 // Set to 0 by default (do nothing). // Use 1 to override Method _PTS in a static SSDT or Extra/ACPI/SSDT.aml // Use 2 to override Method _WAK in a static SSDT or Extra/ACPI/SSDT.aml // Use 3 to override both _PTS and _WAK. @@ -181,7 +189,7 @@ #define APPLE_STYLE_ACPI 0 // Set to 0 by default. Use 1 to change the OEMID's to Mac likes. // - // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1 and keep in mind that this can + // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1 and keep in mind that this can // only change the headers of injected/replaced tables. Not the factory tables. @@ -191,142 +199,143 @@ //--------------------------------------------------------------- BOOT.C ------------------------------------------------------------------- -#define PRE_LINKED_KERNEL_SUPPORT 1 // Set to 1 by default. Change this to 0 to disable the use of pre-linked kernels. +#define PRE_LINKED_KERNEL_SUPPORT 1 // Set to 1 by default. Change this to 0 to disable the use of pre-linked kernels. -#define MUST_ENABLE_A20 0 // Set to 0 by default. Change this to 1 when your hardware requires it. +#define MUST_ENABLE_A20 0 // Set to 0 by default. Change this to 1 when your hardware requires it. -#define SAFE_MALLOC 0 // Set to 0 by default. Change this to 1 when booting halts with a memory allocation error. +#define SAFE_MALLOC 0 // Set to 0 by default. Change this to 1 when booting halts with a memory allocation error. -#define LION_RECOVERY_SUPPORT 0 // Set to 0 by default. Change this to 1 to make RevoBoot search for the 'Recovery HD' - // partition and, when available, boot from it. +#define LION_RECOVERY_SUPPORT 0 // Set to 0 by default. Change this to 1 to make RevoBoot search for the 'Recovery HD' + // partition and, when available, boot from it. -#define DEBUG_BOOT 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. +#define DEBUG_BOOT 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. //---------------------------------------------------------------- CPU.C ------------------------------------------------------------------- -#define USE_STATIC_CPU_DATA 1 // Set to 0 by default (dynamic data collection). Change this to 1 to use static data. +#define USE_STATIC_CPU_DATA 0 // Set to 0 by default (dynamic data collection). Change this to 1 to use static data. -#define CPU_VENDOR_ID CPU_VENDOR_INTEL // CPU_VENDOR_AMD is not supported. +#define CPU_VENDOR_ID CPU_VENDOR_INTEL // CPU_VENDOR_AMD is not supported. -#define INTEL_CORE_TECHNOLOGY 1 // Set to 1 by default. Use 0 for older non Intel Core CPU's (removes unused code). - // - // Warning: Do not use 0 on Core Technology CPU's or sysctl's machdep.tsc.frequency will be - // initialized with the wrong value (various things, like the spinner will go mad). +#define INTEL_CORE_TECHNOLOGY 1 // Set to 1 by default. Use 0 for older non Intel Core CPU's (removes unused code). + // + // Warning: Do not use 0 on Core Technology CPU's or sysctl's machdep.tsc.frequency will be + // initialized with the wrong value (various things, like the spinner will go mad). -#define OC_BUSRATIO_CORRECTION 0 // Set to 0 by default. Change this to busratio-100 (OC'ed systems with a changed busratio). +#define OC_BUSRATIO_CORRECTION 0 // Set to 0 by default. Change this to busratio-100 (OC'ed systems with a changed busratio). -#define BOOT_TURBO_RATIO 0 // Set to 0 by default. Change this to the desired (and supported) max turbo multiplier. - // - // Example: 0x2800 for 4.0 GHz on a i7-2600. +#define BOOT_TURBO_RATIO 0 // Set to 0 by default. Change this to the desired (and supported) max turbo multiplier. + // + // Example: 0x2800 for 4.0 GHz on a i7-2600. -#define DEBUG_CPU 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. - // Note: CPU info data will not be displayed when USE_STATIC_CPU_DATA is set to 1 +#define DEBUG_CPU 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. + // Note: CPU info data will not be displayed when USE_STATIC_CPU_DATA is set to 1 #if DEBUG_CPU - #define DEBUG_CPU_TURBO_RATIOS 0 // Set to 0 by default. Change this to 1 when you want to check the core ratio. + #define DEBUG_CPU_TURBO_RATIOS 0 // Set to 0 by default. Change this to 1 when you want to check the core ratio. - #define DEBUG_CST_SUPPORT 0 // Set to 0 by default. Change this to 1 to check the in BIOS enabled C-States. + #define DEBUG_CST_SUPPORT 0 // Set to 0 by default. Change this to 1 to check the in BIOS enabled C-States. - #define DEBUG_TSS_SUPPORT 0 // Set to 0 by default. Change this to 1 to check the T-State Clock Modulation. + #define DEBUG_TSS_SUPPORT 0 // Set to 0 by default. Change this to 1 to check the T-State Clock Modulation. - #define DEBUG_CPU_TDP 0 // Set to 0 by default. Change this to 1 when you want to check the TDP. + #define DEBUG_CPU_TDP 0 // Set to 0 by default. Change this to 1 when you want to check the TDP. #endif //---------------------------------------------------------- CPU/STATIC_DATA.C ------------------------------------------------------------- #if USE_STATIC_CPU_DATA - #define STATIC_CPU_Type 0x602 // kSMBTypeOemProcessorType - used in: libsaio/SMBIOS/dynamic_data.h + #define STATIC_CPU_Type 0x602 // kSMBTypeOemProcessorType - used in: libsaio/SMBIOS/dynamic_data.h - #define STATIC_CPU_NumThreads 4 // Used in: i386/libsaio/ACPI/ssdt_pr_generator.h + #define STATIC_CPU_NumThreads 4 // Used in: i386/libsaio/ACPI/ssdt_pr_generator.h - #define STATIC_CPU_FSBFrequency 100000000ULL // 9 digits + ULL - used in: RevoBoot/i386/libsaio/efi.c + #define STATIC_CPU_FSBFrequency 100000000ULL // 9 digits + ULL - used in: i386/libsaio/efi.c - #define STATIC_CPU_QPISpeed 0 // kSMBTypeOemProcessorBusSpeed (0 for Sandy Bridge / Jaketown). + #define STATIC_CPU_QPISpeed 0 // kSMBTypeOemProcessorBusSpeed (0 for Sandy Bridge / Jaketown). #endif -#define STATIC_CPU_NumCores 4 // Set to 4 by default. Must be set to the number of cores for your processor! - // - // Note: Used in i386/libsaio/ACPI/ssdt_pr_generator.h, cpu.c and platform.c - // for both static and dynamic CPU data. +#define STATIC_CPU_NumCores 4 // Set to 4 by default. Must be set to the number of cores for your processor! + // + // Note: Used in i386/libsaio/ACPI/ssdt_pr_generator.h, cpu.c and platform.c + // for both static and dynamic CPU data. //--------------------------------------------------------------- DISK.C ------------------------------------------------------------------- -#define EFI_SYSTEM_PARTITION_SUPPORT 0 // Set to 0 by default. Set this to 1 when your system boots from the hidden EFI partition. +#define EFI_SYSTEM_PARTITION_SUPPORT 0 // Set to 0 by default. Set this to 1 when your system boots from the hidden EFI partition. -#define LEGACY_BIOS_READ_SUPPORT 0 // Set to 0 by default. Change this to 1 for crappy old BIOSes. +#define LEGACY_BIOS_READ_SUPPORT 0 // Set to 0 by default. Change this to 1 for crappy old BIOSes. #if LION_RECOVERY_SUPPORT - #define CORE_STORAGE_SUPPORT 1 // Set to 0 by default since booting from a 'Recovery HD' partition may requires us to skip - // (encrypted) CoreStorage partitions. + #define CORE_STORAGE_SUPPORT 1 // Set to 1 by default since booting from a 'Recovery HD' partition may requires us to skip + // (encrypted) CoreStorage partitions. #else - #define CORE_STORAGE_SUPPORT 0 // Set to 0 by default. Change this to 1 when you want RevoBoot to boot from the 'Boot OS X' - // (usually the third) partition on a Fusion Drive (requires Mountain Lion 10.8.2). + #define CORE_STORAGE_SUPPORT 0 // Set to 0 by default. Change this to 1 when you want RevoBoot to boot from the 'Boot OS X' + // (usually the third) partition on a Fusion Drive (requires Mountain Lion 10.8.2). #endif -#define APPLE_RAID_SUPPORT 0 // Set to 0 by default. Change this to 1 for Apple Software RAID support. +#define APPLE_RAID_SUPPORT 0 // Set to 0 by default. Change this to 1 for Apple Software RAID support. -#define DEBUG_DISK 0 // Set to 0 by default. Change it to 1 when things don't seem to work for you. +#define DEBUG_DISK 0 // Set to 0 by default. Change it to 1 when things don't seem to work for you. //------------------------------------------------------------- DRIVERS.C ------------------------------------------------------------------- -#define DEBUG_DRIVERS 0 // Set to 0 by default. Change it to 1 when things don't seem to work for you. +#define DEBUG_DRIVERS 0 // Set to 0 by default. Change it to 1 when things don't seem to work for you. //---------------------------------------------------------------- EFI.C ------------------------------------------------------------------- -#define APPLE_STYLE_EFI 1 // Set to 1 by default. Change this to 1 to add additional 'Mac-like' properties. +#define APPLE_STYLE_EFI 1 // Set to 1 by default. Change this to 1 to add additional 'Mac-like' properties. + +#define INJECT_EFI_DEVICE_PROPERTIES 0 // Set to 0 by default. Change this to 1 when you need to inject 'device-properties'. + // + // Note: Required when not setting device-properties from your DSDT/SSDT. -#define INJECT_EFI_DEVICE_PROPERTIES 0 // Set to 0 by default. Change this to 1 when you need to inject 'device-properties'. - // - // Note: Required when not setting device-properties from your DSDT/SSDT. #if INJECT_EFI_DEVICE_PROPERTIES - #define LOAD_STATIC_EFI_DATA_FROM_EXTRA 0 // Set to 0 by default. Change this to 1 to load: /Extra/EFI/[MacModelNN].bin + #define LOAD_MODEL_SPECIFIC_EFI_DATA 0 // Set to 0 by default. Use 1 to read: /Extra/EFI/[-MacModelNN].bin #endif -#define EFI_64_BIT 1 // Set to 1 by default for EFI64 on 64-bit platforms. Supporting both - // 32 and 64-bit boot modes (using arch=i386/x86_64 under Kernel Flags). - // - // Change this to 0 for 32-bit only platforms (think Intel Atom CPU) - // or when you want to boot with EFI32 (for testing) on a 64-bit - // platform, but then you must make a small change in platform.c (see comment in file). - // - // Note: Do not change this setting, unless you know what you are doing. +#define EFI_64_BIT 1 // Set to 1 by default for EFI64 on 64-bit platforms. Supporting both + // 32 and 64-bit boot modes (using arch=i386/x86_64 under Kernel Flags). + // + // Change this to 0 for 32-bit only platforms (think Intel Atom CPU) + // or when you want to boot with EFI32 (for testing) on a 64-bit + // platform, but then you must make a small change in platform.c (see comment in file). + // + // Note: Do not change this setting, unless you know what you are doing. -#define EFI_SYSTEM_SERIAL_NUMBER { 'S', 'O', 'M', 'E', 'S', 'R', 'L', 'N', 'U', 'M', 'B', 'R' } // Example only! +#define EFI_SYSTEM_SERIAL_NUMBER { 'S', 'O', 'M', 'E', 'S', 'R', 'L', 'N', 'U', 'M', 'B', 'R' } -#define STATIC_SYSTEM_ID { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F } // Example only! +#define STATIC_SYSTEM_ID { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F } // Example only! -#define DEBUG_EFI 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. +#define DEBUG_EFI 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. -#define EFI_DEBUG_MODE 0 // Set to 0 by default (for OS X 10.7 LION only). +#define EFI_DEBUG_MODE 0 // Set to 0 by default (for OS X 10.7 LION and greater). //------------------------------------------------------------- GRAPHICS.C ----------------------------------------------------------------- -#define USE_STATIC_DISPLAY_RESOLUTION 1 // Set to 0 by default. Use 1 when you need to override the resolution detection features - // in RevoBoot, which may not be supported by your BIOS and/or display (monitor). +#define USE_STATIC_DISPLAY_RESOLUTION 1 // Set to 0 by default. Use 1 when you need to override the resolution detection features + // in RevoBoot, which may not be supported by your BIOS and/or display (monitor). -#define STATIC_SCREEN_WIDTH 1900 // Used (in RevoBoot v1.0.35 and greater) when USE_STATIC_DISPLAY_RESOLUTION is 1 and when - // USE_STATIC_DISPLAY_RESOLUTION is 0 but getResolutionFromEDID() isn't supported (failed). +#define STATIC_SCREEN_WIDTH 1900 // Used (in RevoBoot v1.0.35 and greater) when USE_STATIC_DISPLAY_RESOLUTION is 1 and when + // USE_STATIC_DISPLAY_RESOLUTION is 0 but getResolutionFromEDID() isn't supported (failed). -#define STATIC_SCREEN_HEIGHT 1200 // Used (in RevoBoot v1.0.35 and greater) when USE_STATIC_DISPLAY_RESOLUTION is 1 and when - // USE_STATIC_DISPLAY_RESOLUTION is 0 but getResolutionFromEDID() isn't supported (failed). +#define STATIC_SCREEN_HEIGHT 1200 // Used (in RevoBoot v1.0.35 and greater) when USE_STATIC_DISPLAY_RESOLUTION is 1 and when + // USE_STATIC_DISPLAY_RESOLUTION is 0 but getResolutionFromEDID() isn't supported (failed). -#define DEBUG_BOOT_GRAPHICS 0 // Set to 0 by default. Use 1 when to see debug info. +#define DEBUG_BOOT_GRAPHICS 0 // Set to 0 by default. Use 1 when to see debug info. //------------------------------------------------------------ STRINGTABLE.H ---------------------------------------------------------------- -#define LION_INSTALL_SUPPORT 0 // Set to 0 by default. Setting this to 1 will make RevoBoot search in specific directories - // for com.apple.Boot.plist – required for Mac like Lion OS X installations. - +#define LION_INSTALL_SUPPORT 0 // Set to 0 by default. Setting this to 1 will make RevoBoot search in specific directories + // for com.apple.Boot.plist – required for Mac like Lion OS X installations. + //-------------------------------------------------------------- SMBIOS.C ------------------------------------------------------------------ @@ -337,7 +346,7 @@ #endif #if USE_STATIC_SMBIOS_DATA - #define LOAD_STATIC_SMBIOS_DATA_FROM_EXTRA 0 // Set to 0 by default. Change this to 1 to load: /Extra/SMBIOS/[MacModelNN].bin + #define LOAD_MODEL_SPECIFIC_SMBIOS_DATA 0 // Set to 0 by default. Change this to 1 to load: /Extra/SMBIOS/[MacModelNN].bin #endif #define OVERRIDE_DYNAMIC_MEMORY_DETECTION 0 // Set to 0 by default. Change this to 0 only when your SMBIOS data (type 17) is correct, or when @@ -346,22 +355,23 @@ // Note: Defaults to n MB 1066 DDR3 when set to 0 (to prevent errors in Profile Manager). -#define TARGET_MODEL MACMINI // Set to MACMINI by default. Supported models are: - // - // IMAC and IMAC_131, IMAC_122, IMAC_111, IMAC_121 - // MACBOOK and MACBOOK_41 - // MACBOOKAIR and MACBOOKAIR_42, MACBOOKAIR_41 - // MACBOOKPRO and MACBOOKPRO_101, MACBOOKPRO_91, MACBOOKPRO_83, MACBOOKPRO_82, - // MACBOOKPRO_81, MACBOOKPRO_61 - // MACMINI and MACMINI_53, MACMINI_52, MACMINI_51 - // MACPRO and MACPRO_51, MACPRO_41, MACPRO_31 - // - // Note: MACMINI (without _NNN) selects the default model (last one i.e. MACMINI_51). +#define TARGET_MODEL MACMINI // Set to MACMINI by default. Supported models are: + // + // IMAC and IMAC_131, IMAC_122, IMAC_111, IMAC_121 + // MACBOOK and MACBOOK_41 + // MACBOOKAIR and MACBOOKAIR_42, MACBOOKAIR_41 + // MACBOOKPRO and MACBOOKPRO_101, MACBOOKPRO_91, MACBOOKPRO_83, MACBOOKPRO_82, + // MACBOOKPRO_81, MACBOOKPRO_61 + // MACMINI and MACMINI_53, MACMINI_52, MACMINI_51 + // MACPRO and MACPRO_51, MACPRO_41, MACPRO_31 + // + // Note: MACMINI (without _NNN) selects the default model (last one i.e. MACMINI_51). #define SMB_SYSTEM_SERIAL_NUMBER "SOMESRLNUMBR" // Example only! - // Note: Match this with EFI_SYSTEM_SERIAL_NUMBER -#define SMB_BOARD_SERIAL_NUMBER "SOMESRLNUMBR" // Example only! +#if (TARGET_MODEL & MACPRO) + #define SMB_BOARD_SERIAL_NUMBER "SOMESRLNUMBR" // Example only! +#endif #define DEBUG_SMBIOS 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. @@ -370,7 +380,7 @@ #if USE_STATIC_SMBIOS_DATA - // Do nothing. + // Do nothing. #elif OVERRIDE_DYNAMIC_MEMORY_DETECTION // Setup RAM module info. Please note that you may have to expand this when you have more RAM modules. #define STATIC_RAM_SLOTS 4 // Number of RAM slots on mainboard. @@ -382,20 +392,20 @@ #define DYNAMIC_RAM_OVERRIDE_SIZE 0 // Set to 0 by default. Change this to 1 when you want to use override values (see below). #if DYNAMIC_RAM_OVERRIDE_SIZE - #define DYNAMIC_RAM_OVERRIDE_SIZES { SMB_MEM_SIZE_2GB, SMB_MEM_BANK_EMPTY, SMB_MEM_SIZE_2GB, SMB_MEM_BANK_EMPTY, 0 } // See libsaio/platform.h for other values. + #define DYNAMIC_RAM_OVERRIDE_SIZES { SMB_MEM_SIZE_2GB, SMB_MEM_BANK_EMPTY, SMB_MEM_SIZE_2GB, SMB_MEM_BANK_EMPTY, 0 } // See libsaio/platform.h for other values. #endif #define DYNAMIC_RAM_OVERRIDE_FREQUENCY 0 // Set to 0 by default. Change this to the frequency that you want to use as override value. - #define STATIC_RAM_PART_NUMBERS { "PartNum#0", "N/A", "PartNum#2", "N/A", 0 } // Use "N/A" for empty RAM banks. + #define STATIC_RAM_PART_NUMBERS { "PartNum#0", "N/A", "PartNum#1", "N/A", 0 } // Use "N/A" for empty RAM banks. - #define STATIC_RAM_SERIAL_NUMBERS { "Serial#0", "N/A", "Serial#2", "N/A", 0 } // Use "N/A" for empty RAM banks. + #define STATIC_RAM_SERIAL_NUMBERS { "Serial#0", "N/A", "Serial#2", "N/A", 0 } // Use "N/A" for empty RAM banks. #endif #define INCLUDE_MPS_TABLE 0 // Set to 0 by default. Change this to 1 when you want to include the MP table. -#define DEBUG_PLATFORM 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. +#define LOAD_MODEL_SPECIFIC_STATIC_DATA (LOAD_MODEL_SPECIFIC_ACPI_DATA || LOAD_MODEL_SPECIFIC_EFI_DATA || LOAD_MODEL_SPECIFIC_SMBIOS_DATA) +#define DEBUG_PLATFORM 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. //================================================================= END ==================================================================== - From 0fa8bfae4bf33d5e3cc1c179bdcf23c361038803 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 19:33:03 +0100 Subject: [PATCH 103/623] Patch for RevoBoot v1.5.34 --- i386/config/settings.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/i386/config/settings.h b/i386/config/settings.h index ad4fcb4..09da11a 100644 --- a/i386/config/settings.h +++ b/i386/config/settings.h @@ -3,10 +3,17 @@ * * Updates: * - * - Read settings file based on given model identifier (PikerAlpha, October 2012). + * - Read settings file based on given model identifier (PikerAlpha, October 2012). + * - COMMA_STRIPPED_MODEL_ID added (PikerAlpha, November 2012). */ -#define TO_STRING_DO(a) #a -#define STRING(a) TO_STRING_DO(a) +#define TO_STRING_DO(a) #a +#define STRING(a) TO_STRING_DO(a) #include STRING(SETTINGS_FILE) + +/* + * gPlatform.ModelID is a char * initialized by a call to strdup(SMB_PRODUCT_NAME) in + * platform.c and we use strdup once more here so that gPlatform.ModelID is untouched. + */ +#define COMMA_STRIPPED_MODEL_ID removeChar(strdup(gPlatform.ModelID), ',') From b42ff7d63c6eb053e78819cf140172047d4d30c9 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 19:35:54 +0100 Subject: [PATCH 104/623] Patch for RevoBoot v1.5.34 --- i386/libsaio/smbios.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/i386/libsaio/smbios.c b/i386/libsaio/smbios.c index 267a0c6..eb8507a 100755 --- a/i386/libsaio/smbios.c +++ b/i386/libsaio/smbios.c @@ -13,7 +13,6 @@ #if USE_STATIC_SMBIOS_DATA -#if LOAD_MODEL_SPECIFIC_SMBIOS_DATA //============================================================================== int useStaticSMBIOSData(void * aMemoryAddress) @@ -36,7 +35,7 @@ int useStaticSMBIOSData(void * aMemoryAddress) return tableLength; } -#endif /* #if INJECT_EFI_DEVICE_PROPERTIES */ + //============================================================================== From 27d81d300c035ea8a40ceb35d929dc8b7bea8e2f Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 22:46:29 +0100 Subject: [PATCH 105/623] Updating version info for RevoBoot v1.5.34 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index a26e0a8..e201dd3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.33 +1.5.34 From 344e6e25ebe2cfa6f484f76426f32fcee3cde6bc Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 23:05:26 +0100 Subject: [PATCH 106/623] Update to RevoBoot v1.5.34 --- CHANGES | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGES b/CHANGES index 008d1cf..3eab64a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,17 @@ +RevoBoot v1.5.34 +================ +- LOAD_STATIC_EFI_DATA_FROM_EXTRA in settings-template.h renamed to LOAD_MODEL_SPECIFIC_EFI_DATA (PikerAlpha, October 2012). +- LOAD_STATIC_SMBIOS_DATA_FROM_EXTRA in settings-template.h renamed to LOAD_MODEL_SPECIFIC_SMBIOS_DATA (PikerAlpha, October 2012). +- New LOAD_MODEL_SPECIFIC_ACPI_DATA setting in settings-template.h (PikerAlpha, October 2012). +- New LOAD_MODEL_SPECIFIC_STATIC_DATA setting in settings-template.h (PikerAlpha, October 2012). + +Notes: + +Static EFI/SMBIOS data will be used when RevoBoot can't find model specific data: /Extra/[EFI/SMBIOS]/MacModelNN.bin +DSDT.aml will be loaded when RevoBoot can't find: /Extra/ACPI/DSDT-MacModelNN.aml (example). +You must use the latest version of RevoBoot/i386/config/settings-template.h or things won't work. + + RevoBoot v1.5.33 ================ - Restored lost lines in RevoBoot/i386/libsaio/SMBIOS/static_data.h (PikerAlpha, November 2012). From 5975a026b0f54ca7579590d23f319f4172ba8ac7 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 23:05:53 +0100 Subject: [PATCH 107/623] Fix version number --- i386/config/settings-template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 8f553c8..65cbbbc 100644 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -1,7 +1,7 @@ /* * Copyright (c) 2009 Master Chief. All rights reserved. * - * Note: This is an essential part of the build process for RevoBoot v1.5.32 and greater. + * Note: This is an essential part of the build process for RevoBoot v1.5.34 and greater. * * Updates: * From 187236880cdb39fb8926973da0b89267fce020b2 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 3 Nov 2012 23:22:58 +0100 Subject: [PATCH 108/623] Typo, note about NetBoot/NetInstall and cleanups --- README | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README b/README index 9da40cd..f0a28a3 100644 --- a/README +++ b/README @@ -1,12 +1,15 @@ About this project: +------------------- This Open Source hobby project is maintained by Pike and dgsga. Two long time supporters of the RevoBoot project. Note that we do not tolerate/share any (links to) copyrighted material. We only use purchased software and we won't share any of it. Just get your copy of OS X in the Apple store. Should be affordable for everyone. Mountain Lion Server: +--------------------- RevoBoot has been confirmed to work with the Server app for Mountain Lion (12C60). Fusion Drive Support: +--------------------- Apple's new Fusion Drive* is a software implementation to speedup the boot and load process for frequently used applications, without limiting the storage capacity in a bad way. See also: http://support.apple.com/kb/HT5446 The new Mac's that come with a Fusion Drive boot from the third (Recovery HD like) partition on the SSD. This partition is 134.2 MB in size and is called "Boot OS X". @@ -14,11 +17,19 @@ The Recovery HD partition can be found as third partition on the HDD. Setting up RevoBoot detects CoreStorage partitions and will boot from the boot helper partition on the SDD. +NetBoot/NetInstall: +------------------- +People who have Mountain Lion Server setup and like to install their hack from it... sorry that won't work. The source +code snippets for it have been stripped out (by Master Chief in 2009) but we will fix this in a next update of RevoBoot. + Xcode Support for Mountain Lion: -RevoBoot can be build on Snow Leopard, Lion and Mountain Lion. The latter requires Xcode 4.5.1 and a libcc_kext.a from an older version of Xcode. See change log for instructions. +-------------------------------- +RevoBoot can be built on Snow Leopard, Lion and Mountain Lion. The latter requires Xcode 4.5.1 (and greater) and libcc_kext.a from an older version of Xcode. See change log for instructions. +Note: The latest release of Xcode (4.5.2) also works with fine with an older copy libcc_kext.a. Configuration: +-------------- Please note that RevoBoot must be configured for your hardware so start reading our WiKi. See also: https://github.com/blackosx/RevoBuilder/wiki/Using-RevoBuilder From ddaeb064be69154d71fd86a3457f74fa5c082561 Mon Sep 17 00:00:00 2001 From: Pike Date: Mon, 5 Nov 2012 20:00:24 +0100 Subject: [PATCH 109/623] Cleanups for RevoBoot v1.5.35 --- i386/libsaio/allocate.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/i386/libsaio/allocate.c b/i386/libsaio/allocate.c index f986219..fdd5849 100755 --- a/i386/libsaio/allocate.c +++ b/i386/libsaio/allocate.c @@ -36,10 +36,7 @@ long AllocateMemoryRange(char * rangeName, long start, long length, long type) { - char *nameBuf; - uint32_t *buffer; - - nameBuf = malloc(strlen(rangeName) + 1); + char *nameBuf = malloc(strlen(rangeName) + 1); if (nameBuf == 0) { @@ -48,10 +45,12 @@ long AllocateMemoryRange(char * rangeName, long start, long length, long type) strcpy(nameBuf, rangeName); - buffer = malloc(2 * sizeof(uint32_t)); + uint32_t *buffer = malloc(2 * sizeof(uint32_t)); if (buffer == 0) { + free(nameBuf); + return -1; } From b7e97101d56ad8f2b81e320009fdd8f4d4121a20 Mon Sep 17 00:00:00 2001 From: Pike Date: Mon, 5 Nov 2012 20:01:04 +0100 Subject: [PATCH 110/623] Cleanups for RevoBoot v1.5.35 --- i386/libsaio/bios.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/bios.h b/i386/libsaio/bios.h index 0a0c927..7391450 100755 --- a/i386/libsaio/bios.h +++ b/i386/libsaio/bios.h @@ -32,7 +32,7 @@ typedef union { - unsigned int rx; + unsigned int rx; unsigned short rr; struct @@ -87,13 +87,13 @@ typedef struct #define EBIOS_LOCKING_ACCESS 0x02 #define EBIOS_ENHANCED_DRIVE_INFO 0x04 -#define BASE_HD_DRIVE 0x80 +#define BASE_HD_DRIVE 0x80 /* * Used in saio_types.h and in StringTable.c (function loadSystemConfig). */ -#define IO_CONFIG_DATA_SIZE 4096 +#define IO_CONFIG_DATA_SIZE 4096 /* From 585650095e8c66ba2f11ec4671da6bf09cdc85ea Mon Sep 17 00:00:00 2001 From: Pike Date: Mon, 5 Nov 2012 20:01:37 +0100 Subject: [PATCH 111/623] Cleanups for RevoBoot v1.5.35 --- i386/libsaio/biosfn.c | 82 ++++++++++++++++++++++++++----------------- 1 file changed, 50 insertions(+), 32 deletions(-) diff --git a/i386/libsaio/biosfn.c b/i386/libsaio/biosfn.c index 32a5c82..61f09c5 100755 --- a/i386/libsaio/biosfn.c +++ b/i386/libsaio/biosfn.c @@ -51,8 +51,8 @@ static biosBuf_t bb; int fastEnableA20(void) { - bb.intno = 0x15; - bb.eax.rx = 0x2401; + bb.intno = 0x15; + bb.eax.rx = 0x2401; bios(&bb); // If successful: CF clear, AH = 00h. On error: CF set, AH = status @@ -72,8 +72,8 @@ int bgetc(void) */ while(!readKeyboardStatus()); - bb.intno = 0x16; - bb.eax.r.h = 0x00; + bb.intno = 0x16; + bb.eax.r.h = 0x00; bios(&bb); return bb.eax.rr; @@ -150,7 +150,9 @@ unsigned long getMemoryMap(MemoryRange * rangeArray, unsigned long maxRangeCount // printf("Get memory map 0x%x, %d\n", rangeArray); // getchar(); if (maxRangeCount > (BIOS_LEN / sizeof(MemoryRange))) + { maxRangeCount = (BIOS_LEN / sizeof(MemoryRange)); + } bb.ebx.rx = 0; // Initial continuation value must be zero. @@ -160,14 +162,13 @@ unsigned long getMemoryMap(MemoryRange * rangeArray, unsigned long maxRangeCount bb.eax.rx = 0xe820; bb.ecx.rx = kDescriptorSizeMin; bb.edx.rx = kMemoryMapSignature; - bb.edi.rr = NORMALIZED_OFFSET( (unsigned long) range ); - bb.es = NORMALIZED_SEGMENT( (unsigned long) range ); + bb.edi.rr = NORMALIZED_OFFSET( (unsigned long) range); + bb.es = NORMALIZED_SEGMENT( (unsigned long) range); bios(&bb); // Check for errors. - if ( bb.flags.cf || bb.eax.rx != kMemoryMapSignature - || bb.ecx.rx != kDescriptorSizeMin ) + if (bb.flags.cf || bb.eax.rx != kMemoryMapSignature || bb.ecx.rx != kDescriptorSizeMin) { //printf("Got an error %x %x %x\n", bb.flags.cf, // bb.eax.rx, bb.ecx.rx); @@ -176,16 +177,19 @@ unsigned long getMemoryMap(MemoryRange * rangeArray, unsigned long maxRangeCount // Tally up the conventional/extended memory sizes. - if (range->type == kMemoryRangeUsable || range->type == kMemoryRangeACPI || - range->type == kMemoryRangeNVS ) + if (range->type == kMemoryRangeUsable || range->type == kMemoryRangeACPI || range->type == kMemoryRangeNVS) { // Tally the conventional memory ranges. if (range->base + range->length <= 0xa0000) + { conMemSize += range->length; + } // Record the top of extended memory. if (range->base >= EXTENDED_ADDR) + { extMemSize += range->length; + } } range++; @@ -193,13 +197,15 @@ unsigned long getMemoryMap(MemoryRange * rangeArray, unsigned long maxRangeCount // Is this the last address range? - if ( bb.ebx.rx == 0 ) { + if (bb.ebx.rx == 0) + { //printf("last range\n"); break; } } - *conMemSizePtr = conMemSize / 1024; // size in KB - *extMemSizePtr = extMemSize / 1024; // size in KB + + *conMemSizePtr = (conMemSize / 1024); // size in KB + *extMemSizePtr = (extMemSize / 1024); // size in KB // Copy out data bcopy((char *)BIOS_ADDR, rangeArray, ((char *)range - (char *)BIOS_ADDR)); @@ -339,7 +345,7 @@ int biosread(int dev, int cyl, int head, int sec, int num) bb.intno = 0x13; sec += 1; // sector numbers start at 1. - for (i=0;;) + for (i = 0; ;) { bb.ecx.r.h = cyl; bb.ecx.r.l = ((cyl & 0x300) >> 2) | (sec & 0x3F); @@ -430,11 +436,11 @@ int ebiosread(int dev, unsigned long long sec, int count) void putc(int ch) { - bb.intno = 0x10; - bb.ebx.r.h = 0x00; /* background black */ - bb.ebx.r.l = 0x0F; /* foreground white */ - bb.eax.r.h = 0x0e; - bb.eax.r.l = ch; + bb.intno = 0x10; + bb.ebx.r.h = 0x00; /* background black */ + bb.ebx.r.l = 0x0F; /* foreground white */ + bb.eax.r.h = 0x0e; + bb.eax.r.l = ch; bios(&bb); } @@ -516,9 +522,10 @@ int is_no_emulation(int drive) int get_drive_info(int drive, struct driveInfo *dp) { - boot_drive_info_t *di = &dp->di; int ret = 0; + boot_drive_info_t *di = &dp->di; + #if UNUSED if (maxhd == 0) { @@ -528,11 +535,15 @@ int get_drive_info(int drive, struct driveInfo *dp) bios(&bb); if (bb.flags.cf == 0) + { maxhd = 0x7f + bb.edx.r.l; + } }; if (drive > maxhd) + { return 0; + } #endif bzero(dp, sizeof(struct driveInfo)); @@ -549,18 +560,21 @@ int get_drive_info(int drive, struct driveInfo *dp) bios(&bb); if ((bb.ebx.rr == 0xaa55) && (bb.flags.cf == 0)) + { dp->uses_ebios = bb.ecx.r.l; // Get flags for supported operations. + } if (dp->uses_ebios & (EBIOS_ENHANCED_DRIVE_INFO | EBIOS_LOCKING_ACCESS | EBIOS_FIXED_DISK_ACCESS)) { // Get EBIOS drive info. static struct drive_params params; params.buf_size = sizeof(params); - bb.intno = 0x13; - bb.eax.r.h = 0x48; - bb.edx.r.l = drive; - bb.esi.rr = NORMALIZED_OFFSET((unsigned)¶ms); - bb.ds = NORMALIZED_SEGMENT((unsigned)¶ms); + + bb.intno = 0x13; + bb.eax.r.h = 0x48; + bb.edx.r.l = drive; + bb.esi.rr = NORMALIZED_OFFSET((unsigned)¶ms); + bb.ds = NORMALIZED_SEGMENT((unsigned)¶ms); bios(&bb); if (bb.flags.cf != 0 /* || params.phys_sectors < 2097152 */) @@ -600,7 +614,9 @@ int get_drive_info(int drive, struct driveInfo *dp) #endif if (ret == 0) + { dp->valid = 1; + } return ret; } @@ -610,8 +626,11 @@ int get_drive_info(int drive, struct driveInfo *dp) void sleep(int n) { - unsigned int endtime = (time18() + 18*n); - while (time18() < endtime); + if (n < 60) + { + unsigned int endtime = (time18() + (18*n)); + while (time18() < endtime); + } } @@ -619,10 +638,9 @@ void sleep(int n) void delay(int ms) { - bb.intno = 0x15; - bb.eax.r.h = 0x86; - bb.ecx.rr = ms >> 16; - bb.edx.rr = ms & 0xFFFF; + bb.intno = 0x15; + bb.eax.r.h = 0x86; + bb.ecx.rr = ms >> 16; + bb.edx.rr = ms & 0xFFFF; bios(&bb); } - From e7ed8ffac7f26d3c0b9f82142d3c3e444711c6ef Mon Sep 17 00:00:00 2001 From: Pike Date: Mon, 5 Nov 2012 20:02:22 +0100 Subject: [PATCH 112/623] Cleanups for RevoBoot v1.5.35 --- i386/libsaio/efi.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index 77f7df7..4b35f18 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -253,9 +253,9 @@ void *convertHexStr2Binary(const char *hexStr, int *outLength) { int len; char hexNibble; - char hexByte[2]; + char hexByte[2] = ""; uint8_t binChar; - uint8_t *binStr; + uint8_t *binStr = NULL; int hexStrIdx, binStrIdx, hexNibbleIdx; len = strlen(hexStr); @@ -331,22 +331,31 @@ static EFI_UINT32* getUUIDFromString(const char * givenUUID) // Patch by: rekurs char szUUID[37]; // 0-35 (36) + 1 char *p = szUUID; - while (*givenUUID) { + while (*givenUUID) + { if (*givenUUID != '-') + { *p++ = *givenUUID++; + } else + { givenUUID++; + } } *p = '\0'; void* binaryString = convertHexStr2Binary(szUUID, &size); if (binaryString && size == 16) + { return (EFI_UINT32*) binaryString; + } verbose("%swrong format maybe?\n", errStr); } else + { verbose("%slength should be 36.\n", errStr); + } } return (EFI_UINT32*) 0; } From 896c00258686fbfb6bce2bf974ed04e8f48265ef Mon Sep 17 00:00:00 2001 From: Pike Date: Mon, 5 Nov 2012 20:03:02 +0100 Subject: [PATCH 113/623] Cleanups for RevoBoot v1.5.35 --- i386/libsaio/hfs_compare.c | 340 ++++++++++++++++++++++++------------- 1 file changed, 221 insertions(+), 119 deletions(-) diff --git a/i386/libsaio/hfs_compare.c b/i386/libsaio/hfs_compare.c index 405a571..8b86b60 100755 --- a/i386/libsaio/hfs_compare.c +++ b/i386/libsaio/hfs_compare.c @@ -31,45 +31,60 @@ #include "hfs_CaseTables.h" #if ! UNCOMPRESSED +//============================================================================== static unsigned short * UncompressStructure(struct compressed_block *bp, int count, int size) { - unsigned short *out = malloc(size); - unsigned short *op = out; - unsigned short data; - int i, j; - - for (i=0; icount) - { - stop("HFS+ Unicode tables are malformed\n"); - } - data = bp->data; - for (j=0; jcount; j++) { - *op++ = data; - if (bp->type == kTypeAscending) data++; - else if (bp->type == kTypeAscending256) data += 256; - } - } - return out; + int i, j; + + unsigned short *out = malloc(size); + unsigned short *op = out; + unsigned short data; + + for (i = 0; i < count; i++, bp++) + { + // If this happens (it shouldn't) please fix size and/or double check that count really is + // the number of elements in the array. + // This was a very hard bug to find, so please leave this code here. + if (out + size <= op + bp->count) + { + stop("HFS+ Unicode tables are malformed\n"); + } + + data = bp->data; + + for (j = 0; j count; j++) + { + *op++ = data; + + if (bp->type == kTypeAscending) + { + data++; + } + else if (bp->type == kTypeAscending256) + { + data += 256; + } + } + } + + return out; } + +//============================================================================== + static void InitCompareTables(void) { - if (gCompareTable == 0) { - gCompareTable = UncompressStructure(gCompareTableCompressed, - kCompareTableNBlocks, kCompareTableDataSize); - gLowerCaseTable = UncompressStructure(gLowerCaseTableCompressed, - kLowerCaseTableNBlocks, kLowerCaseTableDataSize); - } + if (gCompareTable == 0) + { + gCompareTable = UncompressStructure(gCompareTableCompressed, kCompareTableNBlocks, kCompareTableDataSize); + gLowerCaseTable = UncompressStructure(gLowerCaseTableCompressed, kLowerCaseTableNBlocks, kLowerCaseTableDataSize); + } } - #endif /* ! UNCOMPRESSED */ -//_______________________________________________________________________ +//============================================================================== // // Routine: FastRelString // @@ -77,7 +92,7 @@ static void InitCompareTables(void) // returns 1 if str1 > str2 // return 0 if equal // -//_______________________________________________________________________ +//============================================================================== int32_t FastRelString(u_int8_t * str1, u_int8_t * str2) { @@ -85,16 +100,20 @@ int32_t FastRelString(u_int8_t * str1, u_int8_t * str2) u_int8_t length, length2; #if ! UNCOMPRESED - InitCompareTables(); + InitCompareTables(); #endif length = *(str1++); length2 = *(str2++); if (length == length2) + { bestGuess = 0; + } else if (length < length2) + { bestGuess = -1; + } else { bestGuess = 1; @@ -116,12 +135,16 @@ int32_t FastRelString(u_int8_t * str1, u_int8_t * str2) bSortWord = gCompareTable[bChar]; if (aSortWord > bSortWord) + { return 1; + } if (aSortWord < bSortWord) + { return -1; + } } - + /* * If characters match exactly, then go on to next character * immediately without doing any extra work. @@ -133,6 +156,7 @@ int32_t FastRelString(u_int8_t * str1, u_int8_t * str2) } +//============================================================================== // // FastUnicodeCompare - Compare two Unicode strings; produce a relative ordering // @@ -190,91 +214,125 @@ int32_t FastRelString(u_int8_t * str1, u_int8_t * str2) // return 1; // -int32_t FastUnicodeCompare( u_int16_t * str1, register u_int32_t length1, - u_int16_t * str2, register u_int32_t length2, int byte_order ) +int32_t FastUnicodeCompare(u_int16_t * str1, register u_int32_t length1, + u_int16_t * str2, register u_int32_t length2, int byte_order) { - register u_int16_t c1,c2; + register u_int16_t c1, c2; register u_int16_t temp; #if ! UNCOMPRESSED - InitCompareTables(); + InitCompareTables(); #endif - while (1) { + while (1) + { /* Set default values for c1, c2 in case there are no more valid chars */ c1 = 0; c2 = 0; /* Find next non-ignorable char from str1, or zero if no more */ - while (length1 && c1 == 0) { + while (length1 && c1 == 0) + { if (byte_order == OSBigEndian) + { c1 = SWAP_BE16(*(str1++)); + } else + { c1 = SWAP_LE16(*(str1++)); + } + --length1; + if ((temp = gLowerCaseTable[c1>>8]) != 0) // is there a subtable for this upper byte? + { c1 = gLowerCaseTable[temp + (c1 & 0x00FF)]; // yes, so fold the char + } } /* Find next non-ignorable char from str2, or zero if no more */ - while (length2 && c2 == 0) { + while (length2 && c2 == 0) + { if (byte_order == OSBigEndian) + { c2 = SWAP_BE16(*(str2++)); + } else + { c2 = SWAP_LE16(*(str2++)); + } + --length2; + if ((temp = gLowerCaseTable[c2>>8]) != 0) // is there a subtable for this upper byte? + { c2 = gLowerCaseTable[temp + (c2 & 0x00FF)]; // yes, so fold the char + } } if (c1 != c2) /* found a difference, so stop looping */ + { break; + } if (c1 == 0) /* did we reach the end of both strings at the same time? */ + { return 0; /* yes, so strings are equal */ + } } if (c1 < c2) + { return -1; - else - return 1; + } + + return 1; } +//============================================================================== // // BinaryUnicodeCompare - Compare two Unicode strings; produce a relative ordering // Compared using a 16-bit binary comparison (no case folding) -// -int32_t BinaryUnicodeCompare (u_int16_t * str1, u_int32_t length1, - u_int16_t * str2, u_int32_t length2) + +int32_t BinaryUnicodeCompare(u_int16_t * str1, u_int32_t length1, u_int16_t * str2, u_int32_t length2) { - register u_int16_t c1, c2; - int32_t bestGuess; - u_int32_t length; - - bestGuess = 0; - - if (length1 < length2) { - length = length1; - --bestGuess; - } else if (length1 > length2) { - length = length2; - ++bestGuess; - } else { - length = length1; - } - - while (length--) { - c1 = *(str1++); - c2 = *(str2++); - - if (c1 > c2) - return (1); - if (c1 < c2) - return (-1); - } - - return (bestGuess); + register u_int16_t c1, c2; + int32_t bestGuess = 0; + u_int32_t length; + + if (length1 < length2) + { + length = length1; + --bestGuess; + } + else if (length1 > length2) + { + length = length2; + ++bestGuess; + } + else + { + length = length1; + } + + while (length--) + { + c1 = *(str1++); + c2 = *(str2++); + + if (c1 > c2) + { + return (1); + } + + if (c1 < c2) + { + return (-1); + } + } + + return (bestGuess); } @@ -304,36 +362,57 @@ int32_t BinaryUnicodeCompare (u_int16_t * str1, u_int32_t length1, * ucslen is the number of UCS-2 input characters (not bytes) * bufsize is the size of the output buffer in bytes */ -void utf_encodestr( const u_int16_t * ucsp, int ucslen, - u_int8_t * utf8p, u_int32_t bufsize, int byte_order ) + +void utf_encodestr(const u_int16_t * ucsp, int ucslen, u_int8_t * utf8p, u_int32_t bufsize, int byte_order) { u_int8_t *bufend; u_int16_t ucs_ch; bufend = utf8p + bufsize; - while (ucslen-- > 0) { - if (byte_order == OSBigEndian) - ucs_ch = SWAP_BE16(*ucsp++); - else - ucs_ch = SWAP_LE16(*ucsp++); + while (ucslen-- > 0) + { + if (byte_order == OSBigEndian) + { + ucs_ch = SWAP_BE16(*ucsp++); + } + else + { + ucs_ch = SWAP_LE16(*ucsp++); + } - if (ucs_ch < 0x0080) { + if (ucs_ch < 0x0080) + { if (utf8p >= bufend) + { break; + } + if (ucs_ch == '\0') + { continue; /* skip over embedded NULLs */ + } + *utf8p++ = ucs_ch; - } else if (ucs_ch < 0x800) { + } + else if (ucs_ch < 0x800) + { if ((utf8p + 1) >= bufend) + { break; + } + *utf8p++ = (ucs_ch >> 6) | 0xc0; *utf8p++ = (ucs_ch & 0x3f) | 0x80; - - } else { + } + else + { if ((utf8p + 2) >= bufend) + { break; + } + *utf8p++ = (ucs_ch >> 12) | 0xe0; *utf8p++ = ((ucs_ch >> 6) & 0x3f) | 0x80; *utf8p++ = ((ucs_ch) & 0x3f) | 0x80; @@ -351,6 +430,7 @@ void utf_encodestr( const u_int16_t * ucsp, int ucslen, * ucslen is the number of UCS-2 output characters (not bytes) * bufsize is the size of the output buffer in bytes */ + void utf_decodestr(const u_int8_t * utf8p, u_int16_t * ucsp, u_int16_t * ucslen, u_int32_t bufsize, int byte_order) { u_int16_t *bufstart; @@ -361,58 +441,80 @@ void utf_decodestr(const u_int8_t * utf8p, u_int16_t * ucsp, u_int16_t * ucslen, bufstart = ucsp; bufend = (u_int16_t *)((u_int8_t *)ucsp + bufsize); - while ((byte = *utf8p++) != '\0') { + while ((byte = *utf8p++) != '\0') + { if (ucsp >= bufend) + { break; + } /* check for ascii */ - if (byte < 0x80) { + if (byte < 0x80) + { ucs_ch = byte; - if (byte_order == OSBigEndian) - *ucsp++ = SWAP_BE16(ucs_ch); - else - *ucsp++ = SWAP_LE16(ucs_ch); - + if (byte_order == OSBigEndian) + { + *ucsp++ = SWAP_BE16(ucs_ch); + } + else + { + *ucsp++ = SWAP_LE16(ucs_ch); + } + continue; } - switch (byte & 0xf0) { - /* 2 byte sequence*/ - case 0xc0: - case 0xd0: - /* extract bits 6 - 10 from first byte */ - ucs_ch = (byte & 0x1F) << 6; - break; - /* 3 byte sequence*/ - case 0xe0: - /* extract bits 12 - 15 from first byte */ - ucs_ch = (byte & 0x0F) << 6; - - /* extract bits 6 - 11 from second byte */ - if (((byte = *utf8p++) & 0xc0) != 0x80) - goto stop; - - ucs_ch += (byte & 0x3F); - ucs_ch <<= 6; - break; - default: - goto stop; + switch (byte & 0xf0) + { + /* 2 byte sequence*/ + case 0xc0: + case 0xd0: /* extract bits 6 - 10 from first byte */ + ucs_ch = (byte & 0x1F) << 6; + break; + /* 3 byte sequence*/ + case 0xe0: + /* extract bits 12 - 15 from first byte */ + ucs_ch = (byte & 0x0F) << 6; + + /* extract bits 6 - 11 from second byte */ + if (((byte = *utf8p++) & 0xc0) != 0x80) + { + goto stop; + } + + ucs_ch += (byte & 0x3F); + ucs_ch <<= 6; + break; + default: + goto stop; } /* extract bits 0 - 5 from final byte */ if (((byte = *utf8p++) & 0xc0) != 0x80) + { goto stop; - ucs_ch += (byte & 0x3F); + } + + ucs_ch += (byte & 0x3F); - if (byte_order == OSBigEndian) - *ucsp++ = SWAP_BE16(ucs_ch); - else - *ucsp++ = SWAP_LE16(ucs_ch); + if (byte_order == OSBigEndian) + { + *ucsp++ = SWAP_BE16(ucs_ch); + } + else + { + *ucsp++ = SWAP_LE16(ucs_ch); + } } + stop: - if (byte_order == OSBigEndian) - *ucslen = SWAP_BE16(ucsp - bufstart); - else - *ucslen = SWAP_LE16(ucsp - bufstart); + if (byte_order == OSBigEndian) + { + *ucslen = SWAP_BE16(ucsp - bufstart); + } + else + { + *ucslen = SWAP_LE16(ucsp - bufstart); + } } From d2ae81d752ad1fb3d65675e2ce96a5ad7d3cb5f8 Mon Sep 17 00:00:00 2001 From: Pike Date: Mon, 5 Nov 2012 20:04:20 +0100 Subject: [PATCH 114/623] Feature enhancements for RevoBoot v1.5.35 --- i386/libsaio/smbios.c | 110 ++++++++++++++++++++++++++---------------- 1 file changed, 68 insertions(+), 42 deletions(-) diff --git a/i386/libsaio/smbios.c b/i386/libsaio/smbios.c index eb8507a..deb8ae0 100755 --- a/i386/libsaio/smbios.c +++ b/i386/libsaio/smbios.c @@ -6,37 +6,16 @@ * - Dynamic and static SMBIOS data gathering added by DHP in 2010. * - Refactorized by DHP in 2011. * - Get static EFI data (optional) from /Extra/EFI/[MacModelNN].bin (PikerAlpha, October 2012). + * - Set newEPS->dmi.tableLength to fileSize when model specific data is loaded (PikerAlpha, November 2012). + * - Get number of table structures from loaded model specific SMBIOS data (PikerAlpha, November 2012). + * - Set newEPS->maxStructureSize when SET_MAX_STRUCTURE_LENGTH is set (PikerAlpha, November 2012). + * - Check/correct errors in RevoBoot/i386/config/SMBIOS/[data-template/MacModelNN].h (PikerAlpha, November 2012). */ #include "platform.h" #if USE_STATIC_SMBIOS_DATA - -//============================================================================== - -int useStaticSMBIOSData(void * aMemoryAddress) -{ - // The STRING (macro) is defined in RevoBoot/i386/config/settings.h - #include STRING(SMBIOS_DATA_FILE) - - static uint32_t SMBIOS_Table[] = - { - // Replaced with data from: RevoBoot/i386/config/SMBIOS/[data-template/MacModelNN].h - STATIC_SMBIOS_DATA - }; - - _SMBIOS_DEBUG_DUMP("Using statically linked SMBIOS data\n"); - - int tableLength = sizeof(SMBIOS_Table); - - // Copy the static SMBIOS data into the newly allocated memory page. Right after the new EPS. - memcpy(aMemoryAddress, SMBIOS_Table, tableLength); - - return tableLength; -} - - //============================================================================== void setupSMBIOS(void) @@ -75,41 +54,88 @@ void setupSMBIOS(void) newEPS->dmi.anchor[3] = 0x49; // I newEPS->dmi.anchor[4] = 0x5f; // _ newEPS->dmi.checksum = 0; - newEPS->dmi.tableLength = tableLength; + newEPS->dmi.tableLength = tableLength; newEPS->dmi.tableAddress = (uint32_t) (kernelMemory + sizeof(struct SMBEntryPoint)); newEPS->dmi.bcdRevision = 0x24; - newEPS->dmi.structureCount = STATIC_SMBIOS_DMI_STRUCTURE_COUNT; // Defined in RevoBoot/i386/config/SMBIOS/data-template.h + newEPS->dmi.structureCount = STATIC_SMBIOS_DMI_STRUCTURE_COUNT; // Defined in RevoBoot/i386/config/SMBIOS/[data-template/MacModelNN].h -#if LOAD_MODEL_SPECIFIC_SMBIOS_DATA + // Safety measure to protect people from doing something that breaks the boot process. + // #define FORCED_CHECK ((STATIC_SMBIOS_DMI_STRUCTURE_COUNT == 0) || (SET_MAX_STRUCTURE_LENGTH && (STATIC_SMBIOS_SM_MAX_STRUCTURE_SIZE == 0))) + #define FORCED_CHECK ((STATIC_SMBIOS_DMI_STRUCTURE_COUNT == 0) || SET_MAX_STRUCTURE_LENGTH) + +#if (LOAD_MODEL_SPECIFIC_SMBIOS_DATA || FORCED_CHECK) /* - * This is nothing more than a mere stop gap solution, since using the factory values here, instead of walking over - * staticSMBIOSData to get them, may hang the kernel at boot time (will be fixed in a next update of RevoBoot). + * Get number of SMBIOS table structures from the loaded model specific SMBIOS data, or + * when we have 0 values in: RevoBoot/i386/config/SMBIOS/[data-template/MacModelNN].bin */ - if (fileSize > 0) + if ((fileSize > 0) || FORCED_CHECK) { - newEPS->maxStructureSize = factoryEPS->maxStructureSize; // Defined in RevoBoot/i386/libsaio/SMBIOS/static_data.h - newEPS->dmi.structureCount = factoryEPS->dmi.structureCount; // Defined in RevoBoot/i386/libsaio/SMBIOS/static_data.h - - _SMBIOS_DEBUG_DUMP("factoryEPS->maxStructureSize : %d\n", factoryEPS->maxStructureSize); - _SMBIOS_DEBUG_DUMP("factoryEPS->dmi.structureCount: %d\n", factoryEPS->dmi.structureCount); - _SMBIOS_DEBUG_SLEEP(1); - } + UInt16 structureCount = 0; + + char * structurePtr = (char *)newEPS->dmi.tableAddress; + char * structureEnd = (structurePtr + newEPS->dmi.tableLength); + + while (structureEnd > (structurePtr + sizeof(SMBStructHeader))) + { + struct SMBStructHeader * header = (struct SMBStructHeader *) structurePtr; + +#if SET_MAX_STRUCTURE_LENGTH + char * stringsPtr = structurePtr; + #if DEBUG_SMBIOS + SMBByte currentStructureType = header->type; + #endif #endif + // Skip the formatted area of the structure. + structurePtr += header->length; + + /* + * Skip the unformatted structure area at the end (strings). + * Using word comparison instead of checking two bytes (thanks to Kabyl). + */ + for (; ((uint16_t *)structurePtr)[0] != 0; structurePtr++); + + // Adjust pointer after locating the double 0 terminator. + structurePtr += 2; + + // Update structure counter. + structureCount++; + + _SMBIOS_DEBUG_DUMP("structureCount: %d\n", structureCount); + +#if SET_MAX_STRUCTURE_LENGTH + UInt16 maxStructureSize = (structurePtr - stringsPtr); + + if (newEPS->maxStructureSize < maxStructureSize) + { + newEPS->maxStructureSize = maxStructureSize; + } + + _SMBIOS_DEBUG_DUMP("Structure (%d) length: %3d bytes.\n", currentStructureType, maxStructureSize); + _SMBIOS_DEBUG_SLEEP(1); +#endif // #if SET_MAX_STRUCTURE_LENGTH + } + // Uodate number of structures (boot hang without the correct value). + newEPS->dmi.structureCount = structureCount; + } +#endif // #if (LOAD_MODEL_SPECIFIC_SMBIOS_DATA || FORCED_CHECK) + /* + * newEPS->dmi.tableLength represents the length of the static data, or the size + * of the model specific SMBIOS data file from: /Extra/SMBIOS/MacModelNN.bin + */ + _SMBIOS_DEBUG_DUMP("newEPS->dmi.structureCount: %d\nnewEPS.dmi.tableLength: %d\n", newEPS->dmi.structureCount, newEPS->dmi.tableLength); // Take care of possible checksum errors newEPS->dmi.checksum = 256 - checksum8(&newEPS->dmi, sizeof(newEPS->dmi)); newEPS->checksum = 256 - checksum8(newEPS, sizeof(* newEPS)); - _SMBIOS_DEBUG_DUMP("newEPS->dmi.structureCount: %d - tableLength: %d\n", newEPS->dmi.structureCount, newEPS->dmi.tableLength); - - // Used to update the EFI Configuration Table (in efi.c) which is + // Used to update the EFI Configuration Table (in efi.c) which is // what AppleSMBIOS.kext reads to setup the SMBIOS table for OS X. gPlatform.SMBIOS.BaseAddress = (uint32_t) newEPS; _SMBIOS_DEBUG_DUMP("New SMBIOS replacement setup.\n"); _SMBIOS_DEBUG_SLEEP(5); } -#else +#else // #if USE_STATIC_SMBIOS_DATA #include "smbios/dynamic_data.h" From 43ba53217f12e8466c2baced2dd5974cda44deee Mon Sep 17 00:00:00 2001 From: Pike Date: Mon, 5 Nov 2012 20:05:06 +0100 Subject: [PATCH 115/623] Adding SMBStructHeader for RevoBoot v1.5.35 --- i386/libsaio/smbios/essentials.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/smbios/essentials.h b/i386/libsaio/smbios/essentials.h index dc2ad54..9b4a970 100755 --- a/i386/libsaio/smbios/essentials.h +++ b/i386/libsaio/smbios/essentials.h @@ -58,4 +58,11 @@ struct SMBEntryPoint struct DMIEntryPoint dmi; } __attribute__((packed)); -#endif /* !__LIBSAIO_SMBIOS_ESSENTIALS_H */ \ No newline at end of file +typedef struct SMBStructHeader +{ + SMBByte type; + SMBByte length; + SMBWord handle; +} __attribute__((packed)) SMBStructHeader; + +#endif /* !__LIBSAIO_SMBIOS_ESSENTIALS_H */ From 00894237c7aebbcdedc1c7e5ac7990bc30ee2f6d Mon Sep 17 00:00:00 2001 From: Pike Date: Mon, 5 Nov 2012 20:06:24 +0100 Subject: [PATCH 116/623] Feature enhancements for RevoBoot v1.5.35 --- i386/libsaio/smbios/static_data.h | 102 ++++++++++++++---------------- 1 file changed, 47 insertions(+), 55 deletions(-) diff --git a/i386/libsaio/smbios/static_data.h b/i386/libsaio/smbios/static_data.h index efe7645..dc4f429 100755 --- a/i386/libsaio/smbios/static_data.h +++ b/i386/libsaio/smbios/static_data.h @@ -14,73 +14,65 @@ #ifndef __LIBSAIO_SMBIOS_STATIC_DATA_H #define __LIBSAIO_SMBIOS_STATIC_DATA_H -#include "essentials.h" + #include "essentials.h" -int tableLength = 0; + int tableLength = 0; + long fileSize = 0; -#if LOAD_MODEL_SPECIFIC_SMBIOS_DATA + #if LOAD_MODEL_SPECIFIC_SMBIOS_DATA + char dirSpec[32] = ""; + void * staticSMBIOSData = (void *)kLoadAddr; - #define SMBIOS_SEARCH_BASE 0x000F0000 - #define SMBIOS_SEARCH_END 0x000FFFFF - #define SMBIOS_ANCHOR 0x5f4d535f // '_SM_' in Little Endian. - #define SMBIOS_MPS_ANCHOR 0x5f504d5f // '_MP_' in Little Endian. + sprintf(dirSpec, "/Extra/SMBIOS/%s.bin", COMMA_STRIPPED_MODEL_ID); - _SMBIOS_DEBUG_DUMP("in getEPSAddress()\n"); + _SMBIOS_DEBUG_DUMP("Loading: %s", dirSpec); - void *baseAddress = (void *)SMBIOS_SEARCH_BASE; + fileSize = loadBinaryData(dirSpec, &staticSMBIOSData); - for(; baseAddress <= (void *)SMBIOS_SEARCH_END; baseAddress += 16) - { - if (*(uint32_t *)baseAddress == SMBIOS_ANCHOR) // _SM_ + if (fileSize > 0) { - if (checksum8(baseAddress, sizeof(struct SMBEntryPoint)) == 0) - { - #if INCLUDE_MP_TABLE - // SMBIOS table located. Use this address as starting point. - void * mpsAddress = baseAddress; - - // Now search for the Multi Processor table. - for(; mpsAddress <= (void *)SMBIOS_SEARCH_END; mpsAddress += 16) - { - if (*(uint32_t *)mpsAddress == SMBIOS_MPS_ANCHOR) - { - gPlatform.MP.BaseAddress = (uint32_t)mpsAddress; - break; - } - } - #endif // INCLUDE_MP_TABLE + memcpy((kernelMemory + sizeof(* newEPS)), staticSMBIOSData, fileSize); - break; + // factoryEPS = (struct SMBEntryPoint *) baseAddress; + + tableLength = fileSize; - _SMBIOS_DEBUG_DUMP("SMBIOS baseAddress: 0x%08x\n", baseAddress); - } + _SMBIOS_DEBUG_DUMP("\n"); } - } - - char dirSpec[32] = ""; - - void * staticSMBIOSData = (void *)kLoadAddr; - - struct SMBEntryPoint *factoryEPS; - - sprintf(dirSpec, "/Extra/SMBIOS/%s.bin", COMMA_STRIPPED_MODEL_ID); - - _SMBIOS_DEBUG_DUMP("Loading: %s\n", dirSpec); + else // File not found. Use static data defined in RevoBoot/i386/config/SMBIOS/ + { + // The STRING (macro) is defined in RevoBoot/i386/config/settings.h + #include STRING(SMBIOS_DATA_FILE) + + static uint32_t SMBIOS_Table[] = + { + // Replaced with data from: RevoBoot/i386/config/SMBIOS/[data-template/MacModelNN].h + STATIC_SMBIOS_DATA + }; - long fileSize = loadBinaryData(dirSpec, &staticSMBIOSData); + tableLength = sizeof(SMBIOS_Table); - if (fileSize > 0) - { - memcpy((kernelMemory + sizeof(* newEPS)), staticSMBIOSData, fileSize); + _SMBIOS_DEBUG_DUMP("Error: File not found!\nNow trying statically linked SMBIOS data: %d bytes\n", tableLength); - factoryEPS = (struct SMBEntryPoint *) baseAddress; - } - else // File not found. Use static data defined in RevoBoot/i386/config/SMBIOS/ - { - tableLength = useStaticSMBIOSData((kernelMemory + sizeof(* newEPS))); - } -#else - tableLength = useStaticSMBIOSData((kernelMemory + sizeof(* newEPS))); -#endif /* LOAD_MODEL_SPECIFIC_SMBIOS_DATA */ + // Copy the static SMBIOS data into the newly allocated memory page. Right after the new EPS. + memcpy((kernelMemory + sizeof(* newEPS)), SMBIOS_Table, tableLength); + } + #else + // The STRING (macro) is defined in RevoBoot/i386/config/settings.h + #include STRING(SMBIOS_DATA_FILE) + + static uint32_t SMBIOS_Table[] = + { + // Replaced with data from: RevoBoot/i386/config/SMBIOS/[data-template/MacModelNN].h + STATIC_SMBIOS_DATA + }; + + _SMBIOS_DEBUG_DUMP("Using statically linked SMBIOS data\n"); + + tableLength = sizeof(SMBIOS_Table); + + // Copy the static SMBIOS data into the newly allocated memory page. Right after the new EPS. + memcpy((kernelMemory + sizeof(* newEPS)), SMBIOS_Table, tableLength); + #endif /* LOAD_MODEL_SPECIFIC_SMBIOS_DATA */ #endif /* !__LIBSAIO_SMBIOS_STATIC_DATA_H */ From e18e79c9399f0435c5b7c50dcca58c1417a5d6a4 Mon Sep 17 00:00:00 2001 From: Pike Date: Mon, 5 Nov 2012 20:06:57 +0100 Subject: [PATCH 117/623] Feature enhancements for RevoBoot v1.5.35 --- i386/libsaio/smbios/dynamic_data.h | 101 +++++++++++++++-------------- 1 file changed, 53 insertions(+), 48 deletions(-) diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index 25fa300..9f9bff6 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -12,7 +12,10 @@ * - SMBProperties changed for speed and simplicity (PikerAlpha, October 2012). * - Calls with SMBProperties.keyString cleaned up (PikerAlpha, October 2012). * - Fixed requiredStructures.start/stop values (PikerAlpha, October 2012). - * - STATIC_SMSERIALNUMBER renamed to SMB_SYSTEM_SERIAL_NUMBER(PikerAlpha, October 2012). + * - STATIC_SMSERIALNUMBER renamed to SMB_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). + * - Removed some unused experimental code snippets (PikerAlpha, November 2012). + * - Option SET_MAX_STRUCTURE_LENGTH to verify/fix newEPS->maxStructureSize (PikerAlpha, November 2012). + * - Allow DEBUG_SMBIOS = 2 to filter out some of the output (PikerAlpha, November 2012). * * Credits: * - Kabyl (see notes in source code) @@ -21,7 +24,7 @@ * Tip: The idea is to use dynamic SMBIOS generation in RevoBoot only to * let it strip your factory table, after which you should do this: * - * 1.) Extract the new OS X compatible SMBIOS table with: tools/smbios2struct + * 1.) Extract the new OS X compatible SMBIOS table with: tools/smbios2struct3 * 2.) Add the data structure to: RevoBoot/i386/config/SMBIOS/data.h * 3.) Recompile RevoBoot, and be happy with your quicker boot time. * @@ -203,15 +206,15 @@ void setupSMBIOS(void) // Clear the first K bytes (new table will be even shorter). bzero(kernelMemory, 1024); - newEPS->anchor[0] = 0x5f; // _ - newEPS->anchor[1] = 0x53; // S - newEPS->anchor[2] = 0x4d; // M - newEPS->anchor[3] = 0x5f; // _ - newEPS->checksum = 0; // Updated at the end of this run. - newEPS->entryPointLength = 0x1f; // sizeof(* newEPS) - newEPS->majorVersion = 2; // SMBIOS version 2.4 + newEPS->anchor[0] = 0x5f; // _ + newEPS->anchor[1] = 0x53; // S + newEPS->anchor[2] = 0x4d; // M + newEPS->anchor[3] = 0x5f; // _ + newEPS->checksum = 0; // Updated at the end of this run. + newEPS->entryPointLength = 0x1f; // sizeof(* newEPS) + newEPS->majorVersion = 2; // SMBIOS version 2.4 newEPS->minorVersion = 4; - newEPS->maxStructureSize = 0; // Updated during this run. + newEPS->maxStructureSize = factoryEPS->maxStructureSize; // Optionally checked and updated later on. newEPS->entryPointRevision = 0; newEPS->formattedArea[0] = 0; @@ -220,25 +223,23 @@ void setupSMBIOS(void) newEPS->formattedArea[3] = 0; newEPS->formattedArea[4] = 0; - newEPS->dmi.anchor[0] = 0x5f; // _ - newEPS->dmi.anchor[1] = 0x44; // D - newEPS->dmi.anchor[2] = 0x4d; // M - newEPS->dmi.anchor[3] = 0x49; // I - newEPS->dmi.anchor[4] = 0x5f; // _ - newEPS->dmi.checksum = 0; // Updated at the end of this run. - newEPS->dmi.tableLength = 0; // Updated at the end of this run. + newEPS->dmi.anchor[0] = 0x5f; // _ + newEPS->dmi.anchor[1] = 0x44; // D + newEPS->dmi.anchor[2] = 0x4d; // M + newEPS->dmi.anchor[3] = 0x49; // I + newEPS->dmi.anchor[4] = 0x5f; // _ + newEPS->dmi.checksum = 0; // Updated at the end of this run. + newEPS->dmi.tableLength = 0; // Updated at the end of this run. newEPS->dmi.tableAddress = (uint32_t) (kernelMemory + sizeof(struct SMBEntryPoint)); - newEPS->dmi.structureCount = 0; // Updated during this run. - newEPS->dmi.bcdRevision = 0x24; // SMBIOS version 2.4 + newEPS->dmi.structureCount = 0; // Updated during this run. + newEPS->dmi.bcdRevision = 0x24; // SMBIOS version 2.4 char * stringsPtr = NULL; char * newtablesPtr = (char *)newEPS->dmi.tableAddress; char * structurePtr = (char *)factoryEPS->dmi.tableAddress; - char * structureStartPtr = NULL; - int i, j; - int numberOfStrings = 0; - int structureCount = factoryEPS->dmi.structureCount; + int i, j, numberOfStrings = 0; + int structureCount = factoryEPS->dmi.structureCount; SMBWord handle = 1; @@ -305,13 +306,13 @@ void setupSMBIOS(void) // Adjust pointer after locating the double 0 terminator. structurePtr += 2; -#if DEBUG_SMBIOS - // printf("currentStructureType: %d (length: %d)\n", currentStructureType, factoryHeader->length); - // sleep(1); // Silent sleep (for debug only). +#if (DEBUG_SMBIOS & 2) + _SMBIOS_DEBUG_DUMP("currentStructureType: %d (length: %d)\n", currentStructureType, factoryHeader->length); + _SMBIOS_DEBUG_SLEEP(1); #endif continue; } - + newHeader = (struct SMBStructHeader *) newtablesPtr; // Copy structure data from factory table to new table (not the strings). @@ -323,8 +324,6 @@ void setupSMBIOS(void) // Update structure counter. newEPS->dmi.structureCount++; - structureStartPtr = newtablesPtr; - // Update pointers (pointing to the end of the formatted area). structurePtr += factoryHeader->length; stringsPtr = structurePtr; @@ -352,7 +351,30 @@ void setupSMBIOS(void) } structurePtr += 2; - + +#if SET_MAX_STRUCTURE_LENGTH + /* + * Size of the longest factory SMBIOS structure, in bytes, encompasses the structure’s formatted area + * and text strings. In our case a kSMBTypeProcessorInformation structure, because we strip out all + * unwanted data. And safe to check it at this point, because we don't add anything this long ourself. + * + * Note: The maximum structure length is only checked when SET_MAX_STRUCTURE_LENGTH is set to 1 but + * is not required, because it is only available since RevoBoot v1.5.35. Never checked before. + */ + + UInt16 maxStructureSize = (structurePtr - (stringsPtr - factoryHeader->length)); + + if (newEPS->maxStructureSize < maxStructureSize) + { + newEPS->maxStructureSize = maxStructureSize; + } + + #if (DEBUG_SMBIOS & 2) + _SMBIOS_DEBUG_DUMP("Structure (%d) length: %3d bytes.\n", currentStructureType, maxStructureSize); + _SMBIOS_DEBUG_SLEEP(1); + #endif +#endif // if SET_MAX_STRUCTURE_LENGTH + // Do we need to copy the string data? if (requiredStructures[currentStructureType].copyStrings) { @@ -364,23 +386,6 @@ void setupSMBIOS(void) // Point to the next possible position for a string (deducting the second 0 char at the end). newtablesPtr += stringDataLength; - - /* ---------------------------------------------------------------------- - // Start of experimental code. - - if (currentStructureType == kSMBTypeProcessorInformation) - { - int c = 0; - - for (; c < 3; c++) - { - memcpy(newtablesPtr + 1, structureStartPtr, factoryHeader->length + stringDataLength + 2); - newtablesPtr += factoryHeader->length + stringDataLength + 2; - } - } - - //---------------------------------------------------------------------- - // End of experimental code. */ } else { @@ -403,7 +408,7 @@ void setupSMBIOS(void) { const char * str = ""; -#if DEBUG_SMBIOS +#if (DEBUG_SMBIOS & 2) if (SMBProperties[j].type != currentStructureType) { printf("SMBIOS Patcher Error: Turbo Index [%d != %d] Mismatch!\n", SMBProperties[j].type, currentStructureType); From 7046f8130fe574047a51b7bb239c734af6b43d21 Mon Sep 17 00:00:00 2001 From: Pike Date: Mon, 5 Nov 2012 20:09:05 +0100 Subject: [PATCH 118/623] Update to RevoBoot v1.5.35 --- CHANGES | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES b/CHANGES index 3eab64a..c96a333 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,16 @@ +RevoBoot v1.5.35 +================ +- SMBIOS related enhancements for RevoBoot v1.5.35 (PikerAlpha, November 2012). +- VERSION updated to v1.5.35 + + RevoBoot v1.5.34 ================ - LOAD_STATIC_EFI_DATA_FROM_EXTRA in settings-template.h renamed to LOAD_MODEL_SPECIFIC_EFI_DATA (PikerAlpha, October 2012). - LOAD_STATIC_SMBIOS_DATA_FROM_EXTRA in settings-template.h renamed to LOAD_MODEL_SPECIFIC_SMBIOS_DATA (PikerAlpha, October 2012). - New LOAD_MODEL_SPECIFIC_ACPI_DATA setting in settings-template.h (PikerAlpha, October 2012). - New LOAD_MODEL_SPECIFIC_STATIC_DATA setting in settings-template.h (PikerAlpha, October 2012). +- VERSION updated to v1.5.34 Notes: @@ -15,6 +22,7 @@ You must use the latest version of RevoBoot/i386/config/settings-template RevoBoot v1.5.33 ================ - Restored lost lines in RevoBoot/i386/libsaio/SMBIOS/static_data.h (PikerAlpha, November 2012). +- VERSION updated to v1.5.33 RevoBoot v1.5.32 From eb1ec001eb5b794738d5cce2dc8d94553f4a1209 Mon Sep 17 00:00:00 2001 From: Pike Date: Mon, 5 Nov 2012 20:09:45 +0100 Subject: [PATCH 119/623] Updating version info for RevoBoot v1.5.35 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index e201dd3..ff4e38d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.34 +1.5.35 From e13aa261b52e9655f663bd54949aa00939e250f6 Mon Sep 17 00:00:00 2001 From: Pike Date: Mon, 5 Nov 2012 20:16:35 +0100 Subject: [PATCH 120/623] New setting SET_MAX_STRUCTURE_LENGTH for RevoBoot v1.5.35 --- i386/config/settings-template.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 65cbbbc..1136591 100644 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -1,7 +1,7 @@ /* * Copyright (c) 2009 Master Chief. All rights reserved. * - * Note: This is an essential part of the build process for RevoBoot v1.5.34 and greater. + * Note: This is an essential part of the build process for RevoBoot v1.5.35 and greater. * * Updates: * @@ -26,6 +26,7 @@ * - LOAD_STATIC_EFI_DATA_FROM_EXTRA renamed to LOAD_MODEL_SPECIFIC_EFI_DATA (PikerAlpha, October 2012). * - LOAD_STATIC_SMBIOS_DATA_FROM_EXTRA renamed to LOAD_MODEL_SPECIFIC_SMBIOS_DATA (PikerAlpha, October 2012). * - LOAD_MODEL_SPECIFIC_STATIC_DATA added (PikerAlpha, October 2012). + * - Option SET_MAX_STRUCTURE_LENGTH added (PikerAlpha, November 2012). */ @@ -373,6 +374,10 @@ #define SMB_BOARD_SERIAL_NUMBER "SOMESRLNUMBR" // Example only! #endif +#define SET_MAX_STRUCTURE_LENGTH 0 // Set to 0 by default. Only change this to 1 when boot hangs without it. + // + // Note: Safe to keep at 0 since it is only available since RevoBoot v1.5.35 + #define DEBUG_SMBIOS 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. From a8d21c2c9f3ae94c10476428db268cccdd437356 Mon Sep 17 00:00:00 2001 From: Pike Date: Mon, 5 Nov 2012 20:25:44 +0100 Subject: [PATCH 121/623] Last minute patch for RevoBoot v1.5.35 --- i386/config/SMBIOS/data-template.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/config/SMBIOS/data-template.h b/i386/config/SMBIOS/data-template.h index 0d0cb7a..d388f10 100755 --- a/i386/config/SMBIOS/data-template.h +++ b/i386/config/SMBIOS/data-template.h @@ -21,9 +21,9 @@ //--------------------------------------------------------------- SMBIOS ------------------------------------------------------------------- -#define STATIC_SMBIOS_SM_MAX_STRUCTURE_SIZE NNN +#define STATIC_SMBIOS_SM_MAX_STRUCTURE_SIZE 0 -#define STATIC_SMBIOS_DMI_STRUCTURE_COUNT NN +#define STATIC_SMBIOS_DMI_STRUCTURE_COUNT 0 #define STATIC_SMBIOS_DATA \ /* 0x0000 */ // Insert your SMBIOS data here. From 820379939ca26ed98f4f0862ac7f39087c71b3f1 Mon Sep 17 00:00:00 2001 From: Pike Date: Wed, 7 Nov 2012 17:34:39 +0100 Subject: [PATCH 122/623] Interim solution for writing to /Extra/MacModelNN.bin --- i386/libsaio/smbios/tools/smbios2struct3.c | 112 +++++++++++++++++---- 1 file changed, 91 insertions(+), 21 deletions(-) diff --git a/i386/libsaio/smbios/tools/smbios2struct3.c b/i386/libsaio/smbios/tools/smbios2struct3.c index 85fc38c..d6c3872 100755 --- a/i386/libsaio/smbios/tools/smbios2struct3.c +++ b/i386/libsaio/smbios/tools/smbios2struct3.c @@ -1,26 +1,34 @@ -/*** - * - * Name : smbios2struct3 (pipe output to file) - * Version : 1.0.5 - * Type : Command line tool - * Description : SMBIOS extractor / converter (resulting in a smaller and more Apple like table). - * - * Copyright : DutchHockeyPro (c) 2011 - * - * Compile with: cc -I . smbios2struct3.c -o smbios2struct3 -Wall -framework IOKit -framework CoreFoundation - * - */ +/* + * + * Name : smbios2struct4 + * Version : 1.1.0 + * Type : Command line tool + * Copyright : Sam aka RevoGirl (c) 2011 + * Description : SMBIOS extractor / converter (resulting in a smaller and more Apple like table). + * + * Usage : sudo ./smbios2struct4 (output to terminal window) + * : sudo ./smbios2struct4 > ../../../config/SMBIOS/MacModelNN.h (writes to [path]MacModelNN.h) + * : sudo ./smbios2struct4 MacModelNN (writes to: /Extra/SMBIOS/MacModel.bin) + * + * Compile with : cc smbios2struct4.c -o smbios2struct4 -Wall -framework IOKit -framework CoreFoundation + * + * Updates : Interim solution for writing stripped SMBIOS table data to MacModelNN.bin (PikerAlpha, November 2012) + * : Check root priveledges for writing to: /Extra/SMBIOS/MacModelNN.bin (PikerAlpha, November 2012) + * + */ #include #include +#include +#include #include #include -#include "SMBIOS.h" +#include "../smbios.h" #define DEBUG 0 // Set to 1 for additional (debug) output -#define VERBOSE 1 +#define VERBOSE 0 #if VERBOSE #define VERBOSE_DUMP(x...) printf(x) @@ -102,12 +110,12 @@ void dumpStaticTableData(const UInt8 * tableBuffer, int maxStructureSize, int st { int index = 0; - printf("\n\t#define STATIC_SMBIOS_SM_MAX_STRUCTURE_SIZE\t%d\n", maxStructureSize); - printf("\n\t#define STATIC_SMBIOS_DMI_STRUCTURE_COUNT\t%d\n", structureCount); + printf("\n#define STATIC_SMBIOS_SM_MAX_STRUCTURE_SIZE\t%d\n", maxStructureSize); + printf("\n#define STATIC_SMBIOS_DMI_STRUCTURE_COUNT\t%d\n", structureCount); printf("\n"); - printf("\t#define STATIC_SMBIOS_DATA \\\n"); - printf("\t/* SMBIOS data (0x%04x / %d bytes) converted with smbios2struct2 into little endian format. */ \\\n", tableLength, tableLength); - printf("\t/* 0x0000 */\t"); + printf("#define STATIC_SMBIOS_DATA \\\n"); + printf("/* SMBIOS data (0x%04x / %d bytes) converted with smbios2struct2 into little endian format. */ \\\n", tableLength, tableLength); + printf("/* 0x0000 */\t"); UInt16 length = round2(tableLength, 4); UInt32 * newTableData = malloc(tableLength); @@ -123,7 +131,7 @@ void dumpStaticTableData(const UInt8 * tableBuffer, int maxStructureSize, int st if ((index % 8) == 0) { - printf("\\\n\t/* 0x%04x */\t", (index * 4)); + printf("\\\n/* 0x%04x */\t", (index * 4)); } } } while((index * 4) <= length); @@ -138,6 +146,23 @@ void dumpStaticTableData(const UInt8 * tableBuffer, int maxStructureSize, int st int main(int argc, char * argv[]) { + if (argc == 2) + { + uid_t real_uid = getuid(); + uid_t euid = geteuid(); + +#if DEBUG + printf("UID: %u EUID: %u\n", real_uid, euid); +#endif + // Under sudo, getuid and geteuid return 0. + if (real_uid != 0 || euid != 0) + { + printf("Error: Not root. Use sudo ./smbios2struct4 [filename without extension]\n"); + + exit (-1); + } + } + mach_port_t masterPort; io_service_t service = MACH_PORT_NULL; CFDataRef dataRef; @@ -321,7 +346,52 @@ int main(int argc, char * argv[]) VERBOSE_DUMP("\nDropped tables: %2d.\n", droppedTables); - dumpStaticTableData(tableBuffer, maxStructureSize, newStructureCount, newTableLength); + if (argc == 2) // Write to file? + { + struct stat my_sb; + // Sanity check for required directory. + if (stat("/Extra", &my_sb) != 0) + { + mkdir("/Extra", (S_IRWXU | S_IRWXG | S_IRWXO)); + } + // Sanity check for required directory. + if (stat("/Extra/SMBIOS", &my_sb) != 0) + { + mkdir("/Extra/SMBIOS", (S_IRWXU | S_IRWXG | S_IRWXO)); + } + + char dirspec[128]; + sprintf (dirspec, "/Extra/SMBIOS/%s.bin", argv[1]); + int filedesc = open(dirspec, O_WRONLY|O_CREAT|O_TRUNC, 0644); + + if (filedesc == -1) + { + printf("Error: Unable to open file!\n"); + } + else + { + newTableLength = round2((newTableLength + 2), 4); + + VERBOSE_DUMP("newTableLength: %d\n", newTableLength); + + int status = write(filedesc, tableBuffer, newTableLength); + + if (status != newTableLength) + { + printf("status %d, saved %d bytes\n", status, newTableLength); + } + else + { + printf("%d bytes written to: %s\n", newTableLength, dirspec); + } + } + + close (filedesc); + } + else + { + dumpStaticTableData(tableBuffer, maxStructureSize, newStructureCount, newTableLength); + } free((void *)tableBuffer); From 5e0d33721cd7f463fa33e5a68ec867345cfc0556 Mon Sep 17 00:00:00 2001 From: Pike Date: Thu, 8 Nov 2012 08:07:10 +0100 Subject: [PATCH 123/623] Also write properties from efi/device-properties Command line utility output: sudo ./smbios2struct5 Macmini51 722 bytes written to: /Extra/EFI/Macmini51.bin 812 bytes written to: /Extra/SMBIOS/Macmini51.bin --- i386/libsaio/smbios/tools/smbios2struct3.c | 103 +++++++++++++++++---- 1 file changed, 83 insertions(+), 20 deletions(-) diff --git a/i386/libsaio/smbios/tools/smbios2struct3.c b/i386/libsaio/smbios/tools/smbios2struct3.c index d6c3872..297be55 100755 --- a/i386/libsaio/smbios/tools/smbios2struct3.c +++ b/i386/libsaio/smbios/tools/smbios2struct3.c @@ -1,7 +1,7 @@ /* * * Name : smbios2struct4 - * Version : 1.1.0 + * Version : 1.1.1 * Type : Command line tool * Copyright : Sam aka RevoGirl (c) 2011 * Description : SMBIOS extractor / converter (resulting in a smaller and more Apple like table). @@ -14,6 +14,7 @@ * * Updates : Interim solution for writing stripped SMBIOS table data to MacModelNN.bin (PikerAlpha, November 2012) * : Check root priveledges for writing to: /Extra/SMBIOS/MacModelNN.bin (PikerAlpha, November 2012) + * : Now also saves /EFI-device-properties (PikerAlpha, November 2012) * */ @@ -146,6 +147,10 @@ void dumpStaticTableData(const UInt8 * tableBuffer, int maxStructureSize, int st int main(int argc, char * argv[]) { + char dirspec[128]; + int filedesc = 0; + struct stat my_sb; + if (argc == 2) { uid_t real_uid = getuid(); @@ -171,20 +176,88 @@ int main(int argc, char * argv[]) UInt16 tableLength = 0, droppedTables = 0; UInt16 newTableLength = 0; - // UInt32 * shadowTableData = NULL; - IOMasterPort(MACH_PORT_NULL, &masterPort); + + //================================================================================== + + io_registry_entry_t efi = IORegistryEntryFromPath(kIOMasterPortDefault, kIODeviceTreePlane ":/efi"); + + if (efi == IO_OBJECT_NULL) + { +#if DEBUG + printf("FAILURE: Unable to locate EFI registry entry.\n"); +#endif + exit(-1); + } + else + { +#if DEBUG + printf("OK\n"); +#endif + dataRef = (CFDataRef) IORegistryEntryCreateCFProperty(efi, CFSTR("device-properties"), kCFAllocatorDefault, kNilOptions); + + if (dataRef) + { + UInt32 * deviceProperties = (UInt32 *) CFDataGetBytePtr(dataRef); + UInt16 devicePropertiesBytes = (int) CFDataGetLength(dataRef); +#if DEBUG + printf("Property 'device-properties' %d bytes found.", numBytes); +#endif + if ((argc == 2) && (devicePropertiesBytes)) // Write to file? + { + // Sanity check for required directory. + if (stat("/Extra", &my_sb) != 0) + { + mkdir("/Extra", (S_IRWXU | S_IRWXG | S_IRWXO)); + } + // Sanity check for required directory. + if (stat("/Extra/EFI", &my_sb) != 0) + { + mkdir("/Extra/EFI", (S_IRWXU | S_IRWXG | S_IRWXO)); + } + + sprintf (dirspec, "/Extra/EFI/%s.bin", argv[1]); + filedesc = open(dirspec, O_WRONLY|O_CREAT|O_TRUNC, 0644); + + if (filedesc == -1) + { + printf("Error: Unable to open file!\n"); + } + else + { + int status = write(filedesc, deviceProperties, devicePropertiesBytes); + + if (status != devicePropertiesBytes) + { + printf("status %d, saved %d bytes\n", status, devicePropertiesBytes); + } + else + { + printf("%d bytes written to: %s\n", devicePropertiesBytes, dirspec); + } + } + + close (filedesc); + } + } +#if DEBUG + else + { + printf("FAILURE: Unable to locate ':/efi/device-properties'\n"); + } +#endif + } + + //================================================================================== + service = IOServiceGetMatchingService(masterPort, IOServiceMatching("AppleSMBIOS")); if (service) { #if DEBUG - printf("\nHave AppleSMBIOS\n"); + printf("\nAppleSMBIOS found\n"); #endif - dataRef = (CFDataRef) IORegistryEntryCreateCFProperty(service, - CFSTR("SMBIOS-EPS"), - kCFAllocatorDefault, - kNilOptions); + dataRef = (CFDataRef) IORegistryEntryCreateCFProperty(service, CFSTR("SMBIOS-EPS"), kCFAllocatorDefault, kNilOptions); if (dataRef) { @@ -233,10 +306,7 @@ int main(int argc, char * argv[]) printf("\n"); #endif - dataRef = (CFDataRef) IORegistryEntryCreateCFProperty(service, - CFSTR("SMBIOS"), - kCFAllocatorDefault, - kNilOptions); + dataRef = (CFDataRef) IORegistryEntryCreateCFProperty(service, CFSTR("SMBIOS"), kCFAllocatorDefault, kNilOptions); if (dataRef) { @@ -348,21 +418,14 @@ int main(int argc, char * argv[]) if (argc == 2) // Write to file? { - struct stat my_sb; - // Sanity check for required directory. - if (stat("/Extra", &my_sb) != 0) - { - mkdir("/Extra", (S_IRWXU | S_IRWXG | S_IRWXO)); - } // Sanity check for required directory. if (stat("/Extra/SMBIOS", &my_sb) != 0) { mkdir("/Extra/SMBIOS", (S_IRWXU | S_IRWXG | S_IRWXO)); } - char dirspec[128]; sprintf (dirspec, "/Extra/SMBIOS/%s.bin", argv[1]); - int filedesc = open(dirspec, O_WRONLY|O_CREAT|O_TRUNC, 0644); + filedesc = open(dirspec, O_WRONLY|O_CREAT|O_TRUNC, 0644); if (filedesc == -1) { From 67318fde619046eff0169853632da67baa0d445f Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 10 Nov 2012 15:45:33 +0100 Subject: [PATCH 124/623] Added feedback/output --- Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Makefile b/Makefile index 2c101ae..2a7a5f8 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,8 @@ # - Copies settings-template.h to SETTINGS/ModelnameNN.h when missing (PikerAlpha, October 2012). # - Automatic ACPI/EFI/SMBIOS data selection (PikerAlpha, October 2012). # - Copies ACPI/EFI/SMBIOS/data-template.h for new conigurations (PikerAlpha, October 2012). +# - Output added for cp/mkdir/rm actions (PikerAlpha, November 2012). +# - New build target 'help' added (PikerAlpha, November 2012). # # @@ -134,22 +136,27 @@ SETTINGS_FILE=$(SETTINGS_DIR)/$(MAKE_TARGET_MODEL).h $(MAKEGOAL): $(SYMROOT) $(OBJROOT) @if [ ! -f $(CONFIG_DIR)/$(MAKE_ACPI_DATA_FILE) ]; then \ + echo "\t[CP] $(CONFIG_DIR)/ACPI/data-template.h $(CONFIG_DIR)/$(MAKE_ACPI_DATA_FILE)"; \ cp -n $(CONFIG_DIR)/ACPI/data-template.h $(CONFIG_DIR)/$(MAKE_ACPI_DATA_FILE); \ fi; @if [ ! -f $(CONFIG_DIR)/$(MAKE_EFI_DATA_FILE) ]; then \ + echo "\t[CP] $(CONFIG_DIR)/EFI/data-template.h $(CONFIG_DIR)/$(MAKE_EFI_DATA_FILE)"; \ cp -n $(CONFIG_DIR)/EFI/data-template.h $(CONFIG_DIR)/$(MAKE_EFI_DATA_FILE); \ fi; @if [ ! -f $(CONFIG_DIR)/$(MAKE_SMBIOS_DATA_FILE) ]; then \ + echo "\t[CP] $(CONFIG_DIR)/SMBIOS/data-template.h $(CONFIG_DIR)/$(MAKE_SMBIOS_DATA_FILE)"; \ cp -n $(CONFIG_DIR)/SMBIOS/data-template.h $(CONFIG_DIR)/$(MAKE_SMBIOS_DATA_FILE); \ fi; @if [ ! -d $(SETTINGS_DIR) ]; then \ + echo "\t[MKDIR] $(SETTINGS_DIR)"; \ /bin/mkdir -p $(SETTINGS_DIR); \ fi; @if [ ! -f $(SETTINGS_FILE) ]; then \ + echo "\t[CP] $(CONFIG_DIR)/settings-template.h $(SETTINGS_FILE)"; \ cp -n $(CONFIG_DIR)/settings-template.h $(SETTINGS_FILE); \ fi; @@ -169,7 +176,17 @@ $(MAKEGOAL): $(SYMROOT) $(OBJROOT) fi; clean: + @if [ -d "$(OBJROOT)" ];then echo "\t[RMDIR] $(OBJROOT)"; fi + @if [ -d "$(SYMROOT)" ];then echo "\t[RMDIR] $(SYMROOT)"; fi rm -rf sym obj dst out.log +help: + @echo + @echo 'Build targets:' + @echo ' - Build all targets [DEFAULT]' + @echo + @echo 'Cleaning targets:' + @echo ' clean - Remove generated files' + $(SYMROOT) $(OBJROOT): @/bin/mkdir -p $@ From 5b6712f8489384379ee63d769ac08b7b1107da63 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 10 Nov 2012 15:50:31 +0100 Subject: [PATCH 125/623] Added feedback/output --- i386/libsa/Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/i386/libsa/Makefile b/i386/libsa/Makefile index 773acac..2b0069d 100644 --- a/i386/libsa/Makefile +++ b/i386/libsa/Makefile @@ -4,6 +4,7 @@ # Updates: # # - Major cleanup (PikerAlpha, October 2012). +# - Output added for rm/ar/ranlib actions (PikerAlpha, November 2012). # @@ -26,13 +27,17 @@ VPATH = $(OBJROOT):$(SYMROOT) SA_OBJS = prf.o printf.o zalloc.o string.o strtol.o setjmp.o efi_tables.o LIBS = libsa.a + DIRS_NEEDED = $(OBJROOT) $(SYMROOT) $(MAKEGOAL): $(DIRS_NEEDED) $(LIBS) -libsa.a: $(SA_OBJS) - rm -f $(SYMROOT)/$(@F) - ar q $(SYMROOT)/$(@F) $^ - ranlib $(SYMROOT)/$(@F) +$(LIBS): $(SA_OBJS) + @echo "\t[RM] $(SYMROOT)/$@" + @rm -f $(SYMROOT)/$@ + @echo "\t[AR] $@" + @ar q $(SYMROOT)/$@ $^ &> /dev/null + @echo "\t[RANLIB] $@" + @ranlib $(SYMROOT)/$@ include ../MakeInc.dir From eb4df18955e8c0829a61db206079d83532b79669 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 10 Nov 2012 15:53:21 +0100 Subject: [PATCH 126/623] Added feedback/output --- i386/libsaio/Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/i386/libsaio/Makefile b/i386/libsaio/Makefile index 63262be..3e13d49 100644 --- a/i386/libsaio/Makefile +++ b/i386/libsaio/Makefile @@ -7,6 +7,7 @@ # - DMAKE_TARGET_MODEL added (PikerAlpha, October 2012). # - Static data selectors added (PikerAlpha, October 2012). # - STATIC_DATA_FILENAME added (PikerAlpha, October 2012). +# - Output added for rm/ar/ranlib actions (PikerAlpha, November 2012). # include ../MakePaths.dir @@ -41,18 +42,20 @@ SAIO_OBJS = table.o asm.o bios.o biosfn.o \ vbe.o hfs.o hfs_compare.o \ xml.o md5c.o device_tree.o \ cpu.o platform.o acpi.o \ - smbios.o efi.o - -SAIO_EXTERN_OBJS = console.o + smbios.o efi.o console.o LIBS = libsaio.a + DIRS_NEEDED = $(OBJROOT) $(SYMROOT) $(MAKEGOAL): $(DIRS_NEEDED) libsaio.h $(LIBS) -libsaio.a: $(SAIO_EXTERN_OBJS) $(SAIO_OBJS) - rm -f $(SYMROOT)/$(@F) - ar q $(SYMROOT)/$(@F) $^ - ranlib $(SYMROOT)/$(@F) +$(LIBS): $(SAIO_OBJS) + @echo "\t[RM] $(SYMROOT)/$@" + @rm -f $@ + @echo "\t[AR] $@" + @ar q $(SYMROOT)/$@ $^ &> /dev/null + @echo "\t[RANLIB] $@" + @ranlib $(SYMROOT)/$@ include ../MakeInc.dir From 31eff7695dc7693c207d2586395bf2faa3494687 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 10 Nov 2012 15:56:24 +0100 Subject: [PATCH 127/623] Bug fix --- i386/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/Makefile b/i386/Makefile index a7ee5b7..57f3137 100644 --- a/i386/Makefile +++ b/i386/Makefile @@ -5,6 +5,7 @@ # # - Major cleanup (PikerAlpha, October 2012). # - Output improvements (PikerAlpha, October 2012). +# - PRODUCT_MODEL_TARGET renamed to MAKE_TARGET_MODEL (PikerAlpha, November 2012). # # @@ -26,7 +27,7 @@ SUBDIRS = util libsa libsaio boot2 $(MAKEGOAL): @for i in ${SUBDIRS}; \ do \ - echo ================= make MODEL=$(PRODUCT_MODEL_TARGET) $@ for: RevoBoot/i386/$$i =================; \ + echo ================= make MODEL=$(MAKE_TARGET_MODEL) $@ for: RevoBoot/i386/$$i =================; \ ( cd $$i; ${MAKE} \ "OBJROOT=$(OBJROOT)/$$i" \ "SYMROOT=$(SYMROOT)" \ From 3558ddae9338d0ac9b5bae73c3ab2958684ab099 Mon Sep 17 00:00:00 2001 From: Pike Date: Sat, 10 Nov 2012 16:02:43 +0100 Subject: [PATCH 128/623] Be silent --- i386/util/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/util/Makefile b/i386/util/Makefile index 8a4883c..e4ccd5f 100644 --- a/i386/util/Makefile +++ b/i386/util/Makefile @@ -24,8 +24,8 @@ DIRS_NEEDED = $(OBJROOT) $(SYMROOT) $(LANGDIR) $(MAKEGOAL): $(DIRS_NEEDED) $(PROGRAMS) machOconv: machOconv.o - $(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $(SYMROOT)/$(@F) machOconv.o + @$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $(SYMROOT)/$(@F) machOconv.o md: - $(CC) -mdynamic-no-pic -Wall -dead_strip -arch i386 -mmacosx-version-min=10.5 md.c -o $(SYMROOT)/md + @$(CC) -mdynamic-no-pic -Wall -dead_strip -arch i386 -mmacosx-version-min=10.5 md.c -o $(SYMROOT)/md include ../MakeInc.dir From 30b71cea5c12517227094557a756fdf96991499a Mon Sep 17 00:00:00 2001 From: Dave Griffin Date: Sun, 11 Nov 2012 09:25:09 +0000 Subject: [PATCH 129/623] Enable clang compilation --- .gitignore | 3 +- README | 4 +- i386/MakeInc.dir | 44 +- i386/boot2/Makefile | 64 +- i386/boot2/boot.c | 17 +- i386/include/IOKit/IOBSD.h | 41 + i386/include/IOKit/IOBufferMemoryDescriptor.h | 261 ++ i386/include/IOKit/IOCatalogue.h | 272 +++ i386/include/IOKit/IOCommand.h | 83 + i386/include/IOKit/IOCommandGate.h | 241 ++ i386/include/IOKit/IOCommandPool.h | 230 ++ i386/include/IOKit/IOConditionLock.h | 71 + i386/include/IOKit/IODMACommand.h | 557 +++++ i386/include/IOKit/IODMAController.h | 67 + i386/include/IOKit/IODMAEventSource.h | 84 + i386/include/IOKit/IODataQueue.h | 141 ++ i386/include/IOKit/IODataQueueShared.h | 92 + i386/include/IOKit/IODeviceMemory.h | 98 + i386/include/IOKit/IODeviceTreeSupport.h | 127 + i386/include/IOKit/IOEventSource.h | 244 ++ .../IOKit/IOFilterInterruptEventSource.h | 156 ++ .../IOKit/IOInterleavedMemoryDescriptor.h | 122 + i386/include/IOKit/IOInterruptController.h | 155 ++ i386/include/IOKit/IOInterruptEventSource.h | 200 ++ i386/include/IOKit/IOInterrupts.h | 58 + i386/include/IOKit/IOKitDebug.h | 111 + i386/include/IOKit/IOKitKeys.h | 164 ++ i386/include/IOKit/IOKitServer.h | 123 + i386/include/IOKit/IOLib.h | 83 + i386/include/IOKit/IOLocks.h | 409 ++++ i386/include/IOKit/IOMapper.h | 154 ++ i386/include/IOKit/IOMemoryCursor.h | 462 ++++ i386/include/IOKit/IOMemoryDescriptor.h | 898 +++++++ i386/include/IOKit/IOMessage.h | 75 + i386/include/IOKit/IOMultiMemoryDescriptor.h | 110 + i386/include/IOKit/IONVRAM.h | 167 ++ i386/include/IOKit/IONotifier.h | 72 + i386/include/IOKit/IOPlatformExpert.h | 318 +++ i386/include/IOKit/IORangeAllocator.h | 171 ++ i386/include/IOKit/IORegistryEntry.h | 947 ++++++++ i386/include/IOKit/IOReturn.h | 137 ++ i386/include/IOKit/IOService.h | 1690 +++++++++++++ i386/include/IOKit/IOServicePM.h | 42 + i386/include/IOKit/IOSharedDataQueue.h | 129 + i386/include/IOKit/IOSharedLock.h | 86 + i386/include/IOKit/IOSubMemoryDescriptor.h | 109 + i386/include/IOKit/IOSyncer.h | 64 + i386/include/IOKit/IOTimeStamp.h | 189 ++ i386/include/IOKit/IOTimerEventSource.h | 230 ++ i386/include/IOKit/IOTypes.h | 238 ++ i386/include/IOKit/IOUserClient.h | 333 +++ i386/include/IOKit/IOWorkLoop.h | 321 +++ i386/include/IOKit/OSMessageNotification.h | 158 ++ .../include/IOKit/acpi/IOACPIPlatformDevice.h | 254 ++ .../include/IOKit/acpi/IOACPIPlatformExpert.h | 178 ++ i386/include/IOKit/acpi/IOACPITypes.h | 136 ++ i386/include/IOKit/assert.h | 54 + i386/include/IOKit/ata/ATADeviceNub.h | 164 ++ i386/include/IOKit/ata/ATATimerEventSource.h | 126 + i386/include/IOKit/ata/IOATABusCommand.h | 250 ++ i386/include/IOKit/ata/IOATABusInfo.h | 219 ++ i386/include/IOKit/ata/IOATACommand.h | 478 ++++ i386/include/IOKit/ata/IOATAController.h | 314 +++ i386/include/IOKit/ata/IOATADevConfig.h | 239 ++ i386/include/IOKit/ata/IOATADevice.h | 179 ++ i386/include/IOKit/ata/IOATARegI386.h | 76 + i386/include/IOKit/ata/IOATATypes.h | 393 +++ i386/include/IOKit/ata/IOPCIATA.h | 200 ++ i386/include/IOKit/ata/MacIOATA.h | 225 ++ i386/include/IOKit/audio/IOAudioControl.h | 595 +++++ .../IOKit/audio/IOAudioControlUserClient.h | 90 + i386/include/IOKit/audio/IOAudioDebug.h | 61 + i386/include/IOKit/audio/IOAudioDefines.h | 465 ++++ i386/include/IOKit/audio/IOAudioDevice.h | 749 ++++++ i386/include/IOKit/audio/IOAudioEngine.h | 865 +++++++ .../IOKit/audio/IOAudioEngineUserClient.h | 270 +++ .../include/IOKit/audio/IOAudioLevelControl.h | 205 ++ i386/include/IOKit/audio/IOAudioPort.h | 184 ++ .../IOKit/audio/IOAudioSelectorControl.h | 122 + i386/include/IOKit/audio/IOAudioStream.h | 289 +++ .../IOKit/audio/IOAudioToggleControl.h | 121 + i386/include/IOKit/audio/IOAudioTypes.h | 661 +++++ i386/include/IOKit/avc/IOFireWireAVCCommand.h | 94 + i386/include/IOKit/avc/IOFireWireAVCConsts.h | 259 ++ .../IOKit/avc/IOFireWireAVCRequestSpace.h | 31 + .../IOKit/avc/IOFireWireAVCTargetSpace.h | 297 +++ i386/include/IOKit/avc/IOFireWireAVCUnit.h | 408 ++++ .../IOKit/avc/IOFireWireAVCUserClientCommon.h | 124 + i386/include/IOKit/avc/IOFireWirePCRSpace.h | 202 ++ i386/include/IOKit/bluetooth/Bluetooth.h | 2158 +++++++++++++++++ .../bluetooth/BluetoothAssignedNumbers.h | 552 +++++ .../bluetooth/IOBluetoothHCIController.h | 1370 +++++++++++ .../IOKit/bluetooth/IOBluetoothHCIRequest.h | 155 ++ .../IOKit/bluetooth/IOBluetoothHIDDriver.h | 230 ++ .../bluetooth/IOBluetoothHIDDriverTypes.h | 61 + .../IOKit/bluetooth/IOBluetoothInternal.h | 103 + .../IOKit/bluetooth/IOBluetoothTypes.h | 23 + .../IOKit/firewire/IOConfigDirectory.h | 182 ++ .../include/IOKit/firewire/IOFWAddressSpace.h | 331 +++ .../IOKit/firewire/IOFWAsyncStreamListener.h | 132 + i386/include/IOKit/firewire/IOFWCommand.h | 977 ++++++++ i386/include/IOKit/firewire/IOFWDCL.h | 346 +++ i386/include/IOKit/firewire/IOFWDCLPool.h | 160 ++ i386/include/IOKit/firewire/IOFWDCLProgram.h | 133 + .../IOKit/firewire/IOFWDCLTranslator.h | 114 + .../include/IOKit/firewire/IOFWIsochChannel.h | 132 + i386/include/IOKit/firewire/IOFWIsochPort.h | 66 + .../IOKit/firewire/IOFWLocalIsochPort.h | 135 ++ .../IOKit/firewire/IOFWPHYPacketListener.h | 77 + .../IOKit/firewire/IOFWPhysicalAddressSpace.h | 263 ++ .../IOKit/firewire/IOFWPseudoAddressSpace.h | 370 +++ i386/include/IOKit/firewire/IOFWRegs.h | 73 + ...IOFWSimpleContiguousPhysicalAddressSpace.h | 66 + .../firewire/IOFWSimplePhysicalAddressSpace.h | 70 + i386/include/IOKit/firewire/IOFWSyncer.h | 54 + .../IOKit/firewire/IOFWUserObjectExporter.h | 95 + i386/include/IOKit/firewire/IOFWUtils.h | 32 + i386/include/IOKit/firewire/IOFireWireBus.h | 373 +++ .../IOKit/firewire/IOFireWireController.h | 1089 +++++++++ .../include/IOKit/firewire/IOFireWireDevice.h | 289 +++ .../IOKit/firewire/IOFireWireFamilyCommon.h | 1235 ++++++++++ .../IOKit/firewire/IOFireWireIRMAllocation.h | 116 + .../IOKit/firewire/IOFireWireLocalNode.h | 143 ++ .../firewire/IOFireWireMultiIsochReceive.h | 137 ++ i386/include/IOKit/firewire/IOFireWireNub.h | 293 +++ .../IOKit/firewire/IOFireWirePowerManager.h | 78 + i386/include/IOKit/firewire/IOFireWireUnit.h | 167 ++ .../IOKit/firewire/IOLocalConfigDirectory.h | 110 + .../IOKit/firewire/IORemoteConfigDirectory.h | 92 + .../IOKit/graphics/IOAccelClientConnect.h | 44 + .../IOKit/graphics/IOAccelSurfaceConnect.h | 182 ++ i386/include/IOKit/graphics/IOAccelTypes.h | 101 + i386/include/IOKit/graphics/IOAccelerator.h | 42 + i386/include/IOKit/graphics/IODisplay.h | 292 +++ i386/include/IOKit/graphics/IOFramebuffer.h | 827 +++++++ .../IOKit/graphics/IOFramebufferShared.h | 255 ++ .../include/IOKit/graphics/IOGraphicsDevice.h | 47 + .../include/IOKit/graphics/IOGraphicsEngine.h | 51 + .../IOKit/graphics/IOGraphicsInterfaceTypes.h | 301 +++ i386/include/IOKit/graphics/IOGraphicsTypes.h | 1260 ++++++++++ i386/include/IOKit/hid/IOHIDDevice.h | 706 ++++++ i386/include/IOKit/hid/IOHIDElement.h | 106 + i386/include/IOKit/hid/IOHIDInterface.h | 252 ++ i386/include/IOKit/hid/IOHIDKeys.h | 349 +++ i386/include/IOKit/hid/IOHIDUsageTables.h | 1665 +++++++++++++ .../include/IOKit/hidevent/IOHIDEventDriver.h | 171 ++ .../IOKit/hidevent/IOHIDEventService.h | 394 +++ .../IOKit/hidsystem/IOHIDDescriptorParser.h | 939 +++++++ i386/include/IOKit/hidsystem/IOHIDParameter.h | 310 +++ i386/include/IOKit/hidsystem/IOHIDShared.h | 341 +++ i386/include/IOKit/hidsystem/IOHIDSystem.h | 785 ++++++ i386/include/IOKit/hidsystem/IOHIDTypes.h | 171 ++ .../IOKit/hidsystem/IOHIDUsageTables.h | 1665 +++++++++++++ i386/include/IOKit/hidsystem/IOHIDevice.h | 71 + i386/include/IOKit/hidsystem/IOHIKeyboard.h | 268 ++ .../IOKit/hidsystem/IOHIKeyboardMapper.h | 350 +++ i386/include/IOKit/hidsystem/IOHIPointing.h | 280 +++ i386/include/IOKit/hidsystem/IOLLEvent.h | 558 +++++ i386/include/IOKit/hidsystem/ev_keymap.h | 166 ++ i386/include/IOKit/i2c/IOI2CInterface.h | 262 ++ i386/include/IOKit/ndrvsupport/IOMacOSTypes.h | 441 ++++ i386/include/IOKit/ndrvsupport/IOMacOSVideo.h | 1391 +++++++++++ .../IOKit/ndrvsupport/IONDRVFramebuffer.h | 352 +++ .../IOKit/ndrvsupport/IONDRVLibraries.h | 696 ++++++ .../include/IOKit/ndrvsupport/IONDRVSupport.h | 95 + .../IOKit/network/IOBasicOutputQueue.h | 319 +++ .../IOKit/network/IOEthernetController.h | 502 ++++ .../IOKit/network/IOEthernetInterface.h | 328 +++ i386/include/IOKit/network/IOEthernetStats.h | 161 ++ .../IOKit/network/IOGatedOutputQueue.h | 140 ++ i386/include/IOKit/network/IOKernelDebugger.h | 324 +++ .../IOKit/network/IOMbufMemoryCursor.h | 381 +++ .../IOKit/network/IONetworkController.h | 1452 +++++++++++ i386/include/IOKit/network/IONetworkData.h | 477 ++++ .../IOKit/network/IONetworkInterface.h | 1104 +++++++++ i386/include/IOKit/network/IONetworkMedium.h | 426 ++++ i386/include/IOKit/network/IONetworkStats.h | 87 + i386/include/IOKit/network/IOOutputQueue.h | 270 +++ i386/include/IOKit/network/IOPacketQueue.h | 290 +++ i386/include/IOKit/nvram/IONVRAMController.h | 49 + i386/include/IOKit/pci/IOAGPDevice.h | 222 ++ i386/include/IOKit/pci/IOPCIBridge.h | 381 +++ i386/include/IOKit/pci/IOPCIDevice.h | 673 +++++ i386/include/IOKit/platform/.svn/all-wcprops | 29 + i386/include/IOKit/platform/.svn/entries | 164 ++ .../.svn/text-base/AppleMacIO.h.svn-base | 79 + .../text-base/AppleMacIODevice.h.svn-base | 60 + .../.svn/text-base/AppleNMI.h.svn-base | 76 + .../text-base/ApplePlatformExpert.h.svn-base | 91 + i386/include/IOKit/platform/AppleMacIO.h | 79 + .../include/IOKit/platform/AppleMacIODevice.h | 60 + i386/include/IOKit/platform/AppleNMI.h | 76 + .../IOKit/platform/ApplePlatformExpert.h | 91 + i386/include/IOKit/power/.svn/all-wcprops | 11 + i386/include/IOKit/power/.svn/entries | 62 + .../.svn/text-base/IOPwrController.h.svn-base | 41 + i386/include/IOKit/power/IOPwrController.h | 41 + i386/include/IOKit/ppc/.svn/all-wcprops | 11 + i386/include/IOKit/ppc/.svn/entries | 62 + .../ppc/.svn/text-base/IODBDMA.h.svn-base | 367 +++ i386/include/IOKit/ppc/IODBDMA.h | 367 +++ i386/include/IOKit/pwr_mgt/.svn/all-wcprops | 59 + i386/include/IOKit/pwr_mgt/.svn/entries | 334 +++ .../pwr_mgt/.svn/text-base/IOPM.h.svn-base | 654 +++++ .../.svn/text-base/IOPMDeprecated.h.svn-base | 177 ++ .../.svn/text-base/IOPMLibDefs.h.svn-base | 40 + .../.svn/text-base/IOPMPowerSource.h.svn-base | 300 +++ .../text-base/IOPMPowerSourceList.h.svn-base | 54 + .../.svn/text-base/IOPMPrivate.h.svn-base | 269 ++ .../.svn/text-base/IOPMpowerState.h.svn-base | 72 + .../text-base/IOPowerConnection.h.svn-base | 159 ++ .../.svn/text-base/RootDomain.h.svn-base | 251 ++ i386/include/IOKit/pwr_mgt/IOPM.h | 654 +++++ i386/include/IOKit/pwr_mgt/IOPMDeprecated.h | 177 ++ i386/include/IOKit/pwr_mgt/IOPMLibDefs.h | 40 + i386/include/IOKit/pwr_mgt/IOPMPowerSource.h | 300 +++ .../IOKit/pwr_mgt/IOPMPowerSourceList.h | 54 + i386/include/IOKit/pwr_mgt/IOPMPrivate.h | 269 ++ i386/include/IOKit/pwr_mgt/IOPMpowerState.h | 72 + .../include/IOKit/pwr_mgt/IOPowerConnection.h | 159 ++ i386/include/IOKit/pwr_mgt/RootDomain.h | 251 ++ i386/include/IOKit/rtc/.svn/all-wcprops | 11 + i386/include/IOKit/rtc/.svn/entries | 62 + .../.svn/text-base/IORTCController.h.svn-base | 46 + i386/include/IOKit/rtc/IORTCController.h | 46 + i386/include/IOKit/sbp2/.svn/all-wcprops | 59 + i386/include/IOKit/sbp2/.svn/entries | 334 +++ ...WireSBP2LSIWorkaroundDescriptor.h.svn-base | 292 +++ .../text-base/IOFireWireSBP2LUN.h.svn-base | 270 +++ .../text-base/IOFireWireSBP2Login.h.svn-base | 1078 ++++++++ .../IOFireWireSBP2ManagementORB.h.svn-base | 345 +++ .../text-base/IOFireWireSBP2ORB.h.svn-base | 547 +++++ .../text-base/IOFireWireSBP2Target.h.svn-base | 224 ++ .../IOFireWireSBP2UserClient.h.svn-base | 186 ++ .../IOFireWireSBP2UserClientCommon.h.svn-base | 79 + ...eWireSerialBusProtocolTransport.h.svn-base | 449 ++++ .../IOFireWireSBP2LSIWorkaroundDescriptor.h | 292 +++ i386/include/IOKit/sbp2/IOFireWireSBP2LUN.h | 270 +++ i386/include/IOKit/sbp2/IOFireWireSBP2Login.h | 1078 ++++++++ .../IOKit/sbp2/IOFireWireSBP2ManagementORB.h | 345 +++ i386/include/IOKit/sbp2/IOFireWireSBP2ORB.h | 547 +++++ .../include/IOKit/sbp2/IOFireWireSBP2Target.h | 224 ++ .../IOKit/sbp2/IOFireWireSBP2UserClient.h | 186 ++ .../sbp2/IOFireWireSBP2UserClientCommon.h | 79 + .../IOFireWireSerialBusProtocolTransport.h | 449 ++++ i386/include/IOKit/scsi/.svn/all-wcprops | 155 ++ i386/include/IOKit/scsi/.svn/entries | 881 +++++++ .../.svn/text-base/IOBDServices.h.svn-base | 241 ++ .../IOBlockStorageServices.h.svn-base | 158 ++ .../IOCompactDiscServices.h.svn-base | 230 ++ .../.svn/text-base/IODVDServices.h.svn-base | 251 ++ .../IOReducedBlockServices.h.svn-base | 147 ++ .../IOSCSIBlockCommandsDevice.h.svn-base | 1146 +++++++++ .../IOSCSIMultimediaCommandsDevice.h.svn-base | 1057 ++++++++ .../IOSCSIPeripheralDeviceNub.h.svn-base | 233 ++ .../IOSCSIPeripheralDeviceType00.h.svn-base | 102 + .../IOSCSIPeripheralDeviceType05.h.svn-base | 75 + .../IOSCSIPeripheralDeviceType07.h.svn-base | 75 + .../IOSCSIPeripheralDeviceType0E.h.svn-base | 77 + .../IOSCSIPrimaryCommandsDevice.h.svn-base | 805 ++++++ .../IOSCSIProtocolInterface.h.svn-base | 854 +++++++ .../IOSCSIProtocolServices.h.svn-base | 362 +++ ...OSCSIReducedBlockCommandsDevice.h.svn-base | 438 ++++ .../SCSICmds_INQUIRY_Definitions.h.svn-base | 923 +++++++ .../SCSICmds_MODE_Definitions.h.svn-base | 559 +++++ ...ICmds_READ_CAPACITY_Definitions.h.svn-base | 141 ++ ...CSICmds_REPORT_LUNS_Definitions.h.svn-base | 146 ++ .../SCSICmds_REQUEST_SENSE_Defs.h.svn-base | 234 ++ .../SCSICommandDefinitions.h.svn-base | 479 ++++ .../SCSICommandOperationCodes.h.svn-base | 941 +++++++ .../scsi/.svn/text-base/SCSIPort.h.svn-base | 77 + .../scsi/.svn/text-base/SCSITask.h.svn-base | 456 ++++ i386/include/IOKit/scsi/IOBDServices.h | 241 ++ .../IOKit/scsi/IOBlockStorageServices.h | 158 ++ .../IOKit/scsi/IOCompactDiscServices.h | 230 ++ i386/include/IOKit/scsi/IODVDServices.h | 251 ++ .../IOKit/scsi/IOReducedBlockServices.h | 147 ++ .../IOKit/scsi/IOSCSIBlockCommandsDevice.h | 1146 +++++++++ .../scsi/IOSCSIMultimediaCommandsDevice.h | 1057 ++++++++ .../IOKit/scsi/IOSCSIPeripheralDeviceNub.h | 233 ++ .../IOKit/scsi/IOSCSIPeripheralDeviceType00.h | 102 + .../IOKit/scsi/IOSCSIPeripheralDeviceType05.h | 75 + .../IOKit/scsi/IOSCSIPeripheralDeviceType07.h | 75 + .../IOKit/scsi/IOSCSIPeripheralDeviceType0E.h | 77 + .../IOKit/scsi/IOSCSIPrimaryCommandsDevice.h | 805 ++++++ .../IOKit/scsi/IOSCSIProtocolInterface.h | 854 +++++++ .../IOKit/scsi/IOSCSIProtocolServices.h | 362 +++ .../scsi/IOSCSIReducedBlockCommandsDevice.h | 438 ++++ .../IOKit/scsi/SCSICmds_INQUIRY_Definitions.h | 923 +++++++ .../IOKit/scsi/SCSICmds_MODE_Definitions.h | 559 +++++ .../scsi/SCSICmds_READ_CAPACITY_Definitions.h | 141 ++ .../scsi/SCSICmds_REPORT_LUNS_Definitions.h | 146 ++ .../IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h | 234 ++ .../IOKit/scsi/SCSICommandDefinitions.h | 479 ++++ .../IOKit/scsi/SCSICommandOperationCodes.h | 941 +++++++ i386/include/IOKit/scsi/SCSIPort.h | 77 + i386/include/IOKit/scsi/SCSITask.h | 456 ++++ i386/include/IOKit/scsi/spi/.svn/all-wcprops | 11 + i386/include/IOKit/scsi/spi/.svn/entries | 62 + ...SCSIParallelInterfaceController.h.svn-base | 1568 ++++++++++++ .../spi/IOSCSIParallelInterfaceController.h | 1568 ++++++++++++ i386/include/IOKit/serial/.svn/all-wcprops | 35 + i386/include/IOKit/serial/.svn/entries | 198 ++ .../IOModemSerialStreamSync.h.svn-base | 42 + .../IORS232SerialStreamSync.h.svn-base | 172 ++ .../text-base/IOSerialDriverSync.h.svn-base | 91 + .../.svn/text-base/IOSerialKeys.h.svn-base | 80 + .../text-base/IOSerialStreamSync.h.svn-base | 275 +++ .../IOKit/serial/IOModemSerialStreamSync.h | 42 + .../IOKit/serial/IORS232SerialStreamSync.h | 172 ++ .../include/IOKit/serial/IOSerialDriverSync.h | 91 + i386/include/IOKit/serial/IOSerialKeys.h | 80 + .../include/IOKit/serial/IOSerialStreamSync.h | 275 +++ i386/include/IOKit/storage/.svn/all-wcprops | 185 ++ i386/include/IOKit/storage/.svn/entries | 1051 ++++++++ .../text-base/IOAppleLabelScheme.h.svn-base | 191 ++ .../IOApplePartitionScheme.h.svn-base | 122 + .../IOBDBlockStorageDevice.h.svn-base | 157 ++ .../IOBDBlockStorageDriver.h.svn-base | 152 ++ .../.svn/text-base/IOBDMedia.h.svn-base | 297 +++ .../text-base/IOBDMediaBSDClient.h.svn-base | 182 ++ .../.svn/text-base/IOBDTypes.h.svn-base | 133 + .../text-base/IOBlockStorageDevice.h.svn-base | 80 + .../text-base/IOBlockStorageDriver.h.svn-base | 245 ++ .../IOCDBlockStorageDevice.h.svn-base | 60 + .../IOCDBlockStorageDriver.h.svn-base | 51 + .../.svn/text-base/IOCDMedia.h.svn-base | 553 +++++ .../text-base/IOCDMediaBSDClient.h.svn-base | 199 ++ .../text-base/IOCDPartitionScheme.h.svn-base | 226 ++ .../.svn/text-base/IOCDTypes.h.svn-base | 492 ++++ .../IODVDBlockStorageDevice.h.svn-base | 145 ++ .../IODVDBlockStorageDriver.h.svn-base | 219 ++ .../.svn/text-base/IODVDMedia.h.svn-base | 357 +++ .../text-base/IODVDMediaBSDClient.h.svn-base | 197 ++ .../.svn/text-base/IODVDTypes.h.svn-base | 451 ++++ .../IOFDiskPartitionScheme.h.svn-base | 105 + .../.svn/text-base/IOFilterScheme.h.svn-base | 289 +++ ...OFireWireStorageCharacteristics.h.svn-base | 63 + .../IOGUIDPartitionScheme.h.svn-base | 90 + .../storage/.svn/text-base/IOMedia.h.svn-base | 231 ++ .../text-base/IOMediaBSDClient.h.svn-base | 29 + .../text-base/IOPartitionScheme.h.svn-base | 373 +++ .../.svn/text-base/IOStorage.h.svn-base | 217 ++ .../IOStorageDeviceCharacteristics.h.svn-base | 659 +++++ ...OStorageProtocolCharacteristics.h.svn-base | 1758 ++++++++++++++ .../IOKit/storage/IOAppleLabelScheme.h | 191 ++ .../IOKit/storage/IOApplePartitionScheme.h | 122 + .../IOKit/storage/IOBDBlockStorageDevice.h | 157 ++ .../IOKit/storage/IOBDBlockStorageDriver.h | 152 ++ i386/include/IOKit/storage/IOBDMedia.h | 297 +++ .../IOKit/storage/IOBDMediaBSDClient.h | 182 ++ i386/include/IOKit/storage/IOBDTypes.h | 133 + .../IOKit/storage/IOBlockStorageDevice.h | 80 + .../IOKit/storage/IOBlockStorageDriver.h | 245 ++ .../IOKit/storage/IOCDBlockStorageDevice.h | 60 + .../IOKit/storage/IOCDBlockStorageDriver.h | 51 + i386/include/IOKit/storage/IOCDMedia.h | 553 +++++ .../IOKit/storage/IOCDMediaBSDClient.h | 199 ++ .../IOKit/storage/IOCDPartitionScheme.h | 226 ++ i386/include/IOKit/storage/IOCDTypes.h | 492 ++++ .../IOKit/storage/IODVDBlockStorageDevice.h | 145 ++ .../IOKit/storage/IODVDBlockStorageDriver.h | 219 ++ i386/include/IOKit/storage/IODVDMedia.h | 357 +++ .../IOKit/storage/IODVDMediaBSDClient.h | 197 ++ i386/include/IOKit/storage/IODVDTypes.h | 451 ++++ .../IOKit/storage/IOFDiskPartitionScheme.h | 105 + i386/include/IOKit/storage/IOFilterScheme.h | 289 +++ .../IOFireWireStorageCharacteristics.h | 63 + .../IOKit/storage/IOGUIDPartitionScheme.h | 90 + i386/include/IOKit/storage/IOMedia.h | 231 ++ i386/include/IOKit/storage/IOMediaBSDClient.h | 29 + .../include/IOKit/storage/IOPartitionScheme.h | 373 +++ i386/include/IOKit/storage/IOStorage.h | 217 ++ .../storage/IOStorageDeviceCharacteristics.h | 659 +++++ .../IOStorageProtocolCharacteristics.h | 1758 ++++++++++++++ .../IOKit/storage/ata/.svn/all-wcprops | 17 + i386/include/IOKit/storage/ata/.svn/entries | 96 + .../IOATAPIProtocolTransport.h.svn-base | 365 +++ .../text-base/IOATAStorageDefines.h.svn-base | 321 +++ .../storage/ata/IOATAPIProtocolTransport.h | 365 +++ .../IOKit/storage/ata/IOATAStorageDefines.h | 321 +++ i386/include/IOKit/stream/.svn/all-wcprops | 29 + i386/include/IOKit/stream/.svn/entries | 164 ++ .../stream/.svn/text-base/IOStream.h.svn-base | 609 +++++ .../.svn/text-base/IOStreamFamily.h.svn-base | 13 + .../.svn/text-base/IOStreamShared.h.svn-base | 175 ++ .../text-base/IOStreamUserClient.h.svn-base | 76 + i386/include/IOKit/stream/IOStream.h | 609 +++++ i386/include/IOKit/stream/IOStreamFamily.h | 13 + i386/include/IOKit/stream/IOStreamShared.h | 175 ++ .../include/IOKit/stream/IOStreamUserClient.h | 76 + i386/include/IOKit/system.h | 67 + .../IOKit/system_management/.svn/all-wcprops | 11 + .../IOKit/system_management/.svn/entries | 62 + .../.svn/text-base/IOWatchDogTimer.h.svn-base | 55 + .../IOKit/system_management/IOWatchDogTimer.h | 55 + i386/include/IOKit/usb/.svn/all-wcprops | 155 ++ i386/include/IOKit/usb/.svn/entries | 878 +++++++ .../text-base/IOUFIStorageServices.h.svn-base | 136 ++ .../usb/.svn/text-base/IOUSBBus.h.svn-base | 35 + .../.svn/text-base/IOUSBCommand.h.svn-base | 266 ++ .../text-base/IOUSBCompositeDriver.h.svn-base | 127 + .../.svn/text-base/IOUSBController.h.svn-base | 1073 ++++++++ .../IOUSBControllerListElement.h.svn-base | 126 + .../text-base/IOUSBControllerV2.h.svn-base | 374 +++ .../text-base/IOUSBControllerV3.h.svn-base | 233 ++ .../usb/.svn/text-base/IOUSBDevice.h.svn-base | 639 +++++ .../.svn/text-base/IOUSBHIDDriver.h.svn-base | 289 +++ .../.svn/text-base/IOUSBHubDevice.h.svn-base | 247 ++ .../text-base/IOUSBHubPolicyMaker.h.svn-base | 218 ++ .../.svn/text-base/IOUSBInterface.h.svn-base | 264 ++ .../usb/.svn/text-base/IOUSBLog.h.svn-base | 240 ++ .../IOUSBMassStorageClass.h.svn-base | 507 ++++ .../IOUSBMassStorageUFISubclass.h.svn-base | 355 +++ .../usb/.svn/text-base/IOUSBNub.h.svn-base | 69 + .../usb/.svn/text-base/IOUSBPipe.h.svn-base | 387 +++ .../text-base/IOUSBRootHubDevice.h.svn-base | 97 + .../.svn/text-base/IOUSBUserClient.h.svn-base | 144 ++ .../.svn/text-base/IOUSBWorkLoop.h.svn-base | 64 + .../IOKit/usb/.svn/text-base/USB.h.svn-base | 1076 ++++++++ .../usb/.svn/text-base/USBHub.h.svn-base | 240 ++ .../usb/.svn/text-base/USBSpec.h.svn-base | 470 ++++ .../.svn/text-base/USBTracepoints.h.svn-base | 662 +++++ i386/include/IOKit/usb/IOUFIStorageServices.h | 136 ++ i386/include/IOKit/usb/IOUSBBus.h | 35 + i386/include/IOKit/usb/IOUSBCommand.h | 266 ++ i386/include/IOKit/usb/IOUSBCompositeDriver.h | 127 + i386/include/IOKit/usb/IOUSBController.h | 1073 ++++++++ .../IOKit/usb/IOUSBControllerListElement.h | 126 + i386/include/IOKit/usb/IOUSBControllerV2.h | 374 +++ i386/include/IOKit/usb/IOUSBControllerV3.h | 233 ++ i386/include/IOKit/usb/IOUSBDevice.h | 639 +++++ i386/include/IOKit/usb/IOUSBHIDDriver.h | 289 +++ i386/include/IOKit/usb/IOUSBHubDevice.h | 247 ++ i386/include/IOKit/usb/IOUSBHubPolicyMaker.h | 218 ++ i386/include/IOKit/usb/IOUSBInterface.h | 264 ++ i386/include/IOKit/usb/IOUSBLog.h | 240 ++ .../include/IOKit/usb/IOUSBMassStorageClass.h | 507 ++++ .../IOKit/usb/IOUSBMassStorageUFISubclass.h | 355 +++ i386/include/IOKit/usb/IOUSBNub.h | 69 + i386/include/IOKit/usb/IOUSBPipe.h | 387 +++ i386/include/IOKit/usb/IOUSBRootHubDevice.h | 97 + i386/include/IOKit/usb/IOUSBUserClient.h | 144 ++ i386/include/IOKit/usb/IOUSBWorkLoop.h | 64 + i386/include/IOKit/usb/USB.h | 1076 ++++++++ i386/include/IOKit/usb/USBHub.h | 240 ++ i386/include/IOKit/usb/USBSpec.h | 470 ++++ i386/include/IOKit/usb/USBTracepoints.h | 662 +++++ i386/include/_structs.h | 25 + i386/include/_types.h | 68 + i386/include/architecture/alignment.h | 47 + i386/include/architecture/byte_order.h | 36 + i386/include/architecture/i386/alignment.h | 69 + i386/include/architecture/i386/asm_help.h | 398 +++ i386/include/architecture/i386/byte_order.h | 33 + i386/include/architecture/i386/cpu.h | 74 + i386/include/architecture/i386/desc.h | 150 ++ i386/include/architecture/i386/fenv.h | 287 +++ i386/include/architecture/i386/fpu.h | 170 ++ i386/include/architecture/i386/frame.h | 129 + i386/include/architecture/i386/io.h | 40 + i386/include/architecture/i386/math.h | 642 +++++ i386/include/architecture/i386/pio.h | 104 + i386/include/architecture/i386/reg_help.h | 105 + i386/include/architecture/i386/sel.h | 53 + i386/include/architecture/i386/table.h | 98 + i386/include/architecture/i386/tss.h | 120 + i386/include/assert.h | 92 + i386/include/ctype.h | 438 ++++ i386/include/device/.svn/all-wcprops | 17 + i386/include/device/.svn/entries | 96 + .../.svn/text-base/device_port.h.svn-base | 80 + .../.svn/text-base/device_types.h.svn-base | 141 ++ i386/include/device/device_port.h | 80 + i386/include/device/device_types.h | 141 ++ i386/include/errno.h | 24 + i386/include/float.h | 281 +++ i386/include/i386/_limits.h | 27 + i386/include/i386/_param.h | 46 + i386/include/i386/_structs.h | 105 + i386/include/i386/_types.h | 120 + i386/include/i386/eflags.h | 94 + i386/include/i386/endian.h | 102 + i386/include/i386/fasttrap_isa.h | 116 + i386/include/i386/limits.h | 107 + i386/include/i386/param.h | 169 ++ i386/include/i386/profile.h | 39 + i386/include/i386/setjmp.h | 80 + i386/include/i386/signal.h | 62 + i386/include/i386/types.h | 138 ++ i386/include/i386/user_ldt.h | 80 + i386/include/i386/vmparam.h | 62 + i386/include/inttypes.h | 321 +++ i386/include/libkern/OSAtomic.h | 209 ++ i386/include/libkern/OSByteOrder.h | 310 +++ i386/include/libkern/OSCacheControl.h | 65 + i386/include/libkern/OSDebug.h | 66 + i386/include/libkern/OSKextLib.h | 472 ++++ i386/include/libkern/OSReturn.h | 198 ++ i386/include/libkern/OSTypes.h | 131 + i386/include/libkern/_OSByteOrder.h | 133 + i386/include/libkern/crypto/md5.h | 79 + i386/include/libkern/crypto/sha1.h | 70 + i386/include/libkern/i386/OSByteOrder.h | 115 + i386/include/libkern/i386/_OSByteOrder.h | 104 + i386/include/libkern/machine/OSByteOrder.h | 143 ++ i386/include/libkern/ppc/OSByteOrder.h | 206 ++ i386/include/limits.h | 144 ++ i386/include/locale.h | 56 + i386/include/mach-o/arch.h | 105 + i386/include/mach-o/compact_unwind_encoding.h | 224 ++ i386/include/mach-o/dyld.h | 253 ++ i386/include/mach-o/dyld_images.h | 164 ++ i386/include/mach-o/fat.h | 64 + i386/include/mach-o/getsect.h | 131 + i386/include/mach-o/i386/swap.h | 96 + i386/include/mach-o/ldsyms.h | 133 + i386/include/mach-o/loader.h | 1402 +++++++++++ i386/include/mach-o/nlist.h | 312 +++ i386/include/mach-o/ranlib.h | 67 + i386/include/mach-o/reloc.h | 203 ++ i386/include/mach-o/stab.h | 122 + i386/include/mach-o/swap.h | 207 ++ i386/include/mach-o/x86_64/reloc.h | 185 ++ i386/include/mach/audit_triggers.defs | 49 + i386/include/mach/boolean.h | 88 + i386/include/mach/bootstrap.h | 34 + i386/include/mach/clock.defs | 81 + i386/include/mach/clock.h | 221 ++ i386/include/mach/clock_priv.defs | 69 + i386/include/mach/clock_priv.h | 175 ++ i386/include/mach/clock_reply.defs | 56 + i386/include/mach/clock_reply.h | 136 ++ i386/include/mach/clock_types.defs | 73 + i386/include/mach/clock_types.h | 126 + i386/include/mach/error.h | 114 + i386/include/mach/exc.defs | 119 + i386/include/mach/exc.h | 257 ++ i386/include/mach/exception.h | 62 + i386/include/mach/exception_types.h | 181 ++ i386/include/mach/host_info.h | 218 ++ i386/include/mach/host_notify.h | 37 + i386/include/mach/host_notify_reply.defs | 40 + i386/include/mach/host_priv.defs | 380 +++ i386/include/mach/host_priv.h | 1269 ++++++++++ i386/include/mach/host_reboot.h | 39 + i386/include/mach/host_security.defs | 101 + i386/include/mach/host_security.h | 197 ++ i386/include/mach/host_special_ports.h | 180 ++ i386/include/mach/i386/_structs.h | 561 +++++ i386/include/mach/i386/asm.h | 308 +++ i386/include/mach/i386/boolean.h | 74 + i386/include/mach/i386/exception.h | 135 ++ i386/include/mach/i386/fp_reg.h | 141 ++ i386/include/mach/i386/kern_return.h | 74 + i386/include/mach/i386/machine_types.defs | 127 + i386/include/mach/i386/ndr_def.h | 45 + i386/include/mach/i386/processor_info.h | 37 + i386/include/mach/i386/rpc.h | 36 + i386/include/mach/i386/sdt_isa.h | 412 ++++ i386/include/mach/i386/task.h | 1578 ++++++++++++ i386/include/mach/i386/thread_act.h | 1155 +++++++++ i386/include/mach/i386/thread_state.h | 42 + i386/include/mach/i386/thread_status.h | 297 +++ i386/include/mach/i386/vm_param.h | 157 ++ i386/include/mach/i386/vm_types.h | 140 ++ i386/include/mach/kern_return.h | 322 +++ i386/include/mach/kmod.h | 180 ++ i386/include/mach/ledger.defs | 79 + i386/include/mach/ledger.h | 259 ++ i386/include/mach/lock_set.defs | 79 + i386/include/mach/lock_set.h | 326 +++ i386/include/mach/mach.h | 133 + i386/include/mach/mach_error.h | 93 + i386/include/mach/mach_exc.defs | 119 + i386/include/mach/mach_host.defs | 257 ++ i386/include/mach/mach_host.h | 873 +++++++ i386/include/mach/mach_init.h | 130 + i386/include/mach/mach_interface.h | 54 + i386/include/mach/mach_param.h | 73 + i386/include/mach/mach_port.defs | 492 ++++ i386/include/mach/mach_port.h | 1383 +++++++++++ i386/include/mach/mach_syscalls.h | 37 + i386/include/mach/mach_time.h | 56 + i386/include/mach/mach_traps.h | 152 ++ i386/include/mach/mach_types.defs | 474 ++++ i386/include/mach/mach_types.h | 230 ++ i386/include/mach/mach_vm.defs | 480 ++++ i386/include/mach/mach_vm.h | 1032 ++++++++ i386/include/mach/machine.h | 344 +++ i386/include/mach/machine/asm.h | 42 + i386/include/mach/machine/boolean.h | 42 + i386/include/mach/machine/exception.h | 42 + i386/include/mach/machine/kern_return.h | 42 + i386/include/mach/machine/machine_types.defs | 44 + i386/include/mach/machine/ndr_def.h | 42 + i386/include/mach/machine/processor_info.h | 42 + i386/include/mach/machine/rpc.h | 42 + i386/include/mach/machine/sdt.h | 36 + i386/include/mach/machine/sdt_isa.h | 41 + i386/include/mach/machine/thread_state.h | 42 + i386/include/mach/machine/thread_status.h | 42 + i386/include/mach/machine/vm_param.h | 42 + i386/include/mach/machine/vm_types.h | 42 + i386/include/mach/memory_object_types.h | 271 +++ i386/include/mach/message.h | 783 ++++++ i386/include/mach/mig.h | 174 ++ i386/include/mach/mig_errors.h | 124 + i386/include/mach/ndr.h | 207 ++ i386/include/mach/notify.defs | 124 + i386/include/mach/notify.h | 132 + i386/include/mach/policy.h | 235 ++ i386/include/mach/port.h | 319 +++ i386/include/mach/port_obj.h | 103 + i386/include/mach/processor.defs | 128 + i386/include/mach/processor.h | 336 +++ i386/include/mach/processor_info.h | 153 ++ i386/include/mach/processor_set.defs | 161 ++ i386/include/mach/processor_set.h | 516 ++++ i386/include/mach/rpc.h | 135 ++ i386/include/mach/sdt.h | 32 + i386/include/mach/security.defs | 208 ++ i386/include/mach/semaphore.h | 78 + i386/include/mach/shared_memory_server.h | 147 ++ i386/include/mach/shared_region.h | 134 + i386/include/mach/std_types.defs | 150 ++ i386/include/mach/std_types.h | 72 + i386/include/mach/sync.h | 35 + i386/include/mach/sync_policy.h | 49 + i386/include/mach/task.defs | 393 +++ i386/include/mach/task.h | 40 + i386/include/mach/task_access.defs | 59 + i386/include/mach/task_info.h | 244 ++ i386/include/mach/task_ledger.h | 51 + i386/include/mach/task_policy.h | 129 + i386/include/mach/task_special_ports.h | 141 ++ i386/include/mach/thread_act.defs | 323 +++ i386/include/mach/thread_act.h | 40 + i386/include/mach/thread_info.h | 154 ++ i386/include/mach/thread_policy.h | 218 ++ i386/include/mach/thread_special_ports.h | 83 + i386/include/mach/thread_status.h | 94 + i386/include/mach/thread_switch.h | 77 + i386/include/mach/time_value.h | 96 + i386/include/mach/vm_attributes.h | 99 + i386/include/mach/vm_behavior.h | 78 + i386/include/mach/vm_inherit.h | 89 + i386/include/mach/vm_map.defs | 475 ++++ i386/include/mach/vm_map.h | 1378 +++++++++++ i386/include/mach/vm_param.h | 73 + i386/include/mach/vm_prot.h | 141 ++ i386/include/mach/vm_purgable.h | 134 + i386/include/mach/vm_region.h | 320 +++ i386/include/mach/vm_statistics.h | 335 +++ i386/include/mach/vm_sync.h | 80 + i386/include/mach/vm_task.h | 34 + i386/include/mach/vm_types.h | 93 + i386/include/mach/x86_64/.svn/all-wcprops | 17 + i386/include/mach/x86_64/.svn/entries | 96 + .../x86_64/.svn/text-base/task.h.svn-base | 1578 ++++++++++++ .../.svn/text-base/thread_act.h.svn-base | 1155 +++++++++ i386/include/mach/x86_64/task.h | 1578 ++++++++++++ i386/include/mach/x86_64/thread_act.h | 1155 +++++++++ i386/include/machine/_limits.h | 41 + i386/include/machine/_param.h | 36 + i386/include/machine/_structs.h | 36 + i386/include/machine/_types.h | 41 + i386/include/machine/byte_order.h | 37 + i386/include/machine/endian.h | 44 + i386/include/machine/fasttrap_isa.h | 41 + i386/include/machine/limits.h | 13 + i386/include/machine/param.h | 44 + i386/include/machine/profile.h | 46 + i386/include/machine/setjmp.h | 44 + i386/include/machine/signal.h | 41 + i386/include/machine/types.h | 44 + i386/include/machine/vmparam.h | 41 + i386/include/math.h | 35 + i386/include/pexpert/boot.h | 33 + i386/include/pexpert/i386/boot.h | 177 ++ i386/include/pexpert/i386/efi.h | 558 +++++ i386/include/pexpert/i386/protos.h | 95 + i386/include/pexpert/machine/boot.h | 39 + i386/include/pexpert/machine/protos.h | 39 + i386/include/pexpert/pexpert.h | 306 +++ i386/include/pexpert/protos.h | 32 + i386/include/runetype.h | 136 ++ i386/include/setjmp.h | 28 + i386/include/signal.h | 187 ++ i386/include/stdarg.h | 133 + i386/include/stdbool.h | 46 + i386/include/stddef.h | 130 + i386/include/stdint.h | 253 ++ i386/include/stdio.h | 503 ++++ i386/include/stdlib.h | 320 +++ i386/include/string.h | 154 ++ i386/include/sys/_endian.h | 139 ++ i386/include/sys/_select.h | 52 + i386/include/sys/_structs.h | 236 ++ i386/include/sys/_types.h | 84 + i386/include/sys/appleapiopts.h | 62 + i386/include/sys/buf.h | 859 +++++++ i386/include/sys/cdefs.h | 583 +++++ i386/include/sys/disk.h | 139 ++ i386/include/sys/kernel_types.h | 143 ++ i386/include/sys/param.h | 250 ++ i386/include/sys/reboot.h | 129 + i386/include/sys/select.h | 157 ++ i386/include/sys/socket.h | 629 +++++ i386/include/sys/syscall.h | 477 ++++ i386/include/sys/syslimits.h | 117 + i386/include/sys/time.h | 221 ++ i386/include/sys/types.h | 239 ++ i386/include/sys/unistd.h | 181 ++ i386/include/sys/vnode.h | 119 + i386/include/time.h | 213 ++ i386/include/unistd.h | 623 +++++ i386/include/unwind.h | 245 ++ i386/libsa/Makefile | 10 +- i386/libsaio/Makefile | 9 +- i386/libsaio/smbios/static_data.h | 2 +- i386/libsaio/stringTable.c | 26 +- i386/util/Makefile | 11 +- i386/util/ld_classic | Bin 425120 -> 0 bytes i386/util/ld_classic.1 | 1823 -------------- i386/util/machOconv.c | 221 +- i386/util/md.1 | 121 - i386/util/md.c | 726 ------ i386/util/segsize.c | 128 + 729 files changed, 191890 insertions(+), 2869 deletions(-) create mode 100644 i386/include/IOKit/IOBSD.h create mode 100644 i386/include/IOKit/IOBufferMemoryDescriptor.h create mode 100644 i386/include/IOKit/IOCatalogue.h create mode 100644 i386/include/IOKit/IOCommand.h create mode 100644 i386/include/IOKit/IOCommandGate.h create mode 100644 i386/include/IOKit/IOCommandPool.h create mode 100644 i386/include/IOKit/IOConditionLock.h create mode 100644 i386/include/IOKit/IODMACommand.h create mode 100644 i386/include/IOKit/IODMAController.h create mode 100644 i386/include/IOKit/IODMAEventSource.h create mode 100644 i386/include/IOKit/IODataQueue.h create mode 100644 i386/include/IOKit/IODataQueueShared.h create mode 100644 i386/include/IOKit/IODeviceMemory.h create mode 100644 i386/include/IOKit/IODeviceTreeSupport.h create mode 100644 i386/include/IOKit/IOEventSource.h create mode 100644 i386/include/IOKit/IOFilterInterruptEventSource.h create mode 100644 i386/include/IOKit/IOInterleavedMemoryDescriptor.h create mode 100644 i386/include/IOKit/IOInterruptController.h create mode 100644 i386/include/IOKit/IOInterruptEventSource.h create mode 100644 i386/include/IOKit/IOInterrupts.h create mode 100644 i386/include/IOKit/IOKitDebug.h create mode 100644 i386/include/IOKit/IOKitKeys.h create mode 100644 i386/include/IOKit/IOKitServer.h create mode 100644 i386/include/IOKit/IOLib.h create mode 100644 i386/include/IOKit/IOLocks.h create mode 100644 i386/include/IOKit/IOMapper.h create mode 100644 i386/include/IOKit/IOMemoryCursor.h create mode 100644 i386/include/IOKit/IOMemoryDescriptor.h create mode 100644 i386/include/IOKit/IOMessage.h create mode 100644 i386/include/IOKit/IOMultiMemoryDescriptor.h create mode 100644 i386/include/IOKit/IONVRAM.h create mode 100644 i386/include/IOKit/IONotifier.h create mode 100644 i386/include/IOKit/IOPlatformExpert.h create mode 100644 i386/include/IOKit/IORangeAllocator.h create mode 100644 i386/include/IOKit/IORegistryEntry.h create mode 100644 i386/include/IOKit/IOReturn.h create mode 100644 i386/include/IOKit/IOService.h create mode 100644 i386/include/IOKit/IOServicePM.h create mode 100644 i386/include/IOKit/IOSharedDataQueue.h create mode 100644 i386/include/IOKit/IOSharedLock.h create mode 100644 i386/include/IOKit/IOSubMemoryDescriptor.h create mode 100644 i386/include/IOKit/IOSyncer.h create mode 100644 i386/include/IOKit/IOTimeStamp.h create mode 100644 i386/include/IOKit/IOTimerEventSource.h create mode 100644 i386/include/IOKit/IOTypes.h create mode 100644 i386/include/IOKit/IOUserClient.h create mode 100644 i386/include/IOKit/IOWorkLoop.h create mode 100644 i386/include/IOKit/OSMessageNotification.h create mode 100644 i386/include/IOKit/acpi/IOACPIPlatformDevice.h create mode 100644 i386/include/IOKit/acpi/IOACPIPlatformExpert.h create mode 100644 i386/include/IOKit/acpi/IOACPITypes.h create mode 100644 i386/include/IOKit/assert.h create mode 100644 i386/include/IOKit/ata/ATADeviceNub.h create mode 100644 i386/include/IOKit/ata/ATATimerEventSource.h create mode 100644 i386/include/IOKit/ata/IOATABusCommand.h create mode 100644 i386/include/IOKit/ata/IOATABusInfo.h create mode 100644 i386/include/IOKit/ata/IOATACommand.h create mode 100644 i386/include/IOKit/ata/IOATAController.h create mode 100644 i386/include/IOKit/ata/IOATADevConfig.h create mode 100644 i386/include/IOKit/ata/IOATADevice.h create mode 100644 i386/include/IOKit/ata/IOATARegI386.h create mode 100644 i386/include/IOKit/ata/IOATATypes.h create mode 100644 i386/include/IOKit/ata/IOPCIATA.h create mode 100644 i386/include/IOKit/ata/MacIOATA.h create mode 100644 i386/include/IOKit/audio/IOAudioControl.h create mode 100644 i386/include/IOKit/audio/IOAudioControlUserClient.h create mode 100644 i386/include/IOKit/audio/IOAudioDebug.h create mode 100644 i386/include/IOKit/audio/IOAudioDefines.h create mode 100644 i386/include/IOKit/audio/IOAudioDevice.h create mode 100644 i386/include/IOKit/audio/IOAudioEngine.h create mode 100644 i386/include/IOKit/audio/IOAudioEngineUserClient.h create mode 100644 i386/include/IOKit/audio/IOAudioLevelControl.h create mode 100644 i386/include/IOKit/audio/IOAudioPort.h create mode 100644 i386/include/IOKit/audio/IOAudioSelectorControl.h create mode 100644 i386/include/IOKit/audio/IOAudioStream.h create mode 100644 i386/include/IOKit/audio/IOAudioToggleControl.h create mode 100644 i386/include/IOKit/audio/IOAudioTypes.h create mode 100644 i386/include/IOKit/avc/IOFireWireAVCCommand.h create mode 100644 i386/include/IOKit/avc/IOFireWireAVCConsts.h create mode 100644 i386/include/IOKit/avc/IOFireWireAVCRequestSpace.h create mode 100644 i386/include/IOKit/avc/IOFireWireAVCTargetSpace.h create mode 100644 i386/include/IOKit/avc/IOFireWireAVCUnit.h create mode 100644 i386/include/IOKit/avc/IOFireWireAVCUserClientCommon.h create mode 100644 i386/include/IOKit/avc/IOFireWirePCRSpace.h create mode 100644 i386/include/IOKit/bluetooth/Bluetooth.h create mode 100644 i386/include/IOKit/bluetooth/BluetoothAssignedNumbers.h create mode 100644 i386/include/IOKit/bluetooth/IOBluetoothHCIController.h create mode 100644 i386/include/IOKit/bluetooth/IOBluetoothHCIRequest.h create mode 100644 i386/include/IOKit/bluetooth/IOBluetoothHIDDriver.h create mode 100644 i386/include/IOKit/bluetooth/IOBluetoothHIDDriverTypes.h create mode 100644 i386/include/IOKit/bluetooth/IOBluetoothInternal.h create mode 100644 i386/include/IOKit/bluetooth/IOBluetoothTypes.h create mode 100644 i386/include/IOKit/firewire/IOConfigDirectory.h create mode 100644 i386/include/IOKit/firewire/IOFWAddressSpace.h create mode 100644 i386/include/IOKit/firewire/IOFWAsyncStreamListener.h create mode 100644 i386/include/IOKit/firewire/IOFWCommand.h create mode 100644 i386/include/IOKit/firewire/IOFWDCL.h create mode 100644 i386/include/IOKit/firewire/IOFWDCLPool.h create mode 100644 i386/include/IOKit/firewire/IOFWDCLProgram.h create mode 100644 i386/include/IOKit/firewire/IOFWDCLTranslator.h create mode 100644 i386/include/IOKit/firewire/IOFWIsochChannel.h create mode 100644 i386/include/IOKit/firewire/IOFWIsochPort.h create mode 100644 i386/include/IOKit/firewire/IOFWLocalIsochPort.h create mode 100644 i386/include/IOKit/firewire/IOFWPHYPacketListener.h create mode 100644 i386/include/IOKit/firewire/IOFWPhysicalAddressSpace.h create mode 100644 i386/include/IOKit/firewire/IOFWPseudoAddressSpace.h create mode 100644 i386/include/IOKit/firewire/IOFWRegs.h create mode 100644 i386/include/IOKit/firewire/IOFWSimpleContiguousPhysicalAddressSpace.h create mode 100644 i386/include/IOKit/firewire/IOFWSimplePhysicalAddressSpace.h create mode 100644 i386/include/IOKit/firewire/IOFWSyncer.h create mode 100644 i386/include/IOKit/firewire/IOFWUserObjectExporter.h create mode 100644 i386/include/IOKit/firewire/IOFWUtils.h create mode 100644 i386/include/IOKit/firewire/IOFireWireBus.h create mode 100644 i386/include/IOKit/firewire/IOFireWireController.h create mode 100644 i386/include/IOKit/firewire/IOFireWireDevice.h create mode 100644 i386/include/IOKit/firewire/IOFireWireFamilyCommon.h create mode 100644 i386/include/IOKit/firewire/IOFireWireIRMAllocation.h create mode 100644 i386/include/IOKit/firewire/IOFireWireLocalNode.h create mode 100644 i386/include/IOKit/firewire/IOFireWireMultiIsochReceive.h create mode 100644 i386/include/IOKit/firewire/IOFireWireNub.h create mode 100644 i386/include/IOKit/firewire/IOFireWirePowerManager.h create mode 100644 i386/include/IOKit/firewire/IOFireWireUnit.h create mode 100644 i386/include/IOKit/firewire/IOLocalConfigDirectory.h create mode 100644 i386/include/IOKit/firewire/IORemoteConfigDirectory.h create mode 100644 i386/include/IOKit/graphics/IOAccelClientConnect.h create mode 100644 i386/include/IOKit/graphics/IOAccelSurfaceConnect.h create mode 100644 i386/include/IOKit/graphics/IOAccelTypes.h create mode 100644 i386/include/IOKit/graphics/IOAccelerator.h create mode 100644 i386/include/IOKit/graphics/IODisplay.h create mode 100644 i386/include/IOKit/graphics/IOFramebuffer.h create mode 100644 i386/include/IOKit/graphics/IOFramebufferShared.h create mode 100644 i386/include/IOKit/graphics/IOGraphicsDevice.h create mode 100644 i386/include/IOKit/graphics/IOGraphicsEngine.h create mode 100644 i386/include/IOKit/graphics/IOGraphicsInterfaceTypes.h create mode 100644 i386/include/IOKit/graphics/IOGraphicsTypes.h create mode 100644 i386/include/IOKit/hid/IOHIDDevice.h create mode 100644 i386/include/IOKit/hid/IOHIDElement.h create mode 100644 i386/include/IOKit/hid/IOHIDInterface.h create mode 100644 i386/include/IOKit/hid/IOHIDKeys.h create mode 100644 i386/include/IOKit/hid/IOHIDUsageTables.h create mode 100644 i386/include/IOKit/hidevent/IOHIDEventDriver.h create mode 100644 i386/include/IOKit/hidevent/IOHIDEventService.h create mode 100644 i386/include/IOKit/hidsystem/IOHIDDescriptorParser.h create mode 100644 i386/include/IOKit/hidsystem/IOHIDParameter.h create mode 100644 i386/include/IOKit/hidsystem/IOHIDShared.h create mode 100644 i386/include/IOKit/hidsystem/IOHIDSystem.h create mode 100644 i386/include/IOKit/hidsystem/IOHIDTypes.h create mode 100644 i386/include/IOKit/hidsystem/IOHIDUsageTables.h create mode 100644 i386/include/IOKit/hidsystem/IOHIDevice.h create mode 100644 i386/include/IOKit/hidsystem/IOHIKeyboard.h create mode 100644 i386/include/IOKit/hidsystem/IOHIKeyboardMapper.h create mode 100644 i386/include/IOKit/hidsystem/IOHIPointing.h create mode 100644 i386/include/IOKit/hidsystem/IOLLEvent.h create mode 100644 i386/include/IOKit/hidsystem/ev_keymap.h create mode 100644 i386/include/IOKit/i2c/IOI2CInterface.h create mode 100644 i386/include/IOKit/ndrvsupport/IOMacOSTypes.h create mode 100644 i386/include/IOKit/ndrvsupport/IOMacOSVideo.h create mode 100644 i386/include/IOKit/ndrvsupport/IONDRVFramebuffer.h create mode 100644 i386/include/IOKit/ndrvsupport/IONDRVLibraries.h create mode 100644 i386/include/IOKit/ndrvsupport/IONDRVSupport.h create mode 100644 i386/include/IOKit/network/IOBasicOutputQueue.h create mode 100644 i386/include/IOKit/network/IOEthernetController.h create mode 100644 i386/include/IOKit/network/IOEthernetInterface.h create mode 100644 i386/include/IOKit/network/IOEthernetStats.h create mode 100644 i386/include/IOKit/network/IOGatedOutputQueue.h create mode 100644 i386/include/IOKit/network/IOKernelDebugger.h create mode 100644 i386/include/IOKit/network/IOMbufMemoryCursor.h create mode 100644 i386/include/IOKit/network/IONetworkController.h create mode 100644 i386/include/IOKit/network/IONetworkData.h create mode 100644 i386/include/IOKit/network/IONetworkInterface.h create mode 100644 i386/include/IOKit/network/IONetworkMedium.h create mode 100644 i386/include/IOKit/network/IONetworkStats.h create mode 100644 i386/include/IOKit/network/IOOutputQueue.h create mode 100644 i386/include/IOKit/network/IOPacketQueue.h create mode 100644 i386/include/IOKit/nvram/IONVRAMController.h create mode 100644 i386/include/IOKit/pci/IOAGPDevice.h create mode 100644 i386/include/IOKit/pci/IOPCIBridge.h create mode 100644 i386/include/IOKit/pci/IOPCIDevice.h create mode 100644 i386/include/IOKit/platform/.svn/all-wcprops create mode 100644 i386/include/IOKit/platform/.svn/entries create mode 100644 i386/include/IOKit/platform/.svn/text-base/AppleMacIO.h.svn-base create mode 100644 i386/include/IOKit/platform/.svn/text-base/AppleMacIODevice.h.svn-base create mode 100644 i386/include/IOKit/platform/.svn/text-base/AppleNMI.h.svn-base create mode 100644 i386/include/IOKit/platform/.svn/text-base/ApplePlatformExpert.h.svn-base create mode 100644 i386/include/IOKit/platform/AppleMacIO.h create mode 100644 i386/include/IOKit/platform/AppleMacIODevice.h create mode 100644 i386/include/IOKit/platform/AppleNMI.h create mode 100644 i386/include/IOKit/platform/ApplePlatformExpert.h create mode 100644 i386/include/IOKit/power/.svn/all-wcprops create mode 100644 i386/include/IOKit/power/.svn/entries create mode 100644 i386/include/IOKit/power/.svn/text-base/IOPwrController.h.svn-base create mode 100644 i386/include/IOKit/power/IOPwrController.h create mode 100644 i386/include/IOKit/ppc/.svn/all-wcprops create mode 100644 i386/include/IOKit/ppc/.svn/entries create mode 100644 i386/include/IOKit/ppc/.svn/text-base/IODBDMA.h.svn-base create mode 100644 i386/include/IOKit/ppc/IODBDMA.h create mode 100644 i386/include/IOKit/pwr_mgt/.svn/all-wcprops create mode 100644 i386/include/IOKit/pwr_mgt/.svn/entries create mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/IOPM.h.svn-base create mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMDeprecated.h.svn-base create mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMLibDefs.h.svn-base create mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPowerSource.h.svn-base create mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPowerSourceList.h.svn-base create mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPrivate.h.svn-base create mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMpowerState.h.svn-base create mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/IOPowerConnection.h.svn-base create mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/RootDomain.h.svn-base create mode 100644 i386/include/IOKit/pwr_mgt/IOPM.h create mode 100644 i386/include/IOKit/pwr_mgt/IOPMDeprecated.h create mode 100644 i386/include/IOKit/pwr_mgt/IOPMLibDefs.h create mode 100644 i386/include/IOKit/pwr_mgt/IOPMPowerSource.h create mode 100644 i386/include/IOKit/pwr_mgt/IOPMPowerSourceList.h create mode 100644 i386/include/IOKit/pwr_mgt/IOPMPrivate.h create mode 100644 i386/include/IOKit/pwr_mgt/IOPMpowerState.h create mode 100644 i386/include/IOKit/pwr_mgt/IOPowerConnection.h create mode 100644 i386/include/IOKit/pwr_mgt/RootDomain.h create mode 100644 i386/include/IOKit/rtc/.svn/all-wcprops create mode 100644 i386/include/IOKit/rtc/.svn/entries create mode 100644 i386/include/IOKit/rtc/.svn/text-base/IORTCController.h.svn-base create mode 100644 i386/include/IOKit/rtc/IORTCController.h create mode 100644 i386/include/IOKit/sbp2/.svn/all-wcprops create mode 100644 i386/include/IOKit/sbp2/.svn/entries create mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2LSIWorkaroundDescriptor.h.svn-base create mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2LUN.h.svn-base create mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2Login.h.svn-base create mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2ManagementORB.h.svn-base create mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2ORB.h.svn-base create mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2Target.h.svn-base create mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2UserClient.h.svn-base create mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2UserClientCommon.h.svn-base create mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSerialBusProtocolTransport.h.svn-base create mode 100644 i386/include/IOKit/sbp2/IOFireWireSBP2LSIWorkaroundDescriptor.h create mode 100644 i386/include/IOKit/sbp2/IOFireWireSBP2LUN.h create mode 100644 i386/include/IOKit/sbp2/IOFireWireSBP2Login.h create mode 100644 i386/include/IOKit/sbp2/IOFireWireSBP2ManagementORB.h create mode 100644 i386/include/IOKit/sbp2/IOFireWireSBP2ORB.h create mode 100644 i386/include/IOKit/sbp2/IOFireWireSBP2Target.h create mode 100644 i386/include/IOKit/sbp2/IOFireWireSBP2UserClient.h create mode 100644 i386/include/IOKit/sbp2/IOFireWireSBP2UserClientCommon.h create mode 100644 i386/include/IOKit/sbp2/IOFireWireSerialBusProtocolTransport.h create mode 100644 i386/include/IOKit/scsi/.svn/all-wcprops create mode 100644 i386/include/IOKit/scsi/.svn/entries create mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOBDServices.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOBlockStorageServices.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOCompactDiscServices.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/IODVDServices.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOReducedBlockServices.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIBlockCommandsDevice.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIMultimediaCommandsDevice.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceNub.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType00.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType05.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType07.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType0E.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIPrimaryCommandsDevice.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIProtocolInterface.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIProtocolServices.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIReducedBlockCommandsDevice.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSICmds_INQUIRY_Definitions.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSICmds_MODE_Definitions.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSICmds_READ_CAPACITY_Definitions.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSICmds_REPORT_LUNS_Definitions.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSICmds_REQUEST_SENSE_Defs.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSICommandDefinitions.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSICommandOperationCodes.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSIPort.h.svn-base create mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSITask.h.svn-base create mode 100644 i386/include/IOKit/scsi/IOBDServices.h create mode 100644 i386/include/IOKit/scsi/IOBlockStorageServices.h create mode 100644 i386/include/IOKit/scsi/IOCompactDiscServices.h create mode 100644 i386/include/IOKit/scsi/IODVDServices.h create mode 100644 i386/include/IOKit/scsi/IOReducedBlockServices.h create mode 100644 i386/include/IOKit/scsi/IOSCSIBlockCommandsDevice.h create mode 100644 i386/include/IOKit/scsi/IOSCSIMultimediaCommandsDevice.h create mode 100644 i386/include/IOKit/scsi/IOSCSIPeripheralDeviceNub.h create mode 100644 i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType00.h create mode 100644 i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType05.h create mode 100644 i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType07.h create mode 100644 i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType0E.h create mode 100644 i386/include/IOKit/scsi/IOSCSIPrimaryCommandsDevice.h create mode 100644 i386/include/IOKit/scsi/IOSCSIProtocolInterface.h create mode 100644 i386/include/IOKit/scsi/IOSCSIProtocolServices.h create mode 100644 i386/include/IOKit/scsi/IOSCSIReducedBlockCommandsDevice.h create mode 100644 i386/include/IOKit/scsi/SCSICmds_INQUIRY_Definitions.h create mode 100644 i386/include/IOKit/scsi/SCSICmds_MODE_Definitions.h create mode 100644 i386/include/IOKit/scsi/SCSICmds_READ_CAPACITY_Definitions.h create mode 100644 i386/include/IOKit/scsi/SCSICmds_REPORT_LUNS_Definitions.h create mode 100644 i386/include/IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h create mode 100644 i386/include/IOKit/scsi/SCSICommandDefinitions.h create mode 100644 i386/include/IOKit/scsi/SCSICommandOperationCodes.h create mode 100644 i386/include/IOKit/scsi/SCSIPort.h create mode 100644 i386/include/IOKit/scsi/SCSITask.h create mode 100644 i386/include/IOKit/scsi/spi/.svn/all-wcprops create mode 100644 i386/include/IOKit/scsi/spi/.svn/entries create mode 100644 i386/include/IOKit/scsi/spi/.svn/text-base/IOSCSIParallelInterfaceController.h.svn-base create mode 100644 i386/include/IOKit/scsi/spi/IOSCSIParallelInterfaceController.h create mode 100644 i386/include/IOKit/serial/.svn/all-wcprops create mode 100644 i386/include/IOKit/serial/.svn/entries create mode 100644 i386/include/IOKit/serial/.svn/text-base/IOModemSerialStreamSync.h.svn-base create mode 100644 i386/include/IOKit/serial/.svn/text-base/IORS232SerialStreamSync.h.svn-base create mode 100644 i386/include/IOKit/serial/.svn/text-base/IOSerialDriverSync.h.svn-base create mode 100644 i386/include/IOKit/serial/.svn/text-base/IOSerialKeys.h.svn-base create mode 100644 i386/include/IOKit/serial/.svn/text-base/IOSerialStreamSync.h.svn-base create mode 100644 i386/include/IOKit/serial/IOModemSerialStreamSync.h create mode 100644 i386/include/IOKit/serial/IORS232SerialStreamSync.h create mode 100644 i386/include/IOKit/serial/IOSerialDriverSync.h create mode 100644 i386/include/IOKit/serial/IOSerialKeys.h create mode 100644 i386/include/IOKit/serial/IOSerialStreamSync.h create mode 100644 i386/include/IOKit/storage/.svn/all-wcprops create mode 100644 i386/include/IOKit/storage/.svn/entries create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOAppleLabelScheme.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOApplePartitionScheme.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOBDBlockStorageDevice.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOBDBlockStorageDriver.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOBDMedia.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOBDMediaBSDClient.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOBDTypes.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOBlockStorageDevice.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOBlockStorageDriver.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOCDBlockStorageDevice.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOCDBlockStorageDriver.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOCDMedia.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOCDMediaBSDClient.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOCDPartitionScheme.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOCDTypes.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IODVDBlockStorageDevice.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IODVDBlockStorageDriver.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IODVDMedia.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IODVDMediaBSDClient.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IODVDTypes.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOFDiskPartitionScheme.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOFilterScheme.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOFireWireStorageCharacteristics.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOGUIDPartitionScheme.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOMedia.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOMediaBSDClient.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOPartitionScheme.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOStorage.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOStorageDeviceCharacteristics.h.svn-base create mode 100644 i386/include/IOKit/storage/.svn/text-base/IOStorageProtocolCharacteristics.h.svn-base create mode 100644 i386/include/IOKit/storage/IOAppleLabelScheme.h create mode 100644 i386/include/IOKit/storage/IOApplePartitionScheme.h create mode 100644 i386/include/IOKit/storage/IOBDBlockStorageDevice.h create mode 100644 i386/include/IOKit/storage/IOBDBlockStorageDriver.h create mode 100644 i386/include/IOKit/storage/IOBDMedia.h create mode 100644 i386/include/IOKit/storage/IOBDMediaBSDClient.h create mode 100644 i386/include/IOKit/storage/IOBDTypes.h create mode 100644 i386/include/IOKit/storage/IOBlockStorageDevice.h create mode 100644 i386/include/IOKit/storage/IOBlockStorageDriver.h create mode 100644 i386/include/IOKit/storage/IOCDBlockStorageDevice.h create mode 100644 i386/include/IOKit/storage/IOCDBlockStorageDriver.h create mode 100644 i386/include/IOKit/storage/IOCDMedia.h create mode 100644 i386/include/IOKit/storage/IOCDMediaBSDClient.h create mode 100644 i386/include/IOKit/storage/IOCDPartitionScheme.h create mode 100644 i386/include/IOKit/storage/IOCDTypes.h create mode 100644 i386/include/IOKit/storage/IODVDBlockStorageDevice.h create mode 100644 i386/include/IOKit/storage/IODVDBlockStorageDriver.h create mode 100644 i386/include/IOKit/storage/IODVDMedia.h create mode 100644 i386/include/IOKit/storage/IODVDMediaBSDClient.h create mode 100644 i386/include/IOKit/storage/IODVDTypes.h create mode 100644 i386/include/IOKit/storage/IOFDiskPartitionScheme.h create mode 100644 i386/include/IOKit/storage/IOFilterScheme.h create mode 100644 i386/include/IOKit/storage/IOFireWireStorageCharacteristics.h create mode 100644 i386/include/IOKit/storage/IOGUIDPartitionScheme.h create mode 100644 i386/include/IOKit/storage/IOMedia.h create mode 100644 i386/include/IOKit/storage/IOMediaBSDClient.h create mode 100644 i386/include/IOKit/storage/IOPartitionScheme.h create mode 100644 i386/include/IOKit/storage/IOStorage.h create mode 100644 i386/include/IOKit/storage/IOStorageDeviceCharacteristics.h create mode 100644 i386/include/IOKit/storage/IOStorageProtocolCharacteristics.h create mode 100644 i386/include/IOKit/storage/ata/.svn/all-wcprops create mode 100644 i386/include/IOKit/storage/ata/.svn/entries create mode 100644 i386/include/IOKit/storage/ata/.svn/text-base/IOATAPIProtocolTransport.h.svn-base create mode 100644 i386/include/IOKit/storage/ata/.svn/text-base/IOATAStorageDefines.h.svn-base create mode 100644 i386/include/IOKit/storage/ata/IOATAPIProtocolTransport.h create mode 100644 i386/include/IOKit/storage/ata/IOATAStorageDefines.h create mode 100644 i386/include/IOKit/stream/.svn/all-wcprops create mode 100644 i386/include/IOKit/stream/.svn/entries create mode 100644 i386/include/IOKit/stream/.svn/text-base/IOStream.h.svn-base create mode 100644 i386/include/IOKit/stream/.svn/text-base/IOStreamFamily.h.svn-base create mode 100644 i386/include/IOKit/stream/.svn/text-base/IOStreamShared.h.svn-base create mode 100644 i386/include/IOKit/stream/.svn/text-base/IOStreamUserClient.h.svn-base create mode 100644 i386/include/IOKit/stream/IOStream.h create mode 100644 i386/include/IOKit/stream/IOStreamFamily.h create mode 100644 i386/include/IOKit/stream/IOStreamShared.h create mode 100644 i386/include/IOKit/stream/IOStreamUserClient.h create mode 100644 i386/include/IOKit/system.h create mode 100644 i386/include/IOKit/system_management/.svn/all-wcprops create mode 100644 i386/include/IOKit/system_management/.svn/entries create mode 100644 i386/include/IOKit/system_management/.svn/text-base/IOWatchDogTimer.h.svn-base create mode 100644 i386/include/IOKit/system_management/IOWatchDogTimer.h create mode 100644 i386/include/IOKit/usb/.svn/all-wcprops create mode 100644 i386/include/IOKit/usb/.svn/entries create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUFIStorageServices.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBBus.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBCommand.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBCompositeDriver.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBController.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBControllerListElement.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBControllerV2.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBControllerV3.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBDevice.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBHIDDriver.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBHubDevice.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBHubPolicyMaker.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBInterface.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBLog.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBMassStorageClass.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBMassStorageUFISubclass.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBNub.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBPipe.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBRootHubDevice.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBUserClient.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBWorkLoop.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/USB.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/USBHub.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/USBSpec.h.svn-base create mode 100644 i386/include/IOKit/usb/.svn/text-base/USBTracepoints.h.svn-base create mode 100644 i386/include/IOKit/usb/IOUFIStorageServices.h create mode 100644 i386/include/IOKit/usb/IOUSBBus.h create mode 100644 i386/include/IOKit/usb/IOUSBCommand.h create mode 100644 i386/include/IOKit/usb/IOUSBCompositeDriver.h create mode 100644 i386/include/IOKit/usb/IOUSBController.h create mode 100644 i386/include/IOKit/usb/IOUSBControllerListElement.h create mode 100644 i386/include/IOKit/usb/IOUSBControllerV2.h create mode 100644 i386/include/IOKit/usb/IOUSBControllerV3.h create mode 100644 i386/include/IOKit/usb/IOUSBDevice.h create mode 100644 i386/include/IOKit/usb/IOUSBHIDDriver.h create mode 100644 i386/include/IOKit/usb/IOUSBHubDevice.h create mode 100644 i386/include/IOKit/usb/IOUSBHubPolicyMaker.h create mode 100644 i386/include/IOKit/usb/IOUSBInterface.h create mode 100644 i386/include/IOKit/usb/IOUSBLog.h create mode 100644 i386/include/IOKit/usb/IOUSBMassStorageClass.h create mode 100644 i386/include/IOKit/usb/IOUSBMassStorageUFISubclass.h create mode 100644 i386/include/IOKit/usb/IOUSBNub.h create mode 100644 i386/include/IOKit/usb/IOUSBPipe.h create mode 100644 i386/include/IOKit/usb/IOUSBRootHubDevice.h create mode 100644 i386/include/IOKit/usb/IOUSBUserClient.h create mode 100644 i386/include/IOKit/usb/IOUSBWorkLoop.h create mode 100644 i386/include/IOKit/usb/USB.h create mode 100644 i386/include/IOKit/usb/USBHub.h create mode 100644 i386/include/IOKit/usb/USBSpec.h create mode 100644 i386/include/IOKit/usb/USBTracepoints.h create mode 100644 i386/include/_structs.h create mode 100644 i386/include/_types.h create mode 100644 i386/include/architecture/alignment.h create mode 100644 i386/include/architecture/byte_order.h create mode 100644 i386/include/architecture/i386/alignment.h create mode 100644 i386/include/architecture/i386/asm_help.h create mode 100644 i386/include/architecture/i386/byte_order.h create mode 100644 i386/include/architecture/i386/cpu.h create mode 100644 i386/include/architecture/i386/desc.h create mode 100644 i386/include/architecture/i386/fenv.h create mode 100644 i386/include/architecture/i386/fpu.h create mode 100644 i386/include/architecture/i386/frame.h create mode 100644 i386/include/architecture/i386/io.h create mode 100644 i386/include/architecture/i386/math.h create mode 100644 i386/include/architecture/i386/pio.h create mode 100644 i386/include/architecture/i386/reg_help.h create mode 100644 i386/include/architecture/i386/sel.h create mode 100644 i386/include/architecture/i386/table.h create mode 100644 i386/include/architecture/i386/tss.h create mode 100644 i386/include/assert.h create mode 100644 i386/include/ctype.h create mode 100644 i386/include/device/.svn/all-wcprops create mode 100644 i386/include/device/.svn/entries create mode 100644 i386/include/device/.svn/text-base/device_port.h.svn-base create mode 100644 i386/include/device/.svn/text-base/device_types.h.svn-base create mode 100644 i386/include/device/device_port.h create mode 100644 i386/include/device/device_types.h create mode 100644 i386/include/errno.h create mode 100644 i386/include/float.h create mode 100644 i386/include/i386/_limits.h create mode 100644 i386/include/i386/_param.h create mode 100644 i386/include/i386/_structs.h create mode 100644 i386/include/i386/_types.h create mode 100644 i386/include/i386/eflags.h create mode 100644 i386/include/i386/endian.h create mode 100644 i386/include/i386/fasttrap_isa.h create mode 100644 i386/include/i386/limits.h create mode 100644 i386/include/i386/param.h create mode 100644 i386/include/i386/profile.h create mode 100644 i386/include/i386/setjmp.h create mode 100644 i386/include/i386/signal.h create mode 100644 i386/include/i386/types.h create mode 100644 i386/include/i386/user_ldt.h create mode 100644 i386/include/i386/vmparam.h create mode 100644 i386/include/inttypes.h create mode 100644 i386/include/libkern/OSAtomic.h create mode 100644 i386/include/libkern/OSByteOrder.h create mode 100644 i386/include/libkern/OSCacheControl.h create mode 100644 i386/include/libkern/OSDebug.h create mode 100644 i386/include/libkern/OSKextLib.h create mode 100644 i386/include/libkern/OSReturn.h create mode 100644 i386/include/libkern/OSTypes.h create mode 100644 i386/include/libkern/_OSByteOrder.h create mode 100644 i386/include/libkern/crypto/md5.h create mode 100644 i386/include/libkern/crypto/sha1.h create mode 100644 i386/include/libkern/i386/OSByteOrder.h create mode 100644 i386/include/libkern/i386/_OSByteOrder.h create mode 100644 i386/include/libkern/machine/OSByteOrder.h create mode 100644 i386/include/libkern/ppc/OSByteOrder.h create mode 100644 i386/include/limits.h create mode 100644 i386/include/locale.h create mode 100644 i386/include/mach-o/arch.h create mode 100644 i386/include/mach-o/compact_unwind_encoding.h create mode 100644 i386/include/mach-o/dyld.h create mode 100644 i386/include/mach-o/dyld_images.h create mode 100644 i386/include/mach-o/fat.h create mode 100644 i386/include/mach-o/getsect.h create mode 100644 i386/include/mach-o/i386/swap.h create mode 100644 i386/include/mach-o/ldsyms.h create mode 100644 i386/include/mach-o/loader.h create mode 100644 i386/include/mach-o/nlist.h create mode 100644 i386/include/mach-o/ranlib.h create mode 100644 i386/include/mach-o/reloc.h create mode 100644 i386/include/mach-o/stab.h create mode 100644 i386/include/mach-o/swap.h create mode 100644 i386/include/mach-o/x86_64/reloc.h create mode 100644 i386/include/mach/audit_triggers.defs create mode 100644 i386/include/mach/boolean.h create mode 100644 i386/include/mach/bootstrap.h create mode 100644 i386/include/mach/clock.defs create mode 100644 i386/include/mach/clock.h create mode 100644 i386/include/mach/clock_priv.defs create mode 100644 i386/include/mach/clock_priv.h create mode 100644 i386/include/mach/clock_reply.defs create mode 100644 i386/include/mach/clock_reply.h create mode 100644 i386/include/mach/clock_types.defs create mode 100644 i386/include/mach/clock_types.h create mode 100644 i386/include/mach/error.h create mode 100644 i386/include/mach/exc.defs create mode 100644 i386/include/mach/exc.h create mode 100644 i386/include/mach/exception.h create mode 100644 i386/include/mach/exception_types.h create mode 100644 i386/include/mach/host_info.h create mode 100644 i386/include/mach/host_notify.h create mode 100644 i386/include/mach/host_notify_reply.defs create mode 100644 i386/include/mach/host_priv.defs create mode 100644 i386/include/mach/host_priv.h create mode 100644 i386/include/mach/host_reboot.h create mode 100644 i386/include/mach/host_security.defs create mode 100644 i386/include/mach/host_security.h create mode 100644 i386/include/mach/host_special_ports.h create mode 100644 i386/include/mach/i386/_structs.h create mode 100644 i386/include/mach/i386/asm.h create mode 100644 i386/include/mach/i386/boolean.h create mode 100644 i386/include/mach/i386/exception.h create mode 100644 i386/include/mach/i386/fp_reg.h create mode 100644 i386/include/mach/i386/kern_return.h create mode 100644 i386/include/mach/i386/machine_types.defs create mode 100644 i386/include/mach/i386/ndr_def.h create mode 100644 i386/include/mach/i386/processor_info.h create mode 100644 i386/include/mach/i386/rpc.h create mode 100644 i386/include/mach/i386/sdt_isa.h create mode 100644 i386/include/mach/i386/task.h create mode 100644 i386/include/mach/i386/thread_act.h create mode 100644 i386/include/mach/i386/thread_state.h create mode 100644 i386/include/mach/i386/thread_status.h create mode 100644 i386/include/mach/i386/vm_param.h create mode 100644 i386/include/mach/i386/vm_types.h create mode 100644 i386/include/mach/kern_return.h create mode 100644 i386/include/mach/kmod.h create mode 100644 i386/include/mach/ledger.defs create mode 100644 i386/include/mach/ledger.h create mode 100644 i386/include/mach/lock_set.defs create mode 100644 i386/include/mach/lock_set.h create mode 100644 i386/include/mach/mach.h create mode 100644 i386/include/mach/mach_error.h create mode 100644 i386/include/mach/mach_exc.defs create mode 100644 i386/include/mach/mach_host.defs create mode 100644 i386/include/mach/mach_host.h create mode 100644 i386/include/mach/mach_init.h create mode 100644 i386/include/mach/mach_interface.h create mode 100644 i386/include/mach/mach_param.h create mode 100644 i386/include/mach/mach_port.defs create mode 100644 i386/include/mach/mach_port.h create mode 100644 i386/include/mach/mach_syscalls.h create mode 100644 i386/include/mach/mach_time.h create mode 100644 i386/include/mach/mach_traps.h create mode 100644 i386/include/mach/mach_types.defs create mode 100644 i386/include/mach/mach_types.h create mode 100644 i386/include/mach/mach_vm.defs create mode 100644 i386/include/mach/mach_vm.h create mode 100644 i386/include/mach/machine.h create mode 100644 i386/include/mach/machine/asm.h create mode 100644 i386/include/mach/machine/boolean.h create mode 100644 i386/include/mach/machine/exception.h create mode 100644 i386/include/mach/machine/kern_return.h create mode 100644 i386/include/mach/machine/machine_types.defs create mode 100644 i386/include/mach/machine/ndr_def.h create mode 100644 i386/include/mach/machine/processor_info.h create mode 100644 i386/include/mach/machine/rpc.h create mode 100644 i386/include/mach/machine/sdt.h create mode 100644 i386/include/mach/machine/sdt_isa.h create mode 100644 i386/include/mach/machine/thread_state.h create mode 100644 i386/include/mach/machine/thread_status.h create mode 100644 i386/include/mach/machine/vm_param.h create mode 100644 i386/include/mach/machine/vm_types.h create mode 100644 i386/include/mach/memory_object_types.h create mode 100644 i386/include/mach/message.h create mode 100644 i386/include/mach/mig.h create mode 100644 i386/include/mach/mig_errors.h create mode 100644 i386/include/mach/ndr.h create mode 100644 i386/include/mach/notify.defs create mode 100644 i386/include/mach/notify.h create mode 100644 i386/include/mach/policy.h create mode 100644 i386/include/mach/port.h create mode 100644 i386/include/mach/port_obj.h create mode 100644 i386/include/mach/processor.defs create mode 100644 i386/include/mach/processor.h create mode 100644 i386/include/mach/processor_info.h create mode 100644 i386/include/mach/processor_set.defs create mode 100644 i386/include/mach/processor_set.h create mode 100644 i386/include/mach/rpc.h create mode 100644 i386/include/mach/sdt.h create mode 100644 i386/include/mach/security.defs create mode 100644 i386/include/mach/semaphore.h create mode 100644 i386/include/mach/shared_memory_server.h create mode 100644 i386/include/mach/shared_region.h create mode 100644 i386/include/mach/std_types.defs create mode 100644 i386/include/mach/std_types.h create mode 100644 i386/include/mach/sync.h create mode 100644 i386/include/mach/sync_policy.h create mode 100644 i386/include/mach/task.defs create mode 100644 i386/include/mach/task.h create mode 100644 i386/include/mach/task_access.defs create mode 100644 i386/include/mach/task_info.h create mode 100644 i386/include/mach/task_ledger.h create mode 100644 i386/include/mach/task_policy.h create mode 100644 i386/include/mach/task_special_ports.h create mode 100644 i386/include/mach/thread_act.defs create mode 100644 i386/include/mach/thread_act.h create mode 100644 i386/include/mach/thread_info.h create mode 100644 i386/include/mach/thread_policy.h create mode 100644 i386/include/mach/thread_special_ports.h create mode 100644 i386/include/mach/thread_status.h create mode 100644 i386/include/mach/thread_switch.h create mode 100644 i386/include/mach/time_value.h create mode 100644 i386/include/mach/vm_attributes.h create mode 100644 i386/include/mach/vm_behavior.h create mode 100644 i386/include/mach/vm_inherit.h create mode 100644 i386/include/mach/vm_map.defs create mode 100644 i386/include/mach/vm_map.h create mode 100644 i386/include/mach/vm_param.h create mode 100644 i386/include/mach/vm_prot.h create mode 100644 i386/include/mach/vm_purgable.h create mode 100644 i386/include/mach/vm_region.h create mode 100644 i386/include/mach/vm_statistics.h create mode 100644 i386/include/mach/vm_sync.h create mode 100644 i386/include/mach/vm_task.h create mode 100644 i386/include/mach/vm_types.h create mode 100644 i386/include/mach/x86_64/.svn/all-wcprops create mode 100644 i386/include/mach/x86_64/.svn/entries create mode 100644 i386/include/mach/x86_64/.svn/text-base/task.h.svn-base create mode 100644 i386/include/mach/x86_64/.svn/text-base/thread_act.h.svn-base create mode 100644 i386/include/mach/x86_64/task.h create mode 100644 i386/include/mach/x86_64/thread_act.h create mode 100644 i386/include/machine/_limits.h create mode 100644 i386/include/machine/_param.h create mode 100644 i386/include/machine/_structs.h create mode 100644 i386/include/machine/_types.h create mode 100644 i386/include/machine/byte_order.h create mode 100644 i386/include/machine/endian.h create mode 100644 i386/include/machine/fasttrap_isa.h create mode 100644 i386/include/machine/limits.h create mode 100644 i386/include/machine/param.h create mode 100644 i386/include/machine/profile.h create mode 100644 i386/include/machine/setjmp.h create mode 100644 i386/include/machine/signal.h create mode 100644 i386/include/machine/types.h create mode 100644 i386/include/machine/vmparam.h create mode 100644 i386/include/math.h create mode 100644 i386/include/pexpert/boot.h create mode 100644 i386/include/pexpert/i386/boot.h create mode 100644 i386/include/pexpert/i386/efi.h create mode 100644 i386/include/pexpert/i386/protos.h create mode 100644 i386/include/pexpert/machine/boot.h create mode 100644 i386/include/pexpert/machine/protos.h create mode 100644 i386/include/pexpert/pexpert.h create mode 100644 i386/include/pexpert/protos.h create mode 100644 i386/include/runetype.h create mode 100644 i386/include/setjmp.h create mode 100644 i386/include/signal.h create mode 100644 i386/include/stdarg.h create mode 100644 i386/include/stdbool.h create mode 100644 i386/include/stddef.h create mode 100644 i386/include/stdint.h create mode 100644 i386/include/stdio.h create mode 100644 i386/include/stdlib.h create mode 100644 i386/include/string.h create mode 100644 i386/include/sys/_endian.h create mode 100644 i386/include/sys/_select.h create mode 100644 i386/include/sys/_structs.h create mode 100644 i386/include/sys/_types.h create mode 100644 i386/include/sys/appleapiopts.h create mode 100644 i386/include/sys/buf.h create mode 100644 i386/include/sys/cdefs.h create mode 100644 i386/include/sys/disk.h create mode 100644 i386/include/sys/kernel_types.h create mode 100644 i386/include/sys/param.h create mode 100644 i386/include/sys/reboot.h create mode 100644 i386/include/sys/select.h create mode 100644 i386/include/sys/socket.h create mode 100644 i386/include/sys/syscall.h create mode 100644 i386/include/sys/syslimits.h create mode 100644 i386/include/sys/time.h create mode 100644 i386/include/sys/types.h create mode 100644 i386/include/sys/unistd.h create mode 100644 i386/include/sys/vnode.h create mode 100644 i386/include/time.h create mode 100644 i386/include/unistd.h create mode 100644 i386/include/unwind.h delete mode 100755 i386/util/ld_classic delete mode 100644 i386/util/ld_classic.1 mode change 100755 => 100644 i386/util/machOconv.c delete mode 100644 i386/util/md.1 delete mode 100644 i386/util/md.c create mode 100644 i386/util/segsize.c diff --git a/.gitignore b/.gitignore index c15d8f4..17d5f72 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ i386/config/EFI/*Mac*.h i386/config/SMBIOS/default.h i386/config/SMBIOS/*Mac*.h -i386/util/libcc_kext.a \ No newline at end of file +i386/util/libcc_kext.a +MODEL diff --git a/README b/README index f0a28a3..b0266b4 100644 --- a/README +++ b/README @@ -24,9 +24,7 @@ code snippets for it have been stripped out (by Master Chief in 2009) but we wil Xcode Support for Mountain Lion: -------------------------------- -RevoBoot can be built on Snow Leopard, Lion and Mountain Lion. The latter requires Xcode 4.5.1 (and greater) and libcc_kext.a from an older version of Xcode. See change log for instructions. - -Note: The latest release of Xcode (4.5.2) also works with fine with an older copy libcc_kext.a. +RevoBoot can be built on Snow Leopard, Lion and Mountain Lion. The latter requires Xcode 4.5.1 (and greater) and the latest 'command line tools' need to be installed. See change log for instructions. Configuration: -------------- diff --git a/i386/MakeInc.dir b/i386/MakeInc.dir index ddb327c..cf4ed0a 100755 --- a/i386/MakeInc.dir +++ b/i386/MakeInc.dir @@ -4,15 +4,11 @@ # Updates: # # - Major cleanup (PikerAlpha, October 2012). +# - Fixed clang compilation (dgsga, November 2012. Credits to Evan Lojewski +# for original work). # -# -# Use /usr/bin/gcc instead of /usr/bin/cc (symbolic link to clang in Xcode 4.3.2 and greater). -# - -CC = gcc - # Toggle this as to whether you want a frame pointer (%ebp) to be used. It is # invaluable for debugging the booter. For example using GDB attached to VMware. # In fact, it's so invaluable that it's now the default. Not only that but the @@ -25,28 +21,34 @@ OMIT_FRAME_POINTER_CFLAG= .SUFFIXES: .s .i .c .o .c.o .m.o: - $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o \ - -MD -dependency-file $(OBJROOT)/$*.d - $(SYMROOT)/md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d - + @echo "\t[CC] $<" + @$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -MM -M -o $(OBJROOT)/$@.Makedep + @$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$@ + $(OBJROOT)/%.o: %.c - $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o \ - -MD -dependency-file $(OBJROOT)/$*.d - $(SYMROOT)/md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d + @echo "\t[CC] $<" + @$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -MM -M -o $(OBJROOT)/$@.Makedep + @$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$@ $(OBJROOT)/%.o: %.m - $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o \ - -MD -dependency-file $(OBJROOT)/$*.d - $(SYMROOT)/md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d + @echo "\t[M] $<" + @$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -MM -M -o $(OBJROOT)/$@.Makedep + @$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$@ .s.o: - $(CC) $(CPPFLAGS) -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $< - -boot2.o: - $(CC) $(CPPFLAGS) -Wa,-n -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) boot2.s + @echo "\t[AS] $<" + @$(CC) $(CPPFLAGS) -c $(INC) -arch i386 $< -MM -M -o $(OBJROOT)/$@.Makedep + @$(CC) $(CPPFLAGS) -c $(INC) -arch i386 $< -o $(OBJROOT)/$(@F) + +$(OBJROOT)/boot2.o: + @echo "\t[AS] boot2.s" + @$(CC) -Wa,-n -c $(INC) -arch i386 boot2.s -MM -M -o $(OBJROOT)/$@.Makedep + @$(CC) -Wa,-n -c $(INC) -arch i386 boot2.s -o $(OBJROOT)/$(@F) $(OBJROOT)/%.o: %.s - $(CC) $(CPPFLAGS) -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $< + @echo "\t[AS] $<" + @$(CC) $(CPPFLAGS) -c $(INC) -arch i386 $< -MM -M -o $(OBJROOT)/$@.Makedep + @$(CC) $(CPPFLAGS) -c $(INC) -arch i386 $< -o $(OBJROOT)/$(@F) $(DIRS_NEEDED): # $(INSTALLDIR) $(SRCROOT): @/bin/mkdir -p $@ diff --git a/i386/boot2/Makefile b/i386/boot2/Makefile index 7c0970d..d69d15d 100644 --- a/i386/boot2/Makefile +++ b/i386/boot2/Makefile @@ -5,6 +5,7 @@ # # - Support for self compiled libcc_kext.a added (PikerAlpha, October 2012). # - Major cleanup (PikerAlpha, October 2012). +# - Fixed clang compilation (dgsga, November 2012. Credits to Evan Lojewski for original work). # @@ -14,37 +15,20 @@ OPTIM = -Os -Oz CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Werror \ -fno-builtin -DSAIO_INTERNAL_USER -static $(OMIT_FRAME_POINTER_CFLAG) \ -DMAKE_TARGET_OS=$(PRODUCT_OS_TARGET) \ - -DSETTINGS_FILE=SETTINGS/$(MAKE_TARGET_MODEL).h \ - -mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ - -march=pentium4 -msse2 -mfpmath=sse -msoft-float + -DSETTINGS_FILE=SETTINGS/$(MAKE_TARGET_MODEL).h \ + -fno-stack-protector \ + -march=pentium4 -msse2 -msoft-float -nostdinc LIBSADIR = ../libsa LIBSAIODIR = ../libsaio UTILDIR = ../util +SRCROOT = $(abspath $(CURDIR)/../..) -INC = -I. -I.. -I$(SYMROOT) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(UTILDIR) +INC = -I. -I.. -I$(SYMROOT) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(UTILDIR) -I${SRCROOT}/i386/include LIBS = -L$(SYMROOT) -lsaio -lsa LIBDEP = $(SYMROOT)/libsaio.a $(SYMROOT)/libsa.a -# -# build_gcc no longer builds libgcc.a and libcc_kext.a with 'all' target -# and thus we have to provide it, or people will have to build gcc. -# - -LIBCC= $(UTILDIR)/libcc_kext.a - -# -# Check ../util/ for a self compiled copy of libcc_kext.a -# - -ifeq ($(wildcard $(LIBCC)),) - # - # Not found: Use Xcode supplied file. - # - LIBCC= `find /usr/llvm-gcc-*/lib/gcc/*/*/ -name \libcc_kext.a` -endif - VPATH = $(OBJROOT):$(SYMROOT) # @@ -64,18 +48,34 @@ MAXBOOTSIZE = 131072 $(MAKEGOAL): $(DIRS_NEEDED) boot boot: machOconv $(OBJS) $(LIBDEP) - $(UTILDIR)/ld_classic -static -preload -segaddr __INIT $(BOOT2ADDR) \ - -arch i386 -segalign 20 \ - -o $(SYMROOT)/boot.sys $(filter %.o,$^) $(LIBS) $(LIBCC) - machOconv $(SYMROOT)/boot.sys $(SYMROOT)/boot - size $(SYMROOT)/boot.sys - ls -l $(SYMROOT)/boot + @$(CC) -Wl,-preload -Wl,-alias,boot2,start \ + -nostdlib -arch i386 -Wl,-pie \ + -Wl,-read_only_relocs,suppress \ + -lcc_kext \ + $(filter %.o,$^) $(LIBS) \ + -o ${SYMROOT}/$@.sys + @echo "\t[LD] boot.sys" + @$(CC) -Wl,-preload -Wl,-alias,boot2,start \ + -nostdlib -arch i386 -Wl,-pie \ + -Wl,-segalign,20 \ + -Wl,-segaddr,__INIT,`echo obase=16\; $$((0x${BOOT2ADDR})) | bc` \ + -Wl,-segaddr,__TEXT,`echo obase=16\; $$((0x${BOOT2ADDR})) + \`${SYMROOT}/segsize ${SYMROOT}/$@.sys __INIT\` | bc` \ + -Wl,-segaddr,__DATA,`echo obase=16\; $$((0x${BOOT2ADDR})) + \`${SYMROOT}/segsize ${SYMROOT}/$@.sys __INIT\` + \`${SYMROOT}/segsize ${SYMROOT}/$@.sys __TEXT\` | bc` \ + -Wl,-read_only_relocs,suppress \ + -lcc_kext \ + $(filter %.o,$^) $(LIBS) \ + -o ${SYMROOT}/$@.sys + @echo "\t[MACHOCONV] boot" + @$(SYMROOT)/machOconv $(SYMROOT)/boot.sys $(SYMROOT)/boot @( size=`ls -l $(SYMROOT)/boot | awk '{ print $$5}'` ; \ - if expr "$$size" ">" "$(MAXBOOTSIZE)" > /dev/null ; \ + if expr "$$size" ">" "$(MAXBOOTSIZE)" > /dev/null ;\ then \ - echo "Error: Booter executable larger than $(MAXBOOTSIZE) bytes" ; \ - rm $(SYMROOT)/boot ; \ - exit 1 ; \ + echo "\t******* boot is $$size bytes *******"; \ + echo "Booter executable larger than $(MAXBOOTSIZE) bytes" ;\ + rm $(SYMROOT)/boot ;\ + exit 1;\ + else \ + echo "\t******* boot is $$size bytes *******"; \ fi) include ../MakeInc.dir diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 47d7524..2a4b3c4 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -50,6 +50,7 @@ * Updates: * - Refactorized by DHP in 2010 and 2011. * - Optionally include Recovery HD support code (PikerAlpha, November 2012). + * - Fixed clang compilation (PikerAlpha, November 2012). */ @@ -119,11 +120,13 @@ unsigned long Adler32(unsigned char *buf, long len) static void zeroBSS() { - extern char _DATA__bss__begin, _DATA__bss__end; - extern char _DATA__common__begin, _DATA__common__end; - - bzero( &_DATA__bss__begin, (&_DATA__bss__end - &_DATA__bss__begin) ); - bzero( &_DATA__common__begin, (&_DATA__common__end - &_DATA__common__begin) ); + extern int _DATA_bss__start __asm("section$start$__DATA$__bss"); + extern int _DATA_bss__end __asm("section$end$__DATA$__bss"); + extern int _DATA_common__start __asm("section$start$__DATA$__common"); + extern int _DATA_common__end __asm("section$end$__DATA$__common"); + + bzero(&_DATA_bss__start, (&_DATA_bss__end - &_DATA_bss__start)); + bzero(&_DATA_common__start, (&_DATA_common__end - &_DATA_common__start)); } /* @@ -256,9 +259,9 @@ void boot(int biosdev) if (gVerboseMode) { -#if DEBUG_BOOT == false +/*#if DEBUG_BOOT == false setVideoMode(VGA_TEXT_MODE); -#endif +#endif*/ } // Check for -x (safe) and -f (flush cache) flags. diff --git a/i386/include/IOKit/IOBSD.h b/i386/include/IOKit/IOBSD.h new file mode 100644 index 0000000..8938656 --- /dev/null +++ b/i386/include/IOKit/IOBSD.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _IOBSD_H +#define _IOBSD_H + +/* + * bsd-related registry properties + */ + +#define kIOBSDNameKey "BSD Name" // (an OSString) +#define kIOBSDNamesKey "BSD Names" // (an OSDictionary of OSString's, for links) +#define kIOBSDMajorKey "BSD Major" // (an OSNumber) +#define kIOBSDMinorKey "BSD Minor" // (an OSNumber) +#define kIOBSDUnitKey "BSD Unit" // (an OSNumber) + +#endif /* !_IOBSD_H */ diff --git a/i386/include/IOKit/IOBufferMemoryDescriptor.h b/i386/include/IOKit/IOBufferMemoryDescriptor.h new file mode 100644 index 0000000..0926e5b --- /dev/null +++ b/i386/include/IOKit/IOBufferMemoryDescriptor.h @@ -0,0 +1,261 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _IOBUFFERMEMORYDESCRIPTOR_H +#define _IOBUFFERMEMORYDESCRIPTOR_H + +#include + +enum { + kIOMemoryPhysicallyContiguous = 0x00000010, + kIOMemoryPageable = 0x00000020, + kIOMemoryPurgeable = 0x00000040, + kIOMemorySharingTypeMask = 0x000f0000, + kIOMemoryUnshared = 0x00000000, + kIOMemoryKernelUserShared = 0x00010000, + // shared IOMemoryDescriptor options for IOBufferMemoryDescriptor: + kIOBufferDescriptorMemoryFlags = kIOMemoryDirectionMask + | kIOMemoryThreadSafe +}; + +#define _IOBUFFERMEMORYDESCRIPTOR_INTASKWITHOPTIONS_ 1 +/*! + @class IOBufferMemoryDescriptor + @abstract Provides a simple memory descriptor that allocates its own buffer memory. +*/ + +class IOBufferMemoryDescriptor : public IOGeneralMemoryDescriptor +{ + OSDeclareDefaultStructors(IOBufferMemoryDescriptor); + +private: +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of this class in the future. + */ + struct ExpansionData { + IOMemoryMap * map; + }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * reserved; + +protected: + void * _buffer; + vm_size_t _capacity; + vm_offset_t _alignment; + IOOptionBits _options; +private: + uintptr_t _internalReserved; + unsigned _internalFlags; + +private: +#ifndef __LP64__ + virtual bool initWithOptions( + IOOptionBits options, + vm_size_t capacity, + vm_offset_t alignment, + task_t inTask) APPLE_KEXT_DEPRECATED; /* use withOptions() instead */ +#endif /* !__LP64__ */ + + virtual bool initWithPhysicalMask( + task_t inTask, + IOOptionBits options, + mach_vm_size_t capacity, + mach_vm_address_t alignment, + mach_vm_address_t physicalMask); + +#ifdef __LP64__ + OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 0); + OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 1); +#else /* !__LP64__ */ + OSMetaClassDeclareReservedUsed(IOBufferMemoryDescriptor, 0); + OSMetaClassDeclareReservedUsed(IOBufferMemoryDescriptor, 1); +#endif /* !__LP64__ */ + OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 2); + OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 3); + OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 4); + OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 5); + OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 6); + OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 7); + OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 8); + OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 9); + OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 10); + OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 11); + OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 12); + OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 13); + OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 14); + OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 15); + +protected: + virtual void free(); + +public: + + /* + * withOptions: + * + * Returns a new IOBufferMemoryDescriptor with a buffer large enough to + * hold capacity bytes. The descriptor's length is initially set to the + * capacity. + */ +#ifndef __LP64__ + virtual bool initWithOptions( IOOptionBits options, + vm_size_t capacity, + vm_offset_t alignment) APPLE_KEXT_DEPRECATED; /* use withOptions() instead */ +#endif /* !__LP64__ */ + + static IOBufferMemoryDescriptor * withOptions( IOOptionBits options, + vm_size_t capacity, + vm_offset_t alignment = 1); + +/*! @function inTaskWithOptions + @abstract Creates a memory buffer with memory descriptor for that buffer. + @discussion Added in Mac OS X 10.2, this method allocates a memory buffer with a given size and alignment in the task's address space specified, and returns a memory descriptor instance representing the memory. It is recommended that memory allocated for I/O or sharing via mapping be created via IOBufferMemoryDescriptor. Options passed with the request specify the kind of memory to be allocated - pageablity and sharing are specified with option bits. This function may block and so should not be called from interrupt level or while a simple lock is held. + @param inTask The task the buffer will be allocated in. + @param options Options for the allocation:
+ kIODirectionOut, kIODirectionIn - set the direction of the I/O transfer.
+ kIOMemoryPhysicallyContiguous - pass to request memory be physically contiguous. This option is heavily discouraged. The request may fail if memory is fragmented, may cause large amounts of paging activity, and may take a very long time to execute.
+ kIOMemoryPageable - pass to request memory be non-wired - the default for kernel allocated memory is wired.
+ kIOMemoryPurgeable - pass to request memory that may later have its purgeable state set with IOMemoryDescriptor::setPurgeable. Only supported for kIOMemoryPageable allocations.
+ kIOMemoryKernelUserShared - pass to request memory that will be mapped into both the kernel and client applications. + @param capacity The number of bytes to allocate. + @param alignment The minimum required alignment of the buffer in bytes - 1 is the default for no required alignment. For example, pass 256 to get memory allocated at an address with bits 0-7 zero. + @result Returns an instance of class IOBufferMemoryDescriptor to be released by the caller, which will free the memory desriptor and associated buffer. */ + + static IOBufferMemoryDescriptor * inTaskWithOptions( + task_t inTask, + IOOptionBits options, + vm_size_t capacity, + vm_offset_t alignment = 1); + +/*! @function inTaskWithPhysicalMask + @abstract Creates a memory buffer with memory descriptor for that buffer. + @discussion Added in Mac OS X 10.5, this method allocates a memory buffer with a given size and alignment in the task's address space specified, and returns a memory descriptor instance representing the memory. It is recommended that memory allocated for I/O or sharing via mapping be created via IOBufferMemoryDescriptor. Options passed with the request specify the kind of memory to be allocated - pageablity and sharing are specified with option bits. This function may block and so should not be called from interrupt level or while a simple lock is held. + @param inTask The task the buffer will be mapped in. Pass NULL to create memory unmapped in any task (eg. for use as a DMA buffer). + @param options Options for the allocation:
+ kIODirectionOut, kIODirectionIn - set the direction of the I/O transfer.
+ kIOMemoryPhysicallyContiguous - pass to request memory be physically contiguous. This option is heavily discouraged. The request may fail if memory is fragmented, may cause large amounts of paging activity, and may take a very long time to execute.
+ kIOMemoryKernelUserShared - pass to request memory that will be mapped into both the kernel and client applications. + @param capacity The number of bytes to allocate. + @param mask The buffer will be allocated with pages such that physical addresses will only have bits set present in physicalMask. For example, pass 0x00000000FFFFFFFFULL for a buffer to be accessed by hardware that has 32 address bits. + @result Returns an instance of class IOBufferMemoryDescriptor to be released by the caller, which will free the memory desriptor and associated buffer. */ + + static IOBufferMemoryDescriptor * inTaskWithPhysicalMask( + task_t inTask, + IOOptionBits options, + mach_vm_size_t capacity, + mach_vm_address_t physicalMask); + + /* + * withCapacity: + * + * Returns a new IOBufferMemoryDescriptor with a buffer large enough to + * hold capacity bytes. The descriptor's length is initially set to the + * capacity. + */ + static IOBufferMemoryDescriptor * withCapacity( + vm_size_t capacity, + IODirection withDirection, + bool withContiguousMemory = false); +#ifndef __LP64__ + virtual bool initWithBytes(const void * bytes, + vm_size_t withLength, + IODirection withDirection, + bool withContiguousMemory = false) APPLE_KEXT_DEPRECATED; /* use withBytes() instead */ +#endif /* !__LP64__ */ + + /* + * withBytes: + * + * Returns a new IOBufferMemoryDescriptor preloaded with bytes (copied). + * The descriptor's length and capacity are set to the input buffer's size. + */ + static IOBufferMemoryDescriptor * withBytes( + const void * bytes, + vm_size_t withLength, + IODirection withDirection, + bool withContiguousMemory = false); + + /* + * setLength: + * + * Change the buffer length of the memory descriptor. When a new buffer + * is created, the initial length of the buffer is set to be the same as + * the capacity. The length can be adjusted via setLength for a shorter + * transfer (there is no need to create more buffer descriptors when you + * can reuse an existing one, even for different transfer sizes). Note + * that the specified length must not exceed the capacity of the buffer. + */ + virtual void setLength(vm_size_t length); + + /* + * setDirection: + * + * Change the direction of the transfer. This method allows one to redirect + * the descriptor's transfer direction. This eliminates the need to destroy + * and create new buffers when different transfer directions are needed. + */ + virtual void setDirection(IODirection direction); + + /* + * getCapacity: + * + * Get the buffer capacity + */ + virtual vm_size_t getCapacity() const; + + /* + * getBytesNoCopy: + * + * Return the virtual address of the beginning of the buffer + */ + virtual void *getBytesNoCopy(); + + /* + * getBytesNoCopy: + * + * Return the virtual address of an offset from the beginning of the buffer + */ + virtual void *getBytesNoCopy(vm_size_t start, vm_size_t withLength); + + /* + * appendBytes: + * + * Add some data to the end of the buffer. This method automatically + * maintains the memory descriptor buffer length. Note that appendBytes + * will not copy past the end of the memory descriptor's current capacity. + */ + virtual bool appendBytes(const void *bytes, vm_size_t withLength); + +#ifndef __LP64__ + virtual void * getVirtualSegment(IOByteCount offset, + IOByteCount * length) APPLE_KEXT_DEPRECATED; /* use getBytesNoCopy() instead */ +#endif /* !__LP64__ */ +}; + +#endif /* !_IOBUFFERMEMORYDESCRIPTOR_H */ diff --git a/i386/include/IOKit/IOCatalogue.h b/i386/include/IOKit/IOCatalogue.h new file mode 100644 index 0000000..f087396 --- /dev/null +++ b/i386/include/IOKit/IOCatalogue.h @@ -0,0 +1,272 @@ +/* + * Copyright (c) 1998-2000 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998 Apple Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_IOCATALOGUE_H +#define _IOKIT_IOCATALOGUE_H + +#include +#include +#include +#include +#include +#include + +#include + +class IOService; + +/*! + @class IOCatalogue + @abstract In-kernel database for IOKit driver personalities. + @discussion The IOCatalogue is a database which contains all IOKit driver personalities. IOService uses this resource when matching devices to their associated drivers. +*/ +class IOCatalogue : public OSObject +{ + OSDeclareDefaultStructors(IOCatalogue) + +private: + OSCollectionIterator * kernelTables; + OSArray * array; + IOLock * lock; + SInt32 generation; + +/* This stuff is no longer used at all but was exported in prior + * releases, so we keep it around for PPC/i386 only. + */ +#if __ppc__ || __i386__ + IOLock * kld_lock; +#endif /* __ppc__ || __i386__ */ + +public: + /*! + @function initialize + @abstract Creates and initializes the database object and poputates it with in-kernel driver personalities. + */ + static void initialize( void ); + + /*! + @function init + @abstract Initializes the database object. + @param initArray The initial array of driver personalities to populate the database. + */ + bool init( OSArray * initArray ); + + /*! + @function free + @abstract Cleans up the database and deallocates memory allocated at initialization. This is never called in normal operation of the system. + */ + void free( void ); + + /*! + @function findDrivers + @abstract This is the primary entry point for IOService. + @param service + @param generationCount Returns a reference to the generation count of the database. The generation count increases only when personalities are added to the database *and* IOService matching has been initiated. + @result Returns an ordered set of driver personalities ranked on probe-scores. The ordered set must be released by the receiver. + */ + OSOrderedSet * findDrivers( IOService * service, SInt32 * generationCount ); + + /*! + @function findDrivers + @abstract A more general purpose interface which allows one to retreive driver personalities based the intersection of the 'matching' dictionary and the personality's own property list. + @param matching A dictionary containing only keys and values which are to be used for matching. For example, a matching dictionary containing 'IOProviderClass'='IOPCIDevice' will return all personalities with an IOProviderClass key and a value of IOPCIDevice. + @param generationCount Returns a reference to the current generation of the database. The generation count increases only when personalities are added to the database *and* IOService matching has been initiated. + @result Returns an ordered set of driver personalities ranked on probe-scores. The ordered set must be released by the receiver. + */ + OSOrderedSet * findDrivers( OSDictionary * matching, SInt32 * generationCount ); + + /*! + @function addDrivers + @abstract Adds an array of driver personalities to the database. + @param array Array of driver personalities to be added to the database. + @param doNubMatchng Start matching process after personalities have been added. + @result Returns true if driver personality was added to the database successfully. Failure is due to a memory allocation failure. + */ + bool addDrivers( OSArray * array, bool doNubMatching = true ); + + /*! + @function removeDrivers + @abstract Remove driver personalities from the database based on matching information provided. + @param matching A dictionary whose keys and values are used for matching personalities in the database. For example, a matching dictionary containing a 'IOProviderClass' key with the value 'IOPCIDevice' will remove all personalities which have the key 'IOProviderClass' equal to 'IOPCIDevice'. + @param doNubMatchng Start matching process after personalities have been removed. Matching criteria is based on IOProviderClass of those personalities which were removed. This is to allow drivers which haven't been matched to match against NUB's which were blocked by the previous personalities. + @result Returns true if personality was removed successfully. Failure is due to a memory allocation failure. + */ + bool removeDrivers( OSDictionary * matching, bool doNubMatching = true ); + + /*! + @function getGenerationCount + @abstract Get the current generation count of the database. + */ + SInt32 getGenerationCount( void ) const; + + /*! + @function isModuleLoaded + @abstract Reports if a kernel module has been loaded. + @param moduleName Name of the module. + @result Returns true if the associated kernel module has been loaded into the kernel. + */ + bool isModuleLoaded( OSString * moduleName ) const; + + /*! + @function isModuleLoaded + @abstract Reports if a kernel module has been loaded. + @param moduleName Name of the module. + @result Returns true if the associated kernel module has been loaded into the kernel. + */ + bool isModuleLoaded( const char * moduleName ) const; + + /*! + @function isModuleLoaded + @abstract Reports if a kernel module has been loaded for a particular personality. + @param driver A driver personality's property list. + @result Returns true if the associated kernel module has been loaded into the kernel for a particular driver personality on which it depends. + */ + bool isModuleLoaded( OSDictionary * driver ) const; + + /*! + @function moduleHasLoaded + @abstract Callback function called after a IOKit dependent kernel module is loaded. + @param name Name of the kernel module. + */ + void moduleHasLoaded( OSString * name ); + + /*! + @function moduleHasLoaded + @abstract Callback function called after a IOKit dependent kernel module is loaded. + @param name Name of the kernel module. + */ + void moduleHasLoaded( const char * name ); + + /*! + @function terminateDrivers + @abstract Terminates all instances of a driver which match the contents of the matching dictionary. Does not unload module. + @param matching A dictionary whose keys and values are used for matching personalities in the database. For example, a matching dictionary containing a 'IOProviderClass' key with the value 'IOPCIDevice' will cause termination for all instances whose personalities have the key 'IOProviderClass' equal to 'IOPCIDevice'. + */ + IOReturn terminateDrivers( OSDictionary * matching ); + + /*! + @function terminateDriversForModule + @abstract Terminates all instances of a driver which depends on a particular module and unloads the module. + @param moduleName Name of the module which is used to determine which driver instances to terminate and unload. + @param unload Flag to cause the actual unloading of the module. + */ + IOReturn terminateDriversForModule( OSString * moduleName, bool unload = true); + + /*! + @function terminateDriversForModule + @abstract Terminates all instances of a driver which depends on a particular module and unloads the module. + @param moduleName Name of the module which is used to determine which driver instances to terminate and unload. + @param unload Flag to cause the actual unloading of the module. + */ + IOReturn terminateDriversForModule( const char * moduleName, bool unload = true); + + /*! + @function startMatching + @abstract Starts an IOService matching thread where matching keys and values are provided by the matching dictionary. + @param matching A dictionary whose keys and values are used for matching personalities in the database. For example, a matching dictionary containing a 'IOProviderClass' key with the value 'IOPCIDevice' will start matching for all personalities which have the key 'IOProviderClass' equal to 'IOPCIDevice'. + */ + bool startMatching( OSDictionary * matching ); + + /*! + @function reset + @abstract Return the Catalogue to its initial state. + */ + void reset(void); + + /*! + @function serialize + @abstract Serializes the catalog for transport to the user. + @param s The serializer object. + @result Returns false if unable to serialize database, most likely due to memory shortage. + */ + virtual bool serialize(OSSerialize * s) const; + + bool serializeData(IOOptionBits kind, OSSerialize * s) const; + +/* This stuff is no longer used at all we keep it around for PPC/i386 + * binary compatibility only. Symbols are no longer exported. + */ +#if __ppc__ || __i386__ + /*! + @function recordStartupExtensions + @abstract Records extensions made available by the primary booter. +

+ This function is for internal use by the kernel startup linker. + Kernel extensions should never call it. + @result Returns true if startup extensions were successfully recorded, + false if not. + */ + virtual bool recordStartupExtensions(void); + + /*! + @function addExtensionsFromArchive() + @abstract Records an archive of extensions, as from device ROM. +

+ This function is currently for internal use. + Kernel extensions should never call it. + @param mkext An OSData object containing a multikext archive. + @result Returns true if mkext was properly unserialized and its + contents recorded, false if not. + */ + virtual bool addExtensionsFromArchive(OSData * mkext); + + + /*! + @function removeKernelLinker + @abstract Removes from memory all code and data related to + boot-time loading of kernel extensions. kextd triggers + this when it first starts in order to pass responsibility + for loading extensions from the kernel itself to kextd. + @result Returns KERN_SUCCESS if the kernel linker is successfully + removed or wasn't present, KERN_FAILURE otherwise. + */ + virtual kern_return_t removeKernelLinker(void); +#endif /* __ppc__ || __i386__ */ + +private: + + /*! + @function unloadModule + @abstract Unloads the reqested module if no driver instances are currently depending on it. + @param moduleName An OSString containing the name of the module to unload. + */ + IOReturn unloadModule( OSString * moduleName ) const; +}; + +extern const OSSymbol * gIOClassKey; +extern const OSSymbol * gIOProbeScoreKey; +extern IOCatalogue * gIOCatalogue; + +#endif /* ! _IOKIT_IOCATALOGUE_H */ diff --git a/i386/include/IOKit/IOCommand.h b/i386/include/IOKit/IOCommand.h new file mode 100644 index 0000000..136c41b --- /dev/null +++ b/i386/include/IOKit/IOCommand.h @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +/* + * + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + * 2001-01-18 gvdl Made the primary queue pointer public, to be used when + * Ownership is clear. + * 11/13/2000 CJS Created IOCommand class and implementation + * + */ + +/*! + * @header IOCommand + * @abstract + * This header contains the IOCommand class definition. + */ + +#ifndef _IOKIT_IO_COMMAND_H_ +#define _IOKIT_IO_COMMAND_H_ + +/* + * Kernel + */ + +#if defined(KERNEL) && defined(__cplusplus) + +#include +#include + +/*! + * @class IOCommand + * @abstract + * This class is an abstract class which represents an I/O command. + * @discussion + * This class is an abstract class which represents an I/O command passed + * from a device driver to a controller. All controller commands (e.g. IOATACommand) + * should inherit from this class. + */ + +class IOCommand : public OSObject +{ + OSDeclareDefaultStructors(IOCommand) + +public: + virtual bool init(void); + +/*! @var fCommandChain + This variable is used by the current 'owner' to queue the command. During the life cycle of a command it moves through a series of queues. This is the queue pointer for it. Only valid while 'ownership' is clear. For instance a IOCommandPool uses this pointer to maintain its list of free commands. May be manipulated using the kern/queue.h macros */ + queue_chain_t fCommandChain; /* used to queue commands */ +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_COMMAND_H_ */ diff --git a/i386/include/IOKit/IOCommandGate.h b/i386/include/IOKit/IOCommandGate.h new file mode 100644 index 0000000..1b17b79 --- /dev/null +++ b/i386/include/IOKit/IOCommandGate.h @@ -0,0 +1,241 @@ +/* + * Copyright (c) 1998-2009 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/*[ + 1999-8-10 Godfrey van der Linden(gvdl) + Created. +]*/ +/*! @language embedded-c++ */ + +#ifndef _IOKIT_IOCOMMANDGATE_H +#define _IOKIT_IOCOMMANDGATE_H + +#include + +/*! + @class IOCommandGate : public IOEventSource + @abstract Single-threaded work-loop client request mechanism. + @discussion An IOCommandGate instance is an extremely light way mechanism +that executes an action on the driver's work-loop. 'On the work-loop' is +actually a lie but the work-loop single threaded semantic is maintained for this +event source. Using the work-loop gate rather than execution by the workloop. +The command gate tests for a potential self dead lock by checking if the +runCommand request is made from the work-loop's thread, it doesn't check for a +mutual dead lock though where a pair of work loop's dead lock each other. +

+ The IOCommandGate is a lighter weight version of the IOCommandQueue and +should be used in preference. Generally use a command queue whenever you need a +client to submit a request to a work loop. A typical command gate action would +check if the hardware is active, if so it will add the request to a pending +queue internal to the device or the device's family. Otherwise if the hardware +is inactive then this request can be acted upon immediately. +

+ CAUTION: The runAction, runCommand, and attemptCommand functions cannot be called from an interrupt context. + +*/ +class IOCommandGate : public IOEventSource +{ + OSDeclareDefaultStructors(IOCommandGate) + +public: +/*! + @typedef Action + @discussion Type and arguments of callout C function that is used when +a runCommand is executed by a client. Cast to this type when you want a C++ +member function to be used. Note the arg1 - arg3 parameters are straight pass +through from the runCommand to the action callout. + @param owner + Target of the function, can be used as a refcon. The owner is set +during initialisation of the IOCommandGate instance. Note if a C++ function +was specified this parameter is implicitly the first paramter in the target +member function's parameter list. + @param arg0 Argument to action from run operation. + @param arg1 Argument to action from run operation. + @param arg2 Argument to action from run operation. + @param arg3 Argument to action from run operation. +*/ + typedef IOReturn (*Action)(OSObject *owner, + void *arg0, void *arg1, + void *arg2, void *arg3); + +protected: +/*! + @function checkForWork + @abstract Not used, $link IOEventSource::checkForWork(). */ + virtual bool checkForWork(); + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + +public: +/*! @function commandGate + @abstract Factory method to create and initialise an IOCommandGate, See $link init. + @result Returns a pointer to the new command gate if sucessful, 0 otherwise. */ + static IOCommandGate *commandGate(OSObject *owner, Action action = 0); + +/*! @function init + @abstract Class initialiser. + @discussion Initialiser for IOCommandGate operates only on newly 'newed' +objects. Shouldn't be used to re-init an existing instance. + @param owner Owner of this, newly created, instance of the IOCommandGate. This argument will be used as the first parameter in the action callout. + @param action + Pointer to a C function that is called whenever a client of the +IOCommandGate calls runCommand. NB Can be a C++ member function but caller +must cast the member function to $link IOCommandGate::Action and they will get a +compiler warning. Defaults to zero, see $link IOEventSource::setAction. + @result True if inherited classes initialise successfully. */ + virtual bool init(OSObject *owner, Action action = 0); + + // Superclass overrides + virtual void free(); + virtual void setWorkLoop(IOWorkLoop *inWorkLoop); + +/*! @function runCommand + @abstract Single thread a command with the target work-loop. + @discussion Client function that causes the current action to be called in +a single threaded manner. Beware the work-loop's gate is recursive and command +gates can cause direct or indirect re-entrancy. When the executing on a +client's thread runCommand will sleep until the work-loop's gate opens for +execution of client actions, the action is single threaded against all other +work-loop event sources. If the command is disabled the attempt to run a command will be stalled until enable is called. + @param arg0 Parameter for action of command gate, defaults to 0. + @param arg1 Parameter for action of command gate, defaults to 0. + @param arg2 Parameter for action of command gate, defaults to 0. + @param arg3 Parameter for action of command gate, defaults to 0. + @result kIOReturnSuccess if successful. kIOReturnAborted if a disabled command gate is free()ed before being reenabled, kIOReturnNoResources if no action available. +*/ + virtual IOReturn runCommand(void *arg0 = 0, void *arg1 = 0, + void *arg2 = 0, void *arg3 = 0); + +/*! @function runAction + @abstract Single thread a call to an action with the target work-loop. + @discussion Client function that causes the given action to be called in +a single threaded manner. Beware the work-loop's gate is recursive and command +gates can cause direct or indirect re-entrancy. When the executing on a +client's thread runAction will sleep until the work-loop's gate opens for +execution of client actions, the action is single threaded against all other +work-loop event sources. If the command is disabled the attempt to run a command will be stalled until enable is called. + @param action Pointer to function to be executed in work-loop context. + @param arg0 Parameter for action parameter, defaults to 0. + @param arg1 Parameter for action parameter, defaults to 0. + @param arg2 Parameter for action parameter, defaults to 0. + @param arg3 Parameter for action parameter, defaults to 0. + @result kIOReturnSuccess if successful. kIOReturnBadArgument if action is not defined, kIOReturnAborted if a disabled command gate is free()ed before being reenabled. +*/ + virtual IOReturn runAction(Action action, + void *arg0 = 0, void *arg1 = 0, + void *arg2 = 0, void *arg3 = 0); + +/*! @function attemptCommand + @abstract Single thread a command with the target work-loop. + @discussion Client function that causes the current action to be called in +a single threaded manner. When the executing on a client's thread attemptCommand will fail if the work-loop's gate is closed. + @param arg0 Parameter for action of command gate, defaults to 0. + @param arg1 Parameter for action of command gate, defaults to 0. + @param arg2 Parameter for action of command gate, defaults to 0. + @param arg3 Parameter for action of command gate, defaults to 0. + @result kIOReturnSuccess if successful. kIOReturnNotPermitted if this event source is currently disabled, kIOReturnNoResources if no action available, kIOReturnCannotLock if lock attempt fails. +*/ + virtual IOReturn attemptCommand(void *arg0 = 0, void *arg1 = 0, + void *arg2 = 0, void *arg3 = 0); + +/*! @function attemptAction + @abstract Single thread a call to an action with the target work-loop. + @discussion Client function that causes the given action to be called in +a single threaded manner. Beware the work-loop's gate is recursive and command +gates can cause direct or indirect re-entrancy. When the executing on a +client's thread attemptCommand will fail if the work-loop's gate is closed. + @param action Pointer to function to be executed in work-loop context. + @param arg0 Parameter for action parameter, defaults to 0. + @param arg1 Parameter for action parameter, defaults to 0. + @param arg2 Parameter for action parameter, defaults to 0. + @param arg3 Parameter for action parameter, defaults to 0. + @result kIOReturnSuccess if successful. kIOReturnBadArgument if action is not defined, kIOReturnNotPermitted if this event source is currently disabled, kIOReturnCannotLock if lock attempt fails. + +*/ + virtual IOReturn attemptAction(Action action, + void *arg0 = 0, void *arg1 = 0, + void *arg2 = 0, void *arg3 = 0); + +/*! @function commandSleep + @abstract Put a thread that is currently holding the command gate to sleep. + @discussion Put a thread to sleep waiting for an event but release the gate first. If the event occurs then the commandGate is closed before the function returns. + @param event Pointer to an address. + @param interruptible THREAD_UNINT, THREAD_INTERRUPTIBLE or THREAD_ABORTSAFE. THREAD_UNINT specifies that the sleep cannot be interrupted by a signal. THREAD_INTERRUPTIBLE specifies that the sleep may be interrupted by a "kill -9" signal. THREAD_ABORTSAFE (the default value) specifies that the sleep may be interrupted by any user signal. + @result THREAD_AWAKENED - normal wakeup, THREAD_TIMED_OUT - timeout expired, THREAD_INTERRUPTED - interrupted, THREAD_RESTART - restart operation entirely, kIOReturnNotPermitted if the calling thread does not hold the command gate. */ + virtual IOReturn commandSleep(void *event, + UInt32 interruptible = THREAD_ABORTSAFE); + +/*! @function commandWakeup + @abstract Wakeup one or more threads that are asleep on an event. + @param event Pointer to an address. + @param onlyOneThread true to only wake up at most one thread, false otherwise. */ + virtual void commandWakeup(void *event, bool oneThread = false); + +/*! @function disable + @abstract Disable the command gate + @discussion When a command gate is disabled all future calls to runAction and runCommand will stall until the gate is enable()d later. This can be used to block client threads when a system sleep is requested. The IOWorkLoop thread itself will never stall, even when making runAction/runCommand calls. This call must be made from a gated context, to clear potential race conditions. */ + virtual void disable(); + +/*! @function enable + @abstract Enable command gate, this will unblock any blocked Commands and Actions. + @discussion Enable the command gate. The attemptAction/attemptCommand calls will now be enabled and can succeeed. Stalled runCommand/runAction calls will be woken up. */ + virtual void enable(); + +/*! @function commandSleep + @abstract Put a thread that is currently holding the command gate to sleep. + @discussion Put a thread to sleep waiting for an event but release the gate first. If the event occurs or timeout occurs then the commandGate is closed before the function returns. + @param event Pointer to an address. + @param deadline Clock deadline to timeout the sleep. + @param interruptible THREAD_UNINT, THREAD_INTERRUPTIBLE or THREAD_ABORTSAFE. THREAD_UNINT specifies that the sleep cannot be interrupted by a signal. THREAD_INTERRUPTIBLE specifies that the sleep may be interrupted by a "kill -9" signal. THREAD_ABORTSAFE specifies that the sleep may be interrupted by any user signal. + @result THREAD_AWAKENED - normal wakeup, THREAD_TIMED_OUT - timeout expired, THREAD_INTERRUPTED - interrupted, THREAD_RESTART - restart operation entirely, kIOReturnNotPermitted if the calling thread does not hold the command gate. */ + virtual IOReturn commandSleep(void *event, + AbsoluteTime deadline, + UInt32 interruptible); + +private: +#if __LP64__ + OSMetaClassDeclareReservedUnused(IOCommandGate, 0); +#else + OSMetaClassDeclareReservedUsed(IOCommandGate, 0); +#endif + OSMetaClassDeclareReservedUnused(IOCommandGate, 1); + OSMetaClassDeclareReservedUnused(IOCommandGate, 2); + OSMetaClassDeclareReservedUnused(IOCommandGate, 3); + OSMetaClassDeclareReservedUnused(IOCommandGate, 4); + OSMetaClassDeclareReservedUnused(IOCommandGate, 5); + OSMetaClassDeclareReservedUnused(IOCommandGate, 6); + OSMetaClassDeclareReservedUnused(IOCommandGate, 7); +}; + +#endif /* !_IOKIT_IOCOMMANDGATE_H */ diff --git a/i386/include/IOKit/IOCommandPool.h b/i386/include/IOKit/IOCommandPool.h new file mode 100644 index 0000000..91069f3 --- /dev/null +++ b/i386/include/IOKit/IOCommandPool.h @@ -0,0 +1,230 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +/* + * + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + * 2001-01-17 gvdl Re-implement on IOCommandGate::commandSleep + * 11/13/2000 CJS Created IOCommandPool class and implementation + * + */ + +/*! + * @header IOCommandPool + * @abstract + * This header contains the IOCommandPool class definition. + */ + +#ifndef _IOKIT_IO_COMMAND_POOL_H_ +#define _IOKIT_IO_COMMAND_POOL_H_ + +/* + * Kernel + */ + +#if defined(KERNEL) && defined(__cplusplus) + +#include +#include +#include +#include +#include +#include + +/*! + * @class IOCommandPool + * @abstract Manipulates a pool of commands which inherit from IOCommand. + * @discussion + * The IOCommandPool class is used to manipulate a pool of commands which + * inherit from IOCommand. It includes a factory method to create a pool + * of a certain size. Once the factory method is invoked, the semaphore + * is set to zero. The caller must then put commands in the pool by creating + * the command (via the controller's factory method or a memory allocation) + * and calling the returnCommand method with the newly created command as its + * argument. + */ + +class IOCommandPool : public OSObject +{ + + OSDeclareDefaultStructors(IOCommandPool) + + +protected: + + queue_head_t fQueueHead; /* head of the queue of elements available */ + UInt32 fSleepers; /* Count of threads sleeping on this pool */ + IOCommandGate *fSerializer; /* command gate used for serializing pool access */ + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOEventSource in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + /*! + * @const kIOCommandPoolDefaultSize + * @abstract The default size of any command pool. + * @discussion + * kIOCommandPoolDefaultSize is the default size of any command pool. + * The default size was determined to be the smallest size for which + * a pool makes sense. + */ + + static const UInt32 kIOCommandPoolDefaultSize = 2; + + /* + * Free all of this object's outstanding resources. + */ + + virtual void free(void); + + +public: + + /*! + * @function initWithWorkLoop + * @abstract Primary initializer for an IOCommandPool object. + * @discussion Primary initializer for an IOCommandPool. + * Should probably use IOCommandPool::withWorkLoop() as it is easier to use. + * @param inWorkLoop + * The workloop that this command pool should synchronize with. + * @result Returns true if command pool was successfully initialized. + */ + virtual bool initWithWorkLoop(IOWorkLoop *workLoop); + + /*! + * @function withWorkLoop + * @abstract Primary factory method for the IOCommandPool class + * @discussion + * The withWorkLoop method is what is known as a factory method. It creates + * a new instance of an IOCommandPool and returns a pointer to that object. + * @param inWorkLoop + * The workloop that this command pool should synchronize with. + * @result + * Returns a pointer to an instance of IOCommandPool if successful, + * otherwise NULL. + */ + + static IOCommandPool *withWorkLoop(IOWorkLoop *inWorkLoop); + + /*! + * @function init + * @abstract Should never be used, obsolete. See initWithWorkLoop. + */ + virtual bool init(IOService *inOwner, + IOWorkLoop *inWorkLoop, + UInt32 inSize = kIOCommandPoolDefaultSize); + + /*! + * @function withWorkLoop + * @abstract Should never be used, obsolete. See IOCommandPool::withWorkLoop. + */ + static IOCommandPool *commandPool(IOService *inOwner, + IOWorkLoop *inWorkLoop, + UInt32 inSize = kIOCommandPoolDefaultSize); + + + /*! + * @function getCommand + * @discussion The getCommand method is used to get a pointer to an object of type IOCommand from the pool. + * @param blockForCommand + * If the caller would like to have its thread slept until a command is + * available, it should pass true, else false. + * @result + * If the caller passes true in blockForCommand, getCommand guarantees that + * the result will be a pointer to an IOCommand object from the pool. If + * the caller passes false, s/he is responsible for checking whether a non-NULL + * pointer was returned. + */ + + virtual IOCommand *getCommand(bool blockForCommand = true); + + /*! + * @function returnCommand + * @discussion + * The returnCommand method is used to place an object of type IOCommand + * into the pool, whether it be the first time, or the 1000th time. + * @param commmand + * The command to place in the pool. + */ + + virtual void returnCommand(IOCommand *command); + +protected: + + /*! + * @function gatedGetCommand + * @discussion + * The gatedGetCommand method is used to serialize the extraction of a + * command from the pool behind a command gate, runAction-ed by getCommand. + * @param vCommand + * A pointer to a pointer to an IOCommand object where the returned + * command will be stored. + * @param vBlock + * A bool that indicates whether to block the request until a command + * becomes available. + * @result + * Returns kIOReturnNoResources if no command is available and the client + * doesn't wish to block until one does become available. + * kIOReturnSuccess if the vCommand argument is valid. + */ + virtual IOReturn gatedGetCommand(IOCommand **command, bool blockForCommand); + + /*! + * @function gatedReturnCommand + * @discussion + * The gatedReturnCommand method is used to serialize the return of a + * command to the pool behind a command gate, runAction-ed by returnCommand. + * @param vCommand + * A pointer to the IOCommand object to be returned to the pool. + * @result + * Always returns kIOReturnSuccess if the vCommand argument is valid. + */ + virtual IOReturn gatedReturnCommand(IOCommand *command); + +private: + OSMetaClassDeclareReservedUnused(IOCommandPool, 0); + OSMetaClassDeclareReservedUnused(IOCommandPool, 1); + OSMetaClassDeclareReservedUnused(IOCommandPool, 2); + OSMetaClassDeclareReservedUnused(IOCommandPool, 3); + OSMetaClassDeclareReservedUnused(IOCommandPool, 4); + OSMetaClassDeclareReservedUnused(IOCommandPool, 5); + OSMetaClassDeclareReservedUnused(IOCommandPool, 6); + OSMetaClassDeclareReservedUnused(IOCommandPool, 7); +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_COMMAND_POOL_H_ */ diff --git a/i386/include/IOKit/IOConditionLock.h b/i386/include/IOKit/IOConditionLock.h new file mode 100644 index 0000000..f628fee --- /dev/null +++ b/i386/include/IOKit/IOConditionLock.h @@ -0,0 +1,71 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * Copyright (c) 1994-1996 NeXT Software, Inc. All rights reserved. + */ + +#ifndef _IOKIT_IOCONDITIONLOCK_H +#define _IOKIT_IOCONDITIONLOCK_H + +#include +#include +#include + +#include + +class IOConditionLock : public OSObject +{ + OSDeclareDefaultStructors(IOConditionLock) + +private: + IOLock * cond_interlock; // condition var Simple lock + volatile int condition; + + IOLock * sleep_interlock; // sleep lock Simple lock + unsigned char interruptible; + volatile bool want_lock; + volatile bool waiting; + +public: + static IOConditionLock *withCondition(int condition, bool inIntr = true); + virtual bool initWithCondition(int condition, bool inIntr = true); + virtual void free(); + + virtual bool tryLock(); // acquire lock, no waiting + virtual int lock(); // acquire lock (enter critical section) + virtual void unlock(); // release lock (leave critical section) + + virtual bool getInterruptible() const; + virtual int getCondition() const; + virtual int setCondition(int condition); + + virtual int lockWhen(int condition); // acquire lock when condition + virtual void unlockWith(int condition); // set condition & release lock +}; + +#endif /* _IOKIT_IOCONDITIONLOCK_H */ diff --git a/i386/include/IOKit/IODMACommand.h b/i386/include/IOKit/IODMACommand.h new file mode 100644 index 0000000..a2a2852 --- /dev/null +++ b/i386/include/IOKit/IODMACommand.h @@ -0,0 +1,557 @@ +/* + * Copyright (c) 2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _IODMACOMMAND_H +#define _IODMACOMMAND_H + +#include +#include +class IOMapper; + +/**************************** class IODMACommand ***************************/ + +/*! + @class IODMACommand + @abstract A mechanism to convert memory references to I/O bus addresses. + @discussion The IODMACommand is supersedes the IOMemoryCursor and greatly enhances the functionality and power of it. The command can be specified to output 64 bit physical addresses and also allows driver writers bypass mapping hardware or get addresses suitable for non-snooped DMA. +

+ The command is designed to be very easily subclassable. Most driver writers need to associate some DMA operations with their memory descriptor and usually use a C structure for that purpose. This structure is often kept in a linked list. This IODMACommand has built it linkage and can be derived and 'public:' variables added, giving the developer a structure that can associate a memory descriptor with a particular dma command but will also allow the developer to generate that command and keep the state necessary for tracking it. +

+ It is envisaged that a pool of IODMACommands will be created at driver initialisation and each command will be kept in an IOCommandPool while not in use. However if developers wishes to maintain their own free lists that is certainly possible. See the and for sample code on manipulating the command's doubly linked list entries. +

+ The IODMACommand can be used in a 'weak-linked' manner. To do this you must avoid using any static member functions. Use the, much slower but safe, weakWithSpecification function. On success a dma command instance will be returned. This instance can then be used to clone as many commands as is needed. Remember deriving from this class can not be done weakly, that is no weak subclassing! +*/ + +class IODMACommand : public IOCommand +{ + OSDeclareDefaultStructors(IODMACommand); + +friend class IODMAEventSource; + +public: + +/*! + @typedef Segment32 + @discussion A 32 bit I/O bus address/length pair +*/ + struct Segment32 { + UInt32 fIOVMAddr, fLength; + }; + +/*! + @typedef Segment64 + @discussion A 64 bit I/O bus address/length pair +*/ + struct Segment64 { + UInt64 fIOVMAddr, fLength; + }; + +/*! @enum MappingOptions + @abstract Mapping types to indicate the desired mapper type for translating memory descriptors into I/O DMA Bus addresses. + @constant kNonCoherent Used by drivers for non-coherent transfers, implies unmapped memmory + @constant kMapped Allow a driver to define addressing size + @constant kBypassed Allow drivers to bypass any mapper + @constant kMaxMappingOptions Internal use only +*/ + enum MappingOptions { + kMapped = 0x00000000, + kBypassed = 0x00000001, + kNonCoherent = 0x00000002, + kTypeMask = 0x0000000f, + + kNoCacheStore = 0x00000010, // Memory in descriptor + kOnChip = 0x00000020, // Indicates DMA is on South Bridge + kIterateOnly = 0x00000040 // DMACommand will be used as a cursor only + }; + +/*! @enum SynchronizeOptions + @abstract Options for the synchronize method. + @constant kForceDoubleBuffer Copy the entire prepared range to a new page aligned buffer. +*/ + enum SynchronizeOptions { + kForceDoubleBuffer = 0x01000000 + }; + +/*! + @typedef SegmentFunction + @discussion Pointer to a C function that translates a 64 segment and outputs a single desired segment to the array at the requested index. There are a group of pre-implemented SegmentFunctions that may be usefull to the developer below. + @param segment The 64Bit I/O bus address and length. + @param segments Base of the output vector of DMA address length pairs. + @param segmentIndex Index to output 'segment' in the 'segments' array. + @result Returns true if segment encoding succeeded. false may be returned if the current segment does not fit in an output segment, i.e. a 38bit address wont fit into a 32 encoding. +*/ + typedef bool (*SegmentFunction)(IODMACommand *target, + Segment64 segment, + void *segments, + UInt32 segmentIndex); + + // -------------- Preimplemented output functions ---------------- + +/*! @function OutputHost32 + @abstract Output host natural Segment32 output segment function. +*/ + static bool OutputHost32(IODMACommand *target, + Segment64 seg, void *segs, UInt32 ind); + +/*! @defined kIODMACommandOutputHost32 + @abstract Output host natural Segment32 output segment function. + */ +#define kIODMACommandOutputHost32 (IODMACommand::OutputHost32) + +/*! @function OutputBig32 + @abstract Output big-endian Segment32 output segment function. +*/ + static bool OutputBig32(IODMACommand *target, + Segment64 seg, void *segs, UInt32 ind); + +/*! @defined kIODMACommandOutputBig32 + @abstract Output big-endian Segment32 output segment function. + */ +#define kIODMACommandOutputBig32 (IODMACommand::OutputBig32) + +/*! @function OutputLittle32 + @abstract Output little-endian Segment32 output segment function. +*/ + static bool OutputLittle32(IODMACommand *target, + Segment64 seg, void *segs, UInt32 ind); + +/*! @defined kIODMACommandOutputLittle32 + @abstract Output little-endian Segment32 output segment function. +*/ +#define kIODMACommandOutputLittle32 (IODMACommand::OutputLittle32) + +/*! @function OutputHost64 + @abstract Output host natural Segment64 output segment function. +*/ + static bool OutputHost64(IODMACommand *target, + Segment64 seg, void *segs, UInt32 ind); + +/*! @defined kIODMACommandOutputHost64 + @abstract Output host natural Segment64 output segment function. +*/ +#define kIODMACommandOutputHost64 (IODMACommand::OutputHost64) + +/*! @function OutputBig64 + @abstract Output big-endian Segment64 output segment function. +*/ + static bool OutputBig64(IODMACommand *target, + Segment64 seg, void *segs, UInt32 ind); + +/*! @defined kIODMACommandOutputLittle64 + @abstract Output little-endian Segment64 output segment function. +*/ +#define kIODMACommandOutputBig64 (IODMACommand::OutputBig64) + +/*! @function OutputLittle64 + @abstract Output little-endian Segment64 output segment function. +*/ + static bool OutputLittle64(IODMACommand *target, + Segment64 seg, void *segs, UInt32 ind); + +/*! @defined kIODMACommandOutputBig64 + @abstract Output big-endian Segment64 output segment function. +*/ +#define kIODMACommandOutputLittle64 (IODMACommand::OutputLittle64) + +/*! @function withSpecification + @abstract Creates and initializes an IODMACommand in one operation. + @discussion Factory function to create and initialize an IODMACommand in one operation. + @param outSegFunc SegmentFunction to call to output one physical segment. A set of nine commonly required segment functions are provided. + @param numAddressBits Number of bits that the hardware uses on its internal address bus. Typically 32 but may be more on modern hardware. A 0 implies no-restriction other than that implied by the output segment function. + @param maxSegmentSize Maximum allowable size for one segment. If 0 is passed the maximum segment size is unlimited. + @param mappingOptions is the type of mapping that is required to translate an IOMemoryDescriptor into the desired number of bits. For instance if your hardware only supports 32 bits but must run on machines with > 4G of RAM some mapping will be required. Number of bits will be specified in numAddressBits, see below.This parameter can take 3 values:- kNonCoherent - used for non-coherent hardware transfers, Mapped - Validate that all I/O bus generated addresses are within the number of addressing bits specified, Bypassed indicates that bypassed addressing is required, this is used when the hardware transferes are into coherent memory but no mapping is required. See also prepare() for failure cases. + @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. + @param alignment Alignment restriction, in bytes, on I/O bus addresses. Defaults to single byte alignment. + @param mapper For mapping types kMapped & kBypassed mapper is used to define the hardware that will perform the mapping, defaults to the system mapper. + @result Returns a new memory cursor if successfully created and initialized, 0 otherwise. +*/ + static IODMACommand * + withSpecification(SegmentFunction outSegFunc, + UInt8 numAddressBits, + UInt64 maxSegmentSize, + MappingOptions mappingOptions = kMapped, + UInt64 maxTransferSize = 0, + UInt32 alignment = 1, + IOMapper *mapper = 0, + void *refCon = 0); + +/*! @function weakWithSpecification + @abstract Creates and initialises an IODMACommand in one operation if this version of the operating system supports it. + @discussion Factory function to create and initialise an IODMACommand in one operation. The function allows a developer to 'weak' link with IODMACommand. This function will return kIOReturnUnsupported if the IODMACommand is unavailable. This function is actually fairly slow so it will be better to call it once then clone the successfully create command using cloneCommand (q.v.). + @param newCommand Output reference variable of the newly created IODMACommand. + @param outSegFunc SegmentFunction to call to output one physical segment. A set of nine commonly required segment functions are provided. + @param numAddressBits Number of bits that the hardware uses on its internal address bus. Typically 32 but may be more on modern hardware. A 0 implies no-restriction other than that implied by the output segment function. + @param maxSegmentSize Maximum allowable size for one segment. Zero is treated as an unlimited segment size. + @param mapType is the type of mapping that is required to translate an IOMemoryDescriptor into the desired number of bits. For instance if your hardware only supports 32 bits but must run on machines with > 4G of RAM some mapping will be required. Number of bits will be specified in numAddressBits, see below. This parameter can take 3 values:- kNonCoherent - used for non-coherent hardware transfers, Mapped - Validate that all I/O bus generated addresses are within the number of addressing bits specified, Bypassed indicates that bypassed addressing is required, this is used when the hardware transfers are into coherent memory but no mapping is required. See also prepare() for failure cases. + @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. + @param alignment Alignment restriction, in bytes, on I/O bus addresses. Defaults to single byte alignment. + @param mapper For mapping types kMapped & kBypassed mapper is used to define the hardware that will perform the mapping, defaults to the system mapper. + @result kIOReturnSuccess if everything is OK, otherwise kIOReturnBadArgument if newCommand is NULL, kIOReturnUnsupported if the kernel doesn't export IODMACommand or IOReturnError if the new command fails to init, q.v. initWithSpecification. +*/ + // Note that the function has the attribute always_inline. + // The point of this function is to make a call into the kernel + // without generating an undefined symbol. If the client could call + // the code as a function then the goal of no undefined symbols + // would be lost thus defeating the purpose. + static inline IOReturn weakWithSpecification + (IODMACommand **newCommand, + SegmentFunction outSegFunc, + UInt8 numAddressBits, + UInt64 maxSegmentSize, + MappingOptions mapType = kMapped, + UInt64 maxTransferSize = 0, + UInt32 alignment = 1, + IOMapper *mapper = 0, + void *refCon = 0) __attribute__((always_inline)); + +/*! + @function cloneCommand + @abstract Creates a new command based on the specification of the current one. + @discussion Factory function to create and initialise an IODMACommand in one operation. The current command's specification will be duplicated in the new object, but however none of its state will be duplicated. This means that it is safe to clone a command even if it is currently active and running, however you must be certain that the command to be duplicated does have a valid reference for the duration. + @result Returns a new memory cursor if successfully created and initialised, 0 otherwise. +*/ + virtual IODMACommand *cloneCommand(void *refCon = 0); + +/*! @function initWithSpecification + @abstract Primary initializer for the IODMACommand class. + @param outSegFunc SegmentFunction to call to output one physical segment. A set of nine commonly required segment functions are provided. + @param numAddressBits Number of bits that the hardware uses on its internal address bus. Typically 32 but may be more on modern hardware. A 0 implies no-restriction other than that implied by the output segment function. + @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0 which means any size. + @param mappingOptions is the type of mapping that is required to translate an IOMemoryDescriptor into the desired number of bits. For instance if your hardware only supports 32 bits but must run on machines with > 4G of RAM some mapping will be required. Number of bits will be specified in numAddressBits, see below.This parameter can take 3 values:- kNonCoherent - used for non-coherent hardware transfers, Mapped - Validate that all I/O bus generated addresses are within the number of addressing bits specified, Bypassed indicates that bypassed addressing is required, this is used when the hardware transferes are into coherent memory but no mapping is required. See also prepare() for failure cases. + @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. + @param alignment Alignment restriction, in bytes, on I/O bus addresses. Defaults to single byte alignment. + @param mapper For mapping types kMapped & kBypassed mapper is used to define the hardware that will perform the mapping, defaults to the system mapper. + @result Can fail if the mapping type is not recognised, if one of the 3 mandatory parameters are set to 0, if a 32 bit output function is selected when more than 32 bits of address is required or, if kBypassed is requested on a machine that doesn't support bypassing. Returns true otherwise. +*/ + virtual bool initWithSpecification( SegmentFunction outSegFunc, + UInt8 numAddressBits, + UInt64 maxSegmentSize, + MappingOptions mappingOptions = kMapped, + UInt64 maxTransferSize = 0, + UInt32 alignment = 1, + IOMapper *mapper = 0, + void *refCon = 0); + +/*! @function setMemoryDescriptor + @abstract Sets and resets the DMACommand's current memory descriptor + @discussion The DMA command will configure itself based on the information that it finds in the memory descriptor. It looks for things like the direction of the memory descriptor and whether the current memory descriptor is already mapped into some IOMMU. As a programmer convenience it can also prepare the memory descriptor immediately. See prepare(). Note the IODMACommand is designed to used multiple times with a succession of memory descriptors, making the pooling of commands possible. It is an error though to attempt to reset a currently prepared() DMA command. Warning: This routine may block so never try to autoprepare an IODMACommand while in a gated context, i.e. one of the WorkLoops action call outs. + @param mem A pointer to the current I/Os memory descriptor. + @param autoPrepare An optional boolean variable that will call the prepare() function automatically after the memory descriptor is processed. Defaults to true. + @result Returns kIOReturnSuccess, kIOReturnBusy if currently prepared, kIOReturnNoSpace if the length(mem) >= Maximum Transfer Size or the error codes returned by prepare() (qv). +*/ + virtual IOReturn setMemoryDescriptor(const IOMemoryDescriptor *mem, + bool autoPrepare = true); + +/*! @function clearMemoryDescriptor + @abstract Clears the DMACommand's current memory descriptor + @discussion completes and invalidates the cache if the DMA command is currently active, copies all data from bounce buffers if necessary and releases all resources acquired during setMemoryDescriptor. + @param autoComplete An optional boolean variable that will call the complete() function automatically before the memory descriptor is processed. Defaults to true. +*/ + virtual IOReturn clearMemoryDescriptor(bool autoComplete = true); + +/*! @function getMemoryDescriptor + @abstract Get the current memory descriptor +*/ + virtual const IOMemoryDescriptor *getMemoryDescriptor() const; + +/*! @function prepare + @abstract Prepare the memory for an I/O transfer. + @discussion Allocate the mapping resources neccessary for this transfer, specifying a sub range of the IOMemoryDescriptor that will be the target of the I/O. The complete() method frees these resources. Data may be copied to buffers for kIODirectionOut memory descriptors, depending on hardware mapping resource availabilty or alignment restrictions. It should be noted that the this function may block and should only be called on the clients context, i.e never call this routine while gated; also the call itself is not thread safe though this should be an issue as each IODMACommand is independant. + @param offset defines the starting offset in the memory descriptor the DMA command will operate on. genIOVMSegments will produce its results based on the offset and length passed to the prepare method. + @param length defines the ending position in the memory descriptor the DMA command will operate on. genIOVMSegments will produce its results based on the offset and length passed to the prepare method. + @param flushCache Flush the caches for the memory descriptor and make certain that the memory cycles are complete. Defaults to true for kNonCoherent and is ignored by the other types. + @param synchronize Copy any buffered data back from the target IOMemoryDescriptor. Defaults to true, if synchronize() is being used to explicitly copy data, passing false may avoid an unneeded copy. + @result An IOReturn code. */ + + virtual IOReturn prepare(UInt64 offset = 0, UInt64 length = 0, bool flushCache = true, bool synchronize = true); + +/*! @function complete + @abstract Complete processing of DMA mappings after an I/O transfer is finished. + @discussion This method should not be called unless a prepare was previously issued; the prepare() and complete() must occur in pairs, before and after an I/O transfer + @param invalidCache Invalidate the caches for the memory descriptor. Defaults to true for kNonCoherent and is ignored by the other types. + @param synchronize Copy any buffered data back to the target IOMemoryDescriptor. Defaults to true, if synchronize() is being used to explicitly copy data, passing false may avoid an unneeded copy. + @result kIOReturnNotReady if not prepared, kIOReturnSuccess otherwise. */ + + virtual IOReturn complete(bool invalidateCache = true, bool synchronize = true); + +/*! @function synchronize + @abstract Bring IOMemoryDescriptor and IODMACommand buffers into sync. + @discussion This method should not be called unless a prepare was previously issued. If needed a caller may synchronize any IODMACommand buffers with the original IOMemoryDescriptor buffers. + @param options Specifies the direction of the copy: + kIODirectionOut copy IOMemoryDesciptor memory to any IODMACommand buffers. By default this action takes place automatically at prepare(). + kIODirectionIn copy any IODMACommand buffers back to the IOMemoryDescriptor. By default this action takes place automatically at complete(). + kForceDoubleBuffer copy the entire prepared range to a new page aligned buffer. + @result kIOReturnNotReady if not prepared, kIOReturnBadArgument if invalid options are passed, kIOReturnSuccess otherwise. */ + + virtual IOReturn synchronize(IOOptionBits options); + +/*! @function genIOVMSegments + @abstract Generates a physical scatter/gather for the current DMA command + @discussion Generates a list of physical segments from the given memory descriptor, relative to the current position of the descriptor. The constraints that are set during initialisation will be respected. This function maintains the state across multiple calls for efficiency. However the state is discarded if the new offset is not the expected one. + @param offset input/output parameter, defines the starting and ending offset in the memory descriptor, relative to any offset passed to the prepare() method. + @param segments Void pointer to base of output physical scatter/gather list. Always passed directly onto the SegmentFunction. + @param numSegments Input/output parameter Number of segments that can fit in the segment array and returns number of segments generated. + @result kIOReturnSuccess on success, kIOReturnOverrun if the memory descriptor is exhausted, kIOReturnMessageTooLarge if the output segment function's address bits has insufficient resolution for a segment, kIOReturnNotReady if the DMA command has not be prepared, kIOReturnBadArgument if the DMA command doesn't have a memory descriptor yet or some of the parameters are NULL and kIOReturnNotReady if the DMA command is not prepared. +*/ + virtual IOReturn genIOVMSegments(UInt64 *offset, + void *segments, + UInt32 *numSegments); + +private: + virtual UInt64 transfer( IOOptionBits transferOp, UInt64 offset, void * buffer, UInt64 length ); + +public: + +/*! @function writeBytes + @abstract Copy data to the IODMACommand's buffer from the specified buffer. + @discussion This method copies data to the IODMACommand's memory at the given offset, from the caller's buffer. The IODMACommand must be prepared, and the offset is relative to the prepared offset. + @param offset A byte offset into the IODMACommand's memory, relative to the prepared offset. + @param bytes The caller supplied buffer to copy the data from. + @param length The length of the data to copy. + @result The number of bytes copied, zero will be returned if the specified offset is beyond the prepared length of the IODMACommand. */ + + UInt64 writeBytes(UInt64 offset, const void *bytes, UInt64 length); + +/*! @function readBytes + @abstract Copy data from the IODMACommand's buffer to the specified buffer. + @discussion This method copies data from the IODMACommand's memory at the given offset, to the caller's buffer. The IODMACommand must be prepared, and the offset is relative to the prepared offset. + @param offset A byte offset into the IODMACommand's memory, relative to the prepared offset. + @param bytes The caller supplied buffer to copy the data to. + @param length The length of the data to copy. + @result The number of bytes copied, zero will be returned if the specified offset is beyond the prepared length of the IODMACommand. */ + + UInt64 readBytes(UInt64 offset, void *bytes, UInt64 length); + +/*! @function gen32IOVMSegments + @abstract Helper function for a type checked call to genIOVMSegments(qv), for use with an IODMACommand set up with the output function kIODMACommandOutputHost32, kIODMACommandOutputBig32, or kIODMACommandOutputLittle32. If the output function of the IODMACommand is not a 32 bit function, results will be incorrect. +*/ + inline IOReturn gen32IOVMSegments(UInt64 *offset, + Segment32 *segments, + UInt32 *numSegments) + { return genIOVMSegments(offset, segments, numSegments); }; + +/*! @function gen64IOVMSegments + @abstract Helper function for a type checked call to genIOVMSegments(qv), for use with an IODMACommand set up with the output function kIODMACommandOutputHost64, kIODMACommandOutputBig64, or kIODMACommandOutputLittle64. If the output function of the IODMACommand is not a 64 bit function, results will be incorrect. +*/ + inline IOReturn gen64IOVMSegments(UInt64 *offset, + Segment64 *segments, + UInt32 *numSegments) + { return genIOVMSegments(offset, segments, numSegments); }; + + IOReturn + genIOVMSegments(SegmentFunction segmentFunction, + UInt64 *offsetP, + void *segmentsP, + UInt32 *numSegmentsP); + + virtual void free(); + +private: + typedef IOReturn (*InternalSegmentFunction)( + void *reference, + IODMACommand *target, + Segment64 segment, + void *segments, + UInt32 segmentIndex); + + IOReturn genIOVMSegments(uint32_t op, + InternalSegmentFunction outSegFunc, + void *reference, + UInt64 *offsetP, + void *segmentsP, + UInt32 *numSegmentsP); + + static IOReturn clientOutputSegment( + void *reference, IODMACommand *target, + Segment64 segment, void *vSegList, UInt32 outSegIndex); + + static IOReturn segmentOp( + void *reference, + IODMACommand *target, + Segment64 segment, + void *segments, + UInt32 segmentIndex); + IOReturn walkAll(UInt8 op); + +public: + +/*! @function prepareWithSpecification + @abstract Prepare the memory for an I/O transfer with a new specification. + @discussion Allocate the mapping resources neccessary for this transfer, specifying a sub range of the IOMemoryDescriptor that will be the target of the I/O. The complete() method frees these resources. Data may be copied to buffers for kIODirectionOut memory descriptors, depending on hardware mapping resource availabilty or alignment restrictions. It should be noted that the this function may block and should only be called on the clients context, i.e never call this routine while gated; also the call itself is not thread safe though this should be an issue as each IODMACommand is independant. + @param outSegFunc SegmentFunction to call to output one physical segment. A set of nine commonly required segment functions are provided. + @param numAddressBits Number of bits that the hardware uses on its internal address bus. Typically 32 but may be more on modern hardware. A 0 implies no-restriction other than that implied by the output segment function. + @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0 which means any size. + @param mappingOptions is the type of mapping that is required to translate an IOMemoryDescriptor into the desired number of bits. For instance if your hardware only supports 32 bits but must run on machines with > 4G of RAM some mapping will be required. Number of bits will be specified in numAddressBits, see below.This parameter can take 3 values:- kNonCoherent - used for non-coherent hardware transfers, Mapped - Validate that all I/O bus generated addresses are within the number of addressing bits specified, Bypassed indicates that bypassed addressing is required, this is used when the hardware transferes are into coherent memory but no mapping is required. See also prepare() for failure cases. + @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. + @param alignment Alignment restriction, in bytes, on I/O bus addresses. Defaults to single byte alignment. + @param mapper For mapping types kMapped & kBypassed mapper is used to define the hardware that will perform the mapping, defaults to the system mapper. + @param offset defines the starting offset in the memory descriptor the DMA command will operate on. genIOVMSegments will produce its results based on the offset and length passed to the prepare method. + @param length defines the ending position in the memory descriptor the DMA command will operate on. genIOVMSegments will produce its results based on the offset and length passed to the prepare method. + @param flushCache Flush the caches for the memory descriptor and make certain that the memory cycles are complete. Defaults to true for kNonCoherent and is ignored by the other types. + @param synchronize Copy any buffered data back from the target IOMemoryDescriptor. Defaults to true, if synchronize() is being used to explicitly copy data, passing false may avoid an unneeded copy. + @result An IOReturn code. Can fail if the mapping type is not recognised, if one of the 3 mandatory parameters are set to 0, if a 32 bit output function is selected when more than 32 bits of address is required or, if kBypassed is requested on a machine that doesn't support bypassing. +*/ + + virtual IOReturn prepareWithSpecification(SegmentFunction outSegFunc, + UInt8 numAddressBits, + UInt64 maxSegmentSize, + MappingOptions mappingOptions = kMapped, + UInt64 maxTransferSize = 0, + UInt32 alignment = 1, + IOMapper *mapper = 0, + UInt64 offset = 0, + UInt64 length = 0, + bool flushCache = true, + bool synchronize = true); + + static IOReturn transferSegment( + void *reference, + IODMACommand *target, + Segment64 segment, + void *segments, + UInt32 segmentIndex); + +/*! @function getPreparedOffsetAndLength + @abstract Returns the offset and length into the target IOMemoryDescriptor of a prepared IODDMACommand. + @discussion If successfully prepared, returns the offset and length into the IOMemoryDescriptor. Will fail for an unprepared IODMACommand. + @param offset returns the starting offset in the memory descriptor the DMA command was prepared with. Pass NULL for don't care. + @param length returns the length in the memory descriptor the DMA command was prepared with. Pass NULL for don't care. + @result An IOReturn code. kIOReturnNotReady if the IODMACommand is not prepared. */ + + virtual IOReturn getPreparedOffsetAndLength(UInt64 * offset, UInt64 * length); + + UInt8 getNumAddressBits(void); + UInt32 getAlignment(void); + +private: + OSMetaClassDeclareReservedUsed(IODMACommand, 0); + OSMetaClassDeclareReservedUsed(IODMACommand, 1); + OSMetaClassDeclareReservedUsed(IODMACommand, 2); + OSMetaClassDeclareReservedUnused(IODMACommand, 3); + OSMetaClassDeclareReservedUnused(IODMACommand, 4); + OSMetaClassDeclareReservedUnused(IODMACommand, 5); + OSMetaClassDeclareReservedUnused(IODMACommand, 6); + OSMetaClassDeclareReservedUnused(IODMACommand, 7); + OSMetaClassDeclareReservedUnused(IODMACommand, 8); + OSMetaClassDeclareReservedUnused(IODMACommand, 9); + OSMetaClassDeclareReservedUnused(IODMACommand, 10); + OSMetaClassDeclareReservedUnused(IODMACommand, 11); + OSMetaClassDeclareReservedUnused(IODMACommand, 12); + OSMetaClassDeclareReservedUnused(IODMACommand, 13); + OSMetaClassDeclareReservedUnused(IODMACommand, 14); + OSMetaClassDeclareReservedUnused(IODMACommand, 15); + +public: +/*! @var fRefCon Reference Constant, client defined publicly avialable */ + void *fRefCon; + +protected: + +/*! @var fMaxSegmentSize Maximum size of one segment in a scatter/gather list */ + UInt64 fMaxSegmentSize; + +/*! @var fMaxTransferSize + Maximum size of a transfer that this memory cursor is allowed to generate */ + UInt64 fMaxTransferSize; + +/*! @var fBypassMask + Mask to be ored into the address to bypass the given iommu's mapping. */ + UInt64 fBypassMask; + +/*! @var fMapper + Client defined mapper. */ + IOMapper *fMapper; + +/*! @var fMemory + memory descriptor for current I/O. */ + const IOMemoryDescriptor *fMemory; + +/*! @var fOutSeg The action method called when an event has been delivered */ + SegmentFunction fOutSeg; + +/*! @var fAlignMask + Alignment restriction mask. */ + UInt32 fAlignMask; + +/*! @var fNumAddressBits + Number of bits that the hardware can address */ + UInt32 fNumAddressBits; + +/*! @var fNumSegments + Number of contiguous segments required for the current memory descriptor and desired mapping */ + UInt32 fNumSegments; + +/*! @var fMappingOptions + What type of I/O virtual address mapping is required for this command */ + MappingOptions fMappingOptions; + +/*! @var fActive + fActive indicates that this DMA command is currently prepared and ready to go */ + UInt32 fActive; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + struct IODMACommandInternal * reserved; +}; + +IOReturn IODMACommand:: +weakWithSpecification(IODMACommand **newCommand, + SegmentFunction outSegFunc, + UInt8 numAddressBits, + UInt64 maxSegmentSize, + MappingOptions mapType, + UInt64 maxTransferSize, + UInt32 alignment, + IOMapper *mapper, + void *refCon) +{ + if (!newCommand) + return kIOReturnBadArgument; + + IODMACommand *self = (IODMACommand *) + OSMetaClass::allocClassWithName("IODMACommand"); + if (!self) + return kIOReturnUnsupported; + + IOReturn ret; + bool inited = self-> + initWithSpecification(outSegFunc, + numAddressBits, maxSegmentSize, mapType, + maxTransferSize, alignment, mapper, refCon); + if (inited) + ret = kIOReturnSuccess; + else { + self->release(); + self = 0; + ret = kIOReturnError; + } + + *newCommand = self; + return ret; +}; +#endif /* !_IODMACOMMAND_H */ + diff --git a/i386/include/IOKit/IODMAController.h b/i386/include/IOKit/IODMAController.h new file mode 100644 index 0000000..a8c1aed --- /dev/null +++ b/i386/include/IOKit/IODMAController.h @@ -0,0 +1,67 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IODMACONTROLLER_H +#define _IOKIT_IODMACONTROLLER_H + +#include +#include +#include + +class IODMAEventSource; + +class IODMAController : public IOService +{ + OSDeclareAbstractStructors(IODMAController); + + friend class IODMAEventSource; + + private: + IOService *_provider; + const OSSymbol *_dmaControllerName; + + protected: + virtual void registerDMAController(IOOptionBits options = 0); + virtual IOReturn initDMAChannel(IOService *provider, IODMAEventSource *dmaES, UInt32 *dmaIndex, UInt32 reqIndex) = 0; + virtual IOReturn startDMACommand(UInt32 dmaIndex, IODMACommand *dmaCommand, IODirection direction, + IOByteCount byteCount = 0, IOByteCount byteOffset = 0) = 0; + virtual IOReturn stopDMACommand(UInt32 dmaIndex, bool flush = false, uint64_t timeout = UINT64_MAX) = 0; + virtual void completeDMACommand(IODMAEventSource *dmaES, IODMACommand *dmaCommand); + virtual void notifyDMACommand(IODMAEventSource *dmaES, IODMACommand *dmaCommand, IOReturn status, IOByteCount actualByteCount); + virtual IOReturn queryDMACommand(UInt32 dmaIndex, IODMACommand **dmaCommand, IOByteCount *transferCount, bool waitForIdle = false) = 0; + virtual IOByteCount getFIFODepth(UInt32 dmaIndex) = 0; + + public: + static const OSSymbol *createControllerName(UInt32 phandle); + static IODMAController *getController(IOService *provider, UInt32 dmaIndex); + + virtual bool start(IOService *provider); +}; + + +#endif /* _IOKIT_IODMACONTROLLER_H */ diff --git a/i386/include/IOKit/IODMAEventSource.h b/i386/include/IOKit/IODMAEventSource.h new file mode 100644 index 0000000..18a72de --- /dev/null +++ b/i386/include/IOKit/IODMAEventSource.h @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IODMAEVENTSOURCE_H +#define _IOKIT_IODMAEVENTSOURCE_H + +#include +#include +#include +#include + +class IODMAController; + +class IODMAEventSource : public IOEventSource +{ + OSDeclareDefaultStructors(IODMAEventSource); + + friend class IODMAController; + + public: + typedef void (*Action)(OSObject *owner, IODMAEventSource *dmaES, IODMACommand *dmaCommand, IOReturn status, IOByteCount actualByteCount); +#define IODMAEventAction IODMAEventSource::Action + + protected: + virtual void completeDMACommand(IODMACommand *dmaCommand); + virtual void notifyDMACommand(IODMACommand *dmaCommand, IOReturn status, IOByteCount actualByteCount); + + public: + static IODMAEventSource *dmaEventSource(OSObject *owner, + IOService *provider, + Action completion = 0, + Action notification = 0, + UInt32 dmaIndex = 0); + + virtual IOReturn startDMACommand(IODMACommand *dmaCommand, IODirection direction, IOByteCount byteCount = 0, IOByteCount byteOffset = 0); + virtual IOReturn stopDMACommand(bool flush = false, uint64_t timeout = UINT64_MAX); + + virtual IOReturn queryDMACommand(IODMACommand **dmaCommand, IOByteCount *transferCount, bool waitForIdle = false); + virtual IOByteCount getFIFODepth(); + + private: + IOService *dmaProvider; + IODMAController *dmaController; + UInt32 dmaIndex; + queue_head_t dmaCommandsCompleted; + IOSimpleLock *dmaCommandsCompletedLock; + Action dmaCompletionAction; + Action dmaNotificationAction; + bool dmaSynchBusy; + + virtual bool init(OSObject *owner, + IOService *provider, + Action completion = 0, + Action notification = 0, + UInt32 dmaIndex = 0); + virtual bool checkForWork(void); +}; + +#endif /* _IOKIT_IODMAEVENTSOURCE_H */ diff --git a/i386/include/IOKit/IODataQueue.h b/i386/include/IOKit/IODataQueue.h new file mode 100644 index 0000000..458cb47 --- /dev/null +++ b/i386/include/IOKit/IODataQueue.h @@ -0,0 +1,141 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IODATAQUEUE_H +#define _IOKIT_IODATAQUEUE_H + +#include +#include +#include +#include + +typedef struct _IODataQueueMemory IODataQueueMemory; +class IOMemoryDescriptor; + +struct _notifyMsg { + mach_msg_header_t h; +}; + +/*! + * @class IODataQueue : public OSObject + * @abstract A generic queue designed to pass data from the kernel to a user process. + * @discussion The IODataQueue class is designed to allow kernel code to queue data to a user process. IODataQueue objects are designed to be used in a single producer / single consumer situation. As such, there are no locks on the data itself. Because the kernel enqueue and user-space dequeue methods follow a strict set of guidelines, no locks are necessary to maintain the integrity of the data struct. + * + *
Each data entry can be variable sized, but the entire size of the queue data region (including overhead for each entry) must be specified up front. + * + *
In order for the IODataQueue instance to notify the user process that data is available, a notification mach port must be set. When the queue is empty and a new entry is added, a message is sent to the specified port. + * + *
User client code exists in the IOKit framework that facilitates the creation of the receive notification port as well as the listen process for new data available notifications. + * + *
In order to make the data queue memory available to a user process, the method getMemoryDescriptor() must be used to get an IOMemoryDescriptor instance that can be mapped into a user process. Typically, the clientMemoryForType() method on an IOUserClient instance will be used to request the IOMemoryDescriptor and then return it to be mapped into the user process. + */ +class IODataQueue : public OSObject +{ + OSDeclareDefaultStructors(IODataQueue) + +protected: + IODataQueueMemory * dataQueue; + + void * notifyMsg; + + virtual void free(); + + /*! + * @function sendDataAvailableNotification + * @abstract Sends a dataAvailableNotification message to the specified mach port. + * @discussion This method sends a message to the mach port passed to setNotificationPort(). It is used to indicate that data is available in the queue. + */ + virtual void sendDataAvailableNotification(); + +public: + /*! + * @function withCapacity + * @abstract Static method that creates a new IODataQueue instance with the capacity specified in the size parameter. + * @discussion The actual size of the entire data queue memory region (to be shared into a user process) is equal to the capacity plus the IODataQueueMemory overhead. This overhead value can be determined from the DATA_QUEUE_MEMORY_HEADER_SIZE macro in . The size of the data queue memory region must include space for the overhead of each IODataQueueEntry. This entry overhead can be determined from the DATA_QUEUE_ENTRY_HEADER_SIZE macro in .
This method allocates a new IODataQueue instance and then calls initWithCapacity() with the given size parameter. If the initWithCapacity() fails, the new instance is released and zero is returned. + * @param size The size of the data queue memory region. + * @result Returns the newly allocated IODataQueue instance. Zero is returned on failure. + */ + static IODataQueue *withCapacity(UInt32 size); + + /*! + * @function withEntries + * @abstract Static method that creates a new IODataQueue instance with the specified number of entries of the given size. + * @discussion This method will create a new IODataQueue instance with enough capacity for numEntries of entrySize. It does account for the IODataQueueEntry overhead for each entry. Note that the numEntries and entrySize are simply used to determine the data region size. They do not actually restrict the size of number of entries that can be added to the queue.
This method allocates a new IODataQueue instance and then calls initWithEntries() with the given numEntries and entrySize parameters. If the initWithEntries() fails, the new instance is released and zero is returned. + * @param numEntries Number of entries to allocate space for. + * @param entrySize Size of each entry. + * @result Reeturns the newly allocated IODataQueue instance. Zero is returned on failure. + */ + static IODataQueue *withEntries(UInt32 numEntries, UInt32 entrySize); + + /*! + * @function initWithCapacity + * @abstract Initializes an IODataQueue instance with the capacity specified in the size parameter. + * @discussion The actual size of the entire data queue memory region (to be shared into a user process) is equal to the capacity plus the IODataQueueMemory overhead. This overhead value can be determined from the DATA_QUEUE_MEMORY_HEADER_SIZE macro in . The size of the data queue memory region must include space for the overhead of each IODataQueueEntry. This entry overhead can be determined from the DATA_QUEUE_ENTRY_HEADER_SIZE macro in . + * @param size The size of the data queue memory region. + * @result Returns true on success and false on failure. + */ + virtual Boolean initWithCapacity(UInt32 size); + + /*! + * @function initWithEntries + * @abstract Initializes an IODataQueue instance with the specified number of entries of the given size. + * @discussion This method will initialize an IODataQueue instance with enough capacity for numEntries of entrySize. It does account for the IODataQueueEntry overhead for each entry. Note that the numEntries and entrySize are simply used to determine the data region size. They do not actually restrict the size of number of entries that can be added to the queue.
This method allocates a new IODataQueue instance and then calls initWithEntries() with the given numEntries and entrySize parameters. + * @param numEntries Number of entries to allocate space for. + * @param entrySize Size of each entry. + * @result Reeturns true on success and false on failure. + */ + virtual Boolean initWithEntries(UInt32 numEntries, UInt32 entrySize); + + /*! + * @function enqueue + * @abstract Enqueues a new entry on the queue. + * @discussion This method adds a new data entry of dataSize to the queue. It sets the size parameter of the entry pointed to by the tail value and copies the memory pointed to by the data parameter in place in the queue. Once that is done, it moves the tail to the next available location. When attempting to add a new entry towards the end of the queue and there isn't enough space at the end, it wraps back to the beginning.
If the queue is empty when a new entry is added, sendDataAvailableNotification() is called to send a message to the user process that data is now available. + * @param data Pointer to the data to be added to the queue. + * @param dataSize Size of the data pointed to by data. + * @result Returns true on success and false on failure. Typically failure means that the queue is full. + */ + virtual Boolean enqueue(void *data, UInt32 dataSize); + + /*! + * @function setNotificationPort + * @abstract Creates a simple mach message targeting the mach port specified in port. + * @discussion This message is sent when data is added to an empty queue. It is to notify a user process that new data has become available. + * @param port The mach port to target with the notification message. + */ + virtual void setNotificationPort(mach_port_t port); + + /*! + * @function getMemoryDescriptor + * @abstract Returns a memory descriptor covering the IODataQueueMemory region. + * @discussion The IOMemoryDescriptor instance returned by this method is intended to be mapped into a user process. This is the memory region that the IODataQueueClient code operates on. + * @result Returns a newly allocated IOMemoryDescriptor for the IODataQueueMemory region. Returns zero on failure. + */ + virtual IOMemoryDescriptor *getMemoryDescriptor(); +}; + +#endif /* _IOKIT_IODATAQUEUE_H */ diff --git a/i386/include/IOKit/IODataQueueShared.h b/i386/include/IOKit/IODataQueueShared.h new file mode 100644 index 0000000..2fa0e9a --- /dev/null +++ b/i386/include/IOKit/IODataQueueShared.h @@ -0,0 +1,92 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IODATAQUEUESHARED_H +#define _IOKIT_IODATAQUEUESHARED_H + +#include +#include +#include + +/*! + * @typedef IODataQueueEntry + * @abstract Represents an entry within the data queue + * @discussion This is a variable sized struct. The data field simply represents the start of the data region. The size of the data region is stored in the size field. The whole size of the specific entry is the size of a UInt32 plus the size of the data region. + * @field size The size of the following data region. + * @field data Represents the beginning of the data region. The address of the data field is a pointer to the start of the data region. + */ +typedef struct _IODataQueueEntry{ + UInt32 size; + UInt8 data[4]; +} IODataQueueEntry; + +/*! + * @typedef IODataQueueMemory + * @abstract A struct mapping to the header region of a data queue. + * @discussion This struct is variable sized. The struct represents the data queue header information plus a pointer to the actual data queue itself. The size of the struct is the combined size of the header fields (3 * sizeof(UInt32)) plus the actual size of the queue region. This size is stored in the queueSize field. + * @field queueSize The size of the queue region pointed to by the queue field. + * @field head The location of the queue head. This field is represented as a byte offset from the beginning of the queue memory region. + * @field tail The location of the queue tail. This field is represented as a byte offset from the beginning of the queue memory region. + * @field queue Represents the beginning of the queue memory region. The size of the region pointed to by queue is stored in the queueSize field. + */ +typedef struct _IODataQueueMemory { + UInt32 queueSize; + volatile UInt32 head; + volatile UInt32 tail; + IODataQueueEntry queue[1]; +} IODataQueueMemory; + +/*! + * @typedef IODataQueueAppendix + * @abstract A struct mapping to the appendix region of a data queue. + * @discussion This struct is variable sized dependent on the version. The struct represents the data queue appendix information. + * @field version The version of the queue appendix. + * @field port The notification port associated with this queue. + */ +typedef struct _IODataQueueAppendix { + UInt32 version; + mach_msg_header_t msgh; +} IODataQueueAppendix; + +/*! + * @defined DATA_QUEUE_ENTRY_HEADER_SIZE Represents the size of the data queue entry header independent of the actual size of the data in the entry. This is the overhead of each entry in the queue. The total size of an entry is equal to this value plus the size stored in the entry's size field (in IODataQueueEntry). + */ +#define DATA_QUEUE_ENTRY_HEADER_SIZE (sizeof(IODataQueueEntry) - 4) + +/*! + * @defined DATA_QUEUE_MEMORY_HEADER_SIZE Represents the size of the data queue memory header independent of the actual size of the queue data itself. The total size of the queue memory is equal to this value plus the size of the queue appendix and the size of the queue data region which is stored in the queueSize field of IODataQueueMeory. + */ +#define DATA_QUEUE_MEMORY_HEADER_SIZE (sizeof(IODataQueueMemory) - sizeof(IODataQueueEntry)) + +/*! + * @defined DATA_QUEUE_MEMORY_APPENDIX_SIZE Represents the size of the data queue memory appendix independent of the actual size of the queue data itself. The total size of the queue memory is equal to this value plus the size of queue header and size of the queue data region which is stored in the queueSize field of IODataQueueMeory. + */ +#define DATA_QUEUE_MEMORY_APPENDIX_SIZE (sizeof(IODataQueueAppendix)) + +#endif /* _IOKIT_IODATAQUEUESHARED_H */ + diff --git a/i386/include/IOKit/IODeviceMemory.h b/i386/include/IOKit/IODeviceMemory.h new file mode 100644 index 0000000..0665efc --- /dev/null +++ b/i386/include/IOKit/IODeviceMemory.h @@ -0,0 +1,98 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + +#ifndef _IOKIT_IODEVICEMEMORY_H +#define _IOKIT_IODEVICEMEMORY_H + +#include + +/*! @class IODeviceMemory + @abstract An IOMemoryDescriptor used for device physical memory ranges. + @discussion The IODeviceMemory class is a simple subclass of IOMemoryDescriptor that uses its methods to describe a single range of physical memory on a device. IODeviceMemory objects are usually looked up with IOService or IOPCIDevice accessors, and are created by memory-mapped bus families. IODeviceMemory implements only some factory methods in addition to the methods of IOMemoryDescriptor. +*/ + +class IODeviceMemory : public IOMemoryDescriptor +{ + OSDeclareDefaultStructors(IODeviceMemory) + +public: + +/*! @struct InitElement + @field start First physical address in the range. + @field length Length of the range. + @field tag 32-bit value not interpreted by IODeviceMemory or IOMemoryDescriptor, for use by the bus family. */ + + struct InitElement { + IOPhysicalAddress start; + IOPhysicalLength length; + IOOptionBits tag; + }; + +/*! @function arrayFromList + @abstract Constructs an OSArray of IODeviceMemory instances, each describing one physical range, and a tag value. + @discussion This method creates IODeviceMemory instances for each physical range passed in an IODeviceMemory::InitElement array. Each element consists of a physical address, length and tag value for the IODeviceMemory. The instances are returned as a created OSArray. + @param list An array of IODeviceMemory::InitElement structures. + @param count The number of elements in the list. + @result Returns a created OSArray of IODeviceMemory objects, to be released by the caller, or zero on failure. */ + + static OSArray * arrayFromList( + InitElement list[], + IOItemCount count ); + +/*! @function withRange + @abstract Constructs an IODeviceMemory instance, describing one physical range. + @discussion This method creates an IODeviceMemory instance for one physical range passed as a physical address and length. It just calls IOMemoryDescriptor::withPhysicalAddress. + @param address The physical address of the first byte in the memory. + @param withLength The length of memory. + @result Returns the created IODeviceMemory on success, to be released by the caller, or zero on failure. */ + + static IODeviceMemory * withRange( + IOPhysicalAddress start, + IOPhysicalLength length ); + +/*! @function withSubRange + @abstract Constructs an IODeviceMemory instance, describing a subset of an existing IODeviceMemory range. + @discussion This method creates an IODeviceMemory instance for a subset of an existing IODeviceMemory range, passed as a physical address offset and length. It just calls IOMemoryDescriptor::withSubRange. + @param of The parent IODeviceMemory of which a subrange is to be used for the new descriptor, which will be retained by the subrange IODeviceMemory. + @param offset A byte offset into the parent's memory. + @param length The length of the subrange. + @result Returns the created IODeviceMemory on success, to be released by the caller, or zero on failure. */ + + static IODeviceMemory * withSubRange( + IODeviceMemory * of, + IOPhysicalAddress offset, + IOPhysicalLength length ); +}; + +#endif /* ! _IOKIT_IODEVICEMEMORY_H */ diff --git a/i386/include/IOKit/IODeviceTreeSupport.h b/i386/include/IOKit/IODeviceTreeSupport.h new file mode 100644 index 0000000..15b5aa4 --- /dev/null +++ b/i386/include/IOKit/IODeviceTreeSupport.h @@ -0,0 +1,127 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + +#ifndef _IOKIT_IODEVICETREE_H +#define _IOKIT_IODEVICETREE_H + +#include +#include + +class IODeviceMemory; +class IOService; + +extern const IORegistryPlane * gIODTPlane; + +extern const OSSymbol * gIODTPHandleKey; + +extern const OSSymbol * gIODTCompatibleKey; +extern const OSSymbol * gIODTTypeKey; +extern const OSSymbol * gIODTModelKey; + +extern const OSSymbol * gIODTAAPLInterruptsKey; +extern const OSSymbol * gIODTDefaultInterruptController; +extern const OSSymbol * gIODTNWInterruptMappingKey; + +IORegistryEntry * IODeviceTreeAlloc( void * dtTop ); + + +bool IODTMatchNubWithKeys( IORegistryEntry * nub, + const char * keys ); + +bool IODTCompareNubName( const IORegistryEntry * regEntry, + OSString * name, OSString ** matchingName ); + +enum { + kIODTRecursive = 0x00000001, + kIODTExclusive = 0x00000002 +}; + +OSCollectionIterator * IODTFindMatchingEntries( IORegistryEntry * from, + IOOptionBits options, const char * keys ); + +typedef SInt32 (*IODTCompareAddressCellFunc) + (UInt32 cellCount, UInt32 left[], UInt32 right[]); +typedef void (*IODTNVLocationFunc) + (IORegistryEntry * entry, + UInt8 * busNum, UInt8 * deviceNum, UInt8 * functionNum ); + +void IODTSetResolving( IORegistryEntry * regEntry, + IODTCompareAddressCellFunc compareFunc, + IODTNVLocationFunc locationFunc ); + +bool IODTResolveAddressCell( IORegistryEntry * regEntry, + UInt32 cellsIn[], + IOPhysicalAddress * phys, IOPhysicalLength * len ); + +OSArray * IODTResolveAddressing( IORegistryEntry * regEntry, + const char * addressPropertyName, + IODeviceMemory * parent ); + +struct IONVRAMDescriptor { + unsigned int format:4; + unsigned int marker:1; + unsigned int bridgeCount:3; + unsigned int busNum:2; + unsigned int bridgeDevices:6 * 5; + unsigned int functionNum:3; + unsigned int deviceNum:5; +} __attribute__((aligned(2), packed)); + +IOReturn IODTMakeNVDescriptor( IORegistryEntry * regEntry, + IONVRAMDescriptor * hdr ); + +OSData * IODTFindSlotName( IORegistryEntry * regEntry, UInt32 deviceNumber ); + +const OSSymbol * IODTInterruptControllerName( + IORegistryEntry * regEntry ); + +bool IODTMapInterrupts( IORegistryEntry * regEntry ); + +enum { + kIODTInterruptShared = 0x00000001 +}; +IOReturn IODTGetInterruptOptions( IORegistryEntry * regEntry, int source, IOOptionBits * options ); + +#ifdef __cplusplus +extern "C" { +#endif + +IOReturn IONDRVLibrariesInitialize( IOService * provider ); + +#ifdef __cplusplus +} +#endif + +#endif /* _IOKIT_IODEVICETREE_H */ + diff --git a/i386/include/IOKit/IOEventSource.h b/i386/include/IOKit/IOEventSource.h new file mode 100644 index 0000000..4afc5aa --- /dev/null +++ b/i386/include/IOKit/IOEventSource.h @@ -0,0 +1,244 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* +Copyright (c) 1998 Apple Computer, Inc. All rights reserved. +HISTORY + 1998-7-13 Godfrey van der Linden(gvdl) + Created. + 1998-10-30 Godfrey van der Linden(gvdl) + Converted to C++ +*/ +#ifndef _IOKIT_IOEVENTSOURCE_H +#define _IOKIT_IOEVENTSOURCE_H + +#include + +#include + +#include +#include +#include + + +__BEGIN_DECLS +#include +#include +__END_DECLS + +/*! + @class IOEventSource : public OSObject + @abstract Abstract class for all work-loop event sources. + @discussion The IOEventSource declares the abstract super class that all +event sources must inherit from if an IOWorkLoop is to receive events from them. +

+ An event source can represent any event that should cause the work-loop of a +device to wake up and perform work. Two examples of event sources are the +IOInterruptEventSource which delivers interrupt notifications and IOCommandGate +which delivers command requests. +

+ A kernel module can always use the work-loop model for serialising access to +anything at all. The IOEventSource is used for communicating events to the +work-loop, and the chain of event sources should be used to walk the possible +event sources and demultipex them. Note a particular instance of an event +source may only be a member of 1 linked list chain. If you need to move it +between chains than make sure it is removed from the original chain before +attempting to move it. +

+ The IOEventSource makes no attempt to maintain the consitency of it's internal data across multi-threading. It is assumed that the user of these basic tools will protect the data that these objects represent in some sort of device wide instance lock. For example the IOWorkLoop maintains the event chain by handing off change request to its own thread and thus single threading access to its state. +

+ All subclasses of the IOEventSource are expected to implement the checkForWork() member function. + +

+ checkForWork() is the key method in this class. It is called by some work-loop when convienient and is expected to evaluate it's internal state and determine if an event has occurred since the last call. In the case of an event having occurred then the instance defined target(owner)/action will be called. The action is stored as an ordinary C function pointer but the first parameter is always the owner. This means that a C++ member function can be used as an action function though this depends on the ABI. +

+ Although the eventChainNext variable contains a reference to the next event source in the chain this reference is not retained. The list 'owner' i.e. the client that creates the event, not the work-loop, is expected to retain the source. +*/ +class IOEventSource : public OSObject +{ + OSDeclareAbstractStructors(IOEventSource) + friend class IOWorkLoop; + +public: +/*! + @typedef Action + @discussion Placeholder type for C++ function overloading discrimination. +As the all event sources require an action and it has to be stored somewhere +and be of some type, this is that type. + @param owner + Target of the function, can be used as a refcon. The owner is set +during initialisation. Note if a C++ function was specified this parameter +is implicitly the first paramter in the target member function's parameter list. +*/ + typedef void (*Action)(OSObject *owner, ...); + +/*! @defined IOEventSourceAction + @discussion Backward compatibilty define for the old non-class scoped type definition. See $link IOEventSource::Action */ + #define IOEventSourceAction IOEventSource::Action + +protected: +/*! @var eventChainNext + The next event source in the event chain. nil at end of chain. */ + IOEventSource *eventChainNext; + +/*! @var owner The owner object called when an event has been delivered. */ + OSObject *owner; + +/*! @var action + The action method called when an event has been delivered */ + Action action; + +/*! @var enabled + Is this event source enabled to deliver requests to the work-loop. */ + bool enabled; + +/*! @var workLoop What is the work-loop for this event source. */ + IOWorkLoop *workLoop; + +/*! @var refcon What ever the client wants to do, see $link setRefcon. */ + void *refcon; + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOEventSource in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + +/*! @function init + @abstract Primary initialiser for the IOEventSource class. + @param owner + Owner of this instance of an event source. Used as the first parameter +of the action callout. Owner will generally be an OSObject it doesn't have to +be as no member functions will be called directly in it. It can just be a +refcon for a client routine. + @param action + Pointer to C call out function. Action is a pointer to a C function +that gets called when this event source has outstanding work. It will usually +be called by the checkForWork member function. The first parameter of the +action call out will always be the owner, this allows C++ member functions to +be used as actions. Defaults to 0. + @result true if the inherited classes and this instance initialise +successfully. +*/ + virtual bool init(OSObject *owner, IOEventSource::Action action = 0); + +/*! @function checkForWork + @abstract Pure Virtual member function used by IOWorkLoop for work +scheduling. + @discussion This function will be called to request a subclass to check +it's internal state for any work to do and then to call out the owner/action. + @result Return true if this function needs to be called again before all its outstanding events have been processed. + */ + virtual bool checkForWork() = 0; + +/*! @function setWorkLoop + @abstract Set'ter for $link workLoop variable. + @param workLoop + Target work-loop of this event source instance. A subclass of +IOWorkLoop that at least reacts to signalWorkAvailable() and onThread functions. +*/ + virtual void setWorkLoop(IOWorkLoop *workLoop); + +/*! @function setNext + @abstract Set'ter for $link eventChainNext variable. + @param next + Pointer to another IOEventSource instance. +*/ + virtual void setNext(IOEventSource *next); + +/*! @function getNext + @abstract Get'ter for $link eventChainNext variable. + @result value of eventChainNext. +*/ + virtual IOEventSource *getNext() const; + + +protected: + // Methods to access the IOWorkLoop exported fields + void signalWorkAvailable(); + void openGate(); + void closeGate(); + bool tryCloseGate(); + int sleepGate(void *event, UInt32 type); + int sleepGate(void *event, AbsoluteTime deadline, UInt32 type); + void wakeupGate(void *event, bool oneThread); + +public: +/*! @function setAction + @abstract Set'ter for $link action variable. + @param action Pointer to a C function of type IOEventSource::Action. */ + virtual void setAction(IOEventSource::Action action); + +/*! @function getAction + @abstract Get'ter for $link action variable. + @result value of action. */ + virtual IOEventSource::Action getAction() const; + +/*! @function enable + @abstract Enable event source. + @discussion A subclass implementation is expected to respect the enabled +state when checkForWork is called. Calling this function will cause the +work-loop to be signalled so that a checkForWork is performed. */ + virtual void enable(); + +/*! @function disable + @abstract Disable event source. + @discussion A subclass implementation is expected to respect the enabled +state when checkForWork is called. */ + virtual void disable(); + +/*! @function isEnabled + @abstract Get'ter for $link enable variable. + @result true if enabled. */ + virtual bool isEnabled() const; + +/*! @function getWorkLoop + @abstract Get'ter for $link workLoop variable. + @result value of workLoop. */ + virtual IOWorkLoop *getWorkLoop() const; + +/*! @function onThread + @abstract Convenience function for workLoop->onThread. + @result true if called on the work-loop thread. +*/ + virtual bool onThread() const; + +private: + OSMetaClassDeclareReservedUnused(IOEventSource, 0); + OSMetaClassDeclareReservedUnused(IOEventSource, 1); + OSMetaClassDeclareReservedUnused(IOEventSource, 2); + OSMetaClassDeclareReservedUnused(IOEventSource, 3); + OSMetaClassDeclareReservedUnused(IOEventSource, 4); + OSMetaClassDeclareReservedUnused(IOEventSource, 5); + OSMetaClassDeclareReservedUnused(IOEventSource, 6); + OSMetaClassDeclareReservedUnused(IOEventSource, 7); +}; + +#endif /* !_IOKIT_IOEVENTSOURCE_H */ diff --git a/i386/include/IOKit/IOFilterInterruptEventSource.h b/i386/include/IOKit/IOFilterInterruptEventSource.h new file mode 100644 index 0000000..de05c90 --- /dev/null +++ b/i386/include/IOKit/IOFilterInterruptEventSource.h @@ -0,0 +1,156 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* +Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + +HISTORY + 1999-4-15 Godfrey van der Linden(gvdl) + Created. +*/ +#ifndef _IOKIT_IOFILTERINTERRUPTEVENTSOURCE_H +#define _IOKIT_IOFILTERINTERRUPTEVENTSOURCE_H + +#include + +class IOService; + +/*! @class IOFilterInterruptEventSource : public IOInterruptEventSource + @abstract Filtering varient of the $link IOInterruptEventSource. + @discussion An interrupt event source that calls the client to determine if a interrupt event needs to be scheduled on the work loop. A filter interrupt event source call's the client in the primary interrupt context, the client can then interrogate its hardware and determine if the interrupt needs to be processed yet. +

+ As the routine is called in the primary interrupt context great care must be taken in the writing of this routine. In general none of the generic IOKit environment is safe to call in this context. We intend this routine to be used by hardware that can interrogate its registers without destroying state. Primarily this variant of event sources will be used by drivers that share interrupts. The filter routine will determine if the interrupt is a real interrupt or a ghost and thus optimise the work thread context switch away. +

+If you are implementing 'SoftDMA' (or pseudo-DMA), you may not want the I/O Kit to automatically start your interrupt handler routine on your work loop when your filter routine returns true. In this case, you may choose to have your filter routine schedule the work on the work loop itself and then return false. If you do this, the interrupt will not be disabled in hardware and you could receive additional primary interrupts before your work loop–level service routine completes. Because this scheme has implications for synchronization between your filter routine and your interrupt service routine, you should avoid doing this unless your driver requires SoftDMA. +

+CAUTION: Called in primary interrupt context, if you need to disable interrupt to guard you registers against an unexpected call then it is better to use a straight IOInterruptEventSource and its secondary interrupt delivery mechanism. +*/ +class IOFilterInterruptEventSource : public IOInterruptEventSource +{ + OSDeclareDefaultStructors(IOFilterInterruptEventSource) + +public: +/*! + @typedef Filter + @discussion C Function pointer to a routine to call when an interrupt occurs. + @param owner Pointer to the owning/client instance. + @param sender Where is the interrupt comming from. + @result false if this interrupt can be ignored. */ + typedef bool (*Filter)(OSObject *, IOFilterInterruptEventSource *); + +/*! @defined IOFilterInterruptAction + @discussion Backward compatibilty define for the old non-class scoped type definition. See $link IOFilterInterruptSource::Filter */ +#define IOFilterInterruptAction IOFilterInterruptEventSource::Filter + +private: + // Hide the superclass initializers + virtual bool init(OSObject *inOwner, + IOInterruptEventSource::Action inAction = 0, + IOService *inProvider = 0, + int inIntIndex = 0); + + static IOInterruptEventSource * + interruptEventSource(OSObject *inOwner, + IOInterruptEventSource::Action inAction = 0, + IOService *inProvider = 0, + int inIntIndex = 0); + +protected: +/*! @var filterAction Filter callout */ + Filter filterAction; + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + +public: +/*! @function filterInterruptEventSource + @abstract Factor method to create and initialise an IOFilterInterruptEventSource. See $link init. + @param owner Owner/client of this event source. + @param action 'C' Function to call when something happens. + @param filter 'C' Function to call when interrupt occurs. + @param provider Service that provides interrupts. + @param intIndex Defaults to 0. + @result a new event source if succesful, 0 otherwise. */ + static IOFilterInterruptEventSource * + filterInterruptEventSource(OSObject *owner, + IOInterruptEventSource::Action action, + Filter filter, + IOService *provider, + int intIndex = 0); + +/*! @function init + @abstract Primary initialiser for the IOFilterInterruptEventSource class. + @param owner Owner/client of this event source. + @param action 'C' Function to call when something happens. + @param filter 'C' Function to call in primary interrupt context. + @param provider Service that provides interrupts. + @param intIndex Interrupt source within provider. Defaults to 0. + @result true if the inherited classes and this instance initialise +successfully. */ + virtual bool init(OSObject *owner, + IOInterruptEventSource::Action action, + Filter filter, + IOService *provider, + int intIndex = 0); + + +/*! @function signalInterrupt + @abstract Cause the work loop to schedule the action. + @discussion Cause the work loop to schedule the interrupt action even if the filter routine returns 'false'. Note well the interrupting condition MUST be cleared from the hardware otherwise an infinite process interrupt loop will occur. Use this function when SoftDMA is desired. See $link IOFilterInterruptSource::Filter */ + virtual void signalInterrupt(); + +/*! @function getFilterAction + @abstract Get'ter for filterAction variable. + @result value of filterAction. */ + virtual Filter getFilterAction() const; + +/*! @function normalInterruptOccurred + @abstract Override $link IOInterruptEventSource::normalInterruptOccured to make a filter callout. */ + virtual void normalInterruptOccurred(void *self, IOService *prov, int ind); + +/*! @function disableInterruptOccurred + @abstract Override $link IOInterruptEventSource::disableInterruptOccurred to make a filter callout. */ + virtual void disableInterruptOccurred(void *self, IOService *prov, int ind); + +private: + OSMetaClassDeclareReservedUnused(IOFilterInterruptEventSource, 0); + OSMetaClassDeclareReservedUnused(IOFilterInterruptEventSource, 1); + OSMetaClassDeclareReservedUnused(IOFilterInterruptEventSource, 2); + OSMetaClassDeclareReservedUnused(IOFilterInterruptEventSource, 3); + OSMetaClassDeclareReservedUnused(IOFilterInterruptEventSource, 4); + OSMetaClassDeclareReservedUnused(IOFilterInterruptEventSource, 5); + OSMetaClassDeclareReservedUnused(IOFilterInterruptEventSource, 6); + OSMetaClassDeclareReservedUnused(IOFilterInterruptEventSource, 7); +}; + +#endif /* !_IOKIT_IOFILTERINTERRUPTEVENTSOURCE_H */ diff --git a/i386/include/IOKit/IOInterleavedMemoryDescriptor.h b/i386/include/IOKit/IOInterleavedMemoryDescriptor.h new file mode 100644 index 0000000..e5c2a94 --- /dev/null +++ b/i386/include/IOKit/IOInterleavedMemoryDescriptor.h @@ -0,0 +1,122 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOINTERLEAVEDMEMORYDESCRIPTOR_H +#define _IOINTERLEAVEDMEMORYDESCRIPTOR_H + +#include + +/*! @class IOInterleavedMemoryDescriptor : public IOMemoryDescriptor + @abstract The IOInterleavedMemoryDescriptor object describes a memory area made up of portions of several other IOMemoryDescriptors. + @discussion The IOInterleavedMemoryDescriptor object represents interleaved ranges of memory, specified as an ordered list of portions of individual IOMemoryDescriptors. The portions are chained end-to-end to make up a single contiguous buffer. */ + +class IOInterleavedMemoryDescriptor : public IOMemoryDescriptor +{ + OSDeclareDefaultStructors(IOInterleavedMemoryDescriptor); + +protected: + + IOByteCount _descriptorCapacity; + UInt32 _descriptorCount; + IOMemoryDescriptor ** _descriptors; + IOByteCount * _descriptorOffsets; + IOByteCount * _descriptorLengths; + bool _descriptorPrepared; + + virtual void free(); + +public: + +/*! @function withCapacity + @abstract Create an IOInterleavedMemoryDescriptor to describe a memory area made up of several other IOMemoryDescriptors. + @discussion This method creates and initializes an IOInterleavedMemoryDescriptor for memory consisting of portions of a number of other IOMemoryDescriptors, chained end-to-end (in the order they appear in the array) to represent a single contiguous memory buffer. + @param capacity The maximum number of IOMemoryDescriptors that may be subsequently added to this IOInterleavedMemoryDescriptor. + @param direction An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. + @result The created IOInterleavedMemoryDescriptor on success, to be released by the caller, or zero on failure. */ + + static IOInterleavedMemoryDescriptor * withCapacity( IOByteCount capacity, + IODirection direction); + +/*! @function initWithCapacity + @abstract Initialize an IOInterleavedMemoryDescriptor to describe a memory area made up of several other IOMemoryDescriptors. + @discussion This method initializes an IOInterleavedMemoryDescriptor for memory consisting of portions of a number of other IOMemoryDescriptors, chained end-to-end (in the order they appear in the array) to represent a single contiguous memory buffer. + @param capacity The maximum number of IOMemoryDescriptors that may be subsequently added to this IOInterleavedMemoryDescriptor. + @param direction An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. + @result The created IOInterleavedMemoryDescriptor on success, to be released by the caller, or zero on failure. */ + + virtual bool initWithCapacity( IOByteCount capacity, + IODirection direction ); + +/*! @function clearMemoryDescriptors + @abstract Clear all of the IOMemoryDescriptors currently contained in and reset the IOInterleavedMemoryDescriptor. + @discussion Clears each IOMemoryDescriptor by completing (if needed) and releasing. The IOInterleavedMemoryDescriptor is then reset and may accept new descriptors up to the capacity specified when it was created. + @param direction An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. */ + + virtual void clearMemoryDescriptors( IODirection direction = kIODirectionNone ); + +/*! @function setMemoryDescriptor + @abstract Add a portion of an IOMemoryDescriptor to the IOInterleavedMemoryDescriptor. + @discussion This method adds the portion of an IOMemoryDescriptor described by the offset and length parameters to the end of the IOInterleavedMemoryDescriptor. A single IOMemoryDescriptor may be added as many times as there is room for it. The offset and length must describe a portion entirely within the IOMemoryDescriptor. + @param descriptor An IOMemoryDescriptor to be added to the IOInterleavedMemoryDescriptor. Its direction must be compatible with that of the IOInterleavedMemoryDescriptor. + @param offset The offset into the IOMemoryDescriptor of the portion that will be added to the virtualized buffer. + @param length The length of the portion of the IOMemoryDescriptor to be added to the virtualized buffer. + @result Returns true the portion was successfully added. */ + + virtual bool setMemoryDescriptor( IOMemoryDescriptor * descriptor, + IOByteCount offset, + IOByteCount length ); + +/*! @function getPhysicalSegment + @abstract Break a memory descriptor into its physically contiguous segments. + @discussion This method returns the physical address of the byte at the given offset into the memory, and optionally the length of the physically contiguous segment from that offset. + @param offset A byte offset into the memory whose physical address to return. + @param length If non-zero, getPhysicalSegment will store here the length of the physically contiguous segement at the given offset. + @result A physical address, or zero if the offset is beyond the length of the memory. */ + + virtual addr64_t getPhysicalSegment( IOByteCount offset, + IOByteCount * length, + IOOptionBits options = 0 ); + +/*! @function prepare + @abstract Prepare the memory for an I/O transfer. + @discussion This involves paging in the memory, if necessary, and wiring it down for the duration of the transfer. The complete() method completes the processing of the memory after the I/O transfer finishes. This method need not called for non-pageable memory. + @param forDirection The direction of the I/O to be performed, or kIODirectionNone for the direction specified by the memory descriptor. + @result An IOReturn code. */ + + virtual IOReturn prepare(IODirection forDirection = kIODirectionNone); + +/*! @function complete + @abstract Complete processing of the memory after an I/O transfer finishes. + @discussion This method should not be called unless a prepare was previously issued; the prepare() and complete() must occur in pairs, before and after an I/O transfer involving pageable memory. + @param forDirection The direction of the I/O just completed, or kIODirectionNone for the direction specified by the memory descriptor. + @result An IOReturn code. */ + + virtual IOReturn complete(IODirection forDirection = kIODirectionNone); +}; + +#endif /* !_IOINTERLEAVEDMEMORYDESCRIPTOR_H */ diff --git a/i386/include/IOKit/IOInterruptController.h b/i386/include/IOKit/IOInterruptController.h new file mode 100644 index 0000000..71f55e5 --- /dev/null +++ b/i386/include/IOKit/IOInterruptController.h @@ -0,0 +1,155 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * DRI: Josh de Cesare + * + */ + + +#ifndef _IOKIT_IOINTERRUPTCONTROLLER_H +#define _IOKIT_IOINTERRUPTCONTROLLER_H + +#include +#include +#include + + +class IOSharedInterruptController; + +struct IOInterruptVector { + volatile char interruptActive; + volatile char interruptDisabledSoft; + volatile char interruptDisabledHard; + volatile char interruptRegistered; + IOLock * interruptLock; + IOService * nub; + int source; + void * target; + IOInterruptHandler handler; + void * refCon; + IOSharedInterruptController *sharedController; +}; + +typedef struct IOInterruptVector IOInterruptVector; + +#if __LP64__ +typedef int32_t IOInterruptVectorNumber; +#else +typedef long IOInterruptVectorNumber; +#endif + +class IOInterruptController : public IOService +{ + OSDeclareAbstractStructors(IOInterruptController); + +protected: + IOInterruptVector *vectors; + IOSimpleLock *controllerLock; + + struct ExpansionData { }; + ExpansionData *reserved; + +public: + virtual IOReturn registerInterrupt(IOService *nub, int source, + void *target, + IOInterruptHandler handler, + void *refCon); + virtual IOReturn unregisterInterrupt(IOService *nub, int source); + + virtual IOReturn getInterruptType(IOService *nub, int source, + int *interruptType); + + virtual IOReturn enableInterrupt(IOService *nub, int source); + virtual IOReturn disableInterrupt(IOService *nub, int source); + virtual IOReturn causeInterrupt(IOService *nub, int source); + + virtual IOInterruptAction getInterruptHandlerAddress(void); + virtual IOReturn handleInterrupt(void *refCon, IOService *nub, + int source); + + // Methods to be overridden for simplifed interrupt controller subclasses. + + virtual bool vectorCanBeShared(IOInterruptVectorNumber vectorNumber, IOInterruptVector *vector); + virtual void initVector(IOInterruptVectorNumber vectorNumber, IOInterruptVector *vector); + virtual int getVectorType(IOInterruptVectorNumber vectorNumber, IOInterruptVector *vector); + virtual void disableVectorHard(IOInterruptVectorNumber vectorNumber, IOInterruptVector *vector); + virtual void enableVector(IOInterruptVectorNumber vectorNumber, IOInterruptVector *vector); + virtual void causeVector(IOInterruptVectorNumber vectorNumber, IOInterruptVector *vector); + + OSMetaClassDeclareReservedUnused(IOInterruptController, 0); + OSMetaClassDeclareReservedUnused(IOInterruptController, 1); + OSMetaClassDeclareReservedUnused(IOInterruptController, 2); + OSMetaClassDeclareReservedUnused(IOInterruptController, 3); + OSMetaClassDeclareReservedUnused(IOInterruptController, 4); + OSMetaClassDeclareReservedUnused(IOInterruptController, 5); +}; + + +class IOSharedInterruptController : public IOInterruptController +{ + OSDeclareDefaultStructors(IOSharedInterruptController); + +private: + IOService *provider; + int numVectors; + int vectorsRegistered; + int vectorsEnabled; + volatile int controllerDisabled; + bool sourceIsLevel; + + struct ExpansionData { }; + ExpansionData *reserved; + +public: + virtual IOReturn initInterruptController(IOInterruptController *parentController, OSData *parentSource); + + virtual IOReturn registerInterrupt(IOService *nub, int source, + void *target, + IOInterruptHandler handler, + void *refCon); + virtual IOReturn unregisterInterrupt(IOService *nub, int source); + + virtual IOReturn getInterruptType(IOService *nub, int source, + int *interruptType); + + virtual IOReturn enableInterrupt(IOService *nub, int source); + virtual IOReturn disableInterrupt(IOService *nub, int source); + + virtual IOInterruptAction getInterruptHandlerAddress(void); + virtual IOReturn handleInterrupt(void *refCon, IOService *nub, int source); + + OSMetaClassDeclareReservedUnused(IOSharedInterruptController, 0); + OSMetaClassDeclareReservedUnused(IOSharedInterruptController, 1); + OSMetaClassDeclareReservedUnused(IOSharedInterruptController, 2); + OSMetaClassDeclareReservedUnused(IOSharedInterruptController, 3); +}; + + +#endif /* ! _IOKIT_IOINTERRUPTCONTROLLER_H */ diff --git a/i386/include/IOKit/IOInterruptEventSource.h b/i386/include/IOKit/IOInterruptEventSource.h new file mode 100644 index 0000000..0be7caf --- /dev/null +++ b/i386/include/IOKit/IOInterruptEventSource.h @@ -0,0 +1,200 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* +Copyright (c) 1998 Apple Computer, Inc. All rights reserved. + +HISTORY + 1998-7-13 Godfrey van der Linden(gvdl) + Created. + 1998-10-30 Godfrey van der Linden(gvdl) + Converted to C++ +*/ + +#ifndef _IOKIT_IOINTERRUPTEVENTSOURCE_H +#define _IOKIT_IOINTERRUPTEVENTSOURCE_H + +#include + +class IOService; + +/*! @class IOInterruptEventSource : public IOEventSource + @abstract Event source for interrupt delivery to work-loop based drivers. + @discussion The IOInterruptEventSource is a generic object that delivers calls interrupt routines in it's client in a guaranteed single-threaded manner. IOInterruptEventSource is part of the IOKit $link IOWorkLoop infrastructure where the semantic that one and only one action method is executing within a work-loops event chain. +

+When the action method is called in the client member function will receive 2 arguments, (IOEventSource *) sender and (int) count, See $link IOInterruptEventSource::Action. Where sender will be reference to the interrupt that occurred and the count will be computed by the difference between the $link producerCount and $link consumerCount. This number may not be reliable as no attempt is made to adjust for around the world type problems but is provided for general information and statistic gathering. +

+In general a client will use the factory member function to create and initialise the event source and then add it to their work-loop. It is the work loop's responsiblity to maintain the new event source in it's event chain. See $link IOWorkLoop. +

+An interrupt event source attaches itself to the given provider's interrupt source at initialisation time. At this time it determines if it is connected to a level or edge triggered interrupt. If the interrupt is an level triggered interrupt the event source automatically disables the interrupt source at primary interrupt time and after it call's the client it automatically reenables the interrupt. This action is fairly expensive but it is 100% safe and defaults sensibly so that the driver writer does not have to implement type dependant interrupt routines. So to repeat, the driver writer does not have to be concerned by the actual underlying interrupt mechanism as the event source hides the complexity. +

+Saying this if the hardware is a multi-device card, for instance a 4 port NIC, where all of the devices are sharing one level triggered interrupt AND it is possible to determine each port's interrupt state non-destructively then the $link IOFilterInterruptEventSource would be a better choice. +

+Warning: All IOInterruptEventSources are created in the disabled state. If you want to actually schedule interrupt delivery do not forget to enable the source. +*/ +class IOInterruptEventSource : public IOEventSource +{ + OSDeclareDefaultStructors(IOInterruptEventSource) + +public: +/*! @typedef Action + @discussion 'C' pointer prototype of functions that are called in a single threaded context when an interrupt occurs. + @param owner Pointer to client instance. + @param sender Pointer to generation interrupt event source. + @param count Number of interrupts seen before delivery. */ + typedef void (*Action)(OSObject *, IOInterruptEventSource *, int count); + +/*! @defined IOInterruptEventAction + @discussion Backward compatibilty define for the old non-class scoped type definition. See $link IOInterruptEventSource::Action */ +#define IOInterruptEventAction IOInterruptEventSource::Action + +protected: +/*! @var provider IOService that provides interrupts for delivery. */ + IOService *provider; + +/*! @var intIndex */ + int intIndex; + +/*! @var producerCount + Current count of produced interrupts that have been received. */ + volatile unsigned int producerCount; + +/*! @var consumerCount + Current count of produced interrupts that the owner has been informed of. */ + unsigned int consumerCount; + +/*! @var autoDisable Do we need to automatically disable the interrupt source when we take an interrupt, i.e. we are level triggered. */ + bool autoDisable; + +/*! @var explicitDisable Has the user expicitly disabled this event source, if so then do not overide their request when returning from the callout */ + bool explicitDisable; + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + +/*! @function free + @abstract Sub-class implementation of free method, disconnects from the interrupt source. */ + virtual void free(); + +/*! @function checkForWork + @abstract Pure Virtual member function used by IOWorkLoop for issueing a client calls. + @discussion This function called when the work-loop is ready to check for any work to do and then to call out the owner/action. + @result Return true if this function needs to be called again before all its outstanding events have been processed. */ + virtual bool checkForWork(); + +public: + +/*! @function interruptEventSource + @abstract Factory function for IOInterruptEventSources creation and initialisation. + @param owner Owning client of the new event source. + @param action 'C' Function to call when something happens. + @param provider IOService that represents the interrupt source. Defaults to 0. When no provider is defined the event source assumes that the client will in some manner call the interruptOccured method explicitly. This will start the ball rolling for safe delivery of asynchronous event's into the driver. + @param intIndex The index of the interrupt within the provider's interrupt sources. Defaults to 0, i.e. the first interrupt in the provider. + @result A new interrupt event source if successfully created and initialised, 0 otherwise. */ + static IOInterruptEventSource * + interruptEventSource(OSObject *owner, + Action action, + IOService *provider = 0, + int intIndex = 0); + +/*! @function init + @abstract Primary initialiser for the IOInterruptEventSource class. + @param owner Owning client of the new event source. + @param action 'C' Function to call when something happens. + @param provider IOService that represents the interrupt source. Defaults to 0. When no provider is defined the event source assumes that the client will in some manner call the interruptOccured method explicitly. This will start the ball rolling for safe delivery of asynchronous event's into the driver. + @param intIndex The index of the interrupt within the provider's interrupt sources. Defaults to 0, i.e. the first interrupt in the provider. + @result true if the inherited classes and this instance initialise +successfully. */ + virtual bool init(OSObject *owner, + Action action, + IOService *provider = 0, + int intIndex = 0); + +/*! @function enable + @abstract Enable event source. + @discussion A subclass implementation is expected to respect the enabled +state when checkForWork is called. Calling this function will cause the +work-loop to be signalled so that a checkForWork is performed. */ + virtual void enable(); + +/*! @function disable + @abstract Disable event source. + @discussion A subclass implementation is expected to respect the enabled +state when checkForWork is called. */ + virtual void disable(); + +/*! @function getProvider + @abstract Get'ter for $link provider variable. + @result value of provider. */ + virtual const IOService *getProvider() const; + +/*! @function getIntIndex + @abstract Get'ter for $link intIndex interrupt index variable. + @result value of intIndex. */ + virtual int getIntIndex() const; + +/*! @function getAutoDisable + @abstract Get'ter for $link autoDisable variable. + @result value of autoDisable. */ + virtual bool getAutoDisable() const; + +/*! @function interruptOccurred + @abstract Functions that get called by the interrupt controller. See $link IOService::registerInterrupt + @param nub Where did the interrupt originate from + @param ind What is this interrupts index within 'nub'. */ + virtual void interruptOccurred(void *, IOService *nub, int ind); + +/*! @function normalInterruptOccurred + @abstract Functions that get called by the interrupt controller.See $link IOService::registerInterrupt + @param nub Where did the interrupt originate from + @param ind What is this interrupts index within 'nub'. */ + virtual void normalInterruptOccurred(void *, IOService *nub, int ind); + +/*! @function disableInterruptOccurred + @abstract Functions that get called by the interrupt controller.See $link IOService::registerInterrupt + @param nub Where did the interrupt originate from + @param ind What is this interrupts index within 'nub'. */ + virtual void disableInterruptOccurred(void *, IOService *nub, int ind); + +private: + OSMetaClassDeclareReservedUnused(IOInterruptEventSource, 0); + OSMetaClassDeclareReservedUnused(IOInterruptEventSource, 1); + OSMetaClassDeclareReservedUnused(IOInterruptEventSource, 2); + OSMetaClassDeclareReservedUnused(IOInterruptEventSource, 3); + OSMetaClassDeclareReservedUnused(IOInterruptEventSource, 4); + OSMetaClassDeclareReservedUnused(IOInterruptEventSource, 5); + OSMetaClassDeclareReservedUnused(IOInterruptEventSource, 6); + OSMetaClassDeclareReservedUnused(IOInterruptEventSource, 7); +}; + +#endif /* !_IOKIT_IOINTERRUPTEVENTSOURCE_H */ diff --git a/i386/include/IOKit/IOInterrupts.h b/i386/include/IOKit/IOInterrupts.h new file mode 100644 index 0000000..fa8aa7b --- /dev/null +++ b/i386/include/IOKit/IOInterrupts.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * DRI: Josh de Cesare + * + */ + + +#ifndef _IOKIT_IOINTERRUPTS_H +#define _IOKIT_IOINTERRUPTS_H + +#define kIOInterruptTypeEdge (0) +#define kIOInterruptTypeLevel (1) + +#ifdef __cplusplus + +class OSData; +class IOInterruptController; + +struct IOInterruptSource { + IOInterruptController *interruptController; + OSData *vectorData; +}; +typedef struct IOInterruptSource IOInterruptSource; + +#endif /* __cplusplus */ + +typedef void (*IOInterruptHandler)(void *target, void *refCon, + void *nub, int source); + +#endif /* ! _IOKIT_IOINTERRUPTS_H */ diff --git a/i386/include/IOKit/IOKitDebug.h b/i386/include/IOKit/IOKitDebug.h new file mode 100644 index 0000000..499faa3 --- /dev/null +++ b/i386/include/IOKit/IOKitDebug.h @@ -0,0 +1,111 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_IOKITDEBUG_H +#define _IOKIT_IOKITDEBUG_H + +#include + + +#ifdef __cplusplus + +#include +#include +#include + +class IOKitDiagnostics : public OSObject +{ + OSDeclareDefaultStructors(IOKitDiagnostics) + +public: + static OSObject * diagnostics( void ); + virtual bool serialize(OSSerialize *s) const; +private: + static void updateOffset( OSDictionary * dict, + UInt32 value, const char * name ); +}; + +#endif /* __cplusplus */ + +enum { + // loggage + kIOLogAttach = 0x00000001ULL, + kIOLogProbe = 0x00000002ULL, + kIOLogStart = 0x00000004ULL, + kIOLogRegister = 0x00000008ULL, + kIOLogMatch = 0x00000010ULL, + kIOLogConfig = 0x00000020ULL, + kIOLogYield = 0x00000040ULL, + kIOLogPower = 0x00000080ULL, + kIOLogMapping = 0x00000100ULL, + kIOLogCatalogue = 0x00000200ULL, + kIOLogTracePower = 0x00000400ULL, + kIOLogDebugPower = 0x00000800ULL, + kIOLogServiceTree = 0x00001000ULL, + kIOLogDTree = 0x00002000ULL, + kIOLogMemory = 0x00004000ULL, + kIOLogKextMemory = 0x00008000ULL, + kOSLogRegistryMods = 0x00010000ULL, // Log attempts to modify registry collections + kIOLogPMRootDomain = 0x00020000ULL, + kOSRegistryModsMode = 0x00040000ULL, // Change default registry modification handling - panic vs. log + kIOTraceIOService = 0x00080000ULL, + kIOLogHibernate = 0x00100000ULL, + + // debug aids - change behaviour + kIONoFreeObjects = 0x00100000ULL, + kIOLogSynchronous = 0x00200000ULL, // IOLog completes synchronously + kOSTraceObjectAlloc = 0x00400000ULL, + + _kIODebugTopFlag = 0x8000000000000000ULL // force enum to be 64 bits +}; + +extern SInt64 gIOKitDebug; + +#ifdef __cplusplus +extern "C" { +#endif + +struct IORegistryPlane; +extern void IOPrintPlane( const struct IORegistryPlane * plane ); +#ifndef _OSCPPDEBUG_H +extern void OSPrintMemory( void ); +#endif +#define IOPrintMemory OSPrintMemory + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* ! _IOKIT_IOKITDEBUG_H */ diff --git a/i386/include/IOKit/IOKitKeys.h b/i386/include/IOKit/IOKitKeys.h new file mode 100644 index 0000000..62395d5 --- /dev/null +++ b/i386/include/IOKit/IOKitKeys.h @@ -0,0 +1,164 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * Common symbol definitions for IOKit. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_IOKITKEYS_H +#define _IOKIT_IOKITKEYS_H + +// properties found in the registry root +#define kIOKitBuildVersionKey "IOKitBuildVersion" +#define kIOKitDiagnosticsKey "IOKitDiagnostics" + // a dictionary keyed by plane name +#define kIORegistryPlanesKey "IORegistryPlanes" +#define kIOCatalogueKey "IOCatalogue" + +// registry plane names +#define kIOServicePlane "IOService" +#define kIOPowerPlane "IOPower" +#define kIODeviceTreePlane "IODeviceTree" +#define kIOAudioPlane "IOAudio" +#define kIOFireWirePlane "IOFireWire" +#define kIOUSBPlane "IOUSB" + +// registry ID number +#define kIORegistryEntryIDKey "IORegistryEntryID" + +// IOService class name +#define kIOServiceClass "IOService" + +// IOResources class name +#define kIOResourcesClass "IOResources" + +// IOService driver probing property names +#define kIOClassKey "IOClass" +#define kIOProbeScoreKey "IOProbeScore" +#define kIOKitDebugKey "IOKitDebug" + +// IOService matching property names +#define kIOProviderClassKey "IOProviderClass" +#define kIONameMatchKey "IONameMatch" +#define kIOPropertyMatchKey "IOPropertyMatch" +#define kIOPathMatchKey "IOPathMatch" +#define kIOLocationMatchKey "IOLocationMatch" +#define kIOParentMatchKey "IOParentMatch" +#define kIOResourceMatchKey "IOResourceMatch" +#define kIOMatchedServiceCountKey "IOMatchedServiceCountMatch" + +#define kIONameMatchedKey "IONameMatched" + +#define kIOMatchCategoryKey "IOMatchCategory" +#define kIODefaultMatchCategoryKey "IODefaultMatchCategory" + +// IOService default user client class, for loadable user clients +#define kIOUserClientClassKey "IOUserClientClass" + +// key to find IOMappers +#define kIOMapperIDKey "IOMapperID" + +#define kIOUserClientCrossEndianKey "IOUserClientCrossEndian" +#define kIOUserClientCrossEndianCompatibleKey "IOUserClientCrossEndianCompatible" +#define kIOUserClientSharedInstanceKey "IOUserClientSharedInstance" +// diagnostic string describing the creating task +#define kIOUserClientCreatorKey "IOUserClientCreator" + +// IOService notification types +#define kIOPublishNotification "IOServicePublish" +#define kIOFirstPublishNotification "IOServiceFirstPublish" +#define kIOMatchedNotification "IOServiceMatched" +#define kIOFirstMatchNotification "IOServiceFirstMatch" +#define kIOTerminatedNotification "IOServiceTerminate" + +// IOService interest notification types +#define kIOGeneralInterest "IOGeneralInterest" +#define kIOBusyInterest "IOBusyInterest" +#define kIOAppPowerStateInterest "IOAppPowerStateInterest" +#define kIOPriorityPowerStateInterest "IOPriorityPowerStateInterest" + +#define kIOPlatformDeviceMessageKey "IOPlatformDeviceMessage" + +// IOService interest notification types +#define kIOCFPlugInTypesKey "IOCFPlugInTypes" + +// properties found in services that implement command pooling +#define kIOCommandPoolSizeKey "IOCommandPoolSize" // (OSNumber) + +// properties found in services that have transfer constraints +#define kIOMaximumBlockCountReadKey "IOMaximumBlockCountRead" // (OSNumber) +#define kIOMaximumBlockCountWriteKey "IOMaximumBlockCountWrite" // (OSNumber) +#define kIOMaximumByteCountReadKey "IOMaximumByteCountRead" // (OSNumber) +#define kIOMaximumByteCountWriteKey "IOMaximumByteCountWrite" // (OSNumber) +#define kIOMaximumSegmentCountReadKey "IOMaximumSegmentCountRead" // (OSNumber) +#define kIOMaximumSegmentCountWriteKey "IOMaximumSegmentCountWrite" // (OSNumber) +#define kIOMaximumSegmentByteCountReadKey "IOMaximumSegmentByteCountRead" // (OSNumber) +#define kIOMaximumSegmentByteCountWriteKey "IOMaximumSegmentByteCountWrite" // (OSNumber) +#define kIOMinimumSegmentAlignmentByteCountKey "IOMinimumSegmentAlignmentByteCount" // (OSNumber) +#define kIOMaximumSegmentAddressableBitCountKey "IOMaximumSegmentAddressableBitCount" // (OSNumber) + +// properties found in services that wish to describe an icon +// +// IOIcon = +// { +// CFBundleIdentifier = "com.example.driver.example"; +// IOBundleResourceFile = "example.icns"; +// }; +// +// where IOBundleResourceFile is the filename of the resource + +#define kIOIconKey "IOIcon" // (OSDictionary) +#define kIOBundleResourceFileKey "IOBundleResourceFile" // (OSString) + +#define kIOBusBadgeKey "IOBusBadge" // (OSDictionary) +#define kIODeviceIconKey "IODeviceIcon" // (OSDictionary) + +// property of root that describes the machine's serial number as a string +#define kIOPlatformSerialNumberKey "IOPlatformSerialNumber" // (OSString) + +// property of root that describes the machine's UUID as a string +#define kIOPlatformUUIDKey "IOPlatformUUID" // (OSString) + +// IODTNVRAM property keys +#define kIONVRAMDeletePropertyKey "IONVRAM-DELETE-PROPERTY" +#define kIODTNVRAMPanicInfoKey "aapl,panic-info" + +// keys for complex boot information +#define kIOBootDeviceKey "IOBootDevice" // dict | array of dicts +#define kIOBootDevicePathKey "IOBootDevicePath" // arch-neutral OSString +#define kIOBootDeviceSizeKey "IOBootDeviceSize" // OSNumber of bytes + +// keys for OS Version information +#define kOSBuildVersionKey "OS Build Version" + +#endif /* ! _IOKIT_IOKITKEYS_H */ diff --git a/i386/include/IOKit/IOKitServer.h b/i386/include/IOKit/IOKitServer.h new file mode 100644 index 0000000..a68c992 --- /dev/null +++ b/i386/include/IOKit/IOKitServer.h @@ -0,0 +1,123 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + +/* + * Internal definitions used between the iokit user library and + * server routines. + */ + +#ifndef _IOKIT_IOKITSERVER_H +#define _IOKIT_IOKITSERVER_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif +#include +#ifdef __cplusplus +} +#endif + +// IOMakeMatching +/*! + @enum IOMakeMatching + @constant kIOServiceMatching + @constant kIOBSDNameMatching + @constant kIOOFPathMatching +*/ +enum { + kIOServiceMatching = 100, + kIOBSDNameMatching = 101, + kIOOFPathMatching = 102 +}; + +// IOCatalogueSendData +/*! + @enum IOCatalogueSendData user-client flags. + @constant kIOCatalogAddDrivers Signals a call to the addDrivers function in IOCatalogue. + @constant kIOCatalogAddDriversNoMatch Signals a call to the addDrivers function in IOCatalogue but does not start a matching thread. + @constant kIOCatalogRemoveDrivers Signals a call to the removeDrivers function in IOCatalogue. + @constant kIOCatalogRemoveDriversNoMatch Signals a call to the removedrivers function in IOCatalogue but does not start a matching thread. + @constant kIOCatalogStartMatching Signals the IOCatalogue to start an IOService matching thread. +*/ +enum { + kIOCatalogAddDrivers = 1, + kIOCatalogAddDriversNoMatch, + kIOCatalogRemoveDrivers, + kIOCatalogRemoveDriversNoMatch, + kIOCatalogStartMatching, + kIOCatalogRemoveKernelLinker, + kIOCatalogKextdActive, + kIOCatalogKextdFinishedLaunching +}; + +// IOCatalogueGetData +/*! + @enum IOCatalogueGetData user-client flags + @constant kIOCatalogGetContents Returns a snapshot of the database to the caller. +*/ +enum { + kIOCatalogGetContents = 1, + kIOCatalogGetModuleDemandList = 2, + kIOCatalogGetCacheMissList = 3, + kIOCatalogGetROMMkextList = 4 +}; + +// IOCatalogueReset +/*! + @enum IOCatalogueReset user-client flag + @constant kIOCatalogResetDefault Removes all entries from IOCatalogue except those used for booting the system. +*/ +enum { + kIOCatalogResetDefault = 1 +}; + +// IOCatalogueTerminate +/*! + @enum IOCatalogueTerminate user-client flags. + @constant kIOCatalogModuleUnload Terminates all services which depend on a particular module and unloads the module. + @constant kIOCatalogModuleTerminate Terminates all services which depend on a particular module but does not unload the module. + @constant kIOCatalogServiceTerminate Terminates a particular service by name. +*/ +enum { + kIOCatalogModuleUnload = 1, + kIOCatalogModuleTerminate, + kIOCatalogServiceTerminate +}; + +#endif /* ! _IOKIT_IOKITSERVER_H */ + diff --git a/i386/include/IOKit/IOLib.h b/i386/include/IOKit/IOLib.h new file mode 100644 index 0000000..1eb5562 --- /dev/null +++ b/i386/include/IOKit/IOLib.h @@ -0,0 +1,83 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + +#ifndef __IOKIT_IOLIB_H +#define __IOKIT_IOLIB_H + + +#include +#include + +#include + +#include + +#include +#include +#include + +#include + +__BEGIN_DECLS + +#include +#include + +/* + * min/max macros. + */ + +#define min(a,b) ((a) < (b) ? (a) : (b)) +#define max(a,b) ((a) > (b) ? (a) : (b)) + +/* + * These are opaque to the user. + */ +typedef thread_t IOThread; +typedef void (*IOThreadFunc)(void *argument); + + +/* + * IORound and IOTrunc convenience functions, in the spirit + * of vm's round_page() and trunc_page(). + */ +#define IORound(value,multiple) \ + ((((value) + (multiple) - 1) / (multiple)) * (multiple)) + +#define IOTrunc(value,multiple) \ + (((value) / (multiple)) * (multiple)); + +__END_DECLS + +#endif /* !__IOKIT_IOLIB_H */ diff --git a/i386/include/IOKit/IOLocks.h b/i386/include/IOKit/IOLocks.h new file mode 100644 index 0000000..81701a0 --- /dev/null +++ b/i386/include/IOKit/IOLocks.h @@ -0,0 +1,409 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * + */ + +#ifndef __IOKIT_IOLOCKS_H +#define __IOKIT_IOLOCKS_H + + +#include + +#include + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +/*! @var IOLockGroup + Global lock group used by all IOKit locks. To simplify kext debugging and lock-heat analysis, consider using lck_* locks with a per-driver lock group, as defined in kern/locks.h. +*/ +extern lck_grp_t *IOLockGroup; + + +/* + * Mutex lock operations + */ + +#ifdef IOLOCKS_INLINE +typedef lck_mtx_t IOLock; +#else +typedef struct _IOLock IOLock; +#endif /* IOLOCKS_INLINE */ + + +/*! @function IOLockAlloc + @abstract Allocates and initializes a mutex. + @discussion Allocates a mutex in general purpose memory, and initializes it. Mutexes are general purpose blocking mutual exclusion locks, supplied by libkern/locks.h. This function may block and so should not be called from interrupt level or while a spin lock is held. IOLocks use the global IOKit lock group, IOLockGroup. To simplify kext debugging and lock-heat analysis, consider using lck_* locks with a per-driver lock group, as defined in kern/locks.h. + @result Pointer to the allocated lock, or zero on failure. */ + +IOLock * IOLockAlloc( void ); + +/*! @function IOLockFree + @abstract Frees a mutex. + @discussion Frees a lock allocated with IOLockAlloc. Any blocked waiters will not be woken. + @param lock Pointer to the allocated lock. */ + +void IOLockFree( IOLock * lock); + +/*! @function IOLockGetMachLock + @abstract Accessor to a Mach mutex. + @discussion Accessor to the Mach mutex. + @param lock Pointer to the allocated lock. */ + +lck_mtx_t * IOLockGetMachLock( IOLock * lock); + +/*! @function IOLockLock + @abstract Lock a mutex. + @discussion Lock the mutex. If the lock is held by any thread, block waiting for its unlock. This function may block and so should not be called from interrupt level or while a spin lock is held. Locking the mutex recursively from one thread will result in deadlock. + @param lock Pointer to the allocated lock. */ + +#ifdef IOLOCKS_INLINE +#define IOLockLock(l) lck_mtx_lock(l) +#else +void IOLockLock( IOLock * lock); +#endif /* !IOLOCKS_INLINE */ + +/*! @function IOLockTryLock + @abstract Attempt to lock a mutex. + @discussion Lock the mutex if it is currently unlocked, and return true. If the lock is held by any thread, return false. + @param lock Pointer to the allocated lock. + @result True if the mutex was unlocked and is now locked by the caller, otherwise false. */ + +#ifdef IOLOCKS_INLINE +#define IOLockTryLock(l) lck_mtx_try_lock(l) +#else +boolean_t IOLockTryLock( IOLock * lock); +#endif /* !IOLOCKS_INLINE */ + +/*! @function IOLockUnlock + @abstract Unlock a mutex. +@discussion Unlock the mutex and wake any blocked waiters. Results are undefined if the caller has not locked the mutex. This function may block and so should not be called from interrupt level or while a spin lock is held. + @param lock Pointer to the allocated lock. */ + +#ifdef IOLOCKS_INLINE +#define IOLockUnlock(l) lck_mtx_unlock(l) +#else +#if defined(__i386__) +void IOLockUnlock( IOLock * lock) __DARWIN10_ALIAS(IOLockUnlock); +#else /* !__i386__ */ +void IOLockUnlock( IOLock * lock); +#endif /* __i386__ */ +#endif /* !IOLOCKS_INLINE */ + +/*! @function IOLockSleep + @abstract Sleep with mutex unlock and relock +@discussion Prepare to sleep,unlock the mutex, and re-acquire it on wakeup. Results are undefined if the caller has not locked the mutex. This function may block and so should not be called from interrupt level or while a spin lock is held. + @param lock Pointer to the locked lock. + @param event The event to sleep on. + @param interType How can the sleep be interrupted. + @result The wait-result value indicating how the thread was awakened.*/ +int IOLockSleep( IOLock * lock, void *event, UInt32 interType); + +int IOLockSleepDeadline( IOLock * lock, void *event, + AbsoluteTime deadline, UInt32 interType); + +void IOLockWakeup(IOLock * lock, void *event, bool oneThread); + +#ifdef __APPLE_API_OBSOLETE + +/* The following API is deprecated */ + +typedef enum { + kIOLockStateUnlocked = 0, + kIOLockStateLocked = 1 +} IOLockState; + +void IOLockInitWithState( IOLock * lock, IOLockState state); +#define IOLockInit( l ) IOLockInitWithState( l, kIOLockStateUnlocked); + +static __inline__ void IOTakeLock( IOLock * lock) { IOLockLock(lock); } +static __inline__ boolean_t IOTryLock( IOLock * lock) { return(IOLockTryLock(lock)); } +static __inline__ void IOUnlock( IOLock * lock) { IOLockUnlock(lock); } + +#endif /* __APPLE_API_OBSOLETE */ + +/* + * Recursive lock operations + */ + +typedef struct _IORecursiveLock IORecursiveLock; + +/*! @function IORecursiveLockAlloc + @abstract Allocates and initializes an recursive lock. + @discussion Allocates a recursive lock in general purpose memory, and initializes it. Recursive locks function identically to mutexes but allow one thread to lock more than once, with balanced unlocks. IORecursiveLocks use the global IOKit lock group, IOLockGroup. To simplify kext debugging and lock-heat analysis, consider using lck_* locks with a per-driver lock group, as defined in kern/locks.h. + @result Pointer to the allocated lock, or zero on failure. */ + +IORecursiveLock * IORecursiveLockAlloc( void ); + +/*! @function IORecursiveLockFree + @abstract Frees a recursive lock. + @discussion Frees a lock allocated with IORecursiveLockAlloc. Any blocked waiters will not be woken. + @param lock Pointer to the allocated lock. */ + +void IORecursiveLockFree( IORecursiveLock * lock); + +/*! @function IORecursiveLockGetMachLock + @abstract Accessor to a Mach mutex. + @discussion Accessor to the Mach mutex. + @param lock Pointer to the allocated lock. */ + +lck_mtx_t * IORecursiveLockGetMachLock( IORecursiveLock * lock); + +/*! @function IORecursiveLockLock + @abstract Lock a recursive lock. + @discussion Lock the recursive lock. If the lock is held by another thread, block waiting for its unlock. This function may block and so should not be called from interrupt level or while a spin lock is held. The lock may be taken recursively by the same thread, with a balanced number of calls to IORecursiveLockUnlock. + @param lock Pointer to the allocated lock. */ + +void IORecursiveLockLock( IORecursiveLock * lock); + +/*! @function IORecursiveLockTryLock + @abstract Attempt to lock a recursive lock. + @discussion Lock the lock if it is currently unlocked, or held by the calling thread, and return true. If the lock is held by another thread, return false. Successful calls to IORecursiveLockTryLock should be balanced with calls to IORecursiveLockUnlock. + @param lock Pointer to the allocated lock. + @result True if the lock is now locked by the caller, otherwise false. */ + +boolean_t IORecursiveLockTryLock( IORecursiveLock * lock); + +/*! @function IORecursiveLockUnlock + @abstract Unlock a recursive lock. +@discussion Undo one call to IORecursiveLockLock, if the lock is now unlocked wake any blocked waiters. Results are undefined if the caller does not balance calls to IORecursiveLockLock with IORecursiveLockUnlock. This function may block and so should not be called from interrupt level or while a spin lock is held. + @param lock Pointer to the allocated lock. */ + +void IORecursiveLockUnlock( IORecursiveLock * lock); + +/*! @function IORecursiveLockHaveLock + @abstract Check if a recursive lock is held by the calling thread. + @discussion If the lock is held by the calling thread, return true, otherwise the lock is unlocked, or held by another thread and false is returned. + @param lock Pointer to the allocated lock. + @result True if the calling thread holds the lock otherwise false. */ + +boolean_t IORecursiveLockHaveLock( const IORecursiveLock * lock); + +extern int IORecursiveLockSleep( IORecursiveLock *_lock, + void *event, UInt32 interType); +extern int IORecursiveLockSleepDeadline( IORecursiveLock * _lock, void *event, + AbsoluteTime deadline, UInt32 interType); +extern void IORecursiveLockWakeup( IORecursiveLock *_lock, + void *event, bool oneThread); + +/* + * Complex (read/write) lock operations + */ + +#ifdef IOLOCKS_INLINE +typedef lck_rw_t IORWLock; +#else +typedef struct _IORWLock IORWLock; +#endif /* IOLOCKS_INLINE */ + +/*! @function IORWLockAlloc + @abstract Allocates and initializes a read/write lock. + @discussion Allocates and initializes a read/write lock in general purpose memory. Read/write locks provide for multiple readers, one exclusive writer, and are supplied by libkern/locks.h. This function may block and so should not be called from interrupt level or while a spin lock is held. IORWLocks use the global IOKit lock group, IOLockGroup. To simplify kext debugging and lock-heat analysis, consider using lck_* locks with a per-driver lock group, as defined in kern/locks.h. + @result Pointer to the allocated lock, or zero on failure. */ + +IORWLock * IORWLockAlloc( void ); + +/*! @function IORWLockFree + @abstract Frees a read/write lock. + @discussion Frees a lock allocated with IORWLockAlloc. Any blocked waiters will not be woken. + @param lock Pointer to the allocated lock. */ + +void IORWLockFree( IORWLock * lock); + +/*! @function IORWLockGetMachLock + @abstract Accessor to a Mach read/write lock. + @discussion Accessor to the Mach read/write lock. + @param lock Pointer to the allocated lock. */ + +lck_rw_t * IORWLockGetMachLock( IORWLock * lock); + +/*! @function IORWLockRead + @abstract Lock a read/write lock for read. +@discussion Lock the lock for read, allowing multiple readers when there are no writers. If the lock is held for write, block waiting for its unlock. This function may block and so should not be called from interrupt level or while a spin lock is held. Locking the lock recursively from one thread, for read or write, can result in deadlock. + @param lock Pointer to the allocated lock. */ + +#ifdef IOLOCKS_INLINE +#define IORWLockRead(l) lck_rw_lock_shared(l) +#else +void IORWLockRead(IORWLock * lock); +#endif /* !IOLOCKS_INLINE */ + +/*! @function IORWLockWrite + @abstract Lock a read/write lock for write. + @discussion Lock the lock for write, allowing one writer exlusive access. If the lock is held for read or write, block waiting for its unlock. This function may block and so should not be called from interrupt level or while a spin lock is held. Locking the lock recursively from one thread, for read or write, can result in deadlock. + @param lock Pointer to the allocated lock. */ + +#ifdef IOLOCKS_INLINE +#define IORWLockWrite(l) lck_rw_lock_exclusive(l) +#else +void IORWLockWrite( IORWLock * lock); +#endif /* !IOLOCKS_INLINE */ + +/*! @function IORWLockUnlock + @abstract Unlock a read/write lock. + @discussion Undo one call to IORWLockRead or IORWLockWrite. Results are undefined if the caller has not locked the lock. This function may block and so should not be called from interrupt level or while a spin lock is held. + @param lock Pointer to the allocated lock. */ + +#ifdef IOLOCKS_INLINE +#define IORWLockUnlock(l) lck_rw_done(l) +#else +void IORWLockUnlock( IORWLock * lock); +#endif /* !IOLOCKS_INLINE */ + + +#ifdef __APPLE_API_OBSOLETE + +/* The following API is deprecated */ + +static __inline__ void IOReadLock( IORWLock * lock) { IORWLockRead(lock); } +static __inline__ void IOWriteLock( IORWLock * lock) { IORWLockWrite(lock); } +static __inline__ void IORWUnlock( IORWLock * lock) { IORWLockUnlock(lock); } + +#endif /* __APPLE_API_OBSOLETE */ + + +/* + * Simple locks. Cannot block while holding a simple lock. + */ + +#ifdef IOLOCKS_INLINE +typedef lck_spin_t IOSimpleLock; +#else +typedef struct _IOSimpleLock IOSimpleLock; +#endif /* IOLOCKS_INLINE */ + +/*! @function IOSimpleLockAlloc + @abstract Allocates and initializes a spin lock. + @discussion Allocates and initializes a spin lock in general purpose memory. Spin locks provide non-blocking mutual exclusion for synchronization between thread context and interrupt context, or for multiprocessor synchronization, and are supplied by libkern/locks.h. This function may block and so should not be called from interrupt level or while a spin lock is held. IOSimpleLocks use the global IOKit lock group, IOLockGroup. To simplify kext debugging and lock-heat analysis, consider using lck_* locks with a per-driver lock group, as defined in kern/locks.h. + @result Pointer to the allocated lock, or zero on failure. */ + +IOSimpleLock * IOSimpleLockAlloc( void ); + +/*! @function IOSimpleLockFree + @abstract Frees a spin lock. + @discussion Frees a lock allocated with IOSimpleLockAlloc. + @param lock Pointer to the lock. */ + +void IOSimpleLockFree( IOSimpleLock * lock ); + +/*! @function IOSimpleLockGetMachLock + @abstract Accessor to a Mach spin lock. + @discussion Accessor to the Mach spin lock. + @param lock Pointer to the allocated lock. */ + +lck_spin_t * IOSimpleLockGetMachLock( IOSimpleLock * lock); + +/*! @function IOSimpleLockInit + @abstract Initialize a spin lock. + @discussion Initialize an embedded spin lock, to the unlocked state. + @param lock Pointer to the lock. */ + +void IOSimpleLockInit( IOSimpleLock * lock ); + +/*! @function IOSimpleLockLock + @abstract Lock a spin lock. +@discussion Lock the spin lock. If the lock is held, spin waiting for its unlock. Spin locks disable preemption, cannot be held across any blocking operation, and should be held for very short periods. When used to synchronize between interrupt context and thread context they should be locked with interrupts disabled - IOSimpleLockLockDisableInterrupt() will do both. Locking the lock recursively from one thread will result in deadlock. + @param lock Pointer to the lock. */ + +#ifdef IOLOCKS_INLINE +#define IOSimpleLockLock(l) lck_spin_lock(l) +#else +void IOSimpleLockLock( IOSimpleLock * lock ); +#endif /* !IOLOCKS_INLINE */ + + +/*! @function IOSimpleLockTryLock + @abstract Attempt to lock a spin lock. +@discussion Lock the spin lock if it is currently unlocked, and return true. If the lock is held, return false. Successful calls to IOSimpleLockTryLock should be balanced with calls to IOSimpleLockUnlock. + @param lock Pointer to the lock. + @result True if the lock was unlocked and is now locked by the caller, otherwise false. */ + +#ifdef IOLOCKS_INLINE +#define IOSimpleLockTryLock(l) lck_spin_try_lock(l) +#else +boolean_t IOSimpleLockTryLock( IOSimpleLock * lock ); +#endif /* !IOLOCKS_INLINE */ + +/*! @function IOSimpleLockUnlock + @abstract Unlock a spin lock. + @discussion Unlock the lock, and restore preemption. Results are undefined if the caller has not locked the lock. + @param lock Pointer to the lock. */ + +#ifdef IOLOCKS_INLINE +#define IOSimpleLockUnlock(l) lck_spin_unlock(l) +#else +void IOSimpleLockUnlock( IOSimpleLock * lock ); +#endif /* !IOLOCKS_INLINE */ + +#if __LP64__ +typedef boolean_t IOInterruptState; +#else +typedef long int IOInterruptState; +#endif + +/*! @function IOSimpleLockLockDisableInterrupt + @abstract Lock a spin lock. + @discussion Lock the spin lock. If the lock is held, spin waiting for its unlock. Simple locks disable preemption, cannot be held across any blocking operation, and should be held for very short periods. When used to synchronize between interrupt context and thread context they should be locked with interrupts disabled - IOSimpleLockLockDisableInterrupt() will do both. Locking the lock recursively from one thread will result in deadlock. + @param lock Pointer to the lock. */ + +static __inline__ +IOInterruptState IOSimpleLockLockDisableInterrupt( IOSimpleLock * lock ) +{ + IOInterruptState state = ml_set_interrupts_enabled( false ); + IOSimpleLockLock( lock ); + return( state ); +} + +/*! @function IOSimpleLockUnlockEnableInterrupt + @abstract Unlock a spin lock, and restore interrupt state. + @discussion Unlock the lock, and restore preemption and interrupts to the state as they were when the lock was taken. Results are undefined if the caller has not locked the lock. + @param lock Pointer to the lock. + @param state The interrupt state returned by IOSimpleLockLockDisableInterrupt() */ + +static __inline__ +void IOSimpleLockUnlockEnableInterrupt( IOSimpleLock * lock, + IOInterruptState state ) +{ + IOSimpleLockUnlock( lock ); + ml_set_interrupts_enabled( state ); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__IOKIT_IOLOCKS_H */ + diff --git a/i386/include/IOKit/IOMapper.h b/i386/include/IOKit/IOMapper.h new file mode 100644 index 0000000..d877974 --- /dev/null +++ b/i386/include/IOKit/IOMapper.h @@ -0,0 +1,154 @@ +/* + * Copyright (c) 1998-2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef __IOKIT_IOMAPPER_H +#define __IOKIT_IOMAPPER_H + +#include + +__BEGIN_DECLS +#include +#include + +// These are C accessors to the system mapper for non-IOKit clients +ppnum_t IOMapperIOVMAlloc(unsigned pages); +void IOMapperIOVMFree(ppnum_t addr, unsigned pages); + +ppnum_t IOMapperInsertPage(ppnum_t addr, unsigned offset, ppnum_t page); +void IOMapperInsertPPNPages(ppnum_t addr, unsigned offset, + ppnum_t *pageList, unsigned pageCount); +void IOMapperInsertUPLPages(ppnum_t addr, unsigned offset, + upl_page_info_t *pageList, unsigned pageCount); + +mach_vm_address_t IOMallocPhysical(mach_vm_size_t size, mach_vm_address_t mask); + +void IOFreePhysical(mach_vm_address_t address, mach_vm_size_t size); + +__END_DECLS + +#if __cplusplus + +#include +#include + +class OSData; +class IODMACommand; + +extern const OSSymbol * gIOMapperIDKey; + +class IOMapper : public IOService +{ + OSDeclareAbstractStructors(IOMapper); + + // Give the platform expert access to setMapperRequired(); + friend class IOPlatformExpert; + +private: + enum SystemMapperState { + kNoMapper = 0, + kUnknown = 1, + kHasMapper = 2, // Any other value is pointer to a live mapper + kWaitMask = 3, + }; +protected: + void *fTable; + ppnum_t fTablePhys; + IOItemCount fTableSize; + OSData *fTableHandle; + bool fIsSystem; + + + static void setMapperRequired(bool hasMapper); + static void waitForSystemMapper(); + + virtual bool initHardware(IOService *provider) = 0; + + virtual bool allocTable(IOByteCount size); + +public: + virtual bool start(IOService *provider); + virtual void free(); + + // Static routines capable of allocating tables that are physically + // contiguous in real memory space. + static OSData * NewARTTable(IOByteCount size, + void ** virtAddrP, ppnum_t *physAddrP); + static void FreeARTTable(OSData *handle, IOByteCount size); + + + // To get access to the system mapper IOMapper::gSystem + static IOMapper *gSystem; + + virtual ppnum_t iovmAlloc(IOItemCount pages) = 0; + virtual void iovmFree(ppnum_t addr, IOItemCount pages) = 0; + + virtual void iovmInsert(ppnum_t addr, IOItemCount offset, ppnum_t page) = 0; + virtual void iovmInsert(ppnum_t addr, IOItemCount offset, + ppnum_t *pageList, IOItemCount pageCount); + virtual void iovmInsert(ppnum_t addr, IOItemCount offset, + upl_page_info_t *pageList, IOItemCount pageCount); + + static void checkForSystemMapper() + { if ((uintptr_t) gSystem & kWaitMask) waitForSystemMapper(); }; + + static IOMapper * copyMapperForDevice(IOService * device); + + + // Function will panic if the given address is not found in a valid + // iovm mapping. + virtual addr64_t mapAddr(IOPhysicalAddress addr) = 0; + + // Get the address mask to or into an address to bypass this mapper + virtual bool getBypassMask(addr64_t *maskP) const; + + virtual ppnum_t iovmAllocDMACommand(IODMACommand * command, IOItemCount pageCount); + virtual void iovmFreeDMACommand(IODMACommand * command, ppnum_t addr, IOItemCount pageCount); + + OSMetaClassDeclareReservedUsed(IOMapper, 0); + OSMetaClassDeclareReservedUsed(IOMapper, 1); + OSMetaClassDeclareReservedUsed(IOMapper, 2); + +private: + OSMetaClassDeclareReservedUnused(IOMapper, 3); + OSMetaClassDeclareReservedUnused(IOMapper, 4); + OSMetaClassDeclareReservedUnused(IOMapper, 5); + OSMetaClassDeclareReservedUnused(IOMapper, 6); + OSMetaClassDeclareReservedUnused(IOMapper, 7); + OSMetaClassDeclareReservedUnused(IOMapper, 8); + OSMetaClassDeclareReservedUnused(IOMapper, 9); + OSMetaClassDeclareReservedUnused(IOMapper, 10); + OSMetaClassDeclareReservedUnused(IOMapper, 11); + OSMetaClassDeclareReservedUnused(IOMapper, 12); + OSMetaClassDeclareReservedUnused(IOMapper, 13); + OSMetaClassDeclareReservedUnused(IOMapper, 14); + OSMetaClassDeclareReservedUnused(IOMapper, 15); +}; + +#endif /* __cplusplus */ + +#endif /* !__IOKIT_IOMAPPER_H */ diff --git a/i386/include/IOKit/IOMemoryCursor.h b/i386/include/IOKit/IOMemoryCursor.h new file mode 100644 index 0000000..dfe9eed --- /dev/null +++ b/i386/include/IOKit/IOMemoryCursor.h @@ -0,0 +1,462 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _IOMEMORYCURSOR_H +#define _IOMEMORYCURSOR_H + +#include +#include + +class IOMemoryDescriptor; + +/**************************** class IOMemoryCursor ***************************/ + +/*! + @class IOMemoryCursor + @abstract A mechanism to convert memory references to physical addresses. + @discussion The IOMemoryCursor declares the super class that all +specific memory cursors must inherit from, but a memory cursor can be created without a specific format subclass by just providing a segment function to the initializers. This class does the difficult stuff of dividing a memory descriptor into a physical scatter/gather list appropriate for the target hardware. +

+ A driver is expected to create a memory cursor and configure it to the limitations of its DMA hardware; for instance the memory cursor used by the FireWire SBP-2 protocol has a maximum physical segment size of 2^16 - 1 but the actual transfer size is unlimited. Thus it would create a cursor with a maxSegmentSize of 65535 and a maxTransfer size of UINT_MAX. It would also provide a SegmentFunction that can output a pagelist entry. +

+Below is the simplest example of a SegmentFunction:
+void IONaturalMemoryCursor::outputSegment(PhysicalSegment segment,
+ void * outSegments,
+ UInt32 outSegmentIndex)
+{
+ ((PhysicalSegment *) outSegments)[outSegmentIndex] = segment;
+} + +*/ +class IOMemoryCursor : public OSObject +{ + OSDeclareDefaultStructors(IOMemoryCursor) + +public: +/*! + @typedef PhysicalSegment + @discussion A physical address/length pair. +*/ + struct PhysicalSegment + { + IOPhysicalAddress location; + IOPhysicalLength length; + }; + +/*! @defined IOPhysicalSegment + @discussion Backward compatibility define for the old non-class scoped type definition. See IOMemoryCursor::PhysicalSegment +*/ +#define IOPhysicalSegment IOMemoryCursor::PhysicalSegment + +/*! + @typedef SegmentFunction + @discussion Pointer to a C function that outputs a single physical segment to an element in the array as defined by the segments and segmentIndex parameters. + @param segment The physical address and length that is next to be output. + @param segments Base of the output vector of DMA address length pairs. + @param segmentIndex Index to output 'segment' in the 'segments' array. +*/ + typedef void (*SegmentFunction)(PhysicalSegment segment, + void * segments, + UInt32 segmentIndex); + +/*! @defined OutputSegmentFunc + @discussion Backward compatibility define for the old non-class scoped type definition. See IOMemoryCursor::SegmentFunction */ +#define OutputSegmentFunc IOMemoryCursor::SegmentFunction + +protected: +/*! @var outSeg The action method called when an event has been delivered */ + SegmentFunction outSeg; + +/*! @var maxSegmentSize Maximum size of one segment in a scatter/gather list */ + IOPhysicalLength maxSegmentSize; + +/*! @var maxTransferSize + Maximum size of a transfer that this memory cursor is allowed to generate */ + IOPhysicalLength maxTransferSize; + +/*! @var alignMask + Currently unused. Reserved for automated aligment restriction code. */ + IOPhysicalLength alignMask; + +public: +/*! @function withSpecification + @abstract Creates and initializes an IOMemoryCursor in one operation. + @discussion Factory function to create and initialize an IOMemoryCursor in one operation. For more information, see IOMemoryCursor::initWithSpecification. + @param outSegFunc SegmentFunction to call to output one physical segment. + @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. + @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. + @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. + @result Returns a new memory cursor if successfully created and initialized, 0 otherwise. +*/ + static IOMemoryCursor * + withSpecification(SegmentFunction outSegFunc, + IOPhysicalLength maxSegmentSize = 0, + IOPhysicalLength maxTransferSize = 0, + IOPhysicalLength alignment = 1); + +/*! @function initWithSpecification + @abstract Primary initializer for the IOMemoryCursor class. + @param outSegFunc SegmentFunction to call to output one physical segment. + @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. + @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. + @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. + @result Returns true if the inherited classes and this instance initialize +successfully. +*/ + virtual bool initWithSpecification(SegmentFunction outSegFunc, + IOPhysicalLength maxSegmentSize = 0, + IOPhysicalLength maxTransferSize = 0, + IOPhysicalLength alignment = 1); + +/*! @function genPhysicalSegments + @abstract Generates a physical scatter/gather list given a memory descriptor. + @discussion Generates a list of physical segments from the given memory descriptor, relative to the current position of the descriptor. + @param descriptor IOMemoryDescriptor that describes the data associated with an I/O request. + @param fromPosition Starting location of the I/O within a memory descriptor. + @param segments Void pointer to base of output physical scatter/gather list. Always passed directly onto the SegmentFunction without interpretation by the cursor. + @param maxSegments Maximum number of segments that can be written to segments array. + @param maxTransferSize Maximum transfer size is limited to that many bytes, otherwise it defaults to the maximum transfer size specified when the memory cursor was initialized. + @param transferSize Pointer to an IOByteCount variable that can contain the total size of the transfer being described. Defaults to 0 indicating that no transfer size need be returned. + @result If the descriptor is exhausted of memory, a zero is returned, otherwise the number of segments that were filled in is returned. +*/ + virtual UInt32 genPhysicalSegments( + IOMemoryDescriptor *descriptor, + IOByteCount fromPosition, + void * segments, + UInt32 maxSegments, + UInt32 maxTransferSize = 0, + IOByteCount *transferSize = 0); +}; + +/************************ class IONaturalMemoryCursor ************************/ + + +/*! + @class IONaturalMemoryCursor + @abstract An IOMemoryCursor subclass that outputs a vector of PhysicalSegments in the natural byte orientation for the CPU. + @discussion The IONaturalMemoryCursor would be used when it is too difficult to safely describe a SegmentFunction that is more appropriate for your hardware. This cursor just outputs an array of PhysicalSegments. +*/ +class IONaturalMemoryCursor : public IOMemoryCursor +{ + OSDeclareDefaultStructors(IONaturalMemoryCursor) + +public: +/*! @function outputSegment + @abstract Outputs the given segment into the output segments array in natural byte order. + @param segment The physical address and length that is next to be output. + @param segments Base of the output vector of DMA address length pairs. + @param segmentIndex Index to output 'segment' in the 'segments' array. +*/ + static void outputSegment(PhysicalSegment segment, + void * segments, + UInt32 segmentIndex); + +/*! @defined naturalOutputSegment + @discussion Backward compatibility define for the old global function definition. See IONaturalMemoryCursor::outputSegment. +*/ +#define naturalOutputSegment IONaturalMemoryCursor::outputSegment + +/*! @function withSpecification + @abstract Creates and initializes an IONaturalMemoryCursor in one operation. + @discussion Factory function to create and initialize an IONaturalMemoryCursor in one operation. For more information, see IONaturalMemoryCursor::initWithSpecification. + @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. + @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. + @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. + @result Returns a new memory cursor if successfully created and initialized, 0 otherwise. +*/ + static IONaturalMemoryCursor * + withSpecification(IOPhysicalLength maxSegmentSize, + IOPhysicalLength maxTransferSize, + IOPhysicalLength alignment = 1); + +/*! @function initWithSpecification + @abstract Primary initializer for the IONaturalMemoryCursor class. + @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. + @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. + @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. + @result Returns true if the inherited classes and this instance initialize successfully. +*/ + virtual bool initWithSpecification(IOPhysicalLength maxSegmentSize, + IOPhysicalLength maxTransferSize, + IOPhysicalLength alignment = 1); + + +/*! @function getPhysicalSegments + @abstract Generates a CPU natural physical scatter/gather list given a memory descriptor. + @discussion Generates a list of physical segments from the given memory descriptor, relative to the current position of the descriptor. Wraps IOMemoryCursor::genPhysicalSegments. + @param descriptor IOMemoryDescriptor that describes the data associated with an I/O request. + @param fromPosition Starting location of the I/O within a memory descriptor. + @param segments Pointer to an array of IOMemoryCursor::PhysicalSegments for the output physical scatter/gather list. + @param maxSegments Maximum number of segments that can be written to segments array. + @param inMaxTransferSize Maximum transfer size is limited to that many bytes, otherwise it defaults to the maximum transfer size specified when the memory cursor was initialized. + @param transferSize Pointer to an IOByteCount variable that can contain the total size of the transfer being described. Defaults to 0 indicating that no transfer size need be returned. + @result If the descriptor is exhausted of memory, a zero is returned, otherwise the number of segments that were filled in is returned. +*/ + virtual UInt32 getPhysicalSegments(IOMemoryDescriptor *descriptor, + IOByteCount fromPosition, + PhysicalSegment *segments, + UInt32 maxSegments, + UInt32 inMaxTransferSize = 0, + IOByteCount *transferSize = 0) + { + return genPhysicalSegments(descriptor, fromPosition, segments, + maxSegments, inMaxTransferSize, transferSize); + } +}; + +/************************** class IOBigMemoryCursor **************************/ + +/*! + @class IOBigMemoryCursor + @abstract An IOMemoryCursor subclass that outputs a vector of PhysicalSegments in the big endian byte order. + @discussion The IOBigMemoryCursor would be used when the DMA hardware requires a big endian address and length pair. This cursor outputs an array of PhysicalSegments that are encoded in big-endian format. +*/ +class IOBigMemoryCursor : public IOMemoryCursor +{ + OSDeclareDefaultStructors(IOBigMemoryCursor) + +public: +/*! @function outputSegment + @abstract Outputs the given segment into the output segments array in big endian byte order. + @param segment The physical address and length that is next to be output. + @param segments Base of the output vector of DMA address length pairs. + @param segmentIndex Index to output 'segment' in the 'segments' array. +*/ + static void outputSegment(PhysicalSegment segment, + void * segments, + UInt32 segmentIndex); + +/*! @defined bigOutputSegment + @discussion Backward compatibility define for the old global function definition. See IOBigMemoryCursor::outputSegment +*/ +#define bigOutputSegment IOBigMemoryCursor::outputSegment + +/*! @function withSpecification + @abstract Creates and initializes an IOBigMemoryCursor in one operation. + @discussion Factory function to create and initialize an IOBigMemoryCursor in one operation. See also IOBigMemoryCursor::initWithSpecification. + @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. + @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. + @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. + @result Returns a new memory cursor if successfully created and initialized, 0 otherwise. +*/ + static IOBigMemoryCursor * + withSpecification(IOPhysicalLength maxSegmentSize, + IOPhysicalLength maxTransferSize, + IOPhysicalLength alignment = 1); + +/*! @function initWithSpecification + @abstract Primary initializer for the IOBigMemoryCursor class. + @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. + @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. + @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. + @result Returns true if the inherited classes and this instance initialize +successfully. +*/ + virtual bool initWithSpecification(IOPhysicalLength maxSegmentSize, + IOPhysicalLength maxTransferSize, + IOPhysicalLength alignment = 1); + + +/*! @function getPhysicalSegments + @abstract Generates a big endian physical scatter/gather list given a memory descriptor. + @discussion Generates a list of physical segments from the given memory descriptor, relative to the current position of the descriptor. Wraps IOMemoryCursor::genPhysicalSegments. + @param descriptor IOMemoryDescriptor that describes the data associated with an I/O request. + @param fromPosition Starting location of the I/O within a memory descriptor. + @param segments Pointer to an array of IOMemoryCursor::PhysicalSegments for the output physical scatter/gather list. + @param maxSegments Maximum number of segments that can be written to segments array. + @param inMaxTransferSize Maximum transfer size is limited to that many bytes, otherwise it defaults to the maximum transfer size specified when the memory cursor was initialized. + @param transferSize Pointer to an IOByteCount variable that can contain the total size of the transfer being described. Defaults to 0 indicating that no transfer size need be returned. + @result If the descriptor is exhausted of memory, a zero is returned, otherwise the number of segments that were filled in is returned. +*/ + virtual UInt32 getPhysicalSegments(IOMemoryDescriptor * descriptor, + IOByteCount fromPosition, + PhysicalSegment * segments, + UInt32 maxSegments, + UInt32 inMaxTransferSize = 0, + IOByteCount * transferSize = 0) + { + return genPhysicalSegments(descriptor, fromPosition, segments, + maxSegments, inMaxTransferSize, transferSize); + } +}; + +/************************* class IOLittleMemoryCursor ************************/ + +/*! + @class IOLittleMemoryCursor + @abstract An IOMemoryCursor subclass that outputs a vector of PhysicalSegments in the little endian byte order. + @discussion The IOLittleMemoryCursor would be used when the DMA hardware requires a little endian address and length pair. This cursor outputs an array of PhysicalSegments that are encoded in little endian format. +*/ +class IOLittleMemoryCursor : public IOMemoryCursor +{ + OSDeclareDefaultStructors(IOLittleMemoryCursor) + +public: +/*! @function outputSegment + @abstract Outputs the given segment into the output segments array in little endian byte order. + @param segment The physical address and length that is next to be output. + @param segments Base of the output vector of DMA address length pairs. + @param segmentIndex Index to output 'segment' in the 'segments' array. +*/ + static void outputSegment(PhysicalSegment segment, + void * segments, + UInt32 segmentIndex); + +/*! @defined littleOutputSegment + @discussion Backward compatibility define for the old global function definition. See also IOLittleMemoryCursor::outputSegment. */ +#define littleOutputSegment IOLittleMemoryCursor::outputSegment + +/*! @function withSpecification + @abstract Creates and initializes an IOLittleMemoryCursor in one operation. + @discussion Factory function to create and initialize an IOLittleMemoryCursor in one operation. See also IOLittleMemoryCursor::initWithSpecification. + @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. + @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. + @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. + @result Returns a new memory cursor if successfully created and initialized, 0 otherwise. +*/ + static IOLittleMemoryCursor * + withSpecification(IOPhysicalLength maxSegmentSize, + IOPhysicalLength maxTransferSize, + IOPhysicalLength alignment = 1); + +/*! @function initWithSpecification + @abstract Primary initializer for the IOLittleMemoryCursor class. + @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. + @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. + @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. + @result Returns true if the inherited classes and this instance initialize successfully. +*/ + virtual bool initWithSpecification(IOPhysicalLength maxSegmentSize, + IOPhysicalLength maxTransferSize, + IOPhysicalLength alignment = 1); + + +/*! @function getPhysicalSegments + @abstract Generates a little endian physical scatter/gather list given a memory descriptor. + @discussion Generates a list of physical segments from the given memory descriptor, relative to the current position of the descriptor. Wraps IOMemoryCursor::genPhysicalSegments. + @param descriptor IOMemoryDescriptor that describes the data associated with an I/O request. + @param fromPosition Starting location of the I/O within a memory descriptor. + @param segments Pointer to an array of IOMemoryCursor::PhysicalSegments for the output physical scatter/gather list. + @param maxSegments Maximum number of segments that can be written to segments array. + @param inMaxTransferSize Maximum transfer size is limited to that many bytes, otherwise it defaults to the maximum transfer size specified when the memory cursor was initialized. + @param transferSize Pointer to an IOByteCount variable that can contain the total size of the transfer being described. Defaults to 0 indicating that no transfer size need be returned. + @result If the descriptor is exhausted of memory, a zero is returned, otherwise the number of segments that were filled in is returned. +*/ + virtual UInt32 getPhysicalSegments(IOMemoryDescriptor * descriptor, + IOByteCount fromPosition, + PhysicalSegment * segments, + UInt32 maxSegments, + UInt32 inMaxTransferSize = 0, + IOByteCount * transferSize = 0) + { + return genPhysicalSegments(descriptor, fromPosition, segments, + maxSegments, inMaxTransferSize, transferSize); + } +}; + +/************************* class IODBDMAMemoryCursor *************************/ + +#if defined(__ppc__) + +struct IODBDMADescriptor; + +/*! + @class IODBDMAMemoryCursor + @abstract An IOMemoryCursor subclass that outputs a vector of DBDMA descriptors where the address and length are filled in. + @discussion The IODBDMAMemoryCursor would be used when the DBDMA hardware is available for the device for that will use an instance of this cursor. +*/ +class IODBDMAMemoryCursor : public IOMemoryCursor +{ + OSDeclareDefaultStructors(IODBDMAMemoryCursor) + +public: +/*! @function outputSegment + @abstract Outpust the given segment into the output segments array in address and length fields of an DBDMA descriptor. + @param segment The physical address and length that is next to be output. + @param segments Base of the output vector of DMA address length pairs. + @param segmentIndex Index to output 'segment' in the 'segments' array. +*/ + static void outputSegment(PhysicalSegment segment, + void * segments, + UInt32 segmentIndex); + +/*! @defined dbdmaOutputSegment + @discussion Backward compatibility define for the old global function definition. See IODBDMAMemoryCursor::outputSegment. */ +#define dbdmaOutputSegment IODBDMAMemoryCursor::outputSegment + +/*! @function withSpecification + @abstract Creates and initializes an IODBDMAMemoryCursor in one operation. + @discussion Factory function to create and initialize an IODBDMAMemoryCursor in one operation. See also IODBDMAMemoryCursor::initWithSpecification. + @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. + @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. + @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. + @result Returns a new memory cursor if successfully created and initialized, 0 otherwise. +*/ + static IODBDMAMemoryCursor * + withSpecification(IOPhysicalLength maxSegmentSize, + IOPhysicalLength maxTransferSize, + IOPhysicalLength alignment = 1); + +/*! @function initWithSpecification + @abstract Primary initializer for the IODBDMAMemoryCursor class. + @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. + @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. + @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. + @result Returns true if the inherited classes and this instance initialize successfully. +*/ + virtual bool initWithSpecification(IOPhysicalLength maxSegmentSize, + IOPhysicalLength maxTransferSize, + IOPhysicalLength alignment = 1); + + +/*! @function getPhysicalSegments + @abstract Generates a DBDMA physical scatter/gather list given a memory descriptor. + @discussion Generates a list of DBDMA descriptors where the address and length fields are filled in appropriately. But the client is expected to fill in the rest of the DBDMA descriptor as is appropriate for their particular hardware. Wraps IOMemoryCursor::genPhysicalSegments. + @param descriptor IOMemoryDescriptor that describes the data associated with an I/O request. + @param fromPosition Starting location of the I/O within a memory descriptor. + @param segments Pointer to an array of DBDMA descriptors for the output physical scatter/gather list. Be warned no room is left for a preamble in the output array. 'segments' should point to the first memory description slot in a DBDMA command. + @param maxSegments Maximum number of segments that can be written to the DBDMA descriptor table. + @param inMaxTransferSize Maximum transfer size is limited to that many bytes, otherwise it defaults to the maximum transfer size specified when the memory cursor was initialized. + @param transferSize Pointer to an IOByteCount variable that can contain the total size of the transfer being described. Defaults to 0 indicating that no transfer size need be returned. + @result If the descriptor is exhausted of memory, a zero is returned, otherwise the number of segments that were filled in is returned. +*/ + virtual UInt32 getPhysicalSegments(IOMemoryDescriptor * descriptor, + IOByteCount fromPosition, + IODBDMADescriptor * segments, + UInt32 maxSegments, + UInt32 inMaxTransferSize = 0, + IOByteCount * transferSize = 0) + { + return genPhysicalSegments(descriptor, fromPosition, segments, + maxSegments, inMaxTransferSize, transferSize); + } +}; + +#endif /* defined(__ppc__) */ + +#endif /* !_IOMEMORYCURSOR_H */ + diff --git a/i386/include/IOKit/IOMemoryDescriptor.h b/i386/include/IOKit/IOMemoryDescriptor.h new file mode 100644 index 0000000..d60d864 --- /dev/null +++ b/i386/include/IOKit/IOMemoryDescriptor.h @@ -0,0 +1,898 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _IOMEMORYDESCRIPTOR_H +#define _IOMEMORYDESCRIPTOR_H + +#include + +#include +#include +#include + +#include + +class IOMemoryMap; +class IOMapper; + +/* + * Direction of transfer, with respect to the described memory. + */ +#ifdef __LP64__ +enum +#else /* !__LP64__ */ +enum IODirection +#endif /* !__LP64__ */ +{ + kIODirectionNone = 0x0, // same as VM_PROT_NONE + kIODirectionIn = 0x1, // User land 'read', same as VM_PROT_READ + kIODirectionOut = 0x2, // User land 'write', same as VM_PROT_WRITE + kIODirectionOutIn = kIODirectionOut | kIODirectionIn, + kIODirectionInOut = kIODirectionIn | kIODirectionOut +}; +#ifdef __LP64__ +typedef IOOptionBits IODirection; +#endif /* __LP64__ */ + +/* + * IOOptionBits used in the withOptions variant + */ +enum { + kIOMemoryDirectionMask = 0x00000007, + + kIOMemoryTypeVirtual = 0x00000010, + kIOMemoryTypePhysical = 0x00000020, + kIOMemoryTypeUPL = 0x00000030, + kIOMemoryTypePersistentMD = 0x00000040, // Persistent Memory Descriptor + kIOMemoryTypeUIO = 0x00000050, +#ifdef __LP64__ + kIOMemoryTypeVirtual64 = kIOMemoryTypeVirtual, + kIOMemoryTypePhysical64 = kIOMemoryTypePhysical, +#else /* !__LP64__ */ + kIOMemoryTypeVirtual64 = 0x00000060, + kIOMemoryTypePhysical64 = 0x00000070, +#endif /* !__LP64__ */ + kIOMemoryTypeMask = 0x000000f0, + + kIOMemoryAsReference = 0x00000100, + kIOMemoryBufferPageable = 0x00000400, + kIOMemoryMapperNone = 0x00000800, + kIOMemoryPersistent = 0x00010000, + kIOMemoryThreadSafe = 0x00100000, // Shared with Buffer MD +}; + +#define kIOMapperSystem ((IOMapper *) 0) + +enum +{ + kIOMemoryPurgeableKeepCurrent = 1, + kIOMemoryPurgeableNonVolatile = 2, + kIOMemoryPurgeableVolatile = 3, + kIOMemoryPurgeableEmpty = 4 +}; +enum +{ + kIOMemoryIncoherentIOFlush = 1, + kIOMemoryIncoherentIOStore = 2, +}; + +#define IOMEMORYDESCRIPTOR_SUPPORTS_DMACOMMAND 1 + +enum +{ + kIOPreparationIDUnprepared = 0, + kIOPreparationIDUnsupported = 1, + kIOPreparationIDAlwaysPrepared = 2, +}; + +/*! @class IOMemoryDescriptor : public OSObject + @abstract An abstract base class defining common methods for describing physical or virtual memory. + @discussion The IOMemoryDescriptor object represents a buffer or range of memory, specified as one or more physical or virtual address ranges. It contains methods to return the memory's physically contiguous segments (fragments), for use with the IOMemoryCursor, and methods to map the memory into any address space with caching and placed mapping options. */ + +class IOMemoryDescriptor : public OSObject +{ + friend class IOMemoryMap; + + OSDeclareDefaultStructors(IOMemoryDescriptor); + +protected: +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of this class in the future. + */ + struct ExpansionData { + void * devicePager; + unsigned int pagerContig:1; + unsigned int unused:31; + IOMemoryDescriptor * memory; + }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * reserved; + +protected: + OSSet * _mappings; + IOOptionBits _flags; + void * _memEntry; + +#ifdef __LP64__ + uint64_t __iomd_reserved1; + uint64_t __iomd_reserved2; + uint64_t __iomd_reserved3; + uint64_t __iomd_reserved4; +#else /* !__LP64__ */ + IODirection _direction; /* use _flags instead */ +#endif /* !__LP64__ */ + IOByteCount _length; /* length of all ranges */ + IOOptionBits _tag; + +public: +typedef IOOptionBits DMACommandOps; +#ifndef __LP64__ + virtual IOPhysicalAddress getSourceSegment( IOByteCount offset, + IOByteCount * length ) APPLE_KEXT_DEPRECATED; +#endif /* !__LP64__ */ + +/*! @function initWithOptions + @abstract Master initialiser for all variants of memory descriptors. For a more complete description see IOMemoryDescriptor::withOptions. + @discussion Note this function can be used to re-init a previously created memory descriptor. + @result true on success, false on failure. */ + virtual bool initWithOptions(void * buffers, + UInt32 count, + UInt32 offset, + task_t task, + IOOptionBits options, + IOMapper * mapper = kIOMapperSystem); + +#ifndef __LP64__ + virtual addr64_t getPhysicalSegment64( IOByteCount offset, + IOByteCount * length ) APPLE_KEXT_DEPRECATED; /* use getPhysicalSegment() and kIOMemoryMapperNone instead */ +#endif /* !__LP64__ */ + +/*! @function setPurgeable + @abstract Control the purgeable status of a memory descriptors memory. + @discussion Buffers may be allocated with the ability to have their purgeable status changed - IOBufferMemoryDescriptor with the kIOMemoryPurgeable option, VM_FLAGS_PURGEABLE may be passed to vm_allocate() in user space to allocate such buffers. The purgeable status of such a buffer may be controlled with setPurgeable(). The process of making a purgeable memory descriptor non-volatile and determining its previous state is atomic - if a purgeable memory descriptor is made nonvolatile and the old state is returned as kIOMemoryPurgeableVolatile, then the memory's previous contents are completely intact and will remain so until the memory is made volatile again. If the old state is returned as kIOMemoryPurgeableEmpty then the memory was reclaimed while it was in a volatile state and its previous contents have been lost. + @param newState - the desired new purgeable state of the memory:
+ kIOMemoryPurgeableKeepCurrent - make no changes to the memory's purgeable state.
+ kIOMemoryPurgeableVolatile - make the memory volatile - the memory may be reclaimed by the VM system without saving its contents to backing store.
+ kIOMemoryPurgeableNonVolatile - make the memory nonvolatile - the memory is treated as with usual allocations and must be saved to backing store if paged.
+ kIOMemoryPurgeableEmpty - make the memory volatile, and discard any pages allocated to it. + @param oldState - if non-NULL, the previous purgeable state of the memory is returned here:
+ kIOMemoryPurgeableNonVolatile - the memory was nonvolatile.
+ kIOMemoryPurgeableVolatile - the memory was volatile but its content has not been discarded by the VM system.
+ kIOMemoryPurgeableEmpty - the memory was volatile and has been discarded by the VM system.
+ @result An IOReturn code. */ + + virtual IOReturn setPurgeable( IOOptionBits newState, + IOOptionBits * oldState ); + +/*! @function performOperation + @abstract Perform an operation on the memory descriptor's memory. + @discussion This method performs some operation on a range of the memory descriptor's memory. When a memory descriptor's memory is not mapped, it should be more efficient to use this method than mapping the memory to perform the operation virtually. + @param options The operation to perform on the memory:
+ kIOMemoryIncoherentIOFlush - pass this option to store to memory and flush any data in the processor cache for the memory range, with synchronization to ensure the data has passed through all levels of processor cache. It may not be supported on all architectures. This type of flush may be used for non-coherent I/O such as AGP - it is NOT required for PCI coherent operations. The memory descriptor must have been previously prepared.
+ kIOMemoryIncoherentIOStore - pass this option to store to memory any data in the processor cache for the memory range, with synchronization to ensure the data has passed through all levels of processor cache. It may not be supported on all architectures. This type of flush may be used for non-coherent I/O such as AGP - it is NOT required for PCI coherent operations. The memory descriptor must have been previously prepared. + @param offset A byte offset into the memory descriptor's memory. + @param length The length of the data range. + @result An IOReturn code. */ + + virtual IOReturn performOperation( IOOptionBits options, + IOByteCount offset, IOByteCount length ); + + // Used for dedicated communications for IODMACommand + virtual IOReturn dmaCommandOperation(DMACommandOps op, void *vData, UInt dataSize) const; + +/*! @function getPhysicalSegment + @abstract Break a memory descriptor into its physically contiguous segments. + @discussion This method returns the physical address of the byte at the given offset into the memory, and optionally the length of the physically contiguous segment from that offset. + @param offset A byte offset into the memory whose physical address to return. + @param length If non-zero, getPhysicalSegment will store here the length of the physically contiguous segement at the given offset. + @result A physical address, or zero if the offset is beyond the length of the memory. */ + +#ifdef __LP64__ + virtual addr64_t getPhysicalSegment( IOByteCount offset, + IOByteCount * length, + IOOptionBits options = 0 ) = 0; +#else /* !__LP64__ */ + virtual addr64_t getPhysicalSegment( IOByteCount offset, + IOByteCount * length, + IOOptionBits options ); +#endif /* !__LP64__ */ + + virtual uint64_t getPreparationID( void ); + +private: + OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 0); +#ifdef __LP64__ + OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 1); + OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 2); + OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 3); + OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 4); + OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 5); + OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 6); + OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 7); +#else /* !__LP64__ */ + OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 1); + OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 2); + OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 3); + OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 4); + OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 5); + OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 6); + OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 7); +#endif /* !__LP64__ */ + OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 8); + OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 9); + OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 10); + OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 11); + OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 12); + OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 13); + OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 14); + OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 15); + +protected: + virtual void free(); +public: + static void initialize( void ); + +public: +/*! @function withAddress + @abstract Create an IOMemoryDescriptor to describe one virtual range of the kernel task. + @discussion This method creates and initializes an IOMemoryDescriptor for memory consisting of a single virtual memory range mapped into the kernel map. This memory descriptor needs to be prepared before it can be used to extract data from the memory described. + @param address The virtual address of the first byte in the memory. + @param withLength The length of memory. + @param withDirection An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. + @result The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure. */ + + static IOMemoryDescriptor * withAddress(void * address, + IOByteCount withLength, + IODirection withDirection); + +#ifndef __LP64__ + static IOMemoryDescriptor * withAddress(IOVirtualAddress address, + IOByteCount withLength, + IODirection withDirection, + task_t withTask) APPLE_KEXT_DEPRECATED; /* use withAddressRange() and prepare() instead */ +#endif /* !__LP64__ */ + +/*! @function withPhysicalAddress + @abstract Create an IOMemoryDescriptor to describe one physical range. + @discussion This method creates and initializes an IOMemoryDescriptor for memory consisting of a single physical memory range. + @param address The physical address of the first byte in the memory. + @param withLength The length of memory. + @param withDirection An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. + @result The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure. */ + + static IOMemoryDescriptor * withPhysicalAddress( + IOPhysicalAddress address, + IOByteCount withLength, + IODirection withDirection ); + +#ifndef __LP64__ + static IOMemoryDescriptor * withRanges(IOVirtualRange * ranges, + UInt32 withCount, + IODirection withDirection, + task_t withTask, + bool asReference = false) APPLE_KEXT_DEPRECATED; /* use withAddressRanges() instead */ +#endif /* !__LP64__ */ + +/*! @function withAddressRange + @abstract Create an IOMemoryDescriptor to describe one virtual range of the specified map. + @discussion This method creates and initializes an IOMemoryDescriptor for memory consisting of a single virtual memory range mapped into the specified map. This memory descriptor needs to be prepared before it can be used to extract data from the memory described. + @param address The virtual address of the first byte in the memory. + @param withLength The length of memory. + @param options + kIOMemoryDirectionMask (options:direction) This nibble indicates the I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. + @param task The task the virtual ranges are mapped into. Note that unlike IOMemoryDescriptor::withAddress(), kernel_task memory must be explicitly prepared when passed to this api. + @result The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure. */ + + static IOMemoryDescriptor * withAddressRange( + mach_vm_address_t address, + mach_vm_size_t length, + IOOptionBits options, + task_t task); + +/*! @function withAddressRanges + @abstract Create an IOMemoryDescriptor to describe one or more virtual ranges. + @discussion This method creates and initializes an IOMemoryDescriptor for memory consisting of an array of virtual memory ranges each mapped into a specified source task. This memory descriptor needs to be prepared before it can be used to extract data from the memory described. + @param ranges An array of IOAddressRange structures which specify the virtual ranges in the specified map which make up the memory to be described. IOAddressRange is the 64bit version of IOVirtualRange. + @param rangeCount The member count of the ranges array. + @param options + kIOMemoryDirectionMask (options:direction) This nibble indicates the I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. + kIOMemoryAsReference For options:type = Virtual or Physical this indicate that the memory descriptor need not copy the ranges array into local memory. This is an optimisation to try to minimise unnecessary allocations. + @param task The task each of the virtual ranges are mapped into. Note that unlike IOMemoryDescriptor::withAddress(), kernel_task memory must be explicitly prepared when passed to this api. + @result The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure. */ + + static IOMemoryDescriptor * withAddressRanges( + IOAddressRange * ranges, + UInt32 rangeCount, + IOOptionBits options, + task_t task); + +/*! @function withOptions + @abstract Master initialiser for all variants of memory descriptors. + @discussion This method creates and initializes an IOMemoryDescriptor for memory it has three main variants: Virtual, Physical & mach UPL. These variants are selected with the options parameter, see below. This memory descriptor needs to be prepared before it can be used to extract data from the memory described. + + + @param buffers A pointer to an array of IOAddressRange when options:type is kIOMemoryTypeVirtual64 or kIOMemoryTypePhysical64 or a 64bit kernel. For type UPL it is a upl_t returned by the mach/memory_object_types.h apis, primarily used internally by the UBC. IOVirtualRanges or IOPhysicalRanges are 32 bit only types for use when options:type is kIOMemoryTypeVirtual or kIOMemoryTypePhysical on 32bit kernels. + + @param count options:type = Virtual or Physical count contains a count of the number of entires in the buffers array. For options:type = UPL this field contains a total length. + + @param offset Only used when options:type = UPL, in which case this field contains an offset for the memory within the buffers upl. + + @param task Only used options:type = Virtual, The task each of the virtual ranges are mapped into. + + @param options + kIOMemoryDirectionMask (options:direction) This nibble indicates the I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. + kIOMemoryTypeMask (options:type) kIOMemoryTypeVirtual64, kIOMemoryTypeVirtual, kIOMemoryTypePhysical64, kIOMemoryTypePhysical, kIOMemoryTypeUPL Indicates that what type of memory basic memory descriptor to use. This sub-field also controls the interpretation of the buffers, count, offset & task parameters. + kIOMemoryAsReference For options:type = Virtual or Physical this indicate that the memory descriptor need not copy the ranges array into local memory. This is an optimisation to try to minimise unnecessary allocations. + kIOMemoryBufferPageable Only used by the IOBufferMemoryDescriptor as an indication that the kernel virtual memory is in fact pageable and we need to use the kernel pageable submap rather than the default map. + + @param mapper Which IOMapper should be used to map the in-memory physical addresses into I/O space addresses. Defaults to 0 which indicates that the system mapper is to be used, if present. + + @result The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure. */ + + static IOMemoryDescriptor *withOptions(void * buffers, + UInt32 count, + UInt32 offset, + task_t task, + IOOptionBits options, + IOMapper * mapper = kIOMapperSystem); + +#ifndef __LP64__ + static IOMemoryDescriptor * withPhysicalRanges( + IOPhysicalRange * ranges, + UInt32 withCount, + IODirection withDirection, + bool asReference = false) APPLE_KEXT_DEPRECATED; /* use withOptions() and kIOMemoryTypePhysical instead */ +#endif /* !__LP64__ */ + +#ifndef __LP64__ + static IOMemoryDescriptor * withSubRange(IOMemoryDescriptor *of, + IOByteCount offset, + IOByteCount length, + IODirection withDirection) APPLE_KEXT_DEPRECATED; /* use IOSubMemoryDescriptor::withSubRange() and kIOMemoryThreadSafe instead */ +#endif /* !__LP64__ */ + +/*! @function withPersistentMemoryDescriptor + @abstract Copy constructor that generates a new memory descriptor if the backing memory for the same task's virtual address and length has changed. + @discussion If the original memory descriptor's address and length is still backed by the same real memory, i.e. the user hasn't deallocated and the reallocated memory at the same address then the original memory descriptor is returned with a additional reference. Otherwise we build a totally new memory descriptor with the same characteristics as the previous one but with a new view of the vm. Note not legal to call this function with anything except an IOGeneralMemoryDescriptor that was created with the kIOMemoryPersistent option. + @param originalMD The memory descriptor to be duplicated. + @result Either the original memory descriptor with an additional retain or a new memory descriptor, 0 for a bad original memory descriptor or some other resource shortage. */ + static IOMemoryDescriptor * + withPersistentMemoryDescriptor(IOMemoryDescriptor *originalMD); + +#ifndef __LP64__ + // obsolete initializers + // - initWithOptions is the designated initializer + virtual bool initWithAddress(void * address, + IOByteCount withLength, + IODirection withDirection) APPLE_KEXT_DEPRECATED; /* use initWithOptions() instead */ + virtual bool initWithAddress(IOVirtualAddress address, + IOByteCount withLength, + IODirection withDirection, + task_t withTask) APPLE_KEXT_DEPRECATED; /* use initWithOptions() instead */ + virtual bool initWithPhysicalAddress( + IOPhysicalAddress address, + IOByteCount withLength, + IODirection withDirection ) APPLE_KEXT_DEPRECATED; /* use initWithOptions() instead */ + virtual bool initWithRanges(IOVirtualRange * ranges, + UInt32 withCount, + IODirection withDirection, + task_t withTask, + bool asReference = false) APPLE_KEXT_DEPRECATED; /* use initWithOptions() instead */ + virtual bool initWithPhysicalRanges(IOPhysicalRange * ranges, + UInt32 withCount, + IODirection withDirection, + bool asReference = false) APPLE_KEXT_DEPRECATED; /* use initWithOptions() instead */ +#endif /* __LP64__ */ + +/*! @function getDirection + @abstract Accessor to get the direction the memory descriptor was created with. + @discussion This method returns the direction the memory descriptor was created with. + @result The direction. */ + + virtual IODirection getDirection() const; + +/*! @function getLength + @abstract Accessor to get the length of the memory descriptor (over all its ranges). + @discussion This method returns the total length of the memory described by the descriptor, ie. the sum of its ranges' lengths. + @result The byte count. */ + + virtual IOByteCount getLength() const; + +/*! @function setTag + @abstract Set the tag for the memory descriptor. + @discussion This method sets the tag for the memory descriptor. Tag bits are not interpreted by IOMemoryDescriptor. + @param tag The tag. */ + + virtual void setTag( IOOptionBits tag ); + +/*! @function getTag + @abstract Accessor to the retrieve the tag for the memory descriptor. + @discussion This method returns the tag for the memory descriptor. Tag bits are not interpreted by IOMemoryDescriptor. + @result The tag. */ + + virtual IOOptionBits getTag( void ); + +/*! @function readBytes + @abstract Copy data from the memory descriptor's buffer to the specified buffer. + @discussion This method copies data from the memory descriptor's memory at the given offset, to the caller's buffer. The memory descriptor MUST have the kIODirectionOut direcction bit set and be prepared. kIODirectionOut means that this memory descriptor will be output to an external device, so readBytes is used to get memory into a local buffer for a PIO transfer to the device. + @param offset A byte offset into the memory descriptor's memory. + @param bytes The caller supplied buffer to copy the data to. + @param withLength The length of the data to copy. + @result The number of bytes copied, zero will be returned if the specified offset is beyond the length of the descriptor. Development/debug kernel builds will assert if the offset is beyond the length of the descriptor. */ + + virtual IOByteCount readBytes(IOByteCount offset, + void * bytes, IOByteCount withLength); + +/*! @function writeBytes + @abstract Copy data to the memory descriptor's buffer from the specified buffer. + @discussion This method copies data to the memory descriptor's memory at the given offset, from the caller's buffer. The memory descriptor MUST have the kIODirectionIn direcction bit set and be prepared. kIODirectionIn means that this memory descriptor will be input from an external device, so writeBytes is used to write memory into the descriptor for PIO drivers. + @param offset A byte offset into the memory descriptor's memory. + @param bytes The caller supplied buffer to copy the data from. + @param withLength The length of the data to copy. + @result The number of bytes copied, zero will be returned if the specified offset is beyond the length of the descriptor. Development/debug kernel builds will assert if the offset is beyond the length of the descriptor. */ + + virtual IOByteCount writeBytes(IOByteCount offset, + const void * bytes, IOByteCount withLength); + +#ifndef __LP64__ + virtual IOPhysicalAddress getPhysicalSegment(IOByteCount offset, + IOByteCount * length); +#endif /* !__LP64__ */ + +/*! @function getPhysicalAddress + @abstract Return the physical address of the first byte in the memory. + @discussion This method returns the physical address of the first byte in the memory. It is most useful on memory known to be physically contiguous. + @result A physical address. */ + + IOPhysicalAddress getPhysicalAddress(); + +#ifndef __LP64__ + virtual void * getVirtualSegment(IOByteCount offset, + IOByteCount * length) APPLE_KEXT_DEPRECATED; /* use map() and getVirtualAddress() instead */ +#endif /* !__LP64__ */ + +/*! @function prepare + @abstract Prepare the memory for an I/O transfer. + @discussion This involves paging in the memory, if necessary, and wiring it down for the duration of the transfer. The complete() method completes the processing of the memory after the I/O transfer finishes. Note that the prepare call is not thread safe and it is expected that the client will more easily be able to guarantee single threading a particular memory descriptor. + @param forDirection The direction of the I/O just completed, or kIODirectionNone for the direction specified by the memory descriptor. + @result An IOReturn code. */ + + virtual IOReturn prepare(IODirection forDirection = kIODirectionNone) = 0; + +/*! @function complete + @abstract Complete processing of the memory after an I/O transfer finishes. + @discussion This method should not be called unless a prepare was previously issued; the prepare() and complete() must occur in pairs, before and after an I/O transfer involving pageable memory. In 10.3 or greater systems the direction argument to complete is not longer respected. The direction is totally determined at prepare() time. + @param forDirection DEPRECATED The direction of the I/O just completed, or kIODirectionNone for the direction specified by the memory descriptor. + @result An IOReturn code. */ + + virtual IOReturn complete(IODirection forDirection = kIODirectionNone) = 0; + + /* + * Mapping functions. + */ + +/*! @function createMappingInTask + @abstract Maps a IOMemoryDescriptor into a task. + @discussion This is the general purpose method to map all or part of the memory described by a memory descriptor into a task at any available address, or at a fixed address if possible. Caching & read-only options may be set for the mapping. The mapping is represented as a returned reference to a IOMemoryMap object, which may be shared if the mapping is compatible with an existing mapping of the IOMemoryDescriptor. The IOMemoryMap object returned should be released only when the caller has finished accessing the mapping, as freeing the object destroys the mapping. + @param intoTask Sets the target task for the mapping. Pass kernel_task for the kernel address space. + @param atAddress If a placed mapping is requested, atAddress specifies its address, and the kIOMapAnywhere should not be set. Otherwise, atAddress is ignored. + @param options Mapping options are defined in IOTypes.h,
+ kIOMapAnywhere should be passed if the mapping can be created anywhere. If not set, the atAddress parameter sets the location of the mapping, if it is available in the target map.
+ kIOMapDefaultCache to inhibit the cache in I/O areas, kIOMapCopybackCache in general purpose RAM.
+ kIOMapInhibitCache, kIOMapWriteThruCache, kIOMapCopybackCache to set the appropriate caching.
+ kIOMapReadOnly to allow only read only accesses to the memory - writes will cause and access fault.
+ kIOMapReference will only succeed if the mapping already exists, and the IOMemoryMap object is just an extra reference, ie. no new mapping will be created.
+ kIOMapUnique allows a special kind of mapping to be created that may be used with the IOMemoryMap::redirect() API. These mappings will not be shared as is the default - there will always be a unique mapping created for the caller, not an existing mapping with an extra reference.
+ @param offset Is a beginning offset into the IOMemoryDescriptor's memory where the mapping starts. Zero is the default to map all the memory. + @param length Is the length of the mapping requested for a subset of the IOMemoryDescriptor. Zero is the default to map all the memory. + @result A reference to an IOMemoryMap object representing the mapping, which can supply the virtual address of the mapping and other information. The mapping may be shared with multiple callers - multiple maps are avoided if a compatible one exists. The IOMemoryMap object returned should be released only when the caller has finished accessing the mapping, as freeing the object destroys the mapping. The IOMemoryMap instance also retains the IOMemoryDescriptor it maps while it exists. */ + + IOMemoryMap * createMappingInTask( + task_t intoTask, + mach_vm_address_t atAddress, + IOOptionBits options, + mach_vm_size_t offset = 0, + mach_vm_size_t length = 0 ); + +#ifndef __LP64__ + virtual IOMemoryMap * map( + task_t intoTask, + IOVirtualAddress atAddress, + IOOptionBits options, + IOByteCount offset = 0, + IOByteCount length = 0 ) APPLE_KEXT_DEPRECATED; /* use createMappingInTask() instead */ +#endif /* !__LP64__ */ + +/*! @function map + @abstract Maps a IOMemoryDescriptor into the kernel map. + @discussion This is a shortcut method to map all the memory described by a memory descriptor into the kernel map at any available address. See the full version of the createMappingInTask method for further details. + @param options Mapping options as in the full version of the createMappingInTask method, with kIOMapAnywhere assumed. + @result See the full version of the createMappingInTask method. */ + + virtual IOMemoryMap * map( + IOOptionBits options = 0 ); + +/*! @function setMapping + @abstract Establishes an already existing mapping. + @discussion This method tells the IOMemoryDescriptor about a mapping that exists, but was created elsewhere. It allows later callers of the map method to share this externally created mapping. The IOMemoryMap object returned is created to represent it. This method is not commonly needed. + @param task Address space in which the mapping exists. + @param mapAddress Virtual address of the mapping. + @param options Caching and read-only attributes of the mapping. + @result A IOMemoryMap object created to represent the mapping. */ + + virtual IOMemoryMap * setMapping( + task_t task, + IOVirtualAddress mapAddress, + IOOptionBits options = 0 ); + + // Following methods are private implementation + +#ifdef __LP64__ + virtual +#endif /* __LP64__ */ + IOReturn redirect( task_t safeTask, bool redirect ); + + IOReturn handleFault( + void * pager, + vm_map_t addressMap, + mach_vm_address_t address, + mach_vm_size_t sourceOffset, + mach_vm_size_t length, + IOOptionBits options ); + + virtual IOMemoryMap * makeMapping( + IOMemoryDescriptor * owner, + task_t intoTask, + IOVirtualAddress atAddress, + IOOptionBits options, + IOByteCount offset, + IOByteCount length ); + +protected: + virtual void addMapping( + IOMemoryMap * mapping ); + + virtual void removeMapping( + IOMemoryMap * mapping ); + + virtual IOReturn doMap( + vm_map_t addressMap, + IOVirtualAddress * atAddress, + IOOptionBits options, + IOByteCount sourceOffset = 0, + IOByteCount length = 0 ); + + virtual IOReturn doUnmap( + vm_map_t addressMap, + IOVirtualAddress logical, + IOByteCount length ); +}; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/*! @class IOMemoryMap : public OSObject + @abstract A class defining common methods for describing a memory mapping. + @discussion The IOMemoryMap object represents a mapped range of memory, described by a IOMemoryDescriptor. The mapping may be in the kernel or a non-kernel task and has processor cache mode attributes. IOMemoryMap instances are created by IOMemoryDescriptor when it creates mappings in its map method, and returned to the caller. */ + +class IOMemoryMap : public OSObject +{ + OSDeclareDefaultStructors(IOMemoryMap) + +protected: + virtual void taggedRelease(const void *tag = 0) const; + virtual void free(); + +public: +/*! @function getVirtualAddress + @abstract Accessor to the virtual address of the first byte in the mapping. + @discussion This method returns the virtual address of the first byte in the mapping. + @result A virtual address. */ + + virtual IOVirtualAddress getVirtualAddress(); + +/*! @function getPhysicalSegment + @abstract Break a mapping into its physically contiguous segments. + @discussion This method returns the physical address of the byte at the given offset into the mapping, and optionally the length of the physically contiguous segment from that offset. It functions similarly to IOMemoryDescriptor::getPhysicalSegment. + @param offset A byte offset into the mapping whose physical address to return. + @param length If non-zero, getPhysicalSegment will store here the length of the physically contiguous segement at the given offset. + @result A physical address, or zero if the offset is beyond the length of the mapping. */ + +#ifdef __LP64__ + virtual IOPhysicalAddress getPhysicalSegment(IOByteCount offset, + IOByteCount * length, + IOOptionBits options = 0); +#else /* !__LP64__ */ + virtual IOPhysicalAddress getPhysicalSegment(IOByteCount offset, + IOByteCount * length); +#endif /* !__LP64__ */ + +/*! @function getPhysicalAddress + @abstract Return the physical address of the first byte in the mapping. + @discussion This method returns the physical address of the first byte in the mapping. It is most useful on mappings known to be physically contiguous. + @result A physical address. */ + + IOPhysicalAddress getPhysicalAddress(); + +/*! @function getLength + @abstract Accessor to the length of the mapping. + @discussion This method returns the length of the mapping. + @result A byte count. */ + + virtual IOByteCount getLength(); + +/*! @function getAddressTask + @abstract Accessor to the task of the mapping. + @discussion This method returns the mach task the mapping exists in. + @result A mach task_t. */ + + virtual task_t getAddressTask(); + +/*! @function getMemoryDescriptor + @abstract Accessor to the IOMemoryDescriptor the mapping was created from. + @discussion This method returns the IOMemoryDescriptor the mapping was created from. + @result An IOMemoryDescriptor reference, which is valid while the IOMemoryMap object is retained. It should not be released by the caller. */ + + virtual IOMemoryDescriptor * getMemoryDescriptor(); + +/*! @function getMapOptions + @abstract Accessor to the options the mapping was created with. + @discussion This method returns the options to IOMemoryDescriptor::map the mapping was created with. + @result Options for the mapping, including cache settings. */ + + virtual IOOptionBits getMapOptions(); + +/*! @function unmap + @abstract Force the IOMemoryMap to unmap, without destroying the object. + @discussion IOMemoryMap instances will unmap themselves upon free, ie. when the last client with a reference calls release. This method forces the IOMemoryMap to destroy the mapping it represents, regardless of the number of clients. It is not generally used. + @result An IOReturn code. */ + + virtual IOReturn unmap(); + + virtual void taskDied(); + +/*! @function redirect + @abstract Replace the memory mapped in a process with new backing memory. + @discussion An IOMemoryMap created with the kIOMapUnique option to IOMemoryDescriptor::map() can remapped to a new IOMemoryDescriptor backing object. If the new IOMemoryDescriptor is specified as NULL, client access to the memory map is blocked until a new backing object has been set. By blocking access and copying data, the caller can create atomic copies of the memory while the client is potentially reading or writing the memory. + @param newBackingMemory The IOMemoryDescriptor that represents the physical memory that is to be now mapped in the virtual range the IOMemoryMap represents. If newBackingMemory is NULL, any access to the mapping will hang (in vm_fault()) until access has been restored by a new call to redirect() with non-NULL newBackingMemory argument. + @param options Mapping options are defined in IOTypes.h, and are documented in IOMemoryDescriptor::map() + @param offset As with IOMemoryDescriptor::map(), a beginning offset into the IOMemoryDescriptor's memory where the mapping starts. Zero is the default. + @result An IOReturn code. */ + +#ifndef __LP64__ +// For 32 bit XNU, there is a 32 bit (IOByteCount) and a 64 bit (mach_vm_size_t) interface; +// for 64 bit, these fall together on the 64 bit one. + virtual IOReturn redirect(IOMemoryDescriptor * newBackingMemory, + IOOptionBits options, + IOByteCount offset = 0); +#endif + virtual IOReturn redirect(IOMemoryDescriptor * newBackingMemory, + IOOptionBits options, + mach_vm_size_t offset = 0); + +#ifdef __LP64__ + inline mach_vm_address_t getAddress() __attribute__((always_inline)); + inline mach_vm_size_t getSize() __attribute__((always_inline)); +#else /* !__LP64__ */ + virtual mach_vm_address_t getAddress(); + virtual mach_vm_size_t getSize(); +#endif /* !__LP64__ */ + + + OSMetaClassDeclareReservedUnused(IOMemoryMap, 0); + OSMetaClassDeclareReservedUnused(IOMemoryMap, 1); + OSMetaClassDeclareReservedUnused(IOMemoryMap, 2); + OSMetaClassDeclareReservedUnused(IOMemoryMap, 3); + OSMetaClassDeclareReservedUnused(IOMemoryMap, 4); + OSMetaClassDeclareReservedUnused(IOMemoryMap, 5); + OSMetaClassDeclareReservedUnused(IOMemoryMap, 6); + OSMetaClassDeclareReservedUnused(IOMemoryMap, 7); +}; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#if !defined(__LP64) || defined(_IOMEMORYDESCRIPTOR_INTERNAL_) + +// The following classes are private implementation of IOMemoryDescriptor - they +// should not be referenced directly, just through the public API's in the +// IOMemoryDescriptor class. For example, an IOGeneralMemoryDescriptor instance +// might be created by IOMemoryDescriptor::withAddressRange(), but there should be +// no need to reference as anything but a generic IOMemoryDescriptor *. + +class IOGeneralMemoryDescriptor : public IOMemoryDescriptor +{ + OSDeclareDefaultStructors(IOGeneralMemoryDescriptor); + +public: + union Ranges { + IOVirtualRange *v; + IOAddressRange *v64; + IOPhysicalRange *p; + void *uio; + }; +protected: + Ranges _ranges; + unsigned _rangesCount; /* number of address ranges in list */ +#ifndef __LP64__ + bool _rangesIsAllocated; /* is list allocated by us? */ +#endif /* !__LP64__ */ + + task_t _task; /* task where all ranges are mapped to */ + + union { + IOVirtualRange v; + IOPhysicalRange p; + } _singleRange; /* storage space for a single range */ + + unsigned _wireCount; /* number of outstanding wires */ + +#ifndef __LP64__ + uintptr_t _cachedVirtualAddress; + + IOPhysicalAddress _cachedPhysicalAddress; +#endif /* !__LP64__ */ + + bool _initialized; /* has superclass been initialized? */ + +public: + virtual void free(); + + virtual IOReturn dmaCommandOperation(DMACommandOps op, void *vData, UInt dataSize) const; + + virtual uint64_t getPreparationID( void ); + +private: + +#ifndef __LP64__ + virtual void setPosition(IOByteCount position); + virtual void mapIntoKernel(unsigned rangeIndex); + virtual void unmapFromKernel(); +#endif /* !__LP64__ */ + + // Internal APIs may be made virtual at some time in the future. + IOReturn wireVirtual(IODirection forDirection); + void *createNamedEntry(); + + // Internal + OSData * _memoryEntries; + unsigned int _pages; + ppnum_t _highestPage; + uint32_t __iomd_reservedA; + uint32_t __iomd_reservedB; + + IOLock * _prepareLock; + +public: + /* + * IOMemoryDescriptor required methods + */ + + // Master initaliser + virtual bool initWithOptions(void * buffers, + UInt32 count, + UInt32 offset, + task_t task, + IOOptionBits options, + IOMapper * mapper = kIOMapperSystem); + +#ifndef __LP64__ + // Secondary initialisers + virtual bool initWithAddress(void * address, + IOByteCount withLength, + IODirection withDirection) APPLE_KEXT_DEPRECATED; + + virtual bool initWithAddress(IOVirtualAddress address, + IOByteCount withLength, + IODirection withDirection, + task_t withTask) APPLE_KEXT_DEPRECATED; + + virtual bool initWithPhysicalAddress( + IOPhysicalAddress address, + IOByteCount withLength, + IODirection withDirection ) APPLE_KEXT_DEPRECATED; + + virtual bool initWithRanges( IOVirtualRange * ranges, + UInt32 withCount, + IODirection withDirection, + task_t withTask, + bool asReference = false) APPLE_KEXT_DEPRECATED; + + virtual bool initWithPhysicalRanges(IOPhysicalRange * ranges, + UInt32 withCount, + IODirection withDirection, + bool asReference = false) APPLE_KEXT_DEPRECATED; + + virtual addr64_t getPhysicalSegment64( IOByteCount offset, + IOByteCount * length ) APPLE_KEXT_DEPRECATED; + + virtual IOPhysicalAddress getPhysicalSegment(IOByteCount offset, + IOByteCount * length); + + virtual IOPhysicalAddress getSourceSegment(IOByteCount offset, + IOByteCount * length) APPLE_KEXT_DEPRECATED; + + virtual void * getVirtualSegment(IOByteCount offset, + IOByteCount * length) APPLE_KEXT_DEPRECATED; +#endif /* !__LP64__ */ + + virtual IOReturn setPurgeable( IOOptionBits newState, + IOOptionBits * oldState ); + + virtual addr64_t getPhysicalSegment( IOByteCount offset, + IOByteCount * length, +#ifdef __LP64__ + IOOptionBits options = 0 ); +#else /* !__LP64__ */ + IOOptionBits options ); +#endif /* !__LP64__ */ + + virtual IOReturn prepare(IODirection forDirection = kIODirectionNone); + + virtual IOReturn complete(IODirection forDirection = kIODirectionNone); + + virtual IOReturn doMap( + vm_map_t addressMap, + IOVirtualAddress * atAddress, + IOOptionBits options, + IOByteCount sourceOffset = 0, + IOByteCount length = 0 ); + + virtual IOReturn doUnmap( + vm_map_t addressMap, + IOVirtualAddress logical, + IOByteCount length ); + + virtual bool serialize(OSSerialize *s) const; + + // Factory method for cloning a persistent IOMD, see IOMemoryDescriptor + static IOMemoryDescriptor * + withPersistentMemoryDescriptor(IOGeneralMemoryDescriptor *originalMD); + +}; + +#endif /* !defined(__LP64) || defined(_IOMEMORYDESCRIPTOR_INTERNAL_) */ + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifdef __LP64__ +mach_vm_address_t IOMemoryMap::getAddress() +{ + return (getVirtualAddress()); +} + +mach_vm_size_t IOMemoryMap::getSize() +{ + return (getLength()); +} +#else /* !__LP64__ */ +#include +#endif /* !__LP64__ */ + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#endif /* !_IOMEMORYDESCRIPTOR_H */ diff --git a/i386/include/IOKit/IOMessage.h b/i386/include/IOKit/IOMessage.h new file mode 100644 index 0000000..3ca9e1e --- /dev/null +++ b/i386/include/IOKit/IOMessage.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef __IOKIT_IOMESSAGE_H +#define __IOKIT_IOMESSAGE_H + +#include +#include + +typedef UInt32 IOMessage; + +#define iokit_common_msg(message) (UInt32)(sys_iokit|sub_iokit_common|message) +#define iokit_family_msg(sub,message) (UInt32)(sys_iokit|sub|message) + +/*! @defined iokit_vendor_specific_msg + @discussion iokit_vendor_specific_msg passes messages in the sub_iokit_vendor_specific + subsystem. It can be used to be generate messages that are used for private + communication between vendor specific code with the IOService::message() etc. APIs. +*/ +#define iokit_vendor_specific_msg(message) (UInt32)(sys_iokit|sub_iokit_vendor_specific|message) + +#define kIOMessageServiceIsTerminated iokit_common_msg(0x010) +#define kIOMessageServiceIsSuspended iokit_common_msg(0x020) +#define kIOMessageServiceIsResumed iokit_common_msg(0x030) + +#define kIOMessageServiceIsRequestingClose iokit_common_msg(0x100) +#define kIOMessageServiceIsAttemptingOpen iokit_common_msg(0x101) +#define kIOMessageServiceWasClosed iokit_common_msg(0x110) + +#define kIOMessageServiceBusyStateChange iokit_common_msg(0x120) + +#define kIOMessageServicePropertyChange iokit_common_msg(0x130) + +#define kIOMessageCanDevicePowerOff iokit_common_msg(0x200) +#define kIOMessageDeviceWillPowerOff iokit_common_msg(0x210) +#define kIOMessageDeviceWillNotPowerOff iokit_common_msg(0x220) +#define kIOMessageDeviceHasPoweredOn iokit_common_msg(0x230) +#define kIOMessageCanSystemPowerOff iokit_common_msg(0x240) +#define kIOMessageSystemWillPowerOff iokit_common_msg(0x250) +#define kIOMessageSystemWillNotPowerOff iokit_common_msg(0x260) +#define kIOMessageCanSystemSleep iokit_common_msg(0x270) +#define kIOMessageSystemWillSleep iokit_common_msg(0x280) +#define kIOMessageSystemWillNotSleep iokit_common_msg(0x290) +#define kIOMessageSystemHasPoweredOn iokit_common_msg(0x300) +#define kIOMessageSystemWillRestart iokit_common_msg(0x310) +#define kIOMessageSystemWillPowerOn iokit_common_msg(0x320) + +#define kIOMessageCopyClientID iokit_common_msg(0x330) + +#endif /* ! __IOKIT_IOMESSAGE_H */ diff --git a/i386/include/IOKit/IOMultiMemoryDescriptor.h b/i386/include/IOKit/IOMultiMemoryDescriptor.h new file mode 100644 index 0000000..42b19a4 --- /dev/null +++ b/i386/include/IOKit/IOMultiMemoryDescriptor.h @@ -0,0 +1,110 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOMULTIMEMORYDESCRIPTOR_H +#define _IOMULTIMEMORYDESCRIPTOR_H + +#include + +/*! @class IOMultiMemoryDescriptor : public IOMemoryDescriptor + @abstract The IOMultiMemoryDescriptor object describes a memory area made up of several other IOMemoryDescriptors. + @discussion The IOMultiMemoryDescriptor object represents multiple ranges of memory, specified as an ordered list of IOMemoryDescriptors. The descriptors are chained end-to-end to make up a single contiguous buffer. */ + +class IOMultiMemoryDescriptor : public IOMemoryDescriptor +{ + OSDeclareDefaultStructors(IOMultiMemoryDescriptor); + +protected: + + IOMemoryDescriptor ** _descriptors; + UInt32 _descriptorsCount; + bool _descriptorsIsAllocated; + + virtual void free(); + +public: + +/*! @function withDescriptors + @abstract Create an IOMultiMemoryDescriptor to describe a memory area made up of several other IOMemoryDescriptors. + @discussion This method creates and initializes an IOMultiMemoryDescriptor for memory consisting of a number of other IOMemoryDescriptors, chained end-to-end (in the order they appear in the array) to represent a single contiguous memory buffer. Passing the descriptor array as a reference will avoid an extra allocation. + @param descriptors An array of IOMemoryDescriptors which make up the memory to be described. + @param withCount The object count for the descriptors array. + @param withDirection An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. + @param asReference If false, the IOMultiMemoryDescriptor object will make a copy of the descriptors array, otherwise, the array will be used in situ, avoiding an extra allocation. + @result The created IOMultiMemoryDescriptor on success, to be released by the caller, or zero on failure. */ + + static IOMultiMemoryDescriptor * withDescriptors( + IOMemoryDescriptor ** descriptors, + UInt32 withCount, + IODirection withDirection, + bool asReference = false ); + +/*! @function withDescriptors + @abstract Initialize an IOMultiMemoryDescriptor to describe a memory area made up of several other IOMemoryDescriptors. + @discussion This method initializes an IOMultiMemoryDescriptor for memory consisting of a number of other IOMemoryDescriptors, chained end-to-end (in the order they appear in the array) to represent a single contiguous memory buffer. Passing the descriptor array as a reference will avoid an extra allocation. + @param descriptors An array of IOMemoryDescriptors which make up the memory to be described. + @param withCount The object count for the descriptors array. + @param withDirection An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. + @param asReference If false, the IOMultiMemoryDescriptor object will make a copy of the descriptors array, otherwise, the array will be used in situ, avoiding an extra allocation. + @result The created IOMultiMemoryDescriptor on success, to be released by the caller, or zero on failure. */ + + virtual bool initWithDescriptors( + IOMemoryDescriptor ** descriptors, + UInt32 withCount, + IODirection withDirection, + bool asReference = false ); + +/*! @function getPhysicalSegment + @abstract Break a memory descriptor into its physically contiguous segments. + @discussion This method returns the physical address of the byte at the given offset into the memory, and optionally the length of the physically contiguous segment from that offset. + @param offset A byte offset into the memory whose physical address to return. + @param length If non-zero, getPhysicalSegment will store here the length of the physically contiguous segement at the given offset. + @result A physical address, or zero if the offset is beyond the length of the memory. */ + + virtual addr64_t getPhysicalSegment( IOByteCount offset, + IOByteCount * length, + IOOptionBits options = 0 ); + +/*! @function prepare + @abstract Prepare the memory for an I/O transfer. + @discussion This involves paging in the memory, if necessary, and wiring it down for the duration of the transfer. The complete() method completes the processing of the memory after the I/O transfer finishes. This method needn't called for non-pageable memory. + @param forDirection The direction of the I/O just completed, or kIODirectionNone for the direction specified by the memory descriptor. + @result An IOReturn code. */ + + virtual IOReturn prepare(IODirection forDirection = kIODirectionNone); + +/*! @function complete + @abstract Complete processing of the memory after an I/O transfer finishes. + @discussion This method should not be called unless a prepare was previously issued; the prepare() and complete() must occur in pairs, before and after an I/O transfer involving pageable memory. + @param forDirection The direction of the I/O just completed, or kIODirectionNone for the direction specified by the memory descriptor. + @result An IOReturn code. */ + + virtual IOReturn complete(IODirection forDirection = kIODirectionNone); +}; + +#endif /* !_IOMULTIMEMORYDESCRIPTOR_H */ diff --git a/i386/include/IOKit/IONVRAM.h b/i386/include/IOKit/IONVRAM.h new file mode 100644 index 0000000..a9337bd --- /dev/null +++ b/i386/include/IOKit/IONVRAM.h @@ -0,0 +1,167 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IONVRAM_H +#define _IOKIT_IONVRAM_H + +#include +#include +#include +#include + + +#define kIODTNVRAMOFPartitionName "common" +#define kIODTNVRAMXPRAMPartitionName "APL,MacOS75" +#define kIODTNVRAMPanicInfoPartitonName "APL,OSXPanic" +#define kIODTNVRAMFreePartitionName "wwwwwwwwwwww" + +enum { + kIODTNVRAMImageSize = 0x2000, + kIODTNVRAMXPRAMSize = 0x0100, + kIODTNVRAMNameRegistrySize = 0x0400 +}; + +enum { + kOFVariableTypeBoolean = 1, + kOFVariableTypeNumber, + kOFVariableTypeString, + kOFVariableTypeData +}; + +enum { + kOFVariablePermRootOnly = 0, + kOFVariablePermUserRead, + kOFVariablePermUserWrite, + kOFVariablePermKernelOnly +}; + +class IODTNVRAM : public IOService +{ + OSDeclareDefaultStructors(IODTNVRAM); + +private: + IONVRAMController *_nvramController; + const OSSymbol *_registryPropertiesKey; + UInt8 *_nvramImage; + bool _nvramImageDirty; + UInt32 _ofPartitionOffset; + UInt32 _ofPartitionSize; + UInt8 *_ofImage; + bool _ofImageDirty; + OSDictionary *_ofDict; + OSDictionary *_nvramPartitionOffsets; + OSDictionary *_nvramPartitionLengths; + UInt32 _xpramPartitionOffset; + UInt32 _xpramPartitionSize; + UInt8 *_xpramImage; + UInt32 _nrPartitionOffset; + UInt32 _nrPartitionSize; + UInt8 *_nrImage; + UInt32 _piPartitionOffset; + UInt32 _piPartitionSize; + UInt8 *_piImage; + bool _systemPaniced; + + virtual UInt8 calculatePartitionChecksum(UInt8 *partitionHeader); + virtual IOReturn initOFVariables(void); +public: + virtual IOReturn syncOFVariables(void); +private: + virtual UInt32 getOFVariableType(const OSSymbol *propSymbol) const; + virtual UInt32 getOFVariablePerm(const OSSymbol *propSymbol) const; + virtual bool getOWVariableInfo(UInt32 variableNumber, const OSSymbol **propSymbol, + UInt32 *propType, UInt32 *propOffset); + virtual bool convertPropToObject(UInt8 *propName, UInt32 propNameLength, + UInt8 *propData, UInt32 propDataLength, + const OSSymbol **propSymbol, + OSObject **propObject); + virtual bool convertObjectToProp(UInt8 *buffer, UInt32 *length, + const OSSymbol *propSymbol, OSObject *propObject); + virtual UInt16 generateOWChecksum(UInt8 *buffer); + virtual bool validateOWChecksum(UInt8 *buffer); + virtual void updateOWBootArgs(const OSSymbol *key, OSObject *value); + virtual bool searchNVRAMProperty(struct IONVRAMDescriptor *hdr, + UInt32 *where); + + virtual IOReturn readNVRAMPropertyType0(IORegistryEntry *entry, + const OSSymbol **name, + OSData **value); + virtual IOReturn writeNVRAMPropertyType0(IORegistryEntry *entry, + const OSSymbol *name, + OSData * value); + + virtual OSData *unescapeBytesToData(const UInt8 *bytes, UInt32 length); + virtual OSData *escapeDataToData(OSData * value); + + virtual IOReturn readNVRAMPropertyType1(IORegistryEntry *entry, + const OSSymbol **name, + OSData **value); + virtual IOReturn writeNVRAMPropertyType1(IORegistryEntry *entry, + const OSSymbol *name, + OSData *value); + +public: + virtual bool init(IORegistryEntry *old, const IORegistryPlane *plane); + + virtual void registerNVRAMController(IONVRAMController *nvram); + + virtual void sync(void); + + virtual bool serializeProperties(OSSerialize *s) const; + virtual OSObject *getProperty(const OSSymbol *aKey) const; + virtual OSObject *getProperty(const char *aKey) const; + virtual bool setProperty(const OSSymbol *aKey, OSObject *anObject); + virtual void removeProperty(const OSSymbol *aKey); + virtual IOReturn setProperties(OSObject *properties); + + virtual IOReturn readXPRAM(IOByteCount offset, UInt8 *buffer, + IOByteCount length); + virtual IOReturn writeXPRAM(IOByteCount offset, UInt8 *buffer, + IOByteCount length); + + virtual IOReturn readNVRAMProperty(IORegistryEntry *entry, + const OSSymbol **name, + OSData **value); + virtual IOReturn writeNVRAMProperty(IORegistryEntry *entry, + const OSSymbol *name, + OSData *value); + + virtual OSDictionary *getNVRAMPartitions(void); + + virtual IOReturn readNVRAMPartition(const OSSymbol *partitionID, + IOByteCount offset, UInt8 *buffer, + IOByteCount length); + + virtual IOReturn writeNVRAMPartition(const OSSymbol *partitionID, + IOByteCount offset, UInt8 *buffer, + IOByteCount length); + + virtual IOByteCount savePanicInfo(UInt8 *buffer, IOByteCount length); +}; + +#endif /* !_IOKIT_IONVRAM_H */ diff --git a/i386/include/IOKit/IONotifier.h b/i386/include/IOKit/IONotifier.h new file mode 100644 index 0000000..8f4378a --- /dev/null +++ b/i386/include/IOKit/IONotifier.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + +#ifndef _IOKIT_IONOTIFIER_H +#define _IOKIT_IONOTIFIER_H + +#include + +/*! @class IONotifier : public OSObject + @abstract An abstract base class defining common methods for controlling a notification request. + @discussion IOService notification requests are represented as implementations of the IONotifier object. It defines methods to enable, disable and remove notification requests. These actions are synchronized with invocations of the notification handler, so removing a notification request will guarantee the handler is not being executed. */ + +class IONotifier : public OSObject +{ + OSDeclareAbstractStructors(IONotifier) + +public: + +/*! @function remove + @abstract Removes the notification request and releases it. + @discussion Removes the notification request and release it. Since creating an IONotifier instance will leave it with a retain count of one, creating an IONotifier and then removing it will destroy it. This method is synchronous with any handler invocations, so when this method returns its guaranteed the handler will not be in entered. */ + + virtual void remove() = 0; + +/*! @function disable + @abstract Disables the notification request. + @discussion Disables the notification request. This method is synchronous with any handler invocations, so when this method returns its guaranteed the handler will not be in entered. + @result Returns the previous enable state of the IONotifier. */ + + virtual bool disable() = 0; + +/*! @function enable + @abstract Sets the enable state of the notification request. + @discussion Restores the enable state of the notification request, given the previous state passed in. + @param was The enable state of the notifier to restore. */ + + virtual void enable( bool was ) = 0; + +}; + +#endif /* ! _IOKIT_IONOTIFIER_H */ diff --git a/i386/include/IOKit/IOPlatformExpert.h b/i386/include/IOKit/IOPlatformExpert.h new file mode 100644 index 0000000..f75a3e3 --- /dev/null +++ b/i386/include/IOKit/IOPlatformExpert.h @@ -0,0 +1,318 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_IOPLATFORMEXPERT_H +#define _IOKIT_IOPLATFORMEXPERT_H + +#ifdef __cplusplus +#include +#include +#include +#include + +extern "C" { +#endif + +#include + +extern boolean_t PEGetMachineName( char * name, int maxLength ); +extern boolean_t PEGetModelName( char * name, int maxLength ); +extern int PEGetPlatformEpoch( void ); + +enum { + kPEHaltCPU, + kPERestartCPU, + kPEHangCPU, + kPEUPSDelayHaltCPU, + kPEPanicRestartCPU, + kPEPanicSync +}; +extern int (*PE_halt_restart)(unsigned int type); +extern int PEHaltRestart(unsigned int type); + +// Save the Panic Info. Returns the number of bytes saved. +extern UInt32 PESavePanicInfo(UInt8 *buffer, UInt32 length); + +extern long PEGetGMTTimeOfDay( void ); +extern void PESetGMTTimeOfDay( long secs ); + +#ifdef __cplusplus +} /* extern "C" */ + +#define kIOPlatformMapperPresentKey "IOPlatformMapperPresent" + + +extern OSSymbol * gPlatformInterruptControllerName; + +extern const OSSymbol * gIOPlatformSleepActionKey; +extern const OSSymbol * gIOPlatformWakeActionKey; +extern const OSSymbol * gIOPlatformQuiesceActionKey; +extern const OSSymbol * gIOPlatformActiveActionKey; + +class IORangeAllocator; +class IONVRAMController; +class IOPMrootDomain; + +class IOPlatformExpert : public IOService +{ + OSDeclareDefaultStructors(IOPlatformExpert); + +private: + long _peBootROMType; + long _peChipSetType; + long _peMachineType; + +protected: + IOPMrootDomain * root; + int _pePMFeatures; + int _pePrivPMFeatures; + int _peNumBatteriesSupported; + OSArray * thePowerTree; + + bool searchingForAdditionalParents; + OSNumber * multipleParentKeyValue; + int numInstancesRegistered; + + struct ExpansionData { }; + ExpansionData *reserved; + + virtual void setBootROMType(long peBootROMType); + virtual void setChipSetType(long peChipSetType); + virtual void setMachineType(long peMachineType); + + virtual bool CheckSubTree (OSArray * inSubTree, IOService * theNub, IOService * theDevice, OSDictionary * theParent); + virtual bool RegisterServiceInTree (IOService * theService, OSDictionary * theTreeNode, OSDictionary * theTreeParentNode, IOService * theProvider); + + virtual void PMInstantiatePowerDomains ( void ); + +public: + virtual bool attach( IOService * provider ); + virtual bool start( IOService * provider ); + virtual bool configure( IOService * provider ); + virtual IOService * createNub( OSDictionary * from ); + + virtual bool compareNubName( const IOService * nub, OSString * name, + OSString ** matched = 0 ) const; + virtual IOReturn getNubResources( IOService * nub ); + + virtual long getBootROMType(void); + virtual long getChipSetType(void); + virtual long getMachineType(void); + + virtual bool getModelName( char * name, int maxLength ); + virtual bool getMachineName( char * name, int maxLength ); + + virtual int haltRestart(unsigned int type); + virtual void sleepKernel(void); + + virtual long getGMTTimeOfDay( void ); + virtual void setGMTTimeOfDay( long secs ); + + virtual IOReturn getConsoleInfo( PE_Video * consoleInfo ); + virtual IOReturn setConsoleInfo( PE_Video * consoleInfo, unsigned int op ); + + virtual void registerNVRAMController( IONVRAMController * nvram ); + + virtual IOReturn registerInterruptController(OSSymbol *name, IOInterruptController *interruptController); + virtual IOInterruptController *lookUpInterruptController(OSSymbol *name); + virtual void setCPUInterruptProperties(IOService *service); + virtual bool atInterruptLevel(void); + + virtual IOReturn callPlatformFunction(const OSSymbol *functionName, + bool waitForFunction, + void *param1, void *param2, + void *param3, void *param4); + + virtual IORangeAllocator * getPhysicalRangeAllocator(void); + + virtual bool platformAdjustService(IOService *service); + + virtual void PMRegisterDevice(IOService * theNub, IOService * theDevice); + virtual void PMLog ( const char *,unsigned long, unsigned long, unsigned long ); + + virtual bool hasPMFeature (unsigned long featureMask); + virtual bool hasPrivPMFeature (unsigned long privFeatureMask); + virtual int numBatteriesSupported (void); + + virtual IOByteCount savePanicInfo(UInt8 *buffer, IOByteCount length); + + virtual OSString* createSystemSerialNumberString(OSData* myProperty); + + OSMetaClassDeclareReservedUsed(IOPlatformExpert, 0); + OSMetaClassDeclareReservedUsed(IOPlatformExpert, 1); + OSMetaClassDeclareReservedUnused(IOPlatformExpert, 2); + OSMetaClassDeclareReservedUnused(IOPlatformExpert, 3); + OSMetaClassDeclareReservedUnused(IOPlatformExpert, 4); + OSMetaClassDeclareReservedUnused(IOPlatformExpert, 5); + OSMetaClassDeclareReservedUnused(IOPlatformExpert, 6); + OSMetaClassDeclareReservedUnused(IOPlatformExpert, 7); + OSMetaClassDeclareReservedUnused(IOPlatformExpert, 8); + OSMetaClassDeclareReservedUnused(IOPlatformExpert, 9); + OSMetaClassDeclareReservedUnused(IOPlatformExpert, 10); + OSMetaClassDeclareReservedUnused(IOPlatformExpert, 11); +}; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +class IODTNVRAM; + +class IODTPlatformExpert : public IOPlatformExpert +{ + OSDeclareAbstractStructors(IODTPlatformExpert); + +private: + IODTNVRAM *dtNVRAM; + + struct ExpansionData { }; + ExpansionData *reserved; + +public: + virtual IOService * probe( IOService * provider, + SInt32 * score ); + virtual bool configure( IOService * provider ); + + virtual void processTopLevel( IORegistryEntry * root ); + virtual const char * deleteList( void ) = 0; + virtual const char * excludeList( void ) = 0; + virtual IOService * createNub( IORegistryEntry * from ); + virtual bool createNubs( IOService * parent, OSIterator * iter ); + + virtual bool compareNubName( const IOService * nub, OSString * name, + OSString ** matched = 0 ) const; + + virtual IOReturn getNubResources( IOService * nub ); + + virtual bool getModelName( char * name, int maxLength ); + virtual bool getMachineName( char * name, int maxLength ); + + virtual void registerNVRAMController( IONVRAMController * nvram ); + + virtual int haltRestart(unsigned int type); + + /* virtual */ IOReturn readXPRAM(IOByteCount offset, UInt8 * buffer, + IOByteCount length); + + /* virtual */ IOReturn writeXPRAM(IOByteCount offset, UInt8 * buffer, + IOByteCount length); + + virtual IOReturn readNVRAMProperty( + IORegistryEntry * entry, + const OSSymbol ** name, OSData ** value ); + + virtual IOReturn writeNVRAMProperty( + IORegistryEntry * entry, + const OSSymbol * name, OSData * value ); + + // This returns a dictionary describing all the NVRAM partitions. + // The keys will be the partitionIDs of the form "0x52,nvram". + // The values will be OSNumbers of the partition's byte count. + /* virtual */ OSDictionary *getNVRAMPartitions(void); + + /* virtual */ IOReturn readNVRAMPartition(const OSSymbol * partitionID, + IOByteCount offset, UInt8 * buffer, + IOByteCount length); + + /* virtual */ IOReturn writeNVRAMPartition(const OSSymbol * partitionID, + IOByteCount offset, UInt8 * buffer, + IOByteCount length); + + virtual IOByteCount savePanicInfo(UInt8 *buffer, IOByteCount length); + virtual OSString* createSystemSerialNumberString(OSData* myProperty); + + OSMetaClassDeclareReservedUnused(IODTPlatformExpert, 0); + OSMetaClassDeclareReservedUnused(IODTPlatformExpert, 1); + OSMetaClassDeclareReservedUnused(IODTPlatformExpert, 2); + OSMetaClassDeclareReservedUnused(IODTPlatformExpert, 3); + OSMetaClassDeclareReservedUnused(IODTPlatformExpert, 4); + OSMetaClassDeclareReservedUnused(IODTPlatformExpert, 5); + OSMetaClassDeclareReservedUnused(IODTPlatformExpert, 6); + OSMetaClassDeclareReservedUnused(IODTPlatformExpert, 7); +}; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* generic root nub of service tree */ + +class IOPlatformExpertDevice : public IOService +{ + OSDeclareDefaultStructors(IOPlatformExpertDevice) + +private: + IOWorkLoop *workLoop; + + struct ExpansionData { }; + ExpansionData *reserved; + +public: + virtual bool initWithArgs( void * p1, void * p2, + void * p3, void *p4 ); + virtual bool compareName( OSString * name, OSString ** matched = 0 ) const; + + virtual IOWorkLoop *getWorkLoop() const; + virtual IOReturn setProperties( OSObject * properties ); + + virtual void free(); + + OSMetaClassDeclareReservedUnused(IOPlatformExpertDevice, 0); + OSMetaClassDeclareReservedUnused(IOPlatformExpertDevice, 1); + OSMetaClassDeclareReservedUnused(IOPlatformExpertDevice, 2); + OSMetaClassDeclareReservedUnused(IOPlatformExpertDevice, 3); +}; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* generic nub for motherboard devices */ + +class IOPlatformDevice : public IOService +{ + OSDeclareDefaultStructors(IOPlatformDevice) + + struct ExpansionData { }; + ExpansionData *reserved; + +public: + virtual bool compareName( OSString * name, OSString ** matched = 0 ) const; + virtual IOService * matchLocation( IOService * client ); + virtual IOReturn getResources( void ); + + OSMetaClassDeclareReservedUnused(IOPlatformDevice, 0); + OSMetaClassDeclareReservedUnused(IOPlatformDevice, 1); + OSMetaClassDeclareReservedUnused(IOPlatformDevice, 2); + OSMetaClassDeclareReservedUnused(IOPlatformDevice, 3); +}; + +#endif /* __cplusplus */ + +#endif /* ! _IOKIT_IOPLATFORMEXPERT_H */ diff --git a/i386/include/IOKit/IORangeAllocator.h b/i386/include/IOKit/IORangeAllocator.h new file mode 100644 index 0000000..d81bbef --- /dev/null +++ b/i386/include/IOKit/IORangeAllocator.h @@ -0,0 +1,171 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999 Apple Computer, Inc. + * + * + * HISTORY + * + * sdouglas 05 Nov 99 - created. + */ + +#ifndef _IOKIT_IORANGEALLOCATOR_H +#define _IOKIT_IORANGEALLOCATOR_H + +#include +#include + +typedef IOByteCount IORangeScalar; + +/*! @class IORangeAllocator + @abstract A utility class to manage allocations from a range. + @discussion The IORangeAllocator class provides functions for allocating ranges, at a fixed or any offset, and freeing them back to a free list. It is useful for describing ranges of memory or address space without requiring storage in the memory - information describing the free elements is kept elsewhere. Ranges are described by a start offset and a size. IORangeAllocator is optionally protected against multithreaded access. +*/ + +class IORangeAllocator : public OSObject { + + OSDeclareDefaultStructors(IORangeAllocator) + +protected: + UInt32 numElements; + UInt32 capacity; + UInt32 capacityIncrement; + IORangeScalar defaultAlignmentMask; + IOOptionBits options; + + struct IORangeAllocatorElement * elements; + +private: + virtual bool allocElement( UInt32 index ); + + virtual void deallocElement( UInt32 index ); + +public: + enum { + kLocking = 0x00000001 + }; + +/*! @function init + @abstract Standard initializer for IORangeAllocator. + @discussion This method initializes an IORangeAllocator and optionally sets the free list to contain one fragment, from zero to an endOfRange parameter. The capacity in terms of free fragments and locking options are set for the instance. + @param endOfRange If the free list is to contain an initial fragment, set endOfRange to the last offset in the range, ie. size - 1, to create a free fragment for the range zero to endOfRange inclusive. If zero is passed, the free list will be initialized empty, and can be populated with calls to the deallocate method. + @param defaultAlignment If this parameter is non-zero it specifies a required alignment for all allocations, for example pass 256 to align allocations on 256 byte boundaries. Zero or one specify unaligned allocations. + @param capacity Sets the initial size of the free list in number of noncontiguous fragments. This value is also used for the capacityIncrement. + @param options Pass kLocking if the instance can be used by multiple threads. + @result Returns true if the instance is successfully initialized, false on failure. */ + + virtual bool init( IORangeScalar endOfRange, + IORangeScalar defaultAlignment, + UInt32 capacity, + IOOptionBits options ); + +/*! @function withRange + @abstract Standard factory method for IORangeAllocator. + @discussion This method allocates and initializes an IORangeAllocator and optionally sets the free list to contain one fragment, from zero to an endOfRange parameter. The capacity in terms of free fragments and locking options are set for the instance. + @param endOfRange If the free list is to contain an initial fragment, set endOfRange to the last offset in the range, ie. size - 1, to create a free fragment for the range zero to endOfRange inclusive. If zero is passed the free list will be initialized empty, and can be populated with calls to the deallocate method. + @param defaultAlignment If this parameter is non-zero it specifies a required alignment for all allocations, for example pass 256 to align allocations on 256 byte boundaries. Zero or one specify unaligned allocations. + @param capacity Sets the initial size of the free list in number of non-contiguous fragments. This value is also used for the capacityIncrement. + @param options Pass kLocking if the instance can be used by multiple threads. + @result Returns the new IORangeAllocator instance, to be released by the caller, or zero on failure. */ + + static IORangeAllocator * withRange( IORangeScalar endOfRange, + IORangeScalar defaultAlignment = 0, + UInt32 capacity = 0, + IOOptionBits options = 0 ); + + virtual void free(); + virtual bool serialize(OSSerialize *s) const; + +/*! @function getFragmentCount + @abstract Accessor to return the number of free fragments in the range. + @discussion This method returns a count of free fragments. Each fragment describes a non-contiguous free range - deallocations will merge contiguous fragments together. + @result Returns the count of free fragments. +*/ + + virtual UInt32 getFragmentCount( void ); + +/*! @function getFragmentCapacity + @abstract Accessor to return the number of free fragments in the range. + @discussion This method returns the current capacity of the free fragment list. + @result Returns the current capacity of free fragment list. +*/ + + virtual UInt32 getFragmentCapacity( void ); + +/*! @function setFragmentCapacityIncrement + @abstract Sets the count of fragments the free list will increase by when full. + @discussion This method sets the number of extra fragments the free list will expand to when full. It defaults to the initial capacity. + @param count The number of fragments to increment the capacity by when the free list is full. +*/ + + virtual void setFragmentCapacityIncrement( UInt32 count ); + +/*! @function getFreeCount + @abstract Totals the sizes of the free fragments. + @discussion This method returns the total of the sizes of the fragments on the free list. + @result Returns the total of the free fragments sizes. +*/ + + virtual IORangeScalar getFreeCount( void ); + +/*! @function allocate + @abstract Allocates from the free list, at any offset. + @discussion This method allocates a range from the free list. The alignment will default to the alignment set when the allocator was created or may be set here. + @param size The size of the range requested. + @param result The beginning of the range allocated is returned here on success. + @param alignment If zero is passed, default to the allocators alignment, otherwise pass an alignment required for the allocation, for example 4096 to page align. + @result Returns true if the allocation was successful, else false. +*/ + + virtual bool allocate( IORangeScalar size, + IORangeScalar * result, + IORangeScalar alignment = 0 ); + +/*! @function allocateRange + @abstract Allocates from the free list, at a set offset. + @discussion This method allocates a range from the free list, given a set offset passed in. + @param start The beginning of the range requested. + @param size The size of the range requested. + @result Returns true if the allocation was successful, else false. +*/ + + virtual bool allocateRange( IORangeScalar start, + IORangeScalar size ); + +/*! @function deallocate + @abstract Deallocates a range to the free list. + @discussion This method deallocates a range to the free list, given a the start offset and length passed in. + @param start The beginning of the range requested. + @param size Returns the size of the range requested. +*/ + + virtual void deallocate( IORangeScalar start, + IORangeScalar size ); +}; + +#endif /* _IOKIT_IORANGEALLOCATOR_H */ diff --git a/i386/include/IOKit/IORegistryEntry.h b/i386/include/IOKit/IORegistryEntry.h new file mode 100644 index 0000000..bbe4b18 --- /dev/null +++ b/i386/include/IOKit/IORegistryEntry.h @@ -0,0 +1,947 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_IOREGISTRYENTRY_H +#define _IOKIT_IOREGISTRYENTRY_H + +#include +#include + + +extern const OSSymbol * gIONameKey; +extern const OSSymbol * gIOLocationKey; +extern const OSSymbol * gIORegistryEntryIDKey; + +class IORegistryEntry; +class IORegistryPlane; +class IORegistryIterator; + +typedef void (*IORegistryEntryApplierFunction)(IORegistryEntry * entry, + void * context); + +enum { + kIORegistryIterateRecursively = 0x00000001, + kIORegistryIterateParents = 0x00000002 +}; + +/*! @class IORegistryEntry : public OSObject + @abstract The base class for all objects in the registry. + @discussion The IORegistryEntry base class provides functions for describing graphs of connected registry entries, each with a dictionary-based property table. Entries may be connected in different planes, with differing topologies. Access to the registry is protected against multiple threads. Inside the kernel planes are specified with plane objects and are published by the creator - IOService exports the gIOServicePlane plane object for example. Non kernel clients specify planes by their name. +*/ + +class IORegistryEntry : public OSObject +{ + friend class IORegistryIterator; + + OSDeclareDefaultStructors(IORegistryEntry) + +protected: +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of this class in the future. + */ + struct ExpansionData + { + uint64_t fRegistryEntryID; + }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * reserved; + +private: + + OSDictionary * fRegistryTable; + OSDictionary * fPropertyTable; + +public: + /* methods available in Mac OS X 10.1 or later */ + +/*! @function copyProperty + @abstract Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy. Available in Mac OS X 10.1 or later. + @discussion This method will search for a property, starting first with this registry entry's property table, then iterating recusively through either the parent registry entries or the child registry entries of this entry. Once the first occurrence is found, it will lookup and return the value of the property, using the OSDictionary::getObject semantics. The iteration keeps track of entries that have been recursed into previously to avoid loops. This method is synchronized with other IORegistryEntry accesses to the property table(s). + @param aKey The property's name as a C-string. + @param plane The plane to iterate over, eg. gIOServicePlane. + @param options kIORegistryIterateRecursively may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard getProperty() call. kIORegistryIterateParents may be set to iterate the parents of the entry, in place of the children. + @result The property value found, or zero. A reference on any found property is returned to caller, which should be released. */ + + virtual OSObject * copyProperty( const char * aKey, + const IORegistryPlane * plane, + IOOptionBits options = + kIORegistryIterateRecursively | + kIORegistryIterateParents) const; + +/*! @function copyProperty + @abstract Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy. Available in Mac OS X 10.1 or later. + @discussion This method will search for a property, starting first with this registry entry's property table, then iterating recusively through either the parent registry entries or the child registry entries of this entry. Once the first occurrence is found, it will lookup and return the value of the property, using the OSDictionary::getObject semantics. The iteration keeps track of entries that have been recursed into previously to avoid loops. This method is synchronized with other IORegistryEntry accesses to the property table(s). + @param aKey The property's name as an OSString. + @param plane The plane to iterate over, eg. gIOServicePlane. + @param options kIORegistryIterateRecursively may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard getProperty() call. kIORegistryIterateParents may be set to iterate the parents of the entry, in place of the children. + @result The property value found, or zero. A reference on any found property is returned to caller, which should be released. */ + + virtual OSObject * copyProperty( const OSString * aKey, + const IORegistryPlane * plane, + IOOptionBits options = + kIORegistryIterateRecursively | + kIORegistryIterateParents) const; + +/*! @function copyProperty + @abstract Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy. Available in Mac OS X 10.1 or later. + @discussion This method will search for a property, starting first with this registry entry's property table, then iterating recusively through either the parent registry entries or the child registry entries of this entry. Once the first occurrence is found, it will lookup and return the value of the property, using the OSDictionary::getObject semantics. The iteration keeps track of entries that have been recursed into previously to avoid loops. This method is synchronized with other IORegistryEntry accesses to the property table(s). + @param aKey The property's name as an OSSymbol. + @param plane The plane to iterate over, eg. gIOServicePlane. + @param options kIORegistryIterateRecursively may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard getProperty() call. kIORegistryIterateParents may be set to iterate the parents of the entry, in place of the children. + @result The property value found, or zero. A reference on any found property is returned to caller, which should be released. */ + + virtual OSObject * copyProperty( const OSSymbol * aKey, + const IORegistryPlane * plane, + IOOptionBits options = + kIORegistryIterateRecursively | + kIORegistryIterateParents) const; + +/*! @function copyParentEntry + @abstract Returns an registry entry's first parent entry in a plane. Available in Mac OS X 10.1 or later. + @discussion This function will return the parent to which a registry entry was first attached. Since the majority of registry entrys have only one provider, this is a useful simplification. + @param plane The plane object. + @result Returns the first parent of the registry entry, or zero if the entry is not attached into the registry in that plane. A reference on the entry is returned to caller, which should be released. */ + + virtual IORegistryEntry * copyParentEntry( const IORegistryPlane * plane ) const; + +/*! @function copyChildEntry + @abstract Returns an registry entry's first child entry in a plane. Available in Mac OS X 10.1 or later. + @discussion This function will return the child which first attached to a registry entry. + @param plane The plane object. + @result Returns the first child of the registry entry, or zero if the entry is not attached into the registry in that plane. A reference on the entry is returned to caller, which should be released. */ + + virtual IORegistryEntry * copyChildEntry( const IORegistryPlane * plane ) const; + + /* method available in Mac OS X 10.4 or later */ +/*! + @typedef Action + @discussion Type and arguments of callout C function that is used when +a runCommand is executed by a client. Cast to this type when you want a C++ +member function to be used. Note the arg1 - arg3 parameters are passed straight pass through to the action callout. + @param target + Target of the function, can be used as a refcon. Note if a C++ function +was specified, this parameter is implicitly the first parameter in the target +member function's parameter list. + @param arg0 Argument to action from run operation. + @param arg1 Argument to action from run operation. + @param arg2 Argument to action from run operation. + @param arg3 Argument to action from run operation. +*/ + typedef IOReturn (*Action)(OSObject *target, + void *arg0, void *arg1, + void *arg2, void *arg3); + +/*! @function runPropertyAction + @abstract Single thread a call to an action w.r.t. the property lock + @discussion Client function that causes the given action to be called in a manner that syncrhonises with the registry iterators and serialisers. This functin can be used to synchronously manipulate the property table of this nub + @param action Pointer to function to be executed in work-loop context. + @param arg0 Parameter for action parameter, defaults to 0. + @param arg1 Parameter for action parameter, defaults to 0. + @param arg2 Parameter for action parameter, defaults to 0. + @param arg3 Parameter for action parameter, defaults to 0. + @result Returns the value of the Action callout. +*/ + virtual IOReturn runPropertyAction(Action action, OSObject *target, + void *arg0 = 0, void *arg1 = 0, + void *arg2 = 0, void *arg3 = 0); + +private: +#if __LP64__ + OSMetaClassDeclareReservedUnused(IORegistryEntry, 0); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 1); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 2); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 3); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 4); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 5); +#else + OSMetaClassDeclareReservedUsed(IORegistryEntry, 0); + OSMetaClassDeclareReservedUsed(IORegistryEntry, 1); + OSMetaClassDeclareReservedUsed(IORegistryEntry, 2); + OSMetaClassDeclareReservedUsed(IORegistryEntry, 3); + OSMetaClassDeclareReservedUsed(IORegistryEntry, 4); + OSMetaClassDeclareReservedUsed(IORegistryEntry, 5); +#endif + OSMetaClassDeclareReservedUnused(IORegistryEntry, 6); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 7); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 8); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 9); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 10); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 11); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 12); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 13); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 14); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 15); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 16); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 17); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 18); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 19); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 20); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 21); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 22); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 23); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 24); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 25); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 26); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 27); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 28); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 29); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 30); + OSMetaClassDeclareReservedUnused(IORegistryEntry, 31); + +public: + + /* Registry accessors */ + +/*! @function getRegistryRoot + @abstract Returns a pointer to the root instance of the registry. + @discussion This method provides an accessor to the root of the registry for the machine. The root may be passed to a registry iterator when iterating a plane, and contains properties that describe the available planes, and diagnostic information for IOKit. Keys for these properties are in IOKitKeys.h. + @result A pointer to the IORegistryEntry root instance. It should not be released by the caller. */ + + static IORegistryEntry * getRegistryRoot( void ); + +/*! @function getGenerationCount + @abstract Returns an generation count for all registry changing operations. + @discussion This method provides an accessor to the current generation count (or seed) of the registry which changes when any topology change occurs in the registry - this does not include property table changes. It may be used to invalidate any caching of the results from IORegistryEntry methods. + @result An integer generation count. */ + + static SInt32 getGenerationCount( void ); + +/*! @function getPlane + @abstract Looks up the plane object by a C-string name. + @discussion Planes are usually provided as globals by the creator, eg. gIOServicePlane, gIODeviceTreePlane, or gIOAudioPlane, however they may also be looked up by name with this method. + @result A pointer to the plane object, or zero if no such plane exists. The returned plane should not be released. */ + + static const IORegistryPlane * getPlane( const char * name ); + + /* Registry Entry allocation & init */ + +/*! @function init + @abstract Standard init method for all IORegistryEntry subclasses. + @discussion A registry entry must be initialized with this method before it can be used. A property dictionary may passed and will be retained by this method for use as the registry entry's property table, or an empty one will be created. + @param A dictionary that will become the registry entry's property table (retaining it), or zero which will cause an empty property table to be created. + @result true on success, or false on a resource failure. */ + + virtual bool init( OSDictionary * dictionary = 0 ); + +/*! @function free + @abstract Standard free method for all IORegistryEntry subclasses. + @discussion This method will release any resources of the entry, in particular its property table. Note that the registry entry must always be detached from the registry before free may be called, and subclasses (namely IOService) will have additional protocols for removing registry entries. free should never need be called directly. */ + + virtual void free( void ); + +/*! @function setPropertyTable + @abstract Replace a registry entry's property table. + @discussion This method will release the current property table of a the entry and replace it with another, retaining the new property table. + @param dict The new dictionary to be used as the entry's property table. */ + + virtual void setPropertyTable( OSDictionary * dict ); + + /* Synchronized property accessors; wrappers to OSDictionary + * plus property creation helpers */ + +/*! @function setProperty + @abstract Synchronized method to add a property to a registry entry's property table. + @discussion This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. + @param aKey The properties name as an OSSymbol. + @param anObject The property value. + @result true on success or false on a resource failure. */ + + virtual bool setProperty(const OSSymbol * aKey, OSObject * anObject); + +/*! @function setProperty + @abstract Synchronized method to add a property to a registry entry's property table. + @discussion This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. + @param aKey The property's name as an OSString. + @param anObject The property value. + @result true on success or false on a resource failure. */ + + virtual bool setProperty(const OSString * aKey, OSObject * anObject); + +/*! @function setProperty + @abstract Synchronized method to add a property to a registry entry's property table. + @discussion This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. + @param aKey The property's name as a C-string. + @param anObject The property value. + @result true on success or false on a resource failure. */ + + virtual bool setProperty(const char * aKey, OSObject * anObject); + +/*! @function setProperty + @abstract Synchronized method to construct and add a OSString property to a registry entry's property table. + @discussion This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. The property is created as an OSString from the supplied C-string, set in the property table with the given name, and released. + @param aKey The property's name as a C-string. + @param aString The property value as a C-string. + @result true on success or false on a resource failure. */ + + virtual bool setProperty(const char * aKey, const char * aString); + +/*! @function setProperty + @abstract Synchronized method to construct and add an OSBoolean property to a registry entry's property table. + @discussion This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. The property is created as an OSBoolean from the supplied value, set in the property table with the given name, and released. + @param aKey The property's name as a C-string. + @param aBoolean The property's boolean value. + @result true on success or false on a resource failure. */ + + virtual bool setProperty(const char * aKey, bool aBoolean); + +/*! @function setProperty + @abstract Synchronized method to construct and add an OSNumber property to a registry entry's property table. + @discussion This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. The property is created as an OSNumber from the supplied value and size, set in the property table with the given name, and released. + @param aKey The property's name as a C-string. + @param aValue The property's numeric value. + @param aNumberOfBits The property's size in bits, for OSNumber. + @result true on success or false on a resource failure. */ + + virtual bool setProperty( const char * aKey, + unsigned long long aValue, + unsigned int aNumberOfBits); + +/*! @function setProperty + @abstract Synchronized method to construct and add an OSData property to a registry entry's property table. + @discussion This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. The property is created as an OSData copied from the supplied data and length, set in the property table with the given name, and released. + @param aKey The property's name as a C-string. + @param bytes The property's value as a pointer. OSData will copy this data. + @param length The property's size in bytes, for OSData. + @result true on success or false on a resource failure. */ + + virtual bool setProperty( const char * aKey, + void * bytes, + unsigned int length); + +/*! @function removeProperty + @abstract Synchronized method to remove a property from a registry entry's property table. + @discussion This method will remove a property from a registry entry's property table, using the OSDictionary::removeObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. + @param aKey The property's name as an OSSymbol. */ + + virtual void removeProperty( const OSSymbol * aKey); + +/*! @function removeProperty + @abstract Synchronized method to remove a property from a registry entry's property table. + @discussion This method will remove a property from a registry entry's property table, using the OSDictionary::removeObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. + @param aKey The property's name as an OSString. */ + + virtual void removeProperty( const OSString * aKey); + +/*! @function removeProperty + @abstract Synchronized method to remove a property from a registry entry's property table. + @discussion This method will remove a property from a registry entry's property table, using the OSDictionary::removeObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. + @param aKey The property's name as a C-string. */ + + virtual void removeProperty( const char * aKey); + +/*! @function getProperty + @abstract Synchronized method to obtain a property from a registry entry's property table. + @discussion This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. + @param aKey The property's name as an OSSymbol. + @result The property value found, or zero. */ + + virtual OSObject * getProperty( const OSSymbol * aKey) const; + +/*! @function getProperty + @abstract Synchronized method to obtain a property from a registry entry's property table. + @discussion This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. + @param aKey The property's name as an OSString. + @result The property value found, or zero. */ + + virtual OSObject * getProperty( const OSString * aKey) const; + +/*! @function getProperty + @abstract Synchronized method to obtain a property from a registry entry's property table. + @discussion This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. + @param aKey The property's name as a C-string. + @result The property value found, or zero. */ + + virtual OSObject * getProperty( const char * aKey) const; + +/*! @function getProperty + @abstract Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy. + @discussion This method will search for a property, starting first with this registry entry's property table, then iterating recusively through either the parent registry entries or the child registry entries of this entry. Once the first occurrence is found, it will lookup and return the value of the property, using the OSDictionary::getObject semantics. The iteration keeps track of entries that have been recursed into previously to avoid loops. This method is synchronized with other IORegistryEntry accesses to the property table(s). + @param aKey The property's name as an OSSymbol. + @param plane The plane to iterate over, eg. gIOServicePlane. + @param options kIORegistryIterateRecursively may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard getProperty() call. kIORegistryIterateParents may be set to iterate the parents of the entry, in place of the children. + @result The property value found, or zero. */ + + virtual OSObject * getProperty( const OSSymbol * aKey, + const IORegistryPlane * plane, + IOOptionBits options = + kIORegistryIterateRecursively | + kIORegistryIterateParents) const; + +/*! @function getProperty + @abstract Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy. + @discussion This method will search for a property, starting first with this registry entry's property table, then iterating recusively through either the parent registry entries or the child registry entries of this entry. Once the first occurrence is found, it will lookup and return the value of the property, using the OSDictionary::getObject semantics. The iteration keeps track of entries that have been recursed into previously to avoid loops. This method is synchronized with other IORegistryEntry accesses to the property table(s). + @param aKey The property's name as an OSString. + @param plane The plane to iterate over, eg. gIOServicePlane. + @param options kIORegistryIterateRecursively may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard getProperty() call. kIORegistryIterateParents may be set to iterate the parents of the entry, in place of the children. + @result The property value found, or zero. */ + + virtual OSObject * getProperty( const OSString * aKey, + const IORegistryPlane * plane, + IOOptionBits options = + kIORegistryIterateRecursively | + kIORegistryIterateParents) const; + +/*! @function getProperty + @abstract Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy. + @discussion This method will search for a property, starting first with this registry entry's property table, then iterating recusively through either the parent registry entries or the child registry entries of this entry. Once the first occurrence is found, it will lookup and return the value of the property, using the OSDictionary::getObject semantics. The iteration keeps track of entries that have been recursed into previously to avoid loops. This method is synchronized with other IORegistryEntry accesses to the property table(s). + @param aKey The property's name as a C-string. + @param plane The plane to iterate over, eg. gIOServicePlane. + @param options kIORegistryIterateRecursively may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard getProperty() call. kIORegistryIterateParents may be set to iterate the parents of the entry, in place of the children. + @result The property value found, or zero. */ + + virtual OSObject * getProperty( const char * aKey, + const IORegistryPlane * plane, + IOOptionBits options = + kIORegistryIterateRecursively | + kIORegistryIterateParents) const; + +/*! @function copyProperty + @abstract Synchronized method to obtain a property from a registry entry's property table. + @discussion This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics, and return a reference to the caller. This method is synchronized with other IORegistryEntry accesses to the property table. + @param aKey The property's name as an OSSymbol. + @result The property value found, or zero. It should be released by the caller. */ + + virtual OSObject * copyProperty( const OSSymbol * aKey) const; + +/*! @function copyProperty + @abstract Synchronized method to obtain a property from a registry entry's property table. + @discussion This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics, and return a reference to the caller. This method is synchronized with other IORegistryEntry accesses to the property table. + @param aKey The property's name as an OSString. + @result The property value found, or zero. It should be released by the caller. */ + + virtual OSObject * copyProperty( const OSString * aKey) const; + +/*! @function copyProperty + @abstract Synchronized method to obtain a property from a registry entry's property table. + @discussion This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics, and return a reference to the caller. This method is synchronized with other IORegistryEntry accesses to the property table. + @param aKey The property's name as a C-string. + @result The property value found, or zero. It should be released by the caller. */ + + virtual OSObject * copyProperty( const char * aKey) const; + +/*! @function dictionaryWithProperties + @abstract Synchronized method to obtain copy a registry entry's property table. + @discussion This method will copy a registry entry's property table, using the OSDictionary::withDictionary semantics. This method is synchronized with other IORegistryEntry accesses to the property table. Since OSDictionary will only copy property values by reference, synchronization is not guaranteed to any collection values. + @result The created dictionary, or zero on a resource value. It should be released by the caller. */ + + virtual OSDictionary * dictionaryWithProperties( void ) const; + +/*! @function serializeProperties + @abstract Synchronized method to serialize a registry entry's property table. + @discussion This method will serialize a registry entry's property table, using the OSDictionary::serialize semantics. This method is synchronized with other IORegistryEntry accesses to the property table. Many non-kernel clients of IOKit read information from the registry via properties, and will invoke this method in a registry entry to create a serialization of all the entry's properties, which is then reconstructed in the client's task as a CFDictionary. This method may be intercepted by subclasses to update their properties or implement a different serialization method, though it is usually better to implement such functionality by creating objects in the property table and implementing their serialize methods, avoiding any need to implement serializeProperties. + @param serialize The OSSerialize instance representing the serialization request. + @result True on success, false otherwise. */ + + virtual bool serializeProperties( OSSerialize * serialize ) const; + + /* Unsynchronized(!) property table access */ + +/*! @function getPropertyTable + @abstract Unsynchronized accessor to a registry entry's property table. + @discussion This method will return a pointer to the live property table as an OSDictionery. Its use is not recommended in most cases, instead use the synchronized accessors and helper functions of IORegistryEntry to access properties. It can only safely be used by one thread, which usually means it can only be used before a registry entry is entered into the registry. + @result A pointer to the property table as an OSDictionary. The pointer is valid while the registry entry is retained, and should not be released by the caller. */ + + /* inline */ OSDictionary * getPropertyTable( void ) const; + /* { return(fPropertyTable); } */ + + /* Set properties from user level, to be overridden if supported */ + +/*! @function setProperties + @abstract Optionally supported external method to set properties in a registry entry. + @discussion This method is not implemented by IORegistryEntry, but is available to kernel and non-kernel clients to set properties in a registry entry. IOUserClient provides connection based, more controlled access to this functionality and may be more appropriate for many uses, since there is no differentiation between clients available to this method. + @param properties Any OSObject subclass, to be interpreted by the implementing method - for example an OSDictionary, OSData etc. may all be appropriate. + @result An IOReturn code to be returned to the caller. */ + + virtual IOReturn setProperties( OSObject * properties ); + + /* Topology */ + +/*! @function getParentIterator + @abstract Returns an iterator over an registry entry's parent entries in a specified plane. + @param plane The plane object. + @result Returns an iterator over the parents of the registry entry, or zero if there is a resource failure. The iterator must be released when the iteration is finished. All objects returned by the iteration are retained while the iterator is valid, though they may no longer be attached during the iteration. */ + + virtual OSIterator * getParentIterator( const IORegistryPlane * plane ) + const; + virtual void applyToParents( IORegistryEntryApplierFunction applier, + void * context, + const IORegistryPlane * plane ) const; + +/*! @function getParentEntry + @abstract Returns an registry entry's first parent entry in a plane. + @discussion This function will return the parent to which a registry entry was first attached. Since the majority of registry entrys have only one provider, this is a useful simplification. + @param plane The plane object. + @result Returns the first parent of the registry entry, or zero if the entry is not attached into the registry in that plane. The parent is retained while the entry is attached, and should not be released by the caller. */ + + virtual IORegistryEntry * getParentEntry( const IORegistryPlane * plane ) const; + +/*! @function getChildIterator + @abstract Returns an iterator over an registry entry's child entries in a plane. + @discussion This method creates an iterator which will return each of a registry entry's child entries in a specified plane. + @param plane The plane object. + @result Returns an iterator over the children of the entry, or zero if there is a resource failure. The iterator must be released when the iteration is finished. All objects returned by the iteration are retained while the iterator is valid, though they may no longer be attached during the iteration. */ + + virtual OSIterator * getChildIterator( const IORegistryPlane * plane ) + const; + + virtual void applyToChildren( IORegistryEntryApplierFunction applier, + void * context, + const IORegistryPlane * plane ) const; + +/*! @function getChildEntry + @abstract Returns an registry entry's first child entry in a plane. + @discussion This function will return the child which first attached to a registry entry. + @param plane The plane object. + @result Returns the first child of the registry entry, or zero if the entry is not attached into the registry in that plane. The child is retained while the entry is attached, and should not be released by the caller. */ + + virtual IORegistryEntry * getChildEntry( const IORegistryPlane * plane ) const; + +/*! @function isChild + @abstract Determines whether a registry entry is the child of another in a plane. + @discussion This method called in the parent entry determines if the specified entry is a child, in a plane. Additionally, it can check if the child is the only child of the parent entry. + @param child The possible child registry entry. + @param plane The plane object. + @param onlyChild If true, check also if the child is the only child. + @result If the child argument is not a child of the registry entry, false is returned. If onlyChild is true and the child is not the only child of the entry, false is returned, otherwise true is returned. */ + + virtual bool isChild( IORegistryEntry * child, + const IORegistryPlane * plane, + bool onlyChild = false ) const; + +/*! @function isParent + @abstract Determines whether a registry entry is the parent of another in a plane. + @discussion This method called in the child entry determines if the specified entry is a parent, in a plane. Additionally, it can check if the parent is the only parent of the child entry. + @param parent The possible parent registry entry. + @param plane The plane object. + @param onlyParent If true, check also if the parent is the only parent. + @result If the parent argument is not a parent of the registry entry, false is returned. If onlyParent is true and the parent is not the only parent of the entry, false is returned, otherwise true is returned. */ + + virtual bool isParent( IORegistryEntry * parent, + const IORegistryPlane * plane, + bool onlyParent = false ) const; + +/*! @function inPlane + @abstract Determines whether a registry entry is attached in a plane. + @discussion This method determines if the entry is attached in a plane to any other entry. It can also be used to determine if the entry is a member of any plane. + @param plane The plane object, 0 indicates any plane. + @result If the entry has a parent in the given plane or if plane = 0 then if entry has any parent; return true, otherwise false. */ + + virtual bool inPlane( const IORegistryPlane * plane = 0) const; + +/*! @function getDepth + @abstract Counts the maximum number of entries between an entry and the registry root, in a plane. + @discussion This method counts the number of entries between and entry and the registry root, in a plane, for each parent of the entry and returns the maximum value. + @param plane The plane object. + @result The maximum number of entries between the entry and the root. Zero is returned if the entry is not attached in the plane. */ + + virtual unsigned int getDepth( const IORegistryPlane * plane ) const; + + /* Attach / detach */ + +/*! @function attachToParent + @abstract Attaches a entry to a parent entry in a plane. + @discussion This is the usual method of entering an entry into the registry. It is a no-op and success if the entry is already attached to the parent. Attaching the entry into the registry retains both the child and parent while they are attached. This method will call attachToChild in the parent entry if it is not being called from attachToChild. + @param parent The registry entry to attach to. + @param plane The plane object. + @result true on success, or false on a resource failure, or if the parent is the same as the child. */ + + virtual bool attachToParent( IORegistryEntry * parent, + const IORegistryPlane * plane ); + +/*! @function detachFromParent + @abstract Detaches an entry from a parent entry in a plane. + @discussion This is the usual method of removing an entry from the registry. It is a no-op if the entry is not attached to the parent. Detaching the entry will release both the child and parent. This method will call detachFromChild in the parent entry if it is not being called from detachFromChild. + @param parent The registry entry to detach from. + @param plane The plane object. */ + + virtual void detachFromParent( IORegistryEntry * parent, + const IORegistryPlane * plane ); + +/*! @function attachToChild + @abstract Method called in the parent entry when a child attaches. + @discussion This method is called in the parent entry when a child attaches, to make overrides possible. This method will also call attachToParent in the child entry if it is not being called from attachToParent. It is a no-op and success if the entry is already a child. Attaching the entry into the registry retains both the child and parent while they are attached. + @param child The registry entry being attached. + @param plane The plane object. + @result true on success, or false on a resource failure, or if the parent is the same as the child. */ + + virtual bool attachToChild( IORegistryEntry * child, + const IORegistryPlane * plane ); + +/*! @function detachFromChild + @abstract Detaches a child entry from its parent in a plane. + @discussion This method is called in the parent entry when a child detaches, to make overrides possible. It is a no-op if the entry is not a child of the parent. Detaching the entry will release both the child and parent. This method will call detachFromParent in the child entry if it is not being called from detachFromParent. + @param parent The registry entry to detach. + @param plane The plane object. */ + + virtual void detachFromChild( IORegistryEntry * child, + const IORegistryPlane * plane ); + +/*! @function detachAbove + @abstract Detaches an entry from all its parent entries in a plane. + @discussion This method calls detachFromParent in the entry for each of its parent entries in the plane. + @param plane The plane object. */ + + virtual void detachAbove( const IORegistryPlane * plane ); + +/*! @function detachAll + @abstract Detaches an entry and all its children recursively in a plane. + @discussion This method breaks the registry connections for a subtree. detachAbove is called in the entry, and all child entries and their children in the plane. + @param plane The plane object. */ + + virtual void detachAll( const IORegistryPlane * plane ); + + /* Name, location and path accessors */ + +/*! @function getName + @abstract Returns the name assigned to the registry entry as a C-string. + @discussion Entries can be named in a particular plane, or globally. If the entry is named in plane and the plane is specified that name will be returned, otherwise the global name is returned. The global name defaults to the entry's meta class name if it has not been named. + @param plane The plane object, or zero for the global name. + @result A C-string name, valid while the entry is retained. */ + + virtual const char * getName( const IORegistryPlane * plane = 0 ) const; + +/*! @function copyName + @abstract Returns the name assigned to the registry entry as an OSSymbol. + @discussion Entries can be named in a particular plane, or globally. If the entry is named in plane and the plane is specified that name will be returned, otherwise the global name is returned. The global name defaults to the entry's meta class name if it has not been named. + @param plane The plane object, or zero for the global name. + @result A reference to an OSSymbol for the name, which should be released by the caller. */ + + virtual const OSSymbol * copyName( + const IORegistryPlane * plane = 0 ) const; + +/*! @function compareNames + @abstract Compares the name of the entry with one or more names, and optionally returns the matching name. + @discussion This method is called during IOService name matching and elsewhere to compare the entry's global name with a list of names, or a single name. A list of names may be passed as any OSCollection of OSStrings, while a single name may be passed an OSString, in the name parameter. compareNames will call the compareName method for each name, for overrides. + @param name The name or names to compare with as any OSCollection (eg. OSArray, OSSet, OSDictionary) of OSStrings, or a single name may be passed an OSString. + @param matched If the caller wants the successfully matched name returned, pass a non-zero pointer for the matched parameter and an OSString will be returned here. It should be released by the caller. + @result True if one of the names compared true with the entry's global name. */ + + virtual bool compareNames( OSObject * name, OSString ** matched = 0 ) const; + +/*! @function compareName + @abstract Compares the name of the entry with one name, and optionally returns the matching name. + @discussion This method is called during IOService name matching and elsewhere from the compareNames method. It should be overridden to provide non-standard name matching. + @param name The name to compare with as an OSString. + @param matched If the caller wants the successfully matched name returned, pass a non-zero pointer for the matched parameter and an OSString will be returned here. It should be released by the caller. Generally, this will be the same as the name parameter, but may not be if wildcards are used. + @result True if the name compared true with the entry's global name. */ + + virtual bool compareName( OSString * name, OSString ** matched = 0 ) const; + +/*! @function setName + @abstract Sets a name for the registry entry, in a particular plane, or globally. + @discussion Entries can be named in a particular plane, or globally. If the plane is specified the name applies only to that plane, otherwise the global name is set. The global name defaults to the entry's meta class name if it has not been named. + @param name An OSSymbol which will be retained. + @param plane The plane object, or zero to set the global name. */ + + virtual void setName( const OSSymbol * name, + const IORegistryPlane * plane = 0 ); + +/*! @function setName + @abstract Sets a name for the registry entry, in a particular plane, or globally. + @discussion Entries can be named in a particular plane, or globally. If the plane is specified the name applies only to that plane, otherwise the global name is set. The global name defaults to the entry's meta class name if it has not been named. + @param name A const C-string name which will be copied. + @param plane The plane object, or zero to set the global name. */ + + virtual void setName( const char * name, + const IORegistryPlane * plane = 0 ); + +/*! @function getLocation + @abstract Returns the location string assigned to the registry entry as a C-string. + @discussion Entries can given a location string in a particular plane, or globally. If the entry has had a location set in a plane and the plane is specified that location string will be returned, otherwise the global location string is returned. If no global location string has been set, zero is returned. + @param plane The plane object, or zero for the global name. + @result A C-string location string, valid while the entry is retained, or zero. */ + + virtual const char * getLocation( const IORegistryPlane * plane = 0 ) const; + +/*! @function copyLocation + @abstract Returns the location string assigned to the registry entry as an OSSymbol. + @discussion Entries can given a location string in a particular plane, or globally. If the entry has had a location set in a plane and the plane is specified that location string will be returned, otherwise the global location string is returned. If no global location string has been set, zero is returned. + @param plane The plane object, or zero for the global name. + @result A reference to an OSSymbol for the location if one exists, which should be released by the caller, or zero. */ + + virtual const OSSymbol * copyLocation( + const IORegistryPlane * plane = 0 ) const; + +/*! @function setLocation + @abstract Sets a location string for the registry entry, in a particular plane, or globally. + @discussion Entries can be given a location string in a particular plane, or globally. If the plane is specified the location applies only to that plane, otherwise the global location is set. The location string may be used during path lookups of registry entries, to distinguish between sibling entries with the same name. The default IORegistryEntry parsing of location strings expects a list of hex numbers separated by commas, though subclasses of IORegistryEntry might do their own parsing. + @param location A C-string location string which will be copied, or an OSSymbol which will be retained. + @param plane The plane object, or zero to set the global location string. */ + + virtual void setLocation( const OSSymbol * location, + const IORegistryPlane * plane = 0 ); + virtual void setLocation( const char * location, + const IORegistryPlane * plane = 0 ); + +/*! @function getPath + @abstract Create a path for a registry entry. + @discussion The path for a registry entry is copied to the caller's buffer. The path describes the entry's attachment in a particular plane, which must be specified. The path begins with the plane name followed by a colon, and then followed by '/' separated path components for each of the entries between the root and the registry entry. Each component is constructed with the getPathComponent method called in each entry. An alias may also exist for the entry, which are described as properties in a registry entry found at /aliases in the plane. If a property value interpreted as a path in a call to IORegistryEntry::fromPath yields the entry, then the property name is used as the entry's path. + @param path A char buffer allocated by the caller. + @param length An in/out parameter - the caller sets the length of the buffer available, and getPath returns the total length of the path copied to the buffer. + @param plane The plane object. + @result getPath will fail if the entry is not attached in the plane, or if the buffer is not large enough to contain the path. */ + + virtual bool getPath( char * path, int * length, + const IORegistryPlane * plane) const; + +/*! @function getPathComponent + @abstract Create a path component for a registry entry. + @discussion Each component of a path created with getPath is created with getPathComponent. The default implementation concatenates the entry's name in the the plane, with the "at" symbol and the location string of the entry in the plane if it has been set. + @param path A char buffer allocated by the caller. + @param length An in/out parameter - the caller sets the length of the buffer available, and getPathComponent returns the total length of the path component copied to the buffer. + @param plane The plane object. + @result true if the path fits into the supplied buffer or false on a overflow. */ + + virtual bool getPathComponent( char * path, int * length, + const IORegistryPlane * plane ) const; + +/*! @function fromPath + @abstract Looks up a registry entry by path. + @discussion This function parses paths to lookup registry entries. The path may begin with the : created by getPath, or the plane may be set by the caller. If there are characters remaining unparsed after an entry has been looked up, this may be considered an invalid lookup, or those characters may be passed back to the caller and the lookup successful. + @param path A C-string path. + @param plane The plane to lookup up the path, or zero, in which case the path must begin with the plane name. + @param residualPath If the path may contain residual characters after the last path component, the residual will be copied back to the caller's residualPath buffer. If there are residual characters and no residual buffer is specified, fromPath will fail. + @param residualLength An in/out parameter - the caller sets the length of the residual buffer available, and fromPath returns the total length of the residual path copied to the buffer. If there is no residualBuffer (residualPath = 0) then residualLength may be zero also. + @param fromEntry The lookup will proceed rooted at this entry if non-zero, otherwise it proceeds from the root of the plane. + @result A retained registry entry is returned on success, or zero on failure. The caller should release the entry. */ + + static IORegistryEntry * fromPath( const char * path, + const IORegistryPlane * plane = 0, + char * residualPath = 0, + int * residualLength = 0, + IORegistryEntry * fromEntry = 0 ); + +/*! @function fromPath + @abstract Looks up a registry entry by relative path. + @discussion This function looks up a entry below the called entry by a relative path. It is just a convenience that calls IORegistryEntry::fromPath with this as the fromEntry parameter. + @param path See IORegistryEntry::fromPath. + @param plane See IORegistryEntry::fromPath. + @param residualPath See IORegistryEntry::fromPath. + @param residualLength See IORegistryEntry::fromPath. + @result See IORegistryEntry::fromPath. */ + + virtual IORegistryEntry * childFromPath( const char * path, + const IORegistryPlane * plane = 0, + char * residualPath = 0, + int * residualLength = 0 ); + +/*! @function dealiasPath + @abstract Strips any aliases from the head of path and returns the full path. + @discussion If the path specified begins with an alias found in the /aliases entry, the value of the alias is returned, and a pointer into the passed in path after the alias is passed back to the caller. If an alias is not found, zero is returned and the path parameter is unchanged. + @param opath An in/out paramter - the caller passes in a pointer to a C-string pointer to a path. If an alias is found, dealiasPath returns a pointer into the path just beyond the end of the alias. + @param plane A plane object must be specified. + @result A C-string pointer to the value of the alias if one is found, or zero if not. */ + + static const char * dealiasPath( const char ** opath, + const IORegistryPlane * plane ); + +/*! @function makePlane + @abstract Constructs an IORegistryPlane object. + @discussion Most planes in IOKit are created by the OS, although other planes may be created. + @param name A C-string name for the new plane, to be copied. + @result A new instance of an IORegistryPlane, or zero on failure. */ + + static const IORegistryPlane * makePlane( const char * name ); + +/*! @abstract Returns an ID for the registry entry that is global to all tasks. + @discussion The entry ID returned by getRegistryEntryID can be used to identify a registry entry across all tasks. A registry entry may be looked up by its entry ID by creating a matching dictionary with IORegistryEntryIDMatching() in user space, or IOService::registryEntryIDMatching() in the kernel, to be used with the IOKit matching functions. The ID is valid only until the machine reboots. + @result An ID for the registry entry, assigned when the entry is first attached in the registry. */ + + uint64_t getRegistryEntryID( void ); + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + /* * * * * * * * * * * * internals * * * * * * * * * * * */ + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + virtual bool init( IORegistryEntry * from, + const IORegistryPlane * inPlane ); + +private: + static IORegistryEntry * initialize( void ); + +private: + inline bool arrayMember( OSArray * set, + const IORegistryEntry * member, + unsigned int * index = 0 ) const; + + bool makeLink( IORegistryEntry * to, + unsigned int relation, + const IORegistryPlane * plane ) const; + void breakLink( IORegistryEntry * to, + unsigned int relation, + const IORegistryPlane * plane ) const; + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + OSArray * getParentSetReference( const IORegistryPlane * plane ) + const; + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + OSArray * getChildSetReference( const IORegistryPlane * plane ) + const; + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + IORegistryEntry * getChildFromComponent( const char ** path, + const IORegistryPlane * plane ); + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + const OSSymbol * hasAlias( const IORegistryPlane * plane, + char * opath = 0, int * length = 0 ) const; + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + const char * matchPathLocation( const char * cmp, + const IORegistryPlane * plane ); + +}; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/*! @class IORegistryIterator : public OSIterator + @abstract An iterator over the registry. + @discussion An iterator that can traverse the children or parents of a registry entry in a plane, and recurse. Access to the registry is protected against multiple threads, but an IORegistryIterator instance is for use by one thread only. */ + +class IORegistryIterator : public OSIterator +{ + OSDeclareAbstractStructors(IORegistryIterator) + +private: + struct IORegCursor { + IORegCursor * next; + IORegistryEntry * current; + OSIterator * iter; + }; + IORegCursor start; + IORegCursor * where; + IORegistryEntry * root; + OSOrderedSet * done; + const IORegistryPlane * plane; + IOOptionBits options; + + virtual void free( void ); + +public: +/*! @function iterateOver + @abstract Create an iterator rooted at a given registry entry. + @discussion This method creates an IORegistryIterator that is set up with options to iterate children or parents of a root entry, and to recurse automatically into entries as they are returned, or only when instructed. The iterator object keeps track of entries that have been recursed into previously to avoid loops. + @param start The root entry to begin the iteration at. + @param plane A plane object must be specified. + @param options kIORegistryIterateRecursively may be set to recurse automatically into each entry as it is returned. This option affects the behaviour of the getNextObject method, which is defined in the OSIterator superclass. Other methods will override this behaviour. kIORegistryIterateParents may be set to iterate the parents of each entry, by default the children are iterated. + @result A created IORegistryIterator instance, to be released by the caller when it has finished with it. */ + + static IORegistryIterator * iterateOver( IORegistryEntry * start, + const IORegistryPlane * plane, + IOOptionBits options = 0 ); + +/*! @function iterateOver + @abstract Create an iterator rooted at the registry root. + @discussion This method creates an IORegistryIterator that is set up with options to iterate children of the registry root entry, and to recurse automatically into entries as they are returned, or only when instructed. The iterator object keeps track of entries that have been recursed into previously to avoid loops. + @param plane A plane object must be specified. + @param options kIORegistryIterateRecursively may be set to recurse automatically into each entry as it is returned. This option affects the behaviour of the getNextObject method, which is defined in the OSIterator superclass. Other methods will override this behaviour. kIORegistryIterateParents may be set to iterate the parents of each entry, by default the children are iterated. + @result A created IORegistryIterator instance, to be released by the caller when it has finished with it. */ + + static IORegistryIterator * iterateOver( const IORegistryPlane * plane, + IOOptionBits options = 0 ); + +/*! @function getNextObject + @abstract Return the next object in the registry iteration. + @discussion This method calls either getNextObjectFlat or getNextObjectRecursive depending on the options the iterator was created with. This implements the OSIterator defined getNextObject method. The object returned is retained while the iterator is pointing at it (its the current entry), or recursing into it. The caller should not release it. + @result The next registry entry in the iteration (the current entry), or zero if the iteration has finished at this level of recursion. The entry returned is retained while the iterator is pointing at it (its the current entry), or recursing into it. The caller should not release it. */ + + virtual IORegistryEntry * getNextObject( void ); + +/*! @function getNextObjectFlat + @abstract Return the next object in the registry iteration, ignoring the kIORegistryIterateRecursively option. + @discussion This method returns the next child, or parent if the kIORegistryIterateParents option was used to create the iterator, of the current root entry. The object returned is retained while the iterator is pointing at it (its the current entry), or recursing into it. The caller should not release it. + @result The next registry entry in the iteration (the current entry), or zero if the iteration has finished at this level of recursion, or the iteration is invalid (see isValid). The entry returned is retained while the iterator is pointing at it (its the current entry), or recursing into it. The caller should not release it. */ + + virtual IORegistryEntry * getNextObjectFlat( void ); + +/*! @function getNextObjectRecursive + @abstract Return the next object in the registry iteration, and enter it. + @discussion If the iterator has a current entry, and the iterator has not already entered previously, enterEntry is called to recurse into it, ie. make it the new root, and the next child, or parent if the kIORegistryIterateParents option was used to create the iterator, at this new level of recursion is returned. If there is no current entry at this level of recursion, exitEntry is called and the process repeats, until the iteration returns to the entry the iterator was created with and zero is returned. The object returned is retained while the iterator is pointing at it (its the current entry), or recursing into it. The caller should not release it. + @result The next registry entry in the iteration (the current entry), or zero if its finished, or the iteration is invalid (see isValid). The entry returned is retained while the iterator is pointing at it (its the current entry), or recursing into it. The caller should not release it. */ + + virtual IORegistryEntry * getNextObjectRecursive( void ); + +/*! @function getCurrentEntry + @abstract Return the current entry in the registry iteration. + @discussion This method returns the current entry, last returned by getNextObject et al. The object returned is retained while the iterator is pointing at it (its the current entry), or recursing into it. The caller should not release it. If the iteration is no longer valid (see isValid), the current entry is zero. + @result The current registry entry in the iteration, or zero if the last iteration returned zero, or the iteration is invalid (see isValid). The entry returned is retained while the iterator is pointing at it (its the current entry), or recursing into it. The caller should not release it. */ + + virtual IORegistryEntry * getCurrentEntry( void ); + +/*! @function enterEntry + @abstract Recurse into the current entry in the registry iteration. + @discussion This method makes the current entry, ie. the last entry returned by getNextObject et al., the root in a new level of recursion. */ + + virtual void enterEntry( void ); + +/*! @function enterEntry + @abstract Recurse into the current entry in the registry iteration. + @discussion This method recurses into an entry as with enterEntry, but also switches from the current plane to a new one set by the caller. + @param plane The new plane to switch into. */ + + virtual void enterEntry( const IORegistryPlane * plane ); + +/*! @function exitEntry + @abstract Exits a level of recursion, restoring the current entry. + @discussion This method undoes an enterEntry, restoring the current entry. If there are no more levels of recursion to exit false is returned, otherwise true is returned. + @result true if a level of recursion was undone, false if no recursive levels are left in the iteration. */ + + virtual bool exitEntry( void ); + +/*! @function reset + @abstract Exits all levels of recursion, restoring the iterator to its state at creation. + @discussion This method exits all levels of recursion, and restores the iterator to its state at creation. */ + + virtual void reset( void ); + +/*! @function isValid + @abstract Checks that no registry changes have invalidated the iteration. + @discussion If a registry iteration is invalidated by changes to the registry, it will be made invalid, the currentEntry will be considered zero, and further calls to getNextObject et al. will return zero. The iterator should be reset to restart the iteration when this happens. + @result false if the iterator has been invalidated by changes to the registry, true otherwise. */ + + virtual bool isValid( void ); + +/*! @function iterateAll + @abstract Iterates all entries (with getNextObject) and returns a set of all returned entries. + @discussion This method will reset, then iterate all entries in the iteration (with getNextObject) until successful (ie. the iterator is valid at the end of the iteration). + @result A set of entries returned by the iteration. The caller should release the set when it has finished with it. Zero is returned on a resource failure. */ + + virtual OSOrderedSet * iterateAll( void ); +}; + +#endif /* _IOKIT_IOREGISTRYENTRY_H */ diff --git a/i386/include/IOKit/IOReturn.h b/i386/include/IOKit/IOReturn.h new file mode 100644 index 0000000..38811b6 --- /dev/null +++ b/i386/include/IOKit/IOReturn.h @@ -0,0 +1,137 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * HISTORY + */ + +/* + * Core IOReturn values. Others may be family defined. + */ + +#ifndef __IOKIT_IORETURN_H +#define __IOKIT_IORETURN_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +typedef kern_return_t IOReturn; + +#ifndef sys_iokit +#define sys_iokit err_system(0x38) +#endif /* sys_iokit */ +#define sub_iokit_common err_sub(0) +#define sub_iokit_usb err_sub(1) +#define sub_iokit_firewire err_sub(2) +#define sub_iokit_block_storage err_sub(4) +#define sub_iokit_graphics err_sub(5) +#define sub_iokit_networking err_sub(6) +#define sub_iokit_bluetooth err_sub(8) +#define sub_iokit_pmu err_sub(9) +#define sub_iokit_acpi err_sub(10) +#define sub_iokit_smbus err_sub(11) +#define sub_iokit_ahci err_sub(12) +#define sub_iokit_powermanagement err_sub(13) +//#define sub_iokit_hidsystem err_sub(14) +#define sub_iokit_scsi err_sub(16) +//#define sub_iokit_pccard err_sub(21) + +#define sub_iokit_vendor_specific err_sub(-2) +#define sub_iokit_reserved err_sub(-1) + +#define iokit_common_err(return) (sys_iokit|sub_iokit_common|return) +#define iokit_family_err(sub,return) (sys_iokit|sub|return) +#define iokit_vendor_specific_err(return) (sys_iokit|sub_iokit_vendor_specific|return) + +#define kIOReturnSuccess KERN_SUCCESS // OK +#define kIOReturnError iokit_common_err(0x2bc) // general error +#define kIOReturnNoMemory iokit_common_err(0x2bd) // can't allocate memory +#define kIOReturnNoResources iokit_common_err(0x2be) // resource shortage +#define kIOReturnIPCError iokit_common_err(0x2bf) // error during IPC +#define kIOReturnNoDevice iokit_common_err(0x2c0) // no such device +#define kIOReturnNotPrivileged iokit_common_err(0x2c1) // privilege violation +#define kIOReturnBadArgument iokit_common_err(0x2c2) // invalid argument +#define kIOReturnLockedRead iokit_common_err(0x2c3) // device read locked +#define kIOReturnLockedWrite iokit_common_err(0x2c4) // device write locked +#define kIOReturnExclusiveAccess iokit_common_err(0x2c5) // exclusive access and + // device already open +#define kIOReturnBadMessageID iokit_common_err(0x2c6) // sent/received messages + // had different msg_id +#define kIOReturnUnsupported iokit_common_err(0x2c7) // unsupported function +#define kIOReturnVMError iokit_common_err(0x2c8) // misc. VM failure +#define kIOReturnInternalError iokit_common_err(0x2c9) // internal error +#define kIOReturnIOError iokit_common_err(0x2ca) // General I/O error +//#define kIOReturn???Error iokit_common_err(0x2cb) // ??? +#define kIOReturnCannotLock iokit_common_err(0x2cc) // can't acquire lock +#define kIOReturnNotOpen iokit_common_err(0x2cd) // device not open +#define kIOReturnNotReadable iokit_common_err(0x2ce) // read not supported +#define kIOReturnNotWritable iokit_common_err(0x2cf) // write not supported +#define kIOReturnNotAligned iokit_common_err(0x2d0) // alignment error +#define kIOReturnBadMedia iokit_common_err(0x2d1) // Media Error +#define kIOReturnStillOpen iokit_common_err(0x2d2) // device(s) still open +#define kIOReturnRLDError iokit_common_err(0x2d3) // rld failure +#define kIOReturnDMAError iokit_common_err(0x2d4) // DMA failure +#define kIOReturnBusy iokit_common_err(0x2d5) // Device Busy +#define kIOReturnTimeout iokit_common_err(0x2d6) // I/O Timeout +#define kIOReturnOffline iokit_common_err(0x2d7) // device offline +#define kIOReturnNotReady iokit_common_err(0x2d8) // not ready +#define kIOReturnNotAttached iokit_common_err(0x2d9) // device not attached +#define kIOReturnNoChannels iokit_common_err(0x2da) // no DMA channels left +#define kIOReturnNoSpace iokit_common_err(0x2db) // no space for data +//#define kIOReturn???Error iokit_common_err(0x2dc) // ??? +#define kIOReturnPortExists iokit_common_err(0x2dd) // port already exists +#define kIOReturnCannotWire iokit_common_err(0x2de) // can't wire down + // physical memory +#define kIOReturnNoInterrupt iokit_common_err(0x2df) // no interrupt attached +#define kIOReturnNoFrames iokit_common_err(0x2e0) // no DMA frames enqueued +#define kIOReturnMessageTooLarge iokit_common_err(0x2e1) // oversized msg received + // on interrupt port +#define kIOReturnNotPermitted iokit_common_err(0x2e2) // not permitted +#define kIOReturnNoPower iokit_common_err(0x2e3) // no power to device +#define kIOReturnNoMedia iokit_common_err(0x2e4) // media not present +#define kIOReturnUnformattedMedia iokit_common_err(0x2e5)// media not formatted +#define kIOReturnUnsupportedMode iokit_common_err(0x2e6) // no such mode +#define kIOReturnUnderrun iokit_common_err(0x2e7) // data underrun +#define kIOReturnOverrun iokit_common_err(0x2e8) // data overrun +#define kIOReturnDeviceError iokit_common_err(0x2e9) // the device is not working properly! +#define kIOReturnNoCompletion iokit_common_err(0x2ea) // a completion routine is required +#define kIOReturnAborted iokit_common_err(0x2eb) // operation aborted +#define kIOReturnNoBandwidth iokit_common_err(0x2ec) // bus bandwidth would be exceeded +#define kIOReturnNotResponding iokit_common_err(0x2ed) // device not responding +#define kIOReturnIsoTooOld iokit_common_err(0x2ee) // isochronous I/O request for distant past! +#define kIOReturnIsoTooNew iokit_common_err(0x2ef) // isochronous I/O request for distant future +#define kIOReturnNotFound iokit_common_err(0x2f0) // data was not found +#define kIOReturnInvalid iokit_common_err(0x1) // should never be seen + +#ifdef __cplusplus +} +#endif + +#endif /* ! __IOKIT_IORETURN_H */ diff --git a/i386/include/IOKit/IOService.h b/i386/include/IOKit/IOService.h new file mode 100644 index 0000000..a965ea1 --- /dev/null +++ b/i386/include/IOKit/IOService.h @@ -0,0 +1,1690 @@ +/* + * Copyright (c) 1998-2009 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998,1999 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ +/*! + @header + This header contains the definition of the IOService class. IOService is the sole direct subclass of IORegistryEntry and is the base class of almost all I/O Kit family superclasses. IOService defines methods that support the life cycle of I/O Kit drivers. For more information on IOService, see {@linkdoc //apple_ref/doc/uid/TP0000011 I/O Kit Fundamentals}. + + @seealso //apple_ref/doc/header/IORegistryEntry.h IORegistryEntry +*/ + +#ifndef _IOKIT_IOSERVICE_H +#define _IOKIT_IOSERVICE_H + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +extern "C" { +#include +} + +#ifndef UINT64_MAX +#define UINT64_MAX 18446744073709551615ULL +#endif + +enum { + kIODefaultProbeScore = 0 +}; + +// masks for getState() +enum { + kIOServiceInactiveState = 0x00000001, + kIOServiceRegisteredState = 0x00000002, + kIOServiceMatchedState = 0x00000004, + kIOServiceFirstPublishState = 0x00000008, + kIOServiceFirstMatchState = 0x00000010 +}; + +enum { + // options for registerService() + kIOServiceExclusive = 0x00000001, + + // options for terminate() + kIOServiceRequired = 0x00000001, + kIOServiceTerminate = 0x00000004, + + // options for registerService() & terminate() + kIOServiceSynchronous = 0x00000002, + // options for registerService() + kIOServiceAsynchronous = 0x00000008 +}; + +// options for open() +enum { + kIOServiceSeize = 0x00000001, + kIOServiceFamilyOpenOptions = 0xffff0000 +}; + +// options for close() +enum { + kIOServiceFamilyCloseOptions = 0xffff0000 +}; + +typedef void * IONotificationRef; + +extern const IORegistryPlane * gIOServicePlane; +extern const IORegistryPlane * gIOPowerPlane; + +extern const OSSymbol * gIOResourcesKey; +extern const OSSymbol * gIOResourceMatchKey; +extern const OSSymbol * gIOProviderClassKey; +extern const OSSymbol * gIONameMatchKey; +extern const OSSymbol * gIONameMatchedKey; +extern const OSSymbol * gIOPropertyMatchKey; +extern const OSSymbol * gIOLocationMatchKey; +extern const OSSymbol * gIOParentMatchKey; +extern const OSSymbol * gIOPathMatchKey; +extern const OSSymbol * gIOMatchCategoryKey; +extern const OSSymbol * gIODefaultMatchCategoryKey; +extern const OSSymbol * gIOMatchedServiceCountKey; + +extern const OSSymbol * gIOUserClientClassKey; +extern const OSSymbol * gIOKitDebugKey; +extern const OSSymbol * gIOServiceKey; + +extern const OSSymbol * gIOCommandPoolSizeKey; + +extern const OSSymbol * gIOPublishNotification; +extern const OSSymbol * gIOFirstPublishNotification; +extern const OSSymbol * gIOMatchedNotification; +extern const OSSymbol * gIOFirstMatchNotification; +extern const OSSymbol * gIOTerminatedNotification; + +extern const OSSymbol * gIOGeneralInterest; +extern const OSSymbol * gIOBusyInterest; +extern const OSSymbol * gIOOpenInterest; +extern const OSSymbol * gIOAppPowerStateInterest; +extern const OSSymbol * gIOPriorityPowerStateInterest; + +extern const OSSymbol * gIODeviceMemoryKey; +extern const OSSymbol * gIOInterruptControllersKey; +extern const OSSymbol * gIOInterruptSpecifiersKey; + +extern SInt32 IOServiceOrdering( const OSMetaClassBase * inObj1, const OSMetaClassBase * inObj2, void * ref ); + +typedef void (*IOInterruptAction)( OSObject * target, void * refCon, + IOService * nub, int source ); + +/*! @typedef IOServiceNotificationHandler + @param target Reference supplied when the notification was registered. + @param refCon Reference constant supplied when the notification was registered. + @param newService The IOService object the notification is delivering. It is retained for the duration of the handler's invocation and doesn't need to be released by the handler. */ + +typedef bool (*IOServiceNotificationHandler)( void * target, void * refCon, + IOService * newService ); + +typedef bool (*IOServiceMatchingNotificationHandler)( void * target, void * refCon, + IOService * newService, + IONotifier * notifier ); + +/*! @typedef IOServiceInterestHandler + @param target Reference supplied when the notification was registered. + @param refCon Reference constant supplied when the notification was registered. + @param messageType Type of the message - IOKit defined in IOKit/IOMessage.h or family specific. + @param provider The IOService object who is delivering the notification. It is retained for the duration of the handler's invocation and doesn't need to be released by the handler. + @param messageArgument An argument for message, dependent on its type. + @param argSize Non zero if the argument represents a struct of that size, used when delivering messages outside the kernel. */ + +typedef IOReturn (*IOServiceInterestHandler)( void * target, void * refCon, + UInt32 messageType, IOService * provider, + void * messageArgument, vm_size_t argSize ); + +typedef void (*IOServiceApplierFunction)(IOService * service, void * context); +typedef void (*OSObjectApplierFunction)(OSObject * object, void * context); + +class IOUserClient; +class IOPlatformExpert; + +/*! @class IOService + @abstract The base class for most I/O Kit families, devices, and drivers. + @discussion The IOService base class defines APIs used to publish services, instantiate other services based on the existance of a providing service (ie. driver stacking), destroy a service and its dependent stack, notify interested parties of service state changes, and general utility functions useful across all families. + +Types of service are specified with a matching dictionary that describes properties of the service. For example, a matching dictionary might describe any IOUSBDevice (or subclass), an IOUSBDevice with a certain class code, or a IOPCIDevice with a set of OpenFirmware matching names or device & vendor IDs. Since the matching dictionary is interpreted by the family which created the service, as well as generically by IOService, the list of properties considered for matching depends on the familiy. + +Matching dictionaries are associated with IOService classes by the catalogue, as driver property tables, and also supplied by clients of the notification APIs. + +IOService provides matching based on C++ class (via OSMetaClass dynamic casting), registry entry name, a registry path to the service (which includes OpenFirmware paths), a name assigned by BSD, or by its location (its point of attachment). + +

Driver Instantiation by IOService

+ +Drivers are subclasses of IOService, and their availability is managed through the catalogue. They are instantiated based on the publication of an IOService they use (for example, an IOPCIDevice or IOUSBDevice), or when they are added to the catalogue and the IOService(s) they use are already available. + +When an IOService (the "provider") is published with the @link registerService registerService@/link method, the matching and probing process begins, which is always single threaded per provider. A list of matching dictionaries from the catalog and installed publish notification requests, that successfully match the IOService, is constructed, with ordering supplied by kIOProbeScoreKey ("IOProbeScore") property in the dictionary, or supplied with the notification. + +Each entry in the list is then processed in order - for notifications, the notification is delivered, for driver property tables a lot more happens. + +The driver class is instantiated and init() called with its property table. The new driver instance is then attached to the provider, and has its @link probe probe@/link method called with the provider as an argument. The default probe method does nothing but return success, but a driver may implement this method to interrogate the provider to make sure it can work with it. It may also modify its probe score at this time. After probe, the driver is detached and the next in the list is considered (ie. attached, probed, and detached). + +When the probing phase is complete, the list consists of successfully probed drivers, in order of their probe score (after adjustment during the @link probe probe@/link call). The list is then divided into categories based on the kIOMatchCategoryKey property ("IOMatchCategory"); drivers without a match category are all considered in one default category. Match categories allow multiple clients of a provider to be attached and started, though the provider may also enforce open/close semantics to gain active access to it. + +For each category, the highest scoring driver in that category is attached to the provider, and its @link start start@/link method called. If start is successful, the rest of the drivers in the same match category are discarded, otherwise the next highest scoring driver is started, and so on. + +The driver should only consider itself in action when the start method is called, meaning it has been selected for use on the provider, and consuming that particular match category. It should also be prepared to be allocated, probed and freed even if the probe was successful. + +After the drivers have all synchronously been started, the installed "matched" notifications that match the registered IOService are delivered. + +

Properties used by IOService

+ + kIOClassKey, extern const OSSymbol * gIOClassKey, "IOClass" +
+
+Class of the driver to instantiate on matching providers. +
+
+ kIOProviderClassKey, extern const OSSymbol * gIOProviderClassKey, "IOProviderClass" +
+
+Class of the provider(s) to be considered for matching, checked with OSDynamicCast so subclasses will also match. +
+
+ kIOProbeScoreKey, extern const OSSymbol * gIOProbeScoreKey, "IOProbeScore" +
+
+The probe score initially used to order multiple matching drivers. +
+
+ kIOMatchCategoryKey, extern const OSSymbol * gIOMatchCategoryKey, "IOMatchCategory" +
+
+A string defining the driver category for matching purposes. All drivers with no IOMatchCategory property are considered to be in the same default category. Only one driver in a category can be started on each provider. +
+
+ kIONameMatchKey, extern const OSSymbol * gIONameMatchKey, "IONameMatch" +
+A string or collection of strings that match the provider's name. The comparison is implemented with the @link //apple_ref/cpp/instm/IORegistryEntry/compareNames/virtualbool/(OSObject*,OSString**) IORegistryEntry::compareNames@/link method, which supports a single string, or any collection (OSArray, OSSet, OSDictionary etc.) of strings. IOService objects with OpenFirmware device tree properties (eg. IOPCIDevice) will also be matched based on that standard's "compatible", "name", "device_type" properties. The matching name will be left in the driver's property table in the kIONameMatchedKey property. +
+Examples +

+@textblock
+	IONameMatch
+	pci106b,7
+@/textblock
+
+ +For a list of possible matching names, a serialized array of strings should used, eg. +
+@textblock
+	IONameMatch
+	
+		APPL,happy16
+		pci106b,7
+	
+@/textblock
+
+ +
+ kIONameMatchedKey, extern const OSSymbol * gIONameMatchedKey, "IONameMatched" +
+The name successfully matched name from the kIONameMatchKey property will be left in the driver's property table as the kIONameMatchedKey property. +
+
+ kIOPropertyMatchKey, extern const OSSymbol * gIOPropertyMatchKey, "IOPropertyMatch" +
+A dictionary of properties that each must exist in the matching IOService and compare successfully with the isEqualTo method. + +
+@textblock
+	IOPropertyMatch
+	
+		APPL,happy16
+		APPL,meek8
+	
+@/textblock
+
+ +
+ kIOUserClientClassKey, extern const OSSymbol * gIOUserClientClassKey, "IOUserClientClass" +
+The class name that the service will attempt to allocate when a user client connection is requested. First the device nub is queried, then the nub's provider is queried by default. +
+
+ kIOKitDebugKey, extern const OSSymbol * gIOKitDebugKey, "IOKitDebug" +
+Set some debug flags for logging the driver loading process. Flags are defined in IOKit/IOKitDebug.h, but 65535 works well.*/ + +class IOService : public IORegistryEntry +{ + OSDeclareDefaultStructors(IOService) + +protected: +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of this class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * reserved; + +private: + IOService * __provider; + SInt32 __providerGeneration; + IOService * __owner; + IOOptionBits __state[2]; + uint64_t __timeBusy; + uint64_t __accumBusy; + IOServicePM * pwrMgt; + +protected: + // TRUE once PMinit has been called + bool initialized; + +public: + // DEPRECATED + void * pm_vars; + +public: + /* methods available in Mac OS X 10.1 or later */ +/*! @function requestTerminate + @abstract Passes a termination up the stack. + @discussion When an IOService is made inactive the default behavior is to also make any of its clients that have it as their only provider also inactive, in this way recursing the termination up the driver stack. This method allows an IOService object to override this behavior. Returning true from this method when passed a just terminated provider will cause the client to also be terminated. + @param provider The terminated provider of this object. + @param options Options originally passed to terminate, plus kIOServiceRecursing. + @result true if this object should be terminated now that its provider has been. */ + + virtual bool requestTerminate( IOService * provider, IOOptionBits options ); + +/*! @function willTerminate + @abstract Passes a termination up the stack. + @discussion Notification that a provider has been terminated, sent before recursing up the stack, in root-to-leaf order. + @param provider The terminated provider of this object. + @param options Options originally passed to terminate. + @result true. */ + + virtual bool willTerminate( IOService * provider, IOOptionBits options ); + +/*! @function didTerminate + @abstract Passes a termination up the stack. + @discussion Notification that a provider has been terminated, sent after recursing up the stack, in leaf-to-root order. + @param provider The terminated provider of this object. + @param options Options originally passed to terminate. + @param defer If there is pending I/O that requires this object to persist, and the provider is not opened by this object set defer to true and call the IOService::didTerminate() implementation when the I/O completes. Otherwise, leave defer set to its default value of false. + @result true. */ + + virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer ); + +/*! @function nextIdleTimeout + @availability Mac OS X v10.4 and later + @abstract Allows subclasses to customize idle power management behavior. + @discussion Returns the next time that the device should idle into its next lower power state. Subclasses may override for custom idle behavior. + + A power managed driver might override this method to provide a more sophisticated idle power off algorithm than the one defined by power management. + @param currentTime The current time + @param lastActivity The time of last activity on this device + @param powerState The device's current power state. + @result Returns the next time the device should idle off (in seconds, relative to the current time). */ + + virtual SInt32 nextIdleTimeout(AbsoluteTime currentTime, + AbsoluteTime lastActivity, unsigned int powerState); + +/*! @function systemWillShutdown + @availability Mac OS X v10.5 and later + @abstract Notifies members of the power plane of system shutdown and restart. + @discussion This function is called for all members of the power plane in leaf-to-root order. If a subclass needs to wait for a pending I/O, then the call to systemWillShutdown should be postponed until the I/O completes. + + Any power managed driver (which has called @link joinPMtree joinPMtree@/link to join the power plane) interested in taking action at system shutdown or restart should override this method. + @param specifier kIOMessageSystemWillPowerOff or kIOMessageSystemWillRestart. */ + + virtual void systemWillShutdown( IOOptionBits specifier ); + +/*! @function copyClientWithCategory + @availability Mac OS X v10.6 and later + @param category An OSSymbol corresponding to an IOMatchCategory matching property. + @result Returns a reference to the IOService child with the given category. The result should be released by the caller. +*/ + + virtual IOService * copyClientWithCategory( const OSSymbol * category ); + +private: +#if __LP64__ + OSMetaClassDeclareReservedUnused(IOService, 0); + OSMetaClassDeclareReservedUnused(IOService, 1); + OSMetaClassDeclareReservedUnused(IOService, 2); + OSMetaClassDeclareReservedUnused(IOService, 3); + OSMetaClassDeclareReservedUnused(IOService, 4); + OSMetaClassDeclareReservedUnused(IOService, 5); +#else + OSMetaClassDeclareReservedUsed(IOService, 0); + OSMetaClassDeclareReservedUsed(IOService, 1); + OSMetaClassDeclareReservedUsed(IOService, 2); + OSMetaClassDeclareReservedUsed(IOService, 3); + OSMetaClassDeclareReservedUsed(IOService, 4); + OSMetaClassDeclareReservedUsed(IOService, 5); +#endif + + OSMetaClassDeclareReservedUnused(IOService, 6); + OSMetaClassDeclareReservedUnused(IOService, 7); + OSMetaClassDeclareReservedUnused(IOService, 8); + OSMetaClassDeclareReservedUnused(IOService, 9); + OSMetaClassDeclareReservedUnused(IOService, 10); + OSMetaClassDeclareReservedUnused(IOService, 11); + OSMetaClassDeclareReservedUnused(IOService, 12); + OSMetaClassDeclareReservedUnused(IOService, 13); + OSMetaClassDeclareReservedUnused(IOService, 14); + OSMetaClassDeclareReservedUnused(IOService, 15); + OSMetaClassDeclareReservedUnused(IOService, 16); + OSMetaClassDeclareReservedUnused(IOService, 17); + OSMetaClassDeclareReservedUnused(IOService, 18); + OSMetaClassDeclareReservedUnused(IOService, 19); + OSMetaClassDeclareReservedUnused(IOService, 20); + OSMetaClassDeclareReservedUnused(IOService, 21); + OSMetaClassDeclareReservedUnused(IOService, 22); + OSMetaClassDeclareReservedUnused(IOService, 23); + OSMetaClassDeclareReservedUnused(IOService, 24); + OSMetaClassDeclareReservedUnused(IOService, 25); + OSMetaClassDeclareReservedUnused(IOService, 26); + OSMetaClassDeclareReservedUnused(IOService, 27); + OSMetaClassDeclareReservedUnused(IOService, 28); + OSMetaClassDeclareReservedUnused(IOService, 29); + OSMetaClassDeclareReservedUnused(IOService, 30); + OSMetaClassDeclareReservedUnused(IOService, 31); + OSMetaClassDeclareReservedUnused(IOService, 32); + OSMetaClassDeclareReservedUnused(IOService, 33); + OSMetaClassDeclareReservedUnused(IOService, 34); + OSMetaClassDeclareReservedUnused(IOService, 35); + OSMetaClassDeclareReservedUnused(IOService, 36); + OSMetaClassDeclareReservedUnused(IOService, 37); + OSMetaClassDeclareReservedUnused(IOService, 38); + OSMetaClassDeclareReservedUnused(IOService, 39); + OSMetaClassDeclareReservedUnused(IOService, 40); + OSMetaClassDeclareReservedUnused(IOService, 41); + OSMetaClassDeclareReservedUnused(IOService, 42); + OSMetaClassDeclareReservedUnused(IOService, 43); + OSMetaClassDeclareReservedUnused(IOService, 44); + OSMetaClassDeclareReservedUnused(IOService, 45); + OSMetaClassDeclareReservedUnused(IOService, 46); + OSMetaClassDeclareReservedUnused(IOService, 47); + +#ifdef __ppc__ + OSMetaClassDeclareReservedUnused(IOService, 48); + OSMetaClassDeclareReservedUnused(IOService, 49); + OSMetaClassDeclareReservedUnused(IOService, 50); + OSMetaClassDeclareReservedUnused(IOService, 51); + OSMetaClassDeclareReservedUnused(IOService, 52); + OSMetaClassDeclareReservedUnused(IOService, 53); + OSMetaClassDeclareReservedUnused(IOService, 54); + OSMetaClassDeclareReservedUnused(IOService, 55); + OSMetaClassDeclareReservedUnused(IOService, 56); + OSMetaClassDeclareReservedUnused(IOService, 57); + OSMetaClassDeclareReservedUnused(IOService, 58); + OSMetaClassDeclareReservedUnused(IOService, 59); + OSMetaClassDeclareReservedUnused(IOService, 60); + OSMetaClassDeclareReservedUnused(IOService, 61); + OSMetaClassDeclareReservedUnused(IOService, 62); + OSMetaClassDeclareReservedUnused(IOService, 63); +#endif + +public: +/*! @function getState + @abstract Accessor for IOService state bits, not normally needed or used outside IOService. + @result State bits for the IOService, eg. kIOServiceInactiveState, kIOServiceRegisteredState. */ + + virtual IOOptionBits getState( void ) const; + +/*! @function isInactive + @abstract Checks if the IOService object has been terminated, and is in the process of being destroyed. + @discussion When an IOService object is successfully terminated, it is immediately made inactive, which blocks further attach()es, matching or notifications occuring on the object. It remains inactive until the last client closes, and is then finalized and destroyed. + @result true if the IOService object has been terminated. */ + + bool isInactive( void ) const; + + /* Stack creation */ + +/*! @function registerService + @abstract Starts the registration process for a newly discovered IOService object. + @discussion This function allows an IOService subclass to be published and made available to possible clients, by starting the registration process and delivering notifications to registered clients. The object should be completely setup and ready to field requests from clients before registerService is called. + @param options The default zero options mask is recommended and should be used in most cases. The registration process is usually asynchronous, with possible driver probing and notification occurring some time later. kIOServiceSynchronous may be passed to carry out the matching and notification process for currently registered clients before returning to the caller. */ + + virtual void registerService( IOOptionBits options = 0 ); + +/*! @function probe + @abstract During an IOService object's instantiation, probes a matched service to see if it can be used. + @discussion The registration process for an IOService object (the provider) includes instantiating possible driver clients. The probe method is called in the client instance to check the matched service can be used before the driver is considered to be started. Since matching screens many possible providers, in many cases the probe method can be left unimplemented by IOService subclasses. The client is already attached to the provider when probe is called. + @param provider The registered IOService object that matches a driver personality's matching dictionary. + @param score Pointer to the current driver's probe score, which is used to order multiple matching drivers in the same match category. It defaults to the value of the IOProbeScore property in the drivers property table, or kIODefaultProbeScore if none is specified. The probe method may alter the score to affect start order. + @result An IOService instance or zero when the probe is unsuccessful. In almost all cases the value of this is returned on success. If another IOService object is returned, the probed instance is detached and freed, and the returned instance is used in its stead for start. */ + + virtual IOService * probe( IOService * provider, + SInt32 * score ); + +/*! @function start + @abstract During an IOService object's instantiation, starts the IOService object that has been selected to run on the provider. + @discussion The start method of an IOService instance is called by its provider when it has been selected (due to its probe score and match category) as the winning client. The client is already attached to the provider when start is called.
Implementations of start must call start on their superclass at an appropriate point. If an implementation of start has already called super::start but subsequently determines that it will fail, it must call super::stop to balance the prior call to super::start and prevent reference leaks. + @result true if the start was successful; false otherwise (which will cause the instance to be detached and usually freed). */ + + virtual bool start( IOService * provider ); + +/*! @function stop + @abstract During an IOService termination, the stop method is called in its clients before they are detached & it is destroyed. + @discussion The termination process for an IOService (the provider) will call stop in each of its clients, after they have closed the provider if they had it open, or immediately on termination. */ + + virtual void stop( IOService * provider ); + + /* Open / Close */ + +/*! @function open + @abstract Requests active access to a provider. + @discussion IOService provides generic open and close semantics to track clients of a provider that have established an active datapath. The use of open and @link close close@/link, and rules regarding ownership are family defined, and defined by the @link handleOpen handleOpen@/link and @link handleClose handleClose@/link methods in the provider. Some families will limit access to a provider based on its open state. + @param forClient Designates the client of the provider requesting the open. + @param options Options for the open. The provider family may implement options for open; IOService defines only kIOServiceSeize to request the device be withdrawn from its current owner. + @result true if the open was successful; false otherwise. */ + + virtual bool open( IOService * forClient, + IOOptionBits options = 0, + void * arg = 0 ); + +/*! @function close + @abstract Releases active access to a provider. + @discussion IOService provides generic open and close semantics to track clients of a provider that have established an active datapath. The use of @link open open@/link and close, and rules regarding ownership are family defined, and defined by the @link handleOpen handleOpen@/link and @link handleClose handleClose@/link methods in the provider. + @param forClient Designates the client of the provider requesting the close. + @param options Options available for the close. The provider family may implement options for close; IOService defines none. + @param arg Family specific arguments which are ignored by IOService. */ + + virtual void close( IOService * forClient, + IOOptionBits options = 0 ); + +/*! @function isOpen + @abstract Determines whether a specific, or any, client has an IOService object open. + @discussion Returns the open state of an IOService object with respect to the specified client, or when it is open by any client. + @param forClient If non-zero, open. The object is locked via @link lockForArbitration lockForArbitration@/link before handleOpen is called. + @param forClient Designates the client of the provider requesting the open. + @param options Options for the open, may be interpreted by the implementor of handleOpen. + @result trueif the open was successful; false otherwise. */ + + virtual bool handleOpen( IOService * forClient, + IOOptionBits options, + void * arg ); + +/*! @function handleClose + @abstract Controls the open / close behavior of an IOService object (overrideable by subclasses). + @discussion IOService calls this method in its subclasses in response to the @link close close@/link method, so the subclass may implement the request. The default implementation provides single owner access to an IOService object via @link open open@/link. The object is locked via @link lockForArbitration lockForArbitration@/link before handleClose is called. + @param forClient Designates the client of the provider requesting the close. + @param options Options for the close, may be interpreted by the implementor of @link handleOpen handleOpen@/link. */ + + virtual void handleClose( IOService * forClient, + IOOptionBits options ); + +/*! @function handleIsOpen + @abstract Controls the open / close behavior of an IOService object (overrideable by subclasses). + @discussion IOService calls this method in its subclasses in response to the @link open open@/link method, so the subclass may implement the request. The default implementation provides single owner access to an IOService object via @link open open@/link. The object is locked via @link lockForArbitration lockForArbitration@/link before handleIsOpen is called. + @param forClient If non-zero, isOpen returns the open state for that client. If zero is passed, isOpen returns the open state for all clients. + @result true if the specific, or any, client has the IOService object open. */ + + virtual bool handleIsOpen( const IOService * forClient ) const; + + /* Stacking change */ + +/*! @function terminate + @abstract Makes an IOService object inactive and begins its destruction. + @discussion Registering an IOService object informs possible clients of its existance and instantiates drivers that may be used with it; terminate involves the opposite process of informing clients that an IOService object is no longer able to be used and will be destroyed. By default, if any client has the service open, terminate fails. If the kIOServiceRequired flag is passed however, terminate will be successful though further progress in the destruction of the IOService object will not proceed until the last client has closed it. The service will be made inactive immediately upon successful termination, and all its clients will be notified via their @link message message@/link method with a message of type kIOMessageServiceIsTerminated. Both these actions take place on the caller's thread. After the IOService object is made inactive, further matching or attach calls will fail on it. Each client has its @link stop stop@/link method called upon their close of an inactive IOService object , or on its termination if they do not have it open. After stop, @link detach detach@/link is called in each client. When all clients have been detached, the @link finalize finalize@/link method is called in the inactive service. The termination process is inherently asynchronous because it will be deferred until all clients have chosen to close. + @param options In most cases no options are needed. kIOServiceSynchronous may be passed to cause terminate to not return until the service is finalized. */ + + virtual bool terminate( IOOptionBits options = 0 ); + +/*! @function finalize + @abstract Finalizes the destruction of an IOService object. + @discussion The finalize method is called in an inactive (ie. terminated) IOService object after the last client has detached. IOService's implementation will call @link stop stop@/link, @link close close@/link, and @link detach detach@/link on each provider. When finalize returns, the object's retain count will have no references generated by IOService's registration process. + @param options The options passed to the @link terminate terminate@/link method of the IOService object are passed on to finalize. + @result true. */ + + virtual bool finalize( IOOptionBits options ); + +/*! @function free + @abstract Frees data structures that were allocated when power management was initialized on this service. */ + + virtual void free( void ); + +/*! @function lockForArbitration + @abstract Locks an IOService object against changes in state or ownership. + @discussion The registration, termination and open / close functions of IOService use lockForArbtration to single-thread access to an IOService object. lockForArbitration grants recursive access to the same thread. + @param isSuccessRequired If a request for access to an IOService object should be denied if it is terminated, pass false, otherwise pass true. */ + + virtual bool lockForArbitration( bool isSuccessRequired = true ); + +/*! @function unlockForArbitration + @abstract Unlocks an IOService obkect after a successful @link lockForArbitration lockForArbitration@/link. + @discussion A thread granted exclusive access to an IOService object should release it with unlockForArbitration. */ + + virtual void unlockForArbitration( void ); + +/*! @function terminateClient + @abstract Passes a termination up the stack. + @discussion When an IOService object is made inactive the default behavior is to also make any of its clients that have it as their only provider inactive, in this way recursing the termination up the driver stack. This method allows a terminated IOService object to override this behavior. Note the client may also override this behavior by overriding its @link terminate terminate@/link method. + @param client The client of the terminated provider. + @param options Options originally passed to @link terminate terminate@/link, plus kIOServiceRecursing. + @result result of the terminate request on the client. */ + + virtual bool terminateClient( IOService * client, IOOptionBits options ); + + /* Busy state indicates discovery, matching or termination is in progress */ + +/*! @function getBusyState + @abstract Returns the busyState of an IOService object. + @discussion Many activities in IOService are asynchronous. When registration, matching, or termination is in progress on an IOService object, its busyState is increased by one. Change in busyState to or from zero also changes the IOService object's provider's busyState by one, which means that an IOService object is marked busy when any of the above activities is ocurring on it or any of its clients. + @result The busyState value. */ + + virtual UInt32 getBusyState( void ); + +/*! @function adjustBusy + @abstract Adjusts the busyState of an IOService object. + @discussion Applies a delta to an IOService object's busyState. A change in the busyState to or from zero will change the IOService object's provider's busyState by one (in the same direction). + @param delta The delta to be applied to the IOService object's busyState. */ + + virtual void adjustBusy( SInt32 delta ); + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + IOReturn waitQuiet(mach_timespec_t * timeout) + APPLE_KEXT_DEPRECATED; + +/*! @function waitQuiet + @abstract Waits for an IOService object's busyState to be zero. + @discussion Blocks the caller until an IOService object is non busy. + @param timeout The maximum time to wait in nanoseconds. Default is to wait forever. + @result Returns an error code if Mach synchronization primitives fail, kIOReturnTimeout, or kIOReturnSuccess. */ + + IOReturn waitQuiet(uint64_t timeout = UINT64_MAX); + + /* Matching */ + +/*! @function matchPropertyTable + @abstract Allows a registered IOService object to implement family specific matching. + @discussion All matching on an IOService object will call this method to allow a family writer to implement matching in addition to the generic methods provided by IOService. The implementer should examine the matching dictionary passed to see if it contains properties the family understands for matching, and use them to match with the IOService object if so. Note that since matching is also carried out by other parts of the I/O Kit, the matching dictionary may contain properties the family does not understand - these should not be considered matching failures. + @param table The dictionary of properties to be matched against. + @param score Pointer to the current driver's probe score, which is used to order multiple matching drivers in the same match category. It defaults to the value of the IOProbeScore property in the drivers property table, or kIODefaultProbeScore if none is specified. + @result false if the family considers the matching dictionary does not match in properties it understands; true otherwise. */ + + virtual bool matchPropertyTable( OSDictionary * table, + SInt32 * score ); + + virtual bool matchPropertyTable( OSDictionary * table ); + +/*! @function matchLocation + @abstract Allows a registered IOService object to direct location matching. + @discussion By default, a location matching property will be applied to an IOService object's provider. This method allows that behavior to be overridden by families. + @param client The IOService object at which matching is taking place. + @result Returns the IOService instance to be used for location matching. */ + + virtual IOService * matchLocation( IOService * client ); + + /* Resource service */ + +/*! @function publishResource + @abstract Uses the resource service to publish a property. + @discussion The resource service uses IOService's matching and notification to allow objects to be published and found by any I/O Kit client by a global name. publishResource makes an object available to anyone waiting for it or looking for it in the future. + @param key An OSSymbol key that globally identifies the object. + @param The object to be published. */ + + static void publishResource( const OSSymbol * key, OSObject * value = 0 ); + +/*! @function publishResource + @abstract Uses the resource service to publish a property. + @discussion The resource service uses IOService object's matching and notification to allow objects to be published and found by any I/O Kit client by a global name. publishResource makes an object available to anyone waiting for it or looking for it in the future. + @param key A C string key that globally identifies the object. + @param The object to be published. */ + + static void publishResource( const char * key, OSObject * value = 0 ); + virtual bool addNeededResource( const char * key ); + + /* Notifications */ + +/*! @function addNotification + @abstract Deprecated use addMatchingNotification(). Adds a persistant notification handler to be notified of IOService events. + @discussion IOService will deliver notifications of changes in state of an IOService object to registered clients. The type of notification is specified by a symbol, for example gIOMatchedNotification or gIOTerminatedNotification, and notifications will only include IOService objects that match the supplied matching dictionary. Notifications are ordered by a priority set with addNotification. When the notification is installed, its handler will be called with each of any currently existing IOService objects that are in the correct state (eg. registered) and match the supplied matching dictionary, avoiding races between finding preexisting and new IOService events. The notification request is identified by an instance of an IONotifier object, through which it can be enabled, disabled, or removed. addNotification consumes a retain count on the matching dictionary when the notification is removed. + @param type An OSSymbol identifying the type of notification and IOService state: +
gIOPublishNotification Delivered when an IOService object is registered. +
gIOFirstPublishNotification Delivered when an IOService object is registered, but only once per IOService instance. Some IOService objects may be reregistered when their state is changed. +
gIOMatchedNotification Delivered when an IOService object has been matched with all client drivers, and they have been probed and started. +
gIOFirstMatchNotification Delivered when an IOService object has been matched with all client drivers, but only once per IOService instance. Some IOService objects may be reregistered when their state is changed. +
gIOTerminatedNotification Delivered after an IOService object has been terminated, during its finalize stage. + @param matching A matching dictionary to restrict notifications to only matching IOService objects. The dictionary will be released when the notification is removed, consuming the passed-in reference. + @param handler A C function callback to deliver notifications. + @param target An instance reference for the callback's use. + @param ref A reference constant for the callback's use. + @param priority A constant ordering all notifications of a each type. + @result An instance of an IONotifier object that can be used to control or destroy the notification request. */ + + static IONotifier * addNotification( + const OSSymbol * type, OSDictionary * matching, + IOServiceNotificationHandler handler, + void * target, void * ref = 0, + SInt32 priority = 0 ) + APPLE_KEXT_DEPRECATED; + +/*! @function addMatchingNotification + @abstract Adds a persistant notification handler to be notified of IOService events. + @discussion IOService will deliver notifications of changes in state of an IOService object to registered clients. The type of notification is specified by a symbol, for example gIOMatchedNotification or gIOTerminatedNotification, and notifications will only include IOService objects that match the supplied matching dictionary. Notifications are ordered by a priority set with addNotification. When the notification is installed, its handler will be called with each of any currently existing IOService objects that are in the correct state (eg. registered) and match the supplied matching dictionary, avoiding races between finding preexisting and new IOService events. The notification request is identified by an instance of an IONotifier object, through which it can be enabled, disabled, or removed. addMatchingNotification does not consume a reference on the matching dictionary when the notification is removed, unlike addNotification. + @param type An OSSymbol identifying the type of notification and IOService state: +
gIOPublishNotification Delivered when an IOService object is registered. +
gIOFirstPublishNotification Delivered when an IOService object is registered, but only once per IOService instance. Some IOService objects may be reregistered when their state is changed. +
gIOMatchedNotification Delivered when an IOService object has been matched with all client drivers, and they have been probed and started. +
gIOFirstMatchNotification Delivered when an IOService object has been matched with all client drivers, but only once per IOService instance. Some IOService objects may be reregistered when their state is changed. +
gIOTerminatedNotification Delivered after an IOService object has been terminated, during its finalize stage. + @param matching A matching dictionary to restrict notifications to only matching IOService objects. The dictionary is retained while the notification is installed. (Differs from addNotification). + @param handler A C function callback to deliver notifications. + @param target An instance reference for the callback's use. + @param ref A reference constant for the callback's use. + @param priority A constant ordering all notifications of a each type. + @result An instance of an IONotifier object that can be used to control or destroy the notification request. */ + + static IONotifier * addMatchingNotification( + const OSSymbol * type, OSDictionary * matching, + IOServiceMatchingNotificationHandler handler, + void * target, void * ref = 0, + SInt32 priority = 0 ); + +/*! @function waitForService + @abstract Deprecated use waitForMatchingService(). Waits for a matching to service to be published. + @discussion Provides a method of waiting for an IOService object matching the supplied matching dictionary to be registered and fully matched. + @param matching The matching dictionary describing the desired IOService object. waitForService consumes one reference of the matching dictionary. + @param timeout The maximum time to wait. + @result A published IOService object matching the supplied dictionary. */ + + static IOService * waitForService( OSDictionary * matching, + mach_timespec_t * timeout = 0); + +/*! @function waitForMatchingService + @abstract Waits for a matching to service to be published. + @discussion Provides a method of waiting for an IOService object matching the supplied matching dictionary to be registered and fully matched. + @param matching The matching dictionary describing the desired IOService object. (Does not consume a reference of the matching dictionary - differs from waitForService() which does consume a reference on the matching dictionary.) + @param timeout The maximum time to wait in nanoseconds. Default is to wait forever. + @result A published IOService object matching the supplied dictionary. waitForMatchingService returns a reference to the IOService which should be released by the caller. (Differs from waitForService() which does not retain the returned object.) */ + + static IOService * waitForMatchingService( OSDictionary * matching, + uint64_t timeout = UINT64_MAX); + +/*! @function getMatchingServices + @abstract Finds the set of current published IOService objects matching a matching dictionary. + @discussion Provides a method of finding the current set of published IOService objects matching the supplied matching dictionary. + @param matching The matching dictionary describing the desired IOService objects. + @result An instance of an iterator over a set of IOService objects. To be released by the caller. */ + + static OSIterator * getMatchingServices( OSDictionary * matching ); + +public: + /* Helpers to make matching dictionaries for simple cases, + * they add keys to an existing dictionary, or create one. */ + +/*! @function serviceMatching + @abstract Creates a matching dictionary, or adds matching properties to an existing dictionary, that specify an IOService class match. + @discussion A very common matching criteria for IOService object is based on its class. serviceMatching creates a matching dictionary that specifies any IOService object of a class, or its subclasses. The class is specified by name, and an existing dictionary may be passed in, in which case the matching properties will be added to that dictionary rather than creating a new one. + @param className The class name, as a const C string. Class matching is successful on IOService objects of this class or any subclass. + @param table If zero, serviceMatching creates a matching dictionary and returns a reference to it, otherwise the matching properties are added to the specified dictionary. + @result The matching dictionary created, or passed in, is returned on success, or zero on failure. */ + + static OSDictionary * serviceMatching( const char * className, + OSDictionary * table = 0 ); + +/*! @function serviceMatching + @abstract Creates a matching dictionary, or adds matching properties to an existing dictionary, that specify an IOService class match. + @discussion A very common matching criteria for IOService object is based on its class. serviceMatching creates a matching dictionary that specifies any IOService of a class, or its subclasses. The class is specified by name, and an existing dictionary may be passed in, in which case the matching properties will be added to that dictionary rather than creating a new one. + @param className The class name, as an OSString (which includes OSSymbol). Class matching is successful on IOService objects of this class or any subclass. + @param table If zero, serviceMatching creates a matching dictionary and returns a reference to it, otherwise the matching properties are added to the specified dictionary. + @result The matching dictionary created, or passed in, is returned on success, or zero on failure. */ + + static OSDictionary * serviceMatching( const OSString * className, + OSDictionary * table = 0 ); + +/*! @function nameMatching + @abstract Creates a matching dictionary, or adds matching properties to an existing dictionary, that specify an IOService name match. + @discussion A very common matching criteria for IOService object is based on its name. nameMatching creates a matching dictionary that specifies any IOService object which responds successfully to the @link //apple_ref/cpp/instm/IORegistryEntry/compareName/virtualbool/(OSString*,OSString**) IORegistryEntry::compareName@/link method. An existing dictionary may be passed in, in which case the matching properties will be added to that dictionary rather than creating a new one. + @param name The service's name, as a const C string. Name matching is successful on IOService objects that respond successfully to the IORegistryEntry::compareName method. + @param table If zero, nameMatching creates a matching dictionary and returns a reference to it, otherwise the matching properties are added to the specified dictionary. + @result The matching dictionary created, or passed in, is returned on success, or zero on failure. */ + + static OSDictionary * nameMatching( const char * name, + OSDictionary * table = 0 ); + +/*! @function nameMatching + @abstract Creates a matching dictionary, or adds matching properties to an existing dictionary, that specify an IOService name match. + @discussion A very common matching criteria for IOService object is based on its name. nameMatching creates a matching dictionary that specifies any IOService object which responds successfully to the @link //apple_ref/cpp/instm/IORegistryEntry/compareName/virtualbool/(OSString*,OSString**) IORegistryEntry::compareName@/link method. An existing dictionary may be passed in, in which case the matching properties will be added to that dictionary rather than creating a new one. + @param name The service's name, as an OSString (which includes OSSymbol). Name matching is successful on IOService objects that respond successfully to the IORegistryEntry::compareName method. + @param table If zero, nameMatching creates a matching dictionary and returns a reference to it, otherwise the matching properties are added to the specified dictionary. + @result The matching dictionary created, or passed in, is returned on success, or zero on failure. */ + + static OSDictionary * nameMatching( const OSString* name, + OSDictionary * table = 0 ); + +/*! @function resourceMatching + @abstract Creates a matching dictionary, or adds matching properties to an existing dictionary, that specify a resource service match. + @discussion IOService maintains a resource service IOResources that allows objects to be published and found globally in the I/O Kit based on a name, using the standard IOService matching and notification calls. + @param name The resource name, as a const C string. Resource matching is successful when an object by that name has been published with the publishResource method. + @param table If zero, resourceMatching creates a matching dictionary and returns a reference to it, otherwise the matching properties are added to the specified dictionary. + @result The matching dictionary created, or passed in, is returned on success, or zero on failure. */ + + static OSDictionary * resourceMatching( const char * name, + OSDictionary * table = 0 ); + +/*! @function resourceMatching + @abstract Creates a matching dictionary, or adds matching properties to an existing dictionary, that specify a resource service match. + @discussion IOService maintains a resource service IOResources that allows objects to be published and found globally in the I/O Kit based on a name, using the standard IOService matching and notification calls. + @param name The resource name, as an OSString (which includes OSSymbol). Resource matching is successful when an object by that name has been published with the publishResource method. + @param table If zero, resourceMatching creates a matching dictionary and returns a reference to it, otherwise the matching properties are added to the specified dictionary. + @result The matching dictionary created, or passed in, is returned on success, or zero on failure. */ + + static OSDictionary * resourceMatching( const OSString * name, + OSDictionary * table = 0 ); + + +/*! @function propertyMatching + @abstract Creates a matching dictionary, or adds matching properties to an existing dictionary, that specify an IOService phandle match. + @discussion TODO A very common matching criteria for IOService is based on its name. nameMatching will create a matching dictionary that specifies any IOService which respond successfully to the IORegistryEntry method compareName. An existing dictionary may be passed in, in which case the matching properties will be added to that dictionary rather than creating a new one. + @param key The service's phandle, as a const UInt32. PHandle matching is successful on IOService objects that respond successfully to the IORegistryEntry method compareName. + @param value The service's phandle, as a const UInt32. PHandle matching is successful on IOService's which respond successfully to the IORegistryEntry method compareName. + @param table If zero, nameMatching will create a matching dictionary and return a reference to it, otherwise the matching properties are added to the specified dictionary. + @result The matching dictionary created, or passed in, is returned on success, or zero on failure. */ + + static OSDictionary * propertyMatching( const OSSymbol * key, const OSObject * value, + OSDictionary * table = 0 ); + +/*! @function registryEntryIDMatching + @abstract Creates a matching dictionary, or adds matching properties to an existing dictionary, that specify a IORegistryEntryID match. + @discussion registryEntryIDMatching creates a matching dictionary that specifies the IOService object with the assigned registry entry ID (returned by IORegistryEntry::getRegistryEntryID()). An existing dictionary may be passed in, in which case the matching properties will be added to that dictionary rather than creating a new one. + @param name The service's ID. Matching is successful on the IOService object that return that ID from the IORegistryEntry::getRegistryEntryID() method. + @param table If zero, registryEntryIDMatching creates a matching dictionary and returns a reference to it, otherwise the matching properties are added to the specified dictionary. + @result The matching dictionary created, or passed in, is returned on success, or zero on failure. */ + + static OSDictionary * registryEntryIDMatching( uint64_t entryID, + OSDictionary * table = 0 ); + + +/*! @function addLocation + @abstract Adds a location matching property to an existing dictionary. + @discussion This function creates matching properties that specify the location of a IOService object, as an embedded matching dictionary. This matching will be successful on an IOService object that attached to an IOService object which matches this location matching dictionary. + @param table The matching properties are added to the specified dictionary, which must be non-zero. + @result The location matching dictionary created is returned on success, or zero on failure. */ + + static OSDictionary * addLocation( OSDictionary * table ); + + /* Helpers for matching dictionaries. */ + +/*! @function compareProperty + @abstract Compares a property in a matching dictionary with an IOService object's property table. + @discussion This is a helper function to aid in implementing @link matchPropertyTable matchPropertyTable@/link. If the property specified by key exists in the matching dictionary, it is compared with a property of the same name in the IOService object's property table. The comparison is performed with the isEqualTo method. If the property does not exist in the matching table, success is returned. If the property exists in the matching dictionary but not the IOService property table, failure is returned. + @param matching The matching dictionary, which must be non-zero. + @param key The dictionary key specifying the property to be compared, as a C string. + @result true if the property does not exist in the matching table. If the property exists in the matching dictionary but not the IOService property table, failure is returned. Otherwise the result of calling the property from the matching dictionary's isEqualTo method with the IOService property as an argument is returned. */ + + virtual bool compareProperty( OSDictionary * matching, + const char * key ); +/*! @function compareProperty + @abstract Compares a property in a matching dictionary with an IOService object's property table. + @discussion This is a helper function to aid in implementing @link matchPropertyTable matchPropertyTable@/link. If the property specified by key exists in the matching dictionary, it is compared with a property of the same name in the IOService object's property table. The comparison is performed with the isEqualTo method. If the property does not exist in the matching table, success is returned. If the property exists in the matching dictionary but not the IOService property table, failure is returned. + @param matching The matching dictionary, which must be non-zero. + @param key The dictionary key specifying the property to be compared, as an OSString (which includes OSSymbol). + @result true if the property does not exist in the matching table. If the property exists in the matching dictionary but not the IOService property table, failure is returned. Otherwise the result of calling the property from the matching dictionary's isEqualTo method with the IOService property as an argument is returned. */ + + virtual bool compareProperty( OSDictionary * matching, + const OSString * key ); + +/*! @function compareProperties + @abstract Compares a set of properties in a matching dictionary with an IOService object's property table. + @discussion This is a helper function to aid in implementing @link matchPropertyTable matchPropertyTable@/link. A collection of dictionary keys specifies properties in a matching dictionary to be compared, with compareProperty, with an IOService object's property table, if compareProperty returns true for each key, success is returned; otherwise failure. + @param matching The matching dictionary, which must be non-zero. + @param keys A collection (eg. OSSet, OSArray, OSDictionary) which should contain OSStrings (or OSSymbols) that specify the property keys to be compared. + @result Success if compareProperty returns true for each key in the collection; otherwise failure. */ + + virtual bool compareProperties( OSDictionary * matching, + OSCollection * keys ); + + /* Client / provider accessors */ + +/*! @function attach + @abstract Attaches an IOService client to a provider in the I/O Registry. + @discussion This function called in an IOService client enters the client into the I/O Registry as a child of the provider in the service plane. The provider must be active or the attach will fail. Multiple attach calls to the same provider are no-ops and return success. A client may be attached to multiple providers. Entering an object into the I/O Registry retains both the client and provider until they are detached. + @param provider The IOService object which will serve as this object's provider. + @result false if the provider is inactive or on a resource failure; otherwise true. */ + + virtual bool attach( IOService * provider ); + +/*! @function detach + @abstract Detaches an IOService client from a provider in the I/O Registry. + @discussion This function called in an IOService client removes the client as a child of the provider in the service plane of the I/O Registry. If the provider is not a parent of the client this is a no-op, otherwise the I/O Registry releases both the client and provider. + @param provider The IOService object to detach from. */ + + virtual void detach( IOService * provider ); + +/*! @function getProvider + @abstract Returns an IOService object's primary provider. + @discussion This function called in an IOService client will return the provider to which it was first attached. Because the majority of IOService objects have only one provider, this is a useful simplification and also supports caching of the provider when the I/O Registry is unchanged. + @result The first provider of the client, or zero if the IOService object is not attached into the I/O Registry. The provider is retained while the client is attached, and should not be released by the caller. */ + + virtual IOService * getProvider( void ) const; + +/*! @function getWorkLoop + @abstract Returns the current work loop or provider->getWorkLoop. + @discussion This function returns a valid work loop that a client can use to add an IOCommandGate to. The intention is that an IOService client has data that needs to be protected but doesn't want to pay the cost of a dedicated thread. This data has to be accessed from a provider's call-out context as well. So to achieve both of these goals the client creates an IOCommandGate to lock access to his data but he registers it with the provider's work loop, i.e. the work loop which will make the completion call-outs. This avoids a potential deadlock because the work loop gate uses a recursive lock, which allows the same lock to be held multiple times by a single thread. + @result A work loop, either the current work loop or it walks up the @link getProvider getProvider@/link chain calling getWorkLoop. Eventually it will reach a valid work loop-based driver or the root of the I/O tree, where it will return a system-wide work loop. Returns 0 if it fails to find (or create) a work loop.*/ + + virtual IOWorkLoop * getWorkLoop() const; + +/*! @function getProviderIterator + @abstract Returns an iterator over an IOService object's providers. + @discussion For those few IOService objects that obtain service from multiple providers, this method supplies an iterator over a client's providers. + @result An iterator over the providers of the client, or zero if there is a resource failure. The iterator must be released when the iteration is finished. All objects returned by the iteration are retained while the iterator is valid, though they may no longer be attached during the iteration. */ + + virtual OSIterator * getProviderIterator( void ) const; + +/*! @function getOpenProviderIterator + @abstract Returns an iterator over an client's providers that are currently opened by the client. + @discussion For those few IOService objects that obtain service from multiple providers, this method supplies an iterator over a client's providers, locking each in turn with @link lockForArbitration lockForArbitration@/link and returning those that have been opened by the client. + @result An iterator over the providers the client has open, or zero if there is a resource failure. The iterator must be released when the iteration is finished. All objects returned by the iteration are retained while the iterator is valid, and the current entry in the iteration is locked with lockForArbitration, protecting it from state changes. */ + + virtual OSIterator * getOpenProviderIterator( void ) const; + +/*! @function getClient + @abstract Returns an IOService object's primary client. + @discussion This function called in an IOService provider will return the first client to attach to it. For IOService objects which have only only one client, this may be a useful simplification. + @result The first client of the provider, or zero if the IOService object is not attached into the I/O Registry. The client is retained while it is attached, and should not be released by the caller. */ + + virtual IOService * getClient( void ) const; + +/*! @function getClientIterator + @abstract Returns an iterator over an IOService object's clients. + @discussion For IOService objects that may have multiple clients, this method supplies an iterator over a provider's clients. + @result An iterator over the clients of the provider, or zero if there is a resource failure. The iterator must be released when the iteration is finished. All objects returned by the iteration are retained while the iterator is valid, though they may no longer be attached during the iteration. */ + + virtual OSIterator * getClientIterator( void ) const; + +/*! @function getOpenClientIterator + @abstract Returns an iterator over a provider's clients that currently have opened the provider. + @discussion For IOService objects that may have multiple clients, this method supplies an iterator over a provider's clients, locking each in turn with @link lockForArbitration lockForArbitration@/link and returning those that have opened the provider. + @result An iterator over the clients that have opened the provider, or zero if there is a resource failure. The iterator must be released when the iteration is finished. All objects returned by the iteration are retained while the iterator is valid, and the current entry in the iteration is locked with lockForArbitration, protecting it from state changes. */ + + virtual OSIterator * getOpenClientIterator( void ) const; + +/*! @function callPlatformFunction + @abstract Calls the platform function with the given name. + @discussion The platform expert or other drivers may implement various functions to control hardware features. callPlatformFunction allows any IOService object to access these functions. Normally callPlatformFunction is called on a service's provider. The provider services the request or passes it to its provider. The system's IOPlatformExpert subclass catches functions it knows about and redirects them into other parts of the service plane. If the IOPlatformExpert subclass cannot execute the function, the base class is called. The IOPlatformExpert base class attempts to find a service to execute the function by looking up the function name in an IOResources name space. A service may publish a service using publishResource(functionName, this). If no service can be found to execute the function an error is returned. + @param functionName Name of the function to be called. When functionName is a C string, callPlatformFunction converts the C string to an OSSymbol and calls the OSSymbol version of callPlatformFunction. This process can block and should not be used from an interrupt context. + @param waitForFunction If true, callPlatformFunction will not return until the function has been called. + @result An IOReturn code; kIOReturnSuccess if the function was successfully executed, kIOReturnUnsupported if a service to execute the function could not be found. Other return codes may be returned by the function.*/ + + virtual IOReturn callPlatformFunction( const OSSymbol * functionName, + bool waitForFunction, + void *param1, void *param2, + void *param3, void *param4 ); + + virtual IOReturn callPlatformFunction( const char * functionName, + bool waitForFunction, + void *param1, void *param2, + void *param3, void *param4 ); + + + /* Some accessors */ + +/*! @function getPlatform + @abstract Returns a pointer to the platform expert instance for the computer. + @discussion This method provides an accessor to the platform expert instance for the computer. + @result A pointer to the IOPlatformExport instance. It should not be released by the caller. */ + + static IOPlatformExpert * getPlatform( void ); + +/*! @function getPMRootDomain + @abstract Returns a pointer to the power management root domain instance for the computer. + @discussion This method provides an accessor to the power management root domain instance for the computer. + @result A pointer to the power management root domain instance. It should not be released by the caller. */ + + static class IOPMrootDomain * getPMRootDomain( void ); + +/*! @function getServiceRoot + @abstract Returns a pointer to the root of the service plane. + @discussion This method provides an accessor to the root of the service plane for the computer. + @result A pointer to the IOService instance at the root of the service plane. It should not be released by the caller. */ + + static IOService * getServiceRoot( void ); + +/*! @function getResourceService + @abstract Returns a pointer to the IOResources service. + @discussion IOService maintains a resource service IOResources that allows objects to be published and found globally in the I/O Kit based on a name, using the standard IOService matching and notification calls. + @result A pointer to the IOResources instance. It should not be released by the caller. */ + + static IOService * getResourceService( void ); + + /* Allocate resources for a matched service */ + +/*! @function getResources + @abstract Allocates any needed resources for a published IOService object before clients attach. + @discussion This method is called during the registration process for an IOService object if there are successful driver matches, before any clients attach. It allows for lazy allocation of resources to an IOService object when a matching driver is found. + @result An IOReturn code; kIOReturnSuccess is necessary for the IOService object to be successfully used, otherwise the registration process for the object is halted. */ + + virtual IOReturn getResources( void ); + + /* Device memory accessors */ + +/*! @function getDeviceMemoryCount + @abstract Returns a count of the physical memory ranges available for a device. + @discussion This method returns the count of physical memory ranges, each represented by an IODeviceMemory instance, that have been allocated for a memory mapped device. + @result An integer count of the number of ranges available. */ + + virtual IOItemCount getDeviceMemoryCount( void ); + +/*! @function getDeviceMemoryWithIndex + @abstract Returns an instance of IODeviceMemory representing one of a device's memory mapped ranges. + @discussion This method returns a pointer to an instance of IODeviceMemory for the physical memory range at the given index for a memory mapped device. + @param index An index into the array of ranges assigned to the device. + @result A pointer to an instance of IODeviceMemory, or zero if the index is beyond the count available. The IODeviceMemory is retained by the provider, so is valid while attached, or while any mappings to it exist. It should not be released by the caller. See also @link mapDeviceMemoryWithIndex mapDeviceMemoryWithIndex@/link, which creates a device memory mapping. */ + + virtual IODeviceMemory * getDeviceMemoryWithIndex( unsigned int index ); + +/*! @function mapDeviceMemoryWithIndex + @abstract Maps a physical range of a device. + @discussion This method creates a mapping for the IODeviceMemory at the given index, with IODeviceMemory::map(options). The mapping is represented by the returned instance of IOMemoryMap, which should not be released until the mapping is no longer required. + @param index An index into the array of ranges assigned to the device. + @result An instance of IOMemoryMap, or zero if the index is beyond the count available. The mapping should be released only when access to it is no longer required. */ + + virtual IOMemoryMap * mapDeviceMemoryWithIndex( unsigned int index, + IOOptionBits options = 0 ); + +/*! @function getDeviceMemory + @abstract Returns the array of IODeviceMemory objects representing a device's memory mapped ranges. + @discussion This method returns an array of IODeviceMemory objects representing the physical memory ranges allocated to a memory mapped device. + @result An OSArray of IODeviceMemory objects, or zero if none are available. The array is retained by the provider, so is valid while attached. */ + + virtual OSArray * getDeviceMemory( void ); + +/*! @function setDeviceMemory + @abstract Sets the array of IODeviceMemory objects representing a device's memory mapped ranges. + @discussion This method sets an array of IODeviceMemory objects representing the physical memory ranges allocated to a memory mapped device. + @param array An OSArray of IODeviceMemory objects, or zero if none are available. The array will be retained by the object. */ + + virtual void setDeviceMemory( OSArray * array ); + + /* Interrupt accessors */ + +/*! @function registerInterrupt + @abstract Registers a C function interrupt handler for a device supplying interrupts. + @discussion This method installs a C function interrupt handler to be called at primary interrupt time for a device's interrupt. Only one handler may be installed per interrupt source. IOInterruptEventSource provides a work loop based abstraction for interrupt delivery that may be more appropriate for work loop based drivers. + @param source The index of the interrupt source in the device. + @param target An object instance to be passed to the interrupt handler. + @param handler The C function to be called at primary interrupt time when the interrupt occurs. The handler should process the interrupt by clearing the interrupt, or by disabling the source. + @param refCon A reference constant for the handler's use. + @result An IOReturn code.
kIOReturnNoInterrupt is returned if the source is not valid; kIOReturnNoResources is returned if the interrupt already has an installed handler. */ + + virtual IOReturn registerInterrupt(int source, OSObject *target, + IOInterruptAction handler, + void *refCon = 0); + +/*! @function unregisterInterrupt + @abstract Removes a C function interrupt handler for a device supplying hardware interrupts. + @discussion This method removes a C function interrupt handler previously installed with @link registerInterrupt registerInterrupt@/link. + @param source The index of the interrupt source in the device. + @result An IOReturn code (kIOReturnNoInterrupt is returned if the source is not valid). */ + + virtual IOReturn unregisterInterrupt(int source); + +/*! @function getInterruptType + @abstract Returns the type of interrupt used for a device supplying hardware interrupts. + @param source The index of the interrupt source in the device. + @param interruptType The interrupt type for the interrupt source will be stored here by getInterruptType.
kIOInterruptTypeEdge will be returned for edge-trigggered sources.
kIOInterruptTypeLevel will be returned for level-trigggered sources. + @result An IOReturn code (kIOReturnNoInterrupt is returned if the source is not valid). */ + + virtual IOReturn getInterruptType(int source, int *interruptType); + +/*! @function enableInterrupt + @abstract Enables a device interrupt. + @discussion It is the caller's responsiblity to keep track of the enable state of the interrupt source. + @param source The index of the interrupt source in the device. + @result An IOReturn code (kIOReturnNoInterrupt is returned if the source is not valid). */ + + virtual IOReturn enableInterrupt(int source); + +/*! @function disableInterrupt + @abstract Synchronously disables a device interrupt. + @discussion If the interrupt routine is running, the call will block until the routine completes. It is the caller's responsiblity to keep track of the enable state of the interrupt source. + @param source The index of the interrupt source in the device. + @result An IOReturn code (kIOReturnNoInterrupt is returned if the source is not valid). */ + + virtual IOReturn disableInterrupt(int source); + +/*! @function causeInterrupt + @abstract Causes a device interrupt to occur. + @discussion Emulates a hardware interrupt, to be called from task level. + @param source The index of the interrupt source in the device. + @result An IOReturn code (kIOReturnNoInterrupt is returned if the source is not valid). */ + + virtual IOReturn causeInterrupt(int source); + +/*! @function requestProbe + @abstract Requests that hardware be re-scanned for devices. + @discussion For bus families that do not usually detect device addition or removal, this method represents an external request (eg. from a utility application) to rescan and publish or remove found devices. + @param options Family defined options, not interpreted by IOService. + @result An IOReturn code. */ + + virtual IOReturn requestProbe( IOOptionBits options ); + + /* Generic API for non-data-path upstream calls */ + +/*! @function message + @abstract Receives a generic message delivered from an attached provider. + @discussion A provider may deliver messages via the message method to its clients informing them of state changes, such as kIOMessageServiceIsTerminated or kIOMessageServiceIsSuspended. Certain messages are defined by the I/O Kit in IOMessage.h while others may be family dependent. This method is implemented in the client to receive messages. + @param type A type defined in IOMessage.h or defined by the provider family. + @param provider The provider from which the message originates. + @param argument An argument defined by the provider family, not used by IOService. + @result An IOReturn code defined by the message type. */ + + virtual IOReturn message( UInt32 type, IOService * provider, + void * argument = 0 ); + +/*! @function messageClient + @abstract Sends a generic message to an attached client. + @discussion A provider may deliver messages via the @link message message@/link method to its clients informing them of state changes, such as kIOMessageServiceIsTerminated or kIOMessageServiceIsSuspended. Certain messages are defined by the I/O Kit in IOMessage.h while others may be family dependent. This method may be called in the provider to send a message to the specified client, which may be useful for overrides. + @param messageType A type defined in IOMessage.h or defined by the provider family. + @param client A client of the IOService to send the message. + @param messageArgument An argument defined by the provider family, not used by IOService. + @param argSize Specifies the size of messageArgument, in bytes. If argSize is non-zero, messageArgument is treated as a pointer to argSize bytes of data. If argSize is 0 (the default), messageArgument is treated as an ordinal and passed by value. + @result The return code from the client message call. */ + + virtual IOReturn messageClient( UInt32 messageType, OSObject * client, + void * messageArgument = 0, vm_size_t argSize = 0 ); + +/*! @function messageClients + @abstract Sends a generic message to all attached clients. + @discussion A provider may deliver messages via the @link message message@/link method to its clients informing them of state changes, such as kIOMessageServiceIsTerminated or kIOMessageServiceIsSuspended. Certain messages are defined by the I/O Kit in IOMessage.h while others may be family dependent. This method may be called in the provider to send a message to all the attached clients, via the @link messageClient messageClient@/link method. + @param type A type defined in IOMessage.h or defined by the provider family. + @param argument An argument defined by the provider family, not used by IOService. + @param argSize Specifies the size of argument, in bytes. If argSize is non-zero, argument is treated as a pointer to argSize bytes of data. If argSize is 0 (the default), argument is treated as an ordinal and passed by value. + @result Any non-kIOReturnSuccess return codes returned by the clients, or kIOReturnSuccess if all return kIOReturnSuccess. */ + + virtual IOReturn messageClients( UInt32 type, + void * argument = 0, vm_size_t argSize = 0 ); + + virtual IONotifier * registerInterest( const OSSymbol * typeOfInterest, + IOServiceInterestHandler handler, + void * target, void * ref = 0 ); + + virtual void applyToProviders( IOServiceApplierFunction applier, + void * context ); + + virtual void applyToClients( IOServiceApplierFunction applier, + void * context ); + + virtual void applyToInterested( const OSSymbol * typeOfInterest, + OSObjectApplierFunction applier, + void * context ); + + virtual IOReturn acknowledgeNotification( IONotificationRef notification, + IOOptionBits response ); + + /* User client create */ + +/*! @function newUserClient + @abstract Creates a connection for a non kernel client. + @discussion A non kernel client may request a connection be opened via the @link //apple_ref/c/func/IOServiceOpen IOServiceOpen@/link library function, which will call this method in an IOService object. The rules and capabilities of user level clients are family dependent, and use the functions of the IOUserClient class for support. IOService's implementation returns kIOReturnUnsupported, so any family supporting user clients must implement this method. + @param owningTask The Mach task of the client thread in the process of opening the user client. Note that in Mac OS X, each process is based on a Mach task and one or more Mach threads. For more information on the composition of a Mach task and its relationship with Mach threads, see {@linkdoc //apple_ref/doc/uid/TP30000905-CH209-TPXREF103 "Tasks and Threads"}. + @param securityID A token representing the access level for the task. + @param type A constant specifying the type of connection to be created, specified by the caller of @link //apple_ref/c/func/IOServiceOpen IOServiceOpen@/link and interpreted only by the family. + @param handler An instance of an IOUserClient object to represent the connection, which will be released when the connection is closed, or zero if the connection was not opened. + @param properties A dictionary of additional properties for the connection. + @result A return code to be passed back to the caller of IOServiceOpen. */ + + virtual IOReturn newUserClient( task_t owningTask, void * securityID, + UInt32 type, OSDictionary * properties, + IOUserClient ** handler ); + + virtual IOReturn newUserClient( task_t owningTask, void * securityID, + UInt32 type, IOUserClient ** handler ); + + /* Return code utilities */ + +/*! @function stringFromReturn + @abstract Supplies a programmer-friendly string from an IOReturn code. + @discussion Strings are available for the standard return codes in IOReturn.h in IOService, while subclasses may implement this method to interpret family dependent return codes. + @param rtn The IOReturn code. + @result A pointer to a constant string, or zero if the return code is unknown. */ + + virtual const char * stringFromReturn( IOReturn rtn ); + +/*! @function errnoFromReturn + @abstract Translates an IOReturn code to a BSD errno. + @discussion BSD defines its own return codes for its functions in sys/errno.h, and I/O Kit families may need to supply compliant results in BSD shims. Results are available for the standard return codes in IOReturn.h in IOService, while subclasses may implement this method to interpret family dependent return codes. + @param rtn The IOReturn code. + @result The BSD errno or EIO if unknown. */ + + virtual int errnoFromReturn( IOReturn rtn ); + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + /* * * * * * * * * * end of IOService API * * * * * * * */ + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /* for IOInterruptController implementors */ + + int _numInterruptSources; + IOInterruptSource *_interruptSources; + + /* overrides */ + virtual bool serializeProperties( OSSerialize * s ) const; + + void requireMaxBusStall(UInt32 ns); + void requireMaxInterruptDelay(uint32_t ns); + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + /* * * * * * * * * * * * Internals * * * * * * * * * * * */ + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +private: + APPLE_KEXT_COMPATIBILITY_VIRTUAL + bool checkResources( void ); + APPLE_KEXT_COMPATIBILITY_VIRTUAL + bool checkResource( OSObject * matching ); + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + void probeCandidates( OSOrderedSet * matches ); + APPLE_KEXT_COMPATIBILITY_VIRTUAL + bool startCandidate( IOService * candidate ); + +public: + APPLE_KEXT_COMPATIBILITY_VIRTUAL + IOService * getClientWithCategory( const OSSymbol * category ) + APPLE_KEXT_DEPRECATED; + // copyClientWithCategory is the public replacement + +private: + APPLE_KEXT_COMPATIBILITY_VIRTUAL + bool passiveMatch( OSDictionary * matching, bool changesOK = false); + APPLE_KEXT_COMPATIBILITY_VIRTUAL + void startMatching( IOOptionBits options = 0 ); + APPLE_KEXT_COMPATIBILITY_VIRTUAL + void doServiceMatch( IOOptionBits options ); + APPLE_KEXT_COMPATIBILITY_VIRTUAL + void doServiceTerminate( IOOptionBits options ); + +private: + static OSObject * copyExistingServices( OSDictionary * matching, + IOOptionBits inState, IOOptionBits options = 0 ); + + static IONotifier * setNotification( + const OSSymbol * type, OSDictionary * matching, + IOServiceMatchingNotificationHandler handler, + void * target, void * ref, + SInt32 priority = 0 ); + + static IONotifier * doInstallNotification( + const OSSymbol * type, OSDictionary * matching, + IOServiceMatchingNotificationHandler handler, + void * target, void * ref, + SInt32 priority, OSIterator ** existing ); + + static bool syncNotificationHandler( void * target, void * ref, + IOService * newService, IONotifier * notifier ); + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + void deliverNotification( const OSSymbol * type, + IOOptionBits orNewState, IOOptionBits andNewState ); + + bool invokeNotifer( class _IOServiceNotifier * notify ); + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + void unregisterAllInterest( void ); + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + IOReturn waitForState( UInt32 mask, UInt32 value, + mach_timespec_t * timeout = 0 ); + + IOReturn waitForState( UInt32 mask, UInt32 value, uint64_t timeout ); + + UInt32 _adjustBusy( SInt32 delta ); + + bool terminatePhase1( IOOptionBits options = 0 ); + void scheduleTerminatePhase2( IOOptionBits options = 0 ); + void scheduleStop( IOService * provider ); + void scheduleFinalize( void ); + static void terminateThread( void * arg, wait_result_t unused ); + static void terminateWorker( IOOptionBits options ); + static void actionWillTerminate( IOService * victim, IOOptionBits options, + OSArray * doPhase2List ); + static void actionDidTerminate( IOService * victim, IOOptionBits options ); + static void actionFinalize( IOService * victim, IOOptionBits options ); + static void actionStop( IOService * client, IOService * provider ); + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + IOReturn resolveInterrupt(IOService *nub, int source); + APPLE_KEXT_COMPATIBILITY_VIRTUAL + IOReturn lookupInterrupt(int source, bool resolve, IOInterruptController **interruptController); + + + /* power management */ +public: + +/*! @function PMinit + @abstract Initializes power management for a driver. + @discussion PMinit allocates and initializes the power management instance variables, and it should be called before accessing those variables or calling the power management methods. This method should be called inside the driver's start routine and must be paired with a call to @link PMstop PMstop@/link. + Most calls to PMinit are followed by calls to @link joinPMtree joinPMtree@/link and @link registerPowerDriver registerPowerDriver@/link. */ + + virtual void PMinit( void ); + +/*! @function PMstop + @abstract Frees and removes the driver from power management. + @discussion The power managment variables don't exist after this call and the power managment methods in the caller shouldn't be called. + Calling PMstop cleans up for the three power management initialization calls: @link PMinit PMinit@/link, @link joinPMtree joinPMtree@/link, and @link registerPowerDriver registerPowerDriver@/link. */ + + virtual void PMstop( void ); + +/*! @function joinPMtree + @abstract Joins the driver into the power plane of the I/O Registry. + @discussion A driver uses this method to call its nub when initializing (usually in its start routine after calling @link PMinit PMinit@/link), to be attached into the power management hierarchy (i.e., the power plane). A driver usually calls this method on the driver for the device that provides it power (this is frequently the nub). + Before this call returns, the caller will probably be called at @link setPowerParent setPowerParent@/link and @link setAggressiveness setAggressiveness@/link and possibly at @link addPowerChild addPowerChild@/link as it is added to the hierarchy. This method may be overridden by a nub subclass. + @param driver The driver to be added to the power plane, usually this. */ + + virtual void joinPMtree( IOService * driver ); + +/*! @function registerPowerDriver + @abstract Registers a set of power states that the driver supports. + @discussion A driver defines its array of supported power states with power management in its power management initialization (its start routine). If successful, power management will call the driver to instruct it to change its power state through @link setPowerState setPowerState@/link. + Most drivers do not need to override registerPowerDriver. A nub may override registerPowerDriver if it needs to arrange its children in the power plane differently than the default placement, but this is uncommon. + @param controllingDriver A pointer to the calling driver, usually this. + @param powerStates A driver-defined array of power states that the driver and device support. Power states are defined in pwr_mgt/IOPMpowerState.h. + @param numberOfStates The number of power states in the array. + @result IOPMNoErr. All errors are logged via kprintf. */ + + virtual IOReturn registerPowerDriver( + IOService * controllingDriver, + IOPMPowerState * powerStates, + unsigned long numberOfStates ); + +/*! @function registerInterestedDriver + @abstract Allows an IOService object to register interest in the changing power state of a power-managed IOService object. + @discussion Call registerInterestedDriver on the IOService object you are interested in receiving power state messages from, and pass a pointer to the interested driver (this) as an argument. + The interested driver should override @link powerStateWillChangeTo powerStateWillChangeTo@/link and @link powerStateDidChangeTo powerStateDidChangeTo@/link to receive these power change messages. + Interested drivers must acknowledge power changes in powerStateWillChangeTo or powerStateDidChangeTo, either via return value or later calls to @link acknowledgePowerChange acknowledgePowerChange@/link. + @param theDriver The driver of interest adds this pointer to the list of interested drivers. It informs drivers on this list before and after the power change. + @result Flags describing the capability of the device in its current power state. If the current power state is not yet defined, zero is returned (this is the case when the driver is not yet in the power domain hierarchy or hasn't fully registered with power management yet). */ + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + IOPMPowerFlags registerInterestedDriver( IOService * theDriver ); + +/*! @function deRegisterInterestedDriver + @abstract De-registers power state interest from a previous call to registerInterestedDriver. + @discussion Most drivers do not need to override deRegisterInterestedDriver. + @param theDriver The interested driver previously passed into @link registerInterestedDriver registerInterestedDriver@/link. + @result A return code that can be ignored by the caller. */ + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + IOReturn deRegisterInterestedDriver( IOService * theDriver ); + +/*! @function acknowledgePowerChange + @abstract Acknowledges an in-progress power state change. + @discussion When power management informs an interested object (via @link powerStateWillChangeTo powerStateWillChangeTo@/link or @link powerStateDidChangeTo powerStateDidChangeTo@/link), the object can return an immediate acknowledgement via a return code, or it may return an indication that it will acknowledge later by calling acknowledgePowerChange. + Interested objects are those that have registered as interested drivers, as well as power plane children of the power changing driver. A driver that calls @link registerInterestedDriver registerInterestedDriver@/link must call acknowledgePowerChange, or use an immediate acknowledgement return from powerStateWillChangeTo or powerStateDidChangeTo. + @param whichDriver A pointer to the calling driver. The called object tracks all interested parties to ensure that all have acknowledged the power state change. + @result IOPMNoErr. */ + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + IOReturn acknowledgePowerChange( IOService * whichDriver ); + +/*! @function acknowledgeSetPowerState + @abstract Acknowledges the belated completion of a driver's setPowerState power state change. + @discussion After power management instructs a driver to change its state via @link setPowerState setPowerState@/link, that driver must acknowledge the change when its device has completed its transition. The acknowledgement may be immediate, via a return code from setPowerState, or delayed, via this call to acknowledgeSetPowerState. + Any driver that does not return kIOPMAckImplied from its setPowerState implementation must later call acknowledgeSetPowerState. + @result IOPMNoErr. */ + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + IOReturn acknowledgeSetPowerState( void ); + +/*! @function requestPowerDomainState + @abstract Tells a driver to adjust its power state. + @discussion This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ + + virtual IOReturn requestPowerDomainState( + IOPMPowerFlags desiredState, + IOPowerConnection * whichChild, + unsigned long specificationFlags ); + +/*! @function makeUsable + @abstract Requests that a device become usable. + @discussion This method is called when some client of a device (or the device's own driver) is asking for the device to become usable. Power management responds by telling the object upon which this method is called to change to its highest power state. + makeUsable is implemented using @link changePowerStateToPriv changePowerStateToPriv@/link. Subsequent requests for lower power, such as from changePowerStateToPriv, will pre-empt this request. + @result A return code that can be ignored by the caller. */ + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + IOReturn makeUsable( void ); + +/*! @function temporaryPowerClampOn + @abstract A driver calls this method to hold itself in the highest power state until it has children. + @discussion Use temporaryPowerClampOn to hold your driver in its highest power state while waiting for child devices to attach. After children have attached, the clamp is released and the device's power state is controlled by the children's requirements. + @result A return code that can be ignored by the caller. */ + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + IOReturn temporaryPowerClampOn( void ); + +/*! @function changePowerStateTo + @abstract Sets a driver's power state. + @discussion This function is one of several that are used to set a driver's power state. In most circumstances, however, you should call @link changePowerStateToPriv changePowerStateToPriv@/link instead. + Calls to changePowerStateTo, changePowerStateToPriv, and a driver's power children all affect the power state of a driver. For legacy design reasons, they have overlapping functionality. Although you should call changePowerStateToPriv to change your device's power state, you might need to call changePowerStateTo in the following circumstances: +
  • If a driver will be using changePowerStateToPriv to change its power state, it should call changePowerStateTo(0) in its start routine to eliminate the influence changePowerStateTo has on power state calculations. +
  • Call changePowerStateTo in conjunction with @link setIdleTimerPeriod setIdleTimerPeriod@/link and @link activityTickle activityTickle@/link to idle a driver into a low power state. For a driver with 3 power states, for example, changePowerStateTo(1) sets a minimum level of power state 1, such that the idle timer period may not set your device's power any lower than state 1.
+ @param ordinal The number of the desired power state in the power state array. + @result A return code that can be ignored by the caller. */ + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + IOReturn changePowerStateTo( unsigned long ordinal ); + +/*! @function currentCapability + @abstract Finds out the capability of a device's current power state. + @result A copy of the capabilityFlags field for the current power state in the power state array. */ + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + IOPMPowerFlags currentCapability( void ); + +/*! @function currentPowerConsumption + @abstract Finds out the current power consumption of a device. + @discussion Most Mac OS X power managed drivers do not report their power consumption via the staticPower field. Thus this call will not accurately reflect power consumption for most drivers. + @result A copy of the staticPower field for the current power state in the power state array. */ + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + unsigned long currentPowerConsumption( void ); + +/*! @function activityTickle + @abstract Informs power management when a power-managed device is in use, so that power management can track when it is idle and adjust its power state accordingly. + @discussion The activityTickle method is provided for objects in the system (or for the driver itself) to tell a driver that its device is being used. + The IOService superclass can manage idleness determination with a simple idle timer mechanism and this activityTickle call. To start this up, the driver calls its superclass's setIdleTimerPeriod. This starts a timer for the time interval specified in the call. When the timer expires, the superclass checks to see if there has been any activity since the last timer expiration. (It checks to see if activityTickle has been called). If there has been activity, it restarts the timer, and this process continues. When the timer expires, and there has been no device activity, the superclass lowers the device power state to the next lower state. This can continue until the device is in state zero. + After the device has been powered down by at least one power state, a subsequent call to activityTickle causes the device to be switched to a higher state required for the activity. + If the driver is managing the idleness determination totally on its own, the value of the type parameter should be kIOPMSubclassPolicy, and the driver should override the activityTickle method. The superclass IOService implementation of activityTickle does nothing with the kIOPMSubclassPolicy argument. + @param type When type is kIOPMSubclassPolicy, activityTickle is not handled in IOService and should be intercepted by the subclass. When type is kIOPMSuperclassPolicy1, an activity flag is set and the device state is checked. If the device has been powered down, it is powered up again. + @param stateNumber When type is kIOPMSuperclassPolicy1, stateNumber contains the desired power state ordinal for the activity. If the device is in a lower state, the superclass will switch it to this state. This is for devices that can handle some accesses in lower power states; the device is powered up only as far as it needs to be for the activity. + @result When type is kIOPMSuperclassPolicy1, the superclass returns true if the device is currently in the state specified by stateNumber. If the device is in a lower state and must be powered up, the superclass returns false; in this case the superclass will initiate a power change to power the device up. */ + + virtual bool activityTickle( + unsigned long type, + unsigned long stateNumber = 0 ); + +/*! @function setAggressiveness + @abstract Broadcasts an aggressiveness factor from the parent of a driver to the driver. + @discussion Implement setAggressiveness to receive a notification when an "aggressiveness Aggressiveness factors are a loose set of power management variables that contain values for system sleep timeout, display sleep timeout, whether the system is on battery or AC, and other power management features. There are several aggressiveness factors that can be broadcast and a driver may take action on whichever factors apply to it. + A driver that has joined the power plane via @link joinPMtree joinPMtree@/link will receive setAgressiveness calls when aggressiveness factors change. + A driver may override this call if it needs to do something with the new factor (such as change its idle timeout). If overridden, the driver must call its superclass's setAgressiveness method in its own setAgressiveness implementation. + Most drivers do not need to implement setAgressiveness. + @param type The aggressiveness factor type, such as kPMMinutesToDim, kPMMinutesToSpinDown, kPMMinutesToSleep, and kPMPowerSource. (Aggressiveness factors are defined in pwr_mgt/IOPM.h.) + @param newLevel The aggressiveness factor's new value. + @result IOPMNoErr. */ + + virtual IOReturn setAggressiveness( + unsigned long type, + unsigned long newLevel ); + +/*! @function getAggressiveness + @abstract Returns the current aggressiveness value for the given type. + @param type The aggressiveness factor to query. + @param currentLevel Upon successful return, contains the value of aggressiveness factor type. + @result kIOReturnSuccess upon success; an I/O Kit error code otherwise. */ + + virtual IOReturn getAggressiveness( + unsigned long type, + unsigned long * currentLevel ); + +#ifndef __LP64__ +/*! @function systemWake + @abstract Tells every driver in the power plane that the system is waking up. + @discussion This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ + + virtual IOReturn systemWake( void ) + APPLE_KEXT_DEPRECATED; + +/*! @function temperatureCriticalForZone + @abstract Alerts a driver to a critical temperature in some thermal zone. + @discussion This call is unused by power management. It is not intended to be called or overridden. */ + + virtual IOReturn temperatureCriticalForZone( IOService * whichZone ) + APPLE_KEXT_DEPRECATED; + +/*! @function youAreRoot + @abstract Informs power management which IOService object is the power plane root. + @discussion This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ + + virtual IOReturn youAreRoot( void ) + APPLE_KEXT_DEPRECATED; + +/*! @function setPowerParent + @abstract This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ + + virtual IOReturn setPowerParent( + IOPowerConnection * parent, + bool stateKnown, + IOPMPowerFlags currentState ) + APPLE_KEXT_DEPRECATED; +#endif /* !__LP64__ */ + +/*! @function addPowerChild + @abstract Informs a driver that it has a new child. + @discussion The Platform Expert uses this method to call a driver and introduce it to a new child. This call is handled internally by power management. It is not intended to be overridden or called by drivers. + @param theChild A pointer to the child IOService object. */ + + virtual IOReturn addPowerChild( IOService * theChild ); + +/*! @function removePowerChild + @abstract Informs a power managed driver that one of its power plane childen is disappearing. + @discussion This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ + + virtual IOReturn removePowerChild( IOPowerConnection * theChild ); + +#ifndef __LP64__ +/*! @function command_received + @discussion This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ + + virtual void command_received( void *, void * , void * , void * ); +#endif + +/*! @function start_PM_idle_timer + @discussion This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ + + APPLE_KEXT_COMPATIBILITY_VIRTUAL + void start_PM_idle_timer( void ); + +#ifndef __LP64__ +/*! @function PM_idle_timer_expiration + @discussion This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ + + virtual void PM_idle_timer_expiration( void ) + APPLE_KEXT_DEPRECATED; + +/*! @function PM_Clamp_Timer_Expired + @discussion This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ + + virtual void PM_Clamp_Timer_Expired( void ) + APPLE_KEXT_DEPRECATED; +#endif + +/*! @function setIdleTimerPeriod + @abstract Sets or changes the idle timer period. + @discussion A driver using the idleness determination provided by IOService calls its superclass with this method to set or change the idle timer period. See @link activityTickle activityTickle@/link for a description of this type of idleness determination. + @param period The desired idle timer period in seconds. + @result kIOReturnSuccess upon success; an I/O Kit error code otherwise. */ + + virtual IOReturn setIdleTimerPeriod( unsigned long ); + +#ifndef __LP64__ +/*! @function getPMworkloop + @abstract Returns a pointer to the system-wide power management work loop. + @availability Deprecated in Mac OS X version 10.6. + @discussion Most drivers should create their own work loops to synchronize their code; drivers should not run arbitrary code on the power management work loop. */ + + virtual IOWorkLoop * getPMworkloop( void ) + APPLE_KEXT_DEPRECATED; +#endif + +/*! @function getPowerState + @abstract Determines a device's power state. + @discussion A device's "current power state" is updated at the end of each power state transition (e.g. transition from state 1 to state 0, or state 0 to state 2). This transition includes the time spent powering on or off any power plane children. Thus, if a child calls getPowerState on its power parent during system wake from sleep, the call will return the index to the device's off state rather than its on state. + @result The current power state's index into the device's power state array. */ + + UInt32 getPowerState( void ); + +/*! @function setPowerState + @abstract Requests a power managed driver to change the power state of its device. + @discussion A power managed driver must override setPowerState to take part in system power management. After a driver is registered with power management, the system uses setPowerState to power the device off and on for system sleep and wake. + Calls to @link PMinit PMinit@/link and @link registerPowerDriver registerPowerDriver@/link enable power management to change a device's power state using setPowerState. setPowerState is called in a clean and separate thread context. + @param powerStateOrdinal The number in the power state array of the state the driver is being instructed to switch to. + @param whatDevice A pointer to the power management object which registered to manage power for this device. In most cases, whatDevice will be equal to your driver's own this pointer. + @result The driver must return IOPMAckImplied if it has complied with the request when it returns. Otherwise if it has started the process of changing power state but not finished it, the driver should return a number of microseconds which is an upper limit of the time it will need to finish. Then, when it has completed the power switch, it should call @link acknowledgeSetPowerState acknowledgeSetPowerState@/link. */ + + virtual IOReturn setPowerState( + unsigned long powerStateOrdinal, + IOService * whatDevice ); + +#ifndef __LP64__ +/*! @function clampPowerOn + @abstract Deprecated. Do not use. */ + + virtual void clampPowerOn( unsigned long duration ); +#endif + +/*! @function maxCapabilityForDomainState + @abstract Determines a driver's highest power state possible for a given power domain state. + @discussion This happens when the power domain is changing state and power management needs to determine which state the device is capable of in the new domain state. + Most drivers do not need to implement this method, and can rely upon the default IOService implementation. The IOService implementation scans the power state array looking for the highest state whose inputPowerRequirement field exactly matches the value of the domainState parameter. If more intelligent determination is required, the driver itself should implement the method and override the superclass's implementation. + @param domainState Flags that describe the character of "domain power"; they represent the outputPowerCharacter field of a state in the power domain's power state array. + @result A state number. */ + + virtual unsigned long maxCapabilityForDomainState( IOPMPowerFlags domainState ); + +/*! @function initialPowerStateForDomainState + @abstract Determines which power state a device is in, given the current power domain state. + @discussion Power management calls this method once, when the driver is initializing power management. + Most drivers do not need to implement this method, and can rely upon the default IOService implementation. The IOService implementation scans the power state array looking for the highest state whose inputPowerRequirement field exactly matches the value of the domainState parameter. If more intelligent determination is required, the power managed driver should implement the method and override the superclass's implementation. + @param domainState Flags that describe the character of "domain power"; they represent the outputPowerCharacter field of a state in the power domain's power state array. + @result A state number. */ + + virtual unsigned long initialPowerStateForDomainState( IOPMPowerFlags domainState ); + +/*! @function powerStateForDomainState + @abstract Determines what power state the device would be in for a given power domain state. + @discussion Power management calls a driver with this method to find out what power state the device would be in for a given power domain state. This happens when the power domain is changing state and power management needs to determine the effect of the change. + Most drivers do not need to implement this method, and can rely upon the default IOService implementation. The IOService implementation scans the power state array looking for the highest state whose inputPowerRequirement field exactly matches the value of the domainState parameter. If more intelligent determination is required, the power managed driver should implement the method and override the superclass's implementation. + @param domainState Flags that describe the character of "domain power"; they represent the outputPowerCharacter field of a state in the power domain's power state array. + @result A state number. */ + + virtual unsigned long powerStateForDomainState( IOPMPowerFlags domainState ); + +/*! @function powerStateWillChangeTo + @abstract Informs interested parties that a device is about to change its power state. + @discussion Power management informs interested parties that a device is about to change to a different power state. Interested parties are those that have registered for this notification via @link registerInterestedDriver registerInterestedDriver@/link. If you have called registerInterestedDriver on a power managed driver, you must implement powerStateWillChangeTo and @link powerStateDidChangeTo powerStateDidChangeTo@/link to receive the notifications. + powerStateWillChangeTo is called in a clean and separate thread context. powerStateWillChangeTo is called before a power state transition takes place; powerStateDidChangeTo is called after the transition has completed. + @param capabilities Flags that describe the capability of the device in the new power state (they come from the capabilityFlags field of the new state in the power state array). + @param stateNumber The number of the state in the state array that the device is switching to. + @param whatDevice A pointer to the driver that is changing. It can be used by a driver that is receiving power state change notifications for multiple devices to distinguish between them. + @result The driver returns IOPMAckImplied if it has prepared for the power change when it returns. If it has started preparing but not finished, it should return a number of microseconds which is an upper limit of the time it will need to finish preparing. Then, when it has completed its preparations, it should call @link acknowledgePowerChange acknowledgePowerChange@/link. */ + + virtual IOReturn powerStateWillChangeTo( + IOPMPowerFlags capabilities, + unsigned long stateNumber, + IOService * whatDevice ); + +/*! @function powerStateDidChangeTo + @abstract Informs interested parties that a device has changed to a different power state. + @discussion Power management informs interested parties that a device has changed to a different power state. Interested parties are those that have registered for this notification via @link registerInterestedDriver registerInterestedDriver@/link. If you have called registerInterestedDriver on a power managed driver, you must implemnt @link powerStateWillChangeTo powerStateWillChangeTo@/link and powerStateDidChangeTo to receive the notifications. + powerStateDidChangeTo is called in a clean and separate thread context. powerStateWillChangeTo is called before a power state transition takes place; powerStateDidChangeTo is called after the transition has completed. + @param capabilities Flags that describe the capability of the device in the new power state (they come from the capabilityFlags field of the new state in the power state array). + @param stateNumber The number of the state in the state array that the device is switching to. + @param whatDevice A pointer to the driver that is changing. It can be used by a driver that is receiving power state change notifications for multiple devices to distinguish between them. + @result The driver returns IOPMAckImplied if it has prepared for the power change when it returns. If it has started preparing but not finished, it should return a number of microseconds which is an upper limit of the time it will need to finish preparing. Then, when it has completed its preparations, it should call @link acknowledgePowerChange acknowledgePowerChange@/link. */ + + virtual IOReturn powerStateDidChangeTo( + IOPMPowerFlags capabilities, + unsigned long stateNumber, + IOService * whatDevice ); + +#ifndef __LP64__ +/*! @function didYouWakeSystem + @abstract Asks a driver if its device is the one that just woke the system from sleep. + @availability Deprecated in Mac OS X version 10.6. + @discussion Power management calls a power managed driver with this method to ask if its device is the one that just woke the system from sleep. If a device is capable of waking the system from sleep, its driver should implement didYouWakeSystem and return true if its device was responsible for waking the system. + @result true if the driver's device woke the system and false otherwise. */ + + virtual bool didYouWakeSystem( void ) + APPLE_KEXT_DEPRECATED; + +/*! @function newTemperature + @abstract Tells a power managed driver that the temperature in the thermal zone has changed. + @discussion This call is unused by power management. It is not intended to be called or overridden. */ + + virtual IOReturn newTemperature( long currentTemp, IOService * whichZone ) + APPLE_KEXT_DEPRECATED; +#endif + + virtual bool askChangeDown( unsigned long ); + virtual bool tellChangeDown( unsigned long ); + virtual void tellNoChangeDown ( unsigned long ); + virtual void tellChangeUp( unsigned long ); + virtual IOReturn allowPowerChange( unsigned long refcon ); + virtual IOReturn cancelPowerChange( unsigned long refcon ); + +protected: +/*! @function changePowerStateToPriv + @abstract Tells a driver's superclass to change the power state of its device. + @discussion A driver uses this method to tell its superclass to change the power state of the device. This is the recommended way to change the power state of a device. + Three things affect driver power state: @link changePowerStateTo changePowerStateTo@/link, changePowerStateToPriv, and the desires of the driver's power plane children. Power management puts the device into the maximum state governed by those three entities. + Drivers may eliminate the influence of the changePowerStateTo method on power state one of two ways. See @link powerOverrideOnPriv powerOverrideOnPriv@/link to ignore the method's influence, or call changePowerStateTo(0) in the driver's start routine to remove the changePowerStateTo method's power request. + @param ordinal The number of the desired power state in the power state array. + @result A return code that can be ignored by the caller. */ + + IOReturn changePowerStateToPriv( unsigned long ordinal ); + +/*! @function powerOverrideOnPriv + @abstract Allows a driver to ignore its children's power management requests and only use changePowerStateToPriv to define its own power state. + @discussion Power management normally keeps a device at the highest state required by its requests via @link changePowerStateTo changePowerStateTo@/link, @link changePowerStateToPriv changePowerStateToPriv@/link, and its children. However, a driver may ensure a lower power state than otherwise required by itself and its children using powerOverrideOnPriv. When the override is on, power management keeps the device's power state in the state specified by changePowerStateToPriv. Turning on the override will initiate a power change if the driver's changePowerStateToPriv desired power state is different from the maximum of the changePowerStateTo desired power state and the children's desires. + @result A return code that can be ignored by the caller. */ + + IOReturn powerOverrideOnPriv( void ); + +/*! @function powerOverrideOffPriv + @abstract Allows a driver to disable a power override. + @discussion When a driver has enabled an override via @link powerOverrideOnPriv powerOverrideOnPriv@/link, it can disable it again by calling this method in its superclass. Disabling the override reverts to the default algorithm for determining a device's power state. The superclass will now keep the device at the highest state required by changePowerStateTo, changePowerStateToPriv, and its children. Turning off the override will initiate a power change if the driver's desired power state is different from the maximum of the power managed driver's desire and the children's desires. + @result A return code that can be ignored by the caller. */ + + IOReturn powerOverrideOffPriv( void ); + +/*! @function powerChangeDone + @abstract Tells a driver when a power state change is complete. + @discussion Power management uses this method to inform a driver when a power change is completely done, when all interested parties have acknowledged the @link powerStateDidChangeTo powerStateDidChangeTo@/link call. The default implementation of this method is null; the method is meant to be overridden by subclassed power managed drivers. A driver should use this method to find out if a power change it initiated is complete. + @param stateNumber The number of the state in the state array that the device has switched from. */ + + virtual void powerChangeDone( unsigned long stateNumber ); +}; + +#endif /* ! _IOKIT_IOSERVICE_H */ diff --git a/i386/include/IOKit/IOServicePM.h b/i386/include/IOKit/IOServicePM.h new file mode 100644 index 0000000..9955e03 --- /dev/null +++ b/i386/include/IOKit/IOServicePM.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOSERVICEPM_H +#define _IOKIT_IOSERVICEPM_H + +#include + +class IOService; +class IOServicePM; +class IOPowerConnection; +class IOWorkLoop; +class IOCommandGate; +class IOTimerEventSource; +class IOPlatformExpert; + +#endif /* !_IOKIT_IOSERVICEPM_H */ diff --git a/i386/include/IOKit/IOSharedDataQueue.h b/i386/include/IOKit/IOSharedDataQueue.h new file mode 100644 index 0000000..fdfa1d6 --- /dev/null +++ b/i386/include/IOKit/IOSharedDataQueue.h @@ -0,0 +1,129 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOSHAREDDATAQUEUE_H +#define _IOKIT_IOSHAREDDATAQUEUE_H + +#ifdef dequeue +#undef dequeue +#endif + +#include + +typedef struct _IODataQueueEntry IODataQueueEntry; + +/*! + * @class IOSharedDataQueue : public IODataQueue + * @abstract A generic queue designed to pass data both from the kernel to a user process and from a user process to the kernel. + * @discussion The IOSharedDataQueue class is designed to also allow a user process to queue data to kernel code. IOSharedDataQueue objects are designed to be used in a single producer / single consumer situation. As such, there are no locks on the data itself. Because the kernel enqueue and user-space dequeue methods follow a strict set of guidelines, no locks are necessary to maintain the integrity of the data struct. + * + *
Each data entry can be variable sized, but the entire size of the queue data region (including overhead for each entry) must be specified up front. + * + *
In order for the IODataQueue instance to notify the user process that data is available, a notification mach port must be set. When the queue is empty and a new entry is added, a message is sent to the specified port. + * + *
In order to make the data queue memory available to a user process, the method getMemoryDescriptor() must be used to get an IOMemoryDescriptor instance that can be mapped into a user process. Typically, the clientMemoryForType() method on an IOUserClient instance will be used to request the IOMemoryDescriptor and then return it to be mapped into the user process. + */ +class IOSharedDataQueue : public IODataQueue +{ + OSDeclareDefaultStructors(IOSharedDataQueue) + + struct ExpansionData { + }; + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * _reserved; + +protected: + virtual void free(); + +public: + /*! + * @function withCapacity + * @abstract Static method that creates a new IOSharedDataQueue instance with the capacity specified in the size parameter. + * @discussion The actual size of the entire data queue memory region (to be shared into a user process) is equal to the capacity plus the IODataQueueMemory overhead. This overhead value can be determined from the DATA_QUEUE_MEMORY_HEADER_SIZE macro in . The size of the data queue memory region must include space for the overhead of each IODataQueueEntry. This entry overhead can be determined from the DATA_QUEUE_ENTRY_HEADER_SIZE macro in .
This method allocates a new IODataQueue instance and then calls initWithCapacity() with the given size parameter. If the initWithCapacity() fails, the new instance is released and zero is returned. + * @param size The size of the data queue memory region. + * @result Returns the newly allocated IOSharedDataQueue instance. Zero is returned on failure. + */ + static IOSharedDataQueue *withCapacity(UInt32 size); + + /*! + * @function withEntries + * @abstract Static method that creates a new IOSharedDataQueue instance with the specified number of entries of the given size. + * @discussion This method will create a new IOSharedDataQueue instance with enough capacity for numEntries of entrySize. It does account for the IODataQueueEntry overhead for each entry. Note that the numEntries and entrySize are simply used to determine the data region size. They do not actually restrict the size of number of entries that can be added to the queue.
This method allocates a new IODataQueue instance and then calls initWithEntries() with the given numEntries and entrySize parameters. If the initWithEntries() fails, the new instance is released and zero is returned. + * @param numEntries Number of entries to allocate space for. + * @param entrySize Size of each entry. + * @result Reeturns the newly allocated IOSharedDataQueue instance. Zero is returned on failure. + */ + static IOSharedDataQueue *withEntries(UInt32 numEntries, UInt32 entrySize); + + /*! + * @function initWithCapacity + * @abstract Initializes an IOSharedDataQueue instance with the capacity specified in the size parameter. + * @discussion The actual size of the entire data queue memory region (to be shared into a user process) is equal to the capacity plus the IODataQueueMemory overhead. This overhead value can be determined from the DATA_QUEUE_MEMORY_HEADER_SIZE and DATA_QUEUE_MEMORY_APPENDIX_SIZE macro in . The size of the data queue memory region must include space for the overhead of each IODataQueueEntry. This entry overhead can be determined from the DATA_QUEUE_ENTRY_HEADER_SIZE macro in . + * @param size The size of the data queue memory region. + * @result Returns true on success and false on failure. + */ + virtual Boolean initWithCapacity(UInt32 size); + + /*! + * @function getMemoryDescriptor + * @abstract Returns a memory descriptor covering the IODataQueueMemory region. + * @discussion The IOMemoryDescriptor instance returned by this method is intended to be mapped into a user process. This is the memory region that the IODataQueueClient code operates on. + * @result Returns a newly allocated IOMemoryDescriptor for the IODataQueueMemory region. Returns zero on failure. + */ + virtual IOMemoryDescriptor *getMemoryDescriptor(); + + /*! + * @function peek + * @abstract Used to peek at the next entry on the queue. + * @discussion This function can be used to look at the next entry which allows the entry to be received without having to copy it with dequeue. In order to do this, call peek to get the entry. Then call dequeue with a NULL data pointer. That will cause the head to be moved to the next entry, but no memory to be copied. + * @result Returns a pointer to the next IODataQueueEntry if one is available. 0 (NULL) is returned if the queue is empty. + */ + virtual IODataQueueEntry * peek(); + + /*! + * @function dequeue + * @abstract Dequeues the next available entry on the queue and copies it into the given data pointer. + * @discussion This function will dequeue the next available entry on the queue. If a data pointer is provided, it will copy the data into the memory region if there is enough space available as specified in the dataSize parameter. If no data pointer is provided, it will simply move the head value past the current entry. + * @param data A pointer to the data memory region in which to copy the next entry data on the queue. If this parameter is 0 (NULL), it will simply move to the next entry. + * @param dataSize A pointer to the size of the data parameter. On return, this contains the size of the actual entry data - even if the original size was not large enough. + * @result Returns true on success and false on failure. Typically failure means that the queue is empty. + */ + virtual Boolean dequeue(void *data, UInt32 *dataSize); + + OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 0); + OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 1); + OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 2); + OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 3); + OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 4); + OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 5); + OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 6); + OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 7); +}; + +#endif /* _IOKIT_IOSHAREDDATAQUEUE_H */ diff --git a/i386/include/IOKit/IOSharedLock.h b/i386/include/IOKit/IOSharedLock.h new file mode 100644 index 0000000..59b47ec --- /dev/null +++ b/i386/include/IOKit/IOSharedLock.h @@ -0,0 +1,86 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + +/* + * Multiprocessor locks used within the shared memory area between the + * kernel and event system. These must work in both user and kernel mode. + * + * These routines are public, for the purpose of writing frame buffer device + * drivers which handle their own cursors. Certain architectures define a + * generic display class which handles cursor drawing and is subclassed by + * driver writers. These drivers need not be concerned with the following + * types and definitions. + * + * The ev_lock(), ev_unlock(), and ev_try_lock() functions are available only + * to drivers built in or dynamically loaded into the kernel, and to DPS + * drivers built in or dynamically loaded into the Window Server. They do not + * exist in any shared library. + * + * --> They're now in IOKit user lib. + */ + +#ifndef _IOKIT_IOSHAREDLOCK_H +#define _IOKIT_IOSHAREDLOCK_H + +#ifdef __cplusplus +extern "C" { +#endif + +// should be 32 bytes on PPC +typedef volatile int IOSharedLockData; +typedef IOSharedLockData * IOSharedLock; + +#define IOSpinLockInit(l) (*(l) = (IOSharedLockData)0) + + +extern void IOSpinUnlock(IOSharedLock l); +extern boolean_t IOTrySpinLock(IOSharedLock l); + +/* exact same stuff & implementation */ + +typedef IOSharedLockData ev_lock_data_t; +typedef ev_lock_data_t * ev_lock_t; + +#define ev_init_lock(l) (*(l) = (ev_lock_data_t)0) +// needs isync? +//#define ev_is_locked(l) (*(l) != (ev_lock_data_t)0) + + +extern void ev_unlock(ev_lock_t l); +extern boolean_t ev_try_lock(ev_lock_t l); + +#ifdef __cplusplus +} +#endif +#endif /* ! _IOKIT_IOSHAREDLOCK_H */ diff --git a/i386/include/IOKit/IOSubMemoryDescriptor.h b/i386/include/IOKit/IOSubMemoryDescriptor.h new file mode 100644 index 0000000..0093ea3 --- /dev/null +++ b/i386/include/IOKit/IOSubMemoryDescriptor.h @@ -0,0 +1,109 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOSUBMEMORYDESCRIPTOR_H +#define _IOSUBMEMORYDESCRIPTOR_H + +#include + +/*! @class IOSubMemoryDescriptor : public IOMemoryDescriptor + @abstract The IOSubMemoryDescriptor object describes a memory area made up of a portion of another IOMemoryDescriptor. + @discussion The IOSubMemoryDescriptor object represents a subrange of memory, specified as a portion of another IOMemoryDescriptor. */ + +class IOSubMemoryDescriptor : public IOMemoryDescriptor +{ + OSDeclareDefaultStructors(IOSubMemoryDescriptor); + +protected: + IOMemoryDescriptor * _parent; + IOByteCount _start; + + virtual void free(); + +public: +/*! @function withSubRange + @abstract Create an IOMemoryDescriptor to describe a subrange of an existing descriptor. + @discussion This method creates and initializes an IOMemoryDescriptor for memory consisting of a subrange of the specified memory descriptor. The parent memory descriptor is retained by the new descriptor. + @param of The parent IOMemoryDescriptor of which a subrange is to be used for the new descriptor, which will be retained by the subrange IOMemoryDescriptor. + @param offset A byte offset into the parent memory descriptor's memory. + @param length The length of the subrange. + @param options + kIOMemoryDirectionMask (options:direction) This nibble indicates the I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. + @result The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure. */ + + static IOSubMemoryDescriptor * withSubRange(IOMemoryDescriptor *of, + IOByteCount offset, + IOByteCount length, + IOOptionBits options); + + /* + * Initialize or reinitialize an IOSubMemoryDescriptor to describe + * a subrange of an existing descriptor. + * + * An IOSubMemoryDescriptor can be re-used by calling initSubRange + * again on an existing instance -- note that this behavior is not + * commonly supported in other IOKit classes, although it is here. + */ + virtual bool initSubRange( IOMemoryDescriptor * parent, + IOByteCount offset, IOByteCount length, + IODirection withDirection ); + + /* + * IOMemoryDescriptor required methods + */ + + virtual addr64_t getPhysicalSegment( IOByteCount offset, + IOByteCount * length, + IOOptionBits options = 0 ); + + virtual IOReturn prepare(IODirection forDirection = kIODirectionNone); + + virtual IOReturn complete(IODirection forDirection = kIODirectionNone); + +#ifdef __LP64__ + virtual +#endif /* __LP64__ */ + IOReturn redirect( task_t safeTask, bool redirect ); + + virtual IOReturn setPurgeable( IOOptionBits newState, + IOOptionBits * oldState ); + + // support map() on kIOMemoryTypeVirtual without prepare() + virtual IOMemoryMap * makeMapping( + IOMemoryDescriptor * owner, + task_t intoTask, + IOVirtualAddress atAddress, + IOOptionBits options, + IOByteCount offset, + IOByteCount length ); + + virtual uint64_t getPreparationID( void ); + +}; + +#endif /* !_IOSUBMEMORYDESCRIPTOR_H */ diff --git a/i386/include/IOKit/IOSyncer.h b/i386/include/IOKit/IOSyncer.h new file mode 100644 index 0000000..f6dfce3 --- /dev/null +++ b/i386/include/IOKit/IOSyncer.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _IOSYNCER_H +#define _IOSYNCER_H + +#include +#include +#include + +class IOSyncer : public OSObject +{ + OSDeclareDefaultStructors(IOSyncer) + +private: + // The spin lock that is used to guard the 'threadMustStop' variable. + IOSimpleLock *guardLock; + volatile bool threadMustStop; + IOReturn fResult; + virtual void free(); + virtual void privateSignal(); + +public: + + static IOSyncer * create(bool twoRetains = true) + APPLE_KEXT_DEPRECATED; + + virtual bool init(bool twoRetains) + APPLE_KEXT_DEPRECATED; + virtual void reinit() + APPLE_KEXT_DEPRECATED; + virtual IOReturn wait(bool autoRelease = true) + APPLE_KEXT_DEPRECATED; + virtual void signal(IOReturn res = kIOReturnSuccess, + bool autoRelease = true) + APPLE_KEXT_DEPRECATED; +}; + +#endif /* !_IOSYNCER */ + diff --git a/i386/include/IOKit/IOTimeStamp.h b/i386/include/IOKit/IOTimeStamp.h new file mode 100644 index 0000000..b1b0905 --- /dev/null +++ b/i386/include/IOKit/IOTimeStamp.h @@ -0,0 +1,189 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef IOKIT_IOTIMESTAMP_H +#define IOKIT_IOTIMESTAMP_H + +#include + +static inline void +IOTimeStampStartConstant(unsigned int csc, + uintptr_t a = 0, uintptr_t b = 0, + uintptr_t c = 0, uintptr_t d = 0) +{ + KERNEL_DEBUG_CONSTANT(csc | DBG_FUNC_START, a, b, c, d, 0); +} + +static inline void +IOTimeStampEndConstant(uintptr_t csc, + uintptr_t a = 0, uintptr_t b = 0, + uintptr_t c = 0, uintptr_t d = 0) +{ + KERNEL_DEBUG_CONSTANT(csc | DBG_FUNC_END, a, b, c, d, 0); +} + +static inline void +IOTimeStampConstant(uintptr_t csc, + uintptr_t a = 0, uintptr_t b = 0, + uintptr_t c = 0, uintptr_t d = 0) +{ + KERNEL_DEBUG_CONSTANT(csc | DBG_FUNC_NONE, a, b, c, d, 0); +} + +#if KDEBUG + +static inline void +IOTimeStampStart(uintptr_t csc, + uintptr_t a = 0, uintptr_t b = 0, + uintptr_t c = 0, uintptr_t d = 0) +{ + KERNEL_DEBUG(csc | DBG_FUNC_START, a, b, c, d, 0); +} + +static inline void +IOTimeStampEnd(uintptr_t csc, + uintptr_t a = 0, uintptr_t b = 0, + uintptr_t c = 0, uintptr_t d = 0) +{ + KERNEL_DEBUG(csc | DBG_FUNC_END, a, b, c, d, 0); +} + +static inline void +IOTimeStamp(uintptr_t csc, + uintptr_t a = 0, uintptr_t b = 0, + uintptr_t c = 0, uintptr_t d = 0) +{ + KERNEL_DEBUG(csc | DBG_FUNC_NONE, a, b, c, d, 0); +} + +#endif /* KDEBUG */ + +#define IODBG_STORAGE(code) (KDBG_CODE(DBG_IOKIT, DBG_IOSTORAGE, code)) +#define IODBG_NETWORK(code) (KDBG_CODE(DBG_IOKIT, DBG_IONETWORK, code)) +#define IODBG_KEYBOARD(code) (KDBG_CODE(DBG_IOKIT, DBG_IOKEYBOARD, code)) +#define IODBG_HID(code) (KDBG_CODE(DBG_IOKIT, DBG_IOHID, code)) +#define IODBG_AUDIO(code) (KDBG_CODE(DBG_IOKIT, DBG_IOAUDIO, code)) +#define IODBG_SERIAL(code) (KDBG_CODE(DBG_IOKIT, DBG_IOSERIAL, code)) +#define IODBG_TTY(code) (KDBG_CODE(DBG_IOKIT, DBG_IOTTY, code)) +#define IODBG_SAM(code) (KDBG_CODE(DBG_IOKIT, DBG_IOSAM, code)) +#define IODBG_PARALLELATA(code) (KDBG_CODE(DBG_IOKIT, DBG_IOPARALLELATA, code)) +#define IODBG_PARALLELSCSI(code) (KDBG_CODE(DBG_IOKIT, DBG_IOPARALLELSCSI, code)) +#define IODBG_SATA(code) (KDBG_CODE(DBG_IOKIT, DBG_IOSATA, code)) +#define IODBG_SAS(code) (KDBG_CODE(DBG_IOKIT, DBG_IOSAS, code)) +#define IODBG_FIBRECHANNEL(code) (KDBG_CODE(DBG_IOKIT, DBG_IOFIBRECHANNEL, code)) +#define IODBG_USB(code) (KDBG_CODE(DBG_IOKIT, DBG_IOUSB, code)) +#define IODBG_BLUETOOTH(code) (KDBG_CODE(DBG_IOKIT, DBG_IOBLUETOOTH, code)) +#define IODBG_FIREWIRE(code) (KDBG_CODE(DBG_IOKIT, DBG_IOFIREWIRE, code)) +#define IODBG_INFINIBAND(code) (KDBG_CODE(DBG_IOKIT, DBG_IOINFINIBAND, code)) + + +/* Backwards compatibility */ +#define IODBG_DISK(code) IODBG_STORAGE(code) +#define IODBG_POINTING(code) IODBG_HID(code) + + +/* IOKit infrastructure subclasses */ +#define IODBG_WORKLOOP(code) (KDBG_CODE(DBG_IOKIT, DBG_IOWORKLOOP, code)) +#define IODBG_INTES(code) (KDBG_CODE(DBG_IOKIT, DBG_IOINTES, code)) +#define IODBG_TIMES(code) (KDBG_CODE(DBG_IOKIT, DBG_IOCLKES, code)) +#define IODBG_CMDQ(code) (KDBG_CODE(DBG_IOKIT, DBG_IOCMDQ, code)) +#define IODBG_MCURS(code) (KDBG_CODE(DBG_IOKIT, DBG_IOMCURS, code)) +#define IODBG_MDESC(code) (KDBG_CODE(DBG_IOKIT, DBG_IOMDESC, code)) +#define IODBG_POWER(code) (KDBG_CODE(DBG_IOKIT, DBG_IOPOWER, code)) +#define IODBG_IOSERVICE(code) (KDBG_CODE(DBG_IOKIT, DBG_IOSERVICE, code)) + +/* IOKit specific codes - within each subclass */ + +/* DBG_IOKIT/DBG_IODISK codes */ + +/* DBG_IOKIT/DBG_IONETWORK codes */ + +/* DBG_IOKIT/DBG_IOKEYBOARD codes */ + +/* DBG_IOKIT/DBG_IOHID codes */ + +/* DBG_IOKIT/DBG_IOAUDIO codes */ + +/* DBG_IOKIT/DBG_IOSERIAL codes */ + +/* DBG_IOKIT/DBG_IOTTY codes */ + +/* DBG_IOKIT/DBG_IOWORKLOOP codes */ +#define IOWL_CLIENT 1 /* 0x05010004 */ +#define IOWL_WORK 2 /* 0x05010008 */ + +/* DBG_IOKIT/DBG_IOINTES codes */ +#define IOINTES_CLIENT 1 /* 0x05020004 */ +#define IOINTES_LAT 2 /* 0x05020008 */ +#define IOINTES_SEMA 3 /* 0x0502000c */ +#define IOINTES_INTCTXT 4 /* 0x05020010 */ +#define IOINTES_INTFLTR 5 /* 0x05020014 */ +#define IOINTES_ACTION 6 /* 0x05020018 */ +#define IOINTES_FILTER 7 /* 0x0502001c */ + +/* DBG_IOKIT/DBG_IOTIMES codes */ +#define IOTIMES_CLIENT 1 /* 0x05030004 */ +#define IOTIMES_LAT 2 /* 0x05030008 */ +#define IOTIMES_SEMA 3 /* 0x0503000c */ +#define IOTIMES_ACTION 4 /* 0x05030010 */ + +/* DBG_IOKIT/DBG_IOCMDQ codes */ +#define IOCMDQ_CLIENT 1 /* 0x05040004 */ +#define IOCMDQ_LAT 2 /* 0x05040008 */ +#define IOCMDQ_SEMA 3 /* 0x0504000c */ +#define IOCMDQ_PSEMA 4 /* 0x05040010 */ +#define IOCMDQ_PLOCK 5 /* 0x05040014 */ +#define IOCMDQ_ACTION 6 /* 0x05040018 */ + +/* DBG_IOKIT/DBG_IOMCURS codes */ + +/* DBG_IOKIT/DBG_IOMDESC codes */ + +/* DBG_IOKIT/DBG_IOPOWER codes */ +// See IOKit/pwr_mgt/IOPMlog.h for the power management codes + +/* DBG_IOKIT/DBG_IOSERVICE codes */ +#define IOSERVICE_BUSY 1 /* 0x05080004 */ +#define IOSERVICE_NONBUSY 2 /* 0x05080008 */ +#define IOSERVICE_MODULESTALL 3 /* 0x0508000C */ +#define IOSERVICE_MODULEUNSTALL 4 /* 0x05080010 */ + +#define IOSERVICE_TERMINATE_PHASE1 5 /* 0x05080014 */ +#define IOSERVICE_TERMINATE_REQUEST_OK 6 /* 0x05080018 */ +#define IOSERVICE_TERMINATE_REQUEST_FAIL 7 /* 0x0508001C */ +#define IOSERVICE_TERMINATE_SCHEDULE_STOP 8 /* 0x05080020 */ +#define IOSERVICE_TERMINATE_SCHEDULE_FINALIZE 9 /* 0x05080024 */ +#define IOSERVICE_TERMINATE_WILL 10 /* 0x05080028 */ +#define IOSERVICE_TERMINATE_DID 11 /* 0x0508002C */ +#define IOSERVICE_TERMINATE_DID_DEFER 12 /* 0x05080030 */ +#define IOSERVICE_TERMINATE_FINALIZE 13 /* 0x05080034 */ +#define IOSERVICE_TERMINATE_STOP 14 /* 0x05080038 */ +#define IOSERVICE_TERMINATE_STOP_NOP 15 /* 0x0508003C */ +#define IOSERVICE_TERMINATE_STOP_DEFER 16 /* 0x05080040 */ +#define IOSERVICE_TERMINATE_DONE 17 /* 0x05080044 */ + +#endif /* ! IOKIT_IOTIMESTAMP_H */ diff --git a/i386/include/IOKit/IOTimerEventSource.h b/i386/include/IOKit/IOTimerEventSource.h new file mode 100644 index 0000000..7cc0d38 --- /dev/null +++ b/i386/include/IOKit/IOTimerEventSource.h @@ -0,0 +1,230 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * IOTimerEventSource.h + * + * HISTORY + * 2-Feb-1999 Joe Liu (jliu) created. + * + */ + +#ifndef _IOTIMEREVENTSOURCE +#define _IOTIMEREVENTSOURCE + +#include + +__BEGIN_DECLS +#include +__END_DECLS + +#include +#include + +/*! + @class IOTimerEventSource : public IOEventSource + @abstract Time based event source mechanism. + @discussion An event source that implements a simple timer. A timeout handler is called once the timeout period expires. This timeout handler will be called by the work-loop that this event source is attached to. +

+ Usually a timer event source will be used to implement a timeout. In general when a driver makes a request it will need to setup a call to keep track of when the I/O doesn't complete. This class is designed to make that somewhat easier. +

+ Remember the system doesn't guarantee the accuracy of the callout. It is possible that a higher priority thread is running which will delay the execution of the action routine. In fact the thread will be made runable at the exact requested time, within the accuracy of the CPU's decrementer based interrupt, but the scheduler will then control execution. +*/ +class IOTimerEventSource : public IOEventSource +{ + OSDeclareDefaultStructors(IOTimerEventSource) + +protected: +/*! @var calloutEntry thread_call entry for preregistered thread callouts */ + void *calloutEntry; + +/*! @var abstime time to wake up next, see enable. */ + AbsoluteTime abstime; + +/*! @struct ExpansionData + @discussion This structure is private to the IOTimerEventSource implementation. + */ + struct ExpansionData + { + SInt32 calloutGeneration; + IOWorkLoop * workLoop; + }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + +/*! @function timeout + @abstract Function that routes the call from the OS' timeout mechanism into a work-loop context. + @discussion timeout will normally not be called nor overridden by a subclass. If the event source is enabled then close the work-loop's gate and call the action routine. + @param self This argument will be cast to an IOTimerEventSource. */ + static void timeout(void *self); + +/*! @function setTimeoutFunc + @abstract Set's timeout as the function of calloutEntry. + @discussion IOTimerEventSource is based upon the kern/thread_call.h APIs currently. This function allocates the calloutEntry member variable by using thread_call_allocate(timeout, this). If you need to write your own subclass of IOTimerEventSource you probably should override this method to allocate an entry that points to your own timeout routine. */ + virtual void setTimeoutFunc(); + +/*! @function free + @abstract Sub-class implementation of free method, frees calloutEntry */ + virtual void free(); + +/*! @function checkForWork + @abstract Have to implement it is mandatory in $link IOEventSource, but IOTimerEventSources don't actually use this work-loop mechanism. */ + virtual bool checkForWork(); + + virtual void setWorkLoop(IOWorkLoop *workLoop); + +public: + +/*! @typedef Action + @discussion 'C' Function pointer defining the callout routine of this event source. + @param owner Owning target object. Note by a startling coincidence the first parameter in a C callout is currently used to define the target of a C++ member function. + @param sender The object that timed out. */ + typedef void (*Action)(OSObject *owner, IOTimerEventSource *sender); + +/*! @function timerEventSource + @abstract Allocates and returns an initialized timer instance. + @param owner + @param action */ + static IOTimerEventSource * + timerEventSource(OSObject *owner, Action action = 0); + +/*! @function init + @abstract Initializes the timer with an owner, and a handler to call when the timeout expires. + @param owner + @param action */ + virtual bool init(OSObject *owner, Action action = 0); + +/*! @function enable + @abstract Enables a call to the action. + @discussion Allows the action function to be called. If the timer event source was disabled while a call was outstanding and the call wasn't cancelled then it will be rescheduled. So a disable/enable pair will disable calls from this event source. */ + virtual void enable(); + +/*! @function disable + @abstract Disable a timed callout. + @discussion When disable returns the action will not be called until the next time enable(qv) is called. */ + virtual void disable(); + + +/*! @function setTimeoutTicks + @abstract Setup a callback at after the delay in scheduler ticks. See wakeAtTime(AbsoluteTime). + @param interval Delay from now to wake up, in scheduler ticks, whatever that may be. + @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ + virtual IOReturn setTimeoutTicks(UInt32 ticks); + +/*! @function setTimeoutMS + @abstract Setup a callback at after the delay in milliseconds. See wakeAtTime(AbsoluteTime). + @param interval Delay from now to wake up, time in milliseconds. + @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ + virtual IOReturn setTimeoutMS(UInt32 ms); + +/*! @function setTimeoutUS + @abstract Setup a callback at after the delay in microseconds. See wakeAtTime(AbsoluteTime). + @param interval Delay from now to wake up, time in microseconds. + @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ + virtual IOReturn setTimeoutUS(UInt32 us); + +/*! @function setTimeout + @abstract Setup a callback at after the delay in some unit. See wakeAtTime(AbsoluteTime). + @param interval Delay from now to wake up in some defined unit. + @param scale_factor Define the unit of interval, default to nanoseconds. + @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ + virtual IOReturn setTimeout(UInt32 interval, + UInt32 scale_factor = kNanosecondScale); + +#if !defined(__LP64__) + virtual IOReturn setTimeout(mach_timespec_t interval) + APPLE_KEXT_DEPRECATED; +#endif + +/*! @function setTimeout + @abstract Setup a callback at after the delay in decrementer ticks. See wakeAtTime(AbsoluteTime). + @param interval Delay from now to wake up in decrementer ticks. + @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ + virtual IOReturn setTimeout(AbsoluteTime interval); + +/*! @function wakeAtTimeTicks + @abstract Setup a callback at this absolute time. See wakeAtTime(AbsoluteTime). + @param abstime Time to wake up in scheduler quantums, whatever that is? + @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ + virtual IOReturn wakeAtTimeTicks(UInt32 ticks); + +/*! @function wakeAtTimeMS + @abstract Setup a callback at this absolute time. See wakeAtTime(AbsoluteTime). + @param abstime Time to wake up in milliseconds. + @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ + virtual IOReturn wakeAtTimeMS(UInt32 ms); + +/*! @function wakeAtTimeUS + @abstract Setup a callback at this absolute time. See wakeAtTime(AbsoluteTime). + @param abstime Time to wake up in microseconds. + @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ + virtual IOReturn wakeAtTimeUS(UInt32 us); + +/*! @function wakeAtTime + @abstract Setup a callback at this absolute time. See wakeAtTime(AbsoluteTime). + @param abstime Time to wake up in some unit. + @param scale_factor Define the unit of abstime, default to nanoseconds. + @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ + virtual IOReturn wakeAtTime(UInt32 abstime, + UInt32 scale_factor = kNanosecondScale); + +#if !defined(__LP64__) + virtual IOReturn wakeAtTime(mach_timespec_t abstime) + APPLE_KEXT_DEPRECATED; +#endif + +/*! @function wakeAtTime + @abstract Setup a callback at this absolute time. + @discussion Starts the timer, which will expire at abstime. After it expires, the timer will call the 'action' registered in the init() function. This timer is not periodic, a further call is needed to reset and restart the timer after it expires. + @param abstime Absolute Time when to wake up, counted in 'decrementer' units and starts at zero when system boots. + @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared by init or IOEventSource::setAction (qqv). */ + virtual IOReturn wakeAtTime(AbsoluteTime abstime); + +/*! @function cancelTimeout + @abstract Disable any outstanding calls to this event source. + @discussion Clear down any oustanding calls. By the time this function completes it is guaranteed that the action will not be called again. */ + virtual void cancelTimeout(); + +private: + static void timeoutAndRelease(void *self, void *wl); + +private: + OSMetaClassDeclareReservedUnused(IOTimerEventSource, 0); + OSMetaClassDeclareReservedUnused(IOTimerEventSource, 1); + OSMetaClassDeclareReservedUnused(IOTimerEventSource, 2); + OSMetaClassDeclareReservedUnused(IOTimerEventSource, 3); + OSMetaClassDeclareReservedUnused(IOTimerEventSource, 4); + OSMetaClassDeclareReservedUnused(IOTimerEventSource, 5); + OSMetaClassDeclareReservedUnused(IOTimerEventSource, 6); + OSMetaClassDeclareReservedUnused(IOTimerEventSource, 7); +}; + +#endif /* !_IOTIMEREVENTSOURCE */ diff --git a/i386/include/IOKit/IOTypes.h b/i386/include/IOKit/IOTypes.h new file mode 100644 index 0000000..5d20efb --- /dev/null +++ b/i386/include/IOKit/IOTypes.h @@ -0,0 +1,238 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef __IOKIT_IOTYPES_H +#define __IOKIT_IOTYPES_H + +#ifndef IOKIT +#define IOKIT 1 +#endif /* !IOKIT */ + +#if KERNEL +#include +#else +#include +#include +#endif + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef NULL +#if defined (__cplusplus) +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + +/* + * Simple data types. + */ +#ifndef __MACTYPES__ /* CF MacTypes.h */ +#ifndef __TYPES__ /* guess... Mac Types.h */ + +#include +#include + +#endif /* __TYPES__ */ +#endif /* __MACTYPES__ */ + +#if KERNEL +#include +#endif + +typedef UInt32 IOOptionBits; +typedef SInt32 IOFixed; +typedef UInt32 IOVersion; +typedef UInt32 IOItemCount; +typedef UInt32 IOCacheMode; + +typedef UInt32 IOByteCount32; +typedef UInt64 IOByteCount64; + +typedef UInt32 IOPhysicalAddress32; +typedef UInt64 IOPhysicalAddress64; +typedef UInt32 IOPhysicalLength32; +typedef UInt64 IOPhysicalLength64; + +#ifdef __LP64__ +typedef mach_vm_address_t IOVirtualAddress; +#else +typedef vm_address_t IOVirtualAddress; +#endif + +#if defined(__LP64__) && defined(KERNEL) +typedef IOByteCount64 IOByteCount; +#else +typedef IOByteCount32 IOByteCount; +#endif + +typedef IOVirtualAddress IOLogicalAddress; + +#if defined(__LP64__) && defined(KERNEL) + +typedef IOPhysicalAddress64 IOPhysicalAddress; +typedef IOPhysicalLength64 IOPhysicalLength; +#define IOPhysical32( hi, lo ) ((UInt64) lo + ((UInt64)(hi) << 32)) +#define IOPhysSize 64 + +#else + +typedef IOPhysicalAddress32 IOPhysicalAddress; +typedef IOPhysicalLength32 IOPhysicalLength; +#define IOPhysical32( hi, lo ) (lo) +#define IOPhysSize 32 + +#endif + + +typedef struct +{ + IOPhysicalAddress address; + IOByteCount length; +} IOPhysicalRange; + +typedef struct +{ + IOVirtualAddress address; + IOByteCount length; +} IOVirtualRange; + +#ifdef __LP64__ +typedef IOVirtualRange IOAddressRange; +#else /* !__LP64__ */ +typedef struct +{ + mach_vm_address_t address; + mach_vm_size_t length; +} IOAddressRange; +#endif /* !__LP64__ */ + +/* + * Map between #defined or enum'd constants and text description. + */ +typedef struct { + int value; + const char *name; +} IONamedValue; + + +/* + * Memory alignment -- specified as a power of two. + */ +typedef unsigned int IOAlignment; + +#define IO_NULL_VM_TASK ((vm_task_t)0) + + +/* + * Pull in machine specific stuff. + */ + +//#include + +#ifndef MACH_KERNEL + +#ifndef __IOKIT_PORTS_DEFINED__ +#define __IOKIT_PORTS_DEFINED__ +typedef struct OSObject * io_object_t; +#endif /* __IOKIT_PORTS_DEFINED__ */ + +#include + +typedef io_object_t io_connect_t; +typedef io_object_t io_enumerator_t; +typedef io_object_t io_iterator_t; +typedef io_object_t io_registry_entry_t; +typedef io_object_t io_service_t; + +#define IO_OBJECT_NULL ((io_object_t) 0) + +#endif /* MACH_KERNEL */ + +// IOConnectMapMemory memoryTypes +enum { + kIODefaultMemoryType = 0 +}; + +enum { + kIODefaultCache = 0, + kIOInhibitCache = 1, + kIOWriteThruCache = 2, + kIOCopybackCache = 3, + kIOWriteCombineCache = 4 +}; + +// IOMemory mapping options +enum { + kIOMapAnywhere = 0x00000001, + + kIOMapCacheMask = 0x00000700, + kIOMapCacheShift = 8, + kIOMapDefaultCache = kIODefaultCache << kIOMapCacheShift, + kIOMapInhibitCache = kIOInhibitCache << kIOMapCacheShift, + kIOMapWriteThruCache = kIOWriteThruCache << kIOMapCacheShift, + kIOMapCopybackCache = kIOCopybackCache << kIOMapCacheShift, + kIOMapWriteCombineCache = kIOWriteCombineCache << kIOMapCacheShift, + + kIOMapUserOptionsMask = 0x00000fff, + + kIOMapReadOnly = 0x00001000, + + kIOMapStatic = 0x01000000, + kIOMapReference = 0x02000000, + kIOMapUnique = 0x04000000 +}; + +/*! @enum Scale Factors + @discussion Used when a scale_factor parameter is required to define a unit of time. + @constant kNanosecondScale Scale factor for nanosecond based times. + @constant kMicrosecondScale Scale factor for microsecond based times. + @constant kMillisecondScale Scale factor for millisecond based times. + @constant kTickScale Scale factor for the standard (100Hz) tick. + @constant kSecondScale Scale factor for second based times. */ + +enum { + kNanosecondScale = 1, + kMicrosecondScale = 1000, + kMillisecondScale = 1000 * 1000, + kSecondScale = 1000 * 1000 * 1000, + kTickScale = (kSecondScale / 100) +}; + +/* compatibility types */ + + +#ifdef __cplusplus +} +#endif + +#endif /* ! __IOKIT_IOTYPES_H */ diff --git a/i386/include/IOKit/IOUserClient.h b/i386/include/IOKit/IOUserClient.h new file mode 100644 index 0000000..c1d7fe5 --- /dev/null +++ b/i386/include/IOKit/IOUserClient.h @@ -0,0 +1,333 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +/* + * Changes to this API are expected. + */ + +#ifndef _IOKIT_IOUSERCLIENT_H +#define _IOKIT_IOUSERCLIENT_H + +#include +#include +#include + + +enum { + kIOUCTypeMask = 0x0000000f, + kIOUCScalarIScalarO = 0, + kIOUCScalarIStructO = 2, + kIOUCStructIStructO = 3, + kIOUCScalarIStructI = 4, + + kIOUCForegroundOnly = 0x00000010, +}; + +/*! @enum + @abstract Constant to denote a variable length structure argument to IOUserClient. + @constant kIOUCVariableStructureSize Use in the structures IOExternalMethod, IOExternalAsyncMethod, IOExternalMethodDispatch to specify the size of the structure is variable. +*/ +enum { + kIOUCVariableStructureSize = 0xffffffff +}; + + +typedef IOReturn (IOService::*IOMethod)(void * p1, void * p2, void * p3, + void * p4, void * p5, void * p6 ); + +typedef IOReturn (IOService::*IOAsyncMethod)(OSAsyncReference asyncRef, + void * p1, void * p2, void * p3, + void * p4, void * p5, void * p6 ); + +typedef IOReturn (IOService::*IOTrap)(void * p1, void * p2, void * p3, + void * p4, void * p5, void * p6 ); + +struct IOExternalMethod { + IOService * object; + IOMethod func; + IOOptionBits flags; + IOByteCount count0; + IOByteCount count1; +}; + +struct IOExternalAsyncMethod { + IOService * object; + IOAsyncMethod func; + IOOptionBits flags; + IOByteCount count0; + IOByteCount count1; +}; + +struct IOExternalTrap { + IOService * object; + IOTrap func; +}; + +enum { + kIOUserNotifyMaxMessageSize = 64 +}; + +// keys for clientHasPrivilege +#define kIOClientPrivilegeAdministrator "root" +#define kIOClientPrivilegeLocalUser "local" +#define kIOClientPrivilegeForeground "foreground" + +/*! @enum + @abstract Constants to specify the maximum number of scalar arguments in the IOExternalMethodArguments structure. These constants are documentary since the scalarInputCount, scalarOutputCount fields reflect the actual number passed. + @constant kIOExternalMethodScalarInputCountMax The maximum number of scalars able to passed on input. + @constant kIOExternalMethodScalarOutputCountMax The maximum number of scalars able to passed on output. +*/ +enum { + kIOExternalMethodScalarInputCountMax = 16, + kIOExternalMethodScalarOutputCountMax = 16, +}; + + +struct IOExternalMethodArguments +{ + uint32_t version; + + uint32_t selector; + + mach_port_t asyncWakePort; + io_user_reference_t * asyncReference; + uint32_t asyncReferenceCount; + + const uint64_t * scalarInput; + uint32_t scalarInputCount; + + const void * structureInput; + uint32_t structureInputSize; + + IOMemoryDescriptor * structureInputDescriptor; + + uint64_t * scalarOutput; + uint32_t scalarOutputCount; + + void * structureOutput; + uint32_t structureOutputSize; + + IOMemoryDescriptor * structureOutputDescriptor; + uint32_t structureOutputDescriptorSize; + + uint32_t __reserved[32]; +}; + +typedef IOReturn (*IOExternalMethodAction)(OSObject * target, void * reference, + IOExternalMethodArguments * arguments); +struct IOExternalMethodDispatch +{ + IOExternalMethodAction function; + uint32_t checkScalarInputCount; + uint32_t checkStructureInputSize; + uint32_t checkScalarOutputCount; + uint32_t checkStructureOutputSize; +}; + +enum { +#define IO_EXTERNAL_METHOD_ARGUMENTS_CURRENT_VERSION 1 + kIOExternalMethodArgumentsCurrentVersion = IO_EXTERNAL_METHOD_ARGUMENTS_CURRENT_VERSION +}; + + +/*! + @class IOUserClient + @abstract Provides a basis for communication between client applications and I/O Kit objects. +*/ + + +class IOUserClient : public IOService +{ + OSDeclareAbstractStructors(IOUserClient) + +protected: +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of this class in the future. +*/ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) +*/ + ExpansionData * reserved; + +private: + OSSet * mappings; + UInt8 sharedInstance; + UInt8 __reservedA[3]; + void * __reserved[7]; + +public: + virtual IOReturn externalMethod( uint32_t selector, IOExternalMethodArguments * arguments, + IOExternalMethodDispatch * dispatch = 0, OSObject * target = 0, void * reference = 0 ); + + virtual IOReturn registerNotificationPort( + mach_port_t port, UInt32 type, io_user_reference_t refCon); + +private: +#if __LP64__ + OSMetaClassDeclareReservedUnused(IOUserClient, 0); + OSMetaClassDeclareReservedUnused(IOUserClient, 1); +#else + OSMetaClassDeclareReservedUsed(IOUserClient, 0); + OSMetaClassDeclareReservedUsed(IOUserClient, 1); +#endif + OSMetaClassDeclareReservedUnused(IOUserClient, 2); + OSMetaClassDeclareReservedUnused(IOUserClient, 3); + OSMetaClassDeclareReservedUnused(IOUserClient, 4); + OSMetaClassDeclareReservedUnused(IOUserClient, 5); + OSMetaClassDeclareReservedUnused(IOUserClient, 6); + OSMetaClassDeclareReservedUnused(IOUserClient, 7); + OSMetaClassDeclareReservedUnused(IOUserClient, 8); + OSMetaClassDeclareReservedUnused(IOUserClient, 9); + OSMetaClassDeclareReservedUnused(IOUserClient, 10); + OSMetaClassDeclareReservedUnused(IOUserClient, 11); + OSMetaClassDeclareReservedUnused(IOUserClient, 12); + OSMetaClassDeclareReservedUnused(IOUserClient, 13); + OSMetaClassDeclareReservedUnused(IOUserClient, 14); + OSMetaClassDeclareReservedUnused(IOUserClient, 15); + + +protected: + static IOReturn sendAsyncResult(OSAsyncReference reference, + IOReturn result, void *args[], UInt32 numArgs); + static void setAsyncReference(OSAsyncReference asyncRef, + mach_port_t wakePort, + void *callback, void *refcon); + + static IOReturn sendAsyncResult64(OSAsyncReference64 reference, + IOReturn result, io_user_reference_t args[], UInt32 numArgs); + static void setAsyncReference64(OSAsyncReference64 asyncRef, + mach_port_t wakePort, + mach_vm_address_t callback, io_user_reference_t refcon); +public: + + static IOReturn clientHasPrivilege( void * securityToken, + const char * privilegeName ); + + /*! + @function releaseAsyncReference64 + @abstract Release the mach_port_t reference held within the OSAsyncReference64 structure. + @discussion The OSAsyncReference64 structure passed to async methods holds a reference to the wakeup mach port, which should be released to balance each async method call. Behavior is undefined if these calls are not correctly balanced. + @param reference The reference passed to the subclass IOAsyncMethod, or externalMethod() in the IOExternalMethodArguments.asyncReference field. + @result A return code. + */ + static IOReturn releaseAsyncReference64(OSAsyncReference64 reference); + /*! + @function releaseNotificationPort + @abstract Release the mach_port_t passed to registerNotificationPort(). + @discussion The mach_port_t passed to the registerNotificationPort() methods should be released to balance each call to registerNotificationPort(). Behavior is undefined if these calls are not correctly balanced. + @param reference The mach_port_t argument previously passed to the subclass implementation of registerNotificationPort(). + @result A return code. + */ + static IOReturn releaseNotificationPort(mach_port_t port); + + virtual bool init(); + virtual bool init( OSDictionary * dictionary ); + // Currently ignores the all args, just passes up to IOService::init() + virtual bool initWithTask( + task_t owningTask, void * securityToken, UInt32 type, + OSDictionary * properties); + + virtual bool initWithTask( + task_t owningTask, void * securityToken, UInt32 type); + + virtual void free(); + + virtual IOReturn clientClose( void ); + virtual IOReturn clientDied( void ); + + virtual IOService * getService( void ); + + virtual IOReturn registerNotificationPort( + mach_port_t port, UInt32 type, UInt32 refCon ); + + virtual IOReturn getNotificationSemaphore( UInt32 notification_type, + semaphore_t * semaphore ); + + virtual IOReturn connectClient( IOUserClient * client ); + + // memory will be released by user client when last map is destroyed + virtual IOReturn clientMemoryForType( UInt32 type, + IOOptionBits * options, + IOMemoryDescriptor ** memory ); + +#if !__LP64__ +private: + APPLE_KEXT_COMPATIBILITY_VIRTUAL + IOMemoryMap * mapClientMemory( IOOptionBits type, + task_t task, + IOOptionBits mapFlags = kIOMapAnywhere, + IOVirtualAddress atAddress = 0 ); +#endif + +public: + + /*! + @function removeMappingForDescriptor + Remove the first mapping created from the memory descriptor returned by clientMemoryForType() from IOUserClient's list of mappings. If such a mapping exists, it is retained and the reference currently held by IOUserClient is returned to the caller. + @param memory The memory descriptor instance previously returned by the implementation of clientMemoryForType(). + @result A reference to the first IOMemoryMap instance found in the list of mappings created by IOUserClient from that passed memory descriptor is returned, or zero if none exist. The caller should release this reference. + */ + IOMemoryMap * removeMappingForDescriptor(IOMemoryDescriptor * memory); + + /*! + @function exportObjectToClient + Make an arbitrary OSObject available to the client task. + @param task The task. + @param obj The object we want to export to the client. + @param clientObj Returned value is the client's port name. + */ + virtual IOReturn exportObjectToClient(task_t task, + OSObject *obj, io_object_t *clientObj); + + // Old methods for accessing method vector backward compatiblility only + virtual IOExternalMethod * + getExternalMethodForIndex( UInt32 index ) + APPLE_KEXT_DEPRECATED; + virtual IOExternalAsyncMethod * + getExternalAsyncMethodForIndex( UInt32 index ) + APPLE_KEXT_DEPRECATED; + + // Methods for accessing method vector. + virtual IOExternalMethod * + getTargetAndMethodForIndex( IOService ** targetP, UInt32 index ); + virtual IOExternalAsyncMethod * + getAsyncTargetAndMethodForIndex( IOService ** targetP, UInt32 index ); + + // Methods for accessing trap vector - old and new style + virtual IOExternalTrap * + getExternalTrapForIndex( UInt32 index ) + APPLE_KEXT_DEPRECATED; + + virtual IOExternalTrap * + getTargetAndTrapForIndex( IOService **targetP, UInt32 index ); +}; + +#endif /* ! _IOKIT_IOUSERCLIENT_H */ + diff --git a/i386/include/IOKit/IOWorkLoop.h b/i386/include/IOKit/IOWorkLoop.h new file mode 100644 index 0000000..808329a --- /dev/null +++ b/i386/include/IOKit/IOWorkLoop.h @@ -0,0 +1,321 @@ +/* + * Copyright (c) 1998-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* +Copyright (c) 1998 Apple Computer, Inc. All rights reserved. +HISTORY + 1998-7-13 Godfrey van der Linden(gvdl) + Created. + 1998-10-30 Godfrey van der Linden(gvdl) + Converted to C++ +*/ + +#ifndef __IOKIT_IOWORKLOOP_H +#define __IOKIT_IOWORKLOOP_H + +#include +#include +#include +#include + +#include + +class IOEventSource; +class IOTimerEventSource; +class IOCommandGate; + +/*! @class IOWorkLoop + @discussion An IOWorkLoop is a thread of control that is intended to be used to provide single threaded access to hardware. This class has no knowledge of the nature and type of the events that it marshals and forwards. When a device driver successfully starts (see IOService::start), it is expected to create the event sources it will need to receive events. Then a work loop is initialized and the events are added to the work loop for monitoring. In general this set up will be automated by the family superclass of the specific device. +

+ The thread main method walks the event source linked list and messages each one requesting a work check. At this point each event source is expected to notify its registered owner that the event has occurred. After each event has been walked and each indicates that another loop isn't required (by setting the 'more' flag to false) the thread will go to sleep on a signaling semaphore. +

+ When an event source is registered with a work loop it is informed of the semaphore to use to wake up the loop. +*/ +class IOWorkLoop : public OSObject +{ + OSDeclareDefaultStructors(IOWorkLoop) + +public: +/*! + @typedef Action + @discussion Type and arguments of callout C function that is used when +a runCommand is executed by a client. Cast to this type when you want a C++ +member function to be used. Note the arg1 - arg3 parameters are straight pass +through from the runCommand to the action callout. + @param target + Target of the function, can be used as a refcon. Note if a C++ function +was specified, this parameter is implicitly the first parameter in the target +member function's parameter list. + @param arg0 Argument to action from run operation. + @param arg1 Argument to action from run operation. + @param arg2 Argument to action from run operation. + @param arg3 Argument to action from run operation. +*/ + typedef IOReturn (*Action)(OSObject *target, + void *arg0, void *arg1, + void *arg2, void *arg3); + enum { + kPreciousStack = 0x00000001 + }; + +private: +/*! @function threadMainContinuation + @abstract Static function that calls the threadMain function. +*/ + static void threadMainContinuation(IOWorkLoop *self); + +protected: + +/*! @typedef maintCommandEnum + @discussion Enumeration of commands that _maintCommand can deal with. + @constant mAddEvent Used to tag a Remove event source command. + @constant mRemoveEvent Used to tag a Remove event source command. +*/ + typedef enum { mAddEvent, mRemoveEvent } maintCommandEnum; + +/*! @var gateLock + Mutual exclusion lock that is used by close and open Gate functions. + This is a recursive lock, which allows multiple layers of code to share a single IOWorkLoop without deadlock. This is common in IOKit since threads of execution tend to follow the service plane in the IORegistry, and multiple objects along the call path may acquire the gate for the same (shared) workloop. +*/ + IORecursiveLock *gateLock; + +/*! @var eventChain + Pointer to first event source in linked list. +*/ + IOEventSource *eventChain; + +/*! @var controlG + Internal control gate to maintain event system. +*/ + IOCommandGate *controlG; + +/*! @var workToDoLock + The spin lock that is used to guard the 'workToDo' variable. +*/ + IOSimpleLock *workToDoLock; + +/*! @var workThread + Work loop thread. +*/ + IOThread workThread; + +/*! @var workToDo + Used to to indicate that an interrupt has fired and needs to be processed. +*/ + volatile bool workToDo; + +/*! @var loopRestart + Set if an event chain has been changed and the system has to be rechecked from start. (Internal use only) +*/ + bool loopRestart; + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. +*/ + struct ExpansionData { + IOOptionBits options; + }; + +/*! @var reserved + Reserved for future use. (Internal use only) +*/ + ExpansionData *reserved; + +/*! @function _maintRequest + @abstract Synchronous implementation of addEventSource and removeEventSource functions. + @discussion This function implements the commands as defined in the maintCommandEnum. It can be subclassed but it isn't an external API in the usual sense. A subclass implementation of _maintRequest would be called synchronously with respect to the work loop and it should be implemented in the usual way that an ioctl would be. + @return kIOReturnUnsupported if the command given is not implemented, kIOReturnSuccess otherwise. +*/ + virtual IOReturn _maintRequest(void *command, void *data, void *, void *); + +/*! @function free + @discussion Mandatory free of the object independent of the current retain count. If the work loop is running, this method will not return until the thread has successfully terminated. Each event source in the chain will be released and the working semaphore will be destroyed. +

+ If the client has some outstanding requests on an event they will never be informed of completion. If an external thread is blocked on any of the event sources they will be awakened with a KERN_INTERUPTED status. +*/ + virtual void free(); + +/*! @function threadMain + @discussion Work loop threads main function. This function consists of 3 + loops: the outermost loop is the semaphore clear and wait loop, the middle + loop terminates when there is no more work, and the inside loop walks the + event list calling the checkForWork method in each event source. If an + event source has more work to do, it can set the more flag and the middle + loop will repeat. When no more work is outstanding the outermost will + sleep until an event is signalled. +*/ + virtual void threadMain(); + +public: + +/*! @function workLoop + @abstract Factory member function to construct and intialize a work loop. + @result Returns a workLoop instance if constructed successfully, 0 otherwise. +*/ + static IOWorkLoop *workLoop(); + +/*! @function workLoopWithOptions(IOOptionBits options) + @abstract Factory member function to constuct and intialize a work loop. + @param options Options - kPreciousStack to avoid stack deallocation on paging path. + @result Returns a workLoop instance if constructed successfully, 0 otherwise. +*/ + static IOWorkLoop *workLoopWithOptions(IOOptionBits options); + +/*! @function init + @discussion Initializes an instance of the workloop. This method creates and initializes the signaling semaphore, the controller gate lock, and spawns the thread that will continue executing. + @result Returns true if initialized successfully, false otherwise. +*/ + virtual bool init(); + +/*! @function getThread + @abstract Gets the workThread. + @result Returns workThread. +*/ + virtual IOThread getThread() const; + +/*! @function onThread + @abstract Is the current execution context on the work thread? + @result Returns true if IOThreadSelf() == workThread. +*/ + virtual bool onThread() const; + +/*! @function inGate + @abstract Is the current execution context holding the work-loop's gate? + @result Returns true if IOThreadSelf() is gate holder. +*/ + virtual bool inGate() const; + +/*! @function addEventSource + @discussion Add an event source to be monitored by the work loop. This function does not return until the work loop has acknowledged the arrival of the new event source. When a new event has been added the threadMain will always restart its loop and check all outstanding events. The event source is retained by the work loop. + @param newEvent Pointer to IOEventSource subclass to add. + @result Always returns kIOReturnSuccess. +*/ + virtual IOReturn addEventSource(IOEventSource *newEvent); + +/*! @function removeEventSource + @discussion Remove an event source from the work loop. This function does not return until the work loop has acknowledged the removal of the event source. When an event has been removed the threadMain will always restart its loop and check all outstanding events. The event source will be released before return. + @param toRemove Pointer to IOEventSource subclass to remove. + @result Returns kIOReturnSuccess if successful, kIOReturnBadArgument if toRemove couldn't be found. +*/ + virtual IOReturn removeEventSource(IOEventSource *toRemove); + +/*! @function enableAllEventSources + @abstract Calls enable() in all event sources. + @discussion For all event sources in eventChain, call enable() function. See IOEventSource::enable(). +*/ + virtual void enableAllEventSources() const; + +/*! @function disableAllEventSources + @abstract Calls disable() in all event sources. + @discussion For all event sources in eventChain, call disable() function. See IOEventSource::disable(). +*/ + virtual void disableAllEventSources() const; + +/*! @function enableAllInterrupts + @abstract Calls enable() in all interrupt event sources. + @discussion For all event sources (ES) for which IODynamicCast(IOInterruptEventSource, ES) is valid, in eventChain call enable() function. See IOEventSource::enable(). +*/ + virtual void enableAllInterrupts() const; + +/*! @function disableAllInterrupts + @abstract Calls disable() in all interrupt event sources. + @discussion For all event sources (ES) for which IODynamicCast(IOInterruptEventSource, ES) is valid, in eventChain call disable() function. See IOEventSource::disable(). +*/ + virtual void disableAllInterrupts() const; + + +protected: + // Internal APIs used by event sources to control the thread + friend class IOEventSource; + friend class IOTimerEventSource; + virtual void signalWorkAvailable(); + virtual void openGate(); + virtual void closeGate(); + virtual bool tryCloseGate(); + virtual int sleepGate(void *event, UInt32 interuptibleType); + virtual void wakeupGate(void *event, bool oneThread); + +public: + /* methods available in Mac OS X 10.1 or later */ + +/*! @function runAction + @abstract Single thread a call to an action with the work-loop. + @discussion Client function that causes the given action to be called in a single threaded manner. Beware: the work-loop's gate is recursive and runAction can cause direct or indirect re-entrancy. When executing on a client's thread, runAction will sleep until the work-loop's gate opens for execution of client actions, the action is single threaded against all other work-loop event sources. + @param action Pointer to function to be executed in work-loop context. + @param arg0 Parameter for action parameter, defaults to 0. + @param arg1 Parameter for action parameter, defaults to 0. + @param arg2 Parameter for action parameter, defaults to 0. + @param arg3 Parameter for action parameter, defaults to 0. + @result Returns the value of the Action callout. +*/ + virtual IOReturn runAction(Action action, OSObject *target, + void *arg0 = 0, void *arg1 = 0, + void *arg2 = 0, void *arg3 = 0); + +/*! @function runEventSources + @discussion Consists of the inner 2 loops of the threadMain function(qv). + The outer loop terminates when there is no more work, and the inside loop + walks the event list calling the checkForWork method in each event source. + If an event source has more work to do, it can set the more flag and the + outer loop will repeat. +

+ This function can be used to clear a priority inversion between the normal + workloop thread and multimedia's real time threads. The problem is that + the interrupt action routine is often held off by high priority threads. + So if they want to get their data now they will have to call us and ask if + any data is available. The multi-media user client will arrange for this + function to be called, which causes any pending interrupts to be processed + and the completion routines called. By the time the function returns all + outstanding work will have been completed at the real time threads + priority. + + @result Return false if the work loop is shutting down, true otherwise. +*/ + virtual bool runEventSources(); + +protected: + // Internal APIs used by event sources to control the thread + virtual int sleepGate(void *event, AbsoluteTime deadline, UInt32 interuptibleType); + +protected: +#if __LP64__ + OSMetaClassDeclareReservedUnused(IOWorkLoop, 0); + OSMetaClassDeclareReservedUnused(IOWorkLoop, 1); + OSMetaClassDeclareReservedUnused(IOWorkLoop, 2); +#else + OSMetaClassDeclareReservedUsed(IOWorkLoop, 0); + OSMetaClassDeclareReservedUsed(IOWorkLoop, 1); + OSMetaClassDeclareReservedUsed(IOWorkLoop, 2); +#endif + OSMetaClassDeclareReservedUnused(IOWorkLoop, 3); + OSMetaClassDeclareReservedUnused(IOWorkLoop, 4); + OSMetaClassDeclareReservedUnused(IOWorkLoop, 5); + OSMetaClassDeclareReservedUnused(IOWorkLoop, 6); + OSMetaClassDeclareReservedUnused(IOWorkLoop, 7); +}; + +#endif /* !__IOKIT_IOWORKLOOP_H */ diff --git a/i386/include/IOKit/OSMessageNotification.h b/i386/include/IOKit/OSMessageNotification.h new file mode 100644 index 0000000..7d7b5e5 --- /dev/null +++ b/i386/include/IOKit/OSMessageNotification.h @@ -0,0 +1,158 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + +#ifndef __OS_OSMESSAGENOTIFICATION_H +#define __OS_OSMESSAGENOTIFICATION_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +enum { + kFirstIOKitNotificationType = 100, + kIOServicePublishNotificationType = 100, + kIOServiceMatchedNotificationType = 101, + kIOServiceTerminatedNotificationType = 102, + kIOAsyncCompletionNotificationType = 150, + kIOServiceMessageNotificationType = 160, + kLastIOKitNotificationType = 199 +}; + +enum { + kOSNotificationMessageID = 53, + kOSAsyncCompleteMessageID = 57, + kMaxAsyncArgs = 16 +}; + +enum { + kIOAsyncReservedIndex = 0, + kIOAsyncReservedCount, + + kIOAsyncCalloutFuncIndex = kIOAsyncReservedCount, + kIOAsyncCalloutRefconIndex, + kIOAsyncCalloutCount, + + kIOMatchingCalloutFuncIndex = kIOAsyncReservedCount, + kIOMatchingCalloutRefconIndex, + kIOMatchingCalloutCount, + + kIOInterestCalloutFuncIndex = kIOAsyncReservedCount, + kIOInterestCalloutRefconIndex, + kIOInterestCalloutServiceIndex, + kIOInterestCalloutCount +}; + + + +// -------------- +enum { + kOSAsyncRef64Count = 8, + kOSAsyncRef64Size = kOSAsyncRef64Count * ((int) sizeof(io_user_reference_t)) +}; +typedef io_user_reference_t OSAsyncReference64[kOSAsyncRef64Count]; + +struct OSNotificationHeader64 { + mach_msg_size_t size; /* content size */ + natural_t type; + OSAsyncReference64 reference; + +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) + unsigned char content[]; +#else + unsigned char content[0]; +#endif +}; + +#pragma pack(4) +struct IOServiceInterestContent64 { + natural_t messageType; + io_user_reference_t messageArgument[1]; +}; +#pragma pack() +// -------------- + +#if !KERNEL_USER32 + +enum { + kOSAsyncRefCount = 8, + kOSAsyncRefSize = 32 +}; +typedef natural_t OSAsyncReference[kOSAsyncRefCount]; + +struct OSNotificationHeader { + mach_msg_size_t size; /* content size */ + natural_t type; + OSAsyncReference reference; + +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) + unsigned char content[]; +#else + unsigned char content[0]; +#endif +}; + +#pragma pack(4) +struct IOServiceInterestContent { + natural_t messageType; + void * messageArgument[1]; +}; +#pragma pack() + +#endif /* KERNEL_USER32 */ + +struct IOAsyncCompletionContent { + IOReturn result; +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) + void * args[] __attribute__ ((packed)); +#else + void * args[0] __attribute__ ((packed)); +#endif +}; + +#ifndef __cplusplus +typedef struct OSNotificationHeader OSNotificationHeader; +typedef struct IOServiceInterestContent IOServiceInterestContent; +typedef struct IOAsyncCompletionContent IOAsyncCompletionContent; +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __OS_OSMESSAGENOTIFICATION_H */ + diff --git a/i386/include/IOKit/acpi/IOACPIPlatformDevice.h b/i386/include/IOKit/acpi/IOACPIPlatformDevice.h new file mode 100644 index 0000000..ebf0ccf --- /dev/null +++ b/i386/include/IOKit/acpi/IOACPIPlatformDevice.h @@ -0,0 +1,254 @@ +/* + * Copyright (c) 2003-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOACPIPLATFORMDEVICE_H +#define _IOKIT_IOACPIPLATFORMDEVICE_H + +#include +#include +#include + +class IOACPIPlatformExpert; + +class IOACPIPlatformDevice : public IOPlatformDevice +{ + OSDeclareDefaultStructors( IOACPIPlatformDevice ) + +protected: + void * _deviceHandle; + UInt32 _deviceType; + UInt32 _powerFlags; + UInt32 * _powerStateFlags; + UInt32 _sleepPowerState; + IOService * _acpiParent; + IOACPIPlatformExpert * _platform; + + /*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties + of the class in the future. + */ + struct ExpansionData { }; + + /*! @var reserved + Reserved for future use. (Internal use only) + */ + ExpansionData * reserved; + + virtual bool initACPIPowerManagement( IOService * powerParent ); + virtual void stopACPIPowerManagement( IOService * powerParent ); + +public: + virtual bool init( IOService * platform, + void * handle, + OSDictionary * properties ); + + virtual void free( void ); + + virtual bool attachToParent( IORegistryEntry * parent, + const IORegistryPlane * plane ); + + virtual void detachFromParent( IORegistryEntry * parent, + const IORegistryPlane * plane ); + + virtual bool getPathComponent( char * path, int * length, + const IORegistryPlane * plane ) const; + + virtual bool compareName( OSString * name, + OSString ** matched ) const; + + virtual IOReturn getResources( void ); + + virtual void * getDeviceHandle( void ) const; + + virtual UInt32 getDeviceStatus( void ) const; + + enum { + kTypeDevice = 0, + kTypeProcessor = 1, + kTypePowerResource = 2 + }; + + virtual UInt32 getDeviceType( void ) const; + + virtual void setDeviceType( UInt32 deviceType ); + + // Method (object) evaluation + + virtual IOReturn validateObject( const OSSymbol * objectName ); + + virtual IOReturn validateObject( const char * objectName ); + + virtual IOReturn evaluateObject( const OSSymbol * objectName, + OSObject ** result = 0, + OSObject * params[] = 0, + IOItemCount paramCount = 0, + IOOptionBits options = 0 ); + + virtual IOReturn evaluateObject( const char * objectName, + OSObject ** result = 0, + OSObject * params[] = 0, + IOItemCount paramCount = 0, + IOOptionBits options = 0 ); + + virtual IOReturn evaluateInteger( const OSSymbol * objectName, + UInt32 * resultInt32, + OSObject * params[] = 0, + IOItemCount paramCount = 0, + IOOptionBits options = 0 ); + + virtual IOReturn evaluateInteger( const char * objectName, + UInt32 * resultInt32, + OSObject * params[] = 0, + IOItemCount paramCount = 0, + IOOptionBits options = 0 ); + + virtual IOReturn evaluateInteger( const OSSymbol * objectName, + UInt64 * resultInt64, + OSObject * params[] = 0, + IOItemCount paramCount = 0, + IOOptionBits options = 0 ); + + virtual IOReturn evaluateInteger( const char * objectName, + UInt64 * resultInt64, + OSObject * params[] = 0, + IOItemCount paramCount = 0, + IOOptionBits options = 0 ); + + // ACPI table access + + virtual const OSData * getACPITableData( const char * tableName, + UInt32 tableInstance = 0 ) const; + + // Map ACPI event to interrupt event source index + + virtual SInt32 installInterruptForFixedEvent( UInt32 fixedEvent ); + + virtual SInt32 installInterruptForGPE( UInt32 gpeNumber, + void * gpeBlockDevice = 0, + IOOptionBits options = 0 ); + + // ACPI global lock acquire/release + + virtual IOReturn acquireGlobalLock( UInt32 * lockToken, + const mach_timespec_t * timeout = 0 ); + + virtual void releaseGlobalLock( UInt32 lockToken ); + + // Address space handler registration + + virtual IOReturn registerAddressSpaceHandler( + IOACPIAddressSpaceID spaceID, + IOACPIAddressSpaceHandler handler, + void * context, + IOOptionBits options = 0 ); + + virtual void unregisterAddressSpaceHandler( + IOACPIAddressSpaceID spaceID, + IOACPIAddressSpaceHandler handler, + IOOptionBits options = 0 ); + + // Address space access + + virtual IOReturn readAddressSpace( UInt64 * value, + IOACPIAddressSpaceID spaceID, + IOACPIAddress address, + UInt32 bitWidth, + UInt32 bitOffset = 0, + IOOptionBits options = 0 ); + + virtual IOReturn writeAddressSpace( UInt64 value, + IOACPIAddressSpaceID spaceID, + IOACPIAddress address, + UInt32 bitWidth, + UInt32 bitOffset = 0, + IOOptionBits options = 0 ); + + // Power management + + virtual bool hasSystemWakeCapability( void ) const; + + virtual IOReturn setSystemWakeCapabilityEnable( bool enable ); + + virtual bool hasACPIPowerStateSupport( UInt32 powerState ) const; + + virtual IOReturn setACPIPowerManagementEnable( + bool enable, + UInt32 powerState = kIOACPIDevicePowerStateD3, + IOOptionBits options = 0 ); + + virtual IOReturn setPowerState( unsigned long powerState, + IOService * whatDevice ); + + // I/O space helpers + + virtual void ioWrite32( UInt16 offset, UInt32 value, + IOMemoryMap * map = 0 ); + + virtual void ioWrite16( UInt16 offset, UInt16 value, + IOMemoryMap * map = 0 ); + + virtual void ioWrite8( UInt16 offset, UInt8 value, + IOMemoryMap * map = 0 ); + + virtual UInt32 ioRead32( UInt16 offset, IOMemoryMap * map = 0 ); + + virtual UInt16 ioRead16( UInt16 offset, IOMemoryMap * map = 0 ); + + virtual UInt8 ioRead8( UInt16 offset, IOMemoryMap * map = 0 ); + + // vtable padding + + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 0 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 1 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 2 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 3 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 4 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 5 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 6 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 7 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 8 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 9 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 10 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 11 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 12 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 13 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 14 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 15 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 16 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 17 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 18 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 19 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 20 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 21 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 22 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 23 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 24 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 25 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 26 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 27 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 28 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 29 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 30 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 31 ); +}; + +#endif /* !_IOKIT_IOACPIPLATFORMDEVICE_H */ diff --git a/i386/include/IOKit/acpi/IOACPIPlatformExpert.h b/i386/include/IOKit/acpi/IOACPIPlatformExpert.h new file mode 100644 index 0000000..413f396 --- /dev/null +++ b/i386/include/IOKit/acpi/IOACPIPlatformExpert.h @@ -0,0 +1,178 @@ +/* + * Copyright (c) 2003-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOACPIPLATFORMEXPERT_H +#define _IOKIT_IOACPIPLATFORMEXPERT_H + +#include // superclass +#include // children + +class IOACPIPlatformExpert : public IODTPlatformExpert +{ + OSDeclareAbstractStructors( IOACPIPlatformExpert ) + + friend class IOACPIPlatformDevice; + +protected: + /*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties + of the class in the future. + */ + struct ExpansionData { }; + + /*! @var reserved + Reserved for future use. (Internal use only) + */ + ExpansionData * reserved; + +public: + virtual bool start( IOService * provider ); + +protected: + // Map ACPI event to interrupt event source index + + virtual SInt32 installDeviceInterruptForFixedEvent( + IOService * device, + UInt32 fixedEvent ) = 0; + + virtual SInt32 installDeviceInterruptForGPE( + IOService * device, + UInt32 gpeNumber, + void * gpeBlockDevice, + IOOptionBits options ) = 0; + + // ACPI global lock acquisition + + virtual IOReturn acquireGlobalLock( IOService * client, + UInt32 * lockToken, + const mach_timespec_t * timeout ) = 0; + + virtual void releaseGlobalLock( IOService * client, + UInt32 lockToken ) = 0; + + // ACPI method and object evaluation + + virtual IOReturn validateObject( IOACPIPlatformDevice * device, + const OSSymbol * objectName ) = 0; + + virtual IOReturn validateObject( IOACPIPlatformDevice * device, + const char * objectName ); + + virtual IOReturn evaluateObject( IOACPIPlatformDevice * device, + const OSSymbol * objectName, + OSObject ** result, + OSObject * params[], + IOItemCount paramCount, + IOOptionBits options ) = 0; + + virtual IOReturn evaluateObject( IOACPIPlatformDevice * device, + const char * objectName, + OSObject ** result, + OSObject * params[], + IOItemCount paramCount, + IOOptionBits options ); + + // ACPI table + + virtual const OSData * getACPITableData( + const char * tableName, + UInt32 tableInstance ) = 0; + + // Address space handler + + virtual IOReturn registerAddressSpaceHandler( + IOACPIPlatformDevice * device, + IOACPIAddressSpaceID spaceID, + IOACPIAddressSpaceHandler handler, + void * context, + IOOptionBits options ) = 0; + + virtual void unregisterAddressSpaceHandler( + IOACPIPlatformDevice * device, + IOACPIAddressSpaceID spaceID, + IOACPIAddressSpaceHandler handler, + IOOptionBits options ) = 0; + + // Address space read/write + + virtual IOReturn readAddressSpace( UInt64 * value, + IOACPIAddressSpaceID spaceID, + IOACPIAddress address, + UInt32 bitWidth, + UInt32 bitOffset, + IOOptionBits options ) = 0; + + virtual IOReturn writeAddressSpace( UInt64 value, + IOACPIAddressSpaceID spaceID, + IOACPIAddress address, + UInt32 bitWidth, + UInt32 bitOffset, + IOOptionBits options ) = 0; + + // Device power management + + virtual IOReturn setDevicePowerState( IOACPIPlatformDevice * device, + UInt32 powerState ) = 0; + + virtual IOReturn getDevicePowerState( IOACPIPlatformDevice * device, + UInt32 * powerState ) = 0; + + virtual IOReturn setDeviceWakeEnable( IOACPIPlatformDevice * device, + bool enable ) = 0; + + // vtable padding + + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 0 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 1 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 2 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 3 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 4 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 5 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 6 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 7 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 8 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 9 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 10 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 11 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 12 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 13 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 14 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 15 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 16 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 17 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 18 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 19 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 20 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 21 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 22 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 23 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 24 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 25 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 26 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 27 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 28 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 29 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 30 ); + OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 31 ); +}; + +#endif /* !_IOKIT_IOACPIPLATFORMEXPERT_H */ diff --git a/i386/include/IOKit/acpi/IOACPITypes.h b/i386/include/IOKit/acpi/IOACPITypes.h new file mode 100644 index 0000000..6215cd4 --- /dev/null +++ b/i386/include/IOKit/acpi/IOACPITypes.h @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2003-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __IOKIT_IOACPITYPES_H +#define __IOKIT_IOACPITYPES_H + +#include + +extern const IORegistryPlane * gIOACPIPlane; +extern const OSSymbol * gIOACPIHardwareIDKey; +extern const OSSymbol * gIOACPIUniqueIDKey; +extern const OSSymbol * gIOACPIAddressKey; +extern const OSSymbol * gIOACPIDeviceStatusKey; + +#pragma pack(1) + +struct IOACPIAddressSpaceDescriptor { + UInt32 resourceType; + UInt32 generalFlags; + UInt32 typeSpecificFlags; + UInt32 reserved1; + UInt64 granularity; + UInt64 minAddressRange; + UInt64 maxAddressRange; + UInt64 translationOffset; + UInt64 addressLength; + UInt64 reserved2; + UInt64 reserved3; + UInt64 reserved4; +}; + +enum { + kIOACPIMemoryRange = 0, + kIOACPIIORange = 1, + kIOACPIBusNumberRange = 2 +}; + +typedef UInt32 IOACPIAddressSpaceID; + +enum { + kIOACPIAddressSpaceIDSystemMemory = 0, + kIOACPIAddressSpaceIDSystemIO = 1, + kIOACPIAddressSpaceIDPCIConfiguration = 2, + kIOACPIAddressSpaceIDEmbeddedController = 3, + kIOACPIAddressSpaceIDSMBus = 4 +}; + +/* + * Address space operation + */ +enum { + kIOACPIAddressSpaceOpRead = 0, + kIOACPIAddressSpaceOpWrite = 1 +}; + +/* + * 64-bit ACPI address + */ +union IOACPIAddress { + UInt64 addr64; + struct { + unsigned int offset :16; + unsigned int function :3; + unsigned int device :5; + unsigned int bus :8; + unsigned int segment :16; + unsigned int reserved :16; + } pci; +}; + +/* + * Address space handler + */ +typedef IOReturn (*IOACPIAddressSpaceHandler)( UInt32 operation, + IOACPIAddress address, + UInt64 * value, + UInt32 bitWidth, + UInt32 bitOffset, + void * context ); + +/* + * ACPI fixed event types + */ +enum { + kIOACPIFixedEventPMTimer = 0, + kIOACPIFixedEventPowerButton = 2, + kIOACPIFixedEventSleepButton = 3, + kIOACPIFixedEventRealTimeClock = 4 +}; + +#pragma pack() + +/* + * FIXME: Move to xnu/iokit to reserve the ACPI family code. + */ +#ifndef sub_iokit_acpi +#define sub_iokit_acpi err_sub(10) +#endif + +/* + * ACPI notify message sent to all clients and interested parties. + * The notify code can be read from the argument as an UInt32. + */ +#define kIOACPIMessageDeviceNotification iokit_family_msg(sub_iokit_acpi, 0x10) + +/* + * ACPI device power states + */ +enum { + kIOACPIDevicePowerStateD0 = 0, + kIOACPIDevicePowerStateD1 = 1, + kIOACPIDevicePowerStateD2 = 2, + kIOACPIDevicePowerStateD3 = 3, + kIOACPIDevicePowerStateCount = 4 +}; + +#endif /* !__IOKIT_IOACPITYPES_H */ diff --git a/i386/include/IOKit/assert.h b/i386/include/IOKit/assert.h new file mode 100644 index 0000000..4c56050 --- /dev/null +++ b/i386/include/IOKit/assert.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IO_ASSERT_H_ +#define _IO_ASSERT_H_ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#if IOASSERT +#undef MACH_ASSERT +#define MACH_ASSERT 1 +#endif +#include + +#ifdef __cplusplus +} +#endif + + +#if( !defined( OSCompileAssert ) ) +# define OSCompileAssert( TEST ) \ + extern int OSCompileAssertFailed[ ( TEST ) ? 1 : -1 ] __unused; +#endif + +#endif /* _IO_ASSERT_H_ */ + diff --git a/i386/include/IOKit/ata/ATADeviceNub.h b/i386/include/IOKit/ata/ATADeviceNub.h new file mode 100644 index 0000000..db14182 --- /dev/null +++ b/i386/include/IOKit/ata/ATADeviceNub.h @@ -0,0 +1,164 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + @header ATADeviceNub.h + @abstract A concrete implementation of IOATADevice. + */ + +#ifndef _ATADEVICENUB_H +#define _ATADEVICENUB_H + +#include +#include "IOATATypes.h" +#include "IOATADevice.h" +#include "IOATAController.h" + +#include "IOATABusCommand.h" + + +/*! +@class ATADeviceNub +@abstract ATADeviceNub is a concrete implementation of IOATADevice. +@discussion clients of IOATA (disk drivers) should use the interface presented +by IOATADevice. Concrete nubs are private to the IOATA family and +specific subclasses of IOATADevice are instantiated by controller +drivers to provide the abstract interface to clients. + +*/ +class ATADeviceNub : public IOATADevice +{ + OSDeclareDefaultStructors(ATADeviceNub); + +public: + + /*!@function ataDeviceNub + @abstract static creator function - used by IOATAControllers to create nubs. + */ + static ATADeviceNub* ataDeviceNub( IOATAController* provider, ataUnitID unit, ataDeviceType devType); + + /*!@function attach + @abstract override of IOService method. + */ + virtual bool attach(IOService* provider ); + + + // overrides from IOATADevice to provide actual client interface + + + /*!@function executeCommand + @abstract Submit IO requests + */ + virtual IOReturn executeCommand(IOATACommand* command); + + // create and destroy IOATACommands + /*!@function allocCommand + @abstract create command objects for clients. + */ + virtual IOATACommand* allocCommand( void ); + + /*!@function freeCommand + @abstract Clients use this method to dispose of command objects. + */ + virtual void freeCommand( IOATACommand* inCommand); + + +protected: + + /*!@function init + @abstract used after creating the nub. + */ + virtual bool init(IOATAController* provider, ataUnitID unit, ataDeviceType devType); + + /*!@function publishProperties + @abstract publish the nub's properties in the device tree. + */ + virtual void publishProperties( void ); + + /*!@function publishBusProperties + @abstract puts info about this device's bus capability in the device tree. + */ + virtual void publishBusProperties(void); + + /*!@function publishVendorProperties + @abstract will be deprecated. + */ + virtual void publishVendorProperties( void ); + + /*!@function getDeviceID + @abstract get the unit id of this drive (0 or 1) + */ + virtual IOReturn getDeviceID(void); + + /*!@function MyATACallback + @abstract to be deprecated. + */ + static void MyATACallback(IOATACommand* command ); + + /*!@function processCallback + @abstract to be deprecated. + */ + void processCallback(IOATACommand* command ); + + /*!@function swapBytes16 + @abstract to be deprecated. + */ + void swapBytes16( UInt8* dataBuffer, IOByteCount length); + + UInt8* buffer; + +protected: +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the ATADeviceNub in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + +private: + OSMetaClassDeclareReservedUnused(ATADeviceNub, 0); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 1); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 2); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 3); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 4); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 5); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 6); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 7); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 8); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 9); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 10); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 11); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 12); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 13); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 14); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 15); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 16); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 17); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 18); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 19); + OSMetaClassDeclareReservedUnused(ATADeviceNub, 20); + +}; + +#endif /* !_IOATABUSNUB_H */ diff --git a/i386/include/IOKit/ata/ATATimerEventSource.h b/i386/include/IOKit/ata/ATATimerEventSource.h new file mode 100644 index 0000000..864fa9e --- /dev/null +++ b/i386/include/IOKit/ata/ATATimerEventSource.h @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2001-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _ATATIMEREVENTSOURCE_H +#define _ATATIMEREVENTSOURCE_H + + +#include +#include +#include +#include +#include + + +/*! +@class ATATimerEventSource + +@discussion +Extend the timer event source to allow checking for timer expiration +from behind the workloop. +*/ + +class ATATimerEventSource : public IOTimerEventSource +{ + OSDeclareDefaultStructors(ATATimerEventSource); + + public: + + /*!@function ataTimerEventSource + @abstract allocate an instance of this type. + */ + static ATATimerEventSource * + ataTimerEventSource(OSObject *owner, Action action = 0); + + /*!@function hasTimedOut + @abstract returns true if the timer has expired since the last enable/disable or setTimeout() or wakeAtTime() call. + */ + virtual bool hasTimedOut( void ); + + // override to initialize the time out flag. + /*!@function + @abstract + */ + virtual bool init(OSObject *owner, Action action = 0); + + /*!@function enable + @abstract overrides in order to set/clear the timed out flag + */ + virtual void enable(); + + /*!@function disable + @abstract overrides in order to set/clear the timed out flag + */ + virtual void disable(); + + /*!@function wakeAtTime + @abstract overrides in order to set/clear the timed out flag + */ + virtual IOReturn wakeAtTime(UnsignedWide abstime); + + /*!@function cancelTimeout + @abstract overrides in order to set/clear the timed out flag + */ + virtual void cancelTimeout(); + +protected: + + enum{ kTimedOutTrue = 'true', + kTimedOutFalse = 'fals' + }; + + UInt32 hasExpired; + + + /*!@function myTimeout + @abstract my timeout function which sets the timedOut flag atomically. + */ + static void myTimeout(void *self); + + /*!@function setTimeoutFunc + @abstract override to install my timeout function instead of the super's. + */ + virtual void setTimeoutFunc(); + + /*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. + */ + struct ExpansionData { }; + + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + +private: + OSMetaClassDeclareReservedUnused(ATATimerEventSource, 0); + OSMetaClassDeclareReservedUnused(ATATimerEventSource, 1); + OSMetaClassDeclareReservedUnused(ATATimerEventSource, 2); + OSMetaClassDeclareReservedUnused(ATATimerEventSource, 3); + OSMetaClassDeclareReservedUnused(ATATimerEventSource, 4); + OSMetaClassDeclareReservedUnused(ATATimerEventSource, 5); + OSMetaClassDeclareReservedUnused(ATATimerEventSource, 6); + OSMetaClassDeclareReservedUnused(ATATimerEventSource, 7); + +}; + + +#endif /*_ATATIMEREVENTSOURCE_H*/ diff --git a/i386/include/IOKit/ata/IOATABusCommand.h b/i386/include/IOKit/ata/IOATABusCommand.h new file mode 100644 index 0000000..94b3bca --- /dev/null +++ b/i386/include/IOKit/ata/IOATABusCommand.h @@ -0,0 +1,250 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * + * IOATABusCommand.h + * + */ + +#ifndef _IOATABUSCOMMAND_H +#define _IOATABUSCOMMAND_H + +#include +#include "IOATATypes.h" +#include "IOATACommand.h" + + +class IOSyncer; + + +/*! + +@class IOATABusCommand + +@discussion ATA Device (disk) drivers should use the superclass, IOATACommand +and may not derive or use any subclass of IOATACommand. + +IOATABusCommand is the subclass of IOATACommand used by +IOATAControllers. Controller classes may override this class to +provide additional fields as their needs dictate or may use this +as a concrete class if it is sufficient. + +IOATAControllers are always paired with specific IOATADevices +and each specific subclass of IOATADevice is in turn the factory method +for IOATACommands for use by disk drivers. + +In this manner, mass-storage device drivers (disk drivers, clients of +ATA bus controllers) see only the generalized interface of IOATADevice +and the generalized interface of IOATACommand. This provides isolation +from specific bus details for disk drivers and offers flexibility to +controllers to add per-command fields and state variables for their own +internal use. + +*/ + +class IOATABusCommand : public IOATACommand { + + OSDeclareDefaultStructors( IOATABusCommand ); + + public: + + // data items for use by IOATAController + + /*! @var queueChain queue header for use by IOATAController. */ + queue_chain_t queueChain; + + /*! @var state state-semaphore for use by IOATAController */ + UInt32 state; + + /*! @var syncer IOSyncer for use by IOATAController */ + IOSyncer* syncer; + + + + /*!@function allocateCmd + @abstract factory method to create an instance of this class used by subclasses of IOATADevice + */ + static IOATABusCommand* allocateCmd(void); + + /*!@function zeroCommand + @abstract set to blank state, call prior to re-use of this object + */ + virtual void zeroCommand(void); + + /*!@function getOpcode + @abstract return the command opcode + */ + virtual ataOpcode getOpcode( void ); + + /*!@function getFlags + @abstract return the flags for this command. + */ + virtual ataFlags getFlags ( void ); + + /*!@function getRegMask + @abstract get the register mask for desired regs + */ + virtual ataRegMask getRegMask( void ); + + /*!@function getUnit + @abstract return the unit id (0 master, 1 slave) + */ + virtual ataUnitID getUnit( void ); + + /*!@function getTimeoutMS + @abstract return the timeout value for this command + */ + virtual UInt32 getTimeoutMS (void ); + + /*!@function setResult + @abstract set the result code + */ + virtual void setResult( IOReturn ); + + /*!@function getCallbackPtr + @abstract return the callback pointer + */ + virtual IOATACompletionFunction* getCallbackPtr (void ); + + + /*!@function executeCallback + @abstract call the completion callback function + */ + virtual void executeCallback(void); + + /*!@function getTaskFilePtr + @abstract return the taskfile structure pointer. + */ + virtual ataTaskFile* getTaskFilePtr(void); + + /*!@function getPacketSize + @abstract return the size of atapi packet if any. + */ + virtual UInt16 getPacketSize(void); + + /*!@function getPacketData + @abstract return pointer to the array of packet data. + */ + virtual UInt16* getPacketData(void); + + /*!@function getTransferChunkSize + @abstract number of bytes between interrupts. + */ + virtual IOByteCount getTransferChunkSize(void); + + /*!@function setActualTransfer + @abstract set the byte count of bytes actually transferred. + */ + virtual void setActualTransfer ( IOByteCount bytesTransferred ); + + /*!@function getBuffer + @abstract get pointer to the memory descriptor for this transaction + */ + virtual IOMemoryDescriptor* getBuffer ( void); + + /*!@function getPosition + @abstract the position within the memory buffer for the transaction. + */ + virtual IOByteCount getPosition (void); + + /*!@function getByteCount + @abstract return the byte count for this transaction to transfer. + */ + virtual IOByteCount getByteCount (void); + + /*!@function setCommandInUse + @abstract mark the command as being in progress. + */ + virtual void setCommandInUse( bool inUse = true); + + + protected: + + // + /*!@function init + @abstract Zeroes all data, returns false if allocation fails. protected. + */ + virtual bool init(); + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + +private: + OSMetaClassDeclareReservedUnused(IOATABusCommand, 0); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 1); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 2); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 3); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 4); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 5); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 6); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 7); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 8); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 9); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 10); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 11); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 12); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 13); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 14); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 15); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 16); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 17); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 18); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 19); + OSMetaClassDeclareReservedUnused(IOATABusCommand, 20); +}; + +#include + +class IOATABusCommand64 : public IOATABusCommand +{ + + OSDeclareDefaultStructors( IOATABusCommand64 ); + + public: + + // new features + static IOATABusCommand64* allocateCmd32(void); + virtual IODMACommand* GetDMACommand( void ); + + + + // overrides for IODMACommand setup + virtual void zeroCommand(void); + virtual void setBuffer ( IOMemoryDescriptor* inDesc); + virtual void setCommandInUse( bool inUse = true); + virtual void executeCallback(void); + + + protected: + IODMACommand* _dmaCmd; + virtual bool init(); + virtual void free(); +}; + +#endif /*_IOATABUSCOMMAND_H*/ diff --git a/i386/include/IOKit/ata/IOATABusInfo.h b/i386/include/IOKit/ata/IOATABusInfo.h new file mode 100644 index 0000000..6faec4c --- /dev/null +++ b/i386/include/IOKit/ata/IOATABusInfo.h @@ -0,0 +1,219 @@ +/* + * Copyright (c) 2000-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOATABUSINFO_H +#define _IOATABUSINFO_H + +#include +#include +#include "IOATATypes.h" + +/*! +@class IOATABusInfo +@discussion used to indicate the capabilities of the bus the device is connected to, PIO and DMA modes supported, etc. +*/ + +class IOATABusInfo : public OSObject +{ + OSDeclareDefaultStructors( IOATABusInfo ); + + public: + + /*!@function atabusinfo + @abstract factory method + */ + static IOATABusInfo* atabusinfo(void); + + /*!@function zeroData + @abstract set this object to a blank state. + */ + virtual void zeroData(void); + + // Used by clients of ATAControllers to find out about the bus + // capability. + + /*!@function getSocketType + @abstract returns the socket type, internal fixed, media-bay, PC-Card + Used by clients of ATAControllers to find out about the bus + */ + ataSocketType getSocketType( void ); + + /*!@function getPIOModes + @abstract returns the bit-significant map of PIO mode(s) supported on the bus. + Used by clients of ATAControllers to find out about the bus. + */ + UInt8 getPIOModes( void ); + + /*!@function getDMAModes + @abstract bit-significant map of DMA mode(s) supported on the bus. + Used by clients of ATAControllers to find out about the bus. + */ + UInt8 getDMAModes( void ); + + /*!@function getUltraModes + @abstract bit-significant map of Ultra mode(s) supported on the bus. + Used by clients of ATAControllers to find out about the bus. + */ + UInt8 getUltraModes( void ); + + /*!@function getUnits + @abstract How many devices are present on bus. + Used by clients of ATAControllers to find out about the bus. + */ + UInt8 getUnits( void ); + + /*!@function supportsDMA + @abstract True = DMA supported on bus - inferred by looking at the DMA mode bits. + Used by clients of ATAControllers to find out about the bus. + */ + bool supportsDMA( void ); + + /*!@function supportsExtendedLBA + @abstract Supports 48-bit LBA if true. + Used by clients of ATAControllers to find out about the bus. + */ + bool supportsExtendedLBA( void ); + + /*!@function maxBlocksExtended + @abstract The maximum number of 512-byte blocks this controller supports + in a single Extended LBA transfer. Some controllers may be limited to less than + the maximum sector count allowed under extended LBA protocol. + */ + UInt16 maxBlocksExtended(void); + + /*!@function supportsOverlapped + @abstract Supports overlapped packet feature set if true. + Used by clients of ATAControllers to find out about the bus. + */ + bool supportsOverlapped( void ); + + /*!@function supportsDMAQueued + @abstract Supports DMA Queued Feature set if true. + Used by clients of ATAControllers to find out about the bus. + */ + bool supportsDMAQueued( void ); + + + // Used by ATAControllers to generate an information object. + // Would not be used by disk device drivers normally. + // Bus controllers should set these items everytime. + + /*!@function setSocketType + @abstract internal fixed, media-bay, PC-Card. Set by ATAControllers. + */ + void setSocketType( ataSocketType inSocketType ); + + /*!@function setPIOModes + @abstract Bit significant map of supported transfer modes. Set by ATAControllers. + */ + void setPIOModes( UInt8 inModeBitMap); + + /*!@function setDMAModes + @abstract Bit significant map of supported transfer modes. Set by ATAControllers. + */ + void setDMAModes( UInt8 inModeBitMap ); + + /*!@function setUltraModes + @abstract Bit significant map of supported transfer modes. Set by ATAControllers. + */ + void setUltraModes( UInt8 inModeBitMap ); + + /*!@function setUnits + @abstract set to indicate how many devices are on this bus. Set by ATAControllers. + */ + void setUnits( UInt8 inNumUnits ); + + // Optional bus protocols some busses may support + /*!@function setExtendedLBA + @abstract Set true for supports 48-bit LBA. Set by ATAControllers. + */ + void setExtendedLBA( bool inState ); + + /*!function setMaxBlocksExtended + @abstract value set by controllers to indicate the maximum number of blocks + allowed in a single transfer of data. Some dma engines may not be capable of supporting the full + 16-bit worth of sector count allowed under 48 bit extended LBA. Default is 256 blocks, same as + standard ATA. + */ + void setMaxBlocksExtended( UInt16 inMaxBlocks); + + /*!@function setOverlapped + @abstract Set true for supports overlapped packet feature set. Set by ATAControllers. + */ + void setOverlapped( bool inState); + + /*!@function setDMAQueued + @abstract Set true if supports DMA Queued Feature. Set by ATAControllers. + */ + void setDMAQueued( bool inState); // + + protected: + + UInt8 _PIOModes; /* PIO modes supported (bit-significant) */ + UInt8 _MultiDMAModes; /* <--: Multiword DMA modes supported (b-sig) */ + UInt8 _UltraDMAModes; /* <--: Ultra DMA modes supported (b-sig) */ + bool _ExtendedLBA; /* <--: Suppports 48-bit LBA protocol */ + bool _Overlapped; /* <--: Supports overlapped packet feature set */ + bool _DMAQueued; /* <--: Supports DMA Queued Feature set */ + ataSocketType _SocketType; /* <--: Indicates bus is fixed internal, removable media-bay, removable PC-Card or unknown type */ + UInt8 _numUnits; /* <--: How many devices on this bus */ + UInt16 _maxBlocksExtended; + + protected: +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + virtual bool init(); + +private: + OSMetaClassDeclareReservedUnused(IOATABusInfo, 0); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 1); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 2); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 3); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 4); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 5); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 6); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 7); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 8); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 9); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 10); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 11); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 12); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 13); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 14); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 15); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 16); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 17); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 18); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 19); + OSMetaClassDeclareReservedUnused(IOATABusInfo, 20); +}; + + +#endif /* !_IOATABUSINFO_H */ diff --git a/i386/include/IOKit/ata/IOATACommand.h b/i386/include/IOKit/ata/IOATACommand.h new file mode 100644 index 0000000..773f28a --- /dev/null +++ b/i386/include/IOKit/ata/IOATACommand.h @@ -0,0 +1,478 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * + * IOATACommand.h + * + */ + +#ifndef _IOATACOMMAND_H +#define _IOATACOMMAND_H + +#include +#include +#include +#include +#include "IOATATypes.h" + + +class IOExtendedLBA; +class IOATACommand; + + +/*! @typedef IOATACompletionFunction callback function for ATA disk devices. +*/ +typedef void (IOATACompletionFunction)(IOATACommand* command ); + + +/*! +@class IOATACommand + +@discussion +Command structure superclass, created and freed only by IOATADevice objects +populated by disk device drivers with command parameters +then submitted for operation to their IOATADevice provider for execution. + +IOATACommand is a virtual class, a concrete subclass contains the methods and fields needed +by IOATAControllers. Subclasses may be specific to particular controller hardware. +Disk device drivers will only have visibility to this interface and may not subclass this object. +Disk device drivers should instead make use of the void* refcon field which the controllers will not +touch +*/ + +class IOATACommand : public IOCommand { + + OSDeclareAbstractStructors( IOATACommand ); + + public: + + /*!@function zeroCommand + @abstract set to blank state, MUST call prior to re-use of this object + */ + virtual void zeroCommand(void); + + /*!@function setOpcode + @abstract command opcode as defined in IOATATypes. + */ + virtual void setOpcode( ataOpcode inCode); + + /*!@function setFlags + @abstract set the flags for this command, as defined in IOATATypes. + */ + virtual void setFlags( UInt32 inFlags); + + /*!@function setUnit + @abstract set the unit number for this command. + */ + virtual void setUnit( ataUnitID inUnit); + + /*!@function setTimeoutMS + @abstract how long to allow this command to complete, in milliseconds, once issued to + the hardware. if the time period expires, this command will return with a timeout error. + */ + virtual void setTimeoutMS( UInt32 inMs); + + /*!@function setCallbackPtr + @abstract set the function pointer to call when this command completes. + */ + virtual void setCallbackPtr (IOATACompletionFunction* inCompletion); + + /*!@function setRegMask + @abstract used when accessing registers or reading registers on an error result. Mask is defined + in IOATATypes.h + */ + virtual void setRegMask( ataRegMask mask); + + // memory information + // Since ATA hardware is limited in the amount of bytes + // that can be transfered in a command, the disk driver shall supply + // a seperate offset and byte count per transfer. + // the offset may be any amount. The byte count must be a multiple of the + // sector size of the device, ie, N * 512 bytes for ata hard drives. + /*!@function setBuffer + @abstract set the IIOMemoryDescriptor for this transaction. + */ + virtual void setBuffer ( IOMemoryDescriptor* inDesc); + + /*!@function setPosition + @abstract used to set an offset into the memory descriptor for this transfer. + */ + virtual void setPosition (IOByteCount fromPosition); + + /*!@function setByteCount + @abstract set the byte count for this transaction. Should agree with the device command and the + memory descriptor in use. + */ + virtual void setByteCount (IOByteCount numBytes); + + /*!@function setTransferChunkSize + @abstract set the size of transfer between intervening interrupts. necessary when doing PIO Read/Write Multiple, etc. so the controller knows when to expect an interrupt during multi-sector data transfers. + */ + virtual void setTransferChunkSize( IOByteCount chunk = kATADefaultSectorSize); + + /*!@function setFeatures + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual void setFeatures( UInt8 in); + + /*!@function getErrorReg + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual UInt8 getErrorReg (void ); + + /*!@function setSectorCount + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual void setSectorCount( UInt8 in); + + /*!@function getSectorCount + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual UInt8 getSectorCount (void ); + + /*!@function setSectorNumber + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual void setSectorNumber( UInt8 in); + + /*!@function getSectorNumber + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual UInt8 getSectorNumber (void ); + + /*!@function setCylLo + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual void setCylLo ( UInt8 in); + + /*!@function getCylLo + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual UInt8 getCylLo (void ); + + /*!@function setCylHi + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual void setCylHi( UInt8 in); + + /*!@function getCylHi + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual UInt8 getCylHi (void ); + + /*!@function setDevice_Head + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual void setDevice_Head( UInt8 in); + + /*!@function getDevice_Head + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual UInt8 getDevice_Head (void ); + + /*!@function setCommand + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual void setCommand ( UInt8 in); + + /*!@function getStatus + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual UInt8 getStatus (void ); + + /*!@function setLBA28 + @abstract convenience method that sets the taskfile registers into a 28-bit LBA address, with unit selected and LBA bit set. return err if param out of range, return kIOSuccess (kATANoErr) = 0 on return if successful + */ + virtual IOReturn setLBA28( UInt32 lba, ataUnitID inUnit); + + /*!@function setPacketCommand + @abstract ATAPI command packet max size is 16 bytes. Makes deep copy of data. + */ + virtual IOReturn setPacketCommand( UInt16 packetSizeBytes, UInt8* command); + + // the following registers are only accessed by register access + // commands. Not by normal command dispatch where they are handled + // by the controller. + + // not part of task file params. not written to device when sending commands. + virtual void setDataReg ( UInt16 in); + virtual UInt16 getDataReg (void ); + + // not part of taskfile. Not usually used except by controller. + virtual void setControl ( UInt8 in); + virtual UInt8 getAltStatus (void ); + + // return values + /*!@function getResult + @abstract IOReturn value of the result of this command. ATA family errors are defined in IOATATypes.h + */ + virtual IOReturn getResult (void); + + /*!@function getBuffer + @abstract the IOMemoryDescriptor used in this transaction. + */ + virtual IOMemoryDescriptor* getBuffer ( void ); + + /*!@function getActualTransfer + @abstract The byte count on the ending result, as best as can be determined by the controller. May be zero, but partial transfer may have occurred on error in some cases. + */ + virtual IOByteCount getActualTransfer ( void ); + + /*!@function getEndStatusReg + @abstract the value of the status register on the end of the command. + */ + virtual UInt8 getEndStatusReg (void); // always returned + + /*!@function getEndErrorReg + @abstract If the error bit was set in the status register, the value of the error register is returned at the end of a command. + */ + virtual UInt8 getEndErrorReg( void ); + + /*!@function getCommandInUse + @abstract returns true if IOATAController is still in control of the command. + */ + virtual bool getCommandInUse( void ); // returns true if IOATAController is using the command. + + // for use by disk drivers, clients of IOATADevice only. + // IOATADevice and IOATAControllers shall not use this field in any manner + /*!@var refCon + @abstract for use by disk drivers, clients of IOATADevice only. IOATADevice and IOATAControllers shall not use this field in any manner. + */ + void* refCon; + + /*!@var refCon2 + @abstract for use by disk drivers, clients of IOATADevice only. IOATADevice and IOATAControllers shall not use this field in any manner. + */ + void* refCon2; + + protected: + // < return from ATA controllers to disk drivers + // > sent to ATA controllers from disk drivers + ataOpcode _opCode; // > Command code for the controller. + UInt32 _flags; // > Flags for this command + ataRegisterImage _taskFile; // <> Taskfile + data and control registers. + ATAPICmdPacket _packet; // > ATAPI packet + ataUnitID _unit; // > Unit number + UInt32 _timeoutMS; // > timeout command in ms. + IOMemoryDescriptor* _desc; // > Buffer for data may be nil if command transfer no data + IOByteCount _position; // > Position within the descriptor for this command + IOByteCount _byteCount; // > How many bytes to transfer. + IOByteCount _logicalChunkSize; // > How many bytes between intervening interrupts (R/W Multiple) + ataRegMask _regMask; // > Which registers to write or read for reg access commands + IOATACompletionFunction* _callback; // > if nil, command is synchronous + + IOReturn _result; // < result + IOByteCount _actualByteCount; // < actual bytes transfered. + UInt8 _status; // < Status register at end of command + UInt8 _errReg; // < Error register at end of command if error bit set. + bool _inUse; // < true while IOATAController has possesion of the command + + + virtual bool init(); +protected: +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. + */ + struct ExpansionData {IOExtendedLBA* extLBA; }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *fExpansionData; + + // overrides + virtual void free(); + + +private: + OSMetaClassDeclareReservedUsed(IOATACommand, 0); // set end result + OSMetaClassDeclareReservedUsed(IOATACommand, 1); // get extendedLBAPtr + OSMetaClassDeclareReservedUnused(IOATACommand, 2); + OSMetaClassDeclareReservedUnused(IOATACommand, 3); + OSMetaClassDeclareReservedUnused(IOATACommand, 4); + OSMetaClassDeclareReservedUnused(IOATACommand, 5); + OSMetaClassDeclareReservedUnused(IOATACommand, 6); + OSMetaClassDeclareReservedUnused(IOATACommand, 7); + OSMetaClassDeclareReservedUnused(IOATACommand, 8); + OSMetaClassDeclareReservedUnused(IOATACommand, 9); + OSMetaClassDeclareReservedUnused(IOATACommand, 10); + OSMetaClassDeclareReservedUnused(IOATACommand, 11); + OSMetaClassDeclareReservedUnused(IOATACommand, 12); + OSMetaClassDeclareReservedUnused(IOATACommand, 13); + OSMetaClassDeclareReservedUnused(IOATACommand, 14); + OSMetaClassDeclareReservedUnused(IOATACommand, 15); + OSMetaClassDeclareReservedUnused(IOATACommand, 16); + OSMetaClassDeclareReservedUnused(IOATACommand, 17); + OSMetaClassDeclareReservedUnused(IOATACommand, 18); + OSMetaClassDeclareReservedUnused(IOATACommand, 19); + OSMetaClassDeclareReservedUnused(IOATACommand, 20); + +public: + virtual void setEndResult(UInt8 inStatus, UInt8 endError ); + virtual IOExtendedLBA* getExtendedLBA(void); + + +}; + + +/*! +@class IOExtendedLBA + +@discussion +If 48-bit LBAs are supported, IOExtendedLBA is used to represent a 48-bit LBA. +The driver examines the ATA identify data to determine if 48-bit addressing is +supported. +*/ + +class IOExtendedLBA : public OSObject +{ + OSDeclareDefaultStructors( IOExtendedLBA ); + + public: + static IOExtendedLBA* createIOExtendedLBA(IOATACommand* owner); + + // terminology as established in ATA/ATAPI-6. + // for the extended LBA address + + /*!@function setLBALow16 + @abstract convenience method that sets the lower 16 bits of a 48-bit LBA + */ + virtual void setLBALow16( UInt16 lbaLow); + + /*!@function getLBALow16 + @abstract convenience method that gets the lower 16 bits of a 48-bit LBA + */ + virtual UInt16 getLBALow16 (void); + + /*!@function setLBAMid16 + @abstract convenience method that sets the middle 16 bits of a 48-bit LBA + */ + virtual void setLBAMid16 (UInt16 lbaMid); + + /*!@function getLBAMid16 + @abstract convenience method that gets the middle 16 bits of a 48-bit LBA + */ + virtual UInt16 getLBAMid16( void ); + + /*!@function setLBAHigh16 + @abstract convenience method that sets the high 16 bits of a 48-bit LBA + */ + virtual void setLBAHigh16( UInt16 lbaHigh ); + + /*!@function getLBAHigh16 + @abstract convenience method that gets the high 16 bits of a 48-bit LBA + */ + virtual UInt16 getLBAHigh16( void ); + + /*!@function setSectorCount16 + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual void setSectorCount16( UInt16 sectorCount ); + + /*!@function getSectorCount16 + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual UInt16 getSectorCount16( void ); + + /*!@function setFeatures16 + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual void setFeatures16( UInt16 features ); + + /*!@function getFeatures16 + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual UInt16 getFeatures16( void ); + + /*!@function setDevice + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual void setDevice( UInt8 inDevice ); + + /*!@function getDevice + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual UInt8 getDevice( void ); + + /*!@function setCommand + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual void setCommand( UInt8 inCommand ); + + /*!@function getCommand + @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions + */ + virtual UInt8 getCommand( void ); + + /*!@function setExtendedLBA + @abstract convenience method that sets the taskfile registers into a 48-bit LBA address, along with sector count, and unit selected and LBA bit set + */ + virtual void setExtendedLBA( UInt32 inLBAHi, UInt32 inLBALo, ataUnitID inUnit, UInt16 extendedCount, UInt8 extendedCommand); + + /*!@function getExtendedLBA + @abstract convenience method that gets a 48-bit LBA + */ + virtual void getExtendedLBA( UInt32* outLBAHi, UInt32* outLBALo ); + + /*!@function zeroData + @abstract convenience method that zeros out the lba, sector count, features, device, and command member variables + */ + virtual void zeroData(void); + + /*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties in the future. + */ + struct ExpansionData { }; + + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + + protected: + + IOATACommand* owner; + UInt16 lbaLow; + UInt16 lbaMid; + UInt16 lbaHigh; + UInt16 sectorCount; + UInt16 features; + UInt16 device; + UInt16 command; + + private: + OSMetaClassDeclareReservedUnused(IOExtendedLBA, 0); + OSMetaClassDeclareReservedUnused(IOExtendedLBA, 1); + OSMetaClassDeclareReservedUnused(IOExtendedLBA, 2); + OSMetaClassDeclareReservedUnused(IOExtendedLBA, 3); + OSMetaClassDeclareReservedUnused(IOExtendedLBA, 4); + OSMetaClassDeclareReservedUnused(IOExtendedLBA, 5); + OSMetaClassDeclareReservedUnused(IOExtendedLBA, 6); + OSMetaClassDeclareReservedUnused(IOExtendedLBA, 7); + OSMetaClassDeclareReservedUnused(IOExtendedLBA, 8); + OSMetaClassDeclareReservedUnused(IOExtendedLBA, 9); + OSMetaClassDeclareReservedUnused(IOExtendedLBA, 10); + + +}; + +#endif diff --git a/i386/include/IOKit/ata/IOATAController.h b/i386/include/IOKit/ata/IOATAController.h new file mode 100644 index 0000000..3758941 --- /dev/null +++ b/i386/include/IOKit/ata/IOATAController.h @@ -0,0 +1,314 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOATACONTROLLER_H +#define _IOATACONTROLLER_H + +#include +#include +#include +#include +#include +#include "ATATimerEventSource.h" + +class IOATADevice; +class IOATABusCommand; +class IOATABusInfo; +class IOATADevConfig; + +/*! @class IOATAController + @abstract The base class for ata controller family. Provides the interface common to all ata bus controllers. + @discussion Subclasses of IOATAController implement drivers for specific bus hardware. Disk devices are clients of + IOATAController and communicate via the IOATABusNub instantiated for each device discovered by the specific IOATAController + subclass when it probes hardware. Via the nub, the ATA Controller provides standard information about bus capability, accepts + requests for transfer mode configuration (timing), accepts requests for IO and bus operations, notifies the device driver about + bus events which may affect the device, such as soft-resets or device removal (ie, media-bay and PC-card) and removal of queued + IO requests which have not been dispatched into the hardware. + + @discussion The header doc for this class is incomplete. The source however is heavily commented and should be consulted until + such time as complete header doc is available. +*/ + + + +class IOATAController : public IOService +{ + OSDeclareDefaultStructors(IOATAController); + +public: + + + /*--- Common ATA Controller Interface ---*/ + // find out bus capability + virtual IOReturn provideBusInfo( IOATABusInfo* infoOut); + + // set and get bus timing configuration for a specific unit + virtual IOReturn selectConfig( IOATADevConfig* configRequest, UInt32 unitNumber); + virtual IOReturn getConfig( IOATADevConfig* configRequest, UInt32 unitNumber); + + // The main call puts something on the work loop + virtual IOReturn executeCommand( IOATADevice* nub, IOATABusCommand* cmd); + + + + /*-- Power Management ---*/ + + // TBD + + + /*--- Overrides from IOService ---*/ + virtual bool init(OSDictionary * properties); + + virtual IOService* probe( IOService* provider, SInt32* score ); + virtual bool start( IOService* provider ); + + +protected: + + enum { + kBusFree = 'free', // bus is available + kBusBusy = 'busy', // bus is busy with request + kQueueOpen = '!lck', // queue is not locked + kQueueLocked = 'LOCK', // queue is frozen and not + kImmediateLocked = '!Imd', // immediate commands may not be processed + kImmediateOK = 'Immd' // immediate commands allowed. + }; + + /* Transaction State indicator definition - indicates what action is next*/ + enum transState { + kATAInitial = 0x00, // in queue + kATAStarted = 0x01, // issue taskfile + kATAPICmd = 0x02, // issue packet + kATADataTx = 0x03, // data transfer phase + kATAStatus = 0x04, // read status + kATAComplete = 0x05, // io complete + kATADone = 0x06 // completion callout called + }; + + struct ataDevInfo { + ataDeviceType type; // ata, atapi, unknown + atapiConfig packetSend; // slow DRQ, IRQ, or fast DRQ for packet + }; + + + struct ataDoubleBuffer + { + IOPhysicalAddress physicalBuffer; + IOLogicalAddress logicalBuffer; + IOByteCount bufferSize; + + }; + + + IOService* _provider; + IOWorkLoop* _workLoop; + IOCommandGate* _cmdGate; + ATATimerEventSource* _timer; + queue_head_t _commandQueue; + IOATABusCommand* _currentCommand; + UInt32 _busState; + UInt32 _queueState; + UInt32 _immediateGate; + ataUnitID _selectedUnit; + ataDevInfo _devInfo[2]; + IOATADevice* _nub[2]; + ataDoubleBuffer _doubleBuffer; + + IOATARegPtr8 _tfFeatureReg; + IOATARegPtr8 _tfSCountReg; + IOATARegPtr8 _tfSectorNReg; + IOATARegPtr8 _tfCylLoReg; + IOATARegPtr8 _tfCylHiReg; + IOATARegPtr8 _tfSDHReg; + IOATARegPtr8 _tfStatusCmdReg; + IOATARegPtr16 _tfDataReg; + IOATARegPtr8 _tfAltSDevCReg; + + + // false if couldn't allocate the per-bus double buffer. + // controllers should provide implementation where needed + // for DMA hardware compatibility. The default method provides + // a 4K buffer for PIO since MemoryDescriptors do not by default have + // logical addresses in the kernel space. + virtual bool allocateDoubleBuffer( void ); + + // perform 2-byte endian swap. Only useful on PIO transfers and identify data + virtual void swapBytes16( UInt8* dataBuffer, IOByteCount length); + +/*! @function handleCommand + @abstract Called by executeCommand() to handle the client command + from the workloop context. + @param command The command code. + @param param1 Command parameter. + @param param2 Command parameter. + @param param3 Command parameter. + @result kIOReturnSuccess on success, or an error code otherwise. */ + + virtual IOReturn handleCommand( void * command, + void * param1 = 0, + void * param2 = 0, + void * param3 = 0); + + +/*! @function busCanDispatch + @abstract answers whether the bus is in state such that the next command + can be dispatched. + @result true - bus is free to issue commands. false - bus cannot issue + commands at this time. */ + virtual bool busCanDispatch( void ); + + +/*! @function dispatchNext + @abstract Causes the command at the front of the queue to dequeue, made the + current command and begin execution. + @result noErr indicates successful dispatch. */ + virtual IOReturn dispatchNext( void ); + + // sets the result code, free's the bus state, dispatch next command and execute completion + virtual void completeIO( IOReturn commandResult ); + + // Command queue handlers. + virtual IOReturn enqueueCommand( IOATABusCommand* command); + virtual IOATABusCommand* dequeueFirstCommand( void ); + + // event notifier for clients + virtual void executeEventCallouts( ataEventCode event, ataUnitID unit); + + // default handler for device interrupts. + virtual IOReturn handleDeviceInterrupt( void ); + + + // timer functions + // starts the timeout on the current command + virtual IOReturn startTimer( UInt32 inMS); + //disable and clear a running timer. + virtual void stopTimer( void ); + // called when a timeout occurs. + virtual void handleTimeout( void ); + // true if the timer has expired + virtual bool checkTimeout( void ); + + // handle IO opcodes + virtual IOReturn handleExecIO( void ); + virtual IOReturn handleRegAccess( void ); + virtual IOReturn handleBusReset(void); + virtual IOReturn handleQueueFlush( void ); + + // various protocol phases + virtual IOReturn asyncData(void); + virtual IOReturn asyncStatus(void); + virtual IOReturn asyncIO(void); + virtual IOReturn asyncCommand(void); + virtual IOReturn synchronousIO(void); + + // hardware access + virtual IOReturn selectDevice( ataUnitID unit ); + virtual IOReturn issueCommand( void ); + virtual IOReturn writePacket( void ); + virtual IOReturn softResetBus( bool doATAPI = false ); + + virtual IOReturn startDMA( void ); + virtual IOReturn stopDMA( void ); + + virtual bool ATAPISlaveExists( void ); + virtual UInt32 scanForDrives( void ); + + virtual bool waitForU8Status (UInt8 mask, UInt8 value); + + virtual IOByteCount readATAPIByteCount( void ); + virtual void handleOverrun( IOByteCount length); + virtual IOReturn registerAccess(bool isWrite); + + // PIO data transfers + virtual IOReturn txDataIn (IOLogicalAddress buf, IOByteCount length); + virtual IOReturn txDataOut (IOLogicalAddress buf, IOByteCount length); + + virtual IOATAController::transState determineATAPIState(void); + + // device should set the controller to the config for this device + virtual void selectIOTiming( ataUnitID unit ); + + // subclasses MUST implement this function in order to initialize + // the pointers to the ATA task file registers during start() time. + virtual bool configureTFPointers(void); + + // convert a bit-significant indicator to a numeric value. + virtual UInt16 bitSigToNumeric( UInt16 binary); + + // for 48 bit register reading and writing + UInt16 readExtRegister( IOATARegPtr8 inRegister ); + void writeExtRegister( IOATARegPtr8 inRegister, UInt16 inValue ); + + // overrides + virtual void free(); + +private: + + // used called by the commandgate in executeCommand. + static void executeCommandAction(OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3); + + // callout used by the timer to indicate the timeout failure. + static void timeoutOccured( OSObject *owner, + IOTimerEventSource *sender); + +protected: +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOATAController in the future. + */ + typedef struct ExpansionData + { + IOBufferMemoryDescriptor* _doubleBufferDesc; + } ExpansionData; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + +private: + OSMetaClassDeclareReservedUnused(IOATAController, 0); + OSMetaClassDeclareReservedUnused(IOATAController, 1); + OSMetaClassDeclareReservedUnused(IOATAController, 2); + OSMetaClassDeclareReservedUnused(IOATAController, 3); + OSMetaClassDeclareReservedUnused(IOATAController, 4); + OSMetaClassDeclareReservedUnused(IOATAController, 5); + OSMetaClassDeclareReservedUnused(IOATAController, 6); + OSMetaClassDeclareReservedUnused(IOATAController, 7); + OSMetaClassDeclareReservedUnused(IOATAController, 8); + OSMetaClassDeclareReservedUnused(IOATAController, 9); + OSMetaClassDeclareReservedUnused(IOATAController, 10); + OSMetaClassDeclareReservedUnused(IOATAController, 11); + OSMetaClassDeclareReservedUnused(IOATAController, 12); + OSMetaClassDeclareReservedUnused(IOATAController, 13); + OSMetaClassDeclareReservedUnused(IOATAController, 14); + OSMetaClassDeclareReservedUnused(IOATAController, 15); + OSMetaClassDeclareReservedUnused(IOATAController, 16); + OSMetaClassDeclareReservedUnused(IOATAController, 17); + OSMetaClassDeclareReservedUnused(IOATAController, 18); + OSMetaClassDeclareReservedUnused(IOATAController, 19); + OSMetaClassDeclareReservedUnused(IOATAController, 20); +}; +#endif /* !_IOATACONTROLLER_H */ diff --git a/i386/include/IOKit/ata/IOATADevConfig.h b/i386/include/IOKit/ata/IOATADevConfig.h new file mode 100644 index 0000000..e5714c3 --- /dev/null +++ b/i386/include/IOKit/ata/IOATADevConfig.h @@ -0,0 +1,239 @@ +/* + * Copyright (c) 2000-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOATADEVCONFIG_H +#define _IOATADEVCONFIG_H + +#include +#include +#include "IOATATypes.h" +#include "IOATABusInfo.h" + + +/*! + @class IOATADevConfig + @abstract used for configuring and communicating the desired transfer modes of a device. + A disk driver would typically use this object in conjunction with the 512-bytes of identification + data from the drive and the IOATABusInfo object for the bus it is connected to. + This object will determine the best matching transfer speeds available. + the device driver will then send a series of Set Features commands to configure the drive + and this object to the bus through the IOATADevice nub in order to configure the optimum transfer mode. + The driver for the disk drive may choose to populate this object with whatever transfer mode + desired, in the event that a different mode is required. + @discussion usually use the initWithBestSelection to make a best mode match. + The Mode accessors use bit significance to indicate a selected mode or supported modes(s) + ie, 00000001b indicates Mode-0, 00000010b indicates mode 1, etc. + Selected mode is indicated by a single set bit. No bit set indicates no mode in that class is selected. + ie, a bus will support multiple possible modes, but will only have one mode selected at that time. + +*/ + +class IOATADevConfig : public OSObject { + + OSDeclareDefaultStructors( IOATADevConfig ); + + public: + + /*!@function atadevconfig + @abstract static creator function. + */ + static IOATADevConfig* atadevconfig(void); + + /*!@function initWithBestSelection + @abstract Handy initializer: pass the 512-byte result of the Identify Device or + Identify Packet Device in endian-order for your platform (byte-swapped on PPC) + and the IOATABusInfo object for the bus. The object will initialize all fields + and select the best transfer modes that match on bus and device. + If the return value was 0 (success or noErr), then a matching mode is supported. + Examine the PIO and UDMA/DMA fields and to generate the apropriate SET FEATURES + parameters for your drive and send this initialised object to the IOATAController + when requesting a speed configuration. + failure means no supported transfer modes matched between bus and device info. + + @param identifyData 512 bytes of data obtained from the device via IDENTIFY DEVICE or IDENTIFY PACKET DEVICE command. + @param busInfo pointer to an IOATAbusInfo object obtained from a previous atanub->provideBusInfo() call. + @result kIOSuccess (0) when a matching transfer mode is available between the device and controller. + */ + IOReturn initWithBestSelection( const UInt16* identifyData, IOATABusInfo* busInfo); + + // intitialize with the 512 byte data from an ATA device identify command + IOReturn assignFromData( const UInt16* identifyData ); + + /*!@function setPacketConfig + @param packetConfig + @abstract For ATAPI devices, if the device asserts interrupt after the Packet Command when it is ready to accept the packet, set this value to true (mostly older devices). If the device accepts the packet only by asserting DRQ bit in status, then set this value false. Tells the bus controller whether to wait for packet acceptance or set pending interrupt. + */ + void setPacketConfig ( atapiConfig packetConfig); + + /*!@function getPacketConfig + @result atapiConfig as defined in IOATATypes.h + */ + atapiConfig getPacketConfig( void ); + + // The following Mode accessors use bit significance to indicate a selected mode or supported modes(s) + // ie, 00000001b indicates Mode-0, 00000010b indicates mode 1, etc. + // Selected mode is indicated by a single set bit. No bit set indicates no mode in that class is selected. + // ie, a bus will support multiple possible modes, but will only have one mode selected at that time. + + /*!@function setPIOMode + @param inModeBitMap bit-significant map of PIO mode + */ + void setPIOMode( UInt8 inModeBitMap); // bit-significant map of PIO mode(s) + + /*!@function getPIOMode + @result bit-significant map of PIO mode + */ + UInt8 getPIOMode( void ); + + /*!@function setDMAMode + @param inModeBitMap bit-significant map of DMA mode + */ + void setDMAMode( UInt8 inModeBitMap ); // bit-significant map of DMA mode(s) + + /*!@function getDMAMode + @result bit-significant map of DMA mode + */ + UInt8 getDMAMode( void ); + + /*!@function setUltraMode + @param inModeBitMap bit-significant map of Ultra mode + */ + void setUltraMode( UInt8 inModeBitMap ); // bit-significant map of Ultra mode(s) + + /*!@function getUltraMode + @result bit-significant map of Ultra mode + */ + UInt8 getUltraMode( void ); + + // The following cycle time accessors report cycle times in nanoseconds. + // A device requesting a mode should also request a cycle time as reported in the device's identification page. + // A bus controller will configure the bus not to exceed (go faster than) the minimum time requested. + // When a bus controller reports a mode configuration, the cycle time indicates the busses contract not to go + // faster than. However an actual cycle time may be slower than the indicated time. + /*!@function setPIOCycleTime + @param inNS PIO cycle time in nanoseconds. + */ + void setPIOCycleTime( UInt16 inNS ); + + /*!@function getPIOCycleTime + @result reported PIO CycleTime in nanoseconds. + */ + UInt16 getPIOCycleTime( void ); + + /*!@function setDMACycleTime + @param inNS reported multiword DMA Cycle time in nanoseconds. + */ + void setDMACycleTime( UInt16 inNS ); + + /*!@function getDMACycleTime + @result Reported multiword DMA cycle time in nanoseconds. + */ + UInt16 getDMACycleTime( void ); + + // Ultra ATA defines cycle times a device must meet to comply with standards. + // No cycle time field is needed. + + // convert bit-significant to numeric value + /*!@function bitSigToNumeric + @abstract converts a bit-significant field to a numerical value. Note that a bit field of 0x00 has no defined result. + @param binary the bit significant field. + @result the numerical value of the highest bit set in the field. + */ + virtual UInt8 bitSigToNumeric( UInt16 binary); + + + protected: + + atapiConfig _atapiIRQForPacket; // enum for bits 5 and 6 of word zero of + // the identify packet device info data for PACKET devices ONLY. + // shift word-0 5-bits left, mask 0x03 and these enums apply. + // values are: + + // kATAPIDRQSlow = 0x00 - wait up to 3MS for packet on DRQ + // kATAPIIRQPacket = 0x01, - device asserts IRQ for packet + // kATAPIDRQFast = 0x10, - packet on DRQ within 50us + // kATAPIUnknown = 0x11 - reserved as of ATA/ATAPI-5 + + + + + UInt8 _ataPIOMode; /* <->: PIO Mode Timing class bit-significant */ + UInt16 _ataPIOCycleTime; /* <->: Cycle time in ns for PIO mode */ + UInt8 _ataMultiDMAMode; /* <->: Multiple Word DMA Timing Class bit-significant*/ + UInt16 _ataMultiCycleTime; /* <->: Cycle time in ns for Multiword DMA mode */ + UInt8 _ataUltraDMAMode; /* <->: Ultra DMA timing class bit-significant */ + + IOReturn _AssignPIOData( const UInt16* identifyData); + IOReturn _AssignDMAData(const UInt16* identifyData); + IOReturn _AssignUltraData(const UInt16* identifyData); + UInt8 _MostSignificantBit( UInt8 inByte); + + + virtual bool init(); +protected: +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + +private: + OSMetaClassDeclareReservedUnused(IOATADevConfig, 0); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 1); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 2); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 3); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 4); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 5); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 6); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 7); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 8); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 9); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 10); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 11); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 12); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 13); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 14); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 15); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 16); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 17); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 18); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 19); + OSMetaClassDeclareReservedUnused(IOATADevConfig, 20); + +public: + +//some static utility functions to parse the identify data for feature support + + static bool sDriveSupports48BitLBA( const UInt16* identifyData ); + static UInt32 sDriveExtendedLBASize( UInt32* lbaHi, UInt32* lbaLo, const UInt16* identifyData); // result returned is same as lbaLo. + +}; + + +// header doc info goes here. I find putting it within the delcarations more confusing than putting it all in the bottom of the header. + + +#endif /* !_IOATADEVCONFIG_H */ diff --git a/i386/include/IOKit/ata/IOATADevice.h b/i386/include/IOKit/ata/IOATADevice.h new file mode 100644 index 0000000..78be513 --- /dev/null +++ b/i386/include/IOKit/ata/IOATADevice.h @@ -0,0 +1,179 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * IOATADevice.h + * + * This object implements a relay to an ATA Bus where a drive is attached. + */ + + +#ifndef _IOATADEVICE_H +#define _IOATADEVICE_H + +#include +#include +#include "IOATATypes.h" +#include "IOATACommand.h" +#include "IOATABusInfo.h" +#include "IOATADevConfig.h" + +class IOATAController; + + +/*! + @class IOATADevice + @abstract This object implements a relay to an ATA Bus where a drive is attached. + @discussion IOATADevice is the superclass which represents a particular device attached to a particular IOATAController (bus). IOATADevice is the provider for ATA mass-storage device drivers.IOATADevice is the factory for all IOATACommand objects and is responsible for creating and freeing IOATACommands. IOATAControllers will create an instance of IOATADevice for each device physically connected to the ata bus. IOATADevice is virtual and specific subclass should be implemented for particular types of IOATAController. In this manner, controller-specifc IOATACommands may be paired with the proper type of controller. +*/ + +class IOATADevice : public IOService +{ + OSDeclareDefaultStructors(IOATADevice); + +public: + + // + /*!@function getUnitID + @abstract Determine whether this device is number 0 or 1 (ie, master/slave) + @result ataUnitID - 0 or 1. + */ + virtual ataUnitID getUnitID( void ); + + // + /*!@function getDeviceType + @abstract Find out what kind of device this nub is (ata or atapi) + @result ataDeviceType as defined in IOATATypes.h + */ + virtual ataDeviceType getDeviceType( void ); + + // + /*!@function provideBusInfo + @abstract Find out the bus capability so the client can choose the features to set and commands to run. + @param getInfo a pointer to a valid IOATABusInfo object. + @result kIOSuccess (0) and the getInfo object will be filled out by the bus controller with information about the bus. + */ + virtual IOReturn provideBusInfo( IOATABusInfo* getInfo); + + // + /*!@function selectConfig + @abstract Tell the bus what speed to use for your device. + @param configRequest pointer to a valid and initialized IOATADevConfig object. + @result kIOSuccess (0) if the configuration was succesfully selected. + @discussion This should only be called once during a disk drivers start method before registering its availability, and must be called prior to issuing any data IO transactions. + */ + virtual IOReturn selectConfig( IOATADevConfig* configRequest); + + // + /*!@function provideConfig + @abstract Find out what speed the bus has configured for this unit. + @param configRequest pointer to a valid IOATADevConfig object. + @result kIOSuccess (0) on successful completion and configRequest will contain the configuration information. + */ + virtual IOReturn provideConfig( IOATADevConfig* configRequest); + + // Submit IO requests + /*! + @function executeCommand + @abstract Submit IO requests + @param command pointer to a valid IOATACommand with the command to be executed. + @result kIOSuccess (0) if the command was successfully queued in the controller. + */ + virtual IOReturn executeCommand(IOATACommand* command); + + // create and destroy IOATACommands + /*! + @function allocCommand + @abstract create IOATACommands. Device drivers should allocate command objects only through this method. + @result null if allocation failed. Retain count is one. + */ + virtual IOATACommand* allocCommand( void ); + + /*! + @function freeCommand + @abstract release a command object that is no longer needed. Do not free an object in use and do not release the object anymore times than you have retained it. + @param inCommand the command to be released. + */ + virtual void freeCommand( IOATACommand* inCommand); + + // matching stuff for IOBSDInit and so on. + /*!@function matchPropertyTable + @abstract matching stuff for IOBSDInit and so on. + */ + virtual bool matchPropertyTable(OSDictionary * table); + + /*!@function matchLocation + @abstract matching stuff for IOBSDInit and so on. + */ + virtual IOService* matchLocation(IOService * client); + + /*!@function matchPropertyTable + @abstract matching stuff for IOBSDInit and so on. + */ + virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); + + // called by controllers when they need to send a message to client drivers. + /*! + @function notifyEvent + @abstract called by controllers when they need to send a message to client (disk) drivers. + */ + virtual void notifyEvent( UInt32 event ); + + +protected: + IOATAController* _provider; + ataUnitID _unitNumber; // 0 - master, 1 - slave, -1 = not Valid + ataDeviceType _deviceType; // ata, atapi, unknown +protected: +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + +private: + OSMetaClassDeclareReservedUnused(IOATADevice, 0); + OSMetaClassDeclareReservedUnused(IOATADevice, 1); + OSMetaClassDeclareReservedUnused(IOATADevice, 2); + OSMetaClassDeclareReservedUnused(IOATADevice, 3); + OSMetaClassDeclareReservedUnused(IOATADevice, 4); + OSMetaClassDeclareReservedUnused(IOATADevice, 5); + OSMetaClassDeclareReservedUnused(IOATADevice, 6); + OSMetaClassDeclareReservedUnused(IOATADevice, 7); + OSMetaClassDeclareReservedUnused(IOATADevice, 8); + OSMetaClassDeclareReservedUnused(IOATADevice, 9); + OSMetaClassDeclareReservedUnused(IOATADevice, 10); + OSMetaClassDeclareReservedUnused(IOATADevice, 11); + OSMetaClassDeclareReservedUnused(IOATADevice, 12); + OSMetaClassDeclareReservedUnused(IOATADevice, 13); + OSMetaClassDeclareReservedUnused(IOATADevice, 14); + OSMetaClassDeclareReservedUnused(IOATADevice, 15); + OSMetaClassDeclareReservedUnused(IOATADevice, 16); + OSMetaClassDeclareReservedUnused(IOATADevice, 17); + OSMetaClassDeclareReservedUnused(IOATADevice, 18); + OSMetaClassDeclareReservedUnused(IOATADevice, 19); + OSMetaClassDeclareReservedUnused(IOATADevice, 20); +}; + +#endif /* !_IOATABUSNUB_H */ diff --git a/i386/include/IOKit/ata/IOATARegI386.h b/i386/include/IOKit/ata/IOATARegI386.h new file mode 100644 index 0000000..73016ba --- /dev/null +++ b/i386/include/IOKit/ata/IOATARegI386.h @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2000-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOATAREGI386_H +#define _IOATAREGI386_H + +#include + +/* + * IOATAReg: ATA register abstract base class. + */ +#define DefineIOATAReg(w) \ +class IOATAReg##w : public OSObject \ +{ \ + OSDeclareAbstractStructors( IOATAReg##w ) \ + \ +public: \ + virtual void operator = (UInt##w rhs) = 0; \ + virtual operator UInt##w() const = 0; \ +} + +DefineIOATAReg( 8 ); +DefineIOATAReg( 16 ); +DefineIOATAReg( 32 ); + +typedef IOATAReg8 * IOATARegPtr8; +typedef IOATAReg16 * IOATARegPtr16; +typedef IOATAReg32 * IOATARegPtr32; + +#define IOATARegPtr8Cast(x) (x) + +/* + * IOATAIOReg: I/O mapped ATA registers. + */ +#define DefineIOATAIOReg(w) \ +class IOATAIOReg##w : public IOATAReg##w \ +{ \ + OSDeclareDefaultStructors( IOATAIOReg##w ) \ + \ +protected: \ + UInt16 _address; \ + \ +public: \ + static IOATAIOReg##w * withAddress( UInt16 address ); \ + \ + virtual bool initWithAddress( UInt16 address ); \ + virtual UInt16 getAddress() const; \ + \ + virtual void operator = (UInt##w rhs); \ + virtual operator UInt##w() const; \ +} + +DefineIOATAIOReg( 8 ); +DefineIOATAIOReg( 16 ); +DefineIOATAIOReg( 32 ); + +#endif /* !_IOATAREGI386_H */ diff --git a/i386/include/IOKit/ata/IOATATypes.h b/i386/include/IOKit/ata/IOATATypes.h new file mode 100644 index 0000000..a3be9dc --- /dev/null +++ b/i386/include/IOKit/ata/IOATATypes.h @@ -0,0 +1,393 @@ +/* + * Copyright (c) 2000-2008 Apple, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOATATYPES_H +#define _IOATATYPES_H + +#include + + +/*! + +@header IOATAtypes.h +@discussion contains various definitions and constants for use in the IOATAFamily and clients. Header Doc is incomplete at this point, but file is heavily commented. + +*/ +// property strings +#define kATADevPropertyKey "ata device type" +#define kATATypeATAString "ata" +#define kATATypeATAPIString "atapi" +#define kATATypeUnknownString "unknown" + +#define kATAVendorPropertyKey "device model" +#define kATARevisionPropertyKey "device revision" +#define kATASerialNumPropertyKey "device serial" + +#define kATAUnitNumberKey "unit number" + +#define kATASocketKey "socket type" +#define kATAInternalSocketString "internal" +#define kATAMediaBaySocketString "media-bay" +#define kATAPCCardSocketString "pccard" +#define kATAInternalSATAString "serial-ata" +#define kATASATABayString "sata-bay" +#define kATAInternalSATA2 "serial-ata-2" +#define kATASATA2BayString "sata-2-bay" +#define kATAUnkownSocketString "unknown" + +#define kATANotifyOnChangeKey "media-notify" + +// allows for porting to non-memory-mapped IO systems, such as x86. +// for such a platform, create a class and overload the assignment operators +// so that the correct IO operation is performed and define the type for that architecture port. +#ifdef __ppc__ +#define IOATARegPtr8 volatile UInt8* +#define IOATARegPtr16 volatile UInt16* +#define IOATARegPtr32 volatile UInt32* +#define IOATARegPtr8Cast(x) ((IOATARegPtr8)(x)) +#elif defined( __i386__ ) || defined( __x86_64__ ) +#include +#else +#error Unknown machine architecture +#endif + +enum ataSocketType{ + + kUnknownSocket = 0, + kInternalATASocket, + kMediaBaySocket , + kPCCardSocket, + kInternalSATA, + kSATABay, + kInternalSATA2, + kSATA2Bay + +} ; + + +enum ataDeviceType { + + kUnknownATADeviceType = 0, + kATADeviceType, + kATAPIDeviceType + +} ; + +// enum for bits 5 and 6 of word zero of +// the identify packet device info data. +// shift word-0 5-bits left, mask 0x03 and these enums apply. +enum atapiConfig { + + kATAPIDRQSlow = 0x00, + kATAPIIRQPacket = 0x01, + kATAPIDRQFast = 0x10, + kATAPIUnknown = 0x11 + +}; + + +enum ataUnitID { + + kATAInvalidDeviceID = -1, + kATADevice0DeviceID = 0, /* aka, Master. Device 0 is the correct terminology */ + kATADevice1DeviceID = 1 /* aka, Slave. Device 1 is the correct terminology */ + +} ; + +enum { + + kATADefaultSectorSize = 512 +}; + +/* Task file definition *** Error Register *** */ +enum { + bATABadBlock = 7, /* bit number of bad block error bit*/ + bATAUncorrectable = 6, /* bit number of uncorrectable error bit*/ + bATAMediaChanged = 5, /* bit number of media changed indicator*/ + bATAIDNotFound = 4, /* bit number of ID not found error bit*/ + bATAMediaChangeReq = 3, /* bit number of media changed request*/ + bATACommandAborted = 2, /* bit number of command abort bit*/ + bATATrack0NotFound = 1, /* bit number of track not found*/ + bATAAddressNotFound = 0, /* bit number of address mark not found*/ + mATABadBlock = 1 << bATABadBlock, /* Bad Block Detected*/ + mATAUncorrectable = 1 << bATAUncorrectable, /* Uncorrectable Data Error*/ + mATAMediaChanged = 1 << bATAMediaChanged, /* Media Changed Indicator (for removable)*/ + mATAIDNotFound = 1 << bATAIDNotFound, /* ID Not Found*/ + mATAMediaChangeReq = 1 << bATAMediaChangeReq, /* Media Change Requested (NOT IMPLEMENTED)*/ + mATACommandAborted = 1 << bATACommandAborted, /* Aborted Command*/ + mATATrack0NotFound = 1 << bATATrack0NotFound, /* Track 0 Not Found*/ + mATAAddressNotFound = 1 << bATAAddressNotFound /* Address Mark Not Found*/ +}; + +/* Task file definition *** Features register *** */ +enum { + bATAPIuseDMA = 0, /* bit number of useDMA bit (ATAPI)*/ + mATAPIuseDMA = 1 << bATAPIuseDMA +}; + +/* Task file definition *** ataTFSDH Register *** */ +enum { + mATAHeadNumber = 0x0F, /* Head Number (bits 0-3) */ + mATASectorSize = 0xA0, /* bit 7=1; bit 5 = 01 (512 sector size) */ + mATADriveSelect = 0x10, /* Drive (0 = master, 1 = slave) */ + mATALBASelect = 0x40 /* LBA mode bit (0 = chs, 1 = LBA)*/ +}; + +/* Task file definition *** Status Register *** */ +enum { + bATABusy = 7, /* bit number of BSY bit*/ + bATADriveReady = 6, /* bit number of drive ready bit*/ + bATAWriteFault = 5, /* bit number of write fault bit*/ + bATASeekComplete = 4, /* bit number of seek complete bit*/ + bATADataRequest = 3, /* bit number of data request bit*/ + bATADataCorrected = 2, /* bit number of data corrected bit*/ + bATAIndex = 1, /* bit number of index mark*/ + bATAError = 0, /* bit number of error bit*/ + mATABusy = 1 << bATABusy, /* Unit is busy*/ + mATADriveReady = 1 << bATADriveReady, /* Unit is ready*/ + mATAWriteFault = 1 << bATAWriteFault, /* Unit has a write fault condition*/ + mATASeekComplete = 1 << bATASeekComplete, /* Unit seek complete*/ + mATADataRequest = 1 << bATADataRequest, /* Unit data request*/ + mATADataCorrected = 1 << bATADataCorrected, /* Data corrected*/ + mATAIndex = 1 << bATAIndex, /* Index mark - NOT USED*/ + mATAError = 1 << bATAError /* Error condition - see error register*/ +}; + +/* Task file definition *** Device Control Register *** */ +enum { + bATADCROne = 3, /* bit number of always one bit*/ + bATADCRReset = 2, /* bit number of reset bit*/ + bATADCRnIntEnable = 1, /* bit number of interrupt disable*/ + mATADCROne = 1 << bATADCROne, /* always one bit*/ + mATADCRReset = 1 << bATADCRReset, /* Reset (1 = reset)*/ + mATADCRnIntEnable = 1 << bATADCRnIntEnable /* Interrupt Disable(0 = enabled)*/ +}; + + +/* 'ataRegMask' field of the ataRegAccess definition*/ +enum ataRegMask{ + + bATAAltSDevCValid = 14, /* bit number of alternate status/device cntrl valid bit*/ + bATAStatusCmdValid = 7, /* bit number of status/command valid bit*/ + bATASDHValid = 6, /* bit number of ataTFSDH valid bit*/ + bATACylinderHiValid = 5, /* bit number of cylinder high valid bit*/ + bATACylinderLoValid = 4, /* bit number of cylinder low valid bit*/ + bATASectorNumValid = 3, /* bit number of sector number valid bit*/ + bATASectorCntValid = 2, /* bit number of sector count valid bit*/ + bATAErrFeaturesValid = 1, /* bit number of error/features valid bit*/ + bATADataValid = 0, /* bit number of data valid bit*/ + mATAAltSDevCValid = 1 << bATAAltSDevCValid, /* alternate status/device control valid*/ + mATAStatusCmdValid = 1 << bATAStatusCmdValid, /* status/command valid*/ + mATASDHValid = 1 << bATASDHValid, /* ataTFSDH valid*/ + mATACylinderHiValid = 1 << bATACylinderHiValid, /* cylinder high valid*/ + mATACylinderLoValid = 1 << bATACylinderLoValid, /* cylinder low valid*/ + mATASectorNumValid = 1 << bATASectorNumValid, /* sector number valid*/ + mATASectorCntValid = 1 << bATASectorCntValid, /* sector count valid*/ + mATAErrFeaturesValid = 1 << bATAErrFeaturesValid, /* error/features valid*/ + mATADataValid = 1 << bATADataValid /* data valid*/ + +} ; + + +enum ataFlags{ + bATAFlagQuiesce = 20, + bATAFlagNoIRQ = 19, /* bit Number of no IRQ protocol flag*/ + bATAFlag48BitLBA = 18, + bATAFlagDMAQueued = 17, + bATAFlagOverlapped = 16, + bATAFlagUseConfigSpeed = 15, /* bit number of use configured speed flag*/ + bATAFlagByteSwap = 14, /* bit number of byte swap flag*/ + bATAFlagIORead = 13, /* bit number of I/O read flag*/ + bATAFlagIOWrite = 12, /* bit number of I/O write flag*/ + bATAFlagTFAccessResult = 8, /* bit number of get register results on command completion.*/ + bATAFlagUseDMA = 7, /* bit number of use DMA flag*/ + bATAFlagProtocolATAPI = 5, /* bit number of ATAPI protocol*/ + bATAFlagImmediate = 1, /* bit number of immediate flag */ + bATAFlagTFAccess = 0, /* bit number of TF access */ + + mATAFlagQuiesce = 1 << bATAFlagQuiesce, + mATAFlagUseNoIRQ = 1 << bATAFlagNoIRQ, /* Special purpose! Avoid using! No-IRQ, polled synchronous protocol valid only for PIO commands*/ + mATAFlag48BitLBA = 1 << bATAFlag48BitLBA, /* Use 48 bit extended LBA protocol on this command. Requires support from the controller.*/ + mATAFlagDMAQueued = 1 << bATAFlagDMAQueued, /* Use tagged dma queuing protocol on this command. Requires support from the controller.*/ + mATAFlagOverlapped = 1 << bATAFlagOverlapped, /* Use overllaped protocol on this command. Requires support from the controller.*/ + mATAFlagUseConfigSpeed = 1 << bATAFlagUseConfigSpeed, /* Use the configured interface speed = true. False = use default PIO (slow) speed. valid only for PIO commands*/ + mATAFlagByteSwap = 1 << bATAFlagByteSwap, /* Swap data bytes (read - after; write - before)*/ + mATAFlagIORead = 1 << bATAFlagIORead, /* Read (in) operation*/ + mATAFlagIOWrite = 1 << bATAFlagIOWrite, /* Write (out) operation*/ + mATAFlagTFAccessResult = 1 << bATAFlagTFAccessResult, /* get contents of TaskFile registers indicated in TFMask on command completion, even if no error*/ + mATAFlagUseDMA = 1 << bATAFlagUseDMA, + mATAFlagProtocolATAPI = 1 << bATAFlagProtocolATAPI, /* ATAPI protocol indicator*/ + mATAFlagImmediate = 1 << bATAFlagImmediate, /* Put command at head of queue */ + mATAFlagTFAccess = 1 << bATAFlagTFAccess, /* Return Taskfile on error status*/ + +} ; + +/* The Function codes sent to controllers*/ +enum ataOpcode { + + kATANoOp = 0, + kATAFnExecIO , /* Execute ATA I/O */ + kATAPIFnExecIO, /* ATAPI I/O */ + kATAFnRegAccess , /* Register Access */ + + kATAFnQFlush , /* I/O Queue flush requests for your unit number */ + kATAFnBusReset /* Reset ATA bus */ + +} ; + + +/* The ATA Event codes */ +/* sent when calling the device driver's event handler*/ +enum ataEventCode { + kATANullEvent = 0x00, /* Just kidding -- nothing happened*/ + kATAOnlineEvent = 0x01, /* An ATA device has come online*/ + kATAOfflineEvent = 0x02, /* An ATA device has gone offline*/ + kATARemovedEvent = 0x03, /* An ATA device has been removed from the bus*/ + kATAResetEvent = 0x04, /* Someone gave a hard reset to the drive*/ + kATAOfflineRequest = 0x05, /* Someone requesting to offline the drive*/ + kATAEjectRequest = 0x06, /* Someone requesting to eject the drive*/ + kATAPIResetEvent = 0x07, /* Someone gave a ATAPI reset to the drive*/ + kATAReservedEvent = 0x80 /* RESERVED*/ +}; + + +// These need to be combined with a new enumeration of the current ATA/ATAPI command set. +// Some opcodes are of interest to ATA controllers, since they imply special protocols +// or handling. Device Reset, Execute Device Diagnostics have subtle side effects that +// controllers need to be aware of, so we snoop for those commands being issued. +// the rest are here for informational purposes. + +// BUG make new enum for all current ATA commands. + +enum { + kSOFTRESET = 0x008, // ATAPI Soft Reset command + kPACKET = 0x0A0, // ATAPI Packet command + kID_DRIVE = 0x0A1 // ATAPI Identify drive command +}; +/* ATA Command Opcode definition*/ +enum { + kATAcmdWORetry = 0x01, /* Without I/O retry option*/ + kATAcmdNOP = 0x0000, /* NOP operation - media detect*/ + kATAcmdRecal = 0x0010, /* Recalibrate command */ + kATAcmdRead = 0x0020, /* Read command */ + kATAcmdReadLong = 0x0022, /* Read Long command*/ + kATAcmdReadExtended = 0x0024, /* Read Extended (with retries)*/ + kATAcmdReadDMAExtended = 0x0025, /* Read DMA Extended (with retries)*/ + kATAcmdWrite = 0x0030, /* Write command */ + kATAcmdWriteLong = 0x0032, /* Write Long*/ + kATAcmdWriteExtended = 0x0034, /* Write Extended (with retries)*/ + kATAcmdWriteDMAExtended = 0x0035, /* Write DMA Extended (with retries)*/ + kATAcmdWriteVerify = 0x003C, /* Write verify*/ + kATAcmdReadVerify = 0x0040, /* Read Verify command */ + kATAcmdFormatTrack = 0x0050, /* Format Track command */ + kATAcmdSeek = 0x0070, /* Seek command */ + kATAcmdDiagnostic = 0x0090, /* Drive Diagnostic command */ + kATAcmdInitDrive = 0x0091, /* Init drive parameters command */ + kATAcmdReadMultiple = 0x00C4, /* Read multiple*/ + kATAcmdWriteMultiple = 0x00C5, /* Write multiple*/ + kATAcmdSetRWMultiple = 0x00C6, /* Set Multiple for Read/Write Multiple*/ + kATAcmdReadDMA = 0x00C8, /* Read DMA (with retries)*/ + kATAcmdWriteDMA = 0x00CA, /* Write DMA (with retries)*/ + kATAcmdMCAcknowledge = 0x00DB, /* Acknowledge media change - removable*/ + kATAcmdDoorLock = 0x00DE, /* Door lock*/ + kATAcmdDoorUnlock = 0x00DF, /* Door unlock*/ + kATAcmdStandbyImmed = 0x00E0, /* Standby Immediate*/ + kATAcmdIdleImmed = 0x00E1, /* Idle Immediate*/ + kATAcmdStandby = 0x00E2, /* Standby*/ + kATAcmdIdle = 0x00E3, /* Idle*/ + kATAcmdReadBuffer = 0x00E4, /* Read sector buffer command */ + kATAcmdCheckPowerMode = 0x00E5, /* Check power mode command <04/04/94>*/ + kATAcmdSleep = 0x00E6, /* Sleep*/ + kATAcmdFlushCache = 0x00E7, /* Flush Cache */ + kATAcmdWriteBuffer = 0x00E8, /* Write sector buffer command */ + kATAcmdWriteSame = 0x00E9, /* Write same data to multiple sectors*/ + kATAcmdFlushCacheExtended = 0x00EA, /* Flush Cache Extended */ + kATAcmdDriveIdentify = 0x00EC, /* Identify Drive command */ + kATAcmdMediaEject = 0x00ED, /* Media Eject*/ + kATAcmdSetFeatures = 0x00EF /* Set Features*/ +}; + +/* Set feature command opcodes*/ +enum { + kATAEnableWriteCache = 0x02, /* Enable write cache*/ + kATASetTransferMode = 0x03, /* Set transfer mode*/ + kATAEnableAPM = 0x05, /* Enable Advanced Power Management*/ + kATASetPIOMode = 0x08, /* PIO Flow Control Tx Mode bit*/ + kATADisableWriteCache = 0x82, /* disable write cache*/ + kATAEnableReadAhead = 0xAA /* Read look-ahead enable*/ +}; + +// revisit the opcode enumerations. + +////////////////////// + + +/* task file for ata */ +typedef struct ataTaskFile { + + UInt8 ataTFFeatures; /* <-> Error(R) or ataTFFeatures(W) register image */ + UInt8 ataTFCount; /* <-> Sector count/remaining */ + UInt8 ataTFSector; /* <-> Sector start/finish */ + UInt8 ataTFCylLo; /* <-> ataTFCylLo */ + UInt8 ataTFCylHigh; /* <-> ataTFCylHigh */ + UInt8 ataTFSDH; /* <-> ataTFSDH register image*/ + UInt8 ataTFCommand; /* <-> Status(R) or Command(W) register image */ + +} ataTaskFile; + + +typedef struct ataRegisterImage { + + ataTaskFile taskFile; + UInt16 ataDataRegister; /* <-> Data register. */ + UInt8 ataAltSDevCReg; /* <->: Alternate status(R) or Device Control(W) register image*/ + +} ataRegisterImage ; + + +typedef struct ATAPICmdPacket{ + + UInt16 atapiPacketSize; /* Size of command packet in bytes */ + UInt16 atapiCommandByte[8]; /* The command packet itself*/ + +}ATAPICmdPacket; + + + +// Error and result codes: TBD +enum { + kATAErrUnknownType = -1, + kATANoErr = 0, + kATAQueueEmpty = 1, + kATAUnknownOpcode, + kATATimeoutErr, + kATAInvalidDevID, + kATAErrDevBusy, + kATAModeNotSupported, + kATADevIntNoCmd, + kATADeviceError, + kATADMAErr +}; + + +#endif /* !_IOATATYPES_H */ diff --git a/i386/include/IOKit/ata/IOPCIATA.h b/i386/include/IOKit/ata/IOPCIATA.h new file mode 100644 index 0000000..62067b2 --- /dev/null +++ b/i386/include/IOKit/ata/IOPCIATA.h @@ -0,0 +1,200 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _DRV_PCI_ATA_H +#define _DRV_PCI_ATA_H + +#include +#include +#include "IOATAController.h" +#include +#include + +#include + +/*! @class IOPCIATA + @abstract The base class for PCI-IDE ata controller family. + @discussion class defining the common elements of bus-mastering PCI ATA controllers which meet or at least loosely follow the pci bus mastering pci-ide controller spec. Header doc is incomplete, but source is heavily commented. + +*/ + + + +class IOPCIATA : public IOATAController +{ + OSDeclareDefaultStructors(IOPCIATA); + +public: + + /*--- Overrides from IOATAController ---*/ + virtual bool init(OSDictionary * properties); + virtual bool start( IOService* provider ); + +protected: + + // The DMA states: not in use, in use and running with additional passes needed, + // in use on final pass, transfer complete, and failure + enum ATADMAState + { + // DMA state flags + kATADMAInactive, + kATADMAStarting, + kATADMAActive, + kATADMAStatus, + kATADMAComplete, + kATADMAError, + + }; + + enum { + // PRD flags + kLast_PRD = 0x8000, + kContinue_PRD = 0, + + }; + + + enum { + mBMCmdStartOutput = 0x01, // start engine to transfer from memory to device. + mBMCmdStartInput = (1 << 3 ) | 0x01, // start engine to transfer from device to memory + mBMCmdStop = 0x00, // halt engine. + }; + + enum { + // bus master status register definitions. + bBMStatusSimplex = 7, // 0 = simultaneous transactions allowed. 1 = primary and secondary busses may not be active at same time. + bBMStatusDrv1 = 6, // 1 = device 1 and bus are already configured by some other software/firmware + bBMStatusDrv0 = 5, // 1 = device 0 and bus are already configured by some other software/firmware + bBMStatusInt = 2, // 1 = device has asserted INTRQ and all data is flushed to/from memory. + bBMStatusError = 1, // 1 = an error in the DMA has occured. Software clears by writing 1 to this bit. + bBMStatusActive = 0, // 1 = DMA engine is active. + }; + + enum{ + + mBMStatusSimplex = 1 << 7, + mBMStatusDrv1 = 1 << 6, + mBMStatusDrv0 = 1 << 5, + mBMStatusInt = 1 << 2, + mBMStatusError = 1 << 1, + mBMStatusActive = 1 + }; + + // the physical region descriptor used for the dma engine. + struct PRD + { + UInt32 bufferPtr; // address + UInt16 byteCount; // 16 bit byte count where 0x0000 = 64K + UInt16 flags; // 0 in flags means contine, 0x80 means stop + }; + + + // descendants of this class MUST initialize these values + // prior to activating any DMA command. + IOATARegPtr8 _bmCommandReg; + IOATARegPtr8 _bmStatusReg; + IOATARegPtr32 _bmPRDAddresReg; + + // semaphore for DMA state + UInt32 _dmaState; + + // table of PRD descriptors + PRD* _prdTable; + IOPhysicalAddress _prdTablePhysical; + + IONaturalMemoryCursor* _DMACursor; + + // override from IOATAController + // activate the DMA engine as per the current command + virtual IOReturn startDMA( void ); + + // override from IOATAController + // safely halt the DMA engine regardless of state + virtual IOReturn stopDMA( void ); + + // allocate memory for the PRD descriptors. + virtual bool allocDMAChannel(void); + + // fill CC with stop commands. + virtual void initATADMAChains (PRD* descPtr); + + // fill out a PRD, respecting endianess + virtual void setPRD(UInt8 *bffr, UInt16 count, PRD *tableElement, UInt16 end); + + // setup the CC with IO commands + virtual IOReturn createChannelCommands(void); + + // deallocate memory for the DMA engine + virtual bool freeDMAChannel(void); + + // clean up on device interrupt + virtual IOReturn handleDeviceInterrupt(void); + + // activate the DMA engine + virtual void activateDMAEngine(void); + + // shutdown the DMA engine + virtual void stopDMAEngine(void); + + // safely suspend the DMA engine + virtual void shutDownATADMA (void); + + // overrides + virtual void free(); +protected: +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOPCIATA class in the future. + */ + typedef struct ExpansionData + { + IOBufferMemoryDescriptor* _prdBuffer; + } ExpansionData; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + +private: + OSMetaClassDeclareReservedUnused(IOPCIATA, 0); + OSMetaClassDeclareReservedUnused(IOPCIATA, 1); + OSMetaClassDeclareReservedUnused(IOPCIATA, 2); + OSMetaClassDeclareReservedUnused(IOPCIATA, 3); + OSMetaClassDeclareReservedUnused(IOPCIATA, 4); + OSMetaClassDeclareReservedUnused(IOPCIATA, 5); + OSMetaClassDeclareReservedUnused(IOPCIATA, 6); + OSMetaClassDeclareReservedUnused(IOPCIATA, 7); + OSMetaClassDeclareReservedUnused(IOPCIATA, 8); + OSMetaClassDeclareReservedUnused(IOPCIATA, 9); + OSMetaClassDeclareReservedUnused(IOPCIATA, 10); + OSMetaClassDeclareReservedUnused(IOPCIATA, 11); + OSMetaClassDeclareReservedUnused(IOPCIATA, 12); + OSMetaClassDeclareReservedUnused(IOPCIATA, 13); + OSMetaClassDeclareReservedUnused(IOPCIATA, 14); + OSMetaClassDeclareReservedUnused(IOPCIATA, 15); + OSMetaClassDeclareReservedUnused(IOPCIATA, 16); + OSMetaClassDeclareReservedUnused(IOPCIATA, 17); + OSMetaClassDeclareReservedUnused(IOPCIATA, 18); + OSMetaClassDeclareReservedUnused(IOPCIATA, 19); + OSMetaClassDeclareReservedUnused(IOPCIATA, 20); +}; + +#endif // _DRV_PCI_ATA_H diff --git a/i386/include/IOKit/ata/MacIOATA.h b/i386/include/IOKit/ata/MacIOATA.h new file mode 100644 index 0000000..fad6c33 --- /dev/null +++ b/i386/include/IOKit/ata/MacIOATA.h @@ -0,0 +1,225 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#if defined(__ppc__) + + +#ifndef _DRV_MACIO_ATA_H +#define _DRV_MACIO_ATA_H + +#include +#include +#include "IOATAController.h" +#include +#include + +#include + + +/*! @class MacIOATA + @abstract The base class for MAC-IO ata controller family. . + @discussion class defining the portions of MacIO ATA cells which are shared + in common between Heathrow and Key Largo ATA Cells. + These controllers share a common register file layout, interrupt + source format and all use DBDMA engines. These are different from + other ATA controllers, such as most PCI-IDE and PC-Card ATA ports. + Each cell type has some distinctive features that must be implemented + by a specific driver subclass. As much common code as possible is + presented in this superclass. + +*/ + +class MacIOATA : public IOATAController +{ + OSDeclareDefaultStructors(MacIOATA); + +public: + + /*--- Overrides from IOATAController ---*/ + virtual bool init(OSDictionary * properties); + virtual bool start( IOService* provider ); + virtual IOReturn message (UInt32 type, IOService* provider, void* argument = 0); + +protected: + + // The DMA states: not in use, in use and running with additional passes needed, + // in use on final pass, transfer complete, and failure + enum ATADMAState + { + kATADMAInactive, + kATADMAStarting, + kATADMAActive, + kATADMAStatus, + kATADMAComplete, + kATADMAError + }; + + + + // the address of the timing register in the controller + volatile UInt32* _timingConfigReg; + // the timing values to use for each device. + UInt32 _timingConfig[2]; + + // semaphore for DMA state + UInt32 _dmaState; + + // indicates whether a DMA interrupt is expected + UInt32 _dmaIntExpected; + + // pointer to the DMA control register address. + volatile IODBDMAChannelRegisters* _dmaControlReg; + + // mappings to the controller and DMA engine registers + // we have to free these when we go away. + IOMemoryMap* _baseAddressMap; + IOMemoryMap* _dmaBaseMap; + + // the DBDMA memory cursor + IODBDMAMemoryCursor* _DMACursor; + + // the DBDMA descriptor table + IODBDMADescriptor* _descriptors; + IOPhysicalAddress _descriptorsPhysical; + + // interrupt event sources + IOInterruptEventSource* _devIntSrc; + IOInterruptEventSource* _dmaIntSrc; + + // flag indicating device and dma engine interrupts need + // re-synchronization. + + bool _resyncInterrupts; +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + // overriden to allow synchronization of DMA vs. device interrupts. + virtual IOReturn handleDeviceInterrupt(void); + // overriden here to allow for reporting of DMA errs + virtual IOReturn asyncStatus(void); + + // overriden here to allow for clean up of DMA resynch flag on timeout. + virtual void handleTimeout(void); + + + // called by the superclass::start method in order to + // find and enable access to the ATA task file. + virtual bool configureTFPointers(void); + + // allocate memory for the DMA descriptors. + virtual bool allocDMAChannel(void); + + // fill CC with stop commands. + virtual void initATADMAChains (IODBDMADescriptor* descPtr); + + // setup the CC with IO commands + virtual IOReturn createChannelCommands(void); + + // deallocate memory for the DMA engine + virtual bool freeDMAChannel(void); + + // connect the device (drive) interrupt to our workloop + virtual bool createDeviceInterrupt(void); + + // connect the DMA interrupt to our workloop. + virtual bool createDMAInterrupt(void); + + + // override from IOATAController + // activate the DMA engine as per the current command + virtual IOReturn startDMA( void ); + + // override from IOATAController + // safely halt the DMA engine regardless of state + virtual IOReturn stopDMA( void ); + + // handle the interrupt processing + virtual void processDMAInterrupt (void); + + // activate the DMA engine + virtual void activateDMAEngine(void); + + // shutdown the DMA engine + virtual void stopDMAEngine(void); + + // safely suspend the DMA engine + virtual void shutDownATADMA (void); + + // check the command chain after run to update byte counts + // and check for errors + virtual bool scanATADMAChain (IOByteCount* byteCount); + + + // c to c++ glue code. + static void deviceInterruptOccurred(OSObject*, IOInterruptEventSource *, int count); + static void dmaInterruptOccurred(OSObject*, IOInterruptEventSource *, int count); + + // overrides + virtual void free(); + + // media bay specific code + bool isMediaBay; + bool isBusOnline; + + virtual IOReturn executeCommand(IOATADevice* nub, IOATABusCommand* command); + virtual IOReturn handleQueueFlush( void ); + virtual bool checkTimeout( void ); + static void cleanUpAction(OSObject * owner, void*, void*, void*, void*); + virtual void cleanUpBus(void); + virtual IOReturn handleBusReset(void); + // end media bay specific. + +private: + OSMetaClassDeclareReservedUnused(MacIOATA, 0); + OSMetaClassDeclareReservedUnused(MacIOATA, 1); + OSMetaClassDeclareReservedUnused(MacIOATA, 2); + OSMetaClassDeclareReservedUnused(MacIOATA, 3); + OSMetaClassDeclareReservedUnused(MacIOATA, 4); + OSMetaClassDeclareReservedUnused(MacIOATA, 5); + OSMetaClassDeclareReservedUnused(MacIOATA, 6); + OSMetaClassDeclareReservedUnused(MacIOATA, 7); + OSMetaClassDeclareReservedUnused(MacIOATA, 8); + OSMetaClassDeclareReservedUnused(MacIOATA, 9); + OSMetaClassDeclareReservedUnused(MacIOATA, 10); + OSMetaClassDeclareReservedUnused(MacIOATA, 11); + OSMetaClassDeclareReservedUnused(MacIOATA, 12); + OSMetaClassDeclareReservedUnused(MacIOATA, 13); + OSMetaClassDeclareReservedUnused(MacIOATA, 14); + OSMetaClassDeclareReservedUnused(MacIOATA, 15); + OSMetaClassDeclareReservedUnused(MacIOATA, 16); + OSMetaClassDeclareReservedUnused(MacIOATA, 17); + OSMetaClassDeclareReservedUnused(MacIOATA, 18); + OSMetaClassDeclareReservedUnused(MacIOATA, 19); + OSMetaClassDeclareReservedUnused(MacIOATA, 20); + +}; + +#endif // _DRV_MACIO_ATA_H + + +#endif // defined(ppc) diff --git a/i386/include/IOKit/audio/IOAudioControl.h b/i386/include/IOKit/audio/IOAudioControl.h new file mode 100644 index 0000000..d1d9019 --- /dev/null +++ b/i386/include/IOKit/audio/IOAudioControl.h @@ -0,0 +1,595 @@ +/* + * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOAUDIOCONTROL_H +#define _IOKIT_IOAUDIOCONTROL_H + +#include +#ifndef IOAUDIOFAMILY_SELF_BUILD +#include +#else +#include "IOAudioEngine.h" +#endif + +class IOAudioPort; +class OSDictionary; +class OSSet; +class IOAudioUserClient; +class IOAudioControlUserClient; +class IOWorkLoop; +class IOCommandGate; + +/*! + * @class IOAudioControl + * @abstract Represents any controllable attribute of an IOAudioDevice. + * @discussion An IOAudioControl instance may belong to one IOAudioPort. Additionally, it may associated + * with an IOAudioEngine as a default control for that IOAudioEngine. + * + * When its value changes, it sends a notification to the CoreAudio.framework (HAL). It also makes a call + * to the ValueChangeHandler. + * + * The base IOAudioControl class contains a type, a value and a channel ID representing the channel(s) which + * the control acts on. It may also contain a readable format for the name of the channel as well as a + * control ID that can be used to identify unique controls. Additionally it may contain a subType and a usage. + * Each type has its own set of possible subTypes. There currently four different control types defined: + * kIOAudioControlTypeLevel, kIOAudioControlTypeToggle, kIOAudioControlTypeSelector. + * Each one is represented by a subclass of IOAudioControl: IOAudioLevelControl, IOAudioToggleControl, + * IOAudioSelectorControl. The level control defines a range of allowed values and has + * a defined subtype of kIOAudioLevelControlSubTypeVolume used to define a volume control. The toggle control + * allows for a boolean value and has a defined subtype kIOAudioToggleControlSubTypeMute for a mute control. The + * selector control has a list of allowed selections with a value and description for each allowed selection and + * has the following sub types: kIOAudioSelectorControlSubTypeOutput for an output selector and + * kIOAudioSelectorControlSubTypeInput for an input selector. See the subclass documentation for a more + * complete description of each + * + * There are enums for default channel ID values and common channel names in IOAudioTypes.h. The channel ID + * values are prefixed with 'kIOAudioControlChannelID' and the common channel names are prefixed with + * 'kIOAudioControlChannelName'. All of the attributes of the IOAudioControl are stored in the registry. + * The key used for each attribute is defined in IOAudioTypes.h with the define matching the following + * pattern: 'kIOAudioControlKey'. For example: kIOAudioControlChannelIDKey. + * + * In addition to the existing defined control types, drivers can define their own as well for other purposes. + * + * Changes to the IOAudioControl's value made by the CoreAudio.framework are done through the IORegistry. + * When the CoreAudio.framework initiates a value change, the control receives a setProperties() message. + * The setProperties() implementation looks for the property 'IOAudioControlValue' and if present, calls + * setValue() on the driver's IOWorkLoop with the new value. The setValue() function first checks to see + * if the new value is different. If so, it calls performValueChange() to call through to the driver + * to make the change in the hardware. If that call succeeds the value is changed and the new value is set + * in the registry. Additionally notifications are sent to all clients that have registered for them. + */ +class IOAudioControl : public IOService +{ + friend class IOAudioPort; + friend class IOAudioDevice; + friend class IOAudioEngine; + + OSDeclareDefaultStructors(IOAudioControl) + +public: + + /*! + * @typedef IntValueChangeHandler + * @abstract Handler function used to make a notification when a value is to be changed. + * @param target Reference supplied when the handler was registered. + * @param audioControl The IOAudioControl that is changing. + * @param oldValue The old value of the control. + * @param newValue The new value the control is being changed to. + * @result Must return kIOReturnSuccess when the hardware is successfully updated. + */ + typedef IOReturn (*IntValueChangeHandler)(OSObject *target, IOAudioControl *audioControl, SInt32 oldValue, SInt32 newValue); + typedef IOReturn (*DataValueChangeHandler)(OSObject *target, IOAudioControl *audioControl, const void *oldData, UInt32 oldDataSize, const void *newData, UInt32 newDataSize); + typedef IOReturn (*ObjectValueChangeHandler)(OSObject *target, IOAudioControl *audioControl, OSObject *oldValue, OSObject *newValue); + +protected: + /*! @var workLoop + The IOWorkLoop for the audio driver - shared from the IOAudioDevice. + */ + IOWorkLoop *workLoop; + /*! @var commandGate + The IOCommandGate for this control - attached to the driver's IOWorkLoop. + */ + IOCommandGate *commandGate; + + /*! @var isStarted + Internal state keeping track of when the IOAudioControl has been started. + */ + bool isStarted; + + /*! @var controlID + An optional identifier that can be used to identify the control. + */ + UInt32 controlID; + /*! @var channelID + The ID of the channel this control affects - may be kIOAudioControlChannelIDAll if it represents all channels. + */ + UInt32 channelID; + + UInt32 type; + UInt32 subType; + UInt32 usage; + + OSObject *value; + + typedef enum { + kIntValueChangeHandler, + kDataValueChangeHandler, + kObjectValueChangeHandler + } ValueChangeHandlerType; + + ValueChangeHandlerType valueChangeHandlerType; + + union { + IntValueChangeHandler intHandler; + DataValueChangeHandler dataHandler; + ObjectValueChangeHandler objectHandler; + } valueChangeHandler; + + OSObject *valueChangeTarget; + + /*! @var clients + A list of user clients that have requested value change notifications. + */ + OSSet *userClients; + +protected: + struct ExpansionData { + IOAudioEngine * providerEngine; + OSArray * notificationQueue; + }; + + ExpansionData *reserved; + +public: + // OSMetaClassDeclareReservedUsed(IOAudioControl, 0); + virtual void sendChangeNotification(UInt32 notificationType); + + // OSMetaClassDeclareReservedUsed(IOAudioControl, 1); + /*! + * @function setReadOnlyFlag + * @abstract Call this function to say that a control is read only. + * This call cannot be undone, so if a control is only temporarily unsetable, + * do not use this call but instead return an error from the control handler. + */ + virtual void setReadOnlyFlag(); + + // OSMetaClassDeclareReservedUsed(IOAudioControl, 2); + virtual void sendQueuedNotifications(void); + + // OSMetaClassDeclareReservedUsed(IOAudioControl, 3); + /*! + * @function createUserClient + * @abstract Creates a new IOAudioControlUserClient instance. + * @discussion This function is called by newUserClient() to create a new IOAudioControlUserClient instance. This function may be overridden by subclasses that need to add functionality + * to the IOAudioControlUserClient. In that case, they must subclass IOAudioControlUserClient + * and return a new, initialized instance of that subclass. + * A derived class that requires overriding of createUserClient should override the version with the properties + * parameter for Intel targets, and without the properties parameter for PPC targets. The #if __i386__ directive + * can be used to select between the two behaviors. + * @param task The task requesting the new user client. + * @param securityID Optional security paramater passed in by the client - ignored. + * @param type Optional user client type passed in by the client. + * @param newUserClient The IOAudioControlUserClient * must be stored in this param on a successful + * completion. + * @param properties A dictionary of additional properties for the connection. + * @result Returns kIOReturnSuccess on success. + */ + virtual IOReturn createUserClient(task_t task, void *securityID, UInt32 type, IOAudioControlUserClient **newUserClient, OSDictionary *properties); + +private: + OSMetaClassDeclareReservedUsed(IOAudioControl, 0); + OSMetaClassDeclareReservedUsed(IOAudioControl, 1); + OSMetaClassDeclareReservedUsed(IOAudioControl, 2); + OSMetaClassDeclareReservedUsed(IOAudioControl, 3); + + OSMetaClassDeclareReservedUnused(IOAudioControl, 4); + OSMetaClassDeclareReservedUnused(IOAudioControl, 5); + OSMetaClassDeclareReservedUnused(IOAudioControl, 6); + OSMetaClassDeclareReservedUnused(IOAudioControl, 7); + OSMetaClassDeclareReservedUnused(IOAudioControl, 8); + OSMetaClassDeclareReservedUnused(IOAudioControl, 9); + OSMetaClassDeclareReservedUnused(IOAudioControl, 10); + OSMetaClassDeclareReservedUnused(IOAudioControl, 11); + OSMetaClassDeclareReservedUnused(IOAudioControl, 12); + OSMetaClassDeclareReservedUnused(IOAudioControl, 13); + OSMetaClassDeclareReservedUnused(IOAudioControl, 14); + OSMetaClassDeclareReservedUnused(IOAudioControl, 15); + OSMetaClassDeclareReservedUnused(IOAudioControl, 16); + OSMetaClassDeclareReservedUnused(IOAudioControl, 17); + OSMetaClassDeclareReservedUnused(IOAudioControl, 18); + OSMetaClassDeclareReservedUnused(IOAudioControl, 19); + OSMetaClassDeclareReservedUnused(IOAudioControl, 20); + OSMetaClassDeclareReservedUnused(IOAudioControl, 21); + OSMetaClassDeclareReservedUnused(IOAudioControl, 22); + OSMetaClassDeclareReservedUnused(IOAudioControl, 23); + +public: + + /*! + * @function withAttributes + * @abstract Static function that allocates a new IOAudioControl with the given attributes. + * @param type The type of the control. Common, known types are defined in IOAudioTypes.h. They currently + * consist of kIOAudioControlTypeLevel, kIOAudioControlTypeToggle, kIOAudioControlTypeSelector. + * @param channelID The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h. + * @param channelName An optional name for the channel. Common names are located in IOAudioDefines.h. Any name not + * defined in IOAudioDefines.h must be localized in order to be properly displayed in multiple languages. + * @param cntrlID An optional ID for the control that can be used to uniquely identify controls + * @param subType An optional subType specific to the given type + * @param usage An optional value specifying how the control will be used. Currently defined usages are kIOAudioControlUsageInput, + * kIOAudioControlUsageOutput and kIOAudioControlUsagePassThru. This value is used when a control is set as a default control + * on an IOAudioEngine. + * @result Returns a newly allocated and initialized IOAudioControl. + */ + static IOAudioControl *withAttributes(UInt32 type, + OSObject *initialValue, + UInt32 channelID, + const char *channelName = 0, + UInt32 cntrlID = 0, + UInt32 subType = 0, + UInt32 usage = 0); + + /*! + * @function init + * @abstract Initializes a newly allocated IOAudioControl with the given attributes. + * @param type The type of the control. Common, known types are defined in IOAudioTypes.h. They currently + * consist of kIOAudioControlTypeLevel, kIOAudioControlTypeToggle, kIOAudioControlTypeSelector. + * @param channelID The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h. + * @param channelName An optional name for the channel. Common names are located in IOAudioDefines.h. Any name not + * defined in IOAudioDefines.h must be localized in order to be properly displayed in multiple languages. + * @param cntrlID An optional ID for the control that can be used to uniquely identify controls + * @param subType An optional subType specific to the given type + * @param usage An optional value specifying how the control will be used. Currently defined usages are kIOAudioControlUsageInput, + * kIOAudioControlUsageOutput and kIOAudioControlUsagePassThru. This value is used when a control is set as a default control + * on an IOAudioEngine. + * @param properties Standard property list passed to the init() function of any new IOService. This dictionary + * gets stored in the registry entry for this instance. + * @result Returns true on success. + */ + virtual bool init(UInt32 type, + OSObject *initialValue, + UInt32 channelID, + const char *channelName = 0, + UInt32 cntrlID = 0, + UInt32 subType = 0, + UInt32 usage = 0, + OSDictionary *properties = 0); + + /*! + * @function free + * @abstract Frees all of the resources allocated by the IOAudioControl. + * @discussion Do not call this directly. This is called automatically by the system when the instance's + * refcount goes to 0. To decrement the refcount, call release() on the object. + */ + virtual void free(); + + /*! + * @function start + * @abstract Starts a newly created IOAudioControl. + * @discussion This is called automatically by IOAudioPort when addAudioControl() is called or by IOAudioEngine + * when addDefaultAudioControl() is called. It will only be called by the first call to either addAudioControl() or + * addDefaultAudioControl(). + * @param provider The IOAudioPort or IOAudioEngine that owns this control. + * @result Returns true on success. + */ + virtual bool start(IOService *provider); + + virtual bool attachAndStart(IOService *provider); + + /*! + * @function getIsStarted + * @abstract Returns true after start() has been called. + * @discussion Used by IOAudioPort and IOAudioEngine to decide if the control needs to be started. + */ + virtual bool getIsStarted(); + + /*! + * @function stop + * @abstract Stops the control when the provider is going away. + * @param provider The IOAudioPort or IOAudioEngine that owns this control. + */ + virtual void stop(IOService *provider); + + /*! + * @function getWorkLoop + * @abstract Returns the IOWorkLoop for the whole audio driver. + */ + virtual IOWorkLoop *getWorkLoop(); + + /*! + * @function getCommandGate + * @abstract Returns the IOCommandGate for this IOAudioControl. + */ + virtual IOCommandGate *getCommandGate(); + + /*! + * @function newUserClient + * @abstract Creates a new user client object for this IOAudioControl instance. + * @discussion This is called automatically by I/O Kit when a user process opens a connection to this + * IOAudioControl. This is typically done when the user process needs to register for value change + * notifications. This implementation allocates a new IOAudioControlUserClient object. There is no + * need to call this directly. + * A derived class that requires overriding of newUserClient should override the version with the properties + * parameter for Intel targets, and without the properties parameter for PPC targets. The #if __i386__ directive + * can be used to select between the two behaviors. + * @param task The task requesting the new user client. + * @param securityID Optional security paramater passed in by the client - ignored. + * @param type Optional user client type passed in by the client - 0 for the default user client type. + * @param handler The new IOUserClient * must be stored in this param on a successful completion. + * @param properties A dictionary of additional properties for the connection. + * @result Returns kIOReturnSuccess on success. May also result kIOReturnError or kIOReturnNoMemory. + */ + virtual IOReturn newUserClient(task_t task, void *securityID, UInt32 type, IOUserClient **handler); + virtual IOReturn newUserClient(task_t task, void *securityID, UInt32 type, OSDictionary *properties, IOUserClient **handler); + + /*! + * @function createUserClient + * @abstract Creates a new IOAudioControlUserClient instance. + * @discussion This function is called by newUserClient() to create a new IOAudioControlUserClient instance. This function may be overridden by subclasses that need to add functionality + * to the IOAudioControlUserClient. In that case, they must subclass IOAudioControlUserClient + * and return a new, initialized instance of that subclass. + * A derived class that requires overriding of createUserClient should override the version with the properties + * parameter for Intel targets, and without the properties parameter for PPC targets. The #if __i386__ directive + * can be used to select between the two behaviors. + * @param task The task requesting the new user client. + * @param securityID Optional security paramater passed in by the client - ignored. + * @param type Optional user client type passed in by the client. + * @param newUserClient The IOAudioControlUserClient * must be stored in this param on a successful + * completion. + * @result Returns kIOReturnSuccess on success. + */ + virtual IOReturn createUserClient(task_t task, void *securityID, UInt32 type, IOAudioControlUserClient **newUserClient); + + /*! + * @function clientClosed + * @abstract Called automatically by the IOAudioControlUserClient when a user client closes its + * connection to the control. + * @param client The user client object that has disconnected. + */ + virtual void clientClosed(IOAudioControlUserClient *client); + + /*! + * @function setProperties + * @abstract Changes a property of this IOService. + * @discussion This is called when the user client changes a property of this + * IOAudioControl. In this case it is used to change the value. This function + * looks for that property and then calls setValue() through the IOCommandGate and + * setValueAction(). + * @param properties An OSDictionary containing the properties to change. + * @result Returns kIOReturnSuccess on success. + */ + virtual IOReturn setProperties(OSObject *properties); + + virtual void setValueChangeHandler(IntValueChangeHandler intValueChangeHandler, OSObject *target); + virtual void setValueChangeHandler(DataValueChangeHandler dataValueChangeHandler, OSObject *target); + virtual void setValueChangeHandler(ObjectValueChangeHandler objectValueChangeHandler, OSObject *target); + + virtual void setValueChangeTarget(OSObject *target); + + /*! + * @function flushValue + * @abstract Forces the control to be flushed out to the hardware. + * @discussion This function calls performValueChange() directly with the current value of the IOAudioControl. + * @result Returns the result of performValueChange() - kIOReturnSuccess on success. + */ + virtual IOReturn flushValue(); + + /*! + * @function setValueAction + * @abstract IOCommandGate Action which calls setValue() while holding the IOCommandGate. + * @discussion This is needed to allow setValue() to be called on the IOWorkLoop. + * @param owner The owner of the IOCommandGate (the IOAudioControl in this case). + * @param arg1 The new value for the IOAudioControl. + * @result Returns the result of setValue() - kIOReturnSuccess on success. + */ + static IOReturn setValueAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + + static IOReturn _setValueAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // + + /*! + * @function setValue + * @abstract Sets the value for this control. + * @discussion When the control's value is changed, a call is made to performValueChange(). If that call + * succeeds, the value is set and sendValueChangeNotification() is called to send a notification to the + * user clients. This function must be called on the IOWorkLoop. + * @param newValue The new value for this control. + * @result Returns kIOReturnSuccess if the value is successfully set. + */ + virtual IOReturn setValue(OSObject *newValue); + + virtual IOReturn setValue(SInt32 intValue); + + /*! + * @function hardwareValueChanged + * @abstract Updates the value for this control and sends out the value changed notification. + * @discussion This is designed to be called by the driver when it detects that the hardware's value has + * changed without driver intervention (e.g. when an external event causes the change). The difference between + * hardwareValueChanged() and setValue() is that hardwareValueChanged() doesn't call performValueChange() which + * sends a message back to the driver to cause it to change the hardware with the new value. This function must + * be called on the IOWorkLoop. + * @param newValue The new value for this control. + * @result Returns kIOReturnSuccess if the value is successfully updated. + */ + virtual IOReturn hardwareValueChanged(OSObject *newValue); + + /*! + * @function getValue + * @abstract Returns the current value of the control. + */ + virtual OSObject *getValue(); + virtual SInt32 getIntValue(); + virtual const void *getDataBytes(); + virtual UInt32 getDataLength(); + + /*! + * @function getControlID + * @abstract Returns the control ID for the control. + */ + virtual UInt32 getControlID(); + + /*! + * @function getChannelID + * @abstract Returns the channel ID for the control. + */ + virtual UInt32 getChannelID(); + + virtual UInt32 getType(); + virtual UInt32 getSubType(); + virtual UInt32 getUsage(); + + virtual void setCoreAudioPropertyID(UInt32 propertyID); + + void setWorkLoop(IOWorkLoop *wl); + +protected: + /*! + * @function sendValueChangeNotification + * @abstract Called when the value has changed for the control. + * @discussion This function sends out the value change notification to the user clients. + */ + virtual void sendValueChangeNotification(); + + /*! + * @function setChannelName + * @abstract Called at init time to set the channel name for this IOAudioControl. + */ + virtual void setChannelName(const char *channelName); + + /*! + * @function setChannelID + * @abstract Called at init time to set the channel ID for this IOAudioControl. + */ + virtual void setChannelID(UInt32 newChannelID); + virtual void setChannelNumber(SInt32 channelNumber); + + /*! + * @function setSubType + * @abstract Called at init time to set the control subType. + */ + virtual void setType(UInt32 type); + + /*! + * @function setType + * @abstract Called at init time to set the control type. + */ + virtual void setSubType(UInt32 subType); + + /*! + * @function setUsage + * @abstract Called at init time to set the control usage. + */ + virtual void setUsage(UInt32 usage); + + /*! + * @function setControlID + * @abstract Sets the controlID for this control. + * @discussion The control ID is an optional attribute that can be used to track IOAudioControls. A typical + * use is for the IOAudioDevice to assign a unique controlID to each control that it creates and then + * do a switch statement on the id of the control when it gets an audioControlValueChanged() notification. + * Typically the control ID is set when the object is created and doesn't need to be called again. + * @param cntrlID The control ID for the control. + */ + virtual void setControlID(UInt32 cntrlID); + + /*! + * @function validateValue + * @abstract Called by setValue() to verify that the value is valid. + * @param newValue The new value to be verified. + * @result Returns kIOReturnSuccess if the value is valid. + */ + virtual IOReturn validateValue(OSObject *newValue); + + /*! + * @function updateValue + * @abstract Called by setValue() in order to update the value and the registry. + * @discussion It also calls + * sendValueChangedNotification() to send notifications to the user clients. + * @param newValue The new value to b updated. + * @result Returns kIOReturnSuccess if the value is successfully updated. + */ + virtual IOReturn updateValue(OSObject *newValue); + + virtual IOReturn _setValue(OSObject *newValue); + + /*! + * @function performValueChange + * @abstract Called by setValue() to make the call to the valueChangeHandler + * to update the hardware. + * @result Returns the result of the handler call (or kIOReturnError on an error). + */ + virtual IOReturn performValueChange(OSObject *newValue); + + /*! + * @function addUserClientAction + * @abstract IOCommandGate Action which calls addUserClient() while holding the IOCommandGate. + * @discussion This is needed to allow addUserClient() to be called on the IOWorkLoop. + * @param owner The owner of the IOCommandGate (the IOAudioControl in this case). + * @param arg1 The IOAudioControlUserClient to be added. + * @result Returns the result of addUserClient() - kIOReturnSuccess on success. + */ + static IOReturn addUserClientAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + + static IOReturn _addUserClientAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // + + /*! + * @function removeUserClientAction + * @abstract IOCommandGate Action which calls removeUserClient() while holding the IOCommandGate. + * @discussion This is needed to allow removeUserClient() to be called on the IOWorkLoop. + * @param owner The owner of the IOCommandGate (the IOAudioControl in this case). + * @param arg1 The IOAudioControlUserClient to be removed. + * @result Returns the result of removeUserClient() - kIOReturnSuccess on success. + */ + static IOReturn removeUserClientAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + + static IOReturn _removeUserClientAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // + + /*! + * @function detachUserClientsAction + */ + static IOReturn detachUserClientsAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + + /*! + * @function addUserClient + * @abstract Called on the IOWorkLoop to add a new IOAudioControlUserClient. + * @discussion There is no need to call this directly. It is called on the workLoop + * by newUserClient() through addUserClientAction(). + * @param newUserClient The IOAudioControlUserClientto be added. + * @result Returns kIOReturnSuccess on success. + */ + virtual IOReturn addUserClient(IOAudioControlUserClient *newUserClient); + + /*! + * @function removeUserClient + * @abstract Called on the IOWorkLoop to remove an IOAudioControlUserClient. + * @discussion This is called on the IOWorkLoop by clientClosed() through + * removeUserClientAction() when the user client is going away. It should + * not be called directly. + * @param userClient The IOAudioControlUserClient to be removed. + * @result Returns kIOReturnSuccess on success. + */ + virtual IOReturn removeUserClient(IOAudioControlUserClient *userClient); + + virtual IOReturn detachUserClients(); + +}; + +#endif /* _IOKIT_IOAUDIOCONTROL_H */ + diff --git a/i386/include/IOKit/audio/IOAudioControlUserClient.h b/i386/include/IOKit/audio/IOAudioControlUserClient.h new file mode 100644 index 0000000..4ceb05f --- /dev/null +++ b/i386/include/IOKit/audio/IOAudioControlUserClient.h @@ -0,0 +1,90 @@ +/* + * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOAUDIOCONTROLUSERCLIENT_H +#define _IOKIT_IOAUDIOCONTROLUSERCLIENT_H + +#include + +#ifndef IOAUDIOFAMILY_SELF_BUILD +#include +#else +#include "IOAudioTypes.h" +#endif + +class IOAudioControl; + +class IOAudioControlUserClient : public IOUserClient +{ + OSDeclareDefaultStructors(IOAudioControlUserClient) + +protected: + task_t clientTask; + IOAudioControl * audioControl; + IOAudioNotificationMessage * notificationMessage; + + virtual IOReturn clientClose(); + virtual IOReturn clientDied(); + +protected: + struct ExpansionData { }; + + ExpansionData *reserved; + +public: + virtual void sendChangeNotification(UInt32 notificationType); + // OSMetaClassDeclareReservedUsed(IOAudioControlUserClient, 1); + virtual bool initWithAudioControl(IOAudioControl *control, task_t owningTask, void *securityID, UInt32 type, OSDictionary *properties); + +private: + OSMetaClassDeclareReservedUsed(IOAudioControlUserClient, 0); + OSMetaClassDeclareReservedUsed(IOAudioControlUserClient, 1); + + OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 2); + OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 3); + OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 4); + OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 5); + OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 6); + OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 7); + OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 8); + OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 9); + OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 10); + OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 11); + OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 12); + OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 13); + OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 14); + OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 15); + +public: + static IOAudioControlUserClient *withAudioControl(IOAudioControl *control, task_t clientTask, void *securityID, UInt32 type); + static IOAudioControlUserClient *withAudioControl(IOAudioControl *control, task_t clientTask, void *securityID, UInt32 type, OSDictionary *properties); + + virtual bool initWithAudioControl(IOAudioControl *control, task_t owningTask, void *securityID, UInt32 type); + + virtual void free(); + + virtual IOReturn registerNotificationPort(mach_port_t port, UInt32 type, UInt32 refCon); + + virtual void sendValueChangeNotification(); +}; + +#endif /* _IOKIT_IOAUDIOCONTROLUSERCLIENT_H */ diff --git a/i386/include/IOKit/audio/IOAudioDebug.h b/i386/include/IOKit/audio/IOAudioDebug.h new file mode 100644 index 0000000..04b744e --- /dev/null +++ b/i386/include/IOKit/audio/IOAudioDebug.h @@ -0,0 +1,61 @@ +/* + * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOAUDIODEBUG_H +#define _IOAUDIODEBUG_H + +#ifdef DEBUG + #define DEBUG_LEVEL 1 + #define DEBUG_USE_FIRELOG 1 + + #ifdef DEBUG_USE_FIRELOG + #include + #define audioDebugIOLog( level, message... ) \ + do {FireLog( message ); FireLog("\n");} while (0) + + #else + #include + #define audioDebugIOLog( level, message... ) \ + do {USBLog( level, message );} while (0) + #endif + + + + #ifdef assert + #undef assert + + #define AssertionMessage( cond, file, line ) \ + "assert \"" #cond "\" failed in " #file " at line " #line + + #define AssertionFailed( cond, file, line ) \ + panic(AssertionMessage( cond, file, line )); + + #define assert( cond ) \ + if( !(cond) ) { \ + AssertionFailed( cond, __FILE__, __LINE__ ) \ + } + #endif +#else + #define audioDebugIOLog( level, message... ) ; +#endif + +#endif /* _IOAUDIODEBUG_H */ diff --git a/i386/include/IOKit/audio/IOAudioDefines.h b/i386/include/IOKit/audio/IOAudioDefines.h new file mode 100644 index 0000000..068267a --- /dev/null +++ b/i386/include/IOKit/audio/IOAudioDefines.h @@ -0,0 +1,465 @@ +/* + * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOAUDIODEFINES_H +#define _IOAUDIODEFINES_H + +#define kIOAudioDeviceClassName "IOAudioDevice" +#define kIOAudioEngineClassName "IOAudioEngine" +#define kIOAudioStreamClassName "IOAudioStream" +#define kIOAudioPortClassName "IOAudioPort" +#define kIOAudioControlClassName "IOAudioControl" + +/*! + * @defined kIOAudioSampleRateKey + * @abstract The key in the IORegistry for the IOAudioEngine sample rate attribute + * @discussion This value is represented as an integer in samples per second. + */ +#define kIOAudioSampleRateKey "IOAudioSampleRate" + +#define kIOAudioSampleRateWholeNumberKey "IOAudioSampleRateWholeNumber" +#define kIOAudioSampleRateFractionKey "IOAudioSampleRateFraction" + + + +/****** + * + * IOAudioDevice defines + * + *****/ + + +/*! + * @defined kIOAudioDeviceNameKey + * @abstract The key in the IORegistry for the IOAudioDevice name attribute. + */ +#define kIOAudioDeviceNameKey "IOAudioDeviceName" + +#define kIOAudioDeviceShortNameKey "IOAudioDeviceShortName" + +/*! + * @defined kIOAudioDeviceManufacturerNameKey + * @abstract The key in the IORegistry for the IOAudioDevice manufacturer name attribute. + */ +#define kIOAudioDeviceManufacturerNameKey "IOAudioDeviceManufacturerName" + +#define kIOAudioDeviceLocalizedBundleKey "IOAudioDeviceLocalizedBundle" + +#define kIOAudioDeviceTransportTypeKey "IOAudioDeviceTransportType" + +#define kIOAudioDeviceConfigurationAppKey "IOAudioDeviceConfigurationApplication" + +#define kIOAudioDeviceCanBeDefaults "IOAudioDeviceCanBeDefaults" + +#define kIOAudioDeviceModelIDKey "IOAudioDeviceModelID" + + +/*! + * @defined kIOAudioDeviceIconName + * @abstract The key in the IORegistry for the IOAudioDevice icon name attribute. + */ +#define kIOAudioDeviceIconNameKey "IOAudioDeviceIconName" + +#define kIOAudioDeviceIconTypeKey "IOAudioDeviceIconType" + +#define kIOAudioDeviceIconSubDirKey "IOAudioDeviceIconSubDir" + +/***** + * + * IOAudioEngine defines + * + *****/ + + + /*! + * @defined kIOAudioEngineStateKey + * @abstract The key in the IORegistry for the IOAudioEngine state atrribute + * @discussion The value for this key may be one of: "Running", "Stopped" or "Paused". Currently the "Paused" + * state is unimplemented. + */ +#define kIOAudioEngineStateKey "IOAudioEngineState" + +/*! + * @defined kIOAudioEngineOutputSampleLatencyKey + * @abstract The key in the IORegistry for the IOAudioEngine output sample latency key + * @discussion + */ +#define kIOAudioEngineOutputSampleLatencyKey "IOAudioEngineOutputSampleLatency" + +/*! + * @defined kIOAudioStreamSampleLatencyKey + * @abstract The key in the IORegistry for the IOAudioStream output sample latency key + * @discussion Tells the HAL how much latency is on a particular stream. If two streams + * on the same engine have different latencies (e.g. one is analog, one is digital), then + * set this property on both streams to inform the HAL of the latency differences. Alternately, + * you can set the engine latency, and just include the latency additional to that for the particular + * stream. The HAL will add the engine and stream latency numbers together to get the total latency. + */ +#define kIOAudioStreamSampleLatencyKey "IOAudioStreamSampleLatency" + +#define kIOAudioEngineInputSampleLatencyKey "IOAudioEngineInputSampleLatency" + +#define kIOAudioEngineSampleOffsetKey "IOAudioEngineSampleOffset" + +#define kIOAudioEngineInputSampleOffsetKey "IOAudioEngineInputSampleOffset" + +#define kIOAudioEngineNumSampleFramesPerBufferKey "IOAudioEngineNumSampleFramesPerBuffer" + +#define kIOAudioEngineCoreAudioPlugInKey "IOAudioEngineCoreAudioPlugIn" + +#define kIOAudioEngineNumActiveUserClientsKey "IOAudioEngineNumActiveUserClients" + +#define kIOAudioEngineUserClientActiveKey "IOAudioEngineUserClientActive" + +#define kIOAudioEngineGlobalUniqueIDKey "IOAudioEngineGlobalUniqueID" + +#define kIOAudioEngineDescriptionKey "IOAudioEngineDescription" + +#define kIOAudioEngineClockIsStableKey "IOAudioEngineClockIsStable" + +#define kIOAudioEngineClockDomainKey "IOAudioEngineClockDomain" + +#define kIOAudioEngineIsHiddenKey "IOAudioEngineIsHidden" +/*! + * @defined kIOAudioEngineFullChannelNamesKey + * @abstract The key in the IORegistry for the IOAudioEngine's dictionary of fully constructed names for each channel keyed by the device channel + * @discussion + */ +#define kIOAudioEngineFullChannelNamesKey "IOAudioEngineChannelNames" + +/*! + * @defined kIOAudioEngineFullChannelNamesKey + * @abstract The key in the IORegistry for the IOAudioEngine's dictionary of category names for each channel keyed by the device channel + * @discussion + */ +#define kIOAudioEngineFullChannelCategoryNamesKey "IOAudioEngineChannelCategoryNames" + +/*! + * @defined kIOAudioEngineFullChannelNamesKey + * @abstract The key in the IORegistry for the IOAudioEngine's dictionary of number names for each channel keyed by the device channel + * @discussion + */ +#define kIOAudioEngineFullChannelNumberNamesKey "IOAudioEngineChannelNumberNames" + +#define kIOAudioEngineFullChannelNameKeyInputFormat "InputChannel%u" + +#define kIOAudioEngineFullChannelNameKeyOutputFormat "OutputChannel%u" + +#define kIOAudioEngineFlavorKey "IOAudioEngineFlavor" + +#define kIOAudioEngineAlwaysLoadCoreAudioPlugInKey "IOAudioEngineAlwaysLoadCoreAudioPlugIn" + +/*! + * @defined kIOAudioEngineInputChannelLayoutKey + * @abstract The key in the IORegistry for the IOAudioEngine's dictionary describes an array of OSNumber data that describe the spatial position of each channel. See IOAudioTypes.h. + * @discussion + */ + +#ifndef __OPEN_SOURCE__ +// +#endif +#define kIOAudioEngineInputChannelLayoutKey "IOAudioEngineInputChannelLayout" + +/*! + * @defined kIOAudioEngineOutputChannelLayoutKey + * @abstract The key in the IORegistry for the IOAudioEngine's dictionary describes an array of OSNumber data that describe the spatial position of each channel. See IOAudioTypes.h. + * @discussion + */ + +#ifndef __OPEN_SOURCE__ +// +#endif +#define kIOAudioEngineOutputChannelLayoutKey "IOAudioEngineOutputChannelLayout" + +/***** + * + * IOAudioStream defines + * + *****/ + + +#define kIOAudioStreamIDKey "IOAudioStreamID" +#define kIOAudioStreamDescriptionKey "IOAudioStreamDescription" +#define kIOAudioStreamNumClientsKey "IOAudioStreamNumClients" + +/*! + * @defined kIOAudioStreamDirectionKey + * @abstract The key in the IORegistry for the IOAudioStream direction attribute. + * @discussion The value for this key may be either "Output" or "Input". + */ +#define kIOAudioStreamDirectionKey "IOAudioStreamDirection" + +#define kIOAudioStreamStartingChannelIDKey "IOAudioStreamStartingChannelID" +#define kIOAudioStreamStartingChannelNumberKey "IOAudioStreamStartingChannelNumber" +#define kIOAudioStreamAvailableKey "IOAudioStreamAvailable" + +#define kIOAudioStreamFormatKey "IOAudioStreamFormat" +#define kIOAudioStreamAvailableFormatsKey "IOAudioStreamAvailableFormats" + +#define kIOAudioStreamNumChannelsKey "IOAudioStreamNumChannels" +#define kIOAudioStreamSampleFormatKey "IOAudioStreamSampleFormat" + +#define kIOAudioStreamNumericRepresentationKey "IOAudioStreamNumericRepresentation" + +#define kIOAudioStreamFormatFlagsKey "IOAudioStreamFormatFlags" +#define kIOAudioStreamFramesPerPacketKey "IOAudioStreamFramesPerPacket" +#define kIOAudioStreamBytesPerPacketKey "IOAudioStreamBytesPerPacket" + + +#define kIOAudioStreamBitDepthKey "IOAudioStreamBitDepth" +#define kIOAudioStreamBitWidthKey "IOAudioStreamBitWidth" + +#define kIOAudioStreamAlignmentKey "IOAudioStreamAlignment" + +#define kIOAudioStreamByteOrderKey "IOAudioStreamByteOrder" + +#define kIOAudioStreamIsMixableKey "IOAudioStreamIsMixable" + +#define kIOAudioStreamMinimumSampleRateKey "IOAudioStreamMinimumSampleRate" +#define kIOAudioStreamMaximumSampleRateKey "IOAudioStreamMaximumSampleRate" + +#define kIOAudioStreamDriverTagKey "IOAudioStreamDriverTag" + +#define kIOAudioStreamTerminalTypeKey "IOAudioStreamTerminalType" + +/***** + * + * IOAudioPort defines + * + *****/ + + + /*! + * @defined kIOAudioPortTypeKey + * @abstract The key in the IORegistry for the IOAudioPort type attribute. + * @discussion This is a driver-defined text attribute that may contain any type. + * Common types are defined as: "Speaker", "Headphones", "Microphone", "CD", "Line", "Digital", "Mixer", "PassThru". + */ +#define kIOAudioPortTypeKey "IOAudioPortType" + +/*! + * @defined kIOAudioPortSubTypeKey + * @abstract The key in the IORegistry for the IOAudioPort subtype attribute. + * @discussion The IOAudioPort subtype is a driver-defined text attribute designed to complement the type + * attribute. + */ +#define kIOAudioPortSubTypeKey "IOAudioPortSubType" + +/*! + * @defined kIOAudioPortNameKey + * @abstract The key in the IORegistry for the IOAudioPort name attribute. + */ +#define kIOAudioPortNameKey "IOAudioPortName" + + + +/***** + * + * IOAudioControl defines + * + *****/ + + + /*! + * @defined kIOAudioControlTypeKey + * @abstract The key in the IORegistry for the IOAudioCntrol type attribute. + * @discussion The value of this text attribute may be defined by the driver, however system-defined + * types recognized by the upper-level software are "Level", "Mute", "Selector". + */ +#define kIOAudioControlTypeKey "IOAudioControlType" + +#define kIOAudioControlSubTypeKey "IOAudioControlSubType" + +#define kIOAudioControlUsageKey "IOAudioControlUsage" + +#define kIOAudioControlIDKey "IOAudioControlID" + +/*! + * @defined kIOAudioControlChannelIDKey + * @abstract The key in the IORegistry for the IOAudioControl channel ID attribute + * @discussion The value for this key is an integer which may be driver defined. Default values for + * common channel types are provided in the following defines. + */ +#define kIOAudioControlChannelIDKey "IOAudioControlChannelID" + +#define kIOAudioControlChannelNumberKey "IOAudioControlChannelNumber" + +#define kIOAudioControlCoreAudioPropertyIDKey "IOAudioControlCoreAudioPropertyID" +/*! + * @defined kIOAudioControlChannelNameKey + * @abstract The key in the IORegistry for the IOAudioControl name attribute. + * @discussion This name should be a human-readable name for the channel(s) represented by the port. + * *** NOTE *** We really need to make all of the human-readable attributes that have potential to + * be used in a GUI localizable. There will need to be localized strings in the kext bundle matching + * the text. + */ +#define kIOAudioControlChannelNameKey "IOAudioControlChannelName" + +/*! + * @defined kIOAudioControlChannelNameAll + * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing + * the channel name for all channels. + */ +#define kIOAudioControlChannelNameAll "All Channels" + +/*! + * @defined kIOAudioControlChannelNameLeft + * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing + * the channel name for the left channel. + */ +#define kIOAudioControlChannelNameLeft "Left" + +/*! + * @defined kIOAudioControlChannelNameRight + * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing + * the channel name for the right channel. + */ +#define kIOAudioControlChannelNameRight "Right" + +/*! + * @defined kIOAudioControlChannelNameCenter + * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing + * the channel name for the center channel. + */ +#define kIOAudioControlChannelNameCenter "Center" + +/*! + * @defined kIOAudioControlChannelNameLeftRear + * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing + * the channel name for the left rear channel. + */ +#define kIOAudioControlChannelNameLeftRear "LeftRear" + +/*! + * @defined kIOAudioControlChannelNameRightRear + * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing + * the channel name for the right rear channel. + */ +#define kIOAudioControlChannelNameRightRear "RightRear" + +/*! + * @defined kIOAudioControlChannelNameSub + * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing + * the channel name for the sub/LFE channel. + */ +#define kIOAudioControlChannelNameSub "Sub" + +/*! + * @defined kIOAudioControlChannelNameFrontLeftCenter + * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing + * the channel name for the FrontLeftCenter channel. + */ +#define kIOAudioControlChannelNameFrontLeftCenter "FrontLeftCenter" + +/*! + * @defined kIOAudioControlChannelNameFrontRightCenter + * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing + * the channel name for the FrontRightCenter channel. + */ +#define kIOAudioControlChannelNameFrontRightCenter "FrontRightCenter" + +/*! + * @defined kIOAudioControlChannelNameRearCenter + * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing + * the channel name for the RearCenter channel. + */ +#define kIOAudioControlChannelNameRearCenter "RearCenter" + +/*! + * @defined kIOAudioControlChannelNameSurroundLeft + * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing + * the channel name for the SurroundLeft channel. + */ +#define kIOAudioControlChannelNameSurroundLeft "SurroundLeft" + +/*! + * @defined kIOAudioControlChannelNameSurroundRight + * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing + * the channel name for the SurroundRight channel. + */ +#define kIOAudioControlChannelNameSurroundRight "SurroundRight" + + +/*! + * @defined kIOAudioControlValueKey + * @abstract The key in the IORegistry for the IOAudioControl value attribute. + * @discussion The value returned by this key is a 32-bit integer representing the current value of the IOAudioControl. + */ +#define kIOAudioControlValueKey "IOAudioControlValue" + +/*! + * @defined kIOAudioControlValueIsReadOnlyKey + * @abstract The key in the IORegistry for the IOAudioControl value-is-read-only attribute. + * @discussion The value returned by this key is a 32-bit integer but the value doesn't have any direct meaning. + * Instead, the presence of this key indicates that the value for the control is read-only + */ +#define kIOAudioControlValueIsReadOnlyKey "IOAudioControlValueIsReadOnly" + +/*! + * @defined kIOAudioLevelControlMinValueKey + * @abstract The key in the IORegistry for the IOAudioControl minimum value attribute. + * @discussion The value returned by this key is a 32-bit integer representing the minimum value for the IOAudioControl. + * This is currently only valid for Level controls or other driver-defined controls that have a minimum and maximum + * value. + */ +#define kIOAudioLevelControlMinValueKey "IOAudioLevelControlMinValue" + +/*! + * @defined kIOAudioLevelControlMaxValueKey + * @abstract The key in the IORegistry for the IOAudioControl maximum value attribute. + * @discussion The value returned by this key is a 32-bit integer representing the maximum value for the IOAudioControl. + * This is currently only valid for Level controls or other driver-defined controls that have a minimum and maximum + * value. + */ +#define kIOAudioLevelControlMaxValueKey "IOAudioLevelControlMaxValue" + +/*! + * @defined kIOAudioLevelControlMinDBKey + * @abstract The key in the IORgistry for the IOAudioControl minimum db value attribute. + * @discussion The value returned by this key is a fixed point value in 16.16 format represented as a 32-bit + * integer. It represents the minimum value in db for the IOAudioControl. This value matches the minimum + * value attribute. This is currently valid for Level controls or other driver-defined controls that have a + * minimum and maximum db value. + */ +#define kIOAudioLevelControlMinDBKey "IOAudioLevelControlMinDB" + +/*! + * @defined kIOAudioLevelControlMaxDBKey + * @abstract The key in the IORgistry for the IOAudioControl maximum db value attribute. + * @discussion The value returned by this key is a fixed point value in 16.16 format represented as a 32-bit + * integer. It represents the maximum value in db for the IOAudioControl. This value matches the maximum + * value attribute. This is currently valid for Level controls or other driver-defined controls that have a + * minimum and maximum db value. + */ +#define kIOAudioLevelControlMaxDBKey "IOAudioLevelControlMaxDB" + +#define kIOAudioLevelControlRangesKey "IOAudioLevelControlRanges" + +#define kIOAudioLevelControlUseLinearScale "IOAudioLevelControlUseLinearScale" + +#define kIOAudioSelectorControlAvailableSelectionsKey "IOAudioSelectorControlAvailableSelections" +#define kIOAudioSelectorControlSelectionValueKey "IOAudioSelectorControlSelectionValue" +#define kIOAudioSelectorControlSelectionDescriptionKey "IOAudioSelectorControlSelectionDescriptionKey" + +#define kIOAudioSelectorControlClockSourceKey "IOAudioSelectorControlClockSourceKey" + +#endif /* _IOAUDIODEFINES_H */ diff --git a/i386/include/IOKit/audio/IOAudioDevice.h b/i386/include/IOKit/audio/IOAudioDevice.h new file mode 100644 index 0000000..6d55147 --- /dev/null +++ b/i386/include/IOKit/audio/IOAudioDevice.h @@ -0,0 +1,749 @@ +/* + * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOAudioDevice + */ + +#ifndef _IOKIT_IOAUDIODEVICE_H +#define _IOKIT_IOAUDIODEVICE_H + +#include + +#ifndef IOAUDIOFAMILY_SELF_BUILD +#include +#include +#else +#include "IOAudioTypes.h" +#include "IOAudioStream.h" +#endif + +class IOAudioEngine; +class IOAudioStream; +class IOAudioPort; +class IOAudioControl; +class OSDictionary; +class OSSet; +class OSArray; +class IOTimerEventSource; +class IOCommandGate; + +/*! + * enum IOAudioDevicePowerState + * @abstract Identifies the power state of the audio device + * @discussion A newly created IOAudioDevices defaults to the idle state. + * @constant kIOAudioDeviceSleep State set when the system is going to sleep + * @constant kIOAudioDeviceIdle State when the system is awake but none of the IOAudioEngines are in use + * @constant kIOAudioDeviceActive State when one ore more IOAudioEngines are in use. This state transition must complete before the system will begin playing audio. + */ +typedef enum _IOAudioDevicePowerState { + kIOAudioDeviceSleep = 0, // When sleeping + kIOAudioDeviceIdle = 1, // When no audio engines running + kIOAudioDeviceActive = 2 // audio engines running +} IOAudioDevicePowerState; + +/*! + * @class IOAudioDevice + * @abstract Abstract base class for a single piece of audio hardware. The IOAudioDevice provides + * the central coordination point for an audio driver. + * @discussion An audio driver is required to subclass IOAudioDevice in order to provide + * working audio to the system. A single driver instance will contain a single instance of the + * driver's IOAudioDevice subclass. The subclass is responsible for mapping all hardware device + * resources from the service provider nub. It must control access to the hardware so that the + * hardware doesn't get into an inconsistent state. It is possible that different threads may make + * requests of the hardware at the same time. The IOAudioDevice superclass provides an IOWorkLoop + * and IOCommandGate on the IOWorkLoop through which all hardware accesses may be synchronized. + * All entry points to all parts of the driver controlled by the IOAudioFamily will be synchronized + * through this one IOWorkLoop. + * + * The IOAudioDevice subclass is responsible for creating the rest of the pieces of the driver. + * It must identify and create all IOAudioEngines that are not automatically created by the system + * (i.e. those that are not matched and instantiated by IOKit directly). + * + * The IOAudioDevice subclass must enumerate and create all IOAudioControls to match + * the device capabilities. + * + * It must also execute control value chages when requested by the system (i.e. volume adjustments). + * + * In order to allow sleep and wake to work on the system, the IOAudioDevice subclass is responsible + * for performing the necessary actions to sleep and wake its hardware (and restore necessary state + * on wake). + * + * The IOAudioDevice class provides timer services that allow different elements in the audio driver + * to receive timer notifications as needed. These services were designed with the idea that most + * timed events in a typical audio driver need to be done at least as often as a certain interval. + * Further, it is designed with the idea that being called more often than the specified interval + * doesn't hurt anything - and in fact may help. With this in mind, the timer services provided + * by the IOAudioDevice class allow different targets to register for timer callbacks at least as + * often as the specified interval. The actual interval will be the smallest of the intervals of + * all of the callbacks. This way, we avoid the overhead of having many timers in a single audio + * device. As an example, each output IOAudioEngine has a timer to run the erase head. It doesn't hurt + * to have the erase head run more often. Also, a typical IOAudioDevice subclass may need to run a timer + * to check for device state changes (e.g. jack insertions). + * + * There are a number of strings passed from the driver to the CoreAudio.framework and then into + * applications. All of those strings should be localized by the driver. In order to do that + * the kext bundle should have localized string files following the Mac OS X localization + * instructions. The IOAudioDevice should contain a property with the name of the bundle/kext + * that contains the localized string resources. To do that, the driver's personality in + * the bundle resources could have a property named 'IOAudioDeviceLocalizedBundle' with the path + * of the bundle/kext relative to '/System/Library/Extensions'. It could also be set by the + * IOAudioDevice subclass in its initHardware() function. To do so, call + * setProperty(kIOAudioDeviceLocalizedBundleKey, "Driver.kext"). + * + * In a typical driver, the IOAudioDevice subclass will implement initHardware() to perform the + * hardware initialization and driver construction. Within that initialization it must create at + * least one IOAudioEngine instance and activate it. In order to activate a new IOAudioEngine + * activateAudioEngine() should be called for each one. It must create the IOAudioControls + * matching the hardware capabilities to allow the system to set volume, mute and input selection. + * To add those controls to the driver, each control should be attached to the IOAudioEngine to + * which it applies by calling addDefaultAudioControl() on the IOAudioEngine. + * During initialization it should also call setDeviceName(), setDeviceShortName() and + * setManufacturerName() with localized strings representing each of the attributes. + * + * If the driver is to work properly after sleep/wake, it must implement performPowerStateChange() + * and deal with the sleep and wake transitions. It may also deal with the idle state transitions + * to turn off device power when it isn't in use (especially useful for devices attached to a + * portable running on battery power). + */ + +class IOAudioDevice : public IOService +{ + friend class IOAudioEngine; + + OSDeclareDefaultStructors(IOAudioDevice) + +protected: + /*! @var workLoop The IOWorkLoop for the driver - this is shared with the other objects in the driver */ + IOWorkLoop *workLoop; + /*! @var commandGate The IOCommandGate for this IOAudioDevice. It is attached to workLoop */ + IOCommandGate *commandGate; + /*! @var timerEventSource An IOTimerEventSource attached to workLoop used for the timer services */ + IOTimerEventSource *timerEventSource; + + /*! @var duringStartup State variable set to true while the driver is starting up and false all other times */ + bool duringStartup; + /*! @var familyManagePower Set to true if the family is supposed to manage power - this is the default state. It can be changed early in the initialization process with a call to setFamilyManagePower(). */ + bool familyManagePower; + /*! @var asyncPowerStateChangeInProgress Set to true while an asynchronous power change is pending and false all other times. */ + bool asyncPowerStateChangeInProgress; + + /*! @var numRunningAudioEngines The number of running IOAudioEngines. This is used to maintain idle vs active power state. */ + UInt32 numRunningAudioEngines; + + /*! @var currentPowerState Used to track the existing power state - can be fetched by calling getPowerState() */ + IOAudioDevicePowerState currentPowerState; + /*! @var pendingPowerState If a power state change is in progress, this represents the pending power state. All other times this is the same as the currentPowerState. */ + IOAudioDevicePowerState pendingPowerState; + + /*! @var audioEngines The set of IOAudioEngine objects vended by the IOAudioDevice. */ + OSArray * audioEngines; + /*! @var timerEvents The set of timer events in use by the device. + * @discussion The key for the dictionary is the target of the event. This means that a single target may + * have only a single event associated with it. + */ + OSDictionary * timerEvents; + /*! @var audioPorts The set of IOAudioPort objects associated with the IOAudioDevice */ + OSSet * audioPorts; + + /*! @var minimumInterval The smallest timer interval requested by all timer event targets. */ + AbsoluteTime minimumInterval; + /*! @var previousTimerFire The time of the last timer event. + * @discussion This is used to schedule the next timer event. + */ + AbsoluteTime previousTimerFire; + +public: + /*! @var gIOAudioPlane A static IORegistryPlane representing the new IOAudioPlane that the IOAudioFamily uses + * to represent the signal chain of the device. + */ + static const IORegistryPlane *gIOAudioPlane; + +protected: + struct ExpansionData { + unsigned long long idleSleepDelayTime; + IOTimerEventSource * idleTimer; + }; + + ExpansionData *reserved; + +public: + static void idleAudioSleepHandlerTimer(OSObject *owner, IOTimerEventSource *sender); + virtual IOReturn setAggressiveness(unsigned long type, unsigned long newLevel); + + // OSMetaClassDeclareReservedUsed(IOAudioDevice, 0); + virtual void setDeviceTransportType(const UInt32 transportType); + + // OSMetaClassDeclareReservedUsed(IOAudioDevice, 1); + /*! + * @function setIdleAudioSleepTime + * @abstract This function is to be called by a driver that doesn't want to be told about the audio + * going idle immediately, but at some point in the future. + * @discussion This is useful if the device will want to power down its hardware into an idle sleep + * state, but doesn't want to do that unless audio hasn't been used for a while. Calling this function + * immediately changes the idle sleep timer and queues it up if the idle is different from the previous + * idle time. The idle time defaults to 0, which means be called immediately (backwards compatible with + * previous versions of IOAudioFamily). A value of 0xffffffffffffffffULL means don't ever tell the + * driver about going idle. + * @param sleepDelay The amount of time, in nanoseconds, before the hardware should be told to go idle. + */ + virtual void setIdleAudioSleepTime(unsigned long long sleepDelay); + + // OSMetaClassDeclareReservedUsed(IOAudioDevice, 2); + virtual void scheduleIdleAudioSleep(void); + + // OSMetaClassDeclareReservedUsed(IOAudioDevice, 3); + /*! + * @function setConfigurationApplicationBundle + * @abstract This function is to be called if an external configuration application is available to set + * which application to launch. + * @discussion This is useful for device drivers that are too complex to be represented by the Sound Preferences + * panel. The bundle ID is a more flexible way of specifying where the application is than a hard coded path. + * @param bundleID The bundle ID of the application to be launched by the HAL for configuration of the device and its engine(s). + */ + virtual void setConfigurationApplicationBundle(const char *bundleID); + + // OSMetaClassDeclareReservedUsed(IOAudioDevice, 4); + /*! + * @function setDeviceCanBeDefault + * @abstract This function is to be called to tell CoreAudio if this device shouldn't be a default device. + * @discussion This is useful for device drivers that don't want to be a default device. Can be called with + * kIOAudioDeviceCanBeDefaultNothing to prevent CoreAudio from allowing this device to be any default device, or it + * can be called with any combination of kIOAudioDeviceCanBeDefaultInput, kIOAudioDeviceCanBeDefaultOutput, or + * kIOAudioDeviceCanBeSystemOutput. The default is + * (kIOAudioDeviceCanBeDefaultInput | kIOAudioDeviceCanBeDefaultOutput | kIOAudioDeviceCanBeSystemOutput). + * @param defaultsFlags The flags to instruct CoreAudio to allow this device to be only the indicated default devices. + */ + virtual void setDeviceCanBeDefault(UInt32 defaultsFlags); + + // OSMetaClassDeclareReservedUsed(IOAudioDevice, 5); + virtual void setDeviceModelName(const char * modelName); + +private: + OSMetaClassDeclareReservedUsed(IOAudioDevice, 0); + OSMetaClassDeclareReservedUsed(IOAudioDevice, 1); + OSMetaClassDeclareReservedUsed(IOAudioDevice, 2); + OSMetaClassDeclareReservedUsed(IOAudioDevice, 3); + OSMetaClassDeclareReservedUsed(IOAudioDevice, 4); + OSMetaClassDeclareReservedUsed(IOAudioDevice, 5); + + OSMetaClassDeclareReservedUnused(IOAudioDevice, 6); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 7); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 8); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 9); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 10); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 11); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 12); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 13); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 14); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 15); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 16); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 17); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 18); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 19); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 20); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 21); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 22); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 23); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 24); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 25); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 26); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 27); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 28); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 29); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 30); + OSMetaClassDeclareReservedUnused(IOAudioDevice, 31); + + +public: + // Initialization + + /*! + * @function init + * @abstract Initialize a newly created instance of IOAudioDevice. + * @discussion This implementation initializes all of the data structures and variables used by the + * IOAudioDevice. The currentPowerState and pendingPowerState variables are set to kIOAudioDeviceIdle. + * A subclass that overrides this method must call the superclass' implementation. + * @param properties An OSDictionary of the device properties that gets passed to super::init and set + * in the IORegistry. + * @result true if initialization was successful + */ + virtual bool init(OSDictionary *properties); + + /*! + * @function free + * @abstract Frees resources used by the IOAudioDevice instance + * @discussion This method will deactivate all audio audio engines and release the audioEngines OSSet. + * It will also deactivate all of the audio ports and release the audioPorts OSSet. It will release + * the timerEvents OSDictionary as well as cancel any outstanding timer callbacks. It will clean up + * all of the event sources and the workLoop. + * + * Do not call this directly. This is called automatically by the system when the instance's + * refcount goes to 0. To decrement the refcount, call release() on the object. + */ + + virtual void free(); + + /*! + * @function start + * @abstract This function is called automatically by the system to tell the driver to start vending + * services to the rest of the system. + * @discussion The start() implementation in IOAudioDevice starts by calling start() on its superclass. + * It then calls initHardware() which the subclass should override to properly initialize itself and + * the hardware. If that call succeeds, it sets up power management if the family is supposed to + * manage power (checking the familyManagePower variable). Then finally it calls registerService() + * to make the IOAudioDevice visible in the IORegistry. + * @param provider This is the service provider nub that provides access to the hardware resources. + * @result Returns true on success + */ + virtual bool start(IOService *provider); + + /*! + * @function stop + * @abstract This is responsible for stopping the device after the system is done with it (or + * if the device is removed from the system). + * @discussion The IOAudioDevice implentation of stop() disables the timer services, deactivates + * all of the audio audio engines and audio ports and stops power management of the device. + * The audio engine and port deactivation causes all of the audio engines to get stopped and + * all of the audio engine and port resources and objects to be released. A subclass' implementation + * may could shut down hardware here if necessary. If this function is overridden by a subclass, + * the superclass' implementation must be called. + * @param The service provider nub for the device. + */ + virtual void stop(IOService *provider); + virtual bool willTerminate(IOService *provider, IOOptionBits options); + + /*! + * @function initHardware + * @abstract This function is called by start() to provide a convenient place for the subclass to + * perform its initialization. + * @discussion In a typical implementation, a driver would implementation this function and perform + * a number of tasks. Those include mapping hardware resources, initializing the hardware to a known + * state, creating the IOAudioEngines, IOAudioControls and IOAudioStreams. Additionally it + * should also call setDeviceName(), setDeviceShortName(), setManufacturerName(). Upon return of + * this function, the device should be ready to begin vending services to the system. + * @param provider The service provider nub for the device. + * @result This function should return true on a successful initialization. + */ + virtual bool initHardware(IOService *provider); + + /*! + * @function setDeviceName + * @abstract Sets the name of the device + * @discussion This method should be called during initialization or startup. It should + * be set by the time initHardware() completes. The device name is used by the + * CoreAudio.framework to identify the particular piece of hardware. This string should + * should be localized by the driver. + */ + virtual void setDeviceName(const char *deviceName); + + /*! + * @function setDeviceShortName + * @abstract Sets the short name of the device + * @discussion The short name is a shorter representation of the device name. It may be used + * by applications when the device name is too long. It should be set by the time initHardware() + * completes. The string should be localized by the driver. + */ + virtual void setDeviceShortName(const char *shortName); + + /*! + * @function setManufacturerName + * @abstract Sets the manufacturer name of the device + * @discussion This method should be called during initialization or startup. This should be + * called by the time initHardware() completes. The string should be localized by the driver. + */ + virtual void setManufacturerName(const char *manufacturerName); + + + // IOWorkLoop, IOCommandGate management + + /*! + * @function getWorkLoop + * @abstract Returns the IOWorkLoop for the driver + * @discussion The IOWorkLoop is used to synchronized all critical aspects of the driver. This + * includes all entry points to the driver as well as power management. + */ + virtual IOWorkLoop *getWorkLoop() const; + + /*! + * @function getCommandGate + * @abstract Returns the IOCommandGate for this IOAudioDevice + * @discussion This IOCommandGate allows calls into this IOAudioDevice to be synchronized on + * the IOWorkLoop. + */ + virtual IOCommandGate *getCommandGate() const; + + + // IOAudioEngine management + + /*! + * @function activateAudioEngine + * @abstract This simply calls activateAudioEngine(IOAudioEngine *audioEngine, + * bool shouldStartAudioEngine) with a value of true for shouldStartAudioEngine. + * @param audioEngine The IOAudioEngine instance to be activated. It is treated as a newly + * allocated instance. + * @result Returns true if the audio engine was successfully activated. + */ + virtual IOReturn activateAudioEngine(IOAudioEngine *audioEngine); + + /*! + * @function activateAudioEngine + * @abstract This is called to add a new IOAudioEngine object to the IOAudioDevice. + * @discussion Once the IOAudioEngine has been activated by this function, it is ready + * to begin moving audio data. This should be called either during the subclass' initHardware() + * implementation for each IOAudioEngine the device creates. Or it should be called by + * the IOAudioEngine itself if the audio engine was automatically created by IOKit's matching + * process. The system won't be able to properly track and control IOAudioEngines if + * they are not activated though this function. + * This implementation will retain the IOAudioEngine while it maintains control of it. + * When the audio engine is deactivated, the IOAudioEngine will be released. If the + * IOAudioDevice subclass is passing a newly instantiated IOAudioEngine, it will need to release + * the audio engine after it has been activated. This will insure that the refCount on the audio engine + * is correct when it gets deactivated when the driver is stopped. That allows the audio engine to be + * freed when it is no longer needed. + * @param audioEngine The IOAudioEngine instance to be activated. + * @param shouldStartAudioEngine If true, the audio engine is treated as a newly allocated IOAudioEngine + * instance and is appropriately attached and started according to IOKit convention. If it is false + * it is assumed that some other process (possibly the IOKit matching process) has started the + * IOAudioEngine and will skip that step. + * @result Returns true if the audio engine was successfully activated. + */ + virtual IOReturn activateAudioEngine(IOAudioEngine *audioEngine, bool shouldStartAudioEngine); + + /*! + * @function deactivateAllAudioEngines + * @abstract Deactivates all of the audio engines in the device. + * @discussion This is called by the stop() and free() methods in IOAudioDevice to completely + * shut down all audio engines as the driver is being shut down. + */ + virtual void deactivateAllAudioEngines(); + + + // Power management + + /*! + * @function setFamilyManagePower + * @abstract Called set whether or not the family should manage the device power throught the + * IOService power management APIs. + * @discussion The default behavior is for the family to manage power. It is only necessary to + * call this function if the driver does not want the family to manage power. It is not + * recommended that this function be called because it makes power management much more + * difficult for the driver. If this function is to be called, it must be called before + * initHardware() completes. Immediately after initHardware() is called by start(), + * the power management system is initialized if the family is to manage power. + * @param manage Set to false if it is not desired that the family does the power management + */ + virtual void setFamilyManagePower(bool manage); + + /*! + * @function setPowerState + * @abstract Called by the power management system in IOService when the power state of this + * service needs to change. + * @discussion The default implementation of IOAudioDevice sets up two power states for IOService + * to use. State 0 is sleep and state 1 is wake. This function should not be called directly. + * It is only supposed to be used by the IOService power management services. + * @param powerStateOrdinal The number of the power state as defined by the IOAudioDevice - + * 0 for sleep, 1 for wake. + * @param device The power management policy maker. + * @result Returns kIOPMAckImplied (0) when the power state change is complete. Otherwise the an + * upper bound on the number of microseconds until the state change is complete is returned. + */ + virtual IOReturn setPowerState(unsigned long powerStateOrdinal, IOService *device); + + /*! + * @function setPowerStateAction + * @abstract IOCommandGate Action which calls protectedSetPowerState() while holding the IOCommandGate + * @discussion This is needed to allow protectedSetPowerState() to be called on the IOWorkLoop + * @param owner The owner of the IOCommandGate (the IOAudioDevice in this case) + * @param arg1 The powerStateOrdinal to be passed to protectedSetPowerState() + * @param arg2 The device to be passed to protectedSetPowerState() + * @result Returns the result of protectedSetPowerState() + */ + static IOReturn setPowerStateAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + + /*! + * @function protectedSetPowerState + * @abstract Called by setPowerStateAction() to deal with a power state change from the IOService + * power management facility. + * @discussion This function is responsible for performing the necessary sleep and wake tasks + * when the system is sleeping or waking. If an outstanding power state change is in progress, + * it will wait until the state changes has completed. While sleeping, all audio engines are + * stopped before calling initiatePowerStateChange() to call performPowerStateChange() to let + * the driver deal with the sleep request. When waking, it determines if the device should be + * idle or active and continues to call initiatePowerStateChange(). If initiatePowerStateChange() + * indicates that the power state change is occuring asynchronously, it returns the number of + * microseconds. This function must be called on the IOWorkLoop, but should not be called + * directly. + * @param powerStateOrdinal Param passed to setPowerState() - 0 for sleep, 1 for wake + * @param device Param passed to setPowerState - the device initiating the power state change + * @result Returns 0 if the power state change is complete - the number of microseconds until + * complete if its asynchronous. + */ + virtual IOReturn protectedSetPowerState(unsigned long powerStateOrdinal, IOService *device); + + /*! + * @function performPowerStateChange + * @abstract This function is called by the IOAudioDevice when a power state change is needed. + * @discussion In order to deal with power state changes, a subclass must override this function. + * Any combination of old and new power states may be passed to this function. If work is to + * be performed while transitioning to sleep, check for a newPowerState of kIOAudioDeviceSleep. + * If work is to be performed while transitioning from sleep, check for an oldPowerState of + * kIOAudioDeviceSleep. A power state of kIOAudioDeviceIdle means the system is awake, but + * no clients are currently playing or recording audio (i.e. no IOAudioEngines are active). + * A power state of kIOAudioDeviceActive means that at least one IOAudioEngine is active. + * It is possible for a power state change to be performed synchronously or asynchronously. + * In the case of a synchronous power state change, simple leave microsecondsUntilComplete + * alone and return kIOReturnSuccess. If an asynchronous power state change is needed the + * driver should do whatever needed to schedule another thread to finish the state change + * and set the microsecondsUntilComplete to an upper bound on the amount of time it will + * take to complete the power state change. Then when the power state change is complete, + * a call must be made to completePowerStateChange(). During an asynchronous power state + * change, the current power state will remain the same as before the transition began, + * and the pendingPowerState is set to the new power state that will be set when the + * change is complete. + * @param oldPowerState The power state before the power state change + * @param newPowerState The power state being transitioned to + * @param microsecondsUntilComplete A pointer to a value representing an upper bound on + * the number of microseconds to complete an asynchronous power state change. It points + * to a value of zero at the start and if it remains zero, the state change is complete + * upon a successful return from the function. + * @result Returns kIOReturnSuccess on a successful completion + */ + virtual IOReturn performPowerStateChange(IOAudioDevicePowerState oldPowerState, + IOAudioDevicePowerState newPowerState, + UInt32 *microsecondsUntilComplete); + + /*! + * @function completePowerStateChange + * @abstract Called when a power state change is complete + * @discussion In the case of an asynchronous power state change, a subclass is responsible + * for calling this function. It is safe to call this function if not on the IOWorkLoop. + * This function calls protectedCompletePowerStateChange() through the IOCommandGate and + * completePowerStateChangeAction(). If the call is already on the IOWorkLoop, it is safe + * to call protectedCompletePowerStateChange() directly. + * @result Returns kIOReturnSuccess on a successful completion + */ + virtual IOReturn completePowerStateChange(); + + /*! + * @function completePowerStateChangeAction + * @abstract IOCommandGate Action which calls protectedCompletePowerStateChange() while holding the + * IOCommandGate. + * @discussion This is needed to allow protectedCompletePowerStateChange() to be called on the IOWorkLoop. + * @param owner The owner of the IOCommandGate (the IOAudioDevice in this case) + * @result Returns the result of protectedCompletePowerStateChange() + */ + static IOReturn completePowerStateChangeAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + + /*! + * @function protectedCompletePowerStateChange() + * @abstract Called on the IOWorkLoop when a power state change is complete. + * @discussion This function does the work to complete a power state change (both synchronous and + * asynchronous). If the system is waking from sleep, the timer system is restarted and the + * audio engines are resumed. If this was called as a result of an asynchronous power state changed + * it makes the IOService power management call acknowledgePowerChange() and resets the + * asyncPowerStateChangeInProgress variable. Finally it sets the currentPowerState to the + * pendingPowerState. This function must be called on the IOWorkLoop. If a subclass is not + * on the IOWorkLoop (e.g. holding the IOCommandGate), call completePowerStateChange() instead. + * @result Returns kIOReturnSuccess on success + */ + virtual IOReturn protectedCompletePowerStateChange(); + + /*! + * @function getPowerState + * @abstract Returns the current power state (the old power state if a change is in progress). + * @result The current power state + */ + virtual IOAudioDevicePowerState getPowerState(); + + /*! + * @function getPendingPowerState + * @abstract Returns the pending power state if a state change is in progress. Otherwise it + * returns the current power state change. + * @result The pending power state + */ + virtual IOAudioDevicePowerState getPendingPowerState(); + + /*! + * @function waitForPendingPowerStateChange + * @abstract Called internally to wait until a pending power state change is complete. + * @discussion This is only used by internal functions to wait during pending power + * state changes. It is used to prevent multiple power state changes at the same time. + * This function must be called while holding the IOCommandGate. If an asynchronous + * power state change is in progress this function will block until the state change + * if complete. Once complete, it will return while still holding the IOCommandGate. + */ + virtual void waitForPendingPowerStateChange(); + + /*! + * @function initiatePowerStateChange + * @abstract Called internally to execute a power state change + * @discussion This function must be called on the IOWorkLoop. It calls performPowerStateChange() + * to let the driver process the state change. If the state change is completed synchronously + * by the driver (subclass) it calls protectedCompletePowerStateChange(). If done asynchronously + * it returns the microsecondsUntilComplete that was set by performPowerStateChange(). This + * function should not be called directly. + * @param microsecondsUntilComplete Pointer to the microsecondsUntilComplete that should be set + * by performPowerStateChange if an asynchronous power state change was started. + * @result Returns kIOReturnSuccess on success + */ + virtual IOReturn initiatePowerStateChange(UInt32 *microsecondsUntilComplete = NULL); + + + // IOAudioControl management + + /*! + * @function flushAudioControls + * @abstract Forces each IOAudioControl in the driver to have its value flushed out to the hardware. + * That will cause either the IOAudioControl's ValueChangeHandler to be called. + * @discussion This can be used to force the hardware to get updated with the current value + * of each control. It may be useful during wake for example. + */ + virtual void flushAudioControls(); + + + // Timer services + + /*! + * @typedef TimerEvent + * @abstract Generic timer event callback for IOAudioDevice timer targets + * @discussion TimerEvent callback function takes two arguments; the target of + * the timer event and the IOAudioDevice sending the event. + * @param target The target of the timer event - passed in when the timer event was registered + * @param audioDevice The IOAudioDevice sending the event + */ + typedef void (*TimerEvent)(OSObject *target, IOAudioDevice *audioDevice); + + /*! + * @function addTimerEvent + * @abstract Adds a TimerEvent callback for the given target called at least as often + * as specified in interval. + * @discussion The frequency of the timer event callbacks will be the smallest interval + * specified by all targets. Only one interval and callback may be specified per target. + * If a addTimerEvent is called twice with the same target, the second one overrides the + * first. There is currently a bug triggered if the first call had the smallest interval. + * In that case, that smallest interval would still be used. + * @param target This parameter is the target object of the TimerEvent. + * @param event The callback function called each time the timer fires. + * @param interval The callback will be called at least this often. + * @result Returns kIOReturnSuccess if the timer event was successfully added. + */ + virtual IOReturn addTimerEvent(OSObject *target, TimerEvent event, AbsoluteTime interval); + + /*! + * @function removeTimerEvent + * @abstract Removes the timer event for the given target. + * @discussion If the interval for the target to be removed is the smallest interval, + * the timer interval is recalculated based on the remaining targets. The next fire + * time is readjusted based on the new interval compared to the last fire time. + * @param target The target whose timer event will be removed. + */ + virtual void removeTimerEvent(OSObject *target); + + /*! + * @function removeAllTimerEvents + * @abstract Removes all timer events and stops the timer + * @discussion Called during teardown of the driver + */ + virtual void removeAllTimerEvents(); + + + // IOAudioPort management + + /*! + * @function attachAudioPort + * @abstract Adds the port to the IOAudioDevice's list of ports and attaches the port to its parent + * and attaches the child to the port. + * @discussion This function provides the functionality to represent the device's signal chain in the + * IOAudioPlane in the IORegistry. An IOAudioPort's parent(s) are before it in the signal chain + * and its children are after it. This method may be called multiple times for a single IOAudioPort. + * This is necessary when there are many children or parents. Once a relationship is made, it is not + * necessary to make the reverse relationship. A NULL value may be passed in for either the parent + * or child or both. + * The IOAudioPort passed in should be a newly allocated IOAudioPort instance. This function will + * appropriately attach and start the port object. NOTE: It is not necessary to use IOAudioPorts + * in a fully functional audio driver. + * @param port The newly created IOAudioPort instance to be activated. + * @param parent A parent IOAudioPort or IOAudioEngine of the given port. + * @param child A child IOAudioPort or IOAudioEngine of the given port. + * @result Returns true when the port has been successfully added and attached. + */ + virtual IOReturn attachAudioPort(IOAudioPort *port, IORegistryEntry *parent, IORegistryEntry *child); + + /*! + * @function detachAllAudioPorts + * @abstract Deactivates all of the ports in the device. + * @discussion This is called by the stop() and free() methods in IOAudioDevice to completely + * shut down all ports as the driver is being shut down. + */ + virtual void detachAllAudioPorts(); + +protected: + /*! + * @function timerFired + * @abstract Internal static function called when the timer fires. + * @discussion This function simply calls dispatchTimerEvents() on the IOAudioDevice to do just that. + * @param target The IOAudioDevice instance that initiated the timer callback. + * @param sender The IOTimerEventSources calling this callback + */ + static void timerFired(OSObject *target, IOTimerEventSource *sender); + + /*! + * @function dispatchTimerEvents + * @abstract Called by timerFired() to cause the timer event callbacks to be called. + * @discussion This method iterates through all of the timer event targets and calls + * the callback on each. Unless the force flag is set to true, the timer events will + * only be dispatched if the power state is not kIOAudioDeviceSleep. This prevents + * unexpected timer firings while making wake->sleep->wake transitions. This function must + * be called on the IOWorkLoop. + * @function force A bool param to allow the timer events to be dispatched even if the + * device is in the kIOAudioDeviceSleep power state. + */ + virtual void dispatchTimerEvents(bool force); + + /*! + * @function audioEngineStarting + * @abstract Called by IOAudioEngine when it is starting up + * @discussion This should only be called while on the IOWorkLoop. It is not intended to be called + * directly. It is called when an IOAudioEngine is starting up to allow the IOAudioDevice + * to keep track of running audio engines and change the power state from kIOAudioDeviceIdle to + * kIOAudioDeviceActive when the first audio engine starts up. If the state change is done + * asynchronously, it waits for the state change to complete. This is to ensure that the + * system doesn't start playing audio until the IOAudioDevice has completed its transition + * to kIOAudioDeviceActive. + */ + virtual void audioEngineStarting(); + + /*! + * @function audioEngineStopped + * @abstract Called by IOAudioEngine when it has stopped + * @discussion This should only be called while on the IOWorkLoop. It is not intended to be called + * directly. It is called when an IOAudioEngine has stopped to allow the IOAudioDevice + * to keep track of running audio engines and change the power state from kIOAudioDeviceActive + * to kIOAudioDeviceIdle when the last audio engine stops. If the state change is done + * asynchronously, it waits for the state change to complete. + */ + virtual void audioEngineStopped(); + +}; + +#endif /* _IOKIT_IOAUDIODEVICE_H */ diff --git a/i386/include/IOKit/audio/IOAudioEngine.h b/i386/include/IOKit/audio/IOAudioEngine.h new file mode 100644 index 0000000..19477b5 --- /dev/null +++ b/i386/include/IOKit/audio/IOAudioEngine.h @@ -0,0 +1,865 @@ +/* + * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOAudioEngine + */ + +#ifndef _IOKIT_IOAUDIOENGINE_H +#define _IOKIT_IOAUDIOENGINE_H + +#include + +#ifndef IOAUDIOFAMILY_SELF_BUILD +#include +#else +#include "IOAudioTypes.h" +#endif +#include + +class OSDictionary; +class OSCollection; +class OSOrderedSet; +class IOAudioEngineUserClient; +class IOAudioDevice; +class IOAudioStream; +class IOAudioControl; +class IOCommandGate; + +#define IOAUDIOENGINE_DEFAULT_NUM_ERASES_PER_BUFFER 4 + +/*! + * @typedef IOAudioEnginePosition + * @abstract Represents a position in an audio audio engine. + * @discussion This position is based on the sample frame within a + * loop around the sample buffer, and the loop count which starts at 0 when the audio engine + * begins playback. + * @field fSampleFrame The sample frame within the buffer - starts at 0. + * @field fLoopCount The number of times the ring buffer has looped. + */ +typedef struct { + UInt32 fSampleFrame; + UInt32 fLoopCount; +} IOAudioEnginePosition; + +#define CMP_IOAUDIOENGINEPOSITION(p1, p2) \ + (((p1)->fLoopCount > (p2)->fLoopCount) ? 1 : \ + ((p1)->fLoopCount == (p2)->fLoopCount) && ((p1)->fSampleFrame > (p2)->fSampleFrame) ? 1 : \ + ((p1)->fLoopCount == (p2)->fLoopCount) && ((p1)->fSampleFrame == (p2)->fSampleFrame) ? 0 : -1) + +#define IOAUDIOENGINEPOSITION_IS_ZERO(p1) (((p1)->fLoopCount == 0) && ((p1)->fSampleFrame == 0)) + +/*! + * @class IOAudioEngine + * @abstract Abstract base class for a single audio audio / I/O engine. + * @discussion An IOAudioEngine is defined by a single I/O engine to transfer data to + * or from one or more sample buffers. Each sample buffer is represented by a single IOAudioStream + * instance. A single IOAudioEngine must contain at least one IOAudioStream, but has no upper + * limit on the number of IOAudioStreams it may contain. An IOAudioEngine instance may contain + * both input and output IOAudioStreams. + * + * An audio driver must subclass IOAudioEngine in order to provide certain services. An + * IOAudioEngine subclass must start and stop the I/O engine when requested. The I/O + * engine should be continuously running and loop around from end to beginning. While the audio + * engine is running, it must take a timestamp as the sample buffer(s) wrap around and start at + * the beginning. The CoreAudio.framework uses the timestamp to calculate the exact position of + * the audio engine. An IOAudioEngine subclass must implement getCurrentSampleFrame() to provide + * a sample position on demand. Finally, an IOAudioEngine subclass must provide clipping and + * format conversion routines to go to/from the CoreAudio.framework's native float format. + * + * If multiple stream formats or sample rates are allowed, the IOAudioEngine + * subclass must provide support for changing the hardware when a format or sample rate is + * changed. + * + * There are several attributes associated with a single IOAudioEngine: + * + * The IOAudioEngine superclass provides a shared status buffer that contains all of the dynamic pieces + * of information about the audio engine (type IOAudioEngineStatus). It runs an erase process on + * all of the output streams. The erase head is used to zero out the mix and sample buffers after + * the samples have been played. Additionally, the IOAudioEngine superclass handles the + * communication with the CoreAudio.framework and makes the decision to start and stop the + * audio engine when it detects it is in use. + * + * In order for an audio device to play back or record sound, an IOAudioEngine subclass must be created. + * The subclass must initialize all of the necessary hardware resources to prepare for starting the + * audio I/O engine. It typically will perform these tasks in the initHardware() method. A subclass + * may also implement a stop() method which is called as the driver is being torn down. This is + * typically called in preparation of removing the device from the system for removable devices. + * + * In addition to initializing the necessary hardware, there are a number of other tasks an + * IOAudioEngine must do during initHardware(). It must create the necessary IOAudioStream objects + * to match the device capabilities. Each IOAudioStream must be added using addAudioStream(). It + * also should create the IOAudioControls needed to control the various attributes of the audio engine: + * output volume, mute, input gain, input selection, analog passthru. To do that, addDefaultAudioControl() + * should be called with each IOAudioControl to be attached to the IOAudioEngine. In order to provide + * for proper synchronization, the latency of the audio engine should be specified with setSampleLatency(). + * This value represents the latency between the timestamp taken at the beginning of the buffer and + * when the audio is actually played (or recorded) by the device. If a device is block based or if + * there is a need to keep the CoreAudio.framework a certain number of samples ahead of (or behind for + * input) the I/O head, that value should be specified using setSampleOffset(). If this is not specified + * the CoreAudio.framework may attempt to get as close to the I/O head as possible. + * + * The following fields in the shared IOAudioEngineStatus struct must be maintained by the subclass + * implementation: + *
+ *    fCurrentLoopCount - the number of times the sample buffer has wrapped around to the beginning
+ *    fLastLoopTime - timestamp of the most recent time that the I/O engine looped back to the 
+ *  beginning of the sample buffer
+ *  
+ * It is critically important that the fLastLoopTime field be as accurate as possible. It is + * the basis for the entire timer and synchronization mechanism used by the audio system. + * + * At init time, the IOAudioEngine subclass must call setNumSampleFramesPerBuffer() to indicate how large + * each of the sample buffers are (measured in sample frames). Within a single IOAudioEngine, all sample + * buffers must be the same size and be running at the same sample rate. If different buffers/streams can + * be run at different rates, separate IOAudioEngines should be used. The IOAudioEngine subclass must + * also call setSampleRate() at init time to indicate the starting sample rate of the device. + * + */ + +class IOAudioEngine : public IOService +{ + OSDeclareAbstractStructors(IOAudioEngine) + + friend class IOAudioEngineUserClient; + friend class IOAudioDevice; + friend class IOAudioStream; + +public: + /*! @var gSampleRateWholeNumberKey */ + static const OSSymbol *gSampleRateWholeNumberKey; + /*! @var gSampleRateFractionKey */ + static const OSSymbol *gSampleRateFractionKey; + + /*! @var numSampleFramesPerBuffer */ + UInt32 numSampleFramesPerBuffer; + + /*! @var sampleRate + * The current sample rate of the audio engine in samples per second. */ + IOAudioSampleRate sampleRate; + + /*! @var numErasesPerBuffer + * The number of times the erase head get scheduled to run for each + * cycle of the audio engine. */ + UInt32 numErasesPerBuffer; + /*! @var runEraseHead + * Set to true if the erase head is to run when the audio engine is running. This is the case if there are any output streams. */ + bool runEraseHead; + + /*! @var audioEngineStopPosition + * When all clients have disconnected, this is set to one buffer length past the + * current audio engine position at the time. Then when the stop position is reached, the audio engine + * is stopped */ + IOAudioEnginePosition audioEngineStopPosition; + + /*! @var isRegistered + * Internal state variable to keep track or whether registerService() has been called. */ + bool isRegistered; + /*! @var configurationChangeInProgress + * Set to true after beginConfigurationChange() and false upon a + * subsequent call to completeConfigurationChange() or cancelConfigurationChange(). */ + bool configurationChangeInProgress; + + /*! @var state + * The current state of the IOAudioEngine - running, stopped, paused. */ + IOAudioEngineState state; + + /*! @var status + * Status struct shared with the CoreAudio.framework. */ + IOAudioEngineStatus * status; + + /*! @var audioDevice + * The IOAudioDevice instance to which the IOAudioEngine belongs. */ + IOAudioDevice * audioDevice; + + /*! @var workLoop + * The IOWorkLoop for the audio driver - shared with the IOAudioDevice. */ + IOWorkLoop *workLoop; + /*! @var commandGate + * The IOCommandGate for this audio engine - attached to the driver's IOWorkLoop. */ + IOCommandGate *commandGate; + + /*! @var inputStreams + * An OSSet of all of the input IOAudioStreams attached to this IOAudioEngine. */ + OSOrderedSet *inputStreams; + UInt32 maxNumInputChannels; + /*! @var outputStreams + * An OSSet of all of the output IOAudioStreams attached to this IOAudioEngine. */ + OSOrderedSet *outputStreams; + UInt32 maxNumOutputChannels; + /*! @var userClients + * An OSSet of all of the currently connected user clients. */ + OSSet *userClients; + /*! @var defaultAudioControls + * All of the IOAudioControls that affect this audio engine. */ + OSSet *defaultAudioControls; + + /*! @var numActiveUserClients + * A total of the active user clients - those that are currently playing or + * recording audio. */ + UInt32 numActiveUserClients; + UInt32 sampleOffset; // used for input and output if inputSampleOffset is not set, if inputSampleOffset is set used as output only + + UInt32 index; + bool duringStartup; + +protected: + + /*! + * @var deviceStartedAudioEngine + * Used by the IOAudioDevice to determine responsibility for shutting + * the audio engine down when it is no longer needed. + */ + bool deviceStartedAudioEngine; + +protected: + struct ExpansionData { + UInt32 pauseCount; + IOBufferMemoryDescriptor *statusDescriptor; + IOBufferMemoryDescriptor *bytesInInputBufferArrayDescriptor; + IOBufferMemoryDescriptor *bytesInOutputBufferArrayDescriptor; + UInt32 mixClipOverhead; + OSArray *streams; + UInt32 inputSampleOffset; + }; + + ExpansionData *reserved; + +// static UInt32 sInstanceCount; + +public: + // OSMetaClassDeclareReservedUsed(IOAudioEngine, 0); + virtual IOReturn performFormatChange(IOAudioStream *audioStream, const IOAudioStreamFormat *newFormat, const IOAudioStreamFormatExtension *formatExtension, const IOAudioSampleRate *newSampleRate); + // OSMetaClassDeclareReservedUsed(IOAudioEngine, 1); + virtual IOBufferMemoryDescriptor * getStatusDescriptor(); + // OSMetaClassDeclareReservedUsed(IOAudioEngine, 2); + virtual IOReturn getNearestStartTime(IOAudioStream *audioStream, IOAudioTimeStamp *ioTimeStamp, bool isInput); + // OSMetaClassDeclareReservedUsed(IOAudioEngine, 3); + virtual IOBufferMemoryDescriptor * getBytesInInputBufferArrayDescriptor(); + // OSMetaClassDeclareReservedUsed(IOAudioEngine, 4); + virtual IOBufferMemoryDescriptor * getBytesInOutputBufferArrayDescriptor(); + // OSMetaClassDeclareReservedUsed(IOAudioEngine, 5); + /*! + * @function eraseOutputSamples + * @abstract This function allows for the actual erasing of the mix and sample buffer to be overridden by + * a child class. + * @param mixBuf Pointer to the IOAudioFamily allocated mix buffer. + * @param sampleBuf Pointer to the child class' sample buffer. + * @param firstSampleFrame Index to the first sample frame to erase. + * @param numSampleFrames Number of sample frames to erase. + * @param streamFormat Format of the data to be erased. + * @param audioStream Pointer to stream object that corresponds to the sample buffer being erased. + * @result Must return kIOReturnSuccess if the samples have been erased. + */ + virtual IOReturn eraseOutputSamples(const void *mixBuf, void *sampleBuf, UInt32 firstSampleFrame, UInt32 numSampleFrames, const IOAudioStreamFormat *streamFormat, IOAudioStream *audioStream); + // OSMetaClassDeclareReservedUsed(IOAudioEngine, 6); + /*! + * @function setClockIsStable + * @abstract This function sets a flag that CoreAudio uses to select its sample rate tracking algorithm. Set + * this to TRUE unless that results in dropped audio. If the driver is experiencing unexplained dropouts + * setting this FALSE might help. + * @param clockIsStable TRUE tells CoreAudio to use an agressive PLL to quickly lock to the engine's sample rate + * while FALSE tells CoreAudio to adjust more slowly to perceived sample rate changes that might just be the + * result of an unstable clock. + */ + virtual void setClockIsStable(bool clockIsStable); + + // OSMetaClassDeclareReservedUsed(IOAudioEngine, 7); + /*! + * @function setMixClipOverhead + * @abstract Used to tell IOAudioFamily when the watchdog timer must fire by. + * @discussion setMixClipOverhead allows an audio engine to tell IOAudioFamily how much time + * an engine will take to mix and clip its samples, in percent. + * The default value is 10, meaning 10%. This will cause IOAudioFamily to make + * the watchdog timer fire when there is just over 10% of the time to complete + * a buffer set left (e.g. 51 samples when the HAL is using a buffer size of 512 + * samples). + * @param newMixClipOverhead How much time per buffer should be made available for the + * mix and clip routines to run. Valid values are 1 through 99, inclusive. + * @result return no error + */ + virtual void setMixClipOverhead(UInt32 newMixClipOverhead); + + // OSMetaClassDeclareReservedUsed(IOAudioEngine, 8); + /*! + * @function setClockDomain + * @abstract Sets a property that CoreAudio uses to determine how devices are synchronized. If an audio device can tell that it is + * synchronized to another engine, it should set this value to that engine's clock domain. If an audio device can be a clock master, it may publish + * its own clock domain for other devices to use. + * @param clockDomain is the unique ID of another engine that this engine realizes it is synchronized to, use the default value kIOAudioNewClockDomain + * to have IOAudioEngine create a unique clock domain. + */ + virtual void setClockDomain(UInt32 clockDomain = kIOAudioNewClockDomain); + + // OSMetaClassDeclareReservedUsed(IOAudioEngine, 9); + /*! + * @function convertInputSamplesVBR + * @abstract Override this method if you want to return a different number of sample frames than was requested. + */ + virtual IOReturn convertInputSamplesVBR(const void *sampleBuf, void *destBuf, UInt32 firstSampleFrame, UInt32 &numSampleFrames, const IOAudioStreamFormat *streamFormat, IOAudioStream *audioStream); + + // OSMetaClassDeclareReservedUsed(IOAudioEngine, 10); + /*! + * @function setInputSampleOffset + * @abstract set the offset CoreAudio will read from off the current read pointer + * @param numSamples size of offset in sample + */ + virtual void setInputSampleOffset(UInt32 numSamples); + + // OSMetaClassDeclareReservedUsed(IOAudioEngine, 11); + /*! + * @function setOutputSampleOffset + * @abstract set the offset CoreAudio will write at off the current write pointer + * @param numSamples size of offset in sample + */ + virtual void setOutputSampleOffset(UInt32 numSamples); + +protected: + + // OSMetaClassDeclareReservedUsed(IOAudioEngine, 12); + virtual IOReturn createUserClient(task_t task, void *securityID, UInt32 type, IOAudioEngineUserClient **newUserClient, OSDictionary *properties); + +public: + + // OSMetaClassDeclareReservedUsed(IOAudioEngine, 13); + /*! + * @function setAttributeForConnection + * @abstract Generic method to set some attribute of the audio engine, specific to one connection. + * @discussion IOAudioEngine subclasses may implement this method to allow arbitrary attribute/value pairs to be set, specific to one connection. + * @param attribute Defines the attribute to be set. + * @param value The new value for the attribute. + * @result an IOReturn code. + */ + + virtual IOReturn setAttributeForConnection( SInt32 connectIndex, UInt32 attribute, uintptr_t value ); + + // OSMetaClassDeclareReservedUsed(IOAudioEngine, 14); + /*! @function getAttributeForConnection + * @abstract Generic method to retrieve some attribute of the audio engine, specific to one connection. + * @discussion IOAudioEngine subclasses may implement this method to allow arbitrary attribute/value pairs to be returned, specific to one connection. + * @param attribute Defines the attribute to be returned. Some defined attributes are:
+ * @param value Returns the value for the attribute. + * @result an IOReturn code. + */ + + virtual IOReturn getAttributeForConnection( SInt32 connectIndex, UInt32 attribute, uintptr_t * value ); + +private: + OSMetaClassDeclareReservedUsed(IOAudioEngine, 0); + OSMetaClassDeclareReservedUsed(IOAudioEngine, 1); + OSMetaClassDeclareReservedUsed(IOAudioEngine, 2); + OSMetaClassDeclareReservedUsed(IOAudioEngine, 3); + OSMetaClassDeclareReservedUsed(IOAudioEngine, 4); + OSMetaClassDeclareReservedUsed(IOAudioEngine, 5); + OSMetaClassDeclareReservedUsed(IOAudioEngine, 6); + OSMetaClassDeclareReservedUsed(IOAudioEngine, 7); + OSMetaClassDeclareReservedUsed(IOAudioEngine, 8); + OSMetaClassDeclareReservedUsed(IOAudioEngine, 9); + OSMetaClassDeclareReservedUsed(IOAudioEngine, 10); + OSMetaClassDeclareReservedUsed(IOAudioEngine, 11); + OSMetaClassDeclareReservedUsed(IOAudioEngine, 12); + OSMetaClassDeclareReservedUsed(IOAudioEngine, 13); + OSMetaClassDeclareReservedUsed(IOAudioEngine, 14); + + OSMetaClassDeclareReservedUnused(IOAudioEngine, 15); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 16); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 17); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 18); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 19); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 20); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 21); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 22); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 23); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 24); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 25); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 26); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 27); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 28); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 29); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 30); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 31); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 32); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 33); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 34); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 35); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 36); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 37); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 38); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 39); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 40); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 41); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 42); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 43); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 44); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 45); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 46); + OSMetaClassDeclareReservedUnused(IOAudioEngine, 47); + +public: + /*! + * @function createDictionaryFromSampleRate + * @abstract Generates a dictionary matching the given sample rate. + * @discussion This is an internal routine used to generate a dictionary matching the given sample rate. It is used to generate a sample rate dictionary for the I/O Registry - used by the + * CoreAudio.framework. + * @result Returns the newly create OSDictionary. + */ + static OSDictionary *createDictionaryFromSampleRate(const IOAudioSampleRate *sampleRate, OSDictionary *rateDict = 0); + + /*! + * @function createSampleRateFromDictionary + * @abstract Generates a sample rate from an OSDictionary. + * @discussion This is an internal routine used to generate a sample rate from an OSDictionary. It is used to generate a sample rate give a new OSDictionary from the IORegistry - coming + * from the CoreAudio.framework. + * @result Returns the sample rate. + */ + static IOAudioSampleRate *createSampleRateFromDictionary(const OSDictionary *rateDict, IOAudioSampleRate *sampleRate = 0); + + /*! + * @function init + * @abstract Performs initialization of a newly allocated IOAudioEngine. + * @discussion This function is responsible for initialization of all of the general attributes of + * a new IOAudioEngine. It initializes instance variables to their default + * values and allocates the shared status buffer. Subclasses will likely want to override this method + * and do all of their common initialization in their implementation. They do need to be sure to call + * IOAudioEngine's implementation of init and pay attention to the return value. + * @param properties The default properties for the IOAudioEngine. + * @result Returns true if initialization was successful. + */ + virtual bool init(OSDictionary *properties); + + /*! + * @function free + * @abstract Frees all of the resources allocated by the IOAudioEngine. + * @discussion Do not call this directly. This is called automatically by the system when the instance's + * refcount goes to 0. To decrement the refcount, call release() on the object. + */ + virtual void free(); + + /*! + * @function getWorkLoop + * @abstract Returns the IOWorkLoop for the driver. + */ + virtual IOWorkLoop *getWorkLoop() const; + + /*! + * @function getCommandGate + * @abstract Returns the IOCommandGate for this IOAudioEngine. + */ + virtual IOCommandGate *getCommandGate() const; + + /*! + * @function start + * @abstract A simple cover function for start(IOService *, IOAudioDevice *) that assumes the provider + * is the IOAudioDevice. + * @discussion Subclasses will want to override start(IOService *, IOAudioDevice *) rather than this + * one. + * @param provider The service provider for the IOAudioEngine (the IOAudioDevice in this case). + * @result Returns true if the IOAudioEngine was successfully started. + */ + virtual bool start(IOService *provider); + + /*! + * @function start + * @abstract Standard IOKit start() routine called to start an IOService. + * @discussion This function is called in order to prepare the IOAudioEngine for use. It does NOT + * mean that the audio I/O engine itself should be started. This implementation gets the IOWorkLoop + * from the IOAudioDevice and allocates an IOCommandGate. Finally it calls initHardware() in which + * all of the subclass-specific device initialization should be done. Upon return from initHardware() + * all IOAudioStreams should be created and added to the audio engine. Also, all IOAudioControls + * for this IOAudioEngine should be created and attached. + * @param provider The service provider for the IOAudioEngine. + * @param device The IOAudioDevice to which this IOAudioEngine belongs. + * @result Returns true if the service was successfully started. + */ + virtual bool start(IOService *provider, IOAudioDevice *device); + + /*! + * @function initHardware + * @abstract This function is called by start() to provide a convenient place for the subclass to + * perform its hardware initialization. + * @discussion Upon return from this function, all IOAudioStreams and IOAudioControls should be created + * and the audio engine should be ready to be started when a client requests that playback begin. + * @function provider The service provider numb for this audio engine - typically the IOAudioDevice. + * @result Returns true if the hardware was successfully initialized. + */ + virtual bool initHardware(IOService *provider); + + /*! + * @function stop + * @abstract Stops the service and prepares for the driver to be terminated. + * @discussion This function is called before the driver is terminated and usually means that the device + * has been removed from the system. + * @param provider The service provider for the IOAudioEngine. + */ + virtual void stop(IOService *provider); + + /*! + * @function registerService + * @abstract Called when this audio engine is ready to begin vending services. + * @discussion This function is called by IOAudioDevice::activateAudioEngine() once the audio engine + * has been fully initialized and is ready to begin audio playback. + * @param options + */ + virtual void registerService(IOOptionBits options = 0); + + virtual void setAudioDevice(IOAudioDevice *device); + virtual void setIndex(UInt32 index); + + virtual void setDescription(const char *description); + + /*! + * @function newUserClient + * @abstract Requests a new user client object for this service. + * @discussion This function is called automatically by I/O Kit when a user process attempts + * to connect to this service. It allocates a new IOAudioEngineUserClient object and increments + * the number of connections for this audio engine. If this is the first user client for this IOAudioEngine, + * it calls startAudioEngine(). There is no need to call this function directly. + * A derived class that requires overriding of newUserClient should override the version with the properties + * parameter for Intel targets, and without the properties parameter for PPC targets. The #if __i386__ directive + * can be used to select between the two behaviors. + * @param task The task requesting the new user client. + * @param securityID Optional security paramater passed in by the client - ignored. + * @param type Optional user client type passed in by the client - ignored. + * @param handler The new IOUserClient * must be stored in this param on a successful completion. + * @param properties A dictionary of additional properties for the connection. + * @result Returns kIOReturnSuccess on success. May also result kIOReturnError or kIOReturnNoMemory. + */ + virtual IOReturn newUserClient(task_t task, void *securityID, UInt32 type, IOUserClient **handler); + virtual IOReturn newUserClient(task_t task, void *securityID, UInt32 type, OSDictionary *properties, IOUserClient **handler); + + /*! + * @function addAudioStream + * @abstract Adds an IOAudioStream to the audio engine. + * @discussion This function is called by the driver to add an IOAudioStream to the audio engine. This must be called at least once to make sure the audio engine has at least one IOAudioStream. + * @param stream The IOAudioStream to be added. + * @result Returns kIOReturnSuccess if the stream was successfully added. + */ + virtual IOReturn addAudioStream(IOAudioStream *stream); + + virtual IOAudioStream *getAudioStream(IOAudioStreamDirection direction, UInt32 channelID); + + virtual void lockAllStreams(); + virtual void unlockAllStreams(); + + virtual void updateChannelNumbers(); + + /*! + * @function resetStatusBuffer + * @abstract Resets the status buffer to its default values. + * @discussion This is called during startAudioEngine() and resumeAudioEngine() to clear out the status buffer + * in preparation of starting up the I/O engine. There is no need to call this directly. + */ + virtual void resetStatusBuffer(); + + /*! + * @function clearAllSampleBuffers + * @abstract Zeros out all of the sample and mix buffers associated with the IOAudioEngine + * @discussion This is called during resumeAudioEngine() since the audio engine gets started back at the + * beginning of the sample buffer. + */ + virtual void clearAllSampleBuffers(); + + /*! + * @function getCurrentSampleFrame + * @abstract Gets the current sample frame from the IOAudioEngine subclass. + * @result + */ + virtual UInt32 getCurrentSampleFrame() = 0; + + /*! + * @function startAudioEngine + * @abstract Starts the audio I/O engine. + * @discussion This method is called automatically when the audio engine is placed into use the first time. + * This must be overridden by the subclass. No call to the superclass's implementation is + * necessary. The subclass's implementation must start up the audio I/O engine. This includes any audio + * engine that needs to be started as well as any interrupts that need to be enabled. Upon successfully + * starting the engine, the subclass's implementation must call setState(kIOAudioEngineRunning). If + * it has also checked the state using getState() earlier in the implementation, the stateLock must be + * acquired for the entire initialization process (using IORecursiveLockLock(stateLock) and + * IORecursiveLockUnlock(stateLock)) to ensure that the state remains consistent. See the general class + * comments for an example. + * @result Must return kIOReturnSuccess on a successful start of the engine. + */ + virtual IOReturn startAudioEngine(); + + /*! + * @function stopAudioEngine + * @abstract Stops the audio I/O engine. + * @discussion This method is called automatically when the last client disconnects from this audio engine. + * It must be overridden by the subclass. No call to the superclass's implementation is necessary. + * The subclass's implementation must stop the audio I/O engine. The audio engine (if it exists) should + * be stopped and any interrupts disabled. Upon successfully stopping the engine, the subclass must call + * setState(kAudioEngineStopped). If it has also checked the state using getState() earlier in the + * implementation, the stateLock must be acquired for the entire initialization process (using + * IORecursiveLockLock(stateLock) and IORecursiveLockUnlock(stateLock)) to ensure that the state remains + * consistent. + * @result Must return kIOReturnSuccess on a successful stop of the engine. + */ + virtual IOReturn stopAudioEngine(); + virtual IOReturn pauseAudioEngine(); + virtual IOReturn resumeAudioEngine(); + + /*! + * @function performAudioEngineStart + * @abstract Called to start the audio I/O engine + * @discussion This method is called by startAudioEngine(). This must be overridden by the subclass. + * No call to the superclass' implementation is necessary. The subclass' implementation must start up the + * audio I/O engine. This includes any audio engine that needs to be started as well as any interrupts + * that need to be enabled. + * @result Must return kIOReturnSuccess on a successful start of the engine. + */ + virtual IOReturn performAudioEngineStart(); + + /*! + * @function performAudioEngineStop + * @abstract Called to stop the audio I/O engine + * @discussion This method is called by stopAudioEngine() and pauseAudioEngine. + * This must be overridden by the subclass. No call to the superclass' implementation is + * necessary. The subclass' implementation must stop the audio I/O engine. This includes any audio + * engine that needs to be stopped as well as any interrupts that need to be disabled. + * @result Must return kIOReturnSuccess on a successful stop of the engine. + */ + virtual IOReturn performAudioEngineStop(); + + /*! + * @function getState + * @abstract Returns the current state of the IOAudioEngine. + * @discussion If this method is called in preparation for calling setState(), the stateLock must + * be acquired before the first call to getState() and held until after the last call to setState(). + * Be careful not to return from the code acquiring the lock while the lock is being held. That + * will cause a deadlock situation. + * @result The current state of the IOAudioEngine: kIOAudioEngineRunning, kIOAudioEngineStopped. + */ + virtual IOAudioEngineState getState(); + + /*! + * @function getSampleRate + * @abstract Returns the sample rate of the IOAudioEngine in samples per second. + */ + virtual const IOAudioSampleRate *getSampleRate(); + + virtual IOReturn hardwareSampleRateChanged(const IOAudioSampleRate *sampleRate); + + /*! + * @function getRunEraseHead + * @abstract Returns true if the audio engine will run the erase head when the audio engine is running. + */ + virtual bool getRunEraseHead(); + + /*! + * @function getStatus + * @abstract Returns a pointer to the shared status buffer. + */ + virtual const IOAudioEngineStatus *getStatus(); + + /*! + * @function timerCallback + * @abstract A static method used as a callback for the IOAudioDevice timer services. + * @discussion This method implements the IOAudioDevice::TimerEvent type. + * @param arg1 The IOAudioEngine that is the target of the event. + * @param device The IOAudioDevice that sent the timer event. + */ + static void timerCallback(OSObject *arg1, IOAudioDevice *device); + + /*! + * @function timerFired + * @abstract Indicates the timer has fired. + * @discussion This method is called by timerCallback to indicate the timer has fired. This method calls performErase() and performFlush() to do erase head processing and + * audio engine flushing each time the timer event fires. + */ + virtual void timerFired(); + + /*! + * @function getTimerInterval + * @abstract Gets the timer interval for use by the timer event. + * @discussion This method is called each time the timer event is enabled through addTimer(). The default + * implementation is set to return a value such that the timer event runs n times each cycle of the audio + * engine through the sample buffer. The value n is stored as the instance variable: numErasesPerBuffer. + * The default value of numErasesPerBuffer is set to IOAUDIOENGINE_DEFAULT_NUM_ERASES_PER_BUFFER which is 4. + * A subclass may change the value of numErasesPerBuffer or override getTimerInterval. If it is overridden, + * the subclass should call the superclass's implementation, compare its interval with the superclass's and + * return the smaller of the two. + * @result Returns the interval for the timer event. + */ + virtual AbsoluteTime getTimerInterval(); + + /*! + * @function performErase + * @abstract Performs erase head processing. + * @discussion This method is called automatically each time the timer event fires and erases the sample + * buffer and mix buffer from the previous location up to the current location of the audio engine. + */ + virtual void performErase(); + + /*! + * @function performFlush + * @abstract Performs the flush operation. + * @discussion This method is called automatically each time the timer event fires. It stops the audio engine + * if there are no more clients and the audio engine is passed the latest flush ending position. + */ + virtual void performFlush(); + + virtual void stopEngineAtPosition(IOAudioEnginePosition *endingPosition); + + virtual IOReturn mixOutputSamples(const void *sourceBuf, void *mixBuf, UInt32 firstSampleFrame, UInt32 numSampleFrames, const IOAudioStreamFormat *streamFormat, IOAudioStream *audioStream); + virtual IOReturn clipOutputSamples(const void *mixBuf, void *sampleBuf, UInt32 firstSampleFrame, UInt32 numSampleFrames, const IOAudioStreamFormat *streamFormat, IOAudioStream *audioStream); + virtual void resetClipPosition(IOAudioStream *audioStream, UInt32 clipSampleFrame); + virtual IOReturn convertInputSamples(const void *sampleBuf, void *destBuf, UInt32 firstSampleFrame, UInt32 numSampleFrames, const IOAudioStreamFormat *streamFormat, IOAudioStream *audioStream); + + virtual void takeTimeStamp(bool incrementLoopCount = true, AbsoluteTime *timestamp = NULL); + virtual IOReturn getLoopCountAndTimeStamp(UInt32 *loopCount, AbsoluteTime *timestamp); + + virtual IOReturn calculateSampleTimeout(AbsoluteTime *sampleInterval, UInt32 numSampleFrames, IOAudioEnginePosition *startingPosition, AbsoluteTime *wakeupTime); + + virtual IOReturn performFormatChange(IOAudioStream *audioStream, const IOAudioStreamFormat *newFormat, const IOAudioSampleRate *newSampleRate); + + virtual void beginConfigurationChange(); + virtual void completeConfigurationChange(); + virtual void cancelConfigurationChange(); + + virtual IOReturn addDefaultAudioControl(IOAudioControl *defaultAudioControl); + virtual IOReturn removeDefaultAudioControl(IOAudioControl *defaultAudioControl); + virtual void removeAllDefaultAudioControls(); + + virtual OSString *getGlobalUniqueID(); + virtual OSString *getLocalUniqueID(); + +protected: + + /*! + * @function initKeys + * @abstract Generates the OSSymbols with the keys. + * @discussion Do not call this directly. This is an internal initialization routine. + */ + static void initKeys(); + + virtual void setNumSampleFramesPerBuffer(UInt32 numSampleFrames); + virtual UInt32 getNumSampleFramesPerBuffer(); + + /*! + * @function setState + * @abstract Indicates that the audio engine is in the specified state. + * @discussion This method simply sets the internal state of the audio engine to the specified state. It does not + * affect a change to the state. It does however keep other internal state-related attributes consistent. + * For example, it enables or disables the timer as needed when the state changes to running or stopped. + * @param newState The state the audio engine is in. + * @result Returns the old state. + */ + virtual IOAudioEngineState setState(IOAudioEngineState newState); + + /*! + * @function setSampleRate + * @abstract Records the sample rate of the audio engine. + * @discussion This method must be called during initialization of a new audio engine to record the audio engine's + * initial sample rate. It also is intended to be used to record changes to the sample rate during use. + * Currently changing sample rates after the audio engine has been started is not supported. + * It may require that the sample buffers be re-sized. This will be available in an upcoming release. + * @param newSampleRate The sample rate of the audio engine in samples per second. + */ + virtual void setSampleRate(const IOAudioSampleRate *newSampleRate); + + /*! + * @function setSampleLatency + * @abstract Sets the sample latency for the audio engine. + * @discussion The sample latency represents the number of samples ahead of the playback head + * that it is safe to write into the sample buffer. The audio device API will never write + * closer to the playback head than the number of samples specified. For input audio engines + * the number of samples is behind the record head. + */ + virtual void setSampleLatency(UInt32 numSamples); + virtual void setOutputSampleLatency(UInt32 numSamples); + virtual void setInputSampleLatency(UInt32 numSamples); + virtual void setSampleOffset(UInt32 numSamples); + + /*! + * @function setRunEraseHead + * @abstract Tells the audio engine whether or not to run the erase head. + * @discussion By default, output audio engines run the erase head and input audio engines do not. This method can + * be called after setDirection() is called in order to change the default behavior. + * @param runEraseHead The audio engine will run the erase head if this value is true. + */ + virtual void setRunEraseHead(bool runEraseHead); + + /*! + * @function clientClosed + * @abstract Called automatically when a user client closes its connection to the audio engine. + * @discussion This method decrements the number of connections to the audio engine and if they reach + * zero, the audio engine is called with a call to stopAudioEngine(). This method should not be called directly. + * @param client The user client that has disconnected. + */ + virtual void clientClosed(IOAudioEngineUserClient *client); + + /*! + * @function addTimer + * @abstract Enables the timer event for the audio engine. + * @discussion There is a timer event needed by the IOAudioEngine for processing the erase head + * and performing flushing operations. When the timer fires, the method timerFired() is ultimately + * called which in turn calls performErase() and performFlush(). This is called automatically + * to enable the timer event for this audio engine. It is called by setState() when the audio engine state + * is set to kIOAudioEngineRunning. When the timer is no longer needed, removeTimer() is called. + * There is no need to call this directly. + */ + virtual void addTimer(); + + /*! + * @function removeTimer + * @abstract Disables the timer event for the audio engine. + * @discussion This method is called automatically to disable the timer event for this audio engine. + * There is need to call it directly. This method is called by setState() when the audio engine state + * is changed from kIOAudioEngineRunning to one of the stopped states. + */ + virtual void removeTimer(); + + virtual void sendFormatChangeNotification(IOAudioStream *audioStream); + virtual void sendNotification(UInt32 notificationType); + + virtual IOReturn createUserClient(task_t task, void *securityID, UInt32 type, IOAudioEngineUserClient **newUserClient); + + static IOReturn _addUserClientAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // + static IOReturn addUserClientAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + static IOReturn _removeUserClientAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // + static IOReturn removeUserClientAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + static IOReturn detachUserClientsAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + + virtual IOReturn addUserClient(IOAudioEngineUserClient *newUserClient); + virtual IOReturn removeUserClient(IOAudioEngineUserClient *userClient); + virtual IOReturn detachUserClients(); + + virtual IOReturn startClient(IOAudioEngineUserClient *userClient); + virtual IOReturn stopClient(IOAudioEngineUserClient *userClient); + + virtual IOReturn incrementActiveUserClients(); + virtual IOReturn decrementActiveUserClients(); + + virtual void detachAudioStreams(); + void setWorkLoopOnAllAudioControls(IOWorkLoop *wl); + + static inline void lockStreamForIO(IOAudioStream *stream); + static inline void unlockStreamForIO(IOAudioStream *stream); + + // These aren't virtual by design + UInt32 getNextStreamID(IOAudioStream * newStream); + IOAudioStream * getStreamForID(UInt32 streamID); + +}; + +#endif /* _IOKIT_IOAUDIOENGINE_H */ diff --git a/i386/include/IOKit/audio/IOAudioEngineUserClient.h b/i386/include/IOKit/audio/IOAudioEngineUserClient.h new file mode 100644 index 0000000..cc51a83 --- /dev/null +++ b/i386/include/IOKit/audio/IOAudioEngineUserClient.h @@ -0,0 +1,270 @@ +/* + * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOAUDIOENGINEUSERCLIENT_H +#define _IOKIT_IOAUDIOENGINEUSERCLIENT_H + +#include +#ifndef IOAUDIOFAMILY_SELF_BUILD +#include +#include +#else +#include "IOAudioEngine.h" +#include "IOAudioTypes.h" +#endif +#include + +class IOAudioEngine; +class IOAudioStream; +class IOMemoryDescriptor; +class IOCommandGate; +class IOWorkLoop; + +class IOAudioEngineUserClient; +class IOAudioClientBufferSet; +typedef struct IOAudioFormatNotification; +typedef struct IOAudioClientBuffer { + IOAudioEngineUserClient *userClient; + IOAudioStream *audioStream; + void *sourceBuffer; + IOMemoryDescriptor *sourceBufferDescriptor; + IOMemoryMap *sourceBufferMap; + void *unmappedSourceBuffer; + UInt32 numSampleFrames; + UInt32 numChannels; + IOAudioEnginePosition mixedPosition; + struct IOAudioClientBuffer *mNextBuffer32; + struct IOAudioClientBuffer *nextClip; + struct IOAudioClientBuffer *previousClip; + struct IOAudioClientBuffer *nextClient; + IOAudioBufferDataDescriptor *bufferDataDescriptor; +} IOAudioClientBuffer; + +/* IOAudioClientBuffer64 added for binary compatibility with old PPC drivers covered by */ +typedef struct IOAudioClientBuffer64 +{ + IOAudioClientBuffer mAudioClientBuffer32; + mach_vm_address_t mUnmappedSourceBuffer64; + struct IOAudioClientBuffer64 *mNextBuffer64; +} IOAudioClientBuffer64; + +typedef struct IOAudioClientBufferExtendedInfo { + // Added stuff for registerClientParameterBuffer + UInt32 bufferSetID; + void *paramBuffer; + IOMemoryDescriptor *paramBufferDescriptor; + IOMemoryMap *paramBufferMap; + void *unmappedParamBuffer; + struct IOAudioClientBufferExtendedInfo *mNextExtended; +} IOAudioClientBufferExtendedInfo; +/* IOAudioClientBufferExtendedInfo64 added for binary compatibility with old PPC drivers covered by */ +typedef struct IOAudioClientBufferExtendedInfo64 +{ + IOAudioClientBufferExtendedInfo mAudioClientBufferExtended32; + mach_vm_address_t mUnmappedParamBuffer64; + struct IOAudioClientBufferExtendedInfo64 *mNextExtended64; +} IOAudioClientBufferExtendedInfo64; + + +class IOAudioEngineUserClient : public IOUserClient + { + OSDeclareDefaultStructors(IOAudioEngineUserClient) + + friend class IOAudioEngine; + friend class IOAudioClientBufferSet; + friend class IOAudioStream; + + protected: + IOAudioEngine *audioEngine; + + IOWorkLoop *workLoop; + IOCommandGate *commandGate; + + IOExternalMethod old_methods[5]; // It's size can't be changed for binary compatibility reasons, no longer used. + IOExternalTrap trap; + + task_t clientTask; + UInt32 numSampleFrames; // Never used... + + IOAudioClientBufferSet *clientBufferSetList; + IORecursiveLock *clientBufferLock; + + IOAudioNotificationMessage *notificationMessage; + + bool online; + + protected: + struct ExpansionData { + IOAudioClientBufferExtendedInfo64 *extendedInfo; + IOExternalMethod methods[kIOAudioEngineNumCalls]; // This size can be changed, this is the new methods pointer + UInt32 classicMode; + }; + + ExpansionData *reserved; + + public: + virtual IOReturn externalMethod( uint32_t selector, IOExternalMethodArguments * arguments, IOExternalMethodDispatch * dispatch, + OSObject * target, void * reference); + // New code added here... + // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 0); + virtual IOReturn registerClientParameterBuffer (void * parameterBuffer, UInt32 bufferSetID); // unused function + // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 1); + virtual IOAudioClientBufferExtendedInfo * findExtendedInfo(UInt32 bufferSetID); + // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 2); + virtual IOReturn getNearestStartTime(IOAudioStream *audioStream, IOAudioTimeStamp *ioTimeStamp, UInt32 isInput); + // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 3); + virtual IOReturn getClientNearestStartTime(IOAudioStream *audioStream, IOAudioTimeStamp *ioTimeStamp, UInt32 isInput); + // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 4); + virtual IOReturn safeRegisterClientBuffer(UInt32 audioStreamIndex, void * sourceBuffer, UInt32 bufSizeInBytes, UInt32 bufferSetID); + // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 5); + virtual bool initWithAudioEngine(IOAudioEngine *engine, task_t task, void *securityToken, UInt32 type, OSDictionary *properties); + // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 6); + virtual IOReturn safeRegisterClientBuffer64(UInt32 audioStreamIndex, mach_vm_address_t * sourceBuffer, UInt32 bufSizeInBytes, UInt32 bufferSetID); + // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 7); + virtual IOReturn registerClientBuffer64(IOAudioStream *audioStream, mach_vm_address_t sourceBuffer, UInt32 bufSizeInBytes, UInt32 bufferSetID); + // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 8); + virtual IOReturn registerBuffer64(IOAudioStream *audioStream, mach_vm_address_t sourceBuffer, UInt32 bufSizeInBytes, UInt32 bufferSetID); + // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 9); + virtual IOReturn unregisterBuffer64(mach_vm_address_t sourceBuffer, UInt32 bufferSetID); + // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 10); + virtual IOReturn unregisterClientBuffer64(mach_vm_address_t * sourceBuffer, UInt32 bufferSetID); + // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 11); + virtual IOAudioClientBufferExtendedInfo64 * findExtendedInfo64(UInt32 bufferSetID); + + + + private: + OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 0); + OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 1); + OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 2); + OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 3); + OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 4); + OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 5); + OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 6); + OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 7); + OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 8); + OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 9); + OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 10); + OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 11); + + + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 12); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 13); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 14); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 15); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 16); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 17); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 18); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 19); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 20); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 21); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 22); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 23); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 24); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 25); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 26); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 27); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 28); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 29); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 30); + OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 31); + + protected: + virtual IOReturn clientClose(); + virtual IOReturn clientDied(); + + static IOReturn _closeClientAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // + static IOReturn closeClientAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + virtual IOReturn closeClient(); + + + virtual IOReturn clientMemoryForType(UInt32 type, UInt32 *flags, IOMemoryDescriptor **memory); + virtual IOExternalMethod *getExternalMethodForIndex(UInt32 index); + virtual IOExternalTrap *getExternalTrapForIndex(UInt32 index); + virtual IOReturn registerNotificationPort(mach_port_t port, UInt32 type, UInt32 refCon); + + static IOReturn _registerNotificationAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // + static IOReturn registerNotificationAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + virtual IOReturn registerNotification(mach_port_t port, UInt32 refCon); + + virtual void setOnline(bool newOnline); + + virtual IOReturn performClientOutput(UInt32 firstSampleFrame, UInt32 loopCount, IOAudioClientBufferSet *bufferSet, UInt32 sampleIntervalHi, UInt32 sampleIntervalLo); + virtual IOReturn performClientInput(UInt32 firstSampleFrame, IOAudioClientBufferSet *bufferSet); + virtual void performWatchdogOutput(IOAudioClientBufferSet *clientBufferSet, UInt32 generationCount); + + virtual void lockBuffers(); + virtual void unlockBuffers(); + + public: + + static IOAudioEngineUserClient *withAudioEngine(IOAudioEngine *engine, task_t clientTask, void *securityToken, UInt32 type); + static IOAudioEngineUserClient *withAudioEngine(IOAudioEngine *engine, task_t clientTask, void *securityToken, UInt32 type, OSDictionary *properties); + + virtual bool initWithAudioEngine(IOAudioEngine *engine, task_t task, void *securityToken, UInt32 type); + + virtual void free(); + virtual void freeClientBufferSetList(); + virtual void freeClientBuffer(IOAudioClientBuffer64 *clientBuffer); + + virtual void stop(IOService *provider); + + virtual bool isOnline(); + + virtual IOReturn registerBuffer(IOAudioStream *audioStream, void* sourceBuffer, UInt32 bufSizeInBytes, UInt32 bufferSetID); + virtual IOReturn unregisterBuffer( void * sourceBuffer, UInt32 bufferSetID); + + static IOReturn _registerBufferAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // + static IOReturn registerBufferAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + static IOReturn _unregisterBufferAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // + static IOReturn unregisterBufferAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + + virtual IOReturn registerClientBuffer(IOAudioStream *audioStream, void * sourceBuffer, UInt32 bufSizeInBytes, UInt32 bufferSetID); + virtual IOReturn unregisterClientBuffer(void * sourceBuffer, UInt32 bufferSetID); + + static IOReturn _getNearestStartTimeAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // + static IOReturn getNearestStartTimeAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + + virtual IOAudioClientBufferSet *findBufferSet(UInt32 bufferSetID); + virtual void removeBufferSet(IOAudioClientBufferSet *bufferSet); + + virtual IOReturn getConnectionID(UInt32 *connectionID); + + virtual IOReturn clientStart(); + virtual IOReturn clientStop(); + + static IOReturn _startClientAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // + static IOReturn startClientAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + static IOReturn _stopClientAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // + static IOReturn stopClientAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + + virtual IOReturn startClient(); + virtual IOReturn stopClient(); + + virtual IOReturn performClientIO(UInt32 firstSampleFrame, UInt32 loopCount, bool inputIO, UInt32 bufferSetID, UInt32 sampleIntervalHi, UInt32 sampleIntervalLo); + + virtual void sendFormatChangeNotification(IOAudioStream *audioStream); + virtual IOReturn sendNotification(UInt32 notificationType); + + }; + +#endif /* _IOKIT_IOAUDIOENGINEUSERCLIENT_H */ diff --git a/i386/include/IOKit/audio/IOAudioLevelControl.h b/i386/include/IOKit/audio/IOAudioLevelControl.h new file mode 100644 index 0000000..d76786d --- /dev/null +++ b/i386/include/IOKit/audio/IOAudioLevelControl.h @@ -0,0 +1,205 @@ +/* + * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOAUDIOLEVELCONTROL_H +#define _IOKIT_IOAUDIOLEVELCONTROL_H + +#ifndef IOAUDIOFAMILY_SELF_BUILD +#include +#else +#include "IOAudioControl.h" +#endif + +class OSArray; + +/*! + * @class IOAudioLevelControl + * @abstract + * @discussion + */ + +class IOAudioLevelControl : public IOAudioControl +{ + OSDeclareDefaultStructors(IOAudioLevelControl) + +protected: + SInt32 minValue; + SInt32 maxValue; + IOFixed minDB; + IOFixed maxDB; + + OSArray *ranges; + +protected: + struct ExpansionData { }; + + ExpansionData *reserved; + +public: + static IOAudioLevelControl *createPassThruVolumeControl (SInt32 initialValue, + SInt32 minValue, + SInt32 maxValue, + IOFixed minDB, + IOFixed maxDB, + UInt32 channelID, + const char *channelName, + UInt32 cntrlID); + + // OSMetaClassDefineReservedUnused(IOAudioLevelControl, 0); + /*! + * @function setLinearScale + * @abstract This function tells CoreAudio if it should apply a curve to the scaler representation of the volume. + * @param useLinearScale TRUE instructs CoreAudio to not apply a curve to the scaler representation of the volume, + * FALSE instructs CoreAudio to apply a curve, which is CoreAudio's default behavior. + */ + virtual void setLinearScale(bool useLinearScale); + +private: + OSMetaClassDeclareReservedUsed(IOAudioLevelControl, 0); + + OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 1); + OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 2); + OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 3); + OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 4); + OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 5); + OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 6); + OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 7); + OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 8); + OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 9); + OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 10); + OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 11); + OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 12); + OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 13); + OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 14); + OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 15); + +public: + /*! + * @function create + * @abstract Allocates a new level control with the given attributes + * @param initialValue The initial value of the control + * @param minValue The lowest possible value the control may have + * @param maxValue The highest possible value the control may have + * @param minDB A fixed point representation of the db value matching minValue + * @param maxDB A fixed point representation of the db value matching maxValue + * @param channelID The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h. + * @param channelName An optional name for the channel. Common names are located in IOAudioTypes.h. + * @param cntrlID An optional ID for the control that can be used to uniquely identify controls. + * @result Returns a newly allocted and initialized level IOAudioControl + */ + static IOAudioLevelControl *create(SInt32 initialValue, + SInt32 minValue, + SInt32 maxValue, + IOFixed minDB, + IOFixed maxDB, + UInt32 channelID, + const char *channelName = 0, + UInt32 cntrlID = 0, + UInt32 subType = 0, + UInt32 usage = 0); + + static IOAudioLevelControl *createVolumeControl(SInt32 initialValue, + SInt32 minValue, + SInt32 maxValue, + IOFixed minDB, + IOFixed maxDB, + UInt32 channelID, + const char *channelName = 0, + UInt32 cntrlID = 0, + UInt32 usage = 0); + + /*! + * @function init + * @abstract Initializes a newly allocated IOAudioLevelControl with the given attributes + * @param initialValue The initial value of the control + * @param minValue The lowest possible value the control may have + * @param maxValue The highest possible value the control may have + * @param minDB A fixed point representation of the db value matching minValue + * @param maxDB A fixed point representation of the db value matching maxValue + * @param channelID The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h. + * @param channelName An optional name for the channel. Common names are located in IOAudioTypes.h. + * @param cntrlID An optional ID for the control that can be used to uniquely identify controls. + * @param properties Standard property list passed to the init() function of any new IOService. This dictionary + * gets stored in the registry entry for this service. + * @result Returns true on success + */ + virtual bool init(SInt32 initialValue, + SInt32 minValue, + SInt32 maxValue, + IOFixed minDB, + IOFixed maxDB, + UInt32 channelID, + const char *channelName = 0, + UInt32 cntrlID = 0, + UInt32 subType = 0, + UInt32 usage = 0, + OSDictionary *properties = 0); + + virtual void free(); + + /*! + * @function setMinValue + * @abstract Sets the minimum value the control may have + * @param minValue The minimum value for the control + */ + virtual void setMinValue(SInt32 minValue); + + virtual SInt32 getMinValue(); + + /*! + * @function setMaxValue + * @abstract Sets the maximum value the control may have + * @param maxValue The maximum value for the control + */ + virtual void setMaxValue(SInt32 maxValue); + + virtual SInt32 getMaxValue(); + + /*! + * @function setMinDB + * @abstract Sets the minimum value in db that the control may have + * @discussion This value is represented as an IOFixed value which is a fixed point number. The IOFixed + * type is a 16.16 fixed point value. + * @param minDB The minimum value in db for the control + */ + virtual void setMinDB(IOFixed minDB); + + virtual IOFixed getMinDB(); + + /*! + * @function setMaxDB + * @abstract Sets the maximum value in db that the control may have + * @discussion This value is represented as an IOFixed value which is a fixed point number. The IOFixed + * type is a 16.16 fixed point value. + * @param maxDB The maximum value in db for the control + */ + virtual void setMaxDB(IOFixed maxDB); + + virtual IOFixed getMaxDB(); + + virtual IOReturn addRange(SInt32 minValue, SInt32 maxValue, IOFixed minDB, IOFixed maxDB); + virtual IOReturn addNegativeInfinity(SInt32 negativeInfinityValue); + + virtual IOReturn validateValue(OSObject *newValue); +}; + +#endif /* _IOKIT_IOAUDIOLEVELCONTROL_H */ diff --git a/i386/include/IOKit/audio/IOAudioPort.h b/i386/include/IOKit/audio/IOAudioPort.h new file mode 100644 index 0000000..728c65e --- /dev/null +++ b/i386/include/IOKit/audio/IOAudioPort.h @@ -0,0 +1,184 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOAUDIOPORT_H +#define _IOKIT_IOAUDIOPORT_H + +#include + +class IOAudioDevice; +class IOAudioControl; +class OSDictionary; + +/*! + * @class IOAudioPort + * @abstract Represents a logical or physical port or functional unit in an audio device. + * @discussion An IOAudioPort represents an element in the signal chain in the audio device. It may contain + * one or more controls (represented by IOAudioControl) by which different attributes of the port may be + * represented and adjusted. + * + * IOAudioPort objects are connected up in the IORegistry in the IOAudioPlane to represent the signal chain of + * the device. They may be connected to other IOAudioPorts as well as IOAudioEngines to indicate they either + * feed into or are fed by one of the audio engines (i.e. they provide input to or take output from the computer). + */ +class IOAudioPort : public IOService +{ + friend class IOAudioDevice; + + OSDeclareDefaultStructors(IOAudioPort) + +public: + /* @var audioDevice The IOAudioDevice that this IOAudioPort belongs to. */ + IOAudioDevice * audioDevice; + /* @var audioControls A set containg all of the IOAudioControl instances that belong to the port. */ + OSSet * audioControls; + bool isRegistered; + +protected: + struct ExpansionData { }; + + ExpansionData *reserved; + +private: + OSMetaClassDeclareReservedUnused(IOAudioPort, 0); + OSMetaClassDeclareReservedUnused(IOAudioPort, 1); + OSMetaClassDeclareReservedUnused(IOAudioPort, 2); + OSMetaClassDeclareReservedUnused(IOAudioPort, 3); + OSMetaClassDeclareReservedUnused(IOAudioPort, 4); + OSMetaClassDeclareReservedUnused(IOAudioPort, 5); + OSMetaClassDeclareReservedUnused(IOAudioPort, 6); + OSMetaClassDeclareReservedUnused(IOAudioPort, 7); + OSMetaClassDeclareReservedUnused(IOAudioPort, 8); + OSMetaClassDeclareReservedUnused(IOAudioPort, 9); + OSMetaClassDeclareReservedUnused(IOAudioPort, 10); + OSMetaClassDeclareReservedUnused(IOAudioPort, 11); + OSMetaClassDeclareReservedUnused(IOAudioPort, 12); + OSMetaClassDeclareReservedUnused(IOAudioPort, 13); + OSMetaClassDeclareReservedUnused(IOAudioPort, 14); + OSMetaClassDeclareReservedUnused(IOAudioPort, 15); + OSMetaClassDeclareReservedUnused(IOAudioPort, 16); + OSMetaClassDeclareReservedUnused(IOAudioPort, 17); + OSMetaClassDeclareReservedUnused(IOAudioPort, 18); + OSMetaClassDeclareReservedUnused(IOAudioPort, 19); + OSMetaClassDeclareReservedUnused(IOAudioPort, 20); + OSMetaClassDeclareReservedUnused(IOAudioPort, 21); + OSMetaClassDeclareReservedUnused(IOAudioPort, 22); + OSMetaClassDeclareReservedUnused(IOAudioPort, 23); + OSMetaClassDeclareReservedUnused(IOAudioPort, 24); + OSMetaClassDeclareReservedUnused(IOAudioPort, 25); + OSMetaClassDeclareReservedUnused(IOAudioPort, 26); + OSMetaClassDeclareReservedUnused(IOAudioPort, 27); + OSMetaClassDeclareReservedUnused(IOAudioPort, 28); + OSMetaClassDeclareReservedUnused(IOAudioPort, 29); + OSMetaClassDeclareReservedUnused(IOAudioPort, 30); + OSMetaClassDeclareReservedUnused(IOAudioPort, 31); + +public: + /*! + * @function withAttributes + * @abstract Allocates a new IOAudioPort instance with the given attributes + * @discussion This static method allocates a new IOAudioPort and calls initWithAttributes() on it with + * the parameters passed in to it. + * @param portType A readable string representing the type of port. Common port types are defined in + * IOAudioTypes.h and are prefixed with 'kIOAudioPortType'. Please provide feedback if there are + * other common port types that should be included. + * @param portName A readable string representing the name of the port. For example: 'Internal Speaker', + * 'Line Out'. This field is optional, but useful for providing information to the application/user. + * @param subType Developer defined readable string representing a subtype for the port. (optional) + * @param properties Standard property list passed to the init of any new IOService. This dictionary + * gets stored in the registry for this instance. (optional) + * @result Returns the newly allocated and initialized IOAudioPort instance. + */ + static IOAudioPort *withAttributes(UInt32 portType, const char *portName = 0, UInt32 subType = 0, OSDictionary *properties = 0); + + /*! + * @function initWithAttributes + * @abstract Initializes a newly allocated IOAudioPort instance with the given attributes + * @discussion The properties parameter is passed on the superclass' init(). The portType, subType + * and properties parameters are optional, however portType is recommended. + * @param portType A readable string representing the type of port. Common port types are defined in + * IOAudioTypes.h and are prefixed with 'kIOAudioPortType'. Please provide feedback if there are + * other common port types that should be included. + * @param portName A readable string representing the name of the port. For example: 'Internal Speaker', + * 'Line Out'. This field is optional, but useful for providing information to the application/user. + * @param subType Developer defined readable string representing a subtype for the port. (optional) + * @param properties Standard property list passed to the init of any new IOService. This dictionary + * gets stored in the registry for this instance. (optional) + * @result Returns true on success. + */ + virtual bool initWithAttributes(UInt32 portType, const char *portName = 0, UInt32 subType = 0, OSDictionary *properties = 0); + + /*! + * @function free + * @abstract Frees all of the resources allocated by the IOAudioPort. + * @discussion Do not call this directly. This is called automatically by the system when the instance's + * refcount goes to 0. To decrement the refcount, call release() on the object. + */ + virtual void free(); + + /*! + * @function start + * @abstract Called to start a newly created IOAudioPort. + * @discussion This is called automatically by IOAudioDevice when attachAudioPort() is called. + * @param provider The IOAudioDevice that owns this port + * @result Returns true on success + */ + virtual bool start(IOService *provider); + + /*! + * @function stop + * @abstract Called when the IOAudioDevice is stopping when it is no longer available. + * @discussion This method calls deactivateAudioControls() to shut down all of the controls associated with + * this port. + * @param provider The IOAudioDevice that owns this port + */ + virtual void stop(IOService *provider); + + virtual void registerService(IOOptionBits options = 0); + + virtual IOAudioDevice *getAudioDevice(); + + /*! + * @function addAudioControl + * @abstract Adds a newly created IOAudioControl instance to the port. + * @discussion This method is responsible for starting the new IOAudioControl and adding it to the internal + * audioControls array. + * @param control A newly created IOAudioControl instance that should belong to this port. + * @result Returns true on successfully staring the IOAudioControl. + */ + virtual IOReturn addAudioControl(IOAudioControl *control); + + /*! + * @function deactivateAudioControls + * @abstract Called to shut down all of the audio controls for this port. + * @discussion This will stop all of the audio controls and release them so that the instances may be + * freed. This is called from the free() method. + */ + virtual void deactivateAudioControls(); + +protected: + virtual void setType(UInt32 portType); + virtual void setSubType(UInt32 subType); + virtual void setName(const char *name); +}; + +#endif /* _IOKIT_IOAUDIOPORT_H */ diff --git a/i386/include/IOKit/audio/IOAudioSelectorControl.h b/i386/include/IOKit/audio/IOAudioSelectorControl.h new file mode 100644 index 0000000..8687810 --- /dev/null +++ b/i386/include/IOKit/audio/IOAudioSelectorControl.h @@ -0,0 +1,122 @@ +/* + * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOAUDIOSELECTORCONTROL_H +#define _IOKIT_IOAUDIOSELECTORCONTROL_H + +#ifndef IOAUDIOFAMILY_SELF_BUILD +#include +#else +#include "IOAudioControl.h" +#endif + +class OSString; +class OSArray; + +class IOAudioSelectorControl : public IOAudioControl +{ + OSDeclareDefaultStructors(IOAudioSelectorControl) + +protected: + + OSArray *availableSelections; + +protected: + struct ExpansionData { }; + + ExpansionData *reserved; + +public: + static IOAudioSelectorControl *createOutputSelector(SInt32 initialValue, + UInt32 channelID, + const char *channelName = 0, + UInt32 cntrlID = 0); + static IOAudioSelectorControl *createOutputClockSelector(SInt32 initialValue, + UInt32 channelID, + UInt32 clockSource, + const char *channelName = 0, + UInt32 cntrlID = 0); + static IOAudioSelectorControl *createInputClockSelector(SInt32 initialValue, + UInt32 channelID, + UInt32 clockSource, + const char *channelName = 0, + UInt32 cntrlID = 0); + + // OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 0); + virtual IOReturn removeAvailableSelection(SInt32 selectionValue); + // OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 1); + virtual IOReturn replaceAvailableSelection(SInt32 selectionValue, const char *selectionDescription); + // OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 2); + virtual IOReturn replaceAvailableSelection(SInt32 selectionValue, OSString *selectionDescription); + +private: + OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 0); + OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 1); + OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 2); + + OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 3); + OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 4); + OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 5); + OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 6); + OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 7); + OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 8); + OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 9); + OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 10); + OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 11); + OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 12); + OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 13); + OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 14); + OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 15); + +public: + static IOAudioSelectorControl *create(SInt32 initialValue, + UInt32 channelID, + const char *channelName = 0, + UInt32 cntrlID = 0, + UInt32 subType = 0, + UInt32 usage = 0); + + static IOAudioSelectorControl *createInputSelector(SInt32 initialValue, + UInt32 channelID, + const char *channelName = 0, + UInt32 cntrlID = 0); + + virtual bool init(SInt32 initialValue, + UInt32 channelID, + const char *channelName = 0, + UInt32 cntrlID = 0, + UInt32 subType = 0, + UInt32 usage = 0, + OSDictionary *properties = 0); + + virtual void free(); + + virtual IOReturn addAvailableSelection(SInt32 selectionValue, const char *selectionDescription); + virtual IOReturn addAvailableSelection(SInt32 selectionValue, OSString *selectionDescription); + + virtual bool valueExists(SInt32 selectorValue); + + virtual IOReturn validateValue(OSObject *newValue); + +}; + +#endif /* _IOKIT_IOAUDIOSELECTORCONTROL_H */ diff --git a/i386/include/IOKit/audio/IOAudioStream.h b/i386/include/IOKit/audio/IOAudioStream.h new file mode 100644 index 0000000..07f40be --- /dev/null +++ b/i386/include/IOKit/audio/IOAudioStream.h @@ -0,0 +1,289 @@ +/* + * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOAUDIOSTREAM_H +#define _IOKIT_IOAUDIOSTREAM_H + +#include +#ifndef IOAUDIOFAMILY_SELF_BUILD +#include +#include +#else +#include "IOAudioEngine.h" +#include "IOAudioTypes.h" +#endif + +class OSSymbol; +class OSArray; +class OSDictionary; +class OSSet; + +class IOCommandGate; +class IOAudioControl; + +typedef struct IOAudioClientBuffer; +typedef struct IOAudioStreamFormatDesc; + +/*! + * @class IOAudioStream + * @abstract This class wraps a single sample buffer in an audio driver. + * @discussion An IOAudioStream represents one hardware sample buffer as well as the direction + * of that buffer, the mix buffer that multiple clients mix into as well as a list of + * all of the formats to which this buffer can be set. + * + * When an IOAudioEngine is created during init time in the driver, an IOAudioStream must be + * created for each sample buffer in the device. Typically, the sample buffer will be interleaved + * (or single channel), as a non-interleaved buffer should be divided into multiple single-channel + * buffers (and multiple IOAudioStreams). + * + * Additionally, when an IOAudioStream is created it must have all of the possible formats (and + * allowed sample rates for each format) set and must have the currently set format specified + * (addAvailableFormat() and setFormat()). + */ + +class IOAudioStream : public IOService +{ + OSDeclareDefaultStructors(IOAudioStream) + + friend class IOAudioEngine; + friend class IOAudioEngineUserClient; + +public: + + typedef IOReturn (*AudioIOFunction)(const void *mixBuf, void *sampleBuf, UInt32 firstSampleFrame, UInt32 numSampleFrames, const IOAudioStreamFormat *streamFormat, IOAudioStream *audioStream); + + static const OSSymbol *gDirectionKey; + static const OSSymbol *gNumChannelsKey; + static const OSSymbol *gSampleFormatKey; + static const OSSymbol *gNumericRepresentationKey; + static const OSSymbol *gBitDepthKey; + static const OSSymbol *gBitWidthKey; + static const OSSymbol *gAlignmentKey; + static const OSSymbol *gByteOrderKey; + static const OSSymbol *gIsMixableKey; + static const OSSymbol *gDriverTagKey; + static const OSSymbol *gMinimumSampleRateKey; + static const OSSymbol *gMaximumSampleRateKey; + + static void initKeys(); + + static OSDictionary *createDictionaryFromFormat(const IOAudioStreamFormat *streamFormat, const IOAudioStreamFormatExtension *formatExtension, OSDictionary *formatDict = 0); + static IOAudioStreamFormat *createFormatFromDictionary(const OSDictionary *formatDict, IOAudioStreamFormat *streamFormat = 0, IOAudioStreamFormatExtension *formatExtension = 0); + + IOAudioEngine *audioEngine; + IOWorkLoop *workLoop; + IOCommandGate *commandGate; + IORecursiveLock *streamIOLock; + + UInt32 numClients; + + IOAudioStreamDirection direction; + + IOAudioStreamFormat format; + IOAudioStreamFormatDesc *availableFormats; + OSArray *availableFormatDictionaries; + UInt32 numAvailableFormats; + + UInt32 startingChannelID; + UInt32 maxNumChannels; + + void *sampleBuffer; + UInt32 sampleBufferSize; + + void *mixBuffer; + UInt32 mixBufferSize; + bool streamAllocatedMixBuffer; + + AudioIOFunction *audioIOFunctions; + UInt32 numIOFunctions; + + bool streamAvailable; + + OSSet *defaultAudioControls; + + IOAudioEnginePosition startingPosition; + IOAudioEnginePosition clippedPosition; + + IOAudioClientBuffer *clientBufferListStart; + IOAudioClientBuffer *clientBufferListEnd; + + IOAudioClientBuffer *userClientList; + +protected: + + struct ExpansionData { + IOAudioStreamFormatExtension streamFormatExtension; + UInt32 mSampleFramesReadByEngine; + IOReturn mClipOutputStatus; + }; + + ExpansionData *reserved; + +public: +// New code added here: + // OSMetaClassDeclareReservedUsed(IOAudioStream, 0); + virtual const IOAudioStreamFormatExtension *getFormatExtension(); + // OSMetaClassDeclareReservedUsed(IOAudioStream, 1); + virtual IOReturn setFormat(const IOAudioStreamFormat *streamFormat, const IOAudioStreamFormatExtension *formatExtension, bool callDriver = true); + // OSMetaClassDeclareReservedUsed(IOAudioStream, 2); + virtual IOReturn setFormat(const IOAudioStreamFormat *streamFormat, const IOAudioStreamFormatExtension *formatExtension, OSDictionary *formatDict, bool callDriver = true); + // OSMetaClassDeclareReservedUsed(IOAudioStream, 3); + virtual void addAvailableFormat(const IOAudioStreamFormat *streamFormat, const IOAudioStreamFormatExtension *formatExtension, const IOAudioSampleRate *minRate, const IOAudioSampleRate *maxRate, const AudioIOFunction *ioFunctionList = NULL, UInt32 numFunctions = 0); + // OSMetaClassDeclareReservedUsed(IOAudioStream, 4); + virtual void addAvailableFormat(const IOAudioStreamFormat *streamFormat, const IOAudioStreamFormatExtension *formatExtension, const IOAudioSampleRate *minRate, const IOAudioSampleRate *maxRate, AudioIOFunction ioFunction); + // OSMetaClassDeclareReservedUsed(IOAudioStream, 5); + virtual bool validateFormat(IOAudioStreamFormat *streamFormat, IOAudioStreamFormatExtension *formatExtension, IOAudioStreamFormatDesc *formatDesc); + // OSMetaClassDeclareReservedUsed(IOAudioStream, 6); + virtual void setTerminalType(const UInt32 terminalType); + // OSMetaClassDeclareReservedUsed(IOAudioStream, 7); + virtual IOReturn mixOutputSamples(const void *sourceBuf, void *mixBuf, UInt32 firstSampleFrame, UInt32 numSampleFrames, const IOAudioStreamFormat *streamFormat, IOAudioStream *audioStream); + // OSMetaClassDeclareReservedUsed(IOAudioStream, 8); + virtual void setSampleLatency(UInt32 numSamples); + // OSMetaClassDeclareReservedUsed(IOAudioStream, 9); + virtual bool validateFormat(IOAudioStreamFormat *streamFormat, IOAudioStreamFormatExtension *formatExtension, IOAudioStreamFormatDesc *formatDesc, const IOAudioSampleRate *sampleRate); + // OSMetaClassDeclareReservedUsed(IOAudioStream, 10); + virtual UInt32 getNumSampleFramesRead(); + // OSMetaClassDeclareReservedUsed(IOAudioStream, 11); + virtual void setDefaultNumSampleFramesRead(UInt32); + +private: + OSMetaClassDeclareReservedUsed(IOAudioStream, 0); + OSMetaClassDeclareReservedUsed(IOAudioStream, 1); + OSMetaClassDeclareReservedUsed(IOAudioStream, 2); + OSMetaClassDeclareReservedUsed(IOAudioStream, 3); + OSMetaClassDeclareReservedUsed(IOAudioStream, 4); + OSMetaClassDeclareReservedUsed(IOAudioStream, 5); + OSMetaClassDeclareReservedUsed(IOAudioStream, 6); + OSMetaClassDeclareReservedUsed(IOAudioStream, 7); + OSMetaClassDeclareReservedUsed(IOAudioStream, 8); + OSMetaClassDeclareReservedUsed(IOAudioStream, 9); + OSMetaClassDeclareReservedUsed(IOAudioStream, 10); + OSMetaClassDeclareReservedUsed(IOAudioStream, 11); + + OSMetaClassDeclareReservedUnused(IOAudioStream, 12); + OSMetaClassDeclareReservedUnused(IOAudioStream, 13); + OSMetaClassDeclareReservedUnused(IOAudioStream, 14); + OSMetaClassDeclareReservedUnused(IOAudioStream, 15); + OSMetaClassDeclareReservedUnused(IOAudioStream, 16); + OSMetaClassDeclareReservedUnused(IOAudioStream, 17); + OSMetaClassDeclareReservedUnused(IOAudioStream, 18); + OSMetaClassDeclareReservedUnused(IOAudioStream, 19); + OSMetaClassDeclareReservedUnused(IOAudioStream, 20); + OSMetaClassDeclareReservedUnused(IOAudioStream, 21); + OSMetaClassDeclareReservedUnused(IOAudioStream, 22); + OSMetaClassDeclareReservedUnused(IOAudioStream, 23); + OSMetaClassDeclareReservedUnused(IOAudioStream, 24); + OSMetaClassDeclareReservedUnused(IOAudioStream, 25); + OSMetaClassDeclareReservedUnused(IOAudioStream, 26); + OSMetaClassDeclareReservedUnused(IOAudioStream, 27); + OSMetaClassDeclareReservedUnused(IOAudioStream, 28); + OSMetaClassDeclareReservedUnused(IOAudioStream, 29); + OSMetaClassDeclareReservedUnused(IOAudioStream, 30); + OSMetaClassDeclareReservedUnused(IOAudioStream, 31); + OSMetaClassDeclareReservedUnused(IOAudioStream, 32); + OSMetaClassDeclareReservedUnused(IOAudioStream, 33); + OSMetaClassDeclareReservedUnused(IOAudioStream, 34); + OSMetaClassDeclareReservedUnused(IOAudioStream, 35); + OSMetaClassDeclareReservedUnused(IOAudioStream, 36); + OSMetaClassDeclareReservedUnused(IOAudioStream, 37); + OSMetaClassDeclareReservedUnused(IOAudioStream, 38); + OSMetaClassDeclareReservedUnused(IOAudioStream, 39); + OSMetaClassDeclareReservedUnused(IOAudioStream, 40); + OSMetaClassDeclareReservedUnused(IOAudioStream, 41); + OSMetaClassDeclareReservedUnused(IOAudioStream, 42); + OSMetaClassDeclareReservedUnused(IOAudioStream, 43); + OSMetaClassDeclareReservedUnused(IOAudioStream, 44); + OSMetaClassDeclareReservedUnused(IOAudioStream, 45); + OSMetaClassDeclareReservedUnused(IOAudioStream, 46); + OSMetaClassDeclareReservedUnused(IOAudioStream, 47); + +public: + virtual bool initWithAudioEngine(IOAudioEngine *engine, IOAudioStreamDirection dir, UInt32 startChannelID, const char *streamDescription = NULL, OSDictionary *properties = 0); + virtual void free(); + + virtual void stop(IOService *provider); + + virtual IOWorkLoop *getWorkLoop() const; + + virtual IOReturn setProperties(OSObject *properties); + + virtual IOAudioStreamDirection getDirection(); + + virtual void setSampleBuffer(void *buffer, UInt32 size); + virtual void *getSampleBuffer(); + virtual UInt32 getSampleBufferSize(); + + virtual void setMixBuffer(void *buffer, UInt32 size); + virtual void *getMixBuffer(); + virtual UInt32 getMixBufferSize(); + + virtual void numSampleFramesPerBufferChanged(); + + virtual void clearSampleBuffer(); + + virtual void setIOFunction(AudioIOFunction ioFunction); + virtual void setIOFunctionList(const AudioIOFunction *ioFunctionList, UInt32 numFunctions); + + virtual const IOAudioStreamFormat *getFormat(); + static IOReturn setFormatAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); + virtual IOReturn setFormat(const IOAudioStreamFormat *streamFormat, bool callDriver = true); + virtual IOReturn setFormat(OSDictionary *formatDict); + virtual IOReturn setFormat(const IOAudioStreamFormat *streamFormat, OSDictionary *formatDict, bool callDriver = true); + virtual IOReturn hardwareFormatChanged(const IOAudioStreamFormat *streamFormat); + virtual void addAvailableFormat(const IOAudioStreamFormat *streamFormat, const IOAudioSampleRate *minRate, const IOAudioSampleRate *maxRate, const AudioIOFunction *ioFunctionList = NULL, UInt32 numFunctions = 0); + virtual void addAvailableFormat(const IOAudioStreamFormat *streamFormat, const IOAudioSampleRate *minRate, const IOAudioSampleRate *maxRate, AudioIOFunction ioFunction); + virtual void clearAvailableFormats(); + virtual bool validateFormat(IOAudioStreamFormat *streamFormat, IOAudioStreamFormatDesc *formatDesc); + + virtual UInt32 getStartingChannelID(); + virtual UInt32 getMaxNumChannels(); + + virtual void setStreamAvailable(bool available); + virtual bool getStreamAvailable(); + + virtual IOReturn addDefaultAudioControl(IOAudioControl *defaultAudioControl); + virtual void removeDefaultAudioControls(); + +protected: + virtual void lockStreamForIO(); + virtual void unlockStreamForIO(); + + virtual void updateNumClients(); + virtual IOReturn addClient(IOAudioClientBuffer *clientBuffer); + virtual void removeClient(IOAudioClientBuffer *clientBuffer); + virtual UInt32 getNumClients(); + + virtual IOReturn processOutputSamples(IOAudioClientBuffer *clientBuffer, UInt32 firstSampleFrame, UInt32 loopCount, bool samplesAvailable); + virtual IOReturn readInputSamples(IOAudioClientBuffer *clientBuffer, UInt32 firstSampleFrame); + + virtual void resetClipInfo(); + virtual void clipIfNecessary(); + virtual void clipOutputSamples(UInt32 startingSampleFrame, UInt32 numSampleFrames); + + virtual void setStartingChannelNumber(UInt32 channelNumber); + +private: + virtual void setDirection(IOAudioStreamDirection dir); + +}; + +#endif /* _IOKIT_IOAUDIOSTREAM_H */ diff --git a/i386/include/IOKit/audio/IOAudioToggleControl.h b/i386/include/IOKit/audio/IOAudioToggleControl.h new file mode 100644 index 0000000..95bfb4a --- /dev/null +++ b/i386/include/IOKit/audio/IOAudioToggleControl.h @@ -0,0 +1,121 @@ +/* + * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOAUDIOTOGGLECONTROL_H +#define _IOKIT_IOAUDIOTOGGLECONTROL_H + +#ifndef IOAUDIOFAMILY_SELF_BUILD +#include +#else +#include "IOAudioControl.h" +#endif + +/*! + * @class IOAudioToggleControl + */ + +class IOAudioToggleControl : public IOAudioControl +{ + OSDeclareDefaultStructors(IOAudioToggleControl) + +protected: + struct ExpansionData { }; + + ExpansionData *reserved; + +// New code added here +public: + /*! + * @function createPassThruMuteControl + * @abstract Allocates a new pass through mute control with the given attributes + * @param initialValue The initial value of the control + * @param channelID The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h. + * @param channelName An optional name for the channel. Common names are located in IOAudioPort.h. + * @param cntrlID An optional ID for the control that can be used to uniquely identify controls + * @result Returns a newly allocated and initialized mute IOAudioControl + */ + static IOAudioToggleControl *createPassThruMuteControl (bool initialValue, + UInt32 channelID, + const char *channelName, + UInt32 cntrlID); + +private: + OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 0); + OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 1); + OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 2); + OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 3); + OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 4); + OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 5); + OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 6); + OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 7); + OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 8); + OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 9); + OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 10); + OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 11); + OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 12); + OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 13); + OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 14); + OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 15); + +public: + /*! + * @function create + * @abstract Allocates a new mute control with the given attributes + * @param initialValue The initial value of the control + * @param channelID The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h. + * @param channelName An optional name for the channel. Common names are located in IOAudioPort.h. + * @param cntrlID An optional ID for the control that can be used to uniquely identify controls + * @result Returns a newly allocated and initialized mute IOAudioControl + */ + static IOAudioToggleControl *create(bool initialValue, + UInt32 channelID, + const char *channelName = 0, + UInt32 cntrlID = 0, + UInt32 subType = 0, + UInt32 usage = 0); + + static IOAudioToggleControl *createMuteControl(bool initialValue, + UInt32 channelID, + const char *channelName = 0, + UInt32 cntrlID = 0, + UInt32 usage = 0); + + /*! + * @function init + * @abstract Initializes a newly allocated IOAudioToggleControl with the given attributes + * @param initialValue The initial value of the control + * @param channelID The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h. + * @param channelName An optional name for the channel. Common names are located in IOAudioPort.h. + * @param cntrlID An optional ID for the control that can be used to uniquely identify controls + * @result Returns truen on success + */ + virtual bool init(bool initialValue, + UInt32 channelID, + const char *channelName = 0, + UInt32 cntrlID = 0, + UInt32 subType = 0, + UInt32 usage = 0, + OSDictionary *properties = 0); + +}; + +#endif /* _IOKIT_IOAUDIOTOGGLECONTROL_H */ diff --git a/i386/include/IOKit/audio/IOAudioTypes.h b/i386/include/IOKit/audio/IOAudioTypes.h new file mode 100644 index 0000000..0526575 --- /dev/null +++ b/i386/include/IOKit/audio/IOAudioTypes.h @@ -0,0 +1,661 @@ +/* + * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOAUDIOTYPES_H +#define _IOKIT_IOAUDIOTYPES_H + +#include +#include +#include + + +/*! + * @enum IOAudioEngineMemory + * @abstract Used to identify the type of memory requested by a client process to be mapped into its process space + * @discussion This is the parameter to the type field of IOMapMemory when called on an IOAudioEngine. This is + * only intended for use by the Audio Device API library. + * @constant kIOAudioSampleBuffer This requests the IOAudioEngine's sample buffer + * @constant kIOAudioStatusBuffer This requests the IOAudioEngine's status buffer. It's type is IOAudioEngineStatus. + * @constant kIOAudioMixBuffer This requests the IOAudioEngine's mix buffer +*/ +typedef enum _IOAudioEngineMemory { + kIOAudioStatusBuffer = 0, + kIOAudioSampleBuffer = 1, + kIOAudioMixBuffer = 2, + kIOAudioBytesInInputBuffer = 3, + kIOAudioBytesInOutputBuffer = 4 +} IOAudioEngineMemory; + +/*! + * @enum IOAudioEngineCalls + * @abstract The set of constants passed to IOAudioEngineUserClient::getExternalMethodForIndex() when making calls + * from the IOAudioFamily user client code. + */ +typedef enum _IOAudioEngineCalls { + kIOAudioEngineCallRegisterClientBuffer = 0, + kIOAudioEngineCallUnregisterClientBuffer = 1, + kIOAudioEngineCallGetConnectionID = 2, + kIOAudioEngineCallStart = 3, + kIOAudioEngineCallStop = 4, + kIOAudioEngineCallGetNearestStartTime = 5 +} IOAudioEngineCalls; + +/*! @defined kIOAudioEngineNumCalls The number of elements in the IOAudioEngineCalls enum. */ +#define kIOAudioEngineNumCalls 6 + +typedef enum _IOAudioEngineTraps { + kIOAudioEngineTrapPerformClientIO = 0 +} IOAudioEngineTraps; + +typedef enum _IOAudioEngineNotifications { + kIOAudioEngineAllNotifications = 0, + kIOAudioEngineStreamFormatChangeNotification = 1, + kIOAudioEngineChangeNotification = 2, + kIOAudioEngineStartedNotification = 3, + kIOAudioEngineStoppedNotification = 4, + kIOAudioEnginePausedNotification = 5, + kIOAudioEngineResumedNotification = 6 +} IOAudioEngineNotifications; + +/*! + * @enum IOAudioEngineState + * @abstract Represents the state of an IOAudioEngine + * @constant kIOAudioEngineRunning The IOAudioEngine is currently running - it is transferring data to or + * from the device. + * @constant kIOAudioEngineStopped The IOAudioEngine is currently stopped - no activity is occurring. + */ + +typedef enum _IOAudioEngineState { + kIOAudioEngineStopped = 0, + kIOAudioEngineRunning = 1, + kIOAudioEnginePaused = 2, + kIOAudioEngineResumed = 3 +} IOAudioEngineState; + + +/*! + * @typedef IOAudioEngineStatus + * @abstract Shared-memory structure giving audio engine status + * @discussion + * @field fVersion Indicates version of this structure + * @field fCurrentLoopCount Number of times around the ring buffer since the audio engine started + * @field fLastLoopTime Timestamp of the last time the ring buffer wrapped + * @field fEraseHeadSampleFrame Location of the erase head in sample frames - erased up to but not + * including the given sample frame + */ + +typedef struct _IOAudioEngineStatus { + UInt32 fVersion; + volatile UInt32 fCurrentLoopCount; + volatile AbsoluteTime fLastLoopTime; + volatile UInt32 fEraseHeadSampleFrame; +} IOAudioEngineStatus; + +#define kIOAudioEngineCurrentStatusStructVersion 2 + +typedef struct _IOAudioStreamFormat { + UInt32 fNumChannels; + UInt32 fSampleFormat; + UInt32 fNumericRepresentation; + UInt8 fBitDepth; + UInt8 fBitWidth; + UInt8 fAlignment; + UInt8 fByteOrder; + UInt8 fIsMixable; + UInt32 fDriverTag; +} IOAudioStreamFormat; + +#define kFormatExtensionInvalidVersion 0 +#define kFormatExtensionCurrentVersion 1 + +typedef struct _IOAudioStreamFormatExtension { + UInt32 fVersion; + UInt32 fFlags; + UInt32 fFramesPerPacket; + UInt32 fBytesPerPacket; +} IOAudioStreamFormatExtension; + +typedef struct _IOAudioBufferDataDescriptor { + UInt32 fActualDataByteSize; + UInt32 fActualNumSampleFrames; + UInt32 fTotalDataByteSize; + UInt32 fNominalDataByteSize; + UInt8 fData[1]; +} IOAudioBufferDataDescriptor; + +#define kStreamDataDescriptorInvalidVersion 0 +#define kStreamDataDescriptorCurrentVersion 1 + +typedef struct _IOAudioStreamDataDescriptor { + UInt32 fVersion; + UInt32 fNumberOfStreams; + UInt32 fStreamLength[1]; // Array with fNumberOfStreams number of entries +} IOAudioStreamDataDescriptor; + +typedef struct _IOAudioSampleIntervalDescriptor { + UInt32 sampleIntervalHi; + UInt32 sampleIntervalLo; +} IOAudioSampleIntervalDescriptor; + +/*! + @struct SMPTETime + @abstract A structure for holding a SMPTE time. + @field fSubframes + The number of subframes in the full message. + @field fSubframeDivisor + The number of subframes per frame (typically 80). + @field fCounter + The total number of messages received. + @field fType + The kind of SMPTE time using the SMPTE time type constants. + @field fFlags + A set of flags that indicate the SMPTE state. + @field fHours + The number of hourse in the full message. + @field fMinutes + The number of minutes in the full message. + @field fSeconds + The number of seconds in the full message. + @field fFrames + The number of frames in the full message. +*/ +typedef struct _IOAudioSMPTETime +{ + SInt16 fSubframes; + SInt16 fSubframeDivisor; + UInt32 fCounter; + UInt32 fType; + UInt32 fFlags; + SInt16 fHours; + SInt16 fMinutes; + SInt16 fSeconds; + SInt16 fFrames; + +} IOAudioSMPTETime; + +// constants describing SMPTE types (taken from the MTC spec) +enum +{ + kIOAudioSMPTETimeType24 = 0, + kIOAudioSMPTETimeType25 = 1, + kIOAudioSMPTETimeType30Drop = 2, + kIOAudioSMPTETimeType30 = 3, + kIOAudioSMPTETimeType2997 = 4, + kIOAudioSMPTETimeType2997Drop = 5 +}; + +// flags describing a SMPTE time stamp +enum +{ + kIOAudioSMPTETimeValid = (1L << 0), // the full time is valid + kIOAudioSMPTETimeRunning = (1L << 1) // time is running +}; + +// A struct for encapsulating the parts of a time stamp. The flags +// say which fields are valid. +typedef struct _IOAudioTimeStamp +{ + UInt64 fSampleTime; // the absolute sample time, was a Float64 + UInt64 fHostTime; // the host's root timebase's time + UInt64 fRateScalar; // the system rate scalar, was a Float64 + UInt64 fWordClockTime; // the word clock time + IOAudioSMPTETime fSMPTETime; // the SMPTE time + UInt32 fFlags; // the flags indicate which fields are valid + UInt32 fReserved; // reserved, pads the structure out to force 8 byte alignment +} IOAudioTimeStamp; + +// flags for the AudioTimeStamp sturcture +enum +{ + kIOAudioTimeStampSampleTimeValid = (1L << 0), + kIOAudioTimeStampHostTimeValid = (1L << 1), + kIOAudioTimeStampRateScalarValid = (1L << 2), + kIOAudioTimeStampWordClockTimeValid = (1L << 3), + kIOAudioTimeStampSMPTETimeValid = (1L << 4) +}; + +// Some commonly used combinations of timestamp flags +enum +{ + kIOAudioTimeStampSampleHostTimeValid = (kIOAudioTimeStampSampleTimeValid | kIOAudioTimeStampHostTimeValid) +}; + +/*! +* @enum IOAudioStreamDirection + * @abstract Represents the direction of an IOAudioStream + * @constant kIOAudioStreamDirectionOutput Output buffer + * @constant kIOAudioStreamDirectionInput Input buffer + */ + +typedef enum _IOAudioStreamDirection { + kIOAudioStreamDirectionOutput = 0, + kIOAudioStreamDirectionInput = 1 +} IOAudioStreamDirection; + +enum { + kIOAudioDeviceCanBeDefaultNothing = 0, + kIOAudioDeviceCanBeDefaultInput = (1L << 0), + kIOAudioDeviceCanBeDefaultOutput = (1L << 1), + kIOAudioDeviceCanBeSystemOutput = (1L << 2) +}; + +/*! + * @defined kIOAudioEngineDefaultMixBufferSampleSize + */ + +#define kIOAudioEngineDefaultMixBufferSampleSize sizeof(float) + +/* The following are for use only by the IOKit.framework audio family code */ + +/*! + * @enum IOAudioControlCalls + * @abstract The set of constants passed to IOAudioControlUserClient::getExternalMethodForIndex() when making calls + * from the IOAudioFamily user client code. + * @constant kIOAudioControlCallSetValue Used to set the value of an IOAudioControl. + * @constant kIOAudioControlCallGetValue Used to get the value of an IOAudioControl. + */ +typedef enum _IOAudioControlCalls { + kIOAudioControlCallSetValue = 0, + kIOAudioControlCallGetValue = 1 +} IOAudioControlCalls; + +/*! @defined kIOAudioControlNumCalls The number of elements in the IOAudioControlCalls enum. */ +#define kIOAudioControlNumCalls 2 + +/*! + * @enum IOAudioControlNotifications + * @abstract The set of constants passed in the type field of IOAudioControlUserClient::registerNotificaitonPort(). + * @constant kIOAudioControlValueChangeNotification Used to request value change notifications. + * @constant kIOAudioControlRangeChangeNotification Used to request range change notifications. + */ +typedef enum _IOAudioControlNotifications { + kIOAudioControlValueChangeNotification = 0, + kIOAudioControlRangeChangeNotification = 1 +} IOAudioControlNotifications; + +/*! + * @struct IOAudioNotificationMessage + * @abstract Used in the mach message for IOAudio notifications. + * @field messageHeader Standard mach message header + * @field ref The param passed to registerNotificationPort() in refCon. + */ +typedef struct _IOAudioNotificationMessage { + mach_msg_header_t messageHeader; + UInt32 type; + UInt32 ref; + void * sender; +} IOAudioNotificationMessage; + +typedef struct _IOAudioSampleRate { + UInt32 whole; + UInt32 fraction; +} IOAudioSampleRate; + +#define kNoIdleAudioPowerDown 0xffffffffffffffffULL + +enum { + kIOAudioPortTypeOutput = 'outp', + kIOAudioPortTypeInput = 'inpt', + kIOAudioPortTypeMixer = 'mixr', + kIOAudioPortTypePassThru = 'pass', + kIOAudioPortTypeProcessing = 'proc' +}; + +enum { + kIOAudioOutputPortSubTypeInternalSpeaker = 'ispk', + kIOAudioOutputPortSubTypeExternalSpeaker = 'espk', + kIOAudioOutputPortSubTypeHeadphones = 'hdpn', + kIOAudioOutputPortSubTypeLine = 'line', + kIOAudioOutputPortSubTypeSPDIF = 'spdf', + + kIOAudioInputPortSubTypeInternalMicrophone = 'imic', + kIOAudioInputPortSubTypeExternalMicrophone = 'emic', + kIOAudioInputPortSubTypeCD = 'cd ', + kIOAudioInputPortSubTypeLine = 'line', + kIOAudioInputPortSubTypeSPDIF = 'spdf' +}; + +enum { + kIOAudioControlTypeLevel = 'levl', + kIOAudioControlTypeToggle = 'togl', + kIOAudioControlTypeJack = 'jack', + kIOAudioControlTypeSelector = 'slct' +}; + +enum { + kIOAudioLevelControlSubTypeVolume = 'vlme', + kIOAudioLevelControlSubTypeLFEVolume = 'subv', + kIOAudioLevelControlSubTypePRAMVolume = 'pram', + kIOAudioToggleControlSubTypeMute = 'mute', + kIOAudioToggleControlSubTypeSolo = 'solo', + kIOAudioToggleControlSubTypeLFEMute = 'subm', + kIOAudioToggleControlSubTypeiSubAttach = 'atch', + kIOAudioSelectorControlSubTypeOutput = 'outp', + kIOAudioSelectorControlSubTypeInput = 'inpt', + kIOAudioSelectorControlSubTypeClockSource = 'clck', + kIOAudioSelectorControlSubTypeDestination = 'dest', + kIOAudioSelectorControlSubTypeChannelNominalLineLevel = 'nlev', + kIOAudioSelectorControlSubTypeChannelLevelPlus4dBu = '4dbu', + kIOAudioSelectorControlSubTypeChannelLevelMinus10dBV = '10db', + kIOAudioSelectorControlSubTypeChannelLevelMinus20dBV = '20db', + kIOAudioSelectorControlSubTypeChannelLevelMicLevel = 'micl', + kIOAudioSelectorControlSubTypeChannelLevelInstrumentLevel = 'istl' +}; + +enum { + kIOAudioControlUsageOutput = 'outp', + kIOAudioControlUsageInput = 'inpt', + kIOAudioControlUsagePassThru = 'pass', + kIOAudioControlUsageCoreAudioProperty = 'prop' +}; + +enum { + kIOAudioControlChannelNumberInactive = -1, + kIOAudioControlChannelIDAll = 0, + kIOAudioControlChannelIDDefaultLeft = 1, + kIOAudioControlChannelIDDefaultRight = 2, + kIOAudioControlChannelIDDefaultCenter = 3, + kIOAudioControlChannelIDDefaultLeftRear = 4, + kIOAudioControlChannelIDDefaultRightRear = 5, + kIOAudioControlChannelIDDefaultSub = 6, + kIOAudioControlChannelIDDefaultFrontLeftCenter = 7, + kIOAudioControlChannelIDDefaultFrontRightCenter = 8, + kIOAudioControlChannelIDDefaultRearCenter = 9, + kIOAudioControlChannelIDDefaultSurroundLeft = 10, + kIOAudioControlChannelIDDefaultSurroundRight = 11 +}; + +enum { + kIOAudioSelectorControlSelectionValueNone = 'none', + + // Output-specific selection IDs + kIOAudioSelectorControlSelectionValueInternalSpeaker = 'ispk', + kIOAudioSelectorControlSelectionValueExternalSpeaker = 'espk', + kIOAudioSelectorControlSelectionValueHeadphones = 'hdpn', + + // Input-specific selection IDs + kIOAudioSelectorControlSelectionValueInternalMicrophone = 'imic', + kIOAudioSelectorControlSelectionValueExternalMicrophone = 'emic', + kIOAudioSelectorControlSelectionValueCD = 'cd ', + + // Common selection IDs + kIOAudioSelectorControlSelectionValueLine = 'line', + kIOAudioSelectorControlSelectionValueSPDIF = 'spdf' +}; + +enum { + kIOAudioStreamSampleFormatLinearPCM = 'lpcm', + kIOAudioStreamSampleFormatIEEEFloat = 'ieee', + kIOAudioStreamSampleFormatALaw = 'alaw', + kIOAudioStreamSampleFormatMuLaw = 'ulaw', + kIOAudioStreamSampleFormatMPEG = 'mpeg', + kIOAudioStreamSampleFormatAC3 = 'ac-3', + kIOAudioStreamSampleFormat1937AC3 = 'cac3', + kIOAudioStreamSampleFormat1937MPEG1 = 'mpg1', + kIOAudioStreamSampleFormat1937MPEG2 = 'mpg2', + kIOAudioStreamSampleFormatTimeCode = 'time' // a stream of IOAudioTimeStamp structures that capture any incoming time code information +}; + +enum { + kIOAudioStreamNumericRepresentationSignedInt = 'sint', + kIOAudioStreamNumericRepresentationUnsignedInt = 'uint', + kIOAudioStreamNumericRepresentationIEEE754Float = 'flot' +}; + +enum { + kIOAudioClockSelectorTypeInternal = 'int ', + kIOAudioClockSelectorTypeExternal = 'ext ', + kIOAudioClockSelectorTypeAESEBU = 'asbu', + kIOAudioClockSelectorTypeTOSLink = 'tosl', + kIOAudioClockSelectorTypeSPDIF = 'spdf', + kIOAudioClockSelectorTypeADATOptical = 'adto', + kIOAudioClockSelectorTypeADAT9Pin = 'adt9', + kIOAudioClockSelectorTypeSMPTE = 'smpt', + kIOAudioClockSelectorTypeVideo = 'vdeo', + kIOAudioClockSelectorTypeControl = 'cnrl', + kIOAudioClockSelectorTypeOther = 'othr', +}; + +enum { + kIOAudioStreamAlignmentLowByte = 0, + kIOAudioStreamAlignmentHighByte = 1 +}; + +enum { + kIOAudioStreamByteOrderBigEndian = 0, + kIOAudioStreamByteOrderLittleEndian = 1 +}; + +enum { + kIOAudioLevelControlNegativeInfinity = 0xffffffff +}; + +enum { + kIOAudioNewClockDomain = 0xffffffff +}; + +// Device connection types +#ifndef __OPEN_SOURCE__ +// Added kIOAudioDeviceTransportTypeDisplayPort +#endif +enum { + kIOAudioDeviceTransportTypeBuiltIn = 'bltn', + kIOAudioDeviceTransportTypePCI = 'pci ', + kIOAudioDeviceTransportTypeUSB = 'usb ', + kIOAudioDeviceTransportTypeFireWire = '1394', + kIOAudioDeviceTransportTypeNetwork = 'ntwk', + kIOAudioDeviceTransportTypeWireless = 'wrls', + kIOAudioDeviceTransportTypeOther = 'othr', + kIOAudioDeviceTransportTypeBluetooth = 'blue', + kIOAudioDeviceTransportTypeVirtual = 'virt', + kIOAudioDeviceTransportTypeDisplayPort = 'dprt', + kIOAudioDeviceTransportTypeHdmi = 'hdmi' + +}; + +// types that go nowhere +enum { + OUTPUT_NULL = 0x0100, + INPUT_NULL = 0x0101 +}; + +// Input terminal types +enum { + INPUT_UNDEFINED = 0x0200, + INPUT_MICROPHONE = 0x0201, + INPUT_DESKTOP_MICROPHONE = 0x0202, + INPUT_PERSONAL_MICROPHONE = 0x0203, + INPUT_OMNIDIRECTIONAL_MICROPHONE = 0x0204, + INPUT_MICROPHONE_ARRAY = 0x0205, + INPUT_PROCESSING_MICROPHONE_ARRAY = 0x0206, + INPUT_MODEM_AUDIO = 0x207 +}; + +// Output terminal types +enum { + OUTPUT_UNDEFINED = 0x0300, + OUTPUT_SPEAKER = 0x0301, + OUTPUT_HEADPHONES = 0x0302, + OUTPUT_HEAD_MOUNTED_DISPLAY_AUDIO = 0x0303, + OUTPUT_DESKTOP_SPEAKER = 0x0304, + OUTPUT_ROOM_SPEAKER = 0x0305, + OUTPUT_COMMUNICATION_SPEAKER = 0x0306, + OUTPUT_LOW_FREQUENCY_EFFECTS_SPEAKER = 0x0307 +}; + +// Bi-directional terminal types +enum { + BIDIRECTIONAL_UNDEFINED = 0x0400, + BIDIRECTIONAL_HANDSET = 0x0401, + BIDIRECTIONAL_HEADSET = 0x0402, + BIDIRECTIONAL_SPEAKERPHONE_NO_ECHO_REDX = 0x0403, + BIDIRECTIONAL_ECHO_SUPPRESSING_SPEAKERPHONE = 0x0404, + BIDIRECTIONAL_ECHO_CANCELING_SPEAKERPHONE = 0x0405 +}; + +// Telephony terminal types +enum { + TELEPHONY_UNDEFINED = 0x0500, + TELEPHONY_PHONE_LINE = 0x0501, + TELEPHONY_TELEPHONE = 0x0502, + TELEPHONY_DOWN_LINE_PHONE = 0x0503 +}; + +// External terminal types +enum { + EXTERNAL_UNDEFINED = 0x0600, + EXTERNAL_ANALOG_CONNECTOR = 0x0601, + EXTERNAL_DIGITAL_AUDIO_INTERFACE = 0x0602, + EXTERNAL_LINE_CONNECTOR = 0x0603, + EXTERNAL_LEGACY_AUDIO_CONNECTOR = 0x0604, + EXTERNAL_SPDIF_INTERFACE = 0x0605, + EXTERNAL_1394_DA_STREAM = 0x0606, + EXTERNAL_1394_DV_STREAM_SOUNDTRACK = 0x0607, + EXTERNAL_ADAT = 0x0608, + EXTERNAL_TDIF = 0x0609, + EXTERNAL_MADI = 0x060A +}; + +// Embedded terminal types +enum { + EMBEDDED_UNDEFINED = 0x0700, + EMBEDDED_LEVEL_CALIBRATION_NOISE_SOURCE = 0x0701, + EMBEDDED_EQUALIZATION_NOISE = 0x0702, + EMBEDDED_CD_PLAYER = 0x0703, + EMBEDDED_DAT = 0x0704, + EMBEDDED_DCC = 0x0705, + EMBEDDED_MINIDISK = 0x0706, + EMBEDDED_ANALOG_TAPE = 0x0707, + EMBEDDED_PHONOGRAPH = 0x0708, + EMBEDDED_VCR_AUDIO = 0x0709, + EMBEDDED_VIDEO_DISC_AUDIO = 0x070A, + EMBEDDED_DVD_AUDIO = 0x070B, + EMBEDDED_TV_TUNER_AUDIO = 0x070C, + EMBEDDED_SATELLITE_RECEIVER_AUDIO = 0x070D, + EMBEDDED_CABLE_TUNER_AUDIO = 0x070E, + EMBEDDED_DSS_AUDIO = 0x070F, + EMBEDDED_RADIO_RECEIVER = 0x0710, + EMBEDDED_RADIO_TRANSMITTER = 0x0711, + EMBEDDED_MULTITRACK_RECORDER = 0x0712, + EMBEDDED_SYNTHESIZER = 0x0713 +}; + +// Processing terminal types +enum { + PROCESSOR_UNDEFINED = 0x0800, + PROCESSOR_GENERAL = 0x0801 +}; + +// Channel spatial position types + +#ifndef __OPEN_SOURCE__ +// NOTE: the following are derived from CoreAudioTypes.h +#endif + +#define kIOAudioChannelLabel_Discrete_field_ba 16 +enum { + kIOAudioChannelLabel_Unknown = 0xFFFFFFFF, // unknown or unspecified other use + kIOAudioChannelLabel_Unused = 0, // channel is present, but has no intended use or destination + kIOAudioChannelLabel_UseCoordinates = 100, // channel is described by the mCoordinates fields. + + kIOAudioChannelLabel_Left = 1, + kIOAudioChannelLabel_Right = 2, + kIOAudioChannelLabel_Center = 3, + kIOAudioChannelLabel_LFEScreen = 4, + kIOAudioChannelLabel_LeftSurround = 5, // WAVE: "Back Left" + kIOAudioChannelLabel_RightSurround = 6, // WAVE: "Back Right" + kIOAudioChannelLabel_LeftCenter = 7, + kIOAudioChannelLabel_RightCenter = 8, + kIOAudioChannelLabel_CenterSurround = 9, // WAVE: "Back Center" or plain "Rear Surround" + kIOAudioChannelLabel_LeftSurroundDirect = 10, // WAVE: "Side Left" + kIOAudioChannelLabel_RightSurroundDirect = 11, // WAVE: "Side Right" + kIOAudioChannelLabel_TopCenterSurround = 12, + kIOAudioChannelLabel_VerticalHeightLeft = 13, // WAVE: "Top Front Left" + kIOAudioChannelLabel_VerticalHeightCenter = 14, // WAVE: "Top Front Center" + kIOAudioChannelLabel_VerticalHeightRight = 15, // WAVE: "Top Front Right" + + kIOAudioChannelLabel_TopBackLeft = 16, + kIOAudioChannelLabel_TopBackCenter = 17, + kIOAudioChannelLabel_TopBackRight = 18, + + kIOAudioChannelLabel_RearSurroundLeft = 33, + kIOAudioChannelLabel_RearSurroundRight = 34, + kIOAudioChannelLabel_LeftWide = 35, + kIOAudioChannelLabel_RightWide = 36, + kIOAudioChannelLabel_LFE2 = 37, + kIOAudioChannelLabel_LeftTotal = 38, // matrix encoded 4 channels + kIOAudioChannelLabel_RightTotal = 39, // matrix encoded 4 channels + kIOAudioChannelLabel_HearingImpaired = 40, + kIOAudioChannelLabel_Narration = 41, + kIOAudioChannelLabel_Mono = 42, + kIOAudioChannelLabel_DialogCentricMix = 43, + + kIOAudioChannelLabel_CenterSurroundDirect = 44, // back center, non diffuse + + kIOAudioChannelLabel_Haptic = 45, + + // first order ambisonic channels + kIOAudioChannelLabel_Ambisonic_W = 200, + kIOAudioChannelLabel_Ambisonic_X = 201, + kIOAudioChannelLabel_Ambisonic_Y = 202, + kIOAudioChannelLabel_Ambisonic_Z = 203, + + // Mid/Side Recording + kIOAudioChannelLabel_MS_Mid = 204, + kIOAudioChannelLabel_MS_Side = 205, + + // X-Y Recording + kIOAudioChannelLabel_XY_X = 206, + kIOAudioChannelLabel_XY_Y = 207, + + // other + kIOAudioChannelLabel_HeadphonesLeft = 301, + kIOAudioChannelLabel_HeadphonesRight = 302, + kIOAudioChannelLabel_ClickTrack = 304, + kIOAudioChannelLabel_ForeignLanguage = 305, + + // generic discrete channel + kIOAudioChannelLabel_Discrete = 400, + + // numbered discrete channel + kIOAudioChannelLabel_Discrete_0 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 0, + kIOAudioChannelLabel_Discrete_1 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 1, + kIOAudioChannelLabel_Discrete_2 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 2, + kIOAudioChannelLabel_Discrete_3 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 3, + kIOAudioChannelLabel_Discrete_4 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 4, + kIOAudioChannelLabel_Discrete_5 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 5, + kIOAudioChannelLabel_Discrete_6 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 6, + kIOAudioChannelLabel_Discrete_7 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 7, + kIOAudioChannelLabel_Discrete_8 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 8, + kIOAudioChannelLabel_Discrete_9 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 9, + kIOAudioChannelLabel_Discrete_10 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 10, + kIOAudioChannelLabel_Discrete_11 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 11, + kIOAudioChannelLabel_Discrete_12 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 12, + kIOAudioChannelLabel_Discrete_13 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 13, + kIOAudioChannelLabel_Discrete_14 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 14, + kIOAudioChannelLabel_Discrete_15 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 15, + kIOAudioChannelLabel_Discrete_65535 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 65535 +}; + + + +#endif /* _IOKIT_IOAUDIOTYPES_H */ diff --git a/i386/include/IOKit/avc/IOFireWireAVCCommand.h b/i386/include/IOKit/avc/IOFireWireAVCCommand.h new file mode 100644 index 0000000..ff9850d --- /dev/null +++ b/i386/include/IOKit/avc/IOFireWireAVCCommand.h @@ -0,0 +1,94 @@ +/* + * Copyright (c) 1998-2001 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _IOKIT_IOFireWireAVCCommand_H +#define _IOKIT_IOFireWireAVCCommand_H + +#include + +/*! @class IOFireWireAVCCommand +*/ +class IOFireWireAVCCommand : public IOFWCommand +{ + OSDeclareDefaultStructors(IOFireWireAVCCommand) + +protected: + IOFWCommand *fWriteCmd; + IOMemoryDescriptor *fMem; + const UInt8 *fCommand; + + UInt32 fCmdLen; + UInt8 *fResponse; + UInt32 *fResponseLen; + int fCurRetries; + int fMaxRetries; + + UInt32 fWriteGen; + UInt16 fWriteNodeID; + bool bypassRobustCommandResponseMatching; + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { + bool fStarted; + bool fSyncWakeupSignaled; + }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *fIOFireWireAVCCommandExpansion; + + static void writeDone(void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd); + + virtual IOReturn complete(IOReturn status); + virtual IOReturn execute(); + virtual void free(); + +public: + virtual bool init(IOFireWireNub *device, const UInt8 * command, UInt32 cmdLen, + UInt8 * response, UInt32 * responseLen); + virtual IOReturn reinit(IOFireWireNub *device, const UInt8 * command, UInt32 cmdLen, + UInt8 * response, UInt32 * responseLen); + + static IOFireWireAVCCommand *withNub(IOFireWireNub *device, const UInt8 * command, UInt32 cmdLen, + UInt8 * response, UInt32 * responseLen); + + static IOFireWireAVCCommand *withNub(IOFireWireNub *device, UInt32 generation, + const UInt8 * command, UInt32 cmdLen, UInt8 * response, UInt32 * responseLen); + + virtual UInt32 handleResponse(UInt16 nodeID, UInt32 len, const void *buf); + + virtual IOReturn resetInterimTimeout(); + + virtual UInt32 handleResponseWithSimpleMatching(UInt16 nodeID, UInt32 len, const void *buf); + + virtual IOReturn submit(bool queue = false); + +private: + OSMetaClassDeclareReservedUsed(IOFireWireAVCCommand, 0); + OSMetaClassDeclareReservedUnused(IOFireWireAVCCommand, 1); + OSMetaClassDeclareReservedUnused(IOFireWireAVCCommand, 2); + OSMetaClassDeclareReservedUnused(IOFireWireAVCCommand, 3); +}; + +#endif // _IOKIT_IOFireWireAVCCommand_H + diff --git a/i386/include/IOKit/avc/IOFireWireAVCConsts.h b/i386/include/IOKit/avc/IOFireWireAVCConsts.h new file mode 100644 index 0000000..ae7a12c --- /dev/null +++ b/i386/include/IOKit/avc/IOFireWireAVCConsts.h @@ -0,0 +1,259 @@ +/* + * Copyright (c) 1998-2001 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _IOKIT_IOFIREWIREAVCCONSTS_H +#define _IOKIT_IOFIREWIREAVCCONSTS_H + +// Fields of AVC frame +typedef enum { + kAVCCommandResponse = 0, + kAVCAddress = 1, + kAVCOpcode = 2, + kAVCOperand0 = 3, + kAVCOperand1 = 4, + kAVCOperand2 = 5, + kAVCOperand3 = 6, + kAVCOperand4 = 7, + kAVCOperand5 = 8, + kAVCOperand6 = 9, + kAVCOperand7 = 10, + kAVCOperand8 = 11 +} IOAVCFrameFields; + +// Command/Response values +typedef enum { + kAVCControlCommand = 0x00, + kAVCStatusInquiryCommand = 0x01, + kAVCSpecificInquiryCommand = 0x02, + kAVCNotifyCommand = 0x03, + kAVCGeneralInquiryCommand = 0x04, + kAVCNotImplementedStatus = 0x08, + kAVCAcceptedStatus = 0x09, + kAVCRejectedStatus = 0x0a, + kAVCInTransitionStatus = 0x0b, + kAVCImplementedStatus = 0x0c, + kAVCChangedStatus = 0x0d, + kAVCInterimStatus = 0x0f +} IOAVCCommandResponse; + +// Opcodes +typedef enum { + + // Unit commands + kAVCPlugInfoOpcode = 0x02, + kAVCOutputPlugSignalFormatOpcode = 0x18, + kAVCInputPlugSignalFormatOpcode = 0x19, + kAVCUnitInfoOpcode = 0x30, + kAVCSubunitInfoOpcode = 0x31, + kAVCConnectionsOpcode = 0x22, + kAVCConnectOpcode = 0x24, + kAVCDisconnectOpcode = 0x25, + kAVCPowerOpcode = 0xB2, + kAVCSignalSourceOpcode = 0x1A, + + // Vendor dependent commands + kAVCVendorDependentOpcode = 0x00, + + // Subunit commands + kAVCOutputSignalModeOpcode = 0x78, + kAVCInputSignalModeOpcode = 0x79, + kAVCSignalModeSD525_60 = 0x00, + kAVCSignalModeSDL525_60 = 0x04, + kAVCSignalModeHD1125_60 = 0x08, + kAVCSignalModeSD625_50 = 0x80, + kAVCSignalModeSDL625_50 = 0x84, + kAVCSignalModeHD1250_50 = 0x88, + kAVCSignalModeDVCPro525_60 = 0x78, + kAVCSignalModeDVCPro625_50 = 0xf8, + + kAVCSignalModeDummyOperand = 0xff, + kAVCSignalModeMask_50 = 0x80, + kAVCSignalModeMask_STYPE = 0x7c, + kAVCSignalModeMask_SDL = 0x04, + kAVCSignalModeMask_DVCPro25 = 0x78 + +} IOAVCOpcodes; + +// Unit/Subunit types +typedef enum { + kAVCVideoMonitor = 0x00, + kAVCAudio = 0x01, + kAVCPrinter = 0x02, + kAVCDiskRecorder = 0x03, + kAVCTapeRecorder = 0x04, + kAVCTuner = 0x05, + kAVCVideoCamera = 0x07, + kAVCCameraStorage = 0x0b, + kAVCVendorUnique = 0x1c, + kAVCNumSubUnitTypes = 0x20 +} IOAVCUnitTypes; + +#define kAVCAllOpcodes 0xFF +#define kAVCAllSubunitsAndUnit 0xEE +#define kAVCMaxNumPlugs 31 +#define kAVCAnyAvailableIsochPlug 0x7F +#define kAVCAnyAvailableExternalPlug 0xFF +#define kAVCAnyAvailableSubunitPlug 0xFF +#define kAVCMultiplePlugs 0xFD +#define kAVCInvalidPlug 0xFE + + +#define IOAVCAddress(type, id) (((type) << 3) | (id)) +#define kAVCUnitAddress 0xff +#define IOAVCType(address) ((address) >> 3) +#define IOAVCId(address) ((address) & 0x7) + +// Macros for Plug Control Register field manipulation + +// Master control registers +#define kIOFWPCRDataRate FWBitRange(0,1) +#define kIOFWPCRDataRatePhase FWBitRangePhase(0,1) +#define kIOFWPCRExtension FWBitRange(8,15) +#define kIOFWPCRExtensionPhase FWBitRangePhase(8,15) +#define kIOFWPCRNumPlugs FWBitRange(27,31) +#define kIOFWPCRNumPlugsPhase FWBitRangePhase(27,31) + +// master output register +#define kIOFWPCRBroadcastBase FWBitRange(2,7) +#define kIOFWPCRBroadcastBasePhase FWBitRangePhase(2,7) + +// plug registers +#define kIOFWPCROnline FWBitRange(0,0) +#define kIOFWPCROnlinePhase FWBitRangePhase(0,0) +#define kIOFWPCRBroadcast FWBitRange(1,1) +#define kIOFWPCRBroadcastPhase FWBitRangePhase(1,1) +#define kIOFWPCRP2PCount FWBitRange(2,7) +#define kIOFWPCRP2PCountPhase FWBitRangePhase(2,7) +#define kIOFWPCRChannel FWBitRange(10,15) +#define kIOFWPCRChannelPhase FWBitRangePhase(10,15) + +// Extra fields for output plug registers +#define kIOFWPCROutputDataRate FWBitRange(16,17) +#define kIOFWPCROutputDataRatePhase FWBitRangePhase(16,17) +#define kIOFWPCROutputOverhead FWBitRange(18,21) +#define kIOFWPCROutputOverheadPhase FWBitRangePhase(18,21) +#define kIOFWPCROutputPayload FWBitRange(22,31) +#define kIOFWPCROutputPayloadPhase FWBitRangePhase(22,31) + +// async plug numbers + +enum +{ + kFWAVCAsyncPlug0 = 0xa0, + kFWAVCAsyncPlug1 = 0xa1, + kFWAVCAsyncPlug2 = 0xa2, + kFWAVCAsyncPlug3 = 0xa3, + kFWAVCAsyncPlug4 = 0xa4, + kFWAVCAsyncPlug5 = 0xa5, + kFWAVCAsyncPlug6 = 0xa6, + kFWAVCAsyncPlug7 = 0xa7, + kFWAVCAsyncPlug8 = 0xa8, + kFWAVCAsyncPlug9 = 0xa9, + kFWAVCAsyncPlug10 = 0xa1, + kFWAVCAsyncPlug11 = 0xab, + kFWAVCAsyncPlug12 = 0xac, + kFWAVCAsyncPlug13 = 0xad, + kFWAVCAsyncPlug14 = 0xae, + kFWAVCAsyncPlug15 = 0xaf, + kFWAVCAsyncPlug16 = 0xb0, + kFWAVCAsyncPlug17 = 0xb1, + kFWAVCAsyncPlug18 = 0xb2, + kFWAVCAsyncPlug19 = 0xb3, + kFWAVCAsyncPlug20 = 0xb4, + kFWAVCAsyncPlug21 = 0xb5, + kFWAVCAsyncPlug22 = 0xb6, + kFWAVCAsyncPlug23 = 0xb7, + kFWAVCAsyncPlug24 = 0xb8, + kFWAVCAsyncPlug25 = 0xb9, + kFWAVCAsyncPlug26 = 0xba, + kFWAVCAsyncPlug27 = 0xbb, + kFWAVCAsyncPlug28 = 0xbc, + kFWAVCAsyncPlug29 = 0xbd, + kFWAVCAsyncPlug30 = 0xbe, + kFWAVCAsyncPlugAny = 0xbf +}; + +enum +{ + kFWAVCStateBusSuspended = 0, + kFWAVCStateBusResumed = 1, + kFWAVCStatePlugReconnected = 2, + kFWAVCStatePlugDisconnected = 3, + kFWAVCStateDeviceRemoved = 4 +}; + +enum +{ + kFWAVCConsumerMode_MORE = 1, + kFWAVCConsumerMode_LAST = 4, + kFWAVCConsumerMode_LESS = 5, + kFWAVCConsumerMode_JUNK = 6, + kFWAVCConsumerMode_LOST = 7 +}; + +enum +{ + kFWAVCProducerMode_SEND = 5, + kFWAVCProducerMode_TOSS = 7 +}; + + +typedef enum +{ + IOFWAVCPlugSubunitSourceType, + IOFWAVCPlugSubunitDestType, + IOFWAVCPlugIsochInputType, + IOFWAVCPlugIsochOutputType, + IOFWAVCPlugAsynchInputType, + IOFWAVCPlugAsynchOutputType, + IOFWAVCPlugExternalInputType, + IOFWAVCPlugExternalOutputType +} IOFWAVCPlugTypes; + +typedef enum +{ + kIOFWAVCSubunitPlugMsgConnected, + kIOFWAVCSubunitPlugMsgDisconnected, + kIOFWAVCSubunitPlugMsgConnectedPlugModified, + kIOFWAVCSubunitPlugMsgSignalFormatModified +} IOFWAVCSubunitPlugMessages; + +// Some plug signal formats +#define kAVCPlugSignalFormatNTSCDV 0x80000000 +#define kAVCPlugSignalFormatPalDV 0x80800000 +#define kAVCPlugSignalFormatMPEGTS 0xA0000000 + +// Possible states of an AVCAsynchronousCommand +typedef enum +{ + kAVCAsyncCommandStatePendingRequest, + kAVCAsyncCommandStateRequestSent, + kAVCAsyncCommandStateRequestFailed, + kAVCAsyncCommandStateWaitingForResponse, + kAVCAsyncCommandStateReceivedInterimResponse, + kAVCAsyncCommandStateReceivedFinalResponse, + kAVCAsyncCommandStateTimeOutBeforeResponse, + kAVCAsyncCommandStateBusReset, + kAVCAsyncCommandStateOutOfMemory, + kAVCAsyncCommandStateCanceled +} IOFWAVCAsyncCommandState; + +#endif // _IOKIT_IOFIREWIREAVCCONSTS_H diff --git a/i386/include/IOKit/avc/IOFireWireAVCRequestSpace.h b/i386/include/IOKit/avc/IOFireWireAVCRequestSpace.h new file mode 100644 index 0000000..c02797f --- /dev/null +++ b/i386/include/IOKit/avc/IOFireWireAVCRequestSpace.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2001 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * + * IOFireWirePCRSpace.h + * + * Class to multiplex access to the FCP request address. + */ +#ifndef _IOKIT_IOFIREWIREAVCREQUESTSPACE_H +#define _IOKIT_IOFIREWIREAVCREQUESTSPACE_H + +#endif /* _IOKIT_IOFIREWIREAVCREQUESTSPACE_H */ diff --git a/i386/include/IOKit/avc/IOFireWireAVCTargetSpace.h b/i386/include/IOKit/avc/IOFireWireAVCTargetSpace.h new file mode 100644 index 0000000..4f3cdb0 --- /dev/null +++ b/i386/include/IOKit/avc/IOFireWireAVCTargetSpace.h @@ -0,0 +1,297 @@ +/* + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * + * IOFireWireAVCTargetSpace.h + * + * Class to centralize the AVC Target mode support + * + */ + +#ifndef _IOKIT_IOFIREWIREAVCTARGETSPACE_H +#define _IOKIT_IOFIREWIREAVCTARGETSPACE_H + +#include +#include + +#include +#include +#include +#include + +class IOFireWireAVCProtocolUserClient; +class AVCCommandHandlerInfo; +class AVCSubunitInfo; + +typedef void (*IOFireWireAVCTargetCommandHandlerCallback)(const AVCCommandHandlerInfo *pCmdInfo, + UInt32 generation, + UInt16 nodeID, + const void *command, + UInt32 cmdLen, + IOFWSpeed &speed, + UInt32 handlerSearchIndex); + +typedef void (*IOFireWireAVCSubunitPlugHandlerCallback)(const AVCSubunitInfo *pSubunitInfo, + IOFWAVCSubunitPlugMessages plugMessage, + IOFWAVCPlugTypes plugType, + UInt32 plugNum, + UInt32 messageParams, + UInt32 generation, + UInt16 nodeID); + +/*! +@class AVCCommandHandlerInfo +@abstract internal class to manage installed command handlers +*/ +class AVCCommandHandlerInfo : public OSObject +{ + OSDeclareDefaultStructors(AVCCommandHandlerInfo) +public: + IOFireWireAVCProtocolUserClient * userClient; + IOFireWireAVCTargetCommandHandlerCallback callBack; + OSAsyncReference64 asyncRef; + UInt32 subUnitTypeAndID; + UInt32 opCode; + uint64_t userCallBack; + uint64_t userRefCon; +}; + +typedef struct _AVCSubunitPlugRecord +{ + UInt32 plugSignalFormat; + UInt32 connectionCount; +}AVCSubunitPlugRecord; + +/*! +@class AVCSubunitInfo +@abstract internal class to manage installed subunits +*/ +class AVCSubunitInfo : public OSObject +{ + OSDeclareDefaultStructors(AVCSubunitInfo) + bool init(); + void free(); +public: + static AVCSubunitInfo *create(); + IOFireWireAVCProtocolUserClient * userClient; + IOFireWireAVCSubunitPlugHandlerCallback callBack; + OSAsyncReference64 asyncRef; + UInt32 subunitTypeAndID; + UInt32 numSourcePlugs; + UInt32 numDestPlugs; + uint64_t userCallBack; + uint64_t userRefCon; + AVCSubunitPlugRecord *sourcePlugRecords; + AVCSubunitPlugRecord *destPlugRecords; +}; + +typedef struct _AVCUnitPlugRecord +{ + UInt32 connectionCount; +}AVCUnitPlugRecord; + +typedef struct _AVCUnitPlugs +{ + UInt32 numIsochInPlugs; + UInt32 numIsochOutPlugs; + UInt32 numExternalInPlugs; + UInt32 numExternalOutPlugs; + AVCUnitPlugRecord isochInPlugRecord[kAVCMaxNumPlugs]; + AVCUnitPlugRecord isochOutPlugRecord[kAVCMaxNumPlugs]; + AVCUnitPlugRecord externalInPlugRecord[kAVCMaxNumPlugs]; + AVCUnitPlugRecord externalOutPlugRecord[kAVCMaxNumPlugs]; +}AVCUnitPlugs; + +/*! +@class UCInfo +@abstract internal class to manage multiple protocol user clients +*/ +class UCInfo : public OSObject +{ + OSDeclareDefaultStructors(UCInfo) +public: + IOFireWireAVCProtocolUserClient *fUserClient; +}; + +/*! +@class AVCConnectionRecord +@abstract internal class to manage AVC connections +*/ +class AVCConnectionRecord : public OSObject +{ + OSDeclareDefaultStructors(AVCConnectionRecord) +public: + UInt32 sourceSubunitTypeAndID; + IOFWAVCPlugTypes sourcePlugType; + UInt32 sourcePlugNum; + UInt32 destSubunitTypeAndID; + IOFWAVCPlugTypes destPlugType; + UInt32 destPlugNum; + bool lockConnection; + bool permConnection; +}; + +/*! +@class IOFireWireAVCTargetSpace +@abstract object to centralize the AVC Target mode support +*/ +class IOFireWireAVCTargetSpace : public IOFWPseudoAddressSpace +{ + OSDeclareDefaultStructors(IOFireWireAVCTargetSpace) + +protected: + UInt32 fBuf[512]; + UInt32 fActivations; + IOFireWireController *fController; + IOLocalConfigDirectory * fAVCLocalConfigDirectory; + OSArray * fUserClients; + OSArray * fCommandHandlers; + OSArray * fSubunits; + OSArray * fConnectionRecords; + AVCUnitPlugs fUnitPlugs; + IORecursiveLock * fLock; + + /*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + virtual UInt32 doWrite(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, + const void *buf, IOFWRequestRefCon refcon); + + + IOReturn targetSendAVCResponse(UInt32 generation, UInt16 nodeID, IOBufferMemoryDescriptor *pBufMemDesc, UInt32 size); + + // Internal AVC Target Command Handlers + IOReturn handleUnitInfoCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); + IOReturn handleSubUnitInfoCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); + IOReturn handlePlugInfoCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); + IOReturn handlePowerCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); + IOReturn handleConnectCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); + IOReturn handleDisconnectCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); + IOReturn handleInputPlugSignalFormatCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); + IOReturn handleOutputPlugSignalFormatCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); + IOReturn handleConnectionsCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); + IOReturn handleSignalSourceCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); + + UInt32 subUnitOfTypeCount(UInt32 type); + AVCSubunitInfo *getSubunitInfo(UInt32 subunitTypeAndID); + bool canConnectDestPlug(UInt32 destSubunitTypeAndID, + IOFWAVCPlugTypes destPlugType, + UInt32 *destPlugNum); + +public: + + // Activate/Deactivate Functions + virtual IOReturn activateWithUserClient(IOFireWireAVCProtocolUserClient *userClient); + virtual void deactivateWithUserClient(IOFireWireAVCProtocolUserClient *userClient); + + /*! + @function init + @abstract initializes the IOFireWireAVCTargetSpace object + */ + virtual bool init(IOFireWireController *controller); + + /*! + @function getAVCTargetSpace + @abstract returns the IOFireWireAVCTargetSpace object for the given FireWire bus + @param bus The FireWire bus + */ + static IOFireWireAVCTargetSpace *getAVCTargetSpace(IOFireWireController *controller); + + /*! + @function publishAVCUnitDirectory + @abstract Creates a local AVC Unit directory if it doesn't already exist + */ + virtual IOReturn publishAVCUnitDirectory(void); + + virtual IOReturn installAVCCommandHandler(IOFireWireAVCProtocolUserClient *userClient, + IOFireWireAVCTargetCommandHandlerCallback callBack, + OSAsyncReference64 asyncRef, + UInt32 subUnitTypeAndID, + UInt32 opCode, + uint64_t userCallBack, + uint64_t userRefCon); + + virtual IOReturn addSubunit(IOFireWireAVCProtocolUserClient *userClient, + IOFireWireAVCSubunitPlugHandlerCallback callBack, + OSAsyncReference64 asyncRef, + UInt32 subunitType, + UInt32 numSourcePlugs, + UInt32 numDestPlugs, + uint64_t userCallBack, + uint64_t userRefCon, + UInt32 *subUnitID); + + virtual IOReturn setSubunitPlugSignalFormat(IOFireWireAVCProtocolUserClient *userClient, + UInt32 subunitTypeAndID, + IOFWAVCPlugTypes plugType, + UInt32 plugNum, + UInt32 signalFormat); + + virtual IOReturn getSubunitPlugSignalFormat(IOFireWireAVCProtocolUserClient *userClient, + UInt32 subunitTypeAndID, + IOFWAVCPlugTypes plugType, + UInt32 plugNum, + UInt32 *pSignalFormat); + + virtual IOReturn connectTargetPlugs(IOFireWireAVCProtocolUserClient *userClient, + AVCConnectTargetPlugsInParams *inParams, + AVCConnectTargetPlugsOutParams *outParams); + + virtual IOReturn disconnectTargetPlugs(IOFireWireAVCProtocolUserClient *userClient, + UInt32 sourceSubunitTypeAndID, + IOFWAVCPlugTypes sourcePlugType, + UInt32 sourcePlugNum, + UInt32 destSubunitTypeAndID, + IOFWAVCPlugTypes destPlugType, + UInt32 destPlugNum); + + virtual IOReturn getTargetPlugConnection(IOFireWireAVCProtocolUserClient *userClient, + AVCGetTargetPlugConnectionInParams *inParams, + AVCGetTargetPlugConnectionOutParams *outParams); + + virtual IOReturn findAVCRequestHandler(IOFireWireAVCProtocolUserClient *userClient, + UInt32 generation, + UInt16 nodeID, + IOFWSpeed speed, + UInt32 handlerSearchIndex, + const char *pCmdBuf, + UInt32 cmdLen); + + virtual void pcrModified(IOFWAVCPlugTypes plugType, + UInt32 plugNum, + UInt32 newValue); + +private: + OSMetaClassDeclareReservedUnused(IOFireWireAVCTargetSpace, 0); + OSMetaClassDeclareReservedUnused(IOFireWireAVCTargetSpace, 1); + OSMetaClassDeclareReservedUnused(IOFireWireAVCTargetSpace, 2); + OSMetaClassDeclareReservedUnused(IOFireWireAVCTargetSpace, 3); +}; + +#endif /*_IOKIT_IOFIREWIREAVCTARGETSPACE_H */ \ No newline at end of file diff --git a/i386/include/IOKit/avc/IOFireWireAVCUnit.h b/i386/include/IOKit/avc/IOFireWireAVCUnit.h new file mode 100644 index 0000000..0abf1cd --- /dev/null +++ b/i386/include/IOKit/avc/IOFireWireAVCUnit.h @@ -0,0 +1,408 @@ +/* + * Copyright (c) 1998-2001 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOFIREWIREAVCUNIT_H +#define _IOKIT_IOFIREWIREAVCUNIT_H + +#include +#include +#include +#include +#include + +extern const OSSymbol *gIOAVCUnitType; + +class IOFireWireNub; +class IOFireWireAVCCommand; +class IOFireWirePCRSpace; +class IOFireWireAVCUnit; +class IOFireWireAVCSubUnit; +class IOFireWireAVCAsynchronousCommand; +class IOFireWireAVCNub; + +// The callback prototype for AVC Asynchronous Commands +typedef void (*IOFireWireAVCAsynchronousCommandCallback)(void *pRefCon, IOFireWireAVCAsynchronousCommand *pCommandObject); + +const UInt16 kIOFWAVCAsyncCmdFreed = 0xdead; + +/*! +@class IOFireWireAVCAsynchronousCommand +*/ +class IOFireWireAVCAsynchronousCommand : public IOCommand +{ + OSDeclareDefaultStructors(IOFireWireAVCAsynchronousCommand) + void free(void); + + friend class IOFireWireAVCUnit; + +protected: + /*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + +public: + IOReturn init(const UInt8 * command, UInt32 len, IOFireWireAVCAsynchronousCommandCallback completionCallback, void *pClientRefCon); + IOReturn submit(IOFireWireAVCNub *pAVCNub); + IOReturn cancel(void); + IOReturn reinit(const UInt8 * command, UInt32 cmdLen); + + // This function returns true if this command is currently waiting for a response + bool isPending(void); + + IOFWAVCAsyncCommandState cmdState; + void *pRefCon; + UInt8 *pCommandBuf; + UInt32 cmdLen; + UInt8 *pInterimResponseBuf; + UInt32 interimResponseLen; + UInt8 *pFinalResponseBuf; + UInt32 finalResponseLen; + +protected: + IOFireWireAVCAsynchronousCommandCallback fCallback; + IOFireWireAVCUnit *fAVCUnit; + IOMemoryDescriptor *fMem; + IOFWCommand *fWriteCmd; + IOFWDelayCommand *fDelayCmd; + UInt16 fWriteNodeID; + UInt32 fWriteGen; + +private: + OSMetaClassDeclareReservedUnused(IOFireWireAVCAsynchronousCommand, 0); + OSMetaClassDeclareReservedUnused(IOFireWireAVCAsynchronousCommand, 1); + OSMetaClassDeclareReservedUnused(IOFireWireAVCAsynchronousCommand, 2); + OSMetaClassDeclareReservedUnused(IOFireWireAVCAsynchronousCommand, 3); +}; + +/*! + @class IOFireWireAVCNub + @abstract nub for AVC devices +*/ +class IOFireWireAVCNub : public IOService +{ + OSDeclareDefaultStructors(IOFireWireAVCNub) + +protected: + IOFireWireNub * fDevice; + +public: + // execute AVC command +/*! + @function AVCCommand + @abstract Sends an AVC command to the device and stores the response. + @param command Pointer to command to send. + @param cmdLen Length of the command. + @param response Pointer to place to store the response. + @param responseLen Pointer to response length - initialize to the size of the buffer pointed to by response, + updated to the number of bytes returned by the device. +*/ + virtual IOReturn AVCCommand(const UInt8 * command, UInt32 cmdLen, UInt8 * response, UInt32 *responseLen) = 0; + +/*! + @function AVCCommandInGeneration + @abstract Sends an AVC command to the device and stores the response. The command must complete in the specified + FireWire bus generation otherwise kIOFireWireBusReset is returned. + @param generation The bus generation that the command must execute in. + @param command Pointer to command to send. + @param cmdLen Length of the command. + @param response Pointer to place to store the response. + @param responseLen Pointer to response length - initialize to the size of the buffer pointed to by response, + updated to the number of bytes returned by the device. +*/ + virtual IOReturn AVCCommandInGeneration(UInt32 generation, + const UInt8 * command, UInt32 cmdLen, UInt8 * response, UInt32 *responseLen) = 0; + +/*! + @function getDevice + @abstract Returns the FireWire device nub that is this object's provider . +*/ + IOFireWireNub* getDevice() const + {return fDevice;}; + +/*! + @function updateAVCCommandTimeout + @abstract By default, AVCCommands timeout 10 seconds after receiving an Interim response. + This function resets the timeout of the current command to 10 seconds from the current time. + Call this repeatedly for AVC commands that take a very long time to execute to prevent premature + timeout. +*/ + virtual IOReturn updateAVCCommandTimeout() = 0; + +private: + OSMetaClassDeclareReservedUsed(IOFireWireAVCNub, 0); + OSMetaClassDeclareReservedUnused(IOFireWireAVCNub, 1); + OSMetaClassDeclareReservedUnused(IOFireWireAVCNub, 2); + OSMetaClassDeclareReservedUnused(IOFireWireAVCNub, 3); +}; + +/*! + @class IOFireWireAVCUnit + @abstract nub for AVC devices +*/ +class IOFireWireAVCUnit : public IOFireWireAVCNub +{ + OSDeclareDefaultStructors(IOFireWireAVCUnit) + + friend class IOFireWireAVCAsynchronousCommand; + +protected: + IOFWPseudoAddressSpace *fFCPResponseSpace; + IOLock *avcLock; + IOFireWireAVCCommand *fCommand; + + UInt8 fSubUnitCount[kAVCNumSubUnitTypes]; + + bool fStarted; + IOLock *cmdLock; + +/*! @struct ExpansionData + @discussion This structure is used to expand the capablilties of the class in a binary compatible way + */ + struct ExpansionData + { + OSArray * fAVCAsyncCommands; + IOFireWireController *fControl; + bool enableRobustAVCCommandResponseMatching; + }; + +/*! @var fIOFireWireAVCUnitExpansion + */ + ExpansionData *fIOFireWireAVCUnitExpansion; + + static UInt32 AVCResponse(void *refcon, UInt16 nodeID, IOFWSpeed &speed, + FWAddress addr, UInt32 len, const void *buf, IOFWRequestRefCon requestRefcon); + + static void rescanSubUnits(void *arg); + + virtual void free(void); + + virtual void updateSubUnits(bool firstTime); + + static void AVCAsynchRequestWriteDone(void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd); + static void AVCAsynchDelayDone(void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd); + +public: + // IOService overrides + virtual bool start(IOService *provider); + virtual IOReturn message(UInt32 type, IOService *provider, void *argument); + virtual IOReturn setProperties (OSObject * properties ); + +/*! @function handleOpen + @abstract Overrideable method to control the open / close behaviour of an IOService. + @discussion See IOService for discussion. + @param forClient Designates the client of the provider requesting the open. + @param options Options for the open, may be interpreted by the implementor of handleOpen. + @result Return true if the open was successful, false otherwise. +*/ + + virtual bool handleOpen( IOService * forClient, + IOOptionBits options, + void * arg ); +/*! + @function handleClose + @abstract Overrideable method to control the open / close behaviour of an IOService. + @discussion See IOService for discussion. + @param forClient Designates the client of the provider requesting the close. + @param options Options for the close, may be interpreted by the implementor of handleOpen. +*/ + + virtual void handleClose( IOService * forClient, + IOOptionBits options ); + + +/*! + @function matchPropertyTable + @abstract Matching language support + Match on the following properties of the unit: + Vendor_ID + GUID + Unit_Type + and available sub-units, match if the device has at least the requested number of a sub-unit type: + AVCSubUnit_0 -> AVCSubUnit_1f +*/ + virtual bool matchPropertyTable(OSDictionary * table); + + // execute AVC command +/*! + @function AVCCommand + @abstract Sends an AVC command to the device and stores the response. + @param command Pointer to command to send. + @param cmdLen Length of the command. + @param response Pointer to place to store the response. + @param responseLen Pointer to response length - initialize to the size of the buffer pointed to by response, + updated to the number of bytes returned by the device. +*/ + virtual IOReturn AVCCommand(const UInt8 * command, UInt32 cmdLen, UInt8 * response, UInt32 *responseLen); + +/*! + @function AVCCommandInGeneration + @abstract Sends an AVC command to the device and stores the response. The command must complete in the specified + FireWire bus generation otherwise kIOFireWireBusReset is returned. + @param generation The bus generation that the command must execute in. + @param command Pointer to command to send. + @param cmdLen Length of the command. + @param response Pointer to place to store the response. + @param responseLen Pointer to response length - initialize to the size of the buffer pointed to by response, + updated to the number of bytes returned by the device. +*/ + virtual IOReturn AVCCommandInGeneration(UInt32 generation, + const UInt8 * command, UInt32 cmdLen, UInt8 * response, UInt32 *responseLen); + +/*! + @function updateAVCCommandTimeout + @abstract By default, AVCCommands timeout 10 seconds after receiving an Interim response. + This function resets the timeout of the current command to 10 seconds from the current time. + Call this repeatedly for AVC commands that take a very long time to execute to prevent premature + timeout. +*/ + virtual IOReturn updateAVCCommandTimeout(); + +protected: + UInt32 indexOfAVCAsynchronousCommandObject(IOFireWireAVCAsynchronousCommand *pCommandObject); + void removeAVCAsynchronousCommandObjectAtIndex(UInt32 index); + + void lockAVCAsynchronousCommandLock(); + + void unlockAVCAsynchronousCommandLock(); + + bool available(); + +private: + + OSMetaClassDeclareReservedUnused(IOFireWireAVCUnit, 0); + OSMetaClassDeclareReservedUnused(IOFireWireAVCUnit, 1); + OSMetaClassDeclareReservedUnused(IOFireWireAVCUnit, 2); + OSMetaClassDeclareReservedUnused(IOFireWireAVCUnit, 3); + +}; + +/*! + @class IOFireWireAVCSubUnit + @abstract nub for sub unit of AVC devices. Just for matching, calls the AVC unit for all functions. +*/ +class IOFireWireAVCSubUnit : public IOFireWireAVCNub +{ + OSDeclareDefaultStructors(IOFireWireAVCSubUnit) + + friend class IOFireWireAVCAsynchronousCommand; + +protected: + IOFireWireAVCUnit *fAVCUnit; + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + +public: + virtual bool init(OSDictionary *propTable, IOFireWireAVCUnit *provider); + + // IOService overrides + virtual IOReturn message(UInt32 type, IOService *provider, void *argument); + +/*! @function handleOpen + @abstract Overrideable method to control the open / close behaviour of an IOService. + @discussion See IOService for discussion. + @param forClient Designates the client of the provider requesting the open. + @param options Options for the open, may be interpreted by the implementor of handleOpen. + @result Return true if the open was successful, false otherwise. +*/ + + virtual bool handleOpen( IOService * forClient, + IOOptionBits options, + void * arg ); +/*! + @function handleClose + @abstract Overrideable method to control the open / close behaviour of an IOService. + @discussion See IOService for discussion. + @param forClient Designates the client of the provider requesting the close. + @param options Options for the close, may be interpreted by the implementor of handleOpen. +*/ + + virtual void handleClose( IOService * forClient, + IOOptionBits options ); + + +/*! + @function matchPropertyTable + @abstract Matching language support + Match on the following properties of the sub unit: + Vendor_ID + GUID + SubUnit_Type +*/ + virtual bool matchPropertyTable(OSDictionary * table); + + // execute AVC command +/*! + @function AVCCommand + @abstract Sends an AVC command to the device and stores the response. + @param command Pointer to command to send. + @param cmdLen Length of the command. + @param response Pointer to place to store the response. + @param responseLen Pointer to response length - initialize to the size of the buffer pointed to by response, + updated to the number of bytes returned by the device. +*/ + virtual IOReturn AVCCommand(const UInt8 * command, UInt32 cmdLen, UInt8 * response, UInt32 *responseLen); + +/*! + @function AVCCommandInGeneration + @abstract Sends an AVC command to the device and stores the response. The command must complete in the specified + FireWire bus generation otherwise kIOFireWireBusReset is returned. + @param generation The bus generation that the command must execute in. + @param command Pointer to command to send. + @param cmdLen Length of the command. + @param response Pointer to place to store the response. + @param responseLen Pointer to response length - initialize to the size of the buffer pointed to by response, + updated to the number of bytes returned by the device. +*/ + virtual IOReturn AVCCommandInGeneration(UInt32 generation, + const UInt8 * command, UInt32 cmdLen, UInt8 * response, UInt32 *responseLen); + +/*! + @function updateAVCCommandTimeout + @abstract By default, AVCCommands timeout 10 seconds after receiving an Interim response. + This function resets the timeout of the current command to 10 seconds from the current time. + Call this repeatedly for AVC commands that take a very long time to execute to prevent premature + timeout. +*/ + virtual IOReturn updateAVCCommandTimeout(); + +private: + OSMetaClassDeclareReservedUnused(IOFireWireAVCSubUnit, 0); + OSMetaClassDeclareReservedUnused(IOFireWireAVCSubUnit, 1); + OSMetaClassDeclareReservedUnused(IOFireWireAVCSubUnit, 2); + OSMetaClassDeclareReservedUnused(IOFireWireAVCSubUnit, 3); + +}; + +#endif // _IOKIT_IOFIREWIREAVCUNIT_H + diff --git a/i386/include/IOKit/avc/IOFireWireAVCUserClientCommon.h b/i386/include/IOKit/avc/IOFireWireAVCUserClientCommon.h new file mode 100644 index 0000000..cecf812 --- /dev/null +++ b/i386/include/IOKit/avc/IOFireWireAVCUserClientCommon.h @@ -0,0 +1,124 @@ +/* + * Copyright (c) 1998-2001 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOFIREWIREAVCUSERCLIENTCOMMON_H_ +#define _IOKIT_IOFIREWIREAVCUSERCLIENTCOMMON_H_ + +#include + +#define kIOFireWireAVCLibConnection 13 + +enum IOFWAVCUserClientCommandCodes { + kIOFWAVCUserClientOpen, // kIOUCScalarIScalarO 0,0 + kIOFWAVCUserClientClose, // kIOUCScalarIScalarO 0,0 + kIOFWAVCUserClientOpenWithSessionRef, // kIOUCScalarIScalarO 1,0 + kIOFWAVCUserClientGetSessionRef, // kIOUCScalarIScalarO 0,1 + kIOFWAVCUserClientAVCCommand, // kIOUCStructIStructO -1,-1 + kIOFWAVCUserClientAVCCommandInGen, // kIOUCStructIStructO -1,-1 + kIOFWAVCUserClientUpdateAVCCommandTimeout, // kIOUCScalarIScalarO 0,0 + kIOFWAVCUserClientMakeP2PInputConnection, // KIOUCScalarIScalarO 1, 0 + kIOFWAVCUserClientBreakP2PInputConnection, // KIOUCScalarIScalarO 1, 0 + kIOFWAVCUserClientMakeP2POutputConnection, // KIOUCScalarIScalarO 1, 0 + kIOFWAVCUserClientBreakP2POutputConnection, // KIOUCScalarIScalarO 1, 0 + kIOFWAVCUserClientCreateAsyncAVCCommand, // kIOUCStructIStructO -1,-1 + kIOFWAVCUserClientSubmitAsyncAVCCommand, // kIOUCScalarIScalarO 1, 0 + kIOFWAVCUserClientCancelAsyncAVCCommand, // kIOUCScalarIScalarO 1, 0 + kIOFWAVCUserClientReleaseAsyncAVCCommand, // kIOUCScalarIScalarO 1, 0 + kIOFWAVCUserClientReinitAsyncAVCCommand, // // kIOUCScalarIStructI 1, -1 + kIOFWAVCUserClientNumCommands +}; + +enum IOFWAVCUserClientAsyncCommandCodes { + kIOFWAVCUserClientInstallAsyncAVCCommandCallback = kIOFWAVCUserClientNumCommands, // kIOUCScalarIScalarO 1, 1 + kIOFWAVCUserClientNumAsyncCommands +}; + + +enum IOFWAVCProtocolUserClientCommandCodes { + kIOFWAVCProtocolUserClientSendAVCResponse, // kIOUCScalarIStructI 2, -1 + kIOFWAVCProtocolUserClientFreeInputPlug, // kIOUCScalarIScalarO 1, 0 + kIOFWAVCProtocolUserClientReadInputPlug, // kIOUCScalarIScalarO 1, 1 + kIOFWAVCProtocolUserClientUpdateInputPlug, // kIOUCScalarIScalarO 3, 0 + kIOFWAVCProtocolUserClientFreeOutputPlug, // kIOUCScalarIScalarO 1, 0 + kIOFWAVCProtocolUserClientReadOutputPlug, // kIOUCScalarIScalarO 1, 1 + kIOFWAVCProtocolUserClientUpdateOutputPlug, // kIOUCScalarIScalarO 3, 0 + kIOFWAVCProtocolUserClientReadOutputMasterPlug, // kIOUCScalarIScalarO 0, 1 + kIOFWAVCProtocolUserClientUpdateOutputMasterPlug, // kIOUCScalarIScalarO 2, 0 + kIOFWAVCProtocolUserClientReadInputMasterPlug, // kIOUCScalarIScalarO 0, 1 + kIOFWAVCProtocolUserClientUpdateInputMasterPlug, // kIOUCScalarIScalarO 2, 0 + kIOFWAVCProtocolUserClientPublishAVCUnitDirectory, // kIOUCScalarIScalarO 0, 0 + kIOFWAVCProtocolUserClientSetSubunitPlugSignalFormat, // kIOUCScalarIScalarO 4, 0 + kIOFWAVCProtocolUserClientGetSubunitPlugSignalFormat, // kIOUCScalarIScalarO 3, 1 + kIOFWAVCProtocolUserClientConnectTargetPlugs, // kIOUCStructIStructO + kIOFWAVCProtocolUserClientDisconnectTargetPlugs, // kIOUCScalarIScalarO 6, 0 + kIOFWAVCProtocolUserClientGetTargetPlugConnection, // kIOUCStructIStructO + kIOFWAVCProtocolUserClientAVCRequestNotHandled, // kIOUCScalarIStructI 4, -1 + kIOFWAVCProtocolUserClientNumCommands +}; + +enum IOFWAVCProtocolUserClientAsyncCommandCodes { + kIOFWAVCProtocolUserClientSetAVCRequestCallback = kIOFWAVCProtocolUserClientNumCommands, // kIOUCScalarIScalarO 2, 0 + kIOFWAVCProtocolUserClientAllocateInputPlug, // kIOUCScalarIScalarO 1, 1 + kIOFWAVCProtocolUserClientAllocateOutputPlug, // kIOUCScalarIScalarO 1, 1 + kIOFWAVCProtocolUserClientInstallAVCCommandHandler, // kIOUCScalarIScalarO 4, 0 + kIOFWAVCProtocolUserClientAddSubunit, // kIOUCScalarIScalarO 5, 1 + kIOFWAVCProtocolUserClientNumAsyncCommands +}; + +typedef struct _AVCConnectTargetPlugsInParams +{ + UInt32 sourceSubunitTypeAndID; + IOFWAVCPlugTypes sourcePlugType; + UInt32 sourcePlugNum; + UInt32 destSubunitTypeAndID; + IOFWAVCPlugTypes destPlugType; + UInt32 destPlugNum; + Boolean lockConnection; + Boolean permConnection; +}AVCConnectTargetPlugsInParams; + +typedef struct _AVCConnectTargetPlugsOutParams +{ + UInt32 sourcePlugNum; + UInt32 destPlugNum; +}AVCConnectTargetPlugsOutParams; + +typedef struct _AVCGetTargetPlugConnectionInParams +{ + UInt32 subunitTypeAndID; + IOFWAVCPlugTypes plugType; + UInt32 plugNum; +}AVCGetTargetPlugConnectionInParams; + +typedef struct _AVCGetTargetPlugConnectionOutParams +{ + UInt32 connectedSubunitTypeAndID; + IOFWAVCPlugTypes connectedPlugType; + UInt32 connectedPlugNum; + Boolean lockConnection; + Boolean permConnection; +}AVCGetTargetPlugConnectionOutParams; + +#define kAsyncCmdSharedBufInterimRespOffset 0 +#define kAsyncCmdSharedBufFinalRespOffset 512 + +#endif // _IOKIT_IOFIREWIREAVCUSERCLIENTCOMMON_H_ \ No newline at end of file diff --git a/i386/include/IOKit/avc/IOFireWirePCRSpace.h b/i386/include/IOKit/avc/IOFireWirePCRSpace.h new file mode 100644 index 0000000..9f31176 --- /dev/null +++ b/i386/include/IOKit/avc/IOFireWirePCRSpace.h @@ -0,0 +1,202 @@ +/* + * Copyright (c) 2001 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * + * IOFireWirePCRSpace.h + * + * Class to multiplex access to the PCR addresses. + */ +#ifndef _IOKIT_IOFIREWIREPCRSPACE_H +#define _IOKIT_IOFIREWIREPCRSPACE_H + +#include +#include + +/*! + @typedef IOFireWirePCRCallback + @abstract Callback called after a successful lock transaction to a plug. + @param refcon refcon supplied to the IOFireWireFCPSpace when a client is registered + @param nodeID is the node originating the request + @param plugNo is the plug number + @param oldVal is the value the plug used to contain + @param newVal is the quad written into the plug + + */ +typedef void (*IOFireWirePCRCallback)(void *refcon, UInt16 nodeID, UInt32 plug, UInt32 oldVal, UInt32 newVal); + +class IOFireWireBus; + +/*! + @class IOFireWirePCRSpace + @abstract object to multiplex users of the PCR plug registers +*/ +class IOFireWirePCRSpace : public IOFWPseudoAddressSpace +{ + OSDeclareDefaultStructors(IOFireWirePCRSpace) + +protected: + struct Client { + IOFireWirePCRCallback func; + void * refcon; + }; + UInt32 fBuf[64]; + + Client fClients[64]; + UInt32 fActivations; + IOFireWireAVCTargetSpace * fAVCTargetSpace; + IONotifier *fNotifier; + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + // Override to notify client of each plug seperately + virtual UInt32 doWrite(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, + const void *buf, IOFWRequestRefCon refcon); + + virtual IOReturn allocatePlug(void *refcon, IOFireWirePCRCallback func, UInt32 &plug, Client* head); + virtual void freePlug(UInt32 plug, Client* head); + virtual UInt32 readPlug(UInt32 plug); + virtual IOReturn updatePlug(UInt32 plug, UInt32 oldVal, UInt32 newVal); + +public: + + // Override to handle multiple activations (one per client) + virtual IOReturn activate(); + virtual void deactivate(); + +/*! + @function init + @abstract initializes the IOFireWirePCRSpace object +*/ + virtual bool init(IOFireWireBus *bus); +/*! + @function getPCRAddressSpace + @abstract returns the IOFireWirePCRSpace object for the given FireWire bus + @param bus The FireWire bus +*/ + static IOFireWirePCRSpace *getPCRAddressSpace(IOFireWireBus *bus); +/*! + @function allocateInputPlug + @abstract allocates an input plug. + @param refcon arbitrary value passed back as first argument of callback. + @param func callback function when a successful lock transaction to the plug has been performed + @param plug set to the plug number if a plug is successfully allocated +*/ + virtual IOReturn allocateInputPlug(void *refcon, IOFireWirePCRCallback func, UInt32 &plug); +/*! + @function freeInputPlug + @abstract deallocates an input plug. + @param plug value returned by allocateInputPlug. +*/ + virtual void freeInputPlug(UInt32 plug); +/*! + @function readInputPlug + @abstract returns the current value of an input plug. + @param plug value returned by allocateInputPlug. +*/ + virtual UInt32 readInputPlug(UInt32 plug); +/*! + @function updateInputPlug + @abstract updates the value of an input plug (simulating a lock transaction). + @param plug value returned by allocateInputPlug. + @param oldVal value returned by readInputPlug. + @param newVal new value to store in plug if it's current value is oldVal. +*/ + virtual IOReturn updateInputPlug(UInt32 plug, UInt32 oldVal, UInt32 newVal); +/*! + @function allocateOutputPlug + @abstract allocates an output plug. + @param refcon arbitrary value passed back as first argument of callback. + @param func callback function when a successful lock transaction to the plug has been performed + @param plug set to the plug number if a plug is successfully allocated +*/ + virtual IOReturn allocateOutputPlug(void *refcon, IOFireWirePCRCallback func, UInt32 &plug); +/*! + @function freeOutputPlug + @abstract deallocates an output plug. + @param plug value returned by allocateOutputPlug. +*/ + virtual void freeOutputPlug(UInt32 plug); +/*! + @function readOutputPlug + @abstract returns the current value of an output plug. + @param plug value returned by allocateOutputPlug. +*/ + virtual UInt32 readOutputPlug(UInt32 plug); +/*! + @function updateOutputPlug + @abstract updates the value of an output plug (simulating a lock transaction). + @param plug value returned by allocateOutputPlug. + @param oldVal value returned by readOutputPlug. + @param newVal new value to store in plug if it's current value is oldVal. +*/ + virtual IOReturn updateOutputPlug(UInt32 plug, UInt32 oldVal, UInt32 newVal); +/*! + @function readOutputMasterPlug + @abstract returns the current value of the output master plug. +*/ + virtual UInt32 readOutputMasterPlug(); +/*! + @function updateOutputMasterPlug + @abstract updates the value of the master output plug (simulating a lock transaction). + @param oldVal value returned by readOutputMasterPlug. + @param newVal new value to store in plug if it's current value is oldVal. +*/ + virtual IOReturn updateOutputMasterPlug(UInt32 oldVal, UInt32 newVal); +/*! + @function readInputMasterPlug + @abstract returns the current value of the input master plug. +*/ + virtual UInt32 readInputMasterPlug(); +/*! + @function updateInputMasterPlug + @abstract updates the value of the master input plug (simulating a lock transaction). + @param oldVal value returned by readInputMasterPlug. + @param newVal new value to store in plug if it's current value is oldVal. +*/ + virtual IOReturn updateInputMasterPlug(UInt32 oldVal, UInt32 newVal); + + /*! + @function setAVCTargetSpacePointer + */ + virtual void setAVCTargetSpacePointer(IOFireWireAVCTargetSpace *pAVCTargetSpace); + + /*! + @function clearAllP2PConnections + */ + virtual void clearAllP2PConnections(void); + +private: + OSMetaClassDeclareReservedUnused(IOFireWirePCRSpace, 0); + OSMetaClassDeclareReservedUnused(IOFireWirePCRSpace, 1); + OSMetaClassDeclareReservedUnused(IOFireWirePCRSpace, 2); + OSMetaClassDeclareReservedUnused(IOFireWirePCRSpace, 3); + +}; + +#endif /* _IOKIT_IOFIREWIREPCRSPACE_H */ diff --git a/i386/include/IOKit/bluetooth/Bluetooth.h b/i386/include/IOKit/bluetooth/Bluetooth.h new file mode 100644 index 0000000..6692b90 --- /dev/null +++ b/i386/include/IOKit/bluetooth/Bluetooth.h @@ -0,0 +1,2158 @@ +/* + File: Bluetooth.h + Contains: Public interfaces for Bluetooth technology. + Copyright: (c) 2002-2007 by Apple Inc. All rights reserved. +*/ + +#pragma once + +#ifdef KERNEL +#include +#else +#include +#include +#endif + +#include +#include + +//--------------------------------------------------------------------------------------------------------------------------- +/*! @header Bluetooth + Bluetooth wireless technology +*/ + +#ifdef __cplusplus + extern "C" { +#endif + + +#if 0 + +#pragma mark === Baseband === +#endif + +//=========================================================================================================================== +// Baseband +//=========================================================================================================================== + +typedef UInt16 BluetoothConnectionHandle; // Upper 4 bits are reserved. +typedef uint8_t BluetoothLMPHandle; +enum +{ + kBluetoothConnectionHandleNone = 0xffff +}; + +typedef UInt8 BluetoothReasonCode; +typedef UInt8 BluetoothEncryptionEnable; +enum +{ + kBluetoothEncryptionEnableOff = 0x00, + kBluetoothEncryptionEnableOn = 0x01 +}; + +typedef UInt8 BluetoothKeyFlag; +enum +{ + kBluetoothKeyFlagSemiPermanent = 0x00, + kBluetoothKeyFlagTemporary = 0x01 +}; + +typedef UInt8 BluetoothKeyType; +enum +{ + kBluetoothKeyTypeCombination = 0x00, + kBluetoothKeyTypeLocalUnit = 0x01, + kBluetoothKeyTypeRemoteUnit = 0x02, + kBluetoothKeyTypeDebugCombination = 0x03, + kBluetoothKeyTypeUnauthenticatedCombination = 0x04, + kBluetoothKeyTypeAuthenticatedCombination = 0x05, + kBluetoothKeyTypeChangedCombination = 0x06, +}; + +// Packet types (Bluetooth spec section 7.1.5 - Create Connection) + +typedef UInt16 BluetoothPacketType; +enum +{ + kBluetoothPacketTypeReserved1 = 0x0001, + kBluetoothPacketType2DH1Omit = 0x0002, // Masks OUT this packet type + kBluetoothPacketType3DH1Omit = 0x0004, // Masks OUT this packet type + + kBluetoothPacketTypeDM1 = 0x0008, + kBluetoothPacketTypeDH1 = 0x0010, + kBluetoothPacketTypeHV1 = 0x0020, // Reserved + kBluetoothPacketTypeHV2 = 0x0040, // Reserved + kBluetoothPacketTypeHV3 = 0x0080, // Reserved + kBluetoothPacketTypeDV = 0x0100, // Reserved + kBluetoothPacketType2DH3Omit = 0x0100, // Masks OUT this packet type + kBluetoothPacketType3DH3Omit = 0x0200, // Masks OUT this packet type + kBluetoothPacketTypeAUX = 0x0200, // Deprecated + + kBluetoothPacketTypeDM3 = 0x0400, + kBluetoothPacketTypeDH3 = 0x0800, + + kBluetoothPacketType2DH5Omit = 0x1000, // Masks OUT this packet type + kBluetoothPacketType3DM5Omit = 0x2000, // Masks OUT this packet type + + kBluetoothPacketTypeDM5 = 0x4000, + kBluetoothPacketTypeDH5 = 0x8000, + + kBluetoothPacketTypeEnd +}; + +// Setup Synchronous Packet types (Bluetooth 2.1 spec section 7.1.26 - Setup Synchronous Command) + +enum +{ + kBluetoothSynchronousConnectionPacketTypeHV1 = 0x0001, + kBluetoothSynchronousConnectionPacketTypeHV2 = 0x0002, + kBluetoothSynchronousConnectionPacketTypeHV3 = 0x0004, + kBluetoothSynchronousConnectionPacketTypeEV3 = 0x0008, + kBluetoothSynchronousConnectionPacketTypeEV4 = 0x0010, + kBluetoothSynchronousConnectionPacketTypeEV5 = 0x0020, + + // masking out certain types: + + kBluetoothSynchronousConnectionPacketType2EV3Omit = 0x0040, + kBluetoothSynchronousConnectionPacketType3EV3Omit = 0x0080, + kBluetoothSynchronousConnectionPacketType2EV5Omit = 0x0100, + kBluetoothSynchronousConnectionPacketType3EV5Omit = 0x0200, + + kBluetoothSynchronousConnectionPacketTypeAll = 0xFFFF, + + kBluetoothSynchronousConnectionPacketTypeEnd +}; + + +// LAP/Inquiry Access Codes + +typedef UInt32 BluetoothLAP; +enum +{ + kBluetoothGeneralInquiryAccessCodeIndex = 0, // General/Unlimited Inquiry Access Code (GIAC) + kBluetoothGeneralInquiryAccessCodeLAPValue = 0x9E8B33, // General/Unlimited Inquiry Access Code (GIAC) + + kBluetoothLimitedInquiryAccessCodeIndex = 1, // Limited Dedicated Inquiry Access Code (LIAC) + kBluetoothLimitedInquiryAccessCodeLAPValue = 0x9E8B00, // Limited Dedicated Inquiry Access Code (LIAC) + + // All other access codes are reserved for future use (indices 2-63, LAP values 0x9E8B01-0x9E8B32 and 0x9E8B34-0x9E8B3F). + + kBluetoothLimitedInquiryAccessCodeEnd +}; + +// PageScanRepetitionMode + +typedef UInt8 BluetoothPageScanRepetitionMode; +enum +{ + kBluetoothPageScanRepetitionModeR0 = 0x00, + kBluetoothPageScanRepetitionModeR1 = 0x01, + kBluetoothPageScanRepetitionModeR2 = 0x02 + + // All other values are reserved for future use. +}; + +// PageScanPeriodMode + +typedef UInt8 BluetoothPageScanPeriodMode; +enum +{ + kBluetoothPageScanPeriodModeP0 = 0x00, + kBluetoothPageScanPeriodModeP1 = 0x01, + kBluetoothPageScanPeriodModeP2 = 0x02 + + // All other values are reserved for future use. +}; + +// PageScanMode + +typedef UInt8 BluetoothPageScanMode; +enum +{ + kBluetoothPageScanModeMandatory = 0x00, + kBluetoothPageScanModeOptional1 = 0x01, + kBluetoothPageScanModeOptional2 = 0x02, + kBluetoothPageScanModeOptional3 = 0x03 + + // All other values are reserved for future use. +}; + +#if 0 +#pragma mark - +#pragma mark === Devices === +#endif + +typedef struct BluetoothDeviceAddress BluetoothDeviceAddress; +struct BluetoothDeviceAddress +{ + UInt8 data[ 6 ]; +}; + +typedef struct BluetoothKey BluetoothKey; +struct BluetoothKey +{ + UInt8 data[ 16 ]; +}; + +typedef struct BluetoothPINCode BluetoothPINCode; +struct BluetoothPINCode +{ + UInt8 data[ 16 ]; // PIN codes may be up to 128 bits. +}; + + +// Physical layout of the "class of device/service" field (see Bluetooth Assigned Numbers section 1.2): +// +// 2 2 2 2 1 1 1 1 1 1 1 1 1 1 +// 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 <- Bit Transmission Order +// +---------------+---------------+---------------+ +// | octet 3 | octet 2 | octet 1 | <- Octet Transmission Order +// +---------------+---------------+---------------+ +// <------ 11 bits ----->< 5 bits ><- 6 bits -> +// +---------------------+---------+-----------+-+-+ +// | Service Classes | Major | Minor | | | +// +-+-+-+-+-+-+-+-+-+-+-+ Device | Device |0|0| +// | | | | | | | |*|*|*| | Class | Class | | | +// +-+-+-+-+-+-+-+-+-+-+-+---------+-----------+-+-+ +// | | | | | | | | | +// | | | | | | | + Limited Discoverable +- Format Type +// | | | | | | +- Networking +// | | | | | +- Rendering +// | | | | +- Capturing +// | | | +- Object Transfer +// | | +- Audio +// | +- Telephony +// +- Information + +typedef UInt32 BluetoothClassOfDevice; + +#define BluetoothGetDeviceClassMajor( inCOD ) ( (inCOD & 0x00001F00) >> 8 ) +#define BluetoothGetDeviceClassMinor( inCOD ) ( (inCOD & 0x000000FC) >> 2 ) +#define BluetoothGetServiceClassMajor( inCOD ) ( (inCOD & 0x00FFE000) >> 13 ) +#define BluetoothMakeClassOfDevice( inServiceClassMajor, inDeviceClassMajor, inDeviceClassMinor ) \ + (((inServiceClassMajor << 13) & 0x00FFE000) | ((inDeviceClassMajor << 8) & 0x00001F00) | ((inDeviceClassMinor << 2) & 0x000000FC)) + +/// +/// Major Service Classes (11-bit value - bits 13-23 of Device/Service field) +/// + +typedef UInt32 BluetoothServiceClassMajor; +// Service Class Major enum in BluetoothAssignedNumbers.h + +/// +/// Major Device Classes (5-bit value - bits 8-12 of Device/Service field) +/// + +typedef UInt32 BluetoothDeviceClassMajor; +// Device Class Major enum in BluetoothAssignedNumbers.h + +/// +/// Minor Device Classes (6-bit value - bits 2-7 of Device/Service field) +/// + +typedef UInt32 BluetoothDeviceClassMinor; +// Device Class Minor enum in BluetoothAssignedNumbers.h + +// Misc Device Types + +enum +{ + kBluetoothDeviceNameMaxLength = 248 +}; +typedef UInt8 BluetoothDeviceName[ 256 ]; // Max 248 bytes of UTF-8 encoded Unicode. +typedef UInt16 BluetoothClockOffset; // Bits 14-0 come from bits 16-2 of CLKslav-CLKmaster. +typedef UInt8 BluetoothRole; // +typedef UInt8 BluetoothAllowRoleSwitch; // 0x00-0x01 valid, 0x02-0xFF reserved. +enum +{ + kBluetoothDontAllowRoleSwitch = 0x00, + kBluetoothAllowRoleSwitch = 0x01 +}; + +enum +{ + kBluetoothRoleBecomeMaster = 0x00, + kBluetoothRoleRemainSlave = 0x01 +}; + +typedef struct BluetoothSetEventMask BluetoothSetEventMask; +struct BluetoothSetEventMask +{ + UInt8 data[ 8 ]; +}; + +typedef UInt8 BluetoothPINType; + + +#if 0 +#pragma mark - +#pragma mark === L2CAP === +#endif + +//=========================================================================================================================== +// Logical Link Control and Adaptation Protocol (L2CAP) +//=========================================================================================================================== + + +// ACL Packet values (Bluetooth L2CAP spec section 1). + +enum +{ + kBluetoothL2CAPMaxPacketSize = 65535, // Max number of data bytes in an L2CAP packet. + + kBluetoothACLLogicalChannelReserved = 0, // [00] Reserved for future use + kBluetoothACLLogicalChannelL2CAPContinue = 1, // [01] Continuation of L2CAP packet. + kBluetoothACLLogicalChannelL2CAPStart = 2, // [10] Start of L2CAP packet. + kBluetoothACLLogicalChannelLMP = 3 // [11] Link Manager Protocol packet. +}; + +// Channel Identifiers (Bluetooth L2CAP spec section 2.1). + +typedef UInt16 BluetoothL2CAPChannelID; +enum +{ + kBluetoothL2CAPChannelNull = 0x0000, // Illegal, should not be used + kBluetoothL2CAPChannelSignalling = 0x0001, // L2CAP signalling channel + kBluetoothL2CAPChannelConnectionLessData = 0x0002, // L2CAP connection less data + kBluetoothL2CAPChannelAMPManagerProtocol = 0x0003, // AMP Manager Protocol + + // Range 0x0003 to 0x003F reserved for future use. + kBluetoothL2CAPChannelReservedStart = 0x0004, + kBluetoothL2CAPChannelReservedEnd = 0x003F, + + // Range 0x0040 to 0xFFFF are dynamically allocated. + kBluetoothL2CAPChannelDynamicStart = 0x0040, + kBluetoothL2CAPChannelDynamicEnd = 0xffff, + kBluetoothL2CAPChannelEnd = 0xffff +}; + +typedef BluetoothL2CAPChannelID BluetoothL2CAPGroupID; + +// Protocol/Service Multiplexor (PSM) values (Bluetooth L2CAP spec section 5.2). + +typedef UInt16 BluetoothL2CAPPSM; +// PSM enum in BluetoothAssignedNumbers.h + +// Command Codes + +typedef enum +{ + kBluetoothL2CAPCommandCodeReserved = 0x00, + kBluetoothL2CAPCommandCodeCommandReject = 0x01, + kBluetoothL2CAPCommandCodeConnectionRequest = 0x02, + kBluetoothL2CAPCommandCodeConnectionResponse = 0x03, + kBluetoothL2CAPCommandCodeConfigureRequest = 0x04, + kBluetoothL2CAPCommandCodeConfigureResponse = 0x05, + kBluetoothL2CAPCommandCodeDisconnectionRequest = 0x06, + kBluetoothL2CAPCommandCodeDisconnectionResponse = 0x07, + kBluetoothL2CAPCommandCodeEchoRequest = 0x08, + kBluetoothL2CAPCommandCodeEchoResponse = 0x09, + kBluetoothL2CAPCommandCodeInformationRequest = 0x0A, + kBluetoothL2CAPCommandCodeInformationResponse = 0x0B, + kBluetoothL2CAPCommandCodeCreateChannelRequest = 0x0C, + kBluetoothL2CAPCommandCodeCreateChannelResponse = 0x0D, + kBluetoothL2CAPCommandCodeMoveChannelRequest = 0x0E, + kBluetoothL2CAPCommandCodeMoveChannelResponse = 0x0F, + kBluetoothL2CAPCommandCodeMoveChannelConfirmation = 0x10, + kBluetoothL2CAPCommandCodeMoveChannelConfirmationResponse = 0x11, +} BluetoothL2CAPCommandCode; + +// Command Reject + +typedef enum +{ + kBluetoothL2CAPCommandRejectReasonCommandNotUnderstood = 0x0000, + kBluetoothL2CAPCommandRejectReasonSignallingMTUExceeded = 0x0001, + kBluetoothL2CAPCommandRejectReasonInvalidCIDInRequest = 0x0002, +} BluetoothL2CAPCommandRejectReason; + +typedef UInt16 BluetoothL2CAPMTU; +typedef UInt16 BluetoothL2CAPLinkTimeout; +typedef UInt16 BluetoothL2CAPFlushTimeout; +enum +{ + kBluetoothL2CAPFlushTimeoutUseExisting = 0x0000, + kBluetoothL2CAPFlushTimeoutImmediate = 0x0001, + kBluetoothL2CAPFlushTimeoutForever = 0xFFFF, + + kBluetoothL2CAPFlushTimeoutEnd +}; + +typedef struct BluetoothL2CAPQualityOfServiceOptions BluetoothL2CAPQualityOfServiceOptions; +struct BluetoothL2CAPQualityOfServiceOptions +{ + UInt8 flags; + UInt8 serviceType; + UInt32 tokenRate; + UInt32 tokenBucketSize; + UInt32 peakBandwidth; + UInt32 latency; + UInt32 delayVariation; +}; + +typedef struct BluetoothL2CAPRetransmissionAndFlowControlOptions BluetoothL2CAPRetransmissionAndFlowControlOptions; +struct BluetoothL2CAPRetransmissionAndFlowControlOptions +{ + UInt8 flags; + UInt8 txWindowSize; + UInt8 maxTransmit; + UInt16 retransmissionTimeout; + UInt16 monitorTimeout; + UInt16 maxPDUPayloadSize; +}; + +enum +{ + kBluetoothL2CAPInfoTypeMaxConnectionlessMTUSize = 0x0001 +}; + +// Packets + +enum +{ + kBluetoothL2CAPPacketHeaderSize = 4 +}; + +typedef UInt16 BluetoothL2CAPByteCount; +typedef UInt8 BluetoothL2CAPCommandID; +typedef UInt16 BluetoothL2CAPCommandByteCount; + +typedef enum +{ + kBluetoothL2CAPConnectionResultSuccessful = 0x0000, + kBluetoothL2CAPConnectionResultPending = 0x0001, + kBluetoothL2CAPConnectionResultRefusedPSMNotSupported = 0x0002, + kBluetoothL2CAPConnectionResultRefusedSecurityBlock = 0x0003, + kBluetoothL2CAPConnectionResultRefusedNoResources = 0x0004, +} BluetoothL2CAPConnectionResult; + +typedef enum +{ + kBluetoothL2CAPConnectionStatusNoInfoAvailable = 0x0000, + kBluetoothL2CAPConnectionStatusAuthenticationPending = 0x0001, + kBluetoothL2CAPConnectionStatusAuthorizationPending = 0x0002, +} BluetoothL2CAPConnectionStatus; + +typedef enum +{ + kBluetoothL2CAPConfigurationResultSuccess = 0x0000, + kBluetoothL2CAPConfigurationResultUnacceptableParams = 0x0001, + kBluetoothL2CAPConfigurationResultRejected = 0x0002, + kBluetoothL2CAPConfigurationResultUnknownOptions = 0x0003, +} BluetoothL2CAPConfigurationResult; + +typedef enum +{ + kBluetoothL2CAPConfigurationOptionMTU = 0x01, + kBluetoothL2CAPConfigurationOptionFlushTimeout = 0x02, + kBluetoothL2CAPConfigurationOptionQoS = 0x03, + kBluetoothL2CAPConfigurationOptionRetransmissionAndFlowControl = 0x04 +} BluetoothL2CAPConfigurationOption; + +enum +{ + kBluetoothL2CAPConfigurationOptionMTULength = 2, + kBluetoothL2CAPConfigurationOptionFlushTimeoutLength = 2, + kBluetoothL2CAPConfigurationOptionQoSLength = 22, + kBluetoothL2CAPConfigurationOptionRetransmissionAndFlowControlLength = 9 +}; + +typedef enum +{ + kBluetoothL2CAPConfigurationRetransmissionModeFlag = 0x01, + kBluetoothL2CAPConfigurationFlowControlModeFlag = 0x02, + kBluetoothL2CAPConfigurationBasicL2CAPModeFlag = 0x00, +} BluetoothL2CAPConfigurationRetransmissionAndFlowControlFlags; + + +typedef enum +{ + kBluetoothL2CAPInformationTypeConnectionlessMTU = 0x0001, + kBluetoothL2CAPInformationTypeExtendedFeatures = 0x0002, + kBluetoothL2CAPInformationTypeFixedChannelsSupported = 0x0003, +} BluetoothL2CAPInformationType; + +typedef enum +{ + kBluetoothL2CAPInformationResultSuccess = 0x0000, + kBluetoothL2CAPInformationResultNotSupported = 0x0001, +} BluetoothL2CAPInformationResult; + +typedef enum +{ + kBluetoothL2CAPInformationNoExtendedFeatures = 0x00000000, + kBluetoothL2CAPInformationFlowControlMode = 0x00000001, + kBluetoothL2CAPInformationRetransmissionMode = 0x00000002, + kBluetoothL2CAPInformationBidirectionalQoS = 0x00000004, + kBluetoothL2CAPInformationEnhancedRetransmissionMode = 0x00000008, + kBluetoothL2CAPInformationStreamingMode = 0x00000010, + kBluetoothL2CAPInformationFCSOption = 0x00000020, + kBluetoothL2CAPInformationExtendedFlowSpecification = 0x00000040, + kBluetoothL2CAPInformationFixedChannels = 0x00000080, + kBluetoothL2CAPInformationExtendedWindowSize = 0x00000100, + kBluetoothL2CAPUnicastConnectionlessDataReception = 0x00000200, +} BluetoothL2CAPInformationExtendedFeaturesMask; + +typedef enum +{ + kBluetoothL2CAPQoSTypeNoTraffic = 0x00, + kBluetoothL2CAPQoSTypeBestEffort = 0x01, + kBluetoothL2CAPQoSTypeGuaranteed = 0x02, +} BluetoothL2CAPQoSType; + +enum +{ + kBluetoothL2CAPMTUMinimum = 0x0030, // 48 bytes + kBluetoothL2CAPMTUDefault = 0x03F9, // 11.10.08 - dropped back to 1017 from 1021 (don't aggravate the 3DH5 problem between CSR<->BRCM just yet) + kBluetoothL2CAPMTUMaximum = 0xffff, + kBluetoothL2CAPMTUStart = 0x7fff, + kBluetoothL2CAPMTUSIG = 0x0030, // 48 bytes + kBluetoothL2CAPFlushTimeoutDefault = kBluetoothL2CAPFlushTimeoutForever, // 0xffff + kBluetoothL2CAPQoSFlagsDefault = 0, + kBluetoothL2CAPQoSTypeDefault = kBluetoothL2CAPQoSTypeBestEffort, // 0x01 + kBluetoothL2CAPQoSTokenRateDefault = 0x00000000, + kBluetoothL2CAPQoSTokenBucketSizeDefault = 0x00000000, + kBluetoothL2CAPQoSPeakBandwidthDefault = 0x00000000, + kBluetoothL2CAPQoSLatencyDefault = 0xffffffff, + kBluetoothL2CAPQoSDelayVariationDefault = 0xffffffff +}; + +#pragma mark === AMP Manager === +typedef enum { + kBluetoothAMPManagerCodeReserved = 0x00, + kBluetoothAMPManagerCodeAMPCommandReject = 0x01, + kBluetoothAMPManagerCodeAMPDiscoverRequest = 0x02, + kBluetoothAMPManagerCodeAMPDiscoverResponse = 0x03, + kBluetoothAMPManagerCodeAMPChangeNotify = 0x04, + kBluetoothAMPManagerCodeAMPChangeResponse = 0x05, + kBluetoothAMPManagerCodeAMPGetInfoRequest = 0x06, + kBluetoothAMPManagerCodeAMPGetInfoResponse = 0x07, + kBluetoothAMPManagerCodeAMPGetAssocRequest = 0x08, + kBluetoothAMPManagerCodeAMPGetAssocResponse = 0x09, + kBluetoothAMPManagerCodeAMPCreatePhysicalLinkRequest = 0x0A, + kBluetoothAMPManagerCodeAMPCreatePhysicalLinkResponse = 0x0B, + kBluetoothAMPManagerCodeAMPDisconnectPhysicalLinkRequest = 0x0C, + kBluetoothAMPManagerCodeAMPDisconnectPhysicalLinkResponse = 0x0D, +} BluetoothAMPManagerCode; + +typedef enum { + kBluetoothAMPManagerCommandRejectReasonCommandNotRecognized = 0x0000, +} BluetoothAMPCommandRejectReason; + +typedef enum { + kBluetoothAMPManagerDiscoverResponseControllerStatusPoweredDown = 0x00, + kBluetoothAMPManagerDiscoverResponseControllerStatusBluetoothOnly = 0x01, + kBluetoothAMPManagerDiscoverResponseControllerStatusNoCapacity = 0x02, + kBluetoothAMPManagerDiscoverResponseControllerStatusLowCapacity = 0x03, + kBluetoothAMPManagerDiscoverResponseControllerStatusMediumCapacity = 0x04, + kBluetoothAMPManagerDiscoverResponseControllerStatusHighCapacity = 0x05, + kBluetoothAMPManagerDiscoverResponseControllerStatusFullCapacity = 0x06, +} BluetoothAMPDiscoverResponseControllerStatus; + +typedef enum { + kBluetoothAMPManagerGetInfoResponseSuccess = 0x00, + kBluetoothAMPManagerGetInfoResponseInvalidControllerID = 0x01, +} BluetoothAMPGetInfoResponseStatus; + +typedef enum { + kBluetoothAMPManagerGetAssocResponseSuccess = 0x00, + kBluetoothAMPManagerGetAssocResponseInvalidControllerID = 0x01, +} BluetoothAMPGetAssocResponseStatus; + +typedef enum { + kBluetoothAMPManagerCreatePhysicalLinkResponseSuccess = 0x00, + kBluetoothAMPManagerCreatePhysicalLinkResponseInvalidControllerID = 0x01, + kBluetoothAMPManagerCreatePhysicalLinkResponseUnableToStartLinkCreation = 0x02, + kBluetoothAMPManagerCreatePhysicalLinkResponseCollisionOccurred = 0x03, + kBluetoothAMPManagerCreatePhysicalLinkResponseAMPDisconnectedPhysicalLinkRequestReceived = 0x04, + kBluetoothAMPManagerCreatePhysicalLinkResponsePhysicalLinkAlreadyExists = 0x05, + kBluetoothAMPManagerCreatePhysicalLinkResponseSecurityViolation = 0x06, +} BluetoothAMPCreatePhysicalLinkResponseStatus; + +typedef enum { + kBluetoothAMPManagerDisconnectPhysicalLinkResponseSuccess = 0x00, + kBluetoothAMPManagerDisconnectPhysicalLinkResponseInvalidControllerID = 0x01, + kBluetoothAMPManagerDisconnectPhysicalLinkResponseNoPhysicalLink = 0x02, +} BluetoothAMPDisconnectPhysicalLinkResponseStatus; + +#if 0 +#pragma mark - +#pragma mark === HCI === +#endif + +//=========================================================================================================================== +// Host Controller Interface (HCI) +//=========================================================================================================================== + +// HCI Command Packet +// ------------------ +// +// 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 +// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +// +--------------------------------+---------------+--------------+ +// | OpCode | | | +// +--------------------+-----------| Param Length | Params... | +// | OCF | OGF | | | +// +--------------------+-----------+---------------+--------------+ +// | | +// | Params... | +// | | +// +---------------------------------------------------------------+ + +// Commands + +typedef UInt8 BluetoothHCICommandOpCodeGroup; +typedef UInt16 BluetoothHCICommandOpCodeCommand; +typedef UInt16 BluetoothHCICommandOpCode; +typedef UInt32 BluetoothHCIVendorCommandSelector; + +#define BluetoothHCIMakeCommandOpCode( GROUP, CMD ) ( ( ( ( GROUP ) & 0x003F ) << 10 ) | ( ( CMD ) & 0x03FF ) ) +#define BluetoothHCIMakeCommandOpCodeEndianSwap( GROUP, CMD ) ( CFSwapInt16HostToLittle ( BluetoothHCIMakeCommandOpCode( GROUP, CMD ) ) ) +#define BluetoothHCIExtractCommandOpCodeGroup( OPCODE ) ( ( ( OPCODE ) >> 10 ) & 0x003F ) +#define BluetoothHCIExtractCommandOpCodeCommand( OPCODE ) ( ( OPCODE ) & 0x03FF ) + +#define BluetoothHCIMakeCommandOpCodeHostOrder(GROUP, CMD ) OSSwapLittleToHostConstInt16( ( ( ( GROUP ) & 0x003F ) << 10 ) | ( ( CMD ) & 0x03FF ) ) + + +enum +{ + // Command Group: NoOp + + kBluetoothHCIOpCodeNoOp = 0, + kBluetoothHCICommandGroupNoOp = 0x00, + kBluetoothHCICommandNoOp = 0x0000, + + // Command Group: Link Control + + kBluetoothHCICommandGroupLinkControl = 0x01, + kBluetoothHCICommandInquiry = 0x0001, + kBluetoothHCICommandInquiryCancel = 0x0002, + kBluetoothHCICommandPeriodicInquiryMode = 0x0003, + kBluetoothHCICommandExitPeriodicInquiryMode = 0x0004, + kBluetoothHCICommandCreateConnection = 0x0005, + kBluetoothHCICommandDisconnect = 0x0006, + kBluetoothHCICommandAddSCOConnection = 0x0007, + kBluetoothHCICommandCreateConnectionCancel = 0x0008, + kBluetoothHCICommandAcceptConnectionRequest = 0x0009, + kBluetoothHCICommandRejectConnectionRequest = 0x000A, + kBluetoothHCICommandLinkKeyRequestReply = 0x000B, + kBluetoothHCICommandLinkKeyRequestNegativeReply = 0x000C, + kBluetoothHCICommandPINCodeRequestReply = 0x000D, + kBluetoothHCICommandPINCodeRequestNegativeReply = 0x000E, + kBluetoothHCICommandChangeConnectionPacketType = 0x000F, + kBluetoothHCICommandAuthenticationRequested = 0x0011, + kBluetoothHCICommandSetConnectionEncryption = 0x0013, + kBluetoothHCICommandChangeConnectionLinkKey = 0x0015, + kBluetoothHCICommandMasterLinkKey = 0x0017, + kBluetoothHCICommandRemoteNameRequest = 0x0019, + kBluetoothHCICommandReadRemoteSupportedFeatures = 0x001B, + kBluetoothHCICommandReadRemoteExtendedFeatures = 0x001C, + kBluetoothHCICommandReadRemoteVersionInformation = 0x001D, + kBluetoothHCICommandReadClockOffset = 0x001F, + kBluetoothHCICommandRemoteNameRequestCancel = 0x001A, + kBluetoothHCICommandReadLMPHandle = 0x0020, + kBluetoothHCICommandSetupSynchronousConnection = 0x0028, + kBluetoothHCICommandAcceptSynchronousConnectionRequest = 0x0029, + kBluetoothHCICommandRejectSynchronousConnectionRequest = 0x002A, + kBluetoothHCICommandIOCapabilityRequestReply = 0x002B, + kBluetoothHCICommandUserConfirmationRequestReply = 0x002C, + kBluetoothHCICommandUserConfirmationRequestNegativeReply = 0x002D, + kBluetoothHCICommandUserPasskeyRequestReply = 0x002E, + kBluetoothHCICommandUserPasskeyRequestNegativeReply = 0x002F, + kBluetoothHCICommandRemoteOOBDataRequestReply = 0x0030, + kBluetoothHCICommandRemoteOOBDataRequestNegativeReply = 0x0033, + + // Command Group: Link Policy + + kBluetoothHCICommandGroupLinkPolicy = 0x02, + kBluetoothHCICommandHoldMode = 0x0001, + kBluetoothHCICommandSniffMode = 0x0003, + kBluetoothHCICommandExitSniffMode = 0x0004, + kBluetoothHCICommandParkMode = 0x0005, + kBluetoothHCICommandExitParkMode = 0x0006, + kBluetoothHCICommandQoSSetup = 0x0007, + kBluetoothHCICommandRoleDiscovery = 0x0009, + kBluetoothHCICommandSwitchRole = 0x000B, + kBluetoothHCICommandReadLinkPolicySettings = 0x000C, + kBluetoothHCICommandWriteLinkPolicySettings = 0x000D, + kBluetoothHCICommandReadDefaultLinkPolicySettings = 0x000E, + kBluetoothHCICommandWriteDefaultLinkPolicySettings = 0x000F, + kBluetoothHCICommandFlowSpecification = 0x0010, + kBluetoothHCICommandSniffSubrating = 0x0011, + kBluetoothHCICommandAcceptSniffRequest = 0x0031, + kBluetoothHCICommandRejectSniffRequest = 0x0032, + + // Command Group: Host Controller & Baseband + + kBluetoothHCICommandGroupHostController = 0x03, + kBluetoothHCICommandSetEventMask = 0x0001, + kBluetoothHCICommandReset = 0x0003, + kBluetoothHCICommandSetEventFilter = 0x0005, + kBluetoothHCICommandFlush = 0x0008, + kBluetoothHCICommandReadPINType = 0x0009, + kBluetoothHCICommandWritePINType = 0x000A, + kBluetoothHCICommandCreateNewUnitKey = 0x000B, + kBluetoothHCICommandReadStoredLinkKey = 0x000D, + kBluetoothHCICommandWriteStoredLinkKey = 0x0011, + kBluetoothHCICommandDeleteStoredLinkKey = 0x0012, + kBluetoothHCICommandChangeLocalName = 0x0013, + kBluetoothHCICommandReadLocalName = 0x0014, + kBluetoothHCICommandReadConnectionAcceptTimeout = 0x0015, + kBluetoothHCICommandWriteConnectionAcceptTimeout = 0x0016, + kBluetoothHCICommandReadPageTimeout = 0x0017, + kBluetoothHCICommandWritePageTimeout = 0x0018, + kBluetoothHCICommandReadScanEnable = 0x0019, + kBluetoothHCICommandWriteScanEnable = 0x001A, + kBluetoothHCICommandReadPageScanActivity = 0x001B, + kBluetoothHCICommandWritePageScanActivity = 0x001C, + kBluetoothHCICommandReadInquiryScanActivity = 0x001D, + kBluetoothHCICommandWriteInquiryScanActivity = 0x001E, + kBluetoothHCICommandReadAuthenticationEnable = 0x001F, + kBluetoothHCICommandWriteAuthenticationEnable = 0x0020, + kBluetoothHCICommandReadEncryptionMode = 0x0021, + kBluetoothHCICommandWriteEncryptionMode = 0x0022, + kBluetoothHCICommandReadClassOfDevice = 0x0023, + kBluetoothHCICommandWriteClassOfDevice = 0x0024, + kBluetoothHCICommandReadVoiceSetting = 0x0025, + kBluetoothHCICommandWriteVoiceSetting = 0x0026, + kBluetoothHCICommandReadAutomaticFlushTimeout = 0x0027, + kBluetoothHCICommandWriteAutomaticFlushTimeout = 0x0028, + kBluetoothHCICommandReadNumberOfBroadcastRetransmissions = 0x0029, + kBluetoothHCICommandWriteNumberOfBroadcastRetransmissions = 0x002A, + kBluetoothHCICommandReadHoldModeActivity = 0x002B, + kBluetoothHCICommandWriteHoldModeActivity = 0x002C, + kBluetoothHCICommandReadTransmitPowerLevel = 0x002D, + kBluetoothHCICommandReadSCOFlowControlEnable = 0x002E, + kBluetoothHCICommandWriteSCOFlowControlEnable = 0x002F, + kBluetoothHCICommandSetHostControllerToHostFlowControl = 0x0031, + kBluetoothHCICommandHostBufferSize = 0x0033, + kBluetoothHCICommandHostNumberOfCompletedPackets = 0x0035, + kBluetoothHCICommandReadLinkSupervisionTimeout = 0x0036, + kBluetoothHCICommandWriteLinkSupervisionTimeout = 0x0037, + kBluetoothHCICommandReadNumberOfSupportedIAC = 0x0038, + kBluetoothHCICommandReadCurrentIACLAP = 0x0039, + kBluetoothHCICommandWriteCurrentIACLAP = 0x003A, + kBluetoothHCICommandReadPageScanPeriodMode = 0x003B, + kBluetoothHCICommandWritePageScanPeriodMode = 0x003C, + kBluetoothHCICommandReadPageScanMode = 0x003D, + kBluetoothHCICommandWritePageScanMode = 0x003E, + kBluetoothHCICommandSetAFHClassification = 0x003F, + kBluetoothHCICommandReadInquiryScanType = 0x0042, + kBluetoothHCICommandWriteInquiryScanType = 0x0043, + kBluetoothHCICommandReadInquiryMode = 0x0044, + kBluetoothHCICommandWriteInquiryMode = 0x0045, + kBluetoothHCICommandReadPageScanType = 0x0046, + kBluetoothHCICommandWritePageScanType = 0x0047, + kBluetoothHCICommandReadAFHChannelAssessmentMode = 0x0048, + kBluetoothHCICommandWriteAFHChannelAssessmentMode = 0x0049, + kBluetoothHCICommandReadExtendedInquiryResponse = 0x0051, + kBluetoothHCICommandWriteExtendedInquiryResponse = 0x0052, + kBluetoothHCICommandReadSimplePairingMode = 0x0055, + kBluetoothHCICommandWriteSimplePairingMode = 0x0056, + kBluetoothHCICommandReadLocalOOBData = 0x0057, + kBluetoothHCICommandReadInquiryResponseTransmitPower = 0x0058, + kBluetoothHCICommandWriteInquiryResponseTransmitPower = 0x0059, + kBluetoothHCICommandReadDefaultErroneousDataReporting = 0x005A, + kBluetoothHCICommandWriteDefaultErroneousDataReporting = 0x005B, + kBluetoothHCICommandReadPersistentSniffInterval = 0x005C, + kBluetoothHCICommandWritePersistentSniffInterval = 0x005D, + kBluetoothHCICommandDeletePersistentSniffInterval = 0x005E, + kBluetoothHCICommandEnhancedFlush = 0x005F, + kBluetoothHCICommandSendKeypressNotification = 0x0060, + + // Command Group: Informational + + kBluetoothHCICommandGroupInformational = 0x04, + kBluetoothHCICommandReadLocalVersionInformation = 0x0001, + kBluetoothHCICommandReadLocalSupportedCommands = 0x0002, + kBluetoothHCICommandReadLocalSupportedFeatures = 0x0003, + kBluetoothHCICommandReadLocalExtendedFeatures = 0x0004, + kBluetoothHCICommandReadBufferSize = 0x0005, + kBluetoothHCICommandReadCountryCode = 0x0007, + kBluetoothHCICommandReadDeviceAddress = 0x0009, + + // Command Group: Status + + kBluetoothHCICommandGroupStatus = 0x05, + kBluetoothHCICommandReadFailedContactCounter = 0x0001, + kBluetoothHCICommandResetFailedContactCounter = 0x0002, + kBluetoothHCICommandGetLinkQuality = 0x0003, + kBluetoothHCICommandReadRSSI = 0x0005, + kBluetoothHCICommandReadAFHMappings = 0x0006, + kBluetoothHCICommandReadClock = 0x0007, + + // Command Group: Testing + + kBluetoothHCICommandGroupTesting = 0x06, + kBluetoothHCICommandReadLoopbackMode = 0x0001, + kBluetoothHCICommandWriteLoopbackMode = 0x0002, + kBluetoothHCICommandEnableDeviceUnderTestMode = 0x0003, + kBluetoothHCICommandWriteSimplePairingDebugMode = 0x0004, + + // Command Group: Logo Testing (no commands yet) + + kBluetoothHCICommandGroupLogoTesting = 0x3E, + + // Command Group: Vendor Specific (from Broadcom HCI Programmer's Reference Guide) + + kBluetoothHCICommandGroupVendorSpecific = 0x3f, + kBluetoothHCICommandWriteDeviceAddress = 0x0001, + kBluetoothHCICommandWriteHoppingChannels = 0x0012, + kBluetoothHCICommandInvalidateFlashAndReboot = 0x0017, + kBluetoothHCICommandSetMaxPower = 0x0026, + kBluetoothHCICommandEnableHIDEmulation = 0x003B, + kBluetoothHCICommandEnableRadio = 0x0034, + kBluetoothHCIGetHIDDeviceList = 0x0036, + kBluetoothHCIAddHIDDevice = 0x0037, + kBluetoothHCIRemoveHIDDevice = 0x0039, + + kBluetoothHCICommandGroupMax = 0x40, + kBluetoothHCICommandMax = 0x03FF +}; + +// HCI Data Types + +typedef UInt8 BluetoothHCIQoSFlags; +typedef UInt8 BluetoothHCIParamByteCount; +typedef UInt16 BluetoothHCIACLDataByteCount; +typedef UInt8 BluetoothHCISCODataByteCount; +typedef UInt8 BluetoothHCIInquiryLength; +typedef UInt8 BluetoothHCIResponseCount; +typedef UInt8 BluetoothHCICountryCode; +typedef UInt16 BluetoothHCIModeInterval; +typedef UInt16 BluetoothHCISniffAttemptCount; +typedef UInt16 BluetoothHCISniffTimeout; +typedef UInt16 BluetoothHCIParkModeBeaconInterval; + +typedef UInt8 BluetoothMaxSlots; +typedef UInt16 BluetoothManufacturerName; +typedef UInt8 BluetoothLMPVersion; +typedef UInt16 BluetoothLMPSubversion; + +typedef UInt8 BluetoothHCIConnectionMode; +enum BluetoothHCIConnectionModes +{ + kConnectionActiveMode = 0, + kConnectionHoldMode = 1, + kConnectionSniffMode = 2, + kConnectionParkMode = 3, + kConnectionModeReservedForFutureUse = 4, +}; + +typedef struct BluetoothHCISupportedFeatures BluetoothHCISupportedFeatures; +struct BluetoothHCISupportedFeatures +{ + UInt8 data[8]; +}; + +#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 +typedef UInt8 BluetoothHCIPageNumber; +typedef struct BluetoothHCIExtendedFeaturesInfo BluetoothHCIExtendedFeaturesInfo; +struct BluetoothHCIExtendedFeaturesInfo +{ + BluetoothHCIPageNumber page; + BluetoothHCIPageNumber maxPage; + UInt8 data[8]; +}; +#endif /* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 */ + +enum BluetoothFeatureBits +{ + // Byte 0 of the support features data structure. + + kBluetoothFeatureThreeSlotPackets = (1 << 0L), + kBluetoothFeatureFiveSlotPackets = (1 << 1L), + kBluetoothFeatureEncryption = (1 << 2L), + kBluetoothFeatureSlotOffset = (1 << 3L), + kBluetoothFeatureTimingAccuracy = (1 << 4L), + kBluetoothFeatureSwitchRoles = (1 << 5L), + kBluetoothFeatureHoldMode = (1 << 6L), + kBluetoothFeatureSniffMode = (1 << 7L), + + // Byte 1 of the support features data structure. + + kBluetoothFeatureParkMode = (1 << 0L), + kBluetoothFeatureRSSI = (1 << 1L), + kBluetoothFeaturePowerControlRequests = (1 << 1L), + kBluetoothFeatureChannelQuality = (1 << 2L), + kBluetoothFeatureSCOLink = (1 << 3L), + kBluetoothFeatureHV2Packets = (1 << 4L), + kBluetoothFeatureHV3Packets = (1 << 5L), + kBluetoothFeatureULawLog = (1 << 6L), + kBluetoothFeatureALawLog = (1 << 7L), + + // Byte 2 of the support features data structure. + + kBluetoothFeatureCVSD = (1 << 0L), + kBluetoothFeaturePagingScheme = (1 << 1L), + kBluetoothFeaturePowerControl = (1 << 2L), + kBluetoothFeatureTransparentSCOData = (1 << 3L), + kBluetoothFeatureFlowControlLagBit0 = (1 << 4L), + kBluetoothFeatureFlowControlLagBit1 = (1 << 5L), + kBluetoothFeatureFlowControlLagBit2 = (1 << 6L), + kBluetoothFeatureBroadcastEncryption = (1 << 7L), + + // Byte 3 of the support features data structure. + + kBluetoothFeatureScatterMode = (1 << 0L), + kBluetoothFeatureEnhancedDataRateACL2MbpsMode = (1 << 1L), + kBluetoothFeatureEnhancedDataRateACL3MbpsMode = (1 << 2L), + kBluetoothFeatureEnhancedInquiryScan = (1 << 3L), + kBluetoothFeatureInterlacedInquiryScan = (1 << 4L), + kBluetoothFeatureInterlacedPageScan = (1 << 5L), + kBluetoothFeatureRSSIWithInquiryResult = (1 << 6L), + kBluetoothFeatureExtendedSCOLink = (1 << 7L), + + // Byte 4 of the support features data structure. + + kBluetoothFeatureEV4Packets = (1 << 0L), + kBluetoothFeatureEV5Packets = (1 << 1L), + kBluetoothFeatureAbsenceMasks = (1 << 2L), + kBluetoothFeatureAFHCapableSlave = (1 << 3L), + kBluetoothFeatureAFHClassificationSlave = (1 << 4L), + kBluetoothFeatureAliasAuhentication = (1 << 5L), + kBluetoothFeatureAnonymityMode = (1 << 6L), + kBluetoothFeature3SlotEnhancedDataRateACLPackets = (1 << 7L), + + // Byte 5 of the support features data structure. + + kBluetoothFeature5SlotEnhancedDataRateACLPackets = (1 << 0L), // 2.0 version of this header had this at the wrong bit location + kBluetoothFeatureSniffSubrating = (1 << 1L), + kBluetoothFeaturePauseEncryption = (1 << 2L), + kBluetoothFeatureAFHCapableMaster = (1 << 3L), + kBluetoothFeatureAFHClassificationMaster = (1 << 4L), + kBluetoothFeatureEnhancedDataRateeSCO2MbpsMode = (1 << 5L), + kBluetoothFeatureEnhancedDataRateeSCO3MbpsMode = (1 << 6L), + kBluetoothFeature3SlotEnhancedDataRateeSCOPackets = (1 << 7L), + + // Byte 6 of the support features data structure. + + kBluetoothFeatureExtendedInquiryResponse = (1 << 0L), + kBluetoothFeatureSecureSimplePairing = (1 << 3L), + kBluetoothFeatureEncapsulatedPDU = (1 << 4L), + kBluetoothFeatureErroneousDataReporting = (1 << 5L), + kBluetoothFeatureNonFlushablePacketBoundaryFlag = (1 << 6L), + + // Byte 7 of the support features data structure. + + kBluetoothFeatureLinkSupervisionTimeoutChangedEvent = (1 << 0L), + kBluetoothFeatureInquiryTransmissionPowerLevel = (1 << 1L), + kBluetoothFeatureExtendedFeatures = (1 << 7L), + + // Byte 8 of the support features data structure (extended) + + kBluetoothFeatureSimpleSecurePairingHostMode = (1 << 0L), + +}; + +typedef UInt16 BluetoothHCIFailedContactCount; +typedef struct BluetoothHCIFailedContactInfo BluetoothHCIFailedContactInfo; +struct BluetoothHCIFailedContactInfo +{ + BluetoothHCIFailedContactCount count; + BluetoothConnectionHandle handle; +}; + +typedef SInt8 BluetoothHCIRSSIValue; /* Valid Range: -127 to +20 */ +typedef struct BluetoothHCIRSSIInfo BluetoothHCIRSSIInfo; +struct BluetoothHCIRSSIInfo +{ + BluetoothConnectionHandle handle; + BluetoothHCIRSSIValue RSSIValue; +}; + +typedef UInt8 BluetoothHCILinkQuality; +typedef struct BluetoothHCILinkQualityInfo BluetoothHCILinkQualityInfo; +struct BluetoothHCILinkQualityInfo +{ + BluetoothConnectionHandle handle; + BluetoothHCILinkQuality qualityValue; +}; + +typedef UInt8 BluetoothHCIRole; +typedef struct BluetoothHCIRoleInfo BluetoothHCIRoleInfo; +struct BluetoothHCIRoleInfo +{ + UInt8 role; + BluetoothConnectionHandle handle; +}; + +enum BluetoothHCIRoles +{ + kBluetoothHCIMasterRole = 0x00, + kBluetoothHCISlaveRole = 0x01 +}; + +typedef UInt16 BluetoothHCILinkPolicySettings; +enum BluetoothHCILinkPolicySettingsValues +{ + kDisableAllLMModes = 0x0000, + kEnableMasterSlaveSwitch = 0x0001, + kEnableHoldMode = 0x0002, + kEnableSniffMode = 0x0004, + kEnableParkMode = 0x0008, + kReservedForFutureUse = 0x0010 +}; + +typedef struct BluetoothHCILinkPolicySettingsInfo BluetoothHCILinkPolicySettingsInfo; +struct BluetoothHCILinkPolicySettingsInfo +{ + BluetoothHCILinkPolicySettings settings; + BluetoothConnectionHandle handle; +}; + + +typedef struct BluetoothHCIQualityOfServiceSetupParams BluetoothHCIQualityOfServiceSetupParams; +struct BluetoothHCIQualityOfServiceSetupParams +{ + UInt8 flags; + UInt8 serviceType; + UInt32 tokenRate; + UInt32 peakBandwidth; + UInt32 latency; + UInt32 delayVariation; +}; + +typedef UInt8 BluetoothHCILoopbackMode; +enum +{ + kBluetoothHCILoopbackModeOff = 0x00, + kBluetoothHCILoopbackModeLocal = 0x01, + kBluetoothHCILoopbackModeRemote = 0x02 +}; + +typedef UInt32 BluetoothHCIOperationID; +typedef UInt32 BluetoothHCIEventID; +typedef UInt32 BluetoothHCIDataID; +typedef UInt32 BluetoothHCISignalID; +typedef UInt32 BluetoothHCITransportID; +typedef UInt32 BluetoothHCITransportCommandID; +typedef UInt32 BluetoothHCIRequestID; + + +// Version Information + +typedef struct BluetoothHCIVersionInfo BluetoothHCIVersionInfo; +struct BluetoothHCIVersionInfo +{ + // Local & Remote information + + BluetoothManufacturerName manufacturerName; + BluetoothLMPVersion lmpVersion; + BluetoothLMPSubversion lmpSubVersion; + + // Local information only + + UInt8 hciVersion; + UInt16 hciRevision; +}; + +// HCI buffer sizes. + +typedef struct BluetoothHCIBufferSize BluetoothHCIBufferSize; +struct BluetoothHCIBufferSize +{ + UInt16 ACLDataPacketLength; + UInt8 SCODataPacketLength; + UInt16 totalNumACLDataPackets; + UInt16 totalNumSCODataPackets; +}; + +// Timeouts +typedef UInt16 BluetoothHCIConnectionAcceptTimeout; +typedef UInt16 BluetoothHCIPageTimeout; +enum BluetoothHCITimeoutValues +{ + kDefaultPageTimeout = 0x2000, +}; + +#define BluetoothGetSlotsFromSeconds( inSeconds ) ( (inSeconds/.000625 ) ) + + +// Link Keys +typedef UInt16 BluetoothHCINumLinkKeysDeleted; +typedef UInt8 BluetoothHCINumLinkKeysToWrite; +typedef UInt8 BluetoothHCIDeleteStoredLinkKeyFlag; +enum BluetoothHCIDeleteStoredLinkKeyFlags +{ + kDeleteKeyForSpecifiedDeviceOnly = 0x00, + kDeleteAllStoredLinkKeys = 0x01, +}; + +typedef UInt8 BluetoothHCIReadStoredLinkKeysFlag; +enum BluetoothHCIReadStoredLinkKeysFlags +{ + kReturnLinkKeyForSpecifiedDeviceOnly = 0x00, + kReadAllStoredLinkKeys = 0x01, +}; + +typedef struct BluetoothHCIStoredLinkKeysInfo BluetoothHCIStoredLinkKeysInfo; +struct BluetoothHCIStoredLinkKeysInfo +{ + UInt16 numLinkKeysRead; + UInt16 maxNumLinkKeysAllowedInDevice; +}; + + +// Page Scan + +typedef UInt8 BluetoothHCIPageScanMode; +enum BluetoothHCIPageScanModes +{ + kMandatoryPageScanMode = 0x00, + kOptionalPageScanMode1 = 0x01, + kOptionalPageScanMode2 = 0x02, + kOptionalPageScanMode3 = 0x03, +}; + +typedef UInt8 BluetoothHCIPageScanPeriodMode; +enum BluetoothHCIPageScanPeriodModes +{ + kP0Mode = 0x00, + kP1Mode = 0x01, + kP2Mode = 0x02, +}; + +typedef UInt8 BluetoothHCIPageScanEnableState; +enum BluetoothHCIPageScanEnableStates +{ + kNoScansEnabled = 0x00, + kInquiryScanEnabledPageScanDisabled = 0x01, + kInquiryScanDisabledPageScanEnabled = 0x02, + kInquiryScanEnabledPageScanEnabled = 0x03, +}; + +typedef struct BluetoothHCIScanActivity BluetoothHCIScanActivity; +struct BluetoothHCIScanActivity +{ + UInt16 scanInterval; + UInt16 scanWindow; +}; + +typedef struct BluetoothHCIInquiryAccessCode BluetoothHCIInquiryAccessCode; +struct BluetoothHCIInquiryAccessCode +{ + UInt8 data[3]; +}; + +typedef UInt8 BluetoothHCIInquiryAccessCodeCount; +typedef struct BluetoothHCICurrentInquiryAccessCodes BluetoothHCICurrentInquiryAccessCodes; +struct BluetoothHCICurrentInquiryAccessCodes +{ + BluetoothHCIInquiryAccessCodeCount count; // Number of codes in array. + BluetoothHCIInquiryAccessCode * codes; // Ptr to array of codes. +}; + +typedef struct BluetoothHCILinkSupervisionTimeout BluetoothHCILinkSupervisionTimeout; +struct BluetoothHCILinkSupervisionTimeout +{ + BluetoothConnectionHandle handle; + UInt16 timeout; +}; + +typedef UInt8 BluetoothHCIFlowControlState; +enum BluetoothHCISCOFlowControlStates +{ + kSCOFlowControlDisabled = 0x00, + kSCOFlowControlEnabled = 0x01 +}; + +enum BluetoothHCIGeneralFlowControlStates +{ + kHostControllerToHostFlowControlOff = 0x00, + kHCIACLDataPacketsOnHCISCODataPacketsOff = 0x01, + kHCIACLDataPacketsOffHCISCODataPacketsOn = 0x02, + kHCIACLDataPacketsOnHCISCODataPacketsOn = 0x03, +}; + +typedef SInt8 BluetoothHCITransmitPowerLevel; +typedef UInt8 BluetoothHCITransmitPowerLevelType; +enum BluetoothHCITransmitReadPowerLevelTypes +{ + kReadCurrentTransmitPowerLevel = 0x00, + kReadMaximumTransmitPowerLevel = 0x01, +}; + +typedef UInt8 BluetoothHCIAFHChannelAssessmentMode; +enum BluetoothHCIAFHChannelAssessmentModes +{ + kAFHChannelAssessmentModeDisabled = 0x00, + kAFHChannelAssessmentModeEnabled = 0x01 +}; + + +typedef struct BluetoothHCITransmitPowerLevelInfo BluetoothHCITransmitPowerLevelInfo; +struct BluetoothHCITransmitPowerLevelInfo +{ + BluetoothConnectionHandle handle; + BluetoothHCITransmitPowerLevel level; // Range: -70 <= N <= 20 (units are dBm) +}; + +typedef UInt8 BluetoothHCINumBroadcastRetransmissions; +typedef UInt8 BluetoothHCIHoldModeActivity; +enum BluetoothHCIHoldModeActivityStates +{ + kMaintainCurrentPowerState = 0x00, + kSuspendPageScan = 0x01, + kSuspendInquiryScan = 0x02, + kSuspendPeriodicInquiries = 0x03, +}; + +typedef UInt8 BluetoothHCIAuthenticationEnable; +enum BluetoothHCIAuthentionEnableModes +{ + kAuthenticationDisabled = 0x00, + kAuthenticationEnabled = 0x01, +}; + +typedef UInt8 BluetoothHCIEncryptionMode; +enum BluetoothHCIEncryptionModes +{ + kEncryptionDisabled = 0x00, // Default. + kEncryptionOnlyForPointToPointPackets = 0x01, + kEncryptionForBothPointToPointAndBroadcastPackets = 0x02, +}; + +typedef UInt16 BluetoothHCIAutomaticFlushTimeout; +typedef struct BluetoothHCIAutomaticFlushTimeoutInfo BluetoothHCIAutomaticFlushTimeoutInfo; +struct BluetoothHCIAutomaticFlushTimeoutInfo +{ + BluetoothConnectionHandle handle; + BluetoothHCIAutomaticFlushTimeout timeout; +}; + +#define kInfoStringMaxLength 25 +typedef struct BluetoothTransportInfo BluetoothTransportInfo; +typedef BluetoothTransportInfo* BluetoothTransportInfoPtr; +struct BluetoothTransportInfo +{ + UInt32 productID; + UInt32 vendorID; + UInt32 type; + char productName[kInfoStringMaxLength]; + char vendorName[kInfoStringMaxLength]; +}; + +enum BluetoothTransportTypes +{ + kBluetoothTransportTypeUSB = 0x01, + kBluetoothTransportTypePCCard = 0x02, + kBluetoothTransportTypePCICard = 0x03 +}; + +// Inquiries + +typedef struct BluetoothHCIInquiryResult BluetoothHCIInquiryResult; +struct BluetoothHCIInquiryResult +{ + BluetoothDeviceAddress deviceAddress; + BluetoothPageScanRepetitionMode pageScanRepetitionMode; + BluetoothHCIPageScanPeriodMode pageScanPeriodMode; + BluetoothHCIPageScanMode pageScanMode; + BluetoothClassOfDevice classOfDevice; + BluetoothClockOffset clockOffset; +}; + +#define kBluetoothHCIInquiryResultsMaxResults 50 +typedef struct BluetoothHCIInquiryResults BluetoothHCIInquiryResults; +struct BluetoothHCIInquiryResults +{ + BluetoothHCIInquiryResult results[kBluetoothHCIInquiryResultsMaxResults]; + IOItemCount count; +}; + +#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0 + +//Inquiries with RSSI (v1.2 specification) + +typedef struct BluetoothHCIInquiryWithRSSIResult BluetoothHCIInquiryWithRSSIResult; +struct BluetoothHCIInquiryWithRSSIResult +{ + BluetoothDeviceAddress deviceAddress; + BluetoothPageScanRepetitionMode pageScanRepetitionMode; + UInt8 reserved; + BluetoothClassOfDevice classOfDevice; + BluetoothClockOffset clockOffset; + BluetoothHCIRSSIValue RSSIValue; +}; + +typedef struct BluetoothHCIInquiryWithRSSIResults BluetoothHCIInquiryWithRSSIResults; +struct BluetoothHCIInquiryWithRSSIResults +{ + BluetoothHCIInquiryWithRSSIResult results[50]; + IOItemCount count; +}; + +//Inquiries with 'Extended Inquiry Response' (v2.1 specification) + +typedef UInt8 BluetoothHCIFECRequired; +enum BluetoothHCIFECRequiredValues +{ + kBluetoothHCIFECRequired = 0x00, + kBluetoothHCIFECNotRequired = 0x01 +}; + +typedef UInt8 BluetoothHCIInquiryMode; +enum BluetoothHCIInquiryModes +{ + kBluetoothHCIInquiryModeResultFormatStandard = 0x00, + kBluetoothHCIInquiryModeResultFormatWithRSSI = 0x01, + kBluetoothHCIInquiryModeResultFormatWithRSSIOrExtendedInquiryResultFormat = 0x02 +}; + +typedef UInt8 BluetoothHCIExtendedInquiryResponseDataType; + +typedef struct BluetoothHCIExtendedInquiryResponse BluetoothHCIExtendedInquiryResponse; /* Extended Inquiry Response [EIR] data, consisting of a sequence of data structures in this format: [length(1byte)][data type(1byte)][data(e.g. device name)] */ +struct BluetoothHCIExtendedInquiryResponse +{ + UInt8 data[ 240 ]; +}; + +typedef struct BluetoothHCIReadExtendedInquiryResponseResults BluetoothHCIReadExtendedInquiryResponseResults; +struct BluetoothHCIReadExtendedInquiryResponseResults +{ + BluetoothHCIFECRequired outFECRequired; + BluetoothHCIExtendedInquiryResponse extendedInquiryResponse; +}; + +typedef struct BluetoothHCIExtendedInquiryResult BluetoothHCIExtendedInquiryResult; +struct BluetoothHCIExtendedInquiryResult +{ + UInt8 numberOfReponses; /* always a value of 1 */ + BluetoothDeviceAddress deviceAddress; + BluetoothPageScanRepetitionMode pageScanRepetitionMode; + UInt8 reserved; + BluetoothClassOfDevice classOfDevice; + BluetoothClockOffset clockOffset; + BluetoothHCIRSSIValue RSSIValue; + BluetoothHCIExtendedInquiryResponse extendedInquiryResponse; +}; + +// 'Simple Pairing' (v2.1 specification) + +typedef UInt8 BluetoothHCISimplePairingMode; +enum BluetoothHCISimplePairingModes +{ + kBluetoothHCISimplePairingModeNotSet = 0x00, + kBluetoothHCISimplePairingModeEnabled = 0x01 +}; + +typedef UInt8 BluetoothSimplePairingDebugMode; +enum BluetoothSimplePairingDebugModes +{ + kBluetoothHCISimplePairingDebugModeDisabled = 0x00, + kBluetoothHCISimplePairingDebugModeEnabled = 0x01 +}; + +typedef struct BluetoothHCISimplePairingOOBData BluetoothHCISimplePairingOOBData; +struct BluetoothHCISimplePairingOOBData +{ + UInt8 data[ 16 ]; +}; + +typedef struct BluetoothHCIReadLocalOOBDataResults BluetoothHCIReadLocalOOBDataResults; +struct BluetoothHCIReadLocalOOBDataResults +{ + BluetoothHCISimplePairingOOBData hash; + BluetoothHCISimplePairingOOBData randomizer; +}; + +typedef UInt8 BluetoothIOCapability; +enum BluetoothIOCapabilities +{ + kBluetoothCapabilityTypeDisplayOnly = 0x00, + kBluetoothCapabilityTypeDisplayYesNo = 0x01, + kBluetoothCapabilityTypeKeyboardOnly = 0x02, + kBluetoothCapabilityTypeNoInputNoOutput = 0x03 +}; + +typedef UInt8 BluetoothOOBDataPresence; +enum BluetoothOOBDataPresenceValues +{ + kBluetoothOOBAuthenticationDataNotPresent = 0x00, + kBluetoothOOBAuthenticationDataFromRemoteDevicePresent = 0x01 +}; + +typedef UInt8 BluetoothAuthenticationRequirements; +enum BluetoothAuthenticationRequirementsValues +{ + kBluetoothAuthenticationRequirementsMITMProtectionNotRequired = 0x00, /* Numeric comparison with automatic accept allowed */ + kBluetoothAuthenticationRequirementsMITMProtectionRequired = 0x01, /* Refer to BluetoothIOCapabilities to determine authentication procedure */ + kBluetoothAuthenticationRequirementsMITMProtectionNotRequiredNoBonding = 0x00, + kBluetoothAuthenticationRequirementsMITMProtectionRequiredNoBonding = 0x01, + kBluetoothAuthenticationRequirementsMITMProtectionNotRequiredDedicatedBonding = 0x02, + kBluetoothAuthenticationRequirementsMITMProtectionRequiredDedicatedBonding = 0x03, + kBluetoothAuthenticationRequirementsMITMProtectionNotRequiredGeneralBonding = 0x04, + kBluetoothAuthenticationRequirementsMITMProtectionRequiredGeneralBonding = 0x05 +}; + +typedef struct BluetoothIOCapabilityResponse BluetoothIOCapabilityResponse; +struct BluetoothIOCapabilityResponse +{ + BluetoothDeviceAddress deviceAddress; + BluetoothIOCapability ioCapability; /* possible values from BluetoothIOCapabilities above */ + BluetoothOOBDataPresence OOBDataPresence; + BluetoothAuthenticationRequirements authenticationRequirements; +}; + +typedef UInt32 BluetoothPasskey; + +typedef struct BluetoothUserPasskeyNotification BluetoothUserPasskeyNotification; +struct BluetoothUserPasskeyNotification +{ + BluetoothDeviceAddress deviceAddress; + BluetoothPasskey passkey; /* passkey for display. valid values are 000000 - 999999 */ +}; + +typedef UInt8 BluetoothKeypressNotificationType; +enum BluetoothKeypressNotificationTypes +{ + kBluetoothKeypressNotificationTypePasskeyEntryStarted = 0, + kBluetoothKeypressNotificationTypePasskeyDigitEntered = 1, + kBluetoothKeypressNotificationTypePasskeyDigitErased = 2, + kBluetoothKeypressNotificationTypePasskeyCleared = 3, + kBluetoothKeypressNotificationTypePasskeyEntryCompleted = 4 +}; + +typedef struct BluetoothKeypressNotification BluetoothKeypressNotification; +struct BluetoothKeypressNotification +{ + BluetoothDeviceAddress deviceAddress; + BluetoothKeypressNotificationType notificationType; +}; + +typedef SInt8 TransmissionPower; + +typedef UInt8 BluetoothAFHMode; +typedef struct BluetoothAFHResults BluetoothAFHResults; +struct BluetoothAFHResults +{ + BluetoothConnectionHandle handle; + BluetoothAFHMode mode; + UInt8 afhMap[10]; +}; + +#endif /* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0 */ + +#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 + +typedef UInt32 BluetoothNumericValue; + +typedef struct BluetoothUserConfirmationRequest BluetoothUserConfirmationRequest; +struct BluetoothUserConfirmationRequest +{ + BluetoothDeviceAddress deviceAddress; + BluetoothNumericValue numericValue; /* numeric value for display. valid values are 000000 - 999999 */ +}; + +typedef struct BluetoothHCIEventSimplePairingCompleteResults BluetoothHCIEventSimplePairingCompleteResults; +struct BluetoothHCIEventSimplePairingCompleteResults +{ + BluetoothDeviceAddress deviceAddress; +}; + +#endif /* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 */ + + +// Packet Sizes + +enum +{ + kBluetoothHCICommandPacketHeaderSize = 3, + kBluetoothHCICommandPacketMaxDataSize = 255, + kBluetoothHCIMaxCommandPacketSize = kBluetoothHCICommandPacketHeaderSize + kBluetoothHCICommandPacketMaxDataSize, + + kBluetoothHCIEventPacketHeaderSize = 2, + kBluetoothHCIEventPacketMaxDataSize = 255, + kBluetoothHCIMaxEventPacketSize = kBluetoothHCIEventPacketHeaderSize + kBluetoothHCIEventPacketMaxDataSize, + + kBluetoothHCIDataPacketHeaderSize = 4, + kBluetoothHCIDataPacketMaxDataSize = 65535, + kBluetoothHCIMaxDataPacketSize = kBluetoothHCIDataPacketHeaderSize + kBluetoothHCIDataPacketMaxDataSize +}; + +typedef UInt8 BluetoothHCIEventCode; +typedef UInt8 BluetoothLinkType; +enum BluetoothLinkTypes +{ + kBluetoothSCOConnection = 0, + kBluetoothACLConnection = 1, + kBluetoothESCOConnection = 2, + kBluetoothLinkTypeNone = 0xff +}; + +typedef UInt16 BluetoothHCIVoiceSetting; // 10 bits meaningful +typedef UInt8 BluetoothHCISupportedIAC; + +typedef uint32_t BluetoothHCITransmitBandwidth; +typedef uint32_t BluetoothHCIReceiveBandwidth; +typedef uint16_t BluetoothHCIMaxLatency; +typedef uint8_t BluetoothHCIRetransmissionEffort; +enum BluetoothHCIRetransmissionEffortTypes +{ + kHCIRetransmissionEffortTypeNone = 0x00, + kHCIRetransmissionEffortTypeAtLeastOneAndOptimizeForPower = 0x01, + kHCIRetransmissionEffortTypeAtLeastOneAndOptimizeLinkQuality = 0x02, + kHCIRetransmissionEffortTypeDontCare = 0xFF, +}; + + +// Setup Synchronous Packet types (Bluetooth 2.1 spec section 7.7.35 - Setup Synchronous Command Complete Event) + +typedef uint8_t BluetoothAirMode; +enum +{ + kBluetoothAirModeULawLog = 0x00, + kBluetoothAirModeALawLog = 0x01, + kBluetoothAirModeCVSD = 0x02, + kBluetoothAirModeTransparentData = 0x03 +}; + +typedef struct BluetoothSynchronousConnectionInfo BluetoothSynchronousConnectionInfo; +struct BluetoothSynchronousConnectionInfo +{ + BluetoothHCITransmitBandwidth transmitBandWidth; + BluetoothHCIReceiveBandwidth receiveBandWidth; + BluetoothHCIMaxLatency maxLatency; + BluetoothHCIVoiceSetting voiceSetting; + BluetoothHCIRetransmissionEffort retransmissionEffort; + BluetoothPacketType packetType; +}; + +typedef struct BluetoothHCIEventSynchronousConnectionCompleteResults BluetoothHCIEventSynchronousConnectionCompleteResults; +struct BluetoothHCIEventSynchronousConnectionCompleteResults +{ + BluetoothConnectionHandle connectionHandle; + BluetoothDeviceAddress deviceAddress; + BluetoothLinkType linkType; + uint8_t transmissionInterval; + uint8_t retransmissionWindow; + uint16_t receivePacketLength; + uint16_t transmitPacketLength; + BluetoothAirMode airMode; +}; + + +typedef UInt8 BluetoothHCIStatus; +typedef UInt8 BluetoothHCIEventStatus; + +// Events. + +enum +{ + kBluetoothHCIEventInquiryComplete = 0x01, + kBluetoothHCIEventInquiryResult = 0x02, + kBluetoothHCIEventConnectionComplete = 0x03, + kBluetoothHCIEventConnectionRequest = 0x04, + kBluetoothHCIEventDisconnectionComplete = 0x05, + kBluetoothHCIEventAuthenticationComplete = 0x06, + kBluetoothHCIEventRemoteNameRequestComplete = 0x07, + kBluetoothHCIEventEncryptionChange = 0x08, + kBluetoothHCIEventChangeConnectionLinkKeyComplete = 0x09, + kBluetoothHCIEventMasterLinkKeyComplete = 0x0A, + kBluetoothHCIEventReadRemoteSupportedFeaturesComplete = 0x0B, + kBluetoothHCIEventReadRemoteVersionInformationComplete = 0x0C, + kBluetoothHCIEventQoSSetupComplete = 0x0D, + kBluetoothHCIEventCommandComplete = 0x0E, + kBluetoothHCIEventCommandStatus = 0x0F, + kBluetoothHCIEventHardwareError = 0x10, + kBluetoothHCIEventFlushOccurred = 0x11, + kBluetoothHCIEventRoleChange = 0x12, + kBluetoothHCIEventNumberOfCompletedPackets = 0x13, + kBluetoothHCIEventModeChange = 0x14, + kBluetoothHCIEventReturnLinkKeys = 0x15, + kBluetoothHCIEventPINCodeRequest = 0x16, + kBluetoothHCIEventLinkKeyRequest = 0x17, + kBluetoothHCIEventLinkKeyNotification = 0x18, + kBluetoothHCIEventLoopbackCommand = 0x19, + kBluetoothHCIEventDataBufferOverflow = 0x1A, + kBluetoothHCIEventMaxSlotsChange = 0x1B, + kBluetoothHCIEventReadClockOffsetComplete = 0x1C, + kBluetoothHCIEventConnectionPacketType = 0x1D, + kBluetoothHCIEventQoSViolation = 0x1E, + kBluetoothHCIEventPageScanModeChange = 0x1F, + kBluetoothHCIEventPageScanRepetitionModeChange = 0x20, + + // [v1.2] + + kBluetoothHCIEventFlowSpecificationComplete = 0x21, + kBluetoothHCIEventInquiryResultWithRSSI = 0x22, + kBluetoothHCIEventReadRemoteExtendedFeaturesComplete = 0x23, + kBluetoothHCIEventSynchronousConnectionComplete = 0x2C, + kBluetoothHCIEventSynchronousConnectionChanged = 0x2D, + + // [v2.1] + + kBluetoothHCIEventSniffSubstrate = 0x2E, + kBluetoothHCIEventExtendedInquiryResult = 0x2F, + kBluetoothHCIEventIOCapabilityRequest = 0x31, + kBluetoothHCIEventIOCapabilityResponse = 0x32, + kBluetoothHCIEventUserConfirmationRequest = 0x33, + kBluetoothHCIEventUserPasskeyRequest = 0x34, + kBluetoothHCIEventRemoteOOBDataRequest = 0x35, + kBluetoothHCIEventSimplePairingComplete = 0x36, + kBluetoothHCIEventLinkSupervisionTimeoutChanged = 0x38, + kBluetoothHCIEventEnhancedFlushComplete = 0x39, + kBluetoothHCIEventSniffRequest = 0x3A, + kBluetoothHCIEventUserPasskeyNotification = 0x3B, + kBluetoothHCIEventKeypressNotification = 0x3C, + + kBluetoothHCIEventLogoTesting = 0xFE, + kBluetoothHCIEventVendorSpecific = 0xFF +}; + +// HCI Event Masks + +// Event masks are 8 octets according to the spec. v2.1 introduces some event masks that +// actually exceed 32 bits so the 4 byte enum we had before Bluetooth 2.0 will still work for old +// the masks, but the new masks need to be defined as 64 bits. + +typedef uint64_t BluetoothHCIEventMask; + +#define kBluetoothHCIEventMaskDefault64Bit 0x00001FFFFFFFFFFFLL +#define kBluetoothHCIEventMaskAll64Bit 0xFFFFFFFFFFFFFFFFLL + + // [v1.2] + +#define kBluetoothHCIEventMaskFlowSpecificationCompleteEvent 0x0000000100000000LL +#define kBluetoothHCIEventMaskInquiryResultWithRSSIEvent 0x0000000200000000LL +#define kBluetoothHCIEventMaskReadRemoteExtendedFeaturesCompleteEvent 0x0000000400000000LL +#define kBluetoothHCIEventMaskSynchronousConnectionCompleteEvent 0x0000080000000000LL +#define kBluetoothHCIEventMaskSynchronousConnectionChangedEvent 0x0000100000000000LL + + // [v2.1] + +#define kBluetoothHCIEventMaskSniffSubstrateEvent 0x0000200000000000LL +#define kBluetoothHCIEventMaskExtendedInquiryResultEvent 0x0000400000000000LL +#define kBluetoothHCIEventMaskLinkSupervisionTimeoutChangedEvent 0x0080000000000000LL +#define kBluetoothHCIEventMaskEnhancedFlushCompleteEvent 0x0100000000000000LL + + // [v2.1 Secure Simple Pairing] + +#define kBluetoothHCIEventMaskIOCapabilityRequestEvent 0x0001000000000000LL +#define kBluetoothHCIEventMaskIOCapabilityRequestReplyEvent 0x0002000000000000LL +#define kBluetoothHCIEventMaskUserConfirmationRequestEvent 0x0004000000000000LL +#define kBluetoothHCIEventMaskUserPasskeyRequestEvent 0x0008000000000000LL +#define kBluetoothHCIEventMaskRemoteOOBDataRequestEvent 0x0010000000000000LL +#define kBluetoothHCIEventMaskSimplePairingCompleteEvent 0x0020000000000000LL +#define kBluetoothHCIEventMaskUserPasskeyNotificationEvent 0x0400000000000000LL +#define kBluetoothHCIEventMaskKeypressNotificationEvent 0x0800000000000000LL + +enum +{ + kBluetoothHCIEventMaskNone = 0x00000000, + kBluetoothHCIEventMaskInquiryComplete = 0x00000001, + kBluetoothHCIEventMaskInquiryResult = 0x00000002, + kBluetoothHCIEventMaskConnectionComplete = 0x00000004, + kBluetoothHCIEventMaskConnectionRequest = 0x00000008, + kBluetoothHCIEventMaskDisconnectionComplete = 0x00000010, + kBluetoothHCIEventMaskAuthenticationComplete = 0x00000020, + kBluetoothHCIEventMaskRemoteNameRequestComplete = 0x00000040, + kBluetoothHCIEventMaskEncryptionChange = 0x00000080, + kBluetoothHCIEventMaskChangeConnectionLinkKeyComplete = 0x00000100, + kBluetoothHCIEventMaskMasterLinkKeyComplete = 0x00000200, + kBluetoothHCIEventMaskReadRemoteSupportedFeaturesComplete = 0x00000400, + kBluetoothHCIEventMaskReadRemoteVersionInformationComplete = 0x00000800, + kBluetoothHCIEventMaskQoSSetupComplete = 0x00001000, + kBluetoothHCIEventMaskCommandComplete = 0x00002000, + kBluetoothHCIEventMaskCommandStatus = 0x00004000, + kBluetoothHCIEventMaskHardwareError = 0x00008000, + kBluetoothHCIEventMaskFlushOccurred = 0x00010000, + kBluetoothHCIEventMaskRoleChange = 0x00020000, + + kBluetoothHCIEventMaskNumberOfCompletedPackets = 0x00040000, + kBluetoothHCIEventMaskModeChange = 0x00080000, + kBluetoothHCIEventMaskReturnLinkKeys = 0x00100000, + kBluetoothHCIEventMaskPINCodeRequest = 0x00200000, + kBluetoothHCIEventMaskLinkKeyRequest = 0x00400000, + kBluetoothHCIEventMaskLinkKeyNotification = 0x00800000, + kBluetoothHCIEventMaskLoopbackCommand = 0x01000000, + kBluetoothHCIEventMaskDataBufferOverflow = 0x02000000, + kBluetoothHCIEventMaskMaxSlotsChange = 0x04000000, + kBluetoothHCIEventMaskReadClockOffsetComplete = 0x08000000, + kBluetoothHCIEventMaskConnectionPacketTypeChanged = 0x10000000, + kBluetoothHCIEventMaskQoSViolation = 0x20000000, + kBluetoothHCIEventMaskPageScanModeChange = 0x40000000, + kBluetoothHCIEventMaskPageScanRepetitionModeChange = 0x80000000, + + kBluetoothHCIEventMaskAll = 0xFFFFFFFF, + kBluetoothHCIEventMaskDefault = kBluetoothHCIEventMaskAll /* Use kBluetoothHCIEventMaskDefault64Bit above! */ +}; + +// Event results structures. + +typedef struct BluetoothHCIEventConnectionCompleteResults BluetoothHCIEventConnectionCompleteResults; +struct BluetoothHCIEventConnectionCompleteResults +{ + BluetoothConnectionHandle connectionHandle; + BluetoothDeviceAddress deviceAddress; + BluetoothLinkType linkType; + BluetoothHCIEncryptionMode encryptionMode; +}; + +typedef struct BluetoothHCIEventDisconnectionCompleteResults BluetoothHCIEventDisconnectionCompleteResults; +struct BluetoothHCIEventDisconnectionCompleteResults +{ + BluetoothConnectionHandle connectionHandle; + BluetoothReasonCode reason; +}; + +typedef struct BluetoothHCIEventReadSupportedFeaturesResults BluetoothHCIEventReadSupportedFeaturesResults; +struct BluetoothHCIEventReadSupportedFeaturesResults +{ + BluetoothConnectionHandle connectionHandle; + BluetoothHCISupportedFeatures supportedFeatures; +}; + +#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 +typedef struct BluetoothHCIEventReadExtendedFeaturesResults BluetoothHCIEventReadExtendedFeaturesResults; +struct BluetoothHCIEventReadExtendedFeaturesResults +{ + BluetoothConnectionHandle connectionHandle; + BluetoothHCIExtendedFeaturesInfo supportedFeaturesInfo; +}; +#endif /* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 */ + +typedef struct BluetoothHCIEventReadRemoteVersionInfoResults BluetoothHCIEventReadRemoteVersionInfoResults; +struct BluetoothHCIEventReadRemoteVersionInfoResults +{ + BluetoothConnectionHandle connectionHandle; + BluetoothLMPVersion lmpVersion; + BluetoothManufacturerName manufacturerName; + BluetoothLMPSubversion lmpSubversion; +}; + +typedef struct BluetoothHCIEventRemoteNameRequestResults BluetoothHCIEventRemoteNameRequestResults; +struct BluetoothHCIEventRemoteNameRequestResults +{ + BluetoothDeviceAddress deviceAddress; + BluetoothDeviceName deviceName; +}; + +typedef struct BluetoothHCIEventReadClockOffsetResults BluetoothHCIEventReadClockOffsetResults; +struct BluetoothHCIEventReadClockOffsetResults +{ + BluetoothConnectionHandle connectionHandle; + BluetoothClockOffset clockOffset; +}; + +typedef struct BluetoothHCIEventConnectionRequestResults BluetoothHCIEventConnectionRequestResults; +struct BluetoothHCIEventConnectionRequestResults +{ + BluetoothDeviceAddress deviceAddress; + BluetoothClassOfDevice classOfDevice; + BluetoothLinkType linkType; +}; + +typedef struct BluetoothHCIEventLinkKeyNotificationResults BluetoothHCIEventLinkKeyNotificationResults; +struct BluetoothHCIEventLinkKeyNotificationResults +{ + BluetoothDeviceAddress deviceAddress; + BluetoothKey linkKey; + BluetoothKeyType keyType; +}; + +typedef struct BluetoothHCIEventMaxSlotsChangeResults BluetoothHCIEventMaxSlotsChangeResults; +struct BluetoothHCIEventMaxSlotsChangeResults +{ + BluetoothConnectionHandle connectionHandle; + BluetoothMaxSlots maxSlots; +}; + +typedef struct BluetoothHCIEventModeChangeResults BluetoothHCIEventModeChangeResults; +struct BluetoothHCIEventModeChangeResults +{ + BluetoothConnectionHandle connectionHandle; + BluetoothHCIConnectionMode mode; + BluetoothHCIModeInterval modeInterval; +}; + +typedef struct BluetoothHCIEventReturnLinkKeysResults BluetoothHCIEventReturnLinkKeysResults; +struct BluetoothHCIEventReturnLinkKeysResults +{ + UInt8 numLinkKeys; + struct { + BluetoothDeviceAddress deviceAddress; + BluetoothKey linkKey; + } linkKeys[1]; +}; + +typedef struct BluetoothHCIEventAuthenticationCompleteResults BluetoothHCIEventAuthenticationCompleteResults; +struct BluetoothHCIEventAuthenticationCompleteResults +{ + BluetoothConnectionHandle connectionHandle; +}; + +typedef struct BluetoothHCIEventEncryptionChangeResults BluetoothHCIEventEncryptionChangeResults; +struct BluetoothHCIEventEncryptionChangeResults +{ + BluetoothConnectionHandle connectionHandle; + BluetoothEncryptionEnable enable; +}; + +typedef struct BluetoothHCIEventChangeConnectionLinkKeyCompleteResults BluetoothHCIEventChangeConnectionLinkKeyCompleteResults; +struct BluetoothHCIEventChangeConnectionLinkKeyCompleteResults +{ + BluetoothConnectionHandle connectionHandle; +}; + +typedef struct BluetoothHCIEventMasterLinkKeyCompleteResults BluetoothHCIEventMasterLinkKeyCompleteResults; +struct BluetoothHCIEventMasterLinkKeyCompleteResults +{ + BluetoothConnectionHandle connectionHandle; + BluetoothKeyFlag keyFlag; +}; + +typedef struct BluetoothHCIEventQoSSetupCompleteResults BluetoothHCIEventQoSSetupCompleteResults; +struct BluetoothHCIEventQoSSetupCompleteResults +{ + BluetoothConnectionHandle connectionHandle; + BluetoothHCIQualityOfServiceSetupParams setupParams; +}; + +typedef struct BluetoothHCIEventHardwareErrorResults BluetoothHCIEventHardwareErrorResults; +struct BluetoothHCIEventHardwareErrorResults +{ + BluetoothHCIStatus error; +}; + +typedef struct BluetoothHCIEventFlushOccurredResults BluetoothHCIEventFlushOccurredResults; +struct BluetoothHCIEventFlushOccurredResults +{ + BluetoothConnectionHandle connectionHandle; +}; + +typedef struct BluetoothHCIEventRoleChangeResults BluetoothHCIEventRoleChangeResults; +struct BluetoothHCIEventRoleChangeResults +{ + BluetoothConnectionHandle connectionHandle; + BluetoothDeviceAddress deviceAddress; + BluetoothRole role; +}; + +typedef struct BluetoothHCIEventDataBufferOverflowResults BluetoothHCIEventDataBufferOverflowResults; +struct BluetoothHCIEventDataBufferOverflowResults +{ + BluetoothLinkType linkType; +}; + +typedef struct BluetoothHCIEventConnectionPacketTypeResults BluetoothHCIEventConnectionPacketTypeResults; +struct BluetoothHCIEventConnectionPacketTypeResults +{ + BluetoothConnectionHandle connectionHandle; + BluetoothPacketType packetType; +}; + +typedef struct BluetoothHCIEventReadRemoteSupportedFeaturesResults BluetoothHCIEventReadRemoteSupportedFeaturesResults; +struct BluetoothHCIEventReadRemoteSupportedFeaturesResults +{ + BluetoothHCIStatus error; + BluetoothConnectionHandle connectionHandle; + BluetoothHCISupportedFeatures lmpFeatures; +}; + +#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 +typedef struct BluetoothHCIEventReadRemoteExtendedFeaturesResults BluetoothHCIEventReadRemoteExtendedFeaturesResults; +struct BluetoothHCIEventReadRemoteExtendedFeaturesResults +{ + BluetoothHCIStatus error; + BluetoothConnectionHandle connectionHandle; + BluetoothHCIPageNumber page; + BluetoothHCIPageNumber maxPage; + BluetoothHCISupportedFeatures lmpFeatures; +}; +#endif /* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 */ + +typedef struct BluetoothHCIEventQoSViolationResults BluetoothHCIEventQoSViolationResults; +struct BluetoothHCIEventQoSViolationResults +{ + BluetoothConnectionHandle connectionHandle; +}; + +typedef struct BluetoothHCIEventPageScanModeChangeResults BluetoothHCIEventPageScanModeChangeResults; +struct BluetoothHCIEventPageScanModeChangeResults +{ + BluetoothDeviceAddress deviceAddress; + BluetoothPageScanMode pageScanMode; +}; + +typedef struct BluetoothHCIEventPageScanRepetitionModeChangeResults BluetoothHCIEventPageScanRepetitionModeChangeResults; +struct BluetoothHCIEventPageScanRepetitionModeChangeResults +{ + BluetoothDeviceAddress deviceAddress; + BluetoothPageScanRepetitionMode pageScanRepetitionMode; +}; + +typedef struct BluetoothHCIEventVendorSpecificResults BluetoothHCIEventVendorSpecificResults; +struct BluetoothHCIEventVendorSpecificResults +{ + UInt8 length; + UInt8 data[255]; +}; + +#define kNoNotifyProc NULL +#define kNoUserRefCon NULL + +typedef struct BluetoothHCIRequestCallbackInfo BluetoothHCIRequestCallbackInfo; +struct BluetoothHCIRequestCallbackInfo +{ + mach_vm_address_t userCallback; // Proc to call when async handler is called. + mach_vm_address_t userRefCon; // For user's info. + mach_vm_address_t internalRefCon; // For our purposes. + mach_vm_address_t asyncIDRefCon; // For our aync calls. + mach_vm_address_t reserved; // For the future. Currently Unused. +}; + +// Error codes + +enum +{ + kBluetoothHCIErrorSuccess = 0x00, + kBluetoothHCIErrorUnknownHCICommand = 0x01, + kBluetoothHCIErrorNoConnection = 0x02, + kBluetoothHCIErrorHardwareFailure = 0x03, + kBluetoothHCIErrorPageTimeout = 0x04, + kBluetoothHCIErrorAuthenticationFailure = 0x05, + kBluetoothHCIErrorKeyMissing = 0x06, + kBluetoothHCIErrorMemoryFull = 0x07, + kBluetoothHCIErrorConnectionTimeout = 0x08, + kBluetoothHCIErrorMaxNumberOfConnections = 0x09, + kBluetoothHCIErrorMaxNumberOfSCOConnectionsToADevice = 0x0A, + kBluetoothHCIErrorACLConnectionAlreadyExists = 0x0B, + kBluetoothHCIErrorCommandDisallowed = 0x0C, + kBluetoothHCIErrorHostRejectedLimitedResources = 0x0D, + kBluetoothHCIErrorHostRejectedSecurityReasons = 0x0E, + kBluetoothHCIErrorHostRejectedRemoteDeviceIsPersonal = 0x0F, + kBluetoothHCIErrorHostTimeout = 0x10, + kBluetoothHCIErrorUnsupportedFeatureOrParameterValue = 0x11, + kBluetoothHCIErrorInvalidHCICommandParameters = 0x12, + kBluetoothHCIErrorOtherEndTerminatedConnectionUserEnded = 0x13, + kBluetoothHCIErrorOtherEndTerminatedConnectionLowResources = 0x14, + kBluetoothHCIErrorOtherEndTerminatedConnectionAboutToPowerOff = 0x15, + kBluetoothHCIErrorConnectionTerminatedByLocalHost = 0x16, + kBluetoothHCIErrorRepeatedAttempts = 0x17, + kBluetoothHCIErrorPairingNotAllowed = 0x18, + kBluetoothHCIErrorUnknownLMPPDU = 0x19, + kBluetoothHCIErrorUnsupportedRemoteFeature = 0x1A, + kBluetoothHCIErrorSCOOffsetRejected = 0x1B, + kBluetoothHCIErrorSCOIntervalRejected = 0x1C, + kBluetoothHCIErrorSCOAirModeRejected = 0x1D, + kBluetoothHCIErrorInvalidLMPParameters = 0x1E, + kBluetoothHCIErrorUnspecifiedError = 0x1F, + kBluetoothHCIErrorUnsupportedLMPParameterValue = 0x20, + kBluetoothHCIErrorRoleChangeNotAllowed = 0x21, + kBluetoothHCIErrorLMPResponseTimeout = 0x22, + kBluetoothHCIErrorLMPErrorTransactionCollision = 0x23, + kBluetoothHCIErrorLMPPDUNotAllowed = 0x24, + kBluetoothHCIErrorEncryptionModeNotAcceptable = 0x25, // Added Core Spec, v1.1 + kBluetoothHCIErrorUnitKeyUsed = 0x26, // 1.1 + kBluetoothHCIErrorQoSNotSupported = 0x27, // 1.1 + kBluetoothHCIErrorInstantPassed = 0x28, // 1.1 + kBluetoothHCIErrorPairingWithUnitKeyNotSupported = 0x29, // 1.1 + kBluetoothHCIErrorHostRejectedUnacceptableDeviceAddress = 0x0F, // 2.0+ + kBluetoothHCIErrorDifferentTransactionCollision = 0x2A, // 1.2 + kBluetoothHCIErrorQoSUnacceptableParameter = 0x2C, // 1.2 + kBluetoothHCIErrorQoSRejected = 0x2D, // 1.2 + kBluetoothHCIErrorChannelClassificationNotSupported = 0x2E, // 1.2 + kBluetoothHCIErrorInsufficientSecurity = 0x2F, // 1.2 + kBluetoothHCIErrorParameterOutOfMandatoryRange = 0x30, // 1.2 + kBluetoothHCIErrorRoleSwitchPending = 0x31, // 1.2 + kBluetoothHCIErrorReservedSlotViolation = 0x34, // 1.2 + kBluetoothHCIErrorRoleSwitchFailed = 0x35, // 1.2 + kBluetoothHCIErrorExtendedInquiryResponseTooLarge = 0x36, // 2.1 + kBluetoothHCIErrorSecureSimplePairingNotSupportedByHost = 0x37, // 2.1 + + kBluetoothHCIErrorMax = 0x37 +}; + +#if 0 +#pragma mark === HCI Power Mode === +#endif + +//=========================================================================================================================== +// HCI Power Mode +//=========================================================================================================================== + +typedef enum +{ + kBluetoothHCIPowerStateON = 0x01, + kBluetoothHCIPowerStateOFF = 0x00, + kBluetoothHCIPowerStateUnintialized = 0xFF, +} BluetoothHCIPowerState; + +enum +{ + kBluetoothHCIErrorPowerIsOFF = (kBluetoothHCIErrorMax + 1) +}; + +#if 0 +#pragma mark === HCI USB Transport === +#endif + +//=========================================================================================================================== +// HCI USB Transport +//=========================================================================================================================== + +//--------------------------------------------------------------------------------------------------------------------------- +/*! @enum BluetoothHCIUSBDeviceMatchingConstants + @abstract Bluetooth USB device matching constants + @constant kBluetoothHCITransportUSBClassCode Wireless Controller + @constant kBluetoothHCITransportUSBSubClassCode RF Controller + @constant kBluetoothHCITransportUSBProtocolCode Bluetooth Programming +*/ + +enum +{ + kBluetoothHCITransportUSBClassCode = 0xE0, + kBluetoothHCITransportUSBSubClassCode = 0x01, + kBluetoothHCITransportUSBProtocolCode = 0x01 +}; + +#if 0 +#pragma mark === TCI - L2CAP === +#endif + +//=========================================================================================================================== +// TCI - L2CAP +//=========================================================================================================================== + +enum +{ + kBluetoothL2CAPTCIEventIDReserved = 0x00, + kBluetoothL2CAPTCIEventIDL2CA_ConnectInd = 0x01, + kBluetoothL2CAPTCIEventIDL2CA_ConfigInd = 0x02, + kBluetoothL2CAPTCIEventIDL2CA_DisconnectInd = 0x03, + kBluetoothL2CAPTCIEventIDL2CA_QoSViolationInd = 0x04, + kBluetoothL2CAPTCIEventIDL2CA_TimeOutInd = 0x05 +}; + +enum +{ + kBluetoothL2CAPTCICommandReserved = 0x0000, + kBluetoothL2CAPTCICommandL2CA_ConnectReq = 0x0001, + kBluetoothL2CAPTCICommandL2CA_DisconnectReq = 0x0002, + kBluetoothL2CAPTCICommandL2CA_ConfigReq = 0x0003, + kBluetoothL2CAPTCICommandL2CA_DisableCLT = 0x0004, + kBluetoothL2CAPTCICommandL2CA_EnableCLT = 0x0005, + kBluetoothL2CAPTCICommandL2CA_GroupCreate = 0x0006, + kBluetoothL2CAPTCICommandL2CA_GroupClose = 0x0007, + kBluetoothL2CAPTCICommandL2CA_GroupAddMember = 0x0008, + kBluetoothL2CAPTCICommandL2CA_GroupRemoveMember = 0x0009, + kBluetoothL2CAPTCICommandL2CA_GroupMembership = 0x000A, + kBluetoothL2CAPTCICommandL2CA_WriteData = 0x000B, + kBluetoothL2CAPTCICommandL2CA_ReadData = 0x000C, + kBluetoothL2CAPTCICommandL2CA_Ping = 0x000D, + kBluetoothL2CAPTCICommandL2CA_GetInfo = 0x000E, + kBluetoothL2CAPTCICommandL2CA_Reserved1 = 0x000F, + kBluetoothL2CAPTCICommandL2CA_Reserved2 = 0x0010, + kBluetoothL2CAPTCICommandL2CA_ConnectResp = 0x0011, + kBluetoothL2CAPTCICommandL2CA_DisconnectResp = 0x0012, + kBluetoothL2CAPTCICommandL2CA_ConfigResp = 0x0013 +}; + +#if 0 +#pragma mark - +#pragma mark === RFCOMM === +#endif + +//=========================================================================================================================== +// RFCOMM +//=========================================================================================================================== +#define kMaxChannelIDPerSide 31 + +typedef UInt8 BluetoothRFCOMMChannelID; + +#define RFCOMM_CHANNEL_ID_IS_VALID( CHANNEL ) (( CHANNEL >= 1 ) && ( CHANNEL <= 30 )) + +typedef UInt16 BluetoothRFCOMMMTU; + +typedef enum BluetoothRFCOMMParityType +{ + kBluetoothRFCOMMParityTypeNoParity = 0, + kBluetoothRFCOMMParityTypeOddParity, + kBluetoothRFCOMMParityTypeEvenParity, + kBluetoothRFCOMMParityTypeMaxParity +} BluetoothRFCOMMParityType; + +typedef enum BluetoothRFCOMMLineStatus +{ + BluetoothRFCOMMLineStatusNoError = 0, + BluetoothRFCOMMLineStatusOverrunError, + BluetoothRFCOMMLineStatusParityError, + BluetoothRFCOMMLineStatusFramingError +} BluetoothRFCOMMLineStatus; + +#if 0 +#pragma mark - +#pragma mark === SDP === +#endif + +//=========================================================================================================================== +// SDP +//=========================================================================================================================== + +typedef UInt8 BluetoothSDPPDUID; +enum { + kBluetoothSDPPDUIDReserved = 0, + kBluetoothSDPPDUIDErrorResponse = 1, + kBluetoothSDPPDUIDServiceSearchRequest = 2, + kBluetoothSDPPDUIDServiceSearchResponse = 3, + kBluetoothSDPPDUIDServiceAttributeRequest = 4, + kBluetoothSDPPDUIDServiceAttributeResponse = 5, + kBluetoothSDPPDUIDServiceSearchAttributeRequest = 6, + kBluetoothSDPPDUIDServiceSearchAttributeResponse = 7 +}; + +#define IS_REQUEST_PDU( _pduID ) ( ( _pduID == kBluetoothSDPPDUIDServiceSearchRequest ) || \ + ( _pduID == kBluetoothSDPPDUIDServiceAttributeRequest ) || \ + ( _pduID == kBluetoothSDPPDUIDServiceSearchAttributeRequest ) ) + +#define IS_RESPONSE_PDU( _pduID ) ( ( _pduID == kBluetoothSDPPDUIDErrorResponse ) || \ + ( _pduID == kBluetoothSDPPDUIDServiceSearchResponse ) || \ + ( _pduID == kBluetoothSDPPDUIDServiceAttributeResponse ) || \ + ( _pduID == kBluetoothSDPPDUIDServiceSearchAttributeResponse ) ) + +typedef UInt16 BluetoothSDPErrorCode; +enum { + kBluetoothSDPErrorCodeSuccess = 0x0000, + kBluetoothSDPErrorCodeReserved = 0x0000, + kBluetoothSDPErrorCodeInvalidSDPVersion = 0x0001, + kBluetoothSDPErrorCodeInvalidServiceRecordHandle = 0x0002, + kBluetoothSDPErrorCodeInvalidRequestSyntax = 0x0003, + kBluetoothSDPErrorCodeInvalidPDUSize = 0x0004, + kBluetoothSDPErrorCodeInvalidContinuationState = 0x0005, + kBluetoothSDPErrorCodeInsufficientResources = 0x0006, + + kBluetoothSDPErrorCodeReservedStart = 0x0007, + kBluetoothSDPErrorCodeReservedEnd = 0xFFFF +}; + +typedef UInt16 BluetoothSDPTransactionID; + +typedef UInt32 BluetoothSDPServiceRecordHandle; + +enum { + kBluetoothSDPDataElementTypeNil = 0, + kBluetoothSDPDataElementTypeUnsignedInt = 1, + kBluetoothSDPDataElementTypeSignedInt = 2, + kBluetoothSDPDataElementTypeUUID = 3, + kBluetoothSDPDataElementTypeString = 4, + kBluetoothSDPDataElementTypeBoolean = 5, + kBluetoothSDPDataElementTypeDataElementSequence = 6, + kBluetoothSDPDataElementTypeDataElementAlternative = 7, + kBluetoothSDPDataElementTypeURL = 8, + kBluetoothSDPDataElementTypeReservedStart = 9, + kBluetoothSDPDataElementTypeReservedEnd = 31 +}; + +typedef UInt16 BluetoothSDPUUID16; +typedef UInt32 BluetoothSDPUUID32; + +typedef UInt8 BluetoothSDPDataElementTypeDescriptor; +typedef UInt8 BluetoothSDPDataElementSizeDescriptor; + +typedef UInt16 BluetoothSDPServiceAttributeID; + +#ifdef __cplusplus + } +#endif diff --git a/i386/include/IOKit/bluetooth/BluetoothAssignedNumbers.h b/i386/include/IOKit/bluetooth/BluetoothAssignedNumbers.h new file mode 100644 index 0000000..ea5db2e --- /dev/null +++ b/i386/include/IOKit/bluetooth/BluetoothAssignedNumbers.h @@ -0,0 +1,552 @@ +/* + File: BluetoothAssignedNumbers.h + Copyright: (c) 2002-2008 by Apple Computer, Inc. All rights reserved. +*/ + +#pragma once + +#ifdef __cplusplus + extern "C" { +#endif + +#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0 + +#pragma mark - +#pragma mark === General === + +enum BluetoothCompanyIdentifers +{ + kBluetoothCompanyIdentiferEricssonTechnologyLicensing = 0, + kBluetoothCompanyIdentiferNokiaMobilePhones = 1, + kBluetoothCompanyIdentiferIntel = 2, + kBluetoothCompanyIdentiferIBM = 3, + kBluetoothCompanyIdentiferToshiba = 4, + kBluetoothCompanyIdentifer3Com = 5, + kBluetoothCompanyIdentiferMicrosoft = 6, + kBluetoothCompanyIdentiferLucent = 7, + kBluetoothCompanyIdentiferMotorola = 8, + kBluetoothCompanyIdentiferInfineonTechnologiesAG = 9, + kBluetoothCompanyIdentiferCambridgeSiliconRadio = 10, + kBluetoothCompanyIdentiferSiliconWave = 11, + kBluetoothCompanyIdentiferDigianswerAS = 12, + kBluetoothCompanyIdentiferTexasInstruments = 13, + kBluetoothCompanyIdentiferParthusTechnologies = 14, + kBluetoothCompanyIdentiferBroadcom = 15, + kBluetoothCompanyIdentiferMitelSemiconductor = 16, + kBluetoothCompanyIdentiferWidcomm = 17, + kBluetoothCompanyIdentiferZeevo = 18, + kBluetoothCompanyIdentiferAtmel = 19, + kBluetoothCompanyIdentiferMistubishiElectric = 20, + kBluetoothCompanyIdentiferRTXTelecom = 21, + kBluetoothCompanyIdentiferKCTechnology = 22, + kBluetoothCompanyIdentiferNewlogic = 23, + kBluetoothCompanyIdentiferTransilica = 24, + kBluetoothCompanyIdentiferRohdeandSchwarz = 25, + kBluetoothCompanyIdentiferTTPCom = 26, + kBluetoothCompanyIdentiferSigniaTechnologies = 27, + kBluetoothCompanyIdentiferConexantSystems = 28, + kBluetoothCompanyIdentiferQualcomm = 29, + kBluetoothCompanyIdentiferInventel = 30, + kBluetoothCompanyIdentiferAVMBerlin = 31, + kBluetoothCompanyIdentiferBandspeed = 32, + kBluetoothCompanyIdentiferMansella = 33, + kBluetoothCompanyIdentiferNEC = 34, + kBluetoothCompanyIdentiferWavePlusTechnology = 35, + kBluetoothCompanyIdentiferAlcatel = 36, + kBluetoothCompanyIdentiferPhilipsSemiconductor = 37, + kBluetoothCompanyIdentiferCTechnologies = 38, + kBluetoothCompanyIdentiferOpenInterface = 39, + kBluetoothCompanyIdentiferRFCMicroDevices = 40, + kBluetoothCompanyIdentiferHitachi = 41, + kBluetoothCompanyIdentiferSymbolTechnologies = 42, + kBluetoothCompanyIdentiferTenovis = 43, + kBluetoothCompanyIdentiferMacronixInternational = 44, + kBluetoothCompanyIdentiferGCTSemiconductor = 45, + kBluetoothCompanyIdentiferNorwoodSystems = 46, + kBluetoothCompanyIdentiferMewTelTechnology = 47, + kBluetoothCompanyIdentiferSTMicroelectronics = 48, + kBluetoothCompanyIdentiferSynopsys = 49, + kBluetoothCompanyIdentiferRedMCommunications = 50, + kBluetoothCompanyIdentiferCommil = 51, + kBluetoothCompanyIdentiferCATC = 52, + kBluetoothCompanyIdentiferEclipse = 53, + kBluetoothCompanyIdentiferRenesasTechnology = 54, + kBluetoothCompanyIdentiferMobilian = 55, + kBluetoothCompanyIdentiferTerax = 56, + kBluetoothCompanyIdentiferIntegratedSystemSolution = 57, + kBluetoothCompanyIdentiferMatsushitaElectricIndustrial = 58, + kBluetoothCompanyIdentiferGennum = 59, + kBluetoothCompanyIdentiferResearchInMotion = 60, + kBluetoothCompanyIdentiferIPextreme = 61, + kBluetoothCompanyIdentiferSystemsAndChips = 62, + kBluetoothCompanyIdentiferBluetoothSIG = 63, + kBluetoothCompanyIdentiferSeikoEpson = 64, + kBluetoothCompanyIdentiferIntegratedSiliconSolution = 65, + kBluetoothCompanyIdentiferCONWISETechnology = 66, + kBluetoothCompanyIdentiferParrotSA = 67, + kBluetoothCompanyIdentiferSocketCommunications = 68, + kBluetoothCompanyIdentiferAtherosCommunications = 69, + kBluetoothCompanyIdentiferMediaTek = 70, + kBluetoothCompanyIdentiferBluegiga = 71, + kBluetoothCompanyIdentiferMarvellTechnologyGroup = 72, + kBluetoothCompanyIdentifer3DSP = 73, + kBluetoothCompanyIdentiferAccelSemiconductor = 74, + kBluetoothCompanyIdentiferContinentialAutomotiveSystems = 75, + kBluetoothCompanyIdentiferApple = 76, + kBluetoothCompanyIdentiferStaccatoCommunications = 77, + kBluetoothCompanyIdentiferAvagoTechnologies = 78, + kBluetoothCompanyIdentiferAPT = 79, + + kBluetoothCompanyIdentiferInteropIdentifier = 65535 +}; + +#endif /* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0 */ + +#pragma mark - +#pragma mark === Baseband === + +//================================================================================================================== +// Baseband +//================================================================================================================== + +// +// Service Class Major +// + +enum +{ + kBluetoothServiceClassMajorLimitedDiscoverableMode = 0x001, // Bit 13 - Limited Discoverable Mode + kBluetoothServiceClassMajorReserved1 = 0x002, // Bit 14 - Reserved for future use. + kBluetoothServiceClassMajorReserved2 = 0x004, // Bit 15 - Reserved for future use. + kBluetoothServiceClassMajorPositioning = 0x008, // Bit 16 - Positioning (Location ID) + kBluetoothServiceClassMajorNetworking = 0x010, // Bit 17 - LAN, Ad hoc, etc... + kBluetoothServiceClassMajorRendering = 0x020, // Bit 18 - Printing, Speaker, etc... + kBluetoothServiceClassMajorCapturing = 0x040, // Bit 19 - Scanner, Microphone, etc... + kBluetoothServiceClassMajorObjectTransfer = 0x080, // Bit 20 - v-Inbox, v-Folder, etc... + kBluetoothServiceClassMajorAudio = 0x100, // Bit 21 - Speaker, Microphone, Headset, etc... + kBluetoothServiceClassMajorTelephony = 0x200, // Bit 22 - Cordless telephony, Modem, Headset, etc... + kBluetoothServiceClassMajorInformation = 0x400, // Bit 23 - Web server, WAP server, etc... + + kBluetoothServiceClassMajorAny = '****', // Pseudo-class - means anything acceptable. + kBluetoothServiceClassMajorNone = 'none', // Pseudo-class - means no matching. + + kBluetoothServiceClassMajorEnd +}; + +// +// Device Class Major +// + +enum +{ + kBluetoothDeviceClassMajorMiscellaneous = 0x00, // [00000] Miscellaneous + kBluetoothDeviceClassMajorComputer = 0x01, // [00001] Desktop, Notebook, PDA, Organizers, etc... + kBluetoothDeviceClassMajorPhone = 0x02, // [00010] Cellular, Cordless, Payphone, Modem, etc... + kBluetoothDeviceClassMajorLANAccessPoint = 0x03, // [00011] LAN Access Point + kBluetoothDeviceClassMajorAudio = 0x04, // [00100] Headset, Speaker, Stereo, etc... + kBluetoothDeviceClassMajorPeripheral = 0x05, // [00101] Mouse, Joystick, Keyboards, etc... + kBluetoothDeviceClassMajorImaging = 0x06, // [00110] Printing, scanner, camera, display, etc... + kBluetoothDeviceClassMajorUnclassified = 0x1F, // [11111] Specific device code not assigned + + // Range 0x06 to 0x1E Reserved for future use. + + kBluetoothDeviceClassMajorAny = '****', // Pseudo-class - means anything acceptable. + kBluetoothDeviceClassMajorNone = 'none', // Pseudo-class - means no matching. + + kBluetoothDeviceClassMajorEnd +}; + +// +// Device Class Minor +// + +enum +{ + /// + /// Computer Major Class + /// + + kBluetoothDeviceClassMinorComputerUnclassified = 0x00, // [000000] Specific device code not assigned + kBluetoothDeviceClassMinorComputerDesktopWorkstation = 0x01, // [000001] Desktop workstation + kBluetoothDeviceClassMinorComputerServer = 0x02, // [000010] Server-class computer + kBluetoothDeviceClassMinorComputerLaptop = 0x03, // [000011] Laptop + kBluetoothDeviceClassMinorComputerHandheld = 0x04, // [000100] Handheld PC/PDA (clam shell) + kBluetoothDeviceClassMinorComputerPalmSized = 0x05, // [000101] Palm-sized PC/PDA + kBluetoothDeviceClassMinorComputerWearable = 0x06, // [000110] Wearable computer (watch sized) + + // Range 0x06 to 0x7F Reserved for future use. + + + /// + /// Phone Major Class + /// + + kBluetoothDeviceClassMinorPhoneUnclassified = 0x00, // [000000] Specific device code not assigned + kBluetoothDeviceClassMinorPhoneCellular = 0x01, // [000001] Cellular + kBluetoothDeviceClassMinorPhoneCordless = 0x02, // [000010] Cordless + kBluetoothDeviceClassMinorPhoneSmartPhone = 0x03, // [000011] Smart phone + kBluetoothDeviceClassMinorPhoneWiredModemOrVoiceGateway = 0x04, // [000100] Wired modem or voice gateway + kBluetoothDeviceClassMinorPhoneCommonISDNAccess = 0x05, // [000101] Common ISDN Access + + // Range 0x05 to 0x7F Reserved for future use. + + + /// + /// LAN Access Point Major Class + /// + + // $$$ TO DO: LAN Access Point minor classes are broken into bits 5-7 for utilization and bits 2-4 for class. + + + /// + /// Audio Major Class + /// + + kBluetoothDeviceClassMinorAudioUnclassified = 0x00, // [000000] Specific device code not assigned + kBluetoothDeviceClassMinorAudioHeadset = 0x01, // [000001] Device conforms to the Headset profile + kBluetoothDeviceClassMinorAudioHandsFree = 0x02, // [000010] Hands-free + kBluetoothDeviceClassMinorAudioReserved1 = 0x03, // [000011] Reserved + kBluetoothDeviceClassMinorAudioMicrophone = 0x04, // [000100] Microphone + kBluetoothDeviceClassMinorAudioLoudspeaker = 0x05, // [000101] Loudspeaker + kBluetoothDeviceClassMinorAudioHeadphones = 0x06, // [000110] Headphones + kBluetoothDeviceClassMinorAudioPortable = 0x07, // [000111] Portable Audio + kBluetoothDeviceClassMinorAudioCar = 0x08, // [001000] Car Audio + kBluetoothDeviceClassMinorAudioSetTopBox = 0x09, // [001001] Set-top box + kBluetoothDeviceClassMinorAudioHiFi = 0x0a, // [001010] HiFi Audio Device + kBluetoothDeviceClassMinorAudioVCR = 0x0b, // [001011] VCR + kBluetoothDeviceClassMinorAudioVideoCamera = 0x0c, // [001100] Video Camera + kBluetoothDeviceClassMinorAudioCamcorder = 0x0d, // [001101] Camcorder + kBluetoothDeviceClassMinorAudioVideoMonitor = 0x0e, // [001110] Video Monitor + kBluetoothDeviceClassMinorAudioVideoDisplayAndLoudspeaker = 0x0f, // [001111] Video Display and Loudspeaker + kBluetoothDeviceClassMinorAudioVideoConferencing = 0x10, // [010000] Video Conferencing + kBluetoothDeviceClassMinorAudioReserved2 = 0x11, // [010001] Reserved + kBluetoothDeviceClassMinorAudioGamingToy = 0x12, // [010010] Gaming/Toy + + + // Range 0x13 to 0x7F Reserved for future use. + + + /// + /// Peripheral Major Class + /// + + // Peripheral1 subclass is bits 7 & 6 + + kBluetoothDeviceClassMinorPeripheral1Keyboard = 0x10, // [01XXXX] Keyboard + kBluetoothDeviceClassMinorPeripheral1Pointing = 0x20, // [10XXXX] Pointing device + kBluetoothDeviceClassMinorPeripheral1Combo = 0x30, // [11XXXX] Combo keyboard/pointing device + + // Peripheral2 subclass is bits 5-2 + + kBluetoothDeviceClassMinorPeripheral2Unclassified = 0x00, // [XX0000] Uncategorized device + kBluetoothDeviceClassMinorPeripheral2Joystick = 0x01, // [XX0001] Joystick + kBluetoothDeviceClassMinorPeripheral2Gamepad = 0x02, // [XX0010] Gamepad + kBluetoothDeviceClassMinorPeripheral2RemoteControl = 0x03, // [XX0011] Remote control + kBluetoothDeviceClassMinorPeripheral2SensingDevice = 0x04, // [XX0100] Sensing device + kBluetoothDeviceClassMinorPeripheral2DigitizerTablet = 0x05, // [XX0101] Digitizer Tablet + kBluetoothDeviceClassMinorPeripheral2CardReader = 0x06, // [XX0110] Card Reader + + kBluetoothDeviceClassMinorPeripheral2AnyPointing = 'poin', // Anything under MinorPeripheral1Pointing + + // Range 0x05 to 0x0f reserved for future use + + + /// + /// Imaging Major Class + /// + + // Imaging1 subclass is bits 7 - 4 + + kBluetoothDeviceClassMinorImaging1Display = 0x04, // [XXX1XX] Display + kBluetoothDeviceClassMinorImaging1Camera = 0x08, // [XX1XXX] Camera + kBluetoothDeviceClassMinorImaging1Scanner = 0x10, // [X1XXXX] Scanner + kBluetoothDeviceClassMinorImaging1Printer = 0x20, // [1XXXXX] Printer + + // Imaging2 subclass is bits 3 - 2 + + kBluetoothDeviceClassMinorImaging2Unclassified = 0x00, // [XXXX00] Uncategorized, default + + // Range 0x01 - 0x03 reserved for future use + + + /// + /// Misc + /// + + kBluetoothDeviceClassMinorAny = '****', // Pseudo-class - means anything acceptable. + kBluetoothDeviceClassMinorNone = 'none', // Pseudo-class - means no matching. + + kBluetoothDeviceClassMinorEnd +}; + + +// Peripheral devices bits 7 & 6 +#define BluetoothCoDMinorPeripheral1(minorClass) (minorClass & 0x30) + +// Peripheral devices bits 5 - 2 +#define BluetoothCoDMinorPeripheral2(minorClass) (minorClass & 0x0f) + +#pragma mark - +#pragma mark === L2CAP === + +//=========================================================================================================================== +// L2CAP +//=========================================================================================================================== + +enum +{ + kBluetoothL2CAPPSMSDP = 0x0001, + kBluetoothL2CAPPSMRFCOMM = 0x0003, + kBluetoothL2CAPPSMTCS_BIN = 0x0005, // Telephony Control Specifictation / TCS Binary + kBluetoothL2CAPPSMTCS_BIN_Cordless = 0x0007, // Telephony Control Specifictation / TCS Binary + kBluetoothL2CAPPSMBNEP = 0x000F, // Bluetooth Network Encapsulation Protocol + kBluetoothL2CAPPSMHIDControl = 0x0011, // HID profile - control interface + kBluetoothL2CAPPSMHIDInterrupt = 0x0013, // HID profile - interrupt interface + kBluetoothL2CAPPSMAVCTP = 0x0017, // Audio/Video Control Transport Protocol + kBluetoothL2CAPPSMAVDTP = 0x0019, // Audio/Video Distribution Transport Protocol + kBluetoothL2CAPPSMUID_C_Plane = 0x001D, // Unrestricted Digital Information Profile (UDI) + + // Range < 0x1000 reserved. + kBluetoothL2CAPPSMReservedStart = 0x0001, + kBluetoothL2CAPPSMReservedEnd = 0x1000, + + // Range 0x1001-0xFFFF dynamically assigned. + kBluetoothL2CAPPSMDynamicStart = 0x1001, + kBluetoothL2CAPPSMD2D = 0x100F, + kBluetoothL2CAPPSMDynamicEnd = 0xFFFF, + + kBluetoothL2CAPPSMNone = 0x0000 +}; + + +#pragma mark - +#pragma mark === SDP === + +//=========================================================================================================================== +// Service Discovery Protocol +//=========================================================================================================================== + +enum +{ + // General + + kBluetoothSDPUUID16Base = 0x0000, // 00000000-0000-1000-8000-00805f9b34fb + + // Protocols + + kBluetoothSDPUUID16SDP = 0x0001, // 00000001-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16UDP = 0x0002, // 00000002-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16RFCOMM = 0x0003, // 00000003-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16TCP = 0x0004, // 00000004-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16TCSBIN = 0x0005, // 00000005-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16TCSAT = 0x0006, // 00000006-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16OBEX = 0x0008, // 00000008-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16IP = 0x0009, // 00000009-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16FTP = 0x000A, // 0000000A-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16HTTP = 0x000C, // 0000000C-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16WSP = 0x000E, // 0000000E-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16BNEP = 0x000F, + kBluetoothSDPUUID16UPNP = 0x0010, + kBluetoothSDPUUID16HIDP = 0x0011, + kBluetoothSDPUUID16HardcopyControlChannel = 0x0012, + kBluetoothSDPUUID16HardcopyDataChannel = 0x0014, + kBluetoothSDPUUID16HardcopyNotification = 0x0016, + kBluetoothSDPUUID16AVCTP = 0x0017, + kBluetoothSDPUUID16AVDTP = 0x0019, + kBluetoothSDPUUID16CMPT = 0x001B, + kBluetoothSDPUUID16UDI_C_Plane = 0x001D, + kBluetoothSDPUUID16L2CAP = 0x0100, // 00000100-0000-1000-8000-00805f9b34fb +}; + +enum SDPServiceClasses +{ + kBluetoothSDPUUID16ServiceClassServiceDiscoveryServer = 0x1000, // 00001000-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassBrowseGroupDescriptor = 0x1001, // 00001001-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassPublicBrowseGroup = 0x1002, // 00001002-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassSerialPort = 0x1101, // 00001101-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassLANAccessUsingPPP = 0x1102, // 00001102-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassDialupNetworking = 0x1103, // 00001103-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassIrMCSync = 0x1104, // 00001104-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassOBEXObjectPush = 0x1105, // 00001105-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassOBEXFileTransfer = 0x1106, // 00001106-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassIrMCSyncCommand = 0x1107, // 00001107-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassHeadset = 0x1108, // 00001108-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassCordlessTelephony = 0x1109, // 00001109-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassAudioSource = 0x110A, + kBluetoothSDPUUID16ServiceClassAudioSink = 0x110B, + kBluetoothSDPUUID16ServiceClassAVRemoteControlTarget = 0x110C, + kBluetoothSDPUUID16ServiceClassAdvancedAudioDistribution = 0x110D, + kBluetoothSDPUUID16ServiceClassAVRemoteControl = 0x110E, + kBluetoothSDPUUID16ServiceClassVideoConferencing = 0x110F, + kBluetoothSDPUUID16ServiceClassIntercom = 0x1110, // 00001110-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassFax = 0x1111, // 00001111-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassHeadsetAudioGateway = 0x1112, // 00001112-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassWAP = 0x1113, + kBluetoothSDPUUID16ServiceClassWAPClient = 0x1114, + kBluetoothSDPUUID16ServiceClassPANU = 0x1115, + kBluetoothSDPUUID16ServiceClassNAP = 0x1116, + kBluetoothSDPUUID16ServiceClassGN = 0x1117, + kBluetoothSDPUUID16ServiceClassDirectPrinting = 0x1118, + kBluetoothSDPUUID16ServiceClassReferencePrinting = 0x1119, + kBluetoothSDPUUID16ServiceClassImaging = 0x111A, + kBluetoothSDPUUID16ServiceClassImagingResponder = 0x111B, + kBluetoothSDPUUID16ServiceClassImagingAutomaticArchive = 0x111C, + kBluetoothSDPUUID16ServiceClassImagingReferencedObjects = 0x111D, + kBluetoothSDPUUID16ServiceClassHandsFree = 0x111E, + kBluetoothSDPUUID16ServiceClassHandsFreeAudioGateway = 0x111F, + kBluetoothSDPUUID16ServiceClassDirectPrintingReferenceObjectsService = 0x1120, + kBluetoothSDPUUID16ServiceClassReflectedUI = 0x1121, + kBluetoothSDPUUID16ServiceClassBasicPrinting = 0x1122, + kBluetoothSDPUUID16ServiceClassPrintingStatus = 0x1123, + kBluetoothSDPUUID16ServiceClassHumanInterfaceDeviceService = 0x1124, + kBluetoothSDPUUID16ServiceClassHardcopyCableReplacement = 0x1125, + kBluetoothSDPUUID16ServiceClassHCR_Print = 0x1126, + kBluetoothSDPUUID16ServiceClassHCR_Scan = 0x1127, + kBluetoothSDPUUID16ServiceClassCommonISDNAccess = 0x1128, + kBluetoothSDPUUID16ServiceClassVideoConferencingGW = 0x1129, + kBluetoothSDPUUID16ServiceClassUDI_MT = 0x112A, + kBluetoothSDPUUID16ServiceClassUDI_TA = 0x112B, + kBluetoothSDPUUID16ServiceClassAudioVideo = 0x112C, + kBluetoothSDPUUID16ServiceClassSIM_Access = 0x112D, + kBluetoothSDPUUID16ServiceClassPhonebookAccess_PCE = 0x112E, + kBluetoothSDPUUID16ServiceClassPhonebookAccess_PSE = 0x112F, + kBluetoothSDPUUID16ServiceClassPhonebookAccess = 0x1130, + kBluetoothSDPUUID16ServiceClassHeadset_HS = 0x1131, + kBluetoothSDPUUID16ServiceClassMessageAccessServer = 0x1132, + kBluetoothSDPUUID16ServiceClassMessageNotificationServer = 0x1133, + kBluetoothSDPUUID16ServiceClassMessageAccessProfile = 0x1134, + kBluetoothSDPUUID16ServiceClassPnPInformation = 0x1200, // 00001200-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassGenericNetworking = 0x1201, // 00001201-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassGenericFileTransfer = 0x1202, // 00001202-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassGenericAudio = 0x1203, // 00001203-0000-1000-8000-00805f9b34fb + kBluetoothSDPUUID16ServiceClassGenericTelephony = 0x1204 // 00001204-0000-1000-8000-00805f9b34fb +}; + +enum SDPAttributeIdentifierCodes +{ + kBluetoothSDPAttributeIdentifierServiceRecordHandle = 0x0000, + kBluetoothSDPAttributeIdentifierServiceClassIDList = 0x0001, + kBluetoothSDPAttributeIdentifierServiceRecordState = 0x0002, + kBluetoothSDPAttributeIdentifierServiceID = 0x0003, + kBluetoothSDPAttributeIdentifierProtocolDescriptorList = 0x0004, + kBluetoothSDPAttributeIdentifierBrowseGroupList = 0x0005, + kBluetoothSDPAttributeIdentifierLanguageBaseAttributeIDList = 0x0006, + kBluetoothSDPAttributeIdentifierServiceInfoTimeToLive = 0x0007, + kBluetoothSDPAttributeIdentifierServiceAvailability = 0x0008, + kBluetoothSDPAttributeIdentifierBluetoothProfileDescriptorList = 0x0009, + kBluetoothSDPAttributeIdentifierDocumentationURL = 0x000A, + kBluetoothSDPAttributeIdentifierClientExecutableURL = 0x000B, + kBluetoothSDPAttributeIdentifierIconURL = 0x000C, + kBluetoothSDPAttributeIdentifierAdditionalProtocolsDescriptorList = 0x000D, + + // Service Discovery Server + kBluetoothSDPAttributeIdentifierVersionNumberList = 0x0200, + kBluetoothSDPAttributeIdentifierServiceDatabaseState = 0x0201, + + // Browse Group Descriptor + kBluetoothSDPAttributeIdentifierGroupID = 0x0200, + + // PAN + kBluetoothSDPAttributeIdentifierIPSubnet = 0x0200, + +#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 + + // HID Required Type Section Notes + kBluetoothSDPAttributeIdentifierHIDReleaseNumber = 0x0200, // O uint16 7.11.1 + kBluetoothSDPAttributeIdentifierHIDParserVersion = 0x0201, // M uint16 - + kBluetoothSDPAttributeIdentifierHIDDeviceSubclass = 0x0202, // M uint8 7.11.2 Should match the low order 8 bits of CoD unless a combo device + kBluetoothSDPAttributeIdentifierHIDCountryCode = 0x0203, // M uint8 7.11.3 + kBluetoothSDPAttributeIdentifierHIDVirtualCable = 0x0204, // M bool 7.11.4 + kBluetoothSDPAttributeIdentifierHIDReconnectInitiate = 0x0205, // M bool 7.11.5 + kBluetoothSDPAttributeIdentifierHIDDescriptorList = 0x0206, // M sequence 7.11.6 Layout is defined in Section 6.2 of the HID Specification + kBluetoothSDPAttributeIdentifierHIDLangIDBaseList = 0x0207, // M sequence 7.11.7 + kBluetoothSDPAttributeIdentifierHIDSDPDisable = 0x0208, // O bool 7.11.8 + kBluetoothSDPAttributeIdentifierHIDBatteryPower = 0x0209, // O bool 7.11.9 + kBluetoothSDPAttributeIdentifierHIDRemoteWake = 0x020A, // O bool 7.11.10 + kBluetoothSDPAttributeIdentifierHIDProfileVersion = 0x020B, // M uint16 7.11.14 + kBluetoothSDPAttributeIdentifierHIDSupervisionTimeout = 0x020C, // O uint16 7.11.12 Default to 5 seconds or longer if not defined + kBluetoothSDPAttributeIdentifierHIDNormallyConnectable = 0x020D, // O bool 7.11.13 + kBluetoothSDPAttributeIdentifierHIDBootDevice = 0x020E, // M bool 7.11.11 Only defined for mice and keyboards as of HID 1.0 + +#endif + + kBluetoothSDPAttributeIdentifierServiceVersion = 0x0300, + kBluetoothSDPAttributeIdentifierExternalNetwork = 0x0301, // Cordless telephony + kBluetoothSDPAttributeIdentifierNetwork = 0x0301, // Handsfree Profile (HFP) + kBluetoothSDPAttributeIdentifierSupportedDataStoresList = 0x0301, // Sync Profile + kBluetoothSDPAttributeIdentifierFaxClass1Support = 0x0302, // Fax Profile + kBluetoothSDPAttributeIdentifierRemoteAudioVolumeControl = 0x0302, // GAP??? + kBluetoothSDPAttributeIdentifierFaxClass2_0Support = 0x0303, + kBluetoothSDPAttributeIdentifierSupporterFormatsList = 0x0303, + kBluetoothSDPAttributeIdentifierFaxClass2Support = 0x0304, + kBluetoothSDPAttributeIdentifierAudioFeedbackSupport = 0x0305, + kBluetoothSDPAttributeIdentifierNetworkAddress = 0x0306, // WAP + kBluetoothSDPAttributeIdentifierWAPGateway = 0x0307, // WAP + kBluetoothSDPAttributeIdentifierHomepageURL = 0x0308, // WAP + kBluetoothSDPAttributeIdentifierWAPStackType = 0x0309, // WAP + kBluetoothSDPAttributeIdentifierSecurityDescription = 0x030A, // PAN + kBluetoothSDPAttributeIdentifierNetAccessType = 0x030B, // PAN + kBluetoothSDPAttributeIdentifierMaxNetAccessRate = 0x030C, // PAN + kBluetoothSDPAttributeIdentifierSupportedCapabilities = 0x0310, // Imaging + kBluetoothSDPAttributeIdentifierSupportedFeatures = 0x0311, // Imaging & HFP + kBluetoothSDPAttributeIdentifierSupportedFunctions = 0x0312, // Imaging + kBluetoothSDPAttributeIdentifierTotalImagingDataCapacity = 0x0313, // Imaging + + kBluetoothSDPAttributeIdentifierServiceName = 0x0000, /* +language base offset*/ + kBluetoothSDPAttributeIdentifierServiceDescription = 0x0001, /* +language base offset*/ + kBluetoothSDPAttributeIdentifierProviderName = 0x0002 /* +language base offset*/ +}; + +enum SDPAttributeDeviceIdentificationRecord +{ + /* Values taken from the Bluetooth Device Identification specification, 1.0 draft, 1.16.2003 */ + + kBluetoothSDPAttributeDeviceIdentifierServiceDescription = 0x0001, /* String */ + kBluetoothSDPAttributeDeviceIdentifierDocumentationURL = 0x000A, /* URL */ + kBluetoothSDPAttributeDeviceIdentifierClientExecutableURL = 0x000B, /* URL */ + kBluetoothSDPAttributeDeviceIdentifierSpecificationID = 0x0200, /* 2 byte unsigned integer */ + kBluetoothSDPAttributeDeviceIdentifierVendorID = 0x0201, /* 2 byte unsigned integer */ + kBluetoothSDPAttributeDeviceIdentifierProductID = 0x0202, /* 2 byte unsigned integer */ + kBluetoothSDPAttributeDeviceIdentifierVersion = 0x0203, /* 2 byte unsigned integer */ + kBluetoothSDPAttributeDeviceIdentifierPrimaryRecord = 0x0204, /* Boolean */ + kBluetoothSDPAttributeDeviceIdentifierVendorIDSource = 0x0205, /* 2 byte unsigned integer */ + kBluetoothSDPAttributeDeviceIdentifierReservedRangeStart = 0x0206, + kBluetoothSDPAttributeDeviceIdentifierReservedRangeEnd = 0x02FF + +}; + +enum ProtocolParameters +{ + kBluetoothSDPProtocolParameterL2CAPPSM = 1, + kBluetoothSDPProtocolParameterRFCOMMChannel = 1, + kBluetoothSDPProtocolParameterTCPPort = 1, + kBluetoothSDPProtocolParameterUDPPort = 1, + kBluetoothSDPProtocolParameterBNEPVersion = 1, + kBluetoothSDPProtocolParameterBNEPSupportedNetworkPacketTypeList = 2 +}; + +#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0 + +//Inquiries with 'Extended Inquiry Response' (v2.1 specification) + +enum BluetoothHCIExtendedInquiryResponseDataTypes +{ + kBluetoothHCIExtendedInquiryResponseDataTypeFlags = 0x01, + kBluetoothHCIExtendedInquiryResponseDataType16BitServiceClassUUIDsWithMoreAvailable = 0x02, + kBluetoothHCIExtendedInquiryResponseDataType16BitServiceClassUUIDsCompleteList = 0x03, + kBluetoothHCIExtendedInquiryResponseDataType32BitServiceClassUUIDsWithMoreAvailable = 0x04, + kBluetoothHCIExtendedInquiryResponseDataType32BitServiceClassUUIDsCompleteList = 0x05, + kBluetoothHCIExtendedInquiryResponseDataType128BitServiceClassUUIDsWithMoreAvailable = 0x06, + kBluetoothHCIExtendedInquiryResponseDataType128BitServiceClassUUIDsCompleteList = 0x07, + kBluetoothHCIExtendedInquiryResponseDataTypeShortenedLocalName = 0x08, + kBluetoothHCIExtendedInquiryResponseDataTypeCompleteLocalName = 0x09, + kBluetoothHCIExtendedInquiryResponseDataTypeDeviceID = 0x10, + kBluetoothHCIExtendedInquiryResponseDataTypeManufacturerSpecificData = 0xFF +}; + +#endif /* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0 */ + + +#ifdef __cplusplus + } +#endif diff --git a/i386/include/IOKit/bluetooth/IOBluetoothHCIController.h b/i386/include/IOKit/bluetooth/IOBluetoothHCIController.h new file mode 100644 index 0000000..303795e --- /dev/null +++ b/i386/include/IOKit/bluetooth/IOBluetoothHCIController.h @@ -0,0 +1,1370 @@ +/* + File: IOBluetoothHCIController.h + Contains: Bluetooth Host Controller base class. + Copyright: (c) 2001-2008 by Apple, all rights reserved. +*/ + + +#pragma once + +//==================================================================================================== +// Imports +//==================================================================================================== + +#import +#import +#import +#import + +#import + +#include + +#import + +#import +#import + +//==================================================================================================== +// Forward declarations +//==================================================================================================== + +class OSSet; +class IOWorkLoop; +class IOCommandGate; +class IOWorkQueue; +class IOBluetoothDevice; +class IOBluetoothHCIRequest; +class IOBluetoothHCIController; +class IOBluetoothACLMemoryDescriptor; +class IOTimerEventSource; +class IOBluetoothInactivityTimerEventSource; +class IOBluetoothHCIPacketLogUserClient; + +//==================================================================================================== +// defines, typdefs, etc. +//==================================================================================================== + +#define kNoReturnParam NULL + +typedef uint16_t DevicePublishNotificationStateType; +enum DevicePublishNotificationStateTypes +{ + kHasNotRegisteredForDevicePublishNotification = 0x0001, + kHasRegisteredForDevicePublishNotification = 0x0002, + kDevicePublishNotificationCalled = 0x0004, + kDevicePublishNotificationProcessed = 0x0008 +}; + +typedef UInt32 HCIDataHandlerType; +enum HCIDataHandlerTypes +{ + kTransportDataTypeHCIEvents, + kTransportDataTypeACL, + kTransportDataTypeSCO +}; + +typedef IOReturn (*IOBluetoothIncomingDataAction) ( IOBluetoothHCIController *hciController, UInt8 *inDataPtr, UInt32 inDataSize, UInt32 inSequenceNumber ); +typedef IOReturn (*IOBluetoothHCIControllerDataHandler) ( void * contextPtr, const UInt8 * data, UInt32 dataSize ); + +typedef struct HCIDataHandler HCIDataHandler; +struct HCIDataHandler +{ + IOBluetoothHCIControllerDataHandler procPtr; + void * contextPtr; +}; + +typedef struct HCIEventNotificationListener HCIEventNotificationListener; +struct HCIEventNotificationListener +{ + task_t owningTask; // Used to ID these things when adding/removing them from our listener pool. + mach_port_t port; // Mach port to send out the notificaton. + void * refCon; // RefCon for the port's use. +}; + +#define POWER_STATE_CHANGE_IN_PROGRESS() ( mCurrentInternalPowerState != mPendingInternalPowerState ) +#define IS_POWERING_DOWN() ( POWER_STATE_CHANGE_IN_PROGRESS() && ( mPendingInternalPowerState == kIOBluetoothHCIControllerInternalPowerStateOff ) ) + +//==================================================================================================== +// Callback structure for data: +//==================================================================================================== + +typedef struct SendDataContext +{ + // Data sent: + IOMemoryDescriptor *memoryDescriptorPointer; + + // Referece to the device that sent the data: + IOBluetoothDevice *devicePointer; + void *devicePointerContextInfo0; + void *devicePointerContextInfo1; + + // And the controller that received it: + IOBluetoothHCIController *hciController; + void *controllerPointerContextInfo0; + void *controllerPointerContextInfo1; + + // ReturnValue: + IOReturn sendingWasSuccessful; +} SendDataContext; + + +//==================================================================================================== +// Keep track of hearing devices +//==================================================================================================== +typedef struct HearingDeviceListType +{ + BluetoothDeviceAddress mDeviceAddress; + bool mRemoveDeviceCalled; + DevicePublishNotificationStateType mDevicePublishNotificationState; + HearingDeviceListType * mNextDevice; + HearingDeviceListType * mPreviousDevice; +} HearingDeviceListType; + +//==================================================================================================== +// IOBluetoothHCIController +//==================================================================================================== + +class IOBluetoothHCIController : public IOService +{ + // We don't make many friends, but at least we have a few... + + friend class IOBluetoothHCIPacketLogUserClient; + friend class IOBluetoothSerialManager; + friend class IOBluetoothHCIUserClient; + friend class IOBluetoothDevice; + friend class IOBluetoothHCIRequest; + + // IOKit stuff. + + OSDeclareDefaultStructors( IOBluetoothHCIController ) + +protected: + + IOWorkLoop * mWorkLoop; + IOCommandGate * mCommandGate; + IOWorkQueue * mWorkQueue; + IOTimerEventSource * mTimerEventSource; + Boolean mShouldRunInactivityTimer; + + // Data and request queue stuff. + + HCIEventNotificationListener* mHCIEventListenersList; + size_t mHCIEventListenersListSize; + HCIDataHandler* mHCIEventDataHandlerList; + size_t mHCIEventDataHandlerListSize; + HCIDataHandler* mACLDataHandlerList; + size_t mACLDataHandlerListSize; + HCIDataHandler* mSCODataHandlerList; + size_t mSCODataHandlerListSize; + + IOBluetoothHCIRequest * mBusyQueueHead; + IOBluetoothHCIRequest * mWaitQueueHead; + IOBluetoothHCIRequest ** mHCIRequestList; + + IOBluetoothDevice * mDeviceListHead; + + OSSet * mPacketLogClients; + UInt8 * mPacketLogBuffer; + UInt32 mPacketLogBufferSize; + + uint8_t * mEventDataBuffer; // Events without matching requests will use this. + size_t mEventDataBufferSize; + + // This keeps track of the ACL packets we actually sent: + BluetoothHCIBufferSize mHCIBufferSize; + UInt16 mNumOutstandingACLPackets; + + OSArray * mAllowedIncomingL2CAPChannels; + + UInt32 mNextAvailableSequenceNumber; + UInt32 mCurrentlyExecutingSequenceNumber; + UInt16 mActiveConnections; + + // Packet Queue description: + typedef struct QueuePacketHolder { + IOMemoryDescriptor *memDescriptor; // The data we need to send + SendDataContext * contextPtr; // Context pointer for the sent data. + IOBluetoothDevice * inTargetDevice; // The device that enqueued the data. + struct QueuePacketHolder *next; // The next block in the queue. + } QueuePacketHolder; + QueuePacketHolder *mACLQueueHead, *mACLQueueTail; + + // Counters to limit the number of packets in the queue (we do not want to go out of memory) + UInt32 mNumberOfPacketsInQueue; + + // The allowed RFCOMM channels + OSArray *mAllowedIncomingRFCOMMChannels; + + IOBluetoothHCIControllerInternalPowerState mCurrentInternalPowerState; + IOBluetoothHCIControllerInternalPowerState mPendingInternalPowerState; + Boolean mAsyncPowerStateChangeInProgress; + UInt32 mPendingPowerStateChangeOptions; + IOBluetoothHCIControllerPowerOptions mControllerPowerOptions; + Boolean mPowerStateChangeIsUserEnforced; + + Boolean mHardwareSetupComplete; + + IOBluetoothHCIControllerConfigState mControllerConfigState; + IOBluetoothHCIControllerConfigState mPreviousControllerConfigState; + + IOBluetoothHCIControllerFeatureFlags mControllerFeatureFlags; + + // Overrides. + + bool start( IOService * provider ); + + bool init( OSDictionary* dictionary ); + + virtual void free(); + +#if defined( MAC_OS_X_VERSION_10_5 ) + virtual void systemWillShutdown( IOOptionBits specifier ); +#endif + + static IOReturn initHardwareAction( OSObject *owner, + void *arg1, + void *arg2, + void *arg3, + void *arg4 ); + + virtual bool initHardware( IOService * provider ); + + static IOReturn setupHardwareAction( OSObject *owner, + void *arg1, + void *arg2, + void *arg3, + void *arg4 ); + + virtual IOReturn setupHardware( IOService* provider ); + + virtual void hardwareSetupComplete( IOReturn status ); + + virtual void setConfigState( IOBluetoothHCIControllerConfigState configState ); + virtual bool terminate( IOOptionBits options = 0 ); + virtual bool willTerminate( IOService * provider, IOOptionBits options ); + virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer ); + + void stop( IOService * provider ); + + IOReturn newUserClient( task_t owningTask, + void * securityID, + UInt32 type, + IOUserClient ** handler ); + + uint32_t CountExistingHCIControllers(); + + virtual IOReturn powerStateWillChangeTo( IOPMPowerFlags powerFlags, + unsigned long powerState, + IOService * from ); + + virtual unsigned long maxCapabilityForDomainState( IOPMPowerFlags domainState ); + + virtual unsigned long initialPowerStateForDomainState ( IOPMPowerFlags powerFlags ); + + // Our protected custom stuff. + + static IOReturn DetachUserClientsAction( OSObject *owner, + void *arg1, + void *arg2, + void *arg3, + void *arg4 ); + + virtual void DetachUserClients(); + + static IOReturn setPropertiesAction( OSObject *owner, + void *arg1, + void *arg2, + void *arg3, + void *arg4 ); + + virtual IOReturn setPropertiesWL( OSObject * properties ); + + static IOReturn AddPacketLogUserClientAction( OSObject *owner, + void *arg1, + void *arg2, + void *arg3, + void *arg4 ); + + virtual IOReturn AddPacketLogUserClient( IOBluetoothHCIPacketLogUserClient *newPacketLogUserClient ); + + virtual bool PacketLogFillBufferedData(); + + virtual void PacketLogClientClosed( IOBluetoothHCIPacketLogUserClient *packetLogClient ); + + virtual void LogPacket( UInt8 packetType, void *packetData, size_t packetSize ); + + static IOReturn LogPacketAction( OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4 ); + + virtual void DesyncIncomingData( IOBluetoothIncomingDataAction action, UInt8 *inDataPtr, UInt32 inDataSize ); + + static void DesyncIncomingDataAction( IOBluetoothHCIController *hciController, IOBluetoothIncomingDataAction action, void *inDataPtr, UInt32 inDataSize, UInt32 sequenceNumber ); + + virtual void SynchronizePacketSequence( UInt32 sequenceNumber ); + + virtual IOReturn AddDevice( IOBluetoothDevice *inDevice ); + + virtual IOReturn RemoveDevice( IOBluetoothDevice *inDevice ); + + virtual IOReturn CreateDeviceFromConnectionResults( BluetoothHCIEventConnectionCompleteResults *connectionResults ); + + virtual IOReturn DestroyDeviceWithDisconnectionResults( BluetoothHCIEventDisconnectionCompleteResults *disconnectionResults ); + + virtual IOReturn DestroyDevice( IOBluetoothDevice *inDevice ); + + virtual IOReturn DestroyAllDevices(); + + virtual void FlushDeviceACLPackets( IOBluetoothDevice *inDevice ); + + virtual void DecrementOutstandingACLPackets( UInt16 delta ); + + virtual void ProcessFlushOccurredEvent( BluetoothHCIEventFlushOccurredResults *inFlushResults ); + + virtual void ProcessNumCompletedPacketsEvent( UInt8 *inDataPtr ); + + virtual void ProcessHCIControllerResetEvent(); + + virtual IOReturn DispatchIncomingACLData( UInt8 *inDataPtr, UInt32 inDataSize ); + + // Common methods for L2CAP and RFCOMM channel managment: + virtual void MergeChannelDescription(OSDictionary *destination , OSDictionary *source); + virtual void RemoveChannelRestrictions(OSDictionary *toChange , OSDictionary *removeRule, const char *key); + virtual Boolean IsAllowedDevice(OSDictionary *description , IOBluetoothDevice *device); + virtual void RemoveAllRules(); + + // L2CAP channel managment methods: + virtual void RemoveAllowedIncomingL2CAPChannel( OSObject *channelID ); + virtual IOReturn AddAllowedIncomingL2CAPChannel( OSDictionary *channelDescription ); + virtual OSDictionary *GetIncomingL2CAPChannelDescription( OSNumber *psmNumber ); + + // L2CAP channel accessory methods: + virtual void AddAllowedIncomingL2CAPChannel( BluetoothL2CAPPSM incomingPSM ); + virtual void AddAllowedIncomingL2CAPChannel( OSNumber *psmNumber ); + virtual void RemoveAllowedIncomingL2CAPChannel( BluetoothL2CAPPSM incomingPSM ); + + // RFCOMM channel managment methods: + virtual OSDictionary *GetIncomingRFCOMMChannelDescription( OSNumber *channelIDNumber ); + virtual IOReturn AddAllowedIncomingRFCOMMChannel( OSDictionary *channelDescription ); + virtual void RemoveAllowedIncomingRFCOMMChannel( OSObject *channelID ); + + // RFCOMM channel accessory methods: + virtual void AddAllowedIncomingRFCOMMChannel( BluetoothRFCOMMChannelID incomingChannelID ); + virtual void AddAllowedIncomingRFCOMMChannel( OSNumber *channelIDNumber ); + virtual void AddSecureIncomingRFCOMMChannel( BluetoothRFCOMMChannelID incomingChannelID ); + virtual void AddSecureIncomingRFCOMMChannel( OSNumber *channelIDNumber ); + virtual void RemoveAllowedIncomingRFCOMMChannel( BluetoothRFCOMMChannelID incomingChannelID ); + + virtual IOReturn TransferACLPacketToHW(IOMemoryDescriptor *memDescriptor, + SendDataContext * contextPtr); + + // ACL Packet queue: + virtual IOReturn EnqueuePacket( IOMemoryDescriptor *memDescriptor, + SendDataContext *contextPtr, + IOBluetoothDevice *inTargetDevice); + + virtual IOReturn DequeuePacket(); + + virtual IOReturn RemoveAllPacketsBelongingTo(IOBluetoothDevice *inTargetDevice); + +public: + + // IOWorkLoop and IOCommandGate accessors + + virtual IOWorkLoop *getWorkLoop() const; + + virtual IOCommandGate *getCommandGate() const; + + virtual IOReturn setProperties( OSObject * properties ); + + // Subclasses must implement these for it to be a working transport + // in the Bluetooth Family world. + + virtual IOReturn SendHCIRequest( UInt8 * buffer, + IOByteCount bufferSize ); + + static IOReturn SendACLCompletedAction ( OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6 ); + + virtual void SendACLCompleted( SendDataContext *contextPtr); + + virtual IOReturn SendACLData( IOMemoryDescriptor *memDescriptor, + SendDataContext * contextPtr ); + + virtual IOReturn GetTransportInfo( BluetoothTransportInfo * infoStruct ); + + static IOReturn SendSCOCompletedAction ( OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6 ); + + // Override to do something custom with the data. Otherwise, the registered data handler + // will get a peek at it. + + // The ProcessXXXData() functions are safe to be called from anywhere. + // They call ProcessXXXDataWL() on the workloop using ProcessXXXDataAction() + + virtual void ProcessEventData( UInt8 * inDataPtr, UInt32 inDataSize ); + + virtual void ProcessACLData( UInt8 * data, UInt32 dataSize ); + + virtual void ProcessSCOData( UInt8 * data, UInt32 dataSize, UInt32 inMissingData, AbsoluteTime inTimestamp, Boolean copyData ); + + virtual void ProcessEventDataWL( UInt8 * inDataPtr, UInt32 inDataSize, UInt32 sequenceNumber ); + + virtual void ProcessACLDataWL( UInt8 * data, UInt32 dataSize, UInt32 sequenceNumber ); + + virtual void ProcessSCODataWL( UInt8 * data, UInt32 dataSize, UInt32 inMissingData, AbsoluteTime inTimestamp, Boolean copyData ); + + static IOReturn ProcessEventDataAction( IOBluetoothHCIController * hciController, + UInt8 * incomingDataPtr, + UInt32 inDataSize, + UInt32 inSequenceNumber ); + + static IOReturn ProcessACLDataAction( IOBluetoothHCIController * hciController, + UInt8 * incomingDataPtr, + UInt32 inDataSize, + UInt32 inSequenceNumber ); + + // The following is only a "ghost" call and exists only to make the compiler happy, its implementation + // does not do anything. + static IOReturn ProcessSCODataAction( IOBluetoothHCIController * hciController, + UInt8 * incomingDataPtr, + UInt32 inDataSize, + UInt32 inMissingData, + UInt32 inTimestampHi, + UInt32 inTimestampLo, + Boolean inCopyData ); + + static IOReturn ProcessSCODataActionAT( IOBluetoothHCIController * hciController, + UInt8 * incomingDataPtr, + UInt32 inDataSize, + UInt32 inMissingData, + AbsoluteTime* inTimestamp, + Boolean inCopyData ); + + // Data processing helpers. + + virtual bool GetCompleteCodeForCommand( BluetoothHCICommandOpCode inOpCode, + BluetoothHCIEventCode *outEventCode ); + + virtual bool GetOpCodeAndEventCode( UInt8 * inDataPtr, + BluetoothHCICommandOpCode * outOpCode, + BluetoothHCIEventCode * eventCode, + BluetoothHCIEventStatus * outStatus, + BluetoothDeviceAddress * outDeviceAddress, + BluetoothConnectionHandle * outConnectionHandle ); + + virtual IOReturn FindConnectionCompleteType( BluetoothHCICommandOpCode * outOpCode ); + + virtual IOReturn HandleSpecialOpcodes( BluetoothHCICommandOpCode opCode ); + + // This is a hook for other interested parties to get HCI event notifications. When a user client is created, + // that mach_port_t will be passed on to us via these calls so that their port will get HCI events that aren't + // specifically tied to a requst object, but occur due to requests they make. + + virtual IOReturn AddHCIEventNotification( task_t inOwningTask, mach_port_t inPort, void * refCon ); + + virtual void BroadcastEventNotification( BluetoothHCIRequestID inID, + BluetoothHCIEventCode inEventCode, + IOReturn eventStatus, + UInt8 * inDataToSendPtr, + IOByteCount inDataSize, + BluetoothHCICommandOpCode inOpCode ); + + virtual void BroadcastConfigStateChangeNotification( IOBluetoothHCIControllerConfigState oldState, + IOBluetoothHCIControllerConfigState newState ); + + virtual IOReturn RemoveHCIEventNotification( task_t inOwningTask ); + + // This is a hook for other interested parties to get data from transports. They will register itself + // with these to receive the raw data from the transport, bypassing HCI code. + + virtual IOReturn AddDataClient( HCIDataHandlerType inType, + IOBluetoothHCIControllerDataHandler inProcPtr, + void * inContextPtr ); + + virtual IOReturn NotifyDataClients( HCIDataHandlerType inType, UInt8 * inDataPtr, UInt32 inDataSize ); + + virtual IOReturn RemoveDataClient( HCIDataHandlerType inType, IOBluetoothHCIControllerDataHandler inProcPtr ); + + // Request creation, deletion and other data processing stuff. + + virtual IOReturn HCIRequestCreate( BluetoothHCIRequestID * outRequestID, + bool inDoAsyncNotify = TRUE, + UInt32 inTimeout = 5, + BluetoothHCIRequestCallbackInfo * inCallbackInfo = NULL, + task_t inTaskID = 0, + UInt32 inControlFlags = 0 ); + + virtual IOReturn HCIRequestDelete( task_t inTask, BluetoothHCIRequestID inID ); + + virtual IOReturn LookupRequest( BluetoothHCIRequestID inID, IOBluetoothHCIRequest ** outRequestPtr ); + + virtual IOReturn PrepareRequestForNewCommand( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inDeviceAddress, + BluetoothConnectionHandle inConnectionHandle ); + + virtual IOReturn EnqueueRequest( IOBluetoothHCIRequest * inRequestPtr ); + + virtual IOReturn FindQueuedRequest( BluetoothHCICommandOpCode opCode, + BluetoothDeviceAddress * inDeviceAddress, + BluetoothConnectionHandle inConnectionHandle, + Boolean inUseAttributes, + IOBluetoothHCIRequest ** outRequestPtr ); + + virtual IOReturn DequeueRequest( IOBluetoothHCIRequest * inRequestPtr ); + + virtual IOReturn EnqueueWaitRequest( IOBluetoothHCIRequest * inRequestPtr ); + + virtual IOReturn FindQueuedWaitRequest( BluetoothHCICommandOpCode opCode, IOBluetoothHCIRequest ** outRequestPtr ); + + virtual IOReturn DequeueWaitRequest( IOBluetoothHCIRequest * inRequestPtr ); + + virtual IOReturn AbortRequest( IOBluetoothHCIRequest * inRequestPtr ); + + virtual IOReturn FindNextExpiringRequest( BluetoothHCICommandOpCode opCode, IOBluetoothHCIRequest ** outRequestPtr ); + + virtual IOReturn ProcessWaitingRequests(); + + inline IOBluetoothHCIRequest* GetNextWaitRequest() { return( mWaitQueueHead ); } + + inline IOBluetoothHCIRequest* GetNextBusyRequest() { return( mBusyQueueHead ); } + + virtual void TakeAHexDump( const void *inData, UInt32 inDataSize ); + + virtual IOReturn DumpStats(); + + virtual IOBluetoothHCIControllerPowerOptions GetControllerPowerOptions(); + virtual IOBluetoothHCIControllerInternalPowerState GetControllerPowerState(); + virtual IOReturn WaitForControllerPowerState( IOBluetoothHCIControllerInternalPowerState powerState ); + + virtual IOReturn RequestPowerStateChange( IOBluetoothHCIControllerInternalPowerState newPowerState ); + + virtual IOReturn SendHCIRequestFormatted( BluetoothHCIRequestID inID, + BluetoothHCICommandOpCode inOpCode, + IOByteCount outResultsSize, + void * outResultsPtr, + const char * inFormat, + ... ); + + static void RequestExpired( OSObject *owner, IOTimerEventSource *sender ); + + // Misc stuff. + + IOReturn DisposeRequestsForTaskID( task_t inTaskID ); + + IOReturn KillAllPendingRequests( Boolean destroy, Boolean includeIdleRequests ); + void SendingRequest( IOBluetoothHCIRequest *requestPtr ); + void DecrementActiveConnections( ); + + virtual void ActiveConnectionsInProgress( ); + virtual void AllConnectionsGone( ); + + virtual IOReturn SendRawHCICommand( BluetoothHCIRequestID inID, + char * buffer, + UInt32 bufferSize ); + + // Vendor Specific stuff. + + virtual IOReturn VendorCommand( BluetoothHCIRequestID inID, + BluetoothHCIVendorCommandSelector inSelector, + UInt8 * inCommandData, + IOByteCount inCommandDataSize, + IOByteCount outBufferSize, + UInt8 * outBuffer ); + + // IOBluetoothDevice object management + + virtual IOBluetoothDevice * FindDeviceWithHandle( BluetoothConnectionHandle inConnectionHandle ); + + virtual IOBluetoothDevice * FindDeviceWithAddress( const BluetoothDeviceAddress *inDeviceAddress ); + + virtual IOReturn SendACLPacket( IOBluetoothACLMemoryDescriptor *memDescriptor, + SendDataContext * contextPtr, + IOBluetoothDevice * inTargetDevice = NULL ); + + + // API for the serial manager to open a new connection + + virtual IOBluetoothDevice *OpenDeviceConnection( const BluetoothDeviceAddress *inDeviceAddress ); + + static IOReturn OpenDeviceConnectionAction( OSObject *owner, + void *arg1, + void *arg2, + void *arg3, + void *arg4 ); + + virtual IOBluetoothDevice *OpenDeviceConnectionWL( const BluetoothDeviceAddress *inDeviceAddress ); + + // API to track the secure state of RFCOMM channels + virtual Boolean IsSecureIncomingRFCOMMChannel( BluetoothRFCOMMChannelID incomingChannelID ); + virtual Boolean IsSecureIncomingRFCOMMChannel( OSNumber *channelIDNumber ); + + // API to track allowed incoming L2CAP and RFCOMM channels given a device: + virtual Boolean IsAllowedIncomingL2CAPChannelForDevice( BluetoothL2CAPPSM incomingPSM, IOBluetoothDevice *device ); + virtual Boolean IsAllowedIncomingRFCOMMChannelForDevice( BluetoothRFCOMMChannelID incomingChannelID, IOBluetoothDevice *device ); + + // Enabled state for RFCOMM channels: + virtual void SetEnabledIncomingRFCOMMChannel( OSNumber *channelIDNumber, bool ShouldBeEnabled); + virtual void SetEnabledIncomingRFCOMMChannel( BluetoothRFCOMMChannelID incomingChannelID, bool ShouldBeEnabled); + + virtual Boolean ShouldRunInactivityTimer(); // NOT USED: See StartIdleTimer + virtual void SetRunInactivityTimer( Boolean shouldRun ); // NOT USED: See StopIdleTimer + + //============================ + + // From here on out, we implement each of the commands in the HCI spec. You can work around + // hardware bugs by overriding any of these functions if necessary. + + + // Link Control Commands. + + virtual IOReturn BluetoothHCIInquiry( BluetoothHCIRequestID inID, + BluetoothLAP inLAP, + BluetoothHCIInquiryLength inInquiryLength, + BluetoothHCIResponseCount inMaxResponseCount, + BluetoothHCIInquiryResults * outResults ); + + virtual IOReturn BluetoothHCIInquiryCancel( BluetoothHCIRequestID inID ); + + virtual IOReturn BluetoothHCIPeriodicInquiryMode( BluetoothHCIRequestID inID, + BluetoothHCIInquiryLength inMaxPeriodLength, + BluetoothHCIInquiryLength inMinPeriodLength, + BluetoothLAP inLAP, + BluetoothHCIInquiryLength inInquiryLength, + BluetoothHCIResponseCount inMaxResponses, + BluetoothHCIInquiryResults * outResults ); + + virtual IOReturn BluetoothHCIExitPeriodicInquiryMode( BluetoothHCIRequestID inID ); + + virtual IOReturn BluetoothHCICreateConnection( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddressPtr, + BluetoothPacketType inPacketType, + BluetoothPageScanRepetitionMode inPageScanRepetitionMode, + BluetoothPageScanMode inPageScanMode, + BluetoothClockOffset inClockOffset, + BluetoothAllowRoleSwitch inAllowRoleSwitch, + BluetoothHCIEventConnectionCompleteResults *outConnectionHandle ); + + virtual IOReturn BluetoothHCIDisconnect( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothReasonCode inReason, + BluetoothHCIEventDisconnectionCompleteResults * outResults ); + + virtual IOReturn BluetoothHCIAddSCOConnection( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inACLConnectionHandle, + BluetoothPacketType inPacketType ); + + virtual IOReturn BluetoothHCIAcceptConnectionRequest( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddressPtr, + BluetoothRole inRole ); + + virtual IOReturn BluetoothHCIRejectConnectionRequest( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddressPtr, + BluetoothReasonCode inReason ); + + virtual IOReturn BluetoothHCILinkKeyRequestReply( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddressPtr, + const BluetoothKey * inKeyPtr, + BluetoothDeviceAddress * outAddress ); + + virtual IOReturn BluetoothHCILinkKeyRequestNegativeReply( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddressPtr, + BluetoothDeviceAddress * outAddress ); + + virtual IOReturn BluetoothHCIPINCodeRequestReply( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddressPtr, + IOByteCount inPINCodeSize, + const BluetoothPINCode * inPINCode, + BluetoothDeviceAddress * outAddress ); + + virtual IOReturn BluetoothHCIPINCodeRequestNegativeReply( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddressPtr, + BluetoothDeviceAddress * outAddress ); + + virtual IOReturn BluetoothHCIChangeConnectionPacketType( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothPacketType inPacketType ); + + virtual IOReturn BluetoothHCIAuthenticationRequested( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle ); + + virtual IOReturn BluetoothHCISetEncryptionEnable( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothEncryptionEnable inEncryptionEnable ); + + virtual IOReturn BluetoothHCIChangeConnectionLinkKey( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle ); + + virtual IOReturn BluetoothHCIMasterLinkKey( BluetoothHCIRequestID inID, + BluetoothKeyFlag inKeyFlag ); + + virtual IOReturn BluetoothHCIRemoteNameRequest( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddressPtr, + BluetoothPageScanRepetitionMode inPageScanRepetitionMode, + BluetoothPageScanMode inPageScanMode, + BluetoothClockOffset inClockOffset, + BluetoothHCIEventRemoteNameRequestResults * outName ); + + virtual IOReturn BluetoothHCIReadRemoteSupportedFeatures( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothHCIEventReadRemoteSupportedFeaturesResults * outFeatures ); + + virtual IOReturn BluetoothHCIReadRemoteVersionInformation( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothHCIEventReadRemoteVersionInfoResults * outVersionInfo ); + + virtual IOReturn BluetoothHCIReadClockOffset( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothClockOffset * outClockOffset ); + + // Link Policy commands. + + virtual IOReturn BluetoothHCIHoldMode( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothHCIModeInterval inHoldModeMaxInterval, + BluetoothHCIModeInterval inHoldModeMinInterval ); + + virtual IOReturn BluetoothHCISniffMode( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothHCIModeInterval inSniffModeMaxInterval, + BluetoothHCIModeInterval inSniffModeMinInterval, + BluetoothHCISniffAttemptCount inSniffAttemptCount, + BluetoothHCISniffTimeout inSniffModeTimeout ); + + virtual IOReturn BluetoothHCIExitSniffMode( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle ); + + virtual IOReturn BluetoothHCIParkMode( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothHCIParkModeBeaconInterval inMaxInterval, + BluetoothHCIParkModeBeaconInterval inMinInterval ); + + virtual IOReturn BluetoothHCIExitParkMode( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle ); + + virtual IOReturn BluetoothHCIQualityOfServiceSetup( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothHCIQualityOfServiceSetupParams * inSetupPtr ); + + virtual IOReturn BluetoothHCIRoleDiscovery( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothHCIRoleInfo * outRoleInfo ); + + virtual IOReturn BluetoothHCISwitchRole( BluetoothHCIRequestID inID, + BluetoothDeviceAddress * inAddressPtr, + BluetoothHCIRole inNewRole ); + + virtual IOReturn BluetoothHCIReadLinkPolicySettings( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothHCILinkPolicySettingsInfo * outSettingsInfo ); + + virtual IOReturn BluetoothHCIWriteLinkPolicySettings( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothHCILinkPolicySettings inSettings, + BluetoothConnectionHandle * outConnectionHandle ); + + // Host controller and baseband commands. + + virtual IOReturn BluetoothHCISetEventMask( BluetoothHCIRequestID inID, + BluetoothSetEventMask * inMask ); + + virtual IOReturn BluetoothHCIReset( BluetoothHCIRequestID inID ); + + virtual IOReturn BluetoothHCISetEventFilter( BluetoothHCIRequestID inID ); + + virtual IOReturn BluetoothHCIFlush( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inHandle ); + + virtual IOReturn BluetoothHCIReadPINType( BluetoothHCIRequestID inID, + BluetoothPINType * outType ); + + virtual IOReturn BluetoothHCIWritePINType( BluetoothHCIRequestID inID, + BluetoothPINType inType ); + + virtual IOReturn BluetoothHCICreateNewUnitKey( BluetoothHCIRequestID inID ); + + virtual IOReturn BluetoothHCIReadStoredLinkKey( BluetoothHCIRequestID inID, + BluetoothDeviceAddress * targetDevice, + BluetoothHCIReadStoredLinkKeysFlag * inFlags, + BluetoothHCIStoredLinkKeysInfo * outKeysInfo ); + + virtual IOReturn BluetoothHCIWriteStoredLinkKey( BluetoothHCIRequestID inID, + IOItemCount inNumKeysToWrite, + BluetoothDeviceAddress inDeviceAddresses[], + BluetoothKey inLinkKeys[], + BluetoothHCINumLinkKeysToWrite * outNumKeysWritten ); + + virtual IOReturn BluetoothHCIDeleteStoredLinkKey( BluetoothHCIRequestID inID, + BluetoothDeviceAddress * targetDevice, + BluetoothHCIDeleteStoredLinkKeyFlag * inFlag, + BluetoothHCINumLinkKeysDeleted * outNumDeleted ); + + virtual IOReturn BluetoothHCIReadLocalName( BluetoothHCIRequestID inID, + BluetoothDeviceName name ); + + virtual IOReturn BluetoothHCIChangeLocalName( BluetoothHCIRequestID inID, + BluetoothDeviceName newName ); + + virtual IOReturn BluetoothHCIReadConnectionAcceptTimeout( BluetoothHCIRequestID inID, + BluetoothHCIConnectionAcceptTimeout * outTimeout ); + + virtual IOReturn BluetoothHCIWriteConnectionAcceptTimeout( BluetoothHCIRequestID inID, + BluetoothHCIConnectionAcceptTimeout inTimeout ); + + virtual IOReturn BluetoothHCIReadPageTimeout( BluetoothHCIRequestID inID, + BluetoothHCIPageTimeout * outDataPtr ); + + virtual IOReturn BluetoothHCIWritePageTimeout( BluetoothHCIRequestID inID, + BluetoothHCIPageTimeout inTimeout ); + + virtual IOReturn BluetoothHCIReadScanEnable( BluetoothHCIRequestID inID, + BluetoothHCIPageScanEnableState * outState ); + + virtual IOReturn BluetoothHCIWriteScanEnable( BluetoothHCIRequestID inID, + BluetoothHCIPageScanEnableState inState ); + + virtual IOReturn BluetoothHCIReadPageScanActivity( BluetoothHCIRequestID inID, + BluetoothHCIScanActivity * outActivityInfo ); + + virtual IOReturn BluetoothHCIWritePageScanActivity( BluetoothHCIRequestID inID, + BluetoothHCIScanActivity * inActivityInfo ); + + virtual IOReturn BluetoothHCIReadInquiryScanActivity( BluetoothHCIRequestID inID, + BluetoothHCIScanActivity * outActivityInfo ); + + virtual IOReturn BluetoothHCIWriteInquiryScanActivity( BluetoothHCIRequestID inID, + BluetoothHCIScanActivity * inActivityInfo ); + + virtual IOReturn BluetoothHCIReadAuthenticationEnable( BluetoothHCIRequestID inID, + BluetoothHCIAuthenticationEnable * outAuthenticationState ); + + virtual IOReturn BluetoothHCIWriteAuthenticationEnable( BluetoothHCIRequestID inID, + BluetoothHCIAuthenticationEnable inAuthenticationState ); + + virtual IOReturn BluetoothHCIReadEncryptionMode( BluetoothHCIRequestID inID, + BluetoothHCIEncryptionMode * outEncryptionState ); + + virtual IOReturn BluetoothHCIWriteEncryptionMode( BluetoothHCIRequestID inID, + BluetoothHCIEncryptionMode inEncryptionMode ); + + virtual IOReturn BluetoothHCIReadClassOfDevice( BluetoothHCIRequestID inID, + BluetoothClassOfDevice * outClassOfDevice ); + + virtual IOReturn BluetoothHCIWriteClassOfDevice( BluetoothHCIRequestID inID, + BluetoothClassOfDevice inClassOfDevice ); + + virtual IOReturn BluetoothHCIReadVoiceSetting( BluetoothHCIRequestID inID, + BluetoothHCIVoiceSetting * outVoiceSetting ); + + virtual IOReturn BluetoothHCIWriteVoiceSetting( BluetoothHCIRequestID inID, + BluetoothHCIVoiceSetting inVoiceSetting ); + + virtual IOReturn BluetoothHCIReadAutomaticFlushTimeout( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothHCIAutomaticFlushTimeoutInfo * outAutomaticFlushTimeoutInfo ); + + + virtual IOReturn BluetoothHCIWriteAutomaticFlushTimeout( BluetoothHCIRequestID inID, + BluetoothHCIAutomaticFlushTimeoutInfo * inAutomaticFlushTimeoutInfo, + BluetoothConnectionHandle * outConnectionHandle ); + + virtual IOReturn BluetoothHCIReadNumBroadcastRetransmissions( BluetoothHCIRequestID inID, + BluetoothHCINumBroadcastRetransmissions * outNumRetrans ); + + virtual IOReturn BluetoothHCIWriteNumBroadcastRetransmissions( BluetoothHCIRequestID inID, + BluetoothHCINumBroadcastRetransmissions inNumRetrans ); + + virtual IOReturn BluetoothHCIReadHoldModeActivity( BluetoothHCIRequestID inID, + BluetoothHCIHoldModeActivity * outState ); + + virtual IOReturn BluetoothHCIWriteHoldModeActivity( BluetoothHCIRequestID inID, + BluetoothHCIHoldModeActivity inState ); + + virtual IOReturn BluetoothHCIReadTransmitPowerLevel( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inHandle, + BluetoothHCITransmitPowerLevelType inType, + BluetoothHCITransmitPowerLevelInfo * outLevelInfo ); + + virtual IOReturn BluetoothHCIReadSCOFlowControlEnable( BluetoothHCIRequestID inID, + BluetoothHCIFlowControlState * outState ); + + virtual IOReturn BluetoothHCIWriteSCOFlowControlEnable( BluetoothHCIRequestID inID, + BluetoothHCIFlowControlState inState ); + + virtual IOReturn BluetoothHCISetHostControllerToHostFlowControl( BluetoothHCIRequestID inID, + BluetoothHCIFlowControlState inState ); + + virtual IOReturn BluetoothHCIHostBufferSize( BluetoothHCIRequestID inID, + BluetoothHCIBufferSize * inSize ); + + virtual IOReturn BluetoothHCIHostNumberOfCompletePackets( BluetoothHCIRequestID inID ); + + virtual IOReturn BluetoothHCIReadLinkSupervisionTimeout( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inHandle, + BluetoothHCILinkSupervisionTimeout * outInfo ); + + virtual IOReturn BluetoothHCIWriteLinkSupervisionTimeout( BluetoothHCIRequestID inID, + BluetoothHCILinkSupervisionTimeout * inInfo, + BluetoothConnectionHandle * outHandle ); + + virtual IOReturn BluetoothHCIReadNumberOfSupportedIAC( BluetoothHCIRequestID inID, + BluetoothHCISupportedIAC * outNumSupported ); + + virtual IOReturn BluetoothHCIReadCurrentIACLAP( BluetoothHCIRequestID inID ); + + virtual IOReturn BluetoothHCIWriteCurrentIACLAP( BluetoothHCIRequestID inID ); + + virtual IOReturn BluetoothHCIReadPageScanPeriodMode( BluetoothHCIRequestID inID, + BluetoothHCIPageScanPeriodMode * outMode ); + + virtual IOReturn BluetoothHCIWritePageScanPeriodMode( BluetoothHCIRequestID inID, + BluetoothHCIPageScanPeriodMode inMode ); + + virtual IOReturn BluetoothHCIReadPageScanMode( BluetoothHCIRequestID inID, + BluetoothHCIPageScanMode * outMode ); + + virtual IOReturn BluetoothHCIWritePageScanMode( BluetoothHCIRequestID inID, + BluetoothHCIPageScanMode inMode ); + + // Informational commands. + + virtual IOReturn BluetoothHCIReadLocalVersionInformation( BluetoothHCIRequestID inID, + BluetoothHCIVersionInfo * outVersionInfo ); + + virtual IOReturn BluetoothHCIReadLocalSupportedFeatures( BluetoothHCIRequestID inID, + BluetoothHCISupportedFeatures * outFeatures ); + + virtual IOReturn BluetoothHCIReadBufferSize( BluetoothHCIRequestID inID, + BluetoothHCIBufferSize * outSize ); + + virtual IOReturn BluetoothHCIReadCountryCode( BluetoothHCIRequestID inID, + BluetoothHCICountryCode * outCountryCode ); + + virtual IOReturn BluetoothHCIReadDeviceAddress( BluetoothHCIRequestID inID, + BluetoothDeviceAddress * outAddress ); + + // Status commands. + + virtual IOReturn BluetoothHCIReadFailedContactCounter( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothHCIFailedContactInfo * outFailedContactCount ); + + virtual IOReturn BluetoothHCIResetFailedContactCounter( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle ); + + virtual IOReturn BluetoothHCIGetLinkQuality( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothHCILinkQualityInfo * outLinkQualityInfo ); + + virtual IOReturn BluetoothHCIReadRSSI( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothHCIRSSIInfo * outRSSIInfo ); + + // Testing Commands. + + virtual IOReturn BluetoothHCIReadLoopbackMode( BluetoothHCIRequestID inID, + BluetoothHCILoopbackMode * inLoopbackMode ); + + virtual IOReturn BluetoothHCIWriteLoopbackMode( BluetoothHCIRequestID inID, + BluetoothHCILoopbackMode inLoopbackMode ); + + virtual IOReturn BluetoothHCIEnableDeviceUnderTestMode( BluetoothHCIRequestID inID ); + + virtual IOBluetoothHCIControllerFeatureFlags GetControllerFeatureFlags(); + +protected: + + // Power managment functions: + + virtual bool configurePM(IOService *provider); + + virtual IOReturn setPowerState( unsigned long powerStateOrdinal, IOService* whatDevice ); + static IOReturn setPowerStateAction( OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4 ); + virtual IOReturn setPowerStateWL( unsigned long powerStateOrdinal, IOService* whatDevice ); + + virtual void UpdatePowerStateProperty( IOBluetoothHCIControllerInternalPowerState powerState ); + + virtual void SetControllerPowerOptions( IOBluetoothHCIControllerPowerOptions controllerPowerOptions ); + virtual IOReturn PerformPowerStateChange( IOBluetoothHCIControllerInternalPowerState oldPowerState, + IOBluetoothHCIControllerInternalPowerState newPowerState, + UInt32 powerStateOptions, + UInt32 *microsecondsUntilComplete ); + virtual void CompletePowerStateChange(); + + virtual void SetControllerFeatureFlags( IOBluetoothHCIControllerFeatureFlags featureFlags ); + + virtual IOReturn setAggressiveness( unsigned long type, unsigned long newLevel ); + + // Enablers for future Changes. + + typedef struct ExpansionData + { + void *mUnsedPointer1, *mUnsedPointer2; + + // Max number of HCI command allowed; + UInt8 mNumberOfCommandsAllowedByHardware; + UInt8 mNumConfiguredHIDDevices; + UInt8 mControllerSleepFlags; + + // This pointer is depreacted and free for future uses. + void* mUnusedPointer; + + // AFH support: + // the mask for the channels to use: + UInt8 mMaskByte[10]; + + // AirPort changes notifications: + IONotifier *windowServerNotifier; + IONotifier *mAirPortPCI; + Boolean mProcessingConnectionRequest; + Boolean mWaitingForCompletedACLPacketsToSleep; + + // SCO Support + UInt8 mNumSCOConnections; + UInt8 *mSCOPacketBuffer; + UInt16 mNumBufferedSCOBytes; + AbsoluteTime mBufferedSCOPacketTimestamp; + + // Repository for the packets when logging at boot + OSArray *mRepositoryForBoot; + UInt16 mMaxNumberOfBootPackets; + + IOService *mOverriddenControllerProvider; + + size_t mHCIRequestListSize; + uint32_t mNewRequestIndex; + + IOBluetoothInactivityTimerEventSource *mIdleTimer; + Boolean mSystemOnTheWayToSleep; + + // New Airport notifications: + IONotifier *mIO80211Interface; + + UInt32 mNextAvailableSCOSequenceNumber; + UInt32 mCurrentlyExecutingSCOSequenceNumber; + + Boolean mNeedToCleanUpWaitForAckQueue; + Boolean mResettingDevice; + + HearingDeviceListType *mConnectedHearingDeviceListHead; + HearingDeviceListType *mConnectedHearingDeviceListTail; + + } ExpansionData; + + ExpansionData* mExpansionData; + +#define mConnectedHearingDeviceListTail IOBluetoothHCIController::mExpansionData->mConnectedHearingDeviceListTail +#define mConnectedHearingDeviceListHead IOBluetoothHCIController::mExpansionData->mConnectedHearingDeviceListHead +#define mResettingDevice IOBluetoothHCIController::mExpansionData->mResettingDevice +#define mNeedToCleanUpWaitForAckQueue IOBluetoothHCIController::mExpansionData->mNeedToCleanUpWaitForAckQueue +#define mNextAvailableSCOSequenceNumber IOBluetoothHCIController::mExpansionData->mNextAvailableSCOSequenceNumber +#define mCurrentlyExecutingSCOSequenceNumber IOBluetoothHCIController::mExpansionData->mCurrentlyExecutingSCOSequenceNumber + +#define mNumberOfCommandsAllowedByHardware IOBluetoothHCIController::mExpansionData->mNumberOfCommandsAllowedByHardware +#define mNumConfiguredHIDDevices IOBluetoothHCIController::mExpansionData->mNumConfiguredHIDDevices +#define mControllerSleepFlags IOBluetoothHCIController::mExpansionData->mControllerSleepFlags +#define mSleepWakeNotifier IOBluetoothHCIController::mExpansionData->mSleepWakeNotifier + +#define mMaskByte IOBluetoothHCIController::mExpansionData->mMaskByte +#define windowServerNotifier IOBluetoothHCIController::mExpansionData->windowServerNotifier +#define mAirPortPCI IOBluetoothHCIController::mExpansionData->mAirPortPCI +#define mProcessingConnectionRequest IOBluetoothHCIController::mExpansionData->mProcessingConnectionRequest +#define mWaitingForCompletedACLPacketsToSleep IOBluetoothHCIController::mExpansionData->mWaitingForCompletedACLPacketsToSleep + +#define mNumSCOConnections IOBluetoothHCIController::mExpansionData->mNumSCOConnections +#define mSCOPacketBuffer IOBluetoothHCIController::mExpansionData->mSCOPacketBuffer +#define mNumBufferedSCOBytes IOBluetoothHCIController::mExpansionData->mNumBufferedSCOBytes +#define mBufferedSCOPacketTimestamp IOBluetoothHCIController::mExpansionData->mBufferedSCOPacketTimestamp +#define mRepositoryForBoot IOBluetoothHCIController::mExpansionData->mRepositoryForBoot +#define mMaxNumberOfBootPackets IOBluetoothHCIController::mExpansionData->mMaxNumberOfBootPackets +#define mOverriddenControllerProvider IOBluetoothHCIController::mExpansionData->mOverriddenControllerProvider +#define mHCIRequestListSize IOBluetoothHCIController::mExpansionData->mHCIRequestListSize +#define mNewRequestIndex IOBluetoothHCIController::mExpansionData->mNewRequestIndex +#define mIdleTimer IOBluetoothHCIController::mExpansionData->mIdleTimer +#define mSystemOnTheWayToSleep IOBluetoothHCIController::mExpansionData->mSystemOnTheWayToSleep +#define mIO80211Interface IOBluetoothHCIController::mExpansionData->mIO80211Interface + + enum { + kIOBluetoothHCIControllerSleepFlagInquiryScanWasEnabled = 0x01 + }; + + +private: + + // Command Packet Queue: + virtual IOReturn EnqueueRequestForController( IOBluetoothHCIRequest *requestPtr ); // Was OSMetaClassDeclareReservedUnused( IOBluetoothHCIController, 0 ) + virtual IOReturn DequeueAndSendRequests(); // Was OSMetaClassDeclareReservedUnused( IOBluetoothHCIController, 1 ) + virtual IOReturn RemoveAllRequestsFromQueue(); // Was OSMetaClassDeclareReservedUnused( IOBluetoothHCIController, 2 ) + + // New Device creation upon connection: + IOReturn CreateDeviceFromConnectionResults( BluetoothHCIEventConnectionCompleteResults *connectionResults, bool isInitiator); + + // Expanded version of OpenDeviceConnection MUST BE CALLED IN THE WORKLOOP + virtual IOBluetoothDevice *OpenDeviceConnection( const BluetoothDeviceAddress *inDeviceAddress, BluetoothHCIPageTimeout pageTimeoutValue, bool authenticationRequired); + + // sleepWakeHandler DEPRECATED METHOD RETURNS kIOReturnUnsupported ALL THE TIME ! + static IOReturn sleepWakeHandler( void *target, void *refCon, UInt32 messageType, IOService *service, void *messageArgument, vm_size_t argSize ); + + static IOReturn restartShutdownAction( OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4 ); + static IOReturn systemSleepWakeAction( OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4 ); + +public: + virtual IOReturn restartShutdownWL( UInt32 messageType, void *reserved); + + // AFH support: + virtual UInt8 *rangeForChannel(UInt16 channel); + virtual IOReturn handleAirPortChangesChannelWL(IOService *serviceForAirport); + + // Version of stop in the workloop + virtual void stopWL( IOService * provider ); + +private: + static bool staticAirPortDriverNotification(void *us, void *unused, IOService * yourDevice); + static IOReturn handleAirPortChangesChannelAction( OSObject *owner, void *castMeToServiceForAirport, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6 ); + + static bool windowServerDidAppear( void * target, void * refCon, IOService * newService, IONotifier * notifier ); + static IOReturn windowServerDidAppearAction( OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6 ); + + // Expansion slots: + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 0 ); + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 1 ); + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 2 ); + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 3 ); + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 4 ); + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 5 ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 6 ); + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 7 ); + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 8 ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 9 ); + virtual void SetNumSCOConnections( UInt8 numSCOConnections ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 10 ); + virtual void UpdateSCOConnections( UInt8 numSCOConnections ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 11 ); + virtual IOBluetoothDevice *FindDeviceWithSCOHandle( BluetoothConnectionHandle inConnectionHandle ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 12 ); + virtual IOReturn SendSCOData( IOMemoryDescriptor *scoDataDescriptor, + SendDataContext *scoDataContext ); + +protected: + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 13 ); + virtual void SendSCOCompleted( SendDataContext *contextPtr, AbsoluteTime timestamp ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 14 ); + virtual IOReturn DispatchIncomingSCOData( UInt8 *inDataPtr, UInt32 inDataSize, UInt32 inMissingData, AbsoluteTime inTimestamp ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 15 ); + virtual bool willTerminateWL( IOService * provider, IOOptionBits options ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 16 ); + virtual bool shouldOverrideExistingController( IOBluetoothHCIController *controller ); + + static void idleTimerFired( OSObject *owner, IOTimerEventSource *timerEventSource ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 17 ); + virtual void handleIdleTimeout(); + + static IOReturn terminateAction( OSObject *owner, + void *arg1, + void *arg2, + void *arg3, + void *arg4 ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 18 ); + virtual IOReturn terminateWL( IOOptionBits options ); + + // Support for dynamic channel width + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 19 ); + virtual UInt8 *rangeForChannel(UInt16 channel, SInt16 width); + +public: + + // v1.2 + v2.1 commands + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 20 ); + virtual IOReturn BluetoothHCIReadExtendedInquiryResponse( BluetoothHCIRequestID inID, + BluetoothHCIReadExtendedInquiryResponseResults * outData ); + + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 21 ); + virtual IOReturn BluetoothHCIWriteExtendedInquiryResponse( BluetoothHCIRequestID inID, + BluetoothHCIFECRequired inFECRequired, + BluetoothHCIExtendedInquiryResponse * inData ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 22 ); + virtual IOReturn BluetoothHCIReadInquiryMode( BluetoothHCIRequestID inID, + BluetoothHCIInquiryMode * outMode ); + + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 23 ); + virtual IOReturn BluetoothHCIWriteInquiryMode( BluetoothHCIRequestID inID, + BluetoothHCIInquiryMode inMode ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 24 ); + virtual IOReturn BluetoothHCIReadSimplePairingMode( BluetoothHCIRequestID inID, + BluetoothHCISimplePairingMode * outMode ); + + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 25 ); + virtual IOReturn BluetoothHCIWriteSimplePairingMode( BluetoothHCIRequestID inID, + BluetoothHCISimplePairingMode inMode ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 26 ); + virtual IOReturn BluetoothHCIIOCapabilityRequestReply( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddress, + BluetoothIOCapability inIOCapability, + BluetoothOOBDataPresence inOOBDataPresence, + BluetoothAuthenticationRequirements inAuthenticationRequirements ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 27 ); + virtual IOReturn BluetoothHCIReadLocalOOBData( BluetoothHCIRequestID inID, + BluetoothHCIReadLocalOOBDataResults * outData ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 28 ); + virtual IOReturn BluetoothHCIReadInquiryResponseTransmitPower( BluetoothHCIRequestID inID, + BluetoothHCITransmitPowerLevel * outData ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 29 ); + virtual IOReturn BluetoothHCIWriteInquiryResponseTransmitPower( BluetoothHCIRequestID inID, + BluetoothHCITransmitPowerLevel inData ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 30 ); + virtual IOReturn BluetoothHCIUserConfirmationRequestReply( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddress ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 31 ); + virtual IOReturn BluetoothHCIUserConfirmationRequestNegativeReply( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddress ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 32 ); + virtual IOReturn BluetoothHCIUserPasskeyRequestReply( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddress, + BluetoothPasskey inPasskey); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 33 ); + virtual IOReturn BluetoothHCIUserPasskeyRequestNegativeReply( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddress ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 34 ); + virtual IOReturn BluetoothHCIRemoteOOBDataRequestReply( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddress, + BluetoothHCISimplePairingOOBData * hash, + BluetoothHCISimplePairingOOBData * randomizer ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 35 ); + virtual IOReturn BluetoothHCIRemoteOOBDataRequestNegativeReply( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddress ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 36 ); + virtual IOReturn BluetoothHCIWriteSimplePairingDebugMode( BluetoothHCIRequestID inID, + BluetoothSimplePairingDebugMode inData ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 37 ); + virtual IOReturn BluetoothHCISendKeypressNotification( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddress, + BluetoothKeypressNotificationType inData ); + +protected: + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 38 ); + virtual IOReturn systemSleepWakeWL( UInt32 messageType, void *reserved); + +public: + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 39 ); + virtual IOReturn BluetoothHCIReadLocalExtendedFeatures( BluetoothHCIRequestID inID, + BluetoothHCIPageNumber inPageNumber, + BluetoothHCIExtendedFeaturesInfo * outFeatures ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 40 ); + virtual IOReturn BluetoothHCIReadRemoteExtendedFeatures( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothHCIPageNumber inPageNumber, + BluetoothHCIEventReadRemoteExtendedFeaturesResults * outFeatures ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 41 ); + virtual IOReturn BluetoothHCIReadAFHChannelAssessmentMode( BluetoothHCIRequestID inID, + BluetoothHCIAFHChannelAssessmentMode * outData ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 42 ); + virtual IOReturn BluetoothHCIWriteAFHChannelAssessmentMode( BluetoothHCIRequestID inID, + BluetoothHCIAFHChannelAssessmentMode inData ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 43 ); + virtual IOReturn BluetoothHCISetAFHHostChannelClassification( BluetoothHCIRequestID inID, + uint8_t * inDataPtr, + uint8_t inDataLength ); + +private: + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 44 ); + virtual IOReturn BluetoothHCIReadAFHChannelMap( BluetoothHCIRequestID inID, + BluetoothConnectionHandle inConnectionHandle, + BluetoothAFHResults * outData ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 45 ); + virtual void SynchronizeSCOPacketSequence( UInt32 sequenceNumber ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 46 ); + virtual IOReturn BluetoothHCICreateConnectionCancel( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddressPtr, + BluetoothDeviceAddress * outAddress ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 47 ); + virtual IOReturn BluetoothHCIRemoteNameRequestCancel( BluetoothHCIRequestID inID, + const BluetoothDeviceAddress * inAddressPtr, + BluetoothDeviceAddress * outAddress ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 48 ); + void StartIdleTimer( uint32_t milliseconds ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 49 ); + void StopIdleTimer(); + +public: + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 50 ); + virtual IOReturn setUnackQueueCompletionCalled(void * memoryDescriptor); + +protected: + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 51 ); + virtual IOReturn RemovePacket(IOMemoryDescriptor *memDescriptor); + +public: + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 52 ); + IOReturn exitHIDSniff(bool exitSniff); + +public: + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 53 ); + virtual IOReturn WaitForControllerPowerStateWithTimeout( IOBluetoothHCIControllerInternalPowerState powerState, + UInt32 waitTimeInMicroSecond); +public: + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 54 ); + void SetHCIDriverExistsVariableTo( bool isLoaded ); + +public: + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 55 ); + virtual IOReturn ToggleLMPLogging( ); + +public: + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 56 ); + virtual HearingDeviceListType * FindHearingDeviceWithAddress( const BluetoothDeviceAddress *inDeviceAddress ); + +public: + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 57 ); + virtual IOReturn AddHearingDevice( IOBluetoothDevice *inDevice ); + +public: + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 58 ); + virtual IOReturn RemoveHearingDevice( IOBluetoothDevice *inDevice, bool all ); + +public: + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 59 ); + virtual IOReturn SetDevicePublishNotificationState( const BluetoothDeviceAddress *inDeviceAddress, DevicePublishNotificationStateType state ); + +public: + OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 60 ); + virtual DevicePublishNotificationStateType * GetDevicePublishNotificationState( const BluetoothDeviceAddress *inDeviceAddress ); + +private: + OSMetaClassDeclareReservedUnused( IOBluetoothHCIController, 61 ); + OSMetaClassDeclareReservedUnused( IOBluetoothHCIController, 62 ); + OSMetaClassDeclareReservedUnused( IOBluetoothHCIController, 63 ); +}; diff --git a/i386/include/IOKit/bluetooth/IOBluetoothHCIRequest.h b/i386/include/IOKit/bluetooth/IOBluetoothHCIRequest.h new file mode 100644 index 0000000..c9d970e --- /dev/null +++ b/i386/include/IOKit/bluetooth/IOBluetoothHCIRequest.h @@ -0,0 +1,155 @@ +/* + File: IOBluetoothHCIRequest.h + Contains: Bluetooth Host Controller request object. + Copyright: (c) 2001-2008 by Apple, all rights reserved. +*/ + +#pragma once + +#import +#import + +#import + + +class IOCommandGate; +class IOTimerEventSource; +class IOBluetoothHCIController; + +// Forward declaration to avoid the need to include IOBluetoothHCIUserLibShared.h +typedef struct BluetoothHCINotificationMessage; + +//=========================================================================================================================== +// enums, macros, etc. +//=========================================================================================================================== + +enum +{ + kMaxHCIBufferLength = 512 +}; + +typedef UInt8 BluetoothHCIRequestState; +enum BluetoothHCIRequestStates +{ + kHCIRequestStateIdle = 0, // Doing nothing - neither waiting nor busy. usually waiting for deletion. + kHCIRequestStateWaiting = 1, // On the wait queue - request has not been processed in any way. + kHCIRequestStateBusy = 2, // On the busy queue - request is sent and is currently processing +}; + + +//=========================================================================================================================== +// IOBluetoothHCIRequest +//=========================================================================================================================== + +class IOBluetoothHCIRequest : public OSObject +{ + OSDeclareDefaultStructors( IOBluetoothHCIRequest ) + + UInt8 mPrivateResultsBuffer[kMaxHCIBufferLength*4]; // Just in case they didn't give a results ptr. + IOByteCount mPrivateResultsSize; // Result size. + BluetoothHCITransportID mTransportID; // Transport ID to use for this request. + UInt8 mState; // Busy, waiting, idle. + bool mAsyncNotify; + task_t mOwningTaskID; + BluetoothHCIRequestCallbackInfo mCallbackInfo; // When this request is complete, call this. + BluetoothHCICommandOpCode mOpCode; + BluetoothDeviceAddress mDeviceAddress; + BluetoothConnectionHandle mConnectionHandle; + BluetoothHCINotificationMessage * mNotificationMessage; + IOByteCount mNotificationMessageSize; + + +public: + + IOBluetoothHCIRequest * mNextBusy; // Points to next request element on busy queue. + IOBluetoothHCIRequest * mNextWait; // Points to next request element on wait queue. + IOBluetoothHCIRequest * mNextAllocated; // Points to next allocated request element. + IOBluetoothHCIRequest * mPreviousAllocated; // Points to next allocated request element. + BluetoothHCIRequestID mID; // For internal identification. + UInt8 mCommandBuffer[kMaxHCIBufferLength]; // Built-up HCI Command to send to the transport. + IOByteCount mCommandBufferSize; // Size of command buffer. + + UInt8 * mResultsPtr; // Result ptr, provided by object creator. + IOByteCount mResultsSize; // Result size. + + IOCommandGate * mCommandGate; + IOTimerEventSource * mTimer; + IOBluetoothHCIController * mHCIController; + IOReturn mStatus; // Success/failure code of request. + UInt32 mTimeout; // Timeout for request to complete, in milliseconds. + UInt32 mControlFlags; + int mPID; // Creating Task + bool mHCIRequestDeleteWasCalled; // Fixed rdar://problem/7044168 + + +public: + + bool init( IOCommandGate *commandGate, IOBluetoothHCIController *hciController ); + void free(); + + static IOBluetoothHCIRequest * Create( IOCommandGate *commandGate, IOBluetoothHCIController *hciController, bool async = TRUE, UInt32 timeout = 5, UInt32 controlFlags = 0 ); + static IOReturn Dispose( IOBluetoothHCIRequest * inObject ); + + + // Called when a request is started on a transport, and completed. + + IOReturn Start(); + void Complete(); + + // Accessors for object members. + + void SetState( BluetoothHCIRequestState inState ); + BluetoothHCIRequestState GetState() { return( mState ); } + + void SetHCIStatus( BluetoothHCIStatus inStatus ) { mStatus = inStatus; } + BluetoothHCIStatus GetHCIStatus() { return( mStatus ); } + + void SetID( BluetoothHCIRequestID inID ) { mID = inID; } + BluetoothHCIRequestID GetID() { return( mID ); } + + void SetCallbackInfo( BluetoothHCIRequestCallbackInfo * inInfo ); + BluetoothHCIRequestCallbackInfo * GetCallbackInfo() { return( &mCallbackInfo ); } + + void SetOwningTaskID( task_t inTaskID ) { mOwningTaskID = inTaskID; } + task_t GetOwningTaskID() { return( mOwningTaskID ); } + + void * GetCommandBuffer(); + + BluetoothHCICommandOpCode GetCommandOpCode(); + void SetCommandOpCode( BluetoothHCICommandOpCode inOpCode ) { mOpCode = inOpCode; } + + BluetoothDeviceAddress * GetDeviceAddress() { return &mDeviceAddress; } + void SetDeviceAddress( const BluetoothDeviceAddress *inDeviceAddress ) { if ( inDeviceAddress != NULL ) memcpy( &mDeviceAddress, inDeviceAddress, sizeof( BluetoothDeviceAddress ) ); } + void ClearDeviceAddress() { bzero( &mDeviceAddress, sizeof( BluetoothDeviceAddress ) ); } + Boolean CompareDeviceAddress( const BluetoothDeviceAddress *inDeviceAddress ); + + BluetoothConnectionHandle GetConnectionHandle() { return mConnectionHandle; } + void SetConnectionHandle( BluetoothConnectionHandle inConnectionHandle ) { mConnectionHandle = inConnectionHandle; } + void ClearConnectionHandle() { mConnectionHandle = kBluetoothConnectionHandleNone; } + + void SetTimeout( UInt32 inTimeout ) { mTimeout = inTimeout; } // in milliseconds + UInt32 GetTimeout() { return( mTimeout ); } + + void StartTimer(); + + static void timerFired( OSObject *owner, IOTimerEventSource *sender ); + void handleTimeout(); + + void CopyDataIntoResultsPtr( UInt8 * inDataPtr, IOByteCount inSize ); + void SetParamPtrAndSize( UInt8 paramNumber, UInt8 * inParamPtr, IOByteCount inSize ); + + void SetResultsBufferPtrAndSize( UInt8 * resultsBuffer, IOByteCount inSize ); + void SetResultsDataSize( IOByteCount inCount ); + UInt8 * GetResultsBuffer(); + IOByteCount GetResultsBufferSize(); + + mach_vm_address_t GetNotificationRefCon() { return( mCallbackInfo.asyncIDRefCon ); } + + void SetDoAsyncNotify( bool inAsyncNotify ) { mAsyncNotify = inAsyncNotify; } + Boolean IsSynchronous() { return !mAsyncNotify; } + + void SetControlFlags( UInt32 controlFlags ) { mControlFlags = controlFlags; } + UInt32 GetControlFlags() { return mControlFlags; } + + const char * RequestDescription(); +}; diff --git a/i386/include/IOKit/bluetooth/IOBluetoothHIDDriver.h b/i386/include/IOKit/bluetooth/IOBluetoothHIDDriver.h new file mode 100644 index 0000000..b3bb449 --- /dev/null +++ b/i386/include/IOKit/bluetooth/IOBluetoothHIDDriver.h @@ -0,0 +1,230 @@ +/* + File: IOBluetoothHIDDriver.h + Contains: Driver for generic Bluetooth HID devices. + Copyright: (c) 2001-2008 by Apple, all rights reserved. +*/ + +#ifndef IOBLUETOOTHHIDDRIVER_H +#define IOBLUETOOTHHIDDRIVER_H + +#include +#include + +//=========================================================================================================================== +// Forwards +//=========================================================================================================================== + +class IOTimerEventSource; +class IOWorkLoop; + +class IOBluetoothL2CAPChannel; +class IOBluetoothDevice; +class IOWorkQueue; + +//=========================================================================================================================== +// IOBluetoothHIDDriver +//=========================================================================================================================== + +class IOBluetoothHIDDriver : public IOHIDDevice +{ + OSDeclareDefaultStructors( IOBluetoothHIDDriver ) + + IOWorkLoop* _workLoop; + IOCommandGate* _commandGate; + + IOWorkQueue *_desyncWorkQueue; + + IOBluetoothL2CAPChannel* _controlChannel; + IOBluetoothL2CAPChannel* _interruptChannel; + + IOBluetoothDevice* _device; + + IOMemoryDescriptor* _memDescriptor; + IOMemoryDescriptor* _getReportDescriptor; + IONotifier* _interruptOpenNotification; + IOTimerEventSource* _timer; + IONotifier* _sleepWakeNotifier; + + bool _deviceReady; + + UInt8 _expectedReportID; + UInt8 _expectedReportType; + UInt8 _handshake; + + OSDictionary* _deviceProperties; + + UInt16 _vendorIDSource; + UInt16 _vendorID; + UInt16 _productID; + UInt16 _deviceVersion; + uint32_t _classOfDevice; + UInt16 _countryCode; + + BluetoothDeviceAddress _deviceAddress; + char _deviceAddressString[20]; + + uint32_t _outstandingIO; + bool _sendOutstanding; + + // Debug / Behavior Modifiers + UInt8 _verboseLevel; + bool _logPackets; + bool _decodePackets; + bool _logOutstandingIO; + bool _suppressDisconnectNotifications; + bool _suppressSetProtocol; + bool _driverIsAwake; + bool _reservedFlag4; + UInt8 _reservedByte; + + struct ExpansionData + { + OSArray* _sendQueue; + + uint8_t *interruptBuffer; + uint32_t interruptBufferUsed; + + uint8_t *controlBuffer; + uint32_t controlBufferUsed; + + uint8_t deviceSupportsSuspend; + + uint32_t getReportTimeoutMS; + uint32_t setReportTimeoutMS; + + uint32_t outstandingMemoryBlockCount; + bool waitingForMemoryBlockCount; + }; + ExpansionData *_expansionData; + +public: + // Standard IOService Methods + virtual IOService* probe( IOService * provider, SInt32 * score ); + virtual bool init( OSDictionary *properties ); + virtual void free(); + virtual bool willTerminate( IOService * provider, IOOptionBits options ); + + // Starting & Stopping + virtual bool handleStart( IOService * provider ); + virtual void handleStop( IOService * provider ); + virtual void deviceReady(); + virtual void closeDownServices(); + + // Power Management + virtual void handleSleep(); + virtual void handleWake(); + virtual void handleShutdown(); // Does nothing + virtual void handleRestart(); // Does nothing + + // HID Properties + virtual OSString* newTransportString() const; + virtual OSString* newManufacturerString() const; + virtual OSString* newProductString() const; + virtual OSNumber* newVendorIDSourceNumber() const; + virtual OSNumber* newVendorIDNumber() const; + virtual OSNumber* newProductIDNumber() const; + virtual OSNumber* newVersionNumber() const; + virtual IOReturn newReportDescriptor( IOMemoryDescriptor ** descriptor ) const; + virtual OSString* newSerialNumberString() const; + virtual OSNumber* newLocationIDNumber() const; + virtual OSNumber* newCountryCodeNumber() const; + virtual OSNumber* newReportIntervalNumber() const; + + // Main UserLand Entry Points + virtual IOReturn getReport( IOMemoryDescriptor* report, IOHIDReportType reportType, IOOptionBits options = 0 ); + virtual IOReturn setReport( IOMemoryDescriptor* report, IOHIDReportType reportType, IOOptionBits options = 0 ); + virtual IOReturn setProperties( OSObject* properties ); + + // General IO + virtual IOReturn sendData( IOBluetoothL2CAPChannel* theChannel, void* theData, IOByteCount theSize ); + virtual void processControlData( UInt8 *buffer, UInt16 length ); + virtual void processInterruptData( UInt8 *buffer, UInt16 length ); + virtual IOReturn waitForData( IOMemoryDescriptor* report, UInt8 btReportType, UInt8 reportID ); + virtual IOReturn waitForHandshake(); + + // HID Transaction Methods + virtual IOReturn hidControl( UInt8 controlOperation ); + virtual int getProtocol(); + virtual IOReturn setProtocol( UInt8 protocol ); + virtual int getIdle(); + virtual IOReturn setIdle( UInt8 idleRate ); + + // Device Introspection + virtual bool isKeyboard(); + virtual bool isMouse(); + + // Misc + virtual IOReturn setPowerState( unsigned long powerStateOrdinal, IOService* whatDevice ); + virtual IOReturn createCommandGate( IOService* provider ); + virtual IOReturn getDeviceProperties( IOService* provider ); + virtual bool readDeviceName(); + + // Command Gate Actions + static IOReturn staticCloseDownServicesAction( OSObject* owner, void* arg1, void* arg2, void* arg3, void* arg4 ); + static IOReturn staticSendToAction( OSObject* owner, void* theChannel, void* theData, void *theSize, void* ); + static IOReturn staticPrepControlChannelAction( OSObject* owner, void* arg1, void* arg2, void* arg3, void* arg4 ); + static IOReturn staticPrepInterruptChannelAction( OSObject* owner, void* arg1, void* arg2, void* arg3, void* arg4 ); + static IOReturn staticGetReportAction( OSObject* owner, void* arg1, void* arg2, void* arg3, void* arg4 ); + static IOReturn staticSetReportAction( OSObject* owner, void* arg1, void* arg2, void* arg3, void* arg4 ); + static IOReturn staticProcessCommandAction( OSObject* owner, void* arg1, void* arg2, void* arg3, void* arg4 ); + static IOReturn staticGetDevicePropertiesAction( OSObject* owner, void* arg1, void* arg2, void* arg3, void* arg4 ); + static IOReturn staticInterruptChannelOpeningAction( OSObject* owner, void* newService, void* arg2, void* arg3, void* arg4 ); + static IOReturn staticWillTerminateAction( OSObject* owner, void* arg1, void* arg2, void* arg3, void* arg4 ); + + // Work Loop Methods + virtual void closeDownServicesWL(); + virtual IOReturn prepInterruptChannelWL(); + virtual IOReturn getReportWL( IOMemoryDescriptor* report, IOHIDReportType reportType, IOOptionBits options ); + virtual IOReturn setReportWL( IOMemoryDescriptor* report, IOHIDReportType reportType, IOOptionBits options ); + virtual IOReturn processCommandWL( OSString* command, OSNumber* commandParameter ); + virtual IOReturn getDevicePropertiesWL( IOService* provider ); + virtual IOReturn interruptChannelOpeningWL( IOBluetoothL2CAPChannel* theChannel ); + + // Timeout Handler + static void timerFired( OSObject* owner, IOTimerEventSource* sender ); + virtual void handleTimeout(); + + // IO Counting + virtual void incrementOutstandingIO(); + virtual void decrementOutstandingIO(); + +private: + // Lazy Interrupt Channel Methods + static bool interruptChannelOpeningCallback( void* me, void* ignoreMe, IOService* newService, IONotifier *notifier ); + static IOReturn powerStateHandler( void *target, void *refCon, UInt32 messageType, IOService *service, void *messageArgument, vm_size_t argSize ); + +public: + OSMetaClassDeclareReservedUsed( IOBluetoothHIDDriver, 0 ); + virtual void sendDeviceDisconnectNotifications( void ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHIDDriver, 1 ); + virtual IOReturn setPowerStateWL( unsigned long powerStateOrdinal, IOService* whatDevice ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHIDDriver, 2 ); + virtual void sendDeviceConnectNotifications( void ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHIDDriver, 3 ); + virtual void decrementOutstandingMemoryBlockCount( void ); + + OSMetaClassDeclareReservedUsed( IOBluetoothHIDDriver, 4 ); + virtual IOReturn willTerminateWL( void ); + +public: + OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 5 ); + OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 6 ); + OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 7 ); + OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 8 ); + OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 9 ); + OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 10 ); + OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 11 ); + OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 12 ); + OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 13 ); + OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 14 ); + OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 15 ); + OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 16 ); + OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 17 ); + OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 18 ); + OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 19 ); +}; + +#endif // IOBLUETOOTHHIDDRIVER_H diff --git a/i386/include/IOKit/bluetooth/IOBluetoothHIDDriverTypes.h b/i386/include/IOKit/bluetooth/IOBluetoothHIDDriverTypes.h new file mode 100644 index 0000000..8d722aa --- /dev/null +++ b/i386/include/IOKit/bluetooth/IOBluetoothHIDDriverTypes.h @@ -0,0 +1,61 @@ +/* + File: IOBluetoothHIDDriverTypes.h + Contains: Type defined for the IOBluetoothHIDDriver.h. + Copyright: (c) 2001-2008 by Apple, all rights reserved. +*/ + + +#ifndef IOBLUETOOTHHIDDRIVERTYPES_H +#define IOBLUETOOTHHIDDRIVERTYPES_H + +// Vendor ID Sources +//------------------ +#define kVendorIDSourceBluetoothSIG 0x1 +#define kVendorIDSourceUSBIF 0x2 + +// Bluetooth HID Transaction Headers +//---------------------------------- +#define IOBTHID_HANDSHAKE_HEADER 0x00 +#define IOBTHID_HID_CONTROL_HEADER 0x10 +#define IOBTHID_GET_REPORT_HEADER 0x40 +#define IOBTHID_SET_REPORT_HEADER 0x50 +#define IOBTHID_GET_PROTOCOL_HEADER 0x60 +#define IOBTHID_SET_PROTOCOL_HEADER 0x70 +#define IOBTHID_GET_IDLE_HEADER 0x80 +#define IOBTHID_SET_IDLE_HEADER 0x90 +#define IOBTHID_DATA_HEADER 0xA0 +#define IOBTHID_DATC_HEADER 0xB0 + +// Handshake Types +//---------------- +#define IOBTHID_HANDSHAKE_SUCCESSFUL 0x0 +#define IOBTHID_HANDSHAKE_NOT_READY 0x1 +#define IOBTHID_HANDSHAKE_INVALID_REPORT_ID 0x2 +#define IOBTHID_HANDSHAKE_UNSUPPORTED_REQUEST 0x3 +#define IOBTHID_HANDSHAKE_INVALID_PARAMETER 0x4 +#define IOBTHID_HANDSHAKE_ERR_UNKNOWN 0xE +#define IOBTHID_HANDSHAKE_ERR_FATAL 0xF + +// HID_Control Types +//------------------ +#define IOBTHID_CONTROL_NOP 0x0 +#define IOBTHID_CONTROL_HARD_RESET 0x1 +#define IOBTHID_CONTROL_SOFT_RESET 0x2 +#define IOBTHID_CONTROL_SUSPEND 0x3 +#define IOBTHID_CONTROL_EXIT_SUSPEND 0x4 +#define IOBTHID_CONTROL_VC_UNPLUG 0x5 + +// Protocol Types +//--------------- +#define IOBTHID_BOOT_PROTOCOL 0x0 +#define IOBTHID_REPORT_PROTOCOL 0x1 + +// Report Types +//------------- +#define IOBTHID_RESERVED_REPORT 0x0 +#define IOBTHID_OTHER_REPORT 0x0 +#define IOBTHID_INPUT_REPORT 0x1 +#define IOBTHID_OUTPUT_REPORT 0x2 +#define IOBTHID_FEATURE_REPORT 0x3 + +#endif // IOBLUETOOTHHIDDRIVERTYPES_H diff --git a/i386/include/IOKit/bluetooth/IOBluetoothInternal.h b/i386/include/IOKit/bluetooth/IOBluetoothInternal.h new file mode 100644 index 0000000..ed40a76 --- /dev/null +++ b/i386/include/IOKit/bluetooth/IOBluetoothInternal.h @@ -0,0 +1,103 @@ +/* + File: BluetoothInternal.h + Contains: Internal types and macros needed by public kernel APIs. + Copyright: 2003-2007 by Apple, Inc. All rights reserved. +*/ + +#pragma once + +typedef enum IOBluetoothHCIControllerConfigState +{ + kIOBluetoothHCIControllerConfigStateOnline = 0, // Controller is configured and ready for clients + kIOBluetoothHCIControllerConfigStateKernelSetupPending = 1, // New controller - kernel setup in progress + kIOBluetoothHCIControllerConfigStateDaemonSetupPending = 2, // New controller - daemon setup in progress + kIOBluetoothHCIControllerConfigStateDaemonSetupComplete = 3, // New controller - daemon setup complete + kIOBluetoothHCIControllerConfigStateResetPending = 4, // HCI reset has been issued + kIOBluetoothHCIControllerConfigStateKernelPostResetSetupPending = 5, // HCI reset complete - kernel setup in progress + kIOBluetoothHCIControllerConfigStateDaemonPostResetSetupPending = 6, // HCI reset complete - daemon setup in progress + kIOBluetoothHCIControllerConfigStateDaemonPostResetSetupComplete = 7, // HCI reset complete - daemon setup complete + kIOBluetoothHCIControllerConfigStateUninitialized = 8 +} IOBluetoothHCIControllerConfigState; + +typedef UInt32 IOBluetoothHCIControllerPowerOptions; +enum +{ + kIOBluetoothHCIControllerPowerOptionPowerOffSupported = 0x00000001, + kIOBluetoothHCIControllerPowerOptionWakeFromExistingConnectionSupported = 0x00000002, + kIOBluetoothHCIControllerPowerOptionWakeFromNewConnectionSupported = 0x00000004, + kIOBluetoothHCIControllerPowerOptionIdleWithConnectionSupported = 0x00000008, + kIOBluetoothHCIControllerPowerOptionIdleWhenInternalPower = 0x00000010 +}; + +enum IOBluetoothHCIControllerSleepOptions +{ + kIOBluetoothHCIControllerAllowWakeFromExistingConnection = 0x00000001, + kIOBluetoothHCIControllerAllowWakeFromNewConnection = 0x00000002, + kIOBluetoothHCIControllerTemporaryOnFromIdle = 0x00000004 +}; + +#define HCI_CONTROLLER_POWER_OFF_SUPPORTED( _controllerPowerOptions ) ( ( _controllerPowerOptions & kIOBluetoothHCIControllerPowerOptionPowerOffSupported ) == kIOBluetoothHCIControllerPowerOptionPowerOffSupported ) +#define HCI_CONTROLLER_SLEEP_SUPPORTED( _controllerPowerOptions ) \ + ( ( _controllerPowerOptions & \ + ( kIOBluetoothHCIControllerPowerOptionWakeFromExistingConnectionSupported | \ + kIOBluetoothHCIControllerPowerOptionWakeFromNewConnectionSupported ) ) != 0 ) + +typedef enum IOBluetoothHCIControllerInternalPowerState +{ + kIOBluetoothHCIControllerInternalPowerStateOff = 0, + kIOBluetoothHCIControllerInternalPowerStateOn = 1, + kIOBluetoothHCIControllerInternalPowerStateSleep = 2, + kIOBluetoothHCIControllerInternalPowerStateIdle = 3 +} IOBluetoothHCIControllerInternalPowerState; + +enum IOBluetoothHCIControllerPowerStateOrdinal +{ + kIOBluetoothHCIControllerPowerStateOrdinalOff = 0, + kIOBluetoothHCIControllerPowerStateOrdinalIdle = 1, + kIOBluetoothHCIControllerPowerStateOrdinalOn = 2 +}; + +typedef UInt32 IOBluetoothHCIControllerFeatureFlags; + +enum +{ + kIOBluetoothHCIControllerFeatureFlagVendorCommandFlowControl = 0x00000001, + kIOBluetoothHCIControllerFeatureFlagSCOSupported = 0x00000002, + kIOBluetoothHCIControllerFeatureFlagSerializeCommands = 0x10000000 +}; + +//=========================================================================================================================== +// Private_UnifiedInquiryResult +//=========================================================================================================================== + +typedef struct IOBluetoothHCIUnifiedInquiryResult IOBluetoothHCIUnifiedInquiryResult; +struct IOBluetoothHCIUnifiedInquiryResult +{ + BluetoothHCIInquiryResult originalInquiryResult; + + // event code will be either: + // kBluetoothHCIEventInquiryResult, kBluetoothHCIEventInquiryResultWithRSSI, or kBluetoothHCIEventExtendedInquiryResult + + BluetoothHCIEventCode eventCode; + + // kBluetoothHCIEventExtendedInquiryResult only + + BluetoothHCIExtendedInquiryResponse extendedInquiryResponse; + + // kBluetoothHCIEventExtendedInquiryResult or kBluetoothHCIEventInquiryResultWithRSSI only + + UInt8 reserved; + BluetoothHCIRSSIValue RSSIValue; +}; + +#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0 + +enum BluetoothHCIExtendedInquiryResponseDataTypesAppleSpecificInfo +{ + kBluetoothHCIExtendedInquiryResponseDataTypeAppleSpecificInfoReserved = 0x00, + kBluetoothHCIExtendedInquiryResponseDataTypeAppleSpecificInfoModelIdentifier = 0x01, /* UTF8String char data */ + kBluetoothHCIExtendedInquiryResponseDataTypeAppleSpecificInfoThirdPartyAdvertising = 0x02, +}; + +#endif /* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0 */ + diff --git a/i386/include/IOKit/bluetooth/IOBluetoothTypes.h b/i386/include/IOKit/bluetooth/IOBluetoothTypes.h new file mode 100644 index 0000000..07ee4c2 --- /dev/null +++ b/i386/include/IOKit/bluetooth/IOBluetoothTypes.h @@ -0,0 +1,23 @@ +/* + File: IOBluetoothTypes.h + Contains: Family provided types and defines - shared between user and kernel code. + Copyright: © 2002-2007 by Apple Inc. All rights reserved. +*/ + +#pragma once + +#include + +// Error returns +#ifndef sub_iokit_bluetooth +#define sub_iokit_bluetooth err_sub(8) +#endif + +#define iokit_bluetooth_err(return) (sys_iokit|sub_iokit_bluetooth|return) + +#define kIOBluetoothDeviceResetError iokit_bluetooth_err(1) // Device reset interrupted pending operation +#define kIOBluetoothConnectionAlreadyExists iokit_bluetooth_err(2) // Attempting to open a connection that already exists +#define kIOBluetoothNoHCIController iokit_bluetooth_err(3) // No HCI controller is present +#define kIOBluetoothHCIPowerStatesNotSupported iokit_bluetooth_err(4) // HCI controller does not support changing power states + + diff --git a/i386/include/IOKit/firewire/IOConfigDirectory.h b/i386/include/IOKit/firewire/IOConfigDirectory.h new file mode 100644 index 0000000..d72ed21 --- /dev/null +++ b/i386/include/IOKit/firewire/IOConfigDirectory.h @@ -0,0 +1,182 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __IOCONFIGDIRECTORY_H__ +#define __IOCONFIGDIRECTORY_H__ + +#include +#include + +#include + +class OSData; +class OSString; +class OSIterator; +class IOFireWireDevice; + +/*! @class IOConfigDirectory +*/ +class IOConfigDirectory : public OSObject +{ + OSDeclareAbstractStructors(IOConfigDirectory); + +protected: + int fStart; // Offset into ROM of start of this dir + int fType; // Directory type + int fNumEntries; // In directory + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + virtual bool initWithOffset(int start, int type); + + virtual const UInt32 *getBase() = 0; + virtual IOReturn createIterator(UInt32 testVal, UInt32 testMask, + OSIterator *&iterator); + virtual IOConfigDirectory *getSubDir(int start, int type) = 0; + +public: + /*! + @function update + makes sure that the ROM has at least the specified capacity, + and that the ROM is uptodate from its start to at least the + specified quadlet offset. + @result kIOReturnSuccess if the specified offset is now + accessable at romBase[offset]. + */ + virtual IOReturn update(UInt32 offset, const UInt32 *&romBase) = 0; + + /*! + @function getKeyType + Gets the data type for the specified key + @param type on return, set to the data type + @result kIOReturnSuccess if the key exists in the dictionary + */ + virtual IOReturn getKeyType(int key, IOConfigKeyType &type); + /*! + @function getKeyValue + Gets the value for the specified key, in a variety of forms. + @param value on return, set to the data type + @param text if non-zero, on return points to the + string description of the field, or NULL if no text found. + @result kIOReturnSuccess if the key exists in the dictionary + and is of a type appropriate for the value parameter + @param value reference to variable to store the entry's value + */ + virtual IOReturn getKeyValue(int key, UInt32 &value, OSString** text = NULL); + virtual IOReturn getKeyValue(int key, OSData *&value, + OSString** text = NULL); + virtual IOReturn getKeyValue(int key, IOConfigDirectory *&value, + OSString** text = NULL); + virtual IOReturn getKeyOffset(int key, FWAddress &value, + OSString** text = NULL); + + + /*! + @function getIndexType + Gets the data type for entry at the specified index + @param type on return, set to the data type + @result kIOReturnSuccess if the index exists in the dictionary + */ + virtual IOReturn getIndexType(int index, IOConfigKeyType &type); + /*! + @function getIndexKey + Gets the key for entry at the specified index + @param key on return, set to the key + @result kIOReturnSuccess if the index exists in the dictionary + */ + virtual IOReturn getIndexKey(int index, int &key); + + /*! + @function getIndexValue + Gets the value at the specified index of the directory, + in a variety of forms. + @param type on return, set to the data type + @result kIOReturnSuccess if the index exists in the dictionary + and is of a type appropriate for the value parameter + @param value reference to variable to store the entry's value + */ + virtual IOReturn getIndexValue(int index, UInt32 &value); + virtual IOReturn getIndexValue(int index, OSData *&value); + virtual IOReturn getIndexValue(int index, OSString *&value); + virtual IOReturn getIndexValue(int index, IOConfigDirectory *&value); + virtual IOReturn getIndexOffset(int index, FWAddress &value); + virtual IOReturn getIndexOffset(int index, UInt32 &value); + + /*! + @function getIndexEntry + Gets the entry at the specified index of the directory, + as a raw UInt32. + @param entry on return, set to the entry value + @result kIOReturnSuccess if the index exists in the dictionary + @param value reference to variable to store the entry's value + */ + virtual IOReturn getIndexEntry(int index, UInt32 &value); + + /*! + @function getSubdirectories + Creates an iterator over the subdirectories of the directory. + @param iterator on return, set to point to an OSIterator + @result kIOReturnSuccess if the iterator could be created + */ + virtual IOReturn getSubdirectories(OSIterator *&iterator); + + /*! + @function getKeySubdirectories + Creates an iterator over subdirectories of a given type of the directory. + @param key type of subdirectory to iterate over + @param iterator on return, set to point to an OSIterator + @result kIOReturnSuccess if the iterator could be created + */ + virtual IOReturn getKeySubdirectories(int key, OSIterator *&iterator); + + int getType() const; + + int getNumEntries() const; + +protected: + + virtual const UInt32 * lockData( void ) = 0; + virtual void unlockData( void ) = 0; + virtual IOReturn updateROMCache( UInt32 offset, UInt32 length ) = 0; + virtual IOReturn checkROMState( void ) = 0; + +private: + OSMetaClassDeclareReservedUnused(IOConfigDirectory, 0); + OSMetaClassDeclareReservedUnused(IOConfigDirectory, 1); + OSMetaClassDeclareReservedUnused(IOConfigDirectory, 2); + OSMetaClassDeclareReservedUnused(IOConfigDirectory, 3); + OSMetaClassDeclareReservedUnused(IOConfigDirectory, 4); + OSMetaClassDeclareReservedUnused(IOConfigDirectory, 5); + OSMetaClassDeclareReservedUnused(IOConfigDirectory, 6); + OSMetaClassDeclareReservedUnused(IOConfigDirectory, 7); + OSMetaClassDeclareReservedUnused(IOConfigDirectory, 8); + +}; + +#endif /* __IOCONFIGDIRECTORY_H__ */ diff --git a/i386/include/IOKit/firewire/IOFWAddressSpace.h b/i386/include/IOKit/firewire/IOFWAddressSpace.h new file mode 100644 index 0000000..7ad6764 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWAddressSpace.h @@ -0,0 +1,331 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * + * IOFWAddressSpace.h + * + * Classes which describe addresses in the local node which are accessable to other nodes + * via firewire asynchronous read/write/lock requests. + */ + +#ifndef _IOKIT_IOFWADDRESSSPACE_H +#define _IOKIT_IOFWADDRESSSPACE_H + +#include +#include + +class IOFireWireDevice; +class IOFireWireBus; +class IOFireWireController; + +typedef void * IOFWRequestRefCon; + +/*! @function FWWriteCallback + @abstract Callback called when a write request packet is received for + a 'virtual' firewire address. + @param device is the node originating the request + @param speed is the FireWire speed of the request, update it if you need to control + the speed of the reply, otherwise the response will be the same speed. + @param addr is the address the device is requesting to write to + @param len is the number of bytes to write + @param buf contains the packet data + @param requestRefcon refcon Can be queried for extra info about the request, + using IOFireWireController::isLockRequest(), isQuadRequest() + @result return: + kFWResponseComplete = 0, OK + kFWResponseConflictError = 4, Resource conflict, may retry + kFWResponseDataError = 5, Data not available + kFWResponseTypeError = 6, Operation not supported + kFWResponseAddressError = 7 Address not valid in target device */ +typedef UInt32 (*FWWriteCallback)(void *refcon, UInt16 nodeID, IOFWSpeed &speed, + FWAddress addr, UInt32 len, const void *buf, IOFWRequestRefCon requestRefcon); + +/*! @function FWReadCallback + @abstract Callback called when a read request packet is received for + a 'virtual' firewire address. + @param nodeID is the node originating the request + @param speed is the FireWire speed of the request, update it if you need to control + the speed of the reply, otherwise the response will be the same speed. + @param addr is the address the device is requesting to read from + @param len is the number of bytes to read + @param buf contains the packet data + @param offset on return points to the offset into *buf of the packet data + @param requestRefcon refcon to pass back if sending a delayed response. Also can be queried + for extra info about the request + @result return: + kFWResponsePending = -1, Pseudo response, real response sent later. + kFWResponseComplete = 0, OK! + kFWResponseConflictError = 4, Resource conflict, may retry + kFWResponseDataError = 5, Data not available + kFWResponseTypeError = 6, Operation not supported + kFWResponseAddressError = 7 Address not valid in target device + + A return of kFWResponsePending should be followed at some later time by a call to + IOFireWireController::asyncReadResponse */ +typedef UInt32 (*FWReadCallback)(void *refcon, UInt16 nodeID, IOFWSpeed &speed, + FWAddress addr, UInt32 len, IOMemoryDescriptor **buf, + IOByteCount * offset, IOFWRequestRefCon requestRefcon); + +class IOFWAddressSpace; + +#pragma mark - + +/*! @class IOFWAddressSpaceAux + @discussion An IOFWAddressSpaceAux is for internal use only. You should never subclass IOFWAddressSpaceAux +*/ + +class IOFWAddressSpaceAux : public OSObject +{ + OSDeclareDefaultStructors(IOFWAddressSpaceAux) + + friend class IOFWAddressSpace; + +protected: + + IOFWAddressSpace * fPrimary; + IOFireWireController * fControl; + + OSSet * fTrustedNodeSet; + OSIterator * fTrustedNodeSetIterator; + + bool fExclusive; + + /*! + @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + + struct ExpansionData { }; + + /*! + @var reserved + Reserved for future use. (Internal use only) + */ + + ExpansionData * reserved; + + virtual bool init( IOFWAddressSpace * primary ); + virtual void free(); + + virtual bool isTrustedNode( UInt16 nodeID ); + virtual void addTrustedNode( IOFireWireDevice * device ); + virtual void removeTrustedNode( IOFireWireDevice * device ); + virtual void removeAllTrustedNodes( void ); + + bool isExclusive( void ); + void setExclusive( bool exclusive ); + + virtual bool intersects( IOFWAddressSpace * space ); + +private: + OSMetaClassDeclareReservedUsed(IOFWAddressSpaceAux, 0); + OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 1); + OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 2); + OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 3); + OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 4); + OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 5); + OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 6); + OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 7); + OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 8); + OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 9); + +}; + +#pragma mark - + +/* + * Base class for FireWire address space objects + */ + +/*! + @class IOFWAddressSpace +*/ + +class IOFWAddressSpace : public OSObject +{ + OSDeclareAbstractStructors(IOFWAddressSpace) + + friend class IOFWAddressSpaceAux; + +protected: + + IOFireWireController *fControl; + + /*! + @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + + struct ExpansionData + { + IOFWAddressSpaceAux * fAuxiliary; + }; + + /*! + @var reserved + Reserved for future use. (Internal use only) + */ + + ExpansionData * fIOFWAddressSpaceExpansion; + + virtual bool init(IOFireWireBus *bus); + virtual void free(); + +public: + + /*! @function doRead + @abstract An abstract method for processing an address space read request + @param nodeID FireWire Read from nodeID. + @param speed at this 'speed'. + @param addr with FireWire address 'addr'. + @param len read 'len' bytes from nodeID. + @param buf points to a memory descriptor containing the packet data. + @param offset start from this 'offset' in 'buf'. + @param refcon Can be queried for extra info about the request. + @result UIn32 returns kFWResponseComplete on success */ + virtual UInt32 doRead(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, + IOMemoryDescriptor **buf, IOByteCount * offset, + IOFWRequestRefCon refcon) = 0; + + /*! @function doWrite + @abstract An abstract method for processing an address space write request + @param nodeID FireWire Write to nodeID. + @param speed at this 'speed'. + @param addr with FireWire address 'addr'. + @param len write 'len' bytes to nodeID. + @param buf obtain bytes from location given by 'buf'. + @param refcon Can be queried for extra info about the request. + @result UIn32 returns kFWResponseComplete on success */ + virtual UInt32 doWrite(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, + const void *buf, IOFWRequestRefCon refcon) = 0; + + /*! @function doLock + @abstract A method for processing a lock request. + @param nodeID FireWire Lock request for nodeID. + @param speed at this 'speed'. + @param addr with FireWire address 'addr'. + @param inlen 'inlen' bytes to use. + @param newVal new value to write at 'addr' location . + @param outLen 'outLen' bytes for result. + @param oldVal old value read from 'addr' location. + @param extType Type like kFWExtendedTCodeCompareSwap. + @param refcon Can be queried for extra info about the request. + @result UIn32 returns kFWResponseComplete on success */ + virtual UInt32 doLock(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 inlen, + const UInt32 *newVal, UInt32 &outLen, UInt32 *oldVal, + UInt32 extType, IOFWRequestRefCon refcon); + + /*! @function activate + @abstract Address space is ready for handling requests. + @result IOReturn + */ + virtual IOReturn activate(); + + /*! @function deactivate + @abstract Address space request handler is disabled. + @result none + */ + virtual void deactivate(); + + /*! @function contains + @abstract returns number of bytes starting at addr in this space + @result 0 if it doesn't contain the address + */ + virtual UInt32 contains(FWAddress addr); + + /*! @function isTrustedNode + @abstract returns true if the node is added as a trusted node + @param nodeID is the nodeID to verify whether its trusted. + @result false if nodeID is not trusted + */ + inline bool isTrustedNode( UInt16 nodeID ) + { return fIOFWAddressSpaceExpansion->fAuxiliary->isTrustedNode( nodeID ); } + + /*! @function addTrustedNode + @abstract Add a trusted node. + @param device object pointing to a FireWire node on the bus. + @result none + */ + inline void addTrustedNode( IOFireWireDevice * device ) + { fIOFWAddressSpaceExpansion->fAuxiliary->addTrustedNode( device ); } + + /*! @function removeTrustedNode + @abstract Remove a trusted node. + @param device object pointing to a FireWire node on the bus. + @result none + */ + inline void removeTrustedNode( IOFireWireDevice * device ) + { fIOFWAddressSpaceExpansion->fAuxiliary->removeTrustedNode( device ); } + + /*! @function removeAllTrustedNodes + @abstract Remove all trusted nodes. + @result none + */ + inline void removeAllTrustedNodes( void ) + { fIOFWAddressSpaceExpansion->fAuxiliary->removeAllTrustedNodes(); } + + /*! @function isExclusive + @abstract Checks if an address space wants exclusive control of its address range + @result True if the address space is marked exclusive false otherwise + */ + + inline bool isExclusive( void ) + { return fIOFWAddressSpaceExpansion->fAuxiliary->isExclusive(); } + + /*! @function setExclusive + @abstract Sets if this address space requires exclusive control of its address range. Exclusivity should be set before an address space is activated. + @param exclusive True if address space should be exclusive, false otherwise + @result none + */ + + inline void setExclusive( bool exclusive ) + { fIOFWAddressSpaceExpansion->fAuxiliary->setExclusive( exclusive ); } + + /*! @function intersects + @abstract Checks this address space intersects with the given address range. Currently only supports IOFWPsuedoAddressSpaces. + @param space An address space to compare against + @result True if the address spaces intersect false otherwise + */ + + inline bool intersects( IOFWAddressSpace * space ) + { return fIOFWAddressSpaceExpansion->fAuxiliary->intersects( space ); } + + +protected: + + virtual IOFWAddressSpaceAux * createAuxiliary( void ); + +private: + OSMetaClassDeclareReservedUsed(IOFWAddressSpace, 0); + OSMetaClassDeclareReservedUsed(IOFWAddressSpace, 1); + +}; + +// the physical and psuedo address space classes used to be defined here +// for backwards compatibility, we pull them in now. the ifdefs surrounding +// the content of the header files ensures we do not multiply include a header. + +#include +#include + +#endif /* _IOKIT_IOFWADDRESSSPACE */ diff --git a/i386/include/IOKit/firewire/IOFWAsyncStreamListener.h b/i386/include/IOKit/firewire/IOFWAsyncStreamListener.h new file mode 100644 index 0000000..cef64f8 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWAsyncStreamListener.h @@ -0,0 +1,132 @@ +/* + * Copyright (c) 1998-2001 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _IOKIT_IOFWASYNCSTREAMLISTENER_H +#define _IOKIT_IOFWASYNCSTREAMLISTENER_H + +#include +#include +#include +#include + +class IOFWAsyncStreamReceiver; +class IOFWAsyncStreamReceivePort; + +/*! @class IOFWAsyncStreamListener +*/ +class IOFWAsyncStreamListener : public OSObject +{ + OSDeclareDefaultStructors(IOFWAsyncStreamListener) + +friend class IOFWAsyncStreamReceiver; +friend class IOFireWireController; + +public: + +/*! @function initAll + @abstract Creates an AsyncStream client for an Isoch channel. + @param control Points to IOFireWireController. + @param channel Isoch channel for listening. + @param proc Callback on packet reception. + @param obj Client's callback object. + @result returns true on success, else false. */ + bool initAll( IOFireWireController *control, UInt32 channel, FWAsyncStreamReceiveCallback proc, void *refcon ); + +/*! @function setListenerHandler + @abstract Set the callback that should be called to handle incoming async stream packets + @param inReceiver The callback to set. + @result Returns the callback that was previously set or nil for none.*/ + const FWAsyncStreamReceiveCallback setListenerHandler( FWAsyncStreamReceiveCallback inReceiver ); + +/*! @function TurnOffNotification + @abstract Turns off client callback notification. + @result none. */ + inline void TurnOffNotification() { fNotify = false; }; + +/*! @function TurnOnNotification + @abstract Turns on client callback notification. + @result none. */ + inline void TurnOnNotification() { fNotify = true; }; + +/*! @function IsNotificationOn + @abstract checks the notification state. + @result true if ON, else false */ + inline bool IsNotificationOn() { return fNotify; }; + +/*! @function setFlags + @abstract set flags for the listener. + @param flags indicate performance metrics. + @result none. */ + void setFlags( UInt32 flags ); + +/*! @function getFlags + @abstract get the flags of listener. + @param none. + @result flags. */ + UInt32 getFlags(); + +/*! @function getRefCon + @abstract get the refcon specific to this listener. + @param none. + @result fRefCon refcon passed during initialization. */ + inline void* getRefCon() { return fRefCon; }; + +/*! @function getOverrunCounter + @abstract get overrun counter from the DCL program. + @param none. + @result returns the counter value. */ + UInt32 getOverrunCounter(); + +protected: + + FWAsyncStreamReceiveCallback fClientProc; + void *fRefCon; + IOFWAsyncStreamReceiver *fReceiver; + bool fNotify; + UInt32 fFlags; + IOFireWireController *fControl; + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + virtual void free(); + +private: +/*! function getReceiver + abstract Returns the Async Stream receiver object which tracks multiple + IOFWAsyncStreamListeners for the same Isoc channel. */ + inline IOFWAsyncStreamReceiver *getReceiver() { return fReceiver; }; + +/*! function invokeClients + abstract Invokes client's callback function with fRefCon. */ + void invokeClients( UInt8 *buffer ); + + OSMetaClassDeclareReservedUnused(IOFWAsyncStreamListener, 0); + OSMetaClassDeclareReservedUnused(IOFWAsyncStreamListener, 1); +}; +#endif // _IOKIT_IOFWASYNCSTREAMLISTENER_H + diff --git a/i386/include/IOKit/firewire/IOFWCommand.h b/i386/include/IOKit/firewire/IOFWCommand.h new file mode 100644 index 0000000..fdf85b5 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWCommand.h @@ -0,0 +1,977 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * + * IOFWCommand.h + * + */ +#ifndef _IOKIT_IOFWCOMMAND_H +#define _IOKIT_IOFWCOMMAND_H + +#include +#include + +#include + +#include + +#define kFWCmdDefaultRetries 3 +#define kFWCmdZeroRetries 0 +#define kFWCmdReducedRetries 2 +#define kFWCmdIncreasedRetries 6 + +class IOMemoryDescriptor; +class IOSyncer; +class IOFireWireBus; +class IOFireWireController; +class IOFireWireNub; +class IOFWAddressSpace; // Description of chunk of local FW address space +class IOFWCommand; +class IOFWBusCommand; +class IOFWAsyncStreamCommand; +class IOCommandGate; +class IOFWAsyncPHYCommand; + +struct AsyncPendingTrans; + +// Struct for head of command queue +/*! + @struct IOFWCmdQ + @abstract Structure for head of a queue of IOFWCommands + @field fHead Points to the head of the queue, or NULL if queue is empty + @field fTail Points to the tail of the queue, or NULL if queue is empty + @function headChanged called when head command is changed, or the command + itself changes state. +*/ + +struct IOFWCmdQ +{ + IOFWCommand *fHead; + IOFWCommand *fTail; + bool executeQueue(bool all); + virtual void headChanged(IOFWCommand *oldHead); + + virtual ~IOFWCmdQ() {} + + void checkProgress( void ); +}; + +// Callback when device command completes asynchronously +typedef void (*FWDeviceCallback)(void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd); + +// Callback when bus command completes asynchronously +typedef void (*FWBusCallback)(void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd); + +// Callback when async stream command completes asynchronously +typedef void (*FWAsyncStreamCallback)(void *refcon, IOReturn status, IOFireWireBus *bus, IOFWAsyncStreamCommand *fwCmd); + +// Callback when async stream command completes asynchronously +typedef void (*FWAsyncPHYCallback)(void *refcon, IOReturn status, IOFireWireBus *bus, IOFWAsyncPHYCommand *fwCmd ); + +// Callback when async stream packet is received +typedef void (*FWAsyncStreamReceiveCallback)(void *refcon, const void *buf); + +#pragma mark - + +/* + * Base class for FireWire commands + */ +/*! @class IOFWCommand +*/ +class IOFWCommand : public IOCommand +{ + OSDeclareAbstractStructors(IOFWCommand) + +protected: + IOReturn fStatus; + IOFireWireController *fControl; + IOFWCommand * fQueuePrev; + IOFWCommand * fQueueNext; + IOFWCmdQ * fQueue; + UInt32 fTimeout; // How long (in microsecs) after execute() to timeout + AbsoluteTime fDeadline; // Time after which this command has timed out. + IOFWSyncer * fSyncWakeup; + UInt8 fSync; + UInt8 fCancelOnReset; + UInt8 spare[2]; + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct MemberVariables + { + void * fFWIMRefCon; + IOReturn fCompletionStatus; + bool fSubmitTimeLatched; + AbsoluteTime fSubmitTime; + bool fFlush; + }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + MemberVariables * fMembers; + + virtual IOReturn complete(IOReturn status); + virtual void updateTimer(); + virtual IOReturn startExecution(); + + /* + * Execute the FWCommand immediately + * must be called with the workloop gate closed + */ + virtual IOReturn execute() = 0; + +public: + + virtual bool initWithController(IOFireWireController *control); + virtual void free( void ); + + IOReturn getStatus() const { return fStatus; }; + + /* + * Submit the FWCommand. + * if queue is false the command's execute() + * method will be called on the caller's thread, otherwise + * the command wil be queued for execution on the work loop thread. + */ + virtual IOReturn submit(bool queue = false); + + /* + * Cancel command, causes it to complete with given status + */ + virtual IOReturn cancel(IOReturn reason); + + /*! + @function setHead + inserts a command at the head of a queue. + @param queue queue command is being added to + */ + virtual void setHead(IOFWCmdQ &queue); + /*! + @function insertAfter + inserts a command after the specified one. + @param prev command to insert after + @param queue queue command is being added to + */ + virtual void insertAfter(IOFWCommand &prev); + + /*! + @function removeFromQ + Removes command from current queue. + */ + virtual void removeFromQ(); + + IOFWCommand *getPrevious() const + { return fQueuePrev; }; + IOFWCommand *getNext() const + { return fQueueNext; }; + const AbsoluteTime &getDeadline() const + { return fDeadline; }; + + bool cancelOnReset() const + { return fCancelOnReset; }; + + bool Busy() const + { return fStatus == kIOReturnBusy || fStatus == kIOFireWirePending;}; + + void setTimeout( UInt32 timeout ) + { fTimeout = timeout; }; + + friend class IOFWCmdQ; + + void * getFWIMRefCon( void ) + { + return fMembers->fFWIMRefCon; + } + + void setFWIMRefCon( void * refcon ) + { + fMembers->fFWIMRefCon = refcon; + } + + void setFlush( bool flush ) + { + fMembers->fFlush = flush; + } + + virtual IOReturn checkProgress( void ); + +private: + OSMetaClassDeclareReservedUsed(IOFWCommand, 0); + OSMetaClassDeclareReservedUnused(IOFWCommand, 1); + +}; + +#pragma mark - + +/* + * Bus control commands + */ +/*! @class IOFWBusCommand +*/ +class IOFWBusCommand : public IOFWCommand +{ + OSDeclareAbstractStructors(IOFWBusCommand) + +protected: + FWBusCallback fComplete; + void * fRefCon; + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + virtual IOReturn complete(IOReturn status); + + virtual bool initWithController(IOFireWireController *control, + FWBusCallback completion=NULL, void *refcon=NULL); + virtual IOReturn reinit(FWBusCallback completion, void *refcon); + +private: + OSMetaClassDeclareReservedUnused(IOFWBusCommand, 0); + +}; + +#pragma mark - + +/* + * Command to execute some code after a specified delay (in microseconds) + * All it does is timeout after the specified delay, hence calling the completion + * callback. + */ +/*! @class IOFWDelayCommand +*/ +class IOFWDelayCommand : public IOFWBusCommand +{ + OSDeclareDefaultStructors(IOFWDelayCommand) + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + +protected: + virtual IOReturn execute(); + +public: + virtual bool initWithDelay(IOFireWireController *control, UInt32 uSecs, + FWBusCallback completion, void *refcon); + virtual IOReturn reinit(UInt32 uSecs, FWBusCallback completion, void *refcon); + +private: + OSMetaClassDeclareReservedUnused(IOFWDelayCommand, 0); + +}; + +/* + * Send an async request to a device + */ +class IOFWUserReadQuadletCommand ; +class IOFWUserWriteCommand ; + +#pragma mark - + +/*! @class IOFWAsyncCommand +*/ +class IOFWAsyncCommand : public IOFWCommand +{ + OSDeclareAbstractStructors(IOFWAsyncCommand) + +protected: + IOFireWireNub * fDevice; + FWDeviceCallback fComplete; + void * fRefCon; + IOMemoryDescriptor *fMemDesc; + AsyncPendingTrans * fTrans; + UInt32 fAddressHi; + UInt32 fAddressLo; + IOByteCount fBytesTransferred; + int fSize; + int fSpeed; + int fMaxPack; + int fCurRetries; + int fMaxRetries; + UInt32 fGeneration; // bus topology fNodeID is valid for. + UInt16 fNodeID; + bool fFailOnReset; + bool fWrite; + + typedef struct + { + // some of our subclasses didn't have room for expansion data, so + // we've reserved space for their use here. + + void * fSubclassMembers; + int fMaxSpeed; + int fAckCode; + UInt32 fResponseCode; + UInt32 fFastRetryCount; + int fResponseSpeed; + bool fForceBlockRequests; + } + MemberVariables; + + MemberVariables * fMembers; + + virtual IOReturn complete(IOReturn status); + virtual bool initWithController(IOFireWireController *control); + virtual bool initAll(IOFireWireNub *device, FWAddress devAddress, + IOMemoryDescriptor *hostMem, + FWDeviceCallback completion, void *refcon, bool failOnReset); + virtual bool initAll(IOFireWireController *control, + UInt32 generation, FWAddress devAddress, + IOMemoryDescriptor *hostMem, + FWDeviceCallback completion, void *refcon); + virtual void free( void ); + virtual IOReturn reinit(FWAddress devAddress, IOMemoryDescriptor *hostMem, + FWDeviceCallback completion, void *refcon, bool failOnReset); + virtual IOReturn reinit(UInt32 generation, FWAddress devAddress, IOMemoryDescriptor *hostMem, + FWDeviceCallback completion, void *refcon); + bool createMemberVariables( void ); + void destroyMemberVariables( void ); +public: + // Utility for setting generation on newly created command + virtual void setGeneration(UInt32 generation) + { fGeneration = generation; } + + // To be called by IOFireWireController and derived classes. + virtual void gotPacket(int rcode, const void* data, int size) = 0; + virtual void gotAck(int ackCode); + + // update nodeID/generation after bus reset, from the device object + IOReturn updateGeneration(); + // explicitly update nodeID/generation after bus reset + IOReturn updateNodeID(UInt32 generation, UInt16 nodeID); + + // Generally useful stuff + IOByteCount getBytesTransferred() const + { return fBytesTransferred; }; + + FWAddress getAddress() const + { return FWAddress(fAddressHi, fAddressLo, fNodeID); } + + bool failOnReset() const + { return fFailOnReset; } + + IOFireWireNub * getDevice() const + { return fDevice; } + + /*! + @function setMaxPacket + Sets the maximum size for block transfers used by the command. + The command is initialized to use the maximum packet size calculated from the device's + PHY speed, bus info block and the bus topology. + Call this method before calling submit(). + @param maxBytes Maximum packet size in bytes. If the maxsize is 4 then quadlet transfers will be used. + */ + IOReturn setMaxPacket(UInt32 maxBytes) + { + if(fStatus == kIOReturnBusy || fStatus == kIOFireWirePending) + return fStatus; + fMaxPack = maxBytes; + return kIOReturnSuccess; + } + + void setMaxSpeed( int speed ); + + void setAckCode( int ack ); + int getAckCode( void ); + + void setRetries( int retries); + int getMaxRetries( void ); + + void setResponseCode( UInt32 rcode ); + UInt32 getResponseCode( void ) const; + + void setFastRetryCount( UInt32 count ) + { fMembers->fFastRetryCount = count; }; + + UInt32 getFastRetryCount( void ) + { return fMembers->fFastRetryCount; }; + + void setResponseSpeed( int speed ) + { fMembers->fResponseSpeed = speed; }; + + int getResponseSpeed( void ) + { return fMembers->fResponseSpeed; }; + + // forces even 4 byte transactions to be block requests + void setForceBlockRequests( bool enabled ) + { fMembers->fForceBlockRequests = enabled; } + + virtual IOReturn checkProgress( void ); + +private: + OSMetaClassDeclareReservedUnused(IOFWAsyncCommand, 0); + OSMetaClassDeclareReservedUnused(IOFWAsyncCommand, 1); + OSMetaClassDeclareReservedUnused(IOFWAsyncCommand, 2); + OSMetaClassDeclareReservedUnused(IOFWAsyncCommand, 3); + +}; + +#pragma mark - + +/* + * Concrete async requests - read, write and hordes of read/modify/write + */ +class IOFWReadCommand : public IOFWAsyncCommand +{ + OSDeclareDefaultStructors(IOFWReadCommand) + +protected: + + virtual void gotPacket(int rcode, const void* data, int size); + + virtual IOReturn execute(); + +public: + virtual bool initAll(IOFireWireNub *device, FWAddress devAddress, + IOMemoryDescriptor *hostMem, + FWDeviceCallback completion, void *refcon, bool failOnReset); + virtual bool initAll(IOFireWireController *control, + UInt32 generation, FWAddress devAddress, + IOMemoryDescriptor *hostMem, + FWDeviceCallback completion, void *refcon); + virtual IOReturn reinit(FWAddress devAddress, IOMemoryDescriptor *hostMem, + FWDeviceCallback completion=NULL, void *refcon=NULL, + bool failOnReset=false); + virtual IOReturn reinit(UInt32 generation, FWAddress devAddress, IOMemoryDescriptor *hostMem, + FWDeviceCallback completion=NULL, void *refcon=NULL); + +private: + OSMetaClassDeclareReservedUnused(IOFWReadCommand, 0); + OSMetaClassDeclareReservedUnused(IOFWReadCommand, 1); +}; + +#pragma mark - + +/*! + @class IOFWReadQuadCommand + @discussion An easier to use version of IOFWReadCommand for use when the data to be transferred + is an integer number of quads. + Note that block read requests will be used for transfers greater than one quad unless setMaxPacket(4) + is called. +*/ + +class IOFWReadQuadCommand : public IOFWAsyncCommand +{ + OSDeclareDefaultStructors(IOFWReadQuadCommand) + +protected: + + UInt32 * fQuads; + + typedef struct + { + bool fPingTime; + } + MemberVariables; + + bool createMemberVariables( void ); + void destroyMemberVariables( void ); + virtual void free( void ); + + virtual void gotPacket(int rcode, const void* data, int size); + + virtual IOReturn execute(); + +public: + virtual bool initAll(IOFireWireNub *device, FWAddress devAddress, + UInt32 *quads, int numQuads, + FWDeviceCallback completion, void *refcon, bool failOnReset); + + virtual bool initAll(IOFireWireController *control, + UInt32 generation, FWAddress devAddress, + UInt32 *quads, int numQuads, + FWDeviceCallback completion, void *refcon); + + virtual IOReturn reinit(FWAddress devAddress, UInt32 *quads, int numQuads, + FWDeviceCallback completion=NULL, void *refcon=NULL, + bool failOnReset=false); + + virtual IOReturn reinit(UInt32 generation, FWAddress devAddress, UInt32 *quads, int numQuads, + FWDeviceCallback completion=NULL, void *refcon=NULL); + + void setPingTime( bool state ) + { ((MemberVariables*)fMembers->fSubclassMembers)->fPingTime = state; }; + +private: + OSMetaClassDeclareReservedUnused(IOFWReadQuadCommand, 0); + OSMetaClassDeclareReservedUnused(IOFWReadQuadCommand, 1); +}; + +#pragma mark - + +class IOFWWriteCommand : public IOFWAsyncCommand +{ + + OSDeclareDefaultStructors(IOFWWriteCommand) + +protected: + + int fPackSize; + + typedef struct + { + bool fDeferredNotify; + bool fFastRetryOnBusy; + } + MemberVariables; + + virtual IOReturn execute(); + + virtual void gotPacket( int rcode, const void* data, int size ); + + bool createMemberVariables( void ); + void destroyMemberVariables( void ); + +public: + + virtual bool initWithController(IOFireWireController *control); + virtual bool initAll( IOFireWireNub * device, + FWAddress devAddress, + IOMemoryDescriptor * hostMem, + FWDeviceCallback completion, + void * refcon, + bool failOnReset ); + + virtual bool initAll( IOFireWireController * control, + UInt32 generation, + FWAddress devAddress, + IOMemoryDescriptor * hostMem, + FWDeviceCallback completion, + void * refcon ); + virtual void free( void ); + + virtual IOReturn reinit( FWAddress devAddress, + IOMemoryDescriptor * hostMem, + FWDeviceCallback completion = NULL, + void * refcon = NULL, + bool failOnReset = false ); + + virtual IOReturn reinit( UInt32 generation, + FWAddress devAddress, + IOMemoryDescriptor * hostMem, + FWDeviceCallback completion = NULL, + void * refcon = NULL ); + + void setDeferredNotify( bool state ) + { ((MemberVariables*)fMembers->fSubclassMembers)->fDeferredNotify = state; }; + + void setFastRetryOnBusy( bool state ) + { ((MemberVariables*)fMembers->fSubclassMembers)->fFastRetryOnBusy = state; }; + +private: + + OSMetaClassDeclareReservedUnused(IOFWWriteCommand, 0); + OSMetaClassDeclareReservedUnused(IOFWWriteCommand, 1); + +}; + +#pragma mark - + +/*! + @class IOFWWriteQuadCommand + @discussion An easier to use version of IOFWWriteCommand for use when the data to be transferred + is small and an integer number of quads. + Note that block read requests will be used for transfers greater than one quad unless setMaxPacket(4) + is called. + kMaxWriteQuads is the largest legal number of quads that this object can be asked to transfer + (the data is copied into an internal buffer in init() and reinit()). +*/ + +class IOFWWriteQuadCommand : public IOFWAsyncCommand +{ + + OSDeclareDefaultStructors(IOFWWriteQuadCommand) + +public: + + enum + { + kMaxWriteQuads = 8 + }; + +protected: + + UInt32 fQuads[kMaxWriteQuads]; + UInt32 * fQPtr; + int fPackSize; + + typedef struct + { + bool fDeferredNotify; + IOMemoryDescriptor * fMemory; + } + MemberVariables; + + virtual void gotPacket( int rcode, const void* data, int size ); + + virtual IOReturn execute(); + + bool createMemberVariables( void ); + void destroyMemberVariables( void ); + +public: + virtual bool initWithController(IOFireWireController *control); + + virtual bool initAll( IOFireWireNub * device, + FWAddress devAddress, + UInt32 * quads, + int numQuads, + FWDeviceCallback completion, + void * refcon, + bool failOnReset ); + + virtual bool initAll( IOFireWireController * control, + UInt32 generation, + FWAddress devAddress, + UInt32 * quads, + int numQuads, + FWDeviceCallback completion, + void * refcon ); + + virtual void free( void ); + + virtual IOReturn reinit( FWAddress devAddress, + UInt32 * quads, + int numQuads, + FWDeviceCallback completion = NULL, + void * refcon = NULL, + bool failOnReset = false ); + + virtual IOReturn reinit( UInt32 generation, + FWAddress devAddress, + UInt32 * quads, + int numQuads, + FWDeviceCallback completion = NULL, + void * refcon = NULL ); + +protected: + + void setQuads( UInt32 * quads, int numQuads ); + bool createMemoryDescriptor( void ); + void destroyMemoryDescriptor( void ); + +public: + + void setDeferredNotify( bool state ) + { ((MemberVariables*)fMembers->fSubclassMembers)->fDeferredNotify = state; }; + +private: + + OSMetaClassDeclareReservedUnused(IOFWWriteQuadCommand, 0); + OSMetaClassDeclareReservedUnused(IOFWWriteQuadCommand, 1); + +}; + +/* + * May need more parameters for some of these, + * and/or derive from a base Lock transaction command + */ + +#pragma mark - + +/*! @class IOFWCompareAndSwapCommand +*/ +class IOFWCompareAndSwapCommand : public IOFWAsyncCommand +{ + OSDeclareDefaultStructors(IOFWCompareAndSwapCommand) + +protected: + UInt32 fInputVals[4]; + UInt32 fOldVal[2]; + + typedef struct + { + IOMemoryDescriptor * fMemory; + } + MemberVariables; + + MemberVariables * fMembers; + + virtual void gotPacket(int rcode, const void* data, int size); + + virtual IOReturn execute(); + +public: + // Compare to cmpVal, and if equal replace with newVal. + // Size = 1 for 32 bit operation (one quad), 2 for 64 bit (two quads) + virtual bool initWithController(IOFireWireController *control); + virtual bool initAll(IOFireWireNub *device, FWAddress devAddress, + const UInt32 *cmpVal, const UInt32 *newVal, int size, + FWDeviceCallback completion, void *refcon, bool failOnReset); + virtual bool initAll(IOFireWireController *control, + UInt32 generation, FWAddress devAddress, + const UInt32 *cmpVal, const UInt32 *newVal, int size, + FWDeviceCallback completion, void *refcon); + + virtual IOReturn reinit(FWAddress devAddress, const UInt32 *cmpVal, const UInt32 *newVal, int size, + FWDeviceCallback completion=NULL, void *refcon=NULL, bool failOnReset=false); + virtual IOReturn reinit(UInt32 generation, FWAddress devAddress, + const UInt32 *cmpVal, const UInt32 *newVal, int size, + FWDeviceCallback completion=NULL, void *refcon=NULL); + + // sets oldVal to the old value returned by the device, and + // returns true if it was the expected value, ie. the lock succeeded + virtual bool locked(UInt32 *oldVal); + + virtual void free( void ); + +protected: + + bool createMemberVariables( void ); + void destroyMemberVariables( void ); + + void setInputVals( const UInt32 * cmpVal, const UInt32 * newVal, int size ); + + bool createMemoryDescriptor( void ); + void destroyMemoryDescriptor( void ); + +private: + OSMetaClassDeclareReservedUnused(IOFWCompareAndSwapCommand, 0); + OSMetaClassDeclareReservedUnused(IOFWCompareAndSwapCommand, 1); + OSMetaClassDeclareReservedUnused(IOFWCompareAndSwapCommand, 2); + OSMetaClassDeclareReservedUnused(IOFWCompareAndSwapCommand, 3); + +}; + +/* + * Send an async stream packet + */ + +#pragma mark - + +/*! @class IOFWAsyncStreamCommand +*/ +class IOFWAsyncStreamCommand : public IOFWCommand +{ + // temporary for debugging: + friend class IOFireWireUserClient ; + + OSDeclareDefaultStructors(IOFWAsyncStreamCommand) + +protected: + FWAsyncStreamCallback fComplete; + void * fRefCon; + IOMemoryDescriptor * fMemDesc; + int fSpeed; + int fSize; + int fCurRetries; + int fMaxRetries; + int fChannel; + int fSyncBits; + int fTag; + UInt32 fGeneration; // bus topology fNodeID is valid for. + bool fFailOnReset; + + typedef struct + { } + MemberVariables; + + MemberVariables * fMembers; + + virtual IOReturn complete( + IOReturn status); + + // To be called by IOFireWireController and derived classes. + virtual IOReturn execute(); + +public: + + virtual bool initAll( + IOFireWireController * control, + UInt32 generation, + UInt32 channel, + UInt32 sync, + UInt32 tag, + IOMemoryDescriptor * hostMem, + UInt32 size, + int speed, + FWAsyncStreamCallback completion, + void * refcon); + + virtual void free( void ); + + virtual IOReturn reinit( UInt32 generation, + UInt32 channel, + UInt32 sync, + UInt32 tag, + IOMemoryDescriptor * hostMem, + UInt32 size, + int speed, + FWAsyncStreamCallback completion, + void * refcon); + + virtual void gotAck( + int ackCode); + // Utility for setting generation on newly created command + virtual void setGeneration( + UInt32 generation) + { fGeneration = generation; } + + + // update nodeID/generation after bus reset, from the device object + IOReturn updateGeneration(); + + bool failOnReset() const + { return fFailOnReset; } + +private: + OSMetaClassDeclareReservedUnused(IOFWAsyncStreamCommand, 0); + OSMetaClassDeclareReservedUnused(IOFWAsyncStreamCommand, 1); + +public: + virtual bool initAll( + IOFireWireController * control, + UInt32 generation, + UInt32 channel, + UInt32 sync, + UInt32 tag, + IOMemoryDescriptor * hostMem, + UInt32 size, + int speed, + FWAsyncStreamCallback completion, + void * refcon, + bool failOnReset ); + + + virtual IOReturn reinit( + UInt32 generation, + UInt32 channel, + UInt32 sync, + UInt32 tag, + IOMemoryDescriptor * hostMem, + UInt32 size, + int speed, + FWAsyncStreamCallback completion, + void * refcon, + bool failOnReset); + + +}; + +/* + * Send an async PHY packet + */ + +#pragma mark - + +/*! @class IOFWAsyncPHYCommand +*/ +class IOFWAsyncPHYCommand : public IOFWCommand +{ + // temporary for debugging: + friend class IOFireWireUserClient; + + OSDeclareDefaultStructors( IOFWAsyncPHYCommand ) + +protected: + AsyncPendingTrans * fTrans; + FWAsyncPHYCallback fComplete; + void * fRefCon; + int fCurRetries; + int fMaxRetries; + UInt32 fGeneration; + bool fFailOnReset; + UInt32 fData1; + UInt32 fData2; + int fAckCode; + UInt32 fResponseCode; + + typedef struct + { } + MemberVariables; + + MemberVariables * fMembers; + + virtual IOReturn complete( + IOReturn status ); + + // To be called by IOFireWireController and derived classes. + virtual IOReturn execute(); + + void setResponseCode( UInt32 rcode ); + void setAckCode( int ack ); + +public: + + virtual bool initAll( + IOFireWireController * control, + UInt32 generation, + UInt32 data1, + UInt32 data2, + FWAsyncPHYCallback completion, + void * refcon, + bool failOnReset ); + virtual void free( void ); + + virtual IOReturn reinit( UInt32 generation, + UInt32 data1, + UInt32 data2, + FWAsyncPHYCallback completion, + void * refcon, + bool failOnReset ); + + virtual void gotAck( + int ackCode ); + + // Utility for setting generation on newly created command + virtual void setGeneration( + UInt32 generation ) + { fGeneration = generation; } + + + // update nodeID/generation after bus reset, from the device object + IOReturn updateGeneration(); + + bool failOnReset() const + { return fFailOnReset; } + + + virtual void gotPacket( int rcode ); + + int getAckCode( void ); + UInt32 getResponseCode( void ) const; + + void setRetries( int retries); +private: + OSMetaClassDeclareReservedUnused(IOFWAsyncPHYCommand, 0); + OSMetaClassDeclareReservedUnused(IOFWAsyncPHYCommand, 1); + OSMetaClassDeclareReservedUnused(IOFWAsyncPHYCommand, 2); + OSMetaClassDeclareReservedUnused(IOFWAsyncPHYCommand, 3); + OSMetaClassDeclareReservedUnused(IOFWAsyncPHYCommand, 4); + OSMetaClassDeclareReservedUnused(IOFWAsyncPHYCommand, 5); + OSMetaClassDeclareReservedUnused(IOFWAsyncPHYCommand, 6); + OSMetaClassDeclareReservedUnused(IOFWAsyncPHYCommand, 7); +}; + +#endif /* _IOKIT_IOFWCOMMAND_H */ diff --git a/i386/include/IOKit/firewire/IOFWDCL.h b/i386/include/IOKit/firewire/IOFWDCL.h new file mode 100644 index 0000000..8919485 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWDCL.h @@ -0,0 +1,346 @@ +/* +* IOFWDCL.h +* IOFireWireFamily +* +* Created by Niels on Fri Feb 21 2003. +* Copyright (c) 2003 Apple Computer, Inc. All rights reserved. +* +* $Log: IOFWDCL.h,v $ +* Revision 1.20 2008/11/14 00:17:11 arulchan +* fix for rdar://5939334 +* +* Revision 1.19 2007/03/14 01:01:12 collin +* *** empty log message *** +* +* Revision 1.18 2007/01/26 23:42:19 ayanowit +* another fix for nuDCL rosetta mode +* +* Revision 1.17 2006/08/16 01:41:41 collin +* *** empty log message *** +* +* Revision 1.16 2006/03/09 22:26:46 niels +* fix 4466075 +* +* Revision 1.15 2006/03/09 22:20:14 niels +* fix 4466075 +* +* Revision 1.14 2006/03/09 21:40:44 niels +* fix 4466075 +* +* Revision 1.13 2006/02/09 00:21:50 niels +* merge chardonnay branch to tot +* +* Revision 1.12.4.1 2005/08/06 01:31:31 collin +* *** empty log message *** +* +* Revision 1.12 2005/02/18 03:19:03 niels +* fix isight +* +* Revision 1.11 2004/04/19 21:51:49 niels +* *** empty log message *** +* +* Revision 1.10 2004/03/25 00:00:23 niels +* fix panic allocating large physical address spaces +* +* Revision 1.9 2003/10/31 02:40:58 niels +* *** empty log message *** +* +* Revision 1.8 2003/08/26 05:11:21 niels +* *** empty log message *** +* +* Revision 1.7 2003/08/25 08:39:15 niels +* *** empty log message *** +* +* Revision 1.6 2003/08/18 23:18:14 niels +* *** empty log message *** +* +* Revision 1.5 2003/08/08 22:30:32 niels +* *** empty log message *** +* +* Revision 1.4 2003/07/30 05:22:14 niels +* *** empty log message *** +* +* Revision 1.3 2003/07/29 22:49:22 niels +* *** empty log message *** +* +* Revision 1.2 2003/07/21 06:52:58 niels +* merge isoch to TOT +* +* Revision 1.1.2.5 2003/07/18 00:17:41 niels +* *** empty log message *** +* +* Revision 1.1.2.4 2003/07/14 22:08:53 niels +* *** empty log message *** +* +* Revision 1.1.2.3 2003/07/11 18:15:33 niels +* *** empty log message *** +* +* Revision 1.1.2.2 2003/07/03 22:10:24 niels +* fix iidc/dv rcv +* +* Revision 1.1.2.1 2003/07/01 20:54:06 niels +* isoch merge +* +*/ + +#import + +#import +#import +#import + +class IODCLProgram ; +class OSIterator ; +class IOFireWireLink ; +class IOMemoryMap ; + +/*! @class IOFWDCL +*/ + +class IOFWDCL : public OSObject +{ + OSDeclareAbstractStructors( IOFWDCL ) ; + + public: + + typedef void (*Callback)( void * refcon ) ; + + enum + { + kDynamic = BIT(1)//kNuDCLDynamic, + ,kUpdateBeforeCallback = BIT(2)//kNuDCLUpdateBeforeCallback + ,kUser = BIT(18) // kNuDCLUser + ,kBigEndianUpdates = BIT(19) // NOTE: Don't change this without making similar change to IOFireWireLib's NuDCL::Export(...)! + } ; + + class InternalData + { + public: + + IOFWDCL * lastBranch ; + } ; + + protected: + + IOFWDCL* fBranch ; + Callback fCallback ; + volatile UInt32 * fTimeStampPtr ; + UInt32 fRangeCount ; + IOVirtualRange * fRanges ; + OSSet* fUpdateList ; + OSIterator * fUpdateIterator ; + volatile UInt32 * fUserStatusPtr ; + void* fRefcon ; + UInt32 fFlags ; + + InternalData * fLoLevel ; + + public: + + // + // IOFWDCL public API: + // + + virtual bool initWithRanges ( + OSSet * updateSet, + unsigned rangesCount = 0, + IOVirtualRange ranges [] = NULL ) ; + + void setBranch( IOFWDCL* branch ) ; + IOFWDCL* getBranch() const ; + void setTimeStampPtr ( UInt32* timeStampPtr ) ; + UInt32* getTimeStampPtr () const ; + void setCallback( Callback callback ) ; + Callback getCallback() const ; + void setStatusPtr( UInt32* statusPtr ) ; + UInt32* getStatusPtr() const ; + void setRefcon( void * refcon ) ; + void * getRefcon() const ; + const OSSet* getUpdateList() const ; + + virtual IOReturn addRange ( IOVirtualRange& range ) ; + virtual IOReturn setRanges ( UInt32 numRanges, IOVirtualRange ranges[] ) ; + virtual UInt32 getRanges( UInt32 maxRanges, IOVirtualRange ranges[] ) const ; + virtual UInt32 countRanges() ; + virtual IOReturn getSpan( IOVirtualRange& result ) const ; + virtual IOByteCount getSize() const ; + IOReturn appendUpdateList( IOFWDCL* updateDCL ) ; + IOReturn setUpdateList( OSSet* updateList ) ; + void emptyUpdateList() ; + void setFlags( UInt32 flags ) ; + UInt32 getFlags() const ; + + + virtual void update() = 0 ; + + // OSObject + + virtual void free () ; + + public: + + // + // internal use only; please don't use... + // + + virtual IOReturn compile( IODCLProgram & , bool & ) = 0 ; + virtual void link () = 0 ; + + OSMetaClassDeclareReservedUnused ( IOFWDCL, 4 ) ; // used to be relink() + + public : + virtual bool interrupt( bool &, IOFWDCL * & ) = 0 ; + virtual void finalize ( IODCLProgram & ) ; + virtual IOReturn importUserDCL ( + UInt8 * data, + IOByteCount & dataSize, + IOMemoryMap * bufferMap, + const OSArray * dcl ) ; + + protected : + + friend class IOFWDCLFriend ; + + public : + + // dump DCL info... + virtual void debug() ; + + public: + + // + // internal use only; please don't use... + // + + virtual bool checkForInterrupt() = 0 ; + + OSMetaClassDeclareReservedUsed ( IOFWDCL, 0 ) ; + OSMetaClassDeclareReservedUnused ( IOFWDCL, 1 ) ; + OSMetaClassDeclareReservedUnused ( IOFWDCL, 2 ) ; + OSMetaClassDeclareReservedUnused ( IOFWDCL, 3 ) ; +// OSMetaClassDeclareReservedUnused ( ***, 4 ) ; // used above + +} ; + +#pragma mark - + +/*! @class IOFWReceiveDCL +*/ + +class IOFWReceiveDCL : public IOFWDCL +{ + OSDeclareAbstractStructors( IOFWReceiveDCL ) + + protected : + + UInt8 fHeaderBytes ; + bool fWait ; + + public: + + // me + virtual bool initWithParams( + OSSet * updateSet, + UInt8 headerBytes, + unsigned rangesCount, + IOVirtualRange ranges [] ) ; + IOReturn setWaitControl( bool wait ) ; + + public : + + // internal use only: + virtual IOReturn importUserDCL ( + UInt8 * data, + IOByteCount & dataSize, + IOMemoryMap * bufferMap, + const OSArray * dcl ) ; + + protected : + + virtual void debug() ; + +} ; + +#pragma mark - + +/*! @class IOFWSendDCL +*/ + +class IOFWSendDCL : public IOFWDCL +{ + OSDeclareAbstractStructors( IOFWSendDCL ) + + protected: + + UInt32 * fUserHeaderPtr ; // pointer to 2 quadlets containing isoch header for this packet + UInt32 * fUserHeaderMaskPtr ; // pointer to 2 quadlets; used to mask header quadlets + IOFWDCL * fSkipBranchDCL ; + Callback fSkipCallback ; + void * fSkipRefcon ; + UInt8 fSync ; + UInt8 fTag ; + + public: + + // OSObject + virtual void free() ; + + // IOFWDCL + virtual IOReturn addRange ( IOVirtualRange& range ) ; + virtual IOReturn setRanges ( UInt32 numRanges, IOVirtualRange ranges[] ) ; + + // me + virtual bool initWithParams( OSSet * updateSet, + unsigned rangesCount = 0, + IOVirtualRange ranges [] = NULL, + UInt8 sync = 0, + UInt8 tag = 0 ) ; + + void setUserHeaderPtr( UInt32* userHeaderPtr, UInt32 * maskPtr ) ; + UInt32 * getUserHeaderPtr() ; + UInt32 * getUserHeaderMask() ; + void setSkipBranch( IOFWDCL * skipBranchDCL ) ; + IOFWDCL * getSkipBranch() const ; + void setSkipCallback( Callback callback ) ; + Callback getSkipCallback() const ; + void setSkipRefcon( void * refcon = 0 ) ; + void * getSkipRefcon() const ; + void setSync( UInt8 sync ) ; + UInt8 getSync() const ; + void setTag( UInt8 tag ) ; + UInt8 getTag() const ; + + public : + + // internal use only: + virtual IOReturn importUserDCL ( + UInt8 * data, + IOByteCount & dataSize, + IOMemoryMap * bufferMap, + const OSArray * dcl ) ; + protected : + + virtual void debug() ; +} ; + +#pragma mark - + +/*! @class IOFWSkipCycleDCL +*/ + +class IOFWSkipCycleDCL : public IOFWDCL +{ + OSDeclareAbstractStructors( IOFWSkipCycleDCL ) + + public: + + virtual bool init() ; + + virtual IOReturn addRange ( IOVirtualRange& range ) ; + virtual IOReturn setRanges ( UInt32 numRanges, IOVirtualRange ranges[] ) ; + virtual IOReturn getSpan( IOVirtualRange& result ) ; + + protected : + + virtual void debug() ; +} ; diff --git a/i386/include/IOKit/firewire/IOFWDCLPool.h b/i386/include/IOKit/firewire/IOFWDCLPool.h new file mode 100644 index 0000000..005b62a --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWDCLPool.h @@ -0,0 +1,160 @@ +/* + * IOFWNuDCLPool.h + * IOFireWireFamily + * + * Created by Niels on Fri Mar 07 2003. + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * + * $Log: IOFWDCLPool.h,v $ + * Revision 1.15 2008/11/14 00:17:12 arulchan + * fix for rdar://5939334 + * + * Revision 1.14 2008/03/03 23:31:42 ayanowit + * another gcc-42 fix. + * + * Revision 1.13 2007/01/26 20:52:31 ayanowit + * changes to user-space isoch stuff to support 64-bit apps. + * + * Revision 1.12 2006/02/09 00:21:50 niels + * merge chardonnay branch to tot + * + * Revision 1.11 2005/04/12 20:09:13 niels + * fix memory leak importing NuDCL programs from user space + * + * Revision 1.10.20.2 2006/01/31 04:49:50 collin + * *** empty log message *** + * + * Revision 1.10 2003/11/07 21:24:28 niels + * *** empty log message *** + * + * Revision 1.9 2003/11/07 21:01:18 niels + * *** empty log message *** + * + * Revision 1.8 2003/08/25 08:39:15 niels + * *** empty log message *** + * + * Revision 1.7 2003/08/22 18:15:16 niels + * *** empty log message *** + * + * Revision 1.6 2003/08/15 04:36:55 niels + * *** empty log message *** + * + * Revision 1.5 2003/07/30 05:22:14 niels + * *** empty log message *** + * + * Revision 1.4 2003/07/21 08:48:20 niels + * *** empty log message *** + * + * Revision 1.3 2003/07/21 07:52:13 niels + * *** empty log message *** + * + * Revision 1.2 2003/07/21 06:52:58 niels + * merge isoch to TOT + * + * Revision 1.1.2.3 2003/07/11 18:15:34 niels + * *** empty log message *** + * + * Revision 1.1.2.2 2003/07/09 21:24:00 niels + * *** empty log message *** + * + * Revision 1.1.2.1 2003/07/01 20:54:06 niels + * isoch merge + * + */ + +#import +#import +#import + +class IOFireWireLink ; +class IOFWDCL ; +class IOFWReceiveDCL ; +class IOFWSendDCL ; +class IOFWSkipCycleDCL ; +class IOFireWireUserClient ; +class IOMemoryDescriptor ; +class IOMemoryMap ; +class OSSet; + +/*! @class IOFWDCLPool + @discussion You should never subclass IOFWDCLPool +*/ + +class IOFWDCLPool : public OSObject +{ + OSDeclareAbstractStructors( IOFWDCLPool ) + + friend class IOFireWireUserClient ; + friend class IOFWUserLocalIsochPort ; + + protected: + + class Expansion* fReserved ; // for class expansion + + IOFireWireLink * fLink ; + UInt8 fCurrentTag ; + UInt8 fCurrentSync ; + OSArray* fProgram ; + DCLNuDCLLeader fLeader ; + + public: + + // OSObject + + virtual void free() ; + + // me + + virtual bool initWithLink ( IOFireWireLink& link, UInt32 capacity ) ; + + virtual void setCurrentTagAndSync ( UInt8 tag, UInt8 sync ) ; + + virtual IOFWReceiveDCL* appendReceiveDCL ( + OSSet * updateSet, + UInt8 headerBytes, + UInt32 rangesCount, + IOVirtualRange ranges[] ) ; + virtual IOFWSendDCL* appendSendDCL ( + OSSet * updateSet, + UInt32 rangesCount, + IOVirtualRange ranges[] ) ; + virtual IOFWSkipCycleDCL* appendSkipCycleDCL () ; + virtual const OSArray * getProgramRef () const ; + + protected : + + IOReturn importUserProgram ( + IOMemoryDescriptor * userExportDesc, + unsigned bufferRangeCount, + IOAddressRange bufferRanges[], + IOMemoryMap * bufferMap ) ; + IOReturn importUserDCL( + IOFWDCL * dcl, + void * importData, + IOByteCount & dataSize, + IOMemoryMap * bufferMap ) ; + + + protected : + + virtual IOFWReceiveDCL * allocReceiveDCL () = 0 ; + virtual IOFWSendDCL * allocSendDCL () = 0 ; + virtual IOFWSkipCycleDCL * allocSkipCycleDCL () = 0 ; + + private : + + void appendDCL( IOFWDCL * dcl ) ; + + public : + + DCLCommand * getProgram() ; + + OSMetaClassDeclareReservedUnused ( IOFWDCLPool, 0); + OSMetaClassDeclareReservedUnused ( IOFWDCLPool, 1); + OSMetaClassDeclareReservedUnused ( IOFWDCLPool, 2); + OSMetaClassDeclareReservedUnused ( IOFWDCLPool, 3); + OSMetaClassDeclareReservedUnused ( IOFWDCLPool, 4); + OSMetaClassDeclareReservedUnused ( IOFWDCLPool, 5); + OSMetaClassDeclareReservedUnused ( IOFWDCLPool, 6); + OSMetaClassDeclareReservedUnused ( IOFWDCLPool, 7); +} ; diff --git a/i386/include/IOKit/firewire/IOFWDCLProgram.h b/i386/include/IOKit/firewire/IOFWDCLProgram.h new file mode 100644 index 0000000..cf91f06 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWDCLProgram.h @@ -0,0 +1,133 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_IOFWDCLPROGRAM_H +#define _IOKIT_IOFWDCLPROGRAM_H + +#include +#include +#include +#include + +/*! @class IODCLProgram +*/ +class IODCLProgram : public OSObject +{ + OSDeclareAbstractStructors(IODCLProgram) + + private : + + void * reserved0 ;//fDCLTaskToKernel; + void * reserved1 ;//fDataTaskToKernel; + void * reserved2 ;//fDataBase; + void * reserved3 ;// IOMemoryDescriptor * fDCLDesc; + IOMemoryMap * fBufferMem ; + void * reserved5 ;// IOMemoryCursor * fDataCursor; + + protected: + + /*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData + { + IOFWIsochResourceFlags resourceFlags ; + }; + + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * fExpansionData ; + + public : + + virtual void setIsochResourceFlags ( IOFWIsochResourceFlags flags ) ; // formerly getPhysicalSegs() + IOFWIsochResourceFlags getIsochResourceFlags () const ; + + protected: + + virtual void free () ; + + public: + + virtual bool init ( IOFireWireBus::DCLTaskInfo * info = NULL ) ; + virtual IOReturn allocateHW ( + IOFWSpeed speed, + UInt32 chan) = 0; + virtual IOReturn releaseHW () = 0; + virtual IOReturn compile ( + IOFWSpeed speed, + UInt32 chan) = 0; + virtual IOReturn notify ( + IOFWDCLNotificationType notificationType, + DCLCommand ** dclCommandList, + UInt32 numDCLCommands ) = 0; + virtual IOReturn start () = 0; + virtual void stop () = 0; + virtual IOReturn pause (); + virtual IOReturn resume (); + + virtual void setForceStopProc( + IOFWIsochChannel::ForceStopNotificationProc proc, + void * refCon, + IOFWIsochChannel * channel ) ; + protected : + + void generateBufferMap( DCLCommand * program ) ; + IOReturn virtualToPhysical( + IOVirtualRange ranges[], + unsigned rangeCount, + IOMemoryCursor::IOPhysicalSegment outSegments[], + unsigned & outPhysicalSegmentCount, + unsigned maxSegments ) ; + + public : + + IOMemoryMap * getBufferMap() const ; + + public : + + // close/open isoch workloop gate... + // clients should not need to call these. + virtual void closeGate() = 0 ; + virtual void openGate() = 0 ; + + virtual IOReturn synchronizeWithIO() = 0 ; + + private: + + OSMetaClassDeclareReservedUsed(IODCLProgram, 0); + OSMetaClassDeclareReservedUsed(IODCLProgram, 1); + OSMetaClassDeclareReservedUnused(IODCLProgram, 2); + OSMetaClassDeclareReservedUnused(IODCLProgram, 3); + OSMetaClassDeclareReservedUnused(IODCLProgram, 4); + +}; + +#endif /* ! _IOKIT_IOFWDCLPROGRAM_H */ + diff --git a/i386/include/IOKit/firewire/IOFWDCLTranslator.h b/i386/include/IOKit/firewire/IOFWDCLTranslator.h new file mode 100644 index 0000000..e02067c --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWDCLTranslator.h @@ -0,0 +1,114 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. + * + * A DCL program to interpret (in software) a program that's too complicated + * for the DMA engine. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_IOFWDCLTRANSLATOR_H +#define _IOKIT_IOFWDCLTRANSLATOR_H + +#include +#include + + +/*! @class IODCLTranslator +*/ + +class IODCLTranslator : public IODCLProgram +{ + OSDeclareAbstractStructors(IODCLTranslator) + +protected: + enum + { + kNumPingPongs = 2, + kNumPacketsPerPingPong = 500, + kMaxIsochPacketSize = 1000, + kPingPongBufferSize = kNumPingPongs * kNumPacketsPerPingPong * kMaxIsochPacketSize + }; + + // Opcodes and buffer for pingpong program + DCLLabel fStartLabel; + DCLTransferPacket fTransfers[kNumPingPongs*kNumPacketsPerPingPong]; + DCLCallProc fCalls[kNumPingPongs]; + DCLJump fJumpToStart; + UInt8 fBuffer[kPingPongBufferSize]; + + IODCLProgram * fHWProgram; // Hardware program executing our opcodes + DCLCommand* fToInterpret; // The commands to interpret + DCLCommand* fCurrentDCLCommand; // Current command to interpret + int fPingCount; // Are we pinging or ponging? + UInt32 fPacketHeader; + + static void ListeningDCLPingPongProc(DCLCommand* pDCLCommand); + static void TalkingDCLPingPongProc(DCLCommand* pDCLCommand); + +public: + virtual bool init(DCLCommand* toInterpret); + virtual IOReturn allocateHW(IOFWSpeed speed, UInt32 chan); + virtual IOReturn releaseHW(); + virtual IOReturn notify(IOFWDCLNotificationType notificationType, + DCLCommand** dclCommandList, UInt32 numDCLCommands); + virtual void stop(); + + DCLCommand* getTranslatorOpcodes(); + void setHWProgram(IODCLProgram *program); +}; + +/*! @class IODCLTranslateTalk +*/ + +class IODCLTranslateTalk : public IODCLTranslator +{ + OSDeclareDefaultStructors(IODCLTranslateTalk) + +protected: + +public: + virtual IOReturn compile(IOFWSpeed speed, UInt32 chan); + virtual IOReturn start(); + +}; + +/*! @class IODCLTranslateListen +*/ + +class IODCLTranslateListen : public IODCLTranslator +{ + OSDeclareDefaultStructors(IODCLTranslateListen) + +protected: + +public: + virtual IOReturn compile(IOFWSpeed speed, UInt32 chan); + virtual IOReturn start(); + +}; +#endif /* ! _IOKIT_IOFWDCLPROGRAM_H */ + diff --git a/i386/include/IOKit/firewire/IOFWIsochChannel.h b/i386/include/IOKit/firewire/IOFWIsochChannel.h new file mode 100644 index 0000000..4bbd6c8 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWIsochChannel.h @@ -0,0 +1,132 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_IOFWISOCHCHANNEL_H +#define _IOKIT_IOFWISOCHCHANNEL_H + +#include +#include + +enum +{ + kFWIsochChannelUnknownCondition = 0, + kFWIsochChannelNotEnoughBandwidth = 1, + kFWIsochChannelChannelNotAvailable = 2 +}; + +class IOFireWireController; +class IOFWIsochChannel; +class IOFWIsochPort; +class OSSet; +class IOFWReadQuadCommand; +class IOFWCompareAndSwapCommand; + +/*! @class IOFWIsochChannel +*/ +class IOFWIsochChannel : public OSObject +{ + OSDeclareDefaultStructors(IOFWIsochChannel) + + public: + + typedef IOReturn (ForceStopNotificationProc)(void* refCon, IOFWIsochChannel* channel, UInt32 stopCondition ); + +protected: + IOFireWireController * fControl; + ForceStopNotificationProc* fStopProc; + void * fStopRefCon; + IOFWIsochPort * fTalker; + OSSet * fListeners; + bool fDoIRM; + UInt32 fBandwidth; // Allocation units used + UInt32 fPacketSize; + IOFWSpeed fPrefSpeed; + IOFWSpeed fSpeed; // Actual speed used + UInt32 fChannel; // Actual channel used + IOFWReadQuadCommand * fReadCmd; + IOFWCompareAndSwapCommand * fLockCmd; + UInt32 fGeneration; // When bandwidth was allocated + + IOLock * fLock; + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + static void threadFunc( void * arg ); + + virtual IOReturn updateBandwidth(bool claim); + virtual void reallocBandwidth( UInt32 generation ); + virtual void free(); + +public: + // Called from IOFireWireController + virtual bool init( IOFireWireController *control, bool doIRM, UInt32 packetSize, + IOFWSpeed prefSpeed, ForceStopNotificationProc* stopProc, + void *stopRefCon ); + virtual void handleBusReset(); + + // Called by clients + virtual IOReturn setTalker(IOFWIsochPort *talker); + virtual IOReturn addListener(IOFWIsochPort *listener); + + virtual IOReturn allocateChannel(); + virtual IOReturn releaseChannel(); + virtual IOReturn start(); + virtual IOReturn stop(); + +protected: + // handles IRM and channel determination and allocation. + // called by both user and kernel isoch channels + IOReturn allocateChannelBegin( IOFWSpeed speed, UInt64 allowedChans, UInt32 * channel = NULL ) ; + + // handles IRM and channel allocation. + // called by both user and kernel isoch channels + IOReturn releaseChannelComplete() ; + + IOReturn checkMemoryInRange( IOMemoryDescriptor * memory ); + +private: + OSMetaClassDeclareReservedUnused(IOFWIsochChannel, 0); + OSMetaClassDeclareReservedUnused(IOFWIsochChannel, 1); + OSMetaClassDeclareReservedUnused(IOFWIsochChannel, 2); + OSMetaClassDeclareReservedUnused(IOFWIsochChannel, 3); + +}; + +typedef IOFWIsochChannel::ForceStopNotificationProc FWIsochChannelForceStopNotificationProc ; +typedef IOFWIsochChannel::ForceStopNotificationProc* FWIsochChannelForceStopNotificationProcPtr ; + +#endif /* ! _IOKIT_IOFWISOCHCHANNEL_H */ + diff --git a/i386/include/IOKit/firewire/IOFWIsochPort.h b/i386/include/IOKit/firewire/IOFWIsochPort.h new file mode 100644 index 0000000..793c5e9 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWIsochPort.h @@ -0,0 +1,66 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. + * + * IOFWIsochPort is an abstract object that represents hardware on the bus + * (locally or remotely) that sends or receives isochronous packets. + * Local ports are implemented by the local device driver, + * Remote ports are implemented by the driver for the remote device. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_IOFWISOCHPORT_H +#define _IOKIT_IOFWISOCHPORT_H + +#include +#include + +/*! @class IOFWIsochPort +*/ + +class IOFWIsochPort : public OSObject +{ + OSDeclareAbstractStructors(IOFWIsochPort) + +public: + // Return maximum speed and channels supported + // (bit n set = chan n supported) + virtual IOReturn getSupported(IOFWSpeed &maxSpeed, UInt64 &chanSupported) = 0; + + // Allocate hardware resources for port + virtual IOReturn allocatePort(IOFWSpeed speed, UInt32 chan) = 0; + virtual IOReturn releasePort() = 0; // Free hardware resources + virtual IOReturn start() = 0; // Start port processing packets + virtual IOReturn stop() = 0; // Stop processing packets + +private: + OSMetaClassDeclareReservedUnused(IOFWIsochPort, 0); + OSMetaClassDeclareReservedUnused(IOFWIsochPort, 1); + +}; + +#endif /* ! _IOKIT_IOFWISOCHPORT_H */ + diff --git a/i386/include/IOKit/firewire/IOFWLocalIsochPort.h b/i386/include/IOKit/firewire/IOFWLocalIsochPort.h new file mode 100644 index 0000000..493f719 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWLocalIsochPort.h @@ -0,0 +1,135 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. + * + * IOFWIsochPort is an abstract object that represents hardware on the bus + * (locally or remotely) that sends or receives isochronous packets. + * Local ports are implemented by the local device driver, + * Remote ports are implemented by the driver for the remote device. + * + * HISTORY + * + * $Log: IOFWLocalIsochPort.h,v $ + * Revision 1.10 2004/06/10 20:57:36 niels + * *** empty log message *** + * + * Revision 1.9 2003/08/30 00:16:44 collin + * *** empty log message *** + * + * Revision 1.8 2003/08/15 04:36:55 niels + * *** empty log message *** + * + * Revision 1.7 2003/07/29 22:49:22 niels + * *** empty log message *** + * + * Revision 1.6 2003/07/21 06:52:58 niels + * merge isoch to TOT + * + * Revision 1.5.14.1 2003/07/01 20:54:07 niels + * isoch merge + * + */ + + +#ifndef _IOKIT_IOFWLOCALISOCHPORT_H +#define _IOKIT_IOFWLOCALISOCHPORT_H + +#import +#import + +class IOFireWireController; +class IODCLProgram; + +/*! @class IOFWLocalIsochPort +*/ +class IOFWLocalIsochPort : public IOFWIsochPort +{ + OSDeclareDefaultStructors(IOFWLocalIsochPort) + + protected: + + IOFireWireController * fControl; + IODCLProgram * fProgram; + + /*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData + { + } ; + + ExpansionData * fExpansion ; + + protected : + + virtual void free ( void ) ; + + public: + + virtual bool init ( + IODCLProgram * program, + IOFireWireController * control ) ; + + // Return maximum speed and channels supported + // (bit n set = chan n supported) + virtual IOReturn getSupported ( + IOFWSpeed & maxSpeed, + UInt64 & chanSupported ) ; + + // Allocate hardware resources for port + virtual IOReturn allocatePort ( + IOFWSpeed speed, + UInt32 chan ) ; + virtual IOReturn releasePort ( void ) ; // Free hardware resources + virtual IOReturn start ( void ) ; // Start port processing packets + virtual IOReturn stop ( void ) ; // Stop processing packets + + /*! @function notify + @abstract Informs hardware of a change to the DCL program. + @param notificationType Type of change. + @param dclCommandList List of DCL commands that have been changed. + @param numDCLCommands Number of commands in list. + @result IOKit error code. */ + virtual IOReturn notify( + IOFWDCLNotificationType notificationType, + DCLCommand ** dclCommandList, + UInt32 numDCLCommands ) ; + static void printDCLProgram ( + const DCLCommand * dcl, + UInt32 count = 0, + void (*printFN)( const char *format, ...) = NULL, + unsigned lineDelayMS = 0 ) ; + IOReturn setIsochResourceFlags ( + IOFWIsochResourceFlags flags ) ; + IODCLProgram * getProgramRef() const ; + + IOReturn synchronizeWithIO() ; + + private: + + OSMetaClassDeclareReservedUnused ( IOFWLocalIsochPort, 0 ) ; + OSMetaClassDeclareReservedUnused ( IOFWLocalIsochPort, 1 ) ; +}; + +#endif /* ! _IOKIT_IOFWLOCALISOCHPORT_H */ + diff --git a/i386/include/IOKit/firewire/IOFWPHYPacketListener.h b/i386/include/IOKit/firewire/IOFWPHYPacketListener.h new file mode 100644 index 0000000..ea2c6ff --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWPHYPacketListener.h @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2007 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOFWPHYPACKETLISTENER_H_ +#define _IOFWPHYPACKETLISTENER_H_ + +#include + +class IOFireWireController; + +// Callback when phy packet is received +typedef void (*FWPHYPacketCallback)( void *refcon, UInt32 data1, UInt32 data2 ); + +/*! @class IOFWPHYPacketListener +*/ + +class IOFWPHYPacketListener : public OSObject +{ + OSDeclareDefaultStructors( IOFWPHYPacketListener ); + + friend class IOFireWireController; + +protected: + + IOFireWireController * fControl; + FWPHYPacketCallback fCallback; + void * fRefCon; + + static IOFWPHYPacketListener * createWithController( IOFireWireController * controller ); + + virtual bool initWithController( IOFireWireController * control ); + virtual void free( void ); + +public: + + virtual IOReturn activate( void ); + virtual void deactivate( void ); + + virtual void setCallback( FWPHYPacketCallback callback ); + virtual void setRefCon( void * refcon ); + virtual void * getRefCon( void ); + +protected: + virtual void processPHYPacket( UInt32 data1, UInt32 data2 ); + + OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 0 ); + OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 1 ); + OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 2 ); + OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 3 ); + OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 4 ); + OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 5 ); + OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 6 ); + OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 7 ); + OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 8 ); + OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 9 ); +}; + +#endif \ No newline at end of file diff --git a/i386/include/IOKit/firewire/IOFWPhysicalAddressSpace.h b/i386/include/IOKit/firewire/IOFWPhysicalAddressSpace.h new file mode 100644 index 0000000..b1944f4 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWPhysicalAddressSpace.h @@ -0,0 +1,263 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOFWPHYSICALADDRESSSPACE_H +#define _IOKIT_IOFWPHYSICALADDRESSSPACE_H + +#include +#include + +/* + * Direct physical memory <-> FireWire address. + * Accesses to these addresses may be handled automatically by the + * hardware without notification. + * + * The 64 bit FireWire address of (32 bit) physical addr xxxx:xxxx is hostNode:0000:xxxx:xxxx + */ + +class IOFWPhysicalAddressSpace; + +struct FWSegment +{ + FWAddress address; + UInt32 length; +}; + +#pragma mark - + +/*! + @class IOFWPhysicalAddressSpaceAux +*/ + +class IOFWPhysicalAddressSpaceAux : public IOFWAddressSpaceAux +{ + OSDeclareDefaultStructors(IOFWPhysicalAddressSpaceAux) + + friend class IOFWAddressSpace; + friend class IOFWPhysicalAddressSpace; + +protected: + + /*! + @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + + struct ExpansionData { }; + + /*! + @var reserved + Reserved for future use. (Internal use only) + */ + + ExpansionData *reserved; + + IODMACommand * fDMACommand; + bool fDMACommandPrepared; + +public: + virtual bool init( IOFWAddressSpace * primary ); + virtual void free(); + + void setDMACommand( IODMACommand * dma_command ); + IODMACommand * getDMACommand( void ); + UInt64 getPhysicalSegment( UInt64 offset, UInt64 * length ); + + IOReturn prepare( void ); + IOReturn synchronize( IOOptionBits options ); + IOReturn complete( void ); + + bool isPrepared( void ); + + IOReturn getSegments( UInt64 * offset, FWSegment * fw_segments, UInt32 * num_segments ); + +private: + OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 0); + OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 1); + OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 2); + OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 3); + OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 4); + OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 5); + OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 6); + OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 7); + OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 8); + OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 9); + +}; + +#pragma mark - + +/*! + @class IOFWPhysicalAddressSpace +*/ + +class IOFWPhysicalAddressSpace : public IOFWAddressSpace +{ + OSDeclareDefaultStructors(IOFWPhysicalAddressSpace) + + friend class IOFWPhysicalAddressSpaceAux; + +protected: + + IOMemoryDescriptor * fMem; // unused + vm_size_t fLen; // unused + + virtual void free(); + +public: + +/*! @function init + @abstract Initialize physical address space. + @param bus Points to IOFireWireBus object. + @result returns true if success, else false */ + virtual bool init( IOFireWireBus * bus ); + +/*! @function initWithDesc + @abstract Initialize physical address space with IOMemoryDescriptor. + @param bus Points to IOFireWireBus object. + @param mem Points to IOMemoryDescriptor. + @result returns true if success, else false */ + virtual bool initWithDesc(IOFireWireBus *bus, + IOMemoryDescriptor *mem); + +/*! @function doRead + @abstract A method for processing an address space read request + @param nodeID FireWire Read from nodeID. + @param speed at this 'speed'. + @param addr with FireWire address 'addr'. + @param len read 'len' bytes from nodeID. + @param buf points to a memory descriptor containing the packet data. + @param offset start from this 'offset' in 'buf'. + @param refcon Can be queried for extra info about the request. + @result UIn32 returns kFWResponseComplete on success */ + virtual UInt32 doRead(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, + IOMemoryDescriptor **buf, IOByteCount * offset, + IOFWRequestRefCon refcon); + +/*! @function doWrite + @abstract A method for processing an address space write request + @param nodeID FireWire Write to nodeID. + @param speed at this 'speed'. + @param addr with FireWire address 'addr'. + @param len write 'len' bytes to nodeID. + @param buf obtain bytes from location given by 'buf'. + @param reqrefcon Can be queried for extra info about the request. + @result UIn32 returns kFWResponseComplete on success */ + virtual UInt32 doWrite(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, + const void *buf, IOFWRequestRefCon refcon); + +/*! @function getMemoryDescriptor + @abstract Gets the memory descriptor, which is associated to this + PhysicalAddressSpace. + @param none. + @result returns the IOMemoryDescriptor */ + IOMemoryDescriptor * getMemoryDescriptor( void ); + +/*! @function setMemoryDescriptor + @abstract Sets the memory descriptor, which will be associated to this + PhysicalAddressSpace. + @param none. + @result returns the IOMemoryDescriptor */ + IOReturn setMemoryDescriptor( IOMemoryDescriptor * descriptor ); + +/*! @function getLength + @abstract Get the length of the memory backed by PhysicalAddressSpace. + @param none. + @result returns the length */ + UInt64 getLength( void ); + +/*! @function setDMACommand + @abstract Set the DMACommand for this PhysicalAddressSpace. + @param dma_command Points to IODMACommand object. + @result none */ + inline void setDMACommand( IODMACommand * dma_command ) + { ((IOFWPhysicalAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->setDMACommand( dma_command ); }; + +/*! @function getDMACommand + @abstract Get the DMACommand from this PhysicalAddressSpace. + @param none. + @result return previously assigned IODMACommand, null if not initialized */ + inline IODMACommand * getDMACommand( void ) + { return ((IOFWPhysicalAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->getDMACommand(); }; + +/*! @function initWithDMACommand + @abstract Initialize physical address space with IODMACommand. + @param bus Points to IOFireWireBus object. + @param command Points to IODMACommand. + @result returns true if success, else false */ + virtual bool initWithDMACommand( IOFireWireBus * control, IODMACommand * command ); + +/*! @function prepare + @abstract Prepare the IODMACommand used by this PhysicalAddressSpace. + @param none. + @result returns kIOReturnSuccess on success */ + inline IOReturn prepare( void ) + { return ((IOFWPhysicalAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->prepare(); }; + +/*! @function synchronize + @abstract synchronize the IODMACommand used by this PhysicalAddressSpace. + @param none. + @result returns kIOReturnSuccess on success */ + inline IOReturn synchronize( IOOptionBits options ) + { return ((IOFWPhysicalAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->synchronize( options ); }; + +/*! @function complete + @abstract complete the IODMACommand used by this PhysicalAddressSpace. + @param none. + @result returns kIOReturnSuccess on success */ + inline IOReturn complete( void ) + { return ((IOFWPhysicalAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->complete(); }; + +/*! @function isPrepared + @abstract Inspects whether the IODMACommand was prepared in this PhysicalAddressSpace. + @param none. + @result returns true if prepared, else false */ + inline bool isPrepared( void ) + { return ((IOFWPhysicalAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->isPrepared(); }; + +/*! @function getSegments + @abstract Returns the scatter gather list of memory segments from the IODMACommand + used in this PhysicalAddressSpace. + @param offset input/output parameter, defines the starting and ending offset in the memory + descriptor, relative to any offset passed to the prepare() method. + FWSegment Points to an array of memory segments. + num_segments Size of the FWSegment array. + @result returns kIOReturnSuccess on success */ + inline IOReturn getSegments( UInt64 * offset, FWSegment * fw_segments, UInt32 * num_segments ) + { return ((IOFWPhysicalAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->getSegments( offset, fw_segments, num_segments ); }; + +/*! @function checkMemoryInRange + @abstract Validates the IOMemoryDescriptor, which is used to initialize the PhysicalAddressSpace. + @param memory Points to a valid IOMemoryDescriptor. + @result returns kIOReturnSuccess on success */ + IOReturn checkMemoryInRange( IOMemoryDescriptor * memory ); + +protected: + + UInt64 getPhysicalSegment( UInt64 offset, UInt64 * length ) + { return ((IOFWPhysicalAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->getPhysicalSegment( offset, length); }; + + virtual IOFWAddressSpaceAux * createAuxiliary( void ); + +}; + +#endif diff --git a/i386/include/IOKit/firewire/IOFWPseudoAddressSpace.h b/i386/include/IOKit/firewire/IOFWPseudoAddressSpace.h new file mode 100644 index 0000000..02c2c30 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWPseudoAddressSpace.h @@ -0,0 +1,370 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOFWPSEUDOADDRESSSPACE_H +#define _IOKIT_IOFWPSEUDOADDRESSSPACE_H + +#include + +/* + * If installed, this callback is invoked for drivers which + * would like to coalesce incoming writes and do batch processing + * of incoming block write packets. + * This callback can be installed by calling setARxReqIntCompleteHandler + * method in IOFWPseudoAddressSpace object. + */ +typedef void (*IOFWARxReqIntCompleteHandler)( void * refcon ); + +/* + * Pseudo firewire addresses usually represent emulated registers of some kind. + * Accesses to these addresses will result in the owner being notified. + * + * Virtual addresses should not have zero as the top 16 bits of the 48 bit local address, + * since that may look like a physical address to hardware (eg. OHCI). + * if reader is NULL then reads will not be allowed. + * if writer is NULL then writes will not be allowed. + * if either is NULL then lock requests will not be allowed. + * refcon is passed back as the first argument of read and write callbacks. + */ + +class IOFWPseudoAddressSpace; + +#pragma mark - + +/*! + @class IOFWPseudoAddressSpaceAux +*/ + +class IOFWPseudoAddressSpaceAux : public IOFWAddressSpaceAux +{ + OSDeclareDefaultStructors(IOFWPseudoAddressSpaceAux) + + friend class IOFWAddressSpace; + friend class IOFWPseudoAddressSpace; + friend class IOFireWireController; + +protected: + + struct MemberVariables + { + IOFWARxReqIntCompleteHandler fARxReqIntCompleteHandler; + void * fARxReqIntCompleteHandlerRefcon; + }; + + MemberVariables * fMembers; + +public: + + virtual bool init( IOFWAddressSpace * primary ); + virtual void free(); + +protected: + + bool createMemberVariables( void ); + void destroyMemberVariables( void ); + + virtual void handleARxReqIntComplete(); + +public: + +/*! @function setARxReqIntCompleteHandler + @abstract Installs a callback to receive notification, when FWIM has completed + ARxReqInt processing and no incoming packets are left in the queue. + @param refcon Client's callback object. + @param handler Client callback to be invoked, at the end of interrupt processing. + @result none. */ + virtual void setARxReqIntCompleteHandler( void * refcon, IOFWARxReqIntCompleteHandler handler ); + + virtual bool intersects( IOFWAddressSpace * space ); + +private: + + OSMetaClassDeclareReservedUsed(IOFWPseudoAddressSpaceAux, 0); + OSMetaClassDeclareReservedUsed(IOFWPseudoAddressSpaceAux, 1); + OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpaceAux, 2); + OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpaceAux, 3); + OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpaceAux, 4); + OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpaceAux, 5); + OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpaceAux, 6); + OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpaceAux, 7); + OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpaceAux, 8); + OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpaceAux, 9); + +}; + +/*! + @class IOFWPseudoAddressSpace +*/ + +class IOFWPseudoAddressSpace : public IOFWAddressSpace +{ + OSDeclareDefaultStructors(IOFWPseudoAddressSpace) + + friend class IOFWPseudoAddressSpaceAux; + friend class IOFireWireController; + +protected: + + IOMemoryDescriptor* fDesc; + void * fRefCon; + FWReadCallback fReader; + FWWriteCallback fWriter; + FWAddress fBase; + UInt32 fLen; + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + static OSData * allocatedAddresses; // unused + + virtual void free(); + +public: + +/*! @function simpleReader + @abstract A method for processing an address space read request + @param refcon Client's callback object. + @param nodeID FireWire Read from nodeID. + @param speed at this 'speed'. + @param addr with FireWire address 'addr'. + @param len read 'len' bytes from nodeID. + @param buf points to a memory descriptor containing the packet data. + @param offset start from this 'offset' in 'buf'. + @param reqrefcon Can be queried for extra info about the request. + @result UIn32 returns kFWResponseComplete on success */ + static UInt32 simpleReader( + void* refcon, + UInt16 nodeID, + IOFWSpeed & speed, + FWAddress addr, + UInt32 len, + IOMemoryDescriptor** buf, + IOByteCount* offset, + IOFWRequestRefCon reqrefcon); + +/*! @function simpleWriter + @abstract A method for processing an address space write request + @param refcon Client's callback object. + @param nodeID FireWire Write to nodeID. + @param speed at this 'speed'. + @param addr with FireWire address 'addr'. + @param len write 'len' bytes to nodeID. + @param buf obtain bytes from location given by 'buf'. + @param reqrefcon Can be queried for extra info about the request. + @result UIn32 returns kFWResponseComplete on success */ + static UInt32 simpleWriter( + void* refcon, + UInt16 nodeID, + IOFWSpeed& speed, + FWAddress addr, + UInt32 len, + const void* buf, + IOFWRequestRefCon reqrefcon); +protected: + + // Get a unique address range + IOReturn allocateAddress( + FWAddress* addr, + UInt32 len); + // free address + void freeAddress( + FWAddress addr, + UInt32 len); + +public: + + static IOFWPseudoAddressSpace* readWrite( + FWAddress addr, + UInt32 len, + FWReadCallback reader, + FWWriteCallback writer, + void* refcon); + +/*! @function simpleRead + @abstract Create an address space object to handle read-only memory (eg. the local ROM) + handles everything itself + @param bus Points to IOFireWireBus object. + @param addr Points to starting address for the Pseudo Address Space. + @param len Length of the Pseudo Address Space. + @param data The virtual address of the first byte in the memory. + @result returns valid IOFWPseudoAddressSpace on success, null on failure */ + static IOFWPseudoAddressSpace* simpleRead( + IOFireWireBus* bus, + FWAddress* addr, + UInt32 len, + const void* data); + +/*! @function simpleReadFixed + @abstract Create an address space object to handle fixed read-only memory (eg. the local ROM) + handles everything itself + @param bus Points to IOFireWireBus object. + @param addr Points to starting address for the Pseudo Address Space. + @param len Length of the Pseudo Address Space. + @param data The virtual address of the first byte in the memory. + @result returns valid IOFWPseudoAddressSpace on success, null on failure */ + static IOFWPseudoAddressSpace* simpleReadFixed( + IOFireWireBus* bus, + FWAddress addr, + UInt32 len, + const void* data); + +/*! @function simpleRW + @abstract Create an address space object to handle r/w memory + handles everything itself + @param bus Points to IOFireWireBus object. + @param addr Points to starting address for the Pseudo Address Space. + @param len Length of the Pseudo Address Space. + @param data The virtual address of the first byte in the memory. + @result returns valid IOFWPseudoAddressSpace on success, null on failure */ + static IOFWPseudoAddressSpace* simpleRW( + IOFireWireBus* bus, + FWAddress* addr, + UInt32 len, + void * data); + +/*! @function simpleRW + @abstract Create an address space object to handle r/w memory + handles everything itself + @param bus Points to IOFireWireBus object. + @param addr Points to starting address for the Pseudo Address Space. + @param data The virtual address of the first byte in the memory. + @result returns valid IOFWPseudoAddressSpace on success, null on failure */ + static IOFWPseudoAddressSpace* simpleRW( + IOFireWireBus* bus, + FWAddress* addr, + IOMemoryDescriptor * data); + +/*! @function initAll + @abstract Initialize an address space object to handle r/w memory + @param bus Points to IOFireWireBus object. + @param addr Points to starting address for the Pseudo Address Space. + @param len Length of the Pseudo Address Space. + @param reader Callback handler for incoming Read. + @param writer Callback handler for incoming Write. + @param refcon Client's callback object. + @result returns true on success, false on failure */ + virtual bool initAll( + IOFireWireBus* bus, + FWAddress* addr, + UInt32 len, + FWReadCallback reader, + FWWriteCallback writer, + void* refcon); + +/*! @function initFixed + @abstract Initialize a fixed address space at top of kCSRRegisterSpaceBaseAddressHi + @param bus Points to IOFireWireBus object. + @param addr Points to starting address for the Pseudo Address Space. + @param reader Callback handler for incoming Read. + @param writer Callback handler for incoming Write. + @param refcon Client's callback object. + @result returns true on success, false on failure */ + virtual bool initFixed( + IOFireWireBus* bus, + FWAddress addr, + UInt32 len, + FWReadCallback reader, + FWWriteCallback writer, + void* refcon); + +/*! @function doRead + @abstract A method for processing an address space read request + @param nodeID FireWire Read from nodeID. + @param speed at this 'speed'. + @param addr with FireWire address 'addr'. + @param len read 'len' bytes from nodeID. + @param buf points to a memory descriptor containing the packet data. + @param offset start from this 'offset' in 'buf'. + @param reqrefcon Can be queried for extra info about the request. + @result UIn32 returns kFWResponseComplete on success */ + virtual UInt32 doRead( + UInt16 nodeID, + IOFWSpeed & speed, + FWAddress addr, + UInt32 len, + IOMemoryDescriptor ** buf, + IOByteCount * offset, + IOFWRequestRefCon reqrefcon); +/*! @function doWrite + @abstract A method for processing an address space write request + @param nodeID FireWire Write to nodeID. + @param speed at this 'speed'. + @param addr with FireWire address 'addr'. + @param len write 'len' bytes to nodeID. + @param buf obtain bytes from location given by 'buf'. + @param reqrefcon Can be queried for extra info about the request. + @result UIn32 returns kFWResponseComplete on success */ + virtual UInt32 doWrite( + UInt16 nodeID, + IOFWSpeed& speed, + FWAddress addr, + UInt32 len, + const void* buf, + IOFWRequestRefCon reqrefcon); + +/*! @function contains + @abstract returns number of bytes starting at addr in this space + @result 0 if it doesn't contain the address + */ + virtual UInt32 contains(FWAddress addr); + +/*! @function simpleRWFixed + @abstract Create a Read/Write fixed address space at top of kCSRRegisterSpaceBaseAddressHi. + @param control Points to IOFireWireBus object. + @param addr Points to starting address for the Pseudo Address Space. + @param len Length of the address range. + @param data The virtual address of the first byte in the memory. + @result returns valid IOFWPseudoAddressSpace on success, null on failure */ + static IOFWPseudoAddressSpace * simpleRWFixed( IOFireWireBus *control, FWAddress addr, UInt32 len, const void *data ); + +protected: + + virtual IOFWAddressSpaceAux * createAuxiliary( void ); + +protected: + inline void handleARxReqIntComplete( void ) + { ((IOFWPseudoAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->handleARxReqIntComplete(); } + +public: +/*! @function setARxReqIntCompleteHandler + @abstract Installs a callback to receive notification, when FWIM has completed + ARxReqInt processing and no incoming packets are left in the queue. + @param refcon Client's callback object. + @param handler Client callback to be invoked, at the end of interrupt processing. + @result none. */ + inline void setARxReqIntCompleteHandler( void * refcon, IOFWARxReqIntCompleteHandler handler ) + { ((IOFWPseudoAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->setARxReqIntCompleteHandler( refcon, handler ); } + +private: + + OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpace, 0); + OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpace, 1); + +}; + +#endif diff --git a/i386/include/IOKit/firewire/IOFWRegs.h b/i386/include/IOKit/firewire/IOFWRegs.h new file mode 100644 index 0000000..97c7078 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWRegs.h @@ -0,0 +1,73 @@ +/* +* Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. +* +* @APPLE_LICENSE_HEADER_START@ +* +* The contents of this file constitute Original Code as defined in and +* are subject to the Apple Public Source License Version 1.1 (the +* "License"). You may not use this file except in compliance with the +* License. Please obtain a copy of the License at +* http://www.apple.com/publicsource and read it before using this file. +* +* This Original Code and all software distributed under the License are +* distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER +* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, +* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the +* License for the specific language governing rights and limitations +* under the License. +* +* @APPLE_LICENSE_HEADER_END@ +*/ +/* + File: IOFWRegs.h + + Copyright: © 1996-1999 by Apple Computer, Inc., all rights reserved. + +*/ + +#ifndef __IOFWREGS_H__ +#define __IOFWREGS_H__ + +#include + +#ifndef NEW_ERROR_CODES + +// +// (!) The following error codes are obsolete... +// Please use the error codes defined in IOFireWireFamilyCommon.h +// + +enum { + inUseErr = -4160, // Item already in use + notFoundErr = -4161, // Item not found + timeoutErr = -4162, // Something timed out + busReconfiguredErr = -4163, // Bus was reconfigured + invalidIDTypeErr = -4166, // Given ID is of an invalid type for the requested operation. + alreadyRegisteredErr = -4168, // Item has already been registered. + disconnectedErr = -4169, // Target of request has been disconnected. + retryExceededErr = -4170, // Retry limit was exceeded. + addressRangeErr = -4171, // Address is not in range. + addressAlignmentErr = -4172, // Address is not of proper alignment. + + multipleTalkerErr = -4180, // Tried to install multiple talkers + channelActiveErr = -4181, // Operation not permitted when channel is active + noListenerOrTalkerErr = -4182, // Every isochronous channel must have one talker and at least + // one listener + noChannelsAvailableErr = -4183, // No supported isochronous channels are available + channelNotAvailableErr = -4184, // Required channel was not available. + invalidIsochPortIDErr = -4185, // An isochronous port ID is invalid. + invalidFWReferenceTypeErr = -4186, // Operation does not support type of given reference ID + separateBusErr = -4187, // Two or more entities are on two or more busses and cannot be associated with eachother. + badSelfIDsErr = -4188, // Received self IDs are bad. + +//zzz Do we own these next ID numbers? + cableVoltageTooLowErr = -4190, // Cable power below device's minimum voltage + cablePowerInsufficientErr = -4191 // Can't grant power request at this time +}; + + +#endif //NEW_ERROR_CODES + +#endif /* __IOFWREGS_H */ + diff --git a/i386/include/IOKit/firewire/IOFWSimpleContiguousPhysicalAddressSpace.h b/i386/include/IOKit/firewire/IOFWSimpleContiguousPhysicalAddressSpace.h new file mode 100644 index 0000000..606a9b2 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWSimpleContiguousPhysicalAddressSpace.h @@ -0,0 +1,66 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOFWSIMPLECONTIGUOUSPHYSICALADDRESSSPACE_H_ +#define _IOFWSIMPLECONTIGUOUSPHYSICALADDRESSSPACE_H_ + +#include + +/*! @class IOFWSimpleContiguousPhysicalAddressSpace +*/ + +class IOFWSimpleContiguousPhysicalAddressSpace : public IOFWSimplePhysicalAddressSpace +{ + OSDeclareDefaultStructors( IOFWSimpleContiguousPhysicalAddressSpace ) + +private: + + void * fSimpleContigPhysSpaceMembers; + + IOReturn cachePhysicalAddress( void ); + +protected: + virtual bool createMemberVariables( void ); + virtual void destroyMemberVariables( void ); + +public: + + virtual bool init( IOFireWireBus * control, vm_size_t size, IODirection direction ); + virtual void free( void ); + + FWAddress getFWAddress( void ); + +private: + OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 0); + OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 1); + OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 2); + OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 3); + OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 4); + OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 5); + OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 6); + OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 7); + OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 8); + OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 9); + +}; + +#endif diff --git a/i386/include/IOKit/firewire/IOFWSimplePhysicalAddressSpace.h b/i386/include/IOKit/firewire/IOFWSimplePhysicalAddressSpace.h new file mode 100644 index 0000000..83a76a4 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWSimplePhysicalAddressSpace.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOFWSIMPLEPHYSICALADDRESSSPACE_H_ +#define _IOFWSIMPLEPHYSICALADDRESSSPACE_H_ + +#include +#include +#include +#include + +/*! @class IOFWSimplePhysicalAddressSpace +*/ + +class IOFWSimplePhysicalAddressSpace : public IOFWPhysicalAddressSpace +{ + OSDeclareDefaultStructors( IOFWSimplePhysicalAddressSpace ) + +private: + + void * fSimplePhysSpaceMembers; + + IOReturn allocateMemory( void ); + void deallocateMemory( void ); + +protected: + virtual bool createMemberVariables( void ); + virtual void destroyMemberVariables( void ); + +public: + + virtual bool init( IOFireWireBus * control, vm_size_t size, IODirection direction, bool contiguous = false ); + virtual void free( void ); + + IOVirtualAddress getVirtualAddress( void ); + +private: + OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 0); + OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 1); + OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 2); + OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 3); + OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 4); + OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 5); + OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 6); + OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 7); + OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 8); + OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 9); + +}; + +#endif diff --git a/i386/include/IOKit/firewire/IOFWSyncer.h b/i386/include/IOKit/firewire/IOFWSyncer.h new file mode 100644 index 0000000..0fa497f --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWSyncer.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 1998-2007 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOFWSYNCER_H +#define _IOFWSYNCER_H + +#include +#include +#include + +class IOFWSyncer : public OSObject +{ + OSDeclareDefaultStructors(IOFWSyncer) + +private: + // The spin lock that is used to guard the 'threadMustStop' variable. + IOSimpleLock *guardLock; + volatile bool threadMustStop; + IOReturn fResult; + virtual void free(); + virtual void privateSignal(); + +public: + + static IOFWSyncer * create(bool twoRetains = true); + + virtual bool init(bool twoRetains); + virtual void reinit(); + virtual IOReturn wait(bool autoRelease = true); + virtual void signal(IOReturn res = kIOReturnSuccess, + bool autoRelease = true); +}; + +#endif /* !_IOFWSYNCER */ + diff --git a/i386/include/IOKit/firewire/IOFWUserObjectExporter.h b/i386/include/IOKit/firewire/IOFWUserObjectExporter.h new file mode 100644 index 0000000..5d12307 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWUserObjectExporter.h @@ -0,0 +1,95 @@ +/* + * Copyright (c) 1998-2008 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! @class IOFWUserObjectExporter + @discussion An IOFWUserObjectExporter is for internal use only. You should never subclass IOFWUserObjectExporter +*/ + + namespace IOFireWireLib + { + typedef UInt32 UserObjectHandle; + } + +#ifdef KERNEL + + class IOFWUserObjectExporter : public OSObject + { + OSDeclareDefaultStructors (IOFWUserObjectExporter ) + + public : + + typedef void (*CleanupFunction)( const OSObject * obj ); + typedef void (*CleanupFunctionWithExporter)( const OSObject * obj, IOFWUserObjectExporter * ); + + private : + + unsigned fCapacity; + unsigned fObjectCount; + const OSObject ** fObjects; + CleanupFunctionWithExporter * fCleanupFunctions; + IOLock * fLock; + OSObject * fOwner; + + public : + + static IOFWUserObjectExporter * createWithOwner( OSObject * owner ); + bool initWithOwner( OSObject * owner ); + + virtual bool init(); + + virtual void free (); + virtual bool serialize ( OSSerialize * s ) const; + + // me + IOReturn addObject ( OSObject * obj, CleanupFunction cleanup, IOFireWireLib::UserObjectHandle * outHandle ); + void removeObject ( IOFireWireLib::UserObjectHandle handle ); + + // the returned object is retained! This is for thread safety.. if someone else released + // the object from the pool after you got it, you be in for Trouble + // Release the returned value when you're done!! + const OSObject * lookupObject ( IOFireWireLib::UserObjectHandle handle ) const; + const OSObject * lookupObjectForType( IOFireWireLib::UserObjectHandle handle, const OSMetaClass * toType ) const; + void removeAllObjects (); + + void lock () const; + void unlock () const; + + OSObject * getOwner() const; + + const IOFireWireLib::UserObjectHandle lookupHandle ( OSObject * object ) const; + + // don't subclass, but just in case someone does... + + private: + + OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 0); + OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 1); + OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 2); + OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 3); + OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 4); + OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 5); + OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 6); + OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 7); + + }; + +#endif diff --git a/i386/include/IOKit/firewire/IOFWUtils.h b/i386/include/IOKit/firewire/IOFWUtils.h new file mode 100644 index 0000000..1a0ffc3 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFWUtils.h @@ -0,0 +1,32 @@ +/* + * IOFWUtils.h + * IOFireWireFamily + * + * Created by Niels on Fri Aug 16 2002. + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + */ + +#import + +//////////////////////////////////////////////////////////////////////////////// +// +// Useful FireWire utility functions. +// + +#ifdef __cplusplus +extern "C" { +#endif + +UInt16 FWComputeCRC16(const UInt32 *pQuads, UInt32 numQuads); +UInt16 FWUpdateCRC16(UInt16 crc16, UInt32 quad); + +UInt32 AddFWCycleTimeToFWCycleTime( UInt32 cycleTime1, UInt32 cycleTime2 ); +UInt32 SubtractFWCycleTimeFromFWCycleTime( UInt32 cycleTime1, UInt32 cycleTime2); + +void IOFWGetAbsoluteTime( AbsoluteTime * result ); + +#ifdef __cplusplus +} +#endif + diff --git a/i386/include/IOKit/firewire/IOFireWireBus.h b/i386/include/IOKit/firewire/IOFireWireBus.h new file mode 100644 index 0000000..053bfe4 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFireWireBus.h @@ -0,0 +1,373 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_IOFIREWIREBUS_H +#define _IOKIT_IOFIREWIREBUS_H + +#include +#include +#include +#include +#include + +extern const OSSymbol *gFireWireROM; +extern const OSSymbol *gFireWireNodeID; +extern const OSSymbol *gFireWireSelfIDs; +extern const OSSymbol *gFireWireSpeed; +extern const OSSymbol *gFireWireUnit_Spec_ID; +extern const OSSymbol *gFireWireUnit_SW_Version; +extern const OSSymbol *gFireWireVendor_ID; +extern const OSSymbol *gFireWire_GUID; +extern const OSSymbol *gFireWireVendor_Name; +extern const OSSymbol *gFireWireProduct_Name; +extern const OSSymbol *gFireWireModel_ID; +extern const OSSymbol *gFireWireTDM; + +class IOFireWireDevice; +class IOLocalConfigDirectory; +class IOFWLocalIsochPort; +class IOFireWirePowerManager; +class IOFireWireBus; +class IOFWDCLPool; +class IOFWSimpleContiguousPhysicalAddressSpace; +class IOFWSimplePhysicalAddressSpace; +class IOFWUserObjectExporter; + +#pragma mark - + +/*! + @class IOFireWireBusAux +*/ + +class IOFireWireBusAux : public OSObject +{ + OSDeclareAbstractStructors(IOFireWireBusAux) + + friend class IOFireWireBus; + + protected: + + /*! + @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + + struct ExpansionData { }; + + /*! + @var reserved + Reserved for future use. (Internal use only) + */ + + ExpansionData * reserved; + + public : + + virtual IOFWDCLPool * createDCLPool ( unsigned capacity ) const = 0 ; + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 32); + virtual UInt8 getMaxRec( void ) = 0; + + virtual UInt64 getFireWirePhysicalAddressMask( void ) = 0; + virtual UInt32 getFireWirePhysicalAddressBits( void ) = 0; + virtual UInt64 getFireWirePhysicalBufferMask( void ) = 0; + virtual UInt32 getFireWirePhysicalBufferBits( void ) = 0; + + virtual IOFWSimpleContiguousPhysicalAddressSpace * createSimpleContiguousPhysicalAddressSpace( vm_size_t size, IODirection direction ) = 0; + virtual IOFWSimplePhysicalAddressSpace * createSimplePhysicalAddressSpace( vm_size_t size, IODirection direction ) = 0; + + virtual IOFWUserObjectExporter * getSessionRefExporter( void ) = 0; + + private: + OSMetaClassDeclareReservedUsed(IOFireWireBusAux, 0); + OSMetaClassDeclareReservedUsed(IOFireWireBusAux, 1); + OSMetaClassDeclareReservedUsed(IOFireWireBusAux, 2); + OSMetaClassDeclareReservedUsed(IOFireWireBusAux, 3); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 4); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 5); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 6); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 7); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 8); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 9); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 10); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 11); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 12); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 13); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 14); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 15); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 16); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 17); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 18); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 19); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 20); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 21); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 22); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 23); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 24); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 25); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 26); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 27); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 28); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 29); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 30); + OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 31); + +}; + +#pragma mark - + +/*! + @class IOFireWireBus + @abstract IOFireWireBus is a public class the provides access to + general FireWire functionality... +*/ + +class IOFireWireBus : public IOService +{ + OSDeclareAbstractStructors(IOFireWireBus) + +public: + + struct DCLTaskInfoAux + { + unsigned version ; + union // u + { + struct // v0 + { + IOMemoryMap * bufferMemoryMap ; // This field required to get physical addresses to program DMA. + // If NULL, we try to make the map ourselves. + // If you created a buffer memory descriptor + // for your program's buffers, just call map() on it + // and pass the returned object here... + } v0 ; + + struct // v1 + { + IOMemoryMap * bufferMemoryMap ; // same as 'bufferMemoryMap' from version 0, above. + + IOWorkLoop * workloop ; // A workloop on which to run callbacks for this port.. + // Can be NULL to use FireWire isochronous workloop... + // The workloop will be retained by the program object. + } v1 ; + + struct + { + IOMemoryMap * bufferMemoryMap ; // same as 'bufferMemoryMap' from version 0, above. + + IOWorkLoop * workloop ; // A workloop on which to run callbacks for this port.. + // Can be NULL to use FireWire isochronous workloop... + // The workloop will be retained by the program object. + IOFWIsochPortOptions options ; // extra options + } v2 ; + } u ; + } ; + + // this struct has been redefined for our next generation isochronous architecture, + // but is backwards compatible with the old definition.. This means we should + // be safe when an old-style driver is loaded.. + // To use DCLTaskInfo (see createLocalIsochPort) make sure all 'unused' fields are set to 0 or NULL + // and that auxInfo points to a valid DCLTaskInfoAux struct, defined above. + + struct DCLTaskInfo + { + task_t unused0 ; + vm_address_t unused1 ; + UInt32 unused2 ; + vm_address_t unused3 ; + UInt32 unused4 ; + void (*unused5)(void) ; + DCLTaskInfoAux * auxInfo ; // Refcon for user call + } ; + + static const IORegistryPlane * gIOFireWirePlane; + + IOFireWireBusAux * fAuxiliary; + + // Create an Isochronous Channel object + virtual IOFWIsochChannel *createIsochChannel( + bool doIRM, UInt32 bandwidth, IOFWSpeed prefSpeed, + IOFWIsochChannel::ForceStopNotificationProc stopProc=NULL, + void *stopRefCon=NULL) = 0; + + /*! @function createLocalIsochPort + @abstract Create a local isochronous port to run the given DCL program + @param talking Pass true to create a talker port; pass false to create a listener port. + @param opcodes A pointer to your DCL program (linked list of DCLCommand structs) + To use an IOFWDCL/IOFWDCLPool program, pass the DCLCommand returned by + IOFWDCLPool::getProgram(). + @param info (Optional) Pointer to DCLTaskInfo struct containing additional + configuration information. If you have an IOMemoryMap for your DCL program data buffers, + pass it here. You can also pass an IOWorkLoop if you want to use your own + workloop to handle callbacks for the created port object. + @param startEvent Specifies a bus condition on which the port should start receiving/sending packets + Must be kFWDCLImmediateEvent, kFWDCLCycleEvent, or kFWDCLSyBitsEvent. + Pass kFWDCLImmediateEvent to start without waiting when start() is called. Pass kFWDCLCycleEvent + to start() transmitting at a specified bus cycle time. Pass kFWDCLSyBitsEvent (receive only) + to start receiving packets once an isochronous packet with a specified sync field arrives. + @param startState Pass the value for the desired start condition, as specified by 'startEvent' + kFWDCLImmediateEvent: set to 0 + kFWDCLCycleEvent: the cycle timer value on which to start processing packets. For talker + ports, This value will be masked by 'startMask' and packet processing will be begin on the + next cycle whose lowest bits match the masked value. For listener ports, pass a 15-bit value + containg to the low order two bits of cycleSeconds and the 13-bit cycleCount on which to start + processing packets. + kFWDCLSyBitsEvent: The value of the sync field on which to start receive packets. The value will be masked + by 'startMask'. For DCLCommand based isoch ports, processing will begin on the first received packet + that has an isochronous header sync field matching 'startState'. For IOFWDCL/IOFWDCLPool based + ports, processing will pause on each IOFWDCL that has wait set to true until a packet that has + an isochronous header sync field matching 'startState' is received. + @result Returns an IOFWLocalIsochPort on success.*/ + virtual IOFWLocalIsochPort *createLocalIsochPort(bool talking, + DCLCommand *opcodes, DCLTaskInfo *info = 0, + UInt32 startEvent = 0, UInt32 startState = 0, UInt32 startMask = 0) = 0; + + virtual IOReturn getCycleTime(UInt32 &cycleTime) = 0; + virtual IOReturn getBusCycleTime(UInt32 &busTime, UInt32 &cycleTime) = 0; + + // Methods to manipulate the local Config ROM + virtual IOReturn AddUnitDirectory(IOLocalConfigDirectory *unitDir) = 0; + virtual IOReturn RemoveUnitDirectory(IOLocalConfigDirectory *unitDir) = 0; + + // Cause a bus reset + virtual IOReturn resetBus() = 0; + + // Convert a firewire nodeID into the IOFireWireDevice for it + virtual IOFireWireDevice * nodeIDtoDevice(UInt32 generation, UInt16 nodeID) = 0; + + // Execute specified function on workloop after specified delay + // Returned command is for delay, call it's cancel() function to cancel timeout. + virtual IOFWDelayCommand * createDelayedCmd(UInt32 uSecDelay, FWBusCallback func, void *refcon) = 0; + + virtual IOFWPhysicalAddressSpace *createPhysicalAddressSpace(IOMemoryDescriptor *mem) = 0; + virtual IOFWPseudoAddressSpace *createPseudoAddressSpace(FWAddress *addr, UInt32 len, + FWReadCallback reader, FWWriteCallback writer, void *refcon) = 0; + + + // Extract info about the async request + virtual bool isLockRequest(IOFWRequestRefCon refcon) = 0; + virtual bool isQuadRequest(IOFWRequestRefCon refcon) = 0; + virtual UInt32 getExtendedTCode(IOFWRequestRefCon refcon) = 0; + + // How big (as a power of two) can packets sent to/received from the node be? + virtual int maxPackLog ( bool forSend, UInt16 nodeAddress) const = 0; + + // How big (as a power of two) can packets sent from A to B be? + virtual int maxPackLog ( UInt16 nodeA, UInt16 nodeB) const = 0; + + // Force given node to be root (via root holdoff Phy packet) + virtual IOReturn makeRoot ( UInt32 generation, UInt16 nodeID) = 0; + + // Create address space at fixed address in initial register space + virtual IOFWPseudoAddressSpace * createInitialAddressSpace ( UInt32 addressLo, UInt32 len, + FWReadCallback reader, FWWriteCallback writer, void *refcon) = 0; + + // Get address space object for given address, if any + virtual IOFWAddressSpace * getAddressSpace(FWAddress address) = 0; + + // Extract info about the async request - was the request ack'ed complete already? + virtual bool isCompleteRequest(IOFWRequestRefCon refcon) = 0; + + virtual IOFWAsyncStreamCommand * createAsyncStreamCommand( UInt32 generation, + UInt32 channel, UInt32 sync, UInt32 tag, IOMemoryDescriptor *hostMem, + UInt32 size, int speed,FWAsyncStreamCallback completion=NULL, void *refcon=NULL) = 0; + virtual UInt32 hopCount(UInt16 nodeAAddress, UInt16 nodeBAddress ) = 0; + virtual UInt32 hopCount(UInt16 nodeAAddress ) = 0; + virtual IOFireWirePowerManager * getBusPowerManager( void ) = 0; + +protected: + + virtual IOFireWireBusAux * createAuxiliary( void ) = 0; + + public : + + inline IOFWDCLPool * createDCLPool ( UInt32 capacity = 0 ) { return fAuxiliary->createDCLPool ( capacity ) ; } + inline UInt8 getMaxRec( void ) { return fAuxiliary->getMaxRec(); } + + // get the physical addressing limitations for this controller + + // returns the physical mask for memory addressable by the bus and this controller's DMA engine + // intended for use with IOBufferMemoryDescriptor::inTaskWithPhysicalMask() + // all current hardware is 32 bit --- currently returns 0x00000000FFFFFFFF + // this API is intended for allocating physical buffers. + // it will not return more than 48 bits so that buffer addresses can be turned into FWAddresses + inline UInt64 getFireWirePhysicalAddressMask( void ) + { return fAuxiliary->getFireWirePhysicalAddressMask(); } + + // returns a count of the maximum addressing bits supported by the bus and this controller + // intended for use with IODMACommand::withSpecification() + // all current hardware is 32 bit --- currently returns 32 + // this API is intended for allocating physical buffers. + // it will not return more than 48 bits so that buffer addresses can be turned into FWAddresses + inline UInt32 getFireWirePhysicalAddressBits( void ) + { return fAuxiliary->getFireWirePhysicalAddressBits(); } + + // returns the physical mask for memory addressable by this controller's DMA engine + // intended for use with IOBufferMemoryDescriptor::inTaskWithPhysicalMask() + // all current hardware is 32 bit --- currently returns 0x00000000FFFFFFFF + // this API is to allocate isoch and other buffers that don't need to be addressable by the bus + // it may someday return as high 64 bits + inline UInt64 getFireWirePhysicalBufferMask( void ) + { return fAuxiliary->getFireWirePhysicalBufferMask(); } + + // returns a count of the maximum addressing bits supported by this controller + // intended for use with IODMACommand::withSpecification() + // all current hardware is 32 bit --- currently returns 32 + // this API is to allocate isoch and other buffers that don't need to be addressable by the bus + // it may someday return as high 64 bits + inline UInt32 getFireWirePhysicalBufferBits( void ) + { return fAuxiliary->getFireWirePhysicalBufferBits(); } + + inline IOFWSimpleContiguousPhysicalAddressSpace * createSimpleContiguousPhysicalAddressSpace( vm_size_t size, IODirection direction ) + { return fAuxiliary->createSimpleContiguousPhysicalAddressSpace( size, direction ); } + + inline IOFWSimplePhysicalAddressSpace * createSimplePhysicalAddressSpace( vm_size_t size, IODirection direction ) + { return fAuxiliary->createSimplePhysicalAddressSpace( size, direction ); } + + virtual IOFWAsyncStreamCommand * createAsyncStreamCommand( UInt32 generation, + UInt32 channel, UInt32 sync, UInt32 tag, IOMemoryDescriptor *hostMem, + UInt32 size, int speed,FWAsyncStreamCallback completion, void *refcon, bool failOnReset) = 0; + + inline IOFWUserObjectExporter * getSessionRefExporter( void ) + { return fAuxiliary->getSessionRefExporter(); } + + private: + + OSMetaClassDeclareReservedUsed(IOFireWireBus, 0); + OSMetaClassDeclareReservedUsed(IOFireWireBus, 1); + OSMetaClassDeclareReservedUsed(IOFireWireBus, 2); + OSMetaClassDeclareReservedUsed(IOFireWireBus, 3); + OSMetaClassDeclareReservedUsed(IOFireWireBus, 4); + OSMetaClassDeclareReservedUsed(IOFireWireBus, 5); + OSMetaClassDeclareReservedUsed(IOFireWireBus, 6); + OSMetaClassDeclareReservedUsed(IOFireWireBus, 7); + +}; + +#endif /* ! _IOKIT_IOFIREWIREBUS_H */ + diff --git a/i386/include/IOKit/firewire/IOFireWireController.h b/i386/include/IOKit/firewire/IOFireWireController.h new file mode 100644 index 0000000..e2f3ae1 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFireWireController.h @@ -0,0 +1,1089 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + +#ifndef _IOKIT_IOFIREWIRECONTROLLER_H +#define _IOKIT_IOFIREWIRECONTROLLER_H + +#ifndef FIREWIREPRIVATE +#warning Please do not include this file. Include IOFireWireBus.h instead. +#endif + +#include +#include +#include +#include +#include +#include + +class OSData; +class IOWorkLoop; +class IOEventSource; +class IOFWQEventSource; +class IOTimerEventSource; +class IOMemoryDescriptor; +class IOFireWireController; +class IOFWAddressSpace; +class IOFWPseudoAddressSpace; +class IOFireWireNub; +class IOFireWireDevice; +class IOFireWireDeviceAux; +class IOFireWireUnit; +class IODCLProgram; +class IOLocalConfigDirectory; +class IOFireWireLink; +class IOFireWireSBP2ORB; +class IOFireWireSBP2Login; +class IOFireWireROMCache; +class IOFireWireLocalNode; +class IOFWWorkLoop; +class IOFireWireIRM; +class IOFireWirePowerManager; +class IOFWSimplePhysicalAddressSpace; +class IOFWSimpleContiguousPhysicalAddressSpace; +class IOFWAsyncStreamReceiver; +class IOFWAsyncStreamListener; +class IOFWUserVectorCommand; +class IOFWAsyncPHYCommand; +class IOFWPHYPacketListener; +class IOFWUserPHYPacketListener; + +#if FIRELOGCORE +class IOFireLog; +class IOFireLogPublisher; +#endif + +const UInt32 kMaxWaitForValidSelfID = 20; // Still invalid SelfID after 20 retries + +// Phy packet defs. + +enum +{ + kFWPhyPacketID = FWBitRange (0, 1), + kFWPhyPacketIDPhase = FWBitRangePhase (0, 1), + + kFWPhyPacketPhyID = FWBitRange (2, 7), + kFWPhyPacketPhyIDPhase = FWBitRangePhase (2, 7) +}; + +enum +{ + kSelfIDPacketSize = 8, + kMaxSelfIDs = 4 // SelfID 0,1,3,8 +}; + +enum +{ + kFWConfigurationPacketID = 0, + kFWLinkOnPacketID = 1, + kFWSelfIDPacketID = 2 +}; + +enum +{ + kFWPhyConfigurationR = FW_BIT(8), + kFWPhyConfigurationT = FW_BIT(9), + kFWPhyConfigurationGapCnt = FWBitRange (10, 15), + kFWPhyConfigurationGapCntPhase = FWBitRangePhase (10, 15) +}; + +enum +{ + kFWSelfIDPortStatusChild = 3, + kFWSelfIDPortStatusParent = 2, + kFWSelfIDPortStatusNotConnected = 1, + kFWSelfIDPortStatusNotPresent = 0, + + kFWSelfIDNoPower = 0, + kFWSelfIDSelfPowered15W = 1, + kFWSelfIDSelfPowered30W = 2, + kFWSelfIDSelfPowered45W = 3, + kFWSelfIDBusPowered1W = 4, + kFWSelfIDBusPowered3W = 5, + kFWSelfIDBusPowered6W = 6, + kFWSelfIDBusPowered10W = 7, + + kFWSelfIDPhyID = kFWPhyPacketPhyID,//zzz do we need or want this? + kFWSelfIDPhyIDPhase = kFWPhyPacketPhyIDPhase, + kFWSelfIDM = FW_BIT(31), + + kFWSelfID0L = FW_BIT(9), + kFWSelfID0GapCnt = FWBitRange (10, 15), + kFWSelfID0GapCntPhase = FWBitRangePhase (10, 15), + kFWSelfID0SP = FWBitRange (16, 17), + kFWSelfID0SPPhase = FWBitRangePhase (16, 17), + kFWSelfID0Del = FWBitRange (18, 19), + kFWSelfID0DelPhase = FWBitRangePhase (18, 19), + kFWSelfID0C = FW_BIT(20), + kFWSelfID0Pwr = FWBitRange (21, 23), + kFWSelfID0PwrPhase = FWBitRangePhase (21, 23), + kFWSelfID0P0 = FWBitRange (24, 25), + kFWSelfID0P0Phase = FWBitRangePhase (24, 25), + kFWSelfID0P1 = FWBitRange (26, 27), + kFWSelfID0P1Phase = FWBitRangePhase (26, 27), + kFWSelfID0P2 = FWBitRange (28, 29), + kFWSelfID0P2Phase = FWBitRangePhase (28, 29), + kFWSelfID0I = FW_BIT(30), + + kFWSelfIDPacketType = FW_BIT(8), + kFWSelfIDNN = FWBitRange (9, 11), + kFWSelfIDNNPhase = FWBitRangePhase (9, 11), + kFWSelfIDNPa = FWBitRange (14, 15), + kFWSelfIDNPaPhase = FWBitRangePhase (14, 15), + kFWSelfIDNPb = FWBitRange (16, 17), + kFWSelfIDNPbPhase = FWBitRangePhase (16, 17), + kFWSelfIDNPc = FWBitRange (18, 19), + kFWSelfIDNPcPhase = FWBitRangePhase (18, 19), + kFWSelfIDNPd = FWBitRange (20, 21), + kFWSelfIDNPdPhase = FWBitRangePhase (20, 21), + kFWSelfIDNPe = FWBitRange (22, 23), + kFWSelfIDNPePhase = FWBitRangePhase (22, 23), + kFWSelfIDNPf = FWBitRange (24, 25), + kFWSelfIDNPfPhase = FWBitRangePhase (24, 25), + kFWSelfIDNPg = FWBitRange (26, 27), + kFWSelfIDNPgPhase = FWBitRangePhase (26, 27), + kFWSelfIDNPh = FWBitRange (28, 29), + kFWSelfIDNPhPhase = FWBitRangePhase (28, 29), + kFWSelfIDMore = FW_BIT(31) +}; + +// Primary packet defs. +enum +{ + kFWPacketTCode = FWBitRange (24, 27), + kFWPacketTCodePhase = FWBitRangePhase (24, 27) +}; + + +enum +{ + kFWAsynchSpd = FWBitRange (14, 15), + kFWAsynchSpdPhase = FWBitRangePhase (14, 15), + + kFWAsynchTLabel = FWBitRange (16, 21), + kFWAsynchTLabelPhase = FWBitRangePhase (16, 21), + kFWAsynchTTotal = ((0xffffffff & kFWAsynchTLabel) >> kFWAsynchTLabelPhase)+1, + kFWAsynchRt = FWBitRange (22, 23), + kFWAsynchRtPhase = FWBitRangePhase (22, 23), + kFWAsynchNew = 0, + kFWAsynchRetryA = 2, + kTIAsycnhRetryB = 3, + + kFWAsynchPriority = FWBitRange (28, 31), + kFWAsynchPriorityPhase = FWBitRangePhase (28, 31), + + kFWAsynchDestinationID = FWBitRange (0, 15), + kFWAsynchDestinationIDPhase = FWBitRangePhase (0, 15), + + kFWAsynchSourceID = FWBitRange (0, 15), + kFWAsynchSourceIDPhase = FWBitRangePhase (0, 15), + + kFWAsynchDestinationOffsetHigh = FWBitRange (16, 31), + kFWAsynchDestinationOffsetHighPhase = FWBitRangePhase (16, 31), + + kFWAsynchDestinationOffsetLow = FWBitRange (0, 31), + kFWAsynchDestinationOffsetLowPhase = FWBitRangePhase (0, 31), + + kFWAsynchDataLength = FWBitRange (0, 15), + kFWAsynchDataLengthPhase = FWBitRangePhase (0, 15), + + kFWAsynchExtendedTCode = FWBitRange (16, 31), + kFWAsynchExtendedTCodePhase = FWBitRangePhase (16, 31), + + kFWAsynchAckSent = FWBitRange (28, 31), + kFWAsynchAckSentPhase = FWBitRangePhase (28, 31), + + kFWAsynchRCode = FWBitRange (16, 19), + kFWAsynchRCodePhase = FWBitRangePhase (16, 19) +}; + +enum +{ + kFWTCodeWriteQuadlet = 0, + kFWTCodeWriteBlock = 1, + kFWTCodeWriteResponse = 2, + kFWTCodeReadQuadlet = 4, + kFWTCodeReadBlock = 5, + kFWTCodeReadQuadletResponse = 6, + kFWTCodeReadBlockResponse = 7, + kFWTCodeCycleStart = 8, + kFWTCodeLock = 9, + kFWTCodeIsochronousBlock = 10, + kFWTCodeLockResponse = 11, + kFWTCodePHYPacket = 14 +}; + +enum +{ + kFWExtendedTCodeMaskSwap = 1, + kFWExtendedTCodeCompareSwap = 2, + kFWExtendedTCodeFetchAdd = 3, + kFWExtendedTCodeLittleAdd = 4, + kFWExtendedTCodeBoundedAdd = 5, + kFWExtendedTCodeWrapAdd = 6, + kFWExtendedTCodeVendorDependent = 7 +}; + +// debug boot-arg constants +enum +{ + kFWDebugIgnoreNodeNone = 0xFFFFFFFF +}; + +struct AsyncPendingTrans { + IOFWAsyncCommand * fHandler; + IOFWCommand * fAltHandler; + int fTCode; + bool fInUse; +}; + +struct IOFWNodeScan { + IOFireWireController * fControl; + FWAddress fAddr; + UInt32 fBuf[5]; // Enough for bus info block + UInt32 * fSelfIDs; + int fNumSelfIDs; + int fROMSize; + int fRead; + IOFWReadQuadCommand * fCmd; + IOFWCompareAndSwapCommand * fLockCmd; + UInt32 generation; + UInt32 fIRMBitBucketOld; + UInt32 fIRMBitBucketNew; + bool fIRMisBad; + bool speedChecking; + bool fContenderNeedsChecking; + bool fIRMCheckingRead; + bool fIRMCheckingLock; + int fRetriesBumped; + bool fMustNotBeRoot; +}; + + +typedef struct IOFWDuplicateGUIDStruct IOFWDuplicateGUIDRec; +struct IOFWDuplicateGUIDStruct + { + IOFWDuplicateGUIDRec * fNextGUID; + CSRNodeUniqueID fGUID; + UInt32 fLastGenSeen; +}; + + +// IOFireWireDuplicateGUIDList +// +// A little class for keeping track of GUIDs which where we have observed 2 nodes with +// the same GUID + +class IOFireWireDuplicateGUIDList : public OSObject +{ + OSDeclareDefaultStructors(IOFireWireDuplicateGUIDList); + +private: + IOFWDuplicateGUIDRec * fFirstGUID; + +protected: + virtual void free(); + +public: + + static IOFireWireDuplicateGUIDList * create( void ); + + void addDuplicateGUID( CSRNodeUniqueID guid, UInt32 gen ); + void removeDuplicateGUID( CSRNodeUniqueID guid ); + + bool findDuplicateGUID( CSRNodeUniqueID guid, UInt32 gen ); + +}; + +#define kMaxPendingTransfers kFWAsynchTTotal + +class IOFireWireController; + +#pragma mark - + +/*! + @class IOFireWireControllerAux +*/ + +class IOFireWireControllerAux : public IOFireWireBusAux +{ + OSDeclareDefaultStructors(IOFireWireControllerAux) + + friend class IOFireWireController; + +protected: + + IOFireWireController * fPrimary; + + UInt8 fMaxRec; + + UInt8 fPadding; + UInt16 fPadding2; + + IOFWUserObjectExporter * fSessionRefExporter; + + /*! + @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + + struct ExpansionData { }; + + /*! + @var reserved + Reserved for future use. (Internal use only) + */ + + ExpansionData * reserved; + + virtual bool init ( + IOFireWireController * primary ); + virtual void free (); + virtual IOFWDCLPool * createDCLPool ( unsigned capacity ) const ; + virtual UInt8 getMaxRec( void ); + + virtual UInt64 getFireWirePhysicalAddressMask( void ); + virtual UInt32 getFireWirePhysicalAddressBits( void ); + virtual UInt64 getFireWirePhysicalBufferMask( void ); + virtual UInt32 getFireWirePhysicalBufferBits( void ); + + virtual IOFWSimpleContiguousPhysicalAddressSpace * createSimpleContiguousPhysicalAddressSpace( vm_size_t size, IODirection direction ); + virtual IOFWSimplePhysicalAddressSpace * createSimplePhysicalAddressSpace( vm_size_t size, IODirection direction ); + + virtual IOFWUserObjectExporter * getSessionRefExporter( void ); + +private: + OSMetaClassDeclareReservedUnused(IOFireWireControllerAux, 0); + OSMetaClassDeclareReservedUnused(IOFireWireControllerAux, 1); + OSMetaClassDeclareReservedUnused(IOFireWireControllerAux, 2); + OSMetaClassDeclareReservedUnused(IOFireWireControllerAux, 3); + OSMetaClassDeclareReservedUnused(IOFireWireControllerAux, 4); + OSMetaClassDeclareReservedUnused(IOFireWireControllerAux, 5); + OSMetaClassDeclareReservedUnused(IOFireWireControllerAux, 6); + OSMetaClassDeclareReservedUnused(IOFireWireControllerAux, 7); + +}; + + +#pragma mark - + +/*! @class IOFireWireController +*/ +class IOFireWireController : public IOFireWireBus +{ + OSDeclareAbstractStructors(IOFireWireController) + +protected: + enum busState { + kStarting = 0, + kAsleep, // Link off, zzzzzz + kWaitingBusReset, + kWaitingSelfIDs, // Bus has been reset, no selfIDs yet + kWaitingScan, // Got selfIDs, waiting a bit before hitting lame devices + kScanning, // Reading node ROMs + kWaitingPrune, // Read all ROMs, pausing before pruning missing devices + kRunning, // Normal happy state, + kWaitingBusResetStart // bus reset is desired, but not yet sent to the fwim + }; + + enum ResetState + { + kResetStateResetting, + kResetStateDisabled, + kResetStateArbitrated + }; + + enum + { + kDisablePhysicalAccess = (1 << 0) + }; + + struct timeoutQ: public IOFWCmdQ + { + IOTimerEventSource *fTimer; + virtual void headChanged(IOFWCommand *oldHead); + void busReset(); + }; + + struct pendingQ: public IOFWCmdQ + { + IOFWQEventSource *fSource; + virtual void headChanged(IOFWCommand *oldHead); + }; + + friend class IOFireWireLink; + friend class IOFireWireDevice; + friend class IOFireWireDeviceAux; + friend class IOFWAddressSpace; + friend class IOFWAddressSpaceAux; + friend class IOFWPseudoAddressSpace; + friend class IOFireWireSBP2ORB; + friend class IOFireWireSBP2Login; + friend class IOFWLocalIsochPort; + friend class IOFWCommand; + friend class IOFireWireUnit; + friend class IOFireWirePCRSpace; + friend class IOFireWireROMCache; + friend class IOFWAsyncStreamCommand; + friend class IOFireWireAVCLocalUnit; + friend class IOFireWireAVCUnit; + friend class IOFireWireAVCCommand; + friend class IOFireWirePowerManager; + friend class IOFWWriteQuadCommand; + friend class IOFWWriteCommand; + friend class IOFWCompareAndSwapCommand; + friend class IOFWAsyncCommand; + friend class IOFireWireAVCTargetSpace; + friend class AppleFWOHCI; + friend class IOFireWireNub; + friend class IOFWAsyncStreamListener; + friend class IOFireWireLocalNode; + friend class IOFireWireIRMAllocation; + friend class IOFWUserVectorCommand; + friend class IOFWAsyncPHYCommand; + friend class IOFWUserPHYPacketListener; + friend class IOFWAsyncStreamReceiver; + +#if FIRELOGCORE + friend class IOFireLog; +#endif + + IOFireWireLink * fFWIM; + IOFWWorkLoop * fWorkLoop; + IOTimerEventSource * fTimer; + OSSet * fLocalAddresses; // Collection of local adress spaces + OSIterator * fSpaceIterator; // Iterator over local addr spaces + + OSSet * fAllocatedChannels; // Need to be informed of bus resets + OSIterator * fAllocChannelIterator; // Iterator over channels + + OSSet * fIRMAllocations; // Need to be informed of bus resets + OSIterator * fIRMAllocationsIterator; // Iterator over channels + OSSet * fIRMAllocationsAllocated; // Need to be informed of bus resets + + // Bus management variables (although we aren't a FireWire Bus Manager...) + AbsoluteTime fResetTime; // Time of last reset + UInt32 fBusGeneration; // ID of current bus topology. + UInt16 fLocalNodeID; // ID of local node, ie. this computer + UInt16 fRootNodeID; // ID of root, ie. highest node id in use. + UInt16 fIRMNodeID; // ID of Isochronous resource manager, or kFWBadNodeID + bool fBusMgr; // true if at least one node is bus manager capable + IORegistryEntry * fNodes[kFWMaxNodesPerBus]; // FireWire nodes on this bus + UInt32 * fNodeIDs[kFWMaxNodesPerBus+1]; // Pointer to SelfID list for each node + // +1 so we know how many selfIDs the last node has + + UInt32 fGapCount; // What we think the gap count should be + //UInt8 fSpeedCodes[(kFWMaxNodesPerBus+1)*kFWMaxNodesPerBus]; + UInt8 fSpeedVector[((kFWMaxNodesPerBus+1)*kFWMaxNodesPerBus)/2]; + // Max speed between two nodes + busState fBusState; // Which state are we in? + int fNumROMReads; // Number of device ROMs we are still reading + // SelfIDs + int fNumSelfIDs; // Total number of SelfID packets + UInt32 fSelfIDs[kMaxSelfIDs*kFWMaxNodesPerBus]; + + // The local device's Config ROM + UInt32 fROMHeader[5]; // More or less fixed header and bus info block + IOLocalConfigDirectory * fRootDir; // Local Config ROM root directory. + + // log base 2 of maximum packet size the FWIM can send/receive + // Normally calculated from bus info block. + int fMaxSendLog; + int fMaxRecvLog; + + IOFWAddressSpace * fROMAddrSpace; + IOMemoryDescriptor * fBadReadResponse; // Send back easily identified bad data to out of range addrs. + + // Array for outstanding requests (up to 64) + AsyncPendingTrans fTrans[kMaxPendingTransfers]; + int fLastTrans; + + // queue for executing commands that may timeout + timeoutQ fTimeoutQ; + + // queue for commands that can't execute yet + pendingQ fPendingQ; + + // queue for async commands interrupted by bus reset + IOFWCmdQ fAfterResetHandledQ; + + // Command to change bus state after a delay. + IOFWDelayCommand * fDelayedStateChangeCmd; + bool fDelayedStateChangeCmdNeedAbort; + + UInt32 fDelayedPhyPacket; + bool fBusResetScheduled; + ResetState fBusResetState; + IOFWDelayCommand * fBusResetStateChangeCmd; + UInt32 fBusResetDisabledCount; + +#if FIRELOGCORE + IOFireLogPublisher * fFireLogPublisher; +#else + void * fFireLogPublisher; +#endif + + OSData * fAllocatedAddresses; + + UInt32 fDevicePruneDelay; + + IOFWPhysicalAccessMode fPhysicalAccessMode; + IOFWSecurityMode fSecurityMode; + IONotifier * fKeyswitchNotifier; + + IOFireWireIRM * fIRM; + IOFireWirePowerManager * fBusPowerManager; + + bool fGapCountMismatch; + + bool fUseHalfSizePackets; + bool fRequestedHalfSizePackets; + + IOFWNodeScan * fScans[kFWMaxNodesPerBus]; + IOFireWireDuplicateGUIDList * fGUIDDups; + + bool fDelegateCycleMaster; + bool fBadIRMsKnown; + + UInt32 fPreviousGap; + + UInt32 fOutOfTLabels; + UInt32 fOutOfTLabels10S; + UInt32 fOutOfTLabelsThreshold; + +#ifdef LEGACY_SHUTDOWN + IONotifier * fPowerEventNotifier; +#endif + + bool fStarted; + + UInt32 fIOCriticalSectionCount; + UInt32 fHubPort; + UInt32 fDebugIgnoreNode; + + OSSet * fLocalAsyncStreamReceivers; + OSIterator * fAsyncStreamReceiverIterator; + + bool fInstantiated; + + IOReturn fStartStatus; + UInt32 fWaitingForSelfID; + + UInt32 fForcedRootNodeID; + bool fNodeMustBeRootFlag; + bool fNodeMustNotBeRootFlag; + + UInt32 fForcedGapCount; + bool fForcedGapFlag; + + OSSet * fPHYPacketListeners; + OSIterator * fPHYPacketListenersIterator; + + bool fDSLimited; + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + static void clockTick(OSObject *, IOTimerEventSource *); + static void readROMGlue(void *refcon, IOReturn status, + IOFireWireNub *device, IOFWCommand *fwCmd); + static void delayedStateChange(void *refcon, IOReturn status, + IOFireWireBus *bus, IOFWBusCommand *fwCmd); + + virtual void processBusReset(); + virtual void processSelfIDs(UInt32 *IDs, int numIDs, UInt32 *ownIDs, int numOwnIDs); + virtual void processTimeout(IOTimerEventSource *src); + virtual void processRcvPacket( UInt32 *data, int numQuads, IOFWSpeed speed ); + virtual void processWriteRequest(UInt16 sourceID, UInt32 tlabel, + UInt32 *hdr, void *buf, int len, IOFWSpeed speed); + virtual void processLockRequest(UInt16 sourceID, UInt32 tlabel, + UInt32 *hdr, void *buf, int len, IOFWSpeed speed); + + // Process read from a local address, return rcode + virtual UInt32 doReadSpace(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, + IOMemoryDescriptor **buf, IOByteCount * offset, IODMACommand **dma_command, + IOFWRequestRefCon refcon); + + // Process write to a local address, return rcode + virtual UInt32 doWriteSpace(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, + const void *buf, IOFWRequestRefCon refcon); + + // Process lock to a local address, return rcode + UInt32 doLockSpace(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 inlen, + const UInt32 *newVal, UInt32 &outLen, UInt32 *oldVal, + UInt32 extType, IOFWRequestRefCon refcon); + + virtual void updatePlane(); + virtual void startBusScan(); + + // Called when all devices on bus have been examined + virtual void finishedBusScan(); + + virtual void buildTopology(bool doFWPlane); + + virtual void readDeviceROM(IOFWNodeScan *refCon, IOReturn status); + + virtual IOReturn UpdateROM(); + virtual IOReturn allocAddress(IOFWAddressSpace *space); + virtual void freeAddress(IOFWAddressSpace *space); + + IOFireWireBusAux * createAuxiliary( void ); + +public: + + // Initialization + virtual bool init(IOFireWireLink *fwim); + virtual void free(); + virtual bool start(IOService *provider); + virtual void stop( IOService * provider ); + virtual bool finalize( IOOptionBits options ); + virtual bool requestTerminate( IOService * provider, IOOptionBits options ); + + // Power management + virtual IOReturn setPowerState ( unsigned long powerStateOrdinal, IOService* whatDevice ); + + // Implement IOService::getWorkLoop + virtual IOWorkLoop *getWorkLoop() const; + + // Allocate struct for tracking a transaction + virtual AsyncPendingTrans *allocTrans(IOFWAsyncCommand *cmd=NULL); + virtual void freeTrans(AsyncPendingTrans *trans); + + // Really public methods + + virtual IOReturn getCycleTime(UInt32 &cycleTime); + virtual IOReturn getBusCycleTime(UInt32 &busTime, UInt32 &cycleTime); + + // Methods to manipulate the local Config ROM + virtual IOReturn AddUnitDirectory(IOLocalConfigDirectory *unitDir); + virtual IOReturn RemoveUnitDirectory(IOLocalConfigDirectory *unitDir); + + // Cause a bus reset + virtual IOReturn resetBus(); + + // Send async request packets + virtual IOReturn asyncRead( UInt32 generation, + UInt16 nodeID, + UInt16 addrHi, + UInt32 addrLo, + int speed, + int label, + int size, + IOFWAsyncCommand * cmd ); + + virtual IOReturn asyncWrite( UInt32 generation, + UInt16 nodeID, + UInt16 addrHi, + UInt32 addrLo, + int speed, + int label, + IOMemoryDescriptor * buf, + IOByteCount offset, + int size, + IOFWAsyncCommand * cmd ); + + /* DEPRECATED */ virtual IOReturn asyncWrite( UInt32 generation, + /* DEPRECATED */ UInt16 nodeID, + /* DEPRECATED */ UInt16 addrHi, + /* DEPRECATED */ UInt32 addrLo, + /* DEPRECATED */ int speed, + /* DEPRECATED */ int label, + /* DEPRECATED */ void * data, + /* DEPRECATED */ int size, + /* DEPRECATED */ IOFWAsyncCommand * cmd ); + + /* DEPRECATED */ virtual IOReturn asyncLock( UInt32 generation, + /* DEPRECATED */ UInt16 nodeID, + /* DEPRECATED */ UInt16 addrHi, + /* DEPRECATED */ UInt32 addrLo, + /* DEPRECATED */ int speed, + /* DEPRECATED */ int label, + /* DEPRECATED */ int type, + /* DEPRECATED */ void * data, + /* DEPRECATED */ int size, + /* DEPRECATED */ IOFWAsyncCommand * cmd); + + + // Send async read response packets + // useful for pseudo address spaces that require servicing outside the FireWire work loop. + virtual IOReturn asyncReadResponse( UInt32 generation, + UInt16 nodeID, + int speed, + IOMemoryDescriptor * buf, + IOByteCount offset, + int len, + IOFWRequestRefCon refcon ); + + virtual IOReturn asyncLockResponse( UInt32 generation, + UInt16 nodeID, + int speed, + IOMemoryDescriptor * buf, + IOByteCount offset, + int len, + IOFWRequestRefCon refcon ); + + // Try to fix whatever might have caused the other device to not respond + virtual IOReturn handleAsyncTimeout(IOFWAsyncCommand *cmd); + + // Convert a firewire nodeID into the IOFireWireDevice for it + virtual IOFireWireDevice * nodeIDtoDevice(UInt32 generation, UInt16 nodeID); + + // Add/remove a channel from the list informed of bus resets + virtual void addAllocatedChannel(IOFWIsochChannel *channel); + virtual void removeAllocatedChannel(IOFWIsochChannel *channel); + + // Add/remove a IRM allocation from the list informed of bus resets + virtual void addIRMAllocation(IOFireWireIRMAllocation *irmAllocation); + virtual void removeIRMAllocation(IOFireWireIRMAllocation *irmAllocation); + + // Create an Isochronous Channel object + // doIRM = true => allocate channel and bandwith in Isochronous Resource Manager + // packetSize packet size (in bytes), used to calculate bandwidth needed. + virtual IOFWIsochChannel *createIsochChannel( + bool doIRM, UInt32 packetSize, IOFWSpeed prefSpeed, + FWIsochChannelForceStopNotificationProc stopProc=NULL, + void *stopRefCon=NULL); + + // Create a local isochronous port to run the given DCL program + // if task is 0, the DCL program is for the kernel task, + // otherwise all DCL pointers are valid in the specified task. + // opcodes is also pointer valid in the specified task. + virtual IOFWLocalIsochPort *createLocalIsochPort(bool talking, + DCLCommand* opcodes, DCLTaskInfo *info = 0, + UInt32 startEvent = 0, UInt32 startState = 0, UInt32 startMask = 0); + + // Execute specified function on workloop after specified delay + // Returned command is for delay, call it's cancel() function to cancel timeout. + virtual IOFWDelayCommand * createDelayedCmd(UInt32 uSecDelay, FWBusCallback func, void *refcon); + + virtual IOFWPhysicalAddressSpace *createPhysicalAddressSpace(IOMemoryDescriptor *mem); + virtual IOFWPseudoAddressSpace *createPseudoAddressSpace(FWAddress *addr, UInt32 len, + FWReadCallback reader, FWWriteCallback writer, void *refcon); + + // Extract info about the async request + virtual bool isLockRequest(IOFWRequestRefCon refcon); + virtual bool isQuadRequest(IOFWRequestRefCon refcon); + virtual UInt32 getExtendedTCode(IOFWRequestRefCon refcon); + + // Inline accessors for protected member variables + IOFWCmdQ &getTimeoutQ(); + IOFWCmdQ &getPendingQ(); + IOFWCmdQ &getAfterResetHandledQ(); + IOFireWireLink * getLink() const; + + IOLocalConfigDirectory *getRootDir() const; + bool checkGeneration(UInt32 gen) const; + UInt32 getGeneration() const; + UInt16 getLocalNodeID() const; + IOReturn getIRMNodeID(UInt32 &generation, UInt16 &id); + + const AbsoluteTime * getResetTime() const; + + IOFWSpeed FWSpeed(UInt16 nodeAddress) const; + IOFWSpeed FWSpeed(UInt16 nodeA, UInt16 nodeB) const; + + // How big (as a power of two) can packets sent to/received from the node be? + virtual int maxPackLog(bool forSend, UInt16 nodeAddress) const; + + // How big (as a power of two) can packets sent from A to B be? + virtual int maxPackLog(UInt16 nodeA, UInt16 nodeB) const; + + // Force given node to be root (via root holdoff Phy packet) + virtual IOReturn makeRoot(UInt32 generation, UInt16 nodeID) ; + + virtual IOFWPseudoAddressSpace *createInitialAddressSpace(UInt32 addressLo, UInt32 len, + FWReadCallback reader, FWWriteCallback writer, void *refcon); + + virtual IOFWAddressSpace *getAddressSpace(FWAddress address); + + // Extract info about the async request - was the request ack'ed complete already? + virtual bool isCompleteRequest(IOFWRequestRefCon refcon); + + // Are we currently scanning the bus? + bool scanningBus() const; + +protected: + + void openGate(); + void closeGate(); + +protected: + virtual void doBusReset( void ); + static void resetStateChange( void *refcon, IOReturn status, + IOFireWireBus *bus, IOFWBusCommand *fwCmd); + +public: + virtual IOReturn disableSoftwareBusResets( void ); + virtual void enableSoftwareBusResets( void ); + + virtual IOFWAsyncStreamCommand * createAsyncStreamCommand( UInt32 generation, + UInt32 channel, UInt32 sync, UInt32 tag, IOMemoryDescriptor *hostMem, + UInt32 size, int speed,FWAsyncStreamCallback completion, void *refcon); + + virtual IOReturn asyncStreamWrite(UInt32 generation, + int speed, int tag, int sync, int channel, + IOMemoryDescriptor *buf, IOByteCount offset, + int size, IOFWAsyncStreamCommand *cmd); + +protected: + bool inGate(); + + virtual IOReturn allocatePseudoAddress(FWAddress *addr, UInt32 lenDummy); + virtual void freePseudoAddress(FWAddress addr, UInt32 lenDummy); + + virtual IORegistryEntry * createDummyRegistryEntry( IOFWNodeScan *scan ); + + static IOFireWireLocalNode * getLocalNode(IOFireWireController *control); + + virtual void setPhysicalAccessMode( IOFWPhysicalAccessMode mode ); + virtual IOFWPhysicalAccessMode getPhysicalAccessMode( void ); + virtual void physicalAccessProcessBusReset( void ); + virtual void setNodeIDPhysicalFilter( UInt16 nodeID, bool state ); + + virtual void initSecurity( void ); + virtual void freeSecurity( void ); + static bool serverKeyswitchCallback( void * target, void * refCon, IOService * service, IONotifier * notifier ); + virtual void setSecurityMode( IOFWSecurityMode mode ); + virtual IOFWSecurityMode getSecurityMode( void ); + + virtual IOReturn createTimeoutQ( void ); + virtual void destroyTimeoutQ( void ); + virtual IOReturn createPendingQ( void ); + virtual void destroyPendingQ( void ); + + virtual UInt32 countNodeIDChildren( UInt16 nodeID, int hub_port = 0, int * hubChildRemainder = NULL, bool * hubParentFlag = NULL ); + +public: + virtual UInt32 hopCount(UInt16 nodeAAddress, UInt16 nodeBAddress ); + virtual UInt32 hopCount(UInt16 nodeAAddress ); + + virtual IOFireWirePowerManager * getBusPowerManager( void ); + +protected: + virtual void handleARxReqIntComplete(); + + virtual IOReturn asyncLock( UInt32 generation, + UInt16 nodeID, + UInt16 addrHi, + UInt32 addrLo, + int speed, + int label, + int type, + IOMemoryDescriptor * buf, + IOByteCount offset, + int size, + IOFWAsyncCommand * cmd ); + + virtual IOReturn asyncWrite( UInt32 generation, + UInt16 nodeID, + UInt16 addrHi, + UInt32 addrLo, + int speed, + int label, + IOMemoryDescriptor * buf, + IOByteCount offset, + int size, + IOFWAsyncCommand * cmd, + IOFWWriteFlags flags ); + +protected: + bool delayedStateCommandInUse() const; + void enterBusResetDisabledState( ); + + virtual UInt32 getPortNumberFromIndex( UInt16 index ); + + virtual bool checkForDuplicateGUID(IOFWNodeScan *scan, CSRNodeUniqueID *currentGUIDs ); + virtual void updateDevice(IOFWNodeScan *scan ); + virtual bool AssignCycleMaster(); + +public: + + IOReturn clipMaxRec2K(Boolean clipMaxRec ); + void setNodeSpeed( UInt16 nodeAddress, IOFWSpeed speed ); + void useHalfSizePackets( void ); + void disablePhyPortOnSleepForNodeID( UInt32 nodeID ); + + IOReturn handleAsyncCompletion( IOFWCommand *cmd, IOReturn status ); + void processCycle64Int(); + +#ifdef LEGACY_SHUTDOWN + static IOReturn systemShutDownHandler( void * target, void * refCon, + UInt32 messageType, IOService * service, + void * messageArgument, vm_size_t argSize ); +#else + virtual void systemWillShutdown( IOOptionBits specifier ); +#endif + + IOReturn beginIOCriticalSection( void ); + void endIOCriticalSection( void ); + +protected: + IOReturn poweredStart( void ); + void setNodeSpeed( UInt16 nodeA, UInt16 nodeB, UInt8 speed ); + void setNodeSpeed( UInt16 nodeAddress, UInt8 speed ); + +public: + bool isPhysicalAccessEnabledForNodeID( UInt16 nodeID ); + + // Allocate IRM bandwidth if the specified generation is the current FireWire generation. + IOReturn allocateIRMBandwidthInGeneration(UInt32 bandwidthUnits, UInt32 generation) ; + + // Release IRM bandwidth if the specified generation is the current FireWire generation. + IOReturn releaseIRMBandwidthInGeneration(UInt32 bandwidthUnits, UInt32 generation) ; + + // Allocate IRM channel if the specified generation is the current FireWire generation. + IOReturn allocateIRMChannelInGeneration(UInt8 isochChannel, UInt32 generation) ; + + // Release IRM channel if the specified generation is the current FireWire generation. + IOReturn releaseIRMChannelInGeneration(UInt8 isochChannel, UInt32 generation) ; + + // Create an IOFireWireIRMAllocation object which can be used to allocate isoch resources that are automatically reallocated after bus-resets! + IOFireWireIRMAllocation *createIRMAllocation(Boolean releaseIRMResourcesOnFree = true, + IOFireWireIRMAllocation::AllocationLostNotificationProc allocationLostProc = NULL, + void *pLostNotificationProcRefCon = NULL); + + IOFWAsyncStreamListener *createAsyncStreamListener( UInt32 channel, FWAsyncStreamReceiveCallback proc, void *refcon ); + + void removeAsyncStreamListener( IOFWAsyncStreamListener *listener ); + + IOFWSpeed getBroadcastSpeed(){ return FWSpeed( fLocalNodeID ); }; + +private: + + IOFWAsyncStreamReceiver *allocAsyncStreamReceiver( UInt32 channel, FWAsyncStreamReceiveCallback proc, void *refcon ); + + IOFWAsyncStreamReceiver *getAsyncStreamReceiver( UInt32 channel ); + + void freeAllAsyncStreamReceiver(); + + void activateAsyncStreamReceivers(); + + void deactivateAsyncStreamReceivers(); + +protected: + IOService *findKeyswitchDevice( void ); + void suspendBus( void ); + +public: + virtual IOReturn asyncRead( UInt32 generation, + UInt16 nodeID, + UInt16 addrHi, + UInt32 addrLo, + int speed, + int label, + int size, + IOFWAsyncCommand * cmd, + IOFWReadFlags flags ); + + void checkProgress( void ); + + void terminateDevice( IOFireWireDevice * device ); + + void nodeMustBeRoot( UInt32 nodeID ); + + void nodeMustNotBeRoot( UInt32 nodeID ); + + void setGapCount( UInt32 gapCount ); + + IOReturn asyncPHYPacket( UInt32 generation, + UInt32 data, + UInt32 data2, + IOFWAsyncPHYCommand * cmd ); + + IOFWAsyncPHYCommand * createAsyncPHYCommand( UInt32 generation, + UInt32 data1, + UInt32 data2, + FWAsyncPHYCallback completion, + void * refcon, + bool failOnReset ); + +private: + AsyncPendingTrans * allocTrans( IOFWAsyncCommand * cmd, IOFWCommand * altcmd ); + +public: + + IOReturn activatePHYPacketListener( IOFWPHYPacketListener * listener ); + void deactivatePHYPacketListener( IOFWPHYPacketListener * listener ); + + IOFWPHYPacketListener * createPHYPacketListener( FWPHYPacketCallback proc, void * refcon ); + +private: + void processPHYPacket( UInt32 data1, UInt32 data2 ); + void enterLoggingMode( void ); + +public: + IOReturn getCycleTimeAndUpTime( UInt32 &cycleTime, UInt64 &uptime ); + +protected: + void removeAsyncStreamReceiver( IOFWAsyncStreamReceiver *receiver ); + +public: + + // Create a multi-isoch-receive listener + IOFireWireMultiIsochReceiveListener * createMultiIsochReceiveListener(UInt32 channel, + FWMultiIsochReceiveListenerCallback callback, + void *pCallbackRefCon, + FWMultiIsochReceiveListenerParams *pListenerParams = NULL); + + // Activate a multi-isoch-receive listener + IOReturn activateMultiIsochReceiveListener(IOFireWireMultiIsochReceiveListener *pListener); + + // Deactivate a multi-isoch-receive listener + IOReturn deactivateMultiIsochReceiveListener(IOFireWireMultiIsochReceiveListener *pListener); + + // Call for client to specify he is done with a multi-isoch receiver isoch packet + void clientDoneWithMultiIsochReceivePacket(IOFireWireMultiIsochReceivePacket *pPacket); + +public: + virtual IOFWAsyncStreamCommand * createAsyncStreamCommand( UInt32 generation, + UInt32 channel, UInt32 sync, UInt32 tag, IOMemoryDescriptor *hostMem, + UInt32 size, int speed,FWAsyncStreamCallback completion, void *refcon, bool failOnReset); + +private: + void addToIRMAllocationSet(IOFireWireIRMAllocation *anObject); + void removeFromIRMAllocationSet(IOFireWireIRMAllocation *anObject); + +protected: + OSMetaClassDeclareReservedUnused(IOFireWireController, 0); + OSMetaClassDeclareReservedUnused(IOFireWireController, 1); + OSMetaClassDeclareReservedUnused(IOFireWireController, 2); + OSMetaClassDeclareReservedUnused(IOFireWireController, 3); + OSMetaClassDeclareReservedUnused(IOFireWireController, 4); + OSMetaClassDeclareReservedUnused(IOFireWireController, 5); + OSMetaClassDeclareReservedUnused(IOFireWireController, 6); + OSMetaClassDeclareReservedUnused(IOFireWireController, 7); + OSMetaClassDeclareReservedUnused(IOFireWireController, 8); + +}; + +#endif /* ! _IOKIT_IOFIREWIRECONTROLLER_H */ diff --git a/i386/include/IOKit/firewire/IOFireWireDevice.h b/i386/include/IOKit/firewire/IOFireWireDevice.h new file mode 100644 index 0000000..a68e5a2 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFireWireDevice.h @@ -0,0 +1,289 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + /*! @header + This header contains the definition of the IOFireWireDevice and IOFireWireDeviceAux classes. + An IOFireWireDevice object represents a FireWire device in the I/O Registry. + It is strongly recommended that you write applications that access FireWire devices rather than in-kernel device drivers. + For more information on how to do this, see {@linkdoc //apple_ref/doc/uid/TP40000969 FireWire Device Interface Guide}. + @indexgroup FireWire + */ +#ifndef _IOKIT_IOFIREWIREDEVICE_H +#define _IOKIT_IOFIREWIREDEVICE_H + +#include + +class IOFireWireROMCache; + +struct IOFWNodeScan; +struct RomScan; + +class IOFireWireDevice; + +#pragma mark - + +/*! @class IOFireWireDeviceAux + @discussion An IOFireWireDeviceAux is for internal use only. You should never subclass IOFireWireDeviceAux +*/ + +class IOFireWireDeviceAux : public IOFireWireNubAux +{ + OSDeclareDefaultStructors(IOFireWireDeviceAux) + + friend class IOFireWireDevice; + +protected: + + UInt32 fUnitCount; + IOFWSpeed fMaxSpeed; + OSSet * fOpenUnitSet; + AbsoluteTime fResumeTime; + + /*! + @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + + struct ExpansionData { }; + + /*! + @var reserved + Reserved for future use. (Internal use only) + */ + + ExpansionData * reserved; + + virtual bool init( IOFireWireDevice * primary ); + + virtual void free(); + + virtual bool isTerminated( void ); + + virtual void setTerminationState( TerminationState state ); + + void setMaxSpeed( IOFWSpeed speed ); + + void setUnitCount( UInt32 count ); + + UInt32 getUnitCount( void ); + + bool isPhysicalAccessEnabled( void ); + + virtual IOFWSimpleContiguousPhysicalAddressSpace * createSimpleContiguousPhysicalAddressSpace( vm_size_t size, IODirection direction ); + + virtual IOFWSimplePhysicalAddressSpace * createSimplePhysicalAddressSpace( vm_size_t size, IODirection direction ); + + OSSet * getOpenUnitSet() const; + + void latchResumeTime( void ); + + AbsoluteTime getResumeTime( void ); + +private: + OSMetaClassDeclareReservedUnused(IOFireWireDeviceAux, 0); + OSMetaClassDeclareReservedUnused(IOFireWireDeviceAux, 1); + OSMetaClassDeclareReservedUnused(IOFireWireDeviceAux, 2); + OSMetaClassDeclareReservedUnused(IOFireWireDeviceAux, 3); +}; + +#pragma mark - +/*! @class IOFireWireDevice + @abstract Represents a FireWire device. + @discussion The FireWire family tries to read the configuration ROM of each device on the FireWire bus. For each device that responds with + its bus information block, the FireWire family publishes an IOFireWireDevice object in the I/O Registry. An + IOFireWireDevice object keeps track of the device's node ID, copies config ROM properties into the object's property + list, and scans the config ROM for unit directories, publishing an IOFireWireUnit object for each unit directory it finds. +*/ + +class IOFireWireDevice : public IOFireWireNub +{ + OSDeclareDefaultStructors(IOFireWireDevice) + + friend class IOFireWireController; + friend class IOFireWireDeviceAux; + +protected: + + enum RegistrationState + { + kDeviceRegistered, + kDeviceNeedsRegisterService, + kDeviceNotRegistered + }; + + IOFireWireROMCache *fDeviceROM; + bool fOpenFromDevice; + UInt32 fOpenFromUnitCount; + UInt32 fROMGeneration; + IORecursiveLock *fROMLock; + RegistrationState fRegistrationState; + UInt32 fROMReadRetry; + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + static void readROMDirGlue(void *refcon, IOReturn status, + IOFireWireNub *device, IOFWCommand *fwCmd); + static void readROMThreadFunc(void *arg); + + static void terminateDevice(void *arg); + + void processROM(RomScan *romScan); + + virtual void free(); + +public: + virtual IOReturn message( UInt32 type, IOService * provider, void * argument ); + + virtual bool handleOpen( IOService * forClient, IOOptionBits options, void * arg ); + + virtual void handleClose( IOService * forClient, IOOptionBits options ); + + virtual bool handleIsOpen( const IOService * forClient ) const; + +protected: + virtual IOReturn cacheROM(OSData *rom, UInt32 offset, const UInt32 *&romBase); + + virtual const UInt32 * getROMBase(); + + virtual void setNodeROM(UInt32 generation, UInt16 localNodeID, const IOFWNodeScan *info); + +public: + virtual bool matchPropertyTable(OSDictionary * table); + + /*! @function init + @abstract Initializes the nub. + @param propTable Property table passed to the standard nub initialization. + @param scan Pointer to the node scan structure. + @result Returns true if initialization was successful; false otherwise. + */ + virtual bool init(OSDictionary * propTable, const IOFWNodeScan *scan); + + virtual bool attach(IOService * provider ); + + virtual bool finalize( IOOptionBits options ); + + /*! @function setNodeFlags + @abstract Sets the node's characteristics. + @param flags Refer to "node flags" in IOFireWireFamilyCommon.h. + */ + virtual void setNodeFlags( UInt32 flags ); + + /*! @function clearNodeFlags + @abstract Resets the node's characteristics. + @param flags Refer to "node flags" in IOFireWireFamilyCommon.h. + */ + virtual void clearNodeFlags( UInt32 flags ); + + /*! @function getNodeFlags + @abstract Retrieves the node's characteristics. + @param flags Refer to "node flags" in IOFireWireFamilyCommon.h. + @result UInt32 The flags set for a particular node. + */ + virtual UInt32 getNodeFlags( void ); + +protected: + virtual IOReturn configureNode( void ); + +public: + /*! @function createPhysicalAddressSpace + @abstract Creates local physical FireWire address spaces for the device to access. + @param mem Memory area allocated to back the physical access by Link hardware. + @result A valid IOFWPhysicalAddressSpace object on success; NULL on failure. + */ + virtual IOFWPhysicalAddressSpace *createPhysicalAddressSpace(IOMemoryDescriptor *mem); + + /*! @function createPseudoAddressSpace + @abstract Creates local pseudo FireWire address spaces for the device to access. + @param addr The FireWire address that is mapped to the pseudo address access. + @param len Size of the address space to allocate. + @param reader Read callback, when the device reads from this address space. + @param writer Write callback, when the device writes to this address space. + @param refcon Client's callback object returned during reader/writer callbacks. + @result A valid IOFWPseudoAddressSpace object on success; NULL on failure. + */ + virtual IOFWPseudoAddressSpace *createPseudoAddressSpace(FWAddress *addr, UInt32 len, + FWReadCallback reader, FWWriteCallback writer, void *refcon); + +protected: + virtual IOReturn readRootDirectory( IOConfigDirectory * directory, OSDictionary * propTable ); + + virtual IOReturn processRootDirectory( OSDictionary * propTable ); + + virtual IOReturn readUnitDirectories( IOConfigDirectory * directory, OSSet * unitInfo ); + + virtual IOReturn processUnitDirectories( OSSet * unitSet ); + + virtual void setRegistrationState( RegistrationState fRegistrationState ); + + virtual void preprocessDirectories( OSDictionary * rootPropTable, OSSet * unitSet ); + + virtual void configurePhysicalFilter( void ); + +protected: + virtual IOFireWireNubAux * createAuxiliary( void ); + +public: + inline bool isTerminated( void ) + { return ((IOFireWireDeviceAux*)fAuxiliary)->isTerminated(); } + + /*! @function setMaxSpeed + @abstract Sets the maximum speed for this node. + @param speed Maximum speed. Refer to "bus speed numbers" in IOFireWireFamilyCommon.h. + */ + inline void setMaxSpeed( IOFWSpeed speed ) + { ((IOFireWireDeviceAux*)fAuxiliary)->setMaxSpeed( speed ); } + +protected: + inline void setUnitCount( UInt32 count ) + { ((IOFireWireDeviceAux*)fAuxiliary)->setUnitCount( count ); } + + inline OSSet * getOpenUnitSet( void ) const + { return ((IOFireWireDeviceAux*)fAuxiliary)->getOpenUnitSet(); } + +public: + /*! @function getUnitCount + @abstract Returns number of units attached to this device. + @result UInt32 The number of units attached to this device. + */ + inline UInt32 getUnitCount( void ) + { return ((IOFireWireDeviceAux*)fAuxiliary)->getUnitCount(); } + +protected: + inline AbsoluteTime getResumeTime( void ) + { return ((IOFireWireDeviceAux*)fAuxiliary)->getResumeTime(); } + + inline void latchResumeTime( void ) + { ((IOFireWireDeviceAux*)fAuxiliary)->latchResumeTime(); } + +private: + OSMetaClassDeclareReservedUnused(IOFireWireDevice, 0); + OSMetaClassDeclareReservedUnused(IOFireWireDevice, 1); + +}; + +#endif /* ! _IOKIT_IOFIREWIREDEVICE_H */ diff --git a/i386/include/IOKit/firewire/IOFireWireFamilyCommon.h b/i386/include/IOKit/firewire/IOFireWireFamilyCommon.h new file mode 100644 index 0000000..ceb426d --- /dev/null +++ b/i386/include/IOKit/firewire/IOFireWireFamilyCommon.h @@ -0,0 +1,1235 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * IOFireWireFamilyCommon.h + * IOFireWireUserClient/IOFireWireFamily + * + * Created by NWG on Fri Apr 28 2000. + * Copyright (c) 2000-2001 Apple Computer, Inc. All rights reserved. + * + */ +/* + $Log: IOFireWireFamilyCommon.h,v $ + Revision 1.79 2008/07/15 01:29:44 collin + & + + Revision 1.78 2008/05/08 02:33:22 collin + more K64 + + Revision 1.77 2008/04/24 00:01:39 collin + more K640 + + Revision 1.76 2007/12/05 04:52:08 collin + integrate chex workaround + + Revision 1.75 2007/08/31 20:29:06 collin + fixed 5437835 + + Revision 1.74 2007/04/24 21:40:23 arulchan + headerdoc changes + + Revision 1.73 2007/04/24 21:28:24 arulchan + changes for headerdoc + + Revision 1.72 2007/04/13 19:37:01 calderon + Integrated FireWireKPrintf implemented + + Revision 1.71 2007/03/14 18:41:43 collin + *** empty log message *** + + Revision 1.70 2007/02/28 23:10:13 ayanowit + Another IRMAllocation fix. + + Revision 1.69 2007/02/20 01:25:28 collin + *** empty log message *** + + Revision 1.68 2007/02/17 00:26:51 collin + *** empty log message *** + + Revision 1.67 2007/02/15 19:42:07 ayanowit + For 4369537, eliminated support for legacy DCL SendPacketWithHeader, since it didn't work anyway, and NuDCL does support it. + + Revision 1.66 2007/02/15 01:23:39 arulchan + changes in AssignCycleMaster + + Revision 1.65 2007/02/09 04:44:06 collin + *** empty log message *** + + Revision 1.64 2007/01/26 20:52:31 ayanowit + changes to user-space isoch stuff to support 64-bit apps. + + Revision 1.63 2007/01/16 01:41:02 gecko1 + 4159728 Add improved async lock based check for bad IRMs + + Revision 1.62 2007/01/15 23:29:05 arulchan + Fixed Skipped Packet Handler Notifications + + Revision 1.61 2007/01/12 22:15:14 arulchan + Added flag kIOFWEnableBeingRoot + + Revision 1.60 2007/01/10 22:14:44 calderon + Fixed 4046607 Propagate vendor/model from IIDC UnitDepedantInfoDir + Fixed some null termination shinanigans in getIndexValue(string) + + Revision 1.59 2007/01/08 18:47:19 ayanowit + More 64-bit changes for isoch. + + Revision 1.58 2006/07/07 20:18:25 calderon + 4227201: SpeedMap and HopCount table reductions. + + Revision 1.57 2006/04/03 21:29:48 collin + *** empty log message *** + + Revision 1.56 2006/02/09 00:21:51 niels + merge chardonnay branch to tot + + Revision 1.55.4.1 2005/08/06 01:31:31 collin + *** empty log message *** + + Revision 1.55 2005/03/12 03:27:51 collin + *** empty log message *** + + Revision 1.54 2005/01/12 06:34:53 collin + *** empty log message *** + + Revision 1.53 2004/05/04 22:52:19 niels + *** empty log message *** + + Revision 1.52 2004/03/26 01:42:53 gecko1 + Add code to disable any port directly connected to an iPod when we go to sleep. + + Revision 1.51 2004/03/05 00:33:59 calderon + Fixed 3570909 - FireWire - iokit_fw_errs should be defined in hex + All decimal #define errors in header changed to hex + + Revision 1.50 2003/11/07 21:01:18 niels + Revision 1.49 2003/10/21 01:16:41 collin + Revision 1.48 2003/10/17 00:25:24 collin + Revision 1.47 2003/10/15 02:19:45 collin + Revision 1.46 2003/07/22 10:49:47 niels + Revision 1.45 2003/07/21 06:52:59 niels + merge isoch to TOT + + Revision 1.44.4.5 2003/07/21 06:44:44 niels + Revision 1.44.4.4 2003/07/18 00:17:42 niels + Revision 1.44.4.3 2003/07/14 22:08:53 niels + Revision 1.44.4.2 2003/07/09 21:24:01 niels + Revision 1.44.4.1 2003/07/01 20:54:07 niels + isoch merge + + Revision 1.44 2003/03/17 01:05:22 collin + Revision 1.43 2003/03/07 01:26:06 collin + Revision 1.42 2003/02/19 22:33:17 niels + add skip cycle DCL + + Revision 1.41 2003/02/18 00:14:01 collin + Revision 1.40 2003/02/17 21:47:52 collin + Revision 1.39 2002/12/05 19:08:37 niels + remove trailing commas from enums in IOFireWireFamilyCommon.h + + Revision 1.38 2002/11/01 20:45:57 collin + add enhanced IRM with support for the BROADCAST_CHANNEL register + + Revision 1.37 2002/10/01 02:40:27 collin + security mode support + + Revision 1.36 2002/09/25 21:17:14 collin + fix headers again. + + Revision 1.35 2002/09/25 00:27:23 niels + flip your world upside-down + + Revision 1.34 2002/09/12 22:41:53 niels + add GetIRMNodeID() to user client + +*/ + +/*! @header IOFireWireFamilyCommon.h +This file contains useful definitions for working with FireWire +in the kernel and in user space +*/ + +#ifndef __IOFireWireFamilyCommon_H__ +#define __IOFireWireFamilyCommon_H__ + +#ifdef KERNEL +#ifndef __IOKIT_IOTYPES_H + #include +#endif +#else +#include +#endif + +//#define LEGACY_SHUTDOWN + +#define FW_OLD_DCL_DEFS +#define FW_OLD_BIT_DEFS + +// ================================================================= +// bit ranges and fields +// ================================================================= +#pragma mark - +#pragma mark BITS + +// FireWire bit defs. + +#define BIT(x) ( 1 << (x) ) +#define FW_BIT(x) ( 1 << (31 - (x) ) ) + +#define FWBitRange(start, end) \ +( \ + ((((UInt32) 0xFFFFFFFF) << (start)) >> \ + ((start) + (31 - (end)))) << \ + (31 - (end)) \ +) + +#define FWBitRangePhase(start, end) \ + (31 - (end)) + +#define BitRange(start, end) \ +( \ + ((((UInt32) 0xFFFFFFFF) << (31 - (end))) >> \ + ((31 - (end)) + (start))) << \ + (start) \ +) + + +#define BitRangePhase(start, end) \ + (start) + +// ================================================================= +// FireWire messages & errors +// ================================================================= +#pragma mark - +#pragma mark MESSAGES AND ERRORS + +#define iokit_fw_err(return) (sys_iokit|sub_iokit_firewire|return) + +// e0008010 -> 0xe000801f Response codes from response packets + +// Base of Response error codes +#define kIOFireWireResponseBase iokit_fw_err(0x10) + +// e0008020 -- Bus reset during command execution (current bus generation does +// not match that specified in command.) +#define kIOFireWireBusReset (kIOFireWireResponseBase+kFWResponseBusResetError) + +// e0008001 -- Can't find requested entry in ROM +#define kIOConfigNoEntry iokit_fw_err(0x1) + +// e0008002 -- In pending queue waiting to execute +#define kIOFireWirePending iokit_fw_err(0x2) + +// e0008003 -- Last DCL callback of program (internal use) +#define kIOFireWireLastDCLToken iokit_fw_err(0x3) + +// e0008004 +#define kIOFireWireConfigROMInvalid iokit_fw_err(0x4) + +// e0008005 +#define kIOFireWireAlreadyRegistered iokit_fw_err(0x5) + +// e0008006 +#define kIOFireWireMultipleTalkers iokit_fw_err(0x6) + +// e0008007 +#define kIOFireWireChannelActive iokit_fw_err(0x7) + +// e0008008 +#define kIOFireWireNoListenerOrTalker iokit_fw_err(0x8) + +// e0008009 +#define kIOFireWireNoChannels iokit_fw_err(0x9) + +// e000800A +#define kIOFireWireChannelNotAvailable iokit_fw_err(0xA) + +// e000800B +#define kIOFireWireSeparateBus iokit_fw_err(0xB) + +// e000800C +#define kIOFireWireBadSelfIDs iokit_fw_err(0xC) + +// e000800D +#define kIOFireWireLowCableVoltage iokit_fw_err(0xD) + +// e000800E +#define kIOFireWireInsufficientPower iokit_fw_err(0xE) + +// e000800f +#define kIOFireWireOutOfTLabels iokit_fw_err(0xF) + +// NOTE: errors 16Ñ31 used for address space response codes.. (see above) + +// e0008101 +#define kIOFireWireBogusDCLProgram iokit_fw_err(0x101) + +// e0008102 +#define kIOFireWireTalkingAndListening iokit_fw_err(0x102) + +// e0008103 +#define kIOFireWireHardwareSlept iokit_fw_err(0x103) + +// e0008104 // let's resume here... + +// e0008104 -- In the middle of completing +#define kIOFireWireCompleting iokit_fw_err(0x104) + +// e0008105 -- Invalid Response Length +#define kIOFireWireInvalidResponseLength iokit_fw_err(0x105) + +// e0008106 -- Isoch Bandwidth Not Available +#define kIOFireWireIsochBandwidthNotAvailable iokit_fw_err(0x106) + + +// e00087d0 +#define kIOFWMessageServiceIsRequestingClose (UInt32)iokit_fw_err(0x7D0) +#define kIOFWMessagePowerStateChanged (UInt32)iokit_fw_err(0x7D1) +#define kIOFWMessageTopologyChanged (UInt32)iokit_fw_err(0x7D2) +// ================================================================= +// Pseudo address space response codes +// ================================================================= +#pragma mark - +#pragma mark PSEDUO ADDRESS SPACE RESPONSE CODES +enum +{ + kFWResponseComplete = 0, // OK! + kFWResponseConflictError = 4, // Resource conflict, may retry + kFWResponseDataError = 5, // Data not available + kFWResponseTypeError = 6, // Operation not supported + kFWResponseAddressError = 7, // Address not valid in target device + kFWResponseBusResetError = 16, // Pseudo response generated locally + kFWResponsePending = 17 // Pseudo response, real response sent later. +}; + +// +// Pseudo address space response codes +// +enum +{ + kFWAckTimeout = -1, // Pseudo ack generated locally + kFWAckComplete = 1, + kFWAckPending = 2, + kFWAckBusyX = 4, + kFWAckBusyA = 5, + kFWAckBusyB = 6, + kFWAckDataError = 13, + kFWAckTypeError = 14 +}; + +// ================================================================= +// FireWire bus speed numbers +// ================================================================= +#pragma mark - +#pragma mark BUS SPEED NUMBERS + +typedef enum +{ + kFWSpeed100MBit = 0, + kFWSpeed200MBit = 1, + kFWSpeed400MBit = 2, + kFWSpeed800MBit = 3, + kFWSpeedReserved = 3, // In all cases, 1394B Devices report this speed, + // each port of the PHY could be different + + kFWSpeedUnknownMask = 0x80, // If speed was reserved and we haven't probed it further + + kFWSpeedMaximum = 0x7FFFFFFF, + kFWSpeedInvalid = 0x80000000 +} IOFWSpeed; + +// ================================================================= +// FWAddress +// ================================================================= +#pragma mark - +#pragma mark FWADDRESS +// +// The venerable FWAddress structure. This is the standard +// struct to use for passing FireWire addresses. +// + +typedef struct FWAddressStruct +{ + UInt16 nodeID; // bus/node + UInt16 addressHi; // Top 16 bits of node address. + UInt32 addressLo; // Bottom 32 bits of node address + + // + // Useful C++ only constructors + // + #ifdef __cplusplus + FWAddressStruct(const FWAddressStruct & a): + nodeID(a.nodeID), addressHi(a.addressHi), addressLo(a.addressLo) {}; + FWAddressStruct(UInt16 h=0xdead, UInt32 l=0xcafebabe) : + nodeID(0), addressHi(h), addressLo(l) {}; + FWAddressStruct(UInt16 h, UInt32 l, UInt16 n) : + nodeID(n), addressHi(h), addressLo(l) {}; + #endif +} FWAddress, *FWAddressPtr ; + +// ================================================================= +// Config ROM +// ================================================================= +#pragma mark - +#pragma mark CONFIG ROM + +// +// CSR bit defs. +// + +#define CSR_BIT(x) FW_BIT(x) + +#define CSRBitRange(start, end) \ +( \ + ((((UInt32) 0xFFFFFFFF) << (start)) >> \ + ((start) + (31 - (end)))) << \ + (31 - (end)) \ +) + +#define CSRBitRangePhase(start, end) \ + (31 - end) + +// +// Key types. +// + +typedef enum +{ + kConfigImmediateKeyType = 0, + kConfigOffsetKeyType = 1, + kConfigLeafKeyType = 2, + kConfigDirectoryKeyType = 3, + kInvalidConfigROMEntryType = 0xff +} IOConfigKeyType; + +// +// Key values. +// + +enum +{ + kConfigTextualDescriptorKey = 0x01, + kConfigBusDependentInfoKey = 0x02, + kConfigModuleVendorIdKey = 0x03, + kConfigModuleHwVersionKey = 0x04, + kConfigModuleSpecIdKey = 0x05, + kConfigModuleSwVersionKey = 0x06, + kConfigModuleDependentInfoKey = 0x07, + kConfigNodeVendorIdKey = 0x08, + kConfigNodeHwVersionKey = 0x09, + kConfigNodeSpecIdKey = 0x0A, + kConfigNodeSwVersionKey = 0x0B, + kConfigNodeCapabilitiesKey = 0x0C, + kConfigNodeUniqueIdKey = 0x0D, + kConfigNodeUnitsExtentKey = 0x0E, + kConfigNodeMemoryExtentKey = 0x0F, + kConfigNodeDependentInfoKey = 0x10, + kConfigUnitDirectoryKey = 0x11, + kConfigUnitSpecIdKey = 0x12, + kConfigUnitSwVersionKey = 0x13, + kConfigUnitDependentInfoKey = 0x14, + kConfigUnitLocationKey = 0x15, + kConfigUnitPollMaskKey = 0x16, + kConfigModelIdKey = 0x17, + kConfigGenerationKey = 0x38, // Apple-specific + + kConfigRootDirectoryKey = 0xffff // Not a real key +}; + +enum +{ + kConfigSBP2LUN = 0x14, + kConfigSBP2Revision = 0x21, + kConfigSBP2MAO = 0x54 +}; + +// Core CSR registers. +enum +{ + kCSRStateUnitDepend = CSRBitRange(0, 15), + kCSRStateUnitDependPhase = CSRBitRangePhase(0, 15), + + kCSRStateBusDepend = CSRBitRange(16, 23), + kCSRStateBusDependPhase = CSRBitRangePhase(16, 23), + + kCSRStateLost = CSR_BIT(24), + kCSRStateDReq = CSR_BIT(25), + kCSRStateELog = CSR_BIT(27), + kCSRStateAtn = CSR_BIT(28), + kCSRStateOff = CSR_BIT(29), + + kCSRStateState = CSRBitRange(30, 31), + kCSRStateStatePhase = CSRBitRangePhase(30, 31), + kCSRStateStateRunning = 0, + kCSRStateStateInitializing = 1, + kCSRStateStateTesting = 2, + kCSRStateStateDead = 3 +}; + +// Config ROM entry bit locations. + +enum +{ + kConfigBusInfoBlockLength = CSRBitRange (0, 7), + kConfigBusInfoBlockLengthPhase = CSRBitRangePhase (0, 7), + + kConfigROMCRCLength = CSRBitRange (8, 15), + kConfigROMCRCLengthPhase = CSRBitRangePhase (8, 15), + + kConfigROMCRCValue = CSRBitRange (16, 31), + kConfigROMCRCValuePhase = CSRBitRangePhase (16, 31), + + kConfigEntryKeyType = CSRBitRange (0, 1), + kConfigEntryKeyTypePhase = CSRBitRangePhase (0, 1), + + kConfigEntryKeyValue = CSRBitRange (2, 7), + kConfigEntryKeyValuePhase = CSRBitRangePhase (2, 7), + + kConfigEntryValue = CSRBitRange (8, 31), + kConfigEntryValuePhase = CSRBitRangePhase (8, 31), + + kConfigLeafDirLength = CSRBitRange (0, 15), + kConfigLeafDirLengthPhase = CSRBitRangePhase (0, 15), + + kConfigLeafDirCRC = CSRBitRange (16, 31), + kConfigLeafDirCRCPhase = CSRBitRangePhase (16, 31) +}; + +// +// Key types. +// +typedef enum +{ + kCSRImmediateKeyType = 0, + kCSROffsetKeyType = 1, + kCSRLeafKeyType = 2, + kCSRDirectoryKeyType = 3, + kInvalidCSRROMEntryType = 0xff +} IOCSRKeyType; + +// CSR 64-bit fixed address defs. + +enum +{ + kCSRNodeID = CSRBitRange (0, 15), + kCSRNodeIDPhase = CSRBitRangePhase (0, 15), + + kCSRInitialMemorySpaceBaseAddressHi = 0x00000000, + kCSRInitialMemorySpaceBaseAddressLo = 0x00000000, + + kCSRPrivateSpaceBaseAddressHi = 0x0000FFFF, + kCSRPrivateSpaceBaseAddressLo = 0xE0000000, + + kCSRRegisterSpaceBaseAddressHi = 0x0000FFFF, + kCSRRegisterSpaceBaseAddressLo = 0xF0000000, + + kCSRCoreRegistersBaseAddress = kCSRRegisterSpaceBaseAddressLo, + kCSRStateClearAddress = kCSRCoreRegistersBaseAddress + 0x0000, + kCSRStateSetAddress = kCSRCoreRegistersBaseAddress + 0x0004, + kCSRNodeIDsAddress = kCSRCoreRegistersBaseAddress + 0x0008, + kCSRResetStartAddress = kCSRCoreRegistersBaseAddress + 0x000C, + kCSRIndirectAddressAddress = kCSRCoreRegistersBaseAddress + 0x0010, + kCSRIndirectDataAddress = kCSRCoreRegistersBaseAddress + 0x0014, + kCSRSplitTimeoutHiAddress = kCSRCoreRegistersBaseAddress + 0x0018, + kCSRSplitTimeoutLoAddress = kCSRCoreRegistersBaseAddress + 0x001C, + kCSRArgumentHiAddress = kCSRCoreRegistersBaseAddress + 0x0020, + kCSRArgumentLoAddress = kCSRCoreRegistersBaseAddress + 0x0024, + kCSRTestStartAddress = kCSRCoreRegistersBaseAddress + 0x0028, + kCSRTestStatusAddress = kCSRCoreRegistersBaseAddress + 0x002C, + kCSRUnitsBaseHiAddress = kCSRCoreRegistersBaseAddress + 0x0030, + kCSRUnitsBaseLoAddress = kCSRCoreRegistersBaseAddress + 0x0034, + kCSRUnitsBoundHiAddress = kCSRCoreRegistersBaseAddress + 0x0038, + kCSRUnitsBoundLoAddress = kCSRCoreRegistersBaseAddress + 0x003C, + kCSRMemoryBaseHiAddress = kCSRCoreRegistersBaseAddress + 0x0040, + kCSRMemoryBaseLoAddress = kCSRCoreRegistersBaseAddress + 0x0044, + kCSRMemoryBoundHiAddress = kCSRCoreRegistersBaseAddress + 0x0048, + kCSRMemoryBoundLoAddress = kCSRCoreRegistersBaseAddress + 0x004C, + kCSRInterruptTargetAddress = kCSRCoreRegistersBaseAddress + 0x0050, + kCSRInterruptMaskAddress = kCSRCoreRegistersBaseAddress + 0x0054, + kCSRClockValueHiAddress = kCSRCoreRegistersBaseAddress + 0x0058, + kCSRClockValueMidAddress = kCSRCoreRegistersBaseAddress + 0x005C, + kCSRClockTickPeriodMidAddress = kCSRCoreRegistersBaseAddress + 0x0060, + kCSRClockTickPeriodLoAddress = kCSRCoreRegistersBaseAddress + 0x0064, + kCSRClockStrobeArrivedHiAddress = kCSRCoreRegistersBaseAddress + 0x0068, + kCSRClockStrobeArrivedMidAddress = kCSRCoreRegistersBaseAddress + 0x006C, + kCSRClockInfo0Address = kCSRCoreRegistersBaseAddress + 0x0070, + kCSRClockInfo1Address = kCSRCoreRegistersBaseAddress + 0x0074, + kCSRClockInfo2Address = kCSRCoreRegistersBaseAddress + 0x0078, + kCSRClockInfo3Address = kCSRCoreRegistersBaseAddress + 0x007C, + kCSRMessageRequestAddress = kCSRCoreRegistersBaseAddress + 0x0080, + kCSRMessageResponseAddress = kCSRCoreRegistersBaseAddress + 0x00C0, + kCSRErrorLogBufferAddress = kCSRCoreRegistersBaseAddress + 0x0180, + + kCSRBusDependentRegistersBaseAddress = kCSRRegisterSpaceBaseAddressLo + 0x0200, + kCSRBusyTimeout = kCSRRegisterSpaceBaseAddressLo + 0x0210, + kCSRBusManagerID = kCSRRegisterSpaceBaseAddressLo + 0x021C, + kCSRBandwidthAvailable = kCSRRegisterSpaceBaseAddressLo + 0x0220, + kCSRChannelsAvailable31_0 = kCSRRegisterSpaceBaseAddressLo + 0x0224, + kCSRChannelsAvailable63_32 = kCSRRegisterSpaceBaseAddressLo + 0x0228, + kCSRBroadcastChannel = kCSRRegisterSpaceBaseAddressLo + 0x0234, + + kConfigROMBaseAddress = kCSRRegisterSpaceBaseAddressLo + 0x0400, + kConfigBIBHeaderAddress = kConfigROMBaseAddress, + kConfigBIBBusNameAddress = kConfigROMBaseAddress + 4, + + kPCRBaseAddress = kCSRRegisterSpaceBaseAddressLo + 0x900, + kFCPCommandAddress = kCSRRegisterSpaceBaseAddressLo + 0xb00, + kFCPResponseAddress = kCSRRegisterSpaceBaseAddressLo + 0xd00 +}; + +// from figure 10-7 of 1394a +#define kBroadcastChannelInitialValues 0x8000001f +#define kBroadcastChannelValidMask 0x40000000 + +// CSR defined 64 bit unique ID. + +typedef UInt64 CSRNodeUniqueID; + +// FireWire core CSR registers. + +enum +{ + kFWCSRStateGone = FW_BIT(16), + kFWCSRStateLinkOff = FW_BIT(22), + kFWCSRStateCMstr = FW_BIT(23) +}; + +// FireWire bus/nodeID address defs. + +enum +{ + kFWAddressBusID = FWBitRange (16, 25) << kCSRNodeIDPhase, + kFWAddressBusIDPhase = FWBitRangePhase (16, 25) + kCSRNodeIDPhase, + + kFWAddressNodeID = FWBitRange (26, 31) << kCSRNodeIDPhase, + kFWAddressNodeIDPhase = FWBitRangePhase (26, 31) + kCSRNodeIDPhase, + + kFWLocalBusID = 1023, + kFWBroadcastNodeID = 63, + kFWBadNodeID = 0xffff, + + kFWLocalBusAddress = kFWLocalBusID << kFWAddressBusIDPhase, + kFWBroadcastAddress = kFWBroadcastNodeID << kFWAddressNodeIDPhase +}; + +#define FWNodeBaseAddress(busID, nodeID) \ +( \ + (busID << kFWAddressBusIDPhase) | \ + (nodeID << kFWAddressNodeIDPhase) \ +) + +#define FWNodeRegisterSpaceBaseAddressHi(busID, nodeID) \ +( \ + FWNodeBaseAddress (busID, nodeID) | \ + kCSRRegisterSpaceBaseAddressHi \ +) + +// FireWire CSR bus info block defs. + +enum +{ + kFWBIBHeaderAddress = kConfigBIBHeaderAddress, + kFWBIBBusNameAddress = kConfigBIBBusNameAddress, + kFWBIBNodeCapabilitiesAddress = kConfigROMBaseAddress + 8, + kFWBIBNodeUniqueIDHiAddress = kConfigROMBaseAddress + 12, + kFWBIBNodeUniqueIDLoAddress = kConfigROMBaseAddress + 16, + + kFWBIBBusName = 0x31333934, //'1394' + + kFWBIBIrmc = FW_BIT(0), + kFWBIBCmc = FW_BIT(1), + kFWBIBIsc = FW_BIT(2), + kFWBIBBmc = FW_BIT(3), + kFWBIBCycClkAcc = FWBitRange (8, 15), + kFWBIBCycClkAccPhase = FWBitRangePhase (8, 15), + kFWBIBMaxRec = FWBitRange (16, 19), + kFWBIBMaxRecPhase = FWBitRangePhase (16, 19), + kFWBIBMaxROM = FWBitRange (20, 21), + kFWBIBMaxROMPhase = FWBitRangePhase (20, 21), + kFWBIBGeneration = FWBitRange (24, 27), + kFWBIBGenerationPhase = FWBitRangePhase (24, 27), + kFWBIBLinkSpeed = FWBitRange (29, 31), + kFWBIBLinkSpeedPhase = FWBitRangePhase (29, 31) +}; + +enum +{ + kConfigUnitSpecAppleA27 = 0x000a27, + kConfigUnitSpec1394TA1 = 0x00a02d, + + kConfigUnitSWVersMacintosh10 = 10, + kConfigUnitSWVersIIDC100 = 0x000100, + kConfigUnitSWVersIIDC101 = 0x000101, + kConfigUnitSWVersIIDC102 = 0x000102 +}; + + +// ================================================================= +// Isoch defines +// ================================================================= +#pragma mark - +#pragma mark ISOCH + +enum +{ + kFWIsochDataLength = FWBitRange (0, 15), + kFWIsochDataLengthPhase = FWBitRangePhase (0, 15), + + kFWIsochTag = FWBitRange (16, 17), + kFWIsochTagPhase = FWBitRangePhase (16, 17), + + kFWIsochChanNum = FWBitRange (18, 23), + kFWIsochChanNumPhase = FWBitRangePhase (18, 23), + + kFWIsochTCode = FWBitRange (24, 27), + kFWIsochTCodePhase = FWBitRangePhase (24, 27), + + kFWIsochSy = FWBitRange (28, 31), + kFWIsochSyPhase = FWBitRangePhase (28, 31) +}; + +#define CHAN_BIT(x) (((UInt64)1) << (63 - (x)) +#define CHAN_MASK(x) (~CHAN_BIT(X)) + +typedef enum +{ + kFWNeverMultiMode = 0, + kFWAllowMultiMode, + kFWSuggestMultiMode, + kFWAlwaysMultiMode, + + kFWDefaultIsochResourceFlags = kFWNeverMultiMode +} IOFWIsochResourceFlags ; + +enum +{ + kFWIsochChannelDefaultFlags = 0, + kFWIsochChannelDoNotResumeOnWake = BIT(1) +} ; + +typedef enum +{ + kFWIsochPortDefaultOptions = 0, + kFWIsochPortUseSeparateKernelThread = BIT(1), + kFWIsochEnableRobustness = BIT(2), + kFWIsochBigEndianUpdates = BIT(3), // private + kFWIsochRequireLastContext = BIT(4), // private +} IOFWIsochPortOptions ; + +// ================================================================= +// DCL opcode defs. +// ================================================================= +#pragma mark - +#pragma mark DCL OPCODES + +enum +{ + kFWDCLImmediateEvent = 0, + kFWDCLCycleEvent = 1, + kFWDCLSyBitsEvent = 2 +}; + +typedef enum +{ + kFWDCLInvalidNotification = 0 + , kFWDCLUpdateNotification = 1 + , kFWDCLModifyNotification = 2 + , kFWNuDCLModifyNotification = 3 + , kFWNuDCLModifyJumpNotification = 4 + , kFWNuDCLUpdateNotification = 5 +} IOFWDCLNotificationType ; + +enum +{ + kFWDCLOpDynamicFlag = BIT(16), + kFWDCLOpVendorDefinedFlag = BIT(17), + kFWDCLOpFlagMask = BitRange (16, 31), + kFWDCLOpFlagPhase = BitRangePhase (16, 31) +}; + +enum +{ + kDCLInvalidOp = 0, + kDCLSendPacketStartOp = 1, + //kDCLSendPacketWithHeaderStartOp = 2, // Deprecated legacy DCL opcode! Use NuDCL instead! + kDCLSendPacketOp = 3, + kDCLSendBufferOp = 4, // obsolete - do not use + kDCLReceivePacketStartOp = 5, + kDCLReceivePacketOp = 6, + kDCLReceiveBufferOp = 7, // obsolete - do not use + kDCLCallProcOp = 8, + kDCLLabelOp = 9, + kDCLJumpOp = 10, + kDCLSetTagSyncBitsOp = 11, + kDCLUpdateDCLListOp = 12, + kDCLTimeStampOp = 13, + kDCLPtrTimeStampOp = 14, + kDCLSkipCycleOp = 15, + + kDCLNuDCLLeaderOp = 20 // compilerData field contains NuDCLRef to start of NuDCL + // program. + // Should not need to use this directly. +}; + +#ifdef FW_OLD_DCL_DEFS + +//typedef struct DCLCommandStruct ; +//typedef void (DCLCallCommandProc)(DCLCommandStruct* command); + +#else + +//typedef struct DCLCommand ; +//typedef void (DCLCallCommandProc)(DCLCommand* command); + +#endif + +// ================================================================= +// DCL structs +// ================================================================= +#pragma mark - +#pragma mark DCL + +#ifdef __LP64__ +typedef void* DCLCallProcDataType; +#else +typedef UInt32 DCLCallProcDataType; +#endif + +#ifdef KERNEL + #ifdef __LP64__ + typedef void* DCLCompilerDataType; + #else + typedef UInt32 DCLCompilerDataType; + #endif +#else + typedef UInt32 DCLCompilerDataType; +#endif + +typedef struct DCLCommandStruct +{ + struct DCLCommandStruct * pNextDCLCommand; // Next DCL command. + DCLCompilerDataType compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + UInt32 operands[1]; // DCL operands (size varies) +} DCLCommand; + +typedef void (DCLCallCommandProc)(DCLCommand * command); + +typedef struct DCLTransferPacketStruct +{ + DCLCommand * pNextDCLCommand; // Next DCL command. + DCLCompilerDataType compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + void * buffer; // Packet buffer. + UInt32 size; // Buffer size. +} DCLTransferPacket ; + +typedef struct DCLTransferBufferStruct +{ + DCLCommand * pNextDCLCommand; // Next DCL command. + DCLCompilerDataType compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + void * buffer; // Buffer. + UInt32 size; // Buffer size. + UInt16 packetSize; // Size of packets to send. + UInt16 reserved; + UInt32 bufferOffset; // Current offset into buffer. +} DCLTransferBuffer ; + +typedef struct DCLCallProcStruct +{ + DCLCommand * pNextDCLCommand; // Next DCL command. + DCLCompilerDataType compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + DCLCallCommandProc * proc; // Procedure to call. + DCLCallProcDataType procData; // Data for use by called procedure. +} DCLCallProc; + +typedef struct DCLLabelStruct +{ + DCLCommand * pNextDCLCommand; // Next DCL command. + DCLCompilerDataType compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. +} DCLLabel; + +typedef struct DCLJumpStruct +{ + DCLCommand * pNextDCLCommand; // Next DCL command. + DCLCompilerDataType compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + DCLLabel * pJumpDCLLabel; // DCL label to jump to. +} DCLJump; + +typedef struct DCLSetTagSyncBitsStruct +{ + DCLCommand * pNextDCLCommand; // Next DCL command. + DCLCompilerDataType compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + UInt16 tagBits; // Tag bits for following packets. + UInt16 syncBits; // Sync bits for following packets. +} DCLSetTagSyncBits; + +typedef struct DCLUpdateDCLListStruct +{ + DCLCommand * pNextDCLCommand; // Next DCL command. + DCLCompilerDataType compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + DCLCommand ** dclCommandList; // List of DCL commands to update. + UInt32 numDCLCommands; // Number of DCL commands in list. +} DCLUpdateDCLList; + +typedef struct DCLTimeStampStruct +{ + DCLCommand * pNextDCLCommand; // Next DCL command. + DCLCompilerDataType compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + UInt32 timeStamp; // Time stamp. +} DCLTimeStamp; + +typedef struct DCLPtrTimeStampStruct +{ + DCLCommand * pNextDCLCommand; // Next DCL command. + DCLCompilerDataType compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + UInt32 * timeStampPtr; // Where to store the time stamp. +} DCLPtrTimeStamp ; + +typedef struct +{ + DCLCommand * pNextDCLCommand ; // unused - always NULL + DCLCompilerDataType compilerData; // Data for use by DCL compiler. + UInt32 opcode ; // must be kDCLNuDCLLeaderOp + void* program ; // NuDCL program here... +} DCLNuDCLLeader ; + +#ifdef FW_OLD_DCL_DEFS + +// should not use these... + +typedef DCLCommand* DCLCommandPtr ; +typedef DCLTransferBuffer* DCLTransferBufferPtr ; +typedef DCLTransferPacket* DCLTransferPacketPtr ; +typedef DCLCallProc* DCLCallProcPtr ; +typedef DCLLabel* DCLLabelPtr ; +typedef DCLJump* DCLJumpPtr ; +typedef DCLSetTagSyncBits* DCLSetTagSyncBitsPtr ; +typedef DCLUpdateDCLList* DCLUpdateDCLListPtr ; +typedef DCLTimeStamp* DCLTimeStampPtr ; +typedef DCLPtrTimeStamp* DCLPtrTimeStampPtr ; +typedef DCLCallCommandProc* DCLCallCommandProcPtr ; + +#endif + + +// ================================================================= +// User-Lib Export DCL structs - Thses structus are used to pass +// a user-created legacy DCL program down into kernel space. These +// structs allow support for both 32-bit and 64-bit user-space clients. +// These structs should only be used internally. They are not for +// clients to create DCL programs with. +// ================================================================= + +typedef struct UserExportDCLCommandStruct +{ + mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct + mach_vm_address_t pNextDCLCommand; // Next DCL command. + uint64_t compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + UInt32 operands[1]; // DCL operands (size varies) +} __attribute__ ((packed)) UserExportDCLCommand; + +typedef void (UserExportDCLCallCommandProc)(UserExportDCLCommand * command); + +typedef struct UserExportDCLTransferPacketStruct +{ + mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct + mach_vm_address_t pNextDCLCommand; // Next DCL command. + uint64_t compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + mach_vm_address_t buffer; // Packet buffer. + UInt32 size; // Buffer size. +} __attribute__ ((packed)) UserExportDCLTransferPacket ; + +typedef struct UserExportDCLTransferBufferStruct +{ + mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct + mach_vm_address_t pNextDCLCommand; // Next DCL command. + uint64_t compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + mach_vm_address_t buffer; // Buffer. + UInt32 size; // Buffer size. + UInt16 packetSize; // Size of packets to send. + UInt16 reserved; + UInt32 bufferOffset; // Current offset into buffer. +} __attribute__ ((packed)) UserExportDCLTransferBuffer ; + +typedef struct UserExportDCLCallProcStruct +{ + mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct + mach_vm_address_t pNextDCLCommand; // Next DCL command. + uint64_t compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + mach_vm_address_t proc; // Procedure to call. + uint64_t procData; // Data for use by called procedure. +} __attribute__ ((packed)) UserExportDCLCallProc; + +typedef struct UserExportDCLLabelStruct +{ + mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct + mach_vm_address_t pNextDCLCommand; // Next DCL command. + uint64_t compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. +} __attribute__ ((packed)) UserExportDCLLabel; + +typedef struct UserExportDCLJumpStruct +{ + mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct + mach_vm_address_t pNextDCLCommand; // Next DCL command. + uint64_t compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + mach_vm_address_t pJumpDCLLabel; // DCL label to jump to. +} __attribute__ ((packed)) UserExportDCLJump; + +typedef struct UserExportDCLSetTagSyncBitsStruct +{ + mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct + mach_vm_address_t pNextDCLCommand; // Next DCL command. + uint64_t compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + UInt16 tagBits; // Tag bits for following packets. + UInt16 syncBits; // Sync bits for following packets. +} __attribute__ ((packed)) UserExportDCLSetTagSyncBits; + +typedef struct UserExportDCLUpdateDCLListStruct +{ + mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct + mach_vm_address_t pNextDCLCommand; // Next DCL command. + uint64_t compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + mach_vm_address_t dclCommandList; // List of DCL commands to update. + UInt32 numDCLCommands; // Number of DCL commands in list. +} __attribute__ ((packed)) UserExportDCLUpdateDCLList; + +typedef struct UserExportDCLTimeStampStruct +{ + mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct + mach_vm_address_t pNextDCLCommand; // Next DCL command. + uint64_t compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + UInt32 timeStamp; // Time stamp. +} __attribute__ ((packed)) UserExportDCLTimeStamp; + +typedef struct UserExportDCLPtrTimeStampStruct +{ + mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct + mach_vm_address_t pNextDCLCommand; // Next DCL command. + uint64_t compilerData; // Data for use by DCL compiler. + UInt32 opcode; // DCL opcode. + mach_vm_address_t timeStampPtr; // Where to store the time stamp. +} __attribute__ ((packed)) UserExportDCLPtrTimeStamp ; + +typedef struct +{ + mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct + mach_vm_address_t pNextDCLCommand ; // unused - always NULL + uint64_t compilerData; // Data for use by DCL compiler. + UInt32 opcode ; // must be kDCLNuDCLLeaderOp + mach_vm_address_t program ; // NuDCL program here... +} __attribute__ ((packed)) UserExportDCLNuDCLLeader ; + + +// ================================================================= +// NuDCL +// ================================================================= +#pragma mark - +#pragma mark NUDCL + +typedef struct __NuDCL * NuDCLRef ; +typedef NuDCLRef NuDCLSendPacketRef ; +typedef NuDCLRef NuDCLSkipCycleRef ; +typedef NuDCLRef NuDCLReceivePacketRef ; + +typedef void (*NuDCLCallback)( void* refcon, NuDCLRef dcl ); + +typedef enum +{ + kNuDCLDynamic = BIT( 1 ), + kNuDCLUpdateBeforeCallback = BIT( 2 ) + +} NuDCLFlags ; + +// ================================================================= +// Miscellaneous +// ================================================================= +#pragma mark - +#pragma mark MISCELLANEOUS + +typedef void* FWClientCommandID ; + +typedef struct IOFireWireSessionRefOpaqueStuct* IOFireWireSessionRef ; + +// +// bus management constants. +// + +enum +{ + kFWBusManagerArbitrationTimeoutDuration = 625 // durationMillisecond +}; + +// +// bus characteristics. +// + +enum +{ + kFWMaxBusses = 1023, + kFWMaxNodesPerBus = 63, + kFWMaxNodeHops = 16 +}; + +/*! @enum NodeFlags + + @abstract Flags that specify characteristics of the FireWire device node. + + @constant kIOFWDisablePhysicalAccess Disable physical memory access + + @constant kIOFWDisableAllPhysicalAccess Disable all physical memory access + + @constant kIOFWEnableRetryOnAckD Enable retry on Ack D + + @constant kIOFWLimitAsyncPacketSize Limit async packet size + + @constant kIOFWDisablePhyOnSleep Disable Phy, when machine is in Sleep mode + + @constant kIOFWMustBeRoot Attempt to make this device root, There is no guarentee Mac OS will succeed in making the device + root. + + @constant kIOFWMustNotBeRoot Attempt to prevent this device from being root, There is no guarentee Mac OS will succeed in preventing the device + from being root. + + @constant kIOFWMustHaveGap63 Attempt to ensure the gap count is 63, when this device is on the bus. Gap 63 reduces bus performance significantly, + so this flag should be used only when absolutely necessary. There is no guarentee Mac OS will succeed in forcing + the gap count to 63. +*/ +enum +{ + kIOFWDisablePhysicalAccess = (1 << 0), + kIOFWDisableAllPhysicalAccess = (1 << 1), + kIOFWEnableRetryOnAckD = (1 << 2), + kIOFWLimitAsyncPacketSize = (1 << 3), + kIOFWDisablePhyOnSleep = (1 << 4), + kIOFWMustBeRoot = (1 << 5), + kIOFWMustNotBeRoot = (1 << 6), + kIOFWMustHaveGap63 = (1 << 7) +}; + +// +// write flags +// + +enum IOFWWriteFlags +{ + kIOFWWriteFlagsNone = 0x00000000, + kIOFWWriteFlagsDeferredNotify = 0x00000001, + kIOFWWriteFastRetryOnBusy = 0x00000002, + kIOFWWriteBlockRequest = 0x00000004, // force a block request +}; + +// +// read flags +// + +enum IOFWReadFlags +{ + kIOFWReadFlagsNone = 0x00000000, + kIOFWReadBlockRequest = 0x00000004, // force a block request + kIOFWReadPingTime = 0x00000008 // ping time +}; + +// +// security modes +// + +enum IOFWSecurityMode +{ + kIOFWSecurityModeNormal = 0, + kIOFWSecurityModeSecure = 1, + kIOFWSecurityModeSecurePermanent = 2 +}; + +// +// physical access settings +// + +enum IOFWPhysicalAccessMode +{ + kIOFWPhysicalAccessEnabled = 0, + kIOFWPhysicalAccessDisabled = 1, + kIOFWPhysicalAccessDisabledForGeneration = 2 +}; + +enum +{ + kIOFWSpecID_AAPL = 0xa27, + kIOFWSWVers_KPF = 0x40 +}; + +// old style bit defs +#ifdef FW_OLD_BIT_DEFS + + #define kBit0 BIT(0) + #define kBit1 BIT(1) + #define kBit2 BIT(2) + #define kBit3 BIT(3) + #define kBit4 BIT(4) + #define kBit5 BIT(5) + #define kBit6 BIT(6) + #define kBit7 BIT(7) + #define kBit8 BIT(8) + #define kBit9 BIT(9) + #define kBit10 BIT(10) + #define kBit11 BIT(11) + #define kBit12 BIT(12) + #define kBit13 BIT(13) + #define kBit14 BIT(14) + #define kBit15 BIT(15) + #define kBit16 BIT(16) + #define kBit17 BIT(17) + #define kBit18 BIT(18) + #define kBit19 BIT(19) + #define kBit20 BIT(20) + #define kBit21 BIT(21) + #define kBit22 BIT(22) + #define kBit23 BIT(23) + #define kBit24 BIT(24) + #define kBit25 BIT(25) + #define kBit26 BIT(26) + #define kBit27 BIT(27) + #define kBit28 BIT(28) + #define kBit29 BIT(29) + #define kBit30 BIT(30) + #define kBit31 BIT(31) + +#endif + +#endif //__IOFireWireFamilyCommon_H__ diff --git a/i386/include/IOKit/firewire/IOFireWireIRMAllocation.h b/i386/include/IOKit/firewire/IOFireWireIRMAllocation.h new file mode 100644 index 0000000..c67986c --- /dev/null +++ b/i386/include/IOKit/firewire/IOFireWireIRMAllocation.h @@ -0,0 +1,116 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOFIREWIREIRMALLOCATION_H +#define _IOKIT_IOFIREWIREIRMALLOCATION_H + +#include + +class IOFireWireController; + +//#include +//#include + +/*! @class IOFireWireIRMAllocation +*/ + +class IOFireWireIRMAllocation : public OSObject +{ + friend class IOFireWireController; + + OSDeclareDefaultStructors(IOFireWireIRMAllocation) + +public: + + // Prototype for the callback if reallocation after bus-reset is unsuccessful. + typedef IOReturn (*AllocationLostNotificationProc)(void* refCon, class IOFireWireIRMAllocation* allocation); + + // Initialize the IRM allocation object. + virtual bool init( IOFireWireController * control, + Boolean releaseIRMResourcesOnFree = true, + AllocationLostNotificationProc allocationLostProc = NULL, + void *pLostProcRefCon = NULL); + + // Specify whether of not the IRM resources should automatically + // be released when freeing this allocation object. + virtual void setReleaseIRMResourcesOnFree(Boolean doRelease); + + // Use the IRMAllocation object to allocate isoch resources + virtual IOReturn allocateIsochResources(UInt8 isochChannel, UInt32 bandwidthUnits); + + // Free isoch resources previously allocated with a call to allocateIsochResources + virtual IOReturn deallocateIsochResources(void); + + // Returns true if isoch resources are currently allocated, and if true, the allocated channel, and amount of isoch bandwidth. + virtual Boolean areIsochResourcesAllocated(UInt8 *pAllocatedIsochChannel, UInt32 *pAllocatedBandwidthUnits); + + // Get the refcon + virtual void * GetRefCon(void); + virtual void SetRefCon(void* refCon); + + // Override the base-class release function for special processing + virtual void release() const; + +protected: + + /*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + // Free the allocation object (and release IRM resources if needed) + virtual void free( void ); + + // Controller will call this to notify about bus-reset complete. + virtual void handleBusReset(UInt32 generation); + + virtual void failedToRealloc(void); + virtual UInt32 getAllocationGeneration(void); + static void threadFunc( void * arg ); + +private: + + AllocationLostNotificationProc fAllocationLostProc; + void *fLostProcRefCon; + Boolean fReleaseIRMResourcesOnFree; + UInt8 fIsochChannel; + UInt32 fBandwidthUnits; + UInt32 fAllocationGeneration; + IORecursiveLock *fLock ; + IOFireWireController *fControl; + Boolean isAllocated; + + OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 0); + OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 1); + OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 2); + OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 3); + OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 4); + OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 5); + OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 6); + OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 7); +}; + +#endif // _IOKIT_IOFIREWIREIRMALLOCATION_H diff --git a/i386/include/IOKit/firewire/IOFireWireLocalNode.h b/i386/include/IOKit/firewire/IOFireWireLocalNode.h new file mode 100644 index 0000000..339fb9e --- /dev/null +++ b/i386/include/IOKit/firewire/IOFireWireLocalNode.h @@ -0,0 +1,143 @@ +/* + * IOFireWireLocalNode.h + * IOFireWireFamily + * + * Created by Niels on Fri Aug 16 2002. + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + $Log: IOFireWireLocalNode.h,v $ + Revision 1.8 2009/03/26 22:45:17 calderon + User client fails to terminate with unexpected consuequences + + Revision 1.7 2008/11/14 00:17:12 arulchan + fix for rdar://5939334 + + Revision 1.6 2005/02/18 22:56:53 gecko1 + 3958781 Q45C EVT: FireWire ASP reporter says port speed is 800 Mb/sec + + Revision 1.5 2003/02/20 02:00:12 collin + *** empty log message *** + + Revision 1.4 2003/02/17 21:47:53 collin + *** empty log message *** + + Revision 1.3 2002/10/18 23:29:44 collin + fix includes, fix cast which fails on new compiler + + Revision 1.2 2002/09/25 00:27:24 niels + flip your world upside-down + +*/ + +// public +#import + +class IOFireWireLocalNode; + +#pragma mark - + +/*! + @class IOFireWireLocalNodeAux +*/ + +class IOFireWireLocalNodeAux : public IOFireWireNubAux +{ + OSDeclareDefaultStructors(IOFireWireLocalNodeAux) + + friend class IOFireWireLocalNode; + +protected: + + /*! + @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + + struct ExpansionData { }; + + /*! + @var reserved + Reserved for future use. (Internal use only) + */ + + ExpansionData * reserved; + + virtual bool init( IOFireWireLocalNode * primary ); + virtual void free(); + +private: + OSMetaClassDeclareReservedUnused(IOFireWireLocalNodeAux, 0); + OSMetaClassDeclareReservedUnused(IOFireWireLocalNodeAux, 1); + OSMetaClassDeclareReservedUnused(IOFireWireLocalNodeAux, 2); + OSMetaClassDeclareReservedUnused(IOFireWireLocalNodeAux, 3); + +}; + +#pragma mark - + +/*! @class IOFireWireLocalNode +*/ + +class IOFireWireLocalNode : public IOFireWireNub +{ + OSDeclareDefaultStructors(IOFireWireLocalNode) + + friend class IOFireWireLocalNodeAux; + + /*------------------Useful info about device (also available in the registry)--------*/ +protected: + + /*-----------Methods provided to FireWire device clients-------------*/ +public: + + // Set up properties affected by bus reset + virtual void setNodeProperties(UInt32 generation, UInt16 nodeID, UInt32 *selfIDs, int numIDs, IOFWSpeed maxSpeed ); + + /* + * Standard nub initialization + */ + virtual bool init(OSDictionary * propTable); + virtual bool attach(IOService * provider ); + + virtual void handleClose( IOService * forClient, + IOOptionBits options ) ; + virtual bool handleOpen( IOService * forClient, + IOOptionBits options, + void * arg ) ; + virtual bool handleIsOpen( const IOService * forClient ) const; + + /* + * Trick method to create protocol user clients + */ + virtual IOReturn setProperties( OSObject * properties ); + +protected: + + virtual IOFireWireNubAux * createAuxiliary( void ); + +public: + virtual IOReturn message( UInt32 type, IOService * provider, void * argument ); + virtual void free(); + +protected: + OSSet * fOpenClients; +}; diff --git a/i386/include/IOKit/firewire/IOFireWireMultiIsochReceive.h b/i386/include/IOKit/firewire/IOFireWireMultiIsochReceive.h new file mode 100644 index 0000000..e003660 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFireWireMultiIsochReceive.h @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2008 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOFIREWIREMULTIISOCHRECEIVE_H_ +#define _IOKIT_IOFIREWIREMULTIISOCHRECEIVE_H_ + +class IOFireWireMultiIsochReceiveListener; +class IOFireWireMultiIsochReceivePacket; +class IOFireWireController; + +typedef IOReturn (*FWMultiIsochReceiveListenerCallback)(void *refcon, IOFireWireMultiIsochReceivePacket *pPacket); + +// These are the parameters clients can set which help us to optimize the mult-isoch-receiver +// polling interval, and memory resources +typedef struct FWMultiIsochReceiveListenerParamsStruct + { + // How much latency, from when the packet arrives to when the client is notified, can the client tolerate. + UInt32 maxLatencyInFireWireCycles; + + // In bits per second, the expected bit-rate of the incoming stream + UInt32 expectedStreamBitRate; + + // How long does the client expect to hold onto packets objects before returning them back to the receiver + UInt32 clientPacketReturnLatencyInFireWireCycles; + }FWMultiIsochReceiveListenerParams; + +/*! @class IOFireWireMultiIsochReceiveListener +*/ + +class IOFireWireMultiIsochReceiveListener : public OSObject + { + friend class IOFireWireLink; + + protected: + OSDeclareDefaultStructors(IOFireWireMultiIsochReceiveListener) + bool init(IOFireWireController *fwController, + UInt32 receiveChannel, + FWMultiIsochReceiveListenerCallback callback, + void *pCallbackRefCon, + FWMultiIsochReceiveListenerParams *pListenerParams); + void free(); + public: + static IOFireWireMultiIsochReceiveListener *create(IOFireWireController *fwController, + UInt32 channel, + FWMultiIsochReceiveListenerCallback callback, + void *pCallbackRefCon, + FWMultiIsochReceiveListenerParams *pListenerParams); + + // Call this to activate the listener + IOReturn Activate(); + + // Call this to deactivate the listener + IOReturn Deactivate(); + + // Call this to modify the callback/refcon pointers. Only call this when not activated! + IOReturn SetCallback(FWMultiIsochReceiveListenerCallback callback, + void *pCallbackRefCon); + + // Accessors + inline UInt32 getReceiveChannel(void) {return fChannel;}; + inline FWMultiIsochReceiveListenerCallback getCallback(void){return fClientCallback;}; + inline void * getRefCon(void){return fClientCallbackRefCon;}; + inline bool getActivatedState(void) {return fActivated;}; + + protected: + IOFireWireController *fControl; + UInt32 fChannel; + FWMultiIsochReceiveListenerCallback fClientCallback; + void *fClientCallbackRefCon; + bool fActivated; + FWMultiIsochReceiveListenerParams *fListenerParams; + }; + +#define kMaxRangesPerMultiIsochReceivePacket 6 + +/*! @class IOFireWireMultiIsochReceivePacket +*/ + +class IOFireWireMultiIsochReceivePacket : public OSObject + { + OSDeclareDefaultStructors(IOFireWireMultiIsochReceivePacket) + bool init(IOFireWireController *fwController); + void free(); + public: + static IOFireWireMultiIsochReceivePacket *create(IOFireWireController *fwController); + + // The clients who are passed this packet by the + // multi-isoch receiver calling their callback + // MUST call clientDone() on this packet to + // return it back for reuse! + void clientDone(void); + + UInt32 isochChannel(void); + UInt32 packetReceiveTime(void); + + UInt32 isochPayloadSize(void); // The size of just the isoch payload, not including header/trailer quads. + inline UInt32 isochPacketSize(void) {return isochPayloadSize()+8; }; // The size of the packet, including header/trailer quads. + + // This returns a memory descriptor to the client. The client must call complete(), and release() on the + // memory descriptor when done. + IOMemoryDescriptor *createMemoryDescriptorForRanges(void); + + // These should be treated as read-only by clients, + // as should the data contained in these buffers! + IOAddressRange ranges[kMaxRangesPerMultiIsochReceivePacket] ; + UInt32 numRanges; + + // These should be treated private for clients! + // Messing with them will screw up the bookkeepping + // in the Multi-Isoch Receiver! + UInt32 numClientReferences; + void* elements[kMaxRangesPerMultiIsochReceivePacket]; + + protected: + IOFireWireController *fControl; + }; + +#endif \ No newline at end of file diff --git a/i386/include/IOKit/firewire/IOFireWireNub.h b/i386/include/IOKit/firewire/IOFireWireNub.h new file mode 100644 index 0000000..7df983b --- /dev/null +++ b/i386/include/IOKit/firewire/IOFireWireNub.h @@ -0,0 +1,293 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * + * IOFireWireNub.h + * + * + * Note: IOFWCommand(s) are allocated by methods in this class. + * The remaining methods to setup and submit IOFWCommands are defined in + * IOFWCommand.h + */ +#ifndef _IOKIT_IOFIREWIRENUB_H +#define _IOKIT_IOFIREWIRENUB_H + +// public +#include +#include +#include + +class IOFireWireController; +class IOFireWireBus; +class IOConfigDirectory; +class IOFireWireNub; +class IOFireWireDevice; +class IOFireWireUnit; +class IOFWSimplePhysicalAddressSpace; +class IOFWSimpleContiguousPhysicalAddressSpace; + +enum TerminationState +{ + kNotTerminated = 0, + kNeedsTermination, + kTerminated +}; + +#pragma mark - + +/*! + @class IOFireWireNubAux +*/ + +class IOFireWireNubAux : public OSObject +{ + OSDeclareDefaultStructors(IOFireWireNubAux) + + friend class IOFireWireNub; + +protected: + + IOFireWireNub * fPrimary; + TerminationState fTerminationState; + + /*! + @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + + struct ExpansionData { }; + + /*! + @var reserved + Reserved for future use. (Internal use only) + */ + + ExpansionData * reserved; + + virtual bool init( IOFireWireNub * primary ); + virtual void free(); + + virtual UInt32 hopCount( IOFireWireNub * nub ); + virtual UInt32 hopCount( void ); + + virtual TerminationState getTerminationState( void ); + virtual void setTerminationState( TerminationState state ); + + virtual bool isPhysicalAccessEnabled( void ); + + virtual IOFWSimpleContiguousPhysicalAddressSpace * createSimpleContiguousPhysicalAddressSpace( vm_size_t size, IODirection direction ); + + virtual IOFWSimplePhysicalAddressSpace * createSimplePhysicalAddressSpace( vm_size_t size, IODirection direction ); + +private: + OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 0); + OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 1); + OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 2); + OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 3); + OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 4); + OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 5); + OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 6); + OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 7); + OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 8); + OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 9); + OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 10); + OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 11); + OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 12); + OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 13); + OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 14); + OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 15); + +}; + +#pragma mark - + +/*! @class IOFireWireNub +*/ +class IOFireWireNub : public IOService +{ + OSDeclareAbstractStructors(IOFireWireNub) + + friend class IOFireWireController; + friend class IOFireWireNubAux; + friend class IOFireWireDeviceAux; + friend class IOFireWireUnitAux; + friend class IOFireWireDevice; + friend class IOFireWireUnit; + +/*------------------Useful info about device (also available in the registry)--------*/ +protected: + int fDeviceSpeed; // Max supported by device + int fCommsSpeed; // Max speed this node can communicate with device + UInt16 fNodeID; // Current node ID (could change after bus reset!) + UInt16 fLocalNodeID; // ID of the local node (could change after bus reset!) + UInt32 fGeneration; // ID Of bus topology that fNodeID is valid for. + CSRNodeUniqueID fUniqueID; // Device's globally unique ID (never changes) + mach_timespec_t fAsyncTimeout; // Guesstimate of how long to wait for response + // from device when making async requests + // Different values for quad/block transfers? + // OS8 FW has 40/100 mSec. + + int fMaxReadPackLog; + int fMaxWritePackLog; + int fMaxReadROMPackLog; + + IOFireWireController *fControl; + IOConfigDirectory *fDirectory; + + UInt32 fNodeFlags; + + OSSet * fConfigDirectorySet; + + IOFireWireNubAux * fAuxiliary; + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + virtual void free(); + +/*------------------Methods provided to FireWire device clients-----------------------*/ +public: + + // Get nodeID and bus generation info + IOReturn getNodeIDGeneration(UInt32 &generation, UInt16 &nodeID, UInt16 &localID) const; + IOReturn getNodeIDGeneration(UInt32 &generation, UInt16 &nodeID) const; + + // How fast can this system talk to the node? + virtual IOFWSpeed FWSpeed() const; + + // How fast can this node talk to another node? + virtual IOFWSpeed FWSpeed(const IOFireWireNub *dst) const; + + // How big (as a power of two) can packets sent to/received from the node be? + virtual int maxPackLog(bool forSend) const; + + // How big (as a power of two) can packets sent to/received from a specified address in the node be? + virtual int maxPackLog(bool forSend, FWAddress address) const; + + // How big (as a power of two) can packets sent from this node to dst node/received from dst be? + virtual int maxPackLog(bool forSend, const IOFireWireNub *dst) const; + + // Set maximum packet size nub can handle + virtual void setMaxPackLog(bool forSend, bool forROM, int maxPackLog); + + /* + * Create various FireWire commands to send to the device + */ + virtual IOFWReadCommand *createReadCommand(FWAddress devAddress, IOMemoryDescriptor *hostMem, + FWDeviceCallback completion=NULL, void *refcon=NULL, + bool failOnReset=false); + virtual IOFWReadQuadCommand *createReadQuadCommand(FWAddress devAddress, UInt32 *quads, int numQuads, + FWDeviceCallback completion=NULL, void *refcon=NULL, + bool failOnReset=false); + + virtual IOFWWriteCommand *createWriteCommand(FWAddress devAddress, IOMemoryDescriptor *hostMem, + FWDeviceCallback completion=NULL, void *refcon=NULL, + bool failOnReset=false); + virtual IOFWWriteQuadCommand *createWriteQuadCommand(FWAddress devAddress, UInt32 *quads, int numQuads, + FWDeviceCallback completion=NULL, void *refcon=NULL, + bool failOnReset=false); + + // size is 1 for 32 bit compare, 2 for 64 bit. + virtual IOFWCompareAndSwapCommand *createCompareAndSwapCommand(FWAddress devAddress, + const UInt32 *cmpVal, const UInt32 *newVal, int size, + FWDeviceCallback completion=NULL, void *refcon=NULL, + bool failOnReset=false); + /* + * Create local FireWire address spaces for the device to access + */ + virtual IOFWPhysicalAddressSpace *createPhysicalAddressSpace(IOMemoryDescriptor *mem); + virtual IOFWPseudoAddressSpace *createPseudoAddressSpace(FWAddress *addr, UInt32 len, + FWReadCallback reader, FWWriteCallback writer, void *refcon); + + /* + * Get Config directory for nub + * Device nub directory is root directory, Unit nub directory is Unit directory. + * + * Depricated use getConfigDirectoryRef + * + */ + + virtual IOReturn getConfigDirectory(IOConfigDirectory *&dir); + + /* + * Get bus for nub + */ + IOFireWireBus * getBus() const; + + IOFireWireController * getController() const; + + const CSRNodeUniqueID &getUniqueID() const; + + /* + * Standard nub initialization + */ + virtual bool init(OSDictionary * propTable); + + virtual void setNodeFlags( UInt32 flags ); + virtual UInt32 getNodeFlags( void ); + virtual void clearNodeFlags( UInt32 flags ); + + virtual IOReturn setConfigDirectory( IOConfigDirectory *directory ); + + virtual IOReturn getConfigDirectoryRef( IOConfigDirectory *&dir ); + + inline UInt32 hopCount( IOFireWireNub * nub ) + { return fAuxiliary->hopCount( nub ); } + + inline UInt32 hopCount( void ) + { return fAuxiliary->hopCount(); } + + inline TerminationState getTerminationState( void ) + { return fAuxiliary->getTerminationState(); } + +protected: + inline void setTerminationState( TerminationState state ) + { fAuxiliary->setTerminationState( state ); } + + virtual IOFireWireNubAux * createAuxiliary( void ); + +public: + + inline bool isPhysicalAccessEnabled( void ) + { return fAuxiliary->isPhysicalAccessEnabled(); } + + inline IOFWSimpleContiguousPhysicalAddressSpace * createSimpleContiguousPhysicalAddressSpace( vm_size_t size, IODirection direction ) + { return fAuxiliary->createSimpleContiguousPhysicalAddressSpace( size, direction ); } + + inline IOFWSimplePhysicalAddressSpace * createSimplePhysicalAddressSpace( vm_size_t size, IODirection direction ) + { return fAuxiliary->createSimplePhysicalAddressSpace( size, direction ); } + +private: + OSMetaClassDeclareReservedUsed(IOFireWireNub, 0); + OSMetaClassDeclareReservedUsed(IOFireWireNub, 1); + OSMetaClassDeclareReservedUnused(IOFireWireNub, 2); + OSMetaClassDeclareReservedUnused(IOFireWireNub, 3); + +}; + +#endif /* ! _IOKIT_IOFIREWIRENUB_H */ diff --git a/i386/include/IOKit/firewire/IOFireWirePowerManager.h b/i386/include/IOKit/firewire/IOFireWirePowerManager.h new file mode 100644 index 0000000..e0a141a --- /dev/null +++ b/i386/include/IOKit/firewire/IOFireWirePowerManager.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOFIREWIREPOWERMANAGER_H +#define _IOKIT_IOFIREWIREPOWERMANAGER_H + +#include + +#include +#include + +class IOFireWireController; + +/*! @class IOFireWirePowerManager +*/ + +class IOFireWirePowerManager : public OSObject +{ + OSDeclareAbstractStructors(IOFireWirePowerManager); + +protected: + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + IOFireWireController * fControl; + + UInt32 fMaximumDeciwatts; + UInt32 fAllocatedDeciwatts; + +public: + static IOFireWirePowerManager * createWithController( IOFireWireController * controller ); + + virtual bool initWithController( IOFireWireController * controller ); + + virtual void setMaximumDeciwatts( UInt32 deciwatts ); + virtual IOReturn allocateDeciwatts( UInt32 deciwatts ); + virtual void deallocateDeciwatts( UInt32 deciwatts ); + +private: + OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 0); + OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 1); + OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 2); + OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 3); + OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 4); + OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 5); + OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 6); + OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 7); + OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 8); + OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 9); +}; + +#endif \ No newline at end of file diff --git a/i386/include/IOKit/firewire/IOFireWireUnit.h b/i386/include/IOKit/firewire/IOFireWireUnit.h new file mode 100644 index 0000000..6509b94 --- /dev/null +++ b/i386/include/IOKit/firewire/IOFireWireUnit.h @@ -0,0 +1,167 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * + * IOFireWireUnit.h + * + * + */ +#ifndef _IOKIT_IOFIREWIREUNIT_H +#define _IOKIT_IOFIREWIREUNIT_H + +// public +#include + +class IOFireWireDevice; +class IOFireWireUnit; + +#pragma mark - + +/*! + @class IOFireWireUnitAux +*/ + +class IOFireWireUnitAux : public IOFireWireNubAux +{ + OSDeclareDefaultStructors(IOFireWireUnitAux) + + friend class IOFireWireUnit; + +protected: + + /*! + @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + + struct ExpansionData { }; + + /*! + @var reserved + Reserved for future use. (Internal use only) + */ + + ExpansionData * reserved; + + virtual bool init( IOFireWireUnit * primary ); + virtual void free(); + + virtual bool isPhysicalAccessEnabled( void ); + + virtual IOFWSimpleContiguousPhysicalAddressSpace * createSimpleContiguousPhysicalAddressSpace( vm_size_t size, IODirection direction ); + + virtual IOFWSimplePhysicalAddressSpace * createSimplePhysicalAddressSpace( vm_size_t size, IODirection direction ); + +private: + OSMetaClassDeclareReservedUnused(IOFireWireUnitAux, 0); + OSMetaClassDeclareReservedUnused(IOFireWireUnitAux, 1); + OSMetaClassDeclareReservedUnused(IOFireWireUnitAux, 2); + OSMetaClassDeclareReservedUnused(IOFireWireUnitAux, 3); + +}; + +#pragma mark - + +/*! @class IOFireWireUnit +*/ +class IOFireWireUnit : public IOFireWireNub +{ + OSDeclareDefaultStructors(IOFireWireUnit) + + friend class IOFireWireUnitAux; + friend class IOFireWireDevice; + +protected: + IOFireWireDevice *fDevice; // The device unit is part of + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + +/*------------------Methods provided to FireWire device clients-----------------------*/ +public: + + virtual bool init(OSDictionary *propTable, IOConfigDirectory *directory); + + /* + * Standard nub initialization + */ + virtual bool attach(IOService * provider ); + virtual void free(); + + /* + * Matching language support + * Match on the following properties of the unit: + * Vendor_ID + * GUID + * Unit_Spec_ID + * Unit_SW_Version + */ + virtual bool matchPropertyTable(OSDictionary * table); + + + virtual IOReturn message( UInt32 type, IOService * provider, void * argument ); + + // Override handleOpen() and handleClose() to pass on to device + virtual bool handleOpen( IOService * forClient, + IOOptionBits options, + void * arg ); + + virtual void handleClose( IOService * forClient, + IOOptionBits options ); + + virtual void setNodeFlags( UInt32 flags ); + virtual void clearNodeFlags( UInt32 flags ); + virtual UInt32 getNodeFlags( void ); + + virtual IOReturn setConfigDirectory( IOConfigDirectory *directory ); + + /* + * Create local FireWire address spaces for the device to access + */ + virtual IOFWPhysicalAddressSpace *createPhysicalAddressSpace(IOMemoryDescriptor *mem); + virtual IOFWPseudoAddressSpace *createPseudoAddressSpace(FWAddress *addr, UInt32 len, + FWReadCallback reader, FWWriteCallback writer, void *refcon); + +protected: + + virtual IOFireWireNubAux * createAuxiliary( void ); + +public: + void setMaxSpeed( IOFWSpeed speed ); + +protected: + void terminateUnit( void ); + static void terminateUnitThreadFunc( void * refcon ); + +private: + OSMetaClassDeclareReservedUnused(IOFireWireUnit, 0); + OSMetaClassDeclareReservedUnused(IOFireWireUnit, 1); + +}; + +#endif /* ! _IOKIT_IOFIREWIREDEVICE_H */ diff --git a/i386/include/IOKit/firewire/IOLocalConfigDirectory.h b/i386/include/IOKit/firewire/IOLocalConfigDirectory.h new file mode 100644 index 0000000..4be26df --- /dev/null +++ b/i386/include/IOKit/firewire/IOLocalConfigDirectory.h @@ -0,0 +1,110 @@ +/* +* Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. +* +* @APPLE_LICENSE_HEADER_START@ +* +* The contents of this file constitute Original Code as defined in and +* are subject to the Apple Public Source License Version 1.1 (the +* "License"). You may not use this file except in compliance with the +* License. Please obtain a copy of the License at +* http://www.apple.com/publicsource and read it before using this file. +* +* This Original Code and all software distributed under the License are +* distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER +* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, +* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the +* License for the specific language governing rights and limitations +* under the License. +* +* @APPLE_LICENSE_HEADER_END@ +*/ + +#ifndef __IOLOCALCONFIGDIRECTORY_H__ +#define __IOLOCALCONFIGDIRECTORY_H__ + +#include +#include +#include +#include + +class OSArray; +class OSData; +class IOFireWireController; +class IOFWUserObjectExporter ; + +/*! @class IOLocalConfigDirectory +*/ +class IOLocalConfigDirectory : public IOConfigDirectory +{ + friend class IOFireWireController; + friend class IOFireWireUserClient ; + + OSDeclareDefaultStructors(IOLocalConfigDirectory); + +protected: + OSArray *fEntries; // Entries for this directory. + OSData *fROM; // Local ROM, if compiled. + UInt32 fHeader; // Num entries and CRC. + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + virtual bool init(); + virtual void free(); + + virtual const UInt32 *getBase(); + virtual IOConfigDirectory *getSubDir(int start, int type); + +public: + static IOLocalConfigDirectory *create(); + + /*! + @function update + makes sure that the ROM has at least the specified capacity, + and that the ROM is uptodate from its start to at least the + specified quadlet offset. + @result kIOReturnSuccess if the specified offset is now + accessable at romBase[offset]. + */ + virtual IOReturn update(UInt32 offset, const UInt32 *&romBase); + + virtual IOReturn compile(OSData *rom); + + // All flavours of addEntry eat a retain of the desc string + virtual IOReturn addEntry(int key, UInt32 value, OSString *desc = NULL); + virtual IOReturn addEntry(int key, IOLocalConfigDirectory *value, + OSString *desc = NULL); + virtual IOReturn addEntry(int key, OSData *value, OSString *desc = NULL); + virtual IOReturn addEntry(int key, FWAddress value, OSString *desc = NULL); + virtual IOReturn removeSubDir(IOLocalConfigDirectory *value); + const OSArray *getEntries() const; + + virtual IOReturn getIndexValue(int index, IOConfigDirectory *&value); + +protected: + + virtual const UInt32 * lockData( void ); + virtual void unlockData( void ); + virtual IOReturn updateROMCache( UInt32 offset, UInt32 length ); + virtual IOReturn checkROMState( void ); + + // call eats a retain count + virtual IOReturn addEntry(OSString *desc); + + IOReturn incrementGeneration( void ); + static void exporterCleanup( const OSObject * self, IOFWUserObjectExporter * exporter ) ; + +private: + OSMetaClassDeclareReservedUsed(IOLocalConfigDirectory, 0); + OSMetaClassDeclareReservedUnused(IOLocalConfigDirectory, 1); + OSMetaClassDeclareReservedUnused(IOLocalConfigDirectory, 2); +}; + +#endif /* __IOLOCALCONFIGDIRECTORY_H__ */ diff --git a/i386/include/IOKit/firewire/IORemoteConfigDirectory.h b/i386/include/IOKit/firewire/IORemoteConfigDirectory.h new file mode 100644 index 0000000..7ddbb7c --- /dev/null +++ b/i386/include/IOKit/firewire/IORemoteConfigDirectory.h @@ -0,0 +1,92 @@ +/* + * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __IOREMOTECONFIGDIRECTORY_H__ +#define __IOREMOTECONFIGDIRECTORY_H__ + +#include +#include + +#include +#include + +#include "IOFireWireROMCache.h" + +class OSString; +class OSIterator; +class IOFireWireDevice; + +/*! @class IORemoteConfigDirectory +*/ +class IORemoteConfigDirectory : public IOConfigDirectory +{ + OSDeclareDefaultStructors(IORemoteConfigDirectory); + +protected: + IOFireWireROMCache *fROM; // Our cache of the ROM + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + virtual bool initWithOwnerOffset(IOFireWireROMCache *rom, + int start, int type); + virtual void free(); + + virtual const UInt32 *getBase(); + virtual IOConfigDirectory *getSubDir(int start, int type); + +public: + static IOConfigDirectory *withOwnerOffset(IOFireWireROMCache *rom, + int start, int type); + + + /*! + @function update + makes sure that the ROM has at least the specified capacity, + and that the ROM is uptodate from its start to at least the + specified quadlet offset. + @result kIOReturnSuccess if the specified offset is now + accessable at romBase[offset]. + */ + virtual IOReturn update(UInt32 offset, const UInt32 *&romBase); + +protected: + + virtual const UInt32 * lockData( void ); + virtual void unlockData( void ); + virtual IOReturn updateROMCache( UInt32 offset, UInt32 length ); + virtual IOReturn checkROMState( void ); + +private: + OSMetaClassDeclareReservedUnused(IORemoteConfigDirectory, 0); + OSMetaClassDeclareReservedUnused(IORemoteConfigDirectory, 1); + OSMetaClassDeclareReservedUnused(IORemoteConfigDirectory, 2); +}; + + +#endif /* __IOREMOTECONFIGDIRECTORY_H__ */ diff --git a/i386/include/IOKit/graphics/IOAccelClientConnect.h b/i386/include/IOKit/graphics/IOAccelClientConnect.h new file mode 100644 index 0000000..80ff711 --- /dev/null +++ b/i386/include/IOKit/graphics/IOAccelClientConnect.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOACCEL_CLIENT_CONNECT_H +#define _IOACCEL_CLIENT_CONNECT_H + + +/* +** The IOAccelerator service name +*/ +#define kIOAcceleratorClassName "IOAccelerator" + + +/* +** IOAccelerator public client types. Private client types start with +** kIOAccelNumClientTypes. +*/ +enum eIOAcceleratorClientTypes { + kIOAccelSurfaceClientType, + kIOAccelNumClientTypes +}; + + +#endif /* _IOACCEL_CLIENT_CONNECT_H */ + diff --git a/i386/include/IOKit/graphics/IOAccelSurfaceConnect.h b/i386/include/IOKit/graphics/IOAccelSurfaceConnect.h new file mode 100644 index 0000000..b597370 --- /dev/null +++ b/i386/include/IOKit/graphics/IOAccelSurfaceConnect.h @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOACCEL_SURFACE_CONNECT_H +#define _IOACCEL_SURFACE_CONNECT_H + +#include +#include + +/* +** Surface visible region in device coordinates. +** +** num_rects: The number of rectangles in the rect array. If num_rects +** is zero the bounds rectangle is used for the visible rectangle. +** If num_rects is zero the surface must be completely contained +** by the device. +** +** bounds: The unclipped surface rectangle in device coords. Extends +** beyond the device bounds if the surface is not totally on +** the device. +** +** rect[]: An array of visible rectangles in device coords. If num_rects +** is non-zero only the region described by these rectangles is +** copied to the frame buffer during a flush operation. +*/ +typedef struct +{ + UInt32 num_rects; + IOAccelBounds bounds; + IOAccelBounds rect[0]; +} IOAccelDeviceRegion; + + +/* +** Determine the size of a region. +*/ +#define IOACCEL_SIZEOF_DEVICE_REGION(_rgn_) (sizeof(IOAccelDeviceRegion) + (_rgn_)->num_rects * sizeof(IOAccelBounds)) + + +/* +** Surface client public memory types. Private memory types start with +** kIOAccelNumSurfaceMemoryTypes. +*/ +enum eIOAccelSurfaceMemoryTypes { + kIOAccelNumSurfaceMemoryTypes +}; + + +/* +** Surface client public methods. Private methods start with +** kIOAccelNumSurfaceMethods. +*/ +enum eIOAccelSurfaceMethods { + kIOAccelSurfaceReadLockOptions, + kIOAccelSurfaceReadUnlockOptions, + kIOAccelSurfaceGetState, + kIOAccelSurfaceWriteLockOptions, + kIOAccelSurfaceWriteUnlockOptions, + kIOAccelSurfaceRead, + kIOAccelSurfaceSetShapeBacking, + + kIOAccelSurfaceSetIDMode, + kIOAccelSurfaceSetScale, + + kIOAccelSurfaceSetShape, + kIOAccelSurfaceFlush, + + kIOAccelSurfaceQueryLock, + + kIOAccelSurfaceReadLock, + kIOAccelSurfaceReadUnlock, + kIOAccelSurfaceWriteLock, + kIOAccelSurfaceWriteUnlock, + + kIOAccelSurfaceControl, + kIOAccelSurfaceSetShapeBackingAndLength, + + kIOAccelNumSurfaceMethods +}; + + +/* +** Option bits for IOAccelCreateSurface and the kIOAccelSurfaceSetIDMode method. +** The color depth field can take any value of the _CGSDepth enumeration. +*/ +typedef enum { + kIOAccelSurfaceModeColorDepth1555 = 0x00000003, + kIOAccelSurfaceModeColorDepth8888 = 0x00000004, +// kIOAccelSurfaceModeColorDepthRGB565 = 0x00000005, + kIOAccelSurfaceModeColorDepthYUV = 0x00000006, + kIOAccelSurfaceModeColorDepthYUV9 = 0x00000007, + kIOAccelSurfaceModeColorDepthYUV12 = 0x00000008, + kIOAccelSurfaceModeColorDepthYUV2 = 0x00000009, + kIOAccelSurfaceModeColorDepthBGRA32 = 0x0000000A, + +// kIOAccelSurfaceModeColorDepthRGBA64 = 0x0000000B, +// kIOAccelSurfaceModeColorDepthRGBAFloat64 = 0x0000000C, +// kIOAccelSurfaceModeColorDepthRGBAFloat128 = 0x0000000D, + +// kIOAccelSurfaceModeColorDepthYUV420 = 0x0000000E, + kIOAccelSurfaceModeColorDepth2101010 = 0x0000000F, + + kIOAccelSurfaceModeColorDepthBits = 0x0000000F, + + kIOAccelSurfaceModeStereoBit = 0x00000010, + kIOAccelSurfaceModeWindowedBit = 0x00000020, + + kIOAccelSurfaceModeBeamSync = 0x00008000 +} eIOAccelSurfaceModeBits; + + +/* +** Options bits for IOAccelSetSurfaceShape and the kIOAccelSurfaceSetShape method. +*/ +typedef enum { + kIOAccelSurfaceShapeNone = 0x00000000, + kIOAccelSurfaceShapeNonBlockingBit = 0x00000001, + kIOAccelSurfaceShapeNonSimpleBit = 0x00000002, + kIOAccelSurfaceShapeIdentityScaleBit = 0x00000004, + kIOAccelSurfaceShapeFrameSyncBit = 0x00000008, + kIOAccelSurfaceShapeBeamSyncBit = 0x00000010, + kIOAccelSurfaceShapeStaleBackingBit = 0x00000020, + kIOAccelSurfaceShapeAssemblyBit = 0x00000040, + kIOAccelSurfaceShapeWaitEnabledBit = 0x00000080, + + /* wrong name, use kIOAccelSurfaceShapeNonBlockingBit */ + kIOAccelSurfaceShapeBlockingBit = kIOAccelSurfaceShapeNonBlockingBit +} eIOAccelSurfaceShapeBits; + +/* +** Return bits for the kIOAccelSurfaceGetState method. +*/ +typedef enum { + kIOAccelSurfaceStateNone = 0x00000000, + kIOAccelSurfaceStateIdleBit = 0x00000001 +} eIOAccelSurfaceStateBits; + +/* +** Option bits for the kIOAccelSurfaceSetScale method. +*/ +typedef enum { + kIOAccelSurfaceBeamSyncSwaps = 0x00000001, + kIOAccelSurfaceFixedSource = 0x00000002, + + kIOAccelSurfaceFiltering = 0x000000f0, + kIOAccelSurfaceFilterDefault = 0x00000000, + kIOAccelSurfaceFilterNone = 0x00000010, + kIOAccelSurfaceFilterLinear = 0x00000020 + +} eIOAccelSurfaceScaleBits; + +/* +** Option bits for the kIOAccelSurfaceLock methods. +*/ +typedef enum { + kIOAccelSurfaceLockInBacking = 0, + kIOAccelSurfaceLockInAccel = 1, + kIOAccelSurfaceLockInDontCare = 2, + kIOAccelSurfaceLockInMask = 0x00000003 +} eIOAccelSurfaceLockBits; + +#endif /* _IOACCEL_SURFACE_CONNECT_H */ + diff --git a/i386/include/IOKit/graphics/IOAccelTypes.h b/i386/include/IOKit/graphics/IOAccelTypes.h new file mode 100644 index 0000000..09084c1 --- /dev/null +++ b/i386/include/IOKit/graphics/IOAccelTypes.h @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOACCEL_TYPES_H +#define _IOACCEL_TYPES_H + +#include +#include + +#define IOACCEL_TYPES_REV 12 + +#if !defined(OSTYPES_K64_REV) && !defined(MAC_OS_X_VERSION_10_6) +#define IOACCELTYPES_10_5 1 +#endif + +/* Integer rectangle in device coordinates */ +typedef struct +{ + SInt16 x; + SInt16 y; + SInt16 w; + SInt16 h; +} IOAccelBounds; + +typedef struct +{ + SInt16 w; + SInt16 h; +} IOAccelSize; + +/* Surface information */ + +enum { + kIOAccelVolatileSurface = 0x00000001, + kIOAccelKeycolorSurface = 0x00000002 +}; + +typedef struct +{ +#if IOACCELTYPES_10_5 + vm_address_t address[4]; +#else + mach_vm_address_t address[4]; +#endif /* IOACCELTYPES_10_5 */ + UInt32 rowBytes; + UInt32 width; + UInt32 height; + UInt32 pixelFormat; + IOOptionBits flags; + IOFixed colorTemperature[4]; + UInt32 typeDependent[4]; +} IOAccelSurfaceInformation; + +typedef struct +{ +#if IOACCELTYPES_10_5 + long x, y, w, h; + void *client_addr; + unsigned long client_row_bytes; +#else + SInt32 x, y, w, h; + mach_vm_address_t client_addr; + UInt32 client_row_bytes; +#endif /* IOACCELTYPES_10_5 */ +} IOAccelSurfaceReadData; + +typedef struct { + IOAccelBounds buffer; + IOAccelSize source; + UInt32 reserved[8]; +} IOAccelSurfaceScaling; + + +typedef SInt32 IOAccelID; + +enum { + kIOAccelPrivateID = 0x00000001 +}; + + +#endif /* _IOACCEL_TYPES_H */ + diff --git a/i386/include/IOKit/graphics/IOAccelerator.h b/i386/include/IOKit/graphics/IOAccelerator.h new file mode 100644 index 0000000..1c2119c --- /dev/null +++ b/i386/include/IOKit/graphics/IOAccelerator.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IO_ACCELERATOR_H +#define _IO_ACCELERATOR_H + +#include +#include + +class IOAccelerator : public IOService +{ + OSDeclareDefaultStructors(IOAccelerator) + +public: + static IOReturn createAccelID(IOOptionBits options, IOAccelID * identifier); + static IOReturn retainAccelID(IOOptionBits options, IOAccelID identifier); + static IOReturn releaseAccelID(IOOptionBits options, IOAccelID identifier); + +}; + + +#endif /* _IO_ACCELERATOR_H */ + diff --git a/i386/include/IOKit/graphics/IODisplay.h b/i386/include/IOKit/graphics/IODisplay.h new file mode 100644 index 0000000..adcfc49 --- /dev/null +++ b/i386/include/IOKit/graphics/IODisplay.h @@ -0,0 +1,292 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IODISPLAY_H +#define _IOKIT_IODISPLAY_H + +#include +#include + +extern const OSSymbol * gIODisplayParametersKey; +extern const OSSymbol * gIODisplayGUIDKey; + +extern const OSSymbol * gIODisplayValueKey; +extern const OSSymbol * gIODisplayMinValueKey; +extern const OSSymbol * gIODisplayMaxValueKey; + +extern const OSSymbol * gIODisplayContrastKey; +extern const OSSymbol * gIODisplayBrightnessKey; +extern const OSSymbol * gIODisplayHorizontalPositionKey; +extern const OSSymbol * gIODisplayHorizontalSizeKey; +extern const OSSymbol * gIODisplayVerticalPositionKey; +extern const OSSymbol * gIODisplayVerticalSizeKey; +extern const OSSymbol * gIODisplayTrapezoidKey; +extern const OSSymbol * gIODisplayPincushionKey; +extern const OSSymbol * gIODisplayParallelogramKey; +extern const OSSymbol * gIODisplayRotationKey; +extern const OSSymbol * gIODisplayOverscanKey; +extern const OSSymbol * gIODisplayVideoBestKey; + +extern const OSSymbol * gIODisplayParametersTheatreModeKey; +extern const OSSymbol * gIODisplayParametersTheatreModeWindowKey; + +extern const OSSymbol * gIODisplayMCCSVersionKey; +extern const OSSymbol * gIODisplayTechnologyTypeKey; +extern const OSSymbol * gIODisplayUsageTimeKey; +extern const OSSymbol * gIODisplayFirmwareLevelKey; + +extern const OSSymbol * gIODisplaySpeakerVolumeKey; +extern const OSSymbol * gIODisplaySpeakerSelectKey; +extern const OSSymbol * gIODisplayMicrophoneVolumeKey; +extern const OSSymbol * gIODisplayAmbientLightSensorKey; +extern const OSSymbol * gIODisplayAudioMuteAndScreenBlankKey; +extern const OSSymbol * gIODisplayAudioTrebleKey; +extern const OSSymbol * gIODisplayAudioBassKey; +extern const OSSymbol * gIODisplayAudioBalanceLRKey; +extern const OSSymbol * gIODisplayAudioProcessorModeKey; +extern const OSSymbol * gIODisplayPowerModeKey; +extern const OSSymbol * gIODisplayManufacturerSpecificKey; + +extern const OSSymbol * gIODisplayParametersCommitKey; +extern const OSSymbol * gIODisplayParametersDefaultKey; +extern const OSSymbol * gIODisplayParametersFlushKey; + +enum { + kIODisplayNumPowerStates = 4, + kIODisplayMaxPowerState = kIODisplayNumPowerStates - 1 +}; + +// these are the private instance variables for power management +struct DisplayPMVars +{ + UInt32 currentState; + // highest state number normally, lowest usable state in emergency + unsigned long maxState; + // true if the display has had power lowered due to user inactivity + bool displayIdle; +}; + +class IODisplayConnect : public IOService +{ + OSDeclareDefaultStructors(IODisplayConnect) + +private: + IOIndex connection; + +protected: +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of this class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * reserved; + +public: + virtual bool initWithConnection( IOIndex connection ); + virtual IOFramebuffer * getFramebuffer( void ); + virtual IOIndex getConnection( void ); + virtual IOReturn getAttributeForConnection( IOSelect selector, uintptr_t * value ); + virtual IOReturn setAttributeForConnection( IOSelect selector, uintptr_t value ); + virtual void joinPMtree ( IOService * driver ); +}; + +class IODisplay : public IOService +{ + OSDeclareAbstractStructors(IODisplay) + +public: + static void initialize( void ); + +protected: + // used to query the framebuffer controller + IODisplayConnect * fConnection; + class IODisplayParameterHandler * fParameterHandler; + void * __resv; + IONotifier * fNotifier; + + // pointer to protected instance variables for power management + struct DisplayPMVars * fDisplayPMVars; + + // reserved for future expansion + void * _IODisplay_reserved[32]; + +public: + virtual IOService * probe( IOService * provider, + SInt32 * score ); + + virtual bool start( IOService * provider ); + virtual void stop( IOService * provider ); + virtual void free(); + + virtual IODisplayConnect * getConnection( void ); + + virtual IOReturn getConnectFlagsForDisplayMode( + IODisplayModeID mode, UInt32 * flags ); + + virtual IOReturn getGammaTableByIndex( + UInt32 * channelCount, UInt32 * dataCount, + UInt32 * dataWidth, void ** data ); + + virtual IOReturn readFramebufferEDID( void ); + + // + virtual IOReturn framebufferEvent( IOFramebuffer * framebuffer, + IOIndex event, void * info ); + + // parameter setting + virtual IOReturn setProperties( OSObject * properties ); + virtual bool setForKey( OSDictionary * params, const OSSymbol * key, + SInt32 value, SInt32 min, SInt32 max ); + + static bool addParameter( OSDictionary * params, const OSSymbol * paramName, SInt32 min, SInt32 max ); + static bool setParameter( OSDictionary * params, const OSSymbol * paramName, SInt32 value ); + static OSDictionary * getIntegerRange( OSDictionary * params, const OSSymbol * sym, + SInt32 * value, SInt32 * min, SInt32 * max ); + + // low level set/get + virtual bool doIntegerSet( OSDictionary * params, + const OSSymbol * paramName, UInt32 value ); + virtual bool doDataSet( const OSSymbol * paramName, OSData * value ); + virtual bool doUpdate( void ); + + // power management methods + virtual IOReturn setPowerState( unsigned long, IOService * ); + virtual unsigned long maxCapabilityForDomainState( IOPMPowerFlags ); + virtual unsigned long initialPowerStateForDomainState( IOPMPowerFlags ); + virtual unsigned long powerStateForDomainState( IOPMPowerFlags ); + + // + virtual void initPowerManagement( IOService * provider); + virtual void dropOneLevel( void ); + virtual void makeDisplayUsable( void ); + +private: + OSMetaClassDeclareReservedUnused(IODisplay, 0); + OSMetaClassDeclareReservedUnused(IODisplay, 1); + OSMetaClassDeclareReservedUnused(IODisplay, 2); + OSMetaClassDeclareReservedUnused(IODisplay, 3); + OSMetaClassDeclareReservedUnused(IODisplay, 4); + OSMetaClassDeclareReservedUnused(IODisplay, 5); + OSMetaClassDeclareReservedUnused(IODisplay, 6); + OSMetaClassDeclareReservedUnused(IODisplay, 7); + OSMetaClassDeclareReservedUnused(IODisplay, 8); + OSMetaClassDeclareReservedUnused(IODisplay, 9); + OSMetaClassDeclareReservedUnused(IODisplay, 10); + OSMetaClassDeclareReservedUnused(IODisplay, 11); + OSMetaClassDeclareReservedUnused(IODisplay, 12); + OSMetaClassDeclareReservedUnused(IODisplay, 13); + OSMetaClassDeclareReservedUnused(IODisplay, 14); + OSMetaClassDeclareReservedUnused(IODisplay, 15); + OSMetaClassDeclareReservedUnused(IODisplay, 16); + OSMetaClassDeclareReservedUnused(IODisplay, 17); + OSMetaClassDeclareReservedUnused(IODisplay, 18); + OSMetaClassDeclareReservedUnused(IODisplay, 19); + +private: + static IOReturn _framebufferEvent( OSObject * self, void * ref, + IOFramebuffer *framebuffer, IOIndex event, void * info ); + + bool addParameterHandler( IODisplayParameterHandler * parameterHandler ); + bool removeParameterHandler( IODisplayParameterHandler * parameterHandler ); + static bool updateNumber( OSDictionary * params, const OSSymbol * key, SInt32 value ); +}; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +class IOBacklightDisplay : public IODisplay +{ + OSDeclareDefaultStructors(IOBacklightDisplay) + +protected: + // User preferred brightness level + SInt32 fCurrentUserBrightness; + SInt32 fCurrentBrightness; + UInt32 fCurrentPowerState; + SInt32 fMinBrightness; + SInt32 fMaxBrightness; + UInt16 fMaxBrightnessLevel[kIODisplayNumPowerStates]; + +public: + virtual IOService * probe( IOService *, SInt32 * ); + virtual void stop( IOService * provider ); + virtual IOReturn setPowerState( unsigned long, IOService * ); + virtual unsigned long maxCapabilityForDomainState( IOPMPowerFlags ); + virtual unsigned long initialPowerStateForDomainState( IOPMPowerFlags ); + virtual unsigned long powerStateForDomainState( IOPMPowerFlags ); + + // + virtual void initPowerManagement( IOService * ); + +public: + virtual bool doIntegerSet( OSDictionary * params, + const OSSymbol * paramName, UInt32 value ); + virtual bool doUpdate( void ); + virtual void makeDisplayUsable( void ); + virtual bool setBrightness( SInt32 value ); + +private: + void handlePMSettingCallback(const OSSymbol *, OSObject *, uintptr_t); + + OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 0); + OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 1); + OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 2); + OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 3); + OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 4); + OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 5); + OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 6); + OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 7); + OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 8); + OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 9); +}; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +class IODisplayParameterHandler : public IOService +{ + OSDeclareDefaultStructors(IODisplayParameterHandler) + +public: + virtual bool setDisplay( IODisplay * display ) = 0; + virtual bool doIntegerSet( OSDictionary * params, + const OSSymbol * paramName, UInt32 value ) = 0; + virtual bool doDataSet( const OSSymbol * paramName, OSData * value ) = 0; + virtual bool doUpdate( void ) = 0; + +private: + OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 0); + OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 1); + OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 2); + OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 3); + OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 4); + OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 5); + OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 6); + OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 7); + OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 8); + OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 9); +}; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#endif /* ! _IOKIT_IODISPLAY_H */ + diff --git a/i386/include/IOKit/graphics/IOFramebuffer.h b/i386/include/IOKit/graphics/IOFramebuffer.h new file mode 100644 index 0000000..16a5ffd --- /dev/null +++ b/i386/include/IOKit/graphics/IOFramebuffer.h @@ -0,0 +1,827 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOFRAMEBUFFER_H +#define _IOKIT_IOFRAMEBUFFER_H + +#include +#include +#include +#include +#include + +class IOFramebuffer; +class IOBufferMemoryDescriptor; + +typedef void (*CursorBlitProc)( + IOFramebuffer * inst, + void * shmem, + volatile unsigned char *vramPtr, + unsigned int cursStart, + unsigned int vramRow, + unsigned int cursRow, + int width, + int height ); + +typedef void (*CursorRemoveProc)( + IOFramebuffer * inst, + void * shmem, + volatile unsigned char *vramPtr, + unsigned int vramRow, + int width, + int height ); + + +typedef void * IOFBCursorRef; + +struct IOFBCursorControlCallouts { + IOReturn (*setCursorImage) (void * self, void * ref, + IOHardwareCursorDescriptor * description, IOFBCursorRef cursorImage); + IOReturn (*setCursorState) (void * self, void * ref, + SInt32 x, SInt32 y, bool visible); + UInt32 reserved[30]; +}; +typedef struct IOFBCursorControlCallouts IOFBCursorControlCallouts; + +struct IOFBCursorControlAttribute { + void * self; + void * ref; + const IOFBCursorControlCallouts * callouts; + UInt32 reserved[29]; +}; +typedef struct IOFBCursorControlAttribute IOFBCursorControlAttribute; + +// clock & data values +enum { + kIODDCLow = 0, + kIODDCHigh = 1, + kIODDCTristate = 2 +}; +// ddcBlockType constants +enum { + // EDID block type. + kIODDCBlockTypeEDID = 0 +}; + +// ddcFlags constants +enum { + // Force a new read of the EDID. + kIODDCForceRead = 0x00000001 +}; + +enum { + kDisabledInterruptState = 0, + kEnabledInterruptState = 1 +}; + +typedef void (*IOFBInterruptProc)( OSObject * target, void * ref ); + + +typedef IOReturn (*IOFramebufferNotificationHandler) + (OSObject * self, void * ref, + IOFramebuffer * framebuffer, IOIndex event, + void * info); + +// IOFramebufferNotificationHandler events +enum { + kIOFBNotifyDisplayModeWillChange = 1, + kIOFBNotifyDisplayModeDidChange = 2, + + kIOFBNotifyWillSleep = 3, + kIOFBNotifyDidWake = 4, + + kIOFBNotifyDidPowerOff = 5, + kIOFBNotifyWillPowerOn = 6, + + kIOFBNotifyDidSleep = kIOFBNotifyDidPowerOff, + kIOFBNotifyWillWake = kIOFBNotifyWillPowerOn, + + kIOFBNotifyWillPowerOff = 7, + kIOFBNotifyDidPowerOn = 8, + + kIOFBNotifyWillChangeSpeed = 9, + kIOFBNotifyDidChangeSpeed = 10, + + kIOFBNotifyClamshellChange = 20, + + kIOFBNotifyCaptureChange = 30, + + kIOFBNotifyOnlineChange = 40, + + kIOFBNotifyDisplayDimsChange = 50, + + kIOFBNotifyProbed = 60, +}; + +enum { + kFBDisplayUsablePowerState = 0x80000000, + kFBDisplayPowerStateMask = 0x0000ffff +}; + +#define kIOFBDependentIDKey "IOFBDependentID" +#define kIOFBDependentIndexKey "IOFBDependentIndex" + +struct StdFBShmem_t; +class IOFramebufferUserClient; + +/*! @class IOFramebuffer : public IOGraphicsDevice + @abstract The base class for graphics devices to be made available as part of the desktop. + @discussion The IOFramebuffer base class defines APIs used to publish a linear framebuffer device. Device driver writers should subclass this class to provide a X native driver. Mac OS X will also utilize 'ndrv' drivers via a subclass of IOFramebuffer IONDRVFramebuffer that does not require device driver writers to provide a X native driver. + + There are no in kernel clients of IOFramebuffer aside from rudimentary console and panic UI supported by the IOFramebuffer class. The IOFramebuffer class provides the IOUserClient implementation to allow the CoreGraphics server to provide the user accessible interface to all displays on a Mac OS X system, and this is further layered underneath application frameworks. Device driver writers should not need any knowledge of this part of the interfaces. Similarly the instance variables of IOFramebuffer are mostly used for cursor rendering which is handled by the IOFramebuffer class, and should be avoided by subclass implementors. Only IOFramebuffer methods with header documentation in this header are designed for subclasses to implement. + + IOFramebuffer provides simple dumb framebuffer operation - accceleration for 2D, 3D and video may be provided by a separate implementation of the IOAccelerator class. +*/ + +class IOFramebuffer : public IOGraphicsDevice +{ + friend class IOFramebufferUserClient; + friend class IOFramebufferSharedUserClient; + friend class IODisplay; + + OSDeclareDefaultStructors(IOFramebuffer) + +protected: +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of this class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * reserved; + +private: + +protected: + StdFBShmem_t * priv; + int shmemClientVersion; + IOBufferMemoryDescriptor * sharedCursor; + + union { + struct { + /* Mapping tables used in cursor drawing to 5-5-5 displays. */ + unsigned char * _bm34To35SampleTable; + unsigned char * _bm35To34SampleTable; + /* Mapping tables used in cursor drawing to 8-bit RGB displays. */ + unsigned int * _bm256To38SampleTable; + unsigned char * _bm38To256SampleTable; + } t; + UInt8 * tables[ 4 ]; + } colorConvert; + + /* cursor blitting vars */ + CursorBlitProc cursorBlitProc; + CursorRemoveProc cursorRemoveProc; + + IOGSize maxCursorSize; + void * _IOFramebuffer_reservedE[7]; + const char * thisName; + volatile unsigned char * cursorSave; + unsigned int white; + + IOGPoint nextCursorLoc; + int nextCursorFrame; + SInt32 connectChange; + semaphore_t vblSemaphore; + + /* memory ranges */ + volatile unsigned char * frameBuffer; + unsigned int totalWidth; + unsigned int rowBytes; + unsigned int bytesPerPixel; + + IOMemoryMap * vramMap; + IOByteCount vramMapOffset; + OSArray * userAccessRanges; + unsigned int suspended:1; + unsigned int captured:1; + unsigned int sleepConnectCheck:1; + unsigned int messaged:1; + unsigned int _IOFramebuffer_reservedC:28; + IOFramebuffer * nextDependent; + OSSet * fbNotifications; + + class IOFramebufferUserClient * serverConnect; + class IOFramebufferSharedUserClient * sharedConnect; + + unsigned int opened:1; + unsigned int dead:1; + unsigned int configPending:1; + unsigned int serverNotified:1; + unsigned int serverState:1; + unsigned int serverPendingAck:1; + unsigned int isUsable:1; + unsigned int mirrored:1; + unsigned int pendingPowerState:4; + unsigned int pendingPowerChange:1; + unsigned int pagingState:1; + unsigned int mirrorPrimary:1; + unsigned int mirrorSWCursor:1; + + bool clutValid; + bool currentMono; + bool needCursorService; + bool haveVBLService; + bool haveHWCursor; + bool hwCursorLoaded; + + void * serverMsg; + IOInterruptEventSource * deferredEvents; + + /* Reserved for future expansion. */ + int _IOFramebuffer_reserved[5]; + +private: + struct IOFramebufferPrivate * __private; + +public: +/*! @function doI2CRequest + @abstract Carry out an I2C request. + @discussion IOFramebuffer subclasses may optionally implement this method to perform I2C bus requests on one of the buses they support. Alternatively they may implement the setDDCClock(), setDDCData(), readDDCClock(), readDDCData() methods and respond from getAttributeForConnection() to the kConnectionSupportsLLDDCSense attribute with success, in which case IOFramebuffer::doI2CRequest() will carry out a software implementation of I2C using the low level routines and conforming to the timing constraints passed in the timing parameter. Subclasses may pass timing parameters tuned for the specific bus, otherwise VESA DDC defaults will apply. + @timing event Subclasses may pass timing parameters tuned for the specific bus, otherwise if NULL, VESA DDC defaults will apply. + @param request An IOI2CRequest structure. The request should be carried out synchronously if the completion routine is NULL, otherwise it may optionally be carried out asynchronously. The completion routine should be called if supplied. + @result an IOReturn code. If kIOReturnSuccces, the result of the transaction is returned in the requests result field. +*/ + virtual IOReturn doI2CRequest( UInt32 bus, struct IOI2CBusTiming * timing, struct IOI2CRequest * request ); + +private: + OSMetaClassDeclareReservedUsed(IOFramebuffer, 0); + + OSMetaClassDeclareReservedUnused(IOFramebuffer, 1); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 2); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 3); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 4); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 5); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 6); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 7); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 8); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 9); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 10); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 11); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 12); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 13); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 14); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 15); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 16); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 17); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 18); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 19); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 20); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 21); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 22); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 23); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 24); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 25); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 26); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 27); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 28); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 29); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 30); + OSMetaClassDeclareReservedUnused(IOFramebuffer, 31); + + +public: + static void initialize(); + + virtual bool requestTerminate( IOService * provider, IOOptionBits options ); + virtual IOService * probe( IOService * provider, SInt32 * score ); + virtual bool start( IOService * provider ); + virtual void stop( IOService * provider ); + virtual void free(); + virtual IOWorkLoop * getWorkLoop() const; + + IOWorkLoop * getGraphicsSystemWorkLoop() const; + IOWorkLoop * getControllerWorkLoop() const; + + virtual IOReturn requestProbe( IOOptionBits options ); + + virtual IOReturn powerStateWillChangeTo ( IOPMPowerFlags, unsigned long, IOService* ); + virtual IOReturn powerStateDidChangeTo ( IOPMPowerFlags, unsigned long, IOService* ); + virtual IOReturn setPowerState( unsigned long powerStateOrdinal, IOService * device); + virtual IOReturn setAggressiveness( unsigned long type, unsigned long newLevel ); + virtual IOReturn getAggressiveness( unsigned long type, unsigned long * currentLevel ); + virtual IOReturn newUserClient( task_t owningTask, + void * security_id, + UInt32 type, + IOUserClient ** handler ); + virtual IOReturn callPlatformFunction( const OSSymbol * functionName, + bool waitForFunction, + void *p1, void *p2, + void *p3, void *p4 ); + + virtual void hideCursor( void ); + virtual void showCursor( IOGPoint * cursorLoc, int frame ); + virtual void moveCursor( IOGPoint * cursorLoc, int frame ); + // virtual + void resetCursor( void ); + + virtual void getVBLTime( AbsoluteTime * time, AbsoluteTime * delta ); + + virtual void getBoundingRect ( IOGBounds ** bounds ); + + virtual IOReturn open( void ); + + virtual void close( void ); + + virtual bool isConsoleDevice( void ); + + virtual IOReturn setupForCurrentConfig( void ); + + virtual bool serializeInfo( OSSerialize * s ); + virtual bool setNumber( OSDictionary * dict, const char * key, + UInt32 number ); + + IONotifier * addFramebufferNotification( + IOFramebufferNotificationHandler handler, + OSObject * self, void * ref); + +/*! @function getApertureRange + @abstract Return reference to IODeviceMemory object representing memory range of framebuffer. + @discussion IOFramebuffer subclasses must implement this method to describe the memory used by the framebuffer in the current mode. The OS will map this memory range into user space for client access - the range should only include vram memory not hardware registers. + @param aperture The system will only access the aperture kIOFBSystemAperture. + @result an IODeviceMemory instance. A reference will be consumed by the caller for each call of this method - the implementatation should create a new instance of IODeviceMemory for each call, or return one instance with a retain for each call. +*/ + + virtual IODeviceMemory * getApertureRange( IOPixelAperture aperture ) = 0; + +/*! @function getVRAMRange + @abstract Return reference to IODeviceMemory object representing memory range of all the cards vram. + @discussion IOFramebuffer subclasses should implement this method to describe all the vram memory available on the card. The OS will map this memory range into user space for client access - the range should only include vram memory not hardware registers. + @result an IODeviceMemory instance. A reference will be consumed by the caller for each call of this method - the implementatation should create a new instance of IODeviceMemory for each call, or return one instance with a retain for each call. +*/ + + virtual IODeviceMemory * getVRAMRange( void ); + +protected: + +/*! @function handleEvent + @abstract Notify IOFramebuffer superclass code of events. + @discussion IOFramebuffer subclasses should call this IOFramebuffer method on certain power state changes. + @param event The event that has occurred:
+ kIOFBNotifyWillPowerOff call before entering a state other than the maximum.
+ kIOFBNotifyDidPowerOn call after entering the maximum power state.
+ kIOFBNotifyWillPowerOff call before entering a state other than the maximum.
+ kIOFBNotifyDidPowerOn call after entering a state other than the maximum.
+ @param info None of the above events require additional info, pass zero. + @result an IOReturn code, safely ignored. +*/ + + IOReturn handleEvent( IOIndex event, void * info = 0 ); + + + IOReturn deliverFramebufferNotification( + IOIndex event, void * info = 0 ); + +#ifdef IOFRAMEBUFFER_PRIVATE +#include +#endif + +public: +/*! @function enableController + @abstract Perform first time setup of the framebuffer. + @discussion IOFramebuffer subclasses should perform their initialization of the hardware here. The IOService start() method is not called at a time appropriate for this initialization. + @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from using the device. +*/ + + virtual IOReturn enableController( void ); + +/*! @function getPixelFormats + @abstract List the pixel formats the framebuffer supports. + @discussion IOFramebuffer subclasses must implement this method to return an array of strings representing the possible pixel formats available in the framebuffer. + @result A const char * pointer. The string consists of a concatenation of each pixel format string separated by the NULL character. The commonly supported pixel formats for Mac OS X are defined as IO8BitIndexedPixels, IO16BitDirectPixels, IO32BitDirectPixels. +*/ + + virtual const char * getPixelFormats( void ) = 0; + +/*! @function getDisplayModeCount + @abstract Return the number of display modes the framebuffer supports. + @discussion IOFramebuffer subclasses must implement this method to return a count of the display modes available. This count should change unless a connection change is posted for the device indicated the framebuffer and/or display configuration has changed. + @result A count of the display modes available. +*/ + + virtual IOItemCount getDisplayModeCount( void ) = 0; + +/*! @function getDisplayModes + @abstract Return the number of display modes the framebuffer supports. + @discussion IOFramebuffer subclasses must implement this method to return an array of display mode IDs available for the framebuffer. The IDs are defined by the driver in the range 0x00000001 - 0x7fffffff, and should be constant for a given display mode. + @param allDisplayModes A caller allocated buffer with the size given by the result of getDisplayModeCount(). + @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from using the device. +*/ + + virtual IOReturn getDisplayModes( IODisplayModeID * allDisplayModes ) = 0; + +/*! @function getInformationForDisplayMode + @abstract Return information about a given display mode. + @discussion IOFramebuffer subclasses must implement this method to return information in the IODisplayModeInformation structure for the display mode with the passed ID. + @param displayMode A display mode ID previously returned by getDisplayModes(). + @param info Pointer to a structure of type IODisplayModeInformation to be filled out by the driver. IODisplayModeInformation is documented in IOGraphicsTypes.h. + @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from using the device. +*/ + + virtual IOReturn getInformationForDisplayMode( IODisplayModeID displayMode, + IODisplayModeInformation * info ) = 0; + +/*! @function getPixelFormatsForDisplayMode + @abstract Obsolete. + @discussion IOFramebuffer subclasses must implement this method to return zero. + @param displayMode Ignored. + @param depth Ignored. + @result Return zero. +*/ + + virtual UInt64 getPixelFormatsForDisplayMode( IODisplayModeID displayMode, + IOIndex depth ) = 0; + +/*! @function getPixelInformation + @abstract Return information about the framebuffer format for a given display mode and depth. + @discussion IOFramebuffer subclasses must implement this method to return information in the IOPixelInformation structure for the display mode with the passed ID, depth index and aperture. The aperture utilized by the system is always kIOFBSystemAperture. Drivers may define alternative apertures, being a view of the framebuffer in a different pixel format from the default. + @param displayMode A display mode ID previously returned by getDisplayModes(). + @param depth An index from zero to the value of the maxDepthIndex field from the IODisplayModeInformation structure (inclusive). + @param info Pointer to a structure of type IOPixelInformation to be filled out by the driver. IOPixelInformation is documented in IOGraphicsTypes.h. + @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from using the device. +*/ + + virtual IOReturn getPixelInformation( + IODisplayModeID displayMode, IOIndex depth, + IOPixelAperture aperture, IOPixelInformation * pixelInfo ) = 0; + +/*! @function getCurrentDisplayMode + @abstract Return the framebuffers current display mode and depth. + @discussion IOFramebuffer subclasses must implement this method to return the current mode and depth. + @param displayMode A display mode ID representing the current mode. + @param depth An index indicating the depth configuration of the framebuffer. The index should range from zero to the value of the maxDepthIndex field from the IODisplayModeInformation structure for the display mode. + @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from using the device. +*/ + + virtual IOReturn getCurrentDisplayMode( IODisplayModeID * displayMode, + IOIndex * depth ) = 0; + +/*! @function setCurrentDisplayMode + @abstract Set the framebuffers current display mode and depth. + @discussion IOFramebuffer subclasses should implement this method to set the current mode and depth. Other than at enableController() time, this is the only method that should change the framebuffer format and is synchronized with clients and attached accelerators to make sure access to the device is disallowed during the change. + @param displayMode A display mode ID representing the new mode. + @param depth An index indicating the new depth configuration of the framebuffer. The index should range from zero to the value of the maxDepthIndex field from the IODisplayModeInformation structure for the display mode. + @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from using the device. +*/ + + virtual IOReturn setDisplayMode( IODisplayModeID displayMode, + IOIndex depth ); + +/*! @function setApertureEnable + @abstract Enable an aperture on the framebuffer (usually unimplemented, no OS usage). + @discussion IOFramebuffer subclasses may implement this method to set enable a non standard aperture. The system does not call this method. + @param aperture A device specific aperture index. + @param enable Device specific mask of options. + @result an IOReturn code. +*/ + + virtual IOReturn setApertureEnable( IOPixelAperture aperture, + IOOptionBits enable ); + +/*! @function setStartupDisplayMode + @abstract Set the framebuffers display mode and depth to be used during boot and at startup. + @discussion IOFramebuffer subclasses should implement this method to set the mode and depth to be used during boot and at startup, to reduce needed mode changes during boot when the display connection type is the same. If possible this mode should also be used by the OpenFirmware driver for the card. + @param displayMode A display mode ID representing the new startup mode. + @param depth An index indicating the new startup depth configuration of the framebuffer. The index should range from zero to the value of the maxDepthIndex field from the IODisplayModeInformation structure for the display mode. + @result an IOReturn code. +*/ + + virtual IOReturn setStartupDisplayMode( IODisplayModeID displayMode, + IOIndex depth ); + +/*! @function getCurrentDisplayMode + @abstract Return the framebuffers display mode and depth to be used during boot and at startup. + @discussion IOFramebuffer subclasses should implement this method to return the current mode and depth. + @param displayMode A display mode ID representing the mode used during startup. + @param depth An index indicating the depth configuration of the framebuffer used during startup. The index should range from zero to the value of the maxDepthIndex field from the IODisplayModeInformation structure for the display mode. + @result an IOReturn code. +*/ + + virtual IOReturn getStartupDisplayMode( IODisplayModeID * displayMode, + IOIndex * depth ); + +/*! @function setCLUTWithEntries + @abstract Set the color lookup table to be used by the framebuffer in indexed modes. + @discussion IOFramebuffer subclasses may implement this method to allow a palette to be set for indexed display modes. It will not be called on framebuffers in direct display modes. + @param colors A pointer to an array of numEntries RGB color entries. + @param index The index of the first entry to set. + @param numEntries The number of entries in the table. + @param options Options controlling the operation.
+ kSetCLUTByValue is set if the index field of each entry should be used to set the table sparsely, otherwise consecutive entries from the index parameter should be set.
+ kSetCLUTImmediately is set if the CLUT set should not be synchronized with the vertical blank, otherwise it should.
+ kSetCLUTWithLuminance is set if the CLUT should be set to a gray value equivalent in luminance to the passed color entry.
+ @result an IOReturn code. +*/ + + virtual IOReturn setCLUTWithEntries( IOColorEntry * colors, UInt32 index, + UInt32 numEntries, IOOptionBits options ); + +/*! @function setGammaTable + @abstract Set the gamma table to be used by the framebuffer. + @discussion IOFramebuffer subclasses should implement this method to allow a gamma table to be set. + @param channelCount Defines the number of channels in the supplied data. OS X will pass three for separate R, G, B data, or one if the same data should apply to all channels. + @param dataCount The number of data entries per channel. + @param dataWidth The number of bits in each entry. 8 for Mac OS X 10.1 and earlier, 16 for later releases. + @param data The packed array of correction data. Data is passed for the R (or single) channel followed by the G & B channels. Each entry is one or two bytes (if dataWidth > 8). + @result an IOReturn code. +*/ + + virtual IOReturn setGammaTable( UInt32 channelCount, UInt32 dataCount, + UInt32 dataWidth, void * data ); + +/*! @function setAttribute + @abstract Generic method to set some attribute of the framebuffer device. + @discussion IOFramebuffer subclasses may implement this method to allow arbitrary attribute/value pairs to be set. + @param attribute Defines the attribute to be set. Some defined attributes are:
+ kIOPowerAttribute The IOFramebuffer class implements most power management (IOService) methods. It calls the subclass to carry out the power management state change with this attribute. When carrying out power state changes, the subclass should call IOFramebuffer::handleEvent for certain changes - set that method for more information. + @param value The new value for the attribute. + @result an IOReturn code. +*/ + + virtual IOReturn setAttribute( IOSelect attribute, uintptr_t value ); + +/*! @function getAttribute + @abstract Generic method to retrieve some attribute of the framebuffer device. + @discussion IOFramebuffer subclasses may implement this method to allow arbitrary attribute/value pairs to be returned. + @param attribute Defines the attribute to be set. Some defined attributes are:
+ kIOHardwareCursorAttribute If the device supports a hardware cursor and implements the setCursorImage() and setCursorState() calls it should return true for this attribute. + @param value Returns the value for the attribute. + @result an IOReturn code. +*/ + + virtual IOReturn getAttribute( IOSelect attribute, uintptr_t * value ); + +/*! @function getTimingInfoForDisplayMode + @abstract Returns a timing description for a display mode. + @discussion IOFramebuffer subclasses should implement this method to return timing information for a display mode. This allows the OS to enable display modes based on its knowledge of the connected display type. Two types of timing information are defined, by Apple defined constant, or by a detailed description of the timing parameters of the mode. + @param displayMode A display mode ID representing the mode to examine. + @param info The driver returns the information for the display mode in this structure.
+ If the mode has an Apple defined constant, such as timingVESA_1024x768_75hz, it should be returned in the appleTimingID field. Otherwise the field should be set to timingInvalid.
+ If the driver is able to supply detailed timing information, it should return it in the detailedInfo.v2 field of the structure, otherwise the driver should clear the kIODetailedTimingValid flag from the flags field.
+ The IODetailedTimingInformationV2 structure is documented in IOGraphicsTypes.h + @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from using the device. +*/ + + virtual IOReturn getTimingInfoForDisplayMode( + IODisplayModeID displayMode, IOTimingInformation * info ); + +/*! @function validateDetailedTiming + @abstract Reports whether a detailed timing is able to be programmed with the device. + @discussion IOFramebuffer subclasses may implement programmable mode functionality where the OS is able to install modes described by a detailed timing into the driver. + @param description A pointer to a IODetailedTimingInformationV2 structure. The driver should examine this description and change any fields that it cannot implement to reflect its closest possible implementation. + @param descripSize sizeof(IODetailedTimingInformationV2) + @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from installing the programmable mode. +*/ + + virtual IOReturn validateDetailedTiming( + void * description, IOByteCount descripSize ); + +/*! @function setDetailedTimings + @abstract Installs an array of OS programmed detailed timings to be made available by the driver. + @discussion IOFramebuffer subclasses may implement programmable mode functionality where the OS is able to install modes described by a detailed timing into the driver. The driver needs to add these modes to its internal mode list if it provides this functionality. + @param array An OSArray of OSData objects. Each OSData contains one IODetailedTimingInformationV2 structure. All the data described by the array should be copied or retained by this call until the next invocation of this method. + @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from installing the programmable modes. +*/ + + virtual IOReturn setDetailedTimings( OSArray * array ); + +/*! @function getConnectionCount + @abstract Reports the number of display connections the device supports, driven from one framebuffer. + @discussion IOFramebuffer subclasses may implement functionality where a single framebuffer drives multiple displays. This is not recommended or fully supported and instead multihead cards should implement multiple instances of IOFramebuffer objects to provide full functionality. + @result A count of the number of display connections reported by the framebuffer. Current versions of OS X only support one connection completely. +*/ + + virtual IOItemCount getConnectionCount( void ); + + +/*! @function setAttributeForConnection + @abstract Generic method to set some attribute of the framebuffer device, specific to one display connection. + @discussion IOFramebuffer subclasses may implement this method to allow arbitrary attribute/value pairs to be set, specific to one display connection. + @param attribute Defines the attribute to be set. Some defined attributes are:
+ kIOCapturedAttribute If the device supports hotplugging displays, it should disable the generation of hot plug interrupts when the attribute kIOCapturedAttribute is set to true. + @param value The new value for the attribute. + @result an IOReturn code. +*/ + + virtual IOReturn setAttributeForConnection( IOIndex connectIndex, + IOSelect attribute, uintptr_t value ); + +/*! @function getAttributeForConnection + @abstract Generic method to retrieve some attribute of the framebuffer device, specific to one display connection. + @discussion IOFramebuffer subclasses may implement this method to allow arbitrary attribute/value pairs to be returned, specific to one display connection. + @param attribute Defines the attribute to be returned. Some defined attributes are:
+ kConnectionSupportsHLDDCSense If the framebuffer supports the DDC methods hasDDCConnect() and getDDCBlock() it should return success (and no value) for this attribute.
+ kConnectionSupportsLLDDCSense If the framebuffer wishes to make use of IOFramebuffer::doI2CRequest software implementation of I2C it should implement the I2C methods setDDCClock(), setDDCData(), readDDCClock(), readDDCData(), and it should return success (and no value) for this attribute.
+ @param value Returns the value for the attribute. + @result an IOReturn code. +*/ + + virtual IOReturn getAttributeForConnection( IOIndex connectIndex, + IOSelect attribute, uintptr_t * value ); + +/*! @function convertCursorImage + @abstract Utility method of IOFramebuffer to convert cursor image to a hardware cursor format. + @discussion IOFramebuffer subclasses may implement hardware cursor functionality, if so they should pass the cursor image given by the setCursorImage() method, with a description of their hardware cursor format, to this helper function to this routine to convert the image to one suitable for the hardware. + @param cursorImage Opaque cursor parameter from the setCursorImage() call. + @param description Describes the cursor format supported by the driver. + @param cursor Structure describing the drivers allocated buffer to receive the converted image. + @result a bool indicating the conversion was successful. +*/ + + virtual bool convertCursorImage( void * cursorImage, + IOHardwareCursorDescriptor * description, + IOHardwareCursorInfo * cursor ); + +/*! @function setCursorImage + @abstract Set a new image for the hardware cursor. + @discussion IOFramebuffer subclasses may implement hardware cursor functionality, if so they should implement this method to change the hardware cursor image. The image should be passed to the convertCursorImage() method with each type of cursor format the hardware supports until success, if all fail the hardware cursor should be hidden and kIOReturnUnsupported returned. + @param cursorImage Opaque cursor description. This should be passed to the convertCursorImage() method to convert to a format specific to the hardware. + @result An IOReturn code. +*/ + + virtual IOReturn setCursorImage( void * cursorImage ); + +/*! @function setCursorState + @abstract Set a new position and visibility for the hardware cursor. + @discussion IOFramebuffer subclasses may implement hardware cursor functionality, if so they should implement this method to change the position and visibility of the cursor. + @param x Left coordinate of the cursor image. A signed value, will be negative if the cursor's hot spot and position place it partly offscreen. + @param y Top coordinate of the cursor image. A signed value, will be negative if the cursor's hot spot and position place it partly offscreen. + @param visible Visible state of the cursor. + @result An IOReturn code. +*/ + + virtual IOReturn setCursorState( SInt32 x, SInt32 y, bool visible ); + +/*! @function flushCursor + @abstract Perform any needed cache flushing after software cursor rendering. + @discussion IOFramebuffer implements software cursor functionality when a hardware cursor is unavailable. Some hardware may need to flush a cache after the processor has finished lifting and dropping the software cursor. +*/ + + virtual void flushCursor( void ); + +/*! @function getAppleSense + @abstract Return display sense information for legacy Apple sensing. + @discussion Hardware that supports simple display sensing, or the classic 3 pin Apple sensing described in Designing Cards and Drivers, should implement this method to return sense information. + @param connectIndex Index of the display connection, from zero to the value of getConnectionCount(). + @param senseType Return zero to indicate legacy Apple sensing. + @param primary Return the value of the primary Apple sense code. + @param extended Return the value of the secondary Apple sense code. + @param displayType Return an Apple defined constant for the type of display sensed. For example, kVGAConnect, kNTSCConnect, kPALConnect etc. + @result An IOReturn code. +*/ + + virtual IOReturn getAppleSense( IOIndex connectIndex, + UInt32 * senseType, + UInt32 * primary, + UInt32 * extended, + UInt32 * displayType ); + +/*! @function connectFlags + @abstract Return display sense information for legacy Apple sensing. + @discussion Hardware that supports simple display sensing, or the classic 3 pin Apple sensing described in Designing Cards and Drivers, should implement this method to return mode flags relative to the sensed display. If this method is unimplemented, all modes have are given the flags kDisplayModeValidFlag | kDisplayModeSafeFlag. + @param connectIndex Index of the display connection, from zero to the value of getConnectionCount(). + @param displayMode A display mode ID. + @param flags Return the flags value for the given mode with the connected display. Flags are:
+ kDisplayModeValidFlag - mode is considered valid for the connected display by the driver. + kDisplayModeSafeFlag - mode is considered safe (not requiring mode change confirmation) for the connected display by the driver. + kDisplayModeDefaultFlag - mode is considered default for the connected display by the driver. + @result An IOReturn code. +*/ + + virtual IOReturn connectFlags( IOIndex connectIndex, + IODisplayModeID displayMode, IOOptionBits * flags ); + + //// IOLowLevelDDCSense + +/*! @function setDDCClock + @abstract Sets the state of the I2C clock line on a bus. + @discussion Framebuffers making use of the IOFramebuffer::doI2CRequest() software implementation of I2C should implement this method to set the state of the I2C clock line on the given bus. Otherwise may be unimplemented. + @param bus Index of the bus. + @param value One of kIODDCLow, kIODDCHigh, kIODDCTristate. +*/ + + virtual void setDDCClock( IOIndex bus, UInt32 value ); + +/*! @function setDDCData + @abstract Sets the state of the I2C data line on a bus. + @discussion Framebuffers making use of the IOFramebuffer::doI2CRequest() software implementation of I2C should implement this method to set the state of the I2C data line on the given bus. Otherwise may be unimplemented. + @param bus Index of the bus. + @param value One of kIODDCLow, kIODDCHigh, kIODDCTristate. +*/ + virtual void setDDCData( IOIndex bus, UInt32 value ); + +/*! @function readDDCClock + @abstract Reads the input state of the I2C clock line on a bus. + @discussion Framebuffers making use of the IOFramebuffer::doI2CRequest() software implementation of I2C should implement this method to return the input state of the I2C clock line on the given bus. Otherwise may be unimplemented. + @param bus Index of the bus. + @result A boolean reflecting the current state of the clock line on the given bus. +*/ + virtual bool readDDCClock( IOIndex bus ); + +/*! @function readDDCData + @abstract Reads the input state of the I2C data line on a bus. + @discussion Framebuffers making use of the IOFramebuffer::doI2CRequest() software implementation of I2C should implement this method to return the input state of the I2C data line on the given bus. Otherwise may be unimplemented. + @param bus Index of the bus. + @result A boolean reflecting the current state of the data line on the given bus. +*/ + virtual bool readDDCData( IOIndex bus ); + + virtual IOReturn enableDDCRaster( bool enable ); + +/*! @function hasDDCConnect + @abstract Return display DDC connect state. + @discussion Hardware that supports DDC/EDID display sensing should implement this method to return true if a DDC display is detected. They should also return success for the connection attribute kConnectionSupportsHLDDCSense (from getAttributeForConnection()). + @param connectIndex Index of the display connection, from zero to the value of getConnectionCount(). + @result True if a DDC display is detected. +*/ + + virtual bool hasDDCConnect( IOIndex connectIndex ); + +/*! @function getDDCBlock + @abstract Return display EDID data. + @discussion Hardware that supports DDC/EDID display sensing should implement this method to return EDID data in 128 byte blocks. + @param connectIndex Index of the display connection, from zero to the value of getConnectionCount(). + @param blockNumber Block number, ranging from one to the number of blocks return by the display. + @param blockType kIODDCBlockTypeEDID will be passed. + @param options No options are currently defined. + @param data Caller allocated buffer to receive the blocks data. + @param length In/out parameter - callers allocated buffer size, driver returns actual size. + @result An IOReturn code. +*/ + + virtual IOReturn getDDCBlock( IOIndex connectIndex, UInt32 blockNumber, + IOSelect blockType, IOOptionBits options, + UInt8 * data, IOByteCount * length ); + +/*! @function registerForInterruptType + @abstract Set callbacks for driver to call on interrupt events. + @discussion The IOFramebuffer class will call its subclasses to set callbacks to be called on interrupt events generated by hardware events. Only two are currently in use - vertical blank interrupts and connection changed interrupts. + @param interruptType One of these constants:
+ kIOFBVBLInterruptType Specifying a vertical blanking interrupt. + kIOFBConnectInterruptType Specify the display connection should be resensed. + @param proc C callback to be called by the driver when the specified event occurs. + @param target Target parameter for the callback proc. + @param ref Ref parameter for the callback proc. + @param interruptRef The subclass should return an opaque reference to the installed interrupt handler, for use with unregisterInterrupt() and setInterruptState(). + @result An IOReturn code. +*/ + + virtual IOReturn registerForInterruptType( IOSelect interruptType, + IOFBInterruptProc proc, OSObject * target, void * ref, + void ** interruptRef ); + +/*! @function unregisterInterrupt + @abstract Remove a callback previously installed by registerForInterruptType(). + @discussion Remove a callback previously installed by registerForInterruptType(). + @param interruptRef The interruptRef returned from the registerForInterruptType call that installed the interrupt. + @result An IOReturn code. +*/ + + virtual IOReturn unregisterInterrupt( void * interruptRef ); + +/*! @function unregisterInterrupt + @abstract Enable or disable a callback previously installed by registerForInterruptType(). + @discussion Enable or disable a callback previously installed by registerForInterruptType(). + @param state True or false to enable the callback. + @result An IOReturn code. +*/ + + virtual IOReturn setInterruptState( void * interruptRef, UInt32 state ); + + virtual IOReturn getNotificationSemaphore( IOSelect interruptType, + semaphore_t * semaphore ); + +/* non WL clients apis +*/ + IOReturn setAttributeExt( IOSelect attribute, uintptr_t value ); + + IOReturn getAttributeExt( IOSelect attribute, uintptr_t * value ); + + IOReturn setAttributeForConnectionExt( IOIndex connectIndex, + IOSelect attribute, uintptr_t value ); + + IOReturn getAttributeForConnectionExt( IOIndex connectIndex, + IOSelect attribute, uintptr_t * value ); +}; + +#endif /* ! _IOKIT_IOFRAMEBUFFER_H */ diff --git a/i386/include/IOKit/graphics/IOFramebufferShared.h b/i386/include/IOKit/graphics/IOFramebufferShared.h new file mode 100644 index 0000000..7f01ff3 --- /dev/null +++ b/i386/include/IOKit/graphics/IOFramebufferShared.h @@ -0,0 +1,255 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOFRAMEBUFFERSHARED_H +#define _IOKIT_IOFRAMEBUFFERSHARED_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! @header IOFramebufferShared +The IOFramebufferShared.h header contains definitions of objects and types shared between a kernel level IOFrameBuffer service and a non-kernel window server. In Mac OS X this structure is used by the CoreGraphics server and IOGraphics Family, and is not available to other clients. IOFramebuffer subclasses and IOFramebuffer clients within the kernel should also not rely on this structure definition and constants. It is public only for use on Darwin based window servers. Cursor and window server state data is exchanged by kernel and non-kernel tasks through a slice of shared memory containing a StdFBShmem_t structure.
+For a non-kernel task to get access to this slice of shared memory, a connection to an IOFramebuffer service must be made. A connection is made with the IOServiceOpen() function described in IOKitLib.h. A connection type of kIOFBServerConnectType or kIOFBSharedConnectType (for read-only access) should be specified. An io_connect_t handle is returned by IOServiceOpen(). This handle must be passed to IOFBCreateSharedCursor() to create the slice of shared memory. Then IOConnectMapMemory() may be called with a memory type of kIOFBCursorMemory to map the shared memory into the non-kernel task. +*/ + +#ifdef KERNEL +// CGS use optional +/*! @defined IOFB_ARBITRARY_SIZE_CURSOR + @discussion When IOFB_ARBITRARY_SIZE_CURSOR is not defined, the maximum cursor size is assumed to be CURSORWIDTH x CURSORHEIGHT and this header file will define a number of structures for storing cursor images accordingly. A non-kernel task may define IOFB_ARBITRARY_SIZE_CURSOR and use cursors up to the size specified when IOFBCreateSharedCursor() was called. In this case appropriate structures for storing cursor images must be defined elsewhere. In the kernel, IOFB_ARBITRARY_SIZE_CURSOR is always defined. +*/ +#define IOFB_ARBITRARY_SIZE_CURSOR +#define IOFB_ARBITRARY_FRAMES_CURSOR 1 +#endif + +#define IOFB_SUPPORTS_XOR_CURSOR +#define IOFB_SUPPORTS_HW_SHIELD +#define IOFB_SUPPORTS_ARBITRARY_FRAMES_CURSOR + +// +// Cursor and Window Server state data, occupying a slice of shared memory +// between the kernel and WindowServer. +// +/*! @enum CursorParameters + @constant kIOFBNumCursorFrames The number of cursor images stored in the StdFBShmem_t structure. + @constant kIOFBNumCursorFramesShift Used with waiting cursors. + @constant kIOFBMaxCursorDepth The maximum cursor pixel depth. +*/ +enum { +#if IOFB_ARBITRARY_FRAMES_CURSOR + kIOFBMainCursorIndex = 0, + kIOFBWaitCursorIndex = 1, + kIOFBNumCursorIndex = 4, +#else + kIOFBNumCursorFrames = 4, + kIOFBNumCursorFramesShift = 2, +#endif + kIOFBMaxCursorDepth = 32 +}; + +#ifndef IOFB_ARBITRARY_SIZE_CURSOR + +/*! @defined CURSORWIDTH + @discussion The maximum width of the cursor image in pixels. This is only defined if IOFB_ARBITRARY_SIZE_CURSOR is not defined. +*/ +#define CURSORWIDTH 16 /* width in pixels */ + +/*! @defined CURSORHEIGHT + @discussion The maximum height of the cursor image in pixels. This is only defined if IOFB_ARBITRARY_SIZE_CURSOR is not defined. +*/ +#define CURSORHEIGHT 16 /* height in pixels */ + +/*! @struct bm12Cursor + @abstract Cursor image for 1-bit cursor. + @discussion This structure stores 16 pixel x 16 pixel cursors to be used with 1-bit color depth. This structure is only defined if IOFB_ARBITRARY_SIZE_CURSOR is not defined. + @field image This array contains the cursor images. + @field mask This array contains the cursor mask. + @field save This array stores the pixel values of the region underneath the cursor in its last drawn position. +*/ +struct bm12Cursor { + unsigned int image[4][16]; + unsigned int mask[4][16]; + unsigned int save[16]; +}; + +/*! @struct bm18Cursor + @abstract Cursor image for 8-bit cursor. + @discussion This structure stores 16 pixel x 16 pixel cursors to be used with 8-bit color depth. This structure is only defined if IOFB_ARBITRARY_SIZE_CURSOR is not defined. + @field image This array contains cursor color values, which are converted to displayed colors through the color table. The array is two dimensional and its first index is the cursor frame and the second index is the cursor pixel. + @field mask This array contains the cursor alpha mask. The array is two dimensional with the same indexing as the image. If an alpha mask pixel is 0 and the corresponding image pixel is set to white for the display, then this cursor pixel will invert pixels on the display. + @field save This array stores the color values of the region underneath the cursor in its last drawn position. +*/ +struct bm18Cursor { + unsigned char image[4][256]; + unsigned char mask[4][256]; + unsigned char save[256]; +}; + +/*! @struct bm34Cursor + @abstract Cursor image for 15-bit cursor. + @discussion This structure stores 16 pixel x 16 pixel cursors to be used with 15-bit color depth. This structure is only defined if IOFB_ARBITRARY_SIZE_CURSOR is not defined. + @field image This array defines the cursor color values and transparency. The array is two dimensional and its first index is the cursor frame and the second index is the cursor pixel. A value of 0 means the pixel is transparent. Non-zero values are stored with the red, green, blue, and alpha values encoded with the following masks:
+ red mask = 0xF000
+ blue mask 0x0F00
+ green mask 0x00F0
+ alpha mask = 0x000F
+Note, only 4 bits are allocated for each color component. + @field save This array stores the color values of the region underneath the cursor in its last drawn position. +*/ +struct bm34Cursor { + unsigned short image[4][256]; + unsigned short save[256]; +}; + +/*! @struct bm38Cursor + @abstract Cursor image for 24-bit cursor. + @discussion This structure stores 16 pixel x 16 pixel cursors to be used with 24-bit color depth. This structure is only defined if IOFB_ARBITRARY_SIZE_CURSOR is not defined. + @field image This array defines the cursor color values and transparency. The array is two dimensional and its first index is the cursor frame and the second index is the cursor pixel. The lower 24 bits of a pixel's value contain the RGB color, while the upper 8 bits contain the alpha value. + @field save This array stores the color values of the region underneath the cursor in its last drawn position. +*/ +struct bm38Cursor { + unsigned int image[4][256]; + unsigned int save[256]; +}; + +#endif /* IOFB_ARBITRARY_SIZE_CURSOR */ + +enum { + kIOFBCursorImageNew = 0x01, + kIOFBCursorHWCapable = 0x02 +}; +enum { + kIOFBHardwareCursorActive = 0x01, + kIOFBHardwareCursorInVRAM = 0x02 +}; + +/*! @struct StdFBShmem_t + @discussion This structure contains cursor and window server state data and occupies a slice of shared memory between the kernel and window server. Several elements of this structure are only used in software cursor mode. Unless otherwise indicated, the coordinates in this structure are given in display space. Display space is the coordinate space that encompasses all the screens. The positions of the screens within display space indicate their location relative to each other as the cursor moves between them. If there is only one screen, the screen coordinates and display space coordinates will be the same. + @field cursorSema Semaphore lock for write access to the shared data in this structure. + @field frame The current cursor frame index. + @field cursorShow The cursor is displayed when cursorShow is 0. + @field cursorObscured If this is true, the cursor has been obscured and cursorShow should not be 0. The cursor will be shown again the next time it is moved. + @field shieldFlag When this is set to true the cursor will not be displayed in the region specified by shieldRect. + @field shielded True if the cursor has been hidden because it entered the shielded region. + @field saveRect The region that is saved underneath the cursor in software cursor mode. + @field shieldRect The region that the cursor will not be displayed in if shieldFlag is true. + @field cursorLoc The location of the cursor hot spot. + @field cursorRect The region that the cursor image currently occupies in software cursor mode. + @field oldCursorRect The region that the cursor image occupied the last time the cursor was drawn in software cursor mode. + @field screenBounds The region that the current screen occupies. + @field version Contains kIOFBCurrentShmemVersion so that a user client can ensure it is using the same version of this structure as the kernel. + @field structSize Contains the size of this structure. + @field vblTime The time of the most recent vertical blanking. + @field vblDelta The interval between the two most recent vertical blankings. + @field vblCount A running count of vertical blank interrupts. + @field reservedC Reserved for future use. + @field hardwareCursorCapable True if the hardware is capable of using hardware cursor mode. + @field hardwareCursorActive True if currently using the hardware cursor mode. + @field reservedB Reserved for future use. + @field cursorSize This array contains the cursor sizes indexed by frame. + @field hotSpot This array contains the location of the cursor hot spots indexed by frame. The hot spots coordinates are given relative to the top left corner of the cursor image. + @field cursor A union of structures that define the cursor images. The structure used depends on the framebuffer's bit depth. These structures are defined above. +*/ + +struct StdFBShmem_t { + ev_lock_data_t cursorSema; + int frame; + char cursorShow; + char cursorObscured; + char shieldFlag; + char shielded; + IOGBounds saveRect; + IOGBounds shieldRect; + IOGPoint cursorLoc; + IOGBounds cursorRect; + IOGBounds oldCursorRect; + IOGBounds screenBounds; + int version; + int structSize; + AbsoluteTime vblTime; + AbsoluteTime vblDelta; + unsigned long long int vblCount; +#if IOFB_ARBITRARY_FRAMES_CURSOR + unsigned int reservedC[28]; +#else + unsigned int reservedC[27]; + unsigned char hardwareCursorFlags[kIOFBNumCursorFrames]; +#endif + unsigned char hardwareCursorCapable; + unsigned char hardwareCursorActive; + unsigned char hardwareCursorShields; + unsigned char reservedB[1]; +#if IOFB_ARBITRARY_FRAMES_CURSOR + IOGSize cursorSize[kIOFBNumCursorIndex]; + IOGPoint hotSpot[kIOFBNumCursorIndex]; +#else + IOGSize cursorSize[kIOFBNumCursorFrames]; + IOGPoint hotSpot[kIOFBNumCursorFrames]; +#endif +#ifndef IOFB_ARBITRARY_SIZE_CURSOR + union { + struct bm12Cursor bw; + struct bm18Cursor bw8; + struct bm34Cursor rgb; + struct bm38Cursor rgb24; + } cursor; +#else /* IOFB_ARBITRARY_SIZE_CURSOR */ + unsigned char cursor[0]; +#endif /* IOFB_ARBITRARY_SIZE_CURSOR */ +}; +#ifndef __cplusplus +typedef volatile struct StdFBShmem_t StdFBShmem_t; +#endif + + +/*! @enum FramebufferConstants + @constant kIOFBCurrentShmemVersion The current version of the slice of shared memory that contains the cursor and window server state data in the StdFBShmem_t structure. + @constant kIOFBCursorMemory The memory type for IOConnectMapMemory() to get a slice of shared memory that contains the StdFBShmem_t structure. +*/ +enum { + // version for IOFBCreateSharedCursor + kIOFBShmemVersionMask = 0x000000ff, + kIOFBTenPtOneShmemVersion = 2, + kIOFBTenPtTwoShmemVersion = 3, + kIOFBCurrentShmemVersion = 2, + + // number of frames in animating cursor (if > kIOFBTenPtTwoShmemVersion) + kIOFBShmemCursorNumFramesMask = 0x00ff0000, + kIOFBShmemCursorNumFramesShift = 16, + + // memory types for IOConnectMapMemory. + kIOFBCursorMemory = 100 +}; + +/*! @defined IOFRAMEBUFFER_CONFORMSTO + @discussion The class name of the framebuffer service. +*/ +#define IOFRAMEBUFFER_CONFORMSTO "IOFramebuffer" + +#ifdef __cplusplus +} +#endif + +#endif /* ! _IOKIT_IOFRAMEBUFFERSHARED_H */ diff --git a/i386/include/IOKit/graphics/IOGraphicsDevice.h b/i386/include/IOKit/graphics/IOGraphicsDevice.h new file mode 100644 index 0000000..8f51330 --- /dev/null +++ b/i386/include/IOKit/graphics/IOGraphicsDevice.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IOGRAPHICSDEVICE_H +#define _IOKIT_IOGRAPHICSDEVICE_H + +#include +#include + + +class IOGraphicsDevice : public IOService +{ + OSDeclareAbstractStructors(IOGraphicsDevice) + +public: + + virtual void hideCursor( void ) = 0; + virtual void showCursor( IOGPoint * cursorLoc, int frame ) = 0; + virtual void moveCursor( IOGPoint * cursorLoc, int frame ) = 0; + + virtual void getVBLTime( AbsoluteTime * time, AbsoluteTime * delta ) = 0; + + virtual void getBoundingRect ( IOGBounds ** bounds ) = 0; +}; + +#endif /* ! _IOKIT_IOGRAPHICSDEVICE_H */ + diff --git a/i386/include/IOKit/graphics/IOGraphicsEngine.h b/i386/include/IOKit/graphics/IOGraphicsEngine.h new file mode 100644 index 0000000..4c79b41 --- /dev/null +++ b/i386/include/IOKit/graphics/IOGraphicsEngine.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + * 10 Mar 99 sdouglas created. + */ + + +struct IOGraphicsEngineContext { + IOSharedLockData contextLock; + IOOptionBits state; + void * owner; + UInt32 version; + IOByteCount structSize; + UInt32 reserved[ 8 ]; +}; +#ifndef __cplusplus +typedef volatile struct IOGraphicsEngineContext IOGraphicsEngineContext; +#endif + +enum { + // memory type for IOMapMemory + kIOGraphicsEngineContext = 100 +}; + +enum { + // version + kIOGraphicsEngineContextVersion = 1 +}; diff --git a/i386/include/IOKit/graphics/IOGraphicsInterfaceTypes.h b/i386/include/IOKit/graphics/IOGraphicsInterfaceTypes.h new file mode 100644 index 0000000..5b392a7 --- /dev/null +++ b/i386/include/IOKit/graphics/IOGraphicsInterfaceTypes.h @@ -0,0 +1,301 @@ +/* + * Copyright (c) 1999-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOGRAPHICSINTERFACETYPES_H +#define _IOKIT_IOGRAPHICSINTERFACETYPES_H + +#include + +#define IO_FOUR_CHAR_CODE(x) (x) + +typedef UInt32 IOFourCharCode; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#define kCurrentGraphicsInterfaceVersion 1 +#define kCurrentGraphicsInterfaceRevision 2 + + +#ifdef IOGA_COMPAT +typedef SInt32 IOBlitCompletionToken; +#endif + +typedef UInt32 IOBlitType; +enum { + kIOBlitTypeVerbMask = 0x000000ff, + kIOBlitTypeRects = 0, + kIOBlitTypeCopyRects, + kIOBlitTypeLines, + kIOBlitTypeScanlines, + kIOBlitTypeCopyRegion, + + kIOBlitTypeMoveCursor, + kIOBlitTypeShowCursor, + kIOBlitTypeHideCursor, + + kIOBlitTypeMonoExpand = 0x00000100, + kIOBlitTypeColorSpaceConvert = 0x00000200, + kIOBlitTypeScale = 0x00000400, + + kIOBlitTypeSourceKeyColorModeMask = 0x00003000, + kIOBlitTypeDestKeyColorModeMask = 0x0000c000, + kIOBlitTypeSourceKeyColorEqual = 0x00001000, + kIOBlitTypeSourceKeyColorNotEqual = 0x00002000, + kIOBlitTypeDestKeyColorEqual = 0x00004000, + kIOBlitTypeDestKeyColorNotEqual = 0x00008000, + + kIOBlitTypeOperationMask = 0x0fff0000, + kIOBlitTypeOperationShift = 16, + kIOBlitTypeOperationTypeMask = 0x0f000000, + + kIOBlitTypeOperationType0 = 0x00000000, + kIOBlitCopyOperation = 0x00000000 | kIOBlitTypeOperationType0, + kIOBlitOrOperation = 0x00010000 | kIOBlitTypeOperationType0, + kIOBlitXorOperation = 0x00020000 | kIOBlitTypeOperationType0, + kIOBlitBlendOperation = 0x00030000 | kIOBlitTypeOperationType0, + kIOBlitHighlightOperation = 0x00040000 | kIOBlitTypeOperationType0 +}; + +typedef UInt32 IOBlitSourceType; +enum { + kIOBlitSourceDefault = 0x00000000, + kIOBlitSourceFramebuffer = 0x00001000, + kIOBlitSourceMemory = 0x00002000, + kIOBlitSourceOOLMemory = 0x00003000, + kIOBlitSourcePattern = 0x00004000, + kIOBlitSourceOOLPattern = 0x00005000, + kIOBlitSourceSolid = 0x00006000, + kIOBlitSourceCGSSurface = 0x00007000, + kIOBlitSourceIsSame = 0x80000000 +}; + +#ifdef IOGA_COMPAT +typedef IOBlitSourceType IOBlitSourceDestType; +enum { + kIOBlitDestFramebuffer = 0x00000001 +}; +#endif + +typedef struct IOBlitOperationStruct { + UInt32 color0; + UInt32 color1; + SInt32 offsetX; + SInt32 offsetY; + UInt32 sourceKeyColor; + UInt32 destKeyColor; + UInt32 specific[16]; +} IOBlitOperation; + +typedef struct IOBlitRectangleStruct { + SInt32 x; + SInt32 y; + SInt32 width; + SInt32 height; +} IOBlitRectangle; + +typedef struct IOBlitRectanglesStruct { + IOBlitOperation operation; + IOItemCount count; + IOBlitRectangle rects[1]; +} IOBlitRectangles; + +typedef struct IOBlitCopyRectangleStruct { + SInt32 sourceX; + SInt32 sourceY; + SInt32 x; + SInt32 y; + SInt32 width; + SInt32 height; +} IOBlitCopyRectangle; + +typedef struct IOBlitCopyRectanglesStruct { + IOBlitOperation operation; + IOItemCount count; + IOBlitCopyRectangle rects[1]; +} IOBlitCopyRectangles; + + +typedef struct IOBlitCopyRegionStruct { + IOBlitOperation operation; + SInt32 deltaX; + SInt32 deltaY; + IOAccelDeviceRegion * region; +} IOBlitCopyRegion; + + +typedef struct IOBlitVertexStruct { + SInt32 x; + SInt32 y; +} IOBlitVertex; + +typedef struct IOBlitVerticesStruct { + IOBlitOperation operation; + IOItemCount count; + IOBlitVertex vertices[2]; +} IOBlitVertices; + +typedef struct IOBlitScanlinesStruct { + IOBlitOperation operation; + IOItemCount count; + SInt32 y; + SInt32 height; + SInt32 x[2]; +} IOBlitScanlines; + + +typedef struct IOBlitCursorStruct { + IOBlitOperation operation; + IOBlitRectangle rect; +} IOBlitCursor; + +typedef struct _IOBlitMemory * IOBlitMemoryRef; + + +/* Quickdraw.h pixel formats*/ + +enum { + kIO1MonochromePixelFormat = 0x00000001, /* 1 bit indexed*/ + kIO2IndexedPixelFormat = 0x00000002, /* 2 bit indexed*/ + kIO4IndexedPixelFormat = 0x00000004, /* 4 bit indexed*/ + kIO8IndexedPixelFormat = 0x00000008, /* 8 bit indexed*/ + kIO16BE555PixelFormat = 0x00000010, /* 16 bit BE rgb 555 (Mac)*/ + kIO24RGBPixelFormat = 0x00000018, /* 24 bit rgb */ + kIO32ARGBPixelFormat = 0x00000020, /* 32 bit argb (Mac)*/ + kIO1IndexedGrayPixelFormat = 0x00000021, /* 1 bit indexed gray*/ + kIO2IndexedGrayPixelFormat = 0x00000022, /* 2 bit indexed gray*/ + kIO4IndexedGrayPixelFormat = 0x00000024, /* 4 bit indexed gray*/ + kIO8IndexedGrayPixelFormat = 0x00000028 /* 8 bit indexed gray*/ +}; + +enum { + kIO16LE555PixelFormat = IO_FOUR_CHAR_CODE('L555'), /* 16 bit LE rgb 555 (PC)*/ + kIO16LE5551PixelFormat = IO_FOUR_CHAR_CODE('5551'), /* 16 bit LE rgb 5551*/ + kIO16BE565PixelFormat = IO_FOUR_CHAR_CODE('B565'), /* 16 bit BE rgb 565*/ + kIO16LE565PixelFormat = IO_FOUR_CHAR_CODE('L565'), /* 16 bit LE rgb 565*/ + kIO24BGRPixelFormat = IO_FOUR_CHAR_CODE('24BG'), /* 24 bit bgr */ + kIO32BGRAPixelFormat = IO_FOUR_CHAR_CODE('BGRA'), /* 32 bit bgra (Matrox)*/ + kIO32ABGRPixelFormat = IO_FOUR_CHAR_CODE('ABGR'), /* 32 bit abgr */ + kIO32RGBAPixelFormat = IO_FOUR_CHAR_CODE('RGBA'), /* 32 bit rgba */ + kIOYUVSPixelFormat = IO_FOUR_CHAR_CODE('yuvs'), /* YUV 4:2:2 byte ordering 16-unsigned = 'YUY2'*/ + kIOYUVUPixelFormat = IO_FOUR_CHAR_CODE('yuvu'), /* YUV 4:2:2 byte ordering 16-signed*/ + kIOYVU9PixelFormat = IO_FOUR_CHAR_CODE('YVU9'), /* YVU9 Planar 9*/ + kIOYUV411PixelFormat = IO_FOUR_CHAR_CODE('Y411'), /* YUV 4:1:1 Interleaved 16*/ + kIOYVYU422PixelFormat = IO_FOUR_CHAR_CODE('YVYU'), /* YVYU 4:2:2 byte ordering 16*/ + kIOUYVY422PixelFormat = IO_FOUR_CHAR_CODE('UYVY'), /* UYVY 4:2:2 byte ordering 16*/ + kIOYUV211PixelFormat = IO_FOUR_CHAR_CODE('Y211'), /* YUV 2:1:1 Packed 8*/ + kIO2vuyPixelFormat = IO_FOUR_CHAR_CODE('2vuy') /* UYVY 4:2:2 byte ordering 16*/ +}; + +/* Non Quickdraw.h pixel formats*/ +enum { + kIO16LE4444PixelFormat = IO_FOUR_CHAR_CODE('L444'), /* 16 bit LE argb 4444*/ + kIO16BE4444PixelFormat = IO_FOUR_CHAR_CODE('B444'), /* 16 bit BE argb 4444*/ + kIO64BGRAPixelFormat = IO_FOUR_CHAR_CODE('B16I'), /* 64 bit bgra */ + kIO64RGBAFloatPixelFormat = IO_FOUR_CHAR_CODE('B16F'), /* 64 bit rgba */ + kIO128RGBAFloatPixelFormat = IO_FOUR_CHAR_CODE('B32F') /* 128 bit rgba float */ +}; + +enum { + kIOBlitMemoryRequiresHostFlush = 0x00000001 +}; + +typedef struct IOBlitSurfaceStruct { + union { + UInt8 * bytes; + IOBlitMemoryRef ref; + } memory; + IOFourCharCode pixelFormat; + IOBlitRectangle size; + UInt32 rowBytes; + UInt32 byteOffset; + UInt32 * palette; + IOOptionBits accessFlags; + IOBlitMemoryRef interfaceRef; + UInt32 more[14]; +} IOBlitSurface; + +typedef IOBlitSurface IOBlitMemory; + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +enum { + // options for Synchronize + kIOBlitSynchronizeWaitBeamExit = 0x00000001, + kIOBlitSynchronizeFlushHostWrites = 0x00000002 +}; + +enum { + // options for WaitComplete & Flush + kIOBlitWaitContext = 0x00000000, + kIOBlitWaitAll2D = 0x00000001, + kIOBlitWaitGlobal = 0x00000001, + kIOBlitWaitAll = 0x00000002, + kIOBlitWaitCheck = 0x00000080, + kIOBlitFlushWithSwap = 0x00010000 +}; + +enum { + // options for AllocateSurface + kIOBlitHasCGSSurface = 0x00000001, + kIOBlitFixedSource = 0x00000002, + kIOBlitBeamSyncSwaps = 0x00000004, + kIOBlitReferenceSource = 0x00000008 +}; + +enum { + // options for UnlockSurface + kIOBlitUnlockWithSwap = 0x80000000 +}; + +enum { + // options for SetDestination + kIOBlitFramebufferDestination = 0x00000000, + kIOBlitSurfaceDestination = 0x00000001 +}; + + + +enum { + // options for blit procs + kIOBlitBeamSync = 0x00000001, + kIOBlitBeamSyncAlways = 0x00000002, + kIOBlitBeamSyncSpin = 0x00000004, + + kIOBlitAllOptions = 0xffffffff +}; + +enum { + // capabilities + kIOBlitColorSpaceTypes = IO_FOUR_CHAR_CODE('cspc') +}; + + +// keys for IOAccelFindAccelerator() +#define kIOAccelTypesKey "IOAccelTypes" +#define kIOAccelIndexKey "IOAccelIndex" + +#define kIOAccelRevisionKey "IOAccelRevision" + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#endif /* !_IOKIT_IOGRAPHICSINTERFACETYPES_H */ diff --git a/i386/include/IOKit/graphics/IOGraphicsTypes.h b/i386/include/IOKit/graphics/IOGraphicsTypes.h new file mode 100644 index 0000000..00bc2a8 --- /dev/null +++ b/i386/include/IOKit/graphics/IOGraphicsTypes.h @@ -0,0 +1,1260 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOGRAPHICSTYPES_H +#define _IOKIT_IOGRAPHICSTYPES_H + + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define IOGRAPHICSTYPES_REV 24 + +typedef SInt32 IOIndex; +typedef UInt32 IOSelect; +typedef UInt32 IOFixed1616; +typedef UInt32 IODisplayVendorID; +typedef UInt32 IODisplayProductID; + +typedef SInt32 IODisplayModeID; +enum { + // This is the ID given to a programmable timing used at boot time + kIODisplayModeIDBootProgrammable = (IODisplayModeID)0xFFFFFFFB, + // Lowest (unsigned) DisplayModeID reserved by Apple + kIODisplayModeIDReservedBase = (IODisplayModeID)0x80000000 +}; + +enum { + kIOMaxPixelBits = 64 +}; +typedef char IOPixelEncoding[ kIOMaxPixelBits ]; + +// Common Apple pixel formats + +#define IO1BitIndexedPixels "P" +#define IO2BitIndexedPixels "PP" +#define IO4BitIndexedPixels "PPPP" +#define IO8BitIndexedPixels "PPPPPPPP" +#define IO16BitDirectPixels "-RRRRRGGGGGBBBBB" +#define IO32BitDirectPixels "--------RRRRRRRRGGGGGGGGBBBBBBBB" + +#define kIO30BitDirectPixels "--RRRRRRRRRRGGGGGGGGGGBBBBBBBBBB" +#define kIO64BitDirectPixels "-16R16G16B16" + +#define kIO16BitFloatPixels "-16FR16FG16FB16" +#define kIO32BitFloatPixels "-32FR32FG32FB32" + +// other possible pixel formats + +#define IOYUV422Pixels "Y4U2V2" +#define IO8BitOverlayPixels "O8" +// page flipping +#define IOPagedPixels "Page1" + +#define IO_SampleTypeAlpha 'A' +#define IO_SampleTypeSkip '-' + +// Info about a pixel format +enum { + kIOCLUTPixels = 0, + kIOFixedCLUTPixels = 1, + kIORGBDirectPixels = 2, + kIOMonoDirectPixels = 3, + kIOMonoInverseDirectPixels = 4, + kIORGBSignedDirectPixels = 5, + kIORGBSignedFloatingPointPixels = 6 +}; + +/*! + * @struct IOPixelInformation + * @abstract A structure defining the format of a framebuffer. + * @discussion This structure is used by IOFramebuffer to define the format of the pixels. + * @field bytesPerRow The number of bytes per row. + * @field bytesPerPlane Not used. + * @field bitsPerPixel The number of bits per pixel, including unused bits and alpha. + * @field pixelType One of kIOCLUTPixels (indexed pixels with changeable CLUT), kIORGBDirectPixels (direct pixels). + * @field componentCount One for indexed pixels, three for direct pixel formats. + * @field bitsPerComponent Number of bits per component in each pixel. + * @field componentMasks Mask of the bits valid for each component of the pixel - in R, G, B order for direct pixels. + * @field pixelFormat String description of the pixel format - IO32BitDirectPixels, IO16BitDirectPixels etc. + * @field flags None defined - set to zero. + * @field activeWidth Number of pixels visible per row. + * @field activeHeight Number of visible pixel rows. + * @field reserved Set to zero. + */ + +struct IOPixelInformation { + UInt32 bytesPerRow; + UInt32 bytesPerPlane; + UInt32 bitsPerPixel; + UInt32 pixelType; + UInt32 componentCount; + UInt32 bitsPerComponent; + UInt32 componentMasks[ 8 * 2 ]; + IOPixelEncoding pixelFormat; + UInt32 flags; + UInt32 activeWidth; + UInt32 activeHeight; + UInt32 reserved[ 2 ]; +}; +typedef struct IOPixelInformation IOPixelInformation; + +// ID for industry standard display timings +typedef UInt32 IOAppleTimingID; + +/*! + * @struct IODisplayModeInformation + * @abstract A structure defining the format of a framebuffer. + * @discussion This structure is used by IOFramebuffer to define the format of the pixels. + * @field nominalWidth Number of pixels visible per row. + * @field nominalHeight Number of visible pixel rows. + * @field refreshRate Refresh rate in fixed point 16.16. + * @field maxDepthIndex Highest depth index available in this display mode. + * @field flags Flags for the mode, including:
+ * kDisplayModeInterlacedFlag mode is interlaced.
+ * kDisplayModeSimulscanFlag mode is available on multiple display connections.
+ * kDisplayModeNotPresetFlag mode is not a factory preset for the display (geometry may need correction).
+ * kDisplayModeStretchedFlag mode is stretched/distorted to match the display aspect ratio.
+ * @field reserved Set to zero. + */ + +struct IODisplayModeInformation { + UInt32 nominalWidth; + UInt32 nominalHeight; + IOFixed1616 refreshRate; + IOIndex maxDepthIndex; + UInt32 flags; + UInt32 reserved[ 4 ]; +}; +typedef struct IODisplayModeInformation IODisplayModeInformation; + +// flags +enum { + kDisplayModeSafetyFlags = 0x00000007, + + kDisplayModeAlwaysShowFlag = 0x00000008, + kDisplayModeNeverShowFlag = 0x00000080, + kDisplayModeNotResizeFlag = 0x00000010, + kDisplayModeRequiresPanFlag = 0x00000020, + + kDisplayModeInterlacedFlag = 0x00000040, + + kDisplayModeSimulscanFlag = 0x00000100, + kDisplayModeBuiltInFlag = 0x00000400, + kDisplayModeNotPresetFlag = 0x00000200, + kDisplayModeStretchedFlag = 0x00000800, + kDisplayModeNotGraphicsQualityFlag = 0x00001000, + kDisplayModeValidateAgainstDisplay = 0x00002000, + kDisplayModeTelevisionFlag = 0x00100000, + kDisplayModeValidForMirroringFlag = 0x00200000 +}; +enum { + kDisplayModeValidFlag = 0x00000001, + kDisplayModeSafeFlag = 0x00000002, + kDisplayModeDefaultFlag = 0x00000004 +}; + +#ifndef KERNEL +// Framebuffer info - obsolete + +struct IOFramebufferInformation { + IOPhysicalAddress baseAddress; + UInt32 activeWidth; + UInt32 activeHeight; + IOByteCount bytesPerRow; + IOByteCount bytesPerPlane; + UInt32 bitsPerPixel; + UInt32 pixelType; + UInt32 flags; + UInt32 reserved[ 4 ]; +}; +typedef struct IOFramebufferInformation IOFramebufferInformation; +#endif + +// flags +enum { + kFramebufferSupportsCopybackCache = 0x00010000, + kFramebufferSupportsWritethruCache = 0x00020000, + kFramebufferSupportsGammaCorrection = 0x00040000, + kFramebufferDisableAltivecAccess = 0x00080000 +}; + +// Aperture is an index into supported pixel formats for a mode & depth +typedef IOIndex IOPixelAperture; +enum { + kIOFBSystemAperture = 0 +}; + +//// CLUTs + +typedef UInt16 IOColorComponent; + +/*! + * @struct IOColorEntry + * @abstract A structure defining one entry of a color lookup table. + * @discussion This structure is used by IOFramebuffer to define an entry of a color lookup table. + * @field index Number of pixels visible per row. + * @field red Value of red component 0-65535. + * @field green Value of green component 0-65535. + * @field blue Value of blue component 0-65535. + */ + +struct IOColorEntry { + UInt16 index; + IOColorComponent red; + IOColorComponent green; + IOColorComponent blue; +}; +typedef struct IOColorEntry IOColorEntry; + +// options (masks) +enum { + kSetCLUTByValue = 0x00000001, // else at index + kSetCLUTImmediately = 0x00000002, // else at VBL + kSetCLUTWithLuminance = 0x00000004 // else RGB +}; + +//// Controller attributes + +enum { + kIOPowerStateAttribute = 'pwrs', + kIOPowerAttribute = 'powr', + kIODriverPowerAttribute = 'dpow', + kIOHardwareCursorAttribute = 'crsr', + + kIOMirrorAttribute = 'mirr', + kIOMirrorDefaultAttribute = 'mrdf', + + kIOCapturedAttribute = 'capd', + + kIOCursorControlAttribute = 'crsc', + + kIOSystemPowerAttribute = 'spwr', + kIOVRAMSaveAttribute = 'vrsv', + kIODeferCLUTSetAttribute = 'vclt', + + kIOClamshellStateAttribute = 'clam' +}; + +// values for kIOMirrorAttribute +enum { + kIOMirrorIsPrimary = 0x80000000, + kIOMirrorHWClipped = 0x40000000 +}; + +// values for kIOMirrorDefaultAttribute +enum { + kIOMirrorDefault = 0x00000001, + kIOMirrorForced = 0x00000002 +}; + +//// Display mode timing information + +struct IODetailedTimingInformationV1 { + // from EDID defn + UInt32 pixelClock; // Hertz + UInt32 horizontalActive; // pixels + UInt32 horizontalBlanking; // pixels + UInt32 horizontalBorder; // pixels + UInt32 horizontalSyncOffset; // pixels + UInt32 horizontalSyncWidth; // pixels + UInt32 verticalActive; // lines + UInt32 verticalBlanking; // lines + UInt32 verticalBorder; // lines + UInt32 verticalSyncOffset; // lines + UInt32 verticalSyncWidth; // lines +}; +typedef struct IODetailedTimingInformationV1 IODetailedTimingInformationV1; + +/*! + * @struct IODetailedTimingInformationV2 + * @abstract A structure defining the detailed timing information of a display mode. + * @discussion This structure is used by IOFramebuffer to define detailed timing information for a display mode. The VESA EDID document has more information. + * @field __reservedA Set to zero. + * @field horizontalScaledInset If the mode is scaled, sets the number of active pixels to remove the left and right edges in order to display an underscanned image. + * @field verticalScaledInset If the mode is scaled, sets the number of active lines to remove the top and bottom edges in order to display an underscanned image. + * @field scalerFlags If the mode is scaled, + * kIOScaleStretchToFit may be set to allow stretching. + * kIOScaleRotateFlags is mask which may have the value given by kIOScaleRotate90, kIOScaleRotate180, kIOScaleRotate270 to display a rotated framebuffer. + * @field horizontalScaled If the mode is scaled, sets the size of the image before scaling or rotation. + * @field verticalScaled If the mode is scaled, sets the size of the image before scaling or rotation. + * @field signalConfig + * kIOAnalogSetupExpected set if display expects a blank-to-black setup or pedestal. See VESA signal standards.
+ * kIOInterlacedCEATiming set for a CEA style interlaced timing:
+ * Field 1 vertical blanking = half specified vertical blanking lines.
+ * Field 2 vertical blanking = (half vertical blanking lines) + 1 line.
+ * Field 1 vertical offset = half specified vertical sync offset.
+ * Field 2 vertical offset = (half specified vertical sync offset) + 0.5 lines.
+ * @field signalLevels One of:
+ * kIOAnalogSignalLevel_0700_0300 0.700 - 0.300 V p-p.
+ * kIOAnalogSignalLevel_0714_0286 0.714 - 0.286 V p-p.
+ * kIOAnalogSignalLevel_1000_0400 1.000 - 0.400 V p-p.
+ * kIOAnalogSignalLevel_0700_0000 0.700 - 0.000 V p-p.
+ * @field pixelClock Pixel clock frequency in Hz. + * @field minPixelClock Minimum pixel clock frequency in Hz, with error. + * @field maxPixelClock Maximum pixel clock frequency in Hz, with error. + * @field horizontalActive Pixel clocks per line. + * @field horizontalBlanking Blanking clocks per line. + * @field horizontalSyncOffset First clock of horizontal sync. + * @field horizontalSyncPulseWidth Width of horizontal sync. + * @field verticalActive Number of lines per frame. + * @field verticalBlanking Blanking lines per frame. + * @field verticalSyncOffset First line of vertical sync. + * @field verticalSyncPulseWidth Height of vertical sync. + * @field horizontalBorderLeft Number of pixels in left horizontal border. + * @field horizontalBorderRight Number of pixels in right horizontal border. + * @field verticalBorderTop Number of lines in top vertical border. + * @field verticalBorderBottom Number of lines in bottom vertical border. + * @field horizontalSyncConfig kIOSyncPositivePolarity for positive polarity horizontal sync (0 for negative). + * @field horizontalSyncLevel Zero. + * @field verticalSyncConfig kIOSyncPositivePolarity for positive polarity vertical sync (0 for negative). + * @field verticalSyncLevel Zero. + * @field numLinks number of links to be used by a dual link timing, if zero, assume one link. + * @field __reservedB Reserved set to zero. + */ + +struct IODetailedTimingInformationV2 { + + UInt32 __reservedA[3]; // Init to 0 + UInt32 horizontalScaledInset; // pixels + UInt32 verticalScaledInset; // lines + + UInt32 scalerFlags; + UInt32 horizontalScaled; + UInt32 verticalScaled; + + UInt32 signalConfig; + UInt32 signalLevels; + + UInt64 pixelClock; // Hz + + UInt64 minPixelClock; // Hz - With error what is slowest actual clock + UInt64 maxPixelClock; // Hz - With error what is fasted actual clock + + UInt32 horizontalActive; // pixels + UInt32 horizontalBlanking; // pixels + UInt32 horizontalSyncOffset; // pixels + UInt32 horizontalSyncPulseWidth; // pixels + + UInt32 verticalActive; // lines + UInt32 verticalBlanking; // lines + UInt32 verticalSyncOffset; // lines + UInt32 verticalSyncPulseWidth; // lines + + UInt32 horizontalBorderLeft; // pixels + UInt32 horizontalBorderRight; // pixels + UInt32 verticalBorderTop; // lines + UInt32 verticalBorderBottom; // lines + + UInt32 horizontalSyncConfig; + UInt32 horizontalSyncLevel; // Future use (init to 0) + UInt32 verticalSyncConfig; + UInt32 verticalSyncLevel; // Future use (init to 0) + UInt32 numLinks; + + UInt32 __reservedB[7]; // Init to 0 +}; +typedef struct IODetailedTimingInformationV2 IODetailedTimingInformationV2; +typedef struct IODetailedTimingInformationV2 IODetailedTimingInformation; + +struct IOTimingInformation { + IOAppleTimingID appleTimingID; // kIOTimingIDXXX const + UInt32 flags; + union { + IODetailedTimingInformationV1 v1; + IODetailedTimingInformationV2 v2; + } detailedInfo; +}; +typedef struct IOTimingInformation IOTimingInformation; + +enum { + // IOTimingInformation flags + kIODetailedTimingValid = 0x80000000, + kIOScalingInfoValid = 0x40000000 +}; + +enum { + // scalerFlags + kIOScaleStretchToFit = 0x00000001, + + kIOScaleRotateFlags = 0x000000f0, + + kIOScaleSwapAxes = 0x00000010, + kIOScaleInvertX = 0x00000020, + kIOScaleInvertY = 0x00000040, + + kIOScaleRotate0 = 0x00000000, + kIOScaleRotate90 = kIOScaleSwapAxes | kIOScaleInvertX, + kIOScaleRotate180 = kIOScaleInvertX | kIOScaleInvertY, + kIOScaleRotate270 = kIOScaleSwapAxes | kIOScaleInvertY +}; + + +#pragma pack(push, 4) +struct IOFBDisplayModeDescription { + IODisplayModeInformation info; + IOTimingInformation timingInfo; +}; +typedef struct IOFBDisplayModeDescription IOFBDisplayModeDescription; +#pragma pack(pop) + +/*! + * @struct IODisplayTimingRange + * @abstract A structure defining the limits and attributes of a display or framebuffer. + * @discussion This structure is used to define the limits for modes programmed as detailed timings by the OS. The VESA EDID is useful background information for many of these fields. A data property with this structure under the key kIOFBTimingRangeKey in a framebuffer will allow the OS to program detailed timings that fall within its range. + * @field __reservedA Set to zero. + * @field version Set to zero. + * @field __reservedB Set to zero. + * @field minPixelClock minimum pixel clock frequency in range, in Hz. + * @field minPixelClock maximum pixel clock frequency in range, in Hz. + * @field maxPixelError largest variation between specified and actual pixel clock frequency, in Hz. + * @field supportedSyncFlags mask of supported sync attributes. The following are defined:
+ * kIORangeSupportsSeparateSyncs - digital separate syncs.
+ * kIORangeSupportsSyncOnGreen - sync on green.
+ * kIORangeSupportsCompositeSync - composite sync.
+ * kIORangeSupportsVSyncSerration - vertical sync has serration and equalization pulses.
+ * @field supportedSignalLevels mask of possible signal levels. The following are defined:
+ * kIORangeSupportsSignal_0700_0300 0.700 - 0.300 V p-p.
+ * kIORangeSupportsSignal_0714_0286 0.714 - 0.286 V p-p.
+ * kIORangeSupportsSignal_1000_0400 1.000 - 0.400 V p-p.
+ * kIORangeSupportsSignal_0700_0000 0.700 - 0.000 V p-p.
+ * @field supportedSignalConfigs mask of possible signal configurations. The following are defined:
+ * kIORangeSupportsInterlacedCEATiming Supports CEA style interlaced timing:
+ * Field 1 vertical blanking = specified vertical blanking lines.
+ * Field 2 vertical blanking = vertical blanking lines + 1 line.
+ * Field 1 vertical offset = specified vertical sync offset.
+ * Field 2 vertical offset = specified vertical sync offset + 0.5 lines.
+ * kIORangeSupportsInterlacedCEATimingWithConfirm Supports CEA style interlaced timing, but require a confirm. + * @field minFrameRate minimum frame rate (vertical refresh frequency) in range, in Hz. + * @field maxFrameRate maximum frame rate (vertical refresh frequency) in range, in Hz. + * @field minLineRate minimum line rate (horizontal refresh frequency) in range, in Hz. + * @field maxLineRate maximum line rate (horizontal refresh frequency) in range, in Hz. + * @field maxHorizontalTotal maximum clocks in horizontal line (active + blanking). + * @field maxVerticalTotal maximum lines in vertical frame (active + blanking). + * @field __reservedD Set to zero. + * @field charSizeHorizontalActive horizontalActive must be a multiple of charSizeHorizontalActive. + * @field charSizeHorizontalBlanking horizontalBlanking must be a multiple of charSizeHorizontalBlanking. + * @field charSizeHorizontalSyncOffset horizontalSyncOffset must be a multiple of charSizeHorizontalSyncOffset. + * @field charSizeHorizontalSyncPulse horizontalSyncPulse must be a multiple of charSizeHorizontalSyncPulse. + * @field charSizeVerticalActive verticalActive must be a multiple of charSizeVerticalActive. + * @field charSizeVerticalBlanking verticalBlanking must be a multiple of charSizeVerticalBlanking. + * @field charSizeVerticalSyncOffset verticalSyncOffset must be a multiple of charSizeVerticalSyncOffset. + * @field charSizeVerticalSyncPulse verticalSyncPulse must be a multiple of charSizeVerticalSyncPulse. + * @field charSizeHorizontalBorderLeft horizontalBorderLeft must be a multiple of charSizeHorizontalBorderLeft. + * @field charSizeHorizontalBorderRight horizontalBorderRight must be a multiple of charSizeHorizontalBorderRight. + * @field charSizeVerticalBorderTop verticalBorderTop must be a multiple of charSizeVerticalBorderTop. + * @field charSizeVerticalBorderBottom verticalBorderBottom must be a multiple of charSizeVerticalBorderBottom. + * @field charSizeHorizontalTotal (horizontalActive + horizontalBlanking) must be a multiple of charSizeHorizontalTotal. + * @field charSizeVerticalTotal (verticalActive + verticalBlanking) must be a multiple of charSizeVerticalTotal. + * @field __reservedE Set to zero. + * @field minHorizontalActiveClocks minimum value of horizontalActive. + * @field maxHorizontalActiveClocks maximum value of horizontalActive. + * @field minHorizontalBlankingClocks minimum value of horizontalBlanking. + * @field maxHorizontalBlankingClocks maximum value of horizontalBlanking. + * @field minHorizontalSyncOffsetClocks minimum value of horizontalSyncOffset. + * @field maxHorizontalSyncOffsetClocks maximum value of horizontalSyncOffset. + * @field minHorizontalPulseWidthClocks minimum value of horizontalPulseWidth. + * @field maxHorizontalPulseWidthClocks maximum value of horizontalPulseWidth. + * @field minVerticalActiveClocks minimum value of verticalActive. + * @field maxVerticalActiveClocks maximum value of verticalActive. + * @field minVerticalBlankingClocks minimum value of verticalBlanking. + * @field maxVerticalBlankingClocks maximum value of verticalBlanking. + * @field minVerticalSyncOffsetClocks minimum value of verticalSyncOffset. + * @field maxVerticalSyncOffsetClocks maximum value of verticalSyncOffset. + * @field minVerticalPulseWidthClocks minimum value of verticalPulseWidth. + * @field maxVerticalPulseWidthClocks maximum value of verticalPulseWidth. + * @field minHorizontalBorderLeft minimum value of horizontalBorderLeft. + * @field maxHorizontalBorderLeft maximum value of horizontalBorderLeft. + * @field minHorizontalBorderRight minimum value of horizontalBorderRight. + * @field maxHorizontalBorderRight maximum value of horizontalBorderRight. + * @field minVerticalBorderTop minimum value of verticalBorderTop. + * @field maxVerticalBorderTop maximum value of verticalBorderTop. + * @field minVerticalBorderBottom minimum value of verticalBorderBottom. + * @field maxVerticalBorderBottom maximum value of verticalBorderBottom. + * @field maxNumLinks number of links supported, if zero, 1 link is assumed. + * @field minLink0PixelClock minimum pixel clock for link 0 (kHz). + * @field maxLink0PixelClock maximum pixel clock for link 0 (kHz). + * @field minLink1PixelClock minimum pixel clock for link 1 (kHz). + * @field maxLink1PixelClock maximum pixel clock for link 1 (kHz). + * @field __reservedF Set to zero. + */ + +struct IODisplayTimingRange +{ + UInt32 __reservedA[2]; // Init to 0 + UInt32 version; // Init to 0 + UInt32 __reservedB[5]; // Init to 0 + + UInt64 minPixelClock; // Min dot clock in Hz + UInt64 maxPixelClock; // Max dot clock in Hz + + UInt32 maxPixelError; // Max dot clock error + UInt32 supportedSyncFlags; + UInt32 supportedSignalLevels; + UInt32 supportedSignalConfigs; + + UInt32 minFrameRate; // Hz + UInt32 maxFrameRate; // Hz + UInt32 minLineRate; // Hz + UInt32 maxLineRate; // Hz + + UInt32 maxHorizontalTotal; // Clocks - Maximum total (active + blanking) + UInt32 maxVerticalTotal; // Clocks - Maximum total (active + blanking) + UInt32 __reservedD[2]; // Init to 0 + + UInt8 charSizeHorizontalActive; + UInt8 charSizeHorizontalBlanking; + UInt8 charSizeHorizontalSyncOffset; + UInt8 charSizeHorizontalSyncPulse; + + UInt8 charSizeVerticalActive; + UInt8 charSizeVerticalBlanking; + UInt8 charSizeVerticalSyncOffset; + UInt8 charSizeVerticalSyncPulse; + + UInt8 charSizeHorizontalBorderLeft; + UInt8 charSizeHorizontalBorderRight; + UInt8 charSizeVerticalBorderTop; + UInt8 charSizeVerticalBorderBottom; + + UInt8 charSizeHorizontalTotal; // Character size for active + blanking + UInt8 charSizeVerticalTotal; // Character size for active + blanking + UInt16 __reservedE; // Reserved (Init to 0) + + UInt32 minHorizontalActiveClocks; + UInt32 maxHorizontalActiveClocks; + UInt32 minHorizontalBlankingClocks; + UInt32 maxHorizontalBlankingClocks; + + UInt32 minHorizontalSyncOffsetClocks; + UInt32 maxHorizontalSyncOffsetClocks; + UInt32 minHorizontalPulseWidthClocks; + UInt32 maxHorizontalPulseWidthClocks; + + UInt32 minVerticalActiveClocks; + UInt32 maxVerticalActiveClocks; + UInt32 minVerticalBlankingClocks; + UInt32 maxVerticalBlankingClocks; + + UInt32 minVerticalSyncOffsetClocks; + UInt32 maxVerticalSyncOffsetClocks; + UInt32 minVerticalPulseWidthClocks; + UInt32 maxVerticalPulseWidthClocks; + + UInt32 minHorizontalBorderLeft; + UInt32 maxHorizontalBorderLeft; + UInt32 minHorizontalBorderRight; + UInt32 maxHorizontalBorderRight; + + UInt32 minVerticalBorderTop; + UInt32 maxVerticalBorderTop; + UInt32 minVerticalBorderBottom; + UInt32 maxVerticalBorderBottom; + UInt32 maxNumLinks; // number of links, if zero, assume link 1 + UInt32 minLink0PixelClock; // min pixel clock for link 0 (kHz) + UInt32 maxLink0PixelClock; // max pixel clock for link 0 (kHz) + UInt32 minLink1PixelClock; // min pixel clock for link 1 (kHz) + UInt32 maxLink1PixelClock; // max pixel clock for link 1 (kHz) + + UInt32 __reservedF[3]; // Init to 0 +}; +typedef struct IODisplayTimingRange IODisplayTimingRange; + +enum { + // supportedSignalLevels + kIORangeSupportsSignal_0700_0300 = 0x00000001, + kIORangeSupportsSignal_0714_0286 = 0x00000002, + kIORangeSupportsSignal_1000_0400 = 0x00000004, + kIORangeSupportsSignal_0700_0000 = 0x00000008 +}; +enum { + // supportedSyncFlags + kIORangeSupportsSeparateSyncs = 0x00000001, + kIORangeSupportsSyncOnGreen = 0x00000002, + kIORangeSupportsCompositeSync = 0x00000004, + kIORangeSupportsVSyncSerration = 0x00000008 +}; +enum { + // supportedSignalConfigs + kIORangeSupportsInterlacedCEATiming = 0x00000004, + kIORangeSupportsInterlacedCEATimingWithConfirm = 0x00000008 +}; + +enum { + // signalConfig + kIODigitalSignal = 0x00000001, + kIOAnalogSetupExpected = 0x00000002, + kIOInterlacedCEATiming = 0x00000004, + kIONTSCTiming = 0x00000008, + kIOPALTiming = 0x00000010 +}; + +enum { + // signalLevels for analog + kIOAnalogSignalLevel_0700_0300 = 0, + kIOAnalogSignalLevel_0714_0286 = 1, + kIOAnalogSignalLevel_1000_0400 = 2, + kIOAnalogSignalLevel_0700_0000 = 3 +}; + +enum { + // horizontalSyncConfig and verticalSyncConfig + kIOSyncPositivePolarity = 0x00000001 +}; + +/*! + * @struct IODisplayScalerInformation + * @abstract A structure defining the scaling capabilities of a framebuffer. + * @discussion This structure is used to define the limits for modes programmed as detailed timings by the OS. A data property with this structure under the key kIOFBScalerInfoKey in a framebuffer will allow the OS to program detailed timings that are scaled to a displays native resolution. + * @field __reservedA Set to zero. + * @field version Set to zero. + * @field __reservedB Set to zero. + * @field scalerFeatures Mask of scaling features. The following are defined:
+ * kIOScaleStretchOnly If set the framebuffer can only provide stretched scaling with non-square pixels, without borders.
+ * kIOScaleCanUpSamplePixels If set framebuffer can scale up from a smaller number of source pixels to a larger native timing (eg. 640x480 pixels on a 1600x1200 timing).
+ * kIOScaleCanDownSamplePixels If set framebuffer can scale down from a larger number of source pixels to a smaller native timing (eg. 1600x1200 pixels on a 640x480 timing).
+ * kIOScaleCanScaleInterlaced If set framebuffer can scale an interlaced detailed timing.
+ * kIOScaleCanSupportInset If set framebuffer can support scaled modes with non-zero horizontalScaledInset, verticalScaledInset fields.
+ * kIOScaleCanRotate If set framebuffer can support some of the flags in the kIOScaleRotateFlags mask.
+ * kIOScaleCanBorderInsetOnly If set framebuffer can support scaled modes with non-zero horizontalScaledInset, verticalScaledInset fields, but requires the active pixels to be equal in size to the inset area, ie. can do insets with a border versus scaling an image.
+ * @field maxHorizontalPixels Maximum number of horizontal source pixels (horizontalScaled).
+ * @field maxVerticalPixels Maximum number of vertical source pixels (verticalScaled).
+ * @field __reservedC Set to zero. + */ + +struct IODisplayScalerInformation { + UInt32 __reservedA[1]; // Init to 0 + UInt32 version; // Init to 0 + UInt32 __reservedB[2]; // Init to 0 + + IOOptionBits scalerFeatures; + UInt32 maxHorizontalPixels; + UInt32 maxVerticalPixels; + UInt32 __reservedC[5]; // Init to 0 +}; +typedef struct IODisplayScalerInformation IODisplayScalerInformation; + +enum { + /* scalerFeatures */ + kIOScaleStretchOnly = 0x00000001, + kIOScaleCanUpSamplePixels = 0x00000002, + kIOScaleCanDownSamplePixels = 0x00000004, + kIOScaleCanScaleInterlaced = 0x00000008, + kIOScaleCanSupportInset = 0x00000010, + kIOScaleCanRotate = 0x00000020, + kIOScaleCanBorderInsetOnly = 0x00000040 +}; + +//// Connections + +enum { + kOrConnections = 0xffffffe, + kAndConnections = 0xffffffd +}; + +enum { + kConnectionFlags = 'flgs', + kConnectionSyncEnable = 'sync', + kConnectionSyncFlags = 'sycf', + kConnectionSupportsAppleSense = 'asns', + kConnectionSupportsLLDDCSense = 'lddc', + kConnectionSupportsHLDDCSense = 'hddc', + kConnectionEnable = 'enab', + kConnectionCheckEnable = 'cena', + kConnectionProbe = 'prob', + kConnectionChanged = 'chng', + kConnectionPower = 'powr', + kConnectionPostWake = 'pwak', + kConnectionDisplayParameterCount = 'pcnt', + kConnectionDisplayParameters = 'parm', + kConnectionOverscan = 'oscn', + kConnectionVideoBest = 'vbst', + + kConnectionRedGammaScale = 'rgsc', + kConnectionGreenGammaScale = 'ggsc', + kConnectionBlueGammaScale = 'bgsc', + + kConnectionHandleDisplayPortEvent = 'dpir', + + kConnectionPanelTimingDisable = 'pnlt', + + kConnectionColorMode = 'cyuv', + kConnectionColorModesSupported = 'colr', + kConnectionColorDepthsSupported = ' bpc', + + kConnectionControllerDepthsSupported = '\0grd', + kConnectionControllerColorDepth = '\0dpd', + kConnectionControllerDitherControl = '\0gdc', + + kConnectionDisplayFlags = 'dflg', +}; + +// kConnectionFlags values +enum { + kIOConnectionBuiltIn = 0x00000800, + kIOConnectionStereoSync = 0x00008000 +}; + +// kConnectionSyncControl values +enum { + kIOHSyncDisable = 0x00000001, + kIOVSyncDisable = 0x00000002, + kIOCSyncDisable = 0x00000004, + kIONoSeparateSyncControl = 0x00000040, + kIOTriStateSyncs = 0x00000080, + kIOSyncOnBlue = 0x00000008, + kIOSyncOnGreen = 0x00000010, + kIOSyncOnRed = 0x00000020 +}; + +// kConnectionHandleDisplayPortEvent values +enum { + kIODPEventStart = 1, + kIODPEventIdle = 2, + + kIODPEventForceRetrain = 3, + + kIODPEventRemoteControlCommandPending = 256, + kIODPEventAutomatedTestRequest = 257, + kIODPEventContentProtection = 258, + kIODPEventMCCS = 259, + kIODPEventSinkSpecific = 260 +}; + +#define kIODisplayAttributesKey "IODisplayAttributes" + +#define kIODisplaySupportsUnderscanKey "IODisplaySupportsUnderscan" +#define kIODisplaySupportsBasicAudioKey "IODisplaySupportsBasicAudio" +#define kIODisplaySupportsYCbCr444Key "IODisplaySupportsYCbCr444" +#define kIODisplaySupportsYCbCr422Key "IODisplaySupportsYCbCr422" + +enum +{ + kIODisplayColorMode = kConnectionColorMode, +}; + +#if 0 +enum +{ + // kConnectionColorMode attribute + kIODisplayColorModeReserved = 0x00000000, + kIODisplayColorModeRGB = 0x00000001, + kIODisplayColorModeYCbCr422 = 0x00000010, + kIODisplayColorModeYCbCr444 = 0x00000100, + kIODisplayColorModeRGBLimited = 0x00001000, + kIODisplayColorModeAuto = 0x10000000, +}; +#endif + +enum +{ + // kConnectionColorDepthsSupported attribute + kIODisplayRGBColorComponentBitsUnknown = 0x00000000, + kIODisplayRGBColorComponentBits6 = 0x00000001, + kIODisplayRGBColorComponentBits8 = 0x00000002, + kIODisplayRGBColorComponentBits10 = 0x00000004, + kIODisplayRGBColorComponentBits12 = 0x00000008, + kIODisplayRGBColorComponentBits14 = 0x00000010, + kIODisplayRGBColorComponentBits16 = 0x00000020, + + kIODisplayYCbCr444ColorComponentBitsUnknown = 0x00000000, + kIODisplayYCbCr444ColorComponentBits6 = 0x00000100, + kIODisplayYCbCr444ColorComponentBits8 = 0x00000200, + kIODisplayYCbCr444ColorComponentBits10 = 0x00000400, + kIODisplayYCbCr444ColorComponentBits12 = 0x00000800, + kIODisplayYCbCr444ColorComponentBits14 = 0x00001000, + kIODisplayYCbCr444ColorComponentBits16 = 0x00002000, + + kIODisplayYCbCr422ColorComponentBitsUnknown = 0x00000000, + kIODisplayYCbCr422ColorComponentBits6 = 0x00010000, + kIODisplayYCbCr422ColorComponentBits8 = 0x00020000, + kIODisplayYCbCr422ColorComponentBits10 = 0x00040000, + kIODisplayYCbCr422ColorComponentBits12 = 0x00080000, + kIODisplayYCbCr422ColorComponentBits14 = 0x00100000, + kIODisplayYCbCr422ColorComponentBits16 = 0x00200000, +}; + +enum +{ + // kConnectionDitherControl attribute + kIODisplayDitherDisable = 0x00000000, + kIODisplayDitherSpatial = 0x00000001, + kIODisplayDitherTemporal = 0x00000002, + kIODisplayDitherFrameRateControl = 0x00000004, + kIODisplayDitherDefault = 0x00000080, + kIODisplayDitherAll = 0x000000FF, + kIODisplayDitherRGBShift = 0, + kIODisplayDitherYCbCr444Shift = 8, + kIODisplayDitherYCbCr422Shift = 16, +}; + +enum +{ + // kConnectionDisplayFlags attribute + kIODisplayNeedsCEAUnderscan = 0x00000001, +}; + + +#define IO_DISPLAY_CAN_FILL 0x00000040 +#define IO_DISPLAY_CAN_BLIT 0x00000020 + +#define IO_24BPP_TRANSFER_TABLE_SIZE 256 +#define IO_15BPP_TRANSFER_TABLE_SIZE 256 +#define IO_8BPP_TRANSFER_TABLE_SIZE 256 +#define IO_12BPP_TRANSFER_TABLE_SIZE 256 +#define IO_2BPP_TRANSFER_TABLE_SIZE 256 + +#define STDFB_BM256_TO_BM38_MAP_SIZE 256 +#define STDFB_BM38_TO_BM256_MAP_SIZE 256 +#define STDFB_BM38_TO_256_WITH_LOGICAL_SIZE \ + (STDFB_BM38_TO_BM256_MAP_SIZE + (256/sizeof(int))) + +#define STDFB_4BPS_TO_5BPS_MAP_SIZE 16 +#define STDFB_5BPS_TO_4BPS_MAP_SIZE 32 + +enum { + // connection types for IOServiceOpen + kIOFBServerConnectType = 0, + kIOFBSharedConnectType = 1 +}; + +enum { + // options for IOServiceRequestProbe() + kIOFBUserRequestProbe = 0x00000001 +}; + +struct IOGPoint { + SInt16 x; + SInt16 y; +}; +typedef struct IOGPoint IOGPoint; + +struct IOGSize { + SInt16 width; + SInt16 height; +}; +typedef struct IOGSize IOGSize; + +struct IOGBounds { + SInt16 minx; + SInt16 maxx; + SInt16 miny; + SInt16 maxy; +}; +typedef struct IOGBounds IOGBounds; + +#ifndef kIODescriptionKey + +#if !defined(__Point__) && !defined(BINTREE_H) && !defined(__MACTYPES__) +#define __Point__ +typedef IOGPoint Point; +#endif + +#if !defined(__Bounds__) && !defined(BINTREE_H) && !defined(__MACTYPES__) +#define __Bounds__ +typedef IOGBounds Bounds; +#endif + +#endif /* !kIODescriptionKey */ + +// cursor description + +enum { + kTransparentEncoding = 0, + kInvertingEncoding +}; + +enum { + kTransparentEncodingShift = (kTransparentEncoding << 1), + kTransparentEncodedPixel = (0x01 << kTransparentEncodingShift), + + kInvertingEncodingShift = (kInvertingEncoding << 1), + kInvertingEncodedPixel = (0x01 << kInvertingEncodingShift) +}; + +enum { + kHardwareCursorDescriptorMajorVersion = 0x0001, + kHardwareCursorDescriptorMinorVersion = 0x0000 +}; + +/*! + * @struct IOHardwareCursorDescriptor + * @abstract A structure defining the format of a hardware cursor. + * @discussion This structure is used by IOFramebuffer to define the format of a hardware cursor. + * @field majorVersion Set to kHardwareCursorDescriptorMajorVersion. + * @field minorVersion Set to kHardwareCursorDescriptorMinorVersion. + * @field height Maximum size of the cursor. + * @field width Maximum size of the cursor. + * @field bitDepth Number bits per pixel, or a QD/QT pixel type, for example kIO8IndexedPixelFormat, kIO32ARGBPixelFormat. + * @field maskBitDepth Unused. + * @field numColors Number of colors for indexed pixel types. + * @field colorEncodings An array pointer specifying the pixel values corresponding to the indices into the color table, for indexed pixel types. + * @field flags None defined, set to zero. + * @field supportedSpecialEncodings Mask of supported special pixel values, eg. kTransparentEncodedPixel, kInvertingEncodedPixel. + * @field specialEncodings Array of pixel values for each supported special encoding. + */ + +struct IOHardwareCursorDescriptor { + UInt16 majorVersion; + UInt16 minorVersion; + UInt32 height; + UInt32 width; + UInt32 bitDepth; // bits per pixel, or a QD/QT pixel type + UInt32 maskBitDepth; // unused + UInt32 numColors; // number of colors in the colorMap. ie. + UInt32 * colorEncodings; + UInt32 flags; + UInt32 supportedSpecialEncodings; + UInt32 specialEncodings[16]; +}; +typedef struct IOHardwareCursorDescriptor IOHardwareCursorDescriptor; + +enum { + kHardwareCursorInfoMajorVersion = 0x0001, + kHardwareCursorInfoMinorVersion = 0x0000 +}; + +/*! + * @struct IOHardwareCursorInfo + * @abstract A structure defining the converted data of a hardware cursor. + * @discussion This structure is used by IOFramebuffer to return the data of a hardware cursor by convertCursorImage() after conversion based on the IOHardwareCursorDescriptor passed to that routine. + * @field majorVersion Set to kHardwareCursorInfoMajorVersion. + * @field minorVersion Set to kHardwareCursorInfoMinorVersion. + * @field cursorHeight The actual size of the cursor is returned. + * @field cursorWidth The actual size of the cursor is returned. + * @field colorMap Pointer to array of IOColorEntry structures, with the number of elements set by the numColors field of the IOHardwareCursorDescriptor. Zero should be passed for direct pixel formats. + * @field hardwareCursorData Buffer to receive the converted cursor data. + * @field cursorHotSpotX Cursor's hotspot. + * @field cursorHotSpotY Cursor's hotspot. + * @field reserved Reserved, set to zero. + */ + +struct IOHardwareCursorInfo { + UInt16 majorVersion; + UInt16 minorVersion; + UInt32 cursorHeight; + UInt32 cursorWidth; + // nil or big enough for hardware's max colors + IOColorEntry * colorMap; + UInt8 * hardwareCursorData; + UInt16 cursorHotSpotX; + UInt16 cursorHotSpotY; + UInt32 reserved[5]; +}; +typedef struct IOHardwareCursorInfo IOHardwareCursorInfo; + +// interrupt types + +enum { + kIOFBVBLInterruptType = 'vbl ', + kIOFBHBLInterruptType = 'hbl ', + kIOFBFrameInterruptType = 'fram', + // Demand to check configuration (Hardware unchanged) + kIOFBConnectInterruptType = 'dci ', + // Demand to rebuild (Hardware has reinitialized on dependent change) + kIOFBChangedInterruptType = 'chng', + // Demand to remove framebuffer (Hardware not available on dependent change -- but must not buserror) + kIOFBOfflineInterruptType = 'remv', + // Notice that hardware is available (after being removed) + kIOFBOnlineInterruptType = 'add ', + // DisplayPort short pulse + kIOFBDisplayPortInterruptType = 'dpir', + // DisplayPort link event + kIOFBDisplayPortLinkChangeInterruptType = 'dplk', + // MCCS + kIOFBMCCSInterruptType = 'mccs' +}; + +// IOAppleTimingID's +enum { + kIOTimingIDInvalid = 0, /* Not a standard timing */ + kIOTimingIDApple_FixedRateLCD = 42, /* Lump all fixed-rate LCDs into one category.*/ + kIOTimingIDApple_512x384_60hz = 130, /* 512x384 (60 Hz) Rubik timing. */ + kIOTimingIDApple_560x384_60hz = 135, /* 560x384 (60 Hz) Rubik-560 timing. */ + kIOTimingIDApple_640x480_67hz = 140, /* 640x480 (67 Hz) HR timing. */ + kIOTimingIDApple_640x400_67hz = 145, /* 640x400 (67 Hz) HR-400 timing. */ + kIOTimingIDVESA_640x480_60hz = 150, /* 640x480 (60 Hz) VGA timing. */ + kIOTimingIDVESA_640x480_72hz = 152, /* 640x480 (72 Hz) VGA timing. */ + kIOTimingIDVESA_640x480_75hz = 154, /* 640x480 (75 Hz) VGA timing. */ + kIOTimingIDVESA_640x480_85hz = 158, /* 640x480 (85 Hz) VGA timing. */ + kIOTimingIDGTF_640x480_120hz = 159, /* 640x480 (120 Hz) VESA Generalized Timing Formula */ + kIOTimingIDApple_640x870_75hz = 160, /* 640x870 (75 Hz) FPD timing.*/ + kIOTimingIDApple_640x818_75hz = 165, /* 640x818 (75 Hz) FPD-818 timing.*/ + kIOTimingIDApple_832x624_75hz = 170, /* 832x624 (75 Hz) GoldFish timing.*/ + kIOTimingIDVESA_800x600_56hz = 180, /* 800x600 (56 Hz) SVGA timing. */ + kIOTimingIDVESA_800x600_60hz = 182, /* 800x600 (60 Hz) SVGA timing. */ + kIOTimingIDVESA_800x600_72hz = 184, /* 800x600 (72 Hz) SVGA timing. */ + kIOTimingIDVESA_800x600_75hz = 186, /* 800x600 (75 Hz) SVGA timing. */ + kIOTimingIDVESA_800x600_85hz = 188, /* 800x600 (85 Hz) SVGA timing. */ + kIOTimingIDVESA_1024x768_60hz = 190, /* 1024x768 (60 Hz) VESA 1K-60Hz timing. */ + kIOTimingIDVESA_1024x768_70hz = 200, /* 1024x768 (70 Hz) VESA 1K-70Hz timing. */ + kIOTimingIDVESA_1024x768_75hz = 204, /* 1024x768 (75 Hz) VESA 1K-75Hz timing (very similar to kIOTimingIDApple_1024x768_75hz). */ + kIOTimingIDVESA_1024x768_85hz = 208, /* 1024x768 (85 Hz) VESA timing. */ + kIOTimingIDApple_1024x768_75hz = 210, /* 1024x768 (75 Hz) Apple 19" RGB. */ + kIOTimingIDApple_1152x870_75hz = 220, /* 1152x870 (75 Hz) Apple 21" RGB. */ + kIOTimingIDAppleNTSC_ST = 230, /* 512x384 (60 Hz, interlaced, non-convolved). */ + kIOTimingIDAppleNTSC_FF = 232, /* 640x480 (60 Hz, interlaced, non-convolved). */ + kIOTimingIDAppleNTSC_STconv = 234, /* 512x384 (60 Hz, interlaced, convolved). */ + kIOTimingIDAppleNTSC_FFconv = 236, /* 640x480 (60 Hz, interlaced, convolved). */ + kIOTimingIDApplePAL_ST = 238, /* 640x480 (50 Hz, interlaced, non-convolved). */ + kIOTimingIDApplePAL_FF = 240, /* 768x576 (50 Hz, interlaced, non-convolved). */ + kIOTimingIDApplePAL_STconv = 242, /* 640x480 (50 Hz, interlaced, convolved). */ + kIOTimingIDApplePAL_FFconv = 244, /* 768x576 (50 Hz, interlaced, convolved). */ + kIOTimingIDVESA_1280x960_75hz = 250, /* 1280x960 (75 Hz) */ + kIOTimingIDVESA_1280x960_60hz = 252, /* 1280x960 (60 Hz) */ + kIOTimingIDVESA_1280x960_85hz = 254, /* 1280x960 (85 Hz) */ + kIOTimingIDVESA_1280x1024_60hz = 260, /* 1280x1024 (60 Hz) */ + kIOTimingIDVESA_1280x1024_75hz = 262, /* 1280x1024 (75 Hz) */ + kIOTimingIDVESA_1280x1024_85hz = 268, /* 1280x1024 (85 Hz) */ + kIOTimingIDVESA_1600x1200_60hz = 280, /* 1600x1200 (60 Hz) VESA timing. */ + kIOTimingIDVESA_1600x1200_65hz = 282, /* 1600x1200 (65 Hz) VESA timing. */ + kIOTimingIDVESA_1600x1200_70hz = 284, /* 1600x1200 (70 Hz) VESA timing. */ + kIOTimingIDVESA_1600x1200_75hz = 286, /* 1600x1200 (75 Hz) VESA timing (pixel clock is 189.2 Mhz dot clock). */ + kIOTimingIDVESA_1600x1200_80hz = 288, /* 1600x1200 (80 Hz) VESA timing (pixel clock is 216>? Mhz dot clock) - proposed only. */ + kIOTimingIDVESA_1600x1200_85hz = 289, /* 1600x1200 (85 Hz) VESA timing (pixel clock is 229.5 Mhz dot clock). */ + kIOTimingIDVESA_1792x1344_60hz = 296, /* 1792x1344 (60 Hz) VESA timing (204.75 Mhz dot clock). */ + kIOTimingIDVESA_1792x1344_75hz = 298, /* 1792x1344 (75 Hz) VESA timing (261.75 Mhz dot clock). */ + kIOTimingIDVESA_1856x1392_60hz = 300, /* 1856x1392 (60 Hz) VESA timing (218.25 Mhz dot clock). */ + kIOTimingIDVESA_1856x1392_75hz = 302, /* 1856x1392 (75 Hz) VESA timing (288 Mhz dot clock). */ + kIOTimingIDVESA_1920x1440_60hz = 304, /* 1920x1440 (60 Hz) VESA timing (234 Mhz dot clock). */ + kIOTimingIDVESA_1920x1440_75hz = 306, /* 1920x1440 (75 Hz) VESA timing (297 Mhz dot clock). */ + kIOTimingIDSMPTE240M_60hz = 400, /* 60Hz V, 33.75KHz H, interlaced timing, 16:9 aspect, typical resolution of 1920x1035. */ + kIOTimingIDFilmRate_48hz = 410, /* 48Hz V, 25.20KHz H, non-interlaced timing, typical resolution of 640x480. */ + kIOTimingIDSony_1600x1024_76hz = 500, /* 1600x1024 (76 Hz) Sony timing (pixel clock is 170.447 Mhz dot clock). */ + kIOTimingIDSony_1920x1080_60hz = 510, /* 1920x1080 (60 Hz) Sony timing (pixel clock is 159.84 Mhz dot clock). */ + kIOTimingIDSony_1920x1080_72hz = 520, /* 1920x1080 (72 Hz) Sony timing (pixel clock is 216.023 Mhz dot clock). */ + kIOTimingIDSony_1920x1200_76hz = 540, /* 1900x1200 (76 Hz) Sony timing (pixel clock is 243.20 Mhz dot clock). */ + kIOTimingIDApple_0x0_0hz_Offline = 550, /* Indicates that this timing will take the display off-line and remove it from the system. */ + kIOTimingIDVESA_848x480_60hz = 570, /* 848x480 (60 Hz) VESA timing. */ + kIOTimingIDVESA_1360x768_60hz = 590 /* 1360x768 (60 Hz) VESA timing. */ +}; + +// framebuffer property keys + +#define kIOFramebufferInfoKey "IOFramebufferInformation" + +#define kIOFBWidthKey "IOFBWidth" +#define kIOFBHeightKey "IOFBHeight" +#define kIOFBRefreshRateKey "IOFBRefreshRate" +#define kIOFBFlagsKey "IOFBFlags" +#define kIOFBBytesPerRowKey "IOFBBytesPerRow" +#define kIOFBBytesPerPlaneKey "IOFBBytesPerPlane" +#define kIOFBBitsPerPixelKey "IOFBBitsPerPixel" +#define kIOFBComponentCountKey "IOFBComponentCount" +#define kIOFBBitsPerComponentKey "IOFBBitsPerComponent" + +#define kIOFBDetailedTimingsKey "IOFBDetailedTimings" +#define kIOFBTimingRangeKey "IOFBTimingRange" +#define kIOFBScalerInfoKey "IOFBScalerInfo" +#define kIOFBCursorInfoKey "IOFBCursorInfo" + +#define kIOFBHostAccessFlagsKey "IOFBHostAccessFlags" + +#define kIOFBMemorySizeKey "IOFBMemorySize" + +#define kIOFBProbeOptionsKey "IOFBProbeOptions" + +#define kIOFBGammaWidthKey "IOFBGammaWidth" +#define kIOFBGammaCountKey "IOFBGammaCount" +#define kIOFBCLUTDeferKey "IOFBCLUTDefer" + +// exists on the hibernate progress display device +#ifndef kIOHibernatePreviewActiveKey +#define kIOHibernatePreviewActiveKey "IOHibernatePreviewActive" +// values for kIOHibernatePreviewActiveKey set by driver +enum { + kIOHibernatePreviewActive = 0x00000001, + kIOHibernatePreviewUpdates = 0x00000002 +}; +#endif + +// CFNumber/CFData +#define kIOFBAVSignalTypeKey "av-signal-type" +enum { + kIOFBAVSignalTypeUnknown = 0x00000000, + kIOFBAVSignalTypeVGA = 0x00000001, + kIOFBAVSignalTypeDVI = 0x00000002, + kIOFBAVSignalTypeHDMI = 0x00000008, + kIOFBAVSignalTypeDP = 0x00000010, +}; + +// diagnostic keys + +#define kIOFBConfigKey "IOFBConfig" +#define kIOFBModesKey "IOFBModes" +#define kIOFBModeIDKey "ID" +#define kIOFBModeDMKey "DM" +#define kIOFBModeTMKey "TM" +#define kIOFBModeAIDKey "AID" +#define kIOFBModeDFKey "DF" + +// display property keys + +#define kIODisplayEDIDKey "IODisplayEDID" +#define kIODisplayLocationKey "IODisplayLocation" // CFString +#define kIODisplayConnectFlagsKey "IODisplayConnectFlags" // CFNumber +#define kIODisplayHasBacklightKey "IODisplayHasBacklight" // CFBoolean +#define kIODisplayIsDigitalKey "IODisplayIsDigital" // CFBoolean +#define kDisplayBundleKey "DisplayBundle" + +#define kAppleDisplayTypeKey "AppleDisplayType" +#define kAppleSenseKey "AppleSense" + +#define kIODisplayMCCSVersionKey "IODisplayMCCSVersion" +#define kIODisplayTechnologyTypeKey "IODisplayTechnologyType" +#define kIODisplayUsageTimeKey "IODisplayUsageTime" +#define kIODisplayFirmwareLevelKey "IODisplayFirmwareLevel" + +enum { + kDisplayVendorIDUnknown = 'unkn', + kDisplayProductIDGeneric = 0x717 +}; + +#define kDisplayVendorID "DisplayVendorID" // CFNumber +#define kDisplayProductID "DisplayProductID" // CFNumber +#define kDisplaySerialNumber "DisplaySerialNumber" // CFNumber +#define kDisplaySerialString "DisplaySerialString" // CFString +#define kDisplayWeekOfManufacture "DisplayWeekManufacture" // CFNumber +#define kDisplayYearOfManufacture "DisplayYearManufacture" // CFNumber + +// CFDictionary of language-locale keys, name values +// eg. "en"="Color LCD", "en-GB"="Colour LCD" +#define kDisplayProductName "DisplayProductName" + +// all CFNumber or CFArray of CFNumber (floats) +#define kDisplayWhitePointX "DisplayWhitePointX" +#define kDisplayWhitePointY "DisplayWhitePointY" +#define kDisplayRedPointX "DisplayRedPointX" +#define kDisplayRedPointY "DisplayRedPointY" +#define kDisplayGreenPointX "DisplayGreenPointX" +#define kDisplayGreenPointY "DisplayGreenPointY" +#define kDisplayBluePointX "DisplayBluePointX" +#define kDisplayBluePointY "DisplayBluePointY" +#define kDisplayWhiteGamma "DisplayWhiteGamma" +#define kDisplayRedGamma "DisplayRedGamma" +#define kDisplayGreenGamma "DisplayGreenGamma" +#define kDisplayBlueGamma "DisplayBlueGamma" + +// Display gamma +#define kDisplayGammaChannels "DisplayGammaChannels" // CFNumber 1 or 3 channel count +#define kDisplayGammaEntryCount "DisplayGammaEntryCount" // CFNumber 1-based count of entries per channel +#define kDisplayGammaEntrySize "DisplayGammaEntrySize" // CFNumber size in bytes of each table entry +#define kDisplayGammaTable "DisplayGammaTable" // CFData + +// CFBoolean +#define kDisplayBrightnessAffectsGamma "DisplayBrightnessAffectsGamma" +#define kDisplayViewAngleAffectsGamma "DisplayViewAngleAffectsGamma" + +// CFData +#define kDisplayCSProfile "DisplayCSProfile" + +// CFNumber +#define kDisplayHorizontalImageSize "DisplayHorizontalImageSize" +#define kDisplayVerticalImageSize "DisplayVerticalImageSize" + +// Pixel description + +// CFBoolean +#define kDisplayFixedPixelFormat "DisplayFixedPixelFormat" + +enum { + kDisplaySubPixelLayoutUndefined = 0x00000000, + kDisplaySubPixelLayoutRGB = 0x00000001, + kDisplaySubPixelLayoutBGR = 0x00000002, + kDisplaySubPixelLayoutQuadGBL = 0x00000003, + kDisplaySubPixelLayoutQuadGBR = 0x00000004, + + kDisplaySubPixelConfigurationUndefined = 0x00000000, + kDisplaySubPixelConfigurationDelta = 0x00000001, + kDisplaySubPixelConfigurationStripe = 0x00000002, + kDisplaySubPixelConfigurationStripeOffset = 0x00000003, + kDisplaySubPixelConfigurationQuad = 0x00000004, + + kDisplaySubPixelShapeUndefined = 0x00000000, + kDisplaySubPixelShapeRound = 0x00000001, + kDisplaySubPixelShapeSquare = 0x00000002, + kDisplaySubPixelShapeRectangular = 0x00000003, + kDisplaySubPixelShapeOval = 0x00000004, + kDisplaySubPixelShapeElliptical = 0x00000005 +}; + +// CFNumbers +#define kDisplaySubPixelLayout "DisplaySubPixelLayout" +#define kDisplaySubPixelConfiguration "DisplaySubPixelConfiguration" +#define kDisplaySubPixelShape "DisplaySubPixelShape" + +#define kIODisplayOverrideMatchingKey "IODisplayOverrideMatching" + +// Display parameters + +#define kIODisplayParametersKey "IODisplayParameters" +#define kIODisplayGUIDKey "IODisplayGUID" + +#define kIODisplayValueKey "value" +#define kIODisplayMinValueKey "min" +#define kIODisplayMaxValueKey "max" + +#define kIODisplayBrightnessKey "brightness" +#define kIODisplayContrastKey "contrast" +#define kIODisplayHorizontalPositionKey "horizontal-position" +#define kIODisplayHorizontalSizeKey "horizontal-size" +#define kIODisplayVerticalPositionKey "vertical-position" +#define kIODisplayVerticalSizeKey "vertical-size" +#define kIODisplayTrapezoidKey "trapezoid" +#define kIODisplayPincushionKey "pincushion" +#define kIODisplayParallelogramKey "parallelogram" +#define kIODisplayRotationKey "rotation" +#define kIODisplayTheatreModeKey "theatre-mode" +#define kIODisplayTheatreModeWindowKey "theatre-mode-window" +#define kIODisplayOverscanKey "oscn" +#define kIODisplayVideoBestKey "vbst" + +#define kIODisplaySpeakerVolumeKey "speaker-volume" +#define kIODisplaySpeakerSelectKey "speaker-select" +#define kIODisplayMicrophoneVolumeKey "microphone-volume" +#define kIODisplayAmbientLightSensorKey "ambient-light-sensor" +#define kIODisplayAudioMuteAndScreenBlankKey "audio-mute-and-screen-blank" +#define kIODisplayAudioTrebleKey "audio-treble" +#define kIODisplayAudioBassKey "audio-bass" +#define kIODisplayAudioBalanceLRKey "audio-balance-LR" +#define kIODisplayAudioProcessorModeKey "audio-processor-mode" +#define kIODisplayPowerModeKey "power-mode" +#define kIODisplayManufacturerSpecificKey "manufacturer-specific" + + +#define kIODisplayRedGammaScaleKey "rgsc" +#define kIODisplayGreenGammaScaleKey "ggsc" +#define kIODisplayBlueGammaScaleKey "bgsc" + +#define kIODisplayParametersCommitKey "commit" +#define kIODisplayParametersDefaultKey "defaults" +#define kIODisplayParametersFlushKey "flush" + +#ifdef __cplusplus +} +#endif + +#endif /* ! _IOKIT_IOGRAPHICSTYPES_H */ diff --git a/i386/include/IOKit/hid/IOHIDDevice.h b/i386/include/IOKit/hid/IOHIDDevice.h new file mode 100644 index 0000000..29f0024 --- /dev/null +++ b/i386/include/IOKit/hid/IOHIDDevice.h @@ -0,0 +1,706 @@ +/* + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_HID_IOHIDDEVICE_H +#define _IOKIT_HID_IOHIDDEVICE_H + +#include +#include +#include +#include +#include + +class IOHIDSystem; +class IOHIDPointing; +class IOHIDKeyboard; +class IOHIDConsumer; +class IOHIDElementPrivate; +class IOHIDEventQueue; +class IOHIDInterface; +class IOHIDDeviceShim; +struct IOHIDReportHandler; + +/*! + @typedef IOHIDCompletionAction + @abstract Function called when set/get report completes + @param target The target specified in the IOHIDCompletion struct. + @param parameter The parameter specified in the IOHIDCompletion struct. + @param status Completion status +*/ +typedef void (*IOHIDCompletionAction)( + void * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining); + +/*! + @typedef IOHIDCompletion + @abstract Struct spefifying action to perform when set/get report completes. + @param target The target to pass to the action function. + @param action The function to call. + @param parameter The parameter to pass to the action function. +*/ +typedef struct IOHIDCompletion { + void * target; + IOHIDCompletionAction action; + void * parameter; +} IOHIDCompletion; + +/*! + @enum IOHIDReportOption + @abstract Option bits for IOHIDDevice::handleReport, + IOHIDDevice::getReport, and IOHIDDevice::setReport + @constant kIOHIDReportOptionNotInterrupt Tells method that the report + passed was not interrupt driven. +*/ +enum +{ + kIOHIDReportOptionNotInterrupt = 0x100 +}; + + +/*! @class IOHIDDevice : public IOService + @abstract IOHIDDevice defines a Human Interface Device (HID) object, + which will interact with the HID Manager by publishing static properties + in the registry, and also by reporting HID events through shared memory. + IOHIDDevice is an abstract class that must be subclassed to support a + specific type of HID devices, such as USB HID class devices. +
+ Since most HID devices are expected to be USB devices, IOHIDDevice + uses the USB HID specification to define the format of the report + descriptor, and also reports that are used to communicate with the + hardware via some intervening transport layer. However, there is no + mandate that the transport layer must be restricted to USB. A subclass + may be created to support legacy ADB joysticks, and issue packets on + the ADB bus and translate those packets to USB reports, and vice versa. + IOHIDDevice does not care how those reports are generated or consumed + by the physical device, as long as the reports abide to the USB + specification. */ + +class IOHIDDevice : public IOService +{ + OSDeclareDefaultStructors( IOHIDDevice ) + + friend class IOHIDLibUserClient; + friend class IOHIDDeviceShim; + +private: + OSArray * _elementArray; + UInt32 _dataElementIndex; + IORecursiveLock * _elementLock; + IOHIDReportHandler * _reportHandlers; + IOBufferMemoryDescriptor * _elementValuesDescriptor; + bool _readyForInputReports; + UInt32 _reportCount; + UInt32 _maxInputReportSize; + UInt32 _maxOutputReportSize; + UInt32 _maxFeatureReportSize; + + struct ExpansionData { + OSSet * clientSet; + IOService * seizedClient; + AbsoluteTime eventDeadline; + IONotifier * publishNotify; + OSArray * inputInterruptElementArray; + bool performTickle; + IOHIDInterface * interfaceNub; + IOHIDElementPrivate * rollOverElement; + OSArray * hierarchElements; + }; + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * _reserved; + + // HID report descriptor parsing support. + + bool linkToParent( const OSArray * array, + UInt32 parentIndex, + UInt32 childIndex ); + + bool createCollectionElements( HIDPreparsedDataRef parseData, + OSArray * array, + UInt32 maxCount ); + + bool createValueElements( HIDPreparsedDataRef parseData, + OSArray * array, + UInt32 hidReportType, + IOHIDElementType elementType, + UInt32 maxCount ); + + bool createButtonElements( HIDPreparsedDataRef parseData, + OSArray * array, + UInt32 hidReportType, + IOHIDElementType elementType, + UInt32 maxCount ); + + bool createReportHandlerElements( HIDPreparsedDataRef parseData); + + OSArray * newDeviceUsagePairs(); + + bool getReportCountAndSizes( HIDPreparsedDataRef parseData ); + + bool setReportSize( UInt8 reportID, + IOHIDReportType reportType, + UInt32 bits ); + + IOReturn createElementHierarchy( HIDPreparsedDataRef parseData ); + + IOReturn parseReportDescriptor( IOMemoryDescriptor * report, + IOOptionBits options = 0 ); + + IOBufferMemoryDescriptor * createMemoryForElementValues(); + + + static bool _publishNotificationHandler( void * target, + void * ref, IOService * newService ); + +protected: + +/*! @function free + @abstract Free the IOHIDDevice object. + @discussion Release all resources that were previously allocated, + then call super::free() to propagate the call to our superclass. */ + + virtual void free(); + +/*! @function handleOpen + @abstract Handle a client open on the interface. + @discussion This method is called by IOService::open() with the + arbitration lock held, and must return true to accept the client open. + This method will in turn call handleClientOpen() to qualify the client + requesting the open. + @param client The client object that requested the open. + @param options Options passed to IOService::open(). + @param argument Argument passed to IOService::open(). + @result true to accept the client open, false otherwise. */ + + virtual bool handleOpen(IOService * client, + IOOptionBits options, + void * argument); + +/*! @function handleClose + @abstract Handle a client close on the interface. + @discussion This method is called by IOService::close() with the + arbitration lock held. This method will in turn call handleClientClose() + to notify interested subclasses about the client close. If this represents + the last close, then the interface will also close the controller before + this method returns. The controllerWillClose() method will be called before + closing the controller. Subclasses should not override this method. + @param client The client object that requested the close. + @param options Options passed to IOService::close(). */ + + virtual void handleClose(IOService * client, IOOptionBits options); + +/*! @function handleIsOpen + @abstract Query whether a client has an open on the interface. + @discussion This method is always called by IOService with the + arbitration lock held. Subclasses should not override this method. + @result true if the specified client, or any client if none (0) is + specified, presently has an open on this object. */ + + virtual bool handleIsOpen(const IOService * client) const; + +/*! @function handleStart + @abstract Prepare the hardware and driver to support I/O operations. + @discussion IOHIDDevice will call this method from start() before + any I/O operations are issued to the concrete subclass. Methods + such as newReportDescriptor() are only called after handleStart() + has returned true. A subclass that overrides this method should + begin its implementation by calling the version in super, and + then check the return value. + @param provider The provider argument passed to start(). + @result True on success, or false otherwise. Returning false will + cause start() to fail and return false. */ + + virtual bool handleStart( IOService * provider ); + +/*! @function handleStop + @abstract Quiesce the hardware and stop the driver. + @discussion IOHIDDevice will call this method from stop() to + signal that the hardware should be quiesced and the driver stopped. + A subclass that overrides this method should end its implementation + by calling the version in super. + @param provider The provider argument passed to stop(). */ + + virtual void handleStop( IOService * provider ); + +/*! @function newUserClient + @abstract Handle a request to create a connection for a non kernel + client. + @discussion Create a new IOUserClient, or a subclass of IOUserClient, + to service a connection to a non kernel client. This implementation + will simply call the implementation in IOService to handle the call. + @param owningTask The mach task requesting the connection. + @param security_id A token representing the access level for the task. + @param type A constant specifying the type of connection to be created. + @param properties A dictionary of additional properties for the connection. + @param handler The IOUserClient object returned. + @result The return from IOService::newUserClient() is returned. */ + + virtual IOReturn newUserClient( task_t owningTask, + void * security_id, + UInt32 type, + OSDictionary * properties, + IOUserClient ** handler ); + IOReturn newUserClientGated(task_t owningTask, + void * security_id, + OSDictionary * properties, + IOUserClient ** handler ); + +/*! @function publishProperties + @abstract Publish HID properties to the I/O Kit registry. + @discussion Called by the start() method to fetch and publish all + HID properties to the I/O Kit registry. These properties will allow + the HID Manager to identify all HID device(s) in the system, by + iterating through objects that are subclasses of IOHIDDevice, and + then fetch their published property values. The implementation in + IOHIDDevice will call methods to get each individual HID property, + and subclasses will not normally need to override this method. + @param provider The provider argument passed to start(). + @result True to indicate that all properties were discovered and + published to the registry, false otherwise. Returning false will + cause start() to fail and return false. */ + + virtual bool publishProperties( IOService * provider ); + +public: + +/*! @function init + @abstract Initialize an IOHIDDevice object. + @discussion Prime the IOHIDDevice object and prepare it to support + a probe() or a start() call. This implementation will simply call + super::init(). + @param A dictionary A property table associated with this IOHIDDevice + instance. + @result True on sucess, or false otherwise. */ + + virtual bool init( OSDictionary * dictionary = 0 ); + +/*! @function start + @abstract Start up the driver using the given provider. + @discussion IOHIDDevice will allocate resources, then call handleStart() + before fetching the report descriptor through newReportDescriptor(), and + publishing HID properties to the registry. Before returning true to + indicate success, registerService() is called to trigger client matching. + Subclasses are recommended to override handleStart(). + @param provider The provider that the driver was matched to, and selected + to run with. + @result True on success, or false otherwise. */ + + virtual bool start( IOService * provider ); + +/*! @function stop + @abstract Called by a provider (during its termination) before detaching + all its clients. + @discussion IOHIDDevice will call handleStop(), then release allocated + resources. Subclasses are recommended to override handleStop(). + @param provider The provider that the driver was started on. */ + + virtual void stop( IOService * provider ); + +/*! @function matchPropertyTable + @abstract Called by the provider during a match + @discussion Compare the properties in the supplied table to this + object's properties. + @param table The property table that this device will match against +*/ + + virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); + +/*! @function newTransportString + @abstract Returns a string object that describes the transport + layer used by the HID device. + @result A string object. The caller must decrement the retain count + on the object returned. */ + + virtual OSString * newTransportString() const; + +/*! @function newManufacturerString + @abstract Returns a string object that describes the manufacturer + of the HID device. + @result A string object. The caller must decrement the retain count + on the object returned. */ + + virtual OSString * newManufacturerString() const; + +/*! @function newProductString + @abstract Returns a string object that describes the product + of the HID device. + @result A string object. The caller must decrement the retain count + on the object returned. */ + + virtual OSString * newProductString() const; + +/*! @function newVendorIDNumber + @abstract Returns a number object that describes the vendor ID + of the HID device. + @result A number object. The caller must decrement the retain count + on the object returned. */ + + virtual OSNumber * newVendorIDNumber() const; + +/*! @function newProductIDNumber + @abstract Returns a number object that describes the product ID + of the HID device. + @result A number object. The caller must decrement the retain count + on the object returned. */ + + virtual OSNumber * newProductIDNumber() const; + +/*! @function newVersionNumber + @abstract Returns a number object that describes the version number + of the HID device. + @result A number object. The caller must decrement the retain count + on the object returned. */ + + virtual OSNumber * newVersionNumber() const; + +// *** THIS HAS BEEN DEPRECATED. PLEASE USE newSerialNumberString *** +/*! @function newSerialNumber + @abstract THIS HAS BEEN DEPRECATED. PLEASE USE newSerialNumberString. + @result A number object. The caller must decrement the retain count + on the object returned. */ + + virtual OSNumber * newSerialNumber() const; + +/*! @function newPrimaryUsageNumber + @abstract Returns a number object that describes the primary usage + of the HID device. + @result A number object. The caller must decrement the retain count + on the object returned. */ + + virtual OSNumber * newPrimaryUsageNumber() const; + +/*! @function newPrimaryUsagePageNumber + @abstract Returns a number object that describes the primary usage + page of the HID device. + @result A number object. The caller must decrement the retain count + on the object returned. */ + + virtual OSNumber * newPrimaryUsagePageNumber() const; + +/*! @function newReportDescriptor + @abstract Create and return a new memory descriptor that describes the + report descriptor for the HID device. + @discussion A subclass must override this pure virtual function, and + return a memory descriptor that describes the HID report descriptor as + defined by the USB Device Class Definition for Human Interface Devices + Version 1.1 specification. + @param descriptor Pointer to the memory descriptor returned. This + memory descriptor will be released by the caller. + @result kIOReturnSuccess on success, or an error return otherwise. */ + + virtual IOReturn newReportDescriptor( + IOMemoryDescriptor ** descriptor ) const = 0; + +/*! @function handleReport + @abstract Handle an asynchronous report received from the HID device. + @param report A memory descriptor that describes the report. + @param reportType The type of report. + @param options Options to specify the request. No options are + currently defined, and the default value is 0. + @result kIOReturnSuccess on success, or an error return otherwise. */ + + virtual IOReturn handleReport( + IOMemoryDescriptor * report, + IOHIDReportType reportType = kIOHIDReportTypeInput, + IOOptionBits options = 0 ); + +/*! @function getReport + @abstract Get a report from the HID device. + @discussion A completion parameter may be added in the future. + @param report A memory descriptor that describes the memory to store + the report read from the HID device. + @param reportType The report type. + @param options The lower 8 bits will represent the Report ID. The + other 24 bits are options to specify the request. + @result kIOReturnSuccess on success, or an error return otherwise. */ + + virtual IOReturn getReport( IOMemoryDescriptor * report, + IOHIDReportType reportType, + IOOptionBits options ); + +/*! @function setReport + @abstract Send a report to the HID device. + @discussion A completion parameter may be added in the future. + @param report A memory descriptor that describes the report to send + to the HID device. + @param reportType The report type. + @param options The lower 8 bits will represent the Report ID. The + other 24 bits are options to specify the request. + @result kIOReturnSuccess on success, or an error return otherwise. */ + + virtual IOReturn setReport( IOMemoryDescriptor * report, + IOHIDReportType reportType, + IOOptionBits options = 0 ); + +/*! @function getMemoryWithCurrentElementValues + @abstract Get a reference to a memory descriptor that describes the + memory block containing the current HID element values. + @discussion Each HID element that can contribute to an input, output, + or feature report, is assigned an area of memory from a common memory + block allocated by IOHIDDevice. Each element will use its assigned + memory area to store its current value, defined by an IOHIDElementValue + structure. The memory described by the memory descriptor may be mapped + to user space to allow the HID Manager to poll the current element + value without the cost of a user-kernel transition. Subclasses should + not override this method. + @result A reference to a memory descriptor that describes the current + element values, or 0 to indicate a resource shortage. */ + + virtual IOMemoryDescriptor * getMemoryWithCurrentElementValues() const; + +/*! @function registerElement + @abstract A registration function called by a HID element to register + itself, and also to obtain an unique cookie identifier + (unique per device, not unique system-wide). + @discussion An internal data type, an IOHIDElementPrivate, is created to + represent each HID element discovered by parsing the HID report + descriptor. Each element created will call this method to register + itself with its owner (IOHIDDevice), and also to obtain an element + cookie that is used by HID Manager to specify and identify the element. + Subclasses should not override this method. + @param element The element that is requesting registration with its + owner. + @param cookie Pointer to the returned cookie assigned to this element. + @result True on success, or false otherwise. */ + + virtual bool registerElement( IOHIDElementPrivate * element, + IOHIDElementCookie * cookie ); + +/*! @function startEventDelivery + @abstract Start delivering events from a HID element to the event + queue specified. + @discussion Clients of IOHIDDevice may create an IOHIDEventQueue, and + then call this method to register for delivery of events generated by + one or more HID elements to that event queue. Subclasses should not + override this method. + @param queue The event queue that is interested in receiving events + generated by the HID element specified. The retain count on the queue + will be incremented by one. + @param cookie The cookie for a HID element published by the HID device. + @param options Options to specify the request. No options are currently + defined, and the default value is zero. + @result kIOReturnSuccess on success, or kIOReturnBadArgument if the + queue or the cookie argument specified is invalid, or kIOReturnNoMemory + if a resource shortage was encountered. */ + + virtual IOReturn startEventDelivery( IOHIDEventQueue * queue, + IOHIDElementCookie cookie, + IOOptionBits options = 0 ); + +/*! @function stopEventDelivery + @abstract Stop delivering events from one or more HID elements to the + event queue specified. + @discussion Clients that called startEventDelivery() must eventually + call this method to stop event delivery to its queue from one or more + HID elements. + @param queue The event queue that no longer wishes to receive events + generated by the HID element specified. + @param cookie The cookie for a HID element published by the HID device. + The default value of zero indicates that the queue should be removed from + the event dispatch list of all HID elements published by the HID device. + Subclasses should not override this method. + @result kIOReturnSuccess if the queue was removed from the event dispatch + list for one or more HID elements, or kIOReturnBadArgument if the queue + or the cookie argument specified is invalid, or kIOReturnNotFound if the + queue was not found. */ + + virtual IOReturn stopEventDelivery( IOHIDEventQueue * queue, + IOHIDElementCookie cookie = 0 ); + +/*! @function checkEventDelivery + @abstract Check whether events from a HID element will be delivered to + the event queue specified. + @param queue The event queue. + @param cookie The cookie for a HID element published by the HID device. + @param isActive Pointer to the return value that is set to true if events + generated by the HID element will be delivered to the queue, or false + otherwise. This return value is set only if kIOReturnSuccess is + returned. + @result kIOReturnSuccess on success, or kIOReturnBadArgument if one or + more of the arguments provided are invalid. */ + + virtual IOReturn checkEventDelivery( IOHIDEventQueue * queue, + IOHIDElementCookie cookie, + bool * isActive ); + +/*! @function updateElementValues + @abstract Updates element values from a HID device via getReport. + @discussion A completion parameter may be added in the future. + @param cookies A list of element cookies who's values need to be + set on the device. + @param cookieCount The number of element cookies. + @result kIOReturnSuccess on success, or an error return otherwise. */ + OSMetaClassDeclareReservedUsed(IOHIDDevice, 0); + virtual IOReturn updateElementValues(IOHIDElementCookie * cookies, UInt32 cookieCount = 1); + +/*! @function postElementValues + @abstract Posts element values to a HID device via setReport. + @discussion A completion parameter may be added in the future. + @param cookies A list of element cookies who's values need to be + set on the device. + @param cookieCount The number of element cookies. + @result kIOReturnSuccess on success, or an error return otherwise. */ + OSMetaClassDeclareReservedUsed(IOHIDDevice, 1); + virtual IOReturn postElementValues(IOHIDElementCookie * cookies, UInt32 cookieCount = 1); + +/*! @function newSerialNumberString + @abstract Returns a string object that describes the serial number + of the HID device. + @result A number object. The caller must decrement the retain count + on the object returned. */ + OSMetaClassDeclareReservedUsed(IOHIDDevice, 2); + virtual OSString * newSerialNumberString() const; + +/*! @function newLocationIDNumber + @abstract Returns a number object that describes the location ID + of the HID device. + @result A number object. The caller must decrement the retain count + on the object returned. */ + OSMetaClassDeclareReservedUsed(IOHIDDevice, 3); + virtual OSNumber * newLocationIDNumber() const; + +/*! @function getReport + @abstract Get a report from the HID device. + @discussion A completion parameter may be added in the future. + @param report A memory descriptor that describes the memory to store + the report read from the HID device. + @param reportType The report type. + @param options The lower 8 bits will represent the Report ID. The + other 24 bits are options to specify the request. + @param completionTimeout Specifies an amount of time (in ms) after which + the command will be aborted if the entire command has not been completed. + @param completion Function to call when request completes. If omitted then + getReport() executes synchronously, blocking until the request is complete. + @result kIOReturnSuccess on success, or an error return otherwise. */ + + OSMetaClassDeclareReservedUsed(IOHIDDevice, 4); + virtual IOReturn getReport( IOMemoryDescriptor * report, + IOHIDReportType reportType, + IOOptionBits options, + UInt32 completionTimeout, + IOHIDCompletion * completion = 0); + +/*! @function setReport + @abstract Send a report to the HID device. + @discussion A completion parameter may be added in the future. + @param report A memory descriptor that describes the report to send + to the HID device. + @param reportType The report type. + @param options The lower 8 bits will represent the Report ID. The + other 24 bits are options to specify the request. + @param completionTimeout Specifies an amount of time (in ms) after which + the command will be aborted if the entire command has not been completed. + @param completion Function to call when request completes. If omitted then + setReport() executes synchronously, blocking until the request is complete. + @result kIOReturnSuccess on success, or an error return otherwise. */ + + OSMetaClassDeclareReservedUsed(IOHIDDevice, 5); + virtual IOReturn setReport( IOMemoryDescriptor * report, + IOHIDReportType reportType, + IOOptionBits options, + UInt32 completionTimeout, + IOHIDCompletion * completion = 0); + +/*! @function newVendorIDSourceNumber + @abstract Returns a number object that describes the vendor ID + source of the HID device. + @result A number object. The caller must decrement the retain count + on the object returned. */ + OSMetaClassDeclareReservedUsed(IOHIDDevice, 6); + virtual OSNumber * newVendorIDSourceNumber() const; + +/*! @function newCountryCodeNumber + @abstract Returns a number object that describes the country code + of the HID device. + @result A number object. The caller must decrement the retain count + on the object returned. */ + OSMetaClassDeclareReservedUsed(IOHIDDevice, 7); + virtual OSNumber * newCountryCodeNumber() const; + + +/*! @function handleReportWithTime + @abstract Handle an asynchronous report received from the HID device. + @param timeStamp The timestamp of report. + @param report A memory descriptor that describes the report. + @param reportType The type of report. Currently, only + kIOHIDReportTypeInput report type is handled. + @param options Options to specify the request. No options are + currently defined, and the default value is 0. + @result kIOReturnSuccess on success, or an error return otherwise. */ + + OSMetaClassDeclareReservedUsed(IOHIDDevice, 8); + virtual IOReturn handleReportWithTime( + AbsoluteTime timeStamp, + IOMemoryDescriptor * report, + IOHIDReportType reportType = kIOHIDReportTypeInput, + IOOptionBits options = 0); + +/*! @function newReportInterval + @abstract Returns a number object that describes the actual polling + interval of the HID device in microseconds. + @result A number object. The caller must decrement the retain count + on the object returned. */ + OSMetaClassDeclareReservedUsed(IOHIDDevice, 9); + virtual OSNumber * newReportIntervalNumber() const; + + OSMetaClassDeclareReservedUnused(IOHIDDevice, 10); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 11); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 12); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 13); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 14); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 15); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 16); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 17); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 18); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 19); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 20); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 21); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 22); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 23); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 24); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 25); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 26); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 27); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 28); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 29); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 30); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 31); + +#ifndef __ppc__ + OSMetaClassDeclareReservedUnused(IOHIDDevice, 32); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 33); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 34); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 35); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 36); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 37); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 38); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 39); + OSMetaClassDeclareReservedUnused(IOHIDDevice, 40); +#endif + +}; + +#endif /* !_IOKIT_HID_IOHIDDEVICE_H */ diff --git a/i386/include/IOKit/hid/IOHIDElement.h b/i386/include/IOKit/hid/IOHIDElement.h new file mode 100644 index 0000000..f4fbb17 --- /dev/null +++ b/i386/include/IOKit/hid/IOHIDElement.h @@ -0,0 +1,106 @@ +/* + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_HID_IOHIDELEMENT_H +#define _IOKIT_HID_IOHIDELEMENT_H + +#include +#include +#include + +//=========================================================================== +// An object that describes a single HID element. + +class IOHIDElement: public OSObject +{ + OSDeclareAbstractStructors( IOHIDElement ) + + struct ExpansionData { + }; + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * _reserved; + + +public: + + virtual IOHIDElementCookie getCookie() = 0; + virtual IOHIDElement * getParentElement() = 0; + virtual OSArray * getChildElements() = 0; + virtual IOHIDElementType getType() = 0; + virtual IOHIDElementCollectionType getCollectionType() = 0; + virtual UInt32 getUsagePage() = 0; + virtual UInt32 getUsage() = 0; + virtual UInt32 getLogicalMin() = 0; + virtual UInt32 getLogicalMax() = 0; + virtual UInt32 getPhysicalMin() = 0; + virtual UInt32 getPhysicalMax() = 0; + virtual UInt32 getUnitExponent() = 0; + virtual UInt32 getUnit() = 0; + virtual UInt32 getReportSize() = 0; + virtual UInt32 getReportCount() = 0; + virtual UInt32 getReportID() = 0; + virtual UInt32 getFlags() = 0; + virtual AbsoluteTime getTimeStamp() = 0; + virtual UInt32 getValue() = 0; + virtual OSData * getDataValue() = 0; + virtual void setValue(UInt32 value) = 0; + virtual void setDataValue(OSData * value) = 0; + + OSMetaClassDeclareReservedUnused(IOHIDElement, 0); + OSMetaClassDeclareReservedUnused(IOHIDElement, 1); + OSMetaClassDeclareReservedUnused(IOHIDElement, 2); + OSMetaClassDeclareReservedUnused(IOHIDElement, 3); + OSMetaClassDeclareReservedUnused(IOHIDElement, 4); + OSMetaClassDeclareReservedUnused(IOHIDElement, 5); + OSMetaClassDeclareReservedUnused(IOHIDElement, 6); + OSMetaClassDeclareReservedUnused(IOHIDElement, 7); + OSMetaClassDeclareReservedUnused(IOHIDElement, 8); + OSMetaClassDeclareReservedUnused(IOHIDElement, 9); + OSMetaClassDeclareReservedUnused(IOHIDElement, 10); + OSMetaClassDeclareReservedUnused(IOHIDElement, 11); + OSMetaClassDeclareReservedUnused(IOHIDElement, 12); + OSMetaClassDeclareReservedUnused(IOHIDElement, 13); + OSMetaClassDeclareReservedUnused(IOHIDElement, 14); + OSMetaClassDeclareReservedUnused(IOHIDElement, 15); + OSMetaClassDeclareReservedUnused(IOHIDElement, 16); + OSMetaClassDeclareReservedUnused(IOHIDElement, 17); + OSMetaClassDeclareReservedUnused(IOHIDElement, 18); + OSMetaClassDeclareReservedUnused(IOHIDElement, 19); + OSMetaClassDeclareReservedUnused(IOHIDElement, 20); + OSMetaClassDeclareReservedUnused(IOHIDElement, 21); + OSMetaClassDeclareReservedUnused(IOHIDElement, 22); + OSMetaClassDeclareReservedUnused(IOHIDElement, 23); + OSMetaClassDeclareReservedUnused(IOHIDElement, 24); + OSMetaClassDeclareReservedUnused(IOHIDElement, 25); + OSMetaClassDeclareReservedUnused(IOHIDElement, 26); + OSMetaClassDeclareReservedUnused(IOHIDElement, 27); + OSMetaClassDeclareReservedUnused(IOHIDElement, 28); + OSMetaClassDeclareReservedUnused(IOHIDElement, 29); + OSMetaClassDeclareReservedUnused(IOHIDElement, 30); + OSMetaClassDeclareReservedUnused(IOHIDElement, 31); + +}; + +#endif /* !_IOKIT_HID_IOHIDELEMENT_H */ diff --git a/i386/include/IOKit/hid/IOHIDInterface.h b/i386/include/IOKit/hid/IOHIDInterface.h new file mode 100644 index 0000000..54b4230 --- /dev/null +++ b/i386/include/IOKit/hid/IOHIDInterface.h @@ -0,0 +1,252 @@ +/* + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_HID_IOHIDINTERFACE_H +#define _IOKIT_HID_IOHIDINTERFACE_H + +#include +#include + +class IOHIDDevice; + +/*! @class IOHIDInterface : public IOService + @abstract In kernel interface to a HID device. + @discussion +*/ + +class IOHIDInterface: public IOService +{ + OSDeclareDefaultStructors( IOHIDInterface ) + +public: + + /*! @typedef IOHIDInterface::InterruptReportAction + @abstract Callback to handle an asynchronous report received from + the HID device. + @discussion This callback is set when calling IOHIDInterface::open. + @param target Pointer to your data object. + @param timestamp Time when the report was delivered. + @param report A memory descriptor that describes the report. + @param reportType The type of report. + @param reportID The ID of the report. + @param refcon void * pointer to more data. + */ + typedef void (*InterruptReportAction)( + OSObject * target, + AbsoluteTime timestamp, + IOMemoryDescriptor * report, + IOHIDReportType type, + UInt32 reportID, + void * refcon); + + /*! + @typedef IOHIDInterface::CompletionAction + @discussion Function called when HID I/O completes. + @param target + @param refcon + @param status Completion status. + @param bufferSizeRemaining Bytes left to be transferred. + */ + + typedef void (*CompletionAction)( + OSObject * target, + void * refcon, + IOReturn status, + UInt32 bufferSizeRemaining); + +private: + IOHIDDevice * _owner; + OSArray * _elementArray; + InterruptReportAction _interruptAction; + void * _interruptRefCon; + OSObject * _interruptTarget; + OSString * _transportString; + OSString * _manufacturerString; + OSString * _productString; + OSString * _serialNumberString; + UInt32 _locationID; + UInt32 _vendorID; + UInt32 _vendorIDSource; + UInt32 _productID; + UInt32 _version; + UInt32 _countryCode; + IOByteCount _maxReportSize[kIOHIDReportTypeCount]; + + struct ExpansionData { + UInt32 reportInterval; + }; + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * _reserved; + +protected: + + /*! + @function free + @abstract Free the IOHIDInterface object. + @discussion Release all resources that were previously allocated, + then call super::free() to propagate the call to our superclass. + */ + + virtual void free(); + +public: + + static IOHIDInterface * withElements ( OSArray * elements ); + + /*! + @function init + @abstract Initialize an IOHIDInterface object. + @discussion Prime the IOHIDInterface object and prepare it to support + a probe() or a start() call. This implementation will simply call + super::init(). + @param A dictionary A property table associated with this IOHIDInterface + instance. + @result True on sucess, or false otherwise. + */ + + virtual bool init( OSDictionary * dictionary = 0 ); + + /*! + @function start + @abstract Start up the driver using the given provider. + @discussion IOHIDInterface will allocate resources. Before returning true + to indicate success, registerService() is called to trigger client matching. + @param provider The provider that the driver was matched to, and selected + to run with. + @result True on success, or false otherwise. + */ + + virtual bool start( IOService * provider ); + + /*! + @function matchPropertyTable + @abstract Called by the provider during a match + @discussion Compare the properties in the supplied table to this + object's properties. + @param table The property table that this device will match against + */ + + virtual bool matchPropertyTable( + OSDictionary * table, + SInt32 * score); + + virtual bool open ( + IOService * client, + IOOptionBits options, + InterruptReportAction action, + void * refCon); + + virtual void close( + IOService * client, + IOOptionBits options = 0 ); + + virtual OSString * getTransport (); + virtual UInt32 getLocationID (); + virtual UInt32 getVendorID (); + virtual UInt32 getVendorIDSource (); + virtual UInt32 getProductID (); + virtual UInt32 getVersion (); + virtual UInt32 getCountryCode (); + virtual OSString * getManufacturer (); + virtual OSString * getProduct (); + virtual OSString * getSerialNumber (); + virtual IOByteCount getMaxReportSize (IOHIDReportType type); + + virtual OSArray * createMatchingElements ( + OSDictionary * matching = 0, + IOOptionBits options = 0); + + virtual void handleReport ( + AbsoluteTime timeStamp, + IOMemoryDescriptor * report, + IOHIDReportType reportType, + UInt32 reportID, + IOOptionBits options = 0); + + virtual IOReturn setReport ( + IOMemoryDescriptor * report, + IOHIDReportType reportType, + UInt32 reportID = 0, + IOOptionBits options = 0); + + virtual IOReturn getReport ( + IOMemoryDescriptor * report, + IOHIDReportType reportType, + UInt32 reportID = 0, + IOOptionBits options = 0); + + virtual IOReturn setReport ( + IOMemoryDescriptor * report, + IOHIDReportType reportType, + UInt32 reportID = 0, + IOOptionBits options = 0, + UInt32 completionTimeout = 0, + CompletionAction * completion = 0); + + virtual IOReturn getReport ( + IOMemoryDescriptor * report, + IOHIDReportType reportType, + UInt32 reportID = 0, + IOOptionBits options = 0, + UInt32 completionTimeout = 0, + CompletionAction * completion = 0); + + OSMetaClassDeclareReservedUsed(IOHIDInterface, 0); + virtual UInt32 getReportInterval (); + + OSMetaClassDeclareReservedUnused(IOHIDInterface, 1); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 2); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 3); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 4); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 5); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 6); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 7); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 8); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 9); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 10); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 11); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 12); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 13); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 14); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 15); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 16); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 17); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 18); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 19); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 20); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 21); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 22); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 23); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 24); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 25); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 26); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 27); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 28); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 29); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 30); + OSMetaClassDeclareReservedUnused(IOHIDInterface, 31); +}; + +#endif /* !_IOKIT_HID_IOHIDINTERFACE_H */ diff --git a/i386/include/IOKit/hid/IOHIDKeys.h b/i386/include/IOKit/hid/IOHIDKeys.h new file mode 100644 index 0000000..a4e3789 --- /dev/null +++ b/i386/include/IOKit/hid/IOHIDKeys.h @@ -0,0 +1,349 @@ +/* + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_HID_IOHIDKEYS_H_ +#define _IOKIT_HID_IOHIDKEYS_H_ + +#include +#include + +__BEGIN_DECLS + +/* The following keys are used to search the IORegistry for HID related services +*/ + +/* This is used to find HID Devices in the IORegistry */ +#define kIOHIDDeviceKey "IOHIDDevice" + +/*! + @defined HID Device Property Keys + @abstract Keys that represent properties of a paticular device. + @discussion Keys that represent properties of a paticular device. Can be added + to your matching dictionary when refining searches for HID devices. +

+ Please note:
+ kIOHIDPrimaryUsageKey and kIOHIDPrimaryUsagePageKey are no longer + rich enough to describe a device's capabilities. Take, for example, a + device that describes both a keyboard and a mouse in the same descriptor. + The previous behavior was to only describe the keyboard behavior with the + primary usage and usage page. Needless to say, this would sometimes cause + a program interested in mice to skip this device when matching. +
+ Thus we have added 3 + additional keys: +
    +
  • kIOHIDDeviceUsageKey
  • +
  • kIOHIDDeviceUsagePageKey
  • +
  • kIOHIDDeviceUsagePairsKey
  • +
+ kIOHIDDeviceUsagePairsKey is used to represent an array of dictionaries containing + key/value pairs referenced by kIOHIDDeviceUsageKey and kIOHIDDeviceUsagePageKey. + These usage pairs describe all application type collections (behaviors) defined + by the device. +

+ An application intersted in only matching on one criteria would only add the + kIOHIDDeviceUsageKey and kIOHIDDeviceUsagePageKey keys to the matching dictionary. + If it is interested in a device that has multiple behaviors, the application would + instead add an array or dictionaries referenced by kIOHIDDeviceUsagePairsKey to his + matching dictionary. +*/ +#define kIOHIDTransportKey "Transport" +#define kIOHIDVendorIDKey "VendorID" +#define kIOHIDVendorIDSourceKey "VendorIDSource" +#define kIOHIDProductIDKey "ProductID" +#define kIOHIDVersionNumberKey "VersionNumber" +#define kIOHIDManufacturerKey "Manufacturer" +#define kIOHIDProductKey "Product" +#define kIOHIDSerialNumberKey "SerialNumber" +#define kIOHIDCountryCodeKey "CountryCode" +#define kIOHIDStandardTypeKey "StandardType" +#define kIOHIDLocationIDKey "LocationID" +#define kIOHIDDeviceUsageKey "DeviceUsage" +#define kIOHIDDeviceUsagePageKey "DeviceUsagePage" +#define kIOHIDDeviceUsagePairsKey "DeviceUsagePairs" +#define kIOHIDPrimaryUsageKey "PrimaryUsage" +#define kIOHIDPrimaryUsagePageKey "PrimaryUsagePage" +#define kIOHIDMaxInputReportSizeKey "MaxInputReportSize" +#define kIOHIDMaxOutputReportSizeKey "MaxOutputReportSize" +#define kIOHIDMaxFeatureReportSizeKey "MaxFeatureReportSize" +#define kIOHIDReportIntervalKey "ReportInterval" +#define kIOHIDReportDescriptorKey "ReportDescriptor" + +/*! + @define kIOHIDElementKey + @abstract Keys that represents an element property. + @discussion Property for a HID Device or element dictionary. + Elements can be heirarchical, so they can contain other elements. +*/ +#define kIOHIDElementKey "Elements" + +/*! + @defined HID Element Dictionary Keys + @abstract Keys that represent properties of a particular elements. + @discussion These keys can also be added to a matching dictionary + when searching for elements via copyMatchingElements. +*/ +#define kIOHIDElementCookieKey "ElementCookie" +#define kIOHIDElementTypeKey "Type" +#define kIOHIDElementCollectionTypeKey "CollectionType" +#define kIOHIDElementUsageKey "Usage" +#define kIOHIDElementUsagePageKey "UsagePage" +#define kIOHIDElementMinKey "Min" +#define kIOHIDElementMaxKey "Max" +#define kIOHIDElementScaledMinKey "ScaledMin" +#define kIOHIDElementScaledMaxKey "ScaledMax" +#define kIOHIDElementSizeKey "Size" +#define kIOHIDElementReportSizeKey "ReportSize" +#define kIOHIDElementReportCountKey "ReportCount" +#define kIOHIDElementReportIDKey "ReportID" +#define kIOHIDElementIsArrayKey "IsArray" +#define kIOHIDElementIsRelativeKey "IsRelative" +#define kIOHIDElementIsWrappingKey "IsWrapping" +#define kIOHIDElementIsNonLinearKey "IsNonLinear" +#define kIOHIDElementHasPreferredStateKey "HasPreferredState" +#define kIOHIDElementHasNullStateKey "HasNullState" +#define kIOHIDElementFlagsKey "Flags" +#define kIOHIDElementUnitKey "Unit" +#define kIOHIDElementUnitExponentKey "UnitExponent" +#define kIOHIDElementNameKey "Name" +#define kIOHIDElementValueLocationKey "ValueLocation" +#define kIOHIDElementDuplicateIndexKey "DuplicateIndex" +#define kIOHIDElementParentCollectionKey "ParentCollection" + +#ifndef __ppc__ + #define kIOHIDElementVendorSpecificKey "VendorSpecific" +#else + #define kIOHIDElementVendorSpecificKey "VendorSpecifc" +#endif + +/*! + @defined HID Element Match Keys + @abstract Keys used for matching particular elements. + @discussion These keys should only be used with a matching + dictionary when searching for elements via copyMatchingElements. +*/ +#define kIOHIDElementCookieMinKey "ElementCookieMin" +#define kIOHIDElementCookieMaxKey "ElementCookieMax" +#define kIOHIDElementUsageMinKey "UsageMin" +#define kIOHIDElementUsageMaxKey "UsageMax" + +/*! + @defined kIOHIDElementCalibrationMinKey + @abstract The minimum bounds for a calibrated value. +*/ +#define kIOHIDElementCalibrationMinKey "CalibrationMin" + +/*! + @defined kIOHIDElementCalibrationMaxKey + @abstract The maximum bounds for a calibrated value. +*/ +#define kIOHIDElementCalibrationMaxKey "CalibrationMax" + +/*! + @defined kIOHIDElementCalibrationSaturationMinKey + @abstract The mininum tolerance to be used when calibrating a logical element value. + @discussion The saturation property is used to allow for slight differences in the minimum and maximum value returned by an element. +*/ +#define kIOHIDElementCalibrationSaturationMinKey "CalibrationSaturationMin" + +/*! + @defined kIOHIDElementCalibrationSaturationMaxKey + @abstract The maximum tolerance to be used when calibrating a logical element value. + @discussion The saturation property is used to allow for slight differences in the minimum and maximum value returned by an element. +*/ +#define kIOHIDElementCalibrationSaturationMaxKey "CalibrationSaturationMax" + +/*! + @defined kIOHIDElementCalibrationDeadZoneMinKey + @abstract The minimum bounds near the midpoint of a logical value in which the value is ignored. + @discussion The dead zone property is used to allow for slight differences in the idle value returned by an element. +*/ +#define kIOHIDElementCalibrationDeadZoneMinKey "CalibrationDeadZoneMin" + +/*! + @defined kIOHIDElementCalibrationDeadZoneMinKey + @abstract The maximum bounds near the midpoint of a logical value in which the value is ignored. + @discussion The dead zone property is used to allow for slight differences in the idle value returned by an element. +*/ +#define kIOHIDElementCalibrationDeadZoneMaxKey "CalibrationDeadZoneMax" + +/*! + @defined kIOHIDElementCalibrationGranularityKey + @abstract The scale or level of detail returned in a calibrated element value. + @discussion Values are rounded off such that if granularity=0.1, values after calibration are 0, 0.1, 0.2, 0.3, etc. +*/ +#define kIOHIDElementCalibrationGranularityKey "CalibrationGranularity" + +/*! + @typedef IOHIDElementCookie + @abstract Abstract data type used as a unique identifier for an element. +*/ +#ifdef __LP64__ + typedef uint32_t IOHIDElementCookie; +#else + typedef void * IOHIDElementCookie; +#endif + +/*! + @typedef IOHIDElementType + @abstract Describes different types of HID elements. + @discussion Used by the IOHIDFamily to identify the type of + element processed. Represented by the key kIOHIDElementTypeKey in the + dictionary describing the element. + @constant kIOHIDElementTypeInput_Misc + Misc input data field or varying size. + @constant kIOHIDElementTypeInput_Button + One bit input data field. + @constant kIOHIDElementTypeInput_Axis + Input data field used to represent an axis. + @constant kIOHIDElementTypeInput_ScanCodes + Input data field used to represent a scan code or usage selector. + @constant kIOHIDElementTypeOutput + Used to represent an output data field in a report. + @constant kIOHIDElementTypeFeature + Describes input and output elements not intended for + consumption by the end user. + @constant kIOHIDElementTypeCollection + Element used to identify a relationship between two or more elements. +*/ +enum IOHIDElementType { + kIOHIDElementTypeInput_Misc = 1, + kIOHIDElementTypeInput_Button = 2, + kIOHIDElementTypeInput_Axis = 3, + kIOHIDElementTypeInput_ScanCodes = 4, + kIOHIDElementTypeOutput = 129, + kIOHIDElementTypeFeature = 257, + kIOHIDElementTypeCollection = 513 +}; +typedef enum IOHIDElementType IOHIDElementType; + +/*! + @typedef IOHIDElementCollectionType + @abstract Describes different types of HID collections. + @discussion Collections identify a relationship between two or more + elements. + @constant kIOHIDElementCollectionTypePhysical + Used for a set of data items that represent data points + collected at one geometric point. + @constant kIOHIDElementCollectionTypeApplication + Identifies item groups serving different purposes in a single device. + @constant kIOHIDElementCollectionTypeLogical + Used when a set of data items form a composite data structure. + @constant kIOHIDElementCollectionTypeReport + Wraps all the fields in a report. + @constant kIOHIDElementCollectionTypeNamedArray + Contains an array of selector usages. + @constant kIOHIDElementCollectionTypeUsageSwitch + Modifies the meaning of the usage it contains. + @constant kIOHIDElementCollectionTypeUsageModifier + Modifies the meaning of the usage attached to the encompassing collection. +*/ +enum IOHIDElementCollectionType{ + kIOHIDElementCollectionTypePhysical = 0x00, + kIOHIDElementCollectionTypeApplication, + kIOHIDElementCollectionTypeLogical, + kIOHIDElementCollectionTypeReport, + kIOHIDElementCollectionTypeNamedArray, + kIOHIDElementCollectionTypeUsageSwitch, + kIOHIDElementCollectionTypeUsageModifier +}; +typedef enum IOHIDElementCollectionType IOHIDElementCollectionType; + + +/*! + @typedef IOHIDReportType + @abstract Describes different type of HID reports. + @discussion Used by the IOHIDFamily to identify the type of + report being processed. + @constant kIOHIDReportTypeInput Input report. + @constant kIOHIDReportTypeOutput Output report. + @constant kIOHIDReportTypeFeature Feature report. +*/ +enum IOHIDReportType{ + kIOHIDReportTypeInput = 0, + kIOHIDReportTypeOutput, + kIOHIDReportTypeFeature, + kIOHIDReportTypeCount +}; +typedef enum IOHIDReportType IOHIDReportType; + +/*! + @typedef IOHIDOptionsType + @abstract Options for opening a device via IOHIDLib. + @constant kIOHIDOptionsTypeNone Default option. + @constant kIOHIDOptionsTypeSeizeDevice Used to open exclusive + communication with the device. This will prevent the system + and other clients from receiving events from the device. +*/ +enum { + kIOHIDOptionsTypeNone = 0x00, + kIOHIDOptionsTypeSeizeDevice = 0x01 +}; +typedef uint32_t IOHIDOptionsType; + + +/*! + @typedef IOHIDQueueOptionsType + @abstract Options for creating a queue via IOHIDLib. + @constant kIOHIDQueueOptionsTypeNone Default option. + @constant kIOHIDQueueOptionsTypeEnqueueAll Force the IOHIDQueue + to enqueue all events, relative or absolute, regardless of change. +*/ +enum { + kIOHIDQueueOptionsTypeNone = 0x00, + kIOHIDQueueOptionsTypeEnqueueAll = 0x01 +}; +typedef uint32_t IOHIDQueueOptionsType; + + +enum { + kIOHIDElementFlagsConstantMask = 0x0001, + kIOHIDElementFlagsVariableMask = 0x0002, + kIOHIDElementFlagsRelativeMask = 0x0004, + kIOHIDElementFlagsWrapMask = 0x0008, + kIOHIDElementFlagsNonLinearMask = 0x0010, + kIOHIDElementFlagsNoPreferredMask = 0x0020, + kIOHIDElementFlagsNullStateMask = 0x0040, + kIOHIDElementFlagsVolativeMask = 0x0080, + kIOHIDElementFlagsBufferedByteMask = 0x0100 +}; +typedef uint32_t IOHIDElementFlags; + +/*! + @typedef IOHIDStandardType + @abstract Type to define what industrial standard the device is referencing. + @constant kIOHIDStandardTypeANSI ANSI. + @constant kIOHIDStandardTypeISO ISO. + @constant kIOHIDStandardTypeJIS JIS. +*/ +enum { + kIOHIDStandardTypeANSI = 0, + kIOHIDStandardTypeISO = 1, + kIOHIDStandardTypeJIS = 2 +}; +typedef uint32_t IOHIDStandardType; + +__END_DECLS + +#endif /* !_IOKIT_HID_IOHIDKEYS_H_ */ diff --git a/i386/include/IOKit/hid/IOHIDUsageTables.h b/i386/include/IOKit/hid/IOHIDUsageTables.h new file mode 100644 index 0000000..ff0fd88 --- /dev/null +++ b/i386/include/IOKit/hid/IOHIDUsageTables.h @@ -0,0 +1,1665 @@ +/* + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _IOHIDUSAGETABLES_H +#define _IOHIDUSAGETABLES_H + +/* ****************************************************************************************** + * HID Usage Tables + * + * The following constants are from the USB 'HID Usage Tables' specification, revision 1.1rc3 + * ****************************************************************************************** */ + + +/* Usage Pages */ +enum +{ + kHIDPage_Undefined = 0x00, + kHIDPage_GenericDesktop = 0x01, + kHIDPage_Simulation = 0x02, + kHIDPage_VR = 0x03, + kHIDPage_Sport = 0x04, + kHIDPage_Game = 0x05, + /* Reserved 0x06 */ + kHIDPage_KeyboardOrKeypad = 0x07, /* USB Device Class Definition for Human Interface Devices (HID). Note: the usage type for all key codes is Selector (Sel). */ + kHIDPage_LEDs = 0x08, + kHIDPage_Button = 0x09, + kHIDPage_Ordinal = 0x0A, + kHIDPage_Telephony = 0x0B, + kHIDPage_Consumer = 0x0C, + kHIDPage_Digitizer = 0x0D, + /* Reserved 0x0E */ + kHIDPage_PID = 0x0F, /* USB Physical Interface Device definitions for force feedback and related devices. */ + kHIDPage_Unicode = 0x10, + /* Reserved 0x11 - 0x13 */ + kHIDPage_AlphanumericDisplay = 0x14, + /* Reserved 0x15 - 0x7F */ + /* Monitor 0x80 - 0x83 USB Device Class Definition for Monitor Devices */ + /* Power 0x84 - 0x87 USB Device Class Definition for Power Devices */ + kHIDPage_PowerDevice = 0x84, /* Power Device Page */ + kHIDPage_BatterySystem = 0x85, /* Battery System Page */ + /* Reserved 0x88 - 0x8B */ + kHIDPage_BarCodeScanner = 0x8C, /* (Point of Sale) USB Device Class Definition for Bar Code Scanner Devices */ + kHIDPage_WeighingDevice = 0x8D, /* (Point of Sale) USB Device Class Definition for Weighing Devices */ + kHIDPage_Scale = 0x8D, /* (Point of Sale) USB Device Class Definition for Scale Devices */ + kHIDPage_MagneticStripeReader = 0x8E, + /* ReservedPointofSalepages 0x8F */ + kHIDPage_CameraControl = 0x90, /* USB Device Class Definition for Image Class Devices */ + kHIDPage_Arcade = 0x91, /* OAAF Definitions for arcade and coinop related Devices */ + /* Reserved 0x92 - 0xFEFF */ + /* VendorDefined 0xFF00 - 0xFFFF */ + kHIDPage_VendorDefinedStart = 0xFF00 +}; + +/* Undefined Usage for all usage pages */ +enum +{ + kHIDUsage_Undefined = 0x00 +}; + +/* GenericDesktop Page (0x01) */ +enum +{ + kHIDUsage_GD_Pointer = 0x01, /* Physical Collection */ + kHIDUsage_GD_Mouse = 0x02, /* Application Collection */ + /* 0x03 Reserved */ + kHIDUsage_GD_Joystick = 0x04, /* Application Collection */ + kHIDUsage_GD_GamePad = 0x05, /* Application Collection */ + kHIDUsage_GD_Keyboard = 0x06, /* Application Collection */ + kHIDUsage_GD_Keypad = 0x07, /* Application Collection */ + kHIDUsage_GD_MultiAxisController = 0x08, /* Application Collection */ + /* 0x09 - 0x2F Reserved */ + kHIDUsage_GD_X = 0x30, /* Dynamic Value */ + kHIDUsage_GD_Y = 0x31, /* Dynamic Value */ + kHIDUsage_GD_Z = 0x32, /* Dynamic Value */ + kHIDUsage_GD_Rx = 0x33, /* Dynamic Value */ + kHIDUsage_GD_Ry = 0x34, /* Dynamic Value */ + kHIDUsage_GD_Rz = 0x35, /* Dynamic Value */ + kHIDUsage_GD_Slider = 0x36, /* Dynamic Value */ + kHIDUsage_GD_Dial = 0x37, /* Dynamic Value */ + kHIDUsage_GD_Wheel = 0x38, /* Dynamic Value */ + kHIDUsage_GD_Hatswitch = 0x39, /* Dynamic Value */ + kHIDUsage_GD_CountedBuffer = 0x3A, /* Logical Collection */ + kHIDUsage_GD_ByteCount = 0x3B, /* Dynamic Value */ + kHIDUsage_GD_MotionWakeup = 0x3C, /* One-Shot Control */ + kHIDUsage_GD_Start = 0x3D, /* On/Off Control */ + kHIDUsage_GD_Select = 0x3E, /* On/Off Control */ + /* 0x3F Reserved */ + kHIDUsage_GD_Vx = 0x40, /* Dynamic Value */ + kHIDUsage_GD_Vy = 0x41, /* Dynamic Value */ + kHIDUsage_GD_Vz = 0x42, /* Dynamic Value */ + kHIDUsage_GD_Vbrx = 0x43, /* Dynamic Value */ + kHIDUsage_GD_Vbry = 0x44, /* Dynamic Value */ + kHIDUsage_GD_Vbrz = 0x45, /* Dynamic Value */ + kHIDUsage_GD_Vno = 0x46, /* Dynamic Value */ + /* 0x47 - 0x7F Reserved */ + kHIDUsage_GD_SystemControl = 0x80, /* Application Collection */ + kHIDUsage_GD_SystemPowerDown = 0x81, /* One-Shot Control */ + kHIDUsage_GD_SystemSleep = 0x82, /* One-Shot Control */ + kHIDUsage_GD_SystemWakeUp = 0x83, /* One-Shot Control */ + kHIDUsage_GD_SystemContextMenu = 0x84, /* One-Shot Control */ + kHIDUsage_GD_SystemMainMenu = 0x85, /* One-Shot Control */ + kHIDUsage_GD_SystemAppMenu = 0x86, /* One-Shot Control */ + kHIDUsage_GD_SystemMenuHelp = 0x87, /* One-Shot Control */ + kHIDUsage_GD_SystemMenuExit = 0x88, /* One-Shot Control */ + kHIDUsage_GD_SystemMenu = 0x89, /* Selector */ + kHIDUsage_GD_SystemMenuRight = 0x8A, /* Re-Trigger Control */ + kHIDUsage_GD_SystemMenuLeft = 0x8B, /* Re-Trigger Control */ + kHIDUsage_GD_SystemMenuUp = 0x8C, /* Re-Trigger Control */ + kHIDUsage_GD_SystemMenuDown = 0x8D, /* Re-Trigger Control */ + /* 0x8E - 0x8F Reserved */ + kHIDUsage_GD_DPadUp = 0x90, /* On/Off Control */ + kHIDUsage_GD_DPadDown = 0x91, /* On/Off Control */ + kHIDUsage_GD_DPadRight = 0x92, /* On/Off Control */ + kHIDUsage_GD_DPadLeft = 0x93, /* On/Off Control */ + /* 0x94 - 0xFFFF Reserved */ + kHIDUsage_GD_Reserved = 0xFFFF +}; + +/* Simulation Page (0x02) */ +/* This section provides detailed descriptions of the usages employed by simulation devices. */ +enum +{ + kHIDUsage_Sim_FlightSimulationDevice = 0x01, /* Application Collection */ + kHIDUsage_Sim_AutomobileSimulationDevice = 0x02, /* Application Collection */ + kHIDUsage_Sim_TankSimulationDevice = 0x03, /* Application Collection */ + kHIDUsage_Sim_SpaceshipSimulationDevice = 0x04, /* Application Collection */ + kHIDUsage_Sim_SubmarineSimulationDevice = 0x05, /* Application Collection */ + kHIDUsage_Sim_SailingSimulationDevice = 0x06, /* Application Collection */ + kHIDUsage_Sim_MotorcycleSimulationDevice = 0x07, /* Application Collection */ + kHIDUsage_Sim_SportsSimulationDevice = 0x08, /* Application Collection */ + kHIDUsage_Sim_AirplaneSimulationDevice = 0x09, /* Application Collection */ + kHIDUsage_Sim_HelicopterSimulationDevice = 0x0A, /* Application Collection */ + kHIDUsage_Sim_MagicCarpetSimulationDevice = 0x0B, /* Application Collection */ + kHIDUsage_Sim_BicycleSimulationDevice = 0x0C, /* Application Collection */ + /* 0x0D - 0x1F Reserved */ + kHIDUsage_Sim_FlightControlStick = 0x20, /* Application Collection */ + kHIDUsage_Sim_FlightStick = 0x21, /* Application Collection */ + kHIDUsage_Sim_CyclicControl = 0x22, /* Physical Collection */ + kHIDUsage_Sim_CyclicTrim = 0x23, /* Physical Collection */ + kHIDUsage_Sim_FlightYoke = 0x24, /* Application Collection */ + kHIDUsage_Sim_TrackControl = 0x25, /* Physical Collection */ + /* 0x26 - 0xAF Reserved */ + kHIDUsage_Sim_Aileron = 0xB0, /* Dynamic Value */ + kHIDUsage_Sim_AileronTrim = 0xB1, /* Dynamic Value */ + kHIDUsage_Sim_AntiTorqueControl = 0xB2, /* Dynamic Value */ + kHIDUsage_Sim_AutopilotEnable = 0xB3, /* On/Off Control */ + kHIDUsage_Sim_ChaffRelease = 0xB4, /* One-Shot Control */ + kHIDUsage_Sim_CollectiveControl = 0xB5, /* Dynamic Value */ + kHIDUsage_Sim_DiveBrake = 0xB6, /* Dynamic Value */ + kHIDUsage_Sim_ElectronicCountermeasures = 0xB7, /* On/Off Control */ + kHIDUsage_Sim_Elevator = 0xB8, /* Dynamic Value */ + kHIDUsage_Sim_ElevatorTrim = 0xB9, /* Dynamic Value */ + kHIDUsage_Sim_Rudder = 0xBA, /* Dynamic Value */ + kHIDUsage_Sim_Throttle = 0xBB, /* Dynamic Value */ + kHIDUsage_Sim_FlightCommunications = 0xBC, /* On/Off Control */ + kHIDUsage_Sim_FlareRelease = 0xBD, /* One-Shot Control */ + kHIDUsage_Sim_LandingGear = 0xBE, /* On/Off Control */ + kHIDUsage_Sim_ToeBrake = 0xBF, /* Dynamic Value */ + kHIDUsage_Sim_Trigger = 0xC0, /* Momentary Control */ + kHIDUsage_Sim_WeaponsArm = 0xC1, /* On/Off Control */ + kHIDUsage_Sim_Weapons = 0xC2, /* Selector */ + kHIDUsage_Sim_WingFlaps = 0xC3, /* Dynamic Value */ + kHIDUsage_Sim_Accelerator = 0xC4, /* Dynamic Value */ + kHIDUsage_Sim_Brake = 0xC5, /* Dynamic Value */ + kHIDUsage_Sim_Clutch = 0xC6, /* Dynamic Value */ + kHIDUsage_Sim_Shifter = 0xC7, /* Dynamic Value */ + kHIDUsage_Sim_Steering = 0xC8, /* Dynamic Value */ + kHIDUsage_Sim_TurretDirection = 0xC9, /* Dynamic Value */ + kHIDUsage_Sim_BarrelElevation = 0xCA, /* Dynamic Value */ + kHIDUsage_Sim_DivePlane = 0xCB, /* Dynamic Value */ + kHIDUsage_Sim_Ballast = 0xCC, /* Dynamic Value */ + kHIDUsage_Sim_BicycleCrank = 0xCD, /* Dynamic Value */ + kHIDUsage_Sim_HandleBars = 0xCE, /* Dynamic Value */ + kHIDUsage_Sim_FrontBrake = 0xCF, /* Dynamic Value */ + kHIDUsage_Sim_RearBrake = 0xD0, /* Dynamic Value */ + /* 0xD1 - 0xFFFF Reserved */ + kHIDUsage_Sim_Reserved = 0xFFFF +}; + +/* VR Page (0x03) */ +/* Virtual Reality controls depend on designators to identify the individual controls. Most of the following are */ +/* usages are applied to the collections of entities that comprise the actual device. */ +enum +{ + kHIDUsage_VR_Belt = 0x01, /* Application Collection */ + kHIDUsage_VR_BodySuit = 0x02, /* Application Collection */ + kHIDUsage_VR_Flexor = 0x03, /* Physical Collection */ + kHIDUsage_VR_Glove = 0x04, /* Application Collection */ + kHIDUsage_VR_HeadTracker = 0x05, /* Physical Collection */ + kHIDUsage_VR_HeadMountedDisplay = 0x06, /* Application Collection */ + kHIDUsage_VR_HandTracker = 0x07, /* Application Collection */ + kHIDUsage_VR_Oculometer = 0x08, /* Application Collection */ + kHIDUsage_VR_Vest = 0x09, /* Application Collection */ + kHIDUsage_VR_AnimatronicDevice = 0x0A, /* Application Collection */ + /* 0x0B - 0x1F Reserved */ + kHIDUsage_VR_StereoEnable = 0x20, /* On/Off Control */ + kHIDUsage_VR_DisplayEnable = 0x21, /* On/Off Control */ + /* 0x22 - 0xFFFF Reserved */ + kHIDUsage_VR_Reserved = 0xFFFF +}; + +/* Sport Page (0x04) */ +enum +{ + kHIDUsage_Sprt_BaseballBat = 0x01, /* Application Collection */ + kHIDUsage_Sprt_GolfClub = 0x02, /* Application Collection */ + kHIDUsage_Sprt_RowingMachine = 0x03, /* Application Collection */ + kHIDUsage_Sprt_Treadmill = 0x04, /* Application Collection */ + /* 0x05 - 0x2F Reserved */ + kHIDUsage_Sprt_Oar = 0x30, /* Dynamic Value */ + kHIDUsage_Sprt_Slope = 0x31, /* Dynamic Value */ + kHIDUsage_Sprt_Rate = 0x32, /* Dynamic Value */ + kHIDUsage_Sprt_StickSpeed = 0x33, /* Dynamic Value */ + kHIDUsage_Sprt_StickFaceAngle = 0x34, /* Dynamic Value */ + kHIDUsage_Sprt_StickHeelOrToe = 0x35, /* Dynamic Value */ + kHIDUsage_Sprt_StickFollowThrough = 0x36, /* Dynamic Value */ + kHIDUsage_Sprt_StickTempo = 0x37, /* Dynamic Value */ + kHIDUsage_Sprt_StickType = 0x38, /* Named Array */ + kHIDUsage_Sprt_StickHeight = 0x39, /* Dynamic Value */ + /* 0x3A - 0x4F Reserved */ + kHIDUsage_Sprt_Putter = 0x50, /* Selector */ + kHIDUsage_Sprt_1Iron = 0x51, /* Selector */ + kHIDUsage_Sprt_2Iron = 0x52, /* Selector */ + kHIDUsage_Sprt_3Iron = 0x53, /* Selector */ + kHIDUsage_Sprt_4Iron = 0x54, /* Selector */ + kHIDUsage_Sprt_5Iron = 0x55, /* Selector */ + kHIDUsage_Sprt_6Iron = 0x56, /* Selector */ + kHIDUsage_Sprt_7Iron = 0x57, /* Selector */ + kHIDUsage_Sprt_8Iron = 0x58, /* Selector */ + kHIDUsage_Sprt_9Iron = 0x59, /* Selector */ + kHIDUsage_Sprt_10Iron = 0x5A, /* Selector */ + kHIDUsage_Sprt_11Iron = 0x5B, /* Selector */ + kHIDUsage_Sprt_SandWedge = 0x5C, /* Selector */ + kHIDUsage_Sprt_LoftWedge = 0x5D, /* Selector */ + kHIDUsage_Sprt_PowerWedge = 0x5E, /* Selector */ + kHIDUsage_Sprt_1Wood = 0x5F, /* Selector */ + kHIDUsage_Sprt_3Wood = 0x60, /* Selector */ + kHIDUsage_Sprt_5Wood = 0x61, /* Selector */ + kHIDUsage_Sprt_7Wood = 0x62, /* Selector */ + kHIDUsage_Sprt_9Wood = 0x63, /* Selector */ + /* 0x64 - 0xFFFF Reserved */ + kHIDUsage_Sprt_Reserved = 0xFFFF +}; + +/* Game Page (0x05) */ +enum +{ + kHIDUsage_Game_3DGameController = 0x01, /* Application Collection */ + kHIDUsage_Game_PinballDevice = 0x02, /* Application Collection */ + kHIDUsage_Game_GunDevice = 0x03, /* Application Collection */ + /* 0x04 - 0x1F Reserved */ + kHIDUsage_Game_PointofView = 0x20, /* Physical Collection */ + kHIDUsage_Game_TurnRightOrLeft = 0x21, /* Dynamic Value */ + kHIDUsage_Game_PitchUpOrDown = 0x22, /* Dynamic Value */ + kHIDUsage_Game_RollRightOrLeft = 0x23, /* Dynamic Value */ + kHIDUsage_Game_MoveRightOrLeft = 0x24, /* Dynamic Value */ + kHIDUsage_Game_MoveForwardOrBackward = 0x25, /* Dynamic Value */ + kHIDUsage_Game_MoveUpOrDown = 0x26, /* Dynamic Value */ + kHIDUsage_Game_LeanRightOrLeft = 0x27, /* Dynamic Value */ + kHIDUsage_Game_LeanForwardOrBackward = 0x28, /* Dynamic Value */ + kHIDUsage_Game_HeightOfPOV = 0x29, /* Dynamic Value */ + kHIDUsage_Game_Flipper = 0x2A, /* Momentary Control */ + kHIDUsage_Game_SecondaryFlipper = 0x2B, /* Momentary Control */ + kHIDUsage_Game_Bump = 0x2C, /* Momentary Control */ + kHIDUsage_Game_NewGame = 0x2D, /* One-Shot Control */ + kHIDUsage_Game_ShootBall = 0x2E, /* One-Shot Control */ + kHIDUsage_Game_Player = 0x2F, /* One-Shot Control */ + kHIDUsage_Game_GunBolt = 0x30, /* On/Off Control */ + kHIDUsage_Game_GunClip = 0x31, /* On/Off Control */ + kHIDUsage_Game_Gun = 0x32, /* Selector */ + kHIDUsage_Game_GunSingleShot = 0x33, /* Selector */ + kHIDUsage_Game_GunBurst = 0x34, /* Selector */ + kHIDUsage_Game_GunAutomatic = 0x35, /* Selector */ + kHIDUsage_Game_GunSafety = 0x36, /* On/Off Control */ + kHIDUsage_Game_GamepadFireOrJump = 0x37, /* Logical Collection */ + kHIDUsage_Game_GamepadTrigger = 0x39, /* Logical Collection */ + /* 0x3A - 0xFFFF Reserved */ + kHIDUsage_Game_Reserved = 0xFFFF +}; + +/* KeyboardOrKeypad Page (0x07) */ +/* This section is the Usage Page for key codes to be used in implementing a USB keyboard. A Boot Keyboard (84-, 101- or 104-key) should at a minimum support all associated usage codes as indicated in the ÒBootÓ */ +/* column below. */ +/* The usage type of all key codes is Selectors (Sel), except for the modifier keys Keyboard Left Control (0x224) to Keyboard Right GUI (0x231) which are Dynamic Flags (DV). */ +/* Note: A general note on Usages and languages: Due to the variation of keyboards from language to language, it is not feasible to specify exact key mappings for every language. Where this list is not specific for a key function in a language, the closest equivalent key position should be used, so that a keyboard may be modified for a different language by simply printing different keycaps. One example is the Y key on a North American keyboard. In Germany this is typically Z. Rather than changing the keyboard firmware to put the Z Usage into that place in the descriptor list, the vendor should use the Y Usage on both the North American and German keyboards. This continues to be the existing practice in the industry, in order to minimize the number of changes to the electronics to accommodate otherlanguages. */ +enum +{ + kHIDUsage_KeyboardErrorRollOver = 0x01, /* ErrorRollOver */ + kHIDUsage_KeyboardPOSTFail = 0x02, /* POSTFail */ + kHIDUsage_KeyboardErrorUndefined = 0x03, /* ErrorUndefined */ + kHIDUsage_KeyboardA = 0x04, /* a or A */ + kHIDUsage_KeyboardB = 0x05, /* b or B */ + kHIDUsage_KeyboardC = 0x06, /* c or C */ + kHIDUsage_KeyboardD = 0x07, /* d or D */ + kHIDUsage_KeyboardE = 0x08, /* e or E */ + kHIDUsage_KeyboardF = 0x09, /* f or F */ + kHIDUsage_KeyboardG = 0x0A, /* g or G */ + kHIDUsage_KeyboardH = 0x0B, /* h or H */ + kHIDUsage_KeyboardI = 0x0C, /* i or I */ + kHIDUsage_KeyboardJ = 0x0D, /* j or J */ + kHIDUsage_KeyboardK = 0x0E, /* k or K */ + kHIDUsage_KeyboardL = 0x0F, /* l or L */ + kHIDUsage_KeyboardM = 0x10, /* m or M */ + kHIDUsage_KeyboardN = 0x11, /* n or N */ + kHIDUsage_KeyboardO = 0x12, /* o or O */ + kHIDUsage_KeyboardP = 0x13, /* p or P */ + kHIDUsage_KeyboardQ = 0x14, /* q or Q */ + kHIDUsage_KeyboardR = 0x15, /* r or R */ + kHIDUsage_KeyboardS = 0x16, /* s or S */ + kHIDUsage_KeyboardT = 0x17, /* t or T */ + kHIDUsage_KeyboardU = 0x18, /* u or U */ + kHIDUsage_KeyboardV = 0x19, /* v or V */ + kHIDUsage_KeyboardW = 0x1A, /* w or W */ + kHIDUsage_KeyboardX = 0x1B, /* x or X */ + kHIDUsage_KeyboardY = 0x1C, /* y or Y */ + kHIDUsage_KeyboardZ = 0x1D, /* z or Z */ + kHIDUsage_Keyboard1 = 0x1E, /* 1 or ! */ + kHIDUsage_Keyboard2 = 0x1F, /* 2 or @ */ + kHIDUsage_Keyboard3 = 0x20, /* 3 or # */ + kHIDUsage_Keyboard4 = 0x21, /* 4 or $ */ + kHIDUsage_Keyboard5 = 0x22, /* 5 or % */ + kHIDUsage_Keyboard6 = 0x23, /* 6 or ^ */ + kHIDUsage_Keyboard7 = 0x24, /* 7 or & */ + kHIDUsage_Keyboard8 = 0x25, /* 8 or * */ + kHIDUsage_Keyboard9 = 0x26, /* 9 or ( */ + kHIDUsage_Keyboard0 = 0x27, /* 0 or ) */ + kHIDUsage_KeyboardReturnOrEnter = 0x28, /* Return (Enter) */ + kHIDUsage_KeyboardEscape = 0x29, /* Escape */ + kHIDUsage_KeyboardDeleteOrBackspace = 0x2A, /* Delete (Backspace) */ + kHIDUsage_KeyboardTab = 0x2B, /* Tab */ + kHIDUsage_KeyboardSpacebar = 0x2C, /* Spacebar */ + kHIDUsage_KeyboardHyphen = 0x2D, /* - or _ */ + kHIDUsage_KeyboardEqualSign = 0x2E, /* = or + */ + kHIDUsage_KeyboardOpenBracket = 0x2F, /* [ or { */ + kHIDUsage_KeyboardCloseBracket = 0x30, /* ] or } */ + kHIDUsage_KeyboardBackslash = 0x31, /* \ or | */ + kHIDUsage_KeyboardNonUSPound = 0x32, /* Non-US # or _ */ + kHIDUsage_KeyboardSemicolon = 0x33, /* ; or : */ + kHIDUsage_KeyboardQuote = 0x34, /* ' or " */ + kHIDUsage_KeyboardGraveAccentAndTilde = 0x35, /* Grave Accent and Tilde */ + kHIDUsage_KeyboardComma = 0x36, /* , or < */ + kHIDUsage_KeyboardPeriod = 0x37, /* . or > */ + kHIDUsage_KeyboardSlash = 0x38, /* / or ? */ + kHIDUsage_KeyboardCapsLock = 0x39, /* Caps Lock */ + kHIDUsage_KeyboardF1 = 0x3A, /* F1 */ + kHIDUsage_KeyboardF2 = 0x3B, /* F2 */ + kHIDUsage_KeyboardF3 = 0x3C, /* F3 */ + kHIDUsage_KeyboardF4 = 0x3D, /* F4 */ + kHIDUsage_KeyboardF5 = 0x3E, /* F5 */ + kHIDUsage_KeyboardF6 = 0x3F, /* F6 */ + kHIDUsage_KeyboardF7 = 0x40, /* F7 */ + kHIDUsage_KeyboardF8 = 0x41, /* F8 */ + kHIDUsage_KeyboardF9 = 0x42, /* F9 */ + kHIDUsage_KeyboardF10 = 0x43, /* F10 */ + kHIDUsage_KeyboardF11 = 0x44, /* F11 */ + kHIDUsage_KeyboardF12 = 0x45, /* F12 */ + kHIDUsage_KeyboardPrintScreen = 0x46, /* Print Screen */ + kHIDUsage_KeyboardScrollLock = 0x47, /* Scroll Lock */ + kHIDUsage_KeyboardPause = 0x48, /* Pause */ + kHIDUsage_KeyboardInsert = 0x49, /* Insert */ + kHIDUsage_KeyboardHome = 0x4A, /* Home */ + kHIDUsage_KeyboardPageUp = 0x4B, /* Page Up */ + kHIDUsage_KeyboardDeleteForward = 0x4C, /* Delete Forward */ + kHIDUsage_KeyboardEnd = 0x4D, /* End */ + kHIDUsage_KeyboardPageDown = 0x4E, /* Page Down */ + kHIDUsage_KeyboardRightArrow = 0x4F, /* Right Arrow */ + kHIDUsage_KeyboardLeftArrow = 0x50, /* Left Arrow */ + kHIDUsage_KeyboardDownArrow = 0x51, /* Down Arrow */ + kHIDUsage_KeyboardUpArrow = 0x52, /* Up Arrow */ + kHIDUsage_KeypadNumLock = 0x53, /* Keypad NumLock or Clear */ + kHIDUsage_KeypadSlash = 0x54, /* Keypad / */ + kHIDUsage_KeypadAsterisk = 0x55, /* Keypad * */ + kHIDUsage_KeypadHyphen = 0x56, /* Keypad - */ + kHIDUsage_KeypadPlus = 0x57, /* Keypad + */ + kHIDUsage_KeypadEnter = 0x58, /* Keypad Enter */ + kHIDUsage_Keypad1 = 0x59, /* Keypad 1 or End */ + kHIDUsage_Keypad2 = 0x5A, /* Keypad 2 or Down Arrow */ + kHIDUsage_Keypad3 = 0x5B, /* Keypad 3 or Page Down */ + kHIDUsage_Keypad4 = 0x5C, /* Keypad 4 or Left Arrow */ + kHIDUsage_Keypad5 = 0x5D, /* Keypad 5 */ + kHIDUsage_Keypad6 = 0x5E, /* Keypad 6 or Right Arrow */ + kHIDUsage_Keypad7 = 0x5F, /* Keypad 7 or Home */ + kHIDUsage_Keypad8 = 0x60, /* Keypad 8 or Up Arrow */ + kHIDUsage_Keypad9 = 0x61, /* Keypad 9 or Page Up */ + kHIDUsage_Keypad0 = 0x62, /* Keypad 0 or Insert */ + kHIDUsage_KeypadPeriod = 0x63, /* Keypad . or Delete */ + kHIDUsage_KeyboardNonUSBackslash = 0x64, /* Non-US \ or | */ + kHIDUsage_KeyboardApplication = 0x65, /* Application */ + kHIDUsage_KeyboardPower = 0x66, /* Power */ + kHIDUsage_KeypadEqualSign = 0x67, /* Keypad = */ + kHIDUsage_KeyboardF13 = 0x68, /* F13 */ + kHIDUsage_KeyboardF14 = 0x69, /* F14 */ + kHIDUsage_KeyboardF15 = 0x6A, /* F15 */ + kHIDUsage_KeyboardF16 = 0x6B, /* F16 */ + kHIDUsage_KeyboardF17 = 0x6C, /* F17 */ + kHIDUsage_KeyboardF18 = 0x6D, /* F18 */ + kHIDUsage_KeyboardF19 = 0x6E, /* F19 */ + kHIDUsage_KeyboardF20 = 0x6F, /* F20 */ + kHIDUsage_KeyboardF21 = 0x70, /* F21 */ + kHIDUsage_KeyboardF22 = 0x71, /* F22 */ + kHIDUsage_KeyboardF23 = 0x72, /* F23 */ + kHIDUsage_KeyboardF24 = 0x73, /* F24 */ + kHIDUsage_KeyboardExecute = 0x74, /* Execute */ + kHIDUsage_KeyboardHelp = 0x75, /* Help */ + kHIDUsage_KeyboardMenu = 0x76, /* Menu */ + kHIDUsage_KeyboardSelect = 0x77, /* Select */ + kHIDUsage_KeyboardStop = 0x78, /* Stop */ + kHIDUsage_KeyboardAgain = 0x79, /* Again */ + kHIDUsage_KeyboardUndo = 0x7A, /* Undo */ + kHIDUsage_KeyboardCut = 0x7B, /* Cut */ + kHIDUsage_KeyboardCopy = 0x7C, /* Copy */ + kHIDUsage_KeyboardPaste = 0x7D, /* Paste */ + kHIDUsage_KeyboardFind = 0x7E, /* Find */ + kHIDUsage_KeyboardMute = 0x7F, /* Mute */ + kHIDUsage_KeyboardVolumeUp = 0x80, /* Volume Up */ + kHIDUsage_KeyboardVolumeDown = 0x81, /* Volume Down */ + kHIDUsage_KeyboardLockingCapsLock = 0x82, /* Locking Caps Lock */ + kHIDUsage_KeyboardLockingNumLock = 0x83, /* Locking Num Lock */ + kHIDUsage_KeyboardLockingScrollLock = 0x84, /* Locking Scroll Lock */ + kHIDUsage_KeypadComma = 0x85, /* Keypad Comma */ + kHIDUsage_KeypadEqualSignAS400 = 0x86, /* Keypad Equal Sign for AS/400 */ + kHIDUsage_KeyboardInternational1 = 0x87, /* International1 */ + kHIDUsage_KeyboardInternational2 = 0x88, /* International2 */ + kHIDUsage_KeyboardInternational3 = 0x89, /* International3 */ + kHIDUsage_KeyboardInternational4 = 0x8A, /* International4 */ + kHIDUsage_KeyboardInternational5 = 0x8B, /* International5 */ + kHIDUsage_KeyboardInternational6 = 0x8C, /* International6 */ + kHIDUsage_KeyboardInternational7 = 0x8D, /* International7 */ + kHIDUsage_KeyboardInternational8 = 0x8E, /* International8 */ + kHIDUsage_KeyboardInternational9 = 0x8F, /* International9 */ + kHIDUsage_KeyboardLANG1 = 0x90, /* LANG1 */ + kHIDUsage_KeyboardLANG2 = 0x91, /* LANG2 */ + kHIDUsage_KeyboardLANG3 = 0x92, /* LANG3 */ + kHIDUsage_KeyboardLANG4 = 0x93, /* LANG4 */ + kHIDUsage_KeyboardLANG5 = 0x94, /* LANG5 */ + kHIDUsage_KeyboardLANG6 = 0x95, /* LANG6 */ + kHIDUsage_KeyboardLANG7 = 0x96, /* LANG7 */ + kHIDUsage_KeyboardLANG8 = 0x97, /* LANG8 */ + kHIDUsage_KeyboardLANG9 = 0x98, /* LANG9 */ + kHIDUsage_KeyboardAlternateErase = 0x99, /* AlternateErase */ + kHIDUsage_KeyboardSysReqOrAttention = 0x9A, /* SysReq/Attention */ + kHIDUsage_KeyboardCancel = 0x9B, /* Cancel */ + kHIDUsage_KeyboardClear = 0x9C, /* Clear */ + kHIDUsage_KeyboardPrior = 0x9D, /* Prior */ + kHIDUsage_KeyboardReturn = 0x9E, /* Return */ + kHIDUsage_KeyboardSeparator = 0x9F, /* Separator */ + kHIDUsage_KeyboardOut = 0xA0, /* Out */ + kHIDUsage_KeyboardOper = 0xA1, /* Oper */ + kHIDUsage_KeyboardClearOrAgain = 0xA2, /* Clear/Again */ + kHIDUsage_KeyboardCrSelOrProps = 0xA3, /* CrSel/Props */ + kHIDUsage_KeyboardExSel = 0xA4, /* ExSel */ + /* 0xA5-0xDF Reserved */ + kHIDUsage_KeyboardLeftControl = 0xE0, /* Left Control */ + kHIDUsage_KeyboardLeftShift = 0xE1, /* Left Shift */ + kHIDUsage_KeyboardLeftAlt = 0xE2, /* Left Alt */ + kHIDUsage_KeyboardLeftGUI = 0xE3, /* Left GUI */ + kHIDUsage_KeyboardRightControl = 0xE4, /* Right Control */ + kHIDUsage_KeyboardRightShift = 0xE5, /* Right Shift */ + kHIDUsage_KeyboardRightAlt = 0xE6, /* Right Alt */ + kHIDUsage_KeyboardRightGUI = 0xE7, /* Right GUI */ + /* 0xE8-0xFFFF Reserved */ + kHIDUsage_Keyboard_Reserved = 0xFFFF +}; + +/* LEDs Page (0x08) */ +/* An LED or indicator is implemented as an On/Off Control (OOF) using the ÒSingle button toggleÓ mode, where a value of 1 will turn on the indicator, and a value of 0 will turn it off. The exceptions are described below. */ +enum +{ + kHIDUsage_LED_NumLock = 0x01, /* On/Off Control */ + kHIDUsage_LED_CapsLock = 0x02, /* On/Off Control */ + kHIDUsage_LED_ScrollLock = 0x03, /* On/Off Control */ + kHIDUsage_LED_Compose = 0x04, /* On/Off Control */ + kHIDUsage_LED_Kana = 0x05, /* On/Off Control */ + kHIDUsage_LED_Power = 0x06, /* On/Off Control */ + kHIDUsage_LED_Shift = 0x07, /* On/Off Control */ + kHIDUsage_LED_DoNotDisturb = 0x08, /* On/Off Control */ + kHIDUsage_LED_Mute = 0x09, /* On/Off Control */ + kHIDUsage_LED_ToneEnable = 0x0A, /* On/Off Control */ + kHIDUsage_LED_HighCutFilter = 0x0B, /* On/Off Control */ + kHIDUsage_LED_LowCutFilter = 0x0C, /* On/Off Control */ + kHIDUsage_LED_EqualizerEnable = 0x0D, /* On/Off Control */ + kHIDUsage_LED_SoundFieldOn = 0x0E, /* On/Off Control */ + kHIDUsage_LED_SurroundOn = 0x0F, /* On/Off Control */ + kHIDUsage_LED_Repeat = 0x10, /* On/Off Control */ + kHIDUsage_LED_Stereo = 0x11, /* On/Off Control */ + kHIDUsage_LED_SamplingRateDetect = 0x12, /* On/Off Control */ + kHIDUsage_LED_Spinning = 0x13, /* On/Off Control */ + kHIDUsage_LED_CAV = 0x14, /* On/Off Control */ + kHIDUsage_LED_CLV = 0x15, /* On/Off Control */ + kHIDUsage_LED_RecordingFormatDetect = 0x16, /* On/Off Control */ + kHIDUsage_LED_OffHook = 0x17, /* On/Off Control */ + kHIDUsage_LED_Ring = 0x18, /* On/Off Control */ + kHIDUsage_LED_MessageWaiting = 0x19, /* On/Off Control */ + kHIDUsage_LED_DataMode = 0x1A, /* On/Off Control */ + kHIDUsage_LED_BatteryOperation = 0x1B, /* On/Off Control */ + kHIDUsage_LED_BatteryOK = 0x1C, /* On/Off Control */ + kHIDUsage_LED_BatteryLow = 0x1D, /* On/Off Control */ + kHIDUsage_LED_Speaker = 0x1E, /* On/Off Control */ + kHIDUsage_LED_HeadSet = 0x1F, /* On/Off Control */ + kHIDUsage_LED_Hold = 0x20, /* On/Off Control */ + kHIDUsage_LED_Microphone = 0x21, /* On/Off Control */ + kHIDUsage_LED_Coverage = 0x22, /* On/Off Control */ + kHIDUsage_LED_NightMode = 0x23, /* On/Off Control */ + kHIDUsage_LED_SendCalls = 0x24, /* On/Off Control */ + kHIDUsage_LED_CallPickup = 0x25, /* On/Off Control */ + kHIDUsage_LED_Conference = 0x26, /* On/Off Control */ + kHIDUsage_LED_StandBy = 0x27, /* On/Off Control */ + kHIDUsage_LED_CameraOn = 0x28, /* On/Off Control */ + kHIDUsage_LED_CameraOff = 0x29, /* On/Off Control */ + kHIDUsage_LED_OnLine = 0x2A, /* On/Off Control */ + kHIDUsage_LED_OffLine = 0x2B, /* On/Off Control */ + kHIDUsage_LED_Busy = 0x2C, /* On/Off Control */ + kHIDUsage_LED_Ready = 0x2D, /* On/Off Control */ + kHIDUsage_LED_PaperOut = 0x2E, /* On/Off Control */ + kHIDUsage_LED_PaperJam = 0x2F, /* On/Off Control */ + kHIDUsage_LED_Remote = 0x30, /* On/Off Control */ + kHIDUsage_LED_Forward = 0x31, /* On/Off Control */ + kHIDUsage_LED_Reverse = 0x32, /* On/Off Control */ + kHIDUsage_LED_Stop = 0x33, /* On/Off Control */ + kHIDUsage_LED_Rewind = 0x34, /* On/Off Control */ + kHIDUsage_LED_FastForward = 0x35, /* On/Off Control */ + kHIDUsage_LED_Play = 0x36, /* On/Off Control */ + kHIDUsage_LED_Pause = 0x37, /* On/Off Control */ + kHIDUsage_LED_Record = 0x38, /* On/Off Control */ + kHIDUsage_LED_Error = 0x39, /* On/Off Control */ + kHIDUsage_LED_Usage = 0x3A, /* Selector */ + kHIDUsage_LED_UsageInUseIndicator = 0x3B, /* Usage Switch */ + kHIDUsage_LED_UsageMultiModeIndicator = 0x3C, /* Usage Modifier */ + kHIDUsage_LED_IndicatorOn = 0x3D, /* Selector */ + kHIDUsage_LED_IndicatorFlash = 0x3E, /* Selector */ + kHIDUsage_LED_IndicatorSlowBlink = 0x3F, /* Selector */ + kHIDUsage_LED_IndicatorFastBlink = 0x40, /* Selector */ + kHIDUsage_LED_IndicatorOff = 0x41, /* Selector */ + kHIDUsage_LED_FlashOnTime = 0x42, /* Dynamic Value */ + kHIDUsage_LED_SlowBlinkOnTime = 0x43, /* Dynamic Value */ + kHIDUsage_LED_SlowBlinkOffTime = 0x44, /* Dynamic Value */ + kHIDUsage_LED_FastBlinkOnTime = 0x45, /* Dynamic Value */ + kHIDUsage_LED_FastBlinkOffTime = 0x46, /* Dynamic Value */ + kHIDUsage_LED_UsageIndicatorColor = 0x47, /* Usage Modifier */ + kHIDUsage_LED_IndicatorRed = 0x48, /* Selector */ + kHIDUsage_LED_IndicatorGreen = 0x49, /* Selector */ + kHIDUsage_LED_IndicatorAmber = 0x4A, /* Selector */ + kHIDUsage_LED_GenericIndicator = 0x4B, /* On/Off Control */ + kHIDUsage_LED_SystemSuspend = 0x4C, /* On/Off Control */ + kHIDUsage_LED_ExternalPowerConnected = 0x4D, /* On/Off Control */ + /* 0x4E - 0xFFFF Reserved */ + kHIDUsage_LED_Reserved = 0xFFFF +}; + +/* Button Page (0x09) */ +/* The Button page is the first place an application should look for user selection controls. System graphical user interfaces typically employ a pointer and a set of hierarchical selectors to select, move and otherwise manipulate their environment. For these purposes the following assignment of significance can be applied to the Button usages: */ +/* ¥ Button 1, Primary Button. Used for object selecting, dragging, and double click activation. On MacOS, this is the only button. Microsoft operating systems call this a logical left button, because it */ +/* is not necessarily physically located on the left of the pointing device. */ +/* ¥ Button 2, Secondary Button. Used by newer graphical user interfaces to browse object properties. Exposed by systems to applications that typically assign application-specific functionality. */ +/* ¥ Button 3, Tertiary Button. Optional control. Exposed to applications, but seldom assigned functionality due to prevalence of two- and one-button devices. */ +/* ¥ Buttons 4 -55. As the button number increases, its significance as a selector decreases. */ +/* In many ways the assignment of button numbers is similar to the assignment of Effort in Physical descriptors. Button 1 would be used to define the button a finger rests on when the hand is in the Òat restÓ position, that is, virtually no effort is required by the user to activate the button. Button values increment as the finger has to stretch to reach a control. See Section 6.2.3, ÒPhysical Descriptors,Ó in the HID Specification for methods of further qualifying buttons. */ +enum +{ + kHIDUsage_Button_1 = 0x01, /* (primary/trigger) */ + kHIDUsage_Button_2 = 0x02, /* (secondary) */ + kHIDUsage_Button_3 = 0x03, /* (tertiary) */ + kHIDUsage_Button_4 = 0x04, /* 4th button */ + /* ... */ + kHIDUsage_Button_65535 = 0xFFFF +}; + +/* Ordinal Page (0x0A) */ +/* The Ordinal page allows multiple instances of a control or sets of controls to be declared without requiring individual enumeration in the native usage page. For example, it is not necessary to declare usages of Pointer 1, Pointer 2, and so forth on the Generic Desktop page. When parsed, the ordinal instance number is, in essence, concatenated to the usages attached to the encompassing collection to create Pointer 1, Pointer 2, and so forth. */ +/* For an example, see Section A.5, ÒMultiple Instances of a Control,Ó in Appendix A, ÒUsage Examples.Ó By convention, an Ordinal collection is placed inside the collection for which it is declaring multiple instances. */ +/* Instances do not have to be identical. */ +enum +{ + /* 0x00 Reserved */ + kHIDUsage_Ord_Instance1 = 0x01, /* Usage Modifier */ + kHIDUsage_Ord_Instance2 = 0x02, /* Usage Modifier */ + kHIDUsage_Ord_Instance3 = 0x03, /* Usage Modifier */ + kHIDUsage_Ord_Instance4 = 0x04, /* Usage Modifier */ + kHIDUsage_Ord_Instance65535 = 0xFFFF /* Usage Modifier */ +}; + +/* Telephony Page (0x0B) */ +/* This usage page defines the keytop and control usages for telephony devices. */ +/* Indicators on a phone are handled by wrapping them in LED: Usage In Use Indicator and LED: Usage Selected Indicator usages. For example, a message-indicator LED would be identified by a Telephony: Message usage declared as a Feature or Output in a LED: Usage In Use Indicator collection. */ +/* See Section 14, ÒConsumer Page (0x0C),Ó for audio volume and tone controls. */ +enum +{ + kHIDUsage_Tfon_Phone = 0x01, /* Application Collection */ + kHIDUsage_Tfon_AnsweringMachine = 0x02, /* Application Collection */ + kHIDUsage_Tfon_MessageControls = 0x03, /* Logical Collection */ + kHIDUsage_Tfon_Handset = 0x04, /* Logical Collection */ + kHIDUsage_Tfon_Headset = 0x05, /* Logical Collection */ + kHIDUsage_Tfon_TelephonyKeyPad = 0x06, /* Named Array */ + kHIDUsage_Tfon_ProgrammableButton = 0x07, /* Named Array */ + /* 0x08 - 0x1F Reserved */ + kHIDUsage_Tfon_HookSwitch = 0x20, /* On/Off Control */ + kHIDUsage_Tfon_Flash = 0x21, /* Momentary Control */ + kHIDUsage_Tfon_Feature = 0x22, /* One-Shot Control */ + kHIDUsage_Tfon_Hold = 0x23, /* On/Off Control */ + kHIDUsage_Tfon_Redial = 0x24, /* One-Shot Control */ + kHIDUsage_Tfon_Transfer = 0x25, /* One-Shot Control */ + kHIDUsage_Tfon_Drop = 0x26, /* One-Shot Control */ + kHIDUsage_Tfon_Park = 0x27, /* On/Off Control */ + kHIDUsage_Tfon_ForwardCalls = 0x28, /* On/Off Control */ + kHIDUsage_Tfon_AlternateFunction = 0x29, /* Momentary Control */ + kHIDUsage_Tfon_Line = 0x2A, /* One-Shot Control */ + kHIDUsage_Tfon_SpeakerPhone = 0x2B, /* On/Off Control */ + kHIDUsage_Tfon_Conference = 0x2C, /* On/Off Control */ + kHIDUsage_Tfon_RingEnable = 0x2D, /* On/Off Control */ + kHIDUsage_Tfon_Ring = 0x2E, /* Selector */ + kHIDUsage_Tfon_PhoneMute = 0x2F, /* On/Off Control */ + kHIDUsage_Tfon_CallerID = 0x30, /* Momentary Control */ + /* 0x31 - 0x4F Reserved */ + kHIDUsage_Tfon_SpeedDial = 0x50, /* One-Shot Control */ + kHIDUsage_Tfon_StoreNumber = 0x51, /* One-Shot Control */ + kHIDUsage_Tfon_RecallNumber = 0x52, /* One-Shot Control */ + kHIDUsage_Tfon_PhoneDirectory = 0x53, /* On/Off Control */ + /* 0x54 - 0x6F Reserved */ + kHIDUsage_Tfon_VoiceMail = 0x70, /* On/Off Control */ + kHIDUsage_Tfon_ScreenCalls = 0x71, /* On/Off Control */ + kHIDUsage_Tfon_DoNotDisturb = 0x72, /* On/Off Control */ + kHIDUsage_Tfon_Message = 0x73, /* One-Shot Control */ + kHIDUsage_Tfon_AnswerOnOrOff = 0x74, /* On/Off Control */ + /* 0x75 - 0x8F Reserved */ + kHIDUsage_Tfon_InsideDialTone = 0x90, /* Momentary Control */ + kHIDUsage_Tfon_OutsideDialTone = 0x91, /* Momentary Control */ + kHIDUsage_Tfon_InsideRingTone = 0x92, /* Momentary Control */ + kHIDUsage_Tfon_OutsideRingTone = 0x93, /* Momentary Control */ + kHIDUsage_Tfon_PriorityRingTone = 0x94, /* Momentary Control */ + kHIDUsage_Tfon_InsideRingback = 0x95, /* Momentary Control */ + kHIDUsage_Tfon_PriorityRingback = 0x96, /* Momentary Control */ + kHIDUsage_Tfon_LineBusyTone = 0x97, /* Momentary Control */ + kHIDUsage_Tfon_ReorderTone = 0x98, /* Momentary Control */ + kHIDUsage_Tfon_CallWaitingTone = 0x99, /* Momentary Control */ + kHIDUsage_Tfon_ConfirmationTone1 = 0x9A, /* Momentary Control */ + kHIDUsage_Tfon_ConfirmationTone2 = 0x9B, /* Momentary Control */ + kHIDUsage_Tfon_TonesOff = 0x9C, /* On/Off Control */ + kHIDUsage_Tfon_OutsideRingback = 0x9D, /* Momentary Control */ + /* 0x9E - 0xAF Reserved */ + kHIDUsage_Tfon_PhoneKey0 = 0xB0, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey1 = 0xB1, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey2 = 0xB2, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey3 = 0xB3, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey4 = 0xB4, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey5 = 0xB5, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey6 = 0xB6, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey7 = 0xB7, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey8 = 0xB8, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey9 = 0xB9, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKeyStar = 0xBA, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKeyPound = 0xBB, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKeyA = 0xBC, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKeyB = 0xBD, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKeyC = 0xBE, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKeyD = 0xBF, /* Selector/One-Shot Control */ + /* 0xC0 - 0xFFFF Reserved */ + kHIDUsage_TFon_Reserved = 0xFFFF +}; + +/* Consumer Page (0x0C) */ +/* All controls on the Consumer page are application-specific. That is, they affect a specific device, not the system as a whole. */ +enum +{ + kHIDUsage_Csmr_ConsumerControl = 0x01, /* Application Collection */ + kHIDUsage_Csmr_NumericKeyPad = 0x02, /* Named Array */ + kHIDUsage_Csmr_ProgrammableButtons = 0x03, /* Named Array */ + /* 0x03 - 0x1F Reserved */ + kHIDUsage_Csmr_Plus10 = 0x20, /* One-Shot Control */ + kHIDUsage_Csmr_Plus100 = 0x21, /* One-Shot Control */ + kHIDUsage_Csmr_AMOrPM = 0x22, /* One-Shot Control */ + /* 0x23 - 0x3F Reserved */ + kHIDUsage_Csmr_Power = 0x30, /* On/Off Control */ + kHIDUsage_Csmr_Reset = 0x31, /* One-Shot Control */ + kHIDUsage_Csmr_Sleep = 0x32, /* One-Shot Control */ + kHIDUsage_Csmr_SleepAfter = 0x33, /* One-Shot Control */ + kHIDUsage_Csmr_SleepMode = 0x34, /* Re-Trigger Control */ + kHIDUsage_Csmr_Illumination = 0x35, /* On/Off Control */ + kHIDUsage_Csmr_FunctionButtons = 0x36, /* Named Array */ + /* 0x37 - 0x3F Reserved */ + kHIDUsage_Csmr_Menu = 0x40, /* On/Off Control */ + kHIDUsage_Csmr_MenuPick = 0x41, /* One-Shot Control */ + kHIDUsage_Csmr_MenuUp = 0x42, /* One-Shot Control */ + kHIDUsage_Csmr_MenuDown = 0x43, /* One-Shot Control */ + kHIDUsage_Csmr_MenuLeft = 0x44, /* One-Shot Control */ + kHIDUsage_Csmr_MenuRight = 0x45, /* One-Shot Control */ + kHIDUsage_Csmr_MenuEscape = 0x46, /* One-Shot Control */ + kHIDUsage_Csmr_MenuValueIncrease = 0x47, /* One-Shot Control */ + kHIDUsage_Csmr_MenuValueDecrease = 0x48, /* One-Shot Control */ + /* 0x49 - 0x5F Reserved */ + kHIDUsage_Csmr_DataOnScreen = 0x60, /* On/Off Control */ + kHIDUsage_Csmr_ClosedCaption = 0x61, /* On/Off Control */ + kHIDUsage_Csmr_ClosedCaptionSelect = 0x62, /* Selector */ + kHIDUsage_Csmr_VCROrTV = 0x63, /* On/Off Control */ + kHIDUsage_Csmr_BroadcastMode = 0x64, /* One-Shot Control */ + kHIDUsage_Csmr_Snapshot = 0x65, /* One-Shot Control */ + kHIDUsage_Csmr_Still = 0x66, /* One-Shot Control */ + /* 0x67 - 0x7F Reserved */ + kHIDUsage_Csmr_Selection = 0x80, /* Named Array */ + kHIDUsage_Csmr_Assign = 0x81, /* Selector */ + kHIDUsage_Csmr_ModeStep = 0x82, /* One-Shot Control */ + kHIDUsage_Csmr_RecallLast = 0x83, /* One-Shot Control */ + kHIDUsage_Csmr_EnterChannel = 0x84, /* One-Shot Control */ + kHIDUsage_Csmr_OrderMovie = 0x85, /* One-Shot Control */ + kHIDUsage_Csmr_Channel = 0x86, /* Linear Control */ + kHIDUsage_Csmr_MediaSelection = 0x87, /* Selector */ + kHIDUsage_Csmr_MediaSelectComputer = 0x88, /* Selector */ + kHIDUsage_Csmr_MediaSelectTV = 0x89, /* Selector */ + kHIDUsage_Csmr_MediaSelectWWW = 0x8A, /* Selector */ + kHIDUsage_Csmr_MediaSelectDVD = 0x8B, /* Selector */ + kHIDUsage_Csmr_MediaSelectTelephone = 0x8C, /* Selector */ + kHIDUsage_Csmr_MediaSelectProgramGuide = 0x8D, /* Selector */ + kHIDUsage_Csmr_MediaSelectVideoPhone = 0x8E, /* Selector */ + kHIDUsage_Csmr_MediaSelectGames = 0x8F, /* Selector */ + kHIDUsage_Csmr_MediaSelectMessages = 0x90, /* Selector */ + kHIDUsage_Csmr_MediaSelectCD = 0x91, /* Selector */ + kHIDUsage_Csmr_MediaSelectVCR = 0x92, /* Selector */ + kHIDUsage_Csmr_MediaSelectTuner = 0x93, /* Selector */ + kHIDUsage_Csmr_Quit = 0x94, /* One-Shot Control */ + kHIDUsage_Csmr_Help = 0x95, /* On/Off Control */ + kHIDUsage_Csmr_MediaSelectTape = 0x96, /* Selector */ + kHIDUsage_Csmr_MediaSelectCable = 0x97, /* Selector */ + kHIDUsage_Csmr_MediaSelectSatellite = 0x98, /* Selector */ + kHIDUsage_Csmr_MediaSelectSecurity = 0x99, /* Selector */ + kHIDUsage_Csmr_MediaSelectHome = 0x9A, /* Selector */ + kHIDUsage_Csmr_MediaSelectCall = 0x9B, /* Selector */ + kHIDUsage_Csmr_ChannelIncrement = 0x9C, /* One-Shot Control */ + kHIDUsage_Csmr_ChannelDecrement = 0x9D, /* One-Shot Control */ + kHIDUsage_Csmr_Media = 0x9E, /* Selector */ + /* 0x9F Reserved */ + kHIDUsage_Csmr_VCRPlus = 0xA0, /* One-Shot Control */ + kHIDUsage_Csmr_Once = 0xA1, /* One-Shot Control */ + kHIDUsage_Csmr_Daily = 0xA2, /* One-Shot Control */ + kHIDUsage_Csmr_Weekly = 0xA3, /* One-Shot Control */ + kHIDUsage_Csmr_Monthly = 0xA4, /* One-Shot Control */ + /* 0xA5 - 0xAF Reserved */ + kHIDUsage_Csmr_Play = 0xB0, /* On/Off Control */ + kHIDUsage_Csmr_Pause = 0xB1, /* On/Off Control */ + kHIDUsage_Csmr_Record = 0xB2, /* On/Off Control */ + kHIDUsage_Csmr_FastForward = 0xB3, /* On/Off Control */ + kHIDUsage_Csmr_Rewind = 0xB4, /* On/Off Control */ + kHIDUsage_Csmr_ScanNextTrack = 0xB5, /* One-Shot Control */ + kHIDUsage_Csmr_ScanPreviousTrack = 0xB6, /* One-Shot Control */ + kHIDUsage_Csmr_Stop = 0xB7, /* One-Shot Control */ + kHIDUsage_Csmr_Eject = 0xB8, /* One-Shot Control */ + kHIDUsage_Csmr_RandomPlay = 0xB9, /* On/Off Control */ + kHIDUsage_Csmr_SelectDisc = 0xBA, /* Named Array */ + kHIDUsage_Csmr_EnterDisc = 0xBB, /* Momentary Control */ + kHIDUsage_Csmr_Repeat = 0xBC, /* One-Shot Control */ + kHIDUsage_Csmr_Tracking = 0xBD, /* Linear Control */ + kHIDUsage_Csmr_TrackNormal = 0xBE, /* One-Shot Control */ + kHIDUsage_Csmr_SlowTracking = 0xBF, /* Linear Control */ + kHIDUsage_Csmr_FrameForward = 0xC0, /* Re-Trigger Control */ + kHIDUsage_Csmr_FrameBack = 0xC1, /* Re-Trigger Control */ + kHIDUsage_Csmr_Mark = 0xC2, /* One-Shot Control */ + kHIDUsage_Csmr_ClearMark = 0xC3, /* One-Shot Control */ + kHIDUsage_Csmr_RepeatFromMark = 0xC4, /* On/Off Control */ + kHIDUsage_Csmr_ReturnToMark = 0xC5, /* One-Shot Control */ + kHIDUsage_Csmr_SearchMarkForward = 0xC6, /* One-Shot Control */ + kHIDUsage_Csmr_SearchMarkBackwards = 0xC7, /* One-Shot Control */ + kHIDUsage_Csmr_CounterReset = 0xC8, /* One-Shot Control */ + kHIDUsage_Csmr_ShowCounter = 0xC9, /* One-Shot Control */ + kHIDUsage_Csmr_TrackingIncrement = 0xCA, /* Re-Trigger Control */ + kHIDUsage_Csmr_TrackingDecrement = 0xCB, /* Re-Trigger Control */ + kHIDUsage_Csmr_StopOrEject = 0xCC, /* One-Shot Control */ + kHIDUsage_Csmr_PlayOrPause = 0xCD, /* One-Shot Control */ + kHIDUsage_Csmr_PlayOrSkip = 0xCE, /* One-Shot Control */ + /* 0xCF - 0xDF Reserved */ + kHIDUsage_Csmr_Volume = 0xE0, /* Linear Control */ + kHIDUsage_Csmr_Balance = 0xE1, /* Linear Control */ + kHIDUsage_Csmr_Mute = 0xE2, /* On/Off Control */ + kHIDUsage_Csmr_Bass = 0xE3, /* Linear Control */ + kHIDUsage_Csmr_Treble = 0xE4, /* Linear Control */ + kHIDUsage_Csmr_BassBoost = 0xE5, /* On/Off Control */ + kHIDUsage_Csmr_SurroundMode = 0xE6, /* One-Shot Control */ + kHIDUsage_Csmr_Loudness = 0xE7, /* On/Off Control */ + kHIDUsage_Csmr_MPX = 0xE8, /* On/Off Control */ + kHIDUsage_Csmr_VolumeIncrement = 0xE9, /* Re-Trigger Control */ + kHIDUsage_Csmr_VolumeDecrement = 0xEA, /* Re-Trigger Control */ + /* 0xEB - 0xEF Reserved */ + kHIDUsage_Csmr_Speed = 0xF0, /* Selector */ + kHIDUsage_Csmr_PlaybackSpeed = 0xF1, /* Named Array */ + kHIDUsage_Csmr_StandardPlay = 0xF2, /* Selector */ + kHIDUsage_Csmr_LongPlay = 0xF3, /* Selector */ + kHIDUsage_Csmr_ExtendedPlay = 0xF4, /* Selector */ + kHIDUsage_Csmr_Slow = 0xF5, /* One-Shot Control */ + /* 0xF6 - 0xFF Reserved */ + kHIDUsage_Csmr_FanEnable = 0x100, /* On/Off Control */ + kHIDUsage_Csmr_FanSpeed = 0x101, /* Linear Control */ + kHIDUsage_Csmr_LightEnable = 0x102, /* On/Off Control */ + kHIDUsage_Csmr_LightIlluminationLevel = 0x103, /* Linear Control */ + kHIDUsage_Csmr_ClimateControlEnable = 0x104, /* On/Off Control */ + kHIDUsage_Csmr_RoomTemperature = 0x105, /* Linear Control */ + kHIDUsage_Csmr_SecurityEnable = 0x106, /* On/Off Control */ + kHIDUsage_Csmr_FireAlarm = 0x107, /* One-Shot Control */ + kHIDUsage_Csmr_PoliceAlarm = 0x108, /* One-Shot Control */ + /* 0x109 - 0x14F Reserved */ + kHIDUsage_Csmr_BalanceRight = 0x150, /* Re-Trigger Control */ + kHIDUsage_Csmr_BalanceLeft = 0x151, /* Re-Trigger Control */ + kHIDUsage_Csmr_BassIncrement = 0x152, /* Re-Trigger Control */ + kHIDUsage_Csmr_BassDecrement = 0x153, /* Re-Trigger Control */ + kHIDUsage_Csmr_TrebleIncrement = 0x154, /* Re-Trigger Control */ + kHIDUsage_Csmr_TrebleDecrement = 0x155, /* Re-Trigger Control */ + /* 0x156 - 0x15F Reserved */ + kHIDUsage_Csmr_SpeakerSystem = 0x160, /* Logical Collection */ + kHIDUsage_Csmr_ChannelLeft = 0x161, /* Logical Collection */ + kHIDUsage_Csmr_ChannelRight = 0x162, /* Logical Collection */ + kHIDUsage_Csmr_ChannelCenter = 0x163, /* Logical Collection */ + kHIDUsage_Csmr_ChannelFront = 0x164, /* Logical Collection */ + kHIDUsage_Csmr_ChannelCenterFront = 0x165, /* Logical Collection */ + kHIDUsage_Csmr_ChannelSide = 0x166, /* Logical Collection */ + kHIDUsage_Csmr_ChannelSurround = 0x167, /* Logical Collection */ + kHIDUsage_Csmr_ChannelLowFrequencyEnhancement = 0x168, /* Logical Collection */ + kHIDUsage_Csmr_ChannelTop = 0x169, /* Logical Collection */ + kHIDUsage_Csmr_ChannelUnknown = 0x16A, /* Logical Collection */ + /* 0x16B - 0x16F Reserved */ + kHIDUsage_Csmr_SubChannel = 0x170, /* Linear Control */ + kHIDUsage_Csmr_SubChannelIncrement = 0x171, /* One-Shot Control */ + kHIDUsage_Csmr_SubChannelDecrement = 0x172, /* One-Shot Control */ + kHIDUsage_Csmr_AlternateAudioIncrement = 0x173, /* One-Shot Control */ + kHIDUsage_Csmr_AlternateAudioDecrement = 0x174, /* One-Shot Control */ + /* 0x175 - 0x17F Reserved */ + kHIDUsage_Csmr_ApplicationLaunchButtons = 0x180, /* Named Array */ + kHIDUsage_Csmr_ALLaunchButtonConfigurationTool = 0x181, /* Selector */ + kHIDUsage_Csmr_ALProgrammableButtonConfiguration = 0x182, /* Selector */ + kHIDUsage_Csmr_ALConsumerControlConfiguration = 0x183, /* Selector */ + kHIDUsage_Csmr_ALWordProcessor = 0x184, /* Selector */ + kHIDUsage_Csmr_ALTextEditor = 0x185, /* Selector */ + kHIDUsage_Csmr_ALSpreadsheet = 0x186, /* Selector */ + kHIDUsage_Csmr_ALGraphicsEditor = 0x187, /* Selector */ + kHIDUsage_Csmr_ALPresentationApp = 0x188, /* Selector */ + kHIDUsage_Csmr_ALDatabaseApp = 0x189, /* Selector */ + kHIDUsage_Csmr_ALEmailReader = 0x18A, /* Selector */ + kHIDUsage_Csmr_ALNewsreader = 0x18B, /* Selector */ + kHIDUsage_Csmr_ALVoicemail = 0x18C, /* Selector */ + kHIDUsage_Csmr_ALContactsOrAddressBook = 0x18D, /* Selector */ + kHIDUsage_Csmr_ALCalendarOrSchedule = 0x18E, /* Selector */ + kHIDUsage_Csmr_ALTaskOrProjectManager = 0x18F, /* Selector */ + kHIDUsage_Csmr_ALLogOrJournalOrTimecard = 0x190, /* Selector */ + kHIDUsage_Csmr_ALCheckbookOrFinance = 0x191, /* Selector */ + kHIDUsage_Csmr_ALCalculator = 0x192, /* Selector */ + kHIDUsage_Csmr_ALAOrVCaptureOrPlayback = 0x193, /* Selector */ + kHIDUsage_Csmr_ALLocalMachineBrowser = 0x194, /* Selector */ + kHIDUsage_Csmr_ALLANOrWANBrowser = 0x195, /* Selector */ + kHIDUsage_Csmr_ALInternetBrowser = 0x196, /* Selector */ + kHIDUsage_Csmr_ALRemoteNetworkingOrISPConnect = 0x197, /* Selector */ + kHIDUsage_Csmr_ALNetworkConference = 0x198, /* Selector */ + kHIDUsage_Csmr_ALNetworkChat = 0x199, /* Selector */ + kHIDUsage_Csmr_ALTelephonyOrDialer = 0x19A, /* Selector */ + kHIDUsage_Csmr_ALLogon = 0x19B, /* Selector */ + kHIDUsage_Csmr_ALLogoff = 0x19C, /* Selector */ + kHIDUsage_Csmr_ALLogonOrLogoff = 0x19D, /* Selector */ + kHIDUsage_Csmr_ALTerminalLockOrScreensaver = 0x19E, /* Selector */ + kHIDUsage_Csmr_ALControlPanel = 0x19F, /* Selector */ + kHIDUsage_Csmr_ALCommandLineProcessorOrRun = 0x1A0, /* Selector */ + kHIDUsage_Csmr_ALProcessOrTaskManager = 0x1A1, /* Selector */ + kHIDUsage_Csmr_AL = 0x1A2, /* Selector */ + kHIDUsage_Csmr_ALNextTaskOrApplication = 0x1A3, /* Selector */ + kHIDUsage_Csmr_ALPreviousTaskOrApplication = 0x1A4, /* Selector */ + kHIDUsage_Csmr_ALPreemptiveHaltTaskOrApplication = 0x1A5, /* Selector */ + kHIDUsage_Csmr_ALIntegratedHelpCenter = 0x1A6, /* Selector */ + kHIDUsage_Csmr_ALDocuments = 0x1A7, /* Selector */ + kHIDUsage_Csmr_ALThesaurus = 0x1A8, /* Selector */ + kHIDUsage_Csmr_ALDictionary = 0x1A9, /* Selector */ + kHIDUsage_Csmr_ALDesktop = 0x1AA, /* Selector */ + kHIDUsage_Csmr_ALSpellCheck = 0x1AB, /* Selector */ + kHIDUsage_Csmr_ALGrammerCheck = 0x1AC, /* Selector */ + kHIDUsage_Csmr_ALWirelessStatus = 0x1AD, /* Selector */ + kHIDUsage_Csmr_ALKeyboardLayout = 0x1AE, /* Selector */ + kHIDUsage_Csmr_ALVirusProtection = 0x1AF, /* Selector */ + kHIDUsage_Csmr_ALEncryption = 0x1B0, /* Selector */ + kHIDUsage_Csmr_ALScreenSaver = 0x1B1, /* Selector */ + kHIDUsage_Csmr_ALAlarms = 0x1B2, /* Selector */ + kHIDUsage_Csmr_ALClock = 0x1B3, /* Selector */ + kHIDUsage_Csmr_ALFileBrowser = 0x1B4, /* Selector */ + kHIDUsage_Csmr_ALPowerStatus = 0x1B5, /* Selector */ + /* 0x1A6 - 0x1FF Reserved */ + kHIDUsage_Csmr_GenericGUIApplicationControls = 0x200, /* Named Array */ + kHIDUsage_Csmr_ACNew = 0x201, /* Selector */ + kHIDUsage_Csmr_ACOpen = 0x202, /* Selector */ + kHIDUsage_Csmr_ACClose = 0x203, /* Selector */ + kHIDUsage_Csmr_ACExit = 0x204, /* Selector */ + kHIDUsage_Csmr_ACMaximize = 0x205, /* Selector */ + kHIDUsage_Csmr_ACMinimize = 0x206, /* Selector */ + kHIDUsage_Csmr_ACSave = 0x207, /* Selector */ + kHIDUsage_Csmr_ACPrint = 0x208, /* Selector */ + kHIDUsage_Csmr_ACProperties = 0x209, /* Selector */ + kHIDUsage_Csmr_ACUndo = 0x21A, /* Selector */ + kHIDUsage_Csmr_ACCopy = 0x21B, /* Selector */ + kHIDUsage_Csmr_ACCut = 0x21C, /* Selector */ + kHIDUsage_Csmr_ACPaste = 0x21D, /* Selector */ + kHIDUsage_Csmr_AC = 0x21E, /* Selector */ + kHIDUsage_Csmr_ACFind = 0x21F, /* Selector */ + kHIDUsage_Csmr_ACFindandReplace = 0x220, /* Selector */ + kHIDUsage_Csmr_ACSearch = 0x221, /* Selector */ + kHIDUsage_Csmr_ACGoTo = 0x222, /* Selector */ + kHIDUsage_Csmr_ACHome = 0x223, /* Selector */ + kHIDUsage_Csmr_ACBack = 0x224, /* Selector */ + kHIDUsage_Csmr_ACForward = 0x225, /* Selector */ + kHIDUsage_Csmr_ACStop = 0x226, /* Selector */ + kHIDUsage_Csmr_ACRefresh = 0x227, /* Selector */ + kHIDUsage_Csmr_ACPreviousLink = 0x228, /* Selector */ + kHIDUsage_Csmr_ACNextLink = 0x229, /* Selector */ + kHIDUsage_Csmr_ACBookmarks = 0x22A, /* Selector */ + kHIDUsage_Csmr_ACHistory = 0x22B, /* Selector */ + kHIDUsage_Csmr_ACSubscriptions = 0x22C, /* Selector */ + kHIDUsage_Csmr_ACZoomIn = 0x22D, /* Selector */ + kHIDUsage_Csmr_ACZoomOut = 0x22E, /* Selector */ + kHIDUsage_Csmr_ACZoom = 0x22F, /* Selector */ + kHIDUsage_Csmr_ACFullScreenView = 0x230, /* Selector */ + kHIDUsage_Csmr_ACNormalView = 0x231, /* Selector */ + kHIDUsage_Csmr_ACViewToggle = 0x232, /* Selector */ + kHIDUsage_Csmr_ACScrollUp = 0x233, /* Selector */ + kHIDUsage_Csmr_ACScrollDown = 0x234, /* Selector */ + kHIDUsage_Csmr_ACScroll = 0x235, /* Selector */ + kHIDUsage_Csmr_ACPanLeft = 0x236, /* Selector */ + kHIDUsage_Csmr_ACPanRight = 0x237, /* Selector */ + kHIDUsage_Csmr_ACPan = 0x238, /* Selector */ + kHIDUsage_Csmr_ACNewWindow = 0x239, /* Selector */ + kHIDUsage_Csmr_ACTileHorizontally = 0x23A, /* Selector */ + kHIDUsage_Csmr_ACTileVertically = 0x23B, /* Selector */ + kHIDUsage_Csmr_ACFormat = 0x23C, /* Selector */ + /* 0x23D - 0xFFFF Reserved */ + kHIDUsage_Csmr_Reserved = 0xFFFF +}; + +/* Physical Interface Device Page (0x0F) */ +/* This section provides detailed descriptions of the usages employed by Digitizer Devices. */ +enum +{ + kHIDUsage_PID_PhysicalInterfaceDevice = 0x01, /* CA - A collection of PID usages */ + /* 0x02 - 0x1F Reserved */ + kHIDUsage_PID_Normal = 0x20, /* DV - A force applied perpendicular to the surface of an object */ + kHIDUsage_PID_SetEffectReport = 0x21, /* XXX */ + kHIDUsage_PID_EffectBlockIndex = 0x22, /* XXX */ + kHIDUsage_PID_ParamBlockOffset = 0x23, /* XXX */ + kHIDUsage_PID_ROM_Flag = 0x24, /* XXX */ + kHIDUsage_PID_EffectType = 0x25, /* XXX */ + kHIDUsage_PID_ET_ConstantForce = 0x26, /* XXX */ + kHIDUsage_PID_ET_Ramp = 0x27, /* XXX */ + kHIDUsage_PID_ET_CustomForceData = 0x28, /* XXX */ + /* 0x29 - 0x2F Reserved */ + kHIDUsage_PID_ET_Square = 0x30, /* XXX */ + kHIDUsage_PID_ET_Sine = 0x31, /* XXX */ + kHIDUsage_PID_ET_Triangle = 0x32, /* XXX */ + kHIDUsage_PID_ET_SawtoothUp = 0x33, /* XXX */ + kHIDUsage_PID_ET_SawtoothDown = 0x34, /* XXX */ + /* 0x35 - 0x3F Reserved */ + kHIDUsage_PID_ET_Spring = 0x40, /* XXX */ + kHIDUsage_PID_ET_Damper = 0x41, /* XXX */ + kHIDUsage_PID_ET_Inertia = 0x42, /* XXX */ + kHIDUsage_PID_ET_Friction = 0x43, /* XXX */ + /* 0x44 - 0x4F Reserved */ + kHIDUsage_PID_Duration = 0x50, /* XXX */ + kHIDUsage_PID_SamplePeriod = 0x51, /* XXX */ + kHIDUsage_PID_Gain = 0x52, /* XXX */ + kHIDUsage_PID_TriggerButton = 0x53, /* XXX */ + kHIDUsage_PID_TriggerRepeatInterval = 0x54, /* XXX */ + kHIDUsage_PID_AxesEnable = 0x55, /* XXX */ + kHIDUsage_PID_DirectionEnable = 0x56, /* XXX */ + kHIDUsage_PID_Direction = 0x57, /* XXX */ + kHIDUsage_PID_TypeSpecificBlockOffset = 0x58, /* XXX */ + kHIDUsage_PID_BlockType = 0x59, /* XXX */ + kHIDUsage_PID_SetEnvelopeReport = 0x5A, /* XXX */ + kHIDUsage_PID_AttackLevel = 0x5B, /* XXX */ + kHIDUsage_PID_AttackTime = 0x5C, /* XXX */ + kHIDUsage_PID_FadeLevel = 0x5D, /* XXX */ + kHIDUsage_PID_FadeTime = 0x5E, /* XXX */ + kHIDUsage_PID_SetConditionReport = 0x5F, /* XXX */ + + kHIDUsage_PID_CP_Offset = 0x60, /* XXX */ + kHIDUsage_PID_PositiveCoefficient = 0x61, /* XXX */ + kHIDUsage_PID_NegativeCoefficient = 0x62, /* XXX */ + kHIDUsage_PID_PositiveSaturation = 0x63, /* XXX */ + kHIDUsage_PID_NegativeSaturation = 0x64, /* XXX */ + kHIDUsage_PID_DeadBand = 0x65, /* XXX */ + kHIDUsage_PID_DownloadForceSample = 0x66, /* XXX */ + kHIDUsage_PID_IsochCustomForceEnable = 0x67, /* XXX */ + kHIDUsage_PID_CustomForceDataReport = 0x68, /* XXX */ + kHIDUsage_PID_CustomForceData = 0x69, /* XXX */ + kHIDUsage_PID_CustomForceVendorDefinedData = 0x6A, /* XXX */ + kHIDUsage_PID_SetCustomForceReport = 0x6B, /* XXX */ + kHIDUsage_PID_CustomForceDataOffset = 0x6C, /* XXX */ + kHIDUsage_PID_SampleCount = 0x6D, /* XXX */ + kHIDUsage_PID_SetPeriodicReport = 0x6E, /* XXX */ + kHIDUsage_PID_Offset = 0x6F, /* XXX */ + + kHIDUsage_PID_Magnitude = 0x70, /* XXX */ + kHIDUsage_PID_Phase = 0x71, /* XXX */ + kHIDUsage_PID_Period = 0x72, /* XXX */ + kHIDUsage_PID_SetConstantForceReport = 0x73, /* XXX */ + kHIDUsage_PID_SetRampForceReport = 0x74, /* XXX */ + kHIDUsage_PID_RampStart = 0x75, /* XXX */ + kHIDUsage_PID_RampEnd = 0x76, /* XXX */ + kHIDUsage_PID_EffectOperationReport = 0x77, /* XXX */ + kHIDUsage_PID_EffectOperation = 0x78, /* XXX */ + kHIDUsage_PID_OpEffectStart = 0x79, /* XXX */ + kHIDUsage_PID_OpEffectStartSolo = 0x7A, /* XXX */ + kHIDUsage_PID_OpEffectStop = 0x7B, /* XXX */ + kHIDUsage_PID_LoopCount = 0x7C, /* XXX */ + kHIDUsage_PID_DeviceGainReport = 0x7D, /* XXX */ + kHIDUsage_PID_DeviceGain = 0x7E, /* XXX */ + kHIDUsage_PID_PoolReport = 0x7F, /* XXX */ + + kHIDUsage_PID_RAM_PoolSize = 0x80, /* XXX */ + kHIDUsage_PID_ROM_PoolSize = 0x81, /* XXX */ + kHIDUsage_PID_ROM_EffectBlockCount = 0x82, /* XXX */ + kHIDUsage_PID_SimultaneousEffectsMax = 0x83, /* XXX */ + kHIDUsage_PID_PoolAlignment = 0x84, /* XXX */ + kHIDUsage_PID_PoolMoveReport = 0x85, /* XXX */ + kHIDUsage_PID_MoveSource = 0x86, /* XXX */ + kHIDUsage_PID_MoveDestination = 0x87, /* XXX */ + kHIDUsage_PID_MoveLength = 0x88, /* XXX */ + kHIDUsage_PID_BlockLoadReport = 0x89, /* XXX */ + /* 0x8A Reserved */ + kHIDUsage_PID_BlockLoadStatus = 0x8B, /* XXX */ + kHIDUsage_PID_BlockLoadSuccess = 0x8C, /* XXX */ + kHIDUsage_PID_BlockLoadFull = 0x8D, /* XXX */ + kHIDUsage_PID_BlockLoadError = 0x8E, /* XXX */ + kHIDUsage_PID_BlockHandle = 0x8F, /* XXX */ + + kHIDUsage_PID_BlockFreeReport = 0x90, /* XXX */ + kHIDUsage_PID_TypeSpecificBlockHandle = 0x91, /* XXX */ + kHIDUsage_PID_StateReport = 0x92, /* XXX */ + /* 0x93 Reserved */ + kHIDUsage_PID_EffectPlaying = 0x94, /* XXX */ + kHIDUsage_PID_DeviceControlReport = 0x95, /* XXX */ + kHIDUsage_PID_DeviceControl = 0x96, /* XXX */ + kHIDUsage_PID_DC_EnableActuators = 0x97, /* XXX */ + kHIDUsage_PID_DC_DisableActuators = 0x98, /* XXX */ + kHIDUsage_PID_DC_StopAllEffects = 0x99, /* XXX */ + kHIDUsage_PID_DC_DeviceReset = 0x9A, /* XXX */ + kHIDUsage_PID_DC_DevicePause = 0x9B, /* XXX */ + kHIDUsage_PID_DC_DeviceContinue = 0x9C, /* XXX */ + /* 0x9d - 0x9E Reserved */ + kHIDUsage_PID_DevicePaused = 0x9F, /* XXX */ + + kHIDUsage_PID_ActuatorsEnabled = 0xA0, /* XXX */ + /* 0xA1 - 0xA3 Reserved */ + kHIDUsage_PID_SafetySwitch = 0xA4, /* XXX */ + kHIDUsage_PID_ActuatorOverrideSwitch = 0xA5, /* XXX */ + kHIDUsage_PID_ActuatorPower = 0xA6, /* XXX */ + kHIDUsage_PID_StartDelay = 0xA7, /* XXX */ + kHIDUsage_PID_ParameterBlockSize = 0xA8, /* XXX */ + kHIDUsage_PID_DeviceManagedPool = 0xA9, /* XXX */ + kHIDUsage_PID_SharedParameterBlocks = 0xAA, /* XXX */ + kHIDUsage_PID_CreateNewEffectReport = 0xAB, /* XXX */ + kHIDUsage_PID_RAM_PoolAvailable = 0xAC, /* XXX */ + /* 0xAD - 0xFFFF Reserved */ + kHIDUsage_PID_Reserved = 0xFFFF +}; + +/* Digitizer Page (0x0D) */ +/* This section provides detailed descriptions of the usages employed by Digitizer Devices. */ +enum +{ + kHIDUsage_Dig_Digitizer = 0x01, /* Application Collection */ + kHIDUsage_Dig_Pen = 0x02, /* Application Collection */ + kHIDUsage_Dig_LightPen = 0x03, /* Application Collection */ + kHIDUsage_Dig_TouchScreen = 0x04, /* Application Collection */ + kHIDUsage_Dig_TouchPad = 0x05, /* Application Collection */ + kHIDUsage_Dig_WhiteBoard = 0x06, /* Application Collection */ + kHIDUsage_Dig_CoordinateMeasuringMachine = 0x07, /* Application Collection */ + kHIDUsage_Dig_3DDigitizer = 0x08, /* Application Collection */ + kHIDUsage_Dig_StereoPlotter = 0x09, /* Application Collection */ + kHIDUsage_Dig_ArticulatedArm = 0x0A, /* Application Collection */ + kHIDUsage_Dig_Armature = 0x0B, /* Application Collection */ + kHIDUsage_Dig_MultiplePointDigitizer = 0x0C, /* Application Collection */ + kHIDUsage_Dig_FreeSpaceWand = 0x0D, /* Application Collection */ + /* 0x0E - 0x1F Reserved */ + kHIDUsage_Dig_Stylus = 0x20, /* Logical Collection */ + kHIDUsage_Dig_Puck = 0x21, /* Logical Collection */ + kHIDUsage_Dig_Finger = 0x22, /* Logical Collection */ + /* 0x23 - 0x2F Reserved */ + kHIDUsage_Dig_TipPressure = 0x30, /* Dynamic Value */ + kHIDUsage_Dig_BarrelPressure = 0x31, /* Dynamic Value */ + kHIDUsage_Dig_InRange = 0x32, /* Momentary Control */ + kHIDUsage_Dig_Touch = 0x33, /* Momentary Control */ + kHIDUsage_Dig_Untouch = 0x34, /* One-Shot Control */ + kHIDUsage_Dig_Tap = 0x35, /* One-Shot Control */ + kHIDUsage_Dig_Quality = 0x36, /* Dynamic Value */ + kHIDUsage_Dig_DataValid = 0x37, /* Momentary Control */ + kHIDUsage_Dig_TransducerIndex = 0x38, /* Dynamic Value */ + kHIDUsage_Dig_TabletFunctionKeys = 0x39, /* Logical Collection */ + kHIDUsage_Dig_ProgramChangeKeys = 0x3A, /* Logical Collection */ + kHIDUsage_Dig_BatteryStrength = 0x3B, /* Dynamic Value */ + kHIDUsage_Dig_Invert = 0x3C, /* Momentary Control */ + kHIDUsage_Dig_XTilt = 0x3D, /* Dynamic Value */ + kHIDUsage_Dig_YTilt = 0x3E, /* Dynamic Value */ + kHIDUsage_Dig_Azimuth = 0x3F, /* Dynamic Value */ + kHIDUsage_Dig_Altitude = 0x40, /* Dynamic Value */ + kHIDUsage_Dig_Twist = 0x41, /* Dynamic Value */ + kHIDUsage_Dig_TipSwitch = 0x42, /* Momentary Control */ + kHIDUsage_Dig_SecondaryTipSwitch = 0x43, /* Momentary Control */ + kHIDUsage_Dig_BarrelSwitch = 0x44, /* Momentary Control */ + kHIDUsage_Dig_Eraser = 0x45, /* Momentary Control */ + kHIDUsage_Dig_TabletPick = 0x46, /* Momentary Control */ + /* 0x47 - 0xFFFF Reserved */ + kHIDUsage_Dig_Reserved = 0xFFFF +}; + +/* AlphanumericDisplay Page (0x14) */ +/* The Alphanumeric Display page is intended for use by simple alphanumeric displays that are used on consumer devices. */ +enum +{ + kHIDUsage_AD_AlphanumericDisplay = 0x01, /* Application Collection */ + /* 0x02 - 0x1F Reserved */ + kHIDUsage_AD_DisplayAttributesReport = 0x20, /* Logical Collection */ + kHIDUsage_AD_ASCIICharacterSet = 0x21, /* Static Flag */ + kHIDUsage_AD_DataReadBack = 0x22, /* Static Flag */ + kHIDUsage_AD_FontReadBack = 0x23, /* Static Flag */ + kHIDUsage_AD_DisplayControlReport = 0x24, /* Logical Collection */ + kHIDUsage_AD_ClearDisplay = 0x25, /* Dynamic Flag */ + kHIDUsage_AD_DisplayEnable = 0x26, /* Dynamic Flag */ + kHIDUsage_AD_ScreenSaverDelay = 0x27, /* Static Value */ + kHIDUsage_AD_ScreenSaverEnable = 0x28, /* Dynamic Flag */ + kHIDUsage_AD_VerticalScroll = 0x29, /* Static Flag */ + kHIDUsage_AD_HorizontalScroll = 0x2A, /* Static Flag */ + kHIDUsage_AD_CharacterReport = 0x2B, /* Logical Collection */ + kHIDUsage_AD_DisplayData = 0x2C, /* Dynamic Value */ + kHIDUsage_AD_DisplayStatus = 0x2D, /* Logical Collection */ + kHIDUsage_AD_StatNotReady = 0x2E, /* Selector */ + kHIDUsage_AD_StatReady = 0x2F, /* Selector */ + kHIDUsage_AD_ErrNotaloadablecharacter = 0x30, /* Selector */ + kHIDUsage_AD_ErrFontdatacannotberead = 0x31, /* Selector */ + kHIDUsage_AD_CursorPositionReport = 0x32, /* Logical Collection */ + kHIDUsage_AD_Row = 0x33, /* Dynamic Value */ + kHIDUsage_AD_Column = 0x34, /* Dynamic Value */ + kHIDUsage_AD_Rows = 0x35, /* Static Value */ + kHIDUsage_AD_Columns = 0x36, /* Static Value */ + kHIDUsage_AD_CursorPixelPositioning = 0x37, /* Static Flag */ + kHIDUsage_AD_CursorMode = 0x38, /* Dynamic Flag */ + kHIDUsage_AD_CursorEnable = 0x39, /* Dynamic Flag */ + kHIDUsage_AD_CursorBlink = 0x3A, /* Dynamic Flag */ + kHIDUsage_AD_FontReport = 0x3B, /* Logical Collection */ + kHIDUsage_AD_FontData = 0x3C, /* Buffered Byte */ + kHIDUsage_AD_CharacterWidth = 0x3D, /* Static Value */ + kHIDUsage_AD_CharacterHeight = 0x3E, /* Static Value */ + kHIDUsage_AD_CharacterSpacingHorizontal = 0x3F, /* Static Value */ + kHIDUsage_AD_CharacterSpacingVertical = 0x40, /* Static Value */ + kHIDUsage_AD_UnicodeCharacterSet = 0x41, /* Static Flag */ + /* 0x42 - 0xFFFF Reserved */ + kHIDUsage_AD_Reserved = 0xFFFF +}; + +/* Power Device Page (0x84) */ +/* This section provides detailed descriptions of the usages employed by Power Devices. */ +enum +{ + + kHIDUsage_PD_Undefined = 0x00, /* Power Device Undefined Usage */ + kHIDUsage_PD_iName = 0x01, /* CL- Power Device Name Index */ + kHIDUsage_PD_PresentStatus = 0x02, /* CL- Power Device Present Status */ + kHIDUsage_PD_ChangedStatus = 0x03, /* CA- Power Device Changed Status */ + kHIDUsage_PD_UPS = 0x04, /* CA- Uninterruptible Power Supply */ + kHIDUsage_PD_PowerSupply = 0x05, /* CA- Power Supply */ + /* Reserved 0x06 - 0x0F */ + kHIDUsage_PD_BatterySystem = 0x10, /* CP- Battery System power module */ + kHIDUsage_PD_BatterySystemID = 0x11, /* SV IF- Battery System ID */ + kHIDUsage_PD_Battery = 0x12, /* CP- Battery */ + kHIDUsage_PD_BatteryID = 0x13, /* SV IF- Battery ID */ + kHIDUsage_PD_Charger = 0x14, /* CP- Charger */ + kHIDUsage_PD_ChargerID = 0x15, /* SV IF- Charger ID */ + kHIDUsage_PD_PowerConverter = 0x16, /* CP- Power Converter power module */ + kHIDUsage_PD_PowerConverterID = 0x17, /* SV IF- Power Converter ID */ + kHIDUsage_PD_OutletSystem = 0x18, /* CP- Outlet System power module */ + kHIDUsage_PD_OutletSystemID = 0x19, /* SV IF-Outlet System ID */ + kHIDUsage_PD_Input = 0x1A, /* CP- Power Device Input */ + kHIDUsage_PD_InputID = 0x1B, /* SV IF- Power Device Input ID */ + kHIDUsage_PD_Output = 0x1C, /* CP- Power Device Output */ + kHIDUsage_PD_OutputID = 0x1D, /* SV IF- Power Device Output ID */ + kHIDUsage_PD_Flow = 0x1E, /* CP- Power Device Flow */ + kHIDUsage_PD_FlowID = 0x1F, /* Item IF- Power Device Flow ID */ + kHIDUsage_PD_Outlet = 0x20, /* CP- Power Device Outlet */ + kHIDUsage_PD_OutletID = 0x21, /* SV IF- Power Device Outlet ID */ + kHIDUsage_PD_Gang = 0x22, /* CL/CP- Power Device Gang */ + kHIDUsage_PD_GangID = 0x23, /* SV IF- Power Device Gang ID */ + kHIDUsage_PD_PowerSummary = 0x24, /* CL/CP- Power Device Power Summary */ + kHIDUsage_PD_PowerSummaryID = 0x25, /* SV IF- Power Device Power Summary ID */ + /* Reserved 0x26 - 0x2F */ + kHIDUsage_PD_Voltage = 0x30, /* DV IF- Power Device Voltage */ + kHIDUsage_PD_Current = 0x31, /* DV IF- Power Device Current */ + kHIDUsage_PD_Frequency = 0x32, /* DV IF- Power Device Frequency */ + kHIDUsage_PD_ApparentPower = 0x33, /* DV IF- Power Device Apparent Power */ + kHIDUsage_PD_ActivePower = 0x34, /* DV IF- Power Device RMS Power */ + kHIDUsage_PD_PercentLoad = 0x35, /* DV IF- Power Device Percent Load */ + kHIDUsage_PD_Temperature = 0x36, /* DV IF- Power Device Temperature */ + kHIDUsage_PD_Humidity = 0x37, /* DV IF- Power Device Humidity */ + kHIDUsage_PD_BadCount = 0x38, /* DV IF- Power Device Bad Condition Count */ + /* Reserved 0x39 - 0x3F */ + kHIDUsage_PD_ConfigVoltage = 0x40, /* SV/DV F- Power Device Nominal Voltage */ + kHIDUsage_PD_ConfigCurrent = 0x41, /* SV/DV F- Power Device Nominal Current */ + kHIDUsage_PD_ConfigFrequency = 0x42, /* SV/DV F- Power Device Nominal Frequency */ + kHIDUsage_PD_ConfigApparentPower = 0x43, /* SV/DV F- Power Device Nominal Apparent Power */ + kHIDUsage_PD_ConfigActivePower = 0x44, /* SV/DV F- Power Device Nominal RMS Power */ + kHIDUsage_PD_ConfigPercentLoad = 0x45, /* SV/DV F- Power Device Nominal Percent Load */ + kHIDUsage_PD_ConfigTemperature = 0x46, /* SV/DV F- Power Device Nominal Temperature */ + kHIDUsage_PD_ConfigHumidity = 0x47, /* SV/DV F- Power Device Nominal Humidity */ + /* Reserved 0x48 - 0x4F */ + kHIDUsage_PD_SwitchOnControl = 0x50, /* DV F- Power Device Switch On Control */ + kHIDUsage_PD_SwitchOffControl = 0x51, /* DV F- Power Device Switch Off Control */ + kHIDUsage_PD_ToggleControl = 0x52, /* DV F- Power Device Toogle Sequence Control */ + kHIDUsage_PD_LowVoltageTransfer = 0x53, /* DV F- Power Device Min Transfer Voltage */ + kHIDUsage_PD_HighVoltageTransfer = 0x54, /* DV F- Power Device Max Transfer Voltage */ + kHIDUsage_PD_DelayBeforeReboot = 0x55, /* DV F- Power Device Delay Before Reboot */ + kHIDUsage_PD_DelayBeforeStartup = 0x56, /* DV F- Power Device Delay Before Startup */ + kHIDUsage_PD_DelayBeforeShutdown = 0x57, /* DV F- Power Device Delay Before Shutdown */ + kHIDUsage_PD_Test = 0x58, /* DV F- Power Device Test Request/Result */ + kHIDUsage_PD_ModuleReset = 0x59, /* DV F- Power Device Reset Request/Result */ + kHIDUsage_PD_AudibleAlarmControl = 0x5A, /* DV F- Power Device Audible Alarm Control */ + /* Reserved 0x5B - 0x5F */ + kHIDUsage_PD_Present = 0x60, /* DV IOF- Power Device Present */ + kHIDUsage_PD_Good = 0x61, /* DV IOF- Power Device Good */ + kHIDUsage_PD_InternalFailure = 0x62, /* DV IOF- Power Device Internal Failure */ + kHIDUsage_PD_VoltageOutOfRange = 0x63, /* DV IOF- Power Device Voltage Out Of Range */ + kHIDUsage_PD_FrequencyOutOfRange = 0x64, /* DV IOF- Power Device Frequency Out Of Range */ + kHIDUsage_PD_Overload = 0x65, /* DV IOF- Power Device Overload */ + kHIDUsage_PD_OverCharged = 0x66, /* DV IOF- Power Device Over Charged */ + kHIDUsage_PD_OverTemperature = 0x67, /* DV IOF- Power Device Over Temperature */ + kHIDUsage_PD_ShutdownRequested = 0x68, /* DV IOF- Power Device Shutdown Requested */ + kHIDUsage_PD_ShutdownImminent = 0x69, /* DV IOF- Power Device Shutdown Imminent */ + /* Reserved 0x6A */ + kHIDUsage_PD_SwitchOnOff = 0x6B, /* DV IOF- Power Device On/Off Switch Status */ + kHIDUsage_PD_Switchable = 0x6C, /* DV IOF- Power Device Switchable */ + kHIDUsage_PD_Used = 0x6D, /* DV IOF- Power Device Used */ + kHIDUsage_PD_Boost = 0x6E, /* DV IOF- Power Device Boosted */ + kHIDUsage_PD_Buck = 0x6F, /* DV IOF- Power Device Bucked */ + kHIDUsage_PD_Initialized = 0x70, /* DV IOF- Power Device Initialized */ + kHIDUsage_PD_Tested = 0x71, /* DV IOF- Power Device Tested */ + kHIDUsage_PD_AwaitingPower = 0x72, /* DV IOF- Power Device Awaiting Power */ + kHIDUsage_PD_CommunicationLost = 0x73, /* DV IOF- Power Device Communication Lost */ + /* Reserved 0x74 - 0xFC */ + kHIDUsage_PD_iManufacturer = 0xFD, /* SV F- Power Device Manufacturer String Index */ + kHIDUsage_PD_iProduct = 0xFE, /* SV F- Power Device Product String Index */ + kHIDUsage_PD_iserialNumber = 0xFF /* SV F- Power Device Serial Number String Index */ +}; + +/* Battery System Page (x85) */ +/* This section provides detailed descriptions of the usages employed by Battery Systems. */ +enum +{ + kHIDUsage_BS_Undefined = 0x00, /* Battery System Undefined */ + kHIDUsage_BS_SMBBatteryMode = 0x01, /* CL - SMB Mode */ + kHIDUsage_BS_SMBBatteryStatus = 0x02, /* CL - SMB Status */ + kHIDUsage_BS_SMBAlarmWarning = 0x03, /* CL - SMB Alarm Warning */ + kHIDUsage_BS_SMBChargerMode = 0x04, /* CL - SMB Charger Mode */ + kHIDUsage_BS_SMBChargerStatus = 0x05, /* CL - SMB Charger Status */ + kHIDUsage_BS_SMBChargerSpecInfo = 0x06, /* CL - SMB Charger Extended Status */ + kHIDUsage_BS_SMBSelectorState = 0x07, /* CL - SMB Selector State */ + kHIDUsage_BS_SMBSelectorPresets = 0x08, /* CL - SMB Selector Presets */ + kHIDUsage_BS_SMBSelectorInfo = 0x09, /* CL - SMB Selector Info */ + /* Reserved 0x0A - 0x0F */ + kHIDUsage_BS_OptionalMfgFunction1 = 0x10, /* DV F - Battery System Optional SMB Mfg Function 1 */ + kHIDUsage_BS_OptionalMfgFunction2 = 0x11, /* DV F - Battery System Optional SMB Mfg Function 2 */ + kHIDUsage_BS_OptionalMfgFunction3 = 0x12, /* DV F - Battery System Optional SMB Mfg Function 3 */ + kHIDUsage_BS_OptionalMfgFunction4 = 0x13, /* DV F - Battery System Optional SMB Mfg Function 4 */ + kHIDUsage_BS_OptionalMfgFunction5 = 0x14, /* DV F - Battery System Optional SMB Mfg Function 5 */ + kHIDUsage_BS_ConnectionToSMBus = 0x15, /* DF F - Battery System Connection To System Management Bus */ + kHIDUsage_BS_OutputConnection = 0x16, /* DF F - Battery System Output Connection Status */ + kHIDUsage_BS_ChargerConnection = 0x17, /* DF F - Battery System Charger Connection */ + kHIDUsage_BS_BatteryInsertion = 0x18, /* DF F - Battery System Battery Insertion */ + kHIDUsage_BS_Usenext = 0x19, /* DF F - Battery System Use Next */ + kHIDUsage_BS_OKToUse = 0x1A, /* DF F - Battery System OK To Use */ + kHIDUsage_BS_BatterySupported = 0x1B, /* DF F - Battery System Battery Supported */ + kHIDUsage_BS_SelectorRevision = 0x1C, /* DF F - Battery System Selector Revision */ + kHIDUsage_BS_ChargingIndicator = 0x1D, /* DF F - Battery System Charging Indicator */ + /* Reserved 0x1E - 0x27 */ + kHIDUsage_BS_ManufacturerAccess = 0x28, /* DV F - Battery System Manufacturer Access */ + kHIDUsage_BS_RemainingCapacityLimit = 0x29, /* DV F - Battery System Remaining Capacity Limit */ + kHIDUsage_BS_RemainingTimeLimit = 0x2A, /* DV F - Battery System Remaining Time Limit */ + kHIDUsage_BS_AtRate = 0x2B, /* DV F - Battery System At Rate... */ + kHIDUsage_BS_CapacityMode = 0x2C, /* DV F - Battery System Capacity Mode */ + kHIDUsage_BS_BroadcastToCharger = 0x2D, /* DV F - Battery System Broadcast To Charger */ + kHIDUsage_BS_PrimaryBattery = 0x2E, /* DV F - Battery System Primary Battery */ + kHIDUsage_BS_ChargeController = 0x2F, /* DV F - Battery System Charge Controller */ + /* Reserved 0x30 - 0x3F */ + kHIDUsage_BS_TerminateCharge = 0x40, /* DF IOF - Battery System Terminate Charge */ + kHIDUsage_BS_TerminateDischarge = 0x41, /* DF IOF - Battery System Terminate Discharge */ + kHIDUsage_BS_BelowRemainingCapacityLimit = 0x42, /* DF IOF - Battery System Below Remaining Capacity Limit */ + kHIDUsage_BS_RemainingTimeLimitExpired = 0x43, /* DF IOF - Battery System Remaining Time Limit Expired */ + kHIDUsage_BS_Charging = 0x44, /* DF IOF - Battery System Charging */ + kHIDUsage_BS_Discharging = 0x45, /* DV IOF - Battery System Discharging */ + kHIDUsage_BS_FullyCharged = 0x46, /* DF IOF - Battery System Fully Charged */ + kHIDUsage_BS_FullyDischarged = 0x47, /* DV IOF - Battery System Fully Discharged */ + kHIDUsage_BS_ConditioningFlag = 0x48, /* DV IOF - Battery System Conditioning Flag */ + kHIDUsage_BS_AtRateOK = 0x49, /* DV IOF - Battery System At Rate OK */ + kHIDUsage_BS_SMBErrorCode = 0x4A, /* DF IOF - Battery System SMB Error Code */ + kHIDUsage_BS_NeedReplacement = 0x4B, /* DF IOF - Battery System Need Replacement */ + /* Reserved 0x4C - 0x5F */ + kHIDUsage_BS_AtRateTimeToFull = 0x60, /* DV IF - Battery System At Rate Time To Full */ + kHIDUsage_BS_AtRateTimeToEmpty = 0x61, /* DV IF - Battery System At Rate Time To Empty */ + kHIDUsage_BS_AverageCurrent = 0x62, /* DV IF - Battery System Average Current */ + kHIDUsage_BS_Maxerror = 0x63, /* DV IF - Battery System Max Error */ + kHIDUsage_BS_RelativeStateOfCharge = 0x64, /* DV IF - Battery System Relative State Of Charge */ + kHIDUsage_BS_AbsoluteStateOfCharge = 0x65, /* DV IF - Battery System Absolute State Of Charge */ + kHIDUsage_BS_RemainingCapacity = 0x66, /* DV IF - Battery System Remaining Capacity */ + kHIDUsage_BS_FullChargeCapacity = 0x67, /* DV IF - Battery System Full Charge Capacity */ + kHIDUsage_BS_RunTimeToEmpty = 0x68, /* DV IF - Battery System Run Time To Empty */ + kHIDUsage_BS_AverageTimeToEmpty = 0x69, /* DV IF - Battery System Average Time To Empty */ + kHIDUsage_BS_AverageTimeToFull = 0x6A, /* DV IF - Battery System Average Time To Full */ + kHIDUsage_BS_CycleCount = 0x6B, /* DV IF - Battery System Cycle Count */ + /* Reserved 0x6C - 0x7F */ + kHIDUsage_BS_BattPackModelLevel = 0x80, /* SV F - Battery System Batt Pack Model Level */ + kHIDUsage_BS_InternalChargeController = 0x81, /* SF F - Battery System Internal Charge Controller */ + kHIDUsage_BS_PrimaryBatterySupport = 0x82, /* SF F - Battery System Primary Battery Support */ + kHIDUsage_BS_DesignCapacity = 0x83, /* SV F - Battery System Design Capacity */ + kHIDUsage_BS_SpecificationInfo = 0x84, /* SV F - Battery System Specification Info */ + kHIDUsage_BS_ManufacturerDate = 0x85, /* SV F - Battery System Manufacturer Date */ + kHIDUsage_BS_SerialNumber = 0x86, /* SV F - Battery System Serial Number */ + kHIDUsage_BS_iManufacturerName = 0x87, /* SV F - Battery System Manufacturer Name Index */ + kHIDUsage_BS_iDevicename = 0x88, /* SV F - Battery System Device Name Index */ + kHIDUsage_BS_iDeviceChemistry = 0x89, /* SV F - Battery System Device Chemistry Index */ + kHIDUsage_BS_ManufacturerData = 0x8A, /* SV F - Battery System Manufacturer Data */ + kHIDUsage_BS_Rechargable = 0x8B, /* SV F - Battery System Rechargable */ + kHIDUsage_BS_WarningCapacityLimit = 0x8C, /* SV F - Battery System Warning Capacity Limit */ + kHIDUsage_BS_CapacityGranularity1 = 0x8D, /* SV F - Battery System Capacity Granularity 1 */ + kHIDUsage_BS_CapacityGranularity2 = 0x8E, /* SV F - Battery System Capacity Granularity 2 */ + kHIDUsage_BS_iOEMInformation = 0x8F, /* SV F - Battery System OEM Information Index */ + /* Reserved 0x90 - 0xBF */ + kHIDUsage_BS_InhibitCharge = 0xC0, /* DF IOF - Battery System Inhibit Charge */ + kHIDUsage_BS_EnablePolling = 0xC1, /* DF IOF - Battery System Enable Polling */ + kHIDUsage_BS_ResetToZero = 0xC2, /* DF IOF - Battery System Reset To Zero */ + /* Reserved 0xC3 - 0xCF */ + kHIDUsage_BS_ACPresent = 0xD0, /* DF IOF - Battery System AC Present */ + kHIDUsage_BS_BatteryPresent = 0xD1, /* DF IOF - Battery System Battery Present */ + kHIDUsage_BS_PowerFail = 0xD2, /* DF IOF - Battery System Power Fail */ + kHIDUsage_BS_AlarmInhibited = 0xD3, /* DF IOF - Battery System Alarm Inhibited */ + kHIDUsage_BS_ThermistorUnderRange = 0xD4, /* DF IOF - Battery System Thermistor Under Range */ + kHIDUsage_BS_ThermistorHot = 0xD5, /* DF IOF - Battery System Thermistor Hot */ + kHIDUsage_BS_ThermistorCold = 0xD6, /* DF IOF - Battery System Thermistor Cold */ + kHIDUsage_BS_ThermistorOverRange = 0xD7, /* DF IOF - Battery System Thermistor Over Range */ + kHIDUsage_BS_VoltageOutOfRange = 0xD8, /* DF IOF - Battery System Voltage Out Of Range */ + kHIDUsage_BS_CurrentOutOfRange = 0xD9, /* DF IOF - Battery System Current Out Of Range */ + kHIDUsage_BS_CurrentNotRegulated = 0xDA, /* DF IOF - Battery System Current Not Regulated */ + kHIDUsage_BS_VoltageNotRegulated = 0xDB, /* DF IOF - Battery System Voltage Not Regulated */ + kHIDUsage_BS_MasterMode = 0xDC, /* DF IOF - Battery System Master Mode */ + /* Reserved 0xDD - 0xEF */ + kHIDUsage_BS_ChargerSelectorSupport = 0xF0, /* SF F- Battery System Charger Support Selector */ + kHIDUsage_BS_ChargerSpec = 0xF1, /* SF F- Battery System Charger Specification */ + kHIDUsage_BS_Level2 = 0xF2, /* SF F- Battery System Charger Level 2 */ + kHIDUsage_BS_Level3 = 0xF3 /* SF F- Battery System Charger Level 3 */ + /* Reserved 0xF2 - 0xFF */ +}; + +/* Bar Code Scanner Page (0x8C) */ +/* This section provides detailed descriptions of the usages employed by Bar Code Scanner Devices. */ +enum +{ + kHIDUsage_BCS_Undefined = 0x00, /* Bar Code Scanner Undefined Usage */ + kHIDUsage_BCS_BadgeReader = 0x01, /* CA - Bar Code Badge Reader */ + kHIDUsage_BCS_BarCodeScanner = 0x02, /* CA -Bar Code Scanner */ + kHIDUsage_BCS_DumbBarCodeScanner = 0x03, /* CA -Dumb Bar Code Scanner Usage */ + kHIDUsage_BCS_CordlessScannerBase = 0x04, /* CA -Cordless Base Usage */ + kHIDUsage_BCS_BarCodeScannerCradle = 0x05, /* CA -Bar Code Scanner Cradle Usage */ + /* Reserved 0x06 - 0x0F */ + kHIDUsage_BCS_AttributeReport = 0x10, /* CL - Attribute Report */ + kHIDUsage_BCS_SettingsReport = 0x11, /* CL - Settings Report */ + kHIDUsage_BCS_ScannedDataReport = 0x12, /* CL - Scanned Data Report */ + kHIDUsage_BCS_RawScannedDataReport = 0x13, /* CL - Raw Scanned Data Report */ + kHIDUsage_BCS_TriggerReport = 0x14, /* CL - Trigger Report */ + kHIDUsage_BCS_StatusReport = 0x15, /* CL - Status Report */ + kHIDUsage_BCS_UPC_EANControlReport = 0x16, /* CL - UPC/EAN Control Report */ + kHIDUsage_BCS_EAN2_3LabelControlReport = 0x17, /* CL - EAN 2/3 Label Control Report */ + kHIDUsage_BCS_Code39ControlReport = 0x18, /* CL - Code 39 Control Report */ + kHIDUsage_BCS_Interleaved2of5ControlReport = 0x19, /* CL - Interleaved 2 of 5 Control Report */ + kHIDUsage_BCS_Standard2of5ControlReport = 0x1A, /* CL - Standard 2 of 5 Control Report */ + kHIDUsage_BCS_MSIPlesseyControlReport = 0x1B, /* CL - MSI Plessey Control Report */ + kHIDUsage_BCS_CodabarControlReport = 0x1C, /* CL - Codabar Control Report */ + kHIDUsage_BCS_Code128ControlReport = 0x1D, /* CL - Code 128 Control Report */ + kHIDUsage_BCS_Misc1DControlReport = 0x1E, /* CL - Misc 1D Control Report */ + kHIDUsage_BCS_2DControlReport = 0x1F, /* CL - 2D Control Report */ + /* Reserved 0x20 - 0x2F */ + kHIDUsage_BCS_Aiming_PointerMide = 0x30, /* SF - Aiming Pointer Mode */ + kHIDUsage_BCS_BarCodePresentSensor = 0x31, /* SF - Bar Code Present Sensor */ + kHIDUsage_BCS_Class1ALaser = 0x32, /* SF - Class 1A Laser */ + kHIDUsage_BCS_Class2Laser = 0x33, /* SF - Class 2 Laser */ + kHIDUsage_BCS_HeaterPresent = 0x34, /* SF - Heater Present */ + kHIDUsage_BCS_ContactScanner = 0x35, /* SF - Contact Scanner */ + kHIDUsage_BCS_ElectronicArticleSurveillanceNotification = 0x36, /* SF - Electronic Article Surveillance Notification */ + kHIDUsage_BCS_ConstantElectronicArticleSurveillance = 0x37, /* SF - Constant Electronic Article Surveillance */ + kHIDUsage_BCS_ErrorIndication = 0x38, /* SF - Error Indication */ + kHIDUsage_BCS_FixedBeeper = 0x39, /* SF - Fixed Beeper */ + kHIDUsage_BCS_GoodDecodeIndication = 0x3A, /* SF - Good Decode Indication */ + kHIDUsage_BCS_HandsFreeScanning = 0x3B, /* SF - Hands Free Scanning */ + kHIDUsage_BCS_IntrinsicallySafe = 0x3C, /* SF - Intrinsically Safe */ + kHIDUsage_BCS_KlasseEinsLaser = 0x3D, /* SF - Klasse Eins Laser */ + kHIDUsage_BCS_LongRangeScanner = 0x3E, /* SF - Long Range Scanner */ + kHIDUsage_BCS_MirrorSpeedControl = 0x3F, /* SF - Mirror Speed Control */ + kHIDUsage_BCS_NotOnFileIndication = 0x40, /* SF - Not On File Indication */ + kHIDUsage_BCS_ProgrammableBeeper = 0x41, /* SF - Programmable Beeper */ + kHIDUsage_BCS_Triggerless = 0x42, /* SF - Triggerless */ + kHIDUsage_BCS_Wand = 0x43, /* SF - Wand */ + kHIDUsage_BCS_WaterResistant = 0x44, /* SF - Water Resistant */ + kHIDUsage_BCS_MultiRangeScanner = 0x45, /* SF - Multi-Range Scanner */ + kHIDUsage_BCS_ProximitySensor = 0x46, /* SF - Proximity Sensor */ + /* Reserved 0x47 - 0x4C */ + kHIDUsage_BCS_FragmentDecoding = 0x4D, /* DF - Fragment Decoding */ + kHIDUsage_BCS_ScannerReadConfidence = 0x4E, /* DV - Scanner Read Confidence */ + kHIDUsage_BCS_DataPrefix = 0x4F, /* NAry - Data Prefix */ + kHIDUsage_BCS_PrefixAIMI = 0x50, /* SEL - Prefix AIMI */ + kHIDUsage_BCS_PrefixNone = 0x51, /* SEL - Prefix None */ + kHIDUsage_BCS_PrefixProprietary = 0x52, /* SEL - Prefix Proprietary */ + /* Reserved 0x53 - 0x54 */ + kHIDUsage_BCS_ActiveTime = 0x55, /* DV - Active Time */ + kHIDUsage_BCS_AimingLaserPattern = 0x56, /* DF - Aiming Laser Pattern */ + kHIDUsage_BCS_BarCodePresent = 0x57, /* OOC - Bar Code Present */ + kHIDUsage_BCS_BeeperState = 0x58, /* OOC - Beeper State */ + kHIDUsage_BCS_LaserOnTime = 0x59, /* DV - Laser On Time */ + kHIDUsage_BCS_LaserState = 0x5A, /* OOC - Laser State */ + kHIDUsage_BCS_LockoutTime = 0x5B, /* DV - Lockout Time */ + kHIDUsage_BCS_MotorState = 0x5C, /* OOC - Motor State */ + kHIDUsage_BCS_MotorTimeout = 0x5D, /* DV - Motor Timeout */ + kHIDUsage_BCS_PowerOnResetScanner = 0x5E, /* DF - Power On Reset Scanner */ + kHIDUsage_BCS_PreventReadOfBarcodes = 0x5F, /* DF - Prevent Read of Barcodes */ + kHIDUsage_BCS_InitiateBarcodeRead = 0x60, /* DF - Initiate Barcode Read */ + kHIDUsage_BCS_TriggerState = 0x61, /* DF - Trigger State */ + kHIDUsage_BCS_TriggerMode = 0x62, /* NAry - Trigger Mode */ + kHIDUsage_BCS_TriggerModeBlinkingLaserOn = 0x63, /* SEL - Trigger Mode Blinking Laser On */ + kHIDUsage_BCS_TriggerModeContinuousLaserOn = 0x64, /* SEL - Trigger Mode Continuous Laser On */ + kHIDUsage_BCS_TriggerModeLaserOnWhilePulled = 0x65, /* SEL - Trigger Mode Laser on while Pulled */ + kHIDUsage_BCS_TriggerModeLaserStaysOnAfterTriggerRelease = 0x66, /* SEL - Trigger Mode Laser stays on after Trigger Release */ + /* Reserved 0x67 - 0x6C */ + kHIDUsage_BCS_CommitParametersToNVM = 0x6D, /* DF - Commit Parameters to NVM */ + kHIDUsage_BCS_ParameterScanning = 0x6E, /* DF - Parameter Scanning */ + kHIDUsage_BCS_ParametersChanged = 0x6F, /* OOC - Parameters Changed */ + kHIDUsage_BCS_SetParameterDefaultValues = 0x70, /* DF - Set parameter default values */ + /* Reserved 0x71 - 0x74 */ + kHIDUsage_BCS_ScannerInCradle = 0x75, /* OOC - Scanner In Cradle */ + kHIDUsage_BCS_ScannerInRange = 0x76, /* OOC - Scanner In Range */ + /* Reserved 0x77 - 0x79 */ + kHIDUsage_BCS_AimDuration = 0x7A, /* DV - Aim Duration */ + kHIDUsage_BCS_GoodReadLampDuration = 0x7B, /* DV - Good Read Lamp Duration */ + kHIDUsage_BCS_GoodReadLampIntensity = 0x7C, /* DV - Good Read Lamp Intensity */ + kHIDUsage_BCS_GoodReadLED = 0x7D, /* DF - Good Read LED */ + kHIDUsage_BCS_GoodReadToneFrequency = 0x7E, /* DV - Good Read Tone Frequency*/ + kHIDUsage_BCS_GoodReadToneLength = 0x7F, /* DV - Good Read Tone Length */ + kHIDUsage_BCS_GoodReadToneVolume = 0x80, /* DV - Good Read Tone Volume */ + /* Reserved 0x81 */ + kHIDUsage_BCS_NoReadMessage = 0x82, /* DF - No Read Message */ + kHIDUsage_BCS_NotOnFileVolume = 0x83, /* DV - Not on File Volume */ + kHIDUsage_BCS_PowerupBeep = 0x84, /* DF - Powerup Beep */ + kHIDUsage_BCS_SoundErrorBeep = 0x85, /* DF - Sound Error Beep */ + kHIDUsage_BCS_SoundGoodReadBeep = 0x86, /* DF - Sound Good Read Beep */ + kHIDUsage_BCS_SoundNotOnFileBeep = 0x87, /* DF - Sound Not On File Beep */ + kHIDUsage_BCS_GoodReadWhenToWrite = 0x88, /* NArry - Good Read When to Write */ + kHIDUsage_BCS_GRWTIAfterDecode = 0x89, /* SEL - GRWTI After Decode */ + kHIDUsage_BCS_GRWTIBeep_LampAfterTransmit = 0x8A, /* SEL - GRWTI Beep/Lamp after transmit */ + kHIDUsage_BCS_GRWTINoBeep_LampUseAtAll = 0x8B, /* SEL - GRWTI No Beep/Lamp at all */ + /* Reserved 0x8C - 0x90 */ + kHIDUsage_BCS_BooklandEAN = 0x91, /* DF - Bookland EAN */ + kHIDUsage_BCS_ConvertEAN8To13Type = 0x92, /* DF - Convert EAN 8 to 13 Type */ + kHIDUsage_BCS_ConvertUPCAToEAN_13 = 0x93, /* DF - Convert UPC A to EAN-13 */ + kHIDUsage_BCS_ConvertUPC_EToA = 0x94, /* DF - Convert UPC-E to A */ + kHIDUsage_BCS_EAN_13 = 0x95, /* DF - EAN-13 */ + kHIDUsage_BCS_EAN_8 = 0x96, /* DF - EAN_8 */ + kHIDUsage_BCS_EAN_99_128_Mandatory = 0x97, /* DF - EAN-99 128_Mandatory */ + kHIDUsage_BCS_EAN_99_P5_128_Optional = 0x98, /* DF - EAN-99 P5/128_Optional */ + /* Reserved 0x99 */ + kHIDUsage_BCS_UPC_EAN = 0x9A, /* DF - UPC/EAN */ + kHIDUsage_BCS_UPC_EANCouponCode = 0x9B, /* DF - UPC/EAN Coupon Code */ + kHIDUsage_BCS_UPC_EANPeriodicals = 0x9C, /* DV - UPC/EAN Periodicals */ + kHIDUsage_BCS_UPC_A = 0x9D, /* DF - UPC-A */ + kHIDUsage_BCS_UPC_AWith128Mandatory = 0x9E, /* DF - UPC-A with 128 Mandatory */ + kHIDUsage_BCS_UPC_AWith128Optical = 0x9F, /* DF - UPC-A with 128 Optical */ + kHIDUsage_BCS_UPC_AWithP5Optional = 0xA0, /* DF - UPC-A with P5 Optional */ + kHIDUsage_BCS_UPC_E = 0xA1, /* DF - UPC-E */ + kHIDUsage_BCS_UPC_E1 = 0xA2, /* DF - UPC-E1 */ + /* Reserved 0xA3 - 0xA8 */ + kHIDUsage_BCS_Periodical = 0xA9, /* NArry - Periodical */ + kHIDUsage_BCS_PeriodicalAutoDiscriminatePlus2 = 0xAA,/* SEL - Periodical Auto-Discriminate + 2 */ + kHIDUsage_BCS_PeriodicalOnlyDecodeWithPlus2 = 0xAB, /* SEL - Periodical Only Decode with + 2 */ + kHIDUsage_BCS_PeriodicalIgnorePlus2 = 0xAC, /* SEL - Periodical Ignore + 2 */ + kHIDUsage_BCS_PeriodicalAutoDiscriminatePlus5 = 0xAD,/* SEL - Periodical Auto-Discriminate + 5 */ + kHIDUsage_BCS_PeriodicalOnlyDecodeWithPlus5 = 0xAE, /* SEL - Periodical Only Decode with + 5 */ + kHIDUsage_BCS_PeriodicalIgnorePlus5 = 0xAF, /* SEL - Periodical Ignore + 5 */ + kHIDUsage_BCS_Check = 0xB0, /* NArry - Check */ + kHIDUsage_BCS_CheckDisablePrice = 0xB1, /* SEL - Check Disable Price */ + kHIDUsage_BCS_CheckEnable4DigitPrice = 0xB2, /* SEL - Check Enable 4 digit Price */ + kHIDUsage_BCS_CheckEnable5DigitPrice = 0xB3, /* SEL - Check Enable 5 digit Price */ + kHIDUsage_BCS_CheckEnableEuropean4DigitPrice = 0xB4,/* SEL - Check Enable European 4 digit Price */ + kHIDUsage_BCS_CheckEnableEuropean5DigitPrice = 0xB5,/* SEL - Check Enable European 5 digit Price */ + /* Reserved 0xB6 */ + kHIDUsage_BCS_EANTwoLabel = 0xB7, /* DF - EAN Two Label */ + kHIDUsage_BCS_EANThreeLabel = 0xB8, /* DF - EAN Thread Label */ + kHIDUsage_BCS_EAN8FlagDigit1 = 0xB9, /* DV - EAN 8 Flag Digit 1 */ + kHIDUsage_BCS_EAN8FlagDigit2 = 0xBA, /* DV - EAN 8 Flag Digit 2 */ + kHIDUsage_BCS_EAN8FlagDigit3 = 0xBB, /* DV - EAN 8 Flag Digit 3 */ + kHIDUsage_BCS_EAN13FlagDigit1 = 0xBC, /* DV - EAN 13 Flag Digit 1 */ + kHIDUsage_BCS_EAN13FlagDigit2 = 0xBD, /* DV - EAN 13 Flag Digit 2 */ + kHIDUsage_BCS_EAN13FlagDigit3 = 0xBE, /* DV - EAN 13 Flag Digit 3 */ + kHIDUsage_BCS_AddEAN2_3LabelDefinition = 0xBF, /* DF - Add EAN 2/3 Label Definition */ + kHIDUsage_BCS_ClearAllEAN2_3LabelDefinitions = 0xC0,/* DF - Clear all EAN 2/3 Label Definitions */ + /* Reserved 0xC1 - 0xC2 */ + kHIDUsage_BCS_Codabar = 0xC3, /* DF - Codabar */ + kHIDUsage_BCS_Code128 = 0xC4, /* DF - Code 128 */ + /* Reserved 0xC5 - 0xC6 */ + kHIDUsage_BCS_Code39 = 0xC7, /* DF - Code 39 */ + kHIDUsage_BCS_Code93 = 0xC8, /* DF - Code 93 */ + kHIDUsage_BCS_FullASCIIConversion = 0xC9, /* DF - Full ASCII Conversion */ + kHIDUsage_BCS_Interleaved2of5 = 0xCA, /* DF - Interleaved 2 of 5 */ + kHIDUsage_BCS_ItalianPharmacyCode = 0xCB, /* DF - Italian Pharmacy Code */ + kHIDUsage_BCS_MSI_Plessey = 0xCC, /* DF - MSI/Plessey */ + kHIDUsage_BCS_Standard2of5IATA = 0xCD, /* DF - Standard 2 of 5 IATA */ + kHIDUsage_BCS_Standard2of5 = 0xCE, /* DF - Standard 2 of 5 */ + /* Reserved 0xCF - 0xD2 */ + kHIDUsage_BCS_TransmitStart_Stop = 0xD3, /* DF - Transmit Start/Stop */ + kHIDUsage_BCS_TriOptic = 0xD4, /* DF - Tri-Optic */ + kHIDUsage_BCS_UCC_EAN_128 = 0xD5, /* DF - UCC/EAN-128 */ + kHIDUsage_BCS_CheckDigit = 0xD6, /* NArry - Check Digit */ + kHIDUsage_BCS_CheckDigitDisable = 0xD7, /* SEL - Check Digit Disable */ + kHIDUsage_BCS_CheckDigitEnableInterleaved2of5OPCC = 0xD8, /* SEL - Check Digit Enable Interleaved 2 of 5 OPCC */ + kHIDUsage_BCS_CheckDigitEnableInterleaved2of5USS = 0xD9, /* SEL - Check Digit Enable Interleaved 2 of 5 USS */ + kHIDUsage_BCS_CheckDigitEnableStandard2of5OPCC = 0xD8, /* SEL - Check Digit Enable Standard 2 of 5 OPCC */ + kHIDUsage_BCS_CheckDigitEnableStandard2of5USS = 0xD9, /* SEL - Check Digit Enable Standard 2 of 5 USS */ + kHIDUsage_BCS_CheckDigitEnableOneMSIPlessey = 0xDC, /* SEL - Check Digit Enable One MSI Plessey */ + kHIDUsage_BCS_CheckDigitEnableTwoMSIPlessey = 0xDD, /* SEL - Check Digit Enable Two MSI Plessey */ + kHIDUsage_BCS_CheckDigitCodabarEnable = 0xDE, /* SEL - Check Digit Codabar Enable */ + kHIDUsage_BCS_CheckDigitCode99Enable = 0xDF, /* SEL - Check Digit Code 99 Enable */ + /* Reserved 0xE0 - 0xEF */ + kHIDUsage_BCS_TransmitCheckDigit = 0xF0, /* NArry - Transmit Check Digit */ + kHIDUsage_BCS_DisableCheckDigitTransmit = 0xF1, /* SEL - Disable Check Digit Transmit */ + kHIDUsage_BCS_EnableCheckDigitTransmit = 0xF2, /* SEL - Enable Check Digit Transmit */ + /* Reserved 0xF3 - 0xFA */ + kHIDUsage_BCS_SymbologyIdentifier1 = 0xFB, /* DV - Symbology Identifier 1 */ + kHIDUsage_BCS_SymbologyIdentifier2 = 0xFC, /* DV - Symbology Identifier 2 */ + kHIDUsage_BCS_SymbologyIdentifier3 = 0xFD, /* DV - Symbology Identifier 3 */ + kHIDUsage_BCS_DecodedData = 0xFE, /* DV - Decoded Data */ + kHIDUsage_BCS_DecodeDataContinued = 0xFF, /* DF - Decode Data Continued */ + kHIDUsage_BCS_BarSpaceData = 0x100, /* DV - Bar Space Data */ + kHIDUsage_BCS_ScannerDataAccuracy = 0x101, /* DV - Scanner Data Accuracy */ + kHIDUsage_BCS_RawDataPolarity = 0x102, /* NArry - Raw Data Polarity */ + kHIDUsage_BCS_PolarityInvertedBarCode = 0x103, /* SEL - Polarity Inverted Bar Code */ + kHIDUsage_BCS_PolarityNormalBarCode = 0x103, /* SEL - Polarity Normal Bar Code */ + /* Reserved 0x105 */ + kHIDUsage_BCS_MinimumLengthToDecode = 0x106, /* DV - Minimum Length to Decode */ + kHIDUsage_BCS_MaximumLengthToDecode = 0x107, /* DV - Maximum Length to Decode */ + kHIDUsage_BCS_FirstDiscreteLengthToDecode = 0x108, /* DV - First Discrete Length to Decode */ + kHIDUsage_BCS_SecondDiscreteLengthToDecode = 0x109, /* DV - Second Discrete Length to Decode */ + kHIDUsage_BCS_DataLengthMethod = 0x10A, /* NArry - Data Length Method */ + kHIDUsage_BCS_DLMethodReadAny = 0x10B, /* DF - DL Method Read any */ + kHIDUsage_BCS_DLMethodCheckInRange = 0x10C, /* DF - DL Method Check in Range */ + kHIDUsage_BCS_DLMethodCheckForDiscrete = 0x10D, /* DF - DL Method Check for Discrete */ + /* Reserved 0x10E - 0x10F */ + kHIDUsage_BCS_AztecCode = 0x110, /* DF - Aztec Code */ + kHIDUsage_BCS_BC412 = 0x111, /* DF - BC412 */ + kHIDUsage_BCS_ChannelCode = 0x112, /* DF - Channel Code */ + kHIDUsage_BCS_Code16 = 0x113, /* DF - Code 16 */ + kHIDUsage_BCS_Code32 = 0x114, /* DF - Code 32 */ + kHIDUsage_BCS_Code49 = 0x115, /* DF - Code 49 */ + kHIDUsage_BCS_CodeOne = 0x116, /* DF - Code One */ + kHIDUsage_BCS_Colorcode = 0x117, /* DF - Colorcode */ + kHIDUsage_BCS_DataMatrix = 0x118, /* DF - Data Matrix */ + kHIDUsage_BCS_MaxiCode = 0x119, /* DF - MaxiCode */ + kHIDUsage_BCS_MicroPDF = 0x11A, /* DF - MicroPDF */ + kHIDUsage_BCS_PDF_417 = 0x11B, /* DF - PDF-417 */ + kHIDUsage_BCS_PosiCode = 0x11C, /* DF - PosiCode */ + kHIDUsage_BCS_QRCode = 0x11D, /* DF - QR Code */ + kHIDUsage_BCS_SuperCode = 0x11E, /* DF - SuperCode */ + kHIDUsage_BCS_UltraCode = 0x11F, /* DF - UltraCode */ + kHIDUsage_BCS_USB_5_SlugCode = 0x120, /* DF - USD-5 (Slug Code) */ + kHIDUsage_BCS_VeriCode = 0x121 /* DF - VeriCode */ + /* Reserved 0x122 - 0xFFFF */ +}; + +/* Weighing Devices Page (0x8D) */ +/* This section provides detailed descriptions of the usages employed by Weighing Devices. */ +enum +{ + kHIDUsage_WD_Undefined = 0x00, /* Weighing Device Undefined Usage */ + kHIDUsage_WD_WeighingDevice = 0x01, /* CA - Weighing Device */ + /* Reserved 0x02 - 0x1F */ + kHIDUsage_WD_ScaleScaleDevice = 0x20, /* CL - Scale Device */ + kHIDUsage_WD_ScaleScaleClassIMetricCL = 0x21, /* CL - Scale Class I Metric */ + kHIDUsage_WD_ScaleScaleClassIMetric = 0x22, /* SEL - Scale Class I Metric */ + kHIDUsage_WD_ScaleScaleClassIIMetric = 0x23, /* SEL - Scale Class II Metric */ + kHIDUsage_WD_ScaleScaleClassIIIMetric = 0x24, /* SEL - Scale Class III Metric */ + kHIDUsage_WD_ScaleScaleClassIIILMetric = 0x25, /* SEL - Scale Class IIIL Metric */ + kHIDUsage_WD_ScaleScaleClassIVMetric = 0x26, /* SEL - Scale Class IV Metric */ + kHIDUsage_WD_ScaleScaleClassIIIEnglish = 0x27, /* SEL - Scale Class III English */ + kHIDUsage_WD_ScaleScaleClassIIILEnglish = 0x28, /* SEL - Scale Class IIIL English */ + kHIDUsage_WD_ScaleScaleClassIVEnglish = 0x29, /* SEL - Scale Class IV English */ + kHIDUsage_WD_ScaleScaleClassGeneric = 0x2A, /* SEL - Scale Class Generic */ + /* Reserved 0x2B - 0x2F */ + kHIDUsage_WD_ScaleAtrributeReport = 0x30, /* CL - Scale Attribute Report */ + kHIDUsage_WD_ScaleControlReport = 0x31, /* CL - Scale Control Report */ + kHIDUsage_WD_ScaleDataReport = 0x32, /* CL - Scale Data Report */ + kHIDUsage_WD_ScaleStatusReport = 0x33, /* CL - Scale Status Report */ + kHIDUsage_WD_ScaleWeightLimitReport = 0x34, /* CL - Scale Weight Limit Report */ + kHIDUsage_WD_ScaleStatisticsReport = 0x35, /* CL - Scale Statistics Report */ + /* Reserved 0x36 - 0x3F */ + kHIDUsage_WD_DataWeight = 0x40, /* DV - Data Weight */ + kHIDUsage_WD_DataScaling = 0x41, /* DV - Data Scaling */ + /* Reserved 0x42 - 0x4F */ + kHIDUsage_WD_WeightUnit = 0x50, /* CL - Weight Unit */ + kHIDUsage_WD_WeightUnitMilligram = 0x51, /* SEL - Weight Unit Milligram */ + kHIDUsage_WD_WeightUnitGram = 0x52, /* SEL - Weight Unit Gram */ + kHIDUsage_WD_WeightUnitKilogram = 0x53, /* SEL - Weight Unit Kilogram */ + kHIDUsage_WD_WeightUnitCarats = 0x54, /* SEL - Weight Unit Carats */ + kHIDUsage_WD_WeightUnitTaels = 0x55, /* SEL - Weight Unit Taels */ + kHIDUsage_WD_WeightUnitGrains = 0x56, /* SEL - Weight Unit Grains */ + kHIDUsage_WD_WeightUnitPennyweights = 0x57, /* SEL - Weight Unit Pennyweights */ + kHIDUsage_WD_WeightUnitMetricTon = 0x58, /* SEL - Weight Unit Metric Ton */ + kHIDUsage_WD_WeightUnitAvoirTon = 0x59, /* SEL - Weight Unit Avoir Ton */ + kHIDUsage_WD_WeightUnitTroyOunce = 0x5A, /* SEL - Weight Unit Troy Ounce */ + kHIDUsage_WD_WeightUnitOunce = 0x5B, /* SEL - Weight Unit Ounce */ + kHIDUsage_WD_WeightUnitPound = 0x5C, /* SEL - Weight Unit Pound */ + /* Reserved 0x5D - 0x5F */ + kHIDUsage_WD_CalibrationCount = 0x60, /* DV - Calibration Count */ + kHIDUsage_WD_RezeroCount = 0x61, /* DV - Re-Zero Count*/ + /* Reserved 0x62 - 0x6F */ + kHIDUsage_WD_ScaleStatus = 0x70, /* CL - Scale Status */ + kHIDUsage_WD_ScaleStatusFault = 0x71, /* SEL - Scale Status Fault */ + kHIDUsage_WD_ScaleStatusStableAtZero = 0x72, /* SEL - Scale Status Stable at Center of Zero */ + kHIDUsage_WD_ScaleStatusInMotion = 0x73, /* SEL - Scale Status In Motion */ + kHIDUsage_WD_ScaleStatusWeightStable = 0x74, /* SEL - Scale Status Weight Stable */ + kHIDUsage_WD_ScaleStatusUnderZero = 0x75, /* SEL - Scale Status Under Zero */ + kHIDUsage_WD_ScaleStatusOverWeightLimit = 0x76, /* SEL - Scale Status Over Weight Limit */ + kHIDUsage_WD_ScaleStatusRequiresCalibration = 0x77, /* SEL - Scale Status Requires Calibration */ + kHIDUsage_WD_ScaleStatusRequiresRezeroing = 0x78, /* SEL - Scale Status Requires Re-zeroing */ + /* Reserved 0x79 - 0x7F */ + kHIDUsage_WD_ZeroScale = 0x80, /* OOC - Zero Scale */ + kHIDUsage_WD_EnforcedZeroReturn = 0x81 /* OOC - Enforced Zero Return */ + /* Reserved 0x82 - 0xFFFF */ + +}; + +/* Magnetic Stripe Reader Page (0x8E) */ +/* This section provides detailed descriptions of the usages employed by Magnetic Stripe Reader Devices. */ +enum +{ + kHIDUsage_MSR_Undefined = 0x00, /* MagStripe Undefined Usage */ + kHIDUsage_MSR_DeviceReadOnly = 0x01, /* CA - MSR Device Read-Only */ + /* Reserved 0x02 - 0x10 */ + kHIDUsage_MSR_Track1Length = 0x11, /* SF, DF, SEL - Track 1 Length */ + kHIDUsage_MSR_Track2Length = 0x12, /* SF, DF, SEL - Track 2 Length */ + kHIDUsage_MSR_Track3Length = 0x13, /* SF, DF, SEL - Track 3 Length */ + kHIDUsage_MSR_TrackJISLength = 0x14, /* SF, DF, SEL - Track JIS Length */ + /* Reserved 0x15 - 0x1F */ + kHIDUsage_MSR_TrackData = 0x20, /* SF, DF, SEL - Track Data */ + kHIDUsage_MSR_Track1Data = 0x21, /* SF, DF, SEL - Track 1 Data */ + kHIDUsage_MSR_Track2Data = 0x22, /* SF, DF, SEL - Track 2 Data */ + kHIDUsage_MSR_Track3Data = 0x23, /* SF, DF, SEL - Track 3 Data */ + kHIDUsage_MSR_TrackJISData = 0x24 /* SF, DF, SEL - Track JIS Data */ + /* Reserved 0x25 - 0xFFFF */ +}; + +#endif /* _IOHIDUSAGETABLES_H */ diff --git a/i386/include/IOKit/hidevent/IOHIDEventDriver.h b/i386/include/IOKit/hidevent/IOHIDEventDriver.h new file mode 100644 index 0000000..9eddb24 --- /dev/null +++ b/i386/include/IOKit/hidevent/IOHIDEventDriver.h @@ -0,0 +1,171 @@ +/* + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_HID_IOHIDEVENTDRIVER_H +#define _IOKIT_HID_IOHIDEVENTDRIVER_H + +#include +#include +#include +#include + + +/*! @class IOHIDEventDriver : public IOHIDEventService + @abstract + @discussion +*/ +struct IOHIDReportHandler; + +class IOHIDEventDriver: public IOHIDEventService +{ + OSDeclareDefaultStructors( IOHIDEventDriver ) + +private: + IOHIDInterface * _interface; + IOHIDReportHandler * _reportHandlers; + + IOHIDElement * _ledElements[2]; + OSArray * _supportedElements; + + UInt32 _bootSupport; + bool _multipleReports; + bool _relativeButtonCollection; + UInt32 _cachedButtonState; + bool _cachedRangeState; + + struct ExpansionData { + }; + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * _reserved; + + bool findElements ( OSArray * elementArray, UInt32 bootProtocol ); + + bool storeReportElement ( IOHIDElement * element ); + + void handleBootPointingReport ( + IOMemoryDescriptor * report, + SInt32 * dX, + SInt32 * dY, + UInt32 * buttonState); + + static void _handleInterruptReport ( + OSObject * target, + AbsoluteTime timeStamp, + IOMemoryDescriptor * report, + IOHIDReportType reportType, + UInt32 reportID, + void * refcon); + +protected: + + virtual void free(); + + virtual OSArray * getReportElements(); + + virtual bool handleStart( IOService * provider ); + + virtual void handleStop( IOService * provider ); + + virtual void handleInterruptReport ( + AbsoluteTime timeStamp, + IOMemoryDescriptor * report, + IOHIDReportType reportType, + UInt32 reportID); + + virtual OSString * getTransport (); + + virtual UInt32 getLocationID (); + + virtual UInt32 getVendorID (); + + virtual UInt32 getVendorIDSource (); + + virtual UInt32 getProductID (); + + virtual UInt32 getVersion (); + + virtual UInt32 getCountryCode (); + + virtual OSString * getManufacturer (); + + virtual OSString * getProduct (); + + virtual OSString * getSerialNumber (); + + virtual void setElementValue ( + UInt32 usagePage, + UInt32 usage, + UInt32 value ); + + virtual UInt32 getElementValue ( + UInt32 usagePage, + UInt32 usage ); + +public: + + + virtual bool init( OSDictionary * dictionary = 0 ); + + virtual bool didTerminate( + IOService * provider, + IOOptionBits options, + bool * defer ); + + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 0); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 1); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 2); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 3); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 4); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 5); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 6); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 7); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 8); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 9); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 10); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 11); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 12); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 13); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 14); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 15); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 16); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 17); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 18); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 19); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 20); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 21); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 22); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 23); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 24); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 25); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 26); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 27); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 28); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 29); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 30); + OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 31); + +}; + +#endif /* !_IOKIT_HID_IOHIDEVENTDRIVER_H */ diff --git a/i386/include/IOKit/hidevent/IOHIDEventService.h b/i386/include/IOKit/hidevent/IOHIDEventService.h new file mode 100644 index 0000000..bc82511 --- /dev/null +++ b/i386/include/IOKit/hidevent/IOHIDEventService.h @@ -0,0 +1,394 @@ +/* + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2009 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_HID_IOHIDEVENTSERVICE_H +#define _IOKIT_HID_IOHIDEVENTSERVICE_H + +#include + +#include +#include +#include +#include +#include +#include +#include + +#if TARGET_OS_EMBEDDED + #include +#endif + +enum +{ + kHIDDispatchOptionPointerNoAcceleration = 0x01, + kHIDDispatchOptionPointerAffixToScreen = 0x02, + kHIDDispatchOptionPointerAbsolutToRelative = 0x04 +}; + +enum +{ + kHIDDispatchOptionScrollNoAcceleration = 0x01, + kHIDDispatchOptionScrollMomentumContinue = 0x02, + kHIDDispatchOptionScrollMomentumStart = 0x04, + kHIDDispatchOptionScrollMomentumEnd = 0x08, + + kHIDDispatchOptionScrollMomentumAny = kHIDDispatchOptionScrollMomentumContinue | kHIDDispatchOptionScrollMomentumStart | kHIDDispatchOptionScrollMomentumEnd +}; + +enum +{ + kHIDDispatchOptionKeyboardNoRepeat = 0x01 +}; + +/*! @class IOHIDEventService : public IOService + @abstract + @discussion +*/ +class IOHIDPointing; +class IOHIDKeyboard; +class IOHIDConsumer; +struct TransducerData; + +class IOHIDEventService: public IOService +{ + OSDeclareAbstractStructors( IOHIDEventService ) + + friend class IOHIDPointing; + friend class IOHIDKeyboard; + friend class IOHIDConsumer; + friend class AppleEmbeddedKeyboard; + friend class IOHIDEventServiceUserClient; + +private: + IOHIDKeyboard * _keyboardNub; + IOHIDPointing * _pointingNub; + IOHIDConsumer * _consumerNub; + + IONotifier * _publishNotify; + IORecursiveLock * _nubLock; + + OSArray * _transducerDataArray; + + bool _readyForInputReports; + + + struct ExpansionData { + IOService * provider; + IOWorkLoop * workLoop; + UInt32 ejectDelayMS; + IOTimerEventSource * ejectTimerEventSource; + UInt32 ejectState; + IOOptionBits ejectOptions; + UInt32 capsDelayMS; + IOTimerEventSource * capsTimerEventSource; + UInt32 capsState; + IOOptionBits capsOptions; + OSArray * deviceUsagePairs; + +#if TARGET_OS_EMBEDDED + OSDictionary * clientDict; + UInt32 debuggerMask; + UInt32 startDebuggerMask; + IOTimerEventSource * debuggerTimerEventSource; + bool shouldSwapISO; +#endif + }; + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * _reserved; + + IOHIDPointing * newPointingShim ( + UInt32 buttonCount = 1, + IOFixed pointerResolution = (400 << 16), + IOFixed scrollResolution = 0, + IOOptionBits options = 0 ); + + IOHIDKeyboard * newKeyboardShim ( + UInt32 supportedModifiers = 0, + IOOptionBits options = 0 ); + + IOHIDConsumer * newConsumerShim ( IOOptionBits options = 0 ); + + void parseSupportedElements ( + OSArray * elementArray, + UInt32 bootProtocol ); + + void processTabletElement ( IOHIDElement * element ); + + void processTransducerData (); + + TransducerData * createTransducerData ( UInt32 tranducerID ); + + TransducerData * getTransducerData ( UInt32 tranducerID ); + + IOFixed determineResolution ( IOHIDElement * element ); + + static bool _publishMatchingNotificationHandler(void * target, void * ref, IOService * newService, IONotifier * notifier); + + void ejectTimerCallback(IOTimerEventSource *sender); + + void capsTimerCallback(IOTimerEventSource *sender); + +#if TARGET_OS_EMBEDDED + void debuggerTimerCallback(IOTimerEventSource *sender); +#endif + void calculateCapsLockDelay(); + + void calculateStandardType(); + +protected: + + virtual void free(); + +/*! @function handleOpen + @abstract Handle a client open on the interface. + @discussion This method is called by IOService::open() with the + arbitration lock held, and must return true to accept the client open. + This method will in turn call handleClientOpen() to qualify the client + requesting the open. + @param client The client object that requested the open. + @param options Options passed to IOService::open(). + @param argument Argument passed to IOService::open(). + @result true to accept the client open, false otherwise. */ + + virtual bool handleOpen(IOService * client, + IOOptionBits options, + void * argument); + +/*! @function handleClose + @abstract Handle a client close on the interface. + @discussion This method is called by IOService::close() with the + arbitration lock held. This method will in turn call handleClientClose() + to notify interested subclasses about the client close. If this represents + the last close, then the interface will also close the controller before + this method returns. The controllerWillClose() method will be called before + closing the controller. Subclasses should not override this method. + @param client The client object that requested the close. + @param options Options passed to IOService::close(). */ + + virtual void handleClose(IOService * client, IOOptionBits options); + +/*! @function handleIsOpen + @abstract Query whether a client has an open on the interface. + @discussion This method is always called by IOService with the + arbitration lock held. Subclasses should not override this method. + @result true if the specified client, or any client if none (0) is + specified, presently has an open on this object. */ + + virtual bool handleIsOpen(const IOService * client) const; + +/*! @function handleStart + @abstract Prepare the hardware and driver to support I/O operations. + @discussion IOHIDEventService will call this method from start() before + any I/O operations are issued to the concrete subclass. Methods + such as getReportElements() are only called after handleStart() + has returned true. A subclass that overrides this method should + begin its implementation by calling the version in super, and + then check the return value. + @param provider The provider argument passed to start(). + @result True on success, or false otherwise. Returning false will + cause start() to fail and return false. */ + + virtual bool handleStart( IOService * provider ); + +/*! @function handleStop + @abstract Quiesce the hardware and stop the driver. + @discussion IOHIDEventService will call this method from stop() to + signal that the hardware should be quiesced and the driver stopped. + A subclass that overrides this method should end its implementation + by calling the version in super. + @param provider The provider argument passed to stop(). */ + + virtual void handleStop( IOService * provider ); + + virtual OSString * getTransport (); + virtual UInt32 getLocationID (); + virtual UInt32 getVendorID (); + virtual UInt32 getVendorIDSource (); + virtual UInt32 getProductID (); + virtual UInt32 getVersion (); + virtual UInt32 getCountryCode (); + virtual OSString * getManufacturer (); + virtual OSString * getProduct (); + virtual OSString * getSerialNumber (); + + virtual OSArray * getReportElements(); + + virtual void setElementValue ( + UInt32 usagePage, + UInt32 usage, + UInt32 value ); + + virtual UInt32 getElementValue ( + UInt32 usagePage, + UInt32 usage ); + + virtual void dispatchKeyboardEvent( + AbsoluteTime timeStamp, + UInt32 usagePage, + UInt32 usage, + UInt32 value, + IOOptionBits options = 0 ); + + virtual void dispatchRelativePointerEvent( + AbsoluteTime timeStamp, + SInt32 dx, + SInt32 dy, + UInt32 buttonState, + IOOptionBits options = 0 ); + + virtual void dispatchAbsolutePointerEvent( + AbsoluteTime timeStamp, + SInt32 x, + SInt32 y, + IOGBounds * bounds, + UInt32 buttonState, + bool inRange, + SInt32 tipPressure, + SInt32 tipPressureMin, + SInt32 tipPressureMax, + IOOptionBits options = 0 ); + + virtual void dispatchScrollWheelEvent( + AbsoluteTime timeStamp, + SInt32 deltaAxis1, + SInt32 deltaAxis2, + SInt32 deltaAxis3, + IOOptionBits options = 0 ); + + virtual void dispatchTabletPointerEvent( + AbsoluteTime timeStamp, + UInt32 tranducerID, + SInt32 x, + SInt32 y, + SInt32 z, + IOGBounds * bounds, + UInt32 buttonState, + SInt32 tipPressure, + SInt32 tipPressureMin, + SInt32 tipPressureMax, + SInt32 barrelPressure, + SInt32 barrelPressureMin, + SInt32 barrelPressureMax, + SInt32 tiltX, + SInt32 tiltY, + UInt32 twist, + IOOptionBits options = 0 ); + + virtual void dispatchTabletProximityEvent( + AbsoluteTime timeStamp, + UInt32 tranducerID, + bool inRange, + bool invert, + UInt32 vendorTransducerUniqueID = 0, + UInt32 vendorTransducerSerialNumber = 0, + IOOptionBits options = 0 ); + +public: + bool readyForReports(); + + virtual bool init(OSDictionary * properties = 0); + + virtual bool start( IOService * provider ); + + virtual void stop( IOService * provider ); + + virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); + + virtual IOReturn setSystemProperties( OSDictionary * properties ); + + virtual IOReturn setProperties( OSObject * properties ); + +protected: + OSMetaClassDeclareReservedUsed(IOHIDEventService, 0); + virtual OSArray * getDeviceUsagePairs(); + + +#if TARGET_OS_EMBEDDED +public: + typedef void (*Action)(OSObject *target, OSObject * sender, void *context, OSObject *event, IOOptionBits options); + + OSMetaClassDeclareReservedUsed(IOHIDEventService, 1); + virtual bool open( + IOService * client, + IOOptionBits options, + void * context, + Action action); + +protected: + OSMetaClassDeclareReservedUsed(IOHIDEventService, 2); + virtual void dispatchEvent(IOHIDEvent * event, IOOptionBits options=0); + + OSMetaClassDeclareReservedUsed(IOHIDEventService, 3); + virtual UInt32 getPrimaryUsagePage(); + + OSMetaClassDeclareReservedUsed(IOHIDEventService, 4); + virtual UInt32 getPrimaryUsage(); + + OSMetaClassDeclareReservedUsed(IOHIDEventService, 5); + virtual UInt32 getReportInterval(); + +public: + OSMetaClassDeclareReservedUsed(IOHIDEventService, 6); + virtual IOHIDEvent * copyEvent( + IOHIDEventType type, + IOHIDEvent * matching = 0, + IOOptionBits options = 0); +#else + OSMetaClassDeclareReservedUnused(IOHIDEventService, 1); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 2); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 3); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 4); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 5); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 6); +#endif + OSMetaClassDeclareReservedUnused(IOHIDEventService, 7); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 8); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 9); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 10); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 11); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 12); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 13); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 14); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 15); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 16); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 17); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 18); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 19); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 20); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 21); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 22); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 23); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 24); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 25); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 26); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 27); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 28); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 29); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 30); + OSMetaClassDeclareReservedUnused(IOHIDEventService, 31); + +}; + +#endif /* !_IOKIT_HID_IOHIDEVENTSERVICE_H */ diff --git a/i386/include/IOKit/hidsystem/IOHIDDescriptorParser.h b/i386/include/IOKit/hidsystem/IOHIDDescriptorParser.h new file mode 100644 index 0000000..0a32647 --- /dev/null +++ b/i386/include/IOKit/hidsystem/IOHIDDescriptorParser.h @@ -0,0 +1,939 @@ +/* + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef __IOHIDDescriptorParser__ +#define __IOHIDDescriptorParser__ + +#include +#include +#include +#if !TARGET_OS_EMBEDDED + #include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#if TARGET_OS_EMBEDDED +/* Types and enums required by these functions but not in IOTypes.h */ + +typedef UInt8 Byte; +typedef SInt8 SignedByte; +typedef unsigned long FourCharCode; +typedef FourCharCode OSType; +typedef UInt32 ByteCount; + +enum { + noErr = 0 +}; +#endif + +/* End missing types and enums */ + +enum +{ + kHIDSuccess = 0, + +/* HID assigned error numbers are -13949 .. -13900 */ + kHIDBaseError = -13950, + + kHIDNullStateErr, + kHIDBufferTooSmallErr, + kHIDValueOutOfRangeErr, + kHIDUsageNotFoundErr, + kHIDNotValueArrayErr, + kHIDInvalidPreparsedDataErr, + kHIDIncompatibleReportErr, + kHIDBadLogPhysValuesErr, + kHIDInvalidReportTypeErr, + kHIDInvalidReportLengthErr, + kHIDNullPointerErr, + kHIDBadParameterErr, + kHIDNotEnoughMemoryErr, + kHIDEndOfDescriptorErr, + kHIDUsagePageZeroErr, + kHIDBadLogicalMinimumErr, + kHIDBadLogicalMaximumErr, + kHIDInvertedLogicalRangeErr, + kHIDInvertedPhysicalRangeErr, + kHIDUnmatchedUsageRangeErr, + kHIDInvertedUsageRangeErr, + kHIDUnmatchedStringRangeErr, + kHIDUnmatchedDesignatorRangeErr, + kHIDReportSizeZeroErr, + kHIDReportCountZeroErr, + kHIDReportIDZeroErr, + kHIDInvalidRangePageErr, + + // + // HID device driver errors + // + + kHIDDeviceNotReady = -13910, // The device is still initializing, try again later + kHIDVersionIncompatibleErr, +}; + +// types of HID reports (input, output, feature) +enum +{ + kHIDInputReport = 1, + kHIDOutputReport, + kHIDFeatureReport, + kHIDUnknownReport = 255 +}; + +// flags passed to HIDOpenReportDescriptor +enum +{ + kHIDFlag_StrictErrorChecking = 0x00000001 +}; + +typedef UInt32 HIDReportType; +typedef UInt32 HIDUsage; + +typedef void *HIDPreparsedDataRef; + +/*! + @typedef HIDUsageAndPage + @abstract The HIDUsageAndPage data structure is used by HID clients when obtaining status of buttons to hold the usage page and usage of a button that is down. + @discussion Clients use the HIDUSageAndPage structure with the HIDGetButtonsEx function to obtain both the usage page and usage identifiers of each button that is down. + @field usage Specifies the usage identifier within the usage page specified by usagePage of a button that is down. + @field usagePage Specifies the usage page identifier of a button that is down. + */ +struct HIDUsageAndPage +{ + HIDUsage usage; + HIDUsage usagePage; +}; +typedef struct HIDUsageAndPage HIDUsageAndPage, *HIDUsageAndPagePtr; + +/*! + @typedef HIDCaps + @abstract The HIDCaps data structure is used by HID clients to hold the capabilities of a HID device. + @discussion This structure holds the parsed capabilities and data maximums returned for a device by the HIDGetCaps function. + @field usage Specifies the specific class of functionality that this device provides. This value is dependent and specific to the value provided in the usagePage field. For example, a keyboard could have a usagePage of kHIDUsagePage_Generic and a usage of kHIDUsage_Generic_Keyboard. + @field usagePage Specifies the usage page identifier for this top level collection. + @field inputReportByteLength Specifies the maximum length, in bytes, of an input report for this device, including the report ID which is unilaterally prepended to the device data. + @field outputReportByteLength Specifies the maximum length, in bytes, of an output report for this device, including the report ID which is unilaterally prepended to the device data. + @field featureReportByteLength Specifies the maximum length, in bytes, of a feature report for this device, including the report ID which is unilaterally prepended to the device data. + @field numberCollectionNodes Specifies the number of HIDCollectionNode structures that are returned for this top level collection by the HIDGetConnectionNodes function. + @field numberInputButtonCaps Specifies the number of input buttons. + @field numberInputValueCaps Specifies the number of input values. + @field numberOutputButtonCaps Specifies the number of output buttons. + @field numberOutputValueCaps Specifies the number of output values + @field numberFeatureButtonCaps Specifies the number of feature buttons. + @field numberFeatureValueCaps Specifies the number of feature values. + */ +struct HIDCaps +{ + HIDUsage usage; + HIDUsage usagePage; + ByteCount inputReportByteLength; + ByteCount outputReportByteLength; + ByteCount featureReportByteLength; + UInt32 numberCollectionNodes; + UInt32 numberInputButtonCaps; + UInt32 numberInputValueCaps; + UInt32 numberOutputButtonCaps; + UInt32 numberOutputValueCaps; + UInt32 numberFeatureButtonCaps; + UInt32 numberFeatureValueCaps; +}; +typedef struct HIDCaps HIDCaps, * HIDCapsPtr; + +struct HIDCapabilities { + HIDUsage usage; + HIDUsage usagePage; + ByteCount inputReportByteLength; + ByteCount outputReportByteLength; + ByteCount featureReportByteLength; + UInt32 numberCollectionNodes; + UInt32 numberInputButtonCaps; + UInt32 numberInputValueCaps; + UInt32 numberOutputButtonCaps; + UInt32 numberOutputValueCaps; + UInt32 numberFeatureButtonCaps; + UInt32 numberFeatureValueCaps; +}; +typedef struct HIDCapabilities HIDCapabilities, * HIDCapabilitiesPtr; + + +struct HIDCollectionNode +{ + HIDUsage collectionUsage; + HIDUsage collectionUsagePage; + UInt32 parent; + UInt32 numberOfChildren; + UInt32 nextSibling; + UInt32 firstChild; +}; +typedef struct HIDCollectionNode HIDCollectionNode, * HIDCollectionNodePtr; + +struct HIDButtonCaps +{ + HIDUsage usagePage; + UInt32 reportID; + UInt32 bitField; + UInt32 collection; + HIDUsage collectionUsage; + HIDUsage collectionUsagePage; + Boolean isRange; + Boolean isStringRange; + Boolean isDesignatorRange; + Boolean isAbsolute; + SInt32 startBit; // Added esb 9-29-99 + + union + { + struct + { + HIDUsage usageMin; + HIDUsage usageMax; + UInt32 stringMin; + UInt32 stringMax; + UInt32 designatorMin; + UInt32 designatorMax; + } range; + struct + { + HIDUsage usage; + HIDUsage reserved1; + UInt32 stringIndex; + UInt32 reserved2; + UInt32 designatorIndex; + UInt32 reserved3; + } notRange; + } u; +}; +typedef struct HIDButtonCaps HIDButtonCaps, * HIDButtonCapsPtr; + +struct HIDButtonCapabilities +{ + HIDUsage usagePage; + UInt32 reportID; + UInt32 bitField; + UInt32 collection; + HIDUsage collectionUsage; + HIDUsage collectionUsagePage; + Boolean isRange; + Boolean isStringRange; + Boolean isDesignatorRange; + Boolean isAbsolute; + + SInt32 unitExponent; // Added KH 1/25/01 + SInt32 units; // Added KH 1/25/01 +// UInt32 reserved; // Not added KH 1/25/01 + SInt32 startBit; // Added esb 9-29-99 + UInt32 pbVersion; // Added KH 1/25/01 + + union + { + struct + { + HIDUsage usageMin; + HIDUsage usageMax; + UInt32 stringMin; + UInt32 stringMax; + UInt32 designatorMin; + UInt32 designatorMax; + } range; + struct + { + HIDUsage usage; + HIDUsage reserved1; + UInt32 stringIndex; + UInt32 reserved2; + UInt32 designatorIndex; + UInt32 reserved3; + } notRange; + } u; +}; +typedef struct HIDButtonCapabilities HIDButtonCapabilities, * HIDButtonCapabilitiesPtr; + +struct HIDValueCaps +{ + HIDUsage usagePage; + UInt32 reportID; + UInt32 bitField; + UInt32 collection; + HIDUsage collectionUsage; + HIDUsage collectionUsagePage; + + Boolean isRange; + Boolean isStringRange; + Boolean isDesignatorRange; + Boolean isAbsolute; + + UInt32 startBit; // Added by esb 9-28-99 + UInt32 bitSize; + UInt32 reportCount; + + SInt32 logicalMin; + SInt32 logicalMax; + SInt32 physicalMin; + SInt32 physicalMax; + + union + { + struct + { + HIDUsage usageMin; + HIDUsage usageMax; + UInt32 stringMin; + UInt32 stringMax; + UInt32 designatorMin; + UInt32 designatorMax; + } range; + struct + { + HIDUsage usage; + HIDUsage reserved1; + UInt32 stringIndex; + UInt32 reserved2; + UInt32 designatorIndex; + UInt32 reserved3; + } notRange; + } u; +}; +typedef struct HIDValueCaps HIDValueCaps, * HIDValueCapsPtr; + +struct HIDValueCapabilities +{ + HIDUsage usagePage; + UInt32 reportID; + UInt32 bitField; + UInt32 collection; + HIDUsage collectionUsage; + HIDUsage collectionUsagePage; + + Boolean isRange; + Boolean isStringRange; + Boolean isDesignatorRange; + Boolean isAbsolute; + + UInt32 bitSize; + UInt32 reportCount; + + SInt32 logicalMin; + SInt32 logicalMax; + SInt32 physicalMin; + SInt32 physicalMax; + + SInt32 unitExponent; // Added KH 1/25/01 + SInt32 units; // Added KH 1/25/01 +// UInt32 reserved; // Not added KH 1/25/01 + SInt32 startBit; // Added esb 9-29-99 // Moved here KH 1/25/01 + UInt32 pbVersion; // Added KH 1/25/01 + + union + { + struct + { + HIDUsage usageMin; + HIDUsage usageMax; + UInt32 stringMin; + UInt32 stringMax; + UInt32 designatorMin; + UInt32 designatorMax; + } range; + struct + { + HIDUsage usage; + HIDUsage reserved1; + UInt32 stringIndex; + UInt32 reserved2; + UInt32 designatorIndex; + UInt32 reserved3; + } notRange; + } u; +}; +typedef struct HIDValueCapabilities HIDValueCapabilities, * HIDValueCapabilitiesPtr; + +/*! + @function HIDOpenReportDescriptor + @abstract The HIDOpenReportDescriptor function allocates the memory the parser needs to handle the given report descriptor, and then parses the report descriptor. + @discussion When the parsed information is no longer needed, clients should call the HIDCloseReportDescriptor function. + @param hidReportDescriptor Contains a pointer to the actual HID report descriptor from the USB device's firmware + @param descriptorLength The length of the HID report descriptor + @param preparsedDataRef Preparsed data reference to be used for subsequent function calls + @param flags Flags for this runction are kHIDFlag_StrictErrorChecking = 0x00000001 + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDOpenReportDescriptor (void * hidReportDescriptor, + ByteCount descriptorLength, + HIDPreparsedDataRef * preparsedDataRef, + UInt32 flags); + +/*! + @function HIDCloseReportDescriptor + @abstract Disposes of the memory the parser allocated for the HIDOpenReportDescriptor function. + @param hidReportDescriptor Contains a pointer to the actual HID report descriptor from the USB device's firmware + @param preparsedDataRef Preparsed data reference for the report that is returned by the HIDOpenReportDescriptor function. After making a call to the HIDCloseReportDescriptor function, the preparsedDataRef is invalid and should not be used. + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDCloseReportDescriptor (HIDPreparsedDataRef preparsedDataRef); + +/*! + @function HIDGetButtonCaps + @abstract Returns the button capabilities structures for a HID device based on the given preparsed data. + @param reportType Specifies the type of report for which to retrieve the scaled value. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport + @param buttonCaps Points to a caller-allocated buffer that will contain, on return, an array of HIDButtonCaps structures. The structures contain information for all buttons that meet the search criteria + @param buttonCapsSize Contains the size of the buttonCaps array passed in to the function and is set to the number of elements actually placed in the array after the call completes. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDGetButtonCaps (HIDReportType reportType, + HIDButtonCapsPtr buttonCaps, + UInt32 * buttonCapsSize, + HIDPreparsedDataRef preparsedDataRef); + +/*! + @function HIDGetButtonCapabilities + @abstract Returns the button capabilities structures for a HID device based on the given preparsed data. + @param reportType Specifies the type of report for which to retrieve the scaled value. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport + @param buttonCaps Points to a caller-allocated buffer that will contain, on return, an array of HIDButtonCapabilities structures. The structures contain information for all buttons that meet the search criteria + @param buttonCapsSize Contains the size of the buttonCaps array passed in to the function and is set to the number of elements actually placed in the array after the call completes. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDGetButtonCapabilities (HIDReportType reportType, + HIDButtonCapabilitiesPtr buttonCaps, + UInt32 * buttonCapsSize, + HIDPreparsedDataRef preparsedDataRef); + +/*! + @function HIDGetCaps + @abstract Returns the capabilities of a HID device based on the given preparsed data. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @param capabilities Points to a caller allocated buffer, that upon return contains the parsed capability information for this HID device. + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDGetCaps (HIDPreparsedDataRef preparsedDataRef, + HIDCapsPtr capabilities); + +/*! + @function HIDGetCapabilities + @abstract Returns the capabilities of a HID device based on the given preparsed data. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @param capabilities Points to a caller allocated buffer, that upon return contains the parsed capability information for this HID device. + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDGetCapabilities (HIDPreparsedDataRef preparsedDataRef, + HIDCapabilitiesPtr capabilities); + +/*! + @function HIDGetCollectionNodes + @abstract Returns an array of HIDCollectionNode structures that describe the relationships and layout of the link collections within this top level collection. + @discussion The length of the buffer required, in array elements, for an entire collection node array is found in the HIDCaps structure member numberCollectionNodes. You obtain the HIDCaps information by calling the HIDGetCaps function. For information on the relationships of link collections described by the data returned from this routine, see the descripton of the HIDCollectionNode structure. + @param collectionNodes Points to a caller-allocated array of HIDCollectionNode structures in which this routine returns an entry for each collection within the top level collection. A collection is a group of corresponding HID descriptors containing input, output, and feature items that have some common relationship to one another. For example, a pointer collection contains items for x and y position data, and button data. + @param collectionNodesSize On input, specifies the length in array elements of the buffer provided at collectionNodes. On output, this parameter is set to the number of entries in the collectionNodes array that were initialized. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDGetCollectionNodes (HIDCollectionNodePtr collectionNodes, + UInt32 * collectionNodesSize, + HIDPreparsedDataRef preparsedDataRef); + +/*! + @function HIDGetScaledUsageValue + @abstract The HIDGetScaledUsageValue function returns the capabilities for all buttons for a given top level collection. + @discussion Clients who which to obtain all capabilities for a usage that contains multiple data items for a single usage that corresponds to a HID byte array, must call the HIDGetUsageValueArray function. + @param reportType Specifies the type of report for which to retrieve the scaled value. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. + @param usagePage Specifies the usage page of the value to be retrieved. + @param collection Optionally specifies the link collection identifier of the value to be retrieved. + @param usage Specifies the usage of the scaled value to be retrieved. + @param usageValue Points to a variable, that on return from this routine holds the scaled value retrieved from the device report. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @param report Points to the caller-allocated buffer that contains the device report data + @param reportLength Specifies the length, in bytes, of the report data provided at report + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDGetScaledUsageValue (HIDReportType reportType, + HIDUsage usagePage, + UInt32 collection, + HIDUsage usage, + SInt32 * usageValue, + HIDPreparsedDataRef preparsedDataRef, + void * report, + ByteCount reportLength); + +/*! + @function HIDGetSpecificButtonCaps + @abstract Retrieves the capabilities for all buttons in a specific type of report that meet the search criteria. + @discussion The HIDGetSpecificButtonCaps function retrieves capability data for buttons that meet a given search criteria, as opposed to the HIDGetButtonCaps function which returns the capability data for all buttons on the device. Calling this routine specifying zero for usagePage, usage and collection is equivalent to calling the HIDGetButtonCaps function. + @param reportType Specifies the type of report for which to retrieve the button capabilities. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. + @param usagePage Specifies a usage page identifier to use as a search criteria. If this parameter is non-zero, then only buttons that specify this usage page will be retrieved. + @param collection Specifies a link collection identifier to use as a search criteria. If this parameter is non-zero, then only buttons that are part of the specified link collection are retrieved. + @param usage Specifies a usage identifier to use as a search criteria. If this parameter is non-zero, then only buttons that match the value specified are retrieved. + @param buttonCaps Points to a caller-allocated buffer that will contain, on return, an array of HIDButtonCaps structures. The structures contain information for all buttons that meet the search criteria. + @param buttonCapsLength On input, specifies the length, in array elements, of the buffer provided in the buttonCaps parameter. On output, this parameter is set to the actual number of elements that were returned by the function call, in the buffer provided in the buttonCaps parameter, if the routine completed without error. The correct length necessary to retrieve the button capabilities can be found in the capability data returned for the device by the HIDGetCaps function. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDGetSpecificButtonCaps (HIDReportType reportType, + HIDUsage usagePage, + UInt32 collection, + HIDUsage usage, + HIDButtonCapsPtr buttonCaps, + UInt32 * buttonCapsSize, + HIDPreparsedDataRef preparsedDataRef); + +/*! + @function HIDGetSpecificButtonCapabilities + @abstract Retrieves the capabilities for all buttons in a specific type of report that meet the search criteria. + @discussion The HIDGetSpecificButtonCapabilities function retrieves capability data for buttons that meet a given search criteria, as opposed to the HIDGetButtonCapabilities function which returns the capability data for all buttons on the device. Calling this routine specifying zero for usagePage, usage and collection is equivalent to calling the HIDGetButtonCapabilities function. + @param reportType Specifies the type of report for which to retrieve the button capabilities. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. + @param usagePage Specifies a usage page identifier to use as a search criteria. If this parameter is non-zero, then only buttons that specify this usage page will be retrieved. + @param collection Specifies a link collection identifier to use as a search criteria. If this parameter is non-zero, then only buttons that are part of the specified link collection are retrieved. + @param usage Specifies a usage identifier to use as a search criteria. If this parameter is non-zero, then only buttons that match the value specified are retrieved. + @param buttonCaps Points to a caller-allocated buffer that will contain, on return, an array of HIDButtonCapabilities structures. The structures contain information for all buttons that meet the search criteria. + @param buttonCapsLength On input, specifies the length, in array elements, of the buffer provided in the buttonCaps parameter. On output, this parameter is set to the actual number of elements that were returned by the function call, in the buffer provided in the buttonCaps parameter, if the routine completed without error. The correct length necessary to retrieve the button capabilities can be found in the capability data returned for the device by the HIDGetCaps function. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDGetSpecificButtonCapabilities (HIDReportType reportType, + HIDUsage usagePage, + UInt32 collection, + HIDUsage usage, + HIDButtonCapabilitiesPtr buttonCaps, + UInt32 * buttonCapsSize, + HIDPreparsedDataRef preparsedDataRef); + +/*! + @function HIDGetSpecificValueCaps + @abstract Retrieves the capabilities for all values in a specific type of report that meet the search criteria. + @discussion The HIDGetSpecificValueCaps function retrieves capability data for values that meet given search criteria, as opposed to the HIDGetValueCaps function, which returns the capability data for all values on the device. Calling this routine with a value of zero for usagePage, usage and collection parameters is equivalent to calling the HIDGetValueCaps function. + @param reportType Specifies the type of report for which to retrieve the value capabilities. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport or kHIDFeatureReport. + @param usagePage Specifies a usage page identifier to use as a search criteria. If this parameter is non-zero, then only values that specify this usage page will be retrieved. + @param collection Specifies a link collection identifier to use as a search criteria. If this parameter is non-zero, then only values that are part of this link collection will be retrieved. + @param usage Specifies a usage identifier to use as a search criteria. If this parameter is non-zero, then only values that specify this usage will be retrieved. + @param valueCaps Points to a caller-allocated buffer that will contain, on return, an array of HIDValueCaps structures that contain information for all values that meet the search criteria. + @param valueCapsSize Specifies the length on input, in array elements, of the buffer provided in the valueCaps parameter. On output, this parameter is set to the actual number of elements that were returned by this function call, in the buffer provided in the valueCaps parameter, if the routine completed without error. The correct length necessary to retrieve the value capabilities can be found in the capability data returned for the device from the HIDGetCaps function. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDGetSpecificValueCaps (HIDReportType reportType, + HIDUsage usagePage, + UInt32 collection, + HIDUsage usage, + HIDValueCapsPtr valueCaps, + UInt32 * valueCapsSize, + HIDPreparsedDataRef preparsedDataRef); + +/*! + @function HIDGetSpecificValueCapabilities + @abstract Retrieves the capabilities for all values in a specific type of report that meet the search criteria. + @discussion The HIDGetSpecificValueCapabilities function retrieves capability data for values that meet given search criteria, as opposed to the HIDGetValueCapabilities function, which returns the capability data for all values on the device. Calling this routine with a value of zero for usagePage, usage and collection parameters is equivalent to calling the HIDGetValueCapabilities function. + @param reportType Specifies the type of report for which to retrieve the value capabilities. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport or kHIDFeatureReport. + @param usagePage Specifies a usage page identifier to use as a search criteria. If this parameter is non-zero, then only values that specify this usage page will be retrieved. + @param collection Specifies a link collection identifier to use as a search criteria. If this parameter is non-zero, then only values that are part of this link collection will be retrieved. + @param usage Specifies a usage identifier to use as a search criteria. If this parameter is non-zero, then only values that specify this usage will be retrieved. + @param valueCaps Points to a caller-allocated buffer that will contain, on return, an array of HIDValueCapabilities structures that contain information for all values that meet the search criteria. + @param valueCapsSize Specifies the length on input, in array elements, of the buffer provided in the valueCaps parameter. On output, this parameter is set to the actual number of elements that were returned by this function call, in the buffer provided in the valueCaps parameter, if the routine completed without error. The correct length necessary to retrieve the value capabilities can be found in the capability data returned for the device from the HIDGetCaps function. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDGetSpecificValueCapabilities (HIDReportType reportType, + HIDUsage usagePage, + UInt32 collection, + HIDUsage usage, + HIDValueCapabilitiesPtr valueCaps, + UInt32 * valueCapsSize, + HIDPreparsedDataRef preparsedDataRef); + +/*! + @function HIDGetButtonsOnPage + @abstract Retrieves the button stat information for buttons on a specified usage page. + @param reportType Specifies the type of report, provided in the report parameter, from which to retrieve the buttons. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport or kHIDFeatureReport. + @param usagePage Specifies the usage page of the buttons for which to retrieve the current state. + @param collection Optionally specifies the link collection identifier used to retrieve only specific button states. If this value is non-zero, only the buttons that are part of the given collection are returned. + @param usageList On return, points to a caller-allocated buffer that contains the usages of all the buttons that are perssed and belong to the usage page specified in the usagePage parameter. + @param usageListSize Is the size, in array elements, of the buffer provided in the usageList parameter. On return, this parameter contains the number of button states that were set by this routine. If the error kHIDBufferTooSmallErr was returned, this parameter contains the number of array elements required to hold all button data requested. The maximum number of buttons that can ever be returned for a given type of report can be obtained by calling the HIDMaxUsageListLength function. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @param report Points to the caller-allocated buffer that contains the device report data + @param reportLength Specifies the size, in bytes, of the report data provided in the report parameter + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDGetButtonsOnPage (HIDReportType reportType, + HIDUsage usagePage, + UInt32 collection, + HIDUsage * usageList, + UInt32 * usageListSize, + HIDPreparsedDataRef preparsedDataRef, + void * report, + ByteCount reportLength); + +/*! + @function HIDGetButtons + @abstract The HIDGetButtons function takes a report from a HID device and gets the current state of the buttons in that report. + @param reportType Specifies the type of report, provided in the report parameter, from which to retrieve the buttons. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport or kHIDFeatureReport + @param collection Optionally specifies the link collection identifier used to retrieve only specific button states. If this value is non-zero, only the buttons that are part of the given collection are returned. + @param usageList On return, points to a caller-allocated buffer that contains the usages of all the buttons that are pressed. + @param usageListSize Is the size, in array elements, of the buffer provided in the usageList parameter. On return, this parameter contains the number of button states that were set by this routine. If the error kHIDBufferToSmallErr was returned, this parameter contains the number of array elements required to hold all button data requested. The maximum number of buttons that can ever be returned for a given type of report can be obtained by calling the HIDMaxUsageListLength function. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @param report Points to the caller-allocated buffer that contains the device report data. + @param reportLength Specifies the length, in bytes, of the report data provided in the report parameter. + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDGetButtons (HIDReportType reportType, + UInt32 collection, + HIDUsageAndPagePtr usageList, + UInt32 * usageListSize, + HIDPreparsedDataRef preparsedDataRef, + void * report, + ByteCount reportLength); + +extern +OSStatus +HIDGetNextButtonInfo (HIDReportType reportType, + HIDUsage usagePage, + HIDUsage usage, + UInt32 * collection, + UInt8 * reportID, + HIDPreparsedDataRef preparsedDataRef); + +extern +OSStatus +HIDGetNextUsageValueInfo (HIDReportType reportType, + HIDUsage usagePage, + HIDUsage usage, + UInt32 * collection, + UInt8 * reportID, + HIDPreparsedDataRef preparsedDataRef); + +extern +OSStatus +HIDGetReportLength (HIDReportType reportType, + UInt8 reportID, + ByteCount * reportLength, + HIDPreparsedDataRef preparsedDataRef); + +/*! + @function HIDGetUsageValue + @abstract The HIDGetUsageValue function returns a value from a device data report given a selected search criteria. + @discussion The HIDGetUsageValue function does not sign the value. To have the sign bit automatically applied, use the HIDGetScaledUsageValue function instead. For manually assigning the sign bit, the position of the sign bit can be found in the HIDValueCaps structure for this value. Clients who wish to obtain all data for a usage that contains multiple data items for a single usage, corresponding to a HID byte array, must call the HIDGetUsageValueArray function instead. + @param reportType Specifies the type of report, provided in report, from which to retrieve the value. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. + @param usagePage Specifies the usage page of the value to retrieve. + @param collection Optionally specifies the link collection identifier of the value to be retrieved. + @param usage Specifies the usage of the value to be retrieved. + @param usageValue Points to a variable, that on return from this routine holds the value retrieved from the device report. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @param report Points to the caller-allocated buffer that contains the device report data. + @param reportLength Specifies the size, in bytes, of the report data provided in the report parameter. + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDGetUsageValue (HIDReportType reportType, + HIDUsage usagePage, + UInt32 collection, + HIDUsage usage, + SInt32 * usageValue, + HIDPreparsedDataRef preparsedDataRef, + void * report, + ByteCount reportLength); + +/*! + @function HIDGetUsageValueArray + @abstract The HIDGetUsageValueArray function returns a value from a device data report given a selected search criteria. + @discussion When the HIDGetUsageValueArray function retrieves the data, it fills in the buffer in little-endian order beginning with the least significant bit of the data for this usage. The data is filled in without regard to byte alignment and is shifted such that the least significant bit is placed as the 1st bit of the given buffer. + @param reportType Specifies the type of report, provided in report, from which to retrieve the value. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. + @param usagePage Specifies the usage page of the data to be retrieved. + @param collection Optionally specifies the link collection identifier of the data to be retrieved. + @param usage Specifies the usage identifier of the value to be retrieved. + @param usageValueBuffer Points to a caller-allocated buffer that contains, on output, the data from the device. The correct length for this buffer can be found by multiplying the reportCount and bitSize fields of the HIDValueCaps structure for the value and rounding the resulting value up to the nearest byte. + @param usageValueBufferSize Specifies the size, in bytes, of the buffer in the usageValueBuffer parameter. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @param report Points to the caller-allocated buffer that contains the device report data. + @param reportLength Specifies the size, in bytes, of the report data provided in report. + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDGetUsageValueArray (HIDReportType reportType, + HIDUsage usagePage, + UInt32 collection, + HIDUsage usage, + Byte * usageValueBuffer, + ByteCount usageValueBufferSize, + HIDPreparsedDataRef preparsedDataRef, + void * report, + ByteCount reportLength); + +/*! + @function HIDGetValueCaps + @abstract The HIDGetValueCaps function retrieves the capabilities for all values for a specified top level collection. + @discussion The HIDGetValueCaps function retrieves the capability data for all values in a top level collection without regard for the usage, usage page or collection of the value. To retrieve value capabilities for a specific usage, usage page or collection, use the HIDGetSpecificValueCaps function. + @param reportType Specifies the type of report for which to retrieve the value capabilities. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. + @param valueCaps On return, points to a caller-allocated buffer that contains an array of HIDValueCaps structures containing information for all values in the top level collection. + @param valueCapsSize On input, specifies the size in array elements of the buffer provided in the valueCaps parameter. On output, this parameter is set to the actual number of elements that were returned in the buffer provided in the valueCaps parameter, if the function completed without error. The correct length necessary to retrieve the value capabilities can be found in the capability data returned for the device by the HIDGetCaps function. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDGetValueCaps (HIDReportType reportType, + HIDValueCapsPtr valueCaps, + UInt32 * valueCapsSize, + HIDPreparsedDataRef preparsedDataRef); + +/*! + @function HIDGetValueCapabilities + @abstract The HIDGetValueCapabilities function retrieves the capabilities for all values for a specified top level collection. + @discussion The HIDGetValueCapabilities function retrieves the capability data for all values in a top level collection without regard for the usage, usage page or collection of the value. To retrieve value capabilities for a specific usage, usage page or collection, use the HIDGetSpecificValueCapabilities function. + @param reportType Specifies the type of report for which to retrieve the value capabilities. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. + @param valueCaps On return, points to a caller-allocated buffer that contains an array of HIDValueCapabilities structures containing information for all values in the top level collection. + @param valueCapsSize On input, specifies the size in array elements of the buffer provided in the valueCaps parameter. On output, this parameter is set to the actual number of elements that were returned in the buffer provided in the valueCaps parameter, if the function completed without error. The correct length necessary to retrieve the value capabilities can be found in the capability data returned for the device by the HIDGetCapabilities function. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDGetValueCapabilities (HIDReportType reportType, + HIDValueCapabilitiesPtr valueCaps, + UInt32 * valueCapsSize, + HIDPreparsedDataRef preparsedDataRef); + +extern +OSStatus +HIDInitReport (HIDReportType reportType, + UInt8 reportID, + HIDPreparsedDataRef preparsedDataRef, + void * report, + ByteCount reportLength); + +/*! + @function HIDMaxUsageListLength + @abstract The HIDMaxUsageListLength function returns the maximum number of buttons that can be returned from a given report type for the top level collection. + @param reportType Specifies the type of report for which to get a maximum usage count. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. + @param usagePage Optionally specifies the usage page identifier to use as a search criteria. If this parameter is zero, the function returns the number of buttons for the entire top-level collection regardless of the actual value of the usage page. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +UInt32 +HIDMaxUsageListLength (HIDReportType reportType, + HIDUsage usagePage, + HIDPreparsedDataRef preparsedDataRef); + +/*! + @function HIDSetScaledUsageValue + @abstract The HIDSetScaledUsageValue function takes a signed physical (scaled) number and converts it to the logical, or device representation and inserts it in a given report. + @discussion The HIDSetScaledUsageValue function automatically handles the setting of the signed bit in the data to be sent to the device. + @param reportType Specifies the type of report. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. + @param usagePage Specifies the usage page identifier of the value to be set in the report. + @param collection Optionally specifies the link collection identifier to distinguish between values that have the same usage page and usage identifiers. If this parameter is zero, it will be ignored. + @param usage Specifies the usage identifier of the value to be set in the report. + @param usageValue Specifies the physical, or scaled, value to be set in the value for the given report. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @param report Points to the caller-allocated buffer that contains the device report data. + @param Specifies the length, in bytes of the report data specified in the report parameter. + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDSetScaledUsageValue (HIDReportType reportType, + HIDUsage usagePage, + UInt32 collection, + HIDUsage usage, + SInt32 usageValue, + HIDPreparsedDataRef preparsedDataRef, + void * report, + ByteCount reportLength); + +/*! + @function HIDSetButtons + @abstract The HIDSetButtons function takes a report from a HID device and returns the current state of the buttons in that report. + @param reportType Specifies the type of repor. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. + @param usagePage Specifies the usage page identifier of the value to be set in the report. + @param collection Optionally specifies the link collection identifier to distinguish between buttons. If this parameter is zero, it is ignored. + @param usageList Points to a caller-allocated buffer that contains an array of button data to be set in the report in the report parameter. + @param usageListSize Specifies the size, in array elements, of the buffer provided in the usageList parameter. If an error is returned by a call to this function, the usageListLength parameter contains the location in the array provided in the usageList parameter where the error was encountered. All array entries encountered prior to the error location were successfully set in the report provided in the report parameter. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @param report Points to the caller-allocated buffer that contains the device report data. + @param reportLength Specifies the size, in bytes, of the report data provided in the report parameter. + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDSetButtons (HIDReportType reportType, + HIDUsage usagePage, + UInt32 collection, + HIDUsage * usageList, + UInt32 * usageListSize, + HIDPreparsedDataRef preparsedDataRef, + void * report, + ByteCount reportLength); + +/*! + @function HIDSetUsageValue + @abstract The HIDSetUsageValue function sets a value in a give report. + @discussion The HIDSetUsageVlaue function does not automatically handle the sign bit. Clients must either manually set the sign bit, at the position provided in the HIDValueCaps structure for this value, or call the HIDSetScaledUsageValue function. + @param reportType Specifies the type of report. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. + @param usagePage Specifies the usage page identifier of the value to be set in the report. + @param collection Optionally specifies the link collection identifier to distinguish between values that have the same usage page and usage identifiers. If this parameter is zero, it is ignored. + @param usage Specifies the usage identifier of the value to be set in the report. + @param usageValue Specifies the data that is to be set in the value for the given report. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @param report Points to the caller-allocated buffer that contains the device report data. + @param reportLength Specifies the size, in bytes, of the report data provided in the report parameter. + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDSetUsageValue (HIDReportType reportType, + HIDUsage usagePage, + UInt32 collection, + HIDUsage usage, + SInt32 usageValue, + HIDPreparsedDataRef preparsedDataRef, + void * report, + ByteCount reportLength); + +/*! + @function HIDSetUsageValueArray + @abstract The HIDSetUsageValueArray function sets an array of values in a given report. + @discussion The HIDSetUsageValue function does not automatically handle the sign bit. Clients must either manually set the sign bit, at the position provided in the HIDValueCaps structure for this value, or call the HIDSetScaledUsageValue function. + @param reportType Specifies the type of report. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. + @param usagePage Specifies the usage page identifier of the value to be set in the report. + @param collection Optionally specifies the link collection identifier to distinguish between values that have the same usage page and usage identifiers. If this parameter is zero, it is ignored. + @param usage Specifies the usage identifier of the value to be set in the report. + @param usageValueBuffer Points to a caller-allocated buffer that contains, on output, the data from the device. The correct length for this buffer can be found by multiplying the reportCount and bitSize fields of the HIDValueCaps structure for this value and rounding the resulting value up to the nearest byte. + @param usageValueBufferLength Specifies the size, in bytes, of the buffer in the usageValueBuffer parameter. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @param report Points to the caller-allocated buffer that contains the device report data. + @param reportLength Specifies the size, in bytes, of the report data provided in the report parameter. + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDSetUsageValueArray (HIDReportType reportType, + HIDUsage usagePage, + UInt32 collection, + HIDUsage usage, + Byte * usageValueBuffer, + ByteCount usageValueBufferLength, + HIDPreparsedDataRef preparsedDataRef, + void * report, + ByteCount reportLength); + +/*! + @function HIDUsageListDifference + @abstract The HIDUsageListDifference function compares and provides the differences between two lists of buttons. + @param previousUsageList Points to the older button list to be used for comparison. + @param currentUsageList Points to the newer button list to be used for comparison. + @param breakUsageList On return, points to a caller-allocated buffer that contains the buttons set in the older list, specified in the previousUsageList parameter, but not set in the new list, specified in the currentUsageList parameter. + @param makeUsageList On return, points to a caller-allocated buffer that contains the buttons set in the new list, specified in the currentUsageList parameter, but not set in the old list, specified in the previousUsageList parameter. + @param usageListsLength Specifies the length, in array elements, of the buffers provided in the currentUsageList and previousUssageList parameters. + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDUsageListDifference (HIDUsage * previousUsageList, + HIDUsage * currentUsageList, + HIDUsage * breakUsageList, + HIDUsage * makeUsageList, + UInt32 usageListsSize); + +/*! + @function HIDSetButton + @abstract The HIDSetButton function takes a report from a HID device and sets the current state of the specified button in that report. + @param reportType Specifies the type of report. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. + @param usagePage Specifies the usage page identifier of the value to be set in the report. + @param collection Optionally specifies the link collection identifier to distinguish between buttons. If this parameter is zero, it is ignored. + @param usage Points to a caller-allocated buffer that contains the button data to be set in the report in the report parameter. + @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function + @param report Points to the caller-allocated buffer that contains the device report data. + @param reportLength Specifies the size, in bytes, of the report data provided in the report parameter. + @result OSStatus Returns an error code if an error was encountered or noErr on success. + */ + +extern +OSStatus +HIDSetButton (HIDReportType reportType, + HIDUsage usagePage, + UInt32 collection, + HIDUsage usage, + HIDPreparsedDataRef preparsedDataRef, + void * report, + ByteCount reportLength); + + +#ifdef __cplusplus +} +#endif + + +#endif diff --git a/i386/include/IOKit/hidsystem/IOHIDParameter.h b/i386/include/IOKit/hidsystem/IOHIDParameter.h new file mode 100644 index 0000000..f528d03 --- /dev/null +++ b/i386/include/IOKit/hidsystem/IOHIDParameter.h @@ -0,0 +1,310 @@ +/* + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. + * + * evsio.h - Get/Set parameter calls for Event Status Driver. + * + * CAUTION: Developers should stick to the API exported in + * to guarantee + * binary compatability of their applications in future + * releases. + * + * HISTORY + * 22 May 1992 Mike Paquette at NeXT + * Created. + */ +#ifndef _DEV_EVSIO_H +#define _DEV_EVSIO_H + +/* Public type definitions. */ +#include +#include + +/* + * Identify this driver as one that uses the new driverkit and messaging API + */ +#ifndef _NeXT_MACH_EVENT_DRIVER_ +#define _NeXT_MACH_EVENT_DRIVER_ (1) +#endif /* !_NeXT_MACH_EVENT_DRIVER_ */ + +/* * */ + +#define kIOHIDKindKey "HIDKind" +#define kIOHIDInterfaceIDKey "HIDInterfaceID" +#define kIOHIDSubinterfaceIDKey "HIDSubinterfaceID" + +#define kIOHIDParametersKey "HIDParameters" + +#define kIOHIDVirtualHIDevice "HIDVirtualDevice" + +#define kIOHIDKeyRepeatKey "HIDKeyRepeat" +#define kIOHIDInitialKeyRepeatKey "HIDInitialKeyRepeat" +#define kIOHIDKeyMappingKey "HIDKeyMapping" +#define kIOHIDResetKeyboardKey "HIDResetKeyboard" + +#define kIOHIDKeyboardModifierMappingPairsKey "HIDKeyboardModifierMappingPairs" +#define kIOHIDKeyboardModifierMappingSrcKey "HIDKeyboardModifierMappingSrc" +#define kIOHIDKeyboardModifierMappingDstKey "HIDKeyboardModifierMappingDst" + +#define kIOHIDKeyboardCapsLockDoesLockKey "HIDKeyboardCapsLockDoesLock" +#define kIOHIDKeyboardSupportsF12EjectKey "HIDKeyboardSupportsF12Eject" +#define kIOHIDKeyboardSupportedModifiersKey "HIDKeyboardSupportedModifiers" + +#define kIOHIDPointerResolutionKey "HIDPointerResolution" +#define kIOHIDResetPointerKey "HIDResetPointer" +#define kIOHIDPointerConvertAbsoluteKey "HIDPointerConvertAbsolute" +#define kIOHIDPointerContactToMoveKey "HIDPointerContactToMove" +#define kIOHIDPointerPressureToClickKey "HIDPointerPressureToClick" +#define kIOHIDPointerButtonMode "HIDPointerButtonMode" +#define kIOHIDPointerButtonCountKey "HIDPointerButtonCount" + +#define kIOHIDPointerAccelerationKey "HIDPointerAcceleration" +#define kIOHIDPointerAccelerationSettingsKey "HIDPointerAccelerationSettings" +#define kIOHIDPointerAccelerationTypeKey "HIDPointerAccelerationType" +#define kIOHIDPointerAccelerationTableKey "HIDPointerAccelerationTable" + +#define kIOHIDScrollResetKey "HIDScrollReset" +#define kIOHIDScrollResolutionKey "HIDScrollResolution" +#define kIOHIDScrollReportRateKey "HIDScrollReportRate" +#define kIOHIDScrollAccelerationKey "HIDScrollAcceleration" +#define kIOHIDScrollAccelerationTypeKey "HIDScrollAccelerationType" +#define kIOHIDScrollAccelerationTableKey "HIDScrollAccelerationTable" + +#define kIOHIDScrollResolutionXKey "HIDScrollResolutionX" +#define kIOHIDScrollResolutionYKey "HIDScrollResolutionY" +#define kIOHIDScrollResolutionZKey "HIDScrollResolutionZ" + +#define kIOHIDScrollAccelerationTableXKey "HIDScrollAccelerationTableX" +#define kIOHIDScrollAccelerationTableYKey "HIDScrollAccelerationTableY" +#define kIOHIDScrollAccelerationTableZKey "HIDScrollAccelerationTableZ" + +#define kIOHIDScrollMouseButtonKey "HIDScrollMouseButton" + +#define kIOHIDScrollZoomModifierMaskKey "HIDScrollZoomModifierMask" + +#define kIOHIDTrackpadScrollAccelerationKey "HIDTrackpadScrollAcceleration" +#define kIOHIDMouseScrollAccelerationKey "HIDMouseScrollAcceleration" + +#define kIOHIDTrackpadAccelerationType "HIDTrackpadAcceleration" +#define kIOHIDMouseAccelerationType "HIDMouseAcceleration" + +#define kIOHIDClickTimeKey "HIDClickTime" +#define kIOHIDClickSpaceKey "HIDClickSpace" + +#define kIOHIDWaitCursorFrameIntervalKey "HIDWaitCursorFrameInterval" + +#define kIOHIDAutoDimThresholdKey "HIDAutoDimThreshold" +#define kIOHIDAutoDimStateKey "HIDAutoDimState" +#define kIOHIDAutoDimTimeKey "HIDAutoDimTime" +#define kIOHIDIdleTimeKey "HIDIdleTime" + +#define kIOHIDBrightnessKey "HIDBrightness" +#define kIOHIDAutoDimBrightnessKey "HIDAutoDimBrightness" + +#define kIOHIDFKeyModeKey "HIDFKeyMode" + +// if kIOHIDStickyKeysDisabledKey is 1, then all sticky keys functionality +// is completely turned off. Multiple shifts will have no effect. +#define kIOHIDStickyKeysDisabledKey "HIDStickyKeysDisabled" + +// if kIOHIDStickyKeysOnKey is 1 then a depressed modifier will stay down +// until a non-modifer key is pressed (or sticky keys is turned off) +#define kIOHIDStickyKeysOnKey "HIDStickyKeysOn" + +// if kIOHIDStickyKeysShiftTogglesKey is 1, then a sequence of five +// shift keys in sequence will toggle sticky keys on or off +#define kIOHIDStickyKeysShiftTogglesKey "HIDStickyKeysShiftToggles" + +// if kIOHIDMouseKeysOptionTogglesKey is 1, then a sequence of five +// option keys in sequence will toggle mouse keys on or off +#define kIOHIDMouseKeysOptionTogglesKey "HIDMouseKeysOptionToggles" + +// kIOHIDSlowKeysDelayKey represents the delay used for slow keys. +// if kIOHIDSlowKeysDelayKey is 0, then slow keys off +#define kIOHIDSlowKeysDelayKey "HIDSlowKeysDelay" + +#define kIOHIDF12EjectDelayKey "HIDF12EjectDelay" + +#define kIOHIDMouseKeysOnKey "HIDMouseKeysOn" + +#define kIOHIDUseKeyswitchKey "HIDUseKeyswitch" + +#define kIOHIDDisallowRemappingOfPrimaryClickKey "HIDDisallowRemappingOfPrimaryClick" +#define kIOHIDMouseKeysEnablesVirtualNumPadKey "HIDMouseKeysEnablesVirtualNumPad" + +#define kIOHIDResetLEDsKey "HIDResetLEDs" + + +#ifdef __ppc__ + // the following are misspelled keys present in the system + // they are being kept around, but will eventually be deprecated + #define kIOHIDSickyKeysDisabledKey kIOHIDStickyKeysDisabledKey + #define kIOHIDSickyKeysOnKey kIOHIDStickyKeysOnKey + #define kIOHIDSickyKeysShiftTogglesKey kIOHIDStickyKeysShiftTogglesKey +#endif + +// the following values are used in kIOHIDPointerButtonMode +typedef enum { + kIOHIDButtonMode_BothLeftClicks = 0, + kIOHIDButtonMode_ReverseLeftRightClicks = 1, + kIOHIDButtonMode_EnableRightClick = 2 +} IOHIDButtonModes; + +#ifdef _undef +#define EVS_PREFIX "Evs_" /* All EVS calls start with this string */ + +/* WaitCursor-related ioctls */ + +#define EVSIOSWT "Evs_SetWaitThreshold" +#define EVSIOSWT_SIZE EVS_PACKED_TIME_SIZE + +#define EVSIOSWS "Evs_SetWaitSustain" +#define EVSIOSWS_SIZE EVS_PACKED_TIME_SIZE + +#define EVSIOSWFI "Evs_SetWaitFrameInterval" +#define EVSIOSWFI_SIZE EVS_PACKED_TIME_SIZE + +#define EVSIOCWINFO "Evs_CurrentWaitCursorInfo" +#define EVSIOCWINFO_THRESH 0 +#define EVSIOCWINFO_SUSTAIN (EVSIOCWINFO_THRESH + EVS_PACKED_TIME_SIZE) +#define EVSIOCWINFO_FINTERVAL (EVSIOCWINFO_SUSTAIN + EVS_PACKED_TIME_SIZE) +#define EVSIOCWINFO_SIZE (EVSIOCWINFO_FINTERVAL + EVS_PACKED_TIME_SIZE) +#endif + +#define EVS_PACKED_TIME_SIZE (sizeof(UInt64) / sizeof( unsigned int)) + +/* Device control ioctls. Levels specified may be in the range 0 - 64. */ + +#define EVSIOSB kIOHIDBrightnessKey +#define EVSIOSB_SIZE 1 + +#define EVSIOSADB kIOHIDAutoDimBrightnessKey +#define EVSIOSADB_SIZE 1 + +#ifdef _undef +#define EVSIOSA "Evs_SetAttenuation" +#define EVIOSA_SIZE 1 + +#define EVSIO_DCTLINFO "Evs_DeviceControlInfo" +typedef enum { + EVSIO_DCTLINFO_BRIGHT, + EVSIO_DCTLINFO_ATTEN, + EVSIO_DCTLINFO_AUTODIMBRIGHT +} evsio_DCTLINFOIndices; +#define EVSIO_DCTLINFO_SIZE (EVSIO_DCTLINFO_AUTODIMBRIGHT + 1) +#endif + +/* + * Device status request + */ +#define EVSIOINFO NX_EVS_DEVICE_INFO + + +/* Keyboard-related ioctls - implemented within Event Sources */ + +#define EVSIOSKR kIOHIDKeyRepeatKey +#define EVSIOSKR_SIZE EVS_PACKED_TIME_SIZE + +#define EVSIOSIKR kIOHIDInitialKeyRepeatKey +#define EVSIOSIKR_SIZE EVS_PACKED_TIME_SIZE + +#define EVSIORKBD kIOHIDResetKeyboardKey +#define EVSIORKBD_SIZE 1 + +#define EVSIOCKR_SIZE EVS_PACKED_TIME_SIZE + +#define EVSIOCKML kIOHIDKeyMappingKey +#define EVSIOCKML_SIZE 1 + +/* The following two tokens are for use with the get/set character routines. */ +#define EVSIOSKM kIOHIDKeyMappingKey +#define EVSIOSKM_SIZE 4096 + +#define EVSIOCKM kIOHIDKeyMappingKey +#define EVSIOCKM_SIZE 4096 + +/* Mouse-related ioctls - implemented within Event Sources */ + +#define EVSIOSMS kIOHIDPointerAccelerationKey +#define EVSIOSMS_SIZE (1) + +#define EVSIOCMS kIOHIDPointerAccelerationKey +#define EVSIOCMS_SIZE (1) + +#ifdef _undef +#define EVSIOSMH "Evs_SetMouseHandedness" +#define EVSIOSMH_SIZE 1 // value from NXMouseButton enum + +#define EVSIOCMH "Evs_CurrentMouseHandedness" +#define EVSIOCMH_SIZE 1 +#endif + +/* Generic pointer device controls, implemented by the Event Driver. */ +#define EVSIOSCT kIOHIDClickTimeKey +#define EVSIOSCT_SIZE EVS_PACKED_TIME_SIZE + +#define EVSIOSCS kIOHIDClickSpaceKey +typedef enum { + EVSIOSCS_X, + EVSIOSCS_Y +} evsioEVSIOSCSIndices; +#define EVSIOSCS_SIZE (EVSIOSCS_Y + 1) + +#define EVSIOSADT kIOHIDAutoDimThresholdKey +#define EVSIOSADT_SIZE EVS_PACKED_TIME_SIZE + +#define EVSIOSADS kIOHIDAutoDimStateKey +#define EVSIOSADS_SIZE 1 + +#define EVSIORMS kIOHIDResetPointerKey +#define EVSIORMS_SIZE 1 + +#define EVSIOCCT kIOHIDClickTimeKey +#define EVSIOCCT_SIZE EVS_PACKED_TIME_SIZE + +#define EVSIOCADT kIOHIDAutoDimThresholdKey +#define EVSIOCADT_SIZE EVS_PACKED_TIME_SIZE + +#define EVSIOGDADT kIOHIDAutoDimTimeKey +#define EVSIOGDADT_SIZE EVS_PACKED_TIME_SIZE + +#define EVSIOIDLE kIOHIDIdleTimeKey +#define EVSIOIDLE_SIZE EVS_PACKED_TIME_SIZE + +#define EVSIOCCS kIOHIDClickSpaceKey +typedef enum { + EVSIOCCS_X, + EVSIOCCS_Y +} evsioEVSIOCCSIndices; +#define EVSIOCCS_SIZE (EVSIOCCS_Y + 1) + +#define EVSIOCADS kIOHIDAutoDimStateKey +#define EVSIOCADS_SIZE 1 + +enum { + // Selectors for IOHIDGetModifierLockState and IOHIDSetModifierLockState + kIOHIDCapsLockState = 0x00000001, + kIOHIDNumLockState = 0x00000002, +}; + +#endif /* !_DEV_EVSIO_H */ diff --git a/i386/include/IOKit/hidsystem/IOHIDShared.h b/i386/include/IOKit/hidsystem/IOHIDShared.h new file mode 100644 index 0000000..e7c5e3a --- /dev/null +++ b/i386/include/IOKit/hidsystem/IOHIDShared.h @@ -0,0 +1,341 @@ +/* + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/****************************************************************************** + + evio.h + Ioctl calls for the events driver + Leovitch 02Jan88 + + Copyright 1988 NeXT, Inc. + + CAUTION: Developers should stick to the API exported in + to guarantee + binary compatability of their applications in future + releases. + + Modified: + + 09Dec88 Leo Broken out from evsio.h + 24Aug89 Ted ANSI function prototyping. + 19Feb90 Ted Major revision for multiple driver support. + 26Feb90 Ted New evioScreen structure and EVIOST ioctl. + 12Mar90 Ted New ev_unregister_screen function, SCREENTOKEN constant. + 06May90 Ted Added AALastEventSent and AALastEventConsumed to EvVars. + 22May90 Trey More wait cursor vars in EvVars. + 13Jun90 Ted NXCursorData structure. + 18Jun90 Ted Default wait cursor constants. + 26Sep90 Ted Enhanced cursor system to support intelligent drivers. + 26Nov90 Ted Removed NXSaveCursor and NXCursorData structures + 28Nov90 Ted Remove EvVars, rolled into EventGlobals + 28Nov90 Ted Renamed EventGlobals -> EvGlobals, eventGlobals -> evg + 05May92 Mike Reworked for NRW driver architecture. + +******************************************************************************/ + +#ifndef _DEV_EVIO_H +#define _DEV_EVIO_H + +#include + +__BEGIN_DECLS + +#if KERNEL +#include +#else /* !KERNEL */ +#include +#include +#endif /* KERNEL */ + +#include +#include +#include +#include + +/* + * Identify this driver as one that uses the new driverkit and messaging API + */ +#ifndef _NeXT_MACH_EVENT_DRIVER_ +#define _NeXT_MACH_EVENT_DRIVER_ (1) +#endif /* _NeXT_MACH_EVENT_DRIVER_ */ + + +/* Pressure Constants */ +#define MINPRESSURE EV_MINPRESSURE +#define MAXPRESSURE EV_MAXPRESSURE + +#define LLEQSIZE 240 /* Entries in low-level event queue */ + +typedef struct _NXEQElStruct { + int next; /* Slot of lleq for next event */ + ev_lock_data_t sema; /* Is high-level code reading this event now? */ + NXEvent event; /* The event itself */ +} NXEQElement; + + +/****************************************************************************** + SHARED MEMORY OVERVIEW + + PERSPECTIVE + The ev driver and PostScript share at least one page of wired memory. + This memory contains the low-level event queue which ev deposits events + into and PostScript reads events from. Also, this memory contains other + important data such as wait cursor state and some general cursor state. + This memory is critical for speed. That is, we avoid having to make + system calls for common operations. + + SHARED MEMORY REGIONS + There are currently three "regions" or "zones" delineated within this + shared memory. The first zone is the EvOffsets structure. This structure + contains two offsets from the beginning of shared memory. The first offset + is to the second zone, EvGlobals. The second offset is to the third + zone, private shmem for drivers. + + INITIALIZATION OF SHARED MEMORY + When the WindowServer starts up, it finds all screens that will be active. + It then opens the ev driver and calls the EVIOSSCR ioctl repeatedly for + each screen in use. This lets the ev driver set up the evScreen array + and fill in each element. This ioctl also returns to PostScript a running + total shared memory size with which to allocate. PostScript then allocates + a region of memory this size and calls evmmap to "map in" this shared + region. Evmmap initializes and fills in the EvOffsets and EvGlobals. + Next the WindowServer calls each screen in turn to register itself with + the ev driver in the same sequence as presented to EVIOSSCR. Each screen + driver calls ev_register_screen() which among other things allocates a + part of the private shmem (of the third shared memory zone) for the driver. + + DEBUGGING NOTES + You can easily display and set this shared memory from kgdb, but usually + cannot do so from within PostScript. Gdb (or some weird interaction + between gdb and the os) chokes on this shmem. So if you read or write + this area of memory, copy-on-write will occur and you'll get a completely + new page for PostScript. This will render the shared memory scheme + useless and you will have to restart PostScript. It was my understanding + that before, we were able to "read" this area from PS, but not write to + it (the idea behind copy-on-WRITE). However, this seems to be broken + in 2.0. We think this is a kernel bug. +******************************************************************************/ + +typedef volatile struct _evOffsets { + int evGlobalsOffset; /* Offset to EvGlobals structure */ + int evShmemOffset; /* Offset to private shmem regions */ +} EvOffsets; + +/****************************************************************************** + EvGlobals + This structures defines the portion of the events driver data structure + that is exported to the PostScript server. It contains the event queue + which is in memory shared between the driver and the PostScript server. + All the variables necessary to read and process events from the queue are + contained here. +******************************************************************************/ + +#ifndef __ppc__ +typedef volatile struct _evGlobals { + ev_lock_data_t cursorSema; /* set to disable periodic code */ + int eNum; /* Unique id for mouse events */ + int buttons; /* State of the mouse buttons 1==down, 0==up */ + int eventFlags; /* The current value of event.flags */ + int VertRetraceClock; /* The current value of event.time */ + IOGPoint cursorLoc; /* The current location of the cursor */ + int frame; /* current cursor frame */ + IOGBounds workBounds; /* bounding box of all screens */ + IOGBounds mouseRect; /* Rect for mouse-exited events */ + int version; /* for run time checks */ + int structSize; /* for run time checks */ + int lastFrame; + unsigned int reservedA[31]; + + unsigned reserved:27; + unsigned wantPressure:1; /* pressure in current mouseRect? */ + unsigned wantPrecision:1; /* precise coordinates in current mouseRect? */ + unsigned dontWantCoalesce:1;/* coalesce within the current mouseRect? */ + unsigned dontCoalesce:1; /* actual flag which determines coalescing */ + unsigned mouseRectValid:1; /* If nonzero, post a mouse-exited + whenever mouse outside mouseRect. */ + int movedMask; /* This contains an event mask for the + three events MOUSEMOVED, + LMOUSEDRAGGED, and RMOUSEDRAGGED. + It says whether driver should + generate those events. */ + ev_lock_data_t waitCursorSema; /* protects wait cursor fields */ + int AALastEventSent; /* timestamp for wait cursor */ + int AALastEventConsumed; /* timestamp for wait cursor */ + int waitCursorUp; /* Is wait cursor up? */ + char ctxtTimedOut; /* Has wait cursor timer expired? */ + char waitCursorEnabled; /* Play wait cursor game (per ctxt)? */ + char globalWaitCursorEnabled; /* Play wait cursor game (global)? */ + int waitThreshold; /* time before wait cursor appears */ + + int LLEHead; /* The next event to be read */ + int LLETail; /* Where the next event will go */ + int LLELast; /* The last event entered */ + NXEQElement lleq[LLEQSIZE]; /* The event queue itself */ +} EvGlobals; + +#else + +typedef volatile struct _evGlobals { + ev_lock_data_t cursorSema; /* set to disable periodic code */ + int LLEHead; /* The next event to be read */ + int LLETail; /* Where the next event will go */ + int LLELast; /* The last event entered */ + int eNum; /* Unique id for mouse events */ + int buttons; /* State of the mouse buttons 1==down, 0==up */ + int eventFlags; /* The current value of event.flags */ + int VertRetraceClock; /* The current value of event.time */ + IOGPoint cursorLoc; /* The current location of the cursor */ + int frame; /* current cursor frame */ + IOGBounds workBounds; /* bounding box of all screens */ + IOGBounds mouseRect; /* Rect for mouse-exited events */ + int version; /* for run time checks */ + int structSize; /* for run time checks */ + int lastFrame; + unsigned int reservedA[31]; + + unsigned reserved:27; + unsigned wantPressure:1; /* pressure in current mouseRect? */ + unsigned wantPrecision:1; /* precise coordinates in current mouseRect? */ + unsigned dontWantCoalesce:1;/* coalesce within the current mouseRect? */ + unsigned dontCoalesce:1; /* actual flag which determines coalescing */ + unsigned mouseRectValid:1; /* If nonzero, post a mouse-exited + whenever mouse outside mouseRect. */ + int movedMask; /* This contains an event mask for the + three events MOUSEMOVED, + LMOUSEDRAGGED, and RMOUSEDRAGGED. + It says whether driver should + generate those events. */ + int AALastEventSent; /* timestamp for wait cursor */ + int AALastEventConsumed; /* timestamp for wait cursor */ + ev_lock_data_t waitCursorSema; /* protects wait cursor fields */ + int waitCursorUp; /* Is wait cursor up? */ + char ctxtTimedOut; /* Has wait cursor timer expired? */ + char waitCursorEnabled; /* Play wait cursor game (per ctxt)? */ + char globalWaitCursorEnabled; /* Play wait cursor game (global)? */ + int waitThreshold; /* time before wait cursor appears */ + NXEQElement lleq[LLEQSIZE]; /* The event queue itself */ +} EvGlobals; +#endif + +/* These evio structs are used in various calls supported by the ev driver. */ + +struct evioLLEvent { + int setCursor; + int type; + IOGPoint location; + NXEventData data; + int setFlags; + int flags; +}; + +typedef struct evioLLEvent _NXLLEvent; + +#ifdef mach3xxx + +/* + * On a keypress of a VOL UP or VOL DOWN key, we send a message to the + * sound server to notify it of the volume change. The message includes + * a flag to indicate which key was pressed, and the machine independant + * flag bits to indicate which modifier keys were pressed. + */ + +struct evioSpecialKeyMsg +{ + msg_header_t Head; + msg_type_t keyType; + int key; // special key number, from bsd/dev/ev_keymap.h + msg_type_t directionType; + int direction; // NX_KEYDOWN, NX_KEYUP from event.h + msg_type_t flagsType; + int flags; // device independant flags from event.h + msg_type_t levelType; + int level; // EV_AUDIO_MIN_VOLUME to EV_AUDIO_MAX_VOLUME +}; +#else +struct evioSpecialKeyMsg +{ + mach_msg_header_t Head; + int key; // special key number, from bsd/dev/ev_keymap.h + int direction; // NX_KEYDOWN, NX_KEYUP from event.h + int flags; // device independant flags from event.h + int level; // EV_AUDIO_MIN_VOLUME to EV_AUDIO_MAX_VOLUME +}; +#endif + +#define EV_SPECIAL_KEY_MSG_ID (('S'<<24) | ('k'<<16) | ('e'<<8) | ('y')) +typedef struct evioSpecialKeyMsg *evioSpecialKeyMsg_t; + +/* + * Volume ranges + */ +#define EV_AUDIO_MIN_VOLUME 0 +#define EV_AUDIO_MAX_VOLUME 64 + +#define kIOHIDSystemClass "IOHIDSystem" +#define kIOHIKeyboardClass "IOHIKeyboard" +#define kIOHIPointingClass "IOHIPointing" + +#define IOHIDSYSTEM_CONFORMSTO kIOHIDSystemClass + +enum { + kIOHIDCurrentShmemVersion = 3, + kIOHIDEventNotification = 0, +}; + +enum { + kIOHIDServerConnectType = 0, + kIOHIDParamConnectType = 1, + kIOHIDEventSystemConnectType = 3, +}; + +enum { + kIOHIDGlobalMemory = 0 +}; + +enum { + kIOHIDEventQueueTypeKernel = 0, + kIOHIDEventQueueTypeUser = 1 +}; + +#ifdef KERNEL +typedef UInt16 (*MasterVolumeUpdate)(void); +typedef bool (*MasterMuteUpdate)(void); + +typedef struct { + MasterVolumeUpdate incrementMasterVolume; + MasterVolumeUpdate decrementMasterVolume; + MasterMuteUpdate toggleMasterMute; +} MasterAudioFunctions; + +extern MasterAudioFunctions *masterAudioFunctions; +#endif + +#ifndef KERNEL +#ifndef _IOKIT_IOHIDLIB_H +#include +#endif +#endif /* !KERNEL */ + +__END_DECLS + + +#endif /* !_DEV_EVIO_H */ diff --git a/i386/include/IOKit/hidsystem/IOHIDSystem.h b/i386/include/IOKit/hidsystem/IOHIDSystem.h new file mode 100644 index 0000000..1a78a38 --- /dev/null +++ b/i386/include/IOKit/hidsystem/IOHIDSystem.h @@ -0,0 +1,785 @@ +/* + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2009 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. + * + * EventDriver.h - Exported Interface Event Driver object. + * + * The EventDriver is a pseudo-device driver. + * + * HISTORY + * 19 Mar 1992 Mike Paquette at NeXT + * Created. + * 4 Aug 1993 Erik Kay at NeXT + * API cleanup + */ + +#ifndef _IOHIDSYSTEM_H +#define _IOHIDSYSTEM_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if TARGET_OS_EMBEDDED +class IOGraphicsDevice; +#else +#include +#endif +#include +#include +#include +#include +#include +#include /* For NX_NUM_SCANNED_SPECIALKEYS */ + + +// The following messages should be unique across the entire system +#ifndef sub_iokit_hidsystem +#define sub_iokit_hidsystem err_sub(14) +#endif + +#define kIOHIDSystem508MouseClickMessage iokit_family_msg(sub_iokit_hidsystem, 1) +#define kIOHIDSystemDeviceSeizeRequestMessage iokit_family_msg(sub_iokit_hidsystem, 2) +#define kIOHIDSystem508SpecialKeyDownMessage iokit_family_msg(sub_iokit_hidsystem, 3) + +class IOHIDKeyboardDevice; +class IOHIDPointingDevice; +class IOHIDEvent; + +class IOHIDSystem : public IOService +{ + OSDeclareDefaultStructors(IOHIDSystem); + + friend class IOHIDUserClient; + friend class IOHIDParamUserClient; + friend class IOHIDEventSystemUserClient; + +private: + IOWorkLoop * workLoop; + IOTimerEventSource * timerES; + IOTimerEventSource * vblES; + IOInterruptEventSource * eventConsumerES; + IOInterruptEventSource * keyboardEQES; + IOCommandGate * cmdGate; + IOUserClient * serverConnect; + IOUserClient * paramConnect; + IONotifier * eventPublishNotify; + IONotifier * eventTerminateNotify; + IONotifier * publishNotify; + IONotifier * terminateNotify; + + OSArray * ioHIDevices; + OSSet * touchEventPosters; + + // Ports on which we hold send rights + mach_port_t eventPort; // Send msg here when event queue + // goes non-empty + mach_port_t stackShotPort; + mach_port_t _specialKeyPort[NX_NUM_SCANNED_SPECIALKEYS]; // Special key msgs + void *eventMsg; // Msg to be sent to Window Server. + void *stackShotMsg; // Msg to be sent to Stack Shot. + + // Shared memory area information + IOBufferMemoryDescriptor * globalMemory; + uintptr_t shmem_addr; // kernel address of shared memory + vm_size_t shmem_size; // size of shared memory + + // Pointers to structures which occupy the shared memory area. + volatile void *evs; // Pointer to private driver shmem + volatile EvGlobals *evg; // Pointer to EvGlobals (shmem) + // Internal variables related to the shared memory area + int lleqSize; // # of entries in low-level queue + // FIXME: why is this ivar lleqSize an ivar? {Dan] + + // Screens list + vm_size_t evScreenSize; // Byte size of evScreen array + void *evScreen; // array of screens known to driver + volatile void *lastShmemPtr; // Pointer used to index thru shmem + // while assigning shared areas to + // drivers. + int screens; // running total of allocated screens + UInt32 cursorScreens; // bit mask of screens with cursor present + UInt32 cursorPinScreen;// a screen to pin against + IOGBounds cursorPin; // Range to which cursor is pinned + // while on this screen. + IOGBounds workSpace; // IOGBounds of full workspace. + // Event Status state - This includes things like event timestamps, + // time til screen dim, and related things manipulated through the + // Event Status API. + // + IOGPoint pointerLoc; // Current pointing device location + // The value leads evg->cursorLoc. + IOGPoint pointerDelta; // The cumulative pointer delta values since + // previous mouse move event was posted + + IOGPoint clickLoc; // location of last mouse click + IOGPoint clickSpaceThresh; // max mouse delta to be a doubleclick + int clickState; // Current click state + + bool evOpenCalled; // Has the driver been opened? + bool evInitialized; // Has the first-open-only initialization run? + bool evStateChanging; // Is the event system state changing. + bool eventsOpen; // Boolean: has evmmap been called yet? + bool cursorStarted; // periodic events running? + bool cursorEnabled; // cursor positioning ok? + bool cursorCoupled; // cursor positioning on pointer moves ok? + bool cursorPinned; // cursor positioning on pointer moves ok? + + short leftENum; // Unique ID for last left down event + short rightENum; // Unique ID for last right down event + + // The periodic event mechanism timestamps and state + // are recorded here. + AbsoluteTime thisPeriodicRun; + AbsoluteTime periodicEventDelta;// Time between periodic events + // todo: make infinite + AbsoluteTime clickTime; // Timestamps used to determine doubleclicks + AbsoluteTime clickTimeThresh; + + AbsoluteTime waitSustain; // Sustain time before removing cursor + AbsoluteTime waitSusTime; // Sustain counter + AbsoluteTime waitFrameRate; // Ticks per wait cursor frame + AbsoluteTime waitFrameTime; // Wait cursor frame timer + + AbsoluteTime lastRelativeEventTime; // Used to post mouse events once per frame + AbsoluteTime lastRelativeMoveTime; + AbsoluteTime lastEventTime; + AbsoluteTime lastUndimEvent; + SInt32 postDeltaX, accumDX; + SInt32 postDeltaY, accumDY; + + // Flags used in scheduling periodic event callbacks + bool needSetCursorPosition; + bool needToKickEventConsumer; + + IOService * displayManager; // points to display manager + IOPMPowerFlags displayState; + + IOService * rootDomain; + AbsoluteTime stateChangeDeadline; + + OSDictionary * savedParameters; // keep user settings + + const char * registryName; // cache our name + UInt32 maxWaitCursorFrame; // animation frames + UInt32 firstWaitCursorFrame; // + + int cachedEventFlags; + OSArray * cachedButtonStates; + + OSArray * systemInfo; + + IOHIDPointingDevice * _hidPointingDevice; + IOHIDKeyboardDevice * _hidKeyboardDevice; + + unsigned consumedKeyCode; + + OSObject * lastSender; + + UInt32 scrollZoomMask; + + bool setParamPropertiesInProgress; + + OSSet * dataQueueSet; + +private: + void vblEvent(void); + UInt8 getSubtypeForSender(OSObject * sender); + void updateMouseEventForSender(OSObject * sender, NXEventData * evData); + void updateMouseMoveEventForSender(OSObject * sender, NXEventData * evData); + void updateScrollEventForSender(OSObject * sender, NXEventData * evData); + static void _vblEvent(OSObject *self, IOTimerEventSource *sender); + + inline short getUniqueEventNum(); + + virtual IOReturn powerStateDidChangeTo( IOPMPowerFlags, unsigned long, IOService * ); + /* Resets */ + void _resetMouseParameters(); + + /* Initialize the shared memory area */ + void initShmem(bool clean); + /* Dispatch low level events through shared memory to the WindowServer */ + void postEvent(int what, + /* at */ IOGPoint * location, + /* atTime */ AbsoluteTime ts, + /* withData */ NXEventData * myData, + /* sender */ OSObject * sender = 0, + /* pid */ UInt32 extPID = 0, + /* processKEQ*/bool processKEQ = true); + /* Dispatch mechanisms for screen state changes */ + void evDispatch( + /* command */ EvCmd evcmd); + /* Dispatch mechanism for special key press */ + void evSpecialKeyMsg(unsigned key, + /* direction */ unsigned dir, + /* flags */ unsigned f, + /* level */ unsigned l); + /* Message the event consumer to process posted events */ + void kickEventConsumer(); + void sendStackShotMessage(); + + OSDictionary * createFilteredParamPropertiesForService(IOService * service, OSDictionary * dict); + + static void _periodicEvents(IOHIDSystem * self, + IOTimerEventSource *timer); + + static void doSpecialKeyMsg(IOHIDSystem * self, + struct evioSpecialKeyMsg *msg); + static void doKickEventConsumer(IOHIDSystem * self); + + static void doProcessKeyboardEQ(IOHIDSystem * self); + static void processKeyboardEQ(IOHIDSystem * self, AbsoluteTime * deadline = 0); + + static bool genericNotificationHandler( void * target, + void * ref, IOService * newService ); + + static bool handlePublishNotification( void * target, IOService * newService ); + + static bool handleTerminateNotification( void * target, IOService * service ); + + static void makeNumberParamProperty( OSDictionary * dict, const char * key, + unsigned long long number, unsigned int bits ); + + static void makeInt32ArrayParamProperty( OSDictionary * dict, const char * key, + UInt32 * array, unsigned int count ); + +/* + * HISTORICAL NOTE: + * The following methods were part of the IOHIDSystem(Input) category; + * the declarations have now been merged directly into this class. + * + * Exported Interface Event Driver object input services. + */ + +private: + // Schedule next periodic run based on current event system state. + void scheduleNextPeriodicEvent(); + // Message invoked to run periodic events. This method runs in the workloop. + void periodicEvents(IOTimerEventSource *timer); + // Start the cursor running. + bool startCursor(); + // Repin cursor location. + bool resetCursor(); + // Wait Cursor machinery. + void showWaitCursor(); + void hideWaitCursor(); + void animateWaitCursor(); + void changeCursor(int frame); + // Return screen number a point lies on. + int pointToScreen(IOGPoint * p); + + inline void showCursor(); + inline void hideCursor(); + inline void moveCursor(); + // Claim ownership of event sources. + void attachDefaultEventSources(); + // Give up ownership of event sources. + void detachEventSources(); + bool registerEventSource(IOService * source); + + // Set abs cursor position. + void setCursorPosition(IOGPoint * newLoc, bool external, OSObject * sender=0); + void _setButtonState(int buttons, + /* atTime */ AbsoluteTime ts, + OSObject * sender); + void _setCursorPosition(IOGPoint * newLoc, bool external, bool proximityChange = false, OSObject * sender=0); + + static bool _idleTimeSerializerCallback(void * target, void * ref, OSSerialize *s); + + void _postMouseMoveEvent(int what, + IOGPoint * location, + AbsoluteTime theClock, + OSObject * sender); + void createParameters( void ); + +/* END HISTORICAL NOTE */ + +public: + static IOHIDSystem * instance(); /* Return the current instance of the */ + /* EventDriver, or 0 if none. */ + static void scaleLocationToCurrentScreen(IOGPoint *location, IOGBounds *bounds); + + virtual bool init(OSDictionary * properties = 0); + virtual IOHIDSystem * probe(IOService * provider, + SInt32 * score); + virtual bool start(IOService * provider); + virtual IOReturn message(UInt32 type, IOService * provider, + void * argument); + virtual void free(); + virtual bool attach( IOService * provider ); + virtual void detach( IOService * provider ); + + virtual IOWorkLoop *getWorkLoop() const; + + virtual IOReturn evOpen(void); + virtual IOReturn evClose(void); + + virtual IOReturn setProperties( OSObject * properties ); + virtual IOReturn setParamProperties(OSDictionary * dict); + + /* Create the shared memory area */ + virtual IOReturn createShmem(void*,void*,void*,void*,void*,void*); + + /* register the IODataQueue for the new user events */ + virtual IOReturn registerEventQueue(IODataQueue * queue); + + /* Unregister the IODataQueue for the new user events */ + virtual IOReturn unregisterEventQueue(IODataQueue * queue); + + /* Set the port for event available notify msg */ + virtual void setEventPort(mach_port_t port); + /* Set the port for the special key keypress msg */ + virtual IOReturn setSpecialKeyPort( + /* keyFlavor */ int special_key, + /* keyPort */ mach_port_t key_port); + virtual mach_port_t specialKeyPort(int special_key); + + + virtual IOReturn newUserClient(task_t owningTask, + /* withToken */ void * security_id, + /* ofType */ UInt32 type, + /* withProps*/ OSDictionary * properties, + /* client */ IOUserClient ** handler); + +/* + * HISTORICAL NOTE: + * The following methods were part of the IOHIPointingEvents protocol; + * the declarations have now been merged directly into this class. + */ + +public: + /* Mouse event reporting */ + virtual void relativePointerEvent(int buttons, + /* deltaX */ int dx, + /* deltaY */ int dy, + /* atTime */ AbsoluteTime ts); + + /* Tablet event reporting */ + virtual void absolutePointerEvent(int buttons, + /* at */ IOGPoint * newLoc, + /* withBounds */ IOGBounds *bounds, + /* inProximity */ bool proximity, + /* withPressure */ int pressure, + /* withAngle */ int stylusAngle, + /* atTime */ AbsoluteTime ts); + + /* Mouse scroll wheel event reporting */ + virtual void scrollWheelEvent(short deltaAxis1, + short deltaAxis2, + short deltaAxis3, + AbsoluteTime ts); + + + virtual void tabletEvent(NXEventData *tabletData, + AbsoluteTime ts); + + virtual void proximityEvent(NXEventData *proximityData, + AbsoluteTime ts); + +/* + * HISTORICAL NOTE: + * The following methods were part of the IOHIKeyboardEvents protocol; + * the declarations have now been merged directly into this class. + */ + +public: + virtual void keyboardEvent(unsigned eventType, + /* flags */ unsigned flags, + /* keyCode */ unsigned key, + /* charCode */ unsigned charCode, + /* charSet */ unsigned charSet, + /* originalCharCode */ unsigned origCharCode, + /* originalCharSet */ unsigned origCharSet, + /* keyboardType */ unsigned keyboardType, + /* repeat */ bool repeat, + /* atTime */ AbsoluteTime ts); + + virtual void keyboardSpecialEvent( unsigned eventType, + /* flags */ unsigned flags, + /* keyCode */ unsigned key, + /* specialty */ unsigned flavor, + /* guid */ UInt64 guid, + /* repeat */ bool repeat, + /* atTime */ AbsoluteTime ts); + + virtual void updateEventFlags(unsigned flags); /* Does not generate events */ + + + + +private: + + /* + * statics for upstream callouts + */ + + void _scaleLocationToCurrentScreen(IOGPoint *location, IOGPoint *fraction, IOGBounds *bounds); // Should this one be public??? + + static void _relativePointerEvent(IOHIDSystem * self, + int buttons, + /* deltaX */ int dx, + /* deltaY */ int dy, + /* atTime */ AbsoluteTime ts, + OSObject * sender, + void * refcon); + + /* Tablet event reporting */ + static void _absolutePointerEvent(IOHIDSystem * self, + int buttons, + /* at */ IOGPoint * newLoc, + /* withBounds */ IOGBounds *bounds, + /* inProximity */ bool proximity, + /* withPressure */ int pressure, + /* withAngle */ int stylusAngle, + /* atTime */ AbsoluteTime ts, + OSObject * sender, + void * refcon); + + /* Mouse scroll wheel event reporting */ + static void _scrollWheelEvent( IOHIDSystem *self, + short deltaAxis1, + short deltaAxis2, + short deltaAxis3, + IOFixed fixedDelta1, + IOFixed fixedDelta2, + IOFixed fixedDelta3, + SInt32 pointDeltaAxis1, + SInt32 pointDeltaAxis2, + SInt32 pointDeltaAxis3, + UInt32 options, + AbsoluteTime ts, + OSObject * sender, + void * refcon); + + static void _tabletEvent( IOHIDSystem *self, + NXEventData *tabletData, + AbsoluteTime ts, + OSObject * sender, + void * refcon); + + static void _proximityEvent( IOHIDSystem *self, + NXEventData *proximityData, + AbsoluteTime ts, + OSObject * sender, + void * refcon); + + static void _keyboardEvent( IOHIDSystem * self, + unsigned eventType, + /* flags */ unsigned flags, + /* keyCode */ unsigned key, + /* charCode */ unsigned charCode, + /* charSet */ unsigned charSet, + /* originalCharCode */ unsigned origCharCode, + /* originalCharSet */ unsigned origCharSet, + /* keyboardType */ unsigned keyboardType, + /* repeat */ bool repeat, + /* atTime */ AbsoluteTime ts, + OSObject * sender, + void * refcon); + + static void _keyboardSpecialEvent(IOHIDSystem * self, + unsigned eventType, + /* flags */ unsigned flags, + /* keyCode */ unsigned key, + /* specialty */ unsigned flavor, + /* guid */ UInt64 guid, + /* repeat */ bool repeat, + /* atTime */ AbsoluteTime ts, + OSObject * sender, + void * refcon); + + static void _updateEventFlags( IOHIDSystem * self, + unsigned flags, + OSObject * sender, + void * refcon); /* Does not generate events */ + + +/* + * HISTORICAL NOTE: + * The following methods were part of the IOUserClient protocol; + * the declarations have now been merged directly into this class. + */ + +public: + + virtual IOReturn setEventsEnable(void*,void*,void*,void*,void*,void*); + virtual IOReturn setCursorEnable(void*,void*,void*,void*,void*,void*); + virtual IOReturn extPostEvent(void*,void*,void*,void*,void*,void*); + virtual IOReturn extSetMouseLocation(void*,void*,void*,void*,void*,void*); + virtual IOReturn extGetButtonEventNum(void*,void*,void*,void*,void*,void*); + IOReturn extSetBounds( IOGBounds * bounds ); + IOReturn extGetModifierLockState(void*,void*,void*,void*,void*,void*); + IOReturn extSetModifierLockState(void*,void*,void*,void*,void*,void*); + +/* + * HISTORICAL NOTE: + * The following methods were part of the IOScreenRegistration protocol; + * the declarations have now been merged directly into this class. + * + * Methods exported by the EventDriver for display systems. + * + * The screenRegister protocol is used by frame buffer drivers to register + * themselves with the Event Driver. These methods are called in response + * to an _IOGetParameterInIntArray() call with "IO_Framebuffer_Register" or + * "IO_Framebuffer_Unregister". + */ + +public: + virtual int registerScreen(IOGraphicsDevice * instance, + /* bounds */ IOGBounds * bp); +// /* shmem */ void ** addr, +// /* size */ int * size) + virtual void unregisterScreen(int index); + +/* + * HISTORICAL NOTE: + * The following methods were part of the IOWorkspaceBounds protocol; + * the declarations have now been merged directly into this class. + * + * Absolute position input devices and some specialized output devices + * may need to know the bounding rectangle for all attached displays. + * The following method returns a IOGBounds* for the workspace. Please note + * that the bounds are kept as signed values, and that on a multi-display + * system the minx and miny values may very well be negative. + */ + +public: + virtual IOGBounds * workspaceBounds(); + +/* END HISTORICAL NOTES */ + +private: +void relativePointerEvent( int buttons, + /* deltaX */ int dx, + /* deltaY */ int dy, + /* atTime */ AbsoluteTime ts, + /* senderID */ OSObject * sender); + + /* Tablet event reporting */ +void absolutePointerEvent( int buttons, + /* at */ IOGPoint * newLoc, + /* withBounds */ IOGBounds *bounds, + /* inProximity */ bool proximity, + /* withPressure */ int pressure, + /* withAngle */ int stylusAngle, + /* atTime */ AbsoluteTime ts, + /* senderID */ OSObject * sender); + + /* Mouse scroll wheel event reporting */ +void scrollWheelEvent( short deltaAxis1, + short deltaAxis2, + short deltaAxis3, + IOFixed fixedDelta1, + IOFixed fixedDelta2, + IOFixed fixedDelta3, + SInt32 pointDeltaAxis1, + SInt32 pointDeltaAxis2, + SInt32 pointDeltaAxis3, + UInt32 options, + AbsoluteTime ts, + OSObject * sender); + +void tabletEvent( NXEventData * tabletData, + AbsoluteTime ts, + OSObject * sender); + +void proximityEvent( NXEventData * proximityData, + AbsoluteTime ts, + OSObject * sender); + +void keyboardEvent(unsigned eventType, + /* flags */ unsigned flags, + /* keyCode */ unsigned key, + /* charCode */ unsigned charCode, + /* charSet */ unsigned charSet, + /* originalCharCode */ unsigned origCharCode, + /* originalCharSet */ unsigned origCharSet, + /* keyboardType */ unsigned keyboardType, + /* repeat */ bool repeat, + /* atTime */ AbsoluteTime ts, + /* sender */ OSObject * sender); + +void keyboardSpecialEvent( unsigned eventType, + /* flags */ unsigned flags, + /* keyCode */ unsigned key, + /* specialty */ unsigned flavor, + /* guid */ UInt64 guid, + /* repeat */ bool repeat, + /* atTime */ AbsoluteTime ts, + /* sender */ OSObject * sender); + +void updateEventFlags(unsigned flags, OSObject * sender); + +/* + * COMMAND GATE COMPATIBILITY: + * The following method is part of the work needed to make IOHIDSystem + * compatible with IOCommandGate. The use of IOCommandQueue has been + * deprecated, thus requiring this move. This should allow for less + * context switching as all actions formerly run on the I/O Workloop + * thread, will now be run on the caller thread. The static methods + * will be called from cmdGate->runAction and returns the appropriate + * non-static helper method. Arguments are stored in the void* array, + * args, and are passed through. Since we are returning in the static + * function, gcc3 should translate that to one instruction, thus + * minimizing cost. + */ + +static IOReturn doEvClose (IOHIDSystem *self); + IOReturn evCloseGated (void); + +static IOReturn doSetEventsEnablePre (IOHIDSystem *self, void *p1); + IOReturn setEventsEnablePreGated (void *p1); + +static IOReturn doSetEventsEnablePost (IOHIDSystem *self, void *p1); + IOReturn setEventsEnablePostGated (void *p1); + +static IOReturn doUnregisterScreen (IOHIDSystem *self, void * arg0); + void unregisterScreenGated (int index); + +static IOReturn doCreateShmem (IOHIDSystem *self, void * arg0); + IOReturn createShmemGated (void * p1); + +static IOReturn doRegisterEventQueue (IOHIDSystem *self, void * arg0); + IOReturn registerEventQueueGated (void * p1); + +static IOReturn doUnregisterEventQueue (IOHIDSystem *self, void * arg0); + IOReturn unregisterEventQueueGated (void * p1); + +static IOReturn doRelativePointerEvent (IOHIDSystem *self, void * args); + void relativePointerEventGated(int buttons, + int dx, + int dy, + AbsoluteTime ts, + OSObject * sender); + +static IOReturn doAbsolutePointerEvent (IOHIDSystem *self, void * args); + void absolutePointerEventGated (int buttons, + IOGPoint * newLoc, + IOGBounds *bounds, + bool proximity, + int pressure, + int stylusAngle, + AbsoluteTime ts, + OSObject * sender); + +static IOReturn doScrollWheelEvent(IOHIDSystem *self, void * args); + void scrollWheelEventGated (short deltaAxis1, + short deltaAxis2, + short deltaAxis3, + IOFixed fixedDelta1, + IOFixed fixedDelta2, + IOFixed fixedDelta3, + SInt32 pointDeltaAxis1, + SInt32 pointDeltaAxis2, + SInt32 pointDeltaAxis3, + UInt32 options, + AbsoluteTime ts, + OSObject * sender); + +static IOReturn doTabletEvent (IOHIDSystem *self, void * arg0, void * arg1, void * arg2); + void tabletEventGated ( NXEventData *tabletData, + AbsoluteTime ts, + OSObject * sender); + +static IOReturn doProximityEvent (IOHIDSystem *self, void * arg0, void * arg1, void * arg2); + void proximityEventGated ( NXEventData *proximityData, + AbsoluteTime ts, + OSObject * sender); + +static IOReturn doKeyboardEvent (IOHIDSystem *self, void * args); + void keyboardEventGated (unsigned eventType, + unsigned flags, + unsigned key, + unsigned charCode, + unsigned charSet, + unsigned origCharCode, + unsigned origCharSet, + unsigned keyboardType, + bool repeat, + AbsoluteTime ts, + OSObject * sender); + +static IOReturn doKeyboardSpecialEvent (IOHIDSystem *self, void * args); + void keyboardSpecialEventGated ( + unsigned eventType, + unsigned flags, + unsigned key, + unsigned flavor, + UInt64 guid, + bool repeat, + AbsoluteTime ts, + OSObject * sender); + +static IOReturn doUpdateEventFlags (IOHIDSystem *self, void * args); + void updateEventFlagsGated (unsigned flags, OSObject * sender); + +static IOReturn doNewUserClient (IOHIDSystem *self, void * args); + IOReturn newUserClientGated (task_t owningTask, + void * security_id, + UInt32 type, + OSDictionary * properties, + IOUserClient ** handler); + +static IOReturn doSetCursorEnable (IOHIDSystem *self, void * arg0); + IOReturn setCursorEnableGated (void * p1); + +static IOReturn doExtPostEvent(IOHIDSystem *self, void * arg0, void * arg1, void * arg2, void * arg3); + IOReturn extPostEventGated (void * p1, void * p2, void * p3); + +static IOReturn doExtSetMouseLocation (IOHIDSystem *self, void * args); + IOReturn extSetMouseLocationGated (void * args); + +static IOReturn doExtGetButtonEventNum (IOHIDSystem *self, void * arg0, void * arg1); + IOReturn extGetButtonEventNumGated (void * p1, void * p2); + +static IOReturn doSetParamPropertiesPre (IOHIDSystem *self, void * arg0, void * arg1); + IOReturn setParamPropertiesPreGated (OSDictionary * dict, OSIterator ** pOpenIter); + +static IOReturn doSetParamPropertiesPost (IOHIDSystem *self, void * arg0); + IOReturn setParamPropertiesPostGated (OSDictionary * dict); + +static IOReturn doExtGetToggleState (IOHIDSystem *self, void *p1, void *p2); +static IOReturn doExtSetToggleState (IOHIDSystem *self, void *p1, void *p2); + IOReturn getCapsLockState(unsigned int *state_O); + IOReturn setCapsLockState(unsigned int state_I); + IOReturn getNumLockState(unsigned int *state_O); + IOReturn setNumLockState(unsigned int state_I); + +/* END COMMAND GATE COMPATIBILITY */ + +public: + virtual void setStackShotPort(mach_port_t port); + + virtual UInt32 eventFlags(); + + virtual void dispatchEvent(IOHIDEvent *event, IOOptionBits options=0); + +}; + +#endif /* !_IOHIDSYSTEM_H */ diff --git a/i386/include/IOKit/hidsystem/IOHIDTypes.h b/i386/include/IOKit/hidsystem/IOHIDTypes.h new file mode 100644 index 0000000..786af07 --- /dev/null +++ b/i386/include/IOKit/hidsystem/IOHIDTypes.h @@ -0,0 +1,171 @@ +/* + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/****************************************************************************** + ev_types.h + Data types for the events status driver. + This file contains public API. + mpaque 11Oct91 + + Copyright 1991 NeXT Computer, Inc. + + Modified: + +******************************************************************************/ + +#ifndef _DEV_EV_TYPES_H +#define _DEV_EV_TYPES_H + +#include +#include +#include + +/* Shared memory versions */ +#define EVENT_SYSTEM_VERSION 2 + +/* Maximum length of SetMouseScaling arrays */ +#define NX_MAXMOUSESCALINGS 20 + +typedef struct evsioKeymapping /* Match old struct names in kernel */ +{ + int size; + char *mapping; +} NXKeyMapping; + +typedef struct evsioMouseScaling /* Match old struct names in kernel */ +{ + int numScaleLevels; + short scaleThresholds[NX_MAXMOUSESCALINGS]; + short scaleFactors[NX_MAXMOUSESCALINGS]; +} NXMouseScaling; + +typedef enum { + NX_OneButton, + NX_LeftButton, + NX_RightButton +} NXMouseButton; + +/* + * NXEventSystemInfo() information structures. These are designed to + * allow for expansion. + * + * The current implementation of NXEventSystemInfo() uses an ioctl call. + * THIS WILL CHANGE. + */ + +/* + * Generic query max size and typedefs. + * + * The maximum size is selected to support anticipated future extensions + * of request flavors. Certain flavors planned for future releases may + * require roughtly 800 ints to represent. We allow a little extra, in + * case further growth is needed. + */ +typedef int *NXEventSystemInfoType; +#define NX_EVS_INFO_MAX (1024) /* Max array size */ +typedef int NXEventSystemInfoData[NX_EVS_INFO_MAX]; + +/* Event System Devices query */ +#define NX_EVS_DEVICE_MAX 16 + + /* Interface types */ +#define NX_EVS_DEVICE_INTERFACE_OTHER 0 +#define NX_EVS_DEVICE_INTERFACE_NeXT 1 // NeXT custom, in older sys +#define NX_EVS_DEVICE_INTERFACE_ADB 2 // NeXT/fruit keybds/mice +#define NX_EVS_DEVICE_INTERFACE_ACE 3 // For x86 PC keyboards +#define NX_EVS_DEVICE_INTERFACE_SERIAL_ACE 4 // For PC serial mice +#define NX_EVS_DEVICE_INTERFACE_BUS_ACE 5 // For PC bus mice +#define NX_EVS_DEVICE_INTERFACE_HIL 6 // For HIL hp keyboard +#define NX_EVS_DEVICE_INTERFACE_TYPE5 7 // For Sun Type5 keyboard + +/* + * Note! if any new interface types are added above, the following + * definition of the number of interfaces supported must reflect this. + * This is used in the libkeymap project (storemap.c module) which needs + * to be cognizant of the number of new devices coming online + * via support for heterogeneous architecture platforms. + * e.g., PCs, HP's HIL, Sun's Type5 keyboard,... + */ +#define NUM_SUPPORTED_INTERFACES (NX_EVS_DEVICE_INTERFACE_TYPE5 + 1) + // Other, NeXT, ADB, ACE,... + + /* Device types */ +#define NX_EVS_DEVICE_TYPE_OTHER 0 +#define NX_EVS_DEVICE_TYPE_KEYBOARD 1 +#define NX_EVS_DEVICE_TYPE_MOUSE 2 // Relative position devices +#define NX_EVS_DEVICE_TYPE_TABLET 3 // Absolute position devices + +typedef struct { + int interface; /* NeXT, ADB, other */ + int interface_addr; /* Device address on the interface */ + int dev_type; /* Keyboard, mouse, tablet, other */ + int id; /* manufacturer's device handler ID */ +} NXEventSystemDevice; + +typedef struct { + NXEventSystemDevice dev[NX_EVS_DEVICE_MAX]; +} NXEventSystemDeviceList; + +#define __OLD_NX_EVS_DEVICE_INFO 1 +#define NX_EVS_DEVICE_INFO "Evs_EventDeviceInfo" +#define NX_EVS_DEVICE_INFO_COUNT \ + (sizeof (NXEventSystemDeviceList) / sizeof (int)) + +/* + * Types used in evScreen protocol compliant operations. + */ + +typedef enum {EVNOP, EVHIDE, EVSHOW, EVMOVE, EVLEVEL} EvCmd; /* Cursor state */ + +#define EV_SCREEN_MIN_BRIGHTNESS 0 +#define EV_SCREEN_MAX_BRIGHTNESS 64 +/* Scale should lie between MIN_BRIGHTNESS and MAX_BRIGHTNESS */ +#define EV_SCALE_BRIGHTNESS( scale, datum ) \ + ((((UInt32)(datum))*((UInt32)scale)) >> 6) + +/* + * Definition of a tick, as a time in milliseconds. This controls how + * often the event system periodic jobs are run. All actual tick times + * are derived from the nanosecond timer. These values are typically used + * as part of computing mouse velocity for acceleration purposes. + */ +#define EV_TICK_TIME 16 /* 16 milliseconds */ +#define EV_TICKS_PER_SEC (1000/EV_TICK_TIME) /* ~ 62 Hz */ + +/* Mouse Button bits, as passed from an EventSrc to the Event Driver */ +#define EV_RB (0x01) +#define EV_LB (0x04) +#define EV_MOUSEBUTTONMASK (EV_LB | EV_RB) + +/* Tablet Pressure Constants, as passed from an EventSrc to the Event Driver */ +#define EV_MINPRESSURE 0 +#define EV_MAXPRESSURE 255 + +/* Cursor size in pixels */ +#define EV_CURSOR_WIDTH 16 +#define EV_CURSOR_HEIGHT 16 + + +#define kAppleOnboardGUID 0x0610000000000000ULL + +#endif /* !_DEV_EV_TYPES_H */ + diff --git a/i386/include/IOKit/hidsystem/IOHIDUsageTables.h b/i386/include/IOKit/hidsystem/IOHIDUsageTables.h new file mode 100644 index 0000000..ff0fd88 --- /dev/null +++ b/i386/include/IOKit/hidsystem/IOHIDUsageTables.h @@ -0,0 +1,1665 @@ +/* + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _IOHIDUSAGETABLES_H +#define _IOHIDUSAGETABLES_H + +/* ****************************************************************************************** + * HID Usage Tables + * + * The following constants are from the USB 'HID Usage Tables' specification, revision 1.1rc3 + * ****************************************************************************************** */ + + +/* Usage Pages */ +enum +{ + kHIDPage_Undefined = 0x00, + kHIDPage_GenericDesktop = 0x01, + kHIDPage_Simulation = 0x02, + kHIDPage_VR = 0x03, + kHIDPage_Sport = 0x04, + kHIDPage_Game = 0x05, + /* Reserved 0x06 */ + kHIDPage_KeyboardOrKeypad = 0x07, /* USB Device Class Definition for Human Interface Devices (HID). Note: the usage type for all key codes is Selector (Sel). */ + kHIDPage_LEDs = 0x08, + kHIDPage_Button = 0x09, + kHIDPage_Ordinal = 0x0A, + kHIDPage_Telephony = 0x0B, + kHIDPage_Consumer = 0x0C, + kHIDPage_Digitizer = 0x0D, + /* Reserved 0x0E */ + kHIDPage_PID = 0x0F, /* USB Physical Interface Device definitions for force feedback and related devices. */ + kHIDPage_Unicode = 0x10, + /* Reserved 0x11 - 0x13 */ + kHIDPage_AlphanumericDisplay = 0x14, + /* Reserved 0x15 - 0x7F */ + /* Monitor 0x80 - 0x83 USB Device Class Definition for Monitor Devices */ + /* Power 0x84 - 0x87 USB Device Class Definition for Power Devices */ + kHIDPage_PowerDevice = 0x84, /* Power Device Page */ + kHIDPage_BatterySystem = 0x85, /* Battery System Page */ + /* Reserved 0x88 - 0x8B */ + kHIDPage_BarCodeScanner = 0x8C, /* (Point of Sale) USB Device Class Definition for Bar Code Scanner Devices */ + kHIDPage_WeighingDevice = 0x8D, /* (Point of Sale) USB Device Class Definition for Weighing Devices */ + kHIDPage_Scale = 0x8D, /* (Point of Sale) USB Device Class Definition for Scale Devices */ + kHIDPage_MagneticStripeReader = 0x8E, + /* ReservedPointofSalepages 0x8F */ + kHIDPage_CameraControl = 0x90, /* USB Device Class Definition for Image Class Devices */ + kHIDPage_Arcade = 0x91, /* OAAF Definitions for arcade and coinop related Devices */ + /* Reserved 0x92 - 0xFEFF */ + /* VendorDefined 0xFF00 - 0xFFFF */ + kHIDPage_VendorDefinedStart = 0xFF00 +}; + +/* Undefined Usage for all usage pages */ +enum +{ + kHIDUsage_Undefined = 0x00 +}; + +/* GenericDesktop Page (0x01) */ +enum +{ + kHIDUsage_GD_Pointer = 0x01, /* Physical Collection */ + kHIDUsage_GD_Mouse = 0x02, /* Application Collection */ + /* 0x03 Reserved */ + kHIDUsage_GD_Joystick = 0x04, /* Application Collection */ + kHIDUsage_GD_GamePad = 0x05, /* Application Collection */ + kHIDUsage_GD_Keyboard = 0x06, /* Application Collection */ + kHIDUsage_GD_Keypad = 0x07, /* Application Collection */ + kHIDUsage_GD_MultiAxisController = 0x08, /* Application Collection */ + /* 0x09 - 0x2F Reserved */ + kHIDUsage_GD_X = 0x30, /* Dynamic Value */ + kHIDUsage_GD_Y = 0x31, /* Dynamic Value */ + kHIDUsage_GD_Z = 0x32, /* Dynamic Value */ + kHIDUsage_GD_Rx = 0x33, /* Dynamic Value */ + kHIDUsage_GD_Ry = 0x34, /* Dynamic Value */ + kHIDUsage_GD_Rz = 0x35, /* Dynamic Value */ + kHIDUsage_GD_Slider = 0x36, /* Dynamic Value */ + kHIDUsage_GD_Dial = 0x37, /* Dynamic Value */ + kHIDUsage_GD_Wheel = 0x38, /* Dynamic Value */ + kHIDUsage_GD_Hatswitch = 0x39, /* Dynamic Value */ + kHIDUsage_GD_CountedBuffer = 0x3A, /* Logical Collection */ + kHIDUsage_GD_ByteCount = 0x3B, /* Dynamic Value */ + kHIDUsage_GD_MotionWakeup = 0x3C, /* One-Shot Control */ + kHIDUsage_GD_Start = 0x3D, /* On/Off Control */ + kHIDUsage_GD_Select = 0x3E, /* On/Off Control */ + /* 0x3F Reserved */ + kHIDUsage_GD_Vx = 0x40, /* Dynamic Value */ + kHIDUsage_GD_Vy = 0x41, /* Dynamic Value */ + kHIDUsage_GD_Vz = 0x42, /* Dynamic Value */ + kHIDUsage_GD_Vbrx = 0x43, /* Dynamic Value */ + kHIDUsage_GD_Vbry = 0x44, /* Dynamic Value */ + kHIDUsage_GD_Vbrz = 0x45, /* Dynamic Value */ + kHIDUsage_GD_Vno = 0x46, /* Dynamic Value */ + /* 0x47 - 0x7F Reserved */ + kHIDUsage_GD_SystemControl = 0x80, /* Application Collection */ + kHIDUsage_GD_SystemPowerDown = 0x81, /* One-Shot Control */ + kHIDUsage_GD_SystemSleep = 0x82, /* One-Shot Control */ + kHIDUsage_GD_SystemWakeUp = 0x83, /* One-Shot Control */ + kHIDUsage_GD_SystemContextMenu = 0x84, /* One-Shot Control */ + kHIDUsage_GD_SystemMainMenu = 0x85, /* One-Shot Control */ + kHIDUsage_GD_SystemAppMenu = 0x86, /* One-Shot Control */ + kHIDUsage_GD_SystemMenuHelp = 0x87, /* One-Shot Control */ + kHIDUsage_GD_SystemMenuExit = 0x88, /* One-Shot Control */ + kHIDUsage_GD_SystemMenu = 0x89, /* Selector */ + kHIDUsage_GD_SystemMenuRight = 0x8A, /* Re-Trigger Control */ + kHIDUsage_GD_SystemMenuLeft = 0x8B, /* Re-Trigger Control */ + kHIDUsage_GD_SystemMenuUp = 0x8C, /* Re-Trigger Control */ + kHIDUsage_GD_SystemMenuDown = 0x8D, /* Re-Trigger Control */ + /* 0x8E - 0x8F Reserved */ + kHIDUsage_GD_DPadUp = 0x90, /* On/Off Control */ + kHIDUsage_GD_DPadDown = 0x91, /* On/Off Control */ + kHIDUsage_GD_DPadRight = 0x92, /* On/Off Control */ + kHIDUsage_GD_DPadLeft = 0x93, /* On/Off Control */ + /* 0x94 - 0xFFFF Reserved */ + kHIDUsage_GD_Reserved = 0xFFFF +}; + +/* Simulation Page (0x02) */ +/* This section provides detailed descriptions of the usages employed by simulation devices. */ +enum +{ + kHIDUsage_Sim_FlightSimulationDevice = 0x01, /* Application Collection */ + kHIDUsage_Sim_AutomobileSimulationDevice = 0x02, /* Application Collection */ + kHIDUsage_Sim_TankSimulationDevice = 0x03, /* Application Collection */ + kHIDUsage_Sim_SpaceshipSimulationDevice = 0x04, /* Application Collection */ + kHIDUsage_Sim_SubmarineSimulationDevice = 0x05, /* Application Collection */ + kHIDUsage_Sim_SailingSimulationDevice = 0x06, /* Application Collection */ + kHIDUsage_Sim_MotorcycleSimulationDevice = 0x07, /* Application Collection */ + kHIDUsage_Sim_SportsSimulationDevice = 0x08, /* Application Collection */ + kHIDUsage_Sim_AirplaneSimulationDevice = 0x09, /* Application Collection */ + kHIDUsage_Sim_HelicopterSimulationDevice = 0x0A, /* Application Collection */ + kHIDUsage_Sim_MagicCarpetSimulationDevice = 0x0B, /* Application Collection */ + kHIDUsage_Sim_BicycleSimulationDevice = 0x0C, /* Application Collection */ + /* 0x0D - 0x1F Reserved */ + kHIDUsage_Sim_FlightControlStick = 0x20, /* Application Collection */ + kHIDUsage_Sim_FlightStick = 0x21, /* Application Collection */ + kHIDUsage_Sim_CyclicControl = 0x22, /* Physical Collection */ + kHIDUsage_Sim_CyclicTrim = 0x23, /* Physical Collection */ + kHIDUsage_Sim_FlightYoke = 0x24, /* Application Collection */ + kHIDUsage_Sim_TrackControl = 0x25, /* Physical Collection */ + /* 0x26 - 0xAF Reserved */ + kHIDUsage_Sim_Aileron = 0xB0, /* Dynamic Value */ + kHIDUsage_Sim_AileronTrim = 0xB1, /* Dynamic Value */ + kHIDUsage_Sim_AntiTorqueControl = 0xB2, /* Dynamic Value */ + kHIDUsage_Sim_AutopilotEnable = 0xB3, /* On/Off Control */ + kHIDUsage_Sim_ChaffRelease = 0xB4, /* One-Shot Control */ + kHIDUsage_Sim_CollectiveControl = 0xB5, /* Dynamic Value */ + kHIDUsage_Sim_DiveBrake = 0xB6, /* Dynamic Value */ + kHIDUsage_Sim_ElectronicCountermeasures = 0xB7, /* On/Off Control */ + kHIDUsage_Sim_Elevator = 0xB8, /* Dynamic Value */ + kHIDUsage_Sim_ElevatorTrim = 0xB9, /* Dynamic Value */ + kHIDUsage_Sim_Rudder = 0xBA, /* Dynamic Value */ + kHIDUsage_Sim_Throttle = 0xBB, /* Dynamic Value */ + kHIDUsage_Sim_FlightCommunications = 0xBC, /* On/Off Control */ + kHIDUsage_Sim_FlareRelease = 0xBD, /* One-Shot Control */ + kHIDUsage_Sim_LandingGear = 0xBE, /* On/Off Control */ + kHIDUsage_Sim_ToeBrake = 0xBF, /* Dynamic Value */ + kHIDUsage_Sim_Trigger = 0xC0, /* Momentary Control */ + kHIDUsage_Sim_WeaponsArm = 0xC1, /* On/Off Control */ + kHIDUsage_Sim_Weapons = 0xC2, /* Selector */ + kHIDUsage_Sim_WingFlaps = 0xC3, /* Dynamic Value */ + kHIDUsage_Sim_Accelerator = 0xC4, /* Dynamic Value */ + kHIDUsage_Sim_Brake = 0xC5, /* Dynamic Value */ + kHIDUsage_Sim_Clutch = 0xC6, /* Dynamic Value */ + kHIDUsage_Sim_Shifter = 0xC7, /* Dynamic Value */ + kHIDUsage_Sim_Steering = 0xC8, /* Dynamic Value */ + kHIDUsage_Sim_TurretDirection = 0xC9, /* Dynamic Value */ + kHIDUsage_Sim_BarrelElevation = 0xCA, /* Dynamic Value */ + kHIDUsage_Sim_DivePlane = 0xCB, /* Dynamic Value */ + kHIDUsage_Sim_Ballast = 0xCC, /* Dynamic Value */ + kHIDUsage_Sim_BicycleCrank = 0xCD, /* Dynamic Value */ + kHIDUsage_Sim_HandleBars = 0xCE, /* Dynamic Value */ + kHIDUsage_Sim_FrontBrake = 0xCF, /* Dynamic Value */ + kHIDUsage_Sim_RearBrake = 0xD0, /* Dynamic Value */ + /* 0xD1 - 0xFFFF Reserved */ + kHIDUsage_Sim_Reserved = 0xFFFF +}; + +/* VR Page (0x03) */ +/* Virtual Reality controls depend on designators to identify the individual controls. Most of the following are */ +/* usages are applied to the collections of entities that comprise the actual device. */ +enum +{ + kHIDUsage_VR_Belt = 0x01, /* Application Collection */ + kHIDUsage_VR_BodySuit = 0x02, /* Application Collection */ + kHIDUsage_VR_Flexor = 0x03, /* Physical Collection */ + kHIDUsage_VR_Glove = 0x04, /* Application Collection */ + kHIDUsage_VR_HeadTracker = 0x05, /* Physical Collection */ + kHIDUsage_VR_HeadMountedDisplay = 0x06, /* Application Collection */ + kHIDUsage_VR_HandTracker = 0x07, /* Application Collection */ + kHIDUsage_VR_Oculometer = 0x08, /* Application Collection */ + kHIDUsage_VR_Vest = 0x09, /* Application Collection */ + kHIDUsage_VR_AnimatronicDevice = 0x0A, /* Application Collection */ + /* 0x0B - 0x1F Reserved */ + kHIDUsage_VR_StereoEnable = 0x20, /* On/Off Control */ + kHIDUsage_VR_DisplayEnable = 0x21, /* On/Off Control */ + /* 0x22 - 0xFFFF Reserved */ + kHIDUsage_VR_Reserved = 0xFFFF +}; + +/* Sport Page (0x04) */ +enum +{ + kHIDUsage_Sprt_BaseballBat = 0x01, /* Application Collection */ + kHIDUsage_Sprt_GolfClub = 0x02, /* Application Collection */ + kHIDUsage_Sprt_RowingMachine = 0x03, /* Application Collection */ + kHIDUsage_Sprt_Treadmill = 0x04, /* Application Collection */ + /* 0x05 - 0x2F Reserved */ + kHIDUsage_Sprt_Oar = 0x30, /* Dynamic Value */ + kHIDUsage_Sprt_Slope = 0x31, /* Dynamic Value */ + kHIDUsage_Sprt_Rate = 0x32, /* Dynamic Value */ + kHIDUsage_Sprt_StickSpeed = 0x33, /* Dynamic Value */ + kHIDUsage_Sprt_StickFaceAngle = 0x34, /* Dynamic Value */ + kHIDUsage_Sprt_StickHeelOrToe = 0x35, /* Dynamic Value */ + kHIDUsage_Sprt_StickFollowThrough = 0x36, /* Dynamic Value */ + kHIDUsage_Sprt_StickTempo = 0x37, /* Dynamic Value */ + kHIDUsage_Sprt_StickType = 0x38, /* Named Array */ + kHIDUsage_Sprt_StickHeight = 0x39, /* Dynamic Value */ + /* 0x3A - 0x4F Reserved */ + kHIDUsage_Sprt_Putter = 0x50, /* Selector */ + kHIDUsage_Sprt_1Iron = 0x51, /* Selector */ + kHIDUsage_Sprt_2Iron = 0x52, /* Selector */ + kHIDUsage_Sprt_3Iron = 0x53, /* Selector */ + kHIDUsage_Sprt_4Iron = 0x54, /* Selector */ + kHIDUsage_Sprt_5Iron = 0x55, /* Selector */ + kHIDUsage_Sprt_6Iron = 0x56, /* Selector */ + kHIDUsage_Sprt_7Iron = 0x57, /* Selector */ + kHIDUsage_Sprt_8Iron = 0x58, /* Selector */ + kHIDUsage_Sprt_9Iron = 0x59, /* Selector */ + kHIDUsage_Sprt_10Iron = 0x5A, /* Selector */ + kHIDUsage_Sprt_11Iron = 0x5B, /* Selector */ + kHIDUsage_Sprt_SandWedge = 0x5C, /* Selector */ + kHIDUsage_Sprt_LoftWedge = 0x5D, /* Selector */ + kHIDUsage_Sprt_PowerWedge = 0x5E, /* Selector */ + kHIDUsage_Sprt_1Wood = 0x5F, /* Selector */ + kHIDUsage_Sprt_3Wood = 0x60, /* Selector */ + kHIDUsage_Sprt_5Wood = 0x61, /* Selector */ + kHIDUsage_Sprt_7Wood = 0x62, /* Selector */ + kHIDUsage_Sprt_9Wood = 0x63, /* Selector */ + /* 0x64 - 0xFFFF Reserved */ + kHIDUsage_Sprt_Reserved = 0xFFFF +}; + +/* Game Page (0x05) */ +enum +{ + kHIDUsage_Game_3DGameController = 0x01, /* Application Collection */ + kHIDUsage_Game_PinballDevice = 0x02, /* Application Collection */ + kHIDUsage_Game_GunDevice = 0x03, /* Application Collection */ + /* 0x04 - 0x1F Reserved */ + kHIDUsage_Game_PointofView = 0x20, /* Physical Collection */ + kHIDUsage_Game_TurnRightOrLeft = 0x21, /* Dynamic Value */ + kHIDUsage_Game_PitchUpOrDown = 0x22, /* Dynamic Value */ + kHIDUsage_Game_RollRightOrLeft = 0x23, /* Dynamic Value */ + kHIDUsage_Game_MoveRightOrLeft = 0x24, /* Dynamic Value */ + kHIDUsage_Game_MoveForwardOrBackward = 0x25, /* Dynamic Value */ + kHIDUsage_Game_MoveUpOrDown = 0x26, /* Dynamic Value */ + kHIDUsage_Game_LeanRightOrLeft = 0x27, /* Dynamic Value */ + kHIDUsage_Game_LeanForwardOrBackward = 0x28, /* Dynamic Value */ + kHIDUsage_Game_HeightOfPOV = 0x29, /* Dynamic Value */ + kHIDUsage_Game_Flipper = 0x2A, /* Momentary Control */ + kHIDUsage_Game_SecondaryFlipper = 0x2B, /* Momentary Control */ + kHIDUsage_Game_Bump = 0x2C, /* Momentary Control */ + kHIDUsage_Game_NewGame = 0x2D, /* One-Shot Control */ + kHIDUsage_Game_ShootBall = 0x2E, /* One-Shot Control */ + kHIDUsage_Game_Player = 0x2F, /* One-Shot Control */ + kHIDUsage_Game_GunBolt = 0x30, /* On/Off Control */ + kHIDUsage_Game_GunClip = 0x31, /* On/Off Control */ + kHIDUsage_Game_Gun = 0x32, /* Selector */ + kHIDUsage_Game_GunSingleShot = 0x33, /* Selector */ + kHIDUsage_Game_GunBurst = 0x34, /* Selector */ + kHIDUsage_Game_GunAutomatic = 0x35, /* Selector */ + kHIDUsage_Game_GunSafety = 0x36, /* On/Off Control */ + kHIDUsage_Game_GamepadFireOrJump = 0x37, /* Logical Collection */ + kHIDUsage_Game_GamepadTrigger = 0x39, /* Logical Collection */ + /* 0x3A - 0xFFFF Reserved */ + kHIDUsage_Game_Reserved = 0xFFFF +}; + +/* KeyboardOrKeypad Page (0x07) */ +/* This section is the Usage Page for key codes to be used in implementing a USB keyboard. A Boot Keyboard (84-, 101- or 104-key) should at a minimum support all associated usage codes as indicated in the ÒBootÓ */ +/* column below. */ +/* The usage type of all key codes is Selectors (Sel), except for the modifier keys Keyboard Left Control (0x224) to Keyboard Right GUI (0x231) which are Dynamic Flags (DV). */ +/* Note: A general note on Usages and languages: Due to the variation of keyboards from language to language, it is not feasible to specify exact key mappings for every language. Where this list is not specific for a key function in a language, the closest equivalent key position should be used, so that a keyboard may be modified for a different language by simply printing different keycaps. One example is the Y key on a North American keyboard. In Germany this is typically Z. Rather than changing the keyboard firmware to put the Z Usage into that place in the descriptor list, the vendor should use the Y Usage on both the North American and German keyboards. This continues to be the existing practice in the industry, in order to minimize the number of changes to the electronics to accommodate otherlanguages. */ +enum +{ + kHIDUsage_KeyboardErrorRollOver = 0x01, /* ErrorRollOver */ + kHIDUsage_KeyboardPOSTFail = 0x02, /* POSTFail */ + kHIDUsage_KeyboardErrorUndefined = 0x03, /* ErrorUndefined */ + kHIDUsage_KeyboardA = 0x04, /* a or A */ + kHIDUsage_KeyboardB = 0x05, /* b or B */ + kHIDUsage_KeyboardC = 0x06, /* c or C */ + kHIDUsage_KeyboardD = 0x07, /* d or D */ + kHIDUsage_KeyboardE = 0x08, /* e or E */ + kHIDUsage_KeyboardF = 0x09, /* f or F */ + kHIDUsage_KeyboardG = 0x0A, /* g or G */ + kHIDUsage_KeyboardH = 0x0B, /* h or H */ + kHIDUsage_KeyboardI = 0x0C, /* i or I */ + kHIDUsage_KeyboardJ = 0x0D, /* j or J */ + kHIDUsage_KeyboardK = 0x0E, /* k or K */ + kHIDUsage_KeyboardL = 0x0F, /* l or L */ + kHIDUsage_KeyboardM = 0x10, /* m or M */ + kHIDUsage_KeyboardN = 0x11, /* n or N */ + kHIDUsage_KeyboardO = 0x12, /* o or O */ + kHIDUsage_KeyboardP = 0x13, /* p or P */ + kHIDUsage_KeyboardQ = 0x14, /* q or Q */ + kHIDUsage_KeyboardR = 0x15, /* r or R */ + kHIDUsage_KeyboardS = 0x16, /* s or S */ + kHIDUsage_KeyboardT = 0x17, /* t or T */ + kHIDUsage_KeyboardU = 0x18, /* u or U */ + kHIDUsage_KeyboardV = 0x19, /* v or V */ + kHIDUsage_KeyboardW = 0x1A, /* w or W */ + kHIDUsage_KeyboardX = 0x1B, /* x or X */ + kHIDUsage_KeyboardY = 0x1C, /* y or Y */ + kHIDUsage_KeyboardZ = 0x1D, /* z or Z */ + kHIDUsage_Keyboard1 = 0x1E, /* 1 or ! */ + kHIDUsage_Keyboard2 = 0x1F, /* 2 or @ */ + kHIDUsage_Keyboard3 = 0x20, /* 3 or # */ + kHIDUsage_Keyboard4 = 0x21, /* 4 or $ */ + kHIDUsage_Keyboard5 = 0x22, /* 5 or % */ + kHIDUsage_Keyboard6 = 0x23, /* 6 or ^ */ + kHIDUsage_Keyboard7 = 0x24, /* 7 or & */ + kHIDUsage_Keyboard8 = 0x25, /* 8 or * */ + kHIDUsage_Keyboard9 = 0x26, /* 9 or ( */ + kHIDUsage_Keyboard0 = 0x27, /* 0 or ) */ + kHIDUsage_KeyboardReturnOrEnter = 0x28, /* Return (Enter) */ + kHIDUsage_KeyboardEscape = 0x29, /* Escape */ + kHIDUsage_KeyboardDeleteOrBackspace = 0x2A, /* Delete (Backspace) */ + kHIDUsage_KeyboardTab = 0x2B, /* Tab */ + kHIDUsage_KeyboardSpacebar = 0x2C, /* Spacebar */ + kHIDUsage_KeyboardHyphen = 0x2D, /* - or _ */ + kHIDUsage_KeyboardEqualSign = 0x2E, /* = or + */ + kHIDUsage_KeyboardOpenBracket = 0x2F, /* [ or { */ + kHIDUsage_KeyboardCloseBracket = 0x30, /* ] or } */ + kHIDUsage_KeyboardBackslash = 0x31, /* \ or | */ + kHIDUsage_KeyboardNonUSPound = 0x32, /* Non-US # or _ */ + kHIDUsage_KeyboardSemicolon = 0x33, /* ; or : */ + kHIDUsage_KeyboardQuote = 0x34, /* ' or " */ + kHIDUsage_KeyboardGraveAccentAndTilde = 0x35, /* Grave Accent and Tilde */ + kHIDUsage_KeyboardComma = 0x36, /* , or < */ + kHIDUsage_KeyboardPeriod = 0x37, /* . or > */ + kHIDUsage_KeyboardSlash = 0x38, /* / or ? */ + kHIDUsage_KeyboardCapsLock = 0x39, /* Caps Lock */ + kHIDUsage_KeyboardF1 = 0x3A, /* F1 */ + kHIDUsage_KeyboardF2 = 0x3B, /* F2 */ + kHIDUsage_KeyboardF3 = 0x3C, /* F3 */ + kHIDUsage_KeyboardF4 = 0x3D, /* F4 */ + kHIDUsage_KeyboardF5 = 0x3E, /* F5 */ + kHIDUsage_KeyboardF6 = 0x3F, /* F6 */ + kHIDUsage_KeyboardF7 = 0x40, /* F7 */ + kHIDUsage_KeyboardF8 = 0x41, /* F8 */ + kHIDUsage_KeyboardF9 = 0x42, /* F9 */ + kHIDUsage_KeyboardF10 = 0x43, /* F10 */ + kHIDUsage_KeyboardF11 = 0x44, /* F11 */ + kHIDUsage_KeyboardF12 = 0x45, /* F12 */ + kHIDUsage_KeyboardPrintScreen = 0x46, /* Print Screen */ + kHIDUsage_KeyboardScrollLock = 0x47, /* Scroll Lock */ + kHIDUsage_KeyboardPause = 0x48, /* Pause */ + kHIDUsage_KeyboardInsert = 0x49, /* Insert */ + kHIDUsage_KeyboardHome = 0x4A, /* Home */ + kHIDUsage_KeyboardPageUp = 0x4B, /* Page Up */ + kHIDUsage_KeyboardDeleteForward = 0x4C, /* Delete Forward */ + kHIDUsage_KeyboardEnd = 0x4D, /* End */ + kHIDUsage_KeyboardPageDown = 0x4E, /* Page Down */ + kHIDUsage_KeyboardRightArrow = 0x4F, /* Right Arrow */ + kHIDUsage_KeyboardLeftArrow = 0x50, /* Left Arrow */ + kHIDUsage_KeyboardDownArrow = 0x51, /* Down Arrow */ + kHIDUsage_KeyboardUpArrow = 0x52, /* Up Arrow */ + kHIDUsage_KeypadNumLock = 0x53, /* Keypad NumLock or Clear */ + kHIDUsage_KeypadSlash = 0x54, /* Keypad / */ + kHIDUsage_KeypadAsterisk = 0x55, /* Keypad * */ + kHIDUsage_KeypadHyphen = 0x56, /* Keypad - */ + kHIDUsage_KeypadPlus = 0x57, /* Keypad + */ + kHIDUsage_KeypadEnter = 0x58, /* Keypad Enter */ + kHIDUsage_Keypad1 = 0x59, /* Keypad 1 or End */ + kHIDUsage_Keypad2 = 0x5A, /* Keypad 2 or Down Arrow */ + kHIDUsage_Keypad3 = 0x5B, /* Keypad 3 or Page Down */ + kHIDUsage_Keypad4 = 0x5C, /* Keypad 4 or Left Arrow */ + kHIDUsage_Keypad5 = 0x5D, /* Keypad 5 */ + kHIDUsage_Keypad6 = 0x5E, /* Keypad 6 or Right Arrow */ + kHIDUsage_Keypad7 = 0x5F, /* Keypad 7 or Home */ + kHIDUsage_Keypad8 = 0x60, /* Keypad 8 or Up Arrow */ + kHIDUsage_Keypad9 = 0x61, /* Keypad 9 or Page Up */ + kHIDUsage_Keypad0 = 0x62, /* Keypad 0 or Insert */ + kHIDUsage_KeypadPeriod = 0x63, /* Keypad . or Delete */ + kHIDUsage_KeyboardNonUSBackslash = 0x64, /* Non-US \ or | */ + kHIDUsage_KeyboardApplication = 0x65, /* Application */ + kHIDUsage_KeyboardPower = 0x66, /* Power */ + kHIDUsage_KeypadEqualSign = 0x67, /* Keypad = */ + kHIDUsage_KeyboardF13 = 0x68, /* F13 */ + kHIDUsage_KeyboardF14 = 0x69, /* F14 */ + kHIDUsage_KeyboardF15 = 0x6A, /* F15 */ + kHIDUsage_KeyboardF16 = 0x6B, /* F16 */ + kHIDUsage_KeyboardF17 = 0x6C, /* F17 */ + kHIDUsage_KeyboardF18 = 0x6D, /* F18 */ + kHIDUsage_KeyboardF19 = 0x6E, /* F19 */ + kHIDUsage_KeyboardF20 = 0x6F, /* F20 */ + kHIDUsage_KeyboardF21 = 0x70, /* F21 */ + kHIDUsage_KeyboardF22 = 0x71, /* F22 */ + kHIDUsage_KeyboardF23 = 0x72, /* F23 */ + kHIDUsage_KeyboardF24 = 0x73, /* F24 */ + kHIDUsage_KeyboardExecute = 0x74, /* Execute */ + kHIDUsage_KeyboardHelp = 0x75, /* Help */ + kHIDUsage_KeyboardMenu = 0x76, /* Menu */ + kHIDUsage_KeyboardSelect = 0x77, /* Select */ + kHIDUsage_KeyboardStop = 0x78, /* Stop */ + kHIDUsage_KeyboardAgain = 0x79, /* Again */ + kHIDUsage_KeyboardUndo = 0x7A, /* Undo */ + kHIDUsage_KeyboardCut = 0x7B, /* Cut */ + kHIDUsage_KeyboardCopy = 0x7C, /* Copy */ + kHIDUsage_KeyboardPaste = 0x7D, /* Paste */ + kHIDUsage_KeyboardFind = 0x7E, /* Find */ + kHIDUsage_KeyboardMute = 0x7F, /* Mute */ + kHIDUsage_KeyboardVolumeUp = 0x80, /* Volume Up */ + kHIDUsage_KeyboardVolumeDown = 0x81, /* Volume Down */ + kHIDUsage_KeyboardLockingCapsLock = 0x82, /* Locking Caps Lock */ + kHIDUsage_KeyboardLockingNumLock = 0x83, /* Locking Num Lock */ + kHIDUsage_KeyboardLockingScrollLock = 0x84, /* Locking Scroll Lock */ + kHIDUsage_KeypadComma = 0x85, /* Keypad Comma */ + kHIDUsage_KeypadEqualSignAS400 = 0x86, /* Keypad Equal Sign for AS/400 */ + kHIDUsage_KeyboardInternational1 = 0x87, /* International1 */ + kHIDUsage_KeyboardInternational2 = 0x88, /* International2 */ + kHIDUsage_KeyboardInternational3 = 0x89, /* International3 */ + kHIDUsage_KeyboardInternational4 = 0x8A, /* International4 */ + kHIDUsage_KeyboardInternational5 = 0x8B, /* International5 */ + kHIDUsage_KeyboardInternational6 = 0x8C, /* International6 */ + kHIDUsage_KeyboardInternational7 = 0x8D, /* International7 */ + kHIDUsage_KeyboardInternational8 = 0x8E, /* International8 */ + kHIDUsage_KeyboardInternational9 = 0x8F, /* International9 */ + kHIDUsage_KeyboardLANG1 = 0x90, /* LANG1 */ + kHIDUsage_KeyboardLANG2 = 0x91, /* LANG2 */ + kHIDUsage_KeyboardLANG3 = 0x92, /* LANG3 */ + kHIDUsage_KeyboardLANG4 = 0x93, /* LANG4 */ + kHIDUsage_KeyboardLANG5 = 0x94, /* LANG5 */ + kHIDUsage_KeyboardLANG6 = 0x95, /* LANG6 */ + kHIDUsage_KeyboardLANG7 = 0x96, /* LANG7 */ + kHIDUsage_KeyboardLANG8 = 0x97, /* LANG8 */ + kHIDUsage_KeyboardLANG9 = 0x98, /* LANG9 */ + kHIDUsage_KeyboardAlternateErase = 0x99, /* AlternateErase */ + kHIDUsage_KeyboardSysReqOrAttention = 0x9A, /* SysReq/Attention */ + kHIDUsage_KeyboardCancel = 0x9B, /* Cancel */ + kHIDUsage_KeyboardClear = 0x9C, /* Clear */ + kHIDUsage_KeyboardPrior = 0x9D, /* Prior */ + kHIDUsage_KeyboardReturn = 0x9E, /* Return */ + kHIDUsage_KeyboardSeparator = 0x9F, /* Separator */ + kHIDUsage_KeyboardOut = 0xA0, /* Out */ + kHIDUsage_KeyboardOper = 0xA1, /* Oper */ + kHIDUsage_KeyboardClearOrAgain = 0xA2, /* Clear/Again */ + kHIDUsage_KeyboardCrSelOrProps = 0xA3, /* CrSel/Props */ + kHIDUsage_KeyboardExSel = 0xA4, /* ExSel */ + /* 0xA5-0xDF Reserved */ + kHIDUsage_KeyboardLeftControl = 0xE0, /* Left Control */ + kHIDUsage_KeyboardLeftShift = 0xE1, /* Left Shift */ + kHIDUsage_KeyboardLeftAlt = 0xE2, /* Left Alt */ + kHIDUsage_KeyboardLeftGUI = 0xE3, /* Left GUI */ + kHIDUsage_KeyboardRightControl = 0xE4, /* Right Control */ + kHIDUsage_KeyboardRightShift = 0xE5, /* Right Shift */ + kHIDUsage_KeyboardRightAlt = 0xE6, /* Right Alt */ + kHIDUsage_KeyboardRightGUI = 0xE7, /* Right GUI */ + /* 0xE8-0xFFFF Reserved */ + kHIDUsage_Keyboard_Reserved = 0xFFFF +}; + +/* LEDs Page (0x08) */ +/* An LED or indicator is implemented as an On/Off Control (OOF) using the ÒSingle button toggleÓ mode, where a value of 1 will turn on the indicator, and a value of 0 will turn it off. The exceptions are described below. */ +enum +{ + kHIDUsage_LED_NumLock = 0x01, /* On/Off Control */ + kHIDUsage_LED_CapsLock = 0x02, /* On/Off Control */ + kHIDUsage_LED_ScrollLock = 0x03, /* On/Off Control */ + kHIDUsage_LED_Compose = 0x04, /* On/Off Control */ + kHIDUsage_LED_Kana = 0x05, /* On/Off Control */ + kHIDUsage_LED_Power = 0x06, /* On/Off Control */ + kHIDUsage_LED_Shift = 0x07, /* On/Off Control */ + kHIDUsage_LED_DoNotDisturb = 0x08, /* On/Off Control */ + kHIDUsage_LED_Mute = 0x09, /* On/Off Control */ + kHIDUsage_LED_ToneEnable = 0x0A, /* On/Off Control */ + kHIDUsage_LED_HighCutFilter = 0x0B, /* On/Off Control */ + kHIDUsage_LED_LowCutFilter = 0x0C, /* On/Off Control */ + kHIDUsage_LED_EqualizerEnable = 0x0D, /* On/Off Control */ + kHIDUsage_LED_SoundFieldOn = 0x0E, /* On/Off Control */ + kHIDUsage_LED_SurroundOn = 0x0F, /* On/Off Control */ + kHIDUsage_LED_Repeat = 0x10, /* On/Off Control */ + kHIDUsage_LED_Stereo = 0x11, /* On/Off Control */ + kHIDUsage_LED_SamplingRateDetect = 0x12, /* On/Off Control */ + kHIDUsage_LED_Spinning = 0x13, /* On/Off Control */ + kHIDUsage_LED_CAV = 0x14, /* On/Off Control */ + kHIDUsage_LED_CLV = 0x15, /* On/Off Control */ + kHIDUsage_LED_RecordingFormatDetect = 0x16, /* On/Off Control */ + kHIDUsage_LED_OffHook = 0x17, /* On/Off Control */ + kHIDUsage_LED_Ring = 0x18, /* On/Off Control */ + kHIDUsage_LED_MessageWaiting = 0x19, /* On/Off Control */ + kHIDUsage_LED_DataMode = 0x1A, /* On/Off Control */ + kHIDUsage_LED_BatteryOperation = 0x1B, /* On/Off Control */ + kHIDUsage_LED_BatteryOK = 0x1C, /* On/Off Control */ + kHIDUsage_LED_BatteryLow = 0x1D, /* On/Off Control */ + kHIDUsage_LED_Speaker = 0x1E, /* On/Off Control */ + kHIDUsage_LED_HeadSet = 0x1F, /* On/Off Control */ + kHIDUsage_LED_Hold = 0x20, /* On/Off Control */ + kHIDUsage_LED_Microphone = 0x21, /* On/Off Control */ + kHIDUsage_LED_Coverage = 0x22, /* On/Off Control */ + kHIDUsage_LED_NightMode = 0x23, /* On/Off Control */ + kHIDUsage_LED_SendCalls = 0x24, /* On/Off Control */ + kHIDUsage_LED_CallPickup = 0x25, /* On/Off Control */ + kHIDUsage_LED_Conference = 0x26, /* On/Off Control */ + kHIDUsage_LED_StandBy = 0x27, /* On/Off Control */ + kHIDUsage_LED_CameraOn = 0x28, /* On/Off Control */ + kHIDUsage_LED_CameraOff = 0x29, /* On/Off Control */ + kHIDUsage_LED_OnLine = 0x2A, /* On/Off Control */ + kHIDUsage_LED_OffLine = 0x2B, /* On/Off Control */ + kHIDUsage_LED_Busy = 0x2C, /* On/Off Control */ + kHIDUsage_LED_Ready = 0x2D, /* On/Off Control */ + kHIDUsage_LED_PaperOut = 0x2E, /* On/Off Control */ + kHIDUsage_LED_PaperJam = 0x2F, /* On/Off Control */ + kHIDUsage_LED_Remote = 0x30, /* On/Off Control */ + kHIDUsage_LED_Forward = 0x31, /* On/Off Control */ + kHIDUsage_LED_Reverse = 0x32, /* On/Off Control */ + kHIDUsage_LED_Stop = 0x33, /* On/Off Control */ + kHIDUsage_LED_Rewind = 0x34, /* On/Off Control */ + kHIDUsage_LED_FastForward = 0x35, /* On/Off Control */ + kHIDUsage_LED_Play = 0x36, /* On/Off Control */ + kHIDUsage_LED_Pause = 0x37, /* On/Off Control */ + kHIDUsage_LED_Record = 0x38, /* On/Off Control */ + kHIDUsage_LED_Error = 0x39, /* On/Off Control */ + kHIDUsage_LED_Usage = 0x3A, /* Selector */ + kHIDUsage_LED_UsageInUseIndicator = 0x3B, /* Usage Switch */ + kHIDUsage_LED_UsageMultiModeIndicator = 0x3C, /* Usage Modifier */ + kHIDUsage_LED_IndicatorOn = 0x3D, /* Selector */ + kHIDUsage_LED_IndicatorFlash = 0x3E, /* Selector */ + kHIDUsage_LED_IndicatorSlowBlink = 0x3F, /* Selector */ + kHIDUsage_LED_IndicatorFastBlink = 0x40, /* Selector */ + kHIDUsage_LED_IndicatorOff = 0x41, /* Selector */ + kHIDUsage_LED_FlashOnTime = 0x42, /* Dynamic Value */ + kHIDUsage_LED_SlowBlinkOnTime = 0x43, /* Dynamic Value */ + kHIDUsage_LED_SlowBlinkOffTime = 0x44, /* Dynamic Value */ + kHIDUsage_LED_FastBlinkOnTime = 0x45, /* Dynamic Value */ + kHIDUsage_LED_FastBlinkOffTime = 0x46, /* Dynamic Value */ + kHIDUsage_LED_UsageIndicatorColor = 0x47, /* Usage Modifier */ + kHIDUsage_LED_IndicatorRed = 0x48, /* Selector */ + kHIDUsage_LED_IndicatorGreen = 0x49, /* Selector */ + kHIDUsage_LED_IndicatorAmber = 0x4A, /* Selector */ + kHIDUsage_LED_GenericIndicator = 0x4B, /* On/Off Control */ + kHIDUsage_LED_SystemSuspend = 0x4C, /* On/Off Control */ + kHIDUsage_LED_ExternalPowerConnected = 0x4D, /* On/Off Control */ + /* 0x4E - 0xFFFF Reserved */ + kHIDUsage_LED_Reserved = 0xFFFF +}; + +/* Button Page (0x09) */ +/* The Button page is the first place an application should look for user selection controls. System graphical user interfaces typically employ a pointer and a set of hierarchical selectors to select, move and otherwise manipulate their environment. For these purposes the following assignment of significance can be applied to the Button usages: */ +/* ¥ Button 1, Primary Button. Used for object selecting, dragging, and double click activation. On MacOS, this is the only button. Microsoft operating systems call this a logical left button, because it */ +/* is not necessarily physically located on the left of the pointing device. */ +/* ¥ Button 2, Secondary Button. Used by newer graphical user interfaces to browse object properties. Exposed by systems to applications that typically assign application-specific functionality. */ +/* ¥ Button 3, Tertiary Button. Optional control. Exposed to applications, but seldom assigned functionality due to prevalence of two- and one-button devices. */ +/* ¥ Buttons 4 -55. As the button number increases, its significance as a selector decreases. */ +/* In many ways the assignment of button numbers is similar to the assignment of Effort in Physical descriptors. Button 1 would be used to define the button a finger rests on when the hand is in the Òat restÓ position, that is, virtually no effort is required by the user to activate the button. Button values increment as the finger has to stretch to reach a control. See Section 6.2.3, ÒPhysical Descriptors,Ó in the HID Specification for methods of further qualifying buttons. */ +enum +{ + kHIDUsage_Button_1 = 0x01, /* (primary/trigger) */ + kHIDUsage_Button_2 = 0x02, /* (secondary) */ + kHIDUsage_Button_3 = 0x03, /* (tertiary) */ + kHIDUsage_Button_4 = 0x04, /* 4th button */ + /* ... */ + kHIDUsage_Button_65535 = 0xFFFF +}; + +/* Ordinal Page (0x0A) */ +/* The Ordinal page allows multiple instances of a control or sets of controls to be declared without requiring individual enumeration in the native usage page. For example, it is not necessary to declare usages of Pointer 1, Pointer 2, and so forth on the Generic Desktop page. When parsed, the ordinal instance number is, in essence, concatenated to the usages attached to the encompassing collection to create Pointer 1, Pointer 2, and so forth. */ +/* For an example, see Section A.5, ÒMultiple Instances of a Control,Ó in Appendix A, ÒUsage Examples.Ó By convention, an Ordinal collection is placed inside the collection for which it is declaring multiple instances. */ +/* Instances do not have to be identical. */ +enum +{ + /* 0x00 Reserved */ + kHIDUsage_Ord_Instance1 = 0x01, /* Usage Modifier */ + kHIDUsage_Ord_Instance2 = 0x02, /* Usage Modifier */ + kHIDUsage_Ord_Instance3 = 0x03, /* Usage Modifier */ + kHIDUsage_Ord_Instance4 = 0x04, /* Usage Modifier */ + kHIDUsage_Ord_Instance65535 = 0xFFFF /* Usage Modifier */ +}; + +/* Telephony Page (0x0B) */ +/* This usage page defines the keytop and control usages for telephony devices. */ +/* Indicators on a phone are handled by wrapping them in LED: Usage In Use Indicator and LED: Usage Selected Indicator usages. For example, a message-indicator LED would be identified by a Telephony: Message usage declared as a Feature or Output in a LED: Usage In Use Indicator collection. */ +/* See Section 14, ÒConsumer Page (0x0C),Ó for audio volume and tone controls. */ +enum +{ + kHIDUsage_Tfon_Phone = 0x01, /* Application Collection */ + kHIDUsage_Tfon_AnsweringMachine = 0x02, /* Application Collection */ + kHIDUsage_Tfon_MessageControls = 0x03, /* Logical Collection */ + kHIDUsage_Tfon_Handset = 0x04, /* Logical Collection */ + kHIDUsage_Tfon_Headset = 0x05, /* Logical Collection */ + kHIDUsage_Tfon_TelephonyKeyPad = 0x06, /* Named Array */ + kHIDUsage_Tfon_ProgrammableButton = 0x07, /* Named Array */ + /* 0x08 - 0x1F Reserved */ + kHIDUsage_Tfon_HookSwitch = 0x20, /* On/Off Control */ + kHIDUsage_Tfon_Flash = 0x21, /* Momentary Control */ + kHIDUsage_Tfon_Feature = 0x22, /* One-Shot Control */ + kHIDUsage_Tfon_Hold = 0x23, /* On/Off Control */ + kHIDUsage_Tfon_Redial = 0x24, /* One-Shot Control */ + kHIDUsage_Tfon_Transfer = 0x25, /* One-Shot Control */ + kHIDUsage_Tfon_Drop = 0x26, /* One-Shot Control */ + kHIDUsage_Tfon_Park = 0x27, /* On/Off Control */ + kHIDUsage_Tfon_ForwardCalls = 0x28, /* On/Off Control */ + kHIDUsage_Tfon_AlternateFunction = 0x29, /* Momentary Control */ + kHIDUsage_Tfon_Line = 0x2A, /* One-Shot Control */ + kHIDUsage_Tfon_SpeakerPhone = 0x2B, /* On/Off Control */ + kHIDUsage_Tfon_Conference = 0x2C, /* On/Off Control */ + kHIDUsage_Tfon_RingEnable = 0x2D, /* On/Off Control */ + kHIDUsage_Tfon_Ring = 0x2E, /* Selector */ + kHIDUsage_Tfon_PhoneMute = 0x2F, /* On/Off Control */ + kHIDUsage_Tfon_CallerID = 0x30, /* Momentary Control */ + /* 0x31 - 0x4F Reserved */ + kHIDUsage_Tfon_SpeedDial = 0x50, /* One-Shot Control */ + kHIDUsage_Tfon_StoreNumber = 0x51, /* One-Shot Control */ + kHIDUsage_Tfon_RecallNumber = 0x52, /* One-Shot Control */ + kHIDUsage_Tfon_PhoneDirectory = 0x53, /* On/Off Control */ + /* 0x54 - 0x6F Reserved */ + kHIDUsage_Tfon_VoiceMail = 0x70, /* On/Off Control */ + kHIDUsage_Tfon_ScreenCalls = 0x71, /* On/Off Control */ + kHIDUsage_Tfon_DoNotDisturb = 0x72, /* On/Off Control */ + kHIDUsage_Tfon_Message = 0x73, /* One-Shot Control */ + kHIDUsage_Tfon_AnswerOnOrOff = 0x74, /* On/Off Control */ + /* 0x75 - 0x8F Reserved */ + kHIDUsage_Tfon_InsideDialTone = 0x90, /* Momentary Control */ + kHIDUsage_Tfon_OutsideDialTone = 0x91, /* Momentary Control */ + kHIDUsage_Tfon_InsideRingTone = 0x92, /* Momentary Control */ + kHIDUsage_Tfon_OutsideRingTone = 0x93, /* Momentary Control */ + kHIDUsage_Tfon_PriorityRingTone = 0x94, /* Momentary Control */ + kHIDUsage_Tfon_InsideRingback = 0x95, /* Momentary Control */ + kHIDUsage_Tfon_PriorityRingback = 0x96, /* Momentary Control */ + kHIDUsage_Tfon_LineBusyTone = 0x97, /* Momentary Control */ + kHIDUsage_Tfon_ReorderTone = 0x98, /* Momentary Control */ + kHIDUsage_Tfon_CallWaitingTone = 0x99, /* Momentary Control */ + kHIDUsage_Tfon_ConfirmationTone1 = 0x9A, /* Momentary Control */ + kHIDUsage_Tfon_ConfirmationTone2 = 0x9B, /* Momentary Control */ + kHIDUsage_Tfon_TonesOff = 0x9C, /* On/Off Control */ + kHIDUsage_Tfon_OutsideRingback = 0x9D, /* Momentary Control */ + /* 0x9E - 0xAF Reserved */ + kHIDUsage_Tfon_PhoneKey0 = 0xB0, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey1 = 0xB1, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey2 = 0xB2, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey3 = 0xB3, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey4 = 0xB4, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey5 = 0xB5, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey6 = 0xB6, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey7 = 0xB7, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey8 = 0xB8, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKey9 = 0xB9, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKeyStar = 0xBA, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKeyPound = 0xBB, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKeyA = 0xBC, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKeyB = 0xBD, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKeyC = 0xBE, /* Selector/One-Shot Control */ + kHIDUsage_Tfon_PhoneKeyD = 0xBF, /* Selector/One-Shot Control */ + /* 0xC0 - 0xFFFF Reserved */ + kHIDUsage_TFon_Reserved = 0xFFFF +}; + +/* Consumer Page (0x0C) */ +/* All controls on the Consumer page are application-specific. That is, they affect a specific device, not the system as a whole. */ +enum +{ + kHIDUsage_Csmr_ConsumerControl = 0x01, /* Application Collection */ + kHIDUsage_Csmr_NumericKeyPad = 0x02, /* Named Array */ + kHIDUsage_Csmr_ProgrammableButtons = 0x03, /* Named Array */ + /* 0x03 - 0x1F Reserved */ + kHIDUsage_Csmr_Plus10 = 0x20, /* One-Shot Control */ + kHIDUsage_Csmr_Plus100 = 0x21, /* One-Shot Control */ + kHIDUsage_Csmr_AMOrPM = 0x22, /* One-Shot Control */ + /* 0x23 - 0x3F Reserved */ + kHIDUsage_Csmr_Power = 0x30, /* On/Off Control */ + kHIDUsage_Csmr_Reset = 0x31, /* One-Shot Control */ + kHIDUsage_Csmr_Sleep = 0x32, /* One-Shot Control */ + kHIDUsage_Csmr_SleepAfter = 0x33, /* One-Shot Control */ + kHIDUsage_Csmr_SleepMode = 0x34, /* Re-Trigger Control */ + kHIDUsage_Csmr_Illumination = 0x35, /* On/Off Control */ + kHIDUsage_Csmr_FunctionButtons = 0x36, /* Named Array */ + /* 0x37 - 0x3F Reserved */ + kHIDUsage_Csmr_Menu = 0x40, /* On/Off Control */ + kHIDUsage_Csmr_MenuPick = 0x41, /* One-Shot Control */ + kHIDUsage_Csmr_MenuUp = 0x42, /* One-Shot Control */ + kHIDUsage_Csmr_MenuDown = 0x43, /* One-Shot Control */ + kHIDUsage_Csmr_MenuLeft = 0x44, /* One-Shot Control */ + kHIDUsage_Csmr_MenuRight = 0x45, /* One-Shot Control */ + kHIDUsage_Csmr_MenuEscape = 0x46, /* One-Shot Control */ + kHIDUsage_Csmr_MenuValueIncrease = 0x47, /* One-Shot Control */ + kHIDUsage_Csmr_MenuValueDecrease = 0x48, /* One-Shot Control */ + /* 0x49 - 0x5F Reserved */ + kHIDUsage_Csmr_DataOnScreen = 0x60, /* On/Off Control */ + kHIDUsage_Csmr_ClosedCaption = 0x61, /* On/Off Control */ + kHIDUsage_Csmr_ClosedCaptionSelect = 0x62, /* Selector */ + kHIDUsage_Csmr_VCROrTV = 0x63, /* On/Off Control */ + kHIDUsage_Csmr_BroadcastMode = 0x64, /* One-Shot Control */ + kHIDUsage_Csmr_Snapshot = 0x65, /* One-Shot Control */ + kHIDUsage_Csmr_Still = 0x66, /* One-Shot Control */ + /* 0x67 - 0x7F Reserved */ + kHIDUsage_Csmr_Selection = 0x80, /* Named Array */ + kHIDUsage_Csmr_Assign = 0x81, /* Selector */ + kHIDUsage_Csmr_ModeStep = 0x82, /* One-Shot Control */ + kHIDUsage_Csmr_RecallLast = 0x83, /* One-Shot Control */ + kHIDUsage_Csmr_EnterChannel = 0x84, /* One-Shot Control */ + kHIDUsage_Csmr_OrderMovie = 0x85, /* One-Shot Control */ + kHIDUsage_Csmr_Channel = 0x86, /* Linear Control */ + kHIDUsage_Csmr_MediaSelection = 0x87, /* Selector */ + kHIDUsage_Csmr_MediaSelectComputer = 0x88, /* Selector */ + kHIDUsage_Csmr_MediaSelectTV = 0x89, /* Selector */ + kHIDUsage_Csmr_MediaSelectWWW = 0x8A, /* Selector */ + kHIDUsage_Csmr_MediaSelectDVD = 0x8B, /* Selector */ + kHIDUsage_Csmr_MediaSelectTelephone = 0x8C, /* Selector */ + kHIDUsage_Csmr_MediaSelectProgramGuide = 0x8D, /* Selector */ + kHIDUsage_Csmr_MediaSelectVideoPhone = 0x8E, /* Selector */ + kHIDUsage_Csmr_MediaSelectGames = 0x8F, /* Selector */ + kHIDUsage_Csmr_MediaSelectMessages = 0x90, /* Selector */ + kHIDUsage_Csmr_MediaSelectCD = 0x91, /* Selector */ + kHIDUsage_Csmr_MediaSelectVCR = 0x92, /* Selector */ + kHIDUsage_Csmr_MediaSelectTuner = 0x93, /* Selector */ + kHIDUsage_Csmr_Quit = 0x94, /* One-Shot Control */ + kHIDUsage_Csmr_Help = 0x95, /* On/Off Control */ + kHIDUsage_Csmr_MediaSelectTape = 0x96, /* Selector */ + kHIDUsage_Csmr_MediaSelectCable = 0x97, /* Selector */ + kHIDUsage_Csmr_MediaSelectSatellite = 0x98, /* Selector */ + kHIDUsage_Csmr_MediaSelectSecurity = 0x99, /* Selector */ + kHIDUsage_Csmr_MediaSelectHome = 0x9A, /* Selector */ + kHIDUsage_Csmr_MediaSelectCall = 0x9B, /* Selector */ + kHIDUsage_Csmr_ChannelIncrement = 0x9C, /* One-Shot Control */ + kHIDUsage_Csmr_ChannelDecrement = 0x9D, /* One-Shot Control */ + kHIDUsage_Csmr_Media = 0x9E, /* Selector */ + /* 0x9F Reserved */ + kHIDUsage_Csmr_VCRPlus = 0xA0, /* One-Shot Control */ + kHIDUsage_Csmr_Once = 0xA1, /* One-Shot Control */ + kHIDUsage_Csmr_Daily = 0xA2, /* One-Shot Control */ + kHIDUsage_Csmr_Weekly = 0xA3, /* One-Shot Control */ + kHIDUsage_Csmr_Monthly = 0xA4, /* One-Shot Control */ + /* 0xA5 - 0xAF Reserved */ + kHIDUsage_Csmr_Play = 0xB0, /* On/Off Control */ + kHIDUsage_Csmr_Pause = 0xB1, /* On/Off Control */ + kHIDUsage_Csmr_Record = 0xB2, /* On/Off Control */ + kHIDUsage_Csmr_FastForward = 0xB3, /* On/Off Control */ + kHIDUsage_Csmr_Rewind = 0xB4, /* On/Off Control */ + kHIDUsage_Csmr_ScanNextTrack = 0xB5, /* One-Shot Control */ + kHIDUsage_Csmr_ScanPreviousTrack = 0xB6, /* One-Shot Control */ + kHIDUsage_Csmr_Stop = 0xB7, /* One-Shot Control */ + kHIDUsage_Csmr_Eject = 0xB8, /* One-Shot Control */ + kHIDUsage_Csmr_RandomPlay = 0xB9, /* On/Off Control */ + kHIDUsage_Csmr_SelectDisc = 0xBA, /* Named Array */ + kHIDUsage_Csmr_EnterDisc = 0xBB, /* Momentary Control */ + kHIDUsage_Csmr_Repeat = 0xBC, /* One-Shot Control */ + kHIDUsage_Csmr_Tracking = 0xBD, /* Linear Control */ + kHIDUsage_Csmr_TrackNormal = 0xBE, /* One-Shot Control */ + kHIDUsage_Csmr_SlowTracking = 0xBF, /* Linear Control */ + kHIDUsage_Csmr_FrameForward = 0xC0, /* Re-Trigger Control */ + kHIDUsage_Csmr_FrameBack = 0xC1, /* Re-Trigger Control */ + kHIDUsage_Csmr_Mark = 0xC2, /* One-Shot Control */ + kHIDUsage_Csmr_ClearMark = 0xC3, /* One-Shot Control */ + kHIDUsage_Csmr_RepeatFromMark = 0xC4, /* On/Off Control */ + kHIDUsage_Csmr_ReturnToMark = 0xC5, /* One-Shot Control */ + kHIDUsage_Csmr_SearchMarkForward = 0xC6, /* One-Shot Control */ + kHIDUsage_Csmr_SearchMarkBackwards = 0xC7, /* One-Shot Control */ + kHIDUsage_Csmr_CounterReset = 0xC8, /* One-Shot Control */ + kHIDUsage_Csmr_ShowCounter = 0xC9, /* One-Shot Control */ + kHIDUsage_Csmr_TrackingIncrement = 0xCA, /* Re-Trigger Control */ + kHIDUsage_Csmr_TrackingDecrement = 0xCB, /* Re-Trigger Control */ + kHIDUsage_Csmr_StopOrEject = 0xCC, /* One-Shot Control */ + kHIDUsage_Csmr_PlayOrPause = 0xCD, /* One-Shot Control */ + kHIDUsage_Csmr_PlayOrSkip = 0xCE, /* One-Shot Control */ + /* 0xCF - 0xDF Reserved */ + kHIDUsage_Csmr_Volume = 0xE0, /* Linear Control */ + kHIDUsage_Csmr_Balance = 0xE1, /* Linear Control */ + kHIDUsage_Csmr_Mute = 0xE2, /* On/Off Control */ + kHIDUsage_Csmr_Bass = 0xE3, /* Linear Control */ + kHIDUsage_Csmr_Treble = 0xE4, /* Linear Control */ + kHIDUsage_Csmr_BassBoost = 0xE5, /* On/Off Control */ + kHIDUsage_Csmr_SurroundMode = 0xE6, /* One-Shot Control */ + kHIDUsage_Csmr_Loudness = 0xE7, /* On/Off Control */ + kHIDUsage_Csmr_MPX = 0xE8, /* On/Off Control */ + kHIDUsage_Csmr_VolumeIncrement = 0xE9, /* Re-Trigger Control */ + kHIDUsage_Csmr_VolumeDecrement = 0xEA, /* Re-Trigger Control */ + /* 0xEB - 0xEF Reserved */ + kHIDUsage_Csmr_Speed = 0xF0, /* Selector */ + kHIDUsage_Csmr_PlaybackSpeed = 0xF1, /* Named Array */ + kHIDUsage_Csmr_StandardPlay = 0xF2, /* Selector */ + kHIDUsage_Csmr_LongPlay = 0xF3, /* Selector */ + kHIDUsage_Csmr_ExtendedPlay = 0xF4, /* Selector */ + kHIDUsage_Csmr_Slow = 0xF5, /* One-Shot Control */ + /* 0xF6 - 0xFF Reserved */ + kHIDUsage_Csmr_FanEnable = 0x100, /* On/Off Control */ + kHIDUsage_Csmr_FanSpeed = 0x101, /* Linear Control */ + kHIDUsage_Csmr_LightEnable = 0x102, /* On/Off Control */ + kHIDUsage_Csmr_LightIlluminationLevel = 0x103, /* Linear Control */ + kHIDUsage_Csmr_ClimateControlEnable = 0x104, /* On/Off Control */ + kHIDUsage_Csmr_RoomTemperature = 0x105, /* Linear Control */ + kHIDUsage_Csmr_SecurityEnable = 0x106, /* On/Off Control */ + kHIDUsage_Csmr_FireAlarm = 0x107, /* One-Shot Control */ + kHIDUsage_Csmr_PoliceAlarm = 0x108, /* One-Shot Control */ + /* 0x109 - 0x14F Reserved */ + kHIDUsage_Csmr_BalanceRight = 0x150, /* Re-Trigger Control */ + kHIDUsage_Csmr_BalanceLeft = 0x151, /* Re-Trigger Control */ + kHIDUsage_Csmr_BassIncrement = 0x152, /* Re-Trigger Control */ + kHIDUsage_Csmr_BassDecrement = 0x153, /* Re-Trigger Control */ + kHIDUsage_Csmr_TrebleIncrement = 0x154, /* Re-Trigger Control */ + kHIDUsage_Csmr_TrebleDecrement = 0x155, /* Re-Trigger Control */ + /* 0x156 - 0x15F Reserved */ + kHIDUsage_Csmr_SpeakerSystem = 0x160, /* Logical Collection */ + kHIDUsage_Csmr_ChannelLeft = 0x161, /* Logical Collection */ + kHIDUsage_Csmr_ChannelRight = 0x162, /* Logical Collection */ + kHIDUsage_Csmr_ChannelCenter = 0x163, /* Logical Collection */ + kHIDUsage_Csmr_ChannelFront = 0x164, /* Logical Collection */ + kHIDUsage_Csmr_ChannelCenterFront = 0x165, /* Logical Collection */ + kHIDUsage_Csmr_ChannelSide = 0x166, /* Logical Collection */ + kHIDUsage_Csmr_ChannelSurround = 0x167, /* Logical Collection */ + kHIDUsage_Csmr_ChannelLowFrequencyEnhancement = 0x168, /* Logical Collection */ + kHIDUsage_Csmr_ChannelTop = 0x169, /* Logical Collection */ + kHIDUsage_Csmr_ChannelUnknown = 0x16A, /* Logical Collection */ + /* 0x16B - 0x16F Reserved */ + kHIDUsage_Csmr_SubChannel = 0x170, /* Linear Control */ + kHIDUsage_Csmr_SubChannelIncrement = 0x171, /* One-Shot Control */ + kHIDUsage_Csmr_SubChannelDecrement = 0x172, /* One-Shot Control */ + kHIDUsage_Csmr_AlternateAudioIncrement = 0x173, /* One-Shot Control */ + kHIDUsage_Csmr_AlternateAudioDecrement = 0x174, /* One-Shot Control */ + /* 0x175 - 0x17F Reserved */ + kHIDUsage_Csmr_ApplicationLaunchButtons = 0x180, /* Named Array */ + kHIDUsage_Csmr_ALLaunchButtonConfigurationTool = 0x181, /* Selector */ + kHIDUsage_Csmr_ALProgrammableButtonConfiguration = 0x182, /* Selector */ + kHIDUsage_Csmr_ALConsumerControlConfiguration = 0x183, /* Selector */ + kHIDUsage_Csmr_ALWordProcessor = 0x184, /* Selector */ + kHIDUsage_Csmr_ALTextEditor = 0x185, /* Selector */ + kHIDUsage_Csmr_ALSpreadsheet = 0x186, /* Selector */ + kHIDUsage_Csmr_ALGraphicsEditor = 0x187, /* Selector */ + kHIDUsage_Csmr_ALPresentationApp = 0x188, /* Selector */ + kHIDUsage_Csmr_ALDatabaseApp = 0x189, /* Selector */ + kHIDUsage_Csmr_ALEmailReader = 0x18A, /* Selector */ + kHIDUsage_Csmr_ALNewsreader = 0x18B, /* Selector */ + kHIDUsage_Csmr_ALVoicemail = 0x18C, /* Selector */ + kHIDUsage_Csmr_ALContactsOrAddressBook = 0x18D, /* Selector */ + kHIDUsage_Csmr_ALCalendarOrSchedule = 0x18E, /* Selector */ + kHIDUsage_Csmr_ALTaskOrProjectManager = 0x18F, /* Selector */ + kHIDUsage_Csmr_ALLogOrJournalOrTimecard = 0x190, /* Selector */ + kHIDUsage_Csmr_ALCheckbookOrFinance = 0x191, /* Selector */ + kHIDUsage_Csmr_ALCalculator = 0x192, /* Selector */ + kHIDUsage_Csmr_ALAOrVCaptureOrPlayback = 0x193, /* Selector */ + kHIDUsage_Csmr_ALLocalMachineBrowser = 0x194, /* Selector */ + kHIDUsage_Csmr_ALLANOrWANBrowser = 0x195, /* Selector */ + kHIDUsage_Csmr_ALInternetBrowser = 0x196, /* Selector */ + kHIDUsage_Csmr_ALRemoteNetworkingOrISPConnect = 0x197, /* Selector */ + kHIDUsage_Csmr_ALNetworkConference = 0x198, /* Selector */ + kHIDUsage_Csmr_ALNetworkChat = 0x199, /* Selector */ + kHIDUsage_Csmr_ALTelephonyOrDialer = 0x19A, /* Selector */ + kHIDUsage_Csmr_ALLogon = 0x19B, /* Selector */ + kHIDUsage_Csmr_ALLogoff = 0x19C, /* Selector */ + kHIDUsage_Csmr_ALLogonOrLogoff = 0x19D, /* Selector */ + kHIDUsage_Csmr_ALTerminalLockOrScreensaver = 0x19E, /* Selector */ + kHIDUsage_Csmr_ALControlPanel = 0x19F, /* Selector */ + kHIDUsage_Csmr_ALCommandLineProcessorOrRun = 0x1A0, /* Selector */ + kHIDUsage_Csmr_ALProcessOrTaskManager = 0x1A1, /* Selector */ + kHIDUsage_Csmr_AL = 0x1A2, /* Selector */ + kHIDUsage_Csmr_ALNextTaskOrApplication = 0x1A3, /* Selector */ + kHIDUsage_Csmr_ALPreviousTaskOrApplication = 0x1A4, /* Selector */ + kHIDUsage_Csmr_ALPreemptiveHaltTaskOrApplication = 0x1A5, /* Selector */ + kHIDUsage_Csmr_ALIntegratedHelpCenter = 0x1A6, /* Selector */ + kHIDUsage_Csmr_ALDocuments = 0x1A7, /* Selector */ + kHIDUsage_Csmr_ALThesaurus = 0x1A8, /* Selector */ + kHIDUsage_Csmr_ALDictionary = 0x1A9, /* Selector */ + kHIDUsage_Csmr_ALDesktop = 0x1AA, /* Selector */ + kHIDUsage_Csmr_ALSpellCheck = 0x1AB, /* Selector */ + kHIDUsage_Csmr_ALGrammerCheck = 0x1AC, /* Selector */ + kHIDUsage_Csmr_ALWirelessStatus = 0x1AD, /* Selector */ + kHIDUsage_Csmr_ALKeyboardLayout = 0x1AE, /* Selector */ + kHIDUsage_Csmr_ALVirusProtection = 0x1AF, /* Selector */ + kHIDUsage_Csmr_ALEncryption = 0x1B0, /* Selector */ + kHIDUsage_Csmr_ALScreenSaver = 0x1B1, /* Selector */ + kHIDUsage_Csmr_ALAlarms = 0x1B2, /* Selector */ + kHIDUsage_Csmr_ALClock = 0x1B3, /* Selector */ + kHIDUsage_Csmr_ALFileBrowser = 0x1B4, /* Selector */ + kHIDUsage_Csmr_ALPowerStatus = 0x1B5, /* Selector */ + /* 0x1A6 - 0x1FF Reserved */ + kHIDUsage_Csmr_GenericGUIApplicationControls = 0x200, /* Named Array */ + kHIDUsage_Csmr_ACNew = 0x201, /* Selector */ + kHIDUsage_Csmr_ACOpen = 0x202, /* Selector */ + kHIDUsage_Csmr_ACClose = 0x203, /* Selector */ + kHIDUsage_Csmr_ACExit = 0x204, /* Selector */ + kHIDUsage_Csmr_ACMaximize = 0x205, /* Selector */ + kHIDUsage_Csmr_ACMinimize = 0x206, /* Selector */ + kHIDUsage_Csmr_ACSave = 0x207, /* Selector */ + kHIDUsage_Csmr_ACPrint = 0x208, /* Selector */ + kHIDUsage_Csmr_ACProperties = 0x209, /* Selector */ + kHIDUsage_Csmr_ACUndo = 0x21A, /* Selector */ + kHIDUsage_Csmr_ACCopy = 0x21B, /* Selector */ + kHIDUsage_Csmr_ACCut = 0x21C, /* Selector */ + kHIDUsage_Csmr_ACPaste = 0x21D, /* Selector */ + kHIDUsage_Csmr_AC = 0x21E, /* Selector */ + kHIDUsage_Csmr_ACFind = 0x21F, /* Selector */ + kHIDUsage_Csmr_ACFindandReplace = 0x220, /* Selector */ + kHIDUsage_Csmr_ACSearch = 0x221, /* Selector */ + kHIDUsage_Csmr_ACGoTo = 0x222, /* Selector */ + kHIDUsage_Csmr_ACHome = 0x223, /* Selector */ + kHIDUsage_Csmr_ACBack = 0x224, /* Selector */ + kHIDUsage_Csmr_ACForward = 0x225, /* Selector */ + kHIDUsage_Csmr_ACStop = 0x226, /* Selector */ + kHIDUsage_Csmr_ACRefresh = 0x227, /* Selector */ + kHIDUsage_Csmr_ACPreviousLink = 0x228, /* Selector */ + kHIDUsage_Csmr_ACNextLink = 0x229, /* Selector */ + kHIDUsage_Csmr_ACBookmarks = 0x22A, /* Selector */ + kHIDUsage_Csmr_ACHistory = 0x22B, /* Selector */ + kHIDUsage_Csmr_ACSubscriptions = 0x22C, /* Selector */ + kHIDUsage_Csmr_ACZoomIn = 0x22D, /* Selector */ + kHIDUsage_Csmr_ACZoomOut = 0x22E, /* Selector */ + kHIDUsage_Csmr_ACZoom = 0x22F, /* Selector */ + kHIDUsage_Csmr_ACFullScreenView = 0x230, /* Selector */ + kHIDUsage_Csmr_ACNormalView = 0x231, /* Selector */ + kHIDUsage_Csmr_ACViewToggle = 0x232, /* Selector */ + kHIDUsage_Csmr_ACScrollUp = 0x233, /* Selector */ + kHIDUsage_Csmr_ACScrollDown = 0x234, /* Selector */ + kHIDUsage_Csmr_ACScroll = 0x235, /* Selector */ + kHIDUsage_Csmr_ACPanLeft = 0x236, /* Selector */ + kHIDUsage_Csmr_ACPanRight = 0x237, /* Selector */ + kHIDUsage_Csmr_ACPan = 0x238, /* Selector */ + kHIDUsage_Csmr_ACNewWindow = 0x239, /* Selector */ + kHIDUsage_Csmr_ACTileHorizontally = 0x23A, /* Selector */ + kHIDUsage_Csmr_ACTileVertically = 0x23B, /* Selector */ + kHIDUsage_Csmr_ACFormat = 0x23C, /* Selector */ + /* 0x23D - 0xFFFF Reserved */ + kHIDUsage_Csmr_Reserved = 0xFFFF +}; + +/* Physical Interface Device Page (0x0F) */ +/* This section provides detailed descriptions of the usages employed by Digitizer Devices. */ +enum +{ + kHIDUsage_PID_PhysicalInterfaceDevice = 0x01, /* CA - A collection of PID usages */ + /* 0x02 - 0x1F Reserved */ + kHIDUsage_PID_Normal = 0x20, /* DV - A force applied perpendicular to the surface of an object */ + kHIDUsage_PID_SetEffectReport = 0x21, /* XXX */ + kHIDUsage_PID_EffectBlockIndex = 0x22, /* XXX */ + kHIDUsage_PID_ParamBlockOffset = 0x23, /* XXX */ + kHIDUsage_PID_ROM_Flag = 0x24, /* XXX */ + kHIDUsage_PID_EffectType = 0x25, /* XXX */ + kHIDUsage_PID_ET_ConstantForce = 0x26, /* XXX */ + kHIDUsage_PID_ET_Ramp = 0x27, /* XXX */ + kHIDUsage_PID_ET_CustomForceData = 0x28, /* XXX */ + /* 0x29 - 0x2F Reserved */ + kHIDUsage_PID_ET_Square = 0x30, /* XXX */ + kHIDUsage_PID_ET_Sine = 0x31, /* XXX */ + kHIDUsage_PID_ET_Triangle = 0x32, /* XXX */ + kHIDUsage_PID_ET_SawtoothUp = 0x33, /* XXX */ + kHIDUsage_PID_ET_SawtoothDown = 0x34, /* XXX */ + /* 0x35 - 0x3F Reserved */ + kHIDUsage_PID_ET_Spring = 0x40, /* XXX */ + kHIDUsage_PID_ET_Damper = 0x41, /* XXX */ + kHIDUsage_PID_ET_Inertia = 0x42, /* XXX */ + kHIDUsage_PID_ET_Friction = 0x43, /* XXX */ + /* 0x44 - 0x4F Reserved */ + kHIDUsage_PID_Duration = 0x50, /* XXX */ + kHIDUsage_PID_SamplePeriod = 0x51, /* XXX */ + kHIDUsage_PID_Gain = 0x52, /* XXX */ + kHIDUsage_PID_TriggerButton = 0x53, /* XXX */ + kHIDUsage_PID_TriggerRepeatInterval = 0x54, /* XXX */ + kHIDUsage_PID_AxesEnable = 0x55, /* XXX */ + kHIDUsage_PID_DirectionEnable = 0x56, /* XXX */ + kHIDUsage_PID_Direction = 0x57, /* XXX */ + kHIDUsage_PID_TypeSpecificBlockOffset = 0x58, /* XXX */ + kHIDUsage_PID_BlockType = 0x59, /* XXX */ + kHIDUsage_PID_SetEnvelopeReport = 0x5A, /* XXX */ + kHIDUsage_PID_AttackLevel = 0x5B, /* XXX */ + kHIDUsage_PID_AttackTime = 0x5C, /* XXX */ + kHIDUsage_PID_FadeLevel = 0x5D, /* XXX */ + kHIDUsage_PID_FadeTime = 0x5E, /* XXX */ + kHIDUsage_PID_SetConditionReport = 0x5F, /* XXX */ + + kHIDUsage_PID_CP_Offset = 0x60, /* XXX */ + kHIDUsage_PID_PositiveCoefficient = 0x61, /* XXX */ + kHIDUsage_PID_NegativeCoefficient = 0x62, /* XXX */ + kHIDUsage_PID_PositiveSaturation = 0x63, /* XXX */ + kHIDUsage_PID_NegativeSaturation = 0x64, /* XXX */ + kHIDUsage_PID_DeadBand = 0x65, /* XXX */ + kHIDUsage_PID_DownloadForceSample = 0x66, /* XXX */ + kHIDUsage_PID_IsochCustomForceEnable = 0x67, /* XXX */ + kHIDUsage_PID_CustomForceDataReport = 0x68, /* XXX */ + kHIDUsage_PID_CustomForceData = 0x69, /* XXX */ + kHIDUsage_PID_CustomForceVendorDefinedData = 0x6A, /* XXX */ + kHIDUsage_PID_SetCustomForceReport = 0x6B, /* XXX */ + kHIDUsage_PID_CustomForceDataOffset = 0x6C, /* XXX */ + kHIDUsage_PID_SampleCount = 0x6D, /* XXX */ + kHIDUsage_PID_SetPeriodicReport = 0x6E, /* XXX */ + kHIDUsage_PID_Offset = 0x6F, /* XXX */ + + kHIDUsage_PID_Magnitude = 0x70, /* XXX */ + kHIDUsage_PID_Phase = 0x71, /* XXX */ + kHIDUsage_PID_Period = 0x72, /* XXX */ + kHIDUsage_PID_SetConstantForceReport = 0x73, /* XXX */ + kHIDUsage_PID_SetRampForceReport = 0x74, /* XXX */ + kHIDUsage_PID_RampStart = 0x75, /* XXX */ + kHIDUsage_PID_RampEnd = 0x76, /* XXX */ + kHIDUsage_PID_EffectOperationReport = 0x77, /* XXX */ + kHIDUsage_PID_EffectOperation = 0x78, /* XXX */ + kHIDUsage_PID_OpEffectStart = 0x79, /* XXX */ + kHIDUsage_PID_OpEffectStartSolo = 0x7A, /* XXX */ + kHIDUsage_PID_OpEffectStop = 0x7B, /* XXX */ + kHIDUsage_PID_LoopCount = 0x7C, /* XXX */ + kHIDUsage_PID_DeviceGainReport = 0x7D, /* XXX */ + kHIDUsage_PID_DeviceGain = 0x7E, /* XXX */ + kHIDUsage_PID_PoolReport = 0x7F, /* XXX */ + + kHIDUsage_PID_RAM_PoolSize = 0x80, /* XXX */ + kHIDUsage_PID_ROM_PoolSize = 0x81, /* XXX */ + kHIDUsage_PID_ROM_EffectBlockCount = 0x82, /* XXX */ + kHIDUsage_PID_SimultaneousEffectsMax = 0x83, /* XXX */ + kHIDUsage_PID_PoolAlignment = 0x84, /* XXX */ + kHIDUsage_PID_PoolMoveReport = 0x85, /* XXX */ + kHIDUsage_PID_MoveSource = 0x86, /* XXX */ + kHIDUsage_PID_MoveDestination = 0x87, /* XXX */ + kHIDUsage_PID_MoveLength = 0x88, /* XXX */ + kHIDUsage_PID_BlockLoadReport = 0x89, /* XXX */ + /* 0x8A Reserved */ + kHIDUsage_PID_BlockLoadStatus = 0x8B, /* XXX */ + kHIDUsage_PID_BlockLoadSuccess = 0x8C, /* XXX */ + kHIDUsage_PID_BlockLoadFull = 0x8D, /* XXX */ + kHIDUsage_PID_BlockLoadError = 0x8E, /* XXX */ + kHIDUsage_PID_BlockHandle = 0x8F, /* XXX */ + + kHIDUsage_PID_BlockFreeReport = 0x90, /* XXX */ + kHIDUsage_PID_TypeSpecificBlockHandle = 0x91, /* XXX */ + kHIDUsage_PID_StateReport = 0x92, /* XXX */ + /* 0x93 Reserved */ + kHIDUsage_PID_EffectPlaying = 0x94, /* XXX */ + kHIDUsage_PID_DeviceControlReport = 0x95, /* XXX */ + kHIDUsage_PID_DeviceControl = 0x96, /* XXX */ + kHIDUsage_PID_DC_EnableActuators = 0x97, /* XXX */ + kHIDUsage_PID_DC_DisableActuators = 0x98, /* XXX */ + kHIDUsage_PID_DC_StopAllEffects = 0x99, /* XXX */ + kHIDUsage_PID_DC_DeviceReset = 0x9A, /* XXX */ + kHIDUsage_PID_DC_DevicePause = 0x9B, /* XXX */ + kHIDUsage_PID_DC_DeviceContinue = 0x9C, /* XXX */ + /* 0x9d - 0x9E Reserved */ + kHIDUsage_PID_DevicePaused = 0x9F, /* XXX */ + + kHIDUsage_PID_ActuatorsEnabled = 0xA0, /* XXX */ + /* 0xA1 - 0xA3 Reserved */ + kHIDUsage_PID_SafetySwitch = 0xA4, /* XXX */ + kHIDUsage_PID_ActuatorOverrideSwitch = 0xA5, /* XXX */ + kHIDUsage_PID_ActuatorPower = 0xA6, /* XXX */ + kHIDUsage_PID_StartDelay = 0xA7, /* XXX */ + kHIDUsage_PID_ParameterBlockSize = 0xA8, /* XXX */ + kHIDUsage_PID_DeviceManagedPool = 0xA9, /* XXX */ + kHIDUsage_PID_SharedParameterBlocks = 0xAA, /* XXX */ + kHIDUsage_PID_CreateNewEffectReport = 0xAB, /* XXX */ + kHIDUsage_PID_RAM_PoolAvailable = 0xAC, /* XXX */ + /* 0xAD - 0xFFFF Reserved */ + kHIDUsage_PID_Reserved = 0xFFFF +}; + +/* Digitizer Page (0x0D) */ +/* This section provides detailed descriptions of the usages employed by Digitizer Devices. */ +enum +{ + kHIDUsage_Dig_Digitizer = 0x01, /* Application Collection */ + kHIDUsage_Dig_Pen = 0x02, /* Application Collection */ + kHIDUsage_Dig_LightPen = 0x03, /* Application Collection */ + kHIDUsage_Dig_TouchScreen = 0x04, /* Application Collection */ + kHIDUsage_Dig_TouchPad = 0x05, /* Application Collection */ + kHIDUsage_Dig_WhiteBoard = 0x06, /* Application Collection */ + kHIDUsage_Dig_CoordinateMeasuringMachine = 0x07, /* Application Collection */ + kHIDUsage_Dig_3DDigitizer = 0x08, /* Application Collection */ + kHIDUsage_Dig_StereoPlotter = 0x09, /* Application Collection */ + kHIDUsage_Dig_ArticulatedArm = 0x0A, /* Application Collection */ + kHIDUsage_Dig_Armature = 0x0B, /* Application Collection */ + kHIDUsage_Dig_MultiplePointDigitizer = 0x0C, /* Application Collection */ + kHIDUsage_Dig_FreeSpaceWand = 0x0D, /* Application Collection */ + /* 0x0E - 0x1F Reserved */ + kHIDUsage_Dig_Stylus = 0x20, /* Logical Collection */ + kHIDUsage_Dig_Puck = 0x21, /* Logical Collection */ + kHIDUsage_Dig_Finger = 0x22, /* Logical Collection */ + /* 0x23 - 0x2F Reserved */ + kHIDUsage_Dig_TipPressure = 0x30, /* Dynamic Value */ + kHIDUsage_Dig_BarrelPressure = 0x31, /* Dynamic Value */ + kHIDUsage_Dig_InRange = 0x32, /* Momentary Control */ + kHIDUsage_Dig_Touch = 0x33, /* Momentary Control */ + kHIDUsage_Dig_Untouch = 0x34, /* One-Shot Control */ + kHIDUsage_Dig_Tap = 0x35, /* One-Shot Control */ + kHIDUsage_Dig_Quality = 0x36, /* Dynamic Value */ + kHIDUsage_Dig_DataValid = 0x37, /* Momentary Control */ + kHIDUsage_Dig_TransducerIndex = 0x38, /* Dynamic Value */ + kHIDUsage_Dig_TabletFunctionKeys = 0x39, /* Logical Collection */ + kHIDUsage_Dig_ProgramChangeKeys = 0x3A, /* Logical Collection */ + kHIDUsage_Dig_BatteryStrength = 0x3B, /* Dynamic Value */ + kHIDUsage_Dig_Invert = 0x3C, /* Momentary Control */ + kHIDUsage_Dig_XTilt = 0x3D, /* Dynamic Value */ + kHIDUsage_Dig_YTilt = 0x3E, /* Dynamic Value */ + kHIDUsage_Dig_Azimuth = 0x3F, /* Dynamic Value */ + kHIDUsage_Dig_Altitude = 0x40, /* Dynamic Value */ + kHIDUsage_Dig_Twist = 0x41, /* Dynamic Value */ + kHIDUsage_Dig_TipSwitch = 0x42, /* Momentary Control */ + kHIDUsage_Dig_SecondaryTipSwitch = 0x43, /* Momentary Control */ + kHIDUsage_Dig_BarrelSwitch = 0x44, /* Momentary Control */ + kHIDUsage_Dig_Eraser = 0x45, /* Momentary Control */ + kHIDUsage_Dig_TabletPick = 0x46, /* Momentary Control */ + /* 0x47 - 0xFFFF Reserved */ + kHIDUsage_Dig_Reserved = 0xFFFF +}; + +/* AlphanumericDisplay Page (0x14) */ +/* The Alphanumeric Display page is intended for use by simple alphanumeric displays that are used on consumer devices. */ +enum +{ + kHIDUsage_AD_AlphanumericDisplay = 0x01, /* Application Collection */ + /* 0x02 - 0x1F Reserved */ + kHIDUsage_AD_DisplayAttributesReport = 0x20, /* Logical Collection */ + kHIDUsage_AD_ASCIICharacterSet = 0x21, /* Static Flag */ + kHIDUsage_AD_DataReadBack = 0x22, /* Static Flag */ + kHIDUsage_AD_FontReadBack = 0x23, /* Static Flag */ + kHIDUsage_AD_DisplayControlReport = 0x24, /* Logical Collection */ + kHIDUsage_AD_ClearDisplay = 0x25, /* Dynamic Flag */ + kHIDUsage_AD_DisplayEnable = 0x26, /* Dynamic Flag */ + kHIDUsage_AD_ScreenSaverDelay = 0x27, /* Static Value */ + kHIDUsage_AD_ScreenSaverEnable = 0x28, /* Dynamic Flag */ + kHIDUsage_AD_VerticalScroll = 0x29, /* Static Flag */ + kHIDUsage_AD_HorizontalScroll = 0x2A, /* Static Flag */ + kHIDUsage_AD_CharacterReport = 0x2B, /* Logical Collection */ + kHIDUsage_AD_DisplayData = 0x2C, /* Dynamic Value */ + kHIDUsage_AD_DisplayStatus = 0x2D, /* Logical Collection */ + kHIDUsage_AD_StatNotReady = 0x2E, /* Selector */ + kHIDUsage_AD_StatReady = 0x2F, /* Selector */ + kHIDUsage_AD_ErrNotaloadablecharacter = 0x30, /* Selector */ + kHIDUsage_AD_ErrFontdatacannotberead = 0x31, /* Selector */ + kHIDUsage_AD_CursorPositionReport = 0x32, /* Logical Collection */ + kHIDUsage_AD_Row = 0x33, /* Dynamic Value */ + kHIDUsage_AD_Column = 0x34, /* Dynamic Value */ + kHIDUsage_AD_Rows = 0x35, /* Static Value */ + kHIDUsage_AD_Columns = 0x36, /* Static Value */ + kHIDUsage_AD_CursorPixelPositioning = 0x37, /* Static Flag */ + kHIDUsage_AD_CursorMode = 0x38, /* Dynamic Flag */ + kHIDUsage_AD_CursorEnable = 0x39, /* Dynamic Flag */ + kHIDUsage_AD_CursorBlink = 0x3A, /* Dynamic Flag */ + kHIDUsage_AD_FontReport = 0x3B, /* Logical Collection */ + kHIDUsage_AD_FontData = 0x3C, /* Buffered Byte */ + kHIDUsage_AD_CharacterWidth = 0x3D, /* Static Value */ + kHIDUsage_AD_CharacterHeight = 0x3E, /* Static Value */ + kHIDUsage_AD_CharacterSpacingHorizontal = 0x3F, /* Static Value */ + kHIDUsage_AD_CharacterSpacingVertical = 0x40, /* Static Value */ + kHIDUsage_AD_UnicodeCharacterSet = 0x41, /* Static Flag */ + /* 0x42 - 0xFFFF Reserved */ + kHIDUsage_AD_Reserved = 0xFFFF +}; + +/* Power Device Page (0x84) */ +/* This section provides detailed descriptions of the usages employed by Power Devices. */ +enum +{ + + kHIDUsage_PD_Undefined = 0x00, /* Power Device Undefined Usage */ + kHIDUsage_PD_iName = 0x01, /* CL- Power Device Name Index */ + kHIDUsage_PD_PresentStatus = 0x02, /* CL- Power Device Present Status */ + kHIDUsage_PD_ChangedStatus = 0x03, /* CA- Power Device Changed Status */ + kHIDUsage_PD_UPS = 0x04, /* CA- Uninterruptible Power Supply */ + kHIDUsage_PD_PowerSupply = 0x05, /* CA- Power Supply */ + /* Reserved 0x06 - 0x0F */ + kHIDUsage_PD_BatterySystem = 0x10, /* CP- Battery System power module */ + kHIDUsage_PD_BatterySystemID = 0x11, /* SV IF- Battery System ID */ + kHIDUsage_PD_Battery = 0x12, /* CP- Battery */ + kHIDUsage_PD_BatteryID = 0x13, /* SV IF- Battery ID */ + kHIDUsage_PD_Charger = 0x14, /* CP- Charger */ + kHIDUsage_PD_ChargerID = 0x15, /* SV IF- Charger ID */ + kHIDUsage_PD_PowerConverter = 0x16, /* CP- Power Converter power module */ + kHIDUsage_PD_PowerConverterID = 0x17, /* SV IF- Power Converter ID */ + kHIDUsage_PD_OutletSystem = 0x18, /* CP- Outlet System power module */ + kHIDUsage_PD_OutletSystemID = 0x19, /* SV IF-Outlet System ID */ + kHIDUsage_PD_Input = 0x1A, /* CP- Power Device Input */ + kHIDUsage_PD_InputID = 0x1B, /* SV IF- Power Device Input ID */ + kHIDUsage_PD_Output = 0x1C, /* CP- Power Device Output */ + kHIDUsage_PD_OutputID = 0x1D, /* SV IF- Power Device Output ID */ + kHIDUsage_PD_Flow = 0x1E, /* CP- Power Device Flow */ + kHIDUsage_PD_FlowID = 0x1F, /* Item IF- Power Device Flow ID */ + kHIDUsage_PD_Outlet = 0x20, /* CP- Power Device Outlet */ + kHIDUsage_PD_OutletID = 0x21, /* SV IF- Power Device Outlet ID */ + kHIDUsage_PD_Gang = 0x22, /* CL/CP- Power Device Gang */ + kHIDUsage_PD_GangID = 0x23, /* SV IF- Power Device Gang ID */ + kHIDUsage_PD_PowerSummary = 0x24, /* CL/CP- Power Device Power Summary */ + kHIDUsage_PD_PowerSummaryID = 0x25, /* SV IF- Power Device Power Summary ID */ + /* Reserved 0x26 - 0x2F */ + kHIDUsage_PD_Voltage = 0x30, /* DV IF- Power Device Voltage */ + kHIDUsage_PD_Current = 0x31, /* DV IF- Power Device Current */ + kHIDUsage_PD_Frequency = 0x32, /* DV IF- Power Device Frequency */ + kHIDUsage_PD_ApparentPower = 0x33, /* DV IF- Power Device Apparent Power */ + kHIDUsage_PD_ActivePower = 0x34, /* DV IF- Power Device RMS Power */ + kHIDUsage_PD_PercentLoad = 0x35, /* DV IF- Power Device Percent Load */ + kHIDUsage_PD_Temperature = 0x36, /* DV IF- Power Device Temperature */ + kHIDUsage_PD_Humidity = 0x37, /* DV IF- Power Device Humidity */ + kHIDUsage_PD_BadCount = 0x38, /* DV IF- Power Device Bad Condition Count */ + /* Reserved 0x39 - 0x3F */ + kHIDUsage_PD_ConfigVoltage = 0x40, /* SV/DV F- Power Device Nominal Voltage */ + kHIDUsage_PD_ConfigCurrent = 0x41, /* SV/DV F- Power Device Nominal Current */ + kHIDUsage_PD_ConfigFrequency = 0x42, /* SV/DV F- Power Device Nominal Frequency */ + kHIDUsage_PD_ConfigApparentPower = 0x43, /* SV/DV F- Power Device Nominal Apparent Power */ + kHIDUsage_PD_ConfigActivePower = 0x44, /* SV/DV F- Power Device Nominal RMS Power */ + kHIDUsage_PD_ConfigPercentLoad = 0x45, /* SV/DV F- Power Device Nominal Percent Load */ + kHIDUsage_PD_ConfigTemperature = 0x46, /* SV/DV F- Power Device Nominal Temperature */ + kHIDUsage_PD_ConfigHumidity = 0x47, /* SV/DV F- Power Device Nominal Humidity */ + /* Reserved 0x48 - 0x4F */ + kHIDUsage_PD_SwitchOnControl = 0x50, /* DV F- Power Device Switch On Control */ + kHIDUsage_PD_SwitchOffControl = 0x51, /* DV F- Power Device Switch Off Control */ + kHIDUsage_PD_ToggleControl = 0x52, /* DV F- Power Device Toogle Sequence Control */ + kHIDUsage_PD_LowVoltageTransfer = 0x53, /* DV F- Power Device Min Transfer Voltage */ + kHIDUsage_PD_HighVoltageTransfer = 0x54, /* DV F- Power Device Max Transfer Voltage */ + kHIDUsage_PD_DelayBeforeReboot = 0x55, /* DV F- Power Device Delay Before Reboot */ + kHIDUsage_PD_DelayBeforeStartup = 0x56, /* DV F- Power Device Delay Before Startup */ + kHIDUsage_PD_DelayBeforeShutdown = 0x57, /* DV F- Power Device Delay Before Shutdown */ + kHIDUsage_PD_Test = 0x58, /* DV F- Power Device Test Request/Result */ + kHIDUsage_PD_ModuleReset = 0x59, /* DV F- Power Device Reset Request/Result */ + kHIDUsage_PD_AudibleAlarmControl = 0x5A, /* DV F- Power Device Audible Alarm Control */ + /* Reserved 0x5B - 0x5F */ + kHIDUsage_PD_Present = 0x60, /* DV IOF- Power Device Present */ + kHIDUsage_PD_Good = 0x61, /* DV IOF- Power Device Good */ + kHIDUsage_PD_InternalFailure = 0x62, /* DV IOF- Power Device Internal Failure */ + kHIDUsage_PD_VoltageOutOfRange = 0x63, /* DV IOF- Power Device Voltage Out Of Range */ + kHIDUsage_PD_FrequencyOutOfRange = 0x64, /* DV IOF- Power Device Frequency Out Of Range */ + kHIDUsage_PD_Overload = 0x65, /* DV IOF- Power Device Overload */ + kHIDUsage_PD_OverCharged = 0x66, /* DV IOF- Power Device Over Charged */ + kHIDUsage_PD_OverTemperature = 0x67, /* DV IOF- Power Device Over Temperature */ + kHIDUsage_PD_ShutdownRequested = 0x68, /* DV IOF- Power Device Shutdown Requested */ + kHIDUsage_PD_ShutdownImminent = 0x69, /* DV IOF- Power Device Shutdown Imminent */ + /* Reserved 0x6A */ + kHIDUsage_PD_SwitchOnOff = 0x6B, /* DV IOF- Power Device On/Off Switch Status */ + kHIDUsage_PD_Switchable = 0x6C, /* DV IOF- Power Device Switchable */ + kHIDUsage_PD_Used = 0x6D, /* DV IOF- Power Device Used */ + kHIDUsage_PD_Boost = 0x6E, /* DV IOF- Power Device Boosted */ + kHIDUsage_PD_Buck = 0x6F, /* DV IOF- Power Device Bucked */ + kHIDUsage_PD_Initialized = 0x70, /* DV IOF- Power Device Initialized */ + kHIDUsage_PD_Tested = 0x71, /* DV IOF- Power Device Tested */ + kHIDUsage_PD_AwaitingPower = 0x72, /* DV IOF- Power Device Awaiting Power */ + kHIDUsage_PD_CommunicationLost = 0x73, /* DV IOF- Power Device Communication Lost */ + /* Reserved 0x74 - 0xFC */ + kHIDUsage_PD_iManufacturer = 0xFD, /* SV F- Power Device Manufacturer String Index */ + kHIDUsage_PD_iProduct = 0xFE, /* SV F- Power Device Product String Index */ + kHIDUsage_PD_iserialNumber = 0xFF /* SV F- Power Device Serial Number String Index */ +}; + +/* Battery System Page (x85) */ +/* This section provides detailed descriptions of the usages employed by Battery Systems. */ +enum +{ + kHIDUsage_BS_Undefined = 0x00, /* Battery System Undefined */ + kHIDUsage_BS_SMBBatteryMode = 0x01, /* CL - SMB Mode */ + kHIDUsage_BS_SMBBatteryStatus = 0x02, /* CL - SMB Status */ + kHIDUsage_BS_SMBAlarmWarning = 0x03, /* CL - SMB Alarm Warning */ + kHIDUsage_BS_SMBChargerMode = 0x04, /* CL - SMB Charger Mode */ + kHIDUsage_BS_SMBChargerStatus = 0x05, /* CL - SMB Charger Status */ + kHIDUsage_BS_SMBChargerSpecInfo = 0x06, /* CL - SMB Charger Extended Status */ + kHIDUsage_BS_SMBSelectorState = 0x07, /* CL - SMB Selector State */ + kHIDUsage_BS_SMBSelectorPresets = 0x08, /* CL - SMB Selector Presets */ + kHIDUsage_BS_SMBSelectorInfo = 0x09, /* CL - SMB Selector Info */ + /* Reserved 0x0A - 0x0F */ + kHIDUsage_BS_OptionalMfgFunction1 = 0x10, /* DV F - Battery System Optional SMB Mfg Function 1 */ + kHIDUsage_BS_OptionalMfgFunction2 = 0x11, /* DV F - Battery System Optional SMB Mfg Function 2 */ + kHIDUsage_BS_OptionalMfgFunction3 = 0x12, /* DV F - Battery System Optional SMB Mfg Function 3 */ + kHIDUsage_BS_OptionalMfgFunction4 = 0x13, /* DV F - Battery System Optional SMB Mfg Function 4 */ + kHIDUsage_BS_OptionalMfgFunction5 = 0x14, /* DV F - Battery System Optional SMB Mfg Function 5 */ + kHIDUsage_BS_ConnectionToSMBus = 0x15, /* DF F - Battery System Connection To System Management Bus */ + kHIDUsage_BS_OutputConnection = 0x16, /* DF F - Battery System Output Connection Status */ + kHIDUsage_BS_ChargerConnection = 0x17, /* DF F - Battery System Charger Connection */ + kHIDUsage_BS_BatteryInsertion = 0x18, /* DF F - Battery System Battery Insertion */ + kHIDUsage_BS_Usenext = 0x19, /* DF F - Battery System Use Next */ + kHIDUsage_BS_OKToUse = 0x1A, /* DF F - Battery System OK To Use */ + kHIDUsage_BS_BatterySupported = 0x1B, /* DF F - Battery System Battery Supported */ + kHIDUsage_BS_SelectorRevision = 0x1C, /* DF F - Battery System Selector Revision */ + kHIDUsage_BS_ChargingIndicator = 0x1D, /* DF F - Battery System Charging Indicator */ + /* Reserved 0x1E - 0x27 */ + kHIDUsage_BS_ManufacturerAccess = 0x28, /* DV F - Battery System Manufacturer Access */ + kHIDUsage_BS_RemainingCapacityLimit = 0x29, /* DV F - Battery System Remaining Capacity Limit */ + kHIDUsage_BS_RemainingTimeLimit = 0x2A, /* DV F - Battery System Remaining Time Limit */ + kHIDUsage_BS_AtRate = 0x2B, /* DV F - Battery System At Rate... */ + kHIDUsage_BS_CapacityMode = 0x2C, /* DV F - Battery System Capacity Mode */ + kHIDUsage_BS_BroadcastToCharger = 0x2D, /* DV F - Battery System Broadcast To Charger */ + kHIDUsage_BS_PrimaryBattery = 0x2E, /* DV F - Battery System Primary Battery */ + kHIDUsage_BS_ChargeController = 0x2F, /* DV F - Battery System Charge Controller */ + /* Reserved 0x30 - 0x3F */ + kHIDUsage_BS_TerminateCharge = 0x40, /* DF IOF - Battery System Terminate Charge */ + kHIDUsage_BS_TerminateDischarge = 0x41, /* DF IOF - Battery System Terminate Discharge */ + kHIDUsage_BS_BelowRemainingCapacityLimit = 0x42, /* DF IOF - Battery System Below Remaining Capacity Limit */ + kHIDUsage_BS_RemainingTimeLimitExpired = 0x43, /* DF IOF - Battery System Remaining Time Limit Expired */ + kHIDUsage_BS_Charging = 0x44, /* DF IOF - Battery System Charging */ + kHIDUsage_BS_Discharging = 0x45, /* DV IOF - Battery System Discharging */ + kHIDUsage_BS_FullyCharged = 0x46, /* DF IOF - Battery System Fully Charged */ + kHIDUsage_BS_FullyDischarged = 0x47, /* DV IOF - Battery System Fully Discharged */ + kHIDUsage_BS_ConditioningFlag = 0x48, /* DV IOF - Battery System Conditioning Flag */ + kHIDUsage_BS_AtRateOK = 0x49, /* DV IOF - Battery System At Rate OK */ + kHIDUsage_BS_SMBErrorCode = 0x4A, /* DF IOF - Battery System SMB Error Code */ + kHIDUsage_BS_NeedReplacement = 0x4B, /* DF IOF - Battery System Need Replacement */ + /* Reserved 0x4C - 0x5F */ + kHIDUsage_BS_AtRateTimeToFull = 0x60, /* DV IF - Battery System At Rate Time To Full */ + kHIDUsage_BS_AtRateTimeToEmpty = 0x61, /* DV IF - Battery System At Rate Time To Empty */ + kHIDUsage_BS_AverageCurrent = 0x62, /* DV IF - Battery System Average Current */ + kHIDUsage_BS_Maxerror = 0x63, /* DV IF - Battery System Max Error */ + kHIDUsage_BS_RelativeStateOfCharge = 0x64, /* DV IF - Battery System Relative State Of Charge */ + kHIDUsage_BS_AbsoluteStateOfCharge = 0x65, /* DV IF - Battery System Absolute State Of Charge */ + kHIDUsage_BS_RemainingCapacity = 0x66, /* DV IF - Battery System Remaining Capacity */ + kHIDUsage_BS_FullChargeCapacity = 0x67, /* DV IF - Battery System Full Charge Capacity */ + kHIDUsage_BS_RunTimeToEmpty = 0x68, /* DV IF - Battery System Run Time To Empty */ + kHIDUsage_BS_AverageTimeToEmpty = 0x69, /* DV IF - Battery System Average Time To Empty */ + kHIDUsage_BS_AverageTimeToFull = 0x6A, /* DV IF - Battery System Average Time To Full */ + kHIDUsage_BS_CycleCount = 0x6B, /* DV IF - Battery System Cycle Count */ + /* Reserved 0x6C - 0x7F */ + kHIDUsage_BS_BattPackModelLevel = 0x80, /* SV F - Battery System Batt Pack Model Level */ + kHIDUsage_BS_InternalChargeController = 0x81, /* SF F - Battery System Internal Charge Controller */ + kHIDUsage_BS_PrimaryBatterySupport = 0x82, /* SF F - Battery System Primary Battery Support */ + kHIDUsage_BS_DesignCapacity = 0x83, /* SV F - Battery System Design Capacity */ + kHIDUsage_BS_SpecificationInfo = 0x84, /* SV F - Battery System Specification Info */ + kHIDUsage_BS_ManufacturerDate = 0x85, /* SV F - Battery System Manufacturer Date */ + kHIDUsage_BS_SerialNumber = 0x86, /* SV F - Battery System Serial Number */ + kHIDUsage_BS_iManufacturerName = 0x87, /* SV F - Battery System Manufacturer Name Index */ + kHIDUsage_BS_iDevicename = 0x88, /* SV F - Battery System Device Name Index */ + kHIDUsage_BS_iDeviceChemistry = 0x89, /* SV F - Battery System Device Chemistry Index */ + kHIDUsage_BS_ManufacturerData = 0x8A, /* SV F - Battery System Manufacturer Data */ + kHIDUsage_BS_Rechargable = 0x8B, /* SV F - Battery System Rechargable */ + kHIDUsage_BS_WarningCapacityLimit = 0x8C, /* SV F - Battery System Warning Capacity Limit */ + kHIDUsage_BS_CapacityGranularity1 = 0x8D, /* SV F - Battery System Capacity Granularity 1 */ + kHIDUsage_BS_CapacityGranularity2 = 0x8E, /* SV F - Battery System Capacity Granularity 2 */ + kHIDUsage_BS_iOEMInformation = 0x8F, /* SV F - Battery System OEM Information Index */ + /* Reserved 0x90 - 0xBF */ + kHIDUsage_BS_InhibitCharge = 0xC0, /* DF IOF - Battery System Inhibit Charge */ + kHIDUsage_BS_EnablePolling = 0xC1, /* DF IOF - Battery System Enable Polling */ + kHIDUsage_BS_ResetToZero = 0xC2, /* DF IOF - Battery System Reset To Zero */ + /* Reserved 0xC3 - 0xCF */ + kHIDUsage_BS_ACPresent = 0xD0, /* DF IOF - Battery System AC Present */ + kHIDUsage_BS_BatteryPresent = 0xD1, /* DF IOF - Battery System Battery Present */ + kHIDUsage_BS_PowerFail = 0xD2, /* DF IOF - Battery System Power Fail */ + kHIDUsage_BS_AlarmInhibited = 0xD3, /* DF IOF - Battery System Alarm Inhibited */ + kHIDUsage_BS_ThermistorUnderRange = 0xD4, /* DF IOF - Battery System Thermistor Under Range */ + kHIDUsage_BS_ThermistorHot = 0xD5, /* DF IOF - Battery System Thermistor Hot */ + kHIDUsage_BS_ThermistorCold = 0xD6, /* DF IOF - Battery System Thermistor Cold */ + kHIDUsage_BS_ThermistorOverRange = 0xD7, /* DF IOF - Battery System Thermistor Over Range */ + kHIDUsage_BS_VoltageOutOfRange = 0xD8, /* DF IOF - Battery System Voltage Out Of Range */ + kHIDUsage_BS_CurrentOutOfRange = 0xD9, /* DF IOF - Battery System Current Out Of Range */ + kHIDUsage_BS_CurrentNotRegulated = 0xDA, /* DF IOF - Battery System Current Not Regulated */ + kHIDUsage_BS_VoltageNotRegulated = 0xDB, /* DF IOF - Battery System Voltage Not Regulated */ + kHIDUsage_BS_MasterMode = 0xDC, /* DF IOF - Battery System Master Mode */ + /* Reserved 0xDD - 0xEF */ + kHIDUsage_BS_ChargerSelectorSupport = 0xF0, /* SF F- Battery System Charger Support Selector */ + kHIDUsage_BS_ChargerSpec = 0xF1, /* SF F- Battery System Charger Specification */ + kHIDUsage_BS_Level2 = 0xF2, /* SF F- Battery System Charger Level 2 */ + kHIDUsage_BS_Level3 = 0xF3 /* SF F- Battery System Charger Level 3 */ + /* Reserved 0xF2 - 0xFF */ +}; + +/* Bar Code Scanner Page (0x8C) */ +/* This section provides detailed descriptions of the usages employed by Bar Code Scanner Devices. */ +enum +{ + kHIDUsage_BCS_Undefined = 0x00, /* Bar Code Scanner Undefined Usage */ + kHIDUsage_BCS_BadgeReader = 0x01, /* CA - Bar Code Badge Reader */ + kHIDUsage_BCS_BarCodeScanner = 0x02, /* CA -Bar Code Scanner */ + kHIDUsage_BCS_DumbBarCodeScanner = 0x03, /* CA -Dumb Bar Code Scanner Usage */ + kHIDUsage_BCS_CordlessScannerBase = 0x04, /* CA -Cordless Base Usage */ + kHIDUsage_BCS_BarCodeScannerCradle = 0x05, /* CA -Bar Code Scanner Cradle Usage */ + /* Reserved 0x06 - 0x0F */ + kHIDUsage_BCS_AttributeReport = 0x10, /* CL - Attribute Report */ + kHIDUsage_BCS_SettingsReport = 0x11, /* CL - Settings Report */ + kHIDUsage_BCS_ScannedDataReport = 0x12, /* CL - Scanned Data Report */ + kHIDUsage_BCS_RawScannedDataReport = 0x13, /* CL - Raw Scanned Data Report */ + kHIDUsage_BCS_TriggerReport = 0x14, /* CL - Trigger Report */ + kHIDUsage_BCS_StatusReport = 0x15, /* CL - Status Report */ + kHIDUsage_BCS_UPC_EANControlReport = 0x16, /* CL - UPC/EAN Control Report */ + kHIDUsage_BCS_EAN2_3LabelControlReport = 0x17, /* CL - EAN 2/3 Label Control Report */ + kHIDUsage_BCS_Code39ControlReport = 0x18, /* CL - Code 39 Control Report */ + kHIDUsage_BCS_Interleaved2of5ControlReport = 0x19, /* CL - Interleaved 2 of 5 Control Report */ + kHIDUsage_BCS_Standard2of5ControlReport = 0x1A, /* CL - Standard 2 of 5 Control Report */ + kHIDUsage_BCS_MSIPlesseyControlReport = 0x1B, /* CL - MSI Plessey Control Report */ + kHIDUsage_BCS_CodabarControlReport = 0x1C, /* CL - Codabar Control Report */ + kHIDUsage_BCS_Code128ControlReport = 0x1D, /* CL - Code 128 Control Report */ + kHIDUsage_BCS_Misc1DControlReport = 0x1E, /* CL - Misc 1D Control Report */ + kHIDUsage_BCS_2DControlReport = 0x1F, /* CL - 2D Control Report */ + /* Reserved 0x20 - 0x2F */ + kHIDUsage_BCS_Aiming_PointerMide = 0x30, /* SF - Aiming Pointer Mode */ + kHIDUsage_BCS_BarCodePresentSensor = 0x31, /* SF - Bar Code Present Sensor */ + kHIDUsage_BCS_Class1ALaser = 0x32, /* SF - Class 1A Laser */ + kHIDUsage_BCS_Class2Laser = 0x33, /* SF - Class 2 Laser */ + kHIDUsage_BCS_HeaterPresent = 0x34, /* SF - Heater Present */ + kHIDUsage_BCS_ContactScanner = 0x35, /* SF - Contact Scanner */ + kHIDUsage_BCS_ElectronicArticleSurveillanceNotification = 0x36, /* SF - Electronic Article Surveillance Notification */ + kHIDUsage_BCS_ConstantElectronicArticleSurveillance = 0x37, /* SF - Constant Electronic Article Surveillance */ + kHIDUsage_BCS_ErrorIndication = 0x38, /* SF - Error Indication */ + kHIDUsage_BCS_FixedBeeper = 0x39, /* SF - Fixed Beeper */ + kHIDUsage_BCS_GoodDecodeIndication = 0x3A, /* SF - Good Decode Indication */ + kHIDUsage_BCS_HandsFreeScanning = 0x3B, /* SF - Hands Free Scanning */ + kHIDUsage_BCS_IntrinsicallySafe = 0x3C, /* SF - Intrinsically Safe */ + kHIDUsage_BCS_KlasseEinsLaser = 0x3D, /* SF - Klasse Eins Laser */ + kHIDUsage_BCS_LongRangeScanner = 0x3E, /* SF - Long Range Scanner */ + kHIDUsage_BCS_MirrorSpeedControl = 0x3F, /* SF - Mirror Speed Control */ + kHIDUsage_BCS_NotOnFileIndication = 0x40, /* SF - Not On File Indication */ + kHIDUsage_BCS_ProgrammableBeeper = 0x41, /* SF - Programmable Beeper */ + kHIDUsage_BCS_Triggerless = 0x42, /* SF - Triggerless */ + kHIDUsage_BCS_Wand = 0x43, /* SF - Wand */ + kHIDUsage_BCS_WaterResistant = 0x44, /* SF - Water Resistant */ + kHIDUsage_BCS_MultiRangeScanner = 0x45, /* SF - Multi-Range Scanner */ + kHIDUsage_BCS_ProximitySensor = 0x46, /* SF - Proximity Sensor */ + /* Reserved 0x47 - 0x4C */ + kHIDUsage_BCS_FragmentDecoding = 0x4D, /* DF - Fragment Decoding */ + kHIDUsage_BCS_ScannerReadConfidence = 0x4E, /* DV - Scanner Read Confidence */ + kHIDUsage_BCS_DataPrefix = 0x4F, /* NAry - Data Prefix */ + kHIDUsage_BCS_PrefixAIMI = 0x50, /* SEL - Prefix AIMI */ + kHIDUsage_BCS_PrefixNone = 0x51, /* SEL - Prefix None */ + kHIDUsage_BCS_PrefixProprietary = 0x52, /* SEL - Prefix Proprietary */ + /* Reserved 0x53 - 0x54 */ + kHIDUsage_BCS_ActiveTime = 0x55, /* DV - Active Time */ + kHIDUsage_BCS_AimingLaserPattern = 0x56, /* DF - Aiming Laser Pattern */ + kHIDUsage_BCS_BarCodePresent = 0x57, /* OOC - Bar Code Present */ + kHIDUsage_BCS_BeeperState = 0x58, /* OOC - Beeper State */ + kHIDUsage_BCS_LaserOnTime = 0x59, /* DV - Laser On Time */ + kHIDUsage_BCS_LaserState = 0x5A, /* OOC - Laser State */ + kHIDUsage_BCS_LockoutTime = 0x5B, /* DV - Lockout Time */ + kHIDUsage_BCS_MotorState = 0x5C, /* OOC - Motor State */ + kHIDUsage_BCS_MotorTimeout = 0x5D, /* DV - Motor Timeout */ + kHIDUsage_BCS_PowerOnResetScanner = 0x5E, /* DF - Power On Reset Scanner */ + kHIDUsage_BCS_PreventReadOfBarcodes = 0x5F, /* DF - Prevent Read of Barcodes */ + kHIDUsage_BCS_InitiateBarcodeRead = 0x60, /* DF - Initiate Barcode Read */ + kHIDUsage_BCS_TriggerState = 0x61, /* DF - Trigger State */ + kHIDUsage_BCS_TriggerMode = 0x62, /* NAry - Trigger Mode */ + kHIDUsage_BCS_TriggerModeBlinkingLaserOn = 0x63, /* SEL - Trigger Mode Blinking Laser On */ + kHIDUsage_BCS_TriggerModeContinuousLaserOn = 0x64, /* SEL - Trigger Mode Continuous Laser On */ + kHIDUsage_BCS_TriggerModeLaserOnWhilePulled = 0x65, /* SEL - Trigger Mode Laser on while Pulled */ + kHIDUsage_BCS_TriggerModeLaserStaysOnAfterTriggerRelease = 0x66, /* SEL - Trigger Mode Laser stays on after Trigger Release */ + /* Reserved 0x67 - 0x6C */ + kHIDUsage_BCS_CommitParametersToNVM = 0x6D, /* DF - Commit Parameters to NVM */ + kHIDUsage_BCS_ParameterScanning = 0x6E, /* DF - Parameter Scanning */ + kHIDUsage_BCS_ParametersChanged = 0x6F, /* OOC - Parameters Changed */ + kHIDUsage_BCS_SetParameterDefaultValues = 0x70, /* DF - Set parameter default values */ + /* Reserved 0x71 - 0x74 */ + kHIDUsage_BCS_ScannerInCradle = 0x75, /* OOC - Scanner In Cradle */ + kHIDUsage_BCS_ScannerInRange = 0x76, /* OOC - Scanner In Range */ + /* Reserved 0x77 - 0x79 */ + kHIDUsage_BCS_AimDuration = 0x7A, /* DV - Aim Duration */ + kHIDUsage_BCS_GoodReadLampDuration = 0x7B, /* DV - Good Read Lamp Duration */ + kHIDUsage_BCS_GoodReadLampIntensity = 0x7C, /* DV - Good Read Lamp Intensity */ + kHIDUsage_BCS_GoodReadLED = 0x7D, /* DF - Good Read LED */ + kHIDUsage_BCS_GoodReadToneFrequency = 0x7E, /* DV - Good Read Tone Frequency*/ + kHIDUsage_BCS_GoodReadToneLength = 0x7F, /* DV - Good Read Tone Length */ + kHIDUsage_BCS_GoodReadToneVolume = 0x80, /* DV - Good Read Tone Volume */ + /* Reserved 0x81 */ + kHIDUsage_BCS_NoReadMessage = 0x82, /* DF - No Read Message */ + kHIDUsage_BCS_NotOnFileVolume = 0x83, /* DV - Not on File Volume */ + kHIDUsage_BCS_PowerupBeep = 0x84, /* DF - Powerup Beep */ + kHIDUsage_BCS_SoundErrorBeep = 0x85, /* DF - Sound Error Beep */ + kHIDUsage_BCS_SoundGoodReadBeep = 0x86, /* DF - Sound Good Read Beep */ + kHIDUsage_BCS_SoundNotOnFileBeep = 0x87, /* DF - Sound Not On File Beep */ + kHIDUsage_BCS_GoodReadWhenToWrite = 0x88, /* NArry - Good Read When to Write */ + kHIDUsage_BCS_GRWTIAfterDecode = 0x89, /* SEL - GRWTI After Decode */ + kHIDUsage_BCS_GRWTIBeep_LampAfterTransmit = 0x8A, /* SEL - GRWTI Beep/Lamp after transmit */ + kHIDUsage_BCS_GRWTINoBeep_LampUseAtAll = 0x8B, /* SEL - GRWTI No Beep/Lamp at all */ + /* Reserved 0x8C - 0x90 */ + kHIDUsage_BCS_BooklandEAN = 0x91, /* DF - Bookland EAN */ + kHIDUsage_BCS_ConvertEAN8To13Type = 0x92, /* DF - Convert EAN 8 to 13 Type */ + kHIDUsage_BCS_ConvertUPCAToEAN_13 = 0x93, /* DF - Convert UPC A to EAN-13 */ + kHIDUsage_BCS_ConvertUPC_EToA = 0x94, /* DF - Convert UPC-E to A */ + kHIDUsage_BCS_EAN_13 = 0x95, /* DF - EAN-13 */ + kHIDUsage_BCS_EAN_8 = 0x96, /* DF - EAN_8 */ + kHIDUsage_BCS_EAN_99_128_Mandatory = 0x97, /* DF - EAN-99 128_Mandatory */ + kHIDUsage_BCS_EAN_99_P5_128_Optional = 0x98, /* DF - EAN-99 P5/128_Optional */ + /* Reserved 0x99 */ + kHIDUsage_BCS_UPC_EAN = 0x9A, /* DF - UPC/EAN */ + kHIDUsage_BCS_UPC_EANCouponCode = 0x9B, /* DF - UPC/EAN Coupon Code */ + kHIDUsage_BCS_UPC_EANPeriodicals = 0x9C, /* DV - UPC/EAN Periodicals */ + kHIDUsage_BCS_UPC_A = 0x9D, /* DF - UPC-A */ + kHIDUsage_BCS_UPC_AWith128Mandatory = 0x9E, /* DF - UPC-A with 128 Mandatory */ + kHIDUsage_BCS_UPC_AWith128Optical = 0x9F, /* DF - UPC-A with 128 Optical */ + kHIDUsage_BCS_UPC_AWithP5Optional = 0xA0, /* DF - UPC-A with P5 Optional */ + kHIDUsage_BCS_UPC_E = 0xA1, /* DF - UPC-E */ + kHIDUsage_BCS_UPC_E1 = 0xA2, /* DF - UPC-E1 */ + /* Reserved 0xA3 - 0xA8 */ + kHIDUsage_BCS_Periodical = 0xA9, /* NArry - Periodical */ + kHIDUsage_BCS_PeriodicalAutoDiscriminatePlus2 = 0xAA,/* SEL - Periodical Auto-Discriminate + 2 */ + kHIDUsage_BCS_PeriodicalOnlyDecodeWithPlus2 = 0xAB, /* SEL - Periodical Only Decode with + 2 */ + kHIDUsage_BCS_PeriodicalIgnorePlus2 = 0xAC, /* SEL - Periodical Ignore + 2 */ + kHIDUsage_BCS_PeriodicalAutoDiscriminatePlus5 = 0xAD,/* SEL - Periodical Auto-Discriminate + 5 */ + kHIDUsage_BCS_PeriodicalOnlyDecodeWithPlus5 = 0xAE, /* SEL - Periodical Only Decode with + 5 */ + kHIDUsage_BCS_PeriodicalIgnorePlus5 = 0xAF, /* SEL - Periodical Ignore + 5 */ + kHIDUsage_BCS_Check = 0xB0, /* NArry - Check */ + kHIDUsage_BCS_CheckDisablePrice = 0xB1, /* SEL - Check Disable Price */ + kHIDUsage_BCS_CheckEnable4DigitPrice = 0xB2, /* SEL - Check Enable 4 digit Price */ + kHIDUsage_BCS_CheckEnable5DigitPrice = 0xB3, /* SEL - Check Enable 5 digit Price */ + kHIDUsage_BCS_CheckEnableEuropean4DigitPrice = 0xB4,/* SEL - Check Enable European 4 digit Price */ + kHIDUsage_BCS_CheckEnableEuropean5DigitPrice = 0xB5,/* SEL - Check Enable European 5 digit Price */ + /* Reserved 0xB6 */ + kHIDUsage_BCS_EANTwoLabel = 0xB7, /* DF - EAN Two Label */ + kHIDUsage_BCS_EANThreeLabel = 0xB8, /* DF - EAN Thread Label */ + kHIDUsage_BCS_EAN8FlagDigit1 = 0xB9, /* DV - EAN 8 Flag Digit 1 */ + kHIDUsage_BCS_EAN8FlagDigit2 = 0xBA, /* DV - EAN 8 Flag Digit 2 */ + kHIDUsage_BCS_EAN8FlagDigit3 = 0xBB, /* DV - EAN 8 Flag Digit 3 */ + kHIDUsage_BCS_EAN13FlagDigit1 = 0xBC, /* DV - EAN 13 Flag Digit 1 */ + kHIDUsage_BCS_EAN13FlagDigit2 = 0xBD, /* DV - EAN 13 Flag Digit 2 */ + kHIDUsage_BCS_EAN13FlagDigit3 = 0xBE, /* DV - EAN 13 Flag Digit 3 */ + kHIDUsage_BCS_AddEAN2_3LabelDefinition = 0xBF, /* DF - Add EAN 2/3 Label Definition */ + kHIDUsage_BCS_ClearAllEAN2_3LabelDefinitions = 0xC0,/* DF - Clear all EAN 2/3 Label Definitions */ + /* Reserved 0xC1 - 0xC2 */ + kHIDUsage_BCS_Codabar = 0xC3, /* DF - Codabar */ + kHIDUsage_BCS_Code128 = 0xC4, /* DF - Code 128 */ + /* Reserved 0xC5 - 0xC6 */ + kHIDUsage_BCS_Code39 = 0xC7, /* DF - Code 39 */ + kHIDUsage_BCS_Code93 = 0xC8, /* DF - Code 93 */ + kHIDUsage_BCS_FullASCIIConversion = 0xC9, /* DF - Full ASCII Conversion */ + kHIDUsage_BCS_Interleaved2of5 = 0xCA, /* DF - Interleaved 2 of 5 */ + kHIDUsage_BCS_ItalianPharmacyCode = 0xCB, /* DF - Italian Pharmacy Code */ + kHIDUsage_BCS_MSI_Plessey = 0xCC, /* DF - MSI/Plessey */ + kHIDUsage_BCS_Standard2of5IATA = 0xCD, /* DF - Standard 2 of 5 IATA */ + kHIDUsage_BCS_Standard2of5 = 0xCE, /* DF - Standard 2 of 5 */ + /* Reserved 0xCF - 0xD2 */ + kHIDUsage_BCS_TransmitStart_Stop = 0xD3, /* DF - Transmit Start/Stop */ + kHIDUsage_BCS_TriOptic = 0xD4, /* DF - Tri-Optic */ + kHIDUsage_BCS_UCC_EAN_128 = 0xD5, /* DF - UCC/EAN-128 */ + kHIDUsage_BCS_CheckDigit = 0xD6, /* NArry - Check Digit */ + kHIDUsage_BCS_CheckDigitDisable = 0xD7, /* SEL - Check Digit Disable */ + kHIDUsage_BCS_CheckDigitEnableInterleaved2of5OPCC = 0xD8, /* SEL - Check Digit Enable Interleaved 2 of 5 OPCC */ + kHIDUsage_BCS_CheckDigitEnableInterleaved2of5USS = 0xD9, /* SEL - Check Digit Enable Interleaved 2 of 5 USS */ + kHIDUsage_BCS_CheckDigitEnableStandard2of5OPCC = 0xD8, /* SEL - Check Digit Enable Standard 2 of 5 OPCC */ + kHIDUsage_BCS_CheckDigitEnableStandard2of5USS = 0xD9, /* SEL - Check Digit Enable Standard 2 of 5 USS */ + kHIDUsage_BCS_CheckDigitEnableOneMSIPlessey = 0xDC, /* SEL - Check Digit Enable One MSI Plessey */ + kHIDUsage_BCS_CheckDigitEnableTwoMSIPlessey = 0xDD, /* SEL - Check Digit Enable Two MSI Plessey */ + kHIDUsage_BCS_CheckDigitCodabarEnable = 0xDE, /* SEL - Check Digit Codabar Enable */ + kHIDUsage_BCS_CheckDigitCode99Enable = 0xDF, /* SEL - Check Digit Code 99 Enable */ + /* Reserved 0xE0 - 0xEF */ + kHIDUsage_BCS_TransmitCheckDigit = 0xF0, /* NArry - Transmit Check Digit */ + kHIDUsage_BCS_DisableCheckDigitTransmit = 0xF1, /* SEL - Disable Check Digit Transmit */ + kHIDUsage_BCS_EnableCheckDigitTransmit = 0xF2, /* SEL - Enable Check Digit Transmit */ + /* Reserved 0xF3 - 0xFA */ + kHIDUsage_BCS_SymbologyIdentifier1 = 0xFB, /* DV - Symbology Identifier 1 */ + kHIDUsage_BCS_SymbologyIdentifier2 = 0xFC, /* DV - Symbology Identifier 2 */ + kHIDUsage_BCS_SymbologyIdentifier3 = 0xFD, /* DV - Symbology Identifier 3 */ + kHIDUsage_BCS_DecodedData = 0xFE, /* DV - Decoded Data */ + kHIDUsage_BCS_DecodeDataContinued = 0xFF, /* DF - Decode Data Continued */ + kHIDUsage_BCS_BarSpaceData = 0x100, /* DV - Bar Space Data */ + kHIDUsage_BCS_ScannerDataAccuracy = 0x101, /* DV - Scanner Data Accuracy */ + kHIDUsage_BCS_RawDataPolarity = 0x102, /* NArry - Raw Data Polarity */ + kHIDUsage_BCS_PolarityInvertedBarCode = 0x103, /* SEL - Polarity Inverted Bar Code */ + kHIDUsage_BCS_PolarityNormalBarCode = 0x103, /* SEL - Polarity Normal Bar Code */ + /* Reserved 0x105 */ + kHIDUsage_BCS_MinimumLengthToDecode = 0x106, /* DV - Minimum Length to Decode */ + kHIDUsage_BCS_MaximumLengthToDecode = 0x107, /* DV - Maximum Length to Decode */ + kHIDUsage_BCS_FirstDiscreteLengthToDecode = 0x108, /* DV - First Discrete Length to Decode */ + kHIDUsage_BCS_SecondDiscreteLengthToDecode = 0x109, /* DV - Second Discrete Length to Decode */ + kHIDUsage_BCS_DataLengthMethod = 0x10A, /* NArry - Data Length Method */ + kHIDUsage_BCS_DLMethodReadAny = 0x10B, /* DF - DL Method Read any */ + kHIDUsage_BCS_DLMethodCheckInRange = 0x10C, /* DF - DL Method Check in Range */ + kHIDUsage_BCS_DLMethodCheckForDiscrete = 0x10D, /* DF - DL Method Check for Discrete */ + /* Reserved 0x10E - 0x10F */ + kHIDUsage_BCS_AztecCode = 0x110, /* DF - Aztec Code */ + kHIDUsage_BCS_BC412 = 0x111, /* DF - BC412 */ + kHIDUsage_BCS_ChannelCode = 0x112, /* DF - Channel Code */ + kHIDUsage_BCS_Code16 = 0x113, /* DF - Code 16 */ + kHIDUsage_BCS_Code32 = 0x114, /* DF - Code 32 */ + kHIDUsage_BCS_Code49 = 0x115, /* DF - Code 49 */ + kHIDUsage_BCS_CodeOne = 0x116, /* DF - Code One */ + kHIDUsage_BCS_Colorcode = 0x117, /* DF - Colorcode */ + kHIDUsage_BCS_DataMatrix = 0x118, /* DF - Data Matrix */ + kHIDUsage_BCS_MaxiCode = 0x119, /* DF - MaxiCode */ + kHIDUsage_BCS_MicroPDF = 0x11A, /* DF - MicroPDF */ + kHIDUsage_BCS_PDF_417 = 0x11B, /* DF - PDF-417 */ + kHIDUsage_BCS_PosiCode = 0x11C, /* DF - PosiCode */ + kHIDUsage_BCS_QRCode = 0x11D, /* DF - QR Code */ + kHIDUsage_BCS_SuperCode = 0x11E, /* DF - SuperCode */ + kHIDUsage_BCS_UltraCode = 0x11F, /* DF - UltraCode */ + kHIDUsage_BCS_USB_5_SlugCode = 0x120, /* DF - USD-5 (Slug Code) */ + kHIDUsage_BCS_VeriCode = 0x121 /* DF - VeriCode */ + /* Reserved 0x122 - 0xFFFF */ +}; + +/* Weighing Devices Page (0x8D) */ +/* This section provides detailed descriptions of the usages employed by Weighing Devices. */ +enum +{ + kHIDUsage_WD_Undefined = 0x00, /* Weighing Device Undefined Usage */ + kHIDUsage_WD_WeighingDevice = 0x01, /* CA - Weighing Device */ + /* Reserved 0x02 - 0x1F */ + kHIDUsage_WD_ScaleScaleDevice = 0x20, /* CL - Scale Device */ + kHIDUsage_WD_ScaleScaleClassIMetricCL = 0x21, /* CL - Scale Class I Metric */ + kHIDUsage_WD_ScaleScaleClassIMetric = 0x22, /* SEL - Scale Class I Metric */ + kHIDUsage_WD_ScaleScaleClassIIMetric = 0x23, /* SEL - Scale Class II Metric */ + kHIDUsage_WD_ScaleScaleClassIIIMetric = 0x24, /* SEL - Scale Class III Metric */ + kHIDUsage_WD_ScaleScaleClassIIILMetric = 0x25, /* SEL - Scale Class IIIL Metric */ + kHIDUsage_WD_ScaleScaleClassIVMetric = 0x26, /* SEL - Scale Class IV Metric */ + kHIDUsage_WD_ScaleScaleClassIIIEnglish = 0x27, /* SEL - Scale Class III English */ + kHIDUsage_WD_ScaleScaleClassIIILEnglish = 0x28, /* SEL - Scale Class IIIL English */ + kHIDUsage_WD_ScaleScaleClassIVEnglish = 0x29, /* SEL - Scale Class IV English */ + kHIDUsage_WD_ScaleScaleClassGeneric = 0x2A, /* SEL - Scale Class Generic */ + /* Reserved 0x2B - 0x2F */ + kHIDUsage_WD_ScaleAtrributeReport = 0x30, /* CL - Scale Attribute Report */ + kHIDUsage_WD_ScaleControlReport = 0x31, /* CL - Scale Control Report */ + kHIDUsage_WD_ScaleDataReport = 0x32, /* CL - Scale Data Report */ + kHIDUsage_WD_ScaleStatusReport = 0x33, /* CL - Scale Status Report */ + kHIDUsage_WD_ScaleWeightLimitReport = 0x34, /* CL - Scale Weight Limit Report */ + kHIDUsage_WD_ScaleStatisticsReport = 0x35, /* CL - Scale Statistics Report */ + /* Reserved 0x36 - 0x3F */ + kHIDUsage_WD_DataWeight = 0x40, /* DV - Data Weight */ + kHIDUsage_WD_DataScaling = 0x41, /* DV - Data Scaling */ + /* Reserved 0x42 - 0x4F */ + kHIDUsage_WD_WeightUnit = 0x50, /* CL - Weight Unit */ + kHIDUsage_WD_WeightUnitMilligram = 0x51, /* SEL - Weight Unit Milligram */ + kHIDUsage_WD_WeightUnitGram = 0x52, /* SEL - Weight Unit Gram */ + kHIDUsage_WD_WeightUnitKilogram = 0x53, /* SEL - Weight Unit Kilogram */ + kHIDUsage_WD_WeightUnitCarats = 0x54, /* SEL - Weight Unit Carats */ + kHIDUsage_WD_WeightUnitTaels = 0x55, /* SEL - Weight Unit Taels */ + kHIDUsage_WD_WeightUnitGrains = 0x56, /* SEL - Weight Unit Grains */ + kHIDUsage_WD_WeightUnitPennyweights = 0x57, /* SEL - Weight Unit Pennyweights */ + kHIDUsage_WD_WeightUnitMetricTon = 0x58, /* SEL - Weight Unit Metric Ton */ + kHIDUsage_WD_WeightUnitAvoirTon = 0x59, /* SEL - Weight Unit Avoir Ton */ + kHIDUsage_WD_WeightUnitTroyOunce = 0x5A, /* SEL - Weight Unit Troy Ounce */ + kHIDUsage_WD_WeightUnitOunce = 0x5B, /* SEL - Weight Unit Ounce */ + kHIDUsage_WD_WeightUnitPound = 0x5C, /* SEL - Weight Unit Pound */ + /* Reserved 0x5D - 0x5F */ + kHIDUsage_WD_CalibrationCount = 0x60, /* DV - Calibration Count */ + kHIDUsage_WD_RezeroCount = 0x61, /* DV - Re-Zero Count*/ + /* Reserved 0x62 - 0x6F */ + kHIDUsage_WD_ScaleStatus = 0x70, /* CL - Scale Status */ + kHIDUsage_WD_ScaleStatusFault = 0x71, /* SEL - Scale Status Fault */ + kHIDUsage_WD_ScaleStatusStableAtZero = 0x72, /* SEL - Scale Status Stable at Center of Zero */ + kHIDUsage_WD_ScaleStatusInMotion = 0x73, /* SEL - Scale Status In Motion */ + kHIDUsage_WD_ScaleStatusWeightStable = 0x74, /* SEL - Scale Status Weight Stable */ + kHIDUsage_WD_ScaleStatusUnderZero = 0x75, /* SEL - Scale Status Under Zero */ + kHIDUsage_WD_ScaleStatusOverWeightLimit = 0x76, /* SEL - Scale Status Over Weight Limit */ + kHIDUsage_WD_ScaleStatusRequiresCalibration = 0x77, /* SEL - Scale Status Requires Calibration */ + kHIDUsage_WD_ScaleStatusRequiresRezeroing = 0x78, /* SEL - Scale Status Requires Re-zeroing */ + /* Reserved 0x79 - 0x7F */ + kHIDUsage_WD_ZeroScale = 0x80, /* OOC - Zero Scale */ + kHIDUsage_WD_EnforcedZeroReturn = 0x81 /* OOC - Enforced Zero Return */ + /* Reserved 0x82 - 0xFFFF */ + +}; + +/* Magnetic Stripe Reader Page (0x8E) */ +/* This section provides detailed descriptions of the usages employed by Magnetic Stripe Reader Devices. */ +enum +{ + kHIDUsage_MSR_Undefined = 0x00, /* MagStripe Undefined Usage */ + kHIDUsage_MSR_DeviceReadOnly = 0x01, /* CA - MSR Device Read-Only */ + /* Reserved 0x02 - 0x10 */ + kHIDUsage_MSR_Track1Length = 0x11, /* SF, DF, SEL - Track 1 Length */ + kHIDUsage_MSR_Track2Length = 0x12, /* SF, DF, SEL - Track 2 Length */ + kHIDUsage_MSR_Track3Length = 0x13, /* SF, DF, SEL - Track 3 Length */ + kHIDUsage_MSR_TrackJISLength = 0x14, /* SF, DF, SEL - Track JIS Length */ + /* Reserved 0x15 - 0x1F */ + kHIDUsage_MSR_TrackData = 0x20, /* SF, DF, SEL - Track Data */ + kHIDUsage_MSR_Track1Data = 0x21, /* SF, DF, SEL - Track 1 Data */ + kHIDUsage_MSR_Track2Data = 0x22, /* SF, DF, SEL - Track 2 Data */ + kHIDUsage_MSR_Track3Data = 0x23, /* SF, DF, SEL - Track 3 Data */ + kHIDUsage_MSR_TrackJISData = 0x24 /* SF, DF, SEL - Track JIS Data */ + /* Reserved 0x25 - 0xFFFF */ +}; + +#endif /* _IOHIDUSAGETABLES_H */ diff --git a/i386/include/IOKit/hidsystem/IOHIDevice.h b/i386/include/IOKit/hidsystem/IOHIDevice.h new file mode 100644 index 0000000..bb705a8 --- /dev/null +++ b/i386/include/IOKit/hidsystem/IOHIDevice.h @@ -0,0 +1,71 @@ +/* + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2009 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. + * + * IOHIDevice.h - Common Event Source object class. + * + * HISTORY + * 22 May 1992 Mike Paquette at NeXT + * Created. + * 4 Aug 1993 Erik Kay at NeXT + * API cleanup + * 5 Aug 1993 Erik Kay at NeXT + * added ivar space for future expansion + */ + +#ifndef _IOHIDEVICE_H +#define _IOHIDEVICE_H + +#include +#include + +typedef enum { + kHIUnknownDevice = 0, + kHIKeyboardDevice = 1, + kHIRelativePointingDevice = 2 +} IOHIDKind; + +class IOHIDevice : public IOService +{ + OSDeclareDefaultStructors(IOHIDevice); + +public: + virtual bool init(OSDictionary * properties = 0); + virtual void free(); + virtual bool start(IOService * provider); + virtual bool open( IOService * forClient, + IOOptionBits options = 0, + void * arg = 0 ); + + virtual UInt32 deviceType(); + virtual IOHIDKind hidKind(); + virtual UInt32 interfaceID(); + virtual bool updateProperties(void); + virtual IOReturn setProperties( OSObject * properties ); + virtual IOReturn setParamProperties(OSDictionary * dict); + virtual UInt64 getGUID(); + + static SInt32 GenerateKey(OSObject *object); +}; + +#endif /* !_IOHIDEVICE_H */ diff --git a/i386/include/IOKit/hidsystem/IOHIKeyboard.h b/i386/include/IOKit/hidsystem/IOHIKeyboard.h new file mode 100644 index 0000000..f6db152 --- /dev/null +++ b/i386/include/IOKit/hidsystem/IOHIKeyboard.h @@ -0,0 +1,268 @@ +/* + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. + * + * EventSrcPCKeyboard.h - PC Keyboard EventSrc subclass definition + * + * HISTORY + * 28 Aug 1992 Joe Pasqua + * Created. + */ + +#ifndef _IOHIKEYBOARD_H +#define _IOHIKEYBOARD_H + +#include +#include + +/* Start Action Definitions */ + +/* + * HISTORICAL NOTE: + * The following entry points were part of the IOHIKeyboardEvents + * protocol. + */ + +typedef void (*KeyboardEventAction)( OSObject * target, + /* eventFlags */ unsigned eventType, + /* flags */ unsigned flags, + /* keyCode */ unsigned key, + /* charCode */ unsigned charCode, + /* charSet */ unsigned charSet, + /* originalCharCode */ unsigned origCharCode, + /* originalCharSet */ unsigned origCharSet, + /* keyboardType */ unsigned keyboardType, + /* repeat */ bool repeat, + /* atTime */ AbsoluteTime ts); + +typedef void (*KeyboardSpecialEventAction)(OSObject * target, + /* eventType */ unsigned eventType, + /* flags */ unsigned flags, + /* keyCode */ unsigned key, + /* specialty */ unsigned flavor, + /* source id */ UInt64 guid, + /* repeat */ bool repeat, + /* atTime */ AbsoluteTime ts); + +typedef void (*UpdateEventFlagsAction)( OSObject * target, + /* flags */ unsigned flags); + +/* Event Callback Definitions */ + +typedef void (*KeyboardEventCallback)( + /* target */ OSObject * target, + /* eventFlags */ unsigned eventType, + /* flags */ unsigned flags, + /* keyCode */ unsigned key, + /* charCode */ unsigned charCode, + /* charSet */ unsigned charSet, + /* originalCharCode */ unsigned origCharCode, + /* originalCharSet */ unsigned origCharSet, + /* keyboardType */ unsigned keyboardType, + /* repeat */ bool repeat, + /* atTime */ AbsoluteTime ts, + /* sender */ OSObject * sender, + /* refcon */ void * refcon); + +typedef void (*KeyboardSpecialEventCallback)( + /* target */ OSObject * target, + /* eventType */ unsigned eventType, + /* flags */ unsigned flags, + /* keyCode */ unsigned key, + /* specialty */ unsigned flavor, + /* source id */ UInt64 guid, + /* repeat */ bool repeat, + /* atTime */ AbsoluteTime ts, + /* sender */ OSObject * sender, + /* refcon */ void * refcon); + +typedef void (*UpdateEventFlagsCallback)( + /* target */ OSObject * target, + /* flags */ unsigned flags, + /* sender */ OSObject * sender, + /* refcon */ void * refcon); + +/* End Action Definitions */ + + + +/* Default key repeat parameters */ +#define EV_DEFAULTINITIALREPEAT 500000000ULL // 1/2 sec in nanoseconds +#define EV_DEFAULTKEYREPEAT 83333333ULL // 1/12 sec in nanoseconds +#define EV_MINKEYREPEAT 16700000ULL // 1/60 sec + +class IOHIKeyboard : public IOHIDevice +{ + OSDeclareDefaultStructors(IOHIKeyboard); + + friend class IOHIDKeyboardDevice; + friend class IOHIDKeyboard; + friend class IOHIDConsumer; + +protected: + IOLock * _deviceLock; // Lock for all device access + IOHIKeyboardMapper * _keyMap; // KeyMap instance + + // The following fields describe the kind of keyboard + UInt32 _interfaceType; + UInt32 _deviceType; + + // The following fields describe the state of the keyboard + UInt32 * _keyState; // kbdBitVector + IOByteCount _keyStateSize; // kbdBitVector allocated size + unsigned _eventFlags; // Current eventFlags + bool _alphaLock; // true means alpha lock is on + bool _numLock; // true means num lock is on + bool _charKeyActive; // true means char gen. key active + + // The following fields are used in performing key repeats + bool _isRepeat; // true means we're generating repeat + unsigned _codeToRepeat; // What we are repeating + bool _calloutPending; // true means we've sched. a callout + AbsoluteTime _lastEventTime; // Time last event was dispatched + AbsoluteTime _downRepeatTime; // Time when we should next repeat + AbsoluteTime _keyRepeat; // Delay between key repeats + AbsoluteTime _initialKeyRepeat; // Delay before initial key repeat + UInt64 _guid; + + OSObject * _keyboardEventTarget; + KeyboardEventAction _keyboardEventAction; + OSObject * _keyboardSpecialEventTarget; + KeyboardSpecialEventAction _keyboardSpecialEventAction; + OSObject * _updateEventFlagsTarget; + UpdateEventFlagsAction _updateEventFlagsAction; + +protected: + virtual void dispatchKeyboardEvent(unsigned int keyCode, + /* direction */ bool goingDown, + /* timeStamp */ AbsoluteTime time); + +public: + virtual bool init(OSDictionary * properties = 0); + virtual bool start(IOService * provider); + virtual void stop(IOService * provider); + virtual void free(); + + virtual bool open(IOService * client, + IOOptionBits options, + KeyboardEventAction keAction, + KeyboardSpecialEventAction kseAction, + UpdateEventFlagsAction uefAction); + + bool open( IOService * client, + IOOptionBits options, + void *, + KeyboardEventCallback keCallback, + KeyboardSpecialEventCallback kseCallback, + UpdateEventFlagsCallback uefCallback); + + virtual void close(IOService * client, IOOptionBits ); + + virtual IOReturn message( UInt32 type, IOService * provider, + void * argument = 0 ); + + virtual IOHIDKind hidKind(); + virtual bool updateProperties( void ); + virtual IOReturn setParamProperties(OSDictionary * dict); + virtual IOReturn setProperties( OSObject * properties ); + + inline bool isRepeat() {return _isRepeat;} + +protected: // for subclasses to implement + virtual const unsigned char * defaultKeymapOfLength(UInt32 * length); + virtual void setAlphaLockFeedback(bool val); + virtual void setNumLockFeedback(bool val); + virtual UInt32 maxKeyCodes(); + + +private: + virtual bool resetKeyboard(); + virtual void scheduleAutoRepeat(); + static void _autoRepeat(void * arg, void *); + virtual void autoRepeat(); + virtual void setRepeat(unsigned eventType, unsigned keyCode); + void setRepeatMode(bool repeat); + static void _createKeyboardNub(thread_call_param_t param0, thread_call_param_t param1); + +/* + * HISTORICAL NOTE: + * The following methods were part of the KeyMapDelegate protocol; + * the declarations have now been merged directly into this class. + */ + +public: + virtual void keyboardEvent(unsigned eventType, + /* flags */ unsigned flags, + /* keyCode */ unsigned keyCode, + /* charCode */ unsigned charCode, + /* charSet */ unsigned charSet, + /* originalCharCode */ unsigned origCharCode, + /* originalCharSet */ unsigned origCharSet); + + virtual void keyboardSpecialEvent(unsigned eventType, + /* flags */ unsigned flags, + /* keyCode */ unsigned keyCode, + /* specialty */ unsigned flavor); + + virtual void updateEventFlags(unsigned flags); // Does not generate events + + virtual unsigned eventFlags(); // Global event flags + virtual unsigned deviceFlags(); // per-device event flags + virtual void setDeviceFlags(unsigned flags); // Set device event flags + virtual bool alphaLock(); // current alpha-lock state + virtual void setAlphaLock(bool val); // Set current alpha-lock state + virtual bool numLock(); + virtual void setNumLock(bool val); + virtual bool charKeyActive(); // Is a character gen. key down? + virtual void setCharKeyActive(bool val); // Note that a char gen key is down. + virtual bool doesKeyLock(unsigned key); //does key lock physically + virtual unsigned getLEDStatus(); //check hardware for LED status + +private: + static void _keyboardEvent( IOHIKeyboard * self, + unsigned eventType, + /* flags */ unsigned flags, + /* keyCode */ unsigned key, + /* charCode */ unsigned charCode, + /* charSet */ unsigned charSet, + /* originalCharCode */ unsigned origCharCode, + /* originalCharSet */ unsigned origCharSet, + /* keyboardType */ unsigned keyboardType, + /* repeat */ bool repeat, + /* atTime */ AbsoluteTime ts); + static void _keyboardSpecialEvent( + IOHIKeyboard * self, + unsigned eventType, + /* flags */ unsigned flags, + /* keyCode */ unsigned key, + /* specialty */ unsigned flavor, + /* guid */ UInt64 guid, + /* repeat */ bool repeat, + /* atTime */ AbsoluteTime ts); + + static void _updateEventFlags( IOHIKeyboard * self, + unsigned flags); /* Does not generate events */ + +}; + +#endif /* !_IOHIKEYBOARD_H */ diff --git a/i386/include/IOKit/hidsystem/IOHIKeyboardMapper.h b/i386/include/IOKit/hidsystem/IOHIKeyboardMapper.h new file mode 100644 index 0000000..374d25c --- /dev/null +++ b/i386/include/IOKit/hidsystem/IOHIKeyboardMapper.h @@ -0,0 +1,350 @@ +/* + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _IOHIKEYBOARDMAPPER_H +#define _IOHIKEYBOARDMAPPER_H + +#include +#include +#include +#include + +class IOHIKeyboard; +class IOHIDSystem; + +/* + * Key ip/down state is tracked in a bit list. Bits are set + * for key-down, and cleared for key-up. The bit vector and macros + * for it's manipulation are defined here. + */ + +typedef UInt32 * kbdBitVector; + +#define EVK_BITS_PER_UNIT 32 +#define EVK_BITS_MASK 31 +#define EVK_BITS_SHIFT 5 // 1<<5 == 32, for cheap divide + +#define EVK_KEYDOWN(n, bits) \ + (bits)[((n)>>EVK_BITS_SHIFT)] |= (1 << ((n) & EVK_BITS_MASK)) + +#define EVK_KEYUP(n, bits) \ + (bits)[((n)>>EVK_BITS_SHIFT)] &= ~(1 << ((n) & EVK_BITS_MASK)) + +#define EVK_IS_KEYDOWN(n, bits) \ + (((bits)[((n)>>EVK_BITS_SHIFT)] & (1 << ((n) & EVK_BITS_MASK))) != 0) + +/* the maximum number of modifier keys sticky keys can hold at once */ +#define kMAX_MODIFIERS 5 + +/* the number of shift keys in a row that must be depressed to toggle state */ +#define kNUM_SHIFTS_TO_ACTIVATE 5 + +/* the number of milliseconds all the shifts must be pressed in - 30 seconds (30000 mS)*/ +#define kDEFAULT_SHIFTEXPIREINTERVAL 30000 + + +// sticky keys state flags +enum +{ + kState_Disabled_Flag = 0x0001, // disabled and will do nothing until this is changed + kState_ShiftActivates_Flag = 0x0002, // the 'on' gesture (5 shifts) will activate + kState_On = 0x0004, // currently on, will hold down modifiers when pressed + kState_On_ModifiersDown = 0x0008, // one or more modifiers being held down + + kState_Mask = 0x00FF, // mask for all states +}; + +typedef struct _stickyKeys_ToggleInfo +{ + // size of this allocation + IOByteCount size; + + // which modifier key we are tracking (using NX_WHICHMODMASK) + unsigned toggleModifier; + + // the number of times the modifier must be pressed to toggle + unsigned repetitionsToToggle; + + // how long the user has to press the modifier repetitionsToToggle times + // the default is 30 seconds + AbsoluteTime expireInterval; + + // the number of times the modifier used within the alloted time + unsigned currentCount; + + // the times that the last shift must occer for this one to be used + // this array will actually be of size repetitionsToToggle + AbsoluteTime deadlines[1]; +} StickyKeys_ToggleInfo; + +// Flags for each sticky key modifier +// This will allow for chording of keys +// and for key locking +enum +{ + kModifier_DidPerformModifiy = 0x01, + kModifier_DidKeyUp = 0x02, + kModifier_Locked = 0x04, +}; +typedef struct _stickyKeys_ModifierInfo +{ + UInt8 key; // Key code of the sticky modifier + UInt8 state; // The state of the sticky modifier + UInt8 leftModBit; // System Mod bit of the sticky modifier +} StickyKeys_ModifierInfo; + +class IOHIDKeyboardDevice; + +class IOHIKeyboardMapper : public OSObject +{ + OSDeclareDefaultStructors(IOHIKeyboardMapper); + +private: + IOHIKeyboard * _delegate; // KeyMap delegate + bool _mappingShouldBeFreed; // true if map can be IOFree'd + NXParsedKeyMapping _parsedMapping; // current system-wide keymap + IOHIDSystem * _hidSystem; // target of IOHIKeyboard (should be IOHIDSystem) + + // binary compatibility padding + struct ExpansionData { + + // This is for F12 eject + UInt16 f12Eject_State; + UInt32 eject_Delay_MS; + IOTimerEventSource *ejectTimerEventSource; + + // This is for sticky keys + kbdBitVector cached_KeyBits; + StickyKeys_ModifierInfo stickyKeys_StuckModifiers[kMAX_MODIFIERS]; + IOInterruptEventSource *stickyKeysMouseClickEventSource; + IOInterruptEventSource *stickyKeysSetFnStateEventSource; + // The following should really be statics, but placing here + // to match design by predecesor. + OSDictionary *offFnParamDict; + OSDictionary *onFnParamDict; + + // This is for SlowKeys + UInt16 slowKeys_State; + UInt32 slowKeys_Delay_MS; + IOTimerEventSource *slowKeysTimerEventSource; + + // stored for slowKeysPostProcess + UInt8 slowKeys_Aborted_Key; + UInt8 slowKeys_Current_Key; + + UInt32 specialKeyModifierFlags; + + bool supportsF12Eject; + + SInt32 modifierSwap_Modifiers[NX_NUMMODIFIERS]; + + unsigned char * cachedAlphaLockModDefs; + }; + ExpansionData * _reserved; // Reserved for future use. (Internal use only) + +public: + static IOHIKeyboardMapper * keyboardMapper( + IOHIKeyboard * delegate, + const UInt8 * mapping, + UInt32 mappingLength, + bool mappingShouldBeFreed ); + + virtual bool init(IOHIKeyboard * delegate, + const UInt8 * mapping, + UInt32 mappingLength, + bool mappingShouldBeFreed); + virtual void free(); + + virtual const UInt8 * mapping(); + virtual UInt32 mappingLength(); + virtual bool serialize(OSSerialize *s) const; + + virtual void translateKeyCode(UInt8 key, bool keyDown, kbdBitVector keyBits); + virtual UInt8 getParsedSpecialKey(UInt8 logical); //retrieve a key from _parsedMapping + + virtual void setKeyboardTarget (IOService * keyboardTarget); + + virtual bool updateProperties (void); + virtual IOReturn setParamProperties (OSDictionary * dict); + + // keyEventPostProcess is called while a lock is not held, so a recursive + // call back into HIKeyboard is possible + virtual void keyEventPostProcess (void); + +private: + static void makeNumberParamProperty( OSDictionary * dict, const char * key, + unsigned long long number, unsigned int bits ); + + + virtual bool parseKeyMapping(const UInt8 * mapping, + UInt32 mappingLength, + NXParsedKeyMapping * parsedMapping) const; + + virtual void calcModBit(int bit, kbdBitVector keyBits); + virtual void doModCalc(int key, kbdBitVector keyBits); + virtual void doCharGen(int keyCode, bool down); + + /* sticky keys functionality */ +private: + // original translateKeyCode + void rawTranslateKeyCode (UInt8 key, bool keyDown, kbdBitVector keyBits); + bool modifierSwapFilterKey(UInt8 * key); + + // the current state of stickyKeys + UInt32 _stickyKeys_State; + + // the number of modifiers being held down by stickyKeys + int _stickyKeys_NumModifiersDown; + + ////////////////////////////////////////////////////////////// + // THE FOLLOWING CLASS VARIABLE HAS BEEN DEPRECATED + // + // PLEASE USE _stickyKeys_StuckModifiers + // + UInt8 _stickyKeys_Modifiers[kMAX_MODIFIERS]; + ////////////////////////////////////////////////////////////// + + // contains the info needed to keep track of shift repetitions + StickyKeys_ToggleInfo * _stickyKeys_ShiftToggle; + + // contains the info needed to keep track of option repetitions + StickyKeys_ToggleInfo * _stickyKeys_OptionToggle; + + // dictionaries with cached on and off states, used to set params when state changes + bool _stateDirty; + OSDictionary * _onParamDict; + OSDictionary * _offParamDict; + + // init/free vars + bool stickyKeysinit (void); + void stickyKeysfree (void); + + // allocate/free a StickyKeys_ToggleInfo struct + static StickyKeys_ToggleInfo * stickyKeysAllocToggleInfo (unsigned maxCount); + static void stickyKeysFreeToggleInfo (StickyKeys_ToggleInfo * toggleInfo); + + // create on/off dicts as part of init + bool createParamDicts (void); + + // post special keyboard events thru the event system + void postKeyboardSpecialEvent (unsigned subtype, unsigned eventType=NX_SYSDEFINED); + + // check any modifier to see if it is pressed 5 times + // based on StickyKeys_ToggleInfo + bool stickyKeysModifierToggleCheck( + StickyKeys_ToggleInfo * toggleInfo, + UInt8 key, + bool keyDown, + kbdBitVector keyBits, + bool mouseClick = false); + + // non-modifier key pressed + void stickyKeysNonModifierKey (UInt8 key, bool keyDown, kbdBitVector keyBits, bool mouseClick = false); + + // modifier key pressed (shift, command, option, control) + bool stickyKeysModifierKey (UInt8 key, bool keyDown, kbdBitVector keyBits); + + // main entry point, called for all keys (returns true if key handled) + bool stickyKeysFilterKey (UInt8 key, bool keyDown, kbdBitVector keyBits, bool mouseClick = false); + + // called by interrupt event source to inform sticky keys of mouse down event + static void stickyKeysMouseUp(IOHIKeyboardMapper *owner, IOEventSource *sender); + + void stickyKeysCleanup(); + + // called by interrupt event source to restore prior fn state + static void stickyKeysSetFnState(IOHIKeyboardMapper *owner, IOEventSource *sender); + + /* F12 Eject Functionality */ +private: + + // Determining f12 eject key press + // Returns true if f12 held down for a predetermined period of time. + bool f12EjectFilterKey (UInt8 key, bool keyDown, kbdBitVector keyBits); + + // Timer function for eject + static void performF12Eject(IOHIKeyboardMapper *owner, IOTimerEventSource *sender); + + /* SlowKeys Functionality */ +private: + // Slow keys methods + bool slowKeysFilterKey (UInt8 key, bool keyDown, kbdBitVector keyBits); + + static void slowKeysPostProcess (IOHIKeyboardMapper *owner, IOTimerEventSource *sender); + + +public: + OSMetaClassDeclareReservedUsed(IOHIKeyboardMapper, 0); + virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); + + // binary compatibility padding + OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 1); + OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 2); + OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 3); + OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 4); + OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 5); + OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 6); + OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 7); + OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 8); + OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 9); + OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 10); + OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 11); + OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 12); + OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 13); + OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 14); + OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 15); +}; + +#endif _IOHIKEYBOARDMAPPER_H + +/* + * HISTORICAL NOTE: + * The "delegate" object had to respond to the following protocol; + * this protocol has since been merged into the IOHIKeyboard class. + * + * @protocol KeyMapDelegate + * + * - keyboardEvent :(unsigned)eventType + * flags :(unsigned)flags + * keyCode :(unsigned)keyCode + * charCode:(unsigned)charCode + * charSet :(unsigned)charSet + * originalCharCode:(unsigned)origCharCode + * originalCharSet:(unsigned)origCharSet; + * + * - keyboardSpecialEvent:(unsigned)eventType + * flags :(unsigned)flags + * keyCode :(unsigned)keyCode + * specialty:(unsigned)flavor; + * + * - updateEventFlags:(unsigned)flags; // Does not generate events + * + * - (unsigned)eventFlags; // Global event flags + * - (unsigned)deviceFlags; // per-device event flags + * - setDeviceFlags:(unsigned)flags; // Set device event flags + * - (bool)alphaLock; // current alpha-lock state + * - setAlphaLock:(bool)val; // Set current alpha-lock state + * - (bool)charKeyActive; // Is a character gen. key down? + * - setCharKeyActive:(bool)val; // Note that a char gen key is down. + * + * @end + */ diff --git a/i386/include/IOKit/hidsystem/IOHIPointing.h b/i386/include/IOKit/hidsystem/IOHIPointing.h new file mode 100644 index 0000000..1df225a --- /dev/null +++ b/i386/include/IOKit/hidsystem/IOHIPointing.h @@ -0,0 +1,280 @@ +/* + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2009 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _IOHIPOINTING_H +#define _IOHIPOINTING_H + +#include +#include +#include + +/* Start Action Definitions */ + +/* + * HISTORICAL NOTE: + * The following entry points were part of the IOHIPointingEvents + * protocol. + */ +typedef void (*RelativePointerEventAction)(OSObject * target, + /* buttons */ int buttons, + /* deltaX */ int dx, + /* deltaY */ int dy, + /* atTime */ AbsoluteTime ts); + +typedef void (*AbsolutePointerEventAction)(OSObject * target, + /* buttons */ int buttons, + /* at */ IOGPoint * newLoc, + /* withBounds */ IOGBounds *bounds, + /* inProximity */ bool proximity, + /* withPressure */ int pressure, + /* withAngle */ int stylusAngle, + /* atTime */ AbsoluteTime ts); + +typedef void (*ScrollWheelEventAction)(OSObject * target, + short deltaAxis1, + short deltaAxis2, + short deltaAxis3, + AbsoluteTime ts); + +/* Event Callback Definitions */ + +typedef void (*RelativePointerEventCallback)( + /* target */ OSObject * target, + /* buttons */ int buttons, + /* deltaX */ int dx, + /* deltaY */ int dy, + /* atTime */ AbsoluteTime ts, + /* sender */ OSObject * sender, + /* refcon */ void * refcon); + +typedef void (*AbsolutePointerEventCallback)( + /* target */ OSObject * target, + /* buttons */ int buttons, + /* at */ IOGPoint * newLoc, + /* withBounds */ IOGBounds *bounds, + /* inProximity */ bool proximity, + /* withPressure */ int pressure, + /* withAngle */ int stylusAngle, + /* atTime */ AbsoluteTime ts, + /* sender */ OSObject * sender, + /* refcon */ void * refcon); + +typedef void (*ScrollWheelEventCallback)( + /* target */ OSObject * target, + /* delta1 */ short deltaAxis1, + /* delta2 */ short deltaAxis2, + /* delta3 */ short deltaAxis3, + /* fixedDelta1 */ IOFixed fixedDelta1, + /* fixedDelta2 */ IOFixed fixedDelta2, + /* fixedDelta3 */ IOFixed fixedDelta3, + /* pointDelta1 */ SInt32 pointDelta1, + /* pointDelta2 */ SInt32 pointDelta2, + /* pointDelta3 */ SInt32 pointDelta3, + /* reserved */ SInt32 options, + /* atTime */ AbsoluteTime ts, + /* sender */ OSObject * sender, + /* refcon */ void * refcon); + +/* End Action Definitions */ + +/* Default accel level parameters */ +#define EV_DEFAULTPOINTERACCELLEVEL 0x0000b000 +#define EV_DEFAULTSCROLLACCELLEVEL 0x00005000 + +class IOHIDPointingDevice; +struct ScrollAccelInfo; + +class IOHIPointing : public IOHIDevice +{ + OSDeclareDefaultStructors(IOHIPointing); + + friend class IOHITablet; + friend class IOHIDPointing; + +private: + IOLock * _deviceLock; // Lock for all device access + int _buttonMode; // The "handedness" of the pointer + IOFixed _acceleration; + bool _convertAbsoluteToRelative; + bool _contactToMove; + bool _hadContact; + IOGPoint _previousLocation; + UInt8 _pressureThresholdToClick; // A scale factor of 0 to 255 to determine how much pressure is necessary to generate a primary mouse click - a value of 255 means no click will be generated + void * _scaleSegments; + IOItemCount _scaleSegCount; + IOFixed _fractX; + IOFixed _fractY; + + OSObject * _relativePointerEventTarget; + RelativePointerEventAction _relativePointerEventAction; + OSObject * _absolutePointerEventTarget; + AbsolutePointerEventAction _absolutePointerEventAction; + OSObject * _scrollWheelEventTarget; + ScrollWheelEventAction _scrollWheelEventAction; + + struct ExpansionData { + UInt32 scrollType; + + ScrollAccelInfo * scrollWheelInfo; + ScrollAccelInfo * scrollPointerInfo; + + IOFixed scrollFixedDeltaAxis1; + IOFixed scrollFixedDeltaAxis2; + IOFixed scrollFixedDeltaAxis3; + SInt32 scrollPointDeltaAxis1; + SInt32 scrollPointDeltaAxis2; + SInt32 scrollPointDeltaAxis3; + UInt32 scrollButtonMask; + + // Added to post events to the HID Manager + IOHIDPointingDevice * hidPointingNub; + IOService * openClient; + + bool isSeized; + UInt32 accelerateMode; + + UInt32 scrollZoomMask; + bool lastScrollWasZoom; + bool scrollOff; + }; + + ExpansionData * _reserved; + + void setPointingMode(UInt32 accelerateMode); + UInt32 getPointingMode (); + void setScrollType(UInt32 scrollType); + UInt32 getScrollType(); + + void dispatchScrollWheelEventWithAccelInfo( + SInt32 deltaAxis1, + SInt32 deltaAxis2, + SInt32 deltaAxis3, + ScrollAccelInfo * info, + AbsoluteTime ts); + + +protected: + virtual void dispatchRelativePointerEvent(int dx, + int dy, + UInt32 buttonState, + AbsoluteTime ts); + + virtual void dispatchAbsolutePointerEvent(IOGPoint * newLoc, + IOGBounds * bounds, + UInt32 buttonState, + bool proximity, + int pressure, + int pressureMin, + int pressureMax, + int stylusAngle, + AbsoluteTime ts); + + virtual void dispatchScrollWheelEvent(short deltaAxis1, + short deltaAxis2, + short deltaAxis3, + AbsoluteTime ts); + +public: + virtual bool init(OSDictionary * properties = 0); + virtual bool start(IOService * provider); + virtual void free(); + + virtual bool open(IOService * client, + IOOptionBits options, + RelativePointerEventAction rpeAction, + AbsolutePointerEventAction apeAction, + ScrollWheelEventAction sweAction); + + bool open( IOService * client, + IOOptionBits options, + void *, + RelativePointerEventCallback rpeCallback, + AbsolutePointerEventCallback apeCallback, + ScrollWheelEventCallback sweCallback); + + virtual void close(IOService * client, IOOptionBits ); + virtual IOReturn message( UInt32 type, IOService * provider, + void * argument = 0 ); + + virtual IOHIDKind hidKind(); + virtual bool updateProperties( void ); + virtual IOReturn setParamProperties( OSDictionary * dict ); + virtual IOReturn powerStateWillChangeTo( IOPMPowerFlags powerFlags, + unsigned long newState, IOService * device); + virtual IOReturn powerStateDidChangeTo( IOPMPowerFlags powerFlags, + unsigned long newState, IOService * device); + +protected: // for subclasses to implement + virtual OSData * copyAccelerationTable(); + virtual IOItemCount buttonCount(); + virtual IOFixed resolution(); + + // RY: Adding method to copy scroll wheel accel table. + // Unfortunately, we don't have any padding, so this + // is going to be non-virtual. + /*virtual*/ OSData * copyScrollAccelerationTable(); + +private: + virtual bool resetPointer(); + virtual void scalePointer(int * dxp, int * dyp); + virtual void setupForAcceleration(IOFixed accl); + + // RY: Adding methods to support scroll wheel accel. + // Unfortunately, we don't have any padding, so these + // are going to be non-virtual. + /*virtual*/ bool resetScroll(); + /*virtual*/ void setupScrollForAcceleration(IOFixed accl); + + // RY: We have to make sure that subclasses that will + // take advantage of this have their defined resolution + // in their property table. + /*virtual*/ IOFixed scrollResolutionForType(SInt32 type=-1); + /*virtual*/ IOFixed scrollReportRate(); + /*virtual*/ OSData * copyScrollAccelerationTableForType(SInt32 type=-1); + +private: + static void _relativePointerEvent( IOHIPointing * self, + int buttons, + /* deltaX */ int dx, + /* deltaY */ int dy, + /* atTime */ AbsoluteTime ts); + + /* Tablet event reporting */ + static void _absolutePointerEvent(IOHIPointing * self, + int buttons, + /* at */ IOGPoint * newLoc, + /* withBounds */ IOGBounds *bounds, + /* inProximity */ bool proximity, + /* withPressure */ int pressure, + /* withAngle */ int stylusAngle, + /* atTime */ AbsoluteTime ts); + + /* Mouse scroll wheel event reporting */ + static void _scrollWheelEvent(IOHIPointing *self, + short deltaAxis1, + short deltaAxis2, + short deltaAxis3, + AbsoluteTime ts); + +}; + +#endif /* !_IOHIPOINTING_H */ diff --git a/i386/include/IOKit/hidsystem/IOLLEvent.h b/i386/include/IOKit/hidsystem/IOLLEvent.h new file mode 100644 index 0000000..53fd70c --- /dev/null +++ b/i386/include/IOKit/hidsystem/IOLLEvent.h @@ -0,0 +1,558 @@ +/* + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2009 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/****************************************************************************** + event.h (PostScript side version) + + CONFIDENTIAL + Copyright (c) 1988 NeXT, Inc. as an unpublished work. + All Rights Reserved. + + Created Leo 01Mar88 + + Modified: + 04May88 Leo Final event types and record + 22Aug88 Leo Change short -> int for window, add reserved + 26May90 Ted Added NX_UNDIMMASK to correct triggering of UndoAutoDim + 12Dec91 Mike Brought into sync with dpsclient/event.h, and fixed + the #ifndef interlock with dpsclient/event.h that was + broken during the Great Header Revision. + + The PostScript version of this file differs from the + Window Kit version in that the coordinates here are + ints instead of floats. +******************************************************************************/ + +#ifndef _DEV_EVENT_H +#define _DEV_EVENT_H + +#include +#include + +#ifdef EVENT_H /* Interlock with dpsclient/event.h */ +#if !defined(_NXSIZE_) /* Work around patch for old event.h in Phase 3 projs*/ +#define _NXSIZE_ 1 /* NXCoord, NXPoint, NXSize decl seen */ +#define _NXSize_ NXSize +#endif /* _NXSIZE_ */ +#else /* EVENT_H */ /* Haven't seen dpsclient/event.h, so define away */ +#define EVENT_H + +#ifdef KERNEL +#else /* KERNEL */ + +#if !defined(_NXSIZE_) /* Work around patch for old event.h in Phase 3 projs*/ +#define _NXSIZE_ 1 /* NXCoord, NXPoint, NXSize decl seen */ +typedef float NXCoord; + +typedef struct _NXPoint { /* point */ + NXCoord x, y; +} NXPoint; + +typedef struct _NXSize { /* size */ + NXCoord width, height; +} NXSize; +#define _NXSize_ NXSize /* Correct usage in event_status_driver.h */ +#endif /* _NXSIZE_ */ + +#endif /* KERNEL */ + +/* Event types */ + +#define NX_NULLEVENT 0 /* internal use */ + +/* mouse events */ + +#define NX_LMOUSEDOWN 1 /* left mouse-down event */ +#define NX_LMOUSEUP 2 /* left mouse-up event */ +#define NX_RMOUSEDOWN 3 /* right mouse-down event */ +#define NX_RMOUSEUP 4 /* right mouse-up event */ +#define NX_MOUSEMOVED 5 /* mouse-moved event */ +#define NX_LMOUSEDRAGGED 6 /* left mouse-dragged event */ +#define NX_RMOUSEDRAGGED 7 /* right mouse-dragged event */ +#define NX_MOUSEENTERED 8 /* mouse-entered event */ +#define NX_MOUSEEXITED 9 /* mouse-exited event */ + +/* other mouse events + * + * event.data.mouse.buttonNumber should contain the + * button number (2-31) changing state. + */ +#define NX_OMOUSEDOWN 25 /* other mouse-down event */ +#define NX_OMOUSEUP 26 /* other mouse-up event */ +#define NX_OMOUSEDRAGGED 27 /* other mouse-dragged event */ + +/* keyboard events */ + +#define NX_KEYDOWN 10 /* key-down event */ +#define NX_KEYUP 11 /* key-up event */ +#define NX_FLAGSCHANGED 12 /* flags-changed event */ + +/* composite events */ + +#define NX_KITDEFINED 13 /* application-kit-defined event */ +#define NX_SYSDEFINED 14 /* system-defined event */ +#define NX_APPDEFINED 15 /* application-defined event */ +/* There are additional DPS client defined events past this point. */ + +/* Scroll wheel events */ + +#define NX_SCROLLWHEELMOVED 22 + +/* Zoom events */ +#define NX_ZOOM 28 + +/* tablet events */ + +#define NX_TABLETPOINTER 23 /* for non-mousing transducers */ +#define NX_TABLETPROXIMITY 24 /* for non-mousing transducers */ + +/* event range */ + +#define NX_FIRSTEVENT 0 +#define NX_LASTEVENT 28 +#define NX_NUMPROCS (NX_LASTEVENT-NX_FIRSTEVENT+1) + +/* Event masks */ +#define NX_NULLEVENTMASK (1 << NX_NULLEVENT) /* NULL event */ +#define NX_LMOUSEDOWNMASK (1 << NX_LMOUSEDOWN) /* left mouse-down */ +#define NX_LMOUSEUPMASK (1 << NX_LMOUSEUP) /* left mouse-up */ +#define NX_RMOUSEDOWNMASK (1 << NX_RMOUSEDOWN) /* right mouse-down */ +#define NX_RMOUSEUPMASK (1 << NX_RMOUSEUP) /* right mouse-up */ +#define NX_OMOUSEDOWNMASK (1 << NX_OMOUSEDOWN) /* other mouse-down */ +#define NX_OMOUSEUPMASK (1 << NX_OMOUSEUP) /* other mouse-up */ +#define NX_MOUSEMOVEDMASK (1 << NX_MOUSEMOVED) /* mouse-moved */ +#define NX_LMOUSEDRAGGEDMASK (1 << NX_LMOUSEDRAGGED) /* left-dragged */ +#define NX_RMOUSEDRAGGEDMASK (1 << NX_RMOUSEDRAGGED) /* right-dragged */ +#define NX_OMOUSEDRAGGEDMASK (1 << NX_OMOUSEDRAGGED) /* other-dragged */ +#define NX_MOUSEENTEREDMASK (1 << NX_MOUSEENTERED) /* mouse-entered */ +#define NX_MOUSEEXITEDMASK (1 << NX_MOUSEEXITED) /* mouse-exited */ +#define NX_KEYDOWNMASK (1 << NX_KEYDOWN) /* key-down */ +#define NX_KEYUPMASK (1 << NX_KEYUP) /* key-up */ +#define NX_FLAGSCHANGEDMASK (1 << NX_FLAGSCHANGED) /* flags-changed */ +#define NX_KITDEFINEDMASK (1 << NX_KITDEFINED) /* kit-defined */ +#define NX_SYSDEFINEDMASK (1 << NX_SYSDEFINED) /* system-defined */ +#define NX_APPDEFINEDMASK (1 << NX_APPDEFINED) /* app-defined */ +#define NX_SCROLLWHEELMOVEDMASK (1 << NX_SCROLLWHEELMOVED) /* scroll wheel moved */ +#define NX_ZOOMMASK (1 << NX_ZOOM) /* Zoom */ +#define NX_TABLETPOINTERMASK (1 << NX_TABLETPOINTER) /* tablet pointer moved */ +#define NX_TABLETPROXIMITYMASK (1 << NX_TABLETPROXIMITY) /* tablet pointer proximity */ + +#define EventCodeMask(type) (1 << (type)) +#define NX_ALLEVENTS -1 /* Check for all events */ + +/* sub types for mouse and move events */ + +#define NX_SUBTYPE_DEFAULT 0 +#define NX_SUBTYPE_TABLET_POINT 1 +#define NX_SUBTYPE_TABLET_PROXIMITY 2 +#define NX_SUBTYPE_MOUSE_TOUCH 3 + +/* sub types for system defined events */ + +#define NX_SUBTYPE_POWER_KEY 1 +#define NX_SUBTYPE_AUX_MOUSE_BUTTONS 7 + +/* + * NX_SUBTYPE_AUX_CONTROL_BUTTONS usage + * + * The incoming NXEvent for other mouse button down/up has event.type + * NX_SYSDEFINED and event.data.compound.subtype NX_SUBTYPE_AUX_MOUSE_BUTTONS. + * Within the event.data.compound.misc.L[0] contains bits for all the buttons + * that have changed state, and event.data.compound.misc.L[1] contains the + * current button state as a bitmask, with 1 representing down, and 0 + * representing up. Bit 0 is the left button, bit one is the right button, + * bit 2 is the center button and so forth. + */ +#define NX_SUBTYPE_AUX_CONTROL_BUTTONS 8 + +#define NX_SUBTYPE_EJECT_KEY 10 +#define NX_SUBTYPE_SLEEP_EVENT 11 +#define NX_SUBTYPE_RESTART_EVENT 12 +#define NX_SUBTYPE_SHUTDOWN_EVENT 13 + +#define NX_SUBTYPE_STICKYKEYS_ON 100 +#define NX_SUBTYPE_STICKYKEYS_OFF 101 +#define NX_SUBTYPE_STICKYKEYS_SHIFT 102 +#define NX_SUBTYPE_STICKYKEYS_CONTROL 103 +#define NX_SUBTYPE_STICKYKEYS_ALTERNATE 104 +#define NX_SUBTYPE_STICKYKEYS_COMMAND 105 +#define NX_SUBTYPE_STICKYKEYS_RELEASE 106 +#define NX_SUBTYPE_STICKYKEYS_TOGGLEMOUSEDRIVING 107 + +// New stickykeys key events +// These were created to send an event describing the +// different state of the modifiers +#define NX_SUBTYPE_STICKYKEYS_SHIFT_DOWN 110 +#define NX_SUBTYPE_STICKYKEYS_CONTROL_DOWN 111 +#define NX_SUBTYPE_STICKYKEYS_ALTERNATE_DOWN 112 +#define NX_SUBTYPE_STICKYKEYS_COMMAND_DOWN 113 +#define NX_SUBTYPE_STICKYKEYS_FN_DOWN 114 + +#define NX_SUBTYPE_STICKYKEYS_SHIFT_LOCK 120 +#define NX_SUBTYPE_STICKYKEYS_CONTROL_LOCK 121 +#define NX_SUBTYPE_STICKYKEYS_ALTERNATE_LOCK 122 +#define NX_SUBTYPE_STICKYKEYS_COMMAND_LOCK 123 +#define NX_SUBTYPE_STICKYKEYS_FN_LOCK 124 + +#define NX_SUBTYPE_STICKYKEYS_SHIFT_UP 130 +#define NX_SUBTYPE_STICKYKEYS_CONTROL_UP 131 +#define NX_SUBTYPE_STICKYKEYS_ALTERNATE_UP 132 +#define NX_SUBTYPE_STICKYKEYS_COMMAND_UP 133 +#define NX_SUBTYPE_STICKYKEYS_FN_UP 134 + + + +// SlowKeys +#define NX_SUBTYPE_SLOWKEYS_START 200 +#define NX_SUBTYPE_SLOWKEYS_ABORT 201 +#define NX_SUBTYPE_SLOWKEYS_END 202 + +// HID Parameter Property Modified +#define NX_SUBTYPE_HIDPARAMETER_MODIFIED 210 + +/* Masks for the bits in event.flags */ + +/* device-independent */ + +#define NX_ALPHASHIFTMASK 0x00010000 +#define NX_SHIFTMASK 0x00020000 +#define NX_CONTROLMASK 0x00040000 +#define NX_ALTERNATEMASK 0x00080000 +#define NX_COMMANDMASK 0x00100000 +#define NX_NUMERICPADMASK 0x00200000 +#define NX_HELPMASK 0x00400000 +#define NX_SECONDARYFNMASK 0x00800000 + +/* device-dependent (really?) */ + +#define NX_DEVICELCTLKEYMASK 0x00000001 +#define NX_DEVICELSHIFTKEYMASK 0x00000002 +#define NX_DEVICERSHIFTKEYMASK 0x00000004 +#define NX_DEVICELCMDKEYMASK 0x00000008 +#define NX_DEVICERCMDKEYMASK 0x00000010 +#define NX_DEVICELALTKEYMASK 0x00000020 +#define NX_DEVICERALTKEYMASK 0x00000040 +#define NX_DEVICERCTLKEYMASK 0x00002000 + +/* + * Additional reserved bits in event.flags + */ + +#define NX_STYLUSPROXIMITYMASK 0x00000080 /* deprecated */ +#define NX_NONCOALSESCEDMASK 0x00000100 + +/* click state values + * If you have the following events in close succession, the click + * field has the indicated value: + * + * Event Click Value Comments + * mouse-down 1 Not part of any click yet + * mouse-up 1 Aha! A click! + * mouse-down 2 Doing a double-click + * mouse-up 2 It's finished + * mouse-down 3 A triple + * mouse-up 3 + */ + +/* Values for the character set in event.data.key.charSet */ + +#define NX_ASCIISET 0 +#define NX_SYMBOLSET 1 +#define NX_DINGBATSSET 2 + +/* tablet button masks + * Mask bits for the tablet barrel buttons placed in tablet.buttons. + * The buttons field uses adopts the following convention: + * + * Bit Comments + * 0 Left Mouse Button ( kHIDUsage_Button_1 ) + * 1 Right Mouse Button ( kHIDUsage_Button_2 ) + * 2 Middle Mouse Button ( kHIDUsage_Button_3 ) + * 3 4th Mouse Button ( kHIDUsage_Button_4 ) + * ... + * 15 15th Mouse Button + * + * For your convenience, the following mask bits have been defined + * for tablet specific application: + */ + +#define NX_TABLET_BUTTON_PENTIPMASK 0x0001 +#define NX_TABLET_BUTTON_PENLOWERSIDEMASK 0x0002 +#define NX_TABLET_BUTTON_PENUPPERSIDEMASK 0x0004 + + +/* tablet capability masks + * Mask bits for the tablet capabilities field. Use these + * masks with the capabilities field of a proximity event to + * determine what fields in a Tablet Event are valid for this + * device. + */ +#define NX_TABLET_CAPABILITY_DEVICEIDMASK 0x0001 +#define NX_TABLET_CAPABILITY_ABSXMASK 0x0002 +#define NX_TABLET_CAPABILITY_ABSYMASK 0x0004 +#define NX_TABLET_CAPABILITY_VENDOR1MASK 0x0008 +#define NX_TABLET_CAPABILITY_VENDOR2MASK 0x0010 +#define NX_TABLET_CAPABILITY_VENDOR3MASK 0x0020 +#define NX_TABLET_CAPABILITY_BUTTONSMASK 0x0040 +#define NX_TABLET_CAPABILITY_TILTXMASK 0x0080 +#define NX_TABLET_CAPABILITY_TILTYMASK 0x0100 +#define NX_TABLET_CAPABILITY_ABSZMASK 0x0200 +#define NX_TABLET_CAPABILITY_PRESSUREMASK 0x0400 +#define NX_TABLET_CAPABILITY_TANGENTIALPRESSUREMASK 0x0800 +#define NX_TABLET_CAPABILITY_ORIENTINFOMASK 0x1000 +#define NX_TABLET_CAPABILITY_ROTATIONMASK 0x2000 + +/* proximity pointer types + * Value that describes the type of pointing device placed in + * proximity.pointerType. + */ + +#define NX_TABLET_POINTER_UNKNOWN 0 +#define NX_TABLET_POINTER_PEN 1 +#define NX_TABLET_POINTER_CURSOR 2 +#define NX_TABLET_POINTER_ERASER 3 + +/* TabletPointData type: defines the tablet data for points included + * in mouse events created by a tablet driver. + */ + +typedef struct _NXTabletPointData { + SInt32 x; /* absolute x coordinate in tablet space at full tablet resolution */ + SInt32 y; /* absolute y coordinate in tablet space at full tablet resolution */ + SInt32 z; /* absolute z coordinate in tablet space at full tablet resolution */ + UInt16 buttons; /* one bit per button - bit 0 is first button - 1 = closed */ + UInt16 pressure; /* scaled pressure value; MAX=(2^16)-1, MIN=0 */ + struct { /* tilt range is -((2^15)-1) to (2^15)-1 (-32767 to 32767) */ + SInt16 x; /* scaled tilt x value */ + SInt16 y; /* scaled tilt y value */ + } tilt; + UInt16 rotation; /* Fixed-point representation of device rotation in a 10.6 format */ + SInt16 tangentialPressure; /* tangential pressure on the device; same range as tilt */ + UInt16 deviceID; /* system-assigned unique device ID */ + SInt16 vendor1; /* vendor-defined signed 16-bit integer */ + SInt16 vendor2; /* vendor-defined signed 16-bit integer */ + SInt16 vendor3; /* vendor-defined signed 16-bit integer */ +} NXTabletPointData, *NXTabletPointDataPtr; + +/* TabletProximityData type: defines the tablet data for proximity + * events included in mouse events created by a tablet driver. + */ + +typedef struct _NXTabletProximityData { + UInt16 vendorID; /* vendor-defined ID - typically the USB vendor ID */ + UInt16 tabletID; /* vendor-defined tablet ID - typically the USB product ID */ + UInt16 pointerID; /* vendor-defined ID of the specific pointing device */ + UInt16 deviceID; /* system-assigned unique device ID */ + UInt16 systemTabletID; /* system-assigned unique tablet ID */ + UInt16 vendorPointerType; /* vendor-defined pointer type */ + UInt32 pointerSerialNumber; /* vendor-defined serial number */ + UInt64 uniqueID __attribute__ ((packed)); /* vendor-defined unique ID */ + UInt32 capabilityMask; /* capabilities mask of the device */ + UInt8 pointerType; /* type of pointing device */ + UInt8 enterProximity; /* non-zero = entering; zero = leaving */ + SInt16 reserved1; +} NXTabletProximityData, *NXTabletProximityDataPtr; + +/* EventData type: defines the data field of an event */ + +typedef union { + struct { /* For mouse-down and mouse-up events */ + UInt8 subx; /* sub-pixel position for x */ + UInt8 suby; /* sub-pixel position for y */ + SInt16 eventNum; /* unique identifier for this button */ + SInt32 click; /* click state of this event */ + UInt8 pressure; /* pressure value: 0=none, 255=full */ + UInt8 buttonNumber;/* button generating other button event (0-31) */ + UInt8 subType; + UInt8 reserved2; + SInt32 reserved3; + union { + NXTabletPointData point; /* tablet point data */ + NXTabletProximityData proximity; /* tablet proximity data */ + } tablet; + } mouse; + struct { + SInt32 dx; + SInt32 dy; + UInt8 subx; + UInt8 suby; + UInt8 subType; + UInt8 reserved1; + SInt32 reserved2; + union { + NXTabletPointData point; /* tablet point data */ + NXTabletProximityData proximity; /* tablet proximity data */ + } tablet; + } mouseMove; + struct { /* For key-down and key-up events */ + UInt16 origCharSet; /* unmodified character set code */ + SInt16 repeat; /* for key-down: nonzero if really a repeat */ + UInt16 charSet; /* character set code */ + UInt16 charCode; /* character code in that set */ + UInt16 keyCode; /* device-dependent key number */ + UInt16 origCharCode; /* unmodified character code */ + SInt32 reserved1; + UInt32 keyboardType; + SInt32 reserved2; + SInt32 reserved3; + SInt32 reserved4; + SInt32 reserved5[4]; + } key; + struct { /* For mouse-entered and mouse-exited events */ + SInt16 reserved; + SInt16 eventNum; /* unique identifier from mouse down event */ + SInt32 trackingNum; /* unique identifier from settrackingrect */ + SInt32 userData; /* uninterpreted integer from settrackingrect */ + SInt32 reserved1; + SInt32 reserved2; + SInt32 reserved3; + SInt32 reserved4; + SInt32 reserved5; + SInt32 reserved6[4]; + } tracking; + struct { + SInt16 deltaAxis1; + SInt16 deltaAxis2; + SInt16 deltaAxis3; + SInt16 reserved1; + SInt32 fixedDeltaAxis1; + SInt32 fixedDeltaAxis2; + SInt32 fixedDeltaAxis3; + SInt32 pointDeltaAxis1; + SInt32 pointDeltaAxis2; + SInt32 pointDeltaAxis3; + SInt32 reserved8[4]; + } scrollWheel, zoom; + struct { /* For window-changed, sys-defined, and app-defined events */ + SInt16 reserved; + SInt16 subType; /* event subtype for compound events */ + union { + float F[11]; /* for use in compound events */ + SInt32 L[11]; /* for use in compound events */ + SInt16 S[22]; /* for use in compound events */ + char C[44]; /* for use in compound events */ + } misc; + } compound; + struct { + SInt32 x; /* absolute x coordinate in tablet space at full tablet resolution */ + SInt32 y; /* absolute y coordinate in tablet space at full tablet resolution */ + SInt32 z; /* absolute z coordinate in tablet space at full tablet resolution */ + UInt16 buttons; /* one bit per button - bit 0 is first button - 1 = closed */ + UInt16 pressure; /* scaled pressure value; MAX=(2^16)-1, MIN=0 */ + struct { /* tilt range is -((2^15)-1) to (2^15)-1 (-32767 to 32767) */ + SInt16 x; /* scaled tilt x value */ + SInt16 y; /* scaled tilt y value */ + } tilt; + UInt16 rotation; /* Fixed-point representation of device rotation in a 10.6 format */ + SInt16 tangentialPressure; /* tangential pressure on the device; same range as tilt */ + UInt16 deviceID; /* system-assigned unique device ID */ + SInt16 vendor1; /* vendor-defined signed 16-bit integer */ + SInt16 vendor2; /* vendor-defined signed 16-bit integer */ + SInt16 vendor3; /* vendor-defined signed 16-bit integer */ + SInt32 reserved[4]; + } tablet; + struct { + UInt16 vendorID; /* vendor-defined ID - typically the USB vendor ID */ + UInt16 tabletID; /* vendor-defined tablet ID - typically the USB product ID */ + UInt16 pointerID; /* vendor-defined ID of the specific pointing device */ + UInt16 deviceID; /* system-assigned unique device ID */ + UInt16 systemTabletID; /* system-assigned unique tablet ID */ + UInt16 vendorPointerType; /* vendor-defined pointer type */ + UInt32 pointerSerialNumber; /* vendor-defined serial number */ + UInt64 uniqueID __attribute__ ((packed)); /* vendor-defined unique ID */ + UInt32 capabilityMask; /* capabilities mask of the device */ + UInt8 pointerType; /* type of pointing device */ + UInt8 enterProximity; /* non-zero = entering; zero = leaving */ + SInt16 reserved1; + SInt32 reserved2[4]; + } proximity; +} NXEventData; + +/* The current version number of the NXEventData structure. */ + +#define kNXEventDataVersion 2 + +/* Finally! The event record! */ +#ifndef __ppc__ +typedef struct _NXEvent { + SInt32 type; /* An event type from above */ + struct { + SInt32 x, y; /* Base coordinates in window, */ + } location; /* from bottom left */ + UInt64 time __attribute__ ((packed)); /* time since launch */ + SInt32 flags; /* key state flags */ + UInt32 window; /* window number of assigned window */ + UInt64 service_id __attribute__ ((packed)); /* service id */ + SInt32 ext_pid; /* external pid */ + NXEventData data; /* type-dependent data */ +} NXEvent, *NXEventPtr; + +#else + +typedef struct _NXEvent { + SInt32 type; /* An event type from above */ + struct { + SInt32 x, y; /* Base coordinates in window, */ + } location; /* from bottom left */ + UInt64 time __attribute__ ((packed)); /* time since launch */ + SInt32 flags; /* key state flags */ + UInt32 window; /* window number of assigned window */ + NXEventData data; /* type-dependent data */ + UInt64 service_id __attribute__ ((packed)); /* service id */ + SInt32 ext_pid; /* external pid */ +} NXEvent, *NXEventPtr; +#endif + +/* The current version number of the NXEvent structure. */ + +#define kNXEventVersion 2 + +/* How to pick window(s) for event (for PostEvent) */ +#define NX_NOWINDOW -1 +#define NX_BYTYPE 0 +#define NX_BROADCAST 1 +#define NX_TOPWINDOW 2 +#define NX_FIRSTWINDOW 3 +#define NX_MOUSEWINDOW 4 +#define NX_NEXTWINDOW 5 +#define NX_LASTLEFT 6 +#define NX_LASTRIGHT 7 +#define NX_LASTKEY 8 +#define NX_EXPLICIT 9 +#define NX_TRANSMIT 10 +#define NX_BYPSCONTEXT 11 + +#endif /* EVENT_H */ /* End of defs common with dpsclient/event.h */ + +/* Mask of events that cause screen to undim */ + +#define NX_UNDIMMASK (NX_KEYDOWNMASK | NX_KEYUPMASK | \ + NX_LMOUSEDOWNMASK | NX_LMOUSEUPMASK | \ + NX_RMOUSEDOWNMASK | NX_RMOUSEUPMASK | \ + NX_MOUSEMOVEDMASK | NX_FLAGSCHANGEDMASK | \ + NX_MOUSEENTEREDMASK | NX_MOUSEEXITEDMASK | \ + NX_LMOUSEDRAGGEDMASK | NX_RMOUSEDRAGGEDMASK | \ + NX_SCROLLWHEELMOVEDMASK | NX_TABLETPOINTERMASK | \ + NX_TABLETPROXIMITYMASK | NX_NULLEVENTMASK) + +#endif /* !_DEV_EVENT_H */ + diff --git a/i386/include/IOKit/hidsystem/ev_keymap.h b/i386/include/IOKit/hidsystem/ev_keymap.h new file mode 100644 index 0000000..a94cf11 --- /dev/null +++ b/i386/include/IOKit/hidsystem/ev_keymap.h @@ -0,0 +1,166 @@ +/* + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. + * + * ev_keymap.h + * Defines the structure used for parsing keymappings. These structures + * and definitions are used by event sources in the kernel and by + * applications and utilities which manipulate keymaps. + * + * HISTORY + * 02-Jun-1992 Mike Paquette at NeXT + * Created. + */ + +#ifndef _DEV_EV_KEYMAP_H +#define _DEV_EV_KEYMAP_H + +#define NX_NUMKEYCODES 256 /* Highest key code is 0xff. ADB used to use 0x80 for keydown state, but who the heck uses adb anymore. */ +#define NX_NUMSEQUENCES 128 /* Maximum possible number of sequences */ +#define NX_NUMMODIFIERS 16 /* Maximum number of modifier bits */ +#define NX_BYTE_CODES 0 /* If first short 0, all are bytes (else shorts) */ + +#define NX_WHICHMODMASK 0x0f /* bits out of keyBits for bucky bits */ +#define NX_MODMASK 0x10 /* Bit out of keyBits indicates modifier bit */ +#define NX_CHARGENMASK 0x20 /* bit out of keyBits for char gen */ +#define NX_SPECIALKEYMASK 0x40 /* bit out of keyBits for specialty key */ +#define NX_KEYSTATEMASK 0x80 /* OBSOLETE - DO NOT USE IN NEW DESIGNS */ + +/* + * Special keys currently known to and understood by the system. + * If new specialty keys are invented, extend this list as appropriate. + * The presence of these keys in a particular implementation is not + * guaranteed. + */ +#define NX_NOSPECIALKEY 0xFFFF +#define NX_KEYTYPE_SOUND_UP 0 +#define NX_KEYTYPE_SOUND_DOWN 1 +#define NX_KEYTYPE_BRIGHTNESS_UP 2 +#define NX_KEYTYPE_BRIGHTNESS_DOWN 3 +#define NX_KEYTYPE_CAPS_LOCK 4 +#define NX_KEYTYPE_HELP 5 +#define NX_POWER_KEY 6 +#define NX_KEYTYPE_MUTE 7 +#define NX_UP_ARROW_KEY 8 +#define NX_DOWN_ARROW_KEY 9 +#define NX_KEYTYPE_NUM_LOCK 10 + +#define NX_KEYTYPE_CONTRAST_UP 11 +#define NX_KEYTYPE_CONTRAST_DOWN 12 +#define NX_KEYTYPE_LAUNCH_PANEL 13 +#define NX_KEYTYPE_EJECT 14 +#define NX_KEYTYPE_VIDMIRROR 15 + +#define NX_KEYTYPE_PLAY 16 +#define NX_KEYTYPE_NEXT 17 +#define NX_KEYTYPE_PREVIOUS 18 +#define NX_KEYTYPE_FAST 19 +#define NX_KEYTYPE_REWIND 20 + +#define NX_KEYTYPE_ILLUMINATION_UP 21 +#define NX_KEYTYPE_ILLUMINATION_DOWN 22 +#define NX_KEYTYPE_ILLUMINATION_TOGGLE 23 + +#define NX_NUMSPECIALKEYS 24 /* Maximum number of special keys */ +#define NX_NUM_SCANNED_SPECIALKEYS 24 /* First 24 special keys are */ + /* actively scanned in kernel */ + +/* Mask of special keys that are posted as events */ + +#define NX_SPECIALKEY_POST_MASK \ + ((1 << NX_KEYTYPE_SOUND_UP) | (1 << NX_KEYTYPE_SOUND_DOWN) | \ + (1 << NX_POWER_KEY) | (1 << NX_KEYTYPE_MUTE) | \ + (1 << NX_KEYTYPE_BRIGHTNESS_UP) | (1 << NX_KEYTYPE_BRIGHTNESS_DOWN) | \ + (1 << NX_KEYTYPE_CONTRAST_UP) | (1 << NX_KEYTYPE_CONTRAST_UP) | \ + (1 << NX_KEYTYPE_LAUNCH_PANEL) | (1 << NX_KEYTYPE_EJECT) | \ + (1 << NX_KEYTYPE_VIDMIRROR) | (1 << NX_KEYTYPE_PLAY) | \ + (1 << NX_KEYTYPE_NEXT) | (1 << NX_KEYTYPE_PREVIOUS) | \ + (1 << NX_KEYTYPE_FAST) | (1 << NX_KEYTYPE_REWIND) | \ + (1 << NX_KEYTYPE_ILLUMINATION_UP) | \ + (1 << NX_KEYTYPE_ILLUMINATION_DOWN) | \ + (1 << NX_KEYTYPE_ILLUMINATION_TOGGLE) | 0) + +/* Modifier key indices into modDefs[] */ +#define NX_MODIFIERKEY_ALPHALOCK 0 +#define NX_MODIFIERKEY_SHIFT 1 +#define NX_MODIFIERKEY_CONTROL 2 +#define NX_MODIFIERKEY_ALTERNATE 3 +#define NX_MODIFIERKEY_COMMAND 4 +#define NX_MODIFIERKEY_NUMERICPAD 5 +#define NX_MODIFIERKEY_HELP 6 +#define NX_MODIFIERKEY_SECONDARYFN 7 +#define NX_MODIFIERKEY_NUMLOCK 8 + +/* support for right hand modifier */ +#define NX_MODIFIERKEY_RSHIFT 9 +#define NX_MODIFIERKEY_RCONTROL 10 +#define NX_MODIFIERKEY_RALTERNATE 11 +#define NX_MODIFIERKEY_RCOMMAND 12 + + +typedef struct _NXParsedKeyMapping_ { + /* If nonzero, all numbers are shorts; if zero, all numbers are bytes*/ + short shorts; + + /* + * For each keycode, low order bit says if the key + * generates characters. + * High order bit says if the key is assigned to a modifier bit. + * The second to low order bit gives the current state of the key. + */ + char keyBits[NX_NUMKEYCODES]; + + /* Bit number of highest numbered modifier bit */ + int maxMod; + + /* Pointers to where the list of keys for each modifiers bit begins, + * or NULL. + */ + unsigned char *modDefs[NX_NUMMODIFIERS]; + + /* Key code of highest key deinfed to generate characters */ + int numDefs; + + /* Pointer into the keyMapping where this key's definitions begin */ + unsigned char *keyDefs[NX_NUMKEYCODES]; + + /* number of sequence definitions */ + int numSeqs; + + /* pointers to sequences */ + unsigned char *seqDefs[NX_NUMSEQUENCES]; + + /* Special key definitions */ + int numSpecialKeys; + + /* Special key values, or 0xFFFF if none */ + unsigned short specialKeys[NX_NUMSPECIALKEYS]; + + /* Pointer to the original keymapping string */ + const unsigned char *mapping; + + /* Length of the original string */ + int mappingLen; +} NXParsedKeyMapping; + +#endif /* !_DEV_EV_KEYMAP_H */ diff --git a/i386/include/IOKit/i2c/IOI2CInterface.h b/i386/include/IOKit/i2c/IOI2CInterface.h new file mode 100644 index 0000000..70a38e2 --- /dev/null +++ b/i386/include/IOKit/i2c/IOI2CInterface.h @@ -0,0 +1,262 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOI2CINTERFACE_H +#define _IOKIT_IOI2CINTERFACE_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +typedef struct IOI2CRequest IOI2CRequest; +typedef struct IOI2CBuffer IOI2CBuffer; + +typedef void (*IOI2CRequestCompletion) (IOI2CRequest * request); + +// IOI2CRequest.sendTransactionType, IOI2CRequest.replyTransactionType +enum { + kIOI2CNoTransactionType = 0, + kIOI2CSimpleTransactionType = 1, + kIOI2CDDCciReplyTransactionType = 2, + kIOI2CCombinedTransactionType = 3, + kIOI2CDisplayPortNativeTransactionType = 4 +}; + +// IOI2CRequest.commFlags +enum { + kIOI2CUseSubAddressCommFlag = 0x00000002 +}; + +/*! + * @struct IOI2CRequest + * @abstract A structure defining an I2C bus transaction. + * @discussion This structure is used to request an I2C transaction consisting of a send (write) to and reply (read) from a device, either of which is optional, to be carried out atomically on an I2C bus. + * @field __reservedA Set to zero. + * @field result The result of the transaction. Common errors are kIOReturnNoDevice if there is no device responding at the given address, kIOReturnUnsupportedMode if the type of transaction is unsupported on the requested bus. + * @field completion A completion routine to be executed when the request completes. If NULL is passed, the request is synchronous, otherwise it may execute asynchronously. + * @field commFlags Flags that modify the I2C transaction type. The following flags are defined:
+ * kIOI2CUseSubAddressCommFlag Transaction includes a subaddress.
+ * @field minReplyDelay Minimum delay as absolute time between send and reply transactions. + * @field sendAddress I2C address to write. + * @field sendSubAddress I2C subaddress to write. + * @field __reservedB Set to zero. + * @field sendTransactionType The following types of transaction are defined for the send part of the request:
+ * kIOI2CNoTransactionType No send transaction to perform.
+ * kIOI2CSimpleTransactionType Simple I2C message.
+ * kIOI2CCombinedTransactionType Combined format I2C R/~W transaction.
+ * @field sendBuffer Pointer to the send buffer. + * @field sendBytes Number of bytes to send. Set to actual bytes sent on completion of the request. + * @field replyAddress I2C Address from which to read. + * @field replySubAddress I2C Address from which to read. + * @field __reservedC Set to zero. + * @field replyTransactionType The following types of transaction are defined for the reply part of the request:
+ * kIOI2CNoTransactionType No reply transaction to perform.
+ * kIOI2CSimpleTransactionType Simple I2C message.
+ * kIOI2CDDCciReplyTransactionType DDC/ci message (with embedded length). See VESA DDC/ci specification.
+ * kIOI2CCombinedTransactionType Combined format I2C R/~W transaction.
+ * @field replyBuffer Pointer to the reply buffer. + * @field replyBytes Max bytes to reply (size of replyBuffer). Set to actual bytes received on completion of the request. + * @field __reservedD Set to zero. + */ + +#pragma pack(push, 4) +struct IOI2CRequest +{ + IOOptionBits sendTransactionType; + IOOptionBits replyTransactionType; + uint32_t sendAddress; + uint32_t replyAddress; + uint8_t sendSubAddress; + uint8_t replySubAddress; + uint8_t __reservedA[2]; + + uint64_t minReplyDelay; + + IOReturn result; + IOOptionBits commFlags; + +#if defined(__LP64__) + uint32_t __padA; +#else + vm_address_t sendBuffer; +#endif + uint32_t sendBytes; + + uint32_t __reservedB[2]; + +#if defined(__LP64__) + uint32_t __padB; +#else + vm_address_t replyBuffer; +#endif + uint32_t replyBytes; + + IOI2CRequestCompletion completion; +#if !defined(__LP64__) + uint32_t __padC[5]; +#else + vm_address_t sendBuffer; + vm_address_t replyBuffer; +#endif + + uint32_t __reservedC[10]; +#ifdef __ppc__ + uint32_t __reservedD; +#endif +}; +#pragma pack(pop) + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#define kIOI2CInterfaceClassName "IOI2CInterface" + +#define kIOI2CInterfaceIDKey "IOI2CInterfaceID" +#define kIOI2CBusTypeKey "IOI2CBusType" +#define kIOI2CTransactionTypesKey "IOI2CTransactionTypes" +#define kIOI2CSupportedCommFlagsKey "IOI2CSupportedCommFlags" + +#define kIOFBI2CInterfaceInfoKey "IOFBI2CInterfaceInfo" +#define kIOFBI2CInterfaceIDsKey "IOFBI2CInterfaceIDs" + +// kIOI2CBusTypeKey values +enum { + kIOI2CBusTypeI2C = 1, + kIOI2CBusTypeDisplayPort = 2 +}; + +/*! + * @struct IOI2CBusTiming + * @abstract A structure defining low level timing for an I2C bus. + * @discussion This structure is used to specify timeouts and pulse widths for an I2C bus implementation. + * @field bitTimeout Maximum time a slave can delay (by pulling the clock line low) a single bit response. + * @field byteTimeout Maximum time a slave can delay (by pulling the clock line low) the first bit of a byte response. + * @field acknowledgeTimeout Maximum time to wait for a slave to respond with an ACK after writing a byte. + * @field startTimeout Maximum time to wait for a slave to respond after a start signal. + * @field riseFallTime Time to wait after any change in output signal. + * @field __reservedA Set to zero. + */ + +struct IOI2CBusTiming +{ + AbsoluteTime bitTimeout; + AbsoluteTime byteTimeout; + AbsoluteTime acknowledgeTimeout; + AbsoluteTime startTimeout; + AbsoluteTime holdTime; + AbsoluteTime riseFallTime; + UInt32 __reservedA[8]; +}; +typedef struct IOI2CBusTiming IOI2CBusTiming; + +#ifndef KERNEL + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +// options for IOFBCopyI2CInterfaceForBus() +enum { + kIOI2CBusNumberMask = 0x000000ff +}; + + +/*! @function IOFBGetI2CInterfaceCount + @abstract Returns a count of I2C interfaces available associated with an IOFramebuffer instance. + @discussion Returns a count of I2C interfaces available associated with an IOFramebuffer instance. + @param framebuffer The io_service_t of an IOFramebuffer instance. CoreGraphics will provide this for a CGDisplay with the CGDisplayIOServicePort() call. + @param count Interface count is returned. + @result An IOReturn code. */ + +IOReturn IOFBGetI2CInterfaceCount( io_service_t framebuffer, IOItemCount * count ); + +/*! @function IOFBCopyI2CInterfaceForBus + @abstract Returns an instance of an I2C bus interface, associated with an IOFramebuffer instance / bus index pair. + @discussion Some graphics devices will allow access to an I2C bus routed through a display connector in order to control external devices on that bus. This function returns an instance of an I2C bus interface, associated with an IOFramebuffer instance / bus index pair. The number of I2C buses is available from the IOFBGetI2CInterfaceCount() call. The interface may be used with the IOI2CInterfaceOpen/Close/SendRequest() calls to carry out I2C transactions on that bus. Not all graphics devices support this functionality. + @param bus The zero based index of the bus on the requested framebuffer. + @param interface The interface instance is returned. The caller should release this instance with IOObjectRelease(). + @result An IOReturn code. */ + +IOReturn IOFBCopyI2CInterfaceForBus( io_service_t framebuffer, IOOptionBits bus, io_service_t * interface ); + +typedef struct IOI2CConnect * IOI2CConnectRef; /* struct IOI2CConnect is opaque */ + +IOReturn IOI2CCopyInterfaceForID( CFTypeRef identifier, io_service_t * interface ); + +/*! @function IOI2CInterfaceOpen + @abstract Opens an instance of an I2C bus interface, allowing I2C requests to be made. + @discussion An instance of an I2C bus interface, obtained by IOFBCopyI2CInterfaceForBus, is opened with this function allowing I2C requests to be made. + @param interface An I2C bus interface (see IOFBCopyI2CInterfaceForBus). The interface may be released after this call is made. + @param options Pass kNilOptions. + @param connect The opaque IOI2CConnectRef is returned, for use with IOI2CSendRequest() and IOI2CInterfaceClose(). + @result An IOReturn code. */ + +IOReturn IOI2CInterfaceOpen( io_service_t interface, IOOptionBits options, + IOI2CConnectRef * connect ); + +/*! @function IOI2CInterfaceClose + @abstract Closes an IOI2CConnectRef. + @discussion Frees the resources associated with an IOI2CConnectRef. + @param connect The opaque IOI2CConnectRef returned by IOI2CInterfaceOpen(). + @param options Pass kNilOptions. + @result An IOReturn code. */ + +IOReturn IOI2CInterfaceClose( IOI2CConnectRef connect, IOOptionBits options ); + +/*! @function IOI2CSendRequest + @abstract Carries out the I2C transaction specified by an IOI2CRequest structure. + @discussion Frees the resources associated with an IOI2CConnectRef. + @param connect The opaque IOI2CConnectRef returned by IOI2CInterfaceOpen(). + @param options Pass kNilOptions. + @param request Pass a pointer to a IOI2CRequest structure describing the request. If an asynchronous request (with a non-NULL completion routine) the request structure must be valid for the life of the request. + @result An IOReturn code reflecting only the result of starting the transaction. If the result of IOI2CSendRequest() is kIOReturnSuccess, the I2C transaction result is returned in the result field of the request structure. */ + +IOReturn IOI2CSendRequest( IOI2CConnectRef connect, IOOptionBits options, + IOI2CRequest * request ); + +#else + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/*! @class IOI2CInterface + @abstract The base class for an I2C bus interface. + @discussion The IOI2CInterface base class defines an I2C bus interface. Not useful for developers. */ + +class IOI2CInterface : public IOService +{ + OSDeclareDefaultStructors(IOI2CInterface) + +protected: + UInt64 fID; + +public: + IOReturn newUserClient( task_t owningTask, + void * security_id, + UInt32 type, + IOUserClient ** handler ); + + bool registerI2C( UInt64 id ); + + virtual IOReturn startIO( IOI2CRequest * request ) = 0; +}; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#endif /* KERNEL */ + +#endif /* ! _IOKIT_IOI2CINTERFACE_H */ + diff --git a/i386/include/IOKit/ndrvsupport/IOMacOSTypes.h b/i386/include/IOKit/ndrvsupport/IOMacOSTypes.h new file mode 100644 index 0000000..0a2aae7 --- /dev/null +++ b/i386/include/IOKit/ndrvsupport/IOMacOSTypes.h @@ -0,0 +1,441 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1997 Apple Computer, Inc. + * + * + * HISTORY + * + * sdouglas 22 Oct 97 - first checked in. + * sdouglas 21 July 98 - start IOKit + */ + +/* + File: Types.h + + Contains: Basic Macintosh data types. + + Version: Technology: PowerSurge 1.0.2. + Package: Universal Interfaces 2.1.2 on ETO #20 + + Copyright: � 1984-1995 by Apple Computer, Inc. + All rights reserved. + + Bugs?: If you find a problem with this file, use the Apple Bug Reporter + stack. Include the file and version information (from above) + in the problem description and send to: + Internet: apple.bugs@applelink.apple.com + AppleLink: APPLE.BUGS + +*/ + +#ifndef _IOKIT_IOMACOSTYPES_H +#define _IOKIT_IOMACOSTYPES_H +#ifndef __MACTYPES__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __LP64__ +#pragma options align=mac68k +#endif + +#ifndef NULL +#if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C)) +#define NULL ((void *) 0) +#else +#define NULL 0 +#endif +#endif + +enum { + noErr = 0 +}; + +typedef uintptr_t KernelProcessID; +typedef uintptr_t AddressSpaceID; + +#if 0 +#ifndef __cplusplus +enum { false, true }; +#endif +#endif + +typedef unsigned char Byte; + +typedef signed char SignedByte; + +typedef UInt16 UniChar; + +typedef char *Ptr; + +typedef Ptr *Handle; + +typedef UInt32 Fixed; + +typedef Fixed *FixedPtr; + +typedef UInt32 Fract; + +typedef Fract *FractPtr; + +struct _extended80 { + short exp; + short man[4]; +}; +struct _extended96 { + short exp[2]; + short man[4]; +}; +typedef struct wide *WidePtr; + +typedef struct UnsignedWide *UnsignedWidePtr; + + +/* +enum { + false, + true +}; +#if !__option(bool) + #ifndef true + #define true 1 + #endif + #ifndef false + #define false 0 + #endif +#endif + +typedef unsigned char Boolean; +*/ + + +typedef short OSErr; + +typedef unsigned int FourCharCode; + +typedef FourCharCode OSType; + +typedef FourCharCode ResType; + +typedef OSType *OSTypePtr; + +typedef ResType *ResTypePtr; + +struct Rect { + short top; + short left; + short bottom; + short right; +}; +typedef struct Rect Rect; + +typedef Rect *RectPtr; + +// Quickdraw.i + +/* + kVariableLengthArray is used in array bounds to specify a variable length array. + It is ususally used in variable length structs when the last field is an array + of any size. Before ANSI C, we used zero as the bounds of variable length + array, but that is illegal in ANSI C. Example: + + struct FooList + { + short listLength; + Foo elements[kVariableLengthArray]; + }; +*/ + +enum { + kVariableLengthArray = 1 +}; + +/* Numeric version part of 'vers' resource */ +struct NumVersion { + UInt8 majorRev; /*1st part of version number in BCD*/ + UInt8 minorAndBugRev; /*2nd & 3rd part of version number share a byte*/ + UInt8 stage; /*stage code: dev, alpha, beta, final*/ + UInt8 nonRelRev; /*revision level of non-released version*/ +}; +typedef struct NumVersion NumVersion; + +typedef struct OpaqueRef *KernelID; + +typedef UInt8 *BytePtr; + +typedef IOByteCount ByteCount; + +typedef IOItemCount ItemCount; + +typedef void *LogicalAddress; + +#if !defined(__LP64__) +typedef void *PhysicalAddress; +#endif + +typedef UInt32 PBVersion; + +typedef SInt32 Duration; + +#define kInvalidID 0 + +enum { + kNilOptions = 0 +}; + + +typedef unsigned char Str31[32]; + + +/* +From: + File: DriverFamilyMatching.i <18> + Copyright: � 1995-1996 by Apple Computer, Inc., all rights reserved. +*/ + +//############################################## +// Well known properties in the Name Registry +//############################################## + +#define kPropertyName "name" +#define kPropertyCompatible "compatible" +#define kPropertyDriverPtr "driver-ptr" +#define kPropertyDriverDesc "driver-description" +#define kPropertyReg "reg" +#define kPropertyAAPLAddress "AAPL,address" +#define kPropertyMatching "matching" + + +//######################################################### +// Descriptor for Drivers and NDRVs +//######################################################### +/* Driver Typing Information Used to Match Drivers With Devices */ +struct DriverType { + Str31 nameInfoStr; /* Driver Name/Info String*/ + NumVersion version; /* Driver Version Number*/ +}; +typedef struct DriverType DriverType; +typedef DriverType * DriverTypePtr; + +/* OS Runtime Information Used to Setup and Maintain a Driver's Runtime Environment */ +typedef OptionBits RuntimeOptions; + + +enum { + kDriverIsLoadedUponDiscovery = 0x00000001, /* auto-load driver when discovered*/ + kDriverIsOpenedUponLoad = 0x00000002, /* auto-open driver when loaded*/ + kDriverIsUnderExpertControl = 0x00000004, /* I/O expert handles loads/opens*/ + kDriverIsConcurrent = 0x00000008, /* supports concurrent requests*/ + kDriverQueuesIOPB = 0x00000010, /* device manager doesn't queue IOPB*/ + kDriverIsLoadedAtBoot = 0x00000020, /* Driver is loaded at the boot time */ + kDriverIsForVirtualDevice = 0x00000040, /* Driver is for a virtual Device */ + kDriverSupportDMSuspendAndResume = 0x00000080 /* Driver supports Device Manager Suspend and Resume command */ +}; + +struct DriverOSRuntime { + RuntimeOptions driverRuntime; /* Options for OS Runtime*/ + Str31 driverName; /* Driver's name to the OS*/ + UInt32 driverDescReserved[8]; /* Reserved area*/ +}; +typedef struct DriverOSRuntime DriverOSRuntime; +typedef DriverOSRuntime * DriverOSRuntimePtr; + +/* OS Service Information Used To Declare What APIs a Driver Supports */ +typedef UInt32 ServiceCount; + +struct DriverServiceInfo { + OSType serviceCategory; /* Service Category Name*/ + OSType serviceType; /* Type within Category*/ + NumVersion serviceVersion; /* Version of service*/ +}; +typedef struct DriverServiceInfo DriverServiceInfo; +typedef DriverServiceInfo * DriverServiceInfoPtr; + +struct DriverOSService { + ServiceCount nServices; /* Number of Services Supported*/ + DriverServiceInfo service[1]; /* The List of Services (at least one)*/ +}; +typedef struct DriverOSService DriverOSService; +typedef DriverOSService * DriverOSServicePtr; + +/* Categories */ + +enum { + kServiceCategoryDisplay = 'disp', /* Display Manager*/ + kServiceCategoryOpenTransport = 'otan', /* Open Transport*/ + kServiceCategoryBlockStorage = 'blok', /* Block Storage*/ + kServiceCategoryNdrvDriver = 'ndrv', /* Generic Native Driver*/ + kServiceCategoryScsiSIM = 'scsi', /* SCSI */ + kServiceCategoryFileManager = 'file', /* File Manager */ + kServiceCategoryIDE = 'ide-', /* ide */ + kServiceCategoryADB = 'adb-', /* adb */ + kServiceCategoryPCI = 'pci-', /* pci bus */ + /* Nu Bus */ + kServiceCategoryDFM = 'dfm-', /* DFM */ + kServiceCategoryMotherBoard = 'mrbd', /* mother Board */ + kServiceCategoryKeyboard = 'kybd', /* Keyboard */ + kServiceCategoryPointing = 'poit', /* Pointing */ + kServiceCategoryRTC = 'rtc-', /* RTC */ + kServiceCategoryNVRAM = 'nram', /* NVRAM */ + kServiceCategorySound = 'sond', /* Sound (1/3/96 MCS) */ + kServiceCategoryPowerMgt = 'pgmt', /* Power Management */ + kServiceCategoryGeneric = 'genr' /* Generic Service Category to receive general Events */ +}; + +/* Ndrv ServiceCategory Types */ +enum { + kNdrvTypeIsGeneric = 'genr', /* generic*/ + kNdrvTypeIsVideo = 'vido', /* video*/ + kNdrvTypeIsBlockStorage = 'blok', /* block storage*/ + kNdrvTypeIsNetworking = 'netw', /* networking*/ + kNdrvTypeIsSerial = 'serl', /* serial*/ + kNdrvTypeIsParallel = 'parl', /* parallel */ + kNdrvTypeIsSound = 'sond', /* sound*/ + kNdrvTypeIsBusBridge = 'brdg' +}; + +typedef UInt32 DriverDescVersion; + +/* The Driver Description */ +enum { + kInitialDriverDescriptor = 0, + kVersionOneDriverDescriptor = 1 +}; + +enum { + kTheDescriptionSignature = 'mtej', + kDriverDescriptionSignature = 'pdes' +}; + + +struct DriverDescription { + OSType driverDescSignature; /* Signature field of this structure*/ + DriverDescVersion driverDescVersion; /* Version of this data structure*/ + DriverType driverType; /* Type of Driver*/ + DriverOSRuntime driverOSRuntimeInfo; /* OS Runtime Requirements of Driver*/ + DriverOSService driverServices; /* Apple Service API Membership*/ +}; +typedef struct DriverDescription DriverDescription; +typedef DriverDescription * DriverDescriptionPtr; + + +#ifndef __LP64__ +#pragma options align=reset +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __MACTYPES__ */ + +#ifndef __QUICKDRAW__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __LP64__ +#pragma options align=mac68k +#endif + +struct RGBColor { + unsigned short red; /*magnitude of red component*/ + unsigned short green; /*magnitude of green component*/ + unsigned short blue; /*magnitude of blue component*/ +}; +typedef struct RGBColor RGBColor; +typedef RGBColor *RGBColorPtr; +typedef RGBColorPtr *RGBColorHdl; + +struct ColorSpec { + short value; /*index or other value*/ + RGBColor rgb; /*true color*/ +}; + +typedef struct ColorSpec ColorSpec; +typedef ColorSpec *ColorSpecPtr; + +struct GammaTbl { + short gVersion; /*gamma version number*/ + short gType; /*gamma data type*/ + short gFormulaSize; /*Formula data size*/ + short gChanCnt; /*number of channels of data*/ + short gDataCnt; /*number of values/channel*/ + short gDataWidth; /*bits/corrected value (data packed to next larger byte size)*/ + short gFormulaData[1]; /*data for formulas followed by gamma values*/ +}; +typedef struct GammaTbl GammaTbl; +typedef GammaTbl *GammaTblPtr; + +struct RegEntryID +{ + void * opaque[4]; +}; +typedef struct RegEntryID RegEntryID; +typedef RegEntryID * RegEntryIDPtr; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +struct IONDRVControlParameters { + UInt8 __reservedA[0x1a]; + UInt16 code; + void * params; + UInt8 __reservedB[0x12]; +}; + +enum { + kIONDRVOpenCommand = 128 + 0, + kIONDRVCloseCommand = 128 + 1, + kIONDRVReadCommand = 128 + 2, + kIONDRVWriteCommand = 128 + 3, + kIONDRVControlCommand = 128 + 4, + kIONDRVStatusCommand = 128 + 5, + kIONDRVKillIOCommand = 128 + 6, + kIONDRVInitializeCommand = 128 + 7, /* init driver and device*/ + kIONDRVFinalizeCommand = 128 + 8, /* shutdown driver and device*/ + kIONDRVReplaceCommand = 128 + 9, /* replace an old driver*/ + kIONDRVSupersededCommand = 128 + 10 /* prepare to be replaced by a new driver*/ +}; +enum { + kIONDRVSynchronousIOCommandKind = 0x00000001, + kIONDRVAsynchronousIOCommandKind = 0x00000002, + kIONDRVImmediateIOCommandKind = 0x00000004 +}; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef __LP64__ +#pragma options align=reset +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __QUICKDRAW__ */ + +#endif /* _IOKIT_IOMACOSTYPES_H */ diff --git a/i386/include/IOKit/ndrvsupport/IOMacOSVideo.h b/i386/include/IOKit/ndrvsupport/IOMacOSVideo.h new file mode 100644 index 0000000..795072b --- /dev/null +++ b/i386/include/IOKit/ndrvsupport/IOMacOSVideo.h @@ -0,0 +1,1391 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + File: Video.h + + Contains: Video Driver Interfaces. + + Copyright: (c) 1986-2000 by Apple Computer, Inc., all rights reserved + + Bugs?: For bug reports, consult the following page on + the World Wide Web: + + http://developer.apple.com/bugreporter/ + +*/ +#ifndef __IOMACOSVIDEO__ +#define __IOMACOSVIDEO__ + +#define PRAGMA_STRUCT_ALIGN 1 +#define FOUR_CHAR_CODE(x) (x) +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __LP64__ +#pragma options align=mac68k +#endif + +enum { + mBaseOffset = 1, /*Id of mBaseOffset.*/ + mRowBytes = 2, /*Video sResource parameter Id's */ + mBounds = 3, /*Video sResource parameter Id's */ + mVersion = 4, /*Video sResource parameter Id's */ + mHRes = 5, /*Video sResource parameter Id's */ + mVRes = 6, /*Video sResource parameter Id's */ + mPixelType = 7, /*Video sResource parameter Id's */ + mPixelSize = 8, /*Video sResource parameter Id's */ + mCmpCount = 9, /*Video sResource parameter Id's */ + mCmpSize = 10, /*Video sResource parameter Id's */ + mPlaneBytes = 11, /*Video sResource parameter Id's */ + mVertRefRate = 14, /*Video sResource parameter Id's */ + mVidParams = 1, /*Video parameter block id.*/ + mTable = 2, /*Offset to the table.*/ + mPageCnt = 3, /*Number of pages*/ + mDevType = 4, /*Device Type*/ + oneBitMode = 128, /*Id of OneBitMode Parameter list.*/ + twoBitMode = 129, /*Id of TwoBitMode Parameter list.*/ + fourBitMode = 130, /*Id of FourBitMode Parameter list.*/ + eightBitMode = 131 /*Id of EightBitMode Parameter list.*/ +}; + +enum { + sixteenBitMode = 132, /*Id of SixteenBitMode Parameter list.*/ + thirtyTwoBitMode = 133, /*Id of ThirtyTwoBitMode Parameter list.*/ + firstVidMode = 128, /*The new, better way to do the above. */ + secondVidMode = 129, /* QuickDraw only supports six video */ + thirdVidMode = 130, /* at this time. */ + fourthVidMode = 131, + fifthVidMode = 132, + sixthVidMode = 133, + spGammaDir = 64, + spVidNamesDir = 65 +}; + +typedef UInt32 AVIDType; +typedef AVIDType DisplayIDType; +typedef IODisplayModeID DisplayModeID; +typedef UInt16 DepthMode; +typedef UInt32 VideoDeviceType; +typedef UInt32 GammaTableID; + +/* csTimingFormat values in VDTimingInfo */ +/* look in the declaration rom for timing info */ +enum { + kDeclROMtables = FOUR_CHAR_CODE('decl'), + kDetailedTimingFormat = FOUR_CHAR_CODE('arba') /* Timing is a detailed timing*/ +}; + +/* Size of a block of EDID (Extended Display Identification Data) */ +enum { + kDDCBlockSize = 128 +}; + +/* ddcBlockType constants*/ +enum { + kDDCBlockTypeEDID = 0 /* EDID block type. */ +}; + +/* ddcFlags constants*/ +enum { + kDDCForceReadBit = 0, /* Force a new read of the EDID. */ + kDDCForceReadMask = (1 << kDDCForceReadBit) /* Mask for kddcForceReadBit. */ +}; + + +/* Timing mode constants for Display Manager MultiMode support + Corresponding .h equates are in Video.h + .a equates are in Video.a + .r equates are in DepVideoEqu.r + + The second enum is the old names (for compatibility). + The first enum is the new names. +*/ +enum { + timingInvalid = 0, /* Unknown timing... force user to confirm. */ + timingInvalid_SM_T24 = 8, /* Work around bug in SM Thunder24 card.*/ + timingApple_FixedRateLCD = 42, /* Lump all fixed-rate LCDs into one category.*/ + timingApple_512x384_60hz = 130, /* 512x384 (60 Hz) Rubik timing. */ + timingApple_560x384_60hz = 135, /* 560x384 (60 Hz) Rubik-560 timing. */ + timingApple_640x480_67hz = 140, /* 640x480 (67 Hz) HR timing. */ + timingApple_640x400_67hz = 145, /* 640x400 (67 Hz) HR-400 timing. */ + timingVESA_640x480_60hz = 150, /* 640x480 (60 Hz) VGA timing. */ + timingVESA_640x480_72hz = 152, /* 640x480 (72 Hz) VGA timing. */ + timingVESA_640x480_75hz = 154, /* 640x480 (75 Hz) VGA timing. */ + timingVESA_640x480_85hz = 158, /* 640x480 (85 Hz) VGA timing. */ + timingGTF_640x480_120hz = 159, /* 640x480 (120 Hz) VESA Generalized Timing Formula */ + timingApple_640x870_75hz = 160, /* 640x870 (75 Hz) FPD timing.*/ + timingApple_640x818_75hz = 165, /* 640x818 (75 Hz) FPD-818 timing.*/ + timingApple_832x624_75hz = 170, /* 832x624 (75 Hz) GoldFish timing.*/ + timingVESA_800x600_56hz = 180, /* 800x600 (56 Hz) SVGA timing. */ + timingVESA_800x600_60hz = 182, /* 800x600 (60 Hz) SVGA timing. */ + timingVESA_800x600_72hz = 184, /* 800x600 (72 Hz) SVGA timing. */ + timingVESA_800x600_75hz = 186, /* 800x600 (75 Hz) SVGA timing. */ + timingVESA_800x600_85hz = 188, /* 800x600 (85 Hz) SVGA timing. */ + timingVESA_1024x768_60hz = 190, /* 1024x768 (60 Hz) VESA 1K-60Hz timing. */ + timingVESA_1024x768_70hz = 200, /* 1024x768 (70 Hz) VESA 1K-70Hz timing. */ + timingVESA_1024x768_75hz = 204, /* 1024x768 (75 Hz) VESA 1K-75Hz timing (very similar to timingApple_1024x768_75hz). */ + timingVESA_1024x768_85hz = 208, /* 1024x768 (85 Hz) VESA timing. */ + timingApple_1024x768_75hz = 210, /* 1024x768 (75 Hz) Apple 19" RGB. */ + timingApple_1152x870_75hz = 220, /* 1152x870 (75 Hz) Apple 21" RGB. */ + timingAppleNTSC_ST = 230, /* 512x384 (60 Hz, interlaced, non-convolved). */ + timingAppleNTSC_FF = 232, /* 640x480 (60 Hz, interlaced, non-convolved). */ + timingAppleNTSC_STconv = 234, /* 512x384 (60 Hz, interlaced, convolved). */ + timingAppleNTSC_FFconv = 236, /* 640x480 (60 Hz, interlaced, convolved). */ + timingApplePAL_ST = 238, /* 640x480 (50 Hz, interlaced, non-convolved). */ + timingApplePAL_FF = 240, /* 768x576 (50 Hz, interlaced, non-convolved). */ + timingApplePAL_STconv = 242, /* 640x480 (50 Hz, interlaced, convolved). */ + timingApplePAL_FFconv = 244, /* 768x576 (50 Hz, interlaced, convolved). */ + timingVESA_1280x960_75hz = 250, /* 1280x960 (75 Hz) */ + timingVESA_1280x960_60hz = 252, /* 1280x960 (60 Hz) */ + timingVESA_1280x960_85hz = 254, /* 1280x960 (85 Hz) */ + timingVESA_1280x1024_60hz = 260, /* 1280x1024 (60 Hz) */ + timingVESA_1280x1024_75hz = 262, /* 1280x1024 (75 Hz) */ + timingVESA_1280x1024_85hz = 268, /* 1280x1024 (85 Hz) */ + timingVESA_1600x1200_60hz = 280, /* 1600x1200 (60 Hz) VESA timing. */ + timingVESA_1600x1200_65hz = 282, /* 1600x1200 (65 Hz) VESA timing. */ + timingVESA_1600x1200_70hz = 284, /* 1600x1200 (70 Hz) VESA timing. */ + timingVESA_1600x1200_75hz = 286, /* 1600x1200 (75 Hz) VESA timing (pixel clock is 189.2 Mhz dot clock). */ + timingVESA_1600x1200_80hz = 288, /* 1600x1200 (80 Hz) VESA timing (pixel clock is 216>? Mhz dot clock) - proposed only. */ + timingVESA_1600x1200_85hz = 289, /* 1600x1200 (85 Hz) VESA timing (pixel clock is 229.5 Mhz dot clock). */ + timingVESA_1792x1344_60hz = 296, /* 1792x1344 (60 Hz) VESA timing (204.75 Mhz dot clock). */ + timingVESA_1792x1344_75hz = 298, /* 1792x1344 (75 Hz) VESA timing (261.75 Mhz dot clock). */ + timingVESA_1856x1392_60hz = 300, /* 1856x1392 (60 Hz) VESA timing (218.25 Mhz dot clock). */ + timingVESA_1856x1392_75hz = 302, /* 1856x1392 (75 Hz) VESA timing (288 Mhz dot clock). */ + timingVESA_1920x1440_60hz = 304, /* 1920x1440 (60 Hz) VESA timing (234 Mhz dot clock). */ + timingVESA_1920x1440_75hz = 306, /* 1920x1440 (75 Hz) VESA timing (297 Mhz dot clock). */ + timingSMPTE240M_60hz = 400, /* 60Hz V, 33.75KHz H, interlaced timing, 16:9 aspect, typical resolution of 1920x1035. */ + timingFilmRate_48hz = 410, /* 48Hz V, 25.20KHz H, non-interlaced timing, typical resolution of 640x480. */ + timingSony_1600x1024_76hz = 500, /* 1600x1024 (76 Hz) Sony timing (pixel clock is 170.447 Mhz dot clock). */ + timingSony_1920x1080_60hz = 510, /* 1920x1080 (60 Hz) Sony timing (pixel clock is 159.84 Mhz dot clock). */ + timingSony_1920x1080_72hz = 520, /* 1920x1080 (72 Hz) Sony timing (pixel clock is 216.023 Mhz dot clock). */ + timingSony_1920x1200_76hz = 540, /* 1900x1200 (76 Hz) Sony timing (pixel clock is 243.20 Mhz dot clock). */ + timingApple_0x0_0hz_Offline = 550 /* Indicates that this timing will take the display off-line and remove it from the system. */ +}; + + +/* Deprecated timing names.*/ +enum { + timingApple12 = timingApple_512x384_60hz, + timingApple12x = timingApple_560x384_60hz, + timingApple13 = timingApple_640x480_67hz, + timingApple13x = timingApple_640x400_67hz, + timingAppleVGA = timingVESA_640x480_60hz, + timingApple15 = timingApple_640x870_75hz, + timingApple15x = timingApple_640x818_75hz, + timingApple16 = timingApple_832x624_75hz, + timingAppleSVGA = timingVESA_800x600_56hz, + timingApple1Ka = timingVESA_1024x768_60hz, + timingApple1Kb = timingVESA_1024x768_70hz, + timingApple19 = timingApple_1024x768_75hz, + timingApple21 = timingApple_1152x870_75hz, + timingSony_1900x1200_74hz = 530, /* 1900x1200 (74 Hz) Sony timing (pixel clock is 236.25 Mhz dot clock). */ + timingSony_1900x1200_76hz = timingSony_1920x1200_76hz /* 1900x1200 (76 Hz) Sony timing (pixel clock is 245.48 Mhz dot clock). */ +}; + +/* csConnectFlags values in VDDisplayConnectInfo */ +enum { + kAllModesValid = 0, /* All modes not trimmed by primary init are good close enough to try */ + kAllModesSafe = 1, /* All modes not trimmed by primary init are know to be safe */ + kReportsTagging = 2, /* Can detect tagged displays (to identify smart monitors) */ + kHasDirectConnection = 3, /* True implies that driver can talk directly to device (e.g. serial data link via sense lines) */ + kIsMonoDev = 4, /* Says whether there's an RGB (0) or Monochrome (1) connection. */ + kUncertainConnection = 5, /* There may not be a display (no sense lines?). */ + kTaggingInfoNonStandard = 6, /* Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes). */ + kReportsDDCConnection = 7, /* Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display). */ + kHasDDCConnection = 8, /* Card has ddc connect now. */ + kConnectionInactive = 9, /* Set when the connection is NOT currently active (generally used in a multiconnection environment). */ + kDependentConnection = 10, /* Set when some ascpect of THIS connection depends on another (will generally be set in a kModeSimulscan environment). */ + kBuiltInConnection = 11, /* Set when connection is KNOWN to be built-in (this is not the same as kHasDirectConnection). */ + kOverrideConnection = 12, /* Set when the reported connection is not the true one, but is one that has been forced through a SetConnection call */ + kFastCheckForDDC = 13, /* Set when all 3 are true: 1) sense codes indicate DDC display could be attached 2) attempted fast check 3) DDC failed */ + kReportsHotPlugging = 14, /* Detects and reports hot pluggging on connector (via VSL also implies DDC will be up to date w/o force read) */ + kStereoSyncConnection = 15 /* Connection supports stereo sync signalling */ +}; + + +/* csDisplayType values in VDDisplayConnectInfo */ +enum { + kUnknownConnect = 1, /* Not sure how we'll use this, but seems like a good idea. */ + kPanelConnect = 2, /* For use with fixed-in-place LCD panels. */ + kPanelTFTConnect = 2, /* Alias for kPanelConnect */ + kFixedModeCRTConnect = 3, /* For use with fixed-mode (i.e., very limited range) displays. */ + kMultiModeCRT1Connect = 4, /* 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe */ + kMultiModeCRT2Connect = 5, /* 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe */ + kMultiModeCRT3Connect = 6, /* 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain */ + kMultiModeCRT4Connect = 7, /* Expansion to large multi mode (not yet used) */ + kModelessConnect = 8, /* Expansion to modeless model (not yet used) */ + kFullPageConnect = 9, /* 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) */ + kVGAConnect = 10, /* 640x480 VGA default -- question everything else */ + kNTSCConnect = 11, /* NTSC ST (default), FF, STconv, FFconv */ + kPALConnect = 12, /* PAL ST (default), FF, STconv, FFconv */ + kHRConnect = 13, /* Straight-6 connect -- 640x480 and 640x400 (to get 8bpp in 256K case) (these two only) */ + kPanelFSTNConnect = 14, /* For use with fixed-in-place LCD FSTN (aka "Supertwist") panels */ + kMonoTwoPageConnect = 15, /* 1152x870 Apple color two-page display */ + kColorTwoPageConnect = 16, /* 1152x870 Apple B&W two-page display */ + kColor16Connect = 17, /* 832x624 Apple B&W two-page display */ + kColor19Connect = 18, /* 1024x768 Apple B&W two-page display */ + kGenericCRT = 19, /* Indicates nothing except that connection is CRT in nature. */ + kGenericLCD = 20, /* Indicates nothing except that connection is LCD in nature. */ + kDDCConnect = 21, /* DDC connection, always set kHasDDCConnection */ + kNoConnect = 22 /* No display is connected - load sensing or similar level of hardware detection is assumed (used by resident drivers that support hot plugging when nothing is currently connected) */ +}; + +/* csTimingFlags values in VDTimingInfoRec */ +enum { + kModeValid = 0, /* Says that this mode should NOT be trimmed. */ + kModeSafe = 1, /* This mode does not need confirmation */ + kModeDefault = 2, /* This is the default mode for this type of connection */ + kModeShowNow = 3, /* This mode should always be shown (even though it may require a confirm) */ + kModeNotResize = 4, /* This mode should not be used to resize the display (eg. mode selects a different connector on card) */ + kModeRequiresPan = 5, /* This mode has more pixels than are actually displayed */ + kModeInterlaced = 6, /* This mode is interlaced (single pixel lines look bad). */ + kModeShowNever = 7, /* This mode should not be shown in the user interface. */ + kModeSimulscan = 8, /* Indicates that more than one display connection can be driven from a single framebuffer controller. */ + kModeNotPreset = 9, /* Indicates that the timing is not a factory preset for the current display (geometry may need correction) */ + kModeBuiltIn = 10, /* Indicates that the display mode is for the built-in connect only (on multiconnect devices like the PB 3400) Only the driver is quieried */ + kModeStretched = 11, /* Indicates that the display mode will be stretched/distorted to match the display aspect ratio */ + kModeNotGraphicsQuality = 12, /* Indicates that the display mode is not the highest quality (eg. stretching artifacts). Intended as a hint */ + kModeValidateAgainstDisplay = 13 /* Indicates that this mode should be validated against the display EDID */ +}; + +/* csDepthFlags in VDVideoParametersInfoRec */ +enum { + kDepthDependent = 0, /* Says that this depth mode may cause dependent changes in other framebuffers (and . */ + kDepthDependentMask = (1 << kDepthDependent) /* mask for kDepthDependent */ +}; + +/* csResolutionFlags bit flags for VDResolutionInfoRec */ +enum { + kResolutionHasMultipleDepthSizes = 0 /* Says that this mode has different csHorizontalPixels, csVerticalLines at different depths (usually slightly larger at lower depths) */ +}; + + +enum { + /* Power Mode constants for VDPowerStateRec.powerState. Note the numeric order does not match the power state order */ + kAVPowerOff = 0, /* Power fully off*/ + kAVPowerStandby = 1, + kAVPowerSuspend = 2, + kAVPowerOn = 3, + kHardwareSleep = 128, + kHardwareWake = 129, + kHardwareWakeFromSuspend = 130, + kHardwareWakeToDoze = 131, + kHardwareWakeToDozeFromSuspend = 132, + kHardwarePark = 133, + kHardwareDrive = 134 +}; + +/* Reduced perf level, for GetPowerState, SetPowerState*/ +enum { + kPowerStateReducedPowerMask = 0x00000300, + kPowerStateFullPower = 0x00000000, + kPowerStateReducedPower1 = 0x00000100, + kPowerStateReducedPower2 = 0x00000200, + kPowerStateReducedPower3 = 0x00000300 +}; + +enum { + /* Power Mode masks and bits for VDPowerStateRec.powerFlags. */ + kPowerStateNeedsRefresh = 0, /* When leaving this power mode, a display will need refreshing */ + kPowerStateSleepAwareBit = 1, /* if gestaltPCCardDockingSelectorFix, Docking mgr checks this bit before checking kPowerStateSleepAllowedBit */ + kPowerStateSleepForbiddenBit = 2, /* if kPowerStateSleepAwareBit, Docking mgr checks this bit before sleeping */ + kPowerStateSleepCanPowerOffBit = 3, /* supports power down sleep (ie PCI power off)*/ + kPowerStateSleepNoDPMSBit = 4, /* Bug #2425210. Do not use DPMS with this display.*/ + kPowerStateSleepWaketoDozeBit = 5, /* Supports Wake to Doze */ + kPowerStateSleepWakeNeedsProbeBit = 6, /* Does not sense connection changes on wake */ + + kPowerStateNeedsRefreshMask = (1 << kPowerStateNeedsRefresh), + kPowerStateSleepAwareMask = (1 << kPowerStateSleepAwareBit), + kPowerStateSleepForbiddenMask = (1 << kPowerStateSleepForbiddenBit), + kPowerStateSleepCanPowerOffMask = (1 << kPowerStateSleepCanPowerOffBit), + kPowerStateSleepNoDPMSMask = (1 << kPowerStateSleepNoDPMSBit), + kPowerStateSleepWaketoDozeMask = (1 << kPowerStateSleepWaketoDozeBit), + kPowerStateSleepWakeNeedsProbeMask = (1 << kPowerStateSleepWakeNeedsProbeBit), + + kPowerStateSupportsReducedPower1Bit = 10, + kPowerStateSupportsReducedPower2Bit = 11, + kPowerStateSupportsReducedPower3Bit = 12, + kPowerStateSupportsReducedPower1BitMask = (1 << 10), + kPowerStateSupportsReducedPower2BitMask = (1 << 11), + kPowerStateSupportsReducedPower3BitMask = (1 << 12) +}; + + +enum { + /* Control Codes */ + cscReset = 0, + cscKillIO = 1, + cscSetMode = 2, + cscSetEntries = 3, + cscSetGamma = 4, + cscGrayPage = 5, + cscGrayScreen = 5, + cscSetGray = 6, + cscSetInterrupt = 7, + cscDirectSetEntries = 8, + cscSetDefaultMode = 9, + cscSwitchMode = 10, /* Takes a VDSwitchInfoPtr */ + cscSetSync = 11, /* Takes a VDSyncInfoPtr */ + cscSavePreferredConfiguration = 16, /* Takes a VDSwitchInfoPtr */ + cscSetHardwareCursor = 22, /* Takes a VDSetHardwareCursorPtr */ + cscDrawHardwareCursor = 23, /* Takes a VDDrawHardwareCursorPtr */ + cscSetConvolution = 24, /* Takes a VDConvolutionInfoPtr */ + cscSetPowerState = 25, /* Takes a VDPowerStatePtr */ + cscPrivateControlCall = 26, /* Takes a VDPrivateSelectorDataRec*/ + cscSetMultiConnect = 28, /* From a GDI point of view, this call should be implemented completely in the HAL and not at all in the core.*/ + cscSetClutBehavior = 29, /* Takes a VDClutBehavior */ + cscSetDetailedTiming = 31, /* Takes a VDDetailedTimingPtr */ + cscDoCommunication = 33, /* Takes a VDCommunicationPtr */ + cscProbeConnection = 34, /* Takes nil pointer */ + /* (may generate a kFBConnectInterruptServiceType service interrupt) */ + cscSetScaler = 36, /* Takes a VDScalerPtr */ + cscSetMirror = 37, /* Takes a VDMirrorPtr*/ + cscSetFeatureConfiguration = 38, /* Takes a VDConfigurationPtr*/ + cscUnusedCall = 127 /* This call used to expand the scrn resource. Its imbedded data contains more control info */ +}; + +enum { + /* Status Codes */ + cscGetMode = 2, + cscGetEntries = 3, + cscGetPageCnt = 4, + cscGetPages = 4, /* This is what C&D 2 calls it. */ + cscGetPageBase = 5, + cscGetBaseAddr = 5, /* This is what C&D 2 calls it. */ + cscGetGray = 6, + cscGetInterrupt = 7, + cscGetGamma = 8, + cscGetDefaultMode = 9, + cscGetCurMode = 10, /* Takes a VDSwitchInfoPtr */ + cscGetSync = 11, /* Takes a VDSyncInfoPtr */ + cscGetConnection = 12, /* Return information about the connection to the display */ + cscGetModeTiming = 13, /* Return timing info for a mode */ + cscGetModeBaseAddress = 14, /* Return base address information about a particular mode */ + cscGetScanProc = 15, /* QuickTime scan chasing routine */ + cscGetPreferredConfiguration = 16, /* Takes a VDSwitchInfoPtr */ + cscGetNextResolution = 17, /* Takes a VDResolutionInfoPtr */ + cscGetVideoParameters = 18, /* Takes a VDVideoParametersInfoPtr */ + cscGetGammaInfoList = 20, /* Takes a VDGetGammaListPtr */ + cscRetrieveGammaTable = 21, /* Takes a VDRetrieveGammaPtr */ + cscSupportsHardwareCursor = 22, /* Takes a VDSupportsHardwareCursorPtr */ + cscGetHardwareCursorDrawState = 23, /* Takes a VDHardwareCursorDrawStatePtr */ + cscGetConvolution = 24, /* Takes a VDConvolutionInfoPtr */ + cscGetPowerState = 25, /* Takes a VDPowerStatePtr */ + cscPrivateStatusCall = 26, /* Takes a VDPrivateSelectorDataRec*/ + cscGetDDCBlock = 27, /* Takes a VDDDCBlockRec */ + cscGetMultiConnect = 28, /* From a GDI point of view, this call should be implemented completely in the HAL and not at all in the core.*/ + cscGetClutBehavior = 29, /* Takes a VDClutBehavior */ + cscGetTimingRanges = 30, /* Takes a VDDisplayTimingRangePtr */ + cscGetDetailedTiming = 31, /* Takes a VDDetailedTimingPtr */ + cscGetCommunicationInfo = 32, /* Takes a VDCommunicationInfoPtr */ + cscGetScalerInfo = 35, /* Takes a VDScalerInfoPtr */ + cscGetScaler = 36, /* Takes a VDScalerPtr */ + cscGetMirror = 37, /* Takes a VDMirrorPtr*/ + cscGetFeatureConfiguration = 38, /* Takes a VDConfigurationPtr*/ + cscGetFeatureList = 39 +}; + +/* Bit definitions for the Get/Set Sync call*/ +enum { + kDisableHorizontalSyncBit = 0, + kDisableVerticalSyncBit = 1, + kDisableCompositeSyncBit = 2, + kEnableSyncOnBlue = 3, + kEnableSyncOnGreen = 4, + kEnableSyncOnRed = 5, + kNoSeparateSyncControlBit = 6, + kTriStateSyncBit = 7, + kHorizontalSyncMask = 0x01, + kVerticalSyncMask = 0x02, + kCompositeSyncMask = 0x04, + kDPMSSyncMask = 0x07, + kTriStateSyncMask = 0x80, + kSyncOnBlueMask = 0x08, + kSyncOnGreenMask = 0x10, + kSyncOnRedMask = 0x20, + kSyncOnMask = 0x38 +}; + +enum { + /* Power Mode constants for translating DPMS modes to Get/SetSync calls. */ + kDPMSSyncOn = 0, + kDPMSSyncStandby = 1, + kDPMSSyncSuspend = 2, + kDPMSSyncOff = 7 +}; + +/* Bit definitions for the Get/Set Convolution call*/ +enum { + kConvolved = 0, + kLiveVideoPassThru = 1, + kConvolvedMask = 0x01, + kLiveVideoPassThruMask = 0x02 +}; + + + +struct VPBlock { + UInt32 vpBaseOffset; /*Offset to page zero of video RAM (From minorBaseOS).*/ +#if __LP64__ + UInt32 vpRowBytes; /*Width of each row of video memory.*/ +#else + SInt16 vpRowBytes; /*Width of each row of video memory.*/ +#endif + Rect vpBounds; /*BoundsRect for the video display (gives dimensions).*/ + SInt16 vpVersion; /*PixelMap version number.*/ + SInt16 vpPackType; + UInt32 vpPackSize; + UInt32 vpHRes; /*Horizontal resolution of the device (pixels per inch).*/ + UInt32 vpVRes; /*Vertical resolution of the device (pixels per inch).*/ + SInt16 vpPixelType; /*Defines the pixel type.*/ + SInt16 vpPixelSize; /*Number of bits in pixel.*/ + SInt16 vpCmpCount; /*Number of components in pixel.*/ + SInt16 vpCmpSize; /*Number of bits per component*/ + UInt32 vpPlaneBytes; /*Offset from one plane to the next.*/ +}; +typedef struct VPBlock VPBlock; +typedef VPBlock * VPBlockPtr; + +struct VDEntryRecord { + Ptr csTable; /* pointer to color table entry=value, r,g,b:INTEGER*/ +}; +typedef struct VDEntryRecord VDEntryRecord; + +typedef VDEntryRecord * VDEntRecPtr; +/* Parm block for SetGray control call */ + +struct VDGrayRecord { + Boolean csMode; /*Same as GDDevType value (0=color, 1=mono)*/ + SInt8 filler; +}; +typedef struct VDGrayRecord VDGrayRecord; + +typedef VDGrayRecord * VDGrayPtr; +/* Parm block for SetInterrupt call */ + +struct VDFlagRecord { + SInt8 csMode; + SInt8 filler; +}; +typedef struct VDFlagRecord VDFlagRecord; + +typedef VDFlagRecord * VDFlagRecPtr; +/* Parm block for SetEntries control call */ + +struct VDSetEntryRecord { + ColorSpec * csTable; /*Pointer to an array of color specs*/ + SInt16 csStart; /*Which spec in array to start with, or -1*/ + SInt16 csCount; /*Number of color spec entries to set*/ +}; +typedef struct VDSetEntryRecord VDSetEntryRecord; + +typedef VDSetEntryRecord * VDSetEntryPtr; +/* Parm block for SetGamma control call */ + +struct VDGammaRecord { + Ptr csGTable; /*pointer to gamma table*/ +}; +typedef struct VDGammaRecord VDGammaRecord; + +typedef VDGammaRecord * VDGamRecPtr; + +struct VDSwitchInfoRec { + DepthMode csMode; /* mode depth*/ + DisplayModeID csData; /* functional sResource of mode*/ + UInt16 csPage; /* page to switch in*/ + Ptr csBaseAddr; /* base address of page (return value)*/ + uintptr_t csReserved; /* Reserved (set to 0) */ +}; +typedef struct VDSwitchInfoRec VDSwitchInfoRec; + +typedef VDSwitchInfoRec * VDSwitchInfoPtr; + +struct VDTimingInfoRec { + DisplayModeID csTimingMode; /* timing mode (a la InitGDevice) */ + uintptr_t csTimingReserved; /* reserved */ + UInt32 csTimingFormat; /* what format is the timing info */ + UInt32 csTimingData; /* data supplied by driver */ + UInt32 csTimingFlags; /* mode within device */ +}; +typedef struct VDTimingInfoRec VDTimingInfoRec; + +typedef VDTimingInfoRec * VDTimingInfoPtr; + +struct VDDisplayConnectInfoRec { + UInt16 csDisplayType; /* Type of display connected */ + UInt8 csConnectTaggedType; /* type of tagging */ + UInt8 csConnectTaggedData; /* tagging data */ + UInt32 csConnectFlags; /* tell us about the connection */ + uintptr_t csDisplayComponent; /* if the card has a direct connection to the display, it returns the display component here (FUTURE) */ + uintptr_t csConnectReserved; /* reserved */ +}; +typedef struct VDDisplayConnectInfoRec VDDisplayConnectInfoRec; + +typedef VDDisplayConnectInfoRec * VDDisplayConnectInfoPtr; + +struct VDMultiConnectInfoRec { + UInt32 csDisplayCountOrNumber; /* For GetMultiConnect, returns count n of 1..n connections; otherwise, indicates the ith connection.*/ + VDDisplayConnectInfoRec csConnectInfo; /* Standard VDDisplayConnectionInfo for connection i.*/ +}; +typedef struct VDMultiConnectInfoRec VDMultiConnectInfoRec; + +typedef VDMultiConnectInfoRec * VDMultiConnectInfoPtr; +/* RawSenseCode + This abstract data type is not exactly abstract. Rather, it is merely enumerated constants + for the possible raw sense code values when 'standard' sense code hardware is implemented. + + For 'standard' sense code hardware, the raw sense is obtained as follows: + o Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines + o Read the state of the monitor sense lines 2, 1, and 0. (2 is the MSB, 0 the LSB) + + IMPORTANT Note: + When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants + are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo' + +*/ +typedef UInt8 RawSenseCode; +enum { + kRSCZero = 0, + kRSCOne = 1, + kRSCTwo = 2, + kRSCThree = 3, + kRSCFour = 4, + kRSCFive = 5, + kRSCSix = 6, + kRSCSeven = 7 +}; + + +/* ExtendedSenseCode + This abstract data type is not exactly abstract. Rather, it is merely enumerated constants + for the values which are possible when the extended sense algorithm is applied to hardware + which implements 'standard' sense code hardware. + + For 'standard' sense code hardware, the extended sense code algorithm is as follows: + (Note: as described here, sense line 'A' corresponds to '2', 'B' to '1', and 'C' to '0') + o Drive sense line 'A' low and read the values of 'B' and 'C'. + o Drive sense line 'B' low and read the values of 'A' and 'C'. + o Drive sense line 'C' low and read the values of 'A' and 'B'. + + In this way, a six-bit number of the form BC/AC/AB is generated. + + IMPORTANT Note: + When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants + are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo' + +*/ +typedef UInt8 ExtendedSenseCode; +enum { + kESCZero21Inch = 0x00, /* 21" RGB */ + kESCOnePortraitMono = 0x14, /* Portrait Monochrome */ + kESCTwo12Inch = 0x21, /* 12" RGB */ + kESCThree21InchRadius = 0x31, /* 21" RGB (Radius) */ + kESCThree21InchMonoRadius = 0x34, /* 21" Monochrome (Radius) */ + kESCThree21InchMono = 0x35, /* 21" Monochrome */ + kESCFourNTSC = 0x0A, /* NTSC */ + kESCFivePortrait = 0x1E, /* Portrait RGB */ + kESCSixMSB1 = 0x03, /* MultiScan Band-1 (12" thru 1Six") */ + kESCSixMSB2 = 0x0B, /* MultiScan Band-2 (13" thru 19") */ + kESCSixMSB3 = 0x23, /* MultiScan Band-3 (13" thru 21") */ + kESCSixStandard = 0x2B, /* 13"/14" RGB or 12" Monochrome */ + kESCSevenPAL = 0x00, /* PAL */ + kESCSevenNTSC = 0x14, /* NTSC */ + kESCSevenVGA = 0x17, /* VGA */ + kESCSeven16Inch = 0x2D, /* 16" RGB (GoldFish) */ + kESCSevenPALAlternate = 0x30, /* PAL (Alternate) */ + kESCSeven19Inch = 0x3A, /* Third-Party 19" */ + kESCSevenDDC = 0x3E, /* DDC display */ + kESCSevenNoDisplay = 0x3F /* No display connected */ +}; + +/* DepthMode + This abstract data type is used to to reference RELATIVE pixel depths. + Its definition is largely derived from its past usage, analogous to 'xxxVidMode' + + Bits per pixel DOES NOT directly map to 'DepthMode' For example, on some + graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other + hardware, 'kDepthMode1' may represent 8BPP. + + DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc. + behave as expected. The values of the constants which comprise the set are such + that 'kDepthMode4 < kDepthMode6' behaves as expected. +*/ +enum { + kDepthMode1 = 128, + kDepthMode2 = 129, + kDepthMode3 = 130, + kDepthMode4 = 131, + kDepthMode5 = 132, + kDepthMode6 = 133 +}; + +enum { + kFirstDepthMode = 128, /* These constants are obsolete, and just included */ + kSecondDepthMode = 129, /* for clients that have converted to the above */ + kThirdDepthMode = 130, /* kDepthModeXXX constants. */ + kFourthDepthMode = 131, + kFifthDepthMode = 132, + kSixthDepthMode = 133 +}; + + + +struct VDPageInfo { + DepthMode csMode; /* mode within device*/ + DisplayModeID csData; /* data supplied by driver*/ + SInt16 csPage; /* page to switch in*/ + Ptr csBaseAddr; /* base address of page*/ +}; +typedef struct VDPageInfo VDPageInfo; + +typedef VDPageInfo * VDPgInfoPtr; + +struct VDSizeInfo { + SInt16 csHSize; /* desired/returned h size*/ + SInt16 csHPos; /* desired/returned h position*/ + SInt16 csVSize; /* desired/returned v size*/ + SInt16 csVPos; /* desired/returned v position*/ +}; +typedef struct VDSizeInfo VDSizeInfo; + +typedef VDSizeInfo * VDSzInfoPtr; + +struct VDSettings { + SInt16 csParamCnt; /* number of params*/ + SInt16 csBrightMax; /* max brightness*/ + SInt16 csBrightDef; /* default brightness*/ + SInt16 csBrightVal; /* current brightness*/ + SInt16 csCntrstMax; /* max contrast*/ + SInt16 csCntrstDef; /* default contrast*/ + SInt16 csCntrstVal; /* current contrast*/ + SInt16 csTintMax; /* max tint*/ + SInt16 csTintDef; /* default tint*/ + SInt16 csTintVal; /* current tint*/ + SInt16 csHueMax; /* max hue*/ + SInt16 csHueDef; /* default hue*/ + SInt16 csHueVal; /* current hue*/ + SInt16 csHorizDef; /* default horizontal*/ + SInt16 csHorizVal; /* current horizontal*/ + SInt16 csHorizMax; /* max horizontal*/ + SInt16 csVertDef; /* default vertical*/ + SInt16 csVertVal; /* current vertical*/ + SInt16 csVertMax; /* max vertical*/ +}; +typedef struct VDSettings VDSettings; +typedef VDSettings * VDSettingsPtr; + +struct VDDefMode { + UInt8 csID; + SInt8 filler; +}; +typedef struct VDDefMode VDDefMode; +typedef VDDefMode * VDDefModePtr; + +struct VDSyncInfoRec { + UInt8 csMode; + UInt8 csFlags; +}; +typedef struct VDSyncInfoRec VDSyncInfoRec; + +typedef VDSyncInfoRec * VDSyncInfoPtr; +/* + All displayModeID values from 0x80000000 to 0xFFFFFFFF and 0x00 + are reserved for Apple Computer. +*/ +/* Constants for the cscGetNextResolution call */ +enum { + kDisplayModeIDCurrent = 0x00, /* Reference the Current DisplayModeID */ + kDisplayModeIDInvalid = (IODisplayModeID)0xFFFFFFFF, /* A bogus DisplayModeID in all cases */ + kDisplayModeIDFindFirstResolution = (IODisplayModeID)0xFFFFFFFE, /* Used in cscGetNextResolution to reset iterator */ + kDisplayModeIDNoMoreResolutions = (IODisplayModeID)0xFFFFFFFD, /* Used in cscGetNextResolution to indicate End Of List */ + kDisplayModeIDFindFirstProgrammable = (IODisplayModeID)0xFFFFFFFC, /* Used in cscGetNextResolution to find unused programmable timing */ + kDisplayModeIDBootProgrammable = (IODisplayModeID)0xFFFFFFFB, /* This is the ID given at boot time by the OF driver to a programmable timing */ + kDisplayModeIDReservedBase = (IODisplayModeID)0x80000000 /* Lowest (unsigned) DisplayModeID reserved by Apple */ +}; + +/* Constants for the GetGammaInfoList call */ +enum { + kGammaTableIDFindFirst = (GammaTableID)0xFFFFFFFE, /* Get the first gamma table ID */ + kGammaTableIDNoMoreTables = (GammaTableID)0xFFFFFFFD, /* Used to indicate end of list */ + kGammaTableIDSpecific = 0x00 /* Return the info for the given table id */ +}; + +/* Constants for GetMultiConnect call*/ +enum { + kGetConnectionCount = 0xFFFFFFFF, /* Used to get the number of possible connections in a "multi-headed" framebuffer environment.*/ + kActivateConnection = (0 << kConnectionInactive), /* Used for activating a connection (csConnectFlags value).*/ + kDeactivateConnection = (1 << kConnectionInactive) /* Used for deactivating a connection (csConnectFlags value.)*/ +}; + +/* VDCommunicationRec.csBusID values*/ +enum { + kVideoDefaultBus = 0 +}; + + +/* VDCommunicationInfoRec.csBusType values*/ +enum { + kVideoBusTypeInvalid = 0, + kVideoBusTypeI2C = 1, + kVideoBusTypeDisplayPort = 2 +}; + + +/* VDCommunicationRec.csSendType and VDCommunicationRec.csReplyType values*/ +enum { + kVideoNoTransactionType = 0, /* No transaction*/ + kVideoNoTransactionTypeMask = (1 << kVideoNoTransactionType), + kVideoSimpleI2CType = 1, /* Simple I2C message*/ + kVideoSimpleI2CTypeMask = (1 << kVideoSimpleI2CType), + kVideoDDCciReplyType = 2, /* DDC/ci message (with imbedded length)*/ + kVideoDDCciReplyTypeMask = (1 << kVideoDDCciReplyType), + kVideoCombinedI2CType = 3, /* Combined format I2C R/~W transaction*/ + kVideoCombinedI2CTypeMask = (1 << kVideoCombinedI2CType), + kVideoDisplayPortNativeType = 4, /* DisplayPort Native */ + kVideoDisplayPortNativeTypeMask = (1 << kVideoDisplayPortNativeType) +}; + +// VDCommunicationRec.csCommFlags and VDCommunicationInfoRec.csSupportedCommFlags +enum { + kVideoReplyMicroSecDelayBit = 0, /* If bit set, the driver should delay csMinReplyDelay micro seconds between send and receive*/ + kVideoReplyMicroSecDelayMask = (1 << kVideoReplyMicroSecDelayBit), + kVideoUsageAddrSubAddrBit = 1, /* If bit set, the driver understands to use the lower 16 bits of the address field as two 8 bit values (address/subaddress) for the I2C transaction*/ + kVideoUsageAddrSubAddrMask = (1 << kVideoUsageAddrSubAddrBit) +}; + + +struct VDResolutionInfoRec { + DisplayModeID csPreviousDisplayModeID; /* ID of the previous resolution in a chain */ + DisplayModeID csDisplayModeID; /* ID of the next resolution */ + UInt32 csHorizontalPixels; /* # of pixels in a horizontal line at the max depth */ + UInt32 csVerticalLines; /* # of lines in a screen at the max depth */ + Fixed csRefreshRate; /* Vertical Refresh Rate in Hz */ + DepthMode csMaxDepthMode; /* 0x80-based number representing max bit depth */ + UInt32 csResolutionFlags; /* Reserved - flag bits */ + uintptr_t csReserved; /* Reserved */ +}; +typedef struct VDResolutionInfoRec VDResolutionInfoRec; + +typedef VDResolutionInfoRec * VDResolutionInfoPtr; + +struct VDVideoParametersInfoRec { + DisplayModeID csDisplayModeID; /* the ID of the resolution we want info on */ + DepthMode csDepthMode; /* The bit depth we want the info on (0x80 based) */ + VPBlockPtr csVPBlockPtr; /* Pointer to a video parameter block */ + UInt32 csPageCount; /* Number of pages supported by the resolution */ + VideoDeviceType csDeviceType; /* Device Type: Direct, Fixed or CLUT; */ + UInt32 csDepthFlags; /* Flags */ +}; +typedef struct VDVideoParametersInfoRec VDVideoParametersInfoRec; + +typedef VDVideoParametersInfoRec * VDVideoParametersInfoPtr; + +struct VDGammaInfoRec { + GammaTableID csLastGammaID; /* the ID of the previous gamma table */ + GammaTableID csNextGammaID; /* the ID of the next gamma table */ + Ptr csGammaPtr; /* Ptr to a gamma table data */ + uintptr_t csReserved; /* Reserved */ +}; +typedef struct VDGammaInfoRec VDGammaInfoRec; + +typedef VDGammaInfoRec * VDGammaInfoPtr; + +struct VDGetGammaListRec { + GammaTableID csPreviousGammaTableID; /* ID of the previous gamma table */ + GammaTableID csGammaTableID; /* ID of the gamma table following csPreviousDisplayModeID */ + UInt32 csGammaTableSize; /* Size of the gamma table in bytes */ + char * csGammaTableName; /* Gamma table name (c-string) */ +}; +typedef struct VDGetGammaListRec VDGetGammaListRec; + +typedef VDGetGammaListRec * VDGetGammaListPtr; + +struct VDRetrieveGammaRec { + GammaTableID csGammaTableID; /* ID of gamma table to retrieve */ + GammaTbl * csGammaTablePtr; /* Location to copy desired gamma to */ +}; +typedef struct VDRetrieveGammaRec VDRetrieveGammaRec; + +typedef VDRetrieveGammaRec * VDRetrieveGammaPtr; + +struct VDSetHardwareCursorRec { + void * csCursorRef; /* reference to cursor data */ + UInt32 csReserved1; /* reserved for future use */ + UInt32 csReserved2; /* should be ignored */ +}; +typedef struct VDSetHardwareCursorRec VDSetHardwareCursorRec; + +typedef VDSetHardwareCursorRec * VDSetHardwareCursorPtr; + +struct VDDrawHardwareCursorRec { + SInt32 csCursorX; /* x coordinate */ + SInt32 csCursorY; /* y coordinate */ + UInt32 csCursorVisible; /* true if cursor is must be visible */ + UInt32 csReserved1; /* reserved for future use */ + UInt32 csReserved2; /* should be ignored */ +}; +typedef struct VDDrawHardwareCursorRec VDDrawHardwareCursorRec; + +typedef VDDrawHardwareCursorRec * VDDrawHardwareCursorPtr; + +struct VDSupportsHardwareCursorRec { + UInt32 csSupportsHardwareCursor; + /* true if hardware cursor is supported */ + UInt32 csReserved1; /* reserved for future use */ + UInt32 csReserved2; /* must be zero */ +}; +typedef struct VDSupportsHardwareCursorRec VDSupportsHardwareCursorRec; + +typedef VDSupportsHardwareCursorRec * VDSupportsHardwareCursorPtr; + +struct VDHardwareCursorDrawStateRec { + SInt32 csCursorX; /* x coordinate */ + SInt32 csCursorY; /* y coordinate */ + UInt32 csCursorVisible; /* true if cursor is visible */ + UInt32 csCursorSet; /* true if cursor successfully set by last set control call */ + UInt32 csReserved1; /* reserved for future use */ + UInt32 csReserved2; /* must be zero */ +}; +typedef struct VDHardwareCursorDrawStateRec VDHardwareCursorDrawStateRec; + +typedef VDHardwareCursorDrawStateRec * VDHardwareCursorDrawStatePtr; + +struct VDConvolutionInfoRec { + DisplayModeID csDisplayModeID; /* the ID of the resolution we want info on */ + DepthMode csDepthMode; /* The bit depth we want the info on (0x80 based) */ + UInt32 csPage; + UInt32 csFlags; + UInt32 csReserved; +}; +typedef struct VDConvolutionInfoRec VDConvolutionInfoRec; + +typedef VDConvolutionInfoRec * VDConvolutionInfoPtr; + +struct VDPowerStateRec { + UInt32 powerState; + UInt32 powerFlags; + + uintptr_t powerReserved1; + uintptr_t powerReserved2; +}; +typedef struct VDPowerStateRec VDPowerStateRec; + +typedef VDPowerStateRec * VDPowerStatePtr; +/* + Private Data to video drivers. + + In versions of MacOS with multiple address spaces (System 8), the OS + must know the extent of parameters in order to move them between the caller + and driver. The old private-selector model for video drivers does not have + this information so: + + For post-7.x Systems private calls should be implemented using the cscPrivateCall +*/ + +struct VDPrivateSelectorDataRec { + LogicalAddress privateParameters; /* Caller's parameters*/ + ByteCount privateParametersSize; /* Size of data sent from caller to driver*/ + LogicalAddress privateResults; /* Caller's return area. Can be nil, or same as privateParameters.*/ + ByteCount privateResultsSize; /* Size of data driver returns to caller. Can be nil, or same as privateParametersSize.*/ +}; +typedef struct VDPrivateSelectorDataRec VDPrivateSelectorDataRec; + + +struct VDPrivateSelectorRec { + UInt32 reserved; /* Reserved (set to 0). */ + VDPrivateSelectorDataRec data[1]; +}; +typedef struct VDPrivateSelectorRec VDPrivateSelectorRec; + +struct VDDDCBlockRec { + UInt32 ddcBlockNumber; /* Input -- DDC EDID (Extended Display Identification Data) number (1-based) */ + ResType ddcBlockType; /* Input -- DDC block type (EDID/VDIF) */ + UInt32 ddcFlags; /* Input -- DDC Flags*/ + UInt32 ddcReserved; /* Reserved */ + Byte ddcBlockData[128]; /* Output -- DDC EDID/VDIF data (kDDCBlockSize) */ +}; +typedef struct VDDDCBlockRec VDDDCBlockRec; + +typedef VDDDCBlockRec * VDDDCBlockPtr; + +enum { + /* timingSyncConfiguration*/ + kSyncInterlaceMask = (1 << 7), + kSyncAnalogCompositeMask = 0, + kSyncAnalogCompositeSerrateMask = (1 << 2), + kSyncAnalogCompositeRGBSyncMask = (1 << 1), + kSyncAnalogBipolarMask = (1 << 3), + kSyncAnalogBipolarSerrateMask = (1 << 2), + kSyncAnalogBipolarSRGBSyncMask = (1 << 1), + kSyncDigitalCompositeMask = (1 << 4), + kSyncDigitalCompositeSerrateMask = (1 << 2), + kSyncDigitalCompositeMatchHSyncMask = (1 << 2), + kSyncDigitalSeperateMask = (1 << 4) + (1 << 3), + kSyncDigitalVSyncPositiveMask = (1 << 2), + kSyncDigitalHSyncPositiveMask = (1 << 1) +}; + + + + +struct VDDisplayTimingRangeRec { + UInt32 csRangeSize; /* Init to sizeof(VDDisplayTimingRangeRec) */ + UInt32 csRangeType; /* Init to 0 */ + UInt32 csRangeVersion; /* Init to 0 */ + UInt32 csRangeReserved; /* Init to 0 */ + + UInt32 csRangeBlockIndex; /* Requested block (first index is 0)*/ + UInt32 csRangeGroup; /* set to 0 */ + UInt32 csRangeBlockCount; /* # blocks */ + UInt32 csRangeFlags; /* dependent video */ + + UInt64 csMinPixelClock; /* Min dot clock in Hz */ + UInt64 csMaxPixelClock; /* Max dot clock in Hz */ + + UInt32 csMaxPixelError; /* Max dot clock error */ + UInt32 csTimingRangeSyncFlags; + UInt32 csTimingRangeSignalLevels; + UInt32 csTimingRangeSupportedSignalConfigs; + + UInt32 csMinFrameRate; /* Hz */ + UInt32 csMaxFrameRate; /* Hz */ + UInt32 csMinLineRate; /* Hz */ + UInt32 csMaxLineRate; /* Hz */ + + + UInt32 csMaxHorizontalTotal; /* Clocks - Maximum total (active + blanking) */ + UInt32 csMaxVerticalTotal; /* Clocks - Maximum total (active + blanking) */ + UInt32 csMaxTotalReserved1; /* Reserved */ + UInt32 csMaxTotalReserved2; /* Reserved */ + + + + /* Some cards require that some timing elements*/ + /* be multiples of a "character size" (often 8*/ + /* clocks). The "xxxxCharSize" fields document*/ + /* those requirements.*/ + + + UInt8 csCharSizeHorizontalActive; /* Character size */ + UInt8 csCharSizeHorizontalBlanking; /* Character size */ + UInt8 csCharSizeHorizontalSyncOffset; /* Character size */ + UInt8 csCharSizeHorizontalSyncPulse; /* Character size */ + + UInt8 csCharSizeVerticalActive; /* Character size */ + UInt8 csCharSizeVerticalBlanking; /* Character size */ + UInt8 csCharSizeVerticalSyncOffset; /* Character size */ + UInt8 csCharSizeVerticalSyncPulse; /* Character size */ + + UInt8 csCharSizeHorizontalBorderLeft; /* Character size */ + UInt8 csCharSizeHorizontalBorderRight; /* Character size */ + UInt8 csCharSizeVerticalBorderTop; /* Character size */ + UInt8 csCharSizeVerticalBorderBottom; /* Character size */ + + UInt8 csCharSizeHorizontalTotal; /* Character size for active + blanking */ + UInt8 csCharSizeVerticalTotal; /* Character size for active + blanking */ + UInt16 csCharSizeReserved1; /* Reserved (Init to 0) */ + + + UInt32 csMinHorizontalActiveClocks; + UInt32 csMaxHorizontalActiveClocks; + UInt32 csMinHorizontalBlankingClocks; + UInt32 csMaxHorizontalBlankingClocks; + + UInt32 csMinHorizontalSyncOffsetClocks; + UInt32 csMaxHorizontalSyncOffsetClocks; + UInt32 csMinHorizontalPulseWidthClocks; + UInt32 csMaxHorizontalPulseWidthClocks; + + UInt32 csMinVerticalActiveClocks; + UInt32 csMaxVerticalActiveClocks; + UInt32 csMinVerticalBlankingClocks; + UInt32 csMaxVerticalBlankingClocks; + + UInt32 csMinVerticalSyncOffsetClocks; + UInt32 csMaxVerticalSyncOffsetClocks; + UInt32 csMinVerticalPulseWidthClocks; + UInt32 csMaxVerticalPulseWidthClocks; + + + UInt32 csMinHorizontalBorderLeft; + UInt32 csMaxHorizontalBorderLeft; + UInt32 csMinHorizontalBorderRight; + UInt32 csMaxHorizontalBorderRight; + + UInt32 csMinVerticalBorderTop; + UInt32 csMaxVerticalBorderTop; + UInt32 csMinVerticalBorderBottom; + UInt32 csMaxVerticalBorderBottom; + + UInt32 csMaxNumLinks; /* number of links, if zero, assume link 1 */ + UInt32 csMinLink0PixelClock; /* min pixel clock for link 0 (kHz) */ + UInt32 csMaxLink0PixelClock; /* max pixel clock for link 0 (kHz) */ + UInt32 csMinLink1PixelClock; /* min pixel clock for link 1 (kHz) */ + UInt32 csMaxLink1PixelClock; /* max pixel clock for link 1 (kHz) */ + + UInt32 csReserved6; /* Reserved (Init to 0)*/ + UInt32 csReserved7; /* Reserved (Init to 0)*/ + UInt32 csReserved8; /* Reserved (Init to 0)*/ +}; +typedef struct VDDisplayTimingRangeRec VDDisplayTimingRangeRec; + +typedef VDDisplayTimingRangeRec * VDDisplayTimingRangePtr; + +enum { + /* csDisplayModeState*/ + kDMSModeReady = 0, /* Display Mode ID is configured and ready*/ + kDMSModeNotReady = 1, /* Display Mode ID is is being programmed*/ + kDMSModeFree = 2 /* Display Mode ID is not associated with a timing*/ +}; + + +/* Video driver Errors -10930 to -10959 */ +enum { + kTimingChangeRestrictedErr = -10930, + kVideoI2CReplyPendingErr = -10931, + kVideoI2CTransactionErr = -10932, + kVideoI2CBusyErr = -10933, + kVideoI2CTransactionTypeErr = -10934, + kVideoBufferSizeErr = -10935, + kVideoCannotMirrorErr = -10936 +}; + + +enum { + /* csTimingRangeSignalLevels*/ + kRangeSupportsSignal_0700_0300_Bit = 0, + kRangeSupportsSignal_0714_0286_Bit = 1, + kRangeSupportsSignal_1000_0400_Bit = 2, + kRangeSupportsSignal_0700_0000_Bit = 3, + kRangeSupportsSignal_0700_0300_Mask = (1 << kRangeSupportsSignal_0700_0300_Bit), + kRangeSupportsSignal_0714_0286_Mask = (1 << kRangeSupportsSignal_0714_0286_Bit), + kRangeSupportsSignal_1000_0400_Mask = (1 << kRangeSupportsSignal_1000_0400_Bit), + kRangeSupportsSignal_0700_0000_Mask = (1 << kRangeSupportsSignal_0700_0000_Bit) +}; + + +enum { + /* csSignalConfig*/ + kDigitalSignalBit = 0, /* Do not set. Mac OS does not currently support arbitrary digital timings*/ + kAnalogSetupExpectedBit = 1, /* Analog displays - display expects a blank-to-black setup or pedestal. See VESA signal standards.*/ + kInterlacedCEA861SyncModeBit = 2, + + kDigitalSignalMask = (1 << kDigitalSignalBit), + kAnalogSetupExpectedMask = (1 << kAnalogSetupExpectedBit), + kInterlacedCEA861SyncModeMask = (1 << kInterlacedCEA861SyncModeBit) +}; + + +enum { + /* csSignalLevels for analog*/ + kAnalogSignalLevel_0700_0300 = 0, + kAnalogSignalLevel_0714_0286 = 1, + kAnalogSignalLevel_1000_0400 = 2, + kAnalogSignalLevel_0700_0000 = 3 +}; + + +enum { + /* csTimingRangeSyncFlags*/ + kRangeSupportsSeperateSyncsBit = 0, + kRangeSupportsSyncOnGreenBit = 1, + kRangeSupportsCompositeSyncBit = 2, + kRangeSupportsVSyncSerrationBit = 3, + kRangeSupportsSeperateSyncsMask = (1 << kRangeSupportsSeperateSyncsBit), + kRangeSupportsSyncOnGreenMask = (1 << kRangeSupportsSyncOnGreenBit), + kRangeSupportsCompositeSyncMask = (1 << kRangeSupportsCompositeSyncBit), + kRangeSupportsVSyncSerrationMask = (1 << kRangeSupportsVSyncSerrationBit) +}; + + + +enum { + /* csHorizontalSyncConfig and csVerticalSyncConfig*/ + kSyncPositivePolarityBit = 0, /* Digital separate sync polarity for analog interfaces (0 => negative polarity)*/ + kSyncPositivePolarityMask = (1 << kSyncPositivePolarityBit) +}; + + + + +/* For timings with kDetailedTimingFormat.*/ + +struct VDDetailedTimingRec { + UInt32 csTimingSize; /* Init to sizeof(VDDetailedTimingRec)*/ + UInt32 csTimingType; /* Init to 0*/ + UInt32 csTimingVersion; /* Init to 0*/ + UInt32 csTimingReserved; /* Init to 0*/ + + DisplayModeID csDisplayModeID; /* Init to 0*/ + UInt32 csDisplayModeSeed; /* */ + UInt32 csDisplayModeState; /* Display Mode state*/ + UInt32 csDisplayModeAlias; /* Mode to use when programmed.*/ + + UInt32 csSignalConfig; + UInt32 csSignalLevels; + + UInt64 csPixelClock; /* Hz*/ + + UInt64 csMinPixelClock; /* Hz - With error what is slowest actual clock */ + UInt64 csMaxPixelClock; /* Hz - With error what is fasted actual clock */ + + + UInt32 csHorizontalActive; /* Pixels*/ + UInt32 csHorizontalBlanking; /* Pixels*/ + UInt32 csHorizontalSyncOffset; /* Pixels*/ + UInt32 csHorizontalSyncPulseWidth; /* Pixels*/ + + UInt32 csVerticalActive; /* Lines*/ + UInt32 csVerticalBlanking; /* Lines*/ + UInt32 csVerticalSyncOffset; /* Lines*/ + UInt32 csVerticalSyncPulseWidth; /* Lines*/ + + UInt32 csHorizontalBorderLeft; /* Pixels*/ + UInt32 csHorizontalBorderRight; /* Pixels*/ + UInt32 csVerticalBorderTop; /* Lines*/ + UInt32 csVerticalBorderBottom; /* Lines*/ + + UInt32 csHorizontalSyncConfig; + UInt32 csHorizontalSyncLevel; /* Future use (init to 0)*/ + UInt32 csVerticalSyncConfig; + UInt32 csVerticalSyncLevel; /* Future use (init to 0)*/ + + UInt32 csNumLinks; /* number of links, if 0 = assume link - 0 */ + + UInt32 csReserved2; /* Init to 0*/ + UInt32 csReserved3; /* Init to 0*/ + UInt32 csReserved4; /* Init to 0*/ + + UInt32 csReserved5; /* Init to 0*/ + UInt32 csReserved6; /* Init to 0*/ + UInt32 csReserved7; /* Init to 0*/ + UInt32 csReserved8; /* Init to 0*/ +}; +typedef struct VDDetailedTimingRec VDDetailedTimingRec; + +typedef VDDetailedTimingRec * VDDetailedTimingPtr; + +/* csScalerFeatures */ +enum { + kScaleStretchOnlyMask = (1<<0), /* True means the driver cannot add borders to avoid non-square pixels */ + kScaleCanUpSamplePixelsMask = (1<<1), /* True means timings with more active clocks than pixels (ie 640x480 pixels on a 1600x1200 timing) */ + kScaleCanDownSamplePixelsMask = (1<<2), /* True means timings with fewer active clocks than pixels (ie 1600x1200 pixels on a 640x480 timing) */ + kScaleCanScaleInterlacedMask = (1<<3), /* True means can scale an interlaced timing */ + kScaleCanSupportInsetMask = (1<<4), /* True means can scale a timing with insets */ + kScaleCanRotateMask = (1<<5), /* True means can rotate image */ + kScaleCanBorderInsetOnlyMask = (1<<6) /* True means can scale a timing with insets */ +}; + +/* csScalerFlags */ +enum { + kScaleStretchToFitMask = 0x00000001, /* True means the driver should avoid borders and allow non-square pixels */ + + kScaleRotateFlagsMask = 0x000000f0, + + kScaleSwapAxesMask = 0x00000010, + kScaleInvertXMask = 0x00000020, + kScaleInvertYMask = 0x00000040, + + kScaleRotate0Mask = 0x00000000, + kScaleRotate90Mask = kScaleSwapAxesMask | kScaleInvertXMask, + kScaleRotate180Mask = kScaleInvertXMask | kScaleInvertYMask, + kScaleRotate270Mask = kScaleSwapAxesMask | kScaleInvertYMask +}; + +typedef UInt32 VDClutBehavior; +typedef VDClutBehavior * VDClutBehaviorPtr; +enum { + kSetClutAtSetEntries = 0, /* SetEntries behavior is to update clut during SetEntries call*/ + kSetClutAtVBL = 1 /* SetEntries behavior is to upate clut at next vbl*/ +}; + + +struct VDCommunicationRec { + SInt32 csBusID; /* kVideoDefaultBus for single headed cards.*/ + UInt32 csCommFlags; /* Always zero*/ + UInt32 csMinReplyDelay; /* Minimum delay between send and reply transactions (units depend on csCommFlags)*/ + UInt32 csReserved2; /* Always zero*/ + + UInt32 csSendAddress; /* Usually I2C address (eg 0x6E)*/ + UInt32 csSendType; /* See kVideoSimpleI2CType etc.*/ + LogicalAddress csSendBuffer; /* Pointer to the send buffer*/ + ByteCount csSendSize; /* Number of bytes to send*/ + + UInt32 csReplyAddress; /* Address from which to read (eg 0x6F for kVideoDDCciReplyType I2C address)*/ + UInt32 csReplyType; /* See kVideoDDCciReplyType etc.*/ + LogicalAddress csReplyBuffer; /* Pointer to the reply buffer*/ + ByteCount csReplySize; /* Max bytes to reply (size of csReplyBuffer)*/ + + UInt32 csReserved3; + UInt32 csReserved4; + UInt32 csReserved5; /* Always zero*/ + UInt32 csReserved6; /* Always zero*/ +}; +typedef struct VDCommunicationRec VDCommunicationRec; + +typedef VDCommunicationRec * VDCommunicationPtr; + +struct VDCommunicationInfoRec { + SInt32 csBusID; /* kVideoDefaultBus for single headed cards. */ + UInt32 csBusType; /* See kVideoBusI2C etc.*/ + SInt32 csMinBus; /* Minimum bus (usually kVideoDefaultBus). Used to probe additional busses*/ + SInt32 csMaxBus; /* Max bus (usually kVideoDefaultBus). Used to probe additional busses*/ + + UInt32 csSupportedTypes; /* Bit field for first 32 supported transaction types. Eg. 0x07 => support for kVideoNoTransactionType, kVideoSimpleI2CType and kVideoDDCciReplyType.*/ + UInt32 csSupportedCommFlags; /* Return the flags csCommFlags understood by this driver. */ + UInt32 csReserved2; /* Always zero*/ + UInt32 csReserved3; /* Always zero*/ + + UInt32 csReserved4; /* Always zero*/ + UInt32 csReserved5; /* Always zero*/ + UInt32 csReserved6; /* Always zero*/ + UInt32 csReserved7; /* Always zero*/ +}; +typedef struct VDCommunicationInfoRec VDCommunicationInfoRec; + +typedef VDCommunicationInfoRec * VDCommunicationInfoPtr; + + +struct VDScalerRec { + UInt32 csScalerSize; /* Init to sizeof(VDScalerRec) */ + UInt32 csScalerVersion; /* Init to 0 */ + UInt32 csReserved1; /* Init to 0 */ + UInt32 csReserved2; /* Init to 0 */ + + DisplayModeID csDisplayModeID; /* Display Mode ID modified by this call. */ + UInt32 csDisplayModeSeed; /* */ + UInt32 csDisplayModeState; /* Display Mode state */ + UInt32 csReserved3; /* Init to 0 */ + + UInt32 csScalerFlags; /* Init to 0 */ + UInt32 csHorizontalPixels; /* Graphics system addressable pixels */ + UInt32 csVerticalPixels; /* Graphics system addressable lines */ + UInt32 csHorizontalInset; /* Border pixels for underscan */ + UInt32 csVerticalInset; /* Border lines for underscan */ + UInt32 csReserved6; /* Init to 0 */ + UInt32 csReserved7; /* Init to 0 */ + UInt32 csReserved8; /* Init to 0 */ +}; +typedef struct VDScalerRec VDScalerRec; +typedef VDScalerRec *VDScalerPtr; + +struct VDScalerInfoRec { + UInt32 csScalerInfoSize; /* Init to sizeof(VDScalerInfoRec) */ + UInt32 csScalerInfoVersion; /* Init to 0 */ + UInt32 csReserved1; /* Init to 0 */ + UInt32 csReserved2; /* Init to 0 */ + + UInt32 csScalerFeatures; /* Feature flags */ + UInt32 csMaxHorizontalPixels; /* limit to horizontal scaled pixels */ + UInt32 csMaxVerticalPixels; /* limit to vertical scaled pixels */ + UInt32 csReserved3; /* Init to 0 */ + + UInt32 csReserved4; /* Init to 0 */ + UInt32 csReserved5; /* Init to 0 */ + UInt32 csReserved6; /* Init to 0 */ + UInt32 csReserved7; /* Init to 0 */ +}; +typedef struct VDScalerInfoRec VDScalerInfoRec; +typedef VDScalerInfoRec *VDScalerInfoPtr; + +enum { + /* csMirrorFeatures*/ + kMirrorSameDepthOnlyMirrorMask = (1 << 0), /* Commonly true - Mirroring can only be done if the displays are the same bitdepth*/ + kMirrorSameSizeOnlyMirrorMask = (1 << 1), /* Commonly false - Mirroring can only be done if the displays are the same size*/ + kMirrorSameTimingOnlyMirrorMask = (1 << 2), /* Sometimes true - Mirroring can only be done if the displays are the same timing*/ + kMirrorCommonGammaMask = (1 << 3) /* Sometimes true - Only one gamma correction LUT.*/ +}; + +enum { + /* csMirrorSupportedFlags and csMirrorFlags*/ + kMirrorCanMirrorMask = (1 << 0), /* Set means we can HW mirrored right now (uses csMirrorEntryID)*/ + kMirrorAreMirroredMask = (1 << 1), /* Set means we are HW mirrored right now (uses csMirrorEntryID)*/ + kMirrorUnclippedMirrorMask = (1 << 2), /* Set means mirrored displays are not clipped to their intersection*/ + kMirrorHAlignCenterMirrorMask = (1 << 3), /* Set means mirrored displays can/should be centered horizontally*/ + kMirrorVAlignCenterMirrorMask = (1 << 4), /* Set means mirrored displays can/should be centered vertically*/ + kMirrorCanChangePixelFormatMask = (1 << 5), /* Set means mirrored the device should change the pixel format of mirrored displays to allow mirroring.*/ + kMirrorCanChangeTimingMask = (1 << 6), /* Set means mirrored the device should change the timing of mirrored displays to allow mirroring.*/ + kMirrorClippedMirrorMask = (1 << 7) /* Set means mirrored displays are clipped to their intersection (driver handles blacking and base address adjustment)*/ +}; + +struct VDMirrorRec { + UInt32 csMirrorSize; /* Init to sizeof(VDMirrorRec)*/ + UInt32 csMirrorVersion; /* Init to 0*/ + + RegEntryID csMirrorRequestID; /* Input RegEntryID to check for mirroring support and state*/ + RegEntryID csMirrorResultID; /* Output RegEntryID of the next mirrored device*/ + + UInt32 csMirrorFeatures; /* Output summary features of the driver*/ + UInt32 csMirrorSupportedFlags; /* Output configuration options supported by the driver*/ + UInt32 csMirrorFlags; /* Output configuration options active now*/ + UInt32 csReserved1; /* Init to 0*/ + + + UInt32 csReserved2; /* Init to 0*/ + UInt32 csReserved3; /* Init to 0*/ + UInt32 csReserved4; /* Init to 0*/ + UInt32 csReserved5; /* Init to 0*/ +}; +typedef struct VDMirrorRec VDMirrorRec; +typedef VDMirrorRec * VDMirrorPtr; + +struct VDConfigurationRec { + UInt32 csConfigFeature; /* input what feature to config - always input*/ + UInt32 csConfigSupport; /* output support value - always output*/ + uintptr_t csConfigValue; /* input/output feature value - input on Control(), output on Status()*/ + uintptr_t csReserved1; + uintptr_t csReserved2; +}; +typedef struct VDConfigurationRec VDConfigurationRec; +typedef VDConfigurationRec * VDConfigurationPtr; + +enum +{ + kDVIPowerSwitchFeature = (1 << 0), /* Used for csConfigFeature*/ + kDVIPowerSwitchSupportMask = (1 << 0), /* Read-only*/ + kDVIPowerSwitchActiveMask = (1 << 0), /* Read/write for csConfigValue*/ +}; + +struct VDConfigurationFeatureListRec +{ + OSType * csConfigFeatureList; + ItemCount csNumConfigFeatures; + uintptr_t csReserved1; + uintptr_t csReserved2; +}; +typedef struct VDConfigurationFeatureListRec VDConfigurationFeatureListRec; +typedef VDConfigurationFeatureListRec * VDConfigurationFeatureListRecPtr; + + +#ifndef __LP64__ +#pragma options align=reset +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __IOMACOSVIDEO__ */ + diff --git a/i386/include/IOKit/ndrvsupport/IONDRVFramebuffer.h b/i386/include/IOKit/ndrvsupport/IONDRVFramebuffer.h new file mode 100644 index 0000000..ca65891 --- /dev/null +++ b/i386/include/IOKit/ndrvsupport/IONDRVFramebuffer.h @@ -0,0 +1,352 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1997-1998 Apple Computer, Inc. + * + * + * HISTORY + * + * sdouglas 22 Oct 97 - first checked in. + * sdouglas 24 Jul 98 - start IOKit. + * sdouglas 15 Dec 98 - cpp. + * + */ + +#ifndef _IOKIT_IONDRVFRAMEBUFFER_H +#define _IOKIT_IONDRVFRAMEBUFFER_H + +#include +#include +#include + +#define kIONDRVDisableKey "AAPL,disable-ndrv" + +class IONDRVFramebuffer : public IOFramebuffer +{ + OSDeclareDefaultStructors(IONDRVFramebuffer) + +protected: +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of this class in the future. + */ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * reserved; + +protected: + + IOService * nub; + class IONDRV * ndrv; + + // current configuration + IODisplayModeID currentDisplayMode; + IOIndex currentDepth; + IOIndex currentPage; + UInt8 __reservedE; + + IOPhysicalAddress physicalFramebuffer; + IODeviceMemory * vramRange; + + UInt8 gammaWidth; + UInt8 __reservedD; + UInt8 lastGrayMode; + VDClutBehavior lastClutSetting; + UInt8 __reservedC; + + bool consoleDevice; + UInt32 powerState; + UInt32 ndrvState; + SInt32 ndrvEnter; + OSArray * detailedTimings; + UInt32 detailedTimingsSeed; + UInt32 * detailedTimingsCurrent; + + IODeviceMemory * vramMemory; + + VDResolutionInfoRec cachedVDResolution; + + struct _VSLService * vslServices; + + UInt32 accessFlags; + unsigned int shouldDoI2CPower:1; + unsigned int online:1; + unsigned int avJackState:1; + unsigned int grayMode:1; + unsigned int platformSleep:1; + unsigned int forceReadEDID:1; + unsigned int supportsProbe:1; + unsigned int __reservedB:25; + + IOService * device; + + UInt32 __reservedA[29]; + +private: + struct IONDRVFramebufferPrivate * __private; + +public: + virtual IOReturn doDriverIO( UInt32 commandID, void * contents, + UInt32 commandCode, UInt32 commandKind ); +private: + OSMetaClassDeclareReservedUsed(IONDRVFramebuffer, 0); + + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 1); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 2); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 3); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 4); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 5); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 6); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 7); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 8); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 9); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 10); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 11); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 12); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 13); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 14); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 15); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 16); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 17); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 18); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 19); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 20); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 21); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 22); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 23); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 24); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 25); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 26); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 27); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 28); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 29); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 30); + OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 31); + +private: + + void initForPM ( void ); + + virtual unsigned long maxCapabilityForDomainState( IOPMPowerFlags domainState ); + virtual unsigned long initialPowerStateForDomainState( IOPMPowerFlags domainState ); + virtual unsigned long powerStateForDomainState( IOPMPowerFlags domainState ); + + virtual IOReturn checkDriver( void ); + virtual UInt32 iterateAllModes( IODisplayModeID * displayModeIDs ); + virtual IOReturn getResInfoForMode( IODisplayModeID modeID, + IODisplayModeInformation * theInfo ); + virtual IOReturn getResInfoForArbMode( IODisplayModeID modeID, + IODisplayModeInformation * theInfo ); + IOReturn getResInfoForDetailed( IODisplayModeID modeID, + VDDetailedTimingRec * detailed, + IODisplayModeInformation * info ); + IOIndex mapDepthIndex( IODisplayModeID modeID, IOIndex depth, bool fromDepthMode ); + virtual IOReturn validateDisplayMode( + IODisplayModeID mode, IOOptionBits flags, + VDDetailedTimingRec ** detailed ); + virtual IOReturn setDetailedTiming( + IODisplayModeID mode, IOOptionBits options, + void * description, IOByteCount descripSize ); + virtual void getCurrentConfiguration( void ); + static const IOTVector * _undefinedSymbolHandler( void * self, + const char * libraryName, const char * symbolName ); + static bool _videoJackStateChangeHandler( void * target, void * ref, + IOService * newService, IONotifier * notifier ); + static void _avProbeAction( OSObject * p0, IOTimerEventSource * evtSrc ); + void displayI2CPower( bool enable ); + IOReturn ndrvSetPowerState( UInt32 newState ); + IOReturn ndrvUpdatePowerState( void ); + IOReturn ndrvSetDisplayPowerState( UInt32 newState ); + static IOReturn _probeAction( IONDRVFramebuffer * self, IOOptionBits options ); + bool searchOfflineMode( IODisplayModeID * offlineMode ); + IOReturn processConnectChange( uintptr_t * value ); + IOReturn setMirror( IONDRVFramebuffer * other ); + IOReturn setConnectionFlags( void ); + bool getOnlineState( void ); + IOReturn ndrvGetSetFeature( UInt32 feature, uintptr_t newValue, uintptr_t * currentValue ); + static IOReturn _doControl( IONDRVFramebuffer * self, UInt32 code, void * params ); + static IOReturn _doStatus( IONDRVFramebuffer * self, UInt32 code, void * params ); + static IOReturn extControl( OSObject * owner, void * code, void * params ); + static IOReturn extStatus( OSObject * owner, void * code, void * params ); + IOReturn createI2C( void ); + void setInfoProperties( void ); + +public: + virtual IOReturn doControl( UInt32 code, void * params ); + virtual IOReturn doStatus( UInt32 code, void * params ); + +public: + + virtual IOService * probe( IOService * provider, + SInt32 * score ); + + virtual bool start( IOService * provider ); + + virtual void stop( IOService * provider ); + + virtual void free( void ); + + virtual IOReturn setProperties( OSObject * properties ); + + virtual IOReturn requestProbe( IOOptionBits options ); + + virtual IOReturn enableController( void ); + + virtual IODeviceMemory * makeSubRange( IOPhysicalAddress start, + IOPhysicalLength length ); + virtual IODeviceMemory * getApertureRange( IOPixelAperture aperture ); + virtual IODeviceMemory * getVRAMRange( void ); + + virtual IODeviceMemory * findVRAM( void ); + + virtual bool isConsoleDevice( void ); + + virtual const IOTVector * undefinedSymbolHandler( const char * libraryName, + const char * symbolName ); + + virtual const char * getPixelFormats( void ); + + // Array of supported display modes + virtual IOItemCount getDisplayModeCount( void ); + virtual IOReturn getDisplayModes( IODisplayModeID * allDisplayModes ); + + // Info about a display mode + virtual IOReturn getInformationForDisplayMode( IODisplayModeID displayMode, + IODisplayModeInformation * info ); + + // Mask of pixel formats available in mode and depth + virtual UInt64 getPixelFormatsForDisplayMode( IODisplayModeID displayMode, + IOIndex depth ); + + virtual IOReturn getPixelInformation( + IODisplayModeID displayMode, IOIndex depth, + IOPixelAperture aperture, IOPixelInformation * pixelInfo ); + + // Framebuffer info + + // Current display mode and depth + virtual IOReturn getCurrentDisplayMode( IODisplayModeID * displayMode, + IOIndex * depth ); + + // Set display mode and depth + virtual IOReturn setDisplayMode( IODisplayModeID displayMode, + IOIndex depth ); + + // For pages + virtual IOReturn setApertureEnable( IOPixelAperture aperture, + IOOptionBits enable ); + + virtual IOReturn setStartupDisplayMode( IODisplayModeID displayMode, + IOIndex depth ); + virtual IOReturn getStartupDisplayMode( IODisplayModeID * displayMode, + IOIndex * depth ); + + //// CLUTs + + virtual IOReturn setCLUTWithEntries( IOColorEntry * colors, UInt32 index, + UInt32 numEntries, IOOptionBits options ); + + //// Gamma + + virtual IOReturn setGammaTable( UInt32 channelCount, UInt32 dataCount, + UInt32 dataWidth, void * data ); + + //// Display mode timing information + + virtual IOReturn getTimingInfoForDisplayMode( IODisplayModeID displayMode, + IOTimingInformation * info ); + + //// Detailed timing information + + virtual IOReturn validateDetailedTiming( + void * description, IOByteCount descripSize ); + + virtual IOReturn setDetailedTimings( OSArray * array ); + + //// Controller attributes + + virtual IOReturn setAttribute( IOSelect attribute, uintptr_t value ); + virtual IOReturn getAttribute( IOSelect attribute, uintptr_t * value ); + + //// Connections + + virtual IOItemCount getConnectionCount( void ); + + virtual IOReturn getAttributeForConnection( IOIndex connectIndex, + IOSelect attribute, uintptr_t * value ); + + virtual IOReturn setAttributeForConnection( IOIndex connectIndex, + IOSelect attribute, uintptr_t info ); + + // Apple sensing + + virtual IOReturn getAppleSense( IOIndex connectIndex, + UInt32 * senseType, + UInt32 * primary, + UInt32 * extended, + UInt32 * displayType ); + + virtual IOReturn connectFlags( IOIndex connectIndex, + IODisplayModeID displayMode, IOOptionBits * flags ); + + //// IOHighLevelDDCSense + + virtual bool hasDDCConnect( IOIndex connectIndex ); + virtual IOReturn getDDCBlock( IOIndex connectIndex, UInt32 blockNumber, + IOSelect blockType, IOOptionBits options, + UInt8 * data, IOByteCount * length ); + + //// Interrupts + + virtual IOReturn registerForInterruptType( IOSelect interruptType, + IOFBInterruptProc proc, OSObject * target, void * ref, + void ** interruptRef ); + virtual IOReturn unregisterInterrupt( void * interruptRef ); + virtual IOReturn setInterruptState( void * interruptRef, UInt32 state ); + + //// HW Cursors + + virtual IOReturn setCursorImage( void * cursorImage ); + virtual IOReturn setCursorState( SInt32 x, SInt32 y, bool visible ); + + //// I2C calls + + virtual IOReturn doI2CRequest( UInt32 bus, IOI2CBusTiming * timing, IOI2CRequest * request ); + + //// VSL calls + + static OSStatus VSLNewInterruptService( + void * entryID, + UInt32 serviceType, + _VSLService ** serviceID ); + static OSStatus VSLDisposeInterruptService( _VSLService * serviceID ); + static OSStatus VSLDoInterruptService( _VSLService * serviceID ); + static Boolean VSLPrepareCursorForHardwareCursor( + void * cursorRef, + IOHardwareCursorDescriptor * hwDesc, + IOHardwareCursorInfo * hwCursorInfo ); +}; + +#endif /* ! _IOKIT_IONDRVFRAMEBUFFER_H */ + + diff --git a/i386/include/IOKit/ndrvsupport/IONDRVLibraries.h b/i386/include/IOKit/ndrvsupport/IONDRVLibraries.h new file mode 100644 index 0000000..ad4a26d --- /dev/null +++ b/i386/include/IOKit/ndrvsupport/IONDRVLibraries.h @@ -0,0 +1,696 @@ + +#ifndef __IONDRVLIBRARIES__ +#define __IONDRVLIBRARIES__ + +#include +#include +#include +#include + + +#ifdef __cplusplus +extern "C" { +#endif + +/* NameRegistry error codes */ +enum { + nrLockedErr = -2536, + nrNotEnoughMemoryErr = -2537, + nrInvalidNodeErr = -2538, + nrNotFoundErr = -2539, + nrNotCreatedErr = -2540, + nrNameErr = -2541, + nrNotSlotDeviceErr = -2542, + nrDataTruncatedErr = -2543, + nrPowerErr = -2544, + nrPowerSwitchAbortErr = -2545, + nrTypeMismatchErr = -2546, + nrNotModifiedErr = -2547, + nrOverrunErr = -2548, + nrResultCodeBase = -2549, + nrPathNotFound = -2550, /* a path component lookup failed */ + nrPathBufferTooSmall = -2551, /* buffer for path is too small */ + nrInvalidEntryIterationOp = -2552, /* invalid entry iteration operation */ + nrPropertyAlreadyExists = -2553, /* property already exists */ + nrIterationDone = -2554, /* iteration operation is done */ + nrExitedIteratorScope = -2555, /* outer scope of iterator was exited */ + nrTransactionAborted = -2556, /* transaction was aborted */ + + gestaltUndefSelectorErr = -5551 /*undefined selector was passed to Gestalt*/ +}; + +enum { + kNVRAMProperty = 0x00000020, // matches NR +}; + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef _IOKIT_IOSERVICE_H +typedef struct IOService IOService; +#endif + +IOReturn _IONDRVLibrariesInitialize( IOService * provider ); +IOReturn _IONDRVLibrariesFinalize( IOService * provider ); + +#ifndef kAAPLRegEntryIDKey +#define kAAPLRegEntryIDKey "AAPL,RegEntryID" +#endif + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +UInt32 EndianSwap32Bit( UInt32 data ); + +UInt16 EndianSwap16Bit( UInt16 data ); + +void SynchronizeIO(void); + +OSErr ExpMgrConfigReadLong( + RegEntryIDPtr node, + LogicalAddress configAddr, + UInt32 * valuePtr); + +OSErr ExpMgrConfigWriteLong( + RegEntryIDPtr node, + LogicalAddress configAddr, + UInt32 value); + +OSErr ExpMgrConfigReadWord( + RegEntryIDPtr node, + LogicalAddress configAddr, + UInt16 * valuePtr); + +OSErr ExpMgrConfigWriteWord( + RegEntryIDPtr node, + LogicalAddress configAddr, + UInt16 value); + +OSErr ExpMgrConfigReadByte( + RegEntryIDPtr node, + LogicalAddress configAddr, + UInt8 * valuePtr); + +OSErr ExpMgrConfigWriteByte( + RegEntryIDPtr node, + LogicalAddress configAddr, + UInt8 value); + +OSErr ExpMgrIOReadLong( + RegEntryIDPtr node, + LogicalAddress ioAddr, + UInt32 * valuePtr); + +OSErr ExpMgrIOWriteLong( + RegEntryIDPtr node, + LogicalAddress ioAddr, + UInt32 value); + +OSErr ExpMgrIOReadWord( + RegEntryIDPtr node, + LogicalAddress ioAddr, + UInt16 * valuePtr); + +OSErr ExpMgrIOWriteWord( + RegEntryIDPtr node, + LogicalAddress ioAddr, + UInt16 value); + +OSErr ExpMgrIOReadByte( + RegEntryIDPtr node, + LogicalAddress ioAddr, + UInt8 * valuePtr); + +OSErr ExpMgrIOWriteByte( + RegEntryIDPtr node, + LogicalAddress ioAddr, + UInt8 value); + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/******************************************************************************* + * + * Foundation Types + * + */ +/* Value of a property */ +typedef void * RegPropertyValue; +/* Length of property value */ +typedef UInt32 RegPropertyValueSize; + +/*******************************************************************************/ + +/******************************************************************************* + * + * Root Entry Name Definitions (Applies to all Names in the RootNameSpace) + * + * + Names are a colon-separated list of name components. Name components + * may not themselves contain colons. + * + Names are presented as null-terminated ASCII character strings. + * + Names follow similar parsing rules to Apple file system absolute + * and relative paths. However the '::' parent directory syntax is + * not currently supported. + */ +/* Max length of Entry Name */ +enum { + kRegCStrMaxEntryNameLength = 47 +}; + +/* Entry Names are single byte ASCII */ +typedef char RegCStrEntryName; +typedef char * RegCStrEntryNamePtr; +/* length of RegCStrEntryNameBuf = kRegCStrMaxEntryNameLength+1*/ +typedef char RegCStrEntryNameBuf[48]; +typedef char RegCStrPathName; +typedef UInt32 RegPathNameSize; +enum { + kRegPathNameSeparator = ':', /* 0x3A */ + kRegEntryNameTerminator = 0x00, /* '\0' */ + kRegPathNameTerminator = 0x00 /* '\0' */ +}; + +/******************************************************************************* + * + * Property Name and ID Definitions + * (Applies to all Properties Regardless of NameSpace) + */ +enum { + kRegMaximumPropertyNameLength = 31, /* Max length of Property Name */ + kRegPropertyNameTerminator = 0x00 /* '\0' */ +}; + +typedef char RegPropertyNameBuf[32]; +typedef char RegPropertyName; +typedef char * RegPropertyNamePtr; +enum { + kRegMaxPropertyNameLength = kRegMaximumPropertyNameLength +}; + +/******************************************************************************* + * + * Iteration Operations + * + * These specify direction when traversing the name relationships + */ +typedef UInt32 RegIterationOp; +typedef RegIterationOp RegEntryIterationOp; +enum { + /* Absolute locations*/ + kRegIterRoot = 0x00000002, /* "Upward" Relationships */ + kRegIterParents = 0x00000003, /* include all parent(s) of entry */ + /* "Downward" Relationships*/ + kRegIterChildren = 0x00000004, /* include all children */ + kRegIterSubTrees = 0x00000005, /* include all sub trees of entry */ + kRegIterDescendants = 0x00000005, /* include all descendants of entry */ + /* "Horizontal" Relationships */ + kRegIterSibling = 0x00000006, /* include all siblings */ + /* Keep doing the same thing*/ + kRegIterContinue = 0x00000001 +}; + +/******************************************************************************* + * + * Name Entry and Property Modifiers + * + * + * + * Modifiers describe special characteristics of names + * and properties. Modifiers might be supported for + * some names and not others. + * + * Device Drivers should not rely on functionality + * specified as a modifier. + */ +typedef UInt32 RegModifiers; +typedef RegModifiers RegEntryModifiers; +typedef RegModifiers RegPropertyModifiers; +enum { + kRegNoModifiers = 0x00000000, /* no entry modifiers in place */ + kRegUniversalModifierMask = 0x0000FFFF, /* mods to all entries */ + kRegNameSpaceModifierMask = 0x00FF0000, /* mods to all entries within namespace */ + kRegModifierMask = (RegModifiers)0xFF000000 /* mods to just this entry */ +}; + +/* Universal Property Modifiers */ +enum { + kRegPropertyValueIsSavedToNVRAM = 0x00000020, /* property is non-volatile (saved in NVRAM) */ + kRegPropertyValueIsSavedToDisk = 0x00000040 /* property is non-volatile (saved on disk) */ +}; + +typedef size_t Size; + +#ifndef _IOKIT_IOREGISTRYENTRY_H +typedef struct IORegistryIterator IORegistryIterator; +typedef struct OSIterator OSIterator; +#endif /* _IOKIT_IOREGISTRYENTRY_H */ +typedef IORegistryIterator * RegEntryIter; +typedef OSIterator * RegPropertyIter; + +OSStatus RegistryEntryIDCopy( const RegEntryID * entryID, RegEntryID * to ); + +OSStatus RegistryEntryIDInit( RegEntryID * entryID ); + +Boolean RegistryEntryIDCompare( const RegEntryID * id1, const RegEntryID * id2); + +OSStatus RegistryPropertyGetSize( + const RegEntryID * entryID, + const RegPropertyName * propertyName, + RegPropertyValueSize * propertySize); + +OSStatus RegistryPropertyGet( + const RegEntryID * entryID, + const RegPropertyName * propertyName, + void * propertyValue, + RegPropertyValueSize * propertySize); + +OSStatus RegistryPropertyCreate( + const RegEntryID * entryID, + const RegPropertyName * propertyName, + const void * propertyValue, + RegPropertyValueSize propertySize); + +OSStatus RegistryPropertyDelete( + const RegEntryID * entryID, + const RegPropertyName * propertyName); + +OSStatus RegistryPropertySet( + const RegEntryID * entryID, + const RegPropertyName * propertyName, + const void * propertyValue, + RegPropertyValueSize propertySize); + +OSStatus RegistryPropertyGetMod( + const RegEntryID * entry, + const RegPropertyName * name, + RegPropertyModifiers * modifiers); + +OSStatus RegistryPropertySetMod( + const RegEntryID * entry, + const RegPropertyName * name, + RegPropertyModifiers modifiers); + +OSStatus RegistryPropertyIterateCreate( + const RegEntryID * entry, + RegPropertyIter * cookie); + +OSStatus RegistryPropertyIterateDispose( RegPropertyIter * cookie); + +OSStatus RegistryPropertyIterate( + RegPropertyIter * cookie, + RegPropertyName * foundProperty, + Boolean * done); + +OSStatus RegistryEntryIterateCreate( RegEntryIter * cookie); + +OSStatus RegistryEntryIterateDispose( RegEntryIter * cookie); + +OSStatus RegistryEntryIterateSet( RegEntryIter * cookie, + const RegEntryID * startEntryID); + +OSStatus RegistryEntryIterate( RegEntryIter * cookie, + RegEntryIterationOp relationship, + RegEntryID * foundEntry, + Boolean * done); + +OSStatus RegistryCStrEntryToName( const RegEntryID * entryID, + RegEntryID * parentEntry, + RegCStrEntryName * nameComponent, + Boolean * done ); + +OSStatus RegistryCStrEntryLookup( const RegEntryID * parentEntry, + const RegCStrPathName * path, + RegEntryID * newEntry); + +OSStatus RegistryCStrEntryCreate( const RegEntryID * parentEntry, + const RegCStrPathName * name, + RegEntryID * newEntry); + +OSStatus RegistryEntryDelete(const RegEntryID * entryID); + +OSStatus RegistryEntryIDDispose(RegEntryID * entryID); + +// + +OSStatus RegistryEntryCopy( + RegEntryID * parentEntryID, + RegEntryID * sourceDevice, + RegEntryID * destDevice); + +OSStatus RegistryEntrySearch( + RegEntryIter * cookie, + RegEntryIterationOp relationship, + RegEntryID * foundEntry, + Boolean * done, + const RegPropertyName * propertyName, + const void * propertyValue, + RegPropertyValueSize propertySize); + +OSStatus RegistryEntryToPathSize( + const RegEntryID * entryID, + RegPathNameSize * pathSize); + +OSStatus RegistryCStrEntryToPath( + const RegEntryID * entryID, + RegCStrPathName * pathName, + RegPathNameSize pathSize); + +OSStatus RegistryPropertyRename( + const RegEntryID * entry, + const RegPropertyName * oldName, + const RegPropertyName * newName); + +OSStatus RegistryEntryGetMod( + const RegEntryID * entry, + RegEntryModifiers * modifiers); + +OSStatus RegistryEntrySetMod( + const RegEntryID * entry, + RegEntryModifiers modifiers); + +OSStatus RegistryEntryMod( + RegEntryIter * cookie, + RegEntryIterationOp relationship, + RegEntryID * foundEntry, + Boolean * done, + RegEntryModifiers matchingModifiers); + +OSStatus RegistryEntryPropertyMod( + RegEntryIter * cookie, + RegEntryIterationOp relationship, + RegEntryID * foundEntry, + Boolean * done, + RegPropertyModifiers matchingModifiers); + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +void SynchronizeIO(void); + +Boolean CompareAndSwap( + UInt32 oldVvalue, + UInt32 newValue, + UInt32 * OldValueAdr); + +UInt32 CStrLen(const char * src); + +char * CStrCopy( char * dst, const char * src); + +SInt16 CStrCmp( + const char * s1, + const char * s2); + +char * CStrCat( + char * dst, + const char * src); +char * CStrNCopy( + char * dst, + const char * src, + UInt32 max); +SInt16 CStrNCmp( + const char * s1, + const char * s2, + UInt32 max); +char * CStrNCat( + char * dst, + const char * src, + UInt32 max); + +void BlockCopy( + const void * srcPtr, + void * destPtr, + Size byteCount); +void BlockMove( + const void * srcPtr, + void * destPtr, + Size byteCount); +void BlockMoveData( + const void * srcPtr, + void * destPtr, + Size byteCount); +void BlockMoveDataUncached( + const void * srcPtr, + void * destPtr, + Size byteCount); +void BlockMoveUncached( + const void * srcPtr, + void * destPtr, + Size byteCount); +void BlockZero( + const void * srcPtr, + Size byteCount); +void BlockZeroUncached( + const void * srcPtr, + Size byteCount); + +char * PStrCopy( char *to, const char *from ); + +void PStrToCStr( char *to, const char *from ); + +void CStrToPStr( char *to, const char *from ); + +LogicalAddress PoolAllocateResident(ByteCount byteSize, Boolean clear); + +OSStatus PoolDeallocate( LogicalAddress address ); + +UInt32 CurrentExecutionLevel(void); + +UnsignedWide UpTime( void ); + +UnsignedWide AddAbsoluteToAbsolute(UnsignedWide left, UnsignedWide right); + +UnsignedWide SubAbsoluteFromAbsolute(UnsignedWide left, UnsignedWide right); + +UnsignedWide DurationToAbsolute( Duration theDuration); + +UnsignedWide AddDurationToAbsolute( Duration duration, UnsignedWide absolute ); + +UnsignedWide NanosecondsToAbsolute ( UnsignedWide theNanoseconds); + +UnsignedWide AbsoluteToNanoseconds( UnsignedWide absolute ); + +Duration AbsoluteDeltaToDuration( UnsignedWide left, UnsignedWide right ); + +Duration AbsoluteToDuration( UnsignedWide result ); + +OSStatus DelayForHardware( UnsignedWide time ); + +OSStatus DelayUntil( UnsignedWide time ); + +OSStatus DelayFor( Duration theDuration ); + +void SysDebugStr( const char * from ); + +void SysDebug( void ); + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +enum { + paramErr = -50, /*error in user parameter list*/ + noHardwareErr = -200, /*Sound Manager Error Returns*/ + notEnoughHardwareErr = -201, /*Sound Manager Error Returns*/ + userCanceledErr = -128, + qErr = -1, /*queue element not found during deletion*/ + vTypErr = -2, /*invalid queue element*/ + corErr = -3, /*core routine number out of range*/ + unimpErr = -4, /*unimplemented core routine*/ + SlpTypeErr = -5, /*invalid queue element*/ + seNoDB = -8, /*no debugger installed to handle debugger command*/ + controlErr = -17, /*I/O System Errors*/ + statusErr = -18, /*I/O System Errors*/ + readErr = -19, /*I/O System Errors*/ + writErr = -20, /*I/O System Errors*/ + badUnitErr = -21, /*I/O System Errors*/ + unitEmptyErr = -22, /*I/O System Errors*/ + openErr = -23, /*I/O System Errors*/ + closErr = -24, /*I/O System Errors*/ + dRemovErr = -25, /*tried to remove an open driver*/ + dInstErr = -26, /*DrvrInstall couldn't find driver in resources*/ + + badCksmErr = -69, /*addr mark checksum didn't check*/ +}; +enum { + durationMicrosecond = -1, /* Microseconds are negative*/ + durationMillisecond = 1, /* Milliseconds are positive*/ + durationSecond = 1000, /* 1000 * durationMillisecond*/ + durationMinute = 60000, /* 60 * durationSecond,*/ + durationHour = 3600000, /* 60 * durationMinute,*/ + durationDay = 86400000, /* 24 * durationHour,*/ + durationNoWait = 0, /* don't block*/ + durationForever = 0x7FFFFFFF /* no time limit*/ +}; +#ifndef NULL + #if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C)) + /* Symantec C compilers (but not C++) want NULL and nil to be (void*)0 */ + #define NULL ((void *) 0) + #else + /* in case int is 16-bits, make sure NULL is 32-bits */ + #define NULL 0L + #endif +#endif + +#ifndef nil + #define nil NULL +#endif + +typedef ResType VSLGestaltType; + +enum { + clutType = 0, /*0 if lookup table*/ + fixedType = 1, /*1 if fixed table*/ + directType = 2, /*2 if direct values*/ + RGBDirect = 16 /* 16 & 32 bits/pixel pixelType value */ +}; +typedef UInt32 * UInt32Ptr; + +typedef struct IOHardwareCursorDescriptor HardwareCursorDescriptorRec; +typedef HardwareCursorDescriptorRec * HardwareCursorDescriptorPtr; +typedef struct IOHardwareCursorInfo HardwareCursorInfoRec; +typedef HardwareCursorInfoRec * HardwareCursorInfoPtr; + +typedef ResType InterruptServiceType; +typedef struct _VSLService * InterruptServiceIDType; +typedef InterruptServiceIDType * InterruptServiceIDPtr; + +enum { + kVBLInterruptServiceType = 'vbl ', + kHBLInterruptServiceType = 'hbl ', + kFrameInterruptServiceType = 'fram', + kConnectInterruptServiceType = 'dci ', /* Renamed -- Use kFBCheckInterruptServiceType*/ + kFBConnectInterruptServiceType = kConnectInterruptServiceType, /* Demand to check configuration (Hardware unchanged)*/ + kFBChangedInterruptServiceType = 'chng', /* Demand to rebuild (Hardware has reinitialized on dependent change)*/ + kFBOfflineInterruptServiceType = 'remv', /* Demand to remove framebuffer (Hardware not available on dependent change -- but must not buserror)*/ + kFBOnlineInterruptServiceType = 'add ' /* Notice that hardware is available (after being removed)*/ +}; + +enum { + kVSLClamshellStateGestaltType = 'clam', +}; + +OSStatus +VSLGestalt( VSLGestaltType selector, UInt32 * response ); + +OSStatus +VSLSetDisplayConfiguration(RegEntryID * entryID, + RegPropertyName * propertyName, + RegPropertyValue configData, + RegPropertyValueSize configDataSize); +OSErr +VSLNewInterruptService( + RegEntryID * serviceDevice, + InterruptServiceType serviceType, + InterruptServiceIDPtr serviceID); + +OSErr +VSLWaitOnInterruptService( + InterruptServiceIDType serviceID, + Duration timeout); + +OSErr +VSLDisposeInterruptService(InterruptServiceIDType serviceID); + +OSErr +VSLDoInterruptService(InterruptServiceIDType serviceID); + +Boolean +VSLPrepareCursorForHardwareCursor( + void * cursorRef, + IOHardwareCursorDescriptor * hardwareDescriptor, + IOHardwareCursorInfo * hwCursorInfo); + +typedef UnsignedWide Nanoseconds; +enum { + /* Version Release Stage Codes */ + developStage = 0x20, + alphaStage = 0x40, + betaStage = 0x60, + finalStage = 0x80 +}; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +typedef struct OpaqueIOCommandID* IOCommandID; + +typedef UInt32 IOCommandKind; +typedef UInt32 IOCommandCode; + +OSErr IOCommandIsComplete( IOCommandID commandID, OSErr result); + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef __IONDRV__ +typedef struct OpaqueInterruptSetID* InterruptSetID; +#else +typedef class IONDRVInterruptSet * InterruptSetID; +#endif /* __IONDRV__ */ + +typedef long InterruptMemberNumber; +struct InterruptSetMember { + InterruptSetID setID; + InterruptMemberNumber member; +}; +typedef struct InterruptSetMember InterruptSetMember; +enum { + kISTChipInterruptSource = 0, + kISTOutputDMAInterruptSource = 1, + kISTInputDMAInterruptSource = 2, + kISTPropertyMemberCount = 3 +}; + +typedef InterruptSetMember ISTProperty[3]; +#define kISTPropertyName "driver-ist" + +typedef long InterruptReturnValue; +enum { + kFirstMemberNumber = 1, + kIsrIsComplete = 0, + kIsrIsNotComplete = -1, + kMemberNumberParent = -2 +}; + +typedef Boolean InterruptSourceState; +enum { + kSourceWasEnabled = true, + kSourceWasDisabled = false +}; + +typedef InterruptMemberNumber (*InterruptHandler) (InterruptSetMember ISTmember, void *refCon, UInt32 theIntCount); +typedef void (*InterruptEnabler) (InterruptSetMember ISTmember, void *refCon); +typedef InterruptSourceState (*InterruptDisabler)(InterruptSetMember ISTmember, void *refCon); + +enum { + kReturnToParentWhenComplete = 0x00000001, + kReturnToParentWhenNotComplete = 0x00000002 +}; + +typedef OptionBits InterruptSetOptions; + + +OSStatus GetInterruptFunctions( + InterruptSetID setID, + InterruptMemberNumber member, + void ** refCon, + InterruptHandler * handlerFunction, + InterruptEnabler * enableFunction, + InterruptDisabler * disableFunction); + +OSStatus InstallInterruptFunctions( + InterruptSetID setID, + InterruptMemberNumber member, + void * refCon, + InterruptHandler handlerFunction, + InterruptEnabler enableFunction, + InterruptDisabler disableFunction); + +OSStatus CreateInterruptSet( + InterruptSetID parentSet, + InterruptMemberNumber parentMember, + InterruptMemberNumber setSize, + InterruptSetID * setID, + InterruptSetOptions options); + +OSStatus DeleteInterruptSet( InterruptSetID setID ); + + +#ifdef __cplusplus +} +#endif + +#endif /* __IONDRVLIBRARIES__ */ + diff --git a/i386/include/IOKit/ndrvsupport/IONDRVSupport.h b/i386/include/IOKit/ndrvsupport/IONDRVSupport.h new file mode 100644 index 0000000..2fdfcb6 --- /dev/null +++ b/i386/include/IOKit/ndrvsupport/IONDRVSupport.h @@ -0,0 +1,95 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __IONDRVSUPPORT__ +#define __IONDRVSUPPORT__ + +#include + +#ifndef __LP64__ +#pragma options align=mac68k +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#define kIONDRVIgnoreKey "AAPL,iokit-ignore-ndrv" +#define kIONDRVForXKey "AAPL,iokit-ndrv" + +struct IOTVector { + void * pc; + UInt32 toc; +}; +typedef struct IOTVector IOTVector; + +struct IONDRVInterruptSetMember { + void * setID; + UInt32 member; +}; +typedef struct IONDRVInterruptSetMember IONDRVInterruptSetMember; + +typedef SInt32 (*IONDRVInterruptHandler)( IONDRVInterruptSetMember setMember, void *refCon, UInt32 theIntCount); +typedef void (*IONDRVInterruptEnabler)( IONDRVInterruptSetMember setMember, void *refCon); +typedef Boolean (*IONDRVInterruptDisabler)( IONDRVInterruptSetMember setMember, void *refCon); + +enum { + kIONDRVFirstMemberNumber = 1, + kIONDRVIsrIsComplete = 0, + kIONDRVIsrIsNotComplete = -1, + kIONDRVMemberNumberParent = -2 +}; + +enum { + kIONDRVReturnToParentWhenComplete = 0x00000001, + kIONDRVReturnToParentWhenNotComplete = 0x00000002 +}; + +enum { + kIONDRVISTChipInterruptSource = 0, + kIONDRVISTOutputDMAInterruptSource = 1, + kIONDRVISTInputDMAInterruptSource = 2, + kIONDRVISTPropertyMemberCount = 3 +}; + +#define kIONDRVISTPropertyName "driver-ist" + +IOReturn +IONDRVInstallInterruptFunctions(void * setID, + UInt32 member, + void * refCon, + IOTVector * handler, + IOTVector * enabler, + IOTVector * disabler ); + +typedef const IOTVector * (*IONDRVUndefinedSymbolHandler)( void * self, + const char * libraryName, const char * symbolName ); + +#ifndef __LP64__ +#pragma options align=reset +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __IONDRVSUPPORT__ */ diff --git a/i386/include/IOKit/network/IOBasicOutputQueue.h b/i386/include/IOKit/network/IOBasicOutputQueue.h new file mode 100644 index 0000000..3519805 --- /dev/null +++ b/i386/include/IOKit/network/IOBasicOutputQueue.h @@ -0,0 +1,319 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOBASICOUTPUTQUEUE_H +#define _IOBASICOUTPUTQUEUE_H + +#include +#include +#include // FIXME - remove + +struct IOMbufQueue; + +/*! @class IOBasicOutputQueue + @abstract A concrete implementation of an IOOutputQueue. + @discussion This object uses a spinlock to protect the packet queue from multiple producers. + A single producer is promoted to become a consumer when the queue is + not active. Otherwise, the producer will simply queue the packet and + return without blocking. + + The flow of packets from the queue to its target can be controlled + by calling methods such as start(), stop(), or service(). The target + is expected to call those methods from a single threaded context, + i.e. the work loop context in a network driver. In addition, the + target must also return a status for every packet delivered by the + consumer thread. This return value is the only mechanism that the + target can use to manage the queue when it is running on the + consumer thread. +*/ + +class IOBasicOutputQueue : public IOOutputQueue +{ + OSDeclareDefaultStructors( IOBasicOutputQueue ) + +private: + static IOReturn dispatchNetworkDataNotification(void * target, + void * param, + IONetworkData * data, + UInt32 type); + + void dequeue(); + +protected: + OSObject * _target; + IOOutputAction _action; + IOOutputQueueStats * _stats; + IONetworkData * _statsData; + IOSimpleLock * _spinlock; + IOMbufQueue * _inQueue; + IOMbufQueue * _queues[2]; + volatile bool _waitDequeueDone; + volatile UInt32 _state; + volatile UInt32 _serviceCount; + +/*! @function serviceThread + @abstract Provides an implementation for the serviceThread() method + defined in IOOutputQueue. + @discussion This method is called by the scheduled service thread when it + starts to run. The service thread is scheduled by service() + to restart a stalled queue when the kServiceAsync option is given. + @param param A parameter that was given to scheduleServiceThread(). + This parameter is not used. +*/ + + virtual void serviceThread(void * param); + +/*! @function output + @abstract Transfers all packets in the mbuf queue to the target. + @param queue A queue of output packets. + @param state Returns a state bit defined by IOBasicOutputQueue that + declares the new state of the queue following this method call. + A kStateStalled is returned if the queue should stall, otherwise 0 + is returned. +*/ + + virtual void output(IOMbufQueue * queue, UInt32 * state); + +/*! @function free + @abstract Frees the IOBasicOutputQueue object. + @discussion This function releases allocated resources, then call super::free(). +*/ + + virtual void free(); + +/*! @function handleNetworkDataAccess + @abstract Handles an external access to the IONetworkData object + returned by getStatisticsData(). + @param data The IONetworkData object being accessed. + @param type Description of the type of access being performed. + @param param An optional parameter for the handler. + @result Returns kIOReturnSuccess on success, or an error code otherwise. +*/ + + virtual IOReturn handleNetworkDataAccess(IONetworkData * data, + UInt32 type, + void * param); + +public: + +/*! @function init + @abstract Initializes an IOBasicOutputQueue object. + @param target The object that will handle packets removed from the + queue, which is usually a subclass of IONetworkController. + @param action The function that will handle packets removed from the + queue. + @param capacity The initial capacity of the output queue. + @result Returns true if initialized successfully, false otherwise. +*/ + + virtual bool init(OSObject * target, + IOOutputAction action, + UInt32 capacity = 0); + +/*! @function withTarget + @abstract Factory method that constructs and initializes an + IOBasicOutputQueue object. + @param target An IONetworkController object that will handle packets + removed from the queue. + @param capacity The initial capacity of the output queue. + @result Returns an IOBasicOutputQueue object on success, or 0 otherwise. +*/ + + static IOBasicOutputQueue * withTarget(IONetworkController * target, + UInt32 capacity = 0); + +/*! @function withTarget + @abstract Factory method that constructs and initializes an + IOBasicOutputQueue object. + @param target The object that will handle packets removed from the + queue. + @param action The function that will handle packets removed from the + queue. + @param capacity The initial capacity of the output queue. + @result Returns an IOBasicOutputQueue object on success, or 0 otherwise. +*/ + + static IOBasicOutputQueue * withTarget(OSObject * target, + IOOutputAction action, + UInt32 capacity = 0); + +/*! @function enqueue + @abstract Adds a packet, or a chain of packets, + to the queue. + @discussion This method is called by a client to add a packet, or a chain of packets, + to the queue. A packet is described by an mbuf chain, while a chain + of packets is constructed by linking multiple mbuf chains via the + m_nextpkt field. This method can be called by multiple client + threads. + @param m A single packet, or a chain of packets. + @param param A parameter provided by the caller. + @result Always returns 0. +*/ + + virtual UInt32 enqueue(mbuf_t m, void * param); + +/*! @function start + @abstract Starts up the packet flow between the queue and its target. + @discussion Called by the target to start the queue. This will allow + packets to be removed from the queue, and then delivered to the target. + @result Returns true if the queue was started successfully, false otherwise. */ + + virtual bool start(); + +/*! @function stop + @abstract Stops the packet flow between the queue and its target. + @discussion This method stops the queue and prevents it from sending packets to its + target. This call is synchronous and it may block. After this method + returns, the queue will no longer call the registered target/action, + even as new packets are added to the queue. The queue will continue to + absorb new packets until the size of the queue reaches its capacity. + The registered action must never call stop(), or a deadlock will occur. + @result Returns the previous running state of the queue, + true if the queue was running, false if the queue was already stopped. +*/ + + virtual bool stop(); + +/*! @enum ServiceAsync + @abstract The option bits recognized by service(). + @constant kServiceAsync Set this option to service the queue in + an asynchronous manner. The service() call will not block, but a + scheduling latency will be introduced before the queue is serviced. +*/ + + enum { + kServiceAsync = 0x1 + }; + +/*! @function service + @abstract Services a queue that was stalled by the target. + @discussion A target that stalls the queue must call service() when + it becomes ready to accept more packets. Calling this method when the + queue is not stalled is harmless. + @result Returns true if the queue was stalled and there were packets sitting in + the queue awaiting delivery, false otherwise. +*/ + + virtual bool service(IOOptionBits options = 0); + +/*! @function flush + @abstract Drops and frees all packets currently held by the queue. + @discussion To ensure that all packets are removed from the queue, + stop() should be called prior to flush(), to make sure there are + no packets in-flight and being delivered to the target. + @result Returns the number of packets that were dropped and freed. +*/ + + virtual UInt32 flush(); + +/*! @function setCapacity + @abstract Changes the number of packets that the queue can hold + before it begins to drop excess packets. + @param capacity The new desired capacity. + @result Returns true if the new capacity was accepted, false otherwise. +*/ + + virtual bool setCapacity(UInt32 capacity); + +/*! @function getCapacity + @abstract Gets the number of packets that the queue can hold. + @discussion The queue will begin to drop incoming packets when the + size of the queue reaches its capacity. + @result Returns the current queue capacity. +*/ + + virtual UInt32 getCapacity() const; + +/*! @function getSize + @abstract Gets the number of packets currently held in the queue. + @result Returns the size of the queue. +*/ + + virtual UInt32 getSize() const; + +/*! @function getDropCount + @abstract Gets the number of packets dropped by the queue. + @result Returns the number of packets dropped due to over-capacity, or by + external calls to the flush() method. +*/ + + virtual UInt32 getDropCount(); + +/*! @function getOutputCount + @abstract Gets the number of packets accepted by the target. + @result Returns the number of times that kIOOutputStatusAccepted is returned by + the target. +*/ + + virtual UInt32 getOutputCount(); + +/*! @function getRetryCount + @abstract Gets the number of instances when the target has refused to + accept the packet provided. + @result Returns the number of times that kIOOutputStatusRetry is returned by the + target. +*/ + + virtual UInt32 getRetryCount(); + +/*! @function getStallCount + @abstract Gets the number of instances when the target has stalled the + queue. + @result Returns the number of times that kIOOutputCommandStall is returned by the + target. +*/ + + virtual UInt32 getStallCount(); + +/*! @enum GetStateBits + @abstract The bits in the value returned by getState(). + @constant kStateRunning Set when the queue is running. Calling start() + and stop() will set or clear this bit. + @constant kStateStalled Set when the queue is stalled by the target. + @constant kStateActive Set when a consumer thread is actively removing + packets from the queue and passing them to the target. +*/ + + enum { + kStateRunning = 0x1, + kStateOutputStalled = 0x2, + kStateOutputActive = 0x4, + kStateOutputServiceMask = 0xff00 + }; + +/*! @function getState + @abstract Gets the state of the queue object. + @result Returns the current state of the queue object. +*/ + + virtual UInt32 getState() const; + +/*! @function getStatisticsData + @abstract Returns an IONetworkData object containing statistics counters + updated by the queue. + @result Returns an IONetworkData object. +*/ + + virtual IONetworkData * getStatisticsData() const; +}; + +#endif /* !_IOBASICOUTPUTQUEUE_H */ diff --git a/i386/include/IOKit/network/IOEthernetController.h b/i386/include/IOKit/network/IOEthernetController.h new file mode 100644 index 0000000..c2f85e7 --- /dev/null +++ b/i386/include/IOKit/network/IOEthernetController.h @@ -0,0 +1,502 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOETHERNETCONTROLLER_H +#define _IOETHERNETCONTROLLER_H + +#include + +/*! @defined kIOEthernetControllerClass + @abstract kIOEthernetControllerClass is the name of the + IOEthernetController class. */ + +#define kIOEthernetControllerClass "IOEthernetController" + +/*! @defined kIOEthernetAddressSize + @abstract The number of bytes in an Ethernet hardware address. */ + +#define kIOEthernetAddressSize 6 + +/*! @defined kIOEthernetMaxPacketSize + @abstract The maximum size of an Ethernet packet, including + the FCS bytes. */ + +#define kIOEthernetMaxPacketSize 1518 + +/*! @defined kIOEthernetMinPacketSize + @abstract The minimum size of an Ethernet packet, including + the FCS bytes. */ + +#define kIOEthernetMinPacketSize 64 + +/*! @defined kIOEthernetCRCSize + @abstract The size in bytes of the 32-bit CRC value appended + to the end of each Ethernet frame. */ + +#define kIOEthernetCRCSize 4 + +/*! @defined kIOEthernetWakeOnLANFilterGroup + @abstract kIOEthernetWakeOnLANFilterGroup describes the name assigned + to the Ethernet Wake-On-LAN filter group. This group represents + wake filters that are supported by the controller. */ + +#define kIOEthernetWakeOnLANFilterGroup "IOEthernetWakeOnLANFilterGroup" + +/*! @defined kIOEthernetDisabledWakeOnLANFilterGroup + @abstract kIOEthernetDisabledWakeOnLANFilterGroup describes the name + assigned to the disabled Ethernet Wake-On-LAN filter group. This + group represents wake filters that are currently disabled. + Membership in this group is dynamic. */ + +#define kIOEthernetDisabledWakeOnLANFilterGroup \ + "IOEthernetDisabledWakeOnLANFilterGroup" + +/*! @enum WakeOnLANFilters. + @abstract All filters in the Wake-on-LAN filter group. + @discussion Each filter listed will respond to a network event that + will trigger a system wake-up. + @constant kIOEthernetWakeOnMagicPacket Reception of a Magic Packet. + @constant kIOEthernetWakeOnPacketAddressMatch Reception of a packet + which passes through any of the address filtering mechanisms based + on its destination Ethernet address. This may include unicast, + broadcast, or multicast addresses depending on the current state + and setting of the corresponding packet filters. */ + +enum { + kIOEthernetWakeOnMagicPacket = 0x00000001, + kIOEthernetWakeOnPacketAddressMatch = 0x00000002 +}; + +/* + * Kernel + */ +#if defined(KERNEL) && defined(__cplusplus) + +struct IOEthernetAddress { + UInt8 bytes[kIOEthernetAddressSize]; +}; + +/*! @const gIOEthernetWakeOnLANFilterGroup + @discussion gIOEthernetWakeOnLANFilterGroup is an OSSymbol object + that contains the name of the Ethernet Wake-on-LAN filter group + defined by kIOEthernetWakeOnLANFilterGroup. */ + +extern const OSSymbol * gIOEthernetWakeOnLANFilterGroup; + +/*! @const gIOEthernetDisabledWakeOnLANFilterGroup + @discussion gIOEthernetDisabledWakeOnLANFilterGroup is an OSSymbol object + that contains the name of the disabled Ethernet Wake-on-LAN filter group + defined by kIOEthernetDisabledWakeOnLANFilterGroup. */ + +extern const OSSymbol * gIOEthernetDisabledWakeOnLANFilterGroup; + +/*! @class IOEthernetController + @abstract Abstract superclass for Ethernet controllers. + @discussion Ethernet controller drivers should subclass IOEthernetController, and implement + or override the hardware specific methods to create an Ethernet driver. + An interface object (an IOEthernetInterface instance) must be + instantiated by the driver, through attachInterface(), to connect + the controller driver to the data link layer. +*/ + +class IOEthernetController : public IONetworkController +{ + OSDeclareAbstractStructors( IOEthernetController ) + +protected: + struct ExpansionData { }; + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * _reserved; + + +public: + +/*! @function initialize + @abstract IOEthernetController class initializer. + @discussion Creates global OSSymbol objects that are used as keys. */ + + static void initialize(); + +/*! @function init + @abstract Initializes an IOEthernetController object. + @param properties A dictionary object containing a property table + associated with this instance. + @result Returns true on success, false otherwise. +*/ + + virtual bool init(OSDictionary * properties); + +/*! @function getPacketFilters + @abstract Gets the set of packet filters supported by the Ethernet + controller in the given filter group. + @discussion The default implementation of the abstract method inherited + from IONetworkController. When the filter group specified is + gIONetworkFilterGroup, then this method will return a value formed by + a bitwise OR of kIOPacketFilterUnicast, kIOPacketFilterBroadcast, + kIOPacketFilterMulticast, kIOPacketFilterPromiscuous. Otherwise, the + return value will be set to zero (0). Subclasses must override this + method if their filtering capability differs from what is reported by + this default implementation. This method is called from the workloop + context, and the result is published to the I/O Kit Registry. + @param group The name of the filter group. + @param filters Pointer to the mask of supported filters returned by + this method. + @result Returns kIOReturnSuccess. Drivers that override this + method must return kIOReturnSuccess to indicate success, or an error + return code otherwise. +*/ + + virtual IOReturn getPacketFilters(const OSSymbol * group, + UInt32 * filters) const; + +/*! @function enablePacketFilter + @abstract Enables one of the supported packet filters from the + given filter group. + @discussion The default implementation of the abstract method inherited + from IONetworkController. This method will call setMulticastMode() or + setPromiscuousMode() when the multicast or the promiscuous filter is to be + enabled. Requests to disable the Unicast or Broadcast filters are handled + silently, without informing the subclass. Subclasses can override this + method to change this default behavior, or to extend it to handle + additional filter types or filter groups. This method call is synchronized + by the workloop's gate. + @param group The name of the filter group containing the filter to be + enabled. + @param aFilter The filter to enable. + @param enabledFilters All filters currently enabled by the client. + @param options Optional flags for the enable request. + @result Returns the value returned by setMulticastMode() or setPromiscuousMode() if + either of those two methods are called. Returns kIOReturnSuccess if the filter + specified is kIOPacketFilterUnicast or kIOPacketFilterBroadcast. + Returns kIOReturnUnsupported if the filter group specified is not + gIONetworkFilterGroup. +*/ + + virtual IOReturn enablePacketFilter(const OSSymbol * group, + UInt32 aFilter, + UInt32 enabledFilters, + IOOptionBits options = 0); + +/*! @function disablePacketFilter + @abstract Disables a packet filter that is currently enabled from the + given filter group. + @discussion The default implementation of the abstract method inherited + from IONetworkController. This method will call setMulticastMode() or + setPromiscuousMode() when the multicast or the promiscuous filter is to be + disabled. Requests to disable the Unicast or Broadcast filters are handled + silently, without informing the subclass. Subclasses can override this + method to change this default behavior, or to extend it to handle + additional filter types or filter groups. This method call is synchronized + by the workloop's gate. + @param group The name of the filter group containing the filter to be + disabled. + @param aFilter The filter to disable. + @param enabledFilters All filters currently enabled by the client. + @param options Optional flags for the disable request. + @result Returns the value returned by setMulticastMode() or setPromiscuousMode() if + either of those two methods are called. Returns kIOReturnSuccess if the filter + specified is kIOPacketFilterUnicast or kIOPacketFilterBroadcast. + Returns kIOReturnUnsupported if the filter group specified is not + gIONetworkFilterGroup. +*/ + + virtual IOReturn disablePacketFilter(const OSSymbol * group, + UInt32 aFilter, + UInt32 enabledFilters, + IOOptionBits options = 0); + +/*! @function getHardwareAddress + @abstract Gets the Ethernet controller's station address. + @discussion The default implementation of the abstract method inherited + from IONetworkController. This method will call the overloaded form + IOEthernetController::getHardwareAddress() that subclasses are expected + to override. + @param addr The buffer where the controller's hardware address should + be written. + @param inOutAddrBytes The size of the address buffer provided by the + client, and replaced by this method with the actual size of + the hardware address in bytes. + @result Returns kIOReturnSuccess on success, or an error otherwise. +*/ + + virtual IOReturn getHardwareAddress(void * addr, + UInt32 * inOutAddrBytes); + +/*! @function setHardwareAddress + @abstract Sets or changes the station address used by the Ethernet + controller. + @discussion The default implementation of the abstract method inherited + from IONetworkController. This method will call the overloaded form + IOEthernetController::setHardwareAddress() that subclasses are expected + to override. + @param addr The buffer containing the hardware address provided by + the client. + @param addrBytes The size of the address buffer provided by the + client in bytes. + @result Returns kIOReturnSuccess on success, or an error otherwise. +*/ + + virtual IOReturn setHardwareAddress(const void * addr, + UInt32 addrBytes); + +/*! @function getMaxPacketSize + @abstract Gets the maximum packet size supported by the Ethernet + controller, including the frame header and FCS. + @param maxSize Pointer to the return value. + @result Returns kIOReturnSuccess on success, or an error code otherwise. +*/ + + virtual IOReturn getMaxPacketSize(UInt32 * maxSize) const; + +/*! @function getMinPacketSize + @abstract Gets the minimum packet size supported by the Ethernet + controller, including the frame header and FCS. + @param minSize Pointer to the return value. + @result Returns kIOReturnSuccess on success, or an error code otherwise. +*/ + + virtual IOReturn getMinPacketSize(UInt32 * minSize) const; + +/*! @function getPacketFilters + @abstract Gets the set of packet filters supported by the Ethernet + controller in the network filter group. + @param filters Pointer to the return value containing a mask of + supported filters. + @result Returns kIOReturnSuccess. Drivers that override this + method must return kIOReturnSuccess to indicate success, or an error + return code otherwise. +*/ + + virtual IOReturn getPacketFilters(UInt32 * filters) const; + +/*! @function getHardwareAddress + @abstract Gets the Ethernet controller's permanent station address. + @discussion Ethernet drivers must implement this method, by reading the + address from hardware and writing it to the buffer provided. This method + is called from the workloop context. + @param addrP Pointer to an IOEthernetAddress where the hardware address + should be returned. + @result Returns kIOReturnSuccess on success, or an error return code otherwise. +*/ + + virtual IOReturn getHardwareAddress(IOEthernetAddress * addrP) = 0; + +/*! @function setHardwareAddress + @abstract Sets or changes the station address used by the Ethernet + controller. + @discussion This method is called in response to a client command to + change the station address used by the Ethernet controller. Implementation + of this method is optional. This method is called from the workloop context. + @param addrP Pointer to an IOEthernetAddress containing the new station + address. + @result The default implementation will always return kIOReturnUnsupported. + If overridden, drivers must return kIOReturnSuccess on success, or an error + return code otherwise. +*/ + + virtual IOReturn setHardwareAddress(const IOEthernetAddress * addrP); + +/*! @function setMulticastMode + @abstract Enables or disables multicast mode. + @discussion Called by enablePacketFilter() or disablePacketFilter() + when there is a change in the activation state of the multicast filter + identified by kIOPacketFilterMulticast. This method is called from the + workloop context. + @param active True to enable multicast mode, false to disable it. + @result Returns kIOReturnUnsupported. If overridden, drivers must return + kIOReturnSuccess on success, or an error return code otherwise. +*/ + + virtual IOReturn setMulticastMode(bool active); + +/*! @function setMulticastList + @abstract Sets the list of multicast addresses a multicast filter + should use to match against the destination address of an incoming frame. + @discussion This method sets the list of multicast addresses that the multicast filter + should use to match against the destination address of an incoming frame. + The frame should be accepted when a match occurs. Called when the multicast group membership of an interface + object is changed. Drivers that support kIOPacketFilterMulticast should + override this method and update the hardware multicast filter using the + list of Ethernet addresses provided. Perfect multicast filtering is + preferred if supported by the hardware, in order to reduce the number of + unwanted packets received. If the number of multicast addresses in the + list exceeds what the hardware is capable of supporting, or if perfect + filtering is not supported, then ideally the hardware should be programmed + to perform imperfect filtering, through some form of hash filtering + mechanism. Only as a last resort should the driver enable reception of + all multicast packets to satisfy this request. This method is called + from the workloop context, and only if the driver reports + kIOPacketFilterMulticast support in getPacketFilters(). + @param addrs An array of Ethernet addresses. This argument must be + ignored if the count argument is 0. + @param count The number of Ethernet addresses in the list. This value + will be zero when the list becomes empty. + @result Returns kIOReturnUnsupported. Drivers must return kIOReturnSuccess to + indicate success, or an error return code otherwise. +*/ + + virtual IOReturn setMulticastList(IOEthernetAddress * addrs, + UInt32 count); + +/*! @function setPromiscuousMode + @abstract Enables or disables promiscuous mode. + @discussion Called by enablePacketFilter() or disablePacketFilter() + when there is a change in the activation state of the promiscuous + filter identified by kIOPacketFilterPromiscuous. This method is + called from the workloop context. + @param active True to enable promiscuous mode, false to disable it. + @result Returns kIOReturnUnsupported. If overridden, drivers must return + kIOReturnSuccess on success, or an error return code otherwise. +*/ + + virtual IOReturn setPromiscuousMode(bool active); + +/*! @function setWakeOnMagicPacket + @abstract Enables or disables the wake on Magic Packet support. + @discussion Called by enablePacketFilter() or disablePacketFilter() + when there is a change in the activation state of the Wake-on-LAN + filter identified by kIOEthernetWakeOnMagicPacket. This method is + called from the workloop context. + @param active True to enable support for system wake on reception + of a Magic Packet, false to disable it. + @result Returns kIOReturnUnsupported. If overridden, drivers must return + kIOReturnSuccess on success, or an error return code otherwise. +*/ + + virtual IOReturn setWakeOnMagicPacket(bool active); + +protected: + +/*! @function createInterface + @abstract Creates an IOEthernetInterface object. + @discussion This method allocates and returns a new IOEthernetInterface instance. + A subclass of IONetworkController must implement this method and return + a matching interface object. The implementation in IOEthernetController + will return an IOEthernetInterface object. Subclasses of + IOEthernetController, such as Ethernet controller drivers, will have + little reason to override this implementation. + @result Returns a newly allocated and initialized IOEthernetInterface object. +*/ + + virtual IONetworkInterface * createInterface(); + +/*! @function free + @abstract Frees the IOEthernetController instance. + @discussion This method releases resources, and is + then followed by a call to super::free(). */ + + virtual void free(); + +/*! @function publishProperties + @abstract Publishes Ethernet controller properties and capabilities. + @discussion This method publishes Ethernet controller properties to the property + table. For instance, getHardwareAddress() is called to fetch the + hardware address, and the address is then published to the property + table. This method call is synchronized by the workloop's gate, + and must never be called directly by subclasses. + @result Returns true if all properties and capabilities were discovered, + and published successfully, false otherwise. Returning false will + prevent client objects from attaching to the Ethernet controller + since a property that a client relies upon may be missing. +*/ + + virtual bool publishProperties(); + + /*! @function getVlanTagDemand + @abstract Fetch the demand for hardware vlan tag stuffing + for the given packet before it is transmitted on the network. + @discussion A network controller that can insert 802.1Q vlan tags for output + packets must call this method to obtain vlan tag information that it must + insert into the given output packet. + @param packet A mbuf containing a packet that may require vlan tag stuffing. + @param vlanTag After calling, the low order 16 bits contain the 802.1Q priority and + vlan ID tag in host order. The hi-order 16 bits are currently unused and should be ignored. + @result true if vlanTag has been set and should be used. + false if no vlan tag stuffing is required for this packet. */ + + OSMetaClassDeclareReservedUsed( IOEthernetController, 0); + virtual bool getVlanTagDemand(mbuf_t m, UInt32 *vlanTag); + + /*! @function setVlanTag + @abstract Encode a received packet with the vlan tag result reported + by the hardware. + @discussion A network controller that can strip 802.1Q vlan tag information for a + received packet should call this method to encode the result on the + packet, before passing it up towards the protocol stacks. + @param packet A mbuf containing a packet that has had its 802.1q vlan tag stripped by + the hardware. + @param vlanTag A value in host order that contains the 802.1q vlan tag and priority + in the low order 16 bits. The hi order word is currently unused and should be set to 0. */ + + OSMetaClassDeclareReservedUsed( IOEthernetController, 1); + virtual void setVlanTag(mbuf_t m, UInt32 vlanTag); + + // Virtual function padding + OSMetaClassDeclareReservedUnused( IOEthernetController, 2); + OSMetaClassDeclareReservedUnused( IOEthernetController, 3); + OSMetaClassDeclareReservedUnused( IOEthernetController, 4); + OSMetaClassDeclareReservedUnused( IOEthernetController, 5); + OSMetaClassDeclareReservedUnused( IOEthernetController, 6); + OSMetaClassDeclareReservedUnused( IOEthernetController, 7); + OSMetaClassDeclareReservedUnused( IOEthernetController, 8); + OSMetaClassDeclareReservedUnused( IOEthernetController, 9); + OSMetaClassDeclareReservedUnused( IOEthernetController, 10); + OSMetaClassDeclareReservedUnused( IOEthernetController, 11); + OSMetaClassDeclareReservedUnused( IOEthernetController, 12); + OSMetaClassDeclareReservedUnused( IOEthernetController, 13); + OSMetaClassDeclareReservedUnused( IOEthernetController, 14); + OSMetaClassDeclareReservedUnused( IOEthernetController, 15); + OSMetaClassDeclareReservedUnused( IOEthernetController, 16); + OSMetaClassDeclareReservedUnused( IOEthernetController, 17); + OSMetaClassDeclareReservedUnused( IOEthernetController, 18); + OSMetaClassDeclareReservedUnused( IOEthernetController, 19); + OSMetaClassDeclareReservedUnused( IOEthernetController, 20); + OSMetaClassDeclareReservedUnused( IOEthernetController, 21); + OSMetaClassDeclareReservedUnused( IOEthernetController, 22); + OSMetaClassDeclareReservedUnused( IOEthernetController, 23); + OSMetaClassDeclareReservedUnused( IOEthernetController, 24); + OSMetaClassDeclareReservedUnused( IOEthernetController, 25); + OSMetaClassDeclareReservedUnused( IOEthernetController, 26); + OSMetaClassDeclareReservedUnused( IOEthernetController, 27); + OSMetaClassDeclareReservedUnused( IOEthernetController, 28); + OSMetaClassDeclareReservedUnused( IOEthernetController, 29); + OSMetaClassDeclareReservedUnused( IOEthernetController, 30); + OSMetaClassDeclareReservedUnused( IOEthernetController, 31); +}; + +/* + * FIXME: remove this. + */ +enum { + kIOEnetPromiscuousModeOff = false, + kIOEnetPromiscuousModeOn = true, + kIOEnetPromiscuousModeAll = true, + kIOEnetMulticastModeOff = false, + kIOEnetMulticastModeFilter = true +}; +typedef bool IOEnetPromiscuousMode; +typedef bool IOEnetMulticastMode; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* !_IOETHERNETCONTROLLER_H */ diff --git a/i386/include/IOKit/network/IOEthernetInterface.h b/i386/include/IOKit/network/IOEthernetInterface.h new file mode 100644 index 0000000..96c7d95 --- /dev/null +++ b/i386/include/IOKit/network/IOEthernetInterface.h @@ -0,0 +1,328 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOETHERNETINTERFACE_H +#define _IOETHERNETINTERFACE_H + +/*! @defined kIOEthernetInterfaceClass + @abstract The name of the + IOEthernetInterface class. +*/ + +#define kIOEthernetInterfaceClass "IOEthernetInterface" + +/*! @defined kIOActivePacketFilters + @abstract A property of IOEthernetInterface objects. + @discussion The kIOActivePacketFilters property has an OSDictionary value that describes the current + set of packet filters that have been successfully activated. Each + entry in the dictionary is a key/value pair consisting of the filter + group name, and an OSNumber describing the set of active filters for + that group. Entries in this dictionary will mirror those in + kIORequiredPacketFilters if the controller has reported success for + all filter change requests from the IOEthernetInterface object. +*/ + +#define kIOActivePacketFilters "IOActivePacketFilters" + +/*! @defined kIORequiredPacketFilters + @abstract A property of IOEthernetInterface objects. + @discussion The kIORequiredPacketFilters property has an OSDictionary value that describes the current + set of required packet filters. Each entry in the dictionary is a + key/value pair consisting of the filter group name, and an OSNumber + describing the set of required filters for that group. +*/ + +#define kIORequiredPacketFilters "IORequiredPacketFilters" + +/*! @defined kIOMulticastAddressList + @abstract A property of IOEthernetInterface objects. + @discussion The kIOMulticastAddressList property is an OSData object that describes the + list of multicast addresses that are being used by the + controller to match against the destination address of an + incoming frame. +*/ + +#define kIOMulticastAddressList "IOMulticastAddressList" +#define kIOMulticastFilterData kIOMulticastAddressList + +/* + * Kernel + */ +#if defined(KERNEL) && defined(__cplusplus) + +#include +#include +#include + +/*! @class IOEthernetInterface + @abstract The Ethernet interface object. + @discussion An Ethernet controller driver, + that is a subclass of IOEthernetController, will instantiate an object + of this class when the driver calls the attachInterface() method. + This interface object will then vend an Ethernet interface to DLIL, + and manage the connection between the controller driver and the upper + networking layers. Drivers will seldom need to subclass + IOEthernetInterface. +*/ + +class IOEthernetInterface : public IONetworkInterface +{ + OSDeclareDefaultStructors( IOEthernetInterface ) + +private: + thread_call_t _inputEventThreadCall; // inputEvent() thread call + UInt32 _mcAddrCount; // # of multicast addresses + bool _ctrEnabled; // Is controller enabled? + OSDictionary * _supportedFilters; // Controller's supported filters + OSDictionary * _requiredFilters; // The required filters + OSDictionary * _activeFilters; // Currently active filters + bool _controllerLostPower; // true if controller is unusable + + struct ExpansionData { + UInt32 altMTU; // track the physical mtu of controller + UInt32 publishedFeatureID; // id for published wake packet + uint32_t supportedWakeFilters; // bitmask of supported wake filters + OSNumber * disabledWakeFilters; // OSNumber of disabled wake filters + }; + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * _reserved; + + + IOReturn enableController(IONetworkController * ctr); + IOReturn setupMulticastFilter(IONetworkController * ctr); + + UInt32 getFilters(const OSDictionary * dict, + const OSSymbol * group); + + bool setFilters(OSDictionary * dict, + const OSSymbol * group, + UInt32 filters); + + IOReturn disableFilter(IONetworkController * ctr, + const OSSymbol * group, + UInt32 filter, + IOOptionBits options = 0); + + IOReturn enableFilter(IONetworkController * ctr, + const OSSymbol * group, + UInt32 filter, + IOOptionBits options = 0); + + int syncSIOCSIFFLAGS(IONetworkController * ctr); + int syncSIOCSIFADDR(IONetworkController * ctr); + int syncSIOCADDMULTI(IONetworkController * ctr); + int syncSIOCDELMULTI(IONetworkController * ctr); + int syncSIOCSIFMTU(IONetworkController * ctr, struct ifreq * ifr, bool); + int syncSIOCGIFDEVMTU(IONetworkController * ctr, struct ifreq * ifr); + int syncSIOCSIFLLADDR(IONetworkController * ctr, const char * lladdr, int len); + void _fixupVlanPacket(mbuf_t, u_int16_t, int); + void reportInterfaceWakeFlags(void); + + static void handleEthernetInputEvent(thread_call_param_t param0, thread_call_param_t param1); + static int performGatedCommand(void *, void *, void *, void *, void *); + static IOReturn enableFilter_Wrapper( + IOEthernetInterface *, IONetworkController *, const OSSymbol *, UInt32 , IOOptionBits); + +public: + +/*! @function init + @abstract Initializes an IOEthernetInterface instance. + @discussion Instance variables are initialized, and an arpcom + structure is allocated. + @param controller A network controller object that will service + the interface object being initialized. + @result Returns true on success, false otherwise. +*/ + + virtual bool init( IONetworkController * controller ); + +/*! @function getNamePrefix + @abstract Returns a string containing the prefix to use when + creating a BSD name for this interface. + @discussion The BSD name for each interface object is created by + concatenating a string returned by this method, with an unique + unit number assigned by IONetworkStack. + @result Returns a pointer to a constant C string "en". Therefore, Ethernet + interfaces will be registered with BSD as en0, en1, etc. +*/ + + virtual const char * getNamePrefix() const; + +/*! @function setProperties + @abstract Handles a request to set Ethernet interface properties from + kernel or non-kernel clients. + @discussion For non-kernel clients, the preferred + access mechanism is through a user client connection. + @param properties An OSDictionary containing a collection of + properties. + @result Returns kIOReturnUnsupported if the interface did not + recognize any of the properties provided. Otherwise, the return + code will be kIOReturnSuccess to indicate no errors, or an + IOReturn error code to indicate that an error occurred while + handling one of the properties. +*/ + + virtual IOReturn setProperties( OSObject * properties ); + +protected: + +/*! @function free + @abstract Frees the IOEthernetInterface instance. + @discussion The memory allocated for the arpcom structure is released, + followed by a call to super::free(). +*/ + + virtual void free(); + +/*! @function performCommand + @abstract Handles an ioctl command sent to the Ethernet interface. + @discussion This method handles socket ioctl commands sent to the Ethernet + interface from DLIL. Commands recognized and processed by this method are + SIOCSIFADDR, SIOCSIFFLAGS, SIOCADDMULTI, and SIOCDELMULTI. Other commands + are passed to the superclass. + @param controller The controller object. + @param cmd The ioctl command code. + @param arg0 Command argument 0. Generally a pointer to an ifnet structure + associated with the interface. + @param arg1 Command argument 1. + @result Returns a BSD return value defined in bsd/sys/errno.h. +*/ + + virtual SInt32 performCommand(IONetworkController * controller, + unsigned long cmd, + void * arg0, + void * arg1); + +/*! @function controllerDidOpen + @abstract A notification that the interface has opened the network + controller. + @discussion This method will be called by IONetworkInterface after a + network controller has accepted an open from this interface object. + IOEthernetInterface will first call the implementation in its + superclass, then inspect the controller through properties published + in the registry. This method is called with the arbitration lock held. + @param controller The controller object that was opened. + @result Returns true on success, false otherwise. Returning false will + cause the controller to be closed, and any pending client opens to be + rejected. +*/ + + virtual bool controllerDidOpen(IONetworkController * controller); + +/*! @function controllerWillClose + @abstract A notification that the interface will close the network + controller. + @discussion This method will simply call super to propagate the method + call. This method is called with the arbitration lock held. + @param controller The controller that is about to be closed. +*/ + + virtual void controllerWillClose(IONetworkController * controller); + + +/*! @function controllerWillChangePowerState + @abstract Handles a notification that the network controller + servicing this interface object is about to transition to a new power state. + @discussion If the controller is about to transition to an unusable state, + and it is currently enabled, then the disable() method on the controller is + called. + @param controller The network controller object. + @param flags Flags that describe the capability of the controller in the new + power state. + @param stateNumber An index to a state in the network controller's + power state array that the controller is switching to. + @param policyMaker A reference to the network controller's policy-maker, + and is also the originator of this notification. + @result Always returns kIOReturnSuccess. +*/ + + virtual IOReturn controllerWillChangePowerState( + IONetworkController * controller, + IOPMPowerFlags flags, + UInt32 stateNumber, + IOService * policyMaker); + +/*! @function controllerDidChangePowerState + @abstract Handles a notification that the network controller servicing + this interface object has transitioned to a new power state. + @discussion If the controller did transition to a usable state, and it was + previously disabled due to a previous power change, then it is re-enabled. + @param controller The network controller object. + @param flags Flags that describe the capability of the controller in the new + power state. + @param stateNumber An index to a state in the network controller's + power state array that the controller has switched to. + @param policyMaker A reference to the network controller's policy-maker, + and is also the originator of this notification. + @result Always returns kIOReturnSuccess. +*/ + + virtual IOReturn controllerDidChangePowerState( + IONetworkController * controller, + IOPMPowerFlags flags, + UInt32 stateNumber, + IOService * policyMaker); + +public: + /* Override IONetworkInterface::willTerminate() */ + + virtual bool willTerminate( IOService * provider, + IOOptionBits options ); + + /* Override IONetworkInterface::attachToDataLinkLayer() */ + + virtual IOReturn attachToDataLinkLayer( IOOptionBits options, + void * parameter ); + + /* Override IONetworkInterface::inputEvent() */ + + virtual bool inputEvent( UInt32 type, void * data ); + +protected: + virtual void feedPacketInputTap(mbuf_t); + virtual void feedPacketOutputTap(mbuf_t); + virtual bool initIfnetParams(struct ifnet_init_params *params); + +public: + // Virtual function padding + OSMetaClassDeclareReservedUnused( IOEthernetInterface, 0); + OSMetaClassDeclareReservedUnused( IOEthernetInterface, 1); + OSMetaClassDeclareReservedUnused( IOEthernetInterface, 2); + OSMetaClassDeclareReservedUnused( IOEthernetInterface, 3); + OSMetaClassDeclareReservedUnused( IOEthernetInterface, 4); + OSMetaClassDeclareReservedUnused( IOEthernetInterface, 5); + OSMetaClassDeclareReservedUnused( IOEthernetInterface, 6); + OSMetaClassDeclareReservedUnused( IOEthernetInterface, 7); + OSMetaClassDeclareReservedUnused( IOEthernetInterface, 8); + OSMetaClassDeclareReservedUnused( IOEthernetInterface, 9); + OSMetaClassDeclareReservedUnused( IOEthernetInterface, 10); + OSMetaClassDeclareReservedUnused( IOEthernetInterface, 11); + OSMetaClassDeclareReservedUnused( IOEthernetInterface, 12); + OSMetaClassDeclareReservedUnused( IOEthernetInterface, 13); + OSMetaClassDeclareReservedUnused( IOEthernetInterface, 14); + OSMetaClassDeclareReservedUnused( IOEthernetInterface, 15); +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* !_IOETHERNETINTERFACE_H */ diff --git a/i386/include/IOKit/network/IOEthernetStats.h b/i386/include/IOKit/network/IOEthernetStats.h new file mode 100644 index 0000000..6125c2d --- /dev/null +++ b/i386/include/IOKit/network/IOEthernetStats.h @@ -0,0 +1,161 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * IOEthernetStats.h - Ethernet MIB statistics definitions. + * + * HISTORY + */ + +#ifndef _IOETHERNETSTATS_H +#define _IOETHERNETSTATS_H + +/*! @header IOEthernetStats.h + @discussion Ethernet statistics. */ + +//--------------------------------------------------------------------------- +// Ethernet-like statistics group. + +/*! @typedef IODot3StatsEntry + @discussion Ethernet MIB statistics structure. + @field alignmentErrors dot3StatsAlignmentErrors. + @field fcsErrors dot3StatsFCSErrors. + @field singleCollisionFrames dot3StatsSingleCollisionFrames. + @field multipleCollisionFrames dot3StatsMultipleCollisionFrames. + @field sqeTestErrors dot3StatsSQETestErrors. + @field deferredTransmissions dot3StatsDeferredTransmissions. + @field lateCollisions dot3StatsLateCollisions. + @field excessiveCollisions dot3StatsExcessiveCollisions. + @field internalMacTransmitErrors dot3StatsInternalMacTransmitErrors. + @field carrierSenseErrors dot3StatsCarrierSenseErrors. + @field frameTooLongs dot3StatsFrameTooLongs. + @field internalMacReceiveErrors dot3StatsInternalMacReceiveErrors. + @field etherChipSet dot3StatsEtherChipSet. + @field missedFrames dot3StatsMissedFrames (not in RFC1650). + */ + +typedef struct { + UInt32 alignmentErrors; + UInt32 fcsErrors; + UInt32 singleCollisionFrames; + UInt32 multipleCollisionFrames; + UInt32 sqeTestErrors; + UInt32 deferredTransmissions; + UInt32 lateCollisions; + UInt32 excessiveCollisions; + UInt32 internalMacTransmitErrors; + UInt32 carrierSenseErrors; + UInt32 frameTooLongs; + UInt32 internalMacReceiveErrors; + UInt32 etherChipSet; + UInt32 missedFrames; +} IODot3StatsEntry; + +//--------------------------------------------------------------------------- +// Ethernet-like collision statistics group (optional). + +/*! @typedef IODot3CollEntry + @discussion Collision statistics structure. + @field collFrequencies dot3StatsCollFrequencies. */ + +typedef struct { + UInt32 collFrequencies[16]; +} IODot3CollEntry; + +//--------------------------------------------------------------------------- +// Receiver extra statistics group (not defined by RFC 1650). + +/*! @typedef IODot3RxExtraEntry + @discussion Extra receiver statistics not defined by RFC1650. + @field overruns receiver overruns. + @field watchdogTimeouts watchdog timer expirations. + @field frameTooShorts runt frames. + @field collisionErrors frames damages by late collision. + @field phyErrors PHY receive errors. + @field timeouts receiver timeouts. + @field interrupts receiver interrupts. + @field resets receiver resets. + @field resourceErrors receiver resource shortages. + */ + +typedef struct { + UInt32 overruns; + UInt32 watchdogTimeouts; + UInt32 frameTooShorts; + UInt32 collisionErrors; + UInt32 phyErrors; + UInt32 timeouts; + UInt32 interrupts; + UInt32 resets; + UInt32 resourceErrors; + UInt32 reserved[4]; +} IODot3RxExtraEntry; + +//--------------------------------------------------------------------------- +// Transmitter extra statistics group (not defined by RFC 1650). + +/*! @typedef IODot3TxExtraEntry + @discussion Extra transmitter statistics not defined by RFC1650. + @field underruns transmit underruns. + @field jabbers jabber events. + @field phyErrors PHY transmit errors. + @field timeouts transmitter timeouts. + @field interrupts transmitter interrupts. + @field resets transmitter resets. + @field resourceErrors transmitter resource shortages. + */ + +typedef struct { + UInt32 underruns; + UInt32 jabbers; + UInt32 phyErrors; + UInt32 timeouts; + UInt32 interrupts; + UInt32 resets; + UInt32 resourceErrors; + UInt32 reserved[4]; +} IODot3TxExtraEntry; + +//--------------------------------------------------------------------------- +// Aggregate Ethernet statistics. + +/*! @typedef IOEthernetStats + @discussion Aggregate Ethernet statistics structure. + @field dot3StatsEntry IODot3StatsEntry statistics group. + @field dot3CollEntry IODot3CollEntry statistics group. + @field dot3RxExtraEntry IODot3RxExtraEntry statistics group. + @field dot3TxExtraEntry IODot3TxExtraEntry statistics group. + */ + +typedef struct { + IODot3StatsEntry dot3StatsEntry; + IODot3CollEntry dot3CollEntry; + IODot3RxExtraEntry dot3RxExtraEntry; + IODot3TxExtraEntry dot3TxExtraEntry; +} IOEthernetStats; + +/*! @defined kIOEthernetStatsKey + @discussion Defines the name of an IONetworkData that contains + an IOEthernetStats. */ + +#define kIOEthernetStatsKey "IOEthernetStatsKey" + +#endif /* !_IOETHERNETSTATS_H */ diff --git a/i386/include/IOKit/network/IOGatedOutputQueue.h b/i386/include/IOKit/network/IOGatedOutputQueue.h new file mode 100644 index 0000000..48e9f79 --- /dev/null +++ b/i386/include/IOKit/network/IOGatedOutputQueue.h @@ -0,0 +1,140 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOGATEDOUTPUTQUEUE_H +#define _IOGATEDOUTPUTQUEUE_H + +#include +#include +#include +#include + +/*! @class IOGatedOutputQueue + @abstract An extension of an IOBasicOutputQueue. + @discussion An IOCommandGate + object is created by this queue and added to a work loop as an + event source. All calls to the target by the consumer thread must + occur with the gate closed. Therefore, all calls to the target of + this type of queue will be serialized with any other thread that + runs on the same work loop context. This is useful for network + drivers that have a tight hardware coupling between the transmit + and receive engines, and a single-threaded hardware access model + is desirable. +*/ + +class IOGatedOutputQueue : public IOBasicOutputQueue +{ + OSDeclareDefaultStructors( IOGatedOutputQueue ) + +private: + static void gatedOutput(OSObject * owner, + IOGatedOutputQueue * self, + IOMbufQueue * queue, + UInt32 * state); + + static void restartDeferredOutput(OSObject * owner, + IOInterruptEventSource * sender, + int count); + +protected: + IOCommandGate * _gate; + IOInterruptEventSource * _interruptSrc; + +/*! @function output + @abstract Transfers all packets in the mbuf queue to the target. + @param queue A queue of output packets. + @param state Return a state bit defined by IOBasicOutputQueue that + declares the new state of the queue following this method call. + A kStateStalled is returned if the queue should stall, otherwise 0 + is returned. +*/ + + virtual void output(IOMbufQueue * queue, UInt32 * state); + +/*! @function free + @abstract Frees the IOGatedOutputQueue object. + @discussion Release allocated resources, then call super::free(). */ + + virtual void free(); + +/*! @function output + @abstract Overrides the method inherited from IOOutputQueue. + @result Returns true if a thread was successfully scheduled to service + the queue. +*/ + + virtual bool scheduleServiceThread(void * param); + +public: + +/*! @function init + @abstract Initializes an IOGatedOutputQueue object. + @param target The object that will handle packets removed from the + queue, and is usually a subclass of IONetworkController. + @param action The function that will handle packets removed from the + queue. + @param workloop A workloop object. An IOCommandGate object is created + and added to this workloop as an event source. + @param capacity The initial capacity of the output queue. + @result Returns true if initialized successfully, false otherwise. +*/ + + virtual bool init(OSObject * target, + IOOutputAction action, + IOWorkLoop * workloop, + UInt32 capacity = 0); + +/*! @function withTarget + @abstract Factory method that constructs and initializes an + IOGatedOutputQueue object. + @param target An IONetworkController object that will handle packets + removed from the queue. + @param workloop A workloop object. An IOCommandGate object is created + and added to this workloop as an event source. + @param capacity The initial capacity of the output queue. + @result Returns an IOGatedOutputQueue object on success, or 0 otherwise. +*/ + + static IOGatedOutputQueue * withTarget(IONetworkController * target, + IOWorkLoop * workloop, + UInt32 capacity = 0); + +/*! @function withTarget + @abstract Factory method that constructs and initializes an + IOGatedOutputQueue object. + @param target The object that will handle packets removed from the + queue. + @param action The function that will handle packets removed from the + queue. + @param workloop A workloop object. An IOCommandGate object is created + and added to this workloop as an event source. + @param capacity The initial capacity of the output queue. + @result Returns an IOGatedOutputQueue object on success, or 0 otherwise. +*/ + + static IOGatedOutputQueue * withTarget(OSObject * target, + IOOutputAction action, + IOWorkLoop * workloop, + UInt32 capacity = 0); +}; + +#endif /* !_IOGATEDOUTPUTQUEUE_H */ diff --git a/i386/include/IOKit/network/IOKernelDebugger.h b/i386/include/IOKit/network/IOKernelDebugger.h new file mode 100644 index 0000000..97fc905 --- /dev/null +++ b/i386/include/IOKit/network/IOKernelDebugger.h @@ -0,0 +1,324 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKERNELDEBUGGER_H +#define _IOKERNELDEBUGGER_H + +#include + +/*! @typedef IODebuggerRxHandler + @discussion Defines the receive handler that must be implemented + by the target to service KDP receive requests. This handler is called + by kdpReceiveDispatcher(). + @param target The target object. + @param buffer KDP receive buffer. The buffer allocated has room for + 1518 bytes. The receive handler must not overflow this buffer. + @param length The amount of data received and placed into the buffer. + Set to 0 if no frame was received during the poll interval. + @param timeout The amount of time to poll in milliseconds while waiting + for a frame to arrive. */ + +typedef void (*IODebuggerRxHandler)( IOService * target, + void * buffer, + UInt32 * length, + UInt32 timeout ); + +/*! @typedef IODebuggerTxHandler + @discussion Defines the transmit handler that must be implemented + by the target to service KDP transmit requests. This handler is called + by kdpTransmitDispatcher(). + @param target The target object. + @param buffer KDP transmit buffer. This buffer contains a KDP frame + to be sent on the network. + @param length The number of bytes in the transmit buffer. */ + +typedef void (*IODebuggerTxHandler)( IOService * target, + void * buffer, + UInt32 length ); + +/*! @typedef IODebuggerLockState + @discussion Defines flags returned by IOKernelDebugger::lock(). + @constant kIODebuggerLockTaken Set if the debugger lock was taken. */ + +typedef enum { + kIODebuggerLockTaken = 0x1 +} IODebuggerLockState; + +/*! @class IOKernelDebugger + @abstract Kernel debugger nub. + @discussion This object interfaces with the KDP + (kernel debugger protocol) module and dispatches KDP requests to its + target (provider). The target, designated as the debugger device, must + implement a pair of handler functions that are called to handle KDP + transmit and receive requests during a debugging session. Only a single + IOKernelDebugger in the system can be active at a given time. The + active IOKernelDebugger is the one that has an IOKDP object attached + as a client. + + The debugger device is usually a subclass of IOEthernetController. + However, any IOService can service an IOKernelDebugger client, + implement the two polled mode handlers, and transport the KDP + packets through a data channel. However, KDP assumes that the + debugger device is an Ethernet interface and therefore it will + always send, and expect to receive, an Ethernet frame. */ + +class IOKernelDebugger : public IOService +{ + OSDeclareDefaultStructors( IOKernelDebugger ) + +protected: + IOService * _target; // target (provider) + IODebuggerTxHandler _txHandler; // target's transmit handler. + IODebuggerRxHandler _rxHandler; // target's receive handler. + IOService * _client; // client that has opened us. + bool _pmDisabled; // true if disabled by PM. + + struct ExpansionData { + thread_call_t activationChangeThreadCall; + UInt32 stateVars[2]; + IONotifier * interfaceNotifier; + }; + + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * _reserved; + +/*! @function kdpReceiveDispatcher + @abstract The KDP receive dispatch function. + @discussion Field KDP receives requests, then dispatches the call to the + registered receiver handler. + @param buffer KDP receive buffer. The buffer allocated by KDP has room + for 1518 bytes. The receive handler must not overflow this buffer. + @param length The amount of data received and placed into the buffer. + Set to 0 if a frame was not received during the poll interval. + @param timeout The amount of time to poll in milliseconds while waiting + for a frame to arrive. +*/ + + static void kdpReceiveDispatcher(void * buffer, + UInt32 * length, + UInt32 timeout); + +/*! @function kdpTransmitDispatcher + @abstract The KDP transmit dispatch function. + @discussion Field KDP transmit requests, then dispatches the call to the + registered transmit handler. + @param buffer KDP transmit buffer. This buffer contains a KDP frame to + be sent on the network. + @param length The number of bytes in the transmit buffer. +*/ + + static void kdpTransmitDispatcher(void * buffer, UInt32 length); + +/*! @function free + @abstract Frees the IOKernelDebugger instance. */ + + virtual void free(); + +/*! @function nullTxHandler + @abstract Null transmit handler. + @discussion This function is registered as the transmit handler when an + IOKernelDebugger object surrenders its status as the active debugger nub. + Until another IOKernelDebugger object gets promoted, this function will + handle polled transmit requests from KDP. This function does nothing + useful. +*/ + + static void nullTxHandler( IOService * target, + void * buffer, + UInt32 length ); + +/*! @function nullRxHandler + @abstract Null receive handler. + @discussion This function is registered as the receive handler when an + IOKernelDebugger object surrenders its status as the active debugger nub. + Until another IOKernelDebugger object gets promoted, this function will + handle polled receive requests from KDP. This function does nothing + except to log a warning message. +*/ + + static void nullRxHandler( IOService * target, + void * buffer, + UInt32 * length, + UInt32 timeout ); + +/*! @function registerHandler + @abstract Registers the target and the handler functions. + @discussion This method is called by handleOpen() and handleClose() + to register or unregister the target and its handler functions. + @param target The target object. + @param txHandler The transmit handler function. The null handler is + registered if the argument is zero. + @param rxHandler The receive handler function. The null handler is + registered if the argument is zero. +*/ + + static void registerHandler( IOService * target, + IODebuggerTxHandler txHandler = 0, + IODebuggerRxHandler rxHandler = 0 ); + +/*! @function powerStateWillChangeTo + @abstract Handles notification that the network controller will change + power state. + @discussion If the controller is about to become unusable, then the + controller's handlers are unregistered, and the controller is disabled. + @param flags Describe the capability of the controller in the new power + state. + @param stateNumber The number of the state in the state array that the + controller is switching to. + @param policyMaker The policy maker that manages the controller's + power state. + @result Returns the constant 3000000, to indicate a maximum of 3 seconds for the + preparation to complete, and an acknowledgement delivered to the + policy maker. +*/ + + virtual IOReturn powerStateWillChangeTo( IOPMPowerFlags flags, + unsigned long stateNumber, + IOService * policyMaker ); + +/*! @function powerStateDidChangeTo + @abstract Handles notification that the network controller did change + power state. + @discussion If the controller became usable, then the controller is + re-enabled, and the controller's handlers are re-registered. + @param flags Description of the capability of the controller in the new power + state. + @param stateNumber The number of the state in the state array that the + controller is switching to. + @param policyMaker The policy maker that manages the controller's + power state. + @result Returns the constant 3000000, to indicate a maximum of 3 seconds for the + preparation to complete, and an acknowledgement delivered to the + policy maker. +*/ + + virtual IOReturn powerStateDidChangeTo( IOPMPowerFlags flags, + unsigned long stateNumber, + IOService * policyMaker ); + +/*! @function handleOpen + @abstract Handles a client open. + @discussion This method is called by IOService::open() to handle an + open from a client (IOKDP) with the arbitration lock held. + @param forClient The client (IOKDP) requesting the open. + @param options Options passed to the open() call. Not used. + @param arg A family defined argument passed to the open() call. Not used. + @result Returns true on success, false otherwise. +*/ + + virtual bool handleOpen( IOService * forClient, + IOOptionBits options, + void * arg ); + +/*! @function handleClose + @abstract Handles a client close. + @discussion This method is called by IOService::close() to handle a + close from a client with the arbitration lock held. + @param forClient The client (IOKDP) requesting the close. + @param options Options passed to the close() call. Not used. +*/ + + virtual void handleClose( IOService * forClient, + IOOptionBits options ); + +/*! @function handleIsOpen + @abstract Queries whether a client has an open on this object. + @discussion This method is called by IOService::isOpen() with the + arbitration lock held. + @result Returns true if the specified client, or any client if none (0) is + specified, presently has an open on this object. +*/ + + virtual bool handleIsOpen( const IOService * forClient ) const; + + static bool interfacePublished( void *target, void *param, IOService *service ); + +public: + +/*! @function lock + @abstract Takes the debugger lock conditionally. + @discussion This method takes the debugger lock if the object given matches the + target registered by registerHandler(). + @param target The target or provider of an IOKernelDebugger object. + @result Returns kIODebuggerLockTaken if the lock was taken, or 0 otherwise. +*/ + + static IODebuggerLockState lock( IOService * target ); + +/*! @function unlock + @abstract Releases the debugger lock. + @discussion This method releases the debugger lock if the kIODebuggerLockTaken flag is + set in the argument. +*/ + + static void unlock( IODebuggerLockState state ); + +/*! @function init + @abstract Initializes an IOKernelDebugger instance. + @param target The target object that implements the debugger handlers. + @param txHandler The target's transmit handler. A pointer to a 'C' function. + @param rxHandler The target's receive handler. A pointer to a 'C' function. + @result Returns true if the instance initialized successfully, false otherwise. +*/ + + virtual bool init( IOService * target, + IODebuggerTxHandler txHandler, + IODebuggerRxHandler rxHandler ); + +/*! @function debugger + @abstract Factory method that performs allocation and initialization + of an IOKernelDebugger object. + @param target The target object that implements the debugger handlers. + @param txHandler The target's transmit handler. A pointer to a 'C' function. + @param rxHandler The target's receive handler. A pointer to a 'C' function. + @result Returns an IOKernelDebugger instance on success, 0 otherwise. +*/ + + static IOKernelDebugger * debugger( IOService * target, + IODebuggerTxHandler txHandler, + IODebuggerRxHandler rxHandler ); + + /* + * Entry point for generic messages delivered from the provider. + */ + + virtual IOReturn message( UInt32 type, IOService * provider, void * arg ); + +/*! @function signalDebugger + @abstract Signal the kernel to enter the debugger when safe. +*/ + static void signalDebugger(void); + + // Virtual function padding + OSMetaClassDeclareReservedUnused( IOKernelDebugger, 0); + OSMetaClassDeclareReservedUnused( IOKernelDebugger, 1); + OSMetaClassDeclareReservedUnused( IOKernelDebugger, 2); + OSMetaClassDeclareReservedUnused( IOKernelDebugger, 3); +}; + +// Concise form of the lock()/unlock() static member functions. +// +#define IODebuggerLock IOKernelDebugger::lock +#define IODebuggerUnlock IOKernelDebugger::unlock + +#endif /* !_IOKERNELDEBUGGER_H */ diff --git a/i386/include/IOKit/network/IOMbufMemoryCursor.h b/i386/include/IOKit/network/IOMbufMemoryCursor.h new file mode 100644 index 0000000..4e40173 --- /dev/null +++ b/i386/include/IOKit/network/IOMbufMemoryCursor.h @@ -0,0 +1,381 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_NETWORK_IOMBUFMEMORYCURSOR_H +#define _IOKIT_NETWORK_IOMBUFMEMORYCURSOR_H + +#include + + +/*! @class IOMbufMemoryCursor + @abstract A mechanism to convert mbuf chains to physical addresses. + @discussion The IOMbufMemoryCursor defines the super class that all + specific mbuf cursors must inherit from, but a mbuf cursor can be created + without a specific formal subclass by just providing a segment function to + the initializers. This class performs the task of walking a given + mbuf chain and creating a physical scatter/gather list appropriate for + the target hardware. When necessary, this class may also coalesce + mbuf chains when the generated scatter/gather list exceeds the specified + hardware limit. However, this should be avoided since it exacts a + performance cost. +

+ A driver is expected to create a mbuf cursor and configure it to match the + limitations of it's DMA hardware; for instance the mbuf cursor used by + an Ethernet controller driver may have a maximum physical segment size + of 1520, and allow for up to 6 physical segments. Thus it would create a + mbuf cursor with a maxSegmentSize of 1520 and a maxNumSegments of 6. + The driver may choose to supply an OutputSegmentFunc function to + format the output of each scatter/gather segment to match the + hardware descriptor format, or it may use a subclass of + IOMbufMemoryCursor to generate IOPhysicalSegment segments with + various byte orders. +

+ A driver may also create more than one mbuf cursor, perhaps one + dedicated for the transmit thread, and the other for the receive thread. + This becomes a requirement when the driver is multi-threaded, since the + mbuf cursor maintains state and does not support reentrancy. */ + +class IOMbufMemoryCursor : public IOMemoryCursor +{ + OSDeclareDefaultStructors(IOMbufMemoryCursor) + +protected: + UInt32 maxNumSegments; + UInt32 coalesceCount; + UInt32 packetTooBigErrors; + + struct ExpansionData { }; + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; + + virtual bool initWithSpecification(OutputSegmentFunc outSeg, + UInt32 maxSegmentSize, + UInt32 maxTransferSize, + UInt32 align); + +public: +/*! @function initWithSpecification + @abstract Primary initializer for the IOMbufMemoryCursor class. + @param outSeg Function to call to output one physical segment. + @param maxSegmentSize Maximum allowable size for one segment. + @param maxNumSegments Maximum number of segments. + @result Returns true if the inherited classes and this instance initialized + successfully. +*/ + + virtual bool initWithSpecification(OutputSegmentFunc outSeg, + UInt32 maxSegmentSize, + UInt32 maxNumSegments); + +/*! @function genPhysicalSegments + @abstract Generates a physical scatter/gather list given a mbuf packet. + @discussion Generates a list of physical segments from the given mbuf. + @param packet The mbuf packet. + @param vector Void pointer to base of output physical scatter/gather list. + Always passed directly onto the OutputSegmentFunc without interpretation + by the cursor. + @param maxSegs Maximum number of segments that can be written to segments + array. + @param doCoalesce Set to true to perform coalescing when the required + number of segments exceeds the specified limit, otherwise abort and + return 0. + @result Returns the number of segments that were filled in, or + 0 if an error occurred. +*/ + + virtual UInt32 genPhysicalSegments(mbuf_t packet, void * vector, + UInt32 maxSegs, bool doCoalesce); + +/*! @function getAndResetCoalesceCount + @abstract Returns a count of the total number of mbuf chains coalesced + by genPhysicalSegments(). + @discussion This method returns a count of the total number of mbuf chains coalesced + by genPhysicalSegments(). The counter is then reset to 0. + @result Returns the coalesce count. +*/ + + UInt32 getAndResetCoalesceCount(); + + // Virtual function padding + OSMetaClassDeclareReservedUnused( IOMbufMemoryCursor, 0); + OSMetaClassDeclareReservedUnused( IOMbufMemoryCursor, 1); + OSMetaClassDeclareReservedUnused( IOMbufMemoryCursor, 2); + OSMetaClassDeclareReservedUnused( IOMbufMemoryCursor, 3); +}; + + +/*! @class IOMbufNaturalMemoryCursor + @abstract An IOMbufMemoryCursor subclass that outputs a vector of + IOPhysicalSegments in the natural byte orientation for the cpu. + @discussion The IOMbufNaturalMemoryCursor would be used when it is too + difficult to implement an OutputSegmentFunc that is more appropriate for + your hardware. This cursor just outputs an array of IOPhysicalSegments. +*/ + +class IOMbufNaturalMemoryCursor : public IOMbufMemoryCursor +{ + OSDeclareDefaultStructors(IOMbufNaturalMemoryCursor) + +public: + +/*! @function withSpecification + @abstract Factory function that creates and initializes an + IOMbufNaturalMemoryCursor in one operation. + @discussion See also IOMbufMemoryCursor::initWithSpecification. + @param maxSegmentSize Maximum allowable size for one segment. + @param maxNumSegments Maximum number of segments. + @result Returns a new mbuf cursor if successfully created and initialized, + 0 otherwise. +*/ + + static IOMbufNaturalMemoryCursor * withSpecification(UInt32 maxSegmentSize, + UInt32 maxNumSegments); + +/*! @function getPhysicalSegments + @abstract Generates a cpu natural physical scatter/gather list from a given + mbuf. + @param packet The mbuf packet. + @param vector Pointer to an array of IOPhysicalSegments for the output + physical scatter/gather list. + @param numVectorSegments Maximum number of IOPhysicalSegments accepted. + @result Returns the number of segments that were filled in, or + 0 if an error occurred. +*/ + + UInt32 getPhysicalSegments(mbuf_t packet, + struct IOPhysicalSegment * vector, + UInt32 numVectorSegments = 0); + +/*! @function getPhysicalSegmentsWithCoalesce + @abstract Generates a cpu natural physical scatter/gather list from a given + mbuf. + @discussion Generate a cpu natural physical scatter/gather list from a + given mbuf. Coalesce mbuf chain when the number of segments in the + scatter/gather list exceeds numVectorSegments. + @param packet The mbuf packet. + @param vector Pointer to an array of IOPhysicalSegments for the output + physical scatter/gather list. + @param numVectorSegments Maximum number of IOPhysicalSegments accepted. + @result Returns the number of segments that were filled in, or + 0 if an error occurred. +*/ + + UInt32 getPhysicalSegmentsWithCoalesce(mbuf_t packet, + struct IOPhysicalSegment * vector, + UInt32 numVectorSegments = 0); +}; + +//=========================================================================== +//=========================================================================== + +/*! @class IOMbufBigMemoryCursor + @abstract An IOMbufMemoryCursor subclass that outputs a vector of + IOPhysicalSegments in the big endian byte order. + @discussion The IOMbufBigMemoryCursor would be used when the DMA hardware + requires a big endian address and length pair. This cursor outputs an + array of IOPhysicalSegments that are encoded in big-endian format. +*/ + +class IOMbufBigMemoryCursor : public IOMbufMemoryCursor +{ + OSDeclareDefaultStructors(IOMbufBigMemoryCursor) + +public: + +/*! @function withSpecification + @abstract Factory function that creates and initializes an + IOMbufBigMemoryCursor in one operation. + @discussion See also IOMbufMemoryCursor::initWithSpecification. + @param maxSegmentSize Maximum allowable size for one segment. + @param maxNumSegments Maximum number of segments. + @result Returns a new mbuf cursor if successfully created and initialized, + 0 otherwise. +*/ + + static IOMbufBigMemoryCursor * withSpecification(UInt32 maxSegmentSize, + UInt32 maxNumSegments); + +/*! @function getPhysicalSegments + @abstract Generates a big endian physical scatter/gather list from a given + mbuf. + @param packet The mbuf packet. + @param vector Pointer to an array of IOPhysicalSegments for the output + physical scatter/gather list. + @param numVectorSegments Maximum number of IOPhysicalSegments accepted. + @result Returns the number of segments that were filled in, or + 0 if an error occurred. +*/ + + UInt32 getPhysicalSegments(mbuf_t packet, + struct IOPhysicalSegment * vector, + UInt32 numVectorSegments = 0); + +/*! @function getPhysicalSegmentsWithCoalesce + @abstract Generates a big endian physical scatter/gather list from a given + mbuf. + @discussion Generate a big endian physical scatter/gather list from a + given mbuf. Coalesce mbuf chain when the number of segments in the + scatter/gather list exceeds numVectorSegments. + @param packet The mbuf packet. + @param vector Pointer to an array of IOPhysicalSegments for the output + physical scatter/gather list. + @param numVectorSegments Maximum number of IOPhysicalSegments accepted. + @result Returns the number of segments that were filled in, or + 0 if an error occurred. +*/ + + UInt32 getPhysicalSegmentsWithCoalesce(mbuf_t packet, + struct IOPhysicalSegment * vector, + UInt32 numVectorSegments = 0); +}; + +//=========================================================================== +//=========================================================================== + +/*! @class IOMbufLittleMemoryCursor + @abstract An IOMbufMemoryCursor subclass that outputs a vector of + IOPhysicalSegments in the little endian byte order. + @discussion The IOMbufLittleMemoryCursor would be used when the DMA + hardware requires a little endian address and length pair. This cursor + outputs an array of IOPhysicalSegments that are encoded in little endian + format. +*/ + +class IOMbufLittleMemoryCursor : public IOMbufMemoryCursor +{ + OSDeclareDefaultStructors(IOMbufLittleMemoryCursor) + +public: + +/*! @function withSpecification + @abstract Factory function that creates and initializes an + IOMbufLittleMemoryCursor in one operation. + @discussion See also IOMbufMemoryCursor::initWithSpecification. + @param maxSegmentSize Maximum allowable size for one segment. + @param maxNumSegments Maximum number of segments. + @result Returns a new mbuf cursor if successfully created and initialized, + 0 otherwise. +*/ + + static IOMbufLittleMemoryCursor * withSpecification(UInt32 maxSegmentSize, + UInt32 maxNumSegments); + +/*! @function getPhysicalSegments + @abstract Generates a little endian physical scatter/gather list from a + given mbuf. + @param packet The mbuf packet. + @param vector Pointer to an array of IOPhysicalSegments for the output + physical scatter/gather list. + @param numVectorSegments Maximum number of IOPhysicalSegments accepted. + @result Returns the number of segments that were filled in, or + 0 if an error occurred. +*/ + + UInt32 getPhysicalSegments(mbuf_t packet, + struct IOPhysicalSegment * vector, + UInt32 numVectorSegments = 0); + +/*! @function getPhysicalSegmentsWithCoalesce + @abstract Generates a little endian physical scatter/gather list from a + given mbuf. + @discussion Generate a little endian physical scatter/gather list from a + given mbuf. Coalesce mbuf chain when the number of segments in the + scatter/gather list exceeds numVectorSegments. + @param packet The mbuf packet. + @param vector Pointer to an array of IOPhysicalSegments for the output + physical scatter/gather list. + @param numVectorSegments Maximum number of IOPhysicalSegments accepted. + @result Returns the number of segments that were filled in, or + 0 if an error occurred. +*/ + + UInt32 getPhysicalSegmentsWithCoalesce(mbuf_t packet, + struct IOPhysicalSegment * vector, + UInt32 numVectorSegments = 0); +}; + +#ifdef __ppc__ + +struct IODBDMADescriptor; + +//=========================================================================== +//=========================================================================== + +/*! @class IOMbufDBDMAMemoryCursor + @abstract An IOMbufMemoryCursor subclass that outputs a vector of + IODBDMADescriptors. +*/ + +class IOMbufDBDMAMemoryCursor : public IOMbufMemoryCursor +{ + OSDeclareDefaultStructors(IOMbufDBDMAMemoryCursor) + +public: + +/*! @function withSpecification + @abstract Factory function that creates and initializes an + IOMbufDBDMAMemoryCursor in one operation. + @discussion See also IOMbufMemoryCursor::initWithSpecification. + @param maxSegmentSize Maximum allowable size for one segment. + @param maxNumSegments Maximum number of segments. + @result Returns a new mbuf cursor if successfully created and initialized, + 0 otherwise. +*/ + + static IOMbufDBDMAMemoryCursor * withSpecification(UInt32 maxSegmentSize, + UInt32 maxNumSegments); + +/*! @function getPhysicalSegments + @abstract Generates a DBDMA descriptor list from a given mbuf. + @param packet The mbuf packet. + @param vector Pointer to an array of IODBDMADescriptor for the output list. + @param numVectorSegments Maximum number of IODBDMADescriptors accepted. + @result Returns the number of segments that were filled in, or + 0 if an error occurred. +*/ + + UInt32 getPhysicalSegments(mbuf_t packet, + struct IODBDMADescriptor *vector, + UInt32 numVectorSegments = 0); + +/*! @function getPhysicalSegmentsWithCoalesce + @abstract Generates a DBDMA descriptor list from a given mbuf. + @discussion Generate a DBDMA descriptor list from a given mbuf. + Coalesce mbuf chain when the number of elements in the list exceeds + numVectorSegments. + @param packet The mbuf packet. + @param vector Pointer to an array of IODBDMADescriptor for the output list. + @param numVectorSegments Maximum number of IODBDMADescriptors accepted. + @result Returns the number of segments that were filled in, or + 0 if an error occurred. +*/ + + UInt32 getPhysicalSegmentsWithCoalesce(mbuf_t packet, + struct IODBDMADescriptor * vector, + UInt32 numVectorSegments = 0); +}; + +#endif /* __ppc__ */ + +#endif /* !_IOKIT_NETWORK_IOMBUFMEMORYCURSOR_H */ + diff --git a/i386/include/IOKit/network/IONetworkController.h b/i386/include/IOKit/network/IONetworkController.h new file mode 100644 index 0000000..05b12d3 --- /dev/null +++ b/i386/include/IOKit/network/IONetworkController.h @@ -0,0 +1,1452 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IONETWORKCONTROLLER_H +#define _IONETWORKCONTROLLER_H + +/*! @defined kIONetworkControllerClass + @abstract The name of the IONetworkController class. */ + +#define kIONetworkControllerClass "IONetworkController" + +/*! @defined kIOVendor + @abstract A property of IONetworkController objects. + @discussion The kIOVendor property is a property of IONetworkController objects. It has an OSString value that describes the vendor of the network controller. */ + +#define kIOVendor "IOVendor" + +/*! @defined kIOModel + @abstract A property of IONetworkController objects. + @discussion The kIOModel property is a property of IONetworkController objects. It has an OSString value that describes the model of the network controller. */ + +#define kIOModel "IOModel" + +/*! @defined kIORevision + @abstract A property of IONetworkController objects. + @discussion The kIORevision property is a property of IONetworkController objects. It has an OSString value that describes the revision level of the network controller. */ + +#define kIORevision "IORevision" + +/*! @defined kIOFeatures + @abstract A property of IONetworkController objects. + @discussion The kIOFeatures property is a property of IONetworkController objects. It has an OSNumber value that describes generic features defined by IONetworkController that are supported by the + network controller. */ + +#define kIOFeatures "IOFeatures" + +/*! @defined kIOMediumDictionary + @abstract A property of IONetworkController objects. + @discussion The kIOMediumDictionary property is a property of IONetworkController + objects. It has an OSDictionary value that is a container for the + collection of IONetworkMedium objects that represent the media + types supported by the network controller. + Each entry in the dictionary is a key/value pair consisting of + the medium name, and a dictionary value that contains the + properties for that medium entry. */ + +#define kIOMediumDictionary "IOMediumDictionary" + +/*! @defined kIODefaultMedium + @abstract A property of IONetworkController objects. + @discussion The kIODefaultMedium property is a property of IONetworkController + objects. It has an OSString value that describes the name of the + default medium. This definition may change or disappear in the + future. */ + +#define kIODefaultMedium "IODefaultMedium" + +/*! @defined kIOSelectedMedium + @abstract A property of IONetworkController objects. + @discussion The kIOSelectedMedium property is a property of IONetworkController + objects. It has an OSSymbol value that describes the name of the + current selected medium. This name can be used as a key into the + medium dictionary to gather additional information about the + selected medium. */ + +#define kIOSelectedMedium "IOSelectedMedium" + +/*! @defined kIOActiveMedium + @abstract A property of IONetworkController objects. + @discussion The kIOActiveMedium property is a property of IONetworkController + objects. It has an OSSymbol value that describes the name of the + active medium. This is the name of the medium where an active + link has been established. This name can be used as a key into + the medium dictionary to gather additional information about the + active medium. */ + +#define kIOActiveMedium "IOActiveMedium" + +/*! @defined kIOLinkSpeed + @abstract A property of IONetworkController objects. + @discussion The kIOLinkSpeed property is a property of IONetworkController + objects. It has an OSNumber value that describes the speed of the + link established over the active medium in bits per second. */ + +#define kIOLinkSpeed "IOLinkSpeed" + +/*! @defined kIOLinkStatus + @abstract A property of IONetworkController objects. + @discussion The kIOLinkStatus property is a property of IONetworkController + objects. It has an OSNumber value that describes the current network + link status. See IONetworkMedium for the definition of the link + status bits. */ + +#define kIOLinkStatus "IOLinkStatus" + +/*! @defined kIOLinkData + @abstract A property of IONetworkController objects. + @discussion The kIOLinkData property is a property of IONetworkController + objects. It has an OSData value that contains additional information + describing the active link that was established. + Its interpretation is not defined. */ + +#define kIOLinkData "IOLinkData" + +/*! @defined kIOPacketFilters + @abstract A property of IONetworkController objects. + @discussion The kIOPacketFilters property is a property of IONetworkController + objects. It has an OSDictionary value that describes the entire + set of packet filters supported by the controller. Each entry + in the dictionary is a key/value pair consisting of the filter + group name, and an OSNumber describing the set of supported + filters for that group. */ + +#define kIOPacketFilters "IOPacketFilters" + +/*! @defined kIOMACAddress + @abstract A property of IONetworkController objects. + @discussion The kIOMACAddress property is a property of IONetworkController + objects. It has an OSData value that describes the hardware + MAC (media access controller) address, or station address, + of the network controller. */ + +#define kIOMACAddress "IOMACAddress" + +/*! @defined kIOMaxPacketSize + @abstract A property of IONetworkController objects. + @discussion The kIOMaxPacketSize property is a property of IONetworkController + objects. It has an OSNumber value that describes the maximum + packet size supported by the controller. */ + +#define kIOMaxPacketSize "IOMaxPacketSize" + +/*! @defined kIOMinPacketSize + @abstract A property of IONetworkController objects. + @discussion The kIOMinPacketSize property is a property of IONetworkController + objects. It has an OSNumber value that describes the minimum + packet size supported by the controller. */ + +#define kIOMinPacketSize "IOMinPacketSize" + +/*! @defined kIONetworkFilterGroup + @abstract The name assigned to the standard network filter group. */ + +#define kIONetworkFilterGroup "IONetworkFilterGroup" + +/*! @enum StandardPacketFilters + @abstract All standard packet filters. + @discussion Each filter will allow the reception of certain class of packets + depending on its destination MAC address. + @constant kIOPacketFilterUnicast Reception of unicast packets. + @constant kIOPacketFilterBroadcast Reception of broadcast packets. + @constant kIOPacketFilterMulticast Reception of multicast packets + addressed to a set of multicast addresses. + @constant kIOPacketFilterMulticastAll Reception of all multicast + packets. + @constant kIOPacketFilterPromiscuous Reception of all packets. + @constant kIOPacketFilterPromiscuousAll Reception of all packets, + including bad packets. */ + +enum { + kIOPacketFilterUnicast = 0x1, + kIOPacketFilterBroadcast = 0x2, + kIOPacketFilterMulticast = 0x10, + kIOPacketFilterMulticastAll = 0x20, + kIOPacketFilterPromiscuous = 0x100, + kIOPacketFilterPromiscuousAll = 0x200 +}; + +/*! @enum NetworkFeatureFlags + @abstract Feature flags returned by the getFeatures() method. + @constant kIONetworkFeatureNoBSDWait Set this bit in the value + returned by getFeatures() to disable the automatic wait for + "IOBSD" resource by the IONetworkController::start() method. + @constant kIONetworkFeaturesHardwareVlan Set this bit in the value + returned by getFeatures() to indicate the controller supports hardware + stripping and stuffing of 802.1q vlan tags. If the controller supports + this feature it must enable it when initializing so that all received + packets delivered to higher layers have the tag stripped. The controller + should use setVlanTag() to provide the tag information out of band. + @constant kIONetworkFeaturesSoftwareVlan Set this bit in the value + returned by getFeatures() to indicate that the controller can support software + based vlan by transmitting and receiving packets 4 bytes longer that normal. + @constant kIONetworkFeatureMultiPages Set this bit if the driver is + capable of handling packets coming down from the network stack that + reside in virtually, but not in physically contiguous span of the + external mbuf clusters. In this case, the data area of a packet in + the external mbuf cluster might cross one or more physical pages that + are disjoint, depending on the interface MTU and the packet size. + Such a use of larger than system page size clusters by the network + stack is done for better system efficiency. Drivers that utilize the + IOMbufNaturalMemoryCursor with the getPhysicalSegmentsWithCoalesce + interfaces and enumerate the list of vectors should set this flag + for possible gain in performance during bulk data transfer. + @constant kIONetworkFeatureTSOIPv4 Set this bit to advertise support + for TCP/IPv4 segmentation offload. + @constant kIONetworkFeatureTSOIPv6 Set this bit to advertise support + for TCP/IPv6 segmentation offload. +*/ + +enum { + kIONetworkFeatureNoBSDWait = 0x01, + kIONetworkFeatureHardwareVlan = 0x02, + kIONetworkFeatureSoftwareVlan = 0x04, + kIONetworkFeatureMultiPages = 0x08, + kIONetworkFeatureTSOIPv4 = 0x10, + kIONetworkFeatureTSOIPv6 = 0x20 +}; + +/* + * Kernel + */ +#if defined(KERNEL) && defined(__cplusplus) + +#include +#include +#include +#include + +class IOCommandGate; +class IOOutputQueue; +class IONetworkMedium; + +/*! @typedef IOPacketBufferConstraints + @discussion Constraint parameters, specified by a driver, + for the data buffer in a packet mbuf. This is observed by + allocatePacket() to satisfy the stated requirements. + @field alignStart Starting address byte alignment. + @field alignLength Buffer length byte alignment. */ + +typedef struct { + UInt32 alignStart; + UInt32 alignLength; + UInt32 reserved[6]; +} IOPacketBufferConstraints; + +// Some frequently used alignment constants. +// +enum { + kIOPacketBufferAlign1 = 1, + kIOPacketBufferAlign2 = 2, + kIOPacketBufferAlign4 = 4, + kIOPacketBufferAlign8 = 8, + kIOPacketBufferAlign16 = 16, + kIOPacketBufferAlign32 = 32 +}; + +/*! @const gIONetworkFilterGroup + @discussion gIONetworkFilterGroup is an OSSymbol object that contains + the name of the standard network filter group as defined by + kIONetworkFilterGroup. */ + +extern const OSSymbol * gIONetworkFilterGroup; + +/*! @class IONetworkController + @abstract Implements the framework for a generic + network controller. + @discussion A subclass of IONetworkController must provide + additional functionality specific for a particular networking type. + In addition, the driver must implement (override) a basic set of + hardware dependent methods to create a working driver. + + IONetworkController attaches itself to the data link layer (DLIL) via + an IONetworkInterface object. A controller object without a companion + interface is not accessible to the networking system. The controller + interacts with DLIL by calling methods defined by the interface object. + And conversely, DLIL will issue commands and packets to the controller + through the interface object. + + IONetworkController will create an IOCommandGate and attach this + event source to an IOWorkLoop object. All commands sent from the + interface object are handled through the IOCommandGate object, + which will serialize access to the controller. Outbound packets sent + from the interface to the controller have no implicit serialization. + Drivers must implement an output function that is thread safe, or use + an IOOutputQueue object which will provide a serialization model. + + Note: IONetworkController internally uses some private messaging constants + in the sys_iokit | sub_iokit_networking range defined in + "IONetworkControllerPrivate.h". If you create a client for your controller + (for example an IOUserClient), and it overrides the IOService::message + method, your client may receive these messages. It should ignore these + messages and pass them to super::message() + */ + +class IONetworkController : public IOService +{ + OSDeclareAbstractStructors( IONetworkController ) + +private: + + IOWorkLoop * _workLoop; + IOCommandGate * _cmdGate; + IOOutputQueue * _outputQueue; + OSSet * _clientSet; + OSCollectionIterator * _clientSetIter; + OSObject * _cmdClient; + UInt32 _alignStart; + UInt32 _alignLength; + UInt32 _alignPadding; + bool _propertiesPublished; + IOLock * _mediumLock; + IODebuggerLockState _debugLockState; + SInt32 _debugLockCount; + OSNumber * _linkStatus; + OSNumber * _linkSpeed; + const OSData * _lastLinkData; + const OSSymbol * _lastActiveMediumName; + const OSSymbol * _lastCurrentMediumName; + mbuf_t _freeList; + + struct ExpansionData { }; + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * _reserved; + + + bool _broadcastEvent(UInt32 type, void * data = 0); + + static void debugRxHandler(IOService * handler, + void * buffer, + UInt32 * length, + UInt32 timeout); + + static void debugTxHandler(IOService * handler, + void * buffer, + UInt32 length); + + static IOReturn executeCommandAction(OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3); + + static IOReturn handleCommand(void * target, + void * param0, + void * param1, + void * param2, + void * param3); + +public: + +/*! @function init + @abstract Initializes the IONetworkController object. + @discussion Instance variables are initialized, then super::init() + is called. + @param properties A dictionary object containing a property table + associated with this instance. + @result Returns true on success, false otherwise. +*/ + + virtual bool init(OSDictionary * properties); + +/*! @function start + @abstract Starts the network controller. + @discussion After the controller driver has successfully matched + to a provider, this method is called to start the network controller. + IONetworkController will allocate resources and gather controller + properties in its implementation. No I/O will be performed until + the subclass tries to attach a client object. A driver must override + this method, and call super::start() at the beginning of its own + implementation. Then check the return value to make sure that its + superclass was started successfully before proceeding. Tasks that + are usually performed by a driver's start method are: resource + allocation, hardware initialization, allocation of IOEventSources + and attaching them to a workloop, publishing a medium dictionary, + and finally, attaching an interface object when it is ready to + handle client requests. + @param provider The provider that the controller was matched + (and attached) to. + @result Returns true on success, false otherwise. +*/ + + virtual bool start(IOService * provider); + +/*! @function stop + @abstract Stops the network controller. + @discussion The counterpart of start(). The controller has been + instructed to stop running. The stop() method should release + resources and undo actions performed by the start() method. + Subclasses must override this method and call super::stop() + at the end of its implementation. + @param provider The provider that the controller was matched + (and attached) to. */ + + virtual void stop(IOService * provider); + +/*! @typedef IONetworkController::Action + @discussion Definition of a C function that can be called + through executeCommand(). + @param target The first argument passed to action. + @param param0 Action parameter 0. + @param param1 Action parameter 1. + @param param2 Action parameter 2. + @param param3 Action parameter 3. */ + + typedef IOReturn (*Action)(void * target, void * param0, + void * param1, + void * param2, + void * param3); + +/*! @function executeCommand + @abstract Makes a C function call through the command gate. + @discussion This method makes a call to a C function that will be synchronized + with the workloop thread, and any other threads that are called + with the workloop's gate closed. + @param client The client requesting the action. This parameter is not + passed to the function. + @param action Pointer to a C function to be executed. + @param target The first parameter in the action callout. + @param param0 Action parameter 0. + @param param1 Action parameter 1. + @param param2 Action parameter 2. + @param param3 Action parameter 3. + @result Returns the value returned by the action. +*/ + + virtual IOReturn executeCommand(OSObject * client, + Action action, + void * target, + void * param0 = 0, + void * param1 = 0, + void * param2 = 0, + void * param3 = 0); + +/*! @function outputPacket + @abstract Transmits an output packet. + @discussion If an IOOutputQueue was created by createOutputQueue(), + then this method will be called by the output queue object. + Otherwise, an interface object will call this method directly when + it receives an output packet from the data link layer. + + There is no upper limit on the number of mbufs, hence the number of + memory fragments, in the mbuf chain provided. Drivers must be able to + handle cases when the mbuf count might exceed the limit supported by their + DMA engines, and perform coalescing to copy the various memory fragments + into a lesser number of fragments. This complexity can be hidden from + the driver when an IOMbufMemoryCursor is used, which is able to convert + an mbuf chain into a physical address scatter-gather list that will not + exceed a specified number of physically contiguous memory segments. + See IOMbufMemoryCursor. + + The implementation in IONetworkController performs no useful action + and will drop all packets. A driver must override this method and + process the output packet provided. The implementation in the driver + must not block, since this may cause the network stack to be reentered + from an unsafe point. + @param packet An mbuf chain containing the output packet to be sent on + the network. + @param param A parameter provided by the caller. + @result Returns a return code defined by the caller. +*/ + + virtual UInt32 outputPacket(mbuf_t, void * param); + +/*! @function getFeatures + @abstract Reports generic features supported by the controller and/or + the driver. + @result This method will always return 0. Subclasses may override + this method and return a bit mask of all supported features. */ + + virtual UInt32 getFeatures() const; + +/*! @function newVendorString + @result Returns a string describing the vendor of the network controller. + The caller is responsible for releasing the string object returned. */ + + virtual const OSString * newVendorString() const; + +/*! @function newModelString + @result Returns a string describing the model of the network controller. + The caller is responsible for releasing the string object returned. */ + + virtual const OSString * newModelString() const; + +/*! @function newRevisionString + @result Returns a string describing the hardware revision of the + network controller. The caller is responsible for releasing the + string object returned. */ + + virtual const OSString * newRevisionString() const; + +/*! @function getSelectedMedium + @abstract Gets the current selected medium. + @discussion If the driver has previously called setSelectedMedium() + to indicate its current media selection, then this method will return + that medium object. Otherwise, the driver's property table is + consulted and a default medium property is examined, and the + corresponding entry in the medium dictionary is returned. + @result Returns the current selected medium, the default medium, or 0. +*/ + + virtual const IONetworkMedium * getSelectedMedium() const; + const IONetworkMedium * getCurrentMedium() const; + +/*! @function getMediumDictionary + @abstract Returns the medium dictionary published by the driver. + @discussion Returns the medium dictionary published by the driver + through publishMediumDictionary(). Use copyMediumDictionary() to + create and get a copy of the medium dictionary. + @result Returns the published medium dictionary, or 0 if the driver has not + yet published a medium dictionary through publishMediumDictionary(). +*/ + + virtual const OSDictionary * getMediumDictionary() const; + +/*! @function copyMediumDictionary + @abstract Returns a copy of the medium dictionary published by the + driver. + @discussion The caller is responsible for releasing the dictionary + object returned. Use getMediumDictionary() to get a reference to the + published medium dictionary instead of creating a copy. + @result Returns a copy of the medium dictionary, or 0 if the driver has not + published a medium dictionary through publishMediumDictionary(). +*/ + + virtual OSDictionary * copyMediumDictionary() const; + +/*! @function getOutputHandler + @abstract Gets the address of the method designated to handle output + packets for the network controller. + @result Returns a pointer to the outputPacket() method. +*/ + + virtual IOOutputAction getOutputHandler() const; + +/*! @function doEnable + @abstract Makes a synchronized call to enable() through executeCommand(). + @discussion Do not use this method, it may be removed in the future. + See enable(). +*/ + + virtual IOReturn doEnable(IOService * client); + +/*! @function doDisable + @abstract Makes a synchronized call to disable() through executeCommand(). + @discussion Do not use this method, it may be removed in the future. + See disable(). +*/ + + virtual IOReturn doDisable(IOService * client); + +/*! @function getCommandGate + @abstract Gets the IOCommandGate object created by IONetworkController. + @discussion When IONetworkController is started, an IOCommandGate object + is instantiated and attached to the workloop returned by getWorkLoop(). + This IOCommandGate object is used internally to synchronize client + commands handled through executeCommand(). Subclasses that need an + IOCommandGate should try to reuse the object returned by this method, + rather than creating a new instance. See IOCommandGate documentation. + @result Returns the IOCommandGate object created by IONetworkController. +*/ + + virtual IOCommandGate * getCommandGate() const; + +/*! @function getHardwareAddress + @abstract Gets the network controller's permanent hardware/station + address. + @discussion This method call is synchronized by the workloop's gate. + @param addr The buffer where the controller's hardware address should + be stored. + @param inOutAddrBytes The size of the address buffer provided by the + client, and replaced by this method with the actual size of + the hardware address in bytes. + @result Returns kIOReturnSuccess on success, or an error otherwise. +*/ + + virtual IOReturn getHardwareAddress(void * addr, + UInt32 * inOutAddrBytes) = 0; + +/*! @function setHardwareAddress + @abstract Sets or changes the station address used by the network + controller. + @discussion This method call is synchronized by the workloop's gate. + @param buffer The buffer containing the hardware address provided by + the client. + @param addrBytes The size of the address buffer provided by the + client in bytes. + @result Returns kIOReturnSuccess on success, or an error otherwise. +*/ + + virtual IOReturn setHardwareAddress(const void * addr, + UInt32 addrBytes) = 0; + +/*! @function enable + @abstract Handles an enable request from a client. + @discussion This method handles an enable request from a client. A client will call + enable after it has opened the controller, and before it starts to use + the controller to send and to receive packets over the network. The + client object provided is typecasted using OSDynamicCast, and depending + on whether the client is an IOKernelDebugger or an IONetworkInterface, + then an overloaded enable method that takes a more specific argument + type is called. If the client matches neither type, then + kIOReturnBadArgument is returned. A driver has the option of overriding + this base enable method, or the overloaded form. This method call is + synchronized by the workloop's gate. + @param client The client object requesting the enable. + @result Returns the return value from the overloaded enable() method, or + kIOReturnBadArgument if the client type is unknown. +*/ + + virtual IOReturn enable(IOService * client); + +/*! @function disable + @abstract Handles a disable request from a client. + @discussion This method handles a disable request from a client. A client will call + disable if it has previously enabled the controller, and it no longer + needs to transport packets or perform I/O using the controller. + The client object is typecasted using OSDynamicCast, and depending on + whether the client is an IOKernelDebugger or an IONetworkInterface, + then an overloaded disable method that takes a more specific argument + type is called. If the client matches neither type, then + kIOReturnBadArgument is returned. A driver has the option of overriding + this base disable method, or the overloaded form. This method call is + synchronized by the workloop's gate. + @param client The client object requesting the disable. + @result Returns the return from the overloaded disable() method, or + kIOReturnBadArgument if the client type is unknown. +*/ + + virtual IOReturn disable(IOService * client); + +/*! @function setMaxPacketSize + @abstract A client request to change the maximum packet size. + @discussion This method call is synchronized by the workloop's gate. + @param maxSize The new maximum packet size. + @result Returns kIOReturnUnsupported. Drivers may override this method + and return either kIOReturnSuccess to indicate that the new size + was accepted and is in effect, or an error code to indicate failure. +*/ + + virtual IOReturn setMaxPacketSize(UInt32 maxSize); + +/*! @function getMaxPacketSize + @abstract Gets the maximum packet size supported by the controller. + @param maxSize Pointer to the return value. + @result Returns kIOReturnSuccess on success, or an error code otherwise. +*/ + + virtual IOReturn getMaxPacketSize(UInt32 * maxSize) const = 0; + +/*! @function getMinPacketSize + @abstract Gets the minimum packet size supported by the controller. + @param minSize Pointer to the return value. + @result Returns kIOReturnSuccess on success, or an error code otherwise. +*/ + + virtual IOReturn getMinPacketSize(UInt32 * minSize) const = 0; + +/*! @function selectMedium + @abstract A client request to change the medium selection. + @discussion This method is called when a client issues a command + for the controller to change its current medium selection. + The implementation must call setSelectedMedium() after the change + has occurred. This method call is synchronized by the workloop's + gate. + @param medium An entry from the published medium dictionary that + represents the selection chosen by the client. + @result Returns kIOReturnUnsupported. Drivers may override this method and + return kIOReturnSuccess if the selection was successful, + or an error code otherwise. +*/ + + virtual IOReturn selectMedium(const IONetworkMedium * medium); + +/*! @function selectMediumWithName + @abstract A client request to change the medium selection. + @discussion This method is called when a client issues a command + for the controller to change its current medium selection. + This implementation will look for an entry in the medium + dictionary published by the driver that is associated with the + key given. If a match is found, then selectMedium() is called to + perform the selection, otherwise an error is reported back to the + client. Subclasses should override selectMedium() and not this + method. This method call is synchronized by the workloop's gate. + @param mediumName An OSSymbol object that describes the name of the + new medium selected by the client. + @result Returns the return from selectMedium() if a matching entry was found + from the medium dictionary. Returns kIOReturnUnsupported if a medium + dictionary does not exist, or kIOReturnBadArgument if the name given + does not match any entry in the medium dictionary. +*/ + + virtual IOReturn selectMediumWithName(const OSSymbol * mediumName); + +/*! @function getPacketFilters + @abstract Gets the set of packet filters supported by the network + controller for the given filter group. + @discussion A subclass must implement this method and report the + set of filters that are supported for the given filter group. + This method call is synchronized by the workloop's gate. + @param group The name of the filter group. + @param filters Pointer to the mask of supported filters returned by + this method. + @result Returns kIOReturnSuccess on success, or an error to indicate a + failure to discover the set of supported filters. +*/ + + virtual IOReturn getPacketFilters(const OSSymbol * group, + UInt32 * filters) const = 0; + +/*! @function enablePacketFilter + @abstract Enables one of the supported packet filters from the + given filter group. + @discussion A client will call this method to enable a supported filter + from the filter group specified. If the client wishes to enable more + than one filter, it must call this method multiple times to enable the + desired set of filters. This method call is synchronized by the + workloop's gate. + @param group The name of the filter group containing the filter to be + enabled. + @param aFilter The filter to enable. + @param enabledFilters All filters currently enabled by the client. + @param options Optional flags for the enable request. + @result Returns kIOReturnSuccess on success, or an error otherwise. +*/ + + virtual IOReturn enablePacketFilter(const OSSymbol * group, + UInt32 aFilter, + UInt32 enabledFilters, + IOOptionBits options = 0) = 0; + +/*! @function disablePacketFilter + @abstract Disables a packet filter that is currently enabled from the + given filter group. + @discussion After a supported filter has been successfully enabled, + a client can call this method to disable that filter. This method call + is synchronized by the workloop's gate. + @param group The name of the filter group containing the filter to be + disabled. + @param aFilter The filter to disable. + @param enabledFilters All filters currently enabled by the client. + @param options Optional flags for the disable request. + @result Returns kIOReturnSuccess on success, or an error otherwise. +*/ + + virtual IOReturn disablePacketFilter(const OSSymbol * group, + UInt32 aFilter, + UInt32 enabledFilters, + IOOptionBits options = 0) = 0; + +/*! @function getOutputQueue + @abstract Gets the IOOutputQueue object created by createOutputQueue(). + @result Returns a reference to the output queue object created by + createOutputQueue(). +*/ + + virtual IOOutputQueue * getOutputQueue() const; + +/*! @function getPacketBufferConstraints + @abstract Gets the controller's packet buffer constraints. + @discussion Called by start() to obtain the constraints on the + memory buffer for each mbuf packet allocated through allocatePacket(). + Drivers can override this method to specify the buffer constraints + imposed by their bus master hardware. Note that outbound packets, + those that originate from the network stack, are not currently + subject to the constraints reported here. + @param constraints A pointer to an IOPacketBufferConstraints + structure that this method is expected to initialize. + See IOPacketBufferConstraints structure definition. +*/ + + virtual void getPacketBufferConstraints( + IOPacketBufferConstraints * constraints) const; + +/*! @function allocatePacket + @abstract Allocates a packet with a data buffer that is larger than + or equal to the size specified. + @discussion This method will always return a single mbuf unless the + size requested (plus the alignment padding) is greater than MCLBYTES. + The data buffer for the mbuf (or an mbuf chain) returned is aligned + according to the constraints reported by getPacketBufferConstraints(). + The length fields in each mbuf returned are set by this method, thus + allowing the mbuf to be passed directly to an IOMbufMemoryCursor object + in order to convert the mbuf to a physical address scatter-gather list. + @param size The minimum size of the data buffer for the mbuf + packet allocated. + @result Returns an mbuf packet, or 0 if allocation failed. +*/ + + virtual mbuf_t allocatePacket(UInt32 size); + +/*! @function copyPacket + @abstract Allocates a new packet, containing data copied from an + existing source packet. + @discussion The source packet is not modified by this method. + @param m The source packet. + @param size The number of bytes to copy. If set to 0, then the + entire data buffer from the source packet is copied. + @result Returns a new packet containing the same data as the source packet. +*/ + + virtual mbuf_t copyPacket(const mbuf_t m, UInt32 size = 0); + +/*! @function replacePacket + @abstract Allocates a new packet to replace an existing packet, the + existing packet is then returned. + @param mp A handle to the existing packet. + @param size If size is 0, then the new packet shall have the same buffer + size as the original packet that is being replaced. Otherwise, the new + packet shall have the buffer size specified by this value. + @result If packet allocation was successful, then a replacement will + take place and the original packet will be returned. Otherwise, 0 + is returned, and the original packet will be left untouched. +*/ + + virtual mbuf_t replacePacket(mbuf_t * mp, UInt32 size = 0); + +/*! @function replaceOrCopyPacket + @abstract A helper method that combines the functionality of + copyPacket() and replacePacket() to process a packet containing + a received frame. + @discussion This method will either make a copy or replace the existing + packet, whichever is more time efficient. Packets containing small frames + are copied, otherwise they are replaced. If replaced, then the existing + packet is returned, and a new packet with the same buffer size is created + to take its place. If copied, the existing packet is left intact, while a + copy is returned that will hold a copy of the data from the source packet. + @param mp A handle to the existing packet that may be replaced. + @param length The number of bytes received held in the packet. + Must be greater than zero. + @param replaced Pointer to a return value that is set to true to indicate + that the existing packet was replaced, or false to indicate that the + existing packet was not replaced, and a copy was created. + @result Returns a replacement or a copy of the existing packet, or 0 if packet + allocation failed. +*/ + + virtual mbuf_t replaceOrCopyPacket(mbuf_t * mp, + UInt32 length, + bool * replaced); + + enum { + kDelayFree = 0x01 + }; + +/*! @function freePacket + @abstract Releases the packet given back to the free pool. + @param m The packet to be freed. + @param options When kDelayFree option is set, then the packet + provided to this function will be queued on the free packet queue. + A subsequent call to releaseFreePackets() will release all queued + packets by making a single BSD function call. Without the kDelayFree + option, the packet provided will be released immediately. +*/ + + virtual void freePacket(mbuf_t, IOOptionBits options = 0); + +/*! @function releaseFreePackets + @abstract Releases all packets held in the free packet queue. + @discussion The free packet queue is not protected by a lock. This + function must be called in a single-threaded manner with respect to + all calls to freePacket() with the kDelayFree option set. + @result Returns the number of packets queued and released. +*/ + + virtual UInt32 releaseFreePackets(); + +/*! @enum TCP/IPChecksums + @abstract TCP/IP checksums that may be supported by the + hardware. + @constant kChecksumFamilyTCPIP A value that describes the collection + of TCP/IP checksums. + @constant kChecksumIP An IP header checksum. + @constant kChecksumTCP A TCP checksum that covers the TCP header and TCP + data. + @constant kChecksumUDP A UDP checksum that covers the UDP header and UDP + data. + @constant kChecksumTCPNoPseudoHeader A TCP checksum that covers the TCP + header and the TCP data, but the pseudo header is not included in the + checksum computation. A partial 16-bit checksum value must be provided + to allow the protocol stacks to calculate and verify the final checksum. + This type of checksum is not currently supported on the output path. + @constant kChecksumUDPNoPseudoHeader A UDP checksum that covers the UDP + header and the UDP data, but the pseudo header is not included in the + checksum computation. A partial 16-bit checksum value must be provided + to allow the protocol stacks to calculate and verify the final checksum. + This type of checksum is not currently supported on the output path. + @constant kChecksumTCPSum16 The hardware has a simple checksum engine + that can perform a TCP style ones complement sum of 16-bit words over + a certain range of bytes in a packet. The hardware does not have the + ability to scan for IP or TCP headers, and the driver must pass/get + additional parameter(s) to or from the protocol stack to coordinate + the checksumming effort. +*/ + + enum { + kChecksumFamilyTCPIP = 0x00000001, + kChecksumIP = 0x0001, + kChecksumTCP = 0x0002, + kChecksumUDP = 0x0004, + kChecksumTCPNoPseudoHeader = 0x0100, + kChecksumUDPNoPseudoHeader = 0x0200, + kChecksumTCPSum16 = 0x1000 + }; + +/*! @function getChecksumSupport + @abstract Gets checksums that are supported by the network controller for + the given checksum family. + @discussion A network controller that is capable of inserting and verifying + checksums on output and input packets, should override this method and + advertise its capability in order to assist or offload the software checksum + calculations performed by the protocol stacks. + @param checksumMask A pointer to the mask of supported checksums returned + by this method. + @param checksumFamily A value that specifies the checksum family. + @param isOutput Set to true to query the support for checksum insertion on + output packets, or false to query the support for checksum verification + on input packets. Controllers that have symmetric hardware checksum support + can return a fixed checksum mask value, and ignore this argument. + @result Default return is kIOReturnUnsupported. Controllers that override + this method must return kIOReturnSuccess. Any other return value will be + interpretated as a lack of checksum support, regardless of the value + returned through the first argument. +*/ + + virtual IOReturn getChecksumSupport( UInt32 * checksumMask, + UInt32 checksumFamily, + bool isOutput ); + +/*! @function setChecksumResult + @abstract Encodes a received packet with the checksum result reported + by the hardware. + @discussion A network controller that can verify the checksum(s) for a + received packet, should call this method to encode the result on the + packet, before passing it up towards the protocol stacks. + @param packet An mbuf containing a packet that has been checksummed by + the hardware. + @param checksumFamily A value that specifies the checksum family. + @param resultMask A mask of all checksums that were checked or computed. + Setting a bit implies that the driver is able to report the result of + the checksum computation, by asserting the validity of the checksum, + or by returning a partial checksum value. + @param validMask A mask of all checksums are were computed and verified + by the hardware as valid. Certain types of checksum performed by the + hardware are inheritely incomplete, and therefore should never be marked + as valid. A checksum cannot be marked valid unless it has also been + checked. + @param param0 Optional parameter 0, defaults to 0. + @param param1 Optional parameter 1, defaults to 0. + @result Returns true if the checksum family is valid and the packet has been + encoded with the checksum result provided, false otherwise. +*/ + + virtual bool setChecksumResult( mbuf_t packet, + UInt32 checksumFamily, + UInt32 resultMask, + UInt32 validMask, + UInt32 param0 = 0, + UInt32 param1 = 0 ); + +/*! @function getChecksumDemand + @abstract Fetches the demand for hardware checksum computation and insertion + for the given packet before it is transmitted on the network. + @discussion A network controller that can insert a checksum for output + packets must call this method to obtain the set of checksums that it must + compute, and insert into the appropriate fields in the given output packet. + @param packet An mbuf containing a packet that may be missing one or more + checksums in the specified checksum family. + @param checksumFamily A value that specifies the checksum family. + @param demandMask A mask of all checksums that the hardware must compute + and insert into the appropriate checksum fields in the packet. + @param param0 Optional parameter 0, defaults to 0. + @param param1 Optional parameter 1, defaults to 0. +*/ + + virtual void getChecksumDemand( const mbuf_t packet, + UInt32 checksumFamily, + UInt32 * demandMask, + void * param0 = 0, + void * param1 = 0 ); + +/*! @function publishMediumDictionary + @abstract Publishes a dictionary of IONetworkMedium objects to + advertise the media selection supported by the network controller. + @discussion Called by drivers to publish their medium dictionary. + Each entry in the dictionary is an IONetworkMedium object that + represents a single medium that is supported by the controller. + This method will make a copy of the dictionary provided, then add + the copy to the driver's property table. The dictionary provided + can be released by the caller upon returning from this method. + It is permissible to call this method multiple times, which may be + necessary if the hardware's media capability changes dynamically. + However, if the capability is static, which is often the case, + then a driver will typically call this method only once from + its start() method. + + Several methods depend on the presence of a medium dictionary. + They should be called after the medium dictionary has been + published. Those methods are: + setSelectedMedium() + getSelectedMedium() + getMediumDictionary() + copyMediumDictionary() + + @param mediumDict A dictionary of IONetworkMedium objects. + @result Returns true if the dictionary is valid, and was successfully + exported to the property table, false otherwise. +*/ + + virtual bool publishMediumDictionary(const OSDictionary * mediumDict); + +/*! @function setSelectedMedium + @abstract Designates an entry in the published medium dictionary as + the current selected medium. + @discussion After the driver has configured the hardware to select + one of its supported media types, it must call this method to inform + its parent about the change that has occurred. IONetworkController + will update a property in the registry to reflect the current selection. + @param medium A medium object representing the current selection. + @result Returns true if the property table update was successful, + false if the update failed, or if the medium provided does not match + any entry from the published medium dictionary. +*/ + + virtual bool setSelectedMedium(const IONetworkMedium * medium); + bool setCurrentMedium(const IONetworkMedium * medium); + +/*! @function setLinkStatus + @abstract Reports the link status and the active medium. + @discussion Drivers must call this method when a link change is + detected. IONetworkController will update the link status properties + in the registry, and generate an event to inform the upper layers + about the change. + @param status Link status bits. + See IONetworkMedium for the definition of the link status bits. + @param activeMedium An object in the published medium dictionary + that represents the active medium. This may not be the same as + the selected medium. Set this to 0 if the link is inactive. + @param speed Link speed in units of bits per second. If zero, then + the link speed is taken from the medium object provided. + @param data An OSData containing any additional link parameter that + the driver wishes to publish to the registry. + @result Returns true if all link properties were successfully updated, + false otherwise. +*/ + + virtual bool setLinkStatus( + UInt32 status, + const IONetworkMedium * activeMedium = 0, + UInt64 speed = 0, + OSData * data = 0); + +/*! @function systemWillShutdown + @abstract Handles system shutdown and restart notifications. + @discussion Overrides IOService::systemWillShutdown in order + to notify network clients that the power-managed controller should be disabled. + As a result, drivers can expect their disable method to be called + before system shutdown or restart. This implementation is synchronous and can + block before calling IOService::systemWillShutdown and return. + @param See IOService::systemWillShutdown. +*/ + + virtual void systemWillShutdown( IOOptionBits specifier ); + + /* Override IOService::setAggressiveness() */ + + virtual IOReturn setAggressiveness( + unsigned long type, unsigned long newLevel ); + +protected: + +/*! @function free + @abstract Frees the IONetworkController object. + @discussion Frees the IONetworkController object by releasing all + allocated resources, followed by a call to super::free(). +*/ + + virtual void free(); + +/*! @function registerWithPolicyMaker + @abstract Implemented by controller drivers to register with + the power management policy-maker. + @discussion Drivers that are able to power manage their hardware + should override this method and register with the policy-maker + provided by calling IOService::registerPowerDriver(). + IONetworkController will call this method before the initial + attempt is made to attach a client. + @param policyMaker The policy-maker chosen to manage power for + this network controller. + @result Returns kIOReturnSuccess on success, kIOReturnUnsupported if the + driver does not support power management, or an appropriate error + return code. The default return is kIOReturnUnsupported. */ + + virtual IOReturn registerWithPolicyMaker(IOService * policyMaker); + +/*! @function createWorkLoop + @abstract Method called by IONetworkController prior to the initial + getWorkLoop() call. + @discussion Before IONetworkController calls getWorkLoop() in its + start() method, it will call createWorkLoop() to make sure that a + subclass that wants to create a workloop, will do so before its + first use. + @result Returns true to indicate success, false otherwise. Returning false + will fail IONetworkController::start(). +*/ + + virtual bool createWorkLoop(); + +/*! @function prepare + @abstract Prepares the controller before an IOService is created and + attached as a client. + @discussion This method is called by attachInterface() or + attachDebuggerClient() to prepare the controller before the new client + object is attached. This method will call publishProperties() to publish + controller capabilities and properties that may be used by client objects. + However, publishProperties() will be called only once, even if prepare() + is called multiple times. This method call is synchronized by the + workloop's gate. + @result Returns kIOReturnSuccess on success, or an error code otherwise. + Returning an error will fail the client attach. +*/ + + virtual IOReturn prepare(); + +/*! @function publishProperties + @abstract Publishes controller properties and capabilities. + @discussion Called by IONetworkController to discover controller + properties, and publish them to the property table in the I/O Kit + Registry. This method is called once by prepare(). + @result Returns true if all properties were discovered and published + successfully, false otherwise. Returning false will prevent client + objects from attaching to the controller, since a property that + a client relies upon may be missing. */ + + virtual bool publishProperties(); + +/*! @function getCommandClient + @abstract Gets the command client object. + @discussion Methods called on the workloop context to service a + client request can call this method to get the client object that + initiated the command. + @result Returns the command client. If the caller is not running on the + workloop thread, or if the thread does not have the workloop's gate + closed, then 0 is returned. +*/ + + virtual OSObject * getCommandClient() const; + +/*! @function handleOpen + @abstract Handles a client open. + @discussion This method handles a client open on the controller object. IOService + calls this method with the arbitration lock held. Subclasses + should not override this method. + @param client The client that is attempting to open the controller. + @param options Not used. See IOService. + @param argument Not used. See IOService. + @result Returns true to accept the client open, false to refuse it. +*/ + + virtual bool handleOpen(IOService * client, + IOOptionBits options, + void * argument); + +/*! @function handleClose + @abstract Handles a client close. + @discussion This method handles a close from one of the client objects. IOService + calls this method with the arbitration lock held. Subclasses + should not override this method. + @param client The client that is closing the controller. + @param options Not used. See IOService. +*/ + + virtual void handleClose(IOService * client, IOOptionBits options); + +/*! @function handleIsOpen + @abstract Queries whether a client has an open on the controller. + @discussion This method is always called by IOService with the + arbitration lock held. Subclasses should not override this method. + @result Returns true if the specified client, or any client if none (0) is + specified, presently has an open on this object. +*/ + + virtual bool handleIsOpen(const IOService * client) const; + +/*! @function enable + @abstract A request from an interface client to enable the controller. + @discussion This method is called by an interface client to enable the controller. + Upon receiving this command, the controller driver must bring up the + hardware and become ready to transmit and receive packets. A driver + should also delay the allocation of most runtime resources until this + method is called in order to conserve system resources. This method call + is synchronized by the workloop's gate. + @param interface The interface client object that requested the enable. + @result Returns kIOReturnUnsupported. Drivers that override this method must + return kIOReturnSuccess on success, or an error code otherwise. +*/ + + virtual IOReturn enable(IONetworkInterface * interface); + +/*! @function disable + @abstract A request from an interface client to disable the controller. + @discussion This method is called by an interface client to disable the controller. + This method should stop the hardware and disable hardware interrupt + sources. Any resources allocated by enable() should also be deallocated. + This method call is synchronized by the workloop's gate. + @param interface The interface object that requested the disable. + @result kIOReturnUnsupported. Drivers that override this method must + return Returns kIOReturnSuccess on success, or an error code otherwise. +*/ + + virtual IOReturn disable(IONetworkInterface * interface); + +/*! @function attachInterface + @abstract Attaches a new interface client object. + @discussion This method creates a new interface object and attaches it to the + controller. The createInterface() method is called to perform + the interface allocation and initialization, followed by a call to + configureInterface() to configure it. Subclasses can override those + two methods to customize the interface client attached. Drivers will + usually call this method from start(), after they are ready to process + client requests. Since most drivers will have a single interface + client, this method will likely be called only once. + @param interface Upon success (return value is true), the + interface object will be written to the handle provided. + @param doRegister If true, then registerService() is called to register + the interface, which will trigger the matching process, and will ultimately + cause the interface to become registered with the data link layer. + Drivers that wish to delay the registration can set doRegister to false, + and call registerService() on the interface object when the controller + becomes ready. This allows the driver to attach an interface without + making its services available to the rest of the system. + @result Returns true on success, false otherwise. +*/ + + virtual bool attachInterface(IONetworkInterface ** interface, + bool doRegister = true); + +/*! @function detachInterface + @abstract Detaches an interface client object. + @discussion This method will verify that the object provided is indeed + an IONetworkInterface instance, and then call its terminate() method. + Note that an interface object will close and detach from its + controller after the data link layer has removed all references to + all data structures exposed by the interface. The interface object + should be released following this call. + @param interface An interface object to be detached and terminated. + @param sync If true, the interface is terminated synchronously. + This may cause this method to block for an indeterminate + amount of time. */ + + virtual void detachInterface(IONetworkInterface * interface, + bool sync = false); + +/*! @function createInterface + @abstract Creates a new network interface object. + @discussion This method is called by attachInterface() to perform + allocation and initialization of a new interface object. A subclass of + IONetworkController must implement this method and return a matching + interface object. For example, IOEthernetController's implementation + will return an IOEthernetInterface object when createInterface() is + called. + @result Returns a newly allocated and initialized interface object. +*/ + + virtual IONetworkInterface * createInterface() = 0; + +/*! @function configureInterface + @abstract Configures a newly created network interface object. + @discussion This method configures an interface object that was created by + createInterface(). Subclasses can override this method to customize + and examine the interface object that will be attached to the + controller as a client. + @param interface The interface object to be configured. + @result Returns true if the operation was successful, false otherwise + (this will cause attachInterface() to fail and return 0). +*/ + + virtual bool configureInterface(IONetworkInterface * interface); + +/*! @function createOutputQueue + @abstract Creates an IOOutputQueue to handle output packet queueing, + and also to resolve contention for the controller's transmitter from + multiple client threads. + @discussion This method is called by start() to create an IOOutputQueue object to + handle output packet queueing. The default implementation will always + return 0, hence no output queue will be created. A driver may override + this method and return a subclass of IOOutputQueue. IONetworkController + will keep a reference to the queue created, and will release this + object when IONetworkController is freed. Also see getOutputQueue(). + @result Returns a newly allocated and initialized IOOutputQueue object. +*/ + + virtual IOOutputQueue * createOutputQueue(); + +/*! @function enable + @abstract An enable request from an IOKernelDebugger client. + @discussion Drivers that provide debugging support may either override + this method and set up the hardware to support the polled-mode send and + receive methods, receivePacket() and sendPacket(), or override the base + enable() and disable() methods that take an IOService argument. + @param debugger The IOKernelDebugger client requesting the enable. + @result Returns kIOReturnSuccess. Drivers must return kIOReturnSuccess + on success, or an error otherwise. +*/ + + virtual IOReturn enable(IOKernelDebugger * debugger); + +/*! @function disable + @abstract A disable request from an IOKernelDebugger client. + @discussion Drivers that provide debugging support may either override + this method to disable support for the polled-mode send and receive + methods, or override the base enable() and disable() methods that + take an IOService argument. + @param debugger The IOKernelDebugger client requesting the disable. + @result Returns kIOReturnSuccess. Drivers must return kIOReturnSuccess + on success, or an error otherwise. +*/ + + virtual IOReturn disable(IOKernelDebugger * debugger); + +/*! @function attachDebuggerClient + @abstract Attaches a new IOKernelDebugger client object. + @discussion This method allocates an IOKernelDebugger object and attaches it as + a client. Having a debugger client implies that the controller + supports kernel debugging, and therefore must implement the two + polled-mode methods that are called by the debugger client. See + sendPacket() and receivePacket(). Only a single debugger client + should be attached to each controller. + @param debuggerP A handle that will return the new + IOKernelDebugger object created. + @result Returns true on success, false otherwise. +*/ + + virtual bool attachDebuggerClient(IOKernelDebugger ** debuggerP); + +/*! @function detachDebuggerClient + @abstract Detaches an IOKernelDebugger client object. + @discussion This method detaches and terminates the IOKernelDebugger client object + provided. A synchronous termination is issued, and this method will + return after the debugger client has been terminated. The debugger + client should be released following this call. + @param debugger The IOKernelDebugger object to be detached and + terminated. If the argument provided is NULL or is not an + IOKernelDebugger, this method will return immediately. +*/ + + virtual void detachDebuggerClient(IOKernelDebugger * debugger); + +/*! @function reserveDebuggerLock + @abstract Takes the global debugger lock. + @discussion This method should not be used. Instead, call the + lock() method provided by IOKernelDebugger. +*/ + + void reserveDebuggerLock(); + +/*! @function releaseDebuggerLock + @abstract Releases the global debugger lock. + @discussion This method should not be used. Instead, call the + unlock() method provided by IOKernelDebugger. +*/ + + void releaseDebuggerLock(); + +/*! @function receivePacket + @abstract Debugger polled-mode receive handler. + @discussion This method must be implemented by a driver that supports + kernel debugging. After a debugger client has been attached through + attachDebuggerClient(), this method will be called by the debugger + client to poll for an incoming packet when the kernel debugger is active. + This method may be called from the primary interrupt context, and the + implementation must avoid any memory allocation, and must never block. + The receivePacket() method in IONetworkController is used as a placeholder, + it performs no useful action, and should not be called. A driver that + attaches a debugger client must override this method. + @param pkt Address of a receive buffer where the received packet should + be stored. This buffer has room for 1518 bytes. + @param pktSize Address where the number of bytes received must be + recorded. Set this to zero if no packets were received during + the timeout interval. + @param timeout The maximum amount of time in milliseconds to poll for + a packet to arrive before this method must return. +*/ + + virtual void receivePacket(void * pkt, UInt32 * pktSize, UInt32 timeout); + +/*! @function sendPacket + @abstract Debugger polled-mode transmit handler. + @discussion This method must be implemented by a driver that supports + kernel debugging. After a debugger client has been attached through + attachDebuggerClient(), this method will be called by the debugger + to send an outbound packet only when the kernel debugger is active. + This method may be called from the primary interrupt context, and the + implementation must avoid any memory allocation, and must never block. + The sendPacket() method in IONetworkController is used as a placeholder, + it performs no useful action, and should not be called. A driver that + attaches a debugger client must override this method. + @param pkt Pointer to a transmit buffer containing the packet to be + sent on the network. + @param pktSize The size of the transmit buffer in bytes. +*/ + + virtual void sendPacket(void * pkt, UInt32 pktSize); + + // Virtual function padding + OSMetaClassDeclareReservedUnused( IONetworkController, 0); + OSMetaClassDeclareReservedUnused( IONetworkController, 1); + OSMetaClassDeclareReservedUnused( IONetworkController, 2); + OSMetaClassDeclareReservedUnused( IONetworkController, 3); + OSMetaClassDeclareReservedUnused( IONetworkController, 4); + OSMetaClassDeclareReservedUnused( IONetworkController, 5); + OSMetaClassDeclareReservedUnused( IONetworkController, 6); + OSMetaClassDeclareReservedUnused( IONetworkController, 7); + OSMetaClassDeclareReservedUnused( IONetworkController, 8); + OSMetaClassDeclareReservedUnused( IONetworkController, 9); + OSMetaClassDeclareReservedUnused( IONetworkController, 10); + OSMetaClassDeclareReservedUnused( IONetworkController, 11); + OSMetaClassDeclareReservedUnused( IONetworkController, 12); + OSMetaClassDeclareReservedUnused( IONetworkController, 13); + OSMetaClassDeclareReservedUnused( IONetworkController, 14); + OSMetaClassDeclareReservedUnused( IONetworkController, 15); + OSMetaClassDeclareReservedUnused( IONetworkController, 16); + OSMetaClassDeclareReservedUnused( IONetworkController, 17); + OSMetaClassDeclareReservedUnused( IONetworkController, 18); + OSMetaClassDeclareReservedUnused( IONetworkController, 19); + OSMetaClassDeclareReservedUnused( IONetworkController, 20); + OSMetaClassDeclareReservedUnused( IONetworkController, 21); + OSMetaClassDeclareReservedUnused( IONetworkController, 22); + OSMetaClassDeclareReservedUnused( IONetworkController, 23); + OSMetaClassDeclareReservedUnused( IONetworkController, 24); + OSMetaClassDeclareReservedUnused( IONetworkController, 25); + OSMetaClassDeclareReservedUnused( IONetworkController, 26); + OSMetaClassDeclareReservedUnused( IONetworkController, 27); + OSMetaClassDeclareReservedUnused( IONetworkController, 28); + OSMetaClassDeclareReservedUnused( IONetworkController, 29); + OSMetaClassDeclareReservedUnused( IONetworkController, 30); + OSMetaClassDeclareReservedUnused( IONetworkController, 31); +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* !_IONETWORKCONTROLLER_H */ + diff --git a/i386/include/IOKit/network/IONetworkData.h b/i386/include/IOKit/network/IONetworkData.h new file mode 100644 index 0000000..c0d2de4 --- /dev/null +++ b/i386/include/IOKit/network/IONetworkData.h @@ -0,0 +1,477 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IONETWORKDATA_H +#define _IONETWORKDATA_H + +#define IONetworkParameter IONetworkData // FIXME + +/*! @enum NetworkDataAccessTypes + @abstract Constants that describe access types. + @constant kIONetworkDataAccessTypeRead Read access. + @constant kIONetworkDataAccessTypeWrite Write access. + @constant kIONetworkDataAccessTypeReset Reset access. + @constant kIONetworkDataAccessTypeSerialize Serialization access. +*/ + +enum { + kIONetworkDataAccessTypeRead = 0x01, + kIONetworkDataAccessTypeWrite = 0x02, + kIONetworkDataAccessTypeReset = 0x04, + kIONetworkDataAccessTypeSerialize = 0x08, + kIONetworkDataAccessTypeMask = 0xff +}; + +/*! @define kIONetworkDataBasicAccessTypes + @discussion The default access types supported by an IONetworkData + object. Allow read() and serialize(). */ + +#define kIONetworkDataBasicAccessTypes \ + (kIONetworkDataAccessTypeRead | kIONetworkDataAccessTypeSerialize) + +/*! @enum NetworkDataBufferTypes + @abstract The types of data buffers that can be managed by an IONetworkData object. + @constant kIONetworkDataBufferTypeInternal An internal data buffer + allocated by the init() method. + @constant kIONetworkDataBufferTypeExternal An external (persistent) data + buffer. + @constant kIONetworkDataBufferTypeNone No data buffer. The only useful + action perfomed by an IONetworkData object with this buffer type + is to call the access notification handler. +*/ + +enum { + kIONetworkDataBufferTypeInternal = 0, + kIONetworkDataBufferTypeExternal, + kIONetworkDataBufferTypeNone +}; + +/*! @defined kIONetworkDataBytes + @abstract A property of IONetworkData objects. + @discussion The kIONetworkDataBytes property is an OSData that describes + the data buffer of an IONetworkData object. This property is present + only if kIONetworkDataAccessTypeSerialize access is supported. +*/ + +#define kIONetworkDataBytes "Data" + +/*! @defined kIONetworkDataAccessTypes + @abstract A property of IONetworkData objects. + @discussion The kIONetworkDataAccessTypes property is an OSNumber that + describes the supported access types of an IONetworkData object. +*/ + +#define kIONetworkDataAccessTypes "Access Types" + +/*! @defined kIONetworkDataSize + @abstract A property of IONetworkData objects. + @discussion The kIONetworkDataSize property is an OSNumber that + describes the size of the data buffer of an IONetworkData object. +*/ + +#define kIONetworkDataSize "Size" + +#ifdef KERNEL + +#include +#include + +/*! @class IONetworkData + @abstract An object that manages a fixed-size named buffer. + @discussion An IONetworkData object manages a fixed-size named buffer. + This object provides external access methods that can be used to + access the contents of the data buffer. In addition, serialization + is supported, and therefore this object can be added to a property + table to publish the data object. An unique name must be assigned to + the object during initialization. An OSSymbol key will be created + based on the assigned name, and this key can be used when the object + is added to a dictionary. + + The level of access granted to the access methods can be restricted, + by specifying a set of supported access types when the object is + initialized, or modified later by calling setAccessTypes(). By default, + each IONetworkData object created will support serialization, and will + also allow its data buffer to be read through the read() access method. + + An access notification handler, in the form of a 'C' function, can + be registered to receive a call each time the data buffer is accessed + through an access method. Arguments provided to the handler will identify + the data object and the type of access that triggered the notification. + The handler can therefore perform lazy update of the data buffer until + an interested party tries to read or serialize the data. The notification + handler can also take over the default action performed by the access + methods when the buffer type is set to kIONetworkDataBufferTypeNone. + This will prevent the access methods from accessing the data buffer, + and allow the handler to override the access protocol. + + This object is primarily used by IONetworkInterface to export interface + properties to user space. +*/ + + +class IONetworkData : public OSObject +{ + OSDeclareDefaultStructors( IONetworkData ) + +public: + +/*! @typedef Action + @abstract Defines a C function that may be called by an IONetworkData object + when one of its access methods is called. + @param target The target of the notification. + @param param A parameter that was provided when the notification + handler was registered. + @param data The IONetworkData object being accessed, and the + sender of the notification. + @param accessType A bit will be set indicating the type of access + which triggered the notification. + @param buffer Pointer to the accessor's buffer. Only valid for + read() and write() accesses. + @param bufferSize Pointer to the size of the accessor's buffer. + @param offset An offset from the start of the data buffer to begin + reading or writing. +*/ + + typedef IOReturn (*Action)(void * target, + void * param, + IONetworkData * data, + UInt32 accessType, + void * buffer, + UInt32 * bufferSize, + UInt32 offset); + +protected: + const OSSymbol * _key; // key associated with this object. + UInt32 _access; // supported access types. + void * _buffer; // Data buffer. + UInt32 _bufType; // buffer type + UInt32 _size; // data buffer size. + void * _tapTarget; // target for access notification. + Action _tapAction; // the function to call. + void * _tapParam; // arbitrary notification param. + + struct ExpansionData { }; + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData * _reserved; + + +/*! @function free + @abstract Frees the IONetworkData object. +*/ + + virtual void free(); + +/*! @function writeBytes + @abstract Writes to the data buffer with data from a source buffer + provided by the caller. + @param srcBuffer Pointer to a source buffer provided by the caller. + @param srcBufferSize The size of the source buffer. + @param writeOffset A byte offset from the start of the data buffer + to begin writting. + @result Returns true if the operation was successful, false otherwise. +*/ + + virtual bool writeBytes(const void * srcBuffer, + UInt32 srcBufferSize, + UInt32 writeOffset = 0); + +/*! @function readBytes + @abstract Reads from the data buffer and copies the data to a destination + buffer provided by the caller. + @param dstBuffer Pointer to the destination buffer. + @param dstBufferSize Pointer to an integer containing the size of the + destination buffer. And is overwritten by this method with the actual + number of bytes copied to the destination buffer. + @param readOffset A byte offset from the start of the data buffer + to begin reading. + @result Returns true if the operation was successful, false otherwise. +*/ + + virtual bool readBytes(void * dstBuffer, + UInt32 * dstBufferSize, + UInt32 readOffset = 0) const; + +/*! @function clearBuffer + @abstract Clears the data buffer by filling it with zeroes. + @result Returns true if the operation was successful, false otherwise. +*/ + + virtual bool clearBuffer(); + +public: + +/*! @function withInternalBuffer + @abstract Factory method that constructs and initializes an + IONetworkData object with an internal data buffer. + @param name A name to assign to this object. + @param bufferSize The number of bytes to allocate for the internal data + buffer. + @param accessTypes The initial supported access types. + @param target The notification target. + @param action The notification action. + @param param A parameter to pass to the notification action. + @result Returns an IONetworkData object on success, or 0 otherwise. +*/ + + static IONetworkData * + withInternalBuffer(const char * name, + UInt32 bufferSize, + UInt32 accessTypes = + kIONetworkDataBasicAccessTypes, + void * target = 0, + Action action = 0, + void * param = 0); + +/*! @function withExternalBuffer + @abstract Factory method that constructs and initializes an + IONetworkData object with an external data buffer. + @param name A name to assign to this object. + @param bufferSize The size of the external data buffer. + @param externalBuffer Pointer to the external data buffer. + @param accessTypes The initial supported access types. + @param target The notification target. + @param action The notification action. + @param param A parameter to pass to the notification action. + @result Returns an IONetworkData object on success, or 0 otherwise. +*/ + + static IONetworkData * + withExternalBuffer(const char * name, + UInt32 bufferSize, + void * externalBuffer, + UInt32 accessTypes = + kIONetworkDataBasicAccessTypes, + void * target = 0, + Action action = 0, + void * param = 0); + +/*! @function withNoBuffer + @abstract Factory method that constructs and initializes an + IONetworkData object without a data buffer. + @discussion The notification handler + must intervene when the IONetworkData is accessed. + @param name A name to assign to this object. + @param bufferSize The size of the phantom data buffer. + @param accessTypes The initial supported access types. + @param target The notification target. + @param action The notification action. + @param param A parameter to pass to the notification action. + @result Returns an IONetworkData object on success, or 0 otherwise. +*/ + + static IONetworkData * withNoBuffer(const char * name, + UInt32 bufferSize, + UInt32 accessTypes, + void * target, + Action action, + void * param = 0); + +/*! @function init + @abstract Initializes an IONetworkData object. + @param name A name to assign to this object. + @param bufferType The type of buffer associated with this object. + @param bufferSize The size of the data buffer. + @param externalBuffer Pointer to an external data buffer. + @param accessTypes The initial supported access types. + Can be later modified by calling setAccessTypes(). + @param target The notification target. + @param action The notification action. + @param param A parameter to pass to the notification action. + @result Returns true if initialized successfully, false otherwise. +*/ + + virtual bool init(const char * name, + UInt32 bufferType, + UInt32 bufferSize, + void * externalBuffer = 0, + UInt32 accessTypes = + kIONetworkDataBasicAccessTypes, + void * target = 0, + Action action = 0, + void * param = 0); + +/*! @function setAccessTypes + @abstract Sets the types of access that are permitted on the data buffer. + @param types A mask of access types indicating the supported access + types. +*/ + + virtual void setAccessTypes(UInt32 types); + +/*! @function setNotificationTarget + @abstract Registers a C function to handle access notifications sent + from this object. + @discussion A notification is sent by an IONetworkData object to the + registered notification handler, when an access method is called to + modify the contents of the data buffer. + @param target The first parameter passed to the notification handler. + @param action A pointer to a C function that will handle the notification. + If 0, then notification is disabled. + @param param An optional parameter passed to the notification handler. +*/ + + virtual void setNotificationTarget(void * target, + Action action, + void * param = 0); + +/*! @function getBuffer + @abstract Gets a pointer to the data buffer. + @result Returns a pointer to the data buffer. Returns 0 if the buffer type is + kIONetworkDataBufferTypeNone. +*/ + + virtual const void * getBuffer() const; + +/*! @function getBufferType + @abstract Gets the type of data buffer managed by this object. + @result Returns a constant that describes the type of the data buffer. +*/ + + virtual UInt32 getBufferType() const; + +/*! @function getAccessTypes + @abstract Gets the types of data access supported by this object. + @result Returns a mask of supported access types. +*/ + + virtual UInt32 getAccessTypes() const; + +/*! @function getNotificationTarget + @abstract Gets the first parameter that will be passed to the access + notification handler. + @result Returns the first parameter that will be passed to the access notification + handler. +*/ + + virtual void * getNotificationTarget() const; + +/*! @function getNotificationAction + @abstract Gets the C function that was registered to handle access + notifications sent from this object. + @result Returns a pointer to a C function, or 0 if notification is disabled. +*/ + + virtual Action getNotificationAction() const; + +/*! @function getNotificationParameter + @abstract Gets the parameter that will be passed to the access + notification handler. + @result Returns the parameter that will be passed to the access notification + handler. +*/ + + virtual void * getNotificationParameter() const; + +/*! @function getKey + @abstract Gets a unique OSSymbol key associated with this object. + @discussion During initialization, IONetworkData will create an + OSSymbol key based on its assigned name. + @result Returns an OSSymbol key that was generated from the name assigned to + this object. +*/ + + virtual const OSSymbol * getKey() const; + +/*! @function getSize + @abstract Gets the size of the data buffer. + @result Returns the size of the data buffer managed by this object in bytes. +*/ + + virtual UInt32 getSize() const; + +/*! @function reset + @abstract An access method that resets the data buffer. + @discussion This method handles an external request to reset the data buffer. + If notification is enabled, then the notification handler is called + after the data buffer has been cleared. + @result Returns kIOReturnSuccess on success, + kIOReturnNotWritable if reset access is not permitted, + or an error from the notification handler. +*/ + + virtual IOReturn reset(); + +/*! @function read + @abstract An access method that reads from the data buffer. + @discussion This method handles an external request to read from the data buffer + and copy it to the destination buffer provided by the accessor. + If notification is enabled, then the notification handler is called + before the data buffer is copied to the destination buffer. The + notification handler may use this opportunity to intervene and + to update the contents of the data buffer. + @param dstBuffer Pointer to the destination buffer. + @param dstBufferSize Pointer to an integer containing the size of the + destination buffer. And is overwritten by this method to the actual number + of bytes copied to the destination buffer. + @param readOffset An offset from the start of the source data buffer to + begin reading. + @result Returns kIOReturnSuccess on success, + kIOReturnBadArgument if any of the arguments provided is invalid, + kIOReturnNotReadable if read access is not permitted, + or an error from the notification handler. +*/ + + virtual IOReturn read(void * dstBuffer, + UInt32 * dstBufferSize, + UInt32 readOffset = 0); + +/*! @function write + @abstract An access method that writes to the data buffer. + @discussion This method handles an external request to write to the data buffer + from a source buffer provided by the accessor. After checking that + the data object supports write accesses, the data buffer is updated + if it exists. Then the registered notification handler is called. + @param srcBuffer Pointer to the source buffer. + @param srcBufferSize The number of bytes to write to the data buffer. + @param writeOffset An offset from the start of the destination data buffer + to begin writing. + @result Returns kIOReturnSuccess on success, + kIOReturnBadArgument if any of the arguments provided is invalid, + kIOReturnNotWritable if write access is not permitted, + or an error from the notification handler. +*/ + + virtual IOReturn write(void * srcBuffer, + UInt32 srcBufferSize, + UInt32 writeOffset = 0); + +/*! @function serialize + @abstract Serializes the IONetworkData object. + @discussion If notification is enabled, then the notification + handler is called just before the data buffer is serialized. + @param s An OSSerialize object. + @result Returns true on success, false otherwise. +*/ + + virtual bool serialize(OSSerialize * s) const; + + // Virtual function padding + OSMetaClassDeclareReservedUnused( IONetworkData, 0); + OSMetaClassDeclareReservedUnused( IONetworkData, 1); + OSMetaClassDeclareReservedUnused( IONetworkData, 2); + OSMetaClassDeclareReservedUnused( IONetworkData, 3); +}; + +#endif /* KERNEL */ + +#endif /* !_IONETWORKDATA_H */ diff --git a/i386/include/IOKit/network/IONetworkInterface.h b/i386/include/IOKit/network/IONetworkInterface.h new file mode 100644 index 0000000..af02364 --- /dev/null +++ b/i386/include/IOKit/network/IONetworkInterface.h @@ -0,0 +1,1104 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IONETWORKINTERFACE_H +#define _IONETWORKINTERFACE_H + +/*! @defined kIONetworkInterfaceClass + @abstract The name of the IONetworkInterface class. +*/ + +#define kIONetworkInterfaceClass "IONetworkInterface" + +/*! @defined kIONetworkData + @abstract A property of IONetworkInterface + objects. + @discussion The kIONetworkData property has an OSDictionary value and is a container for the + set of IONetworkData objects managed by the interface. + Each entry in the dictionary is a key/value pair consisting of + the network data name, and an OSDictionary describing the + contents of the network data. +*/ + +#define kIONetworkData "IONetworkData" + +/*! @defined kIOInterfaceType + @abstract A property of IONetworkInterface objects. + @discussion The kIOInterfaceType property has an OSNumber value that specifies the type of + network interface that this interface represents. The type + constants are defined in bsd/net/if_types.h. +*/ + +#define kIOInterfaceType "IOInterfaceType" + +/*! @defined kIOMaxTransferUnit + @abstract A property of IONetworkInterface objects. + @discussion The kIOMaxTransferUnit property has an OSNumber value that specifies the maximum + transfer unit for the interface in bytes. +*/ + +#define kIOMaxTransferUnit "IOMaxTransferUnit" + +/*! @defined kIOMediaAddressLength + @abstract A property of IONetworkInterface objects. + @discussion The kIOMediaAddressLength property has an OSNumber value that specifies the size of the + media address in bytes. +*/ + +#define kIOMediaAddressLength "IOMediaAddressLength" + +/*! @defined kIOMediaHeaderLength + @abstract A property of IONetworkInterface objects. + @discussion The kIOMediaHeaderLength property has an OSNumber value that specifies the size of the + media header in bytes. +*/ + +#define kIOMediaHeaderLength "IOMediaHeaderLength" + +/*! @defined kIOInterfaceFlags + @abstract A property of IONetworkInterface objects. + @discussion The kIOInterfaceFlags property has an OSNumber value that specifies the current value + of the interface flags. The flag constants are defined in + bsd/net/if.h. +*/ + +#define kIOInterfaceFlags "IOInterfaceFlags" + +/*! @defined kIOInterfaceExtraFlags + @abstract A property of IONetworkInterface objects. + @discussion The kIOInterfaceExtraFlags property has an OSNumber value that specifies the current + value of the interface extra flags. The extra flag constants are + defined in bsd/net/if.h. +*/ + +#define kIOInterfaceExtraFlags "IOInterfaceExtraFlags" + +/*! @defined kIOInterfaceUnit + @abstract A property of IONetworkInterface objects. + @discussion The kIOInterfaceUnit property has an OSNumber value that describes the unit number + assigned to the interface object. +*/ + +#define kIOInterfaceUnit "IOInterfaceUnit" + +/*! @defined kIOInterfaceState + @abstract A property of IONetworkInterface objects. + @discussion The kIOInterfaceState property has an OSNumber value that describes the current state + of the interface object. This property is not exported to BSD via + the ifnet structure. +*/ + +#define kIOInterfaceState "IOInterfaceState" + +/*! @defined kIOInterfaceNamePrefix + @abstract A property of IONetworkInterface objects. + @discussion The kIOInterfaceNamePrefix property has an OSString value that describes the string + prefix for the BSD name assigned to the interface. +*/ + +#define kIOInterfaceNamePrefix "IOInterfaceNamePrefix" + +/*! @defined kIOPrimaryInterface + @abstract A property of IONetworkInterface objects. + @discussion The kIOInterfaceNamePrefix property has an OSBoolean value that describes whether the + interface is the primary or the built-in network interface. +*/ + +#define kIOPrimaryInterface "IOPrimaryInterface" + +/*! @defined kIOBuiltin + @abstract kIOBuiltin is a property of IONetworkInterface + objects. It has an OSBoolean value. + @discussion The kIOBuiltin property describes whether the + interface is built-in. +*/ + +#define kIOBuiltin "IOBuiltin" + +/*! @defined kIOLocation + @abstract kIOLocation is a property of IONetworkInterface + objects. It has an OSString value. + @discussion The kIOLocation property describes the physical + location of built-in interfaces. +*/ + +#define kIOLocation "IOLocation" + +/*! @enum InterfaceObjectStates + @discussion Constants used to encode the state of the interface object. + @constant kIONetworkInterfaceRegisteredState The interface object has + registered with the data link layer. + @constant kIONetworkInterfaceOpenedState One or more clients have an + open on the interface object. + @constant kIONetworkInterfaceDisabledState The interface is temporarily + unable to service its clients. This will occur when the network + controller that is servicing the interface has entered a low power + state that renders it unusable. +*/ + +enum { + kIONetworkInterfaceRegisteredState = 0x1, + kIONetworkInterfaceOpenedState = 0x2, + kIONetworkInterfaceDisabledState = 0x4 +}; + +/* + * Kernel + */ +#if defined(KERNEL) && defined(__cplusplus) + +#include +#include +#include +#include +#include + +class IONetworkController; +class IONetworkStack; +class IOCommandGate; + +/*! @typedef IOOutputAction + @discussion Prototype for an output packet handler that will process + all outbound packets sent to the interface from the data link layer. + An output handler is registered with the interface by calling + registerOutputHandler(). + @param m A packet mbuf. + @param param A parameter for the output request. */ + +typedef UInt32 (OSObject::*IOOutputAction)(mbuf_t, void * param); + +/*! @typedef BPF_FUNC + @discussion Prototype for the BPF tap handler. This will disappear + when the correct DLIL header file is included. */ + +typedef int (*BPF_FUNC)(struct ifnet *, struct mbuf *); + +// Network event types recognized by inputEvent(). +// +enum { + /* DLIL defined event, argument must be a pointer to a + kern_event_msg structure. */ + kIONetworkEventTypeDLIL = 0xff000001, + + /* Link up event, no argument */ + kIONetworkEventTypeLinkUp = 0xff000002, + + /* Link down event, no argument */ + kIONetworkEventTypeLinkDown = 0xff000003, + + /* Wake on LAN support changed, no argument */ + kIONetworkEventWakeOnLANSupportChanged = 0xff000004 +}; + +/*! @class IONetworkInterface + @abstract Abstract class that manages the connection between an IONetworkController and the data link interface layer. + @discussion An IONetworkInterface object manages the connection between + an IONetworkController and the data link interface layer (DLIL). + All interactions between the controller and DLIL must go through an + interface object. Any data structures that are required by DLIL for a + particular interface type shall be allocated and mantained by the + interface object. IONetworkInterface is an abstract class that must be + extended by a concrete subclass to specialize for a particular network + type. + + Although most drivers will allocate a single interface object, + it is possible for multiple interfaces to be attached to a single + controller. This controller driver will be responsible for arbitrating + access among its multiple interface clients. + + IONetworkInterface also maintains a dictionary of IONetworkData + objects containing statistics structures. Controller drivers can + ask for a particular data object by name and update the + statistics counters within directly. This dictionary is added to + the interface's property table and is visible outside of the kernel. +*/ + +class IONetworkInterface : public IOService +{ + OSDeclareAbstractStructors( IONetworkInterface ) + + friend class IONetworkStack; + +private: + IONetworkController * _controller; + ifnet_t _backingIfnet; + IORecursiveLock * _ifLock; + OSSet * _clientSet; + OSNumber * _stateBits; + bpf_packet_func _inputFilterFunc; + bpf_packet_func _outputFilterFunc; + OSObject * _outTarget; + IOOutputAction _outAction; + UInt32 _clientVar[4]; + OSDictionary * _dataDict; + mbuf_t _inputQHead; + mbuf_t _inputQTail; + UInt32 _inputQCount; + + struct ExpansionData { + int unit; + int type; + int mtu; + int flags; + int eflags; + int addrlen; + int hdrlen; + IONetworkStats driverStats; + IONetworkStats lastDriverStats; + struct ifnet_stat_increment_param inputDeltas; + IOLock *detachLock; + char *remote_NMI_pattern; + unsigned int remote_NMI_len; + }; + + ExpansionData * _reserved; + + void _syncFromBackingIfnet() const; + void _syncToBackingIfnet(); + + bool _syncNetworkDataDict(); + bool _setInterfaceProperty(UInt32 value, + UInt32 mask, + UInt32 bytes, + void * addr, + char * name); + + SInt32 syncSIOCSIFMEDIA(IONetworkController * ctlr, struct ifreq * ifr); + SInt32 syncSIOCGIFMEDIA(IONetworkController * ctlr, struct ifreq * ifr, unsigned long cmd); + SInt32 syncSIOCSIFMTU(IONetworkController * ctlr, struct ifreq * ifr); + + static int performGatedCommand(void *, void *, void *, void *, void *); + static errno_t ioctl_shim(ifnet_t ifp, unsigned long cmd, void * data); + static errno_t set_bpf_tap_shim(ifnet_t ifn, bpf_tap_mode mode, bpf_packet_func func); + static int output_shim(ifnet_t ifp, mbuf_t); + void DLIL_INPUT(mbuf_t m_head); + static void detach_shim(ifnet_t ifp); + static void powerChangeHandler(void *, void *, void *); + +public: + +/*! @function isPrimaryInterface + @abstract Queries whether the interface object provided represents + the "primary" network interface for the system. + @result Returns true if the interface provided is the primary inteface, + false otherwise. +*/ + + virtual bool isPrimaryInterface() const; + +/*! @function init + @abstract Initializes an IONetworkInterface object. + @discussion Initializes instance variables, and allocates resources. + @param controller A network controller object that will service + the interface object being initialized. + @result Returns true on success, false otherwise. +*/ + + virtual bool init( IONetworkController * controller ); + +/*! @function isRegistered + @abstract Returns true if the interface has been registered with + the data link layer. + @discussion Once registered, the interface will be assigned a + BSD name (such as en0), and a kIOBSDNameKey property is added to the + property table containing this name. Calling this method performs + the same function as checking for the kIONetworkInterfaceRegisteredState + bit in the value returned by getInterfaceState(). + @result Returns true if interface is registered. Returns false if the data link layer + has no references to this network interface, which implies that either the + interface has yet to attach to the data link layer, or the interface has + been detached. +*/ + + virtual bool isRegistered() const; + +/*! @function getInterfaceState + @abstract Reports the current state of the interface object by returning + the interface state flags. + @result Returns the interface state flags. +*/ + + virtual UInt32 getInterfaceState() const; + +/*! @function matchPropertyTable + @abstract Overrides the implementation in IOService to + implement family-specific matching. + @discussion When the gIOLocationMatchKey property is present in the + dictionary provided, then fail the match unless the kIOBSDNameKey property + is found. This is to prevent a premature match when hunting for a root + device for BSD. The presence of the kIOBSDNameKey property indicates that + the interface has registered with BSD, and is a valid candidate for + matching against the gIOLocationMatchKey property. If the + gIOLocationMatchKey property is absent, then this method will always + return true. + @param table The dictionary of properties to match against. + @param score Pointer to the current driver's probe score, not used. + @result Returns true for a positive match, false otherwise. +*/ + + virtual bool matchPropertyTable( OSDictionary * table, + SInt32 * score ); + +/*! @function getController + @abstract Returns the provider, an IONetworkController object, that + is servicing this interface object. + @discussion This is the same controller object that was supplied as + an argument to the init() method. + @result Returns the IONetworkController object that is providing service to + this interface object. +*/ + + virtual IONetworkController * getController() const; + +/*! @function inputPacket + @abstract Submits a single packet received from the network to the data link layer. + @discussion This method is called by the network controller to submit a single packet + received from the network to the data link layer. The packet received by this method may be added to an input + queue on the interface object, which the controller can use to postpone + the packet handoff to the upper layers, until all received packets have + been transferred to the input queue. A subsequent call to flushInputQueue(), + will transfer the entire contents of the queue to the data link layer, + by making a single call to dlil_input(). Other methods that can be used + to manage the input queue are flushInputQueue() and clearInputQueue(). + This input queue is not protected by a lock. Access to the queue by the + controller must be serialized, otherwise its use must be avoided. + @param m The mbuf containing the received packet. + @param length Specify the size of the received packet in the mbuf. + The mbuf length fields are updated with this value. If zero, + then the mbuf length fields are not updated. + @param options Options defined by inputPacket() that the caller + can use to specify this method call. + @param param A parameter provided by the caller. Not used by + IONetworkInterface. + @result Returns the number of packets that were submitted to the data link layer, + or 0 if the packet was queued. +*/ + + virtual UInt32 inputPacket(mbuf_t, + UInt32 length = 0, + IOOptionBits options = 0, + void * param = 0); + +/*! @enum InputOptionQueuePacket + @discussion The option bits that can be specified + in the options argument when calling inputPacket(). + @constant kInputOptionQueuePacket Keep the packet provided in the + input packet queue. No packets are sent to the data link layers, + and the caller's thread will not venture outside the interface + object. Calls to inputPacket() must be serialized. +*/ + + enum { + kInputOptionQueuePacket = 0x1 + }; + +/*! @function flushInputQueue + @abstract Sends all packets held in the input queue to the data + link layer. + @discussion Remove all packets from the input queue and + send them to the data link layer by calling dlil_input(). This + method should be used in connection with the inputPacket() method, + to flush the input queue after inputPacket() was used to queue up + some number of received packets. See inputPacket() and clearInputQueue(). + @result Returns the number of packets that were submitted to the data link layer. + May be zero if the queue was empty. +*/ + + virtual UInt32 flushInputQueue(); + +/*! @function clearInputQueue + @abstract Removes and discards all packets in the input queue. + @discussion This method removes all packets from the input queue and + releases them back to the free mbuf pool. Also see flushInputQueue(). + @result Returns the number of packets freed. +*/ + + virtual UInt32 clearInputQueue(); + +/*! @function inputEvent + @abstract Sends an event to the data link layer. + @discussion This method can be used by the network controller to + send an event to the data link layer. + @param type A constant describing the event type. + @param data Data associated with the event. + @result Returns true if the event was delivered, false if the event type + specified is invalid, or if the event delivery was unsuccesful. +*/ + + virtual bool inputEvent(UInt32 type, void * data); + +/*! @function registerOutputHandler + @abstract Registers a target/action to handle output packets. + @discussion The interface object will forward all output packets, + received from the data link layer, to the output handler registered + through this method. The default target and action are set by the init() + method to the controller, and the handler returned by the controller's + getOutputHandler() method. Once the interface becomes registered with + the data link layer, this method will return false and will reject any + further changes. + @param target Target object that implements the output handler. + @param action The function that will process output packets. + @result Returns true if the target/action provided was accepted, + false otherwise. +*/ + + virtual bool registerOutputHandler(OSObject * target, + IOOutputAction action); + +/*! @function getNamePrefix + @abstract Returns a string containing the prefix to use when + creating a BSD name for this interface. + @discussion The BSD name for each interface object is generated by + concatenating a string returned by this method, with an unique + unit number assigned by IONetworkStack. + A concrete subclass of IONetworkInterface must implement this method + and enforce a consistent name for all of its instances. + @result Returns a pointer to a constant C string. +*/ + + virtual const char * getNamePrefix() const = 0; + +/*! @function getInterfaceType + @abstract Gets the interface type. + @discussion This method returns the value in the if_type field in the ifnet structure. + @result Returns a constant defined in bsd/net/if_types.h header file + that describes the interface type. +*/ + + virtual UInt8 getInterfaceType() const; + +/*! @function getMaxTransferUnit + @abstract Gets the maximum transfer unit for this interface. + @discussion This method returns the value in the if_mtu field in the ifnet structure. + @result Returns the interface MTU size in bytes. +*/ + + virtual UInt32 getMaxTransferUnit() const; + +/*! @function getFlags + @abstract Gets the value of the interface flags. + @discussion This method returns the value in the if_flags field in the ifnet structure. + @result Returns the value of the interface flags. +*/ + + virtual UInt16 getFlags() const; + +/*! @function getExtraFlags + @abstract Gets the value of the interface extra flags. + @discussion This method returns the value in the if_eflags field in the ifnet structure. + @result Returns the value of the interface extra flags. +*/ + + virtual UInt32 getExtraFlags() const; + +/*! @function getMediaAddressLength + @abstract Gets the size of the media (MAC-layer) address. + @discussion This method returns the value in the if_addrlen field in the ifnet structure. + @result Returns the size of the media address in bytes. +*/ + + virtual UInt8 getMediaAddressLength() const; + +/*! @function getMediaHeaderLength + @abstract Gets the size of the media header. + @discussion This method returns the value in the if_hdrlen field in the ifnet structure. + @result Returns the size of the media header in bytes. +*/ + + virtual UInt8 getMediaHeaderLength() const; + +/*! @function getUnitNumber + @abstract Gets the unit number assigned to this interface object. + @discussion This method returns the value in the if_unit field in the ifnet structure. + @result Returns the assigned interface unit number. +*/ + + virtual UInt16 getUnitNumber() const; + +/*! @function addNetworkData + @abstract Adds an IONetworkData object to a dictionary managed by + the interface. + @param aData An IONetworkData object to be added to a dictionary + managed by the interface. This object is retained by the dictionary. + @result Returns true if the operation was successful, false otherwise. +*/ + + virtual bool addNetworkData(IONetworkData * aData); + +/*! @function removeNetworkData + @abstract Removes an entry from the IONetworkData dictionary + managed by the interface. + @discussion This method removes an entry from the IONetworkData dictionary + managed by the interface. The removed object is released. + @param aKey A unique OSSymbol identifying the IONetworkData object + to be removed from the dictionary. + @result Returns true if the operation was successful, false otherwise. +*/ + + virtual bool removeNetworkData(const OSSymbol * aKey); + +/*! @function removeNetworkData + @abstract Removes an entry from the IONetworkData dictionary + managed by the interface. + @discussion This method removes an entry from the IONetworkData dictionary + managed by the interface. The removed object is released. + @param aKey A unique string identifying the IONetworkData object + to be removed from the dictionary. + @result Returns true if the operation was successful, false otherwise. +*/ + + virtual bool removeNetworkData(const char * aKey); + +/*! @function getNetworkData + @abstract Gets an IONetworkData object from the interface that is + associated with the given key. + @param aKey The unique string identifying the IONetworkData object to be + returned to caller. + @result Returns a reference to the matching IONetworkData object, + or 0 if no match was found. +*/ + + virtual IONetworkData * getNetworkData(const char * aKey) const; + +/*! @function getNetworkData + @abstract Gets an IONetworkData object from the interface that is + associated with the given key. + @param aKey The unique OSSymbol identifying the IONetworkData object to be + returned to caller. + @result Returns a reference to the matching IONetworkData object, + or 0 if no match was found. +*/ + + virtual IONetworkData * getNetworkData(const OSSymbol * aKey) const; + +/*! @function setProperties + @abstract Handles a request to set network interface properties from + kernel or non-kernel clients. + @discussion For non-kernel clients, the preferred + access mechanism is through a user client connection. + @param properties An OSDictionary containing a collection of + properties. + @result Returns kIOReturnUnsupported if the interface did not + recognize any of the properties provided. Otherwise, the return + code will be kIOReturnSuccess to indicate no errors, or an + IOReturn error code to indicate that an error occurred while + handling one of the properties. +*/ + + virtual IOReturn setProperties( OSObject * properties ); + + // FIXME - Compatibility methods (to be removed) + IONetworkData * getParameter(const char * aKey) const; + bool setExtendedFlags(UInt32 flags, UInt32 clear = 0); + + virtual IOReturn message( UInt32 type, IOService * provider, void * argument ); + +/*! @function debuggerRegistered + @abstract Tells the IONetworkInterface that this interface will be used + by the debugger. +*/ + void debuggerRegistered(void); + +protected: + +/*! @function setInterfaceType + @abstract Sest the interface type. + @discussion Both the if_type field in the ifnet structure, and the + kIOInterfaceType property are updated with the value provided. + @param type A constant defined in bsd/net/if_types.h header file + that describes the interface type. + @result Returns true if the update was successful, false otherwise. +*/ + + virtual bool setInterfaceType(UInt8 type); + +/*! @function setMaxTransferUnit + @abstract Sets the maximum transfer unit for this interface. + @discussion Both the if_mtu field in the ifnet structure, and the + kIOMaxTransferUnit property are updated with the value provided. + @param mtu The interface MTU size in bytes. + @result Returns true if the update was successful, false otherwise. +*/ + + virtual bool setMaxTransferUnit(UInt32 mtu); + +/*! @function setFlags + @abstract Performs a read-modify-write operation on the current + interface flags value. + @discussion See bsd/net/if.h header file for the definition of the + flag constants. Both the if_flags field in the ifnet structure, and + the kIOInterfaceFlags property are updated with the value provided. + @param flags The bits that should be set. + @param clear The bits that should be cleared. If 0, then non + of the flags are cleared and the result is formed by OR'ing the + original flags value with the new flags. + @result Returns true if the update was successful, false otherwise. +*/ + + virtual bool setFlags(UInt16 flags, UInt16 clear = 0); + +/*! @function setExtraFlags + @abstract Performs a read-modify-write operation on the current + interface extra flags value. + @discussion See bsd/net/if.h header file for the definition of the + extra flag constants. Both the if_eflags field in the ifnet structure, + and the kIOInterfaceExtraFlags property are updated with the value + provided. + @param flags The bits that should be set. + @param flags The bits that should be set. + @param clear The bits that should be cleared. If 0, then non + of the flags are cleared and the result is formed by OR'ing the + original flags with the new flags. + @result Returns true if the update was successful, false otherwise. +*/ + + virtual bool setExtraFlags(UInt32 flags, UInt32 clear = 0); + +/*! @function setMediaAddressLength + @abstract Sets the size of the media (MAC-layer) address. + @discussion Both the if_addrlen field in the ifnet structure, and the + kIOMediaAddressLength property are updated with the value provided. + @param length The size of the media address in bytes. + @result Returns true if the update was successful, false otherwise. +*/ + + virtual bool setMediaAddressLength(UInt8 length); + +/*! @function setMediaHeaderLength + @abstract Sets the size of the media header. + @discussion Both the if_hdrlen field in the ifnet structure, and the + kIOMediaHeaderLength property are updated with the value provided. + @param length The size of the media header in bytes. + @result Returns true if the update was successful, false otherwise. +*/ + + virtual bool setMediaHeaderLength(UInt8 length); + +/*! @function setUnitNumber + @abstract Assigns a unique unit number to this interface. + @discussion This method is called by IONetworkStack before the + interface is registered with the data link layer, to assign a + unique unit number to the interface object. Both the if_unit field + in the ifnet structure, and the kIOInterfaceUnit property are updated + with the value provided. + @param unit The unit number assigned to this interface object. + @result Returns true if the update was successful, false otherwise. +*/ + + virtual bool setUnitNumber(UInt16 unit); + +/*! @function free + @abstract Frees the IONetworkInterface object. + @discussion Resource allocated by init() are released, and + clearInputQueue() is called to ensure that the input queue is empty. +*/ + + virtual void free(); + +/*! @function handleOpen + @abstract Handles a client open on the interface. + @discussion This method is called by IOService::open() with the + arbitration lock held, and must return true to accept the client open. + This method will in turn call handleClientOpen() to qualify the client + requesting the open. Since the controller is opened by the interface + in a lazy fashion, the interface may also perform an open on the + controller before this method returns. If the controller was opened, + then controllerDidOpen() is called to notify interested subclasses. + Subclasses should not override this method. + @param client The client object that requested the open. + @param options Options passed to IOService::open(). + @param argument Argument passed to IOService::open(). + @result Returns true to accept the client open, false otherwise. +*/ + + virtual bool handleOpen(IOService * client, + IOOptionBits options, + void * argument); + +/*! @function handleClose + @abstract Handles a client close on the interface. + @discussion This method is called by IOService::close() with the + arbitration lock held. This method will in turn call handleClientClose() + to notify interested subclasses about the client close. If this represents + the last close, then the interface will also close the controller before + this method returns. The controllerWillClose() method will be called before + closing the controller. Subclasses should not override this method. + @param client The client object that requested the close. + @param options Options passed to IOService::close(). +*/ + + virtual void handleClose(IOService * client, IOOptionBits options); + +/*! @function handleIsOpen + @abstract Queries whether a client has an open on the interface. + @discussion This method is always called by IOService with the + arbitration lock held. Subclasses should not override this method. + @result Returns true if the specified client, or any client if none (0) is + specified, presently has an open on this object. +*/ + + virtual bool handleIsOpen(const IOService * client) const; + +/*! @function lock + @abstract Takes the network interface lock. + @discussion This method takes the recursive lock that protects the interface + state. All updates to the interface state and to the ifnet structure + must be performed while holding this lock. This call must be balanced + by a subsequent call to unlock(). +*/ + + virtual void lock(); + +/*! @function unlock + @abstract Releases the network interface lock. + @discussion This method releases the recursive lock that protects the interface + state to balance a previous lock() call. +*/ + + virtual void unlock(); + +/*! @function controllerDidOpen + @abstract Sends a notification that the interface has opened the network + controller. + @discussion This method is called by handleOpen() to notify subclasses that the + controller has been opened. The open on the controller is done when + the interface receives the initial open request from a client. + Subclasses can override this method and inspect the controller before + allowing the client open. The implementation in the subclass must first + call the method in super and check the return value. This method is + called with our arbitration lock held, hence issuing I/O to the + controller must be avoided to eliminate the possibility of a + deadlock. + @param controller The controller that was opened. + @result Must return true in order for handleOpen() to accept + the client open. If the return is false, then the controller will be + closed and the client open will be refused. +*/ + + virtual bool controllerDidOpen(IONetworkController * controller); + +/*! @function controllerWillClose + @abstract Sends a notification that the interface will close the network + controller. + @discussion This method is called by handleClose() after receiving a close from the + last client, and just before the controller is closed. Subclasses + can override this method to perform any cleanup action before the + controller is closed. This method is called with our arbitration lock + held, hence issuing I/O to the controller must be avoided to eliminate + the possibility of a deadlock. + @param controller The controller that is about to be closed. +*/ + + virtual void controllerWillClose(IONetworkController * controller); + +/*! @function performCommand + @abstract Handles an ioctl command sent to the network interface. + @discussion This method handles socket ioctl commands sent to the + network interface from DLIL. + IONetworkInterface handles commands that are common for all network + interface types. A subclass of IONetworkInterface may override this + method to override the command handling in IONetworkInterface, or + to extend the command processing to handle additional commands, + and then call super for any commands not handled in the subclass. + The ioctl commands handled by IONetworkInterface are + SIOCGIFMTU (Get interface MTU size), + SIOCSIFMTU (Set interface MTU size), + SIOCSIFMEDIA (Set media), and + SIOCGIFMEDIA (Get media and link status). + @param controller The controller object. + @param cmd The ioctl command code. + @param arg0 Command argument 0. Generally a pointer to an ifnet structure + associated with the interface. + @param arg1 Command argument 1. + @result Returns a BSD return value defined in bsd/sys/errno.h. +*/ + + virtual SInt32 performCommand(IONetworkController * controller, + unsigned long cmd, + void * arg0, + void * arg1); + +public: + +/*! @function getIfnet + @abstract Gets the ifnet_t allocated by the interface object. + @discussion Reveal the interface's ifnet_t. The ifnet_t is managed + primarily by IONetworkInterface, however sub-classes or drivers + can use this method to get a reference to the ifnet_t object for + interface KPI calls. + @result Returns the ifnet_t object that is attached to the datalink layer. +*/ + + virtual ifnet_t getIfnet() const ; + +protected: + +/*! @function initIfnet + @abstract Initializes the ifnet structure given. + @discussion A concrete subclass must override this method and initialize + the ifnet structure given. The implementation in the subclass must call + super before it returns, to allow IONetworkInterface to complete the + initialization, and to insert the BSD shim functions implemented in + IONetworkInterface to the appropriate function pointer fields in the + ifnet structure. IONetworkInterface will call this method during its + init() method. Subclasses are encouraged to use the ifnet accessor + methods to update the ifnet structure when possible, since this will + ensure that properties in the registry will also be updated to reflect + any changes made. + @param ifp Pointer to an ifnet structure obtained earlier through + the getIfnet() method call. + @result Returns true on success, false otherwise. +*/ + + virtual bool initIfnet(struct ifnet * ifp); + +/*! @function handleClientOpen + @abstract Handles a client open on the interface. + @discussion This method is called by handleOpen() to handle an open from a client object. + Unlike handleOpen(), subclasses may override this method to catch an open + request from a client. This method is called with the arbitration lock held. + @param client The client object requesting the open. + @param options Options passed to IONetworkInterface::handleOpen(). + @param argument Argument passed to IONetworkInterface::handleOpen(). + @result Returns true to accept the client open, false to refuse it. +*/ + + virtual bool handleClientOpen(IOService * client, + IOOptionBits options, + void * argument); + +/*! @function handleClientClose + @abstract Handles a client close on the interface. + @discussion This method is called by handleClose() to handle a close from a client object. + Unlike handleClose(), subclasses may override this method to catch a close + reuqest from a client. This method is called with the arbitration lock held. + @param client The client object requesting the close. + @param options Options passed to IONetworkInterface::handleClose(). +*/ + + virtual void handleClientClose(IOService * client, + IOOptionBits options); + +/*! @function newUserClient + @abstract Creates a connection for a non kernel client. + @discussion This method creates a new IOUserClient to service a connection to a + non kernel client. + @param owningTask The mach task requesting the connection. + @param security_id A token representing the access level for the task. + @param type A constant specifying the type of connection to be created. + An IONetworkUserClient object is created if the type specified is + kIONetworkUserClientTypeID. + @param handler The IOUserClient object returned. + @result Returns kIOReturnSuccess if an IONetworkUserClient was created, + kIOReturnNoMemory for a memory allocation error, or + kIOReturnBadArgument if the type specified is unknown. +*/ + + virtual IOReturn newUserClient(task_t owningTask, + void * security_id, + UInt32 type, + IOUserClient ** handler); + +/*! @function setInterfaceState + @abstract Updates the interface object state flags. + @discussion The kIOInterfaceState property is updated with the value + provided. + @param flags The bits that should be set. + @param clear The bits that should be cleared. + @result Returns the resulting interface state flags following any changes + made by this method. +*/ + + virtual UInt32 setInterfaceState( UInt32 set, UInt32 clear = 0 ); + +/*! @function powerStateWillChangeTo + @abstract Handles a notification that the network controller servicing + this interface object is about to transition to a new power state. + @discussion This method will call the controllerWillChangePowerState() method + on the controller's work loop context to prepare for the power state change. + Subclasses should not override this method. + @param flags Flags that describe the capability of the controller in the new + power state. + @param stateNumber An index to a state in the network controller's + power state array that the controller is switching to. + @param policyMaker A reference to the network controller's policy-maker, + and is also the originator of this notification. + @result The return will always be IOPMAckImplied to indicate that the + preparation for the power change has already completed when this method + returns. +*/ + + virtual IOReturn powerStateWillChangeTo( IOPMPowerFlags flags, + unsigned long stateNumber, + IOService * policyMaker ); + +/*! @function powerStateDidChangeTo + @abstract Handles a notification that the network controller servicing + this interface object has transitioned to a new power state. + @discussion This method will call the controllerDidChangePowerState() method + on the controller's work loop context to prepare for the power state change. + Subclasses should not override this method. + @param flags Flags that describe the capability of the controller in the new + power state. + @param stateNumber An index to a state in the network controller's + power state array that the controller has switched to. + @param policyMaker A reference to the network controller's policy-maker, + and is also the originator of this notification. + @result The return will always be IOPMAckImplied to indicate that the + preparation for the power change has already completed when this method + returns. +*/ + + virtual IOReturn powerStateDidChangeTo( IOPMPowerFlags flags, + unsigned long stateNumber, + IOService * policyMaker ); + +/*! @function controllerWillChangePowerState + @abstract Handles a notification that the network controller servicing + this interface object is about to transition to a new power state. + @param controller The network controller object. + @param flags Flags that describe the capability of the controller in the new + power state. + @param stateNumber An index to a state in the network controller's + power state array that the controller is switching to. + @param policyMaker A reference to the network controller's policy-maker, + and is also the originator of this notification. + @result The return value is always kIOReturnSuccess. +*/ + + virtual IOReturn controllerWillChangePowerState( + IONetworkController * controller, + IOPMPowerFlags flags, + UInt32 stateNumber, + IOService * policyMaker); + +/*! @function controllerDidChangePowerState + @abstract Handles a notification that the network controller servicing + this interface object has transitioned to a new power state. + @param controller The network controller object. + @param flags Flags that describe the capability of the controller in the new + power state. + @param stateNumber An index to a state in the network controller's + power state array that the controller has switched to. + @param policyMaker A reference to the network controller's policy-maker, + and is also the originator of this notification. + @result The return value is always kIOReturnSuccess. +*/ + + virtual IOReturn controllerDidChangePowerState( + IONetworkController * controller, + IOPMPowerFlags flags, + UInt32 stateNumber, + IOService * policyMaker); + +public: + /* Override IOService::willTerminate() */ + + virtual bool willTerminate( IOService * provider, + IOOptionBits options ); + + /* Override IOService::serializeProperties() */ + + virtual bool serializeProperties( OSSerialize * s ) const; + +/*! @function attachToDataLinkLayer + @abstract Attaches the network interface to the BSD data link layer. + @discussion This function is called by the family to attach the network + interface managed by an IONetworkInterface to the BSD data link layer. + This call occurs after the interface initialization and setup, and the + assignment of an interface unit number. The family does not implicitly + close the gate on the network controller's work loop when calling this + function. Prior to the data link attachment, services provided by an + IONetworkInterface will be inaccessible to BSD networking, though the + object can be found in the I/O Kit Registry. Subclasses can override + this function to perform interface specific work. + @param options Options for the attach call. None are currently defined. + @param parameter Parameter for the attach call. Not currently used. + @result Returns kIOReturnSuccess on success. +*/ + + virtual IOReturn attachToDataLinkLayer( IOOptionBits options, + void * parameter ); + + OSMetaClassDeclareReservedUsed(IONetworkInterface, 0); + +/*! @function detachFromDataLinkLayer + @abstract Detaches the network interface from the BSD data link layer. + @discussion This function is called by the family to detach the network + interface managed by an IONetworkInterface from the BSD data link layer. + This call is made when the interface is terminated, before the last close. + The family does not implicitly close the gate on the network controller's + work loop when calling this function. Subclasses can override this function + to perform additional interface specific work. + @param options Options for the detach call. None are currently defined. + @param parameter Parameter for the detach call. Not currently used. +*/ + + virtual void detachFromDataLinkLayer( IOOptionBits options, + void * parameter ); + + OSMetaClassDeclareReservedUsed(IONetworkInterface, 1); + +protected: +/*! @function feedInputPacketTap + @abstract Feed received packets to the BPF + @discussion This function is called by the family for each inbound packet + to feed it to the BPF function. Interface classes can override if they + need to provide class specific functionality or modifications to the BPF tap. + @param mbuf Pointer to the packet. +*/ + virtual void feedPacketInputTap(mbuf_t); + + OSMetaClassDeclareReservedUsed( IONetworkInterface, 2); + +/*! @function feedOutputPacketTap + @abstract Feed sent packets to the BPF + @discussion This function is called by the family for each outbound packet + to feed it to the BPF function. Interface classes can override if they + need to provide class specific functionality or modifications to the BPF tap. + @param mbuf Pointer to the packet. +*/ + virtual void feedPacketOutputTap(mbuf_t); + + OSMetaClassDeclareReservedUsed( IONetworkInterface, 3); + + virtual bool initIfnetParams(struct ifnet_init_params *params); + OSMetaClassDeclareReservedUsed( IONetworkInterface, 4); + +public: + // Virtual function padding + OSMetaClassDeclareReservedUnused( IONetworkInterface, 5); + OSMetaClassDeclareReservedUnused( IONetworkInterface, 6); + OSMetaClassDeclareReservedUnused( IONetworkInterface, 7); + OSMetaClassDeclareReservedUnused( IONetworkInterface, 8); + OSMetaClassDeclareReservedUnused( IONetworkInterface, 9); + OSMetaClassDeclareReservedUnused( IONetworkInterface, 10); + OSMetaClassDeclareReservedUnused( IONetworkInterface, 11); + OSMetaClassDeclareReservedUnused( IONetworkInterface, 12); + OSMetaClassDeclareReservedUnused( IONetworkInterface, 13); + OSMetaClassDeclareReservedUnused( IONetworkInterface, 14); + OSMetaClassDeclareReservedUnused( IONetworkInterface, 15); +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* !_IONETWORKINTERFACE_H */ diff --git a/i386/include/IOKit/network/IONetworkMedium.h b/i386/include/IOKit/network/IONetworkMedium.h new file mode 100644 index 0000000..2a64f3d --- /dev/null +++ b/i386/include/IOKit/network/IONetworkMedium.h @@ -0,0 +1,426 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IONETWORKMEDIUM_H +#define _IONETWORKMEDIUM_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/*! @typedef IOMediumType + @discussion A 32-bit value divided into fields which describes + a single medium type. */ + +typedef UInt32 IOMediumType; + +/*! @defined kIOMediumType + @abstract A property of IONetworkMedium objects. + @discussion The kIOMediumType property is an OSNumber object that describes the type of + medium that this object represents. +*/ + +#define kIOMediumType "Type" + +/*! @defined kIOMediumFlags + @abstract A property of IONetworkMedium objects. + @discussion The kIOMediumFlags property is an OSNumber object that describes a set of + attributes assigned to the medium. +*/ + +#define kIOMediumFlags "Flags" + +/*! @defined kIOMediumSpeed + @abstract A property of IONetworkMedium objects. + @discussion The kIOMediumSpeed property is an OSNumber object that describes the maximum link + speed supported by the medium in bits per second. +*/ + +#define kIOMediumSpeed "Speed" + +/*! @defined kIOMediumIndex + @abstract A property of IONetworkMedium objects. + @discussion The kIOMediumIndex property is an OSNumber object that describes an index assigned + by the owner of the medium object. Its interpretation is driver + specific. +*/ + +#define kIOMediumIndex "Index" + +//=========================================================================== +// Medium Type (IOMediumType). +// +// The medium type is encoded by a 32-bit value. The definitions of +// the fields and the encoding for each field is adapted from FreeBSD. +// +// Bits Definition +// ------------------- +// 4-0 medium subtype +// 7-5 network type +// 15-8 network specific options +// 19-16 reserved +// 27-20 common options +// 31-28 instance number + +// Ethernet. +// +enum { + kIOMediumEthernet = IFM_ETHER, + kIOMediumEthernetAuto = ( IFM_AUTO | IFM_ETHER ), + kIOMediumEthernetManual = ( IFM_MANUAL | IFM_ETHER ), + kIOMediumEthernetNone = ( IFM_NONE | IFM_ETHER ), + kIOMediumEthernet10BaseT = ( IFM_10_T | IFM_ETHER ), + kIOMediumEthernet10Base2 = ( IFM_10_2 | IFM_ETHER ), + kIOMediumEthernet10Base5 = ( IFM_10_5 | IFM_ETHER ), + kIOMediumEthernet100BaseTX = ( IFM_100_TX | IFM_ETHER ), + kIOMediumEthernet100BaseFX = ( IFM_100_FX | IFM_ETHER ), + kIOMediumEthernet100BaseT4 = ( IFM_100_T4 | IFM_ETHER ), + kIOMediumEthernet100BaseVG = ( IFM_100_VG | IFM_ETHER ), + kIOMediumEthernet100BaseT2 = ( IFM_100_T2 | IFM_ETHER ), + kIOMediumEthernet1000BaseSX = ( IFM_1000_SX | IFM_ETHER ), + kIOMediumEthernet10BaseSTP = ( IFM_10_STP | IFM_ETHER ), + kIOMediumEthernet10BaseFL = ( IFM_10_FL | IFM_ETHER ), + kIOMediumEthernet1000BaseLX = ( IFM_1000_LX | IFM_ETHER ), + kIOMediumEthernet1000BaseCX = ( IFM_1000_CX | IFM_ETHER ), + kIOMediumEthernet1000BaseTX = ( IFM_1000_T | IFM_ETHER ), //deprecated- use kIOMediumEthernet1000BaseT instead + kIOMediumEthernet1000BaseT = ( IFM_1000_T | IFM_ETHER ), + kIOMediumEthernetHomePNA1 = ( IFM_HPNA_1 | IFM_ETHER ), + kIOMediumEthernet10GBaseSR = ( IFM_10G_SR | IFM_ETHER ), + kIOMediumEthernet10GBaseLR = ( IFM_10G_LR | IFM_ETHER ), + kIOMediumEthernet10GBaseCX4 = ( IFM_10G_CX4 | IFM_ETHER ), + kIOMediumEthernet10GBaseT = ( IFM_10G_T | IFM_ETHER ) +}; + +// IEEE 802.11 Wireless. +// +enum { + kIOMediumIEEE80211 = IFM_IEEE80211, + kIOMediumIEEE80211Auto = ( IFM_AUTO | IFM_IEEE80211 ), + kIOMediumIEEE80211Manual = ( IFM_MANUAL | IFM_IEEE80211 ), + kIOMediumIEEE80211None = ( IFM_NONE | IFM_IEEE80211 ), + kIOMediumIEEE80211FH1 = ( IFM_IEEE80211_FH1 | IFM_IEEE80211 ), + kIOMediumIEEE80211FH2 = ( IFM_IEEE80211_FH2 | IFM_IEEE80211 ), + kIOMediumIEEE80211DS2 = ( IFM_IEEE80211_DS2 | IFM_IEEE80211 ), + kIOMediumIEEE80211DS5 = ( IFM_IEEE80211_DS5 | IFM_IEEE80211 ), + kIOMediumIEEE80211DS11 = ( IFM_IEEE80211_DS11 | IFM_IEEE80211 ), + kIOMediumIEEE80211DS1 = ( IFM_IEEE80211_DS1 | IFM_IEEE80211 ), + kIOMediumIEEE80211OptionAdhoc = IFM_IEEE80211_ADHOC +}; + +// Common options. +// +enum { + kIOMediumOptionFullDuplex = IFM_FDX, + kIOMediumOptionHalfDuplex = IFM_HDX, + kIOMediumOptionFlowControl = IFM_FLOW, + kIOMediumOptionFlag0 = IFM_FLAG0, + kIOMediumOptionFlag1 = IFM_FLAG1, + kIOMediumOptionFlag2 = IFM_FLAG2, + kIOMediumOptionLoopback = IFM_LOOP +}; + +// Medium type masks. +// +#define kIOMediumSubTypeMask IFM_TMASK +#define kIOMediumNetworkTypeMask IFM_NMASK +#define kIOMediumOptionsMask IFM_OMASK +#define kIOMediumCommonOptionsMask IFM_GMASK +#define kIOMediumInstanceShift IFM_ISHIFT +#define kIOMediumInstanceMask IFM_IMASK + +// Medium type field accessors. +// +#define IOMediumGetSubType(x) ((x) & kIOMediumSubTypeMask) +#define IOMediumGetNetworkType(x) ((x) & kIOMediumNetworkMask) +#define IOMediumGetInstance(x) (((x) & kIOMediumInstanceMask) >> \ + kIOMediumInstanceShift) + +//=========================================================================== +// Medium flags. + + +//=========================================================================== +// Link status bits. +// +enum { + kIONetworkLinkValid = IFM_AVALID, // link status is valid + kIONetworkLinkActive = IFM_ACTIVE // link is up/active. +}; + +#ifdef __cplusplus +} +#endif + +//=========================================================================== +// IONetworkMedium class. + +#ifdef KERNEL + +#include +#include + +/*! @class IONetworkMedium + @abstract An object that encapsulates information about a network + medium (i.e. 10Base-T, or 100Base-T Full Duplex). + @discussion The main purpose of + this object is for a network driver to advertise its media capability, + through a collection of IONetworkMedium objects stored in a dictionary + in its property table. IONetworkMedium supports serialization, and will + encode its properties in the form of a dictionary to the serialization + stream when instructed. This will allow a user-space application to + browse the set of media types supported by the controller. +*/ + +class IONetworkMedium : public OSObject +{ + OSDeclareDefaultStructors( IONetworkMedium ) + +protected: + IOMediumType _type; + UInt32 _flags; + UInt64 _speed; + UInt32 _index; + const OSSymbol * _name; + + struct ExpansionData { }; + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *_reserved; + + +/*! @function free + @abstract Frees the IONetworkMedium object. +*/ + + virtual void free(); + +public: + +/*! @function nameForType + @abstract Creates a name that describes a medium type. + @discussion Given a medium type, creates an OSymbol object that + describes the medium type. There is a 1-to-1 mapping between the + medium type, and the medium name created by this method. The caller + is responsible for releasing the OSSymbol object returned. + @param type A medium type. See IONetworkMedium.h for type encoding. + @result Returns an OSSymbol object is created based on the type provided. +*/ + + static const OSSymbol * nameForType(IOMediumType type); + +/*! @function addMedium + @abstract Adds an IONetworkMedium object to a dictionary. + @discussion A helper function to add an IONetworkMedium object to a + given dictionary. The name of the medium is used as the key for the + new dictionary entry. + @param dict An OSDictionary object where the medium object should be + added as a new entry. + @param medium The IONetworkMedium object to add to the dictionary. + @result Returns true on success, false otherwise. +*/ + + static bool addMedium(OSDictionary * dict, + const IONetworkMedium * medium); + +/*! @function removeMedium + @abstract Removes an IONetworkMedium object from a dictionary. + @discussion A helper function to remove an entry in a dictionary. + @param dict The OSDictionary object where the medium object should be + removed from. + @param medium The name of this medium object is used as the key. +*/ + + static void removeMedium(OSDictionary * dict, + const IONetworkMedium * medium); + +/*! @function getMediumWithType + @abstract Finds a medium object from a dictionary with a given type. + @discussion This method iterates through a dictionary and returns an IONetworkMedium + entry with the given type. An optional mask supplies the don't care bits. + @param dict The dictionary to look for a matching entry. + @param type Search for an entry with this type. + @param mask The don't care bits in IOMediumType. Defaults to 0, which + implies that a perfect match is desired. + @result Returns the first matching IONetworkMedium entry found, + or 0 if no match was found. +*/ + + static IONetworkMedium * getMediumWithType(const OSDictionary * dict, + IOMediumType type, + IOMediumType mask = 0); + +/*! @function getMediumWithIndex + @abstract Finds a medium object from a dictionary with a given index. + @discussion This method iterates through a dictionary and returns an IONetworkMedium + entry with the given index. An optional mask supplies the don't care bits. + @param dict The dictionary to look for a matching entry. + @param index Search for an entry with the given index. + @param mask The don't care bits in index. Defaults to 0, which + implies that a perfect match is desired. + @result Returns the first matching IONetworkMedium entry found, + or 0 if no match was found. +*/ + + static IONetworkMedium * getMediumWithIndex(const OSDictionary * dict, + UInt32 index, + UInt32 mask = 0); + +/*! @function init + @abstract Initializes an IONetworkMedium object. + @param type The medium type, this value is encoded with bits defined in + IONetworkMedium.h. + @param speed The maximum (or the only) link speed supported over this + medium in units of bits per second. + @param flags An optional flag for the medium object. + See IONetworkMedium.h for defined flags. + @param index An optional index number assigned by the owner. + Drivers can use this to store an index to a media table in + the driver, or it may map to a driver-defined media type. + @param name An optional name assigned to this medium object. If 0, + then a name will be created based on the medium type by + calling IONetworkMedium::nameForType(). Since the name of + the medium is used as a key when inserted into a dictionary, + the name chosen must be unique within the scope of the owner. + @result Returns true on success, false otherwise. +*/ + + virtual bool init(IOMediumType type, + UInt64 speed, + UInt32 flags = 0, + UInt32 index = 0, + const char * name = 0); + +/*! @function medium + @abstract Factory method that allocates and initializes an IONetworkMedium object. + @param type The medium type, this value is encoded with bits defined in + IONetworkMedium.h. + @param speed The maximum (or the only) link speed supported over this + medium in units of bits per second. + @param flags An optional flag for the medium object. + See IONetworkMedium.h for defined flags. + @param index An optional index number assigned by the owner. + Drivers can use this to store an index to a media table in + the driver, or it may map to a driver-defined media type. + @param name An optional name assigned to this medium object. If 0, + then a name will be created based on the medium type by + calling IONetworkMedium::nameForType(). Since the name of + the medium is used as a key when inserted into a dictionary, + the name chosen must be unique within the scope of the owner. + @result Returns an IONetworkMedium instance on success, or 0 otherwise. +*/ + + static IONetworkMedium * medium(IOMediumType type, + UInt64 speed, + UInt32 flags = 0, + UInt32 index = 0, + const char * name = 0); + +/*! @function getType + @result Returns the medium type assigned to this medium object. +*/ + + virtual IOMediumType getType() const; + +/*! @function getSpeed + @result Returns the maximum link speed supported by this medium. +*/ + + virtual UInt64 getSpeed() const; + +/*! @function getFlags + @result Returns the medium flags. +*/ + + virtual UInt32 getFlags() const; + +/*! @function getIndex + @result Returns the assigned medium index. +*/ + + virtual UInt32 getIndex() const; + +/*! @function getName + @result Returns the name assigned to this medium object. +*/ + + virtual const OSSymbol * getName() const; + +/*! @function getKey + @result Returns the key to use for this medium object. This key should be + used when this object is added to a dictionary. Same as getName(). +*/ + + virtual const OSSymbol * getKey() const; + +/*! @function isEqualTo + @abstract Tests for equality between two IONetworkMedium objects. + @discussion Two IONetworkMedium objects are considered equal if + they have similar properties assigned to them during initialization. + @param medium An IONetworkMedium to test against the IONetworkMedium + object being called. + @result Returns true if equal, false otherwise. +*/ + + virtual bool isEqualTo(const IONetworkMedium * medium) const; + +/*! @function isEqualTo + @abstract Tests for equality between a IONetworkMedium object and an + OSObject. + @discussion The OSObject is considered equal to the IONetworkMedium + object if the OSObject is an IONetworkMedium, and they have + similar properties assigned to them during initialization. + @param obj An OSObject to test against an IONetworkMedium object. + @result Returns true if equal, false otherwise. +*/ + + virtual bool isEqualTo(const OSMetaClassBase * obj) const; + +/*! @function serialize + @abstract Serializes the IONetworkMedium object. + @discussion A dictionary is created containing the properties + assigned to this medium object, and this dictionary is then + serialized using the OSSerialize object provided. + @param s An OSSerialize object. + @result Returns true on success, false otherwise. +*/ + + virtual bool serialize(OSSerialize * s) const; + + // Virtual function padding + OSMetaClassDeclareReservedUnused( IONetworkMedium, 0); + OSMetaClassDeclareReservedUnused( IONetworkMedium, 1); + OSMetaClassDeclareReservedUnused( IONetworkMedium, 2); + OSMetaClassDeclareReservedUnused( IONetworkMedium, 3); +}; + +// Translate getKey() to getName(). +// +inline const OSSymbol * IONetworkMedium::getKey() const +{ + return getName(); +} + +#endif /* KERNEL */ + +#endif /* !_IONETWORKMEDIUM_H */ diff --git a/i386/include/IOKit/network/IONetworkStats.h b/i386/include/IOKit/network/IONetworkStats.h new file mode 100644 index 0000000..f6e6f9f --- /dev/null +++ b/i386/include/IOKit/network/IONetworkStats.h @@ -0,0 +1,87 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IONETWORKSTATS_H +#define _IONETWORKSTATS_H + +/*! @header IONetworkStats.h + @discussion Generic network statistics. */ + +//------------------------------------------------------------------------ +// Generic network statistics. Common to all network interfaces. +// +// WARNING: This structure must match the statistics field in +// ifnet->if_data. This structure will overlay a portion of ifnet. + +/*! @typedef IONetworkStats + @discussion Generic network statistics structure. + @field inputPackets count input packets. + @field inputErrors count input errors. + @field outputPackets count output packets. + @field outputErrors count output errors. + @field collisions count collisions on CDMA networks. */ + +typedef struct { + UInt32 inputPackets; + UInt32 inputErrors; + UInt32 outputPackets; + UInt32 outputErrors; + UInt32 collisions; +} IONetworkStats; + +/*! @defined kIONetworkStatsKey + @discussion Defines the name of an IONetworkData that contains + an IONetworkStats. */ + +#define kIONetworkStatsKey "IONetworkStatsKey" + +//------------------------------------------------------------------------ +// Output queue statistics. + +/*! @typedef IOOutputQueueStats + @discussion Statistics recorded by IOOutputQueue objects. + @field capacity queue capacity. + @field size current size of the queue. + @field peakSize peak size of the queue. + @field dropCount number of packets dropped. + @field outputCount number of output packets. + @field retryCount number of retries. + @field stallCount number of queue stalls. */ + +typedef struct { + UInt32 capacity; + UInt32 size; + UInt32 peakSize; + UInt32 dropCount; + UInt32 outputCount; + UInt32 retryCount; + UInt32 stallCount; + UInt32 reserved[4]; +} IOOutputQueueStats; + +/*! @defined kIOOutputQueueStatsKey + @discussion Defines the name of an IONetworkData that contains + an IOOutputQueueStats. */ + +#define kIOOutputQueueStatsKey "IOOutputQueueStatsKey" + +#endif /* !_IONETWORKSTATS_H */ diff --git a/i386/include/IOKit/network/IOOutputQueue.h b/i386/include/IOKit/network/IOOutputQueue.h new file mode 100644 index 0000000..cb40702 --- /dev/null +++ b/i386/include/IOKit/network/IOOutputQueue.h @@ -0,0 +1,270 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOOUTPUTQUEUE_H +#define _IOOUTPUTQUEUE_H + +#include + +// Forward declarations. +// +struct mbuf; +class IONetworkData; + +// FIXME - We do not want the enqueue/dequeue macros defined in queue.h. +// +#undef enqueue(queue,elt) +#undef dequeue(queue) + +// FIXME - Belongs in IOBasicOutputQueue.h +// +/*! @enum OutputPacketStatus + @abstract The status of the packet sent to the target. + @constant kIOOutputStatusMask Define the status field in the return code. + @constant kIOOutputStatusAccept Packet was accepted by the target. + @constant kIOOutputStatusDropped Packet accepted, but was also dropped. + @constant kIOOutputStatusRetry Target ran out of resources, and is unable + to accept the packet. The ownership of the packet reverts back to the + queue. +*/ + +enum { + kIOOutputStatusMask = 0x00ff, + kIOOutputStatusAccepted = 0x0000, + kIOOutputStatusDropped = 0x0001, + kIOOutputStatusRetry = 0x0002 +}; + +/*! @enum OutputCommands + @abstract A command requested by the target. + @constant kIOOutputCommandMask Define the command field in the return code. + @constant kIOOutputCommandNone No command. + @constant kIOOutputCommandStall A command to stall the queue. +*/ + +enum { + kIOOutputCommandMask = 0xff00, + kIOOutputCommandNone = 0x0000, + kIOOutputCommandStall = 0x0100 +}; + +/*! @enum OutputHandlerReturnCodes + @abstract Common return codes returned by the target's output handler. + @constant kIOReturnOutputSuccess Packet was accepted. + @constant kIOReturnOutputDropped Packet was dropped. + @constant kIOReturnOutputStall Stall the queue and retry the same packet + when the queue is restarted. +*/ + +enum { + kIOReturnOutputSuccess = (kIOOutputStatusAccepted | kIOOutputCommandNone), + kIOReturnOutputDropped = (kIOOutputStatusDropped | kIOOutputCommandNone), + kIOReturnOutputStall = (kIOOutputStatusRetry | kIOOutputCommandStall) +}; + +/*! @class IOOutputQueue + @abstract A packet queue that supports multiple producers and a single + consumer. + @discussion Each producer, or a client thread, will deliver a chain of packets + to the queue. A single consumer will remove packets from the queue one at a + time and forward it to the registered target/action. This object may be used + by an IONetworkController on the output (transmit) side to handle the output + packet flow downstream from an IONetworkInterface, and then call the driver's + output function. IOOutputQueue is an abstract class that provides an interface + for its subclasses. Concrete subclasses will complete the implementation, and + specify the context that the target is called for packets removed from + the queue. +*/ + +class IOOutputQueue : public OSObject +{ + OSDeclareAbstractStructors( IOOutputQueue ) + +private: + + static void runServiceThread(thread_call_param_t, thread_call_param_t); + +protected: + + thread_call_t _callEntry; // callout entry structure. + + struct ExpansionData { }; + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *_reserved; + + +/*! @function init + @abstract Initializes an IOOutputQueue object. + @result Returns true if initialized successfully, false otherwise. +*/ + + virtual bool init(); + +/*! @function free + @abstract Frees the IOOutputQueue object. + @discussion Release allocated resources, then call super::free(). +*/ + + virtual void free(); + +/*! @function scheduleServiceThread + @abstract Schedules a service thread callout. + @discussion This method can be called by service() to schedule + a thread that will call serviceThread() when it starts running. + @param param A parameter to pass to the serviceThread() method. + @result Returns true if a thread callout was scheduled, false otherwise. +*/ + + virtual bool scheduleServiceThread(void * param); + +/*! @function cancelServiceThread + @abstract Cancels any pending service thread callout. + @result Returns true if a previously scheduled thread callout was canceled, + false otherwise. +*/ + + virtual bool cancelServiceThread(); + +/*! @function serviceThread + @abstract Method called by the scheduled service thread when it + starts to run. + @discussion Must be implemented by a subclass that calls + scheduleServiceThread(). The default implementation does nothing. + @param param A parameter that was given to scheduleServiceThread() + when the service thread was scheduled. +*/ + + virtual void serviceThread(void * param); + +public: + +/*! @function start + @abstract Starts up the queue. + @discussion This method is called by the target to start the queue. This will allow + packets to be removed from the queue, then delivered to the target. + @result Returns true if the queue was started successfully, false otherwise. +*/ + + virtual bool start() = 0; + +/*! @function stop + @abstract Stops the queue. + @discussion Stop the queue and prevent it from sending packets to its + target. + @result Returns the previous running state of the queue, + true if the queue was running, false if the queue was already stopped. +*/ + + virtual bool stop() = 0; + +/*! @function service + @abstract Services the queue. + @discussion Manage the queue after it has been started. + @param options Options for the service request. + @result Returns a return value to indicate the service result. +*/ + + virtual bool service(IOOptionBits options = 0) = 0; + +/*! @function flush + @abstract Drops and frees all packets currently held by the queue. + @result Returns the number of packets that were dropped and freed. +*/ + + virtual UInt32 flush() = 0; + +/*! @function setCapacity + @abstract Changes the number of packets that the queue can hold + before it begins to drop excess packets. + @param capacity The new desired capacity. + @result Returns true if the new capacity was accepted, false otherwise. +*/ + + virtual bool setCapacity(UInt32 capacity) = 0; + +/*! @function getCapacity + @abstract Gets the number of packets that the queue can hold. + @discussion The queue will begin to drop incoming packets when the + size of queue reaches its capacity. + @result Returns the current queue capacity. +*/ + + virtual UInt32 getCapacity() const = 0; + +/*! @function getSize + @abstract Gets the number of packets currently held in the queue. + @result Returns the size of the queue. +*/ + + virtual UInt32 getSize() const = 0; + +/*! @function enqueue + @abstract Adds a packet, or a chain of packets, to the queue. + @discussion This method is called by a client to add a packet, or a chain of packets, + to the queue. A packet is described by an mbuf chain, while a chain + of packets is constructed by linking multiple mbuf chains via the + m_nextpkt field. + @param m A single packet, or a chain of packets. + @param param A parameter provided by the caller. + @result Returns a return code. +*/ + + virtual UInt32 enqueue(mbuf_t m, void * param) = 0; + +/*! @function getOutputHandler + @abstract Returns the address of a function that is designated to handle + incoming packets sent to the queue object. + @result Returns the address of the enqueue() method. +*/ + + virtual IOOutputAction getOutputHandler() const; + +/*! @function getStatisticsData + @abstract Returns an IONetworkData object containing statistics counters + updated by the queue. + @result Returns an IONetworkData object. This implementation will always return + 0. +*/ + + virtual IONetworkData * getStatisticsData() const; + + // Virtual function padding + OSMetaClassDeclareReservedUnused( IOOutputQueue, 0); + OSMetaClassDeclareReservedUnused( IOOutputQueue, 1); + OSMetaClassDeclareReservedUnused( IOOutputQueue, 2); + OSMetaClassDeclareReservedUnused( IOOutputQueue, 3); + OSMetaClassDeclareReservedUnused( IOOutputQueue, 4); + OSMetaClassDeclareReservedUnused( IOOutputQueue, 5); + OSMetaClassDeclareReservedUnused( IOOutputQueue, 6); + OSMetaClassDeclareReservedUnused( IOOutputQueue, 7); + OSMetaClassDeclareReservedUnused( IOOutputQueue, 8); + OSMetaClassDeclareReservedUnused( IOOutputQueue, 9); + OSMetaClassDeclareReservedUnused( IOOutputQueue, 10); + OSMetaClassDeclareReservedUnused( IOOutputQueue, 11); + OSMetaClassDeclareReservedUnused( IOOutputQueue, 12); + OSMetaClassDeclareReservedUnused( IOOutputQueue, 13); + OSMetaClassDeclareReservedUnused( IOOutputQueue, 14); + OSMetaClassDeclareReservedUnused( IOOutputQueue, 15); +}; + +#endif /* !_IOOUTPUTQUEUE_H */ diff --git a/i386/include/IOKit/network/IOPacketQueue.h b/i386/include/IOKit/network/IOPacketQueue.h new file mode 100644 index 0000000..88d8c21 --- /dev/null +++ b/i386/include/IOKit/network/IOPacketQueue.h @@ -0,0 +1,290 @@ +/* + * Copyright (c) 1998-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOPACKETQUEUE_H +#define _IOPACKETQUEUE_H + +#include +#include +extern "C" { +#include +} +// Forward declarations. +// +struct mbuf; +struct IOMbufQueue; + +// We do not want the enqueue/dequeue macros defined in queue.h. +// +// #warning queue.h should not be included +#undef enqueue(queue,elt) +#undef dequeue(queue) + +/*! @class IOPacketQueue + @abstract Implements a bounded FIFO queue of mbuf packets. + @discussion Packets are + removed from the head of the queue (dequeue), and new packets are added + to the tail of the queue (enqueue). A spinlock is used to synchronize + access to the queue between methods that have a "lock" prefix. +*/ + +class IOPacketQueue : public OSObject +{ + OSDeclareDefaultStructors( IOPacketQueue ) + +protected: + IOMbufQueue * _queue; // mbuf queue + IOSimpleLock * _lock; // spinlock for synchronized methods + + struct ExpansionData { }; + /*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *_reserved; + +/*! @function free + @abstract Frees the IOPacketQueue object. + @discussion All packets held by the queue are released back to the free + pool, resource are deallocated, then super::free() is called. +*/ + + virtual void free(); + +/*! @var IOPacketQueueDefaultCapacity + @abstract Describes the default capacity of the + queue object. + @discussion The capacity is only observed by the enqueue() method. + Therefore, it is possible for the size of the queue to exceed its + capacity when other methods, such as prepend(), are used to add packets + to the queue. +*/ + + static const UInt32 IOPacketQueueDefaultCapacity = 100; + +public: + +/*! @function withCapacity + @abstract Factory method that constructs and initializes an + IOPacketQueue object. + @param capacity The initial capacity of the queue object. Can be + later changed by calling the setCapacity() method. + @result Returns an IOPacketQueue instance on success, or 0 otherwise. +*/ + + static IOPacketQueue * withCapacity(UInt32 capacity = + IOPacketQueueDefaultCapacity); + +/*! @function initWithCapacity + @abstract Initializes an IOPacketQueue object. + @discussion This method initializes an IOPacketQueue object with the given capacity. + @param capacity The initial capacity of the queue. Can be later changed + by calling the setCapacity() method. + @result Returns true if initialized successfully, false otherwise. +*/ + + virtual bool initWithCapacity(UInt32 capacity = + IOPacketQueueDefaultCapacity); + +/*! @function getSize + @abstract Gets the size of the queue. + @result Returns the number of packets currently held by the queue. +*/ + + virtual UInt32 getSize() const; + +/*! @function setCapacity + @abstract Changes the capacity of the queue. + @param capacity The new capacity. + @result Returns true if the new capacity was accepted, false otherwise. +*/ + + virtual bool setCapacity(UInt32 capacity); + +/*! @function getCapacity + @abstract Gets the current capacity of the queue. + @result Returns the current queue capacity. +*/ + + virtual UInt32 getCapacity() const; + +/*! @function peek + @abstract Examines the packet at the head of the queue without + removing it from the queue. + @discussion A following call to peek() or dequeue() will return + the same packet. The caller must never modify the mbuf packet returned. + @result Returns the packet at the head of the queue. +*/ + + virtual const mbuf_t peek() const; + +/*! @function prepend + @abstract Adds a chain of packets to the head of the queue. + @param m A chain of packets to add to the head of the queue. +*/ + + virtual void prepend(mbuf_t m); + +/*! @function prepend + @abstract Removes all packets from the specified queue, and adds them + to the head of this queue. + @param queue The source IOPacketQueue object containing the packets to + be transferred. +*/ + + virtual void prepend(IOPacketQueue * queue); + +/*! @function lockPrepend + @abstract Adds a chain of packets to the head of a synchronized queue. + @discussion A spinlock is used to synchronize access to the queue. + @param m A chain of packets to add to the head of the queue. + @result Always returns true. +*/ + + virtual void lockPrepend(mbuf_t m); + +/*! @function enqueue + @abstract Adds a chain of packets to the tail of the queue. + @discussion Packets are not added if the size of the queue has reached + its capacity. + @param m A chain of packets to add to the tail of the queue. + @result Returns true on success, or false to indicate over-capacity and refusal + to accept the packet chain provided. +*/ + + virtual bool enqueue(mbuf_t m); + +/*! @function enqueue + @abstract Removes all packets from the specified queue, and adds them + to the tail of this queue. + @param queue The source IOPacketQueue object containing the packets to + be transferred. + @result Always returns true. +*/ + + virtual bool enqueue(IOPacketQueue * queue); + +/*! @function enqueueWithDrop + @abstract Adds a chain of packets to the tail of the queue. + @discussion Packets are + dropped if the size of the queue has reached its capacity. + @param m A chain of packets to add to the tail of the queue. + @result Returns the number of packets dropped and freed by the queue. +*/ + + virtual UInt32 enqueueWithDrop(mbuf_t m); + +/*! @function lockEnqueue + @abstract Adds a chain of packets to the tail of a synchronized queue. + @discussion Packets are not added if the size of the queue has reached + its capacity. A spinlock is used to synchronize access to the queue. + @param m A chain of packets to add to the tail of the queue. + @result Returns true on success, or false to indicate over-capacity and refusal + to accept the packet chain provided. +*/ + + virtual bool lockEnqueue(mbuf_t m); + +/*! @function lockEnqueueWithDrop + @abstract Adds a chain of packets to the tail of a synchronized queue. + @discussion Packets are dropped if the size of the queue has reached its capacity. A spinlock is used to synchronize access to the queue. + @param m A chain of packets to add to the tail of the queue. + @result Returns the number of packets dropped and freed by the queue. +*/ + + virtual UInt32 lockEnqueueWithDrop(mbuf_t m); + +/*! @function dequeue + @abstract Removes a single packet from the head of the queue. + @result Returns a packet removed from the head of the queue, or NULL if the + queue was empty. +*/ + + virtual mbuf_t dequeue(); + +/*! @function lockDequeue + @abstract Removes a single packet from the head of a synchronized queue. + @discussion A spinlock is used to synchronize access to the queue. + @result Returns a packet removed from the head of the queue, or NULL if the + queue was empty. +*/ + + virtual mbuf_t lockDequeue(); + +/*! @function dequeueAll + @abstract Removes all packets from the queue and returns the head of the + packet chain. + @discussion The size of the queue is cleared to zero. + @result Returns the head of a packet chain linking all packets that were held + in the queue, or NULL if the queue was empty. +*/ + + virtual mbuf_t dequeueAll(); + +/*! @function lockDequeueAll + @abstract Removes all packets from a synchronized queue and returns the + head of the packet chain. + @discussion The size of the queue is cleared to zero. A spinlock is used + to synchronize access to the queue. + @result Returns the head of a packet chain linking all packets that were held + in the queue, or NULL if the queue was empty. +*/ + + virtual mbuf_t lockDequeueAll(); + +/*! @function flush + @abstract Frees all packets currently held in the queue and releases them + back to the free mbuf pool. + @discussion The size of the queue is cleared to zero. + @result Returns the number of packets freed. +*/ + + virtual UInt32 flush(); + +/*! @function lockFlush + @abstract Frees all packets currently held in a synchronized queue and + releases them back to the free mbuf pool. + @discussion The size of the queue is cleared to zero. A spinlock is used + to synchronize access to the queue. + @result Returns the number of packets freed. +*/ + + virtual UInt32 lockFlush(); + + // Virtual Pad functions + OSMetaClassDeclareReservedUnused( IOPacketQueue, 0); + OSMetaClassDeclareReservedUnused( IOPacketQueue, 1); + OSMetaClassDeclareReservedUnused( IOPacketQueue, 2); + OSMetaClassDeclareReservedUnused( IOPacketQueue, 3); + OSMetaClassDeclareReservedUnused( IOPacketQueue, 4); + OSMetaClassDeclareReservedUnused( IOPacketQueue, 5); + OSMetaClassDeclareReservedUnused( IOPacketQueue, 6); + OSMetaClassDeclareReservedUnused( IOPacketQueue, 7); + OSMetaClassDeclareReservedUnused( IOPacketQueue, 8); + OSMetaClassDeclareReservedUnused( IOPacketQueue, 9); + OSMetaClassDeclareReservedUnused( IOPacketQueue, 10); + OSMetaClassDeclareReservedUnused( IOPacketQueue, 11); + OSMetaClassDeclareReservedUnused( IOPacketQueue, 12); + OSMetaClassDeclareReservedUnused( IOPacketQueue, 13); + OSMetaClassDeclareReservedUnused( IOPacketQueue, 14); + OSMetaClassDeclareReservedUnused( IOPacketQueue, 15); +}; + +#endif /* !_IOPACKETQUEUE_H */ diff --git a/i386/include/IOKit/nvram/IONVRAMController.h b/i386/include/IOKit/nvram/IONVRAMController.h new file mode 100644 index 0000000..307d666 --- /dev/null +++ b/i386/include/IOKit/nvram/IONVRAMController.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IONVRAMCONTROLLER_H +#define _IOKIT_IONVRAMCONTROLLER_H + +#include + +class IONVRAMController: public IOService +{ + OSDeclareAbstractStructors(IONVRAMController); + +public: + virtual bool start(IOService *provider); + + virtual void sync(void); + + virtual IOReturn read(IOByteCount offset, UInt8 *buffer, + IOByteCount length) = 0; + virtual IOReturn write(IOByteCount offset, UInt8 *buffer, + IOByteCount length) = 0; +}; + +#endif /* !_IOKIT_IONVRAMCONTROLLER_H */ diff --git a/i386/include/IOKit/pci/IOAGPDevice.h b/i386/include/IOKit/pci/IOAGPDevice.h new file mode 100644 index 0000000..c3a7d90 --- /dev/null +++ b/i386/include/IOKit/pci/IOAGPDevice.h @@ -0,0 +1,222 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_IOAGPDEVICE_H +#define _IOKIT_IOAGPDEVICE_H + +#include +#include + +/* Definitions of AGP config registers */ +enum { + kIOPCIConfigAGPStatusOffset = 4, + kIOPCIConfigAGPCommandOffset = 8 +}; + +/* Definitions of AGP Command & Status registers */ +enum { + kIOAGPRequestQueueMask = 0xff000000, + kIOAGPSideBandAddresssing = 0x00000200, + kIOAGPEnable = 0x00000100, + kIOAGP4GbAddressing = 0x00000020, + kIOAGPFastWrite = 0x00000010, + kIOAGP4xDataRate = 0x00000004, + kIOAGP2xDataRate = 0x00000002, + kIOAGP1xDataRate = 0x00000001 +}; + +enum { + kIOAGPGartInvalidate = 0x00000001 +}; + +// getAGPStatus() defines +enum { + kIOAGPDefaultStatus = 0 +}; +enum { + kIOAGPIdle = 0x00000001, + kIOAGPInvalidGARTEntry = 0x00000002, + kIOAGPAccessOutOfRange = 0x00000004 +}; + +#define kIOAGPBusFlagsKey "IOAGPFlags" +enum { + // the AGP target must be idle before invalidating its gart tlb + kIOAGPGartIdleInvalidate = 0x00000001, + + // the AGP target cannot handle operations that cross page boundaries + kIOAGPDisablePageSpans = 0x00000002, + + // the AGP target cannot handle master -> target AGP writes + kIOAGPDisableAGPWrites = 0x00000004, + + // the AGP target cannot handle target -> master PCI reads + kIOAGPDisablePCIReads = 0x00000008, + + // the AGP target cannot handle master -> target PCI writes + kIOAGPDisablePCIWrites = 0x00000010, + + // the AGP target cannot handle all unaligned transactions + kIOAGPDisableUnaligned = 0x00000020, + + kIOAGPDisableFeature6 = 0x00000040, + kIOAGPDisableFeature7 = 0x00000080, + kIOAGPDisableFeature8 = 0x00000100, + kIOAGPDisableFeature9 = 0x00000200 +}; + +// masterState +enum { + kIOAGPStateEnabled = 0x00000001, + kIOAGPStateEnablePending = 0x00010000 +}; + + +/*! @class IOAGPDevice + @abstract An IOService class representing an AGP master device. + @discussion The discovery of an AGP master device by the PCI bus family results in an instance of the IOAGPDevice being created and published. It provides services specific to AGP, in addition to the PCI services supplied by its superclass IOPCIDevice. +*/ + +class IOAGPDevice : public IOPCIDevice +{ + OSDeclareDefaultStructors(IOAGPDevice) + +protected: + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. +*/ + struct ExpansionData { }; + +/*! @var reserved + Reserved for future use. (Internal use only) +*/ + ExpansionData *reserved; + +public: + UInt32 masterState; + UInt8 masterAGPRegisters; + +/*! @function createAGPSpace + @abstract Allocates the AGP space, and enables AGP transactions on the master and slave. + @discussion This method should be called by the driver for the AGP master device to set the size of the space and enable AGP transactions. It will destroy any AGP space currently allocated. + @param options No options are currently defined, pass zero. + @param address The physical range allocated for the AGP space is passed back to the caller. + @param length An in/out parameter - the caller sets the devices maximum AGP addressing and the actual size created is passed back. + @result Returns an IOReturn code indicating success or failure. +*/ + + virtual IOReturn createAGPSpace( IOOptionBits options, + IOPhysicalAddress * address, + IOPhysicalLength * length ); + +/*! @function destroyAGPSpace + @abstract Destroys the AGP space, and disables AGP transactions on the master and slave. + @discussion This method should be called by the driver to shutdown AGP transactions and release resources. +*/ + + virtual IOReturn destroyAGPSpace( void ); + +/*! @function getAGPRangeAllocator + @abstract Accessor to obtain the AGP range allocator. + @discussion To allocate ranges in AGP space, obtain a range allocator for the space with this method. It is retained while the space is created (until destroyAGPSpace is called) and should not be released by the caller. + @result Returns a pointer to the range allocator for the AGP space. +*/ + + virtual IORangeAllocator * getAGPRangeAllocator( void ); + +/*! @function getAGPStatus + @abstract Returns the current state of the AGP bus. + @discussion Returns state bits for the AGP bus. Only one type of status is currently defined. + @param which Type of status - only kIOAGPDefaultStatus is currently valid. + @result Returns mask of status bits for the AGP bus. +*/ + + virtual IOOptionBits getAGPStatus( IOOptionBits which = kIOAGPDefaultStatus ); + +/*! @function commitAGPMemory + @abstract Makes memory addressable by AGP transactions. + @discussion Makes the memory described by the IOMemoryDescriptor object addressable by AGP by entering its pages into the GART array, given an offset into AGP space supplied by the caller (usually allocated by the AGP range allocator). It is the caller's responsibility to prepare non-kernel pageable memory before calling this method, with IOMemoryDescriptor::prepare. + @param memory A IOMemoryDescriptor object describing the memory to add to the GART. + @param agpOffset An offset into AGP space that the caller has allocated - usually allocated by the AGP range allocator. + @param options Pass kIOAGPGartInvalidate if the AGP target should invalidate any GART TLB. + @result Returns an IOReturn code indicating success or failure. +*/ + + virtual IOReturn commitAGPMemory( IOMemoryDescriptor * memory, + IOByteCount agpOffset, + IOOptionBits options = 0 ); + +/*! @function releaseAGPMemory + @abstract Releases memory addressable by AGP transactions. + @discussion Makes the memory described by the IOMemoryDescriptor object unaddressable by AGP by removing its pages from the GART array, given an offset into AGP space supplied by the caller (usually allocated by the AGP range allocator). It is the caller's responsibility to complete non-kernel pageable memory before calling this method, with IOMemoryDescriptor::complete. + @param memory A IOMemoryDescriptor object describing the memory to remove from the GART. + @param agpOffset An offset into AGP space that the caller has allocated - usually allocated by the AGP range allocator. + @param options Pass kIOAGPGartInvalidate if the AGP target should invalidate any GART TLB. + @result Returns an IOReturn code indicating success or failure. +*/ + + virtual IOReturn releaseAGPMemory( IOMemoryDescriptor * memory, + IOByteCount agpOffset, + IOOptionBits options = 0 ); + + virtual IOReturn resetAGP( IOOptionBits options = 0 ); + +/*! @function getAGPSpace + @abstract Returns the allocated AGP space. + @discussion This method can be called by the driver for the AGP master device to retrieve the physical address and size of the space created with createAGPSpace. + @param address The physical range allocated for the AGP space is passed back to the caller. Zero may be passed if the address is not needed by the caller. + @param length The size of the the AGP space created is passed back. Zero may be passed if the length is not needed by the caller. + @result Returns an IOReturn code indicating success or failure. +*/ + + virtual IOReturn getAGPSpace( IOPhysicalAddress * address, + IOPhysicalLength * length ); + + // Unused Padding + OSMetaClassDeclareReservedUnused(IOAGPDevice, 0); + OSMetaClassDeclareReservedUnused(IOAGPDevice, 1); + OSMetaClassDeclareReservedUnused(IOAGPDevice, 2); + OSMetaClassDeclareReservedUnused(IOAGPDevice, 3); + OSMetaClassDeclareReservedUnused(IOAGPDevice, 4); + OSMetaClassDeclareReservedUnused(IOAGPDevice, 5); + OSMetaClassDeclareReservedUnused(IOAGPDevice, 6); + OSMetaClassDeclareReservedUnused(IOAGPDevice, 7); + OSMetaClassDeclareReservedUnused(IOAGPDevice, 8); + OSMetaClassDeclareReservedUnused(IOAGPDevice, 9); + OSMetaClassDeclareReservedUnused(IOAGPDevice, 10); + OSMetaClassDeclareReservedUnused(IOAGPDevice, 11); + OSMetaClassDeclareReservedUnused(IOAGPDevice, 12); + OSMetaClassDeclareReservedUnused(IOAGPDevice, 13); + OSMetaClassDeclareReservedUnused(IOAGPDevice, 14); + OSMetaClassDeclareReservedUnused(IOAGPDevice, 15); + OSMetaClassDeclareReservedUnused(IOAGPDevice, 16); +}; + +#endif /* ! _IOKIT_IOAGPDEVICE_H */ diff --git a/i386/include/IOKit/pci/IOPCIBridge.h b/i386/include/IOKit/pci/IOPCIBridge.h new file mode 100644 index 0000000..2fac052 --- /dev/null +++ b/i386/include/IOKit/pci/IOPCIBridge.h @@ -0,0 +1,381 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_IOPCIBRIDGE_H +#define _IOKIT_IOPCIBRIDGE_H + +#include +#include +#include +#include + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +typedef uint64_t IOPCIScalar; + +struct IOPCIRange +{ + IOPCIScalar start; + IOPCIScalar size; + IOPCIScalar alignment; + UInt32 type; + UInt32 flags; + struct IOPCIRange * next; + struct IOPCIRange * nextSubRange; + struct IOPCIRange * subRange; +}; + +enum { + kIOPCIResourceTypeMemory = 0, + kIOPCIResourceTypePrefetchMemory, + kIOPCIResourceTypeIO, + kIOPCIResourceTypeBusNumber, + kIOPCIResourceTypeCount +}; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/*! + @class IOPCIBridge + @abstract Base class for all PCI bridge drivers. +*/ +class IOPCIConfigurator; +class IOPCIDevice; + +class IOPCIBridge : public IOService +{ + friend class IOPCIDevice; + friend class IOPCIConfigurator; + + OSDeclareAbstractStructors(IOPCIBridge) + +private: + static void initialize(void); + IORegistryEntry * findMatching( OSIterator * in, IOPCIAddressSpace space ); + virtual bool isDTNub( IOPCIDevice * nub ); + bool checkProperties( IOPCIDevice * entry ); + + void removeDevice( IOPCIDevice * device, IOOptionBits options = 0 ); + IOReturn restoreMachineState( IOOptionBits options = 0); + IOReturn _restoreDeviceState( IOPCIDevice * device, IOOptionBits options ); + IOReturn resolveLegacyInterrupts( IOService * provider, IOPCIDevice * nub ); + IOReturn resolveMSIInterrupts ( IOService * provider, IOPCIDevice * nub ); + +protected: + static void nvLocation( IORegistryEntry * entry, + UInt8 * busNum, UInt8 * deviceNum, UInt8 * functionNum ); + static SInt32 compareAddressCell( UInt32 cellCount, UInt32 cleft[], UInt32 cright[] ); + void checkTerminateChildren(IOService * bridgeDevice, bool eject); + IOReturn setDeviceASPMBits(IOPCIDevice * device, IOOptionBits state); + + IORangeAllocator * bridgeMemoryRanges; + IORangeAllocator * bridgeIORanges; + +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOPCIBridge in the future. +*/ + struct ExpansionData + { + friend class IOPCIConfigurator; + IORangeAllocator * cardBusMemoryRanges; + IOPCIRange * rangeLists[kIOPCIResourceTypeCount]; + }; + +/*! @var reserved + Reserved for future use. (Internal use only) +*/ + ExpansionData *reserved; + +protected: +public: + virtual void probeBus( IOService * provider, UInt8 busNum ); + + virtual UInt8 firstBusNum( void ); + virtual UInt8 lastBusNum( void ); + + virtual void spaceFromProperties( OSDictionary * propTable, + IOPCIAddressSpace * space ); + virtual OSDictionary * constructProperties( IOPCIAddressSpace space ); + + virtual IOPCIDevice * createNub( OSDictionary * from ); + + virtual bool initializeNub( IOPCIDevice * nub, OSDictionary * from ); + + virtual bool publishNub( IOPCIDevice * nub, UInt32 index ); + + virtual bool addBridgeMemoryRange( IOPhysicalAddress start, + IOPhysicalLength length, bool host ); + + virtual bool addBridgeIORange( IOByteCount start, IOByteCount length ); + + virtual bool constructRange( IOPCIAddressSpace * flags, + IOPhysicalAddress phys, IOPhysicalLength len, + OSArray * array ); + + virtual bool matchNubWithPropertyTable( IOService * nub, + OSDictionary * propertyTable, + SInt32 * score ); + + virtual bool compareNubName( const IOService * nub, OSString * name, + OSString ** matched = 0 ) const; + + virtual bool pciMatchNub( IOPCIDevice * nub, + OSDictionary * table, SInt32 * score); + + virtual bool matchKeys( IOPCIDevice * nub, const char * keys, + UInt32 defaultMask, UInt8 regNum ); + + virtual IOReturn getNubResources( IOService * nub ); + + virtual IOReturn getNubAddressing( IOPCIDevice * nub ); + + virtual IOReturn getDTNubAddressing( IOPCIDevice * nub ); + +public: + virtual void free( void ); + + virtual bool start( IOService * provider ); + + virtual void stop( IOService * provider ); + + virtual bool configure( IOService * provider ); + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + virtual IODeviceMemory * ioDeviceMemory( void ) = 0; + + virtual UInt32 configRead32( IOPCIAddressSpace space, UInt8 offset ) = 0; + virtual void configWrite32( IOPCIAddressSpace space, + UInt8 offset, UInt32 data ) = 0; + virtual UInt16 configRead16( IOPCIAddressSpace space, UInt8 offset ) = 0; + virtual void configWrite16( IOPCIAddressSpace space, + UInt8 offset, UInt16 data ) = 0; + virtual UInt8 configRead8( IOPCIAddressSpace space, UInt8 offset ) = 0; + virtual void configWrite8( IOPCIAddressSpace space, + UInt8 offset, UInt8 data ) = 0; + + virtual IOPCIAddressSpace getBridgeSpace( void ) = 0; + + virtual UInt32 findPCICapability( IOPCIAddressSpace space, + UInt8 capabilityID, UInt8 * offset = 0 ); + + virtual IOReturn setDevicePowerState( IOPCIDevice * device, + unsigned long whatToDo ); + virtual IOReturn saveDeviceState( IOPCIDevice * device, + IOOptionBits options = 0 ); + virtual IOReturn restoreDeviceState( IOPCIDevice * device, + IOOptionBits options = 0 ); + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + virtual IOReturn createAGPSpace( IOAGPDevice * master, + IOOptionBits options, + IOPhysicalAddress * address, + IOPhysicalLength * length ); + + virtual IOReturn destroyAGPSpace( IOAGPDevice * master ); + + virtual IORangeAllocator * getAGPRangeAllocator( IOAGPDevice * master ); + + virtual IOOptionBits getAGPStatus( IOAGPDevice * master, + IOOptionBits options = 0 ); + virtual IOReturn resetAGPDevice( IOAGPDevice * master, + IOOptionBits options = 0 ); + + virtual IOReturn getAGPSpace( IOAGPDevice * master, + IOPhysicalAddress * address, + IOPhysicalLength * length ); + + virtual IOReturn commitAGPMemory( IOAGPDevice * master, + IOMemoryDescriptor * memory, + IOByteCount agpOffset, + IOOptionBits options ); + + virtual IOReturn releaseAGPMemory( IOAGPDevice * master, + IOMemoryDescriptor * memory, + IOByteCount agpOffset, + IOOptionBits options ); + +protected: + OSMetaClassDeclareReservedUsed(IOPCIBridge, 0); + virtual bool addBridgePrefetchableMemoryRange( IOPhysicalAddress start, + IOPhysicalLength length, + bool host ); + + OSMetaClassDeclareReservedUsed(IOPCIBridge, 1); + virtual UInt32 extendedFindPCICapability( IOPCIAddressSpace space, + UInt32 capabilityID, IOByteCount * offset = 0 ); + + OSMetaClassDeclareReservedUsed(IOPCIBridge, 2); + virtual IOReturn setDeviceASPMState(IOPCIDevice * device, + IOService * client, IOOptionBits state); + + // Unused Padding + OSMetaClassDeclareReservedUnused(IOPCIBridge, 3); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 4); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 5); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 6); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 7); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 8); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 9); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 10); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 11); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 12); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 13); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 14); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 15); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 16); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 17); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 18); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 19); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 20); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 21); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 22); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 23); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 24); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 25); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 26); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 27); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 28); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 29); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 30); + OSMetaClassDeclareReservedUnused(IOPCIBridge, 31); + + + +}; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#define kIOPCIBridgeRegs (32) +/*! + @class IOPCI2PCIBridge + @abstract Base class for all PCI-to-PCI bridge drivers. +*/ + +class IOPCI2PCIBridge : public IOPCIBridge +{ + OSDeclareDefaultStructors(IOPCI2PCIBridge) + +private: + + IOPCIDevice * bridgeDevice; + UInt32 bridgeState[kIOPCIBridgeRegs]; + +protected: +/*! @struct ExpansionData + @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. + */ + struct ExpansionData + { + // /hotp + IOByteCount xpressCapability; + IOFilterInterruptEventSource * bridgeInterruptSource; + IOWorkLoop * workLoop; + uint32_t hotplugCount; + uint8_t presence; + uint8_t waitingLinkEnable; + uint8_t linkChangeOnly; + uint8_t interruptEnablePending; + uint8_t __reserved[4]; + // hotp/ + }; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + ExpansionData *reserved; +public: + + virtual UInt8 firstBusNum( void ); + virtual UInt8 lastBusNum( void ); + +public: + virtual void free(); + + virtual bool serializeProperties( OSSerialize * serialize ) const; + + virtual IOService * probe( IOService * provider, + SInt32 * score ); + + virtual bool start( IOService * provider ); + + virtual void stop( IOService * provider ); + + virtual bool configure( IOService * provider ); + + virtual void probeBus( IOService * provider, UInt8 busNum ); + + virtual IOReturn requestProbe( IOOptionBits options ); + + virtual void saveBridgeState( void ); + + virtual void restoreBridgeState( void ); + + IOReturn setPowerState( unsigned long powerState, + IOService * whatDevice ); + + virtual bool publishNub( IOPCIDevice * nub, UInt32 index ); + + virtual IODeviceMemory * ioDeviceMemory( void ); + + virtual IOPCIAddressSpace getBridgeSpace( void ); + + virtual UInt32 configRead32( IOPCIAddressSpace space, UInt8 offset ); + virtual void configWrite32( IOPCIAddressSpace space, + UInt8 offset, UInt32 data ); + virtual UInt16 configRead16( IOPCIAddressSpace space, UInt8 offset ); + virtual void configWrite16( IOPCIAddressSpace space, + UInt8 offset, UInt16 data ); + virtual UInt8 configRead8( IOPCIAddressSpace space, UInt8 offset ); + virtual void configWrite8( IOPCIAddressSpace space, + UInt8 offset, UInt8 data ); + + virtual IOReturn setDeviceASPMState(IOPCIDevice * device, + IOService * client, IOOptionBits state); + + // Unused Padding + OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 0); + OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 1); + OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 2); + OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 3); + OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 4); + OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 5); + OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 6); + OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 7); + OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 8); + +protected: + bool filterInterrupt( IOFilterInterruptEventSource * source); + + void handleInterrupt( IOInterruptEventSource * source, + int count ); + +}; + +#endif /* ! _IOKIT_IOPCIBRIDGE_H */ diff --git a/i386/include/IOKit/pci/IOPCIDevice.h b/i386/include/IOKit/pci/IOPCIDevice.h new file mode 100644 index 0000000..d031a06 --- /dev/null +++ b/i386/include/IOKit/pci/IOPCIDevice.h @@ -0,0 +1,673 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IOPCIDEVICE_H +#define _IOKIT_IOPCIDEVICE_H + +#include + +/* Definitions of PCI Config Registers */ +enum { + kIOPCIConfigVendorID = 0x00, + kIOPCIConfigDeviceID = 0x02, + kIOPCIConfigCommand = 0x04, + kIOPCIConfigStatus = 0x06, + kIOPCIConfigRevisionID = 0x08, + kIOPCIConfigClassCode = 0x09, + kIOPCIConfigCacheLineSize = 0x0C, + kIOPCIConfigLatencyTimer = 0x0D, + kIOPCIConfigHeaderType = 0x0E, + kIOPCIConfigBIST = 0x0F, + kIOPCIConfigBaseAddress0 = 0x10, + kIOPCIConfigBaseAddress1 = 0x14, + kIOPCIConfigBaseAddress2 = 0x18, + kIOPCIConfigBaseAddress3 = 0x1C, + kIOPCIConfigBaseAddress4 = 0x20, + kIOPCIConfigBaseAddress5 = 0x24, + kIOPCIConfigCardBusCISPtr = 0x28, + kIOPCIConfigSubSystemVendorID = 0x2C, + kIOPCIConfigSubSystemID = 0x2E, + kIOPCIConfigExpansionROMBase = 0x30, + kIOPCIConfigCapabilitiesPtr = 0x34, + kIOPCIConfigInterruptLine = 0x3C, + kIOPCIConfigInterruptPin = 0x3D, + kIOPCIConfigMinimumGrant = 0x3E, + kIOPCIConfigMaximumLatency = 0x3F +}; + +/* Definitions of Capabilities PCI Config Register */ +enum { + kIOPCICapabilityIDOffset = 0x00, + kIOPCINextCapabilityOffset = 0x01, + + kIOPCIPowerManagementCapability = 0x01, + kIOPCIAGPCapability = 0x02, + kIOPCIVitalProductDataCapability = 0x03, + kIOPCISlotIDCapability = 0x04, + kIOPCIMSICapability = 0x05, + kIOPCICPCIHotswapCapability = 0x06, + kIOPCIPCIXCapability = 0x07, + kIOPCILDTCapability = 0x08, + kIOPCIVendorSpecificCapability = 0x09, + kIOPCIDebugPortCapability = 0x0a, + kIOPCICPCIResourceControlCapability = 0x0b, + kIOPCIHotplugCapability = 0x0c, + kIOPCIAGP8Capability = 0x0e, + kIOPCISecureCapability = 0x0f, + kIOPCIPCIExpressCapability = 0x10, + kIOPCIMSIXCapability = 0x11, + + kIOPCIExpressErrorReportingCapability = -1UL, + kIOPCIExpressVirtualChannelCapability = -2UL, + kIOPCIExpressDeviceSerialNumberCapability = -3UL, + kIOPCIExpressPowerBudgetCapability = -4UL +}; + +/* Space definitions */ +enum { + kIOPCIConfigSpace = 0, + kIOPCIIOSpace = 1, + kIOPCI32BitMemorySpace = 2, + kIOPCI64BitMemorySpace = 3 +}; + +/* Command register definitions */ +enum { + kIOPCICommandIOSpace = 0x0001, + kIOPCICommandMemorySpace = 0x0002, + kIOPCICommandBusMaster = 0x0004, + kIOPCICommandSpecialCycles = 0x0008, + kIOPCICommandMemWrInvalidate = 0x0010, + kIOPCICommandPaletteSnoop = 0x0020, + kIOPCICommandParityError = 0x0040, + kIOPCICommandAddressStepping = 0x0080, + kIOPCICommandSERR = 0x0100, + kIOPCICommandFastBack2Back = 0x0200, + kIOPCICommandInterruptDisable = 0x0400 +}; + +/* Status register definitions */ +enum { + kIOPCIStatusCapabilities = 0x0010, + kIOPCIStatusPCI66 = 0x0020, + kIOPCIStatusUDF = 0x0040, + kIOPCIStatusFastBack2Back = 0x0080, + kIOPCIStatusDevSel0 = 0x0000, + kIOPCIStatusDevSel1 = 0x0200, + kIOPCIStatusDevSel2 = 0x0400, + kIOPCIStatusDevSel3 = 0x0600, + kIOPCIStatusTargetAbortCapable = 0x0800, + kIOPCIStatusTargetAbortActive = 0x1000, + kIOPCIStatusMasterAbortActive = 0x2000, + kIOPCIStatusSERRActive = 0x4000, + kIOPCIStatusParityErrActive = 0x8000 +}; + +// constants which are part of the PCI Bus Power Management Spec. +enum +{ + // capabilities bits in the 16 bit capabilities register + kPCIPMCPMESupportFromD3Cold = 0x8000, + kPCIPMCPMESupportFromD3Hot = 0x4000, + kPCIPMCPMESupportFromD2 = 0x2000, + kPCIPMCPMESupportFromD1 = 0x1000, + kPCIPMCPMESupportFromD0 = 0x0800, + kPCIPMCD2Support = 0x0400, + kPCIPMCD1Support = 0x0200, + + kPCIPMCD3Support = 0x0001 +}; + +enum +{ + // bits in the power management control/status register + kPCIPMCSPMEStatus = 0x8000, + kPCIPMCSPMEEnable = 0x0100, + kPCIPMCSPowerStateMask = 0x0003, + kPCIPMCSPowerStateD3 = 0x0003, + kPCIPMCSPowerStateD2 = 0x0002, + kPCIPMCSPowerStateD1 = 0x0001, + kPCIPMCSPowerStateD0 = 0x0000, + + kPCIPMCSDefaultEnableBits = (~(IOOptionBits)0) +}; + +union IOPCIAddressSpace { + UInt32 bits; + struct { +#if __BIG_ENDIAN__ + unsigned int reloc:1; + unsigned int prefetch:1; + unsigned int t:1; + unsigned int resv:3; + unsigned int space:2; + unsigned int busNum:8; + unsigned int deviceNum:5; + unsigned int functionNum:3; + unsigned int registerNum:8; +#elif __LITTLE_ENDIAN__ + unsigned int registerNum:8; + unsigned int functionNum:3; + unsigned int deviceNum:5; + unsigned int busNum:8; + unsigned int space:2; + unsigned int resv:3; + unsigned int t:1; + unsigned int prefetch:1; + unsigned int reloc:1; +#endif + } s; + struct { +#if __BIG_ENDIAN__ + unsigned int resv:4; + unsigned int registerNumExtended:4; + unsigned int busNum:8; + unsigned int deviceNum:5; + unsigned int functionNum:3; + unsigned int registerNum:8; +#elif __LITTLE_ENDIAN__ + unsigned int registerNum:8; + unsigned int functionNum:3; + unsigned int deviceNum:5; + unsigned int busNum:8; + unsigned int registerNumExtended:4; + unsigned int resv:4; +#endif + } es; +}; + +struct IOPCIPhysicalAddress { + IOPCIAddressSpace physHi; + UInt32 physMid; + UInt32 physLo; + UInt32 lengthHi; + UInt32 lengthLo; +}; + +// IOPCIDevice matching property names +#define kIOPCIMatchKey "IOPCIMatch" +#define kIOPCIPrimaryMatchKey "IOPCIPrimaryMatch" +#define kIOPCISecondaryMatchKey "IOPCISecondaryMatch" +#define kIOPCIClassMatchKey "IOPCIClassMatch" + +// property to control PCI default config space save on sleep +#define kIOPMPCIConfigSpaceVolatileKey "IOPMPCIConfigSpaceVolatile" + +// pci express link status +#define kIOPCIExpressLinkStatusKey "IOPCIExpressLinkStatus" +// pci express link capabilities +#define kIOPCIExpressLinkCapabilitiesKey "IOPCIExpressLinkCapabilities" + +#ifndef kIOPlatformDeviceASPMEnableKey +#define kIOPlatformDeviceASPMEnableKey "IOPlatformDeviceASPMEnable" +#endif + +#ifndef kIOPCIDeviceASPMSupportedKey +#define kIOPCIDeviceASPMSupportedKey "pci-aspm-supported" +#endif + +#define kIOPCIPMEOptionsKey "IOPCIPMEOptions" + + +enum { + kIOPCIDevicePowerStateCount = 3, + kIOPCIDeviceOffState = 0, + kIOPCIDeviceDozeState = 1, + kIOPCIDeviceOnState = 2, +}; + +enum +{ + // bits getInterruptType result + kIOInterruptTypePCIMessaged = 0x00010000 +}; + +class IOPCIBridge; +class IOPCI2PCIBridge; +class IOPCIMessagedInterruptController; + +/*! @class IOPCIDevice : public IOService + @abstract An IOService class representing a PCI device. + @discussion The discovery of a PCI device by the PCI bus family results in an instance of the IOPCIDevice being created and published. It provides services for looking up and mapping memory mapped hardware, and access to the PCI configuration and I/O spaces. + +

Matching Supported by IOPCIDevice

+ +Two types of matching are available, OpenFirmware name matching and PCI register matching. Currently, only one of these two matching schemes can be used in the same property table. + +

OpenFirmware Name Matching

+ +IOService performs matching based on the IONameMatch property (see IOService). IOPCIDevices created with OpenFirmware device tree entries will name match based on the standard OpenFirmware name matching properties. + +

PCI Register Matching

+ +A PCI device driver can also match on the values of certain config space registers. + +In each case, several matching values can be specified, and an optional mask for the value of the config space register may follow the value, preceded by an '&' character. +
+
+ kIOPCIMatchKey, "IOPCIMatch" +
+The kIOPCIMatchKey property matches the vendor and device ID (0x00) register, or the subsystem register (0x2c). +
+
+ kIOPCIPrimaryMatchKey, "IOPCIPrimaryMatch" +
+The kIOPCIPrimaryMatchKey property matches the vendor and device ID (0x00) register. +
+
+ kIOPCISecondaryMatchKey, "IOPCISecondaryMatch" +
+The kIOPCISecondaryMatchKey property matches the subsystem register (0x2c). +
+
+ kIOPCIClassMatchKey, "IOPCIClassMatch" +
+The kIOPCIClassMatchKey property matches the class code register (0x08). The default mask for this register is 0xffffff00. +
+
+Examples: +
+
+ <key>IOPCIMatch</key>
+ <string>0x00261011</string> +
+Matches a device whose vendor ID is 0x1011, and device ID is 0x0026, including subsystem IDs. +
+
+ <key>IOPCIMatch</key>
+ <string>0x00789004&0x00ffffff 0x78009004&0x0xff00ffff</string> +
+Matches with any device with a vendor ID of 0x9004, and a device ID of 0xzz78 or 0x78zz, where 'z' is don't care. +
+
+ <key>IOPCIClassMatch</key>
+ <string>0x02000000&0xffff0000</string> +
+
+Matches a device whose class code is 0x0200zz, an ethernet device. + +*/ + +class IOPCIDevice : public IOService +{ + OSDeclareDefaultStructors(IOPCIDevice) + + friend class IOPCIBridge; + friend class IOPCI2PCIBridge; + friend class IOPCIMessagedInterruptController; + +protected: + IOPCIBridge * parent; + IOMemoryMap * ioMap; + OSObject * slotNameProperty; + +/*! @var reserved + Reserved for future use. (Internal use only) */ + struct IOPCIDeviceExpansionData * reserved; + +public: + IOPCIAddressSpace space; + UInt32 * savedConfig; + +public: + /* IOService/IORegistryEntry methods */ + + virtual bool init( OSDictionary * propTable ); + virtual bool init( IORegistryEntry * from, + const IORegistryPlane * inPlane ); + virtual void free(); + virtual bool attach( IOService * provider ); + virtual void detach( IOService * provider ); + + virtual IOReturn newUserClient( task_t owningTask, void * securityID, + UInt32 type, OSDictionary * properties, + IOUserClient ** handler ); + + virtual IOReturn powerStateWillChangeTo (IOPMPowerFlags capabilities, + unsigned long stateNumber, + IOService* whatDevice); + virtual IOReturn setPowerState( unsigned long, IOService * ); + + virtual bool compareName( OSString * name, OSString ** matched = 0 ) const; + virtual bool matchPropertyTable( OSDictionary * table, + SInt32 * score ); + virtual IOService * matchLocation( IOService * client ); + virtual IOReturn getResources( void ); + virtual IOReturn setProperties(OSObject * properties); + virtual IOReturn callPlatformFunction(const OSSymbol * functionName, + bool waitForFunction, + void * p1, void * p2, + void * p3, void * p4); + virtual IOReturn callPlatformFunction(const char * functionName, + bool waitForFunction, + void * p1, void * p2, + void * p3, void * p4); + + /* Config space accessors */ + + virtual UInt32 configRead32( IOPCIAddressSpace space, UInt8 offset ); + virtual void configWrite32( IOPCIAddressSpace space, + UInt8 offset, UInt32 data ); + virtual UInt16 configRead16( IOPCIAddressSpace space, UInt8 offset ); + virtual void configWrite16( IOPCIAddressSpace space, + UInt8 offset, UInt16 data ); + virtual UInt8 configRead8( IOPCIAddressSpace space, UInt8 offset ); + virtual void configWrite8( IOPCIAddressSpace space, + UInt8 offset, UInt8 data ); + +/*! @function configRead32 + @abstract Reads a 32-bit value from the PCI device's configuration space. + @discussion This method reads a 32-bit configuration space register on the device and returns its value. + @param offset An 8-bit offset into configuration space, of which bits 0-1 are ignored. + @result An 32-bit value in host byte order (big endian on PPC). */ + + virtual UInt32 configRead32( UInt8 offset ); + +/*! @function configRead16 + @abstract Reads a 16-bit value from the PCI device's configuration space. + @discussion This method reads a 16-bit configuration space register on the device and returns its value. + @param offset An 8-bit offset into configuration space, of which bit 0 is ignored. + @result An 16-bit value in host byte order (big endian on PPC). */ + + virtual UInt16 configRead16( UInt8 offset ); + +/*! @function configRead8 + @abstract Reads a 8-bit value from the PCI device's configuration space. + @discussion This method reads a 8-bit configuration space register on the device and returns its value. + @param offset An 8-bit offset into configuration space. + @result An 8-bit value. */ + + virtual UInt8 configRead8( UInt8 offset ); + +/*! @function configWrite32 + @abstract Writes a 32-bit value to the PCI device's configuration space. + @discussion This method write a 32-bit value to a configuration space register on the device. + @param offset An 8-bit offset into configuration space, of which bits 0-1 are ignored. + @param data An 32-bit value to be written in host byte order (big endian on PPC). */ + + virtual void configWrite32( UInt8 offset, UInt32 data ); + +/*! @function configWrite16 + @abstract Writes a 16-bit value to the PCI device's configuration space. + @discussion This method write a 16-bit value to a configuration space register on the device. + @param offset An 8-bit offset into configuration space, of which bit 0 is ignored. + @param data An 16-bit value to be written in host byte order (big endian on PPC). */ + + virtual void configWrite16( UInt8 offset, UInt16 data ); + +/*! @function configWrite8 + @abstract Writes a 8-bit value to the PCI device's configuration space. + @discussion This method write a 8-bit value to a configuration space register on the device. + @param offset An 8-bit offset into configuration space. + @param data An 8-bit value to be written. */ + + virtual void configWrite8( UInt8 offset, UInt8 data ); + + virtual IOReturn saveDeviceState( IOOptionBits options = 0 ); + virtual IOReturn restoreDeviceState( IOOptionBits options = 0 ); + +/*! @function setConfigBits + @abstract Sets masked bits in a configuration space register. + @discussion This method sets masked bits in a configuration space register on the device by reading and writing the register. The value of the masked bits before the write is returned. + @param offset An 8-bit offset into configuration space, of which bits 0-1 are ignored. + @param mask An 32-bit mask indicating which bits in the value parameter are valid. + @param data An 32-bit value to be written in host byte order (big endian on PPC). + @result The value of the register masked with the mask before the write. */ + + virtual UInt32 setConfigBits( UInt8 offset, UInt32 mask, UInt32 value ); + +/*! @function setMemoryEnable + @abstract Sets the device's memory space response. + @discussion This method sets the memory space response bit in the device's command config space register to the passed value, and returns the previous state of the enable. + @param enable True or false to enable or disable the memory space response. + @result True if the memory space response was previously enabled, false otherwise. */ + + virtual bool setMemoryEnable( bool enable ); + +/*! @function setIOEnable + @abstract Sets the device's I/O space response. + @discussion This method sets the I/O space response bit in the device's command config space register to the passed value, and returns the previous state of the enable. The exclusive option allows only one exclusive device on the bus to be enabled concurrently, this should be only for temporary access. + @param enable True or false to enable or disable the I/O space response. + @param exclusive If true, only one setIOEnable with the exclusive flag set will be allowed at a time on the bus, this should be only for temporary access. + @result True if the I/O space response was previously enabled, false otherwise. */ + + virtual bool setIOEnable( bool enable, bool exclusive = false ); + +/*! @function setBusMasterEnable + @abstract Sets the device's bus master enable. + @discussion This method sets the bus master enable bit in the device's command config space register to the passed value, and returns the previous state of the enable. + @param enable True or false to enable or disable bus mastering. + @result True if bus mastering was previously enabled, false otherwise. */ + + virtual bool setBusMasterEnable( bool enable ); + +/*! @function findPCICapability + @abstract Search configuration space for a PCI capability register. + @discussion This method searches the device's config space for a PCI capability register matching the passed capability ID, if the device supports PCI capabilities. To search for PCI Express extended capabilities or for multiple capablities with the same ID, use the extendedFindPCICapability() method. + @param capabilityID An 8-bit PCI capability ID. + @param offset An optional pointer to return the offset into config space where the capability was found. + @result The 32-bit value of the capability register if one was found, zero otherwise. */ + + virtual UInt32 findPCICapability( UInt8 capabilityID, UInt8 * offset = 0 ); + +/*! @function getBusNumber + @abstract Accessor to return the PCI device's assigned bus number. + @discussion This method is an accessor to return the PCI device's assigned bus number. + @result The 8-bit value of device's PCI bus number. */ + + virtual UInt8 getBusNumber( void ); + +/*! @function getDeviceNumber + @abstract Accessor to return the PCI device's device number. + @discussion This method is an accessor to return the PCI device's device number. + @result The 5-bit value of device's device number. */ + + virtual UInt8 getDeviceNumber( void ); + +/*! @function getFunctionNumber + @abstract Accessor to return the PCI device's function number. + @discussion This method is an accessor to return the PCI device's function number. + @result The 3-bit value of device's function number. */ + + virtual UInt8 getFunctionNumber( void ); + + /* Device memory accessors */ + +/*! @function getDeviceMemoryWithRegister + @abstract Returns an instance of IODeviceMemory representing one of the device's memory mapped ranges. + @discussion This method will return a pointer to an instance of IODeviceMemory for the physical memory range that was assigned to the configuration space base address register passed in. It is analogous to IOService::getDeviceMemoryWithIndex. + @param reg The 8-bit configuration space register that is the base address register for the desired range. + @result A pointer to an instance of IODeviceMemory, or zero no such range was found. The IODeviceMemory is retained by the provider, so is valid while attached, or while any mappings to it exist. It should not be released by the caller. */ + + virtual IODeviceMemory * getDeviceMemoryWithRegister( UInt8 reg ); + +/*! @function mapDeviceMemoryWithRegister + @abstract Maps a physical range of the device. + @discussion This method will create a mapping for the IODeviceMemory for the physical memory range that was assigned to the configuration space base address register passed in, with IODeviceMemory::map(options). The mapping is represented by the returned instance of IOMemoryMap, which should not be released until the mapping is no longer required. This method is analogous to IOService::mapDeviceMemoryWithIndex. + @param reg The 8-bit configuration space register that is the base address register for the desired range. + @param options Options to be passed to the IOMemoryDescriptor::map() method. + @result An instance of IOMemoryMap, or zero if the index is beyond the count available. The mapping should be released only when access to it is no longer required. */ + + virtual IOMemoryMap * mapDeviceMemoryWithRegister( UInt8 reg, + IOOptionBits options = 0 ); + +/*! @function ioDeviceMemory + @abstract Accessor to the I/O space aperture for the bus. + @discussion This method will return a reference to the IODeviceMemory for the I/O aperture of the bus the device is on. + @result A pointer to an IODeviceMemory object for the I/O aperture. The IODeviceMemory is retained by the provider, so is valid while attached, or while any mappings to it exist. It should not be released by the caller. */ + + virtual IODeviceMemory * ioDeviceMemory( void ); + + /* I/O space accessors */ + +/*! @function ioWrite32 + @abstract Writes a 32-bit value to an I/O space aperture. + @discussion This method will write a 32-bit value to a 4 byte aligned offset in an I/O space aperture. If a map object is passed in, the value is written relative to it, otherwise to the value is written relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC. + @param offset An offset into a bus or device's I/O space aperture. + @param value The value to be written in host byte order (big endian on PPC). + @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space. */ + + virtual void ioWrite32( UInt16 offset, UInt32 value, + IOMemoryMap * map = 0 ); + +/*! @function ioWrite16 + @abstract Writes a 16-bit value to an I/O space aperture. + @discussion This method will write a 16-bit value to a 2 byte aligned offset in an I/O space aperture. If a map object is passed in, the value is written relative to it, otherwise to the value is written relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC. + @param offset An offset into a bus or device's I/O space aperture. + @param value The value to be written in host byte order (big endian on PPC). + @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space. */ + + virtual void ioWrite16( UInt16 offset, UInt16 value, + IOMemoryMap * map = 0 ); + +/*! @function ioWrite8 + @abstract Writes a 8-bit value to an I/O space aperture. + @discussion This method will write a 8-bit value to an offset in an I/O space aperture. If a map object is passed in, the value is written relative to it, otherwise to the value is written relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC. + @param offset An offset into a bus or device's I/O space aperture. + @param value The value to be written in host byte order (big endian on PPC). + @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space. */ + + virtual void ioWrite8( UInt16 offset, UInt8 value, + IOMemoryMap * map = 0 ); + +/*! @function ioRead32 + @abstract Reads a 32-bit value from an I/O space aperture. + @discussion This method will read a 32-bit value from a 4 byte aligned offset in an I/O space aperture. If a map object is passed in, the value is read relative to it, otherwise to the value is read relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC. + @param offset An offset into a bus or device's I/O space aperture. + @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space. + @result The value read in host byte order (big endian on PPC). */ + + virtual UInt32 ioRead32( UInt16 offset, IOMemoryMap * map = 0 ); + +/*! @function ioRead16 + @abstract Reads a 16-bit value from an I/O space aperture. + @discussion This method will read a 16-bit value from a 2 byte aligned offset in an I/O space aperture. If a map object is passed in, the value is read relative to it, otherwise to the value is read relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC. + @param offset An offset into a bus or device's I/O space aperture. + @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space. + @result The value read in host byte order (big endian on PPC). */ + + virtual UInt16 ioRead16( UInt16 offset, IOMemoryMap * map = 0 ); + +/*! @function ioRead8 + @abstract Reads a 8-bit value from an I/O space aperture. + @discussion This method will read a 8-bit value from an offset in an I/O space aperture. If a map object is passed in, the value is read relative to it, otherwise to the value is read relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC. + @param offset An offset into a bus or device's I/O space aperture. + @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space. + @result The value read. */ + + virtual UInt8 ioRead8( UInt16 offset, IOMemoryMap * map = 0 ); + + OSMetaClassDeclareReservedUsed(IOPCIDevice, 0); +/*! @function hasPCIPowerManagement + @abstract determine whether or not the device supports PCI Bus Power Management. + @discussion This method will look at the device's capabilties registers and determine whether or not the device supports the PCI BUS Power Management Specification. + @param state(optional) Check for support of a specific state (e.g. kPCIPMCPMESupportFromD3Cold). If state is not suuplied or is 0, then check for a property in the registry which tells which state the hardware expects the device to go to during sleep. + @result true if the specified state is supported */ + virtual bool hasPCIPowerManagement(IOOptionBits state = 0); + + OSMetaClassDeclareReservedUsed(IOPCIDevice, 1); +/*! @function enablePCIPowerManagement + @abstract enable PCI power management for sleep state + @discussion This method will enable PCI Bus Powermanagement when going to sleep mode. + @param state(optional) Enables PCI Power Management by placing the function in the given state (e.g. kPCIPMCSPowerStateD3). If state is not specified or is 0xffffffff, then the IOPCIDevice determines the desired state. If state is kPCIPMCSPowerStateD0 (0) then PCI Power Management is disabled. + @result kIOReturnSuccess if there were no errors */ + virtual IOReturn enablePCIPowerManagement(IOOptionBits state = 0xffffffff); + + OSMetaClassDeclareReservedUsed(IOPCIDevice, 2); +/*! @function extendedFindPCICapability + @abstract Search configuration space for a PCI capability register. + @discussion This method searches the device's config space for a PCI capability register matching the passed capability ID, if the device supports PCI capabilities. + @param capabilityID A PCI capability ID. PCI Express devices may support extended capabilities in config space starting at offset 0x100. To search this space, the ID passed should be the negated value of the PCI-SIG assigned ID for the extended capability. + @param offset An optional in/out parameter to return the offset into config space where the capability was found, and to set the start point of the next search. Initialize the offset to zero before the first call to extendedFindPCICapability() and subsequent calls will find all capabilty blocks that may exist on the device with the same ID. + @result The 32-bit value of the capability register if one was found, zero otherwise. */ + + virtual UInt32 extendedFindPCICapability( UInt32 capabilityID, IOByteCount * offset = 0 ); + + // Unused Padding + OSMetaClassDeclareReservedUnused(IOPCIDevice, 3); + OSMetaClassDeclareReservedUnused(IOPCIDevice, 4); + OSMetaClassDeclareReservedUnused(IOPCIDevice, 5); + OSMetaClassDeclareReservedUnused(IOPCIDevice, 6); + OSMetaClassDeclareReservedUnused(IOPCIDevice, 7); + OSMetaClassDeclareReservedUnused(IOPCIDevice, 8); + OSMetaClassDeclareReservedUnused(IOPCIDevice, 9); + OSMetaClassDeclareReservedUnused(IOPCIDevice, 10); + OSMetaClassDeclareReservedUnused(IOPCIDevice, 11); + OSMetaClassDeclareReservedUnused(IOPCIDevice, 12); + OSMetaClassDeclareReservedUnused(IOPCIDevice, 13); + OSMetaClassDeclareReservedUnused(IOPCIDevice, 14); + OSMetaClassDeclareReservedUnused(IOPCIDevice, 15); + +public: + +/*! @function extendedConfigRead32 + @abstract Reads a 32-bit value from the PCI device's configuration space. + @discussion This method reads a 32-bit configuration space register on the device and returns its value. + @param offset A byte offset into configuration space, of which bits 0-1 are ignored. + @result An 32-bit value in host byte order (big endian on PPC). */ + + UInt32 extendedConfigRead32( IOByteCount offset ); + +/*! @function extendedConfigRead16 + @abstract Reads a 16-bit value from the PCI device's configuration space. + @discussion This method reads a 16-bit configuration space register on the device and returns its value. + @param offset A byte offset into configuration space, of which bit 0 is ignored. + @result An 16-bit value in host byte order (big endian on PPC). */ + + UInt16 extendedConfigRead16( IOByteCount offset ); + +/*! @function extendedConfigRead8 + @abstract Reads a 8-bit value from the PCI device's configuration space. + @discussion This method reads a 8-bit configuration space register on the device and returns its value. + @param offset A byte offset into configuration space. + @result An 8-bit value. */ + + UInt8 extendedConfigRead8( IOByteCount offset ); + +/*! @function extendedConfigWrite32 + @abstract Writes a 32-bit value to the PCI device's configuration space. + @discussion This method writes a 32-bit value to a configuration space register on the device. + @param offset A byte offset into configuration space, of which bits 0-1 are ignored. + @param data An 32-bit value to be written in host byte order (big endian on PPC). */ + + void extendedConfigWrite32( IOByteCount offset, UInt32 data ); + +/*! @function extendedConfigWrite16 + @abstract Writes a 16-bit value to the PCI device's configuration space. + @discussion This method writes a 16-bit value to a configuration space register on the device. + @param offset A byte offset into configuration space, of which bit 0 is ignored. + @param data An 16-bit value to be written in host byte order (big endian on PPC). */ + + void extendedConfigWrite16( IOByteCount offset, UInt16 data ); + +/*! @function extendedConfigWrite8 + @abstract Writes a 8-bit value to the PCI device's configuration space. + @discussion This method writes a 8-bit value to a configuration space register on the device. + @param offset A byte offset into configuration space. + @param data An 8-bit value to be written. */ + + void extendedConfigWrite8( IOByteCount offset, UInt8 data ); +}; + +#endif /* ! _IOKIT_IOPCIDEVICE_H */ + diff --git a/i386/include/IOKit/platform/.svn/all-wcprops b/i386/include/IOKit/platform/.svn/all-wcprops new file mode 100644 index 0000000..895fe9d --- /dev/null +++ b/i386/include/IOKit/platform/.svn/all-wcprops @@ -0,0 +1,29 @@ +K 25 +svn:wc:ra_dav:version-url +V 61 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/platform +END +AppleMacIO.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/platform/AppleMacIO.h +END +AppleMacIODevice.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/platform/AppleMacIODevice.h +END +ApplePlatformExpert.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/platform/ApplePlatformExpert.h +END +AppleNMI.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/platform/AppleNMI.h +END diff --git a/i386/include/IOKit/platform/.svn/entries b/i386/include/IOKit/platform/.svn/entries new file mode 100644 index 0000000..51b93d8 --- /dev/null +++ b/i386/include/IOKit/platform/.svn/entries @@ -0,0 +1,164 @@ +10 + +dir +2117 +http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/platform +http://forge.voodooprojects.org/svn/chameleon + + + +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + +b5af796a-00a8-11df-919b-ffff7a100b7d + +AppleMacIO.h +file + + + + +2012-10-03T17:50:20.000000Z +e9614e104fdb0969eeaab8f5878c15db +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +2553 + +AppleMacIODevice.h +file + + + + +2012-10-03T17:50:20.000000Z +da33d4bcb4363ccb7d832f9b7019b3c9 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +2153 + +ApplePlatformExpert.h +file + + + + +2012-10-03T17:50:20.000000Z +227f5a69a8d7c83855c4dff7a0bdd68f +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +2744 + +AppleNMI.h +file + + + + +2012-10-03T17:50:20.000000Z +65ddf2ae2939f64b26b164cf5301970c +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +2542 + diff --git a/i386/include/IOKit/platform/.svn/text-base/AppleMacIO.h.svn-base b/i386/include/IOKit/platform/.svn/text-base/AppleMacIO.h.svn-base new file mode 100644 index 0000000..ae12eca --- /dev/null +++ b/i386/include/IOKit/platform/.svn/text-base/AppleMacIO.h.svn-base @@ -0,0 +1,79 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_APPLEMACIO_H +#define _IOKIT_APPLEMACIO_H + +#include + +#include + +class AppleMacIO : public IOService +{ + OSDeclareAbstractStructors(AppleMacIO); + + IOService * fNub; + IOMemoryMap * fMemory; + + struct ExpansionData { }; + ExpansionData *fReserved; + +protected: + virtual bool selfTest( void ); + +public: + virtual bool start( IOService * provider ); + + virtual IOService * createNub( IORegistryEntry * from ); + + virtual void processNub( IOService * nub ); + + virtual void publishBelow( IORegistryEntry * root ); + + virtual const char * deleteList( void ); + virtual const char * excludeList( void ); + + virtual bool compareNubName( const IOService * nub, OSString * name, + OSString ** matched = 0 ) const; + + virtual IOReturn getNubResources( IOService * nub ); + + OSMetaClassDeclareReservedUnused(AppleMacIO, 0); + OSMetaClassDeclareReservedUnused(AppleMacIO, 1); + OSMetaClassDeclareReservedUnused(AppleMacIO, 2); + OSMetaClassDeclareReservedUnused(AppleMacIO, 3); +}; + +#endif /* ! _IOKIT_APPLEMACIO_H */ diff --git a/i386/include/IOKit/platform/.svn/text-base/AppleMacIODevice.h.svn-base b/i386/include/IOKit/platform/.svn/text-base/AppleMacIODevice.h.svn-base new file mode 100644 index 0000000..8d033fd --- /dev/null +++ b/i386/include/IOKit/platform/.svn/text-base/AppleMacIODevice.h.svn-base @@ -0,0 +1,60 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_APPLEMACIODEVICE_H +#define _IOKIT_APPLEMACIODEVICE_H + +#include + +class AppleMacIODevice : public IOService +{ + OSDeclareDefaultStructors(AppleMacIODevice); + +private: + struct ExpansionData { }; + ExpansionData *reserved; + +public: + virtual bool compareName( OSString * name, OSString ** matched = 0 ) const; + virtual IOService *matchLocation(IOService *client); + virtual IOReturn getResources( void ); + + OSMetaClassDeclareReservedUnused(AppleMacIODevice, 0); + OSMetaClassDeclareReservedUnused(AppleMacIODevice, 1); + OSMetaClassDeclareReservedUnused(AppleMacIODevice, 2); + OSMetaClassDeclareReservedUnused(AppleMacIODevice, 3); +}; + +#endif /* ! _IOKIT_APPLEMACIODEVICE_H */ diff --git a/i386/include/IOKit/platform/.svn/text-base/AppleNMI.h.svn-base b/i386/include/IOKit/platform/.svn/text-base/AppleNMI.h.svn-base new file mode 100644 index 0000000..14cd1ed --- /dev/null +++ b/i386/include/IOKit/platform/.svn/text-base/AppleNMI.h.svn-base @@ -0,0 +1,76 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998-9 Apple Computer, Inc. All rights reserved. + * + * DRI: Josh de Cesare + * + */ + +#ifndef _IOKIT_APPLENMI_H +#define _IOKIT_APPLENMI_H + +#include +#include + +// NMI Interrupt Constants +enum +{ + kExtInt9_NMIIntSource = 0x800506E0, + kNMIIntLevelMask = 0x00004000, + kNMIIntMask = 0x00000080 +}; + + +class AppleNMI : public IOService +{ + OSDeclareDefaultStructors(AppleNMI); + +private: + bool enable_debugger; + bool mask_NMI; + + struct ExpansionData { }; + ExpansionData * reserved; // Reserved for future use + +public: + IOService *rootDomain; + virtual bool start(IOService *provider); + virtual IOReturn initNMI(IOInterruptController *parentController, OSData *parentSource); + virtual IOReturn handleInterrupt(void *refCon, IOService *nub, int source); + + // Power handling methods: + virtual IOReturn powerStateWillChangeTo(IOPMPowerFlags, unsigned long, IOService*); + + OSMetaClassDeclareReservedUnused(AppleNMI, 0); + OSMetaClassDeclareReservedUnused(AppleNMI, 1); + OSMetaClassDeclareReservedUnused(AppleNMI, 2); + OSMetaClassDeclareReservedUnused(AppleNMI, 3); +}; + +#endif /* ! _IOKIT_APPLENMI_H */ diff --git a/i386/include/IOKit/platform/.svn/text-base/ApplePlatformExpert.h.svn-base b/i386/include/IOKit/platform/.svn/text-base/ApplePlatformExpert.h.svn-base new file mode 100644 index 0000000..59728d2 --- /dev/null +++ b/i386/include/IOKit/platform/.svn/text-base/ApplePlatformExpert.h.svn-base @@ -0,0 +1,91 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_APPLEPLATFORM_H +#define _IOKIT_APPLEPLATFORM_H + +#include + +enum { + kBootROMTypeOldWorld = 0, + kBootROMTypeNewWorld +}; + +enum { + kChipSetTypePowerSurge = 0, + kChipSetTypePowerStar, + kChipSetTypeGossamer, + kChipSetTypePowerExpress, + kChipSetTypeCore99, + kChipSetTypeCore2001 +}; + +enum { + kMachineTypeUnknown = 0 +}; + +extern const OSSymbol *gGetDefaultBusSpeedsKey; + +class ApplePlatformExpert : public IODTPlatformExpert +{ + OSDeclareAbstractStructors(ApplePlatformExpert); + +private: + SInt32 _timeToGMT; + + struct ExpansionData { }; + ExpansionData *reserved; + +public: + virtual bool start( IOService * provider ); + virtual bool configure( IOService * provider ); + virtual const char * deleteList( void ); + virtual const char * excludeList( void ); + + virtual void registerNVRAMController( IONVRAMController * nvram ); + + virtual long getGMTTimeOfDay(void); + virtual void setGMTTimeOfDay(long secs); + + virtual bool getMachineName(char *name, int maxLength); + + OSMetaClassDeclareReservedUnused(ApplePlatformExpert, 0); + OSMetaClassDeclareReservedUnused(ApplePlatformExpert, 1); + OSMetaClassDeclareReservedUnused(ApplePlatformExpert, 2); + OSMetaClassDeclareReservedUnused(ApplePlatformExpert, 3); +}; + + +#endif /* ! _IOKIT_APPLEPLATFORM_H */ diff --git a/i386/include/IOKit/platform/AppleMacIO.h b/i386/include/IOKit/platform/AppleMacIO.h new file mode 100644 index 0000000..ae12eca --- /dev/null +++ b/i386/include/IOKit/platform/AppleMacIO.h @@ -0,0 +1,79 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_APPLEMACIO_H +#define _IOKIT_APPLEMACIO_H + +#include + +#include + +class AppleMacIO : public IOService +{ + OSDeclareAbstractStructors(AppleMacIO); + + IOService * fNub; + IOMemoryMap * fMemory; + + struct ExpansionData { }; + ExpansionData *fReserved; + +protected: + virtual bool selfTest( void ); + +public: + virtual bool start( IOService * provider ); + + virtual IOService * createNub( IORegistryEntry * from ); + + virtual void processNub( IOService * nub ); + + virtual void publishBelow( IORegistryEntry * root ); + + virtual const char * deleteList( void ); + virtual const char * excludeList( void ); + + virtual bool compareNubName( const IOService * nub, OSString * name, + OSString ** matched = 0 ) const; + + virtual IOReturn getNubResources( IOService * nub ); + + OSMetaClassDeclareReservedUnused(AppleMacIO, 0); + OSMetaClassDeclareReservedUnused(AppleMacIO, 1); + OSMetaClassDeclareReservedUnused(AppleMacIO, 2); + OSMetaClassDeclareReservedUnused(AppleMacIO, 3); +}; + +#endif /* ! _IOKIT_APPLEMACIO_H */ diff --git a/i386/include/IOKit/platform/AppleMacIODevice.h b/i386/include/IOKit/platform/AppleMacIODevice.h new file mode 100644 index 0000000..8d033fd --- /dev/null +++ b/i386/include/IOKit/platform/AppleMacIODevice.h @@ -0,0 +1,60 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_APPLEMACIODEVICE_H +#define _IOKIT_APPLEMACIODEVICE_H + +#include + +class AppleMacIODevice : public IOService +{ + OSDeclareDefaultStructors(AppleMacIODevice); + +private: + struct ExpansionData { }; + ExpansionData *reserved; + +public: + virtual bool compareName( OSString * name, OSString ** matched = 0 ) const; + virtual IOService *matchLocation(IOService *client); + virtual IOReturn getResources( void ); + + OSMetaClassDeclareReservedUnused(AppleMacIODevice, 0); + OSMetaClassDeclareReservedUnused(AppleMacIODevice, 1); + OSMetaClassDeclareReservedUnused(AppleMacIODevice, 2); + OSMetaClassDeclareReservedUnused(AppleMacIODevice, 3); +}; + +#endif /* ! _IOKIT_APPLEMACIODEVICE_H */ diff --git a/i386/include/IOKit/platform/AppleNMI.h b/i386/include/IOKit/platform/AppleNMI.h new file mode 100644 index 0000000..14cd1ed --- /dev/null +++ b/i386/include/IOKit/platform/AppleNMI.h @@ -0,0 +1,76 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998-9 Apple Computer, Inc. All rights reserved. + * + * DRI: Josh de Cesare + * + */ + +#ifndef _IOKIT_APPLENMI_H +#define _IOKIT_APPLENMI_H + +#include +#include + +// NMI Interrupt Constants +enum +{ + kExtInt9_NMIIntSource = 0x800506E0, + kNMIIntLevelMask = 0x00004000, + kNMIIntMask = 0x00000080 +}; + + +class AppleNMI : public IOService +{ + OSDeclareDefaultStructors(AppleNMI); + +private: + bool enable_debugger; + bool mask_NMI; + + struct ExpansionData { }; + ExpansionData * reserved; // Reserved for future use + +public: + IOService *rootDomain; + virtual bool start(IOService *provider); + virtual IOReturn initNMI(IOInterruptController *parentController, OSData *parentSource); + virtual IOReturn handleInterrupt(void *refCon, IOService *nub, int source); + + // Power handling methods: + virtual IOReturn powerStateWillChangeTo(IOPMPowerFlags, unsigned long, IOService*); + + OSMetaClassDeclareReservedUnused(AppleNMI, 0); + OSMetaClassDeclareReservedUnused(AppleNMI, 1); + OSMetaClassDeclareReservedUnused(AppleNMI, 2); + OSMetaClassDeclareReservedUnused(AppleNMI, 3); +}; + +#endif /* ! _IOKIT_APPLENMI_H */ diff --git a/i386/include/IOKit/platform/ApplePlatformExpert.h b/i386/include/IOKit/platform/ApplePlatformExpert.h new file mode 100644 index 0000000..59728d2 --- /dev/null +++ b/i386/include/IOKit/platform/ApplePlatformExpert.h @@ -0,0 +1,91 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_APPLEPLATFORM_H +#define _IOKIT_APPLEPLATFORM_H + +#include + +enum { + kBootROMTypeOldWorld = 0, + kBootROMTypeNewWorld +}; + +enum { + kChipSetTypePowerSurge = 0, + kChipSetTypePowerStar, + kChipSetTypeGossamer, + kChipSetTypePowerExpress, + kChipSetTypeCore99, + kChipSetTypeCore2001 +}; + +enum { + kMachineTypeUnknown = 0 +}; + +extern const OSSymbol *gGetDefaultBusSpeedsKey; + +class ApplePlatformExpert : public IODTPlatformExpert +{ + OSDeclareAbstractStructors(ApplePlatformExpert); + +private: + SInt32 _timeToGMT; + + struct ExpansionData { }; + ExpansionData *reserved; + +public: + virtual bool start( IOService * provider ); + virtual bool configure( IOService * provider ); + virtual const char * deleteList( void ); + virtual const char * excludeList( void ); + + virtual void registerNVRAMController( IONVRAMController * nvram ); + + virtual long getGMTTimeOfDay(void); + virtual void setGMTTimeOfDay(long secs); + + virtual bool getMachineName(char *name, int maxLength); + + OSMetaClassDeclareReservedUnused(ApplePlatformExpert, 0); + OSMetaClassDeclareReservedUnused(ApplePlatformExpert, 1); + OSMetaClassDeclareReservedUnused(ApplePlatformExpert, 2); + OSMetaClassDeclareReservedUnused(ApplePlatformExpert, 3); +}; + + +#endif /* ! _IOKIT_APPLEPLATFORM_H */ diff --git a/i386/include/IOKit/power/.svn/all-wcprops b/i386/include/IOKit/power/.svn/all-wcprops new file mode 100644 index 0000000..3d3be10 --- /dev/null +++ b/i386/include/IOKit/power/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/power +END +IOPwrController.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/power/IOPwrController.h +END diff --git a/i386/include/IOKit/power/.svn/entries b/i386/include/IOKit/power/.svn/entries new file mode 100644 index 0000000..3875525 --- /dev/null +++ b/i386/include/IOKit/power/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +2117 +http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/power +http://forge.voodooprojects.org/svn/chameleon + + + +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + +b5af796a-00a8-11df-919b-ffff7a100b7d + +IOPwrController.h +file + + + + +2012-10-03T17:50:20.000000Z +9c95987a30b51b9e00dd6f7400e645fb +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +1513 + diff --git a/i386/include/IOKit/power/.svn/text-base/IOPwrController.h.svn-base b/i386/include/IOKit/power/.svn/text-base/IOPwrController.h.svn-base new file mode 100644 index 0000000..709a0fb --- /dev/null +++ b/i386/include/IOKit/power/.svn/text-base/IOPwrController.h.svn-base @@ -0,0 +1,41 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * 24 Nov 1998 suurballe Created. + */ + +#include + +class IOPwrController: public IOService +{ +OSDeclareAbstractStructors(IOPwrController) + +public: + +}; + diff --git a/i386/include/IOKit/power/IOPwrController.h b/i386/include/IOKit/power/IOPwrController.h new file mode 100644 index 0000000..709a0fb --- /dev/null +++ b/i386/include/IOKit/power/IOPwrController.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * 24 Nov 1998 suurballe Created. + */ + +#include + +class IOPwrController: public IOService +{ +OSDeclareAbstractStructors(IOPwrController) + +public: + +}; + diff --git a/i386/include/IOKit/ppc/.svn/all-wcprops b/i386/include/IOKit/ppc/.svn/all-wcprops new file mode 100644 index 0000000..419eea0 --- /dev/null +++ b/i386/include/IOKit/ppc/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 56 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/ppc +END +IODBDMA.h +K 25 +svn:wc:ra_dav:version-url +V 66 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/ppc/IODBDMA.h +END diff --git a/i386/include/IOKit/ppc/.svn/entries b/i386/include/IOKit/ppc/.svn/entries new file mode 100644 index 0000000..c49eb0a --- /dev/null +++ b/i386/include/IOKit/ppc/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +2117 +http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/ppc +http://forge.voodooprojects.org/svn/chameleon + + + +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + +b5af796a-00a8-11df-919b-ffff7a100b7d + +IODBDMA.h +file + + + + +2012-10-03T17:50:20.000000Z +15a4a0c26bd1a9295d2de0f0544051f1 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +12529 + diff --git a/i386/include/IOKit/ppc/.svn/text-base/IODBDMA.h.svn-base b/i386/include/IOKit/ppc/.svn/text-base/IODBDMA.h.svn-base new file mode 100644 index 0000000..afe1337 --- /dev/null +++ b/i386/include/IOKit/ppc/.svn/text-base/IODBDMA.h.svn-base @@ -0,0 +1,367 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1997 Apple Computer, Inc. + * + * + * HISTORY + * + * Simon Douglas 10 Nov 97 + * - first checked in, mostly from MacOS DBDMA.i, machdep/ppc/dbdma.h + * but use byte reverse ops. + */ + +#ifndef _IODBDMA_H_ +#define _IODBDMA_H_ + +#include +#include + + +/* DBDMA definitions */ + +struct IODBDMAChannelRegisters { + volatile unsigned long channelControl; + volatile unsigned long channelStatus; + volatile unsigned long commandPtrHi; /* implementation optional*/ + volatile unsigned long commandPtrLo; + volatile unsigned long interruptSelect; /* implementation optional*/ + volatile unsigned long branchSelect; /* implementation optional*/ + volatile unsigned long waitSelect; /* implementation optional*/ + volatile unsigned long transferModes; /* implementation optional*/ + volatile unsigned long data2PtrHi; /* implementation optional*/ + volatile unsigned long data2PtrLo; /* implementation optional*/ + + volatile unsigned long reserved1; + volatile unsigned long addressHi; /* implementation optional*/ + volatile unsigned long reserved2[4]; + volatile unsigned long unimplemented[16]; + +/* This structure must remain fully padded to 256 bytes.*/ + volatile unsigned long undefined[32]; +}; +typedef struct IODBDMAChannelRegisters IODBDMAChannelRegisters; + +/* These constants define the DB-DMA channel control words and status flags.*/ + +enum { + kdbdmaRun = 0x00008000, + kdbdmaPause = 0x00004000, + kdbdmaFlush = 0x00002000, + kdbdmaWake = 0x00001000, + kdbdmaDead = 0x00000800, + kdbdmaActive = 0x00000400, + kdbdmaBt = 0x00000100, + kdbdmaS7 = 0x00000080, + kdbdmaS6 = 0x00000040, + kdbdmaS5 = 0x00000020, + kdbdmaS4 = 0x00000010, + kdbdmaS3 = 0x00000008, + kdbdmaS2 = 0x00000004, + kdbdmaS1 = 0x00000002, + kdbdmaS0 = 0x00000001 +}; + + +#define IOSetDBDMAChannelControlBits(mask) ( ((mask) | (mask) << 16) ) +#define IOClearDBDMAChannelControlBits(mask) ( (mask) << 16) + + +/* This structure defines the DB-DMA channel command descriptor.*/ + +/* + *** WARNING: Endian-ness issues must be considered when performing load/store! *** +*/ + +struct IODBDMADescriptor { + unsigned long operation; /* cmd || key || i || b || w || reqCount*/ + unsigned long address; + volatile unsigned long cmdDep; + volatile unsigned long result; /* xferStatus || resCount*/ +}; +typedef struct IODBDMADescriptor IODBDMADescriptor; + +/* These constants define the DB-DMA channel command operations and modifiers.*/ + + +enum { +/* Command.cmd operations*/ + kdbdmaOutputMore = 0, + kdbdmaOutputLast = 1, + kdbdmaInputMore = 2, + kdbdmaInputLast = 3, + kdbdmaStoreQuad = 4, + kdbdmaLoadQuad = 5, + kdbdmaNop = 6, + kdbdmaStop = 7 +}; + + +enum { +/* Command.key modifiers (choose one for INPUT, OUTPUT, LOAD, and STORE)*/ + kdbdmaKeyStream0 = 0, /* default modifier*/ + kdbdmaKeyStream1 = 1, + kdbdmaKeyStream2 = 2, + kdbdmaKeyStream3 = 3, + kdbdmaKeyRegs = 5, + kdbdmaKeySystem = 6, + kdbdmaKeyDevice = 7, + + kdbdmaIntNever = 0, /* default modifier*/ + kdbdmaIntIfTrue = 1, + kdbdmaIntIfFalse = 2, + kdbdmaIntAlways = 3, + + kdbdmaBranchNever = 0, /* default modifier*/ + kdbdmaBranchIfTrue = 1, + kdbdmaBranchIfFalse = 2, + kdbdmaBranchAlways = 3, + + kdbdmaWaitNever = 0, /* default modifier*/ + kdbdmaWaitIfTrue = 1, + kdbdmaWaitIfFalse = 2, + kdbdmaWaitAlways = 3, + + kdbdmaCommandMask = (long)0xFFFF0000, + kdbdmaReqCountMask = 0x0000FFFF +}; + + +/* These constants define the DB-DMA channel command results.*/ + +enum { + /* result masks*/ + kdbdmaStatusRun = kdbdmaRun << 16, + kdbdmaStatusPause = kdbdmaPause << 16, + kdbdmaStatusFlush = kdbdmaFlush << 16, + kdbdmaStatusWake = kdbdmaWake << 16, + kdbdmaStatusDead = kdbdmaDead << 16, + kdbdmaStatusActive = kdbdmaActive << 16, + kdbdmaStatusBt = kdbdmaBt << 16, + kdbdmaStatusS7 = kdbdmaS7 << 16, + kdbdmaStatusS6 = kdbdmaS6 << 16, + kdbdmaStatusS5 = kdbdmaS5 << 16, + kdbdmaStatusS4 = kdbdmaS4 << 16, + kdbdmaStatusS3 = kdbdmaS3 << 16, + kdbdmaStatusS2 = kdbdmaS2 << 16, + kdbdmaStatusS1 = kdbdmaS1 << 16, + kdbdmaStatusS0 = kdbdmaS0 << 16, + kdbdmaResCountMask = 0x0000FFFF, + kdbdmaXferStatusMask = 0xFFFF0000 +}; + + +/* These macros are are IODBDMAChannelRegisters accessor functions. */ + +#define IOSetDBDMAChannelRegister(registerSetPtr,field,value) \ +OSWriteSwapInt32(registerSetPtr,offsetof(IODBDMAChannelRegisters,field),value) + +#define IOGetDBDMAChannelRegister(registerSetPtr, field) \ +OSReadSwapInt32(registerSetPtr,offsetof(IODBDMAChannelRegisters, field)) + + +/* void IOSetDBDMAChannelControl (IODBDMAChannelRegisters *registerSetPtr, unsigned long ctlValue); */ + +#define IOSetDBDMAChannelControl(registerSetPtr,ctlValue) \ +do { \ + eieio(); \ + IOSetDBDMAChannelRegister(registerSetPtr,channelControl,ctlValue); \ + eieio(); \ +} while(0) + +/* unsigned long IOGetDBDMAChannelStatus (IODBDMAChannelRegisters *registerSetPtr); */ + +#define IOGetDBDMAChannelStatus(registerSetPtr) \ + IOGetDBDMAChannelRegister(registerSetPtr,channelStatus) + +/* unsigned long IOGetDBDMACommandPtr (IODBDMAChannelRegisters *registerSetPtr); */ + +#define IOGetDBDMACommandPtr(registerSetPtr) \ + IOGetDBDMAChannelRegister(registerSetPtr,commandPtrLo) + +/* void IOSetDBDMACommandPtr (IODBDMAChannelRegisters *registerSetPtr, unsigned long cclPtr); */ + +#define IOSetDBDMACommandPtr(registerSetPtr,cclPtr) \ +do { \ + IOSetDBDMAChannelRegister(registerSetPtr,commandPtrHi,0); \ + eieio(); \ + IOSetDBDMAChannelRegister(registerSetPtr,commandPtrLo,cclPtr); \ + eieio(); \ +} while(0) + + +/* unsigned long IOGetDBDMAInterruptSelect (IODBDMAChannelRegisters *registerSetPtr); */ + +#define IOGetDBDMAInterruptSelect(registerSetPtr) \ + IOGetDBDMAChannelRegister(registerSetPtr,interruptSelect) + +/* void IOSetDBDMAInterruptSelect (IODBDMAChannelRegisters *registerSetPtr, unsigned long intSelValue); */ + +#define IOSetDBDMAInterruptSelect(registerSetPtr,intSelValue) \ +do { \ + IOSetDBDMAChannelRegister(registerSetPtr,interruptSelect,intSelValue); \ + eieio(); \ +} while(0) + +/* unsigned long IOGetDBDMABranchSelect (IODBDMAChannelRegisters *registerSetPtr); */ + +#define IOGetDBDMABranchSelect(registerSetPtr) \ + IOGetDBDMAChannelRegister(registerSetPtr,branchSelect) + +/* void IOSetDBDMABranchSelect (IODBDMAChannelRegisters *registerSetPtr, unsigned long braSelValue); */ + +#define IOSetDBDMABranchSelect(registerSetPtr,braSelValue) \ +do { \ + IOSetDBDMAChannelRegister(registerSetPtr,branchSelect,braSelValue); \ + eieio(); \ +} while(0) + +/* unsigned long IOGetDBDMAWaitSelect (IODBDMAChannelRegisters *registerSetPtr); */ + +#define IOGetDBDMAWaitSelect(registerSetPtr) \ + IOGetDBDMAChannelRegister(registerSetPtr,waitSelect) + +/* void IOSetDBDMAWaitSelect (IODBDMAChannelRegisters *registerSetPtr, unsigned long waitSelValue); */ + +#define IOSetDBDMAWaitSelect(registerSetPtr,waitSelValue) \ +do { \ + IOSetDBDMAChannelRegister(registerSetPtr,waitSelect,waitSelValue); \ + eieio(); \ +} while(0) + + +/* These macros are IODBDMADescriptor accessor functions. */ + +#define IOSetDBDMADescriptor(descPtr,field,value) \ +OSWriteSwapInt32( descPtr, offsetof( IODBDMADescriptor, field), value) + +#define IOGetDBDMADescriptor(descPtr,field) \ +OSReadSwapInt32( descPtr, offsetof( IODBDMADescriptor, field)) + +#define IOMakeDBDMAOperation(cmd,key,interrupt,branch,wait,count) \ + ( ((cmd) << 28) | ((key) << 24) | ((interrupt) << 20) \ + | ((branch) << 18) | ( (wait) << 16) | (count) ) + +/* void IOMakeDBDMADescriptor (IODBDMADescriptor *descPtr, + unsigned long cmd, + unsigned long key, + unsigned long interrupt, + unsigned long branch, + unsigned long wait, + unsigned long count, + unsigned long addr); */ + +#define IOMakeDBDMADescriptor(descPtr,cmd,key,interrupt,branch,wait,count,addr)\ +do { \ + IOSetDBDMADescriptor(descPtr, address, addr); \ + IOSetDBDMADescriptor(descPtr, cmdDep, 0); \ + IOSetDBDMADescriptor(descPtr, result, 0); \ + eieio(); \ + IOSetDBDMADescriptor(descPtr, operation, \ + IOMakeDBDMAOperation(cmd,key,interrupt,branch,wait,count)); \ + eieio(); \ +} while(0) + +/* void IOMakeDBDMADescriptorDep (IODBDMADescriptor *descPtr, + unsigned long cmd, + unsigned long key, + unsigned long interrupt, + unsigned long branch, + unsigned long wait, + unsigned long count, + unsigned long addr, + unsigned long dep); */ + +#define IOMakeDBDMADescriptorDep(descPtr,cmd,key,interrupt,branch,wait,count,addr,dep) \ +do { \ + IOSetDBDMADescriptor(descPtr, address, addr); \ + IOSetDBDMADescriptor(descPtr, cmdDep, dep); \ + IOSetDBDMADescriptor(descPtr, result, 0); \ + eieio(); \ + IOSetDBDMADescriptor(descPtr, operation, \ + IOMakeDBDMAOperation(cmd, key, interrupt, branch, wait, count)); \ + eieio(); \ +} while(0) + +/* Field accessors - NOTE: unsynchronized */ + +/* unsigned long IOGetDBDMAOperation (IODBDMADescriptor *descPtr) */ + +#define IOGetCCOperation(descPtr) \ + IOGetDBDMADescriptor(descPtr,operation) + +/* void IOSetCCOperation (IODBDMADescriptor *descPtr, unsigned long operationValue) */ + +#define IOSetCCOperation(descPtr,operationValue) \ + IOSetDBDMADescriptor(descPtr,operation,operationValue) + +/* unsigned long IOGetCCAddress (IODBDMADescriptor *descPtr) */ + +#define IOGetCCAddress(descPtr) \ + IOGetDBDMADescriptor(descPtr,address) + +/* void IOSetCCAddress (IODBDMADescriptor *descPtr, unsigned long addressValue) */ + +#define IOSetCCAddress(descPtr,addressValue) \ + IOSetDBDMADescriptor(descPtr,address, addressValue) + +/* unsigned long IOGetCCCmdDep (IODBDMADescriptor *descPtr) */ + +#define IOGetCCCmdDep(descPtr) \ + IOGetDBDMADescriptor(descPtr,cmdDep) + +/* void IOSetCCCmdDep (IODBDMADescriptor *descPtr, unsigned long cmdDepValue) */ + +#define IOSetCCCmdDep(descPtr,cmdDepValue) \ + IOSetDBDMADescriptor(descPtr,cmdDep,cmdDepValue) + +/* unsigned long IOGetCCResult (IODBDMADescriptor *descPtr) */ + +#define IOGetCCResult(descPtr) \ + IOGetDBDMADescriptor(descPtr,result) + +/* void IOSetCCResult (IODBDMADescriptor *descPtr, unsigned long resultValue) */ + +#define IOSetCCResult(descPtr,resultValue) \ + IOSetDBDMADescriptor(descPtr,result,resultValue) + + +/* DBDMA routines */ + +extern void IODBDMAStart( volatile IODBDMAChannelRegisters *registerSetPtr, volatile IODBDMADescriptor *physicalDescPtr); +extern void IODBDMAStop( volatile IODBDMAChannelRegisters *registerSetPtr); +extern void IODBDMAFlush( volatile IODBDMAChannelRegisters *registerSetPtr); +extern void IODBDMAReset( volatile IODBDMAChannelRegisters *registerSetPtr); +extern void IODBDMAContinue( volatile IODBDMAChannelRegisters *registerSetPtr); +extern void IODBDMAPause( volatile IODBDMAChannelRegisters *registerSetPtr); + +extern IOReturn IOAllocatePhysicallyContiguousMemory( unsigned int size, unsigned int options, + IOVirtualAddress * logical, IOPhysicalAddress * physical ); +extern IOReturn IOFreePhysicallyContiguousMemory( IOVirtualAddress * logical, unsigned int size); + +#endif /* !defined(_IODBDMA_H_) */ diff --git a/i386/include/IOKit/ppc/IODBDMA.h b/i386/include/IOKit/ppc/IODBDMA.h new file mode 100644 index 0000000..afe1337 --- /dev/null +++ b/i386/include/IOKit/ppc/IODBDMA.h @@ -0,0 +1,367 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1997 Apple Computer, Inc. + * + * + * HISTORY + * + * Simon Douglas 10 Nov 97 + * - first checked in, mostly from MacOS DBDMA.i, machdep/ppc/dbdma.h + * but use byte reverse ops. + */ + +#ifndef _IODBDMA_H_ +#define _IODBDMA_H_ + +#include +#include + + +/* DBDMA definitions */ + +struct IODBDMAChannelRegisters { + volatile unsigned long channelControl; + volatile unsigned long channelStatus; + volatile unsigned long commandPtrHi; /* implementation optional*/ + volatile unsigned long commandPtrLo; + volatile unsigned long interruptSelect; /* implementation optional*/ + volatile unsigned long branchSelect; /* implementation optional*/ + volatile unsigned long waitSelect; /* implementation optional*/ + volatile unsigned long transferModes; /* implementation optional*/ + volatile unsigned long data2PtrHi; /* implementation optional*/ + volatile unsigned long data2PtrLo; /* implementation optional*/ + + volatile unsigned long reserved1; + volatile unsigned long addressHi; /* implementation optional*/ + volatile unsigned long reserved2[4]; + volatile unsigned long unimplemented[16]; + +/* This structure must remain fully padded to 256 bytes.*/ + volatile unsigned long undefined[32]; +}; +typedef struct IODBDMAChannelRegisters IODBDMAChannelRegisters; + +/* These constants define the DB-DMA channel control words and status flags.*/ + +enum { + kdbdmaRun = 0x00008000, + kdbdmaPause = 0x00004000, + kdbdmaFlush = 0x00002000, + kdbdmaWake = 0x00001000, + kdbdmaDead = 0x00000800, + kdbdmaActive = 0x00000400, + kdbdmaBt = 0x00000100, + kdbdmaS7 = 0x00000080, + kdbdmaS6 = 0x00000040, + kdbdmaS5 = 0x00000020, + kdbdmaS4 = 0x00000010, + kdbdmaS3 = 0x00000008, + kdbdmaS2 = 0x00000004, + kdbdmaS1 = 0x00000002, + kdbdmaS0 = 0x00000001 +}; + + +#define IOSetDBDMAChannelControlBits(mask) ( ((mask) | (mask) << 16) ) +#define IOClearDBDMAChannelControlBits(mask) ( (mask) << 16) + + +/* This structure defines the DB-DMA channel command descriptor.*/ + +/* + *** WARNING: Endian-ness issues must be considered when performing load/store! *** +*/ + +struct IODBDMADescriptor { + unsigned long operation; /* cmd || key || i || b || w || reqCount*/ + unsigned long address; + volatile unsigned long cmdDep; + volatile unsigned long result; /* xferStatus || resCount*/ +}; +typedef struct IODBDMADescriptor IODBDMADescriptor; + +/* These constants define the DB-DMA channel command operations and modifiers.*/ + + +enum { +/* Command.cmd operations*/ + kdbdmaOutputMore = 0, + kdbdmaOutputLast = 1, + kdbdmaInputMore = 2, + kdbdmaInputLast = 3, + kdbdmaStoreQuad = 4, + kdbdmaLoadQuad = 5, + kdbdmaNop = 6, + kdbdmaStop = 7 +}; + + +enum { +/* Command.key modifiers (choose one for INPUT, OUTPUT, LOAD, and STORE)*/ + kdbdmaKeyStream0 = 0, /* default modifier*/ + kdbdmaKeyStream1 = 1, + kdbdmaKeyStream2 = 2, + kdbdmaKeyStream3 = 3, + kdbdmaKeyRegs = 5, + kdbdmaKeySystem = 6, + kdbdmaKeyDevice = 7, + + kdbdmaIntNever = 0, /* default modifier*/ + kdbdmaIntIfTrue = 1, + kdbdmaIntIfFalse = 2, + kdbdmaIntAlways = 3, + + kdbdmaBranchNever = 0, /* default modifier*/ + kdbdmaBranchIfTrue = 1, + kdbdmaBranchIfFalse = 2, + kdbdmaBranchAlways = 3, + + kdbdmaWaitNever = 0, /* default modifier*/ + kdbdmaWaitIfTrue = 1, + kdbdmaWaitIfFalse = 2, + kdbdmaWaitAlways = 3, + + kdbdmaCommandMask = (long)0xFFFF0000, + kdbdmaReqCountMask = 0x0000FFFF +}; + + +/* These constants define the DB-DMA channel command results.*/ + +enum { + /* result masks*/ + kdbdmaStatusRun = kdbdmaRun << 16, + kdbdmaStatusPause = kdbdmaPause << 16, + kdbdmaStatusFlush = kdbdmaFlush << 16, + kdbdmaStatusWake = kdbdmaWake << 16, + kdbdmaStatusDead = kdbdmaDead << 16, + kdbdmaStatusActive = kdbdmaActive << 16, + kdbdmaStatusBt = kdbdmaBt << 16, + kdbdmaStatusS7 = kdbdmaS7 << 16, + kdbdmaStatusS6 = kdbdmaS6 << 16, + kdbdmaStatusS5 = kdbdmaS5 << 16, + kdbdmaStatusS4 = kdbdmaS4 << 16, + kdbdmaStatusS3 = kdbdmaS3 << 16, + kdbdmaStatusS2 = kdbdmaS2 << 16, + kdbdmaStatusS1 = kdbdmaS1 << 16, + kdbdmaStatusS0 = kdbdmaS0 << 16, + kdbdmaResCountMask = 0x0000FFFF, + kdbdmaXferStatusMask = 0xFFFF0000 +}; + + +/* These macros are are IODBDMAChannelRegisters accessor functions. */ + +#define IOSetDBDMAChannelRegister(registerSetPtr,field,value) \ +OSWriteSwapInt32(registerSetPtr,offsetof(IODBDMAChannelRegisters,field),value) + +#define IOGetDBDMAChannelRegister(registerSetPtr, field) \ +OSReadSwapInt32(registerSetPtr,offsetof(IODBDMAChannelRegisters, field)) + + +/* void IOSetDBDMAChannelControl (IODBDMAChannelRegisters *registerSetPtr, unsigned long ctlValue); */ + +#define IOSetDBDMAChannelControl(registerSetPtr,ctlValue) \ +do { \ + eieio(); \ + IOSetDBDMAChannelRegister(registerSetPtr,channelControl,ctlValue); \ + eieio(); \ +} while(0) + +/* unsigned long IOGetDBDMAChannelStatus (IODBDMAChannelRegisters *registerSetPtr); */ + +#define IOGetDBDMAChannelStatus(registerSetPtr) \ + IOGetDBDMAChannelRegister(registerSetPtr,channelStatus) + +/* unsigned long IOGetDBDMACommandPtr (IODBDMAChannelRegisters *registerSetPtr); */ + +#define IOGetDBDMACommandPtr(registerSetPtr) \ + IOGetDBDMAChannelRegister(registerSetPtr,commandPtrLo) + +/* void IOSetDBDMACommandPtr (IODBDMAChannelRegisters *registerSetPtr, unsigned long cclPtr); */ + +#define IOSetDBDMACommandPtr(registerSetPtr,cclPtr) \ +do { \ + IOSetDBDMAChannelRegister(registerSetPtr,commandPtrHi,0); \ + eieio(); \ + IOSetDBDMAChannelRegister(registerSetPtr,commandPtrLo,cclPtr); \ + eieio(); \ +} while(0) + + +/* unsigned long IOGetDBDMAInterruptSelect (IODBDMAChannelRegisters *registerSetPtr); */ + +#define IOGetDBDMAInterruptSelect(registerSetPtr) \ + IOGetDBDMAChannelRegister(registerSetPtr,interruptSelect) + +/* void IOSetDBDMAInterruptSelect (IODBDMAChannelRegisters *registerSetPtr, unsigned long intSelValue); */ + +#define IOSetDBDMAInterruptSelect(registerSetPtr,intSelValue) \ +do { \ + IOSetDBDMAChannelRegister(registerSetPtr,interruptSelect,intSelValue); \ + eieio(); \ +} while(0) + +/* unsigned long IOGetDBDMABranchSelect (IODBDMAChannelRegisters *registerSetPtr); */ + +#define IOGetDBDMABranchSelect(registerSetPtr) \ + IOGetDBDMAChannelRegister(registerSetPtr,branchSelect) + +/* void IOSetDBDMABranchSelect (IODBDMAChannelRegisters *registerSetPtr, unsigned long braSelValue); */ + +#define IOSetDBDMABranchSelect(registerSetPtr,braSelValue) \ +do { \ + IOSetDBDMAChannelRegister(registerSetPtr,branchSelect,braSelValue); \ + eieio(); \ +} while(0) + +/* unsigned long IOGetDBDMAWaitSelect (IODBDMAChannelRegisters *registerSetPtr); */ + +#define IOGetDBDMAWaitSelect(registerSetPtr) \ + IOGetDBDMAChannelRegister(registerSetPtr,waitSelect) + +/* void IOSetDBDMAWaitSelect (IODBDMAChannelRegisters *registerSetPtr, unsigned long waitSelValue); */ + +#define IOSetDBDMAWaitSelect(registerSetPtr,waitSelValue) \ +do { \ + IOSetDBDMAChannelRegister(registerSetPtr,waitSelect,waitSelValue); \ + eieio(); \ +} while(0) + + +/* These macros are IODBDMADescriptor accessor functions. */ + +#define IOSetDBDMADescriptor(descPtr,field,value) \ +OSWriteSwapInt32( descPtr, offsetof( IODBDMADescriptor, field), value) + +#define IOGetDBDMADescriptor(descPtr,field) \ +OSReadSwapInt32( descPtr, offsetof( IODBDMADescriptor, field)) + +#define IOMakeDBDMAOperation(cmd,key,interrupt,branch,wait,count) \ + ( ((cmd) << 28) | ((key) << 24) | ((interrupt) << 20) \ + | ((branch) << 18) | ( (wait) << 16) | (count) ) + +/* void IOMakeDBDMADescriptor (IODBDMADescriptor *descPtr, + unsigned long cmd, + unsigned long key, + unsigned long interrupt, + unsigned long branch, + unsigned long wait, + unsigned long count, + unsigned long addr); */ + +#define IOMakeDBDMADescriptor(descPtr,cmd,key,interrupt,branch,wait,count,addr)\ +do { \ + IOSetDBDMADescriptor(descPtr, address, addr); \ + IOSetDBDMADescriptor(descPtr, cmdDep, 0); \ + IOSetDBDMADescriptor(descPtr, result, 0); \ + eieio(); \ + IOSetDBDMADescriptor(descPtr, operation, \ + IOMakeDBDMAOperation(cmd,key,interrupt,branch,wait,count)); \ + eieio(); \ +} while(0) + +/* void IOMakeDBDMADescriptorDep (IODBDMADescriptor *descPtr, + unsigned long cmd, + unsigned long key, + unsigned long interrupt, + unsigned long branch, + unsigned long wait, + unsigned long count, + unsigned long addr, + unsigned long dep); */ + +#define IOMakeDBDMADescriptorDep(descPtr,cmd,key,interrupt,branch,wait,count,addr,dep) \ +do { \ + IOSetDBDMADescriptor(descPtr, address, addr); \ + IOSetDBDMADescriptor(descPtr, cmdDep, dep); \ + IOSetDBDMADescriptor(descPtr, result, 0); \ + eieio(); \ + IOSetDBDMADescriptor(descPtr, operation, \ + IOMakeDBDMAOperation(cmd, key, interrupt, branch, wait, count)); \ + eieio(); \ +} while(0) + +/* Field accessors - NOTE: unsynchronized */ + +/* unsigned long IOGetDBDMAOperation (IODBDMADescriptor *descPtr) */ + +#define IOGetCCOperation(descPtr) \ + IOGetDBDMADescriptor(descPtr,operation) + +/* void IOSetCCOperation (IODBDMADescriptor *descPtr, unsigned long operationValue) */ + +#define IOSetCCOperation(descPtr,operationValue) \ + IOSetDBDMADescriptor(descPtr,operation,operationValue) + +/* unsigned long IOGetCCAddress (IODBDMADescriptor *descPtr) */ + +#define IOGetCCAddress(descPtr) \ + IOGetDBDMADescriptor(descPtr,address) + +/* void IOSetCCAddress (IODBDMADescriptor *descPtr, unsigned long addressValue) */ + +#define IOSetCCAddress(descPtr,addressValue) \ + IOSetDBDMADescriptor(descPtr,address, addressValue) + +/* unsigned long IOGetCCCmdDep (IODBDMADescriptor *descPtr) */ + +#define IOGetCCCmdDep(descPtr) \ + IOGetDBDMADescriptor(descPtr,cmdDep) + +/* void IOSetCCCmdDep (IODBDMADescriptor *descPtr, unsigned long cmdDepValue) */ + +#define IOSetCCCmdDep(descPtr,cmdDepValue) \ + IOSetDBDMADescriptor(descPtr,cmdDep,cmdDepValue) + +/* unsigned long IOGetCCResult (IODBDMADescriptor *descPtr) */ + +#define IOGetCCResult(descPtr) \ + IOGetDBDMADescriptor(descPtr,result) + +/* void IOSetCCResult (IODBDMADescriptor *descPtr, unsigned long resultValue) */ + +#define IOSetCCResult(descPtr,resultValue) \ + IOSetDBDMADescriptor(descPtr,result,resultValue) + + +/* DBDMA routines */ + +extern void IODBDMAStart( volatile IODBDMAChannelRegisters *registerSetPtr, volatile IODBDMADescriptor *physicalDescPtr); +extern void IODBDMAStop( volatile IODBDMAChannelRegisters *registerSetPtr); +extern void IODBDMAFlush( volatile IODBDMAChannelRegisters *registerSetPtr); +extern void IODBDMAReset( volatile IODBDMAChannelRegisters *registerSetPtr); +extern void IODBDMAContinue( volatile IODBDMAChannelRegisters *registerSetPtr); +extern void IODBDMAPause( volatile IODBDMAChannelRegisters *registerSetPtr); + +extern IOReturn IOAllocatePhysicallyContiguousMemory( unsigned int size, unsigned int options, + IOVirtualAddress * logical, IOPhysicalAddress * physical ); +extern IOReturn IOFreePhysicallyContiguousMemory( IOVirtualAddress * logical, unsigned int size); + +#endif /* !defined(_IODBDMA_H_) */ diff --git a/i386/include/IOKit/pwr_mgt/.svn/all-wcprops b/i386/include/IOKit/pwr_mgt/.svn/all-wcprops new file mode 100644 index 0000000..3ea4d10 --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/.svn/all-wcprops @@ -0,0 +1,59 @@ +K 25 +svn:wc:ra_dav:version-url +V 60 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt +END +RootDomain.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/RootDomain.h +END +IOPMLibDefs.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/IOPMLibDefs.h +END +IOPMPowerSourceList.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/IOPMPowerSourceList.h +END +IOPMPrivate.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/IOPMPrivate.h +END +IOPMPowerSource.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/IOPMPowerSource.h +END +IOPMpowerState.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/IOPMpowerState.h +END +IOPM.h +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/IOPM.h +END +IOPowerConnection.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/IOPowerConnection.h +END +IOPMDeprecated.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/IOPMDeprecated.h +END diff --git a/i386/include/IOKit/pwr_mgt/.svn/entries b/i386/include/IOKit/pwr_mgt/.svn/entries new file mode 100644 index 0000000..decf7eb --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/.svn/entries @@ -0,0 +1,334 @@ +10 + +dir +2117 +http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/pwr_mgt +http://forge.voodooprojects.org/svn/chameleon + + + +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + +b5af796a-00a8-11df-919b-ffff7a100b7d + +RootDomain.h +file + + + + +2012-10-03T17:50:20.000000Z +bdf4cb75458bc85f1bbb7f9d25e0b25b +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +10815 + +IOPMLibDefs.h +file + + + + +2012-10-03T17:50:20.000000Z +2f6d1ceef422ff8f504e009c9554720b +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +1762 + +IOPMPowerSourceList.h +file + + + + +2012-10-03T17:50:20.000000Z +ba4d08c61820252a5ed6241fd8b3c13a +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +2024 + +IOPMPrivate.h +file + + + + +2012-10-03T17:50:20.000000Z +875e737556ada49d86b951e79209bc3a +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +11099 + +IOPMPowerSource.h +file + + + + +2012-10-03T17:50:20.000000Z +8ec726b34101aecbd930216a9d944510 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +9439 + +IOPMpowerState.h +file + + + + +2012-10-03T17:50:20.000000Z +eb4e9833e8dc27f552ed3fa7704a0b8d +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +3760 + +IOPM.h +file + + + + +2012-10-03T17:50:20.000000Z +6e0b70a4a16a7c280dcfbe0c99e1c06c +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +27180 + +IOPowerConnection.h +file + + + + +2012-10-03T17:50:20.000000Z +05e49f8d6c51a982ce29d3e16cb0c161 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +6011 + +IOPMDeprecated.h +file + + + + +2012-10-03T17:50:20.000000Z +ebebd77a291987f315e9719e9f1f53e9 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +9112 + diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPM.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPM.h.svn-base new file mode 100644 index 0000000..7d78225 --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPM.h.svn-base @@ -0,0 +1,654 @@ +/* + * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _IOKIT_IOPM_H +#define _IOKIT_IOPM_H + +#include +#include +#include + +#ifdef __ppc__ +#include +#endif + +/*! @header IOPM.h + @abstract Defines power management constants and keys used by both in-kernel and user space power management. + @discussion IOPM.h defines a range of power management constants used in several in-kernel and user space APIs. Most significantly, the IOPMPowerFlags used to specify the fields of an IOPMPowerState struct are defined here. + + Most of the constants defined in IOPM.h are deprecated or for Apple internal use only, and are not elaborated on in headerdoc. +*/ + +enum { + kIOPMMaxPowerStates = 10, + IOPMMaxPowerStates = kIOPMMaxPowerStates +}; + +/*! @enum IOPMPowerFlags + @abstract Bits are used in defining capabilityFlags, inputPowerRequirements, and outputPowerCharacter in the IOPMPowerState structure. + @discussion These bits may be bitwise-OR'd together in the IOPMPowerState capabilityFlags field, the outputPowerCharacter field, and/or the inputPowerRequirement field. + + The comments clearly mark whether each flag should be used in the capabilityFlags field, outputPowerCharacter field, and inputPowerRequirement field, or all three. + + The value of capabilityFlags, inputPowerRequirement or outputPowerCharacter may be 0. Most drivers implement their 'OFF' state, used when asleep, by defininf each of the 3 fields as 0. + + The bits listed below are only the most common bits used to define a device's power states. Your device's IO family may require that your device specify other input or output power flags to interact properly. Consult family-specific documentation to determine if your IOPower plane parents or children require other power flags; they probably don't. + + @constant kIOPMPowerOn Indicates the device is on, requires power, and provides power. Useful as a: Capability, InputPowerRequirement, OutputPowerCharacter + + @constant kIOPMDeviceUsable Indicates the device is usable in this state. Useful only as a Capability + + @constant kIOPMLowPower + Indicates device is in a low power state. May be bitwis-OR'd together + with kIOPMDeviceUsable flag, to indicate the device is still usable. + + A device with a capability of kIOPMLowPower may: + Require either 0 or kIOPMPowerOn from its power parent + Offer either kIOPMLowPower, kIOPMPowerOn, or 0 (no power at all) + to its power plane children. + + Useful only as a Capability, although USB drivers should consult USB family documentation for other valid circumstances to use the kIOPMLowPower bit. + + @constant kIOPMPreventIdleSleep + In the capability field of a power state, disallows idle system sleep while the device is in that state. + + For example, displays and disks set this capability for their ON power state; since the system may not idle sleep while the display (and thus keyboard or mouse) or the disk is active. + + Useful only as a Capability. + + @constant kIOPMSleepCapability + Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. + + @constant kIOPMRestartCapability + Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. + + @constant kIOPMSleep + Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. + + @constant kIOPMRestart + Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. +*/ +typedef unsigned long IOPMPowerFlags; +enum { + kIOPMPowerOn = 0x00000002, + kIOPMDeviceUsable = 0x00008000, + kIOPMLowPower = 0x00010000, + kIOPMPreventIdleSleep = 0x00000040, + kIOPMSleepCapability = 0x00000004, + kIOPMRestartCapability = 0x00000080, + kIOPMSleep = 0x00000001, + kIOPMRestart = 0x00000080 +}; + +/* + * Private IOPMPowerFlags + * + * For Apple use only + * Not for use with non-Apple drivers + * Their behavior is undefined + */ +enum { + kIOPMClockNormal = 0x0004, + kIOPMClockRunning = 0x0008, + kIOPMPreventSystemSleep = 0x0010, + kIOPMDoze = 0x0400, + kIOPMChildClamp = 0x0080, + kIOPMChildClamp2 = 0x0200, + kIOPMNotPowerManaged = 0x0800 +}; + + +/* + * Deprecated IOPMPowerFlags + * Their behavior is undefined when used in IOPMPowerState + * Capability, InputPowerRequirement, or OutputPowerCharacter fields. + */ +enum { + kIOPMMaxPerformance = 0x4000, + kIOPMPassThrough = 0x0100, + kIOPMAuxPowerOn = 0x0020, + kIOPMNotAttainable = 0x0001, + kIOPMContextRetained = 0x2000, + kIOPMConfigRetained = 0x1000, + kIOPMStaticPowerValid = 0x0800, + kIOPMSoftSleep = 0x0400, + kIOPMCapabilitiesMask = kIOPMPowerOn | kIOPMDeviceUsable | + kIOPMMaxPerformance | kIOPMContextRetained | + kIOPMConfigRetained | kIOPMSleepCapability | + kIOPMRestartCapability +}; + +/* + * Support for old names of IOPMPowerFlag constants + */ +enum { + IOPMNotAttainable = kIOPMNotAttainable, + IOPMPowerOn = kIOPMPowerOn, + IOPMClockNormal = kIOPMClockNormal, + IOPMClockRunning = kIOPMClockRunning, + IOPMAuxPowerOn = kIOPMAuxPowerOn, + IOPMDeviceUsable = kIOPMDeviceUsable, + IOPMMaxPerformance = kIOPMMaxPerformance, + IOPMContextRetained = kIOPMContextRetained, + IOPMConfigRetained = kIOPMConfigRetained, + IOPMNotPowerManaged = kIOPMNotPowerManaged, + IOPMSoftSleep = kIOPMSoftSleep +}; + + +enum { + kIOPMNextHigherState = 1, + kIOPMHighestState = 2, + kIOPMNextLowerState = 3, + kIOPMLowestState = 4 +}; + +enum { + IOPMNextHigherState = kIOPMNextHigherState, + IOPMHighestState = kIOPMHighestState, + IOPMNextLowerState = kIOPMNextLowerState, + IOPMLowestState = kIOPMLowestState +}; + +// Internal commands used by power managment command queue +enum { + kIOPMBroadcastAggressiveness = 1, + kIOPMUnidleDevice +}; + +// Power consumption unknown value +enum { + kIOPMUnknown = 0xFFFF +}; + +/******************************************************************************* + * + * Root Domain property keys of interest + * + ******************************************************************************/ + +/* AppleClamshellState + * reflects the state of the clamshell (lid) on a portable. + * It has a boolean value. + * true == clamshell is closed + * false == clamshell is open + * not present == no clamshell on this hardware + */ +#define kAppleClamshellStateKey "AppleClamshellState" + +/* AppleClamshellCausesSleep + * reflects the clamshell close behavior on a portable. + * It has a boolean value. + * true == system will sleep when clamshell is closed + * false == system will not sleep on clamshell close + * (typically external display mode) + * not present == no clamshell on this hardware + */ +#define kAppleClamshellCausesSleepKey "AppleClamshellCausesSleep" + +/* kIOPMSleepWakeUUIDKey + * Key refers to a CFStringRef that will uniquely identify + * a sleep/wake cycle for logging & tracking. + * The key becomes valid at the beginning of a sleep cycle - before we + * initiate any sleep/wake notifications. + * The key becomes invalid at the completion of a system wakeup. The + * property will not be present in the IOPMrootDomain's registry entry + * when it is invalid. + * + * See IOPMrootDomain notification kIOPMMessageSleepWakeUUIDChange + */ + #define kIOPMSleepWakeUUIDKey "SleepWakeUUID" + +/******************************************************************************* + * + * Root Domain general interest messages + * + * Available by registering for interest type 'gIOGeneralInterest' + * on IOPMrootDomain. + * + ******************************************************************************/ + +/* kIOPMMessageClamshellStateChange + * Delivered as a general interest notification on the IOPMrootDomain + * IOPMrootDomain sends this message when state of either AppleClamshellState + * or AppleClamshellCausesSleep changes. If this clamshell change results in + * a sleep, the sleep will initiate soon AFTER delivery of this message. + * The state of both variables is encoded in a bitfield argument sent with + * the message. Check bits 0 and 1 using kClamshellStateBit & kClamshellSleepBit + */ +enum { + kClamshellStateBit = (1 << 0), + kClamshellSleepBit = (1 << 1) +}; + +#define kIOPMMessageClamshellStateChange \ + iokit_family_msg(sub_iokit_powermanagement, 0x100) + +/* kIOPMMessageFeatureChange + * Delivered when the set of supported features ("Supported Features" dictionary + * under IOPMrootDomain registry) changes in some way. Typically addition or + * removal of a supported feature. + * RootDomain passes no argument with this message. + */ +#define kIOPMMessageFeatureChange \ + iokit_family_msg(sub_iokit_powermanagement, 0x110) + +/* kIOPMMessageInflowDisableCancelled + * The battery has drained completely to its "Fully Discharged" state. + * If a user process has disabled battery inflow for battery + * calibration, we forcibly re-enable Inflow at this point. + * If inflow HAS been forcibly re-enabled, bit 0 + * (kInflowForciblyEnabledBit) will be set. + */ +enum { + kInflowForciblyEnabledBit = (1 << 0) +}; + +/* kIOPMMessageInternalBatteryFullyDischarged + * The battery has drained completely to its "Fully Discharged" state. + */ +#define kIOPMMessageInternalBatteryFullyDischarged \ + iokit_family_msg(sub_iokit_powermanagement, 0x120) + +/* kIOPMMessageSystemPowerEventOccurred + * Some major system thermal property has changed, and interested clients may + * modify their behavior. + */ +#define kIOPMMessageSystemPowerEventOccurred \ + iokit_family_msg(sub_iokit_powermanagement, 0x130) + +/* kIOPMMessageSleepWakeUUIDChange + * Either a new SleepWakeUUID has been specified at the beginning of a sleep, + * or we're removing the existing property upon completion of a wakeup. + */ +#define kIOPMMessageSleepWakeUUIDChange \ + iokit_family_msg(sub_iokit_powermanagement, 0x140) + +/* kIOPMMessageSleepWakeUUIDSet + * Argument accompanying the kIOPMMessageSleepWakeUUIDChange notification when + * a new UUID has been specified. + */ +#define kIOPMMessageSleepWakeUUIDSet ((void *)1) + +/* kIOPMMessageSleepWakeUUIDCleared + * Argument accompanying the kIOPMMessageSleepWakeUUIDChange notification when + * the current UUID has been removed. + */ +#define kIOPMMessageSleepWakeUUIDCleared ((void *)0) + +/******************************************************************************* + * + * Power commands issued to root domain + * Use with IOPMrootDomain::receivePowerNotification() + * + * These commands are issued from system drivers only: + * ApplePMU, AppleSMU, IOGraphics, AppleACPIFamily + * + ******************************************************************************/ +enum { + kIOPMSleepNow = (1<<0), // put machine to sleep now + kIOPMAllowSleep = (1<<1), // allow idle sleep + kIOPMPreventSleep = (1<<2), // do not allow idle sleep + kIOPMPowerButton = (1<<3), // power button was pressed + kIOPMClamshellClosed = (1<<4), // clamshell was closed + kIOPMPowerEmergency = (1<<5), // battery dangerously low + kIOPMDisableClamshell = (1<<6), // do not sleep on clamshell closure + kIOPMEnableClamshell = (1<<7), // sleep on clamshell closure + kIOPMProcessorSpeedChange = (1<<8), // change the processor speed + kIOPMOverTemp = (1<<9), // system dangerously hot + kIOPMClamshellOpened = (1<<10) // clamshell was opened +}; + + +/******************************************************************************* + * + * Power Management Return Codes + * + ******************************************************************************/ +enum { + kIOPMNoErr = 0, + + // Returned by driver's setPowerState(), powerStateWillChangeTo(), + // powerStateDidChangeTo(), or acknowledgeSetPowerState() to + // implicitly acknowledge power change upon function return. + kIOPMAckImplied = 0, + + // Deprecated + kIOPMWillAckLater = 1, + + // Returned by requestPowerDomainState() to indicate + // unrecognized specification parameter. + kIOPMBadSpecification = 4, + + // Returned by requestPowerDomainState() to indicate + // no power state matches search specification. + kIOPMNoSuchState = 5, + + // Deprecated + kIOPMCannotRaisePower = 6, + + // Deprecated + kIOPMParameterError = 7, + + // Returned when power management state is accessed + // before driver has called PMinit(). + kIOPMNotYetInitialized = 8, + + // And the old constants; deprecated + IOPMNoErr = kIOPMNoErr, + IOPMAckImplied = kIOPMAckImplied, + IOPMWillAckLater = kIOPMWillAckLater, + IOPMBadSpecification = kIOPMBadSpecification, + IOPMNoSuchState = kIOPMNoSuchState, + IOPMCannotRaisePower = kIOPMCannotRaisePower, + IOPMParameterError = kIOPMParameterError, + IOPMNotYetInitialized = kIOPMNotYetInitialized +}; + + +// IOPMPowerSource class descriptive strings +// Power Source state is published as properties to the IORegistry under these +// keys. +#define kIOPMPSExternalConnectedKey "ExternalConnected" +#define kIOPMPSExternalChargeCapableKey "ExternalChargeCapable" +#define kIOPMPSBatteryInstalledKey "BatteryInstalled" +#define kIOPMPSIsChargingKey "IsCharging" +#define kIOPMFullyChargedKey "FullyCharged" +#define kIOPMPSAtWarnLevelKey "AtWarnLevel" +#define kIOPMPSAtCriticalLevelKey "AtCriticalLevel" +#define kIOPMPSCurrentCapacityKey "CurrentCapacity" +#define kIOPMPSMaxCapacityKey "MaxCapacity" +#define kIOPMPSDesignCapacityKey "DesignCapacity" +#define kIOPMPSTimeRemainingKey "TimeRemaining" +#define kIOPMPSAmperageKey "Amperage" +#define kIOPMPSVoltageKey "Voltage" +#define kIOPMPSCycleCountKey "CycleCount" +#define kIOPMPSMaxErrKey "MaxErr" +#define kIOPMPSAdapterInfoKey "AdapterInfo" +#define kIOPMPSLocationKey "Location" +#define kIOPMPSErrorConditionKey "ErrorCondition" +#define kIOPMPSManufacturerKey "Manufacturer" +#define kIOPMPSManufactureDateKey "ManufactureDate" +#define kIOPMPSModelKey "Model" +#define kIOPMPSSerialKey "Serial" +#define kIOPMDeviceNameKey "DeviceName" +#define kIOPMPSLegacyBatteryInfoKey "LegacyBatteryInfo" +#define kIOPMPSBatteryHealthKey "BatteryHealth" +#define kIOPMPSHealthConfidenceKey "HealthConfidence" +#define kIOPMPSCapacityEstimatedKey "CapacityEstimated" +#define kIOPMPSBatteryChargeStatusKey "ChargeStatus" +#define kIOPMPSBatteryTemperatureKey "Temperature" + +// kIOPMPSBatteryChargeStatusKey may have one of the following values, or may have +// no value. If kIOPMBatteryChargeStatusKey has a NULL value (or no value) associated with it +// then charge is proceeding normally. If one of these battery charge status reasons is listed, +// then the charge may have been interrupted. +#define kIOPMBatteryChargeStatusTooHot "HighTemperature" +#define kIOPMBatteryChargeStatusTooCold "LowTemperature" +#define kIOPMBatteryChargeStatusGradient "BatteryTemperatureGradient" + +// Definitions for battery location, in case of multiple batteries. +// A location of 0 is unspecified +// Location is undefined for single battery systems +enum { + kIOPMPSLocationLeft = 1001, + kIOPMPSLocationRight = 1002 +}; + +// Battery quality health types, specified by BatteryHealth and HealthConfidence +// properties in an IOPMPowerSource battery kext. +enum { + kIOPMUndefinedValue = 0, + kIOPMPoorValue = 1, + kIOPMFairValue = 2, + kIOPMGoodValue = 3 +}; + +// Battery's time remaining estimate is invalid this long (seconds) after a wake +#define kIOPMPSInvalidWakeSecondsKey "BatteryInvalidWakeSeconds" + +// Battery must wait this long (seconds) after being completely charged before +// the battery is settled. +#define kIOPMPSPostChargeWaitSecondsKey "PostChargeWaitSeconds" + +// Battery must wait this long (seconds) after being completely discharged +// before the battery is settled. +#define kIOPMPSPostDishargeWaitSecondsKey "PostDischargeWaitSeconds" + + +/* CPU Power Management status keys + * Pass as arguments to IOPMrootDomain::systemPowerEventOccurred + * Or as arguments to IOPMSystemPowerEventOccurred() + * Or to decode the dictionary obtained from IOPMCopyCPUPowerStatus() + * These keys reflect restrictions placed on the CPU by the system + * to bring the CPU's power consumption within allowable thermal and + * power constraints. + */ + + +/* kIOPMGraphicsPowerLimitsKey + * The key representing the dictionary of graphics power limits. + * The dictionary contains the other kIOPMCPUPower keys & their associated + * values (e.g. Speed limit, Processor Count, and Schedule limits). + */ +#define kIOPMGraphicsPowerLimitsKey "Graphics_Power_Limits" + +/* kIOPMGraphicsPowerLimitPerformanceKey + * The key representing the percent of overall performance made available + * by the graphics chip as a percentage (integer 0 - 100). + */ +#define kIOPMGraphicsPowerLimitPerformanceKey "Graphics_Power_Performance" + + + +/* kIOPMCPUPowerLimitsKey + * The key representing the dictionary of CPU Power Limits. + * The dictionary contains the other kIOPMCPUPower keys & their associated + * values (e.g. Speed limit, Processor Count, and Schedule limits). + */ +#define kIOPMCPUPowerLimitsKey "CPU_Power_Limits" + +/* kIOPMCPUPowerLimitProcessorSpeedKey defines the speed & voltage limits placed + * on the CPU. + * Represented as a percentage (0-100) of maximum CPU speed. + */ +#define kIOPMCPUPowerLimitProcessorSpeedKey "CPU_Speed_Limit" + +/* kIOPMCPUPowerLimitProcessorCountKey reflects how many, if any, CPUs have been + * taken offline. Represented as an integer number of CPUs (0 - Max CPUs). + */ +#define kIOPMCPUPowerLimitProcessorCountKey "CPU_Available_CPUs" + +/* kIOPMCPUPowerLimitSchedulerTimeKey represents the percentage (0-100) of CPU time + * available. 100% at normal operation. The OS may limit this time for a percentage + * less than 100%. + */ +#define kIOPMCPUPowerLimitSchedulerTimeKey "CPU_Scheduler_Limit" + + +/* Thermal Level Warning Key + * Indicates the thermal constraints placed on the system. This value may + * cause clients to action to consume fewer system resources. + * The value associated with this warning is defined by the platform. + */ +#define kIOPMThermalLevelWarningKey "Thermal_Level_Warning" + +/* Thermal Warning Level values + * kIOPMThermalWarningLevelNormal - under normal operating conditions + * kIOPMThermalWarningLevelDanger - thermal pressure may cause system slowdown + * kIOPMThermalWarningLevelCrisis - thermal conditions may cause imminent shutdown + * + * The platform may define additional thermal levels if necessary. + */ +enum { + kIOPMThermalWarningLevelNormal = 0, + kIOPMThermalWarningLevelDanger = 5, + kIOPMThermalWarningLevelCrisis = 10 +}; + + +// PM Settings Controller setting types +// Settings types used primarily with: +// IOPMrootDomain::registerPMSettingController +// The values are identical to the similarly named keys for use in user space +// PM settings work. Those keys are defined in IOPMLibPrivate.h. +#define kIOPMSettingWakeOnRingKey "Wake On Modem Ring" +#define kIOPMSettingRestartOnPowerLossKey "Automatic Restart On Power Loss" +#define kIOPMSettingWakeOnACChangeKey "Wake On AC Change" +#define kIOPMSettingSleepOnPowerButtonKey "Sleep On Power Button" +#define kIOPMSettingWakeOnClamshellKey "Wake On Clamshell Open" +#define kIOPMSettingReduceBrightnessKey "ReduceBrightness" +#define kIOPMSettingDisplaySleepUsesDimKey "Display Sleep Uses Dim" +#define kIOPMSettingTimeZoneOffsetKey "TimeZoneOffsetSeconds" +#define kIOPMSettingMobileMotionModuleKey "MobileMotionModule" +#define kIOPMSettingGraphicsSwitchKey "GPUSwitch" + +// Setting controlling drivers can register to receive scheduled wake data +// Either in "CF seconds" type, or structured calendar data in a formatted +// IOPMCalendarStruct defined below. +#define kIOPMSettingAutoWakeSecondsKey "wake" +#define kIOPMSettingAutoWakeCalendarKey "WakeByCalendarDate" +#define kIOPMSettingAutoPowerSecondsKey "poweron" +#define kIOPMSettingAutoPowerCalendarKey "PowerByCalendarDate" + +// Debug seconds auto wake +// Used by sleep cycling debug tools +#define kIOPMSettingDebugWakeRelativeKey "WakeRelativeToSleep" +#define kIOPMSettingDebugPowerRelativeKey "PowerRelativeToShutdown" + +// Maintenance wake calendar. +#define kIOPMSettingMaintenanceWakeCalendarKey "MaintenanceWakeCalendarDate" + +struct IOPMCalendarStruct { + UInt32 year; + UInt8 month; + UInt8 day; + UInt8 hour; + UInt8 minute; + UInt8 second; +}; +typedef struct IOPMCalendarStruct IOPMCalendarStruct; + +// SetAggressiveness types +enum { + kPMGeneralAggressiveness = 0, + kPMMinutesToDim, + kPMMinutesToSpinDown, + kPMMinutesToSleep, + kPMEthernetWakeOnLANSettings, + kPMSetProcessorSpeed, + kPMPowerSource, + kPMMotionSensor, + kPMLastAggressivenessType +}; +#define kMaxType (kPMLastAggressivenessType-1) + +// SetAggressiveness values for the kPMPowerSource aggressiveness type +enum { + kIOPMInternalPower = 1, + kIOPMExternalPower +}; + +#define kIOREMSleepEnabledKey "REMSleepEnabled" + +// Strings for deciphering the dictionary returned from IOPMCopyBatteryInfo +#define kIOBatteryInfoKey "IOBatteryInfo" +#define kIOBatteryCurrentChargeKey "Current" +#define kIOBatteryCapacityKey "Capacity" +#define kIOBatteryFlagsKey "Flags" +#define kIOBatteryVoltageKey "Voltage" +#define kIOBatteryAmperageKey "Amperage" +#define kIOBatteryCycleCountKey "Cycle Count" + +enum { + kIOBatteryInstalled = (1 << 2), + kIOBatteryCharge = (1 << 1), + kIOBatteryChargerConnect = (1 << 0) +}; + + +// Private power management message indicating battery data has changed +// Indicates new data resides in the IORegistry +#define kIOPMMessageBatteryStatusHasChanged iokit_family_msg(sub_iokit_pmu, 0x100) + +// Apple private Legacy messages for re-routing AutoWake and AutoPower messages to the PMU +// through newer user space IOPMSchedulePowerEvent API +#define kIOPMUMessageLegacyAutoWake iokit_family_msg(sub_iokit_pmu, 0x200) +#define kIOPMUMessageLegacyAutoPower iokit_family_msg(sub_iokit_pmu, 0x210) + +// For use with IOPMPowerSource bFlags +#define IOPM_POWER_SOURCE_REV 2 +enum { + kIOPMACInstalled = kIOBatteryChargerConnect, + kIOPMBatteryCharging = kIOBatteryCharge, + kIOPMBatteryInstalled = kIOBatteryInstalled, + kIOPMUPSInstalled = (1<<3), + kIOPMBatteryAtWarn = (1<<4), + kIOPMBatteryDepleted = (1<<5), + kIOPMACnoChargeCapability = (1<<6), // AC adapter cannot charge battery + kIOPMRawLowBattery = (1<<7), // used only by Platform Expert + kIOPMForceLowSpeed = (1<<8), // set by Platfm Expert, chk'd by Pwr Plugin + kIOPMClosedClamshell = (1<<9), // set by PMU - reflects state of the clamshell + kIOPMClamshellStateOnWake = (1<<10) // used only by Platform Expert +}; + + +// ********************************************** +// Internal power management data structures +// ********************************************** + +#if KERNEL && __cplusplus +class IOService; + +enum { + kIOPowerEmergencyLevel = 1000 +}; + +enum { + kIOPMSubclassPolicy, + kIOPMSuperclassPolicy1 +}; + +struct stateChangeNote{ + IOPMPowerFlags stateFlags; + unsigned long stateNum; + void * powerRef; +}; +typedef struct stateChangeNote stateChangeNote; + +struct IOPowerStateChangeNotification { + void * powerRef; + unsigned long returnValue; + unsigned long stateNumber; + IOPMPowerFlags stateFlags; +}; +typedef struct IOPowerStateChangeNotification IOPowerStateChangeNotification; +typedef IOPowerStateChangeNotification sleepWakeNote; +#endif /* KERNEL && __cplusplus */ + +#endif /* ! _IOKIT_IOPM_H */ + diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMDeprecated.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMDeprecated.h.svn-base new file mode 100644 index 0000000..3bee01a --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMDeprecated.h.svn-base @@ -0,0 +1,177 @@ +/* + * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOPMDeprecated_h_ +#define _IOPMDeprecated_h_ + +#ifdef __ppc__ + +// Power events +enum { + kClamshellClosedEventMask = (1<<0), // User closed lid + kDockingBarEventMask = (1<<1), // OBSOLETE + kACPlugEventMask = (1<<2), // User plugged or unplugged adapter + kFrontPanelButtonEventMask = (1<<3), // User hit the front panel button + kBatteryStatusEventMask = (1<<4) // Battery status has changed +}; + +// PUBLIC power management features +// NOTE: this is a direct port from classic, some of these bits +// are obsolete but are included for completeness +enum { + kPMHasWakeupTimerMask = (1<<0), // 1=wake timer is supported + kPMHasSharedModemPortMask = (1<<1), // Not used + kPMHasProcessorCyclingMask = (1<<2), // 1=processor cycling supported + kPMMustProcessorCycleMask = (1<<3), // Not used + kPMHasReducedSpeedMask = (1<<4), // 1=supports reduced processor speed + kPMDynamicSpeedChangeMask = (1<<5), // 1=supports changing processor speed on the fly + kPMHasSCSIDiskModeMask = (1<<6), // 1=supports using machine as SCSI drive + kPMCanGetBatteryTimeMask = (1<<7), // 1=battery time can be calculated + kPMCanWakeupOnRingMask = (1<<8), // 1=machine can wake on modem ring + kPMHasDimmingSupportMask = (1<<9), // 1=has monitor dimming support + kPMHasStartupTimerMask = (1<<10), // 1=can program startup timer + kPMHasChargeNotificationMask = (1<<11), // 1=client can determine charger status/get notifications + kPMHasDimSuspendSupportMask = (1<<12), // 1=can dim diplay to DPMS ('off') state + kPMHasWakeOnNetActivityMask = (1<<13), // 1=supports waking upon receipt of net packet + kPMHasWakeOnLidMask = (1<<14), // 1=can wake upon lid/case opening + kPMCanPowerOffPCIBusMask = (1<<15), // 1=can remove power from PCI bus on sleep + kPMHasDeepSleepMask = (1<<16), // 1=supports deep (hibernation) sleep + kPMHasSleepMask = (1<<17), // 1=machine support low power sleep (ala powerbooks) + kPMSupportsServerModeAPIMask = (1<<18), // 1=supports reboot on AC resume for unexpected power loss + kPMHasUPSIntegrationMask = (1<<19) // 1=supports incorporating UPS devices into power source calcs +}; + +// PRIVATE power management features +// NOTE: this is a direct port from classic, some of these bits +// are obsolete but are included for completeness. +enum { + kPMHasExtdBattInfoMask = (1<<0), // Not used + kPMHasBatteryIDMask = (1<<1), // Not used + kPMCanSwitchPowerMask = (1<<2), // Not used + kPMHasCelsiusCyclingMask = (1<<3), // Not used + kPMHasBatteryPredictionMask = (1<<4), // Not used + kPMHasPowerLevelsMask = (1<<5), // Not used + kPMHasSleepCPUSpeedMask = (1<<6), // Not used + kPMHasBtnIntHandlersMask = (1<<7), // 1=supports individual button interrupt handlers + kPMHasSCSITermPowerMask = (1<<8), // 1=supports SCSI termination power switch + kPMHasADBButtonHandlersMask = (1<<9), // 1=supports button handlers via ADB + kPMHasICTControlMask = (1<<10), // 1=supports ICT control + kPMHasLegacyDesktopSleepMask = (1<<11), // 1=supports 'doze' style sleep + kPMHasDeepIdleMask = (1<<12), // 1=supports Idle2 in hardware + kPMOpenLidPreventsSleepMask = (1<<13), // 1=open case prevent machine from sleeping + kPMClosedLidCausesSleepMask = (1<<14), // 1=case closed (clamshell closed) causes sleep + kPMHasFanControlMask = (1<<15), // 1=machine has software-programmable fan/thermostat controls + kPMHasThermalControlMask = (1<<16), // 1=machine supports thermal monitoring + kPMHasVStepSpeedChangeMask = (1<<17), // 1=machine supports processor voltage/clock change + kPMEnvironEventsPolledMask = (1<<18) // 1=machine doesn't generate pmu env ints, we must poll instead +}; + +// DEFAULT public and private features for machines whose device tree +// does NOT contain this information (pre-Core99). + +// For Cuda-based Desktops + +#define kStdDesktopPMFeatures kPMHasWakeupTimerMask |\ + kPMHasProcessorCyclingMask |\ + kPMHasDimmingSupportMask |\ + kPMHasStartupTimerMask |\ + kPMSupportsServerModeAPIMask |\ + kPMHasUPSIntegrationMask + +#define kStdDesktopPrivPMFeatures kPMHasExtdBattInfoMask |\ + kPMHasICTControlMask |\ + kPMHasLegacyDesktopSleepMask + +#define kStdDesktopNumBatteries 0 + +// For Wallstreet (PowerBook G3 Series 1998) + +#define kWallstreetPMFeatures kPMHasWakeupTimerMask |\ + kPMHasProcessorCyclingMask |\ + kPMHasReducedSpeedMask |\ + kPMDynamicSpeedChangeMask |\ + kPMHasSCSIDiskModeMask |\ + kPMCanGetBatteryTimeMask |\ + kPMHasDimmingSupportMask |\ + kPMHasChargeNotificationMask |\ + kPMHasDimSuspendSupportMask |\ + kPMHasSleepMask + +#define kWallstreetPrivPMFeatures kPMHasExtdBattInfoMask |\ + kPMHasBatteryIDMask |\ + kPMCanSwitchPowerMask |\ + kPMHasADBButtonHandlersMask |\ + kPMHasSCSITermPowerMask |\ + kPMHasICTControlMask |\ + kPMClosedLidCausesSleepMask |\ + kPMEnvironEventsPolledMask + +#define kStdPowerBookPMFeatures kWallstreetPMFeatures +#define kStdPowerBookPrivPMFeatures kWallstreetPrivPMFeatures + +#define kStdPowerBookNumBatteries 2 + +// For 101 (PowerBook G3 Series 1999) + +#define k101PMFeatures kPMHasWakeupTimerMask |\ + kPMHasProcessorCyclingMask |\ + kPMHasReducedSpeedMask |\ + kPMDynamicSpeedChangeMask |\ + kPMHasSCSIDiskModeMask |\ + kPMCanGetBatteryTimeMask |\ + kPMHasDimmingSupportMask |\ + kPMHasChargeNotificationMask |\ + kPMHasDimSuspendSupportMask |\ + kPMHasSleepMask |\ + kPMHasUPSIntegrationMask + +#define k101PrivPMFeatures kPMHasExtdBattInfoMask |\ + kPMHasBatteryIDMask |\ + kPMCanSwitchPowerMask |\ + kPMHasADBButtonHandlersMask |\ + kPMHasSCSITermPowerMask |\ + kPMHasICTControlMask |\ + kPMClosedLidCausesSleepMask |\ + kPMEnvironEventsPolledMask + + +// These flags are deprecated. Use the version with the kIOPM prefix in IOPM.h +enum { + kACInstalled = (1<<0), + kBatteryCharging = (1<<1), + kBatteryInstalled = (1<<2), + kUPSInstalled = (1<<3), + kBatteryAtWarn = (1<<4), + kBatteryDepleted = (1<<5), + kACnoChargeCapability = (1<<6), // AC adapter cannot charge battery + kRawLowBattery = (1<<7), // used only by Platform Expert + kForceLowSpeed = (1<<8) // set by Platfm Expert, chk'd by Pwr Plugin}; +}; + +#endif /* __ppc32 */ +#endif /* _IOPMDeprecated_h_ */ diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMLibDefs.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMLibDefs.h.svn-base new file mode 100644 index 0000000..ff25bf3 --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMLibDefs.h.svn-base @@ -0,0 +1,40 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + + +#define kPMSetAggressiveness 0 +#define kPMGetAggressiveness 1 +#define kPMSleepSystem 2 +#define kPMAllowPowerChange 3 +#define kPMCancelPowerChange 4 +#define kPMShutdownSystem 5 +#define kPMRestartSystem 6 +#define kPMSleepSystemOptions 7 +#define kPMSetMaintenanceWakeCalendar 8 + +#define kNumPMMethods 9 diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPowerSource.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPowerSource.h.svn-base new file mode 100644 index 0000000..ed68918 --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPowerSource.h.svn-base @@ -0,0 +1,300 @@ +/* + * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOPMPowerSource_h_ +#define _IOPMPowerSource_h_ + +#include +#include +#include +#include +#include + +enum { + kSecondsPerHour = 3600, + kTenMinutesInSeconds = 600 +}; + +/* class IOPMPowerSource + * + * See IOKit/pwr_mgt/IOPM.h for power source keys relevant to this class. These + * report-type keys are required for calls to IOPMPowerSource::setReportables(), + * and they define the IORegistry interface through which data is passed back + * up to the rest of the system. + * + * A subclassing driver that doesn't want to do anything fancy should: + * 1. Subclass IOPMPowerSource + * 3. Install its own battery change notifications or polling routine that can + * converse with actual battery hardware. + * 4. When battery state changes, change the relevant member variables + * through setCurrentCapacity() style accessors. + * 5. Call updateStatus() on itself when all such settings have been updated. + * + * The subclass driver should also initially populate its settings and call + * updateStatus() on launch. + * + * + * Settings + * + * ExternalConnected + * Type: bool + * IORegistry Key: kIOPMPSExternalConnectedKey + * True if computer is drawing external power + * + * ExternalChargeCapable + * Type: bool + * IORegistry Key: kIOPMPSExternalChargeCapableKey + * True if external power is capable of charging internal battery + * + * BatteryInstalled + * Type: bool + * IORegistry Key: kIOPMPSBatteryInstalledKey + * True if a battery is present; false if removed + * + * IsCharging + * Type: bool + * IORegistry Key: kIOPMPSIsChargingKey + * True if battery is charging itself from external power + * + * AtWarnLevel + * Type: bool + * IORegistry Key: kIOPMPSAtWarnLevelKey + * True if draining battery capacity and past warn level + * + * AtCriticalLevel + * Type: bool + * IORegistry Key: kIOPMPSAtCriticalLevelKey + * True if draining battery capacity and past critical level + * + * CurrentCapacity + * MaxCapacity + * Type: unsigned int + * IORegistry Key: kIOPMPSCurrentCapacityKey, kIOPMPSMaxCapacityKey + * Capacity measured in mAh + * + * TimeRemaining + * Type: int + * IORegistry Key: kIOPMPSTimeRemainingKey + * Time remaining measured in minutes + * + * Amperage + * Type: int + * IORegistry Key: kIOPMPSAmperageKey + * Current is measured in mA + * + * Voltage + * Type: unsigned int + * IORegistry Key: kIOPMPSVoltageKey + * Voltage measured in mV + * + * CycleCount + * Type: unsigned int + * IORegistry Key: kIOPMPSCycleCountKey + * Number of charge/discharge cycles + * + * AdapterInfo + * Type: int + * IORegistry Key: kIOPMPSAdapterInfoKey + * Power adapter information + * + * Location + * Type: int + * IORegistry Key: kIOPMPSLocationKey + * Clue about battery's location in machine - Left vs. Right + * + * ErrorCondition + * Type: OSSymbol + * IORegistry Key: kIOPMPSErrorConditionKey + * String describing error state of battery + * + * Manufacturer + * Type: OSSymbol + * IORegistry Key: kIOPMPSManufacturerKey + * String describing battery manufacturer + * + * Manufactured Date + * Type: unsigned 16-bit bitfield + * IORegistry Key: kIOPMPSManufactureDateKey + * Date is published in a bitfield per the Smart Battery Data spec rev 1.1 + * in section 5.1.26 + * Bits 0...4 => day (value 1-31; 5 bits) + * Bits 5...8 => month (value 1-12; 4 bits) + * Bits 9...15 => years since 1980 (value 0-127; 7 bits) + * + * Model + * Type: OSSymbol + * IORegistry Key: kIOPMPSModelKey + * String describing model number + * + * Serial + * Type: OSSymbol + * IORegistry Key: kIOPMPSSerialKey + * String describing serial number or unique info + * The serial number published hear bears no correspondence to the Apple serial + * number printed on each battery. This is a manufacturer serial number with + * no correlation to the printed serial number. + * + * LegacyIOBatteryInfo + * Type: OSDictionary + * IORegistry Key: kIOPMPSLegacyBatteryInfoKey + * Dictionary conforming to the OS X 10.0-10.4 + */ + +class IOPMPowerSource : public IOService +{ + OSDeclareDefaultStructors(IOPMPowerSource) + + friend class IOPMPowerSourceList; + + protected: + +/* bool settingsChangedSinceLastUpdate + * Used by subclasses to determine if any settings have been modified via the + * accessors below since last call to update(). true is settings have changed; + * false otherwise. + */ + bool settingsChangedSinceUpdate; + +/* OSDictionary properties + * Stores power source state + */ + OSDictionary *properties; + + const OSSymbol *externalConnectedKey; + const OSSymbol *externalChargeCapableKey; + const OSSymbol *batteryInstalledKey; + const OSSymbol *chargingKey; + const OSSymbol *warnLevelKey; + const OSSymbol *criticalLevelKey; + const OSSymbol *currentCapacityKey; + const OSSymbol *maxCapacityKey; + const OSSymbol *timeRemainingKey; + const OSSymbol *amperageKey; + const OSSymbol *voltageKey; + const OSSymbol *cycleCountKey; + const OSSymbol *adapterInfoKey; + const OSSymbol *locationKey; + const OSSymbol *errorConditionKey; + const OSSymbol *manufacturerKey; + const OSSymbol *modelKey; + const OSSymbol *serialKey; + const OSSymbol *batteryInfoKey; + + // Tracking for IOPMPowerSourceList + IOPMPowerSource *nextInList; + + public: + +/*! @function powerSource + @abstract Creates a new IOPMPowerSource nub. Must be attached to IORegistry, + and registered by provider. +*/ + static IOPMPowerSource *powerSource(void); + + virtual bool init(void); + + virtual void free(void); + +/*! @function updateStatus + @abstract Must be called by physical battery controller when battery state + has changed significantly. + @discussion The system will not poll this object for battery updates. Rather \ + the battery's controller must call updateStatus() every time state changes \ + and the settings will be relayed to higher levels of power management. \ + The subclassing driver should override this only if the driver needs to add \ + new settings to the base class. +*/ + virtual void updateStatus(void); + +/* Public accessors for battery state + */ + bool externalConnected(void); + bool externalChargeCapable(void); + bool batteryInstalled(void); + bool isCharging(void); + bool atWarnLevel(void); + bool atCriticalLevel(void); + + unsigned int currentCapacity(void); + unsigned int maxCapacity(void); + unsigned int capacityPercentRemaining(void); + int timeRemaining(void); + int amperage(void); + unsigned int voltage(void); + unsigned int cycleCount(void); + int adapterInfo(void); + int location(void); + + OSSymbol *errorCondition(void); + OSSymbol *manufacturer(void); + OSSymbol *model(void); + OSSymbol *serial(void); + OSDictionary *legacyIOBatteryInfo(void); + + OSObject *getPSProperty(const OSSymbol *); + +protected: + +/* Protected "setter" methods for subclasses + * Subclasses should use these setters to modify all battery properties. + * + * Subclasses must follow all property changes with a call to updateStatus() + * to flush settings changes to upper level battery API clients. + * + */ + void setExternalConnected(bool); + void setExternalChargeCapable(bool); + void setBatteryInstalled(bool); + void setIsCharging(bool); + void setAtWarnLevel(bool); + void setAtCriticalLevel(bool); + + void setCurrentCapacity(unsigned int); + void setMaxCapacity(unsigned int); + void setTimeRemaining(int); + void setAmperage(int); + void setVoltage(unsigned int); + void setCycleCount(unsigned int); + void setAdapterInfo(int); + void setLocation(int); + + void setErrorCondition(OSSymbol *); + void setManufacturer(OSSymbol *); + void setModel(OSSymbol *); + void setSerial(OSSymbol *); + void setLegacyIOBatteryInfo(OSDictionary *); + +/* All of these methods funnel through the generic accessor method + setPSProperty. Caller can pass in any arbitrary OSSymbol key, and + that value will be stored in the PM settings dictionary, and relayed + onto the IORegistry at update time. + */ + void setPSProperty(const OSSymbol *, OSObject *); +}; + +#endif diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPowerSourceList.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPowerSourceList.h.svn-base new file mode 100644 index 0000000..cb1c8ea --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPowerSourceList.h.svn-base @@ -0,0 +1,54 @@ +/* + * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#include +#include + +class IOPMPowerSource; + +class IOPMPowerSourceList : public OSObject +{ + OSDeclareDefaultStructors(IOPMPowerSourceList) + private: + // pointer to first power source in list + IOPMPowerSource *firstItem; + + // how many power sources are in the list + unsigned long length; + + public: + void initialize(void); + void free(void); + + unsigned long numberOfItems(void); + IOReturn addToList(IOPMPowerSource *newPowerSource); + IOReturn removeFromList(IOPMPowerSource *theItem); + + IOPMPowerSource *firstInList(void); + IOPMPowerSource *nextInList(IOPMPowerSource *currentItem); +}; + diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPrivate.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPrivate.h.svn-base new file mode 100644 index 0000000..bf50d78 --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPrivate.h.svn-base @@ -0,0 +1,269 @@ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _IOKIT_IOPMPRIVATE_H +#define _IOKIT_IOPMPRIVATE_H + +#include + +/*****************************************************************************/ + +// Private power commands issued to root domain +// bits 0-7 in IOPM.h + +enum { + kIOPMSetValue = (1<<16), + // don't sleep on clamshell closure on a portable with AC connected + kIOPMSetDesktopMode = (1<<17), + // set state of AC adaptor connected + kIOPMSetACAdaptorConnected = (1<<18) +}; + +/*****************************************************************************/ +/*****************************************************************************/ + +/* + * PM notification types + */ + +/* @constant kIOPMStateConsoleUserShutdown + * @abstract Notification of GUI shutdown state available to kexts. + * @discussion This type can be passed as arguments to registerPMSettingController() + * to receive callbacks. + */ +#define kIOPMStateConsoleShutdown "ConsoleShutdown" + +/* @enum ShutdownValues + * @abstract Potential values shared with key kIOPMStateConsoleUserShutdown + */ +enum { +/* @constant kIOPMStateConsoleShutdownNone + * @abstract System shutdown (or restart) hasn't started; system is ON. + * @discussion Next state: 2 + */ + kIOPMStateConsoleShutdownNone = 1, +/* @constant kIOPMStateConsoleShutdownPossible + * @abstract User has been presented with the option to shutdown or restart. Shutdown may be cancelled. + * @discussion Next state may be: 1, 4 + */ + kIOPMStateConsoleShutdownPossible = 2, +/* @constant kIOPMStateConsoleShutdownUnderway + * @abstract Shutdown or restart is proceeding. It may still be cancelled. + * @discussion Next state may be: 1, 4. This state is currently unused. + */ + kIOPMStateConsoleShutdownUnderway = 3, +/* @constant kIOPMStateConsoleShutdownCertain + * @abstract Shutdown is in progress and irrevocable. + * @discussion State remains 4 until power is removed from CPU. + */ + kIOPMStateConsoleShutdownCertain = 4 +}; + +/*****************************************************************************/ +/*****************************************************************************/ + +/* PM Statistics - event indices + * These are arguments to IOPMrootDomain::pmStatsRecordEvent(). + */ +enum { + kIOPMStatsHibernateImageWrite = 1, + kIOPMStatsHibernateImageRead, + kIOPMStatsDriversNotify, + kIOPMStatsApplicationNotify, + kIOPMStatsLateDriverAcknowledge, + kIOPMStatsLateAppAcknowledge, + + // To designate if you're specifying the start or stop end of + // each of the above events, do a bitwise OR of the appropriate + // Start/Stop flag and pass the result to IOPMrootDomain to record + // the event. + kIOPMStatsEventStartFlag = (1 << 24), + kIOPMStatsEventStopFlag = (1 << 25) +}; + +// Keys for IOPMrootDomain registry properties +#define kIOPMSleepStatisticsKey "SleepStatistics" +#define kIOPMSleepStatisticsAppsKey "AppStatistics" + +// Application response statistics +#define kIOPMStatsNameKey "Name" +#define kIOPMStatsPIDKey "Pid" +#define kIOPMStatsTimeMSKey "TimeMS" +#define kIOPMStatsApplicationResponseTypeKey "ResponseType" +#define kIOPMStatsMessageTypeKey "MessageType" + +// PM Statistics: potential values for the key kIOPMStatsApplicationResponseTypeKey +// entry in the application results array. +#define kIOPMStatsResponseTimedOut "ResponseTimedOut" +#define kIOPMStatsResponseCancel "ResponseCancel" +#define kIOPMStatsResponseSlow "ResponseSlow" + +typedef struct { + struct bounds{ + uint64_t start; + uint64_t stop; + }; + + struct bounds hibWrite; + struct bounds hibRead; +// bounds driverNotifySleep; +// bounds driverNotifyWake; +// bounds appNotifySleep; +// bounds appNotifyWake; +// OSDictionary *tardyApps; +// OSDictionary *tardyDrivers; +} PMStatsStruct; + +/*****************************************************************************/ + +/* PM RootDomain tracePoints + * + * In the sleep/wake process, we expect the sleep trace points to proceed + * in increasing order. Once sleep begins with code kIOPMTracePointSleepStarted = 0x11, + * we expect sleep to continue in a monotonically increasing order of tracepoints + * to kIOPMTracePointSystemLoginwindowPhase = 0x30. After trace point SystemLoginWindowPhase, + * the system will return to kIOPMTracePointSystemUp = 0x00. + * + * If the trace point decreases (instead of increasing) before reaching kIOPMTracePointSystemUp, + * that indicates that the sleep process was cancelled. The cancel reason shall be indicated + * in the cancel tracepoint. (TBD) + */ + +enum { +/* When kTracePointSystemUp is the latest tracePoint, + the system is awake. It is not asleep, sleeping, or waking. + + * Phase begins: At boot, at completion of wake from sleep, + immediately following kIOPMTracePointSystemLoginwindowPhase. + * Phase ends: When a sleep attempt is initiated. + */ + kIOPMTracePointSystemUp = 0, + +/* When kIOPMTracePointSleepStarted we have just initiated sleep. + + Note: The state prior to kIOPMTracePointSleepStarted may be only one of: + * kIOPMTracePointSystemUp + * kIOPMTracePointSystemLoginwindowPhase or + + * Phase begins: At initiation of system sleep (idle or forced). + * Phase ends: As we start to notify applications of system sleep. + */ + kIOPMTracePointSleepStarted = 0x11, + +/* When kTracePointSystemSleepAppsPhase is the latest tracePoint, + a system sleep has been irrevocably inititated and PM waits + for responses from notified applications. + + * Phase begins: Begin to asynchronously fire kIOMessageSystemWillSleep notifications, + * and in the case of an idle sleep kIOMessageCanSystemSleep as well. + * Phase ends: When we have received all user & interested kernel acknowledgements. + */ + kIOPMTracePointSystemSleepAppsPhase = 0x12, + + +/* When kIOPMTracePointSystemHibernatePhase is the latest tracePoint, + PM is writing the hiernate image to disk. + */ + kIOPMTracePointSystemHibernatePhase = 0x13, + +/* When kTracePointSystemSleepDriversPhase is the latest tracePoint, + PM is iterating the driver tree powering off devices individually. + + * Phase begins: When IOPMrootDomain has received all of its power acknowledgements and begins + * executing IOService::powerDomainWillChangeTo() + * Phase ends: When IOPMrootDomain::powerChangeDone begins executing CPU shutoff code. + */ + kIOPMTracePointSystemSleepDriversPhase = 0x14, + +/* When kTracePointSystemSleepPlatformPhase is the latest tracePoint, + all apps and drivers have notified of sleep. Plotfarm is powering + off CPU; or system is asleep; or low level wakeup is underway. + + Note: If a system is asleep and then loses power, and it does not have a hibernate + image to restore from (e.g. hibernatemode = 0), then OS X may interpret this power + loss as a system crash in the kTracePointSystemSleepPlatformPhase, since the + power loss resembles a hang or crash, and the power being removed by the user. + + * Phase begins: IOPMrootDomain has already shut off drivers, and is now powering off CPU. + * Phase ends: Immediately after CPU's are powered back on during wakeup. + */ + kIOPMTracePointSystemSleepPlatformPhase = 0x15, + +/* When kTracePointSystemWakeDriversPhase is the latest tracePoint, + System CPU is powered, PM is notifying drivers of system wake. + + * Phase begins: CPU's have successfully powered up and OS is executing. + * Phase ends: All drivers have handled power events & acknowledged completion. + IOPMrootDomain is about to deliver kIOMessageSystemHasPoweredOn. + */ + kIOPMTracePointSystemWakeDriversPhase = 0x21, + +/* When kTracePointSystemWakeAppsPhase is the latest tracePoint, + System CPU is powered, PM has powered on each driver. + + * Phase begins: IOPMrootDomain::tellChangeUp before sending asynchronous + kIOMessageSystemHasPoweredOn notifications + * Phase ends: IOPMrootDomain::tellChangeUp after sending asynchronous notifications + */ + kIOPMTracePointSystemWakeAppsPhase = 0x22, + +/* kIOPMTracePointSystemLoginwindowPhase + This phase represents a several minute window after the system has powered on. + Higher levels of system diagnostics are in a heightened state of alert in this phase, + in case any user errors occurred that we could not detect in software. + + This several minute window + + * Phase begins: After IOPMrootDomain sends kIOMessageSystemHasPoweredOn message. + * Phase ends: When loginwindow calls IOPMSleepWakeSetUUID(NULL) the system shall + be considered awake and usable. The next phase shall be kIOPMTracePointSystemUp. + */ + kIOPMTracePointSystemLoginwindowPhase = 0x30 +}; + +/*****************************************************************************/ + +/* +Ê* kIOPMLoginWindowSecurityDebugKey - identifies PM debug data specific to LoginWindow + * for use with IOPMrootDomain. +Ê*/ +#define kIOPMLoginWindowSecurityDebugKey "LoginWindowSecurity" + +// For PM internal use only - key to locate sleep failure results within SCDynamicStore. +#define kIOPMDynamicStoreSleepFailureKey "SleepFailure" + +/*****************************************************************************/ + +// For IOPMLibPrivate.h +#define kIOPMSleepWakeFailureKey "PMFailurePhase" +#define kIOPMSleepWakeFailureCodeKey "PMStatusCode" +#define kIOPMSleepWakeFailureLoginKey "LWFailurePhase" +#define kIOPMSleepWakeFailureUUIDKey "UUID" +#define kIOPMSleepWakeFailureDateKey "Date" + +#endif /* ! _IOKIT_IOPMPRIVATE_H */ + diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMpowerState.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMpowerState.h.svn-base new file mode 100644 index 0000000..f7f4c8a --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMpowerState.h.svn-base @@ -0,0 +1,72 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#include + +/*! @header IOPMpowerState.h + @abstract Defines the struct IOPMPowerState that power managed drivers should use to describe their power states. +*/ + +/*! @struct IOPMPowerState + @abstract Describes a device's power state. + @discussion To take part in system power management, drivers should define an array of 2 or more power states and pass it to kernel power management through IOService::registerPowerDriver. + @field version Defines version number of this struct. Just use the value "1" when defining an IOPMPowerState. + @field capabilityFlags Describes the capability of the device in this state. + @field outputPowerCharacter Describes the power provided in this state. + @field inputPowerRequirement Describes the input power required in this state. + @field staticPower Describes average consumption in milliwatts. Unused; drivers may specify 0. + @field unbudgetedPower Describes additional consumption from separate power supply (milliWatts). Unused; drivers may specify 0. + @field powerToAttain Describes dditional power to attain this state from next lower state (in milliWatts). Unused; drivers may specify 0. + @field timeToAttain Describes time required to enter this state from next lower state (in microseconds). Unused; drivers may specify 0. + @field settleUpTime Describes settle time required after entering this state from next lower state (microseconds). Unused; drivers may specify 0. + @field timeToLower Describes time required to enter next lower state from this one (microseconds). Unused; drivers may specify 0. + @field settleDownTime Settle time required after entering next lower state from this state (microseconds). Unused; drivers may specify 0. + @field powerDomainBudget Describes power in milliWatts a domain in this state can deliver to its children. Unused; drivers may specify 0. +} +*/ + +struct IOPMPowerState +{ + unsigned long version; + IOPMPowerFlags capabilityFlags; + IOPMPowerFlags outputPowerCharacter; + IOPMPowerFlags inputPowerRequirement; + unsigned long staticPower; + unsigned long unbudgetedPower; + unsigned long powerToAttain; + unsigned long timeToAttain; + unsigned long settleUpTime; + unsigned long timeToLower; + unsigned long settleDownTime; + unsigned long powerDomainBudget; +}; + +typedef struct IOPMPowerState IOPMPowerState; + +enum { + kIOPMPowerStateVersion1 = 1 +}; diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPowerConnection.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPowerConnection.h.svn-base new file mode 100644 index 0000000..179035b --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPowerConnection.h.svn-base @@ -0,0 +1,159 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_IOPOWERCONNECTION_H +#define _IOKIT_IOPOWERCONNECTION_H + +#include +#include + +class IOPowerConnection : public IOService +{ + OSDeclareDefaultStructors(IOPowerConnection) + +protected: + /*! @field parentKnowsState true: parent knows state of its domain + used by child */ + bool stateKnown; + /*! @field currentPowerFlags power flags which describe the current state of the power domain + used by child */ + IOPMPowerFlags currentPowerFlags; + /*! @field desiredDomainState state number which corresponds to the child's desire + used by parent */ + unsigned long desiredDomainState; + + /*! @field requestFlag set to true when desiredDomainState is set */ + bool requestFlag; + + /*! @field preventIdleSleepFlag true if child has this bit set in its desired state + used by parent */ + unsigned long preventIdleSleepFlag; + + /*! @field preventSystemSleepFlag true if child has this bit set in its desired state + used by parent */ + unsigned long preventSystemSleepFlag; + + /*! @field awaitingAck true if child has not yet acked our notification + used by parent */ + bool awaitingAck; + + /*! @field readyFlag true if the child has been added as a power child + used by parent */ + bool readyFlag; + +public: + /*! @function setParentKnowsState + @abstract Sets the stateKnown variable. + @discussion Called by the parent when the object is created and called by the child when it discovers that the parent now knows its state. */ + void setParentKnowsState (bool ); + + /*! @function setParentCurrentPowerFlags + @abstract Sets the currentPowerFlags variable. + @discussion Called by the parent when the object is created and called by the child when it discovers that the parent state is changing. */ + void setParentCurrentPowerFlags (IOPMPowerFlags ); + + /*! @function parentKnowsState + @abstract Returns the stateKnown variable. */ + bool parentKnowsState (void ); + + /*! @function parentCurrentPowerFlags + @abstract Returns the currentPowerFlags variable. */ + IOPMPowerFlags parentCurrentPowerFlags (void ); + + /*! @function setDesiredDomainState + @abstract Sets the desiredDomainState variable. + @discussion Called by the parent. */ + void setDesiredDomainState (unsigned long ); + + /*! @function getDesiredDomainState + @abstract Returns the desiredDomainState variable. + @discussion Called by the parent. */ + unsigned long getDesiredDomainState ( void ); + + /*! @function setChildHasRequestedPower + @abstract Set the flag that says that the child has called requestPowerDomainState. + @discussion Called by the parent. */ + void setChildHasRequestedPower ( void ); + + + /*! @function childHasRequestedPower + @abstract Return the flag that says whether the child has called requestPowerDomainState. + @discussion Called by the PCI Aux Power Supply Driver to see if a device driver + is power managed. */ + bool childHasRequestedPower ( void ); + + /*! @function setPreventIdleSleepFlag + @abstract Sets the preventIdleSleepFlag variable. + @discussion Called by the parent. */ + void setPreventIdleSleepFlag (unsigned long ); + + /*! @function getPreventIdleSleepFlag + @abstract Returns the preventIdleSleepFlag variable. + @discussion Called by the parent. */ + bool getPreventIdleSleepFlag ( void ); + + /*! @function setPreventSystemSleepFlag + @abstract Sets the preventSystemSleepFlag variable. + @discussion Called by the parent. */ + void setPreventSystemSleepFlag (unsigned long ); + + /*! @function getPreventSystemSleepFlag + @abstract Returns the preventSystemSleepFlag variable. + @discussion Called by the parent. */ + bool getPreventSystemSleepFlag ( void ); + + /*! @function setAwaitingAck + @abstract Sets the awaitingAck variable. + @discussion Called by the parent. */ + void setAwaitingAck ( bool ); + + /*! @function getAwaitingAck + @abstract Returns the awaitingAck variable. + @discussion Called by the parent. */ + bool getAwaitingAck ( void ); + + /*! @function setReadyFlag + @abstract Sets the readyFlag variable. + @discussion Called by the parent. */ + void setReadyFlag( bool flag ); + + /*! @function getReadyFlag + @abstract Returns the readyFlag variable. + @discussion Called by the parent. */ + bool getReadyFlag( void ) const; +}; + +#endif /* ! _IOKIT_IOPOWERCONNECTION_H */ + diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/RootDomain.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/RootDomain.h.svn-base new file mode 100644 index 0000000..6f4ebee --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/.svn/text-base/RootDomain.h.svn-base @@ -0,0 +1,251 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _IOKIT_ROOTDOMAIN_H +#define _IOKIT_ROOTDOMAIN_H + +#include +#include +#include "IOKit/pwr_mgt/IOPMPrivate.h" + + +class IOPMPowerStateQueue; +class RootDomainUserClient; +class PMTraceWorker; + +/* + * Flags for get/setSleepSupported() + */ +enum { + kRootDomainSleepNotSupported = 0x00000000, + kRootDomainSleepSupported = 0x00000001, + kFrameBufferDeepSleepSupported = 0x00000002, + kPCICantSleep = 0x00000004 +}; + +/* + *IOPMrootDomain registry property keys + */ +#define kRootDomainSupportedFeatures "Supported Features" +#define kRootDomainSleepReasonKey "Last Sleep Reason" +#define kRootDomainSleepOptionsKey "Last Sleep Options" +#define kIOPMRootDomainWakeReasonKey "Wake Reason" +#define kIOPMRootDomainWakeTypeKey "Wake Type" +#define kIOPMRootDomainPowerStatusKey "Power Status" + +/* + * Possible sleep reasons found under kRootDomainSleepReasonsKey + */ +#define kIOPMClamshellSleepKey "Clamshell Sleep" +#define kIOPMPowerButtonSleepKey "Power Button Sleep" +#define kIOPMSoftwareSleepKey "Software Sleep" +#define kIOPMOSSwitchHibernationKey "OS Switch Sleep" +#define kIOPMIdleSleepKey "Idle Sleep" +#define kIOPMLowPowerSleepKey "Low Power Sleep" +#define kIOPMThermalEmergencySleepKey "Thermal Emergency Sleep" +#define kIOPMMaintenanceSleepKey "Maintenance Sleep" + +/* + * String constants for communication with PM CPU + */ +#define kIOPMRootDomainLidCloseCString "LidClose" +#define kIOPMRootDomainBatPowerCString "BatPower" + +/* + * Supported Feature bitfields for IOPMrootDomain::publishFeature() + */ +enum { + kIOPMSupportedOnAC = (1<<0), + kIOPMSupportedOnBatt = (1<<1), + kIOPMSupportedOnUPS = (1<<2) +}; + +typedef IOReturn (*IOPMSettingControllerCallback) + (OSObject *target, const OSSymbol *type, + OSObject *val, uintptr_t refcon); + +__BEGIN_DECLS +IONotifier * registerSleepWakeInterest( + IOServiceInterestHandler, void *, void * = 0); + +IONotifier * registerPrioritySleepWakeInterest( + IOServiceInterestHandler handler, + void * self, void * ref = 0); + +IOReturn acknowledgeSleepWakeNotification(void * ); + +IOReturn vetoSleepWakeNotification(void * PMrefcon); +__END_DECLS + +#define IOPM_ROOTDOMAIN_REV 2 + +class IOPMrootDomain: public IOService +{ + OSDeclareFinalStructors(IOPMrootDomain) + +public: + static IOPMrootDomain * construct( void ); + + virtual bool start( IOService * provider ); + virtual IOReturn setAggressiveness( unsigned long, unsigned long ); + virtual IOReturn getAggressiveness( unsigned long, unsigned long * ); + + virtual IOReturn sleepSystem( void ); + IOReturn sleepSystemOptions( OSDictionary *options ); + + virtual IOReturn setProperties( OSObject * ); + +/*! @function systemPowerEventOccurred + @abstract Other drivers may inform IOPMrootDomain of system PM events + @discussion systemPowerEventOccurred is a richer alternative to receivePowerNotification() + Only Apple-owned kexts should have reason to call systemPowerEventOccurred. + @param event An OSSymbol describing the type of power event. + @param value A 32-bit integer value associated with the event. + @param shouldUpdate indicates whether the root domain should send a notification + to interested parties. Pass false if you're calling systemPowerEventOccurred + several times in succession; and pass true only on the last invocatino. + @result kIOReturnSuccess on success */ + + IOReturn systemPowerEventOccurred( + const OSSymbol *event, + uint32_t intValue ); + + IOReturn systemPowerEventOccurred( + const OSSymbol *event, + OSObject *value ); + + virtual IOReturn receivePowerNotification( UInt32 msg ); + + virtual void setSleepSupported( IOOptionBits flags ); + + virtual IOOptionBits getSleepSupported( void ); + + void wakeFromDoze( void ); + + // KEXT driver announces support of power management feature + + void publishFeature( const char *feature ); + + // KEXT driver announces support of power management feature + // And specifies power sources with kIOPMSupportedOn{AC/Batt/UPS} bitfield. + // Returns a unique uint32_t identifier for later removing support for this + // feature. + // NULL is acceptable for uniqueFeatureID for kexts without plans to unload. + + void publishFeature( const char *feature, + uint32_t supportedWhere, + uint32_t *uniqueFeatureID); + + // KEXT driver announces removal of a previously published power management + // feature. Pass 'uniqueFeatureID' returned from publishFeature() + + IOReturn removePublishedFeature( uint32_t removeFeatureID ); + +/*! @function copyPMSetting + @abstract Copy the current value for a PM setting. Returns an OSNumber or + OSData depending on the setting. + @param whichSetting Name of the desired setting. + @result OSObject value if valid, NULL otherwise. */ + + OSObject * copyPMSetting( OSSymbol *whichSetting ); + +/*! @function registerPMSettingController + @abstract Register for callbacks on changes to certain PM settings. + @param settings NULL terminated array of C strings, each string for a PM + setting that the caller is interested in and wants to get callbacks for. + @param callout C function ptr or member function cast as such. + @param target The target of the callback, usually 'this' + @param refcon Will be passed to caller in callback; for caller's use. + @param handle Caller should keep the OSObject * returned here. If non-NULL, + handle will have a retain count of 1 on return. To deregister, pass to + unregisterPMSettingController() + @result kIOReturnSuccess on success. */ + + IOReturn registerPMSettingController( + const OSSymbol *settings[], + IOPMSettingControllerCallback callout, + OSObject *target, + uintptr_t refcon, + OSObject **handle); // out param + +/*! @function registerPMSettingController + @abstract Register for callbacks on changes to certain PM settings. + @param settings NULL terminated array of C strings, each string for a PM + setting that the caller is interested in and wants to get callbacks for. + @param supportedPowerSources bitfield indicating which power sources these + settings are supported for (kIOPMSupportedOnAC, etc.) + @param callout C function ptr or member function cast as such. + @param target The target of the callback, usually 'this' + @param refcon Will be passed to caller in callback; for caller's use. + @param handle Caller should keep the OSObject * returned here. If non-NULL, + handle will have a retain count of 1 on return. To deregister, pass to + unregisterPMSettingController() + @result kIOReturnSuccess on success. */ + + IOReturn registerPMSettingController( + const OSSymbol *settings[], + uint32_t supportedPowerSources, + IOPMSettingControllerCallback callout, + OSObject *target, + uintptr_t refcon, + OSObject **handle); // out param + + virtual IONotifier * registerInterest( + const OSSymbol * typeOfInterest, + IOServiceInterestHandler handler, + void * target, void * ref = 0 ); + + void pmStatsRecordEvent( + int eventIndex, + AbsoluteTime timestamp); + + void pmStatsRecordApplicationResponse( + const OSSymbol *response, + const char *name, + int messageType, + uint32_t delay_ms, + int app_pid); + + virtual IOReturn callPlatformFunction( + const OSSymbol *functionName, + bool waitForFunction, + void *param1, void *param2, + void *param3, void *param4 ); + +private: + virtual IOReturn changePowerStateTo( unsigned long ordinal ); + virtual IOReturn changePowerStateToPriv( unsigned long ordinal ); + virtual IOReturn requestPowerDomainState( IOPMPowerFlags, IOPowerConnection *, unsigned long ); + virtual void powerChangeDone( unsigned long ); + virtual bool tellChangeDown( unsigned long ); + virtual bool askChangeDown( unsigned long ); + virtual void tellChangeUp( unsigned long ); + virtual void tellNoChangeDown( unsigned long ); +}; + + +#endif /* _IOKIT_ROOTDOMAIN_H */ diff --git a/i386/include/IOKit/pwr_mgt/IOPM.h b/i386/include/IOKit/pwr_mgt/IOPM.h new file mode 100644 index 0000000..7d78225 --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/IOPM.h @@ -0,0 +1,654 @@ +/* + * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _IOKIT_IOPM_H +#define _IOKIT_IOPM_H + +#include +#include +#include + +#ifdef __ppc__ +#include +#endif + +/*! @header IOPM.h + @abstract Defines power management constants and keys used by both in-kernel and user space power management. + @discussion IOPM.h defines a range of power management constants used in several in-kernel and user space APIs. Most significantly, the IOPMPowerFlags used to specify the fields of an IOPMPowerState struct are defined here. + + Most of the constants defined in IOPM.h are deprecated or for Apple internal use only, and are not elaborated on in headerdoc. +*/ + +enum { + kIOPMMaxPowerStates = 10, + IOPMMaxPowerStates = kIOPMMaxPowerStates +}; + +/*! @enum IOPMPowerFlags + @abstract Bits are used in defining capabilityFlags, inputPowerRequirements, and outputPowerCharacter in the IOPMPowerState structure. + @discussion These bits may be bitwise-OR'd together in the IOPMPowerState capabilityFlags field, the outputPowerCharacter field, and/or the inputPowerRequirement field. + + The comments clearly mark whether each flag should be used in the capabilityFlags field, outputPowerCharacter field, and inputPowerRequirement field, or all three. + + The value of capabilityFlags, inputPowerRequirement or outputPowerCharacter may be 0. Most drivers implement their 'OFF' state, used when asleep, by defininf each of the 3 fields as 0. + + The bits listed below are only the most common bits used to define a device's power states. Your device's IO family may require that your device specify other input or output power flags to interact properly. Consult family-specific documentation to determine if your IOPower plane parents or children require other power flags; they probably don't. + + @constant kIOPMPowerOn Indicates the device is on, requires power, and provides power. Useful as a: Capability, InputPowerRequirement, OutputPowerCharacter + + @constant kIOPMDeviceUsable Indicates the device is usable in this state. Useful only as a Capability + + @constant kIOPMLowPower + Indicates device is in a low power state. May be bitwis-OR'd together + with kIOPMDeviceUsable flag, to indicate the device is still usable. + + A device with a capability of kIOPMLowPower may: + Require either 0 or kIOPMPowerOn from its power parent + Offer either kIOPMLowPower, kIOPMPowerOn, or 0 (no power at all) + to its power plane children. + + Useful only as a Capability, although USB drivers should consult USB family documentation for other valid circumstances to use the kIOPMLowPower bit. + + @constant kIOPMPreventIdleSleep + In the capability field of a power state, disallows idle system sleep while the device is in that state. + + For example, displays and disks set this capability for their ON power state; since the system may not idle sleep while the display (and thus keyboard or mouse) or the disk is active. + + Useful only as a Capability. + + @constant kIOPMSleepCapability + Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. + + @constant kIOPMRestartCapability + Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. + + @constant kIOPMSleep + Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. + + @constant kIOPMRestart + Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. +*/ +typedef unsigned long IOPMPowerFlags; +enum { + kIOPMPowerOn = 0x00000002, + kIOPMDeviceUsable = 0x00008000, + kIOPMLowPower = 0x00010000, + kIOPMPreventIdleSleep = 0x00000040, + kIOPMSleepCapability = 0x00000004, + kIOPMRestartCapability = 0x00000080, + kIOPMSleep = 0x00000001, + kIOPMRestart = 0x00000080 +}; + +/* + * Private IOPMPowerFlags + * + * For Apple use only + * Not for use with non-Apple drivers + * Their behavior is undefined + */ +enum { + kIOPMClockNormal = 0x0004, + kIOPMClockRunning = 0x0008, + kIOPMPreventSystemSleep = 0x0010, + kIOPMDoze = 0x0400, + kIOPMChildClamp = 0x0080, + kIOPMChildClamp2 = 0x0200, + kIOPMNotPowerManaged = 0x0800 +}; + + +/* + * Deprecated IOPMPowerFlags + * Their behavior is undefined when used in IOPMPowerState + * Capability, InputPowerRequirement, or OutputPowerCharacter fields. + */ +enum { + kIOPMMaxPerformance = 0x4000, + kIOPMPassThrough = 0x0100, + kIOPMAuxPowerOn = 0x0020, + kIOPMNotAttainable = 0x0001, + kIOPMContextRetained = 0x2000, + kIOPMConfigRetained = 0x1000, + kIOPMStaticPowerValid = 0x0800, + kIOPMSoftSleep = 0x0400, + kIOPMCapabilitiesMask = kIOPMPowerOn | kIOPMDeviceUsable | + kIOPMMaxPerformance | kIOPMContextRetained | + kIOPMConfigRetained | kIOPMSleepCapability | + kIOPMRestartCapability +}; + +/* + * Support for old names of IOPMPowerFlag constants + */ +enum { + IOPMNotAttainable = kIOPMNotAttainable, + IOPMPowerOn = kIOPMPowerOn, + IOPMClockNormal = kIOPMClockNormal, + IOPMClockRunning = kIOPMClockRunning, + IOPMAuxPowerOn = kIOPMAuxPowerOn, + IOPMDeviceUsable = kIOPMDeviceUsable, + IOPMMaxPerformance = kIOPMMaxPerformance, + IOPMContextRetained = kIOPMContextRetained, + IOPMConfigRetained = kIOPMConfigRetained, + IOPMNotPowerManaged = kIOPMNotPowerManaged, + IOPMSoftSleep = kIOPMSoftSleep +}; + + +enum { + kIOPMNextHigherState = 1, + kIOPMHighestState = 2, + kIOPMNextLowerState = 3, + kIOPMLowestState = 4 +}; + +enum { + IOPMNextHigherState = kIOPMNextHigherState, + IOPMHighestState = kIOPMHighestState, + IOPMNextLowerState = kIOPMNextLowerState, + IOPMLowestState = kIOPMLowestState +}; + +// Internal commands used by power managment command queue +enum { + kIOPMBroadcastAggressiveness = 1, + kIOPMUnidleDevice +}; + +// Power consumption unknown value +enum { + kIOPMUnknown = 0xFFFF +}; + +/******************************************************************************* + * + * Root Domain property keys of interest + * + ******************************************************************************/ + +/* AppleClamshellState + * reflects the state of the clamshell (lid) on a portable. + * It has a boolean value. + * true == clamshell is closed + * false == clamshell is open + * not present == no clamshell on this hardware + */ +#define kAppleClamshellStateKey "AppleClamshellState" + +/* AppleClamshellCausesSleep + * reflects the clamshell close behavior on a portable. + * It has a boolean value. + * true == system will sleep when clamshell is closed + * false == system will not sleep on clamshell close + * (typically external display mode) + * not present == no clamshell on this hardware + */ +#define kAppleClamshellCausesSleepKey "AppleClamshellCausesSleep" + +/* kIOPMSleepWakeUUIDKey + * Key refers to a CFStringRef that will uniquely identify + * a sleep/wake cycle for logging & tracking. + * The key becomes valid at the beginning of a sleep cycle - before we + * initiate any sleep/wake notifications. + * The key becomes invalid at the completion of a system wakeup. The + * property will not be present in the IOPMrootDomain's registry entry + * when it is invalid. + * + * See IOPMrootDomain notification kIOPMMessageSleepWakeUUIDChange + */ + #define kIOPMSleepWakeUUIDKey "SleepWakeUUID" + +/******************************************************************************* + * + * Root Domain general interest messages + * + * Available by registering for interest type 'gIOGeneralInterest' + * on IOPMrootDomain. + * + ******************************************************************************/ + +/* kIOPMMessageClamshellStateChange + * Delivered as a general interest notification on the IOPMrootDomain + * IOPMrootDomain sends this message when state of either AppleClamshellState + * or AppleClamshellCausesSleep changes. If this clamshell change results in + * a sleep, the sleep will initiate soon AFTER delivery of this message. + * The state of both variables is encoded in a bitfield argument sent with + * the message. Check bits 0 and 1 using kClamshellStateBit & kClamshellSleepBit + */ +enum { + kClamshellStateBit = (1 << 0), + kClamshellSleepBit = (1 << 1) +}; + +#define kIOPMMessageClamshellStateChange \ + iokit_family_msg(sub_iokit_powermanagement, 0x100) + +/* kIOPMMessageFeatureChange + * Delivered when the set of supported features ("Supported Features" dictionary + * under IOPMrootDomain registry) changes in some way. Typically addition or + * removal of a supported feature. + * RootDomain passes no argument with this message. + */ +#define kIOPMMessageFeatureChange \ + iokit_family_msg(sub_iokit_powermanagement, 0x110) + +/* kIOPMMessageInflowDisableCancelled + * The battery has drained completely to its "Fully Discharged" state. + * If a user process has disabled battery inflow for battery + * calibration, we forcibly re-enable Inflow at this point. + * If inflow HAS been forcibly re-enabled, bit 0 + * (kInflowForciblyEnabledBit) will be set. + */ +enum { + kInflowForciblyEnabledBit = (1 << 0) +}; + +/* kIOPMMessageInternalBatteryFullyDischarged + * The battery has drained completely to its "Fully Discharged" state. + */ +#define kIOPMMessageInternalBatteryFullyDischarged \ + iokit_family_msg(sub_iokit_powermanagement, 0x120) + +/* kIOPMMessageSystemPowerEventOccurred + * Some major system thermal property has changed, and interested clients may + * modify their behavior. + */ +#define kIOPMMessageSystemPowerEventOccurred \ + iokit_family_msg(sub_iokit_powermanagement, 0x130) + +/* kIOPMMessageSleepWakeUUIDChange + * Either a new SleepWakeUUID has been specified at the beginning of a sleep, + * or we're removing the existing property upon completion of a wakeup. + */ +#define kIOPMMessageSleepWakeUUIDChange \ + iokit_family_msg(sub_iokit_powermanagement, 0x140) + +/* kIOPMMessageSleepWakeUUIDSet + * Argument accompanying the kIOPMMessageSleepWakeUUIDChange notification when + * a new UUID has been specified. + */ +#define kIOPMMessageSleepWakeUUIDSet ((void *)1) + +/* kIOPMMessageSleepWakeUUIDCleared + * Argument accompanying the kIOPMMessageSleepWakeUUIDChange notification when + * the current UUID has been removed. + */ +#define kIOPMMessageSleepWakeUUIDCleared ((void *)0) + +/******************************************************************************* + * + * Power commands issued to root domain + * Use with IOPMrootDomain::receivePowerNotification() + * + * These commands are issued from system drivers only: + * ApplePMU, AppleSMU, IOGraphics, AppleACPIFamily + * + ******************************************************************************/ +enum { + kIOPMSleepNow = (1<<0), // put machine to sleep now + kIOPMAllowSleep = (1<<1), // allow idle sleep + kIOPMPreventSleep = (1<<2), // do not allow idle sleep + kIOPMPowerButton = (1<<3), // power button was pressed + kIOPMClamshellClosed = (1<<4), // clamshell was closed + kIOPMPowerEmergency = (1<<5), // battery dangerously low + kIOPMDisableClamshell = (1<<6), // do not sleep on clamshell closure + kIOPMEnableClamshell = (1<<7), // sleep on clamshell closure + kIOPMProcessorSpeedChange = (1<<8), // change the processor speed + kIOPMOverTemp = (1<<9), // system dangerously hot + kIOPMClamshellOpened = (1<<10) // clamshell was opened +}; + + +/******************************************************************************* + * + * Power Management Return Codes + * + ******************************************************************************/ +enum { + kIOPMNoErr = 0, + + // Returned by driver's setPowerState(), powerStateWillChangeTo(), + // powerStateDidChangeTo(), or acknowledgeSetPowerState() to + // implicitly acknowledge power change upon function return. + kIOPMAckImplied = 0, + + // Deprecated + kIOPMWillAckLater = 1, + + // Returned by requestPowerDomainState() to indicate + // unrecognized specification parameter. + kIOPMBadSpecification = 4, + + // Returned by requestPowerDomainState() to indicate + // no power state matches search specification. + kIOPMNoSuchState = 5, + + // Deprecated + kIOPMCannotRaisePower = 6, + + // Deprecated + kIOPMParameterError = 7, + + // Returned when power management state is accessed + // before driver has called PMinit(). + kIOPMNotYetInitialized = 8, + + // And the old constants; deprecated + IOPMNoErr = kIOPMNoErr, + IOPMAckImplied = kIOPMAckImplied, + IOPMWillAckLater = kIOPMWillAckLater, + IOPMBadSpecification = kIOPMBadSpecification, + IOPMNoSuchState = kIOPMNoSuchState, + IOPMCannotRaisePower = kIOPMCannotRaisePower, + IOPMParameterError = kIOPMParameterError, + IOPMNotYetInitialized = kIOPMNotYetInitialized +}; + + +// IOPMPowerSource class descriptive strings +// Power Source state is published as properties to the IORegistry under these +// keys. +#define kIOPMPSExternalConnectedKey "ExternalConnected" +#define kIOPMPSExternalChargeCapableKey "ExternalChargeCapable" +#define kIOPMPSBatteryInstalledKey "BatteryInstalled" +#define kIOPMPSIsChargingKey "IsCharging" +#define kIOPMFullyChargedKey "FullyCharged" +#define kIOPMPSAtWarnLevelKey "AtWarnLevel" +#define kIOPMPSAtCriticalLevelKey "AtCriticalLevel" +#define kIOPMPSCurrentCapacityKey "CurrentCapacity" +#define kIOPMPSMaxCapacityKey "MaxCapacity" +#define kIOPMPSDesignCapacityKey "DesignCapacity" +#define kIOPMPSTimeRemainingKey "TimeRemaining" +#define kIOPMPSAmperageKey "Amperage" +#define kIOPMPSVoltageKey "Voltage" +#define kIOPMPSCycleCountKey "CycleCount" +#define kIOPMPSMaxErrKey "MaxErr" +#define kIOPMPSAdapterInfoKey "AdapterInfo" +#define kIOPMPSLocationKey "Location" +#define kIOPMPSErrorConditionKey "ErrorCondition" +#define kIOPMPSManufacturerKey "Manufacturer" +#define kIOPMPSManufactureDateKey "ManufactureDate" +#define kIOPMPSModelKey "Model" +#define kIOPMPSSerialKey "Serial" +#define kIOPMDeviceNameKey "DeviceName" +#define kIOPMPSLegacyBatteryInfoKey "LegacyBatteryInfo" +#define kIOPMPSBatteryHealthKey "BatteryHealth" +#define kIOPMPSHealthConfidenceKey "HealthConfidence" +#define kIOPMPSCapacityEstimatedKey "CapacityEstimated" +#define kIOPMPSBatteryChargeStatusKey "ChargeStatus" +#define kIOPMPSBatteryTemperatureKey "Temperature" + +// kIOPMPSBatteryChargeStatusKey may have one of the following values, or may have +// no value. If kIOPMBatteryChargeStatusKey has a NULL value (or no value) associated with it +// then charge is proceeding normally. If one of these battery charge status reasons is listed, +// then the charge may have been interrupted. +#define kIOPMBatteryChargeStatusTooHot "HighTemperature" +#define kIOPMBatteryChargeStatusTooCold "LowTemperature" +#define kIOPMBatteryChargeStatusGradient "BatteryTemperatureGradient" + +// Definitions for battery location, in case of multiple batteries. +// A location of 0 is unspecified +// Location is undefined for single battery systems +enum { + kIOPMPSLocationLeft = 1001, + kIOPMPSLocationRight = 1002 +}; + +// Battery quality health types, specified by BatteryHealth and HealthConfidence +// properties in an IOPMPowerSource battery kext. +enum { + kIOPMUndefinedValue = 0, + kIOPMPoorValue = 1, + kIOPMFairValue = 2, + kIOPMGoodValue = 3 +}; + +// Battery's time remaining estimate is invalid this long (seconds) after a wake +#define kIOPMPSInvalidWakeSecondsKey "BatteryInvalidWakeSeconds" + +// Battery must wait this long (seconds) after being completely charged before +// the battery is settled. +#define kIOPMPSPostChargeWaitSecondsKey "PostChargeWaitSeconds" + +// Battery must wait this long (seconds) after being completely discharged +// before the battery is settled. +#define kIOPMPSPostDishargeWaitSecondsKey "PostDischargeWaitSeconds" + + +/* CPU Power Management status keys + * Pass as arguments to IOPMrootDomain::systemPowerEventOccurred + * Or as arguments to IOPMSystemPowerEventOccurred() + * Or to decode the dictionary obtained from IOPMCopyCPUPowerStatus() + * These keys reflect restrictions placed on the CPU by the system + * to bring the CPU's power consumption within allowable thermal and + * power constraints. + */ + + +/* kIOPMGraphicsPowerLimitsKey + * The key representing the dictionary of graphics power limits. + * The dictionary contains the other kIOPMCPUPower keys & their associated + * values (e.g. Speed limit, Processor Count, and Schedule limits). + */ +#define kIOPMGraphicsPowerLimitsKey "Graphics_Power_Limits" + +/* kIOPMGraphicsPowerLimitPerformanceKey + * The key representing the percent of overall performance made available + * by the graphics chip as a percentage (integer 0 - 100). + */ +#define kIOPMGraphicsPowerLimitPerformanceKey "Graphics_Power_Performance" + + + +/* kIOPMCPUPowerLimitsKey + * The key representing the dictionary of CPU Power Limits. + * The dictionary contains the other kIOPMCPUPower keys & their associated + * values (e.g. Speed limit, Processor Count, and Schedule limits). + */ +#define kIOPMCPUPowerLimitsKey "CPU_Power_Limits" + +/* kIOPMCPUPowerLimitProcessorSpeedKey defines the speed & voltage limits placed + * on the CPU. + * Represented as a percentage (0-100) of maximum CPU speed. + */ +#define kIOPMCPUPowerLimitProcessorSpeedKey "CPU_Speed_Limit" + +/* kIOPMCPUPowerLimitProcessorCountKey reflects how many, if any, CPUs have been + * taken offline. Represented as an integer number of CPUs (0 - Max CPUs). + */ +#define kIOPMCPUPowerLimitProcessorCountKey "CPU_Available_CPUs" + +/* kIOPMCPUPowerLimitSchedulerTimeKey represents the percentage (0-100) of CPU time + * available. 100% at normal operation. The OS may limit this time for a percentage + * less than 100%. + */ +#define kIOPMCPUPowerLimitSchedulerTimeKey "CPU_Scheduler_Limit" + + +/* Thermal Level Warning Key + * Indicates the thermal constraints placed on the system. This value may + * cause clients to action to consume fewer system resources. + * The value associated with this warning is defined by the platform. + */ +#define kIOPMThermalLevelWarningKey "Thermal_Level_Warning" + +/* Thermal Warning Level values + * kIOPMThermalWarningLevelNormal - under normal operating conditions + * kIOPMThermalWarningLevelDanger - thermal pressure may cause system slowdown + * kIOPMThermalWarningLevelCrisis - thermal conditions may cause imminent shutdown + * + * The platform may define additional thermal levels if necessary. + */ +enum { + kIOPMThermalWarningLevelNormal = 0, + kIOPMThermalWarningLevelDanger = 5, + kIOPMThermalWarningLevelCrisis = 10 +}; + + +// PM Settings Controller setting types +// Settings types used primarily with: +// IOPMrootDomain::registerPMSettingController +// The values are identical to the similarly named keys for use in user space +// PM settings work. Those keys are defined in IOPMLibPrivate.h. +#define kIOPMSettingWakeOnRingKey "Wake On Modem Ring" +#define kIOPMSettingRestartOnPowerLossKey "Automatic Restart On Power Loss" +#define kIOPMSettingWakeOnACChangeKey "Wake On AC Change" +#define kIOPMSettingSleepOnPowerButtonKey "Sleep On Power Button" +#define kIOPMSettingWakeOnClamshellKey "Wake On Clamshell Open" +#define kIOPMSettingReduceBrightnessKey "ReduceBrightness" +#define kIOPMSettingDisplaySleepUsesDimKey "Display Sleep Uses Dim" +#define kIOPMSettingTimeZoneOffsetKey "TimeZoneOffsetSeconds" +#define kIOPMSettingMobileMotionModuleKey "MobileMotionModule" +#define kIOPMSettingGraphicsSwitchKey "GPUSwitch" + +// Setting controlling drivers can register to receive scheduled wake data +// Either in "CF seconds" type, or structured calendar data in a formatted +// IOPMCalendarStruct defined below. +#define kIOPMSettingAutoWakeSecondsKey "wake" +#define kIOPMSettingAutoWakeCalendarKey "WakeByCalendarDate" +#define kIOPMSettingAutoPowerSecondsKey "poweron" +#define kIOPMSettingAutoPowerCalendarKey "PowerByCalendarDate" + +// Debug seconds auto wake +// Used by sleep cycling debug tools +#define kIOPMSettingDebugWakeRelativeKey "WakeRelativeToSleep" +#define kIOPMSettingDebugPowerRelativeKey "PowerRelativeToShutdown" + +// Maintenance wake calendar. +#define kIOPMSettingMaintenanceWakeCalendarKey "MaintenanceWakeCalendarDate" + +struct IOPMCalendarStruct { + UInt32 year; + UInt8 month; + UInt8 day; + UInt8 hour; + UInt8 minute; + UInt8 second; +}; +typedef struct IOPMCalendarStruct IOPMCalendarStruct; + +// SetAggressiveness types +enum { + kPMGeneralAggressiveness = 0, + kPMMinutesToDim, + kPMMinutesToSpinDown, + kPMMinutesToSleep, + kPMEthernetWakeOnLANSettings, + kPMSetProcessorSpeed, + kPMPowerSource, + kPMMotionSensor, + kPMLastAggressivenessType +}; +#define kMaxType (kPMLastAggressivenessType-1) + +// SetAggressiveness values for the kPMPowerSource aggressiveness type +enum { + kIOPMInternalPower = 1, + kIOPMExternalPower +}; + +#define kIOREMSleepEnabledKey "REMSleepEnabled" + +// Strings for deciphering the dictionary returned from IOPMCopyBatteryInfo +#define kIOBatteryInfoKey "IOBatteryInfo" +#define kIOBatteryCurrentChargeKey "Current" +#define kIOBatteryCapacityKey "Capacity" +#define kIOBatteryFlagsKey "Flags" +#define kIOBatteryVoltageKey "Voltage" +#define kIOBatteryAmperageKey "Amperage" +#define kIOBatteryCycleCountKey "Cycle Count" + +enum { + kIOBatteryInstalled = (1 << 2), + kIOBatteryCharge = (1 << 1), + kIOBatteryChargerConnect = (1 << 0) +}; + + +// Private power management message indicating battery data has changed +// Indicates new data resides in the IORegistry +#define kIOPMMessageBatteryStatusHasChanged iokit_family_msg(sub_iokit_pmu, 0x100) + +// Apple private Legacy messages for re-routing AutoWake and AutoPower messages to the PMU +// through newer user space IOPMSchedulePowerEvent API +#define kIOPMUMessageLegacyAutoWake iokit_family_msg(sub_iokit_pmu, 0x200) +#define kIOPMUMessageLegacyAutoPower iokit_family_msg(sub_iokit_pmu, 0x210) + +// For use with IOPMPowerSource bFlags +#define IOPM_POWER_SOURCE_REV 2 +enum { + kIOPMACInstalled = kIOBatteryChargerConnect, + kIOPMBatteryCharging = kIOBatteryCharge, + kIOPMBatteryInstalled = kIOBatteryInstalled, + kIOPMUPSInstalled = (1<<3), + kIOPMBatteryAtWarn = (1<<4), + kIOPMBatteryDepleted = (1<<5), + kIOPMACnoChargeCapability = (1<<6), // AC adapter cannot charge battery + kIOPMRawLowBattery = (1<<7), // used only by Platform Expert + kIOPMForceLowSpeed = (1<<8), // set by Platfm Expert, chk'd by Pwr Plugin + kIOPMClosedClamshell = (1<<9), // set by PMU - reflects state of the clamshell + kIOPMClamshellStateOnWake = (1<<10) // used only by Platform Expert +}; + + +// ********************************************** +// Internal power management data structures +// ********************************************** + +#if KERNEL && __cplusplus +class IOService; + +enum { + kIOPowerEmergencyLevel = 1000 +}; + +enum { + kIOPMSubclassPolicy, + kIOPMSuperclassPolicy1 +}; + +struct stateChangeNote{ + IOPMPowerFlags stateFlags; + unsigned long stateNum; + void * powerRef; +}; +typedef struct stateChangeNote stateChangeNote; + +struct IOPowerStateChangeNotification { + void * powerRef; + unsigned long returnValue; + unsigned long stateNumber; + IOPMPowerFlags stateFlags; +}; +typedef struct IOPowerStateChangeNotification IOPowerStateChangeNotification; +typedef IOPowerStateChangeNotification sleepWakeNote; +#endif /* KERNEL && __cplusplus */ + +#endif /* ! _IOKIT_IOPM_H */ + diff --git a/i386/include/IOKit/pwr_mgt/IOPMDeprecated.h b/i386/include/IOKit/pwr_mgt/IOPMDeprecated.h new file mode 100644 index 0000000..3bee01a --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/IOPMDeprecated.h @@ -0,0 +1,177 @@ +/* + * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOPMDeprecated_h_ +#define _IOPMDeprecated_h_ + +#ifdef __ppc__ + +// Power events +enum { + kClamshellClosedEventMask = (1<<0), // User closed lid + kDockingBarEventMask = (1<<1), // OBSOLETE + kACPlugEventMask = (1<<2), // User plugged or unplugged adapter + kFrontPanelButtonEventMask = (1<<3), // User hit the front panel button + kBatteryStatusEventMask = (1<<4) // Battery status has changed +}; + +// PUBLIC power management features +// NOTE: this is a direct port from classic, some of these bits +// are obsolete but are included for completeness +enum { + kPMHasWakeupTimerMask = (1<<0), // 1=wake timer is supported + kPMHasSharedModemPortMask = (1<<1), // Not used + kPMHasProcessorCyclingMask = (1<<2), // 1=processor cycling supported + kPMMustProcessorCycleMask = (1<<3), // Not used + kPMHasReducedSpeedMask = (1<<4), // 1=supports reduced processor speed + kPMDynamicSpeedChangeMask = (1<<5), // 1=supports changing processor speed on the fly + kPMHasSCSIDiskModeMask = (1<<6), // 1=supports using machine as SCSI drive + kPMCanGetBatteryTimeMask = (1<<7), // 1=battery time can be calculated + kPMCanWakeupOnRingMask = (1<<8), // 1=machine can wake on modem ring + kPMHasDimmingSupportMask = (1<<9), // 1=has monitor dimming support + kPMHasStartupTimerMask = (1<<10), // 1=can program startup timer + kPMHasChargeNotificationMask = (1<<11), // 1=client can determine charger status/get notifications + kPMHasDimSuspendSupportMask = (1<<12), // 1=can dim diplay to DPMS ('off') state + kPMHasWakeOnNetActivityMask = (1<<13), // 1=supports waking upon receipt of net packet + kPMHasWakeOnLidMask = (1<<14), // 1=can wake upon lid/case opening + kPMCanPowerOffPCIBusMask = (1<<15), // 1=can remove power from PCI bus on sleep + kPMHasDeepSleepMask = (1<<16), // 1=supports deep (hibernation) sleep + kPMHasSleepMask = (1<<17), // 1=machine support low power sleep (ala powerbooks) + kPMSupportsServerModeAPIMask = (1<<18), // 1=supports reboot on AC resume for unexpected power loss + kPMHasUPSIntegrationMask = (1<<19) // 1=supports incorporating UPS devices into power source calcs +}; + +// PRIVATE power management features +// NOTE: this is a direct port from classic, some of these bits +// are obsolete but are included for completeness. +enum { + kPMHasExtdBattInfoMask = (1<<0), // Not used + kPMHasBatteryIDMask = (1<<1), // Not used + kPMCanSwitchPowerMask = (1<<2), // Not used + kPMHasCelsiusCyclingMask = (1<<3), // Not used + kPMHasBatteryPredictionMask = (1<<4), // Not used + kPMHasPowerLevelsMask = (1<<5), // Not used + kPMHasSleepCPUSpeedMask = (1<<6), // Not used + kPMHasBtnIntHandlersMask = (1<<7), // 1=supports individual button interrupt handlers + kPMHasSCSITermPowerMask = (1<<8), // 1=supports SCSI termination power switch + kPMHasADBButtonHandlersMask = (1<<9), // 1=supports button handlers via ADB + kPMHasICTControlMask = (1<<10), // 1=supports ICT control + kPMHasLegacyDesktopSleepMask = (1<<11), // 1=supports 'doze' style sleep + kPMHasDeepIdleMask = (1<<12), // 1=supports Idle2 in hardware + kPMOpenLidPreventsSleepMask = (1<<13), // 1=open case prevent machine from sleeping + kPMClosedLidCausesSleepMask = (1<<14), // 1=case closed (clamshell closed) causes sleep + kPMHasFanControlMask = (1<<15), // 1=machine has software-programmable fan/thermostat controls + kPMHasThermalControlMask = (1<<16), // 1=machine supports thermal monitoring + kPMHasVStepSpeedChangeMask = (1<<17), // 1=machine supports processor voltage/clock change + kPMEnvironEventsPolledMask = (1<<18) // 1=machine doesn't generate pmu env ints, we must poll instead +}; + +// DEFAULT public and private features for machines whose device tree +// does NOT contain this information (pre-Core99). + +// For Cuda-based Desktops + +#define kStdDesktopPMFeatures kPMHasWakeupTimerMask |\ + kPMHasProcessorCyclingMask |\ + kPMHasDimmingSupportMask |\ + kPMHasStartupTimerMask |\ + kPMSupportsServerModeAPIMask |\ + kPMHasUPSIntegrationMask + +#define kStdDesktopPrivPMFeatures kPMHasExtdBattInfoMask |\ + kPMHasICTControlMask |\ + kPMHasLegacyDesktopSleepMask + +#define kStdDesktopNumBatteries 0 + +// For Wallstreet (PowerBook G3 Series 1998) + +#define kWallstreetPMFeatures kPMHasWakeupTimerMask |\ + kPMHasProcessorCyclingMask |\ + kPMHasReducedSpeedMask |\ + kPMDynamicSpeedChangeMask |\ + kPMHasSCSIDiskModeMask |\ + kPMCanGetBatteryTimeMask |\ + kPMHasDimmingSupportMask |\ + kPMHasChargeNotificationMask |\ + kPMHasDimSuspendSupportMask |\ + kPMHasSleepMask + +#define kWallstreetPrivPMFeatures kPMHasExtdBattInfoMask |\ + kPMHasBatteryIDMask |\ + kPMCanSwitchPowerMask |\ + kPMHasADBButtonHandlersMask |\ + kPMHasSCSITermPowerMask |\ + kPMHasICTControlMask |\ + kPMClosedLidCausesSleepMask |\ + kPMEnvironEventsPolledMask + +#define kStdPowerBookPMFeatures kWallstreetPMFeatures +#define kStdPowerBookPrivPMFeatures kWallstreetPrivPMFeatures + +#define kStdPowerBookNumBatteries 2 + +// For 101 (PowerBook G3 Series 1999) + +#define k101PMFeatures kPMHasWakeupTimerMask |\ + kPMHasProcessorCyclingMask |\ + kPMHasReducedSpeedMask |\ + kPMDynamicSpeedChangeMask |\ + kPMHasSCSIDiskModeMask |\ + kPMCanGetBatteryTimeMask |\ + kPMHasDimmingSupportMask |\ + kPMHasChargeNotificationMask |\ + kPMHasDimSuspendSupportMask |\ + kPMHasSleepMask |\ + kPMHasUPSIntegrationMask + +#define k101PrivPMFeatures kPMHasExtdBattInfoMask |\ + kPMHasBatteryIDMask |\ + kPMCanSwitchPowerMask |\ + kPMHasADBButtonHandlersMask |\ + kPMHasSCSITermPowerMask |\ + kPMHasICTControlMask |\ + kPMClosedLidCausesSleepMask |\ + kPMEnvironEventsPolledMask + + +// These flags are deprecated. Use the version with the kIOPM prefix in IOPM.h +enum { + kACInstalled = (1<<0), + kBatteryCharging = (1<<1), + kBatteryInstalled = (1<<2), + kUPSInstalled = (1<<3), + kBatteryAtWarn = (1<<4), + kBatteryDepleted = (1<<5), + kACnoChargeCapability = (1<<6), // AC adapter cannot charge battery + kRawLowBattery = (1<<7), // used only by Platform Expert + kForceLowSpeed = (1<<8) // set by Platfm Expert, chk'd by Pwr Plugin}; +}; + +#endif /* __ppc32 */ +#endif /* _IOPMDeprecated_h_ */ diff --git a/i386/include/IOKit/pwr_mgt/IOPMLibDefs.h b/i386/include/IOKit/pwr_mgt/IOPMLibDefs.h new file mode 100644 index 0000000..ff25bf3 --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/IOPMLibDefs.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + + +#define kPMSetAggressiveness 0 +#define kPMGetAggressiveness 1 +#define kPMSleepSystem 2 +#define kPMAllowPowerChange 3 +#define kPMCancelPowerChange 4 +#define kPMShutdownSystem 5 +#define kPMRestartSystem 6 +#define kPMSleepSystemOptions 7 +#define kPMSetMaintenanceWakeCalendar 8 + +#define kNumPMMethods 9 diff --git a/i386/include/IOKit/pwr_mgt/IOPMPowerSource.h b/i386/include/IOKit/pwr_mgt/IOPMPowerSource.h new file mode 100644 index 0000000..ed68918 --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/IOPMPowerSource.h @@ -0,0 +1,300 @@ +/* + * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOPMPowerSource_h_ +#define _IOPMPowerSource_h_ + +#include +#include +#include +#include +#include + +enum { + kSecondsPerHour = 3600, + kTenMinutesInSeconds = 600 +}; + +/* class IOPMPowerSource + * + * See IOKit/pwr_mgt/IOPM.h for power source keys relevant to this class. These + * report-type keys are required for calls to IOPMPowerSource::setReportables(), + * and they define the IORegistry interface through which data is passed back + * up to the rest of the system. + * + * A subclassing driver that doesn't want to do anything fancy should: + * 1. Subclass IOPMPowerSource + * 3. Install its own battery change notifications or polling routine that can + * converse with actual battery hardware. + * 4. When battery state changes, change the relevant member variables + * through setCurrentCapacity() style accessors. + * 5. Call updateStatus() on itself when all such settings have been updated. + * + * The subclass driver should also initially populate its settings and call + * updateStatus() on launch. + * + * + * Settings + * + * ExternalConnected + * Type: bool + * IORegistry Key: kIOPMPSExternalConnectedKey + * True if computer is drawing external power + * + * ExternalChargeCapable + * Type: bool + * IORegistry Key: kIOPMPSExternalChargeCapableKey + * True if external power is capable of charging internal battery + * + * BatteryInstalled + * Type: bool + * IORegistry Key: kIOPMPSBatteryInstalledKey + * True if a battery is present; false if removed + * + * IsCharging + * Type: bool + * IORegistry Key: kIOPMPSIsChargingKey + * True if battery is charging itself from external power + * + * AtWarnLevel + * Type: bool + * IORegistry Key: kIOPMPSAtWarnLevelKey + * True if draining battery capacity and past warn level + * + * AtCriticalLevel + * Type: bool + * IORegistry Key: kIOPMPSAtCriticalLevelKey + * True if draining battery capacity and past critical level + * + * CurrentCapacity + * MaxCapacity + * Type: unsigned int + * IORegistry Key: kIOPMPSCurrentCapacityKey, kIOPMPSMaxCapacityKey + * Capacity measured in mAh + * + * TimeRemaining + * Type: int + * IORegistry Key: kIOPMPSTimeRemainingKey + * Time remaining measured in minutes + * + * Amperage + * Type: int + * IORegistry Key: kIOPMPSAmperageKey + * Current is measured in mA + * + * Voltage + * Type: unsigned int + * IORegistry Key: kIOPMPSVoltageKey + * Voltage measured in mV + * + * CycleCount + * Type: unsigned int + * IORegistry Key: kIOPMPSCycleCountKey + * Number of charge/discharge cycles + * + * AdapterInfo + * Type: int + * IORegistry Key: kIOPMPSAdapterInfoKey + * Power adapter information + * + * Location + * Type: int + * IORegistry Key: kIOPMPSLocationKey + * Clue about battery's location in machine - Left vs. Right + * + * ErrorCondition + * Type: OSSymbol + * IORegistry Key: kIOPMPSErrorConditionKey + * String describing error state of battery + * + * Manufacturer + * Type: OSSymbol + * IORegistry Key: kIOPMPSManufacturerKey + * String describing battery manufacturer + * + * Manufactured Date + * Type: unsigned 16-bit bitfield + * IORegistry Key: kIOPMPSManufactureDateKey + * Date is published in a bitfield per the Smart Battery Data spec rev 1.1 + * in section 5.1.26 + * Bits 0...4 => day (value 1-31; 5 bits) + * Bits 5...8 => month (value 1-12; 4 bits) + * Bits 9...15 => years since 1980 (value 0-127; 7 bits) + * + * Model + * Type: OSSymbol + * IORegistry Key: kIOPMPSModelKey + * String describing model number + * + * Serial + * Type: OSSymbol + * IORegistry Key: kIOPMPSSerialKey + * String describing serial number or unique info + * The serial number published hear bears no correspondence to the Apple serial + * number printed on each battery. This is a manufacturer serial number with + * no correlation to the printed serial number. + * + * LegacyIOBatteryInfo + * Type: OSDictionary + * IORegistry Key: kIOPMPSLegacyBatteryInfoKey + * Dictionary conforming to the OS X 10.0-10.4 + */ + +class IOPMPowerSource : public IOService +{ + OSDeclareDefaultStructors(IOPMPowerSource) + + friend class IOPMPowerSourceList; + + protected: + +/* bool settingsChangedSinceLastUpdate + * Used by subclasses to determine if any settings have been modified via the + * accessors below since last call to update(). true is settings have changed; + * false otherwise. + */ + bool settingsChangedSinceUpdate; + +/* OSDictionary properties + * Stores power source state + */ + OSDictionary *properties; + + const OSSymbol *externalConnectedKey; + const OSSymbol *externalChargeCapableKey; + const OSSymbol *batteryInstalledKey; + const OSSymbol *chargingKey; + const OSSymbol *warnLevelKey; + const OSSymbol *criticalLevelKey; + const OSSymbol *currentCapacityKey; + const OSSymbol *maxCapacityKey; + const OSSymbol *timeRemainingKey; + const OSSymbol *amperageKey; + const OSSymbol *voltageKey; + const OSSymbol *cycleCountKey; + const OSSymbol *adapterInfoKey; + const OSSymbol *locationKey; + const OSSymbol *errorConditionKey; + const OSSymbol *manufacturerKey; + const OSSymbol *modelKey; + const OSSymbol *serialKey; + const OSSymbol *batteryInfoKey; + + // Tracking for IOPMPowerSourceList + IOPMPowerSource *nextInList; + + public: + +/*! @function powerSource + @abstract Creates a new IOPMPowerSource nub. Must be attached to IORegistry, + and registered by provider. +*/ + static IOPMPowerSource *powerSource(void); + + virtual bool init(void); + + virtual void free(void); + +/*! @function updateStatus + @abstract Must be called by physical battery controller when battery state + has changed significantly. + @discussion The system will not poll this object for battery updates. Rather \ + the battery's controller must call updateStatus() every time state changes \ + and the settings will be relayed to higher levels of power management. \ + The subclassing driver should override this only if the driver needs to add \ + new settings to the base class. +*/ + virtual void updateStatus(void); + +/* Public accessors for battery state + */ + bool externalConnected(void); + bool externalChargeCapable(void); + bool batteryInstalled(void); + bool isCharging(void); + bool atWarnLevel(void); + bool atCriticalLevel(void); + + unsigned int currentCapacity(void); + unsigned int maxCapacity(void); + unsigned int capacityPercentRemaining(void); + int timeRemaining(void); + int amperage(void); + unsigned int voltage(void); + unsigned int cycleCount(void); + int adapterInfo(void); + int location(void); + + OSSymbol *errorCondition(void); + OSSymbol *manufacturer(void); + OSSymbol *model(void); + OSSymbol *serial(void); + OSDictionary *legacyIOBatteryInfo(void); + + OSObject *getPSProperty(const OSSymbol *); + +protected: + +/* Protected "setter" methods for subclasses + * Subclasses should use these setters to modify all battery properties. + * + * Subclasses must follow all property changes with a call to updateStatus() + * to flush settings changes to upper level battery API clients. + * + */ + void setExternalConnected(bool); + void setExternalChargeCapable(bool); + void setBatteryInstalled(bool); + void setIsCharging(bool); + void setAtWarnLevel(bool); + void setAtCriticalLevel(bool); + + void setCurrentCapacity(unsigned int); + void setMaxCapacity(unsigned int); + void setTimeRemaining(int); + void setAmperage(int); + void setVoltage(unsigned int); + void setCycleCount(unsigned int); + void setAdapterInfo(int); + void setLocation(int); + + void setErrorCondition(OSSymbol *); + void setManufacturer(OSSymbol *); + void setModel(OSSymbol *); + void setSerial(OSSymbol *); + void setLegacyIOBatteryInfo(OSDictionary *); + +/* All of these methods funnel through the generic accessor method + setPSProperty. Caller can pass in any arbitrary OSSymbol key, and + that value will be stored in the PM settings dictionary, and relayed + onto the IORegistry at update time. + */ + void setPSProperty(const OSSymbol *, OSObject *); +}; + +#endif diff --git a/i386/include/IOKit/pwr_mgt/IOPMPowerSourceList.h b/i386/include/IOKit/pwr_mgt/IOPMPowerSourceList.h new file mode 100644 index 0000000..cb1c8ea --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/IOPMPowerSourceList.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#include +#include + +class IOPMPowerSource; + +class IOPMPowerSourceList : public OSObject +{ + OSDeclareDefaultStructors(IOPMPowerSourceList) + private: + // pointer to first power source in list + IOPMPowerSource *firstItem; + + // how many power sources are in the list + unsigned long length; + + public: + void initialize(void); + void free(void); + + unsigned long numberOfItems(void); + IOReturn addToList(IOPMPowerSource *newPowerSource); + IOReturn removeFromList(IOPMPowerSource *theItem); + + IOPMPowerSource *firstInList(void); + IOPMPowerSource *nextInList(IOPMPowerSource *currentItem); +}; + diff --git a/i386/include/IOKit/pwr_mgt/IOPMPrivate.h b/i386/include/IOKit/pwr_mgt/IOPMPrivate.h new file mode 100644 index 0000000..bf50d78 --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/IOPMPrivate.h @@ -0,0 +1,269 @@ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _IOKIT_IOPMPRIVATE_H +#define _IOKIT_IOPMPRIVATE_H + +#include + +/*****************************************************************************/ + +// Private power commands issued to root domain +// bits 0-7 in IOPM.h + +enum { + kIOPMSetValue = (1<<16), + // don't sleep on clamshell closure on a portable with AC connected + kIOPMSetDesktopMode = (1<<17), + // set state of AC adaptor connected + kIOPMSetACAdaptorConnected = (1<<18) +}; + +/*****************************************************************************/ +/*****************************************************************************/ + +/* + * PM notification types + */ + +/* @constant kIOPMStateConsoleUserShutdown + * @abstract Notification of GUI shutdown state available to kexts. + * @discussion This type can be passed as arguments to registerPMSettingController() + * to receive callbacks. + */ +#define kIOPMStateConsoleShutdown "ConsoleShutdown" + +/* @enum ShutdownValues + * @abstract Potential values shared with key kIOPMStateConsoleUserShutdown + */ +enum { +/* @constant kIOPMStateConsoleShutdownNone + * @abstract System shutdown (or restart) hasn't started; system is ON. + * @discussion Next state: 2 + */ + kIOPMStateConsoleShutdownNone = 1, +/* @constant kIOPMStateConsoleShutdownPossible + * @abstract User has been presented with the option to shutdown or restart. Shutdown may be cancelled. + * @discussion Next state may be: 1, 4 + */ + kIOPMStateConsoleShutdownPossible = 2, +/* @constant kIOPMStateConsoleShutdownUnderway + * @abstract Shutdown or restart is proceeding. It may still be cancelled. + * @discussion Next state may be: 1, 4. This state is currently unused. + */ + kIOPMStateConsoleShutdownUnderway = 3, +/* @constant kIOPMStateConsoleShutdownCertain + * @abstract Shutdown is in progress and irrevocable. + * @discussion State remains 4 until power is removed from CPU. + */ + kIOPMStateConsoleShutdownCertain = 4 +}; + +/*****************************************************************************/ +/*****************************************************************************/ + +/* PM Statistics - event indices + * These are arguments to IOPMrootDomain::pmStatsRecordEvent(). + */ +enum { + kIOPMStatsHibernateImageWrite = 1, + kIOPMStatsHibernateImageRead, + kIOPMStatsDriversNotify, + kIOPMStatsApplicationNotify, + kIOPMStatsLateDriverAcknowledge, + kIOPMStatsLateAppAcknowledge, + + // To designate if you're specifying the start or stop end of + // each of the above events, do a bitwise OR of the appropriate + // Start/Stop flag and pass the result to IOPMrootDomain to record + // the event. + kIOPMStatsEventStartFlag = (1 << 24), + kIOPMStatsEventStopFlag = (1 << 25) +}; + +// Keys for IOPMrootDomain registry properties +#define kIOPMSleepStatisticsKey "SleepStatistics" +#define kIOPMSleepStatisticsAppsKey "AppStatistics" + +// Application response statistics +#define kIOPMStatsNameKey "Name" +#define kIOPMStatsPIDKey "Pid" +#define kIOPMStatsTimeMSKey "TimeMS" +#define kIOPMStatsApplicationResponseTypeKey "ResponseType" +#define kIOPMStatsMessageTypeKey "MessageType" + +// PM Statistics: potential values for the key kIOPMStatsApplicationResponseTypeKey +// entry in the application results array. +#define kIOPMStatsResponseTimedOut "ResponseTimedOut" +#define kIOPMStatsResponseCancel "ResponseCancel" +#define kIOPMStatsResponseSlow "ResponseSlow" + +typedef struct { + struct bounds{ + uint64_t start; + uint64_t stop; + }; + + struct bounds hibWrite; + struct bounds hibRead; +// bounds driverNotifySleep; +// bounds driverNotifyWake; +// bounds appNotifySleep; +// bounds appNotifyWake; +// OSDictionary *tardyApps; +// OSDictionary *tardyDrivers; +} PMStatsStruct; + +/*****************************************************************************/ + +/* PM RootDomain tracePoints + * + * In the sleep/wake process, we expect the sleep trace points to proceed + * in increasing order. Once sleep begins with code kIOPMTracePointSleepStarted = 0x11, + * we expect sleep to continue in a monotonically increasing order of tracepoints + * to kIOPMTracePointSystemLoginwindowPhase = 0x30. After trace point SystemLoginWindowPhase, + * the system will return to kIOPMTracePointSystemUp = 0x00. + * + * If the trace point decreases (instead of increasing) before reaching kIOPMTracePointSystemUp, + * that indicates that the sleep process was cancelled. The cancel reason shall be indicated + * in the cancel tracepoint. (TBD) + */ + +enum { +/* When kTracePointSystemUp is the latest tracePoint, + the system is awake. It is not asleep, sleeping, or waking. + + * Phase begins: At boot, at completion of wake from sleep, + immediately following kIOPMTracePointSystemLoginwindowPhase. + * Phase ends: When a sleep attempt is initiated. + */ + kIOPMTracePointSystemUp = 0, + +/* When kIOPMTracePointSleepStarted we have just initiated sleep. + + Note: The state prior to kIOPMTracePointSleepStarted may be only one of: + * kIOPMTracePointSystemUp + * kIOPMTracePointSystemLoginwindowPhase or + + * Phase begins: At initiation of system sleep (idle or forced). + * Phase ends: As we start to notify applications of system sleep. + */ + kIOPMTracePointSleepStarted = 0x11, + +/* When kTracePointSystemSleepAppsPhase is the latest tracePoint, + a system sleep has been irrevocably inititated and PM waits + for responses from notified applications. + + * Phase begins: Begin to asynchronously fire kIOMessageSystemWillSleep notifications, + * and in the case of an idle sleep kIOMessageCanSystemSleep as well. + * Phase ends: When we have received all user & interested kernel acknowledgements. + */ + kIOPMTracePointSystemSleepAppsPhase = 0x12, + + +/* When kIOPMTracePointSystemHibernatePhase is the latest tracePoint, + PM is writing the hiernate image to disk. + */ + kIOPMTracePointSystemHibernatePhase = 0x13, + +/* When kTracePointSystemSleepDriversPhase is the latest tracePoint, + PM is iterating the driver tree powering off devices individually. + + * Phase begins: When IOPMrootDomain has received all of its power acknowledgements and begins + * executing IOService::powerDomainWillChangeTo() + * Phase ends: When IOPMrootDomain::powerChangeDone begins executing CPU shutoff code. + */ + kIOPMTracePointSystemSleepDriversPhase = 0x14, + +/* When kTracePointSystemSleepPlatformPhase is the latest tracePoint, + all apps and drivers have notified of sleep. Plotfarm is powering + off CPU; or system is asleep; or low level wakeup is underway. + + Note: If a system is asleep and then loses power, and it does not have a hibernate + image to restore from (e.g. hibernatemode = 0), then OS X may interpret this power + loss as a system crash in the kTracePointSystemSleepPlatformPhase, since the + power loss resembles a hang or crash, and the power being removed by the user. + + * Phase begins: IOPMrootDomain has already shut off drivers, and is now powering off CPU. + * Phase ends: Immediately after CPU's are powered back on during wakeup. + */ + kIOPMTracePointSystemSleepPlatformPhase = 0x15, + +/* When kTracePointSystemWakeDriversPhase is the latest tracePoint, + System CPU is powered, PM is notifying drivers of system wake. + + * Phase begins: CPU's have successfully powered up and OS is executing. + * Phase ends: All drivers have handled power events & acknowledged completion. + IOPMrootDomain is about to deliver kIOMessageSystemHasPoweredOn. + */ + kIOPMTracePointSystemWakeDriversPhase = 0x21, + +/* When kTracePointSystemWakeAppsPhase is the latest tracePoint, + System CPU is powered, PM has powered on each driver. + + * Phase begins: IOPMrootDomain::tellChangeUp before sending asynchronous + kIOMessageSystemHasPoweredOn notifications + * Phase ends: IOPMrootDomain::tellChangeUp after sending asynchronous notifications + */ + kIOPMTracePointSystemWakeAppsPhase = 0x22, + +/* kIOPMTracePointSystemLoginwindowPhase + This phase represents a several minute window after the system has powered on. + Higher levels of system diagnostics are in a heightened state of alert in this phase, + in case any user errors occurred that we could not detect in software. + + This several minute window + + * Phase begins: After IOPMrootDomain sends kIOMessageSystemHasPoweredOn message. + * Phase ends: When loginwindow calls IOPMSleepWakeSetUUID(NULL) the system shall + be considered awake and usable. The next phase shall be kIOPMTracePointSystemUp. + */ + kIOPMTracePointSystemLoginwindowPhase = 0x30 +}; + +/*****************************************************************************/ + +/* +Ê* kIOPMLoginWindowSecurityDebugKey - identifies PM debug data specific to LoginWindow + * for use with IOPMrootDomain. +Ê*/ +#define kIOPMLoginWindowSecurityDebugKey "LoginWindowSecurity" + +// For PM internal use only - key to locate sleep failure results within SCDynamicStore. +#define kIOPMDynamicStoreSleepFailureKey "SleepFailure" + +/*****************************************************************************/ + +// For IOPMLibPrivate.h +#define kIOPMSleepWakeFailureKey "PMFailurePhase" +#define kIOPMSleepWakeFailureCodeKey "PMStatusCode" +#define kIOPMSleepWakeFailureLoginKey "LWFailurePhase" +#define kIOPMSleepWakeFailureUUIDKey "UUID" +#define kIOPMSleepWakeFailureDateKey "Date" + +#endif /* ! _IOKIT_IOPMPRIVATE_H */ + diff --git a/i386/include/IOKit/pwr_mgt/IOPMpowerState.h b/i386/include/IOKit/pwr_mgt/IOPMpowerState.h new file mode 100644 index 0000000..f7f4c8a --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/IOPMpowerState.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#include + +/*! @header IOPMpowerState.h + @abstract Defines the struct IOPMPowerState that power managed drivers should use to describe their power states. +*/ + +/*! @struct IOPMPowerState + @abstract Describes a device's power state. + @discussion To take part in system power management, drivers should define an array of 2 or more power states and pass it to kernel power management through IOService::registerPowerDriver. + @field version Defines version number of this struct. Just use the value "1" when defining an IOPMPowerState. + @field capabilityFlags Describes the capability of the device in this state. + @field outputPowerCharacter Describes the power provided in this state. + @field inputPowerRequirement Describes the input power required in this state. + @field staticPower Describes average consumption in milliwatts. Unused; drivers may specify 0. + @field unbudgetedPower Describes additional consumption from separate power supply (milliWatts). Unused; drivers may specify 0. + @field powerToAttain Describes dditional power to attain this state from next lower state (in milliWatts). Unused; drivers may specify 0. + @field timeToAttain Describes time required to enter this state from next lower state (in microseconds). Unused; drivers may specify 0. + @field settleUpTime Describes settle time required after entering this state from next lower state (microseconds). Unused; drivers may specify 0. + @field timeToLower Describes time required to enter next lower state from this one (microseconds). Unused; drivers may specify 0. + @field settleDownTime Settle time required after entering next lower state from this state (microseconds). Unused; drivers may specify 0. + @field powerDomainBudget Describes power in milliWatts a domain in this state can deliver to its children. Unused; drivers may specify 0. +} +*/ + +struct IOPMPowerState +{ + unsigned long version; + IOPMPowerFlags capabilityFlags; + IOPMPowerFlags outputPowerCharacter; + IOPMPowerFlags inputPowerRequirement; + unsigned long staticPower; + unsigned long unbudgetedPower; + unsigned long powerToAttain; + unsigned long timeToAttain; + unsigned long settleUpTime; + unsigned long timeToLower; + unsigned long settleDownTime; + unsigned long powerDomainBudget; +}; + +typedef struct IOPMPowerState IOPMPowerState; + +enum { + kIOPMPowerStateVersion1 = 1 +}; diff --git a/i386/include/IOKit/pwr_mgt/IOPowerConnection.h b/i386/include/IOKit/pwr_mgt/IOPowerConnection.h new file mode 100644 index 0000000..179035b --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/IOPowerConnection.h @@ -0,0 +1,159 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + + +#ifndef _IOKIT_IOPOWERCONNECTION_H +#define _IOKIT_IOPOWERCONNECTION_H + +#include +#include + +class IOPowerConnection : public IOService +{ + OSDeclareDefaultStructors(IOPowerConnection) + +protected: + /*! @field parentKnowsState true: parent knows state of its domain + used by child */ + bool stateKnown; + /*! @field currentPowerFlags power flags which describe the current state of the power domain + used by child */ + IOPMPowerFlags currentPowerFlags; + /*! @field desiredDomainState state number which corresponds to the child's desire + used by parent */ + unsigned long desiredDomainState; + + /*! @field requestFlag set to true when desiredDomainState is set */ + bool requestFlag; + + /*! @field preventIdleSleepFlag true if child has this bit set in its desired state + used by parent */ + unsigned long preventIdleSleepFlag; + + /*! @field preventSystemSleepFlag true if child has this bit set in its desired state + used by parent */ + unsigned long preventSystemSleepFlag; + + /*! @field awaitingAck true if child has not yet acked our notification + used by parent */ + bool awaitingAck; + + /*! @field readyFlag true if the child has been added as a power child + used by parent */ + bool readyFlag; + +public: + /*! @function setParentKnowsState + @abstract Sets the stateKnown variable. + @discussion Called by the parent when the object is created and called by the child when it discovers that the parent now knows its state. */ + void setParentKnowsState (bool ); + + /*! @function setParentCurrentPowerFlags + @abstract Sets the currentPowerFlags variable. + @discussion Called by the parent when the object is created and called by the child when it discovers that the parent state is changing. */ + void setParentCurrentPowerFlags (IOPMPowerFlags ); + + /*! @function parentKnowsState + @abstract Returns the stateKnown variable. */ + bool parentKnowsState (void ); + + /*! @function parentCurrentPowerFlags + @abstract Returns the currentPowerFlags variable. */ + IOPMPowerFlags parentCurrentPowerFlags (void ); + + /*! @function setDesiredDomainState + @abstract Sets the desiredDomainState variable. + @discussion Called by the parent. */ + void setDesiredDomainState (unsigned long ); + + /*! @function getDesiredDomainState + @abstract Returns the desiredDomainState variable. + @discussion Called by the parent. */ + unsigned long getDesiredDomainState ( void ); + + /*! @function setChildHasRequestedPower + @abstract Set the flag that says that the child has called requestPowerDomainState. + @discussion Called by the parent. */ + void setChildHasRequestedPower ( void ); + + + /*! @function childHasRequestedPower + @abstract Return the flag that says whether the child has called requestPowerDomainState. + @discussion Called by the PCI Aux Power Supply Driver to see if a device driver + is power managed. */ + bool childHasRequestedPower ( void ); + + /*! @function setPreventIdleSleepFlag + @abstract Sets the preventIdleSleepFlag variable. + @discussion Called by the parent. */ + void setPreventIdleSleepFlag (unsigned long ); + + /*! @function getPreventIdleSleepFlag + @abstract Returns the preventIdleSleepFlag variable. + @discussion Called by the parent. */ + bool getPreventIdleSleepFlag ( void ); + + /*! @function setPreventSystemSleepFlag + @abstract Sets the preventSystemSleepFlag variable. + @discussion Called by the parent. */ + void setPreventSystemSleepFlag (unsigned long ); + + /*! @function getPreventSystemSleepFlag + @abstract Returns the preventSystemSleepFlag variable. + @discussion Called by the parent. */ + bool getPreventSystemSleepFlag ( void ); + + /*! @function setAwaitingAck + @abstract Sets the awaitingAck variable. + @discussion Called by the parent. */ + void setAwaitingAck ( bool ); + + /*! @function getAwaitingAck + @abstract Returns the awaitingAck variable. + @discussion Called by the parent. */ + bool getAwaitingAck ( void ); + + /*! @function setReadyFlag + @abstract Sets the readyFlag variable. + @discussion Called by the parent. */ + void setReadyFlag( bool flag ); + + /*! @function getReadyFlag + @abstract Returns the readyFlag variable. + @discussion Called by the parent. */ + bool getReadyFlag( void ) const; +}; + +#endif /* ! _IOKIT_IOPOWERCONNECTION_H */ + diff --git a/i386/include/IOKit/pwr_mgt/RootDomain.h b/i386/include/IOKit/pwr_mgt/RootDomain.h new file mode 100644 index 0000000..6f4ebee --- /dev/null +++ b/i386/include/IOKit/pwr_mgt/RootDomain.h @@ -0,0 +1,251 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _IOKIT_ROOTDOMAIN_H +#define _IOKIT_ROOTDOMAIN_H + +#include +#include +#include "IOKit/pwr_mgt/IOPMPrivate.h" + + +class IOPMPowerStateQueue; +class RootDomainUserClient; +class PMTraceWorker; + +/* + * Flags for get/setSleepSupported() + */ +enum { + kRootDomainSleepNotSupported = 0x00000000, + kRootDomainSleepSupported = 0x00000001, + kFrameBufferDeepSleepSupported = 0x00000002, + kPCICantSleep = 0x00000004 +}; + +/* + *IOPMrootDomain registry property keys + */ +#define kRootDomainSupportedFeatures "Supported Features" +#define kRootDomainSleepReasonKey "Last Sleep Reason" +#define kRootDomainSleepOptionsKey "Last Sleep Options" +#define kIOPMRootDomainWakeReasonKey "Wake Reason" +#define kIOPMRootDomainWakeTypeKey "Wake Type" +#define kIOPMRootDomainPowerStatusKey "Power Status" + +/* + * Possible sleep reasons found under kRootDomainSleepReasonsKey + */ +#define kIOPMClamshellSleepKey "Clamshell Sleep" +#define kIOPMPowerButtonSleepKey "Power Button Sleep" +#define kIOPMSoftwareSleepKey "Software Sleep" +#define kIOPMOSSwitchHibernationKey "OS Switch Sleep" +#define kIOPMIdleSleepKey "Idle Sleep" +#define kIOPMLowPowerSleepKey "Low Power Sleep" +#define kIOPMThermalEmergencySleepKey "Thermal Emergency Sleep" +#define kIOPMMaintenanceSleepKey "Maintenance Sleep" + +/* + * String constants for communication with PM CPU + */ +#define kIOPMRootDomainLidCloseCString "LidClose" +#define kIOPMRootDomainBatPowerCString "BatPower" + +/* + * Supported Feature bitfields for IOPMrootDomain::publishFeature() + */ +enum { + kIOPMSupportedOnAC = (1<<0), + kIOPMSupportedOnBatt = (1<<1), + kIOPMSupportedOnUPS = (1<<2) +}; + +typedef IOReturn (*IOPMSettingControllerCallback) + (OSObject *target, const OSSymbol *type, + OSObject *val, uintptr_t refcon); + +__BEGIN_DECLS +IONotifier * registerSleepWakeInterest( + IOServiceInterestHandler, void *, void * = 0); + +IONotifier * registerPrioritySleepWakeInterest( + IOServiceInterestHandler handler, + void * self, void * ref = 0); + +IOReturn acknowledgeSleepWakeNotification(void * ); + +IOReturn vetoSleepWakeNotification(void * PMrefcon); +__END_DECLS + +#define IOPM_ROOTDOMAIN_REV 2 + +class IOPMrootDomain: public IOService +{ + OSDeclareFinalStructors(IOPMrootDomain) + +public: + static IOPMrootDomain * construct( void ); + + virtual bool start( IOService * provider ); + virtual IOReturn setAggressiveness( unsigned long, unsigned long ); + virtual IOReturn getAggressiveness( unsigned long, unsigned long * ); + + virtual IOReturn sleepSystem( void ); + IOReturn sleepSystemOptions( OSDictionary *options ); + + virtual IOReturn setProperties( OSObject * ); + +/*! @function systemPowerEventOccurred + @abstract Other drivers may inform IOPMrootDomain of system PM events + @discussion systemPowerEventOccurred is a richer alternative to receivePowerNotification() + Only Apple-owned kexts should have reason to call systemPowerEventOccurred. + @param event An OSSymbol describing the type of power event. + @param value A 32-bit integer value associated with the event. + @param shouldUpdate indicates whether the root domain should send a notification + to interested parties. Pass false if you're calling systemPowerEventOccurred + several times in succession; and pass true only on the last invocatino. + @result kIOReturnSuccess on success */ + + IOReturn systemPowerEventOccurred( + const OSSymbol *event, + uint32_t intValue ); + + IOReturn systemPowerEventOccurred( + const OSSymbol *event, + OSObject *value ); + + virtual IOReturn receivePowerNotification( UInt32 msg ); + + virtual void setSleepSupported( IOOptionBits flags ); + + virtual IOOptionBits getSleepSupported( void ); + + void wakeFromDoze( void ); + + // KEXT driver announces support of power management feature + + void publishFeature( const char *feature ); + + // KEXT driver announces support of power management feature + // And specifies power sources with kIOPMSupportedOn{AC/Batt/UPS} bitfield. + // Returns a unique uint32_t identifier for later removing support for this + // feature. + // NULL is acceptable for uniqueFeatureID for kexts without plans to unload. + + void publishFeature( const char *feature, + uint32_t supportedWhere, + uint32_t *uniqueFeatureID); + + // KEXT driver announces removal of a previously published power management + // feature. Pass 'uniqueFeatureID' returned from publishFeature() + + IOReturn removePublishedFeature( uint32_t removeFeatureID ); + +/*! @function copyPMSetting + @abstract Copy the current value for a PM setting. Returns an OSNumber or + OSData depending on the setting. + @param whichSetting Name of the desired setting. + @result OSObject value if valid, NULL otherwise. */ + + OSObject * copyPMSetting( OSSymbol *whichSetting ); + +/*! @function registerPMSettingController + @abstract Register for callbacks on changes to certain PM settings. + @param settings NULL terminated array of C strings, each string for a PM + setting that the caller is interested in and wants to get callbacks for. + @param callout C function ptr or member function cast as such. + @param target The target of the callback, usually 'this' + @param refcon Will be passed to caller in callback; for caller's use. + @param handle Caller should keep the OSObject * returned here. If non-NULL, + handle will have a retain count of 1 on return. To deregister, pass to + unregisterPMSettingController() + @result kIOReturnSuccess on success. */ + + IOReturn registerPMSettingController( + const OSSymbol *settings[], + IOPMSettingControllerCallback callout, + OSObject *target, + uintptr_t refcon, + OSObject **handle); // out param + +/*! @function registerPMSettingController + @abstract Register for callbacks on changes to certain PM settings. + @param settings NULL terminated array of C strings, each string for a PM + setting that the caller is interested in and wants to get callbacks for. + @param supportedPowerSources bitfield indicating which power sources these + settings are supported for (kIOPMSupportedOnAC, etc.) + @param callout C function ptr or member function cast as such. + @param target The target of the callback, usually 'this' + @param refcon Will be passed to caller in callback; for caller's use. + @param handle Caller should keep the OSObject * returned here. If non-NULL, + handle will have a retain count of 1 on return. To deregister, pass to + unregisterPMSettingController() + @result kIOReturnSuccess on success. */ + + IOReturn registerPMSettingController( + const OSSymbol *settings[], + uint32_t supportedPowerSources, + IOPMSettingControllerCallback callout, + OSObject *target, + uintptr_t refcon, + OSObject **handle); // out param + + virtual IONotifier * registerInterest( + const OSSymbol * typeOfInterest, + IOServiceInterestHandler handler, + void * target, void * ref = 0 ); + + void pmStatsRecordEvent( + int eventIndex, + AbsoluteTime timestamp); + + void pmStatsRecordApplicationResponse( + const OSSymbol *response, + const char *name, + int messageType, + uint32_t delay_ms, + int app_pid); + + virtual IOReturn callPlatformFunction( + const OSSymbol *functionName, + bool waitForFunction, + void *param1, void *param2, + void *param3, void *param4 ); + +private: + virtual IOReturn changePowerStateTo( unsigned long ordinal ); + virtual IOReturn changePowerStateToPriv( unsigned long ordinal ); + virtual IOReturn requestPowerDomainState( IOPMPowerFlags, IOPowerConnection *, unsigned long ); + virtual void powerChangeDone( unsigned long ); + virtual bool tellChangeDown( unsigned long ); + virtual bool askChangeDown( unsigned long ); + virtual void tellChangeUp( unsigned long ); + virtual void tellNoChangeDown( unsigned long ); +}; + + +#endif /* _IOKIT_ROOTDOMAIN_H */ diff --git a/i386/include/IOKit/rtc/.svn/all-wcprops b/i386/include/IOKit/rtc/.svn/all-wcprops new file mode 100644 index 0000000..b3140e1 --- /dev/null +++ b/i386/include/IOKit/rtc/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 56 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/rtc +END +IORTCController.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/rtc/IORTCController.h +END diff --git a/i386/include/IOKit/rtc/.svn/entries b/i386/include/IOKit/rtc/.svn/entries new file mode 100644 index 0000000..73fa41a --- /dev/null +++ b/i386/include/IOKit/rtc/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +2117 +http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/rtc +http://forge.voodooprojects.org/svn/chameleon + + + +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + +b5af796a-00a8-11df-919b-ffff7a100b7d + +IORTCController.h +file + + + + +2012-10-03T17:50:20.000000Z +44a0b2efb5c45175a1ba6782cedb471c +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +1708 + diff --git a/i386/include/IOKit/rtc/.svn/text-base/IORTCController.h.svn-base b/i386/include/IOKit/rtc/.svn/text-base/IORTCController.h.svn-base new file mode 100644 index 0000000..eaf681d --- /dev/null +++ b/i386/include/IOKit/rtc/.svn/text-base/IORTCController.h.svn-base @@ -0,0 +1,46 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * 24 Nov 1998 suurballe Created. + */ + +#include + +typedef void (*RTC_tick_handler)( IOService * ); + + +class IORTCController: public IOService +{ +OSDeclareAbstractStructors(IORTCController) + +public: + +virtual IOReturn getRealTimeClock ( UInt8 * currentTime, IOByteCount * length ) = 0; +virtual IOReturn setRealTimeClock ( UInt8 * newTime ) = 0; +}; + diff --git a/i386/include/IOKit/rtc/IORTCController.h b/i386/include/IOKit/rtc/IORTCController.h new file mode 100644 index 0000000..eaf681d --- /dev/null +++ b/i386/include/IOKit/rtc/IORTCController.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * 24 Nov 1998 suurballe Created. + */ + +#include + +typedef void (*RTC_tick_handler)( IOService * ); + + +class IORTCController: public IOService +{ +OSDeclareAbstractStructors(IORTCController) + +public: + +virtual IOReturn getRealTimeClock ( UInt8 * currentTime, IOByteCount * length ) = 0; +virtual IOReturn setRealTimeClock ( UInt8 * newTime ) = 0; +}; + diff --git a/i386/include/IOKit/sbp2/.svn/all-wcprops b/i386/include/IOKit/sbp2/.svn/all-wcprops new file mode 100644 index 0000000..8860e60 --- /dev/null +++ b/i386/include/IOKit/sbp2/.svn/all-wcprops @@ -0,0 +1,59 @@ +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2 +END +IOFireWireSBP2UserClient.h +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSBP2UserClient.h +END +IOFireWireSBP2LUN.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSBP2LUN.h +END +IOFireWireSBP2ManagementORB.h +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSBP2ManagementORB.h +END +IOFireWireSerialBusProtocolTransport.h +K 25 +svn:wc:ra_dav:version-url +V 96 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSerialBusProtocolTransport.h +END +IOFireWireSBP2LSIWorkaroundDescriptor.h +K 25 +svn:wc:ra_dav:version-url +V 97 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSBP2LSIWorkaroundDescriptor.h +END +IOFireWireSBP2ORB.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSBP2ORB.h +END +IOFireWireSBP2Target.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSBP2Target.h +END +IOFireWireSBP2UserClientCommon.h +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSBP2UserClientCommon.h +END +IOFireWireSBP2Login.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSBP2Login.h +END diff --git a/i386/include/IOKit/sbp2/.svn/entries b/i386/include/IOKit/sbp2/.svn/entries new file mode 100644 index 0000000..57b7f83 --- /dev/null +++ b/i386/include/IOKit/sbp2/.svn/entries @@ -0,0 +1,334 @@ +10 + +dir +2117 +http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/sbp2 +http://forge.voodooprojects.org/svn/chameleon + + + +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + +b5af796a-00a8-11df-919b-ffff7a100b7d + +IOFireWireSBP2UserClient.h +file + + + + +2012-10-03T17:50:20.000000Z +abe67641efef3cf326ce18b1de817d57 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +8267 + +IOFireWireSBP2LUN.h +file + + + + +2012-10-03T17:50:20.000000Z +8fab521ac7af386c7d2772a0f69444b3 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +10404 + +IOFireWireSBP2ManagementORB.h +file + + + + +2012-10-03T17:50:20.000000Z +df7f1948a7790ed3d08f53f0426095f2 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +11075 + +IOFireWireSerialBusProtocolTransport.h +file + + + + +2012-10-03T17:50:20.000000Z +6e7bdeac9a9690b47e47421abda8d3c1 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +14111 + +IOFireWireSBP2LSIWorkaroundDescriptor.h +file + + + + +2012-10-03T17:50:20.000000Z +8c4d66f15c56537e975892bec0dd721b +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +12217 + +IOFireWireSBP2ORB.h +file + + + + +2012-10-03T17:50:20.000000Z +387c5f66e2949189fc62b07fc183c7c3 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +21217 + +IOFireWireSBP2Target.h +file + + + + +2012-10-03T17:50:20.000000Z +e7cdf79c998d9b81359b7c6adc3b1881 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +7550 + +IOFireWireSBP2UserClientCommon.h +file + + + + +2012-10-03T17:50:20.000000Z +96d96ad9f1106c7237f0485867e3f509 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +4524 + +IOFireWireSBP2Login.h +file + + + + +2012-10-03T17:50:20.000000Z +b78759007f3ff7e9e66d595d31ac6cf8 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +41499 + diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2LSIWorkaroundDescriptor.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2LSIWorkaroundDescriptor.h.svn-base new file mode 100644 index 0000000..178ef00 --- /dev/null +++ b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2LSIWorkaroundDescriptor.h.svn-base @@ -0,0 +1,292 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#if __ppc__ + +/*! + @header IOFireWireSBP2LSIWorkaroundDescriptor + Contains the class definition for IOFireWireSBP2LSIWorkaroundDescriptor. +*/ + +#ifndef _IOKIT_IOFIREWIRESBP2LSIWORKAROUNDDESCRIPTOR_H +#define _IOKIT_IOFIREWIRESBP2LSIWORKAROUNDDESCRIPTOR_H + +#include + +class IOFireWireSBP2LSIRange; + +/*! + @class IOFireWireSBP2LSIWorkaroundDescriptor + @abstract This is a subclass of IOGeneralMemoryDescriptor. It is designed to work around + a hardware problem in a common SBP2 target. It takes a memory descriptor as + an argument. It retains this descriptor and returns a new one with resegmented + physical segments and potentially some "unfixable" segments double buffered. + + If the transfer will cause data to be sent from the Mac, syncBuffersForOutput + must be called before the transfer. + + If the transfer will cause data to be recieve by the Mac, syncBuffersForInput + must be called after the transfer. + + This class calculates the new segmentation only once when it is created. + Any changes to the structure of the original memory descriptor will render + this one useless. It must be released and a new IOFireWireSBP2LSIWorkaroundDescriptor + can be created. + + LSI Bridge Workaround Algorithm Details + + Goals: + 1. Avoid LSI Logic "< 16 byte" bug - prevent any data packet smaller than 16 bytes + 2. Minimize double-buffering + 3. Support non-multiple-of-512-byte devices, e.g. CD Audio + + Solution: + Write a page table such that the bridge will nor use packets smaller than 16 bytes. + In other words, rearrange the memory descriptor to avoid the bug, and do it such + that the SBP-2 layer will not break up a segment (du ro the 64k-1 limit) and + re-introduces the problem + + SBP-2 defines the kFWSBP2MaxPageClusterSize constant. We simply make sure + none of our segments are larger than this size and SBP-2 will not break them + up when it writes the SBP-2 page table. + + Notes: + - Some double buffering is unavoidable. Discontiguous pages may yield page + fragments at the start or end of the buffer (or both, with non-512x buffers). + solution uses less than 33 bytes of double-buffer per segment in original + memory descriptor. + - If driver must break up IO to meet ATA limit of 255 (250?) blocks, assume + the driver does this at a higher level (before applying workaround). + - It is expected that the original memory descriptor has been prepared (wired) +*/ + +class IOFireWireSBP2LSIWorkaroundDescriptor : public IOGeneralMemoryDescriptor +{ + OSDeclareDefaultStructors(IOFireWireSBP2LSIWorkaroundDescriptor) + + friend class IOFireWireSBP2LSIRange; + +protected: + + // reserved for future use + struct ExpansionData { }; + ExpansionData *reserved; + + bool fFixedCapacity; // for both allocators + + ////////////////////////////////////// + // for range allocator + + OSArray * fPermanentRanges; + UInt32 fAllocatedRangesCount; + + virtual IOReturn rangeAllocatorInitialize( UInt32 rangeCount ); + virtual void rangeAllocatorDeallocateAllRanges( void ); + virtual IOFireWireSBP2LSIRange * rangeAllocatorNewRange( void ); + virtual void rangeAllocatorFree( void ); + + ////////////////////////////////////// + // for buffer allocator + + OSArray * fBufferDescriptors; + UInt32 fPermanentPages; + IOByteCount fAllocatedBytesCount; + + virtual IOReturn bufferAllocatorInitialize( IOByteCount requestedBufferSize ); + virtual void bufferAllocatorDeallocateAllBuffers( void ); + virtual void * bufferAllocatorNewBuffer( IOPhysicalAddress * address ); + virtual void bufferAllocatorFree( void ); + + ////////////////////////////////////// + // for range table allocator + + IOPhysicalRange * fRangeTable; + IOByteCount fRangeTableSize; + + virtual IOReturn rangeTableAllocatorInitialize( UInt32 requestedBufferSize ); + virtual IOPhysicalRange * rangeTableAllocatorNewTable( UInt32 entries ); + virtual void rangeTableAllocatorFree( void ); + + ////////////////////////////////////// + // for workaround + + IOMemoryDescriptor * fOriginalDesc; + OSArray * fRanges; + IOByteCount fOffset; + IOByteCount fLength; + IODirection fDirection; + + + virtual bool initWithCapacity + ( UInt32 permanentRanges, IOByteCount permanentBufferSpace, bool fixedCapacity ); + + virtual void free(); + + virtual IOReturn resetToInitialCapacity( void ); + virtual IOReturn initializeRangesArray( void ); + virtual IOReturn recalculateSmallSegments( void ); + virtual IOReturn splitLargeSegments( void ); + virtual IOReturn resegmentOddLengthSegments( void ); + virtual IOReturn initializeBuffers( void ); + + virtual bool initWithAddress( void * address, /* not supported */ + IOByteCount withLength, + IODirection withDirection ); + + virtual bool initWithAddress( vm_address_t address, /* not supported */ + IOByteCount withLength, + IODirection withDirection, + task_t withTask ); + + virtual bool initWithPhysicalAddress( + IOPhysicalAddress address, /* not supported */ + IOByteCount withLength, + IODirection withDirection ); + + virtual bool initWithPhysicalRanges( + IOPhysicalRange * ranges, /* not supported */ + UInt32 withCount, + IODirection withDirection, + bool asReference = false ); + + virtual bool initWithRanges( IOVirtualRange * ranges, /* not supported */ + UInt32 withCount, + IODirection withDirection, + task_t withTask, + bool asReference = false ); + +public: + + // static factory methods and intializers + + // + // create a new instance + // + + + /*! + @function withDescriptor + @abstract Creates a new IOFireWireSBP2LSIWorkaroundDescriptor. + @discussion Create a IOFireWireSBP2LSIWorkaroundDescriptor with no permanent capacity then + inits it the given descriptor. This is basicly a short cut for calling + withCapacity( 0, 0, false) and the initWithDescriptor() + @param desc Original memory descriptor. + @param offset Offset of data to "fix" in bytes from beginning of descriptor. + @param len Length of data in bytes to "fix" + @param direction IODirection of data transfer. + @result Returns a new IOFireWireSBP2LSIWorkaroundDescriptor if successful. + */ + + static IOFireWireSBP2LSIWorkaroundDescriptor * withDescriptor + ( IOMemoryDescriptor * desc, IOByteCount offset = 0, + IOByteCount len = 0, IODirection direction = kIODirectionOutIn ); + + // initialize with descriptor + + /*! + @function initWithDescriptor + @abstract Initialize an IOFireWireSBP2LSIWorkaroundDescriptor with the given descriptor. + @discussion Initialize the workaround descriptor with the given descriptor. + @param desc Original memory descriptor. + @param offset Offset of data to "fix" in bytes from beginning of descriptor. + @param len Length of data in bytes to "fix" + @param direction IODirection of data transfer. + @result Returns true if the initialization was successful. + */ + + virtual bool initWithDescriptor( IOMemoryDescriptor * desc, IOByteCount offset = 0, + IOByteCount len = 0, IODirection direction = kIODirectionOutIn ); + + + /////////////////////////////////// + + + /*! + @function withCapacity + @abstract Create a new descriptor with possibly a permanent capacity. + @discussion Create and IOFireWireSBP2LSIWorkaroundDescriptor with a permanent fixed capacity. + You should call initWithDescriptor afterward. permanentRanges is number of ranges to keep + permanently allocated for use by the algorithm. If fixedCapacity is false additional ranges + may be allocated and deallocated dyanmicly if needed. The algorithm may require more or less + ranges than either the original descriptor or the final fixed may decriptor contain. + permanentBufferSpace is the number of bytes of permanent buffer to keep arround. If fixedCapacity + is false additional buffer space may be allocated and deallocated dynamically. permanentBufferSpace + should generally be set to 32 * maximum number of ranges. fixedCapacity is a flag indicating + whether dynamic allocations are allowed. When making decisions about the maximum amount of + buffer space to keep around, it should be noted tha the maximum number of ranges maybe different + from permanentRanges if fixedCapcity is false. + @param permanentRanges Count of permanent ranges. + @param permanentBufferSpace Byte count of permanent buffers. + @param fixedCapacity bool indicating if dynamic allocations can be made. + @result Returns true if the initialization was successful. + */ + + static IOFireWireSBP2LSIWorkaroundDescriptor * withCapacity + ( UInt32 permanentRanges, IOByteCount permanentBufferSpace, bool fixedCapacity ); + + + /////////////////////////////////// + + // + // manipulate buffers for IO + // + + /*! + @function syncBuffersForOutput + @abstract Synchronize the buffers for output. + @discussion Since double buffering may be invovled in the workaround. The driver needs to + indicate when these buffers should be syncronized with the original descriptor. For data + that will be output syncBuffersForOutput should be called before submiting the ORB. + @result Returns kIOReturnSuccess if sync was successful. + */ + + virtual IOReturn syncBuffersForOutput( void ); // call before output + + /*! + @function syncBuffersForInput + @abstract Synchronize the buffers for input. + @discussion Since double buffering may be invovled in the workaround. The driver needs to + indicate when these buffers should be syncronized with the original descriptor. For data + that will be input syncBuffersForOutput should be called after receiving completion status + for the ORB. + @result Returns kIOReturnSuccess if sync was successful. + */ + + virtual IOReturn syncBuffersForInput( void ); // call after input + +private: + + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 0); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 1); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 2); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 3); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 4); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 5); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 6); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 7); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 8); + +}; + +#endif + +#endif diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2LUN.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2LUN.h.svn-base new file mode 100644 index 0000000..e6c97de --- /dev/null +++ b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2LUN.h.svn-base @@ -0,0 +1,270 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + @header IOFireWireSBP2LUN + Contains the class definition for IOFireWireSBP2LUN. +*/ + +#ifndef _IOKIT_IOFIREWIRESBP2LUN_H +#define _IOKIT_IOFIREWIRESBP2LUN_H + +#include +#include + +#include + +#include +#include + +class IOFireWireSBP2Target; + +/*! + @class IOFireWireSBP2LUN + @abstract Provider for most drivers. + @discussion IOFireWireSBP2LUN objects are created by IOFireWireSBP2Target objects. Each target may have zero or more IOFireWireSBP2LUN children. The LUN object serves as the matching nub for most drivers and therefore will be the provider for most drivers. It supplies the methods that control the operation of the LUN as a whole. Methods that control the behavior and execution of an SBP2 login session are supplied in a separate IOFireWireSBP2Login object. The LUN can be used to create one of these login objects. + The LUN can also create IOFireWireSBP2ManagementORBs for configuring and appending non-login related management functions. Login related management functions (ie. Login, Logout, Reconnect) are supplied by the IOFireWireSBP2Login. + Finally the LUN can supply a reference to the IOFireWireUnit. This can be useful if a driver wishes to access the standard FireWire APIs. +*/ + +class IOFireWireSBP2LUN : public IOService +{ + OSDeclareDefaultStructors( IOFireWireSBP2LUN ); + + friend class IOFireWireSBP2ManagementORB; + friend class IOFireWireSBP2Login; + friend class IOFireWireSBP2UserClient; + +protected: + + // reserved for future use + struct ExpansionData { }; + ExpansionData *reserved; + + //////////////////////////////////////////// + // methods called by friend classes + + // IOFireWireSBP2Login methods + virtual void removeLogin( IOFireWireSBP2Login * login ); + virtual IOFireWireSBP2Target * getTarget( void ); + + // IOFireWireSBP2ManagementORB methods + virtual void clearAllTasksInSet( void ); // assumes caller is on workloop + virtual void removeManagementORB( IOFireWireSBP2ManagementORB * orb ); + + // IOFireWireSBP2UserClient methods + virtual void flushAllManagementORBs( void ); + +public: + + //////////////////////////////////////////// + // IOService overrides + + /*! @function attach + @abstract Attaches an IOService client to a provider in the registry. + @discussion See IOService for discussion. + @param provider The IOService object which will serve as this objects provider. + @result false if the provider is inactive or on a resource failure, otherwise true. + */ + + virtual bool attach( IOService *provider ); + + /*! @function handleOpen + @abstract Overrideable method to control the open / close behaviour of an IOService. + @discussion See IOService for discussion. + @param forClient Designates the client of the provider requesting the open. + @param options Options for the open, may be interpreted by the implementor of handleOpen. + @result Return true if the open was successful, false otherwise. */ + + virtual bool handleOpen( IOService * forClient, + IOOptionBits options, + void * arg ); + /*! + @function handleClose + @abstract Overrideable method to control the open / close behaviour of an IOService. + @discussion See IOService for discussion. + @param forClient Designates the client of the provider requesting the close. + @param options Options for the close, may be interpreted by the implementor of handleOpen. + */ + + virtual void handleClose( IOService * forClient, + IOOptionBits options ); + + /*! + @function matchPropertyTable + @abstract Implements SBP2 specific matching. + @discussion See IOService for discussion. + @param table The dictionary of properties to be matched against. + @result Returns false if the family considers the matching dictionary does not match in properties it understands, true otherwise. + */ + + virtual bool matchPropertyTable(OSDictionary * table); + +protected: + + //////////////////////////////////////////// + // private fields + + IOFireWireSBP2Target * fProviderTarget; + UInt32 fLUNumber; + OSSet * fLoginSet; + OSIterator * fLoginSetIterator; + IOCommandGate * fGate; + OSSet * fORBSet; + OSIterator * fORBSetIterator; + OSObject * fDiagnostics; + + //////////////////////////////////////////// + // private methods + + // IOService methods + virtual void free( void ); + virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); + + // create management orb internals + static IOReturn staticCreateManagementORBAction( OSObject *self, + void * refCon, + void * completion, + void * orb, + void * ); + virtual IOReturn createManagementORBAction( void * refCon, + FWSBP2ManagementCallback completion, + IOFireWireSBP2ManagementORB ** orb ); + + // remove management orb internals + static IOReturn staticRemoveManagementORBAction( OSObject * self, void * orb, + void *, void *, void * ); + virtual IOReturn removeManagementORBAction( IOFireWireSBP2ManagementORB * orb ); + + // flush all management orb internals + static IOReturn staticExecuteFlushAllMgmtORBs( OSObject * self, void *, + void *, void *, void * ); + virtual IOReturn executeFlushAllMgmtORBs( void ); + + // IOFireWireSBP2ManagementORB friend class wrappers + virtual bool initMgmtORBWithLUN( IOFireWireSBP2ManagementORB * orb, IOFireWireSBP2LUN * lun, + void * refCon, + FWSBP2ManagementCallback completion ); + + // IOFireWireSBP2Login friend class wrappers + virtual bool initLoginWithLUN( IOFireWireSBP2Login * login, IOFireWireSBP2LUN * lun ); + virtual void suspendedNotify( void ); + virtual void resumeNotify( void ); + +private: + + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 0); + +public: + + //////////////////////////////////////////// + // client methods + + // getters + + /*! + @function getFireWireUnit + @abstract Returns an IOFireWireUnit object. + @discussion An IOFireWireUnit is the provider of an IOFireWireSBP2Target. In order to + use the base FireWire services you will need a reference to the unit. This method + returns that reference. + @result Returns a pointer to an IOFireWireUnit. + */ + + virtual IOFireWireUnit * getFireWireUnit( void ); + + /*! + @function getLUNumber + @abstract Returns the LUNs number. + @discussion Each LUN has a number to uniquely identify it on a device. This method returns + this value in a UInt32. + @result Returns a UInt32 containing the Logical Unit Number. + */ + + virtual UInt32 getLUNumber( void ); + + // factory methods + + /*! + @function createLogin + @abstract Creates a new IOFireWireSBP2Login object. + @discussion Creates a new IOFireWireSBP2Login object for the LUN. Login objects supply most + of the SBP2 APIs related to login maintenance and Normal Command ORB execution. + @result Returns a pointer to a new IOFireWireSBP2Login. + */ + + virtual IOFireWireSBP2Login *createLogin( void ); + + /*! + @function createManagementORB + @abstract Creates a new IOFireWireSBP2ManagementORB object. + @discussion Creates a new IOFireWireSBP2ManagementORB object. Management objects let you + execute commands like QueryLogins, LogicalUnitReset, and AbortTask. These commands are + configured after they are created here. When they are done executing (after a call to submit) + the supplied completion routine will be called with the supplied refcon. Usually this refCon + is the "this" pointer of completion method's object. + @param refCon The refcon passed to the completion routine. + @param completion The completion routine. Called when the ORB finishes execution. + @result Returns a pointer to a new IOFireWireSBP2Login. + */ + + virtual IOFireWireSBP2ManagementORB * createManagementORB( void * refCon, FWSBP2ManagementCallback completion ); + +protected: + + static IOReturn staticCreateLogin( OSObject *self, void * login, void *, void *, void * ); + virtual IOReturn createLoginAction( IOFireWireSBP2Login ** login ); + + static IOReturn staticRemoveLoginAction( OSObject *self, void * login, void *, void *, void * ); + virtual IOReturn removeLoginAction( IOFireWireSBP2Login * login ); + +public: + + /*! + @function getDiagnostics + @abstract Debug-only method. + @discussion Returns a reference to the internal diagnostics object when the services are built + in debug mode. Should be a no-op in release builds. + @result Returns a pointer to the diagnostics object (if any). + */ + + virtual OSObject * getDiagnostics( void ); + + virtual bool finalize( IOOptionBits options ); + +protected: + + void terminateNotify( void ); + +private: + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 1); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 2); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 3); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 4); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 5); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 6); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 7); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 8); + +}; + +#endif \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2Login.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2Login.h.svn-base new file mode 100644 index 0000000..42a838c --- /dev/null +++ b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2Login.h.svn-base @@ -0,0 +1,1078 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + @header IOFireWireSBP2Login + Contains the class definition for IOFireWireSBP2Login. +*/ + +#ifndef _IOKIT_IOFIREWIRESBP2LOGIN_H +#define _IOKIT_IOFIREWIRESBP2LOGIN_H + +#include + +#include + +#include +#include + +// login option flags +enum +{ + kFWSBP2DontSynchronizeMgmtAgent = (1 << 0), + kFWSBP2ExclusiveLogin = (1 << 5) +}; + +// notification events +enum +{ + kFWSBP2NormalCommandStatus = 6, + kFWSBP2NormalCommandTimeout = 7, + kFWSBP2UnsolicitedStatus = 8, + kFWSBP2NormalCommandReset = 9 +}; + +#define kIOMessageFWSBP2ReconnectComplete iokit_fw_err(0x3E8) +#define kIOMessageFWSBP2ReconnectFailed iokit_fw_err(0x3E9) + +/*! + @typedef FWSBP2LoginResponse + @param length Length of login response. + @param loginID Unique id representing this login. + @param commandBlockAgentAddressHi High 32 bits of command block agent address. + @param commandBlockAgentAddressLo Low 32 bits of command block agent address. + @param reserved Reserved. + @param reconnectHold Reconnect timeout encoded as 2^reconnectHold seconds. +*/ + +typedef struct +{ + UInt16 length; + UInt16 loginID; + UInt32 commandBlockAgentAddressHi; + UInt32 commandBlockAgentAddressLo; + UInt16 reserved; + UInt16 reconnectHold; +} FWSBP2LoginResponse, *FWSBP2LoginResponsePtr; + +/*! + @typedef FWSBP2StatusBlock + @param details Src, Resp, D, Len fields of status block format + @param sbpStatus SBP2 specific status + @param orbOffsetHi High 32 bits of address of orb status is for. + @param orbOffsetLo Low 32 bits of address of orb status is for. + @param status[6] Up to 48 bytes of additional data. Length is determined by len field. +*/ + +typedef struct +{ + UInt8 details; + UInt8 sbpStatus; + UInt16 orbOffsetHi; + UInt32 orbOffsetLo; + UInt32 status[6]; +} FWSBP2StatusBlock; + +class IOFireWireSBP2LUN; +class IOFireWireSBP2Login; + +// struct sent to login complete handler + +/*! + @typedef FWSBP2LoginCompleteParams + @param login Pointer to IOFireWireSBP2Login object. + @param generation FireWire generation value. + @param status Status of login attempt. + @param loginResponse Pointer to login response struct. + @param statusBlock Pointer to status block buffer. + @param statusBlockLength Length of entire status block. +*/ + +typedef struct +{ + IOFireWireSBP2Login * login; // login object this param is sent from + UInt32 generation; // generation this login was attempted in + + IOReturn status; // status of login attempt + + FWSBP2LoginResponsePtr loginResponse; // pointer to loginResponse buffer + FWSBP2StatusBlock * statusBlock; // pointer to statusBlock buffer + UInt32 statusBlockLength; // size of statusBlock buffer + +} FWSBP2LoginCompleteParams, *FWSBP2LoginCompleteParamsPtr; + +// struct sent to logout complete handler + +/*! + @typedef FWSBP2LogoutCompleteParams + @param login Pointer to IOFireWireSBP2Login object. + @param generation FireWire generation value. + @param status Status of login attempt. + @param statusBlock Pointer to status block buffer. + @param statusBlockLength Length of entire status block. +*/ + +typedef struct +{ + IOFireWireSBP2Login * login; // login object this param is sent from + UInt32 generation; // generation this login was attempted in + + IOReturn status; // status of login attempt + + FWSBP2StatusBlock * statusBlock; // pointer to statusBlock buffer + UInt32 statusBlockLength; // size of statusBlock buffer + +} FWSBP2LogoutCompleteParams, *FWSBP2LogoutCompleteParamsPtr; + +// struct sent with reconnect notification + +/*! + @typedef FWSBP2LogoutCompleteParams + @param login Pointer to IOFireWireSBP2Login object. + @param generation FireWire generation value. + @param status Status of login attempt. + @param reconnectStatusBlock Pointer to status block buffer. + @param reconnectStatusBlockLength Length of entire status block. +*/ + +typedef struct +{ + IOFireWireSBP2Login * login; // login object this param is sent from + UInt32 generation; // generation this login was attempted in + + IOReturn status; // status of reconnect attempt + + void * reconnectStatusBlock; // pointer to statusBlock buffer + UInt32 reconnectStatusBlockLength; // size of statusBlock buffer +} FWSBP2ReconnectParams, *FWSBP2ReconnectParamsPtr; + +// Callback when login and logout commands complete asynchronously + +/*! + @typedef FWSBP2LoginCallback + @param refCon Reference constant supplied when the notification was registered. + @param params Structure containing additional information about the status of the login. +*/ + +typedef void (*FWSBP2LoginCallback)(void * refCon, FWSBP2LoginCompleteParamsPtr params); + +/*! + @typedef FWSBP2LogoutCallback + @param refCon Reference constant supplied when the notification was registered. + @param params Structure containing additional information about the status of the logout. +*/ + +typedef void (*FWSBP2LogoutCallback)(void * refCon, FWSBP2LogoutCompleteParamsPtr params); + +/*! + @typedef FWSBP2StatusCallback + @param refCon Reference constant supplied when the notification was registered. + @param status Indicates success or failure of operation. +*/ + +typedef void (*FWSBP2StatusCallback)(void * refCon, IOReturn status); + +/*! + @typedef FWSBP2FetchAgentWriteCallback + @param refCon Reference constant supplied when the notification was registered. + @param status Indicates success or failure of operation. + @param orb Indicates current last orb in chain. +*/ + +typedef void (*FWSBP2FetchAgentWriteCallback)(void * refCon, IOReturn status, IOFireWireSBP2ORB * orb); + +/*! + @typedef FWSBP2NotifyParams + @param notificationEvent Type of event we are being notified of. + @param message buffer containing message. + @param length length of message field. + @param generation FireWire generation value. +*/ + +typedef struct +{ + void * commandObject; + UInt32 notificationEvent; + const void * message; + UInt32 length; + UInt32 generation; +} FWSBP2NotifyParams, *FWSBP2NotifyParamsPtr; + + +/*! + @typedef FWSBP2NotifyCallback + @param refCon Reference constant supplied when the notification was registered. + @param params FWSBP2NotifyParams containing notification information. +*/ + +typedef void (*FWSBP2NotifyCallback)(void * refCon, FWSBP2NotifyParamsPtr params); + +/*! + @class IOFireWireSBP2Login + @abstract Supplies the login maintenance and Normal Command ORB execution portions of the API. + @discussion Supplies APIs for login maintenance and command execution. Drivers can use this + object to create IOFireWireSBP2ORB objects and execute them. Solicited and unsolicited status + callback routines can be registered and the SBP2 services will notify the driver when the + appropriate status arrives. + This class also handles login maintenance. Supplies APIs for logging in and logging out and + attempts to reconnect to the LUN after bus resets. The base FireWire services deliver bus + reset notification via the IOKit message routine. The SBP2 services build on this behavior + and deliver reconnectFailed and reconnectComplete through the message routine as well. +*/ + +class IOFireWireSBP2Login : public OSObject +{ + OSDeclareDefaultStructors( IOFireWireSBP2Login ) + + friend class IOFireWireSBP2ORB; + friend class IOFireWireSBP2LUN; + friend class IOFireWireSBP2UserClient; + +protected: + + // command selectors + enum + { + kLoginCommandIdle = 0, + kLoginCommandDoLogin = 1, + kLoginCommandDoLogout = 2, + kLoginAddORB = 3, + kLoginRemoveORB = 4, + kLoginFetchAgentReset = 5 + }; + + // internal login states + enum + { + kLoginStateIdle = 0, + kLoginStateLoggingIn = 1, + kLoginStateConnected = 2, + kLoginStateReconnect = 3, + kLoginStateLoggingOut = 4, + kLoginStateTerminated = 5 + }; + + // rom keys + enum + { + kUnitCharacteristicsKey = 0x3A, + kManagementAgentOffsetKey = 0x54 + }; + + // sbp2 defs + enum + { + kFWSBP2RequestComplete = 0, + kFWSBP2TransportFailure = 1, + kFWSBP2IllegalRequest = 2, + kFWSBP2VendorDependent = 3 + }; + + enum + { + kFWSBP2NoSense = 0, + kFWSBP2RequestTypeNotSupported = 1, + kFWSBP2SpeedNotSupported = 2, + kFWSBP2PageSizeNotSupported = 3, + kFWSBP2AccessDenied = 4, + kFWSBP2LogicalUnitNotSupported = 5, + kFWSBP2MaxPayloadTooSmall = 6, + kFWSBP2FunctionRejected = 9, + kFWSBP2LoginIDNotRecognized = 10, + kFWSBP2DummyORBCompleted = 11, + kFWSBP2RequestAborted = 12, + kFWSBP2UnspecifiedError = 0xFF + }; + + typedef struct + { + UInt32 password[2]; + UInt32 loginResponseAddressHi; + UInt32 loginResponseAddressLo; + UInt16 options; + UInt16 lun; + UInt16 passwordLength; + UInt16 loginResponseLength; + UInt32 statusFIFOAddressHi; + UInt32 statusFIFOAddressLo; + } FWSBP2LoginORB; + + typedef struct + { + UInt32 reserved1[4]; + UInt16 options; + UInt16 loginID; + UInt32 reserved2; + UInt32 statusFIFOAddressHi; + UInt32 statusFIFOAddressLo; + } FWSBP2ReconnectORB; + + typedef struct + { + UInt32 reserved1[4]; + UInt16 options; + UInt16 loginID; + UInt32 reserved2; + UInt32 statusFIFOAddressHi; + UInt32 statusFIFOAddressLo; + } FWSBP2LogoutORB; + +protected: + + /////////////////////////////////////////////////////////////////// + // private interface methods + + // IOFireWireSBP2LUN methods + virtual void clearAllTasksInSet( void ); + virtual bool initWithLUN( IOFireWireSBP2LUN * lun ); + virtual void suspendedNotify( void ); + virtual void resumeNotify( void ); + + // IOFireWireSBP2ORB methods + virtual IOFireWireUnit * getFireWireUnit( void ); + virtual IOFireWireSBP2LUN * getFireWireLUN( void ); + virtual bool isFetchAgentWriteInProgress( void ); + virtual bool isConnected( void ); + virtual IOReturn removeORB( IOFireWireSBP2ORB * orb ); + virtual IOReturn appendORBImmediate( IOFireWireSBP2ORB * orb ); + virtual IOReturn appendORB( IOFireWireSBP2ORB * orb ); + virtual void sendTimeoutNotification( IOFireWireSBP2ORB * orb ); + +protected: + + // reserved for future use + struct ExpansionData { }; + ExpansionData *reserved; + + IOFireWireSBP2LUN * fLUN; + IOFireWireUnit * fUnit; + IOFireWireController * fControl; + IOCommandGate * fGate; + + FWSBP2LoginCallback fLoginCompletionCallback; + void * fLoginCompletionRefCon; + + FWSBP2LogoutCallback fLogoutCompletionCallback; + void * fLogoutCompletionRefCon; + + FWSBP2NotifyCallback fStatusNotifyCallback; + void * fStatusNotifyRefCon; + + FWSBP2NotifyCallback fUnsolicitedStatusNotifyCallback; + void * fUnsolicitedStatusNotifyRefCon; + + UInt32 fLoginFlags; + UInt32 fReconnectTime; + + UInt32 fLoginState; + UInt32 fManagementOffset; + UInt32 fManagementTimeout; + UInt32 fMaxORBSize; + UInt32 fMaxCommandBlockSize; + UInt16 fLoginNodeID; + UInt32 fLoginGeneration; + UInt32 fLoginID; + UInt32 fReconnectHold; + UInt32 fMaxPayloadSize; + void * fRefCon; + + // resources + + FWSBP2LoginORB fLoginORB; + IOFWAddressSpace * fLoginORBAddressSpace; + FWAddress fLoginORBAddress; + + FWSBP2LoginResponse fLoginResponse; + IOFWAddressSpace * fLoginResponseAddressSpace; + FWAddress fLoginResponseAddress; + + FWSBP2ReconnectORB fReconnectORB; + IOFWAddressSpace * fReconnectORBAddressSpace; + FWAddress fReconnectORBAddress; + + FWSBP2StatusBlock fStatusBlock; + IOFWAddressSpace * fStatusBlockAddressSpace; + FWAddress fStatusBlockAddress; + + FWSBP2StatusBlock fReconnectStatusBlock; + IOFWAddressSpace * fReconnectStatusBlockAddressSpace; + FWAddress fReconnectStatusBlockAddress; + + FWSBP2LogoutORB fLogoutORB; + IOFWAddressSpace * fLogoutORBAddressSpace; + FWAddress fLogoutORBAddress; + bool fLogoutPending; + + IOFWWriteCommand * fLoginWriteCommand; + IOMemoryDescriptor * fLoginWriteCommandMemory; + bool fLoginWriteInProgress; + + IOFWWriteCommand * fReconnectWriteCommand; + IOMemoryDescriptor * fReconnectWriteCommandMemory; + bool fReconnectWriteInProgress; + bool fReconnectWriteInterrupted; + + IOFWWriteCommand * fLogoutWriteCommand; + IOMemoryDescriptor * fLogoutWriteCommandMemory; + bool fLogoutWriteInProgress; + + IOFWCommand * fLoginTimeoutCommand; + bool fLoginTimeoutTimerSet; + + IOFWDelayCommand * fReconnectTimeoutCommand; + bool fReconnectTimeoutTimerSet; + + IOFWCommand * fLogoutTimeoutCommand; + bool fLogoutTimeoutTimerSet; + + FWAddress fFetchAgentAddress; + IOMemoryDescriptor * fFetchAgentWriteCommandMemory; + FWAddress fLastORBAddress; + IOFireWireSBP2ORB * fLastORB; + IOFWWriteCommand * fFetchAgentWriteCommand; + bool fFetchAgentWriteCommandInUse; + FWSBP2FetchAgentWriteCallback fFetchAgentWriteCompletion; + void * fFetchAgentWriteRefCon; + IOFireWireSBP2ORB * fORBToWrite; + + OSSet * fORBSet; + OSIterator * fORBSetIterator; + + void * fPasswordBuf; + UInt32 fPasswordLen; + IOFWAddressSpace * fPasswordAddressSpace; + FWAddress fPasswordAddress; + IOMemoryDescriptor * fPasswordDescriptor; + + bool fSuspended; + + UInt32 fLoginRetryDelay; + UInt32 fLoginRetryCount; + UInt32 fLoginRetryMax; + IOFWDelayCommand * fLoginRetryTimeoutCommand; + bool fLoginRetryTimeoutTimerSet; + IOFireWireSBP2Target * fTarget; + + bool fUnsolicitedStatusEnableRequested; + + IOFWDelayCommand * fReconnectRetryTimeoutCommand; + bool fReconnectRetryTimeoutTimerSet; + + int fCriticalSectionCount; + + // init / destroy + virtual IOReturn getUnitInformation( void ); + virtual IOReturn allocateResources( void ); + virtual void free( void ); + + // orb add / remove + virtual IOReturn addORB( IOFireWireSBP2ORB * orb ); + static IOReturn staticExecuteAddORB( OSObject *self, void * orb, void *, void *, void * ); + virtual IOReturn executeAddORB( IOFireWireSBP2ORB * orb ); + + static IOReturn staticExecuteRemoveORB( OSObject *self, void * orb, void *, void *, void * ); + virtual IOReturn executeRemoveORB( IOFireWireSBP2ORB * orb ); + + // + // login + // + + static IOReturn staticExecuteLogin( OSObject *self, void *, void *, void *, void * ); + virtual IOReturn executeLogin( void ); + virtual void abortLogin( void ); + + // login write complete handler + static void loginWriteCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + virtual void loginWriteComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + + // login timeout handler + static void loginTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + virtual void loginTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + + // status block write handler + static UInt32 statusBlockWriteStatic(void *refcon, UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, + const void *buf, IOFWRequestRefCon lockRead); + virtual UInt32 statusBlockWrite( UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, const void *buf, IOFWRequestRefCon lockRead); + virtual void completeLogin( IOReturn state, const void *buf = NULL, UInt32 len = 0, void * buf2 = NULL ); + + // + // reconnect + // + + virtual void doReconnect( void ); + virtual void restartReconnect( void ); + virtual void startReconnectTimer( void ); + + // reconnect write complete handler + static void reconnectWriteCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + virtual void reconnectWriteComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + + // reconnect timeout handler + static void reconnectTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + virtual void reconnectTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + + // reconnect status block + static UInt32 reconnectStatusBlockWriteStatic(void *refcon, UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, + UInt32 len, const void *buf, IOFWRequestRefCon lockRead); + virtual UInt32 reconnectStatusBlockWrite( UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, + const void *buf, IOFWRequestRefCon lockRead); + + virtual void sendReconnectNotification( UInt32 event ); + virtual void sendReconnectNotificationWithStatusBlock( UInt32 event ); + + // + // logout + // + + static IOReturn staticExecuteLogout( OSObject *self, void *, void *, void *, void * ); + virtual IOReturn executeLogout( void ); + + // logout write complete handler + static void logoutWriteCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + virtual void logoutWriteComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + + // logout timeout handler + static void logoutTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + virtual void logoutTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + + virtual void completeLogout( IOReturn state, const void *buf = NULL, UInt32 len = 0); + + // fetch agent write complete handler + static void fetchAgentWriteCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + virtual void fetchAgentWriteComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + + // + // fetch agent + // + + bool fFetchAgentResetInProgress; + UInt32 fFetchAgentResetBuffer; + FWAddress fFetchAgentResetAddress; + IOFWWriteQuadCommand * fFetchAgentResetCommand; + void * fFetchAgentResetRefCon; + FWSBP2StatusCallback fFetchAgentResetCompletion; + + static IOReturn staticExecuteFetchAgentReset( OSObject *self, void *, void *, void *, void * ); + virtual IOReturn executeFetchAgentReset( void ); + static void fetchAgentResetCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + virtual void fetchAgentResetComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + + // + // doorbell + // + + bool fDoorbellInProgress; + bool fDoorbellRingAgain; + UInt32 fDoorbellBuffer; + FWAddress fDoorbellAddress; + IOFWWriteQuadCommand * fDoorbellCommand; + + static IOReturn staticExecuteDoorbell( OSObject *self, void *, void *, void *, void * ); + virtual IOReturn executeDoorbell( void ); + static void doorbellCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + virtual void doorbellComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + + // + // enable unsolicited satus + // + + bool fUnsolicitedStatusEnableInProgress; + UInt32 fUnsolicitedStatusEnableBuffer; + FWAddress fUnsolicitedStatusEnableAddress; + IOFWWriteQuadCommand * fUnsolicitedStatusEnableCommand; + + static IOReturn staticExecuteUnsolicitedStatusEnable( OSObject *self, void *, void *, void *, void * ); + virtual IOReturn executeUnsolicitedStatusEnable( void ); + static void unsolicitedStatusEnableCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + virtual void unsolicitedStatusEnableComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + + // + // busy timeout stuff + // + + bool fSetBusyTimeoutInProgress; + UInt32 fSetBusyTimeoutBuffer; + FWAddress fSetBusyTimeoutAddress; + IOFWWriteQuadCommand * fSetBusyTimeoutCommand; + + bool fInCriticalSection; + + UInt16 fLocalNodeID; + bool fFastStartSupported; + UInt32 fFastStartOffset; + UInt32 fFastStartMaxPayload; + + UInt32 fUserLoginGeneration; + bool fUserLoginGenerationSet; + + IOFWDelayCommand * fFetchAgentRetryTimerCommand; + bool fFetchAgentRetryTimerSet; + + virtual IOReturn executeSetBusyTimeout( void ); + static void setBusyTimeoutCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + virtual void setBusyTimeoutComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + +private: + // IOFireWireSBP2ORB friend class wrappers + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 0); + +protected: + virtual bool initORBWithLogin( IOFireWireSBP2ORB * orb, IOFireWireSBP2Login * login ); + virtual void setNextORBAddress( IOFireWireSBP2ORB * orb, FWAddress address ); + virtual void fetchAgentWriteComplete( IOFireWireSBP2ORB * orb, IOReturn status ); + virtual bool isORBTimerSet( IOFireWireSBP2ORB * orb ); + virtual void cancelORBTimer( IOFireWireSBP2ORB * orb ); + + // IOFireWireSBP2LUN friend class wrappers + virtual void removeLogin( void ); + virtual IOFireWireSBP2Target * getTarget( void ); + + UInt32 fARDMAMax; + bool fPhysicalAccessEnabled; + + bool fLoginStatusReceived; + FWSBP2StatusBlock fLoginStatusBlock; + UInt32 fLoginStatusBlockLen; + +private: + + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 1); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 2); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 3); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 4); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 5); + +public: + + ////////////////////////////// + + /*! + @function createORB + @abstract Creates a new IOFireWireSBP2ORB for this login. + @discussion Create a new IOFireWireSBP2ORB for this login. It can be configured + with it's accessors and executed with submitORB below. + @result Returns a pointer to the new ORB object. + */ + + virtual IOFireWireSBP2ORB * createORB( void ); + + /*! + @function submitORB + @abstract Submits the given orb + @discussion Starts execution of the given ORB. If the ORB is an immediate ORB it's + addresss is written to the fetch agent. If it is a non immediate orb its address + is appended to the last orb of the currently processing chain. The doorbell is not + rung automatically it must be run manually with the ringDoorbell command described below. + @param orb The orb to be executed. + @result Returns kIOReturnSuccess if the ORB has been started successfully. + */ + + virtual IOReturn submitORB( IOFireWireSBP2ORB * orb ); + + // set callbacks + + /*! + @function setStatusNotifyProc + @abstract Sets the callback to be called on normal command status. + @discussion The supplied callback is called when normal command status is recieved, when + a normal command times out, or when a normal command is aborted. + "notificationEvent" in the callback's params will indicate what happened. + It will be set to one of the following values: kFWSBP2NormalCommandReset, kFWSBP2NormalCommandStatus, + or kFWSBP2NormalCommandTimeout. If the event type is kFWSBP2NormalCommandTimeout and "len" is + non-zero then "message" contains the data written to the status block. + @param refCon refCon passed to callback. + @param callback address of callback method of type FWSBP2NotifyCallback. + */ + + virtual void setStatusNotifyProc( void * refCon, FWSBP2NotifyCallback callback ); + + /*! + @function getStatusNotifyProc + @abstract Returns the callback to be called on normal command status. + @discussion Returns the refCon and callback address of the status notify callback. + @param refCon output parameter returning the refCon to be passed to the callback. + @param callback output parameter returning the address of the callback. + */ + + virtual void getStatusNotifyProc( void ** refCon, FWSBP2NotifyCallback * callback ); + + /*! + @function setUnsolicitedStatusNotifyProc + @abstract Sets the callback to be called on normal command status. + @discussion The supplied callback is called when unsolicited status is recieved. + "notificationEvent" in the callback's params will indicate what happened. In this + case it will be set to kFWSBP2UnsolicitedStatus. If "len" is + non-zero then "message" contains the data written to the status block. Note: any buffers + returned by callbacks are only valid for the duration of the login and should not have + their contents modified. + @param refCon refCon passed to callback. + @param callback address of callback method of type FWSBP2NotifyCallback. + */ + + virtual void setUnsolicitedStatusNotifyProc( void * refCon, FWSBP2NotifyCallback callback ); + + /*! + @function getUnsolicitedStatusNotifyProc + @abstract Returns the callback to be called on unsolicited status. + @discussion Returns the refCon and callback address of the unsolicited status notify callback. + @param refCon output parameter returning the refCon to be passed to the callback. + @param callback output parameter returning the address of the callback. + */ + + virtual void getUnsolicitedStatusNotifyProc( void ** refCon, FWSBP2NotifyCallback * callback ); + + // command handling + + /*! + @function setLoginCompletion + @abstract Sets the callback to be called when a login attempt is complete. + @discussion The supplied callback is called when a login attempt has completed. "status" in the + callback's params should be checked to determine the success or failure of the login attempt. + If "statusBlock" is non-null then login status was written and it has been supplied here. If + the login attempt was successful then the login response will be supplied in the "loginResponse" + buffer. Note: all buffers supplied to callbacks are only valid for the duration of the callback. + Also, you are not to modify the contents of any supplied buffer. + @param refCon refCon passed to callback. + @param callback address of callback method of type FWSBP2LoginCallback. + */ + + virtual void setLoginCompletion( void * refCon, FWSBP2LoginCallback completion ); + + /*! + @function submitLogin + @abstract Attempts to login to the LUN. + @discussion This call begins the login process. The login object should be configured prior + to this call. If kIOReturnSuccess is returned from this call then the loginCompletion routine + will be called when the login completes (successfully or unsuccesfully). + @result Returns kIOReturnSuccess login has successlly begun. + */ + + virtual IOReturn submitLogin( void ); + + /*! + @function submitLogout + @abstract Attempts to logout of the LUN. + @discussion This call begins the logout process. If kIOReturnSuccess is returned from this call then + the logoutCompletion routine will be called when the logout completes (successfully or unsuccesfully). + @result Returns kIOReturnSuccess if logout has successfully begun. + */ + + virtual IOReturn submitLogout( void ); + + /*! + @function setLogoutCompletion + @abstract Sets the callback to be called when a logout attempt is complete. + @discussion The supplied callback is called when a logout attempt has completed. "status" in the + callback's params should be checked to determine the success or failure of the logout attempt. + If "statusBlock" is non-null then logout status was written and it has been supplied here. + Note: all buffers supplied to callbacks are only valid for the duration of the callback. + Also, you are not to modify the contents of any supplied buffer. + @param refCon refCon passed to callback. + @param callback address of callback method of type FWSBP2LogoutCallback. + */ + + virtual void setLogoutCompletion( void * refCon, FWSBP2LogoutCallback completion ); + + /*! + @function setFetchAgentWriteCompletion + @abstract Sets the callback to be called when the fetch agent write completes. + @discussion When an immediate orb is executed with submitORB, it's address is written to a + specific address on the device. This address is called the fetch agent. The device the + reads that orb from the Mac's memory and executes it. With this call you can register to + be called back when this write to the fetch agent completes. The SBP2 services guarantee + that the fetch agent write will be complete before status is reported for an ORB, so for + most drivers this notification is not required. + @param refCon refCon passed to callback. + @param callback address of callback method of type FWSBP2FetchAgentWriteCallback. + */ + + virtual void setFetchAgentWriteCompletion( void * refCon, FWSBP2FetchAgentWriteCallback completion ); + + /*! + @function setFetchAgentResetCompletion + @abstract Sets the callback to be called when a fetch agent reset completes. + @discussion The fetch agent state machine on the device can be reset by a write to a specific + register. The SBP2 services offer a utility method to reset the fetch agent. You can register + a callback routine here to be notified when this rest write completes. + @param refCon refCon passed to callback. + @param callback address of callback method of type FWSBP2FetchAgentWriteCallback. + */ + + virtual void setFetchAgentResetCompletion( void * refCon, FWSBP2StatusCallback completion ); + + /*! + @function submitFetchAgentReset + @abstract Resets the LUN's fetch agent. + @discussion The fetch agent state machine on the device can be reset by a write to a specific + register. This reset can be intiated by a call to this method. Notification of the completion + of this write can be had by registering a callback with the setFetchAgentResetCompletion method. + @result Returns kIOReturnSuccess if the reset started successfully. + */ + + virtual IOReturn submitFetchAgentReset( void ); + + /*! + @function ringDoorbell + @abstract Rings the doorbell on the LUN. + @discussion Non-immediate appends to the ORB chain may require the fetch agent state machine + to be notified of the new ORB's presence. This is accomplished by writing to the so called + doorbell register. This method begins one of those writes. + @result Returns kIOReturnSuccess if the ring started successfully. + */ + + virtual IOReturn ringDoorbell( void ); + + /*! + @function enableUnsolicitedStatus + @abstract Enables unsolicited status. + @discussion After unsolicited is sent the device will not send any additional unsolicited status + until a specific register is written. This serves as a sort of flow-control for unsolicited status. + After unsolicited status is recieved and processed drivers will want to reenable the delivery + of unsolicted status by a call to this method. + @result Returns kIOReturnSuccess if the status enable write started successfully. + */ + + virtual IOReturn enableUnsolicitedStatus( void ); + + // accessors + + /*! + @function getMaxCommandBlockSize + @abstract Returns the maximum command block size. + @discussion The device publishes an upper limit on the size of command block that it can + accept. That value can be accessed via this method. + @result Returns a UInt32 containing the maximum command block size. + */ + + virtual UInt32 getMaxCommandBlockSize( void ); + + /*! + @function getLoginID + @abstract Returns the current login ID. + @discussion When we successfully login to a device. The device gives us a unique login id. + This is used internally for reconnecting to the device after bus resets and for certain other + management ORBs. Most drivers are probably not interested in this value. + @result Returns a UInt32 containing the current login ID. + */ + + virtual UInt32 getLoginID( void ); + + /*! + @function setLoginFlags + @abstract Sets login configuration flags. + @discussion Configures the login behavior according to the provided flags. Currently two + flags are defined for this API. kFWSBP2ExclusiveLogin sets the exclusive login bit in the + login ORB. kFWSBP2DontSynchronizeMgmtAgent allows simultaneous logins or reconnects to LUNs + with a common management agent (ie LUNs in the same unit directory). + @param loginFlags the login configuration flags. + */ + + virtual void setLoginFlags( UInt32 loginFlags ); + + /*! + @function getLoginFlags + @abstract Returns the currently set login flags. + @discussion Returns the current state of the login flags. Currently there is only one + flag defined for this API. kFWSBP2ExclusiveLogin indicates that the exclusive login bit + should be set in the login ORB. + @result Returns a UInt32 containing the currently set login flags. + */ + + virtual UInt32 getLoginFlags( void ); + + /*! + @function setReconnectTime + @abstract Sets the desired reconnect duration. + @discussion The target and initiator arbitrate the duration of the reconnect timeout. Here + the initiator specifies its desired timeout time in 2^reconnectTime seconds. After a + successful login the device returns the actual timeout value it wishes to use. This value + may be less than the reconnect timeout that the intiator specified if this is all that the + device can support. + @param reconnectTime The desired reconnect timeout encoded as 2^reconnectTime seconds. + */ + + virtual void setReconnectTime( UInt32 reconnectTime ); + + /*! + @function getReconnectTime + @abstract Returns the currently set reconnect time. + @discussion Returns the currently desired initiator reconnect time encoded as 2^time seconds. + @result Returns a UInt32 containing the currently set reconnect time. + */ + + virtual UInt32 getReconnectTime( void ); + + /*! + @function setMaxPayloadSize + @abstract Sets the maximum data transfer length for a normal command ORB. + @discussion Sets the maximum data transfer length for a normal command ORB. This value is + the maximum for all ORBs sent to this LUN. This can be trimmed further on an ORB by ORB basis, + by a similar call in the IOFireWireSBP2ORB itself. + @param reconnectTime The desired maximum payload size in bytes. + */ + + virtual void setMaxPayloadSize( UInt32 maxPayloadSize ); + + /*! + @function getMaxPayloadSize + @abstract Returns the currently set maximum payload size. + @discussion Returns the currently global maximum payload size in bytes. + @result Returns a UInt32 containing the currently set maximum payload size. + */ + + virtual UInt32 getMaxPayloadSize( void ); + + /*! + @function setPassword + @abstract Sets the login password. + @discussion Sets the login password using a buffer and a length. An alternate version exists + that accepts an IOMemoryDescriptor. If the password length is 8 or less the password is copied + directly into the login orb. If the length is greater than 8 the buffer is referenced by address + in the login ORB. In this case the buffer is not copied and should remain allocated for the + duration of the login attempt. + @param buf a pointer to the password buffer. + @param len the length in bytes of the password buffer. + @result Returns kIOReturnSuccess on success. + */ + + virtual IOReturn setPassword( void * buf, UInt32 len ); + + /*! + @function setPassword + @abstract Sets the login password. + @discussion Sets the login password using an IOMemoryDescriptor. An alternate version exists + that accepts a buffer and a length. If the password length is 8 or less the password is copied + directly into the login orb. If the length is greater than 8 the buffer is referenced by address + in the login ORB. + @param memory an IOMemoryDescriptor referencing the password. + @result Returns kIOReturnSuccess on success. + */ + + virtual IOReturn setPassword( IOMemoryDescriptor * memory ); + + + /*! + @function setRefCon + @abstract Sets the login refCon. + @discussion Sets a user defined value on the login that can be retrieved later with the + method getRefCon. + @param refCon a user defined value. + */ + + virtual void setRefCon( void * refCon ); + + /*! + @function getRefCon + @abstract Returns the refCon set with setRefCon. + @discussion Returns the user defined value previously stored in the login with setRefCon. + @result Returns the previously stored user defined value. + */ + + virtual void * getRefCon( void ); + + /*! + @function setBusyTimeoutRegisterValue + @abstract Sets the value to be written to the BUSY_TIMEOUT register. + @discussion 1394-1995 defines a register known as the BUSY_TIMEOUT register. This register + controls the busy retry behavior of your device. The initial value for this register is + 0x00000000. Which means busied transactions will not be retried. Since most devices want + their transactions retired on busy acks, the SBP2 service automatically updates the + BUSY_TIMEOUT register with the value specified here whenever necessary. Most drivers should + set this value to 0x0000000f. + @param timeout desired value of the BUSY_TIMEOUT register. + */ + + virtual void setBusyTimeoutRegisterValue( UInt32 timeout ); + +protected: + + virtual void startORBTimer( IOFireWireSBP2ORB * orb ); + virtual void prepareORBForExecution( IOFireWireSBP2ORB * orb ); + + static IOReturn staticExecuteORB( OSObject *self, void * orb, void *, void *, void * ); + virtual IOReturn executeORB( IOFireWireSBP2ORB * orb ); + +public: + + /*! + @function release + @abstract Primary implementation of the release mechanism. + @discussion See OSObject.h for more information. When retainCount == when then call free(). + */ + + virtual void release() const; + + /*! + @function setLoginRetryCountAndDelayTime + @abstract Sets login retry behavior. + @discussion Sets login retry behavior. + @param retryCount number of times to retry logins + @param uSecs delay time in microseconds between login retries + */ + + virtual void setLoginRetryCountAndDelayTime( UInt32 retryCount, UInt32 uSecs ); + +protected: + virtual IOReturn initialExecuteLogin( void ); + virtual void startLoginRetryTimer( void ); + virtual void stopLoginRetryTimer( void ); + static void loginRetryTimeoutStatic( void *refcon, IOReturn status, + IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + virtual void loginRetryTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd); + + virtual void startReconnectRetryTimer( void ); + virtual void stopReconnectRetryTimer( void ); + static void reconnectRetryTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + virtual void reconnectRetryTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + + virtual bool isORBAppended( IOFireWireSBP2ORB * orb ); + virtual void setORBIsAppended( IOFireWireSBP2ORB * orb, bool state ); + +public: + virtual void setAddressLoForLoginORBAndResponse( UInt32 addressLoORB, UInt32 addresLoResponse ); + + virtual void setLoginGeneration( UInt32 generation ); + virtual void clearLoginGeneration( void ); + +protected: + void startFetchAgentRetryTimer( UInt32 duration ); + void stopFetchAgentRetryTimer( void ); + static void fetchAgentRetryTimerStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + void fetchAgentRetryTimer( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + + void terminateNotify( void ); + void processLoginWrite( void ); + +public: + + bool isPhysicalAccessEnabled( void ); + UInt32 getARDMMax( void ); + +private: + + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 6); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 7); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 8); + + }; + +#endif diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2ManagementORB.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2ManagementORB.h.svn-base new file mode 100644 index 0000000..9455383 --- /dev/null +++ b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2ManagementORB.h.svn-base @@ -0,0 +1,345 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + @header IOFireWireSBP2ManagementORB + Contains the class definition for IOFireWireSBP2ManagementORB. +*/ + +#ifndef _IOKIT_IOFIREWIRESBP2MANAGEMENTORB_H +#define _IOKIT_IOFIREWIRESBP2MANAGEMENTORB_H + +#include +#include + +#include + +class IOFireWireSBP2LUN; +class IOFireWireSBP2ManagementORB; +class IOFireWireSBP2ORB; + +enum +{ + kFWSBP2QueryLogins = 1, + kFWSBP2AbortTask = 0xb, + kFWSBP2AbortTaskSet = 0xc, + kFWSBP2LogicalUnitReset = 0xe, + kFWSBP2TargetReset = 0xf +}; + +// Callback when management command completes asynchronously + +/*! + @typedef FWSBP2ManagementCallback + @param refCon Reference constant supplied when the notification was registered. + @param status Indicates success or failure of operation. + @param orb Indicates current orb status is for. +*/ + +typedef void (*FWSBP2ManagementCallback)(void * refCon, IOReturn status, IOFireWireSBP2ManagementORB * orb); + +/*! + @class IOFireWireSBP2ManagementORB + @abstract Supplies non login related management ORBs. Management ORBs can be executed independent + of a login, if necessary. Management ORBs are created using the IOFireWireSBP2LUN interface. +*/ + +class IOFireWireSBP2ManagementORB : public IOFWCommand +{ + OSDeclareDefaultStructors( IOFireWireSBP2ManagementORB ) + + friend class IOFireWireSBP2LUN; + friend class IOFireWireSBP2UserClient; + +protected: + + //////////////////////////////////////// + // rom keys + + enum + { + kUnitCharacteristicsKey = 0x3A, + kManagementAgentOffsetKey = 0x54 + }; + + //////////////////////////////////////// + // structs + + typedef struct + { + UInt32 orbOffsetHi; + UInt32 orbOffsetLo; + UInt32 reserved1[2]; + UInt16 options; + UInt16 loginID; + UInt32 reserved2; + UInt32 statusFIFOAddressHi; + UInt32 statusFIFOAddressLo; + } FWSBP2TaskManagementORB; + + typedef struct + { + UInt32 reserved1[2]; + UInt32 queryResponseAddressHi; + UInt32 queryResponseAddressLo; + UInt16 options; + UInt16 lun; + UInt16 reserved2; + UInt16 queryResponseLength; + UInt32 statusFIFOAddressHi; + UInt32 statusFIFOAddressLo; + } FWSBP2QueryLoginsORB; + + typedef struct + { + UInt8 details; + UInt8 sbpStatus; + UInt16 orbOffsetHi; + UInt32 orbOffsetLo; + UInt32 status[6]; + } FWSBP2StatusBlock; + +protected: + + //////////////////////////////////////// + // friend methods + + // IOFireWireSBP2LUN methods + virtual bool initWithLUN( IOFireWireSBP2LUN * lun, + void * refCon, + FWSBP2ManagementCallback completion ); + + // IOFireWireSBP2UserClient methods + virtual void setAsyncCallbackReference( void * asyncRef ); + virtual void getAsyncCallbackReference( void * asyncRef ); + +protected: + + // reserved for future use + struct ExpansionData + { + bool fInCriticalSection; + }; + ExpansionData * fExpansionData; + + IOFireWireSBP2LUN * fLUN; + IOFireWireUnit * fUnit; + + UInt32 fManagementOffset; + UInt32 fManagementTimeout; + UInt32 fFunction; + OSObject * fManageeCommand; + + // our orb + FWSBP2TaskManagementORB fManagementORB; + IOFWAddressSpace * fManagementORBAddressSpace; + FWAddress fManagementORBAddress; + + // command to write management agent + IOFWWriteCommand * fWriteCommand; + IOMemoryDescriptor * fWriteCommandMemory; + + // timeout + IOFWCommand * fTimeoutCommand; + bool fTimeoutTimerSet; + + // status block + FWSBP2StatusBlock fStatusBlock; + IOFWAddressSpace * fStatusBlockAddressSpace; + FWAddress fStatusBlockAddress; + + // response buffer + void * fResponseBuf; + UInt32 fResponseLen; + IOFWAddressSpace * fResponseAddressSpace; + FWAddress fResponseAddress; + + // competion routine + FWSBP2ManagementCallback fCompletionCallback; + void * fCompletionRefCon; + + // for user client + OSAsyncReference64 fCallbackAsyncRef; + + IOMemoryMap * fResponseMap; + + bool fCompleting; + + //////////////////////////////////////// + + // init / destroy + virtual IOReturn getUnitInformation( void ); + virtual IOReturn allocateResources( void ); + virtual void free( void ); + + // command execution + virtual IOReturn execute( void ); + virtual IOReturn complete( IOReturn state ); + + // write complete handler + static void writeCompleteStatic( void *refcon, + IOReturn status, + IOFireWireNub *device, + IOFWCommand *fwCmd ); + virtual void writeComplete( IOReturn status, + IOFireWireNub *device, + IOFWCommand *fwCmd ); + + // timeout handler + static void handleTimeoutStatic( void *refcon, + IOReturn status, + IOFireWireBus *bus, + IOFWBusCommand *fwCmd ); + virtual void handleTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + + // status block write handler + static UInt32 statusBlockWriteStatic( void *refcon, + UInt16 nodeID, + IOFWSpeed &speed, + FWAddress addr, + UInt32 len, + const void *buf, + IOFWRequestRefCon lockRead ); + virtual UInt32 statusBlockWrite( UInt16 nodeID, + FWAddress addr, + UInt32 len, + const void *buf, + IOFWRequestRefCon lockRead ); + + // IOFireWireSBP2LUN friend class wrappers + virtual void clearAllTasksInSet( void ); + virtual void removeManagementORB( IOFireWireSBP2ManagementORB * orb ); + +public: + + //////////////////////////////////////// + // client methods + + /*! + @function setCommandFunction + @abstract Sets the function of the management ORB. + @discussion Sets the the function of the management ORB. Legal values are kFWSBP2QueryLogins, + kFWSBP2AbortTask, kFWSBP2AbortTaskSet, kFWSBP2LogicalUnitReset, and kFWSBP2TargetReset. + @param function a value indicating the desired management function. + @result Returns kIOReturnSuccess if function was a legal function. + */ + + virtual IOReturn setCommandFunction( UInt32 function ); + + /*! + @function getCommandFunction + @abstract Returns the current function of the management ORB. + @discussion Returns the function of the management ORB. This is the same value that was + set with setCommandFunction. + @result Returns the function of the management ORB. + */ + + virtual UInt32 getCommandFunction( void ); + + /*! + @function setManageeCommand + @abstract Sets the command to be managed by the management ORB. + @discussion All management functions except kFWSBP2QueryLogins require a reference to an ORB of + some sort. kFWSBP2AbortTaskSet, kFWSBP2LogicalUnitReset, and kFWSBP2TargetReset require a + reference to the login ORB. kFWSBP2AbortTask requires a reference to the ORB to be aborted. + This method allows you to set the ORB to be managed. + @param command a reference to an IOFireWireSBP2Login or an IOFireWireSBP2ORB. + */ + + virtual void setManageeCommand( OSObject * command ); + + /*! + @function getCommandFunction + @abstract Returns the current managee command of the management ORB. + @discussion Returns the current managee command of the management ORB. This is the same value that was + set with setManageeCommand. + @result Returns the current managee command of the management ORB. + */ + + virtual OSObject* getManageeCommand( void ); + + /*! + @function setResponseBuffer + @abstract Sets the response buffer for the management ORB. + @discussion Sets the response buffer for the management ORB. kFWSBP2QueryLogins returns + a response to its query and needs to write it somewhere. This routine allows you to + specify the location. + @param desc memory descriptor for buffer. + @result Returns kIOReturnSuccess on a success. + */ + + virtual IOReturn setResponseBuffer( IOMemoryDescriptor * desc ); + + /*! + @function setResponseBuffer + @abstract Sets the response buffer for the management ORB. + @discussion Sets the response buffer for the management ORB. kFWSBP2QueryLogins returns + a response to its query and needs to write it somewhere. This routine allows you to + specify the location. + @param buf backing store for buffer + @param len length of buffer. + @result Returns kIOReturnSuccess on a success. + */ + + virtual IOReturn setResponseBuffer( void * buf, UInt32 len ); + + /*! + @function getResponseBuffer + @abstract Returns the response buffer for the management ORB. + @discussion Returns the response buffer set in setResponseBuffer above + @param desc memory descriptor for buffer. + @param buf output parameter for backing store for buffer + @param len output parameter for length of buffer. + */ + + virtual void getResponseBuffer( void ** buf, UInt32 * len ); + + /*! + @function release + @abstract Primary implementation of the release mechanism. + @discussion See OSObject.h for more information. + @param when When retainCount == when then call free(). + */ + + virtual void release() const; + +protected: + + virtual void setORBToDummy( IOFireWireSBP2ORB * orb ); + + virtual void suspendedNotify(); + +private: + + OSMetaClassDeclareReservedUsed(IOFireWireSBP2ManagementORB, 0); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 1); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 2); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 3); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 4); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 5); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 6); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 7); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 8); + +}; + +#endif \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2ORB.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2ORB.h.svn-base new file mode 100644 index 0000000..5c11593 --- /dev/null +++ b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2ORB.h.svn-base @@ -0,0 +1,547 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + @header IOFireWireSBP2ORB + Contains the class definition for IOFireWireSBP2ORB. +*/ + +#ifndef _IOKIT_IOFIREWIRESBP2ORB_H +#define _IOKIT_IOFIREWIRESBP2ORB_H + +#include + +#include +#include +#include + +enum +{ + kFWSBP2ConstraintForceDoubleBuffer = (1 << 0) +}; + +// login option flags +enum +{ + kFWSBP2CommandCompleteNotify = (1 << 0), + kFWSBP2CommandTransferDataFromTarget = (1 << 1), + kFWSBP2CommandImmediate = (1 << 2), + + kFWSBP2CommandNormalORB = (1 << 5), + kFWSBP2CommandReservedORB = (1 << 6), + kFWSBP2CommandVendorORB = (1 << 7), + kFWSBP2CommandDummyORB = (1 << 8), + kFWSBP2CommandCheckGeneration = (1 << 9), + + kFWSBP2CommandFixedSize = (1 << 10), + kFWSBP2CommandVirtualORBs = (1 << 11) // handy for debugging +}; + +enum +{ + kFWSBP2MaxPageClusterSize = 0xf000 +}; + +class IOFireWireSBP2ORB; +class IOFireWireSBP2LUN; +class IOFireWireSBP2Login; + +/*! + @class IOFireWireSBP2ORB + @abstract Represents an SBP2 normal command ORB. Supplies the APIs for configuring normal + command ORBs. This includes setting the command block and writing the page tables for I/O. + The ORBs are executed using the submitORB method in IOFireWireSBP2Login. +*/ + +class IOFireWireSBP2ORB : public IOCommand +{ + OSDeclareDefaultStructors( IOFireWireSBP2ORB ) + + friend class IOFireWireSBP2Login; + friend class IOFireWireSBP2ManagementORB; + +protected: + + typedef struct + { + UInt32 nextORBAddressHi; + UInt32 nextORBAddressLo; + UInt32 dataDescriptorHi; + UInt32 dataDescriptorLo; + UInt16 options; + UInt16 dataSize; + UInt32 commandBlock[1]; // will be variable sized + } FWSBP2ORB; + + typedef struct + { + UInt16 segmentLength; + UInt16 segmentBaseAddressHi; + UInt32 segmentBaseAddressLo; + } FWSBP2PTE; + +private: + + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 0); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 1); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 2); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 3); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 4); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 5); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 6); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 7); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 8); + +protected: + + virtual void deallocateBufferAddressSpace( void ); + virtual IOReturn allocateTimer( void ); + virtual void deallocateTimer( void ); + + /*! + @function deallocatePageTable + @abstract Frees up memory allocated for the page table. + @discussion Frees all memory associated with the page table. Undoes what allocatePageTable does. + Calling allocatePageTable again will automatically deallocate the existing page table before + allocating a new one, so this method is not used in most cases. + */ + + virtual void deallocatePageTable( void ); + +protected: + + // IOFireWireSBP2Login methods + virtual bool initWithLogin( IOFireWireSBP2Login * login ); + virtual void setNextORBAddress( FWAddress address ); + +public: + + /*! + @function allocatePageTable + @abstract Allocates memory for the page table. + @discussion Page table allocation is handle automatically by the ORB, except if the + kFWSBP2CommandFixedSize flags is set. In this case we will fail to write a page table if we + need more page table space than we have already. This method is exposed so these drivers + can preallocate as much page table as they need. This is useful if your driver is part of + the paging path and cannot allow allocations to occur. + @param entryCount number of entries of page table to be allocated. + */ + + virtual IOReturn allocatePageTable( UInt32 entryCount ); + +protected: + + virtual bool isTimerSet( void ); + virtual void cancelTimer( void ); + +protected: + + // reserved for future use + struct ExpansionData { }; + ExpansionData *reserved; + + IOFireWireSBP2Login * fLogin; + IOFireWireSBP2LUN * fLUN; + IOFireWireUnit * fUnit; + IOFireWireController * fControl; + IODMACommand * fDMACommand; + void * fUnused2; + + UInt32 fCommandFlags; + UInt32 fMaxPayloadSize; + UInt32 fTimeoutDuration; + UInt32 fGeneration; + UInt64 fRefCon; + + // + // orb + // + + IOMemoryDescriptor * fORBDescriptor; + FWSBP2ORB * fORBBuffer; + + FWAddress fORBPseudoAddress; + IOFWAddressSpace * fORBPseudoAddressSpace; + + IOFWAddressSpace * fORBPhysicalAddressSpace; + FWAddress fORBPhysicalAddress; + + // + // page table + // + + UInt32 fPageTableSize; + IOBufferMemoryDescriptor * fPageTableDescriptor; + + IOFWAddressSpace * fPageTablePhysicalAddressSpace; + FWAddress fPageTablePhysicalAddress; + UInt32 fPageTablePhysicalLength; + + IOFWAddressSpace * fPageTablePseudoAddressSpace; + FWAddress fPageTablePseudoAddress; + + // + // buffers + // + + IOFWAddressSpace * fBufferAddressSpace; + bool fBufferAddressSpaceAllocated; + IOMemoryDescriptor * fBufferDescriptor; + + // + // timer + // + + IOFWDelayCommand * fTimeoutCommand; + bool fTimeoutTimerSet; + + bool fInProgress; + bool fIsAppended; + + UInt32 fFetchAgentWriteRetries; + UInt32 fPTECount; + UInt32 fFetchAgentWriteRetryInterval; + + UInt32 fConstraintOptions; + + virtual IOReturn allocateResources( void ); + virtual void free( void ); + + // orb timeout handler + static void orbTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + virtual void orbTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + + // login friend class wrappers + virtual IOFireWireUnit * getFireWireUnit( void ); + virtual IOFireWireSBP2LUN * getFireWireLUN( void ); + virtual void deallocateORB( void ); + virtual IOReturn allocateORB( UInt32 orbSize ); + virtual IOReturn removeORB( IOFireWireSBP2ORB * orb ); + virtual void prepareORBForExecution( void ); + virtual void startTimer( void ); + virtual void sendTimeoutNotification( IOFireWireSBP2ORB * orb ); + +public: + + /*! + @function release + @abstract Primary implementation of the release mechanism. + @discussion See OSObject.h for more information. + @param when When retainCount == when then call free(). + */ + + virtual void release() const; + + /*! + @function getLogin + @abstract Gets the login associated with this ORB. + @discussion Returns the IOFireWireSBP2Login object associated with this ORB. + @result Returns a pointer to an IOFireWireSBP2Login. + */ + + virtual IOFireWireSBP2Login * getLogin( void ); + + /*! + @function setCommandBuffersAsRanges + @abstract Creates a page table from a list of ranges. + @discussion Creates a page table with the given parameters. Any addresses mapped by this method + must remain valid until setCommandBuffers is called again or releaseCommandBuffers is called. + The SBP2 services do not release references to the command buffers just because the command + has completed. + @param ranges An array of ranges representing the data to be transfered. + @param withCount The number of ranges in the ranges array. + @param withDirection An IODirection indicating the direction of data transfer. + @param withTask The task that these adressses reside in. + @param offset Offset in bytes into data to begin writing table at. + @param length Number of bytes of data to map from offset. + @result Returns KIOReturnSuccess if the page table was written successfully. + */ + + virtual IOReturn setCommandBuffersAsRanges( IOVirtualRange * ranges, + UInt32 withCount, + IODirection withDirection, + task_t withTask, + UInt32 offset = 0, + UInt32 length = 0 ); + /*! + @function setCommandBuffersAsRanges + @abstract Creates a page table from a list of ranges. + @discussion Creates a page table with the given parameters. Any addresses mapped by this method + must remain valid until setCommandBuffers is called again or releaseCommandBuffers is called. + The SBP2 services do not release references to the command buffers just because the command + has completed. + @param memoryDescriptor IOMemoryDescriptor describe ranges to be written to a page table. + @param offset Offset in bytes into data to begin writing table at. + @param length Number of bytes of data to map from offset. + @result Returns KIOReturnSuccess if the page table was written successfully. + */ + + virtual IOReturn setCommandBuffers( IOMemoryDescriptor * memoryDescriptor, UInt32 offset = 0, + UInt32 length = 0 ); + + + /*! + @function releaseCommandBuffers + @abstract Releases SBP2's reference to the command buffers. + @discussion When you create a page table with one of the variants of setCommandBuffers. + SBP2 holds on to a reference to the buffers until this method is called. This means that + if a command completed and you manipulated the memory descriptor or released the buffers + without calling this method you could leave FW in an inconsistent state. + @result Returns KIOReturnSuccess if the page table was cleared successfully. + */ + + virtual IOReturn releaseCommandBuffers( void ); + + /*! + @function setCommandBlock + @abstract Sets the command block portion of the ORB. + @discussion Copys the data provided in the buffer to the command block portion of the ORB. + @param buffer Pointer to buffer to copy command block from. + @param length Number of bytes of data to copy. + @result Returns KIOReturnSuccess if the command block was updated successfully. + */ + + virtual IOReturn setCommandBlock( void * buffer, UInt32 length ); + + /*! + @function setCommandBlock + @abstract Sets the command block portion of the ORB. + @discussion Copys the data provided in the buffer to the command block portion of the ORB. + @param memory IOMemoryDescriptor representing the command block buffer. + @result Returns KIOReturnSuccess if the command block was updated successfully. + */ + + virtual IOReturn setCommandBlock( IOMemoryDescriptor * memory ); + + /*! + @function getCommandBufferDescriptor + @abstract Returns the memory descriptor representing the command buffer. + @discussion Returns the IOMemoryDescriptor for the data mapped by setCommandBuffer variants. + Works for setCommandBuffersAsRanges too. + @result Returns memory descriptor representing mapped data buffers. + */ + + virtual IOMemoryDescriptor * getCommandBufferDescriptor( void ); + + // accessors + + /*! + @function setCommandFlags + @abstract Sets configuration flags for the ORB. + @discussion Sets the configuration flags for the ORB. These can be any of the following: +

kFWSBP2CommandCompleteNotify - Set the notify bit as specified in SBP2 standard. Set to receive completion/timeout notification on this ORB. You almost always want to set this.

+

kFWSBP2CommandTransferDataFromTarget - Transfer direction as specified in SBP2 standard. Set if data is to be written by the device into the host's memory.

+

kFWSBP2CommandImmediate - Immediate Append. ORB address will be written to fetch agent and not chained. It is only legal to have one immediate ORB in progress at a time.

+

kFWSBP2CommandNormalORB - ORB format 0 - Format specified by SBP2 standard. Set this for most ORBs.

+

kFWSBP2CommandReservedORB - ORB format 1 - Format reserved by SBP2 standard for future standardization.

+

kFWSBP2CommandVendorORB - ORB format 2 - Format specified by SBP2 standard for vendor dependent ORBs.

+

kFWSBP2CommandDummyORB - ORB format 3 - Format specified by SBP2 standard for dummy ORBs.

+

kFWSBP2CommandCheckGeneration - If set upon submitORB, the ORB will only be appended if generation set with setCommandGeneration() matches the current generation. Pretty much all SBP2 drivers need sophisticated logic to track login state, so this is generally not used.

+

kFWSBP2CommandFixedSize - Do not allocate more memory for page table if needed. If there is not enough space in the currently allocated page table, the setCommandBuffers call will fail. This is important to set if your device is the backing store, as we don't want to cause memory allocations on the paging path.

+

kFWSBP2CommandVirtualORBs - Normally ORBs are backed by physical address spaces. Setting this flag makes this ORB backed by a pseudo address space. This can make ORBs easier to see in a bus trace. Virtual ORBs will have an address in the form of ffcX.XXXX.0000.0000. Pseudo address space backed ORBs are slower, so you won't want to set for deployment builds.

+ @param flags The flags to be set. + */ + + virtual void setCommandFlags( UInt32 flags ); + + /*! + @function getCommandFlags + @abstract Sets configuration flags for the ORB. + @discussion Returns the current configuration flags set on this ORB. + @result Return The current ORB flags. + */ + + virtual UInt32 getCommandFlags( void ); + + /*! + @function setMaxPayloadSize + @abstract Sets max payload size for the ORB. + @discussion This sets the maximum payload size for this ORB only. This size is clipped by + the global max payload size set in the login object. + @param maxPayloadSize The maximum payload size in bytes. + */ + + virtual void setMaxPayloadSize( UInt32 maxPayloadSize ); + + /*! + @function getMaxPayloadSize + @abstract Gets max payload size for the ORB. + @discussion This gets the maximum payload size for this ORB only. + @result Returns the maximum payload size in bytes. + */ + + virtual UInt32 getMaxPayloadSize( void ); + + /*! + @function setCommandTimeout + @abstract Sets the timeout of the ORB. + @discussion This sets the timeout for the ORB in milliseconds. Note that ORBs without timeouts + can be "lost." You will obviously not recieve timeout notification for timeouts of zero. But + perhaps less obviously you will not recieve orb reset notification, which is really a sort of + accelerated timeout notification for bus reset situations. + @param timeout The timeout duration in milliseconds. + */ + + virtual void setCommandTimeout( UInt32 timeout ); + + /*! + @function getCommandTimeout + @abstract Gets the timeout of the ORB. + @discussion This method gets the timeout for this ORB in milliseconds. + @result Returns the timeout for the orb in milliseconds. + */ + + virtual UInt32 getCommandTimeout( void ); + + + /*! + @function setCommandGeneration + @abstract Sets the command generation. + @discussion This sets the bus generation this ORB should be appended in. It is only meaningful + when combined with the kFWSBP2CommandCheckGeneration flags above. + @param gen The bus generation for command execution. + */ + + virtual void setCommandGeneration( UInt32 gen ); + + /*! + @function getCommandGeneration + @abstract Gets the command generation. + @discussion This gets the bus generation this ORB should be appended in. + @result Returns the bus generation for command execution. + */ + + virtual UInt32 getCommandGeneration( void ); + + /*! + @function setRefCon + @abstract Sets the ORB refCon. + @discussion Sets a user defined value on the ORB that can be retrieved later with the + method getRefCon. + @param refCon a user defined value. + */ + + virtual void setRefCon( void * refCon ); + + /*! + @function getRefCon + @abstract Returns the refCon set with setRefCon. + @discussion Returns the user defined value previously stored in the ORB with setRefCon. + @result Returns the previously stored user defined value. + */ + + virtual void * getRefCon( void ); + +protected: + + virtual void setToDummy( void ); + +public: + /*! + @function getORBAddress + @abstract Returns the FireWire address of this ORB. + @discussion Returns the FireWire bus address of this ORB. This is not the same as the Macintosh + address for the IOFireWireSBP2ORB. + @result Returns the FireWire address of this ORB. + */ + + virtual void getORBAddress( FWAddress * address ); + +protected: + + virtual bool isAppended( void ); + virtual void setIsAppended( bool state ); + virtual UInt32 getFetchAgentWriteRetries( void ); + virtual void setFetchAgentWriteRetries( UInt32 retries ); + + virtual void prepareFastStartPacket( IOBufferMemoryDescriptor * descriptor ); + + UInt32 getFetchAgentWriteRetryInterval( void ); + void setFetchAgentWriteRetryInterval( UInt32 interval ); + + IOReturn completeBufferAddressSpace( void ); + IOReturn prepareBufferAddressSpace( IOMemoryDescriptor * memoryDescriptor ); + +public: + + /*! + @function setBufferConstraints + @abstract Configures page table generation parameters + @discussion Sets the maximums size of any page table segment and the required alignemnt. Double buffering + may be used to satisfy these constraints. The only supported option is kFWSBP2ConstraintForceDoubleBuffer which + forces a page aligned double buffering of the entire descriptor. + @result May return an error if there is a problem allocating the underlying resources or if buffers are currently attached. + */ + + IOReturn setBufferConstraints( UInt64 maxSegmentSize, UInt32 alignment, UInt32 options = 0); + + + /*! + @function setCommandBuffersAsRanges64 + @abstract Creates a page table from a list of 64 bit ranges. + @discussion Creates a page table with the given parameters. Any addresses mapped by this method + must remain valid until setCommandBuffers is called again or releaseCommandBuffers is called. + The SBP2 services do not release references to the command buffers just because the command + has completed. This is a 64 bit compatible version of setCommandBuffersAsRanges. + @param ranges An array of ranges representing the data to be transfered. + @param withCount The number of ranges in the ranges array. + @param withDirection An IODirection indicating the direction of data transfer. + @param withTask The task that these adressses reside in. + @param offset Offset in bytes into data to begin writing table at. + @param length Number of bytes of data to map from offset. + @result Returns KIOReturnSuccess if the page table was written successfully. + */ + + IOReturn setCommandBuffersAsRanges64( IOAddressRange * ranges, + uint64_t withCount, + IODirection withDirection, + task_t withTask, + uint64_t offset = 0, + uint64_t length = 0); + + /*! + @function setRefCon64 + @abstract Sets the ORB refCon as a 64 bit value. + @discussion Sets a user defined value on the ORB that can be retrieved later with the + method getRefCon. + @param refCon a user defined value. + */ + + virtual void setRefCon64( UInt64 refCon ); + + /*! + @function getRefCon64 + @abstract Returns the 64 bit refCon set with setRefCon64. + @discussion Returns the user defined value previously stored in the ORB with setRefCon. + @result Returns the previously stored user defined value. + */ + + virtual UInt64 getRefCon64( void ); + +protected: + + UInt32 calculateTransferSizeLog( bool * clipping ); + + +}; + +#endif diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2Target.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2Target.h.svn-base new file mode 100644 index 0000000..4288ce9 --- /dev/null +++ b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2Target.h.svn-base @@ -0,0 +1,224 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + @header IOFireWireSBP2Target + Contains the class definition for IOFireWireSBP2Target. +*/ + +#ifndef _IOKIT_IOFIREWIRESBP2TARGET_H +#define _IOKIT_IOFIREWIRESBP2TARGET_H + +#include +#include + +enum +{ + kIOFWSBP2FailsOnAckBusy = (1 << 0), + kIOFWSBP2FailsOnBusResetsDuringIO = (1 << 1), + kIOFWSBP2DontUsePTPacketLimit = (1 << 2) +}; + +/*! + @class IOFireWireSBP2Target + @abstract Serves as bridge between IOFireWireUnit and IOFireWireLUN. + @discussion Matches against IOFireWireUnits supporting the SBP2 protocol. Creates IOFireWireSBP2LUN nubs for matching. Most drivers will match against an IOFireWireSBP2LUN, but matching against an IOFireWireSBP2Target is also supported. This can be useful in cases where a single driver wishes to + control all LUNs on a device. Support for this technique is minimal, however, and the driver will be + required to discover it's LUNs through the registry. +*/ + +class IOFireWireSBP2Target : public IOService +{ + OSDeclareDefaultStructors(IOFireWireSBP2Target); + +protected: + + ///////////////////////////////////////// + // rom keys + + enum + { + kCmdSpecIDKey = 0x38, + kCmdSetKey = 0x39, + kSoftwareRevKey = 0x3b, + kFirmwareRevKey = 0x3c, + kLUNKey = 0x14, + kLUNDirectoryKey = 0xd4, + kManagementAgentOffsetKey = 0x54, + kUnitCharacteristicsKey = 0x3A, + kRevisionKey = 0x21, + kFastStartKey = 0x3E + }; + + typedef struct + { + UInt32 cmdSpecID; + UInt32 cmdSet; + UInt32 vendorID; + UInt32 softwareRev; + UInt32 firmwareRev; + UInt32 lun; + UInt32 devType; + UInt32 unitCharacteristics; + UInt32 managementOffset; + UInt32 revision; + bool fastStartSupported; + UInt32 fastStart; + } LUNInfo; + + // reserved for future use + struct ExpansionData + { + bool fStarted; + OSArray * fPendingMgtAgentCommands ; + UInt32 fNumberPendingMgtAgentOrbs; + UInt32 fNumLUNs; + }; + ExpansionData * fExpansionData; + + ///////////////////////////////////////// + // private fields + + bool fOpenFromTarget; + UInt32 fOpenFromLUNCount; + IOFireWireUnit * fProviderUnit; + UInt32 fFlags; + + IOFireWireController * fControl; + + UInt32 fIOCriticalSectionCount; + + ///////////////////////////////////////// + // private internals + + virtual void free( void ); + virtual IOReturn message( UInt32 type, + IOService * provider, + void * argument = 0); + + virtual void scanForLUNs( void ); + IOReturn createLUN( LUNInfo * info ); + +public: + + ///////////////////////////////////////// + // public methods + + /*! @function handleOpen + @abstract Overrideable method to control the open / close behaviour of an IOService. + @discussion See IOService for discussion. + @param forClient Designates the client of the provider requesting the open. + @param options Options for the open, may be interpreted by the implementor of handleOpen. + @result Return true if the open was successful, false otherwise. */ + + virtual bool handleOpen( IOService * forClient, IOOptionBits options, void * arg ); + + /*! + @function handleClose + @abstract Overrideable method to control the open / close behaviour of an IOService. + @discussion See IOService for discussion. + @param forClient Designates the client of the provider requesting the close. + @param options Options for the close, may be interpreted by the implementor of handleOpen. + */ + + virtual void handleClose( IOService * forClient, IOOptionBits options ); + + /*! + @function handleIsOpen + @abstract Overrideable method to control the open / close behaviour of an IOService. + @discussion See IOService for discussion. + @param forClient If non-zero, isOpen returns the open state for that client. If zero is passed, isOpen returns the open state for all clients. + @result Returns true if the specific, or any, client has the IOService open. + */ + + virtual bool handleIsOpen( const IOService * forClient ) const; + + /*! + @function start + @abstract During an IOService instantiation, the start method is called when the IOService has been selected to run on the provider. + @discussion See IOService for discussion. + @result Return true if the start was successful, false otherwise (which will cause the instance to be detached and usually freed). + */ + + virtual bool start( IOService *provider ); + + /*! + @function stop + @abstract During an IOService termination, the stop method is called in its clients before they are detached & it is destroyed. + @discussion See IOService for discussion. + */ + + virtual void stop( IOService *provider ); + + /*! + @function getFireWireUnit + @abstract Returns an IOFireWireUnit object. + @discussion An IOFireWireUnit is the provider of an IOFireWireSBP2Target. In order to use the base FireWire services + you will need a reference to the unit. This method returns that reference. + @result Returns a pointer to an IOFireWireUnit. + */ + + virtual IOFireWireUnit * getFireWireUnit( void ); + + /*! + @function matchPropertyTable + @abstract Implements SBP2 specific matching. + @discussion See IOService for discussion. + @param table The dictionary of properties to be matched against. + @result Returns false if the family considers the matching dictionary does not match in properties it understands, true otherwise. + */ + + virtual bool matchPropertyTable( OSDictionary * table ); + + virtual void setTargetFlags( UInt32 flags ); + virtual UInt32 getTargetFlags( void ); + +protected: + virtual void configurePhysicalFilter( void ); + +public: + virtual void clearTargetFlags( UInt32 flags ); + virtual IOReturn beginIOCriticalSection( void ); + virtual void endIOCriticalSection( void ); + + virtual bool finalize( IOOptionBits options ); + + IOReturn synchMgmtAgentAccess( IOFWCommand * mgmtOrbCommand ); + void completeMgmtAgentAccess( ); + void clearMgmtAgentAccess( ); + void cancelMgmtAgentAccess( IOFWCommand * mgmtOrbCommand ); + +protected: + + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 0); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 1); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 2); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 3); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 4); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 5); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 6); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 7); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 8); + +}; + +#endif diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2UserClient.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2UserClient.h.svn-base new file mode 100644 index 0000000..939dbf0 --- /dev/null +++ b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2UserClient.h.svn-base @@ -0,0 +1,186 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOFIREWIRESBP2USERCLIENT_H +#define _IOKIT_IOFIREWIRESBP2USERCLIENT_H + +#include + +#define FIREWIREPRIVATE +#include +#undef FIREWIREPRIVATE + +#include + +#include +#include + +class IOFireWireSBP2UserClient : public IOUserClient +{ + OSDeclareDefaultStructors(IOFireWireSBP2UserClient) + +protected: + + bool fOpened; + bool fStarted; + IOFireWireSBP2Login * fLogin; + task_t fTask; + + IOFireWireSBP2LUN * fProviderLUN; + OSAsyncReference64 fMessageCallbackAsyncRef; + OSAsyncReference64 fLoginCallbackAsyncRef; + OSAsyncReference64 fLogoutCallbackAsyncRef; + OSAsyncReference64 fUnsolicitedStatusNotifyAsyncRef; + OSAsyncReference64 fStatusNotifyAsyncRef; + OSAsyncReference64 fFetchAgentResetAsyncRef; + OSAsyncReference64 fFetchAgentWriteAsyncRef; + + IOFWUserObjectExporter * fExporter; + + IOFireWireLib::UserObjectHandle fSessionRef; + + virtual IOReturn externalMethod( uint32_t selector, + IOExternalMethodArguments * args, + IOExternalMethodDispatch * dispatch, + OSObject * target, + void * reference ); +public: + + virtual bool initWithTask( task_t owningTask, void * securityToken, UInt32 type, OSDictionary * properties ); + virtual void free (); + + virtual bool start( IOService * provider ); + + virtual IOReturn clientClose( void ); + virtual IOReturn clientDied( void ); + + // IOFireWireSBP2ManagementORB friend class wrappers + virtual void flushAllManagementORBs( void ); + + ///////////////////////////////////////////////// + // IOFireWireSBP2LUN + + IOReturn open( IOExternalMethodArguments * arguments ); + IOReturn openWithSessionRef( IOExternalMethodArguments * arguments ); + IOReturn getSessionRef( IOExternalMethodArguments * arguments ); + IOReturn close( IOExternalMethodArguments * arguments ); + + // callbacks + IOReturn setMessageCallback( IOExternalMethodArguments * arguments ); + virtual IOReturn message( UInt32 type, IOService * provider, void * arg ); + + ///////////////////////////////////////////////// + // IOFireWireSBP2Login + + IOReturn setLoginCallback( IOExternalMethodArguments * arguments ); + IOReturn setLogoutCallback( IOExternalMethodArguments * arguments ); + IOReturn setUnsolicitedStatusNotify( IOExternalMethodArguments * arguments ); + IOReturn setStatusNotify( IOExternalMethodArguments * arguments ); + IOReturn createLogin( IOExternalMethodArguments * arguments ); + IOReturn releaseLogin( IOExternalMethodArguments * arguments ); + IOReturn submitLogin( IOExternalMethodArguments * arguments ); + IOReturn submitLogout( IOExternalMethodArguments * arguments ); + IOReturn setLoginFlags( IOExternalMethodArguments * arguments ); + IOReturn getMaxCommandBlockSize( IOExternalMethodArguments * arguments ); + IOReturn getLoginID( IOExternalMethodArguments * arguments ); + IOReturn setReconnectTime( IOExternalMethodArguments * arguments ); + IOReturn setMaxPayloadSize( IOExternalMethodArguments * arguments ); + + IOReturn submitFetchAgentReset( IOExternalMethodArguments * arguments ); + IOReturn setFetchAgentWriteCompletion( IOExternalMethodArguments * arguments ); + IOReturn ringDoorbell( IOExternalMethodArguments * arguments ); + IOReturn enableUnsolicitedStatus( IOExternalMethodArguments * arguments ); + IOReturn setBusyTimeoutRegisterValue( IOExternalMethodArguments * arguments ); + IOReturn setPassword( IOExternalMethodArguments * arguments ); + + // callbacks + + static void staticLoginCallback( void * refCon, FWSBP2LoginCompleteParamsPtr params ); + virtual void loginCallback( FWSBP2LoginCompleteParamsPtr params ); + + static void staticLogoutCallback( void * refCon, FWSBP2LogoutCompleteParamsPtr params ); + virtual void logoutCallback( FWSBP2LogoutCompleteParamsPtr params ); + + static void staticStatusNotify( void * refCon, FWSBP2NotifyParams * params ); + virtual void statusNotify( FWSBP2NotifyParams * params ); + + static void staticUnsolicitedNotify( void * refCon, FWSBP2NotifyParams * params ); + virtual void unsolicitedNotify( FWSBP2NotifyParams * params ); + + static void staticFetchAgentWriteComplete( void * refCon, IOReturn status, IOFireWireSBP2ORB * orb ); + virtual void fetchAgentWriteComplete( IOReturn status, IOFireWireSBP2ORB * orb ); + + static void staticFetchAgentResetComplete( void * refCon, IOReturn status ); + virtual void fetchAgentResetComplete( IOReturn status ); + + ///////////////////////////////////////////////// + // IOFireWireSBP2ORB + + IOReturn createORB( IOExternalMethodArguments * arguments ); + IOReturn releaseORB( IOExternalMethodArguments * arguments ); + IOReturn submitORB( IOExternalMethodArguments * arguments ); + IOReturn setCommandFlags( IOExternalMethodArguments * arguments ); + IOReturn setORBRefCon( IOExternalMethodArguments * arguments ); + IOReturn setMaxORBPayloadSize( IOExternalMethodArguments * arguments ); + IOReturn setCommandTimeout( IOExternalMethodArguments * arguments ); + IOReturn setCommandGeneration( IOExternalMethodArguments * arguments ); + IOReturn setToDummy( IOExternalMethodArguments * arguments ); + IOReturn setCommandBuffersAsRanges( IOExternalMethodArguments * arguments ); + IOReturn releaseCommandBuffers( IOExternalMethodArguments * arguments ); + IOReturn setCommandBlock( IOExternalMethodArguments * arguments ); + + // LSI workaround + IOReturn LSIWorkaroundSetCommandBuffersAsRanges( IOExternalMethodArguments * arguments ); + IOReturn LSIWorkaroundSyncBuffersForOutput( IOExternalMethodArguments * arguments ); + IOReturn LSIWorkaroundSyncBuffersForInput( IOExternalMethodArguments * arguments ); + + ///////////////////////////////////////////////// + // IOFireWireSBP2MgmtORB + + IOReturn createMgmtORB( IOExternalMethodArguments * arguments ); + IOReturn releaseMgmtORB( IOExternalMethodArguments * arguments ); + IOReturn setMgmtORBCallback( IOExternalMethodArguments * arguments ); + IOReturn submitMgmtORB( IOExternalMethodArguments * arguments ); + IOReturn setMgmtORBCommandFunction( IOExternalMethodArguments * arguments ); + IOReturn setMgmtORBManageeORB( IOExternalMethodArguments * arguments ); + IOReturn setMgmtORBManageeLogin( IOExternalMethodArguments * arguments ); + IOReturn setMgmtORBResponseBuffer( IOExternalMethodArguments * arguments ); + + // callbacks + static void staticMgmtORBCallback( void * refCon, IOReturn status, IOFireWireSBP2ManagementORB * orb ); + virtual void mgmtORBCallback( IOReturn status, IOFireWireSBP2ManagementORB * orb ); + + // IOFireWireSBP2MgmtORB friend class wrappers + virtual void setMgmtORBAsyncCallbackReference( IOFireWireSBP2ManagementORB * orb, void * asyncRef ); + virtual void getMgmtORBAsyncCallbackReference( IOFireWireSBP2ManagementORB * orb, void * asyncRef ); + + uint32_t checkScalarInputCount; + uint32_t checkStructureInputSize; + uint32_t checkScalarOutputCount; + uint32_t checkStructureOutputSize; + + IOReturn checkArguments( IOExternalMethodArguments * args, uint32_t scalarInCount, uint32_t structInCount, + uint32_t scalarOutCount, uint32_t structOutCount ); + +}; + +#endif \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2UserClientCommon.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2UserClientCommon.h.svn-base new file mode 100644 index 0000000..cb114ba --- /dev/null +++ b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2UserClientCommon.h.svn-base @@ -0,0 +1,79 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOFIREWIRESBP2USERCLIENTCOMMON_H_ +#define _IOKIT_IOFIREWIRESBP2USERCLIENTCOMMON_H_ + +#define kIOFireWireSBP2LibConnection 12 + +enum IOFWSBP2UserClientCommandCodes { + kIOFWSBP2UserClientOpen, // kIOUCScalarIScalarO 0,0 + kIOFWSBP2UserClientClose, // kIOUCScalarIScalarO 0,0 + kIOFWSBP2UserClientCreateLogin, // kIOUCScalarIScalarO 0,1 + kIOFWSBP2UserClientReleaseLogin, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSubmitLogin, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSubmitLogout, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSetLoginFlags, // kIOUCScalarIScalarO 2,0 + kIOFWSBP2UserClientGetMaxCommandBlockSize, // kIOUCScalarIScalarO 1,1 + kIOFWSBP2UserClientGetLoginID, // kIOUCScalarIScalarO 1,1 + kIOFWSBP2UserClientSetReconnectTime, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSetMaxPayloadSize, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientCreateORB, // kIOUCScalarIScalarO 0,1 + kIOFWSBP2UserClientReleaseORB, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSubmitORB, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSetCommandFlags, // kIOUCScalarIScalarO 2,0 + kIOFWSBP2UserClientSetMaxORBPayloadSize, // kIOUCScalarIScalarO 2,0 + kIOFWSBP2UserClientSetCommandTimeout, // kIOUCScalarIScalarO 2,0 + kIOFWSBP2UserClientSetCommandGeneration, // kIOUCScalarIScalarO 2,0 + kIOFWSBP2UserClientSetToDummy, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSetCommandBuffersAsRanges, // kIOUCScalarIScalarO 6,0 + kIOFWSBP2UserClientReleaseCommandBuffers, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSetCommandBlock, // kIOUCScalarIScalarO 3,0 + kIOFWSBP2UserClientCreateMgmtORB, // kIOUCScalarIScalarO 0,1 + kIOFWSBP2UserClientReleaseMgmtORB, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSubmitMgmtORB, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientMgmtORBSetCommandFunction, // kIOUCScalarIScalarO 2,0 + kIOFWSBP2UserClientMgmtORBSetManageeORB, // kIOUCScalarIScalarO 2,0 + kIOFWSBP2UserClientMgmtORBSetManageeLogin, // kIOUCScalarIScalarO 2,0 + kIOFWSBP2UserClientMgmtORBSetResponseBuffer, // kIOUCScalarIScalarO 3,0 + kIOFWSBP2UserClientLSIWorkaroundSetCommandBuffersAsRanges, // kIOUCScalarIScalarO 6,0 + kIOFWSBP2UserClientMgmtORBLSIWorkaroundSyncBuffersForOutput, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientMgmtORBLSIWorkaroundSyncBuffersForInput, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientOpenWithSessionRef, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientGetSessionRef, // kIOUCScalarIScalarO 0,1 + kIOFWSBP2UserClientRingDoorbell, // kIOUCScalarIScalarO 1, 0 + kIOFWSBP2UserClientEnableUnsolicitedStatus, // kIOUCScalarIScalarO 1, 0 + kIOFWSBP2UserClientSetBusyTimeoutRegisterValue, // kIOUCScalarIScalarO 2, 0 + kIOFWSBP2UserClientSetORBRefCon, // kIOUCScalarIScalarO 2, 0 + kIOFWSBP2UserClientSetPassword, // kIOUCScalarIScalarO 3, 0 + kIOFWSBP2UserClientSetMessageCallback, // kIOUCScalarIScalarO 2, 0 + kIOFWSBP2UserClientSetLoginCallback, // kIOUCScalarIScalarO 2, 0 + kIOFWSBP2UserClientSetLogoutCallback, // kIOUCScalarIScalarO 2, 0 + kIOFWSBP2UserClientSetUnsolicitedStatusNotify, // kIOUCScalarIScalarO 2, 0 + kIOFWSBP2UserClientSetStatusNotify, // kIOUCScalarIScalarO 2, 0 + kIOFWSBP2UserClientSetMgmtORBCallback, // kIOUCScalarIScalarO 3, 0 + kIOFWSBP2UserClientSubmitFetchAgentReset, // kIOUCScalarIScalarO 3, 0 + kIOFWSBP2UserClientSetFetchAgentWriteCompletion, // kIOUCScalarIScalaO 2, 0 + kIOFWSBP2UserClientNumCommands +}; + +#endif \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSerialBusProtocolTransport.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSerialBusProtocolTransport.h.svn-base new file mode 100644 index 0000000..53e6195 --- /dev/null +++ b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSerialBusProtocolTransport.h.svn-base @@ -0,0 +1,449 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +/*! + @header IOFireWireSerialBusProtocolTransport + Contains the class definition for IOFireWireSerialBusProtocolTransport. +*/ + + +#ifndef _IOKIT_IO_FIREWIRE_SERIAL_BUS_PROTOCOL_TRANSPORT_H_ +#define _IOKIT_IO_FIREWIRE_SERIAL_BUS_PROTOCOL_TRANSPORT_H_ + + +#include +#include +#include +#include +#include +#include +#include + +#include + +/*! + @class IOFireWireSerialBusProtocolTransport + @abstract SCSI Protocol Driver Family for FireWire SBP2 Devices. + @discussion IOFireWireSerialBusProtocolTransport contains all the bus specific support for FireWire + SBP2 compliant devices. To add vendor specific features or workarounds you will sub-class the appropriate + methods of this family. +*/ + +class IOFireWireSerialBusProtocolTransport : public IOSCSIProtocolServices +{ + + OSDeclareDefaultStructors ( IOFireWireSerialBusProtocolTransport ) + +private: + + IOFireWireUnit * fUnit; + IOFireWireSBP2LUN * fSBPTarget; + IOFireWireSBP2Login * fLogin; + IOFireWireSBP2ORB * fORB; + IOFireWireSBP2ManagementORB * fLUNResetORB; + + // /!\ WARNING! NOT USED left behind for legacy binary reasons + IOSimpleLock * fQueueLock; + + UInt32 fLoginRetryCount; + bool fDeferRegisterService; + bool fNeedLogin; + + // /!\ WARNING! NOT USED left behind for legacy binary reasons + bool fPhysicallyConnected; + + static void + StatusNotifyStatic ( void * refCon, FWSBP2NotifyParamsPtr params ); + + static void + UnsolicitedStatusNotifyStatic ( void * refCon, + FWSBP2NotifyParamsPtr params ); + + static void + LunResetCompleteStatic ( void * refCon, + IOReturn status, + IOFireWireSBP2ManagementORB * orb ); + + static void + FetchAgentResetCompleteStatic ( void * refcon, + IOReturn status ); + + static IOReturn + ConnectToDeviceStatic ( OSObject * refCon, void *, void *, void *, void * ); + + virtual void + FetchAgentResetComplete ( IOReturn status ); + + static void LoginCompletionStatic ( void * refCon, FWSBP2LoginCompleteParams * params ); + + static void + LogoutCompletionStatic ( void * refCon, FWSBP2LogoutCompleteParams * params ); + + /*! + @function CoalesceSenseData + @abstract CoalesceSenseData convert a SBP-2 status block into a SPC-2 sense block. + @discussion CoalesceSenseData pulls the appropriate bits out of the SBP2 sense block + as defined in SBP-2 Annex B section B.2 and dynamically builds a sense data block as + defined in SPC-2 section 7.23.2. + */ + + SCSITaskStatus + CoalesceSenseData ( FWSBP2StatusBlock * sourceData, + UInt8 quadletCount, + SCSI_Sense_Data * targetData ); + + virtual void ConnectToDevice ( void ); + + virtual void DisconnectFromDevice ( void ); + + virtual bool IsDeviceCPUInDiskMode ( void ); + +protected: + + /*! + @function AllocateResources + @abstract Allocate Resources. + @discussion Called from start method to allocate needed resources. + */ + + virtual IOReturn AllocateResources ( void ); + + /*! + @function DeallocateResources + @abstract Deallocate Resources. + @discussion Called from cleanUp method to deallocate resources. + */ + + virtual void DeallocateResources ( void ); + + enum SBP2LoginState + { + kFirstTimeLoggingInState, + kLogginSucceededState, + kLogginFailedState + }; + + /*! + @typedef SBP2ClientOrbData + @param orb IOFireWireSBP2ORB for request. + @param scsiTask SCSITaskIdentifier of request. + @param serviceResponse SCSIServiceResponse of request. + @param taskStatus SCSITaskStatus of request. + @discussion This structure is stuffed into the refcon so we can associate which + IOFireWireSBP2ORB and SCSITaskIdentifier is completing. + */ + + typedef struct { + IOFireWireSBP2ORB * orb; + SCSITaskIdentifier scsiTask; + SCSIServiceResponse serviceResponse; + SCSITaskStatus taskStatus; + IOBufferMemoryDescriptor * quadletAlignedBuffer; + } SBP2ClientOrbData; + + static const UInt32 kDefaultBusyTimeoutValue = 0x0000000F; + static const UInt64 kMaxFireWireLUN = 0xFFFF; + static const UInt32 kMaxFireWirePayload = 4096; + static const UInt32 kMaxLoginRetryCount = 8; + static const UInt32 kMaxReconnectCount = 128; + static const UInt32 kCSRModelInfoKey = 0x17; + + UInt32 fReconnectCount; + bool fLoggedIn; + + // binary compatibility instance variable expansion + struct ExpansionData + { + IOCommandPool * fCommandPool; + IOCommandPool * fSubmitQueue; + SBP2LoginState fLoginState; + bool fLUNResetPathFlag; + int fLUNResetCount; + bool fAlwaysSetSenseData; + bool fAutonomousSpinDownWorkAround; + }; + + ExpansionData * reserved; + + bool fObjectIsOpen; + + /*! + @function CommandORBAccessor + @abstract accessor function for fORB. + @discussion xxx. + */ + + IOFireWireSBP2ORB * CommandORBAccessor ( void ); + + /*! + @function SBP2LoginAccessor + @abstract accessor function for fLogin. + @discussion xxx. + */ + + IOFireWireSBP2Login * SBP2LoginAccessor ( void ); + + virtual IOReturn + message ( UInt32 type, IOService * provider, void * argument = 0 ); + + /*! + @function SendSCSICommand + @abstract Prepare and send a SCSI command to the device. + @discussion The incoming SCSITaskIdentifier gets turned into a IOFireWireSBP2ORB + and is submitted to the SBP2 layer. See IOSCSIProtocolServices.h for more details + regarding SendSCSICommand. Also see IOFireWireSBP2Lib.h for details regarding the + IOFireWireSBP2ORB structure and the submitORB method. + @result If the command was sent to the device and is pending completion, the + subclass should return true and return back the kSCSIServiceResponse_Request_In_Process response. + If the command completes immediately with an error, the subclass will return true + and return back the appropriate status. If the subclass is currently processing all the + commands it can, the subclass will return false and the command will be resent next time + CommandCompleted is called. + */ + + virtual bool + SendSCSICommand ( SCSITaskIdentifier request, + SCSIServiceResponse * serviceResponse, + SCSITaskStatus * taskStatus ); + + /*! + @function SetCommandBuffers + @abstract Method to set orb's buffers. + @discussion This method was added so that subclasses can override and massage buffers as + needed. The default simply calls setCommandBuffers. See IOFireWireSBP2Lib.h for details + regarding the setCommandBuffers method. + @result xxx. + */ + + virtual IOReturn + SetCommandBuffers ( IOFireWireSBP2ORB * orb, SCSITaskIdentifier request ); + + /*! + @function CompleteSCSITask + @abstract This qualifies and sets appropriate data then calls CommandCompleted. + @discussion See IOSCSIProtocolServices.h for more details + regarding CommandCompleted. + */ + + virtual void + CompleteSCSITask ( IOFireWireSBP2ORB * orb ); + + /*! + @function AbortSCSICommand + @abstract This method is intended to abort an in progress SCSI Task. + @discussion Currently not implemented in super class. This is a stub method for adding + the abort command in the near future. + @result See SCSITask.h for SCSIServiceResponse codes. + */ + + virtual SCSIServiceResponse + AbortSCSICommand ( SCSITaskIdentifier request ); + + /*! + @function StatusNotify + @abstract This is our handler for status. + @discussion See IOFireWireSBP2Lib.h for details regarding the FWSBP2NotifyParams + structure that is passed in to the completion.. + */ + + virtual void + StatusNotify ( FWSBP2NotifyParams * params ); + + /*! + @function SetValidAutoSenseData + @abstract Set the auto sense data that was returned for a given SCSI Task. + @discussion SetValidAutoSenseData is called to qualify sense data that is copied to the + client via the SetAutoSenseData method. See IOSCSIProtocolServices.h for more details + regarding SetAutoSenseData. + */ + + void + SetValidAutoSenseData ( SBP2ClientOrbData * clientData, + FWSBP2StatusBlock * statusBlock, + SCSI_Sense_Data * targetData ); + + /*! + @function UnsolicitedStatusNotify + @abstract This is our handler for unsolicited status. + @discussion After we have parsed and handled the unsolicited status we call + enableUnsolicitedStatus. See IOFireWireSBP2Lib.h for details regarding the + enableUnsolicitedStatus method. + */ + + virtual void + UnsolicitedStatusNotify ( FWSBP2NotifyParamsPtr params ); + + /*! + @function LoginCompletion + @abstract Completion routine for login complete. + @discussion See IOFireWireSBP2Lib.h for details regarding the FWSBP2LogoutCompleteParams + structure that is passed in to the completion. + */ + + virtual void + LoginCompletion ( FWSBP2LoginCompleteParams * params ); + + /*! + @function LogoutCompletion + @abstract Completion routine for logout complete. + @discussion See IOFireWireSBP2Lib.h for details regarding the FWSBP2LogoutCompleteParams + structure that is passed in to the completion. + */ + + virtual void + LogoutCompletion ( FWSBP2LogoutCompleteParams * params ); + + /*! + @function IsProtocolServiceSupported + @abstract Determine is specified feature is supported by the protocol layer. + @discussion If the service has a value that must be returned, it will be returned in the + serviceValue output parameter. See IOSCSIProtocolServices.h for more details regarding + IsProtocolServiceSupported. + @result Will return true if the specified feature is supported by the protocol layer. + */ + + virtual bool + IsProtocolServiceSupported ( SCSIProtocolFeature feature, void * serviceValue ); + + /*! + @function HandleProtocolServiceFeature + @abstract Handle specified feature supported by the protocol layer. + @discussion See IOSCSIProtocolServices.h for more details regarding HandleProtocolServiceFeature. + @result Will return true if the specified feature is supported by the protocol layer. + */ + + virtual bool + HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void * serviceValue ); + + /*! + @function LunResetComplete + @abstract Callback to submit Fetch Agent Reset. + @discussion See IOFireWireSBP2Lib.h for details regarding the submitFetchAgentReset + method. + */ + + virtual void + LunResetComplete ( IOReturn status, IOFireWireSBP2ManagementORB * orb ); + +public: + + /*! + @function init + @abstract See IOService for discussion. + @discussion Setup and prime class into known state. + */ + + bool init ( OSDictionary * propTable ); + + /*! + @function start + @discussion See IOService for discussion. + @result Return true if the start was successful, false otherwise ( which will + cause the instance to be detached and usually freed ). + */ + + virtual bool start ( IOService * provider ); + + /*! + @function cleanUp + @abstract cleanUp is called to tear down IOFireWireSerialBusProtocolTransport. + @discussion cleanUp is called when we receive a kIOFWMessageServiceIsRequestingClose + message or if we fail our initialization. + */ + + virtual void cleanUp ( void ); + + /*! + @function finalize + @abstract See IOService for discussion. + @result Returns true. + */ + + virtual bool finalize ( IOOptionBits options ); + + /*! + @function free + @discussion See IOService for discussion. + @result none. + */ + + virtual void free ( void ); + +protected: + + virtual IOReturn login ( void ); + OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 1 ); + + virtual IOReturn submitLogin ( void ); + OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 2 ); + + virtual void loginLost ( void ); + OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 3 ); + + void loginSuspended ( void ); + OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 4 ); + + virtual void loginResumed ( void ); + OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 5 ); + + static IOReturn CriticalOrbSubmissionStatic ( + OSObject * refCon, + void * val1, + void * val2, + void * val3, + void * val4 ); + + /*! + @function CriticalOrbSubmission + @abstract xxx. + @discussion xxx. + @result none. + */ + + void + CriticalOrbSubmission ( + IOFireWireSBP2ORB * orb, + SCSITaskIdentifier request ); + + virtual void submitOrbFromQueue ( void ); + OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 6 ); + +private: + + // binary compatibility reserved method space + + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 7 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 8 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 9 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 10 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 11 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 12 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 13 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 14 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 15 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 16 ); + +}; + +#endif /* _IOKIT_IO_FIREWIRE_SERIAL_BUS_PROTOCOL_TRANSPORT_H_ */ \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/IOFireWireSBP2LSIWorkaroundDescriptor.h b/i386/include/IOKit/sbp2/IOFireWireSBP2LSIWorkaroundDescriptor.h new file mode 100644 index 0000000..178ef00 --- /dev/null +++ b/i386/include/IOKit/sbp2/IOFireWireSBP2LSIWorkaroundDescriptor.h @@ -0,0 +1,292 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#if __ppc__ + +/*! + @header IOFireWireSBP2LSIWorkaroundDescriptor + Contains the class definition for IOFireWireSBP2LSIWorkaroundDescriptor. +*/ + +#ifndef _IOKIT_IOFIREWIRESBP2LSIWORKAROUNDDESCRIPTOR_H +#define _IOKIT_IOFIREWIRESBP2LSIWORKAROUNDDESCRIPTOR_H + +#include + +class IOFireWireSBP2LSIRange; + +/*! + @class IOFireWireSBP2LSIWorkaroundDescriptor + @abstract This is a subclass of IOGeneralMemoryDescriptor. It is designed to work around + a hardware problem in a common SBP2 target. It takes a memory descriptor as + an argument. It retains this descriptor and returns a new one with resegmented + physical segments and potentially some "unfixable" segments double buffered. + + If the transfer will cause data to be sent from the Mac, syncBuffersForOutput + must be called before the transfer. + + If the transfer will cause data to be recieve by the Mac, syncBuffersForInput + must be called after the transfer. + + This class calculates the new segmentation only once when it is created. + Any changes to the structure of the original memory descriptor will render + this one useless. It must be released and a new IOFireWireSBP2LSIWorkaroundDescriptor + can be created. + + LSI Bridge Workaround Algorithm Details + + Goals: + 1. Avoid LSI Logic "< 16 byte" bug - prevent any data packet smaller than 16 bytes + 2. Minimize double-buffering + 3. Support non-multiple-of-512-byte devices, e.g. CD Audio + + Solution: + Write a page table such that the bridge will nor use packets smaller than 16 bytes. + In other words, rearrange the memory descriptor to avoid the bug, and do it such + that the SBP-2 layer will not break up a segment (du ro the 64k-1 limit) and + re-introduces the problem + + SBP-2 defines the kFWSBP2MaxPageClusterSize constant. We simply make sure + none of our segments are larger than this size and SBP-2 will not break them + up when it writes the SBP-2 page table. + + Notes: + - Some double buffering is unavoidable. Discontiguous pages may yield page + fragments at the start or end of the buffer (or both, with non-512x buffers). + solution uses less than 33 bytes of double-buffer per segment in original + memory descriptor. + - If driver must break up IO to meet ATA limit of 255 (250?) blocks, assume + the driver does this at a higher level (before applying workaround). + - It is expected that the original memory descriptor has been prepared (wired) +*/ + +class IOFireWireSBP2LSIWorkaroundDescriptor : public IOGeneralMemoryDescriptor +{ + OSDeclareDefaultStructors(IOFireWireSBP2LSIWorkaroundDescriptor) + + friend class IOFireWireSBP2LSIRange; + +protected: + + // reserved for future use + struct ExpansionData { }; + ExpansionData *reserved; + + bool fFixedCapacity; // for both allocators + + ////////////////////////////////////// + // for range allocator + + OSArray * fPermanentRanges; + UInt32 fAllocatedRangesCount; + + virtual IOReturn rangeAllocatorInitialize( UInt32 rangeCount ); + virtual void rangeAllocatorDeallocateAllRanges( void ); + virtual IOFireWireSBP2LSIRange * rangeAllocatorNewRange( void ); + virtual void rangeAllocatorFree( void ); + + ////////////////////////////////////// + // for buffer allocator + + OSArray * fBufferDescriptors; + UInt32 fPermanentPages; + IOByteCount fAllocatedBytesCount; + + virtual IOReturn bufferAllocatorInitialize( IOByteCount requestedBufferSize ); + virtual void bufferAllocatorDeallocateAllBuffers( void ); + virtual void * bufferAllocatorNewBuffer( IOPhysicalAddress * address ); + virtual void bufferAllocatorFree( void ); + + ////////////////////////////////////// + // for range table allocator + + IOPhysicalRange * fRangeTable; + IOByteCount fRangeTableSize; + + virtual IOReturn rangeTableAllocatorInitialize( UInt32 requestedBufferSize ); + virtual IOPhysicalRange * rangeTableAllocatorNewTable( UInt32 entries ); + virtual void rangeTableAllocatorFree( void ); + + ////////////////////////////////////// + // for workaround + + IOMemoryDescriptor * fOriginalDesc; + OSArray * fRanges; + IOByteCount fOffset; + IOByteCount fLength; + IODirection fDirection; + + + virtual bool initWithCapacity + ( UInt32 permanentRanges, IOByteCount permanentBufferSpace, bool fixedCapacity ); + + virtual void free(); + + virtual IOReturn resetToInitialCapacity( void ); + virtual IOReturn initializeRangesArray( void ); + virtual IOReturn recalculateSmallSegments( void ); + virtual IOReturn splitLargeSegments( void ); + virtual IOReturn resegmentOddLengthSegments( void ); + virtual IOReturn initializeBuffers( void ); + + virtual bool initWithAddress( void * address, /* not supported */ + IOByteCount withLength, + IODirection withDirection ); + + virtual bool initWithAddress( vm_address_t address, /* not supported */ + IOByteCount withLength, + IODirection withDirection, + task_t withTask ); + + virtual bool initWithPhysicalAddress( + IOPhysicalAddress address, /* not supported */ + IOByteCount withLength, + IODirection withDirection ); + + virtual bool initWithPhysicalRanges( + IOPhysicalRange * ranges, /* not supported */ + UInt32 withCount, + IODirection withDirection, + bool asReference = false ); + + virtual bool initWithRanges( IOVirtualRange * ranges, /* not supported */ + UInt32 withCount, + IODirection withDirection, + task_t withTask, + bool asReference = false ); + +public: + + // static factory methods and intializers + + // + // create a new instance + // + + + /*! + @function withDescriptor + @abstract Creates a new IOFireWireSBP2LSIWorkaroundDescriptor. + @discussion Create a IOFireWireSBP2LSIWorkaroundDescriptor with no permanent capacity then + inits it the given descriptor. This is basicly a short cut for calling + withCapacity( 0, 0, false) and the initWithDescriptor() + @param desc Original memory descriptor. + @param offset Offset of data to "fix" in bytes from beginning of descriptor. + @param len Length of data in bytes to "fix" + @param direction IODirection of data transfer. + @result Returns a new IOFireWireSBP2LSIWorkaroundDescriptor if successful. + */ + + static IOFireWireSBP2LSIWorkaroundDescriptor * withDescriptor + ( IOMemoryDescriptor * desc, IOByteCount offset = 0, + IOByteCount len = 0, IODirection direction = kIODirectionOutIn ); + + // initialize with descriptor + + /*! + @function initWithDescriptor + @abstract Initialize an IOFireWireSBP2LSIWorkaroundDescriptor with the given descriptor. + @discussion Initialize the workaround descriptor with the given descriptor. + @param desc Original memory descriptor. + @param offset Offset of data to "fix" in bytes from beginning of descriptor. + @param len Length of data in bytes to "fix" + @param direction IODirection of data transfer. + @result Returns true if the initialization was successful. + */ + + virtual bool initWithDescriptor( IOMemoryDescriptor * desc, IOByteCount offset = 0, + IOByteCount len = 0, IODirection direction = kIODirectionOutIn ); + + + /////////////////////////////////// + + + /*! + @function withCapacity + @abstract Create a new descriptor with possibly a permanent capacity. + @discussion Create and IOFireWireSBP2LSIWorkaroundDescriptor with a permanent fixed capacity. + You should call initWithDescriptor afterward. permanentRanges is number of ranges to keep + permanently allocated for use by the algorithm. If fixedCapacity is false additional ranges + may be allocated and deallocated dyanmicly if needed. The algorithm may require more or less + ranges than either the original descriptor or the final fixed may decriptor contain. + permanentBufferSpace is the number of bytes of permanent buffer to keep arround. If fixedCapacity + is false additional buffer space may be allocated and deallocated dynamically. permanentBufferSpace + should generally be set to 32 * maximum number of ranges. fixedCapacity is a flag indicating + whether dynamic allocations are allowed. When making decisions about the maximum amount of + buffer space to keep around, it should be noted tha the maximum number of ranges maybe different + from permanentRanges if fixedCapcity is false. + @param permanentRanges Count of permanent ranges. + @param permanentBufferSpace Byte count of permanent buffers. + @param fixedCapacity bool indicating if dynamic allocations can be made. + @result Returns true if the initialization was successful. + */ + + static IOFireWireSBP2LSIWorkaroundDescriptor * withCapacity + ( UInt32 permanentRanges, IOByteCount permanentBufferSpace, bool fixedCapacity ); + + + /////////////////////////////////// + + // + // manipulate buffers for IO + // + + /*! + @function syncBuffersForOutput + @abstract Synchronize the buffers for output. + @discussion Since double buffering may be invovled in the workaround. The driver needs to + indicate when these buffers should be syncronized with the original descriptor. For data + that will be output syncBuffersForOutput should be called before submiting the ORB. + @result Returns kIOReturnSuccess if sync was successful. + */ + + virtual IOReturn syncBuffersForOutput( void ); // call before output + + /*! + @function syncBuffersForInput + @abstract Synchronize the buffers for input. + @discussion Since double buffering may be invovled in the workaround. The driver needs to + indicate when these buffers should be syncronized with the original descriptor. For data + that will be input syncBuffersForOutput should be called after receiving completion status + for the ORB. + @result Returns kIOReturnSuccess if sync was successful. + */ + + virtual IOReturn syncBuffersForInput( void ); // call after input + +private: + + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 0); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 1); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 2); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 3); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 4); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 5); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 6); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 7); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 8); + +}; + +#endif + +#endif diff --git a/i386/include/IOKit/sbp2/IOFireWireSBP2LUN.h b/i386/include/IOKit/sbp2/IOFireWireSBP2LUN.h new file mode 100644 index 0000000..e6c97de --- /dev/null +++ b/i386/include/IOKit/sbp2/IOFireWireSBP2LUN.h @@ -0,0 +1,270 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + @header IOFireWireSBP2LUN + Contains the class definition for IOFireWireSBP2LUN. +*/ + +#ifndef _IOKIT_IOFIREWIRESBP2LUN_H +#define _IOKIT_IOFIREWIRESBP2LUN_H + +#include +#include + +#include + +#include +#include + +class IOFireWireSBP2Target; + +/*! + @class IOFireWireSBP2LUN + @abstract Provider for most drivers. + @discussion IOFireWireSBP2LUN objects are created by IOFireWireSBP2Target objects. Each target may have zero or more IOFireWireSBP2LUN children. The LUN object serves as the matching nub for most drivers and therefore will be the provider for most drivers. It supplies the methods that control the operation of the LUN as a whole. Methods that control the behavior and execution of an SBP2 login session are supplied in a separate IOFireWireSBP2Login object. The LUN can be used to create one of these login objects. + The LUN can also create IOFireWireSBP2ManagementORBs for configuring and appending non-login related management functions. Login related management functions (ie. Login, Logout, Reconnect) are supplied by the IOFireWireSBP2Login. + Finally the LUN can supply a reference to the IOFireWireUnit. This can be useful if a driver wishes to access the standard FireWire APIs. +*/ + +class IOFireWireSBP2LUN : public IOService +{ + OSDeclareDefaultStructors( IOFireWireSBP2LUN ); + + friend class IOFireWireSBP2ManagementORB; + friend class IOFireWireSBP2Login; + friend class IOFireWireSBP2UserClient; + +protected: + + // reserved for future use + struct ExpansionData { }; + ExpansionData *reserved; + + //////////////////////////////////////////// + // methods called by friend classes + + // IOFireWireSBP2Login methods + virtual void removeLogin( IOFireWireSBP2Login * login ); + virtual IOFireWireSBP2Target * getTarget( void ); + + // IOFireWireSBP2ManagementORB methods + virtual void clearAllTasksInSet( void ); // assumes caller is on workloop + virtual void removeManagementORB( IOFireWireSBP2ManagementORB * orb ); + + // IOFireWireSBP2UserClient methods + virtual void flushAllManagementORBs( void ); + +public: + + //////////////////////////////////////////// + // IOService overrides + + /*! @function attach + @abstract Attaches an IOService client to a provider in the registry. + @discussion See IOService for discussion. + @param provider The IOService object which will serve as this objects provider. + @result false if the provider is inactive or on a resource failure, otherwise true. + */ + + virtual bool attach( IOService *provider ); + + /*! @function handleOpen + @abstract Overrideable method to control the open / close behaviour of an IOService. + @discussion See IOService for discussion. + @param forClient Designates the client of the provider requesting the open. + @param options Options for the open, may be interpreted by the implementor of handleOpen. + @result Return true if the open was successful, false otherwise. */ + + virtual bool handleOpen( IOService * forClient, + IOOptionBits options, + void * arg ); + /*! + @function handleClose + @abstract Overrideable method to control the open / close behaviour of an IOService. + @discussion See IOService for discussion. + @param forClient Designates the client of the provider requesting the close. + @param options Options for the close, may be interpreted by the implementor of handleOpen. + */ + + virtual void handleClose( IOService * forClient, + IOOptionBits options ); + + /*! + @function matchPropertyTable + @abstract Implements SBP2 specific matching. + @discussion See IOService for discussion. + @param table The dictionary of properties to be matched against. + @result Returns false if the family considers the matching dictionary does not match in properties it understands, true otherwise. + */ + + virtual bool matchPropertyTable(OSDictionary * table); + +protected: + + //////////////////////////////////////////// + // private fields + + IOFireWireSBP2Target * fProviderTarget; + UInt32 fLUNumber; + OSSet * fLoginSet; + OSIterator * fLoginSetIterator; + IOCommandGate * fGate; + OSSet * fORBSet; + OSIterator * fORBSetIterator; + OSObject * fDiagnostics; + + //////////////////////////////////////////// + // private methods + + // IOService methods + virtual void free( void ); + virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); + + // create management orb internals + static IOReturn staticCreateManagementORBAction( OSObject *self, + void * refCon, + void * completion, + void * orb, + void * ); + virtual IOReturn createManagementORBAction( void * refCon, + FWSBP2ManagementCallback completion, + IOFireWireSBP2ManagementORB ** orb ); + + // remove management orb internals + static IOReturn staticRemoveManagementORBAction( OSObject * self, void * orb, + void *, void *, void * ); + virtual IOReturn removeManagementORBAction( IOFireWireSBP2ManagementORB * orb ); + + // flush all management orb internals + static IOReturn staticExecuteFlushAllMgmtORBs( OSObject * self, void *, + void *, void *, void * ); + virtual IOReturn executeFlushAllMgmtORBs( void ); + + // IOFireWireSBP2ManagementORB friend class wrappers + virtual bool initMgmtORBWithLUN( IOFireWireSBP2ManagementORB * orb, IOFireWireSBP2LUN * lun, + void * refCon, + FWSBP2ManagementCallback completion ); + + // IOFireWireSBP2Login friend class wrappers + virtual bool initLoginWithLUN( IOFireWireSBP2Login * login, IOFireWireSBP2LUN * lun ); + virtual void suspendedNotify( void ); + virtual void resumeNotify( void ); + +private: + + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 0); + +public: + + //////////////////////////////////////////// + // client methods + + // getters + + /*! + @function getFireWireUnit + @abstract Returns an IOFireWireUnit object. + @discussion An IOFireWireUnit is the provider of an IOFireWireSBP2Target. In order to + use the base FireWire services you will need a reference to the unit. This method + returns that reference. + @result Returns a pointer to an IOFireWireUnit. + */ + + virtual IOFireWireUnit * getFireWireUnit( void ); + + /*! + @function getLUNumber + @abstract Returns the LUNs number. + @discussion Each LUN has a number to uniquely identify it on a device. This method returns + this value in a UInt32. + @result Returns a UInt32 containing the Logical Unit Number. + */ + + virtual UInt32 getLUNumber( void ); + + // factory methods + + /*! + @function createLogin + @abstract Creates a new IOFireWireSBP2Login object. + @discussion Creates a new IOFireWireSBP2Login object for the LUN. Login objects supply most + of the SBP2 APIs related to login maintenance and Normal Command ORB execution. + @result Returns a pointer to a new IOFireWireSBP2Login. + */ + + virtual IOFireWireSBP2Login *createLogin( void ); + + /*! + @function createManagementORB + @abstract Creates a new IOFireWireSBP2ManagementORB object. + @discussion Creates a new IOFireWireSBP2ManagementORB object. Management objects let you + execute commands like QueryLogins, LogicalUnitReset, and AbortTask. These commands are + configured after they are created here. When they are done executing (after a call to submit) + the supplied completion routine will be called with the supplied refcon. Usually this refCon + is the "this" pointer of completion method's object. + @param refCon The refcon passed to the completion routine. + @param completion The completion routine. Called when the ORB finishes execution. + @result Returns a pointer to a new IOFireWireSBP2Login. + */ + + virtual IOFireWireSBP2ManagementORB * createManagementORB( void * refCon, FWSBP2ManagementCallback completion ); + +protected: + + static IOReturn staticCreateLogin( OSObject *self, void * login, void *, void *, void * ); + virtual IOReturn createLoginAction( IOFireWireSBP2Login ** login ); + + static IOReturn staticRemoveLoginAction( OSObject *self, void * login, void *, void *, void * ); + virtual IOReturn removeLoginAction( IOFireWireSBP2Login * login ); + +public: + + /*! + @function getDiagnostics + @abstract Debug-only method. + @discussion Returns a reference to the internal diagnostics object when the services are built + in debug mode. Should be a no-op in release builds. + @result Returns a pointer to the diagnostics object (if any). + */ + + virtual OSObject * getDiagnostics( void ); + + virtual bool finalize( IOOptionBits options ); + +protected: + + void terminateNotify( void ); + +private: + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 1); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 2); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 3); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 4); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 5); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 6); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 7); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 8); + +}; + +#endif \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/IOFireWireSBP2Login.h b/i386/include/IOKit/sbp2/IOFireWireSBP2Login.h new file mode 100644 index 0000000..42a838c --- /dev/null +++ b/i386/include/IOKit/sbp2/IOFireWireSBP2Login.h @@ -0,0 +1,1078 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + @header IOFireWireSBP2Login + Contains the class definition for IOFireWireSBP2Login. +*/ + +#ifndef _IOKIT_IOFIREWIRESBP2LOGIN_H +#define _IOKIT_IOFIREWIRESBP2LOGIN_H + +#include + +#include + +#include +#include + +// login option flags +enum +{ + kFWSBP2DontSynchronizeMgmtAgent = (1 << 0), + kFWSBP2ExclusiveLogin = (1 << 5) +}; + +// notification events +enum +{ + kFWSBP2NormalCommandStatus = 6, + kFWSBP2NormalCommandTimeout = 7, + kFWSBP2UnsolicitedStatus = 8, + kFWSBP2NormalCommandReset = 9 +}; + +#define kIOMessageFWSBP2ReconnectComplete iokit_fw_err(0x3E8) +#define kIOMessageFWSBP2ReconnectFailed iokit_fw_err(0x3E9) + +/*! + @typedef FWSBP2LoginResponse + @param length Length of login response. + @param loginID Unique id representing this login. + @param commandBlockAgentAddressHi High 32 bits of command block agent address. + @param commandBlockAgentAddressLo Low 32 bits of command block agent address. + @param reserved Reserved. + @param reconnectHold Reconnect timeout encoded as 2^reconnectHold seconds. +*/ + +typedef struct +{ + UInt16 length; + UInt16 loginID; + UInt32 commandBlockAgentAddressHi; + UInt32 commandBlockAgentAddressLo; + UInt16 reserved; + UInt16 reconnectHold; +} FWSBP2LoginResponse, *FWSBP2LoginResponsePtr; + +/*! + @typedef FWSBP2StatusBlock + @param details Src, Resp, D, Len fields of status block format + @param sbpStatus SBP2 specific status + @param orbOffsetHi High 32 bits of address of orb status is for. + @param orbOffsetLo Low 32 bits of address of orb status is for. + @param status[6] Up to 48 bytes of additional data. Length is determined by len field. +*/ + +typedef struct +{ + UInt8 details; + UInt8 sbpStatus; + UInt16 orbOffsetHi; + UInt32 orbOffsetLo; + UInt32 status[6]; +} FWSBP2StatusBlock; + +class IOFireWireSBP2LUN; +class IOFireWireSBP2Login; + +// struct sent to login complete handler + +/*! + @typedef FWSBP2LoginCompleteParams + @param login Pointer to IOFireWireSBP2Login object. + @param generation FireWire generation value. + @param status Status of login attempt. + @param loginResponse Pointer to login response struct. + @param statusBlock Pointer to status block buffer. + @param statusBlockLength Length of entire status block. +*/ + +typedef struct +{ + IOFireWireSBP2Login * login; // login object this param is sent from + UInt32 generation; // generation this login was attempted in + + IOReturn status; // status of login attempt + + FWSBP2LoginResponsePtr loginResponse; // pointer to loginResponse buffer + FWSBP2StatusBlock * statusBlock; // pointer to statusBlock buffer + UInt32 statusBlockLength; // size of statusBlock buffer + +} FWSBP2LoginCompleteParams, *FWSBP2LoginCompleteParamsPtr; + +// struct sent to logout complete handler + +/*! + @typedef FWSBP2LogoutCompleteParams + @param login Pointer to IOFireWireSBP2Login object. + @param generation FireWire generation value. + @param status Status of login attempt. + @param statusBlock Pointer to status block buffer. + @param statusBlockLength Length of entire status block. +*/ + +typedef struct +{ + IOFireWireSBP2Login * login; // login object this param is sent from + UInt32 generation; // generation this login was attempted in + + IOReturn status; // status of login attempt + + FWSBP2StatusBlock * statusBlock; // pointer to statusBlock buffer + UInt32 statusBlockLength; // size of statusBlock buffer + +} FWSBP2LogoutCompleteParams, *FWSBP2LogoutCompleteParamsPtr; + +// struct sent with reconnect notification + +/*! + @typedef FWSBP2LogoutCompleteParams + @param login Pointer to IOFireWireSBP2Login object. + @param generation FireWire generation value. + @param status Status of login attempt. + @param reconnectStatusBlock Pointer to status block buffer. + @param reconnectStatusBlockLength Length of entire status block. +*/ + +typedef struct +{ + IOFireWireSBP2Login * login; // login object this param is sent from + UInt32 generation; // generation this login was attempted in + + IOReturn status; // status of reconnect attempt + + void * reconnectStatusBlock; // pointer to statusBlock buffer + UInt32 reconnectStatusBlockLength; // size of statusBlock buffer +} FWSBP2ReconnectParams, *FWSBP2ReconnectParamsPtr; + +// Callback when login and logout commands complete asynchronously + +/*! + @typedef FWSBP2LoginCallback + @param refCon Reference constant supplied when the notification was registered. + @param params Structure containing additional information about the status of the login. +*/ + +typedef void (*FWSBP2LoginCallback)(void * refCon, FWSBP2LoginCompleteParamsPtr params); + +/*! + @typedef FWSBP2LogoutCallback + @param refCon Reference constant supplied when the notification was registered. + @param params Structure containing additional information about the status of the logout. +*/ + +typedef void (*FWSBP2LogoutCallback)(void * refCon, FWSBP2LogoutCompleteParamsPtr params); + +/*! + @typedef FWSBP2StatusCallback + @param refCon Reference constant supplied when the notification was registered. + @param status Indicates success or failure of operation. +*/ + +typedef void (*FWSBP2StatusCallback)(void * refCon, IOReturn status); + +/*! + @typedef FWSBP2FetchAgentWriteCallback + @param refCon Reference constant supplied when the notification was registered. + @param status Indicates success or failure of operation. + @param orb Indicates current last orb in chain. +*/ + +typedef void (*FWSBP2FetchAgentWriteCallback)(void * refCon, IOReturn status, IOFireWireSBP2ORB * orb); + +/*! + @typedef FWSBP2NotifyParams + @param notificationEvent Type of event we are being notified of. + @param message buffer containing message. + @param length length of message field. + @param generation FireWire generation value. +*/ + +typedef struct +{ + void * commandObject; + UInt32 notificationEvent; + const void * message; + UInt32 length; + UInt32 generation; +} FWSBP2NotifyParams, *FWSBP2NotifyParamsPtr; + + +/*! + @typedef FWSBP2NotifyCallback + @param refCon Reference constant supplied when the notification was registered. + @param params FWSBP2NotifyParams containing notification information. +*/ + +typedef void (*FWSBP2NotifyCallback)(void * refCon, FWSBP2NotifyParamsPtr params); + +/*! + @class IOFireWireSBP2Login + @abstract Supplies the login maintenance and Normal Command ORB execution portions of the API. + @discussion Supplies APIs for login maintenance and command execution. Drivers can use this + object to create IOFireWireSBP2ORB objects and execute them. Solicited and unsolicited status + callback routines can be registered and the SBP2 services will notify the driver when the + appropriate status arrives. + This class also handles login maintenance. Supplies APIs for logging in and logging out and + attempts to reconnect to the LUN after bus resets. The base FireWire services deliver bus + reset notification via the IOKit message routine. The SBP2 services build on this behavior + and deliver reconnectFailed and reconnectComplete through the message routine as well. +*/ + +class IOFireWireSBP2Login : public OSObject +{ + OSDeclareDefaultStructors( IOFireWireSBP2Login ) + + friend class IOFireWireSBP2ORB; + friend class IOFireWireSBP2LUN; + friend class IOFireWireSBP2UserClient; + +protected: + + // command selectors + enum + { + kLoginCommandIdle = 0, + kLoginCommandDoLogin = 1, + kLoginCommandDoLogout = 2, + kLoginAddORB = 3, + kLoginRemoveORB = 4, + kLoginFetchAgentReset = 5 + }; + + // internal login states + enum + { + kLoginStateIdle = 0, + kLoginStateLoggingIn = 1, + kLoginStateConnected = 2, + kLoginStateReconnect = 3, + kLoginStateLoggingOut = 4, + kLoginStateTerminated = 5 + }; + + // rom keys + enum + { + kUnitCharacteristicsKey = 0x3A, + kManagementAgentOffsetKey = 0x54 + }; + + // sbp2 defs + enum + { + kFWSBP2RequestComplete = 0, + kFWSBP2TransportFailure = 1, + kFWSBP2IllegalRequest = 2, + kFWSBP2VendorDependent = 3 + }; + + enum + { + kFWSBP2NoSense = 0, + kFWSBP2RequestTypeNotSupported = 1, + kFWSBP2SpeedNotSupported = 2, + kFWSBP2PageSizeNotSupported = 3, + kFWSBP2AccessDenied = 4, + kFWSBP2LogicalUnitNotSupported = 5, + kFWSBP2MaxPayloadTooSmall = 6, + kFWSBP2FunctionRejected = 9, + kFWSBP2LoginIDNotRecognized = 10, + kFWSBP2DummyORBCompleted = 11, + kFWSBP2RequestAborted = 12, + kFWSBP2UnspecifiedError = 0xFF + }; + + typedef struct + { + UInt32 password[2]; + UInt32 loginResponseAddressHi; + UInt32 loginResponseAddressLo; + UInt16 options; + UInt16 lun; + UInt16 passwordLength; + UInt16 loginResponseLength; + UInt32 statusFIFOAddressHi; + UInt32 statusFIFOAddressLo; + } FWSBP2LoginORB; + + typedef struct + { + UInt32 reserved1[4]; + UInt16 options; + UInt16 loginID; + UInt32 reserved2; + UInt32 statusFIFOAddressHi; + UInt32 statusFIFOAddressLo; + } FWSBP2ReconnectORB; + + typedef struct + { + UInt32 reserved1[4]; + UInt16 options; + UInt16 loginID; + UInt32 reserved2; + UInt32 statusFIFOAddressHi; + UInt32 statusFIFOAddressLo; + } FWSBP2LogoutORB; + +protected: + + /////////////////////////////////////////////////////////////////// + // private interface methods + + // IOFireWireSBP2LUN methods + virtual void clearAllTasksInSet( void ); + virtual bool initWithLUN( IOFireWireSBP2LUN * lun ); + virtual void suspendedNotify( void ); + virtual void resumeNotify( void ); + + // IOFireWireSBP2ORB methods + virtual IOFireWireUnit * getFireWireUnit( void ); + virtual IOFireWireSBP2LUN * getFireWireLUN( void ); + virtual bool isFetchAgentWriteInProgress( void ); + virtual bool isConnected( void ); + virtual IOReturn removeORB( IOFireWireSBP2ORB * orb ); + virtual IOReturn appendORBImmediate( IOFireWireSBP2ORB * orb ); + virtual IOReturn appendORB( IOFireWireSBP2ORB * orb ); + virtual void sendTimeoutNotification( IOFireWireSBP2ORB * orb ); + +protected: + + // reserved for future use + struct ExpansionData { }; + ExpansionData *reserved; + + IOFireWireSBP2LUN * fLUN; + IOFireWireUnit * fUnit; + IOFireWireController * fControl; + IOCommandGate * fGate; + + FWSBP2LoginCallback fLoginCompletionCallback; + void * fLoginCompletionRefCon; + + FWSBP2LogoutCallback fLogoutCompletionCallback; + void * fLogoutCompletionRefCon; + + FWSBP2NotifyCallback fStatusNotifyCallback; + void * fStatusNotifyRefCon; + + FWSBP2NotifyCallback fUnsolicitedStatusNotifyCallback; + void * fUnsolicitedStatusNotifyRefCon; + + UInt32 fLoginFlags; + UInt32 fReconnectTime; + + UInt32 fLoginState; + UInt32 fManagementOffset; + UInt32 fManagementTimeout; + UInt32 fMaxORBSize; + UInt32 fMaxCommandBlockSize; + UInt16 fLoginNodeID; + UInt32 fLoginGeneration; + UInt32 fLoginID; + UInt32 fReconnectHold; + UInt32 fMaxPayloadSize; + void * fRefCon; + + // resources + + FWSBP2LoginORB fLoginORB; + IOFWAddressSpace * fLoginORBAddressSpace; + FWAddress fLoginORBAddress; + + FWSBP2LoginResponse fLoginResponse; + IOFWAddressSpace * fLoginResponseAddressSpace; + FWAddress fLoginResponseAddress; + + FWSBP2ReconnectORB fReconnectORB; + IOFWAddressSpace * fReconnectORBAddressSpace; + FWAddress fReconnectORBAddress; + + FWSBP2StatusBlock fStatusBlock; + IOFWAddressSpace * fStatusBlockAddressSpace; + FWAddress fStatusBlockAddress; + + FWSBP2StatusBlock fReconnectStatusBlock; + IOFWAddressSpace * fReconnectStatusBlockAddressSpace; + FWAddress fReconnectStatusBlockAddress; + + FWSBP2LogoutORB fLogoutORB; + IOFWAddressSpace * fLogoutORBAddressSpace; + FWAddress fLogoutORBAddress; + bool fLogoutPending; + + IOFWWriteCommand * fLoginWriteCommand; + IOMemoryDescriptor * fLoginWriteCommandMemory; + bool fLoginWriteInProgress; + + IOFWWriteCommand * fReconnectWriteCommand; + IOMemoryDescriptor * fReconnectWriteCommandMemory; + bool fReconnectWriteInProgress; + bool fReconnectWriteInterrupted; + + IOFWWriteCommand * fLogoutWriteCommand; + IOMemoryDescriptor * fLogoutWriteCommandMemory; + bool fLogoutWriteInProgress; + + IOFWCommand * fLoginTimeoutCommand; + bool fLoginTimeoutTimerSet; + + IOFWDelayCommand * fReconnectTimeoutCommand; + bool fReconnectTimeoutTimerSet; + + IOFWCommand * fLogoutTimeoutCommand; + bool fLogoutTimeoutTimerSet; + + FWAddress fFetchAgentAddress; + IOMemoryDescriptor * fFetchAgentWriteCommandMemory; + FWAddress fLastORBAddress; + IOFireWireSBP2ORB * fLastORB; + IOFWWriteCommand * fFetchAgentWriteCommand; + bool fFetchAgentWriteCommandInUse; + FWSBP2FetchAgentWriteCallback fFetchAgentWriteCompletion; + void * fFetchAgentWriteRefCon; + IOFireWireSBP2ORB * fORBToWrite; + + OSSet * fORBSet; + OSIterator * fORBSetIterator; + + void * fPasswordBuf; + UInt32 fPasswordLen; + IOFWAddressSpace * fPasswordAddressSpace; + FWAddress fPasswordAddress; + IOMemoryDescriptor * fPasswordDescriptor; + + bool fSuspended; + + UInt32 fLoginRetryDelay; + UInt32 fLoginRetryCount; + UInt32 fLoginRetryMax; + IOFWDelayCommand * fLoginRetryTimeoutCommand; + bool fLoginRetryTimeoutTimerSet; + IOFireWireSBP2Target * fTarget; + + bool fUnsolicitedStatusEnableRequested; + + IOFWDelayCommand * fReconnectRetryTimeoutCommand; + bool fReconnectRetryTimeoutTimerSet; + + int fCriticalSectionCount; + + // init / destroy + virtual IOReturn getUnitInformation( void ); + virtual IOReturn allocateResources( void ); + virtual void free( void ); + + // orb add / remove + virtual IOReturn addORB( IOFireWireSBP2ORB * orb ); + static IOReturn staticExecuteAddORB( OSObject *self, void * orb, void *, void *, void * ); + virtual IOReturn executeAddORB( IOFireWireSBP2ORB * orb ); + + static IOReturn staticExecuteRemoveORB( OSObject *self, void * orb, void *, void *, void * ); + virtual IOReturn executeRemoveORB( IOFireWireSBP2ORB * orb ); + + // + // login + // + + static IOReturn staticExecuteLogin( OSObject *self, void *, void *, void *, void * ); + virtual IOReturn executeLogin( void ); + virtual void abortLogin( void ); + + // login write complete handler + static void loginWriteCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + virtual void loginWriteComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + + // login timeout handler + static void loginTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + virtual void loginTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + + // status block write handler + static UInt32 statusBlockWriteStatic(void *refcon, UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, + const void *buf, IOFWRequestRefCon lockRead); + virtual UInt32 statusBlockWrite( UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, const void *buf, IOFWRequestRefCon lockRead); + virtual void completeLogin( IOReturn state, const void *buf = NULL, UInt32 len = 0, void * buf2 = NULL ); + + // + // reconnect + // + + virtual void doReconnect( void ); + virtual void restartReconnect( void ); + virtual void startReconnectTimer( void ); + + // reconnect write complete handler + static void reconnectWriteCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + virtual void reconnectWriteComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + + // reconnect timeout handler + static void reconnectTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + virtual void reconnectTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + + // reconnect status block + static UInt32 reconnectStatusBlockWriteStatic(void *refcon, UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, + UInt32 len, const void *buf, IOFWRequestRefCon lockRead); + virtual UInt32 reconnectStatusBlockWrite( UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, + const void *buf, IOFWRequestRefCon lockRead); + + virtual void sendReconnectNotification( UInt32 event ); + virtual void sendReconnectNotificationWithStatusBlock( UInt32 event ); + + // + // logout + // + + static IOReturn staticExecuteLogout( OSObject *self, void *, void *, void *, void * ); + virtual IOReturn executeLogout( void ); + + // logout write complete handler + static void logoutWriteCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + virtual void logoutWriteComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + + // logout timeout handler + static void logoutTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + virtual void logoutTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + + virtual void completeLogout( IOReturn state, const void *buf = NULL, UInt32 len = 0); + + // fetch agent write complete handler + static void fetchAgentWriteCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + virtual void fetchAgentWriteComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + + // + // fetch agent + // + + bool fFetchAgentResetInProgress; + UInt32 fFetchAgentResetBuffer; + FWAddress fFetchAgentResetAddress; + IOFWWriteQuadCommand * fFetchAgentResetCommand; + void * fFetchAgentResetRefCon; + FWSBP2StatusCallback fFetchAgentResetCompletion; + + static IOReturn staticExecuteFetchAgentReset( OSObject *self, void *, void *, void *, void * ); + virtual IOReturn executeFetchAgentReset( void ); + static void fetchAgentResetCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + virtual void fetchAgentResetComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + + // + // doorbell + // + + bool fDoorbellInProgress; + bool fDoorbellRingAgain; + UInt32 fDoorbellBuffer; + FWAddress fDoorbellAddress; + IOFWWriteQuadCommand * fDoorbellCommand; + + static IOReturn staticExecuteDoorbell( OSObject *self, void *, void *, void *, void * ); + virtual IOReturn executeDoorbell( void ); + static void doorbellCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + virtual void doorbellComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + + // + // enable unsolicited satus + // + + bool fUnsolicitedStatusEnableInProgress; + UInt32 fUnsolicitedStatusEnableBuffer; + FWAddress fUnsolicitedStatusEnableAddress; + IOFWWriteQuadCommand * fUnsolicitedStatusEnableCommand; + + static IOReturn staticExecuteUnsolicitedStatusEnable( OSObject *self, void *, void *, void *, void * ); + virtual IOReturn executeUnsolicitedStatusEnable( void ); + static void unsolicitedStatusEnableCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + virtual void unsolicitedStatusEnableComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + + // + // busy timeout stuff + // + + bool fSetBusyTimeoutInProgress; + UInt32 fSetBusyTimeoutBuffer; + FWAddress fSetBusyTimeoutAddress; + IOFWWriteQuadCommand * fSetBusyTimeoutCommand; + + bool fInCriticalSection; + + UInt16 fLocalNodeID; + bool fFastStartSupported; + UInt32 fFastStartOffset; + UInt32 fFastStartMaxPayload; + + UInt32 fUserLoginGeneration; + bool fUserLoginGenerationSet; + + IOFWDelayCommand * fFetchAgentRetryTimerCommand; + bool fFetchAgentRetryTimerSet; + + virtual IOReturn executeSetBusyTimeout( void ); + static void setBusyTimeoutCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + virtual void setBusyTimeoutComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); + +private: + // IOFireWireSBP2ORB friend class wrappers + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 0); + +protected: + virtual bool initORBWithLogin( IOFireWireSBP2ORB * orb, IOFireWireSBP2Login * login ); + virtual void setNextORBAddress( IOFireWireSBP2ORB * orb, FWAddress address ); + virtual void fetchAgentWriteComplete( IOFireWireSBP2ORB * orb, IOReturn status ); + virtual bool isORBTimerSet( IOFireWireSBP2ORB * orb ); + virtual void cancelORBTimer( IOFireWireSBP2ORB * orb ); + + // IOFireWireSBP2LUN friend class wrappers + virtual void removeLogin( void ); + virtual IOFireWireSBP2Target * getTarget( void ); + + UInt32 fARDMAMax; + bool fPhysicalAccessEnabled; + + bool fLoginStatusReceived; + FWSBP2StatusBlock fLoginStatusBlock; + UInt32 fLoginStatusBlockLen; + +private: + + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 1); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 2); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 3); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 4); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 5); + +public: + + ////////////////////////////// + + /*! + @function createORB + @abstract Creates a new IOFireWireSBP2ORB for this login. + @discussion Create a new IOFireWireSBP2ORB for this login. It can be configured + with it's accessors and executed with submitORB below. + @result Returns a pointer to the new ORB object. + */ + + virtual IOFireWireSBP2ORB * createORB( void ); + + /*! + @function submitORB + @abstract Submits the given orb + @discussion Starts execution of the given ORB. If the ORB is an immediate ORB it's + addresss is written to the fetch agent. If it is a non immediate orb its address + is appended to the last orb of the currently processing chain. The doorbell is not + rung automatically it must be run manually with the ringDoorbell command described below. + @param orb The orb to be executed. + @result Returns kIOReturnSuccess if the ORB has been started successfully. + */ + + virtual IOReturn submitORB( IOFireWireSBP2ORB * orb ); + + // set callbacks + + /*! + @function setStatusNotifyProc + @abstract Sets the callback to be called on normal command status. + @discussion The supplied callback is called when normal command status is recieved, when + a normal command times out, or when a normal command is aborted. + "notificationEvent" in the callback's params will indicate what happened. + It will be set to one of the following values: kFWSBP2NormalCommandReset, kFWSBP2NormalCommandStatus, + or kFWSBP2NormalCommandTimeout. If the event type is kFWSBP2NormalCommandTimeout and "len" is + non-zero then "message" contains the data written to the status block. + @param refCon refCon passed to callback. + @param callback address of callback method of type FWSBP2NotifyCallback. + */ + + virtual void setStatusNotifyProc( void * refCon, FWSBP2NotifyCallback callback ); + + /*! + @function getStatusNotifyProc + @abstract Returns the callback to be called on normal command status. + @discussion Returns the refCon and callback address of the status notify callback. + @param refCon output parameter returning the refCon to be passed to the callback. + @param callback output parameter returning the address of the callback. + */ + + virtual void getStatusNotifyProc( void ** refCon, FWSBP2NotifyCallback * callback ); + + /*! + @function setUnsolicitedStatusNotifyProc + @abstract Sets the callback to be called on normal command status. + @discussion The supplied callback is called when unsolicited status is recieved. + "notificationEvent" in the callback's params will indicate what happened. In this + case it will be set to kFWSBP2UnsolicitedStatus. If "len" is + non-zero then "message" contains the data written to the status block. Note: any buffers + returned by callbacks are only valid for the duration of the login and should not have + their contents modified. + @param refCon refCon passed to callback. + @param callback address of callback method of type FWSBP2NotifyCallback. + */ + + virtual void setUnsolicitedStatusNotifyProc( void * refCon, FWSBP2NotifyCallback callback ); + + /*! + @function getUnsolicitedStatusNotifyProc + @abstract Returns the callback to be called on unsolicited status. + @discussion Returns the refCon and callback address of the unsolicited status notify callback. + @param refCon output parameter returning the refCon to be passed to the callback. + @param callback output parameter returning the address of the callback. + */ + + virtual void getUnsolicitedStatusNotifyProc( void ** refCon, FWSBP2NotifyCallback * callback ); + + // command handling + + /*! + @function setLoginCompletion + @abstract Sets the callback to be called when a login attempt is complete. + @discussion The supplied callback is called when a login attempt has completed. "status" in the + callback's params should be checked to determine the success or failure of the login attempt. + If "statusBlock" is non-null then login status was written and it has been supplied here. If + the login attempt was successful then the login response will be supplied in the "loginResponse" + buffer. Note: all buffers supplied to callbacks are only valid for the duration of the callback. + Also, you are not to modify the contents of any supplied buffer. + @param refCon refCon passed to callback. + @param callback address of callback method of type FWSBP2LoginCallback. + */ + + virtual void setLoginCompletion( void * refCon, FWSBP2LoginCallback completion ); + + /*! + @function submitLogin + @abstract Attempts to login to the LUN. + @discussion This call begins the login process. The login object should be configured prior + to this call. If kIOReturnSuccess is returned from this call then the loginCompletion routine + will be called when the login completes (successfully or unsuccesfully). + @result Returns kIOReturnSuccess login has successlly begun. + */ + + virtual IOReturn submitLogin( void ); + + /*! + @function submitLogout + @abstract Attempts to logout of the LUN. + @discussion This call begins the logout process. If kIOReturnSuccess is returned from this call then + the logoutCompletion routine will be called when the logout completes (successfully or unsuccesfully). + @result Returns kIOReturnSuccess if logout has successfully begun. + */ + + virtual IOReturn submitLogout( void ); + + /*! + @function setLogoutCompletion + @abstract Sets the callback to be called when a logout attempt is complete. + @discussion The supplied callback is called when a logout attempt has completed. "status" in the + callback's params should be checked to determine the success or failure of the logout attempt. + If "statusBlock" is non-null then logout status was written and it has been supplied here. + Note: all buffers supplied to callbacks are only valid for the duration of the callback. + Also, you are not to modify the contents of any supplied buffer. + @param refCon refCon passed to callback. + @param callback address of callback method of type FWSBP2LogoutCallback. + */ + + virtual void setLogoutCompletion( void * refCon, FWSBP2LogoutCallback completion ); + + /*! + @function setFetchAgentWriteCompletion + @abstract Sets the callback to be called when the fetch agent write completes. + @discussion When an immediate orb is executed with submitORB, it's address is written to a + specific address on the device. This address is called the fetch agent. The device the + reads that orb from the Mac's memory and executes it. With this call you can register to + be called back when this write to the fetch agent completes. The SBP2 services guarantee + that the fetch agent write will be complete before status is reported for an ORB, so for + most drivers this notification is not required. + @param refCon refCon passed to callback. + @param callback address of callback method of type FWSBP2FetchAgentWriteCallback. + */ + + virtual void setFetchAgentWriteCompletion( void * refCon, FWSBP2FetchAgentWriteCallback completion ); + + /*! + @function setFetchAgentResetCompletion + @abstract Sets the callback to be called when a fetch agent reset completes. + @discussion The fetch agent state machine on the device can be reset by a write to a specific + register. The SBP2 services offer a utility method to reset the fetch agent. You can register + a callback routine here to be notified when this rest write completes. + @param refCon refCon passed to callback. + @param callback address of callback method of type FWSBP2FetchAgentWriteCallback. + */ + + virtual void setFetchAgentResetCompletion( void * refCon, FWSBP2StatusCallback completion ); + + /*! + @function submitFetchAgentReset + @abstract Resets the LUN's fetch agent. + @discussion The fetch agent state machine on the device can be reset by a write to a specific + register. This reset can be intiated by a call to this method. Notification of the completion + of this write can be had by registering a callback with the setFetchAgentResetCompletion method. + @result Returns kIOReturnSuccess if the reset started successfully. + */ + + virtual IOReturn submitFetchAgentReset( void ); + + /*! + @function ringDoorbell + @abstract Rings the doorbell on the LUN. + @discussion Non-immediate appends to the ORB chain may require the fetch agent state machine + to be notified of the new ORB's presence. This is accomplished by writing to the so called + doorbell register. This method begins one of those writes. + @result Returns kIOReturnSuccess if the ring started successfully. + */ + + virtual IOReturn ringDoorbell( void ); + + /*! + @function enableUnsolicitedStatus + @abstract Enables unsolicited status. + @discussion After unsolicited is sent the device will not send any additional unsolicited status + until a specific register is written. This serves as a sort of flow-control for unsolicited status. + After unsolicited status is recieved and processed drivers will want to reenable the delivery + of unsolicted status by a call to this method. + @result Returns kIOReturnSuccess if the status enable write started successfully. + */ + + virtual IOReturn enableUnsolicitedStatus( void ); + + // accessors + + /*! + @function getMaxCommandBlockSize + @abstract Returns the maximum command block size. + @discussion The device publishes an upper limit on the size of command block that it can + accept. That value can be accessed via this method. + @result Returns a UInt32 containing the maximum command block size. + */ + + virtual UInt32 getMaxCommandBlockSize( void ); + + /*! + @function getLoginID + @abstract Returns the current login ID. + @discussion When we successfully login to a device. The device gives us a unique login id. + This is used internally for reconnecting to the device after bus resets and for certain other + management ORBs. Most drivers are probably not interested in this value. + @result Returns a UInt32 containing the current login ID. + */ + + virtual UInt32 getLoginID( void ); + + /*! + @function setLoginFlags + @abstract Sets login configuration flags. + @discussion Configures the login behavior according to the provided flags. Currently two + flags are defined for this API. kFWSBP2ExclusiveLogin sets the exclusive login bit in the + login ORB. kFWSBP2DontSynchronizeMgmtAgent allows simultaneous logins or reconnects to LUNs + with a common management agent (ie LUNs in the same unit directory). + @param loginFlags the login configuration flags. + */ + + virtual void setLoginFlags( UInt32 loginFlags ); + + /*! + @function getLoginFlags + @abstract Returns the currently set login flags. + @discussion Returns the current state of the login flags. Currently there is only one + flag defined for this API. kFWSBP2ExclusiveLogin indicates that the exclusive login bit + should be set in the login ORB. + @result Returns a UInt32 containing the currently set login flags. + */ + + virtual UInt32 getLoginFlags( void ); + + /*! + @function setReconnectTime + @abstract Sets the desired reconnect duration. + @discussion The target and initiator arbitrate the duration of the reconnect timeout. Here + the initiator specifies its desired timeout time in 2^reconnectTime seconds. After a + successful login the device returns the actual timeout value it wishes to use. This value + may be less than the reconnect timeout that the intiator specified if this is all that the + device can support. + @param reconnectTime The desired reconnect timeout encoded as 2^reconnectTime seconds. + */ + + virtual void setReconnectTime( UInt32 reconnectTime ); + + /*! + @function getReconnectTime + @abstract Returns the currently set reconnect time. + @discussion Returns the currently desired initiator reconnect time encoded as 2^time seconds. + @result Returns a UInt32 containing the currently set reconnect time. + */ + + virtual UInt32 getReconnectTime( void ); + + /*! + @function setMaxPayloadSize + @abstract Sets the maximum data transfer length for a normal command ORB. + @discussion Sets the maximum data transfer length for a normal command ORB. This value is + the maximum for all ORBs sent to this LUN. This can be trimmed further on an ORB by ORB basis, + by a similar call in the IOFireWireSBP2ORB itself. + @param reconnectTime The desired maximum payload size in bytes. + */ + + virtual void setMaxPayloadSize( UInt32 maxPayloadSize ); + + /*! + @function getMaxPayloadSize + @abstract Returns the currently set maximum payload size. + @discussion Returns the currently global maximum payload size in bytes. + @result Returns a UInt32 containing the currently set maximum payload size. + */ + + virtual UInt32 getMaxPayloadSize( void ); + + /*! + @function setPassword + @abstract Sets the login password. + @discussion Sets the login password using a buffer and a length. An alternate version exists + that accepts an IOMemoryDescriptor. If the password length is 8 or less the password is copied + directly into the login orb. If the length is greater than 8 the buffer is referenced by address + in the login ORB. In this case the buffer is not copied and should remain allocated for the + duration of the login attempt. + @param buf a pointer to the password buffer. + @param len the length in bytes of the password buffer. + @result Returns kIOReturnSuccess on success. + */ + + virtual IOReturn setPassword( void * buf, UInt32 len ); + + /*! + @function setPassword + @abstract Sets the login password. + @discussion Sets the login password using an IOMemoryDescriptor. An alternate version exists + that accepts a buffer and a length. If the password length is 8 or less the password is copied + directly into the login orb. If the length is greater than 8 the buffer is referenced by address + in the login ORB. + @param memory an IOMemoryDescriptor referencing the password. + @result Returns kIOReturnSuccess on success. + */ + + virtual IOReturn setPassword( IOMemoryDescriptor * memory ); + + + /*! + @function setRefCon + @abstract Sets the login refCon. + @discussion Sets a user defined value on the login that can be retrieved later with the + method getRefCon. + @param refCon a user defined value. + */ + + virtual void setRefCon( void * refCon ); + + /*! + @function getRefCon + @abstract Returns the refCon set with setRefCon. + @discussion Returns the user defined value previously stored in the login with setRefCon. + @result Returns the previously stored user defined value. + */ + + virtual void * getRefCon( void ); + + /*! + @function setBusyTimeoutRegisterValue + @abstract Sets the value to be written to the BUSY_TIMEOUT register. + @discussion 1394-1995 defines a register known as the BUSY_TIMEOUT register. This register + controls the busy retry behavior of your device. The initial value for this register is + 0x00000000. Which means busied transactions will not be retried. Since most devices want + their transactions retired on busy acks, the SBP2 service automatically updates the + BUSY_TIMEOUT register with the value specified here whenever necessary. Most drivers should + set this value to 0x0000000f. + @param timeout desired value of the BUSY_TIMEOUT register. + */ + + virtual void setBusyTimeoutRegisterValue( UInt32 timeout ); + +protected: + + virtual void startORBTimer( IOFireWireSBP2ORB * orb ); + virtual void prepareORBForExecution( IOFireWireSBP2ORB * orb ); + + static IOReturn staticExecuteORB( OSObject *self, void * orb, void *, void *, void * ); + virtual IOReturn executeORB( IOFireWireSBP2ORB * orb ); + +public: + + /*! + @function release + @abstract Primary implementation of the release mechanism. + @discussion See OSObject.h for more information. When retainCount == when then call free(). + */ + + virtual void release() const; + + /*! + @function setLoginRetryCountAndDelayTime + @abstract Sets login retry behavior. + @discussion Sets login retry behavior. + @param retryCount number of times to retry logins + @param uSecs delay time in microseconds between login retries + */ + + virtual void setLoginRetryCountAndDelayTime( UInt32 retryCount, UInt32 uSecs ); + +protected: + virtual IOReturn initialExecuteLogin( void ); + virtual void startLoginRetryTimer( void ); + virtual void stopLoginRetryTimer( void ); + static void loginRetryTimeoutStatic( void *refcon, IOReturn status, + IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + virtual void loginRetryTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd); + + virtual void startReconnectRetryTimer( void ); + virtual void stopReconnectRetryTimer( void ); + static void reconnectRetryTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + virtual void reconnectRetryTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + + virtual bool isORBAppended( IOFireWireSBP2ORB * orb ); + virtual void setORBIsAppended( IOFireWireSBP2ORB * orb, bool state ); + +public: + virtual void setAddressLoForLoginORBAndResponse( UInt32 addressLoORB, UInt32 addresLoResponse ); + + virtual void setLoginGeneration( UInt32 generation ); + virtual void clearLoginGeneration( void ); + +protected: + void startFetchAgentRetryTimer( UInt32 duration ); + void stopFetchAgentRetryTimer( void ); + static void fetchAgentRetryTimerStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + void fetchAgentRetryTimer( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + + void terminateNotify( void ); + void processLoginWrite( void ); + +public: + + bool isPhysicalAccessEnabled( void ); + UInt32 getARDMMax( void ); + +private: + + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 6); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 7); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 8); + + }; + +#endif diff --git a/i386/include/IOKit/sbp2/IOFireWireSBP2ManagementORB.h b/i386/include/IOKit/sbp2/IOFireWireSBP2ManagementORB.h new file mode 100644 index 0000000..9455383 --- /dev/null +++ b/i386/include/IOKit/sbp2/IOFireWireSBP2ManagementORB.h @@ -0,0 +1,345 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + @header IOFireWireSBP2ManagementORB + Contains the class definition for IOFireWireSBP2ManagementORB. +*/ + +#ifndef _IOKIT_IOFIREWIRESBP2MANAGEMENTORB_H +#define _IOKIT_IOFIREWIRESBP2MANAGEMENTORB_H + +#include +#include + +#include + +class IOFireWireSBP2LUN; +class IOFireWireSBP2ManagementORB; +class IOFireWireSBP2ORB; + +enum +{ + kFWSBP2QueryLogins = 1, + kFWSBP2AbortTask = 0xb, + kFWSBP2AbortTaskSet = 0xc, + kFWSBP2LogicalUnitReset = 0xe, + kFWSBP2TargetReset = 0xf +}; + +// Callback when management command completes asynchronously + +/*! + @typedef FWSBP2ManagementCallback + @param refCon Reference constant supplied when the notification was registered. + @param status Indicates success or failure of operation. + @param orb Indicates current orb status is for. +*/ + +typedef void (*FWSBP2ManagementCallback)(void * refCon, IOReturn status, IOFireWireSBP2ManagementORB * orb); + +/*! + @class IOFireWireSBP2ManagementORB + @abstract Supplies non login related management ORBs. Management ORBs can be executed independent + of a login, if necessary. Management ORBs are created using the IOFireWireSBP2LUN interface. +*/ + +class IOFireWireSBP2ManagementORB : public IOFWCommand +{ + OSDeclareDefaultStructors( IOFireWireSBP2ManagementORB ) + + friend class IOFireWireSBP2LUN; + friend class IOFireWireSBP2UserClient; + +protected: + + //////////////////////////////////////// + // rom keys + + enum + { + kUnitCharacteristicsKey = 0x3A, + kManagementAgentOffsetKey = 0x54 + }; + + //////////////////////////////////////// + // structs + + typedef struct + { + UInt32 orbOffsetHi; + UInt32 orbOffsetLo; + UInt32 reserved1[2]; + UInt16 options; + UInt16 loginID; + UInt32 reserved2; + UInt32 statusFIFOAddressHi; + UInt32 statusFIFOAddressLo; + } FWSBP2TaskManagementORB; + + typedef struct + { + UInt32 reserved1[2]; + UInt32 queryResponseAddressHi; + UInt32 queryResponseAddressLo; + UInt16 options; + UInt16 lun; + UInt16 reserved2; + UInt16 queryResponseLength; + UInt32 statusFIFOAddressHi; + UInt32 statusFIFOAddressLo; + } FWSBP2QueryLoginsORB; + + typedef struct + { + UInt8 details; + UInt8 sbpStatus; + UInt16 orbOffsetHi; + UInt32 orbOffsetLo; + UInt32 status[6]; + } FWSBP2StatusBlock; + +protected: + + //////////////////////////////////////// + // friend methods + + // IOFireWireSBP2LUN methods + virtual bool initWithLUN( IOFireWireSBP2LUN * lun, + void * refCon, + FWSBP2ManagementCallback completion ); + + // IOFireWireSBP2UserClient methods + virtual void setAsyncCallbackReference( void * asyncRef ); + virtual void getAsyncCallbackReference( void * asyncRef ); + +protected: + + // reserved for future use + struct ExpansionData + { + bool fInCriticalSection; + }; + ExpansionData * fExpansionData; + + IOFireWireSBP2LUN * fLUN; + IOFireWireUnit * fUnit; + + UInt32 fManagementOffset; + UInt32 fManagementTimeout; + UInt32 fFunction; + OSObject * fManageeCommand; + + // our orb + FWSBP2TaskManagementORB fManagementORB; + IOFWAddressSpace * fManagementORBAddressSpace; + FWAddress fManagementORBAddress; + + // command to write management agent + IOFWWriteCommand * fWriteCommand; + IOMemoryDescriptor * fWriteCommandMemory; + + // timeout + IOFWCommand * fTimeoutCommand; + bool fTimeoutTimerSet; + + // status block + FWSBP2StatusBlock fStatusBlock; + IOFWAddressSpace * fStatusBlockAddressSpace; + FWAddress fStatusBlockAddress; + + // response buffer + void * fResponseBuf; + UInt32 fResponseLen; + IOFWAddressSpace * fResponseAddressSpace; + FWAddress fResponseAddress; + + // competion routine + FWSBP2ManagementCallback fCompletionCallback; + void * fCompletionRefCon; + + // for user client + OSAsyncReference64 fCallbackAsyncRef; + + IOMemoryMap * fResponseMap; + + bool fCompleting; + + //////////////////////////////////////// + + // init / destroy + virtual IOReturn getUnitInformation( void ); + virtual IOReturn allocateResources( void ); + virtual void free( void ); + + // command execution + virtual IOReturn execute( void ); + virtual IOReturn complete( IOReturn state ); + + // write complete handler + static void writeCompleteStatic( void *refcon, + IOReturn status, + IOFireWireNub *device, + IOFWCommand *fwCmd ); + virtual void writeComplete( IOReturn status, + IOFireWireNub *device, + IOFWCommand *fwCmd ); + + // timeout handler + static void handleTimeoutStatic( void *refcon, + IOReturn status, + IOFireWireBus *bus, + IOFWBusCommand *fwCmd ); + virtual void handleTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + + // status block write handler + static UInt32 statusBlockWriteStatic( void *refcon, + UInt16 nodeID, + IOFWSpeed &speed, + FWAddress addr, + UInt32 len, + const void *buf, + IOFWRequestRefCon lockRead ); + virtual UInt32 statusBlockWrite( UInt16 nodeID, + FWAddress addr, + UInt32 len, + const void *buf, + IOFWRequestRefCon lockRead ); + + // IOFireWireSBP2LUN friend class wrappers + virtual void clearAllTasksInSet( void ); + virtual void removeManagementORB( IOFireWireSBP2ManagementORB * orb ); + +public: + + //////////////////////////////////////// + // client methods + + /*! + @function setCommandFunction + @abstract Sets the function of the management ORB. + @discussion Sets the the function of the management ORB. Legal values are kFWSBP2QueryLogins, + kFWSBP2AbortTask, kFWSBP2AbortTaskSet, kFWSBP2LogicalUnitReset, and kFWSBP2TargetReset. + @param function a value indicating the desired management function. + @result Returns kIOReturnSuccess if function was a legal function. + */ + + virtual IOReturn setCommandFunction( UInt32 function ); + + /*! + @function getCommandFunction + @abstract Returns the current function of the management ORB. + @discussion Returns the function of the management ORB. This is the same value that was + set with setCommandFunction. + @result Returns the function of the management ORB. + */ + + virtual UInt32 getCommandFunction( void ); + + /*! + @function setManageeCommand + @abstract Sets the command to be managed by the management ORB. + @discussion All management functions except kFWSBP2QueryLogins require a reference to an ORB of + some sort. kFWSBP2AbortTaskSet, kFWSBP2LogicalUnitReset, and kFWSBP2TargetReset require a + reference to the login ORB. kFWSBP2AbortTask requires a reference to the ORB to be aborted. + This method allows you to set the ORB to be managed. + @param command a reference to an IOFireWireSBP2Login or an IOFireWireSBP2ORB. + */ + + virtual void setManageeCommand( OSObject * command ); + + /*! + @function getCommandFunction + @abstract Returns the current managee command of the management ORB. + @discussion Returns the current managee command of the management ORB. This is the same value that was + set with setManageeCommand. + @result Returns the current managee command of the management ORB. + */ + + virtual OSObject* getManageeCommand( void ); + + /*! + @function setResponseBuffer + @abstract Sets the response buffer for the management ORB. + @discussion Sets the response buffer for the management ORB. kFWSBP2QueryLogins returns + a response to its query and needs to write it somewhere. This routine allows you to + specify the location. + @param desc memory descriptor for buffer. + @result Returns kIOReturnSuccess on a success. + */ + + virtual IOReturn setResponseBuffer( IOMemoryDescriptor * desc ); + + /*! + @function setResponseBuffer + @abstract Sets the response buffer for the management ORB. + @discussion Sets the response buffer for the management ORB. kFWSBP2QueryLogins returns + a response to its query and needs to write it somewhere. This routine allows you to + specify the location. + @param buf backing store for buffer + @param len length of buffer. + @result Returns kIOReturnSuccess on a success. + */ + + virtual IOReturn setResponseBuffer( void * buf, UInt32 len ); + + /*! + @function getResponseBuffer + @abstract Returns the response buffer for the management ORB. + @discussion Returns the response buffer set in setResponseBuffer above + @param desc memory descriptor for buffer. + @param buf output parameter for backing store for buffer + @param len output parameter for length of buffer. + */ + + virtual void getResponseBuffer( void ** buf, UInt32 * len ); + + /*! + @function release + @abstract Primary implementation of the release mechanism. + @discussion See OSObject.h for more information. + @param when When retainCount == when then call free(). + */ + + virtual void release() const; + +protected: + + virtual void setORBToDummy( IOFireWireSBP2ORB * orb ); + + virtual void suspendedNotify(); + +private: + + OSMetaClassDeclareReservedUsed(IOFireWireSBP2ManagementORB, 0); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 1); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 2); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 3); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 4); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 5); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 6); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 7); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 8); + +}; + +#endif \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/IOFireWireSBP2ORB.h b/i386/include/IOKit/sbp2/IOFireWireSBP2ORB.h new file mode 100644 index 0000000..5c11593 --- /dev/null +++ b/i386/include/IOKit/sbp2/IOFireWireSBP2ORB.h @@ -0,0 +1,547 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + @header IOFireWireSBP2ORB + Contains the class definition for IOFireWireSBP2ORB. +*/ + +#ifndef _IOKIT_IOFIREWIRESBP2ORB_H +#define _IOKIT_IOFIREWIRESBP2ORB_H + +#include + +#include +#include +#include + +enum +{ + kFWSBP2ConstraintForceDoubleBuffer = (1 << 0) +}; + +// login option flags +enum +{ + kFWSBP2CommandCompleteNotify = (1 << 0), + kFWSBP2CommandTransferDataFromTarget = (1 << 1), + kFWSBP2CommandImmediate = (1 << 2), + + kFWSBP2CommandNormalORB = (1 << 5), + kFWSBP2CommandReservedORB = (1 << 6), + kFWSBP2CommandVendorORB = (1 << 7), + kFWSBP2CommandDummyORB = (1 << 8), + kFWSBP2CommandCheckGeneration = (1 << 9), + + kFWSBP2CommandFixedSize = (1 << 10), + kFWSBP2CommandVirtualORBs = (1 << 11) // handy for debugging +}; + +enum +{ + kFWSBP2MaxPageClusterSize = 0xf000 +}; + +class IOFireWireSBP2ORB; +class IOFireWireSBP2LUN; +class IOFireWireSBP2Login; + +/*! + @class IOFireWireSBP2ORB + @abstract Represents an SBP2 normal command ORB. Supplies the APIs for configuring normal + command ORBs. This includes setting the command block and writing the page tables for I/O. + The ORBs are executed using the submitORB method in IOFireWireSBP2Login. +*/ + +class IOFireWireSBP2ORB : public IOCommand +{ + OSDeclareDefaultStructors( IOFireWireSBP2ORB ) + + friend class IOFireWireSBP2Login; + friend class IOFireWireSBP2ManagementORB; + +protected: + + typedef struct + { + UInt32 nextORBAddressHi; + UInt32 nextORBAddressLo; + UInt32 dataDescriptorHi; + UInt32 dataDescriptorLo; + UInt16 options; + UInt16 dataSize; + UInt32 commandBlock[1]; // will be variable sized + } FWSBP2ORB; + + typedef struct + { + UInt16 segmentLength; + UInt16 segmentBaseAddressHi; + UInt32 segmentBaseAddressLo; + } FWSBP2PTE; + +private: + + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 0); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 1); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 2); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 3); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 4); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 5); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 6); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 7); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 8); + +protected: + + virtual void deallocateBufferAddressSpace( void ); + virtual IOReturn allocateTimer( void ); + virtual void deallocateTimer( void ); + + /*! + @function deallocatePageTable + @abstract Frees up memory allocated for the page table. + @discussion Frees all memory associated with the page table. Undoes what allocatePageTable does. + Calling allocatePageTable again will automatically deallocate the existing page table before + allocating a new one, so this method is not used in most cases. + */ + + virtual void deallocatePageTable( void ); + +protected: + + // IOFireWireSBP2Login methods + virtual bool initWithLogin( IOFireWireSBP2Login * login ); + virtual void setNextORBAddress( FWAddress address ); + +public: + + /*! + @function allocatePageTable + @abstract Allocates memory for the page table. + @discussion Page table allocation is handle automatically by the ORB, except if the + kFWSBP2CommandFixedSize flags is set. In this case we will fail to write a page table if we + need more page table space than we have already. This method is exposed so these drivers + can preallocate as much page table as they need. This is useful if your driver is part of + the paging path and cannot allow allocations to occur. + @param entryCount number of entries of page table to be allocated. + */ + + virtual IOReturn allocatePageTable( UInt32 entryCount ); + +protected: + + virtual bool isTimerSet( void ); + virtual void cancelTimer( void ); + +protected: + + // reserved for future use + struct ExpansionData { }; + ExpansionData *reserved; + + IOFireWireSBP2Login * fLogin; + IOFireWireSBP2LUN * fLUN; + IOFireWireUnit * fUnit; + IOFireWireController * fControl; + IODMACommand * fDMACommand; + void * fUnused2; + + UInt32 fCommandFlags; + UInt32 fMaxPayloadSize; + UInt32 fTimeoutDuration; + UInt32 fGeneration; + UInt64 fRefCon; + + // + // orb + // + + IOMemoryDescriptor * fORBDescriptor; + FWSBP2ORB * fORBBuffer; + + FWAddress fORBPseudoAddress; + IOFWAddressSpace * fORBPseudoAddressSpace; + + IOFWAddressSpace * fORBPhysicalAddressSpace; + FWAddress fORBPhysicalAddress; + + // + // page table + // + + UInt32 fPageTableSize; + IOBufferMemoryDescriptor * fPageTableDescriptor; + + IOFWAddressSpace * fPageTablePhysicalAddressSpace; + FWAddress fPageTablePhysicalAddress; + UInt32 fPageTablePhysicalLength; + + IOFWAddressSpace * fPageTablePseudoAddressSpace; + FWAddress fPageTablePseudoAddress; + + // + // buffers + // + + IOFWAddressSpace * fBufferAddressSpace; + bool fBufferAddressSpaceAllocated; + IOMemoryDescriptor * fBufferDescriptor; + + // + // timer + // + + IOFWDelayCommand * fTimeoutCommand; + bool fTimeoutTimerSet; + + bool fInProgress; + bool fIsAppended; + + UInt32 fFetchAgentWriteRetries; + UInt32 fPTECount; + UInt32 fFetchAgentWriteRetryInterval; + + UInt32 fConstraintOptions; + + virtual IOReturn allocateResources( void ); + virtual void free( void ); + + // orb timeout handler + static void orbTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + virtual void orbTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); + + // login friend class wrappers + virtual IOFireWireUnit * getFireWireUnit( void ); + virtual IOFireWireSBP2LUN * getFireWireLUN( void ); + virtual void deallocateORB( void ); + virtual IOReturn allocateORB( UInt32 orbSize ); + virtual IOReturn removeORB( IOFireWireSBP2ORB * orb ); + virtual void prepareORBForExecution( void ); + virtual void startTimer( void ); + virtual void sendTimeoutNotification( IOFireWireSBP2ORB * orb ); + +public: + + /*! + @function release + @abstract Primary implementation of the release mechanism. + @discussion See OSObject.h for more information. + @param when When retainCount == when then call free(). + */ + + virtual void release() const; + + /*! + @function getLogin + @abstract Gets the login associated with this ORB. + @discussion Returns the IOFireWireSBP2Login object associated with this ORB. + @result Returns a pointer to an IOFireWireSBP2Login. + */ + + virtual IOFireWireSBP2Login * getLogin( void ); + + /*! + @function setCommandBuffersAsRanges + @abstract Creates a page table from a list of ranges. + @discussion Creates a page table with the given parameters. Any addresses mapped by this method + must remain valid until setCommandBuffers is called again or releaseCommandBuffers is called. + The SBP2 services do not release references to the command buffers just because the command + has completed. + @param ranges An array of ranges representing the data to be transfered. + @param withCount The number of ranges in the ranges array. + @param withDirection An IODirection indicating the direction of data transfer. + @param withTask The task that these adressses reside in. + @param offset Offset in bytes into data to begin writing table at. + @param length Number of bytes of data to map from offset. + @result Returns KIOReturnSuccess if the page table was written successfully. + */ + + virtual IOReturn setCommandBuffersAsRanges( IOVirtualRange * ranges, + UInt32 withCount, + IODirection withDirection, + task_t withTask, + UInt32 offset = 0, + UInt32 length = 0 ); + /*! + @function setCommandBuffersAsRanges + @abstract Creates a page table from a list of ranges. + @discussion Creates a page table with the given parameters. Any addresses mapped by this method + must remain valid until setCommandBuffers is called again or releaseCommandBuffers is called. + The SBP2 services do not release references to the command buffers just because the command + has completed. + @param memoryDescriptor IOMemoryDescriptor describe ranges to be written to a page table. + @param offset Offset in bytes into data to begin writing table at. + @param length Number of bytes of data to map from offset. + @result Returns KIOReturnSuccess if the page table was written successfully. + */ + + virtual IOReturn setCommandBuffers( IOMemoryDescriptor * memoryDescriptor, UInt32 offset = 0, + UInt32 length = 0 ); + + + /*! + @function releaseCommandBuffers + @abstract Releases SBP2's reference to the command buffers. + @discussion When you create a page table with one of the variants of setCommandBuffers. + SBP2 holds on to a reference to the buffers until this method is called. This means that + if a command completed and you manipulated the memory descriptor or released the buffers + without calling this method you could leave FW in an inconsistent state. + @result Returns KIOReturnSuccess if the page table was cleared successfully. + */ + + virtual IOReturn releaseCommandBuffers( void ); + + /*! + @function setCommandBlock + @abstract Sets the command block portion of the ORB. + @discussion Copys the data provided in the buffer to the command block portion of the ORB. + @param buffer Pointer to buffer to copy command block from. + @param length Number of bytes of data to copy. + @result Returns KIOReturnSuccess if the command block was updated successfully. + */ + + virtual IOReturn setCommandBlock( void * buffer, UInt32 length ); + + /*! + @function setCommandBlock + @abstract Sets the command block portion of the ORB. + @discussion Copys the data provided in the buffer to the command block portion of the ORB. + @param memory IOMemoryDescriptor representing the command block buffer. + @result Returns KIOReturnSuccess if the command block was updated successfully. + */ + + virtual IOReturn setCommandBlock( IOMemoryDescriptor * memory ); + + /*! + @function getCommandBufferDescriptor + @abstract Returns the memory descriptor representing the command buffer. + @discussion Returns the IOMemoryDescriptor for the data mapped by setCommandBuffer variants. + Works for setCommandBuffersAsRanges too. + @result Returns memory descriptor representing mapped data buffers. + */ + + virtual IOMemoryDescriptor * getCommandBufferDescriptor( void ); + + // accessors + + /*! + @function setCommandFlags + @abstract Sets configuration flags for the ORB. + @discussion Sets the configuration flags for the ORB. These can be any of the following: +

kFWSBP2CommandCompleteNotify - Set the notify bit as specified in SBP2 standard. Set to receive completion/timeout notification on this ORB. You almost always want to set this.

+

kFWSBP2CommandTransferDataFromTarget - Transfer direction as specified in SBP2 standard. Set if data is to be written by the device into the host's memory.

+

kFWSBP2CommandImmediate - Immediate Append. ORB address will be written to fetch agent and not chained. It is only legal to have one immediate ORB in progress at a time.

+

kFWSBP2CommandNormalORB - ORB format 0 - Format specified by SBP2 standard. Set this for most ORBs.

+

kFWSBP2CommandReservedORB - ORB format 1 - Format reserved by SBP2 standard for future standardization.

+

kFWSBP2CommandVendorORB - ORB format 2 - Format specified by SBP2 standard for vendor dependent ORBs.

+

kFWSBP2CommandDummyORB - ORB format 3 - Format specified by SBP2 standard for dummy ORBs.

+

kFWSBP2CommandCheckGeneration - If set upon submitORB, the ORB will only be appended if generation set with setCommandGeneration() matches the current generation. Pretty much all SBP2 drivers need sophisticated logic to track login state, so this is generally not used.

+

kFWSBP2CommandFixedSize - Do not allocate more memory for page table if needed. If there is not enough space in the currently allocated page table, the setCommandBuffers call will fail. This is important to set if your device is the backing store, as we don't want to cause memory allocations on the paging path.

+

kFWSBP2CommandVirtualORBs - Normally ORBs are backed by physical address spaces. Setting this flag makes this ORB backed by a pseudo address space. This can make ORBs easier to see in a bus trace. Virtual ORBs will have an address in the form of ffcX.XXXX.0000.0000. Pseudo address space backed ORBs are slower, so you won't want to set for deployment builds.

+ @param flags The flags to be set. + */ + + virtual void setCommandFlags( UInt32 flags ); + + /*! + @function getCommandFlags + @abstract Sets configuration flags for the ORB. + @discussion Returns the current configuration flags set on this ORB. + @result Return The current ORB flags. + */ + + virtual UInt32 getCommandFlags( void ); + + /*! + @function setMaxPayloadSize + @abstract Sets max payload size for the ORB. + @discussion This sets the maximum payload size for this ORB only. This size is clipped by + the global max payload size set in the login object. + @param maxPayloadSize The maximum payload size in bytes. + */ + + virtual void setMaxPayloadSize( UInt32 maxPayloadSize ); + + /*! + @function getMaxPayloadSize + @abstract Gets max payload size for the ORB. + @discussion This gets the maximum payload size for this ORB only. + @result Returns the maximum payload size in bytes. + */ + + virtual UInt32 getMaxPayloadSize( void ); + + /*! + @function setCommandTimeout + @abstract Sets the timeout of the ORB. + @discussion This sets the timeout for the ORB in milliseconds. Note that ORBs without timeouts + can be "lost." You will obviously not recieve timeout notification for timeouts of zero. But + perhaps less obviously you will not recieve orb reset notification, which is really a sort of + accelerated timeout notification for bus reset situations. + @param timeout The timeout duration in milliseconds. + */ + + virtual void setCommandTimeout( UInt32 timeout ); + + /*! + @function getCommandTimeout + @abstract Gets the timeout of the ORB. + @discussion This method gets the timeout for this ORB in milliseconds. + @result Returns the timeout for the orb in milliseconds. + */ + + virtual UInt32 getCommandTimeout( void ); + + + /*! + @function setCommandGeneration + @abstract Sets the command generation. + @discussion This sets the bus generation this ORB should be appended in. It is only meaningful + when combined with the kFWSBP2CommandCheckGeneration flags above. + @param gen The bus generation for command execution. + */ + + virtual void setCommandGeneration( UInt32 gen ); + + /*! + @function getCommandGeneration + @abstract Gets the command generation. + @discussion This gets the bus generation this ORB should be appended in. + @result Returns the bus generation for command execution. + */ + + virtual UInt32 getCommandGeneration( void ); + + /*! + @function setRefCon + @abstract Sets the ORB refCon. + @discussion Sets a user defined value on the ORB that can be retrieved later with the + method getRefCon. + @param refCon a user defined value. + */ + + virtual void setRefCon( void * refCon ); + + /*! + @function getRefCon + @abstract Returns the refCon set with setRefCon. + @discussion Returns the user defined value previously stored in the ORB with setRefCon. + @result Returns the previously stored user defined value. + */ + + virtual void * getRefCon( void ); + +protected: + + virtual void setToDummy( void ); + +public: + /*! + @function getORBAddress + @abstract Returns the FireWire address of this ORB. + @discussion Returns the FireWire bus address of this ORB. This is not the same as the Macintosh + address for the IOFireWireSBP2ORB. + @result Returns the FireWire address of this ORB. + */ + + virtual void getORBAddress( FWAddress * address ); + +protected: + + virtual bool isAppended( void ); + virtual void setIsAppended( bool state ); + virtual UInt32 getFetchAgentWriteRetries( void ); + virtual void setFetchAgentWriteRetries( UInt32 retries ); + + virtual void prepareFastStartPacket( IOBufferMemoryDescriptor * descriptor ); + + UInt32 getFetchAgentWriteRetryInterval( void ); + void setFetchAgentWriteRetryInterval( UInt32 interval ); + + IOReturn completeBufferAddressSpace( void ); + IOReturn prepareBufferAddressSpace( IOMemoryDescriptor * memoryDescriptor ); + +public: + + /*! + @function setBufferConstraints + @abstract Configures page table generation parameters + @discussion Sets the maximums size of any page table segment and the required alignemnt. Double buffering + may be used to satisfy these constraints. The only supported option is kFWSBP2ConstraintForceDoubleBuffer which + forces a page aligned double buffering of the entire descriptor. + @result May return an error if there is a problem allocating the underlying resources or if buffers are currently attached. + */ + + IOReturn setBufferConstraints( UInt64 maxSegmentSize, UInt32 alignment, UInt32 options = 0); + + + /*! + @function setCommandBuffersAsRanges64 + @abstract Creates a page table from a list of 64 bit ranges. + @discussion Creates a page table with the given parameters. Any addresses mapped by this method + must remain valid until setCommandBuffers is called again or releaseCommandBuffers is called. + The SBP2 services do not release references to the command buffers just because the command + has completed. This is a 64 bit compatible version of setCommandBuffersAsRanges. + @param ranges An array of ranges representing the data to be transfered. + @param withCount The number of ranges in the ranges array. + @param withDirection An IODirection indicating the direction of data transfer. + @param withTask The task that these adressses reside in. + @param offset Offset in bytes into data to begin writing table at. + @param length Number of bytes of data to map from offset. + @result Returns KIOReturnSuccess if the page table was written successfully. + */ + + IOReturn setCommandBuffersAsRanges64( IOAddressRange * ranges, + uint64_t withCount, + IODirection withDirection, + task_t withTask, + uint64_t offset = 0, + uint64_t length = 0); + + /*! + @function setRefCon64 + @abstract Sets the ORB refCon as a 64 bit value. + @discussion Sets a user defined value on the ORB that can be retrieved later with the + method getRefCon. + @param refCon a user defined value. + */ + + virtual void setRefCon64( UInt64 refCon ); + + /*! + @function getRefCon64 + @abstract Returns the 64 bit refCon set with setRefCon64. + @discussion Returns the user defined value previously stored in the ORB with setRefCon. + @result Returns the previously stored user defined value. + */ + + virtual UInt64 getRefCon64( void ); + +protected: + + UInt32 calculateTransferSizeLog( bool * clipping ); + + +}; + +#endif diff --git a/i386/include/IOKit/sbp2/IOFireWireSBP2Target.h b/i386/include/IOKit/sbp2/IOFireWireSBP2Target.h new file mode 100644 index 0000000..4288ce9 --- /dev/null +++ b/i386/include/IOKit/sbp2/IOFireWireSBP2Target.h @@ -0,0 +1,224 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + @header IOFireWireSBP2Target + Contains the class definition for IOFireWireSBP2Target. +*/ + +#ifndef _IOKIT_IOFIREWIRESBP2TARGET_H +#define _IOKIT_IOFIREWIRESBP2TARGET_H + +#include +#include + +enum +{ + kIOFWSBP2FailsOnAckBusy = (1 << 0), + kIOFWSBP2FailsOnBusResetsDuringIO = (1 << 1), + kIOFWSBP2DontUsePTPacketLimit = (1 << 2) +}; + +/*! + @class IOFireWireSBP2Target + @abstract Serves as bridge between IOFireWireUnit and IOFireWireLUN. + @discussion Matches against IOFireWireUnits supporting the SBP2 protocol. Creates IOFireWireSBP2LUN nubs for matching. Most drivers will match against an IOFireWireSBP2LUN, but matching against an IOFireWireSBP2Target is also supported. This can be useful in cases where a single driver wishes to + control all LUNs on a device. Support for this technique is minimal, however, and the driver will be + required to discover it's LUNs through the registry. +*/ + +class IOFireWireSBP2Target : public IOService +{ + OSDeclareDefaultStructors(IOFireWireSBP2Target); + +protected: + + ///////////////////////////////////////// + // rom keys + + enum + { + kCmdSpecIDKey = 0x38, + kCmdSetKey = 0x39, + kSoftwareRevKey = 0x3b, + kFirmwareRevKey = 0x3c, + kLUNKey = 0x14, + kLUNDirectoryKey = 0xd4, + kManagementAgentOffsetKey = 0x54, + kUnitCharacteristicsKey = 0x3A, + kRevisionKey = 0x21, + kFastStartKey = 0x3E + }; + + typedef struct + { + UInt32 cmdSpecID; + UInt32 cmdSet; + UInt32 vendorID; + UInt32 softwareRev; + UInt32 firmwareRev; + UInt32 lun; + UInt32 devType; + UInt32 unitCharacteristics; + UInt32 managementOffset; + UInt32 revision; + bool fastStartSupported; + UInt32 fastStart; + } LUNInfo; + + // reserved for future use + struct ExpansionData + { + bool fStarted; + OSArray * fPendingMgtAgentCommands ; + UInt32 fNumberPendingMgtAgentOrbs; + UInt32 fNumLUNs; + }; + ExpansionData * fExpansionData; + + ///////////////////////////////////////// + // private fields + + bool fOpenFromTarget; + UInt32 fOpenFromLUNCount; + IOFireWireUnit * fProviderUnit; + UInt32 fFlags; + + IOFireWireController * fControl; + + UInt32 fIOCriticalSectionCount; + + ///////////////////////////////////////// + // private internals + + virtual void free( void ); + virtual IOReturn message( UInt32 type, + IOService * provider, + void * argument = 0); + + virtual void scanForLUNs( void ); + IOReturn createLUN( LUNInfo * info ); + +public: + + ///////////////////////////////////////// + // public methods + + /*! @function handleOpen + @abstract Overrideable method to control the open / close behaviour of an IOService. + @discussion See IOService for discussion. + @param forClient Designates the client of the provider requesting the open. + @param options Options for the open, may be interpreted by the implementor of handleOpen. + @result Return true if the open was successful, false otherwise. */ + + virtual bool handleOpen( IOService * forClient, IOOptionBits options, void * arg ); + + /*! + @function handleClose + @abstract Overrideable method to control the open / close behaviour of an IOService. + @discussion See IOService for discussion. + @param forClient Designates the client of the provider requesting the close. + @param options Options for the close, may be interpreted by the implementor of handleOpen. + */ + + virtual void handleClose( IOService * forClient, IOOptionBits options ); + + /*! + @function handleIsOpen + @abstract Overrideable method to control the open / close behaviour of an IOService. + @discussion See IOService for discussion. + @param forClient If non-zero, isOpen returns the open state for that client. If zero is passed, isOpen returns the open state for all clients. + @result Returns true if the specific, or any, client has the IOService open. + */ + + virtual bool handleIsOpen( const IOService * forClient ) const; + + /*! + @function start + @abstract During an IOService instantiation, the start method is called when the IOService has been selected to run on the provider. + @discussion See IOService for discussion. + @result Return true if the start was successful, false otherwise (which will cause the instance to be detached and usually freed). + */ + + virtual bool start( IOService *provider ); + + /*! + @function stop + @abstract During an IOService termination, the stop method is called in its clients before they are detached & it is destroyed. + @discussion See IOService for discussion. + */ + + virtual void stop( IOService *provider ); + + /*! + @function getFireWireUnit + @abstract Returns an IOFireWireUnit object. + @discussion An IOFireWireUnit is the provider of an IOFireWireSBP2Target. In order to use the base FireWire services + you will need a reference to the unit. This method returns that reference. + @result Returns a pointer to an IOFireWireUnit. + */ + + virtual IOFireWireUnit * getFireWireUnit( void ); + + /*! + @function matchPropertyTable + @abstract Implements SBP2 specific matching. + @discussion See IOService for discussion. + @param table The dictionary of properties to be matched against. + @result Returns false if the family considers the matching dictionary does not match in properties it understands, true otherwise. + */ + + virtual bool matchPropertyTable( OSDictionary * table ); + + virtual void setTargetFlags( UInt32 flags ); + virtual UInt32 getTargetFlags( void ); + +protected: + virtual void configurePhysicalFilter( void ); + +public: + virtual void clearTargetFlags( UInt32 flags ); + virtual IOReturn beginIOCriticalSection( void ); + virtual void endIOCriticalSection( void ); + + virtual bool finalize( IOOptionBits options ); + + IOReturn synchMgmtAgentAccess( IOFWCommand * mgmtOrbCommand ); + void completeMgmtAgentAccess( ); + void clearMgmtAgentAccess( ); + void cancelMgmtAgentAccess( IOFWCommand * mgmtOrbCommand ); + +protected: + + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 0); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 1); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 2); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 3); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 4); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 5); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 6); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 7); + OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 8); + +}; + +#endif diff --git a/i386/include/IOKit/sbp2/IOFireWireSBP2UserClient.h b/i386/include/IOKit/sbp2/IOFireWireSBP2UserClient.h new file mode 100644 index 0000000..939dbf0 --- /dev/null +++ b/i386/include/IOKit/sbp2/IOFireWireSBP2UserClient.h @@ -0,0 +1,186 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOFIREWIRESBP2USERCLIENT_H +#define _IOKIT_IOFIREWIRESBP2USERCLIENT_H + +#include + +#define FIREWIREPRIVATE +#include +#undef FIREWIREPRIVATE + +#include + +#include +#include + +class IOFireWireSBP2UserClient : public IOUserClient +{ + OSDeclareDefaultStructors(IOFireWireSBP2UserClient) + +protected: + + bool fOpened; + bool fStarted; + IOFireWireSBP2Login * fLogin; + task_t fTask; + + IOFireWireSBP2LUN * fProviderLUN; + OSAsyncReference64 fMessageCallbackAsyncRef; + OSAsyncReference64 fLoginCallbackAsyncRef; + OSAsyncReference64 fLogoutCallbackAsyncRef; + OSAsyncReference64 fUnsolicitedStatusNotifyAsyncRef; + OSAsyncReference64 fStatusNotifyAsyncRef; + OSAsyncReference64 fFetchAgentResetAsyncRef; + OSAsyncReference64 fFetchAgentWriteAsyncRef; + + IOFWUserObjectExporter * fExporter; + + IOFireWireLib::UserObjectHandle fSessionRef; + + virtual IOReturn externalMethod( uint32_t selector, + IOExternalMethodArguments * args, + IOExternalMethodDispatch * dispatch, + OSObject * target, + void * reference ); +public: + + virtual bool initWithTask( task_t owningTask, void * securityToken, UInt32 type, OSDictionary * properties ); + virtual void free (); + + virtual bool start( IOService * provider ); + + virtual IOReturn clientClose( void ); + virtual IOReturn clientDied( void ); + + // IOFireWireSBP2ManagementORB friend class wrappers + virtual void flushAllManagementORBs( void ); + + ///////////////////////////////////////////////// + // IOFireWireSBP2LUN + + IOReturn open( IOExternalMethodArguments * arguments ); + IOReturn openWithSessionRef( IOExternalMethodArguments * arguments ); + IOReturn getSessionRef( IOExternalMethodArguments * arguments ); + IOReturn close( IOExternalMethodArguments * arguments ); + + // callbacks + IOReturn setMessageCallback( IOExternalMethodArguments * arguments ); + virtual IOReturn message( UInt32 type, IOService * provider, void * arg ); + + ///////////////////////////////////////////////// + // IOFireWireSBP2Login + + IOReturn setLoginCallback( IOExternalMethodArguments * arguments ); + IOReturn setLogoutCallback( IOExternalMethodArguments * arguments ); + IOReturn setUnsolicitedStatusNotify( IOExternalMethodArguments * arguments ); + IOReturn setStatusNotify( IOExternalMethodArguments * arguments ); + IOReturn createLogin( IOExternalMethodArguments * arguments ); + IOReturn releaseLogin( IOExternalMethodArguments * arguments ); + IOReturn submitLogin( IOExternalMethodArguments * arguments ); + IOReturn submitLogout( IOExternalMethodArguments * arguments ); + IOReturn setLoginFlags( IOExternalMethodArguments * arguments ); + IOReturn getMaxCommandBlockSize( IOExternalMethodArguments * arguments ); + IOReturn getLoginID( IOExternalMethodArguments * arguments ); + IOReturn setReconnectTime( IOExternalMethodArguments * arguments ); + IOReturn setMaxPayloadSize( IOExternalMethodArguments * arguments ); + + IOReturn submitFetchAgentReset( IOExternalMethodArguments * arguments ); + IOReturn setFetchAgentWriteCompletion( IOExternalMethodArguments * arguments ); + IOReturn ringDoorbell( IOExternalMethodArguments * arguments ); + IOReturn enableUnsolicitedStatus( IOExternalMethodArguments * arguments ); + IOReturn setBusyTimeoutRegisterValue( IOExternalMethodArguments * arguments ); + IOReturn setPassword( IOExternalMethodArguments * arguments ); + + // callbacks + + static void staticLoginCallback( void * refCon, FWSBP2LoginCompleteParamsPtr params ); + virtual void loginCallback( FWSBP2LoginCompleteParamsPtr params ); + + static void staticLogoutCallback( void * refCon, FWSBP2LogoutCompleteParamsPtr params ); + virtual void logoutCallback( FWSBP2LogoutCompleteParamsPtr params ); + + static void staticStatusNotify( void * refCon, FWSBP2NotifyParams * params ); + virtual void statusNotify( FWSBP2NotifyParams * params ); + + static void staticUnsolicitedNotify( void * refCon, FWSBP2NotifyParams * params ); + virtual void unsolicitedNotify( FWSBP2NotifyParams * params ); + + static void staticFetchAgentWriteComplete( void * refCon, IOReturn status, IOFireWireSBP2ORB * orb ); + virtual void fetchAgentWriteComplete( IOReturn status, IOFireWireSBP2ORB * orb ); + + static void staticFetchAgentResetComplete( void * refCon, IOReturn status ); + virtual void fetchAgentResetComplete( IOReturn status ); + + ///////////////////////////////////////////////// + // IOFireWireSBP2ORB + + IOReturn createORB( IOExternalMethodArguments * arguments ); + IOReturn releaseORB( IOExternalMethodArguments * arguments ); + IOReturn submitORB( IOExternalMethodArguments * arguments ); + IOReturn setCommandFlags( IOExternalMethodArguments * arguments ); + IOReturn setORBRefCon( IOExternalMethodArguments * arguments ); + IOReturn setMaxORBPayloadSize( IOExternalMethodArguments * arguments ); + IOReturn setCommandTimeout( IOExternalMethodArguments * arguments ); + IOReturn setCommandGeneration( IOExternalMethodArguments * arguments ); + IOReturn setToDummy( IOExternalMethodArguments * arguments ); + IOReturn setCommandBuffersAsRanges( IOExternalMethodArguments * arguments ); + IOReturn releaseCommandBuffers( IOExternalMethodArguments * arguments ); + IOReturn setCommandBlock( IOExternalMethodArguments * arguments ); + + // LSI workaround + IOReturn LSIWorkaroundSetCommandBuffersAsRanges( IOExternalMethodArguments * arguments ); + IOReturn LSIWorkaroundSyncBuffersForOutput( IOExternalMethodArguments * arguments ); + IOReturn LSIWorkaroundSyncBuffersForInput( IOExternalMethodArguments * arguments ); + + ///////////////////////////////////////////////// + // IOFireWireSBP2MgmtORB + + IOReturn createMgmtORB( IOExternalMethodArguments * arguments ); + IOReturn releaseMgmtORB( IOExternalMethodArguments * arguments ); + IOReturn setMgmtORBCallback( IOExternalMethodArguments * arguments ); + IOReturn submitMgmtORB( IOExternalMethodArguments * arguments ); + IOReturn setMgmtORBCommandFunction( IOExternalMethodArguments * arguments ); + IOReturn setMgmtORBManageeORB( IOExternalMethodArguments * arguments ); + IOReturn setMgmtORBManageeLogin( IOExternalMethodArguments * arguments ); + IOReturn setMgmtORBResponseBuffer( IOExternalMethodArguments * arguments ); + + // callbacks + static void staticMgmtORBCallback( void * refCon, IOReturn status, IOFireWireSBP2ManagementORB * orb ); + virtual void mgmtORBCallback( IOReturn status, IOFireWireSBP2ManagementORB * orb ); + + // IOFireWireSBP2MgmtORB friend class wrappers + virtual void setMgmtORBAsyncCallbackReference( IOFireWireSBP2ManagementORB * orb, void * asyncRef ); + virtual void getMgmtORBAsyncCallbackReference( IOFireWireSBP2ManagementORB * orb, void * asyncRef ); + + uint32_t checkScalarInputCount; + uint32_t checkStructureInputSize; + uint32_t checkScalarOutputCount; + uint32_t checkStructureOutputSize; + + IOReturn checkArguments( IOExternalMethodArguments * args, uint32_t scalarInCount, uint32_t structInCount, + uint32_t scalarOutCount, uint32_t structOutCount ); + +}; + +#endif \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/IOFireWireSBP2UserClientCommon.h b/i386/include/IOKit/sbp2/IOFireWireSBP2UserClientCommon.h new file mode 100644 index 0000000..cb114ba --- /dev/null +++ b/i386/include/IOKit/sbp2/IOFireWireSBP2UserClientCommon.h @@ -0,0 +1,79 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOFIREWIRESBP2USERCLIENTCOMMON_H_ +#define _IOKIT_IOFIREWIRESBP2USERCLIENTCOMMON_H_ + +#define kIOFireWireSBP2LibConnection 12 + +enum IOFWSBP2UserClientCommandCodes { + kIOFWSBP2UserClientOpen, // kIOUCScalarIScalarO 0,0 + kIOFWSBP2UserClientClose, // kIOUCScalarIScalarO 0,0 + kIOFWSBP2UserClientCreateLogin, // kIOUCScalarIScalarO 0,1 + kIOFWSBP2UserClientReleaseLogin, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSubmitLogin, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSubmitLogout, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSetLoginFlags, // kIOUCScalarIScalarO 2,0 + kIOFWSBP2UserClientGetMaxCommandBlockSize, // kIOUCScalarIScalarO 1,1 + kIOFWSBP2UserClientGetLoginID, // kIOUCScalarIScalarO 1,1 + kIOFWSBP2UserClientSetReconnectTime, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSetMaxPayloadSize, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientCreateORB, // kIOUCScalarIScalarO 0,1 + kIOFWSBP2UserClientReleaseORB, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSubmitORB, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSetCommandFlags, // kIOUCScalarIScalarO 2,0 + kIOFWSBP2UserClientSetMaxORBPayloadSize, // kIOUCScalarIScalarO 2,0 + kIOFWSBP2UserClientSetCommandTimeout, // kIOUCScalarIScalarO 2,0 + kIOFWSBP2UserClientSetCommandGeneration, // kIOUCScalarIScalarO 2,0 + kIOFWSBP2UserClientSetToDummy, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSetCommandBuffersAsRanges, // kIOUCScalarIScalarO 6,0 + kIOFWSBP2UserClientReleaseCommandBuffers, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSetCommandBlock, // kIOUCScalarIScalarO 3,0 + kIOFWSBP2UserClientCreateMgmtORB, // kIOUCScalarIScalarO 0,1 + kIOFWSBP2UserClientReleaseMgmtORB, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientSubmitMgmtORB, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientMgmtORBSetCommandFunction, // kIOUCScalarIScalarO 2,0 + kIOFWSBP2UserClientMgmtORBSetManageeORB, // kIOUCScalarIScalarO 2,0 + kIOFWSBP2UserClientMgmtORBSetManageeLogin, // kIOUCScalarIScalarO 2,0 + kIOFWSBP2UserClientMgmtORBSetResponseBuffer, // kIOUCScalarIScalarO 3,0 + kIOFWSBP2UserClientLSIWorkaroundSetCommandBuffersAsRanges, // kIOUCScalarIScalarO 6,0 + kIOFWSBP2UserClientMgmtORBLSIWorkaroundSyncBuffersForOutput, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientMgmtORBLSIWorkaroundSyncBuffersForInput, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientOpenWithSessionRef, // kIOUCScalarIScalarO 1,0 + kIOFWSBP2UserClientGetSessionRef, // kIOUCScalarIScalarO 0,1 + kIOFWSBP2UserClientRingDoorbell, // kIOUCScalarIScalarO 1, 0 + kIOFWSBP2UserClientEnableUnsolicitedStatus, // kIOUCScalarIScalarO 1, 0 + kIOFWSBP2UserClientSetBusyTimeoutRegisterValue, // kIOUCScalarIScalarO 2, 0 + kIOFWSBP2UserClientSetORBRefCon, // kIOUCScalarIScalarO 2, 0 + kIOFWSBP2UserClientSetPassword, // kIOUCScalarIScalarO 3, 0 + kIOFWSBP2UserClientSetMessageCallback, // kIOUCScalarIScalarO 2, 0 + kIOFWSBP2UserClientSetLoginCallback, // kIOUCScalarIScalarO 2, 0 + kIOFWSBP2UserClientSetLogoutCallback, // kIOUCScalarIScalarO 2, 0 + kIOFWSBP2UserClientSetUnsolicitedStatusNotify, // kIOUCScalarIScalarO 2, 0 + kIOFWSBP2UserClientSetStatusNotify, // kIOUCScalarIScalarO 2, 0 + kIOFWSBP2UserClientSetMgmtORBCallback, // kIOUCScalarIScalarO 3, 0 + kIOFWSBP2UserClientSubmitFetchAgentReset, // kIOUCScalarIScalarO 3, 0 + kIOFWSBP2UserClientSetFetchAgentWriteCompletion, // kIOUCScalarIScalaO 2, 0 + kIOFWSBP2UserClientNumCommands +}; + +#endif \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/IOFireWireSerialBusProtocolTransport.h b/i386/include/IOKit/sbp2/IOFireWireSerialBusProtocolTransport.h new file mode 100644 index 0000000..53e6195 --- /dev/null +++ b/i386/include/IOKit/sbp2/IOFireWireSerialBusProtocolTransport.h @@ -0,0 +1,449 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +/*! + @header IOFireWireSerialBusProtocolTransport + Contains the class definition for IOFireWireSerialBusProtocolTransport. +*/ + + +#ifndef _IOKIT_IO_FIREWIRE_SERIAL_BUS_PROTOCOL_TRANSPORT_H_ +#define _IOKIT_IO_FIREWIRE_SERIAL_BUS_PROTOCOL_TRANSPORT_H_ + + +#include +#include +#include +#include +#include +#include +#include + +#include + +/*! + @class IOFireWireSerialBusProtocolTransport + @abstract SCSI Protocol Driver Family for FireWire SBP2 Devices. + @discussion IOFireWireSerialBusProtocolTransport contains all the bus specific support for FireWire + SBP2 compliant devices. To add vendor specific features or workarounds you will sub-class the appropriate + methods of this family. +*/ + +class IOFireWireSerialBusProtocolTransport : public IOSCSIProtocolServices +{ + + OSDeclareDefaultStructors ( IOFireWireSerialBusProtocolTransport ) + +private: + + IOFireWireUnit * fUnit; + IOFireWireSBP2LUN * fSBPTarget; + IOFireWireSBP2Login * fLogin; + IOFireWireSBP2ORB * fORB; + IOFireWireSBP2ManagementORB * fLUNResetORB; + + // /!\ WARNING! NOT USED left behind for legacy binary reasons + IOSimpleLock * fQueueLock; + + UInt32 fLoginRetryCount; + bool fDeferRegisterService; + bool fNeedLogin; + + // /!\ WARNING! NOT USED left behind for legacy binary reasons + bool fPhysicallyConnected; + + static void + StatusNotifyStatic ( void * refCon, FWSBP2NotifyParamsPtr params ); + + static void + UnsolicitedStatusNotifyStatic ( void * refCon, + FWSBP2NotifyParamsPtr params ); + + static void + LunResetCompleteStatic ( void * refCon, + IOReturn status, + IOFireWireSBP2ManagementORB * orb ); + + static void + FetchAgentResetCompleteStatic ( void * refcon, + IOReturn status ); + + static IOReturn + ConnectToDeviceStatic ( OSObject * refCon, void *, void *, void *, void * ); + + virtual void + FetchAgentResetComplete ( IOReturn status ); + + static void LoginCompletionStatic ( void * refCon, FWSBP2LoginCompleteParams * params ); + + static void + LogoutCompletionStatic ( void * refCon, FWSBP2LogoutCompleteParams * params ); + + /*! + @function CoalesceSenseData + @abstract CoalesceSenseData convert a SBP-2 status block into a SPC-2 sense block. + @discussion CoalesceSenseData pulls the appropriate bits out of the SBP2 sense block + as defined in SBP-2 Annex B section B.2 and dynamically builds a sense data block as + defined in SPC-2 section 7.23.2. + */ + + SCSITaskStatus + CoalesceSenseData ( FWSBP2StatusBlock * sourceData, + UInt8 quadletCount, + SCSI_Sense_Data * targetData ); + + virtual void ConnectToDevice ( void ); + + virtual void DisconnectFromDevice ( void ); + + virtual bool IsDeviceCPUInDiskMode ( void ); + +protected: + + /*! + @function AllocateResources + @abstract Allocate Resources. + @discussion Called from start method to allocate needed resources. + */ + + virtual IOReturn AllocateResources ( void ); + + /*! + @function DeallocateResources + @abstract Deallocate Resources. + @discussion Called from cleanUp method to deallocate resources. + */ + + virtual void DeallocateResources ( void ); + + enum SBP2LoginState + { + kFirstTimeLoggingInState, + kLogginSucceededState, + kLogginFailedState + }; + + /*! + @typedef SBP2ClientOrbData + @param orb IOFireWireSBP2ORB for request. + @param scsiTask SCSITaskIdentifier of request. + @param serviceResponse SCSIServiceResponse of request. + @param taskStatus SCSITaskStatus of request. + @discussion This structure is stuffed into the refcon so we can associate which + IOFireWireSBP2ORB and SCSITaskIdentifier is completing. + */ + + typedef struct { + IOFireWireSBP2ORB * orb; + SCSITaskIdentifier scsiTask; + SCSIServiceResponse serviceResponse; + SCSITaskStatus taskStatus; + IOBufferMemoryDescriptor * quadletAlignedBuffer; + } SBP2ClientOrbData; + + static const UInt32 kDefaultBusyTimeoutValue = 0x0000000F; + static const UInt64 kMaxFireWireLUN = 0xFFFF; + static const UInt32 kMaxFireWirePayload = 4096; + static const UInt32 kMaxLoginRetryCount = 8; + static const UInt32 kMaxReconnectCount = 128; + static const UInt32 kCSRModelInfoKey = 0x17; + + UInt32 fReconnectCount; + bool fLoggedIn; + + // binary compatibility instance variable expansion + struct ExpansionData + { + IOCommandPool * fCommandPool; + IOCommandPool * fSubmitQueue; + SBP2LoginState fLoginState; + bool fLUNResetPathFlag; + int fLUNResetCount; + bool fAlwaysSetSenseData; + bool fAutonomousSpinDownWorkAround; + }; + + ExpansionData * reserved; + + bool fObjectIsOpen; + + /*! + @function CommandORBAccessor + @abstract accessor function for fORB. + @discussion xxx. + */ + + IOFireWireSBP2ORB * CommandORBAccessor ( void ); + + /*! + @function SBP2LoginAccessor + @abstract accessor function for fLogin. + @discussion xxx. + */ + + IOFireWireSBP2Login * SBP2LoginAccessor ( void ); + + virtual IOReturn + message ( UInt32 type, IOService * provider, void * argument = 0 ); + + /*! + @function SendSCSICommand + @abstract Prepare and send a SCSI command to the device. + @discussion The incoming SCSITaskIdentifier gets turned into a IOFireWireSBP2ORB + and is submitted to the SBP2 layer. See IOSCSIProtocolServices.h for more details + regarding SendSCSICommand. Also see IOFireWireSBP2Lib.h for details regarding the + IOFireWireSBP2ORB structure and the submitORB method. + @result If the command was sent to the device and is pending completion, the + subclass should return true and return back the kSCSIServiceResponse_Request_In_Process response. + If the command completes immediately with an error, the subclass will return true + and return back the appropriate status. If the subclass is currently processing all the + commands it can, the subclass will return false and the command will be resent next time + CommandCompleted is called. + */ + + virtual bool + SendSCSICommand ( SCSITaskIdentifier request, + SCSIServiceResponse * serviceResponse, + SCSITaskStatus * taskStatus ); + + /*! + @function SetCommandBuffers + @abstract Method to set orb's buffers. + @discussion This method was added so that subclasses can override and massage buffers as + needed. The default simply calls setCommandBuffers. See IOFireWireSBP2Lib.h for details + regarding the setCommandBuffers method. + @result xxx. + */ + + virtual IOReturn + SetCommandBuffers ( IOFireWireSBP2ORB * orb, SCSITaskIdentifier request ); + + /*! + @function CompleteSCSITask + @abstract This qualifies and sets appropriate data then calls CommandCompleted. + @discussion See IOSCSIProtocolServices.h for more details + regarding CommandCompleted. + */ + + virtual void + CompleteSCSITask ( IOFireWireSBP2ORB * orb ); + + /*! + @function AbortSCSICommand + @abstract This method is intended to abort an in progress SCSI Task. + @discussion Currently not implemented in super class. This is a stub method for adding + the abort command in the near future. + @result See SCSITask.h for SCSIServiceResponse codes. + */ + + virtual SCSIServiceResponse + AbortSCSICommand ( SCSITaskIdentifier request ); + + /*! + @function StatusNotify + @abstract This is our handler for status. + @discussion See IOFireWireSBP2Lib.h for details regarding the FWSBP2NotifyParams + structure that is passed in to the completion.. + */ + + virtual void + StatusNotify ( FWSBP2NotifyParams * params ); + + /*! + @function SetValidAutoSenseData + @abstract Set the auto sense data that was returned for a given SCSI Task. + @discussion SetValidAutoSenseData is called to qualify sense data that is copied to the + client via the SetAutoSenseData method. See IOSCSIProtocolServices.h for more details + regarding SetAutoSenseData. + */ + + void + SetValidAutoSenseData ( SBP2ClientOrbData * clientData, + FWSBP2StatusBlock * statusBlock, + SCSI_Sense_Data * targetData ); + + /*! + @function UnsolicitedStatusNotify + @abstract This is our handler for unsolicited status. + @discussion After we have parsed and handled the unsolicited status we call + enableUnsolicitedStatus. See IOFireWireSBP2Lib.h for details regarding the + enableUnsolicitedStatus method. + */ + + virtual void + UnsolicitedStatusNotify ( FWSBP2NotifyParamsPtr params ); + + /*! + @function LoginCompletion + @abstract Completion routine for login complete. + @discussion See IOFireWireSBP2Lib.h for details regarding the FWSBP2LogoutCompleteParams + structure that is passed in to the completion. + */ + + virtual void + LoginCompletion ( FWSBP2LoginCompleteParams * params ); + + /*! + @function LogoutCompletion + @abstract Completion routine for logout complete. + @discussion See IOFireWireSBP2Lib.h for details regarding the FWSBP2LogoutCompleteParams + structure that is passed in to the completion. + */ + + virtual void + LogoutCompletion ( FWSBP2LogoutCompleteParams * params ); + + /*! + @function IsProtocolServiceSupported + @abstract Determine is specified feature is supported by the protocol layer. + @discussion If the service has a value that must be returned, it will be returned in the + serviceValue output parameter. See IOSCSIProtocolServices.h for more details regarding + IsProtocolServiceSupported. + @result Will return true if the specified feature is supported by the protocol layer. + */ + + virtual bool + IsProtocolServiceSupported ( SCSIProtocolFeature feature, void * serviceValue ); + + /*! + @function HandleProtocolServiceFeature + @abstract Handle specified feature supported by the protocol layer. + @discussion See IOSCSIProtocolServices.h for more details regarding HandleProtocolServiceFeature. + @result Will return true if the specified feature is supported by the protocol layer. + */ + + virtual bool + HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void * serviceValue ); + + /*! + @function LunResetComplete + @abstract Callback to submit Fetch Agent Reset. + @discussion See IOFireWireSBP2Lib.h for details regarding the submitFetchAgentReset + method. + */ + + virtual void + LunResetComplete ( IOReturn status, IOFireWireSBP2ManagementORB * orb ); + +public: + + /*! + @function init + @abstract See IOService for discussion. + @discussion Setup and prime class into known state. + */ + + bool init ( OSDictionary * propTable ); + + /*! + @function start + @discussion See IOService for discussion. + @result Return true if the start was successful, false otherwise ( which will + cause the instance to be detached and usually freed ). + */ + + virtual bool start ( IOService * provider ); + + /*! + @function cleanUp + @abstract cleanUp is called to tear down IOFireWireSerialBusProtocolTransport. + @discussion cleanUp is called when we receive a kIOFWMessageServiceIsRequestingClose + message or if we fail our initialization. + */ + + virtual void cleanUp ( void ); + + /*! + @function finalize + @abstract See IOService for discussion. + @result Returns true. + */ + + virtual bool finalize ( IOOptionBits options ); + + /*! + @function free + @discussion See IOService for discussion. + @result none. + */ + + virtual void free ( void ); + +protected: + + virtual IOReturn login ( void ); + OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 1 ); + + virtual IOReturn submitLogin ( void ); + OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 2 ); + + virtual void loginLost ( void ); + OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 3 ); + + void loginSuspended ( void ); + OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 4 ); + + virtual void loginResumed ( void ); + OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 5 ); + + static IOReturn CriticalOrbSubmissionStatic ( + OSObject * refCon, + void * val1, + void * val2, + void * val3, + void * val4 ); + + /*! + @function CriticalOrbSubmission + @abstract xxx. + @discussion xxx. + @result none. + */ + + void + CriticalOrbSubmission ( + IOFireWireSBP2ORB * orb, + SCSITaskIdentifier request ); + + virtual void submitOrbFromQueue ( void ); + OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 6 ); + +private: + + // binary compatibility reserved method space + + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 7 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 8 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 9 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 10 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 11 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 12 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 13 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 14 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 15 ); + OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 16 ); + +}; + +#endif /* _IOKIT_IO_FIREWIRE_SERIAL_BUS_PROTOCOL_TRANSPORT_H_ */ \ No newline at end of file diff --git a/i386/include/IOKit/scsi/.svn/all-wcprops b/i386/include/IOKit/scsi/.svn/all-wcprops new file mode 100644 index 0000000..5e074ca --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/all-wcprops @@ -0,0 +1,155 @@ +K 25 +svn:wc:ra_dav:version-url +V 57 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi +END +IOSCSIPeripheralDeviceNub.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceNub.h +END +IOSCSIProtocolInterface.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIProtocolInterface.h +END +IOSCSIPeripheralDeviceType05.h +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType05.h +END +SCSICommandDefinitions.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSICommandDefinitions.h +END +IOSCSIPeripheralDeviceType07.h +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType07.h +END +IOSCSIPrimaryCommandsDevice.h +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIPrimaryCommandsDevice.h +END +SCSICmds_REPORT_LUNS_Definitions.h +K 25 +svn:wc:ra_dav:version-url +V 92 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSICmds_REPORT_LUNS_Definitions.h +END +SCSICommandOperationCodes.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSICommandOperationCodes.h +END +IOSCSIReducedBlockCommandsDevice.h +K 25 +svn:wc:ra_dav:version-url +V 92 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIReducedBlockCommandsDevice.h +END +IOSCSIMultimediaCommandsDevice.h +K 25 +svn:wc:ra_dav:version-url +V 90 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIMultimediaCommandsDevice.h +END +IOSCSIBlockCommandsDevice.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIBlockCommandsDevice.h +END +SCSIPort.h +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSIPort.h +END +SCSICmds_MODE_Definitions.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSICmds_MODE_Definitions.h +END +IODVDServices.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IODVDServices.h +END +SCSICmds_READ_CAPACITY_Definitions.h +K 25 +svn:wc:ra_dav:version-url +V 94 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSICmds_READ_CAPACITY_Definitions.h +END +IOBlockStorageServices.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOBlockStorageServices.h +END +IOSCSIPeripheralDeviceType0E.h +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType0E.h +END +SCSICmds_REQUEST_SENSE_Defs.h +K 25 +svn:wc:ra_dav:version-url +V 87 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h +END +IOSCSIProtocolServices.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIProtocolServices.h +END +IOBDServices.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOBDServices.h +END +IOReducedBlockServices.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOReducedBlockServices.h +END +SCSICmds_INQUIRY_Definitions.h +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSICmds_INQUIRY_Definitions.h +END +SCSITask.h +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSITask.h +END +IOCompactDiscServices.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOCompactDiscServices.h +END +IOSCSIPeripheralDeviceType00.h +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType00.h +END diff --git a/i386/include/IOKit/scsi/.svn/entries b/i386/include/IOKit/scsi/.svn/entries new file mode 100644 index 0000000..ff8f8bc --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/entries @@ -0,0 +1,881 @@ +10 + +dir +2117 +http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/scsi +http://forge.voodooprojects.org/svn/chameleon + + + +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + +b5af796a-00a8-11df-919b-ffff7a100b7d + +IOSCSIPeripheralDeviceNub.h +file + + + + +2012-10-03T17:50:21.000000Z +41004b82709f5c563fa2c10264853dd1 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +8628 + +IOSCSIProtocolInterface.h +file + + + + +2012-10-03T17:50:21.000000Z +3dc4c00e753dcf3fd49d0cfdac02faef +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +35912 + +IOSCSIPeripheralDeviceType05.h +file + + + + +2012-10-03T17:50:21.000000Z +7943859208badb3751dbf4ffea748f66 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +2852 + +SCSICommandDefinitions.h +file + + + + +2012-10-03T17:50:21.000000Z +6d33c5041ea6862346397f9e30a91dbd +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +12845 + +IOSCSIPeripheralDeviceType07.h +file + + + + +2012-10-03T17:50:21.000000Z +0e53abdb3759ef029098176c7b372012 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +2792 + +IOSCSIPrimaryCommandsDevice.h +file + + + + +2012-10-03T17:50:21.000000Z +fbc3c7570862069f2faeb236d5b2ff80 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +28729 + +SCSICmds_REPORT_LUNS_Definitions.h +file + + + + +2012-10-03T17:50:21.000000Z +cbb458517cee16286d9b71b82ff8ca70 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +4122 + +SCSICommandOperationCodes.h +file + + + + +2012-10-03T17:50:21.000000Z +f9c55b591e06c0fc73a8f0c46850d142 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +51055 + +IOSCSIReducedBlockCommandsDevice.h +file + + + + +2012-10-03T17:50:21.000000Z +7e8c5ee237fa3d53e59c8742aa21ec29 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +15569 + +spi +dir + +IOSCSIMultimediaCommandsDevice.h +file + + + + +2012-10-03T17:50:21.000000Z +c4523e2a816d92b1a21bab51e554f3c3 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +37497 + +IOSCSIBlockCommandsDevice.h +file + + + + +2012-10-03T17:50:21.000000Z +9524329c076b5320b814e3c7e4c8af9a +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +38443 + +SCSIPort.h +file + + + + +2012-10-03T17:50:21.000000Z +3023213196d2d300e6427aed35b87293 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +2037 + +SCSICmds_MODE_Definitions.h +file + + + + +2012-10-03T17:50:21.000000Z +6bba8330f0f798e8a696d1b9aa84dcfc +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +14817 + +IODVDServices.h +file + + + + +2012-10-03T17:50:21.000000Z +81e92ebecd5deed264767c5a704c1f31 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +8553 + +IOBlockStorageServices.h +file + + + + +2012-10-03T17:50:21.000000Z +f8ceba9851285be5ab564838e387d3b2 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +5384 + +SCSICmds_READ_CAPACITY_Definitions.h +file + + + + +2012-10-03T17:50:21.000000Z +b023866fc55360a68903eeb70772e116 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +3642 + +IOSCSIPeripheralDeviceType0E.h +file + + + + +2012-10-03T17:50:21.000000Z +b6fa75f60eb13eeb00333a44a40eddff +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +2909 + +SCSICmds_REQUEST_SENSE_Defs.h +file + + + + +2012-10-03T17:50:21.000000Z +2195af654461960fd9c521835ae05059 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +7152 + +IOSCSIProtocolServices.h +file + + + + +2012-10-03T17:50:21.000000Z +8a1ac65d04de801e378c58362ff162bc +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +15109 + +IOBDServices.h +file + + + + +2012-10-03T17:50:21.000000Z +75fa500daf479f56138fa835c1f7647e +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +8045 + +IOReducedBlockServices.h +file + + + + +2012-10-03T17:50:21.000000Z +3dc85f77ebd728e36274c154c0640593 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +5077 + +SCSICmds_INQUIRY_Definitions.h +file + + + + +2012-10-03T17:50:21.000000Z +ca84e5d42cea279808d672eb093d3594 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +29732 + +SCSITask.h +file + + + + +2012-10-03T17:50:21.000000Z +b9a85db4a5adf25cab94ad27fdb533b5 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +14455 + +IOCompactDiscServices.h +file + + + + +2012-10-03T17:50:21.000000Z +c61102d918a2bc4d6211ecc704a97c55 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +7947 + +IOSCSIPeripheralDeviceType00.h +file + + + + +2012-10-03T17:50:21.000000Z +81de59f70dd7471492d42f58c176a6f0 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +3475 + diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOBDServices.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOBDServices.h.svn-base new file mode 100644 index 0000000..70482d7 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/IOBDServices.h.svn-base @@ -0,0 +1,241 @@ +/* + * Copyright (c) 2006-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_BD_SERVICES_H_ +#define _IOKIT_IO_BD_SERVICES_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// IOKit includes +#include + +// Generic IOKit storage related headers +#include +#include + +// SCSI Architecture Model Family includes +#include + +class IOMemoryDescriptor; + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOBDServices : public IOBDBlockStorageDevice +{ + + OSDeclareDefaultStructors ( IOBDServices ) + +protected: + + OSSet * fClients; + IOSCSIPeripheralDeviceType05 * fProvider; + + virtual void free ( void ); + + // Reserve space for future expansion. + struct IOBDServicesExpansionData { }; + IOBDServicesExpansionData * fIOBDServicesReserved; + +public: + + static void AsyncReadWriteComplete ( void * clientData, + IOReturn status, + UInt64 actualByteCount ); + + // Deprecated + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageAttributes * attributes, + IOStorageCompletion * completion ); + + virtual IOReturn doEjectMedia ( void ); + + virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); + + virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + + virtual IOReturn doLockUnlockMedia ( bool doLock ); + + virtual IOReturn doSynchronizeCache ( void ); + + virtual IOReturn getWriteCacheState ( bool * enabled ); + + virtual IOReturn setWriteCacheState ( bool enabled ); + + virtual char * getVendorString ( void ); + + virtual char * getProductString ( void ); + + virtual char * getRevisionString ( void ); + + virtual char * getAdditionalDeviceInfoString ( void ); + + virtual IOReturn reportBlockSize ( UInt64 * blockSize ); + + virtual IOReturn reportEjectability ( bool * isEjectable ); + + virtual IOReturn reportLockability ( bool * isLockable ); + + virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); + + virtual IOReturn reportPollRequirements ( bool * pollIsRequired, + bool * pollIsExpensive ); + + virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); + + virtual IOReturn reportRemovability ( bool * isRemovable ); + + virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); + + /* CD Specific */ + virtual IOReturn doAsyncReadCD ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageCompletion completion ); + + virtual IOReturn readISRC ( UInt8 track, CDISRC isrc ); + + virtual IOReturn readMCN ( CDMCN mcn); + + virtual IOReturn readTOC ( IOMemoryDescriptor * buffer ); + + virtual IOReturn audioPause ( bool pause ); + + virtual IOReturn audioPlay ( CDMSF timeStart, CDMSF timeStop ); + + virtual IOReturn audioScan ( CDMSF timeStart, bool reverse ); + + virtual IOReturn audioStop ( void ); + + virtual IOReturn getAudioStatus ( CDAudioStatus * status ); + + virtual IOReturn getAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume ); + + virtual IOReturn setAudioVolume ( UInt8 leftVolume, UInt8 rightVolume ); + + virtual IOReturn getSpeed ( UInt16 * kilobytesPerSecond ); + + virtual IOReturn setSpeed ( UInt16 kilobytesPerSecond ); + + /* DVD Specific */ + virtual UInt32 getMediaType ( void ); + + virtual IOReturn reportKey ( IOMemoryDescriptor * buffer, + const DVDKeyClass keyClass, + const UInt32 lba, + const UInt8 agid, + const DVDKeyFormat keyFormat ); + + virtual IOReturn sendKey ( IOMemoryDescriptor * buffer, + const DVDKeyClass keyClass, + const UInt8 agid, + const DVDKeyFormat keyFormat ); + + virtual IOReturn readDVDStructure ( IOMemoryDescriptor * buffer, + const UInt8 structureFormat, + const UInt32 logicalBlockAddress, + const UInt8 layer, + const UInt8 agid ); + + /* BD Specific */ + virtual IOReturn readDiscStructure ( IOMemoryDescriptor * buffer, + UInt8 structureFormat, + UInt32 logicalBlockAddress, + UInt8 layer, + UInt8 agid, + UInt8 mediaType ); + + /* 10.6.0 */ + virtual IOReturn requestIdle ( void ); + + /* System Specific */ + virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); + virtual IOReturn setProperties ( OSObject * properties ); + + /* User Client Specific */ + virtual bool start ( IOService * provider ); + virtual bool open ( IOService * client, IOOptionBits options, IOStorageAccess access ); + + virtual bool handleOpen ( IOService * client, IOOptionBits options, void * access ); + virtual void handleClose ( IOService * client, IOOptionBits options ); + virtual bool handleIsOpen ( const IOService * client ) const; + + /* Added with 10.1.3 */ + virtual IOReturn readTOC ( IOMemoryDescriptor * buffer, + CDTOCFormat format, + UInt8 msf, + UInt8 trackSessionNumber, + UInt16 * actualByteCount ); + + /* Added with 10.1.3 */ + virtual IOReturn readDiscInfo ( IOMemoryDescriptor * buffer, + UInt16 * actualByteCount ); + + /* Added with 10.1.3 */ + virtual IOReturn readTrackInfo ( IOMemoryDescriptor * buffer, + UInt32 address, + CDTrackInfoAddressType addressType, + UInt16 * actualByteCount ); + + /* Added with 10.5 */ + virtual IOReturn splitTrack ( UInt32 address ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOBDServices, 1 ); + OSMetaClassDeclareReservedUnused ( IOBDServices, 2 ); + OSMetaClassDeclareReservedUnused ( IOBDServices, 3 ); + OSMetaClassDeclareReservedUnused ( IOBDServices, 4 ); + OSMetaClassDeclareReservedUnused ( IOBDServices, 5 ); + OSMetaClassDeclareReservedUnused ( IOBDServices, 6 ); + OSMetaClassDeclareReservedUnused ( IOBDServices, 7 ); + OSMetaClassDeclareReservedUnused ( IOBDServices, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_BD_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOBlockStorageServices.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOBlockStorageServices.h.svn-base new file mode 100644 index 0000000..d62a02b --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/IOBlockStorageServices.h.svn-base @@ -0,0 +1,158 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_BLOCK_STORAGE_SERVICES_H_ +#define _IOKIT_IO_BLOCK_STORAGE_SERVICES_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// IOKit includes +#include + +// Generic IOKit storage related headers +#include + +// SCSI Architecture Model Family includes +#include + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOBlockStorageServices : public IOBlockStorageDevice +{ + + OSDeclareDefaultStructors ( IOBlockStorageServices ) + +private: + + bool fMediaChanged; /* DEPRECATED */ + bool fMediaPresent; + +protected: + + IOSCSIBlockCommandsDevice * fProvider; + + UInt64 fMaxReadBlocks; + UInt64 fMaxWriteBlocks; + + virtual bool attach ( IOService * provider ); + virtual void detach ( IOService * provider ); + virtual IOReturn newUserClient ( + task_t owningTask, + void * securityID, + UInt32 type, + OSDictionary * properties, + IOUserClient ** handler ); + + // Reserve space for future expansion. + struct IOBlockStorageServicesExpansionData { }; + IOBlockStorageServicesExpansionData * fIOBlockStorageServicesReserved; + +public: + + virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); + + static void AsyncReadWriteComplete ( void * clientData, + IOReturn status, + UInt64 actualByteCount ); + + // Deprecated + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageAttributes * attributes, + IOStorageCompletion * completion ); + + virtual IOReturn doEjectMedia ( void ); + + virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); + + virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + + virtual IOReturn doLockUnlockMedia ( bool doLock ); + + virtual IOReturn doSynchronizeCache ( void ); + + virtual char * getVendorString ( void ); + + virtual char * getProductString ( void ); + + virtual char * getRevisionString ( void ); + + virtual char * getAdditionalDeviceInfoString ( void ); + + virtual IOReturn reportBlockSize ( UInt64 * blockSize ); + + virtual IOReturn reportEjectability ( bool * isEjectable ); + + virtual IOReturn reportLockability ( bool * isLockable ); + + virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); + + virtual IOReturn reportPollRequirements ( bool * pollIsRequired, + bool * pollIsExpensive ); + + virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); + + virtual IOReturn reportRemovability ( bool * isRemovable ); + + virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); + + virtual IOReturn getWriteCacheState ( bool * enabled ); + + virtual IOReturn setWriteCacheState ( bool enabled ); + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 1 ); + OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 2 ); + OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 3 ); + OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 4 ); + OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 5 ); + OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 6 ); + OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 7 ); + OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_BLOCK_STORAGE_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOCompactDiscServices.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOCompactDiscServices.h.svn-base new file mode 100644 index 0000000..a9d4a31 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/IOCompactDiscServices.h.svn-base @@ -0,0 +1,230 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_COMPACT_DISC_SERVICES_H_ +#define _IOKIT_IO_COMPACT_DISC_SERVICES_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// IOKit includes +#include + +// Generic IOKit storage related headers +#include +#include + +// SCSI Architecture Model Family includes +#include + +class IOMemoryDescriptor; + +// Use this switch to turn off the data cache. +#define _USE_DATA_CACHING_ 1 + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOCompactDiscServices : public IOCDBlockStorageDevice +{ + + OSDeclareDefaultStructors ( IOCompactDiscServices ) + +#if (_USE_DATA_CACHING_) + // Data Cache members + bool fUseDataCache; // Indicates if cache should be used. This + // will be set to false if all the necessary support + // for the data cache could not be allocated or + // initialized. + UInt8 * fDataCacheStorage; // Storage space for the cache + UInt32 fDataCacheStartBlock; // Starting block of the data in the cache. + UInt32 fDataCacheBlockCount; // Number of contiguous blocks in the cache + // starting with fDataCacheStartBlock. A value of + // zero in this member indicates that all data + // in the cache is invalid. + + IOSimpleLock * fDataCacheLock; // This is the lock for preventing multiple access + // while manipulating the data cache. +#endif + +protected: + + OSSet * fClients; + IOSCSIPeripheralDeviceType05 * fProvider; + + virtual void free ( void ); + + // Reserve space for future expansion. + struct IOCompactDiscServicesExpansionData { }; + IOCompactDiscServicesExpansionData * fIOCompactDiscServicesReserved; + +public: + + static void AsyncReadWriteComplete ( void * clientData, + IOReturn status, + UInt64 actualByteCount ); + + // Deprecated + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageAttributes * attributes, + IOStorageCompletion * completion ); + + virtual IOReturn doEjectMedia ( void ); + + virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); + + virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + + virtual IOReturn doLockUnlockMedia ( bool doLock ); + + virtual IOReturn doSynchronizeCache ( void ); + + virtual IOReturn getWriteCacheState ( bool * enabled ); + + virtual IOReturn setWriteCacheState ( bool enabled ); + + virtual char * getVendorString ( void ); + + virtual char * getProductString ( void ); + + virtual char * getRevisionString ( void ); + + virtual char * getAdditionalDeviceInfoString ( void ); + + virtual IOReturn reportBlockSize ( UInt64 * blockSize ); + + virtual IOReturn reportEjectability ( bool * isEjectable ); + + virtual IOReturn reportLockability ( bool * isLockable ); + + virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); + + virtual IOReturn reportPollRequirements ( bool * pollIsRequired, + bool * pollIsExpensive ); + + virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); + + virtual IOReturn reportRemovability ( bool * isRemovable ); + + virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); + + /* CD Specific */ + virtual IOReturn doAsyncReadCD ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageCompletion completion ); + + virtual IOReturn readISRC ( UInt8 track, CDISRC isrc ); + + virtual IOReturn readMCN ( CDMCN mcn); + + virtual IOReturn readTOC ( IOMemoryDescriptor * buffer ); + + virtual IOReturn audioPause ( bool pause ); + + virtual IOReturn audioPlay ( CDMSF timeStart, CDMSF timeStop ); + + virtual IOReturn audioScan ( CDMSF timeStart, bool reverse ); + + virtual IOReturn audioStop ( void ); + + virtual IOReturn getAudioStatus ( CDAudioStatus * status ); + + virtual IOReturn getAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume ); + + virtual IOReturn setAudioVolume ( UInt8 leftVolume, UInt8 rightVolume ); + + virtual UInt32 getMediaType ( void ); + + virtual IOReturn getSpeed ( UInt16 * kilobytesPerSecond ); + + virtual IOReturn setSpeed ( UInt16 kilobytesPerSecond ); + + /* System Specific */ + virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); + virtual IOReturn setProperties ( OSObject * properties ); + + /* User Client Specific */ + virtual bool start ( IOService * provider ); + virtual bool open ( IOService * client, IOOptionBits options, IOStorageAccess access ); + + virtual bool handleOpen ( IOService * client, IOOptionBits options, void * access ); + virtual void handleClose ( IOService * client, IOOptionBits options ); + virtual bool handleIsOpen ( const IOService * client ) const; + + /* Added with 10.1.3 */ + virtual IOReturn readTOC ( IOMemoryDescriptor * buffer, + CDTOCFormat format, + UInt8 msf, + UInt8 trackSessionNumber, + UInt16 * actualByteCount ); + + /* Added with 10.1.3 */ + virtual IOReturn readDiscInfo ( IOMemoryDescriptor * buffer, + UInt16 * actualByteCount ); + + /* Added with 10.1.3 */ + virtual IOReturn readTrackInfo ( IOMemoryDescriptor * buffer, + UInt32 address, + CDTrackInfoAddressType addressType, + UInt16 * actualByteCount ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 1 ); + OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 2 ); + OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 3 ); + OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 4 ); + OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 5 ); + OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 6 ); + OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 7 ); + OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_COMPACT_DISC_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IODVDServices.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IODVDServices.h.svn-base new file mode 100644 index 0000000..8dccb17 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/IODVDServices.h.svn-base @@ -0,0 +1,251 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_DVD_SERVICES_H_ +#define _IOKIT_IO_DVD_SERVICES_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// IOKit includes +#include + +// Generic IOKit storage related headers +#include +#include + +// SCSI Architecture Model Family includes +#include + +class IOMemoryDescriptor; + +// Use this switch to turn off the data cache. +#define _DVD_USE_DATA_CACHING_ 1 + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IODVDServices : public IODVDBlockStorageDevice +{ + + OSDeclareDefaultStructors ( IODVDServices ) + +#if (_DVD_USE_DATA_CACHING_) + // Data Cache members + bool fUseDataCache; // Indicates if cache should be used. This + // will be set to false if all the necessary support + // for the data cache could not be allocated or + // initialized. + UInt8 * fDataCacheStorage; // Storage space for the cache + UInt32 fDataCacheStartBlock; // Starting block of the data in the cache. + UInt32 fDataCacheBlockCount; // Number of contiguous blocks in the cache + // starting with fDataCacheStartBlock. A value of + // zero in this member indicates that all data + // in the cache is invalid. + + IOSimpleLock * fDataCacheLock; // This is the lock for preventing multiple access + // while manipulating the data cache. +#endif + +protected: + + OSSet * fClients; + IOSCSIPeripheralDeviceType05 * fProvider; + + virtual void free ( void ); + + // Reserve space for future expansion. + struct IODVDServicesExpansionData { }; + IODVDServicesExpansionData * fIODVDServicesReserved; + +public: + + static void AsyncReadWriteComplete ( void * clientData, + IOReturn status, + UInt64 actualByteCount ); + + // Deprecated + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageAttributes * attributes, + IOStorageCompletion * completion ); + + virtual IOReturn doEjectMedia ( void ); + + virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); + + virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + + virtual IOReturn doLockUnlockMedia ( bool doLock ); + + virtual IOReturn doSynchronizeCache ( void ); + + virtual IOReturn getWriteCacheState ( bool * enabled ); + + virtual IOReturn setWriteCacheState ( bool enabled ); + + virtual char * getVendorString ( void ); + + virtual char * getProductString ( void ); + + virtual char * getRevisionString ( void ); + + virtual char * getAdditionalDeviceInfoString ( void ); + + virtual IOReturn reportBlockSize ( UInt64 * blockSize ); + + virtual IOReturn reportEjectability ( bool * isEjectable ); + + virtual IOReturn reportLockability ( bool * isLockable ); + + virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); + + virtual IOReturn reportPollRequirements ( bool * pollIsRequired, + bool * pollIsExpensive ); + + virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); + + virtual IOReturn reportRemovability ( bool * isRemovable ); + + virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); + + /* CD Specific */ + virtual IOReturn doAsyncReadCD ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageCompletion completion ); + + virtual IOReturn readISRC ( UInt8 track, CDISRC isrc ); + + virtual IOReturn readMCN ( CDMCN mcn); + + virtual IOReturn readTOC ( IOMemoryDescriptor * buffer ); + + virtual IOReturn audioPause ( bool pause ); + + virtual IOReturn audioPlay ( CDMSF timeStart, CDMSF timeStop ); + + virtual IOReturn audioScan ( CDMSF timeStart, bool reverse ); + + virtual IOReturn audioStop ( void ); + + virtual IOReturn getAudioStatus ( CDAudioStatus * status ); + + virtual IOReturn getAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume ); + + virtual IOReturn setAudioVolume ( UInt8 leftVolume, UInt8 rightVolume ); + + virtual IOReturn getSpeed ( UInt16 * kilobytesPerSecond ); + + virtual IOReturn setSpeed ( UInt16 kilobytesPerSecond ); + + /* DVD Specific */ + virtual UInt32 getMediaType ( void ); + + virtual IOReturn reportKey ( IOMemoryDescriptor * buffer, + const DVDKeyClass keyClass, + const UInt32 lba, + const UInt8 agid, + const DVDKeyFormat keyFormat ); + + virtual IOReturn sendKey ( IOMemoryDescriptor * buffer, + const DVDKeyClass keyClass, + const UInt8 agid, + const DVDKeyFormat keyFormat ); + + virtual IOReturn readDVDStructure ( IOMemoryDescriptor * buffer, + const UInt8 structureFormat, + const UInt32 logicalBlockAddress, + const UInt8 layer, + const UInt8 agid ); + + /* 10.6.0 */ + virtual IOReturn requestIdle ( void ); + + /* System Specific */ + virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); + virtual IOReturn setProperties ( OSObject * properties ); + + /* User Client Specific */ + virtual bool start ( IOService * provider ); + virtual bool open ( IOService * client, IOOptionBits options, IOStorageAccess access ); + + virtual bool handleOpen ( IOService * client, IOOptionBits options, void * access ); + virtual void handleClose ( IOService * client, IOOptionBits options ); + virtual bool handleIsOpen ( const IOService * client ) const; + + /* Added with 10.1.3 */ + virtual IOReturn readTOC ( IOMemoryDescriptor * buffer, + CDTOCFormat format, + UInt8 msf, + UInt8 trackSessionNumber, + UInt16 * actualByteCount ); + + /* Added with 10.1.3 */ + virtual IOReturn readDiscInfo ( IOMemoryDescriptor * buffer, + UInt16 * actualByteCount ); + + /* Added with 10.1.3 */ + virtual IOReturn readTrackInfo ( IOMemoryDescriptor * buffer, + UInt32 address, + CDTrackInfoAddressType addressType, + UInt16 * actualByteCount ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IODVDServices, 1 ); + OSMetaClassDeclareReservedUnused ( IODVDServices, 2 ); + OSMetaClassDeclareReservedUnused ( IODVDServices, 3 ); + OSMetaClassDeclareReservedUnused ( IODVDServices, 4 ); + OSMetaClassDeclareReservedUnused ( IODVDServices, 5 ); + OSMetaClassDeclareReservedUnused ( IODVDServices, 6 ); + OSMetaClassDeclareReservedUnused ( IODVDServices, 7 ); + OSMetaClassDeclareReservedUnused ( IODVDServices, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_DVD_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOReducedBlockServices.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOReducedBlockServices.h.svn-base new file mode 100644 index 0000000..87ad8ed --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/IOReducedBlockServices.h.svn-base @@ -0,0 +1,147 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_REDUCED_BLOCK_SERVICES_H_ +#define _IOKIT_IO_REDUCED_BLOCK_SERVICES_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// Generic IOKit related headers +#include + +// Generic IOKit storage related headers +#include + +// SCSI Architecture Model Family includes +#include + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOReducedBlockServices : public IOBlockStorageDevice +{ + + OSDeclareDefaultStructors ( IOReducedBlockServices ) + + +protected: + // Reserve space for future expansion. + struct IOReducedBlockServicesExpansionData { }; + IOReducedBlockServicesExpansionData * fIOReducedBlockServicesReserved; + + IOSCSIPeripheralDeviceType0E * fProvider; + + virtual bool attach ( IOService * provider ); + virtual void detach ( IOService * provider ); + + +public: + + virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); + + static void AsyncReadWriteComplete ( void * clientData, + IOReturn status, + UInt64 actualByteCount ); + + // Deprecated + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageAttributes * attributes, + IOStorageCompletion * completion ); + + virtual IOReturn doEjectMedia ( void ); + + virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); + + virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + + virtual IOReturn doLockUnlockMedia ( bool doLock ); + + virtual IOReturn doSynchronizeCache ( void ); + + virtual IOReturn getWriteCacheState ( bool * enabled ); + + virtual IOReturn setWriteCacheState ( bool enabled ); + + virtual char * getVendorString ( void ); + + virtual char * getProductString ( void ); + + virtual char * getRevisionString ( void ); + + virtual char * getAdditionalDeviceInfoString ( void ); + + virtual IOReturn reportBlockSize ( UInt64 * blockSize ); + + virtual IOReturn reportEjectability ( bool * isEjectable ); + + virtual IOReturn reportLockability ( bool * isLockable ); + + virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); + + virtual IOReturn reportPollRequirements ( bool * pollIsRequired, + bool * pollIsExpensive ); + + virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); + + virtual IOReturn reportRemovability ( bool * isRemovable ); + + virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 1 ); + OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 2 ); + OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 3 ); + OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 4 ); + OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 5 ); + OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 6 ); + OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 7 ); + OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_REDUCED_BLOCK_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIBlockCommandsDevice.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIBlockCommandsDevice.h.svn-base new file mode 100644 index 0000000..2cb4a6d --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIBlockCommandsDevice.h.svn-base @@ -0,0 +1,1146 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_SCSI_BLOCK_COMMANDS_DEVICE_H_ +#define _IOKIT_IO_SCSI_BLOCK_COMMANDS_DEVICE_H_ + +#if defined(KERNEL) && defined(__cplusplus) + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + +// SBC power states as defined in T10:996D SCSI Block Commands - 3 (SBC-3) +// Revision 8c, November 13, 1997, pages 10-11. +enum +{ + kSBCPowerStateSystemSleep = 0, + kSBCPowerStateSleep = 1, + kSBCPowerStateStandby = 2, + kSBCPowerStateIdle = 3, + kSBCPowerStateActive = 4, + kSBCNumPowerStates = 5 +}; + +enum +{ + kMediaStateUnlocked = 0, + kMediaStateLocked = 1 +}; + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// General IOKit headers +#include +#include +#include +#include + +// Generic IOKit storage related headers +#include + +// SCSI Architecture Model Family includes +#include + + +// Forward declaration for the SCSIBlockCommands that is used internally by the +// IOSCSIBlockCommandsDevice class. +class SCSIBlockCommands; + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIBlockCommandsDevice : public IOSCSIPrimaryCommandsDevice +{ + + OSDeclareAbstractStructors ( IOSCSIBlockCommandsDevice ) + +private: + + +#ifndef __LP64__ + + SCSIBlockCommands * fSCSIBlockCommandObject; + SCSIBlockCommands * GetSCSIBlockCommandObject ( void ); + +#endif /* !__LP64__ */ + + IOReturn GetWriteCacheState ( IOMemoryDescriptor * buffer, + UInt8 modePageControlValue ); + + static void AsyncReadWriteComplete ( SCSITaskIdentifier completedTask ); + +protected: + + // Reserve space for future expansion. + struct IOSCSIBlockCommandsDeviceExpansionData + { + IONotifier * fPowerDownNotifier; + bool fWriteCacheEnabled; + bool fDeviceIsShared; + UInt64 fMediumBlockCount64; + bool fDeviceHasSATTranslation; + bool fProtocolSpecificPowerControl; + bool fRequiresEjectWithStartStopUnit; + }; + IOSCSIBlockCommandsDeviceExpansionData * fIOSCSIBlockCommandsDeviceReserved; + + #define fPowerDownNotifier fIOSCSIBlockCommandsDeviceReserved->fPowerDownNotifier + #define fWriteCacheEnabled fIOSCSIBlockCommandsDeviceReserved->fWriteCacheEnabled + + // The fDeviceIsShared is used to indicate whether this device exists on a Physical + // Interconnect that allows multiple initiators to access it. This is used mainly + // by the power management code to not send power state related START_STOP_UNIT + // commands to the device. + // The fDeviceIsShared value is also used to prevent power state commands from being + // sent to manual eject device since these devices behave better when allowed to + // manage their own power. + #define fDeviceIsShared fIOSCSIBlockCommandsDeviceReserved->fDeviceIsShared + + // The fMediumBlockCount64 provides support for 64 bit LBAs and + // replaces fMediumBlockCount which only supports 32 bits. + // This value should not be directly accessed and instead the member routine + // ReportMediumTotalBlockCount() should be used to retrieve it and the member routine + // SetMediumCharacteristics() should be used to set it. + #define fMediumBlockCount64 fIOSCSIBlockCommandsDeviceReserved->fMediumBlockCount64 + + #define fDeviceHasSATTranslation fIOSCSIBlockCommandsDeviceReserved->fDeviceHasSATTranslation + + // Device support protocol specific power off + #define fProtocolSpecificPowerControl fIOSCSIBlockCommandsDeviceReserved->fProtocolSpecificPowerControl + + // Device requires START_STOP_UNIT for ejects, regardless if PREVENT_ALLOW_MEIDUMREMOVAL + // failed. + #define fRequiresEjectWithStartStopUnit fIOSCSIBlockCommandsDeviceReserved->fRequiresEjectWithStartStopUnit + +private: + /* OBSOLETE. Use IOSCSIPrimaryCommandsDevice::Get/SetANSIVersion */ + UInt8 fANSIVersion; + +protected: + // ---- Device Characteristics ---- + bool fMediaIsRemovable; + + // ---- Medium Characteristics ---- + bool fMediumPresent; + +private: + // The byte count of each physical block on the medium. + // This value should not be directly accessed and instead the member routine + // ReportMediumBlockSize() should be used to retrieve it and the member routine + // SetMediumCharacteristics() should be used to set it. + UInt32 fMediumBlockSize; + + // The total number of blocks of fMediumBlockSize on the medium. + // OBSOLETE. Use fMediumBlockCount64 instead which allows for support of + // devices that have 33 through 64 bit LBA values. + UInt32 fMediumBlockCount; + +protected: + // Whether the installed medium is protected from writes + bool fMediumIsWriteProtected; + + // Whether user removal of medium has been prevented + bool fMediumRemovalPrevented; + + // Indicates whether this is a known manual eject device + bool fKnownManualEject; + + // Polling thread variables + thread_call_t fPollingThread; + UInt32 fPollingMode; + enum + { + kPollingMode_Suspended = 0, + kPollingMode_NewMedia = 1, + kPollingMode_MediaRemoval = 2 + }; + + // ---- Methods for controlling the current state of device support ---- + virtual bool InitializeDeviceSupport ( void ); + virtual void StartDeviceSupport ( void ); + virtual void SuspendDeviceSupport ( void ); + virtual void ResumeDeviceSupport ( void ); + virtual void StopDeviceSupport ( void ); + virtual void TerminateDeviceSupport ( void ); + + virtual void free ( void ); + +#ifndef __LP64__ + + // This method will retrieve the SCSI Primary Command Set object for + // the class. For subclasses, this will be overridden using a + // dynamic cast on the subclasses base command set object. + virtual SCSIPrimaryCommands * GetSCSIPrimaryCommandObject ( void ); + + virtual bool CreateCommandSetObjects ( void ); + virtual void FreeCommandSetObjects ( void ); + +#endif /* !__LP64__ */ + + virtual bool ClearNotReadyStatus ( void ); + virtual void CreateStorageServiceNub ( void ); + virtual bool DetermineDeviceCharacteristics ( void ); + + // ---- Methods used for controlling the polling thread ---- + virtual void ProcessPoll ( void ); + virtual void EnablePolling ( void ); + virtual void DisablePolling ( void ); + + // Main and support methods for polling for new Media + virtual void PollForNewMedia ( void ); + virtual bool DetermineMediaPresence ( void ); + virtual bool PreventMediumRemoval ( void ); + virtual bool DetermineMediumCapacity ( + UInt64 * blockSize, + UInt64 * blockCount ); + virtual bool DetermineMediumWriteProtectState ( void ); + + // Main and support methods for polling for Media removal + virtual void PollForMediaRemoval ( void ); + + // ---- Methods used for handling medium characteristics ---- + + // OBSOLETE - Use the version compatible with 64 bit LBAs instead. + virtual void SetMediumCharacteristics ( + UInt32 blockSize, + UInt32 blockCount ); + + void SetMediumCharacteristics ( + UInt64 blockSize, + UInt64 blockCount ); + + virtual void ResetMediumCharacteristics ( void ); + + virtual IOReturn IssueRead ( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueRead ( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + void * clientData ); + + virtual IOReturn IssueWrite ( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueWrite ( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + void * clientData ); + + // ----- Power Management Support ------ + + // We override this method to set our power states and register ourselves + // as a power policy maker. + virtual void InitializePowerManagement ( IOService * provider ); + + // We override this method so that when we register for power management, + // we go to our active power state (which the drive is definitely in + // at startup time). + virtual UInt32 GetInitialPowerState ( void ); + + // We override this method in order to provide the number of transitions + // from Fully active to Sleep state so that the idle timer can be adjusted + // to the appropriate time period based on the disk spindown time set in + // the Energy Saver prefs panel. + virtual UInt32 GetNumberOfPowerStateTransitions ( void ); + + // The TicklePowerManager method is called to tell the power manager that + // the device needs to be in a certain power state to handle requests. + virtual void TicklePowerManager ( void ); + + // The HandlePowerChange method is the state machine for power management. + // It is guaranteed to be on its own thread of execution (different from + // the power manager thread AND the workloop thread. This routine can + // send sync or async calls to the drive without worrying about threading + // issues. + virtual void HandlePowerChange ( void ); + + // The HandleCheckPowerState (void) method is on the serialized side of the + // command gate and can change member variables safely without + // multi-threading issues. It's main purpose is to call the superclass' + // HandleCheckPowerState ( UInt32 maxPowerState ) with the max power state + // the class registered with. + virtual void HandleCheckPowerState ( void ); + + // The VerifyMediumPresence method is called to see if the medium which we + // anticipated being there is still there. + virtual bool VerifyMediumPresence ( void ); + +public: + + static void sProcessPoll ( void * pdtDriver, void * refCon ); + + // ---- Methods for controlling the device ---- + virtual IOReturn SyncReadWrite ( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + UInt64 blockSize ); + + virtual IOReturn AsyncReadWrite ( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + UInt64 blockSize, + void * clientData ); + + IOReturn GetWriteCacheState ( bool * enabled ); + IOReturn SetWriteCacheState ( bool enabled ); + void DetermineMediumGeometry ( void ); + + // ---- Methods for controlling medium state ---- + virtual IOReturn EjectTheMedium ( void ); + virtual IOReturn LockUnlockMedium ( bool doLock ); + virtual IOReturn SynchronizeCache ( void ); + + // ---- Methods for controlling media format ---- + virtual IOReturn FormatMedium ( + UInt64 blockCount, + UInt64 blockSize ); + virtual UInt32 GetFormatCapacities ( + UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + + // ---- Query methods to report device characteristics ---- + + // Report the maximum number of blocks that the device can handle per + // read or write. A value of 0 (zero) indicates there is no limit aside + // from the size of the method's return parameter. + virtual UInt64 ReportDeviceMaxBlocksReadTransfer ( void ); + virtual UInt64 ReportDeviceMaxBlocksWriteTransfer ( void ); + + // Report whether the device supports removal of the media. + virtual bool ReportDeviceMediaRemovability ( void ); + + // ---- Query methods to report installed medium characteristics ---- + virtual UInt64 ReportMediumBlockSize ( void ); + virtual UInt64 ReportMediumTotalBlockCount ( void ); + virtual bool ReportMediumWriteProtection ( void ); + + +protected: + + +#ifndef __LP64__ + + // Command methods to access all commands available to SBC based devices. + virtual bool ERASE_10 ( + SCSITaskIdentifier request, + SCSICmdField1Bit ERA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool ERASE_12 ( + SCSITaskIdentifier request, + SCSICmdField1Bit ERA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool FORMAT_UNIT ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + IOByteCount defectListSize, + SCSICmdField1Bit FMTDATA, + SCSICmdField1Bit CMPLST, + SCSICmdField3Bit DEFECT_LIST_FORMAT, + SCSICmdField1Byte VENDOR_SPECIFIC, + SCSICmdField2Byte INTERLEAVE, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 Section 5.41 + bool FORMAT_UNIT ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + IOByteCount defectListSize, + SCSICmdField1Bit FMTPINFO, + SCSICmdField1Bit RTO_REQ, + SCSICmdField1Bit LONGLIST, + SCSICmdField1Bit FMTDATA, + SCSICmdField1Bit CMPLST, + SCSICmdField3Bit DEFECT_LIST_FORMAT, + SCSICmdField1Byte VENDOR_SPECIFIC, + SCSICmdField1Byte CONTROL ); + + virtual bool LOCK_UNLOCK_CACHE ( + SCSITaskIdentifier request, + SCSICmdField1Bit LOCK, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte NUMBER_OF_BLOCKS, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.5 + bool LOCK_UNLOCK_CACHE ( + SCSITaskIdentifier request, + SCSICmdField1Bit LOCK, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte NUMBER_OF_BLOCKS, + SCSICmdField1Byte CONTROL ); + + bool LOCK_UNLOCK_CACHE_16 ( + SCSITaskIdentifier request, + SCSICmdField1Bit LOCK, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte NUMBER_OF_BLOCKS, + SCSICmdField1Byte CONTROL ); + + virtual bool MEDIUM_SCAN ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit WBS, + SCSICmdField1Bit ASA, + SCSICmdField1Bit PSD, + SCSICmdField1Bit PRA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool PREFETCH ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.7 + bool PREFETCH ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + bool PREFETCH_16 ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + + virtual bool READ_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField21Bit LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + +#endif /* __LP64__ */ + + virtual bool READ_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.10 + bool READ_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit RDPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit FUA_NV, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool READ_12 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.11 + bool READ_12 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit RDPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit FUA_NV, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + + bool READ_16 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit RDPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit FUA_NV, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + + virtual bool READ_CAPACITY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Bit PMI, + SCSICmdField1Byte CONTROL ); + + bool READ_CAPACITY_16 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte ALLOCATION_LENGTH, + SCSICmdField1Bit PMI, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + virtual bool READ_DEFECT_DATA_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PLIST, + SCSICmdField1Bit GLIST, + SCSICmdField3Bit DEFECT_LIST_FORMAT, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool READ_DEFECT_DATA_12 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PLIST, + SCSICmdField1Bit GLIST, + SCSICmdField3Bit DEFECT_LIST_FORMAT, + SCSICmdField4Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool READ_GENERATION ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool READ_LONG ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit CORRCT, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte BYTE_TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + bool READ_LONG_16 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte BYTE_TRANSFER_LENGTH, + SCSICmdField1Bit CORRCT, + SCSICmdField1Byte CONTROL ); + + virtual bool READ_UPDATED_BLOCK_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Bit LATEST, + SCSICmdField15Bit GENERATION_ADDRESS, + SCSICmdField1Byte CONTROL ); + + virtual bool REASSIGN_BLOCKS ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.20 + bool REASSIGN_BLOCKS ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit LONGLBA, + SCSICmdField1Bit LONGLIST, + SCSICmdField1Byte CONTROL ); + + virtual bool REBUILD ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit INTDATA, + SCSICmdField2Bit PORT_CONTROL, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte REBUILD_LENGTH, + SCSICmdField4Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool REGENERATE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit INTDATA, + SCSICmdField2Bit PORT_CONTROL, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte REBUILD_LENGTH, + SCSICmdField4Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool REZERO_UNIT ( + SCSITaskIdentifier request, + SCSICmdField1Byte CONTROL ); + + virtual bool SEARCH_DATA_EQUAL_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit INVERT, + SCSICmdField1Bit SPNDAT, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte NUMBER_OF_BLOCKS_TO_SEARCH, + SCSICmdField1Byte CONTROL ); + + virtual bool SEARCH_DATA_HIGH_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit INVERT, + SCSICmdField1Bit SPNDAT, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte NUMBER_OF_BLOCKS_TO_SEARCH, + SCSICmdField1Byte CONTROL ); + + virtual bool SEARCH_DATA_LOW_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit INVERT, + SCSICmdField1Bit SPNDAT, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte NUMBER_OF_BLOCKS_TO_SEARCH, + SCSICmdField1Byte CONTROL ); + + virtual bool SEEK_6 ( + SCSITaskIdentifier request, + SCSICmdField21Bit LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Byte CONTROL ); + + virtual bool SEEK_10 ( + SCSITaskIdentifier request, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Byte CONTROL ); + + virtual bool SET_LIMITS_10 ( + SCSITaskIdentifier request, + SCSICmdField1Bit RDINH, + SCSICmdField1Bit WRINH, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte NUMBER_OF_BLOCKS, + SCSICmdField1Byte CONTROL ); + + virtual bool SET_LIMITS_12 ( + SCSITaskIdentifier request, + SCSICmdField1Bit RDINH, + SCSICmdField1Bit WRINH, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte NUMBER_OF_BLOCKS, + SCSICmdField1Byte CONTROL ); + +#endif /* __LP64__ */ + + virtual bool START_STOP_UNIT ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField4Bit POWER_CONDITIONS, + SCSICmdField1Bit LOEJ, + SCSICmdField1Bit START, + SCSICmdField1Byte CONTROL ); + + virtual bool SYNCHRONIZE_CACHE ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte NUMBER_OF_BLOCKS, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.22 + bool SYNCHRONIZE_CACHE ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField1Bit SYNC_NV, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte NUMBER_OF_BLOCKS, + SCSICmdField1Byte CONTROL ); + + bool SYNCRONIZE_CACHE_16 ( + SCSITaskIdentifier request, + SCSICmdField1Bit SYNC_NV, + SCSICmdField1Bit IMMED, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte NUMBER_OF_BLOCKS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + virtual bool UPDATE_BLOCK ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Byte CONTROL ); + + virtual bool VERIFY_10 ( + SCSITaskIdentifier request, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BLKVFY, + SCSICmdField1Bit BYTCHK, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte VERIFICATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.24 + bool VERIFY_10 ( + SCSITaskIdentifier request, + SCSICmdField3Bit VRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYTCHK, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte VERIFICATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool VERIFY_12 ( + SCSITaskIdentifier request, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BLKVFY, + SCSICmdField1Bit BYTCHK, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte VERIFICATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.25 + bool VERIFY_12 ( + SCSITaskIdentifier request, + SCSICmdField3Bit VRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYTCHK, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField4Byte VERIFICATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + bool VERIFY_16 ( + SCSITaskIdentifier request, + SCSICmdField3Bit VRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYTCHK, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte VERIFICATION_LENGTH, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + + virtual bool WRITE_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField2Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + +#endif /* __LP64__ */ + + virtual bool WRITE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit EBP, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.29 + bool WRITE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit FUA_NV, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool WRITE_12 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit EBP, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.30 + bool WRITE_12 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit FUA_NV, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + bool WRITE_16 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit FUA_NV, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + virtual bool WRITE_AND_VERIFY_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit EBP, + SCSICmdField1Bit BYTCHK, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.33 + bool WRITE_AND_VERIFY_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYTCHK, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool WRITE_AND_VERIFY_12 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit EBP, + SCSICmdField1Bit BYTCHK, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.34 + bool WRITE_AND_VERIFY_12 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYTCHK, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + + bool WRITE_AND_VERIFY_16 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYTCHK, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + + + virtual bool WRITE_LONG ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + bool WRITE_LONG_16 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Bit CORRCT, + SCSICmdField1Byte CONTROL ); + + virtual bool WRITE_SAME ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PBDATA, + SCSICmdField1Bit LBDATA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.39 + bool WRITE_SAME ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit PBDATA, + SCSICmdField1Bit LBDATA, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + bool WRITE_SAME_16 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit PBDATA, + SCSICmdField1Bit LBDATA, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + + virtual bool XDREAD ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.42 + bool XDREAD ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit XORPINFO, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool XDWRITE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit DISABLE_WRITE, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.43 + bool XDWRITE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit DISABLE_WRITE, + SCSICmdField1Bit FUA_NV, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool XDWRITE_EXTENDED ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit TABLE_ADDRESS, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit DISABLE_WRITE, + SCSICmdField2Bit PORT_CONTROL, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte SECONDARY_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField1Byte SECONDARY_ADDRESS, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.46 + bool XDWRITEREAD_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit DISABLE_WRITE, + SCSICmdField1Bit FUA_NV, + SCSICmdField1Bit XORPINFO, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool XPWRITE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.48 + bool XPWRITE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit FUA_NV, + SCSICmdField1Bit XORPINFO, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + +#endif /* __LP64__ */ + + + /* Added with 10.2 */ + OSMetaClassDeclareReservedUsed ( IOSCSIBlockCommandsDevice, 1 ); + +public: + + virtual IOReturn PowerDownHandler ( void * refCon, + UInt32 messageType, + IOService * provider, + void * messageArgument, + vm_size_t argSize ); + + + /* Added with 10.2 */ + OSMetaClassDeclareReservedUsed ( IOSCSIBlockCommandsDevice, 2 ); + +protected: + + virtual void SetMediumIcon ( void ); + + + /* Added with 10.3.3 */ + OSMetaClassDeclareReservedUsed ( IOSCSIBlockCommandsDevice, 3 ); + +protected: + + virtual void AsyncReadWriteCompletion ( SCSITaskIdentifier completedTask ); + + + /* Added with 10.6.0 */ + OSMetaClassDeclareReservedUsed ( IOSCSIBlockCommandsDevice, 4 ); + +public: + + virtual IOReturn AsyncReadWrite ( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + UInt64 blockSize, + IOStorageAttributes * attributes, + void * clientData ); + + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 8 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 9 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 10 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 11 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 12 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 16 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_BLOCK_COMMANDS_DEVICE_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIMultimediaCommandsDevice.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIMultimediaCommandsDevice.h.svn-base new file mode 100644 index 0000000..f812a39 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIMultimediaCommandsDevice.h.svn-base @@ -0,0 +1,1057 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_SCSI_MULTIMEDIA_COMMANDS_DEVICE_H_ +#define _IOKIT_IO_SCSI_MULTIMEDIA_COMMANDS_DEVICE_H_ + +#if KERNEL +#include +#else +#include +#endif + +#include + + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + + +// Message constants +#define kIOMessageTrayStateChange 0x69000035 +#define kIOMessageTrayStateHasChanged kIOMessageTrayStateChange // DEPRECATED, use kIOMessageTrayStateChange instead + +// Message values for kIOMessageTrayStateChange +enum +{ + kMessageTrayStateChangeRequestAccepted = 0, + kMessageTrayStateChangeRequestRejected = 1 +}; + +#define kIOMessageMediaAccessChange 0x69000036 + +// Message values for kIOMessageMediaAccessChange +enum +{ + kMessageDeterminingMediaPresence = 0, + kMessageFoundMedia = 1, + kMessageMediaTypeDetermined = 2 +}; + +// IOKit property keys and constants +#define kIOPropertySupportedCDFeatures kIOPropertySupportedCDFeaturesKey +#define kIOPropertySupportedDVDFeatures kIOPropertySupportedDVDFeaturesKey +#define kIOPropertySupportedBDFeatures kIOPropertySupportedBDFeaturesKey +#define kIOPropertyLowPowerPolling "Low Power Polling" + +typedef UInt32 CDFeatures; +enum +{ + kCDFeaturesAnalogAudioBit = 0, // Analog Audio playback + kCDFeaturesReadStructuresBit = 1, // CD-ROM + kCDFeaturesWriteOnceBit = 2, // CD-R + kCDFeaturesReWriteableBit = 3, // CD-R/W + kCDFeaturesCDDAStreamAccurateBit = 4, // CD-DA stream accurate + kCDFeaturesPacketWriteBit = 5, // Packet Writing + kCDFeaturesTAOWriteBit = 6, // CD Track At Once + kCDFeaturesSAOWriteBit = 7, // CD Mastering - Session At Once + kCDFeaturesRawWriteBit = 8, // CD Mastering - Raw + kCDFeaturesTestWriteBit = 9, // CD Mastering/TAO - Test Write + kCDFeaturesBUFWriteBit = 10 // CD Mastering/TAO - Buffer Underrun Free +}; + +enum +{ + kCDFeaturesAnalogAudioMask = (1 << kCDFeaturesAnalogAudioBit), + kCDFeaturesReadStructuresMask = (1 << kCDFeaturesReadStructuresBit), + kCDFeaturesWriteOnceMask = (1 << kCDFeaturesWriteOnceBit), + kCDFeaturesReWriteableMask = (1 << kCDFeaturesReWriteableBit), + kCDFeaturesCDDAStreamAccurateMask = (1 << kCDFeaturesCDDAStreamAccurateBit), + kCDFeaturesPacketWriteMask = (1 << kCDFeaturesPacketWriteBit), + kCDFeaturesTAOWriteMask = (1 << kCDFeaturesTAOWriteBit), + kCDFeaturesSAOWriteMask = (1 << kCDFeaturesSAOWriteBit), + kCDFeaturesRawWriteMask = (1 << kCDFeaturesRawWriteBit), + kCDFeaturesTestWriteMask = (1 << kCDFeaturesTestWriteBit), + kCDFeaturesBUFWriteMask = (1 << kCDFeaturesBUFWriteBit) +}; + +typedef UInt32 DVDFeatures; +enum +{ + kDVDFeaturesCSSBit = 0, // DVD-CSS + kDVDFeaturesReadStructuresBit = 1, // DVD-ROM + kDVDFeaturesWriteOnceBit = 2, // DVD-R + kDVDFeaturesRandomWriteableBit = 3, // DVD-RAM + kDVDFeaturesReWriteableBit = 4, // DVD-RW + kDVDFeaturesTestWriteBit = 5, // DVD-R Write - Test Write + kDVDFeaturesBUFWriteBit = 6, // DVD-R Write - Buffer Underrun Free + kDVDFeaturesPlusRBit = 7, // DVD+R + kDVDFeaturesPlusRWBit = 8, // DVD+RW (implies backgound format support) + kDVDFeaturesHDReadBit = 9, // HD DVD-ROM + kDVDFeaturesHDRBit = 10, // HD DVD-R + kDVDFeaturesHDRAMBit = 11, // HD DVD-RAM + kDVDFeaturesHDRWBit = 12 // HD DVD-RW +}; + +enum +{ + kDVDFeaturesCSSMask = (1 << kDVDFeaturesCSSBit), + kDVDFeaturesReadStructuresMask = (1 << kDVDFeaturesReadStructuresBit), + kDVDFeaturesWriteOnceMask = (1 << kDVDFeaturesWriteOnceBit), + kDVDFeaturesRandomWriteableMask = (1 << kDVDFeaturesRandomWriteableBit), + kDVDFeaturesReWriteableMask = (1 << kDVDFeaturesReWriteableBit), + kDVDFeaturesTestWriteMask = (1 << kDVDFeaturesTestWriteBit), + kDVDFeaturesBUFWriteMask = (1 << kDVDFeaturesBUFWriteBit), + kDVDFeaturesPlusRMask = (1 << kDVDFeaturesPlusRBit), + kDVDFeaturesPlusRWMask = (1 << kDVDFeaturesPlusRWBit), + kDVDFeaturesHDReadMask = (1 << kDVDFeaturesHDReadBit), + kDVDFeaturesHDRMask = (1 << kDVDFeaturesHDRBit), + kDVDFeaturesHDRAMMask = (1 << kDVDFeaturesHDRAMBit), + kDVDFeaturesHDRWMask = (1 << kDVDFeaturesHDRWBit) +}; + +typedef UInt32 BDFeatures; +enum +{ + kBDFeaturesReadBit = 0, // BD-ROM + kBDFeaturesWriteBit = 1 // BD-R / BD-RE +}; + +enum +{ + kBDFeaturesReadMask = (1 << kBDFeaturesReadBit), + kBDFeaturesWriteMask = (1 << kBDFeaturesWriteBit) +}; + +enum +{ + kDiscStatusEmpty = 0, + kDiscStatusIncomplete = 1, + kDiscStatusComplete = 2, + kDiscStatusOther = 3, + kDiscStatusMask = 0x03, + kDiscStatusErasableMask = 0x10 +}; + + +#if defined(KERNEL) && defined(__cplusplus) + +// MMC power states as defined in T10:1228D SCSI Multimedia Commands - 2 (MMC-2) +// Revision 11a, August 30, 1999, page 312 (Annex F). +enum +{ + kMMCPowerStateSystemSleep = 0, + kMMCPowerStateSleep = 1, + kMMCPowerStateStandby = 2, + kMMCPowerStateIdle = 3, + kMMCPowerStateActive = 4, + kMMCNumPowerStates = 5 +}; + +enum +{ + kMediaStateUnlocked = 0, + kMediaStateLocked = 1 +}; + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// General IOKit headers +#include +#include + +// Generic IOKit storage related headers +#include +#include +#include + +// SCSI Architecture Model Family includes +#include + +// Forward definitions for internal use only classes +class SCSIMultimediaCommands; +class SCSIBlockCommands; + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIMultimediaCommandsDevice : public IOSCSIPrimaryCommandsDevice +{ + + OSDeclareAbstractStructors ( IOSCSIMultimediaCommandsDevice ) + +private: + +#ifndef __LP64__ + + SCSIMultimediaCommands * fSCSIMultimediaCommandObject; + SCSIMultimediaCommands * GetSCSIMultimediaCommandObject ( void ); + + SCSIBlockCommands * fSCSIBlockCommandObject; /* OBSOLETE */ + SCSIBlockCommands * GetSCSIBlockCommandObject ( void ); /* OBSOLETE */ + +#endif /* !__LP64__ */ + + static void AsyncReadWriteComplete ( SCSITaskIdentifier completedTask ); + +protected: + + // Reserve space for future expansion. + struct IOSCSIMultimediaCommandsDeviceExpansionData + { + IONotifier * fPowerDownNotifier; + bool fDeviceSupportsPowerOff; + BDFeatures fSupportedBDFeatures; + bool fDeviceSupportsAsyncNotification; + bool fDeviceSupportsFastSpindown; + UInt8 fCDLoadingMechanism; + }; + IOSCSIMultimediaCommandsDeviceExpansionData * fIOSCSIMultimediaCommandsDeviceReserved; + + #define fPowerDownNotifier fIOSCSIMultimediaCommandsDeviceReserved->fPowerDownNotifier + #define fDeviceSupportsPowerOff fIOSCSIMultimediaCommandsDeviceReserved->fDeviceSupportsPowerOff + #define fSupportedBDFeatures fIOSCSIMultimediaCommandsDeviceReserved->fSupportedBDFeatures + #define fDeviceSupportsAsyncNotification fIOSCSIMultimediaCommandsDeviceReserved->fDeviceSupportsAsyncNotification + #define fDeviceSupportsFastSpindown fIOSCSIMultimediaCommandsDeviceReserved->fDeviceSupportsFastSpindown + #define fCDLoadingMechanism fIOSCSIMultimediaCommandsDeviceReserved->fCDLoadingMechanism + +#ifndef __LP64__ + + // This method will retreive the SCSI Primary Command Set object for + // the class. For subclasses, this will be overridden using a + // dynamic cast on the subclasses base command set object. + virtual SCSIPrimaryCommands * GetSCSIPrimaryCommandObject ( void ); + +#endif /* !__LP64__ */ + + CDFeatures fSupportedCDFeatures; + DVDFeatures fSupportedDVDFeatures; + + UInt16 fCurrentDiscSpeed; + bool fMediaChanged; + bool fMediaPresent; + + // The byte count of each physical block on the media. + UInt32 fMediaBlockSize; + + // The total number of blocks of fMediaBlockSize on the media. + UInt32 fMediaBlockCount; + + // Flags used to indicate device feature + bool fMediaIsRemovable; + bool fMediaIsWriteProtected; + UInt32 fMediaType; + + thread_call_t fPollingThread; + bool fDeviceSupportsLowPowerPolling; + bool fLowPowerPollingEnabled; + UInt32 fPollingMode; + + enum + { + kPollingMode_Suspended = 0, + kPollingMode_NewMedia = 1, + kPollingMode_MediaRemoval = 2 + }; + + virtual IOReturn setProperties ( OSObject * properties ); + + virtual void CreateStorageServiceNub ( void ); + virtual bool DetermineDeviceCharacteristics ( void ); + virtual IOReturn DetermineIfMediaIsRemovable ( void ); + virtual IOReturn DetermineDeviceFeatures ( void ); + virtual void DetermineMediaType ( void ); + virtual bool CheckForDVDMediaType ( void ); + virtual bool CheckForCDMediaType ( void ); + virtual void PollForMedia ( void ); + virtual void EnablePolling ( void ); + virtual void DisablePolling ( void ); + virtual void CheckWriteProtection ( void ); + virtual bool ClearNotReadyStatus ( void ); + + virtual IOReturn GetDeviceConfiguration ( void ); + virtual IOReturn GetDeviceConfigurationSize ( UInt32 * size ); + virtual IOReturn ParseFeatureList ( UInt32 numProfiles, UInt8 * firstFeaturePtr ); + + virtual IOReturn GetMechanicalCapabilities ( void ); + virtual IOReturn GetMechanicalCapabilitiesSize ( UInt32 * size ); + virtual IOReturn ParseMechanicalCapabilities ( UInt8 * mechanicalCapabilitiesPtr ); + + virtual IOReturn CheckForLowPowerPollingSupport ( void ); + virtual IOReturn GetCurrentPowerStateOfDrive ( UInt32 * powerState ); + + virtual IOReturn IssueRead ( IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueRead ( IOMemoryDescriptor * buffer, + void * clientData, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueWrite ( IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueWrite ( IOMemoryDescriptor * buffer, + void * clientData, + UInt64 startBlock, + UInt64 blockCount ); + + virtual void SetMediaCharacteristics ( UInt32 blockSize, UInt32 blockCount ); + virtual void ResetMediaCharacteristics ( void ); + + UInt8 ConvertBCDToHex ( UInt8 binaryCodedDigit ); + + // ------ User Client Support ------ + + virtual IOReturn HandleSetUserClientExclusivityState ( IOService * userClient, bool state ); + + // ----- Power Management Support ------ + + // We override this method to set our power states and register ourselves + // as a power policy maker. + virtual void InitializePowerManagement ( IOService * provider ); + + // We override this method so that when we register for power management, + // we go to our active power state (which the drive is definitely in + // at startup time). + virtual UInt32 GetInitialPowerState ( void ); + + // We override this method in order to provide the number of transitions + // from Fully active to Sleep state so that the idle timer can be adjusted + // to the appropriate time period based on the disk spindown time set in + // the Energy Saver prefs panel. + virtual UInt32 GetNumberOfPowerStateTransitions ( void ); + + // The TicklePowerManager method is called to tell the power manager that the + // device needs to be in a certain power state to handle requests. + virtual void TicklePowerManager ( void ); + + // The HandlePowerChange method is the state machine for power management. + // It is guaranteed to be on its own thread of execution (different from + // the power manager thread AND the workloop thread. This routine can + // send sync or async calls to the drive without worrying about threading + // issues. + virtual void HandlePowerChange ( void ); + + // The HandleCheckPowerState (void) method is on the serialized side of the command + // gate and can change member variables safely without multi-threading issues. + // It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) + // with the max power state the class registered with. + virtual void HandleCheckPowerState ( void ); + + // The CheckMediaPresence method is called to see if the media which we + // anticipated being there is still there. + virtual bool CheckMediaPresence ( void ); + + virtual bool InitializeDeviceSupport ( void ); + virtual void StartDeviceSupport ( void ); + virtual void SuspendDeviceSupport ( void ); + virtual void ResumeDeviceSupport ( void ); + virtual void StopDeviceSupport ( void ); + virtual void TerminateDeviceSupport ( void ); + + virtual void free ( void ); + +#ifndef __LP64__ + + virtual bool CreateCommandSetObjects ( void ); + virtual void FreeCommandSetObjects ( void ); + +#endif /* !__LP64__ */ + + virtual IOReturn VerifyDeviceState ( void ); + + +public: + + virtual IOReturn setAggressiveness ( unsigned long type, unsigned long minutes ); + + virtual IOReturn SyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn AsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + void * clientData ); + + virtual IOReturn EjectTheMedia ( void ); + virtual IOReturn GetTrayState ( UInt8 * trayState ); + virtual IOReturn SetTrayState ( UInt8 trayState ); + virtual IOReturn FormatMedia ( UInt64 byteCapacity ); + virtual UInt32 GetFormatCapacities ( UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + virtual IOReturn LockUnlockMedia ( bool doLock ); + virtual IOReturn SynchronizeCache ( void ); + virtual IOReturn ReportBlockSize ( UInt64 * blockSize ); + virtual IOReturn ReportEjectability ( bool * isEjectable ); + virtual IOReturn ReportLockability ( bool * isLockable ); + virtual IOReturn ReportPollRequirements ( bool * pollIsRequired, + bool * pollIsExpensive ); + virtual IOReturn ReportMaxReadTransfer ( UInt64 blockSize, + UInt64 * max ); + virtual IOReturn ReportMaxValidBlock ( UInt64 * maxBlock ); + virtual IOReturn ReportMaxWriteTransfer ( UInt64 blockSize, + UInt64 * max ); + virtual IOReturn ReportMediaState ( bool * mediaPresent, + bool * changed ); + virtual IOReturn ReportRemovability ( bool * isRemovable ); + virtual IOReturn ReportWriteProtection ( bool * isWriteProtected ); + + static void sPollForMedia ( void * pdtDriver, void * refCon ); + + /* CD Specific */ + virtual IOReturn SetMediaAccessSpeed ( UInt16 kilobytesPerSecond ); + + virtual IOReturn GetMediaAccessSpeed ( UInt16 * kilobytesPerSecond ); + + virtual IOReturn AsyncReadCD ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + CDSectorArea sectorArea, + CDSectorType sectorType, + void * clientData ); + + virtual IOReturn ReadISRC ( UInt8 track, CDISRC isrc ); + + virtual IOReturn ReadMCN ( CDMCN mcn); + + virtual IOReturn ReadTOC ( IOMemoryDescriptor * buffer ); + +#ifndef __LP64__ + + virtual IOReturn AudioPause ( bool pause ); + + virtual IOReturn AudioPlay ( CDMSF timeStart, CDMSF timeStop ); + + virtual IOReturn AudioScan ( CDMSF timeStart, bool reverse ); + + virtual IOReturn AudioStop ( void ); + + virtual IOReturn GetAudioStatus ( CDAudioStatus * status ); + + virtual IOReturn GetAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume ); + + virtual IOReturn SetAudioVolume ( UInt8 leftVolume, UInt8 rightVolume ); + +#endif /* !__LP64__ */ + + /* DVD Specific */ + virtual UInt32 GetMediaType ( void ); + + virtual IOReturn ReportKey ( IOMemoryDescriptor * buffer, + const DVDKeyClass keyClass, + const UInt32 lba, + const UInt8 agid, + const DVDKeyFormat keyFormat ); + + virtual IOReturn SendKey ( IOMemoryDescriptor * buffer, + const DVDKeyClass keyClass, + const UInt8 agid, + const DVDKeyFormat keyFormat ); + + virtual IOReturn ReadDVDStructure ( IOMemoryDescriptor * buffer, + const UInt32 length, + const UInt8 structureFormat, + const UInt32 logicalBlockAddress, + const UInt8 layer, + const UInt8 agid ); + + // The block size decoding for Read CD and Read CD MSF as defined in table 255 + bool GetBlockSize ( + UInt32 * requestedByteCount, + SCSICmdField3Bit EXPECTED_SECTOR_TYPE, + SCSICmdField1Bit SYNC, + SCSICmdField2Bit HEADER_CODES, + SCSICmdField1Bit USER_DATA, + SCSICmdField1Bit EDC_ECC, + SCSICmdField2Bit ERROR_FIELD, + SCSICmdField3Bit SUBCHANNEL_SELECTION_BITS ); + + SCSICmdField4Byte ConvertMSFToLBA ( SCSICmdField3Byte MSF ); + +#ifndef __LP64__ + + // Command methods to access all commands available to MMC based devices. + // The BLANK command as defined in section 6.1.1 + virtual bool BLANK ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField3Bit BLANKING_TYPE, + SCSICmdField4Byte START_ADDRESS_TRACK_NUMBER, + SCSICmdField1Byte CONTROL ); + + // The CLOSE TRACK/SESSION command as defined in section 6.1.2 + virtual bool CLOSE_TRACK_SESSION ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField1Bit SESSION, + SCSICmdField1Bit TRACK, + SCSICmdField2Byte TRACK_NUMBER, + SCSICmdField1Byte CONTROL ); + + // The FORMAT UNIT command as defined in section 6.1.3 + virtual bool FORMAT_UNIT ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + IOByteCount parameterListSize, + SCSICmdField1Bit FMT_DATA, + SCSICmdField1Bit CMP_LIST, + SCSICmdField3Bit FORMAT_CODE, + SCSICmdField2Byte INTERLEAVE_VALUE, + SCSICmdField1Byte CONTROL ); + +#endif /* !__LP64__ */ + + + // The GET CONFIGURATION command as defined in section 6.1.4 + virtual bool GET_CONFIGURATION ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Bit RT, + SCSICmdField2Byte STARTING_FEATURE_NUMBER, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The GET EVENT/STATUS NOTIFICATION command as defined in section 6.1.5 + virtual bool GET_EVENT_STATUS_NOTIFICATION ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit IMMED, + SCSICmdField1Byte NOTIFICATION_CLASS_REQUEST, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The GET PERFORMANCE command as defined in section 6.1.6 + virtual bool GET_PERFORMANCE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Bit TOLERANCE, + SCSICmdField1Bit WRITE, + SCSICmdField2Bit EXCEPT, + SCSICmdField4Byte STARTING_LBA, + SCSICmdField2Byte MAXIMUM_NUMBER_OF_DESCRIPTORS, + SCSICmdField1Byte CONTROL ); + + // The LOAD/UNLOAD MEDIUM command as defined in section 6.1.7 + virtual bool LOAD_UNLOAD_MEDIUM ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField1Bit LO_UNLO, + SCSICmdField1Bit START, + SCSICmdField1Byte SLOT, + SCSICmdField1Byte CONTROL ); + + // The MECHANISM STATUS command as defined in section 6.1.8 + virtual bool MECHANISM_STATUS ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + // The PAUSE/RESUME command as defined in section 6.1.9 + virtual bool PAUSE_RESUME ( + SCSITaskIdentifier request, + SCSICmdField1Bit RESUME, + SCSICmdField1Byte CONTROL ); + + // The PLAY AUDIO (10) command as defined in section 6.1.10 + virtual bool PLAY_AUDIO_10 ( + SCSITaskIdentifier request, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte STARTING_LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte PLAY_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The PLAY AUDIO (12) command as defined in section 6.1.11 + virtual bool PLAY_AUDIO_12 ( + SCSITaskIdentifier request, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte STARTING_LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte PLAY_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The PLAY AUDIO MSF command as defined in section 6.1.12 + virtual bool PLAY_AUDIO_MSF ( + SCSITaskIdentifier request, + SCSICmdField3Byte STARTING_MSF, + SCSICmdField3Byte ENDING_MSF, + SCSICmdField1Byte CONTROL ); + + /*********************** LEGACY COMMAND SUPPORT ***********************/ + // The PLAY CD command as defined in section 6.1.13 + virtual bool PLAY_CD ( + SCSITaskIdentifier request, + SCSICmdField3Bit EXPECTED_SECTOR_TYPE, + SCSICmdField1Bit CMSF, + SCSICmdField4Byte STARTING_LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte PLAY_LENGTH_IN_BLOCKS, + SCSICmdField1Bit SPEED, + SCSICmdField1Bit PORT2, + SCSICmdField1Bit PORT1, + SCSICmdField1Bit COMPOSITE, + SCSICmdField1Bit AUDIO, + SCSICmdField1Byte CONTROL ); + /*********************** END LEGACY COMMAND SUPPORT *******************/ + +#endif /* !__LP64__ */ + + virtual bool READ_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor *dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + /*********************** LEGACY COMMAND SUPPORT ***********************/ + // The READ BUFFER CAPACITY command as defined in section 6.1.14 + virtual bool READ_BUFFER_CAPACITY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + /*********************** END LEGACY COMMAND SUPPORT *******************/ + +#endif /* !__LP64__ */ + + // The READ CD command as defined in section 6.1.15 + virtual bool READ_CD ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Bit EXPECTED_SECTOR_TYPE, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte STARTING_LOGICAL_BLOCK_ADDRESS, + SCSICmdField3Byte TRANSFER_LENGTH, + SCSICmdField1Bit SYNC, + SCSICmdField2Bit HEADER_CODES, + SCSICmdField1Bit USER_DATA, + SCSICmdField1Bit EDC_ECC, + SCSICmdField2Bit ERROR_FIELD, + SCSICmdField3Bit SUBCHANNEL_SELECTION_BITS, + SCSICmdField1Byte CONTROL ); + + // The READ CD MSF command as defined in section 6.1.16 + virtual bool READ_CD_MSF ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Bit EXPECTED_SECTOR_TYPE, + SCSICmdField3Byte STARTING_MSF, + SCSICmdField3Byte ENDING_MSF, + SCSICmdField1Bit SYNC, + SCSICmdField2Bit HEADER_CODES, + SCSICmdField1Bit USER_DATA, + SCSICmdField1Bit EDC_ECC, + SCSICmdField2Bit ERROR_FIELD, + SCSICmdField3Bit SUBCHANNEL_SELECTION_BITS, + SCSICmdField1Byte CONTROL ); + + // The READ CAPACITY command as defined in section 6.1.17 + virtual bool READ_CAPACITY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Bit PMI, + SCSICmdField1Byte CONTROL ); + + // The READ DISC INFORMATION command as defined in section 6.1.18 + virtual bool READ_DISC_INFORMATION ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The READ DVD STRUCTURE command as defined in section 6.1.19 + virtual bool READ_DVD_STRUCTURE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Byte ADDRESS, + SCSICmdField1Byte LAYER_NUMBER, + SCSICmdField1Byte FORMAT, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField2Bit AGID, + SCSICmdField1Byte CONTROL ); + + // The READ FORMAT CAPACITIES command as defined in section 6.1.20 + virtual bool READ_FORMAT_CAPACITIES ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + /*********************** LEGACY COMMAND SUPPORT ***********************/ + // The READ HEADER command as defined in section 6.1.21 + virtual bool READ_HEADER ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit MSF, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + /*********************** END LEGACY COMMAND SUPPORT ***********************/ + + /*********************** LEGACY COMMAND SUPPORT ***********************/ + // The READ MASTER CUE command as defined in section 6.1.22 + virtual bool READ_MASTER_CUE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Byte SHEET_NUMBER, + SCSICmdField3Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + /*********************** END LEGACY COMMAND SUPPORT ***********************/ + +#endif /* !__LP64__ */ + + // The READ SUB-CHANNEL command as defined in section 6.1.23 + virtual bool READ_SUB_CHANNEL ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit MSF, + SCSICmdField1Bit SUBQ, + SCSICmdField1Byte SUB_CHANNEL_PARAMETER_LIST, + SCSICmdField1Byte TRACK_NUMBER, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The READ TOC/PMA/ATIP command as defined in section 6.1.24/25 + virtual bool READ_TOC_PMA_ATIP ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit MSF, + SCSICmdField4Bit FORMAT, + SCSICmdField1Byte TRACK_SESSION_NUMBER, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The READ TRACK INFORMATION command as defined in section 6.1.26 + virtual bool READ_TRACK_INFORMATION ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Bit ADDRESS_NUMBER_TYPE, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS_TRACK_SESSION_NUMBER, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + /*********************** LEGACY COMMAND SUPPORT ***********************/ + // The REPAIR TRACK command as defined in section 6.1.27 + virtual bool REPAIR_TRACK ( + SCSITaskIdentifier request, + SCSICmdField2Byte TRACK_NUMBER, + SCSICmdField1Byte CONTROL ); + /*********************** END LEGACY COMMAND SUPPORT ***********************/ + + // The REPORT KEY command as defined in section 6.1.28 + virtual bool REPORT_KEY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField2Bit AGID, + SCSICmdField6Bit KEY_FORMAT, + SCSICmdField1Byte CONTROL ); + + // The RESERVE TRACK command as defined in section 6.1.29 + virtual bool RESERVE_TRACK ( + SCSITaskIdentifier request, + SCSICmdField4Byte RESERVATION_SIZE, + SCSICmdField1Byte CONTROL ); + + // The SCAN command as defined in section 6.1.30 + virtual bool SCAN ( + SCSITaskIdentifier request, + SCSICmdField1Bit DIRECT, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte SCAN_STARTING_ADDRESS_FIELD, + SCSICmdField2Bit TYPE, + SCSICmdField1Byte CONTROL ); + + // The SEND CUE SHEET command as defined in section 6.1.31 + virtual bool SEND_CUE_SHEET ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Byte CUE_SHEET_SIZE, + SCSICmdField1Byte CONTROL ); + + // The SEND DVD STRUCTURE command as defined in section 6.1.32 + virtual bool SEND_DVD_STRUCTURE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Byte FORMAT, + SCSICmdField2Byte STRUCTURE_DATA_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The SEND EVENT command as defined in section 6.1.33 + virtual bool SEND_EVENT ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit IMMED, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The SEND KEY command as defined in section 6.1.34 + virtual bool SEND_KEY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField2Bit AGID, + SCSICmdField6Bit KEY_FORMAT, + SCSICmdField1Byte CONTROL ); + + // The SEND OPC INFORMATION command as defined in section 6.1.35 + virtual bool SEND_OPC_INFORMATION ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DO_OPC, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); +#endif /* !__LP64__ */ + + /*********************** LEGACY COMMAND SUPPORT ***********************/ + // The SET CD SPEED command as defined in section 6.1.36 + virtual bool SET_CD_SPEED ( + SCSITaskIdentifier request, + SCSICmdField2Byte LOGICAL_UNIT_READ_SPEED, + SCSICmdField2Byte LOGICAL_UNIT_WRITE_SPEED, + SCSICmdField1Byte CONTROL ); + /*********************** END LEGACY COMMAND SUPPORT ***********************/ + + // The SET READ AHEAD command as defined in section 6.1.37 + virtual bool SET_READ_AHEAD ( + SCSITaskIdentifier request, + SCSICmdField4Byte TRIGGER_LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte READ_AHEAD_LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Byte CONTROL ); + + // The SET STREAMING command as defined in section 6.1.38 + virtual bool SET_STREAMING ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool START_STOP_UNIT ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField4Bit POWER_CONDITIONS, + SCSICmdField1Bit LOEJ, + SCSICmdField1Bit START, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + // The STOP PLAY/SCAN command as defined in section 6.1.39 + virtual bool STOP_PLAY_SCAN ( + SCSITaskIdentifier request, + SCSICmdField1Byte CONTROL ); + +#endif /* !__LP64__ */ + + // The SYNCHRONIZE CACHE command as defined in section 6.1.40 + virtual bool SYNCHRONIZE_CACHE ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte NUMBER_OF_BLOCKS, + SCSICmdField1Byte CONTROL ); + + // The WRITE (10) command as defined in section 6.1.41 + virtual bool WRITE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The WRITE AND VERIFY (10) command as defined in section 6.1.42 + virtual bool WRITE_AND_VERIFY_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYT_CHK, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + /* Added with 10.1.3 */ + OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 1 ); + + virtual IOReturn ReadTOC ( IOMemoryDescriptor * buffer, + CDTOCFormat format, + UInt8 msf, + UInt32 trackSessionNumber, + UInt16 * actualByteCount ); + + /* Added with 10.1.3 */ + OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 2 ); + + virtual IOReturn ReadDiscInfo ( IOMemoryDescriptor * buffer, + UInt16 * actualByteCount ); + + /* Added with 10.1.3 */ + OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 3 ); + + virtual IOReturn ReadTrackInfo ( IOMemoryDescriptor * buffer, + UInt32 address, + CDTrackInfoAddressType addressType, + UInt16 * actualByteCount ); + + /* Added with 10.2 */ + OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 4 ); + + virtual IOReturn PowerDownHandler ( void * refCon, + UInt32 messageType, + IOService * provider, + void * messageArgument, + vm_size_t argSize ); + + /* Added with 10.3.3 */ + OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 5 ); + + +protected: + + + virtual void AsyncReadWriteCompletion ( SCSITaskIdentifier completedTask ); + + +public: + + + /* Added with 10.5 */ + OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 6 ); + + virtual IOReturn ReadDiscStructure ( IOMemoryDescriptor * buffer, + const UInt32 length, + const UInt8 structureFormat, + const UInt32 logicalBlockAddress, + const UInt8 layer, + const UInt8 agid, + const UInt8 mediaType ); + + + bool CheckForBDMediaType ( void ); + + + bool READ_DISC_STRUCTURE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Bit MEDIA_TYPE, + SCSICmdField4Byte ADDRESS, + SCSICmdField1Byte LAYER_NUMBER, + SCSICmdField1Byte FORMAT, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField2Bit AGID, + SCSICmdField1Byte CONTROL ); + + + OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 7 ); + + virtual IOReturn ReserveTrack ( UInt8 reservationType, + UInt8 reservationFormat, + UInt64 ReservationParameter ); + + + bool RESERVE_TRACK_V2 ( SCSITaskIdentifier request, + SCSICmdField1Bit RMZ, + SCSICmdField1Bit ARSV, + SCSICmdField7Byte RESERVATION_PARAMETER, + SCSICmdField1Byte CONTROL ); + + + bool REPORT_KEY_V2 ( SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Byte KEY_CLASS, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField2Bit AGID, + SCSICmdField6Bit KEY_FORMAT, + SCSICmdField1Byte CONTROL ); + + + bool SEND_KEY_V2 ( SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Byte KEY_CLASS, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField2Bit AGID, + SCSICmdField6Bit KEY_FORMAT, + SCSICmdField1Byte CONTROL ); + + +protected: + + + void SetPollingMode ( UInt32 newPollingMode ); + + +public: + + + /* 10.6.0 */ + + IOReturn RequestIdle ( void ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 8 ); + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 9 ); + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 10 ); + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 11 ); + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 12 ); + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 16 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_MULTIMEDIA_COMMANDS_DEVICE_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceNub.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceNub.h.svn-base new file mode 100644 index 0000000..f88a1e9 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceNub.h.svn-base @@ -0,0 +1,233 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_NUB_H_ +#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_NUB_H_ + + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + +// Probe score values +enum +{ + kPeripheralDeviceTypeNoMatch = 0, + kDefaultProbeRanking = 5000, + kFirstOrderRanking = 10000, + kSecondOrderRanking = 15000, + kThirdOrderRanking = 20000 +}; + + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// General IOKit headers +#include +#include +#include + +// SCSI Architecture Model Family includes +#include + + +// Forward definitions for internal use only classes. +class SCSIPrimaryCommands; + +//----------------------------------------------------------------------------- +// Class Declarations +//----------------------------------------------------------------------------- + +class IOSCSIPeripheralDeviceNub : public IOSCSIProtocolServices +{ + + OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceNub ) + +private: + + static bool sCompareIOProperty ( + IOService * object, + OSDictionary * table, + char * propertyKeyName, + bool * matches ); + + static void TaskCallback ( SCSITaskIdentifier completedTask ); + void TaskCompletion ( SCSITaskIdentifier completedTask ); + + static IOReturn sWaitForTask ( void * object, SCSITask * request ); + IOReturn GatedWaitForTask ( SCSITask * request ); + +protected: + + SCSIServiceResponse SendTask ( SCSITask * request ); + + bool InterrogateDevice ( void ); + + // Reserve space for future expansion. + struct IOSCSIPeripheralDeviceNubExpansionData { }; + IOSCSIPeripheralDeviceNubExpansionData * fIOSCSIPeripheralDeviceNubReserved; + + IOSCSIProtocolInterface * fProvider; +#ifndef __LP64__ + SCSIPrimaryCommands * fSCSIPrimaryCommandObject; +#endif + UInt8 fDefaultInquiryCount; + + virtual bool SendSCSICommand ( SCSITaskIdentifier request, + SCSIServiceResponse * serviceResponse, + SCSITaskStatus * taskStatus ); + + virtual SCSIServiceResponse AbortSCSICommand ( SCSITaskIdentifier request ); + + // The IsProtocolServiceSupported will return true if the specified + // feature is supported by the protocol layer. If the service has a value that must be + // returned, it will be returned in the serviceValue output parameter. + virtual bool IsProtocolServiceSupported ( SCSIProtocolFeature feature, void * serviceValue ); + + virtual bool HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void * serviceValue ); + + // We override this method in order to NOT do power management + virtual void InitializePowerManagement ( IOService * provider ); + +public: + + bool init ( OSDictionary * propTable ); + virtual bool start ( IOService * provider ); + virtual void free ( void ); + + virtual IOReturn message ( UInt32 type, IOService * nub, void * arg ); + + virtual bool matchPropertyTable ( OSDictionary * table, + SInt32 * score ); + + // The ExecuteCommand method will take a SCSITask object and transport + // it across the physical wires to the device + virtual void ExecuteCommand ( SCSITaskIdentifier request ); + + // The Task Management function to allow the SCSI Application Layer client to request + // that a specific task be aborted. + virtual SCSIServiceResponse AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ); + + // The Task Management function to allow the SCSI Application Layer client to request + // that a all tasks curerntly in the task set be aborted. + virtual SCSIServiceResponse AbortTaskSet ( UInt8 theLogicalUnit ); + + virtual SCSIServiceResponse ClearACA ( UInt8 theLogicalUnit ); + + virtual SCSIServiceResponse ClearTaskSet ( UInt8 theLogicalUnit ); + + virtual SCSIServiceResponse LogicalUnitReset ( UInt8 theLogicalUnit ); + + virtual SCSIServiceResponse TargetReset ( void ); + + // ************* Obsoleted Member Routine **************** + // The AbortCommand method is replaced by the AbortTask Management function and + // should no longer be called. + virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier abortTask ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 1 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 2 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 3 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 8 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 9 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 10 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 11 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 12 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 16 ); + +}; + + + +class IOSCSILogicalUnitNub : public IOSCSIPeripheralDeviceNub +{ + + OSDeclareDefaultStructors ( IOSCSILogicalUnitNub ) + +private: + + UInt8 fLogicalUnitNumber; + +protected: + + // Reserve space for future expansion. + struct IOSCSILogicalUnitNubExpansionData { }; + IOSCSILogicalUnitNubExpansionData * fIOSCSILogicalUnitNubReserved; + +public: + + virtual bool start ( IOService * provider ); + + virtual void SetLogicalUnitNumber ( UInt8 newLUN ); + + UInt8 GetLogicalUnitNumber ( void ); + + // The ExecuteCommand method will take a SCSITask object and transport + // it across the physical wires to the device + virtual void ExecuteCommand ( SCSITaskIdentifier request ); + + // The AbortCommand method will abort the indicated SCSI Task object, + // if it is possible and the SCSI Task has not already completed. + virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier abortTask ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 1 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 2 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 3 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 8 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 9 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 10 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 11 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 12 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 16 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_NUB_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType00.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType00.h.svn-base new file mode 100644 index 0000000..34fdb18 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType00.h.svn-base @@ -0,0 +1,102 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_OO_H_ +#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_OO_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// SCSI Architecture Model Family includes +#include + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIPeripheralDeviceType00 : public IOSCSIBlockCommandsDevice +{ + + OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceType00 ) + +protected: + + // Reserve space for future expansion. + struct IOSCSIPeripheralDeviceType00ExpansionData + { + OSSet * fClients; + }; + IOSCSIPeripheralDeviceType00ExpansionData * fIOSCSIPeripheralDeviceType00Reserved; + +public: + + bool init ( OSDictionary * propTable ); + virtual bool start ( IOService * provider ); + virtual void free ( void ); + + virtual bool handleOpen ( + IOService * client, + IOOptionBits options, + void * access ); + + virtual void handleClose ( + IOService * client, + IOOptionBits options ); + + virtual bool handleIsOpen ( const IOService * client ) const; + + virtual IOReturn newUserClient ( + task_t owningTask, + void * securityID, + UInt32 type, + OSDictionary * properties, + IOUserClient ** handler ); + virtual void CreateStorageServiceNub ( void ); + + virtual char * GetVendorString ( void ); + virtual char * GetProductString ( void ); + virtual char * GetRevisionString ( void ); + + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 1 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 2 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 3 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_OO_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType05.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType05.h.svn-base new file mode 100644 index 0000000..22066f0 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType05.h.svn-base @@ -0,0 +1,75 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_05_H_ +#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_05_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// SCSI Architecture Model Family includes +#include + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIPeripheralDeviceType05 : public IOSCSIMultimediaCommandsDevice +{ + + OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceType05 ) + +protected: + + // Reserve space for future expansion. + struct IOSCSIPeripheralDeviceType05ExpansionData { }; + IOSCSIPeripheralDeviceType05ExpansionData * fIOSCSIPeripheralDeviceType05Reserved; + +public: + + bool init ( OSDictionary * propTable ); + virtual bool start ( IOService * provider ); + virtual void stop ( IOService * provider ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 1 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 2 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 3 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_05_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType07.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType07.h.svn-base new file mode 100644 index 0000000..661136d --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType07.h.svn-base @@ -0,0 +1,75 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_07_H_ +#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_07_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// SCSI Architecture Model Family includes +#include + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIPeripheralDeviceType07 : public IOSCSIBlockCommandsDevice +{ + + OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceType07 ) + +protected: + + // Reserve space for future expansion. + struct IOSCSIPeripheralDeviceType07ExpansionData { }; + IOSCSIPeripheralDeviceType07ExpansionData * fIOSCSIPeripheralDeviceType07Reserved; + +public: + + bool init ( OSDictionary * propTable ); + virtual bool start ( IOService * provider ); + virtual void stop ( IOService * provider ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 1 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 2 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 3 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_07_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType0E.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType0E.h.svn-base new file mode 100644 index 0000000..cc9ec06 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType0E.h.svn-base @@ -0,0 +1,77 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_0E_H_ +#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_0E_H_ + +#if defined(KERNEL) && defined(__cplusplus) + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// General IOKit headers +#include + +// SCSI Architecture Model Family includes +#include + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIPeripheralDeviceType0E : public IOSCSIReducedBlockCommandsDevice +{ + + OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceType0E ) + +protected: + + // Reserve space for future expansion. + struct IOSCSIPeripheralDeviceType0EExpansionData { }; + IOSCSIPeripheralDeviceType0EExpansionData * fIOSCSIPeripheralDeviceType0EReserved; + +public: + + bool init ( OSDictionary * propTable ); + virtual bool start ( IOService * provider ); + virtual void stop ( IOService * provider ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 1 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 2 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 3 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_0E_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPrimaryCommandsDevice.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPrimaryCommandsDevice.h.svn-base new file mode 100644 index 0000000..ba0f1a0 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPrimaryCommandsDevice.h.svn-base @@ -0,0 +1,805 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_SCSI_PRIMARY_COMMANDS_DEVICE_H_ +#define _IOKIT_IO_SCSI_PRIMARY_COMMANDS_DEVICE_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// General IOKit headers +#include +#include +#include +#include +#include + +// SCSI Architecture Model Family includes +#include +#include +#include +#include + + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + +// Notification messages +enum +{ + kSCSIServicesNotification_Suspend = 0x69000080, + kSCSIServicesNotification_Resume = 0x69000090 +}; + + +// Timeout values +enum +{ + kOneSecondTimeoutInMS = 1000, + kTenSecondTimeoutInMS = 10 * kOneSecondTimeoutInMS, + kThirtySecondTimeoutInMS = 30 * kOneSecondTimeoutInMS, + kFortyFiveSecondTimeoutInMS = 45 * kOneSecondTimeoutInMS +}; + +// Mode page values for page control field +enum +{ + kModePageControlCurrentValues = 0x00, + kModePageControlChangeableValues = 0x01, + kModePageControlDefaultValues = 0x02, + kModePageControlSavedValues = 0x03 +}; + +// The command should be tried 5 times. The original attempt +// plus 4 retries. +#define kDefaultRetryCount 4 + +// Forward declarations for internal use only classes +class SCSIPrimaryCommands; + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIPrimaryCommandsDevice : public IOSCSIProtocolInterface +{ + + OSDeclareAbstractStructors ( IOSCSIPrimaryCommandsDevice ) + +private: + +#ifndef __LP64__ + SCSIPrimaryCommands * fSCSIPrimaryCommandObject; +#endif + + IOSCSIProtocolInterface * fProtocolDriver; + + // The fProtocolAccessEnabled member variable indicates whether + // requests coming from the client can be sent to the device. + // This will be set to true after the Protocol Service driver is successfully + // opened and before the call to InitializeDeviceSupport and set to false before + // TerminateDeviceSupport is called. + bool fProtocolAccessEnabled; + + // The fDeviceAccessEnabled member variable indicates whether + // requests coming from the client can be sent to the device. + // This will be set to true after InitializeDeviceSupport is called and + // set to false before StopDeviceSupport is called. + bool fDeviceAccessEnabled; + bool fDeviceAccessSuspended; + + static bool ServerKeyswitchCallback ( void * target, + void * refCon, + IOService * newService ); + + static void TaskCallback ( SCSITaskIdentifier completedTask ); + void TaskCompletion ( SCSITaskIdentifier completedTask ); + + static IOReturn sWaitForTask ( void * object, SCSITaskIdentifier request ); + IOReturn GatedWaitForTask ( SCSITaskIdentifier request ); + +protected: + + // Reserve space for future expansion. + struct IOSCSIPrimaryCommandsDeviceExpansionData + { + IONotifier * fKeySwitchNotifier; + UInt8 fANSIVersion; + UInt32 fReadTimeoutDuration; + UInt32 fWriteTimeoutDuration; + bool fCMDQUE; + SCSITaggedTaskIdentifier fTaskID; + IOSimpleLock * fTaskIDLock; + UInt32 fRetryCount; + }; + IOSCSIPrimaryCommandsDeviceExpansionData * fIOSCSIPrimaryCommandsDeviceReserved; + + #define fReadTimeoutDuration fIOSCSIPrimaryCommandsDeviceReserved->fReadTimeoutDuration + #define fWriteTimeoutDuration fIOSCSIPrimaryCommandsDeviceReserved->fWriteTimeoutDuration + #define fRetryCount fIOSCSIPrimaryCommandsDeviceReserved->fRetryCount + + + UInt8 fDefaultInquiryCount; + OSDictionary * fDeviceCharacteristicsDictionary; + UInt32 fNumCommandsOutstanding; + + virtual void free ( void ); + void SetANSIVersion ( UInt8 ); + void SetCMDQUE ( bool value ); + IOReturn GetModeSense ( + IOMemoryDescriptor * dataBuffer, + SCSICmdField6Bit PAGE_CODE, + SCSICmdField2Byte ALLOCATION_LENGTH, + bool * use10ByteModeSense ); + bool RetrieveINQUIRYData ( + UInt8 EVPD, + UInt8 inquiryPage, + UInt8 * inquiryBuffer, + UInt16 * dataSize ); + + // This flag is set if the device responds to a MODE_SENSE_10 command + // with the page code set to 0x1A (Power Conditions Mode Page) + bool fDeviceSupportsPowerConditions; + + // This method will retreive the SCSI Primary Command Set object for + // the class. For subclasses, this will be overridden using a + // dynamic cast on the base command set object of the subclass. + +#ifndef __LP64__ + + // ------ DEPRECATED API ---------- + // This should no longer be called by subclasses as the command builder + // objects will be removed in a later release. + virtual SCSIPrimaryCommands * GetSCSIPrimaryCommandObject ( void ); + + // This method is called by the start method to create all the command + // objects needed by the class. For subclasses, this will be overridden + // to create its needed command set objects. + virtual bool CreateCommandSetObjects ( void ); + + // This method is called by the free method to free all the command + // objects needed by the class. For subclasses, this will be overridden + // to free its needed command set objects. + virtual void FreeCommandSetObjects ( void ); + +#endif + + + // This method is called by the start method to obtain information from + // the device with regards to whether it supports the power conditions mode page. + virtual void CheckPowerConditionsModePage ( void ); + + // This will return back the Protocol driver that is used to + // send service requests to the device. + virtual IOSCSIProtocolInterface * GetProtocolDriver ( void ); + + // This will get a new SCSITask for the caller + virtual SCSITaskIdentifier GetSCSITask ( void ); + + // This will release a SCSITask (eventually return it to a pool) + virtual void ReleaseSCSITask ( SCSITaskIdentifier request ); + + // This will return a unique value for the tagged task identifier + SCSITaggedTaskIdentifier GetUniqueTagID ( void ); + + // Call for executing the command synchronously + SCSIServiceResponse SendCommand ( + SCSITaskIdentifier request, + UInt32 timeoutDuration ); + + // Call for executing the command asycnchronously + void SendCommand ( + SCSITaskIdentifier request, + UInt32 timeoutDuration, + SCSITaskCompletion taskCompletion ); + + + virtual bool InitializeDeviceSupport ( void ) = 0; + virtual void StartDeviceSupport ( void ) = 0; + virtual void SuspendDeviceSupport ( void ) = 0; + virtual void ResumeDeviceSupport ( void ) = 0; + virtual void StopDeviceSupport ( void ) = 0; + virtual void TerminateDeviceSupport ( void ) = 0; + virtual UInt32 GetNumberOfPowerStateTransitions ( void ) = 0; + + virtual IOReturn VerifyDeviceState ( void ); + // Called to clear any power-on/reset status in the drive + virtual bool ClearPowerOnReset ( void ); + virtual bool ClearNotReadyStatus ( void ) = 0; + + bool IsProtocolAccessEnabled ( void ); + bool IsDeviceAccessEnabled ( void ); + bool IsDeviceAccessSuspended ( void ); + + // Accessors for saving and retrieving data from an SCSITask object. + bool ResetForNewTask( + SCSITaskIdentifier request ); + bool SetTaskAttribute ( + SCSITaskIdentifier request, + SCSITaskAttribute newAttribute ); + SCSITaskAttribute GetTaskAttribute ( + SCSITaskIdentifier request ); + bool SetTaggedTaskIdentifier ( + SCSITaskIdentifier request, + SCSITaggedTaskIdentifier taggedTaskIdentifier ); + SCSITaggedTaskIdentifier GetTaggedTaskIdentifier ( + SCSITaskIdentifier request ); + bool SetTaskState ( + SCSITaskIdentifier request, + SCSITaskState newTaskState ); + SCSITaskState GetTaskState ( + SCSITaskIdentifier request ); + bool SetTaskStatus ( + SCSITaskIdentifier request, + SCSITaskStatus newStatus ); + SCSITaskStatus GetTaskStatus ( + SCSITaskIdentifier request ); + bool SetCommandDescriptorBlock ( + SCSITaskIdentifier request, + UInt8 cdbByte0, + UInt8 cdbByte1, + UInt8 cdbByte2, + UInt8 cdbByte3, + UInt8 cdbByte4, + UInt8 cdbByte5 ); + + // Populate the 10 Byte Command Descriptor Block + bool SetCommandDescriptorBlock ( + SCSITaskIdentifier request, + UInt8 cdbByte0, + UInt8 cdbByte1, + UInt8 cdbByte2, + UInt8 cdbByte3, + UInt8 cdbByte4, + UInt8 cdbByte5, + UInt8 cdbByte6, + UInt8 cdbByte7, + UInt8 cdbByte8, + UInt8 cdbByte9 ); + + // Populate the 12 Byte Command Descriptor Block + bool SetCommandDescriptorBlock ( + SCSITaskIdentifier request, + UInt8 cdbByte0, + UInt8 cdbByte1, + UInt8 cdbByte2, + UInt8 cdbByte3, + UInt8 cdbByte4, + UInt8 cdbByte5, + UInt8 cdbByte6, + UInt8 cdbByte7, + UInt8 cdbByte8, + UInt8 cdbByte9, + UInt8 cdbByte10, + UInt8 cdbByte11 ); + + // Populate the 16 Byte Command Descriptor Block + bool SetCommandDescriptorBlock ( + SCSITaskIdentifier request, + UInt8 cdbByte0, + UInt8 cdbByte1, + UInt8 cdbByte2, + UInt8 cdbByte3, + UInt8 cdbByte4, + UInt8 cdbByte5, + UInt8 cdbByte6, + UInt8 cdbByte7, + UInt8 cdbByte8, + UInt8 cdbByte9, + UInt8 cdbByte10, + UInt8 cdbByte11, + UInt8 cdbByte12, + UInt8 cdbByte13, + UInt8 cdbByte14, + UInt8 cdbByte15 ); + + bool SetDataTransferDirection ( + SCSITaskIdentifier request, + UInt8 newDirection ); + UInt8 GetDataTransferDirection ( + SCSITaskIdentifier request ); + bool SetRequestedDataTransferCount ( + SCSITaskIdentifier request, + UInt64 newRequestedCount ); + UInt64 GetRequestedDataTransferCount ( + SCSITaskIdentifier request ); + bool SetRealizedDataTransferCount ( + SCSITaskIdentifier request, + UInt64 newRealizedDataCount ); + UInt64 GetRealizedDataTransferCount ( + SCSITaskIdentifier request ); + bool SetDataBuffer ( + SCSITaskIdentifier request, + IOMemoryDescriptor * newBuffer ); + IOMemoryDescriptor * GetDataBuffer ( + SCSITaskIdentifier request ); + bool SetTimeoutDuration ( + SCSITaskIdentifier request, + UInt32 newTimeout ); + UInt32 GetTimeoutDuration ( + SCSITaskIdentifier request ); + bool SetTaskCompletionCallback ( + SCSITaskIdentifier request, + SCSITaskCompletion newCallback ); + void TaskCompletedNotification ( + SCSITaskIdentifier request ); + + bool SetServiceResponse ( + SCSITaskIdentifier request, + SCSIServiceResponse serviceResponse ); + SCSIServiceResponse GetServiceResponse ( + SCSITaskIdentifier request ); + bool SetAutosenseCommand ( + SCSITaskIdentifier request, + UInt8 cdbByte0, + UInt8 cdbByte1, + UInt8 cdbByte2, + UInt8 cdbByte3, + UInt8 cdbByte4, + UInt8 cdbByte5 ); + bool GetAutoSenseData ( + SCSITaskIdentifier request, + SCSI_Sense_Data * senseData ); // DEPRECATED, use below function instead + bool GetAutoSenseData ( + SCSITaskIdentifier request, + SCSI_Sense_Data * senseData, + UInt8 senseDataSize ); + UInt8 GetAutoSenseDataSize ( + SCSITaskIdentifier request ); + + bool SetApplicationLayerReference ( + SCSITaskIdentifier request, + void * newReferenceValue ); + void * GetApplicationLayerReference ( + SCSITaskIdentifier request ); + + void IncrementOutstandingCommandsCount ( void ); + static void sIncrementOutstandingCommandsCount ( + IOSCSIPrimaryCommandsDevice * self ); + virtual void HandleIncrementOutstandingCommandsCount ( void ); + + + // This static member routine provides a mechanism for retrieving a pointer to + // the object that is claimed as the owner of the specified SCSITask. + static OSObject * sGetOwnerForTask ( SCSITaskIdentifier request ); + +public: + + bool init ( OSDictionary * propTable ); + virtual bool start ( IOService * provider ); + virtual void stop ( IOService * provider ); + virtual IOReturn message ( UInt32 type, IOService * nub, void * arg ); + + // The setAgressiveness method is called by the power manager + // to notify us of certain power management settings. We override + // this method in order to catch the kPMMinutesToSpinDown message + // in order to set our idle timer. + virtual IOReturn setAggressiveness ( unsigned long type, unsigned long minutes ); + + // Methods for getting device information strings + virtual char * GetVendorString ( void ); + virtual char * GetProductString ( void ); + virtual char * GetRevisionString ( void ); + OSDictionary * GetProtocolCharacteristicsDictionary ( void ); + OSDictionary * GetDeviceCharacteristicsDictionary ( void ); + UInt8 GetANSIVersion ( void ); + bool GetCMDQUE ( void ); + OSString * MapINQUIRYDataToIconFile ( void ); + UInt32 GetRetryCount ( void ); + + // -- SCSI Protocol Interface Methods -- + // The ExecuteCommand method will take a SCSI Task and transport + // it across the physical wire(s) to the device + virtual void ExecuteCommand ( SCSITaskIdentifier request ); + + // The Task Management function to allow the SCSI Application Layer client to request + // that a specific task be aborted. + SCSIServiceResponse AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ); + + // The Task Management function to allow the SCSI Application Layer client to request + // that a all tasks curerntly in the task set be aborted. + SCSIServiceResponse AbortTaskSet ( UInt8 theLogicalUnit ); + + SCSIServiceResponse ClearACA ( UInt8 theLogicalUnit ); + + SCSIServiceResponse ClearTaskSet ( UInt8 theLogicalUnit ); + + SCSIServiceResponse LogicalUnitReset ( UInt8 theLogicalUnit ); + + SCSIServiceResponse TargetReset ( void ); + + // The AbortCommand method will abort the indicated SCSI Task, + // if it is possible and the task has not already completed. + virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier request ); + + // The IsProtocolServiceSupported will return true if the specified + // feature is supported by the protocol layer. If the service has a value that must be + // returned, it will be returned in the serviceValue output parameter. + virtual bool IsProtocolServiceSupported ( + SCSIProtocolFeature feature, + void * serviceValue ); + + // The HandleProtocolServiceFeature will return true if the specified feature could + // be handled properly by the protocol layer. + virtual bool HandleProtocolServiceFeature ( + SCSIProtocolFeature feature, + void * serviceValue ); + + // Utility methods for use by all peripheral device objects. + + // isParameterValid are used to validate that the parameter passed into + // the command methods are of the correct value. + + // Validate Parameter used for 1 bit to 1 byte paramaters + bool IsParameterValid ( + SCSICmdField1Byte param, + SCSICmdField1Byte mask ); + + // Validate Parameter used for 9 bit to 2 byte paramaters + bool IsParameterValid ( + SCSICmdField2Byte param, + SCSICmdField2Byte mask ); + + // Validate Parameter used for 17 bit to 4 byte paramaters + bool IsParameterValid ( + SCSICmdField4Byte param, + SCSICmdField4Byte mask ); + + // Validate Parameter used for 33 bit to 8 byte paramaters + bool IsParameterValid ( + SCSICmdField8Byte param, + SCSICmdField8Byte mask ); + + + bool IsMemoryDescriptorValid ( + IOMemoryDescriptor * dataBuffer ); + + bool IsMemoryDescriptorValid ( + IOMemoryDescriptor * dataBuffer, + UInt64 requiredSize ); + +#ifndef __LP64__ + + // SCSI Primary command implementations + virtual bool CHANGE_DEFINITION ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit SAVE, + SCSICmdField7Bit DEFINITION_PARAMETER, + SCSICmdField1Byte PARAMETER_DATA_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool COMPARE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PAD, + SCSICmdField3Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool COPY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PAD, + SCSICmdField3Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool COPY_AND_VERIFY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit BYTCHK, + SCSICmdField1Bit PAD, + SCSICmdField3Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool EXTENDED_COPY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + +#endif /* !__LP64__ */ + + virtual bool INQUIRY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit CMDDT, + SCSICmdField1Bit EVPD, + SCSICmdField1Byte PAGE_OR_OPERATION_CODE, + SCSICmdField1Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool LOG_SELECT ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PCR, + SCSICmdField1Bit SP, + SCSICmdField2Bit PC, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool LOG_SENSE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PPC, + SCSICmdField1Bit SP, + SCSICmdField2Bit PC, + SCSICmdField6Bit PAGE_CODE, + SCSICmdField2Byte PARAMETER_POINTER, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool MODE_SELECT_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PF, + SCSICmdField1Bit SP, + SCSICmdField1Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool MODE_SELECT_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PF, + SCSICmdField1Bit SP, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool MODE_SENSE_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DBD, + SCSICmdField2Bit PC, + SCSICmdField6Bit PAGE_CODE, + SCSICmdField1Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool MODE_SENSE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit LLBAA, + SCSICmdField1Bit DBD, + SCSICmdField2Bit PC, + SCSICmdField6Bit PAGE_CODE, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool PERSISTENT_RESERVE_IN ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField5Bit SERVICE_ACTION, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool PERSISTENT_RESERVE_OUT ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField5Bit SERVICE_ACTION, + SCSICmdField4Bit SCOPE, + SCSICmdField4Bit TYPE, + SCSICmdField1Byte CONTROL ); + + virtual bool PREVENT_ALLOW_MEDIUM_REMOVAL ( + SCSITaskIdentifier request, + SCSICmdField2Bit PREVENT, + SCSICmdField1Byte CONTROL ); + + virtual bool READ_BUFFER ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Bit MODE, + SCSICmdField1Byte BUFFER_ID, + SCSICmdField3Byte BUFFER_OFFSET, + SCSICmdField3Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool RECEIVE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool RECEIVE_DIAGNOSTICS_RESULTS ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PCV, + SCSICmdField1Byte PAGE_CODE, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool RELEASE_6 ( + SCSITaskIdentifier request, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + virtual bool RELEASE_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit EXTENT, + SCSICmdField1Byte RESERVATION_IDENTIFICATION, + SCSICmdField1Byte CONTROL ); + +#endif /* !__LP64__ */ + + virtual bool RELEASE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit THRDPTY, + SCSICmdField1Bit LONGID, + SCSICmdField1Byte THIRD_PARTY_DEVICE_ID, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + virtual bool RELEASE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit THRDPTY, + SCSICmdField1Bit LONGID, + SCSICmdField1Bit EXTENT, + SCSICmdField1Byte RESERVATION_IDENTIFICATION, + SCSICmdField1Byte THIRD_PARTY_DEVICE_ID, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + +#endif /* !__LP64__ */ + + virtual bool REPORT_DEVICE_IDENTIFIER ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool REPORT_LUNS ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool REQUEST_SENSE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool RESERVE_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + virtual bool RESERVE_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit EXTENT, + SCSICmdField1Byte RESERVATION_IDENTIFICATION, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + +#endif /* !__LP64__ */ + + virtual bool RESERVE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit THRDPTY, + SCSICmdField1Bit LONGID, + SCSICmdField1Byte THIRD_PARTY_DEVICE_ID, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + virtual bool RESERVE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit THRDPTY, + SCSICmdField1Bit LONGID, + SCSICmdField1Bit EXTENT, + SCSICmdField1Byte RESERVATION_IDENTIFICATION, + SCSICmdField1Byte THIRD_PARTY_DEVICE_ID, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + +#endif /* !__LP64__ */ + + virtual bool SEND ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit AER, + SCSICmdField3Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool SEND_DIAGNOSTICS ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Bit SELF_TEST_CODE, + SCSICmdField1Bit PF, + SCSICmdField1Bit SELF_TEST, + SCSICmdField1Bit DEVOFFL, + SCSICmdField1Bit UNITOFFL, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool SET_DEVICE_IDENTIFIER ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField5Bit SERVICE_ACTION, + SCSICmdField4Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool TEST_UNIT_READY ( + SCSITaskIdentifier request, + SCSICmdField1Byte CONTROL ); + + virtual bool WRITE_BUFFER ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Bit MODE, + SCSICmdField1Byte BUFFER_ID, + SCSICmdField3Byte BUFFER_OFFSET, + SCSICmdField3Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The SPC-3 INQUIRY command as defined in section 6.4.1 of SPC-3. + bool INQUIRY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit EVPD, + SCSICmdField1Byte PAGE_CODE, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 1 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 2 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 3 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 8 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 9 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 10 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 11 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 12 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 16 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_PRIMARY_COMMANDS_DEVICE_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIProtocolInterface.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIProtocolInterface.h.svn-base new file mode 100644 index 0000000..bb74ce4 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIProtocolInterface.h.svn-base @@ -0,0 +1,854 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IO_SCSI_PROTOCOL_INTERFACE_H_ +#define _IOKIT_IO_SCSI_PROTOCOL_INTERFACE_H_ + + +/*! @header SCSI Protocol Interface + @discussion + This file contains definitions for the IOSCSIProtocolInterface class, + SCSI Protocol Features used by this interface, and additional constants + used by this interface. +*/ + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +#include + + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + +/* +SCSI Device Characteristics - Defined between SCSI Application Layer and + SCSI Protocol Layer only. +*/ + +/*! +@constant kIOPropertySCSIDeviceCharacteristicsKey +@discussion +This key is used to define SCSI Device Characteristics for a particular device. +It is the key for the dictionary containing the keys of characteristics. These keys +are only defined between the SCSI Protocol Layer and the SCSI Applicaiton Layer. Some +properties may be copied from this dictionary to the more generic Device Characteristics +or Protocol Characteristics dictionaries. +*/ +#define kIOPropertySCSIDeviceCharacteristicsKey "SCSI Device Characteristics" + +/*! +@constant kIOPropertySCSIInquiryLengthKey +@discussion +This key is used to define a default INQUIRY length to issue to the device. The +value is a UInt32 corresponding to the number of bytes to request in the INQUIRY +command. +*/ +#define kIOPropertySCSIInquiryLengthKey "Inquiry Length" + +/*! +@constant kIOPropertySCSIManualEjectKey +@discussion +This key is used to indicate that the device is known to be a manual ejectable media +device. This property overrides all of the driver checks for determining this capability. +This property is a string, although if it exists it should always be true. +*/ +#define kIOPropertySCSIManualEjectKey "Manual Eject" + +/*! +@constant kIOPropertyReadTimeOutDurationKey +@discussion +This key is used to define the Read Time Out for a particular device. +This property overrides all of the protocol defaults. +This property is a value, in milliseconds. +*/ +#define kIOPropertyReadTimeOutDurationKey "Read Time Out Duration" + +/*! +@constant kIOPropertyWriteTimeOutDurationKey +@discussion +This key is used to define the Write Time Out for a particular device. +This property overrides all of the protocol defaults. +This property is a value, in milliseconds. +*/ +#define kIOPropertyWriteTimeOutDurationKey "Write Time Out Duration" + +/*! +@constant kIOPropertyRetryCountKey +@discussion +This key is used to define the number of Read/Write retries for a particular device. +This property overrides all of the protocol defaults. +The value is a UInt32 corresponding to the number of retries. +*/ +#define kIOPropertyRetryCountKey "Retry Count" + +/*! + @constant kIOPropertyAutonomousSpinDownKey + @discussion + This key is used to indicate that the device is known to have its own internal logic + for idle disk spin down. This key is used to mark device which respon poorly to our + efforts to manually spin down or spin up the device when it is already in the desired + state. + */ +#define kIOPropertyAutonomousSpinDownKey "Autonomous Spin Down" + +/*! + @constant kIOPropertyEjectRequireStartStopUnitKey + @discussion + This key is used to indicate that while the device may have failed PREVENT_ALLOW_MEDIUM + REMOVAL it still requires a START_STOP_UNIT to eject/unload media. + */ +#define kIOPropertyEjectRequireStartStopUnitKey "Eject Requires START_STOP_UNIT" + +#if defined(KERNEL) && defined(__cplusplus) + + +/*! +@constant kCFBundleIdentifierKey +@discussion +Property key for CFBundleIdentifier. +*/ +#define kCFBundleIdentifierKey "CFBundleIdentifier" + +/*! +@constant kIOSCSIArchitectureBundleIdentifierKey +@discussion +IOSCSIArchitectureModelFamily's CFBundle identifier. +*/ +#define kIOSCSIArchitectureBundleIdentifierKey "com.apple.iokit.IOSCSIArchitectureModelFamily" + + +// General kernel headers +#include + +// General IOKit headers +#include +#include +#include +#include + +// SCSI Architecture Model Family includes +#include + + +/*! +@enum SCSI Protocol Interface Device Notification values +@discussion +Message values for SCSI Protocol Interface Device Notifications. +@constant kSCSIProtocolNotification_DeviceRemoved +Private message sent between a SCSI protocol service provider and +SCSI application layer driver to indicate device removal. +@constant kSCSIProtocolNotification_VerifyDeviceState +Private message sent between a SCSI protocol service provider and +SCSI application layer driver to indicate device state may have +changed and the device state should be re-verified by the SCSI +Application Layer driver. An example would be a bus reset which clears +the tray locking state of an ATAPI device. +@constant kSCSIServicesNotification_ExclusivityChanged +Message sent when a change in exclusivity state occurs. Usually in +response to acquiring/releasing exclusive access to a device via a user client. +*/ +enum +{ + kSCSIProtocolNotification_DeviceRemoved = 0x69000010, + kSCSIProtocolNotification_VerifyDeviceState = 0x69000020, + kSCSIServicesNotification_ExclusivityChanged = 0x69000030 +}; + + +/*! +@typedef SCSIProtocolFeature +@discussion +Typedef for SCSIProtocolFeature, a 32-bit quantity. +*/ +typedef UInt32 SCSIProtocolFeature; + +/*! +@enum SCSI Protocol Features +@discussion +The list of SCSI Protocol Features currently supported. +*/ +enum +{ + + /*! + @constant kSCSIProtocolFeature_ACA Not yet used. + */ + kSCSIProtocolFeature_ACA = 1, + + /*! + @constant kSCSIProtocolFeature_CPUInDiskMode Used to determine + if the SCSI Protocol Services Driver supports a CPU which is in + target disk mode. + */ + kSCSIProtocolFeature_CPUInDiskMode = 2, + + /*! + @constant kSCSIProtocolFeature_ProtocolSpecificPolling Used + to determine if the SCSI Protocol Services Driver supports + protocol specific polling for media. This is used for low-power + polling specifically for ATAPI devices on ATA buses + */ + kSCSIProtocolFeature_ProtocolSpecificPolling = 3, + + /*! + @constant kSCSIProtocolFeature_ProtocolSpecificSleepCommand Used + to determine if the SCSI Protocol Services Driver supports + protocol specific sleep commands to a drive. This is used for + sleeping drives specifically ATAPI devices on ATA buses. + */ + kSCSIProtocolFeature_ProtocolSpecificSleepCommand = 4, + + /*! + @constant kSCSIProtocolFeature_GetMaximumLogicalUnitNumber If + the SCSI Protocol Services Driver supports logical units, it will + report the maximum addressable ID that it supports in the UInt32 pointer + that is passed in as the serviceValue. If only one unit is supported, + the driver should return false for this query. + */ + kSCSIProtocolFeature_GetMaximumLogicalUnitNumber = 5, + + /*! + @constant kSCSIProtocolFeature_MaximumReadBlockTransferCount If + the SCSI Protocol Services Driver has a maximum number of + blocks that can be transfered in a read request, it will return + true to this query and return the block count in the UInt32 pointer + that is passed in as the serviceValue. + */ + kSCSIProtocolFeature_MaximumReadBlockTransferCount = 6, + + /*! + @constant kSCSIProtocolFeature_MaximumWriteBlockTransferCount If + the SCSI Protocol Services Driver has a maximum number of + blocks that can be transferred in a write request, it will return + true to this query and return the block count in the UInt32 pointer + that is passed in as the serviceValue. + */ + kSCSIProtocolFeature_MaximumWriteBlockTransferCount = 7, + + /*! + @constant kSCSIProtocolFeature_MaximumReadTransferByteCount If + the SCSI Protocol Services Driver has a maximum byte count + that can be transferred in a read request, it will return + true to this query and return the byte count in the UInt64 pointer + that is passed in as the serviceValue. + */ + kSCSIProtocolFeature_MaximumReadTransferByteCount = 8, + + /*! + @constant kSCSIProtocolFeature_MaximumWriteTransferByteCount If + the SCSI Protocol Services Driver has a maximum byte count + that can be transferred in a write request, it will return + true to this query and return the byte count in the UInt64 pointer + that is passed in as the serviceValue. + */ + kSCSIProtocolFeature_MaximumWriteTransferByteCount = 9, + + /*! + @constant kSCSIProtocolFeature_SubmitDefaultInquiryData If + the SCSI Protocol Services Driver needs any extra information to + make any negotiation settings from the standard INQUIRY data, this + will be called to set that appropriately. The serviceValue will + point to a SCSICmd_INQUIRY_StandardData buffer. The size + of the buffer depends on the SCSI Device Characteristics + dictionary for the device or bus. If there is no + kIOPropertySCSIInquiryLengthKey value set in the dictionary + or if it doesn't exist, then the size of the data will be + the size of the full amount of Inquiry retrieved from the device. + */ + kSCSIProtocolFeature_SubmitDefaultInquiryData = 10, + + /*! + @constant kSCSIProtocolFeature_ProtocolAlwaysReportsAutosenseData If + the SCSI Protocol Services Driver always reports available + autosense data when a kSCSITaskStatus_CHECK_CONDITION is set, + then the protocol layer should return true. E.g. FireWire + transport drivers should respond true to this. + */ + kSCSIProtocolFeature_ProtocolAlwaysReportsAutosenseData = 11, + + /*! + @constant kSCSIProtocolFeature_ProtocolSpecificPowerOff If + the SCSI Protocol Services Driver supports removing the power + to the drive, then the protocol layer should return true. This is + used for aggressive power management, specifically for ATAPI + devices on ATA buses. + */ + kSCSIProtocolFeature_ProtocolSpecificPowerOff = 12, + + /*! + @constant kSCSIProtocolFeature_ProtocolSpecificPowerControl + Used to determine if the SCSI Protocol Services Driver supports + switching the power to the drive on and off. This is used for aggressive + power management, specifically for SATAPI devices on AHCI buses. + */ + kSCSIProtocolFeature_ProtocolSpecificPowerControl = 13, + + /*! + @constant kSCSIProtocolFeature_ProtocolSpecificAsyncNotification + Used to determine if the SCSI Protocol Services Driver supports + asynchronous notifications from the drive. This is used to prevent + polling for media, specifically for SATAPI devices on AHCI buses. + */ + kSCSIProtocolFeature_ProtocolSpecificAsyncNotification = 14 + +}; + + +/*! +@typedef SCSIProtocolPowerState +@discussion +Typedef for SCSIProtocolPowerState, a 32-bit quantity. +*/ +typedef UInt32 SCSIProtocolPowerState; + +/*! +@enum SCSI Protocol Power States +@discussion +The list of SCSI Protocol Power States. +*/ +enum +{ + /*! + @constant kSCSIProtocolPowerStateOff + Off power state. + */ + kSCSIProtocolPowerStateOff = 0, + + /*! + @constant kSCSIProtocolPowerStateOn + On power state. + */ + kSCSIProtocolPowerStateOn = 1 +}; + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +/*! +@class IOSCSIProtocolInterface +@superclass IOService +@discussion +This class defines the public SCSI Protocol Layer API for any class that +provides Protocol services or needs to provide the Protocol Service API +for passing service requests to a Protocol Service driver. +*/ +class IOSCSIProtocolInterface : public IOService +{ + + OSDeclareAbstractStructors ( IOSCSIProtocolInterface ) + +public: + + /*! + @function start + @abstract During an IOService object's instantiation, starts the IOService object that has been selected to run on the provider. + @discussion See IOService.h for details. + @result true if the start was successful; false otherwise (which will cause the instance to be detached and usually freed). + */ + virtual bool start ( IOService * provider ); + + /*! + @function free + @abstract Called to release all resources held by the object. + @discussion Release all resources held by the object, then call super::free(). + */ + virtual void free ( void ); + + /*! + @function willTerminate + @abstract Passes a termination up the stack. + @discussion Notification that a provider has been terminated, sent before recursing up the stack, in root-to-leaf order. + @param provider The terminated provider of this object. + @param options Options originally passed to terminate(). + @result true. + */ + virtual bool willTerminate ( IOService * provider, IOOptionBits options ); + + /*! + @function GetUserClientExclusivityState + @abstract Gets the current exclusivity state of the user client. + @discussion The GetUserClientExclusivityState() method is called by the SCSITaskUserClient + to determine if any user client is holding exclusive access at the current time. This is simply + a preflight check and a return value of false does not guarantee that a subsequent + call to SetUserClientExclusivityState() will return successfully. + @result true if a user client is in exclusive control of the device, false otherwise. + */ + virtual bool GetUserClientExclusivityState ( void ); + + /*! + @function SetUserClientExclusivityState + @abstract Sets the current exclusivity state of the user client. + @discussion The SetUserClientExclusivityState() method is called by the SCSITaskUserClient + to set the exclusive access mode. + @param userClient The instance of SCSITaskUserClient for which to change exclusivity state. + @param state Exclusivity state. true means exclusive access is desired, false + means exclusive access is being released. + @result A valid IOReturn code indicating success or the type of failure. + */ + virtual IOReturn SetUserClientExclusivityState ( IOService * userClient, bool state ); + + + /*! + @function initialPowerStateForDomainState + @abstract Determines which power state a device is in, given the current power domain state. + @discussion Power management calls this method once, when the driver is initializing power management. + Subclasses should not need to override this method. + @param flags Flags that describe the character of "domain power"; they represent the outputPowerCharacter field of a state in the power domain's power state array. + @result A state number. + */ + virtual unsigned long initialPowerStateForDomainState ( IOPMPowerFlags flags ); + + /*! + @function setPowerState + @abstract Requests a power managed driver to change the power state of its device. + @discussion Requests a power managed driver to change the power state of its device. Most subclasses + of IOSCSIProtocolInterface have class-specific mechanisms and should not override this routine. + See IOSCSIProtocolServices.h, IOSCSIBlockCommandsDevice.h, IOSCSIReducedBlockCommandsDevice.h, and + IOSCSIMultimediaCommandsDevice.h for more information about power management changes. + Subclasses should not need to override this method. + @param powerStateOrdinal The number in the power state array to which the drive is being instructed to change. + @param whichDevice A pointer to the power management object which registered to manage power for this device. + The whichDevice field is not pertinent to us since the driver is both the "policy maker" for the device, + and the "policy implementor" for the device. + @result See IOService.h for details. + */ + virtual IOReturn setPowerState ( unsigned long powerStateOrdinal, IOService * whichDevice ); + + /*! + @function IsPowerManagementIntialized + @abstract Called to determine if power management is initialized. + @discussion Called to determine if power management is initialized. + Subclasses should not need to override this method. + @result true if power management has been initialized, false otherwise. + */ + virtual bool IsPowerManagementIntialized ( void ); + + /*! + @function CheckPowerState + @abstract Called by clients to ensure device is in correct power state before issuing I/O. + @discussion Called by clients to ensure device is in correct power state before issuing I/O. + If the device is not ready to handle such requests, it gives the driver a chance to block the + thread until the device is ready. Subclasses should not need to override this method. + */ + virtual void CheckPowerState ( void ); + + /*! + @function ExecuteCommand + @abstract Called to send a SCSITask and transport it across the physical wire(s) to the device. + @discussion Called to send a SCSITask and transport it across the physical wire(s) to the device. + Subclasses internal to IOSCSIArchitectureModelFamily will need to override this method. Third + party subclasses should not need to override this method. + @param request A valid SCSITaskIdentifier representing the task to transport across the wire(s). + */ + virtual void ExecuteCommand ( SCSITaskIdentifier request ) = 0; + + /*! + @function AbortCommand + @abstract Obsolete. Do not use this method. + @discussion Obsolete. Do not use this method. + */ + virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier request ) = 0; + + /*! + @function IsProtocolServiceSupported + @abstract This method is called to query for support of a protocol specific service feature. + @discussion This method is called to query for support of a protocol specific service feature. + Subclasses of IOSCSIProtocolServices should override this method. + @param feature A valid SCSIProtocolFeature. See enums for SCSIProtocolFeature. + @param serviceValue A pointer to a structure/value that is used in conjunction with the feature + requested. See enums for SCSIProtocolFeature. NB: This parameter may be NULL for certain + feature requests. + @result true if the feature is supported, false otherwise. + */ + virtual bool IsProtocolServiceSupported ( + SCSIProtocolFeature feature, + void * serviceValue ) = 0; + + /*! + @function HandleProtocolServiceFeature + @abstract This method is called to enact support of a protocol specific service feature. + @discussion This method is called to enact support of a protocol specific service feature. + Subclasses of IOSCSIProtocolServices should override this method. + @param feature A valid SCSIProtocolFeature. See enums for SCSIProtocolFeature. + @param serviceValue A pointer to a structure/value that is used in conjunction with the feature + requested. See enums for SCSIProtocolFeature. NB: This parameter may be NULL for certain + feature requests. + @result true if the service feature request succeeded, false otherwise. + */ + virtual bool HandleProtocolServiceFeature ( + SCSIProtocolFeature feature, + void * serviceValue ) = 0; + +protected: + + // Reserve space for future expansion. + struct IOSCSIProtocolInterfaceExpansionData + { + IOWorkLoop * fWorkLoop; + }; + IOSCSIProtocolInterfaceExpansionData * fIOSCSIProtocolInterfaceReserved; + + // ------ Power Management Support ------ + + thread_call_t fPowerManagementThread; + IOCommandGate * fCommandGate; + UInt32 fCurrentPowerState; + UInt32 fProposedPowerState; + bool fPowerTransitionInProgress; + bool fPowerAckInProgress; + bool fPowerManagementInitialized; + + /*! + @function GetCommandGate + @abstract Accessor method to obtain the IOCommandGate. + @discussion Accessor method to obtain the IOCommandGate. + @result The IOCommandGate for this instance. May return NULL. + */ + IOCommandGate * GetCommandGate ( void ); + + /*! + @function InitializePowerManagement + @abstract This method is called to initialize power management. + @discussion This method is called to initialize power management. It will call PMinit(), joinPMTree(), + setIdleTimerPeriod(), and makeUsable(). This method does not call registerPowerDriver(). + Subclasses may override this method to change the behavior (such as the number of power states). + @param provider The power management provider (i.e. the provider to attach to in the PowerManagement + tree). This may be a device that is not in the PM Tree itself, in which case, the IOService plane + is traversed towards the root node in an effort to find a node in the PM Tree. + */ + virtual void InitializePowerManagement ( IOService * provider ); + + /*! + @function GetInitialPowerState + @abstract This method is called to obtain the initial power state of the device (usually the highest). + @discussion This method is called to obtain the initial power state of the device (usually the highest). + Subclasses must override this method. + @result A power state ordinal. + */ + virtual UInt32 GetInitialPowerState ( void ) = 0; + + /*! + @function finalize + @abstract Finalizes the destruction of an IOService object. + @discussion See IOService.h + Subclasses may override this method, but should call super::finalize(). + @result true. + */ + virtual bool finalize ( IOOptionBits options ); + + /*! + @function sHandleSetPowerState + @abstract The sHandleSetPowerState method is a static function used as C->C++ glue + for going behind the command gate. + @discussion The sHandleSetPowerState method is a static function used as C->C++ glue + for going behind the command gate. + @param self The 'this' pointer for the class. + @param powerStateOrdinal The power state to which device shall be changed. + @result A valid IOReturn code indicating success or failure. + */ + static IOReturn sHandleSetPowerState ( IOSCSIProtocolInterface * self, UInt32 powerStateOrdinal ); + + /*! + @function sGetPowerTransistionInProgress + @abstract The sGetPowerTransistionInProgress method is a static function used as C->C++ glue + for going behind the command gate. + @discussion The sGetPowerTransistionInProgress method is a static function used as C->C++ glue + for going behind the command gate. + @param self The 'this' pointer for the class. + @result true if a power state is in progress, otherwise false. + */ + static bool sGetPowerTransistionInProgress ( IOSCSIProtocolInterface * self ); + + /*! + @function HandleSetPowerState + @abstract The HandleSetPowerState method is called by the glue code and is on the + serialized side of the command gate. + @discussion The HandleSetPowerState method is called by the glue code and is on the + serialized side of the command gate. This allows us to touch any member + variables as necessary without any multi-threading issues. + Subclasses may override this method to change behavior. Third party subclasses + should not need to override this method, but may. + @param powerStateOrdinal The power state to which device shall be changed. + */ + virtual void HandleSetPowerState ( UInt32 powerStateOrdinal ); + + /*! + @function sPowerManagement + @abstract The sPowerManagement method is a static C-function which is called using + mach's thread_call API. It guarantees us a thread of execution which is + different than the power management thread and the workloop thread on which + we can issue commands to the device synchronously or asynchronously without + worrying about deadlocks. It calls through to HandlePowerChange, which is + a state machine used to direct power management. + @discussion The sPowerManagement method is a static C-function which is called using + mach's thread_call API. It guarantees us a thread of execution which is + different than the power management thread and the workloop thread on which + we can issue commands to the device synchronously or asynchronously without + worrying about deadlocks. It calls through to HandlePowerChange, which is + a state machine used to direct power management. + @param whichDevice The 'this' pointer. + */ + static void sPowerManagement ( thread_call_param_t whichDevice ); + + /*! + @function HandlePowerChange + @abstract The HandlePowerChange method is pure virtual and is left to each protocol or + application layer driver to implement. It is guaranteed to be called on its + own thread of execution and can make synchronous or asynchronous calls. + @discussion The HandlePowerChange method is pure virtual and is left to each protocol or + application layer driver to implement. It is guaranteed to be called on its + own thread of execution and can make synchronous or asynchronous calls. + Subclasses must override this method. Third party subclasses shouldn't need to override + this method but can to alter the default behavior. + */ + virtual void HandlePowerChange ( void ) = 0; + + /*! + @function sHandleCheckPowerState + @abstract The sHandleCheckPowerState method is a static function used as C->C++ glue + for going behind the command gate. + @discussion The sHandleCheckPowerState method is a static function used as C->C++ glue + for going behind the command gate. + @param self The 'this' pointer for the class. + */ + static void sHandleCheckPowerState ( IOSCSIProtocolInterface * self ); + + /*! + @function HandleCheckPowerState(void) + @abstract The HandleCheckPowerState (void) method is on the serialized side of the command + gate and can change member variables safely without multi-threading issues. + It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) + with the max power state the class registered with. + @discussion The HandleCheckPowerState (void) method is on the serialized side of the command + gate and can change member variables safely without multi-threading issues. + It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) + with the max power state the class registered with. + Subclasses must override this method. Third party subclasses shouldn't need to override + this method but can to alter the default behavior. + */ + virtual void HandleCheckPowerState ( void ) = 0; + + /*! + @function HandleCheckPowerState(UInt32 maxPowerState) + @abstract The HandleCheckPowerState(UInt32 maxPowerState) method is called by + the subclasses and is passed the maxPowerState number given to the power + manager at initialization time. This guarantees the threads block until that + power state has been achieved. + @discussion The HandleCheckPowerState(UInt32 maxPowerState) method is called by + the subclasses and is passed the maxPowerState number given to the power + manager at initialization time. This guarantees the threads block until that + power state has been achieved. + @param maxPowerState The maximum power state in the power state array. + */ + void HandleCheckPowerState ( UInt32 maxPowerState ); + + /*! + @function TicklePowerManager(void) + @abstract The TicklePowerManager(void) method is called by CheckPowerState and + sends an activity tickle to the power manager so that the idle timer is + reset. + @discussion The TicklePowerManager(void) method is called by CheckPowerState and + sends an activity tickle to the power manager so that the idle timer is + reset. + Subclasses must override this method. Third party subclasses shouldn't need to override + this method but can to alter the default behavior. + */ + virtual void TicklePowerManager ( void ) = 0; + + /*! + @function TicklePowerManager(UInt32 maxPowerState) + @abstract The TicklePowerManager(UInt32 maxPowerState) method is a convenience + function which can be called by subclasses in TicklePowerManager (void) + in order to tell the power manager to reset idle timer or bring the device + into the requested state. It returns whatever is returned by activityTickle + (true if device is in the requested state, false if it is not). + @discussion The TicklePowerManager(UInt32 maxPowerState) method is a convenience + function which can be called by subclasses in TicklePowerManager(void) + in order to tell the power manager to reset idle timer or bring the device + into the requested state. It returns whatever is returned by activityTickle + (true if device is in the requested state, false if it is not). + @param maxPowerState The maximum power state in the power state array. + @result The result of the call to activityTickle(). See IOService.h for details. + */ + bool TicklePowerManager ( UInt32 maxPowerState ); + + // ------ User Client Support ------ + + bool fUserClientExclusiveControlled; + IOService * fUserClient; + + /*! + @function sGetUserClientExclusivityState + @abstract The sGetUserClientExclusivityState method is a static function used as C->C++ glue + for going behind the command gate. + @discussion The sGetUserClientExclusivityState method is a static function used as C->C++ glue + for going behind the command gate. + @param self The 'this' pointer for the class. + @param state A pointer to a bool in which the state should be set. + */ + static void sGetUserClientExclusivityState ( IOSCSIProtocolInterface * self, bool * state ); + + /*! + @function sSetUserClientExclusivityState + @abstract The sSetUserClientExclusivityState method is a static function used as C->C++ glue + for going behind the command gate. + @discussion The sSetUserClientExclusivityState method is a static function used as C->C++ glue + for going behind the command gate. + @param self The 'this' pointer for the class. + @param result A pointer to an IOReturn for the resulting status. + @param userClient The instance of SCSITaskUserClient for which to change exclusivity state. + @param state A bool indicating the desired state to set. + */ + static void sSetUserClientExclusivityState ( IOSCSIProtocolInterface * self, IOReturn * result, IOService * userClient, bool state ); + + /*! + @function HandleGetUserClientExclusivityState + @abstract Gets the current exclusivity state of the user client. + @discussion The HandleGetUserClientExclusivityState() method is called on the serialized side + of the command gate to determine if any user client is holding exclusive access at the current + time. See discussion for GetUserClientExclusivityState(). + Subclasses may override this method to alter default behavior. Third party subclasses should + not need to override this method. + @result true if a user client is in exclusive control of the device, false otherwise. + */ + virtual bool HandleGetUserClientExclusivityState ( void ); + + /*! + @function HandleSetUserClientExclusivityState + @abstract Sets the current exclusivity state of the user client. + @discussion The HandleSetUserClientExclusivityState() method is called on the serialized side + of the command gate to set the exclusive access mode. + @param userClient The instance of SCSITaskUserClient for which to change exclusivity state. + @param state Exclusivity state. true means exclusive access is desired, false + means exclusive access is being released. + @result A valid IOReturn code indicating success or the type of failure. + */ + virtual IOReturn HandleSetUserClientExclusivityState ( IOService * userClient, bool state ); + +public: + + // ------- SCSI Architecture Model Task Management Functions ------ + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 1 ); + /*! + @function AbortTask + @abstract Aborts a task based on the Logical Unit and tagged task identifier. + @discussion Aborts a task based on the Logical Unit and tagged task identifier. + Subclasses must override this method. Third party subclasses should not need to override + this method. + @param theLogicalUnit This value should be zero unless the device driver is + more complex and managing multiple Logical Units. + @param theTag A valid SCSITaggedTaskIdentifier representing an outstanding SCSITask. + @result A valid SCSIServiceResponse code. + */ + virtual SCSIServiceResponse AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ) = 0; + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 2 ); + /*! + @function AbortTaskSet + @abstract Aborts a task set based on the Logical Unit. + @discussion Aborts a task set based on the Logical Unit. + Subclasses must override this method. Third party subclasses should not need to override + this method. + @param theLogicalUnit This value should be zero unless the device driver is + more complex and managing multiple Logical Units. + @result A valid SCSIServiceResponse code. + */ + virtual SCSIServiceResponse AbortTaskSet ( UInt8 theLogicalUnit ) = 0; + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 3 ); + /*! + @function ClearACA + @abstract Clears an Auto-Contingent Allegiance (ACA) for the specified Logical Unit. + @discussion Clears an Auto-Contingent Allegiance (ACA) for the specified Logical Unit. + Subclasses must override this method. Third party subclasses should not need to override + this method. + @param theLogicalUnit This value should be zero unless the device driver is + more complex and managing multiple Logical Units. + @result A valid SCSIServiceResponse code. + */ + virtual SCSIServiceResponse ClearACA ( UInt8 theLogicalUnit ) = 0; + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 4 ); + /*! + @function ClearTaskSet + @abstract Clears a task set for the specified Logical Unit. + @discussion Clears a task set for the specified Logical Unit. + Subclasses must override this method. Third party subclasses should not need to override + this method. + @param theLogicalUnit This value should be zero unless the device driver is + more complex and managing multiple Logical Units. + @result A valid SCSIServiceResponse code. + */ + virtual SCSIServiceResponse ClearTaskSet ( UInt8 theLogicalUnit ) = 0; + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 5 ); + /*! + @function LogicalUnitReset + @abstract Resets the specified Logical Unit. + @discussion Resets the specified Logical Unit. + Subclasses must override this method. Third party subclasses should not need to override + this method. + @param theLogicalUnit This value should be zero unless the device driver is + more complex and managing multiple Logical Units. + @result A valid SCSIServiceResponse code. + */ + virtual SCSIServiceResponse LogicalUnitReset ( UInt8 theLogicalUnit ) = 0; + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 6 ); + + /*! + @function TargetReset + @abstract Resets the target device. + @discussion Resets the target device. + Subclasses must override this method. Third party subclasses should not need to override + this method. + @result A valid SCSIServiceResponse code. + */ + virtual SCSIServiceResponse TargetReset ( void ) = 0; + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 8 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 9 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 10 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 11 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 12 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 16 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_PROTOCOL_INTERFACE_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIProtocolServices.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIProtocolServices.h.svn-base new file mode 100644 index 0000000..6b9df79 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIProtocolServices.h.svn-base @@ -0,0 +1,362 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_SCSI_PROTOCOL_SERVICES_H_ +#define _IOKIT_IO_SCSI_PROTOCOL_SERVICES_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// Mach includes +#include + +// General IOKit headers +#include +#include + +// SCSI Architecture Model Family includes +#include +#include +#include + + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + +// Power Management values +enum +{ + kSCSIProtocolLayerPowerStateOff = 0, + kSCSIProtocolLayerPowerStateOn = 1, + kSCSIProtocolLayerNumDefaultStates = 2 +}; + +// Forward definitions of internal use only classes +class SCSITask; + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIProtocolServices : public IOSCSIProtocolInterface +{ + + OSDeclareAbstractStructors ( IOSCSIProtocolServices ) + +private: + + // The head pointer for the queue of waiting SCSI Tasks. + SCSITask * fSCSITaskQueueHead; /* OBSOLETE */ + + // This is the lock for preventing multiple access while + // manipulating the SCSI Task queue. + IOSimpleLock * fQueueLock; + + // The internal flag to indicate whether service requests should be + // executed or immediately errored, such as when a device is removed. + bool fAllowServiceRequests; + +protected: + + // Reserve space for future expansion. + struct IOSCSIProtocolServicesExpansionData + { + // For internal use only. Do not use. + UInt32 fSemaphore; + bool fRequiresAutosenseDescriptor; + SCSITaskCompletion fCompletionRoutine; + queue_head_t fTaskQueueHead; + queue_head_t fAutoSenseQueueHead; + }; + IOSCSIProtocolServicesExpansionData * fIOSCSIProtocolServicesReserved; + + // ---- Protocol transport methods overridden by each subclass ---- + + // Send a SCSI Command to the device. If the command was sent to the + // device and is pending completion, the subclass should return true and + // return back the kSCSIServiceResponse_Request_In_Process response. + // If the command completes immediately with an error, the subclass will + // return true and return back the appropriate status. + // if the subclass is currently processing all the commands it can, the + // subclass will return false and the command will be resent next time + // CommandCompleted is called. + virtual bool SendSCSICommand ( SCSITaskIdentifier request, + SCSIServiceResponse * serviceResponse, + SCSITaskStatus * taskStatus ) = 0; + + virtual SCSIServiceResponse AbortSCSICommand ( SCSITaskIdentifier request ) = 0; + + // ---- Command completion notification method --------- + // Subclasses will call this inherited method when the command + // executed by SendSCSICommand has completed. + // The subclasses will return a service response that is derived + // from protocol specific status information and as specified in + // the specification for that protocol. + // If the service response is kSCSIServiceResponse_TASK_COMPLETE, + // the subclass will also return a SCSI status value. + void CommandCompleted ( SCSITaskIdentifier request, + SCSIServiceResponse serviceResponse, + SCSITaskStatus taskStatus ); + + // ---- Utility methods for accessing SCSITask attributes ---- + // Method for retreiving the attribute for a task. + SCSITaskAttribute GetTaskAttribute ( SCSITaskIdentifier request ); + + bool SetTaskState ( SCSITaskIdentifier request, + SCSITaskState newTaskState ); + SCSITaskState GetTaskState ( SCSITaskIdentifier request ); + + UInt8 GetLogicalUnitNumber ( SCSITaskIdentifier request ); + + // Method to determine the size of the command descriptor block. + UInt8 GetCommandDescriptorBlockSize ( SCSITaskIdentifier request ); + + // This will always return the define max CDB size. If the Protocol Layer + // driver only supports a smaller size CDB, it will have to create a local + // SCSICommandDescriptorBlock variable to get the CDB data and then + // transfer the needed bytes from there. + bool GetCommandDescriptorBlock ( SCSITaskIdentifier request, + SCSICommandDescriptorBlock * cdbData ); + + // Get the transfer direction for the request. + UInt8 GetDataTransferDirection ( SCSITaskIdentifier request ); + + UInt64 GetRequestedDataTransferCount ( SCSITaskIdentifier request ); + + bool SetRealizedDataTransferCount ( SCSITaskIdentifier request, + UInt64 newRealizedDataCount ); + + UInt64 GetRealizedDataTransferCount ( SCSITaskIdentifier request ); + + IOMemoryDescriptor * GetDataBuffer ( SCSITaskIdentifier request ); + + UInt64 GetDataBufferOffset ( SCSITaskIdentifier request ); + + UInt32 GetTimeoutDuration ( SCSITaskIdentifier request ); + + UInt64 GetAutosenseRequestedDataTransferCount ( SCSITaskIdentifier request ); + + // Set the auto sense data that was returned for the SCSI Task. + // A return value of true indicates that the data was copied to the member + // sense data structure, false indicates that the data could not be copied. + bool SetAutoSenseData ( SCSITaskIdentifier request, + SCSI_Sense_Data * senseData ); // DEPRECATED, use the one on the line below. + + bool SetAutoSenseData ( SCSITaskIdentifier request, + SCSI_Sense_Data * senseData, + UInt8 senseDataSize ); + + void EnsureAutosenseDescriptorExists ( SCSITaskIdentifier request ); + + bool SetProtocolLayerReference ( + SCSITaskIdentifier request, + void * newReferenceValue ); + void * GetProtocolLayerReference ( SCSITaskIdentifier request ); + + + bool SetTaskExecutionMode ( + SCSITaskIdentifier request, + SCSITaskMode newTaskMode ); + SCSITaskMode GetTaskExecutionMode ( SCSITaskIdentifier request ); + + // ---- Method calls for messaging device connectedness ---- + void SendNotification_DeviceRemoved ( void ); + + void SendNotification_VerifyDeviceState ( void ); + + // -- SCSI Task Queue Management Methods -- + // Following are the commands used to manipulate the queue of pending SCSI Tasks. + + // Add the SCSI Task to the queue. The Task's Attribute determines where in + // the queue the Task is placed. + void AddSCSITaskToQueue ( SCSITaskIdentifier request ); + + // Add the SCSI Task to the head of the queue. This is used when the task + // has been removed from the head of the queue, but the subclass indicates + // that it can not yet process this task. + void AddSCSITaskToHeadOfQueue ( SCSITask * request ); + + // Remove the next SCSI Task for the queue and return it. + SCSITask * RetrieveNextSCSITaskFromQueue ( void ); + + // Check to see if the SCSI Task resides in the queue and abort it if it does. + bool AbortSCSITaskFromQueue ( SCSITask * request ); + + // Methods for sending and completing SCSI tasks + void SendSCSITasksFromQueue ( void ); + + void RejectSCSITasksCurrentlyQueued ( void ); + + void ProcessCompletedTask ( SCSITaskIdentifier request, + SCSIServiceResponse serviceResponse, + SCSITaskStatus taskStatus ); + void RejectTask ( SCSITaskIdentifier request ); + + // ------ Power Management Support ------ + + // The InitializePowerManagement method is called to initialize power management. + // In the protocol services layer, this method calls the protocol interface layer + // to initialize power management state variables and then registers the protocol + // layer driver with the power manager with two(2) states, ON and OFF. + virtual void InitializePowerManagement ( IOService * provider ); + + // The GetInitialPowerState method is called once, right after InitializePowerManagement() + // in order to determine what state the device is initially in at startup time (usually + // the highest power mode). + virtual UInt32 GetInitialPowerState ( void ); + + // The HandlePowerChange method is pure virtual and is left to each protocol or + // application layer driver to implement. It is guaranteed to be called on its + // own thread of execution and can make synchronous or asynchronous calls. + virtual void HandlePowerChange ( void ); + + // The HandleCheckPowerState (void) method is on the serialized side of the command + // gate and can change member variables safely without multi-threading issues. + // It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) + // with the max power state the class registered with. + virtual void HandleCheckPowerState ( void ); + + // The TicklePowerManager ( void ) method is called by CheckPowerState and + // sends an activity tickle to the power manager so that the idle timer is + // reset. + virtual void TicklePowerManager ( void ); + + // The HandlePowerOff method is called to do any bus specific activity + // necessary before shutting down and going to sleep. + virtual IOReturn HandlePowerOff ( void ); + + // The HandlePowerOn method is called to do any bus specific activity + // necessary to recover from power-on/wake from sleep (e.g. bus reset on ATAPI) + virtual IOReturn HandlePowerOn ( void ); + +public: + + virtual bool start ( IOService * provider ); + virtual void free ( void ); + + void RegisterSCSITaskCompletionRoutine ( SCSITaskCompletion completion ); + + // ------- SCSI Architecture Model Task Management Functions ------ + // The ExecuteCommand method will take a SCSI Task and transport + // it across the physical wire(s) to the device + void ExecuteCommand ( SCSITaskIdentifier request ); + + // The Task Management function to allow the SCSI Application Layer client to request + // that a specific task be aborted. + SCSIServiceResponse AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ); + + // The Task Management function to allow the SCSI Application Layer client to request + // that a all tasks curerntly in the task set be aborted. + SCSIServiceResponse AbortTaskSet ( UInt8 theLogicalUnit ); + + SCSIServiceResponse ClearACA ( UInt8 theLogicalUnit ); + + SCSIServiceResponse ClearTaskSet ( UInt8 theLogicalUnit ); + + SCSIServiceResponse LogicalUnitReset ( UInt8 theLogicalUnit ); + + SCSIServiceResponse TargetReset ( void ); + + // ************* Obsoleted Member Routine **************** + // The AbortCommand method is replaced by the AbortTask Management function and + // should no longer be called. + virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier request ); + + + // ---- Method used for determining protocol or physical interconnect characteristics. ---- + // The IsProtocolServiceSupported will return true if the specified + // feature is supported by the protocol layer. If the service has a value that must be + // returned, it will be returned in the serviceValue output parameter. + virtual bool IsProtocolServiceSupported ( SCSIProtocolFeature feature, void * serviceValue ) = 0; + + // The HandleProtocolServiceFeature instructs the Protocol Services driver to perform the necessary + // tasks for the indicated feature. + virtual bool HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void * serviceValue ) = 0; + +protected: + + // ----- Protocol Services Driver request handlers for Task Management functions ----- + // These should be abstract so that every Protocol Services Driver would have to + // override them, but since they are new member routines, this class will provide + // a default implementation. + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 1 ); + virtual SCSIServiceResponse HandleAbortTask ( + UInt8 theLogicalUnit, + SCSITaggedTaskIdentifier theTag ); + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 2 ); + virtual SCSIServiceResponse HandleAbortTaskSet ( + UInt8 theLogicalUnit ); + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 3 ); + virtual SCSIServiceResponse HandleClearACA ( + UInt8 theLogicalUnit ); + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 4 ); + virtual SCSIServiceResponse HandleClearTaskSet ( + UInt8 theLogicalUnit ); + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 5 ); + virtual SCSIServiceResponse HandleLogicalUnitReset ( + UInt8 theLogicalUnit ); + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 6 ); + // The HandleTargetReset member routine requests that the Protocol Services Driver + // perform the necessary steps detailed in the specification that defines the + // protocol the driver represents for the TargetReset management function. + virtual SCSIServiceResponse HandleTargetReset ( void ); + + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 7 ); + // The CreateSCSITargetDevice member routine will create the appropriate object + // to represent the Target portion of a SCSI Device. This object is responsible + // for managing the Target functions of the SCSI Device including the Task Manager and + // Logical Units. + // If the SCSITargetDevice object was successfully created, a true value will be + // returned, otherwisw, this will return false. + virtual bool CreateSCSITargetDevice ( void ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 8 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 9 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 10 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 11 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 12 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 16 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_PROTOCOL_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIReducedBlockCommandsDevice.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIReducedBlockCommandsDevice.h.svn-base new file mode 100644 index 0000000..955fd6e --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIReducedBlockCommandsDevice.h.svn-base @@ -0,0 +1,438 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_SCSI_REDUCED_BLOCK_COMMANDS_DEVICE_H_ +#define _IOKIT_IO_SCSI_REDUCED_BLOCK_COMMANDS_DEVICE_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// General IOKit headers +#include +#include + +// Generic IOKit storage related headers +#include + +// SCSI Architecture Model Family includes +#include + + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + + +// RBC power states as defined in T10:1240D SCSI Reduced Block Commands (RBC) +// Revision 10a, August 18, 1999, page 13. +enum +{ + kRBCPowerStateSystemSleep = 0, + kRBCPowerStateSleep = 1, + kRBCPowerStateStandby = 2, + kRBCPowerStateIdle = 3, + kRBCPowerStateActive = 4, + kRBCNumPowerStates = 5 +}; + +enum +{ + kMediaStateUnlocked = 0, + kMediaStateLocked = 1 +}; + +#define kCapacityDataBufferSize 8 + +// Forward declaration for the SCSIReducedBlockCommands that is used internally by the +// IOSCSIReducedBlockCommandsDevice class. +class SCSIReducedBlockCommands; + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIReducedBlockCommandsDevice : public IOSCSIPrimaryCommandsDevice +{ + + OSDeclareAbstractStructors ( IOSCSIReducedBlockCommandsDevice ); + +private: + +#ifndef __LP64__ + + SCSIReducedBlockCommands * fSCSIReducedBlockCommandObject; + SCSIReducedBlockCommands * GetSCSIReducedBlockCommandObject ( void ); + +#endif /* !__LP64__ */ + + static void AsyncReadWriteComplete ( SCSITaskIdentifier completedTask ); + +protected: + + // Reserve space for future expansion. + struct IOSCSIReducedBlockCommandsDeviceExpansionData + { + IONotifier * fPowerDownNotifier; + bool fMediumRemovalPrevented; + bool fKnownManualEject; + UInt32 fPollingMode; + bool fProtocolSpecificPowerControl; + }; + IOSCSIReducedBlockCommandsDeviceExpansionData * fIOSCSIReducedBlockCommandsDeviceReserved; + + #define fPowerDownNotifier fIOSCSIReducedBlockCommandsDeviceReserved->fPowerDownNotifier + #define fMediumRemovalPrevented fIOSCSIReducedBlockCommandsDeviceReserved->fMediumRemovalPrevented + #define fKnownManualEject fIOSCSIReducedBlockCommandsDeviceReserved->fKnownManualEject + #define fPollingMode fIOSCSIReducedBlockCommandsDeviceReserved->fPollingMode + #define fProtocolSpecificPowerControl fIOSCSIReducedBlockCommandsDeviceReserved->fProtocolSpecificPowerControl + + bool fMediaChanged; + bool fMediaPresent; + + // The byte count of each physical block on the media. + UInt32 fMediaBlockSize; + + // The total number of blocks of mediaBlockSize on the media. + UInt32 fMediaBlockCount; + + // Flags used to indicate device feature + bool fMediaIsRemovable; + bool fMediaIsWriteProtected; + + thread_call_t fPollingThread; + + enum + { + kPollingMode_Suspended = 0, + kPollingMode_NewMedia = 1, + kPollingMode_MediaRemoval = 2 + }; + + virtual void CreateStorageServiceNub ( void ); + virtual bool DetermineDeviceCharacteristics ( void ); + virtual void PollForMedia ( void ); + virtual void EnablePolling ( void ); + virtual void DisablePolling ( void ); + virtual void CheckWriteProtection ( void ); + virtual void SetMediaCharacteristics ( UInt32 blockSize, UInt32 blockCount ); + virtual void ResetMediaCharacteristics ( void ); + virtual bool ClearNotReadyStatus ( void ); + + virtual IOReturn IssueRead ( IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueWrite ( IOMemoryDescriptor* buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueRead ( IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + void * clientData ); + + virtual IOReturn IssueWrite ( IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + void * clientData ); + +#ifndef __LP64__ + + // This method will retreive the SCSI Primary Command Set object for + // the class. For subclasses, this will be overridden using a + // dynamic cast on the subclasses base command set object. + virtual SCSIPrimaryCommands * GetSCSIPrimaryCommandObject ( void ); + +#endif /* !__LP64__ */ + + // ----- Power Management Support ------ + + // We override this method to set our power states and register ourselves + // as a power policy maker. + virtual void InitializePowerManagement ( IOService * provider ); + + // We override this method so that when we register for power management, + // we go to our active power state (which the drive is definitely in + // at startup time). + virtual UInt32 GetInitialPowerState ( void ); + + // We override this method in order to provide the number of transitions + // from Fully active to Sleep state so that the idle timer can be adjusted + // to the appropriate time period based on the disk spindown time set in + // the Energy Saver prefs panel. + virtual UInt32 GetNumberOfPowerStateTransitions ( void ); + + // The TicklePowerManager method is called to tell the power manager that the + // device needs to be in a certain power state to handle requests. + virtual void TicklePowerManager ( void ); + + // The HandlePowerChange method is the state machine for power management. + // It is guaranteed to be on its own thread of execution (different from + // the power manager thread AND the workloop thread. This routine can + // send sync or async calls to the drive without worrying about threading + // issues. + virtual void HandlePowerChange ( void ); + + // The HandleCheckPowerState (void) method is on the serialized side of the command + // gate and can change member variables safely without multi-threading issues. + // It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) + // with the max power state the class registered with. + virtual void HandleCheckPowerState ( void ); + + // The CheckMediaPresence method is called to see if the media which we + // anticipated being there is still there. + virtual bool CheckMediaPresence ( void ); + + virtual bool InitializeDeviceSupport ( void ); + virtual void StartDeviceSupport ( void ); + virtual void SuspendDeviceSupport ( void ); + virtual void ResumeDeviceSupport ( void ); + virtual void StopDeviceSupport ( void ); + virtual void TerminateDeviceSupport ( void ); + + virtual void free ( void ); + +#ifndef __LP64__ + + virtual bool CreateCommandSetObjects ( void ); + virtual void FreeCommandSetObjects ( void ); + +#endif /* !__LP64__ */ + +public: + + virtual IOReturn SyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn AsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + void * clientData ); + + + virtual IOReturn EjectTheMedia ( void ); + virtual IOReturn FormatMedia ( UInt64 byteCapacity ); + virtual UInt32 GetFormatCapacities ( UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + virtual IOReturn LockUnlockMedia ( bool doLock ); + virtual IOReturn SynchronizeCache ( void ); + virtual IOReturn ReportBlockSize ( UInt64 * blockSize ); + virtual IOReturn ReportEjectability ( bool * isEjectable ); + virtual IOReturn ReportLockability ( bool * isLockable ); + virtual IOReturn ReportPollRequirements ( bool * pollIsRequired, + bool * pollIsExpensive ); + virtual IOReturn ReportMaxReadTransfer ( UInt64 blockSize, + UInt64 * max ); + virtual IOReturn ReportMaxValidBlock ( UInt64 * maxBlock ); + virtual IOReturn ReportMaxWriteTransfer ( UInt64 blockSize, + UInt64 * max ); + virtual IOReturn ReportMediaState ( bool * mediaPresent, + bool * changed ); + virtual IOReturn ReportRemovability ( bool * isRemovable ); + virtual IOReturn ReportWriteProtection ( bool * isWriteProtected ); + + static void sPollForMedia ( void * pdtDriver, void * refCon ); + + +protected: + + + // The FORMAT_UNIT command as defined in section 5.1 + virtual bool FORMAT_UNIT ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField1Bit PROGRESS, + SCSICmdField1Bit PERCENT_TIME, + SCSICmdField1Bit INCREMENT ); + + // The INQUIRY command as defined in SPC-2 w/o CONTROL byte + virtual bool INQUIRY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit CMDDT, + SCSICmdField1Bit EVPD, + SCSICmdField1Byte PAGE_OR_OPERATION_CODE, + SCSICmdField1Byte ALLOCATION_LENGTH ); + + // The MODE_SELECT(6) command as defined in SPC-2 w/o CONTROL byte + virtual bool MODE_SELECT_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PF, + SCSICmdField1Bit SP, + SCSICmdField1Byte PARAMETER_LIST_LENGTH ); + + // The MODE_SENSE(6) command as defined in SPC-2 w/o CONTROL byte + virtual bool MODE_SENSE_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DBD, + SCSICmdField2Bit PC, + SCSICmdField6Bit PAGE_CODE, + SCSICmdField1Byte ALLOCATION_LENGTH ); + + // The PERSISTENT_RESERVE_IN command as defined in SPC-2 w/o CONTROL byte + virtual bool PERSISTENT_RESERVE_IN ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField5Bit SERVICE_ACTION, + SCSICmdField2Byte ALLOCATION_LENGTH ); + + // The PERSISTENT_RESERVE_OUT command as defined in SPC-2 w/o CONTROL byte + virtual bool PERSISTENT_RESERVE_OUT ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField5Bit SERVICE_ACTION, + SCSICmdField4Bit SCOPE, + SCSICmdField4Bit TYPE ); + + // The PREVENT_ALLOW_MEDIUM_REMOVAL command as defined in SPC-2 w/o CONTROL byte + virtual bool PREVENT_ALLOW_MEDIUM_REMOVAL ( + SCSITaskIdentifier request, + SCSICmdField2Bit PREVENT ); + + // The READ_10 command as defined in section 5.2 + virtual bool READ_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH ); + + // The READ_CAPACITY command as defined in section 5.3 + virtual bool READ_CAPACITY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer ); + + // The RELEASE(6) command as defined in SPC-2 w/o CONTROL byte + virtual bool RELEASE_6 ( + SCSITaskIdentifier request ); + + // The REQUEST_SENSE command as defined in SPC-2 w/o CONTROL byte + virtual bool REQUEST_SENSE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Byte ALLOCATION_LENGTH ); + + // The RESERVE(6) command as defined in SPC-2 w/o CONTROL byte + virtual bool RESERVE_6 ( + SCSITaskIdentifier request ); + + // The START_STOP_UNIT command as defined in section 5.4 + virtual bool START_STOP_UNIT ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField4Bit POWER_CONDITIONS, + SCSICmdField1Bit LEOJ, + SCSICmdField1Bit START ); + + // The SYNCRONIZE_CACHE command as defined in section 5.5 + virtual bool SYNCHRONIZE_CACHE ( + SCSITaskIdentifier request ); + + // The TEST_UNIT_READY command as defined in SPC-2 w/o CONTROL byte + virtual bool TEST_UNIT_READY ( + SCSITaskIdentifier request ); + + // The VERIFY command as defined in section 5.7 + virtual bool VERIFY ( + SCSITaskIdentifier request, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte VERIFICATION_LENGTH ); + + // The WRITE_10 command as defined in section 5.6 + virtual bool WRITE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit FUA, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH ); + + // The WRITE_BUFFER command as defined in SPC-2 w/o CONTROL byte + virtual bool WRITE_BUFFER ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Bit MODE, + SCSICmdField1Byte BUFFER_ID, + SCSICmdField3Byte BUFFER_OFFSET, + SCSICmdField3Byte PARAMETER_LIST_LENGTH ); + + + + /* Added with 10.2 */ + OSMetaClassDeclareReservedUsed ( IOSCSIReducedBlockCommandsDevice, 1 ); + +public: + + virtual IOReturn PowerDownHandler ( void * refCon, + UInt32 messageType, + IOService * provider, + void * messageArgument, + vm_size_t argSize ); + + + /* Added with 10.2 */ + OSMetaClassDeclareReservedUsed ( IOSCSIReducedBlockCommandsDevice, 2 ); + +protected: + + virtual void SetMediaIcon ( void ); + + + /* Added with 10.3.3 */ + OSMetaClassDeclareReservedUsed ( IOSCSIReducedBlockCommandsDevice, 3 ); + +protected: + + virtual void AsyncReadWriteCompletion ( SCSITaskIdentifier completedTask ); + + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 8 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 9 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 10 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 11 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 12 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 16 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_REDUCED_BLOCK_COMMANDS_DEVICE_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_INQUIRY_Definitions.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_INQUIRY_Definitions.h.svn-base new file mode 100644 index 0000000..55a6a4c --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_INQUIRY_Definitions.h.svn-base @@ -0,0 +1,923 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_SCSI_CMDS_INQUIRY_H_ +#define _IOKIT_SCSI_CMDS_INQUIRY_H_ + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +#if KERNEL +#include +#else +#include +#endif + + +/*! @header SCSI Inquiry Definitions + @discussion + This file contains all definitions for the data returned from + the INQUIRY (0x12) command. +*/ + + +/*! + * @enum Payload sizes + * @discussion + * Definitions for sizes related to the INQUIRY data. + * @constant kINQUIRY_StandardDataHeaderSize + * INQUIRY data header size. + * @constant kINQUIRY_MaximumDataSize + * Maximum size for INQUIRY data. +*/ +enum +{ + kINQUIRY_StandardDataHeaderSize = 5, + kINQUIRY_MaximumDataSize = 255 +}; + + +/*! +@enum INQUIRY field sizes +@discussion +Sizes for some of the inquiry data fields. +@constant kINQUIRY_VENDOR_IDENTIFICATION_Length +Size of VENDOR_IDENTIFICATION field. +@constant kINQUIRY_PRODUCT_IDENTIFICATION_Length +Size of PRODUCT_IDENTIFICATION field. +@constant kINQUIRY_PRODUCT_REVISION_LEVEL_Length +Size of PRODUCT_REVISION_LEVEL field. +*/ +enum +{ + kINQUIRY_VENDOR_IDENTIFICATION_Length = 8, + kINQUIRY_PRODUCT_IDENTIFICATION_Length = 16, + kINQUIRY_PRODUCT_REVISION_LEVEL_Length = 4 +}; + + +/*! +@struct SCSICmd_INQUIRY_StandardData +@discussion +This structure defines the format of the required standard data that is +returned for the INQUIRY command. This is the data that is required to +be returned from all devices. +*/ +typedef struct SCSICmd_INQUIRY_StandardData +{ + UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. + UInt8 RMB; // 7 = removable + UInt8 VERSION; // 7/6 = ISO/IEC, 5-3 = ECMA, 2-0 = ANSI. + UInt8 RESPONSE_DATA_FORMAT; // 7 = AERC, 6 = Obsolete, 5 = NormACA, 4 = HiSup 3-0 = Response data format. (SPC-3 obsoletes AERC) + // If ANSI Version = 0, this is ATAPI and bits 7-4 = ATAPI version. + UInt8 ADDITIONAL_LENGTH; // Number of additional bytes available in inquiry data + UInt8 SCCSReserved; // SCC-2 device flag and reserved fields (SPC-3 adds PROTECT 3PC TPGS, and ACC) + UInt8 flags1; // First byte of support flags (See SPC-3 section 6.4.2) + UInt8 flags2; // Second byte of support flags (Byte 7) (See SPC-3 section 6.4.2) + char VENDOR_IDENTIFICATION[kINQUIRY_VENDOR_IDENTIFICATION_Length]; + char PRODUCT_IDENTIFICATION[kINQUIRY_PRODUCT_IDENTIFICATION_Length]; + char PRODUCT_REVISION_LEVEL[kINQUIRY_PRODUCT_REVISION_LEVEL_Length]; +} SCSICmd_INQUIRY_StandardData; +typedef SCSICmd_INQUIRY_StandardData * SCSICmd_INQUIRY_StandardDataPtr; + + +/*! +@struct SCSICmd_INQUIRY_StandardDataAll +@discussion +This structure defines the all of the fields that can be returned in +repsonse to the INQUIRy request for the standard data. There is no +requirement as to how much of the additional data must be returned by a device. +*/ +typedef struct SCSICmd_INQUIRY_StandardDataAll +{ + UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. + UInt8 RMB; // 7 = removable + UInt8 VERSION; // 7/6 = ISO/IEC, 5-3 = ECMA, 2-0 = ANSI. + UInt8 RESPONSE_DATA_FORMAT; // 7 = AERC, 6 = Obsolete, 5 = NormACA, 4 = HiSup 3-0 = Response data format. + // If ANSI Version = 0, this is ATAPI and bits 7-4 = ATAPI version. + UInt8 ADDITIONAL_LENGTH; // Number of additional bytes available in inquiry data + UInt8 SCCSReserved; // SCC-2 device flag and reserved fields + UInt8 flags1; // First byte of support flags (Byte 6) + UInt8 flags2; // Second byte of support flags (Byte 7) + char VENDOR_IDENTIFICATION[kINQUIRY_VENDOR_IDENTIFICATION_Length]; + char PRODUCT_IDENTIFICATION[kINQUIRY_PRODUCT_IDENTIFICATION_Length]; + char PRODUCT_REVISION_LEVEL[kINQUIRY_PRODUCT_REVISION_LEVEL_Length]; + + // Following is the optional data that may be returned by a device. + UInt8 VendorSpecific1[20]; + UInt8 flags3; // Third byte of support flags, mainly SPI-3 (Byte 56) + UInt8 Reserved1; + UInt16 VERSION_DESCRIPTOR[8]; + UInt8 Reserved2[22]; + UInt8 VendorSpecific2[160]; +} SCSICmd_INQUIRY_StandardDataAll; + + +/*! +@enum Peripheral Qualifier +@discussion +Inquiry Peripheral Qualifier definitions +@constant kINQUIRY_PERIPHERAL_QUALIFIER_Connected +Peripheral Device is connected. +@constant kINQUIRY_PERIPHERAL_QUALIFIER_SupportedButNotConnected +Peripheral Device is supported, but not connected. +@constant kINQUIRY_PERIPHERAL_QUALIFIER_NotSupported +Peripheral Device is not supported. +@constant kINQUIRY_PERIPHERAL_QUALIFIER_Mask +Mask to use for PERIPHERAL_DEVICE_TYPE field. +*/ +enum +{ + kINQUIRY_PERIPHERAL_QUALIFIER_Connected = 0x00, + kINQUIRY_PERIPHERAL_QUALIFIER_SupportedButNotConnected = 0x20, + kINQUIRY_PERIPHERAL_QUALIFIER_NotSupported = 0x60, + kINQUIRY_PERIPHERAL_QUALIFIER_Mask = 0xE0 +}; + + +/*! +@enum Peripheral Device types +@discussion +Inquiry Peripheral Device type definitions +@constant kINQUIRY_PERIPHERAL_TYPE_DirectAccessSBCDevice +SBC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_SequentialAccessSSCDevice +Sequential Access (Tape) SSC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_PrinterSSCDevice +SSC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_ProcessorSPCDevice +SPC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_WriteOnceSBCDevice +SBC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_CDROM_MMCDevice +MMC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_ScannerSCSI2Device +SCSI2 Device. +@constant kINQUIRY_PERIPHERAL_TYPE_OpticalMemorySBCDevice +SBC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_MediumChangerSMCDevice +SMC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_CommunicationsSSCDevice +Comms SSC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_StorageArrayControllerSCC2Device +SCC2 Device. +@constant kINQUIRY_PERIPHERAL_TYPE_EnclosureServicesSESDevice +SES Device. +@constant kINQUIRY_PERIPHERAL_TYPE_SimplifiedDirectAccessRBCDevice +RBC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_OpticalCardReaderOCRWDevice +OCRW Device. +@constant kINQUIRY_PERIPHERAL_TYPE_ObjectBasedStorageDevice +OSD device. +@constant kINQUIRY_PERIPHERAL_TYPE_AutomationDriveInterface +Automation Drive Interface device. +@constant kINQUIRY_PERIPHERAL_TYPE_WellKnownLogicalUnit +Well known logical unit. +@constant kINQUIRY_PERIPHERAL_TYPE_UnknownOrNoDeviceType +Unknown or no device. +@constant kINQUIRY_PERIPHERAL_TYPE_Mask +Mask to use for PERIPHERAL_DEVICE_TYPE field. +*/ +enum +{ + kINQUIRY_PERIPHERAL_TYPE_DirectAccessSBCDevice = 0x00, + kINQUIRY_PERIPHERAL_TYPE_SequentialAccessSSCDevice = 0x01, + kINQUIRY_PERIPHERAL_TYPE_PrinterSSCDevice = 0x02, + kINQUIRY_PERIPHERAL_TYPE_ProcessorSPCDevice = 0x03, + kINQUIRY_PERIPHERAL_TYPE_WriteOnceSBCDevice = 0x04, + kINQUIRY_PERIPHERAL_TYPE_CDROM_MMCDevice = 0x05, + kINQUIRY_PERIPHERAL_TYPE_ScannerSCSI2Device = 0x06, + kINQUIRY_PERIPHERAL_TYPE_OpticalMemorySBCDevice = 0x07, + kINQUIRY_PERIPHERAL_TYPE_MediumChangerSMCDevice = 0x08, + kINQUIRY_PERIPHERAL_TYPE_CommunicationsSSCDevice = 0x09, + /* 0x0A - 0x0B ASC IT8 Graphic Arts Prepress Devices */ + kINQUIRY_PERIPHERAL_TYPE_StorageArrayControllerSCC2Device = 0x0C, + kINQUIRY_PERIPHERAL_TYPE_EnclosureServicesSESDevice = 0x0D, + kINQUIRY_PERIPHERAL_TYPE_SimplifiedDirectAccessRBCDevice = 0x0E, + kINQUIRY_PERIPHERAL_TYPE_OpticalCardReaderOCRWDevice = 0x0F, + /* 0x10 - 0x1E Reserved Device Types */ + kINQUIRY_PERIPHERAL_TYPE_ObjectBasedStorageDevice = 0x11, + kINQUIRY_PERIPHERAL_TYPE_AutomationDriveInterface = 0x12, + kINQUIRY_PERIPHERAL_TYPE_WellKnownLogicalUnit = 0x1E, + kINQUIRY_PERIPHERAL_TYPE_UnknownOrNoDeviceType = 0x1F, + + + kINQUIRY_PERIPHERAL_TYPE_Mask = 0x1F +}; + + +/*! +@enum Removable Bit field definitions +@discussion +Inquiry Removable Bit field definitions +@constant kINQUIRY_PERIPHERAL_RMB_MediumFixed +Medium type is fixed disk. +@constant kINQUIRY_PERIPHERAL_RMB_MediumRemovable +Medium type is removable disk. +@constant kINQUIRY_PERIPHERAL_RMB_BitMask +Mask to use for RMB field. +*/ +enum +{ + kINQUIRY_PERIPHERAL_RMB_MediumFixed = 0x00, + kINQUIRY_PERIPHERAL_RMB_MediumRemovable = 0x80, + kINQUIRY_PERIPHERAL_RMB_BitMask = 0x80 +}; + + +/*! +@enum Version field definitions +@discussion +Definitions for bits/masks in the INQUIRY Version field. +@constant kINQUIRY_ISO_IEC_VERSION_Mask +Mask for valid bits for ISO/IEC Version. +@constant kINQUIRY_ECMA_VERSION_Mask +Mask for valid bits for ECMA Version. +@constant kINQUIRY_ANSI_VERSION_NoClaimedConformance +No ANSI conformance claimed by the device server. +@constant kINQUIRY_ANSI_VERSION_SCSI_1_Compliant +SCSI-1 conformance claimed by the device server. +@constant kINQUIRY_ANSI_VERSION_SCSI_2_Compliant +SCSI-2 conformance claimed by the device server. +@constant kINQUIRY_ANSI_VERSION_SCSI_SPC_Compliant +SPC conformance claimed by the device server. +@constant kINQUIRY_ANSI_VERSION_SCSI_SPC_2_Compliant +SPC-2 conformance claimed by the device server. +@constant kINQUIRY_ANSI_VERSION_SCSI_SPC_3_Compliant +SPC-3 conformance claimed by the device server. +@constant kINQUIRY_ANSI_VERSION_Mask +Mask for valid bits for ANSI Version. +*/ +enum +{ + kINQUIRY_ISO_IEC_VERSION_Mask = 0xC0, + + kINQUIRY_ECMA_VERSION_Mask = 0x38, + + kINQUIRY_ANSI_VERSION_NoClaimedConformance = 0x00, + kINQUIRY_ANSI_VERSION_SCSI_1_Compliant = 0x01, + kINQUIRY_ANSI_VERSION_SCSI_2_Compliant = 0x02, + kINQUIRY_ANSI_VERSION_SCSI_SPC_Compliant = 0x03, + kINQUIRY_ANSI_VERSION_SCSI_SPC_2_Compliant = 0x04, + kINQUIRY_ANSI_VERSION_SCSI_SPC_3_Compliant = 0x05, + kINQUIRY_ANSI_VERSION_Mask = 0x07 +}; + + +/*! +@enum Response Data Format field definitions +@discussion +Definitions for bits/masks in the INQUIRY RESPONSE_DATA_FORMAT field. +@constant kINQUIRY_Byte3_HISUP_Bit +HISUP bit definition. +@constant kINQUIRY_Byte3_NORMACA_Bit +NORMACA bit definition. +@constant kINQUIRY_Byte3_AERC_Bit +AERC bit definition. +@constant kINQUIRY_RESPONSE_DATA_FORMAT_Mask +Mask for valid bits for RESPONSE_DATA_FORMAT. +@constant kINQUIRY_Byte3_HISUP_Mask +Mask to use to test the HISUP bit. +@constant kINQUIRY_Byte3_NORMACA_Mask +Mask to use to test the NORMACA bit. +@constant kINQUIRY_Byte3_AERC_Mask +Mask to use to test the AERC bit. +*/ +enum +{ + // Bit definitions + // Bits 0-3: RESPONSE DATA FORMAT + kINQUIRY_Byte3_HISUP_Bit = 4, + kINQUIRY_Byte3_NORMACA_Bit = 5, + // Bit 6 is Obsolete + kINQUIRY_Byte3_AERC_Bit = 7, + + // Masks + kINQUIRY_RESPONSE_DATA_FORMAT_Mask = 0x0F, // Bits 0-3 + kINQUIRY_Byte3_HISUP_Mask = (1 << kINQUIRY_Byte3_HISUP_Bit), + kINQUIRY_Byte3_NORMACA_Mask = (1 << kINQUIRY_Byte3_NORMACA_Bit), + // Bit 6 is Obsolete + kINQUIRY_Byte3_AERC_Mask = (1 << kINQUIRY_Byte3_AERC_Bit) +}; + + +/*! +@enum SCCS field definitions +@discussion +Definitions for bits/masks in the INQUIRY SCCSReserved field. +@constant kINQUIRY_Byte5_SCCS_Bit +SCCS bit definition. +@constant kINQUIRY_Byte5_ACC_Bit +ACC bit definition. +@constant kINQUIRY_Byte5_3PC_Bit +3PC bit definition. +@constant kINQUIRY_Byte5_PROTECT_Bit +PROTECT bit definition. +@constant kINQUIRY_Byte5_SCCS_Mask +Mask to use to test the SCCS bit. +@constant kINQUIRY_Byte5_ACC_Mask +Mask to use to test the ACC bit. +@constant kINQUIRY_Byte5_TPGS_Mask +Mask to use for the TPGS bits. +@constant kINQUIRY_Byte5_3PC_Mask +Mask to use to test the 3PC bit. +@constant kINQUIRY_Byte5_PROTECT_Mask +Mask to use to test the PROTECT bit. +*/ +enum +{ + // Bit definitions + kINQUIRY_Byte5_SCCS_Bit = 7, + kINQUIRY_Byte5_ACC_Bit = 6, + // Bits 4-5: TPGS + kINQUIRY_Byte5_3PC_Bit = 3, + // Bits 1-2: Reserved + kINQUIRY_Byte5_PROTECT_Bit = 0, + + // Masks + kINQUIRY_Byte5_SCCS_Mask = (1 << kINQUIRY_Byte5_SCCS_Bit), + kINQUIRY_Byte5_ACC_Mask = (1 << kINQUIRY_Byte5_ACC_Bit), + kINQUIRY_Byte5_TPGS_Mask = 0x18, + kINQUIRY_Byte5_3PC_Mask = (1 << kINQUIRY_Byte5_3PC_Bit), + // Bits 1-2: Reserved + kINQUIRY_Byte5_PROTECT_Mask = (1 << kINQUIRY_Byte5_PROTECT_Bit) +}; + + +/*! +@enum flags1 field definitions +@discussion +Definitions for bits/masks in the INQUIRY flags1 field. +@constant kINQUIRY_Byte6_ADDR16_Bit +ADDR16 bit definition. +@constant kINQUIRY_Byte6_MCHNGR_Bit +MCHNGR bit definition. +@constant kINQUIRY_Byte6_MULTIP_Bit +MULTIP bit definition. +@constant kINQUIRY_Byte6_VS_Bit +VS bit definition. +@constant kINQUIRY_Byte6_ENCSERV_Bit +ENCSERV bit definition. +@constant kINQUIRY_Byte6_BQUE_Bit +BQUE bit definition. +@constant kINQUIRY_Byte6_ADDR16_Mask +Mask to use to test the ADDR16 bit. +@constant kINQUIRY_Byte6_MCHNGR_Mask +Mask to use to test the MCHNGR bit. +@constant kINQUIRY_Byte6_MULTIP_Mask +Mask to use to test the MULTIP bit. +@constant kINQUIRY_Byte6_VS_Mask +Mask to use to test the VS bit. +@constant kINQUIRY_Byte6_ENCSERV_Mask +Mask to use to test the ENCSERV bit. +@constant kINQUIRY_Byte6_BQUE_Mask +Mask to use to test the BQUE bit. +*/ +enum +{ + // Byte offset + kINQUIRY_Byte6_Offset = 6, + + // Bit definitions + kINQUIRY_Byte6_ADDR16_Bit = 0, // SPI Specific + // Bit 1 is Obsolete + // Bit 2 is Obsolete + kINQUIRY_Byte6_MCHNGR_Bit = 3, + kINQUIRY_Byte6_MULTIP_Bit = 4, + kINQUIRY_Byte6_VS_Bit = 5, + kINQUIRY_Byte6_ENCSERV_Bit = 6, + kINQUIRY_Byte6_BQUE_Bit = 7, + + // Masks + kINQUIRY_Byte6_ADDR16_Mask = (1 << kINQUIRY_Byte6_ADDR16_Bit), // SPI Specific + // Bit 1 is Obsolete + // Bit 2 is Obsolete + kINQUIRY_Byte6_MCHNGR_Mask = (1 << kINQUIRY_Byte6_MCHNGR_Bit), + kINQUIRY_Byte6_MULTIP_Mask = (1 << kINQUIRY_Byte6_MULTIP_Bit), + kINQUIRY_Byte6_VS_Mask = (1 << kINQUIRY_Byte6_VS_Bit), + kINQUIRY_Byte6_ENCSERV_Mask = (1 << kINQUIRY_Byte6_ENCSERV_Bit), + kINQUIRY_Byte6_BQUE_Mask = (1 << kINQUIRY_Byte6_BQUE_Bit) +}; + + +/*! +@enum flags2 field definitions +@discussion +Definitions for bits/masks in the INQUIRY flags2 field. +@constant kINQUIRY_Byte7_VS_Bit +VS bit definition. +@constant kINQUIRY_Byte7_CMDQUE_Bit +CMDQUE bit definition. +@constant kINQUIRY_Byte7_TRANDIS_Bit +TRANDIS bit definition. +@constant kINQUIRY_Byte7_LINKED_Bit +LINKED bit definition. +@constant kINQUIRY_Byte7_SYNC_Bit +SYNC bit definition. +@constant kINQUIRY_Byte7_WBUS16_Bit +WBUS16 bit definition. +@constant kINQUIRY_Byte7_RELADR_Bit +RELADR bit definition. +@constant kINQUIRY_Byte7_VS_Mask +Mask to use to test the VS bit. +@constant kINQUIRY_Byte7_CMDQUE_Mask +Mask to use to test the CMDQUE bit. +@constant kINQUIRY_Byte7_TRANDIS_Mask +Mask to use to test the TRANDIS bit. +@constant kINQUIRY_Byte7_LINKED_Mask +Mask to use to test the LINKED bit. +@constant kINQUIRY_Byte7_SYNC_Mask +Mask to use to test the SYNC bit. +@constant kINQUIRY_Byte7_WBUS16_Mask +Mask to use to test the WBUS16 bit. +@constant kINQUIRY_Byte7_RELADR_Mask +Mask to use to test the RELADR bit. +*/ +enum +{ + // Byte offset + kINQUIRY_Byte7_Offset = 7, + + // Bit definitions + kINQUIRY_Byte7_VS_Bit = 0, + kINQUIRY_Byte7_CMDQUE_Bit = 1, + kINQUIRY_Byte7_TRANDIS_Bit = 2, // SPI Specific + kINQUIRY_Byte7_LINKED_Bit = 3, + kINQUIRY_Byte7_SYNC_Bit = 4, // SPI Specific + kINQUIRY_Byte7_WBUS16_Bit = 5, // SPI Specific + // Bit 6 is Obsolete + kINQUIRY_Byte7_RELADR_Bit = 7, + + // Masks + kINQUIRY_Byte7_VS_Mask = (1 << kINQUIRY_Byte7_VS_Bit), + kINQUIRY_Byte7_CMDQUE_Mask = (1 << kINQUIRY_Byte7_CMDQUE_Bit), + kINQUIRY_Byte7_TRANDIS_Mask = (1 << kINQUIRY_Byte7_TRANDIS_Bit),// SPI Specific + kINQUIRY_Byte7_LINKED_Mask = (1 << kINQUIRY_Byte7_LINKED_Bit), + kINQUIRY_Byte7_SYNC_Mask = (1 << kINQUIRY_Byte7_SYNC_Bit), // SPI Specific + kINQUIRY_Byte7_WBUS16_Mask = (1 << kINQUIRY_Byte7_WBUS16_Bit), // SPI Specific + // Bit 6 is Obsolete + kINQUIRY_Byte7_RELADR_Mask = (1 << kINQUIRY_Byte7_RELADR_Bit) +}; + + +/*! +@enum Byte 56 features field definitions +@discussion +Definitions for bits/masks in the INQUIRY Byte 56 field. +Inquiry Byte 56 features (for devices that report an ANSI VERSION of +kINQUIRY_ANSI_VERSION_SCSI_SPC_Compliant or later). +These are SPI-3 Specific. +@constant kINQUIRY_Byte56_IUS_Bit +IUS bit definition. +@constant kINQUIRY_Byte56_QAS_Bit +QAS bit definition. +@constant kINQUIRY_Byte56_IUS_Mask +Mask to use to test the IUS bit. +@constant kINQUIRY_Byte56_QAS_Mask +Mask to use to test the QAS bit. +@constant kINQUIRY_Byte56_CLOCKING_Mask +Mask to use to test CLOCKING bits. +@constant kINQUIRY_Byte56_CLOCKING_ONLY_ST +Single-transition clocking only. +@constant kINQUIRY_Byte56_CLOCKING_ONLY_DT +Double-transition clocking only. +@constant kINQUIRY_Byte56_CLOCKING_ST_AND_DT +Single-transition and double-transition clocking. +*/ +enum +{ + // Byte offset + kINQUIRY_Byte56_Offset = 56, + + // Bit definitions + kINQUIRY_Byte56_IUS_Bit = 0, + kINQUIRY_Byte56_QAS_Bit = 1, + // Bits 2 and 3 are the CLOCKING bits + // All other bits are reserved + + kINQUIRY_Byte56_IUS_Mask = (1 << kINQUIRY_Byte56_IUS_Bit), + kINQUIRY_Byte56_QAS_Mask = (1 << kINQUIRY_Byte56_QAS_Bit), + kINQUIRY_Byte56_CLOCKING_Mask = 0x0C, + + // Definitions for the CLOCKING bits + kINQUIRY_Byte56_CLOCKING_ONLY_ST = 0x00, + kINQUIRY_Byte56_CLOCKING_ONLY_DT = 0x04, + // kINQUIRY_Byte56_CLOCKING_RESERVED = 0x08, + kINQUIRY_Byte56_CLOCKING_ST_AND_DT = 0x0C +}; + + +/*! +@define kINQUIRY_VERSION_DESCRIPTOR_MaxCount +Maximum number of INQUIRY version descriptors supported. +*/ +#define kINQUIRY_VERSION_DESCRIPTOR_MaxCount 8 + + +/*! +@enum kINQUIRY_VERSION_DESCRIPTOR_SAT +SAT specification version descriptor. +*/ +enum +{ + kINQUIRY_VERSION_DESCRIPTOR_SAT = 0x1EA0 +}; + + +/* +IORegistry property names for information derived from the Inquiry data. +The Peripheral Device Type is the only property that the +generic Logical Unit Drivers will use to match. These properties are +listed in order of matching priority. First is the Peripheral Device Type. +Second is the Vendor Identification. Third is the Product Identification. +Last is the Product Revision Level. To match a particular product, you would +specify the Peripheral Device Type, Vendor Identification, and Product +Identification. To restrict the match to a particular firmware revision, you +would add the Product Revision Level. To not match on a particular product, +but on a particular vendor's products, you would only include the +Peripheral Device Type and the Vendor Identification. +*/ + +/*! +@define kIOPropertySCSIPeripheralDeviceType +SCSI Peripheral Device Type as reported in the INQUIRY data. +*/ +#define kIOPropertySCSIPeripheralDeviceType "Peripheral Device Type" + +/*! +@define kIOPropertySCSIPeripheralDeviceTypeSize +Size of the kIOPropertySCSIPeripheralDeviceType key. +*/ +#define kIOPropertySCSIPeripheralDeviceTypeSize 8 + +/* These properties are listed in order of matching priority */ + +/*! +@define kIOPropertySCSIVendorIdentification +Vendor ID as reported in the INQUIRY data. Additional space characters (0x20) +are truncated. +*/ +#define kIOPropertySCSIVendorIdentification "Vendor Identification" + +/*! +@define kIOPropertySCSIProductIdentification +Product ID as reported in the INQUIRY data. Additional space characters (0x20) +are truncated. +*/ +#define kIOPropertySCSIProductIdentification "Product Identification" + +/*! +@define kIOPropertySCSIProductRevisionLevel +Product Revision Level as reported in the INQUIRY data. +*/ +#define kIOPropertySCSIProductRevisionLevel "Product Revision Level" + + +/*! +@enum INQUIRY Page Codes +@discussion INQUIRY Page Codes to be used when EVPD is set in the +INQUIRY command. +@constant kINQUIRY_Page00_PageCode +Page Code 00h. +@constant kINQUIRY_Page80_PageCode +Page Code 80h. +@constant kINQUIRY_Page83_PageCode +Page Code 83h. +@constant kINQUIRY_Page89_PageCode +Page Code 89h. +*/ +enum +{ + kINQUIRY_Page00_PageCode = 0x00, + kINQUIRY_Page80_PageCode = 0x80, + kINQUIRY_Page83_PageCode = 0x83, + kINQUIRY_Page89_PageCode = 0x89 +}; + + +/*! +@struct SCSICmd_INQUIRY_Page00_Header +@discussion INQUIRY Page 00h Header. +*/ +typedef struct SCSICmd_INQUIRY_Page00_Header +{ + UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. + UInt8 PAGE_CODE; // Must be equal to 00h + UInt8 RESERVED; // reserved field + UInt8 PAGE_LENGTH; // n-3 bytes +} SCSICmd_INQUIRY_Page00_Header; + + +/*! +@struct SCSICmd_INQUIRY_Page80_Header +@discussion INQUIRY Page 80h Header. +*/ +typedef struct SCSICmd_INQUIRY_Page80_Header +{ + UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. + UInt8 PAGE_CODE; // Must be equal to 80h + UInt8 RESERVED; // reserved field + UInt8 PAGE_LENGTH; // n-3 bytes + UInt8 PRODUCT_SERIAL_NUMBER; // 4-n +} SCSICmd_INQUIRY_Page80_Header; + + +/*! +@define kIOPropertySCSIINQUIRYUnitSerialNumber +Key that describes the INQUIRY Unit Serial Number in the IORegistry. +*/ +#define kIOPropertySCSIINQUIRYUnitSerialNumber "INQUIRY Unit Serial Number" + + +/*! +@struct SCSICmd_INQUIRY_Page83_Header +@discussion INQUIRY Page 83h Header. +*/ +typedef struct SCSICmd_INQUIRY_Page83_Header +{ + UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. + UInt8 PAGE_CODE; // Must be equal to 83h + UInt8 RESERVED; // reserved field + UInt8 PAGE_LENGTH; // n-3 bytes +} SCSICmd_INQUIRY_Page83_Header; + + +/*! +@struct SCSICmd_INQUIRY_Page83_Header_SPC_16 +@discussion INQUIRY Page 83h Header used with the 16 byte INQUIRY command. +*/ +typedef struct SCSICmd_INQUIRY_Page83_Header_SPC_16 +{ + UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. + UInt8 PAGE_CODE; // Must be equal to 83h + UInt16 PAGE_LENGTH; // n-3 bytes +} SCSICmd_INQUIRY_Page83_Header_SPC_16; + + +/*! +@struct SCSICmd_INQUIRY_Page83_Identification_Descriptor +@discussion INQUIRY Page 83h Identification Descriptor. +*/ +typedef struct SCSICmd_INQUIRY_Page83_Identification_Descriptor +{ + UInt8 CODE_SET; // 7-4 = Protocol Identifier. 3-0 = Code Set + UInt8 IDENTIFIER_TYPE; // 7 = PIV 5-4 = ASSOCIATION 3-0 = Identifier + UInt8 RESERVED; + UInt8 IDENTIFIER_LENGTH; + UInt8 IDENTIFIER; +} SCSICmd_INQUIRY_Page83_Identification_Descriptor; + + +/*! +@enum INQUIRY Page 83h Code Set +@discussion +Definitions for the Code Set field. +@constant kINQUIRY_Page83_CodeSetBinaryData +The identifier contains binary data. +@constant kINQUIRY_Page83_CodeSetASCIIData +The identifier contains ASCII data. +@constant kINQUIRY_Page83_CodeSetUTF8Data +The identifier contains UTF-8 data. +*/ +enum +{ + kINQUIRY_Page83_CodeSetReserved = 0x0, + kINQUIRY_Page83_CodeSetBinaryData = 0x1, + kINQUIRY_Page83_CodeSetASCIIData = 0x2, + kINQUIRY_Page83_CodeSetUTF8Data = 0x3, + // 0x4 - 0xF reserved + kINQUIRY_Page83_CodeSetMask = 0xF +}; + + +/*! +@enum INQUIRY Page 83h Association +@discussion +Definitions for the Association field. +@constant kINQUIRY_Page83_AssociationLogicalUnit +Association of the identifier is with the logical unit. +@constant kINQUIRY_Page83_AssociationDevice +Association of the identifier is with the device (same as logical unit in SPC-2). +@constant kINQUIRY_Page83_AssociationTargetPort +Association of the identifier is with the target port. +@constant kINQUIRY_Page83_AssociationTargetDevice +Association of the identifier is with the target device (i.e. all ports). +@constant kINQUIRY_Page83_AssociationMask +Mask to use to determine association. +*/ +enum +{ + // SPC-3 - Association is changed to be specific to + // Logical Units + kINQUIRY_Page83_AssociationLogicalUnit = 0x00, + + // Backwards compatibility for SPC-2 + kINQUIRY_Page83_AssociationDevice = kINQUIRY_Page83_AssociationLogicalUnit, + + // Association is related to a Target Port + kINQUIRY_Page83_AssociationTargetPort = 0x10, + + // SPC-3 - Added as specific association to + // a Target device. + kINQUIRY_Page83_AssociationTargetDevice = 0x20, + + kINQUIRY_Page83_AssociationMask = 0x30 +}; + + +/*! +@enum INQUIRY Page 83h Identifier Type +@discussion +Definitions for the Identifier Type field. +@constant kINQUIRY_Page83_IdentifierTypeUndefined +Undefined Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeVendorID +Vendor Specific Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeIEEE_EUI64 +EUI-64 Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeNAAIdentifier +NAA Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeRelativePortIdentifier +Relative Target Port Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeTargetPortGroup +Target Port Group Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeLogicalUnitGroup +Logical Unit Group Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeMD5LogicalUnitIdentifier +MD5 Logical Unit Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeSCSINameString +SCSI Name String Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeMask +Mask to use to determine association. +@constant kINQUIRY_Page83_ProtocolIdentifierValidBit +PIV Bit definition. +@constant kINQUIRY_Page83_ProtocolIdentifierValidMask +Mask to use to determine if PIV is set. +*/ +enum +{ + kINQUIRY_Page83_IdentifierTypeUndefined = 0, + kINQUIRY_Page83_IdentifierTypeVendorID = 1, + kINQUIRY_Page83_IdentifierTypeIEEE_EUI64 = 2, + kINQUIRY_Page83_IdentifierTypeNAAIdentifier = 3, + kINQUIRY_Page83_IdentifierTypeRelativePortIdentifier = 4, + kINQUIRY_Page83_IdentifierTypeTargetPortGroup = 5, + kINQUIRY_Page83_IdentifierTypeLogicalUnitGroup = 6, + kINQUIRY_Page83_IdentifierTypeMD5LogicalUnitIdentifier = 7, + kINQUIRY_Page83_IdentifierTypeSCSINameString = 8, + // 0x9 - 0xF Reserved + + kINQUIRY_Page83_IdentifierTypeMask = 0xF, + + kINQUIRY_Page83_ProtocolIdentifierValidBit = 7, + kINQUIRY_Page83_ProtocolIdentifierValidMask = (1 << kINQUIRY_Page83_ProtocolIdentifierValidBit) + +}; + +// Backwards compatibility +#define kINQUIRY_Page83_IdentifierTypeFCNameIdentifier kINQUIRY_Page83_IdentifierTypeNAAIdentifier + + +/*! +@enum Protocol Identifier values +@discussion +Definitions for the protocol identifier values. +@constant kSCSIProtocolIdentifier_FibreChannel +FibreChannel Protocol Identifier. +@constant kSCSIProtocolIdentifier_ParallelSCSI +Parallel SCSI Protocol Identifier. +@constant kSCSIProtocolIdentifier_SSA +SSA Protocol Identifier. +@constant kSCSIProtocolIdentifier_FireWire +FireWire (IEEE-1394) Protocol Identifier. +@constant kSCSIProtocolIdentifier_RDMA +RDMA Protocol Identifier. +@constant kSCSIProtocolIdentifier_iSCSI +iSCSI Protocol Identifier. +@constant kSCSIProtocolIdentifier_SAS +SAS Protocol Identifier. +@constant kSCSIProtocolIdentifier_ADT +ADT Protocol Identifier. +@constant kSCSIProtocolIdentifier_ATAPI +ATAPI Protocol Identifier. +@constant kSCSIProtocolIdentifier_None +No Protocol Identifier. +*/ +enum +{ + kSCSIProtocolIdentifier_FibreChannel = 0, + kSCSIProtocolIdentifier_ParallelSCSI = 1, + kSCSIProtocolIdentifier_SSA = 2, + kSCSIProtocolIdentifier_FireWire = 3, + kSCSIProtocolIdentifier_RDMA = 4, + kSCSIProtocolIdentifier_iSCSI = 5, + kSCSIProtocolIdentifier_SAS = 6, + kSCSIProtocolIdentifier_ADT = 7, + kSCSIProtocolIdentifier_ATAPI = 8, + // 0x9-0xE Reserved + kSCSIProtocolIdentifier_None = 0xF +}; + + +/*! +@define kIOPropertySCSIINQUIRYDeviceIdentification +Device Identification key. +*/ +#define kIOPropertySCSIINQUIRYDeviceIdentification "INQUIRY Device Identification" + + +/*! +@define kIOPropertySCSIINQUIRYDeviceIdCodeSet +Code Set type key. +*/ +#define kIOPropertySCSIINQUIRYDeviceIdCodeSet "Code Set" + + +/*! +@define kIOPropertySCSIINQUIRYDeviceIdType +Identifier Type key. +*/ +#define kIOPropertySCSIINQUIRYDeviceIdType "Identifier Type" + + +/*! +@define kIOPropertySCSIINQUIRYDeviceIdAssociation +Association key. +*/ +#define kIOPropertySCSIINQUIRYDeviceIdAssociation "Association" + + +/*! +@define kIOPropertySCSIINQUIRYDeviceIdentifier +Identifier key (data or string). +*/ +#define kIOPropertySCSIINQUIRYDeviceIdentifier "Identifier" + + +/*! +@struct SCSICmd_INQUIRY_Page89_Data +@discussion INQUIRY Page 89h data as defined in the SAT 1.0 +specification. This section contians all structures and +definitions used by the INQUIRY command in response to a request +for page 89h - ATA information VPD Page. +*/ +typedef struct SCSICmd_INQUIRY_Page89_Data +{ + UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. + UInt8 PAGE_CODE; // Must be equal to 89h + UInt16 PAGE_LENGTH; // Must be equal to 238h + UInt32 Reserved; + UInt8 SAT_VENDOR_IDENTIFICATION[kINQUIRY_VENDOR_IDENTIFICATION_Length]; + UInt8 SAT_PRODUCT_IDENTIFICATION[kINQUIRY_PRODUCT_IDENTIFICATION_Length]; + UInt8 SAT_PRODUCT_REVISION_LEVEL[kINQUIRY_PRODUCT_REVISION_LEVEL_Length]; + UInt8 ATA_DEVICE_SIGNATURE[20]; + UInt8 COMMAND_CODE; + UInt8 Reserved2[3]; + UInt8 IDENTIFY_DATA[512]; +} SCSICmd_INQUIRY_Page89_Data; + + +/*! +@define kIOPropertySATVendorIdentification +Vendor Identification of the SATL. +*/ +#define kIOPropertySATVendorIdentification "SAT Vendor Identification" + + +/*! +@define kIOPropertySATProductIdentification +Product Identification of the SATL. +*/ +#define kIOPropertySATProductIdentification "SAT Product Identification" + + +/*! +@define kIOPropertySATProductRevisonLevel +Product Revision Level of the SATL. +*/ +#define kIOPropertySATProductRevisonLevel "SAT Product Revision Level" + + +#endif /* _IOKIT_SCSI_CMDS_INQUIRY_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_MODE_Definitions.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_MODE_Definitions.h.svn-base new file mode 100644 index 0000000..8d9c250 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_MODE_Definitions.h.svn-base @@ -0,0 +1,559 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_SCSI_CMDS_MODE_DEFINITIONS_H_ +#define _IOKIT_SCSI_CMDS_MODE_DEFINITIONS_H_ + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +#if KERNEL +#include +#else +#include +#endif + + +/*! @header SCSI Request Sense Definitions + @discussion + This file contains all definitions for the data returned from + the MODE_SENSE_6 and MODE_SENSE_10 commands. +*/ + +#pragma pack(1) + +/*! +@struct SPCModeParameterHeader6 +@discussion +Mode Parameter Header for the MODE_SENSE_6 command. +*/ +typedef struct SPCModeParameterHeader6 +{ + UInt8 MODE_DATA_LENGTH; + UInt8 MEDIUM_TYPE; + UInt8 DEVICE_SPECIFIC_PARAMETER; + UInt8 BLOCK_DESCRIPTOR_LENGTH; +} SPCModeParameterHeader6; + + +/*! +@struct SPCModeParameterHeader10 +@discussion +Mode Parameter Header for the MODE_SENSE_10 command. +*/ +typedef struct SPCModeParameterHeader10 +{ + UInt16 MODE_DATA_LENGTH; + UInt8 MEDIUM_TYPE; + UInt8 DEVICE_SPECIFIC_PARAMETER; + UInt8 LONGLBA; + UInt8 RESERVED; + UInt16 BLOCK_DESCRIPTOR_LENGTH; +} SPCModeParameterHeader10; + + +/*! +@enum Long LBA Bitfield definitions +@discussion +Long LBA Bitfield definitions for Mode Parameter Header +for MODE_SENSE_10 command. +@constant kModeSenseParameterHeader10_LongLBABit +Bit to indicate Long LBA block descriptors follow. +@constant kModeSenseParameterHeader10_LongLBAMask +Mask to test for kModeSenseParameterHeader10_LongLBABit. +*/ +enum +{ + kModeSenseParameterHeader10_LongLBABit = 0, + kModeSenseParameterHeader10_LongLBAMask = (1 << kModeSenseParameterHeader10_LongLBABit), +}; + + +/*! +@enum Device Specific Parameter Bitfield definitions +@discussion +SBC definitions for Device Specific Parameter in the +Mode Sense Header Block. +@constant kModeSenseSBCDeviceSpecific_DPOFUABit +Bit to indicate DPO and FUA bits are accepted by the device server. +@constant kModeSenseSBCDeviceSpecific_WriteProtectBit +Bit to indicate medium is write protected. +@constant kModeSenseSBCDeviceSpecific_DPOFUAMask +Mask to test for kModeSenseSBCDeviceSpecific_DPOFUABit. +@constant kModeSenseSBCDeviceSpecific_WriteProtectMask +Mask to test for kModeSenseSBCDeviceSpecific_WriteProtectBit. +*/ +enum +{ + kModeSenseSBCDeviceSpecific_DPOFUABit = 4, + kModeSenseSBCDeviceSpecific_WriteProtectBit = 7, + kModeSenseSBCDeviceSpecific_DPOFUAMask = (1 << kModeSenseSBCDeviceSpecific_DPOFUABit), + kModeSenseSBCDeviceSpecific_WriteProtectMask = (1 << kModeSenseSBCDeviceSpecific_WriteProtectBit) +}; + + +/*! +@struct ModeParameterBlockDescriptor +@discussion +General mode parameter block descriptor. +*/ +typedef struct ModeParameterBlockDescriptor +{ + UInt8 DENSITY_CODE; + UInt8 NUMBER_OF_BLOCKS[3]; + UInt8 RESERVED; + UInt8 BLOCK_LENGTH[3]; +} ModeParameterBlockDescriptor; + + +/*! +@struct DASDModeParameterBlockDescriptor +@discussion +Direct Access Storage Device mode parameter block descriptor. +*/ +typedef struct DASDModeParameterBlockDescriptor +{ + UInt32 NUMBER_OF_BLOCKS; + UInt8 DENSITY_CODE; + UInt8 BLOCK_LENGTH[3]; +} DASDModeParameterBlockDescriptor; + + +/*! +@struct LongLBAModeParameterBlockDescriptor +@discussion +Long LBA mode parameter block descriptor. +*/ +typedef struct LongLBAModeParameterBlockDescriptor +{ + UInt64 NUMBER_OF_BLOCKS; + UInt8 DENSITY_CODE; + UInt8 RESERVED[3]; + UInt32 BLOCK_LENGTH; +} LongLBAModeParameterBlockDescriptor; + + +/*! +@struct ModePageFormatHeader +@discussion +Mode Page format header. +*/ +typedef struct ModePageFormatHeader +{ + UInt8 PS_PAGE_CODE; + UInt8 PAGE_LENGTH; +} ModePageFormatHeader; + + +/*! +@enum Mode Page Format bit definitions +@discussion +Mode Page Format bit definitions. +@constant kModePageFormat_PS_Bit +Bit to indicate Parameters Saveable. +@constant kModePageFormat_PAGE_CODE_Mask +Mask to obtain the PAGE_CODE from the PS_PAGE_CODE field. +@constant kModePageFormat_PS_Mask +Mask to test for kModePageFormat_PS_Bit. +*/ +enum +{ + kModePageFormat_PS_Bit = 7, + + kModePageFormat_PAGE_CODE_Mask = 0x3F, + kModePageFormat_PS_Mask = (1 << kModePageFormat_PS_Bit) +}; + + +#if 0 +#pragma mark - +#pragma mark SPC Mode Pages +#pragma mark - +#endif + + +/*! +@enum SPC Mode Pages +@discussion +SPC Mode Page definitions. +@constant kSPCModePagePowerConditionCode +Power Conditions Mode Page value. +@constant kSPCModePageAllPagesCode +All Mode Pages value. +*/ +enum +{ + kSPCModePagePowerConditionCode = 0x1A, + kSPCModePageAllPagesCode = 0x3F +}; + +/*! +@struct SPCModePagePowerCondition +@discussion +Power Conditions Mode Page (PAGE CODE 0x1A) format. +*/ +typedef struct SPCModePagePowerCondition +{ + ModePageFormatHeader header; + UInt8 RESERVED; + UInt8 IDLE_STANDBY; + UInt32 IDLE_CONDITION_TIMER; + UInt32 STANDBY_CONDITION_TIMER; +} SPCModePagePowerCondition; + + +#if 0 +#pragma mark - +#pragma mark 0x00 SBC Direct Access Mode Pages +#pragma mark - +#endif + + +/*! +@enum SBC Mode Pages +@discussion +SBC Mode Page definitions. +@constant kSBCModePageFormatDeviceCode +Format Device Mode Page value. +@constant kSBCModePageRigidDiskGeometryCode +Rigid Disk Geometry Page value. +@constant kSBCModePageFlexibleDiskCode +Flexible Disk Page value. +@constant kSBCModePageCachingCode +Caching Page value. +*/ +enum +{ + kSBCModePageFormatDeviceCode = 0x03, + kSBCModePageRigidDiskGeometryCode = 0x04, + kSBCModePageFlexibleDiskCode = 0x05, + kSBCModePageCachingCode = 0x08 +}; + + +/*! +@struct SBCModePageFormatDevice +@discussion +Format Device Mode Page (PAGE CODE 0x03) format. +*/ +typedef struct SBCModePageFormatDevice +{ + ModePageFormatHeader header; + UInt16 TRACKS_PER_ZONE; + UInt16 ALTERNATE_SECTORS_PER_ZONE; + UInt16 ALTERNATE_TRACKS_PER_ZONE; + UInt16 ALTERNATE_TRACKS_PER_LOGICAL_UNIT; + UInt16 SECTORS_PER_TRACK; + UInt16 DATA_BYTES_PER_PHYSICAL_SECTOR; + UInt16 INTERLEAVE; + UInt16 TRACK_SKEW_FACTOR; + UInt16 CYLINDER_SKEW_FACTOR; + UInt8 SSEC_HSEC_RMB_SURF; + UInt8 RESERVED[3]; +} SBCModePageFormatDevice; + + +/*! +@struct SBCModePageRigidDiskGeometry +@discussion +Rigid Disk Geometry Mode Page (PAGE CODE 0x04) format. +*/ +typedef struct SBCModePageRigidDiskGeometry +{ + ModePageFormatHeader header; + UInt8 NUMBER_OF_CYLINDERS[3]; + UInt8 NUMBER_OF_HEADS; + UInt8 STARTING_CYLINDER_WRITE_PRECOMPENSATION[3]; + UInt8 STARTING_CYLINDER_REDUCED_WRITE_CURRENT[3]; + UInt16 DEVICE_STEP_RATE; + UInt8 LANDING_ZONE_CYLINDER[3]; + UInt8 RPL; + UInt8 ROTATIONAL_OFFSET; + UInt8 RESERVED; + UInt16 MEDIUM_ROTATION_RATE; + UInt8 RESERVED1[2]; +} SBCModePageRigidDiskGeometry; + + +/*! +@enum Rigid Disk Geometry bitfields +@discussion +Bit field masks for Rigid Disk Geometry structure fields. +@constant kSBCModePageRigidDiskGeometry_RPL_Mask +Mask for use with the RPL field. +*/ +enum +{ + kSBCModePageRigidDiskGeometry_RPL_Mask = 0x03 +}; + + +/*! +@struct SBCModePageFlexibleDisk +@discussion +Flexible Disk Mode Page (PAGE CODE 0x05) format. +*/ +typedef struct SBCModePageFlexibleDisk +{ + ModePageFormatHeader header; + UInt16 TRANSFER_RATE; + UInt8 NUMBER_OF_HEADS; + UInt8 SECTORS_PER_TRACK; + UInt16 DATA_BYTES_PER_SECTOR; + UInt16 NUMBER_OF_CYLINDERS; + UInt16 STARTING_CYLINDER_WRITE_PRECOMPENSATION; + UInt16 STARTING_CYLINDER_REDUCED_WRITE_CURRENT; + UInt16 DEVICE_STEP_RATE; + UInt8 DEVICE_STEP_PULSE_WIDTH; + UInt16 HEAD_SETTLE_DELAY; + UInt8 MOTOR_ON_DELAY; + UInt8 MOTOR_OFF_DELAY; + UInt8 TRDY_SSN_MO; + UInt8 SPC; + UInt8 WRITE_COMPENSATION; + UInt8 HEAD_LOAD_DELAY; + UInt8 HEAD_UNLOAD_DELAY; + UInt8 PIN_34_PIN_2; + UInt8 PIN_4_PIN_1; + UInt16 MEDIUM_ROTATION_RATE; + UInt8 RESERVED[2]; +} SBCModePageFlexibleDisk; + + +/*! +@enum TRDY_SSN_MO bitfields +@discussion +Bit field definitions and masks for Flexible Disk TRDY_SSN_MO field. +@constant kSBCModePageFlexibleDisk_MO_Bit +MO Bit definition. +@constant kSBCModePageFlexibleDisk_SSN_Bit +SSN Bit definition. +@constant kSBCModePageFlexibleDisk_TRDY_Bit +TRDY Bit definition. +@constant kSBCModePageFlexibleDisk_MO_Mask +Mask for use with TRDY_SSN_MO field. +@constant kSBCModePageFlexibleDisk_SSN_Mask +Mask for use with TRDY_SSN_MO field. +@constant kSBCModePageFlexibleDisk_TRDY_Mask +Mask for use with TRDY_SSN_MO field. +*/ +enum +{ + // Bits 0:4 Reserved + kSBCModePageFlexibleDisk_MO_Bit = 5, + kSBCModePageFlexibleDisk_SSN_Bit = 6, + kSBCModePageFlexibleDisk_TRDY_Bit = 7, + + kSBCModePageFlexibleDisk_MO_Mask = (1 << kSBCModePageFlexibleDisk_MO_Bit), + kSBCModePageFlexibleDisk_SSN_Mask = (1 << kSBCModePageFlexibleDisk_SSN_Bit), + kSBCModePageFlexibleDisk_TRDY_Mask = (1 << kSBCModePageFlexibleDisk_TRDY_Bit) +}; + + +/*! +@enum SPC bitfields +@discussion +Bit field definitions and masks for Flexible Disk SPC field. +@constant kSBCModePageFlexibleDisk_SPC_Mask +Mask for use with SPC field. +*/ +enum +{ + kSBCModePageFlexibleDisk_SPC_Mask = 0x0F +}; + + +/*! +@enum PIN_34_PIN_2 bitfields +@discussion +Bit field definitions and masks for Flexible Disk PIN_34_PIN_2 field. +@constant kSBCModePageFlexibleDisk_PIN_2_Mask +Mask for use with PIN_34_PIN_2 field. +@constant kSBCModePageFlexibleDisk_PIN_34_Mask +Mask for use with PIN_34_PIN_2 field. +*/ +enum +{ + kSBCModePageFlexibleDisk_PIN_2_Mask = 0x0F, + kSBCModePageFlexibleDisk_PIN_34_Mask = 0xF0 +}; + + +/*! +@enum PIN_4_PIN_1 bitfields +@discussion +Bit field definitions and masks for Flexible Disk PIN_4_PIN_1 field. +@constant kSBCModePageFlexibleDisk_PIN_1_Mask +Mask for use with PIN_4_PIN_1 field. +@constant kSBCModePageFlexibleDisk_PIN_4_Mask +Mask for use with PIN_4_PIN_1 field. +*/ +enum +{ + kSBCModePageFlexibleDisk_PIN_1_Mask = 0x0F, + kSBCModePageFlexibleDisk_PIN_4_Mask = 0xF0 +}; + + +/*! +@struct SBCModePageCaching +@discussion +Caching Mode Page (PAGE CODE 0x08) format. +*/ +typedef struct SBCModePageCaching +{ + ModePageFormatHeader header; + UInt8 flags; + UInt8 DEMAND_READ_WRITE_RETENTION_PRIORITY; + UInt16 DISABLE_PREFETCH_TRANSFER_LENGTH; + UInt16 MINIMUM_PREFETCH; + UInt16 MAXIMUM_PREFETCH; + UInt16 MAXIMUM_PREFETCH_CEILING; + UInt8 flags2; + UInt8 NUMBER_OF_CACHE_SEGMENTS; + UInt16 CACHE_SEGMENT_SIZE; + UInt8 RESERVED; + UInt8 NON_CACHE_SEGMENT_SIZE[3]; +} SBCModePageCaching; + + +/*! +@enum Caching flags bitfields +@discussion +Bit field definitions and masks for Caching flags field. +@constant kSBCModePageCaching_RCD_Bit +RCD Bit definition. +@constant kSBCModePageCaching_MF_Bit +MF Bit definition. +@constant kSBCModePageCaching_WCE_Bit +WCE Bit definition. +@constant kSBCModePageCaching_SIZE_Bit +SIZE Bit definition. +@constant kSBCModePageCaching_DISC_Bit +DISC Bit definition. +@constant kSBCModePageCaching_CAP_Bit +CAP Bit definition. +@constant kSBCModePageCaching_ABPF_Bit +ABPF Bit definition. +@constant kSBCModePageCaching_IC_Bit +IC Bit definition. +@constant kSBCModePageCaching_RCD_Mask +Mask for use with flags field. +@constant kSBCModePageCaching_MF_Mask +Mask for use with flags field. +@constant kSBCModePageCaching_WCE_Mask +Mask for use with flags field. +@constant kSBCModePageCaching_SIZE_Mask +Mask for use with flags field. +@constant kSBCModePageCaching_DISC_Mask +Mask for use with flags field. +@constant kSBCModePageCaching_CAP_Mask +Mask for use with flags field. +@constant kSBCModePageCaching_ABPF_Mask +Mask for use with flags field. +@constant kSBCModePageCaching_IC_Mask +Mask for use with flags field. +*/ +enum +{ + kSBCModePageCaching_RCD_Bit = 0, + kSBCModePageCaching_MF_Bit = 1, + kSBCModePageCaching_WCE_Bit = 2, + kSBCModePageCaching_SIZE_Bit = 3, + kSBCModePageCaching_DISC_Bit = 4, + kSBCModePageCaching_CAP_Bit = 5, + kSBCModePageCaching_ABPF_Bit = 6, + kSBCModePageCaching_IC_Bit = 7, + + kSBCModePageCaching_RCD_Mask = (1 << kSBCModePageCaching_RCD_Bit), + kSBCModePageCaching_MF_Mask = (1 << kSBCModePageCaching_MF_Bit), + kSBCModePageCaching_WCE_Mask = (1 << kSBCModePageCaching_WCE_Bit), + kSBCModePageCaching_SIZE_Mask = (1 << kSBCModePageCaching_SIZE_Bit), + kSBCModePageCaching_DISC_Mask = (1 << kSBCModePageCaching_DISC_Bit), + kSBCModePageCaching_CAP_Mask = (1 << kSBCModePageCaching_CAP_Bit), + kSBCModePageCaching_ABPF_Mask = (1 << kSBCModePageCaching_ABPF_Bit), + kSBCModePageCaching_IC_Mask = (1 << kSBCModePageCaching_IC_Bit) +}; + + +/*! +@enum Demand Read/Write Retention masks +@discussion +Demand Read/Write Retention masks. +@constant kSBCModePageCaching_DEMAND_WRITE_Mask +Mask for the DEMAND_READ_WRITE_RETENTION_PRIORITY field. +@constant kSBCModePageCaching_DEMAND_READ_Mask +Mask for the DEMAND_READ_WRITE_RETENTION_PRIORITY field. +*/ +enum +{ + kSBCModePageCaching_DEMAND_WRITE_Mask = 0x00FF, + kSBCModePageCaching_DEMAND_READ_Mask = 0xFF00 +}; + +/*! +@enum Caching flags2 bitfields +@discussion +Bit field definitions and masks for Caching flags2 field. +@constant kSBCModePageCaching_VS1_Bit +VS1 Bit definition. +@constant kSBCModePageCaching_VS2_Bit +VS2 Bit definition. +@constant kSBCModePageCaching_DRA_Bit +DRA Bit definition. +@constant kSBCModePageCaching_LBCSS_Bit +LBCSS Bit definition. +@constant kSBCModePageCaching_FSW_Bit +FSW Bit definition. +@constant kSBCModePageCaching_VS1_Mask +Mask for use with flags2 field. +@constant kSBCModePageCaching_VS2_Mask +Mask for use with flags2 field. +@constant kSBCModePageCaching_DRA_Mask +Mask for use with flags2 field. +@constant kSBCModePageCaching_LBCSS_Mask +Mask for use with flags2 field. +@constant kSBCModePageCaching_FSW_Mask +Mask for use with flags2 field. +*/ +enum +{ + // Bits 0:2 Reserved + kSBCModePageCaching_VS1_Bit = 3, + kSBCModePageCaching_VS2_Bit = 4, + kSBCModePageCaching_DRA_Bit = 5, + kSBCModePageCaching_LBCSS_Bit = 6, + kSBCModePageCaching_FSW_Bit = 7, + + kSBCModePageCaching_VS1_Mask = (1 << kSBCModePageCaching_VS1_Bit), + kSBCModePageCaching_VS2_Mask = (1 << kSBCModePageCaching_VS2_Bit), + kSBCModePageCaching_DRA_Mask = (1 << kSBCModePageCaching_DRA_Bit), + kSBCModePageCaching_LBCSS_Mask = (1 << kSBCModePageCaching_LBCSS_Bit), + kSBCModePageCaching_FSW_Mask = (1 << kSBCModePageCaching_FSW_Bit) +}; + +#pragma options align=reset + +#endif /* _IOKIT_SCSI_CMDS_MODE_DEFINITIONS_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_READ_CAPACITY_Definitions.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_READ_CAPACITY_Definitions.h.svn-base new file mode 100644 index 0000000..59abde3 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_READ_CAPACITY_Definitions.h.svn-base @@ -0,0 +1,141 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_SCSI_CMDS_READ_CAPACITY_H_ +#define _IOKIT_SCSI_CMDS_READ_CAPACITY_H_ + + +#if KERNEL +#include +#else +#include +#endif + + +/*! @header SCSI Request Sense Definitions + @discussion + This file contains all definitions for the data returned from + the READ CAPACITY 10 (0x25) and READ CAPACITY 16 (0x9E) commands. +*/ + +/*! +@enum READ CAPACITY Payload Sizes +@discussion +Sizes of the payload for the READ CAPACITY 10 and +READ CAPACITY 16 commands. +@constant kREPORT_CAPACITY_DataSize +Data size for a READ_CAPACITY command. +@constant kREPORT_CAPACITY_16_DataSize +Data size for a READ_CAPACITY_16 command. +*/ +enum +{ + kREPORT_CAPACITY_DataSize = 8, + kREPORT_CAPACITY_16_DataSize = 32 +}; + + +/*! +@constant kREPORT_CAPACITY_MaximumLBA +@discussion +Maximum LBA supported via READ CAPACITY 10 command. +*/ +#define kREPORT_CAPACITY_MaximumLBA 0xFFFFFFFFUL + + +/*! +@constant kREPORT_CAPACITY_16_MaximumLBA +@discussion +Maximum LBA supported via READ CAPACITY 16 command. +*/ +#define kREPORT_CAPACITY_16_MaximumLBA 0xFFFFFFFFFFFFFFFFULL + + +/*! +@struct SCSI_Capacity_Data +@discussion +Capacity return structure for READ CAPACITY 10 command. +*/ +typedef struct SCSI_Capacity_Data +{ + UInt32 RETURNED_LOGICAL_BLOCK_ADDRESS; + UInt32 BLOCK_LENGTH_IN_BYTES; +} SCSI_Capacity_Data; + + +/*! +@struct SCSI_Capacity_Data_Long +@discussion +Capacity return structure for READ CAPACITY 16 command. +*/ +typedef struct SCSI_Capacity_Data_Long +{ + UInt64 RETURNED_LOGICAL_BLOCK_ADDRESS; + UInt32 BLOCK_LENGTH_IN_BYTES; + UInt8 RTO_EN_PROT_EN; + UInt8 Reserved[19]; +} SCSI_Capacity_Data_Long; + + +/*! +@enum RTO_EN definitions +@discussion +Values for the REFERENCE TAG OWN (RTO_EN) bit in the +READ CAPACITY Long Data structure. +@constant kREAD_CAPACITY_RTO_Enabled +Reference Tag Own enabled. +@constant kREAD_CAPACITY_RTO_Disabled +Reference Tag Own disabled. +@constant kREAD_CAPACITY_RTO_Mask +Mask to use when checking the RTO_EN_PROT_EN field. +*/ +enum +{ + kREAD_CAPACITY_RTO_Enabled = 0x02, + kREAD_CAPACITY_RTO_Disabled = 0x00, + kREAD_CAPACITY_RTO_Mask = 0x02 +}; + + +/*! +@enum PROTECTION INFORMATION definitions +@discussion +Values for the PROTECTION INFORMATION (PROT_EN) bit in the +READ CAPACITY Long Data structure. +@constant kREAD_CAPACITY_PROT_Enabled +Protection Information enabled. +@constant kREAD_CAPACITY_PROT_Disabled +Protection Information disabled. +@constant kREAD_CAPACITY_PROT_Mask +Mask to use when checking the RTO_EN_PROT_EN field. +*/ + +enum +{ + kREAD_CAPACITY_PROT_Enabled = 0x01, + kREAD_CAPACITY_PROT_Disabled = 0x00, + kREAD_CAPACITY_PROT_Mask = 0x01 +}; + + +#endif /* _IOKIT_SCSI_CMDS_READ_CAPACITY_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_REPORT_LUNS_Definitions.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_REPORT_LUNS_Definitions.h.svn-base new file mode 100644 index 0000000..6616e84 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_REPORT_LUNS_Definitions.h.svn-base @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2004-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_SCSI_CMDS_REPORT_LUNS_DEFINITIONS_H_ +#define _IOKIT_SCSI_CMDS_REPORT_LUNS_DEFINITIONS_H_ + + +#if KERNEL +#include +#else +#include +#endif + + +/*! @header SCSI Request Sense Definitions + @discussion + This file contains all definitions for the data returned from + the REPORT_LUNS (0xA0) command. +*/ + + +/*! +@struct SCSICmd_REPORT_LUNS_LUN_ENTRY +@discussion +This structure represents a single LUN entry in a LUN list +returned via the REPORT_LUNS command. +*/ +typedef struct SCSICmd_REPORT_LUNS_LUN_ENTRY +{ + UInt16 FIRST_LEVEL_ADDRESSING; + UInt16 SECOND_LEVEL_ADDRESSING; + UInt16 THIRD_LEVEL_ADDRESSING; + UInt16 FOURTH_LEVEL_ADDRESSING; +} SCSICmd_REPORT_LUNS_LUN_ENTRY; + + +/*! +@constant kREPORT_LUNS_HeaderSize +@discussion +Size of the REPORT_LUNS header as defined in the SPC-3 specification. +*/ +#define kREPORT_LUNS_HeaderSize 8 + +/*! +@enum REPORT_LUNS addressing methods. +@discussion +REPORT_LUNS addressing methods described in +SAM-2 documents. +@constant kREPORT_LUNS_ADDRESS_METHOD_PERIPHERAL_DEVICE +Peripheral Device Addressing Method. +@constant kREPORT_LUNS_ADDRESS_DEVICE_TYPE_SPECIFIC +Device Type Specific Addressing Method. +@constant kREPORT_LUNS_ADDRESS_METHOD_LOGICAL_UNIT +Logical Unit Specific Addressing Method. +@constant kREPORT_LUNS_ADDRESS_METHOD_OFFSET +Offset to the address method data. +*/ +enum +{ + kREPORT_LUNS_ADDRESS_METHOD_PERIPHERAL_DEVICE = 0, + kREPORT_LUNS_ADDRESS_DEVICE_TYPE_SPECIFIC = 1, + kREPORT_LUNS_ADDRESS_METHOD_LOGICAL_UNIT = 2, + // Reserved [3] + kREPORT_LUNS_ADDRESS_METHOD_OFFSET = 14 +}; + + +/*! +@struct REPORT_LUNS_LOGICAL_UNIT_ADDRESSING +@discussion +This structure represents a LUN Addressing scheme. +*/ +typedef struct REPORT_LUNS_LOGICAL_UNIT_ADDRESSING +{ +#ifdef __LITTLE_ENDIAN__ + UInt16 LUN : 5; + UInt16 BUS_NUMBER : 3; + UInt16 TARGET : 6; + UInt16 reserved2 : 1; + UInt16 reserved : 1; +#else /* !__LITTLE_ENDIAN__ */ + UInt16 reserved : 1; + UInt16 reserved2 : 1; + UInt16 TARGET : 6; + UInt16 BUS_NUMBER : 3; + UInt16 LUN : 5; +#endif /* !__LITTLE_ENDIAN__ */ +} REPORT_LUNS_LOGICAL_UNIT_ADDRESSING; + + +/*! +@struct REPORT_LUNS_PERIPHERAL_DEVICE_ADDRESSING +@discussion +This structure represents a Peripheral Device Addressing scheme. +*/ +typedef struct REPORT_LUNS_PERIPHERAL_DEVICE_ADDRESSING +{ +#ifdef __LITTLE_ENDIAN__ + UInt16 TARGET_LUN : 8; + UInt16 BUS_IDENTIFIER : 6; + UInt16 reserved2 : 1; + UInt16 reserved : 1; +#else /* !__LITTLE_ENDIAN__ */ + UInt16 reserved : 1; + UInt16 reserved2 : 1; + UInt16 BUS_IDENTIFIER : 6; + UInt16 TARGET_LUN : 8; +#endif /* !__LITTLE_ENDIAN__ */ +} REPORT_LUNS_PERIPHERAL_DEVICE_ADDRESSING; + + +/*! +@struct SCSICmd_REPORT_LUNS_Header +@discussion +This structure defines the format of the data that is returned for +the REPORT_LUNS command. +*/ +typedef struct SCSICmd_REPORT_LUNS_Header +{ + UInt32 LUN_LIST_LENGTH; // LUN list length in bytes. + UInt32 RESERVED; + SCSICmd_REPORT_LUNS_LUN_ENTRY LUN[1]; // Variable length list. Must have at least LUN 0 if +} SCSICmd_REPORT_LUNS_Header; // Target supports REPORT_LUNS command. + + +#endif /* _IOKIT_SCSI_CMDS_REPORT_LUNS_DEFINITIONS_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_REQUEST_SENSE_Defs.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_REQUEST_SENSE_Defs.h.svn-base new file mode 100644 index 0000000..8cfabb0 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_REQUEST_SENSE_Defs.h.svn-base @@ -0,0 +1,234 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_SCSI_CMDS_REQUEST_SENSE_H_ +#define _IOKIT_SCSI_CMDS_REQUEST_SENSE_H_ + + +#if KERNEL +#include +#else +#include +#endif + + +/*! @header SCSI Request Sense Definitions + @discussion + This file contains all definitions for the data returned from + the REQUEST SENSE (0x03) command and from auto sense on protocols + that support it. +*/ + + +/*! +@enum kSenseDefaultSize +@discussion +The default size for SCSI Request Sense data. +*/ +enum +{ + kSenseDefaultSize = 18 +}; + + +/*! +@struct SCSI_Sense_Data +@discussion +The basic SCSI Request Sense data structure. +*/ +typedef struct SCSI_Sense_Data +{ + UInt8 VALID_RESPONSE_CODE; // 7 = Valid. 6-0 = Response Code. + UInt8 SEGMENT_NUMBER; // Segment number + UInt8 SENSE_KEY; // 7 = FILEMARK, 6 = EOM, 5 = ILI, 3-0 = SENSE KEY. + UInt8 INFORMATION_1; // INFORMATION. + UInt8 INFORMATION_2; // INFORMATION. + UInt8 INFORMATION_3; // INFORMATION. + UInt8 INFORMATION_4; // INFORMATION. + UInt8 ADDITIONAL_SENSE_LENGTH; // Number of additional bytes available in sense data + UInt8 COMMAND_SPECIFIC_INFORMATION_1; // Command Specific Information + UInt8 COMMAND_SPECIFIC_INFORMATION_2; // Command Specific Information + UInt8 COMMAND_SPECIFIC_INFORMATION_3; // Command Specific Information + UInt8 COMMAND_SPECIFIC_INFORMATION_4; // Command Specific Information + UInt8 ADDITIONAL_SENSE_CODE; // Additional Sense Code + UInt8 ADDITIONAL_SENSE_CODE_QUALIFIER; // Additional Sense Code Qualifier + UInt8 FIELD_REPLACEABLE_UNIT_CODE; // Field Replaceable Unit Code + UInt8 SKSV_SENSE_KEY_SPECIFIC_MSB; // 7 = Sense Key Specific Valid bit, 6-0 Sense Key Specific MSB + UInt8 SENSE_KEY_SPECIFIC_MID; // Sense Key Specific Middle + UInt8 SENSE_KEY_SPECIFIC_LSB; // Sense Key Specific LSB +} SCSI_Sense_Data; + + +/*! +@enum Sense Valid +@discussion +Masks to use to determine if sense data is valid or not. +@constant kSENSE_DATA_VALID +Sense data is valid. +@constant kSENSE_NOT_DATA_VALID +Sense data is not valid. +@constant kSENSE_DATA_VALID_Mask +Validity mask to use when checking the VALID_RESPONSE_CODE field. +*/ +enum +{ + kSENSE_DATA_VALID = 0x80, + kSENSE_NOT_DATA_VALID = 0x00, + kSENSE_DATA_VALID_Mask = 0x80 +}; + + +/*! +@enum Sense Response Codes +@discussion +Masks and values to determine the Response Code. +@constant kSENSE_RESPONSE_CODE_Current_Errors +Response code indicating current errors are reported. +@constant kSENSE_RESPONSE_CODE_Deferred_Errors +Response code indicating deferred errors are reported. +@constant kSENSE_RESPONSE_CODE_Mask +Mask to use when checking the VALID_RESPONSE_CODE field. +*/ +enum +{ + kSENSE_RESPONSE_CODE_Current_Errors = 0x70, + kSENSE_RESPONSE_CODE_Deferred_Errors = 0x71, + kSENSE_RESPONSE_CODE_Mask = 0x7F +}; + + +/*! +@enum FILEMARK bit field definitions +@discussion +Masks and values to determine the FileMark bit field. +@constant kSENSE_FILEMARK_Set +Filemark bit is set. +@constant kSENSE_FILEMARK_Not_Set +Filemark bit is not set. +@constant kSENSE_FILEMARK_Mask +Mask to use when checking the SENSE_KEY field for the FILEMARK bit. +*/ +enum +{ + kSENSE_FILEMARK_Set = 0x80, + kSENSE_FILEMARK_Not_Set = 0x00, + kSENSE_FILEMARK_Mask = 0x80 +}; + + +/*! +@enum EOM bit field definitions +@discussion +Masks and values to determine the End Of Medium bit field. +@constant kSENSE_EOM_Set +End Of Medium bit is set. +@constant kSENSE_EOM_Not_Set +End Of Medium bit is not set. +@constant kSENSE_EOM_Mask +Mask to use when checking the SENSE_KEY field for the EOM bit. +*/ +enum +{ + kSENSE_EOM_Set = 0x40, + kSENSE_EOM_Not_Set = 0x00, + kSENSE_EOM_Mask = 0x40 +}; + + +/*! +@enum ILI bit field definitions +@discussion +Masks and values to determine the Incorrect Length Indicator bit field. +@constant kSENSE_ILI_Set +Incorrect Length Indicator bit is set. +@constant kSENSE_ILI_Not_Set +Incorrect Length Indicator bit is not set. +@constant kSENSE_ILI_Mask +Mask to use when checking the SENSE_KEY field for the ILI bit. +*/ +enum +{ + kSENSE_ILI_Set = 0x20, + kSENSE_ILI_Not_Set = 0x00, + kSENSE_ILI_Mask = 0x20 +}; + + +/*! +@enum Sense Key definitions +@discussion +Masks and values to determine the SENSE_KEY. +@constant kSENSE_KEY_NO_SENSE +No sense data is present. +@constant kSENSE_KEY_RECOVERED_ERROR +A recovered error has occurred. +@constant kSENSE_KEY_NOT_READY +Device server is not ready. +@constant kSENSE_KEY_MEDIUM_ERROR +Device server detected a medium error. +@constant kSENSE_KEY_HARDWARE_ERROR +Device server detected a hardware error. +@constant kSENSE_KEY_ILLEGAL_REQUEST +Device server detected an illegal request. +@constant kSENSE_KEY_UNIT_ATTENTION +Device server indicates a unit attention condition. +@constant kSENSE_KEY_DATA_PROTECT +Device server indicates a data protect condition. +@constant kSENSE_KEY_BLANK_CHECK +Device server indicates a blank check condition. +@constant kSENSE_KEY_VENDOR_SPECIFIC +Device server indicates a vendor specific condition. +@constant kSENSE_KEY_COPY_ABORTED +Device server indicates a copy aborted condition. +@constant kSENSE_KEY_ABORTED_COMMAND +Device server indicates an aborted command condition. +@constant kSENSE_KEY_VOLUME_OVERFLOW +Device server indicates a volume overflow condition. +@constant kSENSE_KEY_MISCOMPARE +Device server indicates a miscompare condition. +@constant kSENSE_KEY_Mask +Mask to use when checking the SENSE_KEY field for the SENSE_KEY value. +*/ +enum +{ + kSENSE_KEY_NO_SENSE = 0x00, + kSENSE_KEY_RECOVERED_ERROR = 0x01, + kSENSE_KEY_NOT_READY = 0x02, + kSENSE_KEY_MEDIUM_ERROR = 0x03, + kSENSE_KEY_HARDWARE_ERROR = 0x04, + kSENSE_KEY_ILLEGAL_REQUEST = 0x05, + kSENSE_KEY_UNIT_ATTENTION = 0x06, + kSENSE_KEY_DATA_PROTECT = 0x07, + kSENSE_KEY_BLANK_CHECK = 0x08, + kSENSE_KEY_VENDOR_SPECIFIC = 0x09, + kSENSE_KEY_COPY_ABORTED = 0x0A, + kSENSE_KEY_ABORTED_COMMAND = 0x0B, + /* SENSE KEY 0x0C is obsoleted */ + kSENSE_KEY_VOLUME_OVERFLOW = 0x0D, + kSENSE_KEY_MISCOMPARE = 0x0E, + /* SENSE KEY 0x0F is reserved */ + kSENSE_KEY_Mask = 0x0F +}; + + +#endif /* _IOKIT_SCSI_CMDS_REQUEST_SENSE_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSICommandDefinitions.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSICommandDefinitions.h.svn-base new file mode 100644 index 0000000..d33aed6 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/SCSICommandDefinitions.h.svn-base @@ -0,0 +1,479 @@ +/* + * Copyright (c) 2001-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_SCSI_COMMAND_DEFINITIONS_H_ +#define _IOKIT_SCSI_COMMAND_DEFINITIONS_H_ + + +#if KERNEL +#include +#else +#include +#endif + + +/*! @header SCSICommandDefinitions + @discussion + This file contains all the definitions for types and constants that are + used by the command set classes for building CDBs. The field type + definitions are used for the parameters passed to a method that builds and + sends any SCSI defined command to clearly identify the type of value + expected for a parameter. + + The command methods will then use the appropriate mask to verify that the + value passed into a parameter is of the specified type. + + Currently only types and masks are defined for 8 bytes and smaller fields. + If a command is defined that uses a larger field, these should be expanded + to include those sizes. +*/ + +#pragma mark Field Type Definitions +/* These are the type definitions used for the parameters of methods that + * build and send Command Descriptor Blocks. + */ + +/* 1 Byte or smaller fields. */ + +/*! @typedef SCSICmdField1Bit */ +typedef UInt8 SCSICmdField1Bit; + +/*! @typedef SCSICmdField2Bit */ +typedef UInt8 SCSICmdField2Bit; + +/*! @typedef SCSICmdField3Bit */ +typedef UInt8 SCSICmdField3Bit; + +/*! @typedef SCSICmdField4Bit */ +typedef UInt8 SCSICmdField4Bit; + +/*! @typedef SCSICmdField5Bit */ +typedef UInt8 SCSICmdField5Bit; + +/*! @typedef SCSICmdField6Bit */ +typedef UInt8 SCSICmdField6Bit; + +/*! @typedef SCSICmdField7Bit */ +typedef UInt8 SCSICmdField7Bit; + +/*! @typedef SCSICmdField1Byte */ +typedef UInt8 SCSICmdField1Byte; + +/* 2 Bytes or smaller fields. */ + +/*! @typedef SCSICmdField9Bit */ +typedef UInt16 SCSICmdField9Bit; + +/*! @typedef SCSICmdField10Bit */ +typedef UInt16 SCSICmdField10Bit; + +/*! @typedef SCSICmdField11Bit */ +typedef UInt16 SCSICmdField11Bit; + +/*! @typedef SCSICmdField12Bit */ +typedef UInt16 SCSICmdField12Bit; + +/*! @typedef SCSICmdField13Bit */ +typedef UInt16 SCSICmdField13Bit; + +/*! @typedef SCSICmdField14Bit */ +typedef UInt16 SCSICmdField14Bit; + +/*! @typedef SCSICmdField15Bit */ +typedef UInt16 SCSICmdField15Bit; + +/*! @typedef SCSICmdField2Byte */ +typedef UInt16 SCSICmdField2Byte; + +/* 3 Bytes or smaller fields. */ + +/*! @typedef SCSICmdField17Bit */ +typedef UInt32 SCSICmdField17Bit; + +/*! @typedef SCSICmdField18Bit */ +typedef UInt32 SCSICmdField18Bit; + +/*! @typedef SCSICmdField19Bit */ +typedef UInt32 SCSICmdField19Bit; + +/*! @typedef SCSICmdField20Bit */ +typedef UInt32 SCSICmdField20Bit; + +/*! @typedef SCSICmdField21Bit */ +typedef UInt32 SCSICmdField21Bit; + +/*! @typedef SCSICmdField22Bit */ +typedef UInt32 SCSICmdField22Bit; + +/*! @typedef SCSICmdField23Bit */ +typedef UInt32 SCSICmdField23Bit; + +/*! @typedef SCSICmdField3Byte */ +typedef UInt32 SCSICmdField3Byte; + +/* 4 Bytes or smaller fields. */ + +/*! @typedef SCSICmdField25Bit */ +typedef UInt32 SCSICmdField25Bit; + +/*! @typedef SCSICmdField26Bit */ +typedef UInt32 SCSICmdField26Bit; + +/*! @typedef SCSICmdField27Bit */ +typedef UInt32 SCSICmdField27Bit; + +/*! @typedef SCSICmdField28Bit */ +typedef UInt32 SCSICmdField28Bit; + +/*! @typedef SCSICmdField29Bit */ +typedef UInt32 SCSICmdField29Bit; + +/*! @typedef SCSICmdField30Bit */ +typedef UInt32 SCSICmdField30Bit; + +/*! @typedef SCSICmdField31Bit */ +typedef UInt32 SCSICmdField31Bit; + +/*! @typedef SCSICmdField4Byte */ +typedef UInt32 SCSICmdField4Byte; + +/* 5 Bytes or smaller fields. */ + +/*! @typedef SCSICmdField33Bit */ +typedef UInt64 SCSICmdField33Bit; + +/*! @typedef SCSICmdField34Bit */ +typedef UInt64 SCSICmdField34Bit; + +/*! @typedef SCSICmdField35Bit */ +typedef UInt64 SCSICmdField35Bit; + +/*! @typedef SCSICmdField36Bit */ +typedef UInt64 SCSICmdField36Bit; + +/*! @typedef SCSICmdField37Bit */ +typedef UInt64 SCSICmdField37Bit; + +/*! @typedef SCSICmdField38Bit */ +typedef UInt64 SCSICmdField38Bit; + +/*! @typedef SCSICmdField39Bit */ +typedef UInt64 SCSICmdField39Bit; + +/*! @typedef SCSICmdField5Byte */ +typedef UInt64 SCSICmdField5Byte; + +/* 6 Bytes or smaller fields. */ + +/*! @typedef SCSICmdField41Bit */ +typedef UInt64 SCSICmdField41Bit; + +/*! @typedef SCSICmdField42Bit */ +typedef UInt64 SCSICmdField42Bit; + +/*! @typedef SCSICmdField43Bit */ +typedef UInt64 SCSICmdField43Bit; + +/*! @typedef SCSICmdField44Bit */ +typedef UInt64 SCSICmdField44Bit; + +/*! @typedef SCSICmdField45Bit */ +typedef UInt64 SCSICmdField45Bit; + +/*! @typedef SCSICmdField46Bit */ +typedef UInt64 SCSICmdField46Bit; + +/*! @typedef SCSICmdField47Bit */ +typedef UInt64 SCSICmdField47Bit; + +/*! @typedef SCSICmdField6Byte */ +typedef UInt64 SCSICmdField6Byte; + +/* 7 Bytes or smaller fields. */ + +/*! @typedef SCSICmdField49Bit */ +typedef UInt64 SCSICmdField49Bit; + +/*! @typedef SCSICmdField50Bit */ +typedef UInt64 SCSICmdField50Bit; + +/*! @typedef SCSICmdField51Bit */ +typedef UInt64 SCSICmdField51Bit; + +/*! @typedef SCSICmdField52Bit */ +typedef UInt64 SCSICmdField52Bit; + +/*! @typedef SCSICmdField53Bit */ +typedef UInt64 SCSICmdField53Bit; + +/*! @typedef SCSICmdField54Bit */ +typedef UInt64 SCSICmdField54Bit; + +/*! @typedef SCSICmdField55Bit */ +typedef UInt64 SCSICmdField55Bit; + +/*! @typedef SCSICmdField7Byte */ +typedef UInt64 SCSICmdField7Byte; + +/* 8 Bytes or smaller fields. */ + +/*! @typedef SCSICmdField57Bit */ +typedef UInt64 SCSICmdField57Bit; + +/*! @typedef SCSICmdField58Bit */ +typedef UInt64 SCSICmdField58Bit; + +/*! @typedef SCSICmdField59Bit */ +typedef UInt64 SCSICmdField59Bit; + +/*! @typedef SCSICmdField60Bit */ +typedef UInt64 SCSICmdField60Bit; + +/*! @typedef SCSICmdField61Bit */ +typedef UInt64 SCSICmdField61Bit; + +/*! @typedef SCSICmdField62Bit */ +typedef UInt64 SCSICmdField62Bit; + +/*! @typedef SCSICmdField63Bit */ +typedef UInt64 SCSICmdField63Bit; + +/*! @typedef SCSICmdField8Byte */ +typedef UInt64 SCSICmdField8Byte; + + +#pragma mark Field Mask Definitions +/* These are masks that are used to verify that the values passed into the + * parameters for the fields are not larger than the field size. + * + * NB: These have changed from enums to #define since enums greater than + * 32 bits in size are not well-defined in C99. + */ + +/* 1 Byte or smaller fields. */ + +/*! @constant kSCSICmdFieldMask1Bit */ +#define kSCSICmdFieldMask1Bit 0x01 + +/*! @constant kSCSICmdFieldMask2Bit */ +#define kSCSICmdFieldMask2Bit 0x03 + +/*! @constant kSCSICmdFieldMask3Bit */ +#define kSCSICmdFieldMask3Bit 0x07 + +/*! @constant kSCSICmdFieldMask4Bit */ +#define kSCSICmdFieldMask4Bit 0x0F + +/*! @constant kSCSICmdFieldMask5Bit */ +#define kSCSICmdFieldMask5Bit 0x1F + +/*! @constant kSCSICmdFieldMask6Bit */ +#define kSCSICmdFieldMask6Bit 0x3F + +/*! @constant kSCSICmdFieldMask7Bit */ +#define kSCSICmdFieldMask7Bit 0x7F + +#define kSCSICmdFieldMask1Byte 0xFF + +/* 2 Bytes or smaller fields. */ + +/*! @constant kSCSICmdFieldMask9Bit */ +#define kSCSICmdFieldMask9Bit 0x01FF + +/*! @constant kSCSICmdFieldMask10Bit */ +#define kSCSICmdFieldMask10Bit 0x03FF + +/*! @constant kSCSICmdFieldMask11Bit */ +#define kSCSICmdFieldMask11Bit 0x07FF + +/*! @constant kSCSICmdFieldMask12Bit */ +#define kSCSICmdFieldMask12Bit 0x0FFF + +/*! @constant kSCSICmdFieldMask13Bit */ +#define kSCSICmdFieldMask13Bit 0x1FFF + +/*! @constant kSCSICmdFieldMask14Bit */ +#define kSCSICmdFieldMask14Bit 0x3FFF + +/*! @constant kSCSICmdFieldMask15Bit */ +#define kSCSICmdFieldMask15Bit 0x7FFF + +/*! @constant kSCSICmdFieldMask2Byte */ +#define kSCSICmdFieldMask2Byte 0xFFFF + +/* 3 Bytes or smaller fields. */ + +/*! @constant kSCSICmdFieldMask17Bit */ +#define kSCSICmdFieldMask17Bit 0x01FFFF + +/*! @constant kSCSICmdFieldMask18Bit */ +#define kSCSICmdFieldMask18Bit 0x03FFFF + +/*! @constant kSCSICmdFieldMask19Bit */ +#define kSCSICmdFieldMask19Bit 0x07FFFF + +/*! @constant kSCSICmdFieldMask20Bit */ +#define kSCSICmdFieldMask20Bit 0x0FFFFF + +/*! @constant kSCSICmdFieldMask21Bit */ +#define kSCSICmdFieldMask21Bit 0x1FFFFF + +/*! @constant kSCSICmdFieldMask22Bit */ +#define kSCSICmdFieldMask22Bit 0x3FFFFF + +/*! @constant kSCSICmdFieldMask23Bit */ +#define kSCSICmdFieldMask23Bit 0x7FFFFF + +/*! @constant kSCSICmdFieldMask3Byte */ +#define kSCSICmdFieldMask3Byte 0xFFFFFF + +/* 4 Bytes or smaller fields. */ +/*! @constant kSCSICmdFieldMask25Bit */ +#define kSCSICmdFieldMask25Bit 0x01FFFFFFUL + +/*! @constant kSCSICmdFieldMask26Bit */ +#define kSCSICmdFieldMask26Bit 0x03FFFFFFUL + +/*! @constant kSCSICmdFieldMask27Bit */ +#define kSCSICmdFieldMask27Bit 0x07FFFFFFUL + +/*! @constant kSCSICmdFieldMask28Bit */ +#define kSCSICmdFieldMask28Bit 0x0FFFFFFFUL + +/*! @constant kSCSICmdFieldMask29Bit */ +#define kSCSICmdFieldMask29Bit 0x1FFFFFFFUL + +/*! @constant kSCSICmdFieldMask30Bit */ +#define kSCSICmdFieldMask30Bit 0x3FFFFFFFUL + +/*! @constant kSCSICmdFieldMask31Bit */ +#define kSCSICmdFieldMask31Bit 0x7FFFFFFFUL + +/*! @constant kSCSICmdFieldMask4Byte */ +#define kSCSICmdFieldMask4Byte 0xFFFFFFFFUL + +/* 5 Bytes or smaller fields. */ + +/*! @constant kSCSICmdFieldMask33Bit */ +#define kSCSICmdFieldMask33Bit 0x01FFFFFFFFULL + +/*! @constant kSCSICmdFieldMask34Bit */ +#define kSCSICmdFieldMask34Bit 0x03FFFFFFFFULL + +/*! @constant kSCSICmdFieldMask35Bit */ +#define kSCSICmdFieldMask35Bit 0x07FFFFFFFFULL + +/*! @constant kSCSICmdFieldMask36Bit */ +#define kSCSICmdFieldMask36Bit 0x0FFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask37Bit */ +#define kSCSICmdFieldMask37Bit 0x1FFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask38Bit */ +#define kSCSICmdFieldMask38Bit 0x3FFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask39Bit */ +#define kSCSICmdFieldMask39Bit 0x7FFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask5Byte */ +#define kSCSICmdFieldMask5Byte 0xFFFFFFFFFFULL + +/* 6 Bytes or smaller fields. */ + +/*! @constant kSCSICmdFieldMask41Bit */ +#define kSCSICmdFieldMask41Bit 0x01FFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask42Bit */ +#define kSCSICmdFieldMask42Bit 0x03FFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask43Bit */ +#define kSCSICmdFieldMask43Bit 0x07FFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask44Bit */ +#define kSCSICmdFieldMask44Bit 0x0FFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask45Bit */ +#define kSCSICmdFieldMask45Bit 0x1FFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask46Bit */ +#define kSCSICmdFieldMask46Bit 0x3FFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask47Bit */ +#define kSCSICmdFieldMask47Bit 0x7FFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask6Byte */ +#define kSCSICmdFieldMask6Byte 0xFFFFFFFFFFFFULL + +/* 7 Bytes or smaller fields. */ + +/*! @constant kSCSICmdFieldMask49Bit */ +#define kSCSICmdFieldMask49Bit 0x01FFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask50Bit */ +#define kSCSICmdFieldMask50Bit 0x03FFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask51Bit */ +#define kSCSICmdFieldMask51Bit 0x07FFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask52Bit */ +#define kSCSICmdFieldMask52Bit 0x0FFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask53Bit */ +#define kSCSICmdFieldMask53Bit 0x1FFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask54Bit */ +#define kSCSICmdFieldMask54Bit 0x3FFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask55Bit */ +#define kSCSICmdFieldMask55Bit 0x7FFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask7Byte */ +#define kSCSICmdFieldMask7Byte 0xFFFFFFFFFFFFFFULL + +/* 8 Bytes or smaller fields. */ + +/*! @constant kSCSICmdFieldMask57Bit */ +#define kSCSICmdFieldMask57Bit 0x01FFFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask58Bit */ +#define kSCSICmdFieldMask58Bit 0x03FFFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask59Bit */ +#define kSCSICmdFieldMask59Bit 0x07FFFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask60Bit */ +#define kSCSICmdFieldMask60Bit 0x0FFFFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask61Bit */ +#define kSCSICmdFieldMask61Bit 0x1FFFFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask62Bit */ +#define kSCSICmdFieldMask62Bit 0x3FFFFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask63Bit */ +#define kSCSICmdFieldMask63Bit 0x7FFFFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask8Byte */ +#define kSCSICmdFieldMask8Byte 0xFFFFFFFFFFFFFFFFULL + +#endif /* _IOKIT_SCSI_COMMAND_DEFINITIONS_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSICommandOperationCodes.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSICommandOperationCodes.h.svn-base new file mode 100644 index 0000000..21d9d1e --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/SCSICommandOperationCodes.h.svn-base @@ -0,0 +1,941 @@ +/* + * Copyright (c) 2001-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _SCSI_COMMAND_OPERATION_CODES_H_ +#define _SCSI_COMMAND_OPERATION_CODES_H_ + +#pragma mark About this file +/* This file contains the operation code definitions for all commands defined + * by the SCSI specifications. The commands are listed in three formats: + * 1) All commands are listed in alphabetical order. This list is the live + * enumeration for all of the command constants. + * 2) The commands are listed in ascending numerical order. + * 3) The commands are grouped by Peripheral Device Type. + * + * In the command listings by Peripheral Device Type, there will be a comment + * following each command. This comment indentifies the section of the related + * specification where the commands is defined and the requirement type of the + * command, Mandatory or Optional. + * If a specification redefines an optional command from SPC as mandatory, + * the command will be relisted in the Peripheral Device Type command list with + * the mandatory tag next to it. + * All commands that are listed in SPC as Device Type Specifc will be relisted + * as a comment in all specifications lists that support that command with the + * appropriate Mandatory or Optional tag for that specification. + * + * The section number and the requirement type of the command are based on the + * version of the specification listed in the header comment for the Peripheral + * Device Type. This data is provided for informational purposes only. The + * specification document and version that the device adheres to as indicated + * by the data returned in response to the INQUIRY command should be used as + * the authorative source for supported and required behavior of the device. + * + * The SPC set is listed before all other Peripheral Device Type commands as + * this is the base document from which all of the other documents are derived. + * + * The Peripheral Device Types and associated command sets as defined by SPC-2, + * section 7.4.1 are as follows: + * Peripheral Device Type Associated Command Specification + * ------------------------------------ ----------------------------------- + * 0x00 Direct Access Device SBC - SCSI-3 Block Commands + * 0x01 Sequential Access Device SSC - SCSI-3 Stream Commands + * 0x02 Printer Device SSC - SCSI-3 Stream Commands + * 0x03 Processor Device SPC - SCSI Primary Commands-2 + * 0x04 Write Once Device SBC - SCSI-3 Block Commands + * 0x05 CD-ROM Device MMC - SCSI Multimedia Commands-2 + * 0x06 Scanner Device SGC - SCSI-3 Graphics Commands + * 0x07 Optical Memory Device SBC - SCSI-3 Block Commands + * 0x08 Medium Changer Device SMC - SCSI-3 Medium Changer Cmds + * 0x09 Communications Device SSC - SCSI-3 Stream Commands + * 0x0A - 0x0B Graphic Arts Prepress Dev ASC IT8 + * 0x0C Storage Array Controller Device SCC-2 - SCSI Controller Commands-2 + * 0x0D Enclosure Services SES - SCSI-3 Enclosure Services + * 0x0E Simplified Direct Access Device RBC - SCSI Reduced Block Commands + * 0x0F Optical Card Reader/Writer Device OCRW - SCSI Specification for + * Optical Card Reader/Writer + * 0x10 Reserved No command specification + * 0x11 Object-Based Storage Device OSD - SCSI Object Based Storage + * Device Commands + * 0x12 - 0x14 Reserved No command specification + * 0x15 Multimedia Media Access Engine RMC - Reduced Multimedia Commands + * 0x16 - 0x1E Reserved No command specification + * 0x1F Unknown or No Device No command specification + */ + +#pragma mark - +#pragma mark Command Definitions by Name +/* All SCSI Commands listed in alphabetical order. These are the live + * definitions of the commands. All other command lists are informative. + */ +enum +{ + kSCSICmd_ACCESS_CONTROL_IN = 0x86, + kSCSICmd_ACCESS_CONTROL_OUT = 0x87, + kSCSICmd_BLANK = 0xA1, + kSCSICmd_CHANGE_DEFINITION = 0x40, + kSCSICmd_CLOSE_TRACK_SESSION = 0x5B, + kSCSICmd_COMPARE = 0x39, + kSCSICmd_COPY = 0x18, + kSCSICmd_COPY_AND_VERIFY = 0x3A, + kSCSICmd_ERASE_10 = 0x2C, + kSCSICmd_ERASE_12 = 0xAC, + kSCSICmd_EXTENDED_COPY = 0x83, + kSCSICmd_FORMAT_UNIT = 0x04, + kSCSICmd_GET_CONFIGURATION = 0x46, + kSCSICmd_GET_EVENT_STATUS_NOTIFICATION = 0x4A, + kSCSICmd_GET_PERFORMANCE = 0xAC, + kSCSICmd_INQUIRY = 0x12, + kSCSICmd_LOAD_UNLOAD_MEDIUM = 0xA6, + kSCSICmd_LOCK_UNLOCK_CACHE = 0x36, + kSCSICmd_LOCK_UNLOCK_CACHE_16 = 0x92, + kSCSICmd_LOG_SELECT = 0x4C, + kSCSICmd_LOG_SENSE = 0x4D, + kSCSICmd_MAINTENANCE_IN = 0xA3, + kSCSICmd_MAINTENANCE_OUT = 0xA4, + kSCSICmd_MECHANISM_STATUS = 0xBD, + kSCSICmd_MEDIUM_SCAN = 0x38, + kSCSICmd_MODE_SELECT_6 = 0x15, + kSCSICmd_MODE_SELECT_10 = 0x55, + kSCSICmd_MODE_SENSE_6 = 0x1A, + kSCSICmd_MODE_SENSE_10 = 0x5A, + kSCSICmd_MOVE_MEDIUM_ATTACHED = 0xA7, + kSCSICmd_PAUSE_RESUME = 0x4B, + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, + kSCSICmd_PLAY_AUDIO_10 = 0x45, + kSCSICmd_PLAY_AUDIO_12 = 0xA5, + kSCSICmd_PLAY_AUDIO_MSF = 0x47, + kSCSICmd_PLAY_AUDIO_TRACK_INDEX = 0x48, + kSCSICmd_PLAY_CD = 0xBC, + kSCSICmd_PLAY_RELATIVE_10 = 0x49, + kSCSICmd_PLAY_RELATIVE_12 = 0xA9, + kSCSICmd_PREFETCH = 0x34, + kSCSICmd_PREFETCH_16 = 0x90, + kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, + kSCSICmd_READ_6 = 0x08, + kSCSICmd_READ_10 = 0x28, + kSCSICmd_READ_12 = 0xA8, + kSCSICmd_READ_16 = 0x88, + kSCSICmd_READ_ATTRIBUTE = 0x8C, + kSCSICmd_READ_BUFFER = 0x3C, + kSCSICmd_READ_BUFFER_CAPACITY = 0x5C, + kSCSICmd_READ_CAPACITY = 0x25, + kSCSICmd_READ_CD = 0xBE, + kSCSICmd_READ_CD_MSF = 0xB9, + kSCSICmd_READ_DEFECT_DATA_10 = 0x37, + kSCSICmd_READ_DEFECT_DATA_12 = 0xB7, + kSCSICmd_READ_DISC_INFORMATION = 0x51, + kSCSICmd_READ_DVD_STRUCTURE = 0xAD, + kSCSICmd_READ_DISC_STRUCTURE = 0xAD, + kSCSICmd_READ_ELEMENT_STATUS_ATTACHED = 0xB4, + kSCSICmd_READ_FORMAT_CAPACITIES = 0x23, + kSCSICmd_READ_GENERATION = 0x29, + kSCSICmd_READ_HEADER = 0x44, + kSCSICmd_READ_LONG = 0x3E, + kSCSICmd_READ_MASTER_CUE = 0x59, + kSCSICmd_READ_SUB_CHANNEL = 0x42, + kSCSICmd_READ_TOC_PMA_ATIP = 0x43, + kSCSICmd_READ_TRACK_INFORMATION = 0x52, + kSCSICmd_READ_UPDATED_BLOCK_10 = 0x2D, + kSCSICmd_REASSIGN_BLOCKS = 0x07, + kSCSICmd_REBUILD = 0x81, + kSCSICmd_RECEIVE = 0x08, + kSCSICmd_RECEIVE_COPY_RESULTS = 0x84, + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, + kSCSICmd_REDUNDANCY_GROUP_IN = 0xBA, + kSCSICmd_REDUNDANCY_GROUP_OUT = 0xBB, + kSCSICmd_REGENERATE = 0x82, + kSCSICmd_RELEASE_6 = 0x17, + kSCSICmd_RELEASE_10 = 0x57, + kSCSICmd_REPAIR_TRACK = 0x58, + kSCSICmd_REPORT_DEVICE_IDENTIFIER = 0xA3, + kSCSICmd_REPORT_KEY = 0xA4, + kSCSICmd_REPORT_LUNS = 0xA0, + kSCSICmd_REQUEST_SENSE = 0x03, + kSCSICmd_RESERVE_6 = 0x16, + kSCSICmd_RESERVE_10 = 0x56, + kSCSICmd_RESERVE_TRACK = 0x53, + kSCSICmd_REZERO_UNIT = 0x01, + kSCSICmd_SCAN_MMC = 0xBA, + kSCSICmd_SEARCH_DATA_EQUAL_10 = 0x31, + kSCSICmd_SEARCH_DATA_EQUAL_12 = 0xB1, + kSCSICmd_SEARCH_DATA_HIGH_10 = 0x30, + kSCSICmd_SEARCH_DATA_HIGH_12 = 0xB0, + kSCSICmd_SEARCH_DATA_LOW_10 = 0x32, + kSCSICmd_SEARCH_DATA_LOW_12 = 0xB2, + kSCSICmd_SEEK_6 = 0x0B, + kSCSICmd_SEEK_10 = 0x2B, + kSCSICmd_SEND = 0x0A, + kSCSICmd_SEND_CUE_SHEET = 0x5D, + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, + kSCSICmd_SEND_DVD_STRUCTURE = 0xBF, + kSCSICmd_SEND_EVENT = 0xA2, + kSCSICmd_SEND_KEY = 0xA3, + kSCSICmd_SEND_OPC_INFORMATION = 0x54, + kSCSICmd_SERVICE_ACTION_IN = 0x9E, + kSCSICmd_SERVICE_ACTION_OUT = 0x9F, + kSCSICmd_SET_CD_SPEED = 0xBB, + kSCSICmd_SET_DEVICE_IDENTIFIER = 0xA4, + kSCSICmd_SET_LIMITS_10 = 0x33, + kSCSICmd_SET_LIMITS_12 = 0xB3, + kSCSICmd_SET_READ_AHEAD = 0xA7, + kSCSICmd_SET_STREAMING = 0xB6, + kSCSICmd_SPARE_IN = 0xBC, + kSCSICmd_SPARE_OUT = 0xBD, + kSCSICmd_START_STOP_UNIT = 0x1B, + kSCSICmd_STOP_PLAY_SCAN = 0x4E, + kSCSICmd_SYNCHRONIZE_CACHE = 0x35, + kSCSICmd_SYNCHRONIZE_CACHE_16 = 0x91, + kSCSICmd_TEST_UNIT_READY = 0x00, + kSCSICmd_UPDATE_BLOCK = 0x3D, + kSCSICmd_VERIFY_10 = 0x2F, + kSCSICmd_VERIFY_12 = 0xAF, + kSCSICmd_VERIFY_16 = 0x8F, + kSCSICmd_VOLUME_SET_IN = 0xBE, + kSCSICmd_VOLUME_SET_OUT = 0xBF, + kSCSICmd_WRITE_6 = 0x0A, + kSCSICmd_WRITE_10 = 0x2A, + kSCSICmd_WRITE_12 = 0xAA, + kSCSICmd_WRITE_16 = 0x8A, + kSCSICmd_WRITE_AND_VERIFY_10 = 0x2E, + kSCSICmd_WRITE_AND_VERIFY_12 = 0xAE, + kSCSICmd_WRITE_AND_VERIFY_16 = 0x8E, + kSCSICmd_WRITE_ATTRIBUTE = 0x8D, + kSCSICmd_WRITE_BUFFER = 0x3B, + kSCSICmd_WRITE_LONG = 0x3F, + kSCSICmd_WRITE_SAME = 0x41, + kSCSICmd_WRITE_SAME_16 = 0x93, + kSCSICmd_XDREAD = 0x52, + kSCSICmd_XDWRITE = 0x50, + kSCSICmd_XDWRITE_EXTENDED = 0x80, + kSCSICmd_XDWRITEREAD_10 = 0x53, + kSCSICmd_XPWRITE = 0x51, + + kSCSICmdVariableLengthCDB = 0x7F +}; + +/* Service Action Definitions for the Variable Length CDB (7Fh) command */ +enum +{ + kSCSIServiceAction_READ_32 = 0x0009, + kSCSIServiceAction_VERIFY_32 = 0x000A, + kSCSIServiceAction_WRITE_32 = 0x000B, + kSCSIServiceAction_WRITE_AND_VERIFY_32 = 0x000C, + kSCSIServiceAction_WRITE_SAME_32 = 0x000D, + kSCSIServiceAction_XDREAD_32 = 0x0003, + kSCSIServiceAction_XDWRITE_32 = 0x0004, + kSCSIServiceAction_XDWRITEREAD_32 = 0x0007, + kSCSIServiceAction_XPWRITE_32 = 0x0006 +}; + +/* Service Action Definitions for the MAINTENANCE IN (A3h) command */ +enum +{ + kSCSIServiceAction_REPORT_ALIASES = 0x0B, + kSCSIServiceAction_REPORT_DEVICE_IDENTIFIER = 0x05, + kSCSIServiceAction_REPORT_PRIORITY = 0x0E, + kSCSIServiceAction_REPORT_SUPPORTED_OPERATION_CODES = 0x0C, + kSCSIServiceAction_REPORT_SUPPORTED_TASK_MANAGEMENT_FUNCTIONS = 0x0D, + kSCSIServiceAction_REPORT_TARGET_PORT_GROUPS = 0x0A +}; + +/* Service Action Definitions for the MAINTENANCE OUT (A4h) command */ +enum +{ + kSCSIServiceAction_CHANGE_ALIASES = 0x0B, + kSCSIServiceAction_SET_DEVICE_IDENTIFIER = 0x06, + kSCSIServiceAction_SET_PRIORITY = 0x0E, + kSCSIServiceAction_SET_TARGET_PORT_GROUPS = 0x0A +}; + +/* Service Action Definitions for the SERVICE ACTION IN (9Eh) command */ +enum +{ + kSCSIServiceAction_READ_CAPACITY_16 = 0x10, + kSCSIServiceAction_READ_LONG_16 = 0x11 +}; + +/* Service Action Definitions for the SERVICE ACTION OUT (9Fh) command */ +enum +{ + kSCSIServiceAction_WRITE_LONG_16 = 0x11 +}; + +#pragma mark - +#pragma mark Command Definitions by Number +#if 0 +enum +{ +}; +#endif + + +#pragma mark - +#pragma mark All Types SPC Commands +/* Commands defined by the T10:1236-D SCSI Primary Commands-2 (SPC-2) + * command specification. The definitions and section numbers are based on + * section 7 of the revision 18, 21 May 2000 version of the specification. + * + * These commands are defined for all devices. + */ +#if 0 +enum +{ + kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ + kSCSICmd_COMPARE = 0x39, /* Sec. 7.2: Optional */ + kSCSICmd_COPY = 0x18, /* Sec. 7.3: Optional */ + kSCSICmd_COPY_AND_VERIFY = 0x3A, /* Sec. 7.4: Optional */ + kSCSICmd_EXTENDED_COPY = 0x83, /* Sec. 7.5: Optional */ + kSCSICmd_INQUIRY = 0x12, /* Sec. 7.6: Mandatory */ + kSCSICmd_LOG_SELECT = 0x4C, /* Sec. 7.7: Optional */ + kSCSICmd_LOG_SENSE = 0x4D, /* Sec. 7.8: Optional */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* Sec. 7.9: Device Type + * Specific */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* Sec. 7.10: Device Type + * Specific */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* Sec. 7.11: Device Type + * Specific */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* Sec. 7.12: Device Type + * Specific */ + kSCSICmd_MOVE_MEDIUM_ATTACHED = 0xA7, /* Defined in SMC */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Sec. 7.13: Device Type + * Specific */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Sec. 7.14: Device Type + * Specific */ + kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* Sec. 7.15: Device Type + * Specific */ + kSCSICmd_READ_BUFFER = 0x3C, /* Sec. 7.16: Optional */ + kSCSICmd_READ_ELEMENT_STATUS_ATTACHED = 0xB4, /* Defined in SMC */ + kSCSICmd_RECEIVE_COPY_RESULTS = 0x84, /* Sec. 7.17: Optional */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* Sec. 7.18: Optional */ + kSCSICmd_RELEASE_10 = 0x57, /* Sec. 7.19: Device Type + * Specific */ + kSCSICmd_RELEASE_6 = 0x17, /* Sec. 7.20: Device Type + * Specific */ + kSCSICmd_REPORT_DEVICE_IDENTIFIER = 0xA3, /* Sec. 7.21: Optional */ + kSCSICmd_REPORT_LUNS = 0xA0, /* Sec. 7.22: Mandatory for + * LUN Supporting devices*/ + kSCSICmd_REQUEST_SENSE = 0x03, /* Sec. 7.23: Device Type + * Specific */ + kSCSICmd_RESERVE_10 = 0x56, /* Sec. 7.24: Device Type + * Specific */ + kSCSICmd_RESERVE_6 = 0x16, /* Sec. 7.25: Device Type + * Specific */ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* Sec. 7.26: Optional */ + kSCSICmd_SET_DEVICE_IDENTIFIER = 0xA4, /* Sec. 7.27: Optional */ + kSCSICmd_TEST_UNIT_READY = 0x00, /* Sec. 7.28: Mandatory */ + kSCSICmd_WRITE_BUFFER = 0x3B /* Sec. 7.29: Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x00 SBC Direct Access Commands +/* Commands defined by the T10:990-D SCSI-3 Block Commands (SBC) command + * specification. The definitions and section numbers are based on section 6.1 + * of the revision 8c, 13 November 1997 version of the specification. + */ +#if 0 +enum +{ + kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ + kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ + kSCSICmd_COPY = 0x18, /* SPC: Optional */ + kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional*/ + kSCSICmd_FORMAT_UNIT = 0x04, /* Sec. 6.1.1: Mandatory */ + kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ + kSCSICmd_LOCK_UNLOCK_CACHE = 0x36, /* Sec. 6.1.2: Optional */ + kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ + kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Optional */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Optional */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ + kSCSICmd_MOVE_MEDIUM_ATTACHED = 0xA7, /* SMC: Optional */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* SPC: Optional */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* SPC: Optional */ + kSCSICmd_PREFETCH = 0x34, /* Sec. 6.1.3: Optional */ + kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* SPC: Optional */ + kSCSICmd_READ_6 = 0x08, /* Sec. 6.1.4: Mandatory */ + kSCSICmd_READ_10 = 0x28, /* Sec. 6.1.5: Mandatory */ + kSCSICmd_READ_12 = 0xA8, /* Sec. 6.2.4: Optional */ + kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ + kSCSICmd_READ_CAPACITY = 0x25, /* Sec. 6.1.6: Mandatory */ + kSCSICmd_READ_DEFECT_DATA_10 = 0x37, /* Sec. 6.1.7: Optional */ + kSCSICmd_READ_DEFECT_DATA_12 = 0xB7, /* Sec. 6.2.5: Optional */ + kSCSICmd_READ_ELEMENT_STATUS_ATTACHED = 0xB4, /* SMC: Optional */ + kSCSICmd_READ_GENERATION = 0x29, /* Sec. 6.2.6: Optional */ + kSCSICmd_READ_LONG = 0x3E, /* Sec. 6.1.8: Optional */ + kSCSICmd_READ_UPDATED_BLOCK_10 = 0x2D, /* Sec. 6.2.7: Optional */ + kSCSICmd_REASSIGN_BLOCKS = 0x07, /* Sec. 6.1.9: Optional */ + kSCSICmd_REBUILD = 0x81, /* Sec. 6.1.10: Optional */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ + kSCSICmd_REGENERATE = 0x82, /* Sec. 6.1.11: Optional */ + kSCSICmd_RELEASE_6 = 0x17, /* SPC: Optional */ + kSCSICmd_RELEASE_10 = 0x57, /* SPC: Mandatory */ + kSCSICmd_REPORT_LUNS = 0xA0, /* SPC: Optional */ + kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ + kSCSICmd_RESERVE_6 = 0x16, /* SPC: Optional */ + kSCSICmd_RESERVE_10 = 0x56, /* SPC: Mandatory */ + kSCSICmd_REZERO_UNIT = 0x01, /* Obsolete */ + kSCSICmd_SEARCH_DATA_EQUAL_10 = 0x31, /* Obsolete */ + kSCSICmd_SEARCH_DATA_HIGH_10 = 0x30, /* Obsolete */ + kSCSICmd_SEARCH_DATA_LOW_10 = 0x32, /* Obsolete */ + kSCSICmd_SEEK_6 = 0x0B, /* Obsolete */ + kSCSICmd_SEEK_10 = 0x2B, /* Sec. 6.1.12: Optional */ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ + kSCSICmd_SET_LIMITS_10 = 0x33, /* Sec. 6.1.13: Optional */ + kSCSICmd_SET_LIMITS_12 = 0xB3, /* Sec. 6.2.8: Optional */ + kSCSICmd_START_STOP_UNIT = 0x1B, /* Sec. 6.1.14: Optional */ + kSCSICmd_SYNCHRONIZE_CACHE = 0x35, /* Sec. 6.1.15: Optional */ + kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ + kSCSICmd_UPDATE_BLOCK = 0x3D, /* Sec. 6.2.9: Optional */ + kSCSICmd_VERIFY_10 = 0x2F, /* Sec. 6.1.16: Optional */ + kSCSICmd_WRITE_6 = 0x0A, /* Sec. 6.1.17: Optional */ + kSCSICmd_WRITE_10 = 0x2A, /* Sec. 6.1.18: Optional */ + kSCSICmd_WRITE_12 = 0xAA, /* Sec. 6.2.13: Optional */ + kSCSICmd_WRITE_AND_VERIFY_10 = 0x2E, /* Sec. 6.1.19: Optional */ + kSCSICmd_WRITE_AND_VERIFY_12 = 0xAE, /* Sec. 6.2.15: Optional */ + kSCSICmd_WRITE_BUFFER = 0x3B, /* SPC: Optional */ + kSCSICmd_WRITE_LONG = 0x3F, /* Sec. 6.1.20: Optional */ + kSCSICmd_WRITE_SAME = 0x41, /* Sec. 6.1.21: Optional */ + kSCSICmd_XDREAD = 0x52, /* Sec. 6.1.22: Optional */ + kSCSICmd_XDWRITE = 0x50, /* Sec. 6.1.23: Optional */ + kSCSICmd_XDWRITE_EXTENDED = 0x80, /* Sec. 6.1.24: Optional */ + kSCSICmd_XPWRITE = 0x51 /* Sec. 6.1.25: Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x01 SSC Sequential Access Commands +/* Commands defined by the T10:997-D SCSI-3 Stream Commands (SSC) command + * specification. The definitions and section numbers are based on section 5 + * of the revision 22, January 1, 2000 version of the specification. + */ +#if 0 +enum +{ + kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ + kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ + kSCSICmd_COPY = 0x18, /* SPC: Optional */ + kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional */ + kSCSICmd_ERASE = 0x19, /* Sec. 5.3.1: Mandatory */ + kSCSICmd_FORMAT_MEDIUM = 0x04, /* Sec. 5.3.2: Optional */ + kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ + kSCSICmd_LOAD_UNLOAD = 0x1B, /* Sec. 5.3.3: Optional */ + kSCSICmd_LOCATE = 0x2B, /* Sec. 5.3.4: Optional */ + kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ + kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Mandatory */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Mandatory */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ + kSCSICmd_MOVE_MEDIUM = 0xA5, /* SMC: Optional */ + kSCSICmd_MOVE_MEDIUM_ATTACHED = 0xA7, /* SMC: Optional */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* SPC: Optional */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* SPC: Optional */ + kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* SPC: Optional */ + kSCSICmd_READ_6 = 0x08, /* Sec. 5.3.5: Mandatory */ + kSCSICmd_READ_BLOCK_LIMITS = 0x05, /* Sec. 5.3.6: Mandatory */ + kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ + kSCSICmd_READ_ELEMENT_STATUS = 0xB8, /* SMC: Optional */ + kSCSICmd_READ_ELEMENT_STATUS_ATTACHED = 0xB4, /* SMC: Optional */ + kSCSICmd_READ_POSITION = 0x34, /* Sec. 5.3.7: Mandatory */ + kSCSICmd_READ_REVERSE = 0x0F, /* Sec. 5.3.8: Optional */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ + kSCSICmd_RECOVER_BUFFERED_DATA = 0x14, /* Sec. 5.3.9: Optional */ + kSCSICmd_RELEASE_6 = 0x17, /* SPC: Mandatory */ + kSCSICmd_RELEASE_10 = 0x57, /* SPC: Mandatory */ + kSCSICmd_REPORT_DENSITY_SUPPORT = 0x44, /* Sec. 5.3.10: Mandatory*/ + kSCSICmd_REPORT_LUNS = 0xA0, /* SPC: Mandatory */ + kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ + kSCSICmd_RESERVE_6 = 0x16, /* SPC: Mandatory */ + kSCSICmd_RESERVE_10 = 0x56, /* SPC: Mandatory */ + kSCSICmd_REWIND = 0x01, /* Sec. 5.3.11: Mandatory*/ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ + kSCSICmd_SPACE = 0x11, /* Sec. 5.3.12: Mandatory*/ + kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ + kSCSICmd_VERIFY_6 = 0x13, /* Sec. 5.3.13: Optional */ + kSCSICmd_WRITE_6 = 0x0A, /* Sec. 5.3.14: Mandatory*/ + kSCSICmd_WRITE_BUFFER = 0x3B, /* SPC: Optional */ + kSCSICmd_WRITE_FILEMARKS = 0x10 /* Sec. 5.3.15: Mandatory*/ +}; +#endif + +#pragma mark - +#pragma mark 0x02 SSC Printer Commands +/* Commands defined by the T10:997-D SCSI-3 Stream Commands (SSC) command + * specification. The definitions and section numbers are based on section 6 + * of the revision 22, January 1, 2000 version of the specification. + */ +#if 0 +enum +{ + kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ + kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ + kSCSICmd_COPY = 0x18, /* SPC: Optional */ + kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional */ + kSCSICmd_FORMAT = 0x04, /* Sec. 6.2.1: Optional */ + kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ + kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ + kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Mandatory */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Mandatory */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* SPC: Optional */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* SPC: Optional */ + kSCSICmd_PRINT = 0x0A, /* Sec. 6.2.2: Mandatory */ + kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ + kSCSICmd_RECOVER_BUFFERED_DATA = 0x14, /* Sec. 6.2.3: Optional */ + kSCSICmd_RELEASE_6 = 0x17, /* SPC: Mandatory */ + kSCSICmd_RELEASE_10 = 0x57, /* SPC: Mandatory */ + kSCSICmd_REPORT_LUNS = 0xA0, /* SPC: Mandatory */ + kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ + kSCSICmd_RESERVE_6 = 0x16, /* SPC: Mandatory */ + kSCSICmd_RESERVE_10 = 0x56, /* SPC: Mandatory */ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ + kSCSICmd_SLEW_AND_PRINT = 0x0B, /* Sec. 6.2.4: Optional */ + kSCSICmd_STOP_PRINT = 0x1B, /* Sec. 6.2.5: Optional */ + kSCSICmd_SYNCHRONIZE_BUFFER = 0x10, /* Sec. 6.2.6: Optional */ + kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ + kSCSICmd_WRITE_BUFFER = 0x3B /* SPC: Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x03 SPC Processor Commands +/* Commands defined by the T10:1236-D SCSI Primary Commands-2 (SPC-2) + * command specification. The definitions and section numbers are based on + * section 9 of the revision 18, 21 May 2000 version of the specification. + */ +#if 0 +enum +{ + kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ + kSCSICmd_COMPARE = 0x39, /* Sec. 7.2: Optional */ + kSCSICmd_COPY = 0x18, /* Sec. 7.3: Optional */ + kSCSICmd_COPY_AND_VERIFY = 0x3A, /* Sec. 7.4: Optional */ + kSCSICmd_EXTENDED_COPY = 0x83, /* Sec. 7.5: Optional */ + kSCSICmd_INQUIRY = 0x12, /* Sec. 7.6: Mandatory */ + kSCSICmd_LOG_SELECT = 0x4C, /* Sec. 7.7: Optional */ + kSCSICmd_LOG_SENSE = 0x4D, /* Sec. 7.8: Optional */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Sec. 7.13: Optional */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Sec. 7.14: Optional */ + kSCSICmd_READ_BUFFER = 0x3C, /* Sec. 7.16: Optional */ + kSCSICmd_RECEIVE = 0x08, /* Sec. 9.2: Optional */ + kSCSICmd_RECEIVE_COPY_RESULTS = 0x84, /* Sec. 7.17: Optional */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* Sec. 7.18: Optional */ + kSCSICmd_RELEASE_10 = 0x57, /* Sec. 7.19: Optional */ + kSCSICmd_RELEASE_6 = 0x17, /* Sec. 7.20: Optional */ + kSCSICmd_REPORT_LUNS = 0xA0, /* Sec. 7.22: Optional */ + kSCSICmd_REQUEST_SENSE = 0x03, /* Sec. 7.23: Mandatory */ + kSCSICmd_RESERVE_10 = 0x56, /* Sec. 7.24: Optional */ + kSCSICmd_RESERVE_6 = 0x16, /* Sec. 7.25: Optional */ + kSCSICmd_SEND = 0x0A, /* Sec. 9.3: Optional */ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* Sec. 7.26: Mandatory */ + kSCSICmd_TEST_UNIT_READY = 0x00, /* Sec. 7.27: Mandatory */ + kSCSICmd_WRITE_BUFFER = 0x3B /* Sec. 7.29: Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x04 SBC Write Once Commands +/* Commands defined by the T10:990-D SCSI-3 Block Commands (SBC) command + * specification. The definitions and section numbers are based on section 6.3 + * of the revision 8c, 13 November 1997 version of the specification. + */ +#if 0 +enum +{ + kSCSICmd_CHANGE_DEFINITION = 0x40, /* SPC: Optional */ + kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ + kSCSICmd_COPY = 0x18, /* SPC: Optional */ + kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional*/ + kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ + kSCSICmd_LOCK_UNLOCK_CACHE = 0x36, /* Sec. 6.1.2: Optional */ + kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ + kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ + kSCSICmd_MEDIUM_SCAN = 0x38, /* Sec. 6.2.3: Optional */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Optional */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Optional */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ + kSCSICmd_MOVE_MEDIUM = 0xA5, /* SMC: Optional */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* SPC: Optional */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* SPC: Optional */ + kSCSICmd_PREFETCH = 0x34, /* Sec. 6.1.3: Optional */ + kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* SPC: Optional */ + kSCSICmd_READ_6 = 0x08, /* Sec. 6.1.4: Optional */ + kSCSICmd_READ_10 = 0x28, /* Sec. 6.1.5: Mandatory */ + kSCSICmd_READ_12 = 0xA8, /* Sec. 6.2.4: Optional */ + kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ + kSCSICmd_READ_CAPACITY = 0x25, /* Sec. 6.1.6: Mandatory */ + kSCSICmd_READ_ELEMENT_STATUS = 0xB8, /* SMC: Optional */ + kSCSICmd_READ_LONG = 0x3E, /* Sec. 6.1.8: Optional */ + kSCSICmd_REASSIGN_BLOCKS = 0x07, /* Sec. 6.1.9: Optional */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ + kSCSICmd_RELEASE_6 = 0x17, /* SPC: Optional */ + kSCSICmd_RELEASE_10 = 0x57, /* SPC: Mandatory */ + kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ + kSCSICmd_RESERVE_6 = 0x16, /* SPC: Optional */ + kSCSICmd_RESERVE_10 = 0x56, /* SPC: Mandatory */ + kSCSICmd_REZERO_UNIT = 0x01, /* Obsolete */ + kSCSICmd_SEARCH_DATA_EQUAL_10 = 0x31, /* Obsolete */ + kSCSICmd_SEARCH_DATA_EQUAL_12 = 0xB1, /* Obsolete */ + kSCSICmd_SEARCH_DATA_HIGH_10 = 0x30, /* Obsolete */ + kSCSICmd_SEARCH_DATA_HIGH_12 = 0xB0, /* Obsolete */ + kSCSICmd_SEARCH_DATA_LOW_10 = 0x32, /* Obsolete */ + kSCSICmd_SEARCH_DATA_LOW_12 = 0xB2, /* Obsolete */ + kSCSICmd_SEEK_6 = 0x0B, /* Obsolete */ + kSCSICmd_SEEK_10 = 0x2B, /* Sec. 6.1.12: Optional */ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ + kSCSICmd_SET_LIMITS_10 = 0x33, /* Sec. 6.1.13: Optional */ + kSCSICmd_SET_LIMITS_12 = 0xB3, /* Sec. 6.2.8: Optional */ + kSCSICmd_START_STOP_UNIT = 0x1B, /* Sec. 6.1.14: Optional */ + kSCSICmd_SYNCHRONIZE_CACHE = 0x35, /* Sec. 6.1.15: Optional */ + kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ + kSCSICmd_VERIFY_10 = 0x2F, /* Sec. 6.2.10: Optional */ + kSCSICmd_VERIFY_12 = 0xAF, /* Sec. 6.2.11: Optional */ + kSCSICmd_WRITE_6 = 0x0A, /* Sec. 6.1.17: Optional */ + kSCSICmd_WRITE_10 = 0x2A, /* Sec. 6.2.10: Mandatory*/ + kSCSICmd_WRITE_12 = 0xAA, /* Sec. 6.2.13: Optional */ + kSCSICmd_WRITE_AND_VERIFY_10 = 0x2E, /* Sec. 6.2.14: Optional */ + kSCSICmd_WRITE_AND_VERIFY_12 = 0xAE, /* Sec. 6.2.15: Optional */ + kSCSICmd_WRITE_BUFFER = 0x3B, /* SPC: Optional */ + kSCSICmd_WRITE_LONG = 0x3F /* Sec. 6.1.20: Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x05 MMC CD-ROM Commands +/* Commands defined by the T10:1363-D SCSI Multimedia Commands-3 (MMC-3) + * specification. The definitions and section numbers are based on section 6.1 + * of the revision 01, March 03, 2000 version of the specification. + * + * NOTE: The comments following each command may not be accurate. These are + * not from the MMC-3 specification, but have been derived from the SCSI-2 and + * original MMC specifications. Unlike the other SCSI command specifications, + * MMC-2 and MMC-3 do not provide a command requirement type and therefore does + * not relist the SPC commands with these requirements as they apply to MMC + * devices. The MMC-2 and MMC-3 specifications also refer back to the SBC + * specification which seems invalid since MMC devices do not represent a + * Peripheral Device Type defined by SBC. It is assumed that the SBC + * references refer to the Peripheral Device Type 0x00 - Direct Access Commands + * definitions from that specification. + */ +#if 0 +enum +{ + kSCSICmd_BLANK = 0xA1, /* Sec. 6.1.1: */ + kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ + kSCSICmd_CLOSE_TRACK_SESSION = 0x5B, /* Sec. 6.1.2: */ + kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ + kSCSICmd_COPY = 0x18, /* SPC: Optional */ + kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional */ + kSCSICmd_ERASE = 0x2C, /* SBC: */ + kSCSICmd_FORMAT_UNIT = 0x04, /* Sec. 6.1.3: */ + kSCSICmd_GET_CONFIGURATION = 0x46, /* Sec. 6.1.4: */ + kSCSICmd_GET_EVENT_STATUS_NOTIFICATION = 0x4A, /* Sec. 6.1.5: */ + kSCSICmd_GET_PERFORMANCE = 0xAC, /* Sec. 6.1.6: */ + kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ + kSCSICmd_LOAD_UNLOAD_MEDIUM = 0xA6, /* Sec. 6.1.7: */ + kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ + kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ + kSCSICmd_MECHANISM_STATUS = 0xBD, /* Sec. 6.1.8: */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Mandatory */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Mandatory */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Mandatory */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Mandatory */ + kSCSICmd_PAUSE_RESUME = 0x4B, /* Sec. 6.1.9: */ + kSCSICmd_PLAY_AUDIO_10 = 0x45, /* Sec. 6.1.10: */ + kSCSICmd_PLAY_AUDIO_12 = 0xA5, /* Sec. 6.1.11: */ + kSCSICmd_PLAY_AUDIO_MSF = 0x47, /* Sec. 6.1.12: */ + kSCSICmd_PLAY_AUDIO_TRACK_INDEX = 0x48, /* Obsolete */ + kSCSICmd_PLAY_CD = 0xBC, /* Sec. 6.1.13: */ + kSCSICmd_PLAY_RELATIVE_10 = 0x49, /* Obsolete */ + kSCSICmd_PLAY_RELATIVE_12 = 0xA9, /* Obsolete */ + kSCSICmd_PREFETCH = 0x34, /* Optional */ + kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* Optional */ + kSCSICmd_READ_6 = 0x08, /* Optional */ + kSCSICmd_READ_10 = 0x28, /* Mandatory */ + kSCSICmd_READ_12 = 0xA8, /* Optional */ + kSCSICmd_READ_BUFFER = 0x3C, /* Optional */ + kSCSICmd_READ_BUFFER_CAPACITY = 0x5C, /* Sec. 6.1.15: */ + kSCSICmd_READ_CD = 0xBE, /* Sec. 6.1.16: */ + kSCSICmd_READ_CD_MSF = 0xB9, /* Sec. 6.1.17: */ + kSCSICmd_READ_CAPACITY = 0x25, /* Sec. 6.1.18: */ + kSCSICmd_READ_DISC_INFORMATION = 0x51, /* Sec. 6.1.19: */ + kSCSICmd_READ_DVD_STRUCTURE = 0xAD, /* Sec. 6.1.20: */ + kSCSICmd_READ_DISC_STRUCTURE = 0xAD, /* Sec. 6.1.20: */ + kSCSICmd_READ_FORMAT_CAPACITIES = 0x23, /* Sec. 6.1.21: */ + kSCSICmd_READ_HEADER = 0x44, /* Sec. 6.1.22: */ + kSCSICmd_READ_LONG = 0x3E, /* Optional */ + kSCSICmd_READ_MASTER_CUE = 0x59, /* Sec. 6.1.23: */ + kSCSICmd_READ_SUB_CHANNEL = 0x42, /* Sec. 6.1.24: */ + kSCSICmd_READ_TOC_PMA_ATIP = 0x43, /* Sec. 6.1.25: */ + kSCSICmd_READ_TRACK_INFORMATION = 0x52, /* Sec. 6.1.27: */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* Optional */ + kSCSICmd_RELEASE_6 = 0x17, /* Mandatory */ + kSCSICmd_RELEASE_10 = 0x57, /* Optional */ + kSCSICmd_REPAIR_TRACK = 0x58, /* Sec. 6.1.28: */ + kSCSICmd_REPORT_KEY = 0xA4, /* Sec. 6.1.29: */ + kSCSICmd_REQUEST_SENSE = 0x03, /* Mandatory */ + kSCSICmd_RESERVE_6 = 0x16, /* Mandatory */ + kSCSICmd_RESERVE_10 = 0x56, /* Optional */ + kSCSICmd_RESERVE_TRACK = 0x53, /* Sec. 6.1.30: */ + kSCSICmd_SCAN_MMC = 0xBA, /* Sec. 6.1.31: */ + kSCSICmd_SEARCH_DATA_EQUAL_10 = 0x31, /* Obsolete */ + kSCSICmd_SEARCH_DATA_EQUAL_12 = 0xB1, /* Obsolete */ + kSCSICmd_SEARCH_DATA_HIGH_10 = 0x30, /* Obsolete */ + kSCSICmd_SEARCH_DATA_HIGH_12 = 0xB0, /* Obsolete */ + kSCSICmd_SEARCH_DATA_LOW_10 = 0x32, /* Obsolete */ + kSCSICmd_SEARCH_DATA_LOW_12 = 0xB2, /* Obsolete */ + kSCSICmd_SEEK_6 = 0x0B, /* Obsolete */ + kSCSICmd_SEEK_10 = 0x2B, /* SBC: */ + kSCSICmd_SEND_CUE_SHEET = 0x5D, /* Sec. 6.1.32: */ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* Mandatory */ + kSCSICmd_SEND_DVD_STRUCTURE = 0xBF, /* Sec. 6.1.33: */ + kSCSICmd_SEND_EVENT = 0xA2, /* Sec. 6.1.34: */ + kSCSICmd_SEND_KEY = 0xA3, /* Sec. 6.1.35: */ + kSCSICmd_SEND_OPC_INFORMATION = 0x54, /* Sec. 6.1.36: */ + kSCSICmd_SET_CD_SPEED = 0xBB, /* Sec. 6.1.37: */ + kSCSICmd_SET_LIMITS_10 = 0x33, /* Optional */ + kSCSICmd_SET_LIMITS_12 = 0xB3, /* Optional */ + kSCSICmd_SET_READ_AHEAD = 0xA7, /* Sec. 6.1.38: */ + kSCSICmd_SET_STREAMING = 0xB6, /* Sec. 6.1.39: */ + kSCSICmd_START_STOP_UNIT = 0x1B, /* Optional */ + kSCSICmd_STOP_PLAY_SCAN = 0x4E, /* Sec. 6.1.40: */ + kSCSICmd_SYNCHRONIZE_CACHE = 0x35, /* Sec. 6.1.41: */ + kSCSICmd_TEST_UNIT_READY = 0x00, /* Mandatory */ + kSCSICmd_VERIFY_10 = 0x2F, /* Optional */ + kSCSICmd_VERIFY_12 = 0xAF, /* Optional */ + kSCSICmd_WRITE_10 = 0x2A, /* Sec. 6.1.42: */ + kSCSICmd_WRITE_12 = 0xAA, /* Sec. 6.1.43: */ + kSCSICmd_WRITE_AND_VERIFY_10 = 0x2E, /* Sec. 6.1.44: */ + kSCSICmd_WRITE_BUFFER = 0x3B /* Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x06 SGC Scanner Commands +/* Commands defined by the T10:998-D SCSI-3 Graphics Commands (SGC) + * specification. The definitions and section numbers are based on section 6 + * of the revision 0, April 1995 version of the specification. + */ +#if 0 +enum +{ + kSCSICmd_CHANGE_DEFINITION = 0x40, /* SPC: Optional */ + kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ + kSCSICmd_COPY = 0x18, /* SPC: Optional */ + kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional */ + kSCSICmd_GET_DATA_BUFFER_STATUS = 0x34, /* Sec. 6.1.1: Optional */ + kSCSICmd_GET_WINDOW = 0x25, /* Sec. 6.1.2: Optional */ + kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ + kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ + kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Optional */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Optional */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ + kSCSICmd_OBJECT_POSITION = 0x31, /* Sec. 6.1.3: Optional */ + kSCSICmd_PORT_STATUS = 0x11, /* SPC (??): Mandatory + * for dual port devices */ + kSCSICmd_READ = 0x28, /* Sec. 6.1.4: Mandatory */ + kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ + kSCSICmd_RELEASE_6 = 0x17, /* SPC: Mandatory */ + kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ + kSCSICmd_RESERVE_6 = 0x16, /* SPC: Mandatory */ + kSCSICmd_SCAN = 0x1B, /* Sec. 6.1.5: Optional */ + kSCSICmd_SEND = 0x1B, /* Sec. 6.1.6: Optional */ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ + kSCSICmd_SET_WINDOW = 0x24, /* Sec. 6.1.7: Mandatory */ + kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ + kSCSICmd_WRITE_BUFFER = 0x3B /* SPC: Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x07 SBC Optical Media Commands +/* Commands defined by the T10:990-D SCSI-3 Block Commands (SBC) + * (revision 8c, 13 November 1998) command specification. + */ + +#pragma mark - +#pragma mark 0x08 SMC Medium Changer Commands +/* Commands defined by the T10:1228-D SCSI-3 Medium Changer Commands-2 (SMC-2) + * (revision 0, March 16, 2000) command specification. + */ +#if 0 +enum +{ + /* Commands For Independent Medium Changers */ + kSCSICmd_EXCHANGE_MEDIUM = 0xA6, /* Optional */ + kSCSICmd_INITIALIZE_ELEMENT_STATUS = 0x07, /* Optional */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* Optional */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* Optional */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* Optional */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* Optional */ + kSCSICmd_MOVE_MEDIUM = 0xA5, /* Mandatory */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Optional */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Optional */ + kSCSICmd_POSITION_TO_ELEMENT = 0x2B, /* Optional */ + kSCSICmd_READ_ELEMENT_STATUS = 0xB8, /* Mandatory */ + kSCSICmd_RELEASE_ELEMENT_6 = 0x16, /* Optional */ + kSCSICmd_RELEASE_ELEMENT_10 = 0x56, /* Optional */ + kSCSICmd_REQUEST_VOLUME_ELEMENT_ADDRESS = 0xB5, /* Optional */ + kSCSICmd_REQUEST_SENSE = 0x03, /* Mandatory */ + kSCSICmd_RESERVE_ELEMENT_6 = 0x16, /* Optional */ + kSCSICmd_RESERVE_ELEMENT_10 = 0x56 /* Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x09 SSC Communications Commands +/* Commands defined by the T10:997-D SCSI-3 Stream Commands (SSC) + * (revision 22, January 1, 2000) command specification. + */ + +#pragma mark - +#pragma mark 0x0A ASC IT8 Prepress Commands +#pragma mark 0x0B ASC IT8 Prepress Commands +/* Commands defined by the ASC IT8 specification + * (revision xx, month day, year) command specification. + */ +#if 0 +enum +{ +}; +#endif + +#pragma mark - +#pragma mark 0x0C SCC Array Controller Commands +/* Commands defined by the ANSI NCITS.318-199x SCSI Controller + * Commands (SCC-2) ratified command specification. + */ +#if 0 +enum +{ + kSCSICmd_MAINTENANCE_IN = 0xA3, /* Mandatory */ + kSCSICmd_MAINTENANCE_OUT = 0xA4, /* Optional */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* Optional */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* Optional */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* Optional */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* Optional */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Optional */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Optional */ + kSCSICmd_PORT_STATUS = 0x1F, /* Optional */ + kSCSICmd_REDUNDANCY_GROUP_IN = 0xBA, /* Mandatory */ + kSCSICmd_REDUNDANCY_GROUP_OUT = 0xBB, /* Optional */ + kSCSICmd_RELEASE_6 = 0x17, /* Optional */ + kSCSICmd_RELEASE_10 = 0x57, /* Optional */ + kSCSICmd_REPORT_LUNS = 0xA0, /* Mandatory */ + kSCSICmd_REQUEST_SENSE = 0x03, /* Mandatory */ + kSCSICmd_RESERVE_6 = 0x16, /* Optional */ + kSCSICmd_RESERVE_10 = 0x56, /* Optional*/ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* Optional */ + kSCSICmd_SPARE_IN = 0xBC, /* Mandatory */ + kSCSICmd_SPARE_OUT = 0xBD /* Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x0D SES Enclosure Services Commands +/* Commands defined by the T10:1212-D SCSI-3 Enclosure Services (SES) + * (revision 8b, February 11, 1998) command specification. + */ +#if 0 +enum +{ + kSCSICmd_MODE_SELECT_6 = 0x15, /* Optional */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* Optional */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* Optional */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* Optional */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Optional */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Optional */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x17, /* Mandatory */ + kSCSICmd_RELEASE_6 = 0x17, /* Optional */ + kSCSICmd_RELEASE_10 = 0x57, /* Optional */ + kSCSICmd_REQUEST_SENSE = 0x03, /* Mandatory */ + kSCSICmd_RESERVE_6 = 0x16, /* Optional */ + kSCSICmd_RESERVE_10 = 0x56, /* Optional */ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D /* Mandatory */ +}; +#endif + +#pragma mark - +#pragma mark 0x0E RBC Reduced Block Commands +/* Commands defined by the T10:1240-D Reduced Block Commands (RBC) + * (revision 10a, August 18, 1999) command specification. + */ +#if 0 +enum +{ + kSCSICmd_FORMAT_UNIT = 0x04, /* Optional */ + kSCSICmd_READ_10 = 0x28, /* Mandatory */ + kSCSICmd_READ_CAPACITY = 0x25, /* Mandatory */ + kSCSICmd_START_STOP_UNIT = 0x1B, /* Mandatory */ + kSCSICmd_SYNCHRONIZE_CACHE = 0x35, /* Optional */ + kSCSICmd_VERIFY_10 = 0x2F, /* Mandatory */ + kSCSICmd_WRITE_10 = 0x2A, /* Mandatory */ + kSCSICmd_WRITE_BUFFER = 0x3B /* Mandatory for fixed media + * Optional for removable */ +}; +#endif + +#pragma mark - +#pragma mark 0x0F OCRW Optical Card Commands +/* Commands defined by the ISO/IEC 14776-381 SCSI Specification for + * Optical Card Reader/Writer (OCRW) ratified command specification. + */ +#if 0 +enum +{ +}; +#endif + +#pragma mark - +#pragma mark 0x11 OSD Object-based Storage Commands +/* Commands defined by the T10:1355-D Object-based Storage Commands (OSD) + * (revision 1, 18 May 2000) command specification. + */ +#if 0 +enum +{ +}; +#endif + +#pragma mark - +#pragma mark 0x15 RMC Simplified Multimedia Commands +/* Commands defined by the T10:1364-D Reduced Multimedia Commands (RMC) + * (revision 1, November 11, 1999) command specification. + */ +#if 0 +enum +{ +}; +#endif + +#endif /* _SCSI_COMMAND_OPERATION_CODES_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSIPort.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSIPort.h.svn-base new file mode 100644 index 0000000..8eefbeb --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/SCSIPort.h.svn-base @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2004-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_SCSI_PORTS_H_ +#define _IOKIT_SCSI_PORTS_H_ + + +/*! @header SCSIPort + @discussion + This file contains all the definitions for SCSIPort notifications and status. +*/ + + +/*! +@enum kSCSIPort_NotificationStatusChange +@discussion +Message definition to be used with the messageClients +call to inform of a change in port status. +*/ +enum +{ + kSCSIPort_NotificationStatusChange = 0x68000001 +}; + + +/*! @typedef SCSIPortStatus + @abstract 32-bit number to represent a SCSIPortStatus. + @discussion Type for SCSIPortStatus. +*/ + +typedef UInt32 SCSIPortStatus; + +/*! @enum SCSI Port Status Values + @discussion Definitions for the possible port status values +*/ +enum +{ + /*! + @constant kSCSIPort_StatusOnline + The port is online. + */ + kSCSIPort_StatusOnline = 0, + + /*! + @constant kSCSIPort_StatusOffline + The port is offline (e.g. unplugged cable). + */ + kSCSIPort_StatusOffline = 1, + + /*! + @constant kSCSIPort_StatusFailure + Driver has detected unrecoverable port failure (e.g. hardware port failure) + */ + kSCSIPort_StatusFailure = 2 +}; + +#endif /* _IOKIT_SCSI_PORTS_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSITask.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSITask.h.svn-base new file mode 100644 index 0000000..154c187 --- /dev/null +++ b/i386/include/IOKit/scsi/.svn/text-base/SCSITask.h.svn-base @@ -0,0 +1,456 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_SCSI_TASK_H_ +#define _IOKIT_SCSI_TASK_H_ + + +#if KERNEL +#include <IOKit/IOTypes.h> +#else +#include <CoreFoundation/CoreFoundation.h> +#endif + + +/*! @header SCSITask +SCSITask typedefs and constants used inside the kernel and user space. + +Note that the SCSITaskIdentifier is an opaque object and that directly +casting the SCSITaskIdentifier to any other type is discouraged. The SCSITask +implementation changes when necessary to accomodate architectural changes, +performance improvements, and bug fixes. + +Device and protocol layer drivers that need to access information +contained in a SCSITask should use the appropriate accessor methods in +IOSCSIPrimaryCommandsDevice.h or IOSCSIProtocolServices.h +*/ + + +/*! @typedef SCSIDeviceIdentifier + @abstract 64-bit number to represent a SCSI Device. + @discussion If the identifier can either be that of an initiator or a target, + SCSIDeviceIdentifier should be used. +*/ + +typedef UInt64 SCSIDeviceIdentifier; + +/*! @typedef SCSITargetIdentifier + @abstract 64-bit number to represent a SCSI Target Device. + @discussion If the identifier is for a target only and not an initiator, then + SCSITargetIdentifier should be used. +*/ + +typedef SCSIDeviceIdentifier SCSITargetIdentifier; + +/*! @typedef SCSIInitiatorIdentifier + @abstract 64-bit number to represent a SCSI Initiator Device. + @discussion If the identifier is for an initiator only and not a target, then + SCSIInitiatorIdentifier should be used. +*/ + +typedef SCSIDeviceIdentifier SCSIInitiatorIdentifier; + +/*! @typedef SCSILogicalUnitNumber + @abstract 64-bit number to represent a logical unit. + @discussion 64-bit number to represent a logical unit. +*/ + +typedef UInt64 SCSILogicalUnitNumber; + +/*! @typedef SCSITaggedTaskIdentifier + @abstract 64-bit number to represent a unique task identifier. + @discussion The Tagged Task Identifier is used when a Task has a Task Attribute other + than SIMPLE. The SCSI Application Layer client that controls the Logical + Unit for which a Task is intended is required to guarantee that the Task + Tag Identifier is unique. Zero cannot be used a a Tag value as this is used + to when a Tagged Task Identifier value is needed for a Task with a SIMPLE + attribute. +*/ + +typedef UInt64 SCSITaggedTaskIdentifier; + +/*! + @enum Untagged Task Identifier + @discussion The Untagged Task Identifier is used to indicate no unique tag + is associated with the Task. + @constant kSCSIUntaggedTaskIdentifier This value means the task is untagged. + */ + +enum +{ + kSCSIUntaggedTaskIdentifier = 0 +}; + +/*! + @typedef SCSITaskAttribute + @abstract Attributes for task delivery. + @discussion The Task Attribute defines how this task should be managed + when determing order for queueing and submission to the + appropriate device server. The Task Attribute is set by the SCSI + Application Layer and cannot be modified by the SCSI Protocol Layer. + @constant kSCSITask_SIMPLE The task has a simple attribute. + @constant kSCSITask_ORDERED The task has an ordered attribute. + @constant kSCSITask_HEAD_OF_QUEUE The task has a head-of-queue attribute. + @constant kSCSITask_ACA The task has an auto-contingent-allegiance attribute. + */ + +typedef enum SCSITaskAttribute +{ + kSCSITask_SIMPLE = 0, + kSCSITask_ORDERED = 1, + kSCSITask_HEAD_OF_QUEUE = 2, + kSCSITask_ACA = 3 +} SCSITaskAttribute; + +/*! + @typedef SCSITaskState + @abstract Attributes for task state. + @discussion The Task State represents the current state of the task. + The state is set to NEW_TASK when the task is created. The SCSI Protocol + Layer will then adjust the state as the task is queued and during + execution. The SCSI Application Layer can examine the state to monitor + the progress of a task. The Task State can only be modified by the SCSI + Protocol Layer. The SCSI Application Layer can only read the state. + @constant kSCSITaskState_NEW_TASK The task state is new task. + @constant kSCSITaskState_ENABLED The task is enabled and queued. + @constant kSCSITaskState_BLOCKED The task is blocked. + @constant kSCSITaskState_DORMANT The task is dormant. + @constant kSCSITaskState_ENDED The task is complete. + */ + +typedef enum SCSITaskState +{ + kSCSITaskState_NEW_TASK = 0, + kSCSITaskState_ENABLED = 1, + kSCSITaskState_BLOCKED = 2, + kSCSITaskState_DORMANT = 3, + kSCSITaskState_ENDED = 4 +} SCSITaskState; + + +/*! + @typedef SCSIServiceResponse + @abstract Attributes for task service response. + @discussion The Service Response represents the execution status of + a service request made to a Protocol Services Driver. The Service + Response can only be modified by the SCSI Protocol Layer. The SCSI + Application Layer can only read the state. + */ + +typedef enum SCSIServiceResponse +{ + /*! + @constant kSCSIServiceResponse_Request_In_Process + Not defined in SAM specification, but is a service response used + for asynchronous commands that are not yet completed. + */ + kSCSIServiceResponse_Request_In_Process = 0, + + /*! + @constant kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE + The service request failed because of a delivery or target failure. + */ + kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE = 1, + + /*! + @constant kSCSIServiceResponse_TASK_COMPLETE + The task completed. + */ + kSCSIServiceResponse_TASK_COMPLETE = 2, + + /*! + @constant kSCSIServiceResponse_LINK_COMMAND_COMPLETE + The linked command completed. + */ + kSCSIServiceResponse_LINK_COMMAND_COMPLETE = 3, + + /*! + @constant kSCSIServiceResponse_FUNCTION_COMPLETE + The task management function completed. + */ + kSCSIServiceResponse_FUNCTION_COMPLETE = 4, + + /*! + @constant kSCSIServiceResponse_FUNCTION_REJECTED + The task management function was rejected. + */ + kSCSIServiceResponse_FUNCTION_REJECTED = 5 +} SCSIServiceResponse; + +/*! + @typedef SCSITaskStatus + @abstract Attributes for task status. + @discussion The Task Status represents the completion status + of the task which provides the SCSI Application Layer with + additional information about how to procede in handling a + completed task. + + The SCSI Architecture Model specification only defines task + status values for when a task completes with a service response + of either TASK_COMPLETED or LINK_COMMAND_COMPLETE. + + Since additional information will aid in error recovery when + a task fails to be completed by a device due to a service + response of kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE, + additional values have been defined that can be returned by the + SCSI Protocol Layer to inform the SCSI Application Layer of the + cause of the delivery failure. + + The Task Status can only be modified by the SCSI Protocol Layer. + The SCSI Application Layer can only read the status +*/ +typedef enum SCSITaskStatus +{ + + /*! + @constant kSCSITaskStatus_GOOD + The task completed with a status of GOOD. + */ + + kSCSITaskStatus_GOOD = 0x00, + + /*! + @constant kSCSITaskStatus_CHECK_CONDITION + The task completed with a status of CHECK_CONDITION. Additional + information about the condition should be available in the sense data. + */ + + kSCSITaskStatus_CHECK_CONDITION = 0x02, + + /*! + @constant kSCSITaskStatus_CONDITION_MET + The task completed with a status of CONDITION_MET. + */ + + kSCSITaskStatus_CONDITION_MET = 0x04, + + /*! + @constant kSCSITaskStatus_BUSY + The task completed with a status of BUSY. The device server might need + time to process a request and a delay may be required. + */ + kSCSITaskStatus_BUSY = 0x08, + + /*! + @constant kSCSITaskStatus_INTERMEDIATE + The task completed with a status of INTERMEDIATE. + */ + kSCSITaskStatus_INTERMEDIATE = 0x10, + + /*! + @constant kSCSITaskStatus_INTERMEDIATE_CONDITION_MET + The task completed with a status of INTERMEDIATE_CONDITION_MET. + */ + kSCSITaskStatus_INTERMEDIATE_CONDITION_MET = 0x14, + + /*! + @constant kSCSITaskStatus_RESERVATION_CONFLICT + The task completed with a status of RESERVATION_CONFLICT. + */ + kSCSITaskStatus_RESERVATION_CONFLICT = 0x18, + + /*! + @constant kSCSITaskStatus_TASK_SET_FULL + The task completed with a status of TASK_SET_FULL. The device server + may need to complete a task before the initiator sends another. + */ + kSCSITaskStatus_TASK_SET_FULL = 0x28, + + /*! + @constant kSCSITaskStatus_ACA_ACTIVE + The task completed with a status of ACA_ACTIVE. The device server may + need the initiator to clear the Auto-Contingent Allegiance condition + before it will respond to new commands. + */ + kSCSITaskStatus_ACA_ACTIVE = 0x30, + + /*! + @constant kSCSITaskStatus_TaskTimeoutOccurred + If a task is aborted by the SCSI Protocol Layer due to it exceeding + the timeout value specified by the task, the task status shall be + set to kSCSITaskStatus_TaskTimeoutOccurred. + */ + + kSCSITaskStatus_TaskTimeoutOccurred = 0x01, + + /*! + @constant kSCSITaskStatus_ProtocolTimeoutOccurred + If a task is aborted by the SCSI Protocol Layer due to it exceeding a + timeout value specified by the support for the protocol or a related + specification, the task status shall be set to + kSCSITaskStatus_ProtocolTimeoutOccurred. + */ + + kSCSITaskStatus_ProtocolTimeoutOccurred = 0x02, + + /*! + @constant kSCSITaskStatus_DeviceNotResponding + If a task is unable to be delivered due to a failure of the device not + accepting the task or the device acknowledging the attempt to send it the + device the task status shall be set to kSCSITaskStatus_DeviceNotResponding. + This will allow the SCSI Application driver to perform the necessary steps + to try to recover the device. This shall only be reported after the SCSI + Protocol Layer driver has attempted all protocol specific attempts to recover + the device. + */ + + kSCSITaskStatus_DeviceNotResponding = 0x03, + + /*! + @constant kSCSITaskStatus_DeviceNotPresent + If the task is unable to be delivered because the device has been + detached, the task status shall be set to kSCSITaskStatus_DeviceNotPresent. + This will allow the SCSI Application Layer to halt the sending of tasks + to the device and, if supported, perform any device failover or system + cleanup. + */ + kSCSITaskStatus_DeviceNotPresent = 0x04, + + /*! + @constant kSCSITaskStatus_DeliveryFailure + If the task is unable to be + delivered to the device due to a failure in the SCSI Protocol Layer, + such as a bus reset or communications error, but the device is is + known to be functioning properly, the task status shall be set to + kSCSITaskStatus_DeliveryFailure. This can also be reported if the + task could not be delivered due to a protocol error that has since + been corrected. + */ + kSCSITaskStatus_DeliveryFailure = 0x05, + + /*! + @constant kSCSITaskStatus_No_Status + This status is not defined by + the SCSI specifications, but is here to provide a status that can + be returned in cases where there is not status available from the + device or protocol, for example, when the service response is + neither TASK_COMPLETED nor LINK_COMMAND_COMPLETE or when the + service response is SERVICE_DELIVERY_OR_TARGET_FAILURE and the + reason for failure could not be determined. + */ + kSCSITaskStatus_No_Status = 0xFF +} SCSITaskStatus; + +/*! + @enum Command Descriptor Block Size + @discussion Command Descriptor Block Size constants. +*/ +enum +{ + /*! + @constant kSCSICDBSize_Maximum This is the largest size a Command Descriptor + Block can be as specified in SPC-2. + */ + kSCSICDBSize_Maximum = 16, + + /*! + @constant kSCSICDBSize_6Byte Use this for a 6-byte CDB. + */ + kSCSICDBSize_6Byte = 6, + + /*! + @constant kSCSICDBSize_10Byte Use this for a 10-byte CDB. + */ + kSCSICDBSize_10Byte = 10, + + /*! + @constant kSCSICDBSize_12Byte Use this for a 12-byte CDB. + */ + kSCSICDBSize_12Byte = 12, + + /*! + @constant kSCSICDBSize_16Byte Use this for a 16-byte CDB. + */ + kSCSICDBSize_16Byte = 16 +}; + +typedef UInt8 SCSICommandDescriptorBlock[kSCSICDBSize_Maximum]; + +/*! + @enum Data Transfer Direction + @discussion DataTransferDirection constants. +*/ +enum +{ + /*! + @constant kSCSIDataTransfer_NoDataTransfer Use this for tasks + that transfer no data. + */ + kSCSIDataTransfer_NoDataTransfer = 0x00, + + /*! + @constant kSCSIDataTransfer_FromInitiatorToTarget Use this for tasks that transfer + data from the initiator to the target. + */ + kSCSIDataTransfer_FromInitiatorToTarget = 0x01, + + /*! + @constant kSCSIDataTransfer_FromTargetToInitiator Use this for tasks that transfer + data from the target to the initiator. + */ + kSCSIDataTransfer_FromTargetToInitiator = 0x02 +}; + + +#if defined(KERNEL) && defined(__cplusplus) + +/* Libkern includes */ +#include <libkern/c++/OSObject.h> + + +/*! + @enum SCSITaskMode + @discussion The SCSI Task mode is used by the SCSI + Protocol Layer to indicate what mode the task is executing. +*/ +typedef enum SCSITaskMode +{ + kSCSITaskMode_CommandExecution = 1, + kSCSITaskMode_Autosense = 2 +} SCSITaskMode; + +/*! + @typedef SCSITaskIdentifier + @discussion This is an opaque object that represents a task. + This is used so that drivers for both the SCSI Protocol Layer + and the SCSI Application Layer cannot modify the SCSITask object + directly but must instead use the inherited methods to do so. This + allows the implementation of SCSITask to change without directly + impacting device and protocol layer drivers. In addition, it + prevents changing of properties that are not allowed to be + changed by a given layer. +*/ +typedef OSObject * SCSITaskIdentifier; + + +/*! + @typedef SCSITaskCompletion + @discussion This is the typedef for completion routines that + work with SCSITaskIdentifiers. +*/ +typedef void ( *SCSITaskCompletion )( SCSITaskIdentifier completedTask ); + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_SCSI_TASK_H_ */ diff --git a/i386/include/IOKit/scsi/IOBDServices.h b/i386/include/IOKit/scsi/IOBDServices.h new file mode 100644 index 0000000..70482d7 --- /dev/null +++ b/i386/include/IOKit/scsi/IOBDServices.h @@ -0,0 +1,241 @@ +/* + * Copyright (c) 2006-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_BD_SERVICES_H_ +#define _IOKIT_IO_BD_SERVICES_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// IOKit includes +#include <IOKit/IOTypes.h> + +// Generic IOKit storage related headers +#include <IOKit/storage/IOBDTypes.h> +#include <IOKit/storage/IOBDBlockStorageDevice.h> + +// SCSI Architecture Model Family includes +#include <IOKit/scsi/IOSCSIPeripheralDeviceType05.h> + +class IOMemoryDescriptor; + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOBDServices : public IOBDBlockStorageDevice +{ + + OSDeclareDefaultStructors ( IOBDServices ) + +protected: + + OSSet * fClients; + IOSCSIPeripheralDeviceType05 * fProvider; + + virtual void free ( void ); + + // Reserve space for future expansion. + struct IOBDServicesExpansionData { }; + IOBDServicesExpansionData * fIOBDServicesReserved; + +public: + + static void AsyncReadWriteComplete ( void * clientData, + IOReturn status, + UInt64 actualByteCount ); + + // Deprecated + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageAttributes * attributes, + IOStorageCompletion * completion ); + + virtual IOReturn doEjectMedia ( void ); + + virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); + + virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + + virtual IOReturn doLockUnlockMedia ( bool doLock ); + + virtual IOReturn doSynchronizeCache ( void ); + + virtual IOReturn getWriteCacheState ( bool * enabled ); + + virtual IOReturn setWriteCacheState ( bool enabled ); + + virtual char * getVendorString ( void ); + + virtual char * getProductString ( void ); + + virtual char * getRevisionString ( void ); + + virtual char * getAdditionalDeviceInfoString ( void ); + + virtual IOReturn reportBlockSize ( UInt64 * blockSize ); + + virtual IOReturn reportEjectability ( bool * isEjectable ); + + virtual IOReturn reportLockability ( bool * isLockable ); + + virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); + + virtual IOReturn reportPollRequirements ( bool * pollIsRequired, + bool * pollIsExpensive ); + + virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); + + virtual IOReturn reportRemovability ( bool * isRemovable ); + + virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); + + /* CD Specific */ + virtual IOReturn doAsyncReadCD ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageCompletion completion ); + + virtual IOReturn readISRC ( UInt8 track, CDISRC isrc ); + + virtual IOReturn readMCN ( CDMCN mcn); + + virtual IOReturn readTOC ( IOMemoryDescriptor * buffer ); + + virtual IOReturn audioPause ( bool pause ); + + virtual IOReturn audioPlay ( CDMSF timeStart, CDMSF timeStop ); + + virtual IOReturn audioScan ( CDMSF timeStart, bool reverse ); + + virtual IOReturn audioStop ( void ); + + virtual IOReturn getAudioStatus ( CDAudioStatus * status ); + + virtual IOReturn getAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume ); + + virtual IOReturn setAudioVolume ( UInt8 leftVolume, UInt8 rightVolume ); + + virtual IOReturn getSpeed ( UInt16 * kilobytesPerSecond ); + + virtual IOReturn setSpeed ( UInt16 kilobytesPerSecond ); + + /* DVD Specific */ + virtual UInt32 getMediaType ( void ); + + virtual IOReturn reportKey ( IOMemoryDescriptor * buffer, + const DVDKeyClass keyClass, + const UInt32 lba, + const UInt8 agid, + const DVDKeyFormat keyFormat ); + + virtual IOReturn sendKey ( IOMemoryDescriptor * buffer, + const DVDKeyClass keyClass, + const UInt8 agid, + const DVDKeyFormat keyFormat ); + + virtual IOReturn readDVDStructure ( IOMemoryDescriptor * buffer, + const UInt8 structureFormat, + const UInt32 logicalBlockAddress, + const UInt8 layer, + const UInt8 agid ); + + /* BD Specific */ + virtual IOReturn readDiscStructure ( IOMemoryDescriptor * buffer, + UInt8 structureFormat, + UInt32 logicalBlockAddress, + UInt8 layer, + UInt8 agid, + UInt8 mediaType ); + + /* 10.6.0 */ + virtual IOReturn requestIdle ( void ); + + /* System Specific */ + virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); + virtual IOReturn setProperties ( OSObject * properties ); + + /* User Client Specific */ + virtual bool start ( IOService * provider ); + virtual bool open ( IOService * client, IOOptionBits options, IOStorageAccess access ); + + virtual bool handleOpen ( IOService * client, IOOptionBits options, void * access ); + virtual void handleClose ( IOService * client, IOOptionBits options ); + virtual bool handleIsOpen ( const IOService * client ) const; + + /* Added with 10.1.3 */ + virtual IOReturn readTOC ( IOMemoryDescriptor * buffer, + CDTOCFormat format, + UInt8 msf, + UInt8 trackSessionNumber, + UInt16 * actualByteCount ); + + /* Added with 10.1.3 */ + virtual IOReturn readDiscInfo ( IOMemoryDescriptor * buffer, + UInt16 * actualByteCount ); + + /* Added with 10.1.3 */ + virtual IOReturn readTrackInfo ( IOMemoryDescriptor * buffer, + UInt32 address, + CDTrackInfoAddressType addressType, + UInt16 * actualByteCount ); + + /* Added with 10.5 */ + virtual IOReturn splitTrack ( UInt32 address ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOBDServices, 1 ); + OSMetaClassDeclareReservedUnused ( IOBDServices, 2 ); + OSMetaClassDeclareReservedUnused ( IOBDServices, 3 ); + OSMetaClassDeclareReservedUnused ( IOBDServices, 4 ); + OSMetaClassDeclareReservedUnused ( IOBDServices, 5 ); + OSMetaClassDeclareReservedUnused ( IOBDServices, 6 ); + OSMetaClassDeclareReservedUnused ( IOBDServices, 7 ); + OSMetaClassDeclareReservedUnused ( IOBDServices, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_BD_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/IOBlockStorageServices.h b/i386/include/IOKit/scsi/IOBlockStorageServices.h new file mode 100644 index 0000000..d62a02b --- /dev/null +++ b/i386/include/IOKit/scsi/IOBlockStorageServices.h @@ -0,0 +1,158 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_BLOCK_STORAGE_SERVICES_H_ +#define _IOKIT_IO_BLOCK_STORAGE_SERVICES_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// IOKit includes +#include <IOKit/IOTypes.h> + +// Generic IOKit storage related headers +#include <IOKit/storage/IOBlockStorageDevice.h> + +// SCSI Architecture Model Family includes +#include <IOKit/scsi/IOSCSIBlockCommandsDevice.h> + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOBlockStorageServices : public IOBlockStorageDevice +{ + + OSDeclareDefaultStructors ( IOBlockStorageServices ) + +private: + + bool fMediaChanged; /* DEPRECATED */ + bool fMediaPresent; + +protected: + + IOSCSIBlockCommandsDevice * fProvider; + + UInt64 fMaxReadBlocks; + UInt64 fMaxWriteBlocks; + + virtual bool attach ( IOService * provider ); + virtual void detach ( IOService * provider ); + virtual IOReturn newUserClient ( + task_t owningTask, + void * securityID, + UInt32 type, + OSDictionary * properties, + IOUserClient ** handler ); + + // Reserve space for future expansion. + struct IOBlockStorageServicesExpansionData { }; + IOBlockStorageServicesExpansionData * fIOBlockStorageServicesReserved; + +public: + + virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); + + static void AsyncReadWriteComplete ( void * clientData, + IOReturn status, + UInt64 actualByteCount ); + + // Deprecated + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageAttributes * attributes, + IOStorageCompletion * completion ); + + virtual IOReturn doEjectMedia ( void ); + + virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); + + virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + + virtual IOReturn doLockUnlockMedia ( bool doLock ); + + virtual IOReturn doSynchronizeCache ( void ); + + virtual char * getVendorString ( void ); + + virtual char * getProductString ( void ); + + virtual char * getRevisionString ( void ); + + virtual char * getAdditionalDeviceInfoString ( void ); + + virtual IOReturn reportBlockSize ( UInt64 * blockSize ); + + virtual IOReturn reportEjectability ( bool * isEjectable ); + + virtual IOReturn reportLockability ( bool * isLockable ); + + virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); + + virtual IOReturn reportPollRequirements ( bool * pollIsRequired, + bool * pollIsExpensive ); + + virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); + + virtual IOReturn reportRemovability ( bool * isRemovable ); + + virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); + + virtual IOReturn getWriteCacheState ( bool * enabled ); + + virtual IOReturn setWriteCacheState ( bool enabled ); + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 1 ); + OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 2 ); + OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 3 ); + OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 4 ); + OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 5 ); + OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 6 ); + OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 7 ); + OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_BLOCK_STORAGE_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/IOCompactDiscServices.h b/i386/include/IOKit/scsi/IOCompactDiscServices.h new file mode 100644 index 0000000..a9d4a31 --- /dev/null +++ b/i386/include/IOKit/scsi/IOCompactDiscServices.h @@ -0,0 +1,230 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_COMPACT_DISC_SERVICES_H_ +#define _IOKIT_IO_COMPACT_DISC_SERVICES_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// IOKit includes +#include <IOKit/IOTypes.h> + +// Generic IOKit storage related headers +#include <IOKit/storage/IOCDTypes.h> +#include <IOKit/storage/IOCDBlockStorageDevice.h> + +// SCSI Architecture Model Family includes +#include <IOKit/scsi/IOSCSIPeripheralDeviceType05.h> + +class IOMemoryDescriptor; + +// Use this switch to turn off the data cache. +#define _USE_DATA_CACHING_ 1 + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOCompactDiscServices : public IOCDBlockStorageDevice +{ + + OSDeclareDefaultStructors ( IOCompactDiscServices ) + +#if (_USE_DATA_CACHING_) + // Data Cache members + bool fUseDataCache; // Indicates if cache should be used. This + // will be set to false if all the necessary support + // for the data cache could not be allocated or + // initialized. + UInt8 * fDataCacheStorage; // Storage space for the cache + UInt32 fDataCacheStartBlock; // Starting block of the data in the cache. + UInt32 fDataCacheBlockCount; // Number of contiguous blocks in the cache + // starting with fDataCacheStartBlock. A value of + // zero in this member indicates that all data + // in the cache is invalid. + + IOSimpleLock * fDataCacheLock; // This is the lock for preventing multiple access + // while manipulating the data cache. +#endif + +protected: + + OSSet * fClients; + IOSCSIPeripheralDeviceType05 * fProvider; + + virtual void free ( void ); + + // Reserve space for future expansion. + struct IOCompactDiscServicesExpansionData { }; + IOCompactDiscServicesExpansionData * fIOCompactDiscServicesReserved; + +public: + + static void AsyncReadWriteComplete ( void * clientData, + IOReturn status, + UInt64 actualByteCount ); + + // Deprecated + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageAttributes * attributes, + IOStorageCompletion * completion ); + + virtual IOReturn doEjectMedia ( void ); + + virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); + + virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + + virtual IOReturn doLockUnlockMedia ( bool doLock ); + + virtual IOReturn doSynchronizeCache ( void ); + + virtual IOReturn getWriteCacheState ( bool * enabled ); + + virtual IOReturn setWriteCacheState ( bool enabled ); + + virtual char * getVendorString ( void ); + + virtual char * getProductString ( void ); + + virtual char * getRevisionString ( void ); + + virtual char * getAdditionalDeviceInfoString ( void ); + + virtual IOReturn reportBlockSize ( UInt64 * blockSize ); + + virtual IOReturn reportEjectability ( bool * isEjectable ); + + virtual IOReturn reportLockability ( bool * isLockable ); + + virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); + + virtual IOReturn reportPollRequirements ( bool * pollIsRequired, + bool * pollIsExpensive ); + + virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); + + virtual IOReturn reportRemovability ( bool * isRemovable ); + + virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); + + /* CD Specific */ + virtual IOReturn doAsyncReadCD ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageCompletion completion ); + + virtual IOReturn readISRC ( UInt8 track, CDISRC isrc ); + + virtual IOReturn readMCN ( CDMCN mcn); + + virtual IOReturn readTOC ( IOMemoryDescriptor * buffer ); + + virtual IOReturn audioPause ( bool pause ); + + virtual IOReturn audioPlay ( CDMSF timeStart, CDMSF timeStop ); + + virtual IOReturn audioScan ( CDMSF timeStart, bool reverse ); + + virtual IOReturn audioStop ( void ); + + virtual IOReturn getAudioStatus ( CDAudioStatus * status ); + + virtual IOReturn getAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume ); + + virtual IOReturn setAudioVolume ( UInt8 leftVolume, UInt8 rightVolume ); + + virtual UInt32 getMediaType ( void ); + + virtual IOReturn getSpeed ( UInt16 * kilobytesPerSecond ); + + virtual IOReturn setSpeed ( UInt16 kilobytesPerSecond ); + + /* System Specific */ + virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); + virtual IOReturn setProperties ( OSObject * properties ); + + /* User Client Specific */ + virtual bool start ( IOService * provider ); + virtual bool open ( IOService * client, IOOptionBits options, IOStorageAccess access ); + + virtual bool handleOpen ( IOService * client, IOOptionBits options, void * access ); + virtual void handleClose ( IOService * client, IOOptionBits options ); + virtual bool handleIsOpen ( const IOService * client ) const; + + /* Added with 10.1.3 */ + virtual IOReturn readTOC ( IOMemoryDescriptor * buffer, + CDTOCFormat format, + UInt8 msf, + UInt8 trackSessionNumber, + UInt16 * actualByteCount ); + + /* Added with 10.1.3 */ + virtual IOReturn readDiscInfo ( IOMemoryDescriptor * buffer, + UInt16 * actualByteCount ); + + /* Added with 10.1.3 */ + virtual IOReturn readTrackInfo ( IOMemoryDescriptor * buffer, + UInt32 address, + CDTrackInfoAddressType addressType, + UInt16 * actualByteCount ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 1 ); + OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 2 ); + OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 3 ); + OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 4 ); + OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 5 ); + OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 6 ); + OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 7 ); + OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_COMPACT_DISC_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/IODVDServices.h b/i386/include/IOKit/scsi/IODVDServices.h new file mode 100644 index 0000000..8dccb17 --- /dev/null +++ b/i386/include/IOKit/scsi/IODVDServices.h @@ -0,0 +1,251 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_DVD_SERVICES_H_ +#define _IOKIT_IO_DVD_SERVICES_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// IOKit includes +#include <IOKit/IOTypes.h> + +// Generic IOKit storage related headers +#include <IOKit/storage/IODVDTypes.h> +#include <IOKit/storage/IODVDBlockStorageDevice.h> + +// SCSI Architecture Model Family includes +#include <IOKit/scsi/IOSCSIPeripheralDeviceType05.h> + +class IOMemoryDescriptor; + +// Use this switch to turn off the data cache. +#define _DVD_USE_DATA_CACHING_ 1 + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IODVDServices : public IODVDBlockStorageDevice +{ + + OSDeclareDefaultStructors ( IODVDServices ) + +#if (_DVD_USE_DATA_CACHING_) + // Data Cache members + bool fUseDataCache; // Indicates if cache should be used. This + // will be set to false if all the necessary support + // for the data cache could not be allocated or + // initialized. + UInt8 * fDataCacheStorage; // Storage space for the cache + UInt32 fDataCacheStartBlock; // Starting block of the data in the cache. + UInt32 fDataCacheBlockCount; // Number of contiguous blocks in the cache + // starting with fDataCacheStartBlock. A value of + // zero in this member indicates that all data + // in the cache is invalid. + + IOSimpleLock * fDataCacheLock; // This is the lock for preventing multiple access + // while manipulating the data cache. +#endif + +protected: + + OSSet * fClients; + IOSCSIPeripheralDeviceType05 * fProvider; + + virtual void free ( void ); + + // Reserve space for future expansion. + struct IODVDServicesExpansionData { }; + IODVDServicesExpansionData * fIODVDServicesReserved; + +public: + + static void AsyncReadWriteComplete ( void * clientData, + IOReturn status, + UInt64 actualByteCount ); + + // Deprecated + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageAttributes * attributes, + IOStorageCompletion * completion ); + + virtual IOReturn doEjectMedia ( void ); + + virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); + + virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + + virtual IOReturn doLockUnlockMedia ( bool doLock ); + + virtual IOReturn doSynchronizeCache ( void ); + + virtual IOReturn getWriteCacheState ( bool * enabled ); + + virtual IOReturn setWriteCacheState ( bool enabled ); + + virtual char * getVendorString ( void ); + + virtual char * getProductString ( void ); + + virtual char * getRevisionString ( void ); + + virtual char * getAdditionalDeviceInfoString ( void ); + + virtual IOReturn reportBlockSize ( UInt64 * blockSize ); + + virtual IOReturn reportEjectability ( bool * isEjectable ); + + virtual IOReturn reportLockability ( bool * isLockable ); + + virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); + + virtual IOReturn reportPollRequirements ( bool * pollIsRequired, + bool * pollIsExpensive ); + + virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); + + virtual IOReturn reportRemovability ( bool * isRemovable ); + + virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); + + /* CD Specific */ + virtual IOReturn doAsyncReadCD ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageCompletion completion ); + + virtual IOReturn readISRC ( UInt8 track, CDISRC isrc ); + + virtual IOReturn readMCN ( CDMCN mcn); + + virtual IOReturn readTOC ( IOMemoryDescriptor * buffer ); + + virtual IOReturn audioPause ( bool pause ); + + virtual IOReturn audioPlay ( CDMSF timeStart, CDMSF timeStop ); + + virtual IOReturn audioScan ( CDMSF timeStart, bool reverse ); + + virtual IOReturn audioStop ( void ); + + virtual IOReturn getAudioStatus ( CDAudioStatus * status ); + + virtual IOReturn getAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume ); + + virtual IOReturn setAudioVolume ( UInt8 leftVolume, UInt8 rightVolume ); + + virtual IOReturn getSpeed ( UInt16 * kilobytesPerSecond ); + + virtual IOReturn setSpeed ( UInt16 kilobytesPerSecond ); + + /* DVD Specific */ + virtual UInt32 getMediaType ( void ); + + virtual IOReturn reportKey ( IOMemoryDescriptor * buffer, + const DVDKeyClass keyClass, + const UInt32 lba, + const UInt8 agid, + const DVDKeyFormat keyFormat ); + + virtual IOReturn sendKey ( IOMemoryDescriptor * buffer, + const DVDKeyClass keyClass, + const UInt8 agid, + const DVDKeyFormat keyFormat ); + + virtual IOReturn readDVDStructure ( IOMemoryDescriptor * buffer, + const UInt8 structureFormat, + const UInt32 logicalBlockAddress, + const UInt8 layer, + const UInt8 agid ); + + /* 10.6.0 */ + virtual IOReturn requestIdle ( void ); + + /* System Specific */ + virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); + virtual IOReturn setProperties ( OSObject * properties ); + + /* User Client Specific */ + virtual bool start ( IOService * provider ); + virtual bool open ( IOService * client, IOOptionBits options, IOStorageAccess access ); + + virtual bool handleOpen ( IOService * client, IOOptionBits options, void * access ); + virtual void handleClose ( IOService * client, IOOptionBits options ); + virtual bool handleIsOpen ( const IOService * client ) const; + + /* Added with 10.1.3 */ + virtual IOReturn readTOC ( IOMemoryDescriptor * buffer, + CDTOCFormat format, + UInt8 msf, + UInt8 trackSessionNumber, + UInt16 * actualByteCount ); + + /* Added with 10.1.3 */ + virtual IOReturn readDiscInfo ( IOMemoryDescriptor * buffer, + UInt16 * actualByteCount ); + + /* Added with 10.1.3 */ + virtual IOReturn readTrackInfo ( IOMemoryDescriptor * buffer, + UInt32 address, + CDTrackInfoAddressType addressType, + UInt16 * actualByteCount ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IODVDServices, 1 ); + OSMetaClassDeclareReservedUnused ( IODVDServices, 2 ); + OSMetaClassDeclareReservedUnused ( IODVDServices, 3 ); + OSMetaClassDeclareReservedUnused ( IODVDServices, 4 ); + OSMetaClassDeclareReservedUnused ( IODVDServices, 5 ); + OSMetaClassDeclareReservedUnused ( IODVDServices, 6 ); + OSMetaClassDeclareReservedUnused ( IODVDServices, 7 ); + OSMetaClassDeclareReservedUnused ( IODVDServices, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_DVD_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/IOReducedBlockServices.h b/i386/include/IOKit/scsi/IOReducedBlockServices.h new file mode 100644 index 0000000..87ad8ed --- /dev/null +++ b/i386/include/IOKit/scsi/IOReducedBlockServices.h @@ -0,0 +1,147 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_REDUCED_BLOCK_SERVICES_H_ +#define _IOKIT_IO_REDUCED_BLOCK_SERVICES_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// Generic IOKit related headers +#include <IOKit/IOTypes.h> + +// Generic IOKit storage related headers +#include <IOKit/storage/IOBlockStorageDevice.h> + +// SCSI Architecture Model Family includes +#include <IOKit/scsi/IOSCSIPeripheralDeviceType0E.h> + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOReducedBlockServices : public IOBlockStorageDevice +{ + + OSDeclareDefaultStructors ( IOReducedBlockServices ) + + +protected: + // Reserve space for future expansion. + struct IOReducedBlockServicesExpansionData { }; + IOReducedBlockServicesExpansionData * fIOReducedBlockServicesReserved; + + IOSCSIPeripheralDeviceType0E * fProvider; + + virtual bool attach ( IOService * provider ); + virtual void detach ( IOService * provider ); + + +public: + + virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); + + static void AsyncReadWriteComplete ( void * clientData, + IOReturn status, + UInt64 actualByteCount ); + + // Deprecated + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageAttributes * attributes, + IOStorageCompletion * completion ); + + virtual IOReturn doEjectMedia ( void ); + + virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); + + virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + + virtual IOReturn doLockUnlockMedia ( bool doLock ); + + virtual IOReturn doSynchronizeCache ( void ); + + virtual IOReturn getWriteCacheState ( bool * enabled ); + + virtual IOReturn setWriteCacheState ( bool enabled ); + + virtual char * getVendorString ( void ); + + virtual char * getProductString ( void ); + + virtual char * getRevisionString ( void ); + + virtual char * getAdditionalDeviceInfoString ( void ); + + virtual IOReturn reportBlockSize ( UInt64 * blockSize ); + + virtual IOReturn reportEjectability ( bool * isEjectable ); + + virtual IOReturn reportLockability ( bool * isLockable ); + + virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); + + virtual IOReturn reportPollRequirements ( bool * pollIsRequired, + bool * pollIsExpensive ); + + virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); + + virtual IOReturn reportRemovability ( bool * isRemovable ); + + virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 1 ); + OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 2 ); + OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 3 ); + OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 4 ); + OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 5 ); + OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 6 ); + OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 7 ); + OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_REDUCED_BLOCK_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIBlockCommandsDevice.h b/i386/include/IOKit/scsi/IOSCSIBlockCommandsDevice.h new file mode 100644 index 0000000..2cb4a6d --- /dev/null +++ b/i386/include/IOKit/scsi/IOSCSIBlockCommandsDevice.h @@ -0,0 +1,1146 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_SCSI_BLOCK_COMMANDS_DEVICE_H_ +#define _IOKIT_IO_SCSI_BLOCK_COMMANDS_DEVICE_H_ + +#if defined(KERNEL) && defined(__cplusplus) + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + +// SBC power states as defined in T10:996D SCSI Block Commands - 3 (SBC-3) +// Revision 8c, November 13, 1997, pages 10-11. +enum +{ + kSBCPowerStateSystemSleep = 0, + kSBCPowerStateSleep = 1, + kSBCPowerStateStandby = 2, + kSBCPowerStateIdle = 3, + kSBCPowerStateActive = 4, + kSBCNumPowerStates = 5 +}; + +enum +{ + kMediaStateUnlocked = 0, + kMediaStateLocked = 1 +}; + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// General IOKit headers +#include <IOKit/IOLib.h> +#include <IOKit/IOMemoryDescriptor.h> +#include <IOKit/IOService.h> +#include <IOKit/IOUserClient.h> + +// Generic IOKit storage related headers +#include <IOKit/storage/IOStorage.h> + +// SCSI Architecture Model Family includes +#include <IOKit/scsi/IOSCSIPrimaryCommandsDevice.h> + + +// Forward declaration for the SCSIBlockCommands that is used internally by the +// IOSCSIBlockCommandsDevice class. +class SCSIBlockCommands; + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIBlockCommandsDevice : public IOSCSIPrimaryCommandsDevice +{ + + OSDeclareAbstractStructors ( IOSCSIBlockCommandsDevice ) + +private: + + +#ifndef __LP64__ + + SCSIBlockCommands * fSCSIBlockCommandObject; + SCSIBlockCommands * GetSCSIBlockCommandObject ( void ); + +#endif /* !__LP64__ */ + + IOReturn GetWriteCacheState ( IOMemoryDescriptor * buffer, + UInt8 modePageControlValue ); + + static void AsyncReadWriteComplete ( SCSITaskIdentifier completedTask ); + +protected: + + // Reserve space for future expansion. + struct IOSCSIBlockCommandsDeviceExpansionData + { + IONotifier * fPowerDownNotifier; + bool fWriteCacheEnabled; + bool fDeviceIsShared; + UInt64 fMediumBlockCount64; + bool fDeviceHasSATTranslation; + bool fProtocolSpecificPowerControl; + bool fRequiresEjectWithStartStopUnit; + }; + IOSCSIBlockCommandsDeviceExpansionData * fIOSCSIBlockCommandsDeviceReserved; + + #define fPowerDownNotifier fIOSCSIBlockCommandsDeviceReserved->fPowerDownNotifier + #define fWriteCacheEnabled fIOSCSIBlockCommandsDeviceReserved->fWriteCacheEnabled + + // The fDeviceIsShared is used to indicate whether this device exists on a Physical + // Interconnect that allows multiple initiators to access it. This is used mainly + // by the power management code to not send power state related START_STOP_UNIT + // commands to the device. + // The fDeviceIsShared value is also used to prevent power state commands from being + // sent to manual eject device since these devices behave better when allowed to + // manage their own power. + #define fDeviceIsShared fIOSCSIBlockCommandsDeviceReserved->fDeviceIsShared + + // The fMediumBlockCount64 provides support for 64 bit LBAs and + // replaces fMediumBlockCount which only supports 32 bits. + // This value should not be directly accessed and instead the member routine + // ReportMediumTotalBlockCount() should be used to retrieve it and the member routine + // SetMediumCharacteristics() should be used to set it. + #define fMediumBlockCount64 fIOSCSIBlockCommandsDeviceReserved->fMediumBlockCount64 + + #define fDeviceHasSATTranslation fIOSCSIBlockCommandsDeviceReserved->fDeviceHasSATTranslation + + // Device support protocol specific power off + #define fProtocolSpecificPowerControl fIOSCSIBlockCommandsDeviceReserved->fProtocolSpecificPowerControl + + // Device requires START_STOP_UNIT for ejects, regardless if PREVENT_ALLOW_MEIDUMREMOVAL + // failed. + #define fRequiresEjectWithStartStopUnit fIOSCSIBlockCommandsDeviceReserved->fRequiresEjectWithStartStopUnit + +private: + /* OBSOLETE. Use IOSCSIPrimaryCommandsDevice::Get/SetANSIVersion */ + UInt8 fANSIVersion; + +protected: + // ---- Device Characteristics ---- + bool fMediaIsRemovable; + + // ---- Medium Characteristics ---- + bool fMediumPresent; + +private: + // The byte count of each physical block on the medium. + // This value should not be directly accessed and instead the member routine + // ReportMediumBlockSize() should be used to retrieve it and the member routine + // SetMediumCharacteristics() should be used to set it. + UInt32 fMediumBlockSize; + + // The total number of blocks of fMediumBlockSize on the medium. + // OBSOLETE. Use fMediumBlockCount64 instead which allows for support of + // devices that have 33 through 64 bit LBA values. + UInt32 fMediumBlockCount; + +protected: + // Whether the installed medium is protected from writes + bool fMediumIsWriteProtected; + + // Whether user removal of medium has been prevented + bool fMediumRemovalPrevented; + + // Indicates whether this is a known manual eject device + bool fKnownManualEject; + + // Polling thread variables + thread_call_t fPollingThread; + UInt32 fPollingMode; + enum + { + kPollingMode_Suspended = 0, + kPollingMode_NewMedia = 1, + kPollingMode_MediaRemoval = 2 + }; + + // ---- Methods for controlling the current state of device support ---- + virtual bool InitializeDeviceSupport ( void ); + virtual void StartDeviceSupport ( void ); + virtual void SuspendDeviceSupport ( void ); + virtual void ResumeDeviceSupport ( void ); + virtual void StopDeviceSupport ( void ); + virtual void TerminateDeviceSupport ( void ); + + virtual void free ( void ); + +#ifndef __LP64__ + + // This method will retrieve the SCSI Primary Command Set object for + // the class. For subclasses, this will be overridden using a + // dynamic cast on the subclasses base command set object. + virtual SCSIPrimaryCommands * GetSCSIPrimaryCommandObject ( void ); + + virtual bool CreateCommandSetObjects ( void ); + virtual void FreeCommandSetObjects ( void ); + +#endif /* !__LP64__ */ + + virtual bool ClearNotReadyStatus ( void ); + virtual void CreateStorageServiceNub ( void ); + virtual bool DetermineDeviceCharacteristics ( void ); + + // ---- Methods used for controlling the polling thread ---- + virtual void ProcessPoll ( void ); + virtual void EnablePolling ( void ); + virtual void DisablePolling ( void ); + + // Main and support methods for polling for new Media + virtual void PollForNewMedia ( void ); + virtual bool DetermineMediaPresence ( void ); + virtual bool PreventMediumRemoval ( void ); + virtual bool DetermineMediumCapacity ( + UInt64 * blockSize, + UInt64 * blockCount ); + virtual bool DetermineMediumWriteProtectState ( void ); + + // Main and support methods for polling for Media removal + virtual void PollForMediaRemoval ( void ); + + // ---- Methods used for handling medium characteristics ---- + + // OBSOLETE - Use the version compatible with 64 bit LBAs instead. + virtual void SetMediumCharacteristics ( + UInt32 blockSize, + UInt32 blockCount ); + + void SetMediumCharacteristics ( + UInt64 blockSize, + UInt64 blockCount ); + + virtual void ResetMediumCharacteristics ( void ); + + virtual IOReturn IssueRead ( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueRead ( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + void * clientData ); + + virtual IOReturn IssueWrite ( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueWrite ( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + void * clientData ); + + // ----- Power Management Support ------ + + // We override this method to set our power states and register ourselves + // as a power policy maker. + virtual void InitializePowerManagement ( IOService * provider ); + + // We override this method so that when we register for power management, + // we go to our active power state (which the drive is definitely in + // at startup time). + virtual UInt32 GetInitialPowerState ( void ); + + // We override this method in order to provide the number of transitions + // from Fully active to Sleep state so that the idle timer can be adjusted + // to the appropriate time period based on the disk spindown time set in + // the Energy Saver prefs panel. + virtual UInt32 GetNumberOfPowerStateTransitions ( void ); + + // The TicklePowerManager method is called to tell the power manager that + // the device needs to be in a certain power state to handle requests. + virtual void TicklePowerManager ( void ); + + // The HandlePowerChange method is the state machine for power management. + // It is guaranteed to be on its own thread of execution (different from + // the power manager thread AND the workloop thread. This routine can + // send sync or async calls to the drive without worrying about threading + // issues. + virtual void HandlePowerChange ( void ); + + // The HandleCheckPowerState (void) method is on the serialized side of the + // command gate and can change member variables safely without + // multi-threading issues. It's main purpose is to call the superclass' + // HandleCheckPowerState ( UInt32 maxPowerState ) with the max power state + // the class registered with. + virtual void HandleCheckPowerState ( void ); + + // The VerifyMediumPresence method is called to see if the medium which we + // anticipated being there is still there. + virtual bool VerifyMediumPresence ( void ); + +public: + + static void sProcessPoll ( void * pdtDriver, void * refCon ); + + // ---- Methods for controlling the device ---- + virtual IOReturn SyncReadWrite ( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + UInt64 blockSize ); + + virtual IOReturn AsyncReadWrite ( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + UInt64 blockSize, + void * clientData ); + + IOReturn GetWriteCacheState ( bool * enabled ); + IOReturn SetWriteCacheState ( bool enabled ); + void DetermineMediumGeometry ( void ); + + // ---- Methods for controlling medium state ---- + virtual IOReturn EjectTheMedium ( void ); + virtual IOReturn LockUnlockMedium ( bool doLock ); + virtual IOReturn SynchronizeCache ( void ); + + // ---- Methods for controlling media format ---- + virtual IOReturn FormatMedium ( + UInt64 blockCount, + UInt64 blockSize ); + virtual UInt32 GetFormatCapacities ( + UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + + // ---- Query methods to report device characteristics ---- + + // Report the maximum number of blocks that the device can handle per + // read or write. A value of 0 (zero) indicates there is no limit aside + // from the size of the method's return parameter. + virtual UInt64 ReportDeviceMaxBlocksReadTransfer ( void ); + virtual UInt64 ReportDeviceMaxBlocksWriteTransfer ( void ); + + // Report whether the device supports removal of the media. + virtual bool ReportDeviceMediaRemovability ( void ); + + // ---- Query methods to report installed medium characteristics ---- + virtual UInt64 ReportMediumBlockSize ( void ); + virtual UInt64 ReportMediumTotalBlockCount ( void ); + virtual bool ReportMediumWriteProtection ( void ); + + +protected: + + +#ifndef __LP64__ + + // Command methods to access all commands available to SBC based devices. + virtual bool ERASE_10 ( + SCSITaskIdentifier request, + SCSICmdField1Bit ERA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool ERASE_12 ( + SCSITaskIdentifier request, + SCSICmdField1Bit ERA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool FORMAT_UNIT ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + IOByteCount defectListSize, + SCSICmdField1Bit FMTDATA, + SCSICmdField1Bit CMPLST, + SCSICmdField3Bit DEFECT_LIST_FORMAT, + SCSICmdField1Byte VENDOR_SPECIFIC, + SCSICmdField2Byte INTERLEAVE, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 Section 5.41 + bool FORMAT_UNIT ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + IOByteCount defectListSize, + SCSICmdField1Bit FMTPINFO, + SCSICmdField1Bit RTO_REQ, + SCSICmdField1Bit LONGLIST, + SCSICmdField1Bit FMTDATA, + SCSICmdField1Bit CMPLST, + SCSICmdField3Bit DEFECT_LIST_FORMAT, + SCSICmdField1Byte VENDOR_SPECIFIC, + SCSICmdField1Byte CONTROL ); + + virtual bool LOCK_UNLOCK_CACHE ( + SCSITaskIdentifier request, + SCSICmdField1Bit LOCK, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte NUMBER_OF_BLOCKS, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.5 + bool LOCK_UNLOCK_CACHE ( + SCSITaskIdentifier request, + SCSICmdField1Bit LOCK, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte NUMBER_OF_BLOCKS, + SCSICmdField1Byte CONTROL ); + + bool LOCK_UNLOCK_CACHE_16 ( + SCSITaskIdentifier request, + SCSICmdField1Bit LOCK, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte NUMBER_OF_BLOCKS, + SCSICmdField1Byte CONTROL ); + + virtual bool MEDIUM_SCAN ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit WBS, + SCSICmdField1Bit ASA, + SCSICmdField1Bit PSD, + SCSICmdField1Bit PRA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool PREFETCH ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.7 + bool PREFETCH ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + bool PREFETCH_16 ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + + virtual bool READ_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField21Bit LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + +#endif /* __LP64__ */ + + virtual bool READ_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.10 + bool READ_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit RDPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit FUA_NV, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool READ_12 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.11 + bool READ_12 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit RDPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit FUA_NV, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + + bool READ_16 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit RDPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit FUA_NV, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + + virtual bool READ_CAPACITY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Bit PMI, + SCSICmdField1Byte CONTROL ); + + bool READ_CAPACITY_16 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte ALLOCATION_LENGTH, + SCSICmdField1Bit PMI, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + virtual bool READ_DEFECT_DATA_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PLIST, + SCSICmdField1Bit GLIST, + SCSICmdField3Bit DEFECT_LIST_FORMAT, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool READ_DEFECT_DATA_12 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PLIST, + SCSICmdField1Bit GLIST, + SCSICmdField3Bit DEFECT_LIST_FORMAT, + SCSICmdField4Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool READ_GENERATION ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool READ_LONG ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit CORRCT, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte BYTE_TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + bool READ_LONG_16 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte BYTE_TRANSFER_LENGTH, + SCSICmdField1Bit CORRCT, + SCSICmdField1Byte CONTROL ); + + virtual bool READ_UPDATED_BLOCK_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Bit LATEST, + SCSICmdField15Bit GENERATION_ADDRESS, + SCSICmdField1Byte CONTROL ); + + virtual bool REASSIGN_BLOCKS ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.20 + bool REASSIGN_BLOCKS ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit LONGLBA, + SCSICmdField1Bit LONGLIST, + SCSICmdField1Byte CONTROL ); + + virtual bool REBUILD ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit INTDATA, + SCSICmdField2Bit PORT_CONTROL, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte REBUILD_LENGTH, + SCSICmdField4Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool REGENERATE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit INTDATA, + SCSICmdField2Bit PORT_CONTROL, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte REBUILD_LENGTH, + SCSICmdField4Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool REZERO_UNIT ( + SCSITaskIdentifier request, + SCSICmdField1Byte CONTROL ); + + virtual bool SEARCH_DATA_EQUAL_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit INVERT, + SCSICmdField1Bit SPNDAT, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte NUMBER_OF_BLOCKS_TO_SEARCH, + SCSICmdField1Byte CONTROL ); + + virtual bool SEARCH_DATA_HIGH_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit INVERT, + SCSICmdField1Bit SPNDAT, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte NUMBER_OF_BLOCKS_TO_SEARCH, + SCSICmdField1Byte CONTROL ); + + virtual bool SEARCH_DATA_LOW_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit INVERT, + SCSICmdField1Bit SPNDAT, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte NUMBER_OF_BLOCKS_TO_SEARCH, + SCSICmdField1Byte CONTROL ); + + virtual bool SEEK_6 ( + SCSITaskIdentifier request, + SCSICmdField21Bit LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Byte CONTROL ); + + virtual bool SEEK_10 ( + SCSITaskIdentifier request, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Byte CONTROL ); + + virtual bool SET_LIMITS_10 ( + SCSITaskIdentifier request, + SCSICmdField1Bit RDINH, + SCSICmdField1Bit WRINH, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte NUMBER_OF_BLOCKS, + SCSICmdField1Byte CONTROL ); + + virtual bool SET_LIMITS_12 ( + SCSITaskIdentifier request, + SCSICmdField1Bit RDINH, + SCSICmdField1Bit WRINH, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte NUMBER_OF_BLOCKS, + SCSICmdField1Byte CONTROL ); + +#endif /* __LP64__ */ + + virtual bool START_STOP_UNIT ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField4Bit POWER_CONDITIONS, + SCSICmdField1Bit LOEJ, + SCSICmdField1Bit START, + SCSICmdField1Byte CONTROL ); + + virtual bool SYNCHRONIZE_CACHE ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte NUMBER_OF_BLOCKS, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.22 + bool SYNCHRONIZE_CACHE ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField1Bit SYNC_NV, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte NUMBER_OF_BLOCKS, + SCSICmdField1Byte CONTROL ); + + bool SYNCRONIZE_CACHE_16 ( + SCSITaskIdentifier request, + SCSICmdField1Bit SYNC_NV, + SCSICmdField1Bit IMMED, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte NUMBER_OF_BLOCKS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + virtual bool UPDATE_BLOCK ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Byte CONTROL ); + + virtual bool VERIFY_10 ( + SCSITaskIdentifier request, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BLKVFY, + SCSICmdField1Bit BYTCHK, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte VERIFICATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.24 + bool VERIFY_10 ( + SCSITaskIdentifier request, + SCSICmdField3Bit VRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYTCHK, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte VERIFICATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool VERIFY_12 ( + SCSITaskIdentifier request, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BLKVFY, + SCSICmdField1Bit BYTCHK, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte VERIFICATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.25 + bool VERIFY_12 ( + SCSITaskIdentifier request, + SCSICmdField3Bit VRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYTCHK, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField4Byte VERIFICATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + bool VERIFY_16 ( + SCSITaskIdentifier request, + SCSICmdField3Bit VRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYTCHK, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte VERIFICATION_LENGTH, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + + virtual bool WRITE_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField2Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + +#endif /* __LP64__ */ + + virtual bool WRITE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit EBP, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.29 + bool WRITE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit FUA_NV, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool WRITE_12 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit EBP, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.30 + bool WRITE_12 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit FUA_NV, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + bool WRITE_16 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit FUA_NV, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + virtual bool WRITE_AND_VERIFY_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit EBP, + SCSICmdField1Bit BYTCHK, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.33 + bool WRITE_AND_VERIFY_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYTCHK, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool WRITE_AND_VERIFY_12 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit EBP, + SCSICmdField1Bit BYTCHK, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.34 + bool WRITE_AND_VERIFY_12 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYTCHK, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + + bool WRITE_AND_VERIFY_16 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYTCHK, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + + + virtual bool WRITE_LONG ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + bool WRITE_LONG_16 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Bit CORRCT, + SCSICmdField1Byte CONTROL ); + + virtual bool WRITE_SAME ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PBDATA, + SCSICmdField1Bit LBDATA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.39 + bool WRITE_SAME ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit PBDATA, + SCSICmdField1Bit LBDATA, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + bool WRITE_SAME_16 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit PBDATA, + SCSICmdField1Bit LBDATA, + SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField1Byte CONTROL ); + + virtual bool XDREAD ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.42 + bool XDREAD ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit XORPINFO, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool XDWRITE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit DISABLE_WRITE, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.43 + bool XDWRITE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit DISABLE_WRITE, + SCSICmdField1Bit FUA_NV, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool XDWRITE_EXTENDED ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit TABLE_ADDRESS, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit DISABLE_WRITE, + SCSICmdField2Bit PORT_CONTROL, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte SECONDARY_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField1Byte SECONDARY_ADDRESS, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.46 + bool XDWRITEREAD_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Bit WRPROTECT, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit DISABLE_WRITE, + SCSICmdField1Bit FUA_NV, + SCSICmdField1Bit XORPINFO, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool XPWRITE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // Defined in SBC-2 section 5.48 + bool XPWRITE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit FUA_NV, + SCSICmdField1Bit XORPINFO, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField5Bit GROUP_NUMBER, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + +#endif /* __LP64__ */ + + + /* Added with 10.2 */ + OSMetaClassDeclareReservedUsed ( IOSCSIBlockCommandsDevice, 1 ); + +public: + + virtual IOReturn PowerDownHandler ( void * refCon, + UInt32 messageType, + IOService * provider, + void * messageArgument, + vm_size_t argSize ); + + + /* Added with 10.2 */ + OSMetaClassDeclareReservedUsed ( IOSCSIBlockCommandsDevice, 2 ); + +protected: + + virtual void SetMediumIcon ( void ); + + + /* Added with 10.3.3 */ + OSMetaClassDeclareReservedUsed ( IOSCSIBlockCommandsDevice, 3 ); + +protected: + + virtual void AsyncReadWriteCompletion ( SCSITaskIdentifier completedTask ); + + + /* Added with 10.6.0 */ + OSMetaClassDeclareReservedUsed ( IOSCSIBlockCommandsDevice, 4 ); + +public: + + virtual IOReturn AsyncReadWrite ( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + UInt64 blockSize, + IOStorageAttributes * attributes, + void * clientData ); + + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 8 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 9 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 10 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 11 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 12 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 16 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_BLOCK_COMMANDS_DEVICE_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIMultimediaCommandsDevice.h b/i386/include/IOKit/scsi/IOSCSIMultimediaCommandsDevice.h new file mode 100644 index 0000000..f812a39 --- /dev/null +++ b/i386/include/IOKit/scsi/IOSCSIMultimediaCommandsDevice.h @@ -0,0 +1,1057 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_SCSI_MULTIMEDIA_COMMANDS_DEVICE_H_ +#define _IOKIT_IO_SCSI_MULTIMEDIA_COMMANDS_DEVICE_H_ + +#if KERNEL +#include <IOKit/IOTypes.h> +#else +#include <CoreFoundation/CoreFoundation.h> +#endif + +#include <IOKit/storage/IOStorageDeviceCharacteristics.h> + + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + + +// Message constants +#define kIOMessageTrayStateChange 0x69000035 +#define kIOMessageTrayStateHasChanged kIOMessageTrayStateChange // DEPRECATED, use kIOMessageTrayStateChange instead + +// Message values for kIOMessageTrayStateChange +enum +{ + kMessageTrayStateChangeRequestAccepted = 0, + kMessageTrayStateChangeRequestRejected = 1 +}; + +#define kIOMessageMediaAccessChange 0x69000036 + +// Message values for kIOMessageMediaAccessChange +enum +{ + kMessageDeterminingMediaPresence = 0, + kMessageFoundMedia = 1, + kMessageMediaTypeDetermined = 2 +}; + +// IOKit property keys and constants +#define kIOPropertySupportedCDFeatures kIOPropertySupportedCDFeaturesKey +#define kIOPropertySupportedDVDFeatures kIOPropertySupportedDVDFeaturesKey +#define kIOPropertySupportedBDFeatures kIOPropertySupportedBDFeaturesKey +#define kIOPropertyLowPowerPolling "Low Power Polling" + +typedef UInt32 CDFeatures; +enum +{ + kCDFeaturesAnalogAudioBit = 0, // Analog Audio playback + kCDFeaturesReadStructuresBit = 1, // CD-ROM + kCDFeaturesWriteOnceBit = 2, // CD-R + kCDFeaturesReWriteableBit = 3, // CD-R/W + kCDFeaturesCDDAStreamAccurateBit = 4, // CD-DA stream accurate + kCDFeaturesPacketWriteBit = 5, // Packet Writing + kCDFeaturesTAOWriteBit = 6, // CD Track At Once + kCDFeaturesSAOWriteBit = 7, // CD Mastering - Session At Once + kCDFeaturesRawWriteBit = 8, // CD Mastering - Raw + kCDFeaturesTestWriteBit = 9, // CD Mastering/TAO - Test Write + kCDFeaturesBUFWriteBit = 10 // CD Mastering/TAO - Buffer Underrun Free +}; + +enum +{ + kCDFeaturesAnalogAudioMask = (1 << kCDFeaturesAnalogAudioBit), + kCDFeaturesReadStructuresMask = (1 << kCDFeaturesReadStructuresBit), + kCDFeaturesWriteOnceMask = (1 << kCDFeaturesWriteOnceBit), + kCDFeaturesReWriteableMask = (1 << kCDFeaturesReWriteableBit), + kCDFeaturesCDDAStreamAccurateMask = (1 << kCDFeaturesCDDAStreamAccurateBit), + kCDFeaturesPacketWriteMask = (1 << kCDFeaturesPacketWriteBit), + kCDFeaturesTAOWriteMask = (1 << kCDFeaturesTAOWriteBit), + kCDFeaturesSAOWriteMask = (1 << kCDFeaturesSAOWriteBit), + kCDFeaturesRawWriteMask = (1 << kCDFeaturesRawWriteBit), + kCDFeaturesTestWriteMask = (1 << kCDFeaturesTestWriteBit), + kCDFeaturesBUFWriteMask = (1 << kCDFeaturesBUFWriteBit) +}; + +typedef UInt32 DVDFeatures; +enum +{ + kDVDFeaturesCSSBit = 0, // DVD-CSS + kDVDFeaturesReadStructuresBit = 1, // DVD-ROM + kDVDFeaturesWriteOnceBit = 2, // DVD-R + kDVDFeaturesRandomWriteableBit = 3, // DVD-RAM + kDVDFeaturesReWriteableBit = 4, // DVD-RW + kDVDFeaturesTestWriteBit = 5, // DVD-R Write - Test Write + kDVDFeaturesBUFWriteBit = 6, // DVD-R Write - Buffer Underrun Free + kDVDFeaturesPlusRBit = 7, // DVD+R + kDVDFeaturesPlusRWBit = 8, // DVD+RW (implies backgound format support) + kDVDFeaturesHDReadBit = 9, // HD DVD-ROM + kDVDFeaturesHDRBit = 10, // HD DVD-R + kDVDFeaturesHDRAMBit = 11, // HD DVD-RAM + kDVDFeaturesHDRWBit = 12 // HD DVD-RW +}; + +enum +{ + kDVDFeaturesCSSMask = (1 << kDVDFeaturesCSSBit), + kDVDFeaturesReadStructuresMask = (1 << kDVDFeaturesReadStructuresBit), + kDVDFeaturesWriteOnceMask = (1 << kDVDFeaturesWriteOnceBit), + kDVDFeaturesRandomWriteableMask = (1 << kDVDFeaturesRandomWriteableBit), + kDVDFeaturesReWriteableMask = (1 << kDVDFeaturesReWriteableBit), + kDVDFeaturesTestWriteMask = (1 << kDVDFeaturesTestWriteBit), + kDVDFeaturesBUFWriteMask = (1 << kDVDFeaturesBUFWriteBit), + kDVDFeaturesPlusRMask = (1 << kDVDFeaturesPlusRBit), + kDVDFeaturesPlusRWMask = (1 << kDVDFeaturesPlusRWBit), + kDVDFeaturesHDReadMask = (1 << kDVDFeaturesHDReadBit), + kDVDFeaturesHDRMask = (1 << kDVDFeaturesHDRBit), + kDVDFeaturesHDRAMMask = (1 << kDVDFeaturesHDRAMBit), + kDVDFeaturesHDRWMask = (1 << kDVDFeaturesHDRWBit) +}; + +typedef UInt32 BDFeatures; +enum +{ + kBDFeaturesReadBit = 0, // BD-ROM + kBDFeaturesWriteBit = 1 // BD-R / BD-RE +}; + +enum +{ + kBDFeaturesReadMask = (1 << kBDFeaturesReadBit), + kBDFeaturesWriteMask = (1 << kBDFeaturesWriteBit) +}; + +enum +{ + kDiscStatusEmpty = 0, + kDiscStatusIncomplete = 1, + kDiscStatusComplete = 2, + kDiscStatusOther = 3, + kDiscStatusMask = 0x03, + kDiscStatusErasableMask = 0x10 +}; + + +#if defined(KERNEL) && defined(__cplusplus) + +// MMC power states as defined in T10:1228D SCSI Multimedia Commands - 2 (MMC-2) +// Revision 11a, August 30, 1999, page 312 (Annex F). +enum +{ + kMMCPowerStateSystemSleep = 0, + kMMCPowerStateSleep = 1, + kMMCPowerStateStandby = 2, + kMMCPowerStateIdle = 3, + kMMCPowerStateActive = 4, + kMMCNumPowerStates = 5 +}; + +enum +{ + kMediaStateUnlocked = 0, + kMediaStateLocked = 1 +}; + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// General IOKit headers +#include <IOKit/IOLib.h> +#include <IOKit/IOMemoryDescriptor.h> + +// Generic IOKit storage related headers +#include <IOKit/storage/IOStorage.h> +#include <IOKit/storage/IOCDTypes.h> +#include <IOKit/storage/IODVDTypes.h> + +// SCSI Architecture Model Family includes +#include <IOKit/scsi/IOSCSIPrimaryCommandsDevice.h> + +// Forward definitions for internal use only classes +class SCSIMultimediaCommands; +class SCSIBlockCommands; + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIMultimediaCommandsDevice : public IOSCSIPrimaryCommandsDevice +{ + + OSDeclareAbstractStructors ( IOSCSIMultimediaCommandsDevice ) + +private: + +#ifndef __LP64__ + + SCSIMultimediaCommands * fSCSIMultimediaCommandObject; + SCSIMultimediaCommands * GetSCSIMultimediaCommandObject ( void ); + + SCSIBlockCommands * fSCSIBlockCommandObject; /* OBSOLETE */ + SCSIBlockCommands * GetSCSIBlockCommandObject ( void ); /* OBSOLETE */ + +#endif /* !__LP64__ */ + + static void AsyncReadWriteComplete ( SCSITaskIdentifier completedTask ); + +protected: + + // Reserve space for future expansion. + struct IOSCSIMultimediaCommandsDeviceExpansionData + { + IONotifier * fPowerDownNotifier; + bool fDeviceSupportsPowerOff; + BDFeatures fSupportedBDFeatures; + bool fDeviceSupportsAsyncNotification; + bool fDeviceSupportsFastSpindown; + UInt8 fCDLoadingMechanism; + }; + IOSCSIMultimediaCommandsDeviceExpansionData * fIOSCSIMultimediaCommandsDeviceReserved; + + #define fPowerDownNotifier fIOSCSIMultimediaCommandsDeviceReserved->fPowerDownNotifier + #define fDeviceSupportsPowerOff fIOSCSIMultimediaCommandsDeviceReserved->fDeviceSupportsPowerOff + #define fSupportedBDFeatures fIOSCSIMultimediaCommandsDeviceReserved->fSupportedBDFeatures + #define fDeviceSupportsAsyncNotification fIOSCSIMultimediaCommandsDeviceReserved->fDeviceSupportsAsyncNotification + #define fDeviceSupportsFastSpindown fIOSCSIMultimediaCommandsDeviceReserved->fDeviceSupportsFastSpindown + #define fCDLoadingMechanism fIOSCSIMultimediaCommandsDeviceReserved->fCDLoadingMechanism + +#ifndef __LP64__ + + // This method will retreive the SCSI Primary Command Set object for + // the class. For subclasses, this will be overridden using a + // dynamic cast on the subclasses base command set object. + virtual SCSIPrimaryCommands * GetSCSIPrimaryCommandObject ( void ); + +#endif /* !__LP64__ */ + + CDFeatures fSupportedCDFeatures; + DVDFeatures fSupportedDVDFeatures; + + UInt16 fCurrentDiscSpeed; + bool fMediaChanged; + bool fMediaPresent; + + // The byte count of each physical block on the media. + UInt32 fMediaBlockSize; + + // The total number of blocks of fMediaBlockSize on the media. + UInt32 fMediaBlockCount; + + // Flags used to indicate device feature + bool fMediaIsRemovable; + bool fMediaIsWriteProtected; + UInt32 fMediaType; + + thread_call_t fPollingThread; + bool fDeviceSupportsLowPowerPolling; + bool fLowPowerPollingEnabled; + UInt32 fPollingMode; + + enum + { + kPollingMode_Suspended = 0, + kPollingMode_NewMedia = 1, + kPollingMode_MediaRemoval = 2 + }; + + virtual IOReturn setProperties ( OSObject * properties ); + + virtual void CreateStorageServiceNub ( void ); + virtual bool DetermineDeviceCharacteristics ( void ); + virtual IOReturn DetermineIfMediaIsRemovable ( void ); + virtual IOReturn DetermineDeviceFeatures ( void ); + virtual void DetermineMediaType ( void ); + virtual bool CheckForDVDMediaType ( void ); + virtual bool CheckForCDMediaType ( void ); + virtual void PollForMedia ( void ); + virtual void EnablePolling ( void ); + virtual void DisablePolling ( void ); + virtual void CheckWriteProtection ( void ); + virtual bool ClearNotReadyStatus ( void ); + + virtual IOReturn GetDeviceConfiguration ( void ); + virtual IOReturn GetDeviceConfigurationSize ( UInt32 * size ); + virtual IOReturn ParseFeatureList ( UInt32 numProfiles, UInt8 * firstFeaturePtr ); + + virtual IOReturn GetMechanicalCapabilities ( void ); + virtual IOReturn GetMechanicalCapabilitiesSize ( UInt32 * size ); + virtual IOReturn ParseMechanicalCapabilities ( UInt8 * mechanicalCapabilitiesPtr ); + + virtual IOReturn CheckForLowPowerPollingSupport ( void ); + virtual IOReturn GetCurrentPowerStateOfDrive ( UInt32 * powerState ); + + virtual IOReturn IssueRead ( IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueRead ( IOMemoryDescriptor * buffer, + void * clientData, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueWrite ( IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueWrite ( IOMemoryDescriptor * buffer, + void * clientData, + UInt64 startBlock, + UInt64 blockCount ); + + virtual void SetMediaCharacteristics ( UInt32 blockSize, UInt32 blockCount ); + virtual void ResetMediaCharacteristics ( void ); + + UInt8 ConvertBCDToHex ( UInt8 binaryCodedDigit ); + + // ------ User Client Support ------ + + virtual IOReturn HandleSetUserClientExclusivityState ( IOService * userClient, bool state ); + + // ----- Power Management Support ------ + + // We override this method to set our power states and register ourselves + // as a power policy maker. + virtual void InitializePowerManagement ( IOService * provider ); + + // We override this method so that when we register for power management, + // we go to our active power state (which the drive is definitely in + // at startup time). + virtual UInt32 GetInitialPowerState ( void ); + + // We override this method in order to provide the number of transitions + // from Fully active to Sleep state so that the idle timer can be adjusted + // to the appropriate time period based on the disk spindown time set in + // the Energy Saver prefs panel. + virtual UInt32 GetNumberOfPowerStateTransitions ( void ); + + // The TicklePowerManager method is called to tell the power manager that the + // device needs to be in a certain power state to handle requests. + virtual void TicklePowerManager ( void ); + + // The HandlePowerChange method is the state machine for power management. + // It is guaranteed to be on its own thread of execution (different from + // the power manager thread AND the workloop thread. This routine can + // send sync or async calls to the drive without worrying about threading + // issues. + virtual void HandlePowerChange ( void ); + + // The HandleCheckPowerState (void) method is on the serialized side of the command + // gate and can change member variables safely without multi-threading issues. + // It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) + // with the max power state the class registered with. + virtual void HandleCheckPowerState ( void ); + + // The CheckMediaPresence method is called to see if the media which we + // anticipated being there is still there. + virtual bool CheckMediaPresence ( void ); + + virtual bool InitializeDeviceSupport ( void ); + virtual void StartDeviceSupport ( void ); + virtual void SuspendDeviceSupport ( void ); + virtual void ResumeDeviceSupport ( void ); + virtual void StopDeviceSupport ( void ); + virtual void TerminateDeviceSupport ( void ); + + virtual void free ( void ); + +#ifndef __LP64__ + + virtual bool CreateCommandSetObjects ( void ); + virtual void FreeCommandSetObjects ( void ); + +#endif /* !__LP64__ */ + + virtual IOReturn VerifyDeviceState ( void ); + + +public: + + virtual IOReturn setAggressiveness ( unsigned long type, unsigned long minutes ); + + virtual IOReturn SyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn AsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + void * clientData ); + + virtual IOReturn EjectTheMedia ( void ); + virtual IOReturn GetTrayState ( UInt8 * trayState ); + virtual IOReturn SetTrayState ( UInt8 trayState ); + virtual IOReturn FormatMedia ( UInt64 byteCapacity ); + virtual UInt32 GetFormatCapacities ( UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + virtual IOReturn LockUnlockMedia ( bool doLock ); + virtual IOReturn SynchronizeCache ( void ); + virtual IOReturn ReportBlockSize ( UInt64 * blockSize ); + virtual IOReturn ReportEjectability ( bool * isEjectable ); + virtual IOReturn ReportLockability ( bool * isLockable ); + virtual IOReturn ReportPollRequirements ( bool * pollIsRequired, + bool * pollIsExpensive ); + virtual IOReturn ReportMaxReadTransfer ( UInt64 blockSize, + UInt64 * max ); + virtual IOReturn ReportMaxValidBlock ( UInt64 * maxBlock ); + virtual IOReturn ReportMaxWriteTransfer ( UInt64 blockSize, + UInt64 * max ); + virtual IOReturn ReportMediaState ( bool * mediaPresent, + bool * changed ); + virtual IOReturn ReportRemovability ( bool * isRemovable ); + virtual IOReturn ReportWriteProtection ( bool * isWriteProtected ); + + static void sPollForMedia ( void * pdtDriver, void * refCon ); + + /* CD Specific */ + virtual IOReturn SetMediaAccessSpeed ( UInt16 kilobytesPerSecond ); + + virtual IOReturn GetMediaAccessSpeed ( UInt16 * kilobytesPerSecond ); + + virtual IOReturn AsyncReadCD ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + CDSectorArea sectorArea, + CDSectorType sectorType, + void * clientData ); + + virtual IOReturn ReadISRC ( UInt8 track, CDISRC isrc ); + + virtual IOReturn ReadMCN ( CDMCN mcn); + + virtual IOReturn ReadTOC ( IOMemoryDescriptor * buffer ); + +#ifndef __LP64__ + + virtual IOReturn AudioPause ( bool pause ); + + virtual IOReturn AudioPlay ( CDMSF timeStart, CDMSF timeStop ); + + virtual IOReturn AudioScan ( CDMSF timeStart, bool reverse ); + + virtual IOReturn AudioStop ( void ); + + virtual IOReturn GetAudioStatus ( CDAudioStatus * status ); + + virtual IOReturn GetAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume ); + + virtual IOReturn SetAudioVolume ( UInt8 leftVolume, UInt8 rightVolume ); + +#endif /* !__LP64__ */ + + /* DVD Specific */ + virtual UInt32 GetMediaType ( void ); + + virtual IOReturn ReportKey ( IOMemoryDescriptor * buffer, + const DVDKeyClass keyClass, + const UInt32 lba, + const UInt8 agid, + const DVDKeyFormat keyFormat ); + + virtual IOReturn SendKey ( IOMemoryDescriptor * buffer, + const DVDKeyClass keyClass, + const UInt8 agid, + const DVDKeyFormat keyFormat ); + + virtual IOReturn ReadDVDStructure ( IOMemoryDescriptor * buffer, + const UInt32 length, + const UInt8 structureFormat, + const UInt32 logicalBlockAddress, + const UInt8 layer, + const UInt8 agid ); + + // The block size decoding for Read CD and Read CD MSF as defined in table 255 + bool GetBlockSize ( + UInt32 * requestedByteCount, + SCSICmdField3Bit EXPECTED_SECTOR_TYPE, + SCSICmdField1Bit SYNC, + SCSICmdField2Bit HEADER_CODES, + SCSICmdField1Bit USER_DATA, + SCSICmdField1Bit EDC_ECC, + SCSICmdField2Bit ERROR_FIELD, + SCSICmdField3Bit SUBCHANNEL_SELECTION_BITS ); + + SCSICmdField4Byte ConvertMSFToLBA ( SCSICmdField3Byte MSF ); + +#ifndef __LP64__ + + // Command methods to access all commands available to MMC based devices. + // The BLANK command as defined in section 6.1.1 + virtual bool BLANK ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField3Bit BLANKING_TYPE, + SCSICmdField4Byte START_ADDRESS_TRACK_NUMBER, + SCSICmdField1Byte CONTROL ); + + // The CLOSE TRACK/SESSION command as defined in section 6.1.2 + virtual bool CLOSE_TRACK_SESSION ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField1Bit SESSION, + SCSICmdField1Bit TRACK, + SCSICmdField2Byte TRACK_NUMBER, + SCSICmdField1Byte CONTROL ); + + // The FORMAT UNIT command as defined in section 6.1.3 + virtual bool FORMAT_UNIT ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + IOByteCount parameterListSize, + SCSICmdField1Bit FMT_DATA, + SCSICmdField1Bit CMP_LIST, + SCSICmdField3Bit FORMAT_CODE, + SCSICmdField2Byte INTERLEAVE_VALUE, + SCSICmdField1Byte CONTROL ); + +#endif /* !__LP64__ */ + + + // The GET CONFIGURATION command as defined in section 6.1.4 + virtual bool GET_CONFIGURATION ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Bit RT, + SCSICmdField2Byte STARTING_FEATURE_NUMBER, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The GET EVENT/STATUS NOTIFICATION command as defined in section 6.1.5 + virtual bool GET_EVENT_STATUS_NOTIFICATION ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit IMMED, + SCSICmdField1Byte NOTIFICATION_CLASS_REQUEST, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The GET PERFORMANCE command as defined in section 6.1.6 + virtual bool GET_PERFORMANCE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Bit TOLERANCE, + SCSICmdField1Bit WRITE, + SCSICmdField2Bit EXCEPT, + SCSICmdField4Byte STARTING_LBA, + SCSICmdField2Byte MAXIMUM_NUMBER_OF_DESCRIPTORS, + SCSICmdField1Byte CONTROL ); + + // The LOAD/UNLOAD MEDIUM command as defined in section 6.1.7 + virtual bool LOAD_UNLOAD_MEDIUM ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField1Bit LO_UNLO, + SCSICmdField1Bit START, + SCSICmdField1Byte SLOT, + SCSICmdField1Byte CONTROL ); + + // The MECHANISM STATUS command as defined in section 6.1.8 + virtual bool MECHANISM_STATUS ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + // The PAUSE/RESUME command as defined in section 6.1.9 + virtual bool PAUSE_RESUME ( + SCSITaskIdentifier request, + SCSICmdField1Bit RESUME, + SCSICmdField1Byte CONTROL ); + + // The PLAY AUDIO (10) command as defined in section 6.1.10 + virtual bool PLAY_AUDIO_10 ( + SCSITaskIdentifier request, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte STARTING_LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte PLAY_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The PLAY AUDIO (12) command as defined in section 6.1.11 + virtual bool PLAY_AUDIO_12 ( + SCSITaskIdentifier request, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte STARTING_LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte PLAY_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The PLAY AUDIO MSF command as defined in section 6.1.12 + virtual bool PLAY_AUDIO_MSF ( + SCSITaskIdentifier request, + SCSICmdField3Byte STARTING_MSF, + SCSICmdField3Byte ENDING_MSF, + SCSICmdField1Byte CONTROL ); + + /*********************** LEGACY COMMAND SUPPORT ***********************/ + // The PLAY CD command as defined in section 6.1.13 + virtual bool PLAY_CD ( + SCSITaskIdentifier request, + SCSICmdField3Bit EXPECTED_SECTOR_TYPE, + SCSICmdField1Bit CMSF, + SCSICmdField4Byte STARTING_LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte PLAY_LENGTH_IN_BLOCKS, + SCSICmdField1Bit SPEED, + SCSICmdField1Bit PORT2, + SCSICmdField1Bit PORT1, + SCSICmdField1Bit COMPOSITE, + SCSICmdField1Bit AUDIO, + SCSICmdField1Byte CONTROL ); + /*********************** END LEGACY COMMAND SUPPORT *******************/ + +#endif /* !__LP64__ */ + + virtual bool READ_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor *dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + /*********************** LEGACY COMMAND SUPPORT ***********************/ + // The READ BUFFER CAPACITY command as defined in section 6.1.14 + virtual bool READ_BUFFER_CAPACITY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + /*********************** END LEGACY COMMAND SUPPORT *******************/ + +#endif /* !__LP64__ */ + + // The READ CD command as defined in section 6.1.15 + virtual bool READ_CD ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Bit EXPECTED_SECTOR_TYPE, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte STARTING_LOGICAL_BLOCK_ADDRESS, + SCSICmdField3Byte TRANSFER_LENGTH, + SCSICmdField1Bit SYNC, + SCSICmdField2Bit HEADER_CODES, + SCSICmdField1Bit USER_DATA, + SCSICmdField1Bit EDC_ECC, + SCSICmdField2Bit ERROR_FIELD, + SCSICmdField3Bit SUBCHANNEL_SELECTION_BITS, + SCSICmdField1Byte CONTROL ); + + // The READ CD MSF command as defined in section 6.1.16 + virtual bool READ_CD_MSF ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Bit EXPECTED_SECTOR_TYPE, + SCSICmdField3Byte STARTING_MSF, + SCSICmdField3Byte ENDING_MSF, + SCSICmdField1Bit SYNC, + SCSICmdField2Bit HEADER_CODES, + SCSICmdField1Bit USER_DATA, + SCSICmdField1Bit EDC_ECC, + SCSICmdField2Bit ERROR_FIELD, + SCSICmdField3Bit SUBCHANNEL_SELECTION_BITS, + SCSICmdField1Byte CONTROL ); + + // The READ CAPACITY command as defined in section 6.1.17 + virtual bool READ_CAPACITY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Bit PMI, + SCSICmdField1Byte CONTROL ); + + // The READ DISC INFORMATION command as defined in section 6.1.18 + virtual bool READ_DISC_INFORMATION ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The READ DVD STRUCTURE command as defined in section 6.1.19 + virtual bool READ_DVD_STRUCTURE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Byte ADDRESS, + SCSICmdField1Byte LAYER_NUMBER, + SCSICmdField1Byte FORMAT, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField2Bit AGID, + SCSICmdField1Byte CONTROL ); + + // The READ FORMAT CAPACITIES command as defined in section 6.1.20 + virtual bool READ_FORMAT_CAPACITIES ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + /*********************** LEGACY COMMAND SUPPORT ***********************/ + // The READ HEADER command as defined in section 6.1.21 + virtual bool READ_HEADER ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit MSF, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + /*********************** END LEGACY COMMAND SUPPORT ***********************/ + + /*********************** LEGACY COMMAND SUPPORT ***********************/ + // The READ MASTER CUE command as defined in section 6.1.22 + virtual bool READ_MASTER_CUE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Byte SHEET_NUMBER, + SCSICmdField3Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + /*********************** END LEGACY COMMAND SUPPORT ***********************/ + +#endif /* !__LP64__ */ + + // The READ SUB-CHANNEL command as defined in section 6.1.23 + virtual bool READ_SUB_CHANNEL ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit MSF, + SCSICmdField1Bit SUBQ, + SCSICmdField1Byte SUB_CHANNEL_PARAMETER_LIST, + SCSICmdField1Byte TRACK_NUMBER, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The READ TOC/PMA/ATIP command as defined in section 6.1.24/25 + virtual bool READ_TOC_PMA_ATIP ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit MSF, + SCSICmdField4Bit FORMAT, + SCSICmdField1Byte TRACK_SESSION_NUMBER, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The READ TRACK INFORMATION command as defined in section 6.1.26 + virtual bool READ_TRACK_INFORMATION ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Bit ADDRESS_NUMBER_TYPE, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS_TRACK_SESSION_NUMBER, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + /*********************** LEGACY COMMAND SUPPORT ***********************/ + // The REPAIR TRACK command as defined in section 6.1.27 + virtual bool REPAIR_TRACK ( + SCSITaskIdentifier request, + SCSICmdField2Byte TRACK_NUMBER, + SCSICmdField1Byte CONTROL ); + /*********************** END LEGACY COMMAND SUPPORT ***********************/ + + // The REPORT KEY command as defined in section 6.1.28 + virtual bool REPORT_KEY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField2Bit AGID, + SCSICmdField6Bit KEY_FORMAT, + SCSICmdField1Byte CONTROL ); + + // The RESERVE TRACK command as defined in section 6.1.29 + virtual bool RESERVE_TRACK ( + SCSITaskIdentifier request, + SCSICmdField4Byte RESERVATION_SIZE, + SCSICmdField1Byte CONTROL ); + + // The SCAN command as defined in section 6.1.30 + virtual bool SCAN ( + SCSITaskIdentifier request, + SCSICmdField1Bit DIRECT, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte SCAN_STARTING_ADDRESS_FIELD, + SCSICmdField2Bit TYPE, + SCSICmdField1Byte CONTROL ); + + // The SEND CUE SHEET command as defined in section 6.1.31 + virtual bool SEND_CUE_SHEET ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Byte CUE_SHEET_SIZE, + SCSICmdField1Byte CONTROL ); + + // The SEND DVD STRUCTURE command as defined in section 6.1.32 + virtual bool SEND_DVD_STRUCTURE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Byte FORMAT, + SCSICmdField2Byte STRUCTURE_DATA_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The SEND EVENT command as defined in section 6.1.33 + virtual bool SEND_EVENT ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit IMMED, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The SEND KEY command as defined in section 6.1.34 + virtual bool SEND_KEY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField2Bit AGID, + SCSICmdField6Bit KEY_FORMAT, + SCSICmdField1Byte CONTROL ); + + // The SEND OPC INFORMATION command as defined in section 6.1.35 + virtual bool SEND_OPC_INFORMATION ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DO_OPC, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); +#endif /* !__LP64__ */ + + /*********************** LEGACY COMMAND SUPPORT ***********************/ + // The SET CD SPEED command as defined in section 6.1.36 + virtual bool SET_CD_SPEED ( + SCSITaskIdentifier request, + SCSICmdField2Byte LOGICAL_UNIT_READ_SPEED, + SCSICmdField2Byte LOGICAL_UNIT_WRITE_SPEED, + SCSICmdField1Byte CONTROL ); + /*********************** END LEGACY COMMAND SUPPORT ***********************/ + + // The SET READ AHEAD command as defined in section 6.1.37 + virtual bool SET_READ_AHEAD ( + SCSITaskIdentifier request, + SCSICmdField4Byte TRIGGER_LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte READ_AHEAD_LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Byte CONTROL ); + + // The SET STREAMING command as defined in section 6.1.38 + virtual bool SET_STREAMING ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool START_STOP_UNIT ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField4Bit POWER_CONDITIONS, + SCSICmdField1Bit LOEJ, + SCSICmdField1Bit START, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + // The STOP PLAY/SCAN command as defined in section 6.1.39 + virtual bool STOP_PLAY_SCAN ( + SCSITaskIdentifier request, + SCSICmdField1Byte CONTROL ); + +#endif /* !__LP64__ */ + + // The SYNCHRONIZE CACHE command as defined in section 6.1.40 + virtual bool SYNCHRONIZE_CACHE ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte NUMBER_OF_BLOCKS, + SCSICmdField1Byte CONTROL ); + + // The WRITE (10) command as defined in section 6.1.41 + virtual bool WRITE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The WRITE AND VERIFY (10) command as defined in section 6.1.42 + virtual bool WRITE_AND_VERIFY_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYT_CHK, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + /* Added with 10.1.3 */ + OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 1 ); + + virtual IOReturn ReadTOC ( IOMemoryDescriptor * buffer, + CDTOCFormat format, + UInt8 msf, + UInt32 trackSessionNumber, + UInt16 * actualByteCount ); + + /* Added with 10.1.3 */ + OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 2 ); + + virtual IOReturn ReadDiscInfo ( IOMemoryDescriptor * buffer, + UInt16 * actualByteCount ); + + /* Added with 10.1.3 */ + OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 3 ); + + virtual IOReturn ReadTrackInfo ( IOMemoryDescriptor * buffer, + UInt32 address, + CDTrackInfoAddressType addressType, + UInt16 * actualByteCount ); + + /* Added with 10.2 */ + OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 4 ); + + virtual IOReturn PowerDownHandler ( void * refCon, + UInt32 messageType, + IOService * provider, + void * messageArgument, + vm_size_t argSize ); + + /* Added with 10.3.3 */ + OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 5 ); + + +protected: + + + virtual void AsyncReadWriteCompletion ( SCSITaskIdentifier completedTask ); + + +public: + + + /* Added with 10.5 */ + OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 6 ); + + virtual IOReturn ReadDiscStructure ( IOMemoryDescriptor * buffer, + const UInt32 length, + const UInt8 structureFormat, + const UInt32 logicalBlockAddress, + const UInt8 layer, + const UInt8 agid, + const UInt8 mediaType ); + + + bool CheckForBDMediaType ( void ); + + + bool READ_DISC_STRUCTURE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Bit MEDIA_TYPE, + SCSICmdField4Byte ADDRESS, + SCSICmdField1Byte LAYER_NUMBER, + SCSICmdField1Byte FORMAT, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField2Bit AGID, + SCSICmdField1Byte CONTROL ); + + + OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 7 ); + + virtual IOReturn ReserveTrack ( UInt8 reservationType, + UInt8 reservationFormat, + UInt64 ReservationParameter ); + + + bool RESERVE_TRACK_V2 ( SCSITaskIdentifier request, + SCSICmdField1Bit RMZ, + SCSICmdField1Bit ARSV, + SCSICmdField7Byte RESERVATION_PARAMETER, + SCSICmdField1Byte CONTROL ); + + + bool REPORT_KEY_V2 ( SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Byte KEY_CLASS, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField2Bit AGID, + SCSICmdField6Bit KEY_FORMAT, + SCSICmdField1Byte CONTROL ); + + + bool SEND_KEY_V2 ( SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Byte KEY_CLASS, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField2Bit AGID, + SCSICmdField6Bit KEY_FORMAT, + SCSICmdField1Byte CONTROL ); + + +protected: + + + void SetPollingMode ( UInt32 newPollingMode ); + + +public: + + + /* 10.6.0 */ + + IOReturn RequestIdle ( void ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 8 ); + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 9 ); + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 10 ); + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 11 ); + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 12 ); + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 16 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_MULTIMEDIA_COMMANDS_DEVICE_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceNub.h b/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceNub.h new file mode 100644 index 0000000..f88a1e9 --- /dev/null +++ b/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceNub.h @@ -0,0 +1,233 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_NUB_H_ +#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_NUB_H_ + + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + +// Probe score values +enum +{ + kPeripheralDeviceTypeNoMatch = 0, + kDefaultProbeRanking = 5000, + kFirstOrderRanking = 10000, + kSecondOrderRanking = 15000, + kThirdOrderRanking = 20000 +}; + + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// General IOKit headers +#include <IOKit/IOLib.h> +#include <IOKit/IOService.h> +#include <IOKit/IOSyncer.h> + +// SCSI Architecture Model Family includes +#include <IOKit/scsi/IOSCSIProtocolServices.h> + + +// Forward definitions for internal use only classes. +class SCSIPrimaryCommands; + +//----------------------------------------------------------------------------- +// Class Declarations +//----------------------------------------------------------------------------- + +class IOSCSIPeripheralDeviceNub : public IOSCSIProtocolServices +{ + + OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceNub ) + +private: + + static bool sCompareIOProperty ( + IOService * object, + OSDictionary * table, + char * propertyKeyName, + bool * matches ); + + static void TaskCallback ( SCSITaskIdentifier completedTask ); + void TaskCompletion ( SCSITaskIdentifier completedTask ); + + static IOReturn sWaitForTask ( void * object, SCSITask * request ); + IOReturn GatedWaitForTask ( SCSITask * request ); + +protected: + + SCSIServiceResponse SendTask ( SCSITask * request ); + + bool InterrogateDevice ( void ); + + // Reserve space for future expansion. + struct IOSCSIPeripheralDeviceNubExpansionData { }; + IOSCSIPeripheralDeviceNubExpansionData * fIOSCSIPeripheralDeviceNubReserved; + + IOSCSIProtocolInterface * fProvider; +#ifndef __LP64__ + SCSIPrimaryCommands * fSCSIPrimaryCommandObject; +#endif + UInt8 fDefaultInquiryCount; + + virtual bool SendSCSICommand ( SCSITaskIdentifier request, + SCSIServiceResponse * serviceResponse, + SCSITaskStatus * taskStatus ); + + virtual SCSIServiceResponse AbortSCSICommand ( SCSITaskIdentifier request ); + + // The IsProtocolServiceSupported will return true if the specified + // feature is supported by the protocol layer. If the service has a value that must be + // returned, it will be returned in the serviceValue output parameter. + virtual bool IsProtocolServiceSupported ( SCSIProtocolFeature feature, void * serviceValue ); + + virtual bool HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void * serviceValue ); + + // We override this method in order to NOT do power management + virtual void InitializePowerManagement ( IOService * provider ); + +public: + + bool init ( OSDictionary * propTable ); + virtual bool start ( IOService * provider ); + virtual void free ( void ); + + virtual IOReturn message ( UInt32 type, IOService * nub, void * arg ); + + virtual bool matchPropertyTable ( OSDictionary * table, + SInt32 * score ); + + // The ExecuteCommand method will take a SCSITask object and transport + // it across the physical wires to the device + virtual void ExecuteCommand ( SCSITaskIdentifier request ); + + // The Task Management function to allow the SCSI Application Layer client to request + // that a specific task be aborted. + virtual SCSIServiceResponse AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ); + + // The Task Management function to allow the SCSI Application Layer client to request + // that a all tasks curerntly in the task set be aborted. + virtual SCSIServiceResponse AbortTaskSet ( UInt8 theLogicalUnit ); + + virtual SCSIServiceResponse ClearACA ( UInt8 theLogicalUnit ); + + virtual SCSIServiceResponse ClearTaskSet ( UInt8 theLogicalUnit ); + + virtual SCSIServiceResponse LogicalUnitReset ( UInt8 theLogicalUnit ); + + virtual SCSIServiceResponse TargetReset ( void ); + + // ************* Obsoleted Member Routine **************** + // The AbortCommand method is replaced by the AbortTask Management function and + // should no longer be called. + virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier abortTask ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 1 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 2 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 3 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 8 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 9 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 10 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 11 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 12 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 16 ); + +}; + + + +class IOSCSILogicalUnitNub : public IOSCSIPeripheralDeviceNub +{ + + OSDeclareDefaultStructors ( IOSCSILogicalUnitNub ) + +private: + + UInt8 fLogicalUnitNumber; + +protected: + + // Reserve space for future expansion. + struct IOSCSILogicalUnitNubExpansionData { }; + IOSCSILogicalUnitNubExpansionData * fIOSCSILogicalUnitNubReserved; + +public: + + virtual bool start ( IOService * provider ); + + virtual void SetLogicalUnitNumber ( UInt8 newLUN ); + + UInt8 GetLogicalUnitNumber ( void ); + + // The ExecuteCommand method will take a SCSITask object and transport + // it across the physical wires to the device + virtual void ExecuteCommand ( SCSITaskIdentifier request ); + + // The AbortCommand method will abort the indicated SCSI Task object, + // if it is possible and the SCSI Task has not already completed. + virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier abortTask ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 1 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 2 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 3 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 8 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 9 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 10 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 11 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 12 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 16 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_NUB_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType00.h b/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType00.h new file mode 100644 index 0000000..34fdb18 --- /dev/null +++ b/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType00.h @@ -0,0 +1,102 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_OO_H_ +#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_OO_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// SCSI Architecture Model Family includes +#include <IOKit/scsi/IOSCSIBlockCommandsDevice.h> + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIPeripheralDeviceType00 : public IOSCSIBlockCommandsDevice +{ + + OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceType00 ) + +protected: + + // Reserve space for future expansion. + struct IOSCSIPeripheralDeviceType00ExpansionData + { + OSSet * fClients; + }; + IOSCSIPeripheralDeviceType00ExpansionData * fIOSCSIPeripheralDeviceType00Reserved; + +public: + + bool init ( OSDictionary * propTable ); + virtual bool start ( IOService * provider ); + virtual void free ( void ); + + virtual bool handleOpen ( + IOService * client, + IOOptionBits options, + void * access ); + + virtual void handleClose ( + IOService * client, + IOOptionBits options ); + + virtual bool handleIsOpen ( const IOService * client ) const; + + virtual IOReturn newUserClient ( + task_t owningTask, + void * securityID, + UInt32 type, + OSDictionary * properties, + IOUserClient ** handler ); + virtual void CreateStorageServiceNub ( void ); + + virtual char * GetVendorString ( void ); + virtual char * GetProductString ( void ); + virtual char * GetRevisionString ( void ); + + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 1 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 2 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 3 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_OO_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType05.h b/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType05.h new file mode 100644 index 0000000..22066f0 --- /dev/null +++ b/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType05.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_05_H_ +#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_05_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// SCSI Architecture Model Family includes +#include <IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIPeripheralDeviceType05 : public IOSCSIMultimediaCommandsDevice +{ + + OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceType05 ) + +protected: + + // Reserve space for future expansion. + struct IOSCSIPeripheralDeviceType05ExpansionData { }; + IOSCSIPeripheralDeviceType05ExpansionData * fIOSCSIPeripheralDeviceType05Reserved; + +public: + + bool init ( OSDictionary * propTable ); + virtual bool start ( IOService * provider ); + virtual void stop ( IOService * provider ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 1 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 2 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 3 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_05_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType07.h b/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType07.h new file mode 100644 index 0000000..661136d --- /dev/null +++ b/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType07.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_07_H_ +#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_07_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// SCSI Architecture Model Family includes +#include <IOKit/scsi/IOSCSIBlockCommandsDevice.h> + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIPeripheralDeviceType07 : public IOSCSIBlockCommandsDevice +{ + + OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceType07 ) + +protected: + + // Reserve space for future expansion. + struct IOSCSIPeripheralDeviceType07ExpansionData { }; + IOSCSIPeripheralDeviceType07ExpansionData * fIOSCSIPeripheralDeviceType07Reserved; + +public: + + bool init ( OSDictionary * propTable ); + virtual bool start ( IOService * provider ); + virtual void stop ( IOService * provider ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 1 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 2 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 3 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_07_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType0E.h b/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType0E.h new file mode 100644 index 0000000..cc9ec06 --- /dev/null +++ b/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType0E.h @@ -0,0 +1,77 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_0E_H_ +#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_0E_H_ + +#if defined(KERNEL) && defined(__cplusplus) + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// General IOKit headers +#include <IOKit/IOLib.h> + +// SCSI Architecture Model Family includes +#include <IOKit/scsi/IOSCSIReducedBlockCommandsDevice.h> + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIPeripheralDeviceType0E : public IOSCSIReducedBlockCommandsDevice +{ + + OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceType0E ) + +protected: + + // Reserve space for future expansion. + struct IOSCSIPeripheralDeviceType0EExpansionData { }; + IOSCSIPeripheralDeviceType0EExpansionData * fIOSCSIPeripheralDeviceType0EReserved; + +public: + + bool init ( OSDictionary * propTable ); + virtual bool start ( IOService * provider ); + virtual void stop ( IOService * provider ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 1 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 2 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 3 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_0E_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIPrimaryCommandsDevice.h b/i386/include/IOKit/scsi/IOSCSIPrimaryCommandsDevice.h new file mode 100644 index 0000000..ba0f1a0 --- /dev/null +++ b/i386/include/IOKit/scsi/IOSCSIPrimaryCommandsDevice.h @@ -0,0 +1,805 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_SCSI_PRIMARY_COMMANDS_DEVICE_H_ +#define _IOKIT_IO_SCSI_PRIMARY_COMMANDS_DEVICE_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// General IOKit headers +#include <IOKit/IOLib.h> +#include <IOKit/IOService.h> +#include <IOKit/IOReturn.h> +#include <IOKit/IOMemoryDescriptor.h> +#include <IOKit/IOSyncer.h> + +// SCSI Architecture Model Family includes +#include <IOKit/scsi/SCSICommandDefinitions.h> +#include <IOKit/scsi/SCSICmds_INQUIRY_Definitions.h> +#include <IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h> +#include <IOKit/scsi/IOSCSIProtocolInterface.h> + + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + +// Notification messages +enum +{ + kSCSIServicesNotification_Suspend = 0x69000080, + kSCSIServicesNotification_Resume = 0x69000090 +}; + + +// Timeout values +enum +{ + kOneSecondTimeoutInMS = 1000, + kTenSecondTimeoutInMS = 10 * kOneSecondTimeoutInMS, + kThirtySecondTimeoutInMS = 30 * kOneSecondTimeoutInMS, + kFortyFiveSecondTimeoutInMS = 45 * kOneSecondTimeoutInMS +}; + +// Mode page values for page control field +enum +{ + kModePageControlCurrentValues = 0x00, + kModePageControlChangeableValues = 0x01, + kModePageControlDefaultValues = 0x02, + kModePageControlSavedValues = 0x03 +}; + +// The command should be tried 5 times. The original attempt +// plus 4 retries. +#define kDefaultRetryCount 4 + +// Forward declarations for internal use only classes +class SCSIPrimaryCommands; + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIPrimaryCommandsDevice : public IOSCSIProtocolInterface +{ + + OSDeclareAbstractStructors ( IOSCSIPrimaryCommandsDevice ) + +private: + +#ifndef __LP64__ + SCSIPrimaryCommands * fSCSIPrimaryCommandObject; +#endif + + IOSCSIProtocolInterface * fProtocolDriver; + + // The fProtocolAccessEnabled member variable indicates whether + // requests coming from the client can be sent to the device. + // This will be set to true after the Protocol Service driver is successfully + // opened and before the call to InitializeDeviceSupport and set to false before + // TerminateDeviceSupport is called. + bool fProtocolAccessEnabled; + + // The fDeviceAccessEnabled member variable indicates whether + // requests coming from the client can be sent to the device. + // This will be set to true after InitializeDeviceSupport is called and + // set to false before StopDeviceSupport is called. + bool fDeviceAccessEnabled; + bool fDeviceAccessSuspended; + + static bool ServerKeyswitchCallback ( void * target, + void * refCon, + IOService * newService ); + + static void TaskCallback ( SCSITaskIdentifier completedTask ); + void TaskCompletion ( SCSITaskIdentifier completedTask ); + + static IOReturn sWaitForTask ( void * object, SCSITaskIdentifier request ); + IOReturn GatedWaitForTask ( SCSITaskIdentifier request ); + +protected: + + // Reserve space for future expansion. + struct IOSCSIPrimaryCommandsDeviceExpansionData + { + IONotifier * fKeySwitchNotifier; + UInt8 fANSIVersion; + UInt32 fReadTimeoutDuration; + UInt32 fWriteTimeoutDuration; + bool fCMDQUE; + SCSITaggedTaskIdentifier fTaskID; + IOSimpleLock * fTaskIDLock; + UInt32 fRetryCount; + }; + IOSCSIPrimaryCommandsDeviceExpansionData * fIOSCSIPrimaryCommandsDeviceReserved; + + #define fReadTimeoutDuration fIOSCSIPrimaryCommandsDeviceReserved->fReadTimeoutDuration + #define fWriteTimeoutDuration fIOSCSIPrimaryCommandsDeviceReserved->fWriteTimeoutDuration + #define fRetryCount fIOSCSIPrimaryCommandsDeviceReserved->fRetryCount + + + UInt8 fDefaultInquiryCount; + OSDictionary * fDeviceCharacteristicsDictionary; + UInt32 fNumCommandsOutstanding; + + virtual void free ( void ); + void SetANSIVersion ( UInt8 ); + void SetCMDQUE ( bool value ); + IOReturn GetModeSense ( + IOMemoryDescriptor * dataBuffer, + SCSICmdField6Bit PAGE_CODE, + SCSICmdField2Byte ALLOCATION_LENGTH, + bool * use10ByteModeSense ); + bool RetrieveINQUIRYData ( + UInt8 EVPD, + UInt8 inquiryPage, + UInt8 * inquiryBuffer, + UInt16 * dataSize ); + + // This flag is set if the device responds to a MODE_SENSE_10 command + // with the page code set to 0x1A (Power Conditions Mode Page) + bool fDeviceSupportsPowerConditions; + + // This method will retreive the SCSI Primary Command Set object for + // the class. For subclasses, this will be overridden using a + // dynamic cast on the base command set object of the subclass. + +#ifndef __LP64__ + + // ------ DEPRECATED API ---------- + // This should no longer be called by subclasses as the command builder + // objects will be removed in a later release. + virtual SCSIPrimaryCommands * GetSCSIPrimaryCommandObject ( void ); + + // This method is called by the start method to create all the command + // objects needed by the class. For subclasses, this will be overridden + // to create its needed command set objects. + virtual bool CreateCommandSetObjects ( void ); + + // This method is called by the free method to free all the command + // objects needed by the class. For subclasses, this will be overridden + // to free its needed command set objects. + virtual void FreeCommandSetObjects ( void ); + +#endif + + + // This method is called by the start method to obtain information from + // the device with regards to whether it supports the power conditions mode page. + virtual void CheckPowerConditionsModePage ( void ); + + // This will return back the Protocol driver that is used to + // send service requests to the device. + virtual IOSCSIProtocolInterface * GetProtocolDriver ( void ); + + // This will get a new SCSITask for the caller + virtual SCSITaskIdentifier GetSCSITask ( void ); + + // This will release a SCSITask (eventually return it to a pool) + virtual void ReleaseSCSITask ( SCSITaskIdentifier request ); + + // This will return a unique value for the tagged task identifier + SCSITaggedTaskIdentifier GetUniqueTagID ( void ); + + // Call for executing the command synchronously + SCSIServiceResponse SendCommand ( + SCSITaskIdentifier request, + UInt32 timeoutDuration ); + + // Call for executing the command asycnchronously + void SendCommand ( + SCSITaskIdentifier request, + UInt32 timeoutDuration, + SCSITaskCompletion taskCompletion ); + + + virtual bool InitializeDeviceSupport ( void ) = 0; + virtual void StartDeviceSupport ( void ) = 0; + virtual void SuspendDeviceSupport ( void ) = 0; + virtual void ResumeDeviceSupport ( void ) = 0; + virtual void StopDeviceSupport ( void ) = 0; + virtual void TerminateDeviceSupport ( void ) = 0; + virtual UInt32 GetNumberOfPowerStateTransitions ( void ) = 0; + + virtual IOReturn VerifyDeviceState ( void ); + // Called to clear any power-on/reset status in the drive + virtual bool ClearPowerOnReset ( void ); + virtual bool ClearNotReadyStatus ( void ) = 0; + + bool IsProtocolAccessEnabled ( void ); + bool IsDeviceAccessEnabled ( void ); + bool IsDeviceAccessSuspended ( void ); + + // Accessors for saving and retrieving data from an SCSITask object. + bool ResetForNewTask( + SCSITaskIdentifier request ); + bool SetTaskAttribute ( + SCSITaskIdentifier request, + SCSITaskAttribute newAttribute ); + SCSITaskAttribute GetTaskAttribute ( + SCSITaskIdentifier request ); + bool SetTaggedTaskIdentifier ( + SCSITaskIdentifier request, + SCSITaggedTaskIdentifier taggedTaskIdentifier ); + SCSITaggedTaskIdentifier GetTaggedTaskIdentifier ( + SCSITaskIdentifier request ); + bool SetTaskState ( + SCSITaskIdentifier request, + SCSITaskState newTaskState ); + SCSITaskState GetTaskState ( + SCSITaskIdentifier request ); + bool SetTaskStatus ( + SCSITaskIdentifier request, + SCSITaskStatus newStatus ); + SCSITaskStatus GetTaskStatus ( + SCSITaskIdentifier request ); + bool SetCommandDescriptorBlock ( + SCSITaskIdentifier request, + UInt8 cdbByte0, + UInt8 cdbByte1, + UInt8 cdbByte2, + UInt8 cdbByte3, + UInt8 cdbByte4, + UInt8 cdbByte5 ); + + // Populate the 10 Byte Command Descriptor Block + bool SetCommandDescriptorBlock ( + SCSITaskIdentifier request, + UInt8 cdbByte0, + UInt8 cdbByte1, + UInt8 cdbByte2, + UInt8 cdbByte3, + UInt8 cdbByte4, + UInt8 cdbByte5, + UInt8 cdbByte6, + UInt8 cdbByte7, + UInt8 cdbByte8, + UInt8 cdbByte9 ); + + // Populate the 12 Byte Command Descriptor Block + bool SetCommandDescriptorBlock ( + SCSITaskIdentifier request, + UInt8 cdbByte0, + UInt8 cdbByte1, + UInt8 cdbByte2, + UInt8 cdbByte3, + UInt8 cdbByte4, + UInt8 cdbByte5, + UInt8 cdbByte6, + UInt8 cdbByte7, + UInt8 cdbByte8, + UInt8 cdbByte9, + UInt8 cdbByte10, + UInt8 cdbByte11 ); + + // Populate the 16 Byte Command Descriptor Block + bool SetCommandDescriptorBlock ( + SCSITaskIdentifier request, + UInt8 cdbByte0, + UInt8 cdbByte1, + UInt8 cdbByte2, + UInt8 cdbByte3, + UInt8 cdbByte4, + UInt8 cdbByte5, + UInt8 cdbByte6, + UInt8 cdbByte7, + UInt8 cdbByte8, + UInt8 cdbByte9, + UInt8 cdbByte10, + UInt8 cdbByte11, + UInt8 cdbByte12, + UInt8 cdbByte13, + UInt8 cdbByte14, + UInt8 cdbByte15 ); + + bool SetDataTransferDirection ( + SCSITaskIdentifier request, + UInt8 newDirection ); + UInt8 GetDataTransferDirection ( + SCSITaskIdentifier request ); + bool SetRequestedDataTransferCount ( + SCSITaskIdentifier request, + UInt64 newRequestedCount ); + UInt64 GetRequestedDataTransferCount ( + SCSITaskIdentifier request ); + bool SetRealizedDataTransferCount ( + SCSITaskIdentifier request, + UInt64 newRealizedDataCount ); + UInt64 GetRealizedDataTransferCount ( + SCSITaskIdentifier request ); + bool SetDataBuffer ( + SCSITaskIdentifier request, + IOMemoryDescriptor * newBuffer ); + IOMemoryDescriptor * GetDataBuffer ( + SCSITaskIdentifier request ); + bool SetTimeoutDuration ( + SCSITaskIdentifier request, + UInt32 newTimeout ); + UInt32 GetTimeoutDuration ( + SCSITaskIdentifier request ); + bool SetTaskCompletionCallback ( + SCSITaskIdentifier request, + SCSITaskCompletion newCallback ); + void TaskCompletedNotification ( + SCSITaskIdentifier request ); + + bool SetServiceResponse ( + SCSITaskIdentifier request, + SCSIServiceResponse serviceResponse ); + SCSIServiceResponse GetServiceResponse ( + SCSITaskIdentifier request ); + bool SetAutosenseCommand ( + SCSITaskIdentifier request, + UInt8 cdbByte0, + UInt8 cdbByte1, + UInt8 cdbByte2, + UInt8 cdbByte3, + UInt8 cdbByte4, + UInt8 cdbByte5 ); + bool GetAutoSenseData ( + SCSITaskIdentifier request, + SCSI_Sense_Data * senseData ); // DEPRECATED, use below function instead + bool GetAutoSenseData ( + SCSITaskIdentifier request, + SCSI_Sense_Data * senseData, + UInt8 senseDataSize ); + UInt8 GetAutoSenseDataSize ( + SCSITaskIdentifier request ); + + bool SetApplicationLayerReference ( + SCSITaskIdentifier request, + void * newReferenceValue ); + void * GetApplicationLayerReference ( + SCSITaskIdentifier request ); + + void IncrementOutstandingCommandsCount ( void ); + static void sIncrementOutstandingCommandsCount ( + IOSCSIPrimaryCommandsDevice * self ); + virtual void HandleIncrementOutstandingCommandsCount ( void ); + + + // This static member routine provides a mechanism for retrieving a pointer to + // the object that is claimed as the owner of the specified SCSITask. + static OSObject * sGetOwnerForTask ( SCSITaskIdentifier request ); + +public: + + bool init ( OSDictionary * propTable ); + virtual bool start ( IOService * provider ); + virtual void stop ( IOService * provider ); + virtual IOReturn message ( UInt32 type, IOService * nub, void * arg ); + + // The setAgressiveness method is called by the power manager + // to notify us of certain power management settings. We override + // this method in order to catch the kPMMinutesToSpinDown message + // in order to set our idle timer. + virtual IOReturn setAggressiveness ( unsigned long type, unsigned long minutes ); + + // Methods for getting device information strings + virtual char * GetVendorString ( void ); + virtual char * GetProductString ( void ); + virtual char * GetRevisionString ( void ); + OSDictionary * GetProtocolCharacteristicsDictionary ( void ); + OSDictionary * GetDeviceCharacteristicsDictionary ( void ); + UInt8 GetANSIVersion ( void ); + bool GetCMDQUE ( void ); + OSString * MapINQUIRYDataToIconFile ( void ); + UInt32 GetRetryCount ( void ); + + // -- SCSI Protocol Interface Methods -- + // The ExecuteCommand method will take a SCSI Task and transport + // it across the physical wire(s) to the device + virtual void ExecuteCommand ( SCSITaskIdentifier request ); + + // The Task Management function to allow the SCSI Application Layer client to request + // that a specific task be aborted. + SCSIServiceResponse AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ); + + // The Task Management function to allow the SCSI Application Layer client to request + // that a all tasks curerntly in the task set be aborted. + SCSIServiceResponse AbortTaskSet ( UInt8 theLogicalUnit ); + + SCSIServiceResponse ClearACA ( UInt8 theLogicalUnit ); + + SCSIServiceResponse ClearTaskSet ( UInt8 theLogicalUnit ); + + SCSIServiceResponse LogicalUnitReset ( UInt8 theLogicalUnit ); + + SCSIServiceResponse TargetReset ( void ); + + // The AbortCommand method will abort the indicated SCSI Task, + // if it is possible and the task has not already completed. + virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier request ); + + // The IsProtocolServiceSupported will return true if the specified + // feature is supported by the protocol layer. If the service has a value that must be + // returned, it will be returned in the serviceValue output parameter. + virtual bool IsProtocolServiceSupported ( + SCSIProtocolFeature feature, + void * serviceValue ); + + // The HandleProtocolServiceFeature will return true if the specified feature could + // be handled properly by the protocol layer. + virtual bool HandleProtocolServiceFeature ( + SCSIProtocolFeature feature, + void * serviceValue ); + + // Utility methods for use by all peripheral device objects. + + // isParameterValid are used to validate that the parameter passed into + // the command methods are of the correct value. + + // Validate Parameter used for 1 bit to 1 byte paramaters + bool IsParameterValid ( + SCSICmdField1Byte param, + SCSICmdField1Byte mask ); + + // Validate Parameter used for 9 bit to 2 byte paramaters + bool IsParameterValid ( + SCSICmdField2Byte param, + SCSICmdField2Byte mask ); + + // Validate Parameter used for 17 bit to 4 byte paramaters + bool IsParameterValid ( + SCSICmdField4Byte param, + SCSICmdField4Byte mask ); + + // Validate Parameter used for 33 bit to 8 byte paramaters + bool IsParameterValid ( + SCSICmdField8Byte param, + SCSICmdField8Byte mask ); + + + bool IsMemoryDescriptorValid ( + IOMemoryDescriptor * dataBuffer ); + + bool IsMemoryDescriptorValid ( + IOMemoryDescriptor * dataBuffer, + UInt64 requiredSize ); + +#ifndef __LP64__ + + // SCSI Primary command implementations + virtual bool CHANGE_DEFINITION ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit SAVE, + SCSICmdField7Bit DEFINITION_PARAMETER, + SCSICmdField1Byte PARAMETER_DATA_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool COMPARE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PAD, + SCSICmdField3Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool COPY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PAD, + SCSICmdField3Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool COPY_AND_VERIFY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit BYTCHK, + SCSICmdField1Bit PAD, + SCSICmdField3Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool EXTENDED_COPY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + +#endif /* !__LP64__ */ + + virtual bool INQUIRY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit CMDDT, + SCSICmdField1Bit EVPD, + SCSICmdField1Byte PAGE_OR_OPERATION_CODE, + SCSICmdField1Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool LOG_SELECT ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PCR, + SCSICmdField1Bit SP, + SCSICmdField2Bit PC, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool LOG_SENSE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PPC, + SCSICmdField1Bit SP, + SCSICmdField2Bit PC, + SCSICmdField6Bit PAGE_CODE, + SCSICmdField2Byte PARAMETER_POINTER, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool MODE_SELECT_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PF, + SCSICmdField1Bit SP, + SCSICmdField1Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool MODE_SELECT_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PF, + SCSICmdField1Bit SP, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool MODE_SENSE_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DBD, + SCSICmdField2Bit PC, + SCSICmdField6Bit PAGE_CODE, + SCSICmdField1Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool MODE_SENSE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit LLBAA, + SCSICmdField1Bit DBD, + SCSICmdField2Bit PC, + SCSICmdField6Bit PAGE_CODE, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool PERSISTENT_RESERVE_IN ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField5Bit SERVICE_ACTION, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool PERSISTENT_RESERVE_OUT ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField5Bit SERVICE_ACTION, + SCSICmdField4Bit SCOPE, + SCSICmdField4Bit TYPE, + SCSICmdField1Byte CONTROL ); + + virtual bool PREVENT_ALLOW_MEDIUM_REMOVAL ( + SCSITaskIdentifier request, + SCSICmdField2Bit PREVENT, + SCSICmdField1Byte CONTROL ); + + virtual bool READ_BUFFER ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Bit MODE, + SCSICmdField1Byte BUFFER_ID, + SCSICmdField3Byte BUFFER_OFFSET, + SCSICmdField3Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool RECEIVE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool RECEIVE_DIAGNOSTICS_RESULTS ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PCV, + SCSICmdField1Byte PAGE_CODE, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool RELEASE_6 ( + SCSITaskIdentifier request, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + virtual bool RELEASE_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit EXTENT, + SCSICmdField1Byte RESERVATION_IDENTIFICATION, + SCSICmdField1Byte CONTROL ); + +#endif /* !__LP64__ */ + + virtual bool RELEASE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit THRDPTY, + SCSICmdField1Bit LONGID, + SCSICmdField1Byte THIRD_PARTY_DEVICE_ID, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + virtual bool RELEASE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit THRDPTY, + SCSICmdField1Bit LONGID, + SCSICmdField1Bit EXTENT, + SCSICmdField1Byte RESERVATION_IDENTIFICATION, + SCSICmdField1Byte THIRD_PARTY_DEVICE_ID, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + +#endif /* !__LP64__ */ + + virtual bool REPORT_DEVICE_IDENTIFIER ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool REPORT_LUNS ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool REQUEST_SENSE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool RESERVE_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + virtual bool RESERVE_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit EXTENT, + SCSICmdField1Byte RESERVATION_IDENTIFICATION, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + +#endif /* !__LP64__ */ + + virtual bool RESERVE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit THRDPTY, + SCSICmdField1Bit LONGID, + SCSICmdField1Byte THIRD_PARTY_DEVICE_ID, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + +#ifndef __LP64__ + + virtual bool RESERVE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit THRDPTY, + SCSICmdField1Bit LONGID, + SCSICmdField1Bit EXTENT, + SCSICmdField1Byte RESERVATION_IDENTIFICATION, + SCSICmdField1Byte THIRD_PARTY_DEVICE_ID, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + +#endif /* !__LP64__ */ + + virtual bool SEND ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit AER, + SCSICmdField3Byte TRANSFER_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool SEND_DIAGNOSTICS ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField3Bit SELF_TEST_CODE, + SCSICmdField1Bit PF, + SCSICmdField1Bit SELF_TEST, + SCSICmdField1Bit DEVOFFL, + SCSICmdField1Bit UNITOFFL, + SCSICmdField2Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool SET_DEVICE_IDENTIFIER ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField5Bit SERVICE_ACTION, + SCSICmdField4Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + virtual bool TEST_UNIT_READY ( + SCSITaskIdentifier request, + SCSICmdField1Byte CONTROL ); + + virtual bool WRITE_BUFFER ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Bit MODE, + SCSICmdField1Byte BUFFER_ID, + SCSICmdField3Byte BUFFER_OFFSET, + SCSICmdField3Byte PARAMETER_LIST_LENGTH, + SCSICmdField1Byte CONTROL ); + + // The SPC-3 INQUIRY command as defined in section 6.4.1 of SPC-3. + bool INQUIRY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit EVPD, + SCSICmdField1Byte PAGE_CODE, + SCSICmdField2Byte ALLOCATION_LENGTH, + SCSICmdField1Byte CONTROL ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 1 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 2 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 3 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 8 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 9 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 10 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 11 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 12 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 16 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_PRIMARY_COMMANDS_DEVICE_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIProtocolInterface.h b/i386/include/IOKit/scsi/IOSCSIProtocolInterface.h new file mode 100644 index 0000000..bb74ce4 --- /dev/null +++ b/i386/include/IOKit/scsi/IOSCSIProtocolInterface.h @@ -0,0 +1,854 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IO_SCSI_PROTOCOL_INTERFACE_H_ +#define _IOKIT_IO_SCSI_PROTOCOL_INTERFACE_H_ + + +/*! @header SCSI Protocol Interface + @discussion + This file contains definitions for the IOSCSIProtocolInterface class, + SCSI Protocol Features used by this interface, and additional constants + used by this interface. +*/ + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +#include <IOKit/storage/IOStorageDeviceCharacteristics.h> + + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + +/* +SCSI Device Characteristics - Defined between SCSI Application Layer and + SCSI Protocol Layer only. +*/ + +/*! +@constant kIOPropertySCSIDeviceCharacteristicsKey +@discussion +This key is used to define SCSI Device Characteristics for a particular device. +It is the key for the dictionary containing the keys of characteristics. These keys +are only defined between the SCSI Protocol Layer and the SCSI Applicaiton Layer. Some +properties may be copied from this dictionary to the more generic Device Characteristics +or Protocol Characteristics dictionaries. +*/ +#define kIOPropertySCSIDeviceCharacteristicsKey "SCSI Device Characteristics" + +/*! +@constant kIOPropertySCSIInquiryLengthKey +@discussion +This key is used to define a default INQUIRY length to issue to the device. The +value is a UInt32 corresponding to the number of bytes to request in the INQUIRY +command. +*/ +#define kIOPropertySCSIInquiryLengthKey "Inquiry Length" + +/*! +@constant kIOPropertySCSIManualEjectKey +@discussion +This key is used to indicate that the device is known to be a manual ejectable media +device. This property overrides all of the driver checks for determining this capability. +This property is a string, although if it exists it should always be true. +*/ +#define kIOPropertySCSIManualEjectKey "Manual Eject" + +/*! +@constant kIOPropertyReadTimeOutDurationKey +@discussion +This key is used to define the Read Time Out for a particular device. +This property overrides all of the protocol defaults. +This property is a value, in milliseconds. +*/ +#define kIOPropertyReadTimeOutDurationKey "Read Time Out Duration" + +/*! +@constant kIOPropertyWriteTimeOutDurationKey +@discussion +This key is used to define the Write Time Out for a particular device. +This property overrides all of the protocol defaults. +This property is a value, in milliseconds. +*/ +#define kIOPropertyWriteTimeOutDurationKey "Write Time Out Duration" + +/*! +@constant kIOPropertyRetryCountKey +@discussion +This key is used to define the number of Read/Write retries for a particular device. +This property overrides all of the protocol defaults. +The value is a UInt32 corresponding to the number of retries. +*/ +#define kIOPropertyRetryCountKey "Retry Count" + +/*! + @constant kIOPropertyAutonomousSpinDownKey + @discussion + This key is used to indicate that the device is known to have its own internal logic + for idle disk spin down. This key is used to mark device which respon poorly to our + efforts to manually spin down or spin up the device when it is already in the desired + state. + */ +#define kIOPropertyAutonomousSpinDownKey "Autonomous Spin Down" + +/*! + @constant kIOPropertyEjectRequireStartStopUnitKey + @discussion + This key is used to indicate that while the device may have failed PREVENT_ALLOW_MEDIUM + REMOVAL it still requires a START_STOP_UNIT to eject/unload media. + */ +#define kIOPropertyEjectRequireStartStopUnitKey "Eject Requires START_STOP_UNIT" + +#if defined(KERNEL) && defined(__cplusplus) + + +/*! +@constant kCFBundleIdentifierKey +@discussion +Property key for CFBundleIdentifier. +*/ +#define kCFBundleIdentifierKey "CFBundleIdentifier" + +/*! +@constant kIOSCSIArchitectureBundleIdentifierKey +@discussion +IOSCSIArchitectureModelFamily's CFBundle identifier. +*/ +#define kIOSCSIArchitectureBundleIdentifierKey "com.apple.iokit.IOSCSIArchitectureModelFamily" + + +// General kernel headers +#include <kern/thread.h> + +// General IOKit headers +#include <IOKit/IOLib.h> +#include <IOKit/IOService.h> +#include <IOKit/IOCommandGate.h> +#include <IOKit/IOWorkLoop.h> + +// SCSI Architecture Model Family includes +#include <IOKit/scsi/SCSITask.h> + + +/*! +@enum SCSI Protocol Interface Device Notification values +@discussion +Message values for SCSI Protocol Interface Device Notifications. +@constant kSCSIProtocolNotification_DeviceRemoved +Private message sent between a SCSI protocol service provider and +SCSI application layer driver to indicate device removal. +@constant kSCSIProtocolNotification_VerifyDeviceState +Private message sent between a SCSI protocol service provider and +SCSI application layer driver to indicate device state may have +changed and the device state should be re-verified by the SCSI +Application Layer driver. An example would be a bus reset which clears +the tray locking state of an ATAPI device. +@constant kSCSIServicesNotification_ExclusivityChanged +Message sent when a change in exclusivity state occurs. Usually in +response to acquiring/releasing exclusive access to a device via a user client. +*/ +enum +{ + kSCSIProtocolNotification_DeviceRemoved = 0x69000010, + kSCSIProtocolNotification_VerifyDeviceState = 0x69000020, + kSCSIServicesNotification_ExclusivityChanged = 0x69000030 +}; + + +/*! +@typedef SCSIProtocolFeature +@discussion +Typedef for SCSIProtocolFeature, a 32-bit quantity. +*/ +typedef UInt32 SCSIProtocolFeature; + +/*! +@enum SCSI Protocol Features +@discussion +The list of SCSI Protocol Features currently supported. +*/ +enum +{ + + /*! + @constant kSCSIProtocolFeature_ACA Not yet used. + */ + kSCSIProtocolFeature_ACA = 1, + + /*! + @constant kSCSIProtocolFeature_CPUInDiskMode Used to determine + if the SCSI Protocol Services Driver supports a CPU which is in + target disk mode. + */ + kSCSIProtocolFeature_CPUInDiskMode = 2, + + /*! + @constant kSCSIProtocolFeature_ProtocolSpecificPolling Used + to determine if the SCSI Protocol Services Driver supports + protocol specific polling for media. This is used for low-power + polling specifically for ATAPI devices on ATA buses + */ + kSCSIProtocolFeature_ProtocolSpecificPolling = 3, + + /*! + @constant kSCSIProtocolFeature_ProtocolSpecificSleepCommand Used + to determine if the SCSI Protocol Services Driver supports + protocol specific sleep commands to a drive. This is used for + sleeping drives specifically ATAPI devices on ATA buses. + */ + kSCSIProtocolFeature_ProtocolSpecificSleepCommand = 4, + + /*! + @constant kSCSIProtocolFeature_GetMaximumLogicalUnitNumber If + the SCSI Protocol Services Driver supports logical units, it will + report the maximum addressable ID that it supports in the UInt32 pointer + that is passed in as the serviceValue. If only one unit is supported, + the driver should return false for this query. + */ + kSCSIProtocolFeature_GetMaximumLogicalUnitNumber = 5, + + /*! + @constant kSCSIProtocolFeature_MaximumReadBlockTransferCount If + the SCSI Protocol Services Driver has a maximum number of + blocks that can be transfered in a read request, it will return + true to this query and return the block count in the UInt32 pointer + that is passed in as the serviceValue. + */ + kSCSIProtocolFeature_MaximumReadBlockTransferCount = 6, + + /*! + @constant kSCSIProtocolFeature_MaximumWriteBlockTransferCount If + the SCSI Protocol Services Driver has a maximum number of + blocks that can be transferred in a write request, it will return + true to this query and return the block count in the UInt32 pointer + that is passed in as the serviceValue. + */ + kSCSIProtocolFeature_MaximumWriteBlockTransferCount = 7, + + /*! + @constant kSCSIProtocolFeature_MaximumReadTransferByteCount If + the SCSI Protocol Services Driver has a maximum byte count + that can be transferred in a read request, it will return + true to this query and return the byte count in the UInt64 pointer + that is passed in as the serviceValue. + */ + kSCSIProtocolFeature_MaximumReadTransferByteCount = 8, + + /*! + @constant kSCSIProtocolFeature_MaximumWriteTransferByteCount If + the SCSI Protocol Services Driver has a maximum byte count + that can be transferred in a write request, it will return + true to this query and return the byte count in the UInt64 pointer + that is passed in as the serviceValue. + */ + kSCSIProtocolFeature_MaximumWriteTransferByteCount = 9, + + /*! + @constant kSCSIProtocolFeature_SubmitDefaultInquiryData If + the SCSI Protocol Services Driver needs any extra information to + make any negotiation settings from the standard INQUIRY data, this + will be called to set that appropriately. The serviceValue will + point to a SCSICmd_INQUIRY_StandardData buffer. The size + of the buffer depends on the SCSI Device Characteristics + dictionary for the device or bus. If there is no + kIOPropertySCSIInquiryLengthKey value set in the dictionary + or if it doesn't exist, then the size of the data will be + the size of the full amount of Inquiry retrieved from the device. + */ + kSCSIProtocolFeature_SubmitDefaultInquiryData = 10, + + /*! + @constant kSCSIProtocolFeature_ProtocolAlwaysReportsAutosenseData If + the SCSI Protocol Services Driver always reports available + autosense data when a kSCSITaskStatus_CHECK_CONDITION is set, + then the protocol layer should return true. E.g. FireWire + transport drivers should respond true to this. + */ + kSCSIProtocolFeature_ProtocolAlwaysReportsAutosenseData = 11, + + /*! + @constant kSCSIProtocolFeature_ProtocolSpecificPowerOff If + the SCSI Protocol Services Driver supports removing the power + to the drive, then the protocol layer should return true. This is + used for aggressive power management, specifically for ATAPI + devices on ATA buses. + */ + kSCSIProtocolFeature_ProtocolSpecificPowerOff = 12, + + /*! + @constant kSCSIProtocolFeature_ProtocolSpecificPowerControl + Used to determine if the SCSI Protocol Services Driver supports + switching the power to the drive on and off. This is used for aggressive + power management, specifically for SATAPI devices on AHCI buses. + */ + kSCSIProtocolFeature_ProtocolSpecificPowerControl = 13, + + /*! + @constant kSCSIProtocolFeature_ProtocolSpecificAsyncNotification + Used to determine if the SCSI Protocol Services Driver supports + asynchronous notifications from the drive. This is used to prevent + polling for media, specifically for SATAPI devices on AHCI buses. + */ + kSCSIProtocolFeature_ProtocolSpecificAsyncNotification = 14 + +}; + + +/*! +@typedef SCSIProtocolPowerState +@discussion +Typedef for SCSIProtocolPowerState, a 32-bit quantity. +*/ +typedef UInt32 SCSIProtocolPowerState; + +/*! +@enum SCSI Protocol Power States +@discussion +The list of SCSI Protocol Power States. +*/ +enum +{ + /*! + @constant kSCSIProtocolPowerStateOff + Off power state. + */ + kSCSIProtocolPowerStateOff = 0, + + /*! + @constant kSCSIProtocolPowerStateOn + On power state. + */ + kSCSIProtocolPowerStateOn = 1 +}; + + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +/*! +@class IOSCSIProtocolInterface +@superclass IOService +@discussion +This class defines the public SCSI Protocol Layer API for any class that +provides Protocol services or needs to provide the Protocol Service API +for passing service requests to a Protocol Service driver. +*/ +class IOSCSIProtocolInterface : public IOService +{ + + OSDeclareAbstractStructors ( IOSCSIProtocolInterface ) + +public: + + /*! + @function start + @abstract During an IOService object's instantiation, starts the IOService object that has been selected to run on the provider. + @discussion See IOService.h for details. + @result <code>true</code> if the start was successful; <code>false</code> otherwise (which will cause the instance to be detached and usually freed). + */ + virtual bool start ( IOService * provider ); + + /*! + @function free + @abstract Called to release all resources held by the object. + @discussion Release all resources held by the object, then call super::free(). + */ + virtual void free ( void ); + + /*! + @function willTerminate + @abstract Passes a termination up the stack. + @discussion Notification that a provider has been terminated, sent before recursing up the stack, in root-to-leaf order. + @param provider The terminated provider of this object. + @param options Options originally passed to terminate(). + @result <code>true</code>. + */ + virtual bool willTerminate ( IOService * provider, IOOptionBits options ); + + /*! + @function GetUserClientExclusivityState + @abstract Gets the current exclusivity state of the user client. + @discussion The GetUserClientExclusivityState() method is called by the SCSITaskUserClient + to determine if any user client is holding exclusive access at the current time. This is simply + a preflight check and a return value of <code>false</code> does not guarantee that a subsequent + call to SetUserClientExclusivityState() will return successfully. + @result <code>true</code> if a user client is in exclusive control of the device, <code>false</code> otherwise. + */ + virtual bool GetUserClientExclusivityState ( void ); + + /*! + @function SetUserClientExclusivityState + @abstract Sets the current exclusivity state of the user client. + @discussion The SetUserClientExclusivityState() method is called by the SCSITaskUserClient + to set the exclusive access mode. + @param userClient The instance of SCSITaskUserClient for which to change exclusivity state. + @param state Exclusivity state. <code>true</code> means exclusive access is desired, <code>false</code> + means exclusive access is being released. + @result A valid IOReturn code indicating success or the type of failure. + */ + virtual IOReturn SetUserClientExclusivityState ( IOService * userClient, bool state ); + + + /*! + @function initialPowerStateForDomainState + @abstract Determines which power state a device is in, given the current power domain state. + @discussion Power management calls this method once, when the driver is initializing power management. + Subclasses should not need to override this method. + @param flags Flags that describe the character of "domain power"; they represent the <code>outputPowerCharacter</code> field of a state in the power domain's power state array. + @result A state number. + */ + virtual unsigned long initialPowerStateForDomainState ( IOPMPowerFlags flags ); + + /*! + @function setPowerState + @abstract Requests a power managed driver to change the power state of its device. + @discussion Requests a power managed driver to change the power state of its device. Most subclasses + of IOSCSIProtocolInterface have class-specific mechanisms and should not override this routine. + See IOSCSIProtocolServices.h, IOSCSIBlockCommandsDevice.h, IOSCSIReducedBlockCommandsDevice.h, and + IOSCSIMultimediaCommandsDevice.h for more information about power management changes. + Subclasses should not need to override this method. + @param powerStateOrdinal The number in the power state array to which the drive is being instructed to change. + @param whichDevice A pointer to the power management object which registered to manage power for this device. + The whichDevice field is not pertinent to us since the driver is both the "policy maker" for the device, + and the "policy implementor" for the device. + @result See IOService.h for details. + */ + virtual IOReturn setPowerState ( unsigned long powerStateOrdinal, IOService * whichDevice ); + + /*! + @function IsPowerManagementIntialized + @abstract Called to determine if power management is initialized. + @discussion Called to determine if power management is initialized. + Subclasses should not need to override this method. + @result <code>true</code> if power management has been initialized, <code>false</code> otherwise. + */ + virtual bool IsPowerManagementIntialized ( void ); + + /*! + @function CheckPowerState + @abstract Called by clients to ensure device is in correct power state before issuing I/O. + @discussion Called by clients to ensure device is in correct power state before issuing I/O. + If the device is not ready to handle such requests, it gives the driver a chance to block the + thread until the device is ready. Subclasses should not need to override this method. + */ + virtual void CheckPowerState ( void ); + + /*! + @function ExecuteCommand + @abstract Called to send a SCSITask and transport it across the physical wire(s) to the device. + @discussion Called to send a SCSITask and transport it across the physical wire(s) to the device. + Subclasses internal to IOSCSIArchitectureModelFamily will need to override this method. Third + party subclasses should not need to override this method. + @param request A valid SCSITaskIdentifier representing the task to transport across the wire(s). + */ + virtual void ExecuteCommand ( SCSITaskIdentifier request ) = 0; + + /*! + @function AbortCommand + @abstract Obsolete. Do not use this method. + @discussion Obsolete. Do not use this method. + */ + virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier request ) = 0; + + /*! + @function IsProtocolServiceSupported + @abstract This method is called to query for support of a protocol specific service feature. + @discussion This method is called to query for support of a protocol specific service feature. + Subclasses of IOSCSIProtocolServices should override this method. + @param feature A valid SCSIProtocolFeature. See enums for SCSIProtocolFeature. + @param serviceValue A pointer to a structure/value that is used in conjunction with the feature + requested. See enums for SCSIProtocolFeature. NB: This parameter may be NULL for certain + feature requests. + @result <code>true</code> if the feature is supported, <code>false</code> otherwise. + */ + virtual bool IsProtocolServiceSupported ( + SCSIProtocolFeature feature, + void * serviceValue ) = 0; + + /*! + @function HandleProtocolServiceFeature + @abstract This method is called to enact support of a protocol specific service feature. + @discussion This method is called to enact support of a protocol specific service feature. + Subclasses of IOSCSIProtocolServices should override this method. + @param feature A valid SCSIProtocolFeature. See enums for SCSIProtocolFeature. + @param serviceValue A pointer to a structure/value that is used in conjunction with the feature + requested. See enums for SCSIProtocolFeature. NB: This parameter may be NULL for certain + feature requests. + @result <code>true</code> if the service feature request succeeded, <code>false</code> otherwise. + */ + virtual bool HandleProtocolServiceFeature ( + SCSIProtocolFeature feature, + void * serviceValue ) = 0; + +protected: + + // Reserve space for future expansion. + struct IOSCSIProtocolInterfaceExpansionData + { + IOWorkLoop * fWorkLoop; + }; + IOSCSIProtocolInterfaceExpansionData * fIOSCSIProtocolInterfaceReserved; + + // ------ Power Management Support ------ + + thread_call_t fPowerManagementThread; + IOCommandGate * fCommandGate; + UInt32 fCurrentPowerState; + UInt32 fProposedPowerState; + bool fPowerTransitionInProgress; + bool fPowerAckInProgress; + bool fPowerManagementInitialized; + + /*! + @function GetCommandGate + @abstract Accessor method to obtain the IOCommandGate. + @discussion Accessor method to obtain the IOCommandGate. + @result The IOCommandGate for this instance. May return NULL. + */ + IOCommandGate * GetCommandGate ( void ); + + /*! + @function InitializePowerManagement + @abstract This method is called to initialize power management. + @discussion This method is called to initialize power management. It will call PMinit(), joinPMTree(), + setIdleTimerPeriod(), and makeUsable(). This method does not call registerPowerDriver(). + Subclasses may override this method to change the behavior (such as the number of power states). + @param provider The power management provider (i.e. the provider to attach to in the PowerManagement + tree). This may be a device that is not in the PM Tree itself, in which case, the IOService plane + is traversed towards the root node in an effort to find a node in the PM Tree. + */ + virtual void InitializePowerManagement ( IOService * provider ); + + /*! + @function GetInitialPowerState + @abstract This method is called to obtain the initial power state of the device (usually the highest). + @discussion This method is called to obtain the initial power state of the device (usually the highest). + Subclasses must override this method. + @result A power state ordinal. + */ + virtual UInt32 GetInitialPowerState ( void ) = 0; + + /*! + @function finalize + @abstract Finalizes the destruction of an IOService object. + @discussion See IOService.h + Subclasses may override this method, but should call super::finalize(). + @result <code>true</code>. + */ + virtual bool finalize ( IOOptionBits options ); + + /*! + @function sHandleSetPowerState + @abstract The sHandleSetPowerState method is a static function used as C->C++ glue + for going behind the command gate. + @discussion The sHandleSetPowerState method is a static function used as C->C++ glue + for going behind the command gate. + @param self The 'this' pointer for the class. + @param powerStateOrdinal The power state to which device shall be changed. + @result A valid IOReturn code indicating success or failure. + */ + static IOReturn sHandleSetPowerState ( IOSCSIProtocolInterface * self, UInt32 powerStateOrdinal ); + + /*! + @function sGetPowerTransistionInProgress + @abstract The sGetPowerTransistionInProgress method is a static function used as C->C++ glue + for going behind the command gate. + @discussion The sGetPowerTransistionInProgress method is a static function used as C->C++ glue + for going behind the command gate. + @param self The 'this' pointer for the class. + @result <code>true</code> if a power state is in progress, otherwise <code>false</code>. + */ + static bool sGetPowerTransistionInProgress ( IOSCSIProtocolInterface * self ); + + /*! + @function HandleSetPowerState + @abstract The HandleSetPowerState method is called by the glue code and is on the + serialized side of the command gate. + @discussion The HandleSetPowerState method is called by the glue code and is on the + serialized side of the command gate. This allows us to touch any member + variables as necessary without any multi-threading issues. + Subclasses may override this method to change behavior. Third party subclasses + should not need to override this method, but may. + @param powerStateOrdinal The power state to which device shall be changed. + */ + virtual void HandleSetPowerState ( UInt32 powerStateOrdinal ); + + /*! + @function sPowerManagement + @abstract The sPowerManagement method is a static C-function which is called using + mach's thread_call API. It guarantees us a thread of execution which is + different than the power management thread and the workloop thread on which + we can issue commands to the device synchronously or asynchronously without + worrying about deadlocks. It calls through to HandlePowerChange, which is + a state machine used to direct power management. + @discussion The sPowerManagement method is a static C-function which is called using + mach's thread_call API. It guarantees us a thread of execution which is + different than the power management thread and the workloop thread on which + we can issue commands to the device synchronously or asynchronously without + worrying about deadlocks. It calls through to HandlePowerChange, which is + a state machine used to direct power management. + @param whichDevice The 'this' pointer. + */ + static void sPowerManagement ( thread_call_param_t whichDevice ); + + /*! + @function HandlePowerChange + @abstract The HandlePowerChange method is pure virtual and is left to each protocol or + application layer driver to implement. It is guaranteed to be called on its + own thread of execution and can make synchronous or asynchronous calls. + @discussion The HandlePowerChange method is pure virtual and is left to each protocol or + application layer driver to implement. It is guaranteed to be called on its + own thread of execution and can make synchronous or asynchronous calls. + Subclasses must override this method. Third party subclasses shouldn't need to override + this method but can to alter the default behavior. + */ + virtual void HandlePowerChange ( void ) = 0; + + /*! + @function sHandleCheckPowerState + @abstract The sHandleCheckPowerState method is a static function used as C->C++ glue + for going behind the command gate. + @discussion The sHandleCheckPowerState method is a static function used as C->C++ glue + for going behind the command gate. + @param self The 'this' pointer for the class. + */ + static void sHandleCheckPowerState ( IOSCSIProtocolInterface * self ); + + /*! + @function HandleCheckPowerState(void) + @abstract The HandleCheckPowerState (void) method is on the serialized side of the command + gate and can change member variables safely without multi-threading issues. + It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) + with the max power state the class registered with. + @discussion The HandleCheckPowerState (void) method is on the serialized side of the command + gate and can change member variables safely without multi-threading issues. + It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) + with the max power state the class registered with. + Subclasses must override this method. Third party subclasses shouldn't need to override + this method but can to alter the default behavior. + */ + virtual void HandleCheckPowerState ( void ) = 0; + + /*! + @function HandleCheckPowerState(UInt32 maxPowerState) + @abstract The HandleCheckPowerState(UInt32 maxPowerState) method is called by + the subclasses and is passed the maxPowerState number given to the power + manager at initialization time. This guarantees the threads block until that + power state has been achieved. + @discussion The HandleCheckPowerState(UInt32 maxPowerState) method is called by + the subclasses and is passed the maxPowerState number given to the power + manager at initialization time. This guarantees the threads block until that + power state has been achieved. + @param maxPowerState The maximum power state in the power state array. + */ + void HandleCheckPowerState ( UInt32 maxPowerState ); + + /*! + @function TicklePowerManager(void) + @abstract The TicklePowerManager(void) method is called by CheckPowerState and + sends an activity tickle to the power manager so that the idle timer is + reset. + @discussion The TicklePowerManager(void) method is called by CheckPowerState and + sends an activity tickle to the power manager so that the idle timer is + reset. + Subclasses must override this method. Third party subclasses shouldn't need to override + this method but can to alter the default behavior. + */ + virtual void TicklePowerManager ( void ) = 0; + + /*! + @function TicklePowerManager(UInt32 maxPowerState) + @abstract The TicklePowerManager(UInt32 maxPowerState) method is a convenience + function which can be called by subclasses in TicklePowerManager (void) + in order to tell the power manager to reset idle timer or bring the device + into the requested state. It returns whatever is returned by activityTickle + (true if device is in the requested state, false if it is not). + @discussion The TicklePowerManager(UInt32 maxPowerState) method is a convenience + function which can be called by subclasses in TicklePowerManager(void) + in order to tell the power manager to reset idle timer or bring the device + into the requested state. It returns whatever is returned by activityTickle + (true if device is in the requested state, false if it is not). + @param maxPowerState The maximum power state in the power state array. + @result The result of the call to activityTickle(). See IOService.h for details. + */ + bool TicklePowerManager ( UInt32 maxPowerState ); + + // ------ User Client Support ------ + + bool fUserClientExclusiveControlled; + IOService * fUserClient; + + /*! + @function sGetUserClientExclusivityState + @abstract The sGetUserClientExclusivityState method is a static function used as C->C++ glue + for going behind the command gate. + @discussion The sGetUserClientExclusivityState method is a static function used as C->C++ glue + for going behind the command gate. + @param self The 'this' pointer for the class. + @param state A pointer to a bool in which the state should be set. + */ + static void sGetUserClientExclusivityState ( IOSCSIProtocolInterface * self, bool * state ); + + /*! + @function sSetUserClientExclusivityState + @abstract The sSetUserClientExclusivityState method is a static function used as C->C++ glue + for going behind the command gate. + @discussion The sSetUserClientExclusivityState method is a static function used as C->C++ glue + for going behind the command gate. + @param self The 'this' pointer for the class. + @param result A pointer to an IOReturn for the resulting status. + @param userClient The instance of SCSITaskUserClient for which to change exclusivity state. + @param state A bool indicating the desired state to set. + */ + static void sSetUserClientExclusivityState ( IOSCSIProtocolInterface * self, IOReturn * result, IOService * userClient, bool state ); + + /*! + @function HandleGetUserClientExclusivityState + @abstract Gets the current exclusivity state of the user client. + @discussion The HandleGetUserClientExclusivityState() method is called on the serialized side + of the command gate to determine if any user client is holding exclusive access at the current + time. See discussion for GetUserClientExclusivityState(). + Subclasses may override this method to alter default behavior. Third party subclasses should + not need to override this method. + @result <code>true</code> if a user client is in exclusive control of the device, <code>false</code> otherwise. + */ + virtual bool HandleGetUserClientExclusivityState ( void ); + + /*! + @function HandleSetUserClientExclusivityState + @abstract Sets the current exclusivity state of the user client. + @discussion The HandleSetUserClientExclusivityState() method is called on the serialized side + of the command gate to set the exclusive access mode. + @param userClient The instance of SCSITaskUserClient for which to change exclusivity state. + @param state Exclusivity state. <code>true</code> means exclusive access is desired, <code>false</code> + means exclusive access is being released. + @result A valid IOReturn code indicating success or the type of failure. + */ + virtual IOReturn HandleSetUserClientExclusivityState ( IOService * userClient, bool state ); + +public: + + // ------- SCSI Architecture Model Task Management Functions ------ + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 1 ); + /*! + @function AbortTask + @abstract Aborts a task based on the Logical Unit and tagged task identifier. + @discussion Aborts a task based on the Logical Unit and tagged task identifier. + Subclasses must override this method. Third party subclasses should not need to override + this method. + @param theLogicalUnit This value should be zero unless the device driver is + more complex and managing multiple Logical Units. + @param theTag A valid SCSITaggedTaskIdentifier representing an outstanding SCSITask. + @result A valid SCSIServiceResponse code. + */ + virtual SCSIServiceResponse AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ) = 0; + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 2 ); + /*! + @function AbortTaskSet + @abstract Aborts a task set based on the Logical Unit. + @discussion Aborts a task set based on the Logical Unit. + Subclasses must override this method. Third party subclasses should not need to override + this method. + @param theLogicalUnit This value should be zero unless the device driver is + more complex and managing multiple Logical Units. + @result A valid SCSIServiceResponse code. + */ + virtual SCSIServiceResponse AbortTaskSet ( UInt8 theLogicalUnit ) = 0; + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 3 ); + /*! + @function ClearACA + @abstract Clears an Auto-Contingent Allegiance (ACA) for the specified Logical Unit. + @discussion Clears an Auto-Contingent Allegiance (ACA) for the specified Logical Unit. + Subclasses must override this method. Third party subclasses should not need to override + this method. + @param theLogicalUnit This value should be zero unless the device driver is + more complex and managing multiple Logical Units. + @result A valid SCSIServiceResponse code. + */ + virtual SCSIServiceResponse ClearACA ( UInt8 theLogicalUnit ) = 0; + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 4 ); + /*! + @function ClearTaskSet + @abstract Clears a task set for the specified Logical Unit. + @discussion Clears a task set for the specified Logical Unit. + Subclasses must override this method. Third party subclasses should not need to override + this method. + @param theLogicalUnit This value should be zero unless the device driver is + more complex and managing multiple Logical Units. + @result A valid SCSIServiceResponse code. + */ + virtual SCSIServiceResponse ClearTaskSet ( UInt8 theLogicalUnit ) = 0; + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 5 ); + /*! + @function LogicalUnitReset + @abstract Resets the specified Logical Unit. + @discussion Resets the specified Logical Unit. + Subclasses must override this method. Third party subclasses should not need to override + this method. + @param theLogicalUnit This value should be zero unless the device driver is + more complex and managing multiple Logical Units. + @result A valid SCSIServiceResponse code. + */ + virtual SCSIServiceResponse LogicalUnitReset ( UInt8 theLogicalUnit ) = 0; + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 6 ); + + /*! + @function TargetReset + @abstract Resets the target device. + @discussion Resets the target device. + Subclasses must override this method. Third party subclasses should not need to override + this method. + @result A valid SCSIServiceResponse code. + */ + virtual SCSIServiceResponse TargetReset ( void ) = 0; + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 8 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 9 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 10 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 11 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 12 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 16 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_PROTOCOL_INTERFACE_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIProtocolServices.h b/i386/include/IOKit/scsi/IOSCSIProtocolServices.h new file mode 100644 index 0000000..6b9df79 --- /dev/null +++ b/i386/include/IOKit/scsi/IOSCSIProtocolServices.h @@ -0,0 +1,362 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_SCSI_PROTOCOL_SERVICES_H_ +#define _IOKIT_IO_SCSI_PROTOCOL_SERVICES_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// Mach includes +#include <kern/queue.h> + +// General IOKit headers +#include <IOKit/IOLib.h> +#include <IOKit/IOCommandGate.h> + +// SCSI Architecture Model Family includes +#include <IOKit/scsi/SCSITask.h> +#include <IOKit/scsi/IOSCSIProtocolInterface.h> +#include <IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h> + + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + +// Power Management values +enum +{ + kSCSIProtocolLayerPowerStateOff = 0, + kSCSIProtocolLayerPowerStateOn = 1, + kSCSIProtocolLayerNumDefaultStates = 2 +}; + +// Forward definitions of internal use only classes +class SCSITask; + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIProtocolServices : public IOSCSIProtocolInterface +{ + + OSDeclareAbstractStructors ( IOSCSIProtocolServices ) + +private: + + // The head pointer for the queue of waiting SCSI Tasks. + SCSITask * fSCSITaskQueueHead; /* OBSOLETE */ + + // This is the lock for preventing multiple access while + // manipulating the SCSI Task queue. + IOSimpleLock * fQueueLock; + + // The internal flag to indicate whether service requests should be + // executed or immediately errored, such as when a device is removed. + bool fAllowServiceRequests; + +protected: + + // Reserve space for future expansion. + struct IOSCSIProtocolServicesExpansionData + { + // For internal use only. Do not use. + UInt32 fSemaphore; + bool fRequiresAutosenseDescriptor; + SCSITaskCompletion fCompletionRoutine; + queue_head_t fTaskQueueHead; + queue_head_t fAutoSenseQueueHead; + }; + IOSCSIProtocolServicesExpansionData * fIOSCSIProtocolServicesReserved; + + // ---- Protocol transport methods overridden by each subclass ---- + + // Send a SCSI Command to the device. If the command was sent to the + // device and is pending completion, the subclass should return true and + // return back the kSCSIServiceResponse_Request_In_Process response. + // If the command completes immediately with an error, the subclass will + // return true and return back the appropriate status. + // if the subclass is currently processing all the commands it can, the + // subclass will return false and the command will be resent next time + // CommandCompleted is called. + virtual bool SendSCSICommand ( SCSITaskIdentifier request, + SCSIServiceResponse * serviceResponse, + SCSITaskStatus * taskStatus ) = 0; + + virtual SCSIServiceResponse AbortSCSICommand ( SCSITaskIdentifier request ) = 0; + + // ---- Command completion notification method --------- + // Subclasses will call this inherited method when the command + // executed by SendSCSICommand has completed. + // The subclasses will return a service response that is derived + // from protocol specific status information and as specified in + // the specification for that protocol. + // If the service response is kSCSIServiceResponse_TASK_COMPLETE, + // the subclass will also return a SCSI status value. + void CommandCompleted ( SCSITaskIdentifier request, + SCSIServiceResponse serviceResponse, + SCSITaskStatus taskStatus ); + + // ---- Utility methods for accessing SCSITask attributes ---- + // Method for retreiving the attribute for a task. + SCSITaskAttribute GetTaskAttribute ( SCSITaskIdentifier request ); + + bool SetTaskState ( SCSITaskIdentifier request, + SCSITaskState newTaskState ); + SCSITaskState GetTaskState ( SCSITaskIdentifier request ); + + UInt8 GetLogicalUnitNumber ( SCSITaskIdentifier request ); + + // Method to determine the size of the command descriptor block. + UInt8 GetCommandDescriptorBlockSize ( SCSITaskIdentifier request ); + + // This will always return the define max CDB size. If the Protocol Layer + // driver only supports a smaller size CDB, it will have to create a local + // SCSICommandDescriptorBlock variable to get the CDB data and then + // transfer the needed bytes from there. + bool GetCommandDescriptorBlock ( SCSITaskIdentifier request, + SCSICommandDescriptorBlock * cdbData ); + + // Get the transfer direction for the request. + UInt8 GetDataTransferDirection ( SCSITaskIdentifier request ); + + UInt64 GetRequestedDataTransferCount ( SCSITaskIdentifier request ); + + bool SetRealizedDataTransferCount ( SCSITaskIdentifier request, + UInt64 newRealizedDataCount ); + + UInt64 GetRealizedDataTransferCount ( SCSITaskIdentifier request ); + + IOMemoryDescriptor * GetDataBuffer ( SCSITaskIdentifier request ); + + UInt64 GetDataBufferOffset ( SCSITaskIdentifier request ); + + UInt32 GetTimeoutDuration ( SCSITaskIdentifier request ); + + UInt64 GetAutosenseRequestedDataTransferCount ( SCSITaskIdentifier request ); + + // Set the auto sense data that was returned for the SCSI Task. + // A return value of true indicates that the data was copied to the member + // sense data structure, false indicates that the data could not be copied. + bool SetAutoSenseData ( SCSITaskIdentifier request, + SCSI_Sense_Data * senseData ); // DEPRECATED, use the one on the line below. + + bool SetAutoSenseData ( SCSITaskIdentifier request, + SCSI_Sense_Data * senseData, + UInt8 senseDataSize ); + + void EnsureAutosenseDescriptorExists ( SCSITaskIdentifier request ); + + bool SetProtocolLayerReference ( + SCSITaskIdentifier request, + void * newReferenceValue ); + void * GetProtocolLayerReference ( SCSITaskIdentifier request ); + + + bool SetTaskExecutionMode ( + SCSITaskIdentifier request, + SCSITaskMode newTaskMode ); + SCSITaskMode GetTaskExecutionMode ( SCSITaskIdentifier request ); + + // ---- Method calls for messaging device connectedness ---- + void SendNotification_DeviceRemoved ( void ); + + void SendNotification_VerifyDeviceState ( void ); + + // -- SCSI Task Queue Management Methods -- + // Following are the commands used to manipulate the queue of pending SCSI Tasks. + + // Add the SCSI Task to the queue. The Task's Attribute determines where in + // the queue the Task is placed. + void AddSCSITaskToQueue ( SCSITaskIdentifier request ); + + // Add the SCSI Task to the head of the queue. This is used when the task + // has been removed from the head of the queue, but the subclass indicates + // that it can not yet process this task. + void AddSCSITaskToHeadOfQueue ( SCSITask * request ); + + // Remove the next SCSI Task for the queue and return it. + SCSITask * RetrieveNextSCSITaskFromQueue ( void ); + + // Check to see if the SCSI Task resides in the queue and abort it if it does. + bool AbortSCSITaskFromQueue ( SCSITask * request ); + + // Methods for sending and completing SCSI tasks + void SendSCSITasksFromQueue ( void ); + + void RejectSCSITasksCurrentlyQueued ( void ); + + void ProcessCompletedTask ( SCSITaskIdentifier request, + SCSIServiceResponse serviceResponse, + SCSITaskStatus taskStatus ); + void RejectTask ( SCSITaskIdentifier request ); + + // ------ Power Management Support ------ + + // The InitializePowerManagement method is called to initialize power management. + // In the protocol services layer, this method calls the protocol interface layer + // to initialize power management state variables and then registers the protocol + // layer driver with the power manager with two(2) states, ON and OFF. + virtual void InitializePowerManagement ( IOService * provider ); + + // The GetInitialPowerState method is called once, right after InitializePowerManagement() + // in order to determine what state the device is initially in at startup time (usually + // the highest power mode). + virtual UInt32 GetInitialPowerState ( void ); + + // The HandlePowerChange method is pure virtual and is left to each protocol or + // application layer driver to implement. It is guaranteed to be called on its + // own thread of execution and can make synchronous or asynchronous calls. + virtual void HandlePowerChange ( void ); + + // The HandleCheckPowerState (void) method is on the serialized side of the command + // gate and can change member variables safely without multi-threading issues. + // It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) + // with the max power state the class registered with. + virtual void HandleCheckPowerState ( void ); + + // The TicklePowerManager ( void ) method is called by CheckPowerState and + // sends an activity tickle to the power manager so that the idle timer is + // reset. + virtual void TicklePowerManager ( void ); + + // The HandlePowerOff method is called to do any bus specific activity + // necessary before shutting down and going to sleep. + virtual IOReturn HandlePowerOff ( void ); + + // The HandlePowerOn method is called to do any bus specific activity + // necessary to recover from power-on/wake from sleep (e.g. bus reset on ATAPI) + virtual IOReturn HandlePowerOn ( void ); + +public: + + virtual bool start ( IOService * provider ); + virtual void free ( void ); + + void RegisterSCSITaskCompletionRoutine ( SCSITaskCompletion completion ); + + // ------- SCSI Architecture Model Task Management Functions ------ + // The ExecuteCommand method will take a SCSI Task and transport + // it across the physical wire(s) to the device + void ExecuteCommand ( SCSITaskIdentifier request ); + + // The Task Management function to allow the SCSI Application Layer client to request + // that a specific task be aborted. + SCSIServiceResponse AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ); + + // The Task Management function to allow the SCSI Application Layer client to request + // that a all tasks curerntly in the task set be aborted. + SCSIServiceResponse AbortTaskSet ( UInt8 theLogicalUnit ); + + SCSIServiceResponse ClearACA ( UInt8 theLogicalUnit ); + + SCSIServiceResponse ClearTaskSet ( UInt8 theLogicalUnit ); + + SCSIServiceResponse LogicalUnitReset ( UInt8 theLogicalUnit ); + + SCSIServiceResponse TargetReset ( void ); + + // ************* Obsoleted Member Routine **************** + // The AbortCommand method is replaced by the AbortTask Management function and + // should no longer be called. + virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier request ); + + + // ---- Method used for determining protocol or physical interconnect characteristics. ---- + // The IsProtocolServiceSupported will return true if the specified + // feature is supported by the protocol layer. If the service has a value that must be + // returned, it will be returned in the serviceValue output parameter. + virtual bool IsProtocolServiceSupported ( SCSIProtocolFeature feature, void * serviceValue ) = 0; + + // The HandleProtocolServiceFeature instructs the Protocol Services driver to perform the necessary + // tasks for the indicated feature. + virtual bool HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void * serviceValue ) = 0; + +protected: + + // ----- Protocol Services Driver request handlers for Task Management functions ----- + // These should be abstract so that every Protocol Services Driver would have to + // override them, but since they are new member routines, this class will provide + // a default implementation. + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 1 ); + virtual SCSIServiceResponse HandleAbortTask ( + UInt8 theLogicalUnit, + SCSITaggedTaskIdentifier theTag ); + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 2 ); + virtual SCSIServiceResponse HandleAbortTaskSet ( + UInt8 theLogicalUnit ); + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 3 ); + virtual SCSIServiceResponse HandleClearACA ( + UInt8 theLogicalUnit ); + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 4 ); + virtual SCSIServiceResponse HandleClearTaskSet ( + UInt8 theLogicalUnit ); + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 5 ); + virtual SCSIServiceResponse HandleLogicalUnitReset ( + UInt8 theLogicalUnit ); + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 6 ); + // The HandleTargetReset member routine requests that the Protocol Services Driver + // perform the necessary steps detailed in the specification that defines the + // protocol the driver represents for the TargetReset management function. + virtual SCSIServiceResponse HandleTargetReset ( void ); + + + OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 7 ); + // The CreateSCSITargetDevice member routine will create the appropriate object + // to represent the Target portion of a SCSI Device. This object is responsible + // for managing the Target functions of the SCSI Device including the Task Manager and + // Logical Units. + // If the SCSITargetDevice object was successfully created, a true value will be + // returned, otherwisw, this will return false. + virtual bool CreateSCSITargetDevice ( void ); + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 8 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 9 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 10 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 11 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 12 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 16 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_PROTOCOL_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIReducedBlockCommandsDevice.h b/i386/include/IOKit/scsi/IOSCSIReducedBlockCommandsDevice.h new file mode 100644 index 0000000..955fd6e --- /dev/null +++ b/i386/include/IOKit/scsi/IOSCSIReducedBlockCommandsDevice.h @@ -0,0 +1,438 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_SCSI_REDUCED_BLOCK_COMMANDS_DEVICE_H_ +#define _IOKIT_IO_SCSI_REDUCED_BLOCK_COMMANDS_DEVICE_H_ + +#if defined(KERNEL) && defined(__cplusplus) + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// General IOKit headers +#include <IOKit/IOLib.h> +#include <IOKit/IOMemoryDescriptor.h> + +// Generic IOKit storage related headers +#include <IOKit/storage/IOStorage.h> + +// SCSI Architecture Model Family includes +#include <IOKit/scsi/IOSCSIPrimaryCommandsDevice.h> + + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + + +// RBC power states as defined in T10:1240D SCSI Reduced Block Commands (RBC) +// Revision 10a, August 18, 1999, page 13. +enum +{ + kRBCPowerStateSystemSleep = 0, + kRBCPowerStateSleep = 1, + kRBCPowerStateStandby = 2, + kRBCPowerStateIdle = 3, + kRBCPowerStateActive = 4, + kRBCNumPowerStates = 5 +}; + +enum +{ + kMediaStateUnlocked = 0, + kMediaStateLocked = 1 +}; + +#define kCapacityDataBufferSize 8 + +// Forward declaration for the SCSIReducedBlockCommands that is used internally by the +// IOSCSIReducedBlockCommandsDevice class. +class SCSIReducedBlockCommands; + +//----------------------------------------------------------------------------- +// Class Declaration +//----------------------------------------------------------------------------- + +class IOSCSIReducedBlockCommandsDevice : public IOSCSIPrimaryCommandsDevice +{ + + OSDeclareAbstractStructors ( IOSCSIReducedBlockCommandsDevice ); + +private: + +#ifndef __LP64__ + + SCSIReducedBlockCommands * fSCSIReducedBlockCommandObject; + SCSIReducedBlockCommands * GetSCSIReducedBlockCommandObject ( void ); + +#endif /* !__LP64__ */ + + static void AsyncReadWriteComplete ( SCSITaskIdentifier completedTask ); + +protected: + + // Reserve space for future expansion. + struct IOSCSIReducedBlockCommandsDeviceExpansionData + { + IONotifier * fPowerDownNotifier; + bool fMediumRemovalPrevented; + bool fKnownManualEject; + UInt32 fPollingMode; + bool fProtocolSpecificPowerControl; + }; + IOSCSIReducedBlockCommandsDeviceExpansionData * fIOSCSIReducedBlockCommandsDeviceReserved; + + #define fPowerDownNotifier fIOSCSIReducedBlockCommandsDeviceReserved->fPowerDownNotifier + #define fMediumRemovalPrevented fIOSCSIReducedBlockCommandsDeviceReserved->fMediumRemovalPrevented + #define fKnownManualEject fIOSCSIReducedBlockCommandsDeviceReserved->fKnownManualEject + #define fPollingMode fIOSCSIReducedBlockCommandsDeviceReserved->fPollingMode + #define fProtocolSpecificPowerControl fIOSCSIReducedBlockCommandsDeviceReserved->fProtocolSpecificPowerControl + + bool fMediaChanged; + bool fMediaPresent; + + // The byte count of each physical block on the media. + UInt32 fMediaBlockSize; + + // The total number of blocks of mediaBlockSize on the media. + UInt32 fMediaBlockCount; + + // Flags used to indicate device feature + bool fMediaIsRemovable; + bool fMediaIsWriteProtected; + + thread_call_t fPollingThread; + + enum + { + kPollingMode_Suspended = 0, + kPollingMode_NewMedia = 1, + kPollingMode_MediaRemoval = 2 + }; + + virtual void CreateStorageServiceNub ( void ); + virtual bool DetermineDeviceCharacteristics ( void ); + virtual void PollForMedia ( void ); + virtual void EnablePolling ( void ); + virtual void DisablePolling ( void ); + virtual void CheckWriteProtection ( void ); + virtual void SetMediaCharacteristics ( UInt32 blockSize, UInt32 blockCount ); + virtual void ResetMediaCharacteristics ( void ); + virtual bool ClearNotReadyStatus ( void ); + + virtual IOReturn IssueRead ( IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueWrite ( IOMemoryDescriptor* buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueRead ( IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + void * clientData ); + + virtual IOReturn IssueWrite ( IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + void * clientData ); + +#ifndef __LP64__ + + // This method will retreive the SCSI Primary Command Set object for + // the class. For subclasses, this will be overridden using a + // dynamic cast on the subclasses base command set object. + virtual SCSIPrimaryCommands * GetSCSIPrimaryCommandObject ( void ); + +#endif /* !__LP64__ */ + + // ----- Power Management Support ------ + + // We override this method to set our power states and register ourselves + // as a power policy maker. + virtual void InitializePowerManagement ( IOService * provider ); + + // We override this method so that when we register for power management, + // we go to our active power state (which the drive is definitely in + // at startup time). + virtual UInt32 GetInitialPowerState ( void ); + + // We override this method in order to provide the number of transitions + // from Fully active to Sleep state so that the idle timer can be adjusted + // to the appropriate time period based on the disk spindown time set in + // the Energy Saver prefs panel. + virtual UInt32 GetNumberOfPowerStateTransitions ( void ); + + // The TicklePowerManager method is called to tell the power manager that the + // device needs to be in a certain power state to handle requests. + virtual void TicklePowerManager ( void ); + + // The HandlePowerChange method is the state machine for power management. + // It is guaranteed to be on its own thread of execution (different from + // the power manager thread AND the workloop thread. This routine can + // send sync or async calls to the drive without worrying about threading + // issues. + virtual void HandlePowerChange ( void ); + + // The HandleCheckPowerState (void) method is on the serialized side of the command + // gate and can change member variables safely without multi-threading issues. + // It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) + // with the max power state the class registered with. + virtual void HandleCheckPowerState ( void ); + + // The CheckMediaPresence method is called to see if the media which we + // anticipated being there is still there. + virtual bool CheckMediaPresence ( void ); + + virtual bool InitializeDeviceSupport ( void ); + virtual void StartDeviceSupport ( void ); + virtual void SuspendDeviceSupport ( void ); + virtual void ResumeDeviceSupport ( void ); + virtual void StopDeviceSupport ( void ); + virtual void TerminateDeviceSupport ( void ); + + virtual void free ( void ); + +#ifndef __LP64__ + + virtual bool CreateCommandSetObjects ( void ); + virtual void FreeCommandSetObjects ( void ); + +#endif /* !__LP64__ */ + +public: + + virtual IOReturn SyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn AsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + void * clientData ); + + + virtual IOReturn EjectTheMedia ( void ); + virtual IOReturn FormatMedia ( UInt64 byteCapacity ); + virtual UInt32 GetFormatCapacities ( UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + virtual IOReturn LockUnlockMedia ( bool doLock ); + virtual IOReturn SynchronizeCache ( void ); + virtual IOReturn ReportBlockSize ( UInt64 * blockSize ); + virtual IOReturn ReportEjectability ( bool * isEjectable ); + virtual IOReturn ReportLockability ( bool * isLockable ); + virtual IOReturn ReportPollRequirements ( bool * pollIsRequired, + bool * pollIsExpensive ); + virtual IOReturn ReportMaxReadTransfer ( UInt64 blockSize, + UInt64 * max ); + virtual IOReturn ReportMaxValidBlock ( UInt64 * maxBlock ); + virtual IOReturn ReportMaxWriteTransfer ( UInt64 blockSize, + UInt64 * max ); + virtual IOReturn ReportMediaState ( bool * mediaPresent, + bool * changed ); + virtual IOReturn ReportRemovability ( bool * isRemovable ); + virtual IOReturn ReportWriteProtection ( bool * isWriteProtected ); + + static void sPollForMedia ( void * pdtDriver, void * refCon ); + + +protected: + + + // The FORMAT_UNIT command as defined in section 5.1 + virtual bool FORMAT_UNIT ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField1Bit PROGRESS, + SCSICmdField1Bit PERCENT_TIME, + SCSICmdField1Bit INCREMENT ); + + // The INQUIRY command as defined in SPC-2 w/o CONTROL byte + virtual bool INQUIRY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit CMDDT, + SCSICmdField1Bit EVPD, + SCSICmdField1Byte PAGE_OR_OPERATION_CODE, + SCSICmdField1Byte ALLOCATION_LENGTH ); + + // The MODE_SELECT(6) command as defined in SPC-2 w/o CONTROL byte + virtual bool MODE_SELECT_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit PF, + SCSICmdField1Bit SP, + SCSICmdField1Byte PARAMETER_LIST_LENGTH ); + + // The MODE_SENSE(6) command as defined in SPC-2 w/o CONTROL byte + virtual bool MODE_SENSE_6 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit DBD, + SCSICmdField2Bit PC, + SCSICmdField6Bit PAGE_CODE, + SCSICmdField1Byte ALLOCATION_LENGTH ); + + // The PERSISTENT_RESERVE_IN command as defined in SPC-2 w/o CONTROL byte + virtual bool PERSISTENT_RESERVE_IN ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField5Bit SERVICE_ACTION, + SCSICmdField2Byte ALLOCATION_LENGTH ); + + // The PERSISTENT_RESERVE_OUT command as defined in SPC-2 w/o CONTROL byte + virtual bool PERSISTENT_RESERVE_OUT ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField5Bit SERVICE_ACTION, + SCSICmdField4Bit SCOPE, + SCSICmdField4Bit TYPE ); + + // The PREVENT_ALLOW_MEDIUM_REMOVAL command as defined in SPC-2 w/o CONTROL byte + virtual bool PREVENT_ALLOW_MEDIUM_REMOVAL ( + SCSITaskIdentifier request, + SCSICmdField2Bit PREVENT ); + + // The READ_10 command as defined in section 5.2 + virtual bool READ_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH ); + + // The READ_CAPACITY command as defined in section 5.3 + virtual bool READ_CAPACITY ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer ); + + // The RELEASE(6) command as defined in SPC-2 w/o CONTROL byte + virtual bool RELEASE_6 ( + SCSITaskIdentifier request ); + + // The REQUEST_SENSE command as defined in SPC-2 w/o CONTROL byte + virtual bool REQUEST_SENSE ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Byte ALLOCATION_LENGTH ); + + // The RESERVE(6) command as defined in SPC-2 w/o CONTROL byte + virtual bool RESERVE_6 ( + SCSITaskIdentifier request ); + + // The START_STOP_UNIT command as defined in section 5.4 + virtual bool START_STOP_UNIT ( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField4Bit POWER_CONDITIONS, + SCSICmdField1Bit LEOJ, + SCSICmdField1Bit START ); + + // The SYNCRONIZE_CACHE command as defined in section 5.5 + virtual bool SYNCHRONIZE_CACHE ( + SCSITaskIdentifier request ); + + // The TEST_UNIT_READY command as defined in SPC-2 w/o CONTROL byte + virtual bool TEST_UNIT_READY ( + SCSITaskIdentifier request ); + + // The VERIFY command as defined in section 5.7 + virtual bool VERIFY ( + SCSITaskIdentifier request, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte VERIFICATION_LENGTH ); + + // The WRITE_10 command as defined in section 5.6 + virtual bool WRITE_10 ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit FUA, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH ); + + // The WRITE_BUFFER command as defined in SPC-2 w/o CONTROL byte + virtual bool WRITE_BUFFER ( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField4Bit MODE, + SCSICmdField1Byte BUFFER_ID, + SCSICmdField3Byte BUFFER_OFFSET, + SCSICmdField3Byte PARAMETER_LIST_LENGTH ); + + + + /* Added with 10.2 */ + OSMetaClassDeclareReservedUsed ( IOSCSIReducedBlockCommandsDevice, 1 ); + +public: + + virtual IOReturn PowerDownHandler ( void * refCon, + UInt32 messageType, + IOService * provider, + void * messageArgument, + vm_size_t argSize ); + + + /* Added with 10.2 */ + OSMetaClassDeclareReservedUsed ( IOSCSIReducedBlockCommandsDevice, 2 ); + +protected: + + virtual void SetMediaIcon ( void ); + + + /* Added with 10.3.3 */ + OSMetaClassDeclareReservedUsed ( IOSCSIReducedBlockCommandsDevice, 3 ); + +protected: + + virtual void AsyncReadWriteCompletion ( SCSITaskIdentifier completedTask ); + + +private: + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 8 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 9 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 10 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 11 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 12 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 16 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_SCSI_REDUCED_BLOCK_COMMANDS_DEVICE_H_ */ diff --git a/i386/include/IOKit/scsi/SCSICmds_INQUIRY_Definitions.h b/i386/include/IOKit/scsi/SCSICmds_INQUIRY_Definitions.h new file mode 100644 index 0000000..55a6a4c --- /dev/null +++ b/i386/include/IOKit/scsi/SCSICmds_INQUIRY_Definitions.h @@ -0,0 +1,923 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_SCSI_CMDS_INQUIRY_H_ +#define _IOKIT_SCSI_CMDS_INQUIRY_H_ + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +#if KERNEL +#include <IOKit/IOTypes.h> +#else +#include <CoreFoundation/CoreFoundation.h> +#endif + + +/*! @header SCSI Inquiry Definitions + @discussion + This file contains all definitions for the data returned from + the INQUIRY (0x12) command. +*/ + + +/*! + * @enum Payload sizes + * @discussion + * Definitions for sizes related to the INQUIRY data. + * @constant kINQUIRY_StandardDataHeaderSize + * INQUIRY data header size. + * @constant kINQUIRY_MaximumDataSize + * Maximum size for INQUIRY data. +*/ +enum +{ + kINQUIRY_StandardDataHeaderSize = 5, + kINQUIRY_MaximumDataSize = 255 +}; + + +/*! +@enum INQUIRY field sizes +@discussion +Sizes for some of the inquiry data fields. +@constant kINQUIRY_VENDOR_IDENTIFICATION_Length +Size of VENDOR_IDENTIFICATION field. +@constant kINQUIRY_PRODUCT_IDENTIFICATION_Length +Size of PRODUCT_IDENTIFICATION field. +@constant kINQUIRY_PRODUCT_REVISION_LEVEL_Length +Size of PRODUCT_REVISION_LEVEL field. +*/ +enum +{ + kINQUIRY_VENDOR_IDENTIFICATION_Length = 8, + kINQUIRY_PRODUCT_IDENTIFICATION_Length = 16, + kINQUIRY_PRODUCT_REVISION_LEVEL_Length = 4 +}; + + +/*! +@struct SCSICmd_INQUIRY_StandardData +@discussion +This structure defines the format of the required standard data that is +returned for the INQUIRY command. This is the data that is required to +be returned from all devices. +*/ +typedef struct SCSICmd_INQUIRY_StandardData +{ + UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. + UInt8 RMB; // 7 = removable + UInt8 VERSION; // 7/6 = ISO/IEC, 5-3 = ECMA, 2-0 = ANSI. + UInt8 RESPONSE_DATA_FORMAT; // 7 = AERC, 6 = Obsolete, 5 = NormACA, 4 = HiSup 3-0 = Response data format. (SPC-3 obsoletes AERC) + // If ANSI Version = 0, this is ATAPI and bits 7-4 = ATAPI version. + UInt8 ADDITIONAL_LENGTH; // Number of additional bytes available in inquiry data + UInt8 SCCSReserved; // SCC-2 device flag and reserved fields (SPC-3 adds PROTECT 3PC TPGS, and ACC) + UInt8 flags1; // First byte of support flags (See SPC-3 section 6.4.2) + UInt8 flags2; // Second byte of support flags (Byte 7) (See SPC-3 section 6.4.2) + char VENDOR_IDENTIFICATION[kINQUIRY_VENDOR_IDENTIFICATION_Length]; + char PRODUCT_IDENTIFICATION[kINQUIRY_PRODUCT_IDENTIFICATION_Length]; + char PRODUCT_REVISION_LEVEL[kINQUIRY_PRODUCT_REVISION_LEVEL_Length]; +} SCSICmd_INQUIRY_StandardData; +typedef SCSICmd_INQUIRY_StandardData * SCSICmd_INQUIRY_StandardDataPtr; + + +/*! +@struct SCSICmd_INQUIRY_StandardDataAll +@discussion +This structure defines the all of the fields that can be returned in +repsonse to the INQUIRy request for the standard data. There is no +requirement as to how much of the additional data must be returned by a device. +*/ +typedef struct SCSICmd_INQUIRY_StandardDataAll +{ + UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. + UInt8 RMB; // 7 = removable + UInt8 VERSION; // 7/6 = ISO/IEC, 5-3 = ECMA, 2-0 = ANSI. + UInt8 RESPONSE_DATA_FORMAT; // 7 = AERC, 6 = Obsolete, 5 = NormACA, 4 = HiSup 3-0 = Response data format. + // If ANSI Version = 0, this is ATAPI and bits 7-4 = ATAPI version. + UInt8 ADDITIONAL_LENGTH; // Number of additional bytes available in inquiry data + UInt8 SCCSReserved; // SCC-2 device flag and reserved fields + UInt8 flags1; // First byte of support flags (Byte 6) + UInt8 flags2; // Second byte of support flags (Byte 7) + char VENDOR_IDENTIFICATION[kINQUIRY_VENDOR_IDENTIFICATION_Length]; + char PRODUCT_IDENTIFICATION[kINQUIRY_PRODUCT_IDENTIFICATION_Length]; + char PRODUCT_REVISION_LEVEL[kINQUIRY_PRODUCT_REVISION_LEVEL_Length]; + + // Following is the optional data that may be returned by a device. + UInt8 VendorSpecific1[20]; + UInt8 flags3; // Third byte of support flags, mainly SPI-3 (Byte 56) + UInt8 Reserved1; + UInt16 VERSION_DESCRIPTOR[8]; + UInt8 Reserved2[22]; + UInt8 VendorSpecific2[160]; +} SCSICmd_INQUIRY_StandardDataAll; + + +/*! +@enum Peripheral Qualifier +@discussion +Inquiry Peripheral Qualifier definitions +@constant kINQUIRY_PERIPHERAL_QUALIFIER_Connected +Peripheral Device is connected. +@constant kINQUIRY_PERIPHERAL_QUALIFIER_SupportedButNotConnected +Peripheral Device is supported, but not connected. +@constant kINQUIRY_PERIPHERAL_QUALIFIER_NotSupported +Peripheral Device is not supported. +@constant kINQUIRY_PERIPHERAL_QUALIFIER_Mask +Mask to use for PERIPHERAL_DEVICE_TYPE field. +*/ +enum +{ + kINQUIRY_PERIPHERAL_QUALIFIER_Connected = 0x00, + kINQUIRY_PERIPHERAL_QUALIFIER_SupportedButNotConnected = 0x20, + kINQUIRY_PERIPHERAL_QUALIFIER_NotSupported = 0x60, + kINQUIRY_PERIPHERAL_QUALIFIER_Mask = 0xE0 +}; + + +/*! +@enum Peripheral Device types +@discussion +Inquiry Peripheral Device type definitions +@constant kINQUIRY_PERIPHERAL_TYPE_DirectAccessSBCDevice +SBC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_SequentialAccessSSCDevice +Sequential Access (Tape) SSC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_PrinterSSCDevice +SSC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_ProcessorSPCDevice +SPC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_WriteOnceSBCDevice +SBC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_CDROM_MMCDevice +MMC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_ScannerSCSI2Device +SCSI2 Device. +@constant kINQUIRY_PERIPHERAL_TYPE_OpticalMemorySBCDevice +SBC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_MediumChangerSMCDevice +SMC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_CommunicationsSSCDevice +Comms SSC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_StorageArrayControllerSCC2Device +SCC2 Device. +@constant kINQUIRY_PERIPHERAL_TYPE_EnclosureServicesSESDevice +SES Device. +@constant kINQUIRY_PERIPHERAL_TYPE_SimplifiedDirectAccessRBCDevice +RBC Device. +@constant kINQUIRY_PERIPHERAL_TYPE_OpticalCardReaderOCRWDevice +OCRW Device. +@constant kINQUIRY_PERIPHERAL_TYPE_ObjectBasedStorageDevice +OSD device. +@constant kINQUIRY_PERIPHERAL_TYPE_AutomationDriveInterface +Automation Drive Interface device. +@constant kINQUIRY_PERIPHERAL_TYPE_WellKnownLogicalUnit +Well known logical unit. +@constant kINQUIRY_PERIPHERAL_TYPE_UnknownOrNoDeviceType +Unknown or no device. +@constant kINQUIRY_PERIPHERAL_TYPE_Mask +Mask to use for PERIPHERAL_DEVICE_TYPE field. +*/ +enum +{ + kINQUIRY_PERIPHERAL_TYPE_DirectAccessSBCDevice = 0x00, + kINQUIRY_PERIPHERAL_TYPE_SequentialAccessSSCDevice = 0x01, + kINQUIRY_PERIPHERAL_TYPE_PrinterSSCDevice = 0x02, + kINQUIRY_PERIPHERAL_TYPE_ProcessorSPCDevice = 0x03, + kINQUIRY_PERIPHERAL_TYPE_WriteOnceSBCDevice = 0x04, + kINQUIRY_PERIPHERAL_TYPE_CDROM_MMCDevice = 0x05, + kINQUIRY_PERIPHERAL_TYPE_ScannerSCSI2Device = 0x06, + kINQUIRY_PERIPHERAL_TYPE_OpticalMemorySBCDevice = 0x07, + kINQUIRY_PERIPHERAL_TYPE_MediumChangerSMCDevice = 0x08, + kINQUIRY_PERIPHERAL_TYPE_CommunicationsSSCDevice = 0x09, + /* 0x0A - 0x0B ASC IT8 Graphic Arts Prepress Devices */ + kINQUIRY_PERIPHERAL_TYPE_StorageArrayControllerSCC2Device = 0x0C, + kINQUIRY_PERIPHERAL_TYPE_EnclosureServicesSESDevice = 0x0D, + kINQUIRY_PERIPHERAL_TYPE_SimplifiedDirectAccessRBCDevice = 0x0E, + kINQUIRY_PERIPHERAL_TYPE_OpticalCardReaderOCRWDevice = 0x0F, + /* 0x10 - 0x1E Reserved Device Types */ + kINQUIRY_PERIPHERAL_TYPE_ObjectBasedStorageDevice = 0x11, + kINQUIRY_PERIPHERAL_TYPE_AutomationDriveInterface = 0x12, + kINQUIRY_PERIPHERAL_TYPE_WellKnownLogicalUnit = 0x1E, + kINQUIRY_PERIPHERAL_TYPE_UnknownOrNoDeviceType = 0x1F, + + + kINQUIRY_PERIPHERAL_TYPE_Mask = 0x1F +}; + + +/*! +@enum Removable Bit field definitions +@discussion +Inquiry Removable Bit field definitions +@constant kINQUIRY_PERIPHERAL_RMB_MediumFixed +Medium type is fixed disk. +@constant kINQUIRY_PERIPHERAL_RMB_MediumRemovable +Medium type is removable disk. +@constant kINQUIRY_PERIPHERAL_RMB_BitMask +Mask to use for RMB field. +*/ +enum +{ + kINQUIRY_PERIPHERAL_RMB_MediumFixed = 0x00, + kINQUIRY_PERIPHERAL_RMB_MediumRemovable = 0x80, + kINQUIRY_PERIPHERAL_RMB_BitMask = 0x80 +}; + + +/*! +@enum Version field definitions +@discussion +Definitions for bits/masks in the INQUIRY Version field. +@constant kINQUIRY_ISO_IEC_VERSION_Mask +Mask for valid bits for ISO/IEC Version. +@constant kINQUIRY_ECMA_VERSION_Mask +Mask for valid bits for ECMA Version. +@constant kINQUIRY_ANSI_VERSION_NoClaimedConformance +No ANSI conformance claimed by the device server. +@constant kINQUIRY_ANSI_VERSION_SCSI_1_Compliant +SCSI-1 conformance claimed by the device server. +@constant kINQUIRY_ANSI_VERSION_SCSI_2_Compliant +SCSI-2 conformance claimed by the device server. +@constant kINQUIRY_ANSI_VERSION_SCSI_SPC_Compliant +SPC conformance claimed by the device server. +@constant kINQUIRY_ANSI_VERSION_SCSI_SPC_2_Compliant +SPC-2 conformance claimed by the device server. +@constant kINQUIRY_ANSI_VERSION_SCSI_SPC_3_Compliant +SPC-3 conformance claimed by the device server. +@constant kINQUIRY_ANSI_VERSION_Mask +Mask for valid bits for ANSI Version. +*/ +enum +{ + kINQUIRY_ISO_IEC_VERSION_Mask = 0xC0, + + kINQUIRY_ECMA_VERSION_Mask = 0x38, + + kINQUIRY_ANSI_VERSION_NoClaimedConformance = 0x00, + kINQUIRY_ANSI_VERSION_SCSI_1_Compliant = 0x01, + kINQUIRY_ANSI_VERSION_SCSI_2_Compliant = 0x02, + kINQUIRY_ANSI_VERSION_SCSI_SPC_Compliant = 0x03, + kINQUIRY_ANSI_VERSION_SCSI_SPC_2_Compliant = 0x04, + kINQUIRY_ANSI_VERSION_SCSI_SPC_3_Compliant = 0x05, + kINQUIRY_ANSI_VERSION_Mask = 0x07 +}; + + +/*! +@enum Response Data Format field definitions +@discussion +Definitions for bits/masks in the INQUIRY RESPONSE_DATA_FORMAT field. +@constant kINQUIRY_Byte3_HISUP_Bit +HISUP bit definition. +@constant kINQUIRY_Byte3_NORMACA_Bit +NORMACA bit definition. +@constant kINQUIRY_Byte3_AERC_Bit +AERC bit definition. +@constant kINQUIRY_RESPONSE_DATA_FORMAT_Mask +Mask for valid bits for RESPONSE_DATA_FORMAT. +@constant kINQUIRY_Byte3_HISUP_Mask +Mask to use to test the HISUP bit. +@constant kINQUIRY_Byte3_NORMACA_Mask +Mask to use to test the NORMACA bit. +@constant kINQUIRY_Byte3_AERC_Mask +Mask to use to test the AERC bit. +*/ +enum +{ + // Bit definitions + // Bits 0-3: RESPONSE DATA FORMAT + kINQUIRY_Byte3_HISUP_Bit = 4, + kINQUIRY_Byte3_NORMACA_Bit = 5, + // Bit 6 is Obsolete + kINQUIRY_Byte3_AERC_Bit = 7, + + // Masks + kINQUIRY_RESPONSE_DATA_FORMAT_Mask = 0x0F, // Bits 0-3 + kINQUIRY_Byte3_HISUP_Mask = (1 << kINQUIRY_Byte3_HISUP_Bit), + kINQUIRY_Byte3_NORMACA_Mask = (1 << kINQUIRY_Byte3_NORMACA_Bit), + // Bit 6 is Obsolete + kINQUIRY_Byte3_AERC_Mask = (1 << kINQUIRY_Byte3_AERC_Bit) +}; + + +/*! +@enum SCCS field definitions +@discussion +Definitions for bits/masks in the INQUIRY SCCSReserved field. +@constant kINQUIRY_Byte5_SCCS_Bit +SCCS bit definition. +@constant kINQUIRY_Byte5_ACC_Bit +ACC bit definition. +@constant kINQUIRY_Byte5_3PC_Bit +3PC bit definition. +@constant kINQUIRY_Byte5_PROTECT_Bit +PROTECT bit definition. +@constant kINQUIRY_Byte5_SCCS_Mask +Mask to use to test the SCCS bit. +@constant kINQUIRY_Byte5_ACC_Mask +Mask to use to test the ACC bit. +@constant kINQUIRY_Byte5_TPGS_Mask +Mask to use for the TPGS bits. +@constant kINQUIRY_Byte5_3PC_Mask +Mask to use to test the 3PC bit. +@constant kINQUIRY_Byte5_PROTECT_Mask +Mask to use to test the PROTECT bit. +*/ +enum +{ + // Bit definitions + kINQUIRY_Byte5_SCCS_Bit = 7, + kINQUIRY_Byte5_ACC_Bit = 6, + // Bits 4-5: TPGS + kINQUIRY_Byte5_3PC_Bit = 3, + // Bits 1-2: Reserved + kINQUIRY_Byte5_PROTECT_Bit = 0, + + // Masks + kINQUIRY_Byte5_SCCS_Mask = (1 << kINQUIRY_Byte5_SCCS_Bit), + kINQUIRY_Byte5_ACC_Mask = (1 << kINQUIRY_Byte5_ACC_Bit), + kINQUIRY_Byte5_TPGS_Mask = 0x18, + kINQUIRY_Byte5_3PC_Mask = (1 << kINQUIRY_Byte5_3PC_Bit), + // Bits 1-2: Reserved + kINQUIRY_Byte5_PROTECT_Mask = (1 << kINQUIRY_Byte5_PROTECT_Bit) +}; + + +/*! +@enum flags1 field definitions +@discussion +Definitions for bits/masks in the INQUIRY flags1 field. +@constant kINQUIRY_Byte6_ADDR16_Bit +ADDR16 bit definition. +@constant kINQUIRY_Byte6_MCHNGR_Bit +MCHNGR bit definition. +@constant kINQUIRY_Byte6_MULTIP_Bit +MULTIP bit definition. +@constant kINQUIRY_Byte6_VS_Bit +VS bit definition. +@constant kINQUIRY_Byte6_ENCSERV_Bit +ENCSERV bit definition. +@constant kINQUIRY_Byte6_BQUE_Bit +BQUE bit definition. +@constant kINQUIRY_Byte6_ADDR16_Mask +Mask to use to test the ADDR16 bit. +@constant kINQUIRY_Byte6_MCHNGR_Mask +Mask to use to test the MCHNGR bit. +@constant kINQUIRY_Byte6_MULTIP_Mask +Mask to use to test the MULTIP bit. +@constant kINQUIRY_Byte6_VS_Mask +Mask to use to test the VS bit. +@constant kINQUIRY_Byte6_ENCSERV_Mask +Mask to use to test the ENCSERV bit. +@constant kINQUIRY_Byte6_BQUE_Mask +Mask to use to test the BQUE bit. +*/ +enum +{ + // Byte offset + kINQUIRY_Byte6_Offset = 6, + + // Bit definitions + kINQUIRY_Byte6_ADDR16_Bit = 0, // SPI Specific + // Bit 1 is Obsolete + // Bit 2 is Obsolete + kINQUIRY_Byte6_MCHNGR_Bit = 3, + kINQUIRY_Byte6_MULTIP_Bit = 4, + kINQUIRY_Byte6_VS_Bit = 5, + kINQUIRY_Byte6_ENCSERV_Bit = 6, + kINQUIRY_Byte6_BQUE_Bit = 7, + + // Masks + kINQUIRY_Byte6_ADDR16_Mask = (1 << kINQUIRY_Byte6_ADDR16_Bit), // SPI Specific + // Bit 1 is Obsolete + // Bit 2 is Obsolete + kINQUIRY_Byte6_MCHNGR_Mask = (1 << kINQUIRY_Byte6_MCHNGR_Bit), + kINQUIRY_Byte6_MULTIP_Mask = (1 << kINQUIRY_Byte6_MULTIP_Bit), + kINQUIRY_Byte6_VS_Mask = (1 << kINQUIRY_Byte6_VS_Bit), + kINQUIRY_Byte6_ENCSERV_Mask = (1 << kINQUIRY_Byte6_ENCSERV_Bit), + kINQUIRY_Byte6_BQUE_Mask = (1 << kINQUIRY_Byte6_BQUE_Bit) +}; + + +/*! +@enum flags2 field definitions +@discussion +Definitions for bits/masks in the INQUIRY flags2 field. +@constant kINQUIRY_Byte7_VS_Bit +VS bit definition. +@constant kINQUIRY_Byte7_CMDQUE_Bit +CMDQUE bit definition. +@constant kINQUIRY_Byte7_TRANDIS_Bit +TRANDIS bit definition. +@constant kINQUIRY_Byte7_LINKED_Bit +LINKED bit definition. +@constant kINQUIRY_Byte7_SYNC_Bit +SYNC bit definition. +@constant kINQUIRY_Byte7_WBUS16_Bit +WBUS16 bit definition. +@constant kINQUIRY_Byte7_RELADR_Bit +RELADR bit definition. +@constant kINQUIRY_Byte7_VS_Mask +Mask to use to test the VS bit. +@constant kINQUIRY_Byte7_CMDQUE_Mask +Mask to use to test the CMDQUE bit. +@constant kINQUIRY_Byte7_TRANDIS_Mask +Mask to use to test the TRANDIS bit. +@constant kINQUIRY_Byte7_LINKED_Mask +Mask to use to test the LINKED bit. +@constant kINQUIRY_Byte7_SYNC_Mask +Mask to use to test the SYNC bit. +@constant kINQUIRY_Byte7_WBUS16_Mask +Mask to use to test the WBUS16 bit. +@constant kINQUIRY_Byte7_RELADR_Mask +Mask to use to test the RELADR bit. +*/ +enum +{ + // Byte offset + kINQUIRY_Byte7_Offset = 7, + + // Bit definitions + kINQUIRY_Byte7_VS_Bit = 0, + kINQUIRY_Byte7_CMDQUE_Bit = 1, + kINQUIRY_Byte7_TRANDIS_Bit = 2, // SPI Specific + kINQUIRY_Byte7_LINKED_Bit = 3, + kINQUIRY_Byte7_SYNC_Bit = 4, // SPI Specific + kINQUIRY_Byte7_WBUS16_Bit = 5, // SPI Specific + // Bit 6 is Obsolete + kINQUIRY_Byte7_RELADR_Bit = 7, + + // Masks + kINQUIRY_Byte7_VS_Mask = (1 << kINQUIRY_Byte7_VS_Bit), + kINQUIRY_Byte7_CMDQUE_Mask = (1 << kINQUIRY_Byte7_CMDQUE_Bit), + kINQUIRY_Byte7_TRANDIS_Mask = (1 << kINQUIRY_Byte7_TRANDIS_Bit),// SPI Specific + kINQUIRY_Byte7_LINKED_Mask = (1 << kINQUIRY_Byte7_LINKED_Bit), + kINQUIRY_Byte7_SYNC_Mask = (1 << kINQUIRY_Byte7_SYNC_Bit), // SPI Specific + kINQUIRY_Byte7_WBUS16_Mask = (1 << kINQUIRY_Byte7_WBUS16_Bit), // SPI Specific + // Bit 6 is Obsolete + kINQUIRY_Byte7_RELADR_Mask = (1 << kINQUIRY_Byte7_RELADR_Bit) +}; + + +/*! +@enum Byte 56 features field definitions +@discussion +Definitions for bits/masks in the INQUIRY Byte 56 field. +Inquiry Byte 56 features (for devices that report an ANSI VERSION of +kINQUIRY_ANSI_VERSION_SCSI_SPC_Compliant or later). +These are SPI-3 Specific. +@constant kINQUIRY_Byte56_IUS_Bit +IUS bit definition. +@constant kINQUIRY_Byte56_QAS_Bit +QAS bit definition. +@constant kINQUIRY_Byte56_IUS_Mask +Mask to use to test the IUS bit. +@constant kINQUIRY_Byte56_QAS_Mask +Mask to use to test the QAS bit. +@constant kINQUIRY_Byte56_CLOCKING_Mask +Mask to use to test CLOCKING bits. +@constant kINQUIRY_Byte56_CLOCKING_ONLY_ST +Single-transition clocking only. +@constant kINQUIRY_Byte56_CLOCKING_ONLY_DT +Double-transition clocking only. +@constant kINQUIRY_Byte56_CLOCKING_ST_AND_DT +Single-transition and double-transition clocking. +*/ +enum +{ + // Byte offset + kINQUIRY_Byte56_Offset = 56, + + // Bit definitions + kINQUIRY_Byte56_IUS_Bit = 0, + kINQUIRY_Byte56_QAS_Bit = 1, + // Bits 2 and 3 are the CLOCKING bits + // All other bits are reserved + + kINQUIRY_Byte56_IUS_Mask = (1 << kINQUIRY_Byte56_IUS_Bit), + kINQUIRY_Byte56_QAS_Mask = (1 << kINQUIRY_Byte56_QAS_Bit), + kINQUIRY_Byte56_CLOCKING_Mask = 0x0C, + + // Definitions for the CLOCKING bits + kINQUIRY_Byte56_CLOCKING_ONLY_ST = 0x00, + kINQUIRY_Byte56_CLOCKING_ONLY_DT = 0x04, + // kINQUIRY_Byte56_CLOCKING_RESERVED = 0x08, + kINQUIRY_Byte56_CLOCKING_ST_AND_DT = 0x0C +}; + + +/*! +@define kINQUIRY_VERSION_DESCRIPTOR_MaxCount +Maximum number of INQUIRY version descriptors supported. +*/ +#define kINQUIRY_VERSION_DESCRIPTOR_MaxCount 8 + + +/*! +@enum kINQUIRY_VERSION_DESCRIPTOR_SAT +SAT specification version descriptor. +*/ +enum +{ + kINQUIRY_VERSION_DESCRIPTOR_SAT = 0x1EA0 +}; + + +/* +IORegistry property names for information derived from the Inquiry data. +The Peripheral Device Type is the only property that the +generic Logical Unit Drivers will use to match. These properties are +listed in order of matching priority. First is the Peripheral Device Type. +Second is the Vendor Identification. Third is the Product Identification. +Last is the Product Revision Level. To match a particular product, you would +specify the Peripheral Device Type, Vendor Identification, and Product +Identification. To restrict the match to a particular firmware revision, you +would add the Product Revision Level. To not match on a particular product, +but on a particular vendor's products, you would only include the +Peripheral Device Type and the Vendor Identification. +*/ + +/*! +@define kIOPropertySCSIPeripheralDeviceType +SCSI Peripheral Device Type as reported in the INQUIRY data. +*/ +#define kIOPropertySCSIPeripheralDeviceType "Peripheral Device Type" + +/*! +@define kIOPropertySCSIPeripheralDeviceTypeSize +Size of the kIOPropertySCSIPeripheralDeviceType key. +*/ +#define kIOPropertySCSIPeripheralDeviceTypeSize 8 + +/* These properties are listed in order of matching priority */ + +/*! +@define kIOPropertySCSIVendorIdentification +Vendor ID as reported in the INQUIRY data. Additional space characters (0x20) +are truncated. +*/ +#define kIOPropertySCSIVendorIdentification "Vendor Identification" + +/*! +@define kIOPropertySCSIProductIdentification +Product ID as reported in the INQUIRY data. Additional space characters (0x20) +are truncated. +*/ +#define kIOPropertySCSIProductIdentification "Product Identification" + +/*! +@define kIOPropertySCSIProductRevisionLevel +Product Revision Level as reported in the INQUIRY data. +*/ +#define kIOPropertySCSIProductRevisionLevel "Product Revision Level" + + +/*! +@enum INQUIRY Page Codes +@discussion INQUIRY Page Codes to be used when EVPD is set in the +INQUIRY command. +@constant kINQUIRY_Page00_PageCode +Page Code 00h. +@constant kINQUIRY_Page80_PageCode +Page Code 80h. +@constant kINQUIRY_Page83_PageCode +Page Code 83h. +@constant kINQUIRY_Page89_PageCode +Page Code 89h. +*/ +enum +{ + kINQUIRY_Page00_PageCode = 0x00, + kINQUIRY_Page80_PageCode = 0x80, + kINQUIRY_Page83_PageCode = 0x83, + kINQUIRY_Page89_PageCode = 0x89 +}; + + +/*! +@struct SCSICmd_INQUIRY_Page00_Header +@discussion INQUIRY Page 00h Header. +*/ +typedef struct SCSICmd_INQUIRY_Page00_Header +{ + UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. + UInt8 PAGE_CODE; // Must be equal to 00h + UInt8 RESERVED; // reserved field + UInt8 PAGE_LENGTH; // n-3 bytes +} SCSICmd_INQUIRY_Page00_Header; + + +/*! +@struct SCSICmd_INQUIRY_Page80_Header +@discussion INQUIRY Page 80h Header. +*/ +typedef struct SCSICmd_INQUIRY_Page80_Header +{ + UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. + UInt8 PAGE_CODE; // Must be equal to 80h + UInt8 RESERVED; // reserved field + UInt8 PAGE_LENGTH; // n-3 bytes + UInt8 PRODUCT_SERIAL_NUMBER; // 4-n +} SCSICmd_INQUIRY_Page80_Header; + + +/*! +@define kIOPropertySCSIINQUIRYUnitSerialNumber +Key that describes the INQUIRY Unit Serial Number in the IORegistry. +*/ +#define kIOPropertySCSIINQUIRYUnitSerialNumber "INQUIRY Unit Serial Number" + + +/*! +@struct SCSICmd_INQUIRY_Page83_Header +@discussion INQUIRY Page 83h Header. +*/ +typedef struct SCSICmd_INQUIRY_Page83_Header +{ + UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. + UInt8 PAGE_CODE; // Must be equal to 83h + UInt8 RESERVED; // reserved field + UInt8 PAGE_LENGTH; // n-3 bytes +} SCSICmd_INQUIRY_Page83_Header; + + +/*! +@struct SCSICmd_INQUIRY_Page83_Header_SPC_16 +@discussion INQUIRY Page 83h Header used with the 16 byte INQUIRY command. +*/ +typedef struct SCSICmd_INQUIRY_Page83_Header_SPC_16 +{ + UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. + UInt8 PAGE_CODE; // Must be equal to 83h + UInt16 PAGE_LENGTH; // n-3 bytes +} SCSICmd_INQUIRY_Page83_Header_SPC_16; + + +/*! +@struct SCSICmd_INQUIRY_Page83_Identification_Descriptor +@discussion INQUIRY Page 83h Identification Descriptor. +*/ +typedef struct SCSICmd_INQUIRY_Page83_Identification_Descriptor +{ + UInt8 CODE_SET; // 7-4 = Protocol Identifier. 3-0 = Code Set + UInt8 IDENTIFIER_TYPE; // 7 = PIV 5-4 = ASSOCIATION 3-0 = Identifier + UInt8 RESERVED; + UInt8 IDENTIFIER_LENGTH; + UInt8 IDENTIFIER; +} SCSICmd_INQUIRY_Page83_Identification_Descriptor; + + +/*! +@enum INQUIRY Page 83h Code Set +@discussion +Definitions for the Code Set field. +@constant kINQUIRY_Page83_CodeSetBinaryData +The identifier contains binary data. +@constant kINQUIRY_Page83_CodeSetASCIIData +The identifier contains ASCII data. +@constant kINQUIRY_Page83_CodeSetUTF8Data +The identifier contains UTF-8 data. +*/ +enum +{ + kINQUIRY_Page83_CodeSetReserved = 0x0, + kINQUIRY_Page83_CodeSetBinaryData = 0x1, + kINQUIRY_Page83_CodeSetASCIIData = 0x2, + kINQUIRY_Page83_CodeSetUTF8Data = 0x3, + // 0x4 - 0xF reserved + kINQUIRY_Page83_CodeSetMask = 0xF +}; + + +/*! +@enum INQUIRY Page 83h Association +@discussion +Definitions for the Association field. +@constant kINQUIRY_Page83_AssociationLogicalUnit +Association of the identifier is with the logical unit. +@constant kINQUIRY_Page83_AssociationDevice +Association of the identifier is with the device (same as logical unit in SPC-2). +@constant kINQUIRY_Page83_AssociationTargetPort +Association of the identifier is with the target port. +@constant kINQUIRY_Page83_AssociationTargetDevice +Association of the identifier is with the target device (i.e. all ports). +@constant kINQUIRY_Page83_AssociationMask +Mask to use to determine association. +*/ +enum +{ + // SPC-3 - Association is changed to be specific to + // Logical Units + kINQUIRY_Page83_AssociationLogicalUnit = 0x00, + + // Backwards compatibility for SPC-2 + kINQUIRY_Page83_AssociationDevice = kINQUIRY_Page83_AssociationLogicalUnit, + + // Association is related to a Target Port + kINQUIRY_Page83_AssociationTargetPort = 0x10, + + // SPC-3 - Added as specific association to + // a Target device. + kINQUIRY_Page83_AssociationTargetDevice = 0x20, + + kINQUIRY_Page83_AssociationMask = 0x30 +}; + + +/*! +@enum INQUIRY Page 83h Identifier Type +@discussion +Definitions for the Identifier Type field. +@constant kINQUIRY_Page83_IdentifierTypeUndefined +Undefined Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeVendorID +Vendor Specific Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeIEEE_EUI64 +EUI-64 Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeNAAIdentifier +NAA Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeRelativePortIdentifier +Relative Target Port Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeTargetPortGroup +Target Port Group Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeLogicalUnitGroup +Logical Unit Group Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeMD5LogicalUnitIdentifier +MD5 Logical Unit Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeSCSINameString +SCSI Name String Identifier Type. +@constant kINQUIRY_Page83_IdentifierTypeMask +Mask to use to determine association. +@constant kINQUIRY_Page83_ProtocolIdentifierValidBit +PIV Bit definition. +@constant kINQUIRY_Page83_ProtocolIdentifierValidMask +Mask to use to determine if PIV is set. +*/ +enum +{ + kINQUIRY_Page83_IdentifierTypeUndefined = 0, + kINQUIRY_Page83_IdentifierTypeVendorID = 1, + kINQUIRY_Page83_IdentifierTypeIEEE_EUI64 = 2, + kINQUIRY_Page83_IdentifierTypeNAAIdentifier = 3, + kINQUIRY_Page83_IdentifierTypeRelativePortIdentifier = 4, + kINQUIRY_Page83_IdentifierTypeTargetPortGroup = 5, + kINQUIRY_Page83_IdentifierTypeLogicalUnitGroup = 6, + kINQUIRY_Page83_IdentifierTypeMD5LogicalUnitIdentifier = 7, + kINQUIRY_Page83_IdentifierTypeSCSINameString = 8, + // 0x9 - 0xF Reserved + + kINQUIRY_Page83_IdentifierTypeMask = 0xF, + + kINQUIRY_Page83_ProtocolIdentifierValidBit = 7, + kINQUIRY_Page83_ProtocolIdentifierValidMask = (1 << kINQUIRY_Page83_ProtocolIdentifierValidBit) + +}; + +// Backwards compatibility +#define kINQUIRY_Page83_IdentifierTypeFCNameIdentifier kINQUIRY_Page83_IdentifierTypeNAAIdentifier + + +/*! +@enum Protocol Identifier values +@discussion +Definitions for the protocol identifier values. +@constant kSCSIProtocolIdentifier_FibreChannel +FibreChannel Protocol Identifier. +@constant kSCSIProtocolIdentifier_ParallelSCSI +Parallel SCSI Protocol Identifier. +@constant kSCSIProtocolIdentifier_SSA +SSA Protocol Identifier. +@constant kSCSIProtocolIdentifier_FireWire +FireWire (IEEE-1394) Protocol Identifier. +@constant kSCSIProtocolIdentifier_RDMA +RDMA Protocol Identifier. +@constant kSCSIProtocolIdentifier_iSCSI +iSCSI Protocol Identifier. +@constant kSCSIProtocolIdentifier_SAS +SAS Protocol Identifier. +@constant kSCSIProtocolIdentifier_ADT +ADT Protocol Identifier. +@constant kSCSIProtocolIdentifier_ATAPI +ATAPI Protocol Identifier. +@constant kSCSIProtocolIdentifier_None +No Protocol Identifier. +*/ +enum +{ + kSCSIProtocolIdentifier_FibreChannel = 0, + kSCSIProtocolIdentifier_ParallelSCSI = 1, + kSCSIProtocolIdentifier_SSA = 2, + kSCSIProtocolIdentifier_FireWire = 3, + kSCSIProtocolIdentifier_RDMA = 4, + kSCSIProtocolIdentifier_iSCSI = 5, + kSCSIProtocolIdentifier_SAS = 6, + kSCSIProtocolIdentifier_ADT = 7, + kSCSIProtocolIdentifier_ATAPI = 8, + // 0x9-0xE Reserved + kSCSIProtocolIdentifier_None = 0xF +}; + + +/*! +@define kIOPropertySCSIINQUIRYDeviceIdentification +Device Identification key. +*/ +#define kIOPropertySCSIINQUIRYDeviceIdentification "INQUIRY Device Identification" + + +/*! +@define kIOPropertySCSIINQUIRYDeviceIdCodeSet +Code Set type key. +*/ +#define kIOPropertySCSIINQUIRYDeviceIdCodeSet "Code Set" + + +/*! +@define kIOPropertySCSIINQUIRYDeviceIdType +Identifier Type key. +*/ +#define kIOPropertySCSIINQUIRYDeviceIdType "Identifier Type" + + +/*! +@define kIOPropertySCSIINQUIRYDeviceIdAssociation +Association key. +*/ +#define kIOPropertySCSIINQUIRYDeviceIdAssociation "Association" + + +/*! +@define kIOPropertySCSIINQUIRYDeviceIdentifier +Identifier key (data or string). +*/ +#define kIOPropertySCSIINQUIRYDeviceIdentifier "Identifier" + + +/*! +@struct SCSICmd_INQUIRY_Page89_Data +@discussion INQUIRY Page 89h data as defined in the SAT 1.0 +specification. This section contians all structures and +definitions used by the INQUIRY command in response to a request +for page 89h - ATA information VPD Page. +*/ +typedef struct SCSICmd_INQUIRY_Page89_Data +{ + UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. + UInt8 PAGE_CODE; // Must be equal to 89h + UInt16 PAGE_LENGTH; // Must be equal to 238h + UInt32 Reserved; + UInt8 SAT_VENDOR_IDENTIFICATION[kINQUIRY_VENDOR_IDENTIFICATION_Length]; + UInt8 SAT_PRODUCT_IDENTIFICATION[kINQUIRY_PRODUCT_IDENTIFICATION_Length]; + UInt8 SAT_PRODUCT_REVISION_LEVEL[kINQUIRY_PRODUCT_REVISION_LEVEL_Length]; + UInt8 ATA_DEVICE_SIGNATURE[20]; + UInt8 COMMAND_CODE; + UInt8 Reserved2[3]; + UInt8 IDENTIFY_DATA[512]; +} SCSICmd_INQUIRY_Page89_Data; + + +/*! +@define kIOPropertySATVendorIdentification +Vendor Identification of the SATL. +*/ +#define kIOPropertySATVendorIdentification "SAT Vendor Identification" + + +/*! +@define kIOPropertySATProductIdentification +Product Identification of the SATL. +*/ +#define kIOPropertySATProductIdentification "SAT Product Identification" + + +/*! +@define kIOPropertySATProductRevisonLevel +Product Revision Level of the SATL. +*/ +#define kIOPropertySATProductRevisonLevel "SAT Product Revision Level" + + +#endif /* _IOKIT_SCSI_CMDS_INQUIRY_H_ */ diff --git a/i386/include/IOKit/scsi/SCSICmds_MODE_Definitions.h b/i386/include/IOKit/scsi/SCSICmds_MODE_Definitions.h new file mode 100644 index 0000000..8d9c250 --- /dev/null +++ b/i386/include/IOKit/scsi/SCSICmds_MODE_Definitions.h @@ -0,0 +1,559 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_SCSI_CMDS_MODE_DEFINITIONS_H_ +#define _IOKIT_SCSI_CMDS_MODE_DEFINITIONS_H_ + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +#if KERNEL +#include <IOKit/IOTypes.h> +#else +#include <CoreFoundation/CoreFoundation.h> +#endif + + +/*! @header SCSI Request Sense Definitions + @discussion + This file contains all definitions for the data returned from + the MODE_SENSE_6 and MODE_SENSE_10 commands. +*/ + +#pragma pack(1) + +/*! +@struct SPCModeParameterHeader6 +@discussion +Mode Parameter Header for the MODE_SENSE_6 command. +*/ +typedef struct SPCModeParameterHeader6 +{ + UInt8 MODE_DATA_LENGTH; + UInt8 MEDIUM_TYPE; + UInt8 DEVICE_SPECIFIC_PARAMETER; + UInt8 BLOCK_DESCRIPTOR_LENGTH; +} SPCModeParameterHeader6; + + +/*! +@struct SPCModeParameterHeader10 +@discussion +Mode Parameter Header for the MODE_SENSE_10 command. +*/ +typedef struct SPCModeParameterHeader10 +{ + UInt16 MODE_DATA_LENGTH; + UInt8 MEDIUM_TYPE; + UInt8 DEVICE_SPECIFIC_PARAMETER; + UInt8 LONGLBA; + UInt8 RESERVED; + UInt16 BLOCK_DESCRIPTOR_LENGTH; +} SPCModeParameterHeader10; + + +/*! +@enum Long LBA Bitfield definitions +@discussion +Long LBA Bitfield definitions for Mode Parameter Header +for MODE_SENSE_10 command. +@constant kModeSenseParameterHeader10_LongLBABit +Bit to indicate Long LBA block descriptors follow. +@constant kModeSenseParameterHeader10_LongLBAMask +Mask to test for kModeSenseParameterHeader10_LongLBABit. +*/ +enum +{ + kModeSenseParameterHeader10_LongLBABit = 0, + kModeSenseParameterHeader10_LongLBAMask = (1 << kModeSenseParameterHeader10_LongLBABit), +}; + + +/*! +@enum Device Specific Parameter Bitfield definitions +@discussion +SBC definitions for Device Specific Parameter in the +Mode Sense Header Block. +@constant kModeSenseSBCDeviceSpecific_DPOFUABit +Bit to indicate DPO and FUA bits are accepted by the device server. +@constant kModeSenseSBCDeviceSpecific_WriteProtectBit +Bit to indicate medium is write protected. +@constant kModeSenseSBCDeviceSpecific_DPOFUAMask +Mask to test for kModeSenseSBCDeviceSpecific_DPOFUABit. +@constant kModeSenseSBCDeviceSpecific_WriteProtectMask +Mask to test for kModeSenseSBCDeviceSpecific_WriteProtectBit. +*/ +enum +{ + kModeSenseSBCDeviceSpecific_DPOFUABit = 4, + kModeSenseSBCDeviceSpecific_WriteProtectBit = 7, + kModeSenseSBCDeviceSpecific_DPOFUAMask = (1 << kModeSenseSBCDeviceSpecific_DPOFUABit), + kModeSenseSBCDeviceSpecific_WriteProtectMask = (1 << kModeSenseSBCDeviceSpecific_WriteProtectBit) +}; + + +/*! +@struct ModeParameterBlockDescriptor +@discussion +General mode parameter block descriptor. +*/ +typedef struct ModeParameterBlockDescriptor +{ + UInt8 DENSITY_CODE; + UInt8 NUMBER_OF_BLOCKS[3]; + UInt8 RESERVED; + UInt8 BLOCK_LENGTH[3]; +} ModeParameterBlockDescriptor; + + +/*! +@struct DASDModeParameterBlockDescriptor +@discussion +Direct Access Storage Device mode parameter block descriptor. +*/ +typedef struct DASDModeParameterBlockDescriptor +{ + UInt32 NUMBER_OF_BLOCKS; + UInt8 DENSITY_CODE; + UInt8 BLOCK_LENGTH[3]; +} DASDModeParameterBlockDescriptor; + + +/*! +@struct LongLBAModeParameterBlockDescriptor +@discussion +Long LBA mode parameter block descriptor. +*/ +typedef struct LongLBAModeParameterBlockDescriptor +{ + UInt64 NUMBER_OF_BLOCKS; + UInt8 DENSITY_CODE; + UInt8 RESERVED[3]; + UInt32 BLOCK_LENGTH; +} LongLBAModeParameterBlockDescriptor; + + +/*! +@struct ModePageFormatHeader +@discussion +Mode Page format header. +*/ +typedef struct ModePageFormatHeader +{ + UInt8 PS_PAGE_CODE; + UInt8 PAGE_LENGTH; +} ModePageFormatHeader; + + +/*! +@enum Mode Page Format bit definitions +@discussion +Mode Page Format bit definitions. +@constant kModePageFormat_PS_Bit +Bit to indicate Parameters Saveable. +@constant kModePageFormat_PAGE_CODE_Mask +Mask to obtain the PAGE_CODE from the PS_PAGE_CODE field. +@constant kModePageFormat_PS_Mask +Mask to test for kModePageFormat_PS_Bit. +*/ +enum +{ + kModePageFormat_PS_Bit = 7, + + kModePageFormat_PAGE_CODE_Mask = 0x3F, + kModePageFormat_PS_Mask = (1 << kModePageFormat_PS_Bit) +}; + + +#if 0 +#pragma mark - +#pragma mark SPC Mode Pages +#pragma mark - +#endif + + +/*! +@enum SPC Mode Pages +@discussion +SPC Mode Page definitions. +@constant kSPCModePagePowerConditionCode +Power Conditions Mode Page value. +@constant kSPCModePageAllPagesCode +All Mode Pages value. +*/ +enum +{ + kSPCModePagePowerConditionCode = 0x1A, + kSPCModePageAllPagesCode = 0x3F +}; + +/*! +@struct SPCModePagePowerCondition +@discussion +Power Conditions Mode Page (PAGE CODE 0x1A) format. +*/ +typedef struct SPCModePagePowerCondition +{ + ModePageFormatHeader header; + UInt8 RESERVED; + UInt8 IDLE_STANDBY; + UInt32 IDLE_CONDITION_TIMER; + UInt32 STANDBY_CONDITION_TIMER; +} SPCModePagePowerCondition; + + +#if 0 +#pragma mark - +#pragma mark 0x00 SBC Direct Access Mode Pages +#pragma mark - +#endif + + +/*! +@enum SBC Mode Pages +@discussion +SBC Mode Page definitions. +@constant kSBCModePageFormatDeviceCode +Format Device Mode Page value. +@constant kSBCModePageRigidDiskGeometryCode +Rigid Disk Geometry Page value. +@constant kSBCModePageFlexibleDiskCode +Flexible Disk Page value. +@constant kSBCModePageCachingCode +Caching Page value. +*/ +enum +{ + kSBCModePageFormatDeviceCode = 0x03, + kSBCModePageRigidDiskGeometryCode = 0x04, + kSBCModePageFlexibleDiskCode = 0x05, + kSBCModePageCachingCode = 0x08 +}; + + +/*! +@struct SBCModePageFormatDevice +@discussion +Format Device Mode Page (PAGE CODE 0x03) format. +*/ +typedef struct SBCModePageFormatDevice +{ + ModePageFormatHeader header; + UInt16 TRACKS_PER_ZONE; + UInt16 ALTERNATE_SECTORS_PER_ZONE; + UInt16 ALTERNATE_TRACKS_PER_ZONE; + UInt16 ALTERNATE_TRACKS_PER_LOGICAL_UNIT; + UInt16 SECTORS_PER_TRACK; + UInt16 DATA_BYTES_PER_PHYSICAL_SECTOR; + UInt16 INTERLEAVE; + UInt16 TRACK_SKEW_FACTOR; + UInt16 CYLINDER_SKEW_FACTOR; + UInt8 SSEC_HSEC_RMB_SURF; + UInt8 RESERVED[3]; +} SBCModePageFormatDevice; + + +/*! +@struct SBCModePageRigidDiskGeometry +@discussion +Rigid Disk Geometry Mode Page (PAGE CODE 0x04) format. +*/ +typedef struct SBCModePageRigidDiskGeometry +{ + ModePageFormatHeader header; + UInt8 NUMBER_OF_CYLINDERS[3]; + UInt8 NUMBER_OF_HEADS; + UInt8 STARTING_CYLINDER_WRITE_PRECOMPENSATION[3]; + UInt8 STARTING_CYLINDER_REDUCED_WRITE_CURRENT[3]; + UInt16 DEVICE_STEP_RATE; + UInt8 LANDING_ZONE_CYLINDER[3]; + UInt8 RPL; + UInt8 ROTATIONAL_OFFSET; + UInt8 RESERVED; + UInt16 MEDIUM_ROTATION_RATE; + UInt8 RESERVED1[2]; +} SBCModePageRigidDiskGeometry; + + +/*! +@enum Rigid Disk Geometry bitfields +@discussion +Bit field masks for Rigid Disk Geometry structure fields. +@constant kSBCModePageRigidDiskGeometry_RPL_Mask +Mask for use with the RPL field. +*/ +enum +{ + kSBCModePageRigidDiskGeometry_RPL_Mask = 0x03 +}; + + +/*! +@struct SBCModePageFlexibleDisk +@discussion +Flexible Disk Mode Page (PAGE CODE 0x05) format. +*/ +typedef struct SBCModePageFlexibleDisk +{ + ModePageFormatHeader header; + UInt16 TRANSFER_RATE; + UInt8 NUMBER_OF_HEADS; + UInt8 SECTORS_PER_TRACK; + UInt16 DATA_BYTES_PER_SECTOR; + UInt16 NUMBER_OF_CYLINDERS; + UInt16 STARTING_CYLINDER_WRITE_PRECOMPENSATION; + UInt16 STARTING_CYLINDER_REDUCED_WRITE_CURRENT; + UInt16 DEVICE_STEP_RATE; + UInt8 DEVICE_STEP_PULSE_WIDTH; + UInt16 HEAD_SETTLE_DELAY; + UInt8 MOTOR_ON_DELAY; + UInt8 MOTOR_OFF_DELAY; + UInt8 TRDY_SSN_MO; + UInt8 SPC; + UInt8 WRITE_COMPENSATION; + UInt8 HEAD_LOAD_DELAY; + UInt8 HEAD_UNLOAD_DELAY; + UInt8 PIN_34_PIN_2; + UInt8 PIN_4_PIN_1; + UInt16 MEDIUM_ROTATION_RATE; + UInt8 RESERVED[2]; +} SBCModePageFlexibleDisk; + + +/*! +@enum TRDY_SSN_MO bitfields +@discussion +Bit field definitions and masks for Flexible Disk TRDY_SSN_MO field. +@constant kSBCModePageFlexibleDisk_MO_Bit +MO Bit definition. +@constant kSBCModePageFlexibleDisk_SSN_Bit +SSN Bit definition. +@constant kSBCModePageFlexibleDisk_TRDY_Bit +TRDY Bit definition. +@constant kSBCModePageFlexibleDisk_MO_Mask +Mask for use with TRDY_SSN_MO field. +@constant kSBCModePageFlexibleDisk_SSN_Mask +Mask for use with TRDY_SSN_MO field. +@constant kSBCModePageFlexibleDisk_TRDY_Mask +Mask for use with TRDY_SSN_MO field. +*/ +enum +{ + // Bits 0:4 Reserved + kSBCModePageFlexibleDisk_MO_Bit = 5, + kSBCModePageFlexibleDisk_SSN_Bit = 6, + kSBCModePageFlexibleDisk_TRDY_Bit = 7, + + kSBCModePageFlexibleDisk_MO_Mask = (1 << kSBCModePageFlexibleDisk_MO_Bit), + kSBCModePageFlexibleDisk_SSN_Mask = (1 << kSBCModePageFlexibleDisk_SSN_Bit), + kSBCModePageFlexibleDisk_TRDY_Mask = (1 << kSBCModePageFlexibleDisk_TRDY_Bit) +}; + + +/*! +@enum SPC bitfields +@discussion +Bit field definitions and masks for Flexible Disk SPC field. +@constant kSBCModePageFlexibleDisk_SPC_Mask +Mask for use with SPC field. +*/ +enum +{ + kSBCModePageFlexibleDisk_SPC_Mask = 0x0F +}; + + +/*! +@enum PIN_34_PIN_2 bitfields +@discussion +Bit field definitions and masks for Flexible Disk PIN_34_PIN_2 field. +@constant kSBCModePageFlexibleDisk_PIN_2_Mask +Mask for use with PIN_34_PIN_2 field. +@constant kSBCModePageFlexibleDisk_PIN_34_Mask +Mask for use with PIN_34_PIN_2 field. +*/ +enum +{ + kSBCModePageFlexibleDisk_PIN_2_Mask = 0x0F, + kSBCModePageFlexibleDisk_PIN_34_Mask = 0xF0 +}; + + +/*! +@enum PIN_4_PIN_1 bitfields +@discussion +Bit field definitions and masks for Flexible Disk PIN_4_PIN_1 field. +@constant kSBCModePageFlexibleDisk_PIN_1_Mask +Mask for use with PIN_4_PIN_1 field. +@constant kSBCModePageFlexibleDisk_PIN_4_Mask +Mask for use with PIN_4_PIN_1 field. +*/ +enum +{ + kSBCModePageFlexibleDisk_PIN_1_Mask = 0x0F, + kSBCModePageFlexibleDisk_PIN_4_Mask = 0xF0 +}; + + +/*! +@struct SBCModePageCaching +@discussion +Caching Mode Page (PAGE CODE 0x08) format. +*/ +typedef struct SBCModePageCaching +{ + ModePageFormatHeader header; + UInt8 flags; + UInt8 DEMAND_READ_WRITE_RETENTION_PRIORITY; + UInt16 DISABLE_PREFETCH_TRANSFER_LENGTH; + UInt16 MINIMUM_PREFETCH; + UInt16 MAXIMUM_PREFETCH; + UInt16 MAXIMUM_PREFETCH_CEILING; + UInt8 flags2; + UInt8 NUMBER_OF_CACHE_SEGMENTS; + UInt16 CACHE_SEGMENT_SIZE; + UInt8 RESERVED; + UInt8 NON_CACHE_SEGMENT_SIZE[3]; +} SBCModePageCaching; + + +/*! +@enum Caching flags bitfields +@discussion +Bit field definitions and masks for Caching flags field. +@constant kSBCModePageCaching_RCD_Bit +RCD Bit definition. +@constant kSBCModePageCaching_MF_Bit +MF Bit definition. +@constant kSBCModePageCaching_WCE_Bit +WCE Bit definition. +@constant kSBCModePageCaching_SIZE_Bit +SIZE Bit definition. +@constant kSBCModePageCaching_DISC_Bit +DISC Bit definition. +@constant kSBCModePageCaching_CAP_Bit +CAP Bit definition. +@constant kSBCModePageCaching_ABPF_Bit +ABPF Bit definition. +@constant kSBCModePageCaching_IC_Bit +IC Bit definition. +@constant kSBCModePageCaching_RCD_Mask +Mask for use with flags field. +@constant kSBCModePageCaching_MF_Mask +Mask for use with flags field. +@constant kSBCModePageCaching_WCE_Mask +Mask for use with flags field. +@constant kSBCModePageCaching_SIZE_Mask +Mask for use with flags field. +@constant kSBCModePageCaching_DISC_Mask +Mask for use with flags field. +@constant kSBCModePageCaching_CAP_Mask +Mask for use with flags field. +@constant kSBCModePageCaching_ABPF_Mask +Mask for use with flags field. +@constant kSBCModePageCaching_IC_Mask +Mask for use with flags field. +*/ +enum +{ + kSBCModePageCaching_RCD_Bit = 0, + kSBCModePageCaching_MF_Bit = 1, + kSBCModePageCaching_WCE_Bit = 2, + kSBCModePageCaching_SIZE_Bit = 3, + kSBCModePageCaching_DISC_Bit = 4, + kSBCModePageCaching_CAP_Bit = 5, + kSBCModePageCaching_ABPF_Bit = 6, + kSBCModePageCaching_IC_Bit = 7, + + kSBCModePageCaching_RCD_Mask = (1 << kSBCModePageCaching_RCD_Bit), + kSBCModePageCaching_MF_Mask = (1 << kSBCModePageCaching_MF_Bit), + kSBCModePageCaching_WCE_Mask = (1 << kSBCModePageCaching_WCE_Bit), + kSBCModePageCaching_SIZE_Mask = (1 << kSBCModePageCaching_SIZE_Bit), + kSBCModePageCaching_DISC_Mask = (1 << kSBCModePageCaching_DISC_Bit), + kSBCModePageCaching_CAP_Mask = (1 << kSBCModePageCaching_CAP_Bit), + kSBCModePageCaching_ABPF_Mask = (1 << kSBCModePageCaching_ABPF_Bit), + kSBCModePageCaching_IC_Mask = (1 << kSBCModePageCaching_IC_Bit) +}; + + +/*! +@enum Demand Read/Write Retention masks +@discussion +Demand Read/Write Retention masks. +@constant kSBCModePageCaching_DEMAND_WRITE_Mask +Mask for the DEMAND_READ_WRITE_RETENTION_PRIORITY field. +@constant kSBCModePageCaching_DEMAND_READ_Mask +Mask for the DEMAND_READ_WRITE_RETENTION_PRIORITY field. +*/ +enum +{ + kSBCModePageCaching_DEMAND_WRITE_Mask = 0x00FF, + kSBCModePageCaching_DEMAND_READ_Mask = 0xFF00 +}; + +/*! +@enum Caching flags2 bitfields +@discussion +Bit field definitions and masks for Caching flags2 field. +@constant kSBCModePageCaching_VS1_Bit +VS1 Bit definition. +@constant kSBCModePageCaching_VS2_Bit +VS2 Bit definition. +@constant kSBCModePageCaching_DRA_Bit +DRA Bit definition. +@constant kSBCModePageCaching_LBCSS_Bit +LBCSS Bit definition. +@constant kSBCModePageCaching_FSW_Bit +FSW Bit definition. +@constant kSBCModePageCaching_VS1_Mask +Mask for use with flags2 field. +@constant kSBCModePageCaching_VS2_Mask +Mask for use with flags2 field. +@constant kSBCModePageCaching_DRA_Mask +Mask for use with flags2 field. +@constant kSBCModePageCaching_LBCSS_Mask +Mask for use with flags2 field. +@constant kSBCModePageCaching_FSW_Mask +Mask for use with flags2 field. +*/ +enum +{ + // Bits 0:2 Reserved + kSBCModePageCaching_VS1_Bit = 3, + kSBCModePageCaching_VS2_Bit = 4, + kSBCModePageCaching_DRA_Bit = 5, + kSBCModePageCaching_LBCSS_Bit = 6, + kSBCModePageCaching_FSW_Bit = 7, + + kSBCModePageCaching_VS1_Mask = (1 << kSBCModePageCaching_VS1_Bit), + kSBCModePageCaching_VS2_Mask = (1 << kSBCModePageCaching_VS2_Bit), + kSBCModePageCaching_DRA_Mask = (1 << kSBCModePageCaching_DRA_Bit), + kSBCModePageCaching_LBCSS_Mask = (1 << kSBCModePageCaching_LBCSS_Bit), + kSBCModePageCaching_FSW_Mask = (1 << kSBCModePageCaching_FSW_Bit) +}; + +#pragma options align=reset + +#endif /* _IOKIT_SCSI_CMDS_MODE_DEFINITIONS_H_ */ diff --git a/i386/include/IOKit/scsi/SCSICmds_READ_CAPACITY_Definitions.h b/i386/include/IOKit/scsi/SCSICmds_READ_CAPACITY_Definitions.h new file mode 100644 index 0000000..59abde3 --- /dev/null +++ b/i386/include/IOKit/scsi/SCSICmds_READ_CAPACITY_Definitions.h @@ -0,0 +1,141 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_SCSI_CMDS_READ_CAPACITY_H_ +#define _IOKIT_SCSI_CMDS_READ_CAPACITY_H_ + + +#if KERNEL +#include <IOKit/IOTypes.h> +#else +#include <CoreFoundation/CoreFoundation.h> +#endif + + +/*! @header SCSI Request Sense Definitions + @discussion + This file contains all definitions for the data returned from + the READ CAPACITY 10 (0x25) and READ CAPACITY 16 (0x9E) commands. +*/ + +/*! +@enum READ CAPACITY Payload Sizes +@discussion +Sizes of the payload for the READ CAPACITY 10 and +READ CAPACITY 16 commands. +@constant kREPORT_CAPACITY_DataSize +Data size for a READ_CAPACITY command. +@constant kREPORT_CAPACITY_16_DataSize +Data size for a READ_CAPACITY_16 command. +*/ +enum +{ + kREPORT_CAPACITY_DataSize = 8, + kREPORT_CAPACITY_16_DataSize = 32 +}; + + +/*! +@constant kREPORT_CAPACITY_MaximumLBA +@discussion +Maximum LBA supported via READ CAPACITY 10 command. +*/ +#define kREPORT_CAPACITY_MaximumLBA 0xFFFFFFFFUL + + +/*! +@constant kREPORT_CAPACITY_16_MaximumLBA +@discussion +Maximum LBA supported via READ CAPACITY 16 command. +*/ +#define kREPORT_CAPACITY_16_MaximumLBA 0xFFFFFFFFFFFFFFFFULL + + +/*! +@struct SCSI_Capacity_Data +@discussion +Capacity return structure for READ CAPACITY 10 command. +*/ +typedef struct SCSI_Capacity_Data +{ + UInt32 RETURNED_LOGICAL_BLOCK_ADDRESS; + UInt32 BLOCK_LENGTH_IN_BYTES; +} SCSI_Capacity_Data; + + +/*! +@struct SCSI_Capacity_Data_Long +@discussion +Capacity return structure for READ CAPACITY 16 command. +*/ +typedef struct SCSI_Capacity_Data_Long +{ + UInt64 RETURNED_LOGICAL_BLOCK_ADDRESS; + UInt32 BLOCK_LENGTH_IN_BYTES; + UInt8 RTO_EN_PROT_EN; + UInt8 Reserved[19]; +} SCSI_Capacity_Data_Long; + + +/*! +@enum RTO_EN definitions +@discussion +Values for the REFERENCE TAG OWN (RTO_EN) bit in the +READ CAPACITY Long Data structure. +@constant kREAD_CAPACITY_RTO_Enabled +Reference Tag Own enabled. +@constant kREAD_CAPACITY_RTO_Disabled +Reference Tag Own disabled. +@constant kREAD_CAPACITY_RTO_Mask +Mask to use when checking the RTO_EN_PROT_EN field. +*/ +enum +{ + kREAD_CAPACITY_RTO_Enabled = 0x02, + kREAD_CAPACITY_RTO_Disabled = 0x00, + kREAD_CAPACITY_RTO_Mask = 0x02 +}; + + +/*! +@enum PROTECTION INFORMATION definitions +@discussion +Values for the PROTECTION INFORMATION (PROT_EN) bit in the +READ CAPACITY Long Data structure. +@constant kREAD_CAPACITY_PROT_Enabled +Protection Information enabled. +@constant kREAD_CAPACITY_PROT_Disabled +Protection Information disabled. +@constant kREAD_CAPACITY_PROT_Mask +Mask to use when checking the RTO_EN_PROT_EN field. +*/ + +enum +{ + kREAD_CAPACITY_PROT_Enabled = 0x01, + kREAD_CAPACITY_PROT_Disabled = 0x00, + kREAD_CAPACITY_PROT_Mask = 0x01 +}; + + +#endif /* _IOKIT_SCSI_CMDS_READ_CAPACITY_H_ */ diff --git a/i386/include/IOKit/scsi/SCSICmds_REPORT_LUNS_Definitions.h b/i386/include/IOKit/scsi/SCSICmds_REPORT_LUNS_Definitions.h new file mode 100644 index 0000000..6616e84 --- /dev/null +++ b/i386/include/IOKit/scsi/SCSICmds_REPORT_LUNS_Definitions.h @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2004-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_SCSI_CMDS_REPORT_LUNS_DEFINITIONS_H_ +#define _IOKIT_SCSI_CMDS_REPORT_LUNS_DEFINITIONS_H_ + + +#if KERNEL +#include <IOKit/IOTypes.h> +#else +#include <CoreFoundation/CoreFoundation.h> +#endif + + +/*! @header SCSI Request Sense Definitions + @discussion + This file contains all definitions for the data returned from + the REPORT_LUNS (0xA0) command. +*/ + + +/*! +@struct SCSICmd_REPORT_LUNS_LUN_ENTRY +@discussion +This structure represents a single LUN entry in a LUN list +returned via the REPORT_LUNS command. +*/ +typedef struct SCSICmd_REPORT_LUNS_LUN_ENTRY +{ + UInt16 FIRST_LEVEL_ADDRESSING; + UInt16 SECOND_LEVEL_ADDRESSING; + UInt16 THIRD_LEVEL_ADDRESSING; + UInt16 FOURTH_LEVEL_ADDRESSING; +} SCSICmd_REPORT_LUNS_LUN_ENTRY; + + +/*! +@constant kREPORT_LUNS_HeaderSize +@discussion +Size of the REPORT_LUNS header as defined in the SPC-3 specification. +*/ +#define kREPORT_LUNS_HeaderSize 8 + +/*! +@enum REPORT_LUNS addressing methods. +@discussion +REPORT_LUNS addressing methods described in +SAM-2 documents. +@constant kREPORT_LUNS_ADDRESS_METHOD_PERIPHERAL_DEVICE +Peripheral Device Addressing Method. +@constant kREPORT_LUNS_ADDRESS_DEVICE_TYPE_SPECIFIC +Device Type Specific Addressing Method. +@constant kREPORT_LUNS_ADDRESS_METHOD_LOGICAL_UNIT +Logical Unit Specific Addressing Method. +@constant kREPORT_LUNS_ADDRESS_METHOD_OFFSET +Offset to the address method data. +*/ +enum +{ + kREPORT_LUNS_ADDRESS_METHOD_PERIPHERAL_DEVICE = 0, + kREPORT_LUNS_ADDRESS_DEVICE_TYPE_SPECIFIC = 1, + kREPORT_LUNS_ADDRESS_METHOD_LOGICAL_UNIT = 2, + // Reserved [3] + kREPORT_LUNS_ADDRESS_METHOD_OFFSET = 14 +}; + + +/*! +@struct REPORT_LUNS_LOGICAL_UNIT_ADDRESSING +@discussion +This structure represents a LUN Addressing scheme. +*/ +typedef struct REPORT_LUNS_LOGICAL_UNIT_ADDRESSING +{ +#ifdef __LITTLE_ENDIAN__ + UInt16 LUN : 5; + UInt16 BUS_NUMBER : 3; + UInt16 TARGET : 6; + UInt16 reserved2 : 1; + UInt16 reserved : 1; +#else /* !__LITTLE_ENDIAN__ */ + UInt16 reserved : 1; + UInt16 reserved2 : 1; + UInt16 TARGET : 6; + UInt16 BUS_NUMBER : 3; + UInt16 LUN : 5; +#endif /* !__LITTLE_ENDIAN__ */ +} REPORT_LUNS_LOGICAL_UNIT_ADDRESSING; + + +/*! +@struct REPORT_LUNS_PERIPHERAL_DEVICE_ADDRESSING +@discussion +This structure represents a Peripheral Device Addressing scheme. +*/ +typedef struct REPORT_LUNS_PERIPHERAL_DEVICE_ADDRESSING +{ +#ifdef __LITTLE_ENDIAN__ + UInt16 TARGET_LUN : 8; + UInt16 BUS_IDENTIFIER : 6; + UInt16 reserved2 : 1; + UInt16 reserved : 1; +#else /* !__LITTLE_ENDIAN__ */ + UInt16 reserved : 1; + UInt16 reserved2 : 1; + UInt16 BUS_IDENTIFIER : 6; + UInt16 TARGET_LUN : 8; +#endif /* !__LITTLE_ENDIAN__ */ +} REPORT_LUNS_PERIPHERAL_DEVICE_ADDRESSING; + + +/*! +@struct SCSICmd_REPORT_LUNS_Header +@discussion +This structure defines the format of the data that is returned for +the REPORT_LUNS command. +*/ +typedef struct SCSICmd_REPORT_LUNS_Header +{ + UInt32 LUN_LIST_LENGTH; // LUN list length in bytes. + UInt32 RESERVED; + SCSICmd_REPORT_LUNS_LUN_ENTRY LUN[1]; // Variable length list. Must have at least LUN 0 if +} SCSICmd_REPORT_LUNS_Header; // Target supports REPORT_LUNS command. + + +#endif /* _IOKIT_SCSI_CMDS_REPORT_LUNS_DEFINITIONS_H_ */ diff --git a/i386/include/IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h b/i386/include/IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h new file mode 100644 index 0000000..8cfabb0 --- /dev/null +++ b/i386/include/IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h @@ -0,0 +1,234 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_SCSI_CMDS_REQUEST_SENSE_H_ +#define _IOKIT_SCSI_CMDS_REQUEST_SENSE_H_ + + +#if KERNEL +#include <IOKit/IOTypes.h> +#else +#include <CoreFoundation/CoreFoundation.h> +#endif + + +/*! @header SCSI Request Sense Definitions + @discussion + This file contains all definitions for the data returned from + the REQUEST SENSE (0x03) command and from auto sense on protocols + that support it. +*/ + + +/*! +@enum kSenseDefaultSize +@discussion +The default size for SCSI Request Sense data. +*/ +enum +{ + kSenseDefaultSize = 18 +}; + + +/*! +@struct SCSI_Sense_Data +@discussion +The basic SCSI Request Sense data structure. +*/ +typedef struct SCSI_Sense_Data +{ + UInt8 VALID_RESPONSE_CODE; // 7 = Valid. 6-0 = Response Code. + UInt8 SEGMENT_NUMBER; // Segment number + UInt8 SENSE_KEY; // 7 = FILEMARK, 6 = EOM, 5 = ILI, 3-0 = SENSE KEY. + UInt8 INFORMATION_1; // INFORMATION. + UInt8 INFORMATION_2; // INFORMATION. + UInt8 INFORMATION_3; // INFORMATION. + UInt8 INFORMATION_4; // INFORMATION. + UInt8 ADDITIONAL_SENSE_LENGTH; // Number of additional bytes available in sense data + UInt8 COMMAND_SPECIFIC_INFORMATION_1; // Command Specific Information + UInt8 COMMAND_SPECIFIC_INFORMATION_2; // Command Specific Information + UInt8 COMMAND_SPECIFIC_INFORMATION_3; // Command Specific Information + UInt8 COMMAND_SPECIFIC_INFORMATION_4; // Command Specific Information + UInt8 ADDITIONAL_SENSE_CODE; // Additional Sense Code + UInt8 ADDITIONAL_SENSE_CODE_QUALIFIER; // Additional Sense Code Qualifier + UInt8 FIELD_REPLACEABLE_UNIT_CODE; // Field Replaceable Unit Code + UInt8 SKSV_SENSE_KEY_SPECIFIC_MSB; // 7 = Sense Key Specific Valid bit, 6-0 Sense Key Specific MSB + UInt8 SENSE_KEY_SPECIFIC_MID; // Sense Key Specific Middle + UInt8 SENSE_KEY_SPECIFIC_LSB; // Sense Key Specific LSB +} SCSI_Sense_Data; + + +/*! +@enum Sense Valid +@discussion +Masks to use to determine if sense data is valid or not. +@constant kSENSE_DATA_VALID +Sense data is valid. +@constant kSENSE_NOT_DATA_VALID +Sense data is not valid. +@constant kSENSE_DATA_VALID_Mask +Validity mask to use when checking the VALID_RESPONSE_CODE field. +*/ +enum +{ + kSENSE_DATA_VALID = 0x80, + kSENSE_NOT_DATA_VALID = 0x00, + kSENSE_DATA_VALID_Mask = 0x80 +}; + + +/*! +@enum Sense Response Codes +@discussion +Masks and values to determine the Response Code. +@constant kSENSE_RESPONSE_CODE_Current_Errors +Response code indicating current errors are reported. +@constant kSENSE_RESPONSE_CODE_Deferred_Errors +Response code indicating deferred errors are reported. +@constant kSENSE_RESPONSE_CODE_Mask +Mask to use when checking the VALID_RESPONSE_CODE field. +*/ +enum +{ + kSENSE_RESPONSE_CODE_Current_Errors = 0x70, + kSENSE_RESPONSE_CODE_Deferred_Errors = 0x71, + kSENSE_RESPONSE_CODE_Mask = 0x7F +}; + + +/*! +@enum FILEMARK bit field definitions +@discussion +Masks and values to determine the FileMark bit field. +@constant kSENSE_FILEMARK_Set +Filemark bit is set. +@constant kSENSE_FILEMARK_Not_Set +Filemark bit is not set. +@constant kSENSE_FILEMARK_Mask +Mask to use when checking the SENSE_KEY field for the FILEMARK bit. +*/ +enum +{ + kSENSE_FILEMARK_Set = 0x80, + kSENSE_FILEMARK_Not_Set = 0x00, + kSENSE_FILEMARK_Mask = 0x80 +}; + + +/*! +@enum EOM bit field definitions +@discussion +Masks and values to determine the End Of Medium bit field. +@constant kSENSE_EOM_Set +End Of Medium bit is set. +@constant kSENSE_EOM_Not_Set +End Of Medium bit is not set. +@constant kSENSE_EOM_Mask +Mask to use when checking the SENSE_KEY field for the EOM bit. +*/ +enum +{ + kSENSE_EOM_Set = 0x40, + kSENSE_EOM_Not_Set = 0x00, + kSENSE_EOM_Mask = 0x40 +}; + + +/*! +@enum ILI bit field definitions +@discussion +Masks and values to determine the Incorrect Length Indicator bit field. +@constant kSENSE_ILI_Set +Incorrect Length Indicator bit is set. +@constant kSENSE_ILI_Not_Set +Incorrect Length Indicator bit is not set. +@constant kSENSE_ILI_Mask +Mask to use when checking the SENSE_KEY field for the ILI bit. +*/ +enum +{ + kSENSE_ILI_Set = 0x20, + kSENSE_ILI_Not_Set = 0x00, + kSENSE_ILI_Mask = 0x20 +}; + + +/*! +@enum Sense Key definitions +@discussion +Masks and values to determine the SENSE_KEY. +@constant kSENSE_KEY_NO_SENSE +No sense data is present. +@constant kSENSE_KEY_RECOVERED_ERROR +A recovered error has occurred. +@constant kSENSE_KEY_NOT_READY +Device server is not ready. +@constant kSENSE_KEY_MEDIUM_ERROR +Device server detected a medium error. +@constant kSENSE_KEY_HARDWARE_ERROR +Device server detected a hardware error. +@constant kSENSE_KEY_ILLEGAL_REQUEST +Device server detected an illegal request. +@constant kSENSE_KEY_UNIT_ATTENTION +Device server indicates a unit attention condition. +@constant kSENSE_KEY_DATA_PROTECT +Device server indicates a data protect condition. +@constant kSENSE_KEY_BLANK_CHECK +Device server indicates a blank check condition. +@constant kSENSE_KEY_VENDOR_SPECIFIC +Device server indicates a vendor specific condition. +@constant kSENSE_KEY_COPY_ABORTED +Device server indicates a copy aborted condition. +@constant kSENSE_KEY_ABORTED_COMMAND +Device server indicates an aborted command condition. +@constant kSENSE_KEY_VOLUME_OVERFLOW +Device server indicates a volume overflow condition. +@constant kSENSE_KEY_MISCOMPARE +Device server indicates a miscompare condition. +@constant kSENSE_KEY_Mask +Mask to use when checking the SENSE_KEY field for the SENSE_KEY value. +*/ +enum +{ + kSENSE_KEY_NO_SENSE = 0x00, + kSENSE_KEY_RECOVERED_ERROR = 0x01, + kSENSE_KEY_NOT_READY = 0x02, + kSENSE_KEY_MEDIUM_ERROR = 0x03, + kSENSE_KEY_HARDWARE_ERROR = 0x04, + kSENSE_KEY_ILLEGAL_REQUEST = 0x05, + kSENSE_KEY_UNIT_ATTENTION = 0x06, + kSENSE_KEY_DATA_PROTECT = 0x07, + kSENSE_KEY_BLANK_CHECK = 0x08, + kSENSE_KEY_VENDOR_SPECIFIC = 0x09, + kSENSE_KEY_COPY_ABORTED = 0x0A, + kSENSE_KEY_ABORTED_COMMAND = 0x0B, + /* SENSE KEY 0x0C is obsoleted */ + kSENSE_KEY_VOLUME_OVERFLOW = 0x0D, + kSENSE_KEY_MISCOMPARE = 0x0E, + /* SENSE KEY 0x0F is reserved */ + kSENSE_KEY_Mask = 0x0F +}; + + +#endif /* _IOKIT_SCSI_CMDS_REQUEST_SENSE_H_ */ diff --git a/i386/include/IOKit/scsi/SCSICommandDefinitions.h b/i386/include/IOKit/scsi/SCSICommandDefinitions.h new file mode 100644 index 0000000..d33aed6 --- /dev/null +++ b/i386/include/IOKit/scsi/SCSICommandDefinitions.h @@ -0,0 +1,479 @@ +/* + * Copyright (c) 2001-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_SCSI_COMMAND_DEFINITIONS_H_ +#define _IOKIT_SCSI_COMMAND_DEFINITIONS_H_ + + +#if KERNEL +#include <IOKit/IOTypes.h> +#else +#include <CoreFoundation/CoreFoundation.h> +#endif + + +/*! @header SCSICommandDefinitions + @discussion + This file contains all the definitions for types and constants that are + used by the command set classes for building CDBs. The field type + definitions are used for the parameters passed to a method that builds and + sends any SCSI defined command to clearly identify the type of value + expected for a parameter. + + The command methods will then use the appropriate mask to verify that the + value passed into a parameter is of the specified type. + + Currently only types and masks are defined for 8 bytes and smaller fields. + If a command is defined that uses a larger field, these should be expanded + to include those sizes. +*/ + +#pragma mark Field Type Definitions +/* These are the type definitions used for the parameters of methods that + * build and send Command Descriptor Blocks. + */ + +/* 1 Byte or smaller fields. */ + +/*! @typedef SCSICmdField1Bit */ +typedef UInt8 SCSICmdField1Bit; + +/*! @typedef SCSICmdField2Bit */ +typedef UInt8 SCSICmdField2Bit; + +/*! @typedef SCSICmdField3Bit */ +typedef UInt8 SCSICmdField3Bit; + +/*! @typedef SCSICmdField4Bit */ +typedef UInt8 SCSICmdField4Bit; + +/*! @typedef SCSICmdField5Bit */ +typedef UInt8 SCSICmdField5Bit; + +/*! @typedef SCSICmdField6Bit */ +typedef UInt8 SCSICmdField6Bit; + +/*! @typedef SCSICmdField7Bit */ +typedef UInt8 SCSICmdField7Bit; + +/*! @typedef SCSICmdField1Byte */ +typedef UInt8 SCSICmdField1Byte; + +/* 2 Bytes or smaller fields. */ + +/*! @typedef SCSICmdField9Bit */ +typedef UInt16 SCSICmdField9Bit; + +/*! @typedef SCSICmdField10Bit */ +typedef UInt16 SCSICmdField10Bit; + +/*! @typedef SCSICmdField11Bit */ +typedef UInt16 SCSICmdField11Bit; + +/*! @typedef SCSICmdField12Bit */ +typedef UInt16 SCSICmdField12Bit; + +/*! @typedef SCSICmdField13Bit */ +typedef UInt16 SCSICmdField13Bit; + +/*! @typedef SCSICmdField14Bit */ +typedef UInt16 SCSICmdField14Bit; + +/*! @typedef SCSICmdField15Bit */ +typedef UInt16 SCSICmdField15Bit; + +/*! @typedef SCSICmdField2Byte */ +typedef UInt16 SCSICmdField2Byte; + +/* 3 Bytes or smaller fields. */ + +/*! @typedef SCSICmdField17Bit */ +typedef UInt32 SCSICmdField17Bit; + +/*! @typedef SCSICmdField18Bit */ +typedef UInt32 SCSICmdField18Bit; + +/*! @typedef SCSICmdField19Bit */ +typedef UInt32 SCSICmdField19Bit; + +/*! @typedef SCSICmdField20Bit */ +typedef UInt32 SCSICmdField20Bit; + +/*! @typedef SCSICmdField21Bit */ +typedef UInt32 SCSICmdField21Bit; + +/*! @typedef SCSICmdField22Bit */ +typedef UInt32 SCSICmdField22Bit; + +/*! @typedef SCSICmdField23Bit */ +typedef UInt32 SCSICmdField23Bit; + +/*! @typedef SCSICmdField3Byte */ +typedef UInt32 SCSICmdField3Byte; + +/* 4 Bytes or smaller fields. */ + +/*! @typedef SCSICmdField25Bit */ +typedef UInt32 SCSICmdField25Bit; + +/*! @typedef SCSICmdField26Bit */ +typedef UInt32 SCSICmdField26Bit; + +/*! @typedef SCSICmdField27Bit */ +typedef UInt32 SCSICmdField27Bit; + +/*! @typedef SCSICmdField28Bit */ +typedef UInt32 SCSICmdField28Bit; + +/*! @typedef SCSICmdField29Bit */ +typedef UInt32 SCSICmdField29Bit; + +/*! @typedef SCSICmdField30Bit */ +typedef UInt32 SCSICmdField30Bit; + +/*! @typedef SCSICmdField31Bit */ +typedef UInt32 SCSICmdField31Bit; + +/*! @typedef SCSICmdField4Byte */ +typedef UInt32 SCSICmdField4Byte; + +/* 5 Bytes or smaller fields. */ + +/*! @typedef SCSICmdField33Bit */ +typedef UInt64 SCSICmdField33Bit; + +/*! @typedef SCSICmdField34Bit */ +typedef UInt64 SCSICmdField34Bit; + +/*! @typedef SCSICmdField35Bit */ +typedef UInt64 SCSICmdField35Bit; + +/*! @typedef SCSICmdField36Bit */ +typedef UInt64 SCSICmdField36Bit; + +/*! @typedef SCSICmdField37Bit */ +typedef UInt64 SCSICmdField37Bit; + +/*! @typedef SCSICmdField38Bit */ +typedef UInt64 SCSICmdField38Bit; + +/*! @typedef SCSICmdField39Bit */ +typedef UInt64 SCSICmdField39Bit; + +/*! @typedef SCSICmdField5Byte */ +typedef UInt64 SCSICmdField5Byte; + +/* 6 Bytes or smaller fields. */ + +/*! @typedef SCSICmdField41Bit */ +typedef UInt64 SCSICmdField41Bit; + +/*! @typedef SCSICmdField42Bit */ +typedef UInt64 SCSICmdField42Bit; + +/*! @typedef SCSICmdField43Bit */ +typedef UInt64 SCSICmdField43Bit; + +/*! @typedef SCSICmdField44Bit */ +typedef UInt64 SCSICmdField44Bit; + +/*! @typedef SCSICmdField45Bit */ +typedef UInt64 SCSICmdField45Bit; + +/*! @typedef SCSICmdField46Bit */ +typedef UInt64 SCSICmdField46Bit; + +/*! @typedef SCSICmdField47Bit */ +typedef UInt64 SCSICmdField47Bit; + +/*! @typedef SCSICmdField6Byte */ +typedef UInt64 SCSICmdField6Byte; + +/* 7 Bytes or smaller fields. */ + +/*! @typedef SCSICmdField49Bit */ +typedef UInt64 SCSICmdField49Bit; + +/*! @typedef SCSICmdField50Bit */ +typedef UInt64 SCSICmdField50Bit; + +/*! @typedef SCSICmdField51Bit */ +typedef UInt64 SCSICmdField51Bit; + +/*! @typedef SCSICmdField52Bit */ +typedef UInt64 SCSICmdField52Bit; + +/*! @typedef SCSICmdField53Bit */ +typedef UInt64 SCSICmdField53Bit; + +/*! @typedef SCSICmdField54Bit */ +typedef UInt64 SCSICmdField54Bit; + +/*! @typedef SCSICmdField55Bit */ +typedef UInt64 SCSICmdField55Bit; + +/*! @typedef SCSICmdField7Byte */ +typedef UInt64 SCSICmdField7Byte; + +/* 8 Bytes or smaller fields. */ + +/*! @typedef SCSICmdField57Bit */ +typedef UInt64 SCSICmdField57Bit; + +/*! @typedef SCSICmdField58Bit */ +typedef UInt64 SCSICmdField58Bit; + +/*! @typedef SCSICmdField59Bit */ +typedef UInt64 SCSICmdField59Bit; + +/*! @typedef SCSICmdField60Bit */ +typedef UInt64 SCSICmdField60Bit; + +/*! @typedef SCSICmdField61Bit */ +typedef UInt64 SCSICmdField61Bit; + +/*! @typedef SCSICmdField62Bit */ +typedef UInt64 SCSICmdField62Bit; + +/*! @typedef SCSICmdField63Bit */ +typedef UInt64 SCSICmdField63Bit; + +/*! @typedef SCSICmdField8Byte */ +typedef UInt64 SCSICmdField8Byte; + + +#pragma mark Field Mask Definitions +/* These are masks that are used to verify that the values passed into the + * parameters for the fields are not larger than the field size. + * + * NB: These have changed from enums to #define since enums greater than + * 32 bits in size are not well-defined in C99. + */ + +/* 1 Byte or smaller fields. */ + +/*! @constant kSCSICmdFieldMask1Bit */ +#define kSCSICmdFieldMask1Bit 0x01 + +/*! @constant kSCSICmdFieldMask2Bit */ +#define kSCSICmdFieldMask2Bit 0x03 + +/*! @constant kSCSICmdFieldMask3Bit */ +#define kSCSICmdFieldMask3Bit 0x07 + +/*! @constant kSCSICmdFieldMask4Bit */ +#define kSCSICmdFieldMask4Bit 0x0F + +/*! @constant kSCSICmdFieldMask5Bit */ +#define kSCSICmdFieldMask5Bit 0x1F + +/*! @constant kSCSICmdFieldMask6Bit */ +#define kSCSICmdFieldMask6Bit 0x3F + +/*! @constant kSCSICmdFieldMask7Bit */ +#define kSCSICmdFieldMask7Bit 0x7F + +#define kSCSICmdFieldMask1Byte 0xFF + +/* 2 Bytes or smaller fields. */ + +/*! @constant kSCSICmdFieldMask9Bit */ +#define kSCSICmdFieldMask9Bit 0x01FF + +/*! @constant kSCSICmdFieldMask10Bit */ +#define kSCSICmdFieldMask10Bit 0x03FF + +/*! @constant kSCSICmdFieldMask11Bit */ +#define kSCSICmdFieldMask11Bit 0x07FF + +/*! @constant kSCSICmdFieldMask12Bit */ +#define kSCSICmdFieldMask12Bit 0x0FFF + +/*! @constant kSCSICmdFieldMask13Bit */ +#define kSCSICmdFieldMask13Bit 0x1FFF + +/*! @constant kSCSICmdFieldMask14Bit */ +#define kSCSICmdFieldMask14Bit 0x3FFF + +/*! @constant kSCSICmdFieldMask15Bit */ +#define kSCSICmdFieldMask15Bit 0x7FFF + +/*! @constant kSCSICmdFieldMask2Byte */ +#define kSCSICmdFieldMask2Byte 0xFFFF + +/* 3 Bytes or smaller fields. */ + +/*! @constant kSCSICmdFieldMask17Bit */ +#define kSCSICmdFieldMask17Bit 0x01FFFF + +/*! @constant kSCSICmdFieldMask18Bit */ +#define kSCSICmdFieldMask18Bit 0x03FFFF + +/*! @constant kSCSICmdFieldMask19Bit */ +#define kSCSICmdFieldMask19Bit 0x07FFFF + +/*! @constant kSCSICmdFieldMask20Bit */ +#define kSCSICmdFieldMask20Bit 0x0FFFFF + +/*! @constant kSCSICmdFieldMask21Bit */ +#define kSCSICmdFieldMask21Bit 0x1FFFFF + +/*! @constant kSCSICmdFieldMask22Bit */ +#define kSCSICmdFieldMask22Bit 0x3FFFFF + +/*! @constant kSCSICmdFieldMask23Bit */ +#define kSCSICmdFieldMask23Bit 0x7FFFFF + +/*! @constant kSCSICmdFieldMask3Byte */ +#define kSCSICmdFieldMask3Byte 0xFFFFFF + +/* 4 Bytes or smaller fields. */ +/*! @constant kSCSICmdFieldMask25Bit */ +#define kSCSICmdFieldMask25Bit 0x01FFFFFFUL + +/*! @constant kSCSICmdFieldMask26Bit */ +#define kSCSICmdFieldMask26Bit 0x03FFFFFFUL + +/*! @constant kSCSICmdFieldMask27Bit */ +#define kSCSICmdFieldMask27Bit 0x07FFFFFFUL + +/*! @constant kSCSICmdFieldMask28Bit */ +#define kSCSICmdFieldMask28Bit 0x0FFFFFFFUL + +/*! @constant kSCSICmdFieldMask29Bit */ +#define kSCSICmdFieldMask29Bit 0x1FFFFFFFUL + +/*! @constant kSCSICmdFieldMask30Bit */ +#define kSCSICmdFieldMask30Bit 0x3FFFFFFFUL + +/*! @constant kSCSICmdFieldMask31Bit */ +#define kSCSICmdFieldMask31Bit 0x7FFFFFFFUL + +/*! @constant kSCSICmdFieldMask4Byte */ +#define kSCSICmdFieldMask4Byte 0xFFFFFFFFUL + +/* 5 Bytes or smaller fields. */ + +/*! @constant kSCSICmdFieldMask33Bit */ +#define kSCSICmdFieldMask33Bit 0x01FFFFFFFFULL + +/*! @constant kSCSICmdFieldMask34Bit */ +#define kSCSICmdFieldMask34Bit 0x03FFFFFFFFULL + +/*! @constant kSCSICmdFieldMask35Bit */ +#define kSCSICmdFieldMask35Bit 0x07FFFFFFFFULL + +/*! @constant kSCSICmdFieldMask36Bit */ +#define kSCSICmdFieldMask36Bit 0x0FFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask37Bit */ +#define kSCSICmdFieldMask37Bit 0x1FFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask38Bit */ +#define kSCSICmdFieldMask38Bit 0x3FFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask39Bit */ +#define kSCSICmdFieldMask39Bit 0x7FFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask5Byte */ +#define kSCSICmdFieldMask5Byte 0xFFFFFFFFFFULL + +/* 6 Bytes or smaller fields. */ + +/*! @constant kSCSICmdFieldMask41Bit */ +#define kSCSICmdFieldMask41Bit 0x01FFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask42Bit */ +#define kSCSICmdFieldMask42Bit 0x03FFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask43Bit */ +#define kSCSICmdFieldMask43Bit 0x07FFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask44Bit */ +#define kSCSICmdFieldMask44Bit 0x0FFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask45Bit */ +#define kSCSICmdFieldMask45Bit 0x1FFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask46Bit */ +#define kSCSICmdFieldMask46Bit 0x3FFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask47Bit */ +#define kSCSICmdFieldMask47Bit 0x7FFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask6Byte */ +#define kSCSICmdFieldMask6Byte 0xFFFFFFFFFFFFULL + +/* 7 Bytes or smaller fields. */ + +/*! @constant kSCSICmdFieldMask49Bit */ +#define kSCSICmdFieldMask49Bit 0x01FFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask50Bit */ +#define kSCSICmdFieldMask50Bit 0x03FFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask51Bit */ +#define kSCSICmdFieldMask51Bit 0x07FFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask52Bit */ +#define kSCSICmdFieldMask52Bit 0x0FFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask53Bit */ +#define kSCSICmdFieldMask53Bit 0x1FFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask54Bit */ +#define kSCSICmdFieldMask54Bit 0x3FFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask55Bit */ +#define kSCSICmdFieldMask55Bit 0x7FFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask7Byte */ +#define kSCSICmdFieldMask7Byte 0xFFFFFFFFFFFFFFULL + +/* 8 Bytes or smaller fields. */ + +/*! @constant kSCSICmdFieldMask57Bit */ +#define kSCSICmdFieldMask57Bit 0x01FFFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask58Bit */ +#define kSCSICmdFieldMask58Bit 0x03FFFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask59Bit */ +#define kSCSICmdFieldMask59Bit 0x07FFFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask60Bit */ +#define kSCSICmdFieldMask60Bit 0x0FFFFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask61Bit */ +#define kSCSICmdFieldMask61Bit 0x1FFFFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask62Bit */ +#define kSCSICmdFieldMask62Bit 0x3FFFFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask63Bit */ +#define kSCSICmdFieldMask63Bit 0x7FFFFFFFFFFFFFFFULL + +/*! @constant kSCSICmdFieldMask8Byte */ +#define kSCSICmdFieldMask8Byte 0xFFFFFFFFFFFFFFFFULL + +#endif /* _IOKIT_SCSI_COMMAND_DEFINITIONS_H_ */ diff --git a/i386/include/IOKit/scsi/SCSICommandOperationCodes.h b/i386/include/IOKit/scsi/SCSICommandOperationCodes.h new file mode 100644 index 0000000..21d9d1e --- /dev/null +++ b/i386/include/IOKit/scsi/SCSICommandOperationCodes.h @@ -0,0 +1,941 @@ +/* + * Copyright (c) 2001-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _SCSI_COMMAND_OPERATION_CODES_H_ +#define _SCSI_COMMAND_OPERATION_CODES_H_ + +#pragma mark About this file +/* This file contains the operation code definitions for all commands defined + * by the SCSI specifications. The commands are listed in three formats: + * 1) All commands are listed in alphabetical order. This list is the live + * enumeration for all of the command constants. + * 2) The commands are listed in ascending numerical order. + * 3) The commands are grouped by Peripheral Device Type. + * + * In the command listings by Peripheral Device Type, there will be a comment + * following each command. This comment indentifies the section of the related + * specification where the commands is defined and the requirement type of the + * command, Mandatory or Optional. + * If a specification redefines an optional command from SPC as mandatory, + * the command will be relisted in the Peripheral Device Type command list with + * the mandatory tag next to it. + * All commands that are listed in SPC as Device Type Specifc will be relisted + * as a comment in all specifications lists that support that command with the + * appropriate Mandatory or Optional tag for that specification. + * + * The section number and the requirement type of the command are based on the + * version of the specification listed in the header comment for the Peripheral + * Device Type. This data is provided for informational purposes only. The + * specification document and version that the device adheres to as indicated + * by the data returned in response to the INQUIRY command should be used as + * the authorative source for supported and required behavior of the device. + * + * The SPC set is listed before all other Peripheral Device Type commands as + * this is the base document from which all of the other documents are derived. + * + * The Peripheral Device Types and associated command sets as defined by SPC-2, + * section 7.4.1 are as follows: + * Peripheral Device Type Associated Command Specification + * ------------------------------------ ----------------------------------- + * 0x00 Direct Access Device SBC - SCSI-3 Block Commands + * 0x01 Sequential Access Device SSC - SCSI-3 Stream Commands + * 0x02 Printer Device SSC - SCSI-3 Stream Commands + * 0x03 Processor Device SPC - SCSI Primary Commands-2 + * 0x04 Write Once Device SBC - SCSI-3 Block Commands + * 0x05 CD-ROM Device MMC - SCSI Multimedia Commands-2 + * 0x06 Scanner Device SGC - SCSI-3 Graphics Commands + * 0x07 Optical Memory Device SBC - SCSI-3 Block Commands + * 0x08 Medium Changer Device SMC - SCSI-3 Medium Changer Cmds + * 0x09 Communications Device SSC - SCSI-3 Stream Commands + * 0x0A - 0x0B Graphic Arts Prepress Dev ASC IT8 + * 0x0C Storage Array Controller Device SCC-2 - SCSI Controller Commands-2 + * 0x0D Enclosure Services SES - SCSI-3 Enclosure Services + * 0x0E Simplified Direct Access Device RBC - SCSI Reduced Block Commands + * 0x0F Optical Card Reader/Writer Device OCRW - SCSI Specification for + * Optical Card Reader/Writer + * 0x10 Reserved No command specification + * 0x11 Object-Based Storage Device OSD - SCSI Object Based Storage + * Device Commands + * 0x12 - 0x14 Reserved No command specification + * 0x15 Multimedia Media Access Engine RMC - Reduced Multimedia Commands + * 0x16 - 0x1E Reserved No command specification + * 0x1F Unknown or No Device No command specification + */ + +#pragma mark - +#pragma mark Command Definitions by Name +/* All SCSI Commands listed in alphabetical order. These are the live + * definitions of the commands. All other command lists are informative. + */ +enum +{ + kSCSICmd_ACCESS_CONTROL_IN = 0x86, + kSCSICmd_ACCESS_CONTROL_OUT = 0x87, + kSCSICmd_BLANK = 0xA1, + kSCSICmd_CHANGE_DEFINITION = 0x40, + kSCSICmd_CLOSE_TRACK_SESSION = 0x5B, + kSCSICmd_COMPARE = 0x39, + kSCSICmd_COPY = 0x18, + kSCSICmd_COPY_AND_VERIFY = 0x3A, + kSCSICmd_ERASE_10 = 0x2C, + kSCSICmd_ERASE_12 = 0xAC, + kSCSICmd_EXTENDED_COPY = 0x83, + kSCSICmd_FORMAT_UNIT = 0x04, + kSCSICmd_GET_CONFIGURATION = 0x46, + kSCSICmd_GET_EVENT_STATUS_NOTIFICATION = 0x4A, + kSCSICmd_GET_PERFORMANCE = 0xAC, + kSCSICmd_INQUIRY = 0x12, + kSCSICmd_LOAD_UNLOAD_MEDIUM = 0xA6, + kSCSICmd_LOCK_UNLOCK_CACHE = 0x36, + kSCSICmd_LOCK_UNLOCK_CACHE_16 = 0x92, + kSCSICmd_LOG_SELECT = 0x4C, + kSCSICmd_LOG_SENSE = 0x4D, + kSCSICmd_MAINTENANCE_IN = 0xA3, + kSCSICmd_MAINTENANCE_OUT = 0xA4, + kSCSICmd_MECHANISM_STATUS = 0xBD, + kSCSICmd_MEDIUM_SCAN = 0x38, + kSCSICmd_MODE_SELECT_6 = 0x15, + kSCSICmd_MODE_SELECT_10 = 0x55, + kSCSICmd_MODE_SENSE_6 = 0x1A, + kSCSICmd_MODE_SENSE_10 = 0x5A, + kSCSICmd_MOVE_MEDIUM_ATTACHED = 0xA7, + kSCSICmd_PAUSE_RESUME = 0x4B, + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, + kSCSICmd_PLAY_AUDIO_10 = 0x45, + kSCSICmd_PLAY_AUDIO_12 = 0xA5, + kSCSICmd_PLAY_AUDIO_MSF = 0x47, + kSCSICmd_PLAY_AUDIO_TRACK_INDEX = 0x48, + kSCSICmd_PLAY_CD = 0xBC, + kSCSICmd_PLAY_RELATIVE_10 = 0x49, + kSCSICmd_PLAY_RELATIVE_12 = 0xA9, + kSCSICmd_PREFETCH = 0x34, + kSCSICmd_PREFETCH_16 = 0x90, + kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, + kSCSICmd_READ_6 = 0x08, + kSCSICmd_READ_10 = 0x28, + kSCSICmd_READ_12 = 0xA8, + kSCSICmd_READ_16 = 0x88, + kSCSICmd_READ_ATTRIBUTE = 0x8C, + kSCSICmd_READ_BUFFER = 0x3C, + kSCSICmd_READ_BUFFER_CAPACITY = 0x5C, + kSCSICmd_READ_CAPACITY = 0x25, + kSCSICmd_READ_CD = 0xBE, + kSCSICmd_READ_CD_MSF = 0xB9, + kSCSICmd_READ_DEFECT_DATA_10 = 0x37, + kSCSICmd_READ_DEFECT_DATA_12 = 0xB7, + kSCSICmd_READ_DISC_INFORMATION = 0x51, + kSCSICmd_READ_DVD_STRUCTURE = 0xAD, + kSCSICmd_READ_DISC_STRUCTURE = 0xAD, + kSCSICmd_READ_ELEMENT_STATUS_ATTACHED = 0xB4, + kSCSICmd_READ_FORMAT_CAPACITIES = 0x23, + kSCSICmd_READ_GENERATION = 0x29, + kSCSICmd_READ_HEADER = 0x44, + kSCSICmd_READ_LONG = 0x3E, + kSCSICmd_READ_MASTER_CUE = 0x59, + kSCSICmd_READ_SUB_CHANNEL = 0x42, + kSCSICmd_READ_TOC_PMA_ATIP = 0x43, + kSCSICmd_READ_TRACK_INFORMATION = 0x52, + kSCSICmd_READ_UPDATED_BLOCK_10 = 0x2D, + kSCSICmd_REASSIGN_BLOCKS = 0x07, + kSCSICmd_REBUILD = 0x81, + kSCSICmd_RECEIVE = 0x08, + kSCSICmd_RECEIVE_COPY_RESULTS = 0x84, + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, + kSCSICmd_REDUNDANCY_GROUP_IN = 0xBA, + kSCSICmd_REDUNDANCY_GROUP_OUT = 0xBB, + kSCSICmd_REGENERATE = 0x82, + kSCSICmd_RELEASE_6 = 0x17, + kSCSICmd_RELEASE_10 = 0x57, + kSCSICmd_REPAIR_TRACK = 0x58, + kSCSICmd_REPORT_DEVICE_IDENTIFIER = 0xA3, + kSCSICmd_REPORT_KEY = 0xA4, + kSCSICmd_REPORT_LUNS = 0xA0, + kSCSICmd_REQUEST_SENSE = 0x03, + kSCSICmd_RESERVE_6 = 0x16, + kSCSICmd_RESERVE_10 = 0x56, + kSCSICmd_RESERVE_TRACK = 0x53, + kSCSICmd_REZERO_UNIT = 0x01, + kSCSICmd_SCAN_MMC = 0xBA, + kSCSICmd_SEARCH_DATA_EQUAL_10 = 0x31, + kSCSICmd_SEARCH_DATA_EQUAL_12 = 0xB1, + kSCSICmd_SEARCH_DATA_HIGH_10 = 0x30, + kSCSICmd_SEARCH_DATA_HIGH_12 = 0xB0, + kSCSICmd_SEARCH_DATA_LOW_10 = 0x32, + kSCSICmd_SEARCH_DATA_LOW_12 = 0xB2, + kSCSICmd_SEEK_6 = 0x0B, + kSCSICmd_SEEK_10 = 0x2B, + kSCSICmd_SEND = 0x0A, + kSCSICmd_SEND_CUE_SHEET = 0x5D, + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, + kSCSICmd_SEND_DVD_STRUCTURE = 0xBF, + kSCSICmd_SEND_EVENT = 0xA2, + kSCSICmd_SEND_KEY = 0xA3, + kSCSICmd_SEND_OPC_INFORMATION = 0x54, + kSCSICmd_SERVICE_ACTION_IN = 0x9E, + kSCSICmd_SERVICE_ACTION_OUT = 0x9F, + kSCSICmd_SET_CD_SPEED = 0xBB, + kSCSICmd_SET_DEVICE_IDENTIFIER = 0xA4, + kSCSICmd_SET_LIMITS_10 = 0x33, + kSCSICmd_SET_LIMITS_12 = 0xB3, + kSCSICmd_SET_READ_AHEAD = 0xA7, + kSCSICmd_SET_STREAMING = 0xB6, + kSCSICmd_SPARE_IN = 0xBC, + kSCSICmd_SPARE_OUT = 0xBD, + kSCSICmd_START_STOP_UNIT = 0x1B, + kSCSICmd_STOP_PLAY_SCAN = 0x4E, + kSCSICmd_SYNCHRONIZE_CACHE = 0x35, + kSCSICmd_SYNCHRONIZE_CACHE_16 = 0x91, + kSCSICmd_TEST_UNIT_READY = 0x00, + kSCSICmd_UPDATE_BLOCK = 0x3D, + kSCSICmd_VERIFY_10 = 0x2F, + kSCSICmd_VERIFY_12 = 0xAF, + kSCSICmd_VERIFY_16 = 0x8F, + kSCSICmd_VOLUME_SET_IN = 0xBE, + kSCSICmd_VOLUME_SET_OUT = 0xBF, + kSCSICmd_WRITE_6 = 0x0A, + kSCSICmd_WRITE_10 = 0x2A, + kSCSICmd_WRITE_12 = 0xAA, + kSCSICmd_WRITE_16 = 0x8A, + kSCSICmd_WRITE_AND_VERIFY_10 = 0x2E, + kSCSICmd_WRITE_AND_VERIFY_12 = 0xAE, + kSCSICmd_WRITE_AND_VERIFY_16 = 0x8E, + kSCSICmd_WRITE_ATTRIBUTE = 0x8D, + kSCSICmd_WRITE_BUFFER = 0x3B, + kSCSICmd_WRITE_LONG = 0x3F, + kSCSICmd_WRITE_SAME = 0x41, + kSCSICmd_WRITE_SAME_16 = 0x93, + kSCSICmd_XDREAD = 0x52, + kSCSICmd_XDWRITE = 0x50, + kSCSICmd_XDWRITE_EXTENDED = 0x80, + kSCSICmd_XDWRITEREAD_10 = 0x53, + kSCSICmd_XPWRITE = 0x51, + + kSCSICmdVariableLengthCDB = 0x7F +}; + +/* Service Action Definitions for the Variable Length CDB (7Fh) command */ +enum +{ + kSCSIServiceAction_READ_32 = 0x0009, + kSCSIServiceAction_VERIFY_32 = 0x000A, + kSCSIServiceAction_WRITE_32 = 0x000B, + kSCSIServiceAction_WRITE_AND_VERIFY_32 = 0x000C, + kSCSIServiceAction_WRITE_SAME_32 = 0x000D, + kSCSIServiceAction_XDREAD_32 = 0x0003, + kSCSIServiceAction_XDWRITE_32 = 0x0004, + kSCSIServiceAction_XDWRITEREAD_32 = 0x0007, + kSCSIServiceAction_XPWRITE_32 = 0x0006 +}; + +/* Service Action Definitions for the MAINTENANCE IN (A3h) command */ +enum +{ + kSCSIServiceAction_REPORT_ALIASES = 0x0B, + kSCSIServiceAction_REPORT_DEVICE_IDENTIFIER = 0x05, + kSCSIServiceAction_REPORT_PRIORITY = 0x0E, + kSCSIServiceAction_REPORT_SUPPORTED_OPERATION_CODES = 0x0C, + kSCSIServiceAction_REPORT_SUPPORTED_TASK_MANAGEMENT_FUNCTIONS = 0x0D, + kSCSIServiceAction_REPORT_TARGET_PORT_GROUPS = 0x0A +}; + +/* Service Action Definitions for the MAINTENANCE OUT (A4h) command */ +enum +{ + kSCSIServiceAction_CHANGE_ALIASES = 0x0B, + kSCSIServiceAction_SET_DEVICE_IDENTIFIER = 0x06, + kSCSIServiceAction_SET_PRIORITY = 0x0E, + kSCSIServiceAction_SET_TARGET_PORT_GROUPS = 0x0A +}; + +/* Service Action Definitions for the SERVICE ACTION IN (9Eh) command */ +enum +{ + kSCSIServiceAction_READ_CAPACITY_16 = 0x10, + kSCSIServiceAction_READ_LONG_16 = 0x11 +}; + +/* Service Action Definitions for the SERVICE ACTION OUT (9Fh) command */ +enum +{ + kSCSIServiceAction_WRITE_LONG_16 = 0x11 +}; + +#pragma mark - +#pragma mark Command Definitions by Number +#if 0 +enum +{ +}; +#endif + + +#pragma mark - +#pragma mark All Types SPC Commands +/* Commands defined by the T10:1236-D SCSI Primary Commands-2 (SPC-2) + * command specification. The definitions and section numbers are based on + * section 7 of the revision 18, 21 May 2000 version of the specification. + * + * These commands are defined for all devices. + */ +#if 0 +enum +{ + kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ + kSCSICmd_COMPARE = 0x39, /* Sec. 7.2: Optional */ + kSCSICmd_COPY = 0x18, /* Sec. 7.3: Optional */ + kSCSICmd_COPY_AND_VERIFY = 0x3A, /* Sec. 7.4: Optional */ + kSCSICmd_EXTENDED_COPY = 0x83, /* Sec. 7.5: Optional */ + kSCSICmd_INQUIRY = 0x12, /* Sec. 7.6: Mandatory */ + kSCSICmd_LOG_SELECT = 0x4C, /* Sec. 7.7: Optional */ + kSCSICmd_LOG_SENSE = 0x4D, /* Sec. 7.8: Optional */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* Sec. 7.9: Device Type + * Specific */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* Sec. 7.10: Device Type + * Specific */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* Sec. 7.11: Device Type + * Specific */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* Sec. 7.12: Device Type + * Specific */ + kSCSICmd_MOVE_MEDIUM_ATTACHED = 0xA7, /* Defined in SMC */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Sec. 7.13: Device Type + * Specific */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Sec. 7.14: Device Type + * Specific */ + kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* Sec. 7.15: Device Type + * Specific */ + kSCSICmd_READ_BUFFER = 0x3C, /* Sec. 7.16: Optional */ + kSCSICmd_READ_ELEMENT_STATUS_ATTACHED = 0xB4, /* Defined in SMC */ + kSCSICmd_RECEIVE_COPY_RESULTS = 0x84, /* Sec. 7.17: Optional */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* Sec. 7.18: Optional */ + kSCSICmd_RELEASE_10 = 0x57, /* Sec. 7.19: Device Type + * Specific */ + kSCSICmd_RELEASE_6 = 0x17, /* Sec. 7.20: Device Type + * Specific */ + kSCSICmd_REPORT_DEVICE_IDENTIFIER = 0xA3, /* Sec. 7.21: Optional */ + kSCSICmd_REPORT_LUNS = 0xA0, /* Sec. 7.22: Mandatory for + * LUN Supporting devices*/ + kSCSICmd_REQUEST_SENSE = 0x03, /* Sec. 7.23: Device Type + * Specific */ + kSCSICmd_RESERVE_10 = 0x56, /* Sec. 7.24: Device Type + * Specific */ + kSCSICmd_RESERVE_6 = 0x16, /* Sec. 7.25: Device Type + * Specific */ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* Sec. 7.26: Optional */ + kSCSICmd_SET_DEVICE_IDENTIFIER = 0xA4, /* Sec. 7.27: Optional */ + kSCSICmd_TEST_UNIT_READY = 0x00, /* Sec. 7.28: Mandatory */ + kSCSICmd_WRITE_BUFFER = 0x3B /* Sec. 7.29: Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x00 SBC Direct Access Commands +/* Commands defined by the T10:990-D SCSI-3 Block Commands (SBC) command + * specification. The definitions and section numbers are based on section 6.1 + * of the revision 8c, 13 November 1997 version of the specification. + */ +#if 0 +enum +{ + kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ + kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ + kSCSICmd_COPY = 0x18, /* SPC: Optional */ + kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional*/ + kSCSICmd_FORMAT_UNIT = 0x04, /* Sec. 6.1.1: Mandatory */ + kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ + kSCSICmd_LOCK_UNLOCK_CACHE = 0x36, /* Sec. 6.1.2: Optional */ + kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ + kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Optional */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Optional */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ + kSCSICmd_MOVE_MEDIUM_ATTACHED = 0xA7, /* SMC: Optional */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* SPC: Optional */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* SPC: Optional */ + kSCSICmd_PREFETCH = 0x34, /* Sec. 6.1.3: Optional */ + kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* SPC: Optional */ + kSCSICmd_READ_6 = 0x08, /* Sec. 6.1.4: Mandatory */ + kSCSICmd_READ_10 = 0x28, /* Sec. 6.1.5: Mandatory */ + kSCSICmd_READ_12 = 0xA8, /* Sec. 6.2.4: Optional */ + kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ + kSCSICmd_READ_CAPACITY = 0x25, /* Sec. 6.1.6: Mandatory */ + kSCSICmd_READ_DEFECT_DATA_10 = 0x37, /* Sec. 6.1.7: Optional */ + kSCSICmd_READ_DEFECT_DATA_12 = 0xB7, /* Sec. 6.2.5: Optional */ + kSCSICmd_READ_ELEMENT_STATUS_ATTACHED = 0xB4, /* SMC: Optional */ + kSCSICmd_READ_GENERATION = 0x29, /* Sec. 6.2.6: Optional */ + kSCSICmd_READ_LONG = 0x3E, /* Sec. 6.1.8: Optional */ + kSCSICmd_READ_UPDATED_BLOCK_10 = 0x2D, /* Sec. 6.2.7: Optional */ + kSCSICmd_REASSIGN_BLOCKS = 0x07, /* Sec. 6.1.9: Optional */ + kSCSICmd_REBUILD = 0x81, /* Sec. 6.1.10: Optional */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ + kSCSICmd_REGENERATE = 0x82, /* Sec. 6.1.11: Optional */ + kSCSICmd_RELEASE_6 = 0x17, /* SPC: Optional */ + kSCSICmd_RELEASE_10 = 0x57, /* SPC: Mandatory */ + kSCSICmd_REPORT_LUNS = 0xA0, /* SPC: Optional */ + kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ + kSCSICmd_RESERVE_6 = 0x16, /* SPC: Optional */ + kSCSICmd_RESERVE_10 = 0x56, /* SPC: Mandatory */ + kSCSICmd_REZERO_UNIT = 0x01, /* Obsolete */ + kSCSICmd_SEARCH_DATA_EQUAL_10 = 0x31, /* Obsolete */ + kSCSICmd_SEARCH_DATA_HIGH_10 = 0x30, /* Obsolete */ + kSCSICmd_SEARCH_DATA_LOW_10 = 0x32, /* Obsolete */ + kSCSICmd_SEEK_6 = 0x0B, /* Obsolete */ + kSCSICmd_SEEK_10 = 0x2B, /* Sec. 6.1.12: Optional */ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ + kSCSICmd_SET_LIMITS_10 = 0x33, /* Sec. 6.1.13: Optional */ + kSCSICmd_SET_LIMITS_12 = 0xB3, /* Sec. 6.2.8: Optional */ + kSCSICmd_START_STOP_UNIT = 0x1B, /* Sec. 6.1.14: Optional */ + kSCSICmd_SYNCHRONIZE_CACHE = 0x35, /* Sec. 6.1.15: Optional */ + kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ + kSCSICmd_UPDATE_BLOCK = 0x3D, /* Sec. 6.2.9: Optional */ + kSCSICmd_VERIFY_10 = 0x2F, /* Sec. 6.1.16: Optional */ + kSCSICmd_WRITE_6 = 0x0A, /* Sec. 6.1.17: Optional */ + kSCSICmd_WRITE_10 = 0x2A, /* Sec. 6.1.18: Optional */ + kSCSICmd_WRITE_12 = 0xAA, /* Sec. 6.2.13: Optional */ + kSCSICmd_WRITE_AND_VERIFY_10 = 0x2E, /* Sec. 6.1.19: Optional */ + kSCSICmd_WRITE_AND_VERIFY_12 = 0xAE, /* Sec. 6.2.15: Optional */ + kSCSICmd_WRITE_BUFFER = 0x3B, /* SPC: Optional */ + kSCSICmd_WRITE_LONG = 0x3F, /* Sec. 6.1.20: Optional */ + kSCSICmd_WRITE_SAME = 0x41, /* Sec. 6.1.21: Optional */ + kSCSICmd_XDREAD = 0x52, /* Sec. 6.1.22: Optional */ + kSCSICmd_XDWRITE = 0x50, /* Sec. 6.1.23: Optional */ + kSCSICmd_XDWRITE_EXTENDED = 0x80, /* Sec. 6.1.24: Optional */ + kSCSICmd_XPWRITE = 0x51 /* Sec. 6.1.25: Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x01 SSC Sequential Access Commands +/* Commands defined by the T10:997-D SCSI-3 Stream Commands (SSC) command + * specification. The definitions and section numbers are based on section 5 + * of the revision 22, January 1, 2000 version of the specification. + */ +#if 0 +enum +{ + kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ + kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ + kSCSICmd_COPY = 0x18, /* SPC: Optional */ + kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional */ + kSCSICmd_ERASE = 0x19, /* Sec. 5.3.1: Mandatory */ + kSCSICmd_FORMAT_MEDIUM = 0x04, /* Sec. 5.3.2: Optional */ + kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ + kSCSICmd_LOAD_UNLOAD = 0x1B, /* Sec. 5.3.3: Optional */ + kSCSICmd_LOCATE = 0x2B, /* Sec. 5.3.4: Optional */ + kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ + kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Mandatory */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Mandatory */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ + kSCSICmd_MOVE_MEDIUM = 0xA5, /* SMC: Optional */ + kSCSICmd_MOVE_MEDIUM_ATTACHED = 0xA7, /* SMC: Optional */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* SPC: Optional */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* SPC: Optional */ + kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* SPC: Optional */ + kSCSICmd_READ_6 = 0x08, /* Sec. 5.3.5: Mandatory */ + kSCSICmd_READ_BLOCK_LIMITS = 0x05, /* Sec. 5.3.6: Mandatory */ + kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ + kSCSICmd_READ_ELEMENT_STATUS = 0xB8, /* SMC: Optional */ + kSCSICmd_READ_ELEMENT_STATUS_ATTACHED = 0xB4, /* SMC: Optional */ + kSCSICmd_READ_POSITION = 0x34, /* Sec. 5.3.7: Mandatory */ + kSCSICmd_READ_REVERSE = 0x0F, /* Sec. 5.3.8: Optional */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ + kSCSICmd_RECOVER_BUFFERED_DATA = 0x14, /* Sec. 5.3.9: Optional */ + kSCSICmd_RELEASE_6 = 0x17, /* SPC: Mandatory */ + kSCSICmd_RELEASE_10 = 0x57, /* SPC: Mandatory */ + kSCSICmd_REPORT_DENSITY_SUPPORT = 0x44, /* Sec. 5.3.10: Mandatory*/ + kSCSICmd_REPORT_LUNS = 0xA0, /* SPC: Mandatory */ + kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ + kSCSICmd_RESERVE_6 = 0x16, /* SPC: Mandatory */ + kSCSICmd_RESERVE_10 = 0x56, /* SPC: Mandatory */ + kSCSICmd_REWIND = 0x01, /* Sec. 5.3.11: Mandatory*/ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ + kSCSICmd_SPACE = 0x11, /* Sec. 5.3.12: Mandatory*/ + kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ + kSCSICmd_VERIFY_6 = 0x13, /* Sec. 5.3.13: Optional */ + kSCSICmd_WRITE_6 = 0x0A, /* Sec. 5.3.14: Mandatory*/ + kSCSICmd_WRITE_BUFFER = 0x3B, /* SPC: Optional */ + kSCSICmd_WRITE_FILEMARKS = 0x10 /* Sec. 5.3.15: Mandatory*/ +}; +#endif + +#pragma mark - +#pragma mark 0x02 SSC Printer Commands +/* Commands defined by the T10:997-D SCSI-3 Stream Commands (SSC) command + * specification. The definitions and section numbers are based on section 6 + * of the revision 22, January 1, 2000 version of the specification. + */ +#if 0 +enum +{ + kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ + kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ + kSCSICmd_COPY = 0x18, /* SPC: Optional */ + kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional */ + kSCSICmd_FORMAT = 0x04, /* Sec. 6.2.1: Optional */ + kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ + kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ + kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Mandatory */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Mandatory */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* SPC: Optional */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* SPC: Optional */ + kSCSICmd_PRINT = 0x0A, /* Sec. 6.2.2: Mandatory */ + kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ + kSCSICmd_RECOVER_BUFFERED_DATA = 0x14, /* Sec. 6.2.3: Optional */ + kSCSICmd_RELEASE_6 = 0x17, /* SPC: Mandatory */ + kSCSICmd_RELEASE_10 = 0x57, /* SPC: Mandatory */ + kSCSICmd_REPORT_LUNS = 0xA0, /* SPC: Mandatory */ + kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ + kSCSICmd_RESERVE_6 = 0x16, /* SPC: Mandatory */ + kSCSICmd_RESERVE_10 = 0x56, /* SPC: Mandatory */ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ + kSCSICmd_SLEW_AND_PRINT = 0x0B, /* Sec. 6.2.4: Optional */ + kSCSICmd_STOP_PRINT = 0x1B, /* Sec. 6.2.5: Optional */ + kSCSICmd_SYNCHRONIZE_BUFFER = 0x10, /* Sec. 6.2.6: Optional */ + kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ + kSCSICmd_WRITE_BUFFER = 0x3B /* SPC: Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x03 SPC Processor Commands +/* Commands defined by the T10:1236-D SCSI Primary Commands-2 (SPC-2) + * command specification. The definitions and section numbers are based on + * section 9 of the revision 18, 21 May 2000 version of the specification. + */ +#if 0 +enum +{ + kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ + kSCSICmd_COMPARE = 0x39, /* Sec. 7.2: Optional */ + kSCSICmd_COPY = 0x18, /* Sec. 7.3: Optional */ + kSCSICmd_COPY_AND_VERIFY = 0x3A, /* Sec. 7.4: Optional */ + kSCSICmd_EXTENDED_COPY = 0x83, /* Sec. 7.5: Optional */ + kSCSICmd_INQUIRY = 0x12, /* Sec. 7.6: Mandatory */ + kSCSICmd_LOG_SELECT = 0x4C, /* Sec. 7.7: Optional */ + kSCSICmd_LOG_SENSE = 0x4D, /* Sec. 7.8: Optional */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Sec. 7.13: Optional */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Sec. 7.14: Optional */ + kSCSICmd_READ_BUFFER = 0x3C, /* Sec. 7.16: Optional */ + kSCSICmd_RECEIVE = 0x08, /* Sec. 9.2: Optional */ + kSCSICmd_RECEIVE_COPY_RESULTS = 0x84, /* Sec. 7.17: Optional */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* Sec. 7.18: Optional */ + kSCSICmd_RELEASE_10 = 0x57, /* Sec. 7.19: Optional */ + kSCSICmd_RELEASE_6 = 0x17, /* Sec. 7.20: Optional */ + kSCSICmd_REPORT_LUNS = 0xA0, /* Sec. 7.22: Optional */ + kSCSICmd_REQUEST_SENSE = 0x03, /* Sec. 7.23: Mandatory */ + kSCSICmd_RESERVE_10 = 0x56, /* Sec. 7.24: Optional */ + kSCSICmd_RESERVE_6 = 0x16, /* Sec. 7.25: Optional */ + kSCSICmd_SEND = 0x0A, /* Sec. 9.3: Optional */ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* Sec. 7.26: Mandatory */ + kSCSICmd_TEST_UNIT_READY = 0x00, /* Sec. 7.27: Mandatory */ + kSCSICmd_WRITE_BUFFER = 0x3B /* Sec. 7.29: Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x04 SBC Write Once Commands +/* Commands defined by the T10:990-D SCSI-3 Block Commands (SBC) command + * specification. The definitions and section numbers are based on section 6.3 + * of the revision 8c, 13 November 1997 version of the specification. + */ +#if 0 +enum +{ + kSCSICmd_CHANGE_DEFINITION = 0x40, /* SPC: Optional */ + kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ + kSCSICmd_COPY = 0x18, /* SPC: Optional */ + kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional*/ + kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ + kSCSICmd_LOCK_UNLOCK_CACHE = 0x36, /* Sec. 6.1.2: Optional */ + kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ + kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ + kSCSICmd_MEDIUM_SCAN = 0x38, /* Sec. 6.2.3: Optional */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Optional */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Optional */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ + kSCSICmd_MOVE_MEDIUM = 0xA5, /* SMC: Optional */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* SPC: Optional */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* SPC: Optional */ + kSCSICmd_PREFETCH = 0x34, /* Sec. 6.1.3: Optional */ + kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* SPC: Optional */ + kSCSICmd_READ_6 = 0x08, /* Sec. 6.1.4: Optional */ + kSCSICmd_READ_10 = 0x28, /* Sec. 6.1.5: Mandatory */ + kSCSICmd_READ_12 = 0xA8, /* Sec. 6.2.4: Optional */ + kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ + kSCSICmd_READ_CAPACITY = 0x25, /* Sec. 6.1.6: Mandatory */ + kSCSICmd_READ_ELEMENT_STATUS = 0xB8, /* SMC: Optional */ + kSCSICmd_READ_LONG = 0x3E, /* Sec. 6.1.8: Optional */ + kSCSICmd_REASSIGN_BLOCKS = 0x07, /* Sec. 6.1.9: Optional */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ + kSCSICmd_RELEASE_6 = 0x17, /* SPC: Optional */ + kSCSICmd_RELEASE_10 = 0x57, /* SPC: Mandatory */ + kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ + kSCSICmd_RESERVE_6 = 0x16, /* SPC: Optional */ + kSCSICmd_RESERVE_10 = 0x56, /* SPC: Mandatory */ + kSCSICmd_REZERO_UNIT = 0x01, /* Obsolete */ + kSCSICmd_SEARCH_DATA_EQUAL_10 = 0x31, /* Obsolete */ + kSCSICmd_SEARCH_DATA_EQUAL_12 = 0xB1, /* Obsolete */ + kSCSICmd_SEARCH_DATA_HIGH_10 = 0x30, /* Obsolete */ + kSCSICmd_SEARCH_DATA_HIGH_12 = 0xB0, /* Obsolete */ + kSCSICmd_SEARCH_DATA_LOW_10 = 0x32, /* Obsolete */ + kSCSICmd_SEARCH_DATA_LOW_12 = 0xB2, /* Obsolete */ + kSCSICmd_SEEK_6 = 0x0B, /* Obsolete */ + kSCSICmd_SEEK_10 = 0x2B, /* Sec. 6.1.12: Optional */ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ + kSCSICmd_SET_LIMITS_10 = 0x33, /* Sec. 6.1.13: Optional */ + kSCSICmd_SET_LIMITS_12 = 0xB3, /* Sec. 6.2.8: Optional */ + kSCSICmd_START_STOP_UNIT = 0x1B, /* Sec. 6.1.14: Optional */ + kSCSICmd_SYNCHRONIZE_CACHE = 0x35, /* Sec. 6.1.15: Optional */ + kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ + kSCSICmd_VERIFY_10 = 0x2F, /* Sec. 6.2.10: Optional */ + kSCSICmd_VERIFY_12 = 0xAF, /* Sec. 6.2.11: Optional */ + kSCSICmd_WRITE_6 = 0x0A, /* Sec. 6.1.17: Optional */ + kSCSICmd_WRITE_10 = 0x2A, /* Sec. 6.2.10: Mandatory*/ + kSCSICmd_WRITE_12 = 0xAA, /* Sec. 6.2.13: Optional */ + kSCSICmd_WRITE_AND_VERIFY_10 = 0x2E, /* Sec. 6.2.14: Optional */ + kSCSICmd_WRITE_AND_VERIFY_12 = 0xAE, /* Sec. 6.2.15: Optional */ + kSCSICmd_WRITE_BUFFER = 0x3B, /* SPC: Optional */ + kSCSICmd_WRITE_LONG = 0x3F /* Sec. 6.1.20: Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x05 MMC CD-ROM Commands +/* Commands defined by the T10:1363-D SCSI Multimedia Commands-3 (MMC-3) + * specification. The definitions and section numbers are based on section 6.1 + * of the revision 01, March 03, 2000 version of the specification. + * + * NOTE: The comments following each command may not be accurate. These are + * not from the MMC-3 specification, but have been derived from the SCSI-2 and + * original MMC specifications. Unlike the other SCSI command specifications, + * MMC-2 and MMC-3 do not provide a command requirement type and therefore does + * not relist the SPC commands with these requirements as they apply to MMC + * devices. The MMC-2 and MMC-3 specifications also refer back to the SBC + * specification which seems invalid since MMC devices do not represent a + * Peripheral Device Type defined by SBC. It is assumed that the SBC + * references refer to the Peripheral Device Type 0x00 - Direct Access Commands + * definitions from that specification. + */ +#if 0 +enum +{ + kSCSICmd_BLANK = 0xA1, /* Sec. 6.1.1: */ + kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ + kSCSICmd_CLOSE_TRACK_SESSION = 0x5B, /* Sec. 6.1.2: */ + kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ + kSCSICmd_COPY = 0x18, /* SPC: Optional */ + kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional */ + kSCSICmd_ERASE = 0x2C, /* SBC: */ + kSCSICmd_FORMAT_UNIT = 0x04, /* Sec. 6.1.3: */ + kSCSICmd_GET_CONFIGURATION = 0x46, /* Sec. 6.1.4: */ + kSCSICmd_GET_EVENT_STATUS_NOTIFICATION = 0x4A, /* Sec. 6.1.5: */ + kSCSICmd_GET_PERFORMANCE = 0xAC, /* Sec. 6.1.6: */ + kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ + kSCSICmd_LOAD_UNLOAD_MEDIUM = 0xA6, /* Sec. 6.1.7: */ + kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ + kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ + kSCSICmd_MECHANISM_STATUS = 0xBD, /* Sec. 6.1.8: */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Mandatory */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Mandatory */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Mandatory */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Mandatory */ + kSCSICmd_PAUSE_RESUME = 0x4B, /* Sec. 6.1.9: */ + kSCSICmd_PLAY_AUDIO_10 = 0x45, /* Sec. 6.1.10: */ + kSCSICmd_PLAY_AUDIO_12 = 0xA5, /* Sec. 6.1.11: */ + kSCSICmd_PLAY_AUDIO_MSF = 0x47, /* Sec. 6.1.12: */ + kSCSICmd_PLAY_AUDIO_TRACK_INDEX = 0x48, /* Obsolete */ + kSCSICmd_PLAY_CD = 0xBC, /* Sec. 6.1.13: */ + kSCSICmd_PLAY_RELATIVE_10 = 0x49, /* Obsolete */ + kSCSICmd_PLAY_RELATIVE_12 = 0xA9, /* Obsolete */ + kSCSICmd_PREFETCH = 0x34, /* Optional */ + kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* Optional */ + kSCSICmd_READ_6 = 0x08, /* Optional */ + kSCSICmd_READ_10 = 0x28, /* Mandatory */ + kSCSICmd_READ_12 = 0xA8, /* Optional */ + kSCSICmd_READ_BUFFER = 0x3C, /* Optional */ + kSCSICmd_READ_BUFFER_CAPACITY = 0x5C, /* Sec. 6.1.15: */ + kSCSICmd_READ_CD = 0xBE, /* Sec. 6.1.16: */ + kSCSICmd_READ_CD_MSF = 0xB9, /* Sec. 6.1.17: */ + kSCSICmd_READ_CAPACITY = 0x25, /* Sec. 6.1.18: */ + kSCSICmd_READ_DISC_INFORMATION = 0x51, /* Sec. 6.1.19: */ + kSCSICmd_READ_DVD_STRUCTURE = 0xAD, /* Sec. 6.1.20: */ + kSCSICmd_READ_DISC_STRUCTURE = 0xAD, /* Sec. 6.1.20: */ + kSCSICmd_READ_FORMAT_CAPACITIES = 0x23, /* Sec. 6.1.21: */ + kSCSICmd_READ_HEADER = 0x44, /* Sec. 6.1.22: */ + kSCSICmd_READ_LONG = 0x3E, /* Optional */ + kSCSICmd_READ_MASTER_CUE = 0x59, /* Sec. 6.1.23: */ + kSCSICmd_READ_SUB_CHANNEL = 0x42, /* Sec. 6.1.24: */ + kSCSICmd_READ_TOC_PMA_ATIP = 0x43, /* Sec. 6.1.25: */ + kSCSICmd_READ_TRACK_INFORMATION = 0x52, /* Sec. 6.1.27: */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* Optional */ + kSCSICmd_RELEASE_6 = 0x17, /* Mandatory */ + kSCSICmd_RELEASE_10 = 0x57, /* Optional */ + kSCSICmd_REPAIR_TRACK = 0x58, /* Sec. 6.1.28: */ + kSCSICmd_REPORT_KEY = 0xA4, /* Sec. 6.1.29: */ + kSCSICmd_REQUEST_SENSE = 0x03, /* Mandatory */ + kSCSICmd_RESERVE_6 = 0x16, /* Mandatory */ + kSCSICmd_RESERVE_10 = 0x56, /* Optional */ + kSCSICmd_RESERVE_TRACK = 0x53, /* Sec. 6.1.30: */ + kSCSICmd_SCAN_MMC = 0xBA, /* Sec. 6.1.31: */ + kSCSICmd_SEARCH_DATA_EQUAL_10 = 0x31, /* Obsolete */ + kSCSICmd_SEARCH_DATA_EQUAL_12 = 0xB1, /* Obsolete */ + kSCSICmd_SEARCH_DATA_HIGH_10 = 0x30, /* Obsolete */ + kSCSICmd_SEARCH_DATA_HIGH_12 = 0xB0, /* Obsolete */ + kSCSICmd_SEARCH_DATA_LOW_10 = 0x32, /* Obsolete */ + kSCSICmd_SEARCH_DATA_LOW_12 = 0xB2, /* Obsolete */ + kSCSICmd_SEEK_6 = 0x0B, /* Obsolete */ + kSCSICmd_SEEK_10 = 0x2B, /* SBC: */ + kSCSICmd_SEND_CUE_SHEET = 0x5D, /* Sec. 6.1.32: */ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* Mandatory */ + kSCSICmd_SEND_DVD_STRUCTURE = 0xBF, /* Sec. 6.1.33: */ + kSCSICmd_SEND_EVENT = 0xA2, /* Sec. 6.1.34: */ + kSCSICmd_SEND_KEY = 0xA3, /* Sec. 6.1.35: */ + kSCSICmd_SEND_OPC_INFORMATION = 0x54, /* Sec. 6.1.36: */ + kSCSICmd_SET_CD_SPEED = 0xBB, /* Sec. 6.1.37: */ + kSCSICmd_SET_LIMITS_10 = 0x33, /* Optional */ + kSCSICmd_SET_LIMITS_12 = 0xB3, /* Optional */ + kSCSICmd_SET_READ_AHEAD = 0xA7, /* Sec. 6.1.38: */ + kSCSICmd_SET_STREAMING = 0xB6, /* Sec. 6.1.39: */ + kSCSICmd_START_STOP_UNIT = 0x1B, /* Optional */ + kSCSICmd_STOP_PLAY_SCAN = 0x4E, /* Sec. 6.1.40: */ + kSCSICmd_SYNCHRONIZE_CACHE = 0x35, /* Sec. 6.1.41: */ + kSCSICmd_TEST_UNIT_READY = 0x00, /* Mandatory */ + kSCSICmd_VERIFY_10 = 0x2F, /* Optional */ + kSCSICmd_VERIFY_12 = 0xAF, /* Optional */ + kSCSICmd_WRITE_10 = 0x2A, /* Sec. 6.1.42: */ + kSCSICmd_WRITE_12 = 0xAA, /* Sec. 6.1.43: */ + kSCSICmd_WRITE_AND_VERIFY_10 = 0x2E, /* Sec. 6.1.44: */ + kSCSICmd_WRITE_BUFFER = 0x3B /* Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x06 SGC Scanner Commands +/* Commands defined by the T10:998-D SCSI-3 Graphics Commands (SGC) + * specification. The definitions and section numbers are based on section 6 + * of the revision 0, April 1995 version of the specification. + */ +#if 0 +enum +{ + kSCSICmd_CHANGE_DEFINITION = 0x40, /* SPC: Optional */ + kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ + kSCSICmd_COPY = 0x18, /* SPC: Optional */ + kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional */ + kSCSICmd_GET_DATA_BUFFER_STATUS = 0x34, /* Sec. 6.1.1: Optional */ + kSCSICmd_GET_WINDOW = 0x25, /* Sec. 6.1.2: Optional */ + kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ + kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ + kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Optional */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Optional */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ + kSCSICmd_OBJECT_POSITION = 0x31, /* Sec. 6.1.3: Optional */ + kSCSICmd_PORT_STATUS = 0x11, /* SPC (??): Mandatory + * for dual port devices */ + kSCSICmd_READ = 0x28, /* Sec. 6.1.4: Mandatory */ + kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ + kSCSICmd_RELEASE_6 = 0x17, /* SPC: Mandatory */ + kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ + kSCSICmd_RESERVE_6 = 0x16, /* SPC: Mandatory */ + kSCSICmd_SCAN = 0x1B, /* Sec. 6.1.5: Optional */ + kSCSICmd_SEND = 0x1B, /* Sec. 6.1.6: Optional */ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ + kSCSICmd_SET_WINDOW = 0x24, /* Sec. 6.1.7: Mandatory */ + kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ + kSCSICmd_WRITE_BUFFER = 0x3B /* SPC: Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x07 SBC Optical Media Commands +/* Commands defined by the T10:990-D SCSI-3 Block Commands (SBC) + * (revision 8c, 13 November 1998) command specification. + */ + +#pragma mark - +#pragma mark 0x08 SMC Medium Changer Commands +/* Commands defined by the T10:1228-D SCSI-3 Medium Changer Commands-2 (SMC-2) + * (revision 0, March 16, 2000) command specification. + */ +#if 0 +enum +{ + /* Commands For Independent Medium Changers */ + kSCSICmd_EXCHANGE_MEDIUM = 0xA6, /* Optional */ + kSCSICmd_INITIALIZE_ELEMENT_STATUS = 0x07, /* Optional */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* Optional */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* Optional */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* Optional */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* Optional */ + kSCSICmd_MOVE_MEDIUM = 0xA5, /* Mandatory */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Optional */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Optional */ + kSCSICmd_POSITION_TO_ELEMENT = 0x2B, /* Optional */ + kSCSICmd_READ_ELEMENT_STATUS = 0xB8, /* Mandatory */ + kSCSICmd_RELEASE_ELEMENT_6 = 0x16, /* Optional */ + kSCSICmd_RELEASE_ELEMENT_10 = 0x56, /* Optional */ + kSCSICmd_REQUEST_VOLUME_ELEMENT_ADDRESS = 0xB5, /* Optional */ + kSCSICmd_REQUEST_SENSE = 0x03, /* Mandatory */ + kSCSICmd_RESERVE_ELEMENT_6 = 0x16, /* Optional */ + kSCSICmd_RESERVE_ELEMENT_10 = 0x56 /* Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x09 SSC Communications Commands +/* Commands defined by the T10:997-D SCSI-3 Stream Commands (SSC) + * (revision 22, January 1, 2000) command specification. + */ + +#pragma mark - +#pragma mark 0x0A ASC IT8 Prepress Commands +#pragma mark 0x0B ASC IT8 Prepress Commands +/* Commands defined by the ASC IT8 <title goes here> specification + * (revision xx, month day, year) command specification. + */ +#if 0 +enum +{ +}; +#endif + +#pragma mark - +#pragma mark 0x0C SCC Array Controller Commands +/* Commands defined by the ANSI NCITS.318-199x SCSI Controller + * Commands (SCC-2) ratified command specification. + */ +#if 0 +enum +{ + kSCSICmd_MAINTENANCE_IN = 0xA3, /* Mandatory */ + kSCSICmd_MAINTENANCE_OUT = 0xA4, /* Optional */ + kSCSICmd_MODE_SELECT_6 = 0x15, /* Optional */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* Optional */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* Optional */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* Optional */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Optional */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Optional */ + kSCSICmd_PORT_STATUS = 0x1F, /* Optional */ + kSCSICmd_REDUNDANCY_GROUP_IN = 0xBA, /* Mandatory */ + kSCSICmd_REDUNDANCY_GROUP_OUT = 0xBB, /* Optional */ + kSCSICmd_RELEASE_6 = 0x17, /* Optional */ + kSCSICmd_RELEASE_10 = 0x57, /* Optional */ + kSCSICmd_REPORT_LUNS = 0xA0, /* Mandatory */ + kSCSICmd_REQUEST_SENSE = 0x03, /* Mandatory */ + kSCSICmd_RESERVE_6 = 0x16, /* Optional */ + kSCSICmd_RESERVE_10 = 0x56, /* Optional*/ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* Optional */ + kSCSICmd_SPARE_IN = 0xBC, /* Mandatory */ + kSCSICmd_SPARE_OUT = 0xBD /* Optional */ +}; +#endif + +#pragma mark - +#pragma mark 0x0D SES Enclosure Services Commands +/* Commands defined by the T10:1212-D SCSI-3 Enclosure Services (SES) + * (revision 8b, February 11, 1998) command specification. + */ +#if 0 +enum +{ + kSCSICmd_MODE_SELECT_6 = 0x15, /* Optional */ + kSCSICmd_MODE_SELECT_10 = 0x55, /* Optional */ + kSCSICmd_MODE_SENSE_6 = 0x1A, /* Optional */ + kSCSICmd_MODE_SENSE_10 = 0x5A, /* Optional */ + kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Optional */ + kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Optional */ + kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x17, /* Mandatory */ + kSCSICmd_RELEASE_6 = 0x17, /* Optional */ + kSCSICmd_RELEASE_10 = 0x57, /* Optional */ + kSCSICmd_REQUEST_SENSE = 0x03, /* Mandatory */ + kSCSICmd_RESERVE_6 = 0x16, /* Optional */ + kSCSICmd_RESERVE_10 = 0x56, /* Optional */ + kSCSICmd_SEND_DIAGNOSTICS = 0x1D /* Mandatory */ +}; +#endif + +#pragma mark - +#pragma mark 0x0E RBC Reduced Block Commands +/* Commands defined by the T10:1240-D Reduced Block Commands (RBC) + * (revision 10a, August 18, 1999) command specification. + */ +#if 0 +enum +{ + kSCSICmd_FORMAT_UNIT = 0x04, /* Optional */ + kSCSICmd_READ_10 = 0x28, /* Mandatory */ + kSCSICmd_READ_CAPACITY = 0x25, /* Mandatory */ + kSCSICmd_START_STOP_UNIT = 0x1B, /* Mandatory */ + kSCSICmd_SYNCHRONIZE_CACHE = 0x35, /* Optional */ + kSCSICmd_VERIFY_10 = 0x2F, /* Mandatory */ + kSCSICmd_WRITE_10 = 0x2A, /* Mandatory */ + kSCSICmd_WRITE_BUFFER = 0x3B /* Mandatory for fixed media + * Optional for removable */ +}; +#endif + +#pragma mark - +#pragma mark 0x0F OCRW Optical Card Commands +/* Commands defined by the ISO/IEC 14776-381 SCSI Specification for + * Optical Card Reader/Writer (OCRW) ratified command specification. + */ +#if 0 +enum +{ +}; +#endif + +#pragma mark - +#pragma mark 0x11 OSD Object-based Storage Commands +/* Commands defined by the T10:1355-D Object-based Storage Commands (OSD) + * (revision 1, 18 May 2000) command specification. + */ +#if 0 +enum +{ +}; +#endif + +#pragma mark - +#pragma mark 0x15 RMC Simplified Multimedia Commands +/* Commands defined by the T10:1364-D Reduced Multimedia Commands (RMC) + * (revision 1, November 11, 1999) command specification. + */ +#if 0 +enum +{ +}; +#endif + +#endif /* _SCSI_COMMAND_OPERATION_CODES_H_ */ diff --git a/i386/include/IOKit/scsi/SCSIPort.h b/i386/include/IOKit/scsi/SCSIPort.h new file mode 100644 index 0000000..8eefbeb --- /dev/null +++ b/i386/include/IOKit/scsi/SCSIPort.h @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2004-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_SCSI_PORTS_H_ +#define _IOKIT_SCSI_PORTS_H_ + + +/*! @header SCSIPort + @discussion + This file contains all the definitions for SCSIPort notifications and status. +*/ + + +/*! +@enum kSCSIPort_NotificationStatusChange +@discussion +Message definition to be used with the messageClients +call to inform of a change in port status. +*/ +enum +{ + kSCSIPort_NotificationStatusChange = 0x68000001 +}; + + +/*! @typedef SCSIPortStatus + @abstract 32-bit number to represent a SCSIPortStatus. + @discussion Type for SCSIPortStatus. +*/ + +typedef UInt32 SCSIPortStatus; + +/*! @enum SCSI Port Status Values + @discussion Definitions for the possible port status values +*/ +enum +{ + /*! + @constant kSCSIPort_StatusOnline + The port is online. + */ + kSCSIPort_StatusOnline = 0, + + /*! + @constant kSCSIPort_StatusOffline + The port is offline (e.g. unplugged cable). + */ + kSCSIPort_StatusOffline = 1, + + /*! + @constant kSCSIPort_StatusFailure + Driver has detected unrecoverable port failure (e.g. hardware port failure) + */ + kSCSIPort_StatusFailure = 2 +}; + +#endif /* _IOKIT_SCSI_PORTS_H_ */ diff --git a/i386/include/IOKit/scsi/SCSITask.h b/i386/include/IOKit/scsi/SCSITask.h new file mode 100644 index 0000000..154c187 --- /dev/null +++ b/i386/include/IOKit/scsi/SCSITask.h @@ -0,0 +1,456 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_SCSI_TASK_H_ +#define _IOKIT_SCSI_TASK_H_ + + +#if KERNEL +#include <IOKit/IOTypes.h> +#else +#include <CoreFoundation/CoreFoundation.h> +#endif + + +/*! @header SCSITask +SCSITask typedefs and constants used inside the kernel and user space. + +Note that the SCSITaskIdentifier is an opaque object and that directly +casting the SCSITaskIdentifier to any other type is discouraged. The SCSITask +implementation changes when necessary to accomodate architectural changes, +performance improvements, and bug fixes. + +Device and protocol layer drivers that need to access information +contained in a SCSITask should use the appropriate accessor methods in +IOSCSIPrimaryCommandsDevice.h or IOSCSIProtocolServices.h +*/ + + +/*! @typedef SCSIDeviceIdentifier + @abstract 64-bit number to represent a SCSI Device. + @discussion If the identifier can either be that of an initiator or a target, + SCSIDeviceIdentifier should be used. +*/ + +typedef UInt64 SCSIDeviceIdentifier; + +/*! @typedef SCSITargetIdentifier + @abstract 64-bit number to represent a SCSI Target Device. + @discussion If the identifier is for a target only and not an initiator, then + SCSITargetIdentifier should be used. +*/ + +typedef SCSIDeviceIdentifier SCSITargetIdentifier; + +/*! @typedef SCSIInitiatorIdentifier + @abstract 64-bit number to represent a SCSI Initiator Device. + @discussion If the identifier is for an initiator only and not a target, then + SCSIInitiatorIdentifier should be used. +*/ + +typedef SCSIDeviceIdentifier SCSIInitiatorIdentifier; + +/*! @typedef SCSILogicalUnitNumber + @abstract 64-bit number to represent a logical unit. + @discussion 64-bit number to represent a logical unit. +*/ + +typedef UInt64 SCSILogicalUnitNumber; + +/*! @typedef SCSITaggedTaskIdentifier + @abstract 64-bit number to represent a unique task identifier. + @discussion The Tagged Task Identifier is used when a Task has a Task Attribute other + than SIMPLE. The SCSI Application Layer client that controls the Logical + Unit for which a Task is intended is required to guarantee that the Task + Tag Identifier is unique. Zero cannot be used a a Tag value as this is used + to when a Tagged Task Identifier value is needed for a Task with a SIMPLE + attribute. +*/ + +typedef UInt64 SCSITaggedTaskIdentifier; + +/*! + @enum Untagged Task Identifier + @discussion The Untagged Task Identifier is used to indicate no unique tag + is associated with the Task. + @constant kSCSIUntaggedTaskIdentifier This value means the task is untagged. + */ + +enum +{ + kSCSIUntaggedTaskIdentifier = 0 +}; + +/*! + @typedef SCSITaskAttribute + @abstract Attributes for task delivery. + @discussion The Task Attribute defines how this task should be managed + when determing order for queueing and submission to the + appropriate device server. The Task Attribute is set by the SCSI + Application Layer and cannot be modified by the SCSI Protocol Layer. + @constant kSCSITask_SIMPLE The task has a simple attribute. + @constant kSCSITask_ORDERED The task has an ordered attribute. + @constant kSCSITask_HEAD_OF_QUEUE The task has a head-of-queue attribute. + @constant kSCSITask_ACA The task has an auto-contingent-allegiance attribute. + */ + +typedef enum SCSITaskAttribute +{ + kSCSITask_SIMPLE = 0, + kSCSITask_ORDERED = 1, + kSCSITask_HEAD_OF_QUEUE = 2, + kSCSITask_ACA = 3 +} SCSITaskAttribute; + +/*! + @typedef SCSITaskState + @abstract Attributes for task state. + @discussion The Task State represents the current state of the task. + The state is set to NEW_TASK when the task is created. The SCSI Protocol + Layer will then adjust the state as the task is queued and during + execution. The SCSI Application Layer can examine the state to monitor + the progress of a task. The Task State can only be modified by the SCSI + Protocol Layer. The SCSI Application Layer can only read the state. + @constant kSCSITaskState_NEW_TASK The task state is new task. + @constant kSCSITaskState_ENABLED The task is enabled and queued. + @constant kSCSITaskState_BLOCKED The task is blocked. + @constant kSCSITaskState_DORMANT The task is dormant. + @constant kSCSITaskState_ENDED The task is complete. + */ + +typedef enum SCSITaskState +{ + kSCSITaskState_NEW_TASK = 0, + kSCSITaskState_ENABLED = 1, + kSCSITaskState_BLOCKED = 2, + kSCSITaskState_DORMANT = 3, + kSCSITaskState_ENDED = 4 +} SCSITaskState; + + +/*! + @typedef SCSIServiceResponse + @abstract Attributes for task service response. + @discussion The Service Response represents the execution status of + a service request made to a Protocol Services Driver. The Service + Response can only be modified by the SCSI Protocol Layer. The SCSI + Application Layer can only read the state. + */ + +typedef enum SCSIServiceResponse +{ + /*! + @constant kSCSIServiceResponse_Request_In_Process + Not defined in SAM specification, but is a service response used + for asynchronous commands that are not yet completed. + */ + kSCSIServiceResponse_Request_In_Process = 0, + + /*! + @constant kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE + The service request failed because of a delivery or target failure. + */ + kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE = 1, + + /*! + @constant kSCSIServiceResponse_TASK_COMPLETE + The task completed. + */ + kSCSIServiceResponse_TASK_COMPLETE = 2, + + /*! + @constant kSCSIServiceResponse_LINK_COMMAND_COMPLETE + The linked command completed. + */ + kSCSIServiceResponse_LINK_COMMAND_COMPLETE = 3, + + /*! + @constant kSCSIServiceResponse_FUNCTION_COMPLETE + The task management function completed. + */ + kSCSIServiceResponse_FUNCTION_COMPLETE = 4, + + /*! + @constant kSCSIServiceResponse_FUNCTION_REJECTED + The task management function was rejected. + */ + kSCSIServiceResponse_FUNCTION_REJECTED = 5 +} SCSIServiceResponse; + +/*! + @typedef SCSITaskStatus + @abstract Attributes for task status. + @discussion The Task Status represents the completion status + of the task which provides the SCSI Application Layer with + additional information about how to procede in handling a + completed task. + + The SCSI Architecture Model specification only defines task + status values for when a task completes with a service response + of either TASK_COMPLETED or LINK_COMMAND_COMPLETE. + + Since additional information will aid in error recovery when + a task fails to be completed by a device due to a service + response of kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE, + additional values have been defined that can be returned by the + SCSI Protocol Layer to inform the SCSI Application Layer of the + cause of the delivery failure. + + The Task Status can only be modified by the SCSI Protocol Layer. + The SCSI Application Layer can only read the status +*/ +typedef enum SCSITaskStatus +{ + + /*! + @constant kSCSITaskStatus_GOOD + The task completed with a status of GOOD. + */ + + kSCSITaskStatus_GOOD = 0x00, + + /*! + @constant kSCSITaskStatus_CHECK_CONDITION + The task completed with a status of CHECK_CONDITION. Additional + information about the condition should be available in the sense data. + */ + + kSCSITaskStatus_CHECK_CONDITION = 0x02, + + /*! + @constant kSCSITaskStatus_CONDITION_MET + The task completed with a status of CONDITION_MET. + */ + + kSCSITaskStatus_CONDITION_MET = 0x04, + + /*! + @constant kSCSITaskStatus_BUSY + The task completed with a status of BUSY. The device server might need + time to process a request and a delay may be required. + */ + kSCSITaskStatus_BUSY = 0x08, + + /*! + @constant kSCSITaskStatus_INTERMEDIATE + The task completed with a status of INTERMEDIATE. + */ + kSCSITaskStatus_INTERMEDIATE = 0x10, + + /*! + @constant kSCSITaskStatus_INTERMEDIATE_CONDITION_MET + The task completed with a status of INTERMEDIATE_CONDITION_MET. + */ + kSCSITaskStatus_INTERMEDIATE_CONDITION_MET = 0x14, + + /*! + @constant kSCSITaskStatus_RESERVATION_CONFLICT + The task completed with a status of RESERVATION_CONFLICT. + */ + kSCSITaskStatus_RESERVATION_CONFLICT = 0x18, + + /*! + @constant kSCSITaskStatus_TASK_SET_FULL + The task completed with a status of TASK_SET_FULL. The device server + may need to complete a task before the initiator sends another. + */ + kSCSITaskStatus_TASK_SET_FULL = 0x28, + + /*! + @constant kSCSITaskStatus_ACA_ACTIVE + The task completed with a status of ACA_ACTIVE. The device server may + need the initiator to clear the Auto-Contingent Allegiance condition + before it will respond to new commands. + */ + kSCSITaskStatus_ACA_ACTIVE = 0x30, + + /*! + @constant kSCSITaskStatus_TaskTimeoutOccurred + If a task is aborted by the SCSI Protocol Layer due to it exceeding + the timeout value specified by the task, the task status shall be + set to kSCSITaskStatus_TaskTimeoutOccurred. + */ + + kSCSITaskStatus_TaskTimeoutOccurred = 0x01, + + /*! + @constant kSCSITaskStatus_ProtocolTimeoutOccurred + If a task is aborted by the SCSI Protocol Layer due to it exceeding a + timeout value specified by the support for the protocol or a related + specification, the task status shall be set to + kSCSITaskStatus_ProtocolTimeoutOccurred. + */ + + kSCSITaskStatus_ProtocolTimeoutOccurred = 0x02, + + /*! + @constant kSCSITaskStatus_DeviceNotResponding + If a task is unable to be delivered due to a failure of the device not + accepting the task or the device acknowledging the attempt to send it the + device the task status shall be set to kSCSITaskStatus_DeviceNotResponding. + This will allow the SCSI Application driver to perform the necessary steps + to try to recover the device. This shall only be reported after the SCSI + Protocol Layer driver has attempted all protocol specific attempts to recover + the device. + */ + + kSCSITaskStatus_DeviceNotResponding = 0x03, + + /*! + @constant kSCSITaskStatus_DeviceNotPresent + If the task is unable to be delivered because the device has been + detached, the task status shall be set to kSCSITaskStatus_DeviceNotPresent. + This will allow the SCSI Application Layer to halt the sending of tasks + to the device and, if supported, perform any device failover or system + cleanup. + */ + kSCSITaskStatus_DeviceNotPresent = 0x04, + + /*! + @constant kSCSITaskStatus_DeliveryFailure + If the task is unable to be + delivered to the device due to a failure in the SCSI Protocol Layer, + such as a bus reset or communications error, but the device is is + known to be functioning properly, the task status shall be set to + kSCSITaskStatus_DeliveryFailure. This can also be reported if the + task could not be delivered due to a protocol error that has since + been corrected. + */ + kSCSITaskStatus_DeliveryFailure = 0x05, + + /*! + @constant kSCSITaskStatus_No_Status + This status is not defined by + the SCSI specifications, but is here to provide a status that can + be returned in cases where there is not status available from the + device or protocol, for example, when the service response is + neither TASK_COMPLETED nor LINK_COMMAND_COMPLETE or when the + service response is SERVICE_DELIVERY_OR_TARGET_FAILURE and the + reason for failure could not be determined. + */ + kSCSITaskStatus_No_Status = 0xFF +} SCSITaskStatus; + +/*! + @enum Command Descriptor Block Size + @discussion Command Descriptor Block Size constants. +*/ +enum +{ + /*! + @constant kSCSICDBSize_Maximum This is the largest size a Command Descriptor + Block can be as specified in SPC-2. + */ + kSCSICDBSize_Maximum = 16, + + /*! + @constant kSCSICDBSize_6Byte Use this for a 6-byte CDB. + */ + kSCSICDBSize_6Byte = 6, + + /*! + @constant kSCSICDBSize_10Byte Use this for a 10-byte CDB. + */ + kSCSICDBSize_10Byte = 10, + + /*! + @constant kSCSICDBSize_12Byte Use this for a 12-byte CDB. + */ + kSCSICDBSize_12Byte = 12, + + /*! + @constant kSCSICDBSize_16Byte Use this for a 16-byte CDB. + */ + kSCSICDBSize_16Byte = 16 +}; + +typedef UInt8 SCSICommandDescriptorBlock[kSCSICDBSize_Maximum]; + +/*! + @enum Data Transfer Direction + @discussion DataTransferDirection constants. +*/ +enum +{ + /*! + @constant kSCSIDataTransfer_NoDataTransfer Use this for tasks + that transfer no data. + */ + kSCSIDataTransfer_NoDataTransfer = 0x00, + + /*! + @constant kSCSIDataTransfer_FromInitiatorToTarget Use this for tasks that transfer + data from the initiator to the target. + */ + kSCSIDataTransfer_FromInitiatorToTarget = 0x01, + + /*! + @constant kSCSIDataTransfer_FromTargetToInitiator Use this for tasks that transfer + data from the target to the initiator. + */ + kSCSIDataTransfer_FromTargetToInitiator = 0x02 +}; + + +#if defined(KERNEL) && defined(__cplusplus) + +/* Libkern includes */ +#include <libkern/c++/OSObject.h> + + +/*! + @enum SCSITaskMode + @discussion The SCSI Task mode is used by the SCSI + Protocol Layer to indicate what mode the task is executing. +*/ +typedef enum SCSITaskMode +{ + kSCSITaskMode_CommandExecution = 1, + kSCSITaskMode_Autosense = 2 +} SCSITaskMode; + +/*! + @typedef SCSITaskIdentifier + @discussion This is an opaque object that represents a task. + This is used so that drivers for both the SCSI Protocol Layer + and the SCSI Application Layer cannot modify the SCSITask object + directly but must instead use the inherited methods to do so. This + allows the implementation of SCSITask to change without directly + impacting device and protocol layer drivers. In addition, it + prevents changing of properties that are not allowed to be + changed by a given layer. +*/ +typedef OSObject * SCSITaskIdentifier; + + +/*! + @typedef SCSITaskCompletion + @discussion This is the typedef for completion routines that + work with SCSITaskIdentifiers. +*/ +typedef void ( *SCSITaskCompletion )( SCSITaskIdentifier completedTask ); + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_SCSI_TASK_H_ */ diff --git a/i386/include/IOKit/scsi/spi/.svn/all-wcprops b/i386/include/IOKit/scsi/spi/.svn/all-wcprops new file mode 100644 index 0000000..b14b4a8 --- /dev/null +++ b/i386/include/IOKit/scsi/spi/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 61 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/spi +END +IOSCSIParallelInterfaceController.h +K 25 +svn:wc:ra_dav:version-url +V 97 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/spi/IOSCSIParallelInterfaceController.h +END diff --git a/i386/include/IOKit/scsi/spi/.svn/entries b/i386/include/IOKit/scsi/spi/.svn/entries new file mode 100644 index 0000000..49bbda1 --- /dev/null +++ b/i386/include/IOKit/scsi/spi/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +2117 +http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/scsi/spi +http://forge.voodooprojects.org/svn/chameleon + + + +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + +b5af796a-00a8-11df-919b-ffff7a100b7d + +IOSCSIParallelInterfaceController.h +file + + + + +2012-10-03T17:50:21.000000Z +bce86d456d916867cf05e6e916d27b7f +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +59066 + diff --git a/i386/include/IOKit/scsi/spi/.svn/text-base/IOSCSIParallelInterfaceController.h.svn-base b/i386/include/IOKit/scsi/spi/.svn/text-base/IOSCSIParallelInterfaceController.h.svn-base new file mode 100644 index 0000000..0bd7981 --- /dev/null +++ b/i386/include/IOKit/scsi/spi/.svn/text-base/IOSCSIParallelInterfaceController.h.svn-base @@ -0,0 +1,1568 @@ +/* + * Copyright (c) 2002-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __IOKIT_IO_SCSI_PARALLEL_INTERFACE_CONTROLLER_H__ +#define __IOKIT_IO_SCSI_PARALLEL_INTERFACE_CONTROLLER_H__ + + + /*! + @header IOSCSIParallelInterfaceController + The IOSCSIParallelInterfaceController class and the associated HBA child + class is responsible for the management of all related hardware. This + includes the onboard HBA controller chip and the physical state of the + bus. These classes are not responsible for any of the management of + the SCSI Devices on the bus with the exception of maintaining the queue that + holds the objects representing those SCSI Devices. +*/ + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// General IOKit includes +#include <IOKit/IOService.h> +#include <IOKit/IOWorkLoop.h> +#include <IOKit/IOCommandGate.h> +#include <IOKit/IODMACommand.h> +#include <IOKit/IOInterruptEventSource.h> +#include <IOKit/IOFilterInterruptEventSource.h> +#include <IOKit/IOTimerEventSource.h> +#include <IOKit/IOCommandPool.h> + +// IOKit SCSI ArchitectureModel Family includes +#include <IOKit/scsi/SCSITask.h> +#include <IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h> +#include <IOKit/scsi/SCSIPort.h> + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + + +#define kIOPropertySCSIDeviceFeaturesKey "SCSI Device Features" +#define kIOPropertySCSI_I_T_NexusFeaturesKey "SCSI I_T Nexus Features" + +// This is the alignment mask used when allocating per-task HBA data. It allows +// the HBA to declare whether or not it supports 64-bit addressability and what the +// minimum byte alignment is for the data. E.g. By specifying 0x0000FFFFFFFFFFFEULL, +// the controller would be indicating that it supports 48-bits of addressability, but +// at a minimum of being 2-byte aligned. +#define kIOMinimumHBADataAlignmentMaskKey "HBA Data Alignment" + +// The Feature Selectors used to identify features of the SCSI Parallel +// Interface. These are used by the DoesHBASupportSCSIParallelFeature +// to report whether the HBA supports a given SCSI Parallel Interface +// feature and are used for requesting negotiation and reporting negotiation +// results between the controller and the device. + +// When the DoesHBASupportSCSIParallelFeature() member routine of the controller +// child class is called, it will return true if the HBA that it controls +// supports the specified SCSIParallelFeature or false if it does not. +typedef enum SCSIParallelFeature +{ + // The selector for support of Wide Data Transfers. Only Wide16 is supported + // as Wide32 has been obsoleted by the SPI-3 specification. + kSCSIParallelFeature_WideDataTransfer = 0, + + // The selector for support of Synchronous Data Transfers. + kSCSIParallelFeature_SynchronousDataTransfer = 1, + + // The selector for support of Quick Arbitration and Selection (QAS). + kSCSIParallelFeature_QuickArbitrationAndSelection = 2, + + // The selector for support of Double Transition (DT) data transfers. + kSCSIParallelFeature_DoubleTransitionDataTransfers = 3, + + // The selector for SPI Information Unit (IU) transfers. + kSCSIParallelFeature_InformationUnitTransfers = 4, + + // Since the Feature selectors are zero base, this will always have the + // correct total. + kSCSIParallelFeature_TotalFeatureCount +} SCSIParallelFeature; + + +typedef enum SCSIParallelFeatureRequest +{ + // This selector indicates that current negotiation + // should be used. + kSCSIParallelFeature_NoNegotiation = 0, + + // This selector indicates that the controller + // should attempt negotiation for the feature + kSCSIParallelFeature_AttemptNegotiation = 1, + + // This selector indicates that the controller + // should clear any negotiation for the feature + kSCSIParallelFeature_ClearNegotiation = 2 +}; + +typedef enum SCSIParallelFeatureResult +{ + kSCSIParallelFeature_NegotitiationUnchanged = 0, + kSCSIParallelFeature_NegotitiationCleared = 1, + kSCSIParallelFeature_NegotitiationSuccess = 2 +}; + + +// The SCSI Message Codes used for MESSAGE IN and MESSAGE OUT phases. +enum SCSIParallelMessages +{ + // Link Control Messages + kSCSIParallelMessage_TASK_COMPLETE = 0x00, + kSCSIParallelMessage_EXTENDED_MESSAGE = 0x01, + kSCSIParallelMessage_SAVE_DATA_POINTER = 0x02, + kSCSIParallelMessage_RESTORE_POINTERS = 0x03, + kSCSIParallelMessage_DISCONNECT = 0x04, + kSCSIParallelMessage_INITIATOR_DETECTED_ERROR = 0x05, + kSCSIParallelMessage_MESSAGE_REJECT = 0x07, + kSCSIParallelMessage_NO_OPERATION = 0x08, + kSCSIParallelMessage_MESSAGE_PARITY_ERROR = 0x09, + kSCSIParallelMessage_IGNORE_WIDE_RESIDUE = 0x23, + kSCSIParallelMessage_QAS_REQUEST = 0x55, + kSCSIParallelMessage_IDENTIFY = 0x80, + + // The Message Codes used in the EXTENDED_MESSAGE message. + kSCSIParallelMessage_MODIFY_DATA_POINTER = 0x00, + kSCSIParallelMessage_SYNCHONOUS_DATA_TRANSFER_REQUEST = 0x01, + // Reserved = 0x02 + kSCSIParallelMessage_WIDE_DATA_TRANSFER_REQUEST = 0x03, + kSCSIParallelMessage_PARALLEL_PROTOCOL_REQUEST = 0x04, + // Reserved = 0x05 through 0xFF + + // Task Attribute Message Codes + kSCSIParallelMessage_ACA = 0x24, + kSCSIParallelMessage_HEAD_OF_QUEUE = 0x21, + kSCSIParallelMessage_LINKED_COMMAND_COMPLETE = 0x0A, + kSCSIParallelMessage_ORDERED = 0x22, + kSCSIParallelMessage_SIMPLE = 0x20, + + // Task Management Message Codes + kSCSIParallelMessage_ABORT_TASK = 0x0D, + kSCSIParallelMessage_ABORT_TASK_SET = 0x06, + kSCSIParallelMessage_CLEAR_ACA = 0x16, + kSCSIParallelMessage_CLEAR_TASK_SET = 0x0E, + kSCSIParallelMessage_LOGICAL_UNIT_RESET = 0x17, + kSCSIParallelMessage_TARGET_RESET = 0x0C +}; + +enum +{ + kSCSIParallelTaskControllerIDQueueHead = 0 +}; + +// Notifications +enum +{ + kSCSIControllerNotificationBusReset = 0x68000000 +}; + +// Forward declaration for the internally used Parallel Device object. +class IOSCSIParallelInterfaceDevice; + +// This is the identifier that is used to specify a given parallel Task. +typedef OSObject * SCSIParallelTaskIdentifier; + + +//----------------------------------------------------------------------------- +// Class Declarations +//----------------------------------------------------------------------------- + +/*! @class IOSCSIParallelInterfaceController + @abstract Class that represents a SCSI Host Bus Adapter. + @discussion Class that represents a SCSI Host Bus Adapter. +*/ +class IOSCSIParallelInterfaceController : public IOService +{ + + OSDeclareAbstractStructors ( IOSCSIParallelInterfaceController ) + +#if 0 +#pragma mark - +#pragma mark Client API +#endif + + +public: + + /*! + @function GetSCSIParallelTask + @abstract Method to allow the client to get a SCSIParallelTask + @discussion Get a SCSIParallelTask from the controller so that a request + can be issued to the HBA driver. + @param blockForCommand If the blockForCommand parameter is set to false + and there are no free SCSIParallelTasks, this method will return NULL, + otherwise it will wait for one to become available before returning. + @result If there is a SCSI Parallel Task available, a reference to it + will be returned. + */ + + SCSIParallelTaskIdentifier GetSCSIParallelTask ( bool blockForCommand ); + + /*! + @function FreeSCSIParallelTask + @abstract Method to allow the client to release a SCSIParallelTask + @discussion The FreeSCSIParallelTask method is called by the client when + a SCSIParallelTask has been completed and the associated returnTask + needs to be returned to the pool. + @param returnTask is a reference to the SCSIParallelTaskIdentifier to be + returned. + */ + + void FreeSCSIParallelTask ( SCSIParallelTaskIdentifier returnTask ); + + /*! + @function FindTaskForAddress + @abstract Find a task for a given Task Address, if one exists. + @discussion If a valid Tagged Task Identifier is specified, this method + will return the task specified by the Tagged Task Address if one is + found, or else NULL will be returned. If zero is used as the Tagged + Task Identifier, then this routine will search for an outstanding task + based on the Untagged Task Address and return the task or else, if one + is not found, return NULL. + @param theT is the Target component of the I_T_L or I_T_L_Q nexus. + @param theL is the Logical Unit component of the I_T_L or I_T_L_Q nexus. + @param theQ is the Queue Tag component of the I_T_L_Q nexus. If this is + an I_T_L nexus, then the kSCSIUntaggedTaskIdentifier constant should be + used for theQ. + @result returns a valid SCSIParallelTaskIdentifier or NULL if none + found. + */ + + SCSIParallelTaskIdentifier FindTaskForAddress ( + SCSIDeviceIdentifier theT, + SCSILogicalUnitNumber theL, + SCSITaggedTaskIdentifier theQ ); + + + /*! + @function FindTaskForControllerIdentifier + @abstract Find a task for a given Target and Controller Task Identifier + @discussion Allows the controller child class to find an outstanding task + for a specified target and controller task identifier + @param theTarget is the Target that the task . + @param theIdentifier is the controller task identifier set using the SCSI + Parallel Task's SetControllerTaskIdentifier() method. + @result returns a valid SCSIParallelTaskIdentifier or NULL if none + found. + */ + + SCSIParallelTaskIdentifier FindTaskForControllerIdentifier ( + SCSIDeviceIdentifier theTarget, + UInt64 theIdentifier ); + + + /*! + @function ExecuteParallelTask + @abstract Submit a SCSIParallelTask for execution. + @discussion The ExecuteParallelTask call is made by the client to submit + a SCSIParallelTask for execution. + @param parallelRequest is a reference to the SCSIParallelTaskIdentifier + to be executed. + @result is an appropriate SCSIServiceResponse which are defined in the + file <IOKit/scsi/SCSITask.h>. + */ + + SCSIServiceResponse ExecuteParallelTask ( + SCSIParallelTaskIdentifier parallelRequest ); + + // --- Public API methods provided by HBA child classes ---- + + /*! + @function ReportHBAHighestLogicalUnitNumber + @abstract Gets the Highest Logical Unit Number. + @discussion This method is used to query the HBA child class to + determine what the highest Logical Unit Number that the controller can + address. + @result returns a valid 64-bit logical unit number. + */ + + virtual SCSILogicalUnitNumber ReportHBAHighestLogicalUnitNumber ( void ) = 0; + + /*! + @function DoesHBASupportSCSIParallelFeature + @abstract Queries the HBA child class to determine if it supports a + specific SPI feature. + @discussion Queries the HBA child class to determine if it supports the + specified feature as defined by the SCSI Parallel Interconnect + specifications. + @result Returns true if requested feature is supported. + */ + + virtual bool DoesHBASupportSCSIParallelFeature ( + SCSIParallelFeature theFeature ) = 0; + + /*! + @function InitializeTargetForID + @abstract Called to initialize a target device. + @discussion This method will be called to initialize a target device in + a single-threaded manner. The HBA can use this method to probe the + target or do anything else necessary before the device object is + registered with IOKit for matching. + @result Returns true if the target was successfully initialized. + */ + + virtual bool InitializeTargetForID ( + SCSITargetIdentifier targetID ) = 0; + + // The SCSI Task Management Functions as defined in the SCSI Architecture + // Model - 2 (SAM-2) specification. These are used by the client to request + // the specified function. The controller can complete these immmediately + // by returning the appropriate SCSIServiceResponse, or these can be completed + // asyncronously by the controller returning a SCSIServiceResponse of + // kSCSIServiceResponse_Request_In_Process and then calling the appropriate + // function complete member routine listed in the child class API section. + + virtual SCSIServiceResponse AbortTaskRequest ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL, + SCSITaggedTaskIdentifier theQ ) = 0; + + virtual SCSIServiceResponse AbortTaskSetRequest ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL ) = 0; + + virtual SCSIServiceResponse ClearACARequest ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL ) = 0; + + virtual SCSIServiceResponse ClearTaskSetRequest ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL ) = 0; + + virtual SCSIServiceResponse LogicalUnitResetRequest ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL ) = 0; + + virtual SCSIServiceResponse TargetResetRequest ( + SCSITargetIdentifier theT ) = 0; + + + + /*! + @function DoesHBAPerformAutoSense + @abstract Queries the HBA child class to determine if it automatically + performs AutoSense and provides AutoSense data for each I/O. If the HBA + allocates space for AutoSense in its HBA specific data region on a per + task basis, the HBA should respond true. + @discussion Queries the HBA child class to determine if it automatically + performs AutoSense and provides AutoSense data for each I/O. If the HBA + allocates space for AutoSense in its HBA specific data region on a per + task basis, the HBA should respond true. + @result Return true if HBA performs AutoSense into its own private data + buffer. + */ + + OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 1 ); + + virtual bool DoesHBAPerformAutoSense ( void ); + + /*! + @function ReportHBAConstraints + @abstract Called to report the I/O constraints for this controller. + A list of valid keys includes: + kIOMaximumSegmentCountReadKey, (required) + kIOMaximumSegmentCountWriteKey, (required) + kIOMaximumSegmentByteCountReadKey, (required) + kIOMaximumSegmentByteCountWriteKey, (required) + kIOMinimumSegmentAlignmentByteCountKey, (required) + kIOMaximumSegmentAddressableBitCountKey, (required) + kIOMinimumHBADataAlignmentMaskKey (required). + NB: These keys and their values are described in this header and <IOKit/IOKitKeys.h> + @param constraints. An OSDictionary object used to aggregate the key/value pairs. + Subclasses must set the required keys if they override this method. If a subclass does + not provide the required keys, the system will panic. + */ + OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 2 ); + + virtual void ReportHBAConstraints ( OSDictionary * constraints ); + + // Padding for the Client API + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 3 ); + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 8 ); + + +#if 0 +#pragma mark - +#pragma mark Child Class API +#endif + + +protected: + + // ---- Target Creation and Destruction methods --- + + /*! + @function CreateTargetForID + @abstract Method to perform device creation. + @discussion For HBA child classes that report true to the + DoesHBAPerformDeviceManagement() method, the child class will be + responsible for all device management by using these methods; + otherwise, the superclass will be responsible for all device management. + This method must be used to perform SCSI Parallel Device creation and + cannot be overridden. + @param targetID SCSIDeviceIdentifier of desired targetID. + @result returns true if successful. + */ + + bool CreateTargetForID ( SCSIDeviceIdentifier targetID ); + + /*! + @function CreateTargetForID + @abstract Method to perform device creation. + @discussion For HBA child classes that report true to the + DoesHBAPerformDeviceManagement() method, the child class will be + responsible for all device management by using these methods; + otherwise, the superclass will be responsible for all device management. + This method must be used to perform SCSI Parallel Device creation and + cannot be overridden. + @param targetID SCSIDeviceIdentifier of desired targetID. + @param properties A dictionary of properties to associate with the device + upon creation. The list of valid property keys is as follows: + kIOPropertySASAddressKey, + kIOPropertyFibreChannelNodeWorldWideNameKey, + kIOPropertyFibreChannelPortWorldWideNameKey, + kIOPropertyFibreChannelAddressIdentifierKey, and + kIOPropertyFibreChannelALPAKey. + These keys are defined in + <IOKit/storage/IOStorageProtocolCharacteristics.h> and the values + associated with these keys must be of the proper type/size, + or the target creation will not succeed. + @result returns true if successful. + */ + + bool CreateTargetForID ( SCSIDeviceIdentifier targetID, + OSDictionary * properties ); + + /*! + @function DestroyTargetForID + @abstract Method to perform device destruction. + @discussion For HBA child classes that report true to the + DoesHBAPerformDeviceManagement() method, the child class will be + responsible for all device management by using these methods; otherwise, + the superclass will be responsible for all device management. + This method must be used to perform SCSI Parallel Device destruction and + cannot be overridden. + @param targetID SCSIDeviceIdentifier of desired targetID. + */ + + void DestroyTargetForID ( SCSIDeviceIdentifier targetID ); + + /*! + @function GetTargetForID + @abstract Accessor for getting pointer to IOSCSIParallelInterfaceDevice. + @param targetID SCSIDeviceIdentifier of desired targetID. + @result returns pointer to IOSCSIParallelInterfaceDevice or NULL if not + found. + */ + + IOSCSIParallelInterfaceDevice * GetTargetForID ( + SCSIDeviceIdentifier targetID ); + + /*! + @function SetTargetProperty + @abstract Accessor for setting a property for a specific target. + @param device A pointer to a valid IOSCSIParallelInterfaceDevice. + @param key A pointer to a valid OSString object which represents the key. + A list of valid keys includes: + kIOPropertySASAddressKey, + kIOPropertyFibreChannelNodeWorldWideNameKey, + kIOPropertyFibreChannelPortWorldWideNameKey, + kIOPropertyFibreChannelAddressIdentifierKey, and + kIOPropertyFibreChannelALPAKey. + NB: These keys and their values are described in <IOKit/storage/IOStorageProtocolCharacteristics.h> + @param value Pointer to an OSObject (one of type OSData, OSString, etc.) + which represents the value for the property. The value must be of the proper type + and size for the specified key. + @result returns true if identifier was properly set, otherwise false. + */ + + bool SetTargetProperty ( SCSIDeviceIdentifier targetID, + const char * key, + OSObject * value ); + + /*! + @function RemoveTargetProperty + @abstract Accessor for removing a property from a specific target. + @param device A pointer to a valid IOSCSIParallelInterfaceDevice. + @param key A pointer to a valid OSString object which represents the key. + */ + + void RemoveTargetProperty ( SCSIDeviceIdentifier targetID, + const char * key ); + + // ---- Methods for HBA specifics. ---- + + /*! + @function SetHBAProperty + @abstract Accessor for setting a property for this object. + @param key A pointer to a valid OSString object which represents the key. + A list of valid keys includes: + kIOPropertyVendorNameKey, + kIOPropertyProductNameKey, + kIOPropertyProductRevisionLevelKey, + kIOPropertyPortDescriptionKey, + kIOPropertyPortSpeedKey, + kIOPropertyPortTopologyKey, + kIOPropertySCSIParallelSignalingTypeKey, + kIOPropertyFibreChannelCableDescriptionKey, + kIOPropertyFibreChannelNodeWorldWideNameKey, + kIOPropertyFibreChannelPortWorldWideNameKey, + kIOPropertyFibreChannelAddressIdentifierKey, and + kIOPropertyFibreChannelALPAKey. + NB: These keys and their values are described in <IOKit/storage/IOStorageDeviceCharacteristics.h> + and <IOKit/storage/IOStorageProtocolCharacteristics.h> + @param value Pointer to an OSObject (one of type OSData, OSString, etc.) + which represents the value for the property. The value must be of the proper type, + and/or size for the specified key. + @result returns true if identifier was properly set, otherwise false. + */ + + bool SetHBAProperty ( const char * key, + OSObject * value ); + + /*! + @function RemoveHBAProperty + @abstract Accessor for removing a property for this object. + @param key A pointer to a valid OSString object which represents the key. + See the SetHBAProperty() method for a list of valid keys. + */ + + void RemoveHBAProperty ( const char * key ); + + // These methods will not be called before the InitializeController() call, + // and will not be called after the TerminateController() call. But in the + // interval between those calls, they shall report the correct requested + // information. They are implemented as seperate pure virtual methods + // instead of a selector driven method because the HBA child class is + // required to report this information. + + /*! + @function ReportInitiatorIdentifier + @abstract Get the SCSI Device Identifier for the HBA. + @discussion This method will be called to determine the SCSI Device + Identifier that the Initiator has assigned for this HBA. + @result returns SCSIInitiatorIdentifier. + */ + + virtual SCSIInitiatorIdentifier ReportInitiatorIdentifier ( void ) = 0; + + /*! + @function ReportHighestSupportedDeviceID + @abstract Get the highest supported SCSI Device Identifier. + @discussion This method will be called to determine the value of the + highest SCSI Device Identifier supported by the HBA. This value will be + used to determine the last ID to process. + @result returns highest SCSIDeviceIdentifier + */ + + virtual SCSIDeviceIdentifier ReportHighestSupportedDeviceID ( void ) = 0; + + /*! + @function ReportMaximumTaskCount + @abstract Report Maximum Task Count + @discussion This method will be called to retrieve the maximum number of + outstanding tasks the HBA can process. This number must be greater than + zero or the controller driver will fail to match and load. + @result returns maximum (non-zero) task count. + */ + + virtual UInt32 ReportMaximumTaskCount ( void ) = 0; + + /*! + @function ReportHBASpecificTaskDataSize + @abstract Determine memory needed for HBA Task specific use. + @discussion This method is used to retrieve the amount of memory that + will be allocated in the SCSI Parallel Task for HBA specific use. + @result returns memory required in bytes + */ + + virtual UInt32 ReportHBASpecificTaskDataSize ( void ) = 0; + + /*! + @function ReportHBASpecificDeviceDataSize + @abstract Determine memory needed for HBA Device specific use. + @discussion This method is used to retrieve the amount of memory that + will be allocated in the SCSI Parallel Device for HBA specific use. + @result returns memory required in bytes + */ + + virtual UInt32 ReportHBASpecificDeviceDataSize ( void ) = 0; + + /*! + @function DoesHBAPerformDeviceManagement + @abstract Determine if HBA will manage devices. + @discussion This method is used to determine if the HBA will manage + target device creation and destruction. + @result return true means objects for target devices will only be + created when the child class calls the CreateTargetForID method. + */ + + virtual bool DoesHBAPerformDeviceManagement ( void ) = 0; + + // ---- Initialize and Terminate methods for the subclass to implement ----- + // The subclass shall not override the IOKit init and terminate methods, + // but shall instead rely on these methods for initialization and + // termination. + + // This is done to allow for this superclass to manage all IOKit specifics + // and to require only a Family specific API to be implemented by the + // subclass drivers. + + /*! + @function InitializeController + @abstract Called to initialize the controller + @discussion It is guaranteed that the InitializeController() will only be + called once per instantiation. The InitializeController() methods allows + the subclass driver to do all the necessary initialization required by + the hardware before it is able to accept requests to execute. All + necessary allocation of resources should be made during this method + call. This is the first method that will be called in the subclass. + @result return true means that initialization was successful. + */ + + virtual bool InitializeController ( void ) = 0; + + /*! + @function TerminateController + @abstract Called to terminate the controller + @discussion It is guaranteed that the TerminateController() will only be + called once and only after the InitializeController() method and only if + true was returned in response to the InitializeController() method. + The TerminateController() method allows the subclass to release all + resources that were acquired for operation of the hardware and shutdown + all hardware services. + This is the last method of the subclass that will be called before the + class is destroyed. + */ + + virtual void TerminateController ( void ) = 0; + + // ---- Start and Stop methods for the subclass ---- + + /*! + @function StartController + @abstract Called to start the controller + @discussion The StartController will always be called before any + requests are sent to the driver for execution. This method is called + after an initialize to start the services provided by the specific HBA + driver or called after a StopController call to restart those services. + After this call completes, all services provided by the HBA driver are + available to the client. + @result return true means that start was successful. + */ + + virtual bool StartController ( void ) = 0; + + /*! + @function StopController + @abstract Called to stop the controller + @discussion The StopController method will be called any time that the + system wants the card to stop accepting requests. ( See StartController + discussion ). The subclass should disable the hardware interrupt for + the particular controller (if possible) in this method. + */ + + virtual void StopController ( void ) = 0; + + // ---- Suspend and Resume Methods for the subclass ---- + + /*! + @function SuspendServices + @abstract Called to suspend controller services + @discussion Method will be called when the system wants to suspend the + services that are provided by the HBA driver. This call is not a reset + and the driver shall retain all state data between this so that if a + ResumeServices call is received, the driver can continue providing + services without a visible difference to the client. The driver may + receive multiple SuspendServices calls without receiving a + ResumeServices call and should ignore any after the first until a + ResumeServices call is received. + */ + + virtual void SuspendServices ( void ); + + /*! + @function ResumeServices + @abstract Called to resume controller services + @discussion Method that will be called to resume services + provided by the driver. ( See SuspendServices discussion ) + */ + + virtual void ResumeServices ( void ); + + /*! + @function HandleInterruptRequest + @abstract Handle Interrupt Request + @discussion The HandleInterruptRequest is used to notify an HBA + specific subclass that an interrupt request needs to be serviced. It is + called on the workloop (it holds the gate) at secondary interrupt level. + */ + + virtual void HandleInterruptRequest ( void ) = 0; + + /*! + @function EnableInterrupt + @abstract Enable Interrupt + @discussion Method that the HBA child class can call to enable + the associated IOInterruptEventSource. + */ + + void EnableInterrupt ( void ); + + /*! + @function DisableInterrupt + @abstract Disable Interrupt + @discussion Method that the HBA child class can call to disable + the associated IOInterruptEventSource. + */ + + void DisableInterrupt ( void ); + + /*! + @function SignalInterrupt + @abstract Signals that an interrupt has occurred. + @discussion Subclasses of IOSCSIParallelInterfaceController + should call this method in order to get the secondary interrupt + thread scheduled if and only if they will be returning false from + their overriden FilterInterruptRequest() method. See the + discussion for the FilterInterruptRequest() method for more + details. + + NOTE: This method should only be called from within the + FilterInterruptRequest() method and at no other time. + + Available in 10.3.3 or later. + + */ + + void SignalInterrupt ( void ); + + /*! + @function ProcessParallelTask + @abstract Called by client to process a parallel task. + @discussion This method is called to process a parallel task (i.e. put + the command on the bus). The HBA specific sublcass must implement this + method. + @param parallelRequest A valid SCSIParallelTaskIdentifier. + @result serviceResponse (see <IOKit/scsi/SCSITask.h>) + */ + + virtual SCSIServiceResponse ProcessParallelTask ( + SCSIParallelTaskIdentifier parallelRequest ) = 0; + + /*! + @function CompleteParallelTask + @abstract Parallel Task Completion + @discussion The HBA specific sublcass inherits the CompleteParallelTask() + method which shall be called when the HBA has completed the processing + of a parallel task. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param completionStatus The status of the SCSI bus. + @param serviceResponse (see <IOKit/scsi/SCSITask.h>) + */ + + void CompleteParallelTask ( + SCSIParallelTaskIdentifier parallelRequest, + SCSITaskStatus completionStatus, + SCSIServiceResponse serviceResponse ); + + + // Completion routines for the SCSI Task Management functions as described + // in the SCSI ArchitectureModel - 2 (SAM-2) specification. Each of these + // correspond to a client request for the specific Task Management functions. + // If the Controller Child Class completed the request by returning a + // SCSIServiceResponse of anything other than kSCSIServiceResponse_Request_In_Process, + // then the controller class does not need to call the completion member routine. + // If the controller did not complete the request immediately, then it will + // need to call the appropriate completion member routine listed here. + void CompleteAbortTask ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL, + SCSITaggedTaskIdentifier theQ, + SCSIServiceResponse serviceResponse ); + + void CompleteAbortTaskSet ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL, + SCSIServiceResponse serviceResponse ); + + void CompleteClearACA ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL, + SCSIServiceResponse serviceResponse ); + + void CompleteClearTaskSet ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL, + SCSIServiceResponse serviceResponse ); + + void CompleteLogicalUnitReset ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL, + SCSIServiceResponse serviceResponse ); + + void CompleteTargetReset ( + SCSITargetIdentifier theT, + SCSIServiceResponse serviceResponse ); + + /*! + @function NotifyClientsOfBusReset + @abstract Method called to notify clients that a bus reset has occurred. + @discussion This method is used by the HBA child class to inform the + parent class and any clients that a bus reset has occurred. + */ + + void NotifyClientsOfBusReset ( void ); + + /*! + @function NotifyClientsOfPortStatusChange + @abstract Method called to notify clients of port status change events. + @discussion This method is used by the HBA child class to inform the + parent class and any clients that a port has changed status. + */ + + void NotifyClientsOfPortStatusChange ( SCSIPortStatus newStatus ); + + /*! + @function GetSCSIDomainIdentifier + @abstract Accessor method to get the SCSI Domain Identifier. + @discussion Accessor method to get the SCSI Domain Identifier. + @result returns SCSI Domain Identifier. + */ + + SInt32 GetSCSIDomainIdentifier ( void ); + + /*! + @function GetProvider + @abstract Accessor method to get the IOService which is the controller's + provider. + @discussion Accessor method to get the IOService which is the + controller's provider. + @result returns pointer to IOService. + */ + + IOService * GetProvider ( void ); + + /*! + @function GetWorkLoop + @abstract Accessor method to get the IOWorkLoop associated with this + HBA. + @discussion Accessor method to get the IOWorkLoop associated with this + HBA. + @result returns pointer to IOWorkLoop. + */ + + IOWorkLoop * GetWorkLoop ( void ) const; + + /*! + @function GetCommandGate + @abstract Accessor to get an IOCommandGate associated with the workloop. + @discussion Accessor to get an IOCommandGate associated with the + workloop. + @result returns pointer to IOCommandGate. + */ + + IOCommandGate * GetCommandGate ( void ); + + // ---- SCSI Parallel Task Object Accessors ---- + + /*! + @function GetSCSITaskIdentifier + @abstract Method to retrieve a SCSITaskIdentifier from a valid + SCSIParallelTaskIdentifier. + @discussion Method to retrieve a SCSITaskIdentifier from a valid + SCSIParallelTaskIdentifier. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns SCSITaskIdentifier that represents the original request + from the SCSI Application Layer client. + */ + + SCSITaskIdentifier GetSCSITaskIdentifier ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetTargetIdentifier + @abstract Method to get the SCSITargetIdentifier associated with a + request. + @discussion Method to get the SCSITargetIdentifier associated with a + request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns SCSITargetIdentifier + */ + + SCSITargetIdentifier GetTargetIdentifier ( + SCSIParallelTaskIdentifier parallelTask ); + + // ---- Methods for Accessing data in the client's SCSI Task Object ---- + // Method to retrieve the LUN that identifies the Logical Unit whose Task + // Set to which this task is to be added. + + /*! + @function GetLogicalUnitNumber + @abstract Method to get the logical unit number associated with a + request. + @discussion Method to get the logical unit number associated with a + request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns a valid 64-bit logical unit number. + */ + + SCSILogicalUnitNumber GetLogicalUnitNumber ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetTaggedTaskIdentifier + @abstract Method to retrieve the SCSI Tagged Task Identifier of the + task. If the returned value is equal to kSCSIUntaggedTaskIdentifier, + then this task is untagged. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result an SCSITaskAttribute value. + */ + + SCSITaggedTaskIdentifier GetTaggedTaskIdentifier ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetTaskAttribute + @abstract Method to retrieve the SCSI Task Attribute of the task + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result an SCSITaskAttribute value. + */ + + SCSITaskAttribute GetTaskAttribute ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetCommandDescriptorBlockSize + @abstract Method to retrieve the size of the SCSI Command Descriptor + Block (CDB). + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns the size of the SCSI Command Descriptor Block in bytes. + */ + + UInt8 GetCommandDescriptorBlockSize ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetCommandDescriptorBlock + @abstract Method to retrieve the SCSI Command Descriptor Block (CDB). + @discussion This will always return a 16 Byte CDB. If the Protocol Layer + driver does not support 16 Byte CDBs, it will have to create a local + SCSICommandDescriptorBlock variable to get the CDB data and then + transfer the needed bytes from there. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param cdbData is a SCSICommandDescriptorBlock pointer to 16 byte CDB + @result returns true if data was copied to cdbData pointer + */ + + bool GetCommandDescriptorBlock ( + SCSIParallelTaskIdentifier parallelTask, + SCSICommandDescriptorBlock * cdbData ); + + /*! + @function GetDataTransferDirection + @abstract Retrieves the data transfer direction for any data associated + with the request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result One of the valid data transfer directions described in + <IOKit/scsi/SCSITask.h> + */ + + UInt8 GetDataTransferDirection ( SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetRequestedDataTransferCount + @abstract Retrieves the requested data transfer count for any data + associated with the request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result The requested data transfer count in bytes. + */ + + UInt64 GetRequestedDataTransferCount ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetRealizedDataTransferCount + @abstract Retrieves the realized data transfer count for any data + associated with the request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result The realized data transfer count in bytes. + */ + + UInt64 GetRealizedDataTransferCount ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function SetRealizedDataTransferCount + @abstract Sets the realized data transfer count in bytes. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param realizedTransferCountInBytes is the number of bytes actually + transferred. + @result true means the data transfer count was successfully set. + */ + + bool SetRealizedDataTransferCount ( + SCSIParallelTaskIdentifier parallelTask, + UInt64 realizedTransferCountInBytes ); + + /*! + @function IncrementRealizedDataTransferCount + @abstract Increments the realized data transfer count. This method is + helpful for when the HBA has to do multiple passes of DMA because there + are more scatter-gather elements than it can process in one pass. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param realizedTransferCountInBytes is the number of bytes to add to the + realized data count for the task. + */ + + void IncrementRealizedDataTransferCount ( + SCSIParallelTaskIdentifier parallelTask, + UInt64 realizedTransferCountInBytes ); + + /*! + @function GetDataBuffer + @abstract Method to retrieve client buffer from the request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns pointer to an IOMemoryDescriptor which represents the + buffer. + */ + + IOMemoryDescriptor * GetDataBuffer ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetDataBufferOffset + @abstract Method to retrieve offset into client buffer at which to start + processing. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns offset in bytes + */ + + UInt64 GetDataBufferOffset ( SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetDMACommand + @abstract Method to retrieve a pointer to an IODMACommand from the request. + @discussion For devices utilizing DMA, the IODMACommand object should be + obtained via GetDMACommand(). The subclass is responsible for calling prepare() + on the IODMACommand object using the proper offset obtained via GetDataBufferOffset() + and correct size obtained via GetRequestedDataTransferCount(). The subclass + is further responsible for calling complete() on the IODMACommand object once + all DMA operations have finished. + NB: Subclasses should not call IODMACommand::setMemoryDescriptor(). + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns pointer to an IODMACommand which is used in conjunction + with the task. + */ + + IODMACommand * GetDMACommand ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetTimeoutDuration + @abstract Method to retrieve the timeout duration in milliseconds for a + request. + @discussion Method to retrieve the timeout duration in milliseconds for + a request. A value of zero represents an infinite timeout, or on + hardware where infinite timeouts are not possible, substitute the + longest timeout possible. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns timeout duration in milliseconds + */ + + UInt32 GetTimeoutDuration ( SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function SetAutoSenseData + @abstract Method to set the auto sense data buffer associated with a + request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param newSensedata pointer to auto sense data buffer + @result returns true if data in newSenseData was succesfully into the + task object + */ + + bool SetAutoSenseData ( + SCSIParallelTaskIdentifier parallelTask, + SCSI_Sense_Data * newSenseData, + UInt8 senseDataSize ); + + /*! + @function GetAutoSenseData + @abstract Method to retrieve auto sense data buffer associated with a + request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param receivingBuffer pointer to auto sense data buffer + @result returns true if successfully copied data into receivingBuffer + */ + + bool GetAutoSenseData ( + SCSIParallelTaskIdentifier parallelTask, + SCSI_Sense_Data * receivingBuffer, + UInt8 senseDataSize ); + + /*! + @function GetAutoSenseDataSize + @abstract Method to retrieve auto sense data buffer size associated with a + request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns Size of auto sense data buffer. + */ + + UInt8 GetAutoSenseDataSize ( + SCSIParallelTaskIdentifier parallelTask ); + + + /*! + @function GetSCSIParallelFeatureNegotiation + @abstract Method to retrieve the requested value for negotiation of the. + @discussion Query as to whether the SCSI Parallel Device object has + negotiated wide data transfers. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result A valid SCSIParallelFeatureControl. + */ + + SCSIParallelFeatureRequest GetSCSIParallelFeatureNegotiation ( + SCSIParallelTaskIdentifier parallelTask, + SCSIParallelFeature requestedFeature ); + + /*! + @function GetSCSIParallelFeatureNegotiationCount + @abstract Method to retrieve the number of requested negotiations. + @discussion Query as to the number of SCSI Parallel Features that are + requested to either be negotitated or cleared. These are all features + that are set to either kSCSIParallelFeature_AttemptNegotiation or + kSCSIParallelFeature_ClearNegotiation. If the return value is zero, + then all features are set to kSCSIParallelFeature_NoNegotiation + and all feature negotiations are to remain as they currently exist. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result an unsigned integer up to 64 bits in size. + */ + + UInt64 GetSCSIParallelFeatureNegotiationCount ( + SCSIParallelTaskIdentifier parallelTask); + + /*! + @function SetSCSIParallelFeatureNegotiationResult + @abstract Method to set the wide data transfer negotiation result. + @discussion Method to set the wide data transfer negotiation result. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param requestedFeature The SCSIParallelFeature that the has been set to + newResult. + @param newResult A valid SCSIParallelFeatureResult value. + */ + + void SetSCSIParallelFeatureNegotiationResult ( + SCSIParallelTaskIdentifier parallelTask, + SCSIParallelFeature requestedFeature, + SCSIParallelFeatureResult newResult ); + + /*! + @function GetSCSIParallelFeatureNegotiationResult + @abstract Method to retrieve the result of any wide transfer + negotiations. + @discussion Query as to whether the SCSI Parallel Controller object has + negotiated wide data transfers. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result A valid SCSIParallelFeatureResult. + */ + + SCSIParallelFeatureResult GetSCSIParallelFeatureNegotiationResult ( + SCSIParallelTaskIdentifier parallelTask, + SCSIParallelFeature requestedFeature ); + + /*! + @function GetSCSIParallelFeatureNegotiationResultCount + @abstract Method to retrieve the number of changed negotiations. + @discussion Query as to the number of SCSI Parallel Features that have + been changed to either negotitated or cleared. These are all features + that are set to either kSCSIParallelFeature_NegotitiationCleared or + kSCSIParallelFeature_NegotitiationSuccess. If the return value is zero, + then all features are set to kSCSIParallelFeature_NegotitiationUnchanged. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result an unsigned integer up to 64 bits in size. + */ + + UInt64 GetSCSIParallelFeatureNegotiationResultCount ( + SCSIParallelTaskIdentifier parallelTask); + + // Controller Task Identifier related member routines + + /*! + @function SetControllerTaskIdentifier + @abstract Method to set the Controller Task Identifier. + @discussion This method allows the Controller Child Class + driver to set a unique identifier to associate with the specified + SCSI Parallel Task. This identifier is designed to be used by + controllers that do not have access to the LUN and Tag information + when notified by the HBA that a request has completed. + If the kSCSIParallelTaskControllerIDQueueHead is used, this + member routine will return the first Task on the queue. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param newIdentifier unsigned 64 bit integer token. + @result none + */ + + void SetControllerTaskIdentifier ( + SCSIParallelTaskIdentifier parallelTask, + UInt64 newIdentifier ); + + UInt64 GetControllerTaskIdentifier ( + SCSIParallelTaskIdentifier parallelTask); + + + // The HBA Data related fields + + /*! + @function GetHBADataSize + @abstract Method to retrieve the HBA Data Size in bytes. + @discussion Method to retrieve the HBA Data Size in bytes. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns HBA Data size in bytes. + */ + + UInt32 GetHBADataSize ( SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetHBADataPointer + @abstract Method to retrieve the HBA Data pointer. + @discussion Method to retrieve the HBA Data pointer. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns pointer to buffer for HBA specific data, NULL if + none found or GetHBADataSize() returns zero. + */ + + void * GetHBADataPointer ( SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetHBADataDescriptor + @abstract Method to retrieve the IOMemoryDescriptor associated with + the HBA Data. + @discussion Method to retrieve the IOMemoryDescriptor associated with + the HBA Data. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns pointer to an IOMemoryDescriptor that wraps the HBA + specific data buffer, NULL if none found or GetHBADataSize() returns zero. + */ + + IOMemoryDescriptor * GetHBADataDescriptor ( + SCSIParallelTaskIdentifier parallelTask ); + + // ---- SCSI Parallel Device Object Accessors ---- + + // The HBA Data related fields + + /*! + @function GetHBATargetDataSize + @abstract Method to retrieve the HBA Data Size in bytes. + @discussion Method to retrieve the HBA Data Size in bytes. + @param targetDevice A valid SCSITargetIdentifier. + @result returns HBA Data size in bytes. + */ + + UInt32 GetHBATargetDataSize ( SCSITargetIdentifier targetID ); + + /*! + @function GetHBATargetDataPointer + @abstract Method to retrieve the HBA Data pointer. + @discussion Method to retrieve the HBA Data pointer. + @param targetDevice A valid SCSITargetIdentifier. + @result returns pointer to buffer for HBA specific data, NULL if + none found or GetHBADataSize is zero. + */ + + void * GetHBATargetDataPointer ( SCSITargetIdentifier targetID ); + + +#if 0 +#pragma mark - +#pragma mark Additional Child Class APIs +#endif + + + // ---- Timeout Related Methods ---- + + /*! + @function SetTimeoutForTask + @abstract Method to set the timeout duration in milliseconds for a + request. + @discussion Method to set the timeout duration in milliseconds for a + request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param timeoutOverride A timeout value in milliseconds in case the + HBA driver wishes to override the default value provided in the + parallelTask. + */ + + void SetTimeoutForTask ( SCSIParallelTaskIdentifier parallelTask, + UInt32 timeoutOverride = 0 ); + + /*! + @function HandleTimeout + @abstract Method to handle command timeouts. + @discussion Method to handle command timeouts. This should + be overridden by the child class in order to clean up HBA + specific structures after a timeout has occurred. This method + is called on the workloop (it holds the gate). + @param parallelRequest A valid SCSIParallelTaskIdentifier. + */ + + OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 9 ); + + virtual void HandleTimeout ( + SCSIParallelTaskIdentifier parallelRequest ); + + + // ---- Filter Interrupt ---- + + /*! + @function FilterInterruptRequest + @abstract Filter method called at primary interrupt time. + @discussion Filter method called at primary interrupt time. + This should only be overridden by the child class in order + to determine if an interrupt occurred for this controller instance. + Since all work occurs at primary interrupt time, this routine + should be quick and efficient and defer as much processing as + possible to the HandleInterruptRequest() method. + + NOTE: Unlike the HandleInterruptRequest() and HandleTimeout() + methods, FilterInterruptRequest() is NOT called with the + workloop lock held. + + If the value returned by FilterInterruptRequest() is true, the + secondary interrupt thread will be scheduled and the hardware + interrupt line will be disabled. If the controller instance shares + that interrupt line with other devices, it can cause large + interrupt latencies. If the controller instance can disable the + interrupt in the chip itself, the following can be done to reduce + interrupt latencies: + + - Interrupt occurs + - FilterInterruptRequest() method is called. + - If the interrupt is not for this controller, return false + immediately. + - If the interrupt is for this controller, and the controller + can disable interrupts for this chip, the controller should + disable the interrupts for this chip, call SignalInterrupt(), + and return false. This causes the secondary interrupt thread + to get scheduled, yet does not disable the interrupt line for + all devices tied to that interrupt. This effectively allows + other devices to process their interrrupts, thus reducing + interrupt latency for those devices. + - HandleInterruptRequest() method is called. + - Controller processes interrupt and completes I/O requests. + - Controller re-enables interrupts for the device. + + NOTE: If you use this approach, the interrupting condition MUST be + cleared from the hardware, otherwise an infinite process interrupt + loop will occur. + + If the controller cannot disable interrupts on the chip, it should + simply return true if an interrupt has occurred for its device. + + @result True if the hardware interrupt line should be disabled, + otherwise false. + */ + + OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 10 ); + + virtual bool FilterInterruptRequest ( void ); + + /*! + @function InitializeDMASpecification + @abstract Called to initialize an IODMACommand with a DMA specification. + @param command A pointer to a valid IODMACommand object. Subclasses + should override this method and call IODMACommand::initWithSpecification() + supplying the proper arguments to that method based on the DMA strategy. + @result boolean value indicating success or failure. + */ + OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 11 ); + + virtual bool InitializeDMASpecification ( IODMACommand * command ); + + /*! + @function CreateDeviceInterrupt + @abstract Called to create an IOInterruptEventSource for the device. Subclasses + may wish to use a different interrupt index than 0 (e.g. for using PCI Message + Signaled Interrupts) or might not need an interrupt at all (virtual HBA). + @param action A pointer to the action routine that should be passed to either + IOInterruptEventSource::interruptEventSource() or + IOFilterInterruptEventSource::filterInterruptEventSource as the method to call + when an interrupt occurs for the device (sometimes called the "deferred procedure call" + or the "secondary context method". By passing this routine along, it will + properly wire up the HandleInterruptRequest() method you should override to handle + interrupts. + @param filter A pointer to the filter routine that should be passed to + IOFilterInterruptEventSource::filterInterruptEventSource as the method to call + at primary interrupt time when an interrupt occurs for the device. + By passing this routine along, it will properly wire up the + FilterInterruptRequest() method you may override to handle primary interrupts. + @result IOInterruptEventSource. May return NULL if and only if there is no + hardware interrupt associated with this device. + */ + OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 12 ); + + virtual IOInterruptEventSource * CreateDeviceInterrupt ( + IOInterruptEventSource::Action action, + IOFilterInterruptEventSource::Filter filter, + IOService * provider ); + + // Padding for the Child Class API + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 16 ); + + +#if 0 +#pragma mark - +#pragma mark Internal Use Only +#endif + +private: + + // binary compatibility instance variable expansion + struct ExpansionData { }; + ExpansionData * fIOSCSIParallelInterfaceControllerExpansionData; + + IOService * fProvider; + OSSet * fClients; + + static SInt32 fSCSIParallelDomainCount; + SInt32 fSCSIDomainIdentifier; + + // The HBA attributes + SCSIInitiatorIdentifier fInitiatorIdentifier; + + // The maximum SCSI Device Identifier support by the HBA + // This is retreived from the child class via the + SCSIDeviceIdentifier fHighestSupportedDeviceID; + + // The total number of tasks that the HBA can proccess at a time. + // This is retrieved from the child class via ReportMaximumTaskCount + UInt32 fSupportedTaskCount; + + // The Number of requests that are currently outstanding for the current + // instantiation. + UInt16 fOutstandingRequests; + + // The member variable to indicate if the current instantiation has been + // succesfully intialized. + bool fHBAHasBeenInitialized; + + // The member variable to indicate if the current instantiation is running. + // A true means that the last or only Start call made was successful. A + // false value means that either a successful Start has not been made or a + // Stop call has been made. + bool fHBACanAcceptClientRequests; + + // The pool for the available SCSI Parallel Task objects + IOCommandPool * fParallelTaskPool; + + // WorkLoop variables + IOWorkLoop * fWorkLoop; + IOTimerEventSource * fTimerEvent; + IOInterruptEventSource * fDispatchEvent; + + IOCommandGate * fControllerGate; + + bool AllocateSCSIParallelTasks ( void ); + void DeallocateSCSIParallelTasks ( void ); + + IOWorkLoop * getWorkLoop ( void ) const; + bool CreateWorkLoop ( IOService * provider ); + void ReleaseWorkLoop ( void ); + + // SCSI Parallel Device List + // The SCSI Parallel Device List will consist of 16 elements to represent + // identifiers that end in 0h through Fh. Each array element will point + // to a device object that represents the beginning of a linked list of + // device objects. By using an array of linked lists, the traversal time + // to find an object on a bus that supports a large number of devices, such + // as Fibre Channel, will be significantly lower than having to walk a list + // that is comprised of all devices on the bus. For parallel wide and + // narrow busses, which support 16 and 8 devices respectively, this will act + // like a simple array of device objects. + enum + { + kSCSIParallelDeviceListArrayCount = 16, + kSCSIParallelDeviceListIndexMask = 0x0F + }; + + IOSimpleLock * fDeviceLock; + IOSCSIParallelInterfaceDevice * + fParallelDeviceList[kSCSIParallelDeviceListArrayCount]; + + void InitializeDeviceList ( void ); + void AddDeviceToTargetList ( + IOSCSIParallelInterfaceDevice * newDevice ); + void RemoveDeviceFromTargetList ( + IOSCSIParallelInterfaceDevice * victimDevice ); + + // The Interrupt Service Routine for the controller. + static void ServiceInterrupt ( + OSObject * theObject, + IOInterruptEventSource * theSource, + int count ); + + static void TimeoutOccurred ( OSObject * owner, IOTimerEventSource * sender ); + + static bool FilterInterrupt ( + OSObject * theObject, + IOFilterInterruptEventSource * theSource ); + + // IOService support methods + // These shall not be overridden by the HBA child classes. + bool start ( IOService * provider ); + void stop ( IOService * provider ); + + +protected: + + // These may be overriden by the HBA child classes if necessary, but should + // call the superclass implementation. + virtual bool handleOpen ( + IOService * client, + IOOptionBits options, + void * arg ); + + virtual void handleClose ( + IOService * client, + IOOptionBits options ); + + virtual bool handleIsOpen ( + const IOService * client ) const; + + virtual bool willTerminate ( IOService * provider, IOOptionBits options ); + virtual bool didTerminate ( IOService * provider, IOOptionBits options, bool * defer ); + +}; + + +#endif /* __IOKIT_IO_SCSI_PARALLEL_INTERFACE_CONTROLLER_H__ */ \ No newline at end of file diff --git a/i386/include/IOKit/scsi/spi/IOSCSIParallelInterfaceController.h b/i386/include/IOKit/scsi/spi/IOSCSIParallelInterfaceController.h new file mode 100644 index 0000000..0bd7981 --- /dev/null +++ b/i386/include/IOKit/scsi/spi/IOSCSIParallelInterfaceController.h @@ -0,0 +1,1568 @@ +/* + * Copyright (c) 2002-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __IOKIT_IO_SCSI_PARALLEL_INTERFACE_CONTROLLER_H__ +#define __IOKIT_IO_SCSI_PARALLEL_INTERFACE_CONTROLLER_H__ + + + /*! + @header IOSCSIParallelInterfaceController + The IOSCSIParallelInterfaceController class and the associated HBA child + class is responsible for the management of all related hardware. This + includes the onboard HBA controller chip and the physical state of the + bus. These classes are not responsible for any of the management of + the SCSI Devices on the bus with the exception of maintaining the queue that + holds the objects representing those SCSI Devices. +*/ + + +//----------------------------------------------------------------------------- +// Includes +//----------------------------------------------------------------------------- + +// General IOKit includes +#include <IOKit/IOService.h> +#include <IOKit/IOWorkLoop.h> +#include <IOKit/IOCommandGate.h> +#include <IOKit/IODMACommand.h> +#include <IOKit/IOInterruptEventSource.h> +#include <IOKit/IOFilterInterruptEventSource.h> +#include <IOKit/IOTimerEventSource.h> +#include <IOKit/IOCommandPool.h> + +// IOKit SCSI ArchitectureModel Family includes +#include <IOKit/scsi/SCSITask.h> +#include <IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h> +#include <IOKit/scsi/SCSIPort.h> + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + + +#define kIOPropertySCSIDeviceFeaturesKey "SCSI Device Features" +#define kIOPropertySCSI_I_T_NexusFeaturesKey "SCSI I_T Nexus Features" + +// This is the alignment mask used when allocating per-task HBA data. It allows +// the HBA to declare whether or not it supports 64-bit addressability and what the +// minimum byte alignment is for the data. E.g. By specifying 0x0000FFFFFFFFFFFEULL, +// the controller would be indicating that it supports 48-bits of addressability, but +// at a minimum of being 2-byte aligned. +#define kIOMinimumHBADataAlignmentMaskKey "HBA Data Alignment" + +// The Feature Selectors used to identify features of the SCSI Parallel +// Interface. These are used by the DoesHBASupportSCSIParallelFeature +// to report whether the HBA supports a given SCSI Parallel Interface +// feature and are used for requesting negotiation and reporting negotiation +// results between the controller and the device. + +// When the DoesHBASupportSCSIParallelFeature() member routine of the controller +// child class is called, it will return true if the HBA that it controls +// supports the specified SCSIParallelFeature or false if it does not. +typedef enum SCSIParallelFeature +{ + // The selector for support of Wide Data Transfers. Only Wide16 is supported + // as Wide32 has been obsoleted by the SPI-3 specification. + kSCSIParallelFeature_WideDataTransfer = 0, + + // The selector for support of Synchronous Data Transfers. + kSCSIParallelFeature_SynchronousDataTransfer = 1, + + // The selector for support of Quick Arbitration and Selection (QAS). + kSCSIParallelFeature_QuickArbitrationAndSelection = 2, + + // The selector for support of Double Transition (DT) data transfers. + kSCSIParallelFeature_DoubleTransitionDataTransfers = 3, + + // The selector for SPI Information Unit (IU) transfers. + kSCSIParallelFeature_InformationUnitTransfers = 4, + + // Since the Feature selectors are zero base, this will always have the + // correct total. + kSCSIParallelFeature_TotalFeatureCount +} SCSIParallelFeature; + + +typedef enum SCSIParallelFeatureRequest +{ + // This selector indicates that current negotiation + // should be used. + kSCSIParallelFeature_NoNegotiation = 0, + + // This selector indicates that the controller + // should attempt negotiation for the feature + kSCSIParallelFeature_AttemptNegotiation = 1, + + // This selector indicates that the controller + // should clear any negotiation for the feature + kSCSIParallelFeature_ClearNegotiation = 2 +}; + +typedef enum SCSIParallelFeatureResult +{ + kSCSIParallelFeature_NegotitiationUnchanged = 0, + kSCSIParallelFeature_NegotitiationCleared = 1, + kSCSIParallelFeature_NegotitiationSuccess = 2 +}; + + +// The SCSI Message Codes used for MESSAGE IN and MESSAGE OUT phases. +enum SCSIParallelMessages +{ + // Link Control Messages + kSCSIParallelMessage_TASK_COMPLETE = 0x00, + kSCSIParallelMessage_EXTENDED_MESSAGE = 0x01, + kSCSIParallelMessage_SAVE_DATA_POINTER = 0x02, + kSCSIParallelMessage_RESTORE_POINTERS = 0x03, + kSCSIParallelMessage_DISCONNECT = 0x04, + kSCSIParallelMessage_INITIATOR_DETECTED_ERROR = 0x05, + kSCSIParallelMessage_MESSAGE_REJECT = 0x07, + kSCSIParallelMessage_NO_OPERATION = 0x08, + kSCSIParallelMessage_MESSAGE_PARITY_ERROR = 0x09, + kSCSIParallelMessage_IGNORE_WIDE_RESIDUE = 0x23, + kSCSIParallelMessage_QAS_REQUEST = 0x55, + kSCSIParallelMessage_IDENTIFY = 0x80, + + // The Message Codes used in the EXTENDED_MESSAGE message. + kSCSIParallelMessage_MODIFY_DATA_POINTER = 0x00, + kSCSIParallelMessage_SYNCHONOUS_DATA_TRANSFER_REQUEST = 0x01, + // Reserved = 0x02 + kSCSIParallelMessage_WIDE_DATA_TRANSFER_REQUEST = 0x03, + kSCSIParallelMessage_PARALLEL_PROTOCOL_REQUEST = 0x04, + // Reserved = 0x05 through 0xFF + + // Task Attribute Message Codes + kSCSIParallelMessage_ACA = 0x24, + kSCSIParallelMessage_HEAD_OF_QUEUE = 0x21, + kSCSIParallelMessage_LINKED_COMMAND_COMPLETE = 0x0A, + kSCSIParallelMessage_ORDERED = 0x22, + kSCSIParallelMessage_SIMPLE = 0x20, + + // Task Management Message Codes + kSCSIParallelMessage_ABORT_TASK = 0x0D, + kSCSIParallelMessage_ABORT_TASK_SET = 0x06, + kSCSIParallelMessage_CLEAR_ACA = 0x16, + kSCSIParallelMessage_CLEAR_TASK_SET = 0x0E, + kSCSIParallelMessage_LOGICAL_UNIT_RESET = 0x17, + kSCSIParallelMessage_TARGET_RESET = 0x0C +}; + +enum +{ + kSCSIParallelTaskControllerIDQueueHead = 0 +}; + +// Notifications +enum +{ + kSCSIControllerNotificationBusReset = 0x68000000 +}; + +// Forward declaration for the internally used Parallel Device object. +class IOSCSIParallelInterfaceDevice; + +// This is the identifier that is used to specify a given parallel Task. +typedef OSObject * SCSIParallelTaskIdentifier; + + +//----------------------------------------------------------------------------- +// Class Declarations +//----------------------------------------------------------------------------- + +/*! @class IOSCSIParallelInterfaceController + @abstract Class that represents a SCSI Host Bus Adapter. + @discussion Class that represents a SCSI Host Bus Adapter. +*/ +class IOSCSIParallelInterfaceController : public IOService +{ + + OSDeclareAbstractStructors ( IOSCSIParallelInterfaceController ) + +#if 0 +#pragma mark - +#pragma mark Client API +#endif + + +public: + + /*! + @function GetSCSIParallelTask + @abstract Method to allow the client to get a SCSIParallelTask + @discussion Get a SCSIParallelTask from the controller so that a request + can be issued to the HBA driver. + @param blockForCommand If the blockForCommand parameter is set to false + and there are no free SCSIParallelTasks, this method will return NULL, + otherwise it will wait for one to become available before returning. + @result If there is a SCSI Parallel Task available, a reference to it + will be returned. + */ + + SCSIParallelTaskIdentifier GetSCSIParallelTask ( bool blockForCommand ); + + /*! + @function FreeSCSIParallelTask + @abstract Method to allow the client to release a SCSIParallelTask + @discussion The FreeSCSIParallelTask method is called by the client when + a SCSIParallelTask has been completed and the associated returnTask + needs to be returned to the pool. + @param returnTask is a reference to the SCSIParallelTaskIdentifier to be + returned. + */ + + void FreeSCSIParallelTask ( SCSIParallelTaskIdentifier returnTask ); + + /*! + @function FindTaskForAddress + @abstract Find a task for a given Task Address, if one exists. + @discussion If a valid Tagged Task Identifier is specified, this method + will return the task specified by the Tagged Task Address if one is + found, or else NULL will be returned. If zero is used as the Tagged + Task Identifier, then this routine will search for an outstanding task + based on the Untagged Task Address and return the task or else, if one + is not found, return NULL. + @param theT is the Target component of the I_T_L or I_T_L_Q nexus. + @param theL is the Logical Unit component of the I_T_L or I_T_L_Q nexus. + @param theQ is the Queue Tag component of the I_T_L_Q nexus. If this is + an I_T_L nexus, then the kSCSIUntaggedTaskIdentifier constant should be + used for theQ. + @result returns a valid SCSIParallelTaskIdentifier or NULL if none + found. + */ + + SCSIParallelTaskIdentifier FindTaskForAddress ( + SCSIDeviceIdentifier theT, + SCSILogicalUnitNumber theL, + SCSITaggedTaskIdentifier theQ ); + + + /*! + @function FindTaskForControllerIdentifier + @abstract Find a task for a given Target and Controller Task Identifier + @discussion Allows the controller child class to find an outstanding task + for a specified target and controller task identifier + @param theTarget is the Target that the task . + @param theIdentifier is the controller task identifier set using the SCSI + Parallel Task's SetControllerTaskIdentifier() method. + @result returns a valid SCSIParallelTaskIdentifier or NULL if none + found. + */ + + SCSIParallelTaskIdentifier FindTaskForControllerIdentifier ( + SCSIDeviceIdentifier theTarget, + UInt64 theIdentifier ); + + + /*! + @function ExecuteParallelTask + @abstract Submit a SCSIParallelTask for execution. + @discussion The ExecuteParallelTask call is made by the client to submit + a SCSIParallelTask for execution. + @param parallelRequest is a reference to the SCSIParallelTaskIdentifier + to be executed. + @result is an appropriate SCSIServiceResponse which are defined in the + file <IOKit/scsi/SCSITask.h>. + */ + + SCSIServiceResponse ExecuteParallelTask ( + SCSIParallelTaskIdentifier parallelRequest ); + + // --- Public API methods provided by HBA child classes ---- + + /*! + @function ReportHBAHighestLogicalUnitNumber + @abstract Gets the Highest Logical Unit Number. + @discussion This method is used to query the HBA child class to + determine what the highest Logical Unit Number that the controller can + address. + @result returns a valid 64-bit logical unit number. + */ + + virtual SCSILogicalUnitNumber ReportHBAHighestLogicalUnitNumber ( void ) = 0; + + /*! + @function DoesHBASupportSCSIParallelFeature + @abstract Queries the HBA child class to determine if it supports a + specific SPI feature. + @discussion Queries the HBA child class to determine if it supports the + specified feature as defined by the SCSI Parallel Interconnect + specifications. + @result Returns true if requested feature is supported. + */ + + virtual bool DoesHBASupportSCSIParallelFeature ( + SCSIParallelFeature theFeature ) = 0; + + /*! + @function InitializeTargetForID + @abstract Called to initialize a target device. + @discussion This method will be called to initialize a target device in + a single-threaded manner. The HBA can use this method to probe the + target or do anything else necessary before the device object is + registered with IOKit for matching. + @result Returns true if the target was successfully initialized. + */ + + virtual bool InitializeTargetForID ( + SCSITargetIdentifier targetID ) = 0; + + // The SCSI Task Management Functions as defined in the SCSI Architecture + // Model - 2 (SAM-2) specification. These are used by the client to request + // the specified function. The controller can complete these immmediately + // by returning the appropriate SCSIServiceResponse, or these can be completed + // asyncronously by the controller returning a SCSIServiceResponse of + // kSCSIServiceResponse_Request_In_Process and then calling the appropriate + // function complete member routine listed in the child class API section. + + virtual SCSIServiceResponse AbortTaskRequest ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL, + SCSITaggedTaskIdentifier theQ ) = 0; + + virtual SCSIServiceResponse AbortTaskSetRequest ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL ) = 0; + + virtual SCSIServiceResponse ClearACARequest ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL ) = 0; + + virtual SCSIServiceResponse ClearTaskSetRequest ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL ) = 0; + + virtual SCSIServiceResponse LogicalUnitResetRequest ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL ) = 0; + + virtual SCSIServiceResponse TargetResetRequest ( + SCSITargetIdentifier theT ) = 0; + + + + /*! + @function DoesHBAPerformAutoSense + @abstract Queries the HBA child class to determine if it automatically + performs AutoSense and provides AutoSense data for each I/O. If the HBA + allocates space for AutoSense in its HBA specific data region on a per + task basis, the HBA should respond true. + @discussion Queries the HBA child class to determine if it automatically + performs AutoSense and provides AutoSense data for each I/O. If the HBA + allocates space for AutoSense in its HBA specific data region on a per + task basis, the HBA should respond true. + @result Return true if HBA performs AutoSense into its own private data + buffer. + */ + + OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 1 ); + + virtual bool DoesHBAPerformAutoSense ( void ); + + /*! + @function ReportHBAConstraints + @abstract Called to report the I/O constraints for this controller. + A list of valid keys includes: + kIOMaximumSegmentCountReadKey, (required) + kIOMaximumSegmentCountWriteKey, (required) + kIOMaximumSegmentByteCountReadKey, (required) + kIOMaximumSegmentByteCountWriteKey, (required) + kIOMinimumSegmentAlignmentByteCountKey, (required) + kIOMaximumSegmentAddressableBitCountKey, (required) + kIOMinimumHBADataAlignmentMaskKey (required). + NB: These keys and their values are described in this header and <IOKit/IOKitKeys.h> + @param constraints. An OSDictionary object used to aggregate the key/value pairs. + Subclasses must set the required keys if they override this method. If a subclass does + not provide the required keys, the system will panic. + */ + OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 2 ); + + virtual void ReportHBAConstraints ( OSDictionary * constraints ); + + // Padding for the Client API + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 3 ); + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 4 ); + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 5 ); + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 6 ); + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 7 ); + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 8 ); + + +#if 0 +#pragma mark - +#pragma mark Child Class API +#endif + + +protected: + + // ---- Target Creation and Destruction methods --- + + /*! + @function CreateTargetForID + @abstract Method to perform device creation. + @discussion For HBA child classes that report true to the + DoesHBAPerformDeviceManagement() method, the child class will be + responsible for all device management by using these methods; + otherwise, the superclass will be responsible for all device management. + This method must be used to perform SCSI Parallel Device creation and + cannot be overridden. + @param targetID SCSIDeviceIdentifier of desired targetID. + @result returns true if successful. + */ + + bool CreateTargetForID ( SCSIDeviceIdentifier targetID ); + + /*! + @function CreateTargetForID + @abstract Method to perform device creation. + @discussion For HBA child classes that report true to the + DoesHBAPerformDeviceManagement() method, the child class will be + responsible for all device management by using these methods; + otherwise, the superclass will be responsible for all device management. + This method must be used to perform SCSI Parallel Device creation and + cannot be overridden. + @param targetID SCSIDeviceIdentifier of desired targetID. + @param properties A dictionary of properties to associate with the device + upon creation. The list of valid property keys is as follows: + kIOPropertySASAddressKey, + kIOPropertyFibreChannelNodeWorldWideNameKey, + kIOPropertyFibreChannelPortWorldWideNameKey, + kIOPropertyFibreChannelAddressIdentifierKey, and + kIOPropertyFibreChannelALPAKey. + These keys are defined in + <IOKit/storage/IOStorageProtocolCharacteristics.h> and the values + associated with these keys must be of the proper type/size, + or the target creation will not succeed. + @result returns true if successful. + */ + + bool CreateTargetForID ( SCSIDeviceIdentifier targetID, + OSDictionary * properties ); + + /*! + @function DestroyTargetForID + @abstract Method to perform device destruction. + @discussion For HBA child classes that report true to the + DoesHBAPerformDeviceManagement() method, the child class will be + responsible for all device management by using these methods; otherwise, + the superclass will be responsible for all device management. + This method must be used to perform SCSI Parallel Device destruction and + cannot be overridden. + @param targetID SCSIDeviceIdentifier of desired targetID. + */ + + void DestroyTargetForID ( SCSIDeviceIdentifier targetID ); + + /*! + @function GetTargetForID + @abstract Accessor for getting pointer to IOSCSIParallelInterfaceDevice. + @param targetID SCSIDeviceIdentifier of desired targetID. + @result returns pointer to IOSCSIParallelInterfaceDevice or NULL if not + found. + */ + + IOSCSIParallelInterfaceDevice * GetTargetForID ( + SCSIDeviceIdentifier targetID ); + + /*! + @function SetTargetProperty + @abstract Accessor for setting a property for a specific target. + @param device A pointer to a valid IOSCSIParallelInterfaceDevice. + @param key A pointer to a valid OSString object which represents the key. + A list of valid keys includes: + kIOPropertySASAddressKey, + kIOPropertyFibreChannelNodeWorldWideNameKey, + kIOPropertyFibreChannelPortWorldWideNameKey, + kIOPropertyFibreChannelAddressIdentifierKey, and + kIOPropertyFibreChannelALPAKey. + NB: These keys and their values are described in <IOKit/storage/IOStorageProtocolCharacteristics.h> + @param value Pointer to an OSObject (one of type OSData, OSString, etc.) + which represents the value for the property. The value must be of the proper type + and size for the specified key. + @result returns true if identifier was properly set, otherwise false. + */ + + bool SetTargetProperty ( SCSIDeviceIdentifier targetID, + const char * key, + OSObject * value ); + + /*! + @function RemoveTargetProperty + @abstract Accessor for removing a property from a specific target. + @param device A pointer to a valid IOSCSIParallelInterfaceDevice. + @param key A pointer to a valid OSString object which represents the key. + */ + + void RemoveTargetProperty ( SCSIDeviceIdentifier targetID, + const char * key ); + + // ---- Methods for HBA specifics. ---- + + /*! + @function SetHBAProperty + @abstract Accessor for setting a property for this object. + @param key A pointer to a valid OSString object which represents the key. + A list of valid keys includes: + kIOPropertyVendorNameKey, + kIOPropertyProductNameKey, + kIOPropertyProductRevisionLevelKey, + kIOPropertyPortDescriptionKey, + kIOPropertyPortSpeedKey, + kIOPropertyPortTopologyKey, + kIOPropertySCSIParallelSignalingTypeKey, + kIOPropertyFibreChannelCableDescriptionKey, + kIOPropertyFibreChannelNodeWorldWideNameKey, + kIOPropertyFibreChannelPortWorldWideNameKey, + kIOPropertyFibreChannelAddressIdentifierKey, and + kIOPropertyFibreChannelALPAKey. + NB: These keys and their values are described in <IOKit/storage/IOStorageDeviceCharacteristics.h> + and <IOKit/storage/IOStorageProtocolCharacteristics.h> + @param value Pointer to an OSObject (one of type OSData, OSString, etc.) + which represents the value for the property. The value must be of the proper type, + and/or size for the specified key. + @result returns true if identifier was properly set, otherwise false. + */ + + bool SetHBAProperty ( const char * key, + OSObject * value ); + + /*! + @function RemoveHBAProperty + @abstract Accessor for removing a property for this object. + @param key A pointer to a valid OSString object which represents the key. + See the SetHBAProperty() method for a list of valid keys. + */ + + void RemoveHBAProperty ( const char * key ); + + // These methods will not be called before the InitializeController() call, + // and will not be called after the TerminateController() call. But in the + // interval between those calls, they shall report the correct requested + // information. They are implemented as seperate pure virtual methods + // instead of a selector driven method because the HBA child class is + // required to report this information. + + /*! + @function ReportInitiatorIdentifier + @abstract Get the SCSI Device Identifier for the HBA. + @discussion This method will be called to determine the SCSI Device + Identifier that the Initiator has assigned for this HBA. + @result returns SCSIInitiatorIdentifier. + */ + + virtual SCSIInitiatorIdentifier ReportInitiatorIdentifier ( void ) = 0; + + /*! + @function ReportHighestSupportedDeviceID + @abstract Get the highest supported SCSI Device Identifier. + @discussion This method will be called to determine the value of the + highest SCSI Device Identifier supported by the HBA. This value will be + used to determine the last ID to process. + @result returns highest SCSIDeviceIdentifier + */ + + virtual SCSIDeviceIdentifier ReportHighestSupportedDeviceID ( void ) = 0; + + /*! + @function ReportMaximumTaskCount + @abstract Report Maximum Task Count + @discussion This method will be called to retrieve the maximum number of + outstanding tasks the HBA can process. This number must be greater than + zero or the controller driver will fail to match and load. + @result returns maximum (non-zero) task count. + */ + + virtual UInt32 ReportMaximumTaskCount ( void ) = 0; + + /*! + @function ReportHBASpecificTaskDataSize + @abstract Determine memory needed for HBA Task specific use. + @discussion This method is used to retrieve the amount of memory that + will be allocated in the SCSI Parallel Task for HBA specific use. + @result returns memory required in bytes + */ + + virtual UInt32 ReportHBASpecificTaskDataSize ( void ) = 0; + + /*! + @function ReportHBASpecificDeviceDataSize + @abstract Determine memory needed for HBA Device specific use. + @discussion This method is used to retrieve the amount of memory that + will be allocated in the SCSI Parallel Device for HBA specific use. + @result returns memory required in bytes + */ + + virtual UInt32 ReportHBASpecificDeviceDataSize ( void ) = 0; + + /*! + @function DoesHBAPerformDeviceManagement + @abstract Determine if HBA will manage devices. + @discussion This method is used to determine if the HBA will manage + target device creation and destruction. + @result return true means objects for target devices will only be + created when the child class calls the CreateTargetForID method. + */ + + virtual bool DoesHBAPerformDeviceManagement ( void ) = 0; + + // ---- Initialize and Terminate methods for the subclass to implement ----- + // The subclass shall not override the IOKit init and terminate methods, + // but shall instead rely on these methods for initialization and + // termination. + + // This is done to allow for this superclass to manage all IOKit specifics + // and to require only a Family specific API to be implemented by the + // subclass drivers. + + /*! + @function InitializeController + @abstract Called to initialize the controller + @discussion It is guaranteed that the InitializeController() will only be + called once per instantiation. The InitializeController() methods allows + the subclass driver to do all the necessary initialization required by + the hardware before it is able to accept requests to execute. All + necessary allocation of resources should be made during this method + call. This is the first method that will be called in the subclass. + @result return true means that initialization was successful. + */ + + virtual bool InitializeController ( void ) = 0; + + /*! + @function TerminateController + @abstract Called to terminate the controller + @discussion It is guaranteed that the TerminateController() will only be + called once and only after the InitializeController() method and only if + true was returned in response to the InitializeController() method. + The TerminateController() method allows the subclass to release all + resources that were acquired for operation of the hardware and shutdown + all hardware services. + This is the last method of the subclass that will be called before the + class is destroyed. + */ + + virtual void TerminateController ( void ) = 0; + + // ---- Start and Stop methods for the subclass ---- + + /*! + @function StartController + @abstract Called to start the controller + @discussion The StartController will always be called before any + requests are sent to the driver for execution. This method is called + after an initialize to start the services provided by the specific HBA + driver or called after a StopController call to restart those services. + After this call completes, all services provided by the HBA driver are + available to the client. + @result return true means that start was successful. + */ + + virtual bool StartController ( void ) = 0; + + /*! + @function StopController + @abstract Called to stop the controller + @discussion The StopController method will be called any time that the + system wants the card to stop accepting requests. ( See StartController + discussion ). The subclass should disable the hardware interrupt for + the particular controller (if possible) in this method. + */ + + virtual void StopController ( void ) = 0; + + // ---- Suspend and Resume Methods for the subclass ---- + + /*! + @function SuspendServices + @abstract Called to suspend controller services + @discussion Method will be called when the system wants to suspend the + services that are provided by the HBA driver. This call is not a reset + and the driver shall retain all state data between this so that if a + ResumeServices call is received, the driver can continue providing + services without a visible difference to the client. The driver may + receive multiple SuspendServices calls without receiving a + ResumeServices call and should ignore any after the first until a + ResumeServices call is received. + */ + + virtual void SuspendServices ( void ); + + /*! + @function ResumeServices + @abstract Called to resume controller services + @discussion Method that will be called to resume services + provided by the driver. ( See SuspendServices discussion ) + */ + + virtual void ResumeServices ( void ); + + /*! + @function HandleInterruptRequest + @abstract Handle Interrupt Request + @discussion The HandleInterruptRequest is used to notify an HBA + specific subclass that an interrupt request needs to be serviced. It is + called on the workloop (it holds the gate) at secondary interrupt level. + */ + + virtual void HandleInterruptRequest ( void ) = 0; + + /*! + @function EnableInterrupt + @abstract Enable Interrupt + @discussion Method that the HBA child class can call to enable + the associated IOInterruptEventSource. + */ + + void EnableInterrupt ( void ); + + /*! + @function DisableInterrupt + @abstract Disable Interrupt + @discussion Method that the HBA child class can call to disable + the associated IOInterruptEventSource. + */ + + void DisableInterrupt ( void ); + + /*! + @function SignalInterrupt + @abstract Signals that an interrupt has occurred. + @discussion Subclasses of IOSCSIParallelInterfaceController + should call this method in order to get the secondary interrupt + thread scheduled if and only if they will be returning false from + their overriden FilterInterruptRequest() method. See the + discussion for the FilterInterruptRequest() method for more + details. + + NOTE: This method should only be called from within the + FilterInterruptRequest() method and at no other time. + + Available in 10.3.3 or later. + + */ + + void SignalInterrupt ( void ); + + /*! + @function ProcessParallelTask + @abstract Called by client to process a parallel task. + @discussion This method is called to process a parallel task (i.e. put + the command on the bus). The HBA specific sublcass must implement this + method. + @param parallelRequest A valid SCSIParallelTaskIdentifier. + @result serviceResponse (see <IOKit/scsi/SCSITask.h>) + */ + + virtual SCSIServiceResponse ProcessParallelTask ( + SCSIParallelTaskIdentifier parallelRequest ) = 0; + + /*! + @function CompleteParallelTask + @abstract Parallel Task Completion + @discussion The HBA specific sublcass inherits the CompleteParallelTask() + method which shall be called when the HBA has completed the processing + of a parallel task. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param completionStatus The status of the SCSI bus. + @param serviceResponse (see <IOKit/scsi/SCSITask.h>) + */ + + void CompleteParallelTask ( + SCSIParallelTaskIdentifier parallelRequest, + SCSITaskStatus completionStatus, + SCSIServiceResponse serviceResponse ); + + + // Completion routines for the SCSI Task Management functions as described + // in the SCSI ArchitectureModel - 2 (SAM-2) specification. Each of these + // correspond to a client request for the specific Task Management functions. + // If the Controller Child Class completed the request by returning a + // SCSIServiceResponse of anything other than kSCSIServiceResponse_Request_In_Process, + // then the controller class does not need to call the completion member routine. + // If the controller did not complete the request immediately, then it will + // need to call the appropriate completion member routine listed here. + void CompleteAbortTask ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL, + SCSITaggedTaskIdentifier theQ, + SCSIServiceResponse serviceResponse ); + + void CompleteAbortTaskSet ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL, + SCSIServiceResponse serviceResponse ); + + void CompleteClearACA ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL, + SCSIServiceResponse serviceResponse ); + + void CompleteClearTaskSet ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL, + SCSIServiceResponse serviceResponse ); + + void CompleteLogicalUnitReset ( + SCSITargetIdentifier theT, + SCSILogicalUnitNumber theL, + SCSIServiceResponse serviceResponse ); + + void CompleteTargetReset ( + SCSITargetIdentifier theT, + SCSIServiceResponse serviceResponse ); + + /*! + @function NotifyClientsOfBusReset + @abstract Method called to notify clients that a bus reset has occurred. + @discussion This method is used by the HBA child class to inform the + parent class and any clients that a bus reset has occurred. + */ + + void NotifyClientsOfBusReset ( void ); + + /*! + @function NotifyClientsOfPortStatusChange + @abstract Method called to notify clients of port status change events. + @discussion This method is used by the HBA child class to inform the + parent class and any clients that a port has changed status. + */ + + void NotifyClientsOfPortStatusChange ( SCSIPortStatus newStatus ); + + /*! + @function GetSCSIDomainIdentifier + @abstract Accessor method to get the SCSI Domain Identifier. + @discussion Accessor method to get the SCSI Domain Identifier. + @result returns SCSI Domain Identifier. + */ + + SInt32 GetSCSIDomainIdentifier ( void ); + + /*! + @function GetProvider + @abstract Accessor method to get the IOService which is the controller's + provider. + @discussion Accessor method to get the IOService which is the + controller's provider. + @result returns pointer to IOService. + */ + + IOService * GetProvider ( void ); + + /*! + @function GetWorkLoop + @abstract Accessor method to get the IOWorkLoop associated with this + HBA. + @discussion Accessor method to get the IOWorkLoop associated with this + HBA. + @result returns pointer to IOWorkLoop. + */ + + IOWorkLoop * GetWorkLoop ( void ) const; + + /*! + @function GetCommandGate + @abstract Accessor to get an IOCommandGate associated with the workloop. + @discussion Accessor to get an IOCommandGate associated with the + workloop. + @result returns pointer to IOCommandGate. + */ + + IOCommandGate * GetCommandGate ( void ); + + // ---- SCSI Parallel Task Object Accessors ---- + + /*! + @function GetSCSITaskIdentifier + @abstract Method to retrieve a SCSITaskIdentifier from a valid + SCSIParallelTaskIdentifier. + @discussion Method to retrieve a SCSITaskIdentifier from a valid + SCSIParallelTaskIdentifier. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns SCSITaskIdentifier that represents the original request + from the SCSI Application Layer client. + */ + + SCSITaskIdentifier GetSCSITaskIdentifier ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetTargetIdentifier + @abstract Method to get the SCSITargetIdentifier associated with a + request. + @discussion Method to get the SCSITargetIdentifier associated with a + request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns SCSITargetIdentifier + */ + + SCSITargetIdentifier GetTargetIdentifier ( + SCSIParallelTaskIdentifier parallelTask ); + + // ---- Methods for Accessing data in the client's SCSI Task Object ---- + // Method to retrieve the LUN that identifies the Logical Unit whose Task + // Set to which this task is to be added. + + /*! + @function GetLogicalUnitNumber + @abstract Method to get the logical unit number associated with a + request. + @discussion Method to get the logical unit number associated with a + request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns a valid 64-bit logical unit number. + */ + + SCSILogicalUnitNumber GetLogicalUnitNumber ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetTaggedTaskIdentifier + @abstract Method to retrieve the SCSI Tagged Task Identifier of the + task. If the returned value is equal to kSCSIUntaggedTaskIdentifier, + then this task is untagged. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result an SCSITaskAttribute value. + */ + + SCSITaggedTaskIdentifier GetTaggedTaskIdentifier ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetTaskAttribute + @abstract Method to retrieve the SCSI Task Attribute of the task + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result an SCSITaskAttribute value. + */ + + SCSITaskAttribute GetTaskAttribute ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetCommandDescriptorBlockSize + @abstract Method to retrieve the size of the SCSI Command Descriptor + Block (CDB). + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns the size of the SCSI Command Descriptor Block in bytes. + */ + + UInt8 GetCommandDescriptorBlockSize ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetCommandDescriptorBlock + @abstract Method to retrieve the SCSI Command Descriptor Block (CDB). + @discussion This will always return a 16 Byte CDB. If the Protocol Layer + driver does not support 16 Byte CDBs, it will have to create a local + SCSICommandDescriptorBlock variable to get the CDB data and then + transfer the needed bytes from there. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param cdbData is a SCSICommandDescriptorBlock pointer to 16 byte CDB + @result returns true if data was copied to cdbData pointer + */ + + bool GetCommandDescriptorBlock ( + SCSIParallelTaskIdentifier parallelTask, + SCSICommandDescriptorBlock * cdbData ); + + /*! + @function GetDataTransferDirection + @abstract Retrieves the data transfer direction for any data associated + with the request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result One of the valid data transfer directions described in + <IOKit/scsi/SCSITask.h> + */ + + UInt8 GetDataTransferDirection ( SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetRequestedDataTransferCount + @abstract Retrieves the requested data transfer count for any data + associated with the request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result The requested data transfer count in bytes. + */ + + UInt64 GetRequestedDataTransferCount ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetRealizedDataTransferCount + @abstract Retrieves the realized data transfer count for any data + associated with the request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result The realized data transfer count in bytes. + */ + + UInt64 GetRealizedDataTransferCount ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function SetRealizedDataTransferCount + @abstract Sets the realized data transfer count in bytes. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param realizedTransferCountInBytes is the number of bytes actually + transferred. + @result true means the data transfer count was successfully set. + */ + + bool SetRealizedDataTransferCount ( + SCSIParallelTaskIdentifier parallelTask, + UInt64 realizedTransferCountInBytes ); + + /*! + @function IncrementRealizedDataTransferCount + @abstract Increments the realized data transfer count. This method is + helpful for when the HBA has to do multiple passes of DMA because there + are more scatter-gather elements than it can process in one pass. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param realizedTransferCountInBytes is the number of bytes to add to the + realized data count for the task. + */ + + void IncrementRealizedDataTransferCount ( + SCSIParallelTaskIdentifier parallelTask, + UInt64 realizedTransferCountInBytes ); + + /*! + @function GetDataBuffer + @abstract Method to retrieve client buffer from the request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns pointer to an IOMemoryDescriptor which represents the + buffer. + */ + + IOMemoryDescriptor * GetDataBuffer ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetDataBufferOffset + @abstract Method to retrieve offset into client buffer at which to start + processing. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns offset in bytes + */ + + UInt64 GetDataBufferOffset ( SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetDMACommand + @abstract Method to retrieve a pointer to an IODMACommand from the request. + @discussion For devices utilizing DMA, the IODMACommand object should be + obtained via GetDMACommand(). The subclass is responsible for calling prepare() + on the IODMACommand object using the proper offset obtained via GetDataBufferOffset() + and correct size obtained via GetRequestedDataTransferCount(). The subclass + is further responsible for calling complete() on the IODMACommand object once + all DMA operations have finished. + NB: Subclasses should not call IODMACommand::setMemoryDescriptor(). + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns pointer to an IODMACommand which is used in conjunction + with the task. + */ + + IODMACommand * GetDMACommand ( + SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetTimeoutDuration + @abstract Method to retrieve the timeout duration in milliseconds for a + request. + @discussion Method to retrieve the timeout duration in milliseconds for + a request. A value of zero represents an infinite timeout, or on + hardware where infinite timeouts are not possible, substitute the + longest timeout possible. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns timeout duration in milliseconds + */ + + UInt32 GetTimeoutDuration ( SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function SetAutoSenseData + @abstract Method to set the auto sense data buffer associated with a + request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param newSensedata pointer to auto sense data buffer + @result returns true if data in newSenseData was succesfully into the + task object + */ + + bool SetAutoSenseData ( + SCSIParallelTaskIdentifier parallelTask, + SCSI_Sense_Data * newSenseData, + UInt8 senseDataSize ); + + /*! + @function GetAutoSenseData + @abstract Method to retrieve auto sense data buffer associated with a + request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param receivingBuffer pointer to auto sense data buffer + @result returns true if successfully copied data into receivingBuffer + */ + + bool GetAutoSenseData ( + SCSIParallelTaskIdentifier parallelTask, + SCSI_Sense_Data * receivingBuffer, + UInt8 senseDataSize ); + + /*! + @function GetAutoSenseDataSize + @abstract Method to retrieve auto sense data buffer size associated with a + request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns Size of auto sense data buffer. + */ + + UInt8 GetAutoSenseDataSize ( + SCSIParallelTaskIdentifier parallelTask ); + + + /*! + @function GetSCSIParallelFeatureNegotiation + @abstract Method to retrieve the requested value for negotiation of the. + @discussion Query as to whether the SCSI Parallel Device object has + negotiated wide data transfers. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result A valid SCSIParallelFeatureControl. + */ + + SCSIParallelFeatureRequest GetSCSIParallelFeatureNegotiation ( + SCSIParallelTaskIdentifier parallelTask, + SCSIParallelFeature requestedFeature ); + + /*! + @function GetSCSIParallelFeatureNegotiationCount + @abstract Method to retrieve the number of requested negotiations. + @discussion Query as to the number of SCSI Parallel Features that are + requested to either be negotitated or cleared. These are all features + that are set to either kSCSIParallelFeature_AttemptNegotiation or + kSCSIParallelFeature_ClearNegotiation. If the return value is zero, + then all features are set to kSCSIParallelFeature_NoNegotiation + and all feature negotiations are to remain as they currently exist. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result an unsigned integer up to 64 bits in size. + */ + + UInt64 GetSCSIParallelFeatureNegotiationCount ( + SCSIParallelTaskIdentifier parallelTask); + + /*! + @function SetSCSIParallelFeatureNegotiationResult + @abstract Method to set the wide data transfer negotiation result. + @discussion Method to set the wide data transfer negotiation result. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param requestedFeature The SCSIParallelFeature that the has been set to + newResult. + @param newResult A valid SCSIParallelFeatureResult value. + */ + + void SetSCSIParallelFeatureNegotiationResult ( + SCSIParallelTaskIdentifier parallelTask, + SCSIParallelFeature requestedFeature, + SCSIParallelFeatureResult newResult ); + + /*! + @function GetSCSIParallelFeatureNegotiationResult + @abstract Method to retrieve the result of any wide transfer + negotiations. + @discussion Query as to whether the SCSI Parallel Controller object has + negotiated wide data transfers. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result A valid SCSIParallelFeatureResult. + */ + + SCSIParallelFeatureResult GetSCSIParallelFeatureNegotiationResult ( + SCSIParallelTaskIdentifier parallelTask, + SCSIParallelFeature requestedFeature ); + + /*! + @function GetSCSIParallelFeatureNegotiationResultCount + @abstract Method to retrieve the number of changed negotiations. + @discussion Query as to the number of SCSI Parallel Features that have + been changed to either negotitated or cleared. These are all features + that are set to either kSCSIParallelFeature_NegotitiationCleared or + kSCSIParallelFeature_NegotitiationSuccess. If the return value is zero, + then all features are set to kSCSIParallelFeature_NegotitiationUnchanged. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result an unsigned integer up to 64 bits in size. + */ + + UInt64 GetSCSIParallelFeatureNegotiationResultCount ( + SCSIParallelTaskIdentifier parallelTask); + + // Controller Task Identifier related member routines + + /*! + @function SetControllerTaskIdentifier + @abstract Method to set the Controller Task Identifier. + @discussion This method allows the Controller Child Class + driver to set a unique identifier to associate with the specified + SCSI Parallel Task. This identifier is designed to be used by + controllers that do not have access to the LUN and Tag information + when notified by the HBA that a request has completed. + If the kSCSIParallelTaskControllerIDQueueHead is used, this + member routine will return the first Task on the queue. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param newIdentifier unsigned 64 bit integer token. + @result none + */ + + void SetControllerTaskIdentifier ( + SCSIParallelTaskIdentifier parallelTask, + UInt64 newIdentifier ); + + UInt64 GetControllerTaskIdentifier ( + SCSIParallelTaskIdentifier parallelTask); + + + // The HBA Data related fields + + /*! + @function GetHBADataSize + @abstract Method to retrieve the HBA Data Size in bytes. + @discussion Method to retrieve the HBA Data Size in bytes. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns HBA Data size in bytes. + */ + + UInt32 GetHBADataSize ( SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetHBADataPointer + @abstract Method to retrieve the HBA Data pointer. + @discussion Method to retrieve the HBA Data pointer. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns pointer to buffer for HBA specific data, NULL if + none found or GetHBADataSize() returns zero. + */ + + void * GetHBADataPointer ( SCSIParallelTaskIdentifier parallelTask ); + + /*! + @function GetHBADataDescriptor + @abstract Method to retrieve the IOMemoryDescriptor associated with + the HBA Data. + @discussion Method to retrieve the IOMemoryDescriptor associated with + the HBA Data. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @result returns pointer to an IOMemoryDescriptor that wraps the HBA + specific data buffer, NULL if none found or GetHBADataSize() returns zero. + */ + + IOMemoryDescriptor * GetHBADataDescriptor ( + SCSIParallelTaskIdentifier parallelTask ); + + // ---- SCSI Parallel Device Object Accessors ---- + + // The HBA Data related fields + + /*! + @function GetHBATargetDataSize + @abstract Method to retrieve the HBA Data Size in bytes. + @discussion Method to retrieve the HBA Data Size in bytes. + @param targetDevice A valid SCSITargetIdentifier. + @result returns HBA Data size in bytes. + */ + + UInt32 GetHBATargetDataSize ( SCSITargetIdentifier targetID ); + + /*! + @function GetHBATargetDataPointer + @abstract Method to retrieve the HBA Data pointer. + @discussion Method to retrieve the HBA Data pointer. + @param targetDevice A valid SCSITargetIdentifier. + @result returns pointer to buffer for HBA specific data, NULL if + none found or GetHBADataSize is zero. + */ + + void * GetHBATargetDataPointer ( SCSITargetIdentifier targetID ); + + +#if 0 +#pragma mark - +#pragma mark Additional Child Class APIs +#endif + + + // ---- Timeout Related Methods ---- + + /*! + @function SetTimeoutForTask + @abstract Method to set the timeout duration in milliseconds for a + request. + @discussion Method to set the timeout duration in milliseconds for a + request. + @param parallelTask A valid SCSIParallelTaskIdentifier. + @param timeoutOverride A timeout value in milliseconds in case the + HBA driver wishes to override the default value provided in the + parallelTask. + */ + + void SetTimeoutForTask ( SCSIParallelTaskIdentifier parallelTask, + UInt32 timeoutOverride = 0 ); + + /*! + @function HandleTimeout + @abstract Method to handle command timeouts. + @discussion Method to handle command timeouts. This should + be overridden by the child class in order to clean up HBA + specific structures after a timeout has occurred. This method + is called on the workloop (it holds the gate). + @param parallelRequest A valid SCSIParallelTaskIdentifier. + */ + + OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 9 ); + + virtual void HandleTimeout ( + SCSIParallelTaskIdentifier parallelRequest ); + + + // ---- Filter Interrupt ---- + + /*! + @function FilterInterruptRequest + @abstract Filter method called at primary interrupt time. + @discussion Filter method called at primary interrupt time. + This should only be overridden by the child class in order + to determine if an interrupt occurred for this controller instance. + Since all work occurs at primary interrupt time, this routine + should be quick and efficient and defer as much processing as + possible to the HandleInterruptRequest() method. + + NOTE: Unlike the HandleInterruptRequest() and HandleTimeout() + methods, FilterInterruptRequest() is NOT called with the + workloop lock held. + + If the value returned by FilterInterruptRequest() is true, the + secondary interrupt thread will be scheduled and the hardware + interrupt line will be disabled. If the controller instance shares + that interrupt line with other devices, it can cause large + interrupt latencies. If the controller instance can disable the + interrupt in the chip itself, the following can be done to reduce + interrupt latencies: + + - Interrupt occurs + - FilterInterruptRequest() method is called. + - If the interrupt is not for this controller, return false + immediately. + - If the interrupt is for this controller, and the controller + can disable interrupts for this chip, the controller should + disable the interrupts for this chip, call SignalInterrupt(), + and return false. This causes the secondary interrupt thread + to get scheduled, yet does not disable the interrupt line for + all devices tied to that interrupt. This effectively allows + other devices to process their interrrupts, thus reducing + interrupt latency for those devices. + - HandleInterruptRequest() method is called. + - Controller processes interrupt and completes I/O requests. + - Controller re-enables interrupts for the device. + + NOTE: If you use this approach, the interrupting condition MUST be + cleared from the hardware, otherwise an infinite process interrupt + loop will occur. + + If the controller cannot disable interrupts on the chip, it should + simply return true if an interrupt has occurred for its device. + + @result True if the hardware interrupt line should be disabled, + otherwise false. + */ + + OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 10 ); + + virtual bool FilterInterruptRequest ( void ); + + /*! + @function InitializeDMASpecification + @abstract Called to initialize an IODMACommand with a DMA specification. + @param command A pointer to a valid IODMACommand object. Subclasses + should override this method and call IODMACommand::initWithSpecification() + supplying the proper arguments to that method based on the DMA strategy. + @result boolean value indicating success or failure. + */ + OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 11 ); + + virtual bool InitializeDMASpecification ( IODMACommand * command ); + + /*! + @function CreateDeviceInterrupt + @abstract Called to create an IOInterruptEventSource for the device. Subclasses + may wish to use a different interrupt index than 0 (e.g. for using PCI Message + Signaled Interrupts) or might not need an interrupt at all (virtual HBA). + @param action A pointer to the action routine that should be passed to either + IOInterruptEventSource::interruptEventSource() or + IOFilterInterruptEventSource::filterInterruptEventSource as the method to call + when an interrupt occurs for the device (sometimes called the "deferred procedure call" + or the "secondary context method". By passing this routine along, it will + properly wire up the HandleInterruptRequest() method you should override to handle + interrupts. + @param filter A pointer to the filter routine that should be passed to + IOFilterInterruptEventSource::filterInterruptEventSource as the method to call + at primary interrupt time when an interrupt occurs for the device. + By passing this routine along, it will properly wire up the + FilterInterruptRequest() method you may override to handle primary interrupts. + @result IOInterruptEventSource. May return NULL if and only if there is no + hardware interrupt associated with this device. + */ + OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 12 ); + + virtual IOInterruptEventSource * CreateDeviceInterrupt ( + IOInterruptEventSource::Action action, + IOFilterInterruptEventSource::Filter filter, + IOService * provider ); + + // Padding for the Child Class API + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 13 ); + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 14 ); + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 15 ); + OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 16 ); + + +#if 0 +#pragma mark - +#pragma mark Internal Use Only +#endif + +private: + + // binary compatibility instance variable expansion + struct ExpansionData { }; + ExpansionData * fIOSCSIParallelInterfaceControllerExpansionData; + + IOService * fProvider; + OSSet * fClients; + + static SInt32 fSCSIParallelDomainCount; + SInt32 fSCSIDomainIdentifier; + + // The HBA attributes + SCSIInitiatorIdentifier fInitiatorIdentifier; + + // The maximum SCSI Device Identifier support by the HBA + // This is retreived from the child class via the + SCSIDeviceIdentifier fHighestSupportedDeviceID; + + // The total number of tasks that the HBA can proccess at a time. + // This is retrieved from the child class via ReportMaximumTaskCount + UInt32 fSupportedTaskCount; + + // The Number of requests that are currently outstanding for the current + // instantiation. + UInt16 fOutstandingRequests; + + // The member variable to indicate if the current instantiation has been + // succesfully intialized. + bool fHBAHasBeenInitialized; + + // The member variable to indicate if the current instantiation is running. + // A true means that the last or only Start call made was successful. A + // false value means that either a successful Start has not been made or a + // Stop call has been made. + bool fHBACanAcceptClientRequests; + + // The pool for the available SCSI Parallel Task objects + IOCommandPool * fParallelTaskPool; + + // WorkLoop variables + IOWorkLoop * fWorkLoop; + IOTimerEventSource * fTimerEvent; + IOInterruptEventSource * fDispatchEvent; + + IOCommandGate * fControllerGate; + + bool AllocateSCSIParallelTasks ( void ); + void DeallocateSCSIParallelTasks ( void ); + + IOWorkLoop * getWorkLoop ( void ) const; + bool CreateWorkLoop ( IOService * provider ); + void ReleaseWorkLoop ( void ); + + // SCSI Parallel Device List + // The SCSI Parallel Device List will consist of 16 elements to represent + // identifiers that end in 0h through Fh. Each array element will point + // to a device object that represents the beginning of a linked list of + // device objects. By using an array of linked lists, the traversal time + // to find an object on a bus that supports a large number of devices, such + // as Fibre Channel, will be significantly lower than having to walk a list + // that is comprised of all devices on the bus. For parallel wide and + // narrow busses, which support 16 and 8 devices respectively, this will act + // like a simple array of device objects. + enum + { + kSCSIParallelDeviceListArrayCount = 16, + kSCSIParallelDeviceListIndexMask = 0x0F + }; + + IOSimpleLock * fDeviceLock; + IOSCSIParallelInterfaceDevice * + fParallelDeviceList[kSCSIParallelDeviceListArrayCount]; + + void InitializeDeviceList ( void ); + void AddDeviceToTargetList ( + IOSCSIParallelInterfaceDevice * newDevice ); + void RemoveDeviceFromTargetList ( + IOSCSIParallelInterfaceDevice * victimDevice ); + + // The Interrupt Service Routine for the controller. + static void ServiceInterrupt ( + OSObject * theObject, + IOInterruptEventSource * theSource, + int count ); + + static void TimeoutOccurred ( OSObject * owner, IOTimerEventSource * sender ); + + static bool FilterInterrupt ( + OSObject * theObject, + IOFilterInterruptEventSource * theSource ); + + // IOService support methods + // These shall not be overridden by the HBA child classes. + bool start ( IOService * provider ); + void stop ( IOService * provider ); + + +protected: + + // These may be overriden by the HBA child classes if necessary, but should + // call the superclass implementation. + virtual bool handleOpen ( + IOService * client, + IOOptionBits options, + void * arg ); + + virtual void handleClose ( + IOService * client, + IOOptionBits options ); + + virtual bool handleIsOpen ( + const IOService * client ) const; + + virtual bool willTerminate ( IOService * provider, IOOptionBits options ); + virtual bool didTerminate ( IOService * provider, IOOptionBits options, bool * defer ); + +}; + + +#endif /* __IOKIT_IO_SCSI_PARALLEL_INTERFACE_CONTROLLER_H__ */ \ No newline at end of file diff --git a/i386/include/IOKit/serial/.svn/all-wcprops b/i386/include/IOKit/serial/.svn/all-wcprops new file mode 100644 index 0000000..26769b8 --- /dev/null +++ b/i386/include/IOKit/serial/.svn/all-wcprops @@ -0,0 +1,35 @@ +K 25 +svn:wc:ra_dav:version-url +V 59 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/serial +END +IORS232SerialStreamSync.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/serial/IORS232SerialStreamSync.h +END +IOSerialDriverSync.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/serial/IOSerialDriverSync.h +END +IOSerialStreamSync.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/serial/IOSerialStreamSync.h +END +IOModemSerialStreamSync.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/serial/IOModemSerialStreamSync.h +END +IOSerialKeys.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/serial/IOSerialKeys.h +END diff --git a/i386/include/IOKit/serial/.svn/entries b/i386/include/IOKit/serial/.svn/entries new file mode 100644 index 0000000..20342de --- /dev/null +++ b/i386/include/IOKit/serial/.svn/entries @@ -0,0 +1,198 @@ +10 + +dir +2117 +http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/serial +http://forge.voodooprojects.org/svn/chameleon + + + +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + +b5af796a-00a8-11df-919b-ffff7a100b7d + +IORS232SerialStreamSync.h +file + + + + +2012-10-03T17:50:20.000000Z +0c2a5b36af70b8a5fc48f9f984e42b8f +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +7628 + +IOSerialDriverSync.h +file + + + + +2012-10-03T17:50:20.000000Z +1de76939037928e06b59a471b77174ea +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +3579 + +IOSerialStreamSync.h +file + + + + +2012-10-03T17:50:20.000000Z +91e7b9256b39f31244ba4cfa14404a6c +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +11947 + +IOModemSerialStreamSync.h +file + + + + +2012-10-03T17:50:20.000000Z +9ef1d5116b75c1c73a3ccb151f3eec13 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +1425 + +IOSerialKeys.h +file + + + + +2012-10-03T17:50:20.000000Z +85af242f0159d91cac30a3e340bb7ffb +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +2856 + diff --git a/i386/include/IOKit/serial/.svn/text-base/IOModemSerialStreamSync.h.svn-base b/i386/include/IOKit/serial/.svn/text-base/IOModemSerialStreamSync.h.svn-base new file mode 100644 index 0000000..be75287 --- /dev/null +++ b/i386/include/IOKit/serial/.svn/text-base/IOModemSerialStreamSync.h.svn-base @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * + * IOModemSerialStreamSync.h + * This file contains Modem specific extensions to the IOSerialStreamSync class. + * + * 2000-10-21 gvdl Initial real change to IOKit serial family. + * + */ + +#ifndef _SERIAL_IOMODEMSERIALSTREAMSYNC_H +#define _SERIAL_IOMODEMSERIALSTREAMSYNC_H + +#include <IOKit/serial/IOSerialStreamSync.h> + +class IOModemSerialStreamSync : public IOSerialStreamSync +{ + OSDeclareDefaultStructors(IOModemSerialStreamSync) +}; + +#endif /* !_SERIAL_IOMODEMSERIALSTREAMSYNC_H */ + diff --git a/i386/include/IOKit/serial/.svn/text-base/IORS232SerialStreamSync.h.svn-base b/i386/include/IOKit/serial/.svn/text-base/IORS232SerialStreamSync.h.svn-base new file mode 100644 index 0000000..15d520a --- /dev/null +++ b/i386/include/IOKit/serial/.svn/text-base/IORS232SerialStreamSync.h.svn-base @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * IORS232SerialStreamSync.h + * This file contains RS232 specific extensions to the IOSerialStreamSync class. + * + * 2000-10-21 gvdl Initial real change to IOKit serial family. + */ + +#ifndef _SERIAL_IORS232SERIALSTREAMSYNC_H +#define _SERIAL_IORS232SERIALSTREAMSYNC_H + +#include <sys/ioctl.h> +#include <IOKit/serial/IOSerialStreamSync.h> + +/* + * Extra events for RS232 based PortDevices + */ + +#define PD_RS232_E_RX_LINE_BREAK (PD_DATA_VOID|PD_OP(63)) // line break was received +#define PD_RS232_E_LINE_BREAK (PD_DATA_BYTE|PD_OP(62)) // BOOL set/clear line break + +#define PD_RS232_E_RX_STOP_BITS (PD_DATA_LONG|PD_OP(61)) // half stop bits +#define PD_RS232_E_STOP_BITS (PD_DATA_LONG|PD_OP(60)) // half stop bits + +#define PD_RS232_E_XON_BYTE (PD_DATA_BYTE|PD_OP(59)) // The XON char for TX&RX +#define PD_RS232_E_XOFF_BYTE (PD_DATA_BYTE|PD_OP(58)) // The XOFF char for TX&RX + +#define PD_RS232_E_MIN_LATENCY (PD_DATA_BYTE|PD_OP(57)) // BOOL true if low latency req + +/* + * RS232 Parity stuff, used with the DATA_INTEGRITY event + */ +#define PD_RS232_PARITY_DEFAULT 0 // Valid only for RX, means follow TX +#define PD_RS232_PARITY_NONE 1 // No Parity bit inserted or expected +#define PD_RS232_PARITY_ODD 2 // Odd Parity bit inserted or expected +#define PD_RS232_PARITY_EVEN 3 // Even Parity bit inserted or expected +#define PD_RS232_PARITY_MARK 4 // Mark inserted or expected +#define PD_RS232_PARITY_SPACE 5 // Space inserted or expected +#define PD_RS232_PARITY_ANY 6 // Valid only for RX, means discard parity + +/* + * RS232 Flow Control specifiers, used with the FLOW_CONTROL event + * NB. The XON character is set with FLOW_START_DATA + * and the XOFF character is set with FLOW_STOP_DATA. + * + * Signal Name Direction + * RFR Ready For Receive Output generated by UART + * RTS Ready To Send (alias of RFR) Output generated by UART + * CTS Clear To Send Input sensed by UART + * DTR Data Terminal Ready Output generated by UART + * DSR Data Set Ready Input sensed by UART + * TXO XON/XOFF/XANY protocol Characters received by UART + * RXO XON/XOFF protocol Characters transmitted by UART + * DCD Data Carrier Detect Input sensed by UART + */ + +/* + * RS232 State Word extensions, based on <bsd/sys/ioctl.h> + * Also the 'current state' bits for enq/deq of Flow Control event + */ +#define PD_RS232_S_MASK 0x0000ffffUL +#define PD_RS232_S_SHIFT 0 // to align State bits for enq/deq event +#define PD_RS232_D_MASK 0xffff0000UL +#define PD_RS232_D_SHIFT 16 // to align Delta bits for enq/deq event +#define PD_RS232_A_MASK 0x0000ffffUL +#define PD_RS232_A_SHIFT 0 // to align Auto bits for req/exec event +#define PD_RS232_N_MASK 0xffff0000UL +#define PD_RS232_N_SHIFT 16 // to align Notify bits for req/exec event + +#define PD_RS232_S_LE TIOCM_LE // line enable +#define PD_RS232_S_DTR TIOCM_DTR // data terminal ready +#define PD_RS232_S_RTS TIOCM_RTS // request to send +#define PD_RS232_S_RFR PD_RS232_S_RTS // ready for receive +#define PD_RS232_S_TXO TIOCM_ST // TX XON/XOFF +#define PD_RS232_S_RXO TIOCM_SR // RX XON/XOFF +#define PD_RS232_S_CTS TIOCM_CTS // clear to send +#define PD_RS232_S_CAR TIOCM_CAR // carrier detect +#define PD_RS232_S_DCD PD_RS232_S_CAR +#define PD_RS232_S_RNG TIOCM_RNG // ring +#define PD_RS232_S_RI PD_RS232_S_RNG +#define PD_RS232_S_DSR TIOCM_DSR // data set ready + +#define PD_RS232_S_BRK 0x00000800UL // break active Extension to TIOCM +#define PD_RS232_S_LOOP 0x00001000UL // LOOP back Extension to TIOCM +#define PD_RS232_S_TXQ 0x00002000UL // User flowcontrol bit +#define PD_RS232_S_RXQ 0x00004000UL // User flowcontrol bit + +// The 'delta' bits for enq/deq of Flow Control event +#define PD_RS232_D_LE (PD_RS232_S_LE << PD_RS232_D_SHIFT) +#define PD_RS232_D_DTR (PD_RS232_S_DTR << PD_RS232_D_SHIFT) +#define PD_RS232_D_RTS (PD_RS232_S_RTS << PD_RS232_D_SHIFT) +#define PD_RS232_D_RFR (PD_RS232_S_RFR << PD_RS232_D_SHIFT) +#define PD_RS232_D_TXO (PD_RS232_S_TXO << PD_RS232_D_SHIFT) +#define PD_RS232_D_RXO (PD_RS232_S_RXO << PD_RS232_D_SHIFT) +#define PD_RS232_D_CTS (PD_RS232_S_CTS << PD_RS232_D_SHIFT) +#define PD_RS232_D_CAR (PD_RS232_S_CAR << PD_RS232_D_SHIFT) +#define PD_RS232_D_DCD (PD_RS232_S_DCD << PD_RS232_D_SHIFT) +#define PD_RS232_D_RNG (PD_RS232_S_RNG << PD_RS232_D_SHIFT) +#define PD_RS232_D_RI (PD_RS232_S_RI << PD_RS232_D_SHIFT) +#define PD_RS232_D_DSR (PD_RS232_S_DSR << PD_RS232_D_SHIFT) + +#define PD_RS232_D_BRK (PD_RS232_S_BRK << PD_RS232_D_SHIFT) +#define PD_RS232_D_LOOP (PD_RS232_S_LOOP << PD_RS232_D_SHIFT) +#define PD_RS232_D_TXQ (PD_RS232_S_TXQ << PD_RS232_D_SHIFT) +#define PD_RS232_D_RXQ (PD_RS232_S_RXQ << PD_RS232_D_SHIFT) + +// The 'auto' bits for exec/req of Flow Control event +#define PD_RS232_A_LE PD_RS232_S_LE +#define PD_RS232_A_DTR PD_RS232_S_DTR +#define PD_RS232_A_RTS PD_RS232_S_RTS +#define PD_RS232_A_RFR PD_RS232_S_RFR +#define PD_RS232_A_TXO PD_RS232_S_TXO +#define PD_RS232_A_RXO PD_RS232_S_RXO +#define PD_RS232_A_CTS PD_RS232_S_CTS +#define PD_RS232_A_CAR PD_RS232_S_CAR +#define PD_RS232_A_DCD PD_RS232_S_DCD +#define PD_RS232_A_RNG PD_RS232_S_RNG +#define PD_RS232_A_RI PD_RS232_S_RI +#define PD_RS232_A_DSR PD_RS232_S_DSR +#define PD_RS232_A_XANY 0x00000400 // changes _A_TXO from XON/XOFF to XANY/XOFF +#define PD_RS232_A_BRK PD_RS232_S_BRK +#define PD_RS232_A_LOOP PD_RS232_S_LOOP +#define PD_RS232_A_TXQ PD_RS232_S_TXQ +#define PD_RS232_A_RXQ PD_RS232_S_RXQ + +// The 'notify' bits for exec/req of Flow Control event +#define PD_RS232_N_LE (PD_RS232_S_LE << PD_RS232_N_SHIFT) +#define PD_RS232_N_DTR (PD_RS232_S_DTR << PD_RS232_N_SHIFT) +#define PD_RS232_N_RTS (PD_RS232_S_RTS << PD_RS232_N_SHIFT) +#define PD_RS232_N_RFR (PD_RS232_S_RFR << PD_RS232_N_SHIFT) +#define PD_RS232_N_TXO (PD_RS232_S_TXO << PD_RS232_N_SHIFT) +#define PD_RS232_N_RXO (PD_RS232_S_RXO << PD_RS232_N_SHIFT) +#define PD_RS232_N_CTS (PD_RS232_S_CTS << PD_RS232_N_SHIFT) +#define PD_RS232_N_CAR (PD_RS232_S_CAR << PD_RS232_N_SHIFT) +#define PD_RS232_N_DCD (PD_RS232_S_DCD << PD_RS232_N_SHIFT) +#define PD_RS232_N_RNG (PD_RS232_S_RNG << PD_RS232_N_SHIFT) +#define PD_RS232_N_RI (PD_RS232_S_RI << PD_RS232_N_SHIFT) +#define PD_RS232_N_DSR (PD_RS232_S_DSR << PD_RS232_N_SHIFT) + +#define PD_RS232_N_BRK (PD_RS232_S_BRK << PD_RS232_N_SHIFT) +#define PD_RS232_N_LOOP (PD_RS232_S_LOOP << PD_RS232_N_SHIFT) +#define PD_RS232_N_TXQ (PD_RS232_S_TXQ << PD_RS232_N_SHIFT) +#define PD_RS232_N_RXQ (PD_RS232_S_RXQ << PD_RS232_N_SHIFT) + +class IORS232SerialStreamSync : public IOSerialStreamSync +{ + OSDeclareDefaultStructors(IORS232SerialStreamSync) +}; + +#endif /* !_SERIAL_IORS232SERIALSTREAMSYNC_H */ + diff --git a/i386/include/IOKit/serial/.svn/text-base/IOSerialDriverSync.h.svn-base b/i386/include/IOKit/serial/.svn/text-base/IOSerialDriverSync.h.svn-base new file mode 100644 index 0000000..92f69df --- /dev/null +++ b/i386/include/IOKit/serial/.svn/text-base/IOSerialDriverSync.h.svn-base @@ -0,0 +1,91 @@ +/* + *Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + *@APPLE_LICENSE_HEADER_START@ + * + *The contents of this file constitute Original Code as defined in and + *are subject to the Apple Public Source License Version 1.1 (the + *"License"). You may not use this file except in compliance with the + *License. Please obtain a copy of the License at + *http://www.apple.com/publicsource and read it before using this file. + * + *This Original Code and all software distributed under the License are + *distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + *EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + *INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + *FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + *License for the specific language governing rights and limitations + *under the License. + * + *@APPLE_LICENSE_HEADER_END@ + */ + +/* + * IOSerialDriverSync.h + * This file contains the abstract parent class for any IOSerialDriver + * interface, which is a generic serial interface, designed for devices + * that do character oriented transfers (async) rather than block or + * packet transfers. Most notably RS-232, Printer, Mouse, and Keyboard + * type devices. + * + * 2000-10-21 gvdl Initial real change to IOKit serial family. + */ + +#ifndef _SERIAL_IOSERIALDRIVERSYNC_H +#define _SERIAL_IOSERIALDRIVERSYNC_H + +#include <IOKit/IOService.h> + +class IOSerialDriverSync : public IOService +{ + OSDeclareAbstractStructors(IOSerialDriverSync); + +public: + virtual IOReturn acquirePort(bool sleep, void *refCon) = 0; + + virtual IOReturn releasePort(void *refCon) = 0; + + virtual IOReturn setState(UInt32 state, UInt32 mask, void *refCon) = 0; + + virtual UInt32 getState(void *refCon) = 0; + + virtual IOReturn watchState(UInt32 *state, UInt32 mask, void *refCon) = 0; + + virtual UInt32 nextEvent(void *refCon) = 0; + + virtual IOReturn executeEvent(UInt32 event, UInt32 data, void *refCon) = 0; + + virtual IOReturn requestEvent(UInt32 event, UInt32 *data, void *refCon) = 0; + + virtual IOReturn enqueueEvent(UInt32 event, UInt32 data, + bool sleep, void *refCon) = 0; + + virtual IOReturn dequeueEvent(UInt32 *event, UInt32 *data, + bool sleep, void *refCon) = 0; + + virtual IOReturn enqueueData(UInt8 *buffer, UInt32 size, UInt32 *count, + bool sleep, void *refCon) = 0; + + virtual IOReturn dequeueData(UInt8 *buffer, UInt32 size, UInt32 *count, + UInt32 min, void *refCon) = 0; + +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 0); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 1); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 2); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 3); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 4); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 5); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 6); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 7); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 8); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 9); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 10); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 11); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 12); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 13); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 14); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 15); + +}; + +#endif /* !_SERIAL_IOSERIALDRIVERSYNC_H */ diff --git a/i386/include/IOKit/serial/.svn/text-base/IOSerialKeys.h.svn-base b/i386/include/IOKit/serial/.svn/text-base/IOSerialKeys.h.svn-base new file mode 100644 index 0000000..9538a24 --- /dev/null +++ b/i386/include/IOKit/serial/.svn/text-base/IOSerialKeys.h.svn-base @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * IOSerialKeys.h + * + * 2000-10-21 gvdl Initial real change to IOKit serial family. + * + */ + +/* +Sample Matching dictionary +{ + IOProviderClass = kIOSerialBSDServiceValue; + kIOSerialBSDTypeKey = kIOSerialBSDAllTypes + | kIOSerialBSDModemType + | kIOSerialBSDRS232Type; + kIOTTYDeviceKey = <Raw Unique Device Name>; + kIOTTYBaseNameKey = <Raw Unique Device Name>; + kIOTTYSuffixKey = <Raw Unique Device Name>; + kIOCalloutDeviceKey = <Callout Device Name>; + kIODialinDeviceKey = <Dialin Device Name>; +} + +Note only the IOProviderClass is mandatory. The other keys allow the searcher to reduce the size of the set of matching devices. +*/ + +/* Service Matching That is the 'IOProviderClass' */ +#define kIOSerialBSDServiceValue "IOSerialBSDClient" + +/* Matching keys */ +#define kIOSerialBSDTypeKey "IOSerialBSDClientType" + +/* Currently possible kIOSerialBSDTypeKey values. */ +#define kIOSerialBSDAllTypes "IOSerialStream" +#define kIOSerialBSDModemType "IOModemSerialStream" +#define kIOSerialBSDRS232Type "IORS232SerialStream" + +// Properties that resolve to a /dev device node to open for +// a particular service +#define kIOTTYDeviceKey "IOTTYDevice" +#define kIOTTYBaseNameKey "IOTTYBaseName" +#define kIOTTYSuffixKey "IOTTYSuffix" + +#define kIOCalloutDeviceKey "IOCalloutDevice" +#define kIODialinDeviceKey "IODialinDevice" + +// Property 'ioctl' wait for the tty device to go idle. +#define kIOTTYWaitForIdleKey "IOTTYWaitForIdle" + +#if KERNEL +extern const OSSymbol *gIOSerialBSDServiceValue; +extern const OSSymbol *gIOSerialBSDTypeKey; +extern const OSSymbol *gIOSerialBSDAllTypes; +extern const OSSymbol *gIOSerialBSDModemType; +extern const OSSymbol *gIOSerialBSDRS232Type; +extern const OSSymbol *gIOTTYDeviceKey; +extern const OSSymbol *gIOTTYBaseNameKey; +extern const OSSymbol *gIOTTYSuffixKey; +extern const OSSymbol *gIOCalloutDeviceKey; +extern const OSSymbol *gIODialinDeviceKey; +#endif /* KERNEL */ diff --git a/i386/include/IOKit/serial/.svn/text-base/IOSerialStreamSync.h.svn-base b/i386/include/IOKit/serial/.svn/text-base/IOSerialStreamSync.h.svn-base new file mode 100644 index 0000000..b654adb --- /dev/null +++ b/i386/include/IOKit/serial/.svn/text-base/IOSerialStreamSync.h.svn-base @@ -0,0 +1,275 @@ +/* + *Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + *@APPLE_LICENSE_HEADER_START@ + * + *The contents of this file constitute Original Code as defined in and + *are subject to the Apple Public Source License Version 1.1 (the + *"License"). You may not use this file except in compliance with the + *License. Please obtain a copy of the License at + *http://www.apple.com/publicsource and read it before using this file. + * + *This Original Code and all software distributed under the License are + *distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + *EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + *INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + *FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + *License for the specific language governing rights and limitations + *under the License. + * + *@APPLE_LICENSE_HEADER_END@ + */ +/* + * IOSerialStreamSync.h + * + * 2000-10-21 gvdl Initial real change to IOKit serial family. + * + */ + +#ifndef _SERIAL_IOSERIALSTREAMSYNC_H +#define _SERIAL_IOSERIALSTREAMSYNC_H + +#include <IOKit/IOService.h> + +#ifdef __LP64__ + +#define PD_DATA_MASK 0x03U +#define PD_DATA_VOID 0x00U +#define PD_DATA_BYTE 0x01U +#define PD_DATA_WORD 0x02U +#define PD_DATA_LONG 0x03U + +#else + +#define PD_DATA_MASK 0x03UL +#define PD_DATA_VOID 0x00UL +#define PD_DATA_BYTE 0x01UL +#define PD_DATA_WORD 0x02UL +#define PD_DATA_LONG 0x03UL + +#endif + +#define PD_OP(x) ((x) << 2) +#define PD_E_MASK (~PD_DATA_MASK) + +/* General Command & Status events */ +#define PD_E_EOQ (PD_DATA_VOID|PD_OP( 0)) // Always nextEvent on empty queue +#define PD_E_ACTIVE (PD_DATA_BYTE|PD_OP( 1)) // BOOL start/shutdown chip + +/* Queue management events - all units are multiples of characters + *based on the current character size + */ +#define PD_E_TXQ_SIZE (PD_DATA_LONG|PD_OP( 2)) +#define PD_E_RXQ_SIZE (PD_DATA_LONG|PD_OP( 3)) +#define PD_E_TXQ_LOW_WATER (PD_DATA_LONG|PD_OP( 4)) +#define PD_E_RXQ_LOW_WATER (PD_DATA_LONG|PD_OP( 5)) +#define PD_E_TXQ_HIGH_WATER (PD_DATA_LONG|PD_OP( 6)) +#define PD_E_RXQ_HIGH_WATER (PD_DATA_LONG|PD_OP( 7)) +#define PD_E_TXQ_AVAILABLE (PD_DATA_LONG|PD_OP( 8)) +#define PD_E_RXQ_AVAILABLE (PD_DATA_LONG|PD_OP( 9)) +#define PD_E_TXQ_FLUSH (PD_DATA_VOID|PD_OP(10)) +#define PD_E_RXQ_FLUSH (PD_DATA_LONG|PD_OP(11)) + +/* port & link characteristics - units are half bits */ +#define PD_E_DATA_RATE (PD_DATA_LONG|PD_OP(12)) // raw bits of symbols per second +#define PD_E_RX_DATA_RATE (PD_DATA_LONG|PD_OP(13)) +#define PD_E_DATA_SIZE (PD_DATA_LONG|PD_OP(14)) // raw bits per symbol +#define PD_E_RX_DATA_SIZE (PD_DATA_LONG|PD_OP(15)) +#define PD_E_DATA_INTEGRITY (PD_DATA_LONG|PD_OP(16)) // parity or ECC method +#define PD_E_RX_DATA_INTEGRITY (PD_DATA_LONG|PD_OP(17)) +#define PD_E_EXTERNAL_CLOCK_MODE (PD_DATA_LONG|PD_OP(28)) // multiplier between clock and data rates + +/* timeout events */ +#define PD_E_DELAY (PD_DATA_LONG|PD_OP(18)) // inter-character delay (us) +#define PD_E_DATA_LATENCY (PD_DATA_LONG|PD_OP(19)) // A dequeueData Latency timeout + // rcs Secondary Timer mainly to fix performance + // problems with MIDI and IRDA drivers. + // Midi and Irda drivers will issue an IOCTL + // call with this as the selector and + // the Data as the value they want the rate set + // to (Typically 1 for IrDA devices) +#define PD_E_FLOW_CONTROL (PD_DATA_LONG|PD_OP(20)) // enable/disable each flow mechanism + +/* I/O events */ +#define PD_E_VALID_DATA (PD_DATA_VOID|PD_OP(21)) // A valid frame was received +#define PD_E_VALID_DATA_BYTE (PD_DATA_BYTE|PD_E_VALID_DATA) +#define PD_E_VALID_DATA_WORD (PD_DATA_WORD|PD_E_VALID_DATA) +#define PD_E_VALID_DATA_LONG (PD_DATA_LONG|PD_E_VALID_DATA) + +#define PD_E_SPECIAL (PD_DATA_VOID|PD_OP(22)) // valid data received with 'special' value +#define PD_E_SPECIAL_BYTE (PD_DATA_BYTE|PD_E_SPECIAL) +#define PD_E_SPECIAL_WORD (PD_DATA_WORD|PD_E_SPECIAL) +#define PD_E_SPECIAL_LONG (PD_DATA_LONG|PD_E_SPECIAL) + +#define PD_E_FRAMING_ERROR (PD_DATA_VOID|PD_OP(23)) // Failure occured assembling frame +#define PD_E_FRAMING_BYTE (PD_DATA_BYTE|PD_E_FRAMING_ERROR) +#define PD_E_FRAMING_WORD (PD_DATA_WORD|PD_E_FRAMING_ERROR) +#define PD_E_FRAMING_LONG (PD_DATA_LONG|PD_E_FRAMING_ERROR) + +#define PD_E_INTEGRITY_ERROR (PD_DATA_VOID|PD_OP(24)) // An uncorrectable frame was received +#define PD_E_INTEGRITY_BYTE (PD_DATA_BYTE|PD_E_INTEGRITY_ERROR) +#define PD_E_INTEGRITY_WORD (PD_DATA_WORD|PD_E_INTEGRITY_ERROR) +#define PD_E_INTEGRITY_LONG (PD_DATA_LONG|PD_E_INTEGRITY_ERROR) + +#define PD_E_INTEGRITY_WARNING (PD_DATA_VOID|PD_OP(25)) // A correctable frame was received +#define PD_E_HW_OVERRUN_ERROR (PD_DATA_VOID|PD_OP(26)) // Hardware's buffer overflowed, data lost +#define PD_E_SW_OVERRUN_ERROR (PD_DATA_VOID|PD_OP(27)) // Driver's buffer overflowed, data lost + +/* + *The variables below make up the bits returned + *by the State methods:- getState, setState, watchState + */ +#define PD_S_MASK 0xffff0000UL +#define PD_S_RX_OFFSET 7 + +#define PD_S_ACQUIRED 0x80000000UL +#define PD_S_ACTIVE 0x40000000UL + +#define PD_S_TX_ENABLE 0x20000000UL +#define PD_S_TX_BUSY 0x10000000UL +#define PD_S_TX_EVENT 0x08000000UL +#define PD_S_TXQ_EMPTY 0x04000000UL +#define PD_S_TXQ_LOW_WATER 0x02000000UL +#define PD_S_TXQ_HIGH_WATER 0x01000000UL +#define PD_S_TXQ_FULL 0x00800000UL +#define PD_S_TXQ_MASK ( PD_S_TXQ_EMPTY | PD_S_TXQ_LOW_WATER \ + | PD_S_TXQ_FULL | PD_S_TXQ_HIGH_WATER ) + +#define PD_S_RX_ENABLE (PD_S_TX_ENABLE >> PD_S_RX_OFFSET) +#define PD_S_RX_BUSY (PD_S_TX_BUSY >> PD_S_RX_OFFSET) +#define PD_S_RX_EVENT (PD_S_TX_EVENT >> PD_S_RX_OFFSET) +#define PD_S_RXQ_EMPTY (PD_S_TXQ_EMPTY >> PD_S_RX_OFFSET) +#define PD_S_RXQ_LOW_WATER (PD_S_TXQ_LOW_WATER >> PD_S_RX_OFFSET) +#define PD_S_RXQ_HIGH_WATER (PD_S_TXQ_HIGH_WATER >> PD_S_RX_OFFSET) +#define PD_S_RXQ_FULL (PD_S_TXQ_FULL >> PD_S_RX_OFFSET) +#define PD_S_RXQ_MASK (PD_S_TXQ_MASK >> PD_S_RX_OFFSET) + +class IOSerialDriverSync; +class IOSerialStreamSync : public IOService +{ + OSDeclareDefaultStructors(IOSerialStreamSync); + +protected: + IOSerialDriverSync *fProvider; + void *fRefCon; + +public: + /* acquire tests and sets the state of the port object. If the port was + *available, then the state is set to busy, and kIOReturnSuccess is returned. + *If the port was already busy and sleep is YES, then the thread will sleep + *until the port is freed, then re-attempts the acquire. If the port was + *already busy and sleep in NO, then kIOReturnExclusiveAccess is returned. + */ + virtual IOReturn acquirePort(bool sleep); + + /* release sets the state of the port object to available and wakes up any + *threads sleeping for access to this port. It will return kIOReturnSuccess + *if the port was in a busy state, and kIOReturnNotOpen if it was available. + */ + virtual IOReturn releasePort(); + + /* + *Set the state for the port device. + */ + virtual IOReturn setState(UInt32 state, UInt32 mask); + + /* + *Get the state for the port device. + */ + virtual UInt32 getState(); + + /* + *Wait for the at least one of the state bits defined in mask to be equal + *to the value defined in state. + *Check on entry then sleep until necessary. + */ + virtual IOReturn watchState(UInt32 *state, UInt32 mask); + + /* nextEvent returns the type of the next event on the RX queue. If no + *events are present on the RX queue, then EOQ is returned. + */ + virtual UInt32 nextEvent(); + + /* executeEvent causes the specified event to be processed immediately. + *This is primarily used for channel control commands like START & STOP + */ + virtual IOReturn executeEvent(UInt32 event, UInt32 data); + + /* requestEvent processes the specified event as an immediate request and + *returns the results in data. This is primarily used for getting link + *status information and verifying baud rate and such. + */ + virtual IOReturn requestEvent(UInt32 event, UInt32 *data); + + /* enqueueEvent will place the specified event into the TX queue. The + *sleep argument allows the caller to specify the enqueueEvent's + *behaviour when the TX queue is full. If sleep is true, then this + *method will sleep until the event is enqueued. If sleep is false, + *then enqueueEvent will immediatly return kIOReturnNoResources. + */ + virtual IOReturn enqueueEvent(UInt32 event, UInt32 data, bool sleep); + + /* dequeueEvent will remove the oldest event from the RX queue and return + *it in event & data. The sleep argument defines the behaviour if the RX + *queue is empty. If sleep is true, then this method will sleep until an + *event is available. If sleep is false, then an EOQ event will be + *returned. In either case kIOReturnSuccess is returned. + */ + virtual IOReturn dequeueEvent(UInt32 *event, UInt32 *data, bool sleep); + + /* enqueueData will attempt to copy data from the specified buffer to the + *TX queue as a sequence of VALID_DATA events. The argument bufferSize + *specifies the number of bytes to be sent. The actual number of bytes + *transferred is returned in transferCount. If sleep is true, then this + *method will sleep until all bytes can be transferred. If sleep is + *false, then as many bytes as possible will be copied to the TX queue. + */ + virtual IOReturn enqueueData(UInt8 *buffer, UInt32 size, UInt32 *count, bool sleep ); + + /* dequeueData will attempt to copy data from the RX queue to the specified + *buffer. No more than bufferSize VALID_DATA events will be transferred. + *In other words, copying will continue until either a non-data event is + *encountered or the transfer buffer is full. The actual number of bytes + *transferred is returned in transferCount. + * + *The sleep semantics of this method are slightly more complicated than + *other methods in this API: Basically, this method will continue to + *sleep until either minCount characters have been received or a non + *data event is next in the RX queue. If minCount is zero, then this + *method never sleeps and will return immediatly if the queue is empty. + * + *The latency parameter specifies the maximum amount of time that should + *pass after the first character is available before the routine returns. + *This allows the caller to specify a 'packet' timeout. The unit of the + *latency parameter is microseconds, though the exact delay may vary + *depending on the granularity of the timeout services available to the + *driver. + */ + virtual IOReturn dequeueData(UInt8 *buffer, UInt32 size, UInt32 *count, UInt32 min); + + /* Internal for IOSerialDriver only */ + virtual bool init(OSDictionary *dictionary = 0, void *refCon = 0); + virtual bool attach(IOService *provider); + void *getRefCon() const { return fRefCon; } + +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 0); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 1); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 2); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 3); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 4); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 5); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 6); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 7); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 8); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 9); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 10); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 11); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 12); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 13); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 14); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 15); +}; + +#endif /* !_SERIAL_IOSERIALSTREAMSYNC_H */ + + diff --git a/i386/include/IOKit/serial/IOModemSerialStreamSync.h b/i386/include/IOKit/serial/IOModemSerialStreamSync.h new file mode 100644 index 0000000..be75287 --- /dev/null +++ b/i386/include/IOKit/serial/IOModemSerialStreamSync.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * + * IOModemSerialStreamSync.h + * This file contains Modem specific extensions to the IOSerialStreamSync class. + * + * 2000-10-21 gvdl Initial real change to IOKit serial family. + * + */ + +#ifndef _SERIAL_IOMODEMSERIALSTREAMSYNC_H +#define _SERIAL_IOMODEMSERIALSTREAMSYNC_H + +#include <IOKit/serial/IOSerialStreamSync.h> + +class IOModemSerialStreamSync : public IOSerialStreamSync +{ + OSDeclareDefaultStructors(IOModemSerialStreamSync) +}; + +#endif /* !_SERIAL_IOMODEMSERIALSTREAMSYNC_H */ + diff --git a/i386/include/IOKit/serial/IORS232SerialStreamSync.h b/i386/include/IOKit/serial/IORS232SerialStreamSync.h new file mode 100644 index 0000000..15d520a --- /dev/null +++ b/i386/include/IOKit/serial/IORS232SerialStreamSync.h @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * IORS232SerialStreamSync.h + * This file contains RS232 specific extensions to the IOSerialStreamSync class. + * + * 2000-10-21 gvdl Initial real change to IOKit serial family. + */ + +#ifndef _SERIAL_IORS232SERIALSTREAMSYNC_H +#define _SERIAL_IORS232SERIALSTREAMSYNC_H + +#include <sys/ioctl.h> +#include <IOKit/serial/IOSerialStreamSync.h> + +/* + * Extra events for RS232 based PortDevices + */ + +#define PD_RS232_E_RX_LINE_BREAK (PD_DATA_VOID|PD_OP(63)) // line break was received +#define PD_RS232_E_LINE_BREAK (PD_DATA_BYTE|PD_OP(62)) // BOOL set/clear line break + +#define PD_RS232_E_RX_STOP_BITS (PD_DATA_LONG|PD_OP(61)) // half stop bits +#define PD_RS232_E_STOP_BITS (PD_DATA_LONG|PD_OP(60)) // half stop bits + +#define PD_RS232_E_XON_BYTE (PD_DATA_BYTE|PD_OP(59)) // The XON char for TX&RX +#define PD_RS232_E_XOFF_BYTE (PD_DATA_BYTE|PD_OP(58)) // The XOFF char for TX&RX + +#define PD_RS232_E_MIN_LATENCY (PD_DATA_BYTE|PD_OP(57)) // BOOL true if low latency req + +/* + * RS232 Parity stuff, used with the DATA_INTEGRITY event + */ +#define PD_RS232_PARITY_DEFAULT 0 // Valid only for RX, means follow TX +#define PD_RS232_PARITY_NONE 1 // No Parity bit inserted or expected +#define PD_RS232_PARITY_ODD 2 // Odd Parity bit inserted or expected +#define PD_RS232_PARITY_EVEN 3 // Even Parity bit inserted or expected +#define PD_RS232_PARITY_MARK 4 // Mark inserted or expected +#define PD_RS232_PARITY_SPACE 5 // Space inserted or expected +#define PD_RS232_PARITY_ANY 6 // Valid only for RX, means discard parity + +/* + * RS232 Flow Control specifiers, used with the FLOW_CONTROL event + * NB. The XON character is set with FLOW_START_DATA + * and the XOFF character is set with FLOW_STOP_DATA. + * + * Signal Name Direction + * RFR Ready For Receive Output generated by UART + * RTS Ready To Send (alias of RFR) Output generated by UART + * CTS Clear To Send Input sensed by UART + * DTR Data Terminal Ready Output generated by UART + * DSR Data Set Ready Input sensed by UART + * TXO XON/XOFF/XANY protocol Characters received by UART + * RXO XON/XOFF protocol Characters transmitted by UART + * DCD Data Carrier Detect Input sensed by UART + */ + +/* + * RS232 State Word extensions, based on <bsd/sys/ioctl.h> + * Also the 'current state' bits for enq/deq of Flow Control event + */ +#define PD_RS232_S_MASK 0x0000ffffUL +#define PD_RS232_S_SHIFT 0 // to align State bits for enq/deq event +#define PD_RS232_D_MASK 0xffff0000UL +#define PD_RS232_D_SHIFT 16 // to align Delta bits for enq/deq event +#define PD_RS232_A_MASK 0x0000ffffUL +#define PD_RS232_A_SHIFT 0 // to align Auto bits for req/exec event +#define PD_RS232_N_MASK 0xffff0000UL +#define PD_RS232_N_SHIFT 16 // to align Notify bits for req/exec event + +#define PD_RS232_S_LE TIOCM_LE // line enable +#define PD_RS232_S_DTR TIOCM_DTR // data terminal ready +#define PD_RS232_S_RTS TIOCM_RTS // request to send +#define PD_RS232_S_RFR PD_RS232_S_RTS // ready for receive +#define PD_RS232_S_TXO TIOCM_ST // TX XON/XOFF +#define PD_RS232_S_RXO TIOCM_SR // RX XON/XOFF +#define PD_RS232_S_CTS TIOCM_CTS // clear to send +#define PD_RS232_S_CAR TIOCM_CAR // carrier detect +#define PD_RS232_S_DCD PD_RS232_S_CAR +#define PD_RS232_S_RNG TIOCM_RNG // ring +#define PD_RS232_S_RI PD_RS232_S_RNG +#define PD_RS232_S_DSR TIOCM_DSR // data set ready + +#define PD_RS232_S_BRK 0x00000800UL // break active Extension to TIOCM +#define PD_RS232_S_LOOP 0x00001000UL // LOOP back Extension to TIOCM +#define PD_RS232_S_TXQ 0x00002000UL // User flowcontrol bit +#define PD_RS232_S_RXQ 0x00004000UL // User flowcontrol bit + +// The 'delta' bits for enq/deq of Flow Control event +#define PD_RS232_D_LE (PD_RS232_S_LE << PD_RS232_D_SHIFT) +#define PD_RS232_D_DTR (PD_RS232_S_DTR << PD_RS232_D_SHIFT) +#define PD_RS232_D_RTS (PD_RS232_S_RTS << PD_RS232_D_SHIFT) +#define PD_RS232_D_RFR (PD_RS232_S_RFR << PD_RS232_D_SHIFT) +#define PD_RS232_D_TXO (PD_RS232_S_TXO << PD_RS232_D_SHIFT) +#define PD_RS232_D_RXO (PD_RS232_S_RXO << PD_RS232_D_SHIFT) +#define PD_RS232_D_CTS (PD_RS232_S_CTS << PD_RS232_D_SHIFT) +#define PD_RS232_D_CAR (PD_RS232_S_CAR << PD_RS232_D_SHIFT) +#define PD_RS232_D_DCD (PD_RS232_S_DCD << PD_RS232_D_SHIFT) +#define PD_RS232_D_RNG (PD_RS232_S_RNG << PD_RS232_D_SHIFT) +#define PD_RS232_D_RI (PD_RS232_S_RI << PD_RS232_D_SHIFT) +#define PD_RS232_D_DSR (PD_RS232_S_DSR << PD_RS232_D_SHIFT) + +#define PD_RS232_D_BRK (PD_RS232_S_BRK << PD_RS232_D_SHIFT) +#define PD_RS232_D_LOOP (PD_RS232_S_LOOP << PD_RS232_D_SHIFT) +#define PD_RS232_D_TXQ (PD_RS232_S_TXQ << PD_RS232_D_SHIFT) +#define PD_RS232_D_RXQ (PD_RS232_S_RXQ << PD_RS232_D_SHIFT) + +// The 'auto' bits for exec/req of Flow Control event +#define PD_RS232_A_LE PD_RS232_S_LE +#define PD_RS232_A_DTR PD_RS232_S_DTR +#define PD_RS232_A_RTS PD_RS232_S_RTS +#define PD_RS232_A_RFR PD_RS232_S_RFR +#define PD_RS232_A_TXO PD_RS232_S_TXO +#define PD_RS232_A_RXO PD_RS232_S_RXO +#define PD_RS232_A_CTS PD_RS232_S_CTS +#define PD_RS232_A_CAR PD_RS232_S_CAR +#define PD_RS232_A_DCD PD_RS232_S_DCD +#define PD_RS232_A_RNG PD_RS232_S_RNG +#define PD_RS232_A_RI PD_RS232_S_RI +#define PD_RS232_A_DSR PD_RS232_S_DSR +#define PD_RS232_A_XANY 0x00000400 // changes _A_TXO from XON/XOFF to XANY/XOFF +#define PD_RS232_A_BRK PD_RS232_S_BRK +#define PD_RS232_A_LOOP PD_RS232_S_LOOP +#define PD_RS232_A_TXQ PD_RS232_S_TXQ +#define PD_RS232_A_RXQ PD_RS232_S_RXQ + +// The 'notify' bits for exec/req of Flow Control event +#define PD_RS232_N_LE (PD_RS232_S_LE << PD_RS232_N_SHIFT) +#define PD_RS232_N_DTR (PD_RS232_S_DTR << PD_RS232_N_SHIFT) +#define PD_RS232_N_RTS (PD_RS232_S_RTS << PD_RS232_N_SHIFT) +#define PD_RS232_N_RFR (PD_RS232_S_RFR << PD_RS232_N_SHIFT) +#define PD_RS232_N_TXO (PD_RS232_S_TXO << PD_RS232_N_SHIFT) +#define PD_RS232_N_RXO (PD_RS232_S_RXO << PD_RS232_N_SHIFT) +#define PD_RS232_N_CTS (PD_RS232_S_CTS << PD_RS232_N_SHIFT) +#define PD_RS232_N_CAR (PD_RS232_S_CAR << PD_RS232_N_SHIFT) +#define PD_RS232_N_DCD (PD_RS232_S_DCD << PD_RS232_N_SHIFT) +#define PD_RS232_N_RNG (PD_RS232_S_RNG << PD_RS232_N_SHIFT) +#define PD_RS232_N_RI (PD_RS232_S_RI << PD_RS232_N_SHIFT) +#define PD_RS232_N_DSR (PD_RS232_S_DSR << PD_RS232_N_SHIFT) + +#define PD_RS232_N_BRK (PD_RS232_S_BRK << PD_RS232_N_SHIFT) +#define PD_RS232_N_LOOP (PD_RS232_S_LOOP << PD_RS232_N_SHIFT) +#define PD_RS232_N_TXQ (PD_RS232_S_TXQ << PD_RS232_N_SHIFT) +#define PD_RS232_N_RXQ (PD_RS232_S_RXQ << PD_RS232_N_SHIFT) + +class IORS232SerialStreamSync : public IOSerialStreamSync +{ + OSDeclareDefaultStructors(IORS232SerialStreamSync) +}; + +#endif /* !_SERIAL_IORS232SERIALSTREAMSYNC_H */ + diff --git a/i386/include/IOKit/serial/IOSerialDriverSync.h b/i386/include/IOKit/serial/IOSerialDriverSync.h new file mode 100644 index 0000000..92f69df --- /dev/null +++ b/i386/include/IOKit/serial/IOSerialDriverSync.h @@ -0,0 +1,91 @@ +/* + *Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + *@APPLE_LICENSE_HEADER_START@ + * + *The contents of this file constitute Original Code as defined in and + *are subject to the Apple Public Source License Version 1.1 (the + *"License"). You may not use this file except in compliance with the + *License. Please obtain a copy of the License at + *http://www.apple.com/publicsource and read it before using this file. + * + *This Original Code and all software distributed under the License are + *distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + *EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + *INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + *FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + *License for the specific language governing rights and limitations + *under the License. + * + *@APPLE_LICENSE_HEADER_END@ + */ + +/* + * IOSerialDriverSync.h + * This file contains the abstract parent class for any IOSerialDriver + * interface, which is a generic serial interface, designed for devices + * that do character oriented transfers (async) rather than block or + * packet transfers. Most notably RS-232, Printer, Mouse, and Keyboard + * type devices. + * + * 2000-10-21 gvdl Initial real change to IOKit serial family. + */ + +#ifndef _SERIAL_IOSERIALDRIVERSYNC_H +#define _SERIAL_IOSERIALDRIVERSYNC_H + +#include <IOKit/IOService.h> + +class IOSerialDriverSync : public IOService +{ + OSDeclareAbstractStructors(IOSerialDriverSync); + +public: + virtual IOReturn acquirePort(bool sleep, void *refCon) = 0; + + virtual IOReturn releasePort(void *refCon) = 0; + + virtual IOReturn setState(UInt32 state, UInt32 mask, void *refCon) = 0; + + virtual UInt32 getState(void *refCon) = 0; + + virtual IOReturn watchState(UInt32 *state, UInt32 mask, void *refCon) = 0; + + virtual UInt32 nextEvent(void *refCon) = 0; + + virtual IOReturn executeEvent(UInt32 event, UInt32 data, void *refCon) = 0; + + virtual IOReturn requestEvent(UInt32 event, UInt32 *data, void *refCon) = 0; + + virtual IOReturn enqueueEvent(UInt32 event, UInt32 data, + bool sleep, void *refCon) = 0; + + virtual IOReturn dequeueEvent(UInt32 *event, UInt32 *data, + bool sleep, void *refCon) = 0; + + virtual IOReturn enqueueData(UInt8 *buffer, UInt32 size, UInt32 *count, + bool sleep, void *refCon) = 0; + + virtual IOReturn dequeueData(UInt8 *buffer, UInt32 size, UInt32 *count, + UInt32 min, void *refCon) = 0; + +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 0); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 1); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 2); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 3); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 4); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 5); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 6); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 7); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 8); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 9); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 10); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 11); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 12); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 13); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 14); +OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 15); + +}; + +#endif /* !_SERIAL_IOSERIALDRIVERSYNC_H */ diff --git a/i386/include/IOKit/serial/IOSerialKeys.h b/i386/include/IOKit/serial/IOSerialKeys.h new file mode 100644 index 0000000..9538a24 --- /dev/null +++ b/i386/include/IOKit/serial/IOSerialKeys.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * IOSerialKeys.h + * + * 2000-10-21 gvdl Initial real change to IOKit serial family. + * + */ + +/* +Sample Matching dictionary +{ + IOProviderClass = kIOSerialBSDServiceValue; + kIOSerialBSDTypeKey = kIOSerialBSDAllTypes + | kIOSerialBSDModemType + | kIOSerialBSDRS232Type; + kIOTTYDeviceKey = <Raw Unique Device Name>; + kIOTTYBaseNameKey = <Raw Unique Device Name>; + kIOTTYSuffixKey = <Raw Unique Device Name>; + kIOCalloutDeviceKey = <Callout Device Name>; + kIODialinDeviceKey = <Dialin Device Name>; +} + +Note only the IOProviderClass is mandatory. The other keys allow the searcher to reduce the size of the set of matching devices. +*/ + +/* Service Matching That is the 'IOProviderClass' */ +#define kIOSerialBSDServiceValue "IOSerialBSDClient" + +/* Matching keys */ +#define kIOSerialBSDTypeKey "IOSerialBSDClientType" + +/* Currently possible kIOSerialBSDTypeKey values. */ +#define kIOSerialBSDAllTypes "IOSerialStream" +#define kIOSerialBSDModemType "IOModemSerialStream" +#define kIOSerialBSDRS232Type "IORS232SerialStream" + +// Properties that resolve to a /dev device node to open for +// a particular service +#define kIOTTYDeviceKey "IOTTYDevice" +#define kIOTTYBaseNameKey "IOTTYBaseName" +#define kIOTTYSuffixKey "IOTTYSuffix" + +#define kIOCalloutDeviceKey "IOCalloutDevice" +#define kIODialinDeviceKey "IODialinDevice" + +// Property 'ioctl' wait for the tty device to go idle. +#define kIOTTYWaitForIdleKey "IOTTYWaitForIdle" + +#if KERNEL +extern const OSSymbol *gIOSerialBSDServiceValue; +extern const OSSymbol *gIOSerialBSDTypeKey; +extern const OSSymbol *gIOSerialBSDAllTypes; +extern const OSSymbol *gIOSerialBSDModemType; +extern const OSSymbol *gIOSerialBSDRS232Type; +extern const OSSymbol *gIOTTYDeviceKey; +extern const OSSymbol *gIOTTYBaseNameKey; +extern const OSSymbol *gIOTTYSuffixKey; +extern const OSSymbol *gIOCalloutDeviceKey; +extern const OSSymbol *gIODialinDeviceKey; +#endif /* KERNEL */ diff --git a/i386/include/IOKit/serial/IOSerialStreamSync.h b/i386/include/IOKit/serial/IOSerialStreamSync.h new file mode 100644 index 0000000..b654adb --- /dev/null +++ b/i386/include/IOKit/serial/IOSerialStreamSync.h @@ -0,0 +1,275 @@ +/* + *Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + *@APPLE_LICENSE_HEADER_START@ + * + *The contents of this file constitute Original Code as defined in and + *are subject to the Apple Public Source License Version 1.1 (the + *"License"). You may not use this file except in compliance with the + *License. Please obtain a copy of the License at + *http://www.apple.com/publicsource and read it before using this file. + * + *This Original Code and all software distributed under the License are + *distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + *EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + *INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + *FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + *License for the specific language governing rights and limitations + *under the License. + * + *@APPLE_LICENSE_HEADER_END@ + */ +/* + * IOSerialStreamSync.h + * + * 2000-10-21 gvdl Initial real change to IOKit serial family. + * + */ + +#ifndef _SERIAL_IOSERIALSTREAMSYNC_H +#define _SERIAL_IOSERIALSTREAMSYNC_H + +#include <IOKit/IOService.h> + +#ifdef __LP64__ + +#define PD_DATA_MASK 0x03U +#define PD_DATA_VOID 0x00U +#define PD_DATA_BYTE 0x01U +#define PD_DATA_WORD 0x02U +#define PD_DATA_LONG 0x03U + +#else + +#define PD_DATA_MASK 0x03UL +#define PD_DATA_VOID 0x00UL +#define PD_DATA_BYTE 0x01UL +#define PD_DATA_WORD 0x02UL +#define PD_DATA_LONG 0x03UL + +#endif + +#define PD_OP(x) ((x) << 2) +#define PD_E_MASK (~PD_DATA_MASK) + +/* General Command & Status events */ +#define PD_E_EOQ (PD_DATA_VOID|PD_OP( 0)) // Always nextEvent on empty queue +#define PD_E_ACTIVE (PD_DATA_BYTE|PD_OP( 1)) // BOOL start/shutdown chip + +/* Queue management events - all units are multiples of characters + *based on the current character size + */ +#define PD_E_TXQ_SIZE (PD_DATA_LONG|PD_OP( 2)) +#define PD_E_RXQ_SIZE (PD_DATA_LONG|PD_OP( 3)) +#define PD_E_TXQ_LOW_WATER (PD_DATA_LONG|PD_OP( 4)) +#define PD_E_RXQ_LOW_WATER (PD_DATA_LONG|PD_OP( 5)) +#define PD_E_TXQ_HIGH_WATER (PD_DATA_LONG|PD_OP( 6)) +#define PD_E_RXQ_HIGH_WATER (PD_DATA_LONG|PD_OP( 7)) +#define PD_E_TXQ_AVAILABLE (PD_DATA_LONG|PD_OP( 8)) +#define PD_E_RXQ_AVAILABLE (PD_DATA_LONG|PD_OP( 9)) +#define PD_E_TXQ_FLUSH (PD_DATA_VOID|PD_OP(10)) +#define PD_E_RXQ_FLUSH (PD_DATA_LONG|PD_OP(11)) + +/* port & link characteristics - units are half bits */ +#define PD_E_DATA_RATE (PD_DATA_LONG|PD_OP(12)) // raw bits of symbols per second +#define PD_E_RX_DATA_RATE (PD_DATA_LONG|PD_OP(13)) +#define PD_E_DATA_SIZE (PD_DATA_LONG|PD_OP(14)) // raw bits per symbol +#define PD_E_RX_DATA_SIZE (PD_DATA_LONG|PD_OP(15)) +#define PD_E_DATA_INTEGRITY (PD_DATA_LONG|PD_OP(16)) // parity or ECC method +#define PD_E_RX_DATA_INTEGRITY (PD_DATA_LONG|PD_OP(17)) +#define PD_E_EXTERNAL_CLOCK_MODE (PD_DATA_LONG|PD_OP(28)) // multiplier between clock and data rates + +/* timeout events */ +#define PD_E_DELAY (PD_DATA_LONG|PD_OP(18)) // inter-character delay (us) +#define PD_E_DATA_LATENCY (PD_DATA_LONG|PD_OP(19)) // A dequeueData Latency timeout + // rcs Secondary Timer mainly to fix performance + // problems with MIDI and IRDA drivers. + // Midi and Irda drivers will issue an IOCTL + // call with this as the selector and + // the Data as the value they want the rate set + // to (Typically 1 for IrDA devices) +#define PD_E_FLOW_CONTROL (PD_DATA_LONG|PD_OP(20)) // enable/disable each flow mechanism + +/* I/O events */ +#define PD_E_VALID_DATA (PD_DATA_VOID|PD_OP(21)) // A valid frame was received +#define PD_E_VALID_DATA_BYTE (PD_DATA_BYTE|PD_E_VALID_DATA) +#define PD_E_VALID_DATA_WORD (PD_DATA_WORD|PD_E_VALID_DATA) +#define PD_E_VALID_DATA_LONG (PD_DATA_LONG|PD_E_VALID_DATA) + +#define PD_E_SPECIAL (PD_DATA_VOID|PD_OP(22)) // valid data received with 'special' value +#define PD_E_SPECIAL_BYTE (PD_DATA_BYTE|PD_E_SPECIAL) +#define PD_E_SPECIAL_WORD (PD_DATA_WORD|PD_E_SPECIAL) +#define PD_E_SPECIAL_LONG (PD_DATA_LONG|PD_E_SPECIAL) + +#define PD_E_FRAMING_ERROR (PD_DATA_VOID|PD_OP(23)) // Failure occured assembling frame +#define PD_E_FRAMING_BYTE (PD_DATA_BYTE|PD_E_FRAMING_ERROR) +#define PD_E_FRAMING_WORD (PD_DATA_WORD|PD_E_FRAMING_ERROR) +#define PD_E_FRAMING_LONG (PD_DATA_LONG|PD_E_FRAMING_ERROR) + +#define PD_E_INTEGRITY_ERROR (PD_DATA_VOID|PD_OP(24)) // An uncorrectable frame was received +#define PD_E_INTEGRITY_BYTE (PD_DATA_BYTE|PD_E_INTEGRITY_ERROR) +#define PD_E_INTEGRITY_WORD (PD_DATA_WORD|PD_E_INTEGRITY_ERROR) +#define PD_E_INTEGRITY_LONG (PD_DATA_LONG|PD_E_INTEGRITY_ERROR) + +#define PD_E_INTEGRITY_WARNING (PD_DATA_VOID|PD_OP(25)) // A correctable frame was received +#define PD_E_HW_OVERRUN_ERROR (PD_DATA_VOID|PD_OP(26)) // Hardware's buffer overflowed, data lost +#define PD_E_SW_OVERRUN_ERROR (PD_DATA_VOID|PD_OP(27)) // Driver's buffer overflowed, data lost + +/* + *The variables below make up the bits returned + *by the State methods:- getState, setState, watchState + */ +#define PD_S_MASK 0xffff0000UL +#define PD_S_RX_OFFSET 7 + +#define PD_S_ACQUIRED 0x80000000UL +#define PD_S_ACTIVE 0x40000000UL + +#define PD_S_TX_ENABLE 0x20000000UL +#define PD_S_TX_BUSY 0x10000000UL +#define PD_S_TX_EVENT 0x08000000UL +#define PD_S_TXQ_EMPTY 0x04000000UL +#define PD_S_TXQ_LOW_WATER 0x02000000UL +#define PD_S_TXQ_HIGH_WATER 0x01000000UL +#define PD_S_TXQ_FULL 0x00800000UL +#define PD_S_TXQ_MASK ( PD_S_TXQ_EMPTY | PD_S_TXQ_LOW_WATER \ + | PD_S_TXQ_FULL | PD_S_TXQ_HIGH_WATER ) + +#define PD_S_RX_ENABLE (PD_S_TX_ENABLE >> PD_S_RX_OFFSET) +#define PD_S_RX_BUSY (PD_S_TX_BUSY >> PD_S_RX_OFFSET) +#define PD_S_RX_EVENT (PD_S_TX_EVENT >> PD_S_RX_OFFSET) +#define PD_S_RXQ_EMPTY (PD_S_TXQ_EMPTY >> PD_S_RX_OFFSET) +#define PD_S_RXQ_LOW_WATER (PD_S_TXQ_LOW_WATER >> PD_S_RX_OFFSET) +#define PD_S_RXQ_HIGH_WATER (PD_S_TXQ_HIGH_WATER >> PD_S_RX_OFFSET) +#define PD_S_RXQ_FULL (PD_S_TXQ_FULL >> PD_S_RX_OFFSET) +#define PD_S_RXQ_MASK (PD_S_TXQ_MASK >> PD_S_RX_OFFSET) + +class IOSerialDriverSync; +class IOSerialStreamSync : public IOService +{ + OSDeclareDefaultStructors(IOSerialStreamSync); + +protected: + IOSerialDriverSync *fProvider; + void *fRefCon; + +public: + /* acquire tests and sets the state of the port object. If the port was + *available, then the state is set to busy, and kIOReturnSuccess is returned. + *If the port was already busy and sleep is YES, then the thread will sleep + *until the port is freed, then re-attempts the acquire. If the port was + *already busy and sleep in NO, then kIOReturnExclusiveAccess is returned. + */ + virtual IOReturn acquirePort(bool sleep); + + /* release sets the state of the port object to available and wakes up any + *threads sleeping for access to this port. It will return kIOReturnSuccess + *if the port was in a busy state, and kIOReturnNotOpen if it was available. + */ + virtual IOReturn releasePort(); + + /* + *Set the state for the port device. + */ + virtual IOReturn setState(UInt32 state, UInt32 mask); + + /* + *Get the state for the port device. + */ + virtual UInt32 getState(); + + /* + *Wait for the at least one of the state bits defined in mask to be equal + *to the value defined in state. + *Check on entry then sleep until necessary. + */ + virtual IOReturn watchState(UInt32 *state, UInt32 mask); + + /* nextEvent returns the type of the next event on the RX queue. If no + *events are present on the RX queue, then EOQ is returned. + */ + virtual UInt32 nextEvent(); + + /* executeEvent causes the specified event to be processed immediately. + *This is primarily used for channel control commands like START & STOP + */ + virtual IOReturn executeEvent(UInt32 event, UInt32 data); + + /* requestEvent processes the specified event as an immediate request and + *returns the results in data. This is primarily used for getting link + *status information and verifying baud rate and such. + */ + virtual IOReturn requestEvent(UInt32 event, UInt32 *data); + + /* enqueueEvent will place the specified event into the TX queue. The + *sleep argument allows the caller to specify the enqueueEvent's + *behaviour when the TX queue is full. If sleep is true, then this + *method will sleep until the event is enqueued. If sleep is false, + *then enqueueEvent will immediatly return kIOReturnNoResources. + */ + virtual IOReturn enqueueEvent(UInt32 event, UInt32 data, bool sleep); + + /* dequeueEvent will remove the oldest event from the RX queue and return + *it in event & data. The sleep argument defines the behaviour if the RX + *queue is empty. If sleep is true, then this method will sleep until an + *event is available. If sleep is false, then an EOQ event will be + *returned. In either case kIOReturnSuccess is returned. + */ + virtual IOReturn dequeueEvent(UInt32 *event, UInt32 *data, bool sleep); + + /* enqueueData will attempt to copy data from the specified buffer to the + *TX queue as a sequence of VALID_DATA events. The argument bufferSize + *specifies the number of bytes to be sent. The actual number of bytes + *transferred is returned in transferCount. If sleep is true, then this + *method will sleep until all bytes can be transferred. If sleep is + *false, then as many bytes as possible will be copied to the TX queue. + */ + virtual IOReturn enqueueData(UInt8 *buffer, UInt32 size, UInt32 *count, bool sleep ); + + /* dequeueData will attempt to copy data from the RX queue to the specified + *buffer. No more than bufferSize VALID_DATA events will be transferred. + *In other words, copying will continue until either a non-data event is + *encountered or the transfer buffer is full. The actual number of bytes + *transferred is returned in transferCount. + * + *The sleep semantics of this method are slightly more complicated than + *other methods in this API: Basically, this method will continue to + *sleep until either minCount characters have been received or a non + *data event is next in the RX queue. If minCount is zero, then this + *method never sleeps and will return immediatly if the queue is empty. + * + *The latency parameter specifies the maximum amount of time that should + *pass after the first character is available before the routine returns. + *This allows the caller to specify a 'packet' timeout. The unit of the + *latency parameter is microseconds, though the exact delay may vary + *depending on the granularity of the timeout services available to the + *driver. + */ + virtual IOReturn dequeueData(UInt8 *buffer, UInt32 size, UInt32 *count, UInt32 min); + + /* Internal for IOSerialDriver only */ + virtual bool init(OSDictionary *dictionary = 0, void *refCon = 0); + virtual bool attach(IOService *provider); + void *getRefCon() const { return fRefCon; } + +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 0); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 1); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 2); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 3); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 4); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 5); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 6); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 7); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 8); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 9); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 10); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 11); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 12); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 13); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 14); +OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 15); +}; + +#endif /* !_SERIAL_IOSERIALSTREAMSYNC_H */ + + diff --git a/i386/include/IOKit/storage/.svn/all-wcprops b/i386/include/IOKit/storage/.svn/all-wcprops new file mode 100644 index 0000000..394531d --- /dev/null +++ b/i386/include/IOKit/storage/.svn/all-wcprops @@ -0,0 +1,185 @@ +K 25 +svn:wc:ra_dav:version-url +V 60 +/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage +END +IOBDBlockStorageDriver.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOBDBlockStorageDriver.h +END +IOCDBlockStorageDriver.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOCDBlockStorageDriver.h +END +IODVDTypes.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IODVDTypes.h +END +IOStorage.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOStorage.h +END +IOCDPartitionScheme.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOCDPartitionScheme.h +END +IOBDBlockStorageDevice.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOBDBlockStorageDevice.h +END +IODVDMediaBSDClient.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IODVDMediaBSDClient.h +END +IOCDBlockStorageDevice.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOCDBlockStorageDevice.h +END +IOGUIDPartitionScheme.h +K 25 +svn:wc:ra_dav:version-url +V 84 +/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOGUIDPartitionScheme.h +END +IOMediaBSDClient.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOMediaBSDClient.h +END +IOBDTypes.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOBDTypes.h +END +IOFilterScheme.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOFilterScheme.h +END +IOCDTypes.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOCDTypes.h +END +IOBDMediaBSDClient.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOBDMediaBSDClient.h +END +IODVDMedia.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IODVDMedia.h +END +IOCDMediaBSDClient.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOCDMediaBSDClient.h +END +IOFDiskPartitionScheme.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOFDiskPartitionScheme.h +END +IOMedia.h +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOMedia.h +END +IOApplePartitionScheme.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOApplePartitionScheme.h +END +IOStorageDeviceCharacteristics.h +K 25 +svn:wc:ra_dav:version-url +V 93 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOStorageDeviceCharacteristics.h +END +IOStorageProtocolCharacteristics.h +K 25 +svn:wc:ra_dav:version-url +V 95 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOStorageProtocolCharacteristics.h +END +IOBDMedia.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOBDMedia.h +END +IOCDMedia.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOCDMedia.h +END +IOAppleLabelScheme.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOAppleLabelScheme.h +END +IODVDBlockStorageDriver.h +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IODVDBlockStorageDriver.h +END +IOBlockStorageDriver.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOBlockStorageDriver.h +END +IODVDBlockStorageDevice.h +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IODVDBlockStorageDevice.h +END +IOFireWireStorageCharacteristics.h +K 25 +svn:wc:ra_dav:version-url +V 95 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOFireWireStorageCharacteristics.h +END +IOPartitionScheme.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOPartitionScheme.h +END +IOBlockStorageDevice.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOBlockStorageDevice.h +END diff --git a/i386/include/IOKit/storage/.svn/entries b/i386/include/IOKit/storage/.svn/entries new file mode 100644 index 0000000..a1d8a49 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/entries @@ -0,0 +1,1051 @@ +10 + +dir +2117 +http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/storage +http://forge.voodooprojects.org/svn/chameleon + + + +2011-05-29T20:31:39.361475Z +916 +meklort + + + + + + + + + + + + + + +b5af796a-00a8-11df-919b-ffff7a100b7d + +IODVDTypes.h +file + + + + +2012-10-03T17:50:20.000000Z +e483ef56f42ffa0797fc8f07728e977b +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +10778 + +IOCDBlockStorageDriver.h +file + + + + +2012-10-03T17:50:20.000000Z +7e573eee203505f040b6c91952fd27ed +2011-05-29T20:31:39.361475Z +916 +meklort + + + + + + + + + + + + + + + + + + + + + +1784 + +IOStorage.h +file + + + + +2012-10-03T17:50:20.000000Z +6861395312a6c4d8504025439259a31d +2011-05-29T20:31:39.361475Z +916 +meklort + + + + + + + + + + + + + + + + + + + + + +6542 + +IOCDBlockStorageDevice.h +file + + + + +2012-10-03T17:50:20.000000Z +be4d88548b1a690ae872cd2bf28b314f +2011-05-29T20:31:39.361475Z +916 +meklort + + + + + + + + + + + + + + + + + + + + + +1824 + +IOMediaBSDClient.h +file + + + + +2012-10-03T17:50:20.000000Z +a223d0e3c33fa4525eed3f70692b2d17 +2011-05-29T20:31:39.361475Z +916 +meklort + + + + + + + + + + + + + + + + + + + + + +1089 + +IOBDMediaBSDClient.h +file + + + + +2012-10-03T17:50:20.000000Z +a69c6652c046f1a8e2f067ee0e24abc3 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +5362 + +IODVDMedia.h +file + + + + +2012-10-03T17:50:20.000000Z +ae6b1b0b9061f9a228168c7e85b9c301 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +11327 + +IOApplePartitionScheme.h +file + + + + +2012-10-03T17:50:20.000000Z +a056bad5bd21b62813749928b63112e8 +2011-05-29T20:31:39.361475Z +916 +meklort + + + + + + + + + + + + + + + + + + + + + +5490 + +IOBlockStorageDriver.h +file + + + + +2012-10-03T17:50:20.000000Z +91aa9b08fb435bcbe41cd3c05ac1c928 +2011-05-29T20:31:39.361475Z +916 +meklort + + + + + + + + + + + + + + + + + + + + + +8744 + +IOPartitionScheme.h +file + + + + +2012-10-03T17:50:20.000000Z +0860e541b3aff31008ce2090fb58f93a +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +13964 + +IOBlockStorageDevice.h +file + + + + +2012-10-03T17:50:20.000000Z +6f8ecd4d8450d6756ab68814db44e1ce +2011-05-29T20:31:39.361475Z +916 +meklort + + + + + + + + + + + + + + + + + + + + + +2369 + +IOBDBlockStorageDriver.h +file + + + + +2012-10-03T17:50:20.000000Z +7cf5b5bb3b93251c88ce55e0df8066a8 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +6051 + +IODVDMediaBSDClient.h +file + + + + +2012-10-03T17:50:20.000000Z +08191d1ae4cc6a238b9316ab3b38b716 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +5926 + +IOBDBlockStorageDevice.h +file + + + + +2012-10-03T17:50:20.000000Z +2c1c0ef6332409dae6b2795d999febbd +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +5189 + +IOCDPartitionScheme.h +file + + + + +2012-10-03T17:50:20.000000Z +844d9d0d2381539689b148fd89410116 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +8152 + +IOGUIDPartitionScheme.h +file + + + + +2012-10-03T17:50:20.000000Z +530816f5541c8445445c5fea0f26732f +2011-05-29T20:31:39.361475Z +916 +meklort + + + + + + + + + + + + + + + + + + + + + +2402 + +IOFilterScheme.h +file + + + + +2012-10-03T17:50:20.000000Z +e33b7cb7900db1f675747ebcce9eabac +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +11039 + +IOBDTypes.h +file + + + + +2012-10-03T17:50:20.000000Z +f925111d2be6068af39a1455b650c50e +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +3423 + +IOCDTypes.h +file + + + + +2012-10-03T17:50:20.000000Z +568a8b5033fcc89b9bf5e2f5477f3898 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +12304 + +IOCDMediaBSDClient.h +file + + + + +2012-10-03T17:50:20.000000Z +a923162dc13ec3c65bf9a8630545768b +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +6004 + +IOMedia.h +file + + + + +2012-10-03T17:50:20.000000Z +81f4dba74563d2f012e1f1132ff141e5 +2011-05-29T20:31:39.361475Z +916 +meklort + + + + + + + + + + + + + + + + + + + + + +6890 + +IOFDiskPartitionScheme.h +file + + + + +2012-10-03T17:50:20.000000Z +f9744ba40c80f31b76dd1dffad9efd77 +2011-05-29T20:31:39.361475Z +916 +meklort + + + + + + + + + + + + + + + + + + + + + +4057 + +IOStorageDeviceCharacteristics.h +file + + + + +2012-10-03T17:50:20.000000Z +8684062918e25591b2a0428cee9832b2 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +14734 + +IOStorageProtocolCharacteristics.h +file + + + + +2012-10-03T17:50:20.000000Z +325514be8136f0b9e64be88e35e9fe8d +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +40195 + +IOBDMedia.h +file + + + + +2012-10-03T17:50:20.000000Z +1ebd0da1f4d15c3942b7afad837f8401 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +9148 + +IOAppleLabelScheme.h +file + + + + +2012-10-03T17:50:20.000000Z +5694e06bb45c5a8e4be155f216878cc8 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +5461 + +IOCDMedia.h +file + + + + +2012-10-03T17:50:20.000000Z +6678a0743a966704a1b36bc02b9d5703 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +21272 + +ata +dir + +IODVDBlockStorageDriver.h +file + + + + +2012-10-03T17:50:20.000000Z +e4adcc63709c7d75558955fb8607ba2d +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +9113 + +IOFireWireStorageCharacteristics.h +file + + + + +2012-10-03T17:50:20.000000Z +c2f19d1a81610ee239cb252b99f75f74 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +2057 + +IODVDBlockStorageDevice.h +file + + + + +2012-10-03T17:50:20.000000Z +c7b8a53c5a82f8f283d2da92e6d3f903 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +5839 + diff --git a/i386/include/IOKit/storage/.svn/text-base/IOAppleLabelScheme.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOAppleLabelScheme.h.svn-base new file mode 100644 index 0000000..6e290a4 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOAppleLabelScheme.h.svn-base @@ -0,0 +1,191 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * This header contains the IOAppleLabelScheme class definition. + */ + +#ifndef _IOAPPLELABELSCHEME_H +#define _IOAPPLELABELSCHEME_H + +#include <IOKit/IOTypes.h> + +/* + * kIOAppleLabelSchemeClass is the name of the IOAppleLabelScheme class. + */ + +#define kIOAppleLabelSchemeClass "IOAppleLabelScheme" + +/* + * Apple Label Scheme Definitions + */ + +#pragma pack(push, 1) /* (enable 8-bit struct packing) */ + +/* Label scheme. */ + +struct applelabel +{ + uint8_t al_boot0[416]; /* (reserved for boot area) */ + uint16_t al_magic; /* (the magic number) */ + uint16_t al_type; /* (label type) */ + uint32_t al_flags; /* (generic flags) */ + uint64_t al_offset; /* (offset of property area, bytes) */ + uint32_t al_size; /* (size of property area, bytes) */ + uint32_t al_checksum; /* (checksum of property area) */ + uint8_t al_boot1[72]; /* (reserved for boot area) */ +}; + +/* Label scheme signature (al_magic). */ + +#define AL_MAGIC 0x414C + +/* Label scheme version (al_type). */ + +#define AL_TYPE_DEFAULT 0x0000 + +/* Label scheme flags (al_flags). */ + +#define AL_FLAG_DEFAULT 0x00000000 + +#pragma pack(pop) /* (reset to default struct packing) */ + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOFilterScheme.h> + +/* + * Class + */ + +class IOAppleLabelScheme : public IOFilterScheme +{ + OSDeclareDefaultStructors(IOAppleLabelScheme); + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + + IOMedia * _content; + + /* + * Free all of this object's outstanding resources. + */ + + virtual void free(void); + + /* + * Scan the provider media for an Apple label scheme. + */ + + virtual IOMedia * scan(SInt32 * score); + + /* + * Ask whether the given content appears to be corrupt. + */ + + virtual bool isContentCorrupt(OSDictionary * properties); + + /* + * Ask whether the given content appears to be invalid. + */ + + virtual bool isContentInvalid(OSDictionary * properties); + + /* + * Instantiate a new media object to represent the given content. + */ + + virtual IOMedia * instantiateMediaObject(OSDictionary * properties); + + /* + * Allocate a new media object (called from instantiateMediaObject). + */ + + virtual IOMedia * instantiateDesiredMediaObject(OSDictionary * properties); + + /* + * Attach the given media object to the device tree plane. + */ + + virtual bool attachMediaObjectToDeviceTree(IOMedia * media); + + /* + * Detach the given media object from the device tree plane. + */ + + virtual void detachMediaObjectFromDeviceTree(IOMedia * media); + +public: + + /* + * Initialize this object's minimal state. + */ + + virtual bool init(OSDictionary * properties = 0); + + /* + * Determine whether the provider media contains an Apple label scheme. + */ + + virtual IOService * probe(IOService * provider, SInt32 * score); + + /* + * Publish the new media object which represents our content. + */ + + virtual bool start(IOService * provider); + + /* + * Clean up after the media object we published before terminating. + */ + + virtual void stop(IOService * provider); + + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 0); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 1); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 2); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 3); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 4); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 5); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 6); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 7); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 8); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 9); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 10); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 11); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 12); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 13); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 14); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 15); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOAPPLELABELSCHEME_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOApplePartitionScheme.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOApplePartitionScheme.h.svn-base new file mode 100644 index 0000000..ace1f3b --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOApplePartitionScheme.h.svn-base @@ -0,0 +1,122 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * This header contains the IOApplePartitionScheme class definition. + */ + +#ifndef _IOAPPLEPARTITIONSCHEME_H +#define _IOAPPLEPARTITIONSCHEME_H + +#include <IOKit/IOTypes.h> + +/* + * kIOApplePartitionSchemeClass is the name of the IOApplePartitionScheme class. + */ + +#define kIOApplePartitionSchemeClass "IOApplePartitionScheme" + +/* + * Apple Partition Map Definitions + */ + +#pragma pack(push, 1) /* (enable 8-bit struct packing) */ + +/* Structure constants. */ + +#define DPISTRLEN 32 + +/* Partition map entry, as found in blocks 1 to dpme_map_entries of the disk. */ + +typedef struct dpme +{ + UInt16 dpme_signature; /* (unique value for partition entry, 'PM') */ + UInt16 dpme_reserved_1; /* (reserved for future use) */ + UInt32 dpme_map_entries; /* (number of partition entries) */ + UInt32 dpme_pblock_start; /* (physical block start of partition) */ + UInt32 dpme_pblocks; /* (physical block count of partition) */ + char dpme_name[DPISTRLEN]; /* (name of partition) */ + char dpme_type[DPISTRLEN]; /* (type of partition, eg. Apple_HFS) */ + UInt32 dpme_lblock_start; /* (logical block start of partition) */ + UInt32 dpme_lblocks; /* (logical block count of partition) */ + UInt32 dpme_flags; /* (partition flags, see defines below) */ + UInt32 dpme_boot_block; /* (logical block start of boot code) */ + UInt32 dpme_boot_bytes; /* (byte count of boot code) */ + UInt32 dpme_load_addr; /* (load address in memory of boot code) */ + UInt32 dpme_load_addr_2; /* (reserved for future use) */ + UInt32 dpme_goto_addr; /* (jump address in memory of boot code) */ + UInt32 dpme_goto_addr_2; /* (reserved for future use) */ + UInt32 dpme_checksum; /* (checksum of boot code) */ + UInt8 dpme_process_id[16]; /* (processor type) */ + UInt32 dpme_reserved_2[32]; /* (reserved for future use) */ + UInt32 dpme_reserved_3[62]; /* (reserved for future use) */ +} DPME; + +/* Driver descriptor map entry. */ + +typedef struct DDMap +{ + UInt32 ddBlock; /* (driver's block start, sbBlkSize-blocks) */ + UInt16 ddSize; /* (driver's block count, 512-blocks) */ + UInt16 ddType; /* (driver's system type) */ +} DDMap; + +/* Driver descriptor map, as found in block zero of the disk. */ + +typedef struct Block0 +{ + UInt16 sbSig; /* (unique value for block zero, 'ER') */ + UInt16 sbBlkSize; /* (block size for this device) */ + UInt32 sbBlkCount; /* (block count for this device) */ + UInt16 sbDevType; /* (device type) */ + UInt16 sbDevId; /* (device id) */ + UInt32 sbDrvrData; /* (driver data) */ + UInt16 sbDrvrCount; /* (driver descriptor count) */ + DDMap sbDrvrMap[8]; /* (driver descriptor table) */ + UInt8 sbReserved[430]; /* (reserved for future use) */ +} Block0; + +/* Partition map signature (sbSig). */ + +#define BLOCK0_SIGNATURE 0x4552 + +/* Partition map entry signature (dpme_signature). */ + +#define DPME_SIGNATURE 0x504D + +/* Partition map entry flags (dpme_flags). */ + +#define DPME_FLAGS_VALID 0x00000001 /* (bit 0) */ +#define DPME_FLAGS_ALLOCATED 0x00000002 /* (bit 1) */ +#define DPME_FLAGS_IN_USE 0x00000004 /* (bit 2) */ +#define DPME_FLAGS_BOOTABLE 0x00000008 /* (bit 3) */ +#define DPME_FLAGS_READABLE 0x00000010 /* (bit 4) */ +#define DPME_FLAGS_WRITABLE 0x00000020 /* (bit 5) */ +#define DPME_FLAGS_OS_PIC_CODE 0x00000040 /* (bit 6) */ +#define DPME_FLAGS_OS_SPECIFIC_2 0x00000080 /* (bit 7) */ +#define DPME_FLAGS_OS_SPECIFIC_1 0x00000100 /* (bit 8) */ +#define DPME_FLAGS_RESERVED_2 0xFFFFFE00 /* (bit 9..31) */ + +#pragma pack(pop) /* (reset to default struct packing) */ + +#endif /* !_IOAPPLEPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOBDBlockStorageDevice.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOBDBlockStorageDevice.h.svn-base new file mode 100644 index 0000000..66a09d7 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOBDBlockStorageDevice.h.svn-base @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2006-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOBDBlockStorageDevice + * @abstract + * This header contains the IOBDBlockStorageDevice class definition. + */ + +#ifndef _IOBDBLOCKSTORAGEDEVICE_H +#define _IOBDBLOCKSTORAGEDEVICE_H + +#include <IOKit/storage/IOBDTypes.h> + +/*! + * @defined kIOBDBlockStorageDeviceClass + * @abstract + * kIOBDBlockStorageDeviceClass is the name of the IOBDBlockStorageDevice class. + * @discussion + * kIOBDBlockStorageDeviceClass is the name of the IOBDBlockStorageDevice class. + */ + +#define kIOBDBlockStorageDeviceClass "IOBDBlockStorageDevice" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IODVDBlockStorageDevice.h> + +/* Property used for matching, so the generic driver gets the nub it wants. */ +#define kIOBlockStorageDeviceTypeBD "BD" + +/*! + * @class + * IOBDBlockStorageDevice + * @abstract + * The IOBDBlockStorageDevice class is a generic BD block storage device + * abstraction. + * @discussion + * This class is the protocol for generic BD functionality, independent of + * the physical connection protocol (e.g. SCSI, ATA, USB). + * + * The APIs are the union of CD APIs, DVD APIs, and all + * necessary new low-level BD APIs. + * + * A subclass implements relay methods that translate our requests into + * calls to a protocol- and device-specific provider. + */ + +class IOBDBlockStorageDevice : public IODVDBlockStorageDevice +{ + OSDeclareAbstractStructors(IOBDBlockStorageDevice) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + +public: + + /*! + * @function init + * @discussion + * Initialize this object's minimal state. + * @param properties + * Substitute property table for this object (optional). + * @result + * Returns true on success, false otherwise. + */ + + virtual bool init(OSDictionary * properties); + + /*! + * @function readDiscStructure + * @discussion + * Issue an MMC READ DISC STRUCTURE command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param format + * As documented by MMC. + * @param address + * As documented by MMC. + * @param layer + * As documented by MMC. + * @param grantID + * As documented by MMC. + * @param type + * As documented by MMC. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readDiscStructure( IOMemoryDescriptor * buffer, + UInt8 format, + UInt32 address, + UInt8 layer, + UInt8 grantID, + UInt8 type ) = 0; + + /*! + * @function splitTrack + * @discussion + * Issue an MMC RESERVE TRACK command with the ARSV bit. + * @param address + * As documented by MMC. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn splitTrack(UInt32 address) = 0; + + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 0); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 1); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 2); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 3); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 4); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 5); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 6); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 7); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 8); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 9); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 10); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 11); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 12); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 13); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 14); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 15); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOBDBLOCKSTORAGEDEVICE_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOBDBlockStorageDriver.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOBDBlockStorageDriver.h.svn-base new file mode 100644 index 0000000..199218c --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOBDBlockStorageDriver.h.svn-base @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2006-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOBDBlockStorageDriver + * @abstract + * This header contains the IOBDBlockStorageDriver class definition. + * @discussion + * This class implements BD functionality, independent of + * the physical connection protocol (e.g. SCSI, ATA, USB). + * + * A protocol-specific provider implements the functionality using an appropriate + * protocol and commands. + */ + +#ifndef _IOBDBLOCKSTORAGEDRIVER_H +#define _IOBDBLOCKSTORAGEDRIVER_H + +#include <IOKit/storage/IOBDBlockStorageDevice.h> +#include <IOKit/storage/IODVDBlockStorageDriver.h> + +/*! + * @defined kIOBDBlockStorageDriverClass + * @abstract + * kIOBDBlockStorageDriverClass is the name of the IOBDBlockStorageDriver class. + * @discussion + * kIOBDBlockStorageDriverClass is the name of the IOBDBlockStorageDriver class. + */ + +#define kIOBDBlockStorageDriverClass "IOBDBlockStorageDriver" + +/*! + * @class + * IOBDBlockStorageDriver + * @abstract + * Generic BD Driver. + * @discussion + * Storage drivers are split into two parts: the Generic Driver handles + * all generic device issues, independent of the lower-level transport + * mechanism (e.g. SCSI, ATA, USB, FireWire). All storage operations + * at the Generic Driver level are translated into a series of generic + * device operations. These operations are passed via the Device Nub + * to a Transport Driver, which implements the appropriate + * transport-dependent protocol to execute these operations. + * + * To determine the write-protect state of a device (or media), for + * example, the generic driver would issue a call to the + * Transport Driver's reportWriteProtection method. If this were a SCSI + * device, its Transport Driver would issue a Mode Sense command to + * extract the write-protection status bit. The Transport Driver then + * reports true or false to the generic driver. + * + * The generic driver therefore has no knowledge of, or involvement + * with, the actual commands and mechanisms used to communicate with + * the device. It is expected that the generic driver will rarely, if + * ever, need to be subclassed to handle device idiosyncrasies; rather, + * the Transport Driver should be changed via overrides. + * + * A generic driver could be subclassed to create a different type of + * generic device. The generic driver IOBDBlockStorageDriver class is a subclass + * of IODVDBlockStorageDriver, adding BD functions. Similarly, the Transport Driver + * IOBDBlockStorageDevice is a subclass of IODVDBlockStorageDevice, adding BD + * functions. +*/ + +class IOBDBlockStorageDriver : public IODVDBlockStorageDriver +{ + OSDeclareDefaultStructors(IOBDBlockStorageDriver) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + + /* Overrides of IODVDBlockStorageDriver. */ + + virtual IOReturn acceptNewMedia(void); + + /* End of IODVDBlockStorageDriver overrides. */ + +public: + + /* + * Obtain this object's provider. We override the superclass's method to + * return a more specific subclass of IOService -- IOBDBlockStorageDevice. + * This method serves simply as a convenience to subclass developers. + */ + + virtual IOBDBlockStorageDevice * getProvider() const; + + /* Overrides of IODVDBlockStorageDriver: */ + + virtual const char * getDeviceTypeName(void); + virtual IOMedia * instantiateDesiredMediaObject(void); + virtual IOMedia * instantiateMediaObject(UInt64 base,UInt64 byteSize, + UInt32 blockSize,char *mediaName); + virtual IOReturn readStructure(IOMemoryDescriptor *buffer,const DVDStructureFormat format, + const UInt32 address,const UInt8 layer,const UInt8 agid); + + /* End of IODVDBlockStorageDriver overrides. */ + + /*! + * @function splitTrack + * @discussion + * Issue an MMC RESERVE TRACK command with the ARSV bit. + * @param address + * As documented by MMC. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn splitTrack(UInt32 address); + + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 0); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 1); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 2); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 3); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 4); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 5); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 6); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 7); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 8); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 9); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 10); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 11); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 12); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 13); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 14); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 15); +}; + +#endif /* !_IOBDBLOCKSTORAGEDRIVER_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOBDMedia.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOBDMedia.h.svn-base new file mode 100644 index 0000000..e204a1e --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOBDMedia.h.svn-base @@ -0,0 +1,297 @@ +/* + * Copyright (c) 2006-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOBDMedia + * @abstract + * This header contains the IOBDMedia class definition. + */ + +#ifndef _IOBDMEDIA_H +#define _IOBDMEDIA_H + +/*! + * @defined kIOBDMediaClass + * @abstract + * kIOBDMediaClass is the name of the IOBDMedia class. + * @discussion + * kIOBDMediaClass is the name of the IOBDMedia class. + */ + +#define kIOBDMediaClass "IOBDMedia" + +/*! + * @defined kIOBDMediaTypeKey + * @abstract + * kIOBDMediaTypeKey is a property of IOBDMedia objects. It has an OSString + * value. + * @discussion + * The kIOBDMediaTypeKey property identifies the BD media type (BD-ROM, BD-R, + * BD-RE, etc). See the kIOBDMediaType contants for possible values. + */ + +#define kIOBDMediaTypeKey "Type" + +/*! + * @defined kIOBDMediaTypeROM + * The kIOBDMediaTypeKey constant for BD-ROM media. + */ + +#define kIOBDMediaTypeROM "BD-ROM" + +/*! + * @defined kIOBDMediaTypeR + * The kIOBDMediaTypeKey constant for BD-R media. + */ + +#define kIOBDMediaTypeR "BD-R" + +/*! + * @defined kIOBDMediaTypeRE + * The kIOBDMediaTypeKey constant for BD-RE media. + */ + +#define kIOBDMediaTypeRE "BD-RE" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOBDBlockStorageDriver.h> +#include <IOKit/storage/IOMedia.h> + +/*! + * @class IOBDMedia + * @abstract + * The IOBDMedia class is a random-access disk device abstraction for BDs. + * @discussion + * The IOBDMedia class is a random-access disk device abstraction for BDs. + */ + +class IOBDMedia : public IOMedia +{ + OSDeclareDefaultStructors(IOBDMedia) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + +public: + + /* + * Obtain this object's provider. We override the superclass's method to + * return a more specific subclass of IOService -- IOBDBlockStorageDriver. + * This method serves simply as a convenience to subclass developers. + */ + + virtual IOBDBlockStorageDriver * getProvider() const; + + /* + * Compare the properties in the supplied table to this object's properties. + */ + + virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); + + /*! + * @function reportKey + * @discussion + * Issue an MMC REPORT KEY command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param keyClass + * As documented by MMC. + * @param address + * As documented by MMC. + * @param grantID + * As documented by MMC. + * @param format + * As documented by MMC. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn reportKey( IOMemoryDescriptor * buffer, + UInt8 keyClass, + UInt32 address, + UInt8 grantID, + UInt8 format ); + + /*! + * @function sendKey + * @discussion + * Issue an MMC SEND KEY command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param keyClass + * As documented by MMC. + * @param grantID + * As documented by MMC. + * @param format + * As documented by MMC. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn sendKey( IOMemoryDescriptor * buffer, + UInt8 keyClass, + UInt8 grantID, + UInt8 format ); + + /*! + * @function readStructure + * @discussion + * Issue an MMC READ DISC STRUCTURE command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param format + * As documented by MMC. + * @param address + * As documented by MMC. + * @param layer + * As documented by MMC. + * @param grantID + * As documented by MMC. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readStructure( IOMemoryDescriptor * buffer, + UInt8 format, + UInt32 address, + UInt8 layer, + UInt8 grantID ); + + /*! + * @function getSpeed + * @discussion + * Get the current speed used for data transfers. + * @param kilobytesPerSecond + * Returns the current speed used for data transfers, in kB/s. + * + * kBDSpeedMin specifies the minimum speed for all BD media (1X). + * kBDSpeedMax specifies the maximum speed supported in hardware. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn getSpeed(UInt16 * kilobytesPerSecond); + + /*! + * @function setSpeed + * @discussion + * Set the speed to be used for data transfers. + * @param kilobytesPerSecond + * Speed to be used for data transfers, in kB/s. + * + * kBDSpeedMin specifies the minimum speed for all BD media (1X). + * kBDSpeedMax specifies the maximum speed supported in hardware. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn setSpeed(UInt16 kilobytesPerSecond); + + /*! + * @function readDiscInfo + * @discussion + * Issue an MMC READ DISC INFORMATION command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param type + * Reserved for future use. Set to zero. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readDiscInfo( IOMemoryDescriptor * buffer, + UInt8 type, + UInt16 * actualByteCount ); + + /*! + * @function readTrackInfo + * @discussion + * Issue an MMC READ TRACK INFORMATION command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param address + * As documented by MMC. + * @param addressType + * As documented by MMC. + * @param open + * Reserved for future use. Set to zero. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readTrackInfo( IOMemoryDescriptor * buffer, + UInt32 address, + UInt8 addressType, + UInt8 open, + UInt16 * actualByteCount ); + + /*! + * @function splitTrack + * @discussion + * Issue an MMC RESERVE TRACK command with the ARSV bit. + * @param address + * As documented by MMC. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn splitTrack(UInt32 address); + + OSMetaClassDeclareReservedUnused(IOBDMedia, 0); + OSMetaClassDeclareReservedUnused(IOBDMedia, 1); + OSMetaClassDeclareReservedUnused(IOBDMedia, 2); + OSMetaClassDeclareReservedUnused(IOBDMedia, 3); + OSMetaClassDeclareReservedUnused(IOBDMedia, 4); + OSMetaClassDeclareReservedUnused(IOBDMedia, 5); + OSMetaClassDeclareReservedUnused(IOBDMedia, 6); + OSMetaClassDeclareReservedUnused(IOBDMedia, 7); + OSMetaClassDeclareReservedUnused(IOBDMedia, 8); + OSMetaClassDeclareReservedUnused(IOBDMedia, 9); + OSMetaClassDeclareReservedUnused(IOBDMedia, 10); + OSMetaClassDeclareReservedUnused(IOBDMedia, 11); + OSMetaClassDeclareReservedUnused(IOBDMedia, 12); + OSMetaClassDeclareReservedUnused(IOBDMedia, 13); + OSMetaClassDeclareReservedUnused(IOBDMedia, 14); + OSMetaClassDeclareReservedUnused(IOBDMedia, 15); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOBDMEDIA_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOBDMediaBSDClient.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOBDMediaBSDClient.h.svn-base new file mode 100644 index 0000000..ee356f5 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOBDMediaBSDClient.h.svn-base @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2006-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOBDMEDIABSDCLIENT_H +#define _IOBDMEDIABSDCLIENT_H + +#include <sys/ioctl.h> +#include <sys/types.h> + +#include <IOKit/storage/IOBDTypes.h> + +/* + * Definitions + * + * ioctl description + * ---------------------------- ------------------------------------------------ + * DKIOCBDREADSTRUCTURE see IOBDMedia::readStructure() in IOBDMedia.h + * + * DKIOCBDREADDISCINFO see IOBDMedia::readDiscInfo() in IOBDMedia.h + * DKIOCBDREADTRACKINFO see IOBDMedia::readTrackInfo() in IOBDMedia.h + * + * DKIOCBDREPORTKEY see IOBDMedia::reportKey() in IOBDMedia.h + * DKIOCBDSENDKEY see IOBDMedia::sendKey() in IOBDMedia.h + * + * DKIOCBDGETSPEED see IOBDMedia::getSpeed() in IOBDMedia.h + * DKIOCBDSETSPEED see IOBDMedia::setSpeed() in IOBDMedia.h + * + * in /System/Library/Frameworks/Kernel.framework/Headers/IOKit/storage/ + */ + +typedef struct +{ + uint8_t format; + + uint8_t reserved0008[3]; /* reserved, clear to zero */ + + uint32_t address; + uint8_t grantID; + uint8_t layer; + + uint8_t reserved0080[4]; /* reserved, clear to zero */ + + uint16_t bufferLength; + void * buffer; +} dk_bd_read_structure_t; + +typedef struct +{ + uint8_t format; + uint8_t keyClass; + + uint8_t reserved0016[2]; /* reserved, clear to zero */ + + uint32_t address; + uint8_t grantID; + + uint8_t reserved0072[5]; /* reserved, clear to zero */ + + uint16_t bufferLength; + void * buffer; +} dk_bd_report_key_t; + +typedef struct +{ + uint8_t format; + uint8_t keyClass; + + uint8_t reserved0016[6]; /* reserved, clear to zero */ + + uint8_t grantID; + + uint8_t reserved0072[5]; /* reserved, clear to zero */ + + uint16_t bufferLength; + void * buffer; +} dk_bd_send_key_t; + +typedef struct +{ + uint8_t reserved0000[14]; /* reserved, clear to zero */ + + uint16_t bufferLength; /* actual length on return */ + void * buffer; +} dk_bd_read_disc_info_t; + +typedef struct +{ + uint8_t reserved0000[4]; /* reserved, clear to zero */ + + uint32_t address; + uint8_t addressType; + + uint8_t reserved0072[5]; /* reserved, clear to zero */ + + uint16_t bufferLength; /* actual length on return */ + void * buffer; +} dk_bd_read_track_info_t; + +#define DKIOCBDREADSTRUCTURE _IOW('d', 160, dk_bd_read_structure_t) +#define DKIOCBDREPORTKEY _IOW('d', 161, dk_bd_report_key_t) +#define DKIOCBDSENDKEY _IOW('d', 162, dk_bd_send_key_t) + +#define DKIOCBDGETSPEED _IOR('d', 163, uint16_t) +#define DKIOCBDSETSPEED _IOW('d', 163, uint16_t) + +#define DKIOCBDREADDISCINFO _IOWR('d', 164, dk_bd_read_disc_info_t) +#define DKIOCBDREADTRACKINFO _IOWR('d', 165, dk_bd_read_track_info_t) + +#define DKIOCBDSPLITTRACK _IOW('d', 166, uint32_t) + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOBDMedia.h> +#include <IOKit/storage/IOMediaBSDClient.h> + +/* + * Class + */ + +class IOBDMediaBSDClient : public IOMediaBSDClient +{ + OSDeclareDefaultStructors(IOBDMediaBSDClient) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + +public: + + /* + * Obtain this object's provider. We override the superclass's method + * to return a more specific subclass of IOService -- IOBDMedia. This + * method serves simply as a convenience to subclass developers. + */ + + virtual IOBDMedia * getProvider() const; + + /* + * Process a BD-specific ioctl. + */ + + virtual int ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, proc_t proc); + + OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 0); + OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 1); + OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 2); + OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 3); + OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 4); + OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 5); + OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 6); + OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 7); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOBDMEDIABSDCLIENT_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOBDTypes.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOBDTypes.h.svn-base new file mode 100644 index 0000000..f5b7927 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOBDTypes.h.svn-base @@ -0,0 +1,133 @@ +/* + * Copyright (c) 2006-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _BDTYPES_H +#define _BDTYPES_H + +#include <IOKit/IOTypes.h> + +#pragma pack(push, 1) /* (enable 8-bit struct packing) */ + +/* + * Media Types + */ + +enum +{ + kBDMediaTypeUnknown = 0x0300, + kBDMediaTypeROM = 0x0302, /* BD-ROM */ + kBDMediaTypeRE = 0x0303, /* BD-RE */ + kBDMediaTypeR = 0x0304, /* BD-R */ + + kBDMediaTypeMin = 0x0300, + kBDMediaTypeMax = 0x03FF +}; + +typedef UInt32 BDMediaType; + +/* + * Media Speed (kB/s) + */ + +#define kBDSpeedMin 0x1126 +#define kBDSpeedMax 0xFFFF + +/* + * MMC Formats + */ + +// Read Disc Information Format +struct BDDiscInfo +{ + UInt16 dataLength; +#ifdef __LITTLE_ENDIAN__ + UInt8 discStatus:2; + UInt8 stateOfLastSession:2; + UInt8 erasable:1; + UInt8 dataType:3; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 dataType:3; + UInt8 erasable:1; + UInt8 stateOfLastSession:2; + UInt8 discStatus:2; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 reserved2; + UInt8 numberOfSessionsLSB; + UInt8 firstTrackNumberInLastSessionLSB; + UInt8 lastTrackNumberInLastSessionLSB; + UInt8 reserved4[2]; + UInt8 numberOfSessionsMSB; + UInt8 firstTrackNumberInLastSessionMSB; + UInt8 lastTrackNumberInLastSessionMSB; + UInt8 reserved6[22]; +}; +typedef struct BDDiscInfo BDDiscInfo; + +// Read Track Information Format +struct BDTrackInfo +{ + UInt16 dataLength; + UInt8 trackNumberLSB; + UInt8 sessionNumberLSB; + UInt8 reserved; +#ifdef __LITTLE_ENDIAN__ + UInt8 reserved2:5; + UInt8 damage:1; + UInt8 reserved3:2; + + UInt8 reserved4:6; + UInt8 blank:1; + UInt8 reservedTrack:1; + + UInt8 nextWritableAddressValid:1; + UInt8 lastRecordedAddressValid:1; + UInt8 reserved5:6; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 reserved3:2; + UInt8 damage:1; + UInt8 reserved2:5; + + UInt8 reservedTrack:1; + UInt8 blank:1; + UInt8 reserved4:6; + + UInt8 reserved5:6; + UInt8 lastRecordedAddressValid:1; + UInt8 nextWritableAddressValid:1; +#endif /* !__LITTLE_ENDIAN__ */ + UInt32 trackStartAddress; + UInt32 nextWritableAddress; + UInt32 freeBlocks; + UInt32 clusterSize; + UInt32 trackSize; + UInt32 lastRecordedAddress; + UInt8 trackNumberMSB; + UInt8 sessionNumberMSB; + UInt8 reserved6; + UInt8 reserved7; +}; +typedef struct BDTrackInfo BDTrackInfo; + +#pragma pack(pop) /* (reset to default struct packing) */ + +#endif /* _BDTYPES_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOBlockStorageDevice.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOBlockStorageDevice.h.svn-base new file mode 100644 index 0000000..bbec146 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOBlockStorageDevice.h.svn-base @@ -0,0 +1,80 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOBlockStorageDevice + * @abstract + * This header contains the IOBlockStorageDevice class definition. + */ + +#ifndef _IOBLOCKSTORAGEDEVICE_H +#define _IOBLOCKSTORAGEDEVICE_H + +#include <IOKit/IOTypes.h> +#include <IOKit/storage/IOStorageDeviceCharacteristics.h> + +/*! + * @defined kIOBlockStorageDeviceClass + * @abstract + * The name of the IOBlockStorageDevice class. + */ + +#define kIOBlockStorageDeviceClass "IOBlockStorageDevice" + +/*! + * @defined kIOBlockStorageDeviceWriteCacheStateKey + * @abstract + * The name of the property used to get or set the write cache state of the + * block storage device. + */ +#define kIOBlockStorageDeviceWriteCacheStateKey "WriteCacheState" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/IOMemoryDescriptor.h> +#include <IOKit/IOMessage.h> +#include <IOKit/IOService.h> +#include <IOKit/storage/IOMedia.h> + +/* Property used for matching, so the generic driver gets the nub it wants. */ +/*! + * @defined kIOBlockStorageDeviceTypeKey + * @abstract The name of the property tested for nub type matching by the generic block + * storage driver. + */ +#define kIOBlockStorageDeviceTypeKey "device-type" +/*! + * @defined kIOBlockStorageDeviceTypeGeneric + * @abstract A character string used for nub matching. + */ +#define kIOBlockStorageDeviceTypeGeneric "Generic" + + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOBLOCKSTORAGEDEVICE_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOBlockStorageDriver.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOBlockStorageDriver.h.svn-base new file mode 100644 index 0000000..24ac3c2 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOBlockStorageDriver.h.svn-base @@ -0,0 +1,245 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOBlockStorageDriver + * @abstract + * This header contains the IOBlockStorageDriver class definition. + */ + +#ifndef _IOBLOCKSTORAGEDRIVER_H +#define _IOBLOCKSTORAGEDRIVER_H + +#include <IOKit/IOTypes.h> + +/*! + * @defined kIOBlockStorageDriverClass + * @abstract + * The name of the IOBlockStorageDriver class. + */ + +#define kIOBlockStorageDriverClass "IOBlockStorageDriver" + +/*! + * @defined kIOBlockStorageDriverStatisticsKey + * @abstract + * Holds a table of numeric values describing the driver's + * operating statistics. + * @discussion + * This property holds a table of numeric values describing the driver's + * operating statistics. The table is an OSDictionary, where each entry + * describes one given statistic. + */ + +#define kIOBlockStorageDriverStatisticsKey "Statistics" + +/*! + * @defined kIOBlockStorageDriverStatisticsBytesReadKey + * @abstract + * Describes the number of bytes read since the block storage + * driver was instantiated. + * @discussion + * This property describes the number of bytes read since the block storage + * driver was instantiated. It is one of the statistic entries listed under + * the top-level kIOBlockStorageDriverStatisticsKey property table. It has + * an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsBytesReadKey "Bytes (Read)" + +/*! + * @defined kIOBlockStorageDriverStatisticsBytesWrittenKey + * @abstract + * Describes the number of bytes written since the block storage + * driver was instantiated. + * @discussion + * This property describes the number of bytes written since the block storage + * driver was instantiated. It is one of the statistic entries listed under the + * top-level kIOBlockStorageDriverStatisticsKey property table. It has an + * OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsBytesWrittenKey "Bytes (Write)" + +/*! + * @defined kIOBlockStorageDriverStatisticsReadErrorsKey + * @abstract + * Describes the number of read errors encountered since the block + * storage driver was instantiated. + * @discussion + * This property describes the number of read errors encountered since the block + * storage driver was instantiated. It is one of the statistic entries listed + * under the top-level kIOBlockStorageDriverStatisticsKey property table. It + * has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsReadErrorsKey "Errors (Read)" + +/*! + * @defined kIOBlockStorageDriverStatisticsWriteErrorsKey + * @abstract + * Describes the number of write errors encountered since the + * block storage driver was instantiated. + * @discussion + * This property describes the number of write errors encountered since the + * block storage driver was instantiated. It is one of the statistic entries + * listed under the top-level kIOBlockStorageDriverStatisticsKey property table. + * It has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsWriteErrorsKey "Errors (Write)" + +/*! + * @defined kIOBlockStorageDriverStatisticsLatentReadTimeKey + * @abstract + * Describes the number of nanoseconds of latency during reads + * since the block storage driver was instantiated. + * @discussion + * This property describes the number of nanoseconds of latency during reads + * since the block storage driver was instantiated. It is one of the statistic + * entries listed under the top-level kIOBlockStorageDriverStatisticsKey + * property table. It has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsLatentReadTimeKey "Latency Time (Read)" + +/*! + * @defined kIOBlockStorageDriverStatisticsLatentWriteTimeKey + * @abstract + * Describes the number of nanoseconds of latency during writes + * since the block storage driver was instantiated. + * @discussion + * This property describes the number of nanoseconds of latency during writes + * since the block storage driver was instantiated. It is one of the statistic + * entries listed under the top-level kIOBlockStorageDriverStatisticsKey + * property table. It has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsLatentWriteTimeKey "Latency Time (Write)" + +/*! + * @defined kIOBlockStorageDriverStatisticsReadsKey + * @abstract + * Describes the number of read operations processed since the + * block storage driver was instantiated. + * @discussion + * This property describes the number of read operations processed since the + * block storage driver was instantiated. It is one of the statistic entries + * listed under the top-level kIOBlockStorageDriverStatisticsKey property table. + * It has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsReadsKey "Operations (Read)" + +/*! + * @defined kIOBlockStorageDriverStatisticsWritesKey + * @abstract + * Describes the number of write operations processed since the + * block storage driver was instantiated. + * @discussion + * This property describes the number of write operations processed since the + * block storage driver was instantiated. It is one of the statistic entries + * listed under the top-level kIOBlockStorageDriverStatisticsKey property table. + * It has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsWritesKey "Operations (Write)" + +/*! + * @defined kIOBlockStorageDriverStatisticsReadRetriesKey + * @abstract + * Describes the number of read retries required since the block + * storage driver was instantiated. + * @discussion + * This property describes the number of read retries required since the block + * storage driver was instantiated. It is one of the statistic entries listed + * under the top-level kIOBlockStorageDriverStatisticsKey property table. It + * has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsReadRetriesKey "Retries (Read)" + +/*! + * @defined kIOBlockStorageDriverStatisticsWriteRetriesKey + * @abstract + * Describes the number of write retries required since the block + * storage driver was instantiated. + * @discussion + * This property describes the number of write retries required since the block + * storage driver was instantiated. It is one of the statistic entries listed + * under the top-level kIOBlockStorageDriverStatisticsKey property table. It + * has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsWriteRetriesKey "Retries (Write)" + +/*! + * @defined kIOBlockStorageDriverStatisticsTotalReadTimeKey + * @abstract + * Describes the number of nanoseconds spent performing reads + * since the block storage driver was instantiated. + * @discussion + * This property describes the number of nanoseconds spent performing reads + * since the block storage driver was instantiated. It is one of the statistic + * entries listed under the top-level kIOBlockStorageDriverStatisticsKey + * property table. It has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsTotalReadTimeKey "Total Time (Read)" + +/*! + * @defined kIOBlockStorageDriverStatisticsTotalWriteTimeKey + * @abstract + * Describes the number of nanoseconds spent performing writes + * since the block storage driver was instantiated. + * @discussion + * This property describes the number of nanoseconds spent performing writes + * since the block storage driver was instantiated. It is one of the statistic + * entries listed under the top-level kIOBlockStorageDriverStatisticsKey + * property table. It has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsTotalWriteTimeKey "Total Time (Write)" + +/*! + * @enum IOMediaState + * @abstract + * The different states that getMediaState() can report. + * @constant kIOMediaStateOffline + * Media is not available. + * @constant kIOMediaStateOnline + * Media is available and ready for operations. + * @constant kIOMediaStateBusy + * Media is available, but not ready for operations. + */ + +enum +{ + kIOMediaStateOffline = 0, + kIOMediaStateOnline = 1, + kIOMediaStateBusy = 2 +}; + +typedef UInt32 IOMediaState; + +#endif /* !_IOBLOCKSTORAGEDRIVER_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOCDBlockStorageDevice.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOCDBlockStorageDevice.h.svn-base new file mode 100644 index 0000000..706da40 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOCDBlockStorageDevice.h.svn-base @@ -0,0 +1,60 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOCDBlockStorageDevice + * @abstract + * This header contains the IOCDBlockStorageDevice class definition. + */ + +#ifndef _IOCDBLOCKSTORAGEDEVICE_H +#define _IOCDBLOCKSTORAGEDEVICE_H + +#include <IOKit/storage/IOCDTypes.h> + +/*! + * @defined kIOCDBlockStorageDeviceClass + * @abstract + * kIOCDBlockStorageDeviceClass is the name of the IOCDBlockStorageDevice class. + * @discussion + * kIOCDBlockStorageDeviceClass is the name of the IOCDBlockStorageDevice class. + */ + +#define kIOCDBlockStorageDeviceClass "IOCDBlockStorageDevice" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOBlockStorageDevice.h> + +/* Property used for matching, so the generic driver gets the nub it wants. */ +#define kIOBlockStorageDeviceTypeCDROM "CDROM" + + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOCDBLOCKSTORAGEDEVICE_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOCDBlockStorageDriver.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOCDBlockStorageDriver.h.svn-base new file mode 100644 index 0000000..f88a406 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOCDBlockStorageDriver.h.svn-base @@ -0,0 +1,51 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * IOCDBlockStorageDriver.h + * + * This class implements CD functionality, independent of + * the physical connection protocol (e.g. SCSI, ATA, USB). + * + * A protocol-specific provider implements the functionality using an appropriate + * protocol and commands. + */ + +#ifndef _IOCDBLOCKSTORAGEDRIVER_H +#define _IOCDBLOCKSTORAGEDRIVER_H + +#include <IOKit/IOTypes.h> +#include <IOKit/storage/IOCDBlockStorageDevice.h> +#include <IOKit/storage/IOCDTypes.h> +#include <IOKit/storage/IOBlockStorageDriver.h> + +/*! + * @defined kIOCDBlockStorageDriverClass + * @abstract + * kIOCDBlockStorageDriverClass is the name of the IOCDBlockStorageDriver class. + * @discussion + * kIOCDBlockStorageDriverClass is the name of the IOCDBlockStorageDriver class. + */ + +#define kIOCDBlockStorageDriverClass "IOCDBlockStorageDriver" + +#endif diff --git a/i386/include/IOKit/storage/.svn/text-base/IOCDMedia.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOCDMedia.h.svn-base new file mode 100644 index 0000000..85ad72d --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOCDMedia.h.svn-base @@ -0,0 +1,553 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOCDMedia + * @abstract + * This header contains the IOCDMedia class definition. + */ + +#ifndef _IOCDMEDIA_H +#define _IOCDMEDIA_H + +/*! + * @defined kIOCDMediaClass + * @abstract + * kIOCDMediaClass is the name of the IOCDMedia class. + * @discussion + * kIOCDMediaClass is the name of the IOCDMedia class. + */ + +#define kIOCDMediaClass "IOCDMedia" + +/*! + * @defined kIOCDMediaTOCKey + * @abstract + * kIOCDMediaTOCKey is a property of IOCDMedia objects. It has an OSData value + * and a CDTOC structure. + * @discussion + * The kIOCDMediaTOCKey property contains the CD's full table of contents, + * formatted as a CDTOC structure. The CDTOC structure is same as what is + * returned by a READ TOC command, format 0x02. All fields in the TOC are + * guaranteed to be binary-encoded (no BCD-encoded numbers are ever passed). + */ + +#define kIOCDMediaTOCKey "TOC" + +/*! + * @defined kIOCDMediaTypeKey + * @abstract + * kIOCDMediaTypeKey is a property of IOCDMedia objects. It has an OSString + * value. + * @discussion + * The kIOCDMediaTypeKey property identifies the CD media type (CD-ROM, CD-R, + * CD-RW, etc). See the kIOCDMediaType contants for possible values. + */ + +#define kIOCDMediaTypeKey "Type" + +/*! + * @defined kIOCDMediaTypeROM + * The kIOCDMediaTypeKey constant for CD-ROM media (inclusive of the CD-I, + * CD-ROM XA, and CD Audio standards, and mixed mode combinations thereof). + */ + +#define kIOCDMediaTypeROM "CD-ROM" + +/*! + * @defined kIOCDMediaTypeR + * The kIOCDMediaTypeKey constant for CD Recordable (CD-R) media. + */ + +#define kIOCDMediaTypeR "CD-R" + +/*! + * @defined kIOCDMediaTypeRW + * The kIOCDMediaTypeKey constant for CD ReWritable (CD-RW) media. + */ + +#define kIOCDMediaTypeRW "CD-RW" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOCDBlockStorageDriver.h> +#include <IOKit/storage/IOMedia.h> + +/*! + * @class IOCDMedia + * @abstract + * The IOCDMedia class is a random-access disk device abstraction for CDs. + * @discussion + * The IOCDMedia class is a random-access disk device abstraction for CDs. It + * extends the IOMedia class by implementing special CD APIs, such as readCD, + * and publishing the TOC as a property of the IOCDMedia object. + */ + +class IOCDMedia : public IOMedia +{ + OSDeclareDefaultStructors(IOCDMedia) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + +public: + + using IOStorage::read; + using IOStorage::write; + + /* + * Obtain this object's provider. We override the superclass's method to + * return a more specific subclass of IOService -- IOCDBlockStorageDriver. + * This method serves simply as a convenience to subclass developers. + */ + + virtual IOCDBlockStorageDriver * getProvider() const; + + /* + * Compare the properties in the supplied table to this object's properties. + */ + + virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); + + /*! + * @function read + * @discussion + * Read data from the storage object at the specified byte offset into the + * specified buffer, asynchronously. When the read completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the read. + * @param client + * Client requesting the read. + * @param byteStart + * Starting byte offset for the data transfer. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + * @param completion + * Completion routine to call once the data transfer is complete. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + */ + + virtual void read(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); + + /* + * @function write + * @discussion + * Write data into the storage object at the specified byte offset from the + * specified buffer, asynchronously. When the write completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the write. + * @param client + * Client requesting the write. + * @param byteStart + * Starting byte offset for the data transfer. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + * @param completion + * Completion routine to call once the data transfer is complete. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + */ + + virtual void write(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); + + /*! + * @function readCD + * @discussion + * Read data from the CD media object at the specified byte offset into the + * specified buffer, asynchronously. Special areas of the CD sector can be + * read via this method, such as the header and subchannel data. When the + * read completes, the caller will be notified via the specified completion + * action. + * + * The buffer will be retained for the duration of the read. + * @param client + * Client requesting the read. + * @param byteStart + * Starting byte offset for the data transfer (see sectorArea parameter). + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param sectorArea + * Sector area(s) to read. The sum of each area's size defines the natural + * block size of the media for the call. This should be taken into account + * when computing the address of byteStart. See IOCDTypes.h. + * @param sectorType + * Sector type that is expected. The data transfer is terminated as soon as + * data is encountered that does not match the expected type. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + * @param completion + * Completion routine to call once the data transfer is complete. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + */ + +#ifdef __LP64__ + virtual void readCD(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); +#else /* !__LP64__ */ + virtual void readCD(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageCompletion completion); +#endif /* !__LP64__ */ + + /*! + * @function readCD + * @discussion + * Read data from the CD media object at the specified byte offset into the + * specified buffer, synchronously. Special areas of the CD sector can be + * read via this method, such as the header and subchannel data. When the + * read completes, this method will return to the caller. The actual byte + * count field is optional. + * @param client + * Client requesting the read. + * @param byteStart + * Starting byte offset for the data transfer (see sectorArea parameter). + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param sectorArea + * Sector area(s) to read. The sum of each area's size defines the natural + * block size of the media for the call. This should be taken into account + * when computing the address of byteStart. See IOCDTypes.h. + * @param sectorType + * Sector type that is expected. The data transfer is terminated as soon as + * data is encountered that does not match the expected type. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + +#ifdef __LP64__ + virtual IOReturn readCD(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageAttributes * attributes = 0, + UInt64 * actualByteCount = 0); +#else /* !__LP64__ */ + virtual IOReturn readCD(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + CDSectorArea sectorArea, + CDSectorType sectorType, + UInt64 * actualByteCount = 0); +#endif /* !__LP64__ */ + + /*! + * @function readISRC + * @discussion + * Read the International Standard Recording Code for the specified track. + * @param track + * Track number from which to read the ISRC. + * @param isrc + * Buffer for the ISRC data. Buffer contents will be zero-terminated. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn readISRC(UInt8 track, CDISRC isrc); + + /*! + * @function readMCN + * @discussion + * Read the Media Catalog Number (also known as the Universal Product Code). + * @param mcn + * Buffer for the MCN data. Buffer contents will be zero-terminated. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn readMCN(CDMCN mcn); + + /*! + * @function getTOC + * @discussion + * Get the full Table Of Contents. + * + * All CDTOC fields passed across I/O Kit APIs are guaranteed to be + * binary-encoded (no BCD-encoded numbers are ever passed). + * @result + * Returns a pointer to the TOC buffer (do not deallocate). + */ + + virtual CDTOC * getTOC(); + + /*! + * @function getSpeed + * @discussion + * Get the current speed used for data transfers. + * @param kilobytesPerSecond + * Returns the current speed used for data transfers, in kB/s. + * + * kCDSpeedMin specifies the minimum speed for all CD media (1X). + * kCDSpeedMax specifies the maximum speed supported in hardware. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn getSpeed(UInt16 * kilobytesPerSecond); /* 10.1.0 */ + + /*! + * @function setSpeed + * @discussion + * Set the speed to be used for data transfers. + * @param kilobytesPerSecond + * Speed to be used for data transfers, in kB/s. + * + * kCDSpeedMin specifies the minimum speed for all CD media (1X). + * kCDSpeedMax specifies the maximum speed supported in hardware. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn setSpeed(UInt16 kilobytesPerSecond); /* 10.1.0 */ + + /*! + * @function readTOC + * @discussion + * Issue an MMC READ TOC/PMA/ATIP command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param format + * As documented by MMC. + * @param formatAsTime + * As documented by MMC. + * @param trackOrSessionNumber + * As documented by MMC. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readTOC(IOMemoryDescriptor * buffer, + CDTOCFormat format, + UInt8 formatAsTime, + UInt8 trackOrSessionNumber, + UInt16 * actualByteCount); /* 10.1.3 */ + + /*! + * @function readDiscInfo + * @discussion + * Issue an MMC READ DISC INFORMATION command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readDiscInfo(IOMemoryDescriptor * buffer, + UInt16 * actualByteCount); /* 10.1.3 */ + + /*! + * @function readTrackInfo + * @discussion + * Issue an MMC READ TRACK INFORMATION command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param address + * As documented by MMC. + * @param addressType + * As documented by MMC. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readTrackInfo(IOMemoryDescriptor * buffer, + UInt32 address, + CDTrackInfoAddressType addressType, + UInt16 * actualByteCount); /* 10.1.3 */ + + /* + * @function writeCD + * @discussion + * Write data into the CD media object at the specified byte offset from the + * specified buffer, asynchronously. When the write completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the write. + * @param client + * Client requesting the write. + * @param byteStart + * Starting byte offset for the data transfer (see sectorArea parameter). + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param sectorArea + * Sector area(s) to write. The sum of each area's size defines the natural + * block size of the media for the call. This should be taken into account + * when computing the address of byteStart. See IOCDTypes.h. + * @param sectorType + * Sector type that is expected. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + * @param completion + * Completion routine to call once the data transfer is complete. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + */ + +#ifdef __LP64__ + virtual void writeCD(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); +#else /* !__LP64__ */ + virtual void writeCD(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageCompletion completion); /* 10.2.0 */ +#endif /* !__LP64__ */ + + /* + * @function writeCD + * @discussion + * Write data into the CD media object at the specified byte offset from the + * specified buffer, synchronously. When the write completes, this method + * will return to the caller. The actual byte count field is optional. + * @param client + * Client requesting the write. + * @param byteStart + * Starting byte offset for the data transfer (see sectorArea parameter). + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param sectorArea + * Sector area(s) to write. The sum of each area's size defines the natural + * block size of the media for the call. This should be taken into account + * when computing the address of byteStart. See IOCDTypes.h. + * @param sectorType + * Sector type that is expected. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + +#ifdef __LP64__ + virtual IOReturn writeCD(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageAttributes * attributes = 0, + UInt64 * actualByteCount = 0); +#else /* !__LP64__ */ + virtual IOReturn writeCD(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + CDSectorArea sectorArea, + CDSectorType sectorType, + UInt64 * actualByteCount = 0); /* 10.2.0 */ +#endif /* !__LP64__ */ + +#ifdef __LP64__ + OSMetaClassDeclareReservedUnused(IOCDMedia, 0); + OSMetaClassDeclareReservedUnused(IOCDMedia, 1); + OSMetaClassDeclareReservedUnused(IOCDMedia, 2); + OSMetaClassDeclareReservedUnused(IOCDMedia, 3); + OSMetaClassDeclareReservedUnused(IOCDMedia, 4); + OSMetaClassDeclareReservedUnused(IOCDMedia, 5); + OSMetaClassDeclareReservedUnused(IOCDMedia, 6); +#else /* !__LP64__ */ + OSMetaClassDeclareReservedUsed(IOCDMedia, 0); + OSMetaClassDeclareReservedUsed(IOCDMedia, 1); + OSMetaClassDeclareReservedUsed(IOCDMedia, 2); + OSMetaClassDeclareReservedUsed(IOCDMedia, 3); + OSMetaClassDeclareReservedUsed(IOCDMedia, 4); + OSMetaClassDeclareReservedUsed(IOCDMedia, 5); + OSMetaClassDeclareReservedUsed(IOCDMedia, 6); +#endif /* !__LP64__ */ + OSMetaClassDeclareReservedUnused(IOCDMedia, 7); + OSMetaClassDeclareReservedUnused(IOCDMedia, 8); + OSMetaClassDeclareReservedUnused(IOCDMedia, 9); + OSMetaClassDeclareReservedUnused(IOCDMedia, 10); + OSMetaClassDeclareReservedUnused(IOCDMedia, 11); + OSMetaClassDeclareReservedUnused(IOCDMedia, 12); + OSMetaClassDeclareReservedUnused(IOCDMedia, 13); + OSMetaClassDeclareReservedUnused(IOCDMedia, 14); + OSMetaClassDeclareReservedUnused(IOCDMedia, 15); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOCDMEDIA_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOCDMediaBSDClient.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOCDMediaBSDClient.h.svn-base new file mode 100644 index 0000000..ce31863 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOCDMediaBSDClient.h.svn-base @@ -0,0 +1,199 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOCDMEDIABSDCLIENT_H +#define _IOCDMEDIABSDCLIENT_H + +#include <sys/ioctl.h> + +#include <IOKit/storage/IOCDTypes.h> + +/* + * Definitions + * + * ioctl description + * ---------------------------- ------------------------------------------------ + * DKIOCCDREAD see IOCDMedia::readCD() in IOCDMedia.h + * DKIOCCDREADTOC see IOCDMedia::readTOC() in IOCDMedia.h + * + * DKIOCCDREADDISCINFO see IOCDMedia::readDiscInfo() in IOCDMedia.h + * DKIOCCDREADTRACKINFO see IOCDMedia::readTrackInfo() in IOCDMedia.h + * + * DKIOCCDREADISRC see IOCDMedia::readISRC() in IOCDMedia.h + * DKIOCCDREADMCN see IOCDMedia::readMCN() in IOCDMedia.h + * + * DKIOCCDGETSPEED see IOCDMedia::getSpeed() in IOCDMedia.h + * DKIOCCDSETSPEED see IOCDMedia::setSpeed() in IOCDMedia.h + * + * in /System/Library/Frameworks/Kernel.framework/Headers/IOKit/storage/ + */ + +typedef struct +{ + uint64_t offset; + + uint8_t sectorArea; + uint8_t sectorType; + +#ifdef __LP64__ + uint8_t reserved0080[10]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0080[6]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ + + uint32_t bufferLength; /* actual length on return */ + void * buffer; +} dk_cd_read_t; + +typedef struct +{ + CDISRC isrc; + uint8_t track; + + uint8_t reserved0112[2]; /* reserved, clear to zero */ +} dk_cd_read_isrc_t; + +typedef struct +{ + CDMCN mcn; + + uint8_t reserved0112[2]; /* reserved, clear to zero */ +} dk_cd_read_mcn_t; + +typedef struct +{ + uint8_t format; + uint8_t formatAsTime; + + uint8_t reserved0016[5]; /* reserved, clear to zero */ + + union + { + uint8_t session; + uint8_t track; + } address; + +#ifdef __LP64__ + uint8_t reserved0064[6]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0064[2]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ + + uint16_t bufferLength; /* actual length on return */ + void * buffer; +} dk_cd_read_toc_t; + +typedef struct +{ +#ifdef __LP64__ + uint8_t reserved0000[14]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0000[10]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ + + uint16_t bufferLength; /* actual length on return */ + void * buffer; +} dk_cd_read_disc_info_t; + +typedef struct +{ + uint8_t reserved0000[4]; /* reserved, clear to zero */ + + uint32_t address; + uint8_t addressType; + +#ifdef __LP64__ + uint8_t reserved0072[5]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0072[1]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ + + uint16_t bufferLength; /* actual length on return */ + void * buffer; +} dk_cd_read_track_info_t; + +#define DKIOCCDREAD _IOWR('d', 96, dk_cd_read_t) + +#define DKIOCCDREADISRC _IOWR('d', 97, dk_cd_read_isrc_t) +#define DKIOCCDREADMCN _IOWR('d', 98, dk_cd_read_mcn_t) + +#define DKIOCCDGETSPEED _IOR('d', 99, uint16_t) +#define DKIOCCDSETSPEED _IOW('d', 99, uint16_t) + +#define DKIOCCDREADTOC _IOWR('d', 100, dk_cd_read_toc_t) + +#define DKIOCCDREADDISCINFO _IOWR('d', 101, dk_cd_read_disc_info_t) +#define DKIOCCDREADTRACKINFO _IOWR('d', 102, dk_cd_read_track_info_t) + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOCDMedia.h> +#include <IOKit/storage/IOMediaBSDClient.h> + +/* + * Class + */ + +class IOCDMediaBSDClient : public IOMediaBSDClient +{ + OSDeclareDefaultStructors(IOCDMediaBSDClient) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + +public: + + /* + * Obtain this object's provider. We override the superclass's method + * to return a more specific subclass of IOService -- IOCDMedia. This + * method serves simply as a convenience to subclass developers. + */ + + virtual IOCDMedia * getProvider() const; + + /* + * Process a CD-specific ioctl. + */ + + virtual int ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, proc_t proc); + + OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 0); + OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 1); + OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 2); + OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 3); + OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 4); + OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 5); + OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 6); + OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 7); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOCDMEDIABSDCLIENT_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOCDPartitionScheme.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOCDPartitionScheme.h.svn-base new file mode 100644 index 0000000..1ff58c4 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOCDPartitionScheme.h.svn-base @@ -0,0 +1,226 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOCDPartitionScheme + * @abstract + * This header contains the IOCDPartitionScheme class definition. + */ + +#ifndef _IOCDPARTITIONSCHEME_H +#define _IOCDPARTITIONSCHEME_H + +#include <IOKit/storage/IOCDTypes.h> + +/*! + * @defined kIOCDPartitionSchemeClass + * @abstract + * kIOCDPartitionSchemeClass is the name of the IOCDPartitionScheme class. + * @discussion + * kIOCDPartitionSchemeClass is the name of the IOCDPartitionScheme class. + */ + +#define kIOCDPartitionSchemeClass "IOCDPartitionScheme" + +/*! + * @defined kIOMediaSessionIDKey + * @abstract + * kIOMediaSessionIDKey is property of IOMedia objects. It has an OSNumber + * value. + * @discussion + * The kIOMediaSessionIDKey property is placed into each IOMedia instance + * created by the CD partition scheme. It identifies the session number + * the track was recorded on. + */ + +#define kIOMediaSessionIDKey "Session ID" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOCDMedia.h> +#include <IOKit/storage/IOPartitionScheme.h> + +/* + * Class + */ + +class IOCDPartitionScheme : public IOPartitionScheme +{ + OSDeclareDefaultStructors(IOCDPartitionScheme); + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + + OSSet * _partitions; /* (set of media objects representing partitions) */ + + /* + * Free all of this object's outstanding resources. + */ + + virtual void free(void); + + /* + * Scan the provider media for CD partitions (in TOC). Returns the set + * of media objects representing each of the partitions (the retain for + * the set is passed to the caller), or null should no CD partitions be + * found. The default probe score can be adjusted up or down, based on + * the confidence of the scan. + */ + + virtual OSSet * scan(SInt32 * score); + + /* + * Ask whether the given partition appears to be corrupt. A partition that + * is corrupt will cause the failure of the CD partition scheme altogether. + */ + + virtual bool isPartitionCorrupt( CDTOCDescriptor * partition, + UInt64 partitionSize, + UInt32 partitionBlockSize, + CDSectorType partitionBlockType, + CDTOC * toc ); + + /* + * Ask whether the given partition appears to be invalid. A partition that + * is invalid will cause it to be skipped in the scan, but will not cause a + * failure of the CD partition scheme. + */ + + virtual bool isPartitionInvalid( CDTOCDescriptor * partition, + UInt64 partitionSize, + UInt32 partitionBlockSize, + CDSectorType partitionBlockType, + CDTOC * toc ); + + /* + * Instantiate a new media object to represent the given partition. + */ + + virtual IOMedia * instantiateMediaObject( + CDTOCDescriptor * partition, + UInt64 partitionSize, + UInt32 partitionBlockSize, + CDSectorType partitionBlockType, + CDTOC * toc ); + + /* + * Allocate a new media object (called from instantiateMediaObject). + */ + + virtual IOMedia * instantiateDesiredMediaObject( + CDTOCDescriptor * partition, + UInt64 partitionSize, + UInt32 partitionBlockSize, + CDSectorType partitionBlockType, + CDTOC * toc ); + +public: + + /* + * Initialize this object's minimal state. + */ + + virtual bool init(OSDictionary * properties = 0); + + /* + * Scan the provider media for CD partitions. + */ + + virtual IOService * probe(IOService * provider, SInt32 * score); + + /* + * Determine whether the provider media contains CD partitions. + */ + + virtual bool start(IOService * provider); + + /* + * Read data from the storage object at the specified byte offset into the + * specified buffer, asynchronously. When the read completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the read. + * + * For the CD partition scheme, we convert the read from a partition + * object into the appropriate readCD command to our provider media. + */ + + virtual void read(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); + + /* + * Write data into the storage object at the specified byte offset from the + * specified buffer, asynchronously. When the write completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the write. + * + * For the CD partition scheme, we convert the write from a partition + * object into the appropriate writeCD command to our provider media. + */ + + virtual void write(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); + + /* + * Obtain this object's provider. We override the superclass's method + * to return a more specific subclass of OSObject -- IOCDMedia. This + * method serves simply as a convenience to subclass developers. + */ + + virtual IOCDMedia * getProvider() const; + + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 0); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 1); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 2); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 3); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 4); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 5); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 6); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 7); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 8); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 9); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 10); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 11); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 12); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 13); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 14); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 15); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOCDPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOCDTypes.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOCDTypes.h.svn-base new file mode 100644 index 0000000..6b1af29 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOCDTypes.h.svn-base @@ -0,0 +1,492 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOCDTYPES_H +#define _IOCDTYPES_H + +#include <IOKit/IOTypes.h> +#include <libkern/OSByteOrder.h> + +#pragma pack(push, 1) /* (enable 8-bit struct packing) */ + +/* + * Minutes, Seconds, Frames (M:S:F) + * + * All M:S:F values passed across I/O Kit APIs are guaranteed to be + * binary-encoded numbers (no BCD-encoded numbers are ever passed). + */ + +typedef struct +{ + UInt8 minute; + UInt8 second; + UInt8 frame; +} CDMSF; + +/* + * Media Catalogue Numbers (MCN), International Standard Recording Codes (ISRC) + * + * All MCN and ISRC values passed across I/O Kit APIs are guaranteed + * to have a zero-terminating byte, for convenient use as C strings. + */ + +#define kCDMCNMaxLength 13 +#define kCDISRCMaxLength 12 + +typedef char CDMCN [kCDMCNMaxLength + 1]; +typedef char CDISRC[kCDISRCMaxLength + 1]; + +/* + * Audio Status + * + * All CDAudioStatus fields passed across I/O Kit APIs are guaranteed to + * be binary-encoded numbers (no BCD-encoded numbers are ever passed). + */ + +#define kCDAudioStatusUnsupported 0x00 +#define kCDAudioStatusActive 0x11 +#define kCDAudioStatusPaused 0x12 +#define kCDAudioStatusSuccess 0x13 +#define kCDAudioStatusFailure 0x14 +#define kCDAudioStatusNone 0x15 + +typedef struct +{ + UInt8 status; + struct + { + CDMSF time; + struct + { + UInt8 index; + UInt8 number; + CDMSF time; + } track; + } position; +} CDAudioStatus; + +/* + * Table Of Contents + * + * All CDTOC fields passed across I/O Kit APIs are guaranteed to be + * binary-encoded numbers (no BCD-encoded numbers are ever passed). + */ + +typedef struct +{ + UInt8 session; +#ifdef __LITTLE_ENDIAN__ + UInt8 control:4, adr:4; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 adr:4, control:4; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 tno; + UInt8 point; + CDMSF address; + UInt8 zero; + CDMSF p; +} CDTOCDescriptor; + +typedef struct +{ + UInt16 length; + UInt8 sessionFirst; + UInt8 sessionLast; + CDTOCDescriptor descriptors[0]; +} CDTOC; + +/* + * Table Of Contents Descriptor Count Convenience Function + */ + +static inline UInt32 CDTOCGetDescriptorCount(CDTOC * toc) +{ + UInt32 tocSize = OSSwapBigToHostInt16(toc->length) + (UInt32) sizeof(toc->length); + + return (tocSize < (UInt32) sizeof(CDTOC)) ? 0 : + (tocSize - (UInt32) sizeof(CDTOC)) / (UInt32) sizeof(CDTOCDescriptor); +} + +/* + * M:S:F To LBA Convenience Function + */ + +static inline UInt32 CDConvertMSFToLBA(CDMSF msf) +{ + return (((msf.minute * 60U) + msf.second) * 75U) + msf.frame - 150U; +} + +/* + * M:S:F To Clipped LBA Convenience Function + */ + +static inline UInt32 CDConvertMSFToClippedLBA(CDMSF msf) +{ + return (msf.minute == 0 && msf.second <= 1) ? 0 : CDConvertMSFToLBA(msf); +} + +/* + * LBA To M:S:F Convenience Function + */ + +static inline CDMSF CDConvertLBAToMSF(UInt32 lba) +{ + CDMSF msf; + + lba += 150; + msf.minute = (lba / (75 * 60)); + msf.second = (lba % (75 * 60)) / 75; + msf.frame = (lba % (75 )); + + return msf; +} + +/* + * Track Number To M:S:F Convenience Function + * + * The CDTOC structure is assumed to be complete, that is, none of + * the descriptors are missing or clipped due to an insufficiently + * sized buffer holding the CDTOC contents. + */ + +static inline CDMSF CDConvertTrackNumberToMSF(UInt8 track, CDTOC * toc) +{ + UInt32 count = CDTOCGetDescriptorCount(toc); + UInt32 i; + CDMSF msf = { 0xFF, 0xFF, 0xFF }; + + for (i = 0; i < count; i++) + { + if (toc->descriptors[i].point == track && toc->descriptors[i].adr == 1) + { + msf = toc->descriptors[i].p; + break; + } + } + + return msf; +} + +/* + * Sector Areas, Sector Types + * + * Bytes Per Type CDDA Mode1 Mode2 Mode2Form1 Mode2Form2 + * Per Area +----------+----------+----------+----------+----------+ + * Sync | 0 | 12 | 12 | 12 | 12 | + * Header | 0 | 4 | 4 | 4 | 4 | + * SubHeader | 0 | 0 | 0 | 8 | 8 | + * User | 2352 | 2048 | 2336 | 2048 | 2328 | + * Auxiliary | 0 | 288 | 0 | 280 | 0 | + * ErrorFlags | 294 | 294 | 294 | 294 | 294 | + * SubChannel | 96 | 96 | 96 | 96 | 96 | + * SubChannelQ | 16 | 16 | 16 | 16 | 16 | + * +----------+----------+----------+----------+----------+ + */ + +typedef enum +{ + kCDSectorAreaSync = 0x80, + kCDSectorAreaHeader = 0x20, + kCDSectorAreaSubHeader = 0x40, + kCDSectorAreaUser = 0x10, + kCDSectorAreaAuxiliary = 0x08, + kCDSectorAreaErrorFlags = 0x02, + kCDSectorAreaSubChannel = 0x01, + kCDSectorAreaSubChannelQ = 0x04 +} CDSectorArea; + +typedef enum +{ + kCDSectorTypeUnknown = 0x00, + kCDSectorTypeCDDA = 0x01, + kCDSectorTypeMode1 = 0x02, + kCDSectorTypeMode2 = 0x03, + kCDSectorTypeMode2Form1 = 0x04, + kCDSectorTypeMode2Form2 = 0x05, + kCDSectorTypeCount = 0x06 +} CDSectorType; + +typedef enum +{ + kCDSectorSizeCDDA = 2352, + kCDSectorSizeMode1 = 2048, + kCDSectorSizeMode2 = 2336, + kCDSectorSizeMode2Form1 = 2048, + kCDSectorSizeMode2Form2 = 2328, + kCDSectorSizeWhole = 2352 +} CDSectorSize; + +/* + * Media Types + */ + +typedef enum +{ + kCDMediaTypeUnknown = 0x0100, + kCDMediaTypeROM = 0x0102, /* CD-ROM */ + kCDMediaTypeR = 0x0104, /* CD-R */ + kCDMediaTypeRW = 0x0105, /* CD-RW */ + + kCDMediaTypeMin = 0x0100, + kCDMediaTypeMax = 0x01FF +}; + +typedef UInt32 CDMediaType; + +/* + * Media Speed (kB/s) + */ + +#define kCDSpeedMin 0x00B0 +#define kCDSpeedMax 0xFFFF + +/* + * MMC Formats + */ + +// Read Table Of Contents Format Types +typedef UInt8 CDTOCFormat; +enum +{ + kCDTOCFormatTOC = 0x02, // CDTOC + kCDTOCFormatPMA = 0x03, // CDPMA + kCDTOCFormatATIP = 0x04, // CDATIP + kCDTOCFormatTEXT = 0x05 // CDTEXT +}; + +// Read Table Of Contents Format 0x03 +struct CDPMADescriptor +{ + UInt8 reserved; +#ifdef __LITTLE_ENDIAN__ + UInt8 control:4, adr:4; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 adr:4, control:4; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 tno; + UInt8 point; + CDMSF address; + UInt8 zero; + CDMSF p; +}; +typedef struct CDPMADescriptor CDPMADescriptor; + +struct CDPMA +{ + UInt16 dataLength; + UInt8 reserved; + UInt8 reserved2; + CDPMADescriptor descriptors[0]; +}; +typedef struct CDPMA CDPMA; + +// Read Table Of Contents Format 0x04 +struct CDATIP +{ + UInt16 dataLength; + UInt8 reserved[2]; +#ifdef __LITTLE_ENDIAN__ + UInt8 referenceSpeed:3; + UInt8 reserved3:1; + UInt8 indicativeTargetWritingPower:3; + UInt8 reserved2:1; + + UInt8 reserved5:6; + UInt8 unrestrictedUse:1; + UInt8 reserved4:1; + + UInt8 a3Valid:1; + UInt8 a2Valid:1; + UInt8 a1Valid:1; + UInt8 discSubType:3; + UInt8 discType:1; + UInt8 reserved6:1; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 reserved2:1; + UInt8 indicativeTargetWritingPower:3; + UInt8 reserved3:1; + UInt8 referenceSpeed:3; + + UInt8 reserved4:1; + UInt8 unrestrictedUse:1; + UInt8 reserved5:6; + + UInt8 reserved6:1; + UInt8 discType:1; + UInt8 discSubType:3; + UInt8 a1Valid:1; + UInt8 a2Valid:1; + UInt8 a3Valid:1; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 reserved7; + CDMSF startTimeOfLeadIn; + UInt8 reserved8; + CDMSF lastPossibleStartTimeOfLeadOut; + UInt8 reserved9; + UInt8 a1[3]; + UInt8 reserved10; + UInt8 a2[3]; + UInt8 reserved11; + UInt8 a3[3]; + UInt8 reserved12; +}; +typedef struct CDATIP CDATIP; + +// Read Table Of Contents Format 0x05 +struct CDTEXTDescriptor +{ + UInt8 packType; + UInt8 trackNumber; + UInt8 sequenceNumber; +#ifdef __LITTLE_ENDIAN__ + UInt8 characterPosition:4; + UInt8 blockNumber:3; + UInt8 doubleByteCharacterCode:1; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 doubleByteCharacterCode:1; + UInt8 blockNumber:3; + UInt8 characterPosition:4; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 textData[12]; + UInt8 reserved[2]; +}; +typedef struct CDTEXTDescriptor CDTEXTDescriptor; + +struct CDTEXT +{ + UInt16 dataLength; + UInt8 reserved; + UInt8 reserved2; + CDTEXTDescriptor descriptors[0]; +}; +typedef struct CDTEXT CDTEXT; + +// Read Disc Information Format +struct CDDiscInfo +{ + UInt16 dataLength; +#ifdef __LITTLE_ENDIAN__ + UInt8 discStatus:2; + UInt8 stateOfLastSession:2; + UInt8 erasable:1; + UInt8 reserved:3; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 reserved:3; + UInt8 erasable:1; + UInt8 stateOfLastSession:2; + UInt8 discStatus:2; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 numberOfFirstTrack; + UInt8 numberOfSessionsLSB; + UInt8 firstTrackNumberInLastSessionLSB; + UInt8 lastTrackNumberInLastSessionLSB; +#ifdef __LITTLE_ENDIAN__ + UInt8 reserved3:5; + UInt8 unrestrictedUse:1; + UInt8 discBarCodeValid:1; + UInt8 discIdentificationValid:1; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 discIdentificationValid:1; + UInt8 discBarCodeValid:1; + UInt8 unrestrictedUse:1; + UInt8 reserved3:5; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 discType; + UInt8 numberOfSessionsMSB; + UInt8 firstTrackNumberInLastSessionMSB; + UInt8 lastTrackNumberInLastSessionMSB; + UInt32 discIdentification; + UInt8 reserved7; + CDMSF lastSessionLeadInStartTime; + UInt8 reserved8; + CDMSF lastPossibleStartTimeOfLeadOut; + UInt8 discBarCode[8]; + UInt8 reserved9; + UInt8 numberOfOPCTableEntries; + UInt8 opcTableEntries[0]; +}; +typedef struct CDDiscInfo CDDiscInfo; + +// Read Track Information Address Types +typedef UInt8 CDTrackInfoAddressType; +enum +{ + kCDTrackInfoAddressTypeLBA = 0x00, + kCDTrackInfoAddressTypeTrackNumber = 0x01, + kCDTrackInfoAddressTypeSessionNumber = 0x02, +}; + +// Read Track Information Format +struct CDTrackInfo +{ + UInt16 dataLength; + UInt8 trackNumberLSB; + UInt8 sessionNumberLSB; + UInt8 reserved; +#ifdef __LITTLE_ENDIAN__ + UInt8 trackMode:4; + UInt8 copy:1; + UInt8 damage:1; + UInt8 reserved3:2; + + UInt8 dataMode:4; + UInt8 fixedPacket:1; + UInt8 packet:1; + UInt8 blank:1; + UInt8 reservedTrack:1; + + UInt8 nextWritableAddressValid:1; + UInt8 lastRecordedAddressValid:1; + UInt8 reserved5:6; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 reserved3:2; + UInt8 damage:1; + UInt8 copy:1; + UInt8 trackMode:4; + + UInt8 reservedTrack:1; + UInt8 blank:1; + UInt8 packet:1; + UInt8 fixedPacket:1; + UInt8 dataMode:4; + + UInt8 reserved5:6; + UInt8 lastRecordedAddressValid:1; + UInt8 nextWritableAddressValid:1; +#endif /* !__LITTLE_ENDIAN__ */ + UInt32 trackStartAddress; + UInt32 nextWritableAddress; + UInt32 freeBlocks; + UInt32 fixedPacketSize; + UInt32 trackSize; + UInt32 lastRecordedAddress; + UInt8 trackNumberMSB; + UInt8 sessionNumberMSB; + UInt8 reserved6; + UInt8 reserved7; +}; +typedef struct CDTrackInfo CDTrackInfo; + +#pragma pack(pop) /* (reset to default struct packing) */ + +#endif /* _IOCDTYPES_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IODVDBlockStorageDevice.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IODVDBlockStorageDevice.h.svn-base new file mode 100644 index 0000000..161651c --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IODVDBlockStorageDevice.h.svn-base @@ -0,0 +1,145 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IODVDBlockStorageDevice + * @abstract + * This header contains the IODVDBlockStorageDevice class definition. + */ + +#ifndef _IODVDBLOCKSTORAGEDEVICE_H +#define _IODVDBLOCKSTORAGEDEVICE_H + +#include <IOKit/storage/IODVDTypes.h> + +/*! + * @defined kIODVDBlockStorageDeviceClass + * @abstract + * kIODVDBlockStorageDeviceClass is the name of the IODVDBlockStorageDevice class. + * @discussion + * kIODVDBlockStorageDeviceClass is the name of the IODVDBlockStorageDevice class. + */ + +#define kIODVDBlockStorageDeviceClass "IODVDBlockStorageDevice" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOCDBlockStorageDevice.h> + +/* Property used for matching, so the generic driver gets the nub it wants. */ +#define kIOBlockStorageDeviceTypeDVD "DVD" + +/*! + * @class + * IODVDBlockStorageDevice : public IOCDBlockStorageDevice + * @abstract + * The IODVDBlockStorageDevice class is a generic DVD block storage device + * abstraction. + * @discussion + * This class is the protocol for generic DVD functionality, independent of + * the physical connection protocol (e.g. SCSI, ATA, USB). + * + * The APIs are the union of CD APIs and all + * necessary new low-level DVD APIs. + * + * A subclass implements relay methods that translate our requests into + * calls to a protocol- and device-specific provider. + */ + +class IODVDBlockStorageDevice : public IOCDBlockStorageDevice { + + OSDeclareAbstractStructors(IODVDBlockStorageDevice) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + +public: + + /* Overrides from IORegistryEntry */ + + virtual bool init(OSDictionary * properties); + + /* New APIs for DVD */ + + virtual IOReturn reportKey(IOMemoryDescriptor *buffer,const DVDKeyClass keyClass, + const UInt32 lba,const UInt8 agid,const DVDKeyFormat keyFormat) = 0; + + virtual IOReturn sendKey(IOMemoryDescriptor *buffer,const DVDKeyClass keyClass, + const UInt8 agid,const DVDKeyFormat keyFormat) = 0; + +#ifdef __LP64__ + virtual IOReturn readDVDStructure(IOMemoryDescriptor *buffer,const DVDStructureFormat format, + const UInt32 address,const UInt8 layer,const UInt8 agid) = 0; +#else /* !__LP64__ */ + virtual IOReturn readDVDStructure(IOMemoryDescriptor *buffer,const DVDStructureFormat format, + const UInt32 address,const UInt8 layer,const UInt8 agid); /* 10.1.0 */ +#endif /* !__LP64__ */ + +#ifdef __LP64__ + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 0); +#else /* !__LP64__ */ + OSMetaClassDeclareReservedUsed(IODVDBlockStorageDevice, 0); +#endif /* !__LP64__ */ + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 1); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 2); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 3); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 4); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 5); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 6); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 7); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 8); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 9); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 10); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 11); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 12); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 13); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 14); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 15); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 16); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 17); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 18); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 19); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 20); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 21); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 22); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 23); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 24); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 25); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 26); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 27); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 28); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 29); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 30); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 31); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IODVDBLOCKSTORAGEDEVICE_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IODVDBlockStorageDriver.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IODVDBlockStorageDriver.h.svn-base new file mode 100644 index 0000000..d9471f6 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IODVDBlockStorageDriver.h.svn-base @@ -0,0 +1,219 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * IODVDBlockStorageDriver.h + * + * This class implements DVD functionality, independent of + * the physical connection protocol (e.g. SCSI, ATA, USB). + * + * A protocol-specific provider implements the functionality using an appropriate + * protocol and commands. + */ + +#ifndef _IODVDBLOCKSTORAGEDRIVER_H +#define _IODVDBLOCKSTORAGEDRIVER_H + +#include <IOKit/IOTypes.h> +#include <IOKit/storage/IOCDBlockStorageDriver.h> +#include <IOKit/storage/IODVDBlockStorageDevice.h> +#include <IOKit/storage/IODVDTypes.h> + +/*! + * @defined kIODVDBlockStorageDriverClass + * @abstract + * kIODVDBlockStorageDriverClass is the name of the IODVDBlockStorageDriver class. + * @discussion + * kIODVDBlockStorageDriverClass is the name of the IODVDBlockStorageDriver class. + */ + +#define kIODVDBlockStorageDriverClass "IODVDBlockStorageDriver" + +class IODVDBlockStorageDevice; + +/*! + * @class + * IODVDBlockStorageDriver : public IOCDBlockStorageDriver + * @abstract + * Generic DVD Driver. + * @discussion + * Storage drivers are split into two parts: the Generic Driver handles + * all generic device issues, independent of the lower-level transport + * mechanism (e.g. SCSI, ATA, USB, FireWire). All storage operations + * at the Generic Driver level are translated into a series of generic + * device operations. These operations are passed via the Device Nub + * to a Transport Driver, which implements the appropriate + * transport-dependent protocol to execute these operations. + * + * To determine the write-protect state of a device (or media), for + * example, the generic driver would issue a call to the + * Transport Driver's reportWriteProtection method. If this were a SCSI + * device, its Transport Driver would issue a Mode Sense command to + * extract the write-protection status bit. The Transport Driver then + * reports true or false to the generic driver. + * + * The generic driver therefore has no knowledge of, or involvement + * with, the actual commands and mechanisms used to communicate with + * the device. It is expected that the generic driver will rarely, if + * ever, need to be subclassed to handle device idiosyncrasies; rather, + * the Transport Driver should be changed via overrides. + * + * A generic driver could be subclassed to create a different type of + * generic device. The generic driver IODVDBlockStorageDriver class is a subclass + * of IOCDBlockStorageDriver, adding DVD functions. Similarly, the Transport Driver + * IODVDBlockStorageDevice is a subclass of IOCDBlockStorageDevice, adding DVD + * functions. +*/ + +class IODVDBlockStorageDriver : public IOCDBlockStorageDriver { + + OSDeclareDefaultStructors(IODVDBlockStorageDriver) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + + /* Overrides of IOCDBlockStorageDriver. */ + + virtual IOReturn acceptNewMedia(void); + + /* End of IOCDBlockStorageDriver overrides. */ + +public: + + /* + * Obtain this object's provider. We override the superclass's method to + * return a more specific subclass of IOService -- IODVDBlockStorageDevice. + * This method serves simply as a convenience to subclass developers. + */ + + virtual IODVDBlockStorageDevice * getProvider() const; + + /* Overrides of IOCDBlockStorageDriver: */ + + virtual const char * getDeviceTypeName(void); + virtual IOMedia * instantiateDesiredMediaObject(void); + virtual IOMedia * instantiateMediaObject(UInt64 base,UInt64 byteSize, + UInt32 blockSize,char *mediaName); + + /* End of IOCDBlockStorageDriver overrides. */ + + /*! + * @function reportKey + * @abstract + * Get key info from the DVD drive. + * @discussion + * This function handles the getting of key- and encryption-related data for the drive. + * @param buffer + * A buffer containing information, as documented in the specification + * "MtFuji Commands For Multimedia Devices." + * @param keyClass + * As documented by MtFuji. See DVDKeyClass. + * @param lba + * As documented by MtFuji. + * @param agid + * As documented by MtFuji. + * @param keyFormat + * As documented by MtFuji. See DVDKeyFormat. + */ + virtual IOReturn reportKey(IOMemoryDescriptor *buffer,const DVDKeyClass keyClass, + const UInt32 lba,const UInt8 agid,const DVDKeyFormat keyFormat); + + /*! + * @function sendKey + * @abstract + * Send key info to the DVD drive. + * @discussion + * This function handles the setting of key- and encryption-related data for the drive. + * @param buffer + * A buffer containing information, as documented in the specification + * "MtFuji Commands For Multimedia Devices." + * @param keyClass + * As documented by MtFuji. See DVDKeyClass. + * @param agid + * As documented by MtFuji. + * @param keyFormat + * As documented by MtFuji. See DVDKeyFormat. + */ + virtual IOReturn sendKey(IOMemoryDescriptor *buffer,const DVDKeyClass keyClass, + const UInt8 agid,const DVDKeyFormat keyFormat); + + /*! + * @function readStructure + * @abstract + * Get control structures from the DVD media. + * @discussion + * This function handles the getting of control structure data for the media. + * @param buffer + * A buffer containing information, as documented in the specification + * "MtFuji Commands For Multimedia Devices." + * @param format + * As documented by MtFuji. See DVDStructureFormat. + * @param address + * As documented by MtFuji. + * @param layer + * As documented by MtFuji. + * @param agid + * As documented by MtFuji. + */ + virtual IOReturn readStructure(IOMemoryDescriptor *buffer,const DVDStructureFormat format, + const UInt32 address,const UInt8 layer,const UInt8 agid); /* 10.1.0 */ + +#ifdef __LP64__ + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 0); +#else /* !__LP64__ */ + OSMetaClassDeclareReservedUsed(IODVDBlockStorageDriver, 0); +#endif /* !__LP64__ */ + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 1); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 2); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 3); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 4); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 5); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 6); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 7); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 8); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 9); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 10); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 11); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 12); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 13); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 14); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 15); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 16); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 17); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 18); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 19); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 20); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 21); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 22); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 23); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 24); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 25); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 26); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 27); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 28); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 29); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 30); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 31); +}; +#endif diff --git a/i386/include/IOKit/storage/.svn/text-base/IODVDMedia.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IODVDMedia.h.svn-base new file mode 100644 index 0000000..02119c3 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IODVDMedia.h.svn-base @@ -0,0 +1,357 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IODVDMedia + * @abstract + * This header contains the IODVDMedia class definition. + */ + +#ifndef _IODVDMEDIA_H +#define _IODVDMEDIA_H + +/*! + * @defined kIODVDMediaClass + * @abstract + * kIODVDMediaClass is the name of the IODVDMedia class. + * @discussion + * kIODVDMediaClass is the name of the IODVDMedia class. + */ + +#define kIODVDMediaClass "IODVDMedia" + +/*! + * @defined kIODVDMediaTypeKey + * @abstract + * kIODVDMediaTypeKey is a property of IODVDMedia objects. It has an OSString + * value. + * @discussion + * The kIODVDMediaTypeKey property identifies the DVD media type (DVD-ROM, + * DVD-R, DVD-RW, DVD+RW, DVD-RAM, etc). See the kIODVDMediaType contants + * for possible values. + */ + +#define kIODVDMediaTypeKey "Type" + +/*! + * @defined kIODVDMediaTypeROM + * The kIODVDMediaTypeKey constant for DVD-ROM media. + */ + +#define kIODVDMediaTypeROM "DVD-ROM" + +/*! + * @defined kIODVDMediaTypeR + * The kIODVDMediaTypeKey constant for DVD Recordable (DVD-R) media. + */ + +#define kIODVDMediaTypeR "DVD-R" + +/*! + * @defined kIODVDMediaTypeRW + * The kIODVDMediaTypeKey constant for DVD ReWritable (DVD-RW) media. + */ + +#define kIODVDMediaTypeRW "DVD-RW" + +/*! + * @defined kIODVDMediaTypePlusR + * The kIODVDMediaTypeKey constant for DVD "Plus" Recordable (DVD+R) media. + */ + +#define kIODVDMediaTypePlusR "DVD+R" + +/*! + * @defined kIODVDMediaTypePlusRW + * The kIODVDMediaTypeKey constant for DVD "Plus" ReWritable (DVD+RW) media. + */ + +#define kIODVDMediaTypePlusRW "DVD+RW" + +/*! + * @defined kIODVDMediaTypeRAM + * The kIODVDMediaTypeKey constant for DVD-RAM media. + */ + +#define kIODVDMediaTypeRAM "DVD-RAM" + +/*! + * @defined kIODVDMediaTypeHDROM + * The kIODVDMediaTypeKey constant for HD DVD-ROM media. + */ + +#define kIODVDMediaTypeHDROM "HD DVD-ROM" + +/*! + * @defined kIODVDMediaTypeHDR + * The kIODVDMediaTypeKey constant for HD DVD Recordable (HD DVD-R) media. + */ + +#define kIODVDMediaTypeHDR "HD DVD-R" + +/*! + * @defined kIODVDMediaTypeHDRW + * The kIODVDMediaTypeKey constant for HD DVD ReWritable (HD DVD-RW) media. + */ + +#define kIODVDMediaTypeHDRW "HD DVD-RW" + +/*! + * @defined kIODVDMediaTypeHDRAM + * The kIODVDMediaTypeKey constant for HD DVD-RAM media. + */ + +#define kIODVDMediaTypeHDRAM "HD DVD-RAM" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IODVDBlockStorageDriver.h> +#include <IOKit/storage/IOMedia.h> + +/*! + * @class IODVDMedia + * @abstract + * The IODVDMedia class is a random-access disk device abstraction for DVDs. + * @discussion + * The IODVDMedia class is a random-access disk device abstraction for DVDs. + */ + +class IODVDMedia : public IOMedia +{ + OSDeclareDefaultStructors(IODVDMedia) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + +public: + + /* + * Obtain this object's provider. We override the superclass's method to + * return a more specific subclass of IOService -- IODVDBlockStorageDriver. + * This method serves simply as a convenience to subclass developers. + */ + + virtual IODVDBlockStorageDriver * getProvider() const; + + /* + * Compare the properties in the supplied table to this object's properties. + */ + + virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); + + /*! + * @function reportKey + * @discussion + * Issue an MMC REPORT KEY command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. Pass null for the kDVDKeyFormatAGID_Invalidate format + * case. + * @param keyClass + * As documented by MMC. + * @param address + * As documented by MMC. + * @param grantID + * As documented by MMC. + * @param format + * As documented by MMC. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn reportKey( IOMemoryDescriptor * buffer, + const DVDKeyClass keyClass, + const UInt32 address, + const UInt8 grantID, + const DVDKeyFormat format ); /* 10.1.0 */ + + /*! + * @function sendKey + * @discussion + * Issue an MMC SEND KEY command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. Pass null for the kDVDKeyFormatAGID_Invalidate format + * case. + * @param keyClass + * As documented by MMC. + * @param grantID + * As documented by MMC. + * @param format + * As documented by MMC. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn sendKey( IOMemoryDescriptor * buffer, + const DVDKeyClass keyClass, + const UInt8 grantID, + const DVDKeyFormat format ); /* 10.1.0 */ + + /*! + * @function readStructure + * @discussion + * Issue an MMC READ DVD STRUCTURE command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param format + * As documented by MMC. + * @param address + * As documented by MMC. + * @param layer + * As documented by MMC. + * @param grantID + * As documented by MMC. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readStructure( IOMemoryDescriptor * buffer, + const DVDStructureFormat format, + const UInt32 address, + const UInt8 layer, + const UInt8 grantID ); /* 10.1.0 */ + + /*! + * @function getSpeed + * @discussion + * Get the current speed used for data transfers. + * @param kilobytesPerSecond + * Returns the current speed used for data transfers, in kB/s. + * + * kDVDSpeedMin specifies the minimum speed for all DVD media (1X). + * kDVDSpeedMax specifies the maximum speed supported in hardware. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn getSpeed(UInt16 * kilobytesPerSecond); /* 10.1.0 */ + + /*! + * @function setSpeed + * @discussion + * Set the speed to be used for data transfers. + * @param kilobytesPerSecond + * Speed to be used for data transfers, in kB/s. + * + * kDVDSpeedMin specifies the minimum speed for all DVD media (1X). + * kDVDSpeedMax specifies the maximum speed supported in hardware. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn setSpeed(UInt16 kilobytesPerSecond); /* 10.1.0 */ + + /*! + * @function readDiscInfo + * @discussion + * Issue an MMC READ DISC INFORMATION command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readDiscInfo( IOMemoryDescriptor * buffer, + UInt16 * actualByteCount ); /* 10.2.0 */ + + /*! + * @function readRZoneInfo + * @discussion + * Issue an MMC READ RZONE INFORMATION (READ TRACK INFORMATION) command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param address + * As documented by MMC. + * @param addressType + * As documented by MMC. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readRZoneInfo( IOMemoryDescriptor * buffer, + UInt32 address, + DVDRZoneInfoAddressType addressType, + UInt16 * actualByteCount ); /* 10.2.0 */ + +#ifdef __LP64__ + OSMetaClassDeclareReservedUnused(IODVDMedia, 0); + OSMetaClassDeclareReservedUnused(IODVDMedia, 1); + OSMetaClassDeclareReservedUnused(IODVDMedia, 2); + OSMetaClassDeclareReservedUnused(IODVDMedia, 3); + OSMetaClassDeclareReservedUnused(IODVDMedia, 4); + OSMetaClassDeclareReservedUnused(IODVDMedia, 5); + OSMetaClassDeclareReservedUnused(IODVDMedia, 6); +#else /* !__LP64__ */ + OSMetaClassDeclareReservedUsed(IODVDMedia, 0); + OSMetaClassDeclareReservedUsed(IODVDMedia, 1); + OSMetaClassDeclareReservedUsed(IODVDMedia, 2); + OSMetaClassDeclareReservedUsed(IODVDMedia, 3); + OSMetaClassDeclareReservedUsed(IODVDMedia, 4); + OSMetaClassDeclareReservedUsed(IODVDMedia, 5); + OSMetaClassDeclareReservedUsed(IODVDMedia, 6); +#endif /* !__LP64__ */ + OSMetaClassDeclareReservedUnused(IODVDMedia, 7); + OSMetaClassDeclareReservedUnused(IODVDMedia, 8); + OSMetaClassDeclareReservedUnused(IODVDMedia, 9); + OSMetaClassDeclareReservedUnused(IODVDMedia, 10); + OSMetaClassDeclareReservedUnused(IODVDMedia, 11); + OSMetaClassDeclareReservedUnused(IODVDMedia, 12); + OSMetaClassDeclareReservedUnused(IODVDMedia, 13); + OSMetaClassDeclareReservedUnused(IODVDMedia, 14); + OSMetaClassDeclareReservedUnused(IODVDMedia, 15); + OSMetaClassDeclareReservedUnused(IODVDMedia, 16); + OSMetaClassDeclareReservedUnused(IODVDMedia, 17); + OSMetaClassDeclareReservedUnused(IODVDMedia, 18); + OSMetaClassDeclareReservedUnused(IODVDMedia, 19); + OSMetaClassDeclareReservedUnused(IODVDMedia, 20); + OSMetaClassDeclareReservedUnused(IODVDMedia, 21); + OSMetaClassDeclareReservedUnused(IODVDMedia, 22); + OSMetaClassDeclareReservedUnused(IODVDMedia, 23); + OSMetaClassDeclareReservedUnused(IODVDMedia, 24); + OSMetaClassDeclareReservedUnused(IODVDMedia, 25); + OSMetaClassDeclareReservedUnused(IODVDMedia, 26); + OSMetaClassDeclareReservedUnused(IODVDMedia, 27); + OSMetaClassDeclareReservedUnused(IODVDMedia, 28); + OSMetaClassDeclareReservedUnused(IODVDMedia, 29); + OSMetaClassDeclareReservedUnused(IODVDMedia, 30); + OSMetaClassDeclareReservedUnused(IODVDMedia, 31); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IODVDMEDIA_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IODVDMediaBSDClient.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IODVDMediaBSDClient.h.svn-base new file mode 100644 index 0000000..2258bf6 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IODVDMediaBSDClient.h.svn-base @@ -0,0 +1,197 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IODVDMEDIABSDCLIENT_H +#define _IODVDMEDIABSDCLIENT_H + +#include <sys/ioctl.h> + +#include <IOKit/storage/IODVDTypes.h> + +/* + * Definitions + * + * ioctl description + * ---------------------------- ------------------------------------------------ + * DKIOCDVDREADSTRUCTURE see IODVDMedia::readStructure() in IODVDMedia.h + * + * DKIOCDVDREADDISCINFO see IODVDMedia::readDiscInfo() in IODVDMedia.h + * DKIOCDVDREADRZONEINFO see IODVDMedia::readRZoneInfo() in IODVDMedia.h + * + * DKIOCDVDREPORTKEY see IODVDMedia::reportKey() in IODVDMedia.h + * DKIOCDVDSENDKEY see IODVDMedia::sendKey() in IODVDMedia.h + * + * DKIOCDVDGETSPEED see IODVDMedia::getSpeed() in IODVDMedia.h + * DKIOCDVDSETSPEED see IODVDMedia::setSpeed() in IODVDMedia.h + * + * in /System/Library/Frameworks/Kernel.framework/Headers/IOKit/storage/ + */ + +typedef struct +{ + uint8_t format; + + uint8_t reserved0008[3]; /* reserved, clear to zero */ + + uint32_t address; + uint8_t grantID; + uint8_t layer; + +#ifdef __LP64__ + uint8_t reserved0080[4]; /* reserved, clear to zero */ +#endif /* __LP64__ */ + + uint16_t bufferLength; + void * buffer; +} dk_dvd_read_structure_t; + +typedef struct +{ + uint8_t format; + uint8_t keyClass; + + uint8_t reserved0016[2]; /* reserved, clear to zero */ + + uint32_t address; + uint8_t grantID; + +#ifdef __LP64__ + uint8_t reserved0072[5]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0072[1]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ + + uint16_t bufferLength; + void * buffer; +} dk_dvd_report_key_t; + +typedef struct +{ + uint8_t format; + uint8_t keyClass; + + uint8_t reserved0016[6]; /* reserved, clear to zero */ + + uint8_t grantID; + +#ifdef __LP64__ + uint8_t reserved0072[5]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0072[1]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ + + uint16_t bufferLength; + void * buffer; +} dk_dvd_send_key_t; + +typedef struct +{ +#ifdef __LP64__ + uint8_t reserved0000[14]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0000[10]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ + + uint16_t bufferLength; /* actual length on return */ + void * buffer; +} dk_dvd_read_disc_info_t; + +typedef struct +{ + uint8_t reserved0000[4]; /* reserved, clear to zero */ + + uint32_t address; + uint8_t addressType; + +#ifdef __LP64__ + uint8_t reserved0072[5]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0072[1]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ + + uint16_t bufferLength; /* actual length on return */ + void * buffer; +} dk_dvd_read_rzone_info_t; + +#define DKIOCDVDREADSTRUCTURE _IOW('d', 128, dk_dvd_read_structure_t) +#define DKIOCDVDREPORTKEY _IOW('d', 129, dk_dvd_report_key_t) +#define DKIOCDVDSENDKEY _IOW('d', 130, dk_dvd_send_key_t) + +#define DKIOCDVDGETSPEED _IOR('d', 131, uint16_t) +#define DKIOCDVDSETSPEED _IOW('d', 131, uint16_t) + +#define DKIOCDVDREADDISCINFO _IOWR('d', 132, dk_dvd_read_disc_info_t) +#define DKIOCDVDREADRZONEINFO _IOWR('d', 133, dk_dvd_read_rzone_info_t) + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IODVDMedia.h> +#include <IOKit/storage/IOMediaBSDClient.h> + +/* + * Class + */ + +class IODVDMediaBSDClient : public IOMediaBSDClient +{ + OSDeclareDefaultStructors(IODVDMediaBSDClient) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + +public: + + /* + * Obtain this object's provider. We override the superclass's method + * to return a more specific subclass of IOService -- IODVDMedia. This + * method serves simply as a convenience to subclass developers. + */ + + virtual IODVDMedia * getProvider() const; + + /* + * Process a DVD-specific ioctl. + */ + + virtual int ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, proc_t proc); + + OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 0); + OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 1); + OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 2); + OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 3); + OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 4); + OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 5); + OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 6); + OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 7); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IODVDMEDIABSDCLIENT_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IODVDTypes.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IODVDTypes.h.svn-base new file mode 100644 index 0000000..039b8fb --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IODVDTypes.h.svn-base @@ -0,0 +1,451 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IODVDTYPES_H +#define _IODVDTYPES_H + +#include <IOKit/IOTypes.h> + +#pragma pack(push, 1) /* (enable 8-bit struct packing) */ + +/* + * Media Types + */ + +enum +{ + kDVDMediaTypeUnknown = 0x0200, + kDVDMediaTypeROM = 0x0202, /* DVD-ROM */ + kDVDMediaTypeRAM = 0x0203, /* DVD-RAM */ + kDVDMediaTypeR = 0x0204, /* DVD-R */ + kDVDMediaTypeRW = 0x0205, /* DVD-RW */ + kDVDMediaTypePlusRW = 0x0206, /* DVD+RW */ + kDVDMediaTypePlusR = 0x0207, /* DVD+R */ + kDVDMediaTypeHDROM = 0x0212, /* HD DVD-ROM */ + kDVDMediaTypeHDRAM = 0x0213, /* HD DVD-RAM */ + kDVDMediaTypeHDR = 0x0214, /* HD DVD-R */ + kDVDMediaTypeHDRW = 0x0215, /* HD DVD-RW */ + + kDVDMediaTypeMin = 0x0200, + kDVDMediaTypeMax = 0x02FF +}; + +typedef UInt32 DVDMediaType; + +/* + * Media Speed (kB/s) + */ + +#define kDVDSpeedMin 0x0546 +#define kDVDSpeedMax 0xFFFF + +/* + * MMC Formats + */ + +typedef UInt8 DVDCPRMRegionCode; +enum +{ + kDVDCPRMRegion1 = 0xFE, + kDVDCPRMRegion2 = 0xFD, + kDVDCPRMRegion3 = 0xFB, + kDVDCPRMRegion4 = 0xF7, + kDVDCPRMRegion5 = 0xEF, + kDVDCPRMRegion6 = 0xDF +}; + +typedef UInt8 DVDRegionalPlaybackControlScheme; +enum +{ + kDVDRegionalPlaybackControlSchemePhase1 = 0x00, + kDVDRegionalPlaybackControlSchemePhase2 = 0x01 +}; + +typedef UInt8 DVDBookType; +enum +{ + kDVDBookTypeROM = 0x0, + kDVDBookTypeRAM = 0x1, + kDVDBookTypeR = 0x2, + kDVDBookTypeRW = 0x3, + kDVDBookTypeHDROM = 0x4, + kDVDBookTypeHDRAM = 0x5, + kDVDBookTypeHDR = 0x6, + kDVDBookTypeHDRW = 0x7, + kDVDBookTypePlusRW = 0x9, + kDVDBookTypePlusR = 0xA, + kDVDBookTypePlusRWDoubleLayer = 0xD, + kDVDBookTypePlusRDoubleLayer = 0xE +}; + +#ifdef __LP64__ +typedef UInt8 DVDKeyClass; +enum +#else /* !__LP64__ */ +enum DVDKeyClass +#endif /* !__LP64__ */ +{ + kDVDKeyClassCSS_CPPM_CPRM = 0x00, + kDVDKeyClassRSSA = 0x01 +}; +#ifndef __LP64__ +typedef enum DVDKeyClass DVDKeyClass; +#endif /* !__LP64__ */ + +#ifdef __LP64__ +typedef UInt8 DVDKeyFormat; +enum +#else /* !__LP64__ */ +enum DVDKeyFormat +#endif /* !__LP64__ */ +{ + kDVDKeyFormatAGID_CSS = 0x00, + kDVDKeyFormatChallengeKey = 0x01, + kDVDKeyFormatKey1 = 0x02, + kDVDKeyFormatKey2 = 0x03, + kDVDKeyFormatTitleKey = 0x04, + kDVDKeyFormatASF = 0x05, + kDVDKeyFormatSetRegion = 0x06, + kDVDKeyFormatRegionState = 0x08, + kDVDKeyFormatAGID_CSS2 = 0x10, + kDVDKeyFormatAGID_CPRM = 0x11, + kDVDKeyFormatAGID_Invalidate = 0x3F +}; +#ifndef __LP64__ +typedef enum DVDKeyFormat DVDKeyFormat; +#endif /* !__LP64__ */ + +typedef UInt8 DVDStructureFormat; +enum +{ + kDVDStructureFormatPhysicalFormatInfo = 0x00, + kDVDStructureFormatCopyrightInfo = 0x01, + kDVDStructureFormatDiscKeyInfo = 0x02, + // skip BCA + kDVDStructureFormatManufacturingInfo = 0x04 +}; + +// Read DVD Structures Format 0x00 +struct DVDPhysicalFormatInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; +#ifdef __LITTLE_ENDIAN__ + // Byte 0 + UInt8 partVersion:4; + UInt8 bookType:4; + + // Byte 1 + UInt8 minimumRate:4; + UInt8 discSize:4; + + // Byte 2 + UInt8 layerType:4; + UInt8 trackPath:1; + UInt8 numberOfLayers:2; + UInt8 reserved2:1; + + // Byte 3 + UInt8 trackDensity:4; + UInt8 linearDensity:4; +#else /* !__LITTLE_ENDIAN__ */ + // Byte 0 + UInt8 bookType:4; + UInt8 partVersion:4; + + // Byte 1 + UInt8 discSize:4; + UInt8 minimumRate:4; + + // Byte 2 + UInt8 reserved2:1; + UInt8 numberOfLayers:2; + UInt8 trackPath:1; + UInt8 layerType:4; + + // Byte 3 + UInt8 linearDensity:4; + UInt8 trackDensity:4; +#endif /* !__LITTLE_ENDIAN__ */ + + // Bytes 4-15 + UInt8 zero1; // always 0x00 + UInt8 startingPhysicalSectorNumberOfDataArea[3]; + UInt8 zero2; // always 0x00 + UInt8 endPhysicalSectorNumberOfDataArea[3]; + UInt8 zero3; // always 0x00 + UInt8 endSectorNumberInLayerZero[3]; + + // Byte 16 +#ifdef __LITTLE_ENDIAN__ + UInt8 reserved1:7; + UInt8 bcaFlag:1; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 bcaFlag:1; + UInt8 reserved1:7; +#endif /* !__LITTLE_ENDIAN__ */ + + // Bytes 17-2047 + UInt8 mediaSpecific[2031]; +}; +typedef struct DVDPhysicalFormatInfo DVDPhysicalFormatInfo; + +// Read DVD Structures Format 0x01 +struct DVDCopyrightInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; + UInt8 copyrightProtectionSystemType; + DVDCPRMRegionCode regionMask; + UInt8 reserved2[2]; +}; +typedef struct DVDCopyrightInfo DVDCopyrightInfo; + +// Read DVD Structures Format 0x02 +struct DVDDiscKeyInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; + UInt8 discKeyStructures[2048]; +}; +typedef struct DVDDiscKeyInfo DVDDiscKeyInfo; + +// Read DVD Structures Format 0x04 +struct DVDManufacturingInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; + UInt8 discManufacturingInfo[2048]; +}; +typedef struct DVDManufacturingInfo DVDManufacturingInfo; + +// ReportKey Format 0x00 +struct DVDAuthenticationGrantIDInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; + UInt8 reserved2[3]; +#ifdef __LITTLE_ENDIAN__ + UInt8 reservedBits:6; + UInt8 grantID:2; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 grantID:2; + UInt8 reservedBits:6; +#endif /* !__LITTLE_ENDIAN__ */ +}; +typedef struct DVDAuthenticationGrantIDInfo DVDAuthenticationGrantIDInfo; + +// ReportKey and SendKey Format 0x01 +struct DVDChallengeKeyInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; + UInt8 challengeKeyValue[10]; + UInt8 reserved2[2]; +}; +typedef struct DVDChallengeKeyInfo DVDChallengeKeyInfo; + +// ReportKey Format 0x02 +struct DVDKey1Info +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; + UInt8 key1Value[5]; + UInt8 reserved2[3]; +}; +typedef struct DVDKey1Info DVDKey1Info; + +// SendKey Format 0x03 +struct DVDKey2Info +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; + UInt8 key2Value[5]; + UInt8 reserved2[3]; +}; +typedef struct DVDKey2Info DVDKey2Info; + +// ReportKey Format 0x04 +struct DVDTitleKeyInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; +#ifdef __LITTLE_ENDIAN__ + UInt8 CP_MOD:4; + UInt8 CGMS:2; + UInt8 CP_SEC:1; + UInt8 CPM:1; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 CPM:1; + UInt8 CP_SEC:1; + UInt8 CGMS:2; + UInt8 CP_MOD:4; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 titleKeyValue[5]; + UInt8 reserved2[2]; +}; +typedef struct DVDTitleKeyInfo DVDTitleKeyInfo; + +// ReportKey Format 0x05 +struct DVDAuthenticationSuccessFlagInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; + UInt8 reserved2[3]; +#ifdef __LITTLE_ENDIAN__ + UInt8 successFlag:1; + UInt8 reservedBits:7; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 reservedBits:7; + UInt8 successFlag:1; +#endif /* !__LITTLE_ENDIAN__ */ +}; +typedef struct DVDAuthenticationSuccessFlagInfo DVDAuthenticationSuccessFlagInfo; + +// ReportKey Format 0x08 +struct DVDRegionPlaybackControlInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; +#ifdef __LITTLE_ENDIAN__ + UInt8 numberUserResets:3; + UInt8 numberVendorResets:3; + UInt8 typeCode:2; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 typeCode:2; + UInt8 numberVendorResets:3; + UInt8 numberUserResets:3; +#endif /* !__LITTLE_ENDIAN__ */ + DVDCPRMRegionCode driveRegion; + DVDRegionalPlaybackControlScheme rpcScheme; + UInt8 reserved2; +}; +typedef struct DVDRegionPlaybackControlInfo DVDRegionPlaybackControlInfo; + +// Read Disc Information Format +struct DVDDiscInfo +{ + UInt16 dataLength; +#ifdef __LITTLE_ENDIAN__ + UInt8 discStatus:2; + UInt8 stateOfLastBorder:2; + UInt8 erasable:1; + UInt8 reserved:3; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 reserved:3; + UInt8 erasable:1; + UInt8 stateOfLastBorder:2; + UInt8 discStatus:2; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 reserved2; + UInt8 numberOfBordersLSB; + UInt8 firstRZoneNumberInLastBorderLSB; + UInt8 lastRZoneNumberInLastBorderLSB; +#ifdef __LITTLE_ENDIAN__ + UInt8 reserved3:5; + UInt8 unrestrictedUse:1; + UInt8 discBarCodeValid:1; + UInt8 reserved4:1; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 reserved4:1; + UInt8 discBarCodeValid:1; + UInt8 unrestrictedUse:1; + UInt8 reserved3:5; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 reserved5; + UInt8 numberOfBordersMSB; + UInt8 firstRZoneNumberInLastBorderMSB; + UInt8 lastRZoneNumberInLastBorderMSB; + UInt8 reserved6[4]; + UInt8 reserved7[4]; + UInt8 reserved8[4]; + UInt8 discBarCode[8]; + UInt8 reserved9; + UInt8 numberOfOPCTableEntries; + UInt8 opcTableEntries[0]; +}; +typedef struct DVDDiscInfo DVDDiscInfo; + +// Read RZone Information Address Types +typedef UInt8 DVDRZoneInfoAddressType; +enum +{ + kDVDRZoneInfoAddressTypeLBA = 0x00, + kDVDRZoneInfoAddressTypeRZoneNumber = 0x01, + kDVDRZoneInfoAddressTypeBorderNumber = 0x02, +}; + +// Read RZone Information Format +struct DVDRZoneInfo +{ + UInt16 dataLength; + UInt8 rzoneNumberLSB; + UInt8 borderNumberLSB; + UInt8 reserved; +#ifdef __LITTLE_ENDIAN__ + UInt8 reserved2:4; + UInt8 copy:1; + UInt8 damage:1; + UInt8 reserved3:2; + + UInt8 reserved4:4; + UInt8 restrictedOverwrite:1; + UInt8 incremental:1; + UInt8 blank:1; + UInt8 reservedRZone:1; + + UInt8 nextWritableAddressValid:1; + UInt8 lastRecordedAddressValid:1; + UInt8 reserved5:6; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 reserved3:2; + UInt8 damage:1; + UInt8 copy:1; + UInt8 reserved2:4; + + UInt8 reservedRZone:1; + UInt8 blank:1; + UInt8 incremental:1; + UInt8 restrictedOverwrite:1; + UInt8 reserved4:4; + + UInt8 reserved5:6; + UInt8 lastRecordedAddressValid:1; + UInt8 nextWritableAddressValid:1; +#endif /* !__LITTLE_ENDIAN__ */ + UInt32 rzoneStartAddress; + UInt32 nextWritableAddress; + UInt32 freeBlocks; + UInt32 blockingFactor; + UInt32 rzoneSize; + UInt32 lastRecordedAddress; + UInt8 rzoneNumberMSB; + UInt8 borderNumberMSB; + UInt8 reserved6; + UInt8 reserved7; +}; +typedef struct DVDRZoneInfo DVDRZoneInfo; + +#pragma pack(pop) /* (reset to default struct packing) */ + +#endif /* _IODVDTYPES_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOFDiskPartitionScheme.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOFDiskPartitionScheme.h.svn-base new file mode 100644 index 0000000..7f96255 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOFDiskPartitionScheme.h.svn-base @@ -0,0 +1,105 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * This header contains the IOFDiskPartitionScheme class definition. + */ + +#ifndef _IOFDISKPARTITIONSCHEME_H +#define _IOFDISKPARTITIONSCHEME_H + +#include <IOKit/IOTypes.h> + +/* + * kIOFDiskPartitionSchemeClass is the name of the IOFDiskPartitionScheme class. + */ + +#define kIOFDiskPartitionSchemeClass "IOFDiskPartitionScheme" + +/* + * FDisk Partition Map Definitions + */ + +#pragma pack(push, 1) /* (enable 8-bit struct packing) */ + +/* Structure constants. */ + +#define DISK_BLK0SZ sizeof(struct disk_blk0) /* (size of partition map) */ +#define DISK_BOOTSZ 446 /* (size of boot code in map) */ +#define DISK_NPART 4 /* (number of entries in map) */ + +/* Partition map entry. */ + +struct fdisk_part +{ + UInt8 bootid; /* (is active boot partition?) */ + UInt8 beghead; /* (beginning head) */ + UInt8 begsect; /* (beginning sector; beginning cylinder, high 2 bits) */ + UInt8 begcyl; /* (beginning cylinder, low 8 bits) */ + UInt8 systid; /* (type) */ + UInt8 endhead; /* (ending head) */ + UInt8 endsect; /* (ending sector; ending cylinder, high 2 bits) */ + UInt8 endcyl; /* (ending cylinder, low 8 bits) */ + UInt32 relsect; /* (block start) */ + UInt32 numsect; /* (block count) */ +}; + +/* Partition map, as found in block zero of the disk (or extended partition). */ + +struct disk_blk0 +{ + UInt8 bootcode[DISK_BOOTSZ]; /* (boot code) */ + struct fdisk_part parts[DISK_NPART]; /* (partition entries) */ + UInt16 signature; /* (unique signature for map) */ +}; + +/* Partition map signature (signature). */ + +#define DISK_SIGNATURE 0xAA55 + +/* Partition map entry types (systid). */ + +#define FDISK_PARTITION_TYPE_01 "DOS_FAT_12" +#define FDISK_PARTITION_TYPE_04 "DOS_FAT_16_S" +#define FDISK_PARTITION_TYPE_06 "DOS_FAT_16" +#define FDISK_PARTITION_TYPE_07 "Windows_NTFS" +#define FDISK_PARTITION_TYPE_0B "DOS_FAT_32" +#define FDISK_PARTITION_TYPE_0C "Windows_FAT_32" +#define FDISK_PARTITION_TYPE_0E "Windows_FAT_16" +#define FDISK_PARTITION_TYPE_42 "Windows_LDM" +#define FDISK_PARTITION_TYPE_82 "Linux_Swap" +#define FDISK_PARTITION_TYPE_83 "Linux" +#define FDISK_PARTITION_TYPE_8E "Linux_LVM" +#define FDISK_PARTITION_TYPE_A5 "FreeBSD" +#define FDISK_PARTITION_TYPE_A6 "OpenBSD" +#define FDISK_PARTITION_TYPE_A7 "Apple_Rhapsody_UFS" +#define FDISK_PARTITION_TYPE_A8 "Apple_UFS" +#define FDISK_PARTITION_TYPE_A9 "NetBSD" +#define FDISK_PARTITION_TYPE_AB "Apple_Boot" +#define FDISK_PARTITION_TYPE_AE "Apple_Encrypted" +#define FDISK_PARTITION_TYPE_AF "Apple_HFS" +#define FDISK_PARTITION_TYPE_FD "Linux_RAID" + +#pragma pack(pop) /* (reset to default struct packing) */ + +#endif /* !_IOFDISKPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOFilterScheme.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOFilterScheme.h.svn-base new file mode 100644 index 0000000..406b596 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOFilterScheme.h.svn-base @@ -0,0 +1,289 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOFilterScheme + * @abstract + * This header contains the IOFilterScheme class definition. + */ + +#ifndef _IOFILTERSCHEME_H +#define _IOFILTERSCHEME_H + +/*! + * @defined kIOFilterSchemeClass + * @abstract + * The name of the IOFilterScheme class. + * @discussion + * kIOFilterSchemeClass is the name of the IOFilterScheme class. + */ + +#define kIOFilterSchemeClass "IOFilterScheme" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOMedia.h> +#include <IOKit/storage/IOStorage.h> + +/*! + * @class IOFilterScheme + * @abstract + * The common base class for all filter scheme + * objects. + * @discussion + * The IOFilterScheme class is the common base class for all filter scheme + * objects. It extends the IOStorage class by implementing the appropriate + * open and close semantics for filter objects (standard semantics are act + * as a relay for incoming opens, producing one outgoing open for each + * incoming open). It also implements the default read and write semantics, + * which pass all reads and writes through to the provider media unprocessed. + * For simple schemes, the default behavior is sufficient. More complex + * filter schemes such as RAID will want to do extra processing for reads + * and writes. + */ + +class IOFilterScheme : public IOStorage +{ + OSDeclareDefaultStructors(IOFilterScheme); + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + + /*! + * @function handleOpen + * @discussion + * The handleOpen method grants or denies permission to access this object + * to an interested client. The argument is an IOStorageAccess value that + * specifies the level of access desired -- reader or reader-writer. + * + * This method can be invoked to upgrade or downgrade the access level for + * an existing client as well. The previous access level will prevail for + * upgrades that fail, of course. A downgrade should never fail. If the + * new access level should be the same as the old for a given client, this + * method will do nothing and return success. In all cases, one, singular + * close-per-client is expected for all opens-per-client received. + * + * This implementation replaces the IOService definition of handleOpen(). + * @param client + * Client requesting the open. + * @param options + * Options for the open. Set to zero. + * @param access + * Access level for the open. Set to kIOStorageAccessReader or + * kIOStorageAccessReaderWriter. + * @result + * Returns true if the open was successful, false otherwise. + */ + + virtual bool handleOpen(IOService * client, + IOOptionBits options, + void * access); + + /*! + * @function handleIsOpen + * @discussion + * The handleIsOpen method determines whether the specified client, or any + * client if none is specified, presently has an open on this object. + * + * This implementation replaces the IOService definition of handleIsOpen(). + * @param client + * Client to check the open state of. Set to zero to check the open state + * of all clients. + * @result + * Returns true if the client was (or clients were) open, false otherwise. + */ + + virtual bool handleIsOpen(const IOService * client) const; + + /*! + * @function handleClose + * @discussion + * The handleClose method closes the client's access to this object. + * + * This implementation replaces the IOService definition of handleClose(). + * @param client + * Client requesting the close. + * @param options + * Options for the close. Set to zero. + */ + + virtual void handleClose(IOService * client, IOOptionBits options); + +public: + + using IOStorage::read; + using IOStorage::write; + + /*! + * @function read + * @discussion + * Read data from the storage object at the specified byte offset into the + * specified buffer, asynchronously. When the read completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the read. + * + * For simple filter schemes, the default behavior is to simply pass the + * read through to the provider media. More complex filter schemes such + * as RAID will need to do extra processing here. + * @param client + * Client requesting the read. + * @param byteStart + * Starting byte offset for the data transfer. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + * @param completion + * Completion routine to call once the data transfer is complete. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + */ + + virtual void read(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); + + /*! + * @function write + * @discussion + * Write data into the storage object at the specified byte offset from the + * specified buffer, asynchronously. When the write completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the write. + * + * For simple filter schemes, the default behavior is to simply pass the + * write through to the provider media. More complex filter schemes such + * as RAID will need to do extra processing here. + * @param client + * Client requesting the write. + * @param byteStart + * Starting byte offset for the data transfer. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + * @param completion + * Completion routine to call once the data transfer is complete. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + */ + + virtual void write(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); + + /*! + * @function synchronizeCache + * @discussion + * Flush the cached data in the storage object, if any, synchronously. + * @param client + * Client requesting the cache synchronization. + * @result + * Returns the status of the cache synchronization. + */ + + virtual IOReturn synchronizeCache(IOService * client); + + /*! + * @function discard + * @discussion + * Delete unused data from the storage object at the specified byte offset, + * synchronously. + * @param client + * Client requesting the operation. + * @param byteStart + * Starting byte offset for the operation. + * @param byteCount + * Size of the operation. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn discard(IOService * client, + UInt64 byteStart, + UInt64 byteCount); + + /* + * Obtain this object's provider. We override the superclass's method + * to return a more specific subclass of OSObject -- an IOMedia. This + * method serves simply as a convenience to subclass developers. + */ + + virtual IOMedia * getProvider() const; + + OSMetaClassDeclareReservedUnused(IOFilterScheme, 0); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 1); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 2); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 3); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 4); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 5); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 6); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 7); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 8); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 9); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 10); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 11); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 12); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 13); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 14); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 15); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 16); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 17); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 18); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 19); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 20); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 21); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 22); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 23); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 24); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 25); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 26); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 27); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 28); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 29); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 30); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 31); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOFILTERSCHEME_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOFireWireStorageCharacteristics.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOFireWireStorageCharacteristics.h.svn-base new file mode 100644 index 0000000..710f29f --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOFireWireStorageCharacteristics.h.svn-base @@ -0,0 +1,63 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ +#define _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ + +// +// Bridge Characteristics - Characteristics defined for FireWire bridges. +// + +/*! +@defined kIOPropertyBridgeCharacteristicsKey +@discussion This key is used to define Bridge Characteristics for a particular +devices's bridge chipset. It has an associated dictionary which lists the +bridge characteristics. + +Requirement: Optional + +Example: +<pre> +@textblock +<dict> + <key>Bridge Characteristics</key> + <dict> + <key>Bridge Vendor Name</key> + <string>Oxford Semiconductor</string> + <key>Bridge Model Name</key> + <string>FW911</string> + <key>Bridge Revision Level</key> + <string>3.7</string> + </dict> +</dict> +@/textblock +</pre> +*/ + +#define kIOPropertyBridgeCharacteristicsKey "Bridge Characteristics" +#define kIOPropertyBridgeVendorNameKey "Bridge Vendor Name" +#define kIOPropertyBridgeModelNameKey "Bridge Model Name" +#define kIOPropertyBridgeRevisionLevelKey "Bridge Revision Level" + +#endif /* _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ */ \ No newline at end of file diff --git a/i386/include/IOKit/storage/.svn/text-base/IOGUIDPartitionScheme.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOGUIDPartitionScheme.h.svn-base new file mode 100644 index 0000000..3e197d0 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOGUIDPartitionScheme.h.svn-base @@ -0,0 +1,90 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * This header contains the IOGUIDPartitionScheme class definition. + */ + +#ifndef _IOGUIDPARTITIONSCHEME_H +#define _IOGUIDPARTITIONSCHEME_H + +#include <IOKit/IOTypes.h> + +typedef unsigned char uuid_t[16]; +/* + * kIOGUIDPartitionSchemeClass is the name of the IOGUIDPartitionScheme class. + */ + +#define kIOGUIDPartitionSchemeClass "IOGUIDPartitionScheme" + + +#pragma pack(push, 1) /* (enable 8-bit struct packing) */ + +/* Partition map. */ + +struct gpt_hdr +{ + uint8_t hdr_sig[8]; + uint32_t hdr_revision; + uint32_t hdr_size; + uint32_t hdr_crc_self; + uint32_t __reserved; + uint64_t hdr_lba_self; + uint64_t hdr_lba_alt; + uint64_t hdr_lba_start; + uint64_t hdr_lba_end; + uuid_t hdr_uuid; + uint64_t hdr_lba_table; + uint32_t hdr_entries; + uint32_t hdr_entsz; + uint32_t hdr_crc_table; + uint32_t padding; +}; + +/* Partition map entry. */ + +struct gpt_ent +{ + uuid_t ent_type; + uuid_t ent_uuid; + uint64_t ent_lba_start; + uint64_t ent_lba_end; + uint64_t ent_attr; + uint16_t ent_name[36]; +}; + +/* Partition map signature (hdr_sig). */ + +#define GPT_HDR_SIG "EFI PART" + +/* Partition map version (hdr_revision). */ + +#define GPT_HDR_REVISION 0x00010000 + +/* Partition map entry flags (ent_attr). */ + +#define GPT_ENT_ATTR_PLATFORM 0x00000001 + +#pragma pack(pop) /* (reset to default struct packing) */ + +#endif /* !_IOGUIDPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOMedia.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOMedia.h.svn-base new file mode 100644 index 0000000..64052ec --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOMedia.h.svn-base @@ -0,0 +1,231 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOMedia + * @abstract + * This header contains the IOMedia class definition. + */ + +#ifndef _IOMEDIA_H +#define _IOMEDIA_H + +#include <IOKit/IOTypes.h> + +/*! + * @defined kIOMediaClass + * @abstract + * The name of the IOMedia class. + */ + +#define kIOMediaClass "IOMedia" + +/*! + * @defined kIOMediaContentKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaContentKey property has an OSString + * value and contains a description of the media's + * contents. The description is the same as the hint at the time of the + * object's creation, but it is possible that the description has been overridden + * by a client (which has probed the media and identified the content correctly) + * of the media object. It is more accurate than the hint for this reason. The + * string is formed in the likeness of Apple's "Apple_HFS" strings or in the + * likeness of a UUID. + */ + +#define kIOMediaContentKey "Content" + +/*! + * @defined kIOMediaContentHintKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaContentHintKey property has an OSString + * value and contains a hint of the media's contents. + * The hint is set at the time of the object's creation, should the creator have + * a clue as to what it may contain. The hint string does not change for the + * lifetime of the object and is formed in the likeness of Apple's "Apple_HFS" + * strings or in the likeness of a UUID. + */ + +#define kIOMediaContentHintKey "Content Hint" + +/*! + * @defined kIOMediaEjectableKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaEjectableKey property has an OSBoolean + * value and describes whether the media is ejectable + * from the drive mechanism under software control. Implies IOMediaRemovable + * is also true. + */ + +#define kIOMediaEjectableKey "Ejectable" + +/*! + * @defined kIOMediaLeafKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaLeafKey property has an OSBoolean value and describes whether the media is a leaf, that is, + * it is the deepest media object in this branch of the I/O Registry. + */ + +#define kIOMediaLeafKey "Leaf" + +/*! + * @defined kIOMediaOpenKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaOpenKey property has an OSBoolean value and describes whether + * a client presently has an open on this media. + */ + +#define kIOMediaOpenKey "Open" + +/*! + * @defined kIOMediaPreferredBlockSizeKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaPreferredBlockSizeKey property has an + * OSNumber value and describes the media's natural + * block size in bytes. This information is useful to clients that want to + * optimize access to the media. + */ + +#define kIOMediaPreferredBlockSizeKey "Preferred Block Size" + +/*! + * @defined kIOMediaRemovableKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaRemovableKey property has an OSBoolean + * value and describes whether the media is removable + * from the drive mechanism. + */ + +#define kIOMediaRemovableKey "Removable" + +/*! + * @defined kIOMediaSizeKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaSizeKey property has an OSNumber value and describes the total length of the media in + * bytes. + */ + +#define kIOMediaSizeKey "Size" + +/*! + * @defined kIOMediaUUIDKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaUUIDKey property has an OSString value and contains a persistent + * Universal Unique Identifier for the media if such an identifier is available. + */ + +#define kIOMediaUUIDKey "UUID" + +/*! + * @defined kIOMediaWholeKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaWholeKey property has an OSBoolean + * value and describes whether the media is whole, that is, + * it represents the whole disk (the physical disk, or a virtual replica + * thereof). + */ + +#define kIOMediaWholeKey "Whole" + +/*! + * @defined kIOMediaWritableKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaWritableKey property has an OSBoolean + * value and describes whether the media is writable. + */ + +#define kIOMediaWritableKey "Writable" + +/*! + * @defined kIOMediaContentMaskKey + * @abstract + * A property of IOMedia clients. + * @discussion + * The kIOMediaContentMaskKey property has an OSString + * value and must exist in all IOMedia clients that + * drive new content (that is, produce new media objects). When the client + * matches against the provider media, the value of the client's + * kIOMediaContentMaskKey property is used to replace the provider's + * kIOMediaContentKey property. + */ + +#define kIOMediaContentMaskKey "Content Mask" + +/*! + * @defined kIOMediaIconKey + * @abstract + * A property of any object in the media stack. + * @discussion + * kIOMediaIconKey is a property of any object in the media stack that wishes + * to override the default icon shown for the media objects in the stack. It + * is usually defined in a provider object below the media object. It has an + * OSDictionary value, with properties identical to the kIOIconKey definition, + * that is, kCFBundleIdentifierKey and kIOBundleResourceFileKey. + */ + +#define kIOMediaIconKey "IOMediaIcon" + +/*! + * @enum IOMediaAttributeMask + * @discussion + * The IOMediaAttributeMask bit mask describes various attributes of + * the media object, such as its ejectability and its removability. + * @constant kIOMediaAttributeEjectableMask + * Indicates whether the media is ejectable from the drive mechanism + * under software control. Implies kIOMediaAttributeRemovableMask. + * @constant kIOMediaAttributeRemovableMask + * Indicates whether the media is removable from the drive mechanism. + */ + +enum +{ + kIOMediaAttributeEjectableMask = 0x00000001, + kIOMediaAttributeRemovableMask = 0x00000002, + kIOMediaAttributeReservedMask = 0xFFFFFFFC +}; + +typedef UInt32 IOMediaAttributeMask; + +#endif /* !_IOMEDIA_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOMediaBSDClient.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOMediaBSDClient.h.svn-base new file mode 100644 index 0000000..56a3117 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOMediaBSDClient.h.svn-base @@ -0,0 +1,29 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOMEDIABSDCLIENT_H +#define _IOMEDIABSDCLIENT_H + +#include <sys/disk.h> + +#endif /* !_IOMEDIABSDCLIENT_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOPartitionScheme.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOPartitionScheme.h.svn-base new file mode 100644 index 0000000..7a1de37 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOPartitionScheme.h.svn-base @@ -0,0 +1,373 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOPartitionScheme + * @abstract + * This header contains the IOPartitionScheme class definition. + */ + +#ifndef _IOPARTITIONSCHEME_H +#define _IOPARTITIONSCHEME_H + +/*! + * @defined kIOPartitionSchemeClass + * @abstract + * The name of the IOPartitionScheme class. + * @discussion + * kIOPartitionSchemeClass is the name of the IOPartitionScheme class. + */ + +#define kIOPartitionSchemeClass "IOPartitionScheme" + +/*! + * @defined kIOMediaLiveKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaLiveKey property has an OSBoolean + * value and is placed into an IOMedia instance + * created via the partition scheme. It describes whether the + * partition is live, that is, it is up-to-date with respect + * to the on-disk partition table. + */ + +#define kIOMediaLiveKey "Live" + +/*! + * @defined kIOMediaPartitionIDKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaPartitionIDKey property has an OSNumber + * value and is placed into an IOMedia instance + * created via the partition scheme. It is an ID that differentiates one + * partition from the other (within a given scheme). It is typically an index + * into the on-disk partition table. + */ + +#define kIOMediaPartitionIDKey "Partition ID" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOMedia.h> +#include <IOKit/storage/IOStorage.h> + +/*! + * @class IOPartitionScheme + * @abstract + * The common base class for all partition scheme + * objects. + * @discussion + * The IOPartitionScheme class is the common base class for all partition scheme + * objects. It extends the IOStorage class by implementing the appropriate open + * and close semantics for partition objects (standard semantics are to act as a + * multiplexor for incoming opens, producing one outgoing open with the correct + * access). It also implements the default read and write semantics, which pass + * all reads and writes through to the provider media unprocessed. For simple + * schemes, the default behavior is sufficient. More complex partition schemes + * such as RAID will want to do extra processing for reads and writes. + */ + +class IOPartitionScheme : public IOStorage +{ + OSDeclareDefaultStructors(IOPartitionScheme); + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + + IOStorageAccess _openLevel; + OSSet * _openReaders; + OSSet * _openReaderWriters; + + /* + * Free all of this object's outstanding resources. + */ + + virtual void free(); + + /*! + * @function handleOpen + * @discussion + * The handleOpen method grants or denies permission to access this object + * to an interested client. The argument is an IOStorageAccess value that + * specifies the level of access desired -- reader or reader-writer. + * + * This method can be invoked to upgrade or downgrade the access level for + * an existing client as well. The previous access level will prevail for + * upgrades that fail, of course. A downgrade should never fail. If the + * new access level should be the same as the old for a given client, this + * method will do nothing and return success. In all cases, one, singular + * close-per-client is expected for all opens-per-client received. + * + * This implementation replaces the IOService definition of handleOpen(). + * @param client + * Client requesting the open. + * @param options + * Options for the open. Set to zero. + * @param access + * Access level for the open. Set to kIOStorageAccessReader or + * kIOStorageAccessReaderWriter. + * @result + * Returns true if the open was successful, false otherwise. + */ + + virtual bool handleOpen(IOService * client, + IOOptionBits options, + void * access); + + /*! + * @function handleIsOpen + * @discussion + * The handleIsOpen method determines whether the specified client, or any + * client if none is specified, presently has an open on this object. + * + * This implementation replaces the IOService definition of handleIsOpen(). + * @param client + * Client to check the open state of. Set to zero to check the open state + * of all clients. + * @result + * Returns true if the client was (or clients were) open, false otherwise. + */ + + virtual bool handleIsOpen(const IOService * client) const; + + /*! + * @function handleClose + * @discussion + * The handleClose method closes the client's access to this object. + * + * This implementation replaces the IOService definition of handleClose(). + * @param client + * Client requesting the close. + * @param options + * Options for the close. Set to zero. + */ + + virtual void handleClose(IOService * client, IOOptionBits options); + + /* + * Attach the given media object to the device tree plane. + */ + +#ifdef __LP64__ + virtual bool attachMediaObjectToDeviceTree(IOMedia * media); +#else /* !__LP64__ */ + virtual bool attachMediaObjectToDeviceTree(IOMedia * media, + IOOptionBits options = 0); /* 10.5.0 */ +#endif /* !__LP64__ */ + + /* + * Detach the given media object from the device tree plane. + */ + +#ifdef __LP64__ + virtual void detachMediaObjectFromDeviceTree(IOMedia * media); +#else /* !__LP64__ */ + virtual void detachMediaObjectFromDeviceTree(IOMedia * media, + IOOptionBits options = 0); /* 10.5.0 */ +#endif /* !__LP64__ */ + + /* + * Updates a set of existing partitions, represented by partitionsOld, + * with possible updates from a rescan of the disk, represented by + * partitionsNew. It returns a new set of partitions with the results, + * removing partitions from partitionsOld where applicable, adding + * partitions from partitionsNew where applicable, and folding in property + * changes to partitions from partitionsNew into partitionsOld where + * applicable. + */ + + virtual OSSet * juxtaposeMediaObjects(OSSet * partitionsOld, + OSSet * partitionsNew); /* 10.5.0 */ + +public: + + using IOStorage::read; + using IOStorage::write; + + /* + * Initialize this object's minimal state. + */ + + virtual bool init(OSDictionary * properties = 0); + + /*! + * @function read + * @discussion + * Read data from the storage object at the specified byte offset into the + * specified buffer, asynchronously. When the read completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the read. + * + * For simple partition schemes, the default behavior is to simply pass the + * read through to the provider media. More complex partition schemes such + * as RAID will need to do extra processing here. + * @param client + * Client requesting the read. + * @param byteStart + * Starting byte offset for the data transfer. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + * @param completion + * Completion routine to call once the data transfer is complete. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + */ + + virtual void read(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); + + /*! + * @function write + * @discussion + * Write data into the storage object at the specified byte offset from the + * specified buffer, asynchronously. When the write completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the write. + * + * For simple partition schemes, the default behavior is to simply pass the + * write through to the provider media. More complex partition schemes such + * as RAID will need to do extra processing here. + * @param client + * Client requesting the write. + * @param byteStart + * Starting byte offset for the data transfer. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + * @param completion + * Completion routine to call once the data transfer is complete. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + */ + + virtual void write(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); + + /*! + * @function synchronizeCache + * @discussion + * Flush the cached data in the storage object, if any, synchronously. + * @param client + * Client requesting the cache synchronization. + * @result + * Returns the status of the cache synchronization. + */ + + virtual IOReturn synchronizeCache(IOService * client); + + /*! + * @function discard + * @discussion + * Delete unused data from the storage object at the specified byte offset, + * synchronously. + * @param client + * Client requesting the operation. + * @param byteStart + * Starting byte offset for the operation. + * @param byteCount + * Size of the operation. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn discard(IOService * client, + UInt64 byteStart, + UInt64 byteCount); + + /* + * Obtain this object's provider. We override the superclass's method + * to return a more specific subclass of OSObject -- an IOMedia. This + * method serves simply as a convenience to subclass developers. + */ + + virtual IOMedia * getProvider() const; + +#ifdef __LP64__ + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 0); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 1); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 2); +#else /* !__LP64__ */ + OSMetaClassDeclareReservedUsed(IOPartitionScheme, 0); + OSMetaClassDeclareReservedUsed(IOPartitionScheme, 1); + OSMetaClassDeclareReservedUsed(IOPartitionScheme, 2); +#endif /* !__LP64__ */ + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 3); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 4); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 5); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 6); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 7); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 8); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 9); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 10); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 11); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 12); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 13); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 14); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 15); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 16); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 17); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 18); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 19); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 20); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 21); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 22); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 23); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 24); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 25); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 26); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 27); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 28); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 29); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 30); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 31); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOStorage.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOStorage.h.svn-base new file mode 100644 index 0000000..d5725c2 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOStorage.h.svn-base @@ -0,0 +1,217 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOStorage + * @abstract + * This header contains the IOStorage class definition. + */ + +#ifndef _IOSTORAGE_H +#define _IOSTORAGE_H + +#include <IOKit/IOTypes.h> + +/*! + * @defined kIOStorageClass + * @abstract + * The name of the IOStorage class. + */ + +#define kIOStorageClass "IOStorage" + +/*! + * @defined kIOStorageCategory + * @abstract + * kIOStorageCategory is a value for IOService's kIOMatchCategoryKey property. + * @discussion + * The kIOStorageCategory value is the standard value for the IOService property + * kIOMatchCategoryKey ("IOMatchCategory") for all storage drivers. All storage + * objects that expect to drive new content (that is, produce new media objects) + * are expected to compete within the kIOStorageCategory namespace. + * + * See the IOService documentation for more information on match categories. + */ + +#define kIOStorageCategory "IOStorage" /* (as IOMatchCategory) */ + +/*! + * @defined kIOStorageFeaturesKey + * @abstract + * A property of any object in the storage stack. + * @discussion + * kIOStorageFeaturesKey is a property of any object in the storage stack that + * wishes to express support of additional features, such as Force Unit Access. + * It is typically defined in the device object below the block storage driver + * object. It has an OSDictionary value, where each entry describes one given + * feature. + */ + +#define kIOStorageFeaturesKey "IOStorageFeatures" + +/*! + * @defined kIOStorageFeatureDiscard + * @abstract + * Describes the presence of the Discard feature. + * @discussion + * This property describes the ability of the storage stack to delete unused + * data from the media. It is one of the feature entries listed under the top- + * level kIOStorageFeaturesKey property table. It has an OSBoolean value. + */ + +#define kIOStorageFeatureDiscard "Discard" + +/*! + * @defined kIOStorageFeatureForceUnitAccess + * @abstract + * Describes the presence of the Force Unit Access feature. + * @discussion + * This property describes the ability of the storage stack to force a request + * to access the media. It is one of the feature entries listed under the top- + * level kIOStorageFeaturesKey property table. It has an OSBoolean value. + */ + +#define kIOStorageFeatureForceUnitAccess "Force Unit Access" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/assert.h> +#include <IOKit/IOMemoryDescriptor.h> +#include <IOKit/IOService.h> + +/*! + * @enum IOStorageAccess + * @discussion + * The IOStorageAccess enumeration describes the possible access levels for open + * requests. + * @constant kIOStorageAccessNone + * No access is requested; should not be passed to open(). + * @constant kIOStorageAccessReader + * Read-only access is requested. + * @constant kIOStorageAccessReaderWriter + * Read and write access is requested. + * @constant kIOStorageAccessSharedLock + * Shared access is requested. + * @constant kIOStorageAccessExclusiveLock + * Exclusive access is requested. + */ + +enum +{ + kIOStorageAccessNone = 0x00, + kIOStorageAccessReader = 0x01, + kIOStorageAccessReaderWriter = 0x03, + kIOStorageAccessSharedLock = 0x04, + kIOStorageAccessExclusiveLock = 0x08 +}; + +typedef UInt32 IOStorageAccess; + +/*! + * @enum IOStorageOptions + * @discussion + * Options for read and write storage requests. + * @constant kIOStorageOptionForceUnitAccess + * Force the request to access the media. + */ + +enum +{ + kIOStorageOptionNone = 0x00000000, + kIOStorageOptionForceUnitAccess = 0x00000001, + kIOStorageOptionReserved = 0xFFFFFFFE +}; + +typedef UInt32 IOStorageOptions; + +/*! + * @struct IOStorageAttributes + * @discussion + * Attributes of read and write storage requests. + * @field options + * Options for the request. See IOStorageOptions. + * @field reserved + * Reserved for future use. Set to zero. + */ + +struct IOStorageAttributes +{ + IOStorageOptions options; + UInt32 reserved0032; + UInt64 reserved0064; +#ifdef __LP64__ + UInt64 reserved0128; + UInt64 reserved0192; +#endif /* __LP64__ */ +}; + +/*! + * @typedef IOStorageCompletionAction + * @discussion + * The IOStorageCompletionAction declaration describes the C (or C++) completion + * routine that is called once an asynchronous storage operation completes. + * @param target + * Opaque client-supplied pointer (or an instance pointer for a C++ callback). + * @param parameter + * Opaque client-supplied pointer. + * @param status + * Status of the data transfer. + * @param actualByteCount + * Actual number of bytes transferred in the data transfer. + */ + +typedef void (*IOStorageCompletionAction)(void * target, + void * parameter, + IOReturn status, + UInt64 actualByteCount); + +/*! + * @struct IOStorageCompletion + * @discussion + * The IOStorageCompletion structure describes the C (or C++) completion routine + * that is called once an asynchronous storage operation completes. The values + * passed for the target and parameter fields will be passed to the routine when + * it is called. + * @field target + * Opaque client-supplied pointer (or an instance pointer for a C++ callback). + * @field action + * Completion routine to call on completion of the data transfer. + * @field parameter + * Opaque client-supplied pointer. + */ + +struct IOStorageCompletion +{ + void * target; + IOStorageCompletionAction action; + void * parameter; +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOSTORAGE_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOStorageDeviceCharacteristics.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOStorageDeviceCharacteristics.h.svn-base new file mode 100644 index 0000000..19a73a2 --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOStorageDeviceCharacteristics.h.svn-base @@ -0,0 +1,659 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IO_STORAGE_DEVICE_CHARACTERISTICS_H_ +#define _IOKIT_IO_STORAGE_DEVICE_CHARACTERISTICS_H_ + +#include <IOKit/storage/IOStorageProtocolCharacteristics.h> + +/* + * Device Characteristics - Characteristics defined for devices. + */ + +/*! +@defined kIOPropertyDeviceCharacteristicsKey +@discussion This key is used to define Device Characteristics for a particular +device and it has an associated dictionary which lists the +device characteristics. The device characteristics are Command Set specific +and are listed in the header files for each command set. + +Requirement: Mandatory + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyDeviceCharacteristicsKey "Device Characteristics" + + +/*! +@defined kIOPropertyVendorNameKey +@discussion This key is used to define the Vendor Name for a particular device +and it has an associated string. + +Requirement: Mandatory + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyVendorNameKey "Vendor Name" + + +/*! +@defined kIOPropertyProductNameKey +@discussion This key is used to define the Product Name for a particular device +and it has an associated string. + +Requirement: Mandatory + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyProductNameKey "Product Name" + + +/*! +@defined kIOPropertyProductRevisionLevelKey +@discussion This key is used to define the Product Revision Level for a +particular device and it has an associated string. + +Requirement: Mandatory + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyProductRevisionLevelKey "Product Revision Level" + + +/*! +@defined kIOPropertyProductSerialNumberKey +@discussion This key is used to define the Product Serial Number for a +particular device and it has an associated data. + +Requirement: Mandatory + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>Serial Number</key> + <string>123456789</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyProductSerialNumberKey "Serial Number" + + +/*! +@defined kIOPropertySupportedCDFeaturesKey +@discussion This key is used to define the supported CD Features for a +particular optical device and it has an associated bitfield. See +<IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> for definitions of the +bits and associated bitmasks. + +Requirement: Mandatory for optical devices (Peripheral Device Type 05h). + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>SuperDrive</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>CD Features</key> + <integer>1663</integer> + <key>DVD Features</key> + <integer>103</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySupportedCDFeaturesKey "CD Features" + + +/*! +@defined kIOPropertySupportedDVDFeaturesKey +@discussion This key is used to define the supported DVD Features for a +particular optical device and it has an associated bitfield. See +<IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> for definitions of the +bits and associated bitmasks. + +Requirement: Mandatory for optical devices (Peripheral Device Type 05h). + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>SuperDrive</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>CD Features</key> + <integer>1663</integer> + <key>DVD Features</key> + <integer>103</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySupportedDVDFeaturesKey "DVD Features" + + +/*! +@defined kIOPropertySupportedBDFeaturesKey +@discussion This key is used to define the supported BD Features for a +particular optical device and it has an associated bitfield. See +<IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> for definitions of the +bits and associated bitmasks. + +Requirement: Mandatory for optical devices (Peripheral Device Type 05h). + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>SuperDrive</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>CD Features</key> + <integer>1663</integer> + <key>DVD Features</key> + <integer>103</integer> + <key>BD Features</key> + <integer>21</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySupportedBDFeaturesKey "BD Features" + + +/*! +@defined kIOPropertyRigidDiskGeometryKey +@discussion This key is used to define a dictionary containing +rigid disk geometry information. + +Requirement: Optional. If a device publishes this dictionary, it +must publish all key/value pairs which are deemed Mandatory. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>Rigid Disk Geometry</key> + <dict> + <key>Sector Count per Track</key> + <integer>12345</integer> + <key>Head Count</key> + <integer>12</integer> + <key>Cylinder Count</key> + <integer>12345</integer> + <key>Bytes per Physical Sector</key> + <integer>512</integer> + </dict> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyRigidDiskGeometryKey "Rigid Disk Geometry" + + +/*! +@defined kIOPropertySectorCountPerTrackKey +@discussion This key is used to define the number of sectors per +each track for a particular medium. + +Requirement: Mandatory element of the Rigid Disk Geometry dictionary. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>Rigid Disk Geometry</key> + <dict> + <key>Sector Count per Track</key> + <integer>12345</integer> + </dict> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySectorCountPerTrackKey "Sector Count per Track" + + +/*! +@defined kIOPropertyHeadCountKey +@discussion This key is used to define the number of heads for +a particular medium. + +Requirement: Mandatory element of the Rigid Disk Geometry dictionary. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>Rigid Disk Geometry</key> + <dict> + <key>Sector Count per Track</key> + <integer>12345</integer> + <key>Head Count</key> + <integer>12</integer> + <key>Cylinder Count</key> + <integer>12345</integer> + <key>Bytes per Physical Sector</key> + <integer>512</integer> + </dict> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyHeadCountKey "Head Count" + + +/*! +@defined kIOPropertyCylinderCountKey +@discussion This key is used to define the number of heads for +a particular medium. + +Requirement: Mandatory element of the Rigid Disk Geometry dictionary. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>Rigid Disk Geometry</key> + <dict> + <key>Sector Count per Track</key> + <integer>12345</integer> + <key>Head Count</key> + <integer>12</integer> + <key>Cylinder Count</key> + <integer>12345</integer> + <key>Bytes per Physical Sector</key> + <integer>512</integer> + </dict> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyCylinderCountKey "Cylinder Count" + + +/*! +@defined kIOPropertyBytesPerPhysicalSectorKey +@discussion This key is used to define the number of heads for +a particular medium. + +Requirement: Mandatory element of the Rigid Disk Geometry dictionary. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>Rigid Disk Geometry</key> + <dict> + <key>Sector Count per Track</key> + <integer>12345</integer> + <key>Head Count</key> + <integer>12</integer> + <key>Cylinder Count</key> + <integer>12345</integer> + <key>Bytes per Physical Sector</key> + <integer>512</integer> + </dict> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyBytesPerPhysicalSectorKey "Bytes per Physical Sector" + + +/*! +@defined kIOPropertyPhysicalBlockSizeKey +@discussion This key is used to define the physical block size of a hard disk drive. + +Requirement: Mandatory for hard disk drives with physical block size other than 512 bytes. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>Physical Block Size</key> + <integer>4096</integer> + <key>Logical Block Size</key> + <integer>512</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalBlockSizeKey "Physical Block Size" + + +/*! +@defined kIOPropertyLogicalBlockSizeKey +@discussion This key is used to define the logical block size of a hard disk drive. + +Requirement: Mandatory for hard disk drives with logical block size other than 512 bytes +or that does not match its physical block size. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>Physical Block Size</key> + <integer>4096</integer> + <key>Logical Block Size</key> + <integer>512</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyLogicalBlockSizeKey "Logical Block Size" + + +/*! +@defined kIOPropertyTargetDiskModeKey +@discussion This key is used to indicate the device is another computer in Target Disk Mode. + +Requirement: Optional. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>AAPL</string> + <key>Product Name</key> + <string>FireWire Target</string> + <key>Product Revision Level</key> + <string>0000</string> + <key>Target Disk Mode</key> + <true/> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyTargetDiskModeKey "Target Disk Mode" + + +/*! +@defined kIOPropertyMediumTypeKey +@discussion This key is used to indicate the medium type of the device. + +Requirement: Optional. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>AAPL</string> + <key>Product Name</key> + <string>FireWire Target</string> + <key>Product Revision Level</key> + <string>0000</string> + <key>Medium Type</key> + <string>Rotational</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyMediumTypeKey "Medium Type" + + +/*! +@defined kIOPropertyMediumTypeRotationalKey +@discussion This key is used to indicate the medium type of the device is rotational. + +Requirement: Optional. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>AAPL</string> + <key>Product Name</key> + <string>FireWire Target</string> + <key>Product Revision Level</key> + <string>0000</string> + <key>Medium Type</key> + <string>Rotational</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyMediumTypeRotationalKey "Rotational" + + +/*! +@defined kIOPropertyMediumTypeSolidStateKey +@discussion This key is used to indicate the medium type of the device is solid state. + +Requirement: Optional. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>AAPL</string> + <key>Product Name</key> + <string>FireWire Target</string> + <key>Product Revision Level</key> + <string>0000</string> + <key>Medium Type</key> + <string>Solid State</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyMediumTypeSolidStateKey "Solid State" + + +/*! +@defined kIOPropertyMediumRotationRateKey +@discussion This key is used to indicate the medium rotation rate in RPM of the device. + +Requirement: Optional. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>AAPL</string> + <key>Product Name</key> + <string>FireWire Target</string> + <key>Product Revision Level</key> + <string>0000</string> + <key>Rotation Rate</key> + <integer>7200</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyMediumRotationRateKey "Rotation Rate" + + +#endif /* _IOKIT_IO_STORAGE_DEVICE_CHARACTERISTICS_H_ */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOStorageProtocolCharacteristics.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOStorageProtocolCharacteristics.h.svn-base new file mode 100644 index 0000000..18a726f --- /dev/null +++ b/i386/include/IOKit/storage/.svn/text-base/IOStorageProtocolCharacteristics.h.svn-base @@ -0,0 +1,1758 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IO_STORAGE_PROTOCOL_CHARACTERISTICS_H_ +#define _IOKIT_IO_STORAGE_PROTOCOL_CHARACTERISTICS_H_ + + +/* + * Protocol Characteristics - Characteristics defined for protocols. + */ + + +/*! +@defined kIOPropertyProtocolCharacteristicsKey +@discussion This key is used to define Protocol Characteristics for a particular +protocol and it has an associated dictionary which lists the +protocol characteristics. + +Requirement: Mandatory + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>ATAPI</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyProtocolCharacteristicsKey "Protocol Characteristics" + + +/*! +@defined kIOPropertySCSIInitiatorIdentifierKey +@discussion An identifier that will uniquely identify this SCSI Initiator for the +SCSI Domain. + +Requirement: Mandatory for SCSI Parallel Interface, SAS, +and Fibre Channel Interface. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SCSI Parallel Interface</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + <key>SCSI Initiator Identifier</key> + <integer>7</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSIInitiatorIdentifierKey "SCSI Initiator Identifier" + + +/*! +@defined kIOPropertySCSIDomainIdentifierKey +@discussion An identifier that will uniquely identify this SCSI Domain for the +Physical Interconnect type. This identifier is only guaranteed to be unique for +any given Physical Interconnect and is not guaranteed to be the same across +restarts or shutdowns. + +Requirement: Mandatory for SCSI Parallel Interface and Fibre Channel Interface. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SCSI Parallel Interface</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + <key>SCSI Domain Identifier</key> + <integer>0</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSIDomainIdentifierKey "SCSI Domain Identifier" + + +/*! +@defined kIOPropertySCSITargetIdentifierKey +@discussion This is the SCSI Target Identifier for a given SCSI Target Device. + +Requirement: Mandatory for SCSI Parallel Interface and Fibre Channel Interface. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SCSI Parallel Interface</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + <key>SCSI Target Identifier</key> + <integer>3</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSITargetIdentifierKey "SCSI Target Identifier" + + +/*! +@defined kIOPropertySCSILogicalUnitNumberKey +@discussion This key is the SCSI Logical Unit Number for the device server +controlled by the driver. + +Requirement: Mandatory for SCSI Parallel Interface, SAS, and Fibre Channel Interface. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SCSI Parallel Interface</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + <key>SCSI Logical Unit Number</key> + <integer>2</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSILogicalUnitNumberKey "SCSI Logical Unit Number" + + +/*! +@defined kIOPropertySASAddressKey +@discussion This key is the unique 64-bit SAS Address for the device server +node located at this port, or for the initiating host port. + +Requirement: Mandatory for SAS. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SAS</string> + <key>Physical Interconnect Location</key> + <string>External</string> + <key>SAS Address</key> + <data>0011223344556677</data> + </dict> +</dict> +@/textblock +</pre> + +Example2: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>SAS Address</key> + <data>0011223344556677</data> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySASAddressKey "SAS Address" + + +/*! +@defined kIOPropertyFibreChannelNodeWorldWideNameKey +@discussion This key is the unique 64-bit World Wide Name for the device server +node located at this port, or for the initiating host port. + +Requirement: Mandatory for Fibre Channel Interface. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Fibre Channel Interface</string> + <key>Physical Interconnect Location</key> + <string>External</string> + <key>Node World Wide Name</key> + <data>0011223344556677</data> + </dict> +</dict> +@/textblock +</pre> + +Example2: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Node World Wide Name</key> + <data>0011223344556677</data> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyFibreChannelNodeWorldWideNameKey "Node World Wide Name" + + +/*! +@defined kIOPropertyFibreChannelPortWorldWideNameKey +@discussion This key is the unique 64-bit World Wide Name for the port. + +Requirement: Mandatory for Fibre Channel Interface. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Fibre Channel Interface</string> + <key>Physical Interconnect Location</key> + <string>External</string> + <key>Port World Wide Name</key> + <data>0011223344556677</data> + </dict> +</dict> +@/textblock +</pre> + +Example2: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port World Wide Name</key> + <data>0011223344556677</data> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyFibreChannelPortWorldWideNameKey "Port World Wide Name" + + +/*! +@defined kIOPropertyFibreChannelAddressIdentifierKey +@discussion This key is the 24-bit Address Identifier (S_ID or D_ID) as +defined in the FC-FS specification. It contains the address identifier +of the source or destination Nx_Port. + +Note: This value can change. It is not a static value. + +Requirement: Optional (only necessary for Fibre Channel Interface). + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Fibre Channel Interface</string> + <key>Physical Interconnect Location</key> + <string>External</string> + <key>Address Identifier</key> + <data>001122</data> + </dict> +</dict> +@/textblock +</pre> + +Example2: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Address Identifier</key> + <data>001122</data> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyFibreChannelAddressIdentifierKey "Address Identifier" + + +/*! +@defined kIOPropertyFibreChannelALPAKey +@discussion This key is the 8-bit Arbitrated Loop Physical Address +(AL_PA) value as defined in the FC-AL-2 specification. + +Note: This value can change. It is not a static value. + +Requirement: Optional (only necessary for Fibre Channel Interface). + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Fibre Channel Interface</string> + <key>Physical Interconnect Location</key> + <string>External</string> + <key>AL_PA</key> + <data>04</data> + </dict> +</dict> +@/textblock +</pre> + +Example2: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>AL_PA</key> + <data>04</data> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyFibreChannelALPAKey "AL_PA" + + +/*! +@defined kIOPropertyPortStatusKey +@discussion This key is associated with the current port +status of the physical link. The port status is either +"Link Established", "No Link Established", or "Link Failed". + +Note: This value can change when the port status changes. It +is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Status</key> + <string>Link Established</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortStatusKey "Port Status" + + +/*! +@defined kIOPropertyPortSpeedKey +@discussion This key is associated with the current port +speed. The port speed can be any valid speed for the interconnect. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (1 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedKey "Port Speed" + + +/*! +@defined kIOPropertyPortTopologyKey +@discussion This key is associated with the current port +topology. The port topology can be any valid topology for the interconnect. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Topology</key> + <string>Automatic (N_Port)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortTopologyKey "Port Topology" + + +/*! +@defined kIOPropertyPortDescriptionKey +@discussion This key is associated with an human +readable port description. Examples include +"Channel A", "Port 1", etc. + +Requirement: Optional for all interconnects. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Description</key> + <string>Channel A</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortDescriptionKey "Port Description" + + +/*! +@defined kIOPropertySCSIParallelSignalingTypeKey +@discussion This key is associated with the signaling type +used for this SCSI Parallel bus. Valid values include +"High Voltage Differential", "Low Voltage Differential", +and "Single Ended". + +Requirement: Optional for SCSI Parallel Interface. Not +defined for any other physical interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>SCSI Parallel Signaling Type</key> + <string>High Voltage Differential</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSIParallelSignalingTypeKey "SCSI Parallel Signaling Type" + + +/*! +@defined kIOPropertyFibreChannelCableDescriptionKey +@discussion This key is associated with the cabling type +used for this Fibre Channel port. Valid values include +"Copper" and "Fiber Optic". + +Requirement: Optional for Fibre Channel Interface. Not +defined for any other physical interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Fibre Channel Cabling Type</key> + <string>Copper</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyFibreChannelCableDescriptionKey "Fibre Channel Cabling Type" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeKey +@discussion This key is used to define the Physical Interconnect to which +a device is attached. + +Requirement: Mandatory. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SCSI Parallel Interface</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeKey "Physical Interconnect" + + +/*! +@defined kIOPropertyPhysicalInterconnectLocationKey +@discussion This key is used to define the Physical Interconnect +Location. + +Requirement: Mandatory. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SCSI Parallel Interface</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectLocationKey "Physical Interconnect Location" + + +/*! +@defined kIOPropertySCSIProtocolMultiInitKey +@discussion This protocol characteristics key is used to inform the system +that the protocol supports having multiple devices that act as initiators. + +Requirement: Optional. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Fibre Channel Interface</string> + <key>Physical Interconnect Location</key> + <string>External</string> + <key>Multiple Initiators</key> + <string>True</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSIProtocolMultiInitKey "Multiple Initiators" + + +/* + * Values - Values for the characteristics defined above. + */ + + +/*! +@defined kIOPropertyInternalKey +@discussion This key defines the value of Internal for the key +kIOPropertyPhysicalInterconnectLocationKey. If the device is +connected to an internal bus, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>ATA</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyInternalKey "Internal" + + +/*! +@defined kIOPropertyExternalKey +@discussion This key defines the value of External for the key +kIOPropertyPhysicalInterconnectLocationKey. If the device is +connected to an external bus, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Fibre Channel Interface</string> + <key>Physical Interconnect Location</key> + <string>External</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyExternalKey "External" + + +/*! +@defined kIOPropertyInternalExternalKey +@discussion This key defines the value of Internal/External for the key +kIOPropertyPhysicalInterconnectLocationKey. If the device is connected +to a bus and it is indeterminate whether it is internal or external, +this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SCSI Parallel Interface</string> + <key>Physical Interconnect Location</key> + <string>Internal/External</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyInternalExternalKey "Internal/External" + + +/*! +@defined kIOPropertyInterconnectFileKey +@discussion This key defines the value of File for the key +kIOPropertyPhysicalInterconnectLocationKey. If the device is a file +that is being represented as a storage device, this key should be set. + +NOTE: This key should only be used when the Physical Interconnect is set to +Virtual Interface. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Virtual Interface</string> + <key>Physical Interconnect Location</key> + <string>File</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyInterconnectFileKey "File" + + +/*! +@defined kIOPropertyInterconnectRAMKey +@discussion This key defines the value of RAM for the key +kIOPropertyPhysicalInterconnectLocationKey. If the device is system memory +that is being represented as a storage device, this key should be set. + +NOTE: This key should only be used when the Physical Interconnect is set to +Virtual Interface. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Virtual Interface</string> + <key>Physical Interconnect Location</key> + <string>RAM</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyInterconnectRAMKey "RAM" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeATA +@discussion This key defines the value of ATA for the key +kIOPropertyPhysicalInterconnectTypeKey. If the device is connected +to an ATA bus, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>ATA</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeATA "ATA" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeSerialATA +@discussion This key defines the value of SATA for the key +kIOPropertyPhysicalInterconnectTypeKey. If the device is connected +to a SATA bus, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SATA</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeSerialATA "SATA" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeSerialAttachedSCSI +@discussion This key defines the value of SAS for the key +kIOPropertyPhysicalInterconnectTypeKey. If the device is connected +to a SAS bus, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SAS</string> + <key>Physical Interconnect Location</key> + <string>External</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeSerialAttachedSCSI "SAS" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeATAPI +@discussion This key defines the value of ATAPI for the key +kIOPropertyPhysicalInterconnectTypeKey. If the device is connected +to an ATA bus and follows the ATAPI command specification, this key +should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>ATAPI</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeATAPI "ATAPI" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeUSB +@discussion This key defines the value of USB for the key +kIOPropertyPhysicalInterconnectTypeKey. If the device is connected +to a USB port, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>USB</string> + <key>Physical Interconnect Location</key> + <string>External</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeUSB "USB" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeFireWire +@discussion This key defines the value of USB for the key +kIOPropertyPhysicalInterconnectTypeKey. If the device is connected +to a FireWire port, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>FireWire</string> + <key>Physical Interconnect Location</key> + <string>External</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeFireWire "FireWire" + + +/*! + @defined kIOPropertyPhysicalInterconnectTypeSecureDigital + @discussion This key defines the value of Secure Digital for the key + kIOPropertyPhysicalInterconnectTypeSecureDigital. If the device is a + connected to a Secure Digital port and follows the Secure Digital + specification, this key should be set. + + Example: + <pre> + @textblock + <dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Secure Digital</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + </dict> + </dict> + @/textblock + </pre> + */ +#define kIOPropertyPhysicalInterconnectTypeSecureDigital "Secure Digital" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeSCSIParallel +@discussion This key defines the value of SCSI Parallel Interface for the key +kIOPropertyPhysicalInterconnectTypeKey. If the device is connected +to a SCSI Parallel port, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SCSI Parallel Interface</string> + <key>Physical Interconnect Location</key> + <string>External</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeSCSIParallel "SCSI Parallel Interface" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeFibreChannel +@discussion This key defines the value of Fibre Channel Interface for the key +kIOPropertyPhysicalInterconnectTypeKey. If the device is connected +to a Fibre Channel port, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Fibre Channel Interface</string> + <key>Physical Interconnect Location</key> + <string>External</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeFibreChannel "Fibre Channel Interface" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeVirtual +@discussion This key defines the value of Virtual Interface for the key +kIOPropertyPhysicalInterconnectTypeVirtual. If the device is being made to look +like a storage device, but is not such in actuality, such as a File or RAM, this +key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Virtual Interface</string> + <key>Physical Interconnect Location</key> + <string>File</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeVirtual "Virtual Interface" + + +/*! +@defined kIOPropertyPortStatusLinkEstablishedKey +@discussion This key defines the value of Link Established for the key +kIOPropertyPortStatusKey. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Status</key> + <string>Link Established</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortStatusLinkEstablishedKey "Link Established" + + +/*! +@defined kIOPropertyPortStatusNoLinkEstablishedKey +@discussion This key defines the value of No Link Established for the key +kIOPropertyPortStatusKey. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Status</key> + <string>No Link Established</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortStatusNoLinkEstablishedKey "No Link Established" + + +/*! +@defined kIOPropertyPortStatusLinkFailedKey +@discussion This key defines the value of Link Failed for the key +kIOPropertyPortStatusKey. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Status</key> + <string>Link Failed</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortStatusLinkFailedKey "Link Failed" + + +/*! +@defined kIOPropertyPortSpeedAutomaticKey +@discussion This key defines the value of Automatic for the key +kIOPropertyPortSpeedKey. If the speed of the port is automatically +adjusted by the host/device and a definitive speed is not known, +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomaticKey "Automatic" + + +/*! +@defined kIOPropertyPortSpeed1GigabitKey +@discussion This key defines the value of 1 Gigabit for the key +kIOPropertyPortSpeedKey. If the speed of the port is 1 Gigabit +per second and is not automatically determined (i.e. the user +configured the port to be exactly this speed), +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>1 Gigabit</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeed1GigabitKey "1 Gigabit" + +/*! +@defined kIOPropertyPortSpeed1_5GigabitKey +@discussion This key defines the value of 1.5 Gigabit for the key +kIOPropertyPortSpeedKey. If the speed of the port is 1.5 Gigabits +per second and is not automatically determined (i.e. the user +configured the port to be exactly this speed), +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>1.5 Gigabit</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeed1_5GigabitKey "1.5 Gigabit" + + +/*! +@defined kIOPropertyPortSpeed2GigabitKey +@discussion This key defines the value of 2 Gigabit for the key +kIOPropertyPortSpeedKey. If the speed of the port is 2 Gigabits +per second and is not automatically determined (i.e. the user +configured the port to be exactly this speed), +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>2 Gigabit</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeed2GigabitKey "2 Gigabit" + + +/*! +@defined kIOPropertyPortSpeed3GigabitKey +@discussion This key defines the value of 3 Gigabit for the key +kIOPropertyPortSpeedKey. If the speed of the port is 3 Gigabits +per second and is not automatically determined (i.e. the user +configured the port to be exactly this speed), +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>3 Gigabit</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeed3GigabitKey "3 Gigabit" + + +/*! +@defined kIOPropertyPortSpeed4GigabitKey +@discussion This key defines the value of 4 Gigabit for the key +kIOPropertyPortSpeedKey. If the speed of the port is 4 Gigabits +per second and is not automatically determined (i.e. the user +configured the port to be exactly this speed), +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>4 Gigabit</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeed4GigabitKey "4 Gigabit" + +/*! +@defined kIOPropertyPortSpeed6GigabitKey +@discussion This key defines the value of 6 Gigabit for the key +kIOPropertyPortSpeedKey. If the speed of the port is 6 Gigabits +per second and is not automatically determined (i.e. the user +configured the port to be exactly this speed), +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>6 Gigabit</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeed6GigabitKey "6 Gigabit" + + +/*! +@defined kIOPropertyPortSpeed8GigabitKey +@discussion This key defines the value of 8 Gigabit for the key +kIOPropertyPortSpeedKey. If the speed of the port is 8 Gigabits +per second and is not automatically determined (i.e. the user +configured the port to be exactly this speed), +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>8 Gigabit</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeed8GigabitKey "8 Gigabit" + + +/*! +@defined kIOPropertyPortSpeed10GigabitKey +@discussion This key defines the value of 10 Gigabit for the key +kIOPropertyPortSpeedKey. If the speed of the port is 10 Gigabits +per second and is not automatically determined (i.e. the user +configured the port to be exactly this speed), +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>10 Gigabit</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeed10GigabitKey "10 Gigabit" + + +/*! +@defined kIOPropertyPortSpeedAutomatic1GigabitKey +@discussion This key defines the value of Automatic (1 Gigabit) +for the key kIOPropertyPortSpeedKey. If the speed of the port is +1 Gigabit per second and is automatically determined by host +software, this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (1 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomatic1GigabitKey "Automatic (1 Gigabit)" + + +/*! +@defined kIOPropertyPortSpeedAutomatic1_5GigabitKey +@discussion This key defines the value of Automatic (1.5 Gigabit) for the key +kIOPropertyPortSpeedKey. If the speed of the port is +1.5 Gigabits per second and is automatically determined by host +software, this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (1.5 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomatic1_5GigabitKey "Automatic (1.5 Gigabit)" + + +/*! +@defined kIOPropertyPortSpeedAutomatic2GigabitKey +@discussion This key defines the value of Automatic (2 Gigabit) +for the key kIOPropertyPortSpeedKey. If the speed of the port is +2 Gigabits per second and is automatically determined by host +software, this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (2 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomatic2GigabitKey "Automatic (2 Gigabit)" + + +/*! +@defined kIOPropertyPortSpeedAutomatic3GigabitKey +@discussion This key defines the value of Automatic (3 Gigabit) +for the key kIOPropertyPortSpeedKey. If the speed of the port is +3 Gigabits per second and is automatically determined by host +software, this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (3 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomatic3GigabitKey "Automatic (3 Gigabit)" + + +/*! +@defined kIOPropertyPortSpeedAutomatic4GigabitKey +@discussion This key defines the value of Automatic (4 Gigabit) +for the key kIOPropertyPortSpeedKey. If the speed of the port is +4 Gigabits per second and is automatically determined by host +software, this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (4 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomatic4GigabitKey "Automatic (4 Gigabit)" + + +/*! +@defined kIOPropertyPortSpeedAutomatic6GigabitKey +@discussion This key defines the value of Automatic (6 Gigabit) +for the key kIOPropertyPortSpeedKey. If the speed of the port is +6 Gigabits per second and is automatically determined by host +software, this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (6 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomatic6GigabitKey "Automatic (6 Gigabit)" + + +/*! +@defined kIOPropertyPortSpeedAutomatic8GigabitKey +@discussion This key defines the value of Automatic (8 Gigabit) +for the key kIOPropertyPortSpeedKey. If the speed of the port is +8 Gigabits per second and is automatically determined by host +software, this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (8 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomatic8GigabitKey "Automatic (8 Gigabit)" + + +/*! +@defined kIOPropertyPortSpeedAutomatic10GigabitKey +@discussion This key defines the value of Automatic (10 Gigabit) +for the key kIOPropertyPortSpeedKey. If the speed of the port is +10 Gigabits per second and is automatically determined by host +software, this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (10 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomatic10GigabitKey "Automatic (10 Gigabit)" + + +/*! +@defined kIOPropertyPortTopologyAutomaticKey +@discussion This key defines the value of Automatic for the key +kIOPropertyPortTopologyKey. If the topology of the port is automatically +adjusted by the host/device and a definitive topology is not known, +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Topology</key> + <string>Automatic</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortTopologyAutomaticKey "Automatic" + + +/*! +@defined kIOPropertyPortTopologyNPortKey +@discussion This key defines the value of N_Port for the key +kIOPropertyPortTopologyKey. If the topology of the port is an N_Port, +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Topology</key> + <string>N_Port</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortTopologyNPortKey "N_Port" + + +/*! +@defined kIOPropertyPortTopologyNLPortKey +@discussion This key defines the value of NL_Port for the key +kIOPropertyPortTopologyKey. If the topology of the port is an NL_Port, +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Topology</key> + <string>NL_Port</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortTopologyNLPortKey "NL_Port" + + +/*! +@defined kIOPropertyPortTopologyAutomaticNPortKey +@discussion This key defines the value of Automatic (N_Port) for the key +kIOPropertyPortTopologyKey. If the topology of the port is +N_Port and is automatically determined by host software, this +key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Topology</key> + <string>Automatic (N_Port)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortTopologyAutomaticNPortKey "Automatic (N_Port)" + + +/*! +@defined kIOPropertyPortTopologyAutomaticNLPortKey +@discussion This key defines the value of Automatic (NL_Port) for the key +kIOPropertyPortTopologyKey. If the topology of the port is +NL_Port and is automatically determined by host software, this +key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Topology</key> + <string>Automatic (NL_Port)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortTopologyAutomaticNLPortKey "Automatic (NL_Port)" + + +/*! +@defined kIOPropertySCSIParallelSignalingTypeHVDKey +@discussion This key defines the value of High Voltage Differential for the key +kIOPropertySCSIParallelSignalingTypeKey. If the signaling type of the port is +High Voltage Differential, this key should be used. + +Requirement: Optional for SCSI Parallel Interface interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>SCSI Parallel Signaling Type</key> + <string>High Voltage Differential</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSIParallelSignalingTypeHVDKey "High Voltage Differential" + + +/*! +@defined kIOPropertySCSIParallelSignalingTypeLVDKey +@discussion This key defines the value of Low Voltage Differential for the key +kIOPropertySCSIParallelSignalingTypeKey. If the signaling type of the port is +Low Voltage Differential, this key should be used. + +Requirement: Optional for SCSI Parallel Interface interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>SCSI Parallel Signaling Type</key> + <string>Low Voltage Differential</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSIParallelSignalingTypeLVDKey "Low Voltage Differential" + + +/*! +@defined kIOPropertySCSIParallelSignalingTypeSEKey +@discussion This key defines the value of Single Ended for the key +kIOPropertySCSIParallelSignalingTypeKey. If the signaling type of the port is +Single Ended, this key should be used. + +Requirement: Optional for SCSI Parallel Interface interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>SCSI Parallel Signaling Type</key> + <string>Single Ended</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSIParallelSignalingTypeSEKey "Single Ended" + + +/*! +@defined kIOPropertyFibreChannelCableDescriptionCopperKey +@discussion This key defines the value of Copper for the key +kIOPropertyFibreChannelCableDescriptionKey. If the cabling is +Copper, this key should be used. + +Requirement: Optional for Fibre Channel Interface interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Fibre Channel Cabling Type</key> + <string>Copper</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyFibreChannelCableDescriptionCopperKey "Copper" + + +/*! +@defined kIOPropertyFibreChannelCableDescriptionFiberOpticKey +@discussion This key defines the value of Fiber Optic for the key +kIOPropertyFibreChannelCableDescriptionKey. If the cabling is +Fiber Optic, this key should be used. + +Requirement: Optional for Fibre Channel Interface interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Fibre Channel Cabling Type</key> + <string>Fiber Optic</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyFibreChannelCableDescriptionFiberOpticKey "Fiber Optic" + + +#endif /* _IOKIT_IO_STORAGE_PROTOCOL_CHARACTERISTICS_H_ */ diff --git a/i386/include/IOKit/storage/IOAppleLabelScheme.h b/i386/include/IOKit/storage/IOAppleLabelScheme.h new file mode 100644 index 0000000..6e290a4 --- /dev/null +++ b/i386/include/IOKit/storage/IOAppleLabelScheme.h @@ -0,0 +1,191 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * This header contains the IOAppleLabelScheme class definition. + */ + +#ifndef _IOAPPLELABELSCHEME_H +#define _IOAPPLELABELSCHEME_H + +#include <IOKit/IOTypes.h> + +/* + * kIOAppleLabelSchemeClass is the name of the IOAppleLabelScheme class. + */ + +#define kIOAppleLabelSchemeClass "IOAppleLabelScheme" + +/* + * Apple Label Scheme Definitions + */ + +#pragma pack(push, 1) /* (enable 8-bit struct packing) */ + +/* Label scheme. */ + +struct applelabel +{ + uint8_t al_boot0[416]; /* (reserved for boot area) */ + uint16_t al_magic; /* (the magic number) */ + uint16_t al_type; /* (label type) */ + uint32_t al_flags; /* (generic flags) */ + uint64_t al_offset; /* (offset of property area, bytes) */ + uint32_t al_size; /* (size of property area, bytes) */ + uint32_t al_checksum; /* (checksum of property area) */ + uint8_t al_boot1[72]; /* (reserved for boot area) */ +}; + +/* Label scheme signature (al_magic). */ + +#define AL_MAGIC 0x414C + +/* Label scheme version (al_type). */ + +#define AL_TYPE_DEFAULT 0x0000 + +/* Label scheme flags (al_flags). */ + +#define AL_FLAG_DEFAULT 0x00000000 + +#pragma pack(pop) /* (reset to default struct packing) */ + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOFilterScheme.h> + +/* + * Class + */ + +class IOAppleLabelScheme : public IOFilterScheme +{ + OSDeclareDefaultStructors(IOAppleLabelScheme); + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + + IOMedia * _content; + + /* + * Free all of this object's outstanding resources. + */ + + virtual void free(void); + + /* + * Scan the provider media for an Apple label scheme. + */ + + virtual IOMedia * scan(SInt32 * score); + + /* + * Ask whether the given content appears to be corrupt. + */ + + virtual bool isContentCorrupt(OSDictionary * properties); + + /* + * Ask whether the given content appears to be invalid. + */ + + virtual bool isContentInvalid(OSDictionary * properties); + + /* + * Instantiate a new media object to represent the given content. + */ + + virtual IOMedia * instantiateMediaObject(OSDictionary * properties); + + /* + * Allocate a new media object (called from instantiateMediaObject). + */ + + virtual IOMedia * instantiateDesiredMediaObject(OSDictionary * properties); + + /* + * Attach the given media object to the device tree plane. + */ + + virtual bool attachMediaObjectToDeviceTree(IOMedia * media); + + /* + * Detach the given media object from the device tree plane. + */ + + virtual void detachMediaObjectFromDeviceTree(IOMedia * media); + +public: + + /* + * Initialize this object's minimal state. + */ + + virtual bool init(OSDictionary * properties = 0); + + /* + * Determine whether the provider media contains an Apple label scheme. + */ + + virtual IOService * probe(IOService * provider, SInt32 * score); + + /* + * Publish the new media object which represents our content. + */ + + virtual bool start(IOService * provider); + + /* + * Clean up after the media object we published before terminating. + */ + + virtual void stop(IOService * provider); + + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 0); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 1); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 2); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 3); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 4); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 5); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 6); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 7); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 8); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 9); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 10); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 11); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 12); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 13); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 14); + OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 15); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOAPPLELABELSCHEME_H */ diff --git a/i386/include/IOKit/storage/IOApplePartitionScheme.h b/i386/include/IOKit/storage/IOApplePartitionScheme.h new file mode 100644 index 0000000..ace1f3b --- /dev/null +++ b/i386/include/IOKit/storage/IOApplePartitionScheme.h @@ -0,0 +1,122 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * This header contains the IOApplePartitionScheme class definition. + */ + +#ifndef _IOAPPLEPARTITIONSCHEME_H +#define _IOAPPLEPARTITIONSCHEME_H + +#include <IOKit/IOTypes.h> + +/* + * kIOApplePartitionSchemeClass is the name of the IOApplePartitionScheme class. + */ + +#define kIOApplePartitionSchemeClass "IOApplePartitionScheme" + +/* + * Apple Partition Map Definitions + */ + +#pragma pack(push, 1) /* (enable 8-bit struct packing) */ + +/* Structure constants. */ + +#define DPISTRLEN 32 + +/* Partition map entry, as found in blocks 1 to dpme_map_entries of the disk. */ + +typedef struct dpme +{ + UInt16 dpme_signature; /* (unique value for partition entry, 'PM') */ + UInt16 dpme_reserved_1; /* (reserved for future use) */ + UInt32 dpme_map_entries; /* (number of partition entries) */ + UInt32 dpme_pblock_start; /* (physical block start of partition) */ + UInt32 dpme_pblocks; /* (physical block count of partition) */ + char dpme_name[DPISTRLEN]; /* (name of partition) */ + char dpme_type[DPISTRLEN]; /* (type of partition, eg. Apple_HFS) */ + UInt32 dpme_lblock_start; /* (logical block start of partition) */ + UInt32 dpme_lblocks; /* (logical block count of partition) */ + UInt32 dpme_flags; /* (partition flags, see defines below) */ + UInt32 dpme_boot_block; /* (logical block start of boot code) */ + UInt32 dpme_boot_bytes; /* (byte count of boot code) */ + UInt32 dpme_load_addr; /* (load address in memory of boot code) */ + UInt32 dpme_load_addr_2; /* (reserved for future use) */ + UInt32 dpme_goto_addr; /* (jump address in memory of boot code) */ + UInt32 dpme_goto_addr_2; /* (reserved for future use) */ + UInt32 dpme_checksum; /* (checksum of boot code) */ + UInt8 dpme_process_id[16]; /* (processor type) */ + UInt32 dpme_reserved_2[32]; /* (reserved for future use) */ + UInt32 dpme_reserved_3[62]; /* (reserved for future use) */ +} DPME; + +/* Driver descriptor map entry. */ + +typedef struct DDMap +{ + UInt32 ddBlock; /* (driver's block start, sbBlkSize-blocks) */ + UInt16 ddSize; /* (driver's block count, 512-blocks) */ + UInt16 ddType; /* (driver's system type) */ +} DDMap; + +/* Driver descriptor map, as found in block zero of the disk. */ + +typedef struct Block0 +{ + UInt16 sbSig; /* (unique value for block zero, 'ER') */ + UInt16 sbBlkSize; /* (block size for this device) */ + UInt32 sbBlkCount; /* (block count for this device) */ + UInt16 sbDevType; /* (device type) */ + UInt16 sbDevId; /* (device id) */ + UInt32 sbDrvrData; /* (driver data) */ + UInt16 sbDrvrCount; /* (driver descriptor count) */ + DDMap sbDrvrMap[8]; /* (driver descriptor table) */ + UInt8 sbReserved[430]; /* (reserved for future use) */ +} Block0; + +/* Partition map signature (sbSig). */ + +#define BLOCK0_SIGNATURE 0x4552 + +/* Partition map entry signature (dpme_signature). */ + +#define DPME_SIGNATURE 0x504D + +/* Partition map entry flags (dpme_flags). */ + +#define DPME_FLAGS_VALID 0x00000001 /* (bit 0) */ +#define DPME_FLAGS_ALLOCATED 0x00000002 /* (bit 1) */ +#define DPME_FLAGS_IN_USE 0x00000004 /* (bit 2) */ +#define DPME_FLAGS_BOOTABLE 0x00000008 /* (bit 3) */ +#define DPME_FLAGS_READABLE 0x00000010 /* (bit 4) */ +#define DPME_FLAGS_WRITABLE 0x00000020 /* (bit 5) */ +#define DPME_FLAGS_OS_PIC_CODE 0x00000040 /* (bit 6) */ +#define DPME_FLAGS_OS_SPECIFIC_2 0x00000080 /* (bit 7) */ +#define DPME_FLAGS_OS_SPECIFIC_1 0x00000100 /* (bit 8) */ +#define DPME_FLAGS_RESERVED_2 0xFFFFFE00 /* (bit 9..31) */ + +#pragma pack(pop) /* (reset to default struct packing) */ + +#endif /* !_IOAPPLEPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/IOBDBlockStorageDevice.h b/i386/include/IOKit/storage/IOBDBlockStorageDevice.h new file mode 100644 index 0000000..66a09d7 --- /dev/null +++ b/i386/include/IOKit/storage/IOBDBlockStorageDevice.h @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2006-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOBDBlockStorageDevice + * @abstract + * This header contains the IOBDBlockStorageDevice class definition. + */ + +#ifndef _IOBDBLOCKSTORAGEDEVICE_H +#define _IOBDBLOCKSTORAGEDEVICE_H + +#include <IOKit/storage/IOBDTypes.h> + +/*! + * @defined kIOBDBlockStorageDeviceClass + * @abstract + * kIOBDBlockStorageDeviceClass is the name of the IOBDBlockStorageDevice class. + * @discussion + * kIOBDBlockStorageDeviceClass is the name of the IOBDBlockStorageDevice class. + */ + +#define kIOBDBlockStorageDeviceClass "IOBDBlockStorageDevice" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IODVDBlockStorageDevice.h> + +/* Property used for matching, so the generic driver gets the nub it wants. */ +#define kIOBlockStorageDeviceTypeBD "BD" + +/*! + * @class + * IOBDBlockStorageDevice + * @abstract + * The IOBDBlockStorageDevice class is a generic BD block storage device + * abstraction. + * @discussion + * This class is the protocol for generic BD functionality, independent of + * the physical connection protocol (e.g. SCSI, ATA, USB). + * + * The APIs are the union of CD APIs, DVD APIs, and all + * necessary new low-level BD APIs. + * + * A subclass implements relay methods that translate our requests into + * calls to a protocol- and device-specific provider. + */ + +class IOBDBlockStorageDevice : public IODVDBlockStorageDevice +{ + OSDeclareAbstractStructors(IOBDBlockStorageDevice) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + +public: + + /*! + * @function init + * @discussion + * Initialize this object's minimal state. + * @param properties + * Substitute property table for this object (optional). + * @result + * Returns true on success, false otherwise. + */ + + virtual bool init(OSDictionary * properties); + + /*! + * @function readDiscStructure + * @discussion + * Issue an MMC READ DISC STRUCTURE command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param format + * As documented by MMC. + * @param address + * As documented by MMC. + * @param layer + * As documented by MMC. + * @param grantID + * As documented by MMC. + * @param type + * As documented by MMC. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readDiscStructure( IOMemoryDescriptor * buffer, + UInt8 format, + UInt32 address, + UInt8 layer, + UInt8 grantID, + UInt8 type ) = 0; + + /*! + * @function splitTrack + * @discussion + * Issue an MMC RESERVE TRACK command with the ARSV bit. + * @param address + * As documented by MMC. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn splitTrack(UInt32 address) = 0; + + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 0); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 1); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 2); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 3); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 4); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 5); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 6); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 7); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 8); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 9); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 10); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 11); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 12); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 13); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 14); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 15); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOBDBLOCKSTORAGEDEVICE_H */ diff --git a/i386/include/IOKit/storage/IOBDBlockStorageDriver.h b/i386/include/IOKit/storage/IOBDBlockStorageDriver.h new file mode 100644 index 0000000..199218c --- /dev/null +++ b/i386/include/IOKit/storage/IOBDBlockStorageDriver.h @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2006-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOBDBlockStorageDriver + * @abstract + * This header contains the IOBDBlockStorageDriver class definition. + * @discussion + * This class implements BD functionality, independent of + * the physical connection protocol (e.g. SCSI, ATA, USB). + * + * A protocol-specific provider implements the functionality using an appropriate + * protocol and commands. + */ + +#ifndef _IOBDBLOCKSTORAGEDRIVER_H +#define _IOBDBLOCKSTORAGEDRIVER_H + +#include <IOKit/storage/IOBDBlockStorageDevice.h> +#include <IOKit/storage/IODVDBlockStorageDriver.h> + +/*! + * @defined kIOBDBlockStorageDriverClass + * @abstract + * kIOBDBlockStorageDriverClass is the name of the IOBDBlockStorageDriver class. + * @discussion + * kIOBDBlockStorageDriverClass is the name of the IOBDBlockStorageDriver class. + */ + +#define kIOBDBlockStorageDriverClass "IOBDBlockStorageDriver" + +/*! + * @class + * IOBDBlockStorageDriver + * @abstract + * Generic BD Driver. + * @discussion + * Storage drivers are split into two parts: the Generic Driver handles + * all generic device issues, independent of the lower-level transport + * mechanism (e.g. SCSI, ATA, USB, FireWire). All storage operations + * at the Generic Driver level are translated into a series of generic + * device operations. These operations are passed via the Device Nub + * to a Transport Driver, which implements the appropriate + * transport-dependent protocol to execute these operations. + * + * To determine the write-protect state of a device (or media), for + * example, the generic driver would issue a call to the + * Transport Driver's reportWriteProtection method. If this were a SCSI + * device, its Transport Driver would issue a Mode Sense command to + * extract the write-protection status bit. The Transport Driver then + * reports true or false to the generic driver. + * + * The generic driver therefore has no knowledge of, or involvement + * with, the actual commands and mechanisms used to communicate with + * the device. It is expected that the generic driver will rarely, if + * ever, need to be subclassed to handle device idiosyncrasies; rather, + * the Transport Driver should be changed via overrides. + * + * A generic driver could be subclassed to create a different type of + * generic device. The generic driver IOBDBlockStorageDriver class is a subclass + * of IODVDBlockStorageDriver, adding BD functions. Similarly, the Transport Driver + * IOBDBlockStorageDevice is a subclass of IODVDBlockStorageDevice, adding BD + * functions. +*/ + +class IOBDBlockStorageDriver : public IODVDBlockStorageDriver +{ + OSDeclareDefaultStructors(IOBDBlockStorageDriver) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + + /* Overrides of IODVDBlockStorageDriver. */ + + virtual IOReturn acceptNewMedia(void); + + /* End of IODVDBlockStorageDriver overrides. */ + +public: + + /* + * Obtain this object's provider. We override the superclass's method to + * return a more specific subclass of IOService -- IOBDBlockStorageDevice. + * This method serves simply as a convenience to subclass developers. + */ + + virtual IOBDBlockStorageDevice * getProvider() const; + + /* Overrides of IODVDBlockStorageDriver: */ + + virtual const char * getDeviceTypeName(void); + virtual IOMedia * instantiateDesiredMediaObject(void); + virtual IOMedia * instantiateMediaObject(UInt64 base,UInt64 byteSize, + UInt32 blockSize,char *mediaName); + virtual IOReturn readStructure(IOMemoryDescriptor *buffer,const DVDStructureFormat format, + const UInt32 address,const UInt8 layer,const UInt8 agid); + + /* End of IODVDBlockStorageDriver overrides. */ + + /*! + * @function splitTrack + * @discussion + * Issue an MMC RESERVE TRACK command with the ARSV bit. + * @param address + * As documented by MMC. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn splitTrack(UInt32 address); + + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 0); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 1); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 2); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 3); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 4); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 5); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 6); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 7); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 8); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 9); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 10); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 11); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 12); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 13); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 14); + OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 15); +}; + +#endif /* !_IOBDBLOCKSTORAGEDRIVER_H */ diff --git a/i386/include/IOKit/storage/IOBDMedia.h b/i386/include/IOKit/storage/IOBDMedia.h new file mode 100644 index 0000000..e204a1e --- /dev/null +++ b/i386/include/IOKit/storage/IOBDMedia.h @@ -0,0 +1,297 @@ +/* + * Copyright (c) 2006-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOBDMedia + * @abstract + * This header contains the IOBDMedia class definition. + */ + +#ifndef _IOBDMEDIA_H +#define _IOBDMEDIA_H + +/*! + * @defined kIOBDMediaClass + * @abstract + * kIOBDMediaClass is the name of the IOBDMedia class. + * @discussion + * kIOBDMediaClass is the name of the IOBDMedia class. + */ + +#define kIOBDMediaClass "IOBDMedia" + +/*! + * @defined kIOBDMediaTypeKey + * @abstract + * kIOBDMediaTypeKey is a property of IOBDMedia objects. It has an OSString + * value. + * @discussion + * The kIOBDMediaTypeKey property identifies the BD media type (BD-ROM, BD-R, + * BD-RE, etc). See the kIOBDMediaType contants for possible values. + */ + +#define kIOBDMediaTypeKey "Type" + +/*! + * @defined kIOBDMediaTypeROM + * The kIOBDMediaTypeKey constant for BD-ROM media. + */ + +#define kIOBDMediaTypeROM "BD-ROM" + +/*! + * @defined kIOBDMediaTypeR + * The kIOBDMediaTypeKey constant for BD-R media. + */ + +#define kIOBDMediaTypeR "BD-R" + +/*! + * @defined kIOBDMediaTypeRE + * The kIOBDMediaTypeKey constant for BD-RE media. + */ + +#define kIOBDMediaTypeRE "BD-RE" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOBDBlockStorageDriver.h> +#include <IOKit/storage/IOMedia.h> + +/*! + * @class IOBDMedia + * @abstract + * The IOBDMedia class is a random-access disk device abstraction for BDs. + * @discussion + * The IOBDMedia class is a random-access disk device abstraction for BDs. + */ + +class IOBDMedia : public IOMedia +{ + OSDeclareDefaultStructors(IOBDMedia) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + +public: + + /* + * Obtain this object's provider. We override the superclass's method to + * return a more specific subclass of IOService -- IOBDBlockStorageDriver. + * This method serves simply as a convenience to subclass developers. + */ + + virtual IOBDBlockStorageDriver * getProvider() const; + + /* + * Compare the properties in the supplied table to this object's properties. + */ + + virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); + + /*! + * @function reportKey + * @discussion + * Issue an MMC REPORT KEY command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param keyClass + * As documented by MMC. + * @param address + * As documented by MMC. + * @param grantID + * As documented by MMC. + * @param format + * As documented by MMC. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn reportKey( IOMemoryDescriptor * buffer, + UInt8 keyClass, + UInt32 address, + UInt8 grantID, + UInt8 format ); + + /*! + * @function sendKey + * @discussion + * Issue an MMC SEND KEY command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param keyClass + * As documented by MMC. + * @param grantID + * As documented by MMC. + * @param format + * As documented by MMC. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn sendKey( IOMemoryDescriptor * buffer, + UInt8 keyClass, + UInt8 grantID, + UInt8 format ); + + /*! + * @function readStructure + * @discussion + * Issue an MMC READ DISC STRUCTURE command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param format + * As documented by MMC. + * @param address + * As documented by MMC. + * @param layer + * As documented by MMC. + * @param grantID + * As documented by MMC. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readStructure( IOMemoryDescriptor * buffer, + UInt8 format, + UInt32 address, + UInt8 layer, + UInt8 grantID ); + + /*! + * @function getSpeed + * @discussion + * Get the current speed used for data transfers. + * @param kilobytesPerSecond + * Returns the current speed used for data transfers, in kB/s. + * + * kBDSpeedMin specifies the minimum speed for all BD media (1X). + * kBDSpeedMax specifies the maximum speed supported in hardware. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn getSpeed(UInt16 * kilobytesPerSecond); + + /*! + * @function setSpeed + * @discussion + * Set the speed to be used for data transfers. + * @param kilobytesPerSecond + * Speed to be used for data transfers, in kB/s. + * + * kBDSpeedMin specifies the minimum speed for all BD media (1X). + * kBDSpeedMax specifies the maximum speed supported in hardware. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn setSpeed(UInt16 kilobytesPerSecond); + + /*! + * @function readDiscInfo + * @discussion + * Issue an MMC READ DISC INFORMATION command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param type + * Reserved for future use. Set to zero. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readDiscInfo( IOMemoryDescriptor * buffer, + UInt8 type, + UInt16 * actualByteCount ); + + /*! + * @function readTrackInfo + * @discussion + * Issue an MMC READ TRACK INFORMATION command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param address + * As documented by MMC. + * @param addressType + * As documented by MMC. + * @param open + * Reserved for future use. Set to zero. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readTrackInfo( IOMemoryDescriptor * buffer, + UInt32 address, + UInt8 addressType, + UInt8 open, + UInt16 * actualByteCount ); + + /*! + * @function splitTrack + * @discussion + * Issue an MMC RESERVE TRACK command with the ARSV bit. + * @param address + * As documented by MMC. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn splitTrack(UInt32 address); + + OSMetaClassDeclareReservedUnused(IOBDMedia, 0); + OSMetaClassDeclareReservedUnused(IOBDMedia, 1); + OSMetaClassDeclareReservedUnused(IOBDMedia, 2); + OSMetaClassDeclareReservedUnused(IOBDMedia, 3); + OSMetaClassDeclareReservedUnused(IOBDMedia, 4); + OSMetaClassDeclareReservedUnused(IOBDMedia, 5); + OSMetaClassDeclareReservedUnused(IOBDMedia, 6); + OSMetaClassDeclareReservedUnused(IOBDMedia, 7); + OSMetaClassDeclareReservedUnused(IOBDMedia, 8); + OSMetaClassDeclareReservedUnused(IOBDMedia, 9); + OSMetaClassDeclareReservedUnused(IOBDMedia, 10); + OSMetaClassDeclareReservedUnused(IOBDMedia, 11); + OSMetaClassDeclareReservedUnused(IOBDMedia, 12); + OSMetaClassDeclareReservedUnused(IOBDMedia, 13); + OSMetaClassDeclareReservedUnused(IOBDMedia, 14); + OSMetaClassDeclareReservedUnused(IOBDMedia, 15); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOBDMEDIA_H */ diff --git a/i386/include/IOKit/storage/IOBDMediaBSDClient.h b/i386/include/IOKit/storage/IOBDMediaBSDClient.h new file mode 100644 index 0000000..ee356f5 --- /dev/null +++ b/i386/include/IOKit/storage/IOBDMediaBSDClient.h @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2006-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOBDMEDIABSDCLIENT_H +#define _IOBDMEDIABSDCLIENT_H + +#include <sys/ioctl.h> +#include <sys/types.h> + +#include <IOKit/storage/IOBDTypes.h> + +/* + * Definitions + * + * ioctl description + * ---------------------------- ------------------------------------------------ + * DKIOCBDREADSTRUCTURE see IOBDMedia::readStructure() in IOBDMedia.h + * + * DKIOCBDREADDISCINFO see IOBDMedia::readDiscInfo() in IOBDMedia.h + * DKIOCBDREADTRACKINFO see IOBDMedia::readTrackInfo() in IOBDMedia.h + * + * DKIOCBDREPORTKEY see IOBDMedia::reportKey() in IOBDMedia.h + * DKIOCBDSENDKEY see IOBDMedia::sendKey() in IOBDMedia.h + * + * DKIOCBDGETSPEED see IOBDMedia::getSpeed() in IOBDMedia.h + * DKIOCBDSETSPEED see IOBDMedia::setSpeed() in IOBDMedia.h + * + * in /System/Library/Frameworks/Kernel.framework/Headers/IOKit/storage/ + */ + +typedef struct +{ + uint8_t format; + + uint8_t reserved0008[3]; /* reserved, clear to zero */ + + uint32_t address; + uint8_t grantID; + uint8_t layer; + + uint8_t reserved0080[4]; /* reserved, clear to zero */ + + uint16_t bufferLength; + void * buffer; +} dk_bd_read_structure_t; + +typedef struct +{ + uint8_t format; + uint8_t keyClass; + + uint8_t reserved0016[2]; /* reserved, clear to zero */ + + uint32_t address; + uint8_t grantID; + + uint8_t reserved0072[5]; /* reserved, clear to zero */ + + uint16_t bufferLength; + void * buffer; +} dk_bd_report_key_t; + +typedef struct +{ + uint8_t format; + uint8_t keyClass; + + uint8_t reserved0016[6]; /* reserved, clear to zero */ + + uint8_t grantID; + + uint8_t reserved0072[5]; /* reserved, clear to zero */ + + uint16_t bufferLength; + void * buffer; +} dk_bd_send_key_t; + +typedef struct +{ + uint8_t reserved0000[14]; /* reserved, clear to zero */ + + uint16_t bufferLength; /* actual length on return */ + void * buffer; +} dk_bd_read_disc_info_t; + +typedef struct +{ + uint8_t reserved0000[4]; /* reserved, clear to zero */ + + uint32_t address; + uint8_t addressType; + + uint8_t reserved0072[5]; /* reserved, clear to zero */ + + uint16_t bufferLength; /* actual length on return */ + void * buffer; +} dk_bd_read_track_info_t; + +#define DKIOCBDREADSTRUCTURE _IOW('d', 160, dk_bd_read_structure_t) +#define DKIOCBDREPORTKEY _IOW('d', 161, dk_bd_report_key_t) +#define DKIOCBDSENDKEY _IOW('d', 162, dk_bd_send_key_t) + +#define DKIOCBDGETSPEED _IOR('d', 163, uint16_t) +#define DKIOCBDSETSPEED _IOW('d', 163, uint16_t) + +#define DKIOCBDREADDISCINFO _IOWR('d', 164, dk_bd_read_disc_info_t) +#define DKIOCBDREADTRACKINFO _IOWR('d', 165, dk_bd_read_track_info_t) + +#define DKIOCBDSPLITTRACK _IOW('d', 166, uint32_t) + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOBDMedia.h> +#include <IOKit/storage/IOMediaBSDClient.h> + +/* + * Class + */ + +class IOBDMediaBSDClient : public IOMediaBSDClient +{ + OSDeclareDefaultStructors(IOBDMediaBSDClient) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + +public: + + /* + * Obtain this object's provider. We override the superclass's method + * to return a more specific subclass of IOService -- IOBDMedia. This + * method serves simply as a convenience to subclass developers. + */ + + virtual IOBDMedia * getProvider() const; + + /* + * Process a BD-specific ioctl. + */ + + virtual int ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, proc_t proc); + + OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 0); + OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 1); + OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 2); + OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 3); + OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 4); + OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 5); + OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 6); + OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 7); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOBDMEDIABSDCLIENT_H */ diff --git a/i386/include/IOKit/storage/IOBDTypes.h b/i386/include/IOKit/storage/IOBDTypes.h new file mode 100644 index 0000000..f5b7927 --- /dev/null +++ b/i386/include/IOKit/storage/IOBDTypes.h @@ -0,0 +1,133 @@ +/* + * Copyright (c) 2006-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _BDTYPES_H +#define _BDTYPES_H + +#include <IOKit/IOTypes.h> + +#pragma pack(push, 1) /* (enable 8-bit struct packing) */ + +/* + * Media Types + */ + +enum +{ + kBDMediaTypeUnknown = 0x0300, + kBDMediaTypeROM = 0x0302, /* BD-ROM */ + kBDMediaTypeRE = 0x0303, /* BD-RE */ + kBDMediaTypeR = 0x0304, /* BD-R */ + + kBDMediaTypeMin = 0x0300, + kBDMediaTypeMax = 0x03FF +}; + +typedef UInt32 BDMediaType; + +/* + * Media Speed (kB/s) + */ + +#define kBDSpeedMin 0x1126 +#define kBDSpeedMax 0xFFFF + +/* + * MMC Formats + */ + +// Read Disc Information Format +struct BDDiscInfo +{ + UInt16 dataLength; +#ifdef __LITTLE_ENDIAN__ + UInt8 discStatus:2; + UInt8 stateOfLastSession:2; + UInt8 erasable:1; + UInt8 dataType:3; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 dataType:3; + UInt8 erasable:1; + UInt8 stateOfLastSession:2; + UInt8 discStatus:2; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 reserved2; + UInt8 numberOfSessionsLSB; + UInt8 firstTrackNumberInLastSessionLSB; + UInt8 lastTrackNumberInLastSessionLSB; + UInt8 reserved4[2]; + UInt8 numberOfSessionsMSB; + UInt8 firstTrackNumberInLastSessionMSB; + UInt8 lastTrackNumberInLastSessionMSB; + UInt8 reserved6[22]; +}; +typedef struct BDDiscInfo BDDiscInfo; + +// Read Track Information Format +struct BDTrackInfo +{ + UInt16 dataLength; + UInt8 trackNumberLSB; + UInt8 sessionNumberLSB; + UInt8 reserved; +#ifdef __LITTLE_ENDIAN__ + UInt8 reserved2:5; + UInt8 damage:1; + UInt8 reserved3:2; + + UInt8 reserved4:6; + UInt8 blank:1; + UInt8 reservedTrack:1; + + UInt8 nextWritableAddressValid:1; + UInt8 lastRecordedAddressValid:1; + UInt8 reserved5:6; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 reserved3:2; + UInt8 damage:1; + UInt8 reserved2:5; + + UInt8 reservedTrack:1; + UInt8 blank:1; + UInt8 reserved4:6; + + UInt8 reserved5:6; + UInt8 lastRecordedAddressValid:1; + UInt8 nextWritableAddressValid:1; +#endif /* !__LITTLE_ENDIAN__ */ + UInt32 trackStartAddress; + UInt32 nextWritableAddress; + UInt32 freeBlocks; + UInt32 clusterSize; + UInt32 trackSize; + UInt32 lastRecordedAddress; + UInt8 trackNumberMSB; + UInt8 sessionNumberMSB; + UInt8 reserved6; + UInt8 reserved7; +}; +typedef struct BDTrackInfo BDTrackInfo; + +#pragma pack(pop) /* (reset to default struct packing) */ + +#endif /* _BDTYPES_H */ diff --git a/i386/include/IOKit/storage/IOBlockStorageDevice.h b/i386/include/IOKit/storage/IOBlockStorageDevice.h new file mode 100644 index 0000000..bbec146 --- /dev/null +++ b/i386/include/IOKit/storage/IOBlockStorageDevice.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOBlockStorageDevice + * @abstract + * This header contains the IOBlockStorageDevice class definition. + */ + +#ifndef _IOBLOCKSTORAGEDEVICE_H +#define _IOBLOCKSTORAGEDEVICE_H + +#include <IOKit/IOTypes.h> +#include <IOKit/storage/IOStorageDeviceCharacteristics.h> + +/*! + * @defined kIOBlockStorageDeviceClass + * @abstract + * The name of the IOBlockStorageDevice class. + */ + +#define kIOBlockStorageDeviceClass "IOBlockStorageDevice" + +/*! + * @defined kIOBlockStorageDeviceWriteCacheStateKey + * @abstract + * The name of the property used to get or set the write cache state of the + * block storage device. + */ +#define kIOBlockStorageDeviceWriteCacheStateKey "WriteCacheState" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/IOMemoryDescriptor.h> +#include <IOKit/IOMessage.h> +#include <IOKit/IOService.h> +#include <IOKit/storage/IOMedia.h> + +/* Property used for matching, so the generic driver gets the nub it wants. */ +/*! + * @defined kIOBlockStorageDeviceTypeKey + * @abstract The name of the property tested for nub type matching by the generic block + * storage driver. + */ +#define kIOBlockStorageDeviceTypeKey "device-type" +/*! + * @defined kIOBlockStorageDeviceTypeGeneric + * @abstract A character string used for nub matching. + */ +#define kIOBlockStorageDeviceTypeGeneric "Generic" + + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOBLOCKSTORAGEDEVICE_H */ diff --git a/i386/include/IOKit/storage/IOBlockStorageDriver.h b/i386/include/IOKit/storage/IOBlockStorageDriver.h new file mode 100644 index 0000000..24ac3c2 --- /dev/null +++ b/i386/include/IOKit/storage/IOBlockStorageDriver.h @@ -0,0 +1,245 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOBlockStorageDriver + * @abstract + * This header contains the IOBlockStorageDriver class definition. + */ + +#ifndef _IOBLOCKSTORAGEDRIVER_H +#define _IOBLOCKSTORAGEDRIVER_H + +#include <IOKit/IOTypes.h> + +/*! + * @defined kIOBlockStorageDriverClass + * @abstract + * The name of the IOBlockStorageDriver class. + */ + +#define kIOBlockStorageDriverClass "IOBlockStorageDriver" + +/*! + * @defined kIOBlockStorageDriverStatisticsKey + * @abstract + * Holds a table of numeric values describing the driver's + * operating statistics. + * @discussion + * This property holds a table of numeric values describing the driver's + * operating statistics. The table is an OSDictionary, where each entry + * describes one given statistic. + */ + +#define kIOBlockStorageDriverStatisticsKey "Statistics" + +/*! + * @defined kIOBlockStorageDriverStatisticsBytesReadKey + * @abstract + * Describes the number of bytes read since the block storage + * driver was instantiated. + * @discussion + * This property describes the number of bytes read since the block storage + * driver was instantiated. It is one of the statistic entries listed under + * the top-level kIOBlockStorageDriverStatisticsKey property table. It has + * an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsBytesReadKey "Bytes (Read)" + +/*! + * @defined kIOBlockStorageDriverStatisticsBytesWrittenKey + * @abstract + * Describes the number of bytes written since the block storage + * driver was instantiated. + * @discussion + * This property describes the number of bytes written since the block storage + * driver was instantiated. It is one of the statistic entries listed under the + * top-level kIOBlockStorageDriverStatisticsKey property table. It has an + * OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsBytesWrittenKey "Bytes (Write)" + +/*! + * @defined kIOBlockStorageDriverStatisticsReadErrorsKey + * @abstract + * Describes the number of read errors encountered since the block + * storage driver was instantiated. + * @discussion + * This property describes the number of read errors encountered since the block + * storage driver was instantiated. It is one of the statistic entries listed + * under the top-level kIOBlockStorageDriverStatisticsKey property table. It + * has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsReadErrorsKey "Errors (Read)" + +/*! + * @defined kIOBlockStorageDriverStatisticsWriteErrorsKey + * @abstract + * Describes the number of write errors encountered since the + * block storage driver was instantiated. + * @discussion + * This property describes the number of write errors encountered since the + * block storage driver was instantiated. It is one of the statistic entries + * listed under the top-level kIOBlockStorageDriverStatisticsKey property table. + * It has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsWriteErrorsKey "Errors (Write)" + +/*! + * @defined kIOBlockStorageDriverStatisticsLatentReadTimeKey + * @abstract + * Describes the number of nanoseconds of latency during reads + * since the block storage driver was instantiated. + * @discussion + * This property describes the number of nanoseconds of latency during reads + * since the block storage driver was instantiated. It is one of the statistic + * entries listed under the top-level kIOBlockStorageDriverStatisticsKey + * property table. It has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsLatentReadTimeKey "Latency Time (Read)" + +/*! + * @defined kIOBlockStorageDriverStatisticsLatentWriteTimeKey + * @abstract + * Describes the number of nanoseconds of latency during writes + * since the block storage driver was instantiated. + * @discussion + * This property describes the number of nanoseconds of latency during writes + * since the block storage driver was instantiated. It is one of the statistic + * entries listed under the top-level kIOBlockStorageDriverStatisticsKey + * property table. It has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsLatentWriteTimeKey "Latency Time (Write)" + +/*! + * @defined kIOBlockStorageDriverStatisticsReadsKey + * @abstract + * Describes the number of read operations processed since the + * block storage driver was instantiated. + * @discussion + * This property describes the number of read operations processed since the + * block storage driver was instantiated. It is one of the statistic entries + * listed under the top-level kIOBlockStorageDriverStatisticsKey property table. + * It has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsReadsKey "Operations (Read)" + +/*! + * @defined kIOBlockStorageDriverStatisticsWritesKey + * @abstract + * Describes the number of write operations processed since the + * block storage driver was instantiated. + * @discussion + * This property describes the number of write operations processed since the + * block storage driver was instantiated. It is one of the statistic entries + * listed under the top-level kIOBlockStorageDriverStatisticsKey property table. + * It has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsWritesKey "Operations (Write)" + +/*! + * @defined kIOBlockStorageDriverStatisticsReadRetriesKey + * @abstract + * Describes the number of read retries required since the block + * storage driver was instantiated. + * @discussion + * This property describes the number of read retries required since the block + * storage driver was instantiated. It is one of the statistic entries listed + * under the top-level kIOBlockStorageDriverStatisticsKey property table. It + * has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsReadRetriesKey "Retries (Read)" + +/*! + * @defined kIOBlockStorageDriverStatisticsWriteRetriesKey + * @abstract + * Describes the number of write retries required since the block + * storage driver was instantiated. + * @discussion + * This property describes the number of write retries required since the block + * storage driver was instantiated. It is one of the statistic entries listed + * under the top-level kIOBlockStorageDriverStatisticsKey property table. It + * has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsWriteRetriesKey "Retries (Write)" + +/*! + * @defined kIOBlockStorageDriverStatisticsTotalReadTimeKey + * @abstract + * Describes the number of nanoseconds spent performing reads + * since the block storage driver was instantiated. + * @discussion + * This property describes the number of nanoseconds spent performing reads + * since the block storage driver was instantiated. It is one of the statistic + * entries listed under the top-level kIOBlockStorageDriverStatisticsKey + * property table. It has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsTotalReadTimeKey "Total Time (Read)" + +/*! + * @defined kIOBlockStorageDriverStatisticsTotalWriteTimeKey + * @abstract + * Describes the number of nanoseconds spent performing writes + * since the block storage driver was instantiated. + * @discussion + * This property describes the number of nanoseconds spent performing writes + * since the block storage driver was instantiated. It is one of the statistic + * entries listed under the top-level kIOBlockStorageDriverStatisticsKey + * property table. It has an OSNumber value. + */ + +#define kIOBlockStorageDriverStatisticsTotalWriteTimeKey "Total Time (Write)" + +/*! + * @enum IOMediaState + * @abstract + * The different states that getMediaState() can report. + * @constant kIOMediaStateOffline + * Media is not available. + * @constant kIOMediaStateOnline + * Media is available and ready for operations. + * @constant kIOMediaStateBusy + * Media is available, but not ready for operations. + */ + +enum +{ + kIOMediaStateOffline = 0, + kIOMediaStateOnline = 1, + kIOMediaStateBusy = 2 +}; + +typedef UInt32 IOMediaState; + +#endif /* !_IOBLOCKSTORAGEDRIVER_H */ diff --git a/i386/include/IOKit/storage/IOCDBlockStorageDevice.h b/i386/include/IOKit/storage/IOCDBlockStorageDevice.h new file mode 100644 index 0000000..706da40 --- /dev/null +++ b/i386/include/IOKit/storage/IOCDBlockStorageDevice.h @@ -0,0 +1,60 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOCDBlockStorageDevice + * @abstract + * This header contains the IOCDBlockStorageDevice class definition. + */ + +#ifndef _IOCDBLOCKSTORAGEDEVICE_H +#define _IOCDBLOCKSTORAGEDEVICE_H + +#include <IOKit/storage/IOCDTypes.h> + +/*! + * @defined kIOCDBlockStorageDeviceClass + * @abstract + * kIOCDBlockStorageDeviceClass is the name of the IOCDBlockStorageDevice class. + * @discussion + * kIOCDBlockStorageDeviceClass is the name of the IOCDBlockStorageDevice class. + */ + +#define kIOCDBlockStorageDeviceClass "IOCDBlockStorageDevice" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOBlockStorageDevice.h> + +/* Property used for matching, so the generic driver gets the nub it wants. */ +#define kIOBlockStorageDeviceTypeCDROM "CDROM" + + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOCDBLOCKSTORAGEDEVICE_H */ diff --git a/i386/include/IOKit/storage/IOCDBlockStorageDriver.h b/i386/include/IOKit/storage/IOCDBlockStorageDriver.h new file mode 100644 index 0000000..f88a406 --- /dev/null +++ b/i386/include/IOKit/storage/IOCDBlockStorageDriver.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * IOCDBlockStorageDriver.h + * + * This class implements CD functionality, independent of + * the physical connection protocol (e.g. SCSI, ATA, USB). + * + * A protocol-specific provider implements the functionality using an appropriate + * protocol and commands. + */ + +#ifndef _IOCDBLOCKSTORAGEDRIVER_H +#define _IOCDBLOCKSTORAGEDRIVER_H + +#include <IOKit/IOTypes.h> +#include <IOKit/storage/IOCDBlockStorageDevice.h> +#include <IOKit/storage/IOCDTypes.h> +#include <IOKit/storage/IOBlockStorageDriver.h> + +/*! + * @defined kIOCDBlockStorageDriverClass + * @abstract + * kIOCDBlockStorageDriverClass is the name of the IOCDBlockStorageDriver class. + * @discussion + * kIOCDBlockStorageDriverClass is the name of the IOCDBlockStorageDriver class. + */ + +#define kIOCDBlockStorageDriverClass "IOCDBlockStorageDriver" + +#endif diff --git a/i386/include/IOKit/storage/IOCDMedia.h b/i386/include/IOKit/storage/IOCDMedia.h new file mode 100644 index 0000000..85ad72d --- /dev/null +++ b/i386/include/IOKit/storage/IOCDMedia.h @@ -0,0 +1,553 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOCDMedia + * @abstract + * This header contains the IOCDMedia class definition. + */ + +#ifndef _IOCDMEDIA_H +#define _IOCDMEDIA_H + +/*! + * @defined kIOCDMediaClass + * @abstract + * kIOCDMediaClass is the name of the IOCDMedia class. + * @discussion + * kIOCDMediaClass is the name of the IOCDMedia class. + */ + +#define kIOCDMediaClass "IOCDMedia" + +/*! + * @defined kIOCDMediaTOCKey + * @abstract + * kIOCDMediaTOCKey is a property of IOCDMedia objects. It has an OSData value + * and a CDTOC structure. + * @discussion + * The kIOCDMediaTOCKey property contains the CD's full table of contents, + * formatted as a CDTOC structure. The CDTOC structure is same as what is + * returned by a READ TOC command, format 0x02. All fields in the TOC are + * guaranteed to be binary-encoded (no BCD-encoded numbers are ever passed). + */ + +#define kIOCDMediaTOCKey "TOC" + +/*! + * @defined kIOCDMediaTypeKey + * @abstract + * kIOCDMediaTypeKey is a property of IOCDMedia objects. It has an OSString + * value. + * @discussion + * The kIOCDMediaTypeKey property identifies the CD media type (CD-ROM, CD-R, + * CD-RW, etc). See the kIOCDMediaType contants for possible values. + */ + +#define kIOCDMediaTypeKey "Type" + +/*! + * @defined kIOCDMediaTypeROM + * The kIOCDMediaTypeKey constant for CD-ROM media (inclusive of the CD-I, + * CD-ROM XA, and CD Audio standards, and mixed mode combinations thereof). + */ + +#define kIOCDMediaTypeROM "CD-ROM" + +/*! + * @defined kIOCDMediaTypeR + * The kIOCDMediaTypeKey constant for CD Recordable (CD-R) media. + */ + +#define kIOCDMediaTypeR "CD-R" + +/*! + * @defined kIOCDMediaTypeRW + * The kIOCDMediaTypeKey constant for CD ReWritable (CD-RW) media. + */ + +#define kIOCDMediaTypeRW "CD-RW" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOCDBlockStorageDriver.h> +#include <IOKit/storage/IOMedia.h> + +/*! + * @class IOCDMedia + * @abstract + * The IOCDMedia class is a random-access disk device abstraction for CDs. + * @discussion + * The IOCDMedia class is a random-access disk device abstraction for CDs. It + * extends the IOMedia class by implementing special CD APIs, such as readCD, + * and publishing the TOC as a property of the IOCDMedia object. + */ + +class IOCDMedia : public IOMedia +{ + OSDeclareDefaultStructors(IOCDMedia) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + +public: + + using IOStorage::read; + using IOStorage::write; + + /* + * Obtain this object's provider. We override the superclass's method to + * return a more specific subclass of IOService -- IOCDBlockStorageDriver. + * This method serves simply as a convenience to subclass developers. + */ + + virtual IOCDBlockStorageDriver * getProvider() const; + + /* + * Compare the properties in the supplied table to this object's properties. + */ + + virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); + + /*! + * @function read + * @discussion + * Read data from the storage object at the specified byte offset into the + * specified buffer, asynchronously. When the read completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the read. + * @param client + * Client requesting the read. + * @param byteStart + * Starting byte offset for the data transfer. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + * @param completion + * Completion routine to call once the data transfer is complete. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + */ + + virtual void read(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); + + /* + * @function write + * @discussion + * Write data into the storage object at the specified byte offset from the + * specified buffer, asynchronously. When the write completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the write. + * @param client + * Client requesting the write. + * @param byteStart + * Starting byte offset for the data transfer. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + * @param completion + * Completion routine to call once the data transfer is complete. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + */ + + virtual void write(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); + + /*! + * @function readCD + * @discussion + * Read data from the CD media object at the specified byte offset into the + * specified buffer, asynchronously. Special areas of the CD sector can be + * read via this method, such as the header and subchannel data. When the + * read completes, the caller will be notified via the specified completion + * action. + * + * The buffer will be retained for the duration of the read. + * @param client + * Client requesting the read. + * @param byteStart + * Starting byte offset for the data transfer (see sectorArea parameter). + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param sectorArea + * Sector area(s) to read. The sum of each area's size defines the natural + * block size of the media for the call. This should be taken into account + * when computing the address of byteStart. See IOCDTypes.h. + * @param sectorType + * Sector type that is expected. The data transfer is terminated as soon as + * data is encountered that does not match the expected type. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + * @param completion + * Completion routine to call once the data transfer is complete. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + */ + +#ifdef __LP64__ + virtual void readCD(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); +#else /* !__LP64__ */ + virtual void readCD(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageCompletion completion); +#endif /* !__LP64__ */ + + /*! + * @function readCD + * @discussion + * Read data from the CD media object at the specified byte offset into the + * specified buffer, synchronously. Special areas of the CD sector can be + * read via this method, such as the header and subchannel data. When the + * read completes, this method will return to the caller. The actual byte + * count field is optional. + * @param client + * Client requesting the read. + * @param byteStart + * Starting byte offset for the data transfer (see sectorArea parameter). + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param sectorArea + * Sector area(s) to read. The sum of each area's size defines the natural + * block size of the media for the call. This should be taken into account + * when computing the address of byteStart. See IOCDTypes.h. + * @param sectorType + * Sector type that is expected. The data transfer is terminated as soon as + * data is encountered that does not match the expected type. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + +#ifdef __LP64__ + virtual IOReturn readCD(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageAttributes * attributes = 0, + UInt64 * actualByteCount = 0); +#else /* !__LP64__ */ + virtual IOReturn readCD(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + CDSectorArea sectorArea, + CDSectorType sectorType, + UInt64 * actualByteCount = 0); +#endif /* !__LP64__ */ + + /*! + * @function readISRC + * @discussion + * Read the International Standard Recording Code for the specified track. + * @param track + * Track number from which to read the ISRC. + * @param isrc + * Buffer for the ISRC data. Buffer contents will be zero-terminated. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn readISRC(UInt8 track, CDISRC isrc); + + /*! + * @function readMCN + * @discussion + * Read the Media Catalog Number (also known as the Universal Product Code). + * @param mcn + * Buffer for the MCN data. Buffer contents will be zero-terminated. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn readMCN(CDMCN mcn); + + /*! + * @function getTOC + * @discussion + * Get the full Table Of Contents. + * + * All CDTOC fields passed across I/O Kit APIs are guaranteed to be + * binary-encoded (no BCD-encoded numbers are ever passed). + * @result + * Returns a pointer to the TOC buffer (do not deallocate). + */ + + virtual CDTOC * getTOC(); + + /*! + * @function getSpeed + * @discussion + * Get the current speed used for data transfers. + * @param kilobytesPerSecond + * Returns the current speed used for data transfers, in kB/s. + * + * kCDSpeedMin specifies the minimum speed for all CD media (1X). + * kCDSpeedMax specifies the maximum speed supported in hardware. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn getSpeed(UInt16 * kilobytesPerSecond); /* 10.1.0 */ + + /*! + * @function setSpeed + * @discussion + * Set the speed to be used for data transfers. + * @param kilobytesPerSecond + * Speed to be used for data transfers, in kB/s. + * + * kCDSpeedMin specifies the minimum speed for all CD media (1X). + * kCDSpeedMax specifies the maximum speed supported in hardware. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn setSpeed(UInt16 kilobytesPerSecond); /* 10.1.0 */ + + /*! + * @function readTOC + * @discussion + * Issue an MMC READ TOC/PMA/ATIP command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param format + * As documented by MMC. + * @param formatAsTime + * As documented by MMC. + * @param trackOrSessionNumber + * As documented by MMC. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readTOC(IOMemoryDescriptor * buffer, + CDTOCFormat format, + UInt8 formatAsTime, + UInt8 trackOrSessionNumber, + UInt16 * actualByteCount); /* 10.1.3 */ + + /*! + * @function readDiscInfo + * @discussion + * Issue an MMC READ DISC INFORMATION command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readDiscInfo(IOMemoryDescriptor * buffer, + UInt16 * actualByteCount); /* 10.1.3 */ + + /*! + * @function readTrackInfo + * @discussion + * Issue an MMC READ TRACK INFORMATION command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param address + * As documented by MMC. + * @param addressType + * As documented by MMC. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readTrackInfo(IOMemoryDescriptor * buffer, + UInt32 address, + CDTrackInfoAddressType addressType, + UInt16 * actualByteCount); /* 10.1.3 */ + + /* + * @function writeCD + * @discussion + * Write data into the CD media object at the specified byte offset from the + * specified buffer, asynchronously. When the write completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the write. + * @param client + * Client requesting the write. + * @param byteStart + * Starting byte offset for the data transfer (see sectorArea parameter). + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param sectorArea + * Sector area(s) to write. The sum of each area's size defines the natural + * block size of the media for the call. This should be taken into account + * when computing the address of byteStart. See IOCDTypes.h. + * @param sectorType + * Sector type that is expected. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + * @param completion + * Completion routine to call once the data transfer is complete. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + */ + +#ifdef __LP64__ + virtual void writeCD(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); +#else /* !__LP64__ */ + virtual void writeCD(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageCompletion completion); /* 10.2.0 */ +#endif /* !__LP64__ */ + + /* + * @function writeCD + * @discussion + * Write data into the CD media object at the specified byte offset from the + * specified buffer, synchronously. When the write completes, this method + * will return to the caller. The actual byte count field is optional. + * @param client + * Client requesting the write. + * @param byteStart + * Starting byte offset for the data transfer (see sectorArea parameter). + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param sectorArea + * Sector area(s) to write. The sum of each area's size defines the natural + * block size of the media for the call. This should be taken into account + * when computing the address of byteStart. See IOCDTypes.h. + * @param sectorType + * Sector type that is expected. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + +#ifdef __LP64__ + virtual IOReturn writeCD(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + CDSectorArea sectorArea, + CDSectorType sectorType, + IOStorageAttributes * attributes = 0, + UInt64 * actualByteCount = 0); +#else /* !__LP64__ */ + virtual IOReturn writeCD(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + CDSectorArea sectorArea, + CDSectorType sectorType, + UInt64 * actualByteCount = 0); /* 10.2.0 */ +#endif /* !__LP64__ */ + +#ifdef __LP64__ + OSMetaClassDeclareReservedUnused(IOCDMedia, 0); + OSMetaClassDeclareReservedUnused(IOCDMedia, 1); + OSMetaClassDeclareReservedUnused(IOCDMedia, 2); + OSMetaClassDeclareReservedUnused(IOCDMedia, 3); + OSMetaClassDeclareReservedUnused(IOCDMedia, 4); + OSMetaClassDeclareReservedUnused(IOCDMedia, 5); + OSMetaClassDeclareReservedUnused(IOCDMedia, 6); +#else /* !__LP64__ */ + OSMetaClassDeclareReservedUsed(IOCDMedia, 0); + OSMetaClassDeclareReservedUsed(IOCDMedia, 1); + OSMetaClassDeclareReservedUsed(IOCDMedia, 2); + OSMetaClassDeclareReservedUsed(IOCDMedia, 3); + OSMetaClassDeclareReservedUsed(IOCDMedia, 4); + OSMetaClassDeclareReservedUsed(IOCDMedia, 5); + OSMetaClassDeclareReservedUsed(IOCDMedia, 6); +#endif /* !__LP64__ */ + OSMetaClassDeclareReservedUnused(IOCDMedia, 7); + OSMetaClassDeclareReservedUnused(IOCDMedia, 8); + OSMetaClassDeclareReservedUnused(IOCDMedia, 9); + OSMetaClassDeclareReservedUnused(IOCDMedia, 10); + OSMetaClassDeclareReservedUnused(IOCDMedia, 11); + OSMetaClassDeclareReservedUnused(IOCDMedia, 12); + OSMetaClassDeclareReservedUnused(IOCDMedia, 13); + OSMetaClassDeclareReservedUnused(IOCDMedia, 14); + OSMetaClassDeclareReservedUnused(IOCDMedia, 15); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOCDMEDIA_H */ diff --git a/i386/include/IOKit/storage/IOCDMediaBSDClient.h b/i386/include/IOKit/storage/IOCDMediaBSDClient.h new file mode 100644 index 0000000..ce31863 --- /dev/null +++ b/i386/include/IOKit/storage/IOCDMediaBSDClient.h @@ -0,0 +1,199 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOCDMEDIABSDCLIENT_H +#define _IOCDMEDIABSDCLIENT_H + +#include <sys/ioctl.h> + +#include <IOKit/storage/IOCDTypes.h> + +/* + * Definitions + * + * ioctl description + * ---------------------------- ------------------------------------------------ + * DKIOCCDREAD see IOCDMedia::readCD() in IOCDMedia.h + * DKIOCCDREADTOC see IOCDMedia::readTOC() in IOCDMedia.h + * + * DKIOCCDREADDISCINFO see IOCDMedia::readDiscInfo() in IOCDMedia.h + * DKIOCCDREADTRACKINFO see IOCDMedia::readTrackInfo() in IOCDMedia.h + * + * DKIOCCDREADISRC see IOCDMedia::readISRC() in IOCDMedia.h + * DKIOCCDREADMCN see IOCDMedia::readMCN() in IOCDMedia.h + * + * DKIOCCDGETSPEED see IOCDMedia::getSpeed() in IOCDMedia.h + * DKIOCCDSETSPEED see IOCDMedia::setSpeed() in IOCDMedia.h + * + * in /System/Library/Frameworks/Kernel.framework/Headers/IOKit/storage/ + */ + +typedef struct +{ + uint64_t offset; + + uint8_t sectorArea; + uint8_t sectorType; + +#ifdef __LP64__ + uint8_t reserved0080[10]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0080[6]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ + + uint32_t bufferLength; /* actual length on return */ + void * buffer; +} dk_cd_read_t; + +typedef struct +{ + CDISRC isrc; + uint8_t track; + + uint8_t reserved0112[2]; /* reserved, clear to zero */ +} dk_cd_read_isrc_t; + +typedef struct +{ + CDMCN mcn; + + uint8_t reserved0112[2]; /* reserved, clear to zero */ +} dk_cd_read_mcn_t; + +typedef struct +{ + uint8_t format; + uint8_t formatAsTime; + + uint8_t reserved0016[5]; /* reserved, clear to zero */ + + union + { + uint8_t session; + uint8_t track; + } address; + +#ifdef __LP64__ + uint8_t reserved0064[6]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0064[2]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ + + uint16_t bufferLength; /* actual length on return */ + void * buffer; +} dk_cd_read_toc_t; + +typedef struct +{ +#ifdef __LP64__ + uint8_t reserved0000[14]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0000[10]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ + + uint16_t bufferLength; /* actual length on return */ + void * buffer; +} dk_cd_read_disc_info_t; + +typedef struct +{ + uint8_t reserved0000[4]; /* reserved, clear to zero */ + + uint32_t address; + uint8_t addressType; + +#ifdef __LP64__ + uint8_t reserved0072[5]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0072[1]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ + + uint16_t bufferLength; /* actual length on return */ + void * buffer; +} dk_cd_read_track_info_t; + +#define DKIOCCDREAD _IOWR('d', 96, dk_cd_read_t) + +#define DKIOCCDREADISRC _IOWR('d', 97, dk_cd_read_isrc_t) +#define DKIOCCDREADMCN _IOWR('d', 98, dk_cd_read_mcn_t) + +#define DKIOCCDGETSPEED _IOR('d', 99, uint16_t) +#define DKIOCCDSETSPEED _IOW('d', 99, uint16_t) + +#define DKIOCCDREADTOC _IOWR('d', 100, dk_cd_read_toc_t) + +#define DKIOCCDREADDISCINFO _IOWR('d', 101, dk_cd_read_disc_info_t) +#define DKIOCCDREADTRACKINFO _IOWR('d', 102, dk_cd_read_track_info_t) + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOCDMedia.h> +#include <IOKit/storage/IOMediaBSDClient.h> + +/* + * Class + */ + +class IOCDMediaBSDClient : public IOMediaBSDClient +{ + OSDeclareDefaultStructors(IOCDMediaBSDClient) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + +public: + + /* + * Obtain this object's provider. We override the superclass's method + * to return a more specific subclass of IOService -- IOCDMedia. This + * method serves simply as a convenience to subclass developers. + */ + + virtual IOCDMedia * getProvider() const; + + /* + * Process a CD-specific ioctl. + */ + + virtual int ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, proc_t proc); + + OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 0); + OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 1); + OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 2); + OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 3); + OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 4); + OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 5); + OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 6); + OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 7); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOCDMEDIABSDCLIENT_H */ diff --git a/i386/include/IOKit/storage/IOCDPartitionScheme.h b/i386/include/IOKit/storage/IOCDPartitionScheme.h new file mode 100644 index 0000000..1ff58c4 --- /dev/null +++ b/i386/include/IOKit/storage/IOCDPartitionScheme.h @@ -0,0 +1,226 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOCDPartitionScheme + * @abstract + * This header contains the IOCDPartitionScheme class definition. + */ + +#ifndef _IOCDPARTITIONSCHEME_H +#define _IOCDPARTITIONSCHEME_H + +#include <IOKit/storage/IOCDTypes.h> + +/*! + * @defined kIOCDPartitionSchemeClass + * @abstract + * kIOCDPartitionSchemeClass is the name of the IOCDPartitionScheme class. + * @discussion + * kIOCDPartitionSchemeClass is the name of the IOCDPartitionScheme class. + */ + +#define kIOCDPartitionSchemeClass "IOCDPartitionScheme" + +/*! + * @defined kIOMediaSessionIDKey + * @abstract + * kIOMediaSessionIDKey is property of IOMedia objects. It has an OSNumber + * value. + * @discussion + * The kIOMediaSessionIDKey property is placed into each IOMedia instance + * created by the CD partition scheme. It identifies the session number + * the track was recorded on. + */ + +#define kIOMediaSessionIDKey "Session ID" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOCDMedia.h> +#include <IOKit/storage/IOPartitionScheme.h> + +/* + * Class + */ + +class IOCDPartitionScheme : public IOPartitionScheme +{ + OSDeclareDefaultStructors(IOCDPartitionScheme); + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + + OSSet * _partitions; /* (set of media objects representing partitions) */ + + /* + * Free all of this object's outstanding resources. + */ + + virtual void free(void); + + /* + * Scan the provider media for CD partitions (in TOC). Returns the set + * of media objects representing each of the partitions (the retain for + * the set is passed to the caller), or null should no CD partitions be + * found. The default probe score can be adjusted up or down, based on + * the confidence of the scan. + */ + + virtual OSSet * scan(SInt32 * score); + + /* + * Ask whether the given partition appears to be corrupt. A partition that + * is corrupt will cause the failure of the CD partition scheme altogether. + */ + + virtual bool isPartitionCorrupt( CDTOCDescriptor * partition, + UInt64 partitionSize, + UInt32 partitionBlockSize, + CDSectorType partitionBlockType, + CDTOC * toc ); + + /* + * Ask whether the given partition appears to be invalid. A partition that + * is invalid will cause it to be skipped in the scan, but will not cause a + * failure of the CD partition scheme. + */ + + virtual bool isPartitionInvalid( CDTOCDescriptor * partition, + UInt64 partitionSize, + UInt32 partitionBlockSize, + CDSectorType partitionBlockType, + CDTOC * toc ); + + /* + * Instantiate a new media object to represent the given partition. + */ + + virtual IOMedia * instantiateMediaObject( + CDTOCDescriptor * partition, + UInt64 partitionSize, + UInt32 partitionBlockSize, + CDSectorType partitionBlockType, + CDTOC * toc ); + + /* + * Allocate a new media object (called from instantiateMediaObject). + */ + + virtual IOMedia * instantiateDesiredMediaObject( + CDTOCDescriptor * partition, + UInt64 partitionSize, + UInt32 partitionBlockSize, + CDSectorType partitionBlockType, + CDTOC * toc ); + +public: + + /* + * Initialize this object's minimal state. + */ + + virtual bool init(OSDictionary * properties = 0); + + /* + * Scan the provider media for CD partitions. + */ + + virtual IOService * probe(IOService * provider, SInt32 * score); + + /* + * Determine whether the provider media contains CD partitions. + */ + + virtual bool start(IOService * provider); + + /* + * Read data from the storage object at the specified byte offset into the + * specified buffer, asynchronously. When the read completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the read. + * + * For the CD partition scheme, we convert the read from a partition + * object into the appropriate readCD command to our provider media. + */ + + virtual void read(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); + + /* + * Write data into the storage object at the specified byte offset from the + * specified buffer, asynchronously. When the write completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the write. + * + * For the CD partition scheme, we convert the write from a partition + * object into the appropriate writeCD command to our provider media. + */ + + virtual void write(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); + + /* + * Obtain this object's provider. We override the superclass's method + * to return a more specific subclass of OSObject -- IOCDMedia. This + * method serves simply as a convenience to subclass developers. + */ + + virtual IOCDMedia * getProvider() const; + + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 0); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 1); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 2); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 3); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 4); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 5); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 6); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 7); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 8); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 9); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 10); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 11); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 12); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 13); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 14); + OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 15); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOCDPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/IOCDTypes.h b/i386/include/IOKit/storage/IOCDTypes.h new file mode 100644 index 0000000..6b1af29 --- /dev/null +++ b/i386/include/IOKit/storage/IOCDTypes.h @@ -0,0 +1,492 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOCDTYPES_H +#define _IOCDTYPES_H + +#include <IOKit/IOTypes.h> +#include <libkern/OSByteOrder.h> + +#pragma pack(push, 1) /* (enable 8-bit struct packing) */ + +/* + * Minutes, Seconds, Frames (M:S:F) + * + * All M:S:F values passed across I/O Kit APIs are guaranteed to be + * binary-encoded numbers (no BCD-encoded numbers are ever passed). + */ + +typedef struct +{ + UInt8 minute; + UInt8 second; + UInt8 frame; +} CDMSF; + +/* + * Media Catalogue Numbers (MCN), International Standard Recording Codes (ISRC) + * + * All MCN and ISRC values passed across I/O Kit APIs are guaranteed + * to have a zero-terminating byte, for convenient use as C strings. + */ + +#define kCDMCNMaxLength 13 +#define kCDISRCMaxLength 12 + +typedef char CDMCN [kCDMCNMaxLength + 1]; +typedef char CDISRC[kCDISRCMaxLength + 1]; + +/* + * Audio Status + * + * All CDAudioStatus fields passed across I/O Kit APIs are guaranteed to + * be binary-encoded numbers (no BCD-encoded numbers are ever passed). + */ + +#define kCDAudioStatusUnsupported 0x00 +#define kCDAudioStatusActive 0x11 +#define kCDAudioStatusPaused 0x12 +#define kCDAudioStatusSuccess 0x13 +#define kCDAudioStatusFailure 0x14 +#define kCDAudioStatusNone 0x15 + +typedef struct +{ + UInt8 status; + struct + { + CDMSF time; + struct + { + UInt8 index; + UInt8 number; + CDMSF time; + } track; + } position; +} CDAudioStatus; + +/* + * Table Of Contents + * + * All CDTOC fields passed across I/O Kit APIs are guaranteed to be + * binary-encoded numbers (no BCD-encoded numbers are ever passed). + */ + +typedef struct +{ + UInt8 session; +#ifdef __LITTLE_ENDIAN__ + UInt8 control:4, adr:4; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 adr:4, control:4; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 tno; + UInt8 point; + CDMSF address; + UInt8 zero; + CDMSF p; +} CDTOCDescriptor; + +typedef struct +{ + UInt16 length; + UInt8 sessionFirst; + UInt8 sessionLast; + CDTOCDescriptor descriptors[0]; +} CDTOC; + +/* + * Table Of Contents Descriptor Count Convenience Function + */ + +static inline UInt32 CDTOCGetDescriptorCount(CDTOC * toc) +{ + UInt32 tocSize = OSSwapBigToHostInt16(toc->length) + (UInt32) sizeof(toc->length); + + return (tocSize < (UInt32) sizeof(CDTOC)) ? 0 : + (tocSize - (UInt32) sizeof(CDTOC)) / (UInt32) sizeof(CDTOCDescriptor); +} + +/* + * M:S:F To LBA Convenience Function + */ + +static inline UInt32 CDConvertMSFToLBA(CDMSF msf) +{ + return (((msf.minute * 60U) + msf.second) * 75U) + msf.frame - 150U; +} + +/* + * M:S:F To Clipped LBA Convenience Function + */ + +static inline UInt32 CDConvertMSFToClippedLBA(CDMSF msf) +{ + return (msf.minute == 0 && msf.second <= 1) ? 0 : CDConvertMSFToLBA(msf); +} + +/* + * LBA To M:S:F Convenience Function + */ + +static inline CDMSF CDConvertLBAToMSF(UInt32 lba) +{ + CDMSF msf; + + lba += 150; + msf.minute = (lba / (75 * 60)); + msf.second = (lba % (75 * 60)) / 75; + msf.frame = (lba % (75 )); + + return msf; +} + +/* + * Track Number To M:S:F Convenience Function + * + * The CDTOC structure is assumed to be complete, that is, none of + * the descriptors are missing or clipped due to an insufficiently + * sized buffer holding the CDTOC contents. + */ + +static inline CDMSF CDConvertTrackNumberToMSF(UInt8 track, CDTOC * toc) +{ + UInt32 count = CDTOCGetDescriptorCount(toc); + UInt32 i; + CDMSF msf = { 0xFF, 0xFF, 0xFF }; + + for (i = 0; i < count; i++) + { + if (toc->descriptors[i].point == track && toc->descriptors[i].adr == 1) + { + msf = toc->descriptors[i].p; + break; + } + } + + return msf; +} + +/* + * Sector Areas, Sector Types + * + * Bytes Per Type CDDA Mode1 Mode2 Mode2Form1 Mode2Form2 + * Per Area +----------+----------+----------+----------+----------+ + * Sync | 0 | 12 | 12 | 12 | 12 | + * Header | 0 | 4 | 4 | 4 | 4 | + * SubHeader | 0 | 0 | 0 | 8 | 8 | + * User | 2352 | 2048 | 2336 | 2048 | 2328 | + * Auxiliary | 0 | 288 | 0 | 280 | 0 | + * ErrorFlags | 294 | 294 | 294 | 294 | 294 | + * SubChannel | 96 | 96 | 96 | 96 | 96 | + * SubChannelQ | 16 | 16 | 16 | 16 | 16 | + * +----------+----------+----------+----------+----------+ + */ + +typedef enum +{ + kCDSectorAreaSync = 0x80, + kCDSectorAreaHeader = 0x20, + kCDSectorAreaSubHeader = 0x40, + kCDSectorAreaUser = 0x10, + kCDSectorAreaAuxiliary = 0x08, + kCDSectorAreaErrorFlags = 0x02, + kCDSectorAreaSubChannel = 0x01, + kCDSectorAreaSubChannelQ = 0x04 +} CDSectorArea; + +typedef enum +{ + kCDSectorTypeUnknown = 0x00, + kCDSectorTypeCDDA = 0x01, + kCDSectorTypeMode1 = 0x02, + kCDSectorTypeMode2 = 0x03, + kCDSectorTypeMode2Form1 = 0x04, + kCDSectorTypeMode2Form2 = 0x05, + kCDSectorTypeCount = 0x06 +} CDSectorType; + +typedef enum +{ + kCDSectorSizeCDDA = 2352, + kCDSectorSizeMode1 = 2048, + kCDSectorSizeMode2 = 2336, + kCDSectorSizeMode2Form1 = 2048, + kCDSectorSizeMode2Form2 = 2328, + kCDSectorSizeWhole = 2352 +} CDSectorSize; + +/* + * Media Types + */ + +typedef enum +{ + kCDMediaTypeUnknown = 0x0100, + kCDMediaTypeROM = 0x0102, /* CD-ROM */ + kCDMediaTypeR = 0x0104, /* CD-R */ + kCDMediaTypeRW = 0x0105, /* CD-RW */ + + kCDMediaTypeMin = 0x0100, + kCDMediaTypeMax = 0x01FF +}; + +typedef UInt32 CDMediaType; + +/* + * Media Speed (kB/s) + */ + +#define kCDSpeedMin 0x00B0 +#define kCDSpeedMax 0xFFFF + +/* + * MMC Formats + */ + +// Read Table Of Contents Format Types +typedef UInt8 CDTOCFormat; +enum +{ + kCDTOCFormatTOC = 0x02, // CDTOC + kCDTOCFormatPMA = 0x03, // CDPMA + kCDTOCFormatATIP = 0x04, // CDATIP + kCDTOCFormatTEXT = 0x05 // CDTEXT +}; + +// Read Table Of Contents Format 0x03 +struct CDPMADescriptor +{ + UInt8 reserved; +#ifdef __LITTLE_ENDIAN__ + UInt8 control:4, adr:4; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 adr:4, control:4; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 tno; + UInt8 point; + CDMSF address; + UInt8 zero; + CDMSF p; +}; +typedef struct CDPMADescriptor CDPMADescriptor; + +struct CDPMA +{ + UInt16 dataLength; + UInt8 reserved; + UInt8 reserved2; + CDPMADescriptor descriptors[0]; +}; +typedef struct CDPMA CDPMA; + +// Read Table Of Contents Format 0x04 +struct CDATIP +{ + UInt16 dataLength; + UInt8 reserved[2]; +#ifdef __LITTLE_ENDIAN__ + UInt8 referenceSpeed:3; + UInt8 reserved3:1; + UInt8 indicativeTargetWritingPower:3; + UInt8 reserved2:1; + + UInt8 reserved5:6; + UInt8 unrestrictedUse:1; + UInt8 reserved4:1; + + UInt8 a3Valid:1; + UInt8 a2Valid:1; + UInt8 a1Valid:1; + UInt8 discSubType:3; + UInt8 discType:1; + UInt8 reserved6:1; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 reserved2:1; + UInt8 indicativeTargetWritingPower:3; + UInt8 reserved3:1; + UInt8 referenceSpeed:3; + + UInt8 reserved4:1; + UInt8 unrestrictedUse:1; + UInt8 reserved5:6; + + UInt8 reserved6:1; + UInt8 discType:1; + UInt8 discSubType:3; + UInt8 a1Valid:1; + UInt8 a2Valid:1; + UInt8 a3Valid:1; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 reserved7; + CDMSF startTimeOfLeadIn; + UInt8 reserved8; + CDMSF lastPossibleStartTimeOfLeadOut; + UInt8 reserved9; + UInt8 a1[3]; + UInt8 reserved10; + UInt8 a2[3]; + UInt8 reserved11; + UInt8 a3[3]; + UInt8 reserved12; +}; +typedef struct CDATIP CDATIP; + +// Read Table Of Contents Format 0x05 +struct CDTEXTDescriptor +{ + UInt8 packType; + UInt8 trackNumber; + UInt8 sequenceNumber; +#ifdef __LITTLE_ENDIAN__ + UInt8 characterPosition:4; + UInt8 blockNumber:3; + UInt8 doubleByteCharacterCode:1; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 doubleByteCharacterCode:1; + UInt8 blockNumber:3; + UInt8 characterPosition:4; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 textData[12]; + UInt8 reserved[2]; +}; +typedef struct CDTEXTDescriptor CDTEXTDescriptor; + +struct CDTEXT +{ + UInt16 dataLength; + UInt8 reserved; + UInt8 reserved2; + CDTEXTDescriptor descriptors[0]; +}; +typedef struct CDTEXT CDTEXT; + +// Read Disc Information Format +struct CDDiscInfo +{ + UInt16 dataLength; +#ifdef __LITTLE_ENDIAN__ + UInt8 discStatus:2; + UInt8 stateOfLastSession:2; + UInt8 erasable:1; + UInt8 reserved:3; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 reserved:3; + UInt8 erasable:1; + UInt8 stateOfLastSession:2; + UInt8 discStatus:2; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 numberOfFirstTrack; + UInt8 numberOfSessionsLSB; + UInt8 firstTrackNumberInLastSessionLSB; + UInt8 lastTrackNumberInLastSessionLSB; +#ifdef __LITTLE_ENDIAN__ + UInt8 reserved3:5; + UInt8 unrestrictedUse:1; + UInt8 discBarCodeValid:1; + UInt8 discIdentificationValid:1; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 discIdentificationValid:1; + UInt8 discBarCodeValid:1; + UInt8 unrestrictedUse:1; + UInt8 reserved3:5; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 discType; + UInt8 numberOfSessionsMSB; + UInt8 firstTrackNumberInLastSessionMSB; + UInt8 lastTrackNumberInLastSessionMSB; + UInt32 discIdentification; + UInt8 reserved7; + CDMSF lastSessionLeadInStartTime; + UInt8 reserved8; + CDMSF lastPossibleStartTimeOfLeadOut; + UInt8 discBarCode[8]; + UInt8 reserved9; + UInt8 numberOfOPCTableEntries; + UInt8 opcTableEntries[0]; +}; +typedef struct CDDiscInfo CDDiscInfo; + +// Read Track Information Address Types +typedef UInt8 CDTrackInfoAddressType; +enum +{ + kCDTrackInfoAddressTypeLBA = 0x00, + kCDTrackInfoAddressTypeTrackNumber = 0x01, + kCDTrackInfoAddressTypeSessionNumber = 0x02, +}; + +// Read Track Information Format +struct CDTrackInfo +{ + UInt16 dataLength; + UInt8 trackNumberLSB; + UInt8 sessionNumberLSB; + UInt8 reserved; +#ifdef __LITTLE_ENDIAN__ + UInt8 trackMode:4; + UInt8 copy:1; + UInt8 damage:1; + UInt8 reserved3:2; + + UInt8 dataMode:4; + UInt8 fixedPacket:1; + UInt8 packet:1; + UInt8 blank:1; + UInt8 reservedTrack:1; + + UInt8 nextWritableAddressValid:1; + UInt8 lastRecordedAddressValid:1; + UInt8 reserved5:6; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 reserved3:2; + UInt8 damage:1; + UInt8 copy:1; + UInt8 trackMode:4; + + UInt8 reservedTrack:1; + UInt8 blank:1; + UInt8 packet:1; + UInt8 fixedPacket:1; + UInt8 dataMode:4; + + UInt8 reserved5:6; + UInt8 lastRecordedAddressValid:1; + UInt8 nextWritableAddressValid:1; +#endif /* !__LITTLE_ENDIAN__ */ + UInt32 trackStartAddress; + UInt32 nextWritableAddress; + UInt32 freeBlocks; + UInt32 fixedPacketSize; + UInt32 trackSize; + UInt32 lastRecordedAddress; + UInt8 trackNumberMSB; + UInt8 sessionNumberMSB; + UInt8 reserved6; + UInt8 reserved7; +}; +typedef struct CDTrackInfo CDTrackInfo; + +#pragma pack(pop) /* (reset to default struct packing) */ + +#endif /* _IOCDTYPES_H */ diff --git a/i386/include/IOKit/storage/IODVDBlockStorageDevice.h b/i386/include/IOKit/storage/IODVDBlockStorageDevice.h new file mode 100644 index 0000000..161651c --- /dev/null +++ b/i386/include/IOKit/storage/IODVDBlockStorageDevice.h @@ -0,0 +1,145 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IODVDBlockStorageDevice + * @abstract + * This header contains the IODVDBlockStorageDevice class definition. + */ + +#ifndef _IODVDBLOCKSTORAGEDEVICE_H +#define _IODVDBLOCKSTORAGEDEVICE_H + +#include <IOKit/storage/IODVDTypes.h> + +/*! + * @defined kIODVDBlockStorageDeviceClass + * @abstract + * kIODVDBlockStorageDeviceClass is the name of the IODVDBlockStorageDevice class. + * @discussion + * kIODVDBlockStorageDeviceClass is the name of the IODVDBlockStorageDevice class. + */ + +#define kIODVDBlockStorageDeviceClass "IODVDBlockStorageDevice" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOCDBlockStorageDevice.h> + +/* Property used for matching, so the generic driver gets the nub it wants. */ +#define kIOBlockStorageDeviceTypeDVD "DVD" + +/*! + * @class + * IODVDBlockStorageDevice : public IOCDBlockStorageDevice + * @abstract + * The IODVDBlockStorageDevice class is a generic DVD block storage device + * abstraction. + * @discussion + * This class is the protocol for generic DVD functionality, independent of + * the physical connection protocol (e.g. SCSI, ATA, USB). + * + * The APIs are the union of CD APIs and all + * necessary new low-level DVD APIs. + * + * A subclass implements relay methods that translate our requests into + * calls to a protocol- and device-specific provider. + */ + +class IODVDBlockStorageDevice : public IOCDBlockStorageDevice { + + OSDeclareAbstractStructors(IODVDBlockStorageDevice) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + +public: + + /* Overrides from IORegistryEntry */ + + virtual bool init(OSDictionary * properties); + + /* New APIs for DVD */ + + virtual IOReturn reportKey(IOMemoryDescriptor *buffer,const DVDKeyClass keyClass, + const UInt32 lba,const UInt8 agid,const DVDKeyFormat keyFormat) = 0; + + virtual IOReturn sendKey(IOMemoryDescriptor *buffer,const DVDKeyClass keyClass, + const UInt8 agid,const DVDKeyFormat keyFormat) = 0; + +#ifdef __LP64__ + virtual IOReturn readDVDStructure(IOMemoryDescriptor *buffer,const DVDStructureFormat format, + const UInt32 address,const UInt8 layer,const UInt8 agid) = 0; +#else /* !__LP64__ */ + virtual IOReturn readDVDStructure(IOMemoryDescriptor *buffer,const DVDStructureFormat format, + const UInt32 address,const UInt8 layer,const UInt8 agid); /* 10.1.0 */ +#endif /* !__LP64__ */ + +#ifdef __LP64__ + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 0); +#else /* !__LP64__ */ + OSMetaClassDeclareReservedUsed(IODVDBlockStorageDevice, 0); +#endif /* !__LP64__ */ + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 1); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 2); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 3); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 4); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 5); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 6); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 7); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 8); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 9); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 10); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 11); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 12); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 13); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 14); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 15); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 16); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 17); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 18); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 19); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 20); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 21); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 22); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 23); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 24); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 25); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 26); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 27); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 28); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 29); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 30); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 31); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IODVDBLOCKSTORAGEDEVICE_H */ diff --git a/i386/include/IOKit/storage/IODVDBlockStorageDriver.h b/i386/include/IOKit/storage/IODVDBlockStorageDriver.h new file mode 100644 index 0000000..d9471f6 --- /dev/null +++ b/i386/include/IOKit/storage/IODVDBlockStorageDriver.h @@ -0,0 +1,219 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * IODVDBlockStorageDriver.h + * + * This class implements DVD functionality, independent of + * the physical connection protocol (e.g. SCSI, ATA, USB). + * + * A protocol-specific provider implements the functionality using an appropriate + * protocol and commands. + */ + +#ifndef _IODVDBLOCKSTORAGEDRIVER_H +#define _IODVDBLOCKSTORAGEDRIVER_H + +#include <IOKit/IOTypes.h> +#include <IOKit/storage/IOCDBlockStorageDriver.h> +#include <IOKit/storage/IODVDBlockStorageDevice.h> +#include <IOKit/storage/IODVDTypes.h> + +/*! + * @defined kIODVDBlockStorageDriverClass + * @abstract + * kIODVDBlockStorageDriverClass is the name of the IODVDBlockStorageDriver class. + * @discussion + * kIODVDBlockStorageDriverClass is the name of the IODVDBlockStorageDriver class. + */ + +#define kIODVDBlockStorageDriverClass "IODVDBlockStorageDriver" + +class IODVDBlockStorageDevice; + +/*! + * @class + * IODVDBlockStorageDriver : public IOCDBlockStorageDriver + * @abstract + * Generic DVD Driver. + * @discussion + * Storage drivers are split into two parts: the Generic Driver handles + * all generic device issues, independent of the lower-level transport + * mechanism (e.g. SCSI, ATA, USB, FireWire). All storage operations + * at the Generic Driver level are translated into a series of generic + * device operations. These operations are passed via the Device Nub + * to a Transport Driver, which implements the appropriate + * transport-dependent protocol to execute these operations. + * + * To determine the write-protect state of a device (or media), for + * example, the generic driver would issue a call to the + * Transport Driver's reportWriteProtection method. If this were a SCSI + * device, its Transport Driver would issue a Mode Sense command to + * extract the write-protection status bit. The Transport Driver then + * reports true or false to the generic driver. + * + * The generic driver therefore has no knowledge of, or involvement + * with, the actual commands and mechanisms used to communicate with + * the device. It is expected that the generic driver will rarely, if + * ever, need to be subclassed to handle device idiosyncrasies; rather, + * the Transport Driver should be changed via overrides. + * + * A generic driver could be subclassed to create a different type of + * generic device. The generic driver IODVDBlockStorageDriver class is a subclass + * of IOCDBlockStorageDriver, adding DVD functions. Similarly, the Transport Driver + * IODVDBlockStorageDevice is a subclass of IOCDBlockStorageDevice, adding DVD + * functions. +*/ + +class IODVDBlockStorageDriver : public IOCDBlockStorageDriver { + + OSDeclareDefaultStructors(IODVDBlockStorageDriver) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + + /* Overrides of IOCDBlockStorageDriver. */ + + virtual IOReturn acceptNewMedia(void); + + /* End of IOCDBlockStorageDriver overrides. */ + +public: + + /* + * Obtain this object's provider. We override the superclass's method to + * return a more specific subclass of IOService -- IODVDBlockStorageDevice. + * This method serves simply as a convenience to subclass developers. + */ + + virtual IODVDBlockStorageDevice * getProvider() const; + + /* Overrides of IOCDBlockStorageDriver: */ + + virtual const char * getDeviceTypeName(void); + virtual IOMedia * instantiateDesiredMediaObject(void); + virtual IOMedia * instantiateMediaObject(UInt64 base,UInt64 byteSize, + UInt32 blockSize,char *mediaName); + + /* End of IOCDBlockStorageDriver overrides. */ + + /*! + * @function reportKey + * @abstract + * Get key info from the DVD drive. + * @discussion + * This function handles the getting of key- and encryption-related data for the drive. + * @param buffer + * A buffer containing information, as documented in the specification + * "MtFuji Commands For Multimedia Devices." + * @param keyClass + * As documented by MtFuji. See DVDKeyClass. + * @param lba + * As documented by MtFuji. + * @param agid + * As documented by MtFuji. + * @param keyFormat + * As documented by MtFuji. See DVDKeyFormat. + */ + virtual IOReturn reportKey(IOMemoryDescriptor *buffer,const DVDKeyClass keyClass, + const UInt32 lba,const UInt8 agid,const DVDKeyFormat keyFormat); + + /*! + * @function sendKey + * @abstract + * Send key info to the DVD drive. + * @discussion + * This function handles the setting of key- and encryption-related data for the drive. + * @param buffer + * A buffer containing information, as documented in the specification + * "MtFuji Commands For Multimedia Devices." + * @param keyClass + * As documented by MtFuji. See DVDKeyClass. + * @param agid + * As documented by MtFuji. + * @param keyFormat + * As documented by MtFuji. See DVDKeyFormat. + */ + virtual IOReturn sendKey(IOMemoryDescriptor *buffer,const DVDKeyClass keyClass, + const UInt8 agid,const DVDKeyFormat keyFormat); + + /*! + * @function readStructure + * @abstract + * Get control structures from the DVD media. + * @discussion + * This function handles the getting of control structure data for the media. + * @param buffer + * A buffer containing information, as documented in the specification + * "MtFuji Commands For Multimedia Devices." + * @param format + * As documented by MtFuji. See DVDStructureFormat. + * @param address + * As documented by MtFuji. + * @param layer + * As documented by MtFuji. + * @param agid + * As documented by MtFuji. + */ + virtual IOReturn readStructure(IOMemoryDescriptor *buffer,const DVDStructureFormat format, + const UInt32 address,const UInt8 layer,const UInt8 agid); /* 10.1.0 */ + +#ifdef __LP64__ + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 0); +#else /* !__LP64__ */ + OSMetaClassDeclareReservedUsed(IODVDBlockStorageDriver, 0); +#endif /* !__LP64__ */ + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 1); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 2); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 3); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 4); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 5); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 6); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 7); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 8); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 9); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 10); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 11); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 12); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 13); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 14); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 15); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 16); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 17); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 18); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 19); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 20); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 21); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 22); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 23); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 24); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 25); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 26); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 27); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 28); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 29); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 30); + OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 31); +}; +#endif diff --git a/i386/include/IOKit/storage/IODVDMedia.h b/i386/include/IOKit/storage/IODVDMedia.h new file mode 100644 index 0000000..02119c3 --- /dev/null +++ b/i386/include/IOKit/storage/IODVDMedia.h @@ -0,0 +1,357 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IODVDMedia + * @abstract + * This header contains the IODVDMedia class definition. + */ + +#ifndef _IODVDMEDIA_H +#define _IODVDMEDIA_H + +/*! + * @defined kIODVDMediaClass + * @abstract + * kIODVDMediaClass is the name of the IODVDMedia class. + * @discussion + * kIODVDMediaClass is the name of the IODVDMedia class. + */ + +#define kIODVDMediaClass "IODVDMedia" + +/*! + * @defined kIODVDMediaTypeKey + * @abstract + * kIODVDMediaTypeKey is a property of IODVDMedia objects. It has an OSString + * value. + * @discussion + * The kIODVDMediaTypeKey property identifies the DVD media type (DVD-ROM, + * DVD-R, DVD-RW, DVD+RW, DVD-RAM, etc). See the kIODVDMediaType contants + * for possible values. + */ + +#define kIODVDMediaTypeKey "Type" + +/*! + * @defined kIODVDMediaTypeROM + * The kIODVDMediaTypeKey constant for DVD-ROM media. + */ + +#define kIODVDMediaTypeROM "DVD-ROM" + +/*! + * @defined kIODVDMediaTypeR + * The kIODVDMediaTypeKey constant for DVD Recordable (DVD-R) media. + */ + +#define kIODVDMediaTypeR "DVD-R" + +/*! + * @defined kIODVDMediaTypeRW + * The kIODVDMediaTypeKey constant for DVD ReWritable (DVD-RW) media. + */ + +#define kIODVDMediaTypeRW "DVD-RW" + +/*! + * @defined kIODVDMediaTypePlusR + * The kIODVDMediaTypeKey constant for DVD "Plus" Recordable (DVD+R) media. + */ + +#define kIODVDMediaTypePlusR "DVD+R" + +/*! + * @defined kIODVDMediaTypePlusRW + * The kIODVDMediaTypeKey constant for DVD "Plus" ReWritable (DVD+RW) media. + */ + +#define kIODVDMediaTypePlusRW "DVD+RW" + +/*! + * @defined kIODVDMediaTypeRAM + * The kIODVDMediaTypeKey constant for DVD-RAM media. + */ + +#define kIODVDMediaTypeRAM "DVD-RAM" + +/*! + * @defined kIODVDMediaTypeHDROM + * The kIODVDMediaTypeKey constant for HD DVD-ROM media. + */ + +#define kIODVDMediaTypeHDROM "HD DVD-ROM" + +/*! + * @defined kIODVDMediaTypeHDR + * The kIODVDMediaTypeKey constant for HD DVD Recordable (HD DVD-R) media. + */ + +#define kIODVDMediaTypeHDR "HD DVD-R" + +/*! + * @defined kIODVDMediaTypeHDRW + * The kIODVDMediaTypeKey constant for HD DVD ReWritable (HD DVD-RW) media. + */ + +#define kIODVDMediaTypeHDRW "HD DVD-RW" + +/*! + * @defined kIODVDMediaTypeHDRAM + * The kIODVDMediaTypeKey constant for HD DVD-RAM media. + */ + +#define kIODVDMediaTypeHDRAM "HD DVD-RAM" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IODVDBlockStorageDriver.h> +#include <IOKit/storage/IOMedia.h> + +/*! + * @class IODVDMedia + * @abstract + * The IODVDMedia class is a random-access disk device abstraction for DVDs. + * @discussion + * The IODVDMedia class is a random-access disk device abstraction for DVDs. + */ + +class IODVDMedia : public IOMedia +{ + OSDeclareDefaultStructors(IODVDMedia) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + +public: + + /* + * Obtain this object's provider. We override the superclass's method to + * return a more specific subclass of IOService -- IODVDBlockStorageDriver. + * This method serves simply as a convenience to subclass developers. + */ + + virtual IODVDBlockStorageDriver * getProvider() const; + + /* + * Compare the properties in the supplied table to this object's properties. + */ + + virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); + + /*! + * @function reportKey + * @discussion + * Issue an MMC REPORT KEY command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. Pass null for the kDVDKeyFormatAGID_Invalidate format + * case. + * @param keyClass + * As documented by MMC. + * @param address + * As documented by MMC. + * @param grantID + * As documented by MMC. + * @param format + * As documented by MMC. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn reportKey( IOMemoryDescriptor * buffer, + const DVDKeyClass keyClass, + const UInt32 address, + const UInt8 grantID, + const DVDKeyFormat format ); /* 10.1.0 */ + + /*! + * @function sendKey + * @discussion + * Issue an MMC SEND KEY command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. Pass null for the kDVDKeyFormatAGID_Invalidate format + * case. + * @param keyClass + * As documented by MMC. + * @param grantID + * As documented by MMC. + * @param format + * As documented by MMC. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn sendKey( IOMemoryDescriptor * buffer, + const DVDKeyClass keyClass, + const UInt8 grantID, + const DVDKeyFormat format ); /* 10.1.0 */ + + /*! + * @function readStructure + * @discussion + * Issue an MMC READ DVD STRUCTURE command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param format + * As documented by MMC. + * @param address + * As documented by MMC. + * @param layer + * As documented by MMC. + * @param grantID + * As documented by MMC. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readStructure( IOMemoryDescriptor * buffer, + const DVDStructureFormat format, + const UInt32 address, + const UInt8 layer, + const UInt8 grantID ); /* 10.1.0 */ + + /*! + * @function getSpeed + * @discussion + * Get the current speed used for data transfers. + * @param kilobytesPerSecond + * Returns the current speed used for data transfers, in kB/s. + * + * kDVDSpeedMin specifies the minimum speed for all DVD media (1X). + * kDVDSpeedMax specifies the maximum speed supported in hardware. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn getSpeed(UInt16 * kilobytesPerSecond); /* 10.1.0 */ + + /*! + * @function setSpeed + * @discussion + * Set the speed to be used for data transfers. + * @param kilobytesPerSecond + * Speed to be used for data transfers, in kB/s. + * + * kDVDSpeedMin specifies the minimum speed for all DVD media (1X). + * kDVDSpeedMax specifies the maximum speed supported in hardware. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn setSpeed(UInt16 kilobytesPerSecond); /* 10.1.0 */ + + /*! + * @function readDiscInfo + * @discussion + * Issue an MMC READ DISC INFORMATION command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readDiscInfo( IOMemoryDescriptor * buffer, + UInt16 * actualByteCount ); /* 10.2.0 */ + + /*! + * @function readRZoneInfo + * @discussion + * Issue an MMC READ RZONE INFORMATION (READ TRACK INFORMATION) command. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param address + * As documented by MMC. + * @param addressType + * As documented by MMC. + * @param actualByteCount + * Returns the actual number of bytes transferred in the data transfer. + * @result + * Returns the status of the data transfer. + */ + + virtual IOReturn readRZoneInfo( IOMemoryDescriptor * buffer, + UInt32 address, + DVDRZoneInfoAddressType addressType, + UInt16 * actualByteCount ); /* 10.2.0 */ + +#ifdef __LP64__ + OSMetaClassDeclareReservedUnused(IODVDMedia, 0); + OSMetaClassDeclareReservedUnused(IODVDMedia, 1); + OSMetaClassDeclareReservedUnused(IODVDMedia, 2); + OSMetaClassDeclareReservedUnused(IODVDMedia, 3); + OSMetaClassDeclareReservedUnused(IODVDMedia, 4); + OSMetaClassDeclareReservedUnused(IODVDMedia, 5); + OSMetaClassDeclareReservedUnused(IODVDMedia, 6); +#else /* !__LP64__ */ + OSMetaClassDeclareReservedUsed(IODVDMedia, 0); + OSMetaClassDeclareReservedUsed(IODVDMedia, 1); + OSMetaClassDeclareReservedUsed(IODVDMedia, 2); + OSMetaClassDeclareReservedUsed(IODVDMedia, 3); + OSMetaClassDeclareReservedUsed(IODVDMedia, 4); + OSMetaClassDeclareReservedUsed(IODVDMedia, 5); + OSMetaClassDeclareReservedUsed(IODVDMedia, 6); +#endif /* !__LP64__ */ + OSMetaClassDeclareReservedUnused(IODVDMedia, 7); + OSMetaClassDeclareReservedUnused(IODVDMedia, 8); + OSMetaClassDeclareReservedUnused(IODVDMedia, 9); + OSMetaClassDeclareReservedUnused(IODVDMedia, 10); + OSMetaClassDeclareReservedUnused(IODVDMedia, 11); + OSMetaClassDeclareReservedUnused(IODVDMedia, 12); + OSMetaClassDeclareReservedUnused(IODVDMedia, 13); + OSMetaClassDeclareReservedUnused(IODVDMedia, 14); + OSMetaClassDeclareReservedUnused(IODVDMedia, 15); + OSMetaClassDeclareReservedUnused(IODVDMedia, 16); + OSMetaClassDeclareReservedUnused(IODVDMedia, 17); + OSMetaClassDeclareReservedUnused(IODVDMedia, 18); + OSMetaClassDeclareReservedUnused(IODVDMedia, 19); + OSMetaClassDeclareReservedUnused(IODVDMedia, 20); + OSMetaClassDeclareReservedUnused(IODVDMedia, 21); + OSMetaClassDeclareReservedUnused(IODVDMedia, 22); + OSMetaClassDeclareReservedUnused(IODVDMedia, 23); + OSMetaClassDeclareReservedUnused(IODVDMedia, 24); + OSMetaClassDeclareReservedUnused(IODVDMedia, 25); + OSMetaClassDeclareReservedUnused(IODVDMedia, 26); + OSMetaClassDeclareReservedUnused(IODVDMedia, 27); + OSMetaClassDeclareReservedUnused(IODVDMedia, 28); + OSMetaClassDeclareReservedUnused(IODVDMedia, 29); + OSMetaClassDeclareReservedUnused(IODVDMedia, 30); + OSMetaClassDeclareReservedUnused(IODVDMedia, 31); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IODVDMEDIA_H */ diff --git a/i386/include/IOKit/storage/IODVDMediaBSDClient.h b/i386/include/IOKit/storage/IODVDMediaBSDClient.h new file mode 100644 index 0000000..2258bf6 --- /dev/null +++ b/i386/include/IOKit/storage/IODVDMediaBSDClient.h @@ -0,0 +1,197 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IODVDMEDIABSDCLIENT_H +#define _IODVDMEDIABSDCLIENT_H + +#include <sys/ioctl.h> + +#include <IOKit/storage/IODVDTypes.h> + +/* + * Definitions + * + * ioctl description + * ---------------------------- ------------------------------------------------ + * DKIOCDVDREADSTRUCTURE see IODVDMedia::readStructure() in IODVDMedia.h + * + * DKIOCDVDREADDISCINFO see IODVDMedia::readDiscInfo() in IODVDMedia.h + * DKIOCDVDREADRZONEINFO see IODVDMedia::readRZoneInfo() in IODVDMedia.h + * + * DKIOCDVDREPORTKEY see IODVDMedia::reportKey() in IODVDMedia.h + * DKIOCDVDSENDKEY see IODVDMedia::sendKey() in IODVDMedia.h + * + * DKIOCDVDGETSPEED see IODVDMedia::getSpeed() in IODVDMedia.h + * DKIOCDVDSETSPEED see IODVDMedia::setSpeed() in IODVDMedia.h + * + * in /System/Library/Frameworks/Kernel.framework/Headers/IOKit/storage/ + */ + +typedef struct +{ + uint8_t format; + + uint8_t reserved0008[3]; /* reserved, clear to zero */ + + uint32_t address; + uint8_t grantID; + uint8_t layer; + +#ifdef __LP64__ + uint8_t reserved0080[4]; /* reserved, clear to zero */ +#endif /* __LP64__ */ + + uint16_t bufferLength; + void * buffer; +} dk_dvd_read_structure_t; + +typedef struct +{ + uint8_t format; + uint8_t keyClass; + + uint8_t reserved0016[2]; /* reserved, clear to zero */ + + uint32_t address; + uint8_t grantID; + +#ifdef __LP64__ + uint8_t reserved0072[5]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0072[1]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ + + uint16_t bufferLength; + void * buffer; +} dk_dvd_report_key_t; + +typedef struct +{ + uint8_t format; + uint8_t keyClass; + + uint8_t reserved0016[6]; /* reserved, clear to zero */ + + uint8_t grantID; + +#ifdef __LP64__ + uint8_t reserved0072[5]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0072[1]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ + + uint16_t bufferLength; + void * buffer; +} dk_dvd_send_key_t; + +typedef struct +{ +#ifdef __LP64__ + uint8_t reserved0000[14]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0000[10]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ + + uint16_t bufferLength; /* actual length on return */ + void * buffer; +} dk_dvd_read_disc_info_t; + +typedef struct +{ + uint8_t reserved0000[4]; /* reserved, clear to zero */ + + uint32_t address; + uint8_t addressType; + +#ifdef __LP64__ + uint8_t reserved0072[5]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0072[1]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ + + uint16_t bufferLength; /* actual length on return */ + void * buffer; +} dk_dvd_read_rzone_info_t; + +#define DKIOCDVDREADSTRUCTURE _IOW('d', 128, dk_dvd_read_structure_t) +#define DKIOCDVDREPORTKEY _IOW('d', 129, dk_dvd_report_key_t) +#define DKIOCDVDSENDKEY _IOW('d', 130, dk_dvd_send_key_t) + +#define DKIOCDVDGETSPEED _IOR('d', 131, uint16_t) +#define DKIOCDVDSETSPEED _IOW('d', 131, uint16_t) + +#define DKIOCDVDREADDISCINFO _IOWR('d', 132, dk_dvd_read_disc_info_t) +#define DKIOCDVDREADRZONEINFO _IOWR('d', 133, dk_dvd_read_rzone_info_t) + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IODVDMedia.h> +#include <IOKit/storage/IOMediaBSDClient.h> + +/* + * Class + */ + +class IODVDMediaBSDClient : public IOMediaBSDClient +{ + OSDeclareDefaultStructors(IODVDMediaBSDClient) + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + +public: + + /* + * Obtain this object's provider. We override the superclass's method + * to return a more specific subclass of IOService -- IODVDMedia. This + * method serves simply as a convenience to subclass developers. + */ + + virtual IODVDMedia * getProvider() const; + + /* + * Process a DVD-specific ioctl. + */ + + virtual int ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, proc_t proc); + + OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 0); + OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 1); + OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 2); + OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 3); + OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 4); + OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 5); + OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 6); + OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 7); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IODVDMEDIABSDCLIENT_H */ diff --git a/i386/include/IOKit/storage/IODVDTypes.h b/i386/include/IOKit/storage/IODVDTypes.h new file mode 100644 index 0000000..039b8fb --- /dev/null +++ b/i386/include/IOKit/storage/IODVDTypes.h @@ -0,0 +1,451 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IODVDTYPES_H +#define _IODVDTYPES_H + +#include <IOKit/IOTypes.h> + +#pragma pack(push, 1) /* (enable 8-bit struct packing) */ + +/* + * Media Types + */ + +enum +{ + kDVDMediaTypeUnknown = 0x0200, + kDVDMediaTypeROM = 0x0202, /* DVD-ROM */ + kDVDMediaTypeRAM = 0x0203, /* DVD-RAM */ + kDVDMediaTypeR = 0x0204, /* DVD-R */ + kDVDMediaTypeRW = 0x0205, /* DVD-RW */ + kDVDMediaTypePlusRW = 0x0206, /* DVD+RW */ + kDVDMediaTypePlusR = 0x0207, /* DVD+R */ + kDVDMediaTypeHDROM = 0x0212, /* HD DVD-ROM */ + kDVDMediaTypeHDRAM = 0x0213, /* HD DVD-RAM */ + kDVDMediaTypeHDR = 0x0214, /* HD DVD-R */ + kDVDMediaTypeHDRW = 0x0215, /* HD DVD-RW */ + + kDVDMediaTypeMin = 0x0200, + kDVDMediaTypeMax = 0x02FF +}; + +typedef UInt32 DVDMediaType; + +/* + * Media Speed (kB/s) + */ + +#define kDVDSpeedMin 0x0546 +#define kDVDSpeedMax 0xFFFF + +/* + * MMC Formats + */ + +typedef UInt8 DVDCPRMRegionCode; +enum +{ + kDVDCPRMRegion1 = 0xFE, + kDVDCPRMRegion2 = 0xFD, + kDVDCPRMRegion3 = 0xFB, + kDVDCPRMRegion4 = 0xF7, + kDVDCPRMRegion5 = 0xEF, + kDVDCPRMRegion6 = 0xDF +}; + +typedef UInt8 DVDRegionalPlaybackControlScheme; +enum +{ + kDVDRegionalPlaybackControlSchemePhase1 = 0x00, + kDVDRegionalPlaybackControlSchemePhase2 = 0x01 +}; + +typedef UInt8 DVDBookType; +enum +{ + kDVDBookTypeROM = 0x0, + kDVDBookTypeRAM = 0x1, + kDVDBookTypeR = 0x2, + kDVDBookTypeRW = 0x3, + kDVDBookTypeHDROM = 0x4, + kDVDBookTypeHDRAM = 0x5, + kDVDBookTypeHDR = 0x6, + kDVDBookTypeHDRW = 0x7, + kDVDBookTypePlusRW = 0x9, + kDVDBookTypePlusR = 0xA, + kDVDBookTypePlusRWDoubleLayer = 0xD, + kDVDBookTypePlusRDoubleLayer = 0xE +}; + +#ifdef __LP64__ +typedef UInt8 DVDKeyClass; +enum +#else /* !__LP64__ */ +enum DVDKeyClass +#endif /* !__LP64__ */ +{ + kDVDKeyClassCSS_CPPM_CPRM = 0x00, + kDVDKeyClassRSSA = 0x01 +}; +#ifndef __LP64__ +typedef enum DVDKeyClass DVDKeyClass; +#endif /* !__LP64__ */ + +#ifdef __LP64__ +typedef UInt8 DVDKeyFormat; +enum +#else /* !__LP64__ */ +enum DVDKeyFormat +#endif /* !__LP64__ */ +{ + kDVDKeyFormatAGID_CSS = 0x00, + kDVDKeyFormatChallengeKey = 0x01, + kDVDKeyFormatKey1 = 0x02, + kDVDKeyFormatKey2 = 0x03, + kDVDKeyFormatTitleKey = 0x04, + kDVDKeyFormatASF = 0x05, + kDVDKeyFormatSetRegion = 0x06, + kDVDKeyFormatRegionState = 0x08, + kDVDKeyFormatAGID_CSS2 = 0x10, + kDVDKeyFormatAGID_CPRM = 0x11, + kDVDKeyFormatAGID_Invalidate = 0x3F +}; +#ifndef __LP64__ +typedef enum DVDKeyFormat DVDKeyFormat; +#endif /* !__LP64__ */ + +typedef UInt8 DVDStructureFormat; +enum +{ + kDVDStructureFormatPhysicalFormatInfo = 0x00, + kDVDStructureFormatCopyrightInfo = 0x01, + kDVDStructureFormatDiscKeyInfo = 0x02, + // skip BCA + kDVDStructureFormatManufacturingInfo = 0x04 +}; + +// Read DVD Structures Format 0x00 +struct DVDPhysicalFormatInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; +#ifdef __LITTLE_ENDIAN__ + // Byte 0 + UInt8 partVersion:4; + UInt8 bookType:4; + + // Byte 1 + UInt8 minimumRate:4; + UInt8 discSize:4; + + // Byte 2 + UInt8 layerType:4; + UInt8 trackPath:1; + UInt8 numberOfLayers:2; + UInt8 reserved2:1; + + // Byte 3 + UInt8 trackDensity:4; + UInt8 linearDensity:4; +#else /* !__LITTLE_ENDIAN__ */ + // Byte 0 + UInt8 bookType:4; + UInt8 partVersion:4; + + // Byte 1 + UInt8 discSize:4; + UInt8 minimumRate:4; + + // Byte 2 + UInt8 reserved2:1; + UInt8 numberOfLayers:2; + UInt8 trackPath:1; + UInt8 layerType:4; + + // Byte 3 + UInt8 linearDensity:4; + UInt8 trackDensity:4; +#endif /* !__LITTLE_ENDIAN__ */ + + // Bytes 4-15 + UInt8 zero1; // always 0x00 + UInt8 startingPhysicalSectorNumberOfDataArea[3]; + UInt8 zero2; // always 0x00 + UInt8 endPhysicalSectorNumberOfDataArea[3]; + UInt8 zero3; // always 0x00 + UInt8 endSectorNumberInLayerZero[3]; + + // Byte 16 +#ifdef __LITTLE_ENDIAN__ + UInt8 reserved1:7; + UInt8 bcaFlag:1; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 bcaFlag:1; + UInt8 reserved1:7; +#endif /* !__LITTLE_ENDIAN__ */ + + // Bytes 17-2047 + UInt8 mediaSpecific[2031]; +}; +typedef struct DVDPhysicalFormatInfo DVDPhysicalFormatInfo; + +// Read DVD Structures Format 0x01 +struct DVDCopyrightInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; + UInt8 copyrightProtectionSystemType; + DVDCPRMRegionCode regionMask; + UInt8 reserved2[2]; +}; +typedef struct DVDCopyrightInfo DVDCopyrightInfo; + +// Read DVD Structures Format 0x02 +struct DVDDiscKeyInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; + UInt8 discKeyStructures[2048]; +}; +typedef struct DVDDiscKeyInfo DVDDiscKeyInfo; + +// Read DVD Structures Format 0x04 +struct DVDManufacturingInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; + UInt8 discManufacturingInfo[2048]; +}; +typedef struct DVDManufacturingInfo DVDManufacturingInfo; + +// ReportKey Format 0x00 +struct DVDAuthenticationGrantIDInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; + UInt8 reserved2[3]; +#ifdef __LITTLE_ENDIAN__ + UInt8 reservedBits:6; + UInt8 grantID:2; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 grantID:2; + UInt8 reservedBits:6; +#endif /* !__LITTLE_ENDIAN__ */ +}; +typedef struct DVDAuthenticationGrantIDInfo DVDAuthenticationGrantIDInfo; + +// ReportKey and SendKey Format 0x01 +struct DVDChallengeKeyInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; + UInt8 challengeKeyValue[10]; + UInt8 reserved2[2]; +}; +typedef struct DVDChallengeKeyInfo DVDChallengeKeyInfo; + +// ReportKey Format 0x02 +struct DVDKey1Info +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; + UInt8 key1Value[5]; + UInt8 reserved2[3]; +}; +typedef struct DVDKey1Info DVDKey1Info; + +// SendKey Format 0x03 +struct DVDKey2Info +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; + UInt8 key2Value[5]; + UInt8 reserved2[3]; +}; +typedef struct DVDKey2Info DVDKey2Info; + +// ReportKey Format 0x04 +struct DVDTitleKeyInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; +#ifdef __LITTLE_ENDIAN__ + UInt8 CP_MOD:4; + UInt8 CGMS:2; + UInt8 CP_SEC:1; + UInt8 CPM:1; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 CPM:1; + UInt8 CP_SEC:1; + UInt8 CGMS:2; + UInt8 CP_MOD:4; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 titleKeyValue[5]; + UInt8 reserved2[2]; +}; +typedef struct DVDTitleKeyInfo DVDTitleKeyInfo; + +// ReportKey Format 0x05 +struct DVDAuthenticationSuccessFlagInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; + UInt8 reserved2[3]; +#ifdef __LITTLE_ENDIAN__ + UInt8 successFlag:1; + UInt8 reservedBits:7; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 reservedBits:7; + UInt8 successFlag:1; +#endif /* !__LITTLE_ENDIAN__ */ +}; +typedef struct DVDAuthenticationSuccessFlagInfo DVDAuthenticationSuccessFlagInfo; + +// ReportKey Format 0x08 +struct DVDRegionPlaybackControlInfo +{ + UInt8 dataLength[2]; + UInt8 reserved[2]; +#ifdef __LITTLE_ENDIAN__ + UInt8 numberUserResets:3; + UInt8 numberVendorResets:3; + UInt8 typeCode:2; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 typeCode:2; + UInt8 numberVendorResets:3; + UInt8 numberUserResets:3; +#endif /* !__LITTLE_ENDIAN__ */ + DVDCPRMRegionCode driveRegion; + DVDRegionalPlaybackControlScheme rpcScheme; + UInt8 reserved2; +}; +typedef struct DVDRegionPlaybackControlInfo DVDRegionPlaybackControlInfo; + +// Read Disc Information Format +struct DVDDiscInfo +{ + UInt16 dataLength; +#ifdef __LITTLE_ENDIAN__ + UInt8 discStatus:2; + UInt8 stateOfLastBorder:2; + UInt8 erasable:1; + UInt8 reserved:3; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 reserved:3; + UInt8 erasable:1; + UInt8 stateOfLastBorder:2; + UInt8 discStatus:2; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 reserved2; + UInt8 numberOfBordersLSB; + UInt8 firstRZoneNumberInLastBorderLSB; + UInt8 lastRZoneNumberInLastBorderLSB; +#ifdef __LITTLE_ENDIAN__ + UInt8 reserved3:5; + UInt8 unrestrictedUse:1; + UInt8 discBarCodeValid:1; + UInt8 reserved4:1; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 reserved4:1; + UInt8 discBarCodeValid:1; + UInt8 unrestrictedUse:1; + UInt8 reserved3:5; +#endif /* !__LITTLE_ENDIAN__ */ + UInt8 reserved5; + UInt8 numberOfBordersMSB; + UInt8 firstRZoneNumberInLastBorderMSB; + UInt8 lastRZoneNumberInLastBorderMSB; + UInt8 reserved6[4]; + UInt8 reserved7[4]; + UInt8 reserved8[4]; + UInt8 discBarCode[8]; + UInt8 reserved9; + UInt8 numberOfOPCTableEntries; + UInt8 opcTableEntries[0]; +}; +typedef struct DVDDiscInfo DVDDiscInfo; + +// Read RZone Information Address Types +typedef UInt8 DVDRZoneInfoAddressType; +enum +{ + kDVDRZoneInfoAddressTypeLBA = 0x00, + kDVDRZoneInfoAddressTypeRZoneNumber = 0x01, + kDVDRZoneInfoAddressTypeBorderNumber = 0x02, +}; + +// Read RZone Information Format +struct DVDRZoneInfo +{ + UInt16 dataLength; + UInt8 rzoneNumberLSB; + UInt8 borderNumberLSB; + UInt8 reserved; +#ifdef __LITTLE_ENDIAN__ + UInt8 reserved2:4; + UInt8 copy:1; + UInt8 damage:1; + UInt8 reserved3:2; + + UInt8 reserved4:4; + UInt8 restrictedOverwrite:1; + UInt8 incremental:1; + UInt8 blank:1; + UInt8 reservedRZone:1; + + UInt8 nextWritableAddressValid:1; + UInt8 lastRecordedAddressValid:1; + UInt8 reserved5:6; +#else /* !__LITTLE_ENDIAN__ */ + UInt8 reserved3:2; + UInt8 damage:1; + UInt8 copy:1; + UInt8 reserved2:4; + + UInt8 reservedRZone:1; + UInt8 blank:1; + UInt8 incremental:1; + UInt8 restrictedOverwrite:1; + UInt8 reserved4:4; + + UInt8 reserved5:6; + UInt8 lastRecordedAddressValid:1; + UInt8 nextWritableAddressValid:1; +#endif /* !__LITTLE_ENDIAN__ */ + UInt32 rzoneStartAddress; + UInt32 nextWritableAddress; + UInt32 freeBlocks; + UInt32 blockingFactor; + UInt32 rzoneSize; + UInt32 lastRecordedAddress; + UInt8 rzoneNumberMSB; + UInt8 borderNumberMSB; + UInt8 reserved6; + UInt8 reserved7; +}; +typedef struct DVDRZoneInfo DVDRZoneInfo; + +#pragma pack(pop) /* (reset to default struct packing) */ + +#endif /* _IODVDTYPES_H */ diff --git a/i386/include/IOKit/storage/IOFDiskPartitionScheme.h b/i386/include/IOKit/storage/IOFDiskPartitionScheme.h new file mode 100644 index 0000000..7f96255 --- /dev/null +++ b/i386/include/IOKit/storage/IOFDiskPartitionScheme.h @@ -0,0 +1,105 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * This header contains the IOFDiskPartitionScheme class definition. + */ + +#ifndef _IOFDISKPARTITIONSCHEME_H +#define _IOFDISKPARTITIONSCHEME_H + +#include <IOKit/IOTypes.h> + +/* + * kIOFDiskPartitionSchemeClass is the name of the IOFDiskPartitionScheme class. + */ + +#define kIOFDiskPartitionSchemeClass "IOFDiskPartitionScheme" + +/* + * FDisk Partition Map Definitions + */ + +#pragma pack(push, 1) /* (enable 8-bit struct packing) */ + +/* Structure constants. */ + +#define DISK_BLK0SZ sizeof(struct disk_blk0) /* (size of partition map) */ +#define DISK_BOOTSZ 446 /* (size of boot code in map) */ +#define DISK_NPART 4 /* (number of entries in map) */ + +/* Partition map entry. */ + +struct fdisk_part +{ + UInt8 bootid; /* (is active boot partition?) */ + UInt8 beghead; /* (beginning head) */ + UInt8 begsect; /* (beginning sector; beginning cylinder, high 2 bits) */ + UInt8 begcyl; /* (beginning cylinder, low 8 bits) */ + UInt8 systid; /* (type) */ + UInt8 endhead; /* (ending head) */ + UInt8 endsect; /* (ending sector; ending cylinder, high 2 bits) */ + UInt8 endcyl; /* (ending cylinder, low 8 bits) */ + UInt32 relsect; /* (block start) */ + UInt32 numsect; /* (block count) */ +}; + +/* Partition map, as found in block zero of the disk (or extended partition). */ + +struct disk_blk0 +{ + UInt8 bootcode[DISK_BOOTSZ]; /* (boot code) */ + struct fdisk_part parts[DISK_NPART]; /* (partition entries) */ + UInt16 signature; /* (unique signature for map) */ +}; + +/* Partition map signature (signature). */ + +#define DISK_SIGNATURE 0xAA55 + +/* Partition map entry types (systid). */ + +#define FDISK_PARTITION_TYPE_01 "DOS_FAT_12" +#define FDISK_PARTITION_TYPE_04 "DOS_FAT_16_S" +#define FDISK_PARTITION_TYPE_06 "DOS_FAT_16" +#define FDISK_PARTITION_TYPE_07 "Windows_NTFS" +#define FDISK_PARTITION_TYPE_0B "DOS_FAT_32" +#define FDISK_PARTITION_TYPE_0C "Windows_FAT_32" +#define FDISK_PARTITION_TYPE_0E "Windows_FAT_16" +#define FDISK_PARTITION_TYPE_42 "Windows_LDM" +#define FDISK_PARTITION_TYPE_82 "Linux_Swap" +#define FDISK_PARTITION_TYPE_83 "Linux" +#define FDISK_PARTITION_TYPE_8E "Linux_LVM" +#define FDISK_PARTITION_TYPE_A5 "FreeBSD" +#define FDISK_PARTITION_TYPE_A6 "OpenBSD" +#define FDISK_PARTITION_TYPE_A7 "Apple_Rhapsody_UFS" +#define FDISK_PARTITION_TYPE_A8 "Apple_UFS" +#define FDISK_PARTITION_TYPE_A9 "NetBSD" +#define FDISK_PARTITION_TYPE_AB "Apple_Boot" +#define FDISK_PARTITION_TYPE_AE "Apple_Encrypted" +#define FDISK_PARTITION_TYPE_AF "Apple_HFS" +#define FDISK_PARTITION_TYPE_FD "Linux_RAID" + +#pragma pack(pop) /* (reset to default struct packing) */ + +#endif /* !_IOFDISKPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/IOFilterScheme.h b/i386/include/IOKit/storage/IOFilterScheme.h new file mode 100644 index 0000000..406b596 --- /dev/null +++ b/i386/include/IOKit/storage/IOFilterScheme.h @@ -0,0 +1,289 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOFilterScheme + * @abstract + * This header contains the IOFilterScheme class definition. + */ + +#ifndef _IOFILTERSCHEME_H +#define _IOFILTERSCHEME_H + +/*! + * @defined kIOFilterSchemeClass + * @abstract + * The name of the IOFilterScheme class. + * @discussion + * kIOFilterSchemeClass is the name of the IOFilterScheme class. + */ + +#define kIOFilterSchemeClass "IOFilterScheme" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOMedia.h> +#include <IOKit/storage/IOStorage.h> + +/*! + * @class IOFilterScheme + * @abstract + * The common base class for all filter scheme + * objects. + * @discussion + * The IOFilterScheme class is the common base class for all filter scheme + * objects. It extends the IOStorage class by implementing the appropriate + * open and close semantics for filter objects (standard semantics are act + * as a relay for incoming opens, producing one outgoing open for each + * incoming open). It also implements the default read and write semantics, + * which pass all reads and writes through to the provider media unprocessed. + * For simple schemes, the default behavior is sufficient. More complex + * filter schemes such as RAID will want to do extra processing for reads + * and writes. + */ + +class IOFilterScheme : public IOStorage +{ + OSDeclareDefaultStructors(IOFilterScheme); + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + + /*! + * @function handleOpen + * @discussion + * The handleOpen method grants or denies permission to access this object + * to an interested client. The argument is an IOStorageAccess value that + * specifies the level of access desired -- reader or reader-writer. + * + * This method can be invoked to upgrade or downgrade the access level for + * an existing client as well. The previous access level will prevail for + * upgrades that fail, of course. A downgrade should never fail. If the + * new access level should be the same as the old for a given client, this + * method will do nothing and return success. In all cases, one, singular + * close-per-client is expected for all opens-per-client received. + * + * This implementation replaces the IOService definition of handleOpen(). + * @param client + * Client requesting the open. + * @param options + * Options for the open. Set to zero. + * @param access + * Access level for the open. Set to kIOStorageAccessReader or + * kIOStorageAccessReaderWriter. + * @result + * Returns true if the open was successful, false otherwise. + */ + + virtual bool handleOpen(IOService * client, + IOOptionBits options, + void * access); + + /*! + * @function handleIsOpen + * @discussion + * The handleIsOpen method determines whether the specified client, or any + * client if none is specified, presently has an open on this object. + * + * This implementation replaces the IOService definition of handleIsOpen(). + * @param client + * Client to check the open state of. Set to zero to check the open state + * of all clients. + * @result + * Returns true if the client was (or clients were) open, false otherwise. + */ + + virtual bool handleIsOpen(const IOService * client) const; + + /*! + * @function handleClose + * @discussion + * The handleClose method closes the client's access to this object. + * + * This implementation replaces the IOService definition of handleClose(). + * @param client + * Client requesting the close. + * @param options + * Options for the close. Set to zero. + */ + + virtual void handleClose(IOService * client, IOOptionBits options); + +public: + + using IOStorage::read; + using IOStorage::write; + + /*! + * @function read + * @discussion + * Read data from the storage object at the specified byte offset into the + * specified buffer, asynchronously. When the read completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the read. + * + * For simple filter schemes, the default behavior is to simply pass the + * read through to the provider media. More complex filter schemes such + * as RAID will need to do extra processing here. + * @param client + * Client requesting the read. + * @param byteStart + * Starting byte offset for the data transfer. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + * @param completion + * Completion routine to call once the data transfer is complete. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + */ + + virtual void read(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); + + /*! + * @function write + * @discussion + * Write data into the storage object at the specified byte offset from the + * specified buffer, asynchronously. When the write completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the write. + * + * For simple filter schemes, the default behavior is to simply pass the + * write through to the provider media. More complex filter schemes such + * as RAID will need to do extra processing here. + * @param client + * Client requesting the write. + * @param byteStart + * Starting byte offset for the data transfer. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + * @param completion + * Completion routine to call once the data transfer is complete. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + */ + + virtual void write(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); + + /*! + * @function synchronizeCache + * @discussion + * Flush the cached data in the storage object, if any, synchronously. + * @param client + * Client requesting the cache synchronization. + * @result + * Returns the status of the cache synchronization. + */ + + virtual IOReturn synchronizeCache(IOService * client); + + /*! + * @function discard + * @discussion + * Delete unused data from the storage object at the specified byte offset, + * synchronously. + * @param client + * Client requesting the operation. + * @param byteStart + * Starting byte offset for the operation. + * @param byteCount + * Size of the operation. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn discard(IOService * client, + UInt64 byteStart, + UInt64 byteCount); + + /* + * Obtain this object's provider. We override the superclass's method + * to return a more specific subclass of OSObject -- an IOMedia. This + * method serves simply as a convenience to subclass developers. + */ + + virtual IOMedia * getProvider() const; + + OSMetaClassDeclareReservedUnused(IOFilterScheme, 0); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 1); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 2); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 3); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 4); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 5); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 6); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 7); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 8); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 9); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 10); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 11); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 12); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 13); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 14); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 15); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 16); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 17); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 18); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 19); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 20); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 21); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 22); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 23); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 24); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 25); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 26); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 27); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 28); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 29); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 30); + OSMetaClassDeclareReservedUnused(IOFilterScheme, 31); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOFILTERSCHEME_H */ diff --git a/i386/include/IOKit/storage/IOFireWireStorageCharacteristics.h b/i386/include/IOKit/storage/IOFireWireStorageCharacteristics.h new file mode 100644 index 0000000..710f29f --- /dev/null +++ b/i386/include/IOKit/storage/IOFireWireStorageCharacteristics.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ +#define _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ + +// +// Bridge Characteristics - Characteristics defined for FireWire bridges. +// + +/*! +@defined kIOPropertyBridgeCharacteristicsKey +@discussion This key is used to define Bridge Characteristics for a particular +devices's bridge chipset. It has an associated dictionary which lists the +bridge characteristics. + +Requirement: Optional + +Example: +<pre> +@textblock +<dict> + <key>Bridge Characteristics</key> + <dict> + <key>Bridge Vendor Name</key> + <string>Oxford Semiconductor</string> + <key>Bridge Model Name</key> + <string>FW911</string> + <key>Bridge Revision Level</key> + <string>3.7</string> + </dict> +</dict> +@/textblock +</pre> +*/ + +#define kIOPropertyBridgeCharacteristicsKey "Bridge Characteristics" +#define kIOPropertyBridgeVendorNameKey "Bridge Vendor Name" +#define kIOPropertyBridgeModelNameKey "Bridge Model Name" +#define kIOPropertyBridgeRevisionLevelKey "Bridge Revision Level" + +#endif /* _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ */ \ No newline at end of file diff --git a/i386/include/IOKit/storage/IOGUIDPartitionScheme.h b/i386/include/IOKit/storage/IOGUIDPartitionScheme.h new file mode 100644 index 0000000..3e197d0 --- /dev/null +++ b/i386/include/IOKit/storage/IOGUIDPartitionScheme.h @@ -0,0 +1,90 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * This header contains the IOGUIDPartitionScheme class definition. + */ + +#ifndef _IOGUIDPARTITIONSCHEME_H +#define _IOGUIDPARTITIONSCHEME_H + +#include <IOKit/IOTypes.h> + +typedef unsigned char uuid_t[16]; +/* + * kIOGUIDPartitionSchemeClass is the name of the IOGUIDPartitionScheme class. + */ + +#define kIOGUIDPartitionSchemeClass "IOGUIDPartitionScheme" + + +#pragma pack(push, 1) /* (enable 8-bit struct packing) */ + +/* Partition map. */ + +struct gpt_hdr +{ + uint8_t hdr_sig[8]; + uint32_t hdr_revision; + uint32_t hdr_size; + uint32_t hdr_crc_self; + uint32_t __reserved; + uint64_t hdr_lba_self; + uint64_t hdr_lba_alt; + uint64_t hdr_lba_start; + uint64_t hdr_lba_end; + uuid_t hdr_uuid; + uint64_t hdr_lba_table; + uint32_t hdr_entries; + uint32_t hdr_entsz; + uint32_t hdr_crc_table; + uint32_t padding; +}; + +/* Partition map entry. */ + +struct gpt_ent +{ + uuid_t ent_type; + uuid_t ent_uuid; + uint64_t ent_lba_start; + uint64_t ent_lba_end; + uint64_t ent_attr; + uint16_t ent_name[36]; +}; + +/* Partition map signature (hdr_sig). */ + +#define GPT_HDR_SIG "EFI PART" + +/* Partition map version (hdr_revision). */ + +#define GPT_HDR_REVISION 0x00010000 + +/* Partition map entry flags (ent_attr). */ + +#define GPT_ENT_ATTR_PLATFORM 0x00000001 + +#pragma pack(pop) /* (reset to default struct packing) */ + +#endif /* !_IOGUIDPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/IOMedia.h b/i386/include/IOKit/storage/IOMedia.h new file mode 100644 index 0000000..64052ec --- /dev/null +++ b/i386/include/IOKit/storage/IOMedia.h @@ -0,0 +1,231 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOMedia + * @abstract + * This header contains the IOMedia class definition. + */ + +#ifndef _IOMEDIA_H +#define _IOMEDIA_H + +#include <IOKit/IOTypes.h> + +/*! + * @defined kIOMediaClass + * @abstract + * The name of the IOMedia class. + */ + +#define kIOMediaClass "IOMedia" + +/*! + * @defined kIOMediaContentKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaContentKey property has an OSString + * value and contains a description of the media's + * contents. The description is the same as the hint at the time of the + * object's creation, but it is possible that the description has been overridden + * by a client (which has probed the media and identified the content correctly) + * of the media object. It is more accurate than the hint for this reason. The + * string is formed in the likeness of Apple's "Apple_HFS" strings or in the + * likeness of a UUID. + */ + +#define kIOMediaContentKey "Content" + +/*! + * @defined kIOMediaContentHintKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaContentHintKey property has an OSString + * value and contains a hint of the media's contents. + * The hint is set at the time of the object's creation, should the creator have + * a clue as to what it may contain. The hint string does not change for the + * lifetime of the object and is formed in the likeness of Apple's "Apple_HFS" + * strings or in the likeness of a UUID. + */ + +#define kIOMediaContentHintKey "Content Hint" + +/*! + * @defined kIOMediaEjectableKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaEjectableKey property has an OSBoolean + * value and describes whether the media is ejectable + * from the drive mechanism under software control. Implies IOMediaRemovable + * is also true. + */ + +#define kIOMediaEjectableKey "Ejectable" + +/*! + * @defined kIOMediaLeafKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaLeafKey property has an OSBoolean value and describes whether the media is a leaf, that is, + * it is the deepest media object in this branch of the I/O Registry. + */ + +#define kIOMediaLeafKey "Leaf" + +/*! + * @defined kIOMediaOpenKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaOpenKey property has an OSBoolean value and describes whether + * a client presently has an open on this media. + */ + +#define kIOMediaOpenKey "Open" + +/*! + * @defined kIOMediaPreferredBlockSizeKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaPreferredBlockSizeKey property has an + * OSNumber value and describes the media's natural + * block size in bytes. This information is useful to clients that want to + * optimize access to the media. + */ + +#define kIOMediaPreferredBlockSizeKey "Preferred Block Size" + +/*! + * @defined kIOMediaRemovableKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaRemovableKey property has an OSBoolean + * value and describes whether the media is removable + * from the drive mechanism. + */ + +#define kIOMediaRemovableKey "Removable" + +/*! + * @defined kIOMediaSizeKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaSizeKey property has an OSNumber value and describes the total length of the media in + * bytes. + */ + +#define kIOMediaSizeKey "Size" + +/*! + * @defined kIOMediaUUIDKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaUUIDKey property has an OSString value and contains a persistent + * Universal Unique Identifier for the media if such an identifier is available. + */ + +#define kIOMediaUUIDKey "UUID" + +/*! + * @defined kIOMediaWholeKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaWholeKey property has an OSBoolean + * value and describes whether the media is whole, that is, + * it represents the whole disk (the physical disk, or a virtual replica + * thereof). + */ + +#define kIOMediaWholeKey "Whole" + +/*! + * @defined kIOMediaWritableKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaWritableKey property has an OSBoolean + * value and describes whether the media is writable. + */ + +#define kIOMediaWritableKey "Writable" + +/*! + * @defined kIOMediaContentMaskKey + * @abstract + * A property of IOMedia clients. + * @discussion + * The kIOMediaContentMaskKey property has an OSString + * value and must exist in all IOMedia clients that + * drive new content (that is, produce new media objects). When the client + * matches against the provider media, the value of the client's + * kIOMediaContentMaskKey property is used to replace the provider's + * kIOMediaContentKey property. + */ + +#define kIOMediaContentMaskKey "Content Mask" + +/*! + * @defined kIOMediaIconKey + * @abstract + * A property of any object in the media stack. + * @discussion + * kIOMediaIconKey is a property of any object in the media stack that wishes + * to override the default icon shown for the media objects in the stack. It + * is usually defined in a provider object below the media object. It has an + * OSDictionary value, with properties identical to the kIOIconKey definition, + * that is, kCFBundleIdentifierKey and kIOBundleResourceFileKey. + */ + +#define kIOMediaIconKey "IOMediaIcon" + +/*! + * @enum IOMediaAttributeMask + * @discussion + * The IOMediaAttributeMask bit mask describes various attributes of + * the media object, such as its ejectability and its removability. + * @constant kIOMediaAttributeEjectableMask + * Indicates whether the media is ejectable from the drive mechanism + * under software control. Implies kIOMediaAttributeRemovableMask. + * @constant kIOMediaAttributeRemovableMask + * Indicates whether the media is removable from the drive mechanism. + */ + +enum +{ + kIOMediaAttributeEjectableMask = 0x00000001, + kIOMediaAttributeRemovableMask = 0x00000002, + kIOMediaAttributeReservedMask = 0xFFFFFFFC +}; + +typedef UInt32 IOMediaAttributeMask; + +#endif /* !_IOMEDIA_H */ diff --git a/i386/include/IOKit/storage/IOMediaBSDClient.h b/i386/include/IOKit/storage/IOMediaBSDClient.h new file mode 100644 index 0000000..56a3117 --- /dev/null +++ b/i386/include/IOKit/storage/IOMediaBSDClient.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOMEDIABSDCLIENT_H +#define _IOMEDIABSDCLIENT_H + +#include <sys/disk.h> + +#endif /* !_IOMEDIABSDCLIENT_H */ diff --git a/i386/include/IOKit/storage/IOPartitionScheme.h b/i386/include/IOKit/storage/IOPartitionScheme.h new file mode 100644 index 0000000..7a1de37 --- /dev/null +++ b/i386/include/IOKit/storage/IOPartitionScheme.h @@ -0,0 +1,373 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOPartitionScheme + * @abstract + * This header contains the IOPartitionScheme class definition. + */ + +#ifndef _IOPARTITIONSCHEME_H +#define _IOPARTITIONSCHEME_H + +/*! + * @defined kIOPartitionSchemeClass + * @abstract + * The name of the IOPartitionScheme class. + * @discussion + * kIOPartitionSchemeClass is the name of the IOPartitionScheme class. + */ + +#define kIOPartitionSchemeClass "IOPartitionScheme" + +/*! + * @defined kIOMediaLiveKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaLiveKey property has an OSBoolean + * value and is placed into an IOMedia instance + * created via the partition scheme. It describes whether the + * partition is live, that is, it is up-to-date with respect + * to the on-disk partition table. + */ + +#define kIOMediaLiveKey "Live" + +/*! + * @defined kIOMediaPartitionIDKey + * @abstract + * A property of IOMedia objects. + * @discussion + * The kIOMediaPartitionIDKey property has an OSNumber + * value and is placed into an IOMedia instance + * created via the partition scheme. It is an ID that differentiates one + * partition from the other (within a given scheme). It is typically an index + * into the on-disk partition table. + */ + +#define kIOMediaPartitionIDKey "Partition ID" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/storage/IOMedia.h> +#include <IOKit/storage/IOStorage.h> + +/*! + * @class IOPartitionScheme + * @abstract + * The common base class for all partition scheme + * objects. + * @discussion + * The IOPartitionScheme class is the common base class for all partition scheme + * objects. It extends the IOStorage class by implementing the appropriate open + * and close semantics for partition objects (standard semantics are to act as a + * multiplexor for incoming opens, producing one outgoing open with the correct + * access). It also implements the default read and write semantics, which pass + * all reads and writes through to the provider media unprocessed. For simple + * schemes, the default behavior is sufficient. More complex partition schemes + * such as RAID will want to do extra processing for reads and writes. + */ + +class IOPartitionScheme : public IOStorage +{ + OSDeclareDefaultStructors(IOPartitionScheme); + +protected: + + struct ExpansionData { /* */ }; + ExpansionData * _expansionData; + + IOStorageAccess _openLevel; + OSSet * _openReaders; + OSSet * _openReaderWriters; + + /* + * Free all of this object's outstanding resources. + */ + + virtual void free(); + + /*! + * @function handleOpen + * @discussion + * The handleOpen method grants or denies permission to access this object + * to an interested client. The argument is an IOStorageAccess value that + * specifies the level of access desired -- reader or reader-writer. + * + * This method can be invoked to upgrade or downgrade the access level for + * an existing client as well. The previous access level will prevail for + * upgrades that fail, of course. A downgrade should never fail. If the + * new access level should be the same as the old for a given client, this + * method will do nothing and return success. In all cases, one, singular + * close-per-client is expected for all opens-per-client received. + * + * This implementation replaces the IOService definition of handleOpen(). + * @param client + * Client requesting the open. + * @param options + * Options for the open. Set to zero. + * @param access + * Access level for the open. Set to kIOStorageAccessReader or + * kIOStorageAccessReaderWriter. + * @result + * Returns true if the open was successful, false otherwise. + */ + + virtual bool handleOpen(IOService * client, + IOOptionBits options, + void * access); + + /*! + * @function handleIsOpen + * @discussion + * The handleIsOpen method determines whether the specified client, or any + * client if none is specified, presently has an open on this object. + * + * This implementation replaces the IOService definition of handleIsOpen(). + * @param client + * Client to check the open state of. Set to zero to check the open state + * of all clients. + * @result + * Returns true if the client was (or clients were) open, false otherwise. + */ + + virtual bool handleIsOpen(const IOService * client) const; + + /*! + * @function handleClose + * @discussion + * The handleClose method closes the client's access to this object. + * + * This implementation replaces the IOService definition of handleClose(). + * @param client + * Client requesting the close. + * @param options + * Options for the close. Set to zero. + */ + + virtual void handleClose(IOService * client, IOOptionBits options); + + /* + * Attach the given media object to the device tree plane. + */ + +#ifdef __LP64__ + virtual bool attachMediaObjectToDeviceTree(IOMedia * media); +#else /* !__LP64__ */ + virtual bool attachMediaObjectToDeviceTree(IOMedia * media, + IOOptionBits options = 0); /* 10.5.0 */ +#endif /* !__LP64__ */ + + /* + * Detach the given media object from the device tree plane. + */ + +#ifdef __LP64__ + virtual void detachMediaObjectFromDeviceTree(IOMedia * media); +#else /* !__LP64__ */ + virtual void detachMediaObjectFromDeviceTree(IOMedia * media, + IOOptionBits options = 0); /* 10.5.0 */ +#endif /* !__LP64__ */ + + /* + * Updates a set of existing partitions, represented by partitionsOld, + * with possible updates from a rescan of the disk, represented by + * partitionsNew. It returns a new set of partitions with the results, + * removing partitions from partitionsOld where applicable, adding + * partitions from partitionsNew where applicable, and folding in property + * changes to partitions from partitionsNew into partitionsOld where + * applicable. + */ + + virtual OSSet * juxtaposeMediaObjects(OSSet * partitionsOld, + OSSet * partitionsNew); /* 10.5.0 */ + +public: + + using IOStorage::read; + using IOStorage::write; + + /* + * Initialize this object's minimal state. + */ + + virtual bool init(OSDictionary * properties = 0); + + /*! + * @function read + * @discussion + * Read data from the storage object at the specified byte offset into the + * specified buffer, asynchronously. When the read completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the read. + * + * For simple partition schemes, the default behavior is to simply pass the + * read through to the provider media. More complex partition schemes such + * as RAID will need to do extra processing here. + * @param client + * Client requesting the read. + * @param byteStart + * Starting byte offset for the data transfer. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + * @param completion + * Completion routine to call once the data transfer is complete. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + */ + + virtual void read(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); + + /*! + * @function write + * @discussion + * Write data into the storage object at the specified byte offset from the + * specified buffer, asynchronously. When the write completes, the caller + * will be notified via the specified completion action. + * + * The buffer will be retained for the duration of the write. + * + * For simple partition schemes, the default behavior is to simply pass the + * write through to the provider media. More complex partition schemes such + * as RAID will need to do extra processing here. + * @param client + * Client requesting the write. + * @param byteStart + * Starting byte offset for the data transfer. + * @param buffer + * Buffer for the data transfer. The size of the buffer implies the size of + * the data transfer. + * @param attributes + * Attributes of the data transfer. See IOStorageAttributes. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + * @param completion + * Completion routine to call once the data transfer is complete. It is the + * responsibility of the callee to maintain the information for the duration + * of the data transfer, as necessary. + */ + + virtual void write(IOService * client, + UInt64 byteStart, + IOMemoryDescriptor * buffer, + IOStorageAttributes * attributes, + IOStorageCompletion * completion); + + /*! + * @function synchronizeCache + * @discussion + * Flush the cached data in the storage object, if any, synchronously. + * @param client + * Client requesting the cache synchronization. + * @result + * Returns the status of the cache synchronization. + */ + + virtual IOReturn synchronizeCache(IOService * client); + + /*! + * @function discard + * @discussion + * Delete unused data from the storage object at the specified byte offset, + * synchronously. + * @param client + * Client requesting the operation. + * @param byteStart + * Starting byte offset for the operation. + * @param byteCount + * Size of the operation. + * @result + * Returns the status of the operation. + */ + + virtual IOReturn discard(IOService * client, + UInt64 byteStart, + UInt64 byteCount); + + /* + * Obtain this object's provider. We override the superclass's method + * to return a more specific subclass of OSObject -- an IOMedia. This + * method serves simply as a convenience to subclass developers. + */ + + virtual IOMedia * getProvider() const; + +#ifdef __LP64__ + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 0); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 1); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 2); +#else /* !__LP64__ */ + OSMetaClassDeclareReservedUsed(IOPartitionScheme, 0); + OSMetaClassDeclareReservedUsed(IOPartitionScheme, 1); + OSMetaClassDeclareReservedUsed(IOPartitionScheme, 2); +#endif /* !__LP64__ */ + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 3); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 4); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 5); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 6); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 7); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 8); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 9); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 10); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 11); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 12); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 13); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 14); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 15); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 16); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 17); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 18); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 19); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 20); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 21); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 22); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 23); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 24); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 25); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 26); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 27); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 28); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 29); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 30); + OSMetaClassDeclareReservedUnused(IOPartitionScheme, 31); +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/IOStorage.h b/i386/include/IOKit/storage/IOStorage.h new file mode 100644 index 0000000..d5725c2 --- /dev/null +++ b/i386/include/IOKit/storage/IOStorage.h @@ -0,0 +1,217 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + * @header IOStorage + * @abstract + * This header contains the IOStorage class definition. + */ + +#ifndef _IOSTORAGE_H +#define _IOSTORAGE_H + +#include <IOKit/IOTypes.h> + +/*! + * @defined kIOStorageClass + * @abstract + * The name of the IOStorage class. + */ + +#define kIOStorageClass "IOStorage" + +/*! + * @defined kIOStorageCategory + * @abstract + * kIOStorageCategory is a value for IOService's kIOMatchCategoryKey property. + * @discussion + * The kIOStorageCategory value is the standard value for the IOService property + * kIOMatchCategoryKey ("IOMatchCategory") for all storage drivers. All storage + * objects that expect to drive new content (that is, produce new media objects) + * are expected to compete within the kIOStorageCategory namespace. + * + * See the IOService documentation for more information on match categories. + */ + +#define kIOStorageCategory "IOStorage" /* (as IOMatchCategory) */ + +/*! + * @defined kIOStorageFeaturesKey + * @abstract + * A property of any object in the storage stack. + * @discussion + * kIOStorageFeaturesKey is a property of any object in the storage stack that + * wishes to express support of additional features, such as Force Unit Access. + * It is typically defined in the device object below the block storage driver + * object. It has an OSDictionary value, where each entry describes one given + * feature. + */ + +#define kIOStorageFeaturesKey "IOStorageFeatures" + +/*! + * @defined kIOStorageFeatureDiscard + * @abstract + * Describes the presence of the Discard feature. + * @discussion + * This property describes the ability of the storage stack to delete unused + * data from the media. It is one of the feature entries listed under the top- + * level kIOStorageFeaturesKey property table. It has an OSBoolean value. + */ + +#define kIOStorageFeatureDiscard "Discard" + +/*! + * @defined kIOStorageFeatureForceUnitAccess + * @abstract + * Describes the presence of the Force Unit Access feature. + * @discussion + * This property describes the ability of the storage stack to force a request + * to access the media. It is one of the feature entries listed under the top- + * level kIOStorageFeaturesKey property table. It has an OSBoolean value. + */ + +#define kIOStorageFeatureForceUnitAccess "Force Unit Access" + +#ifdef KERNEL +#ifdef __cplusplus + +/* + * Kernel + */ + +#include <IOKit/assert.h> +#include <IOKit/IOMemoryDescriptor.h> +#include <IOKit/IOService.h> + +/*! + * @enum IOStorageAccess + * @discussion + * The IOStorageAccess enumeration describes the possible access levels for open + * requests. + * @constant kIOStorageAccessNone + * No access is requested; should not be passed to open(). + * @constant kIOStorageAccessReader + * Read-only access is requested. + * @constant kIOStorageAccessReaderWriter + * Read and write access is requested. + * @constant kIOStorageAccessSharedLock + * Shared access is requested. + * @constant kIOStorageAccessExclusiveLock + * Exclusive access is requested. + */ + +enum +{ + kIOStorageAccessNone = 0x00, + kIOStorageAccessReader = 0x01, + kIOStorageAccessReaderWriter = 0x03, + kIOStorageAccessSharedLock = 0x04, + kIOStorageAccessExclusiveLock = 0x08 +}; + +typedef UInt32 IOStorageAccess; + +/*! + * @enum IOStorageOptions + * @discussion + * Options for read and write storage requests. + * @constant kIOStorageOptionForceUnitAccess + * Force the request to access the media. + */ + +enum +{ + kIOStorageOptionNone = 0x00000000, + kIOStorageOptionForceUnitAccess = 0x00000001, + kIOStorageOptionReserved = 0xFFFFFFFE +}; + +typedef UInt32 IOStorageOptions; + +/*! + * @struct IOStorageAttributes + * @discussion + * Attributes of read and write storage requests. + * @field options + * Options for the request. See IOStorageOptions. + * @field reserved + * Reserved for future use. Set to zero. + */ + +struct IOStorageAttributes +{ + IOStorageOptions options; + UInt32 reserved0032; + UInt64 reserved0064; +#ifdef __LP64__ + UInt64 reserved0128; + UInt64 reserved0192; +#endif /* __LP64__ */ +}; + +/*! + * @typedef IOStorageCompletionAction + * @discussion + * The IOStorageCompletionAction declaration describes the C (or C++) completion + * routine that is called once an asynchronous storage operation completes. + * @param target + * Opaque client-supplied pointer (or an instance pointer for a C++ callback). + * @param parameter + * Opaque client-supplied pointer. + * @param status + * Status of the data transfer. + * @param actualByteCount + * Actual number of bytes transferred in the data transfer. + */ + +typedef void (*IOStorageCompletionAction)(void * target, + void * parameter, + IOReturn status, + UInt64 actualByteCount); + +/*! + * @struct IOStorageCompletion + * @discussion + * The IOStorageCompletion structure describes the C (or C++) completion routine + * that is called once an asynchronous storage operation completes. The values + * passed for the target and parameter fields will be passed to the routine when + * it is called. + * @field target + * Opaque client-supplied pointer (or an instance pointer for a C++ callback). + * @field action + * Completion routine to call on completion of the data transfer. + * @field parameter + * Opaque client-supplied pointer. + */ + +struct IOStorageCompletion +{ + void * target; + IOStorageCompletionAction action; + void * parameter; +}; + +#endif /* __cplusplus */ +#endif /* KERNEL */ +#endif /* !_IOSTORAGE_H */ diff --git a/i386/include/IOKit/storage/IOStorageDeviceCharacteristics.h b/i386/include/IOKit/storage/IOStorageDeviceCharacteristics.h new file mode 100644 index 0000000..19a73a2 --- /dev/null +++ b/i386/include/IOKit/storage/IOStorageDeviceCharacteristics.h @@ -0,0 +1,659 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IO_STORAGE_DEVICE_CHARACTERISTICS_H_ +#define _IOKIT_IO_STORAGE_DEVICE_CHARACTERISTICS_H_ + +#include <IOKit/storage/IOStorageProtocolCharacteristics.h> + +/* + * Device Characteristics - Characteristics defined for devices. + */ + +/*! +@defined kIOPropertyDeviceCharacteristicsKey +@discussion This key is used to define Device Characteristics for a particular +device and it has an associated dictionary which lists the +device characteristics. The device characteristics are Command Set specific +and are listed in the header files for each command set. + +Requirement: Mandatory + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyDeviceCharacteristicsKey "Device Characteristics" + + +/*! +@defined kIOPropertyVendorNameKey +@discussion This key is used to define the Vendor Name for a particular device +and it has an associated string. + +Requirement: Mandatory + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyVendorNameKey "Vendor Name" + + +/*! +@defined kIOPropertyProductNameKey +@discussion This key is used to define the Product Name for a particular device +and it has an associated string. + +Requirement: Mandatory + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyProductNameKey "Product Name" + + +/*! +@defined kIOPropertyProductRevisionLevelKey +@discussion This key is used to define the Product Revision Level for a +particular device and it has an associated string. + +Requirement: Mandatory + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyProductRevisionLevelKey "Product Revision Level" + + +/*! +@defined kIOPropertyProductSerialNumberKey +@discussion This key is used to define the Product Serial Number for a +particular device and it has an associated data. + +Requirement: Mandatory + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>Serial Number</key> + <string>123456789</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyProductSerialNumberKey "Serial Number" + + +/*! +@defined kIOPropertySupportedCDFeaturesKey +@discussion This key is used to define the supported CD Features for a +particular optical device and it has an associated bitfield. See +<IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> for definitions of the +bits and associated bitmasks. + +Requirement: Mandatory for optical devices (Peripheral Device Type 05h). + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>SuperDrive</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>CD Features</key> + <integer>1663</integer> + <key>DVD Features</key> + <integer>103</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySupportedCDFeaturesKey "CD Features" + + +/*! +@defined kIOPropertySupportedDVDFeaturesKey +@discussion This key is used to define the supported DVD Features for a +particular optical device and it has an associated bitfield. See +<IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> for definitions of the +bits and associated bitmasks. + +Requirement: Mandatory for optical devices (Peripheral Device Type 05h). + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>SuperDrive</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>CD Features</key> + <integer>1663</integer> + <key>DVD Features</key> + <integer>103</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySupportedDVDFeaturesKey "DVD Features" + + +/*! +@defined kIOPropertySupportedBDFeaturesKey +@discussion This key is used to define the supported BD Features for a +particular optical device and it has an associated bitfield. See +<IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> for definitions of the +bits and associated bitmasks. + +Requirement: Mandatory for optical devices (Peripheral Device Type 05h). + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>SuperDrive</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>CD Features</key> + <integer>1663</integer> + <key>DVD Features</key> + <integer>103</integer> + <key>BD Features</key> + <integer>21</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySupportedBDFeaturesKey "BD Features" + + +/*! +@defined kIOPropertyRigidDiskGeometryKey +@discussion This key is used to define a dictionary containing +rigid disk geometry information. + +Requirement: Optional. If a device publishes this dictionary, it +must publish all key/value pairs which are deemed Mandatory. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>Rigid Disk Geometry</key> + <dict> + <key>Sector Count per Track</key> + <integer>12345</integer> + <key>Head Count</key> + <integer>12</integer> + <key>Cylinder Count</key> + <integer>12345</integer> + <key>Bytes per Physical Sector</key> + <integer>512</integer> + </dict> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyRigidDiskGeometryKey "Rigid Disk Geometry" + + +/*! +@defined kIOPropertySectorCountPerTrackKey +@discussion This key is used to define the number of sectors per +each track for a particular medium. + +Requirement: Mandatory element of the Rigid Disk Geometry dictionary. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>Rigid Disk Geometry</key> + <dict> + <key>Sector Count per Track</key> + <integer>12345</integer> + </dict> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySectorCountPerTrackKey "Sector Count per Track" + + +/*! +@defined kIOPropertyHeadCountKey +@discussion This key is used to define the number of heads for +a particular medium. + +Requirement: Mandatory element of the Rigid Disk Geometry dictionary. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>Rigid Disk Geometry</key> + <dict> + <key>Sector Count per Track</key> + <integer>12345</integer> + <key>Head Count</key> + <integer>12</integer> + <key>Cylinder Count</key> + <integer>12345</integer> + <key>Bytes per Physical Sector</key> + <integer>512</integer> + </dict> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyHeadCountKey "Head Count" + + +/*! +@defined kIOPropertyCylinderCountKey +@discussion This key is used to define the number of heads for +a particular medium. + +Requirement: Mandatory element of the Rigid Disk Geometry dictionary. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>Rigid Disk Geometry</key> + <dict> + <key>Sector Count per Track</key> + <integer>12345</integer> + <key>Head Count</key> + <integer>12</integer> + <key>Cylinder Count</key> + <integer>12345</integer> + <key>Bytes per Physical Sector</key> + <integer>512</integer> + </dict> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyCylinderCountKey "Cylinder Count" + + +/*! +@defined kIOPropertyBytesPerPhysicalSectorKey +@discussion This key is used to define the number of heads for +a particular medium. + +Requirement: Mandatory element of the Rigid Disk Geometry dictionary. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>Rigid Disk Geometry</key> + <dict> + <key>Sector Count per Track</key> + <integer>12345</integer> + <key>Head Count</key> + <integer>12</integer> + <key>Cylinder Count</key> + <integer>12345</integer> + <key>Bytes per Physical Sector</key> + <integer>512</integer> + </dict> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyBytesPerPhysicalSectorKey "Bytes per Physical Sector" + + +/*! +@defined kIOPropertyPhysicalBlockSizeKey +@discussion This key is used to define the physical block size of a hard disk drive. + +Requirement: Mandatory for hard disk drives with physical block size other than 512 bytes. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>Physical Block Size</key> + <integer>4096</integer> + <key>Logical Block Size</key> + <integer>512</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalBlockSizeKey "Physical Block Size" + + +/*! +@defined kIOPropertyLogicalBlockSizeKey +@discussion This key is used to define the logical block size of a hard disk drive. + +Requirement: Mandatory for hard disk drives with logical block size other than 512 bytes +or that does not match its physical block size. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>Apple</string> + <key>Product Name</key> + <string>iPod</string> + <key>Product Revision Level</key> + <string>1.0</string> + <key>Physical Block Size</key> + <integer>4096</integer> + <key>Logical Block Size</key> + <integer>512</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyLogicalBlockSizeKey "Logical Block Size" + + +/*! +@defined kIOPropertyTargetDiskModeKey +@discussion This key is used to indicate the device is another computer in Target Disk Mode. + +Requirement: Optional. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>AAPL</string> + <key>Product Name</key> + <string>FireWire Target</string> + <key>Product Revision Level</key> + <string>0000</string> + <key>Target Disk Mode</key> + <true/> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyTargetDiskModeKey "Target Disk Mode" + + +/*! +@defined kIOPropertyMediumTypeKey +@discussion This key is used to indicate the medium type of the device. + +Requirement: Optional. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>AAPL</string> + <key>Product Name</key> + <string>FireWire Target</string> + <key>Product Revision Level</key> + <string>0000</string> + <key>Medium Type</key> + <string>Rotational</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyMediumTypeKey "Medium Type" + + +/*! +@defined kIOPropertyMediumTypeRotationalKey +@discussion This key is used to indicate the medium type of the device is rotational. + +Requirement: Optional. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>AAPL</string> + <key>Product Name</key> + <string>FireWire Target</string> + <key>Product Revision Level</key> + <string>0000</string> + <key>Medium Type</key> + <string>Rotational</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyMediumTypeRotationalKey "Rotational" + + +/*! +@defined kIOPropertyMediumTypeSolidStateKey +@discussion This key is used to indicate the medium type of the device is solid state. + +Requirement: Optional. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>AAPL</string> + <key>Product Name</key> + <string>FireWire Target</string> + <key>Product Revision Level</key> + <string>0000</string> + <key>Medium Type</key> + <string>Solid State</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyMediumTypeSolidStateKey "Solid State" + + +/*! +@defined kIOPropertyMediumRotationRateKey +@discussion This key is used to indicate the medium rotation rate in RPM of the device. + +Requirement: Optional. + +Example: +<pre> +@textblock +<dict> + <key>Device Characteristics</key> + <dict> + <key>Vendor Name</key> + <string>AAPL</string> + <key>Product Name</key> + <string>FireWire Target</string> + <key>Product Revision Level</key> + <string>0000</string> + <key>Rotation Rate</key> + <integer>7200</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyMediumRotationRateKey "Rotation Rate" + + +#endif /* _IOKIT_IO_STORAGE_DEVICE_CHARACTERISTICS_H_ */ diff --git a/i386/include/IOKit/storage/IOStorageProtocolCharacteristics.h b/i386/include/IOKit/storage/IOStorageProtocolCharacteristics.h new file mode 100644 index 0000000..18a726f --- /dev/null +++ b/i386/include/IOKit/storage/IOStorageProtocolCharacteristics.h @@ -0,0 +1,1758 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IO_STORAGE_PROTOCOL_CHARACTERISTICS_H_ +#define _IOKIT_IO_STORAGE_PROTOCOL_CHARACTERISTICS_H_ + + +/* + * Protocol Characteristics - Characteristics defined for protocols. + */ + + +/*! +@defined kIOPropertyProtocolCharacteristicsKey +@discussion This key is used to define Protocol Characteristics for a particular +protocol and it has an associated dictionary which lists the +protocol characteristics. + +Requirement: Mandatory + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>ATAPI</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyProtocolCharacteristicsKey "Protocol Characteristics" + + +/*! +@defined kIOPropertySCSIInitiatorIdentifierKey +@discussion An identifier that will uniquely identify this SCSI Initiator for the +SCSI Domain. + +Requirement: Mandatory for SCSI Parallel Interface, SAS, +and Fibre Channel Interface. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SCSI Parallel Interface</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + <key>SCSI Initiator Identifier</key> + <integer>7</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSIInitiatorIdentifierKey "SCSI Initiator Identifier" + + +/*! +@defined kIOPropertySCSIDomainIdentifierKey +@discussion An identifier that will uniquely identify this SCSI Domain for the +Physical Interconnect type. This identifier is only guaranteed to be unique for +any given Physical Interconnect and is not guaranteed to be the same across +restarts or shutdowns. + +Requirement: Mandatory for SCSI Parallel Interface and Fibre Channel Interface. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SCSI Parallel Interface</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + <key>SCSI Domain Identifier</key> + <integer>0</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSIDomainIdentifierKey "SCSI Domain Identifier" + + +/*! +@defined kIOPropertySCSITargetIdentifierKey +@discussion This is the SCSI Target Identifier for a given SCSI Target Device. + +Requirement: Mandatory for SCSI Parallel Interface and Fibre Channel Interface. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SCSI Parallel Interface</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + <key>SCSI Target Identifier</key> + <integer>3</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSITargetIdentifierKey "SCSI Target Identifier" + + +/*! +@defined kIOPropertySCSILogicalUnitNumberKey +@discussion This key is the SCSI Logical Unit Number for the device server +controlled by the driver. + +Requirement: Mandatory for SCSI Parallel Interface, SAS, and Fibre Channel Interface. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SCSI Parallel Interface</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + <key>SCSI Logical Unit Number</key> + <integer>2</integer> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSILogicalUnitNumberKey "SCSI Logical Unit Number" + + +/*! +@defined kIOPropertySASAddressKey +@discussion This key is the unique 64-bit SAS Address for the device server +node located at this port, or for the initiating host port. + +Requirement: Mandatory for SAS. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SAS</string> + <key>Physical Interconnect Location</key> + <string>External</string> + <key>SAS Address</key> + <data>0011223344556677</data> + </dict> +</dict> +@/textblock +</pre> + +Example2: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>SAS Address</key> + <data>0011223344556677</data> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySASAddressKey "SAS Address" + + +/*! +@defined kIOPropertyFibreChannelNodeWorldWideNameKey +@discussion This key is the unique 64-bit World Wide Name for the device server +node located at this port, or for the initiating host port. + +Requirement: Mandatory for Fibre Channel Interface. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Fibre Channel Interface</string> + <key>Physical Interconnect Location</key> + <string>External</string> + <key>Node World Wide Name</key> + <data>0011223344556677</data> + </dict> +</dict> +@/textblock +</pre> + +Example2: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Node World Wide Name</key> + <data>0011223344556677</data> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyFibreChannelNodeWorldWideNameKey "Node World Wide Name" + + +/*! +@defined kIOPropertyFibreChannelPortWorldWideNameKey +@discussion This key is the unique 64-bit World Wide Name for the port. + +Requirement: Mandatory for Fibre Channel Interface. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Fibre Channel Interface</string> + <key>Physical Interconnect Location</key> + <string>External</string> + <key>Port World Wide Name</key> + <data>0011223344556677</data> + </dict> +</dict> +@/textblock +</pre> + +Example2: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port World Wide Name</key> + <data>0011223344556677</data> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyFibreChannelPortWorldWideNameKey "Port World Wide Name" + + +/*! +@defined kIOPropertyFibreChannelAddressIdentifierKey +@discussion This key is the 24-bit Address Identifier (S_ID or D_ID) as +defined in the FC-FS specification. It contains the address identifier +of the source or destination Nx_Port. + +Note: This value can change. It is not a static value. + +Requirement: Optional (only necessary for Fibre Channel Interface). + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Fibre Channel Interface</string> + <key>Physical Interconnect Location</key> + <string>External</string> + <key>Address Identifier</key> + <data>001122</data> + </dict> +</dict> +@/textblock +</pre> + +Example2: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Address Identifier</key> + <data>001122</data> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyFibreChannelAddressIdentifierKey "Address Identifier" + + +/*! +@defined kIOPropertyFibreChannelALPAKey +@discussion This key is the 8-bit Arbitrated Loop Physical Address +(AL_PA) value as defined in the FC-AL-2 specification. + +Note: This value can change. It is not a static value. + +Requirement: Optional (only necessary for Fibre Channel Interface). + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Fibre Channel Interface</string> + <key>Physical Interconnect Location</key> + <string>External</string> + <key>AL_PA</key> + <data>04</data> + </dict> +</dict> +@/textblock +</pre> + +Example2: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>AL_PA</key> + <data>04</data> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyFibreChannelALPAKey "AL_PA" + + +/*! +@defined kIOPropertyPortStatusKey +@discussion This key is associated with the current port +status of the physical link. The port status is either +"Link Established", "No Link Established", or "Link Failed". + +Note: This value can change when the port status changes. It +is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Status</key> + <string>Link Established</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortStatusKey "Port Status" + + +/*! +@defined kIOPropertyPortSpeedKey +@discussion This key is associated with the current port +speed. The port speed can be any valid speed for the interconnect. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (1 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedKey "Port Speed" + + +/*! +@defined kIOPropertyPortTopologyKey +@discussion This key is associated with the current port +topology. The port topology can be any valid topology for the interconnect. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Topology</key> + <string>Automatic (N_Port)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortTopologyKey "Port Topology" + + +/*! +@defined kIOPropertyPortDescriptionKey +@discussion This key is associated with an human +readable port description. Examples include +"Channel A", "Port 1", etc. + +Requirement: Optional for all interconnects. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Description</key> + <string>Channel A</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortDescriptionKey "Port Description" + + +/*! +@defined kIOPropertySCSIParallelSignalingTypeKey +@discussion This key is associated with the signaling type +used for this SCSI Parallel bus. Valid values include +"High Voltage Differential", "Low Voltage Differential", +and "Single Ended". + +Requirement: Optional for SCSI Parallel Interface. Not +defined for any other physical interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>SCSI Parallel Signaling Type</key> + <string>High Voltage Differential</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSIParallelSignalingTypeKey "SCSI Parallel Signaling Type" + + +/*! +@defined kIOPropertyFibreChannelCableDescriptionKey +@discussion This key is associated with the cabling type +used for this Fibre Channel port. Valid values include +"Copper" and "Fiber Optic". + +Requirement: Optional for Fibre Channel Interface. Not +defined for any other physical interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Fibre Channel Cabling Type</key> + <string>Copper</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyFibreChannelCableDescriptionKey "Fibre Channel Cabling Type" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeKey +@discussion This key is used to define the Physical Interconnect to which +a device is attached. + +Requirement: Mandatory. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SCSI Parallel Interface</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeKey "Physical Interconnect" + + +/*! +@defined kIOPropertyPhysicalInterconnectLocationKey +@discussion This key is used to define the Physical Interconnect +Location. + +Requirement: Mandatory. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SCSI Parallel Interface</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectLocationKey "Physical Interconnect Location" + + +/*! +@defined kIOPropertySCSIProtocolMultiInitKey +@discussion This protocol characteristics key is used to inform the system +that the protocol supports having multiple devices that act as initiators. + +Requirement: Optional. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Fibre Channel Interface</string> + <key>Physical Interconnect Location</key> + <string>External</string> + <key>Multiple Initiators</key> + <string>True</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSIProtocolMultiInitKey "Multiple Initiators" + + +/* + * Values - Values for the characteristics defined above. + */ + + +/*! +@defined kIOPropertyInternalKey +@discussion This key defines the value of Internal for the key +kIOPropertyPhysicalInterconnectLocationKey. If the device is +connected to an internal bus, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>ATA</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyInternalKey "Internal" + + +/*! +@defined kIOPropertyExternalKey +@discussion This key defines the value of External for the key +kIOPropertyPhysicalInterconnectLocationKey. If the device is +connected to an external bus, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Fibre Channel Interface</string> + <key>Physical Interconnect Location</key> + <string>External</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyExternalKey "External" + + +/*! +@defined kIOPropertyInternalExternalKey +@discussion This key defines the value of Internal/External for the key +kIOPropertyPhysicalInterconnectLocationKey. If the device is connected +to a bus and it is indeterminate whether it is internal or external, +this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SCSI Parallel Interface</string> + <key>Physical Interconnect Location</key> + <string>Internal/External</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyInternalExternalKey "Internal/External" + + +/*! +@defined kIOPropertyInterconnectFileKey +@discussion This key defines the value of File for the key +kIOPropertyPhysicalInterconnectLocationKey. If the device is a file +that is being represented as a storage device, this key should be set. + +NOTE: This key should only be used when the Physical Interconnect is set to +Virtual Interface. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Virtual Interface</string> + <key>Physical Interconnect Location</key> + <string>File</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyInterconnectFileKey "File" + + +/*! +@defined kIOPropertyInterconnectRAMKey +@discussion This key defines the value of RAM for the key +kIOPropertyPhysicalInterconnectLocationKey. If the device is system memory +that is being represented as a storage device, this key should be set. + +NOTE: This key should only be used when the Physical Interconnect is set to +Virtual Interface. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Virtual Interface</string> + <key>Physical Interconnect Location</key> + <string>RAM</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyInterconnectRAMKey "RAM" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeATA +@discussion This key defines the value of ATA for the key +kIOPropertyPhysicalInterconnectTypeKey. If the device is connected +to an ATA bus, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>ATA</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeATA "ATA" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeSerialATA +@discussion This key defines the value of SATA for the key +kIOPropertyPhysicalInterconnectTypeKey. If the device is connected +to a SATA bus, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SATA</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeSerialATA "SATA" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeSerialAttachedSCSI +@discussion This key defines the value of SAS for the key +kIOPropertyPhysicalInterconnectTypeKey. If the device is connected +to a SAS bus, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SAS</string> + <key>Physical Interconnect Location</key> + <string>External</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeSerialAttachedSCSI "SAS" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeATAPI +@discussion This key defines the value of ATAPI for the key +kIOPropertyPhysicalInterconnectTypeKey. If the device is connected +to an ATA bus and follows the ATAPI command specification, this key +should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>ATAPI</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeATAPI "ATAPI" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeUSB +@discussion This key defines the value of USB for the key +kIOPropertyPhysicalInterconnectTypeKey. If the device is connected +to a USB port, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>USB</string> + <key>Physical Interconnect Location</key> + <string>External</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeUSB "USB" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeFireWire +@discussion This key defines the value of USB for the key +kIOPropertyPhysicalInterconnectTypeKey. If the device is connected +to a FireWire port, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>FireWire</string> + <key>Physical Interconnect Location</key> + <string>External</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeFireWire "FireWire" + + +/*! + @defined kIOPropertyPhysicalInterconnectTypeSecureDigital + @discussion This key defines the value of Secure Digital for the key + kIOPropertyPhysicalInterconnectTypeSecureDigital. If the device is a + connected to a Secure Digital port and follows the Secure Digital + specification, this key should be set. + + Example: + <pre> + @textblock + <dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Secure Digital</string> + <key>Physical Interconnect Location</key> + <string>Internal</string> + </dict> + </dict> + @/textblock + </pre> + */ +#define kIOPropertyPhysicalInterconnectTypeSecureDigital "Secure Digital" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeSCSIParallel +@discussion This key defines the value of SCSI Parallel Interface for the key +kIOPropertyPhysicalInterconnectTypeKey. If the device is connected +to a SCSI Parallel port, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>SCSI Parallel Interface</string> + <key>Physical Interconnect Location</key> + <string>External</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeSCSIParallel "SCSI Parallel Interface" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeFibreChannel +@discussion This key defines the value of Fibre Channel Interface for the key +kIOPropertyPhysicalInterconnectTypeKey. If the device is connected +to a Fibre Channel port, this key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Fibre Channel Interface</string> + <key>Physical Interconnect Location</key> + <string>External</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeFibreChannel "Fibre Channel Interface" + + +/*! +@defined kIOPropertyPhysicalInterconnectTypeVirtual +@discussion This key defines the value of Virtual Interface for the key +kIOPropertyPhysicalInterconnectTypeVirtual. If the device is being made to look +like a storage device, but is not such in actuality, such as a File or RAM, this +key should be set. + +Example: +<pre> +@textblock +<dict> + <key>Protocol Characteristics</key> + <dict> + <key>Physical Interconnect</key> + <string>Virtual Interface</string> + <key>Physical Interconnect Location</key> + <string>File</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPhysicalInterconnectTypeVirtual "Virtual Interface" + + +/*! +@defined kIOPropertyPortStatusLinkEstablishedKey +@discussion This key defines the value of Link Established for the key +kIOPropertyPortStatusKey. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Status</key> + <string>Link Established</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortStatusLinkEstablishedKey "Link Established" + + +/*! +@defined kIOPropertyPortStatusNoLinkEstablishedKey +@discussion This key defines the value of No Link Established for the key +kIOPropertyPortStatusKey. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Status</key> + <string>No Link Established</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortStatusNoLinkEstablishedKey "No Link Established" + + +/*! +@defined kIOPropertyPortStatusLinkFailedKey +@discussion This key defines the value of Link Failed for the key +kIOPropertyPortStatusKey. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Status</key> + <string>Link Failed</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortStatusLinkFailedKey "Link Failed" + + +/*! +@defined kIOPropertyPortSpeedAutomaticKey +@discussion This key defines the value of Automatic for the key +kIOPropertyPortSpeedKey. If the speed of the port is automatically +adjusted by the host/device and a definitive speed is not known, +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomaticKey "Automatic" + + +/*! +@defined kIOPropertyPortSpeed1GigabitKey +@discussion This key defines the value of 1 Gigabit for the key +kIOPropertyPortSpeedKey. If the speed of the port is 1 Gigabit +per second and is not automatically determined (i.e. the user +configured the port to be exactly this speed), +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>1 Gigabit</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeed1GigabitKey "1 Gigabit" + +/*! +@defined kIOPropertyPortSpeed1_5GigabitKey +@discussion This key defines the value of 1.5 Gigabit for the key +kIOPropertyPortSpeedKey. If the speed of the port is 1.5 Gigabits +per second and is not automatically determined (i.e. the user +configured the port to be exactly this speed), +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>1.5 Gigabit</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeed1_5GigabitKey "1.5 Gigabit" + + +/*! +@defined kIOPropertyPortSpeed2GigabitKey +@discussion This key defines the value of 2 Gigabit for the key +kIOPropertyPortSpeedKey. If the speed of the port is 2 Gigabits +per second and is not automatically determined (i.e. the user +configured the port to be exactly this speed), +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>2 Gigabit</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeed2GigabitKey "2 Gigabit" + + +/*! +@defined kIOPropertyPortSpeed3GigabitKey +@discussion This key defines the value of 3 Gigabit for the key +kIOPropertyPortSpeedKey. If the speed of the port is 3 Gigabits +per second and is not automatically determined (i.e. the user +configured the port to be exactly this speed), +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>3 Gigabit</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeed3GigabitKey "3 Gigabit" + + +/*! +@defined kIOPropertyPortSpeed4GigabitKey +@discussion This key defines the value of 4 Gigabit for the key +kIOPropertyPortSpeedKey. If the speed of the port is 4 Gigabits +per second and is not automatically determined (i.e. the user +configured the port to be exactly this speed), +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>4 Gigabit</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeed4GigabitKey "4 Gigabit" + +/*! +@defined kIOPropertyPortSpeed6GigabitKey +@discussion This key defines the value of 6 Gigabit for the key +kIOPropertyPortSpeedKey. If the speed of the port is 6 Gigabits +per second and is not automatically determined (i.e. the user +configured the port to be exactly this speed), +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>6 Gigabit</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeed6GigabitKey "6 Gigabit" + + +/*! +@defined kIOPropertyPortSpeed8GigabitKey +@discussion This key defines the value of 8 Gigabit for the key +kIOPropertyPortSpeedKey. If the speed of the port is 8 Gigabits +per second and is not automatically determined (i.e. the user +configured the port to be exactly this speed), +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>8 Gigabit</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeed8GigabitKey "8 Gigabit" + + +/*! +@defined kIOPropertyPortSpeed10GigabitKey +@discussion This key defines the value of 10 Gigabit for the key +kIOPropertyPortSpeedKey. If the speed of the port is 10 Gigabits +per second and is not automatically determined (i.e. the user +configured the port to be exactly this speed), +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>10 Gigabit</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeed10GigabitKey "10 Gigabit" + + +/*! +@defined kIOPropertyPortSpeedAutomatic1GigabitKey +@discussion This key defines the value of Automatic (1 Gigabit) +for the key kIOPropertyPortSpeedKey. If the speed of the port is +1 Gigabit per second and is automatically determined by host +software, this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (1 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomatic1GigabitKey "Automatic (1 Gigabit)" + + +/*! +@defined kIOPropertyPortSpeedAutomatic1_5GigabitKey +@discussion This key defines the value of Automatic (1.5 Gigabit) for the key +kIOPropertyPortSpeedKey. If the speed of the port is +1.5 Gigabits per second and is automatically determined by host +software, this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (1.5 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomatic1_5GigabitKey "Automatic (1.5 Gigabit)" + + +/*! +@defined kIOPropertyPortSpeedAutomatic2GigabitKey +@discussion This key defines the value of Automatic (2 Gigabit) +for the key kIOPropertyPortSpeedKey. If the speed of the port is +2 Gigabits per second and is automatically determined by host +software, this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (2 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomatic2GigabitKey "Automatic (2 Gigabit)" + + +/*! +@defined kIOPropertyPortSpeedAutomatic3GigabitKey +@discussion This key defines the value of Automatic (3 Gigabit) +for the key kIOPropertyPortSpeedKey. If the speed of the port is +3 Gigabits per second and is automatically determined by host +software, this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (3 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomatic3GigabitKey "Automatic (3 Gigabit)" + + +/*! +@defined kIOPropertyPortSpeedAutomatic4GigabitKey +@discussion This key defines the value of Automatic (4 Gigabit) +for the key kIOPropertyPortSpeedKey. If the speed of the port is +4 Gigabits per second and is automatically determined by host +software, this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (4 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomatic4GigabitKey "Automatic (4 Gigabit)" + + +/*! +@defined kIOPropertyPortSpeedAutomatic6GigabitKey +@discussion This key defines the value of Automatic (6 Gigabit) +for the key kIOPropertyPortSpeedKey. If the speed of the port is +6 Gigabits per second and is automatically determined by host +software, this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (6 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomatic6GigabitKey "Automatic (6 Gigabit)" + + +/*! +@defined kIOPropertyPortSpeedAutomatic8GigabitKey +@discussion This key defines the value of Automatic (8 Gigabit) +for the key kIOPropertyPortSpeedKey. If the speed of the port is +8 Gigabits per second and is automatically determined by host +software, this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (8 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomatic8GigabitKey "Automatic (8 Gigabit)" + + +/*! +@defined kIOPropertyPortSpeedAutomatic10GigabitKey +@discussion This key defines the value of Automatic (10 Gigabit) +for the key kIOPropertyPortSpeedKey. If the speed of the port is +10 Gigabits per second and is automatically determined by host +software, this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Speed</key> + <string>Automatic (10 Gigabit)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortSpeedAutomatic10GigabitKey "Automatic (10 Gigabit)" + + +/*! +@defined kIOPropertyPortTopologyAutomaticKey +@discussion This key defines the value of Automatic for the key +kIOPropertyPortTopologyKey. If the topology of the port is automatically +adjusted by the host/device and a definitive topology is not known, +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Topology</key> + <string>Automatic</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortTopologyAutomaticKey "Automatic" + + +/*! +@defined kIOPropertyPortTopologyNPortKey +@discussion This key defines the value of N_Port for the key +kIOPropertyPortTopologyKey. If the topology of the port is an N_Port, +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Topology</key> + <string>N_Port</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortTopologyNPortKey "N_Port" + + +/*! +@defined kIOPropertyPortTopologyNLPortKey +@discussion This key defines the value of NL_Port for the key +kIOPropertyPortTopologyKey. If the topology of the port is an NL_Port, +this key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Topology</key> + <string>NL_Port</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortTopologyNLPortKey "NL_Port" + + +/*! +@defined kIOPropertyPortTopologyAutomaticNPortKey +@discussion This key defines the value of Automatic (N_Port) for the key +kIOPropertyPortTopologyKey. If the topology of the port is +N_Port and is automatically determined by host software, this +key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Topology</key> + <string>Automatic (N_Port)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortTopologyAutomaticNPortKey "Automatic (N_Port)" + + +/*! +@defined kIOPropertyPortTopologyAutomaticNLPortKey +@discussion This key defines the value of Automatic (NL_Port) for the key +kIOPropertyPortTopologyKey. If the topology of the port is +NL_Port and is automatically determined by host software, this +key should be used. + +Note: This value can change. It is not a static value. + +Requirement: Optional for any interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Port Topology</key> + <string>Automatic (NL_Port)</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyPortTopologyAutomaticNLPortKey "Automatic (NL_Port)" + + +/*! +@defined kIOPropertySCSIParallelSignalingTypeHVDKey +@discussion This key defines the value of High Voltage Differential for the key +kIOPropertySCSIParallelSignalingTypeKey. If the signaling type of the port is +High Voltage Differential, this key should be used. + +Requirement: Optional for SCSI Parallel Interface interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>SCSI Parallel Signaling Type</key> + <string>High Voltage Differential</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSIParallelSignalingTypeHVDKey "High Voltage Differential" + + +/*! +@defined kIOPropertySCSIParallelSignalingTypeLVDKey +@discussion This key defines the value of Low Voltage Differential for the key +kIOPropertySCSIParallelSignalingTypeKey. If the signaling type of the port is +Low Voltage Differential, this key should be used. + +Requirement: Optional for SCSI Parallel Interface interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>SCSI Parallel Signaling Type</key> + <string>Low Voltage Differential</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSIParallelSignalingTypeLVDKey "Low Voltage Differential" + + +/*! +@defined kIOPropertySCSIParallelSignalingTypeSEKey +@discussion This key defines the value of Single Ended for the key +kIOPropertySCSIParallelSignalingTypeKey. If the signaling type of the port is +Single Ended, this key should be used. + +Requirement: Optional for SCSI Parallel Interface interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>SCSI Parallel Signaling Type</key> + <string>Single Ended</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertySCSIParallelSignalingTypeSEKey "Single Ended" + + +/*! +@defined kIOPropertyFibreChannelCableDescriptionCopperKey +@discussion This key defines the value of Copper for the key +kIOPropertyFibreChannelCableDescriptionKey. If the cabling is +Copper, this key should be used. + +Requirement: Optional for Fibre Channel Interface interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Fibre Channel Cabling Type</key> + <string>Copper</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyFibreChannelCableDescriptionCopperKey "Copper" + + +/*! +@defined kIOPropertyFibreChannelCableDescriptionFiberOpticKey +@discussion This key defines the value of Fiber Optic for the key +kIOPropertyFibreChannelCableDescriptionKey. If the cabling is +Fiber Optic, this key should be used. + +Requirement: Optional for Fibre Channel Interface interconnect. + +Example: +<pre> +@textblock +<dict> + <key>Controller Characteristics</key> + <dict> + <key>Fibre Channel Cabling Type</key> + <string>Fiber Optic</string> + </dict> +</dict> +@/textblock +</pre> +*/ +#define kIOPropertyFibreChannelCableDescriptionFiberOpticKey "Fiber Optic" + + +#endif /* _IOKIT_IO_STORAGE_PROTOCOL_CHARACTERISTICS_H_ */ diff --git a/i386/include/IOKit/storage/ata/.svn/all-wcprops b/i386/include/IOKit/storage/ata/.svn/all-wcprops new file mode 100644 index 0000000..730c632 --- /dev/null +++ b/i386/include/IOKit/storage/ata/.svn/all-wcprops @@ -0,0 +1,17 @@ +K 25 +svn:wc:ra_dav:version-url +V 64 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/ata +END +IOATAStorageDefines.h +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/ata/IOATAStorageDefines.h +END +IOATAPIProtocolTransport.h +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/ata/IOATAPIProtocolTransport.h +END diff --git a/i386/include/IOKit/storage/ata/.svn/entries b/i386/include/IOKit/storage/ata/.svn/entries new file mode 100644 index 0000000..dc54b6f --- /dev/null +++ b/i386/include/IOKit/storage/ata/.svn/entries @@ -0,0 +1,96 @@ +10 + +dir +2117 +http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/storage/ata +http://forge.voodooprojects.org/svn/chameleon + + + +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + +b5af796a-00a8-11df-919b-ffff7a100b7d + +IOATAStorageDefines.h +file + + + + +2012-10-03T17:50:20.000000Z +2636f67bb1c6a3bf217e724e581bbc77 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +9421 + +IOATAPIProtocolTransport.h +file + + + + +2012-10-03T17:50:20.000000Z +216442f064c65df79d52e27fa6006097 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +14901 + diff --git a/i386/include/IOKit/storage/ata/.svn/text-base/IOATAPIProtocolTransport.h.svn-base b/i386/include/IOKit/storage/ata/.svn/text-base/IOATAPIProtocolTransport.h.svn-base new file mode 100644 index 0000000..3356ae7 --- /dev/null +++ b/i386/include/IOKit/storage/ata/.svn/text-base/IOATAPIProtocolTransport.h.svn-base @@ -0,0 +1,365 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + @header IOATAPIProtocolTransport + Contains the class definition for IOATAPIProtocolTransport. +*/ + + +#ifndef _IOKIT_IO_ATAPI_PROTOCOL_TRANSPORT_H_ +#define _IOKIT_IO_ATAPI_PROTOCOL_TRANSPORT_H_ + +#define kIOPropertyATAPIMassStorageCharacteristics "ATAPI Mass Storage Characteristics" + +#if defined(KERNEL) && defined(__cplusplus) + +/* General IOKit includes */ +#include <IOKit/IOLib.h> +#include <IOKit/IOMessage.h> +#include <IOKit/IOService.h> +#include <IOKit/IOCommandPool.h> + +/* IOKit ATA Family includes */ +#include <IOKit/ata/IOATADevice.h> +#include <IOKit/ata/IOATATypes.h> + +/* IOKit ATA Storage includes */ +#include <IOKit/storage/ata/IOATAStorageDefines.h> + +/* SCSI Architecture Model Family includes */ +#include <IOKit/scsi/IOSCSIProtocolServices.h> + +// Forward class declaration +class IOATAPIProtocolTransport; + +/*! + @typedef ATAPIClientData + @param cmd IOATACommand for request. + @param self Pointer to the object. + @param scsiTask SCSITaskIdentifier of request. + @discussion This structure is stuffed into the refcon so we can associate which + IOATACommand and SCSITaskIdentifier is completing. +*/ + +struct ATAPIClientData +{ + IOATACommand * cmd; + IOATAPIProtocolTransport * self; + SCSITaskIdentifier scsiTask; +}; +typedef struct ATAPIClientData ATAPIClientData; + + +/*! + @class IOATAPIProtocolTransport + @abstract SCSI Protocol Driver Family for ATAPI Devices. + @discussion IOATAPIProtocolTransport contains all the bus specific support for ATAPI compliant devices. + To add vendor specific features or workarounds you will sub-class the appropriate + methods of this family. +*/ + +class IOATAPIProtocolTransport : public IOSCSIProtocolServices +{ + + OSDeclareDefaultStructors ( IOATAPIProtocolTransport ) + +public: + + // ---- IOService methods overridden ---- + + bool init ( OSDictionary * propTable ); + + // The start method is called to start our services. If the device + // can be controlled by this object, then we return true, else we + // return false. start() is usually used to allocate resources once + // it is determined that the device can be controlled by this object. + virtual bool start ( IOService * provider ); + + // The stop method is called to stop our services. It is primarily + // called for deallocation of resources. + virtual void stop ( IOService * provider ); + + // This method is our last chance to free all resources allocated. + virtual void free ( void ); + + +protected: + + // ---- member variables ---- + + IOATADevice * fATADevice; + ataUnitID fATAUnitID; + ataDeviceType fATADeviceType; + ataSocketType fATASocketType; + atapiConfig fATAPIPacketConfig; + UInt8 fPIOMode; + UInt8 fDMAMode; + UInt8 fUltraDMAMode; + IOCommandGate * fCommandGate; + IOCommandPool * fCommandPool; + IOATACommand * fResetCommand; + IOATACommand * fConfigCommand; + IOATACommand * fIdentifyCommand; + char fRevision[kSizeOfATARevisionString + 1]; + char fModel[kSizeOfATAModelString + 1]; + bool fWakeUpResetOccurred; + bool fPhysicallyConnected; + + // Used for low-power polling support + thread_call_t fPollingThread; + + UInt16 fDeviceIdentifyData[256]; + IOMemoryDescriptor * fDeviceIdentifyBuffer; + bool fResetInProgress; + + // Binary Compatibility instance variable expansion + struct ExpansionData + { + UInt32 fSemaphore; + UInt32 fMediaNotifyValue; + }; + ExpansionData * reserved; + + // ---- IOService methods overridden ---- + + // The message method is used to listen to messages from our provider, the ATA controller. + // It sends messages for bus reset notifications and for device removal (such as MediaBay, + // PC card, etc.) + virtual IOReturn message ( UInt32 type, IOService * provider, void * argument = 0 ); + + // ---- Protocol transport methods overridden ---- + + // Send a SCSI Command to the device. If the command was sent to the + // device and is pending completion, the subclass should return true and + // return back the kSCSIServiceResponse_Request_In_Process response. + // If the command completes immediately with an error, the subclass will + // return true and return back the appropriate status. + // if the subclass is currently processing all the commands it can, the + // subclass will return false and the command will be resent next time + // CommandCompleted is called. + virtual bool SendSCSICommand ( SCSITaskIdentifier request, + SCSIServiceResponse * serviceResponse, + SCSITaskStatus * taskStatus ); + + // This is a stub - not implemented in upper layer yet. Eventually, there + // will be a way to abort a task or task set and this method will be called. + // It will abort any commands which have not been executed by the ATA controller + virtual SCSIServiceResponse AbortSCSICommand ( SCSITaskIdentifier request ); + + // The IsProtocolServiceSupported method will return true if the protocol + // layer supports the specified feature. + virtual bool IsProtocolServiceSupported ( SCSIProtocolFeature feature, void * serviceValue ); + + // The HandleProtocolServiceFeature method will return true if the protocol + // layer properly handled the specified feature. + virtual bool HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void * serviceValue ); + + // ------ Power Management Support ------ + + // The HandlePowerOff method is called to do any bus specific activity + // necessary before shutting down and going to sleep. + virtual IOReturn HandlePowerOff ( void ); + + // The HandlePowerOn method is called to do any bus specific activity + // necessary to recover from power-on/wake from sleep (e.g. device reset on ATAPI) + virtual IOReturn HandlePowerOn ( void ); + + + // ---- Methods defined by this class ---- + + // Static callback proc for all SCSITask objects, it calls through to + // SCSITaskCallbackFunction. + static void sSCSITaskCallbackProc ( IOATACommand * cmd ); + + // Callback proc for synchronous ATA only type commands. + static void sATACallbackSync ( IOATACommand * cmd ); + + // Callback proc for asynchronous ATAPI resets. + static void sATAPIResetCallback ( IOATACommand * cmd ); + + // Callback proc that does nothing. + static void sATAPIVoidCallback ( IOATACommand * cmd ); + + // State machine for device configuration. + static void sATAPIConfigStateMachine ( IOATACommand * cmd ); + + // Used for low-power polling. + static void sPollStatusRegister ( void * xptDriver, void * refCon ); + + // Static callback for low-power polling. + static void sPollStatusRegisterCallback ( IOATACommand * cmd ); + + // This method is called by the SCSITaskCallbackFunction and it calls the + // inherited CommandCompleted message with the results of the task. + virtual void CompleteSCSITask ( SCSITaskIdentifier scsiTask, + SCSIServiceResponse serviceResponse, + SCSITaskStatus taskStatus ); + + // The SCSITaskCallbackFunction method is called by the static callback procedure + // to complete SCSITask operations. This method may be subclassed if a device + // workaround is necessary. + virtual void SCSITaskCallbackFunction ( IOATACommand * cmd, + SCSITaskIdentifier scsiTask ); + + // The ReportATAPIDeviceType method returns the ataDeviceType for ATAPI + virtual ataDeviceType ReportATAPIDeviceType ( void ) const; + + // The InspectDevice method is called to inspect the ATA device and verify + // that it is a device which can be controlled by this object + virtual bool InspectDevice ( IOATADevice * ataDevice ); + + // The AllocateATACommandObjects method is called to allocate a pool of + // IOATACommands for general purpose I/O usage. + virtual void AllocateATACommandObjects ( void ); + + // The DeallocateATACommandObjects method is called to deallocate a pool of + // IOATACommands for general purpose I/O usage. + virtual void DeallocateATACommandObjects ( void ); + + // The GetATACommandObject method is called to retrieve a command from + // the pool. Pass true to allow the method to sleep waiting for a command, + // else pass false. If false is passed, there is NO guarantee that a valid + // command will be returned. If true is passed, it IS guaranteed that a + // valid command will be returned, but the thread may be slept waiting for + // those resources. + virtual IOATACommand * GetATACommandObject ( bool okToSleep = true ); + + // The ReturnATACommandObject method is called to return a command to + // the pool. + virtual void ReturnATACommandObject ( IOATACommand * cmd ); + + // The sSwapBytes16 method is used to word-swap the Device Identify data + // on big endian systems. Since all identify data is returned in little endian + // values, it must be word-swapped before inspected. + static void sSwapBytes16 ( UInt8 * buffer, IOByteCount numBytesToSwap ); + + // The sConvertHighestBitToNumber method is used to find the highest bit in a + // word and return a numeric value. This is used to find the highest possible + // values for PIO, DMA, and UltraDMA transfer modes. + static UInt8 sConvertHighestBitToNumber ( UInt16 bitField ); + + // The sSetWakeupResetOccurred method is used to safely set member variables + // behind the command gate. + static void sSetWakeupResetOccurred ( IOATAPIProtocolTransport * driver, + bool resetOccurred ); + + // The sCheckWakeupResetOccur method is used to safely check member variables + // behind the command gate. + static void sCheckWakeupResetOccurred ( IOATAPIProtocolTransport * driver, + bool * resetOccurred ); + + // The DidWakeupResetOccur method is used to safely find out if a reset + // occurred while we were asleep. + virtual bool CheckWakeupResetOccurred ( void ); + + // The WakeupResetOccurred method is used to safely set/clear the reset flag. + virtual void SetWakeupResetOccurred ( bool resetOccurred ); + + // The SetPIOTransferMode method is used to set the programmed input-output (PIO) + // transfer mode. The highest value reported by the device is used. + virtual IOReturn SetPIOTransferMode ( IOATACommand * cmd, bool forceSync ); + + // The SetDMATransferMode method is used to set the direct memory access (DMA) + // transfer mode. The highest value reported by the device is used. + virtual IOReturn SetDMATransferMode ( IOATACommand * cmd, bool forceSync ); + + // The IdentifyAndConfigureATAPIDevice method is called to correctly identify + // and configure an ATAPI device. + virtual IOReturn IdentifyAndConfigureATAPIDevice ( void ); + + // The ConfigureATAPIDevice method is called to correctly configure the ATAPI + // device. It currently configures any PIO/DMA/UDMA transfer modes but may be + // expanded in the future. + virtual IOReturn ConfigureATAPIDevice ( void ); + + // The ReconfigureATAPIDevice method is called to correctly reconfigure the ATAPI + // device after a reset event has occurred (bus reset or device reset). It + // currently reconfigures any PIO/DMA/UDMA transfer modes but may be expanded in + // the future. + virtual IOReturn ReconfigureATAPIDevice ( void ); + + // The IdentifyATAPIDevice method is called to correctly identify the ATAPI + // device. It currently issues the Identify ATAPI Device packet command and + // uses the data to correctly configure the device. + virtual IOReturn IdentifyATAPIDevice ( void ); + + // The ResetATAPIDevice method is called to issue a Device Reset (also known + // as a SOFT RESET). This method will only reset the specified device on the + // bus. + virtual IOReturn ResetATAPIDevice ( void ); + + // The SendATASleepCommand method is called to put an ATAPI drive in sleep + // mode. + virtual IOReturn SendATASleepCommand ( void ); + + // The EnablePollingOfStatusRegister method is called to set up a timer for + // the call to PollStatusRegister. It is called when the SCSI Application Layer + // driver wants to enable low-power polling and after a poll which does not + // see a change in the register status. + virtual void EnablePollingOfStatusRegister ( void ); + + // The DisablePollingOfStatusRegister method is called to cancel any thread + // call which is doing a poll and drop the retain count on the object. + virtual void DisablePollingOfStatusRegister ( void ); + + // The PollStatusRegister method is used to do low-power polling on drives which + // support it. This feature is enabled by the SCSI Application Layer driver. + virtual void PollStatusRegister ( void * refCon ); + + // Callback method for the polling of the status register. + virtual void PollStatusRegisterCallback ( IOATACommand * cmd ); + + // The TurnDrivePowerOff method is called to turn power to the drive OFF + IOReturn TurnDrivePowerOff ( void ); + + IOReturn SendCommand ( IOATACommand * cmd ); + IOReturn GatedWaitForRequest ( void * data ); + +private: + + // Binary Compatibility reserved method space + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 1 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 2 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 3 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 4 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 5 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 6 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 7 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 8 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 9 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 10 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 11 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 12 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 13 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 14 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 15 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 16 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_ATAPI_PROTOCOL_TRANSPORT_H_ */ \ No newline at end of file diff --git a/i386/include/IOKit/storage/ata/.svn/text-base/IOATAStorageDefines.h.svn-base b/i386/include/IOKit/storage/ata/.svn/text-base/IOATAStorageDefines.h.svn-base new file mode 100644 index 0000000..fdac8b3 --- /dev/null +++ b/i386/include/IOKit/storage/ata/.svn/text-base/IOATAStorageDefines.h.svn-base @@ -0,0 +1,321 @@ +/* + * Copyright (c) 1998-2007 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IO_ATA_STORAGE_DEFINES_H_ +#define _IOKIT_IO_ATA_STORAGE_DEFINES_H_ + +#include <stdint.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Important word offsets in device identify data as + * defined in ATA-5 standard + */ + +enum +{ + kATAIdentifyConfiguration = 0, + kATAIdentifyLogicalCylinderCount = 1, + kATAIdentifyLogicalHeadCount = 3, + kATAIdentifySectorsPerTrack = 6, + kATAIdentifySerialNumber = 10, + kATAIdentifyFirmwareRevision = 23, + kATAIdentifyModelNumber = 27, + kATAIdentifyMultipleSectorCount = 47, + kATAIdentifyDriveCapabilities = 49, + kATAIdentifyDriveCapabilitiesExtended = 50, + kATAIdentifyPIOTiming = 51, + kATAIdentifyExtendedInfoSupport = 53, + kATAIdentifyCurrentCylinders = 54, + kATAIdentifyCurrentHeads = 55, + kATAIdentifyCurrentSectors = 56, + kATAIdentifyCurrentCapacity = 57, + kATAIdentifyCurrentMultipleSectors = 59, + kATAIdentifyLBACapacity = 60, + kATAIdentifySingleWordDMA = 62, + kATAIdentifyMultiWordDMA = 63, + kATAIdentifyAdvancedPIOModes = 64, + kATAIdentifyMinMultiWordDMATime = 65, + kATAIdentifyRecommendedMultiWordDMATime = 66, + kATAIdentifyMinPIOTime = 67, + kATAIdentifyMinPIOTimeWithIORDY = 68, + kATAIdentifyQueueDepth = 75, + kATAIdentifyMajorVersion = 80, + kATAIdentifyMinorVersion = 81, + kATAIdentifyCommandSetSupported = 82, + kATAIdentifyCommandSetSupported2 = 83, + kATAIdentifyCommandExtension1 = 84, + kATAIdentifyCommandExtension2 = 85, + kATAIdentifyCommandsEnabled = 86, + kATAIdentifyCommandsDefault = 87, + kATAIdentifyUltraDMASupported = 88, + kATAIdentifyPhysicalLogicalSectorSize = 106, + kATAIdentifyWordsPerLogicalSector1 = 117, + kATAIdentifyWordsPerLogicalSector2 = 118, + kATAIdentifyLogicalSectorAlignment = 209, + kATAIdentifyIntegrity = 255 +}; + + +/* + * Important bits in device identify data + * as defined in ATA-5 standard + */ + +enum +{ + // Configuration field (word 0) + kFixedDeviceBit = 6, // Fixed disk indicator bit + kRemoveableMediaBit = 7, // Removable media indicator bit + kNonMagneticDriveBit = 15, // Non-magnetic drive indicator bit + + kFixedDeviceMask = (1 << kFixedDeviceBit), // Mask for fixed disk indicator + kRemoveableMediaMask = (1 << kRemoveableMediaBit), // Mask for removable media indicator + kNonMagneticDriveMask = (1 << kNonMagneticDriveBit), // Mask for non-magnetic drive indicator + + // Capabilities field (word 49) + kDMABit = 8, // DMA supported bit + kLBABit = 9, // LBA supported bit + kIORDYDisableBit = 10, // IORDY can be disabled bit + kIORDYBit = 11, // IORDY supported bit + kStandbyTimerBit = 13, // Standby timer supported bit + + kDMASupportedMask = (1 << kDMABit), // Mask for DMA supported + kLBASupportedMask = (1 << kLBABit), // Mask for LBA supported + kDMADisableMask = (1 << kIORDYDisableBit), // Mask for DMA supported + kIORDYSupportedMask = (1 << kIORDYBit), // Mask for IORDY supported + kStandbySupportedMask = (1 << kStandbyTimerBit), // Mask for Standby Timer supported + + // Extensions field (word 53) + kCurFieldsValidBit = 0, // Bit to show words 54-58 are valid + kExtFieldsValidBit = 1, // Bit to show words 64-70 are valid + kCurFieldsValidMask = (1 << kCurFieldsValidBit), // Mask for current fields valid + kExtFieldsValidMask = (1 << kExtFieldsValidBit), // Extension word valid + + // Advanced PIO Transfer Modes field (word 64) + kMode3Bit = 0, // Bit to indicate mode 3 is supported + kMode3Mask = (1 << kMode3Bit), // Mask for mode 3 support + + // Integrity of Identify data (word 255) + kChecksumValidCookie = 0xA5 // Bits 7:0 if device supports feature + +}; + + +/* String size constants */ +enum +{ + kSizeOfATAModelString = 40, + kSizeOfATARevisionString = 8 +}; + +/* ATA Command timeout constants ( in milliseconds ) */ +enum +{ + kATATimeout10Seconds = 10000, + kATATimeout30Seconds = 30000, + kATATimeout45Seconds = 45000, + kATATimeout1Minute = 60000, + kATADefaultTimeout = kATATimeout30Seconds +}; + + +/* Retry constants */ +enum +{ + kATAZeroRetries = 0, + kATADefaultRetries = 4 +}; + +/* max number of blocks supported in ATA transaction */ +enum +{ + kIOATASectorCount8Bit = 8, + kIOATASectorCount16Bit = 16 +}; + +enum +{ + kIOATAMaximumBlockCount8Bit = (1 << kIOATASectorCount8Bit), + kIOATAMaximumBlockCount16Bit = (1 << kIOATASectorCount16Bit), + + // For backwards compatibility + kIOATAMaxBlocksPerXfer = kIOATAMaximumBlockCount8Bit +}; + + + +/* Power Management time constants (in seconds) */ +enum +{ + kSecondsInAMinute = 60, + k5Minutes = 5 * kSecondsInAMinute +}; + +/* Bits for features published in Word 82 of device identify data */ +enum +{ + kATASupportsSMARTBit = 0, + kATASupportsPowerManagementBit = 3, + kATASupportsWriteCacheBit = 5 +}; + +/* Masks for features published in Word 82 of device identify data */ +enum +{ + kATASupportsSMARTMask = (1 << kATASupportsSMARTBit), + kATASupportsPowerManagementMask = (1 << kATASupportsPowerManagementBit), + kATASupportsWriteCacheMask = (1 << kATASupportsWriteCacheBit) +}; + +/* Bits for features published in Word 83 of device identify data */ +enum +{ + kATASupportsCompactFlashBit = 2, + kATASupportsAdvancedPowerManagementBit = 3, + + kATASupports48BitAddressingBit = 10, + + kATASupportsFlushCacheBit = 12, + kATASupportsFlushCacheExtendedBit = 13 +}; + +/* Masks for features published in Word 83 of device identify data */ +enum +{ + kATASupportsCompactFlashMask = (1 << kATASupportsCompactFlashBit), + kATASupportsAdvancedPowerManagementMask = (1 << kATASupportsAdvancedPowerManagementBit), + + kATASupports48BitAddressingMask = (1 << kATASupports48BitAddressingBit), + + kATASupportsFlushCacheMask = (1 << kATASupportsFlushCacheBit), + kATASupportsFlushCacheExtendedMask = (1 << kATASupportsFlushCacheExtendedBit), + + // Mask to ensure data is valid + kIdentifyWordValidationMask = 0xC000, + kIdentifyWordValid = 0x4000 +}; + +/* Bits for features published in Word 84 of device identify data */ +enum +{ + kATAForceUnitAccessFeatureBit = 6, +}; + +/* Masks for features published in Word 84 of device identify data */ +enum +{ + kATAForceUnitAccessFeatureMask = (1 << kATAForceUnitAccessFeatureBit), +}; + +/* Bits for features published in Word 85 of device identify data */ +enum +{ + kATAWriteCacheEnabledBit = 5 +}; + +/* Masks for features published in Word 85 of device identify data */ +enum +{ + kATAWriteCacheEnabledMask = (1 << kATAWriteCacheEnabledBit) +}; + + +/* Bits for features published in Word 106 of device identify data */ +enum +{ + kATAPhysicalLogicalEnabledBit0 = 15, + kATAPhysicalLogicalEnabledBit1 = 14, + kATAMultipleLogicalSectorsBit = 13, + kATAValidLogicalSectorSizeBit = 12 +}; + +/* Masks for features published in Word 106 of device identify data */ +enum +{ + kATAPhysicalLogicalEnabledMask = (1 << kATAPhysicalLogicalEnabledBit0) | (1 << kATAPhysicalLogicalEnabledBit1), + kATAPhysicalLogicalEnabledValue = (0 << kATAPhysicalLogicalEnabledBit0) | (1 << kATAPhysicalLogicalEnabledBit1), + kATAMultipleLogicalSectorsMask = (1 << kATAMultipleLogicalSectorsBit), + kATAValidLogicalSectorSizeMask = (1 << kATAValidLogicalSectorSizeBit), + kATAPhysicalSectorSizeMask = 0xF, + kATALogicalSectorAlignmentMask = 0x3FFF +}; + +// Property table keys +#define kIOATASupportedFeaturesKey "ATA Features" + +/* ATA supported features */ +enum +{ + kIOATAFeaturePowerManagement = 0x01, /* OBSOLETE */ + kIOATAFeatureWriteCache = 0x02, /* OBSOLETE */ + kIOATAFeatureAdvancedPowerManagement = 0x04, + kIOATAFeatureCompactFlash = 0x08, + kIOATAFeature48BitLBA = 0x10, + kIOATAFeatureSMART = 0x20 +}; + +/* ATA Advanced Power Management settings (valid settings range from 1-254), +the settings below are the more common settings */ +enum +{ + kIOATAMaxPerformance = 0xFE, + kIOATADefaultPerformance = 0x80, + kIOATAMaxPowerSavings = 0x01 +}; + +/* ATA Transfer Mode bit masks */ +enum +{ + kATAEnableUltraDMAModeMask = 0x40, + kATAEnableMultiWordDMAModeMask = 0x20, + kATAEnablePIOModeMask = 0x08 +}; + + +typedef uint32_t ATAOperationType; +enum +{ + kATAOperationTypeRead = 0, + kATAOperationTypeWrite = 1, + kATAOperationTypeFlushCache = 2, + kATAOperationTypeSMART = 3, + kATAOperationTypeConfiguration = 4, + kATAOperationTypePowerManagement = 5, + kATAOperationTypeSMS = 6 +}; + +#if defined(KERNEL) + +typedef struct __ATAIORequest * ATARequestIdentifier; + +#endif // defined(KERNEL) + +#ifdef __cplusplus +} +#endif + +#endif /* _IOKIT_IO_ATA_STORAGE_DEFINES_H_ */ diff --git a/i386/include/IOKit/storage/ata/IOATAPIProtocolTransport.h b/i386/include/IOKit/storage/ata/IOATAPIProtocolTransport.h new file mode 100644 index 0000000..3356ae7 --- /dev/null +++ b/i386/include/IOKit/storage/ata/IOATAPIProtocolTransport.h @@ -0,0 +1,365 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*! + @header IOATAPIProtocolTransport + Contains the class definition for IOATAPIProtocolTransport. +*/ + + +#ifndef _IOKIT_IO_ATAPI_PROTOCOL_TRANSPORT_H_ +#define _IOKIT_IO_ATAPI_PROTOCOL_TRANSPORT_H_ + +#define kIOPropertyATAPIMassStorageCharacteristics "ATAPI Mass Storage Characteristics" + +#if defined(KERNEL) && defined(__cplusplus) + +/* General IOKit includes */ +#include <IOKit/IOLib.h> +#include <IOKit/IOMessage.h> +#include <IOKit/IOService.h> +#include <IOKit/IOCommandPool.h> + +/* IOKit ATA Family includes */ +#include <IOKit/ata/IOATADevice.h> +#include <IOKit/ata/IOATATypes.h> + +/* IOKit ATA Storage includes */ +#include <IOKit/storage/ata/IOATAStorageDefines.h> + +/* SCSI Architecture Model Family includes */ +#include <IOKit/scsi/IOSCSIProtocolServices.h> + +// Forward class declaration +class IOATAPIProtocolTransport; + +/*! + @typedef ATAPIClientData + @param cmd IOATACommand for request. + @param self Pointer to the object. + @param scsiTask SCSITaskIdentifier of request. + @discussion This structure is stuffed into the refcon so we can associate which + IOATACommand and SCSITaskIdentifier is completing. +*/ + +struct ATAPIClientData +{ + IOATACommand * cmd; + IOATAPIProtocolTransport * self; + SCSITaskIdentifier scsiTask; +}; +typedef struct ATAPIClientData ATAPIClientData; + + +/*! + @class IOATAPIProtocolTransport + @abstract SCSI Protocol Driver Family for ATAPI Devices. + @discussion IOATAPIProtocolTransport contains all the bus specific support for ATAPI compliant devices. + To add vendor specific features or workarounds you will sub-class the appropriate + methods of this family. +*/ + +class IOATAPIProtocolTransport : public IOSCSIProtocolServices +{ + + OSDeclareDefaultStructors ( IOATAPIProtocolTransport ) + +public: + + // ---- IOService methods overridden ---- + + bool init ( OSDictionary * propTable ); + + // The start method is called to start our services. If the device + // can be controlled by this object, then we return true, else we + // return false. start() is usually used to allocate resources once + // it is determined that the device can be controlled by this object. + virtual bool start ( IOService * provider ); + + // The stop method is called to stop our services. It is primarily + // called for deallocation of resources. + virtual void stop ( IOService * provider ); + + // This method is our last chance to free all resources allocated. + virtual void free ( void ); + + +protected: + + // ---- member variables ---- + + IOATADevice * fATADevice; + ataUnitID fATAUnitID; + ataDeviceType fATADeviceType; + ataSocketType fATASocketType; + atapiConfig fATAPIPacketConfig; + UInt8 fPIOMode; + UInt8 fDMAMode; + UInt8 fUltraDMAMode; + IOCommandGate * fCommandGate; + IOCommandPool * fCommandPool; + IOATACommand * fResetCommand; + IOATACommand * fConfigCommand; + IOATACommand * fIdentifyCommand; + char fRevision[kSizeOfATARevisionString + 1]; + char fModel[kSizeOfATAModelString + 1]; + bool fWakeUpResetOccurred; + bool fPhysicallyConnected; + + // Used for low-power polling support + thread_call_t fPollingThread; + + UInt16 fDeviceIdentifyData[256]; + IOMemoryDescriptor * fDeviceIdentifyBuffer; + bool fResetInProgress; + + // Binary Compatibility instance variable expansion + struct ExpansionData + { + UInt32 fSemaphore; + UInt32 fMediaNotifyValue; + }; + ExpansionData * reserved; + + // ---- IOService methods overridden ---- + + // The message method is used to listen to messages from our provider, the ATA controller. + // It sends messages for bus reset notifications and for device removal (such as MediaBay, + // PC card, etc.) + virtual IOReturn message ( UInt32 type, IOService * provider, void * argument = 0 ); + + // ---- Protocol transport methods overridden ---- + + // Send a SCSI Command to the device. If the command was sent to the + // device and is pending completion, the subclass should return true and + // return back the kSCSIServiceResponse_Request_In_Process response. + // If the command completes immediately with an error, the subclass will + // return true and return back the appropriate status. + // if the subclass is currently processing all the commands it can, the + // subclass will return false and the command will be resent next time + // CommandCompleted is called. + virtual bool SendSCSICommand ( SCSITaskIdentifier request, + SCSIServiceResponse * serviceResponse, + SCSITaskStatus * taskStatus ); + + // This is a stub - not implemented in upper layer yet. Eventually, there + // will be a way to abort a task or task set and this method will be called. + // It will abort any commands which have not been executed by the ATA controller + virtual SCSIServiceResponse AbortSCSICommand ( SCSITaskIdentifier request ); + + // The IsProtocolServiceSupported method will return true if the protocol + // layer supports the specified feature. + virtual bool IsProtocolServiceSupported ( SCSIProtocolFeature feature, void * serviceValue ); + + // The HandleProtocolServiceFeature method will return true if the protocol + // layer properly handled the specified feature. + virtual bool HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void * serviceValue ); + + // ------ Power Management Support ------ + + // The HandlePowerOff method is called to do any bus specific activity + // necessary before shutting down and going to sleep. + virtual IOReturn HandlePowerOff ( void ); + + // The HandlePowerOn method is called to do any bus specific activity + // necessary to recover from power-on/wake from sleep (e.g. device reset on ATAPI) + virtual IOReturn HandlePowerOn ( void ); + + + // ---- Methods defined by this class ---- + + // Static callback proc for all SCSITask objects, it calls through to + // SCSITaskCallbackFunction. + static void sSCSITaskCallbackProc ( IOATACommand * cmd ); + + // Callback proc for synchronous ATA only type commands. + static void sATACallbackSync ( IOATACommand * cmd ); + + // Callback proc for asynchronous ATAPI resets. + static void sATAPIResetCallback ( IOATACommand * cmd ); + + // Callback proc that does nothing. + static void sATAPIVoidCallback ( IOATACommand * cmd ); + + // State machine for device configuration. + static void sATAPIConfigStateMachine ( IOATACommand * cmd ); + + // Used for low-power polling. + static void sPollStatusRegister ( void * xptDriver, void * refCon ); + + // Static callback for low-power polling. + static void sPollStatusRegisterCallback ( IOATACommand * cmd ); + + // This method is called by the SCSITaskCallbackFunction and it calls the + // inherited CommandCompleted message with the results of the task. + virtual void CompleteSCSITask ( SCSITaskIdentifier scsiTask, + SCSIServiceResponse serviceResponse, + SCSITaskStatus taskStatus ); + + // The SCSITaskCallbackFunction method is called by the static callback procedure + // to complete SCSITask operations. This method may be subclassed if a device + // workaround is necessary. + virtual void SCSITaskCallbackFunction ( IOATACommand * cmd, + SCSITaskIdentifier scsiTask ); + + // The ReportATAPIDeviceType method returns the ataDeviceType for ATAPI + virtual ataDeviceType ReportATAPIDeviceType ( void ) const; + + // The InspectDevice method is called to inspect the ATA device and verify + // that it is a device which can be controlled by this object + virtual bool InspectDevice ( IOATADevice * ataDevice ); + + // The AllocateATACommandObjects method is called to allocate a pool of + // IOATACommands for general purpose I/O usage. + virtual void AllocateATACommandObjects ( void ); + + // The DeallocateATACommandObjects method is called to deallocate a pool of + // IOATACommands for general purpose I/O usage. + virtual void DeallocateATACommandObjects ( void ); + + // The GetATACommandObject method is called to retrieve a command from + // the pool. Pass true to allow the method to sleep waiting for a command, + // else pass false. If false is passed, there is NO guarantee that a valid + // command will be returned. If true is passed, it IS guaranteed that a + // valid command will be returned, but the thread may be slept waiting for + // those resources. + virtual IOATACommand * GetATACommandObject ( bool okToSleep = true ); + + // The ReturnATACommandObject method is called to return a command to + // the pool. + virtual void ReturnATACommandObject ( IOATACommand * cmd ); + + // The sSwapBytes16 method is used to word-swap the Device Identify data + // on big endian systems. Since all identify data is returned in little endian + // values, it must be word-swapped before inspected. + static void sSwapBytes16 ( UInt8 * buffer, IOByteCount numBytesToSwap ); + + // The sConvertHighestBitToNumber method is used to find the highest bit in a + // word and return a numeric value. This is used to find the highest possible + // values for PIO, DMA, and UltraDMA transfer modes. + static UInt8 sConvertHighestBitToNumber ( UInt16 bitField ); + + // The sSetWakeupResetOccurred method is used to safely set member variables + // behind the command gate. + static void sSetWakeupResetOccurred ( IOATAPIProtocolTransport * driver, + bool resetOccurred ); + + // The sCheckWakeupResetOccur method is used to safely check member variables + // behind the command gate. + static void sCheckWakeupResetOccurred ( IOATAPIProtocolTransport * driver, + bool * resetOccurred ); + + // The DidWakeupResetOccur method is used to safely find out if a reset + // occurred while we were asleep. + virtual bool CheckWakeupResetOccurred ( void ); + + // The WakeupResetOccurred method is used to safely set/clear the reset flag. + virtual void SetWakeupResetOccurred ( bool resetOccurred ); + + // The SetPIOTransferMode method is used to set the programmed input-output (PIO) + // transfer mode. The highest value reported by the device is used. + virtual IOReturn SetPIOTransferMode ( IOATACommand * cmd, bool forceSync ); + + // The SetDMATransferMode method is used to set the direct memory access (DMA) + // transfer mode. The highest value reported by the device is used. + virtual IOReturn SetDMATransferMode ( IOATACommand * cmd, bool forceSync ); + + // The IdentifyAndConfigureATAPIDevice method is called to correctly identify + // and configure an ATAPI device. + virtual IOReturn IdentifyAndConfigureATAPIDevice ( void ); + + // The ConfigureATAPIDevice method is called to correctly configure the ATAPI + // device. It currently configures any PIO/DMA/UDMA transfer modes but may be + // expanded in the future. + virtual IOReturn ConfigureATAPIDevice ( void ); + + // The ReconfigureATAPIDevice method is called to correctly reconfigure the ATAPI + // device after a reset event has occurred (bus reset or device reset). It + // currently reconfigures any PIO/DMA/UDMA transfer modes but may be expanded in + // the future. + virtual IOReturn ReconfigureATAPIDevice ( void ); + + // The IdentifyATAPIDevice method is called to correctly identify the ATAPI + // device. It currently issues the Identify ATAPI Device packet command and + // uses the data to correctly configure the device. + virtual IOReturn IdentifyATAPIDevice ( void ); + + // The ResetATAPIDevice method is called to issue a Device Reset (also known + // as a SOFT RESET). This method will only reset the specified device on the + // bus. + virtual IOReturn ResetATAPIDevice ( void ); + + // The SendATASleepCommand method is called to put an ATAPI drive in sleep + // mode. + virtual IOReturn SendATASleepCommand ( void ); + + // The EnablePollingOfStatusRegister method is called to set up a timer for + // the call to PollStatusRegister. It is called when the SCSI Application Layer + // driver wants to enable low-power polling and after a poll which does not + // see a change in the register status. + virtual void EnablePollingOfStatusRegister ( void ); + + // The DisablePollingOfStatusRegister method is called to cancel any thread + // call which is doing a poll and drop the retain count on the object. + virtual void DisablePollingOfStatusRegister ( void ); + + // The PollStatusRegister method is used to do low-power polling on drives which + // support it. This feature is enabled by the SCSI Application Layer driver. + virtual void PollStatusRegister ( void * refCon ); + + // Callback method for the polling of the status register. + virtual void PollStatusRegisterCallback ( IOATACommand * cmd ); + + // The TurnDrivePowerOff method is called to turn power to the drive OFF + IOReturn TurnDrivePowerOff ( void ); + + IOReturn SendCommand ( IOATACommand * cmd ); + IOReturn GatedWaitForRequest ( void * data ); + +private: + + // Binary Compatibility reserved method space + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 1 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 2 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 3 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 4 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 5 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 6 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 7 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 8 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 9 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 10 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 11 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 12 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 13 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 14 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 15 ); + OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 16 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_IO_ATAPI_PROTOCOL_TRANSPORT_H_ */ \ No newline at end of file diff --git a/i386/include/IOKit/storage/ata/IOATAStorageDefines.h b/i386/include/IOKit/storage/ata/IOATAStorageDefines.h new file mode 100644 index 0000000..fdac8b3 --- /dev/null +++ b/i386/include/IOKit/storage/ata/IOATAStorageDefines.h @@ -0,0 +1,321 @@ +/* + * Copyright (c) 1998-2007 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IO_ATA_STORAGE_DEFINES_H_ +#define _IOKIT_IO_ATA_STORAGE_DEFINES_H_ + +#include <stdint.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Important word offsets in device identify data as + * defined in ATA-5 standard + */ + +enum +{ + kATAIdentifyConfiguration = 0, + kATAIdentifyLogicalCylinderCount = 1, + kATAIdentifyLogicalHeadCount = 3, + kATAIdentifySectorsPerTrack = 6, + kATAIdentifySerialNumber = 10, + kATAIdentifyFirmwareRevision = 23, + kATAIdentifyModelNumber = 27, + kATAIdentifyMultipleSectorCount = 47, + kATAIdentifyDriveCapabilities = 49, + kATAIdentifyDriveCapabilitiesExtended = 50, + kATAIdentifyPIOTiming = 51, + kATAIdentifyExtendedInfoSupport = 53, + kATAIdentifyCurrentCylinders = 54, + kATAIdentifyCurrentHeads = 55, + kATAIdentifyCurrentSectors = 56, + kATAIdentifyCurrentCapacity = 57, + kATAIdentifyCurrentMultipleSectors = 59, + kATAIdentifyLBACapacity = 60, + kATAIdentifySingleWordDMA = 62, + kATAIdentifyMultiWordDMA = 63, + kATAIdentifyAdvancedPIOModes = 64, + kATAIdentifyMinMultiWordDMATime = 65, + kATAIdentifyRecommendedMultiWordDMATime = 66, + kATAIdentifyMinPIOTime = 67, + kATAIdentifyMinPIOTimeWithIORDY = 68, + kATAIdentifyQueueDepth = 75, + kATAIdentifyMajorVersion = 80, + kATAIdentifyMinorVersion = 81, + kATAIdentifyCommandSetSupported = 82, + kATAIdentifyCommandSetSupported2 = 83, + kATAIdentifyCommandExtension1 = 84, + kATAIdentifyCommandExtension2 = 85, + kATAIdentifyCommandsEnabled = 86, + kATAIdentifyCommandsDefault = 87, + kATAIdentifyUltraDMASupported = 88, + kATAIdentifyPhysicalLogicalSectorSize = 106, + kATAIdentifyWordsPerLogicalSector1 = 117, + kATAIdentifyWordsPerLogicalSector2 = 118, + kATAIdentifyLogicalSectorAlignment = 209, + kATAIdentifyIntegrity = 255 +}; + + +/* + * Important bits in device identify data + * as defined in ATA-5 standard + */ + +enum +{ + // Configuration field (word 0) + kFixedDeviceBit = 6, // Fixed disk indicator bit + kRemoveableMediaBit = 7, // Removable media indicator bit + kNonMagneticDriveBit = 15, // Non-magnetic drive indicator bit + + kFixedDeviceMask = (1 << kFixedDeviceBit), // Mask for fixed disk indicator + kRemoveableMediaMask = (1 << kRemoveableMediaBit), // Mask for removable media indicator + kNonMagneticDriveMask = (1 << kNonMagneticDriveBit), // Mask for non-magnetic drive indicator + + // Capabilities field (word 49) + kDMABit = 8, // DMA supported bit + kLBABit = 9, // LBA supported bit + kIORDYDisableBit = 10, // IORDY can be disabled bit + kIORDYBit = 11, // IORDY supported bit + kStandbyTimerBit = 13, // Standby timer supported bit + + kDMASupportedMask = (1 << kDMABit), // Mask for DMA supported + kLBASupportedMask = (1 << kLBABit), // Mask for LBA supported + kDMADisableMask = (1 << kIORDYDisableBit), // Mask for DMA supported + kIORDYSupportedMask = (1 << kIORDYBit), // Mask for IORDY supported + kStandbySupportedMask = (1 << kStandbyTimerBit), // Mask for Standby Timer supported + + // Extensions field (word 53) + kCurFieldsValidBit = 0, // Bit to show words 54-58 are valid + kExtFieldsValidBit = 1, // Bit to show words 64-70 are valid + kCurFieldsValidMask = (1 << kCurFieldsValidBit), // Mask for current fields valid + kExtFieldsValidMask = (1 << kExtFieldsValidBit), // Extension word valid + + // Advanced PIO Transfer Modes field (word 64) + kMode3Bit = 0, // Bit to indicate mode 3 is supported + kMode3Mask = (1 << kMode3Bit), // Mask for mode 3 support + + // Integrity of Identify data (word 255) + kChecksumValidCookie = 0xA5 // Bits 7:0 if device supports feature + +}; + + +/* String size constants */ +enum +{ + kSizeOfATAModelString = 40, + kSizeOfATARevisionString = 8 +}; + +/* ATA Command timeout constants ( in milliseconds ) */ +enum +{ + kATATimeout10Seconds = 10000, + kATATimeout30Seconds = 30000, + kATATimeout45Seconds = 45000, + kATATimeout1Minute = 60000, + kATADefaultTimeout = kATATimeout30Seconds +}; + + +/* Retry constants */ +enum +{ + kATAZeroRetries = 0, + kATADefaultRetries = 4 +}; + +/* max number of blocks supported in ATA transaction */ +enum +{ + kIOATASectorCount8Bit = 8, + kIOATASectorCount16Bit = 16 +}; + +enum +{ + kIOATAMaximumBlockCount8Bit = (1 << kIOATASectorCount8Bit), + kIOATAMaximumBlockCount16Bit = (1 << kIOATASectorCount16Bit), + + // For backwards compatibility + kIOATAMaxBlocksPerXfer = kIOATAMaximumBlockCount8Bit +}; + + + +/* Power Management time constants (in seconds) */ +enum +{ + kSecondsInAMinute = 60, + k5Minutes = 5 * kSecondsInAMinute +}; + +/* Bits for features published in Word 82 of device identify data */ +enum +{ + kATASupportsSMARTBit = 0, + kATASupportsPowerManagementBit = 3, + kATASupportsWriteCacheBit = 5 +}; + +/* Masks for features published in Word 82 of device identify data */ +enum +{ + kATASupportsSMARTMask = (1 << kATASupportsSMARTBit), + kATASupportsPowerManagementMask = (1 << kATASupportsPowerManagementBit), + kATASupportsWriteCacheMask = (1 << kATASupportsWriteCacheBit) +}; + +/* Bits for features published in Word 83 of device identify data */ +enum +{ + kATASupportsCompactFlashBit = 2, + kATASupportsAdvancedPowerManagementBit = 3, + + kATASupports48BitAddressingBit = 10, + + kATASupportsFlushCacheBit = 12, + kATASupportsFlushCacheExtendedBit = 13 +}; + +/* Masks for features published in Word 83 of device identify data */ +enum +{ + kATASupportsCompactFlashMask = (1 << kATASupportsCompactFlashBit), + kATASupportsAdvancedPowerManagementMask = (1 << kATASupportsAdvancedPowerManagementBit), + + kATASupports48BitAddressingMask = (1 << kATASupports48BitAddressingBit), + + kATASupportsFlushCacheMask = (1 << kATASupportsFlushCacheBit), + kATASupportsFlushCacheExtendedMask = (1 << kATASupportsFlushCacheExtendedBit), + + // Mask to ensure data is valid + kIdentifyWordValidationMask = 0xC000, + kIdentifyWordValid = 0x4000 +}; + +/* Bits for features published in Word 84 of device identify data */ +enum +{ + kATAForceUnitAccessFeatureBit = 6, +}; + +/* Masks for features published in Word 84 of device identify data */ +enum +{ + kATAForceUnitAccessFeatureMask = (1 << kATAForceUnitAccessFeatureBit), +}; + +/* Bits for features published in Word 85 of device identify data */ +enum +{ + kATAWriteCacheEnabledBit = 5 +}; + +/* Masks for features published in Word 85 of device identify data */ +enum +{ + kATAWriteCacheEnabledMask = (1 << kATAWriteCacheEnabledBit) +}; + + +/* Bits for features published in Word 106 of device identify data */ +enum +{ + kATAPhysicalLogicalEnabledBit0 = 15, + kATAPhysicalLogicalEnabledBit1 = 14, + kATAMultipleLogicalSectorsBit = 13, + kATAValidLogicalSectorSizeBit = 12 +}; + +/* Masks for features published in Word 106 of device identify data */ +enum +{ + kATAPhysicalLogicalEnabledMask = (1 << kATAPhysicalLogicalEnabledBit0) | (1 << kATAPhysicalLogicalEnabledBit1), + kATAPhysicalLogicalEnabledValue = (0 << kATAPhysicalLogicalEnabledBit0) | (1 << kATAPhysicalLogicalEnabledBit1), + kATAMultipleLogicalSectorsMask = (1 << kATAMultipleLogicalSectorsBit), + kATAValidLogicalSectorSizeMask = (1 << kATAValidLogicalSectorSizeBit), + kATAPhysicalSectorSizeMask = 0xF, + kATALogicalSectorAlignmentMask = 0x3FFF +}; + +// Property table keys +#define kIOATASupportedFeaturesKey "ATA Features" + +/* ATA supported features */ +enum +{ + kIOATAFeaturePowerManagement = 0x01, /* OBSOLETE */ + kIOATAFeatureWriteCache = 0x02, /* OBSOLETE */ + kIOATAFeatureAdvancedPowerManagement = 0x04, + kIOATAFeatureCompactFlash = 0x08, + kIOATAFeature48BitLBA = 0x10, + kIOATAFeatureSMART = 0x20 +}; + +/* ATA Advanced Power Management settings (valid settings range from 1-254), +the settings below are the more common settings */ +enum +{ + kIOATAMaxPerformance = 0xFE, + kIOATADefaultPerformance = 0x80, + kIOATAMaxPowerSavings = 0x01 +}; + +/* ATA Transfer Mode bit masks */ +enum +{ + kATAEnableUltraDMAModeMask = 0x40, + kATAEnableMultiWordDMAModeMask = 0x20, + kATAEnablePIOModeMask = 0x08 +}; + + +typedef uint32_t ATAOperationType; +enum +{ + kATAOperationTypeRead = 0, + kATAOperationTypeWrite = 1, + kATAOperationTypeFlushCache = 2, + kATAOperationTypeSMART = 3, + kATAOperationTypeConfiguration = 4, + kATAOperationTypePowerManagement = 5, + kATAOperationTypeSMS = 6 +}; + +#if defined(KERNEL) + +typedef struct __ATAIORequest * ATARequestIdentifier; + +#endif // defined(KERNEL) + +#ifdef __cplusplus +} +#endif + +#endif /* _IOKIT_IO_ATA_STORAGE_DEFINES_H_ */ diff --git a/i386/include/IOKit/stream/.svn/all-wcprops b/i386/include/IOKit/stream/.svn/all-wcprops new file mode 100644 index 0000000..cdf93a5 --- /dev/null +++ b/i386/include/IOKit/stream/.svn/all-wcprops @@ -0,0 +1,29 @@ +K 25 +svn:wc:ra_dav:version-url +V 59 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/stream +END +IOStreamShared.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/stream/IOStreamShared.h +END +IOStreamUserClient.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/stream/IOStreamUserClient.h +END +IOStream.h +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/stream/IOStream.h +END +IOStreamFamily.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/stream/IOStreamFamily.h +END diff --git a/i386/include/IOKit/stream/.svn/entries b/i386/include/IOKit/stream/.svn/entries new file mode 100644 index 0000000..1c63f86 --- /dev/null +++ b/i386/include/IOKit/stream/.svn/entries @@ -0,0 +1,164 @@ +10 + +dir +2117 +http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/stream +http://forge.voodooprojects.org/svn/chameleon + + + +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + +b5af796a-00a8-11df-919b-ffff7a100b7d + +IOStreamShared.h +file + + + + +2012-10-03T17:50:20.000000Z +925f10b148830bcae4312aa8a7ee2fea +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +4647 + +IOStreamUserClient.h +file + + + + +2012-10-03T17:50:20.000000Z +bdc9cf99229f3972604d4952b63a3aa2 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +2502 + +IOStream.h +file + + + + +2012-10-03T17:50:20.000000Z +3b670008c3567c9dc3699542b69dca37 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +21734 + +IOStreamFamily.h +file + + + + +2012-10-03T17:50:20.000000Z +f66e1be35cc893be907e91b6bc0f76e7 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +256 + diff --git a/i386/include/IOKit/stream/.svn/text-base/IOStream.h.svn-base b/i386/include/IOKit/stream/.svn/text-base/IOStream.h.svn-base new file mode 100644 index 0000000..01efad4 --- /dev/null +++ b/i386/include/IOKit/stream/.svn/text-base/IOStream.h.svn-base @@ -0,0 +1,609 @@ +/* + * Copyright 2006 Apple Computer, Inc. All rights reserved. + * + */ + +#if !defined(__IOKIT_IOSTREAM_H) +#define __IOKIT_IOSTREAM_H + +#include <IOKit/IOService.h> +#include <IOKit/IOMemoryDescriptor.h> +#include <IOKit/IOBufferMemoryDescriptor.h> +#include <IOKit/IOUserClient.h> + +#include <IOKit/stream/IOStreamShared.h> + +/*! + @header IOStream.h + Definitions for IOStream family. + */ + +class IOStreamBuffer; + +/*! + @class IOStream + @abstract + A class representing a stream of data buffers passed from kernel to + user space and back again. + @discussion + The IOStream class defines a mechanism for moving buffers of data from + kernel space to user space or vice-versa. The policy for which direction + the data flows and the nature of the data is left up the the implementer + of the driver which uses IOStream. + + Although it is expected that the client of an IOStream will be in user space, + this is not required. + + References to "output" mean "from the IOStream to the user client", and + "input" means "from the user client to the IOStream." + + */ + +class IOStream : public IOService +{ + OSDeclareDefaultStructors(IOStream); + + protected: + OSArray * _buffers; // IOStreamBuffer objects in this stream + + IOItemCount _queueCount; // Number of entries for the queues + + IOMemoryDescriptor * _inputQueueDescriptor; + IOMemoryMap * _inputQueueMap; + + IOMemoryDescriptor * _outputQueueDescriptor; + IOMemoryMap * _outputQueueMap; + + IOStreamBufferQueue * _outputQueue; // Shared memory for buffers out to user space + IOStreamBufferQueue * _inputQueue; // Shared memory for buffers in from user space + + mach_port_t _outputPort; + mach_port_t _inputPort; + + OSArray * _memoryMaps; // Maps for data queues + + IOStreamMode _streamMode; + + public: + + /*! + @functiongroup Creating IOStream objects + */ + + /*! + @function withBuffers + @param mode The initial mode of the stream, either output, input, or input/output. + @param queueLength The nuber of queue entries to reserve in the input and output queue. + Zero means to make the queues big enough to accommodate all the buffers at once. + @param properties + A dictionary of properties which will be set on the stream. + @param buffers + An array of IOStreamBuffer objects which will be the buffers for this stream. + */ + + static IOStream *withBuffers(OSArray *buffers, IOStreamMode mode = kIOStreamModeOutput, IOItemCount queueLength = 0, OSDictionary *properties = 0); + + virtual bool init(OSDictionary *properties = 0); + + /*! + @function initWithBuffers + @param mode The initial mode of the stream, either output, input, or input/output. + @param queueLength The nuber of queue entries to reserve in the input and output queue. + Zero means to make the queues big enough to accommodate all the buffers at once. + @param properties + A dictionary of properties which will be set on the stream. + @param buffers + An array of IOStreamBuffer objects which will be the buffers for this stream. + */ + virtual bool initWithBuffers(OSArray *buffers, IOStreamMode mode = kIOStreamModeOutput, IOItemCount queueLength = 0, OSDictionary *properties = 0); + + /*! + @function free + */ + virtual void free(void); + + /*! + @functiongroup Opening and closing streams + */ + + /*! + @function handleOpen + @abstract The handleOpen() method relies on the default IOService behavior + to ensure that + only one client has the stream open at a time. + The shared input and output queues are created at open time. + @param options + @param arg + */ + virtual bool handleOpen( IOService * forClient, + IOOptionBits options, + void * arg ); + + /*! + @function handleClose + @abstract The handleClose method destroys the shared input and output + queues. + @param options + */ + virtual void handleClose( IOService * forClient, + IOOptionBits options ); + + /*! + @functiongroup Managing shared queues + */ + + /*! + @function createQueues + @abstract Creates the shared input and output queues, without regard + to whether the stream is open or not. + Normally this is called by handleOpen(). + @param queueLength + @param options + @result Returns kIOReturnSuccess if the queues were successfully created. + */ + virtual IOReturn createQueues( IOItemCount queueLength = 0, IOOptionBits options = 0 ); + + /*! + @function destroyQueues + @abstract Releases the shared input and output queues. + @result Returns kIOReturnSuccess if the queues were successfully destroyed. + The queues cannot be destroyed while the stream is open by a client. + */ + virtual IOReturn destroyQueues( void ); + + /*! + @function getOutputQueue + @result A pointer to the output IOStreamBufferQueue structure for the stream, + or NULL if the stream is not open and the queue has not been created yet. + */ + virtual IOStreamBufferQueue *getOutputQueue(void); // get shared-memory output queue + + /*! + @function getOutputQueueMemoryDescriptor + @result An IOMemoryDescriptor object repesenting the shared memory + output queue buffer. + */ + virtual IOMemoryDescriptor *getOutputQueueMemoryDescriptor(void); + + /*! + @function getInputQueue + @result A pointer to the input IOStreamBufferQueue structure for the stream, + or NULL if the stream is not open and the queue has not been created yet. + */ + virtual IOStreamBufferQueue *getInputQueue(void); // get shared-memory input queue + + /*! + @function getInputQueueMemoryDescriptor + @result An IOMemoryDescriptor object repesenting the shared memory + input queue buffer. + */ + virtual IOMemoryDescriptor *getInputQueueMemoryDescriptor(void); + + + /*! + @functiongroup Managing buffers in an IOStream + */ + + /*! + @function addBuffer + @abstract Add a buffer to an IOStream. + @param buffer + @discussion + Adds an IOStreamBuffer to an IOStream. It will be added to the end + of the buffer array, so the buffer ID of existing buffers will not change. + */ + virtual IOReturn addBuffer(IOStreamBuffer *buffer); // add a new buffer to the stream + + /*! + @function addBuffers + @param buffers + @result + */ + virtual IOReturn addBuffers(OSArray *buffers); + + /*! + @function removeBuffer + @param buffer A pointer to an IOStreamBuffer object in the stream. + @result Returns kIOReturnSuccess if the buffer was removed, or kIOReturnNotFound + if the buffer was not in this stream. + @abstract + Removes a buffer from the stream. Buffers cannot be removed + while the stream is open, as this will change the buffer IDs of existing + buffers. + */ + virtual IOReturn removeBuffer(IOStreamBuffer *buffer); + + /*! + @function removeBuffer + @param bufferID The ID of the buffer to remove. + @result Returns kIOReturnSuccess if the buffer was removed. + @abstract + Removes a buffer from the stream. Buffers cannot be removed + while the stream is open, as this will change the buffer IDs of existing + buffers. + */ + + virtual IOReturn removeBuffer(IOStreamBufferID bufferID); + + /*! + @function removeAllBuffers + @result + */ + virtual IOReturn removeAllBuffers( void ); + + /*! + @function removeAllBuffers + @result Returns kIOReturnSuccess if all the buffers were successfully + removed. Buffers cannot be removed + while the stream is open, as this will change the buffer IDs of existing + buffers. + + */ + virtual IOItemCount getBufferCount( void ); + + /*! + @function getBuffers + @abstract Get an array containing all the buffers in the stream. + @discussion + Returns an OSArray containing all the buffers in the stream in order of their buffer ID. + */ + virtual OSArray *getBuffers( void ); + + + /*! + @function getBufferWithID + @param bufferID + The ID of the buffer to get. + @result + A pointer to an IOStreamBuffer object, or NULL if the + buffer ID was invalid for this stream. + */ + + virtual IOStreamBuffer *getBufferWithID(IOStreamBufferID bufferID); + + /*! + @functiongroup Managing notification ports + */ + + /*! + @function getInputPort + @abstract Get the Mach port used to receive notifications + from user space that a buffer has been added to the input queue. + */ + virtual mach_port_t getInputPort(void); + + /*! + @function setInputPort + @abstract Set the Mach port used to receive notifications from + user space that a buffer has been added to the input queue. + @param port + + */ + virtual IOReturn setInputPort(mach_port_t port); + + /*! + @function getOutputPort + @abstract Get the Mach port used to send notifications to user space + that a buffer has been added to the output queue. + */ + virtual mach_port_t getOutputPort(void); + + /*! + @function setOutputPort + @abstract Set the Mach port used to send notifications to user space + that a buffer has been added to the output queue. + @param port + */ + virtual IOReturn setOutputPort(mach_port_t port); + + /*! + @function sendOutputNotification + @abstract Send a notification to the user client that data is available + for reading on the output queue. This will result in the user's output + handler being called, if they registered one. + @result Returns kIOReturnSuccess if the notification was successfully sent. + */ + virtual IOReturn sendOutputNotification(void); + + /*! + @functiongroup Queueing and dequeueing buffers + */ + + /*! + @function enqueueOutputBuffer + @abstract A convenience method for enqueueing a buffer. + @param buffer + @param dataOffset + @param dataLength + @param controlOffset + @param controlLength + @result + */ + virtual IOReturn enqueueOutputBuffer(IOStreamBuffer *buffer, + IOByteCount dataOffset = 0, + IOByteCount dataLength = 0, + IOByteCount controlOffset = 0, + IOByteCount controlLength = 0); + + + /*! + @function enqueueOutputEntry + @param entry + @result + */ + virtual IOReturn enqueueOutputEntry( IOStreamBufferQueueEntry *entry ); + + /*! + @function dequeueInputEntry + @param entry + @result + */ + virtual IOReturn dequeueInputEntry( IOStreamBufferQueueEntry *entry ); + + /*! + @functiongroup Managing notifications + */ + + /*! + @function inputCallback + @abstract Input callback function to be implemented by a subclass; + @param token + A 32-bit token value that can be used by convention to communicate + from user space to the stream. The semantics of this value are + defined by the IOStream subclass. + @discussion + The inputCallback() method is called as a result of a fast trap + from user space. It is called on the same thread as the user request, + but the subclass should implement this call as a notification sent + to a workloop so that the request is asynchronous. + */ + virtual void inputCallback( UInt32 token ); + + /*! + @function inputSyncCallback + @abstract Input callback function to be implemented by a subclass. + @param token + A 32-bit token value that can be used by convention to communicate + from user space to the stream. The semantics of this value are + defined by the IOStream subclass. + @discussion + The inputSyncCallback() method is called as a result of a fast trap + from user space. It is called on the same thread as the user request, + so no context switch is necessary. + */ + virtual void inputSyncCallback( UInt32 token ); + + /*! + @functiongroup Stream control + */ + + /*! + @function getStreamMode + @abstract Returns the mode of the stream, either input or output. + @result The mode of the stream, either kIOStreamModeInput + (from user space to kernel space) or the default + kIOStreamModeOutput (from kernel space to user space). + */ + virtual IOStreamMode getStreamMode(void); + + /*! + @function setStreamMode + @abstract Sets the mode of the stream, either input or output. + @discussion Subclasses may define whether it is possible + to change the mode of a stream. + */ + virtual IOReturn setStreamMode(IOStreamMode mode); + + /*! + @function startStream + @abstract Start sending data on a stream. + @result Returns kIOReturnSuccess if the stream was successfully started. + @discussion This must be implemented by a subclass. + */ + virtual IOReturn startStream(void); + + /*! + @function stopStream + @abstract Stop sending data on a stream. + @result Returns kIOReturnSuccess if the stream was successfully stopped. + @discussion This must be implemented by a subclass. + */ + virtual IOReturn stopStream(void); + + /*! + @function suspendStream + @abstract Temporarily suspend data flow on the stream. + @result Returns kIOReturnSuccess if the stream was successfully suspended. + @discussion This must be implemented by a subclass. + */ + virtual IOReturn suspendStream(void); + + /*! + @functiongroup Managing user clients + */ + + /*! + @function newUserClient + @abstract See the documentation for the IOService method newUserClient. + */ + virtual IOReturn newUserClient( task_t owningTask, void * securityID, + UInt32 type, OSDictionary * properties, + IOUserClient ** handler ); + + + /* Reserved slots */ + + OSMetaClassDeclareReservedUnused(IOStream, 0); + OSMetaClassDeclareReservedUnused(IOStream, 1); + OSMetaClassDeclareReservedUnused(IOStream, 2); + OSMetaClassDeclareReservedUnused(IOStream, 3); + OSMetaClassDeclareReservedUnused(IOStream, 4); + OSMetaClassDeclareReservedUnused(IOStream, 5); + OSMetaClassDeclareReservedUnused(IOStream, 6); + OSMetaClassDeclareReservedUnused(IOStream, 7); + OSMetaClassDeclareReservedUnused(IOStream, 8); + OSMetaClassDeclareReservedUnused(IOStream, 9); + OSMetaClassDeclareReservedUnused(IOStream, 10); + OSMetaClassDeclareReservedUnused(IOStream, 11); + OSMetaClassDeclareReservedUnused(IOStream, 12); + OSMetaClassDeclareReservedUnused(IOStream, 13); + OSMetaClassDeclareReservedUnused(IOStream, 14); + OSMetaClassDeclareReservedUnused(IOStream, 15); + OSMetaClassDeclareReservedUnused(IOStream, 16); + OSMetaClassDeclareReservedUnused(IOStream, 17); + OSMetaClassDeclareReservedUnused(IOStream, 18); + OSMetaClassDeclareReservedUnused(IOStream, 19); + OSMetaClassDeclareReservedUnused(IOStream, 20); + OSMetaClassDeclareReservedUnused(IOStream, 21); + OSMetaClassDeclareReservedUnused(IOStream, 22); + OSMetaClassDeclareReservedUnused(IOStream, 23); + OSMetaClassDeclareReservedUnused(IOStream, 24); + OSMetaClassDeclareReservedUnused(IOStream, 25); + OSMetaClassDeclareReservedUnused(IOStream, 26); + OSMetaClassDeclareReservedUnused(IOStream, 27); + OSMetaClassDeclareReservedUnused(IOStream, 28); + OSMetaClassDeclareReservedUnused(IOStream, 29); + OSMetaClassDeclareReservedUnused(IOStream, 30); + OSMetaClassDeclareReservedUnused(IOStream, 31); + +}; + + +/*! + @class IOStreamBuffer + A class representing a data buffer that is part of an IOStream. + */ + +class IOStreamBuffer : public OSObject +{ + OSDeclareDefaultStructors(IOStreamBuffer); + +protected: + IOMemoryDescriptor * _dataBuffer; // The data buffer is expected to be filled by hardware. + IOMemoryDescriptor * _controlBuffer; // The control buffer is expected to be defined by the hardware driver. + + IOStreamBufferID _bufferID; // Client handle for this buffer. + + OSArray * _clientMemoryMaps; // Maps for clients who are sharing these buffers. + + SInt32 _clientReferenceCount; // Count of client uses of this buffer. May be negative. + +public: + /*! + @function initWithMemoryDescriptors + */ + virtual bool initWithMemoryDescriptors(IOMemoryDescriptor *dataBuffer, + IOMemoryDescriptor *controlBuffer, + IOStreamBufferID bufferID = 0); + + /*! + @function withMemoryDescriptors + */ + static IOStreamBuffer *withMemoryDescriptors(IOMemoryDescriptor *dataBuffer, + IOMemoryDescriptor *controlBuffer, + IOStreamBufferID bufferID = 0); + + virtual void free(void); + + /*! + @function getBufferID + @abstract Gets the buffer identifier for the IOStreamBuffer object. + @discussion The buffer identifier is unique across all buffers in a stream. + */ + virtual IOStreamBufferID getBufferID(void); + + /*! + @function setBufferID + @abstract Sets the buffer identifier for the IOStreamBuffer object. + */ + + virtual void setBufferID( IOStreamBufferID bufferID ); + + /*! + @function setDataBuffer + @abstract Sets the data buffer for the IOStreamBuffer object. + */ + virtual void setDataBuffer(IOMemoryDescriptor *dataBuffer); + + /*! + @function setControlBuffer + @abstract Sets the control buffer for the IOStreamBuffer object. + */ + virtual void setControlBuffer(IOMemoryDescriptor *controlBuffer); + + /*! + @function getDataBuffer + @result A pointer to the IOMemoryDescriptor for the data buffer. + */ + virtual IOMemoryDescriptor *getDataBuffer(void); + + /*! + @function getControlBuffer + @result A pointer to the IOMemoryDescriptor for the control buffer. + */ + virtual IOMemoryDescriptor *getControlBuffer(void); + + /*! + @function getClientReferenceCount + @result The count of client references to this buffer. It may be positive + or negative, depending on whether the client is sending data into the kernel, + or the kernel is sending data out to the client. + */ + virtual SInt32 getClientReferenceCount( void ); + + /*! + @function sendClientReference + @param offset The offset in the buffer of the data sent to the client. + @param length The length of the data sent to the client. + @result The new client reference count. + @abstract + */ + virtual SInt32 sendClientReference( IOByteCount offset = 0, IOByteCount length = 0 ); + + /*! + @function receiveClientReference + @param offset The offset in the buffer of the data from the client. + @param length The length of the data from the client. + @abstract + */ + virtual SInt32 receiveClientReference( IOByteCount offset = 0, IOByteCount length = 0 ); + + /* Reserved slots */ + + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 0); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 1); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 2); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 3); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 4); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 5); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 6); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 7); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 8); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 9); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 10); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 11); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 12); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 13); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 14); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 15); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 16); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 17); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 18); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 19); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 20); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 21); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 22); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 23); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 24); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 25); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 26); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 27); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 28); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 29); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 30); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 31); + +}; + +#endif /* ! __IOKIT_IOSTREAM_H */ + diff --git a/i386/include/IOKit/stream/.svn/text-base/IOStreamFamily.h.svn-base b/i386/include/IOKit/stream/.svn/text-base/IOStreamFamily.h.svn-base new file mode 100644 index 0000000..a4eb7f0 --- /dev/null +++ b/i386/include/IOKit/stream/.svn/text-base/IOStreamFamily.h.svn-base @@ -0,0 +1,13 @@ +/* + * Copyright 2006 Apple Computer, Inc. All rights reserved. + * + */ + +#ifndef __IOKIT_IOSTREAMFAMILY_H +#define __IOKIT_IOSTREAMFAMILY_H + +#include <IOKit/stream/IOStream.h> +#include <IOKit/stream/IOStreamShared.h> + + +#endif /* !__IOKIT_IOSTREAMFAMILY_H */ diff --git a/i386/include/IOKit/stream/.svn/text-base/IOStreamShared.h.svn-base b/i386/include/IOKit/stream/.svn/text-base/IOStreamShared.h.svn-base new file mode 100644 index 0000000..5b2c0a3 --- /dev/null +++ b/i386/include/IOKit/stream/.svn/text-base/IOStreamShared.h.svn-base @@ -0,0 +1,175 @@ +/* + * IOStreamShared.h + * IOStreamFamily + * + * Copyright 2006 Apple Computer, Inc. All rights reserved. + * + */ + +#if !defined(__IOKIT_IOSTREAMSHARED_H) +#define __IOKIT_IOSTREAMSHARED_H + +#include <sys/cdefs.h> + +#include <IOKit/IOTypes.h> + +/*! + @header IOStreamShared.h + IOStream definitions shared between kernel and user space. + */ + +__BEGIN_DECLS + +// Buffer numbers are guaranteed to go from 0 to bufferCount - 1. +/*! + @typedef IOStreamBufferID + */ +typedef UInt32 IOStreamBufferID; +#define kIOStreamBufferIDInvalid (~0) + +// This is the header for the shared-memory queue used to send buffer notifications +// from kernel to user space or vice versa. + +// Queue entry in input or output queue + +#ifdef __cplusplus + +/*! + @struct IOStreamBufferQueueEntry + @field bufferID The ID of the buffer passed in this queue entry. + @field dataLength The length of the valid data in the buffer. + @field reserved Reserved for future use. +*/ + +struct IOStreamBufferQueueEntry { + IOStreamBufferID bufferID; + UInt32 dataOffset; + UInt32 dataLength; + UInt32 controlOffset; + UInt32 controlLength; + UInt32 reserved[3]; +}; + + +/*! + @struct IOStreamBufferQueue + @field entryCount The number of queue entries in the queue. + @field headIndex The index of the next queue slot that will be filled in by the queue writer. + @field tailIndex The index of the next queue slot that can be read by the queue reader. + @field reserved Reserved for future use. + @field queue The array of queue entries. + */ + +struct IOStreamBufferQueue { + UInt32 entryCount; + volatile UInt32 headIndex; + volatile UInt32 tailIndex; + UInt32 reserved; + IOStreamBufferQueueEntry queue[0]; +}; + +#else + +typedef struct __IOStreamBufferQueueEntry { + IOStreamBufferID bufferID; + UInt32 dataOffset; + UInt32 dataLength; + UInt32 controlOffset; + UInt32 controlLength; + UInt32 reserved[3]; +} IOStreamBufferQueueEntry; + +typedef struct __IOStreamBufferQueue { + UInt32 entryCount; + volatile UInt32 headIndex; + volatile UInt32 tailIndex; + UInt32 reserved; + IOStreamBufferQueueEntry queue[0]; +} IOStreamBufferQueue; + +#endif + +/*! + @enum Memory mapping types + @constant kIOStreamMemoryTypeOutputQueue + @constant kIOStreamMemoryTypeInputQueue + @constant kIOStreamMemoryTypeBufferData + @constant kIOStreamMemoryTypeBufferControl + @constant kIOStreamBufferIDMask + @constant kIOStreamMemoryTypeMask + @abstract Memory types used with IOConnectMapMemory(). + */ +enum { + kIOStreamMemoryTypeOutputQueue = 0x10000000, + kIOStreamMemoryTypeInputQueue = 0x20000000, + kIOStreamMemoryTypeBufferData = 0x30000000, + kIOStreamMemoryTypeBufferControl = 0x40000000, + kIOStreamBufferIDMask = 0x0FFFFFFF, + kIOStreamMemoryTypeMask = 0xF0000000 +}; + +/*! + @enum Mach port types + @constant kIOStreamPortTypeOutput + @constant kIOStreamPortTypeInput + @abstract Port types used with IOConnectSetNotificationPort(). + */ +enum { + kIOStreamPortTypeOutput, + kIOStreamPortTypeInput +}; + +/*! + @enum IOStream open options + */ + +enum { + kIOStreamOptionOpenExclusive = 0x00010000, + kIOStreamOptionOpenShared = 0x00020000 +}; + +/*! + @enum User client methods + @constant kIOStreamMethodOpen + @constant kIOStreamMethodClose + @constant kIOStreamMethodStart + @constant kIOStreamMethodStop + @constant kIOStreamMethodSuspend + @constant kIOStreamMethodGetMode + @constant kIOStreamMethodSetMode + + @abstract Client method numbers used with IOConnectMethod...() functions. + */ +enum { + kIOStreamMethodOpen, + kIOStreamMethodClose, + kIOStreamMethodStart, + kIOStreamMethodStop, + kIOStreamMethodSuspend, + kIOStreamMethodGetMode, + kIOStreamMethodSetMode, + kIOStreamMethodGetBufferCount +}; + +/*! + @enum User client traps + @constant kIOStreamEnqueueInputTrap + @constant kIOStreamEnqueueInputSyncTrap + @abstract Client trap numbers used with IOConnectTrap..() functions. + */ +enum { + kIOStreamEnqueueInputTrap, + kIOStreamEnqueueInputSyncTrap +}; + +typedef enum { + kIOStreamModeInput, // From user to kernel space + kIOStreamModeOutput, // From kernel to user space + kIOStreamModeInputOutput // bidirectional +} IOStreamMode; + + +__END_DECLS + +#endif /* ! __IOKIT_IOSTREAMSHARED_H */ + diff --git a/i386/include/IOKit/stream/.svn/text-base/IOStreamUserClient.h.svn-base b/i386/include/IOKit/stream/.svn/text-base/IOStreamUserClient.h.svn-base new file mode 100644 index 0000000..887575a --- /dev/null +++ b/i386/include/IOKit/stream/.svn/text-base/IOStreamUserClient.h.svn-base @@ -0,0 +1,76 @@ +/* + * IOStreamUserClient.h + * IOStreamFamily + * + * Copyright 2006 Apple Computer, Inc. All rights reserved. + * + */ + +#if !defined( __IOKIT_IOSTREAMUSERCLIENT_H ) +#define __IOKIT_IOSTREAMUSERCLIENT_H + + +#include <IOKit/IOUserClient.h> + +#include <IOKit/stream/IOStreamShared.h> +#include <IOKit/stream/IOStream.h> + +class IOStreamUserClient : public IOUserClient +{ + OSDeclareDefaultStructors( IOStreamUserClient ) + +protected: + IOStream * _owner; + task_t _task; + +public: + virtual bool initWithTask( + task_t owningTask, void * securityToken, UInt32 type, + OSDictionary * properties); + virtual bool initWithTask( + task_t owningTask, void * securityToken, UInt32 type); + + virtual IOReturn clientClose( void ); + virtual IOReturn clientDied( void ); + + virtual IOService * getService( void ); + + virtual IOReturn registerNotificationPort( + mach_port_t port, UInt32 type, UInt32 refCon ); + + virtual IOReturn connectClient( IOUserClient * client ); + + virtual IOExternalMethod * getTargetAndMethodForIndex( + IOService ** targetP, UInt32 index ); + + virtual IOExternalTrap * + getTargetAndTrapForIndex( IOService **targetP, UInt32 index ); + + virtual IOReturn clientMemoryForType( UInt32 type, + IOOptionBits * options, + IOMemoryDescriptor ** memory ); + + virtual bool start( IOService * provider ); + + +protected: + virtual IOReturn openMethod( char * dataIn, char * dataOut, + IOByteCount inputSize, IOByteCount * outputSize ); + virtual IOReturn closeMethod( void ); + virtual IOReturn startMethod( void ); + virtual IOReturn stopMethod( void ); + virtual IOReturn suspendMethod( void ); + virtual IOReturn getModeMethod( char * dataOut, + IOByteCount * outputSize ); + virtual IOReturn setModeMethod( char * dataIn, + IOByteCount inputSize ); + virtual IOReturn getBufferCountMethod( char * dataOut, + IOByteCount * outputSize ); + + virtual IOReturn inputTrap( UInt32 token ); + virtual IOReturn inputSyncTrap( UInt32 token ); + +}; + +#endif /* ! __IOKIT_IOSTREAMUSERCLIENT_H */ + diff --git a/i386/include/IOKit/stream/IOStream.h b/i386/include/IOKit/stream/IOStream.h new file mode 100644 index 0000000..01efad4 --- /dev/null +++ b/i386/include/IOKit/stream/IOStream.h @@ -0,0 +1,609 @@ +/* + * Copyright 2006 Apple Computer, Inc. All rights reserved. + * + */ + +#if !defined(__IOKIT_IOSTREAM_H) +#define __IOKIT_IOSTREAM_H + +#include <IOKit/IOService.h> +#include <IOKit/IOMemoryDescriptor.h> +#include <IOKit/IOBufferMemoryDescriptor.h> +#include <IOKit/IOUserClient.h> + +#include <IOKit/stream/IOStreamShared.h> + +/*! + @header IOStream.h + Definitions for IOStream family. + */ + +class IOStreamBuffer; + +/*! + @class IOStream + @abstract + A class representing a stream of data buffers passed from kernel to + user space and back again. + @discussion + The IOStream class defines a mechanism for moving buffers of data from + kernel space to user space or vice-versa. The policy for which direction + the data flows and the nature of the data is left up the the implementer + of the driver which uses IOStream. + + Although it is expected that the client of an IOStream will be in user space, + this is not required. + + References to "output" mean "from the IOStream to the user client", and + "input" means "from the user client to the IOStream." + + */ + +class IOStream : public IOService +{ + OSDeclareDefaultStructors(IOStream); + + protected: + OSArray * _buffers; // IOStreamBuffer objects in this stream + + IOItemCount _queueCount; // Number of entries for the queues + + IOMemoryDescriptor * _inputQueueDescriptor; + IOMemoryMap * _inputQueueMap; + + IOMemoryDescriptor * _outputQueueDescriptor; + IOMemoryMap * _outputQueueMap; + + IOStreamBufferQueue * _outputQueue; // Shared memory for buffers out to user space + IOStreamBufferQueue * _inputQueue; // Shared memory for buffers in from user space + + mach_port_t _outputPort; + mach_port_t _inputPort; + + OSArray * _memoryMaps; // Maps for data queues + + IOStreamMode _streamMode; + + public: + + /*! + @functiongroup Creating IOStream objects + */ + + /*! + @function withBuffers + @param mode The initial mode of the stream, either output, input, or input/output. + @param queueLength The nuber of queue entries to reserve in the input and output queue. + Zero means to make the queues big enough to accommodate all the buffers at once. + @param properties + A dictionary of properties which will be set on the stream. + @param buffers + An array of IOStreamBuffer objects which will be the buffers for this stream. + */ + + static IOStream *withBuffers(OSArray *buffers, IOStreamMode mode = kIOStreamModeOutput, IOItemCount queueLength = 0, OSDictionary *properties = 0); + + virtual bool init(OSDictionary *properties = 0); + + /*! + @function initWithBuffers + @param mode The initial mode of the stream, either output, input, or input/output. + @param queueLength The nuber of queue entries to reserve in the input and output queue. + Zero means to make the queues big enough to accommodate all the buffers at once. + @param properties + A dictionary of properties which will be set on the stream. + @param buffers + An array of IOStreamBuffer objects which will be the buffers for this stream. + */ + virtual bool initWithBuffers(OSArray *buffers, IOStreamMode mode = kIOStreamModeOutput, IOItemCount queueLength = 0, OSDictionary *properties = 0); + + /*! + @function free + */ + virtual void free(void); + + /*! + @functiongroup Opening and closing streams + */ + + /*! + @function handleOpen + @abstract The handleOpen() method relies on the default IOService behavior + to ensure that + only one client has the stream open at a time. + The shared input and output queues are created at open time. + @param options + @param arg + */ + virtual bool handleOpen( IOService * forClient, + IOOptionBits options, + void * arg ); + + /*! + @function handleClose + @abstract The handleClose method destroys the shared input and output + queues. + @param options + */ + virtual void handleClose( IOService * forClient, + IOOptionBits options ); + + /*! + @functiongroup Managing shared queues + */ + + /*! + @function createQueues + @abstract Creates the shared input and output queues, without regard + to whether the stream is open or not. + Normally this is called by handleOpen(). + @param queueLength + @param options + @result Returns kIOReturnSuccess if the queues were successfully created. + */ + virtual IOReturn createQueues( IOItemCount queueLength = 0, IOOptionBits options = 0 ); + + /*! + @function destroyQueues + @abstract Releases the shared input and output queues. + @result Returns kIOReturnSuccess if the queues were successfully destroyed. + The queues cannot be destroyed while the stream is open by a client. + */ + virtual IOReturn destroyQueues( void ); + + /*! + @function getOutputQueue + @result A pointer to the output IOStreamBufferQueue structure for the stream, + or NULL if the stream is not open and the queue has not been created yet. + */ + virtual IOStreamBufferQueue *getOutputQueue(void); // get shared-memory output queue + + /*! + @function getOutputQueueMemoryDescriptor + @result An IOMemoryDescriptor object repesenting the shared memory + output queue buffer. + */ + virtual IOMemoryDescriptor *getOutputQueueMemoryDescriptor(void); + + /*! + @function getInputQueue + @result A pointer to the input IOStreamBufferQueue structure for the stream, + or NULL if the stream is not open and the queue has not been created yet. + */ + virtual IOStreamBufferQueue *getInputQueue(void); // get shared-memory input queue + + /*! + @function getInputQueueMemoryDescriptor + @result An IOMemoryDescriptor object repesenting the shared memory + input queue buffer. + */ + virtual IOMemoryDescriptor *getInputQueueMemoryDescriptor(void); + + + /*! + @functiongroup Managing buffers in an IOStream + */ + + /*! + @function addBuffer + @abstract Add a buffer to an IOStream. + @param buffer + @discussion + Adds an IOStreamBuffer to an IOStream. It will be added to the end + of the buffer array, so the buffer ID of existing buffers will not change. + */ + virtual IOReturn addBuffer(IOStreamBuffer *buffer); // add a new buffer to the stream + + /*! + @function addBuffers + @param buffers + @result + */ + virtual IOReturn addBuffers(OSArray *buffers); + + /*! + @function removeBuffer + @param buffer A pointer to an IOStreamBuffer object in the stream. + @result Returns kIOReturnSuccess if the buffer was removed, or kIOReturnNotFound + if the buffer was not in this stream. + @abstract + Removes a buffer from the stream. Buffers cannot be removed + while the stream is open, as this will change the buffer IDs of existing + buffers. + */ + virtual IOReturn removeBuffer(IOStreamBuffer *buffer); + + /*! + @function removeBuffer + @param bufferID The ID of the buffer to remove. + @result Returns kIOReturnSuccess if the buffer was removed. + @abstract + Removes a buffer from the stream. Buffers cannot be removed + while the stream is open, as this will change the buffer IDs of existing + buffers. + */ + + virtual IOReturn removeBuffer(IOStreamBufferID bufferID); + + /*! + @function removeAllBuffers + @result + */ + virtual IOReturn removeAllBuffers( void ); + + /*! + @function removeAllBuffers + @result Returns kIOReturnSuccess if all the buffers were successfully + removed. Buffers cannot be removed + while the stream is open, as this will change the buffer IDs of existing + buffers. + + */ + virtual IOItemCount getBufferCount( void ); + + /*! + @function getBuffers + @abstract Get an array containing all the buffers in the stream. + @discussion + Returns an OSArray containing all the buffers in the stream in order of their buffer ID. + */ + virtual OSArray *getBuffers( void ); + + + /*! + @function getBufferWithID + @param bufferID + The ID of the buffer to get. + @result + A pointer to an IOStreamBuffer object, or NULL if the + buffer ID was invalid for this stream. + */ + + virtual IOStreamBuffer *getBufferWithID(IOStreamBufferID bufferID); + + /*! + @functiongroup Managing notification ports + */ + + /*! + @function getInputPort + @abstract Get the Mach port used to receive notifications + from user space that a buffer has been added to the input queue. + */ + virtual mach_port_t getInputPort(void); + + /*! + @function setInputPort + @abstract Set the Mach port used to receive notifications from + user space that a buffer has been added to the input queue. + @param port + + */ + virtual IOReturn setInputPort(mach_port_t port); + + /*! + @function getOutputPort + @abstract Get the Mach port used to send notifications to user space + that a buffer has been added to the output queue. + */ + virtual mach_port_t getOutputPort(void); + + /*! + @function setOutputPort + @abstract Set the Mach port used to send notifications to user space + that a buffer has been added to the output queue. + @param port + */ + virtual IOReturn setOutputPort(mach_port_t port); + + /*! + @function sendOutputNotification + @abstract Send a notification to the user client that data is available + for reading on the output queue. This will result in the user's output + handler being called, if they registered one. + @result Returns kIOReturnSuccess if the notification was successfully sent. + */ + virtual IOReturn sendOutputNotification(void); + + /*! + @functiongroup Queueing and dequeueing buffers + */ + + /*! + @function enqueueOutputBuffer + @abstract A convenience method for enqueueing a buffer. + @param buffer + @param dataOffset + @param dataLength + @param controlOffset + @param controlLength + @result + */ + virtual IOReturn enqueueOutputBuffer(IOStreamBuffer *buffer, + IOByteCount dataOffset = 0, + IOByteCount dataLength = 0, + IOByteCount controlOffset = 0, + IOByteCount controlLength = 0); + + + /*! + @function enqueueOutputEntry + @param entry + @result + */ + virtual IOReturn enqueueOutputEntry( IOStreamBufferQueueEntry *entry ); + + /*! + @function dequeueInputEntry + @param entry + @result + */ + virtual IOReturn dequeueInputEntry( IOStreamBufferQueueEntry *entry ); + + /*! + @functiongroup Managing notifications + */ + + /*! + @function inputCallback + @abstract Input callback function to be implemented by a subclass; + @param token + A 32-bit token value that can be used by convention to communicate + from user space to the stream. The semantics of this value are + defined by the IOStream subclass. + @discussion + The inputCallback() method is called as a result of a fast trap + from user space. It is called on the same thread as the user request, + but the subclass should implement this call as a notification sent + to a workloop so that the request is asynchronous. + */ + virtual void inputCallback( UInt32 token ); + + /*! + @function inputSyncCallback + @abstract Input callback function to be implemented by a subclass. + @param token + A 32-bit token value that can be used by convention to communicate + from user space to the stream. The semantics of this value are + defined by the IOStream subclass. + @discussion + The inputSyncCallback() method is called as a result of a fast trap + from user space. It is called on the same thread as the user request, + so no context switch is necessary. + */ + virtual void inputSyncCallback( UInt32 token ); + + /*! + @functiongroup Stream control + */ + + /*! + @function getStreamMode + @abstract Returns the mode of the stream, either input or output. + @result The mode of the stream, either kIOStreamModeInput + (from user space to kernel space) or the default + kIOStreamModeOutput (from kernel space to user space). + */ + virtual IOStreamMode getStreamMode(void); + + /*! + @function setStreamMode + @abstract Sets the mode of the stream, either input or output. + @discussion Subclasses may define whether it is possible + to change the mode of a stream. + */ + virtual IOReturn setStreamMode(IOStreamMode mode); + + /*! + @function startStream + @abstract Start sending data on a stream. + @result Returns kIOReturnSuccess if the stream was successfully started. + @discussion This must be implemented by a subclass. + */ + virtual IOReturn startStream(void); + + /*! + @function stopStream + @abstract Stop sending data on a stream. + @result Returns kIOReturnSuccess if the stream was successfully stopped. + @discussion This must be implemented by a subclass. + */ + virtual IOReturn stopStream(void); + + /*! + @function suspendStream + @abstract Temporarily suspend data flow on the stream. + @result Returns kIOReturnSuccess if the stream was successfully suspended. + @discussion This must be implemented by a subclass. + */ + virtual IOReturn suspendStream(void); + + /*! + @functiongroup Managing user clients + */ + + /*! + @function newUserClient + @abstract See the documentation for the IOService method newUserClient. + */ + virtual IOReturn newUserClient( task_t owningTask, void * securityID, + UInt32 type, OSDictionary * properties, + IOUserClient ** handler ); + + + /* Reserved slots */ + + OSMetaClassDeclareReservedUnused(IOStream, 0); + OSMetaClassDeclareReservedUnused(IOStream, 1); + OSMetaClassDeclareReservedUnused(IOStream, 2); + OSMetaClassDeclareReservedUnused(IOStream, 3); + OSMetaClassDeclareReservedUnused(IOStream, 4); + OSMetaClassDeclareReservedUnused(IOStream, 5); + OSMetaClassDeclareReservedUnused(IOStream, 6); + OSMetaClassDeclareReservedUnused(IOStream, 7); + OSMetaClassDeclareReservedUnused(IOStream, 8); + OSMetaClassDeclareReservedUnused(IOStream, 9); + OSMetaClassDeclareReservedUnused(IOStream, 10); + OSMetaClassDeclareReservedUnused(IOStream, 11); + OSMetaClassDeclareReservedUnused(IOStream, 12); + OSMetaClassDeclareReservedUnused(IOStream, 13); + OSMetaClassDeclareReservedUnused(IOStream, 14); + OSMetaClassDeclareReservedUnused(IOStream, 15); + OSMetaClassDeclareReservedUnused(IOStream, 16); + OSMetaClassDeclareReservedUnused(IOStream, 17); + OSMetaClassDeclareReservedUnused(IOStream, 18); + OSMetaClassDeclareReservedUnused(IOStream, 19); + OSMetaClassDeclareReservedUnused(IOStream, 20); + OSMetaClassDeclareReservedUnused(IOStream, 21); + OSMetaClassDeclareReservedUnused(IOStream, 22); + OSMetaClassDeclareReservedUnused(IOStream, 23); + OSMetaClassDeclareReservedUnused(IOStream, 24); + OSMetaClassDeclareReservedUnused(IOStream, 25); + OSMetaClassDeclareReservedUnused(IOStream, 26); + OSMetaClassDeclareReservedUnused(IOStream, 27); + OSMetaClassDeclareReservedUnused(IOStream, 28); + OSMetaClassDeclareReservedUnused(IOStream, 29); + OSMetaClassDeclareReservedUnused(IOStream, 30); + OSMetaClassDeclareReservedUnused(IOStream, 31); + +}; + + +/*! + @class IOStreamBuffer + A class representing a data buffer that is part of an IOStream. + */ + +class IOStreamBuffer : public OSObject +{ + OSDeclareDefaultStructors(IOStreamBuffer); + +protected: + IOMemoryDescriptor * _dataBuffer; // The data buffer is expected to be filled by hardware. + IOMemoryDescriptor * _controlBuffer; // The control buffer is expected to be defined by the hardware driver. + + IOStreamBufferID _bufferID; // Client handle for this buffer. + + OSArray * _clientMemoryMaps; // Maps for clients who are sharing these buffers. + + SInt32 _clientReferenceCount; // Count of client uses of this buffer. May be negative. + +public: + /*! + @function initWithMemoryDescriptors + */ + virtual bool initWithMemoryDescriptors(IOMemoryDescriptor *dataBuffer, + IOMemoryDescriptor *controlBuffer, + IOStreamBufferID bufferID = 0); + + /*! + @function withMemoryDescriptors + */ + static IOStreamBuffer *withMemoryDescriptors(IOMemoryDescriptor *dataBuffer, + IOMemoryDescriptor *controlBuffer, + IOStreamBufferID bufferID = 0); + + virtual void free(void); + + /*! + @function getBufferID + @abstract Gets the buffer identifier for the IOStreamBuffer object. + @discussion The buffer identifier is unique across all buffers in a stream. + */ + virtual IOStreamBufferID getBufferID(void); + + /*! + @function setBufferID + @abstract Sets the buffer identifier for the IOStreamBuffer object. + */ + + virtual void setBufferID( IOStreamBufferID bufferID ); + + /*! + @function setDataBuffer + @abstract Sets the data buffer for the IOStreamBuffer object. + */ + virtual void setDataBuffer(IOMemoryDescriptor *dataBuffer); + + /*! + @function setControlBuffer + @abstract Sets the control buffer for the IOStreamBuffer object. + */ + virtual void setControlBuffer(IOMemoryDescriptor *controlBuffer); + + /*! + @function getDataBuffer + @result A pointer to the IOMemoryDescriptor for the data buffer. + */ + virtual IOMemoryDescriptor *getDataBuffer(void); + + /*! + @function getControlBuffer + @result A pointer to the IOMemoryDescriptor for the control buffer. + */ + virtual IOMemoryDescriptor *getControlBuffer(void); + + /*! + @function getClientReferenceCount + @result The count of client references to this buffer. It may be positive + or negative, depending on whether the client is sending data into the kernel, + or the kernel is sending data out to the client. + */ + virtual SInt32 getClientReferenceCount( void ); + + /*! + @function sendClientReference + @param offset The offset in the buffer of the data sent to the client. + @param length The length of the data sent to the client. + @result The new client reference count. + @abstract + */ + virtual SInt32 sendClientReference( IOByteCount offset = 0, IOByteCount length = 0 ); + + /*! + @function receiveClientReference + @param offset The offset in the buffer of the data from the client. + @param length The length of the data from the client. + @abstract + */ + virtual SInt32 receiveClientReference( IOByteCount offset = 0, IOByteCount length = 0 ); + + /* Reserved slots */ + + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 0); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 1); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 2); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 3); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 4); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 5); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 6); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 7); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 8); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 9); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 10); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 11); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 12); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 13); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 14); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 15); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 16); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 17); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 18); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 19); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 20); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 21); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 22); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 23); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 24); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 25); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 26); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 27); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 28); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 29); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 30); + OSMetaClassDeclareReservedUnused(IOStreamBuffer, 31); + +}; + +#endif /* ! __IOKIT_IOSTREAM_H */ + diff --git a/i386/include/IOKit/stream/IOStreamFamily.h b/i386/include/IOKit/stream/IOStreamFamily.h new file mode 100644 index 0000000..a4eb7f0 --- /dev/null +++ b/i386/include/IOKit/stream/IOStreamFamily.h @@ -0,0 +1,13 @@ +/* + * Copyright 2006 Apple Computer, Inc. All rights reserved. + * + */ + +#ifndef __IOKIT_IOSTREAMFAMILY_H +#define __IOKIT_IOSTREAMFAMILY_H + +#include <IOKit/stream/IOStream.h> +#include <IOKit/stream/IOStreamShared.h> + + +#endif /* !__IOKIT_IOSTREAMFAMILY_H */ diff --git a/i386/include/IOKit/stream/IOStreamShared.h b/i386/include/IOKit/stream/IOStreamShared.h new file mode 100644 index 0000000..5b2c0a3 --- /dev/null +++ b/i386/include/IOKit/stream/IOStreamShared.h @@ -0,0 +1,175 @@ +/* + * IOStreamShared.h + * IOStreamFamily + * + * Copyright 2006 Apple Computer, Inc. All rights reserved. + * + */ + +#if !defined(__IOKIT_IOSTREAMSHARED_H) +#define __IOKIT_IOSTREAMSHARED_H + +#include <sys/cdefs.h> + +#include <IOKit/IOTypes.h> + +/*! + @header IOStreamShared.h + IOStream definitions shared between kernel and user space. + */ + +__BEGIN_DECLS + +// Buffer numbers are guaranteed to go from 0 to bufferCount - 1. +/*! + @typedef IOStreamBufferID + */ +typedef UInt32 IOStreamBufferID; +#define kIOStreamBufferIDInvalid (~0) + +// This is the header for the shared-memory queue used to send buffer notifications +// from kernel to user space or vice versa. + +// Queue entry in input or output queue + +#ifdef __cplusplus + +/*! + @struct IOStreamBufferQueueEntry + @field bufferID The ID of the buffer passed in this queue entry. + @field dataLength The length of the valid data in the buffer. + @field reserved Reserved for future use. +*/ + +struct IOStreamBufferQueueEntry { + IOStreamBufferID bufferID; + UInt32 dataOffset; + UInt32 dataLength; + UInt32 controlOffset; + UInt32 controlLength; + UInt32 reserved[3]; +}; + + +/*! + @struct IOStreamBufferQueue + @field entryCount The number of queue entries in the queue. + @field headIndex The index of the next queue slot that will be filled in by the queue writer. + @field tailIndex The index of the next queue slot that can be read by the queue reader. + @field reserved Reserved for future use. + @field queue The array of queue entries. + */ + +struct IOStreamBufferQueue { + UInt32 entryCount; + volatile UInt32 headIndex; + volatile UInt32 tailIndex; + UInt32 reserved; + IOStreamBufferQueueEntry queue[0]; +}; + +#else + +typedef struct __IOStreamBufferQueueEntry { + IOStreamBufferID bufferID; + UInt32 dataOffset; + UInt32 dataLength; + UInt32 controlOffset; + UInt32 controlLength; + UInt32 reserved[3]; +} IOStreamBufferQueueEntry; + +typedef struct __IOStreamBufferQueue { + UInt32 entryCount; + volatile UInt32 headIndex; + volatile UInt32 tailIndex; + UInt32 reserved; + IOStreamBufferQueueEntry queue[0]; +} IOStreamBufferQueue; + +#endif + +/*! + @enum Memory mapping types + @constant kIOStreamMemoryTypeOutputQueue + @constant kIOStreamMemoryTypeInputQueue + @constant kIOStreamMemoryTypeBufferData + @constant kIOStreamMemoryTypeBufferControl + @constant kIOStreamBufferIDMask + @constant kIOStreamMemoryTypeMask + @abstract Memory types used with IOConnectMapMemory(). + */ +enum { + kIOStreamMemoryTypeOutputQueue = 0x10000000, + kIOStreamMemoryTypeInputQueue = 0x20000000, + kIOStreamMemoryTypeBufferData = 0x30000000, + kIOStreamMemoryTypeBufferControl = 0x40000000, + kIOStreamBufferIDMask = 0x0FFFFFFF, + kIOStreamMemoryTypeMask = 0xF0000000 +}; + +/*! + @enum Mach port types + @constant kIOStreamPortTypeOutput + @constant kIOStreamPortTypeInput + @abstract Port types used with IOConnectSetNotificationPort(). + */ +enum { + kIOStreamPortTypeOutput, + kIOStreamPortTypeInput +}; + +/*! + @enum IOStream open options + */ + +enum { + kIOStreamOptionOpenExclusive = 0x00010000, + kIOStreamOptionOpenShared = 0x00020000 +}; + +/*! + @enum User client methods + @constant kIOStreamMethodOpen + @constant kIOStreamMethodClose + @constant kIOStreamMethodStart + @constant kIOStreamMethodStop + @constant kIOStreamMethodSuspend + @constant kIOStreamMethodGetMode + @constant kIOStreamMethodSetMode + + @abstract Client method numbers used with IOConnectMethod...() functions. + */ +enum { + kIOStreamMethodOpen, + kIOStreamMethodClose, + kIOStreamMethodStart, + kIOStreamMethodStop, + kIOStreamMethodSuspend, + kIOStreamMethodGetMode, + kIOStreamMethodSetMode, + kIOStreamMethodGetBufferCount +}; + +/*! + @enum User client traps + @constant kIOStreamEnqueueInputTrap + @constant kIOStreamEnqueueInputSyncTrap + @abstract Client trap numbers used with IOConnectTrap..() functions. + */ +enum { + kIOStreamEnqueueInputTrap, + kIOStreamEnqueueInputSyncTrap +}; + +typedef enum { + kIOStreamModeInput, // From user to kernel space + kIOStreamModeOutput, // From kernel to user space + kIOStreamModeInputOutput // bidirectional +} IOStreamMode; + + +__END_DECLS + +#endif /* ! __IOKIT_IOSTREAMSHARED_H */ + diff --git a/i386/include/IOKit/stream/IOStreamUserClient.h b/i386/include/IOKit/stream/IOStreamUserClient.h new file mode 100644 index 0000000..887575a --- /dev/null +++ b/i386/include/IOKit/stream/IOStreamUserClient.h @@ -0,0 +1,76 @@ +/* + * IOStreamUserClient.h + * IOStreamFamily + * + * Copyright 2006 Apple Computer, Inc. All rights reserved. + * + */ + +#if !defined( __IOKIT_IOSTREAMUSERCLIENT_H ) +#define __IOKIT_IOSTREAMUSERCLIENT_H + + +#include <IOKit/IOUserClient.h> + +#include <IOKit/stream/IOStreamShared.h> +#include <IOKit/stream/IOStream.h> + +class IOStreamUserClient : public IOUserClient +{ + OSDeclareDefaultStructors( IOStreamUserClient ) + +protected: + IOStream * _owner; + task_t _task; + +public: + virtual bool initWithTask( + task_t owningTask, void * securityToken, UInt32 type, + OSDictionary * properties); + virtual bool initWithTask( + task_t owningTask, void * securityToken, UInt32 type); + + virtual IOReturn clientClose( void ); + virtual IOReturn clientDied( void ); + + virtual IOService * getService( void ); + + virtual IOReturn registerNotificationPort( + mach_port_t port, UInt32 type, UInt32 refCon ); + + virtual IOReturn connectClient( IOUserClient * client ); + + virtual IOExternalMethod * getTargetAndMethodForIndex( + IOService ** targetP, UInt32 index ); + + virtual IOExternalTrap * + getTargetAndTrapForIndex( IOService **targetP, UInt32 index ); + + virtual IOReturn clientMemoryForType( UInt32 type, + IOOptionBits * options, + IOMemoryDescriptor ** memory ); + + virtual bool start( IOService * provider ); + + +protected: + virtual IOReturn openMethod( char * dataIn, char * dataOut, + IOByteCount inputSize, IOByteCount * outputSize ); + virtual IOReturn closeMethod( void ); + virtual IOReturn startMethod( void ); + virtual IOReturn stopMethod( void ); + virtual IOReturn suspendMethod( void ); + virtual IOReturn getModeMethod( char * dataOut, + IOByteCount * outputSize ); + virtual IOReturn setModeMethod( char * dataIn, + IOByteCount inputSize ); + virtual IOReturn getBufferCountMethod( char * dataOut, + IOByteCount * outputSize ); + + virtual IOReturn inputTrap( UInt32 token ); + virtual IOReturn inputSyncTrap( UInt32 token ); + +}; + +#endif /* ! __IOKIT_IOSTREAMUSERCLIENT_H */ + diff --git a/i386/include/IOKit/system.h b/i386/include/IOKit/system.h new file mode 100644 index 0000000..7092d59 --- /dev/null +++ b/i386/include/IOKit/system.h @@ -0,0 +1,67 @@ +/* + * Copyright (c) 1998-2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef __IOKIT_SYSTEM_H +#define __IOKIT_SYSTEM_H + +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS +#endif + +#include <sys/cdefs.h> + +__BEGIN_DECLS + +#include <mach/mach_types.h> +#include <mach/mach_interface.h> +#include <mach/memory_object_types.h> + +#include <stdarg.h> +#include <stdint.h> +#include <string.h> + +#include <IOKit/assert.h> /* Must be before other includes of kern/assert.h */ + +#include <kern/kern_types.h> +#include <kern/thread.h> +#include <kern/debug.h> +#include <kern/task.h> +#include <kern/sched_prim.h> +#include <kern/locks.h> +#include <kern/queue.h> +#include <kern/ipc_mig.h> +#include <libkern/libkern.h> + + +#ifndef _MISC_PROTOS_H_ +extern void _doprnt( const char *format, va_list *arg, + void (*lputc)(char), int radix ); +#endif + +__END_DECLS + +#endif /* !__IOKIT_SYSTEM_H */ diff --git a/i386/include/IOKit/system_management/.svn/all-wcprops b/i386/include/IOKit/system_management/.svn/all-wcprops new file mode 100644 index 0000000..3d336c3 --- /dev/null +++ b/i386/include/IOKit/system_management/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/system_management +END +IOWatchDogTimer.h +K 25 +svn:wc:ra_dav:version-url +V 88 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/system_management/IOWatchDogTimer.h +END diff --git a/i386/include/IOKit/system_management/.svn/entries b/i386/include/IOKit/system_management/.svn/entries new file mode 100644 index 0000000..0e7985e --- /dev/null +++ b/i386/include/IOKit/system_management/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +2117 +http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/system_management +http://forge.voodooprojects.org/svn/chameleon + + + +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + +b5af796a-00a8-11df-919b-ffff7a100b7d + +IOWatchDogTimer.h +file + + + + +2012-10-03T17:50:20.000000Z +e2ec51de6352bd52efa9e10f4dcc69f0 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +2076 + diff --git a/i386/include/IOKit/system_management/.svn/text-base/IOWatchDogTimer.h.svn-base b/i386/include/IOKit/system_management/.svn/text-base/IOWatchDogTimer.h.svn-base new file mode 100644 index 0000000..a89b95b --- /dev/null +++ b/i386/include/IOKit/system_management/.svn/text-base/IOWatchDogTimer.h.svn-base @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOWATCHDOGTIMER_H +#define _IOWATCHDOGTIMER_H + +#include <IOKit/IOService.h> + +class IOWatchDogTimer : public IOService +{ + OSDeclareAbstractStructors(IOWatchDogTimer); + +protected: + IONotifier *notifier; + struct ExpansionData { }; + ExpansionData *reserved; + +public: + virtual bool start(IOService *provider); + virtual void stop(IOService *provider); + virtual IOReturn setProperties(OSObject *properties); + virtual void setWatchDogTimer(UInt32 timeOut) = 0; + + OSMetaClassDeclareReservedUnused(IOWatchDogTimer, 0); + OSMetaClassDeclareReservedUnused(IOWatchDogTimer, 1); + OSMetaClassDeclareReservedUnused(IOWatchDogTimer, 2); + OSMetaClassDeclareReservedUnused(IOWatchDogTimer, 3); +}; + +#endif /* !_IOWATCHDOGTIMER_H */ diff --git a/i386/include/IOKit/system_management/IOWatchDogTimer.h b/i386/include/IOKit/system_management/IOWatchDogTimer.h new file mode 100644 index 0000000..a89b95b --- /dev/null +++ b/i386/include/IOKit/system_management/IOWatchDogTimer.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _IOWATCHDOGTIMER_H +#define _IOWATCHDOGTIMER_H + +#include <IOKit/IOService.h> + +class IOWatchDogTimer : public IOService +{ + OSDeclareAbstractStructors(IOWatchDogTimer); + +protected: + IONotifier *notifier; + struct ExpansionData { }; + ExpansionData *reserved; + +public: + virtual bool start(IOService *provider); + virtual void stop(IOService *provider); + virtual IOReturn setProperties(OSObject *properties); + virtual void setWatchDogTimer(UInt32 timeOut) = 0; + + OSMetaClassDeclareReservedUnused(IOWatchDogTimer, 0); + OSMetaClassDeclareReservedUnused(IOWatchDogTimer, 1); + OSMetaClassDeclareReservedUnused(IOWatchDogTimer, 2); + OSMetaClassDeclareReservedUnused(IOWatchDogTimer, 3); +}; + +#endif /* !_IOWATCHDOGTIMER_H */ diff --git a/i386/include/IOKit/usb/.svn/all-wcprops b/i386/include/IOKit/usb/.svn/all-wcprops new file mode 100644 index 0000000..2069f31 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/all-wcprops @@ -0,0 +1,155 @@ +K 25 +svn:wc:ra_dav:version-url +V 56 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb +END +USB.h +K 25 +svn:wc:ra_dav:version-url +V 62 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/USB.h +END +IOUSBControllerListElement.h +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBControllerListElement.h +END +IOUSBBus.h +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBBus.h +END +IOUSBControllerV2.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBControllerV2.h +END +IOUSBMassStorageUFISubclass.h +K 25 +svn:wc:ra_dav:version-url +V 86 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBMassStorageUFISubclass.h +END +IOUSBControllerV3.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBControllerV3.h +END +IOUSBPipe.h +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBPipe.h +END +IOUSBHubDevice.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBHubDevice.h +END +IOUSBDevice.h +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBDevice.h +END +IOUSBInterface.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBInterface.h +END +IOUFIStorageServices.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUFIStorageServices.h +END +IOUSBRootHubDevice.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBRootHubDevice.h +END +USBSpec.h +K 25 +svn:wc:ra_dav:version-url +V 66 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/USBSpec.h +END +USBTracepoints.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/USBTracepoints.h +END +IOUSBWorkLoop.h +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBWorkLoop.h +END +IOUSBUserClient.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBUserClient.h +END +IOUSBMassStorageClass.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBMassStorageClass.h +END +IOUSBHubPolicyMaker.h +K 25 +svn:wc:ra_dav:version-url +V 78 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBHubPolicyMaker.h +END +IOUSBCompositeDriver.h +K 25 +svn:wc:ra_dav:version-url +V 79 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBCompositeDriver.h +END +IOUSBCommand.h +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBCommand.h +END +IOUSBHIDDriver.h +K 25 +svn:wc:ra_dav:version-url +V 73 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBHIDDriver.h +END +IOUSBLog.h +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBLog.h +END +IOUSBController.h +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBController.h +END +IOUSBNub.h +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBNub.h +END +USBHub.h +K 25 +svn:wc:ra_dav:version-url +V 65 +/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/USBHub.h +END diff --git a/i386/include/IOKit/usb/.svn/entries b/i386/include/IOKit/usb/.svn/entries new file mode 100644 index 0000000..ffd827b --- /dev/null +++ b/i386/include/IOKit/usb/.svn/entries @@ -0,0 +1,878 @@ +10 + +dir +2117 +http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/usb +http://forge.voodooprojects.org/svn/chameleon + + + +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + +b5af796a-00a8-11df-919b-ffff7a100b7d + +USB.h +file + + + + +2012-10-03T17:50:20.000000Z +8bf23d0dad1a9225363c787a94ec58bc +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +45107 + +IOUSBControllerListElement.h +file + + + + +2012-10-03T17:50:20.000000Z +e919de00cc53e1f24ba901f60aa320e3 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +4738 + +IOUSBBus.h +file + + + + +2012-10-03T17:50:20.000000Z +ad6cbbbb1af98d5a96673d2b761ba9e5 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +1183 + +IOUSBControllerV2.h +file + + + + +2012-10-03T17:50:20.000000Z +5883ee016e6e171b318462f148c4d64d +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +20855 + +IOUSBMassStorageUFISubclass.h +file + + + + +2012-10-03T17:50:20.000000Z +378eb3a378af0fb004606ffed9d9136c +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +11928 + +IOUSBControllerV3.h +file + + + + +2012-10-03T17:50:20.000000Z +9932d9ac063d5f679fe298271057ead4 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +12479 + +IOUSBPipe.h +file + + + + +2012-10-03T17:50:20.000000Z +5b768a7a705b59ee7b8165ebb65fbcdf +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +17471 + +IOUSBHubDevice.h +file + + + + +2012-10-03T17:50:20.000000Z +e2d30f06c2626b944387f533cd6d0828 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +10211 + +IOUSBDevice.h +file + + + + +2012-10-03T17:50:20.000000Z +7e6687d8ebc8537c69885481626bcce5 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +28373 + +IOUSBInterface.h +file + + + + +2012-10-03T17:50:20.000000Z +59d558e91299bdbcd54eca2005080b56 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +12213 + +IOUFIStorageServices.h +file + + + + +2012-10-03T17:50:20.000000Z +60a9064a8b4272e667e4a57281afbb3f +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +4777 + +IOUSBRootHubDevice.h +file + + + + +2012-10-03T17:50:20.000000Z +4c9f61f93aca3228f4c7556b0056821e +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +3376 + +USBSpec.h +file + + + + +2012-10-03T17:50:20.000000Z +3136341088b9dbc0e613e3beb7ba1af8 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +15028 + +USBTracepoints.h +file + + + + +2012-10-03T17:50:20.000000Z +b1631300f3a48e7b698ab3e4baf60dd3 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +20349 + +IOUSBWorkLoop.h +file + + + + +2012-10-03T17:50:20.000000Z +4b4594c45a9238ed70acee961217da1d +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +2000 + +IOUSBUserClient.h +file + + + + +2012-10-03T17:50:20.000000Z +f22ed4f18efbd8826acc1a651f368cca +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +5331 + +IOUSBMassStorageClass.h +file + + + + +2012-10-03T17:50:20.000000Z +51cb0b7ba0d53f61721664ef0325a539 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +17705 + +IOUSBHubPolicyMaker.h +file + + + + +2012-10-03T17:50:20.000000Z +138fe70e48636d05d0b66dfc39842385 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +9227 + +IOUSBCompositeDriver.h +file + + + + +2012-10-03T17:50:20.000000Z +1de600100621201d642fb2bb395f9758 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +5382 + +IOUSBCommand.h +file + + + + +2012-10-03T17:50:20.000000Z +af982f7c12ee99330cb6ffaa73b32a03 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +10859 + +IOUSBHIDDriver.h +file + + + + +2012-10-03T17:50:20.000000Z +1d0f69397c09ecc6c1a685d252418bd6 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +11853 + +IOUSBLog.h +file + + + + +2012-10-03T17:50:20.000000Z +79f3680f444a5eb350afeec515f05e49 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +7979 + +IOUSBController.h +file + + + + +2012-10-03T17:50:20.000000Z +e5238919996dfc66485bb3f01e35de2e +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +50775 + +IOUSBNub.h +file + + + + +2012-10-03T17:50:20.000000Z +e436676a1824525edd3ef6f8ee62f088 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +2165 + +USBHub.h +file + + + + +2012-10-03T17:50:20.000000Z +7f59dcf439d351c5f6e8b4bb4ecceb9b +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +7420 + diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUFIStorageServices.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUFIStorageServices.h.svn-base new file mode 100644 index 0000000..cac43f4 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUFIStorageServices.h.svn-base @@ -0,0 +1,136 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_UFI_STORAGE_SERVICES_H_ +#define _IOKIT_UFI_STORAGE_SERVICES_H_ + +#if defined(KERNEL) && defined(__cplusplus) + +#include <IOKit/IOTypes.h> +#include <IOKit/storage/IOBlockStorageDevice.h> +#include <IOKit/usb/IOUSBMassStorageUFISubclass.h> + + +class IOUFIStorageServices : public IOBlockStorageDevice +{ + + OSDeclareDefaultStructors ( IOUFIStorageServices ) + +private: + bool fMediaChanged; + bool fMediaPresent; + +protected: + + IOUSBMassStorageUFIDevice * fProvider; + + UInt64 fMaxReadBlocks; + UInt64 fMaxWriteBlocks; + + virtual bool attach ( IOService * provider ); + virtual void detach ( IOService * provider ); + + // Reserve space for future expansion. + struct IOUFIStorageServicesExpansionData { }; + IOUFIStorageServicesExpansionData *fIOUFIStorageServicesReserved; + +public: + + virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); + + static void AsyncReadWriteComplete ( void * clientData, + IOReturn status, + UInt64 actualByteCount ); + + // Deprecated + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageAttributes * attributes, + IOStorageCompletion * completion ); + + virtual IOReturn doSyncReadWrite ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks ); + + virtual IOReturn doEjectMedia ( void ); + + virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); + + virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + + virtual IOReturn doLockUnlockMedia ( bool doLock ); + + virtual IOReturn doSynchronizeCache ( void ); + + virtual char * getVendorString ( void ); + + virtual char * getProductString ( void ); + + virtual char * getRevisionString ( void ); + + virtual char * getAdditionalDeviceInfoString ( void ); + + virtual IOReturn reportBlockSize ( UInt64 * blockSize ); + + virtual IOReturn reportEjectability ( bool * isEjectable ); + + virtual IOReturn reportLockability ( bool * isLockable ); + + virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); + + virtual IOReturn reportPollRequirements ( bool * pollIsRequired, + bool * pollIsExpensive ); + + virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); + + virtual IOReturn reportRemovability ( bool * isRemovable ); + + virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); + + virtual IOReturn getWriteCacheState ( bool * enabled ); + + virtual IOReturn setWriteCacheState ( bool enabled ); + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 1 ); + OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 2 ); + OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 3 ); + OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 4 ); + OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 5 ); + OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 6 ); + OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 7 ); + OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_UFI_STORAGE_SERVICES_H_ */ diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBBus.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBBus.h.svn-base new file mode 100644 index 0000000..a42191a --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBBus.h.svn-base @@ -0,0 +1,35 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBBUS_H +#define _IOKIT_IOUSBBUS_H + +#include <IOKit/IOService.h> + +class IOUSBBus : public IOService +{ + OSDeclareAbstractStructors(IOUSBBus) +}; + +#endif /* ! _IOKIT_IOUSBBUS_H */ + diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBCommand.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBCommand.h.svn-base new file mode 100644 index 0000000..0f7c36b --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBCommand.h.svn-base @@ -0,0 +1,266 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBCOMMAND_H +#define _IOKIT_IOUSBCOMMAND_H + +#include <IOKit/IOCommand.h> +#include <IOKit/IOCommandPool.h> +#include <IOKit/IOMemoryDescriptor.h> +#include <IOKit/IODMACommand.h> +#include <IOKit/usb/USB.h> + +/* + * USB Command + * This is the command block for a USB command to be queued on the + * Command Gate of the WorkLoop. Although the actual work of creating + * the command and enqueueing it is done for them via the deviceRequest, + * read, and write methods, this is the primary way that devices will get + * work done. + * Note: This is private to IOUSBController and should be moved to a + * private header. + */ + +typedef enum { + DEVICE_REQUEST, // Device request using pointer + READ, + WRITE, + CREATE_EP, + DELETE_EP, + DEVICE_REQUEST_DESC, // Device request using descriptor + DEVICE_REQUEST_BUFFERCOMMAND // Device request using a second IOUSBCommand in _bufferCommand +} usbCommand; + + + +/*! + @class IOUSBCommand + @abstract A subclass of IOCommand that is used to add USB specific data. + */ +class IOUSBCommand : public IOCommand +{ + OSDeclareAbstractStructors(IOUSBCommand) + +protected: + usbCommand _selector; + IOUSBDeviceRequestPtr _request; + USBDeviceAddress _address; + UInt8 _endpoint; + UInt8 _direction; + UInt8 _type; + bool _bufferRounding; + IOMemoryDescriptor * _buffer; + IOUSBCompletion _uslCompletion; + IOUSBCompletion _clientCompletion; + UInt32 _dataRemaining; // For Control transfers + UInt8 _stage; // For Control transfers + IOReturn _status; + IOMemoryDescriptor * _origBuffer; + IOUSBCompletion _disjointCompletion; + IOByteCount _dblBufLength; + UInt32 _noDataTimeout; + UInt32 _completionTimeout; + UInt32 _UIMScratch[10]; + + struct ExpansionData + { + IOByteCount _reqCount; + IOMemoryDescriptor *_requestMemoryDescriptor; + IOMemoryDescriptor *_bufferMemoryDescriptor; + bool _multiTransferTransaction; + bool _finalTransferInTransaction; + bool _useTimeStamp; + AbsoluteTime _timeStamp; + bool _isSyncTransfer; // Returns true if the command is used for a synchronous transfer + IODMACommand *_dmaCommand; // used to get memory mapping + IOUSBCommand *_bufferUSBCommand; // points to another IOUSBCommand used for phase 2 of control transactions + IOUSBCommand *_masterUSBCommand; // points from the bufferUSBCommand back to the parent command + }; + ExpansionData * _expansionData; + + // we override these OSObject method in order to allocate and release our expansion data + virtual bool init(); + virtual void free(); + +public: + + // static constructor + static IOUSBCommand * NewCommand(void); + + // Manipulators + void SetSelector(usbCommand sel); + void SetRequest(IOUSBDeviceRequestPtr req); + void SetAddress(USBDeviceAddress addr); + void SetEndpoint(UInt8 ep); + void SetDirection(UInt8 dir); + void SetType(UInt8 type); + void SetBufferRounding(bool br); + void SetBuffer(IOMemoryDescriptor *buf); + void SetUSLCompletion(IOUSBCompletion completion); + void SetClientCompletion(IOUSBCompletion completion); + void SetDataRemaining(UInt32 dr); + void SetStage(UInt8 stage); + void SetStatus(IOReturn stat); + void SetOrigBuffer(IOMemoryDescriptor *buf); + void SetDisjointCompletion(IOUSBCompletion completion); + void SetDblBufLength(IOByteCount len); + void SetNoDataTimeout(UInt32 to); + void SetCompletionTimeout(UInt32 to); + void SetUIMScratch(UInt32 index, UInt32 value); + void SetReqCount(IOByteCount reqCount); + void SetRequestMemoryDescriptor(IOMemoryDescriptor *requestMemoryDescriptor); + void SetBufferMemoryDescriptor(IOMemoryDescriptor *bufferMemoryDescriptor); + void SetMultiTransferTransaction(bool); + void SetFinalTransferInTransaction(bool); + void SetUseTimeStamp(bool); + void SetTimeStamp(AbsoluteTime timeStamp); + void SetIsSyncTransfer(bool); + inline void SetDMACommand(IODMACommand *dmaCommand) { _expansionData->_dmaCommand = dmaCommand; } + void SetBufferUSBCommand(IOUSBCommand *bufferUSBCommand); + + // Accessors + usbCommand GetSelector(void); + IOUSBDeviceRequestPtr GetRequest(void); + USBDeviceAddress GetAddress(void); + UInt8 GetEndpoint(void); + UInt8 GetDirection(void); + UInt8 GetType(void); + bool GetBufferRounding(void); + IOMemoryDescriptor * GetBuffer(void); + IOUSBCompletion GetUSLCompletion(void); + IOUSBCompletion GetClientCompletion(void); + UInt32 GetDataRemaining(void); + UInt8 GetStage(void); + IOReturn GetStatus(void); + IOMemoryDescriptor * GetOrigBuffer(void); + IOUSBCompletion GetDisjointCompletion(void); + IOByteCount GetDblBufLength(void); + UInt32 GetNoDataTimeout(void); + UInt32 GetCompletionTimeout(void); + UInt32 GetUIMScratch(UInt32 index); + IOByteCount GetReqCount(void); + IOMemoryDescriptor * GetRequestMemoryDescriptor(void); + IOMemoryDescriptor * GetBufferMemoryDescriptor(void); + bool GetMultiTransferTransaction(void); + bool GetFinalTransferInTransaction(void); + bool GetUseTimeStamp(void); + AbsoluteTime GetTimeStamp(void); + bool GetIsSyncTransfer(void); + inline IODMACommand * GetDMACommand(void) {return _expansionData->_dmaCommand; } + inline IOUSBCommand * GetBufferUSBCommand(void) {return _expansionData->_bufferUSBCommand; } +}; + + +class IOUSBIsocCommand : public IOCommand +{ + OSDeclareAbstractStructors(IOUSBIsocCommand) + +protected: + usbCommand _selector; + USBDeviceAddress _address; + UInt8 _endpoint; + UInt8 _direction; + IOMemoryDescriptor * _buffer; + IOUSBIsocCompletion _completion; + UInt64 _startFrame; + UInt32 _numFrames; + IOUSBIsocFrame * _frameList; + IOReturn _status; + + struct ExpansionData + { + UInt32 _updateFrequency; + bool _useTimeStamp; + AbsoluteTime _timeStamp; + bool _isSyncTransfer; // Returns true if the command is used for a synchronous transfer + bool _rosettaClient; + IODMACommand * _dmaCommand; + IOUSBIsocCompletion _uslCompletion; + bool _lowLatency; + }; + ExpansionData * _expansionData; + + // we override these OSObject method in order to allocate and release our expansion data + virtual bool init(); + virtual void free(); + +public: + // static constructor + static IOUSBIsocCommand *NewCommand(void); + + // Manipulators + void SetSelector(usbCommand sel) {_selector = sel; } + void SetAddress(USBDeviceAddress addr) {_address = addr; } + void SetEndpoint(UInt8 ep) {_endpoint = ep; } + void SetDirection(UInt8 dir) {_direction = dir; } + void SetBuffer(IOMemoryDescriptor *buf) {_buffer = buf; } + void SetCompletion(IOUSBIsocCompletion completion) {_completion = completion; } + void SetStartFrame(UInt64 sf) {_startFrame = sf; } + void SetNumFrames(UInt32 nf) {_numFrames = nf; } + void SetFrameList(IOUSBIsocFrame *fl) {_frameList = fl; } + void SetStatus(IOReturn stat) {_status = stat; } + void SetUpdateFrequency( UInt32 fr) { _expansionData->_updateFrequency = fr; } + void SetUseTimeStamp(bool useIt) { _expansionData->_useTimeStamp= useIt; } + void SetTimeStamp(AbsoluteTime timeStamp) { _expansionData->_timeStamp= timeStamp; } + void SetIsSyncTransfer(bool isSync) { _expansionData->_isSyncTransfer = isSync; } + void SetRosettaClient(bool isRosetta) { _expansionData->_rosettaClient = isRosetta; } + void SetDMACommand(IODMACommand *dmaCommand) { _expansionData->_dmaCommand = dmaCommand; } + void SetUSLCompletion(IOUSBIsocCompletion completion) { _expansionData->_uslCompletion = completion; } + void SetLowLatency(bool lowLatency) { _expansionData->_lowLatency = lowLatency; } + + // Accessors + usbCommand GetSelector(void) { return _selector; } + USBDeviceAddress GetAddress(void) { return _address; } + UInt8 GetEndpoint(void) { return _endpoint; } + UInt8 GetDirection(void) { return _direction; } + IOMemoryDescriptor * GetBuffer(void) { return _buffer; } + IOUSBIsocCompletion GetCompletion(void) { return _completion; } + UInt64 GetStartFrame(void) { return _startFrame; } + UInt32 GetNumFrames(void) { return _numFrames; } + IOUSBIsocFrame * GetFrameList(void) { return _frameList; } + UInt32 GetUpdateFrequency(void) { return _expansionData->_updateFrequency; } + IOReturn GetStatus(void) { return _status; } + bool GetUseTimeStamp(void) { return _expansionData->_useTimeStamp; } + AbsoluteTime GetTimeStamp(void) { return _expansionData->_timeStamp; } + bool GetIsSyncTransfer(void) { return _expansionData->_isSyncTransfer; } + bool GetIsRosettaClient(void) { return _expansionData->_rosettaClient; } + IODMACommand * GetDMACommand(void) { return _expansionData->_dmaCommand; } + IOUSBIsocCompletion GetUSLCompletion(void) { return _expansionData->_uslCompletion; } + bool GetLowLatency(void) { return _expansionData->_lowLatency; } +}; + +class IOUSBCommandPool : public IOCommandPool +{ + OSDeclareDefaultStructors( IOUSBCommandPool ) + +protected: + virtual IOReturn gatedReturnCommand(IOCommand * command); + virtual IOReturn gatedGetCommand(IOCommand ** command, bool blockForCommand); + +public: + static IOCommandPool * withWorkLoop(IOWorkLoop * inWorkLoop); +}; + + +#endif + diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBCompositeDriver.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBCompositeDriver.h.svn-base new file mode 100644 index 0000000..ef72cf4 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBCompositeDriver.h.svn-base @@ -0,0 +1,127 @@ +/* + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1998-2006 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBCompositeDriver_H +#define _IOKIT_IOUSBCompositeDriver_H + +//================================================================================================ +// +// Headers +// +//================================================================================================ +// +#include <libkern/OSByteOrder.h> +#include <IOKit/IOLib.h> +#include <IOKit/IONotifier.h> +#include <IOKit/IOService.h> +#include <IOKit/IOMessage.h> +#include <IOKit/usb/IOUSBBus.h> +#include <IOKit/usb/IOUSBDevice.h> +#include <IOKit/usb/IOUSBInterface.h> +#include <IOKit/usb/IOUSBLog.h> +#include <IOKit/usb/USB.h> + + +//================================================================================================ +// +// Class Declaration for IOUSBCompositeDriver +// +//================================================================================================ +// +/*! + @class IOUSBCompositeDriver + @abstract Driver that matches to USB composite devices. + @discussion This class can be overriden to provide for specific behaviors. The driver itself essentially + just calls SetConfiguration(). + */ +class IOUSBCompositeDriver : public IOService +{ + OSDeclareDefaultStructors(IOUSBCompositeDriver) + + IOUSBDevice * fDevice; + IONotifier * fNotifier; + bool fExpectingClose; + UInt8 fConfigValue; + UInt8 fConfigbmAttributes; + + struct IOUSBCompositeDriverExpansionData + { + }; + + IOUSBCompositeDriverExpansionData * fIOUSBCompositeExpansionData; + + static IOReturn CompositeDriverInterestHandler( void * target, void * refCon, UInt32 messageType, IOService * provider, void * messageArgument, vm_size_t argSize ); + +public: + + // IOService Methods + // + virtual bool start(IOService * provider); + virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); + virtual bool willTerminate( IOService * provider, IOOptionBits options ); + virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer ); + + // IOUSBCompositeDriver Methods + // + virtual bool ConfigureDevice(); + virtual IOReturn ReConfigureDevice(); + /*! + @function SetConfiguration + @abstract Call IOUSBDevice to do a SetConfiguration call to the device. + @param configValue The desired configuration value. + @param startInterfaceMatching A boolean specifying whether IOKit should begin the process of finding + matching drivers for the new IOUSBInterface objects. + */ + virtual IOReturn SetConfiguration(UInt8 configValue, bool startInterfaceMatching=true); + + // Getters + // + bool GetExpectingClose() { return fExpectingClose; } + UInt8 GetConfigValue() { return fConfigValue; } + UInt8 GetConfigbmAttributes() { return fConfigbmAttributes; } + IONotifier * GetNotifier() { return fNotifier; } + + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 0); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 1); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 2); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 3); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 4); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 5); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 6); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 7); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 8); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 9); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 10); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 11); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 12); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 13); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 14); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 15); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 16); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 17); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 18); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 19); +}; + +#endif _IOKIT_IOUSBCompositeDriver_H diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBController.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBController.h.svn-base new file mode 100644 index 0000000..18940f2 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBController.h.svn-base @@ -0,0 +1,1073 @@ +/* + * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.2 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBCONTROLLER_H +#define _IOKIT_IOUSBCONTROLLER_H + +//================================================================================================ +// +// Headers +// +//================================================================================================ +// +#include <libkern/c++/OSArray.h> + +#include <IOKit/IOService.h> +#include <IOKit/IOMemoryDescriptor.h> +#include <IOKit/IODeviceMemory.h> +#include <IOKit/IOWorkLoop.h> +#include <IOKit/IOCommandGate.h> +#include <IOKit/IOCommandPool.h> + +#include <IOKit/usb/USB.h> +#include <IOKit/usb/USBHub.h> +#include <IOKit/usb/IOUSBBus.h> +#include <IOKit/usb/IOUSBNub.h> +#include <IOKit/usb/IOUSBCommand.h> +#include <IOKit/usb/IOUSBWorkLoop.h> + + +//================================================================================================ +// +// Types and Constants +// +//================================================================================================ +// +enum +{ + kErrataCMDDisableTestMode = (1 << 0), // turn off UHCI test mode + kErrataOnlySinglePageTransfers = (1 << 1), // Don't cross page boundaries in a single transfer + kErrataRetryBufferUnderruns = (1 << 2), // Don't cross page boundaries in a single transfer + kErrataLSHSOpti = (1 << 3), // Don't cross page boundaries in a single transfer + kErrataDisableOvercurrent = (1 << 4), // Always set the NOCP bit in rhDescriptorA register + kErrataLucentSuspendResume = (1 << 5), // Don't allow port suspend at the root hub + kErrataNeedsWatchdogTimer = (1 << 6), // Use Watchdog timer to reset confused controllers + kErrataNeedsPortPowerOff = (1 << 7), // Power off the ports and back on again to clear weird status. + kErrataAgereEHCIAsyncSched = (1 << 8), // needs workaround for Async Sched bug + kErrataNECOHCIIsochWraparound = (1 << 9), // needs workaround for NEC isoch buffer wraparound problem + kErrataNECIncompleteWrite = (1 << 10), // needs workaround for NEC bits not sticking (errata IBB-2UE-00030 Jun 23 2005) + kErrataICH6PowerSequencing = (1 << 11), // needs special power sequencing for early Transition machines + kErrataICH7ISTBuffer = (1 << 12), // buffer for Isochronous Scheduling Threshold + kErrataUHCISupportsOvercurrent = (1 << 13), // UHCI controller supports overcurrent detection + kErrataNeedsOvercurrentDebounce = (1 << 14), // The overcurrent indicator should be debounced by 10ms + kErrataSupportsPortResumeEnable = (1 << 15), // UHCI has resume enable bits at config address 0xC4 + kErrataNoCSonSplitIsoch = (1 << 16), // MCP79 - split iscoh is a little different + kErrataOHCINoGlobalSuspendOnSleep = (1 << 17), // when sleeping, do not put the OHCI controller in SUSPEND state. just leave it Operational with suspended downstream ports + kErrataMissingPortChangeInt = (1 << 18), // sometimes the port change interrupt may be missing + kErrataMCP79IgnoreDisconnect = (1 << 19), // MCP79 - need to ignore a connect/disconnect on wake + kErrataUse32bitEHCI = (1 << 20) , // MCP79 - EHCI should only run with 32 bit DMA addresses + kErrataUHCISupportsResumeDetectOnConnect = (1 << 21), // UHCI controller will generate a ResumeDetect interrupt while in Global Suspend if a device is plugged in + kErrataDontUseCompanionController = (1 << 22) // For systems which will end up being EHCI only +}; + +enum +{ + kUSBWatchdogTimeoutMS = 1000 +}; + + +/*! + @struct + @discussion This table contains the list of errata that are necessary for known problems with particular devices. + The format is vendorID, product ID, lowest revisionID needing errata, highest rev needing errata, errataBits. + The result of all matches is ORed together, so more than one entry may match. + Typically for a given errata a list of revisions that this applies to is supplied. + @field vendID The Vendor ID of the device + @field deviceID Product ID of device + @field revisionLo Lowest product revsion to apply errata to + @field revisionHi Highest product revision to apply errata to + @field errata Bit field flagging which errata to apply to device. +*/ + +struct ErrataListEntryStruct +{ + UInt16 vendID; + UInt16 deviceID; + UInt16 revisionLo; + UInt16 revisionHi; + UInt32 errata; +}; + +typedef struct ErrataListEntryStruct ErrataListEntry, *ErrataListEntryPtr; + + +//================================================================================================ +// +// Routines used to implement synchronous I/O +// +//================================================================================================ +// +void IOUSBSyncCompletion(void *target, void * parameter, IOReturn status, UInt32 bufferSizeRemaining); + +void IOUSBSyncIsoCompletion(void *target, void * parameter, IOReturn status, IOUSBIsocFrame *pFrames); + + +//================================================================================================ +// +// Forward Declarations +// +//================================================================================================ +// +class IOUSBDevice; +class IOUSBLog; +class IOUSBHubDevice; +class IOUSBRootHubDevice; +class IOMemoryDescriptor; + + +//================================================================================================ +// +// IOUSBController Class +// +//================================================================================================ +// +/*! + @class IOUSBController + @abstract Base class for USB hardware driver + @discussion Not many directly useful methods for USB device driver writers, + IOUSBDevice, IOUSBInterface and IOUSBPipe provide more useful abstractions. + The bulk of this class interfaces between IOKit and the low-level UIM, which is + based on the MacOS9 UIM. To impliment a new controller type, subclass + IOUSBController and impiment all the "UIM functions". AppleUSBOHCI + is an example of this implementing all the functions necessary to drive an + OHCI controller. +*/ +class IOUSBController : public IOUSBBus +{ + OSDeclareAbstractStructors(IOUSBController) + friend class IOUSBControllerV2; + friend class IOUSBControllerV3; + +protected: + + IOUSBWorkLoop * _workLoop; + IOCommandGate * _commandGate; + IOUSBRootHubDevice * _rootHubDevice; + UInt32 _devZeroLock; + static UInt32 _busCount; + static bool gUsedBusIDs[256]; + + struct ExpansionData + { + IOCommandPool *freeUSBCommandPool; + IOCommandPool *freeUSBIsocCommandPool; + IOTimerEventSource *watchdogUSBTimer; + bool _terminating; + bool _watchdogTimerActive; + bool _pcCardEjected; // Obsolete + UInt32 _busNumber; + UInt32 _currentSizeOfCommandPool; + UInt32 _currentSizeOfIsocCommandPool; + UInt8 _controllerSpeed; // Controller speed, passed down for splits + thread_call_t _terminatePCCardThread; // Obsolete + bool _addressPending[128]; + SInt32 _activeIsochTransfers; // isochronous transfers in the queue + IOService *_provider; // common name for our provider + bool _controllerCanSleep; // true iff the controller is able to support sleep/wake + bool _needToClose; + UInt32 _isochMaxBusStall; // value (in ns) of the maximum PCI bus stall allowed for Isoch.. + }; + ExpansionData *_expansionData; + + // The following methods do not use and upper case initial letter because they are part of IOKit + // + +public: + virtual bool init( OSDictionary * propTable ); + virtual bool start( IOService * provider ); + virtual void stop( IOService * provider ); + virtual bool finalize(IOOptionBits options); + virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); + virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer ); + +protected: + + IOReturn getNubResources( IOService * regEntry ); + + virtual UInt32 GetErrataBits( + UInt16 vendorID, + UInt16 deviceID, + UInt16 revisionID ); + + + static IOReturn DoDeleteEP( + OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + + static IOReturn DoAbortEP( + OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + + static IOReturn DoClearEPStall( + OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + + static IOReturn DoCreateEP( + OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + static IOReturn DoControlTransfer( + OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + + static IOReturn DoIOTransfer( + OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + + static IOReturn DoIsocTransfer( + OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + + static IOReturn DoLowLatencyIsocTransfer( + OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + + static void ControlPacketHandler( + OSObject * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining ); + + static void InterruptPacketHandler( + OSObject * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining ); + + static void BulkPacketHandler( + OSObject * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining ); + + static void IsocCompletionHandler( + OSObject * target, + void * parameter, + IOReturn status, + IOUSBIsocFrame *pFrames ); + + static void LowLatencyIsocCompletionHandler( + OSObject * target, + void * parameter, + IOReturn status, + IOUSBLowLatencyIsocFrame *pFrames ); + + static void WatchdogTimer(OSObject *target, IOTimerEventSource *sender); + + // Obsolete + static void TerminatePCCard(OSObject *target); + + static IOReturn ProtectedDevZeroLock(OSObject *target, void* lock, void *, void *, void*); + + + USBDeviceAddress GetNewAddress( void ); + + IOReturn ControlTransaction( IOUSBCommand * command ); + + IOReturn InterruptTransaction( IOUSBCommand * command ); + + IOReturn BulkTransaction( IOUSBCommand * command ); + + IOReturn IsocTransaction( IOUSBIsocCommand * command ); + + IOReturn LowLatencyIsocTransaction( IOUSBIsocCommand * command ); + + void FreeCommand( IOUSBCommand * command ); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Invokes the specified completion action of the request. If + // the completion action is unspecified, no action is taken. + void Complete( + IOUSBCompletion completion, + IOReturn status, + UInt32 actualByteCount = 0 ); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Invokes the specified completion action of the request. If + // the completion action is unspecified, no action is taken. + void CompleteWithTimeStamp ( + IOUSBCompletionWithTimeStamp completion, + IOReturn status, + UInt32 actualByteCount, + AbsoluteTime timeStamp); + + + + // + // UIM methods + // + +/*! + @function UIMInitialize + @abstract UIM function, initialise the controller and UIM data structures. +*/ + virtual IOReturn UIMInitialize( IOService * provider ) = 0; + +/*! + @function UIMFinalize + @abstract UIM function, finalise the controller and UIM data structures prior to removal. +*/ + virtual IOReturn UIMFinalize() = 0; + + // Control +/*! + @function UIMCreateControlEndpoint + @abstract UIM function, create a control endpoint for the controller. + @param functionNumber The USB device ID of the device for this endpoint + @param endpointNumber The endpoint number for this endpoint + @param maxPacketSize Maximum packet size of this endpoint + @param speed speed of the device: kUSBDeviceSpeedLow or kUSBDeviceSpeedFull +*/ + virtual IOReturn UIMCreateControlEndpoint( + UInt8 functionNumber, + UInt8 endpointNumber, + UInt16 maxPacketSize, + UInt8 speed) = 0; + +/* Note: this function has been superceded. */ + virtual IOReturn UIMCreateControlTransfer( short functionNumber, + short endpointNumber, + IOUSBCompletion completion, + void * CBP, + bool bufferRounding, + UInt32 bufferSize, + short direction) = 0; + +/*! + @function UIMCreateControlTransfer + @abstract UIM function, Do a transfer on a control endpoint. + This method supercedes the method which takes a void * parameter. + @param functionNumber The USB device ID of the device to perform the transaction with + @param endpointNumber The endpoint number for the transaction + @param completion Action to perform when I/O completes + @param CBP Memory descriptor describing the buffer to transfer. Will never describe + memory which has disjoint packets. + @param bufferRounding If true, short packets are OK and do not cause an error + @param bufferSize Size of the data to transfer in the data phase. (C + @param direction Specifies direction and PID for transaction. kUSBIn, KUSBOut (DATA PID) or kUSBSetup (SETUP PID). +*/ + virtual IOReturn UIMCreateControlTransfer( short functionNumber, + short endpointNumber, + IOUSBCompletion completion, + IOMemoryDescriptor * CBP, + bool bufferRounding, + UInt32 bufferSize, + short direction) = 0; + + // Bulk +/*! + @function UIMCreateBulkEndpoint + @abstract UIM function, create a bulk endpoint for the controller. + @param functionNumber The USB device ID of the device for this endpoint + @param endpointNumber The endpoint number for this endpoint + @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. + @param speed speed of the device: kUSBDeviceSpeedLow or kUSBDeviceSpeedFull + @param maxPacketSize Maximum packet size of this endpoint +*/ + virtual IOReturn UIMCreateBulkEndpoint( + UInt8 functionNumber, + UInt8 endpointNumber, + UInt8 direction, + UInt8 speed, + UInt8 maxPacketSize) = 0; + +/* Note: this function has been superceded. */ + virtual IOReturn UIMCreateBulkTransfer( short functionNumber, + short endpointNumber, + IOUSBCompletion completion, + IOMemoryDescriptor * CBP, + bool bufferRounding, + UInt32 bufferSize, + short direction) = 0; + + // Interrupt +/*! + @function UIMCreateInterruptEndpoint + @abstract UIM function, create an interrupt endpoint for the controller. + @param functionNumber The USB device ID of the device for this endpoint + @param endpointNumber The endpoint number for this endpoint + @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. + @param speed speed of the device: kUSBDeviceSpeedLow or kUSBDeviceSpeedFull + @param maxPacketSize Maximum packet size of this endpoint + @param pollingRate The maximum polling interval from the endpoint descriptor. +*/ + virtual IOReturn UIMCreateInterruptEndpoint( + short functionAddress, + short endpointNumber, + UInt8 direction, + short speed, + UInt16 maxPacketSize, + short pollingRate) = 0; + +/* Note: this function has been superceded. */ + virtual IOReturn UIMCreateInterruptTransfer( short functionNumber, + short endpointNumber, + IOUSBCompletion completion, + IOMemoryDescriptor * CBP, + bool bufferRounding, + UInt32 bufferSize, + short direction) = 0; + + // Isoch +/*! + @function UIMCreateIsochEndpoint + @abstract Create an Isochronous endpoint in the controller. + @param functionNumber The USB device ID of the device for this endpoint + @param endpointNumber The endpoint number for this endpoint + @param maxPacketSize Maximum packet size of this endpoint + @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. +*/ + virtual IOReturn UIMCreateIsochEndpoint( + short functionAddress, + short endpointNumber, + UInt32 maxPacketSize, + UInt8 direction) = 0; + +/*! + @function UIMCreateIsochTransfer + @abstract UIM function, Do a transfer on an Isocchronous endpoint. + @param functionNumber The USB device ID of the device to perform the transaction with + @param endpointNumber The endpoint number for the transaction + @param completion Action to perform when I/O completes + @param direction Specifies direction for transfer. kUSBIn or KUSBOut. + @param frameStart The frame number in which to start the transactions + @param pBuffer describes memory buffer. + @param frameCount number of frames to do transactions in + @param pFrames Describes transactions in individual frames, gives sizes and reults for transactions. +*/ + virtual IOReturn UIMCreateIsochTransfer( + short functionAddress, + short endpointNumber, + IOUSBIsocCompletion completion, + UInt8 direction, + UInt64 frameStart, + IOMemoryDescriptor * pBuffer, + UInt32 frameCount, + IOUSBIsocFrame *pFrames) = 0; + +/*! + @function UIMAbortEndpoint + @abstract UIM function Abort the specified endpoint, return all transactions queued on it. + @param functionNumber The USB device ID of the device to Abort + @param endpointNumber The endpoint number to Abort + @param direction Specifies direction of the endpoint for uniqueness. kUSBIn or KUSBOut. +*/ + virtual IOReturn UIMAbortEndpoint( + short functionNumber, + short endpointNumber, + short direction) = 0; + +/*! + @function UIMDeleteEndpoint + @abstract UIM function Delete the specified endpoint, returning all transactions queued on it. + @param functionNumber The USB device ID of the device to Delete + @param endpointNumber The endpoint number to Delete + @param direction Specifies direction of the endpoint for uniqueness. kUSBIn or KUSBOut. +*/ + virtual IOReturn UIMDeleteEndpoint( + short functionNumber, + short endpointNumber, + short direction) = 0; + +/*! + @function UIMClearEndpointStall + @abstract UIM function Clear stall on the specified endpoint, set data toggle to zero, + return all transactions queued on it. + @param functionNumber The USB device ID of the device to Clear + @param endpointNumber The endpoint number to Clear + @param direction Specifies direction of the endpoint for uniqueness. kUSBIn or KUSBOut. +*/ + virtual IOReturn UIMClearEndpointStall( + short functionNumber, + short endpointNumber, + short direction) = 0; + +/*! + @function UIMRootHubStatusChange + @abstract UIM function UIMRootHubStatusChange - This method was internal to the UIM (never called by the superclass) until + IOUSBControllerV3. For UIMs which are a subclass of IOUSBController or IOUSBControllerV2, it can + still be used internally only. For subclasses of IOUSBControllerV3, however, the meaning has changed + slightly. Now, it is used to determine if there is a status change on the root hub, and if so, it + needs to update the IOUSBControllerV3 instance variable _rootHubStatusChangedBitmap +*/ + virtual void UIMRootHubStatusChange(void) = 0; + + static const IORegistryPlane *gIOUSBPlane; + +public: + + static IOUSBLog *_log; + + IOCommandGate * GetCommandGate(void); + + /*! + @struct Endpoint + Describes an endpoint of a device. + Simply an easier to use version of the endpoint descriptor. + @field descriptor The raw endpoint descriptor. + @field number Endpoint number + @field direction Endpoint direction: kUSBOut, kUSBIn, kUSBAnyDirn + @field transferType Type of endpoint: kUSBControl, kUSBIsoc, kUSBBulk, kUSBInterrupt + @field maxPacketSize Maximum packet size for endpoint + @field interval Polling interval in milliseconds (only relevent for Interrupt endpoints) + */ + struct Endpoint { + IOUSBEndpointDescriptor * descriptor; + UInt8 number; + UInt8 direction; // in, out + UInt8 transferType; // cntrl, bulk, isoc, int + UInt16 maxPacketSize; + UInt8 interval; + }; + + // Implements IOService::getWorkLoop const member function + virtual IOWorkLoop * getWorkLoop() const; + + /* + * Root hub methods + * Only of interest to the IOUSBRootHubDevice object + */ +/*! + @function GetRootHubDeviceDescriptor + @abstract UIM function, return the device descriptor of the simulated root hub device + As GET_DESCRIPTOR control request for device descrptor + @param desc Descriptor structure to return data in +*/ + virtual IOReturn GetRootHubDeviceDescriptor( IOUSBDeviceDescriptor *desc ) = 0; + +/*! + @function GetRootHubDescriptor + @abstract UIM function, return the hub descriptor of the simulated root hub device + As GET_DESCRIPTOR control request for hub descrptor + @param desc Descriptor structure to return data in +*/ + virtual IOReturn GetRootHubDescriptor( IOUSBHubDescriptor *desc ) = 0; + +/*! + @function SetRootHubDescriptor + @abstract UIM function, optional. Set the hub descriptor data. + As SET_DESCRIPTOR control request for hub descrptor + @param buffer Descriptor data +*/ + virtual IOReturn SetRootHubDescriptor( OSData *buffer ) = 0; + +/*! + @function GetRootHubConfDescriptor + @abstract UIM function, retrun the configuration descriptor of the simulated root hub device + As GET_DESCRIPTOR control request for configuration descrptor + @param desc Descriptor structure to return data in +*/ + virtual IOReturn GetRootHubConfDescriptor( OSData *desc ) = 0; + +/*! + @function GetRootHubStatus + @abstract UIM function, get the status of the root hub. As GET_STATUS control request to device. + @param status Status structure to return +*/ + virtual IOReturn GetRootHubStatus( IOUSBHubStatus *status ) = 0; + +/*! + @function SetRootHubFeature + @abstract UIM function, set feature of root hub, As SET_FEATURE control request. + @param wValue The feature to set, as would be transferred in wValue field of SETUP packet. +*/ + virtual IOReturn SetRootHubFeature( UInt16 wValue ) = 0; + +/*! + @function ClearRootHubFeature + @abstract UIM function, set feature of root hub, As CLEAR_FEATURE control request. + @param wValue The feature to clear, as would be transferred in wValue field of SETUP packet. +*/ + virtual IOReturn ClearRootHubFeature( UInt16 wValue ) = 0; + +/*! + @function GetRootHubPortStatus + @abstract UIM function, get the status of a root hub port. As GET_STATUS control request to the port. + @param status Status structure to return + @param port Port to get status for. +*/ + virtual IOReturn GetRootHubPortStatus( IOUSBHubPortStatus *status, UInt16 port ) = 0; + +/*! + @function SetRootHubPortFeature + @abstract UIM function, set feature of a root hub port, As SET_FEATURE control request to a port. + @param wValue The feature to set, as would be transferred in wValue field of SETUP packet. + @param port Port to set feature for +*/ + virtual IOReturn SetRootHubPortFeature( UInt16 wValue, UInt16 port ) = 0; + +/*! + @function ClearRootHubPortFeature + @abstract UIM function, clear feature of a root hub port, As CLEAR_FEATURE control request to a port. + @param wValue The feature to clear, as would be transferred in wValue field of SETUP packet. + @param port Port to clear feature for +*/ + virtual IOReturn ClearRootHubPortFeature( UInt16 wValue, UInt16 port ) = 0; + +/*! + @function ClearRootHubPortFeature + @abstract UIM function, Impliments GET_BUS_STATE control request, now obsolete. +*/ + virtual IOReturn GetRootHubPortState( UInt8 *state, UInt16 port ) = 0; + +/*! + @function SetHubAddress + @abstract UIM function, set the address of the simulated root hub device, as SET_ADDRESS + @param wValue New address for root hub. +*/ + virtual IOReturn SetHubAddress( UInt16 wValue ) = 0; + + + /*! + @function openPipe + Open a pipe to the specified device endpoint + @param address Address of the device on the USB bus + @param speed of the device: kUSBHighSpeed or kUSBLowSpeed + @param endpoint description of endpoint to connect to + */ + virtual IOReturn OpenPipe( USBDeviceAddress address, + UInt8 speed, + Endpoint * endpoint ); + /*! + @function closePipe + Close a pipe to the specified device endpoint + @param address Address of the device on the USB bus + @param endpoint description of endpoint + */ + virtual IOReturn ClosePipe( USBDeviceAddress address, + Endpoint * endpoint ); + + // Controlling pipe state + /*! + @function abortPipe + Abort pending I/O to/from the specified endpoint, causing them to complete with return code kIOReturnAborted + @param address Address of the device on the USB bus + @param endpoint description of endpoint + */ + virtual IOReturn AbortPipe( + USBDeviceAddress address, + Endpoint * endpoint ); + /*! + @function resetPipe + Abort pending I/O and clear stalled state - this method is a combination of abortPipe and clearPipeStall + @param address Address of the device on the USB bus + @param endpoint description of endpoint + */ + virtual IOReturn ResetPipe( USBDeviceAddress address, + Endpoint * endpoint ); + /*! + @function clearPipeStall + Clear a pipe stall. + @param address Address of the device on the USB bus + @param endpoint description of endpoint + */ + virtual IOReturn ClearPipeStall( USBDeviceAddress address, + Endpoint * endpoint ); + + // Transferring Data + /*! + @function read + Read from an interrupt or bulk endpoint + @param buffer place to put the transferred data + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been filled + */ + virtual IOReturn Read( IOMemoryDescriptor * buffer, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBCompletion * completion ); + /*! + @function write + Write to an interrupt or bulk endpoint + @param buffer place to get the transferred data + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been emptied + */ + virtual IOReturn Write( IOMemoryDescriptor * buffer, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBCompletion * completion ); + + /*! + @function isocIO + Read from or write to an isochronous endpoint + @param buffer place to put the transferred data + @param frameStart USB frame number of the frame to start transfer + @param numFrames Number of frames to transfer + @param frameList Bytes to transfer and result for each frame + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been filled + */ + virtual IOReturn IsocIO( IOMemoryDescriptor * buffer, + UInt64 frameStart, + UInt32 numFrames, + IOUSBIsocFrame * frameList, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBIsocCompletion * completion ); + /*! + @function deviceRequest + Make a control request to the specified endpoint + There are two versions of this method, one uses a simple void * + to point to the data portion of the transfer, the other uses an + IOMemoryDescriptor to point to the data. + @param request parameter block for the control request + @param completion describes action to take when the request has been executed + @param address Address of the device on the USB bus + @param epNum endpoint number + */ + virtual IOReturn DeviceRequest( IOUSBDevRequest * request, + IOUSBCompletion * completion, + USBDeviceAddress address, + UInt8 epNum ); + + virtual IOReturn DeviceRequest( IOUSBDevRequestDesc * request, + IOUSBCompletion * completion, + USBDeviceAddress address, + UInt8 epNum ); + + /* + * Methods used by the hub driver to initialize a device + */ + /*! + @function AcquireDeviceZero + Get the device zero lock - call this before resetting a device, to ensure there's + only one device with address 0 + */ + virtual IOReturn AcquireDeviceZero( void ); + /*! + @function ReleaseDeviceZero + Release the device zero lock - call this to release the device zero lock, + when there is no longer a device at address 0 + */ + virtual void ReleaseDeviceZero( void ); + + // non-virtual methods + void WaitForReleaseDeviceZero( void ); + IOReturn ConfigureDeviceZero( UInt8 maxPacketSize, UInt8 speed ); + IOReturn GetDeviceZeroDescriptor( IOUSBDeviceDescriptor * desc, UInt16 size ); + IOReturn SetDeviceZeroAddress(USBDeviceAddress address); + IOUSBDevice * MakeDevice(USBDeviceAddress *address); + IOUSBHubDevice * MakeHubDevice(USBDeviceAddress *address); + IOReturn CreateDevice( IOUSBDevice * device, + USBDeviceAddress deviceAddress, + UInt8 maxPacketSize, + UInt8 speed, + UInt32 powerAvailable ); + + /*! + @function GetBandwidthAvailable + Returns the available bandwidth (in bytes) per frame or microframe for + isochronous transfers. + @result maximum number of bytes that a new iso pipe could transfer + per frame given current allocations. + */ + virtual UInt32 GetBandwidthAvailable( void ) = 0; + + /*! + @function GetFrameNumber + Returns the full current frame number. + @result The frame number. + */ + virtual UInt64 GetFrameNumber( void ) = 0; + + /*! + @function GetFrameNumber32 + Returns the least significant 32 bits of the frame number. + @result The lsb 32 bits of the frame number. + */ + virtual UInt32 GetFrameNumber32( void ) = 0; + + // Debugger polled mode + virtual void PollInterrupts( IOUSBCompletionAction safeAction = 0 ) = 0; + + virtual IOReturn PolledRead( + short functionNumber, + short endpointNumber, + IOUSBCompletion completion, + IOMemoryDescriptor * CBP, + bool bufferRounding, + UInt32 bufferSize); + + OSMetaClassDeclareReservedUsed(IOUSBController, 0); + virtual void UIMCheckForTimeouts(void); + + OSMetaClassDeclareReservedUsed(IOUSBController, 1); + virtual IOReturn UIMCreateControlTransfer( short functionNumber, + short endpointNumber, + IOUSBCommand* command, + void* CBP, + bool bufferRounding, + UInt32 bufferSize, + short direction); + + OSMetaClassDeclareReservedUsed(IOUSBController, 2); + virtual IOReturn UIMCreateControlTransfer( short functionNumber, + short endpointNumber, + IOUSBCommand* command, + IOMemoryDescriptor* CBP, + bool bufferRounding, + UInt32 bufferSize, + short direction); + + OSMetaClassDeclareReservedUsed(IOUSBController, 3); +/*! + @function UIMCreateBulkTransfer + @abstract UIM function, Do a transfer on a bulk endpoint. + This method supercedes the method which takes multiple parameters. + @param command paramters for transfer. +*/ + virtual IOReturn UIMCreateBulkTransfer(IOUSBCommand* command); + + OSMetaClassDeclareReservedUsed(IOUSBController, 4); +/*! + @function UIMCreateInterruptTransfer + @abstract UIM function, Do a transfer on an interrupt endpoint. + This method supercedes the method which takes multiple parameters. + @param command paramters for transfer. +*/ + virtual IOReturn UIMCreateInterruptTransfer(IOUSBCommand* command); + + /*! + @function deviceRequest + Make a control request to the specified endpoint + There are two versions of this method, one uses a simple void * + to point to the data portion of the transfer, the other uses an + IOMemoryDescriptor to point to the data. + @param request parameter block for the control request + @param completion describes action to take when the request has been executed + @param address Address of the device on the USB bus + @param epNum endpoint number + */ + OSMetaClassDeclareReservedUsed(IOUSBController, 5); + virtual IOReturn DeviceRequest( IOUSBDevRequest * request, + IOUSBCompletion * completion, + USBDeviceAddress address, + UInt8 epNum, + UInt32 noDataTimeout, + UInt32 completionTimeout ); + + OSMetaClassDeclareReservedUsed(IOUSBController, 6); + virtual IOReturn DeviceRequest( IOUSBDevRequestDesc * request, + IOUSBCompletion * completion, + USBDeviceAddress address, + UInt8 epNum, + UInt32 noDataTimeout, + UInt32 completionTimeout ); + + + + OSMetaClassDeclareReservedUsed(IOUSBController, 7); + /*! + @function read + Read from an interrupt or bulk endpoint + @param buffer place to put the transferred data + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been filled + */ + virtual IOReturn Read( IOMemoryDescriptor * buffer, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBCompletion * completion, + UInt32 noDataTimeout, + UInt32 completionTimeout ); + + OSMetaClassDeclareReservedUsed(IOUSBController, 8); + /*! + @function write + Write to an interrupt or bulk endpoint + @param buffer place to get the transferred data + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been emptied + */ + virtual IOReturn Write( IOMemoryDescriptor * buffer, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBCompletion * completion, + UInt32 noDataTimeout, + UInt32 completionTimeout ); + + // this should really not be using a padding slot, since free is in our superclas, but we shipped this way so now we need to leave it. + OSMetaClassDeclareReservedUsed(IOUSBController, 9); + virtual void free(); + +protected: + +/*! + @function UIMRootHubStatusChange(bool) + @abstract UIM function UIMRootHubStatusChange(bool) - This method was internal to the UIM (never called by the superclass) until + IOUSBControllerV3. For UIMs which are a subclass of IOUSBController or IOUSBControllerV2, it can + still be used internally only. For subclasses of IOUSBControllerV3, however, it has become obsolete + (it still needs to be implemented since it is pure virtual) +*/ + OSMetaClassDeclareReservedUsed(IOUSBController, 10); + virtual void UIMRootHubStatusChange( bool abort ) = 0; + +public: + + OSMetaClassDeclareReservedUsed(IOUSBController, 11); + virtual IOReturn CreateRootHubDevice( IOService * provider, IOUSBRootHubDevice ** rootHubDevice); + + OSMetaClassDeclareReservedUsed(IOUSBController, 12); + /*! + @function Read + Read from an interrupt or bulk endpoint + @param buffer place to put the transferred data + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been filled + @param noDataTimeout number of milliseconds of no data movement before the request is aborted + @param completionTimeout number of milliseonds after the command is on the bus in which it must complete + @param reqCount number of bytes requested for the transfer (must not be greater than the length of the buffer) + */ + virtual IOReturn Read( IOMemoryDescriptor * buffer, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBCompletion * completion, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOByteCount reqCount ); + + OSMetaClassDeclareReservedUsed(IOUSBController, 13); + /*! + @function Write + Write to an interrupt or bulk endpoint + @param buffer place to get the transferred data + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been emptied + @param noDataTimeout number of milliseconds of no data movement before the request is aborted + @param completionTimeout number of milliseonds after the command is on the bus in which it must complete + @param reqCount number of bytes requested for the transfer (must not be greater than the length of the buffer) + */ + virtual IOReturn Write( IOMemoryDescriptor * buffer, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBCompletion * completion, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOByteCount reqCount ); + + OSMetaClassDeclareReservedUsed(IOUSBController, 14); + + virtual IOReturn GetRootHubStringDescriptor(UInt8 index, OSData *desc) = 0; + + OSMetaClassDeclareReservedUsed(IOUSBController, 15); + /*! + @function IsocIO + Read from or write to an isochronous endpoint + @param buffer place to put the transferred data + @param frameStart USB frame number of the frame to start transfer + @param numFrames Number of frames to transfer + @param frameList Bytes to transfer and result for each frame + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been filled + @param updateFrequency describes how often to update the framelist once the transfer has completed (in ms) + */ + virtual IOReturn IsocIO( IOMemoryDescriptor * buffer, + UInt64 frameStart, + UInt32 numFrames, + IOUSBLowLatencyIsocFrame * frameList, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBLowLatencyIsocCompletion * completion, + UInt32 updateFrequency ); + + OSMetaClassDeclareReservedUsed(IOUSBController, 16); + + /*! + @function UIMCreateIsochTransfer + @abstract UIM function, Do a transfer on an Isocchronous endpoint. + @param functionNumber The USB device ID of the device to perform the transaction with + @param endpointNumber The endpoint number for the transaction + @param completion Action to perform when I/O completes + @param direction Specifies direction for transfer. kUSBIn or KUSBOut. + @param frameStart The frame number in which to start the transactions + @param pBuffer describes memory buffer. + @param frameCount number of frames to do transactions in + @param pFrames Describes transactions in individual frames, gives sizes and reults for transactions. + @param updateFrequency Describes how often we update the frameList parameters (in ms) + */ + virtual IOReturn UIMCreateIsochTransfer( + short functionAddress, + short endpointNumber, + IOUSBIsocCompletion completion, + UInt8 direction, + UInt64 frameStart, + IOMemoryDescriptor * pBuffer, + UInt32 frameCount, + IOUSBLowLatencyIsocFrame *pFrames, + UInt32 updateFrequency); + + + OSMetaClassDeclareReservedUsed(IOUSBController, 17); + virtual IOReturn CheckForDisjointDescriptor(IOUSBCommand *command, UInt16 maxPacketSize); + + /*! + @function UIMCreateIsochTransfer + @abstract UIM function, Do a transfer on an Isocchronous endpoint. + @param command an IOUSBIsocCommand object with all the necessary information + */ + OSMetaClassDeclareReservedUsed(IOUSBController, 18); + virtual IOReturn UIMCreateIsochTransfer(IOUSBIsocCommand *command); + + // do not use this slot without first checking bug rdar://6022420 + OSMetaClassDeclareReservedUnused(IOUSBController, 19); + +protected: + void IncreaseIsocCommandPool(); + void IncreaseCommandPool(); + void ParsePCILocation(const char *str, int *deviceNum, int *functionNum); + int ValueOfHexDigit(char c); +}; + +#endif /* ! _IOKIT_IOUSBCONTROLLER_H */ + diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerListElement.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerListElement.h.svn-base new file mode 100644 index 0000000..7351177 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerListElement.h.svn-base @@ -0,0 +1,126 @@ +/* + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1998-2007 Apple Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOUSBCONTROLLERLISTELEMENT_H +#define _IOUSBCONTROLLERLISTELEMENT_H + + +#include <libkern/c++/OSObject.h> + +#include <IOKit/IOTypes.h> + +#include <IOKit/usb/USB.h> + + +/*! + @class IOUSBControllerListElement + @abstract Used by the IOUSBController to manage the USB controller lists that are common between EHCI and UHCI. + */ +class IOUSBControllerListElement : public OSObject +{ + OSDeclareDefaultStructors(IOUSBControllerListElement) + +private: + +public: + + virtual void SetPhysicalLink(IOPhysicalAddress next) = 0; + virtual IOPhysicalAddress GetPhysicalLink(void) = 0; + virtual IOPhysicalAddress GetPhysicalAddrWithType(void) = 0; + virtual void print(int level); + + IOPhysicalAddress _sharedPhysical; // phys address of the memory shared with the controller + void * _sharedLogical; // logical address of the above + IOUSBControllerListElement *_logicalNext; // the next element in the list + +}; + + +class IOUSBControllerV2; // needed for a parameter +class IOUSBControllerIsochEndpoint; + +class IOUSBControllerIsochListElement : public IOUSBControllerListElement +{ + OSDeclareDefaultStructors(IOUSBControllerIsochListElement) + +private: + +public: + + virtual void SetPhysicalLink(IOPhysicalAddress next) = 0; + virtual IOPhysicalAddress GetPhysicalLink(void) = 0; + virtual IOPhysicalAddress GetPhysicalAddrWithType(void) = 0; + virtual void print(int level); + + IOUSBControllerIsochEndpoint *_pEndpoint; + IOUSBIsocFrame *_pFrames; + IOUSBIsocCompletion _completion; + Boolean _lowLatency; + bool _requestFromRosettaClient; // True if the request originated from a Rosetta client in user space + UInt8 _framesInTD; // used for HS Isoch only + UInt64 _frameNumber; // frame number for scheduling purposes + UInt32 _frameIndex; // index into the myFrames array + IOUSBControllerIsochListElement *_doneQueueLink; // linkage used by done queue processing + + // pure virtual methods which must be implemented by descendants + virtual IOReturn UpdateFrameList(AbsoluteTime timeStamp) = 0; + virtual IOReturn Deallocate(IOUSBControllerV2 *uim) = 0; +}; + +class IOUSBControllerIsochEndpoint : public OSObject +{ + OSDeclareDefaultStructors(IOUSBControllerIsochEndpoint) + +public: + + virtual bool init(); + + IOUSBControllerIsochEndpoint *nextEP; + IOUSBControllerIsochListElement *toDoList; // ITD or SITD + IOUSBControllerIsochListElement *toDoEnd; // ITD or SITD + IOUSBControllerIsochListElement *doneQueue; // ITD or SITD + IOUSBControllerIsochListElement *doneEnd; // ITD or SITD + IOUSBControllerIsochListElement *deferredQueue; // ITD or SITD + IOUSBControllerIsochListElement *deferredEnd; // ITD or SITD + UInt64 firstAvailableFrame; // next frame available for a transfer on this EP + UInt32 maxPacketSize; + UInt32 activeTDs; // + when added to todo list, - when taken from done queue + UInt32 onToDoList; // + when added to todo list, - when taken from done queue + UInt32 onDoneQueue; // + when added to todo list, - when taken from done queue + volatile SInt32 scheduledTDs; // + when linked onto periodic list, - when unlinked + UInt32 deferredTDs; + UInt32 onProducerQ; + UInt32 onReversedList; + UInt16 inSlot; // where Isoc TDs are being put in the periodic list + short functionAddress; + short endpointNumber; + IOReturn accumulatedStatus; + UInt32 interval; // this is the decoded interval value for HS endpoints and is 1 for FS endpoints + UInt8 direction; + bool aborting; +}; + + +#endif + diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerV2.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerV2.h.svn-base new file mode 100644 index 0000000..4d2c306 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerV2.h.svn-base @@ -0,0 +1,374 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.2 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBCONTROLLERV2_H +#define _IOKIT_IOUSBCONTROLLERV2_H + +#include <IOKit/IODMACommand.h> + +#include <IOKit/usb/IOUSBControllerListElement.h> +#include <IOKit/usb/IOUSBController.h> + +enum +{ + kUSBHSHubCommandAddHub = 1, + kUSBHSHubCommandRemoveHub = 2, + + kUSBHSHubFlagsMultiTT = 1 +}; + + +/*! + @class IOUSBControllerV2 + @abstract subclass of the IOUSBController to provide support for high speed + devices and split transactions. + @discussion The IOUSBController class provide sufficient functionality to + work with full (12Mb/s) and low (1.5Mb/s) devices. IOUSBControllerV2 + introduces the support for high (480Mb/s) speed devices from the + USB 2.0 spec. In particular IOUSBControllerV2 indicates the high + speed hub a full or low speed device is attached to so that split + transactions can be directed to the hub at high speed to be forwarded + to the full or low speed device by the hub. + It also gives support for bulk endoints of greater than 256 bytes. +*/ + +class IOUSBControllerV2 : public IOUSBController +{ + OSDeclareAbstractStructors(IOUSBControllerV2) + +protected: + + // These for keeping track of high speed ancestor to allow controller to do splits. + // + UInt8 _highSpeedHub[128]; + UInt8 _highSpeedPort[128]; + + struct V2ExpansionData { + UInt8 _multiTT[128]; + IOUSBCommand *ClearTTCommand; + IOUSBControllerIsochEndpoint *_isochEPList; // linked list of active Isoch "endpoints" + IOUSBControllerIsochEndpoint *_freeIsochEPList; // linked list of freed Isoch EP data structures + thread_call_t _returnIsochDoneQueueThread; + }; + V2ExpansionData *_v2ExpansionData; + + // Super's expansion data + #define _freeUSBCommandPool _expansionData->freeUSBCommandPool + #define _freeUSBIsocCommandPool _expansionData->freeUSBIsocCommandPool + #define _watchdogUSBTimer _expansionData->watchdogUSBTimer + #define _controllerTerminating _expansionData->_terminating + #define _watchdogTimerActive _expansionData->_watchdogTimerActive + #define _busNumber _expansionData->_busNumber + #define _currentSizeOfCommandPool _expansionData->_currentSizeOfCommandPool + #define _currentSizeOfIsocCommandPool _expansionData->_currentSizeOfIsocCommandPool + #define _controllerSpeed _expansionData->_controllerSpeed + #define _activeIsochTransfers _expansionData->_activeIsochTransfers + + // this class's expansion data + #define _isochEPList _v2ExpansionData->_isochEPList + #define _freeIsochEPList _v2ExpansionData->_freeIsochEPList + #define _returnIsochDoneQueueThread _v2ExpansionData->_returnIsochDoneQueueThread + + virtual bool init( OSDictionary * propTable ); + virtual bool start( IOService * provider ); + virtual void free(); + + static IOReturn DoCreateEP(OSObject *owner, + void *arg0, void *arg1, + void *arg2, void *arg3); + + static void clearTTHandler( + OSObject * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining ); + +public: + + /*! + @function openPipe + Open a pipe to the specified device endpoint + @param address Address of the device on the USB bus + @param speed of the device: kUSBDeviceSpeedLow, kUSBDeviceSpeedFull or kUSBDeviceSpeedHigh + @param endpoint description of endpoint to connect to + */ + virtual IOReturn OpenPipe( USBDeviceAddress address, + UInt8 speed, + Endpoint * endpoint ); + + /*! + @function CreateDevice + @abstract Create a new device as IOUSBController, making a note of the + high speed hub device ID and port number the full/low speed + device is attached to. + @param newDevice new device object to work with + @param deviceAddress USB device ID + @param maxPacketSize max packet size of endpoint zero + @param speed speed of the device kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh + @param powerAvailable power available to the device + @param hub USB ID of hub the device is immediatly attached to. (Not necessarily high speed) + @param port port number of port the device is attached to. +*/ + virtual IOReturn CreateDevice( IOUSBDevice *newDevice, + USBDeviceAddress deviceAddress, + UInt8 maxPacketSize, + UInt8 speed, + UInt32 powerAvailable, + USBDeviceAddress hub, + int port); + +/*! + @function ConfigureDeviceZero + @abstract configure pipe zero of device zero, as IOUSBController, but also keeping + note of high speed hub device is attached to. + @param maxPacketSize max packet size for the pipe + @param speed speed of the device kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh + @param hub USB ID of hub the device is immediatly attached to. (Not necessarily high speed) + @param port port number of port the device is attached to. +*/ + virtual IOReturn ConfigureDeviceZero(UInt8 maxPacketSize, UInt8 speed, USBDeviceAddress hub, int port); + +/*! + @function UIMCreateControlEndpoint + @abstract Create an endpoint in the controller to do control transactions. + @param functionNumber USB device ID of device + @param endpointNumber endpoint address of the endpoint in the device + @param maxPacketSize maximum packet size of this endpoint + @param speed speed of the device kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh + @param highSpeedHub If speed is not kUSBDeviceSpeedHigh, the address of the high speed hub to + address split transactions to. + @param highSpeedPort If speed is not kUSBDeviceSpeedHigh, the hub port to address split transactions to +*/ + virtual IOReturn UIMCreateControlEndpoint( + UInt8 functionNumber, + UInt8 endpointNumber, + UInt16 maxPacketSize, + UInt8 speed, + USBDeviceAddress highSpeedHub, + int highSpeedPort) = 0; + +/*! + @function UIMCreateBulkEndpoint + @abstract Create an endpoint in the controller to do bulk transactions. + @param functionNumber USB device ID of device + @param endpointNumber endpoint address of the endpoint in the device + @param direction Direction of data flow. kUSBIn or kUSBOut + @param maxPacketSize maximum packet size of this endpoint + @param speed speed of the device kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh + @param highSpeedHub If speed is not kUSBDeviceSpeedHigh, the address of the high speed hub to + address split transactions to. + @param highSpeedPort If speed is not kUSBDeviceSpeedHigh, the hub port to address split transactions to +*/ + virtual IOReturn UIMCreateBulkEndpoint( + UInt8 functionNumber, + UInt8 endpointNumber, + UInt8 direction, + UInt8 speed, + UInt16 maxPacketSize, + USBDeviceAddress highSpeedHub, + int highSpeedPort) = 0; + +/*! + @function UIMCreateInterruptEndpoint + @abstract Create an endpoint in the controller to do interrupt transactions. + @param functionAddress USB device ID of device + @param endpointNumber endpoint address of the endpoint in the device + @param direction Direction of data flow. kUSBIn or kUSBOut + @param speed speed of the device kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh + @param maxPacketSize maximum packet size of this endpoint + @param pollingRate The maximum polling interval from the endpoint descriptor. + @param highSpeedHub If speed is not kUSBDeviceSpeedHigh, the address of the high speed hub to + address split transactions to. + @param highSpeedPort If speed is not kUSBDeviceSpeedHigh, the hub port to address split transactions to +*/ + virtual IOReturn UIMCreateInterruptEndpoint( + short functionAddress, + short endpointNumber, + UInt8 direction, + short speed, + UInt16 maxPacketSize, + short pollingRate, + USBDeviceAddress highSpeedHub, + int highSpeedPort) = 0; + +/*! + @function UIMCreateIsochEndpoint + @abstract Create an endpoint in the controller to do Isochronous transactions. + @param functionAddress USB device ID of device + @param endpointNumber endpoint address of the endpoint in the device + @param maxPacketSize maximum packet size of this endpoint + @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. + @param highSpeedHub If non zero, this is a full speed device, the address of the high speed hub to + address split transactions to. + @param highSpeedPort If highSpeedHub is non zero, the hub port to address split transactions to +*/ + virtual IOReturn UIMCreateIsochEndpoint( + short functionAddress, + short endpointNumber, + UInt32 maxPacketSize, + UInt8 direction, + USBDeviceAddress highSpeedHub, + int highSpeedPort) = 0; + + + static void ReturnIsochDoneQueueEntry(OSObject *target, thread_call_param_t endpointPtr); + + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 0); + virtual IOReturn AddHSHub(USBDeviceAddress highSpeedHub, UInt32 flags); + + static IOReturn DOHSHubMaintenance(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 1); + virtual IOReturn UIMHubMaintenance(USBDeviceAddress highSpeedHub, UInt32 highSpeedPort, UInt32 command, UInt32 flags); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 2); + virtual IOReturn RemoveHSHub(USBDeviceAddress highSpeedHub); + + static IOReturn DOSetTestMode(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 3); + virtual IOReturn SetTestMode(UInt32 mode, UInt32 port); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 4); + virtual IOReturn UIMSetTestMode(UInt32 mode, UInt32 port); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 5); + virtual UInt64 GetMicroFrameNumber( void ); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 6); + virtual void ClearTT(USBDeviceAddress addr, UInt8 endpt, Boolean IN); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 7); + /*! + @function Read + Read from an interrupt or bulk endpoint + @param buffer place to put the transferred data + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been filled + @param noDataTimeout number of milliseconds of no data movement before the request is aborted + @param completionTimeout number of milliseonds after the command is on the bus in which it must complete + @param reqCount number of bytes requested for the transfer (must not be greater than the length of the buffer) + */ + virtual IOReturn ReadV2( IOMemoryDescriptor * buffer, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBCompletionWithTimeStamp * completion, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOByteCount reqCount ); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 8); +/*! + @function UIMCreateIsochEndpoint + @abstract Create an endpoint in the controller to do Isochronous transactions. + @param functionAddress USB device ID of device + @param endpointNumber endpoint address of the endpoint in the device + @param maxPacketSize maximum packet size of this endpoint + @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. + @param highSpeedHub If non zero, this is a full speed device, the address of the high speed hub to + address split transactions to. + @param highSpeedPort If highSpeedHub is non zero, the hub port to address split transactions to + @param interval The encoded interval value from the endpoint descriptor +*/ + virtual IOReturn UIMCreateIsochEndpoint( short functionAddress, + short endpointNumber, + UInt32 maxPacketSize, + UInt8 direction, + USBDeviceAddress highSpeedHub, + int highSpeedPort, + UInt8 interval); + + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 9); + virtual IOUSBControllerIsochEndpoint* AllocateIsochEP(void); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 10); + virtual IOReturn DeallocateIsochEP(IOUSBControllerIsochEndpoint *pEP); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 11); + virtual IOUSBControllerIsochEndpoint* FindIsochronousEndpoint(short functionNumber, short endpointNumber, short direction, IOUSBControllerIsochEndpoint* *pEDBack); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 12); + virtual IOUSBControllerIsochEndpoint* CreateIsochronousEndpoint(short functionNumber, short endpointNumber, short direction); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 13); + virtual void PutTDonToDoList(IOUSBControllerIsochEndpoint* pED, IOUSBControllerIsochListElement *pTD); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 14); + virtual IOUSBControllerIsochListElement *GetTDfromToDoList(IOUSBControllerIsochEndpoint* pED); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 15); + virtual void PutTDonDeferredQueue(IOUSBControllerIsochEndpoint* pED, IOUSBControllerIsochListElement *pTD); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 16); + virtual IOUSBControllerIsochListElement *GetTDfromDeferredQueue(IOUSBControllerIsochEndpoint* pED); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 17); + virtual void PutTDonDoneQueue(IOUSBControllerIsochEndpoint* pED, IOUSBControllerIsochListElement *pTD, bool checkDeferred); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 18); + virtual IOUSBControllerIsochListElement *GetTDfromDoneQueue(IOUSBControllerIsochEndpoint* pED); + + // 7185026 - this is to make this call from behind the gate + static IOReturn GatedGetTDfromDoneQueue(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 19); + virtual void ReturnIsochDoneQueue(IOUSBControllerIsochEndpoint*); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 20); + virtual IODMACommand *GetNewDMACommand(); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 21); + /*! + @function GetLowLatencyOptionsAndPhysicalMask + @abstract Low Latency transfers require that the client have access to the memory after the Isochronous I/O request has already been scheduled. This might be used, for example to fill in outgoing data "just in time." Some controllers, however, may have requirements which need to be followed in order to make sure that the memory buffer isn't moved after the call is made. This call will return an IOOptionBits and mach_vm_address_t which can be used in a call to IOBufferMemoryDescriptor::inTaskWithPhysicalMask which will help meet these requirements. + @param optionBits Pointer to an an IOOptionBits. The only bit which may be returned is kIOMemoryPhysicallyContiguous. Other bits, e.g. direction bits, must be ORd in by the client as needed. This call replaces the old property based method of obtaining this information. + @param physicalMask Pointer to a mach_vm_address_t which should be used in the call to IOBufferMemoryDescriptor::inTaskWithPhysicalMask and will guarantee that when the memory is wired down it will be accessible by both the client and the USB controller at the same time. + @result returns kIOReturnSuccess if the method is implemented by the controller, otherwise kIOReturnUnsupported + */ + virtual IOReturn GetLowLatencyOptionsAndPhysicalMask(IOOptionBits *optionBits, mach_vm_address_t *physicalMask); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 22); + /*! + @function GetFrameNumberWithTime + @abstract Real Time A/V applications send and receive Iscohronous data scheduled on certain USB frame numbers. The clock for these frame numbers is independent of the system clock, and drivers need to synchronize these two clocks. This routine will return a system time which corresponds to the beginning of a USB frame number. It is not necessarily the currrent frame, but it will be a frame in the recent past (within the past minute). The jitter between the start of the USB frame and the system time will be as low as possible, but due to hardware interrupt latencies could be as high as 200 microseconds. + @param frameNumber A pointer to a UInt64 in which to hold the USB frame number corresponding to the given system time. + @param theTime A pointer to an AbsoluteTime corresponding to the system time at the beginning of the given USB frame number. + @result returns kIOReturnSuccess if the method is implemented by the controller, otherwise kIOReturnUnsupported + */ + virtual IOReturn GetFrameNumberWithTime(UInt64* frameNumber, AbsoluteTime *theTime); + + + OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 23); + OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 24); + OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 25); + OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 26); + OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 27); + OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 28); + OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 29); + +}; + + +#endif /* ! _IOKIT_IOUSBCONTROLLERV2_H */ diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerV3.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerV3.h.svn-base new file mode 100644 index 0000000..22da915 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerV3.h.svn-base @@ -0,0 +1,233 @@ +/* +* Copyright (c) 2007-2008 Apple Inc. All rights reserved. +* +* @APPLE_LICENSE_HEADER_START@ +* +* The contents of this file constitute Original Code as defined in and +* are subject to the Apple Public Source License Version 1.2 (the +* "License"). You may not use this file except in compliance with the +* License. Please obtain a copy of the License at +* http://www.apple.com/publicsource and read it before using this file. +* +* This Original Code and all software distributed under the License are +* distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER +* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, +* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. +* Please see the License for the specific language governing rights and +* limitations under the License. +* +* @APPLE_LICENSE_HEADER_END@ +*/ + +#ifndef _IOKIT_IOUSBCONTROLLERV3_H +#define _IOKIT_IOUSBCONTROLLERV3_H + +#include <IOKit/pci/IOPCIDevice.h> + +#include <IOKit/usb/IOUSBControllerV2.h> +#include <IOKit/usb/IOUSBHubDevice.h> + +// Constants that define the different power states in the setPowerState call +enum +{ + kUSBPowerStateOff = 0, // controller is reset, nothing is attached + kUSBPowerStateRestart = 1, // same as OFF + kUSBPowerStateSleep = 2, // controller is suspended, preparing to lose main power + kUSBPowerStateLowPower = 3, // controller is suspended, power remains on + kUSBPowerStateOn = 4, // up and running + kUSBNumberBusPowerStates = 5 +}; + +#define kUSBPowerStateStable -1 + +enum +{ + kUSBBusStateReset = 0, // bus is in RESET + kUSBBusStateSuspended = 1, // bus is in SUSPEND mode + kUSBBusStateRunning = 2 // bus is operational +}; + + +// Root Hub things +typedef struct IOUSBRootHubInterruptTransaction +{ + IOMemoryDescriptor * buf; + UInt32 bufLen; + IOUSBCompletion completion; +} IOUSBRootHubInterruptTransaction; + +enum +{ + kIOUSBMaxRootHubTransactions = 2 +}; + + + +/*! + @class IOUSBControllerV3 + @abstract subclass of the IOUSBControllerV2 to provide support for new USB Power Management techniques. + @discussion With Leopard, we are providing more information to USB Device Drivers in the IOPower + tree to allow for more efficient Power Management. This controller class encapulates many of the changes + needed for that, without disturbing third party subclasses of IOUSBController or IOUSBControllerV2 + */ + +class IOUSBControllerV3 : public IOUSBControllerV2 +{ + OSDeclareAbstractStructors(IOUSBControllerV3) + + protected: + // static variable shared by all instances + static uint32_t * _gHibernateState; + + + UInt8 _myBusState; // kUSBBusStateReset, kUSBBusStateSuspended, kUSBBusStateRunning + bool _wakingFromHibernation; // True while the Hibernation Wake thread is active + bool _needToAckPowerDown; // True while we are changing power state due to shutdown/restart + bool _onCardBus; // OBSOLETE + bool _controllerAvailable; // true if we can talk to the controller + SInt32 _powerStateChangingTo; // a power state that we are in the process of changing to, or -1 if we are stable + bool _poweringDown; // true is the controller is powering down because of a systemWillPowerDown message + bool _restarting; // true is the controller is restarting because of a systemWillPowerDown message + unsigned long _myPowerState; // my current state (since getPowerState doesn't always change in time) + IOUSBControllerV3 *_ehciController; // set if I am a companion controller + unsigned long _numPowerStates; // how many power states do I support (defaults to kUSBNumDefaultPowerStates) + IOPMPowerState *_myPowerStates; // my power state array (allocated on the fly) + IOPCIDevice *_device; // my PCI device + + // root hub support + IOTimerEventSource *_rootHubTimer; // timer which fires at the rate of the root hub interrupt endpoint + UInt8 _rootHubPollingRate; // Obsolete -- we need to have it be a uint32_t + UInt8 _rootHubNumPorts; // number of root hub ports - should be 15 or fewer! + UInt16 _rootHubStatusChangedBitmap; // support up to 15 ports for status changes + bool _rootHubTimerActive; // UNUSED + IOUSBRootHubInterruptTransaction _outstandingRHTrans[4]; // Transactions for the Root Hub. We need 2, one for the current transaction and one for the next. This is declared as 4 for binary compatibility + + struct V3ExpansionData { + uint32_t _rootHubPollingRate32; + bool _rootHubTransactionWasAborted; + }; + V3ExpansionData *_v3ExpansionData; + + // IOKit methods + virtual bool init( OSDictionary * propTable ); + virtual bool start( IOService * provider ); + virtual void stop( IOService * provider ); + virtual unsigned long maxCapabilityForDomainState ( IOPMPowerFlags domainState ); + virtual unsigned long initialPowerStateForDomainState ( IOPMPowerFlags domainState ); + virtual IOReturn powerStateWillChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); + virtual IOReturn setPowerState( unsigned long powerStateOrdinal, IOService* whatDevice ); + virtual IOReturn powerStateDidChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); + virtual void powerChangeDone ( unsigned long fromState); + virtual void systemWillShutdown( IOOptionBits specifier ); + virtual void free(void); + + // IOUSBController methods + // we override these to deal with methods attempting to go through the workloop while we are in sleep + virtual IOReturn AcquireDeviceZero( void ); + virtual void ReleaseDeviceZero( void ); + virtual IOReturn DeviceRequest(IOUSBDevRequest *request, IOUSBCompletion *completion, USBDeviceAddress address, UInt8 epNum, UInt32 noDataTimeout, UInt32 completionTimeout); + virtual IOReturn DeviceRequest(IOUSBDevRequestDesc *request, IOUSBCompletion *completion, USBDeviceAddress address, UInt8 epNum, UInt32 noDataTimeout, UInt32 completionTimeout); + virtual IOReturn ClosePipe(USBDeviceAddress address, Endpoint *endpoint); + virtual IOReturn AbortPipe(USBDeviceAddress address, Endpoint *endpoint); + virtual IOReturn ResetPipe(USBDeviceAddress address, Endpoint *endpoint); + virtual IOReturn ClearPipeStall(USBDeviceAddress address, Endpoint *endpoint); + virtual IOReturn Read(IOMemoryDescriptor *buffer, USBDeviceAddress address, Endpoint *endpoint, IOUSBCompletion *completion, UInt32 noDataTimeout, UInt32 completionTimeout, IOByteCount reqCount); + virtual IOReturn Write(IOMemoryDescriptor *buffer, USBDeviceAddress address, Endpoint *endpoint, IOUSBCompletion *completion, UInt32 noDataTimeout, UInt32 completionTimeout, IOByteCount reqCount); + virtual IOReturn IsocIO(IOMemoryDescriptor *buffer, UInt64 frameStart, UInt32 numFrames, IOUSBIsocFrame *frameList, USBDeviceAddress address, Endpoint *endpoint, IOUSBIsocCompletion *completion ); + virtual IOReturn IsocIO(IOMemoryDescriptor *buffer, UInt64 frameStart, UInt32 numFrames, IOUSBLowLatencyIsocFrame *frameList, USBDeviceAddress address, Endpoint *endpoint, IOUSBLowLatencyIsocCompletion *completion, UInt32 updateFrequency ); + + // IOUSBControllerV2 methods + // we override these to deal with methods attempting to go through the workloop while we are in sleep + virtual IOReturn OpenPipe(USBDeviceAddress address, UInt8 speed, Endpoint *endpoint); + virtual IOReturn AddHSHub(USBDeviceAddress highSpeedHub, UInt32 flags); + virtual IOReturn RemoveHSHub(USBDeviceAddress highSpeedHub); + virtual IOReturn SetTestMode(UInt32 mode, UInt32 port); + virtual IOReturn ReadV2(IOMemoryDescriptor *buffer, USBDeviceAddress address, Endpoint *endpoint, IOUSBCompletionWithTimeStamp *completion, UInt32 noDataTimeout, UInt32 completionTimeout, IOByteCount reqCount); + + // IOUSBControllerV3 methods + + // these are called through the workloop + static IOReturn DoEnableAddressEndpoints(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3 ); + static IOReturn DoEnableAllEndpoints(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3 ); + static IOReturn GatedPowerChange(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3 ); + + // also on the workloop + static void RootHubTimerFired(OSObject *owner, IOTimerEventSource *sender); + + // subclassable methods + virtual IOReturn CheckForEHCIController(IOService *provider); + virtual IOReturn AllocatePowerStateArray(void); + virtual IOReturn InitForPM(void); + virtual IOReturn CheckPowerModeBeforeGatedCall(char *fromStr); + virtual IOReturn EnableAllEndpoints(bool enable); + virtual IOReturn EnableBusMastering(bool enable); + virtual IOReturn EnsureUsability(void); + virtual IOReturn CheckForRootHubChanges(void); + virtual IOReturn RootHubQueueInterruptRead(IOMemoryDescriptor *buf, UInt32 bufLen, IOUSBCompletion completion); + virtual IOReturn RootHubAbortInterruptRead(void); + virtual IOReturn RootHubStartTimer(UInt8 pollingRate); // Obsolete see RootHubStartTimer32 + virtual IOReturn RootHubStopTimer(void); + + // these methods have a default implementation using some of the virtual methods below + virtual void ControllerOff(void); + virtual void ControllerRestart(void); + virtual void ControllerSleep(void); + virtual void ControllerDoze(void); + virtual void ControllerOn(void); + + // these methods are pure virtual, and need to be implemented in the subclass driver + virtual IOReturn ResetControllerState(void) = 0; + virtual IOReturn RestartControllerFromReset(void) = 0; + virtual IOReturn SaveControllerStateForSleep(void) = 0; + virtual IOReturn RestoreControllerStateFromSleep(void) = 0; + virtual IOReturn DozeController(void) = 0; + virtual IOReturn WakeControllerFromDoze(void) = 0; + virtual IOReturn UIMEnableAddressEndpoints(USBDeviceAddress address, bool enable) = 0; + virtual IOReturn UIMEnableAllEndpoints(bool enable) = 0; + virtual IOReturn EnableInterruptsFromController(bool enable) = 0; + + public: + + // public methods + virtual IOReturn EnableAddressEndpoints(USBDeviceAddress address, bool enable); + virtual bool IsControllerAvailable(void); + virtual IOReturn HandlePowerChange(unsigned long powerStateOrdinal); + virtual UInt32 AllocateExtraRootHubPortPower(UInt32 extraPowerRequested); + virtual void ReturnExtraRootHubPortPower(UInt32 extraPowerReturned); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV3, 0); + virtual IOReturn RootHubStartTimer32(uint32_t pollingRate); + + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 1); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 2); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 3); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 4); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 5); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 6); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 7); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 8); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 9); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 10); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 11); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 12); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 13); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 14); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 15); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 16); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 17); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 18); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 19); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 20); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 21); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 22); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 23); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 24); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 25); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 26); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 27); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 28); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 29); +}; + +#endif // _IOKIT_IOUSBCONTROLLERV3_H \ No newline at end of file diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBDevice.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBDevice.h.svn-base new file mode 100644 index 0000000..58d73a0 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBDevice.h.svn-base @@ -0,0 +1,639 @@ +/* + * Copyright (c) 1998-2007 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.2 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __OPEN_SOURCE__ +/* + * + * $Log: IOUSBDevice.h,v $ + * Revision 1.65 2009/10/18 20:20:37 nano + * Bring in fixes in 390.4.0 QL: 7310698 7301024 7307079 and 7310698 + * + * Revision 1.64.32.4 2009/10/15 21:17:43 nano + * If OverrideAtLocationID does not see a override property, return true + * + * Revision 1.64.32.3.2.1 2009/10/15 21:36:27 nano + * If OverrideAtLocationID does not see a override property, return true + * + * Revision 1.64.32.3 2009/10/14 19:16:15 nano + * Minor name changes + * + * Revision 1.64.32.2 2009/10/14 19:05:21 nano + * 7284477 7293893 Simplify scheme to decide whether we want to override a property for a hub at a particular ID for a particular MacModel. Added a IOUSBDevice API that tells us if we are in the right model and locationID to override a property + * + * Revision 1.64.32.1 2009/10/08 19:55:56 nano + * rdar://7284477 Allow us to overide the config descriptor of a 2514 hub on a K23F + * + * Revision 1.64 2009/09/08 12:28:45 nano + * <rdar://problem/7195788> IOUSBDevice headerdoc comment problem - GetNumConfigs name is wrong, should be GetNumConfigurations + * + * Revision 1.63 2009/05/07 19:43:09 nano + * Move our SnowLeopard branch to TOT + * + * Revision 1.57.84.6 2009/03/13 22:45:11 nano + * Bring in branches to fix 6676089 6675858 6567987 6490273 + * + * Revision 1.57.84.5.4.1 2009/03/11 20:01:56 nano + * rdar://6567987 Do not let a Reset or a ReEnumerate through while the other is executing. + * + * Revision 1.57.84.5 2009/02/26 13:44:32 nano + * Bring in rdar://6536090&6586312 to SL branch + * + * Revision 1.57.84.4.10.1 2009/02/25 00:51:06 rhoads + * change the mechanism of getConfigLock so as to prevent a deadlock + * + * Revision 1.57.84.4 2009/02/13 15:57:33 rhoads + * roll in rdars: 6213394, 6489431, 6513000, 6515115, 6535200, 6567783 + * + * Revision 1.57.84.3.48.3 2009/02/11 19:19:08 rhoads + * add back an expansionData variable to preserve binary compatibility + * + * Revision 1.57.84.3.48.2 2009/02/11 03:05:56 arulchan + * more ::SuspendDevice changes + * + * Revision 1.57.84.3.48.1 2009/01/23 21:34:15 arulchan + * fix for rdar://6213394 + * + * Revision 1.57.84.3 2008/06/16 21:31:16 nano + * Bring in changes from Foxhound 320.2.17 + * + * Revision 1.57.84.2 2008/04/22 22:38:01 nano + * Bring in changes from Foxhound-320.2.9 + * + * Revision 1.60.28.2 2008/05/22 17:36:18 nano + * Fix the reporting of the internal bit for GetDeviceInformation + * + * Revision 1.60.28.1 2008/05/21 17:51:43 nano + * <rdar://problem/5952635> GetDeviceInformation needs some fixes + * + * Revision 1.60 2008/04/18 22:03:28 nano + * Bring in fix for rdar://5874560 + * + * Revision 1.59.4.1 2008/04/18 21:55:55 nano + * <rdar://problem/5874560> Need API to know how much extra power has been allocated + * + * Revision 1.59 2008/04/17 16:56:57 nano + * Bring in branches for rdar://5867990 & rdar://5768343 + * + * Revision 1.58.4.1 2008/04/16 20:26:13 nano + * <rdar://problem/5867990> Add API to allocate sleep current, as well as making sure that we return any extra power if our client dies or our device is terminated without returning it + * + * Revision 1.58 2008/04/14 16:08:38 nano + * Add new APIs for high power and for GetDeviceInformation. + * + * Revision 1.57.126.2 2008/04/13 05:25:40 nano + * Call into PolicyMaker for the GetPortInformation + * + * Revision 1.57.126.1 2008/04/11 22:25:44 nano + * Initial work on new user-client APIs and new IOUSBDevice APIs to return port state information and manage extra power requests, as well as groundwork for calling the policy maker directly from the IOUSBDevice + * + * Revision 1.57 2007/08/07 20:30:36 rhoads + * rolled in a few branches to TOT + * + * Revision 1.56.92.1 2007/08/07 03:43:34 nano + * Bring in more changes for M89 suppport -- like actually use the dang power if the properties are available + * + * Revision 1.56 2007/03/06 12:23:41 rhoads + * roll in 5024412, 5035829, and 5039670 + * + * Revision 1.55.30.1 2007/02/27 16:08:33 rhoads + * some fine tuning of our IOService overrides, including not overriding willTerminate and didTerminate (5024412) + * + * Revision 1.55 2007/01/19 17:58:48 rhoads + * roll in branches for a leopard build + * + * Revision 1.54.30.1 2007/01/17 16:37:02 rhoads + * remove the IOUSBDevice::attach method which is not really useful + * + * Revision 1.54 2006/10/06 04:42:01 rhoads + * roll in branches 4727961, 4758404, 4759810, 4760274, and 4762769 + * + * Revision 1.53.4.1 2006/10/04 16:03:57 rhoads + * better IOUSBHubDevice design + * + */ +#endif + +#ifndef _IOKIT_IOUSBDEVICE_H +#define _IOKIT_IOUSBDEVICE_H + +#include <IOKit/usb/IOUSBNub.h> +#include <IOKit/usb/IOUSBPipe.h> +#include <IOKit/IOBufferMemoryDescriptor.h> +#include <IOKit/IOWorkLoop.h> +#include <IOKit/IOCommandGate.h> + +#include <kern/thread_call.h> + +// The following are definitions for errata properties needed for different devices. This +// should be but in the dictionary of the IOUSBDevice in question. This can be achieved +// by using the AppleUSBMergeNub class and having an IOProviderMergeProperties dictionary +// with the required properties. + +// This property allows a device to specify a configuration value of 0 in its configuration +// descriptor. This does not follow the spec, but we will allow it in order to get the device +// to work. The property should be a Boolean +// +#define kAllowConfigValueOfZero "kAllowZeroConfigValue" +#define kAllowNumConfigsOfZero "kAllowZeroNumConfigs" + + +class IOUSBController; +class IOUSBControllerV2; +class IOUSBInterface; +class IOUSBHubPolicyMaker; +/*! + @class IOUSBDevice + @abstract The IOService object representing a device on the USB bus. + @discussion This class provides functionality to configure a device and to create + IOUSBInterface objects to represent the interfaces of the device. +*/ + +class IOUSBDevice : public IOUSBNub +{ + friend class IOUSBController; + friend class IOUSBControllerV2; + friend class IOUSBInterface; + friend class IOUSBPipe; + + OSDeclareDefaultStructors(IOUSBDevice) + +protected: + + USBDeviceAddress _address; + IOUSBController * _controller; + IOUSBPipe * _pipeZero; + IOUSBDeviceDescriptor _descriptor; + UInt32 _busPowerAvailable; + UInt8 _speed; + IOUSBEndpointDescriptor _endpointZero; // Fake ep for control pipe + void * _port; // Obsolete, do not use + IOBufferMemoryDescriptor** _configList; + IOUSBInterface** _interfaceList; + UInt8 _currentConfigValue; + UInt8 _numInterfaces; + + struct ExpansionData + { + UInt32 _portNumber; + thread_call_t _doPortResetThread; + IOUSBDevice * _usbPlaneParent; + bool _portResetThreadActive; + bool _allowConfigValueOfZero; + thread_call_t _doPortSuspendThread; + bool _portSuspendThreadActive; + thread_call_t _doPortReEnumerateThread; + bool _resetInProgress; + bool _portHasBeenReset; + IORecursiveLock* _XgetConfigLock; // Obsolete + bool _doneWaiting; // Obsolete + bool _notifiedWhileBooting; // Obsolete + IOWorkLoop * _workLoop; + IOTimerEventSource * _notifierHandlerTimer; + UInt32 _notificationType; + bool _suspendInProgress; + bool _portHasBeenSuspendedOrResumed; + bool _addExtraResetTime; + bool _suspendCommand; + IOCommandGate * _commandGate; + OSSet * _openInterfaces; + bool _resetCommand; + IOReturn _resetError; + IOReturn _suspendError; + thread_call_t _doMessageClientsThread; + IOUSBHubPolicyMaker * _hubPolicyMaker; + UInt32 _sleepPowerAllocated; // how much sleep power we already gave to our client + UInt32 _wakePowerAllocated; // how much extra power during wake did we already give our client + UInt32 _devicePortInfo; + bool _deviceIsInternal; // Will be set if all our upstream hubs are captive (internal to the computer) + bool _deviceIsInternalIsValid; // true if we have already determined whether the device is internal + bool _newGetConfigLock; // new lock, taken within the WL gate, when doing a GetConfig + UInt32 _resetAndReEnumerateLock; // "Lock" to prevent us from doing a reset or a re-enumerate while the other one is in progress + UInt32 _locationID; + }; + ExpansionData * _expansionData; + + const IOUSBConfigurationDescriptor *FindConfig(UInt8 configValue, UInt8 *configIndex=0); + + virtual IOUSBInterface * GetInterface(const IOUSBInterfaceDescriptor *interface); + +public: + virtual IOReturn SetFeature(UInt8 feature); + +protected: + virtual IOReturn GetConfigDescriptor(UInt8 configIndex, void *data, UInt32 len); + + virtual IOReturn GetDeviceDescriptor(IOUSBDeviceDescriptor *desc, UInt32 size); + + virtual bool init(USBDeviceAddress deviceAddress, UInt32 powerAvaiable, UInt8 speed, UInt8 maxPacketSize ); + + virtual bool matchPropertyTable(OSDictionary * table, SInt32 *score); + +public: + // IOService methods + virtual bool init( void ); + virtual bool start( IOService *provider ); + virtual bool handleIsOpen(const IOService *forClient) const; + virtual bool handleOpen(IOService *forClient, IOOptionBits options, void *arg); + virtual void handleClose(IOService *forClient, IOOptionBits options); + virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); + virtual bool terminate( IOOptionBits options = 0 ); + virtual bool requestTerminate( IOService * provider, IOOptionBits options ); + virtual void stop( IOService *provider ); + virtual bool finalize(IOOptionBits options); + virtual void free( void ); + + // IOUSBDevice methods + virtual void SetProperties(); + + static IOUSBDevice *NewDevice(void); + + virtual void SetPort(void *port); // Obsolete, do NOT use + + /*! + @function FindNextInterfaceDescriptor + return a pointer to the next interface descriptor within the given full configuration descriptor satisfying the requirements specified, or NULL if there aren't any. + @param configDescIn the configuration descriptor within which to search. obtained from GetFullConfigurationDescriptor(configIndex). use NULL to specify the current configuration's descriptor. + @param intfDesc interface descriptor from which to start the search. NULL for the first interface descriptor in the given configuration descriptor + @param request IOUSBFindInterfaceRequest specifying the desired interface. Not changed. + @param descOut pointer to placeholder for the returned descriptor ptr + @result returns kIOReturnBadArgument if configDesc is not correct, or if configDesc is NULL and the device is not configured, or if intfDesc is not in configDesc. Otherwise returns kIOReturnSuccess or kIOUSBInterfaceNotFound. + */ + virtual IOReturn FindNextInterfaceDescriptor(const IOUSBConfigurationDescriptor *configDescIn, + const IOUSBInterfaceDescriptor *intfDesc, + const IOUSBFindInterfaceRequest *request, + IOUSBInterfaceDescriptor **descOut); + /*! + @function FindNextInterface + return an pointer to an IOUSBInterface object satisfying the requirements specified in request, or NULL if there aren't any. the device + must be configured for there to be any interfaces. + @param current interface to start searching from, NULL to start at the beginning of the device's interface list for the current configuration. + @param request specifies what properties an interface must have to match. + @result Pointer to a matching IOUSBInterface, or NULL if none match. Note: The IOUSBInterface is NOT retained for the caller. If the caller wishes to continue to use the returned object, it should call retain() on that object. + */ + virtual IOUSBInterface *FindNextInterface(IOUSBInterface *current, + IOUSBFindInterfaceRequest *request); + + /*! + @function CreateInterfaceIterator + return an OSIterator to iterate through interfaces satisfying the requirements specified in request. + @param request specifies what properties an interface must have to match. + @result Pointer to an OSIterator. + */ + virtual OSIterator *CreateInterfaceIterator(IOUSBFindInterfaceRequest *request); + + // Get pointer to full config info (cached in device, don't free returned pointer) + /*! + @function GetFullConfigurationDescriptor + return a pointer to all the descriptors for the requested configuration. + @param configIndex The configuration index (not the configuration value) + @result Pointer to the descriptors, which are cached in the IOUSBDevice object. + */ + virtual const IOUSBConfigurationDescriptor *GetFullConfigurationDescriptor(UInt8 configIndex); + + /*! + @function GetConfigurationDescriptor + Copy the specified amount of data for a configuration into the suppled buffer. + @param configValue The configuration value + @param data Buffer to copy data into + @param len number of bytes to copy + */ + virtual IOReturn GetConfigurationDescriptor(UInt8 configValue, void *data, UInt32 len); + + /*! + @function ResetDevice + Reset the device, returning it to the addressed, unconfigured state. + This is useful if a device has got badly confused. Note that the AppleUSBComposite driver will automatically + reconfigure the device if it is a composite device. + */ + virtual IOReturn ResetDevice(); + + /*! + @function SetConfiguration + Do a USB SetConfiguration call to the device. The caller must have the device open() in order to + actually cause a configuration change. If the device is currently configured, all IOUSBInterface objects + associated with the device are freed. After the new configuration has been set, all of its IOUSBInterface objects are + instantiated automatically. + @param forClient The client requesting the configuration change + @param configValue The desired configuration value. + @param startInterfaceMatching A boolean specifying whether IOKit should begin the process of finding + matching drivers for the new IOUSBInterface objects. + */ + virtual IOReturn SetConfiguration(IOService *forClient, UInt8 configValue, bool startInterfaceMatching=true); + + // Access to addressing and cached info + /*! + @function GetAddress + returns the bus address of the device + */ + virtual USBDeviceAddress GetAddress(void); + + /*! + @function GetSpeed + returns the speed of the device + */ + virtual UInt8 GetSpeed(void); + /*! + @function GetBus + returns a pointer to the IOUSBController object for the device + */ + virtual IOUSBController *GetBus(void); + /*! + @function GetBusPowerAvailable + returns the power available to the device, in units of 2mA + */ + virtual UInt32 GetBusPowerAvailable( void ); + /*! + @function GetMaxPacketSize + returns the maximum packet size for endpoint zero (only 8, 16, 32, 64 are valid) + */ + virtual UInt8 GetMaxPacketSize(void); + /*! + @function GetVendorID + returns the Vendor ID of the device + */ + virtual UInt16 GetVendorID(void); + /*! + @function GetProductID + returns the Product ID of the device + */ + virtual UInt16 GetProductID(void); + /*! + @function GetDeviceRelease + returns the DeviceRelease information + */ + virtual UInt16 GetDeviceRelease(void); + /*! + @function GetNumConfigurations + returns the number of configs in the device config descriptor + */ + virtual UInt8 GetNumConfigurations(void); + /*! + @function GetManufacturerStringIndex + returns the index of string descriptor describing manufacturer + */ + virtual UInt8 GetManufacturerStringIndex(void ); + /*! + @function GetProductStringIndex + returns the index of string descriptor describing product + */ + virtual UInt8 GetProductStringIndex(void ); + /*! + @function GetSerialNumberStringIndex + returns the index of string descriptor describing the device's serial number + */ + virtual UInt8 GetSerialNumberStringIndex(void ); + /*! + @function GetPipeZero + returns a pointer to the device's default control pipe + */ + virtual IOUSBPipe * GetPipeZero(void); + + // Deprecated but needed for binary compatibility + virtual IOUSBPipe* MakePipe(const IOUSBEndpointDescriptor *ep); + + // this method is deprecated. use the other DeviceRequest methods + virtual IOReturn DeviceRequest(IOUSBDevRequest *request, + IOUSBCompletion *completion = 0); + + // Same but with a memory descriptor + virtual IOReturn DeviceRequest(IOUSBDevRequestDesc *request, + IOUSBCompletion *completion = 0); + + /*! + @function GetConfiguration + Gets the current configuration from the IOUSBDevice object. Note that this call will send a control + request on the bus to get the current configuration from the physical device. + @param configNum Pointer to place to store configuration value. + */ + virtual IOReturn GetConfiguration(UInt8 *configNumber); + + /*! + @function GetDeviceStatus + Gets the device's status. Note that this sends a control request to the physical device. + @param status Pointer to place to store the status. + */ + virtual IOReturn GetDeviceStatus(USBStatus *status); + + /*! + @function GetStringDescriptor + Get a string descriptor as ASCII, in the specified language (default is US English) + @param index Index of the string descriptor to get. + @param buf Pointer to place to store ASCII string + @param maxLen Size of buffer pointed to by buf + @param lang Language to get string in (default is US English) + */ + virtual IOReturn GetStringDescriptor(UInt8 index, char *buf, int maxLen, UInt16 lang=0x409); + + /*! + @function GetChildLocationID + Get the locationID (UInt32) given the port number and the parent's location + @param parentLocationID locationID for the hub to which this device is attached. + @param port Port number of the hub where this device is attached + */ + virtual UInt32 GetChildLocationID(UInt32 parentLocationID, int port); + + virtual const IOUSBDescriptorHeader* FindNextDescriptor(const void *cur, UInt8 descType); + + virtual void DisplayNotEnoughPowerNotice(); + + // this is a non-virtual function so that we don't have to take up a binary compatibility slot. + UInt16 GetbcdUSB(void); + UInt8 GetProtocol(void); + void SetBusPowerAvailable(UInt32 newPower); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 0); + /*! + @function DeviceRequest + @abstract execute a control request to the default control pipe (pipe zero) + @param request The parameter block to send to the device + @param noDataTimeout Specifies an amount of time (in ms) after which the command will be aborted + if no data has been transferred on the bus. + @param completionTimeout Specifies an amount of time (in ms) after which the command will be aborted if the entire command has + not been completed. + @param completion Function to call when request completes. If omitted then + DeviceRequest() executes synchronously, blocking until the request is complete. If the request is asynchronous, the client must make sure that + the IOUSBDevRequest is not released until the callback has occurred. + + */ + virtual IOReturn DeviceRequest(IOUSBDevRequest *request, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOUSBCompletion *completion = 0); + + /*! + @function DeviceRequest + @abstract execute a control request to the default control pipe (pipe zero) + @param request The parameter block to send to the device (with the pData as an IOMemoryDesriptor) + @param noDataTimeout Specifies an amount of time (in ms) after which the command will be aborted + if no data has been transferred on the bus. + @param completionTimeout Specifies an amount of time (in ms) after which the command will be aborted if the entire command has + not been completed. + @param completion Function to call when request completes. If omitted then + DeviceRequest() executes synchronously, blocking until the request is complete. If the request is asynchronous, the client must make sure that + the IOUSBDevRequest is not released until the callback has occurred. + + */ + OSMetaClassDeclareReservedUsed(IOUSBDevice, 1); + virtual IOReturn DeviceRequest(IOUSBDevRequestDesc *request, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOUSBCompletion *completion = 0); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 2); + /*! + @function SuspendDevice + @abstract Instruct the hub to which this device is attached to suspend or resume the port to which the device is attached. + Note that if there are any outstanding transactions on any pipes in the device, those transactions will get returned with a + kIOReturnNotResponding error. + @param suspend Boolean value. true = suspend, false = resume. + */ + virtual IOReturn SuspendDevice( bool suspend); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 3); + /*! + @function ReEnumerateDevice + @abstract Instruct the hub to which this device is attached to reset the port to which this device is attached. This causes the + IOUSBDevice object and any child objects (IOUSBInterface objects or driver objects) to be terminated, and the device to be + completely reenumerated, as if it had been detached and reattached. + @param options Reserved for future use. + */ + virtual IOReturn ReEnumerateDevice( UInt32 options ); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 4); + /*! + @function DisplayUserNotification + @abstract Will use the KUNCUserNotification mechanism to display a notification to the user. + @param notificationType Which notification to display. + */ + virtual void DisplayUserNotification(UInt32 notificationType); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 5); + /*! + @function MakePipe + @abstract build a pipe on a given endpoint + @param ep A description of the endpoint + @param interface The IOUSBInterface object requesting the pipe + returns the desired IOUSBPipe object + */ + virtual IOUSBPipe* MakePipe(const IOUSBEndpointDescriptor *ep, IOUSBInterface *interface); + + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 6); + /*! + @function SetHubParent + @abstract Used by the hub driver to give the nub a pointer to its HubPolicyMaker object + @param hubPolicyMaker The object representing the Hub driver + */ + virtual void SetHubParent(IOUSBHubPolicyMaker *hubParent); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 7); + /*! + @function GetHubParent + @abstract Used by the hub driver to give the nub a pointer to its HubPolicyMaker object + @param hubPolicyMaker The object representing the Hub driver + */ + virtual IOUSBHubPolicyMaker* GetHubParent(); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 8); + /*! + @function GetDeviceInformation + @abstract Returns status information about the USB device, such as whether the device is captive or whether it is in the suspended state. + @param requestedPower The desired amount of power that the client wishes to reserve + @result Actual power that was reserved + + */ + virtual IOReturn GetDeviceInformation(UInt32 *info); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 9); + /*! + @function RequestExtraPower + @abstract Clients can use this API to reserve extra power for use by this device while the machine is asleep or while it is awake. Units are milliAmps (mA). + @param type Indicates whether the power is to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake) + @param requestedPower Amount of power desired, in mA + @result Amount of power actually reserved, in mA. It can be less than the requested or zero. + + */ + virtual UInt32 RequestExtraPower(UInt32 type, UInt32 requestedPower); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 10); + /*! + @function ReturnExtraPower + @abstract Clients can use this API to tell the system that they will not use power that was previously reserved by using the RequestExtraPower API. + @param type Indicates whether the power is to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake) + @param returnedPower Amount of power that is no longer needed, in mA + @result If the returnedPower was not previously allocated, an error will be returned. This will include the case for power that was requested for sleep but was returned for wake. + + */ + virtual IOReturn ReturnExtraPower(UInt32 type, UInt32 returnedPower); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 11); + /*! + @function GetExtraPowerAllocated + @abstract Clients can use this API to ask how much extra power has already been reserved by this device. Units are milliAmps (mA). + @param type Indicates whether the allocated power was to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake) + @result Amount of power allocated, in mA. + + */ + virtual UInt32 GetExtraPowerAllocated(UInt32 type); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 12); + /*! + @function DoLocationOverrideAndModelMatch + @abstract Will look for a kOverrideIfAtLocationID array proerty with locationID entries and a "MacModel" property. If any of the locationIDs match to the Mac Model, will return true. + If there is no kOverrideAtLocationID property, it will also return true. + @result True if we have a match, false otherwise + */ + virtual bool DoLocationOverrideAndModelMatch(); + + OSMetaClassDeclareReservedUnused(IOUSBDevice, 13); + OSMetaClassDeclareReservedUnused(IOUSBDevice, 14); + OSMetaClassDeclareReservedUnused(IOUSBDevice, 15); + OSMetaClassDeclareReservedUnused(IOUSBDevice, 16); + OSMetaClassDeclareReservedUnused(IOUSBDevice, 17); + OSMetaClassDeclareReservedUnused(IOUSBDevice, 18); + OSMetaClassDeclareReservedUnused(IOUSBDevice, 19); + +private: + + static void ProcessPortResetEntry(OSObject *target); + void ProcessPortReset(void); + + void TerminateInterfaces(void); + + static void ProcessPortReEnumerateEntry(OSObject *target, thread_call_param_t options); + void ProcessPortReEnumerate(UInt32 options); + + static void DoMessageClientsEntry(OSObject *target, thread_call_param_t messageStruct); + void DoMessageClients( void * messageStructPtr); + + static void DisplayUserNotificationForDeviceEntry (OSObject *owner, IOTimerEventSource *sender); + void DisplayUserNotificationForDevice( ); + + UInt32 SimpleUnicodeToUTF8(UInt16 uChar, UInt8 utf8Bytes[4]); + void SwapUniWords (UInt16 **unicodeString, UInt32 uniSize); + + IOReturn TakeGetConfigLock(void); + IOReturn ReleaseGetConfigLock(void); + static IOReturn ChangeGetConfigLock(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); +}; + +#endif /* _IOKIT_IOUSBDEVICE_H */ diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBHIDDriver.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBHIDDriver.h.svn-base new file mode 100644 index 0000000..5e76887 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBHIDDriver.h.svn-base @@ -0,0 +1,289 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef IOUSBHIDDRIVER_H +#define IOUSBHIDDRIVER_H + +#include <IOKit/IOBufferMemoryDescriptor.h> + +#include <IOKit/hid/IOHIDDevice.h> + +#include <IOKit/usb/IOUSBBus.h> +#include <IOKit/usb/IOUSBInterface.h> +#include <IOKit/usb/USB.h> + + +#define ENABLE_HIDREPORT_LOGGING 0 + +// Report types from low level USB: +// from USBSpec.h: +// enum { +// kHIDRtInputReport = 1, +// kHIDRtOutputReport = 2, +// kHIDRtFeatureReport = 3 +// }; +// +// from IOHIDDescriptorParser.h: +// // types of HID reports (input, output, feature) +// enum +// { +// kHIDInputReport = 1, +// kHIDOutputReport, +// kHIDFeatureReport, +// kHIDUnknownReport = 255 +// }; +// +// Report types from high level HID Manager: +// from IOHIDKeys.h: +// enum IOHIDReportType +// { +// kIOHIDReportTypeInput = 0, +// kIOHIDReportTypeOutput, +// kIOHIDReportTypeFeature, +// kIOHIDReportTypeCount +// }; +// +#define HIDMGR2USBREPORTTYPE(x) (x + 1) +#define USB2HIDMGRREPORTTYPE(x) (x - 1) + + +// Note: In other Neptune files, kMaxHIDReportSize was defined as 64. But Ferg & Keithen were unable to +// find that value in the USB HID 1.1 specs. Brent had previously changed it to 256 in the OS 9 HID Driver +// to allow for reports spanning multiple packets. 256 may be no more a hard and fast limit, but it's +// working for now in OS 9. +#define kMaxHIDReportSize 256 // Max packet size = 8 for low speed & 64 for high speed. +#define kHIDDriverRetryCount 3 +#define kUSBHIDReportLoggingLevel "USB HID Report Logging Level" + + +// power states for the driver (awake or suspended) +enum +{ + kUSBHIDPowerStateOff = 0, + kUSBHIDPowerStateRestart = 1, + kUSBHIDPowerStateSleep = 2, // this could be system sleep or idle sleep + kUSBHIDPowerStateLowPower = 3, // this is idling + kUSBHIDPowerStateOn = 4, // this is fully on + kUSBHIDNumberPowerStates = 5 +}; + + +/*! + @class IOUSBHIDDriver + @abstract Driver that matches to USB HID devices. + @discussion This class can be overriden to provide for specific behaviors. + */ +class IOUSBHIDDriver : public IOHIDDevice +{ + OSDeclareDefaultStructors(IOUSBHIDDriver) + + IOUSBInterface * _interface; + IOUSBDevice * _device; + IOUSBPipe * _interruptPipe; + UInt32 _maxReportSize; + IOBufferMemoryDescriptor * _buffer; + IOUSBCompletion _completion; + UInt32 _retryCount; + thread_call_t _deviceDeadCheckThread; + thread_call_t _clearFeatureEndpointHaltThread; + bool _deviceDeadThreadActive; + bool _deviceIsDead; // Should really be called "abort expected" + bool _deviceHasBeenDisconnected; + bool _needToClose; + UInt32 _outstandingIO; + IOCommandGate * _gate; + IOUSBPipe * _interruptOutPipe; + UInt32 _locationID; + IOBufferMemoryDescriptor * _outBuffer; // Obsolete + UInt32 _deviceUsage; // Obsolete + UInt32 _deviceUsagePage; // Obsolete + + struct IOUSBHIDDriverExpansionData + { + IOWorkLoop * _workLoop; + thread_call_t _handleReportThread; + IOService * _rootDomain; + AbsoluteTime _wakeUpTime; + IOUSBCompletionWithTimeStamp _completionWithTimeStamp; + bool _checkForTimeStamp; + UInt32 _msToIgnoreTransactionsAfterWake; + IOTimerEventSource * _suspendPortTimer; + bool _portSuspended; + UInt32 _suspendTimeoutInMS; + UInt8 _interfaceNumber; + bool _logHIDReports; + UInt8 _hidLoggingLevel; + bool _needToClearPipeStall; + SInt32 _queuedReports; + AbsoluteTime _interruptTimeStamp; + bool _powerStateChanging; + unsigned long _myPowerState; + bool _pendingRead; + UInt32 _deviceDeadCheckLock; // "Lock" to prevent us from executing the device dead check while in progress + }; + IOUSBHIDDriverExpansionData *_usbHIDExpansionData; + + static void InterruptReadHandlerEntry(OSObject *target, void *param, IOReturn status, UInt32 bufferSizeRemaining); + static void InterruptReadHandlerWithTimeStampEntry(OSObject *target, void *param, IOReturn status, UInt32 bufferSizeRemaining, AbsoluteTime timeStamp); + void InterruptReadHandler(IOReturn status, UInt32 bufferSizeRemaining, AbsoluteTime timeStamp); + + static void CheckForDeadDeviceEntry(OSObject *target); + void CheckForDeadDevice(); + + static void ClearFeatureEndpointHaltEntry(OSObject *target); + void ClearFeatureEndpointHalt(void); + + static void HandleReportEntry(OSObject *target, thread_call_param_t timeStamp); + void HandleReport(AbsoluteTime timeStamp); + + virtual void processPacket(void *data, UInt32 size); // Obsolete + + static IOReturn ChangeOutstandingIO(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); + static IOReturn ClaimPendingRead(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); + + static void SuspendPortTimer(OSObject *target, IOTimerEventSource *sender); + +public: + + // IOService methods + // + virtual bool init(OSDictionary *properties); + virtual bool start(IOService * provider); + virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer ); + virtual bool willTerminate( IOService * provider, IOOptionBits options ); + virtual void stop(IOService * provider); + virtual void free(); + virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); + virtual unsigned long maxCapabilityForDomainState ( IOPMPowerFlags domainState ); + virtual IOReturn powerStateWillChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); + virtual IOReturn setPowerState ( unsigned long powerStateOrdinal, IOService* whatDevice ); + virtual IOReturn powerStateDidChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); + virtual void powerChangeDone ( unsigned long fromState); + + + // IOHIDDevice methods + // + virtual bool handleStart(IOService * provider); + virtual void handleStop(IOService * provider); + + virtual IOReturn newReportDescriptor( IOMemoryDescriptor ** descriptor ) const; + + virtual OSString * newTransportString() const; + + virtual OSNumber * newVendorIDNumber() const; + + virtual OSNumber * newProductIDNumber() const; + + virtual OSNumber * newVersionNumber() const; + + virtual OSString * newManufacturerString() const; + + virtual OSString * newProductString() const; + + virtual OSString * newSerialNumberString() const; + + virtual OSNumber * newLocationIDNumber() const; + + virtual OSNumber * newCountryCodeNumber() const; + + virtual IOReturn getReport( IOMemoryDescriptor * report, + IOHIDReportType reportType, + IOOptionBits options = 0 ); + + virtual IOReturn setReport( IOMemoryDescriptor * report, + IOHIDReportType reportType, + IOOptionBits options = 0 ); + + // HID driver methods + // + virtual OSString * newIndexedString(UInt8 index) const; + + virtual UInt32 getMaxReportSize(); + + virtual void DecrementOutstandingIO(void); + virtual void IncrementOutstandingIO(void); + virtual IOReturn StartFinalProcessing(); + virtual IOReturn SetIdleMillisecs(UInt16 msecs); + +private: + + IOReturn GetHIDDescriptor(UInt8 inDescriptorType, UInt8 inDescriptorIndex, UInt8 *vOutBuf, UInt32 *vOutSize); + IOReturn GetReport(UInt8 inReportType, UInt8 inReportID, UInt8 *vInBuf, UInt32 *vInSize); + IOReturn SetReport(UInt8 outReportType, UInt8 outReportID, UInt8 *vOutBuf, UInt32 vOutSize); + IOReturn GetIndexedString(UInt8 index, UInt8 *vOutBuf, UInt32 *vOutSize, UInt16 lang = 0x409) const; + IOReturn SetProtocol(UInt32 protocolType); + char GetHexChar(char hexChar); + IOReturn AbortAndSuspend( bool suspend ); + + + +#if ENABLE_HIDREPORT_LOGGING + void LogBufferReport(char *report, UInt32 len); + void LogMemReport(IOMemoryDescriptor * reportBuffer); + char GetHexChar(char hexChar); +#endif + +public: + OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 0); + virtual IOReturn RearmInterruptRead(); + + /*! + @function SuspendPort + @abstract Suspends the port for this device or optionally sets a timeout to suspend after a period of inactivity. + @discussion This call can be used to immediately suspend/resume a port or to enable the suspension of the port after a period of inactivity. If called with suspendPort = true (no timeout parameter), the HID driver + will immediately suspend the port, after aborting any outstanding reads on the interrupt pipe. If called with suspendPort = true and timeout != 0, it will suspend the port after the timeout number of ms have + passed without any read completions. If called with suspendPort = false, the port will be immediately resumed and the reads will be re-issued. If a timeout was enabled, it will be cancelled. + @param suspendPort Boolean value. true = suspend the port, false = resume the port. + @param timeoutMS Value in milliseconds If value is non-zero, the port will be suspended after the timeout milliseconds have passed without any read completions. + @result The IOReturn value from the IOUSBDevice::Suspend() call. + */ + OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 1); + virtual IOReturn SuspendPort(bool suspendPort, UInt32 timeoutMS = 0); + + OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 2); + virtual bool IsPortSuspended(); + + OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 3); + virtual void LogMemReport(UInt8 level, IOMemoryDescriptor * reportBuffer, IOByteCount size); + + OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 4); + virtual IOReturn InitializeUSBHIDPowerManagement(IOService *provider); + + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 5); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 6); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 7); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 8); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 9); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 10); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 11); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 12); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 13); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 14); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 15); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 16); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 17); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 18); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 19); +}; + +#endif // IOUSBHIDDRIVER_H diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBHubDevice.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBHubDevice.h.svn-base new file mode 100644 index 0000000..91c728c --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBHubDevice.h.svn-base @@ -0,0 +1,247 @@ +/* + * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __OPEN_SOURCE__ +/* + * + * $Log: IOUSBHubDevice.h,v $ + * Revision 1.11 2009/09/12 03:42:16 rhoads + * merge in the changes for the 390.3.4b QL + * + * Revision 1.10.52.1 2009/09/10 18:50:52 nano + * <rdar://problem/7134800> Task: Extra Current support for Ibex Peak RMHs -- look for a property that tells us to ask our USB plane parent for the extra current. This will allow the RMH to pass on the request to it's parent. + * + * Revision 1.10 2009/05/07 19:43:09 nano + * Move our SnowLeopard branch to TOT + * + * Revision 1.6.102.3 2008/06/16 22:02:16 nano + * Bring in changes from Foxound 320.2.19 + * + + * Revision 1.6.102.2 2008/04/22 22:38:01 nano + * Bring in changes from Foxhound-320.2.9 + * + * Revision 1.8.62.2 2008/06/06 21:08:44 nano + * Enable dynamic allocation of power for M89, so we don't reserve it if there isn't a high power device attached + * + * Revision 1.8.62.1 2008/06/06 04:14:32 nano + * Fix SleepCurrent allocation so it will work with hub devices and root hub devices as well as consolidating it across all controllers + * + * Revision 1.8 2008/04/17 16:56:57 nano + * Bring in branches for rdar://5867990 & rdar://5768343 + * + * Revision 1.7.4.1 2008/04/17 15:54:07 nano + * Merged PR-5768343 into this branch and fixed a couple of issues + * + * Revision 1.7.2.1 2008/04/16 00:48:49 ferg + * Bug #: 5768343 + * Add support for hubs with high-power downstream port capability. This is + * controlled by the properties "AAPL,current-available" and "AAPL,current-extra". + * + * Revision 1.7 2008/04/14 16:08:38 nano + * Add new APIs for high power and for GetDeviceInformation. + * + * Revision 1.6.144.1 2008/04/11 22:25:44 nano + * Initial work on new user-client APIs and new IOUSBDevice APIs to return port state information and manage extra power requests, as well as groundwork for calling the policy maker directly from the IOUSBDevice + * + * Revision 1.6 2007/08/01 16:10:18 rhoads + * roll in extra power changes + * + * Revision 1.5.118.1 2007/07/27 16:49:10 rhoads + * merge the extra current stuff into Leopard, and add extra sleep current for self powered hubs + * + * Revision 1.5 2007/01/20 00:47:01 rhoads + * roll in Hub Policy Maker changes + * + * Revision 1.4 2006/12/22 23:05:46 rhoads + * roll in branches 4364835 and 4277683-2 + * + * Revision 1.3.20.3 2007/01/15 19:58:07 rhoads + * saving more changes + * + * Revision 1.3.20.2 2007/01/09 21:55:53 rhoads + * commit some stuff to try to fix a permissions issue + * + * Revision 1.3.20.1 2006/12/18 19:13:56 rhoads + * re-integrate the old branch into TOT + * + * Revision 1.3.12.4 2006/12/18 17:33:48 rhoads + * looking good except for sleep/wake + * + * Revision 1.3.12.3 2006/12/08 05:42:40 rhoads + * mostly working + * + * Revision 1.3.12.2 2006/11/14 22:37:06 rhoads + * more changes with the root hubs + * + * Revision 1.3.12.1 2006/11/07 16:55:52 rhoads + * change to get the IOUSBHubDevice nubs into the IOPower tree + * + * Revision 1.3 2006/10/06 04:42:02 rhoads + * roll in branches 4727961, 4758404, 4759810, 4760274, and 4762769 + * + * Revision 1.2.4.2 2006/10/04 23:01:24 rhoads + * better naming + * + * Revision 1.2.4.1 2006/10/04 16:03:57 rhoads + * better IOUSBHubDevice design + * + */ +#endif + + +#ifndef _IOKIT_IOUSBHUBDEVICE_H +#define _IOKIT_IOUSBHUBDEVICE_H + +#include <IOKit/usb/IOUSBDevice.h> // our superclass + +// forward refeference. we don't include the header file because it would cause a circular reference +class IOUSBHubPolicyMaker; + +enum { + kIOUSBHubDeviceIsRootHub = 0x0001, + kIOUSBHubDeviceIsOnHighSpeedBus = 0x0002, + kIOUSBHubDeviceCanSleep = 0x0004 +}; + +/*! + @class IOUSBHubDevice + @abstract New in MAC OS X 10.5. The IOKit object representing a hub device on the USB bus. It is a subclass of IOUSBDevice. + @discussion With the exception of the IOUSBRootHubDevice objects representing the root hubs, every IOUSBDevice + will have an IOUSBHubDevice as its parent in the IOUSB plane. USB KEXT drivers will have the ability to + query this device for characteristics of the hub into which they are connected. This class will also give a dive driver + the abilty to get an IOService* pointing to the hub driver itself, which can then be used as the parent in the power plane. +*/ + +class IOUSBHubDevice : public IOUSBDevice +{ + friend class IOUSBHubPolicyMaker; + friend class AppleUSBHub; + friend class IOUSBController; // for the "can sleep" characteristic + +private: + OSDeclareDefaultStructors(IOUSBHubDevice) + + UInt32 _myCharacteristics; // bitmap of my characteristics + IOUSBHubPolicyMaker *_myPolicyMaker; // pointer to the policy maker in the IOPower tree for this hub + + struct ExpansionData + { + UInt32 _maxPortCurrent; // maximum current in milliamps per downstream port + UInt32 _totalExtraCurrent; // total amount of current above the spec'ed current per port available (during normal operation) + UInt32 _totalSleepCurrent; // total amount of current that can be drawn during sleep + UInt32 _canRequestExtraPower; // If 0, this hub does not support requesting extra power from its parent, non-zero: how much power we need to request in order to give out _extraPowerForPorts + UInt32 _extraPowerForPorts; // Of the power requested from our parent, how much can we parcel out -- the rest is consumed by voltage drop thru the cable + UInt32 _extraPowerAllocated; // Amount of power that we actually got from our parent + bool _requestFromParent; // True if we are to request the extra power from our parent, without modifying the request. Used for RMHs + }; + ExpansionData *_expansionData; + +protected: + // IOUSBHubDevice methods which will be used by the hub driver (which is also the Policy Maker) + virtual void SetPolicyMaker(IOUSBHubPolicyMaker *policyMaker); + virtual void SetHubCharacteristics(UInt32); + virtual bool InitializeCharacteristics(void); // used at start + +public: + // static constructor + static IOUSBHubDevice *NewHubDevice(void); + + // IOKit methods + virtual bool init(); + virtual bool start( IOService * provider ); + virtual void stop( IOService *provider ); + virtual void free(); + + // public IOUSBHubDevice methods + + void SetTotalSleepCurrent(UInt32 sleepCurrent); + UInt32 GetTotalSleepCurrent(); + + /*! + @function GetPolicyMaker + returns a pointer to the policy maker for the hub, which can be used as the power plane parent. + @result returns an IOUSBHubPolicyMaker* pointing to the policy maker for this hub. returns NULL is no policy maker is active on the hub device. + */ + virtual IOUSBHubPolicyMaker *GetPolicyMaker(void); + + /*! + @function GetHubCharacteristics + returns characteristics of the hub device which might be useful for the driver of a device connected to the hub. + kIOUSBHubDeviceIsRootHub indicates that the hub is a root hub + kIOUSBHubDeviceIsOnHighSpeedBus indicates that the hub is running on a High Speed bus. If this bit is set and kIOUSBHubDeviceIsHighSpeed is clear, then this is a Classic Speed hub running on a High Speed bus, which means that Split Transactions will be used to communicate with downstream devices. + + @result returns a bitmap of characteristics + */ + virtual UInt32 GetHubCharacteristics(); + + /*! + @function GetMaxProvidedPower + returns the maximum amount of power available on any downstream port of this hub + @result the power is returned in milliamps - usually 100ma or 500 ma. + */ + virtual UInt32 GetMaxProvidedPower(); + + /*! + @function RequestProvidedPower + requests power from the hub device + @param requestedPower - the amount of power requested in milliamps (usually 100ma or 500 ma) + @result the amount of power allocated for this driver in milliamps (usually 100ma or 500 ma) + */ + virtual UInt32 RequestProvidedPower(UInt32 requestedPower); + + virtual UInt32 RequestExtraPower(UInt32 requestedPower); + + virtual void ReturnExtraPower(UInt32 returnedPower); + + OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 0); + + virtual void InitializeExtraPower(UInt32 maxPortCurrent, UInt32 totalExtraCurrent); + + OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 1); + virtual UInt32 RequestSleepPower(UInt32 requestedPower); + + OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 2); + virtual void ReturnSleepPower(UInt32 returnedPower); + + OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 3); + virtual void SetSleepCurrent(UInt32 sleepCurrent); + + OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 4); + virtual UInt32 GetSleepCurrent(); + + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 5); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 6); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 7); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 8); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 9); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 10); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 11); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 12); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 13); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 14); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 15); +}; + +#endif /* _IOKIT_IOUSBROOTHUBDEVICE_H */ + diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBHubPolicyMaker.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBHubPolicyMaker.h.svn-base new file mode 100644 index 0000000..a0021d3 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBHubPolicyMaker.h.svn-base @@ -0,0 +1,218 @@ +/* + * Copyright (c) 2007 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __OPEN_SOURCE__ +/* + * + * $Log: IOUSBHubPolicyMaker.h,v $ + * Revision 1.10 2009/05/07 19:43:09 nano + * Move our SnowLeopard branch to TOT + * + * Revision 1.7.72.3 2008/07/23 17:43:32 nano + * <rdar://problem/5939357> IOUSBHIDDriver, IOHIDEventService missing HeaderDoc class declarations + * + * Revision 1.7.72.2 2008/04/22 22:38:01 nano + * Bring in changes from Foxhound-320.2.9 + * + * Revision 1.9 2008/04/17 16:56:57 nano + * Bring in branches for rdar://5867990 & rdar://5768343 + * + * Revision 1.8.4.1 2008/04/16 20:26:15 nano + * <rdar://problem/5867990> Add API to allocate sleep current, as well as making sure that we return any extra power if our client dies or our device is terminated without returning it + * + * Revision 1.8 2008/04/14 16:08:38 nano + * Add new APIs for high power and for GetDeviceInformation. + * + * Revision 1.7.114.1 2008/04/11 22:25:44 nano + * Initial work on new user-client APIs and new IOUSBDevice APIs to return port state information and manage extra power requests, as well as groundwork for calling the policy maker directly from the IOUSBDevice + * + * Revision 1.7 2007/08/17 22:41:11 nano + * Bring in branch that fixes <rdar://problem/5414582> USB not honoring Resume recovery time (hub driver) and adds extra time for iPods + * + * Revision 1.6.30.1 2007/08/16 19:14:02 nano + * ResumeRecovery additions. + * + * Revision 1.6 2007/08/01 16:10:18 rhoads + * roll in extra power changes + * + * Revision 1.5.12.1 2007/07/27 16:49:10 rhoads + * merge the extra current stuff into Leopard, and add extra sleep current for self powered hubs + * + * Revision 1.5 2007/07/20 22:31:22 rhoads + * roll in branch300-3-2 + * + * Revision 1.4.40.1 2007/07/18 18:44:24 rhoads + * this is the 300.3.2g version plus some quieter logs + * + * Revision 1.4.34.2 2007/07/17 06:30:35 rhoads + * more hub chain fixes + * + * Revision 1.4.34.1 2007/07/16 16:45:00 rhoads + * more power management and termination tweaks + * + * Revision 1.4 2007/05/18 01:59:12 rhoads + * roll in 5112084 and 5204170 + * + * Revision 1.3.2.1 2007/05/15 18:23:48 rhoads + * some initial power state bug fixes + * + * Revision 1.3 2007/05/10 22:25:35 rhoads + * roll in branch 5113395 - the last major piece of the new power architecture + * + * Revision 1.2.64.4 2007/04/13 22:34:59 rhoads + * fix restart and shutdown + * + * Revision 1.2.64.3 2007/04/11 23:56:23 rhoads + * first mostly working dozing hub + * + * Revision 1.2.64.2 2007/04/10 02:09:09 rhoads + * got UHCI almost working + * + * Revision 1.2.64.1 2007/04/05 02:57:50 rhoads + * move power management out of AppleUSBHub and into IOUSBHubPolicyMaker + * + * Revision 1.2 2007/01/20 00:47:01 rhoads + * roll in Hub Policy Maker changes + * + * Revision 1.1.2.4 2007/01/18 22:51:08 rhoads + * add some padding + * + * Revision 1.1.2.3 2007/01/15 19:58:07 rhoads + * saving more changes + * + * Revision 1.1.2.2 2007/01/09 23:55:36 rhoads + * working version + * + * Revision 1.1.2.1 2007/01/09 21:57:02 rhoads + * commit some stuff to try to fix a permissions issue + * + * + */ +#endif +#ifndef _IOKIT_IOUSBHUBPOLICYMAKER_H +#define _IOKIT_IOUSBHUBPOLICYMAKER_H + +#include <IOKit/IOService.h> +#include <IOKit/usb/IOUSBController.h> +#include <IOKit/usb/IOUSBHubDevice.h> + + +enum { + kIOUSBHubPowerStateOff = 0, // losing power + kIOUSBHubPowerStateRestart = 1, // reseting bus, but may maintain power + kIOUSBHubPowerStateSleep = 2, // upstream port and all downstream ports suspended (from the top) + kIOUSBHubPowerStateLowPower = 3, // upstream port and all downstream ports suspended (from the bottom) + kIOUSBHubPowerStateOn = 4, // upstream port and at least one downstream port on + kIOUSBHubNumberPowerStates = 5 +}; + +enum { + kHubResumeRecoveryTime = 10, // 10 ms to recover after I resume myself + kPortResumeRecoveryTime = 10 // 10 ms to recover another device +}; + +#define kIOUSBHubPowerStateStable -1 + +/*! + @class IOUSBHubPolicyMaker + @abstract Super class for Hub drivers to incorporate common Power Management code. + */ +class IOUSBHubPolicyMaker : public IOService +{ + OSDeclareAbstractStructors(IOUSBHubPolicyMaker) + +protected: + IOUSBControllerV2 * _bus; + IOUSBHubDevice * _device; // our provider + IOUSBHubDevice * _parentHubDevice; // for non root hub drivers, this is the hub device that my hub device is connected to + bool _isRootHub; // this is a root hub + bool _dozeEnabled; // true if the controller has been enabled to go into doze mode + bool _dontAllowLowPower; // If true, we will not allow the hub to go into low power mode. + bool _dontAllowSleepPower; // If true, we will not allow extra sleep power for a self powered hub. + SInt32 _powerStateChangingTo; // a power state if we are changing to one, or -1 if we are stable + unsigned long _myPowerState; // my current state (since getPowerState doesn't always change in time) + UInt32 _extraPower; // how much extra power we might be able to get from our parent hub + UInt32 _extraPowerRemaining; // how many milliamps we can still give to any one port + UInt32 _hubResumeRecoveryTime; // # of ms that we will wait before issuing any transactions on our port (nominally 10ms) + struct ExpansionData + { + }; + ExpansionData *_expansionData; + +public: + // IOService methods + virtual bool start(IOService * provider); + virtual IOReturn powerStateWillChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); + virtual unsigned long powerStateForDomainState ( IOPMPowerFlags domainState ); + virtual IOReturn setPowerState ( unsigned long powerStateOrdinal, IOService* whatDevice ); + virtual IOReturn powerStateDidChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); + virtual unsigned long maxCapabilityForDomainState ( IOPMPowerFlags domainState ); + virtual void powerChangeDone ( unsigned long fromState ); + + // public methods which MAY be implemented in subclass + virtual IOReturn EnsureUsability(void); + + // Extra Port Power calls + void AllocateExtraPower(); + IOReturn GetExtraPortPower(UInt32 portNum, UInt32 *extraPower); + IOReturn ReturnExtraPortPower(UInt32 portNum, UInt32 extraPower); + + // virtual methods to be implemented in the controlling driver subclass + virtual bool ConfigureHubDriver(void) = 0; + virtual IOReturn HubPowerChange(unsigned long powerStateOrdinal) = 0; + + OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 0); + virtual IOReturn GetPortInformation(UInt32 portNum, UInt32 *info); + + OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 1); + virtual IOReturn ResetPort(UInt32 portNum); + + OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 2); + virtual IOReturn SuspendPort(UInt32 portNum, bool suspend); + + OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 3); + virtual IOReturn ReEnumeratePort(UInt32 portNum, UInt32 options); + + OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 4); + virtual UInt32 RequestExtraPower(UInt32 portNum, UInt32 type, UInt32 requestedPower); + + OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 5); + virtual IOReturn ReturnExtraPower(UInt32 portNum, UInt32 type, UInt32 returnedPower); + + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 6); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 7); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 8); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 9); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 10); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 11); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 12); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 13); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 14); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 15); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 16); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 17); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 18); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 19); +}; + +#endif _IOKIT_IOUSBHUBPOLICYMAKER_H diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBInterface.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBInterface.h.svn-base new file mode 100644 index 0000000..4777e50 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBInterface.h.svn-base @@ -0,0 +1,264 @@ +/* + * Copyright (c) 1998-2007 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBINTERFACE_H +#define _IOKIT_IOUSBINTERFACE_H + +#include <IOKit/IOService.h> +#include <libkern/c++/OSData.h> + +#include <IOKit/usb/USB.h> +#include <IOKit/usb/IOUSBNub.h> +#include <IOKit/usb/IOUSBDevice.h> + +/*! + @class IOUSBInterface + @abstract The object representing an interface of a device on the USB bus. + @discussion This class provides functionality to find the pipes of an interface and + to read the descriptors associated with an interface. When an interface is open()ed, + all its pipes are created +*/ +class IOUSBInterface : public IOUSBNub +{ + friend class IOUSBInterfaceUserClientV2; + + OSDeclareDefaultStructors(IOUSBInterface) + +protected: + IOUSBPipe * _pipeList[kUSBMaxPipes]; + const IOUSBConfigurationDescriptor *_configDesc; + const IOUSBInterfaceDescriptor * _interfaceDesc; + IOUSBDevice * _device; + + // these variable are the parsed interface descriptor + UInt8 _bInterfaceNumber; + UInt8 _bAlternateSetting; + UInt8 _bNumEndpoints; + UInt8 _bInterfaceClass; + UInt8 _bInterfaceSubClass; + UInt8 _bInterfaceProtocol; + UInt8 _iInterface; + + struct ExpansionData { + IOCommandGate *_gate; + IOWorkLoop *_workLoop; + bool _needToClose; + IOLock * _pipeObjLock; // Lock to synchronize accesses to our pipeObjects + }; + ExpansionData * _expansionData; + + // private methods + virtual void ClosePipes(void); // close all pipes (except pipe zero) + virtual IOReturn CreatePipes(void); // open all pipes in the current interface/alt interface + virtual void SetProperties(void); // update my property table with the correct properties + +public: + // static methods + static IOUSBInterface *withDescriptors(const IOUSBConfigurationDescriptor *cfDesc, const IOUSBInterfaceDescriptor *ifDesc); + static IOReturn CallSuperOpen(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); + static IOReturn CallSuperClose(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); + static UInt8 hex2char( UInt8 digit ); + + // IOService methods + virtual bool start(IOService * provider); + virtual bool handleOpen(IOService *forClient, IOOptionBits options = 0, void *arg = 0 ); + virtual bool open(IOService *forClient, IOOptionBits options = 0, void *arg = 0 ); + virtual void close(IOService *forClient, IOOptionBits options = 0); + virtual void handleClose(IOService *forClient, IOOptionBits options = 0); + virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); + virtual bool finalize(IOOptionBits options); + virtual void stop(IOService * provider); + virtual bool terminate( IOOptionBits options = 0 ); + virtual void free(); + + // IOUSBInterface class methods + virtual bool init( const IOUSBConfigurationDescriptor *cfDesc, + const IOUSBInterfaceDescriptor *ifDesc); + /*! + @function FindNextAltInterface + return alternate interface descriptor satisfying the requirements specified in request, or NULL if there aren't any. + request is updated with the properties of the returned interface. + @param current interface descriptor to start searching from, NULL to start at alternate interface 0. + @param request specifies what properties an interface must have to match. + @result Pointer to a matching interface descriptor, or NULL if none match. + */ + virtual const IOUSBInterfaceDescriptor *FindNextAltInterface(const IOUSBInterfaceDescriptor *current, + IOUSBFindInterfaceRequest *request); + + /*! + @function FindNextPipe + Find a pipe of the interface that matches the requirements, either + starting from the beginning of the interface's pipe list or from a specified + pipe. + @param current Pipe to start searching from, NULL to start from beginning of list. + @param request Requirements for pipe to match, updated with the found pipe's + properties. + @result Pointer to the pipe, or NULL if no pipe matches the request. + */ + virtual IOUSBPipe *FindNextPipe(IOUSBPipe *current, IOUSBFindEndpointRequest *request); + + /*! + @function FindNextAssociatedDescriptor + Find the next descriptor of the requested type associated with the interface. + @param current Descriptor to start searching from, NULL to start from beginning of list. + @param type Descriptor type to search for, or kUSBAnyDesc to return any descriptor type. + @result Pointer to the descriptor, or NULL if no matching descriptors found. + */ + virtual const IOUSBDescriptorHeader * FindNextAssociatedDescriptor(const void *current, UInt8 type); + + /*! + @function SetAlternateInterface + Select the specified alternate interface. + @param forClient The client requesting the alternate setting. This client must have the interface open in order to perform the request. + @param alternateSetting Alternate setting (from the alternate interface's interface descriptor). + @result exclusive access error if the interface is not open. otherwise the result of the transaction + */ + virtual IOReturn SetAlternateInterface(IOService *forClient, UInt16 alternateSetting); + + /*! + @function GetPipeObj + returns a handle to the pipe at the corresponding index + @param index value from zero to kUSBMaxPipes-1 + @result The IOUSBPipe object. Note that the client does not own a reference to this pipe, so the client should retain() the IOUSBPipe object if necessary. + */ + virtual IOUSBPipe *GetPipeObj(UInt8 index); + /*! + @function GetConfigValue + returns the device configuration value for the interface + @result The device configuration value. + */ + virtual UInt8 GetConfigValue(); + /*! + @function GetDevice + returns the device the interface is part of. + @result Pointer to the IOUSBDevice object which is the parent of this IOUSBInterface object. + */ + virtual IOUSBDevice *GetDevice(); + /*! + @function GetInterfaceNumber + returns the zero based value identifying the index in the array of concurrent + interfaces supported by the current configuration + @result the interface index + */ + virtual UInt8 GetInterfaceNumber(); + /*! + @function GetAlternateSetting + returns the alternate setting for this interface. + @result the alternate setting + */ + virtual UInt8 GetAlternateSetting(); + /*! + @function GetNumEndpoints + returns the number of endpoints used by this interface (excluding + device endpoint zero. If the value is zero, this interface only + uses endpoint zero. + @result the number of endpoints + */ + virtual UInt8 GetNumEndpoints(); + /*! + @function GetInterfaceClass + returns the class code for this interface (assigned by the USB) + a value of zero is reserved + if the value is FFh, the interface class is vendor-specific + all other values are reserved for assignment by the USB + @result the interface class + */ + virtual UInt8 GetInterfaceClass(); + /*! + @function GetInterfaceSubClass + returns the subclass code (assigned by the USB). + These codes are qualified by the value returned by GetInterfaceClass + @result the interface subclass + */ + virtual UInt8 GetInterfaceSubClass(); + /*! + @function GetInterfaceProtocol + returns the protocol code (assigned by the USB). + @result the interface index + */ + virtual UInt8 GetInterfaceProtocol(); + /*! + @function GetInterfaceStringIndex + returns the index of the string descriptor describing the interface + @result the string index + */ + virtual UInt8 GetInterfaceStringIndex(); + + /*! + @function DeviceRequest + @abstract Sends a control request to the default control pipe in the device (pipe zero) + @param request The parameter block to send to the device + @param completion Function to call when request completes. If omitted then + DeviceRequest() executes synchronously, blocking until the request is complete. If the request is asynchronous, the client must make sure that + the IOUSBDevRequest is not released until the callback has occurred. + */ + virtual IOReturn DeviceRequest(IOUSBDevRequest *request, IOUSBCompletion *completion = 0); + + /*! + @function DeviceRequest + @abstract Sends a control request to the default control pipe in the device (pipe zero) + @param request The parameter block to send to the device (with the pData as an IOMemoryDesriptor) + @param completion Function to call when request completes. If omitted then + DeviceRequest() executes synchronously, blocking until the request is complete. If the request is asynchronous, the client must make sure that + the IOUSBDevRequest is not released until the callback has occurred. + */ + virtual IOReturn DeviceRequest(IOUSBDevRequestDesc *request, IOUSBCompletion *completion = 0); + + virtual bool matchPropertyTable(OSDictionary * table, SInt32 *score); + + OSMetaClassDeclareReservedUsed(IOUSBInterface, 0); + /*! + @function GetEndpointProperties + @abstract Returns the properties of an endpoint, possibly in an alternate interface. + @param alternateSetting specifies the desired alternate setting + @param endpointNumber specifies the endpoint number + @param direction specifies the direction (kUSBIn, kUSBOut) + @param transferType a pointer to hold the transfer type (kUSBControl, kUSBBulk, etc.) of the endpoint if found. + @param maxPacketSize a pointer to hold the maxPacketSize in the endpoint descriptor. + @param interval a pointer to hold the interval value in the endpoint descriptor. + @result returns kIOReturnSuccess if the endpoint is found, and kIOUSBEndpointNotFound if it is not. + */ + virtual IOReturn GetEndpointProperties(UInt8 alternateSetting, UInt8 endpointNumber, UInt8 direction, UInt8 *transferType, UInt16 *maxPacketSize, UInt8 *interval); + + OSMetaClassDeclareReservedUnused(IOUSBInterface, 1); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 2); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 3); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 4); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 5); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 6); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 7); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 8); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 9); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 10); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 11); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 12); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 13); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 14); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 15); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 16); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 17); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 18); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 19); +}; + +#endif /* _IOKIT_IOUSBINTERFACE_H */ diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBLog.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBLog.h.svn-base new file mode 100644 index 0000000..7f8f2a3 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBLog.h.svn-base @@ -0,0 +1,240 @@ +/* + * Copyright © 1998-20010 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBLOG_H +#define _IOKIT_IOUSBLOG_H + +#include <IOKit/IOService.h> +#include <IOKit/IOLib.h> + + +#ifdef __cplusplus + extern "C" { +#endif + +// USB Specific defines +#define USBLog( LEVEL, ARGS...) KernelDebugLogTag( LEVEL, 'USBF', ## ARGS ) +#define USBError( LEVEL, ARGS...) KernelDebugLogInternal( ( LEVEL ), 'USBF', ## ARGS ) +#define USBStringFromReturn( IORETURN) (IOUSBController::_log)->stringFromReturn( IORETURN ) + + +// Possible Debug levels. If DEBUG_LEVEL is set to DEBUG_LEVEL_PRODUCTION, all debug logs will be +// stripped of the final code. + +#define DEBUG_LEVEL_PRODUCTION 0 +#define DEBUG_LEVEL_DEVELOPMENT 1 +#define DEBUG_LEVEL_ALPHA 2 +#define DEBUG_LEVEL_BETA 3 +#define DEBUG_LEVEL_FINAL DEBUG_LEVEL_PRODUCTION + +// Allow clients to define their own debug level. + +#if ( !defined( DEBUG_LEVEL ) ) + #define DEBUG_LEVEL DEBUG_LEVEL_PRODUCTION +#endif + +// Index for user client methods +// +enum +{ + kUSBControllerUserClientOpen = 0, + kUSBControllerUserClientClose, + kUSBControllerUserClientEnableLogger, + kUSBControllerUserClientSetDebuggingLevel, + kUSBControllerUserClientSetDebuggingType, + kUSBControllerUserClientGetDebuggingLevel, + kUSBControllerUserClientGetDebuggingType, +#ifndef __OPEN_SOURCE__ + kUSBControllerUserClientSetTestMode, + kUSBControllerUserClientReadRegister, + kUSBControllerUserClientWriteRegister, + kUSBControllerUserClientMessageController, +#endif + kNumUSBControllerMethods +}; + +#ifndef __OPEN_SOURCE__ +// Enums for the private kIOUSBMessageController message +enum +{ + kIOUSBMessageControllerDoGPIOReset = 0x00000001 +}; +#endif + +// Info Debug Output Types. + +typedef UInt32 KernelDebuggingOutputType; +enum +{ + kKernelDebugOutputIOLogType = 0x00000001, + kKernelDebugOutputKextLoggerType = 0x00000002 +}; + + +// Info Debug levels. + +typedef UInt32 KernelDebugLevel; +enum +{ + kKernelDebugInfoLevel = 1000, + kKernelDebugRareInfoLevel = 2000, + kKernelDebugAllowedErrorLevel = 3000, + kKernelDebugAssertLevel = 4000, + kKernelDebugRequireLevel = 5000, + kKernelDebugErrorLevel = 6000, + kKernelDebugCriticalErrorLevel = 7000, + kKernelDebugTragicErrorLevel = 8000, + kKernelDebugAnyLevel = 0 +}; + +// Function prototypes. + +void KernelDebugSetLevel( KernelDebugLevel inLevel ); +KernelDebugLevel KernelDebugGetLevel(); +void KernelDebugSetOutputType( KernelDebuggingOutputType inType ); +KernelDebuggingOutputType KernelDebugGetOutputType(); +IOReturn KernelDebugFindKernelLogger(); +void KernelDebugEnable( bool enable ); + +// Yes, you can call this directly. But, why? If you use the macros declared below, such as +// KernelIOLog, you get the benefit of having your logs compiled out when you set the +// DEBUG_LEVEL to production mode and recompile. Dude. Sweet. What's mine say? + +void KernelDebugLogInternal( KernelDebugLevel inLevel, UInt32 inTag, char const *inFormatString, ... ) __attribute__ ((format(printf,3,4)));; +void KernelDebugLogDataInternal( UInt32 inLevel, UInt32 inTag, void *buffer, UInt32 byteCount, bool preBuffer); + +// Handy macros. + +#define REQUIRE_NO_ERR_PRINTF( VALUE, LABEL, ARGS... ) \ + if ( VALUE != kIOReturnSuccess ) \ + { \ + KernelDebugLogInternal( kDebugInfoLevel, 'BluD', ## ARGS ); \ + goto LABEL; \ + } + +#define REQUIRE_PRINTF( TEST, LABEL, ARGS... ) \ + do \ + { \ + if ( !( TEST ) ) \ + { \ + KernelDebugLogInternal( kDebugInfoLevel, 'BluD', ## ARGS ); \ + goto LABEL; \ + } \ + } while( false ) + +// Some macros to call the debugging outputs. We'll strip out the debug logs if we are production code. + +#if DEBUG_LEVEL != DEBUG_LEVEL_PRODUCTION +#define KernelDebugLog( LEVEL, ARGS... ) KernelDebugLogInternal( ( LEVEL ), 'KDbg', ## ARGS ) __attribute__ ((format(printf,1,2))); + #define KernelDebugLogTag( LEVEL, TAG, ARGS... ) KernelDebugLogInternal( ( LEVEL ), ( TAG ), ## ARGS ) + #define KernelDebugLogData( LEVEL, TAG, BUFFER, SIZE, HOLD) KernelDebugLogDataInternal( ( LEVEL ), ( TAG ), ( BUFFER ), ( SIZE ), ( HOLD )) +#else + #define KernelDebugLog( LEVEL, ARGS... ) + #define KernelDebugLogTag( LEVEL, TAG, ARGS... ) + #define KernelDebugLogData( LEVEL, TAG, BUFFER, SIZE, HOLD) +#endif + + +#ifdef __cplusplus + } + +//================================================================================================ +// Forward declarations +//================================================================================================ +class com_apple_iokit_KLogClient; + +//================================================================================================ +// Defines +//================================================================================================ +#define kLogKextName "com_apple_iokit_KLog" +#define MAXUSERS 5 + +//================================================================================================ +// Custom Types +//================================================================================================ + +typedef UInt32 KLogLevel; +typedef UInt32 KLogTag; + +//================================================================================================ +// com_apple_iokit_KLog +//================================================================================================ + +class com_apple_iokit_KLog : public IOService +{ + + OSDeclareDefaultStructors(com_apple_iokit_KLog) + + com_apple_iokit_KLogClient * mClientPtr[MAXUSERS+1]; + + unsigned char * mMsgBuffer; + UInt8 mClientCount; + UInt8 mMsgSize; + bool mErrFlag; + struct timeval * mTimeVal; + IOLock * mLogLock; + +public: + + static com_apple_iokit_KLog * logger; + + virtual bool init(OSDictionary *dictionary = 0); + virtual void free(void); + + virtual IOService * probe(IOService *provider, SInt32 *score); + virtual bool start(IOService *provider); + virtual void stop(IOService *provider); + virtual IOReturn newUserClient( task_t owningTask, void * securityID, + UInt32 type, IOUserClient ** handler ); + + virtual SInt8 Log( KLogLevel level, KLogTag tag, const char *format, ... ); + virtual SInt8 vLog( KLogLevel level, KLogTag tag, const char *format, va_list in_va_list ); + + void closeChild(com_apple_iokit_KLogClient *ptr); + void setErr(bool set); + +}; + +#define kMaxStatusBufSize (8*1024) + + +class IOUSBLog : public IOService +{ + OSDeclareAbstractStructors(IOUSBLog) + +private: +public: + virtual bool init( OSDictionary * dictionary = 0 ); + virtual const char * stringFromReturn( IOReturn rtn ); + static IOUSBLog *usblog(); + virtual void AddStatusLevel (UInt32 level, UInt32 ref, char *status, UInt32 value); + virtual void AddStatus(char *message); + virtual void AddStatus(UInt32 level, char *message); + virtual void USBLogPrintf(UInt32 level, char *format,...); + virtual char * strstr(const char *in, const char *str); +}; + + +#endif +#endif /* ! _IOKIT_IOUSBLOG_H */ + diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBMassStorageClass.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBMassStorageClass.h.svn-base new file mode 100644 index 0000000..02c8557 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBMassStorageClass.h.svn-base @@ -0,0 +1,507 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IOUSBMASSSTORAGECLASS_H +#define _IOKIT_IOUSBMASSSTORAGECLASS_H + +// Headers for general IOKit definitions +#include <IOKit/IOLib.h> +#include <IOKit/IOService.h> +#include <IOKit/IOMemoryDescriptor.h> +#include <IOKit/IOMessage.h> + +// Headers for USB specific definitions +#include <IOKit/usb/IOUSBInterface.h> +#include <IOKit/usb/IOUSBPipe.h> +#include <IOKit/usb/USBSpec.h> +#include <IOKit/usb/USB.h> + +// Headers for SCSI Protocol support definitions +#include <IOKit/scsi/IOSCSIProtocolServices.h> + +// BSD includes +#include <sys/sysctl.h> + +#define UNUSED(x) ((void)x) + + +#pragma mark - +#pragma mark Vendor Specific Device Support +#define kIOUSBMassStorageCharacteristics "USB Mass Storage Characteristics" +#define kIOUSBMassStoragePreferredSubclass "Preferred Subclass" +#define kIOUSBMassStoragePreferredProtocol "Preferred Protocol" +#define kIOUSBMassStorageResetOnResume "Reset On Resume" +#define kIOUSBMassStorageUseStandardUSBReset "Use Standard USB Reset" +#define kIOUSBKnownCSWTagIssues "Known CSW Tag Issues" +#define kIOUSBMassStorageMaxLogicalUnitNumber "Max Logical Unit Number" +#define kIOPropertyIOUnitKey "IOUnit" +#define kIOUSBMassStorageDoNotMatch "Do Not Match MSC" +#define kIOUSBMassStorageDoNotOperate "Do Not Operate" +#define kIOUSBMassStorageEnableSuspendResumePM "Enable Port Suspend-Resume PM" + +enum +{ + kUSBDAddressLength = 10 +}; + +#pragma mark - +#pragma mark CBI Protocol Strutures +// Structure for the global PB's +struct CBIRequestBlock +{ + SCSITaskIdentifier request; + IOUSBDevRequest cbiDevRequest; + SCSICommandDescriptorBlock cbiCDB; + IOUSBCompletion cbiCompletion; + UInt32 currentState; + IOMemoryDescriptor * cbiPhaseDesc; + UInt8 cbiGetStatusBuffer[2]; // 2 bytes as specified in the USB spec +}; + +typedef struct CBIRequestBlock CBIRequestBlock; + +#pragma mark - +#pragma mark Bulk Only Protocol Structures + +struct StorageBulkOnlyCBW +{ + UInt32 cbwSignature; + UInt32 cbwTag; + UInt32 cbwTransferLength; + UInt8 cbwFlags; + UInt8 cbwLUN; // Bits 0-3: LUN, 4-7: Reserved + UInt8 cbwCDBLength; // Bits 0-4: CDB Length, 5-7: Reserved + UInt8 cbwCDB[16]; +}; + +typedef struct StorageBulkOnlyCBW StorageBulkOnlyCBW; + +struct StorageBulkOnlyCSW +{ + UInt32 cswSignature; + UInt32 cswTag; + UInt32 cswDataResidue; + UInt8 cswStatus; +}; + +typedef struct StorageBulkOnlyCSW StorageBulkOnlyCSW; + +struct BulkOnlyRequestBlock +{ + SCSITaskIdentifier request; + IOUSBCompletion boCompletion; + UInt32 currentState; + StorageBulkOnlyCBW boCBW; + StorageBulkOnlyCSW boCSW; + IOMemoryDescriptor * boPhaseDesc; + UInt8 boGetStatusBuffer[2]; // 2 bytes as specified in the USB spec +}; + +typedef struct BulkOnlyRequestBlock BulkOnlyRequestBlock; + + +#pragma mark - +#pragma mark IOUSBMassStorageClass definition + +class IOUSBMassStorageClass : public IOSCSIProtocolServices +{ + OSDeclareDefaultStructors(IOUSBMassStorageClass) + +private: + // ---- Member variables used by all protocols ---- + // The interface object that provides the driver with access to the + // USB so that it may talk to its device. + IOUSBInterface * fInterface; + + // The pipe objects that the driver uses to transport data through a + // pipe to the appropriate endpoint. + IOUSBPipe * fBulkInPipe; + IOUSBPipe * fBulkOutPipe; + IOUSBPipe * fInterruptPipe; + IOUSBDevRequest fUSBDeviceRequest; + UInt8 fPreferredSubclass; + UInt8 fPreferredProtocol; + + // The maximum Logical Unit Number. This is the highest valid LUN + // that the USB device supports, so if the device only supports one + // LUN, such as CBI and CB, this number will be zero. + UInt8 fMaxLogicalUnitNumber; + + // ---- Member variables used by CBI protocol ---- + bool fCBICommandStructInUse; + + CBIRequestBlock fCBICommandRequestBlock; + + // ---- Member variables used by Bulk Only protocol ---- + // Command tag, this driver just uses a sequential counter that is + // incremented for each CBW that is sent to the device. + UInt32 fBulkOnlyCommandTag; + + bool fBulkOnlyCommandStructInUse; + + // Dedicated CBW and CSW IOMemoryDescriptors are listed in the ExpansionData struct. + + // The Request block that contains all the necessary data for + // transporting a Bulk Only request across the USB. + BulkOnlyRequestBlock fBulkOnlyCommandRequestBlock; + +protected: + // Reserve space for future expansion. + struct ExpansionData + { + bool fResetInProgress; + OSSet * fClients; + IOUSBPipe * fPotentiallyStalledPipe; + bool fUseUSBResetNotBOReset; + bool fAbortCurrentSCSITaskInProgress; + IOMemoryDescriptor * fCBIMemoryDescriptor; + IOMemoryDescriptor * fBulkOnlyCBWMemoryDescriptor; + IOMemoryDescriptor * fBulkOnlyCSWMemoryDescriptor; + bool fDeviceAttached; + bool fWaitingForReconfigurationMessage; + bool fTerminating; + bool fKnownCSWTagMismatchIssues; + bool fPortSuspendResumeForPMEnabled; + bool fPortIsSuspended; + bool fRequiresResetOnResume; + bool fAutonomousSpinDownWorkAround; + UInt8 fConsecutiveResetCount; + bool fClearStallInProgress; /* OBSOLETE */ + bool fTerminationDeferred; + }; + ExpansionData * reserved; + + #define fResetInProgress reserved->fResetInProgress + #define fClients reserved->fClients + #define fPotentiallyStalledPipe reserved->fPotentiallyStalledPipe + #define fUseUSBResetNotBOReset reserved->fUseUSBResetNotBOReset + #define fAbortCurrentSCSITaskInProgress reserved->fAbortCurrentSCSITaskInProgress + #define fCBIMemoryDescriptor reserved->fCBIMemoryDescriptor + #define fBulkOnlyCBWMemoryDescriptor reserved->fBulkOnlyCBWMemoryDescriptor + #define fBulkOnlyCSWMemoryDescriptor reserved->fBulkOnlyCSWMemoryDescriptor + #define fDeviceAttached reserved->fDeviceAttached + #define fWaitingForReconfigurationMessage reserved->fWaitingForReconfigurationMessage + #define fTerminating reserved->fTerminating + #define fKnownCSWTagMismatchIssues reserved->fKnownCSWTagMismatchIssues + #define fPortSuspendResumeForPMEnabled reserved->fPortSuspendResumeForPMEnabled + #define fPortIsSuspended reserved->fPortIsSuspended + #define fRequiresResetOnResume reserved->fRequiresResetOnResume + #define fAutonomousSpinDownWorkAround reserved->fAutonomousSpinDownWorkAround + #define fConsecutiveResetCount reserved->fConsecutiveResetCount + #define fClearStallInProgress reserved->fClearStallInProgress + #define fTerminationDeferred reserved->fTerminationDeferred + + // Enumerated constants used to control various aspects of this + // driver. + + // Enumerations for Mass Storage Class Subclass types + enum + { + kUSBStorageRBCSubclass = 1, + kUSBStorageSFF8020iSubclass = 2, + kUSBStorageQIC157Subclass = 3, + kUSBStorageUFISubclass = 4, + kUSBStorageSFF8070iSubclass = 5, + kUSBStorageSCSITransparentSubclass = 6 + }; + + // The supported USB Mass Storage Class transport protocols. + enum + { + kProtocolControlBulkInterrupt = 0x00, + kProtocolControlBulk = 0x01, + kProtocolBulkOnly = 0x50 + }; + + // ------- Protocol support functions ------------ + // The SendSCSICommand function will take a SCSITask Object and transport + // it across the physical wire(s) to the device + virtual bool SendSCSICommand( + SCSITaskIdentifier request, + SCSIServiceResponse * serviceResponse, + SCSITaskStatus * taskStatus ); + + // The AbortSCSICommand function will abort the indicated SCSITask object, + // if it is possible and the SCSITask has not already completed. + virtual SCSIServiceResponse AbortSCSICommand( SCSITaskIdentifier abortTask ); + + virtual bool IsProtocolServiceSupported( + SCSIProtocolFeature feature, + void * serviceValue ); + + virtual bool HandleProtocolServiceFeature( + SCSIProtocolFeature feature, + void * serviceValue ); + + // Methods for retrieving and setting the object for the Interface + IOUSBInterface * GetInterfaceReference( void ); + void SetInterfaceReference( IOUSBInterface * newInterface ); + + UInt8 GetInterfaceSubclass( void ); + UInt8 GetInterfaceProtocol( void ); + + // Methods for retrieving an object for a Pipe. + IOUSBPipe * GetControlPipe( void ); + IOUSBPipe * GetBulkInPipe( void ); + IOUSBPipe * GetBulkOutPipe( void ); + IOUSBPipe * GetInterruptPipe( void ); + + // Methods for getting and setting the maximum LUN of a device. + UInt8 GetMaxLogicalUnitNumber( void ) const; + void SetMaxLogicalUnitNumber( UInt8 maxLUN ); + + virtual void CompleteSCSICommand( + SCSITaskIdentifier request, + IOReturn status ); + + virtual bool BeginProvidedServices( void ); + virtual bool EndProvidedServices( void ); + + // The Protocol specific helper methods for SendSCSICommand + virtual IOReturn SendSCSICommandForCBIProtocol( + SCSITaskIdentifier request ); + + virtual IOReturn SendSCSICommandForBulkOnlyProtocol( + SCSITaskIdentifier request ); + + // The Protocol specific helper methods for AbortSCSICommand + virtual IOReturn AbortSCSICommandForCBIProtocol( + SCSITaskIdentifier abortTask ); + + virtual IOReturn AbortSCSICommandForBulkOnlyProtocol( + SCSITaskIdentifier abortTask ); + + // Helper methods for performing general USB device requests + virtual IOReturn ClearFeatureEndpointStall( + IOUSBPipe * thePipe, + IOUSBCompletion * completion ); + virtual IOReturn GetStatusEndpointStatus( + IOUSBPipe * thePipe, + void * endpointStatus, + IOUSBCompletion * completion ); + + /* All CBI transport related methods. + */ + // All definitions and structures for the CBI Protocol + enum + { + kUSBStorageAutoStatusSize = 2 // Per the USB CBI Protocol + }; + + // Methods for accessing Bulk Only specific member variables. + CBIRequestBlock * GetCBIRequestBlock( void ); + + void ReleaseCBIRequestBlock( + CBIRequestBlock * cbiRequestBlock ); + + // Methods used for CBI/CB command transportation. + static void CBIProtocolUSBCompletionAction( + void * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining); + + IOReturn CBIProtocolTransferData( + CBIRequestBlock * cbiRequestBlock, + UInt32 nextExecutionState ); + + IOReturn CBIProtocolReadInterrupt( + CBIRequestBlock * cbiRequestBlock, + UInt32 nextExecutionState ); + + IOReturn CBIGetStatusEndpointStatus( + IOUSBPipe * targetPipe, + CBIRequestBlock * cbiRequestBlock, + UInt32 nextExecutionState ); + + IOReturn CBIClearFeatureEndpointStall( + IOUSBPipe * targetPipe, + CBIRequestBlock * cbiRequestBlock, + UInt32 nextExecutionState ); + + void CBIProtocolCommandCompletion( + CBIRequestBlock * cbiRequestBlock, + IOReturn resultingStatus, + UInt32 bufferSizeRemaining ); + + /* All Bulk Only transport related methods, structures and enums. + */ + // All Bulk Only specific structures and enums. + + // All definitions and structures for the Bulk Only Protocol + // Command Block Wrapper (CBW) + enum + { + // CBW general struture definitions + kCommandBlockWrapperSignature = OSSwapHostToBigConstInt32 ( 'USBC' ), + kByteCountOfCBW = 31, + + // CBW LUN related definitions + kCBWLUNMask = 0x0F, + + kCBWFlagsDataOut = 0x00, + kCBWFlagsDataIn = 0x80 + }; + + // All definitions and structures for the Bulk Only Protocol + // Command Status Wrapper (CSW) + enum + { + // CSW general struture definitions + kCommandStatusWrapperSignature = OSSwapHostToBigConstInt32 ( 'USBS' ), + kByteCountOfCSW = 13, + + // CSW status definitions + kCSWCommandPassedError = 0x00, // No error occurred + kCSWCommandFailedError = 0x01, /* An error occurred (probably a + * bad command or parameter ) */ + kCSWPhaseError = 0x02 /* A transfer was performed in + * the wrong sequence */ + }; + + // Methods for accessing Bulk Only specific member variables. + BulkOnlyRequestBlock * GetBulkOnlyRequestBlock( void ); + + void ReleaseBulkOnlyRequestBlock( + BulkOnlyRequestBlock * boRequestBlock ); + + UInt32 GetNextBulkOnlyCommandTag( void ); + + // Methods for Bulk Only specific utility commands + IOReturn BulkDeviceResetDevice( + BulkOnlyRequestBlock * boRequestBlock, + UInt32 nextExecutionState ); + + // Methods used for Bulk Only command transportation. + IOReturn BulkOnlySendCBWPacket( + BulkOnlyRequestBlock * boRequestBlock, + UInt32 nextExecutionState ); + + IOReturn BulkOnlyTransferData( + BulkOnlyRequestBlock * boRequestBlock, + UInt32 nextExecutionState ); + + IOReturn BulkOnlyReceiveCSWPacket( + BulkOnlyRequestBlock * boRequestBlock, + UInt32 nextExecutionState ); + + void BulkOnlyExecuteCommandCompletion ( + BulkOnlyRequestBlock * boRequestBlock, + IOReturn resultingStatus, + UInt32 bufferSizeRemaining ); + + static void BulkOnlyUSBCompletionAction ( + void * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining ); + +public: + + bool init( OSDictionary * propTable ); + virtual bool start( IOService * provider ); + virtual void stop( IOService * provider ); + virtual void free( void ); + virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); + + virtual bool willTerminate( IOService * provider, + IOOptionBits options ); + + virtual bool didTerminate( IOService * provider, + IOOptionBits options, + bool * defer ); + + virtual bool handleOpen( IOService * client, + IOOptionBits options, + void * arg ); + + virtual void handleClose( IOService * client, + IOOptionBits options ); + + virtual bool handleIsOpen( const IOService * client ) const; + + virtual IOReturn HandlePowerOn( void ); + +protected: + + static IOReturn sWaitForReset( void * refcon ); + IOReturn GatedWaitForReset( void ); + + static IOReturn sWaitForTaskAbort( void * refcon ); /* OBSOLETE */ + IOReturn GatedWaitForTaskAbort( void ); /* OBSOLETE */ + + static void sResetDevice( void * refcon ); + + static void sAbortCurrentSCSITask( void * refcon ); /* OBSOLETE */ + + OSMetaClassDeclareReservedUsed( IOUSBMassStorageClass, 1 ); + virtual IOReturn StartDeviceRecovery( void ); /* OBSOLETE */ + + OSMetaClassDeclareReservedUsed( IOUSBMassStorageClass, 2 ); + virtual void FinishDeviceRecovery( IOReturn status ); /* OBSOLETE */ + + static void DeviceRecoveryCompletionAction( + void * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining ); /* OBSOLETE */ + + void ResetDeviceNow( bool waitForReset ); + + void AbortCurrentSCSITask( void ); + + bool IsPhysicalInterconnectLocationInternal ( void ); + + IOReturn SuspendPort ( bool suspend ); + +private: + + void ClearPipeStall ( void ); + + IOReturn AcceptSCSITask ( SCSITaskIdentifier scsiTask, bool * pAccepted ); + + void CheckDeferredTermination ( void ); + + void GatedCompleteSCSICommand ( SCSITaskIdentifier request, SCSIServiceResponse * serviceResponse, SCSITaskStatus * taskStatus ); + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 3 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 4 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 5 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 6 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 7 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 8 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 9 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 10 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 11 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 12 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 13 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 14 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 15 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 16 ); + +}; + + +#endif _IOKIT_IOUSBMASSSTORAGECLASS_H diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBMassStorageUFISubclass.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBMassStorageUFISubclass.h.svn-base new file mode 100644 index 0000000..cbfe3c8 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBMassStorageUFISubclass.h.svn-base @@ -0,0 +1,355 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IOUSBMASSSTORAGEUFISUBCLASS_H +#define _IOKIT_IOUSBMASSSTORAGEUFISUBCLASS_H + +// This class' header file +#include <IOKit/usb/IOUSBMassStorageClass.h> +#include <IOKit/scsi/IOSCSIPrimaryCommandsDevice.h> + + +#pragma mark - +#pragma mark IOUSBMassStorageUFIDevice declaration + +class IOUSBMassStorageUFIDevice : public IOSCSIPrimaryCommandsDevice +{ + OSDeclareDefaultStructors(IOUSBMassStorageUFIDevice) + +private: + static void AsyncReadWriteComplete( SCSITaskIdentifier completedTask ); + +protected: + // Reserve space for future expansion. + struct IOUSBMassStorageUFIDeviceExpansionData + { + }; + IOUSBMassStorageUFIDeviceExpansionData *fIOUSBMassStorageUFIDeviceReserved; + + // ---- Medium Characteristics ---- + bool fMediumPresent; + + // The byte count of each physical block on the medium. + UInt32 fMediumBlockSize; + + // The total number of blocks of fMediumBlockSize on the medium. + UInt32 fMediumBlockCount; + + // Whether the installed medium is protected from writes + bool fMediumIsWriteProtected; + + // Polling thread variables + thread_call_t fPollingThread; + UInt32 fPollingMode; + enum + { + kPollingMode_Suspended = 0, + kPollingMode_NewMedia = 1, + kPollingMode_MediaRemoval = 2 + }; + + // ---- Methods for controlling the current state of device support ---- + virtual bool InitializeDeviceSupport( void ); + virtual void StartDeviceSupport ( void ); + virtual void SuspendDeviceSupport( void ); + virtual void ResumeDeviceSupport( void ); + virtual void StopDeviceSupport ( void ); + virtual void TerminateDeviceSupport( void ); + + // ---- Methods used for misc ---- + virtual bool ClearNotReadyStatus( void ); + virtual void CreateStorageServiceNub( void ); + virtual bool DetermineDeviceCharacteristics( void ); + + // ---- Methods used for controlling the polling thread ---- + virtual void ProcessPoll( void ); + virtual void EnablePolling( void ); + virtual void DisablePolling( void ); + + // ---- Main and support methods for polling for new Media ---- + virtual void PollForNewMedia( void ); + virtual bool DetermineMediaPresence( void ); + virtual bool DetermineMediumCapacity( + UInt64 * blockSize, + UInt64 * blockCount ); + virtual bool DetermineMediumWriteProtectState( void ); + + // ---- Main and support methods for polling for Media removal ---- + virtual void PollForMediaRemoval( void ); + + // ---- Methods used for power managment ---- + virtual UInt32 GetInitialPowerState ( void ); + virtual void InitializePowerManagement ( IOService * provider ); + virtual void HandlePowerChange ( void ); + virtual void HandleCheckPowerState ( void ); + virtual void TicklePowerManager ( void ); + virtual UInt32 GetNumberOfPowerStateTransitions ( void ); + + // ---- Methods used for handling medium characteristics ---- + virtual void SetMediumCharacteristics( + UInt32 blockSize, + UInt32 blockCount ); + + virtual void ResetMediumCharacteristics( void ); + + virtual IOReturn IssueRead( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueRead( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + void * clientData ); + + + virtual IOReturn IssueWrite( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueWrite( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + void * clientData ); + +public: + + static void sProcessPoll( void * pdtDriver, void * refCon ); + + // Interface to the UFI Storage Services Driver + // ---- Methods for controlling the device ---- + virtual IOReturn SyncReadWrite( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + UInt64 blockSize ); + + virtual IOReturn AsyncReadWrite( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + UInt64 blockSize, + void * clientData ); + + // ---- Methods for controlling medium state ---- + virtual IOReturn EjectTheMedium( void ); + + // ---- Methods for controlling media format ---- + virtual IOReturn FormatMedium( + UInt64 blockCount, + UInt64 blockSize ); + virtual UInt32 GetFormatCapacities( + UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + + // ---- Query methods to report device characteristics ---- + // Report the maximum number of blocks that the device can handle per + // read or write. A value of 0 (zero) indicates there is no limit aside + // from the size of the method's return parameter. + virtual UInt64 ReportDeviceMaxBlocksReadTransfer( void ); + virtual UInt64 ReportDeviceMaxBlocksWriteTransfer( void ); + + // ---- Query methods to report installed medium characteristics ---- + virtual UInt64 ReportMediumBlockSize( void ); + virtual UInt64 ReportMediumTotalBlockCount( void ); + virtual bool ReportMediumWriteProtection( void ); + + // Methods for getting device information strings + virtual char * GetVendorString( void ); + virtual char * GetProductString( void ); + virtual char * GetRevisionString( void ); + OSDictionary * GetProtocolCharacteristicsDictionary ( void ); + OSDictionary * GetDeviceCharacteristicsDictionary ( void ); + +protected: + // Utility methods used by all SCSI Command Set objects + + // isParameterValid methods are used to validate that the parameter passed into + // the command methods are of the correct value. + + // Validate Parameter used for 1 bit to 1 byte paramaters + bool IsParameterValid( + SCSICmdField1Byte param, + SCSICmdField1Byte mask ); + + // Validate Parameter used for 9 bit to 2 byte paramaters + bool IsParameterValid( + SCSICmdField2Byte param, + SCSICmdField2Byte mask ); + + // Validate Parameter used for 17 bit to 4 byte paramaters + bool IsParameterValid( + SCSICmdField4Byte param, + SCSICmdField4Byte mask ); + + // UFI Required Commands + virtual bool FORMAT_UNIT( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + IOByteCount defectListSize, + SCSICmdField1Byte TRACK_NUMBER, + SCSICmdField2Byte INTERLEAVE ); + + virtual bool INQUIRY( + SCSITaskIdentifier request, + IOMemoryDescriptor *dataBuffer, + SCSICmdField1Byte PAGE_OR_OPERATION_CODE, + SCSICmdField1Byte ALLOCATION_LENGTH ); + + virtual bool MODE_SELECT_10( + SCSITaskIdentifier request, + IOMemoryDescriptor *dataBuffer, + SCSICmdField1Bit PF, + SCSICmdField1Bit SP, + SCSICmdField2Byte PARAMETER_LIST_LENGTH ); + + virtual bool MODE_SENSE_10( + SCSITaskIdentifier request, + IOMemoryDescriptor *dataBuffer, + SCSICmdField1Bit DBD, + SCSICmdField2Bit PC, + SCSICmdField6Bit PAGE_CODE, + SCSICmdField2Byte PARAMETER_LIST_LENGTH ); + + virtual bool PREVENT_ALLOW_MEDIUM_REMOVAL( + SCSITaskIdentifier request, + SCSICmdField1Bit PREVENT ); + + virtual bool READ_10( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH ); + + virtual bool READ_12( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH ); + + virtual bool READ_CAPACITY( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Bit PMI ); + + virtual bool READ_FORMAT_CAPACITIES( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Byte ALLOCATION_LENGTH ); + + virtual bool REQUEST_SENSE( + SCSITaskIdentifier request, + IOMemoryDescriptor *dataBuffer, + SCSICmdField1Byte ALLOCATION_LENGTH ); + + virtual bool REZERO_UNIT( + SCSITaskIdentifier request ); + + virtual bool SEEK( + SCSITaskIdentifier request, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS ); + + virtual bool SEND_DIAGNOSTICS( + SCSITaskIdentifier request, + SCSICmdField1Bit PF, + SCSICmdField1Bit SELF_TEST, + SCSICmdField1Bit DEF_OFL, + SCSICmdField1Bit UNIT_OFL ); + + virtual bool START_STOP_UNIT( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField1Bit LOEJ, + SCSICmdField1Bit START ); + + virtual bool TEST_UNIT_READY( + SCSITaskIdentifier request ); + + virtual bool VERIFY( + SCSITaskIdentifier request, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYTCHK, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte VERIFICATION_LENGTH ); + + virtual bool WRITE_10( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH ); + + virtual bool WRITE_12( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit EBP, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH ); + + virtual bool WRITE_AND_VERIFY( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYTCHK, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH ); +}; + + +#pragma mark - +#pragma mark IOUSBMassStorageUFISubclass declaration + + +class IOUSBMassStorageUFISubclass : public IOUSBMassStorageClass +{ + OSDeclareDefaultStructors(IOUSBMassStorageUFISubclass) + +protected: + virtual bool BeginProvidedServices( void ); + virtual bool EndProvidedServices( void ); +}; + +#endif _IOKIT_IOUSBMASSSTORAGEUFISUBCLASS_H diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBNub.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBNub.h.svn-base new file mode 100644 index 0000000..a998e5b --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBNub.h.svn-base @@ -0,0 +1,69 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBNUB_H +#define _IOKIT_IOUSBNUB_H + +#include <IOKit/IOService.h> +#include <libkern/c++/OSData.h> +#include <IOKit/IOMemoryDescriptor.h> + +#include <IOKit/usb/USB.h> + +class IOUSBController; +class IOUSBPipe; + +/*! + @class IOUSBNub + @abstract Super class for for IOUSBDevice and IOUSBInterface. + */ +class IOUSBNub : public IOService +{ + OSDeclareDefaultStructors(IOUSBNub) + +public: + + // IOKit method + virtual void joinPMtree ( IOService * driver ); + + virtual bool USBCompareProperty(OSDictionary * matching, const char * key ); + + bool IsWildCardMatch( OSDictionary * matching, const char * key ); + bool USBComparePropertyWithMask( OSDictionary *matching, const char *key, const char * maskKey ); +}; + +#ifdef __cplusplus +extern "C" { +#endif + +void printDescriptor(const IOUSBDescriptorHeader *desc); +void printDeviceDescriptor(const IOUSBDeviceDescriptor *desc); +void printConfigDescriptor(const IOUSBConfigurationDescriptor *cd); +void printEndpointDescriptor(const IOUSBEndpointDescriptor *ed); +void printInterfaceDescriptor(const IOUSBInterfaceDescriptor *id); + +#ifdef __cplusplus +} +#endif + +#endif /* _IOKIT_IOUSBNUB_H */ diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBPipe.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBPipe.h.svn-base new file mode 100644 index 0000000..3286b92 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBPipe.h.svn-base @@ -0,0 +1,387 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.2 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBPIPE_H +#define _IOKIT_IOUSBPIPE_H + +#include <IOKit/IOService.h> +#include <IOKit/IOMemoryDescriptor.h> + +#include <IOKit/usb/USB.h> +#include <IOKit/usb/IOUSBController.h> +#include <IOKit/usb/IOUSBControllerV2.h> + +class IOUSBInterface; + +/*! + @class IOUSBPipe + @abstract The object representing an open pipe for a device. +*/ +class IOUSBPipe : public OSObject +{ + friend class IOUSBInterface; + friend class IOUSBDevice; + + OSDeclareDefaultStructors(IOUSBPipe) + +protected: + + const IOUSBEndpointDescriptor * _descriptor; + IOUSBController::Endpoint _endpoint; // tidied up version of descriptor + IOUSBController * _controller; + USBDeviceAddress _address; + UInt8 _status; // was previously used for status. Now used to detect whether a property exists or not + + struct ExpansionData + { + IOReturn _correctStatus; + IOUSBDevice * _device; // Remember containing device for clearing TTs + UInt8 _speed; + IOUSBInterface * _interface; + bool _crossEndianCompatible; + UInt32 _locationID; + }; + ExpansionData * _expansionData; + + virtual void free(); + + IOReturn ClosePipe(void); + +public: + + virtual bool InitToEndpoint(const IOUSBEndpointDescriptor *endpoint, UInt8 speed, + USBDeviceAddress address, IOUSBController * controller); + + // The following 2 methods are obsolete + // + static IOUSBPipe *ToEndpoint(const IOUSBEndpointDescriptor *endpoint, UInt8 speed, + USBDeviceAddress address, IOUSBController * controller); + + static IOUSBPipe *ToEndpoint(const IOUSBEndpointDescriptor *endpoint, + IOUSBDevice * device, IOUSBController * controller); + + static IOUSBPipe *ToEndpoint(const IOUSBEndpointDescriptor *endpoint, + IOUSBDevice * device, IOUSBController * controller, IOUSBInterface *interface); + + // Controlling pipe state + /*! + @function GetStatus + This method does NOT work. Do not call it. See GetPipeStatus for the correct method. + GetStatus will always return 0. + */ + virtual UInt8 GetStatus(void); + /*! + @function Abort + This method causes all outstanding I/O on a pipe to complete with return code kIOReturnAborted. It clears the halted bit but does NOT clear the + toggle bit on the endpoint in the controller. If you wish to clear the toggle bit, see ClearPipeStall + */ + virtual IOReturn Abort(void); + /*! + @function Reset + This method is identical to ClearPipeStall(false). The use of that API is preferred. + */ + virtual IOReturn Reset(void); + /*! + @function ClearStall + This method is equivalent to ClearPipeStall(false). This method is available before version 1.9. + */ + virtual IOReturn ClearStall(void); + + // + // Transferring Data + // + + // deprecated + virtual IOReturn Read(IOMemoryDescriptor * buffer, + IOUSBCompletion * completion = 0, + IOByteCount * bytesRead = 0); + + // deprecated + virtual IOReturn Write(IOMemoryDescriptor * buffer, + IOUSBCompletion * completion = 0); + + // Transfer data over Isochronous pipes + /*! + @function Read + Read from an isochronous endpoint + @param buffer place to put the transferred data + @param frameStart USB frame number of the frame to start transfer + @param numFrames Number of frames to transfer + @param frameList Bytes to transfer and result for each frame + @param completion describes action to take when buffer has been filled + */ + virtual IOReturn Read(IOMemoryDescriptor * buffer, + UInt64 frameStart, UInt32 numFrames, IOUSBIsocFrame *frameList, + IOUSBIsocCompletion * completion = 0); + /*! + @function Write + Write to an isochronous endpoint + @param buffer place to get the transferred data + @param frameStart USB frame number of the frame to start transfer + @param numFrames Number of frames to transfer + @param frameList Bytes to transfer and result for each frame + @param completion describes action to take when buffer has been emptied + */ + virtual IOReturn Write(IOMemoryDescriptor * buffer, + UInt64 frameStart, UInt32 numFrames, IOUSBIsocFrame *frameList, + IOUSBIsocCompletion * completion = 0); + + // Do a control request over a Control pipe, using a memory descriptor + /*! + @function ControlRequest + Make a control request + There are two versions of this method, one uses a simple void * + to point to the data portion of the transfer, the other uses an + IOMemoryDescriptor to point to the data. + @param request parameter block for the control request + @param completion describes action to take when the request has been executed + */ + virtual IOReturn ControlRequest(IOUSBDevRequestDesc *request, + IOUSBCompletion *completion = 0); + + // Do a control request over a Control pipe, using a simple buffer + virtual IOReturn ControlRequest(IOUSBDevRequest *request, + IOUSBCompletion *completion = 0); + + /* + * Accessors + */ + /*! + @function GetEndpoint + returns a pointer to the Endpoint structure for the pipe. + */ + virtual const IOUSBController::Endpoint * GetEndpoint(); + /*! + @function GetEndpointDescriptor + returns the endpoint descriptor for the pipe. + */ + virtual const IOUSBEndpointDescriptor * GetEndpointDescriptor(); + /*! + @function GetDirection + returns the direction of the pipe:kUSBOut/kUSBIn for a bulk or interrupt pipe, + kUSBAnyDirn for a control pipe. + */ + virtual UInt8 GetDirection(); + /*! + @function GetType + returns the pipe type: kUSBControl, kUSBBulk or kUSBInterrupt. + */ + virtual UInt8 GetType(); + /*! + @function GetEndpointNumber + returns the endpoint number in the device that the pipe is connected to. + */ + virtual UInt8 GetEndpointNumber(); + virtual USBDeviceAddress GetAddress(); + virtual UInt16 GetMaxPacketSize(); + virtual UInt8 GetInterval(); + + // Transfer data over Bulk pipes with timeouts. + OSMetaClassDeclareReservedUsed(IOUSBPipe, 0); + + // deprecated + virtual IOReturn Read(IOMemoryDescriptor * buffer, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOUSBCompletion * completion = 0, + IOByteCount * bytesRead = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 1); + + // deprecated + virtual IOReturn Write(IOMemoryDescriptor * buffer, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOUSBCompletion * completion = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 2); + // Do a control request over a Control pipe, using a memory descriptor + /*! + @function ControlRequest + Make a control request. + There are two versions of this method, one uses a simple void * + to point to the data portion of the transfer, the other uses an + IOMemoryDescriptor to point to the data. + @param request parameter block for the control request + @param noDataTimeout Specifies an amount of time (in ms) after which the command will be aborted + if no data has been transferred on the bus. + @param completionTimeout Specifies an amount of time (in ms) after which the command will be aborted if the entire command has + not been completed. + @param completion describes action to take when the request has been executed + */ + virtual IOReturn ControlRequest(IOUSBDevRequestDesc *request, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOUSBCompletion *completion = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 3); + // Do a control request over a Control pipe, using a simple buffer + virtual IOReturn ControlRequest(IOUSBDevRequest *request, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOUSBCompletion *completion = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 4); + /*! + @function Read + Read from an interrupt or bulk endpoint + @param buffer place to put the transferred data + @param noDataTimeout number of milliseconds of no bus activity until transaction times out. Note that if a tranasction times out + the driver software may have to resynchronize the data toggle. See ClearPipeStall. + @param completionTimeout number of milliseconds from the time the transaction is placed on the bus until it times out + @param reqCount requested number of bytes to transfer. must be <= buffer->getLength() + @param completion describes action to take when buffer has been filled + @param bytesRead returns total bytes read for synchronous reads + */ + virtual IOReturn Read(IOMemoryDescriptor * buffer, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOByteCount reqCount, + IOUSBCompletion * completion = 0, + IOByteCount * bytesRead = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 5); + /*! + @function Write + Write to an interrupt or bulk endpoint + @param buffer place to get the transferred data + @param noDataTimeout number of milliseconds of no bus activity until transaction times out. Note that if a tranasction times out + the driver software may have to resynchronize the data toggle. See ClearPipeStall. + @param completionTimeout number of milliseconds from the time the transaction is placed on the bus until it times out + @param reqCount requested number of bytes to transfer. must be <= buffer->getLength() + @param completion describes action to take when buffer has been emptied + */ + virtual IOReturn Write(IOMemoryDescriptor * buffer, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOByteCount reqCount, + IOUSBCompletion * completion = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 6); + /*! + @function GetPipeStatus + Returns the status of the pipe (kIOUSBPipeStalled of the pipe is stalled, else kIOReturnSuccess) + */ + virtual IOReturn GetPipeStatus(void); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 7); + /*! + @function ClearPipeStall + AVAILABLE ONLY IN VERSION 1.9 AND ABOVE + This method causes all outstanding I/O on a pipe to complete with return code kIOUSBTransactionReturned. It also clears both the halted bit and the + toggle bit on the endpoint in the controller. The driver may need to reset the data toggle within the device to avoid losing any data. If the + device correctly handles the ClearFeature(ENDPOINT_HALT) device request, then this API will handle that by sending the correct request to the + device. + @param withDeviceRequest if true, a ClearFeature(ENDPOINT_HALT) is sent to the appropriate endpoint on the device after the transactions on the + controllers endpoint are returned and the toggle bit on the controllers endpoint is cleared. if this parameter is false, then this is equivalent + to the pre-1.9 API. This means that the endpoint on the controller is cleared, but no DeviceRequest is sent to the device's endpoint. + */ + virtual IOReturn ClearPipeStall(bool withDeviceRequest); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 8); + /*! + @function SetPipePolicy + AVAILABLE ONLY IN VERSION 1.9 AND ABOVE + This method allows a driver to change the maxPacketSize of an Isochronous pipe, or the polling interval for an interrupt pipe. There is a limited + amount of bandwidth on any single bus, and isochronous pipes tend to use much of this bandwidth. The driver may know, however, that there + will never be as much bandwidth used as is specified in the pipe's endpoint descriptor. Therefore, the driver may return some of this + bandwidth to the system by using this method. Additionally, if on an open of an IOUSBInterface any of the Isochronous pipes is unable to be + opened because of a lack of bandwidth, the pipe will be created with a bandwidth of zero, and the driver may get some of the limited bandwidth + remaining by using this call. + This method returns kIOReturnBadArgument if the pipe is a bulk on control pipe, or if the maxPacketSize parameter is larger than the amount specified + in the endpoint descriptor. It returns kIOReturnNoBandwidth if the bandwidth requested cannot be allocated. Otherwise it returns kIOReturnSuccess. + @param maxPacketSize specifies the maximum number of bytes to be used in any one millisecond frame by this pipe. The value must be less than or + equal to the maxPacketSize specified in the endpoint descriptor. + @param maxInterval not currently used. reserved for future expansion + + */ + virtual IOReturn SetPipePolicy(UInt16 maxPacketSize, UInt8 maxInterval); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 9); + + // Transfer data over Isochronous pipes and process the frame list at hardware interrupt time + /*! + @function Read + AVAILABLE ONLY IN VERSION 1.9.2 AND ABOVE + Read from an isochronous endpoint and process the IOUSBLowLatencyIsocFrame fields at + hardware interrupt time + @param buffer place to put the transferred data + @param frameStart USB frame number of the frame to start transfer + @param numFrames Number of frames to transfer + @param frameList Bytes to transfer, result, and time stamp for each frame + @param completion describes action to take when buffer has been filled + @param updateFrequency describes how often (in milliseconds) should the frame list be processed + */ + virtual IOReturn Read(IOMemoryDescriptor * buffer, + UInt64 frameStart, UInt32 numFrames, IOUSBLowLatencyIsocFrame *frameList, + IOUSBLowLatencyIsocCompletion * completion = 0, UInt32 updateFrequency = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 10); + /*! + @function Write + AVAILABLE ONLY IN VERSION 1.9.2 AND ABOVE + Write to an isochronous endpoint + @param buffer place to get the data to transfer + @param frameStart USB frame number of the frame to start transfer + @param numFrames Number of frames to transfer + @param frameList Pointer to list of frames indicating bytes to transfer and result for each frame + @param completion describes action to take when buffer has been emptied + @param updateFrequency describes how often (in milliseconds) should the frame list be processed + */ + virtual IOReturn Write(IOMemoryDescriptor * buffer, + UInt64 frameStart, UInt32 numFrames, IOUSBLowLatencyIsocFrame *frameList, + IOUSBLowLatencyIsocCompletion * completion = 0, UInt32 updateFrequency = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 11); + /*! + @function Read + Read from an interrupt or bulk endpoint + @param buffer place to put the transferred data + @param noDataTimeout number of milliseconds of no bus activity until transaction times out. Note that if a tranasction times out + the driver software may have to resynchronize the data toggle. See ClearPipeStall. + @param completionTimeout number of milliseconds from the time the transaction is placed on the bus until it times out + @param reqCount requested number of bytes to transfer. must be <= buffer->getLength() + @param completion describes action to take when buffer has been filled + @param bytesRead returns total bytes read for synchronous reads + */ + virtual IOReturn Read(IOMemoryDescriptor * buffer, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOByteCount reqCount, + IOUSBCompletionWithTimeStamp * completion = 0, + IOByteCount * bytesRead = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 12); + virtual bool InitToEndpoint(const IOUSBEndpointDescriptor *endpoint, UInt8 speed, + USBDeviceAddress address, IOUSBController * controller, IOUSBDevice * device, IOUSBInterface * interface); + + OSMetaClassDeclareReservedUnused(IOUSBPipe, 13); + OSMetaClassDeclareReservedUnused(IOUSBPipe, 14); + OSMetaClassDeclareReservedUnused(IOUSBPipe, 15); + OSMetaClassDeclareReservedUnused(IOUSBPipe, 16); + OSMetaClassDeclareReservedUnused(IOUSBPipe, 17); + OSMetaClassDeclareReservedUnused(IOUSBPipe, 18); + OSMetaClassDeclareReservedUnused(IOUSBPipe, 19); + +}; + +#endif /* _IOKIT_IOUSBPIPE_H */ diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBRootHubDevice.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBRootHubDevice.h.svn-base new file mode 100644 index 0000000..19a17c4 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBRootHubDevice.h.svn-base @@ -0,0 +1,97 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBROOTHUBDEVICE_H +#define _IOKIT_IOUSBROOTHUBDEVICE_H + +#include <IOKit/usb/IOUSBHubDevice.h> + +/*! + @class IOUSBRootHubDevice + @abstract The object representing the Root Hub simulation. + */ +class IOUSBRootHubDevice : public IOUSBHubDevice +{ + OSDeclareDefaultStructors(IOUSBRootHubDevice) + +private: + UInt16 configuration; + IOCommandGate *_commandGate; + + // private method which overrides the same method in IOUSBHubDevice + virtual bool InitializeCharacteristics(void); // used at start + + struct ExpansionData + { + IOService * _IOResourcesEntry; + }; + ExpansionData *_expansionData; + +public: + // static methods + static IOUSBRootHubDevice *NewRootHubDevice(void); + static IOReturn GatedDeviceRequest (OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + + // IOKit methods + virtual bool init(); + virtual bool start( IOService * provider ); + virtual void stop( IOService *provider ); + virtual void free(); + + // IOUSBHubDevice methods + virtual bool IsRootHub(void); + virtual UInt32 RequestExtraPower(UInt32 requestedPower); + virtual void ReturnExtraPower(UInt32 returnedPower); + + // + virtual UInt32 RequestSleepPower(UInt32 requestedPower); + virtual void ReturnSleepPower(UInt32 returnedPower); + + // a non static but non-virtual function + IOReturn DeviceRequestWorker(IOUSBDevRequest *request, UInt32 noDataTimeout, UInt32 completionTimeout, IOUSBCompletion *completion); + + // IOUSBDevice methods overriden here + virtual IOReturn DeviceRequest(IOUSBDevRequest *request, IOUSBCompletion *completion = 0); + virtual IOReturn DeviceRequest(IOUSBDevRequest *request, UInt32 noDataTimeout, UInt32 completionTimeout, IOUSBCompletion *completion = 0); + + OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 0); + virtual IOReturn GetDeviceInformation(UInt32 *info); + + OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 1); + virtual void InitializeExtraPower(UInt32 maxPortCurrent, UInt32 totalExtraCurrent); + + OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 2); + virtual void SetSleepCurrent(UInt32 sleepCurrent); + + OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 3); + virtual UInt32 GetSleepCurrent(); + + OSMetaClassDeclareReservedUnused(IOUSBRootHubDevice, 4); +}; + +#endif /* _IOKIT_IOUSBROOTHUBDEVICE_H */ + diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBUserClient.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBUserClient.h.svn-base new file mode 100644 index 0000000..1cd47a8 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBUserClient.h.svn-base @@ -0,0 +1,144 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBUSERCLIENT_H +#define _IOKIT_IOUSBUSERCLIENT_H + +// these are the new User Client method names +enum { + kUSBDeviceUserClientOpen, + kUSBDeviceUserClientClose, + kUSBDeviceUserClientSetConfig, + kUSBDeviceUserClientGetConfig, + kUSBDeviceUserClientGetConfigDescriptor, + kUSBDeviceUserClientGetFrameNumber, + kUSBDeviceUserClientDeviceRequestOut, + kUSBDeviceUserClientDeviceRequestIn, + kUSBDeviceUserClientCreateInterfaceIterator, + kUSBDeviceUserClientResetDevice, + kUSBDeviceUserClientSuspend, + kUSBDeviceUserClientAbortPipeZero, + kUSBDeviceUserClientReEnumerateDevice, + kUSBDeviceUserClientGetMicroFrameNumber, + kUSBDeviceUserClientGetFrameNumberWithTime, + kUSBDeviceUserClientSetAsyncPort, + kUSBDeviceUserClientGetDeviceInformation, + kUSBDeviceUserClientRequestExtraPower, + kUSBDeviceUserClientReturnExtraPower, + kUSBDeviceUserClientGetExtraPowerAllocated, + kIOUSBLibDeviceUserClientNumCommands + }; + +enum { + kUSBInterfaceUserClientOpen, + kUSBInterfaceUserClientClose, + kUSBInterfaceUserClientGetDevice, + kUSBInterfaceUserClientSetAlternateInterface, + kUSBInterfaceUserClientGetFrameNumber, + kUSBInterfaceUserClientGetPipeProperties, + kUSBInterfaceUserClientReadPipe, + kUSBInterfaceUserClientWritePipe, + kUSBInterfaceUserClientGetPipeStatus, + kUSBInterfaceUserClientAbortPipe, + kUSBInterfaceUserClientResetPipe, + kUSBInterfaceUserClientClearPipeStall, + kUSBInterfaceUserClientControlRequestOut, + kUSBInterfaceUserClientControlRequestIn, + kUSBInterfaceUserClientSetPipePolicy, + kUSBInterfaceUserClientGetBandwidthAvailable, + kUSBInterfaceUserClientGetEndpointProperties, + kUSBInterfaceUserClientLowLatencyPrepareBuffer, + kUSBInterfaceUserClientLowLatencyReleaseBuffer, + kUSBInterfaceUserClientGetMicroFrameNumber, + kUSBInterfaceUserClientGetFrameListTime, + kUSBInterfaceUserClientGetFrameNumberWithTime, + kUSBInterfaceUserClientSetAsyncPort, + kUSBInterfaceUserClientReadIsochPipe, + kUSBInterfaceUserClientWriteIsochPipe, + kUSBInterfaceUserClientLowLatencyReadIsochPipe, + kUSBInterfaceUserClientLowLatencyWriteIsochPipe, + kUSBInterfaceUserClientGetConfigDescriptor, + kIOUSBLibInterfaceUserClientNumCommands + }; + + +#if KERNEL +#include <IOKit/IOService.h> +#include <IOKit/IOUserClient.h> +#include <IOKit/usb/USB.h> + +//================================================================================================ +// +// Structure declarations +// +//================================================================================================ +// +typedef struct IOUSBUserClientAsyncParamBlock IOUSBUserClientAsyncParamBlock; + +struct IOUSBUserClientAsyncParamBlock +{ + OSAsyncReference64 fAsyncRef; + uint32_t fAsyncCount; + uint32_t fMax; + IOMemoryDescriptor * fMem; + IOUSBDevRequestDesc req; +}; + +typedef struct IOUSBInterfaceUserClientISOAsyncParamBlock IOUSBInterfaceUserClientISOAsyncParamBlock; +struct IOUSBInterfaceUserClientISOAsyncParamBlock +{ + OSAsyncReference64 fAsyncRef; + uint32_t fAsyncCount; + mach_vm_size_t frameLen; // In bytes + mach_vm_address_t frameBase; // In user task + IOMemoryDescriptor * dataMem; + IOMemoryDescriptor * countMem; + uint64_t numFrames; + IOUSBIsocFrame frames[0]; // Must be the last one +}; + + +//================================================================================================ +// +// This class is used to add an IOProviderMergeProperties dictionary entry to a provider's +// property list, thus providing a tie between hardware and a CFBundle at hardware +// load time. This property usually contains the user client class name and the CFPlugInTypes UUID's +// but it can contain other properties. +// +//================================================================================================ +// +class IOUSBUserClientInit : public IOService +{ + OSDeclareDefaultStructors(IOUSBUserClientInit); + +public: + + virtual bool start(IOService * provider) ; + virtual bool MergeDictionaryIntoProvider(IOService * provider, OSDictionary * mergeDict); + virtual bool MergeDictionaryIntoDictionary(OSDictionary * sourceDictionary, OSDictionary * targetDictionary); +}; + +#endif // KERNEL + +#endif /* ! _IOKIT_IOUSBUSERCLIENT_H */ + diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBWorkLoop.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBWorkLoop.h.svn-base new file mode 100644 index 0000000..7630704 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/IOUSBWorkLoop.h.svn-base @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2001-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBWORKLOOP_H +#define _IOKIT_IOUSBWORKLOOP_H + +#include <IOKit/IOWorkLoop.h> + +/*! + @class IOUSBWorkLoop + @abstract Subclass of IOWorkloop that allows the USB stack to more finely control sleep and wake. + */ +class IOUSBWorkLoop : public IOWorkLoop +{ + OSDeclareDefaultStructors(IOUSBWorkLoop) + +protected: + void * fSleepToken; +#ifndef __OPEN_SOURCE__ + lck_grp_t * fLockGroup; +#endif + bool init ( const char * controllerLocation ); + void free ( void ); + + // Overrides to check for sleeping + virtual void closeGate(); + virtual bool tryCloseGate(); + +public: + // Create a workloop + static IOUSBWorkLoop * workLoop(const char * controllerLocation); + + // Put workloop to sleep (Must have gate closed, opens gate if successful) + virtual IOReturn sleep(void *token); + + // Wake workloop up (closes gate if successful) + virtual IOReturn wake(void *token); + + void CloseGate(void); + void OpenGate(void); +}; + +#endif /* ! _IOKIT_IOUSBWORKLOOP_H */ + diff --git a/i386/include/IOKit/usb/.svn/text-base/USB.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/USB.h.svn-base new file mode 100644 index 0000000..8ba12bb --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/USB.h.svn-base @@ -0,0 +1,1076 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _USB_H +#define _USB_H + +#if KERNEL + #include <libkern/OSByteOrder.h> + #include <IOKit/IOMemoryDescriptor.h> +#else + #include <libkern/OSByteOrder.h> +#endif + +#include <IOKit/IOTypes.h> + +#if !defined(__USB__) +# include <IOKit/usb/USBSpec.h> +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + /*! + @header USB.h + @abstract Public Interfaces to the USB implementation in Mac OS X. + @discussion This header file contains definitions and structures that are used in the different USB API's in Mac OS X, both in the kernel and in the user space. + */ + + /*! + @defined Endian conversion definitions + @discussion The USB API's use a convention of specifying parameters in the host order. The USB spec specifies that multi-byte items should be + formatted in little endian order. The following macros allow one to translate multi-byte values from Host order to USB order and vice versa. There are separate macros for + in-kernel use and for user space use. + */ +#define USBToHostWord OSSwapLittleToHostInt16 +#define HostToUSBWord OSSwapHostToLittleInt16 +#define USBToHostLong OSSwapLittleToHostInt32 +#define HostToUSBLong OSSwapHostToLittleInt32 + + /*! + @enum Miscellaneous Constants + @discussion + */ + enum { + kUSBDeviceIDShift = 7, + kUSBMaxDevices = 128, + kUSBMaxDevice = kUSBMaxDevices-1, + kUSBDeviceIDMask = 0x7f, + + kUSBPipeIDMask = 0xf, + kUSBMaxPipes = 32, // In and Out pipes can have same pipe number. + + kUSBInterfaceIDShift = 8, + kUSBMaxInterfaces = 1 << kUSBInterfaceIDShift, + kUSBInterfaceIDMask = kUSBMaxInterfaces-1, + + kUSBEndPtShift = 7, + kUSBDeviceMask = ((1 << kUSBEndPtShift) -1), + + kUSBNoPipeIdx = -1 +}; + +/*! +@enum bRequest Shifts and Masks +@discussion These are used to create the macro to encode the bRequest filed of a Device Request +*/ +enum { + kUSBRqDirnShift = 7, + kUSBRqDirnMask = 1, + + kUSBRqTypeShift = 5, + kUSBRqTypeMask = 3, + + kUSBRqRecipientMask = 0X1F +}; + +/*! +@defined USBmakebmRequestType +@discussion Macro to encode the bRequest field of a Device Request. It is used when constructing an IOUSBDevRequest. +*/ +#define USBmakebmRequestType(direction, type, recipient) \ + ((direction & kUSBRqDirnMask) << kUSBRqDirnShift) | \ + ((type & kUSBRqTypeMask) << kUSBRqTypeShift) | \ + (recipient & kUSBRqRecipientMask) + +/*! +@enum kUSBMaxIsocFrameReqCount +@discussion Maximum size in bytes allowed for one Isochronous frame +*/ +enum { + kUSBMaxFSIsocEndpointReqCount = 1023, // max size (bytes) of any one Isoc frame for 1 FS endpoint + kUSBMaxHSIsocEndpointReqCount = 3072, // max size (bytes) of any one Isoc frame for 1 HS endpoint + kUSBMaxHSIsocFrameCount = 7168 // max size (bytes) of all Isoc transfers in a HS frame +}; + +/*! +@defined EncodeRequest +@discussion Macro that encodes the bRequest and bRequestType fields of a IOUSBDevRequest into a single value. It is useful when one needs +to know what type of request the IOUSBDevRequest encodes and simplifies comparisons. +*/ +#define EncodeRequest(request, direction, type, recipient) \ + (((UInt16)request << 8) + \ + ((UInt16)recipient + \ + ((UInt16)type << kUSBRqTypeShift) + \ + ((UInt16)direction << kUSBRqDirnShift))) + + +/*! +@enum Standard Device Requests +@discussion Encoding of the standard device requests. +<tt> +<pre><b> +bmRequestType bRequest wValue wIndex wLength Data</b> +00000000B CLEAR_FEATURE Feature Zero Zero None (device) +00000001B Feature Interface Zero None (Interface) +00000010B Feature Endpoint Zero None (Endpoint) + +10000000B GET_CONFIGURATION Zero Zero One Configuration +10000000B GET_DESCRIPTOR Type LangID Length Descriptor +10000001B GET_INTERFACE Zero Interface One Alternate + +10000000B GET_STATUS Zero Zero Two status (device) +10000001B Zero Interface Two status (Interface) +10000010B Zero Endpoint Two status (Endpoint) + +00000000B SET_ADDRESS Address Zero Zero None +00000000B SET_CONFIGURATION Configuration Zero Zero None +00000000B SET_DESCRIPTOR Type LangID Length Descriptor + +00000000B SET_FEATURE Feature Zero Zero None (device) +00000001B Feature Interface Zero None (Interface) +00000010B Feature Endpoint Zero None (Endpoint) + +00000001B SET_INTERFACE Alternate Interface Zero None +10000010B SYNCH_FRAME Zero Endpoint Two Frame Number +</pre> +</tt> +*/ +enum { + kClearDeviceFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBStandard, kUSBDevice), + kClearInterfaceFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBStandard, kUSBInterface), + kClearEndpointFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBStandard, kUSBEndpoint), + kGetConfiguration = EncodeRequest(kUSBRqGetConfig, kUSBIn, kUSBStandard, kUSBDevice), + kGetDescriptor = EncodeRequest(kUSBRqGetDescriptor, kUSBIn, kUSBStandard, kUSBDevice), + kGetInterface = EncodeRequest(kUSBRqGetInterface, kUSBIn, kUSBStandard, kUSBInterface), + kGetDeviceStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBStandard, kUSBDevice), + kGetInterfaceStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBStandard, kUSBInterface), + kGetEndpointStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBStandard, kUSBEndpoint), + kSetAddress = EncodeRequest(kUSBRqSetAddress, kUSBOut, kUSBStandard, kUSBDevice), + kSetConfiguration = EncodeRequest(kUSBRqSetConfig, kUSBOut, kUSBStandard, kUSBDevice), + kSetDescriptor = EncodeRequest(kUSBRqSetDescriptor, kUSBOut, kUSBStandard, kUSBDevice), + kSetDeviceFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBStandard, kUSBDevice), + kSetInterfaceFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBStandard, kUSBInterface), + kSetEndpointFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBStandard, kUSBEndpoint), + kSetInterface = EncodeRequest(kUSBRqSetInterface, kUSBOut, kUSBStandard, kUSBInterface), + kSyncFrame = EncodeRequest(kUSBRqSyncFrame, kUSBIn, kUSBStandard, kUSBEndpoint), +}; + +/*! +@defined kCallInterfaceOpenWithGate + @discussion If the USB Device has this property, drivers for any of its interfaces will have their handleOpen method called while holding the workloop gate. + */ +#define kCallInterfaceOpenWithGate "kCallInterfaceOpenWithGate" + +// TYPES + +typedef UInt16 USBDeviceAddress; + +typedef uint32_t USBPhysicalAddress32; + +/*! + @typedef IOUSBIsocFrame + @discussion Structure used to encode information about each isoc frame. + @param frStatus Returns status associated with the frame. + @param frReqCount Input specifiying how many bytes to read or write. + @param frActCount Actual # of bytes transferred. +*/ +typedef struct IOUSBIsocFrame { + IOReturn frStatus; + UInt16 frReqCount; + UInt16 frActCount; +} IOUSBIsocFrame; + + +/*! + @typedef IOUSBLowLatencyIsocFrame + @discussion Structure used to encode information about each isoc frame that is processed + at hardware interrupt time (low latency). + @param frStatus Returns status associated with the frame. + @param frReqCount Input specifiying how many bytes to read or write. + @param frActCount Actual # of bytes transferred. + @param frTimeStamp Time stamp that indicates time when frame was procesed. +*/ +struct IOUSBLowLatencyIsocFrame { + IOReturn frStatus; + UInt16 frReqCount; + UInt16 frActCount; + AbsoluteTime frTimeStamp; +}; +typedef struct IOUSBLowLatencyIsocFrame IOUSBLowLatencyIsocFrame; + +/*! +@typedef IOUSBCompletionAction + @discussion Function called when USB I/O completes. + @param target The target specified in the IOUSBCompletion struct. + @param parameter The parameter specified in the IOUSBCompletion struct. + @param status Completion status. + @param bufferSizeRemaining Bytes left to be transferred. + */ +typedef void (*IOUSBCompletionAction)( + void * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining); + +/*! +@typedef IOUSBCompletionActionWithTimeStamp + @discussion Function called when USB I/O completes. + @param target The target specified in the IOUSBCompletion struct. + @param parameter The parameter specified in the IOUSBCompletion struct. + @param status Completion status. + @param bufferSizeRemaining Bytes left to be transferred. + @param timeStamp Time at which the transaction was processed. + */ +typedef void (*IOUSBCompletionActionWithTimeStamp)( + void * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining, + AbsoluteTime timeStamp); + +/*! + @typedef IOUSBIsocCompletionAction + @discussion Function called when Isochronous USB I/O completes. + @param target The target specified in the IOUSBIsocCompletionn struct. + @param parameter The parameter specified in the IOUSBIsocCompletion struct. + @param status Completion status. + @param pFrames Pointer to the frame list containing the status for each frame transferred. +*/ +typedef void (*IOUSBIsocCompletionAction)( + void * target, + void * parameter, + IOReturn status, + IOUSBIsocFrame *pFrames); + +/*! + @typedef IOUSBLowLatencyIsocCompletionAction + @discussion Function called when Low Latency Isochronous USB I/O completes. + @param target The target specified in the IOUSBLowLatencyIsocCompletion struct. + @param parameter The parameter specified in the IOUSBLowLatencyIsocCompletion struct. + @param status Completion status. + @param pFrames Pointer to the low latency frame list containing the status for each frame transferred. +*/ +typedef void (*IOUSBLowLatencyIsocCompletionAction)( + void * target, + void * parameter, + IOReturn status, + IOUSBLowLatencyIsocFrame *pFrames); + +/*! +@typedef IOUSBCompletion + @discussion Struct specifying action to perform when a USB I/O completes. + @param target The target to pass to the action function. + @param action The function to call. + @param parameter The parameter to pass to the action function. + */ +typedef struct IOUSBCompletion { + void * target; + IOUSBCompletionAction action; + void * parameter; +} IOUSBCompletion; + +/*! +@typedef IOUSBCompletionWithTimeStamp + @discussion Struct specifying action to perform when a USB I/O completes. + @param target The target to pass to the action function. + @param action The function to call. + @param parameter The parameter to pass to the action function. + */ +typedef struct IOUSBCompletionWithTimeStamp { + void * target; + IOUSBCompletionActionWithTimeStamp action; + void * parameter; +} IOUSBCompletionWithTimeStamp; + +/*! + @typedef IOUSBIsocCompletion + @discussion Struct specifying action to perform when an Isochronous USB I/O completes. + @param target The target to pass to the action function. + @param action The function to call. + @param parameter The parameter to pass to the action function. +*/ +typedef struct IOUSBIsocCompletion { + void * target; + IOUSBIsocCompletionAction action; + void * parameter; +} IOUSBIsocCompletion; + +/*! + @typedef IOUSBLowLatencyIsocCompletion + @discussion Struct specifying action to perform when an Low Latency Isochronous USB I/O completes. + @param target The target to pass to the action function. + @param action The function to call. + @param parameter The parameter to pass to the action function. +*/ +typedef struct IOUSBLowLatencyIsocCompletion { + void * target; + IOUSBLowLatencyIsocCompletionAction action; + void * parameter; +} IOUSBLowLatencyIsocCompletion; + + +/*! +@defined IOUSBFamily error codes +@discussion Errors specific to the IOUSBFamily. Note that the iokit_usb_err(x) translates to 0xe0004xxx, where xxx is the value in parenthesis as a hex number. +*/ +#define iokit_usb_err(return) (sys_iokit|sub_iokit_usb|return) +#define kIOUSBUnknownPipeErr iokit_usb_err(0x61) // 0xe0004061 Pipe ref not recognized +#define kIOUSBTooManyPipesErr iokit_usb_err(0x60) // 0xe0004060 Too many pipes +#define kIOUSBNoAsyncPortErr iokit_usb_err(0x5f) // 0xe000405f no async port +#define kIOUSBNotEnoughPipesErr iokit_usb_err(0x5e) // 0xe000405e not enough pipes in interface +#define kIOUSBNotEnoughPowerErr iokit_usb_err(0x5d) // 0xe000405d not enough power for selected configuration +#define kIOUSBEndpointNotFound iokit_usb_err(0x57) // 0xe0004057 Endpoint Not found +#define kIOUSBConfigNotFound iokit_usb_err(0x56) // 0xe0004056 Configuration Not found +#define kIOUSBTransactionTimeout iokit_usb_err(0x51) // 0xe0004051 Transaction timed out +#define kIOUSBTransactionReturned iokit_usb_err(0x50) // 0xe0004050 The transaction has been returned to the caller +#define kIOUSBPipeStalled iokit_usb_err(0x4f) // 0xe000404f Pipe has stalled, error needs to be cleared +#define kIOUSBInterfaceNotFound iokit_usb_err(0x4e) // 0xe000404e Interface ref not recognized +#define kIOUSBLowLatencyBufferNotPreviouslyAllocated iokit_usb_err(0x4d) // 0xe000404d Attempted to use user land low latency isoc calls w/out calling PrepareBuffer (on the data buffer) first +#define kIOUSBLowLatencyFrameListNotPreviouslyAllocated iokit_usb_err(0x4c) // 0xe000404c Attempted to use user land low latency isoc calls w/out calling PrepareBuffer (on the frame list) first +#define kIOUSBHighSpeedSplitError iokit_usb_err(0x4b) // 0xe000404b Error to hub on high speed bus trying to do split transaction +#define kIOUSBSyncRequestOnWLThread iokit_usb_err(0x4a) // 0xe000404a A synchronous USB request was made on the workloop thread (from a callback?). Only async requests are permitted in that case +#define kIOUSBDeviceNotHighSpeed iokit_usb_err(0x49) // 0xe0004049 The device is not a high speed device, so the EHCI driver returns an error +#define kIOUSBDevicePortWasNotSuspended iokit_usb_err(0x50) // 0xe0004050 Port was not suspended + +/*! +@defined IOUSBFamily hardware error codes +@discussion These errors are returned by the OHCI controller. The # in parenthesis (xx) corresponds to the OHCI Completion Code. +For the following Completion codes, we return a generic IOKit error instead of a USB specific error. +<tt> +<pre> +Completion Code Error Returned Description +9 kIOReturnUnderrun (Data Underrun) EP returned less data than max packet size +8 kIOReturnOverrun (Data Overrun) Packet too large or more data than buffer +5 kIOReturnNotResponding Device Not responding +4 kIOUSBPipeStalled Endpoint returned a STALL PID +</pre> +</tt> +*/ +#define kIOUSBLinkErr iokit_usb_err(0x10) // 0xe0004010 +#define kIOUSBNotSent2Err iokit_usb_err(0x0f) // 0xe000400f Transaction not sent +#define kIOUSBNotSent1Err iokit_usb_err(0x0e) // 0xe000400e Transaction not sent +#define kIOUSBBufferUnderrunErr iokit_usb_err(0x0d) // 0xe000400d Buffer Underrun (Host hardware failure on data out, PCI busy?) +#define kIOUSBBufferOverrunErr iokit_usb_err(0x0c) // 0xe000400c Buffer Overrun (Host hardware failure on data out, PCI busy?) +#define kIOUSBReserved2Err iokit_usb_err(0x0b) // 0xe000400b Reserved +#define kIOUSBReserved1Err iokit_usb_err(0x0a) // 0xe000400a Reserved +#define kIOUSBWrongPIDErr iokit_usb_err(0x07) // 0xe0004007 Pipe stall, Bad or wrong PID +#define kIOUSBPIDCheckErr iokit_usb_err(0x06) // 0xe0004006 Pipe stall, PID CRC error +#define kIOUSBDataToggleErr iokit_usb_err(0x03) // 0xe0004003 Pipe stall, Bad data toggle +#define kIOUSBBitstufErr iokit_usb_err(0x02) // 0xe0004002 Pipe stall, bitstuffing +#define kIOUSBCRCErr iokit_usb_err(0x01) // 0xe0004001 Pipe stall, bad CRC + +/*! +@defined IOUSBFamily message codes +@discussion Messages specific to the IOUSBFamily. Note that the iokit_usb_msg(x) translates to 0xe0004xxx, where xxx is the value in parenthesis as a hex number. +*/ +#define iokit_usb_msg(message) (UInt32)(sys_iokit|sub_iokit_usb|message) +#define kIOUSBMessageHubResetPort iokit_usb_msg(0x01) // 0xe0004001 Message sent to a hub to reset a particular port +#define kIOUSBMessageHubSuspendPort iokit_usb_msg(0x02) // 0xe0004002 Message sent to a hub to suspend a particular port +#define kIOUSBMessageHubResumePort iokit_usb_msg(0x03) // 0xe0004003 Message sent to a hub to resume a particular port +#define kIOUSBMessageHubIsDeviceConnected iokit_usb_msg(0x04) // 0xe0004004 Message sent to a hub to inquire whether a particular port has a device connected or not +#define kIOUSBMessageHubIsPortEnabled iokit_usb_msg(0x05) // 0xe0004005 Message sent to a hub to inquire whether a particular port is enabled or not +#define kIOUSBMessageHubReEnumeratePort iokit_usb_msg(0x06) // 0xe0004006 Message sent to a hub to reenumerate the device attached to a particular port +#define kIOUSBMessagePortHasBeenReset iokit_usb_msg(0x0a) // 0xe000400a Message sent to a device indicating that the port it is attached to has been reset +#define kIOUSBMessagePortHasBeenResumed iokit_usb_msg(0x0b) // 0xe000400b Message sent to a device indicating that the port it is attached to has been resumed +#define kIOUSBMessageHubPortClearTT iokit_usb_msg(0x0c) // 0xe000400c Message sent to a hub to clear the transaction translator +#define kIOUSBMessagePortHasBeenSuspended iokit_usb_msg(0x0d) // 0xe000400d Message sent to a device indicating that the port it is attached to has been suspended +#define kIOUSBMessageFromThirdParty iokit_usb_msg(0x0e) // 0xe000400e Message sent from a third party. Uses IOUSBThirdPartyParam to encode the sender's ID +#define kIOUSBMessagePortWasNotSuspended iokit_usb_msg(0x0f) // 0xe000400f Message indicating that the hub driver received a resume request for a port that was not suspended +#define kIOUSBMessageExpressCardCantWake iokit_usb_msg(0x10) // 0xe0004010 Message from a driver to a bus that an express card will disconnect on sleep and thus shouldn't wake +#define kIOUSBMessageCompositeDriverReconfigured iokit_usb_msg(0x11) // 0xe0004011 Message from the composite driver indicating that it has finished re-configuring the device after a reset +#define kIOUSBMessageHubSetPortRecoveryTime iokit_usb_msg(0x12) // 0xe0004012 Message sent to a hub to set the # of ms required when resuming a particular port +#define kIOUSBMessageOvercurrentCondition iokit_usb_msg(0x13) // 0xe0004013 Message sent to the clients of the device's hub parent, when a device causes an overcurrent condition. The message argument contains the locationID of the device +#define kIOUSBMessageNotEnoughPower iokit_usb_msg(0x14) // 0xe0004014 Message sent to the clients of the device's hub parent, when a device causes an low power notice to be displayed. The message argument contains the locationID of the device +#define kIOUSBMessageController iokit_usb_msg(0x15) // 0xe0004015 Generic message sent from controller user client to controllers +#define kIOUSBMessageRootHubWakeEvent iokit_usb_msg(0x16) // 0xe0004016 Message from the HC Wakeup code indicating that a Root Hub port has a wake event + +// Obsolete +// +struct IOUSBMouseData { + UInt16 buttons; + SInt16 XDelta; + SInt16 YDelta; +}; +typedef struct IOUSBMouseData IOUSBMouseData; +typedef IOUSBMouseData * IOUSBMouseDataPtr; + +// Obsolete +// +struct IOUSBKeyboardData { + UInt16 keycount; + UInt16 usbkeycode[32]; +}; +typedef struct IOUSBKeyboardData IOUSBKeyboardData; +typedef IOUSBKeyboardData * IOUSBKeyboardDataPtr; + +// Obsolete +// +union IOUSBHIDData { + IOUSBKeyboardData kbd; + IOUSBMouseData mouse; +}; +typedef union IOUSBHIDData IOUSBHIDData; +typedef IOUSBHIDData * IOUSBHIDDataPtr; + +/*! + @typedef IOUSBDeviceDescriptor + @discussion Descriptor for a USB Device. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. +*/ +struct IOUSBDeviceDescriptor { + UInt8 bLength; + UInt8 bDescriptorType; + UInt16 bcdUSB; + UInt8 bDeviceClass; + UInt8 bDeviceSubClass; + UInt8 bDeviceProtocol; + UInt8 bMaxPacketSize0; + UInt16 idVendor; + UInt16 idProduct; + UInt16 bcdDevice; + UInt8 iManufacturer; + UInt8 iProduct; + UInt8 iSerialNumber; + UInt8 bNumConfigurations; +}; +typedef struct IOUSBDeviceDescriptor IOUSBDeviceDescriptor; +typedef IOUSBDeviceDescriptor * IOUSBDeviceDescriptorPtr; + +/*! + @typedef IOUSBDescriptorHeader + @discussion Standard header used for all USB descriptors. Used to read the length of a descriptor so that we can allocate storage for the whole descriptor later on. +*/ +struct IOUSBDescriptorHeader { + UInt8 bLength; + UInt8 bDescriptorType; +}; +typedef struct IOUSBDescriptorHeader IOUSBDescriptorHeader; +typedef IOUSBDescriptorHeader * IOUSBDescriptorHeaderPtr; + +/*! + @typedef IOUSBConfigurationDescriptor + @discussion Standard USB Configuration Descriptor. It is variable length, so this only specifies the known fields. We use the wTotalLength field to read the whole descriptor. + See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. +*/ +struct IOUSBConfigurationDescriptor { + UInt8 bLength; + UInt8 bDescriptorType; + UInt16 wTotalLength; + UInt8 bNumInterfaces; + UInt8 bConfigurationValue; + UInt8 iConfiguration; + UInt8 bmAttributes; + UInt8 MaxPower; +}; +typedef struct IOUSBConfigurationDescriptor IOUSBConfigurationDescriptor; +typedef IOUSBConfigurationDescriptor * IOUSBConfigurationDescriptorPtr; + +/*! + @typedef IOUSBConfigurationDescHeader + @discussion Header of a IOUSBConfigurationDescriptor. Used to get the total length of the descriptor. +*/ +struct IOUSBConfigurationDescHeader { + UInt8 bLength; + UInt8 bDescriptorType; + UInt16 wTotalLength; +}; +typedef struct IOUSBConfigurationDescHeader IOUSBConfigurationDescHeader; +typedef IOUSBConfigurationDescHeader * IOUSBConfigurationDescHeaderPtr; + +/*! + @typedef IOUSBInterfaceDescriptor + @discussion Descriptor for a USB Interface. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. +*/ +struct IOUSBInterfaceDescriptor { + UInt8 bLength; + UInt8 bDescriptorType; + UInt8 bInterfaceNumber; + UInt8 bAlternateSetting; + UInt8 bNumEndpoints; + UInt8 bInterfaceClass; + UInt8 bInterfaceSubClass; + UInt8 bInterfaceProtocol; + UInt8 iInterface; +}; +typedef struct IOUSBInterfaceDescriptor IOUSBInterfaceDescriptor; +typedef IOUSBInterfaceDescriptor * IOUSBInterfaceDescriptorPtr; + +/*! + @typedef IOUSBEndpointDescriptor + @discussion Descriptor for a USB Endpoint. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. +*/ +struct IOUSBEndpointDescriptor { + UInt8 bLength; + UInt8 bDescriptorType; + UInt8 bEndpointAddress; + UInt8 bmAttributes; + UInt16 wMaxPacketSize; + UInt8 bInterval; +}; +typedef struct IOUSBEndpointDescriptor IOUSBEndpointDescriptor; +typedef IOUSBEndpointDescriptor * IOUSBEndpointDescriptorPtr; + +enum{addPacketShift = 11}; // Bits for additional packets in maxPacketField. (Table 9-13) +#define mungeMaxPacketSize(w) ((w>1024)?(((w>>(addPacketShift))+1)*(w&((1<<addPacketShift)-1))):w) + +/*! + @typedef IOUSBHIDDescriptor + @discussion USB HID Descriptor. See the USB HID Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. (This structure + should have used the #pragma pack(1) compiler directive to get byte alignment. +*/ +struct IOUSBHIDDescriptor { + UInt8 descLen; + UInt8 descType; + UInt16 descVersNum; + UInt8 hidCountryCode; + UInt8 hidNumDescriptors; + UInt8 hidDescriptorType; + UInt8 hidDescriptorLengthLo; + UInt8 hidDescriptorLengthHi; +}; +typedef struct IOUSBHIDDescriptor IOUSBHIDDescriptor; +typedef IOUSBHIDDescriptor *IOUSBHIDDescriptorPtr; + +/*! + @typedef IOUSBHIDReportDesc + @discussion USB HID Report Descriptor header. See the USB HID Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. (This structure + should have used the #pragma pack(1) compiler directive to get byte alignment. +*/ +struct IOUSBHIDReportDesc { + UInt8 hidDescriptorType; + UInt8 hidDescriptorLengthLo; + UInt8 hidDescriptorLengthHi; +}; +typedef struct IOUSBHIDReportDesc IOUSBHIDReportDesc; +typedef IOUSBHIDReportDesc * IOUSBHIDReportDescPtr; + +/*! + @typedef IOUSBDeviceQualifierDescriptor + @discussion USB Device Qualifier Descriptor. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. +*/ +#pragma pack(1) +struct IOUSBDeviceQualifierDescriptor +{ + UInt8 bLength; + UInt8 bDescriptorType; + UInt16 bcdUSB; + UInt8 bDeviceClass; + UInt8 bDeviceSubClass; + UInt8 bDeviceProtocol; + UInt8 bMaxPacketSize0; + UInt8 bNumConfigurations; + UInt8 bReserved; +}; +typedef struct IOUSBDeviceQualifierDescriptor IOUSBDeviceQualifierDescriptor; +typedef IOUSBDeviceQualifierDescriptor * IOUSBDeviceQualifierDescriptorPtr; +#pragma options align=reset + +/*! + @typedef IOUSBDFUDescriptor + @discussion USB Device Firmware Update Descriptor. See the USB Device Firmware Update Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. +*/ +#pragma pack(1) +struct IOUSBDFUDescriptor +{ + UInt8 bLength; + UInt8 bDescriptorType; + UInt8 bmAttributes; + UInt16 wDetachTimeout; + UInt16 wTransferSize; +}; +typedef struct IOUSBDFUDescriptor IOUSBDFUDescriptor; +typedef IOUSBDFUDescriptor * IOUSBDFUDescriptorPtr; + +#pragma options align=reset + +/*! +@typedef IOUSBInterfaceAssociationDescriptor + @discussion USB Inerface Association Descriptor. ECN to the USB 2.0 Spec. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. + */ +#pragma pack(1) +struct IOUSBInterfaceAssociationDescriptor +{ + UInt8 bLength; + UInt8 bDescriptorType; + UInt8 bFirstInterface; + UInt8 bInterfaceCount; + UInt8 bFunctionClass; + UInt8 bFunctionSubClass; + UInt8 bFunctionProtocol; + UInt8 iFunction; +}; +typedef struct IOUSBInterfaceAssociationDescriptor IOUSBInterfaceAssociationDescriptor; +typedef IOUSBInterfaceAssociationDescriptor * IOUSBInterfaceAssociationDescriptorPtr; +#pragma options align=reset + +/*! + @typedef USBStatus + @discussion Type used to get a DeviceStatus as a single quantity. +*/ +typedef UInt16 USBStatus; +typedef USBStatus * USBStatusPtr; + +// These constants are obsolete +// +enum { + kIOUSBAnyClass = 0xFFFF, + kIOUSBAnySubClass = 0xFFFF, + kIOUSBAnyProtocol = 0xFFFF, + kIOUSBAnyVendor = 0xFFFF, + kIOUSBAnyProduct = 0xFFFF +}; + +// This structure are obsolete +// +typedef struct IOUSBMatch { + UInt16 usbClass; + UInt16 usbSubClass; + UInt16 usbProtocol; + UInt16 usbVendor; + UInt16 usbProduct; +} IOUSBMatch; + +/*! + @typedef IOUSBFindEndpointRequest + @discussion Struct used to find endpoints of an interface + type and direction are used to match endpoints, + type, direction, maxPacketSize and interval are updated + with the properties of the found endpoint. + @field type Type of endpoint: kUSBControl, kUSBIsoc, kUSBBulk, kUSBInterrupt, kUSBAnyType. If kUSBAnyType is specified, this field is treated as a don't care. + @field direction Direction of endpoint: kUSBOut, kUSBIn, kUSBAnyDirn. If kUSBAnyDirn is specified, this field is treated as a don't care. + @field maxPacketSize maximum packet size of endpoint. + @field interval Polling interval in mSec for endpoint. +*/ +typedef struct { + UInt8 type; + UInt8 direction; + UInt16 maxPacketSize; + UInt8 interval; +} IOUSBFindEndpointRequest; + +/*! + @struct IOUSBDevRequest + @discussion Parameter block for control requests, using a simple pointer + for the data to be transferred. + @field bmRequestType Request type: kUSBStandard, kUSBClass or kUSBVendor + @field bRequest Request code + @field wValue 16 bit parameter for request, host endianess + @field wIndex 16 bit parameter for request, host endianess + @field wLength Length of data part of request, 16 bits, host endianess + @field pData Pointer to data for request - data returned in bus endianess + @field wLenDone Set by standard completion routine to number of data bytes + actually transferred +*/ +typedef struct { + UInt8 bmRequestType; + UInt8 bRequest; + UInt16 wValue; + UInt16 wIndex; + UInt16 wLength; + void * pData; + UInt32 wLenDone; +} IOUSBDevRequest; +typedef IOUSBDevRequest * IOUSBDeviceRequestPtr; + +/*! + @struct IOUSBDevRequestTO + @discussion Parameter block for control requests with timeouts, using a simple pointer + for the data to be transferred. Same as a IOUSBDevRequest except for the two extra timeout fields. + @field bmRequestType Request type: kUSBStandard, kUSBClass or kUSBVendor + @field bRequest Request code + @field wValue 16 bit parameter for request, host endianess + @field wIndex 16 bit parameter for request, host endianess + @field wLength Length of data part of request, 16 bits, host endianess + @field pData Pointer to data for request - data returned in bus endianess + @field wLenDone Set by standard completion routine to number of data bytes + actually transferred + @field noDataTimeout Specifies a time value in milliseconds. Once the request is queued on the bus, if no data is transferred in this amount of time, the request will be aborted and returned. + @field completionTimeout Specifies a time value in milliseconds. Once the request is queued on the bus, if the entire request is not completed in this amount of time, the request will be aborted and returned +*/ +typedef struct { + UInt8 bmRequestType; + UInt8 bRequest; + UInt16 wValue; + UInt16 wIndex; + UInt16 wLength; + void * pData; + UInt32 wLenDone; + UInt32 noDataTimeout; + UInt32 completionTimeout; +} IOUSBDevRequestTO; + +/*! + @enum Default timeout values + @discussion default values used for data and completion timeouts. +*/ +enum +{ + kUSBDefaultControlNoDataTimeoutMS = 5000, + kUSBDefaultControlCompletionTimeoutMS = 0 +}; + +// Internal structure to pass parameters between IOUSBLib and UserClient +// +typedef struct +{ + UInt32 pipeRef; + void * buf; + UInt32 size; + UInt32 noDataTimeout; + UInt32 completionTimeout; +} IOUSBBulkPipeReq; + + +#if KERNEL +/*! + @struct IOUSBDevRequestDesc + @discussion Parameter block for control requests, using a memory descriptor + for the data to be transferred. Only available in the kernel. + @field bmRequestType Request type: kUSBStandard, kUSBClass or kUSBVendor + @field bRequest Request code + @field wValue 16 bit parameter for request, host endianess + @field wIndex 16 bit parameter for request, host endianess + @field wLength Length of data part of request, 16 bits, host endianess + @field pData Pointer to memory descriptor for data for request - data returned in bus endianess + @field wLenDone Set by standard completion routine to number of data bytes + actually transferred +*/ +typedef struct { + UInt8 bmRequestType; + UInt8 bRequest; + UInt16 wValue; + UInt16 wIndex; + UInt16 wLength; + IOMemoryDescriptor * pData; + UInt32 wLenDone; +} IOUSBDevRequestDesc; + + +/*! + @enum IOOptionBits + @discussion Parameter passed to an IOService::open() call. + @constant kIOUSBInterfaceOpenAlt Open the alternate interface specified when creating the interface. +*/ +enum { + kIOUSBInterfaceOpenAlt = 0x00010000 +}; + +#endif + +// Internal structure to pass parameters between IOUSBLib and UserClient +// +// use a structure because there's a limit of 6 total arguments +// to a user client method. +typedef struct { + UInt8 bmRequestType; + UInt8 bRequest; + UInt16 wValue; + UInt16 wIndex; + UInt16 wLength; + void * pData; // data pointer + UInt32 wLenDone; // # bytes transferred + UInt8 pipeRef; +} IOUSBDevReqOOL; + +// Internal structure to pass parameters between IOUSBLib and UserClient +// +typedef struct { + UInt8 bmRequestType; + UInt8 bRequest; + UInt16 wValue; + UInt16 wIndex; + UInt16 wLength; + void * pData; // data pointer + UInt32 wLenDone; // # bytes transferred + UInt8 pipeRef; + UInt32 noDataTimeout; + UInt32 completionTimeout; +} IOUSBDevReqOOLTO; + +// Internal structure to pass parameters between IOUSBLib and UserClient +// +// Structure to request isochronous transfer +// +typedef struct { + UInt32 fPipe; + void *fBuffer; + UInt32 fBufSize; + UInt64 fStartFrame; + UInt32 fNumFrames; + IOUSBIsocFrame *fFrameCounts; +} IOUSBIsocStruct; + +// Internal structure to pass parameters between IOUSBLib and UserClient +// +// Structure to request low latency isochronous transfer +// +struct IOUSBLowLatencyIsocStruct { + UInt32 fPipe; + UInt32 fBufSize; + UInt64 fStartFrame; + UInt32 fNumFrames; + UInt32 fUpdateFrequency; + UInt32 fDataBufferCookie; + UInt32 fDataBufferOffset; + UInt32 fFrameListBufferCookie; + UInt32 fFrameListBufferOffset; +}; + +typedef struct IOUSBLowLatencyIsocStruct IOUSBLowLatencyIsocStruct; + + +/*! + @struct IOUSBGetFrameStruct + @discussion Structure used from user space to return the frame number and a timestamp on when the frame register was read. + @field frame frame number + @field timeStamp AbsoluteTime when the frame was updated +*/ +typedef struct { + UInt64 frame; + AbsoluteTime timeStamp; +} IOUSBGetFrameStruct; + + +/*! + @struct IOUSBFindInterfaceRequest + @discussion Structure used with FindNextInterface. +*/ +typedef struct { + UInt16 bInterfaceClass; // requested class + UInt16 bInterfaceSubClass; // requested subclass + UInt16 bInterfaceProtocol; // requested protocol + UInt16 bAlternateSetting; // requested alt setting +} IOUSBFindInterfaceRequest; + +/*! + @enum kIOUSBFindInterfaceDontCare + @discussion Constant that can be used for the fields of IOUSBFindInterfaceRequest to specify that they should not be matched. +*/ +enum { + kIOUSBFindInterfaceDontCare = 0xFFFF + }; + +/*! + @enum kIOUSBVendorIDAppleComputer + @discussion USB Vendor ID for Apple Computer, Inc. +*/ +enum { + kIOUSBVendorIDAppleComputer = 0x05AC + }; + +/*! + @enum USBDeviceSpeed + @discussion Returns the speed of a particular USB device. + @constant kUSBDeviceSpeedLow The device a low speed device. + @constant kUSBDeviceSpeedFull The device a full speed device. + @constant kUSBDeviceSpeedHigh The device a high speed device. +*/ +enum { + kUSBDeviceSpeedLow = 0, + kUSBDeviceSpeedFull = 1, + kUSBDeviceSpeedHigh = 2 + }; + +/*! + @enum MicrosecondsInFrame + @discussion Returns the number of microseconds in a USB frame. + @constant kUSBFullSpeedMicrosecondsInFrame The device is attached to a bus running at full speed (1 ms / frame). + @constant kUSBHighSpeedMicrosecondsInFrame The device is attached to a bus running at high speed (125 microseconds / frame). +*/ +enum { + kUSBFullSpeedMicrosecondsInFrame = 1000, + kUSBHighSpeedMicrosecondsInFrame = 125 +}; + +// During low latency transfers, the stack will set the frStatus for each frame to this value. A client can check that to see if the transfer has completed. We set the frStatus to a +// valid return code when the transfer completes. +// +enum { + kUSBLowLatencyIsochTransferKey = 'llit' // Set frStatus field of first frame in isoch transfer to designate as low latency + }; + +// This structure is DEPRECATED. See the LowLatencyUserBufferInfoV2 +// +typedef struct LowLatencyUserBufferInfo LowLatencyUserBufferInfo; + +struct LowLatencyUserBufferInfo { + UInt32 cookie; + void * bufferAddress; + IOByteCount bufferSize; + UInt32 bufferType; + Boolean isPrepared; + LowLatencyUserBufferInfo * nextBuffer; +}; + +// This structure is DEPRECATED. See the LowLatencyUserBufferInfoV3 + +typedef struct LowLatencyUserBufferInfoV2 LowLatencyUserBufferInfoV2; + +struct LowLatencyUserBufferInfoV2 +{ + UInt32 cookie; + void * bufferAddress; + IOByteCount bufferSize; + UInt32 bufferType; + Boolean isPrepared; + void * mappedUHCIAddress; + LowLatencyUserBufferInfoV2 * nextBuffer; +}; + + +// This structure is used to pass information for the low latency calls between user space and the kernel. +// +typedef struct LowLatencyUserBufferInfoV3 LowLatencyUserBufferInfoV3; + +struct LowLatencyUserBufferInfoV3 +{ + uint64_t cookie; + mach_vm_address_t bufferAddress; + mach_vm_size_t bufferSize; + uint64_t bufferType; + uint64_t isPrepared; + mach_vm_address_t mappedUHCIAddress; + LowLatencyUserBufferInfoV3 * nextBuffer; +}; + + + /*! + @enum USBLowLatencyBufferType + @discussion Used to specify what kind of buffer to create when calling LowLatencyCreateBuffer(). + @constant kUSBLowLatencyWriteBuffer The buffer will be used to write data out to a device. + @constant kUSBLowLatencyReadBuffer The buffer will be used to read data from a device. + @constant kUSBLowLatencyFrameListBuffer The buffer will be used for a low latency isoch frame list. +*/ +typedef enum { + kUSBLowLatencyWriteBuffer = 0, + kUSBLowLatencyReadBuffer = 1, + kUSBLowLatencyFrameListBuffer = 2 +} USBLowLatencyBufferType; + +// USB User Notification Types +// +enum { + kUSBNoUserNotificationType = 0, + kUSBNotEnoughPowerNotificationType = 1, + kUSBIndividualOverCurrentNotificationType = 2, + kUSBGangOverCurrentNotificationType = 3 +}; + +/*! + @defined Property Definitions + @discussion Useful property names in USB land. +*/ +#define kUSBDevicePropertySpeed "Device Speed" +#define kUSBDevicePropertyBusPowerAvailable "Bus Power Available" +#define kUSBDevicePropertyAddress "USB Address" +#define kUSBDevicePropertyLocationID "locationID" +#define kUSBProductIDMask "idProductMask" +#define kUSBPreferredConfiguration "Preferred Configuration" +#define kUSBSuspendPort "kSuspendPort" +#define kUSBExpressCardCantWake "ExpressCardCantWake" +#define kUSBControllerNeedsContiguousMemoryForIsoch "Need contiguous memory for isoch" +#define kUSBHubDontAllowLowPower "kUSBHubDontAllowLowPower" +#define kUSBDeviceResumeRecoveryTime "kUSBDeviceResumeRecoveryTime" +#define kUSBOutOfSpecMPSOK "Out of spec MPS OK" +#define kConfigurationDescriptorOverride "ConfigurationDescriptorOverride" +#define kOverrideIfAtLocationID "OverrideIfAtLocationID" + +/*! +@enum USBReEnumerateOptions + @discussion Options used when calling ReEnumerateDevice. + @constant kUSBAddExtraResetTimeBit Setting this bit will cause the Hub driver to wait 100ms before addressing the device after the reset following the re-enumeration. + */ +typedef enum { + kUSBAddExtraResetTimeBit = 31, + kUSBAddExtraResetTimeMask = ( 1 << kUSBAddExtraResetTimeBit) +} USBReEnumerateOptions; + +/*! + @enum USBDeviceInformationBits + @discussion GetUSBDeviceInformation will return a unit32_t value with bits set indicating that a particular state is present in the USB device. These bits are described here + + @constant kUSBInformationDeviceIsCaptiveBit The USB device is directly attached to its hub and cannot be removed. + @constant kUSBInformationDeviceIsAttachedToRootHubBit The USB device is directly attached to the root hub + @constant kUSBInformationDeviceIsInternalBit The USB device is internal to the computer (all the hubs it attaches to are captive) + @constant kUSBInformationDeviceIsConnectedBit The USB device is connected to its hub + @constant kUSBInformationDeviceIsEnabledBit The hub port to which the USB device is attached is enabled + @constant kUSBInformationDeviceIsSuspendedBit The hub port to which the USB device is attached is suspended + @constant kUSBInformationDeviceIsInResetBit The hub port to which the USB device is attached is being reset + @constant kUSBInformationDeviceOvercurrentBit The USB device generated an overcurrent + @constant kUSBInformationDevicePortIsInTestModeBit The hub port to which the USB device is attached is in test mode + @constant kUSBInformationDeviceIsRootHub The device is actually the root hub simulation + @constant kUSBInformationRootHubisBuiltIn If this is a root hub simulation and it's built into the machine, this bit is set. If it's on an expansion card, it will be cleared + + */ + typedef enum { + kUSBInformationDeviceIsCaptiveBit = 0, + kUSBInformationDeviceIsAttachedToRootHubBit = 1, + kUSBInformationDeviceIsInternalBit = 2, + kUSBInformationDeviceIsConnectedBit = 3, + kUSBInformationDeviceIsEnabledBit = 4, + kUSBInformationDeviceIsSuspendedBit = 5, + kUSBInformationDeviceIsInResetBit = 6, + kUSBInformationDeviceOvercurrentBit = 7, + kUSBInformationDevicePortIsInTestModeBit = 8, + kUSBInformationDeviceIsRootHub = 9, + kUSBInformationRootHubisBuiltIn = 10, + kUSBInformationDeviceIsRemote = 11, + kUSBInformationDeviceIsCaptiveMask = (1 << kUSBInformationDeviceIsCaptiveBit), + kUSBInformationDeviceIsAttachedToRootHubMask = (1 << kUSBInformationDeviceIsAttachedToRootHubBit), + kUSBInformationDeviceIsInternalMask = (1 << kUSBInformationDeviceIsInternalBit), + kUSBInformationDeviceIsConnectedMask = (1 << kUSBInformationDeviceIsConnectedBit), + kUSBInformationDeviceIsEnabledMask = (1 << kUSBInformationDeviceIsEnabledBit), + kUSBInformationDeviceIsSuspendedMask = (1 << kUSBInformationDeviceIsSuspendedBit), + kUSBInformationDeviceIsInResetMask = (1 << kUSBInformationDeviceIsInResetBit), + kUSBInformationDeviceOvercurrentMask = (1 << kUSBInformationDeviceOvercurrentBit), + kUSBInformationDevicePortIsInTestModeMask = (1 << kUSBInformationDevicePortIsInTestModeBit), + kUSBInformationDeviceIsRootHubMask = (1 << kUSBInformationDeviceIsRootHub), + kUSBInformationRootHubisBuiltInMask = (1 << kUSBInformationRootHubisBuiltIn), + kUSBInformationDeviceIsRemoteMask = (1 << kUSBInformationDeviceIsRemote) + } USBDeviceInformationBits; + + /*! + @enum USBPowerRequestTypes + @discussion Used to specify what kind of power will be reserved using the IOUSBDevice RequestExtraPower and ReturnExtraPower APIs. + @constant kUSBPowerDuringSleep The power is to be used during sleep. + @constant kUSBPowerDuringWake The power is to be used while the system is awake (i.e not sleeping) + */ + typedef enum { + kUSBPowerDuringSleep = 0, + kUSBPowerDuringWake = 1 + } USBPowerRequestTypes; + + // Apple specific properties +#define kAppleCurrentAvailable "AAPL,current-available" +#define kAppleCurrentInSleep "AAPL,current-in-sleep" +#define kAppleCurrentExtra "AAPL,current-extra" +#define kAppleInternalUSBDevice "AAPL,device-internal" +#define kUSBBusID "AAPL,bus-id" + + +#ifdef __cplusplus +} +#endif + +#endif /* _USB_H */ diff --git a/i386/include/IOKit/usb/.svn/text-base/USBHub.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/USBHub.h.svn-base new file mode 100644 index 0000000..4bbda15 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/USBHub.h.svn-base @@ -0,0 +1,240 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _USBHUB_H +#define _USBHUB_H + +#include <IOKit/usb/USB.h> +#include <IOKit/usb/USBSpec.h> + + /*! + @header USBHub.h + @abstract Constants and definitions used with Hub devices. + @discussion + */ + + /*! + @enum Hub Descriptor Type + @discussion + */ +enum { + kUSBHubDescriptorType = 0x29 +}; + + /*! + @enum HubFeatures + @discussion Used with SET_FEATURE to set hub and port features + */ +enum { + + kUSBHubLocalPowerChangeFeature = 0, /* Hub features */ + kUSBHubOverCurrentChangeFeature = 1, + + kUSBHubPortConnectionFeature = 0, /* port features */ + kUSBHubPortEnableFeature = 1, + kUSBHubPortSuspendFeature = 2, + kUSBHubPortOverCurrentFeature = 3, + kUSBHubPortResetFeature = 4, + kUSBHubPortPowerFeature = 8, + kUSBHubPortLowSpeedFeature = 9, + kUSBHubPortConnectionChangeFeature = 16, + kUSBHubPortEnableChangeFeature = 17, + kUSBHubPortSuspendChangeFeature = 18, + kUSBHubPortOverCurrentChangeFeature = 19, + kUSBHubPortResetChangeFeature = 20, + kUSBHubPortTestFeature = 21, + kUSBHubPortIndicatorFeature = 22 +}; + + /*! + @enum HubPortStatus + @discussion Used to decode the Port Status and Change + */ +enum { + kHubPortConnection = 0x0001, + kHubPortEnabled = 0x0002, + kHubPortSuspend = 0x0004, + kHubPortOverCurrent = 0x0008, + kHubPortBeingReset = 0x0010, + kHubPortPower = 0x0100, + kHubPortLowSpeed = 0x0200, + kHubPortHighSpeed = 0x0400, + kHubPortTestMode = 0x0800, + kHubPortIndicator = 0x1000, + + // these are the bits which cause the hub port state machine to keep moving + kHubPortStateChangeMask = kHubPortConnection | kHubPortEnabled | kHubPortSuspend | kHubPortOverCurrent | kHubPortBeingReset +}; + + + /*! + @enum HubStatus + @discussion Used to decode the Hub Status and Change + */ +enum { + kHubLocalPowerStatus = 1, + kHubOverCurrentIndicator = 2, + kHubLocalPowerStatusChange = 1, + kHubOverCurrentIndicatorChange = 2 +}; + + /*! + @enum HubCharacteristics + @discussion + */ +enum { + kPerPortSwitchingBit = (1 << 0), + kNoPowerSwitchingBit = (1 << 1), + kCompoundDeviceBit = (1 << 2), + kPerPortOverCurrentBit = (1 << 3), + kNoOverCurrentBit = (1 << 4), + + kHubPortIndicatorBit = 7, + kHubPortIndicatorMask = 0x0080 +}; + +/*! +@enum PowerSwitching + @discussion + */ +enum { + kHubSupportsGangPower = 0, + kHubSupportsIndividualPortPower = 1, + kHubPortSetPowerOff = 0, + kHubPortSetPowerOn = 1 +}; + +/*! +@enum PortIndicatorSelectors + @discussion + */ +enum { + kHubPortIndicatorAutomatic = 0, + kHubPortIndicatorAmber, + kHubPortIndicatorGreen, + kHubPortIndicatorOff +}; + +/*! + @enum Root Hub specific + @discussion + */ +enum { + kPrdRootHubApple = 0x8005, // ProductID for classic speed root hubs + kPrdRootHubAppleE = 0x8006, // ProductID for high speed root hubs + kUSBRootHubPollingRate = 32 // Enpoint polling rate interval for root hubs +}; + +/*! +@enum Hub Device Requests +@discussion Encoding of the hub specific standard requests +<tt> +<pre><b> +Request bmRequestType bRequest wValue wIndex wLength Data</b> +ClearHubFeature 0010 0000B CLEAR_FEATURE Feature Zero Zero None +ClearPortFeature 0010 0011B Feature Port Zero None + +GetBusState 1010 0011B GET_STATE Zero Port One Port Bus State + +GetHubDescriptor 1010 0000B GET_DESCRIPTOR Type Zero Length Descriptor + +GetHubStatus 1010 0000B GET_STATUS Zero Zero Four Hub Status +GetPortStatus 1010 0011B Zero Port Four Port Status + +SetHubDescriptor 0010 0000B SET_DESCRIPTOR Type Zero Length Descriptor + +SetHubFeature 0010 0000B SET_FEATURE Feature Zero Zero None +SetPortFeature 0010 0011B Feature Port Zero None +</pre> +</tt> + */ +enum { + kClearHubFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBClass, kUSBDevice), + kClearPortFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBClass, kUSBOther), + kGetPortState = EncodeRequest(kUSBRqGetState, kUSBIn, kUSBClass, kUSBOther), + kGetHubDescriptor = EncodeRequest(kUSBRqGetDescriptor, kUSBIn, kUSBClass, kUSBDevice), + kGetHubStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBClass, kUSBDevice), + kGetPortStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBClass, kUSBOther), + kSetHubDescriptor = EncodeRequest(kUSBRqGetDescriptor, kUSBOut, kUSBClass, kUSBDevice), + kSetHubFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBClass, kUSBDevice), + kSetPortFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBClass, kUSBOther) +}; + + +/*! + @typedef IOUSBHubDescriptor + @discussion USB Hub Descriptor. See the USB HID Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. +*/ +struct IOUSBHubDescriptor { + UInt8 length; + UInt8 hubType; + UInt8 numPorts; + UInt16 characteristics __attribute__((packed)); + UInt8 powerOnToGood; /* Port settling time, in 2ms */ + UInt8 hubCurrent; + /* These are received packed, will have to be unpacked */ + UInt8 removablePortFlags[8]; + UInt8 pwrCtlPortFlags[8]; +}; + +typedef struct IOUSBHubDescriptor IOUSBHubDescriptor; + +/*! + @typedef IOUSBHubStatus + @discussion Used to get the port status and change flags using GetPortStatus() +*/ +struct IOUSBHubStatus { + UInt16 statusFlags; + UInt16 changeFlags; +}; +typedef struct IOUSBHubStatus IOUSBHubStatus; +typedef IOUSBHubStatus * IOUSBHubStatusPtr; + +typedef struct IOUSBHubStatus IOUSBHubPortStatus; + + +/*! + @typedef IOUSBHubPortReEnumerateParam + @discussion Used to specify the port that needs to be reenumerated +*/ +typedef struct IOUSBHubPortReEnumerateParam IOUSBHubPortReEnumerateParam; + +struct IOUSBHubPortReEnumerateParam { + UInt32 portNumber; + UInt32 options; +}; + +typedef struct IOUSBHubPortClearTTParam IOUSBHubPortClearTTParam; + +struct IOUSBHubPortClearTTParam { + UInt32 portNumber; + UInt32 options; +#if 0 + UInt8 deviceAddress; <<0 + UInt8 endpointNum; <<8 + UInt8 endpointType; <<16 // As split transaction. 00 Control, 10 Bulk + UInt8 IN; <<24 // Direction, 1 = IN, 0 = OUT +#endif +}; + +#endif /* _USBHUB_H */ diff --git a/i386/include/IOKit/usb/.svn/text-base/USBSpec.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/USBSpec.h.svn-base new file mode 100644 index 0000000..0665819 --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/USBSpec.h.svn-base @@ -0,0 +1,470 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +/* + * Constants that both OS9 and OSX want to define, and whose values are + * specified by the USB Standard. + * Put in a seperate file so they can be included if the OS9 include file isn't already + * included. + */ +#ifndef _USBSPEC_H +#define _USBSPEC_H + +#ifdef __cplusplus +extern "C" { +#endif + + /*! + @header USBSpec.h + @abstract Constants and definitions of parameters that are used in communcating with USB devices and interfaces. + @discussion + */ + + /*! + @enum Endpoint type + @discussion Used in IOUSBFindEndpointRequest's type field + */ +enum { + kUSBControl = 0, + kUSBIsoc = 1, + kUSBBulk = 2, + kUSBInterrupt = 3, + kUSBAnyType = 0xFF +}; + + /*! + @enum Endpoint direction + @discussion Used in IOUSBFindEndpointRequest's direction field + */ +enum { + kUSBOut = 0, + kUSBIn = 1, + kUSBNone = 2, + kUSBAnyDirn = 3 +}; + + /*! + @enum Device Request Type + @discussion This type is encoded in the bmRequestType field of a Device Request. It specifies the type of request: standard, class or vendor specific. + */ +enum { + kUSBStandard = 0, + kUSBClass = 1, + kUSBVendor = 2 +}; + + /*! + @enum Device Request Recipient + @discussion This recipient is encoded in the bmRequestType field of a Device Request. It specifies the type of recipient for a request: the device, the interface, or an endpoint. + */ +enum { + kUSBDevice = 0, + kUSBInterface = 1, + kUSBEndpoint = 2, + kUSBOther = 3 +}; + + /*! + @enum Device Request + @discussion Specifies values for the bRequest field of a Device Request. + */ +enum { + kUSBRqGetStatus = 0, + kUSBRqClearFeature = 1, + kUSBRqGetState = 2, + kUSBRqSetFeature = 3, + kUSBRqReserved2 = 4, + kUSBRqSetAddress = 5, + kUSBRqGetDescriptor = 6, + kUSBRqSetDescriptor = 7, + kUSBRqGetConfig = 8, + kUSBRqSetConfig = 9, + kUSBRqGetInterface = 10, + kUSBRqSetInterface = 11, + kUSBRqSyncFrame = 12 +}; + + /*! + @enum USB Descriptors + @discussion Specifies values for diffent descriptor types. + */ +enum { + kUSBAnyDesc = 0, // Wildcard for searches + kUSBDeviceDesc = 1, + kUSBConfDesc = 2, + kUSBStringDesc = 3, + kUSBInterfaceDesc = 4, + kUSBEndpointDesc = 5, + kUSBDeviceQualifierDesc = 6, + kUSBOtherSpeedConfDesc = 7, + kUSBInterfacePowerDesc = 8, + kUSBOnTheGoDesc = 9, + kUSDebugDesc = 10, + kUSBInterfaceAssociationDesc = 11, + kUSBHIDDesc = 0x21, + kUSBReportDesc = 0x22, + kUSBPhysicalDesc = 0x23, + kUSBHUBDesc = 0x29 +}; + + /*! + @enum Feature Selectors + @discussion Used with SET/CLEAR_FEATURE requests. + */ +enum { + kUSBFeatureEndpointStall = 0, + kUSBFeatureDeviceRemoteWakeup = 1 +}; + + /*! + @enum USB Power constants + @discussion Constants relating to USB Power. + */ +enum { + kUSB100mAAvailable = 50, + kUSB500mAAvailable = 250, + kUSB100mA = 50, + kUSBAtrBusPowered = 0x80, + kUSBAtrSelfPowered = 0x40, + kUSBAtrRemoteWakeup = 0x20 +}; + + /*! + @enum USB Release constants + @discussion Constants relating to USB releases as found in the bcdUSB field of the Device Descriptor. + */ +enum { + kUSBRel10 = 0x0100, + kUSBRel11 = 0x0110, + kUSBRel20 = 0x0200 +}; + + + /*! + @enum HID requests + @discussion Constants for HID requests. + */ +enum { + kHIDRqGetReport = 1, + kHIDRqGetIdle = 2, + kHIDRqGetProtocol = 3, + kHIDRqSetReport = 9, + kHIDRqSetIdle = 10, + kHIDRqSetProtocol = 11 +}; + + /*! + @enum HID report types + @discussion Constants for the three kinds of HID reports. + */ +enum { + kHIDRtInputReport = 1, + kHIDRtOutputReport = 2, + kHIDRtFeatureReport = 3 +}; + + + /*! + @enum HID Protocol + @discussion Used in the SET_PROTOCOL device request + */ +enum { + kHIDBootProtocolValue = 0, + kHIDReportProtocolValue = 1 +}; + + + +enum { + kUSBCapsLockKey = 0x39, + kUSBNumLockKey = 0x53, + kUSBScrollLockKey = 0x47 +}; + +/*! +@enum Device Class Codes + @discussion Constants for USB Device classes (bDeviceClass). + */ +enum { + kUSBCompositeClass = 0, + kUSBCommClass = 2, // Deprecated + kUSBCommunicationClass = 2, + kUSBHubClass = 9, + kUSBDataClass = 10, + kUSBPersonalHealthcareClass = 15, + kUSBDiagnosticClass = 220, + kUSBWirelessControllerClass = 224, + kUSBMiscellaneousClass = 239, + kUSBApplicationSpecificClass = 254, + kUSBVendorSpecificClass = 255 +}; + +/*! +@enum Interface Class + @discussion Constants for Interface classes (bInterfaceClass). + */ +enum { + kUSBAudioClass = 1, // Deprecated + kUSBAudioInterfaceClass = 1, + + kUSBCommunicationControlInterfaceClass = 2, + kUSBCommunicationDataInterfaceClass = 10, + + kUSBHIDClass = 3, + kUSBHIDInterfaceClass = 3, + + kUSBPhysicalInterfaceClass = 5, + + kUSBImageInterfaceClass = 6, + + kUSBPrintingClass = 7, // Deprecated + kUSBPrintingInterfaceClass = 7, + + kUSBMassStorageClass = 8, // Deprecated + kUSBMassStorageInterfaceClass = 8, + + kUSBChipSmartCardInterfaceClass = 11, + + kUSBContentSecurityInterfaceClass = 13, + + kUSBVideoInterfaceClass = 14, + + kUSBPersonalHealthcareInterfaceClass = 15, + + kUSBDiagnosticDeviceInterfaceClass = 220, + + kUSBWirelessControllerInterfaceClass = 224, + + kUSBApplicationSpecificInterfaceClass = 254, + + kUSBVendorSpecificInterfaceClass = 255 +}; + +// Obsolete +enum { + + kUSBDisplayClass = 4, // Obsolete +}; + +/*! + @enum Interface SubClass + @discussion Constants for USB Interface SubClasses (bInterfaceSubClass). +*/ +enum { + kUSBCompositeSubClass = 0, + + kUSBHubSubClass = 0, + + // For the kUSBAudioInterfaceClass + // + kUSBAudioControlSubClass = 0x01, + kUSBAudioStreamingSubClass = 0x02, + kUSBMIDIStreamingSubClass = 0x03, + + // For the kUSBApplicationSpecificInterfaceClass + // + kUSBDFUSubClass = 0x01, + kUSBIrDABridgeSubClass = 0x02, + kUSBTestMeasurementSubClass = 0x03, + + // For the kUSBMassStorageInterfaceClass + // + kUSBMassStorageRBCSubClass = 0x01, + kUSBMassStorageATAPISubClass = 0x02, + kUSBMassStorageQIC157SubClass = 0x03, + kUSBMassStorageUFISubClass = 0x04, + kUSBMassStorageSFF8070iSubClass = 0x05, + kUSBMassStorageSCSISubClass = 0x06, + + // For the kUSBHIDInterfaceClass + // + kUSBHIDBootInterfaceSubClass = 0x01, + + // For the kUSBCommunicationDataInterfaceClass + // + kUSBCommDirectLineSubClass = 0x01, + kUSBCommAbstractSubClass = 0x02, + kUSBCommTelephoneSubClass = 0x03, + kUSBCommMultiChannelSubClass = 0x04, + kUSBCommCAPISubClass = 0x05, + kUSBCommEthernetNetworkingSubClass = 0x06, + kUSBATMNetworkingSubClass = 0x07, + + // For the kUSBDiagnosticDeviceInterfaceClass + // + kUSBReprogrammableDiagnosticSubClass = 0x01, + + // For the kUSBWirelessControllerInterfaceClass + // + kUSBRFControllerSubClass = 0x01, + + // For the kUSBMiscellaneousClass + // + kUSBCommonClassSubClass = 0x02, + + // For the kUSBVideoInterfaceClass + // + kUSBVideoControlSubClass = 0x01, + kUSBVideoStreamingSubClass = 0x02, + kUSBVideoInterfaceCollectionSubClass = 0x03 + +}; + +/*! +@enum Interface Protocol + @discussion Reported in the bInterfaceProtocol field of the Interface Descriptor. + */ +enum { + + // For kUSBHIDInterfaceClass + // + kHIDNoInterfaceProtocol = 0, + kHIDKeyboardInterfaceProtocol = 1, + kHIDMouseInterfaceProtocol = 2, + kUSBVendorSpecificProtocol = 0xff, + + // For kUSBDiagnosticDeviceInterfaceClass + // + kUSB2ComplianceDeviceProtocol = 0x01, + + // For kUSBWirelessControllerInterfaceClass + // + kUSBBluetoothProgrammingInterfaceProtocol = 0x01, + + // For kUSBMiscellaneousClass + // + KUSBInterfaceAssociationDescriptorProtocol = 0x01 + +}; + + +/*! + @enum DFU Class Attributes + @discussion +*/ +enum { + kUSBDFUAttributesMask = 0x07, + kUSBDFUCanDownloadBit = 0, + kUSBDFUCanUploadBit = 1, + kUSBDFUManifestationTolerantBit = 2 +}; + +/*! + @enum Printer Class Requests + @discussion The bRequest parameter for Printing Class Sepcific Requests + */ +enum { + kUSPrintingClassGetDeviceID = 0, + kUSPrintingClassGePortStatus = 1, + kUSPrintingClassSoftReset = 2 +}; + + /*! +@enum Endpoint Descriptor bits + @discussion Bit definitions for endpoint descriptor fields + */ +enum { + kUSBbEndpointAddressMask = 0x0f, + kUSBbEndpointDirectionBit = 7, + kUSBbEndpointDirectionMask = ( 1 << kUSBbEndpointDirectionBit ), + kUSBEndpointDirectionOut = 0x00, + kUSBEndpointDirectionIn = 0x80, + kUSBEndpointbmAttributesTransferTypeMask = 0x03, + kUSBEndpointbmAttributesSynchronizationTypeMask = 0x0c, + kUSBEndpointbmAttributesSynchronizationTypeShift = 2, + kUSBEndpointbmAttributesUsageTypeMask = 0x30, + kUSBEndpointbmAttributesUsageTypeShift = 4 +}; + + /*! + @defineblock USB Descriptor and IORegistry constants + @discussion Various constants used to describe the fields in the various USB Device Descriptors and IORegistry names used for some of those fields + + @define kUSBDeviceClass The field in the USB Device Descriptor corresponding to the device class + @define kUSBDeviceSubClass The field in the USB Device Descriptor corresponding to the device sub class + @define kUSBDeviceProtocol The field in the USB Device Descriptor corresponding to the device protocol + @define kUSBDeviceMaxPacketSize The field in the USB Device Descriptor corresponding to the maximum packet size for endpoint 0 + @define kUSBVendorID The field in the USB Device Descriptor corresponding to the device USB Vendor ID + @define kUSBVendorName Deprecated. Use kUSBVendorID + @define kUSBProductID The field in the USB Device Descriptor corresponding to the device USB Product ID + @define kUSBProductName Deprecated. Use kUSBProductID + @define kUSBDeviceReleaseNumber The field in the USB Device Descriptor corresponding to the device release version + @define kUSBManufacturerStringIndex The field in the USB Device Descriptor corresponding to the index for the manufacturer's string + @define kUSBProductStringIndex The field in the USB Device Descriptor corresponding to the index for the product name's string + @define kUSBSerialNumberStringIndex The field in the USB Device Descriptor corresponding to the index for the serial number's string + @define kUSBDeviceNumConfigs The field in the USB Configuration Descriptor corresponding to the number of configurations + @define kUSBInterfaceNumber The field in the USB Configuration Descriptor corresponding to the number of configurations + @define kUSBAlternateSetting The field in the USB Configuration Descriptor corresponding to the number of configurations + @define kUSBNumEndpoints The field in the USB Configuration Descriptor corresponding to the number of configurations + @define kUSBInterfaceClass The field in the USB Interface Descriptor corresponding to the interface class + @define kUSBInterfaceSubClass The field in the USB Interface Descriptor corresponding to the interface sub class + @define kUSBInterfaceProtocol The field in the USB Interface Descriptor corresponding to the interface protocol + @define kUSBInterfaceStringIndex The field in the USB Interface Descriptor corresponding to the index for the interface name's string + @define kUSBConfigurationValue The field in the USB Interface Descriptor corresponding to the configuration + @define kUSBProductString IORegistry key for the device's USB Product string + @define kUSBVendorString IORegistry key for the device's USB manufacturer string + @define kUSBSerialNumberString IORegistry key for the device's USB serial number string + @define kUSB1284DeviceID IORegistry key for the 1284 Device ID of a printer + + */ +#define kUSBDeviceClass "bDeviceClass" +#define kUSBDeviceSubClass "bDeviceSubClass" +#define kUSBDeviceProtocol "bDeviceProtocol" +#define kUSBDeviceMaxPacketSize "bMaxPacketSize0" +#define kUSBVendorID "idVendor" // good name +#define kUSBVendorName kUSBVendorID // bad name - keep for backward compatibility +#define kUSBProductID "idProduct" // good name +#define kUSBProductName kUSBProductID // bad name - keep for backward compatibility +#define kUSBDeviceReleaseNumber "bcdDevice" +#define kUSBManufacturerStringIndex "iManufacturer" +#define kUSBProductStringIndex "iProduct" +#define kUSBSerialNumberStringIndex "iSerialNumber" +#define kUSBDeviceNumConfigs "bNumConfigurations" +#define kUSBInterfaceNumber "bInterfaceNumber" +#define kUSBAlternateSetting "bAlternateSetting" +#define kUSBNumEndpoints "bNumEndpoints" +#define kUSBInterfaceClass "bInterfaceClass" +#define kUSBInterfaceSubClass "bInterfaceSubClass" +#define kUSBInterfaceProtocol "bInterfaceProtocol" +#define kUSBInterfaceStringIndex "iInterface" +#define kUSBConfigurationValue "bConfigurationValue" +#define kUSBProductString "USB Product Name" +#define kUSBVendorString "USB Vendor Name" +#define kUSBSerialNumberString "USB Serial Number" +#define kUSB1284DeviceID "1284 Device ID" + /*! @/defineblock */ + + /*! + @enum Apple USB Vendor ID + @discussion Apple's vendor ID, assigned by the USB-IF +*/ +enum { + kAppleVendorID = 0x05AC +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _USBSPEC_H */ diff --git a/i386/include/IOKit/usb/.svn/text-base/USBTracepoints.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/USBTracepoints.h.svn-base new file mode 100644 index 0000000..f2fe81e --- /dev/null +++ b/i386/include/IOKit/usb/.svn/text-base/USBTracepoints.h.svn-base @@ -0,0 +1,662 @@ +/* + * Copyright � 2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __IOKIT_IO_USB_FAMILY_TRACEPOINTS__ +#define __IOKIT_IO_USB_FAMILY_TRACEPOINTS__ + +#include <IOKit/IOTypes.h> + +#include <sys/kdebug.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#define USB_SYSCTL "debug.USB" +#define kUSBTypeDebug 'USBD' +#define DEBUG_UNUSED( X ) ( void )( X ) + + extern UInt32 gUSBStackDebugFlags; + + typedef struct USBSysctlArgs + { + uint32_t type; + uint32_t operation; + uint32_t debugFlags; + } USBSysctlArgs; + + enum + { + kUSBOperationGetFlags = 0, + kUSBOperationSetFlags = 1 + }; + + // the following bits/masks are for use in the usb boot args + // e.g. boot-args="usb=0x102" will turn on Trace Points and set the EHCI retry count to 1 + // the bits can also be set with a sysctl call + enum + { + kUSBEnableDebugLoggingBit = 0, // bit 0 currently not used + kUSBEnableTracePointsBit = 1, // bit 1 used to turn on Trace Points when a USB controller first loads + kUSBEnableErrorLogBit = 2, // bit 2 (4) turns level 1 log for errors + kUSBDebugRetryCountShift = 8, // bits 8 and 9 will set the retry count for low level bus transactions + kUSBDebugRetryCountReserved = 9, // must be 1, 2, or 3 (0 is invalid, 3 is the default) + + kUSBEnableDebugLoggingMask = (1 << kUSBEnableDebugLoggingBit), + kUSBEnableTracePointsMask = (1 << kUSBEnableTracePointsBit), + kUSBDebugRetryCountMask = (3 << kUSBDebugRetryCountShift), + kUSBEnableErrorLogMask = (1 << kUSBEnableErrorLogBit) + }; + + + /* Kernel Tracepoints + * + * Kernel tracepoints are a logging mechanism reduces the size of a log-laden binary. + * Codes are placed into a buffer, from the kernel, and picked up by a userspace + * tool that displays a unique log message for each tracepoint. Additionally, each + * tracepoint may contain up-to four 32-bit (may change with LP64) arguments. + * + * To add a tracepoint, use the code below as an example: + * USBTrace( kUSBTController, kTPControllerStart, (uintptr_t)myArgValue ); + * Next, add the corresponding tracepoint code in the USBTracer tool, using + * the existing examples. Avoid using confidential information in the log strings. + * Some functions have a argument counter, to signify which of the function's tracepoints + * are actually being logged. When adding a tracepoint using an existing code, you + * must verify that you increment this argument counter properly. + * + * The trace codes consist of the following: + * + * ---------------------------------------------------------------------- + *| Class (8) | SubClass (8) | USBGroup(6) | Code (8) |Func | + *| DBG_IOKIT | DBG_IOUSB | | |Qual(2)| + * ---------------------------------------------------------------------- + * + * DBG_IOKIT(05h) DBG_IOUSB(2Dh) + * + * See <sys/kdebug.h> and IOTimeStamp.h for more details. + */ + + + // USB groupings (max of 64) + enum + { + // Family groupings + kUSBTController = 0, + kUSBTControllerUserClient = 1, + + kUSBTDevice = 2, + kUSBTDeviceUserClient = 3, + + kUSBTHub = 4, + kUSBTHubPort = 5, + kUSBTHSHubUserClient = 6, + kUSBTHID = 7, + kUSBTPipe = 8, + + kUSBTInterfaceUserClient = 9, + + kUSBTEnumeration = 10, // Tracepoints in various components to debug USB enumeration + + + // UIM groupings + kUSBTUHCI = 11, + kUSBTUHCIUIM = 12, + kUSBTUHCIInterrupts = 13, + + kUSBTOHCI = 14, + kUSBTOHCIInterrupts = 15, + + kUSBTEHCI = 20, + kUSBTEHCIHubInfo = 22, + kUSBTEHCIInterrupts = 23, + + // 30-33 reserved + + // 21-25 reserved + kUSBTHubPolicyMaker = 35, + kUSBTCompositeDriver = 36, + + // Actions + kUSBTOutstandingIO = 42, + + // kUSBAudio + kUSBAudio = 50 + + // 61-63 reserved + }; + + // USB Controller Tracepoints 0x052D0000 - 0x052D03FF + // kUSBTController + enum + { + kTPControllerStart = 1, + kTPControllerControlPacketHandler = 2, + kTPControllerMakeDevice = 3, + kTPControllerMakeHubDevice = 4, + kTPControllerCreateRootHubDevice = 5, + kTPControllerClearTTHandler = 6, + kTPControllerClearTT = 7, + kTPControllerDoCreateEP = 8, + kTPControllerReadV2 = 9, + kTPControllerReturnIsochDoneQueue = 10, + kTPControllersetPowerState = 11, + kTPControllerCheckPowerModeBeforeGatedCall = 12, + kTPControllerGatedPowerChange = 13, + kTPControllerCheckForRootHubChanges = 14, + kTPControllerRootHubQueueInterruptRead = 15, + kTPControllerRootHubTimer = 16, + kTPControllerDisjointCompletion = 17, + kTPControllerCheckForDisjointDescriptor = 18, + kTPControllerRead = 19, + kTPControllerV3Start = 20, + kTPAllocatePowerStateArray = 21, + kTPInitForPM = 22, + kTPIsocIOLL = 23, + kTPIsocIO = 24, + kTPControllerWrite = 25, + kTPCompletionCall = 26, + kTPControlTransaction = 27, + kTPInterruptTransaction = 28, + kTPInterruptTransactionData = 29, + kTPBulkTransaction = 30, + kTPBulkTransactionData = 31, + kTPIsocTransaction = 32, + kTPInterruptPacketHandler = 33, + kTPBulkPacketHandler = 34, + kTPDevZeroLock = 35, + kTPControlPacketHandlerData = 36, + kTPDoIOTransferIntrSync = 37, + kTPDoIOTransferBulkSync = 38, + kTPBulkPacketHandlerData = 39, + kTPInterruptPacketHandlerData = 40 + }; + + // USB Device Tracepoints + // kUSBTDevice + enum + { + kTPDeviceInit = 1, + kTPDeviceMessage = 2, + kTPDeviceResetDevice = 3, + kTPDeviceGetFullConfigurationDescriptor = 4, + kTPDeviceGetDeviceDescriptor = 5, + kTPDeviceGetConfigDescriptor = 6, + kTPDeviceSetConfiguration = 7, + kTPDeviceSetFeature = 8, + kTPDeviceDeviceRequest = 9, + kTPDeviceGetConfiguration = 10, + kTPDeviceGetDeviceStatus = 11, + kTPDeviceSuspendDevice = 12, + kTPDeviceReEnumerateDevice = 13, + kTPDeviceConfigLock = 14 + }; + + // USB Pipe Tracepoints + // kUSBTPipe + enum + { + kTPPipeInitToEndpoint = 1, + kTPBulkPipeRead = 2, + kTPBulkPipeWrite = 3, + kTPIsocPipeRead = 4, + kTPIsocPipeWrite = 5, + kTPIsocPipeReadLL = 6, + kTPIsocPipeWriteLL = 7, + kTPIBulkReadTS = 8, + kTPPipeControlRequest = 9, + kTPPipeControlRequestMemDesc = 10 + }; + + + // USB kUSBTControllerUserClient Tracepoints + // kUSBTControllerUserClient + enum + { + kTPControllerUCStart = 1, + kTPControllerUCOpen = 2, + kTPControllerUCReadRegister = 3, + kTPControllerUCWriteRegister = 4 + }; + + // USB kUSBTDeviceUserClient Tracepoints + // kUSBTDeviceUserClient + enum + { + kTPDeviceUCDeviceRequestIn = 1, + kTPDeviceUCDeviceRequestOut = 2, + kTPDeviceUCChangeOutstandingIO = 3, + kTPDeviceUCGetGatedOutstandingIO = 4, + kTPDeviceUCReqComplete = 5 + }; + + // USB InterfaceUserClient Tracepoints + // kUSBTInterfaceUserClient + enum + { + kTPInterfaceUCReadPipe = 1, + kTPInterfaceUCWritePipe = 2, + kTPInterfaceUCControlRequestOut = 3, + kTPInterfaceUCControlRequestIn = 4, + kTPInterfaceUCDoIsochPipeAsync = 5, + kTPInterfaceUCLowLatencyPrepareBuffer = 6, + kTPInterfaceUCChangeOutstandingIO = 7, + kTPInterfaceUCReqComplete = 8, + kTPInterfaceUCIsoReqComplete = 9, + kTPInterfaceUCLLIsoReqComplete = 10 + }; + + + // USB HSHubUserClient Tracepoints + // kUSBTHSHubUserClient + enum + { + kTPHSHubUCInitWithTask = 1, + kTPHSHubUCStart = 2, + kTPHSHubUCClose = 3, + kTPHSHubUCGetNumberOfPorts = 4, + kTPHSHubUCGetLocationID = 5, + kTPHSHubUCPutPortIntoTestMode = 6, + kTPHSHubUCSupportsIndicators = 7, + kTPHSHubUCSetIndicatorForPort = 8, + kTPHSHubUCGetPortIndicatorControl = 9, + kTPHSHubUCSetIndicatorsToAutomatic = 10, + kTPHSHubUCGetPowerSwitchingMode = 11, + kTPHSHubUCGetPortPower = 12, + kTPHSHubUCSetPortPower = 13, + kTPHSHubUCDisablePwrMgmt = 14 + }; + + // USB Hub Tracepoints + // kUSBTHub + enum + { + kTPHubStart = 1, + kTPHubMessage = 2, + kTPHubWillTerminate = 3, + kTPHubPowerStateWillChangeTo = 4, + kTPHubPowerChangeDone = 5, + kTPHubConfigureHub = 6, + kTPHubCheckPowerPowerRequirements = 7, + kTPHubHubPowerChange = 8, + kTPHubAreAllPortsDisconnectedOrSuspended= 9, + kTPHubSuspendPorts = 10, + kTPHubSetPortFeature = 11, + kTPHubClearPortFeature = 12, + kTPHubDoPortAction = 13, + kTPHubInterruptReadHandler = 14, + kTPHubResetPortZero = 15, + kTPHubProcessStateChanged = 16, + kTPHubRearmInterruptRead = 17, + kTPHubDoDeviceRequest = 18, + kTPHubWaitForPortResumes = 19, + kTPHubResetMyPort = 20, + kTPHubDecrementOutstandingIO = 21, + kTPHubChangeOutstandingIO = 22, + kTPHubChangeRaisedPowerState = 23, + kTPHubChangeOutstandingResumes = 24, + kTPHubEnterTestMode = 25, + kTPHubLeaveTestMode = 26, + kTPHubPutPortIntoTestMode = 27, + kTPHubGetPortIndicatorControl = 28, + kTPHubSetIndicatorsToAutomatic = 29, + kTPHubGetPortPower = 30, + kTPHubEnsureUsability = 31, + kTPHubCheckPowerRequirements = 32, + kTPHubWaitForPowerOn = 33, + kTPHubDoPortActionLock = 34, + kTPHubCheckForDeadDevice = 35 + }; + + // USB HubPort Tracepoints + // kUSBTHubPort + enum + { + kTPHubPortStop = 1, + kTPHubPortAddDevice = 2, + kTPHubPortSuspendPort = 3, + kTPHubPortFatalError = 4, + kTPHubPortAddDeviceResetChangeHandler = 5, + kTPHubPortHandleResetPortHandler = 6, + kTPHubPortDefaultOverCrntChangeHandler = 7, + kTPHubPortDefaultConnectionChangeHandler = 8, + kTPHubPortReleaseDevZeroLock = 9, + kTPHubPortDetachDevice = 10, + kTPHubPortGetDevZeroDescriptorWithRetries = 11, + kTPHubPortDisplayOverCurrentNotice = 12, + kTPHubPortWakeSuspendCommand = 13, + kTPHubPortWaitForSuspendCommand = 14, + kTPHubPortEnablePowerAfterOvercurrent = 15 + }; + + // USB HID Tracepoints + // kUSBTHID + enum + { + kTPHIDStart = 1, + kTPHIDpowerStateWillChangeTo = 2, + kTPHIDsetPowerState = 3, + kTPHIDpowerStateDidChangeTo = 4, + kTPHIDpowerChangeDone = 5, + kTPHIDhandleStart = 6, + kTPHIDClearFeatureEndpointHalt = 7, + kTPHIDHandleReport = 8, + kTPHIDSuspendPort = 9, + kTPHIDAbortAndSuspend = 10, + kTPHIDClaimPendingRead = 11, + kTPHIDChangeOutstandingIO = 12, + kTPHIDRearmInterruptRead = 13, + kTPHIDInitializeUSBHIDPowerManagement = 14, + kTPHIDInterruptRead = 15, + kTPHIDInterruptReadError = 16, + kTPHIDCheckForDeadDevice = 17 + }; + + // USB Enumeration Tracepoints + // kUSBTEnumeration + enum + { + kTPEnumerationProcessStatusChanged = 1, + kTPEnumerationInitialGetPortStatus = 2, + kTPEnumerationCallAddDevice = 3, + kTPEnumerationAddDevice = 4, + kTPEnumerationResetPort = 5, + kTPEnumerationAddDeviceResetChangeHandler = 6, + kTPEnumerationRegisterService = 7, + kTPEnumerationLowSpeedDevice = 8, + kTPEnumerationFullSpeedDevice = 9 + + }; + + // USB UHCI Tracepoints + // kUSBTUHCI + enum + { + kTPUHCIMessage = 1, + kTPUHCIGetFrameNumber = 2, + kTPUHCIScavengeIsocTransactions = 3, + kTPUHCIScavengeQueueHeads = 4, + kTPUHCIAllocateQH = 5, + kTPUHCIRootHubStatusChange = 6, + kTPUHCIRHSuspendPort = 7, + kTPUHCIRHHoldPortReset = 8, + kTPUHCIRHResumePortCompletion = 9, + kTPUHCISuspendController = 10, + KTPUHCIResumeController = 11, + KTPUHCIResetControllerState = 12, + KTPUHCIRestartControllerFromReset = 13, + KTPUHCIEnableInterrupts = 14, + KTPUHCIDozeController = 15, + KTPUHCIWakeFromDoze = 16, + KTPUHCIPowerState = 17, + }; + + + // USB UHCI Tracepoints + // kUSBTUHCIUIM + enum + { + kTPUHCIUIMCreateControlEndpoint = 1, + kTPUHCIUIMCreateBulkEndpoint = 2, + kTPUHCIUIMCreateInterruptEndpoint = 3, + kTPUHCIUIMCreateIsochEndpoint = 4, + kTPUHCIUIMCreateIsochTransfer = 5, + kTPUHCIUIMDeleteEndpoint = 6, + kTPUHCIUIMUnlinkQueueHead = 7, + kTPUHCIUIMCheckForTimeouts = 8, + kTPUHCIUIMReturnOneTransaction = 9, + kTPUHCIUIMAllocateTDChain = 10, + kTPUHCIUIMAddIsochFramesToSchedule = 11, + kTPUHCIUIMAbortIsochEP = 12, + kTPUHCIUIMCreateInterruptTransfer = 13, + kTPUHCIUIMHandleEndpointAbort = 14 + }; + + // USB UHCI Interrupt Tracepoints + // kUSBTUHCIInterrupts + enum + { + kTPUHCIInterruptsGetFrameNumberInternal = 1, + kTPUHCIInterruptsFilterInterrupt = 2, + kTPUHCIInterruptsHandleInterrupt = 3, + kTPUHCIUpdateFrameList = 4 + }; + + // USB EHCI Tracepoints + // kUSBTEHCI + enum + { + kTPEHCIRootHubResetPort = 1, + kTPEHCIRootHubPortEnable = 2, + kTPEHCIRootHubPortSuspend = 3, + // kTPEHCIRootHubStatusChange = 4, + kTPEHCIRHResumePortCompletion = 5, + kTPEHCIUIMFinalize = 6, + kTPEHCIGetFrameNumber32 = 7, + kTPEHCIGetFrameNumber = 8, + kTPEHCIAllocateQH = 9, + kTPEHCIEnableAsyncSchedule = 10, + kTPEHCIDisableAsyncSchedule = 11, + kTPEHCIEnablePeriodicSchedule = 12, + kTPEHCIDisablePeriodicSchedule = 13, + kTPEHCIMessage = 14, + kTPEHCIMakeEmptyEndPoint = 15, + kTPEHCIAllocateTDs = 16, + kTPEHCIMungeECHIStatus = 17, + kTPEHCIScavengeIsocTransactions = 18, + kTPEHCIScavengeAnEndpointQueue = 19, + kTPEHCIScavengeCompletedTransactions = 20, + kTPEHCICreateBulkEndpoint = 21, + kTPEHCICreateBulkTransfer = 22, + + kTPEHCICreateInterruptEndpoint = 24, + kTPEHCICreateIsochEndpoint = 25, + kTPEHCIAbortIsochEP = 26, + kTPEHCIHandleEndpointAbort = 27, + kTPEHCICreateInterruptTransfer = 28, + kTPEHCIUnlinkAsyncEndpoint = 29, + kTPEHCIDeleteEndpoint = 30, + kTPEHCICreateHSIsochTransfer = 31, + kTPEHCICreateSplitIsochTransfer = 32, + kTPEHCICreateIsochTransfer = 33, + kTPEHCIAddIsocFramesToSchedule = 34, + kTPEHCIReturnOneTransaction = 35, + kTPEHCICheckEDListForTimeouts = 36, + kTPEHCISuspendUSBBus = 37, + kTPEHCICheckForTimeouts = 38, + kTPEHCIResumeUSBBus = 39, + kTPEHCIRestartUSBBus = 40, + kTPEHCIResetControllerState = 41, + kTPEHCIDozeController = 42, + kTPEHCIWakeControllerFromDoze = 43, + kTPEHCIEnableInterrupts = 44, + kTPEHCIPowerState = 45, + kTPEHCIStopUSBBus = 46, + kTPEHCIRestartControllerFromReset = 47 + }; + + // USB EHCI Interrupt Tracepoints + // kUSBTEHCIInterrupts + enum + { + kTPEHCIInterruptsPollInterrupts = 1, + kTPEHCIInterruptsPrimaryInterruptFilter = 2, + kTPEHCIUpdateFrameList = 3, + }; + + + // USB EHCI Interrupt Tracepoints + // kUSBTEHCIHubInfo + enum + { + kTPEHCIAvailableIsochBandwidth = 1, + kTPEHCIAllocateIsochBandwidth = 2 + }; + + // USB OHCI Tracepoints + // kUSBTOHCI + enum + { + kTPOHCIInitialize = 1, + kTPOHCICreateGeneralTransfer = 2, + kTPOHCIAbortEndpoint = 3, + kTPOHCIDeleteEndpoint = 4, + kTPOHCIEndpointStall = 5, + kTPOHCICreateIsochTransfer = 6, + kTPOHCIAllocateTD = 7, + kTPOHCIAllocateITD = 8, + kTPOHCIAllocateED = 9, + kTPOHCIProcessCompletedITD = 10, + kTPOHCIReturnTransactions = 11, + kTPOHCIMessage = 12, + KTPOHCISuspendUSBBus = 13, + KTPOHCIResumeUSBBus = 14, + KTPOHCIResetControllerState = 15, + KTPOHCIRestartControllerFromReset = 16, + KTPOHCIEnableInterrupts = 17, + KTPOHCIDozeController = 18, + KTPOHCIWakeControllerFromDoze = 19, + KTPOHCIPowerState = 20, + kTPOHCIDoneQueueCompletion = 21 + }; + + // USB OHCI Interrupt Tracepoints + // kUSBTOHCIInterrupts + enum + { + kTPOHCIInterruptsPollInterrupts = 1, + kTPOHCIInterruptsPrimaryInterruptFilter = 2, + kTPOHCIUpdateFrameList = 3 + }; + + + // USB HubPolicyMaker Tracepoints + // kUSBTHubPolicyMaker + enum + { + kTPSetPowerState = 1 + }; + + // USB CompositeDriver Tracepoints + // kUSBTCompositeDriver + enum + { + kTPCompositeDriverConfigureDevice = 1 + }; + + // USB USB OutstandingIO Tracepoints + // kUSBTOutstandingIO + enum + { + kTPDeviceUCDecrement = 1, + kTPDeviceUCIncrement = 2, + kTPInterfaceUCDecrement = 3, + kTPInterfaceUCIncrement = 4, + kTPHubDecrement = 5, + kTPHubIncrement = 6, + kTPHIDDecrement = 7, + kTPHIDIncrement = 8 + }; + + // USB Audio driver Tracepoints + // kUSBAudio + enum + { + kTPAudioDriverRead = 1, + kTPAudioDriverCoalesceInputSamples = 2, + kTPAudioDriverCoalesceError = 3, + kTPAudioDriverCoalesce = 4, + kTPAudioDriverReadHandler = 5, + kTPAudioDriverCoalesceError2 = 6, + kTPAudioDriverConvertInputSamples = 7 + }; + + // Tracepoint macros. +#define USB_TRACE(USBClass, code, funcQualifier) ( ( ( DBG_IOKIT & 0xFF ) << 24) | ( ( DBG_IOUSB & 0xFF ) << 16 ) | ( ( USBClass & 0x3F ) << 10 ) | ( ( code & 0xFF ) << 2 ) | ( funcQualifier & 0x3 ) ) + +#define kTPAllUSB USB_TRACE ( 0, 0, 0 ) + +#define USB_CONTROLLER_TRACE(code) USB_TRACE( kUSBTController, code, DBG_FUNC_NONE ) +#define USB_CONTROLLER_UC_TRACE(code) USB_TRACE( kUSBTControllerUserClient, code, DBG_FUNC_NONE ) +#define USB_DEVICE_TRACE(code) USB_TRACE( kUSBTDevice, code, DBG_FUNC_NONE ) +#define USB_DEVICE_UC_TRACE(code) USB_TRACE( kUSBTDeviceUserClient, code, DBG_FUNC_NONE ) + +#define USB_HUB_TRACE(code) USB_TRACE( kUSBTHub, code, DBG_FUNC_NONE ) +#define USB_HUB_PORT_TRACE(code) USB_TRACE( kUSBTHubPort, code, DBG_FUNC_NONE ) +#define USB_HUB_UC_TRACE(code) USB_TRACE( kUSBTHSHubUserClient, code, DBG_FUNC_NONE ) +#define USB_HID_TRACE(code) USB_TRACE( kUSBTHID, code, DBG_FUNC_NONE ) +#define USB_PIPE_TRACE(code) USB_TRACE( kUSBTPipe, code, DBG_FUNC_NONE ) + +#define USB_INTERFACE_UC_TRACE(code) USB_TRACE( kUSBTInterfaceUserClient, code, DBG_FUNC_NONE ) + +#define USB_ENUMERATION_TRACE(code) USB_TRACE( kUSBTEnumeration, code, DBG_FUNC_NONE ) + +#define USB_UHCI_TRACE(code) USB_TRACE( kUSBTUHCI, code, DBG_FUNC_NONE ) +#define USB_UHCI_UIM_TRACE(code) USB_TRACE( kUSBTUHCIUIM, code, DBG_FUNC_NONE ) +#define USB_UHCI_INTERRUPTS_TRACE(code) USB_TRACE( kUSBTUHCIInterrupts, code, DBG_FUNC_NONE ) + +#define USB_OHCI_TRACE(code) USB_TRACE( kUSBTOHCI, code, DBG_FUNC_NONE ) +#define USB_OHCI_INTERRUPTS_TRACE(code) USB_TRACE( kUSBTOHCIInterrupts, code, DBG_FUNC_NONE ) + +#define USB_EHCI_TRACE(code) USB_TRACE( kUSBTEHCI, code, DBG_FUNC_NONE ) +#define USB_EHCI_HUBINFO_TRACE(code) USB_TRACE( kUSBTEHCIHubInfo, code, DBG_FUNC_NONE ) +#define USB_EHCI_INTERRUPTS_TRACE(code) USB_TRACE( kUSBTEHCIInterrupts, code, DBG_FUNC_NONE ) + +#define USB_HUB_POLICYMAKER_TRACE(code) USB_TRACE( kUSBTHubPolicyMaker, code, DBG_FUNC_NONE ) +#define USB_COMPOSITE_DRIVER_TRACE(code) USB_TRACE( kUSBTCompositeDriver, code, DBG_FUNC_NONE ) + +#define USB_OUTSTANDING_IO_TRACE(code) USB_TRACE( kUSBTOutstandingIO, code, DBG_FUNC_NONE ) + +#define USB_AUDIO_DRIVER_TRACE(code) USB_TRACE( kUSBAudio, code, DBG_FUNC_NONE ) + +#ifdef KERNEL + +#include <IOKit/IOTimeStamp.h> + +#define USBTrace(USBClass, code, a, b, c, d) { \ + if (gUSBStackDebugFlags & kUSBEnableTracePointsMask) { \ + IOTimeStampConstant( USB_TRACE(USBClass, code, DBG_FUNC_NONE), a, b, c, d ); \ + } \ + } + +#define USBTrace_Start(USBClass, code, a, b, c, d) { \ + if (gUSBStackDebugFlags & kUSBEnableTracePointsMask) { \ + IOTimeStampConstant( USB_TRACE(USBClass, code, DBG_FUNC_START), a, b, c, d ); \ + } \ + } + +#define USBTrace_End(USBClass, code, a, b, c, d) { \ + if (gUSBStackDebugFlags & kUSBEnableTracePointsMask) { \ + IOTimeStampConstant( USB_TRACE(USBClass, code, DBG_FUNC_END), a, b, c, d ); \ + } \ + } + +#endif + + + +#ifdef __cplusplus +} +#endif + + +#endif /* __IOKIT_IO_USB_FAMILY_TRACEPOINTS__ */ diff --git a/i386/include/IOKit/usb/IOUFIStorageServices.h b/i386/include/IOKit/usb/IOUFIStorageServices.h new file mode 100644 index 0000000..cac43f4 --- /dev/null +++ b/i386/include/IOKit/usb/IOUFIStorageServices.h @@ -0,0 +1,136 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_UFI_STORAGE_SERVICES_H_ +#define _IOKIT_UFI_STORAGE_SERVICES_H_ + +#if defined(KERNEL) && defined(__cplusplus) + +#include <IOKit/IOTypes.h> +#include <IOKit/storage/IOBlockStorageDevice.h> +#include <IOKit/usb/IOUSBMassStorageUFISubclass.h> + + +class IOUFIStorageServices : public IOBlockStorageDevice +{ + + OSDeclareDefaultStructors ( IOUFIStorageServices ) + +private: + bool fMediaChanged; + bool fMediaPresent; + +protected: + + IOUSBMassStorageUFIDevice * fProvider; + + UInt64 fMaxReadBlocks; + UInt64 fMaxWriteBlocks; + + virtual bool attach ( IOService * provider ); + virtual void detach ( IOService * provider ); + + // Reserve space for future expansion. + struct IOUFIStorageServicesExpansionData { }; + IOUFIStorageServicesExpansionData *fIOUFIStorageServicesReserved; + +public: + + virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); + + static void AsyncReadWriteComplete ( void * clientData, + IOReturn status, + UInt64 actualByteCount ); + + // Deprecated + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks, + IOStorageCompletion completion ); + + virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, + UInt64 block, + UInt64 nblks, + IOStorageAttributes * attributes, + IOStorageCompletion * completion ); + + virtual IOReturn doSyncReadWrite ( IOMemoryDescriptor * buffer, + UInt32 block, + UInt32 nblks ); + + virtual IOReturn doEjectMedia ( void ); + + virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); + + virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + + virtual IOReturn doLockUnlockMedia ( bool doLock ); + + virtual IOReturn doSynchronizeCache ( void ); + + virtual char * getVendorString ( void ); + + virtual char * getProductString ( void ); + + virtual char * getRevisionString ( void ); + + virtual char * getAdditionalDeviceInfoString ( void ); + + virtual IOReturn reportBlockSize ( UInt64 * blockSize ); + + virtual IOReturn reportEjectability ( bool * isEjectable ); + + virtual IOReturn reportLockability ( bool * isLockable ); + + virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); + + virtual IOReturn reportPollRequirements ( bool * pollIsRequired, + bool * pollIsExpensive ); + + virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); + + virtual IOReturn reportRemovability ( bool * isRemovable ); + + virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); + + virtual IOReturn getWriteCacheState ( bool * enabled ); + + virtual IOReturn setWriteCacheState ( bool enabled ); + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 1 ); + OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 2 ); + OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 3 ); + OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 4 ); + OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 5 ); + OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 6 ); + OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 7 ); + OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 8 ); + +}; + +#endif /* defined(KERNEL) && defined(__cplusplus) */ + +#endif /* _IOKIT_UFI_STORAGE_SERVICES_H_ */ diff --git a/i386/include/IOKit/usb/IOUSBBus.h b/i386/include/IOKit/usb/IOUSBBus.h new file mode 100644 index 0000000..a42191a --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBBus.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBBUS_H +#define _IOKIT_IOUSBBUS_H + +#include <IOKit/IOService.h> + +class IOUSBBus : public IOService +{ + OSDeclareAbstractStructors(IOUSBBus) +}; + +#endif /* ! _IOKIT_IOUSBBUS_H */ + diff --git a/i386/include/IOKit/usb/IOUSBCommand.h b/i386/include/IOKit/usb/IOUSBCommand.h new file mode 100644 index 0000000..0f7c36b --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBCommand.h @@ -0,0 +1,266 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBCOMMAND_H +#define _IOKIT_IOUSBCOMMAND_H + +#include <IOKit/IOCommand.h> +#include <IOKit/IOCommandPool.h> +#include <IOKit/IOMemoryDescriptor.h> +#include <IOKit/IODMACommand.h> +#include <IOKit/usb/USB.h> + +/* + * USB Command + * This is the command block for a USB command to be queued on the + * Command Gate of the WorkLoop. Although the actual work of creating + * the command and enqueueing it is done for them via the deviceRequest, + * read, and write methods, this is the primary way that devices will get + * work done. + * Note: This is private to IOUSBController and should be moved to a + * private header. + */ + +typedef enum { + DEVICE_REQUEST, // Device request using pointer + READ, + WRITE, + CREATE_EP, + DELETE_EP, + DEVICE_REQUEST_DESC, // Device request using descriptor + DEVICE_REQUEST_BUFFERCOMMAND // Device request using a second IOUSBCommand in _bufferCommand +} usbCommand; + + + +/*! + @class IOUSBCommand + @abstract A subclass of IOCommand that is used to add USB specific data. + */ +class IOUSBCommand : public IOCommand +{ + OSDeclareAbstractStructors(IOUSBCommand) + +protected: + usbCommand _selector; + IOUSBDeviceRequestPtr _request; + USBDeviceAddress _address; + UInt8 _endpoint; + UInt8 _direction; + UInt8 _type; + bool _bufferRounding; + IOMemoryDescriptor * _buffer; + IOUSBCompletion _uslCompletion; + IOUSBCompletion _clientCompletion; + UInt32 _dataRemaining; // For Control transfers + UInt8 _stage; // For Control transfers + IOReturn _status; + IOMemoryDescriptor * _origBuffer; + IOUSBCompletion _disjointCompletion; + IOByteCount _dblBufLength; + UInt32 _noDataTimeout; + UInt32 _completionTimeout; + UInt32 _UIMScratch[10]; + + struct ExpansionData + { + IOByteCount _reqCount; + IOMemoryDescriptor *_requestMemoryDescriptor; + IOMemoryDescriptor *_bufferMemoryDescriptor; + bool _multiTransferTransaction; + bool _finalTransferInTransaction; + bool _useTimeStamp; + AbsoluteTime _timeStamp; + bool _isSyncTransfer; // Returns true if the command is used for a synchronous transfer + IODMACommand *_dmaCommand; // used to get memory mapping + IOUSBCommand *_bufferUSBCommand; // points to another IOUSBCommand used for phase 2 of control transactions + IOUSBCommand *_masterUSBCommand; // points from the bufferUSBCommand back to the parent command + }; + ExpansionData * _expansionData; + + // we override these OSObject method in order to allocate and release our expansion data + virtual bool init(); + virtual void free(); + +public: + + // static constructor + static IOUSBCommand * NewCommand(void); + + // Manipulators + void SetSelector(usbCommand sel); + void SetRequest(IOUSBDeviceRequestPtr req); + void SetAddress(USBDeviceAddress addr); + void SetEndpoint(UInt8 ep); + void SetDirection(UInt8 dir); + void SetType(UInt8 type); + void SetBufferRounding(bool br); + void SetBuffer(IOMemoryDescriptor *buf); + void SetUSLCompletion(IOUSBCompletion completion); + void SetClientCompletion(IOUSBCompletion completion); + void SetDataRemaining(UInt32 dr); + void SetStage(UInt8 stage); + void SetStatus(IOReturn stat); + void SetOrigBuffer(IOMemoryDescriptor *buf); + void SetDisjointCompletion(IOUSBCompletion completion); + void SetDblBufLength(IOByteCount len); + void SetNoDataTimeout(UInt32 to); + void SetCompletionTimeout(UInt32 to); + void SetUIMScratch(UInt32 index, UInt32 value); + void SetReqCount(IOByteCount reqCount); + void SetRequestMemoryDescriptor(IOMemoryDescriptor *requestMemoryDescriptor); + void SetBufferMemoryDescriptor(IOMemoryDescriptor *bufferMemoryDescriptor); + void SetMultiTransferTransaction(bool); + void SetFinalTransferInTransaction(bool); + void SetUseTimeStamp(bool); + void SetTimeStamp(AbsoluteTime timeStamp); + void SetIsSyncTransfer(bool); + inline void SetDMACommand(IODMACommand *dmaCommand) { _expansionData->_dmaCommand = dmaCommand; } + void SetBufferUSBCommand(IOUSBCommand *bufferUSBCommand); + + // Accessors + usbCommand GetSelector(void); + IOUSBDeviceRequestPtr GetRequest(void); + USBDeviceAddress GetAddress(void); + UInt8 GetEndpoint(void); + UInt8 GetDirection(void); + UInt8 GetType(void); + bool GetBufferRounding(void); + IOMemoryDescriptor * GetBuffer(void); + IOUSBCompletion GetUSLCompletion(void); + IOUSBCompletion GetClientCompletion(void); + UInt32 GetDataRemaining(void); + UInt8 GetStage(void); + IOReturn GetStatus(void); + IOMemoryDescriptor * GetOrigBuffer(void); + IOUSBCompletion GetDisjointCompletion(void); + IOByteCount GetDblBufLength(void); + UInt32 GetNoDataTimeout(void); + UInt32 GetCompletionTimeout(void); + UInt32 GetUIMScratch(UInt32 index); + IOByteCount GetReqCount(void); + IOMemoryDescriptor * GetRequestMemoryDescriptor(void); + IOMemoryDescriptor * GetBufferMemoryDescriptor(void); + bool GetMultiTransferTransaction(void); + bool GetFinalTransferInTransaction(void); + bool GetUseTimeStamp(void); + AbsoluteTime GetTimeStamp(void); + bool GetIsSyncTransfer(void); + inline IODMACommand * GetDMACommand(void) {return _expansionData->_dmaCommand; } + inline IOUSBCommand * GetBufferUSBCommand(void) {return _expansionData->_bufferUSBCommand; } +}; + + +class IOUSBIsocCommand : public IOCommand +{ + OSDeclareAbstractStructors(IOUSBIsocCommand) + +protected: + usbCommand _selector; + USBDeviceAddress _address; + UInt8 _endpoint; + UInt8 _direction; + IOMemoryDescriptor * _buffer; + IOUSBIsocCompletion _completion; + UInt64 _startFrame; + UInt32 _numFrames; + IOUSBIsocFrame * _frameList; + IOReturn _status; + + struct ExpansionData + { + UInt32 _updateFrequency; + bool _useTimeStamp; + AbsoluteTime _timeStamp; + bool _isSyncTransfer; // Returns true if the command is used for a synchronous transfer + bool _rosettaClient; + IODMACommand * _dmaCommand; + IOUSBIsocCompletion _uslCompletion; + bool _lowLatency; + }; + ExpansionData * _expansionData; + + // we override these OSObject method in order to allocate and release our expansion data + virtual bool init(); + virtual void free(); + +public: + // static constructor + static IOUSBIsocCommand *NewCommand(void); + + // Manipulators + void SetSelector(usbCommand sel) {_selector = sel; } + void SetAddress(USBDeviceAddress addr) {_address = addr; } + void SetEndpoint(UInt8 ep) {_endpoint = ep; } + void SetDirection(UInt8 dir) {_direction = dir; } + void SetBuffer(IOMemoryDescriptor *buf) {_buffer = buf; } + void SetCompletion(IOUSBIsocCompletion completion) {_completion = completion; } + void SetStartFrame(UInt64 sf) {_startFrame = sf; } + void SetNumFrames(UInt32 nf) {_numFrames = nf; } + void SetFrameList(IOUSBIsocFrame *fl) {_frameList = fl; } + void SetStatus(IOReturn stat) {_status = stat; } + void SetUpdateFrequency( UInt32 fr) { _expansionData->_updateFrequency = fr; } + void SetUseTimeStamp(bool useIt) { _expansionData->_useTimeStamp= useIt; } + void SetTimeStamp(AbsoluteTime timeStamp) { _expansionData->_timeStamp= timeStamp; } + void SetIsSyncTransfer(bool isSync) { _expansionData->_isSyncTransfer = isSync; } + void SetRosettaClient(bool isRosetta) { _expansionData->_rosettaClient = isRosetta; } + void SetDMACommand(IODMACommand *dmaCommand) { _expansionData->_dmaCommand = dmaCommand; } + void SetUSLCompletion(IOUSBIsocCompletion completion) { _expansionData->_uslCompletion = completion; } + void SetLowLatency(bool lowLatency) { _expansionData->_lowLatency = lowLatency; } + + // Accessors + usbCommand GetSelector(void) { return _selector; } + USBDeviceAddress GetAddress(void) { return _address; } + UInt8 GetEndpoint(void) { return _endpoint; } + UInt8 GetDirection(void) { return _direction; } + IOMemoryDescriptor * GetBuffer(void) { return _buffer; } + IOUSBIsocCompletion GetCompletion(void) { return _completion; } + UInt64 GetStartFrame(void) { return _startFrame; } + UInt32 GetNumFrames(void) { return _numFrames; } + IOUSBIsocFrame * GetFrameList(void) { return _frameList; } + UInt32 GetUpdateFrequency(void) { return _expansionData->_updateFrequency; } + IOReturn GetStatus(void) { return _status; } + bool GetUseTimeStamp(void) { return _expansionData->_useTimeStamp; } + AbsoluteTime GetTimeStamp(void) { return _expansionData->_timeStamp; } + bool GetIsSyncTransfer(void) { return _expansionData->_isSyncTransfer; } + bool GetIsRosettaClient(void) { return _expansionData->_rosettaClient; } + IODMACommand * GetDMACommand(void) { return _expansionData->_dmaCommand; } + IOUSBIsocCompletion GetUSLCompletion(void) { return _expansionData->_uslCompletion; } + bool GetLowLatency(void) { return _expansionData->_lowLatency; } +}; + +class IOUSBCommandPool : public IOCommandPool +{ + OSDeclareDefaultStructors( IOUSBCommandPool ) + +protected: + virtual IOReturn gatedReturnCommand(IOCommand * command); + virtual IOReturn gatedGetCommand(IOCommand ** command, bool blockForCommand); + +public: + static IOCommandPool * withWorkLoop(IOWorkLoop * inWorkLoop); +}; + + +#endif + diff --git a/i386/include/IOKit/usb/IOUSBCompositeDriver.h b/i386/include/IOKit/usb/IOUSBCompositeDriver.h new file mode 100644 index 0000000..ef72cf4 --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBCompositeDriver.h @@ -0,0 +1,127 @@ +/* + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1998-2006 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBCompositeDriver_H +#define _IOKIT_IOUSBCompositeDriver_H + +//================================================================================================ +// +// Headers +// +//================================================================================================ +// +#include <libkern/OSByteOrder.h> +#include <IOKit/IOLib.h> +#include <IOKit/IONotifier.h> +#include <IOKit/IOService.h> +#include <IOKit/IOMessage.h> +#include <IOKit/usb/IOUSBBus.h> +#include <IOKit/usb/IOUSBDevice.h> +#include <IOKit/usb/IOUSBInterface.h> +#include <IOKit/usb/IOUSBLog.h> +#include <IOKit/usb/USB.h> + + +//================================================================================================ +// +// Class Declaration for IOUSBCompositeDriver +// +//================================================================================================ +// +/*! + @class IOUSBCompositeDriver + @abstract Driver that matches to USB composite devices. + @discussion This class can be overriden to provide for specific behaviors. The driver itself essentially + just calls SetConfiguration(). + */ +class IOUSBCompositeDriver : public IOService +{ + OSDeclareDefaultStructors(IOUSBCompositeDriver) + + IOUSBDevice * fDevice; + IONotifier * fNotifier; + bool fExpectingClose; + UInt8 fConfigValue; + UInt8 fConfigbmAttributes; + + struct IOUSBCompositeDriverExpansionData + { + }; + + IOUSBCompositeDriverExpansionData * fIOUSBCompositeExpansionData; + + static IOReturn CompositeDriverInterestHandler( void * target, void * refCon, UInt32 messageType, IOService * provider, void * messageArgument, vm_size_t argSize ); + +public: + + // IOService Methods + // + virtual bool start(IOService * provider); + virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); + virtual bool willTerminate( IOService * provider, IOOptionBits options ); + virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer ); + + // IOUSBCompositeDriver Methods + // + virtual bool ConfigureDevice(); + virtual IOReturn ReConfigureDevice(); + /*! + @function SetConfiguration + @abstract Call IOUSBDevice to do a SetConfiguration call to the device. + @param configValue The desired configuration value. + @param startInterfaceMatching A boolean specifying whether IOKit should begin the process of finding + matching drivers for the new IOUSBInterface objects. + */ + virtual IOReturn SetConfiguration(UInt8 configValue, bool startInterfaceMatching=true); + + // Getters + // + bool GetExpectingClose() { return fExpectingClose; } + UInt8 GetConfigValue() { return fConfigValue; } + UInt8 GetConfigbmAttributes() { return fConfigbmAttributes; } + IONotifier * GetNotifier() { return fNotifier; } + + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 0); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 1); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 2); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 3); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 4); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 5); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 6); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 7); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 8); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 9); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 10); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 11); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 12); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 13); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 14); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 15); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 16); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 17); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 18); + OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 19); +}; + +#endif _IOKIT_IOUSBCompositeDriver_H diff --git a/i386/include/IOKit/usb/IOUSBController.h b/i386/include/IOKit/usb/IOUSBController.h new file mode 100644 index 0000000..18940f2 --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBController.h @@ -0,0 +1,1073 @@ +/* + * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.2 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBCONTROLLER_H +#define _IOKIT_IOUSBCONTROLLER_H + +//================================================================================================ +// +// Headers +// +//================================================================================================ +// +#include <libkern/c++/OSArray.h> + +#include <IOKit/IOService.h> +#include <IOKit/IOMemoryDescriptor.h> +#include <IOKit/IODeviceMemory.h> +#include <IOKit/IOWorkLoop.h> +#include <IOKit/IOCommandGate.h> +#include <IOKit/IOCommandPool.h> + +#include <IOKit/usb/USB.h> +#include <IOKit/usb/USBHub.h> +#include <IOKit/usb/IOUSBBus.h> +#include <IOKit/usb/IOUSBNub.h> +#include <IOKit/usb/IOUSBCommand.h> +#include <IOKit/usb/IOUSBWorkLoop.h> + + +//================================================================================================ +// +// Types and Constants +// +//================================================================================================ +// +enum +{ + kErrataCMDDisableTestMode = (1 << 0), // turn off UHCI test mode + kErrataOnlySinglePageTransfers = (1 << 1), // Don't cross page boundaries in a single transfer + kErrataRetryBufferUnderruns = (1 << 2), // Don't cross page boundaries in a single transfer + kErrataLSHSOpti = (1 << 3), // Don't cross page boundaries in a single transfer + kErrataDisableOvercurrent = (1 << 4), // Always set the NOCP bit in rhDescriptorA register + kErrataLucentSuspendResume = (1 << 5), // Don't allow port suspend at the root hub + kErrataNeedsWatchdogTimer = (1 << 6), // Use Watchdog timer to reset confused controllers + kErrataNeedsPortPowerOff = (1 << 7), // Power off the ports and back on again to clear weird status. + kErrataAgereEHCIAsyncSched = (1 << 8), // needs workaround for Async Sched bug + kErrataNECOHCIIsochWraparound = (1 << 9), // needs workaround for NEC isoch buffer wraparound problem + kErrataNECIncompleteWrite = (1 << 10), // needs workaround for NEC bits not sticking (errata IBB-2UE-00030 Jun 23 2005) + kErrataICH6PowerSequencing = (1 << 11), // needs special power sequencing for early Transition machines + kErrataICH7ISTBuffer = (1 << 12), // buffer for Isochronous Scheduling Threshold + kErrataUHCISupportsOvercurrent = (1 << 13), // UHCI controller supports overcurrent detection + kErrataNeedsOvercurrentDebounce = (1 << 14), // The overcurrent indicator should be debounced by 10ms + kErrataSupportsPortResumeEnable = (1 << 15), // UHCI has resume enable bits at config address 0xC4 + kErrataNoCSonSplitIsoch = (1 << 16), // MCP79 - split iscoh is a little different + kErrataOHCINoGlobalSuspendOnSleep = (1 << 17), // when sleeping, do not put the OHCI controller in SUSPEND state. just leave it Operational with suspended downstream ports + kErrataMissingPortChangeInt = (1 << 18), // sometimes the port change interrupt may be missing + kErrataMCP79IgnoreDisconnect = (1 << 19), // MCP79 - need to ignore a connect/disconnect on wake + kErrataUse32bitEHCI = (1 << 20) , // MCP79 - EHCI should only run with 32 bit DMA addresses + kErrataUHCISupportsResumeDetectOnConnect = (1 << 21), // UHCI controller will generate a ResumeDetect interrupt while in Global Suspend if a device is plugged in + kErrataDontUseCompanionController = (1 << 22) // For systems which will end up being EHCI only +}; + +enum +{ + kUSBWatchdogTimeoutMS = 1000 +}; + + +/*! + @struct + @discussion This table contains the list of errata that are necessary for known problems with particular devices. + The format is vendorID, product ID, lowest revisionID needing errata, highest rev needing errata, errataBits. + The result of all matches is ORed together, so more than one entry may match. + Typically for a given errata a list of revisions that this applies to is supplied. + @field vendID The Vendor ID of the device + @field deviceID Product ID of device + @field revisionLo Lowest product revsion to apply errata to + @field revisionHi Highest product revision to apply errata to + @field errata Bit field flagging which errata to apply to device. +*/ + +struct ErrataListEntryStruct +{ + UInt16 vendID; + UInt16 deviceID; + UInt16 revisionLo; + UInt16 revisionHi; + UInt32 errata; +}; + +typedef struct ErrataListEntryStruct ErrataListEntry, *ErrataListEntryPtr; + + +//================================================================================================ +// +// Routines used to implement synchronous I/O +// +//================================================================================================ +// +void IOUSBSyncCompletion(void *target, void * parameter, IOReturn status, UInt32 bufferSizeRemaining); + +void IOUSBSyncIsoCompletion(void *target, void * parameter, IOReturn status, IOUSBIsocFrame *pFrames); + + +//================================================================================================ +// +// Forward Declarations +// +//================================================================================================ +// +class IOUSBDevice; +class IOUSBLog; +class IOUSBHubDevice; +class IOUSBRootHubDevice; +class IOMemoryDescriptor; + + +//================================================================================================ +// +// IOUSBController Class +// +//================================================================================================ +// +/*! + @class IOUSBController + @abstract Base class for USB hardware driver + @discussion Not many directly useful methods for USB device driver writers, + IOUSBDevice, IOUSBInterface and IOUSBPipe provide more useful abstractions. + The bulk of this class interfaces between IOKit and the low-level UIM, which is + based on the MacOS9 UIM. To impliment a new controller type, subclass + IOUSBController and impiment all the "UIM functions". AppleUSBOHCI + is an example of this implementing all the functions necessary to drive an + OHCI controller. +*/ +class IOUSBController : public IOUSBBus +{ + OSDeclareAbstractStructors(IOUSBController) + friend class IOUSBControllerV2; + friend class IOUSBControllerV3; + +protected: + + IOUSBWorkLoop * _workLoop; + IOCommandGate * _commandGate; + IOUSBRootHubDevice * _rootHubDevice; + UInt32 _devZeroLock; + static UInt32 _busCount; + static bool gUsedBusIDs[256]; + + struct ExpansionData + { + IOCommandPool *freeUSBCommandPool; + IOCommandPool *freeUSBIsocCommandPool; + IOTimerEventSource *watchdogUSBTimer; + bool _terminating; + bool _watchdogTimerActive; + bool _pcCardEjected; // Obsolete + UInt32 _busNumber; + UInt32 _currentSizeOfCommandPool; + UInt32 _currentSizeOfIsocCommandPool; + UInt8 _controllerSpeed; // Controller speed, passed down for splits + thread_call_t _terminatePCCardThread; // Obsolete + bool _addressPending[128]; + SInt32 _activeIsochTransfers; // isochronous transfers in the queue + IOService *_provider; // common name for our provider + bool _controllerCanSleep; // true iff the controller is able to support sleep/wake + bool _needToClose; + UInt32 _isochMaxBusStall; // value (in ns) of the maximum PCI bus stall allowed for Isoch.. + }; + ExpansionData *_expansionData; + + // The following methods do not use and upper case initial letter because they are part of IOKit + // + +public: + virtual bool init( OSDictionary * propTable ); + virtual bool start( IOService * provider ); + virtual void stop( IOService * provider ); + virtual bool finalize(IOOptionBits options); + virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); + virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer ); + +protected: + + IOReturn getNubResources( IOService * regEntry ); + + virtual UInt32 GetErrataBits( + UInt16 vendorID, + UInt16 deviceID, + UInt16 revisionID ); + + + static IOReturn DoDeleteEP( + OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + + static IOReturn DoAbortEP( + OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + + static IOReturn DoClearEPStall( + OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + + static IOReturn DoCreateEP( + OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + static IOReturn DoControlTransfer( + OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + + static IOReturn DoIOTransfer( + OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + + static IOReturn DoIsocTransfer( + OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + + static IOReturn DoLowLatencyIsocTransfer( + OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + + static void ControlPacketHandler( + OSObject * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining ); + + static void InterruptPacketHandler( + OSObject * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining ); + + static void BulkPacketHandler( + OSObject * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining ); + + static void IsocCompletionHandler( + OSObject * target, + void * parameter, + IOReturn status, + IOUSBIsocFrame *pFrames ); + + static void LowLatencyIsocCompletionHandler( + OSObject * target, + void * parameter, + IOReturn status, + IOUSBLowLatencyIsocFrame *pFrames ); + + static void WatchdogTimer(OSObject *target, IOTimerEventSource *sender); + + // Obsolete + static void TerminatePCCard(OSObject *target); + + static IOReturn ProtectedDevZeroLock(OSObject *target, void* lock, void *, void *, void*); + + + USBDeviceAddress GetNewAddress( void ); + + IOReturn ControlTransaction( IOUSBCommand * command ); + + IOReturn InterruptTransaction( IOUSBCommand * command ); + + IOReturn BulkTransaction( IOUSBCommand * command ); + + IOReturn IsocTransaction( IOUSBIsocCommand * command ); + + IOReturn LowLatencyIsocTransaction( IOUSBIsocCommand * command ); + + void FreeCommand( IOUSBCommand * command ); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Invokes the specified completion action of the request. If + // the completion action is unspecified, no action is taken. + void Complete( + IOUSBCompletion completion, + IOReturn status, + UInt32 actualByteCount = 0 ); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Invokes the specified completion action of the request. If + // the completion action is unspecified, no action is taken. + void CompleteWithTimeStamp ( + IOUSBCompletionWithTimeStamp completion, + IOReturn status, + UInt32 actualByteCount, + AbsoluteTime timeStamp); + + + + // + // UIM methods + // + +/*! + @function UIMInitialize + @abstract UIM function, initialise the controller and UIM data structures. +*/ + virtual IOReturn UIMInitialize( IOService * provider ) = 0; + +/*! + @function UIMFinalize + @abstract UIM function, finalise the controller and UIM data structures prior to removal. +*/ + virtual IOReturn UIMFinalize() = 0; + + // Control +/*! + @function UIMCreateControlEndpoint + @abstract UIM function, create a control endpoint for the controller. + @param functionNumber The USB device ID of the device for this endpoint + @param endpointNumber The endpoint number for this endpoint + @param maxPacketSize Maximum packet size of this endpoint + @param speed speed of the device: kUSBDeviceSpeedLow or kUSBDeviceSpeedFull +*/ + virtual IOReturn UIMCreateControlEndpoint( + UInt8 functionNumber, + UInt8 endpointNumber, + UInt16 maxPacketSize, + UInt8 speed) = 0; + +/* Note: this function has been superceded. */ + virtual IOReturn UIMCreateControlTransfer( short functionNumber, + short endpointNumber, + IOUSBCompletion completion, + void * CBP, + bool bufferRounding, + UInt32 bufferSize, + short direction) = 0; + +/*! + @function UIMCreateControlTransfer + @abstract UIM function, Do a transfer on a control endpoint. + This method supercedes the method which takes a void * parameter. + @param functionNumber The USB device ID of the device to perform the transaction with + @param endpointNumber The endpoint number for the transaction + @param completion Action to perform when I/O completes + @param CBP Memory descriptor describing the buffer to transfer. Will never describe + memory which has disjoint packets. + @param bufferRounding If true, short packets are OK and do not cause an error + @param bufferSize Size of the data to transfer in the data phase. (C + @param direction Specifies direction and PID for transaction. kUSBIn, KUSBOut (DATA PID) or kUSBSetup (SETUP PID). +*/ + virtual IOReturn UIMCreateControlTransfer( short functionNumber, + short endpointNumber, + IOUSBCompletion completion, + IOMemoryDescriptor * CBP, + bool bufferRounding, + UInt32 bufferSize, + short direction) = 0; + + // Bulk +/*! + @function UIMCreateBulkEndpoint + @abstract UIM function, create a bulk endpoint for the controller. + @param functionNumber The USB device ID of the device for this endpoint + @param endpointNumber The endpoint number for this endpoint + @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. + @param speed speed of the device: kUSBDeviceSpeedLow or kUSBDeviceSpeedFull + @param maxPacketSize Maximum packet size of this endpoint +*/ + virtual IOReturn UIMCreateBulkEndpoint( + UInt8 functionNumber, + UInt8 endpointNumber, + UInt8 direction, + UInt8 speed, + UInt8 maxPacketSize) = 0; + +/* Note: this function has been superceded. */ + virtual IOReturn UIMCreateBulkTransfer( short functionNumber, + short endpointNumber, + IOUSBCompletion completion, + IOMemoryDescriptor * CBP, + bool bufferRounding, + UInt32 bufferSize, + short direction) = 0; + + // Interrupt +/*! + @function UIMCreateInterruptEndpoint + @abstract UIM function, create an interrupt endpoint for the controller. + @param functionNumber The USB device ID of the device for this endpoint + @param endpointNumber The endpoint number for this endpoint + @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. + @param speed speed of the device: kUSBDeviceSpeedLow or kUSBDeviceSpeedFull + @param maxPacketSize Maximum packet size of this endpoint + @param pollingRate The maximum polling interval from the endpoint descriptor. +*/ + virtual IOReturn UIMCreateInterruptEndpoint( + short functionAddress, + short endpointNumber, + UInt8 direction, + short speed, + UInt16 maxPacketSize, + short pollingRate) = 0; + +/* Note: this function has been superceded. */ + virtual IOReturn UIMCreateInterruptTransfer( short functionNumber, + short endpointNumber, + IOUSBCompletion completion, + IOMemoryDescriptor * CBP, + bool bufferRounding, + UInt32 bufferSize, + short direction) = 0; + + // Isoch +/*! + @function UIMCreateIsochEndpoint + @abstract Create an Isochronous endpoint in the controller. + @param functionNumber The USB device ID of the device for this endpoint + @param endpointNumber The endpoint number for this endpoint + @param maxPacketSize Maximum packet size of this endpoint + @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. +*/ + virtual IOReturn UIMCreateIsochEndpoint( + short functionAddress, + short endpointNumber, + UInt32 maxPacketSize, + UInt8 direction) = 0; + +/*! + @function UIMCreateIsochTransfer + @abstract UIM function, Do a transfer on an Isocchronous endpoint. + @param functionNumber The USB device ID of the device to perform the transaction with + @param endpointNumber The endpoint number for the transaction + @param completion Action to perform when I/O completes + @param direction Specifies direction for transfer. kUSBIn or KUSBOut. + @param frameStart The frame number in which to start the transactions + @param pBuffer describes memory buffer. + @param frameCount number of frames to do transactions in + @param pFrames Describes transactions in individual frames, gives sizes and reults for transactions. +*/ + virtual IOReturn UIMCreateIsochTransfer( + short functionAddress, + short endpointNumber, + IOUSBIsocCompletion completion, + UInt8 direction, + UInt64 frameStart, + IOMemoryDescriptor * pBuffer, + UInt32 frameCount, + IOUSBIsocFrame *pFrames) = 0; + +/*! + @function UIMAbortEndpoint + @abstract UIM function Abort the specified endpoint, return all transactions queued on it. + @param functionNumber The USB device ID of the device to Abort + @param endpointNumber The endpoint number to Abort + @param direction Specifies direction of the endpoint for uniqueness. kUSBIn or KUSBOut. +*/ + virtual IOReturn UIMAbortEndpoint( + short functionNumber, + short endpointNumber, + short direction) = 0; + +/*! + @function UIMDeleteEndpoint + @abstract UIM function Delete the specified endpoint, returning all transactions queued on it. + @param functionNumber The USB device ID of the device to Delete + @param endpointNumber The endpoint number to Delete + @param direction Specifies direction of the endpoint for uniqueness. kUSBIn or KUSBOut. +*/ + virtual IOReturn UIMDeleteEndpoint( + short functionNumber, + short endpointNumber, + short direction) = 0; + +/*! + @function UIMClearEndpointStall + @abstract UIM function Clear stall on the specified endpoint, set data toggle to zero, + return all transactions queued on it. + @param functionNumber The USB device ID of the device to Clear + @param endpointNumber The endpoint number to Clear + @param direction Specifies direction of the endpoint for uniqueness. kUSBIn or KUSBOut. +*/ + virtual IOReturn UIMClearEndpointStall( + short functionNumber, + short endpointNumber, + short direction) = 0; + +/*! + @function UIMRootHubStatusChange + @abstract UIM function UIMRootHubStatusChange - This method was internal to the UIM (never called by the superclass) until + IOUSBControllerV3. For UIMs which are a subclass of IOUSBController or IOUSBControllerV2, it can + still be used internally only. For subclasses of IOUSBControllerV3, however, the meaning has changed + slightly. Now, it is used to determine if there is a status change on the root hub, and if so, it + needs to update the IOUSBControllerV3 instance variable _rootHubStatusChangedBitmap +*/ + virtual void UIMRootHubStatusChange(void) = 0; + + static const IORegistryPlane *gIOUSBPlane; + +public: + + static IOUSBLog *_log; + + IOCommandGate * GetCommandGate(void); + + /*! + @struct Endpoint + Describes an endpoint of a device. + Simply an easier to use version of the endpoint descriptor. + @field descriptor The raw endpoint descriptor. + @field number Endpoint number + @field direction Endpoint direction: kUSBOut, kUSBIn, kUSBAnyDirn + @field transferType Type of endpoint: kUSBControl, kUSBIsoc, kUSBBulk, kUSBInterrupt + @field maxPacketSize Maximum packet size for endpoint + @field interval Polling interval in milliseconds (only relevent for Interrupt endpoints) + */ + struct Endpoint { + IOUSBEndpointDescriptor * descriptor; + UInt8 number; + UInt8 direction; // in, out + UInt8 transferType; // cntrl, bulk, isoc, int + UInt16 maxPacketSize; + UInt8 interval; + }; + + // Implements IOService::getWorkLoop const member function + virtual IOWorkLoop * getWorkLoop() const; + + /* + * Root hub methods + * Only of interest to the IOUSBRootHubDevice object + */ +/*! + @function GetRootHubDeviceDescriptor + @abstract UIM function, return the device descriptor of the simulated root hub device + As GET_DESCRIPTOR control request for device descrptor + @param desc Descriptor structure to return data in +*/ + virtual IOReturn GetRootHubDeviceDescriptor( IOUSBDeviceDescriptor *desc ) = 0; + +/*! + @function GetRootHubDescriptor + @abstract UIM function, return the hub descriptor of the simulated root hub device + As GET_DESCRIPTOR control request for hub descrptor + @param desc Descriptor structure to return data in +*/ + virtual IOReturn GetRootHubDescriptor( IOUSBHubDescriptor *desc ) = 0; + +/*! + @function SetRootHubDescriptor + @abstract UIM function, optional. Set the hub descriptor data. + As SET_DESCRIPTOR control request for hub descrptor + @param buffer Descriptor data +*/ + virtual IOReturn SetRootHubDescriptor( OSData *buffer ) = 0; + +/*! + @function GetRootHubConfDescriptor + @abstract UIM function, retrun the configuration descriptor of the simulated root hub device + As GET_DESCRIPTOR control request for configuration descrptor + @param desc Descriptor structure to return data in +*/ + virtual IOReturn GetRootHubConfDescriptor( OSData *desc ) = 0; + +/*! + @function GetRootHubStatus + @abstract UIM function, get the status of the root hub. As GET_STATUS control request to device. + @param status Status structure to return +*/ + virtual IOReturn GetRootHubStatus( IOUSBHubStatus *status ) = 0; + +/*! + @function SetRootHubFeature + @abstract UIM function, set feature of root hub, As SET_FEATURE control request. + @param wValue The feature to set, as would be transferred in wValue field of SETUP packet. +*/ + virtual IOReturn SetRootHubFeature( UInt16 wValue ) = 0; + +/*! + @function ClearRootHubFeature + @abstract UIM function, set feature of root hub, As CLEAR_FEATURE control request. + @param wValue The feature to clear, as would be transferred in wValue field of SETUP packet. +*/ + virtual IOReturn ClearRootHubFeature( UInt16 wValue ) = 0; + +/*! + @function GetRootHubPortStatus + @abstract UIM function, get the status of a root hub port. As GET_STATUS control request to the port. + @param status Status structure to return + @param port Port to get status for. +*/ + virtual IOReturn GetRootHubPortStatus( IOUSBHubPortStatus *status, UInt16 port ) = 0; + +/*! + @function SetRootHubPortFeature + @abstract UIM function, set feature of a root hub port, As SET_FEATURE control request to a port. + @param wValue The feature to set, as would be transferred in wValue field of SETUP packet. + @param port Port to set feature for +*/ + virtual IOReturn SetRootHubPortFeature( UInt16 wValue, UInt16 port ) = 0; + +/*! + @function ClearRootHubPortFeature + @abstract UIM function, clear feature of a root hub port, As CLEAR_FEATURE control request to a port. + @param wValue The feature to clear, as would be transferred in wValue field of SETUP packet. + @param port Port to clear feature for +*/ + virtual IOReturn ClearRootHubPortFeature( UInt16 wValue, UInt16 port ) = 0; + +/*! + @function ClearRootHubPortFeature + @abstract UIM function, Impliments GET_BUS_STATE control request, now obsolete. +*/ + virtual IOReturn GetRootHubPortState( UInt8 *state, UInt16 port ) = 0; + +/*! + @function SetHubAddress + @abstract UIM function, set the address of the simulated root hub device, as SET_ADDRESS + @param wValue New address for root hub. +*/ + virtual IOReturn SetHubAddress( UInt16 wValue ) = 0; + + + /*! + @function openPipe + Open a pipe to the specified device endpoint + @param address Address of the device on the USB bus + @param speed of the device: kUSBHighSpeed or kUSBLowSpeed + @param endpoint description of endpoint to connect to + */ + virtual IOReturn OpenPipe( USBDeviceAddress address, + UInt8 speed, + Endpoint * endpoint ); + /*! + @function closePipe + Close a pipe to the specified device endpoint + @param address Address of the device on the USB bus + @param endpoint description of endpoint + */ + virtual IOReturn ClosePipe( USBDeviceAddress address, + Endpoint * endpoint ); + + // Controlling pipe state + /*! + @function abortPipe + Abort pending I/O to/from the specified endpoint, causing them to complete with return code kIOReturnAborted + @param address Address of the device on the USB bus + @param endpoint description of endpoint + */ + virtual IOReturn AbortPipe( + USBDeviceAddress address, + Endpoint * endpoint ); + /*! + @function resetPipe + Abort pending I/O and clear stalled state - this method is a combination of abortPipe and clearPipeStall + @param address Address of the device on the USB bus + @param endpoint description of endpoint + */ + virtual IOReturn ResetPipe( USBDeviceAddress address, + Endpoint * endpoint ); + /*! + @function clearPipeStall + Clear a pipe stall. + @param address Address of the device on the USB bus + @param endpoint description of endpoint + */ + virtual IOReturn ClearPipeStall( USBDeviceAddress address, + Endpoint * endpoint ); + + // Transferring Data + /*! + @function read + Read from an interrupt or bulk endpoint + @param buffer place to put the transferred data + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been filled + */ + virtual IOReturn Read( IOMemoryDescriptor * buffer, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBCompletion * completion ); + /*! + @function write + Write to an interrupt or bulk endpoint + @param buffer place to get the transferred data + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been emptied + */ + virtual IOReturn Write( IOMemoryDescriptor * buffer, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBCompletion * completion ); + + /*! + @function isocIO + Read from or write to an isochronous endpoint + @param buffer place to put the transferred data + @param frameStart USB frame number of the frame to start transfer + @param numFrames Number of frames to transfer + @param frameList Bytes to transfer and result for each frame + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been filled + */ + virtual IOReturn IsocIO( IOMemoryDescriptor * buffer, + UInt64 frameStart, + UInt32 numFrames, + IOUSBIsocFrame * frameList, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBIsocCompletion * completion ); + /*! + @function deviceRequest + Make a control request to the specified endpoint + There are two versions of this method, one uses a simple void * + to point to the data portion of the transfer, the other uses an + IOMemoryDescriptor to point to the data. + @param request parameter block for the control request + @param completion describes action to take when the request has been executed + @param address Address of the device on the USB bus + @param epNum endpoint number + */ + virtual IOReturn DeviceRequest( IOUSBDevRequest * request, + IOUSBCompletion * completion, + USBDeviceAddress address, + UInt8 epNum ); + + virtual IOReturn DeviceRequest( IOUSBDevRequestDesc * request, + IOUSBCompletion * completion, + USBDeviceAddress address, + UInt8 epNum ); + + /* + * Methods used by the hub driver to initialize a device + */ + /*! + @function AcquireDeviceZero + Get the device zero lock - call this before resetting a device, to ensure there's + only one device with address 0 + */ + virtual IOReturn AcquireDeviceZero( void ); + /*! + @function ReleaseDeviceZero + Release the device zero lock - call this to release the device zero lock, + when there is no longer a device at address 0 + */ + virtual void ReleaseDeviceZero( void ); + + // non-virtual methods + void WaitForReleaseDeviceZero( void ); + IOReturn ConfigureDeviceZero( UInt8 maxPacketSize, UInt8 speed ); + IOReturn GetDeviceZeroDescriptor( IOUSBDeviceDescriptor * desc, UInt16 size ); + IOReturn SetDeviceZeroAddress(USBDeviceAddress address); + IOUSBDevice * MakeDevice(USBDeviceAddress *address); + IOUSBHubDevice * MakeHubDevice(USBDeviceAddress *address); + IOReturn CreateDevice( IOUSBDevice * device, + USBDeviceAddress deviceAddress, + UInt8 maxPacketSize, + UInt8 speed, + UInt32 powerAvailable ); + + /*! + @function GetBandwidthAvailable + Returns the available bandwidth (in bytes) per frame or microframe for + isochronous transfers. + @result maximum number of bytes that a new iso pipe could transfer + per frame given current allocations. + */ + virtual UInt32 GetBandwidthAvailable( void ) = 0; + + /*! + @function GetFrameNumber + Returns the full current frame number. + @result The frame number. + */ + virtual UInt64 GetFrameNumber( void ) = 0; + + /*! + @function GetFrameNumber32 + Returns the least significant 32 bits of the frame number. + @result The lsb 32 bits of the frame number. + */ + virtual UInt32 GetFrameNumber32( void ) = 0; + + // Debugger polled mode + virtual void PollInterrupts( IOUSBCompletionAction safeAction = 0 ) = 0; + + virtual IOReturn PolledRead( + short functionNumber, + short endpointNumber, + IOUSBCompletion completion, + IOMemoryDescriptor * CBP, + bool bufferRounding, + UInt32 bufferSize); + + OSMetaClassDeclareReservedUsed(IOUSBController, 0); + virtual void UIMCheckForTimeouts(void); + + OSMetaClassDeclareReservedUsed(IOUSBController, 1); + virtual IOReturn UIMCreateControlTransfer( short functionNumber, + short endpointNumber, + IOUSBCommand* command, + void* CBP, + bool bufferRounding, + UInt32 bufferSize, + short direction); + + OSMetaClassDeclareReservedUsed(IOUSBController, 2); + virtual IOReturn UIMCreateControlTransfer( short functionNumber, + short endpointNumber, + IOUSBCommand* command, + IOMemoryDescriptor* CBP, + bool bufferRounding, + UInt32 bufferSize, + short direction); + + OSMetaClassDeclareReservedUsed(IOUSBController, 3); +/*! + @function UIMCreateBulkTransfer + @abstract UIM function, Do a transfer on a bulk endpoint. + This method supercedes the method which takes multiple parameters. + @param command paramters for transfer. +*/ + virtual IOReturn UIMCreateBulkTransfer(IOUSBCommand* command); + + OSMetaClassDeclareReservedUsed(IOUSBController, 4); +/*! + @function UIMCreateInterruptTransfer + @abstract UIM function, Do a transfer on an interrupt endpoint. + This method supercedes the method which takes multiple parameters. + @param command paramters for transfer. +*/ + virtual IOReturn UIMCreateInterruptTransfer(IOUSBCommand* command); + + /*! + @function deviceRequest + Make a control request to the specified endpoint + There are two versions of this method, one uses a simple void * + to point to the data portion of the transfer, the other uses an + IOMemoryDescriptor to point to the data. + @param request parameter block for the control request + @param completion describes action to take when the request has been executed + @param address Address of the device on the USB bus + @param epNum endpoint number + */ + OSMetaClassDeclareReservedUsed(IOUSBController, 5); + virtual IOReturn DeviceRequest( IOUSBDevRequest * request, + IOUSBCompletion * completion, + USBDeviceAddress address, + UInt8 epNum, + UInt32 noDataTimeout, + UInt32 completionTimeout ); + + OSMetaClassDeclareReservedUsed(IOUSBController, 6); + virtual IOReturn DeviceRequest( IOUSBDevRequestDesc * request, + IOUSBCompletion * completion, + USBDeviceAddress address, + UInt8 epNum, + UInt32 noDataTimeout, + UInt32 completionTimeout ); + + + + OSMetaClassDeclareReservedUsed(IOUSBController, 7); + /*! + @function read + Read from an interrupt or bulk endpoint + @param buffer place to put the transferred data + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been filled + */ + virtual IOReturn Read( IOMemoryDescriptor * buffer, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBCompletion * completion, + UInt32 noDataTimeout, + UInt32 completionTimeout ); + + OSMetaClassDeclareReservedUsed(IOUSBController, 8); + /*! + @function write + Write to an interrupt or bulk endpoint + @param buffer place to get the transferred data + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been emptied + */ + virtual IOReturn Write( IOMemoryDescriptor * buffer, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBCompletion * completion, + UInt32 noDataTimeout, + UInt32 completionTimeout ); + + // this should really not be using a padding slot, since free is in our superclas, but we shipped this way so now we need to leave it. + OSMetaClassDeclareReservedUsed(IOUSBController, 9); + virtual void free(); + +protected: + +/*! + @function UIMRootHubStatusChange(bool) + @abstract UIM function UIMRootHubStatusChange(bool) - This method was internal to the UIM (never called by the superclass) until + IOUSBControllerV3. For UIMs which are a subclass of IOUSBController or IOUSBControllerV2, it can + still be used internally only. For subclasses of IOUSBControllerV3, however, it has become obsolete + (it still needs to be implemented since it is pure virtual) +*/ + OSMetaClassDeclareReservedUsed(IOUSBController, 10); + virtual void UIMRootHubStatusChange( bool abort ) = 0; + +public: + + OSMetaClassDeclareReservedUsed(IOUSBController, 11); + virtual IOReturn CreateRootHubDevice( IOService * provider, IOUSBRootHubDevice ** rootHubDevice); + + OSMetaClassDeclareReservedUsed(IOUSBController, 12); + /*! + @function Read + Read from an interrupt or bulk endpoint + @param buffer place to put the transferred data + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been filled + @param noDataTimeout number of milliseconds of no data movement before the request is aborted + @param completionTimeout number of milliseonds after the command is on the bus in which it must complete + @param reqCount number of bytes requested for the transfer (must not be greater than the length of the buffer) + */ + virtual IOReturn Read( IOMemoryDescriptor * buffer, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBCompletion * completion, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOByteCount reqCount ); + + OSMetaClassDeclareReservedUsed(IOUSBController, 13); + /*! + @function Write + Write to an interrupt or bulk endpoint + @param buffer place to get the transferred data + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been emptied + @param noDataTimeout number of milliseconds of no data movement before the request is aborted + @param completionTimeout number of milliseonds after the command is on the bus in which it must complete + @param reqCount number of bytes requested for the transfer (must not be greater than the length of the buffer) + */ + virtual IOReturn Write( IOMemoryDescriptor * buffer, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBCompletion * completion, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOByteCount reqCount ); + + OSMetaClassDeclareReservedUsed(IOUSBController, 14); + + virtual IOReturn GetRootHubStringDescriptor(UInt8 index, OSData *desc) = 0; + + OSMetaClassDeclareReservedUsed(IOUSBController, 15); + /*! + @function IsocIO + Read from or write to an isochronous endpoint + @param buffer place to put the transferred data + @param frameStart USB frame number of the frame to start transfer + @param numFrames Number of frames to transfer + @param frameList Bytes to transfer and result for each frame + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been filled + @param updateFrequency describes how often to update the framelist once the transfer has completed (in ms) + */ + virtual IOReturn IsocIO( IOMemoryDescriptor * buffer, + UInt64 frameStart, + UInt32 numFrames, + IOUSBLowLatencyIsocFrame * frameList, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBLowLatencyIsocCompletion * completion, + UInt32 updateFrequency ); + + OSMetaClassDeclareReservedUsed(IOUSBController, 16); + + /*! + @function UIMCreateIsochTransfer + @abstract UIM function, Do a transfer on an Isocchronous endpoint. + @param functionNumber The USB device ID of the device to perform the transaction with + @param endpointNumber The endpoint number for the transaction + @param completion Action to perform when I/O completes + @param direction Specifies direction for transfer. kUSBIn or KUSBOut. + @param frameStart The frame number in which to start the transactions + @param pBuffer describes memory buffer. + @param frameCount number of frames to do transactions in + @param pFrames Describes transactions in individual frames, gives sizes and reults for transactions. + @param updateFrequency Describes how often we update the frameList parameters (in ms) + */ + virtual IOReturn UIMCreateIsochTransfer( + short functionAddress, + short endpointNumber, + IOUSBIsocCompletion completion, + UInt8 direction, + UInt64 frameStart, + IOMemoryDescriptor * pBuffer, + UInt32 frameCount, + IOUSBLowLatencyIsocFrame *pFrames, + UInt32 updateFrequency); + + + OSMetaClassDeclareReservedUsed(IOUSBController, 17); + virtual IOReturn CheckForDisjointDescriptor(IOUSBCommand *command, UInt16 maxPacketSize); + + /*! + @function UIMCreateIsochTransfer + @abstract UIM function, Do a transfer on an Isocchronous endpoint. + @param command an IOUSBIsocCommand object with all the necessary information + */ + OSMetaClassDeclareReservedUsed(IOUSBController, 18); + virtual IOReturn UIMCreateIsochTransfer(IOUSBIsocCommand *command); + + // do not use this slot without first checking bug rdar://6022420 + OSMetaClassDeclareReservedUnused(IOUSBController, 19); + +protected: + void IncreaseIsocCommandPool(); + void IncreaseCommandPool(); + void ParsePCILocation(const char *str, int *deviceNum, int *functionNum); + int ValueOfHexDigit(char c); +}; + +#endif /* ! _IOKIT_IOUSBCONTROLLER_H */ + diff --git a/i386/include/IOKit/usb/IOUSBControllerListElement.h b/i386/include/IOKit/usb/IOUSBControllerListElement.h new file mode 100644 index 0000000..7351177 --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBControllerListElement.h @@ -0,0 +1,126 @@ +/* + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1998-2007 Apple Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOUSBCONTROLLERLISTELEMENT_H +#define _IOUSBCONTROLLERLISTELEMENT_H + + +#include <libkern/c++/OSObject.h> + +#include <IOKit/IOTypes.h> + +#include <IOKit/usb/USB.h> + + +/*! + @class IOUSBControllerListElement + @abstract Used by the IOUSBController to manage the USB controller lists that are common between EHCI and UHCI. + */ +class IOUSBControllerListElement : public OSObject +{ + OSDeclareDefaultStructors(IOUSBControllerListElement) + +private: + +public: + + virtual void SetPhysicalLink(IOPhysicalAddress next) = 0; + virtual IOPhysicalAddress GetPhysicalLink(void) = 0; + virtual IOPhysicalAddress GetPhysicalAddrWithType(void) = 0; + virtual void print(int level); + + IOPhysicalAddress _sharedPhysical; // phys address of the memory shared with the controller + void * _sharedLogical; // logical address of the above + IOUSBControllerListElement *_logicalNext; // the next element in the list + +}; + + +class IOUSBControllerV2; // needed for a parameter +class IOUSBControllerIsochEndpoint; + +class IOUSBControllerIsochListElement : public IOUSBControllerListElement +{ + OSDeclareDefaultStructors(IOUSBControllerIsochListElement) + +private: + +public: + + virtual void SetPhysicalLink(IOPhysicalAddress next) = 0; + virtual IOPhysicalAddress GetPhysicalLink(void) = 0; + virtual IOPhysicalAddress GetPhysicalAddrWithType(void) = 0; + virtual void print(int level); + + IOUSBControllerIsochEndpoint *_pEndpoint; + IOUSBIsocFrame *_pFrames; + IOUSBIsocCompletion _completion; + Boolean _lowLatency; + bool _requestFromRosettaClient; // True if the request originated from a Rosetta client in user space + UInt8 _framesInTD; // used for HS Isoch only + UInt64 _frameNumber; // frame number for scheduling purposes + UInt32 _frameIndex; // index into the myFrames array + IOUSBControllerIsochListElement *_doneQueueLink; // linkage used by done queue processing + + // pure virtual methods which must be implemented by descendants + virtual IOReturn UpdateFrameList(AbsoluteTime timeStamp) = 0; + virtual IOReturn Deallocate(IOUSBControllerV2 *uim) = 0; +}; + +class IOUSBControllerIsochEndpoint : public OSObject +{ + OSDeclareDefaultStructors(IOUSBControllerIsochEndpoint) + +public: + + virtual bool init(); + + IOUSBControllerIsochEndpoint *nextEP; + IOUSBControllerIsochListElement *toDoList; // ITD or SITD + IOUSBControllerIsochListElement *toDoEnd; // ITD or SITD + IOUSBControllerIsochListElement *doneQueue; // ITD or SITD + IOUSBControllerIsochListElement *doneEnd; // ITD or SITD + IOUSBControllerIsochListElement *deferredQueue; // ITD or SITD + IOUSBControllerIsochListElement *deferredEnd; // ITD or SITD + UInt64 firstAvailableFrame; // next frame available for a transfer on this EP + UInt32 maxPacketSize; + UInt32 activeTDs; // + when added to todo list, - when taken from done queue + UInt32 onToDoList; // + when added to todo list, - when taken from done queue + UInt32 onDoneQueue; // + when added to todo list, - when taken from done queue + volatile SInt32 scheduledTDs; // + when linked onto periodic list, - when unlinked + UInt32 deferredTDs; + UInt32 onProducerQ; + UInt32 onReversedList; + UInt16 inSlot; // where Isoc TDs are being put in the periodic list + short functionAddress; + short endpointNumber; + IOReturn accumulatedStatus; + UInt32 interval; // this is the decoded interval value for HS endpoints and is 1 for FS endpoints + UInt8 direction; + bool aborting; +}; + + +#endif + diff --git a/i386/include/IOKit/usb/IOUSBControllerV2.h b/i386/include/IOKit/usb/IOUSBControllerV2.h new file mode 100644 index 0000000..4d2c306 --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBControllerV2.h @@ -0,0 +1,374 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.2 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBCONTROLLERV2_H +#define _IOKIT_IOUSBCONTROLLERV2_H + +#include <IOKit/IODMACommand.h> + +#include <IOKit/usb/IOUSBControllerListElement.h> +#include <IOKit/usb/IOUSBController.h> + +enum +{ + kUSBHSHubCommandAddHub = 1, + kUSBHSHubCommandRemoveHub = 2, + + kUSBHSHubFlagsMultiTT = 1 +}; + + +/*! + @class IOUSBControllerV2 + @abstract subclass of the IOUSBController to provide support for high speed + devices and split transactions. + @discussion The IOUSBController class provide sufficient functionality to + work with full (12Mb/s) and low (1.5Mb/s) devices. IOUSBControllerV2 + introduces the support for high (480Mb/s) speed devices from the + USB 2.0 spec. In particular IOUSBControllerV2 indicates the high + speed hub a full or low speed device is attached to so that split + transactions can be directed to the hub at high speed to be forwarded + to the full or low speed device by the hub. + It also gives support for bulk endoints of greater than 256 bytes. +*/ + +class IOUSBControllerV2 : public IOUSBController +{ + OSDeclareAbstractStructors(IOUSBControllerV2) + +protected: + + // These for keeping track of high speed ancestor to allow controller to do splits. + // + UInt8 _highSpeedHub[128]; + UInt8 _highSpeedPort[128]; + + struct V2ExpansionData { + UInt8 _multiTT[128]; + IOUSBCommand *ClearTTCommand; + IOUSBControllerIsochEndpoint *_isochEPList; // linked list of active Isoch "endpoints" + IOUSBControllerIsochEndpoint *_freeIsochEPList; // linked list of freed Isoch EP data structures + thread_call_t _returnIsochDoneQueueThread; + }; + V2ExpansionData *_v2ExpansionData; + + // Super's expansion data + #define _freeUSBCommandPool _expansionData->freeUSBCommandPool + #define _freeUSBIsocCommandPool _expansionData->freeUSBIsocCommandPool + #define _watchdogUSBTimer _expansionData->watchdogUSBTimer + #define _controllerTerminating _expansionData->_terminating + #define _watchdogTimerActive _expansionData->_watchdogTimerActive + #define _busNumber _expansionData->_busNumber + #define _currentSizeOfCommandPool _expansionData->_currentSizeOfCommandPool + #define _currentSizeOfIsocCommandPool _expansionData->_currentSizeOfIsocCommandPool + #define _controllerSpeed _expansionData->_controllerSpeed + #define _activeIsochTransfers _expansionData->_activeIsochTransfers + + // this class's expansion data + #define _isochEPList _v2ExpansionData->_isochEPList + #define _freeIsochEPList _v2ExpansionData->_freeIsochEPList + #define _returnIsochDoneQueueThread _v2ExpansionData->_returnIsochDoneQueueThread + + virtual bool init( OSDictionary * propTable ); + virtual bool start( IOService * provider ); + virtual void free(); + + static IOReturn DoCreateEP(OSObject *owner, + void *arg0, void *arg1, + void *arg2, void *arg3); + + static void clearTTHandler( + OSObject * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining ); + +public: + + /*! + @function openPipe + Open a pipe to the specified device endpoint + @param address Address of the device on the USB bus + @param speed of the device: kUSBDeviceSpeedLow, kUSBDeviceSpeedFull or kUSBDeviceSpeedHigh + @param endpoint description of endpoint to connect to + */ + virtual IOReturn OpenPipe( USBDeviceAddress address, + UInt8 speed, + Endpoint * endpoint ); + + /*! + @function CreateDevice + @abstract Create a new device as IOUSBController, making a note of the + high speed hub device ID and port number the full/low speed + device is attached to. + @param newDevice new device object to work with + @param deviceAddress USB device ID + @param maxPacketSize max packet size of endpoint zero + @param speed speed of the device kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh + @param powerAvailable power available to the device + @param hub USB ID of hub the device is immediatly attached to. (Not necessarily high speed) + @param port port number of port the device is attached to. +*/ + virtual IOReturn CreateDevice( IOUSBDevice *newDevice, + USBDeviceAddress deviceAddress, + UInt8 maxPacketSize, + UInt8 speed, + UInt32 powerAvailable, + USBDeviceAddress hub, + int port); + +/*! + @function ConfigureDeviceZero + @abstract configure pipe zero of device zero, as IOUSBController, but also keeping + note of high speed hub device is attached to. + @param maxPacketSize max packet size for the pipe + @param speed speed of the device kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh + @param hub USB ID of hub the device is immediatly attached to. (Not necessarily high speed) + @param port port number of port the device is attached to. +*/ + virtual IOReturn ConfigureDeviceZero(UInt8 maxPacketSize, UInt8 speed, USBDeviceAddress hub, int port); + +/*! + @function UIMCreateControlEndpoint + @abstract Create an endpoint in the controller to do control transactions. + @param functionNumber USB device ID of device + @param endpointNumber endpoint address of the endpoint in the device + @param maxPacketSize maximum packet size of this endpoint + @param speed speed of the device kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh + @param highSpeedHub If speed is not kUSBDeviceSpeedHigh, the address of the high speed hub to + address split transactions to. + @param highSpeedPort If speed is not kUSBDeviceSpeedHigh, the hub port to address split transactions to +*/ + virtual IOReturn UIMCreateControlEndpoint( + UInt8 functionNumber, + UInt8 endpointNumber, + UInt16 maxPacketSize, + UInt8 speed, + USBDeviceAddress highSpeedHub, + int highSpeedPort) = 0; + +/*! + @function UIMCreateBulkEndpoint + @abstract Create an endpoint in the controller to do bulk transactions. + @param functionNumber USB device ID of device + @param endpointNumber endpoint address of the endpoint in the device + @param direction Direction of data flow. kUSBIn or kUSBOut + @param maxPacketSize maximum packet size of this endpoint + @param speed speed of the device kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh + @param highSpeedHub If speed is not kUSBDeviceSpeedHigh, the address of the high speed hub to + address split transactions to. + @param highSpeedPort If speed is not kUSBDeviceSpeedHigh, the hub port to address split transactions to +*/ + virtual IOReturn UIMCreateBulkEndpoint( + UInt8 functionNumber, + UInt8 endpointNumber, + UInt8 direction, + UInt8 speed, + UInt16 maxPacketSize, + USBDeviceAddress highSpeedHub, + int highSpeedPort) = 0; + +/*! + @function UIMCreateInterruptEndpoint + @abstract Create an endpoint in the controller to do interrupt transactions. + @param functionAddress USB device ID of device + @param endpointNumber endpoint address of the endpoint in the device + @param direction Direction of data flow. kUSBIn or kUSBOut + @param speed speed of the device kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh + @param maxPacketSize maximum packet size of this endpoint + @param pollingRate The maximum polling interval from the endpoint descriptor. + @param highSpeedHub If speed is not kUSBDeviceSpeedHigh, the address of the high speed hub to + address split transactions to. + @param highSpeedPort If speed is not kUSBDeviceSpeedHigh, the hub port to address split transactions to +*/ + virtual IOReturn UIMCreateInterruptEndpoint( + short functionAddress, + short endpointNumber, + UInt8 direction, + short speed, + UInt16 maxPacketSize, + short pollingRate, + USBDeviceAddress highSpeedHub, + int highSpeedPort) = 0; + +/*! + @function UIMCreateIsochEndpoint + @abstract Create an endpoint in the controller to do Isochronous transactions. + @param functionAddress USB device ID of device + @param endpointNumber endpoint address of the endpoint in the device + @param maxPacketSize maximum packet size of this endpoint + @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. + @param highSpeedHub If non zero, this is a full speed device, the address of the high speed hub to + address split transactions to. + @param highSpeedPort If highSpeedHub is non zero, the hub port to address split transactions to +*/ + virtual IOReturn UIMCreateIsochEndpoint( + short functionAddress, + short endpointNumber, + UInt32 maxPacketSize, + UInt8 direction, + USBDeviceAddress highSpeedHub, + int highSpeedPort) = 0; + + + static void ReturnIsochDoneQueueEntry(OSObject *target, thread_call_param_t endpointPtr); + + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 0); + virtual IOReturn AddHSHub(USBDeviceAddress highSpeedHub, UInt32 flags); + + static IOReturn DOHSHubMaintenance(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 1); + virtual IOReturn UIMHubMaintenance(USBDeviceAddress highSpeedHub, UInt32 highSpeedPort, UInt32 command, UInt32 flags); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 2); + virtual IOReturn RemoveHSHub(USBDeviceAddress highSpeedHub); + + static IOReturn DOSetTestMode(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 3); + virtual IOReturn SetTestMode(UInt32 mode, UInt32 port); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 4); + virtual IOReturn UIMSetTestMode(UInt32 mode, UInt32 port); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 5); + virtual UInt64 GetMicroFrameNumber( void ); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 6); + virtual void ClearTT(USBDeviceAddress addr, UInt8 endpt, Boolean IN); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 7); + /*! + @function Read + Read from an interrupt or bulk endpoint + @param buffer place to put the transferred data + @param address Address of the device on the USB bus + @param endpoint description of endpoint + @param completion describes action to take when buffer has been filled + @param noDataTimeout number of milliseconds of no data movement before the request is aborted + @param completionTimeout number of milliseonds after the command is on the bus in which it must complete + @param reqCount number of bytes requested for the transfer (must not be greater than the length of the buffer) + */ + virtual IOReturn ReadV2( IOMemoryDescriptor * buffer, + USBDeviceAddress address, + Endpoint * endpoint, + IOUSBCompletionWithTimeStamp * completion, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOByteCount reqCount ); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 8); +/*! + @function UIMCreateIsochEndpoint + @abstract Create an endpoint in the controller to do Isochronous transactions. + @param functionAddress USB device ID of device + @param endpointNumber endpoint address of the endpoint in the device + @param maxPacketSize maximum packet size of this endpoint + @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. + @param highSpeedHub If non zero, this is a full speed device, the address of the high speed hub to + address split transactions to. + @param highSpeedPort If highSpeedHub is non zero, the hub port to address split transactions to + @param interval The encoded interval value from the endpoint descriptor +*/ + virtual IOReturn UIMCreateIsochEndpoint( short functionAddress, + short endpointNumber, + UInt32 maxPacketSize, + UInt8 direction, + USBDeviceAddress highSpeedHub, + int highSpeedPort, + UInt8 interval); + + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 9); + virtual IOUSBControllerIsochEndpoint* AllocateIsochEP(void); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 10); + virtual IOReturn DeallocateIsochEP(IOUSBControllerIsochEndpoint *pEP); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 11); + virtual IOUSBControllerIsochEndpoint* FindIsochronousEndpoint(short functionNumber, short endpointNumber, short direction, IOUSBControllerIsochEndpoint* *pEDBack); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 12); + virtual IOUSBControllerIsochEndpoint* CreateIsochronousEndpoint(short functionNumber, short endpointNumber, short direction); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 13); + virtual void PutTDonToDoList(IOUSBControllerIsochEndpoint* pED, IOUSBControllerIsochListElement *pTD); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 14); + virtual IOUSBControllerIsochListElement *GetTDfromToDoList(IOUSBControllerIsochEndpoint* pED); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 15); + virtual void PutTDonDeferredQueue(IOUSBControllerIsochEndpoint* pED, IOUSBControllerIsochListElement *pTD); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 16); + virtual IOUSBControllerIsochListElement *GetTDfromDeferredQueue(IOUSBControllerIsochEndpoint* pED); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 17); + virtual void PutTDonDoneQueue(IOUSBControllerIsochEndpoint* pED, IOUSBControllerIsochListElement *pTD, bool checkDeferred); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 18); + virtual IOUSBControllerIsochListElement *GetTDfromDoneQueue(IOUSBControllerIsochEndpoint* pED); + + // 7185026 - this is to make this call from behind the gate + static IOReturn GatedGetTDfromDoneQueue(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 19); + virtual void ReturnIsochDoneQueue(IOUSBControllerIsochEndpoint*); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 20); + virtual IODMACommand *GetNewDMACommand(); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 21); + /*! + @function GetLowLatencyOptionsAndPhysicalMask + @abstract Low Latency transfers require that the client have access to the memory after the Isochronous I/O request has already been scheduled. This might be used, for example to fill in outgoing data "just in time." Some controllers, however, may have requirements which need to be followed in order to make sure that the memory buffer isn't moved after the call is made. This call will return an IOOptionBits and mach_vm_address_t which can be used in a call to IOBufferMemoryDescriptor::inTaskWithPhysicalMask which will help meet these requirements. + @param optionBits Pointer to an an IOOptionBits. The only bit which may be returned is kIOMemoryPhysicallyContiguous. Other bits, e.g. direction bits, must be ORd in by the client as needed. This call replaces the old property based method of obtaining this information. + @param physicalMask Pointer to a mach_vm_address_t which should be used in the call to IOBufferMemoryDescriptor::inTaskWithPhysicalMask and will guarantee that when the memory is wired down it will be accessible by both the client and the USB controller at the same time. + @result returns kIOReturnSuccess if the method is implemented by the controller, otherwise kIOReturnUnsupported + */ + virtual IOReturn GetLowLatencyOptionsAndPhysicalMask(IOOptionBits *optionBits, mach_vm_address_t *physicalMask); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 22); + /*! + @function GetFrameNumberWithTime + @abstract Real Time A/V applications send and receive Iscohronous data scheduled on certain USB frame numbers. The clock for these frame numbers is independent of the system clock, and drivers need to synchronize these two clocks. This routine will return a system time which corresponds to the beginning of a USB frame number. It is not necessarily the currrent frame, but it will be a frame in the recent past (within the past minute). The jitter between the start of the USB frame and the system time will be as low as possible, but due to hardware interrupt latencies could be as high as 200 microseconds. + @param frameNumber A pointer to a UInt64 in which to hold the USB frame number corresponding to the given system time. + @param theTime A pointer to an AbsoluteTime corresponding to the system time at the beginning of the given USB frame number. + @result returns kIOReturnSuccess if the method is implemented by the controller, otherwise kIOReturnUnsupported + */ + virtual IOReturn GetFrameNumberWithTime(UInt64* frameNumber, AbsoluteTime *theTime); + + + OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 23); + OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 24); + OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 25); + OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 26); + OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 27); + OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 28); + OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 29); + +}; + + +#endif /* ! _IOKIT_IOUSBCONTROLLERV2_H */ diff --git a/i386/include/IOKit/usb/IOUSBControllerV3.h b/i386/include/IOKit/usb/IOUSBControllerV3.h new file mode 100644 index 0000000..22da915 --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBControllerV3.h @@ -0,0 +1,233 @@ +/* +* Copyright (c) 2007-2008 Apple Inc. All rights reserved. +* +* @APPLE_LICENSE_HEADER_START@ +* +* The contents of this file constitute Original Code as defined in and +* are subject to the Apple Public Source License Version 1.2 (the +* "License"). You may not use this file except in compliance with the +* License. Please obtain a copy of the License at +* http://www.apple.com/publicsource and read it before using this file. +* +* This Original Code and all software distributed under the License are +* distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER +* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, +* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. +* Please see the License for the specific language governing rights and +* limitations under the License. +* +* @APPLE_LICENSE_HEADER_END@ +*/ + +#ifndef _IOKIT_IOUSBCONTROLLERV3_H +#define _IOKIT_IOUSBCONTROLLERV3_H + +#include <IOKit/pci/IOPCIDevice.h> + +#include <IOKit/usb/IOUSBControllerV2.h> +#include <IOKit/usb/IOUSBHubDevice.h> + +// Constants that define the different power states in the setPowerState call +enum +{ + kUSBPowerStateOff = 0, // controller is reset, nothing is attached + kUSBPowerStateRestart = 1, // same as OFF + kUSBPowerStateSleep = 2, // controller is suspended, preparing to lose main power + kUSBPowerStateLowPower = 3, // controller is suspended, power remains on + kUSBPowerStateOn = 4, // up and running + kUSBNumberBusPowerStates = 5 +}; + +#define kUSBPowerStateStable -1 + +enum +{ + kUSBBusStateReset = 0, // bus is in RESET + kUSBBusStateSuspended = 1, // bus is in SUSPEND mode + kUSBBusStateRunning = 2 // bus is operational +}; + + +// Root Hub things +typedef struct IOUSBRootHubInterruptTransaction +{ + IOMemoryDescriptor * buf; + UInt32 bufLen; + IOUSBCompletion completion; +} IOUSBRootHubInterruptTransaction; + +enum +{ + kIOUSBMaxRootHubTransactions = 2 +}; + + + +/*! + @class IOUSBControllerV3 + @abstract subclass of the IOUSBControllerV2 to provide support for new USB Power Management techniques. + @discussion With Leopard, we are providing more information to USB Device Drivers in the IOPower + tree to allow for more efficient Power Management. This controller class encapulates many of the changes + needed for that, without disturbing third party subclasses of IOUSBController or IOUSBControllerV2 + */ + +class IOUSBControllerV3 : public IOUSBControllerV2 +{ + OSDeclareAbstractStructors(IOUSBControllerV3) + + protected: + // static variable shared by all instances + static uint32_t * _gHibernateState; + + + UInt8 _myBusState; // kUSBBusStateReset, kUSBBusStateSuspended, kUSBBusStateRunning + bool _wakingFromHibernation; // True while the Hibernation Wake thread is active + bool _needToAckPowerDown; // True while we are changing power state due to shutdown/restart + bool _onCardBus; // OBSOLETE + bool _controllerAvailable; // true if we can talk to the controller + SInt32 _powerStateChangingTo; // a power state that we are in the process of changing to, or -1 if we are stable + bool _poweringDown; // true is the controller is powering down because of a systemWillPowerDown message + bool _restarting; // true is the controller is restarting because of a systemWillPowerDown message + unsigned long _myPowerState; // my current state (since getPowerState doesn't always change in time) + IOUSBControllerV3 *_ehciController; // set if I am a companion controller + unsigned long _numPowerStates; // how many power states do I support (defaults to kUSBNumDefaultPowerStates) + IOPMPowerState *_myPowerStates; // my power state array (allocated on the fly) + IOPCIDevice *_device; // my PCI device + + // root hub support + IOTimerEventSource *_rootHubTimer; // timer which fires at the rate of the root hub interrupt endpoint + UInt8 _rootHubPollingRate; // Obsolete -- we need to have it be a uint32_t + UInt8 _rootHubNumPorts; // number of root hub ports - should be 15 or fewer! + UInt16 _rootHubStatusChangedBitmap; // support up to 15 ports for status changes + bool _rootHubTimerActive; // UNUSED + IOUSBRootHubInterruptTransaction _outstandingRHTrans[4]; // Transactions for the Root Hub. We need 2, one for the current transaction and one for the next. This is declared as 4 for binary compatibility + + struct V3ExpansionData { + uint32_t _rootHubPollingRate32; + bool _rootHubTransactionWasAborted; + }; + V3ExpansionData *_v3ExpansionData; + + // IOKit methods + virtual bool init( OSDictionary * propTable ); + virtual bool start( IOService * provider ); + virtual void stop( IOService * provider ); + virtual unsigned long maxCapabilityForDomainState ( IOPMPowerFlags domainState ); + virtual unsigned long initialPowerStateForDomainState ( IOPMPowerFlags domainState ); + virtual IOReturn powerStateWillChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); + virtual IOReturn setPowerState( unsigned long powerStateOrdinal, IOService* whatDevice ); + virtual IOReturn powerStateDidChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); + virtual void powerChangeDone ( unsigned long fromState); + virtual void systemWillShutdown( IOOptionBits specifier ); + virtual void free(void); + + // IOUSBController methods + // we override these to deal with methods attempting to go through the workloop while we are in sleep + virtual IOReturn AcquireDeviceZero( void ); + virtual void ReleaseDeviceZero( void ); + virtual IOReturn DeviceRequest(IOUSBDevRequest *request, IOUSBCompletion *completion, USBDeviceAddress address, UInt8 epNum, UInt32 noDataTimeout, UInt32 completionTimeout); + virtual IOReturn DeviceRequest(IOUSBDevRequestDesc *request, IOUSBCompletion *completion, USBDeviceAddress address, UInt8 epNum, UInt32 noDataTimeout, UInt32 completionTimeout); + virtual IOReturn ClosePipe(USBDeviceAddress address, Endpoint *endpoint); + virtual IOReturn AbortPipe(USBDeviceAddress address, Endpoint *endpoint); + virtual IOReturn ResetPipe(USBDeviceAddress address, Endpoint *endpoint); + virtual IOReturn ClearPipeStall(USBDeviceAddress address, Endpoint *endpoint); + virtual IOReturn Read(IOMemoryDescriptor *buffer, USBDeviceAddress address, Endpoint *endpoint, IOUSBCompletion *completion, UInt32 noDataTimeout, UInt32 completionTimeout, IOByteCount reqCount); + virtual IOReturn Write(IOMemoryDescriptor *buffer, USBDeviceAddress address, Endpoint *endpoint, IOUSBCompletion *completion, UInt32 noDataTimeout, UInt32 completionTimeout, IOByteCount reqCount); + virtual IOReturn IsocIO(IOMemoryDescriptor *buffer, UInt64 frameStart, UInt32 numFrames, IOUSBIsocFrame *frameList, USBDeviceAddress address, Endpoint *endpoint, IOUSBIsocCompletion *completion ); + virtual IOReturn IsocIO(IOMemoryDescriptor *buffer, UInt64 frameStart, UInt32 numFrames, IOUSBLowLatencyIsocFrame *frameList, USBDeviceAddress address, Endpoint *endpoint, IOUSBLowLatencyIsocCompletion *completion, UInt32 updateFrequency ); + + // IOUSBControllerV2 methods + // we override these to deal with methods attempting to go through the workloop while we are in sleep + virtual IOReturn OpenPipe(USBDeviceAddress address, UInt8 speed, Endpoint *endpoint); + virtual IOReturn AddHSHub(USBDeviceAddress highSpeedHub, UInt32 flags); + virtual IOReturn RemoveHSHub(USBDeviceAddress highSpeedHub); + virtual IOReturn SetTestMode(UInt32 mode, UInt32 port); + virtual IOReturn ReadV2(IOMemoryDescriptor *buffer, USBDeviceAddress address, Endpoint *endpoint, IOUSBCompletionWithTimeStamp *completion, UInt32 noDataTimeout, UInt32 completionTimeout, IOByteCount reqCount); + + // IOUSBControllerV3 methods + + // these are called through the workloop + static IOReturn DoEnableAddressEndpoints(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3 ); + static IOReturn DoEnableAllEndpoints(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3 ); + static IOReturn GatedPowerChange(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3 ); + + // also on the workloop + static void RootHubTimerFired(OSObject *owner, IOTimerEventSource *sender); + + // subclassable methods + virtual IOReturn CheckForEHCIController(IOService *provider); + virtual IOReturn AllocatePowerStateArray(void); + virtual IOReturn InitForPM(void); + virtual IOReturn CheckPowerModeBeforeGatedCall(char *fromStr); + virtual IOReturn EnableAllEndpoints(bool enable); + virtual IOReturn EnableBusMastering(bool enable); + virtual IOReturn EnsureUsability(void); + virtual IOReturn CheckForRootHubChanges(void); + virtual IOReturn RootHubQueueInterruptRead(IOMemoryDescriptor *buf, UInt32 bufLen, IOUSBCompletion completion); + virtual IOReturn RootHubAbortInterruptRead(void); + virtual IOReturn RootHubStartTimer(UInt8 pollingRate); // Obsolete see RootHubStartTimer32 + virtual IOReturn RootHubStopTimer(void); + + // these methods have a default implementation using some of the virtual methods below + virtual void ControllerOff(void); + virtual void ControllerRestart(void); + virtual void ControllerSleep(void); + virtual void ControllerDoze(void); + virtual void ControllerOn(void); + + // these methods are pure virtual, and need to be implemented in the subclass driver + virtual IOReturn ResetControllerState(void) = 0; + virtual IOReturn RestartControllerFromReset(void) = 0; + virtual IOReturn SaveControllerStateForSleep(void) = 0; + virtual IOReturn RestoreControllerStateFromSleep(void) = 0; + virtual IOReturn DozeController(void) = 0; + virtual IOReturn WakeControllerFromDoze(void) = 0; + virtual IOReturn UIMEnableAddressEndpoints(USBDeviceAddress address, bool enable) = 0; + virtual IOReturn UIMEnableAllEndpoints(bool enable) = 0; + virtual IOReturn EnableInterruptsFromController(bool enable) = 0; + + public: + + // public methods + virtual IOReturn EnableAddressEndpoints(USBDeviceAddress address, bool enable); + virtual bool IsControllerAvailable(void); + virtual IOReturn HandlePowerChange(unsigned long powerStateOrdinal); + virtual UInt32 AllocateExtraRootHubPortPower(UInt32 extraPowerRequested); + virtual void ReturnExtraRootHubPortPower(UInt32 extraPowerReturned); + + OSMetaClassDeclareReservedUsed(IOUSBControllerV3, 0); + virtual IOReturn RootHubStartTimer32(uint32_t pollingRate); + + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 1); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 2); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 3); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 4); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 5); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 6); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 7); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 8); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 9); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 10); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 11); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 12); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 13); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 14); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 15); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 16); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 17); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 18); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 19); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 20); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 21); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 22); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 23); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 24); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 25); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 26); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 27); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 28); + OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 29); +}; + +#endif // _IOKIT_IOUSBCONTROLLERV3_H \ No newline at end of file diff --git a/i386/include/IOKit/usb/IOUSBDevice.h b/i386/include/IOKit/usb/IOUSBDevice.h new file mode 100644 index 0000000..58d73a0 --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBDevice.h @@ -0,0 +1,639 @@ +/* + * Copyright (c) 1998-2007 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.2 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __OPEN_SOURCE__ +/* + * + * $Log: IOUSBDevice.h,v $ + * Revision 1.65 2009/10/18 20:20:37 nano + * Bring in fixes in 390.4.0 QL: 7310698 7301024 7307079 and 7310698 + * + * Revision 1.64.32.4 2009/10/15 21:17:43 nano + * If OverrideAtLocationID does not see a override property, return true + * + * Revision 1.64.32.3.2.1 2009/10/15 21:36:27 nano + * If OverrideAtLocationID does not see a override property, return true + * + * Revision 1.64.32.3 2009/10/14 19:16:15 nano + * Minor name changes + * + * Revision 1.64.32.2 2009/10/14 19:05:21 nano + * 7284477 7293893 Simplify scheme to decide whether we want to override a property for a hub at a particular ID for a particular MacModel. Added a IOUSBDevice API that tells us if we are in the right model and locationID to override a property + * + * Revision 1.64.32.1 2009/10/08 19:55:56 nano + * rdar://7284477 Allow us to overide the config descriptor of a 2514 hub on a K23F + * + * Revision 1.64 2009/09/08 12:28:45 nano + * <rdar://problem/7195788> IOUSBDevice headerdoc comment problem - GetNumConfigs name is wrong, should be GetNumConfigurations + * + * Revision 1.63 2009/05/07 19:43:09 nano + * Move our SnowLeopard branch to TOT + * + * Revision 1.57.84.6 2009/03/13 22:45:11 nano + * Bring in branches to fix 6676089 6675858 6567987 6490273 + * + * Revision 1.57.84.5.4.1 2009/03/11 20:01:56 nano + * rdar://6567987 Do not let a Reset or a ReEnumerate through while the other is executing. + * + * Revision 1.57.84.5 2009/02/26 13:44:32 nano + * Bring in rdar://6536090&6586312 to SL branch + * + * Revision 1.57.84.4.10.1 2009/02/25 00:51:06 rhoads + * change the mechanism of getConfigLock so as to prevent a deadlock + * + * Revision 1.57.84.4 2009/02/13 15:57:33 rhoads + * roll in rdars: 6213394, 6489431, 6513000, 6515115, 6535200, 6567783 + * + * Revision 1.57.84.3.48.3 2009/02/11 19:19:08 rhoads + * add back an expansionData variable to preserve binary compatibility + * + * Revision 1.57.84.3.48.2 2009/02/11 03:05:56 arulchan + * more ::SuspendDevice changes + * + * Revision 1.57.84.3.48.1 2009/01/23 21:34:15 arulchan + * fix for rdar://6213394 + * + * Revision 1.57.84.3 2008/06/16 21:31:16 nano + * Bring in changes from Foxhound 320.2.17 + * + * Revision 1.57.84.2 2008/04/22 22:38:01 nano + * Bring in changes from Foxhound-320.2.9 + * + * Revision 1.60.28.2 2008/05/22 17:36:18 nano + * Fix the reporting of the internal bit for GetDeviceInformation + * + * Revision 1.60.28.1 2008/05/21 17:51:43 nano + * <rdar://problem/5952635> GetDeviceInformation needs some fixes + * + * Revision 1.60 2008/04/18 22:03:28 nano + * Bring in fix for rdar://5874560 + * + * Revision 1.59.4.1 2008/04/18 21:55:55 nano + * <rdar://problem/5874560> Need API to know how much extra power has been allocated + * + * Revision 1.59 2008/04/17 16:56:57 nano + * Bring in branches for rdar://5867990 & rdar://5768343 + * + * Revision 1.58.4.1 2008/04/16 20:26:13 nano + * <rdar://problem/5867990> Add API to allocate sleep current, as well as making sure that we return any extra power if our client dies or our device is terminated without returning it + * + * Revision 1.58 2008/04/14 16:08:38 nano + * Add new APIs for high power and for GetDeviceInformation. + * + * Revision 1.57.126.2 2008/04/13 05:25:40 nano + * Call into PolicyMaker for the GetPortInformation + * + * Revision 1.57.126.1 2008/04/11 22:25:44 nano + * Initial work on new user-client APIs and new IOUSBDevice APIs to return port state information and manage extra power requests, as well as groundwork for calling the policy maker directly from the IOUSBDevice + * + * Revision 1.57 2007/08/07 20:30:36 rhoads + * rolled in a few branches to TOT + * + * Revision 1.56.92.1 2007/08/07 03:43:34 nano + * Bring in more changes for M89 suppport -- like actually use the dang power if the properties are available + * + * Revision 1.56 2007/03/06 12:23:41 rhoads + * roll in 5024412, 5035829, and 5039670 + * + * Revision 1.55.30.1 2007/02/27 16:08:33 rhoads + * some fine tuning of our IOService overrides, including not overriding willTerminate and didTerminate (5024412) + * + * Revision 1.55 2007/01/19 17:58:48 rhoads + * roll in branches for a leopard build + * + * Revision 1.54.30.1 2007/01/17 16:37:02 rhoads + * remove the IOUSBDevice::attach method which is not really useful + * + * Revision 1.54 2006/10/06 04:42:01 rhoads + * roll in branches 4727961, 4758404, 4759810, 4760274, and 4762769 + * + * Revision 1.53.4.1 2006/10/04 16:03:57 rhoads + * better IOUSBHubDevice design + * + */ +#endif + +#ifndef _IOKIT_IOUSBDEVICE_H +#define _IOKIT_IOUSBDEVICE_H + +#include <IOKit/usb/IOUSBNub.h> +#include <IOKit/usb/IOUSBPipe.h> +#include <IOKit/IOBufferMemoryDescriptor.h> +#include <IOKit/IOWorkLoop.h> +#include <IOKit/IOCommandGate.h> + +#include <kern/thread_call.h> + +// The following are definitions for errata properties needed for different devices. This +// should be but in the dictionary of the IOUSBDevice in question. This can be achieved +// by using the AppleUSBMergeNub class and having an IOProviderMergeProperties dictionary +// with the required properties. + +// This property allows a device to specify a configuration value of 0 in its configuration +// descriptor. This does not follow the spec, but we will allow it in order to get the device +// to work. The property should be a Boolean +// +#define kAllowConfigValueOfZero "kAllowZeroConfigValue" +#define kAllowNumConfigsOfZero "kAllowZeroNumConfigs" + + +class IOUSBController; +class IOUSBControllerV2; +class IOUSBInterface; +class IOUSBHubPolicyMaker; +/*! + @class IOUSBDevice + @abstract The IOService object representing a device on the USB bus. + @discussion This class provides functionality to configure a device and to create + IOUSBInterface objects to represent the interfaces of the device. +*/ + +class IOUSBDevice : public IOUSBNub +{ + friend class IOUSBController; + friend class IOUSBControllerV2; + friend class IOUSBInterface; + friend class IOUSBPipe; + + OSDeclareDefaultStructors(IOUSBDevice) + +protected: + + USBDeviceAddress _address; + IOUSBController * _controller; + IOUSBPipe * _pipeZero; + IOUSBDeviceDescriptor _descriptor; + UInt32 _busPowerAvailable; + UInt8 _speed; + IOUSBEndpointDescriptor _endpointZero; // Fake ep for control pipe + void * _port; // Obsolete, do not use + IOBufferMemoryDescriptor** _configList; + IOUSBInterface** _interfaceList; + UInt8 _currentConfigValue; + UInt8 _numInterfaces; + + struct ExpansionData + { + UInt32 _portNumber; + thread_call_t _doPortResetThread; + IOUSBDevice * _usbPlaneParent; + bool _portResetThreadActive; + bool _allowConfigValueOfZero; + thread_call_t _doPortSuspendThread; + bool _portSuspendThreadActive; + thread_call_t _doPortReEnumerateThread; + bool _resetInProgress; + bool _portHasBeenReset; + IORecursiveLock* _XgetConfigLock; // Obsolete + bool _doneWaiting; // Obsolete + bool _notifiedWhileBooting; // Obsolete + IOWorkLoop * _workLoop; + IOTimerEventSource * _notifierHandlerTimer; + UInt32 _notificationType; + bool _suspendInProgress; + bool _portHasBeenSuspendedOrResumed; + bool _addExtraResetTime; + bool _suspendCommand; + IOCommandGate * _commandGate; + OSSet * _openInterfaces; + bool _resetCommand; + IOReturn _resetError; + IOReturn _suspendError; + thread_call_t _doMessageClientsThread; + IOUSBHubPolicyMaker * _hubPolicyMaker; + UInt32 _sleepPowerAllocated; // how much sleep power we already gave to our client + UInt32 _wakePowerAllocated; // how much extra power during wake did we already give our client + UInt32 _devicePortInfo; + bool _deviceIsInternal; // Will be set if all our upstream hubs are captive (internal to the computer) + bool _deviceIsInternalIsValid; // true if we have already determined whether the device is internal + bool _newGetConfigLock; // new lock, taken within the WL gate, when doing a GetConfig + UInt32 _resetAndReEnumerateLock; // "Lock" to prevent us from doing a reset or a re-enumerate while the other one is in progress + UInt32 _locationID; + }; + ExpansionData * _expansionData; + + const IOUSBConfigurationDescriptor *FindConfig(UInt8 configValue, UInt8 *configIndex=0); + + virtual IOUSBInterface * GetInterface(const IOUSBInterfaceDescriptor *interface); + +public: + virtual IOReturn SetFeature(UInt8 feature); + +protected: + virtual IOReturn GetConfigDescriptor(UInt8 configIndex, void *data, UInt32 len); + + virtual IOReturn GetDeviceDescriptor(IOUSBDeviceDescriptor *desc, UInt32 size); + + virtual bool init(USBDeviceAddress deviceAddress, UInt32 powerAvaiable, UInt8 speed, UInt8 maxPacketSize ); + + virtual bool matchPropertyTable(OSDictionary * table, SInt32 *score); + +public: + // IOService methods + virtual bool init( void ); + virtual bool start( IOService *provider ); + virtual bool handleIsOpen(const IOService *forClient) const; + virtual bool handleOpen(IOService *forClient, IOOptionBits options, void *arg); + virtual void handleClose(IOService *forClient, IOOptionBits options); + virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); + virtual bool terminate( IOOptionBits options = 0 ); + virtual bool requestTerminate( IOService * provider, IOOptionBits options ); + virtual void stop( IOService *provider ); + virtual bool finalize(IOOptionBits options); + virtual void free( void ); + + // IOUSBDevice methods + virtual void SetProperties(); + + static IOUSBDevice *NewDevice(void); + + virtual void SetPort(void *port); // Obsolete, do NOT use + + /*! + @function FindNextInterfaceDescriptor + return a pointer to the next interface descriptor within the given full configuration descriptor satisfying the requirements specified, or NULL if there aren't any. + @param configDescIn the configuration descriptor within which to search. obtained from GetFullConfigurationDescriptor(configIndex). use NULL to specify the current configuration's descriptor. + @param intfDesc interface descriptor from which to start the search. NULL for the first interface descriptor in the given configuration descriptor + @param request IOUSBFindInterfaceRequest specifying the desired interface. Not changed. + @param descOut pointer to placeholder for the returned descriptor ptr + @result returns kIOReturnBadArgument if configDesc is not correct, or if configDesc is NULL and the device is not configured, or if intfDesc is not in configDesc. Otherwise returns kIOReturnSuccess or kIOUSBInterfaceNotFound. + */ + virtual IOReturn FindNextInterfaceDescriptor(const IOUSBConfigurationDescriptor *configDescIn, + const IOUSBInterfaceDescriptor *intfDesc, + const IOUSBFindInterfaceRequest *request, + IOUSBInterfaceDescriptor **descOut); + /*! + @function FindNextInterface + return an pointer to an IOUSBInterface object satisfying the requirements specified in request, or NULL if there aren't any. the device + must be configured for there to be any interfaces. + @param current interface to start searching from, NULL to start at the beginning of the device's interface list for the current configuration. + @param request specifies what properties an interface must have to match. + @result Pointer to a matching IOUSBInterface, or NULL if none match. Note: The IOUSBInterface is NOT retained for the caller. If the caller wishes to continue to use the returned object, it should call retain() on that object. + */ + virtual IOUSBInterface *FindNextInterface(IOUSBInterface *current, + IOUSBFindInterfaceRequest *request); + + /*! + @function CreateInterfaceIterator + return an OSIterator to iterate through interfaces satisfying the requirements specified in request. + @param request specifies what properties an interface must have to match. + @result Pointer to an OSIterator. + */ + virtual OSIterator *CreateInterfaceIterator(IOUSBFindInterfaceRequest *request); + + // Get pointer to full config info (cached in device, don't free returned pointer) + /*! + @function GetFullConfigurationDescriptor + return a pointer to all the descriptors for the requested configuration. + @param configIndex The configuration index (not the configuration value) + @result Pointer to the descriptors, which are cached in the IOUSBDevice object. + */ + virtual const IOUSBConfigurationDescriptor *GetFullConfigurationDescriptor(UInt8 configIndex); + + /*! + @function GetConfigurationDescriptor + Copy the specified amount of data for a configuration into the suppled buffer. + @param configValue The configuration value + @param data Buffer to copy data into + @param len number of bytes to copy + */ + virtual IOReturn GetConfigurationDescriptor(UInt8 configValue, void *data, UInt32 len); + + /*! + @function ResetDevice + Reset the device, returning it to the addressed, unconfigured state. + This is useful if a device has got badly confused. Note that the AppleUSBComposite driver will automatically + reconfigure the device if it is a composite device. + */ + virtual IOReturn ResetDevice(); + + /*! + @function SetConfiguration + Do a USB SetConfiguration call to the device. The caller must have the device open() in order to + actually cause a configuration change. If the device is currently configured, all IOUSBInterface objects + associated with the device are freed. After the new configuration has been set, all of its IOUSBInterface objects are + instantiated automatically. + @param forClient The client requesting the configuration change + @param configValue The desired configuration value. + @param startInterfaceMatching A boolean specifying whether IOKit should begin the process of finding + matching drivers for the new IOUSBInterface objects. + */ + virtual IOReturn SetConfiguration(IOService *forClient, UInt8 configValue, bool startInterfaceMatching=true); + + // Access to addressing and cached info + /*! + @function GetAddress + returns the bus address of the device + */ + virtual USBDeviceAddress GetAddress(void); + + /*! + @function GetSpeed + returns the speed of the device + */ + virtual UInt8 GetSpeed(void); + /*! + @function GetBus + returns a pointer to the IOUSBController object for the device + */ + virtual IOUSBController *GetBus(void); + /*! + @function GetBusPowerAvailable + returns the power available to the device, in units of 2mA + */ + virtual UInt32 GetBusPowerAvailable( void ); + /*! + @function GetMaxPacketSize + returns the maximum packet size for endpoint zero (only 8, 16, 32, 64 are valid) + */ + virtual UInt8 GetMaxPacketSize(void); + /*! + @function GetVendorID + returns the Vendor ID of the device + */ + virtual UInt16 GetVendorID(void); + /*! + @function GetProductID + returns the Product ID of the device + */ + virtual UInt16 GetProductID(void); + /*! + @function GetDeviceRelease + returns the DeviceRelease information + */ + virtual UInt16 GetDeviceRelease(void); + /*! + @function GetNumConfigurations + returns the number of configs in the device config descriptor + */ + virtual UInt8 GetNumConfigurations(void); + /*! + @function GetManufacturerStringIndex + returns the index of string descriptor describing manufacturer + */ + virtual UInt8 GetManufacturerStringIndex(void ); + /*! + @function GetProductStringIndex + returns the index of string descriptor describing product + */ + virtual UInt8 GetProductStringIndex(void ); + /*! + @function GetSerialNumberStringIndex + returns the index of string descriptor describing the device's serial number + */ + virtual UInt8 GetSerialNumberStringIndex(void ); + /*! + @function GetPipeZero + returns a pointer to the device's default control pipe + */ + virtual IOUSBPipe * GetPipeZero(void); + + // Deprecated but needed for binary compatibility + virtual IOUSBPipe* MakePipe(const IOUSBEndpointDescriptor *ep); + + // this method is deprecated. use the other DeviceRequest methods + virtual IOReturn DeviceRequest(IOUSBDevRequest *request, + IOUSBCompletion *completion = 0); + + // Same but with a memory descriptor + virtual IOReturn DeviceRequest(IOUSBDevRequestDesc *request, + IOUSBCompletion *completion = 0); + + /*! + @function GetConfiguration + Gets the current configuration from the IOUSBDevice object. Note that this call will send a control + request on the bus to get the current configuration from the physical device. + @param configNum Pointer to place to store configuration value. + */ + virtual IOReturn GetConfiguration(UInt8 *configNumber); + + /*! + @function GetDeviceStatus + Gets the device's status. Note that this sends a control request to the physical device. + @param status Pointer to place to store the status. + */ + virtual IOReturn GetDeviceStatus(USBStatus *status); + + /*! + @function GetStringDescriptor + Get a string descriptor as ASCII, in the specified language (default is US English) + @param index Index of the string descriptor to get. + @param buf Pointer to place to store ASCII string + @param maxLen Size of buffer pointed to by buf + @param lang Language to get string in (default is US English) + */ + virtual IOReturn GetStringDescriptor(UInt8 index, char *buf, int maxLen, UInt16 lang=0x409); + + /*! + @function GetChildLocationID + Get the locationID (UInt32) given the port number and the parent's location + @param parentLocationID locationID for the hub to which this device is attached. + @param port Port number of the hub where this device is attached + */ + virtual UInt32 GetChildLocationID(UInt32 parentLocationID, int port); + + virtual const IOUSBDescriptorHeader* FindNextDescriptor(const void *cur, UInt8 descType); + + virtual void DisplayNotEnoughPowerNotice(); + + // this is a non-virtual function so that we don't have to take up a binary compatibility slot. + UInt16 GetbcdUSB(void); + UInt8 GetProtocol(void); + void SetBusPowerAvailable(UInt32 newPower); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 0); + /*! + @function DeviceRequest + @abstract execute a control request to the default control pipe (pipe zero) + @param request The parameter block to send to the device + @param noDataTimeout Specifies an amount of time (in ms) after which the command will be aborted + if no data has been transferred on the bus. + @param completionTimeout Specifies an amount of time (in ms) after which the command will be aborted if the entire command has + not been completed. + @param completion Function to call when request completes. If omitted then + DeviceRequest() executes synchronously, blocking until the request is complete. If the request is asynchronous, the client must make sure that + the IOUSBDevRequest is not released until the callback has occurred. + + */ + virtual IOReturn DeviceRequest(IOUSBDevRequest *request, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOUSBCompletion *completion = 0); + + /*! + @function DeviceRequest + @abstract execute a control request to the default control pipe (pipe zero) + @param request The parameter block to send to the device (with the pData as an IOMemoryDesriptor) + @param noDataTimeout Specifies an amount of time (in ms) after which the command will be aborted + if no data has been transferred on the bus. + @param completionTimeout Specifies an amount of time (in ms) after which the command will be aborted if the entire command has + not been completed. + @param completion Function to call when request completes. If omitted then + DeviceRequest() executes synchronously, blocking until the request is complete. If the request is asynchronous, the client must make sure that + the IOUSBDevRequest is not released until the callback has occurred. + + */ + OSMetaClassDeclareReservedUsed(IOUSBDevice, 1); + virtual IOReturn DeviceRequest(IOUSBDevRequestDesc *request, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOUSBCompletion *completion = 0); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 2); + /*! + @function SuspendDevice + @abstract Instruct the hub to which this device is attached to suspend or resume the port to which the device is attached. + Note that if there are any outstanding transactions on any pipes in the device, those transactions will get returned with a + kIOReturnNotResponding error. + @param suspend Boolean value. true = suspend, false = resume. + */ + virtual IOReturn SuspendDevice( bool suspend); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 3); + /*! + @function ReEnumerateDevice + @abstract Instruct the hub to which this device is attached to reset the port to which this device is attached. This causes the + IOUSBDevice object and any child objects (IOUSBInterface objects or driver objects) to be terminated, and the device to be + completely reenumerated, as if it had been detached and reattached. + @param options Reserved for future use. + */ + virtual IOReturn ReEnumerateDevice( UInt32 options ); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 4); + /*! + @function DisplayUserNotification + @abstract Will use the KUNCUserNotification mechanism to display a notification to the user. + @param notificationType Which notification to display. + */ + virtual void DisplayUserNotification(UInt32 notificationType); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 5); + /*! + @function MakePipe + @abstract build a pipe on a given endpoint + @param ep A description of the endpoint + @param interface The IOUSBInterface object requesting the pipe + returns the desired IOUSBPipe object + */ + virtual IOUSBPipe* MakePipe(const IOUSBEndpointDescriptor *ep, IOUSBInterface *interface); + + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 6); + /*! + @function SetHubParent + @abstract Used by the hub driver to give the nub a pointer to its HubPolicyMaker object + @param hubPolicyMaker The object representing the Hub driver + */ + virtual void SetHubParent(IOUSBHubPolicyMaker *hubParent); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 7); + /*! + @function GetHubParent + @abstract Used by the hub driver to give the nub a pointer to its HubPolicyMaker object + @param hubPolicyMaker The object representing the Hub driver + */ + virtual IOUSBHubPolicyMaker* GetHubParent(); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 8); + /*! + @function GetDeviceInformation + @abstract Returns status information about the USB device, such as whether the device is captive or whether it is in the suspended state. + @param requestedPower The desired amount of power that the client wishes to reserve + @result Actual power that was reserved + + */ + virtual IOReturn GetDeviceInformation(UInt32 *info); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 9); + /*! + @function RequestExtraPower + @abstract Clients can use this API to reserve extra power for use by this device while the machine is asleep or while it is awake. Units are milliAmps (mA). + @param type Indicates whether the power is to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake) + @param requestedPower Amount of power desired, in mA + @result Amount of power actually reserved, in mA. It can be less than the requested or zero. + + */ + virtual UInt32 RequestExtraPower(UInt32 type, UInt32 requestedPower); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 10); + /*! + @function ReturnExtraPower + @abstract Clients can use this API to tell the system that they will not use power that was previously reserved by using the RequestExtraPower API. + @param type Indicates whether the power is to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake) + @param returnedPower Amount of power that is no longer needed, in mA + @result If the returnedPower was not previously allocated, an error will be returned. This will include the case for power that was requested for sleep but was returned for wake. + + */ + virtual IOReturn ReturnExtraPower(UInt32 type, UInt32 returnedPower); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 11); + /*! + @function GetExtraPowerAllocated + @abstract Clients can use this API to ask how much extra power has already been reserved by this device. Units are milliAmps (mA). + @param type Indicates whether the allocated power was to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake) + @result Amount of power allocated, in mA. + + */ + virtual UInt32 GetExtraPowerAllocated(UInt32 type); + + OSMetaClassDeclareReservedUsed(IOUSBDevice, 12); + /*! + @function DoLocationOverrideAndModelMatch + @abstract Will look for a kOverrideIfAtLocationID array proerty with locationID entries and a "MacModel" property. If any of the locationIDs match to the Mac Model, will return true. + If there is no kOverrideAtLocationID property, it will also return true. + @result True if we have a match, false otherwise + */ + virtual bool DoLocationOverrideAndModelMatch(); + + OSMetaClassDeclareReservedUnused(IOUSBDevice, 13); + OSMetaClassDeclareReservedUnused(IOUSBDevice, 14); + OSMetaClassDeclareReservedUnused(IOUSBDevice, 15); + OSMetaClassDeclareReservedUnused(IOUSBDevice, 16); + OSMetaClassDeclareReservedUnused(IOUSBDevice, 17); + OSMetaClassDeclareReservedUnused(IOUSBDevice, 18); + OSMetaClassDeclareReservedUnused(IOUSBDevice, 19); + +private: + + static void ProcessPortResetEntry(OSObject *target); + void ProcessPortReset(void); + + void TerminateInterfaces(void); + + static void ProcessPortReEnumerateEntry(OSObject *target, thread_call_param_t options); + void ProcessPortReEnumerate(UInt32 options); + + static void DoMessageClientsEntry(OSObject *target, thread_call_param_t messageStruct); + void DoMessageClients( void * messageStructPtr); + + static void DisplayUserNotificationForDeviceEntry (OSObject *owner, IOTimerEventSource *sender); + void DisplayUserNotificationForDevice( ); + + UInt32 SimpleUnicodeToUTF8(UInt16 uChar, UInt8 utf8Bytes[4]); + void SwapUniWords (UInt16 **unicodeString, UInt32 uniSize); + + IOReturn TakeGetConfigLock(void); + IOReturn ReleaseGetConfigLock(void); + static IOReturn ChangeGetConfigLock(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); +}; + +#endif /* _IOKIT_IOUSBDEVICE_H */ diff --git a/i386/include/IOKit/usb/IOUSBHIDDriver.h b/i386/include/IOKit/usb/IOUSBHIDDriver.h new file mode 100644 index 0000000..5e76887 --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBHIDDriver.h @@ -0,0 +1,289 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef IOUSBHIDDRIVER_H +#define IOUSBHIDDRIVER_H + +#include <IOKit/IOBufferMemoryDescriptor.h> + +#include <IOKit/hid/IOHIDDevice.h> + +#include <IOKit/usb/IOUSBBus.h> +#include <IOKit/usb/IOUSBInterface.h> +#include <IOKit/usb/USB.h> + + +#define ENABLE_HIDREPORT_LOGGING 0 + +// Report types from low level USB: +// from USBSpec.h: +// enum { +// kHIDRtInputReport = 1, +// kHIDRtOutputReport = 2, +// kHIDRtFeatureReport = 3 +// }; +// +// from IOHIDDescriptorParser.h: +// // types of HID reports (input, output, feature) +// enum +// { +// kHIDInputReport = 1, +// kHIDOutputReport, +// kHIDFeatureReport, +// kHIDUnknownReport = 255 +// }; +// +// Report types from high level HID Manager: +// from IOHIDKeys.h: +// enum IOHIDReportType +// { +// kIOHIDReportTypeInput = 0, +// kIOHIDReportTypeOutput, +// kIOHIDReportTypeFeature, +// kIOHIDReportTypeCount +// }; +// +#define HIDMGR2USBREPORTTYPE(x) (x + 1) +#define USB2HIDMGRREPORTTYPE(x) (x - 1) + + +// Note: In other Neptune files, kMaxHIDReportSize was defined as 64. But Ferg & Keithen were unable to +// find that value in the USB HID 1.1 specs. Brent had previously changed it to 256 in the OS 9 HID Driver +// to allow for reports spanning multiple packets. 256 may be no more a hard and fast limit, but it's +// working for now in OS 9. +#define kMaxHIDReportSize 256 // Max packet size = 8 for low speed & 64 for high speed. +#define kHIDDriverRetryCount 3 +#define kUSBHIDReportLoggingLevel "USB HID Report Logging Level" + + +// power states for the driver (awake or suspended) +enum +{ + kUSBHIDPowerStateOff = 0, + kUSBHIDPowerStateRestart = 1, + kUSBHIDPowerStateSleep = 2, // this could be system sleep or idle sleep + kUSBHIDPowerStateLowPower = 3, // this is idling + kUSBHIDPowerStateOn = 4, // this is fully on + kUSBHIDNumberPowerStates = 5 +}; + + +/*! + @class IOUSBHIDDriver + @abstract Driver that matches to USB HID devices. + @discussion This class can be overriden to provide for specific behaviors. + */ +class IOUSBHIDDriver : public IOHIDDevice +{ + OSDeclareDefaultStructors(IOUSBHIDDriver) + + IOUSBInterface * _interface; + IOUSBDevice * _device; + IOUSBPipe * _interruptPipe; + UInt32 _maxReportSize; + IOBufferMemoryDescriptor * _buffer; + IOUSBCompletion _completion; + UInt32 _retryCount; + thread_call_t _deviceDeadCheckThread; + thread_call_t _clearFeatureEndpointHaltThread; + bool _deviceDeadThreadActive; + bool _deviceIsDead; // Should really be called "abort expected" + bool _deviceHasBeenDisconnected; + bool _needToClose; + UInt32 _outstandingIO; + IOCommandGate * _gate; + IOUSBPipe * _interruptOutPipe; + UInt32 _locationID; + IOBufferMemoryDescriptor * _outBuffer; // Obsolete + UInt32 _deviceUsage; // Obsolete + UInt32 _deviceUsagePage; // Obsolete + + struct IOUSBHIDDriverExpansionData + { + IOWorkLoop * _workLoop; + thread_call_t _handleReportThread; + IOService * _rootDomain; + AbsoluteTime _wakeUpTime; + IOUSBCompletionWithTimeStamp _completionWithTimeStamp; + bool _checkForTimeStamp; + UInt32 _msToIgnoreTransactionsAfterWake; + IOTimerEventSource * _suspendPortTimer; + bool _portSuspended; + UInt32 _suspendTimeoutInMS; + UInt8 _interfaceNumber; + bool _logHIDReports; + UInt8 _hidLoggingLevel; + bool _needToClearPipeStall; + SInt32 _queuedReports; + AbsoluteTime _interruptTimeStamp; + bool _powerStateChanging; + unsigned long _myPowerState; + bool _pendingRead; + UInt32 _deviceDeadCheckLock; // "Lock" to prevent us from executing the device dead check while in progress + }; + IOUSBHIDDriverExpansionData *_usbHIDExpansionData; + + static void InterruptReadHandlerEntry(OSObject *target, void *param, IOReturn status, UInt32 bufferSizeRemaining); + static void InterruptReadHandlerWithTimeStampEntry(OSObject *target, void *param, IOReturn status, UInt32 bufferSizeRemaining, AbsoluteTime timeStamp); + void InterruptReadHandler(IOReturn status, UInt32 bufferSizeRemaining, AbsoluteTime timeStamp); + + static void CheckForDeadDeviceEntry(OSObject *target); + void CheckForDeadDevice(); + + static void ClearFeatureEndpointHaltEntry(OSObject *target); + void ClearFeatureEndpointHalt(void); + + static void HandleReportEntry(OSObject *target, thread_call_param_t timeStamp); + void HandleReport(AbsoluteTime timeStamp); + + virtual void processPacket(void *data, UInt32 size); // Obsolete + + static IOReturn ChangeOutstandingIO(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); + static IOReturn ClaimPendingRead(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); + + static void SuspendPortTimer(OSObject *target, IOTimerEventSource *sender); + +public: + + // IOService methods + // + virtual bool init(OSDictionary *properties); + virtual bool start(IOService * provider); + virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer ); + virtual bool willTerminate( IOService * provider, IOOptionBits options ); + virtual void stop(IOService * provider); + virtual void free(); + virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); + virtual unsigned long maxCapabilityForDomainState ( IOPMPowerFlags domainState ); + virtual IOReturn powerStateWillChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); + virtual IOReturn setPowerState ( unsigned long powerStateOrdinal, IOService* whatDevice ); + virtual IOReturn powerStateDidChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); + virtual void powerChangeDone ( unsigned long fromState); + + + // IOHIDDevice methods + // + virtual bool handleStart(IOService * provider); + virtual void handleStop(IOService * provider); + + virtual IOReturn newReportDescriptor( IOMemoryDescriptor ** descriptor ) const; + + virtual OSString * newTransportString() const; + + virtual OSNumber * newVendorIDNumber() const; + + virtual OSNumber * newProductIDNumber() const; + + virtual OSNumber * newVersionNumber() const; + + virtual OSString * newManufacturerString() const; + + virtual OSString * newProductString() const; + + virtual OSString * newSerialNumberString() const; + + virtual OSNumber * newLocationIDNumber() const; + + virtual OSNumber * newCountryCodeNumber() const; + + virtual IOReturn getReport( IOMemoryDescriptor * report, + IOHIDReportType reportType, + IOOptionBits options = 0 ); + + virtual IOReturn setReport( IOMemoryDescriptor * report, + IOHIDReportType reportType, + IOOptionBits options = 0 ); + + // HID driver methods + // + virtual OSString * newIndexedString(UInt8 index) const; + + virtual UInt32 getMaxReportSize(); + + virtual void DecrementOutstandingIO(void); + virtual void IncrementOutstandingIO(void); + virtual IOReturn StartFinalProcessing(); + virtual IOReturn SetIdleMillisecs(UInt16 msecs); + +private: + + IOReturn GetHIDDescriptor(UInt8 inDescriptorType, UInt8 inDescriptorIndex, UInt8 *vOutBuf, UInt32 *vOutSize); + IOReturn GetReport(UInt8 inReportType, UInt8 inReportID, UInt8 *vInBuf, UInt32 *vInSize); + IOReturn SetReport(UInt8 outReportType, UInt8 outReportID, UInt8 *vOutBuf, UInt32 vOutSize); + IOReturn GetIndexedString(UInt8 index, UInt8 *vOutBuf, UInt32 *vOutSize, UInt16 lang = 0x409) const; + IOReturn SetProtocol(UInt32 protocolType); + char GetHexChar(char hexChar); + IOReturn AbortAndSuspend( bool suspend ); + + + +#if ENABLE_HIDREPORT_LOGGING + void LogBufferReport(char *report, UInt32 len); + void LogMemReport(IOMemoryDescriptor * reportBuffer); + char GetHexChar(char hexChar); +#endif + +public: + OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 0); + virtual IOReturn RearmInterruptRead(); + + /*! + @function SuspendPort + @abstract Suspends the port for this device or optionally sets a timeout to suspend after a period of inactivity. + @discussion This call can be used to immediately suspend/resume a port or to enable the suspension of the port after a period of inactivity. If called with suspendPort = true (no timeout parameter), the HID driver + will immediately suspend the port, after aborting any outstanding reads on the interrupt pipe. If called with suspendPort = true and timeout != 0, it will suspend the port after the timeout number of ms have + passed without any read completions. If called with suspendPort = false, the port will be immediately resumed and the reads will be re-issued. If a timeout was enabled, it will be cancelled. + @param suspendPort Boolean value. true = suspend the port, false = resume the port. + @param timeoutMS Value in milliseconds If value is non-zero, the port will be suspended after the timeout milliseconds have passed without any read completions. + @result The IOReturn value from the IOUSBDevice::Suspend() call. + */ + OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 1); + virtual IOReturn SuspendPort(bool suspendPort, UInt32 timeoutMS = 0); + + OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 2); + virtual bool IsPortSuspended(); + + OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 3); + virtual void LogMemReport(UInt8 level, IOMemoryDescriptor * reportBuffer, IOByteCount size); + + OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 4); + virtual IOReturn InitializeUSBHIDPowerManagement(IOService *provider); + + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 5); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 6); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 7); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 8); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 9); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 10); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 11); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 12); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 13); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 14); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 15); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 16); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 17); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 18); + OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 19); +}; + +#endif // IOUSBHIDDRIVER_H diff --git a/i386/include/IOKit/usb/IOUSBHubDevice.h b/i386/include/IOKit/usb/IOUSBHubDevice.h new file mode 100644 index 0000000..91c728c --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBHubDevice.h @@ -0,0 +1,247 @@ +/* + * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __OPEN_SOURCE__ +/* + * + * $Log: IOUSBHubDevice.h,v $ + * Revision 1.11 2009/09/12 03:42:16 rhoads + * merge in the changes for the 390.3.4b QL + * + * Revision 1.10.52.1 2009/09/10 18:50:52 nano + * <rdar://problem/7134800> Task: Extra Current support for Ibex Peak RMHs -- look for a property that tells us to ask our USB plane parent for the extra current. This will allow the RMH to pass on the request to it's parent. + * + * Revision 1.10 2009/05/07 19:43:09 nano + * Move our SnowLeopard branch to TOT + * + * Revision 1.6.102.3 2008/06/16 22:02:16 nano + * Bring in changes from Foxound 320.2.19 + * + + * Revision 1.6.102.2 2008/04/22 22:38:01 nano + * Bring in changes from Foxhound-320.2.9 + * + * Revision 1.8.62.2 2008/06/06 21:08:44 nano + * Enable dynamic allocation of power for M89, so we don't reserve it if there isn't a high power device attached + * + * Revision 1.8.62.1 2008/06/06 04:14:32 nano + * Fix SleepCurrent allocation so it will work with hub devices and root hub devices as well as consolidating it across all controllers + * + * Revision 1.8 2008/04/17 16:56:57 nano + * Bring in branches for rdar://5867990 & rdar://5768343 + * + * Revision 1.7.4.1 2008/04/17 15:54:07 nano + * Merged PR-5768343 into this branch and fixed a couple of issues + * + * Revision 1.7.2.1 2008/04/16 00:48:49 ferg + * Bug #: 5768343 + * Add support for hubs with high-power downstream port capability. This is + * controlled by the properties "AAPL,current-available" and "AAPL,current-extra". + * + * Revision 1.7 2008/04/14 16:08:38 nano + * Add new APIs for high power and for GetDeviceInformation. + * + * Revision 1.6.144.1 2008/04/11 22:25:44 nano + * Initial work on new user-client APIs and new IOUSBDevice APIs to return port state information and manage extra power requests, as well as groundwork for calling the policy maker directly from the IOUSBDevice + * + * Revision 1.6 2007/08/01 16:10:18 rhoads + * roll in extra power changes + * + * Revision 1.5.118.1 2007/07/27 16:49:10 rhoads + * merge the extra current stuff into Leopard, and add extra sleep current for self powered hubs + * + * Revision 1.5 2007/01/20 00:47:01 rhoads + * roll in Hub Policy Maker changes + * + * Revision 1.4 2006/12/22 23:05:46 rhoads + * roll in branches 4364835 and 4277683-2 + * + * Revision 1.3.20.3 2007/01/15 19:58:07 rhoads + * saving more changes + * + * Revision 1.3.20.2 2007/01/09 21:55:53 rhoads + * commit some stuff to try to fix a permissions issue + * + * Revision 1.3.20.1 2006/12/18 19:13:56 rhoads + * re-integrate the old branch into TOT + * + * Revision 1.3.12.4 2006/12/18 17:33:48 rhoads + * looking good except for sleep/wake + * + * Revision 1.3.12.3 2006/12/08 05:42:40 rhoads + * mostly working + * + * Revision 1.3.12.2 2006/11/14 22:37:06 rhoads + * more changes with the root hubs + * + * Revision 1.3.12.1 2006/11/07 16:55:52 rhoads + * change to get the IOUSBHubDevice nubs into the IOPower tree + * + * Revision 1.3 2006/10/06 04:42:02 rhoads + * roll in branches 4727961, 4758404, 4759810, 4760274, and 4762769 + * + * Revision 1.2.4.2 2006/10/04 23:01:24 rhoads + * better naming + * + * Revision 1.2.4.1 2006/10/04 16:03:57 rhoads + * better IOUSBHubDevice design + * + */ +#endif + + +#ifndef _IOKIT_IOUSBHUBDEVICE_H +#define _IOKIT_IOUSBHUBDEVICE_H + +#include <IOKit/usb/IOUSBDevice.h> // our superclass + +// forward refeference. we don't include the header file because it would cause a circular reference +class IOUSBHubPolicyMaker; + +enum { + kIOUSBHubDeviceIsRootHub = 0x0001, + kIOUSBHubDeviceIsOnHighSpeedBus = 0x0002, + kIOUSBHubDeviceCanSleep = 0x0004 +}; + +/*! + @class IOUSBHubDevice + @abstract New in MAC OS X 10.5. The IOKit object representing a hub device on the USB bus. It is a subclass of IOUSBDevice. + @discussion With the exception of the IOUSBRootHubDevice objects representing the root hubs, every IOUSBDevice + will have an IOUSBHubDevice as its parent in the IOUSB plane. USB KEXT drivers will have the ability to + query this device for characteristics of the hub into which they are connected. This class will also give a dive driver + the abilty to get an IOService* pointing to the hub driver itself, which can then be used as the parent in the power plane. +*/ + +class IOUSBHubDevice : public IOUSBDevice +{ + friend class IOUSBHubPolicyMaker; + friend class AppleUSBHub; + friend class IOUSBController; // for the "can sleep" characteristic + +private: + OSDeclareDefaultStructors(IOUSBHubDevice) + + UInt32 _myCharacteristics; // bitmap of my characteristics + IOUSBHubPolicyMaker *_myPolicyMaker; // pointer to the policy maker in the IOPower tree for this hub + + struct ExpansionData + { + UInt32 _maxPortCurrent; // maximum current in milliamps per downstream port + UInt32 _totalExtraCurrent; // total amount of current above the spec'ed current per port available (during normal operation) + UInt32 _totalSleepCurrent; // total amount of current that can be drawn during sleep + UInt32 _canRequestExtraPower; // If 0, this hub does not support requesting extra power from its parent, non-zero: how much power we need to request in order to give out _extraPowerForPorts + UInt32 _extraPowerForPorts; // Of the power requested from our parent, how much can we parcel out -- the rest is consumed by voltage drop thru the cable + UInt32 _extraPowerAllocated; // Amount of power that we actually got from our parent + bool _requestFromParent; // True if we are to request the extra power from our parent, without modifying the request. Used for RMHs + }; + ExpansionData *_expansionData; + +protected: + // IOUSBHubDevice methods which will be used by the hub driver (which is also the Policy Maker) + virtual void SetPolicyMaker(IOUSBHubPolicyMaker *policyMaker); + virtual void SetHubCharacteristics(UInt32); + virtual bool InitializeCharacteristics(void); // used at start + +public: + // static constructor + static IOUSBHubDevice *NewHubDevice(void); + + // IOKit methods + virtual bool init(); + virtual bool start( IOService * provider ); + virtual void stop( IOService *provider ); + virtual void free(); + + // public IOUSBHubDevice methods + + void SetTotalSleepCurrent(UInt32 sleepCurrent); + UInt32 GetTotalSleepCurrent(); + + /*! + @function GetPolicyMaker + returns a pointer to the policy maker for the hub, which can be used as the power plane parent. + @result returns an IOUSBHubPolicyMaker* pointing to the policy maker for this hub. returns NULL is no policy maker is active on the hub device. + */ + virtual IOUSBHubPolicyMaker *GetPolicyMaker(void); + + /*! + @function GetHubCharacteristics + returns characteristics of the hub device which might be useful for the driver of a device connected to the hub. + kIOUSBHubDeviceIsRootHub indicates that the hub is a root hub + kIOUSBHubDeviceIsOnHighSpeedBus indicates that the hub is running on a High Speed bus. If this bit is set and kIOUSBHubDeviceIsHighSpeed is clear, then this is a Classic Speed hub running on a High Speed bus, which means that Split Transactions will be used to communicate with downstream devices. + + @result returns a bitmap of characteristics + */ + virtual UInt32 GetHubCharacteristics(); + + /*! + @function GetMaxProvidedPower + returns the maximum amount of power available on any downstream port of this hub + @result the power is returned in milliamps - usually 100ma or 500 ma. + */ + virtual UInt32 GetMaxProvidedPower(); + + /*! + @function RequestProvidedPower + requests power from the hub device + @param requestedPower - the amount of power requested in milliamps (usually 100ma or 500 ma) + @result the amount of power allocated for this driver in milliamps (usually 100ma or 500 ma) + */ + virtual UInt32 RequestProvidedPower(UInt32 requestedPower); + + virtual UInt32 RequestExtraPower(UInt32 requestedPower); + + virtual void ReturnExtraPower(UInt32 returnedPower); + + OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 0); + + virtual void InitializeExtraPower(UInt32 maxPortCurrent, UInt32 totalExtraCurrent); + + OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 1); + virtual UInt32 RequestSleepPower(UInt32 requestedPower); + + OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 2); + virtual void ReturnSleepPower(UInt32 returnedPower); + + OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 3); + virtual void SetSleepCurrent(UInt32 sleepCurrent); + + OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 4); + virtual UInt32 GetSleepCurrent(); + + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 5); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 6); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 7); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 8); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 9); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 10); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 11); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 12); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 13); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 14); + OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 15); +}; + +#endif /* _IOKIT_IOUSBROOTHUBDEVICE_H */ + diff --git a/i386/include/IOKit/usb/IOUSBHubPolicyMaker.h b/i386/include/IOKit/usb/IOUSBHubPolicyMaker.h new file mode 100644 index 0000000..a0021d3 --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBHubPolicyMaker.h @@ -0,0 +1,218 @@ +/* + * Copyright (c) 2007 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __OPEN_SOURCE__ +/* + * + * $Log: IOUSBHubPolicyMaker.h,v $ + * Revision 1.10 2009/05/07 19:43:09 nano + * Move our SnowLeopard branch to TOT + * + * Revision 1.7.72.3 2008/07/23 17:43:32 nano + * <rdar://problem/5939357> IOUSBHIDDriver, IOHIDEventService missing HeaderDoc class declarations + * + * Revision 1.7.72.2 2008/04/22 22:38:01 nano + * Bring in changes from Foxhound-320.2.9 + * + * Revision 1.9 2008/04/17 16:56:57 nano + * Bring in branches for rdar://5867990 & rdar://5768343 + * + * Revision 1.8.4.1 2008/04/16 20:26:15 nano + * <rdar://problem/5867990> Add API to allocate sleep current, as well as making sure that we return any extra power if our client dies or our device is terminated without returning it + * + * Revision 1.8 2008/04/14 16:08:38 nano + * Add new APIs for high power and for GetDeviceInformation. + * + * Revision 1.7.114.1 2008/04/11 22:25:44 nano + * Initial work on new user-client APIs and new IOUSBDevice APIs to return port state information and manage extra power requests, as well as groundwork for calling the policy maker directly from the IOUSBDevice + * + * Revision 1.7 2007/08/17 22:41:11 nano + * Bring in branch that fixes <rdar://problem/5414582> USB not honoring Resume recovery time (hub driver) and adds extra time for iPods + * + * Revision 1.6.30.1 2007/08/16 19:14:02 nano + * ResumeRecovery additions. + * + * Revision 1.6 2007/08/01 16:10:18 rhoads + * roll in extra power changes + * + * Revision 1.5.12.1 2007/07/27 16:49:10 rhoads + * merge the extra current stuff into Leopard, and add extra sleep current for self powered hubs + * + * Revision 1.5 2007/07/20 22:31:22 rhoads + * roll in branch300-3-2 + * + * Revision 1.4.40.1 2007/07/18 18:44:24 rhoads + * this is the 300.3.2g version plus some quieter logs + * + * Revision 1.4.34.2 2007/07/17 06:30:35 rhoads + * more hub chain fixes + * + * Revision 1.4.34.1 2007/07/16 16:45:00 rhoads + * more power management and termination tweaks + * + * Revision 1.4 2007/05/18 01:59:12 rhoads + * roll in 5112084 and 5204170 + * + * Revision 1.3.2.1 2007/05/15 18:23:48 rhoads + * some initial power state bug fixes + * + * Revision 1.3 2007/05/10 22:25:35 rhoads + * roll in branch 5113395 - the last major piece of the new power architecture + * + * Revision 1.2.64.4 2007/04/13 22:34:59 rhoads + * fix restart and shutdown + * + * Revision 1.2.64.3 2007/04/11 23:56:23 rhoads + * first mostly working dozing hub + * + * Revision 1.2.64.2 2007/04/10 02:09:09 rhoads + * got UHCI almost working + * + * Revision 1.2.64.1 2007/04/05 02:57:50 rhoads + * move power management out of AppleUSBHub and into IOUSBHubPolicyMaker + * + * Revision 1.2 2007/01/20 00:47:01 rhoads + * roll in Hub Policy Maker changes + * + * Revision 1.1.2.4 2007/01/18 22:51:08 rhoads + * add some padding + * + * Revision 1.1.2.3 2007/01/15 19:58:07 rhoads + * saving more changes + * + * Revision 1.1.2.2 2007/01/09 23:55:36 rhoads + * working version + * + * Revision 1.1.2.1 2007/01/09 21:57:02 rhoads + * commit some stuff to try to fix a permissions issue + * + * + */ +#endif +#ifndef _IOKIT_IOUSBHUBPOLICYMAKER_H +#define _IOKIT_IOUSBHUBPOLICYMAKER_H + +#include <IOKit/IOService.h> +#include <IOKit/usb/IOUSBController.h> +#include <IOKit/usb/IOUSBHubDevice.h> + + +enum { + kIOUSBHubPowerStateOff = 0, // losing power + kIOUSBHubPowerStateRestart = 1, // reseting bus, but may maintain power + kIOUSBHubPowerStateSleep = 2, // upstream port and all downstream ports suspended (from the top) + kIOUSBHubPowerStateLowPower = 3, // upstream port and all downstream ports suspended (from the bottom) + kIOUSBHubPowerStateOn = 4, // upstream port and at least one downstream port on + kIOUSBHubNumberPowerStates = 5 +}; + +enum { + kHubResumeRecoveryTime = 10, // 10 ms to recover after I resume myself + kPortResumeRecoveryTime = 10 // 10 ms to recover another device +}; + +#define kIOUSBHubPowerStateStable -1 + +/*! + @class IOUSBHubPolicyMaker + @abstract Super class for Hub drivers to incorporate common Power Management code. + */ +class IOUSBHubPolicyMaker : public IOService +{ + OSDeclareAbstractStructors(IOUSBHubPolicyMaker) + +protected: + IOUSBControllerV2 * _bus; + IOUSBHubDevice * _device; // our provider + IOUSBHubDevice * _parentHubDevice; // for non root hub drivers, this is the hub device that my hub device is connected to + bool _isRootHub; // this is a root hub + bool _dozeEnabled; // true if the controller has been enabled to go into doze mode + bool _dontAllowLowPower; // If true, we will not allow the hub to go into low power mode. + bool _dontAllowSleepPower; // If true, we will not allow extra sleep power for a self powered hub. + SInt32 _powerStateChangingTo; // a power state if we are changing to one, or -1 if we are stable + unsigned long _myPowerState; // my current state (since getPowerState doesn't always change in time) + UInt32 _extraPower; // how much extra power we might be able to get from our parent hub + UInt32 _extraPowerRemaining; // how many milliamps we can still give to any one port + UInt32 _hubResumeRecoveryTime; // # of ms that we will wait before issuing any transactions on our port (nominally 10ms) + struct ExpansionData + { + }; + ExpansionData *_expansionData; + +public: + // IOService methods + virtual bool start(IOService * provider); + virtual IOReturn powerStateWillChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); + virtual unsigned long powerStateForDomainState ( IOPMPowerFlags domainState ); + virtual IOReturn setPowerState ( unsigned long powerStateOrdinal, IOService* whatDevice ); + virtual IOReturn powerStateDidChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); + virtual unsigned long maxCapabilityForDomainState ( IOPMPowerFlags domainState ); + virtual void powerChangeDone ( unsigned long fromState ); + + // public methods which MAY be implemented in subclass + virtual IOReturn EnsureUsability(void); + + // Extra Port Power calls + void AllocateExtraPower(); + IOReturn GetExtraPortPower(UInt32 portNum, UInt32 *extraPower); + IOReturn ReturnExtraPortPower(UInt32 portNum, UInt32 extraPower); + + // virtual methods to be implemented in the controlling driver subclass + virtual bool ConfigureHubDriver(void) = 0; + virtual IOReturn HubPowerChange(unsigned long powerStateOrdinal) = 0; + + OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 0); + virtual IOReturn GetPortInformation(UInt32 portNum, UInt32 *info); + + OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 1); + virtual IOReturn ResetPort(UInt32 portNum); + + OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 2); + virtual IOReturn SuspendPort(UInt32 portNum, bool suspend); + + OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 3); + virtual IOReturn ReEnumeratePort(UInt32 portNum, UInt32 options); + + OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 4); + virtual UInt32 RequestExtraPower(UInt32 portNum, UInt32 type, UInt32 requestedPower); + + OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 5); + virtual IOReturn ReturnExtraPower(UInt32 portNum, UInt32 type, UInt32 returnedPower); + + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 6); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 7); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 8); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 9); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 10); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 11); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 12); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 13); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 14); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 15); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 16); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 17); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 18); + OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 19); +}; + +#endif _IOKIT_IOUSBHUBPOLICYMAKER_H diff --git a/i386/include/IOKit/usb/IOUSBInterface.h b/i386/include/IOKit/usb/IOUSBInterface.h new file mode 100644 index 0000000..4777e50 --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBInterface.h @@ -0,0 +1,264 @@ +/* + * Copyright (c) 1998-2007 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBINTERFACE_H +#define _IOKIT_IOUSBINTERFACE_H + +#include <IOKit/IOService.h> +#include <libkern/c++/OSData.h> + +#include <IOKit/usb/USB.h> +#include <IOKit/usb/IOUSBNub.h> +#include <IOKit/usb/IOUSBDevice.h> + +/*! + @class IOUSBInterface + @abstract The object representing an interface of a device on the USB bus. + @discussion This class provides functionality to find the pipes of an interface and + to read the descriptors associated with an interface. When an interface is open()ed, + all its pipes are created +*/ +class IOUSBInterface : public IOUSBNub +{ + friend class IOUSBInterfaceUserClientV2; + + OSDeclareDefaultStructors(IOUSBInterface) + +protected: + IOUSBPipe * _pipeList[kUSBMaxPipes]; + const IOUSBConfigurationDescriptor *_configDesc; + const IOUSBInterfaceDescriptor * _interfaceDesc; + IOUSBDevice * _device; + + // these variable are the parsed interface descriptor + UInt8 _bInterfaceNumber; + UInt8 _bAlternateSetting; + UInt8 _bNumEndpoints; + UInt8 _bInterfaceClass; + UInt8 _bInterfaceSubClass; + UInt8 _bInterfaceProtocol; + UInt8 _iInterface; + + struct ExpansionData { + IOCommandGate *_gate; + IOWorkLoop *_workLoop; + bool _needToClose; + IOLock * _pipeObjLock; // Lock to synchronize accesses to our pipeObjects + }; + ExpansionData * _expansionData; + + // private methods + virtual void ClosePipes(void); // close all pipes (except pipe zero) + virtual IOReturn CreatePipes(void); // open all pipes in the current interface/alt interface + virtual void SetProperties(void); // update my property table with the correct properties + +public: + // static methods + static IOUSBInterface *withDescriptors(const IOUSBConfigurationDescriptor *cfDesc, const IOUSBInterfaceDescriptor *ifDesc); + static IOReturn CallSuperOpen(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); + static IOReturn CallSuperClose(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); + static UInt8 hex2char( UInt8 digit ); + + // IOService methods + virtual bool start(IOService * provider); + virtual bool handleOpen(IOService *forClient, IOOptionBits options = 0, void *arg = 0 ); + virtual bool open(IOService *forClient, IOOptionBits options = 0, void *arg = 0 ); + virtual void close(IOService *forClient, IOOptionBits options = 0); + virtual void handleClose(IOService *forClient, IOOptionBits options = 0); + virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); + virtual bool finalize(IOOptionBits options); + virtual void stop(IOService * provider); + virtual bool terminate( IOOptionBits options = 0 ); + virtual void free(); + + // IOUSBInterface class methods + virtual bool init( const IOUSBConfigurationDescriptor *cfDesc, + const IOUSBInterfaceDescriptor *ifDesc); + /*! + @function FindNextAltInterface + return alternate interface descriptor satisfying the requirements specified in request, or NULL if there aren't any. + request is updated with the properties of the returned interface. + @param current interface descriptor to start searching from, NULL to start at alternate interface 0. + @param request specifies what properties an interface must have to match. + @result Pointer to a matching interface descriptor, or NULL if none match. + */ + virtual const IOUSBInterfaceDescriptor *FindNextAltInterface(const IOUSBInterfaceDescriptor *current, + IOUSBFindInterfaceRequest *request); + + /*! + @function FindNextPipe + Find a pipe of the interface that matches the requirements, either + starting from the beginning of the interface's pipe list or from a specified + pipe. + @param current Pipe to start searching from, NULL to start from beginning of list. + @param request Requirements for pipe to match, updated with the found pipe's + properties. + @result Pointer to the pipe, or NULL if no pipe matches the request. + */ + virtual IOUSBPipe *FindNextPipe(IOUSBPipe *current, IOUSBFindEndpointRequest *request); + + /*! + @function FindNextAssociatedDescriptor + Find the next descriptor of the requested type associated with the interface. + @param current Descriptor to start searching from, NULL to start from beginning of list. + @param type Descriptor type to search for, or kUSBAnyDesc to return any descriptor type. + @result Pointer to the descriptor, or NULL if no matching descriptors found. + */ + virtual const IOUSBDescriptorHeader * FindNextAssociatedDescriptor(const void *current, UInt8 type); + + /*! + @function SetAlternateInterface + Select the specified alternate interface. + @param forClient The client requesting the alternate setting. This client must have the interface open in order to perform the request. + @param alternateSetting Alternate setting (from the alternate interface's interface descriptor). + @result exclusive access error if the interface is not open. otherwise the result of the transaction + */ + virtual IOReturn SetAlternateInterface(IOService *forClient, UInt16 alternateSetting); + + /*! + @function GetPipeObj + returns a handle to the pipe at the corresponding index + @param index value from zero to kUSBMaxPipes-1 + @result The IOUSBPipe object. Note that the client does not own a reference to this pipe, so the client should retain() the IOUSBPipe object if necessary. + */ + virtual IOUSBPipe *GetPipeObj(UInt8 index); + /*! + @function GetConfigValue + returns the device configuration value for the interface + @result The device configuration value. + */ + virtual UInt8 GetConfigValue(); + /*! + @function GetDevice + returns the device the interface is part of. + @result Pointer to the IOUSBDevice object which is the parent of this IOUSBInterface object. + */ + virtual IOUSBDevice *GetDevice(); + /*! + @function GetInterfaceNumber + returns the zero based value identifying the index in the array of concurrent + interfaces supported by the current configuration + @result the interface index + */ + virtual UInt8 GetInterfaceNumber(); + /*! + @function GetAlternateSetting + returns the alternate setting for this interface. + @result the alternate setting + */ + virtual UInt8 GetAlternateSetting(); + /*! + @function GetNumEndpoints + returns the number of endpoints used by this interface (excluding + device endpoint zero. If the value is zero, this interface only + uses endpoint zero. + @result the number of endpoints + */ + virtual UInt8 GetNumEndpoints(); + /*! + @function GetInterfaceClass + returns the class code for this interface (assigned by the USB) + a value of zero is reserved + if the value is FFh, the interface class is vendor-specific + all other values are reserved for assignment by the USB + @result the interface class + */ + virtual UInt8 GetInterfaceClass(); + /*! + @function GetInterfaceSubClass + returns the subclass code (assigned by the USB). + These codes are qualified by the value returned by GetInterfaceClass + @result the interface subclass + */ + virtual UInt8 GetInterfaceSubClass(); + /*! + @function GetInterfaceProtocol + returns the protocol code (assigned by the USB). + @result the interface index + */ + virtual UInt8 GetInterfaceProtocol(); + /*! + @function GetInterfaceStringIndex + returns the index of the string descriptor describing the interface + @result the string index + */ + virtual UInt8 GetInterfaceStringIndex(); + + /*! + @function DeviceRequest + @abstract Sends a control request to the default control pipe in the device (pipe zero) + @param request The parameter block to send to the device + @param completion Function to call when request completes. If omitted then + DeviceRequest() executes synchronously, blocking until the request is complete. If the request is asynchronous, the client must make sure that + the IOUSBDevRequest is not released until the callback has occurred. + */ + virtual IOReturn DeviceRequest(IOUSBDevRequest *request, IOUSBCompletion *completion = 0); + + /*! + @function DeviceRequest + @abstract Sends a control request to the default control pipe in the device (pipe zero) + @param request The parameter block to send to the device (with the pData as an IOMemoryDesriptor) + @param completion Function to call when request completes. If omitted then + DeviceRequest() executes synchronously, blocking until the request is complete. If the request is asynchronous, the client must make sure that + the IOUSBDevRequest is not released until the callback has occurred. + */ + virtual IOReturn DeviceRequest(IOUSBDevRequestDesc *request, IOUSBCompletion *completion = 0); + + virtual bool matchPropertyTable(OSDictionary * table, SInt32 *score); + + OSMetaClassDeclareReservedUsed(IOUSBInterface, 0); + /*! + @function GetEndpointProperties + @abstract Returns the properties of an endpoint, possibly in an alternate interface. + @param alternateSetting specifies the desired alternate setting + @param endpointNumber specifies the endpoint number + @param direction specifies the direction (kUSBIn, kUSBOut) + @param transferType a pointer to hold the transfer type (kUSBControl, kUSBBulk, etc.) of the endpoint if found. + @param maxPacketSize a pointer to hold the maxPacketSize in the endpoint descriptor. + @param interval a pointer to hold the interval value in the endpoint descriptor. + @result returns kIOReturnSuccess if the endpoint is found, and kIOUSBEndpointNotFound if it is not. + */ + virtual IOReturn GetEndpointProperties(UInt8 alternateSetting, UInt8 endpointNumber, UInt8 direction, UInt8 *transferType, UInt16 *maxPacketSize, UInt8 *interval); + + OSMetaClassDeclareReservedUnused(IOUSBInterface, 1); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 2); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 3); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 4); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 5); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 6); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 7); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 8); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 9); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 10); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 11); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 12); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 13); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 14); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 15); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 16); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 17); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 18); + OSMetaClassDeclareReservedUnused(IOUSBInterface, 19); +}; + +#endif /* _IOKIT_IOUSBINTERFACE_H */ diff --git a/i386/include/IOKit/usb/IOUSBLog.h b/i386/include/IOKit/usb/IOUSBLog.h new file mode 100644 index 0000000..7f8f2a3 --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBLog.h @@ -0,0 +1,240 @@ +/* + * Copyright © 1998-20010 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBLOG_H +#define _IOKIT_IOUSBLOG_H + +#include <IOKit/IOService.h> +#include <IOKit/IOLib.h> + + +#ifdef __cplusplus + extern "C" { +#endif + +// USB Specific defines +#define USBLog( LEVEL, ARGS...) KernelDebugLogTag( LEVEL, 'USBF', ## ARGS ) +#define USBError( LEVEL, ARGS...) KernelDebugLogInternal( ( LEVEL ), 'USBF', ## ARGS ) +#define USBStringFromReturn( IORETURN) (IOUSBController::_log)->stringFromReturn( IORETURN ) + + +// Possible Debug levels. If DEBUG_LEVEL is set to DEBUG_LEVEL_PRODUCTION, all debug logs will be +// stripped of the final code. + +#define DEBUG_LEVEL_PRODUCTION 0 +#define DEBUG_LEVEL_DEVELOPMENT 1 +#define DEBUG_LEVEL_ALPHA 2 +#define DEBUG_LEVEL_BETA 3 +#define DEBUG_LEVEL_FINAL DEBUG_LEVEL_PRODUCTION + +// Allow clients to define their own debug level. + +#if ( !defined( DEBUG_LEVEL ) ) + #define DEBUG_LEVEL DEBUG_LEVEL_PRODUCTION +#endif + +// Index for user client methods +// +enum +{ + kUSBControllerUserClientOpen = 0, + kUSBControllerUserClientClose, + kUSBControllerUserClientEnableLogger, + kUSBControllerUserClientSetDebuggingLevel, + kUSBControllerUserClientSetDebuggingType, + kUSBControllerUserClientGetDebuggingLevel, + kUSBControllerUserClientGetDebuggingType, +#ifndef __OPEN_SOURCE__ + kUSBControllerUserClientSetTestMode, + kUSBControllerUserClientReadRegister, + kUSBControllerUserClientWriteRegister, + kUSBControllerUserClientMessageController, +#endif + kNumUSBControllerMethods +}; + +#ifndef __OPEN_SOURCE__ +// Enums for the private kIOUSBMessageController message +enum +{ + kIOUSBMessageControllerDoGPIOReset = 0x00000001 +}; +#endif + +// Info Debug Output Types. + +typedef UInt32 KernelDebuggingOutputType; +enum +{ + kKernelDebugOutputIOLogType = 0x00000001, + kKernelDebugOutputKextLoggerType = 0x00000002 +}; + + +// Info Debug levels. + +typedef UInt32 KernelDebugLevel; +enum +{ + kKernelDebugInfoLevel = 1000, + kKernelDebugRareInfoLevel = 2000, + kKernelDebugAllowedErrorLevel = 3000, + kKernelDebugAssertLevel = 4000, + kKernelDebugRequireLevel = 5000, + kKernelDebugErrorLevel = 6000, + kKernelDebugCriticalErrorLevel = 7000, + kKernelDebugTragicErrorLevel = 8000, + kKernelDebugAnyLevel = 0 +}; + +// Function prototypes. + +void KernelDebugSetLevel( KernelDebugLevel inLevel ); +KernelDebugLevel KernelDebugGetLevel(); +void KernelDebugSetOutputType( KernelDebuggingOutputType inType ); +KernelDebuggingOutputType KernelDebugGetOutputType(); +IOReturn KernelDebugFindKernelLogger(); +void KernelDebugEnable( bool enable ); + +// Yes, you can call this directly. But, why? If you use the macros declared below, such as +// KernelIOLog, you get the benefit of having your logs compiled out when you set the +// DEBUG_LEVEL to production mode and recompile. Dude. Sweet. What's mine say? + +void KernelDebugLogInternal( KernelDebugLevel inLevel, UInt32 inTag, char const *inFormatString, ... ) __attribute__ ((format(printf,3,4)));; +void KernelDebugLogDataInternal( UInt32 inLevel, UInt32 inTag, void *buffer, UInt32 byteCount, bool preBuffer); + +// Handy macros. + +#define REQUIRE_NO_ERR_PRINTF( VALUE, LABEL, ARGS... ) \ + if ( VALUE != kIOReturnSuccess ) \ + { \ + KernelDebugLogInternal( kDebugInfoLevel, 'BluD', ## ARGS ); \ + goto LABEL; \ + } + +#define REQUIRE_PRINTF( TEST, LABEL, ARGS... ) \ + do \ + { \ + if ( !( TEST ) ) \ + { \ + KernelDebugLogInternal( kDebugInfoLevel, 'BluD', ## ARGS ); \ + goto LABEL; \ + } \ + } while( false ) + +// Some macros to call the debugging outputs. We'll strip out the debug logs if we are production code. + +#if DEBUG_LEVEL != DEBUG_LEVEL_PRODUCTION +#define KernelDebugLog( LEVEL, ARGS... ) KernelDebugLogInternal( ( LEVEL ), 'KDbg', ## ARGS ) __attribute__ ((format(printf,1,2))); + #define KernelDebugLogTag( LEVEL, TAG, ARGS... ) KernelDebugLogInternal( ( LEVEL ), ( TAG ), ## ARGS ) + #define KernelDebugLogData( LEVEL, TAG, BUFFER, SIZE, HOLD) KernelDebugLogDataInternal( ( LEVEL ), ( TAG ), ( BUFFER ), ( SIZE ), ( HOLD )) +#else + #define KernelDebugLog( LEVEL, ARGS... ) + #define KernelDebugLogTag( LEVEL, TAG, ARGS... ) + #define KernelDebugLogData( LEVEL, TAG, BUFFER, SIZE, HOLD) +#endif + + +#ifdef __cplusplus + } + +//================================================================================================ +// Forward declarations +//================================================================================================ +class com_apple_iokit_KLogClient; + +//================================================================================================ +// Defines +//================================================================================================ +#define kLogKextName "com_apple_iokit_KLog" +#define MAXUSERS 5 + +//================================================================================================ +// Custom Types +//================================================================================================ + +typedef UInt32 KLogLevel; +typedef UInt32 KLogTag; + +//================================================================================================ +// com_apple_iokit_KLog +//================================================================================================ + +class com_apple_iokit_KLog : public IOService +{ + + OSDeclareDefaultStructors(com_apple_iokit_KLog) + + com_apple_iokit_KLogClient * mClientPtr[MAXUSERS+1]; + + unsigned char * mMsgBuffer; + UInt8 mClientCount; + UInt8 mMsgSize; + bool mErrFlag; + struct timeval * mTimeVal; + IOLock * mLogLock; + +public: + + static com_apple_iokit_KLog * logger; + + virtual bool init(OSDictionary *dictionary = 0); + virtual void free(void); + + virtual IOService * probe(IOService *provider, SInt32 *score); + virtual bool start(IOService *provider); + virtual void stop(IOService *provider); + virtual IOReturn newUserClient( task_t owningTask, void * securityID, + UInt32 type, IOUserClient ** handler ); + + virtual SInt8 Log( KLogLevel level, KLogTag tag, const char *format, ... ); + virtual SInt8 vLog( KLogLevel level, KLogTag tag, const char *format, va_list in_va_list ); + + void closeChild(com_apple_iokit_KLogClient *ptr); + void setErr(bool set); + +}; + +#define kMaxStatusBufSize (8*1024) + + +class IOUSBLog : public IOService +{ + OSDeclareAbstractStructors(IOUSBLog) + +private: +public: + virtual bool init( OSDictionary * dictionary = 0 ); + virtual const char * stringFromReturn( IOReturn rtn ); + static IOUSBLog *usblog(); + virtual void AddStatusLevel (UInt32 level, UInt32 ref, char *status, UInt32 value); + virtual void AddStatus(char *message); + virtual void AddStatus(UInt32 level, char *message); + virtual void USBLogPrintf(UInt32 level, char *format,...); + virtual char * strstr(const char *in, const char *str); +}; + + +#endif +#endif /* ! _IOKIT_IOUSBLOG_H */ + diff --git a/i386/include/IOKit/usb/IOUSBMassStorageClass.h b/i386/include/IOKit/usb/IOUSBMassStorageClass.h new file mode 100644 index 0000000..02c8557 --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBMassStorageClass.h @@ -0,0 +1,507 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IOUSBMASSSTORAGECLASS_H +#define _IOKIT_IOUSBMASSSTORAGECLASS_H + +// Headers for general IOKit definitions +#include <IOKit/IOLib.h> +#include <IOKit/IOService.h> +#include <IOKit/IOMemoryDescriptor.h> +#include <IOKit/IOMessage.h> + +// Headers for USB specific definitions +#include <IOKit/usb/IOUSBInterface.h> +#include <IOKit/usb/IOUSBPipe.h> +#include <IOKit/usb/USBSpec.h> +#include <IOKit/usb/USB.h> + +// Headers for SCSI Protocol support definitions +#include <IOKit/scsi/IOSCSIProtocolServices.h> + +// BSD includes +#include <sys/sysctl.h> + +#define UNUSED(x) ((void)x) + + +#pragma mark - +#pragma mark Vendor Specific Device Support +#define kIOUSBMassStorageCharacteristics "USB Mass Storage Characteristics" +#define kIOUSBMassStoragePreferredSubclass "Preferred Subclass" +#define kIOUSBMassStoragePreferredProtocol "Preferred Protocol" +#define kIOUSBMassStorageResetOnResume "Reset On Resume" +#define kIOUSBMassStorageUseStandardUSBReset "Use Standard USB Reset" +#define kIOUSBKnownCSWTagIssues "Known CSW Tag Issues" +#define kIOUSBMassStorageMaxLogicalUnitNumber "Max Logical Unit Number" +#define kIOPropertyIOUnitKey "IOUnit" +#define kIOUSBMassStorageDoNotMatch "Do Not Match MSC" +#define kIOUSBMassStorageDoNotOperate "Do Not Operate" +#define kIOUSBMassStorageEnableSuspendResumePM "Enable Port Suspend-Resume PM" + +enum +{ + kUSBDAddressLength = 10 +}; + +#pragma mark - +#pragma mark CBI Protocol Strutures +// Structure for the global PB's +struct CBIRequestBlock +{ + SCSITaskIdentifier request; + IOUSBDevRequest cbiDevRequest; + SCSICommandDescriptorBlock cbiCDB; + IOUSBCompletion cbiCompletion; + UInt32 currentState; + IOMemoryDescriptor * cbiPhaseDesc; + UInt8 cbiGetStatusBuffer[2]; // 2 bytes as specified in the USB spec +}; + +typedef struct CBIRequestBlock CBIRequestBlock; + +#pragma mark - +#pragma mark Bulk Only Protocol Structures + +struct StorageBulkOnlyCBW +{ + UInt32 cbwSignature; + UInt32 cbwTag; + UInt32 cbwTransferLength; + UInt8 cbwFlags; + UInt8 cbwLUN; // Bits 0-3: LUN, 4-7: Reserved + UInt8 cbwCDBLength; // Bits 0-4: CDB Length, 5-7: Reserved + UInt8 cbwCDB[16]; +}; + +typedef struct StorageBulkOnlyCBW StorageBulkOnlyCBW; + +struct StorageBulkOnlyCSW +{ + UInt32 cswSignature; + UInt32 cswTag; + UInt32 cswDataResidue; + UInt8 cswStatus; +}; + +typedef struct StorageBulkOnlyCSW StorageBulkOnlyCSW; + +struct BulkOnlyRequestBlock +{ + SCSITaskIdentifier request; + IOUSBCompletion boCompletion; + UInt32 currentState; + StorageBulkOnlyCBW boCBW; + StorageBulkOnlyCSW boCSW; + IOMemoryDescriptor * boPhaseDesc; + UInt8 boGetStatusBuffer[2]; // 2 bytes as specified in the USB spec +}; + +typedef struct BulkOnlyRequestBlock BulkOnlyRequestBlock; + + +#pragma mark - +#pragma mark IOUSBMassStorageClass definition + +class IOUSBMassStorageClass : public IOSCSIProtocolServices +{ + OSDeclareDefaultStructors(IOUSBMassStorageClass) + +private: + // ---- Member variables used by all protocols ---- + // The interface object that provides the driver with access to the + // USB so that it may talk to its device. + IOUSBInterface * fInterface; + + // The pipe objects that the driver uses to transport data through a + // pipe to the appropriate endpoint. + IOUSBPipe * fBulkInPipe; + IOUSBPipe * fBulkOutPipe; + IOUSBPipe * fInterruptPipe; + IOUSBDevRequest fUSBDeviceRequest; + UInt8 fPreferredSubclass; + UInt8 fPreferredProtocol; + + // The maximum Logical Unit Number. This is the highest valid LUN + // that the USB device supports, so if the device only supports one + // LUN, such as CBI and CB, this number will be zero. + UInt8 fMaxLogicalUnitNumber; + + // ---- Member variables used by CBI protocol ---- + bool fCBICommandStructInUse; + + CBIRequestBlock fCBICommandRequestBlock; + + // ---- Member variables used by Bulk Only protocol ---- + // Command tag, this driver just uses a sequential counter that is + // incremented for each CBW that is sent to the device. + UInt32 fBulkOnlyCommandTag; + + bool fBulkOnlyCommandStructInUse; + + // Dedicated CBW and CSW IOMemoryDescriptors are listed in the ExpansionData struct. + + // The Request block that contains all the necessary data for + // transporting a Bulk Only request across the USB. + BulkOnlyRequestBlock fBulkOnlyCommandRequestBlock; + +protected: + // Reserve space for future expansion. + struct ExpansionData + { + bool fResetInProgress; + OSSet * fClients; + IOUSBPipe * fPotentiallyStalledPipe; + bool fUseUSBResetNotBOReset; + bool fAbortCurrentSCSITaskInProgress; + IOMemoryDescriptor * fCBIMemoryDescriptor; + IOMemoryDescriptor * fBulkOnlyCBWMemoryDescriptor; + IOMemoryDescriptor * fBulkOnlyCSWMemoryDescriptor; + bool fDeviceAttached; + bool fWaitingForReconfigurationMessage; + bool fTerminating; + bool fKnownCSWTagMismatchIssues; + bool fPortSuspendResumeForPMEnabled; + bool fPortIsSuspended; + bool fRequiresResetOnResume; + bool fAutonomousSpinDownWorkAround; + UInt8 fConsecutiveResetCount; + bool fClearStallInProgress; /* OBSOLETE */ + bool fTerminationDeferred; + }; + ExpansionData * reserved; + + #define fResetInProgress reserved->fResetInProgress + #define fClients reserved->fClients + #define fPotentiallyStalledPipe reserved->fPotentiallyStalledPipe + #define fUseUSBResetNotBOReset reserved->fUseUSBResetNotBOReset + #define fAbortCurrentSCSITaskInProgress reserved->fAbortCurrentSCSITaskInProgress + #define fCBIMemoryDescriptor reserved->fCBIMemoryDescriptor + #define fBulkOnlyCBWMemoryDescriptor reserved->fBulkOnlyCBWMemoryDescriptor + #define fBulkOnlyCSWMemoryDescriptor reserved->fBulkOnlyCSWMemoryDescriptor + #define fDeviceAttached reserved->fDeviceAttached + #define fWaitingForReconfigurationMessage reserved->fWaitingForReconfigurationMessage + #define fTerminating reserved->fTerminating + #define fKnownCSWTagMismatchIssues reserved->fKnownCSWTagMismatchIssues + #define fPortSuspendResumeForPMEnabled reserved->fPortSuspendResumeForPMEnabled + #define fPortIsSuspended reserved->fPortIsSuspended + #define fRequiresResetOnResume reserved->fRequiresResetOnResume + #define fAutonomousSpinDownWorkAround reserved->fAutonomousSpinDownWorkAround + #define fConsecutiveResetCount reserved->fConsecutiveResetCount + #define fClearStallInProgress reserved->fClearStallInProgress + #define fTerminationDeferred reserved->fTerminationDeferred + + // Enumerated constants used to control various aspects of this + // driver. + + // Enumerations for Mass Storage Class Subclass types + enum + { + kUSBStorageRBCSubclass = 1, + kUSBStorageSFF8020iSubclass = 2, + kUSBStorageQIC157Subclass = 3, + kUSBStorageUFISubclass = 4, + kUSBStorageSFF8070iSubclass = 5, + kUSBStorageSCSITransparentSubclass = 6 + }; + + // The supported USB Mass Storage Class transport protocols. + enum + { + kProtocolControlBulkInterrupt = 0x00, + kProtocolControlBulk = 0x01, + kProtocolBulkOnly = 0x50 + }; + + // ------- Protocol support functions ------------ + // The SendSCSICommand function will take a SCSITask Object and transport + // it across the physical wire(s) to the device + virtual bool SendSCSICommand( + SCSITaskIdentifier request, + SCSIServiceResponse * serviceResponse, + SCSITaskStatus * taskStatus ); + + // The AbortSCSICommand function will abort the indicated SCSITask object, + // if it is possible and the SCSITask has not already completed. + virtual SCSIServiceResponse AbortSCSICommand( SCSITaskIdentifier abortTask ); + + virtual bool IsProtocolServiceSupported( + SCSIProtocolFeature feature, + void * serviceValue ); + + virtual bool HandleProtocolServiceFeature( + SCSIProtocolFeature feature, + void * serviceValue ); + + // Methods for retrieving and setting the object for the Interface + IOUSBInterface * GetInterfaceReference( void ); + void SetInterfaceReference( IOUSBInterface * newInterface ); + + UInt8 GetInterfaceSubclass( void ); + UInt8 GetInterfaceProtocol( void ); + + // Methods for retrieving an object for a Pipe. + IOUSBPipe * GetControlPipe( void ); + IOUSBPipe * GetBulkInPipe( void ); + IOUSBPipe * GetBulkOutPipe( void ); + IOUSBPipe * GetInterruptPipe( void ); + + // Methods for getting and setting the maximum LUN of a device. + UInt8 GetMaxLogicalUnitNumber( void ) const; + void SetMaxLogicalUnitNumber( UInt8 maxLUN ); + + virtual void CompleteSCSICommand( + SCSITaskIdentifier request, + IOReturn status ); + + virtual bool BeginProvidedServices( void ); + virtual bool EndProvidedServices( void ); + + // The Protocol specific helper methods for SendSCSICommand + virtual IOReturn SendSCSICommandForCBIProtocol( + SCSITaskIdentifier request ); + + virtual IOReturn SendSCSICommandForBulkOnlyProtocol( + SCSITaskIdentifier request ); + + // The Protocol specific helper methods for AbortSCSICommand + virtual IOReturn AbortSCSICommandForCBIProtocol( + SCSITaskIdentifier abortTask ); + + virtual IOReturn AbortSCSICommandForBulkOnlyProtocol( + SCSITaskIdentifier abortTask ); + + // Helper methods for performing general USB device requests + virtual IOReturn ClearFeatureEndpointStall( + IOUSBPipe * thePipe, + IOUSBCompletion * completion ); + virtual IOReturn GetStatusEndpointStatus( + IOUSBPipe * thePipe, + void * endpointStatus, + IOUSBCompletion * completion ); + + /* All CBI transport related methods. + */ + // All definitions and structures for the CBI Protocol + enum + { + kUSBStorageAutoStatusSize = 2 // Per the USB CBI Protocol + }; + + // Methods for accessing Bulk Only specific member variables. + CBIRequestBlock * GetCBIRequestBlock( void ); + + void ReleaseCBIRequestBlock( + CBIRequestBlock * cbiRequestBlock ); + + // Methods used for CBI/CB command transportation. + static void CBIProtocolUSBCompletionAction( + void * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining); + + IOReturn CBIProtocolTransferData( + CBIRequestBlock * cbiRequestBlock, + UInt32 nextExecutionState ); + + IOReturn CBIProtocolReadInterrupt( + CBIRequestBlock * cbiRequestBlock, + UInt32 nextExecutionState ); + + IOReturn CBIGetStatusEndpointStatus( + IOUSBPipe * targetPipe, + CBIRequestBlock * cbiRequestBlock, + UInt32 nextExecutionState ); + + IOReturn CBIClearFeatureEndpointStall( + IOUSBPipe * targetPipe, + CBIRequestBlock * cbiRequestBlock, + UInt32 nextExecutionState ); + + void CBIProtocolCommandCompletion( + CBIRequestBlock * cbiRequestBlock, + IOReturn resultingStatus, + UInt32 bufferSizeRemaining ); + + /* All Bulk Only transport related methods, structures and enums. + */ + // All Bulk Only specific structures and enums. + + // All definitions and structures for the Bulk Only Protocol + // Command Block Wrapper (CBW) + enum + { + // CBW general struture definitions + kCommandBlockWrapperSignature = OSSwapHostToBigConstInt32 ( 'USBC' ), + kByteCountOfCBW = 31, + + // CBW LUN related definitions + kCBWLUNMask = 0x0F, + + kCBWFlagsDataOut = 0x00, + kCBWFlagsDataIn = 0x80 + }; + + // All definitions and structures for the Bulk Only Protocol + // Command Status Wrapper (CSW) + enum + { + // CSW general struture definitions + kCommandStatusWrapperSignature = OSSwapHostToBigConstInt32 ( 'USBS' ), + kByteCountOfCSW = 13, + + // CSW status definitions + kCSWCommandPassedError = 0x00, // No error occurred + kCSWCommandFailedError = 0x01, /* An error occurred (probably a + * bad command or parameter ) */ + kCSWPhaseError = 0x02 /* A transfer was performed in + * the wrong sequence */ + }; + + // Methods for accessing Bulk Only specific member variables. + BulkOnlyRequestBlock * GetBulkOnlyRequestBlock( void ); + + void ReleaseBulkOnlyRequestBlock( + BulkOnlyRequestBlock * boRequestBlock ); + + UInt32 GetNextBulkOnlyCommandTag( void ); + + // Methods for Bulk Only specific utility commands + IOReturn BulkDeviceResetDevice( + BulkOnlyRequestBlock * boRequestBlock, + UInt32 nextExecutionState ); + + // Methods used for Bulk Only command transportation. + IOReturn BulkOnlySendCBWPacket( + BulkOnlyRequestBlock * boRequestBlock, + UInt32 nextExecutionState ); + + IOReturn BulkOnlyTransferData( + BulkOnlyRequestBlock * boRequestBlock, + UInt32 nextExecutionState ); + + IOReturn BulkOnlyReceiveCSWPacket( + BulkOnlyRequestBlock * boRequestBlock, + UInt32 nextExecutionState ); + + void BulkOnlyExecuteCommandCompletion ( + BulkOnlyRequestBlock * boRequestBlock, + IOReturn resultingStatus, + UInt32 bufferSizeRemaining ); + + static void BulkOnlyUSBCompletionAction ( + void * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining ); + +public: + + bool init( OSDictionary * propTable ); + virtual bool start( IOService * provider ); + virtual void stop( IOService * provider ); + virtual void free( void ); + virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); + + virtual bool willTerminate( IOService * provider, + IOOptionBits options ); + + virtual bool didTerminate( IOService * provider, + IOOptionBits options, + bool * defer ); + + virtual bool handleOpen( IOService * client, + IOOptionBits options, + void * arg ); + + virtual void handleClose( IOService * client, + IOOptionBits options ); + + virtual bool handleIsOpen( const IOService * client ) const; + + virtual IOReturn HandlePowerOn( void ); + +protected: + + static IOReturn sWaitForReset( void * refcon ); + IOReturn GatedWaitForReset( void ); + + static IOReturn sWaitForTaskAbort( void * refcon ); /* OBSOLETE */ + IOReturn GatedWaitForTaskAbort( void ); /* OBSOLETE */ + + static void sResetDevice( void * refcon ); + + static void sAbortCurrentSCSITask( void * refcon ); /* OBSOLETE */ + + OSMetaClassDeclareReservedUsed( IOUSBMassStorageClass, 1 ); + virtual IOReturn StartDeviceRecovery( void ); /* OBSOLETE */ + + OSMetaClassDeclareReservedUsed( IOUSBMassStorageClass, 2 ); + virtual void FinishDeviceRecovery( IOReturn status ); /* OBSOLETE */ + + static void DeviceRecoveryCompletionAction( + void * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining ); /* OBSOLETE */ + + void ResetDeviceNow( bool waitForReset ); + + void AbortCurrentSCSITask( void ); + + bool IsPhysicalInterconnectLocationInternal ( void ); + + IOReturn SuspendPort ( bool suspend ); + +private: + + void ClearPipeStall ( void ); + + IOReturn AcceptSCSITask ( SCSITaskIdentifier scsiTask, bool * pAccepted ); + + void CheckDeferredTermination ( void ); + + void GatedCompleteSCSICommand ( SCSITaskIdentifier request, SCSIServiceResponse * serviceResponse, SCSITaskStatus * taskStatus ); + + // Space reserved for future expansion. + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 3 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 4 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 5 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 6 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 7 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 8 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 9 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 10 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 11 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 12 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 13 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 14 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 15 ); + OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 16 ); + +}; + + +#endif _IOKIT_IOUSBMASSSTORAGECLASS_H diff --git a/i386/include/IOKit/usb/IOUSBMassStorageUFISubclass.h b/i386/include/IOKit/usb/IOUSBMassStorageUFISubclass.h new file mode 100644 index 0000000..cbfe3c8 --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBMassStorageUFISubclass.h @@ -0,0 +1,355 @@ +/* + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _IOKIT_IOUSBMASSSTORAGEUFISUBCLASS_H +#define _IOKIT_IOUSBMASSSTORAGEUFISUBCLASS_H + +// This class' header file +#include <IOKit/usb/IOUSBMassStorageClass.h> +#include <IOKit/scsi/IOSCSIPrimaryCommandsDevice.h> + + +#pragma mark - +#pragma mark IOUSBMassStorageUFIDevice declaration + +class IOUSBMassStorageUFIDevice : public IOSCSIPrimaryCommandsDevice +{ + OSDeclareDefaultStructors(IOUSBMassStorageUFIDevice) + +private: + static void AsyncReadWriteComplete( SCSITaskIdentifier completedTask ); + +protected: + // Reserve space for future expansion. + struct IOUSBMassStorageUFIDeviceExpansionData + { + }; + IOUSBMassStorageUFIDeviceExpansionData *fIOUSBMassStorageUFIDeviceReserved; + + // ---- Medium Characteristics ---- + bool fMediumPresent; + + // The byte count of each physical block on the medium. + UInt32 fMediumBlockSize; + + // The total number of blocks of fMediumBlockSize on the medium. + UInt32 fMediumBlockCount; + + // Whether the installed medium is protected from writes + bool fMediumIsWriteProtected; + + // Polling thread variables + thread_call_t fPollingThread; + UInt32 fPollingMode; + enum + { + kPollingMode_Suspended = 0, + kPollingMode_NewMedia = 1, + kPollingMode_MediaRemoval = 2 + }; + + // ---- Methods for controlling the current state of device support ---- + virtual bool InitializeDeviceSupport( void ); + virtual void StartDeviceSupport ( void ); + virtual void SuspendDeviceSupport( void ); + virtual void ResumeDeviceSupport( void ); + virtual void StopDeviceSupport ( void ); + virtual void TerminateDeviceSupport( void ); + + // ---- Methods used for misc ---- + virtual bool ClearNotReadyStatus( void ); + virtual void CreateStorageServiceNub( void ); + virtual bool DetermineDeviceCharacteristics( void ); + + // ---- Methods used for controlling the polling thread ---- + virtual void ProcessPoll( void ); + virtual void EnablePolling( void ); + virtual void DisablePolling( void ); + + // ---- Main and support methods for polling for new Media ---- + virtual void PollForNewMedia( void ); + virtual bool DetermineMediaPresence( void ); + virtual bool DetermineMediumCapacity( + UInt64 * blockSize, + UInt64 * blockCount ); + virtual bool DetermineMediumWriteProtectState( void ); + + // ---- Main and support methods for polling for Media removal ---- + virtual void PollForMediaRemoval( void ); + + // ---- Methods used for power managment ---- + virtual UInt32 GetInitialPowerState ( void ); + virtual void InitializePowerManagement ( IOService * provider ); + virtual void HandlePowerChange ( void ); + virtual void HandleCheckPowerState ( void ); + virtual void TicklePowerManager ( void ); + virtual UInt32 GetNumberOfPowerStateTransitions ( void ); + + // ---- Methods used for handling medium characteristics ---- + virtual void SetMediumCharacteristics( + UInt32 blockSize, + UInt32 blockCount ); + + virtual void ResetMediumCharacteristics( void ); + + virtual IOReturn IssueRead( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueRead( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + void * clientData ); + + + virtual IOReturn IssueWrite( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount ); + + virtual IOReturn IssueWrite( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + void * clientData ); + +public: + + static void sProcessPoll( void * pdtDriver, void * refCon ); + + // Interface to the UFI Storage Services Driver + // ---- Methods for controlling the device ---- + virtual IOReturn SyncReadWrite( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + UInt64 blockSize ); + + virtual IOReturn AsyncReadWrite( + IOMemoryDescriptor * buffer, + UInt64 startBlock, + UInt64 blockCount, + UInt64 blockSize, + void * clientData ); + + // ---- Methods for controlling medium state ---- + virtual IOReturn EjectTheMedium( void ); + + // ---- Methods for controlling media format ---- + virtual IOReturn FormatMedium( + UInt64 blockCount, + UInt64 blockSize ); + virtual UInt32 GetFormatCapacities( + UInt64 * capacities, + UInt32 capacitiesMaxCount ) const; + + // ---- Query methods to report device characteristics ---- + // Report the maximum number of blocks that the device can handle per + // read or write. A value of 0 (zero) indicates there is no limit aside + // from the size of the method's return parameter. + virtual UInt64 ReportDeviceMaxBlocksReadTransfer( void ); + virtual UInt64 ReportDeviceMaxBlocksWriteTransfer( void ); + + // ---- Query methods to report installed medium characteristics ---- + virtual UInt64 ReportMediumBlockSize( void ); + virtual UInt64 ReportMediumTotalBlockCount( void ); + virtual bool ReportMediumWriteProtection( void ); + + // Methods for getting device information strings + virtual char * GetVendorString( void ); + virtual char * GetProductString( void ); + virtual char * GetRevisionString( void ); + OSDictionary * GetProtocolCharacteristicsDictionary ( void ); + OSDictionary * GetDeviceCharacteristicsDictionary ( void ); + +protected: + // Utility methods used by all SCSI Command Set objects + + // isParameterValid methods are used to validate that the parameter passed into + // the command methods are of the correct value. + + // Validate Parameter used for 1 bit to 1 byte paramaters + bool IsParameterValid( + SCSICmdField1Byte param, + SCSICmdField1Byte mask ); + + // Validate Parameter used for 9 bit to 2 byte paramaters + bool IsParameterValid( + SCSICmdField2Byte param, + SCSICmdField2Byte mask ); + + // Validate Parameter used for 17 bit to 4 byte paramaters + bool IsParameterValid( + SCSICmdField4Byte param, + SCSICmdField4Byte mask ); + + // UFI Required Commands + virtual bool FORMAT_UNIT( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + IOByteCount defectListSize, + SCSICmdField1Byte TRACK_NUMBER, + SCSICmdField2Byte INTERLEAVE ); + + virtual bool INQUIRY( + SCSITaskIdentifier request, + IOMemoryDescriptor *dataBuffer, + SCSICmdField1Byte PAGE_OR_OPERATION_CODE, + SCSICmdField1Byte ALLOCATION_LENGTH ); + + virtual bool MODE_SELECT_10( + SCSITaskIdentifier request, + IOMemoryDescriptor *dataBuffer, + SCSICmdField1Bit PF, + SCSICmdField1Bit SP, + SCSICmdField2Byte PARAMETER_LIST_LENGTH ); + + virtual bool MODE_SENSE_10( + SCSITaskIdentifier request, + IOMemoryDescriptor *dataBuffer, + SCSICmdField1Bit DBD, + SCSICmdField2Bit PC, + SCSICmdField6Bit PAGE_CODE, + SCSICmdField2Byte PARAMETER_LIST_LENGTH ); + + virtual bool PREVENT_ALLOW_MEDIUM_REMOVAL( + SCSITaskIdentifier request, + SCSICmdField1Bit PREVENT ); + + virtual bool READ_10( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH ); + + virtual bool READ_12( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH ); + + virtual bool READ_CAPACITY( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField1Bit PMI ); + + virtual bool READ_FORMAT_CAPACITIES( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + SCSICmdField2Byte ALLOCATION_LENGTH ); + + virtual bool REQUEST_SENSE( + SCSITaskIdentifier request, + IOMemoryDescriptor *dataBuffer, + SCSICmdField1Byte ALLOCATION_LENGTH ); + + virtual bool REZERO_UNIT( + SCSITaskIdentifier request ); + + virtual bool SEEK( + SCSITaskIdentifier request, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS ); + + virtual bool SEND_DIAGNOSTICS( + SCSITaskIdentifier request, + SCSICmdField1Bit PF, + SCSICmdField1Bit SELF_TEST, + SCSICmdField1Bit DEF_OFL, + SCSICmdField1Bit UNIT_OFL ); + + virtual bool START_STOP_UNIT( + SCSITaskIdentifier request, + SCSICmdField1Bit IMMED, + SCSICmdField1Bit LOEJ, + SCSICmdField1Bit START ); + + virtual bool TEST_UNIT_READY( + SCSITaskIdentifier request ); + + virtual bool VERIFY( + SCSITaskIdentifier request, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYTCHK, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte VERIFICATION_LENGTH ); + + virtual bool WRITE_10( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit FUA, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH ); + + virtual bool WRITE_12( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit EBP, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField4Byte TRANSFER_LENGTH ); + + virtual bool WRITE_AND_VERIFY( + SCSITaskIdentifier request, + IOMemoryDescriptor * dataBuffer, + UInt32 blockSize, + SCSICmdField1Bit DPO, + SCSICmdField1Bit BYTCHK, + SCSICmdField1Bit RELADR, + SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, + SCSICmdField2Byte TRANSFER_LENGTH ); +}; + + +#pragma mark - +#pragma mark IOUSBMassStorageUFISubclass declaration + + +class IOUSBMassStorageUFISubclass : public IOUSBMassStorageClass +{ + OSDeclareDefaultStructors(IOUSBMassStorageUFISubclass) + +protected: + virtual bool BeginProvidedServices( void ); + virtual bool EndProvidedServices( void ); +}; + +#endif _IOKIT_IOUSBMASSSTORAGEUFISUBCLASS_H diff --git a/i386/include/IOKit/usb/IOUSBNub.h b/i386/include/IOKit/usb/IOUSBNub.h new file mode 100644 index 0000000..a998e5b --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBNub.h @@ -0,0 +1,69 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBNUB_H +#define _IOKIT_IOUSBNUB_H + +#include <IOKit/IOService.h> +#include <libkern/c++/OSData.h> +#include <IOKit/IOMemoryDescriptor.h> + +#include <IOKit/usb/USB.h> + +class IOUSBController; +class IOUSBPipe; + +/*! + @class IOUSBNub + @abstract Super class for for IOUSBDevice and IOUSBInterface. + */ +class IOUSBNub : public IOService +{ + OSDeclareDefaultStructors(IOUSBNub) + +public: + + // IOKit method + virtual void joinPMtree ( IOService * driver ); + + virtual bool USBCompareProperty(OSDictionary * matching, const char * key ); + + bool IsWildCardMatch( OSDictionary * matching, const char * key ); + bool USBComparePropertyWithMask( OSDictionary *matching, const char *key, const char * maskKey ); +}; + +#ifdef __cplusplus +extern "C" { +#endif + +void printDescriptor(const IOUSBDescriptorHeader *desc); +void printDeviceDescriptor(const IOUSBDeviceDescriptor *desc); +void printConfigDescriptor(const IOUSBConfigurationDescriptor *cd); +void printEndpointDescriptor(const IOUSBEndpointDescriptor *ed); +void printInterfaceDescriptor(const IOUSBInterfaceDescriptor *id); + +#ifdef __cplusplus +} +#endif + +#endif /* _IOKIT_IOUSBNUB_H */ diff --git a/i386/include/IOKit/usb/IOUSBPipe.h b/i386/include/IOKit/usb/IOUSBPipe.h new file mode 100644 index 0000000..3286b92 --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBPipe.h @@ -0,0 +1,387 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.2 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBPIPE_H +#define _IOKIT_IOUSBPIPE_H + +#include <IOKit/IOService.h> +#include <IOKit/IOMemoryDescriptor.h> + +#include <IOKit/usb/USB.h> +#include <IOKit/usb/IOUSBController.h> +#include <IOKit/usb/IOUSBControllerV2.h> + +class IOUSBInterface; + +/*! + @class IOUSBPipe + @abstract The object representing an open pipe for a device. +*/ +class IOUSBPipe : public OSObject +{ + friend class IOUSBInterface; + friend class IOUSBDevice; + + OSDeclareDefaultStructors(IOUSBPipe) + +protected: + + const IOUSBEndpointDescriptor * _descriptor; + IOUSBController::Endpoint _endpoint; // tidied up version of descriptor + IOUSBController * _controller; + USBDeviceAddress _address; + UInt8 _status; // was previously used for status. Now used to detect whether a property exists or not + + struct ExpansionData + { + IOReturn _correctStatus; + IOUSBDevice * _device; // Remember containing device for clearing TTs + UInt8 _speed; + IOUSBInterface * _interface; + bool _crossEndianCompatible; + UInt32 _locationID; + }; + ExpansionData * _expansionData; + + virtual void free(); + + IOReturn ClosePipe(void); + +public: + + virtual bool InitToEndpoint(const IOUSBEndpointDescriptor *endpoint, UInt8 speed, + USBDeviceAddress address, IOUSBController * controller); + + // The following 2 methods are obsolete + // + static IOUSBPipe *ToEndpoint(const IOUSBEndpointDescriptor *endpoint, UInt8 speed, + USBDeviceAddress address, IOUSBController * controller); + + static IOUSBPipe *ToEndpoint(const IOUSBEndpointDescriptor *endpoint, + IOUSBDevice * device, IOUSBController * controller); + + static IOUSBPipe *ToEndpoint(const IOUSBEndpointDescriptor *endpoint, + IOUSBDevice * device, IOUSBController * controller, IOUSBInterface *interface); + + // Controlling pipe state + /*! + @function GetStatus + This method does NOT work. Do not call it. See GetPipeStatus for the correct method. + GetStatus will always return 0. + */ + virtual UInt8 GetStatus(void); + /*! + @function Abort + This method causes all outstanding I/O on a pipe to complete with return code kIOReturnAborted. It clears the halted bit but does NOT clear the + toggle bit on the endpoint in the controller. If you wish to clear the toggle bit, see ClearPipeStall + */ + virtual IOReturn Abort(void); + /*! + @function Reset + This method is identical to ClearPipeStall(false). The use of that API is preferred. + */ + virtual IOReturn Reset(void); + /*! + @function ClearStall + This method is equivalent to ClearPipeStall(false). This method is available before version 1.9. + */ + virtual IOReturn ClearStall(void); + + // + // Transferring Data + // + + // deprecated + virtual IOReturn Read(IOMemoryDescriptor * buffer, + IOUSBCompletion * completion = 0, + IOByteCount * bytesRead = 0); + + // deprecated + virtual IOReturn Write(IOMemoryDescriptor * buffer, + IOUSBCompletion * completion = 0); + + // Transfer data over Isochronous pipes + /*! + @function Read + Read from an isochronous endpoint + @param buffer place to put the transferred data + @param frameStart USB frame number of the frame to start transfer + @param numFrames Number of frames to transfer + @param frameList Bytes to transfer and result for each frame + @param completion describes action to take when buffer has been filled + */ + virtual IOReturn Read(IOMemoryDescriptor * buffer, + UInt64 frameStart, UInt32 numFrames, IOUSBIsocFrame *frameList, + IOUSBIsocCompletion * completion = 0); + /*! + @function Write + Write to an isochronous endpoint + @param buffer place to get the transferred data + @param frameStart USB frame number of the frame to start transfer + @param numFrames Number of frames to transfer + @param frameList Bytes to transfer and result for each frame + @param completion describes action to take when buffer has been emptied + */ + virtual IOReturn Write(IOMemoryDescriptor * buffer, + UInt64 frameStart, UInt32 numFrames, IOUSBIsocFrame *frameList, + IOUSBIsocCompletion * completion = 0); + + // Do a control request over a Control pipe, using a memory descriptor + /*! + @function ControlRequest + Make a control request + There are two versions of this method, one uses a simple void * + to point to the data portion of the transfer, the other uses an + IOMemoryDescriptor to point to the data. + @param request parameter block for the control request + @param completion describes action to take when the request has been executed + */ + virtual IOReturn ControlRequest(IOUSBDevRequestDesc *request, + IOUSBCompletion *completion = 0); + + // Do a control request over a Control pipe, using a simple buffer + virtual IOReturn ControlRequest(IOUSBDevRequest *request, + IOUSBCompletion *completion = 0); + + /* + * Accessors + */ + /*! + @function GetEndpoint + returns a pointer to the Endpoint structure for the pipe. + */ + virtual const IOUSBController::Endpoint * GetEndpoint(); + /*! + @function GetEndpointDescriptor + returns the endpoint descriptor for the pipe. + */ + virtual const IOUSBEndpointDescriptor * GetEndpointDescriptor(); + /*! + @function GetDirection + returns the direction of the pipe:kUSBOut/kUSBIn for a bulk or interrupt pipe, + kUSBAnyDirn for a control pipe. + */ + virtual UInt8 GetDirection(); + /*! + @function GetType + returns the pipe type: kUSBControl, kUSBBulk or kUSBInterrupt. + */ + virtual UInt8 GetType(); + /*! + @function GetEndpointNumber + returns the endpoint number in the device that the pipe is connected to. + */ + virtual UInt8 GetEndpointNumber(); + virtual USBDeviceAddress GetAddress(); + virtual UInt16 GetMaxPacketSize(); + virtual UInt8 GetInterval(); + + // Transfer data over Bulk pipes with timeouts. + OSMetaClassDeclareReservedUsed(IOUSBPipe, 0); + + // deprecated + virtual IOReturn Read(IOMemoryDescriptor * buffer, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOUSBCompletion * completion = 0, + IOByteCount * bytesRead = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 1); + + // deprecated + virtual IOReturn Write(IOMemoryDescriptor * buffer, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOUSBCompletion * completion = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 2); + // Do a control request over a Control pipe, using a memory descriptor + /*! + @function ControlRequest + Make a control request. + There are two versions of this method, one uses a simple void * + to point to the data portion of the transfer, the other uses an + IOMemoryDescriptor to point to the data. + @param request parameter block for the control request + @param noDataTimeout Specifies an amount of time (in ms) after which the command will be aborted + if no data has been transferred on the bus. + @param completionTimeout Specifies an amount of time (in ms) after which the command will be aborted if the entire command has + not been completed. + @param completion describes action to take when the request has been executed + */ + virtual IOReturn ControlRequest(IOUSBDevRequestDesc *request, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOUSBCompletion *completion = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 3); + // Do a control request over a Control pipe, using a simple buffer + virtual IOReturn ControlRequest(IOUSBDevRequest *request, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOUSBCompletion *completion = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 4); + /*! + @function Read + Read from an interrupt or bulk endpoint + @param buffer place to put the transferred data + @param noDataTimeout number of milliseconds of no bus activity until transaction times out. Note that if a tranasction times out + the driver software may have to resynchronize the data toggle. See ClearPipeStall. + @param completionTimeout number of milliseconds from the time the transaction is placed on the bus until it times out + @param reqCount requested number of bytes to transfer. must be <= buffer->getLength() + @param completion describes action to take when buffer has been filled + @param bytesRead returns total bytes read for synchronous reads + */ + virtual IOReturn Read(IOMemoryDescriptor * buffer, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOByteCount reqCount, + IOUSBCompletion * completion = 0, + IOByteCount * bytesRead = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 5); + /*! + @function Write + Write to an interrupt or bulk endpoint + @param buffer place to get the transferred data + @param noDataTimeout number of milliseconds of no bus activity until transaction times out. Note that if a tranasction times out + the driver software may have to resynchronize the data toggle. See ClearPipeStall. + @param completionTimeout number of milliseconds from the time the transaction is placed on the bus until it times out + @param reqCount requested number of bytes to transfer. must be <= buffer->getLength() + @param completion describes action to take when buffer has been emptied + */ + virtual IOReturn Write(IOMemoryDescriptor * buffer, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOByteCount reqCount, + IOUSBCompletion * completion = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 6); + /*! + @function GetPipeStatus + Returns the status of the pipe (kIOUSBPipeStalled of the pipe is stalled, else kIOReturnSuccess) + */ + virtual IOReturn GetPipeStatus(void); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 7); + /*! + @function ClearPipeStall + AVAILABLE ONLY IN VERSION 1.9 AND ABOVE + This method causes all outstanding I/O on a pipe to complete with return code kIOUSBTransactionReturned. It also clears both the halted bit and the + toggle bit on the endpoint in the controller. The driver may need to reset the data toggle within the device to avoid losing any data. If the + device correctly handles the ClearFeature(ENDPOINT_HALT) device request, then this API will handle that by sending the correct request to the + device. + @param withDeviceRequest if true, a ClearFeature(ENDPOINT_HALT) is sent to the appropriate endpoint on the device after the transactions on the + controllers endpoint are returned and the toggle bit on the controllers endpoint is cleared. if this parameter is false, then this is equivalent + to the pre-1.9 API. This means that the endpoint on the controller is cleared, but no DeviceRequest is sent to the device's endpoint. + */ + virtual IOReturn ClearPipeStall(bool withDeviceRequest); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 8); + /*! + @function SetPipePolicy + AVAILABLE ONLY IN VERSION 1.9 AND ABOVE + This method allows a driver to change the maxPacketSize of an Isochronous pipe, or the polling interval for an interrupt pipe. There is a limited + amount of bandwidth on any single bus, and isochronous pipes tend to use much of this bandwidth. The driver may know, however, that there + will never be as much bandwidth used as is specified in the pipe's endpoint descriptor. Therefore, the driver may return some of this + bandwidth to the system by using this method. Additionally, if on an open of an IOUSBInterface any of the Isochronous pipes is unable to be + opened because of a lack of bandwidth, the pipe will be created with a bandwidth of zero, and the driver may get some of the limited bandwidth + remaining by using this call. + This method returns kIOReturnBadArgument if the pipe is a bulk on control pipe, or if the maxPacketSize parameter is larger than the amount specified + in the endpoint descriptor. It returns kIOReturnNoBandwidth if the bandwidth requested cannot be allocated. Otherwise it returns kIOReturnSuccess. + @param maxPacketSize specifies the maximum number of bytes to be used in any one millisecond frame by this pipe. The value must be less than or + equal to the maxPacketSize specified in the endpoint descriptor. + @param maxInterval not currently used. reserved for future expansion + + */ + virtual IOReturn SetPipePolicy(UInt16 maxPacketSize, UInt8 maxInterval); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 9); + + // Transfer data over Isochronous pipes and process the frame list at hardware interrupt time + /*! + @function Read + AVAILABLE ONLY IN VERSION 1.9.2 AND ABOVE + Read from an isochronous endpoint and process the IOUSBLowLatencyIsocFrame fields at + hardware interrupt time + @param buffer place to put the transferred data + @param frameStart USB frame number of the frame to start transfer + @param numFrames Number of frames to transfer + @param frameList Bytes to transfer, result, and time stamp for each frame + @param completion describes action to take when buffer has been filled + @param updateFrequency describes how often (in milliseconds) should the frame list be processed + */ + virtual IOReturn Read(IOMemoryDescriptor * buffer, + UInt64 frameStart, UInt32 numFrames, IOUSBLowLatencyIsocFrame *frameList, + IOUSBLowLatencyIsocCompletion * completion = 0, UInt32 updateFrequency = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 10); + /*! + @function Write + AVAILABLE ONLY IN VERSION 1.9.2 AND ABOVE + Write to an isochronous endpoint + @param buffer place to get the data to transfer + @param frameStart USB frame number of the frame to start transfer + @param numFrames Number of frames to transfer + @param frameList Pointer to list of frames indicating bytes to transfer and result for each frame + @param completion describes action to take when buffer has been emptied + @param updateFrequency describes how often (in milliseconds) should the frame list be processed + */ + virtual IOReturn Write(IOMemoryDescriptor * buffer, + UInt64 frameStart, UInt32 numFrames, IOUSBLowLatencyIsocFrame *frameList, + IOUSBLowLatencyIsocCompletion * completion = 0, UInt32 updateFrequency = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 11); + /*! + @function Read + Read from an interrupt or bulk endpoint + @param buffer place to put the transferred data + @param noDataTimeout number of milliseconds of no bus activity until transaction times out. Note that if a tranasction times out + the driver software may have to resynchronize the data toggle. See ClearPipeStall. + @param completionTimeout number of milliseconds from the time the transaction is placed on the bus until it times out + @param reqCount requested number of bytes to transfer. must be <= buffer->getLength() + @param completion describes action to take when buffer has been filled + @param bytesRead returns total bytes read for synchronous reads + */ + virtual IOReturn Read(IOMemoryDescriptor * buffer, + UInt32 noDataTimeout, + UInt32 completionTimeout, + IOByteCount reqCount, + IOUSBCompletionWithTimeStamp * completion = 0, + IOByteCount * bytesRead = 0); + + OSMetaClassDeclareReservedUsed(IOUSBPipe, 12); + virtual bool InitToEndpoint(const IOUSBEndpointDescriptor *endpoint, UInt8 speed, + USBDeviceAddress address, IOUSBController * controller, IOUSBDevice * device, IOUSBInterface * interface); + + OSMetaClassDeclareReservedUnused(IOUSBPipe, 13); + OSMetaClassDeclareReservedUnused(IOUSBPipe, 14); + OSMetaClassDeclareReservedUnused(IOUSBPipe, 15); + OSMetaClassDeclareReservedUnused(IOUSBPipe, 16); + OSMetaClassDeclareReservedUnused(IOUSBPipe, 17); + OSMetaClassDeclareReservedUnused(IOUSBPipe, 18); + OSMetaClassDeclareReservedUnused(IOUSBPipe, 19); + +}; + +#endif /* _IOKIT_IOUSBPIPE_H */ diff --git a/i386/include/IOKit/usb/IOUSBRootHubDevice.h b/i386/include/IOKit/usb/IOUSBRootHubDevice.h new file mode 100644 index 0000000..19a17c4 --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBRootHubDevice.h @@ -0,0 +1,97 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBROOTHUBDEVICE_H +#define _IOKIT_IOUSBROOTHUBDEVICE_H + +#include <IOKit/usb/IOUSBHubDevice.h> + +/*! + @class IOUSBRootHubDevice + @abstract The object representing the Root Hub simulation. + */ +class IOUSBRootHubDevice : public IOUSBHubDevice +{ + OSDeclareDefaultStructors(IOUSBRootHubDevice) + +private: + UInt16 configuration; + IOCommandGate *_commandGate; + + // private method which overrides the same method in IOUSBHubDevice + virtual bool InitializeCharacteristics(void); // used at start + + struct ExpansionData + { + IOService * _IOResourcesEntry; + }; + ExpansionData *_expansionData; + +public: + // static methods + static IOUSBRootHubDevice *NewRootHubDevice(void); + static IOReturn GatedDeviceRequest (OSObject * owner, + void * arg0, + void * arg1, + void * arg2, + void * arg3 ); + + // IOKit methods + virtual bool init(); + virtual bool start( IOService * provider ); + virtual void stop( IOService *provider ); + virtual void free(); + + // IOUSBHubDevice methods + virtual bool IsRootHub(void); + virtual UInt32 RequestExtraPower(UInt32 requestedPower); + virtual void ReturnExtraPower(UInt32 returnedPower); + + // + virtual UInt32 RequestSleepPower(UInt32 requestedPower); + virtual void ReturnSleepPower(UInt32 returnedPower); + + // a non static but non-virtual function + IOReturn DeviceRequestWorker(IOUSBDevRequest *request, UInt32 noDataTimeout, UInt32 completionTimeout, IOUSBCompletion *completion); + + // IOUSBDevice methods overriden here + virtual IOReturn DeviceRequest(IOUSBDevRequest *request, IOUSBCompletion *completion = 0); + virtual IOReturn DeviceRequest(IOUSBDevRequest *request, UInt32 noDataTimeout, UInt32 completionTimeout, IOUSBCompletion *completion = 0); + + OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 0); + virtual IOReturn GetDeviceInformation(UInt32 *info); + + OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 1); + virtual void InitializeExtraPower(UInt32 maxPortCurrent, UInt32 totalExtraCurrent); + + OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 2); + virtual void SetSleepCurrent(UInt32 sleepCurrent); + + OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 3); + virtual UInt32 GetSleepCurrent(); + + OSMetaClassDeclareReservedUnused(IOUSBRootHubDevice, 4); +}; + +#endif /* _IOKIT_IOUSBROOTHUBDEVICE_H */ + diff --git a/i386/include/IOKit/usb/IOUSBUserClient.h b/i386/include/IOKit/usb/IOUSBUserClient.h new file mode 100644 index 0000000..1cd47a8 --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBUserClient.h @@ -0,0 +1,144 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBUSERCLIENT_H +#define _IOKIT_IOUSBUSERCLIENT_H + +// these are the new User Client method names +enum { + kUSBDeviceUserClientOpen, + kUSBDeviceUserClientClose, + kUSBDeviceUserClientSetConfig, + kUSBDeviceUserClientGetConfig, + kUSBDeviceUserClientGetConfigDescriptor, + kUSBDeviceUserClientGetFrameNumber, + kUSBDeviceUserClientDeviceRequestOut, + kUSBDeviceUserClientDeviceRequestIn, + kUSBDeviceUserClientCreateInterfaceIterator, + kUSBDeviceUserClientResetDevice, + kUSBDeviceUserClientSuspend, + kUSBDeviceUserClientAbortPipeZero, + kUSBDeviceUserClientReEnumerateDevice, + kUSBDeviceUserClientGetMicroFrameNumber, + kUSBDeviceUserClientGetFrameNumberWithTime, + kUSBDeviceUserClientSetAsyncPort, + kUSBDeviceUserClientGetDeviceInformation, + kUSBDeviceUserClientRequestExtraPower, + kUSBDeviceUserClientReturnExtraPower, + kUSBDeviceUserClientGetExtraPowerAllocated, + kIOUSBLibDeviceUserClientNumCommands + }; + +enum { + kUSBInterfaceUserClientOpen, + kUSBInterfaceUserClientClose, + kUSBInterfaceUserClientGetDevice, + kUSBInterfaceUserClientSetAlternateInterface, + kUSBInterfaceUserClientGetFrameNumber, + kUSBInterfaceUserClientGetPipeProperties, + kUSBInterfaceUserClientReadPipe, + kUSBInterfaceUserClientWritePipe, + kUSBInterfaceUserClientGetPipeStatus, + kUSBInterfaceUserClientAbortPipe, + kUSBInterfaceUserClientResetPipe, + kUSBInterfaceUserClientClearPipeStall, + kUSBInterfaceUserClientControlRequestOut, + kUSBInterfaceUserClientControlRequestIn, + kUSBInterfaceUserClientSetPipePolicy, + kUSBInterfaceUserClientGetBandwidthAvailable, + kUSBInterfaceUserClientGetEndpointProperties, + kUSBInterfaceUserClientLowLatencyPrepareBuffer, + kUSBInterfaceUserClientLowLatencyReleaseBuffer, + kUSBInterfaceUserClientGetMicroFrameNumber, + kUSBInterfaceUserClientGetFrameListTime, + kUSBInterfaceUserClientGetFrameNumberWithTime, + kUSBInterfaceUserClientSetAsyncPort, + kUSBInterfaceUserClientReadIsochPipe, + kUSBInterfaceUserClientWriteIsochPipe, + kUSBInterfaceUserClientLowLatencyReadIsochPipe, + kUSBInterfaceUserClientLowLatencyWriteIsochPipe, + kUSBInterfaceUserClientGetConfigDescriptor, + kIOUSBLibInterfaceUserClientNumCommands + }; + + +#if KERNEL +#include <IOKit/IOService.h> +#include <IOKit/IOUserClient.h> +#include <IOKit/usb/USB.h> + +//================================================================================================ +// +// Structure declarations +// +//================================================================================================ +// +typedef struct IOUSBUserClientAsyncParamBlock IOUSBUserClientAsyncParamBlock; + +struct IOUSBUserClientAsyncParamBlock +{ + OSAsyncReference64 fAsyncRef; + uint32_t fAsyncCount; + uint32_t fMax; + IOMemoryDescriptor * fMem; + IOUSBDevRequestDesc req; +}; + +typedef struct IOUSBInterfaceUserClientISOAsyncParamBlock IOUSBInterfaceUserClientISOAsyncParamBlock; +struct IOUSBInterfaceUserClientISOAsyncParamBlock +{ + OSAsyncReference64 fAsyncRef; + uint32_t fAsyncCount; + mach_vm_size_t frameLen; // In bytes + mach_vm_address_t frameBase; // In user task + IOMemoryDescriptor * dataMem; + IOMemoryDescriptor * countMem; + uint64_t numFrames; + IOUSBIsocFrame frames[0]; // Must be the last one +}; + + +//================================================================================================ +// +// This class is used to add an IOProviderMergeProperties dictionary entry to a provider's +// property list, thus providing a tie between hardware and a CFBundle at hardware +// load time. This property usually contains the user client class name and the CFPlugInTypes UUID's +// but it can contain other properties. +// +//================================================================================================ +// +class IOUSBUserClientInit : public IOService +{ + OSDeclareDefaultStructors(IOUSBUserClientInit); + +public: + + virtual bool start(IOService * provider) ; + virtual bool MergeDictionaryIntoProvider(IOService * provider, OSDictionary * mergeDict); + virtual bool MergeDictionaryIntoDictionary(OSDictionary * sourceDictionary, OSDictionary * targetDictionary); +}; + +#endif // KERNEL + +#endif /* ! _IOKIT_IOUSBUSERCLIENT_H */ + diff --git a/i386/include/IOKit/usb/IOUSBWorkLoop.h b/i386/include/IOKit/usb/IOUSBWorkLoop.h new file mode 100644 index 0000000..7630704 --- /dev/null +++ b/i386/include/IOKit/usb/IOUSBWorkLoop.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2001-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IOKIT_IOUSBWORKLOOP_H +#define _IOKIT_IOUSBWORKLOOP_H + +#include <IOKit/IOWorkLoop.h> + +/*! + @class IOUSBWorkLoop + @abstract Subclass of IOWorkloop that allows the USB stack to more finely control sleep and wake. + */ +class IOUSBWorkLoop : public IOWorkLoop +{ + OSDeclareDefaultStructors(IOUSBWorkLoop) + +protected: + void * fSleepToken; +#ifndef __OPEN_SOURCE__ + lck_grp_t * fLockGroup; +#endif + bool init ( const char * controllerLocation ); + void free ( void ); + + // Overrides to check for sleeping + virtual void closeGate(); + virtual bool tryCloseGate(); + +public: + // Create a workloop + static IOUSBWorkLoop * workLoop(const char * controllerLocation); + + // Put workloop to sleep (Must have gate closed, opens gate if successful) + virtual IOReturn sleep(void *token); + + // Wake workloop up (closes gate if successful) + virtual IOReturn wake(void *token); + + void CloseGate(void); + void OpenGate(void); +}; + +#endif /* ! _IOKIT_IOUSBWORKLOOP_H */ + diff --git a/i386/include/IOKit/usb/USB.h b/i386/include/IOKit/usb/USB.h new file mode 100644 index 0000000..8ba12bb --- /dev/null +++ b/i386/include/IOKit/usb/USB.h @@ -0,0 +1,1076 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _USB_H +#define _USB_H + +#if KERNEL + #include <libkern/OSByteOrder.h> + #include <IOKit/IOMemoryDescriptor.h> +#else + #include <libkern/OSByteOrder.h> +#endif + +#include <IOKit/IOTypes.h> + +#if !defined(__USB__) +# include <IOKit/usb/USBSpec.h> +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + /*! + @header USB.h + @abstract Public Interfaces to the USB implementation in Mac OS X. + @discussion This header file contains definitions and structures that are used in the different USB API's in Mac OS X, both in the kernel and in the user space. + */ + + /*! + @defined Endian conversion definitions + @discussion The USB API's use a convention of specifying parameters in the host order. The USB spec specifies that multi-byte items should be + formatted in little endian order. The following macros allow one to translate multi-byte values from Host order to USB order and vice versa. There are separate macros for + in-kernel use and for user space use. + */ +#define USBToHostWord OSSwapLittleToHostInt16 +#define HostToUSBWord OSSwapHostToLittleInt16 +#define USBToHostLong OSSwapLittleToHostInt32 +#define HostToUSBLong OSSwapHostToLittleInt32 + + /*! + @enum Miscellaneous Constants + @discussion + */ + enum { + kUSBDeviceIDShift = 7, + kUSBMaxDevices = 128, + kUSBMaxDevice = kUSBMaxDevices-1, + kUSBDeviceIDMask = 0x7f, + + kUSBPipeIDMask = 0xf, + kUSBMaxPipes = 32, // In and Out pipes can have same pipe number. + + kUSBInterfaceIDShift = 8, + kUSBMaxInterfaces = 1 << kUSBInterfaceIDShift, + kUSBInterfaceIDMask = kUSBMaxInterfaces-1, + + kUSBEndPtShift = 7, + kUSBDeviceMask = ((1 << kUSBEndPtShift) -1), + + kUSBNoPipeIdx = -1 +}; + +/*! +@enum bRequest Shifts and Masks +@discussion These are used to create the macro to encode the bRequest filed of a Device Request +*/ +enum { + kUSBRqDirnShift = 7, + kUSBRqDirnMask = 1, + + kUSBRqTypeShift = 5, + kUSBRqTypeMask = 3, + + kUSBRqRecipientMask = 0X1F +}; + +/*! +@defined USBmakebmRequestType +@discussion Macro to encode the bRequest field of a Device Request. It is used when constructing an IOUSBDevRequest. +*/ +#define USBmakebmRequestType(direction, type, recipient) \ + ((direction & kUSBRqDirnMask) << kUSBRqDirnShift) | \ + ((type & kUSBRqTypeMask) << kUSBRqTypeShift) | \ + (recipient & kUSBRqRecipientMask) + +/*! +@enum kUSBMaxIsocFrameReqCount +@discussion Maximum size in bytes allowed for one Isochronous frame +*/ +enum { + kUSBMaxFSIsocEndpointReqCount = 1023, // max size (bytes) of any one Isoc frame for 1 FS endpoint + kUSBMaxHSIsocEndpointReqCount = 3072, // max size (bytes) of any one Isoc frame for 1 HS endpoint + kUSBMaxHSIsocFrameCount = 7168 // max size (bytes) of all Isoc transfers in a HS frame +}; + +/*! +@defined EncodeRequest +@discussion Macro that encodes the bRequest and bRequestType fields of a IOUSBDevRequest into a single value. It is useful when one needs +to know what type of request the IOUSBDevRequest encodes and simplifies comparisons. +*/ +#define EncodeRequest(request, direction, type, recipient) \ + (((UInt16)request << 8) + \ + ((UInt16)recipient + \ + ((UInt16)type << kUSBRqTypeShift) + \ + ((UInt16)direction << kUSBRqDirnShift))) + + +/*! +@enum Standard Device Requests +@discussion Encoding of the standard device requests. +<tt> +<pre><b> +bmRequestType bRequest wValue wIndex wLength Data</b> +00000000B CLEAR_FEATURE Feature Zero Zero None (device) +00000001B Feature Interface Zero None (Interface) +00000010B Feature Endpoint Zero None (Endpoint) + +10000000B GET_CONFIGURATION Zero Zero One Configuration +10000000B GET_DESCRIPTOR Type LangID Length Descriptor +10000001B GET_INTERFACE Zero Interface One Alternate + +10000000B GET_STATUS Zero Zero Two status (device) +10000001B Zero Interface Two status (Interface) +10000010B Zero Endpoint Two status (Endpoint) + +00000000B SET_ADDRESS Address Zero Zero None +00000000B SET_CONFIGURATION Configuration Zero Zero None +00000000B SET_DESCRIPTOR Type LangID Length Descriptor + +00000000B SET_FEATURE Feature Zero Zero None (device) +00000001B Feature Interface Zero None (Interface) +00000010B Feature Endpoint Zero None (Endpoint) + +00000001B SET_INTERFACE Alternate Interface Zero None +10000010B SYNCH_FRAME Zero Endpoint Two Frame Number +</pre> +</tt> +*/ +enum { + kClearDeviceFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBStandard, kUSBDevice), + kClearInterfaceFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBStandard, kUSBInterface), + kClearEndpointFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBStandard, kUSBEndpoint), + kGetConfiguration = EncodeRequest(kUSBRqGetConfig, kUSBIn, kUSBStandard, kUSBDevice), + kGetDescriptor = EncodeRequest(kUSBRqGetDescriptor, kUSBIn, kUSBStandard, kUSBDevice), + kGetInterface = EncodeRequest(kUSBRqGetInterface, kUSBIn, kUSBStandard, kUSBInterface), + kGetDeviceStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBStandard, kUSBDevice), + kGetInterfaceStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBStandard, kUSBInterface), + kGetEndpointStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBStandard, kUSBEndpoint), + kSetAddress = EncodeRequest(kUSBRqSetAddress, kUSBOut, kUSBStandard, kUSBDevice), + kSetConfiguration = EncodeRequest(kUSBRqSetConfig, kUSBOut, kUSBStandard, kUSBDevice), + kSetDescriptor = EncodeRequest(kUSBRqSetDescriptor, kUSBOut, kUSBStandard, kUSBDevice), + kSetDeviceFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBStandard, kUSBDevice), + kSetInterfaceFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBStandard, kUSBInterface), + kSetEndpointFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBStandard, kUSBEndpoint), + kSetInterface = EncodeRequest(kUSBRqSetInterface, kUSBOut, kUSBStandard, kUSBInterface), + kSyncFrame = EncodeRequest(kUSBRqSyncFrame, kUSBIn, kUSBStandard, kUSBEndpoint), +}; + +/*! +@defined kCallInterfaceOpenWithGate + @discussion If the USB Device has this property, drivers for any of its interfaces will have their handleOpen method called while holding the workloop gate. + */ +#define kCallInterfaceOpenWithGate "kCallInterfaceOpenWithGate" + +// TYPES + +typedef UInt16 USBDeviceAddress; + +typedef uint32_t USBPhysicalAddress32; + +/*! + @typedef IOUSBIsocFrame + @discussion Structure used to encode information about each isoc frame. + @param frStatus Returns status associated with the frame. + @param frReqCount Input specifiying how many bytes to read or write. + @param frActCount Actual # of bytes transferred. +*/ +typedef struct IOUSBIsocFrame { + IOReturn frStatus; + UInt16 frReqCount; + UInt16 frActCount; +} IOUSBIsocFrame; + + +/*! + @typedef IOUSBLowLatencyIsocFrame + @discussion Structure used to encode information about each isoc frame that is processed + at hardware interrupt time (low latency). + @param frStatus Returns status associated with the frame. + @param frReqCount Input specifiying how many bytes to read or write. + @param frActCount Actual # of bytes transferred. + @param frTimeStamp Time stamp that indicates time when frame was procesed. +*/ +struct IOUSBLowLatencyIsocFrame { + IOReturn frStatus; + UInt16 frReqCount; + UInt16 frActCount; + AbsoluteTime frTimeStamp; +}; +typedef struct IOUSBLowLatencyIsocFrame IOUSBLowLatencyIsocFrame; + +/*! +@typedef IOUSBCompletionAction + @discussion Function called when USB I/O completes. + @param target The target specified in the IOUSBCompletion struct. + @param parameter The parameter specified in the IOUSBCompletion struct. + @param status Completion status. + @param bufferSizeRemaining Bytes left to be transferred. + */ +typedef void (*IOUSBCompletionAction)( + void * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining); + +/*! +@typedef IOUSBCompletionActionWithTimeStamp + @discussion Function called when USB I/O completes. + @param target The target specified in the IOUSBCompletion struct. + @param parameter The parameter specified in the IOUSBCompletion struct. + @param status Completion status. + @param bufferSizeRemaining Bytes left to be transferred. + @param timeStamp Time at which the transaction was processed. + */ +typedef void (*IOUSBCompletionActionWithTimeStamp)( + void * target, + void * parameter, + IOReturn status, + UInt32 bufferSizeRemaining, + AbsoluteTime timeStamp); + +/*! + @typedef IOUSBIsocCompletionAction + @discussion Function called when Isochronous USB I/O completes. + @param target The target specified in the IOUSBIsocCompletionn struct. + @param parameter The parameter specified in the IOUSBIsocCompletion struct. + @param status Completion status. + @param pFrames Pointer to the frame list containing the status for each frame transferred. +*/ +typedef void (*IOUSBIsocCompletionAction)( + void * target, + void * parameter, + IOReturn status, + IOUSBIsocFrame *pFrames); + +/*! + @typedef IOUSBLowLatencyIsocCompletionAction + @discussion Function called when Low Latency Isochronous USB I/O completes. + @param target The target specified in the IOUSBLowLatencyIsocCompletion struct. + @param parameter The parameter specified in the IOUSBLowLatencyIsocCompletion struct. + @param status Completion status. + @param pFrames Pointer to the low latency frame list containing the status for each frame transferred. +*/ +typedef void (*IOUSBLowLatencyIsocCompletionAction)( + void * target, + void * parameter, + IOReturn status, + IOUSBLowLatencyIsocFrame *pFrames); + +/*! +@typedef IOUSBCompletion + @discussion Struct specifying action to perform when a USB I/O completes. + @param target The target to pass to the action function. + @param action The function to call. + @param parameter The parameter to pass to the action function. + */ +typedef struct IOUSBCompletion { + void * target; + IOUSBCompletionAction action; + void * parameter; +} IOUSBCompletion; + +/*! +@typedef IOUSBCompletionWithTimeStamp + @discussion Struct specifying action to perform when a USB I/O completes. + @param target The target to pass to the action function. + @param action The function to call. + @param parameter The parameter to pass to the action function. + */ +typedef struct IOUSBCompletionWithTimeStamp { + void * target; + IOUSBCompletionActionWithTimeStamp action; + void * parameter; +} IOUSBCompletionWithTimeStamp; + +/*! + @typedef IOUSBIsocCompletion + @discussion Struct specifying action to perform when an Isochronous USB I/O completes. + @param target The target to pass to the action function. + @param action The function to call. + @param parameter The parameter to pass to the action function. +*/ +typedef struct IOUSBIsocCompletion { + void * target; + IOUSBIsocCompletionAction action; + void * parameter; +} IOUSBIsocCompletion; + +/*! + @typedef IOUSBLowLatencyIsocCompletion + @discussion Struct specifying action to perform when an Low Latency Isochronous USB I/O completes. + @param target The target to pass to the action function. + @param action The function to call. + @param parameter The parameter to pass to the action function. +*/ +typedef struct IOUSBLowLatencyIsocCompletion { + void * target; + IOUSBLowLatencyIsocCompletionAction action; + void * parameter; +} IOUSBLowLatencyIsocCompletion; + + +/*! +@defined IOUSBFamily error codes +@discussion Errors specific to the IOUSBFamily. Note that the iokit_usb_err(x) translates to 0xe0004xxx, where xxx is the value in parenthesis as a hex number. +*/ +#define iokit_usb_err(return) (sys_iokit|sub_iokit_usb|return) +#define kIOUSBUnknownPipeErr iokit_usb_err(0x61) // 0xe0004061 Pipe ref not recognized +#define kIOUSBTooManyPipesErr iokit_usb_err(0x60) // 0xe0004060 Too many pipes +#define kIOUSBNoAsyncPortErr iokit_usb_err(0x5f) // 0xe000405f no async port +#define kIOUSBNotEnoughPipesErr iokit_usb_err(0x5e) // 0xe000405e not enough pipes in interface +#define kIOUSBNotEnoughPowerErr iokit_usb_err(0x5d) // 0xe000405d not enough power for selected configuration +#define kIOUSBEndpointNotFound iokit_usb_err(0x57) // 0xe0004057 Endpoint Not found +#define kIOUSBConfigNotFound iokit_usb_err(0x56) // 0xe0004056 Configuration Not found +#define kIOUSBTransactionTimeout iokit_usb_err(0x51) // 0xe0004051 Transaction timed out +#define kIOUSBTransactionReturned iokit_usb_err(0x50) // 0xe0004050 The transaction has been returned to the caller +#define kIOUSBPipeStalled iokit_usb_err(0x4f) // 0xe000404f Pipe has stalled, error needs to be cleared +#define kIOUSBInterfaceNotFound iokit_usb_err(0x4e) // 0xe000404e Interface ref not recognized +#define kIOUSBLowLatencyBufferNotPreviouslyAllocated iokit_usb_err(0x4d) // 0xe000404d Attempted to use user land low latency isoc calls w/out calling PrepareBuffer (on the data buffer) first +#define kIOUSBLowLatencyFrameListNotPreviouslyAllocated iokit_usb_err(0x4c) // 0xe000404c Attempted to use user land low latency isoc calls w/out calling PrepareBuffer (on the frame list) first +#define kIOUSBHighSpeedSplitError iokit_usb_err(0x4b) // 0xe000404b Error to hub on high speed bus trying to do split transaction +#define kIOUSBSyncRequestOnWLThread iokit_usb_err(0x4a) // 0xe000404a A synchronous USB request was made on the workloop thread (from a callback?). Only async requests are permitted in that case +#define kIOUSBDeviceNotHighSpeed iokit_usb_err(0x49) // 0xe0004049 The device is not a high speed device, so the EHCI driver returns an error +#define kIOUSBDevicePortWasNotSuspended iokit_usb_err(0x50) // 0xe0004050 Port was not suspended + +/*! +@defined IOUSBFamily hardware error codes +@discussion These errors are returned by the OHCI controller. The # in parenthesis (xx) corresponds to the OHCI Completion Code. +For the following Completion codes, we return a generic IOKit error instead of a USB specific error. +<tt> +<pre> +Completion Code Error Returned Description +9 kIOReturnUnderrun (Data Underrun) EP returned less data than max packet size +8 kIOReturnOverrun (Data Overrun) Packet too large or more data than buffer +5 kIOReturnNotResponding Device Not responding +4 kIOUSBPipeStalled Endpoint returned a STALL PID +</pre> +</tt> +*/ +#define kIOUSBLinkErr iokit_usb_err(0x10) // 0xe0004010 +#define kIOUSBNotSent2Err iokit_usb_err(0x0f) // 0xe000400f Transaction not sent +#define kIOUSBNotSent1Err iokit_usb_err(0x0e) // 0xe000400e Transaction not sent +#define kIOUSBBufferUnderrunErr iokit_usb_err(0x0d) // 0xe000400d Buffer Underrun (Host hardware failure on data out, PCI busy?) +#define kIOUSBBufferOverrunErr iokit_usb_err(0x0c) // 0xe000400c Buffer Overrun (Host hardware failure on data out, PCI busy?) +#define kIOUSBReserved2Err iokit_usb_err(0x0b) // 0xe000400b Reserved +#define kIOUSBReserved1Err iokit_usb_err(0x0a) // 0xe000400a Reserved +#define kIOUSBWrongPIDErr iokit_usb_err(0x07) // 0xe0004007 Pipe stall, Bad or wrong PID +#define kIOUSBPIDCheckErr iokit_usb_err(0x06) // 0xe0004006 Pipe stall, PID CRC error +#define kIOUSBDataToggleErr iokit_usb_err(0x03) // 0xe0004003 Pipe stall, Bad data toggle +#define kIOUSBBitstufErr iokit_usb_err(0x02) // 0xe0004002 Pipe stall, bitstuffing +#define kIOUSBCRCErr iokit_usb_err(0x01) // 0xe0004001 Pipe stall, bad CRC + +/*! +@defined IOUSBFamily message codes +@discussion Messages specific to the IOUSBFamily. Note that the iokit_usb_msg(x) translates to 0xe0004xxx, where xxx is the value in parenthesis as a hex number. +*/ +#define iokit_usb_msg(message) (UInt32)(sys_iokit|sub_iokit_usb|message) +#define kIOUSBMessageHubResetPort iokit_usb_msg(0x01) // 0xe0004001 Message sent to a hub to reset a particular port +#define kIOUSBMessageHubSuspendPort iokit_usb_msg(0x02) // 0xe0004002 Message sent to a hub to suspend a particular port +#define kIOUSBMessageHubResumePort iokit_usb_msg(0x03) // 0xe0004003 Message sent to a hub to resume a particular port +#define kIOUSBMessageHubIsDeviceConnected iokit_usb_msg(0x04) // 0xe0004004 Message sent to a hub to inquire whether a particular port has a device connected or not +#define kIOUSBMessageHubIsPortEnabled iokit_usb_msg(0x05) // 0xe0004005 Message sent to a hub to inquire whether a particular port is enabled or not +#define kIOUSBMessageHubReEnumeratePort iokit_usb_msg(0x06) // 0xe0004006 Message sent to a hub to reenumerate the device attached to a particular port +#define kIOUSBMessagePortHasBeenReset iokit_usb_msg(0x0a) // 0xe000400a Message sent to a device indicating that the port it is attached to has been reset +#define kIOUSBMessagePortHasBeenResumed iokit_usb_msg(0x0b) // 0xe000400b Message sent to a device indicating that the port it is attached to has been resumed +#define kIOUSBMessageHubPortClearTT iokit_usb_msg(0x0c) // 0xe000400c Message sent to a hub to clear the transaction translator +#define kIOUSBMessagePortHasBeenSuspended iokit_usb_msg(0x0d) // 0xe000400d Message sent to a device indicating that the port it is attached to has been suspended +#define kIOUSBMessageFromThirdParty iokit_usb_msg(0x0e) // 0xe000400e Message sent from a third party. Uses IOUSBThirdPartyParam to encode the sender's ID +#define kIOUSBMessagePortWasNotSuspended iokit_usb_msg(0x0f) // 0xe000400f Message indicating that the hub driver received a resume request for a port that was not suspended +#define kIOUSBMessageExpressCardCantWake iokit_usb_msg(0x10) // 0xe0004010 Message from a driver to a bus that an express card will disconnect on sleep and thus shouldn't wake +#define kIOUSBMessageCompositeDriverReconfigured iokit_usb_msg(0x11) // 0xe0004011 Message from the composite driver indicating that it has finished re-configuring the device after a reset +#define kIOUSBMessageHubSetPortRecoveryTime iokit_usb_msg(0x12) // 0xe0004012 Message sent to a hub to set the # of ms required when resuming a particular port +#define kIOUSBMessageOvercurrentCondition iokit_usb_msg(0x13) // 0xe0004013 Message sent to the clients of the device's hub parent, when a device causes an overcurrent condition. The message argument contains the locationID of the device +#define kIOUSBMessageNotEnoughPower iokit_usb_msg(0x14) // 0xe0004014 Message sent to the clients of the device's hub parent, when a device causes an low power notice to be displayed. The message argument contains the locationID of the device +#define kIOUSBMessageController iokit_usb_msg(0x15) // 0xe0004015 Generic message sent from controller user client to controllers +#define kIOUSBMessageRootHubWakeEvent iokit_usb_msg(0x16) // 0xe0004016 Message from the HC Wakeup code indicating that a Root Hub port has a wake event + +// Obsolete +// +struct IOUSBMouseData { + UInt16 buttons; + SInt16 XDelta; + SInt16 YDelta; +}; +typedef struct IOUSBMouseData IOUSBMouseData; +typedef IOUSBMouseData * IOUSBMouseDataPtr; + +// Obsolete +// +struct IOUSBKeyboardData { + UInt16 keycount; + UInt16 usbkeycode[32]; +}; +typedef struct IOUSBKeyboardData IOUSBKeyboardData; +typedef IOUSBKeyboardData * IOUSBKeyboardDataPtr; + +// Obsolete +// +union IOUSBHIDData { + IOUSBKeyboardData kbd; + IOUSBMouseData mouse; +}; +typedef union IOUSBHIDData IOUSBHIDData; +typedef IOUSBHIDData * IOUSBHIDDataPtr; + +/*! + @typedef IOUSBDeviceDescriptor + @discussion Descriptor for a USB Device. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. +*/ +struct IOUSBDeviceDescriptor { + UInt8 bLength; + UInt8 bDescriptorType; + UInt16 bcdUSB; + UInt8 bDeviceClass; + UInt8 bDeviceSubClass; + UInt8 bDeviceProtocol; + UInt8 bMaxPacketSize0; + UInt16 idVendor; + UInt16 idProduct; + UInt16 bcdDevice; + UInt8 iManufacturer; + UInt8 iProduct; + UInt8 iSerialNumber; + UInt8 bNumConfigurations; +}; +typedef struct IOUSBDeviceDescriptor IOUSBDeviceDescriptor; +typedef IOUSBDeviceDescriptor * IOUSBDeviceDescriptorPtr; + +/*! + @typedef IOUSBDescriptorHeader + @discussion Standard header used for all USB descriptors. Used to read the length of a descriptor so that we can allocate storage for the whole descriptor later on. +*/ +struct IOUSBDescriptorHeader { + UInt8 bLength; + UInt8 bDescriptorType; +}; +typedef struct IOUSBDescriptorHeader IOUSBDescriptorHeader; +typedef IOUSBDescriptorHeader * IOUSBDescriptorHeaderPtr; + +/*! + @typedef IOUSBConfigurationDescriptor + @discussion Standard USB Configuration Descriptor. It is variable length, so this only specifies the known fields. We use the wTotalLength field to read the whole descriptor. + See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. +*/ +struct IOUSBConfigurationDescriptor { + UInt8 bLength; + UInt8 bDescriptorType; + UInt16 wTotalLength; + UInt8 bNumInterfaces; + UInt8 bConfigurationValue; + UInt8 iConfiguration; + UInt8 bmAttributes; + UInt8 MaxPower; +}; +typedef struct IOUSBConfigurationDescriptor IOUSBConfigurationDescriptor; +typedef IOUSBConfigurationDescriptor * IOUSBConfigurationDescriptorPtr; + +/*! + @typedef IOUSBConfigurationDescHeader + @discussion Header of a IOUSBConfigurationDescriptor. Used to get the total length of the descriptor. +*/ +struct IOUSBConfigurationDescHeader { + UInt8 bLength; + UInt8 bDescriptorType; + UInt16 wTotalLength; +}; +typedef struct IOUSBConfigurationDescHeader IOUSBConfigurationDescHeader; +typedef IOUSBConfigurationDescHeader * IOUSBConfigurationDescHeaderPtr; + +/*! + @typedef IOUSBInterfaceDescriptor + @discussion Descriptor for a USB Interface. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. +*/ +struct IOUSBInterfaceDescriptor { + UInt8 bLength; + UInt8 bDescriptorType; + UInt8 bInterfaceNumber; + UInt8 bAlternateSetting; + UInt8 bNumEndpoints; + UInt8 bInterfaceClass; + UInt8 bInterfaceSubClass; + UInt8 bInterfaceProtocol; + UInt8 iInterface; +}; +typedef struct IOUSBInterfaceDescriptor IOUSBInterfaceDescriptor; +typedef IOUSBInterfaceDescriptor * IOUSBInterfaceDescriptorPtr; + +/*! + @typedef IOUSBEndpointDescriptor + @discussion Descriptor for a USB Endpoint. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. +*/ +struct IOUSBEndpointDescriptor { + UInt8 bLength; + UInt8 bDescriptorType; + UInt8 bEndpointAddress; + UInt8 bmAttributes; + UInt16 wMaxPacketSize; + UInt8 bInterval; +}; +typedef struct IOUSBEndpointDescriptor IOUSBEndpointDescriptor; +typedef IOUSBEndpointDescriptor * IOUSBEndpointDescriptorPtr; + +enum{addPacketShift = 11}; // Bits for additional packets in maxPacketField. (Table 9-13) +#define mungeMaxPacketSize(w) ((w>1024)?(((w>>(addPacketShift))+1)*(w&((1<<addPacketShift)-1))):w) + +/*! + @typedef IOUSBHIDDescriptor + @discussion USB HID Descriptor. See the USB HID Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. (This structure + should have used the #pragma pack(1) compiler directive to get byte alignment. +*/ +struct IOUSBHIDDescriptor { + UInt8 descLen; + UInt8 descType; + UInt16 descVersNum; + UInt8 hidCountryCode; + UInt8 hidNumDescriptors; + UInt8 hidDescriptorType; + UInt8 hidDescriptorLengthLo; + UInt8 hidDescriptorLengthHi; +}; +typedef struct IOUSBHIDDescriptor IOUSBHIDDescriptor; +typedef IOUSBHIDDescriptor *IOUSBHIDDescriptorPtr; + +/*! + @typedef IOUSBHIDReportDesc + @discussion USB HID Report Descriptor header. See the USB HID Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. (This structure + should have used the #pragma pack(1) compiler directive to get byte alignment. +*/ +struct IOUSBHIDReportDesc { + UInt8 hidDescriptorType; + UInt8 hidDescriptorLengthLo; + UInt8 hidDescriptorLengthHi; +}; +typedef struct IOUSBHIDReportDesc IOUSBHIDReportDesc; +typedef IOUSBHIDReportDesc * IOUSBHIDReportDescPtr; + +/*! + @typedef IOUSBDeviceQualifierDescriptor + @discussion USB Device Qualifier Descriptor. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. +*/ +#pragma pack(1) +struct IOUSBDeviceQualifierDescriptor +{ + UInt8 bLength; + UInt8 bDescriptorType; + UInt16 bcdUSB; + UInt8 bDeviceClass; + UInt8 bDeviceSubClass; + UInt8 bDeviceProtocol; + UInt8 bMaxPacketSize0; + UInt8 bNumConfigurations; + UInt8 bReserved; +}; +typedef struct IOUSBDeviceQualifierDescriptor IOUSBDeviceQualifierDescriptor; +typedef IOUSBDeviceQualifierDescriptor * IOUSBDeviceQualifierDescriptorPtr; +#pragma options align=reset + +/*! + @typedef IOUSBDFUDescriptor + @discussion USB Device Firmware Update Descriptor. See the USB Device Firmware Update Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. +*/ +#pragma pack(1) +struct IOUSBDFUDescriptor +{ + UInt8 bLength; + UInt8 bDescriptorType; + UInt8 bmAttributes; + UInt16 wDetachTimeout; + UInt16 wTransferSize; +}; +typedef struct IOUSBDFUDescriptor IOUSBDFUDescriptor; +typedef IOUSBDFUDescriptor * IOUSBDFUDescriptorPtr; + +#pragma options align=reset + +/*! +@typedef IOUSBInterfaceAssociationDescriptor + @discussion USB Inerface Association Descriptor. ECN to the USB 2.0 Spec. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. + */ +#pragma pack(1) +struct IOUSBInterfaceAssociationDescriptor +{ + UInt8 bLength; + UInt8 bDescriptorType; + UInt8 bFirstInterface; + UInt8 bInterfaceCount; + UInt8 bFunctionClass; + UInt8 bFunctionSubClass; + UInt8 bFunctionProtocol; + UInt8 iFunction; +}; +typedef struct IOUSBInterfaceAssociationDescriptor IOUSBInterfaceAssociationDescriptor; +typedef IOUSBInterfaceAssociationDescriptor * IOUSBInterfaceAssociationDescriptorPtr; +#pragma options align=reset + +/*! + @typedef USBStatus + @discussion Type used to get a DeviceStatus as a single quantity. +*/ +typedef UInt16 USBStatus; +typedef USBStatus * USBStatusPtr; + +// These constants are obsolete +// +enum { + kIOUSBAnyClass = 0xFFFF, + kIOUSBAnySubClass = 0xFFFF, + kIOUSBAnyProtocol = 0xFFFF, + kIOUSBAnyVendor = 0xFFFF, + kIOUSBAnyProduct = 0xFFFF +}; + +// This structure are obsolete +// +typedef struct IOUSBMatch { + UInt16 usbClass; + UInt16 usbSubClass; + UInt16 usbProtocol; + UInt16 usbVendor; + UInt16 usbProduct; +} IOUSBMatch; + +/*! + @typedef IOUSBFindEndpointRequest + @discussion Struct used to find endpoints of an interface + type and direction are used to match endpoints, + type, direction, maxPacketSize and interval are updated + with the properties of the found endpoint. + @field type Type of endpoint: kUSBControl, kUSBIsoc, kUSBBulk, kUSBInterrupt, kUSBAnyType. If kUSBAnyType is specified, this field is treated as a don't care. + @field direction Direction of endpoint: kUSBOut, kUSBIn, kUSBAnyDirn. If kUSBAnyDirn is specified, this field is treated as a don't care. + @field maxPacketSize maximum packet size of endpoint. + @field interval Polling interval in mSec for endpoint. +*/ +typedef struct { + UInt8 type; + UInt8 direction; + UInt16 maxPacketSize; + UInt8 interval; +} IOUSBFindEndpointRequest; + +/*! + @struct IOUSBDevRequest + @discussion Parameter block for control requests, using a simple pointer + for the data to be transferred. + @field bmRequestType Request type: kUSBStandard, kUSBClass or kUSBVendor + @field bRequest Request code + @field wValue 16 bit parameter for request, host endianess + @field wIndex 16 bit parameter for request, host endianess + @field wLength Length of data part of request, 16 bits, host endianess + @field pData Pointer to data for request - data returned in bus endianess + @field wLenDone Set by standard completion routine to number of data bytes + actually transferred +*/ +typedef struct { + UInt8 bmRequestType; + UInt8 bRequest; + UInt16 wValue; + UInt16 wIndex; + UInt16 wLength; + void * pData; + UInt32 wLenDone; +} IOUSBDevRequest; +typedef IOUSBDevRequest * IOUSBDeviceRequestPtr; + +/*! + @struct IOUSBDevRequestTO + @discussion Parameter block for control requests with timeouts, using a simple pointer + for the data to be transferred. Same as a IOUSBDevRequest except for the two extra timeout fields. + @field bmRequestType Request type: kUSBStandard, kUSBClass or kUSBVendor + @field bRequest Request code + @field wValue 16 bit parameter for request, host endianess + @field wIndex 16 bit parameter for request, host endianess + @field wLength Length of data part of request, 16 bits, host endianess + @field pData Pointer to data for request - data returned in bus endianess + @field wLenDone Set by standard completion routine to number of data bytes + actually transferred + @field noDataTimeout Specifies a time value in milliseconds. Once the request is queued on the bus, if no data is transferred in this amount of time, the request will be aborted and returned. + @field completionTimeout Specifies a time value in milliseconds. Once the request is queued on the bus, if the entire request is not completed in this amount of time, the request will be aborted and returned +*/ +typedef struct { + UInt8 bmRequestType; + UInt8 bRequest; + UInt16 wValue; + UInt16 wIndex; + UInt16 wLength; + void * pData; + UInt32 wLenDone; + UInt32 noDataTimeout; + UInt32 completionTimeout; +} IOUSBDevRequestTO; + +/*! + @enum Default timeout values + @discussion default values used for data and completion timeouts. +*/ +enum +{ + kUSBDefaultControlNoDataTimeoutMS = 5000, + kUSBDefaultControlCompletionTimeoutMS = 0 +}; + +// Internal structure to pass parameters between IOUSBLib and UserClient +// +typedef struct +{ + UInt32 pipeRef; + void * buf; + UInt32 size; + UInt32 noDataTimeout; + UInt32 completionTimeout; +} IOUSBBulkPipeReq; + + +#if KERNEL +/*! + @struct IOUSBDevRequestDesc + @discussion Parameter block for control requests, using a memory descriptor + for the data to be transferred. Only available in the kernel. + @field bmRequestType Request type: kUSBStandard, kUSBClass or kUSBVendor + @field bRequest Request code + @field wValue 16 bit parameter for request, host endianess + @field wIndex 16 bit parameter for request, host endianess + @field wLength Length of data part of request, 16 bits, host endianess + @field pData Pointer to memory descriptor for data for request - data returned in bus endianess + @field wLenDone Set by standard completion routine to number of data bytes + actually transferred +*/ +typedef struct { + UInt8 bmRequestType; + UInt8 bRequest; + UInt16 wValue; + UInt16 wIndex; + UInt16 wLength; + IOMemoryDescriptor * pData; + UInt32 wLenDone; +} IOUSBDevRequestDesc; + + +/*! + @enum IOOptionBits + @discussion Parameter passed to an IOService::open() call. + @constant kIOUSBInterfaceOpenAlt Open the alternate interface specified when creating the interface. +*/ +enum { + kIOUSBInterfaceOpenAlt = 0x00010000 +}; + +#endif + +// Internal structure to pass parameters between IOUSBLib and UserClient +// +// use a structure because there's a limit of 6 total arguments +// to a user client method. +typedef struct { + UInt8 bmRequestType; + UInt8 bRequest; + UInt16 wValue; + UInt16 wIndex; + UInt16 wLength; + void * pData; // data pointer + UInt32 wLenDone; // # bytes transferred + UInt8 pipeRef; +} IOUSBDevReqOOL; + +// Internal structure to pass parameters between IOUSBLib and UserClient +// +typedef struct { + UInt8 bmRequestType; + UInt8 bRequest; + UInt16 wValue; + UInt16 wIndex; + UInt16 wLength; + void * pData; // data pointer + UInt32 wLenDone; // # bytes transferred + UInt8 pipeRef; + UInt32 noDataTimeout; + UInt32 completionTimeout; +} IOUSBDevReqOOLTO; + +// Internal structure to pass parameters between IOUSBLib and UserClient +// +// Structure to request isochronous transfer +// +typedef struct { + UInt32 fPipe; + void *fBuffer; + UInt32 fBufSize; + UInt64 fStartFrame; + UInt32 fNumFrames; + IOUSBIsocFrame *fFrameCounts; +} IOUSBIsocStruct; + +// Internal structure to pass parameters between IOUSBLib and UserClient +// +// Structure to request low latency isochronous transfer +// +struct IOUSBLowLatencyIsocStruct { + UInt32 fPipe; + UInt32 fBufSize; + UInt64 fStartFrame; + UInt32 fNumFrames; + UInt32 fUpdateFrequency; + UInt32 fDataBufferCookie; + UInt32 fDataBufferOffset; + UInt32 fFrameListBufferCookie; + UInt32 fFrameListBufferOffset; +}; + +typedef struct IOUSBLowLatencyIsocStruct IOUSBLowLatencyIsocStruct; + + +/*! + @struct IOUSBGetFrameStruct + @discussion Structure used from user space to return the frame number and a timestamp on when the frame register was read. + @field frame frame number + @field timeStamp AbsoluteTime when the frame was updated +*/ +typedef struct { + UInt64 frame; + AbsoluteTime timeStamp; +} IOUSBGetFrameStruct; + + +/*! + @struct IOUSBFindInterfaceRequest + @discussion Structure used with FindNextInterface. +*/ +typedef struct { + UInt16 bInterfaceClass; // requested class + UInt16 bInterfaceSubClass; // requested subclass + UInt16 bInterfaceProtocol; // requested protocol + UInt16 bAlternateSetting; // requested alt setting +} IOUSBFindInterfaceRequest; + +/*! + @enum kIOUSBFindInterfaceDontCare + @discussion Constant that can be used for the fields of IOUSBFindInterfaceRequest to specify that they should not be matched. +*/ +enum { + kIOUSBFindInterfaceDontCare = 0xFFFF + }; + +/*! + @enum kIOUSBVendorIDAppleComputer + @discussion USB Vendor ID for Apple Computer, Inc. +*/ +enum { + kIOUSBVendorIDAppleComputer = 0x05AC + }; + +/*! + @enum USBDeviceSpeed + @discussion Returns the speed of a particular USB device. + @constant kUSBDeviceSpeedLow The device a low speed device. + @constant kUSBDeviceSpeedFull The device a full speed device. + @constant kUSBDeviceSpeedHigh The device a high speed device. +*/ +enum { + kUSBDeviceSpeedLow = 0, + kUSBDeviceSpeedFull = 1, + kUSBDeviceSpeedHigh = 2 + }; + +/*! + @enum MicrosecondsInFrame + @discussion Returns the number of microseconds in a USB frame. + @constant kUSBFullSpeedMicrosecondsInFrame The device is attached to a bus running at full speed (1 ms / frame). + @constant kUSBHighSpeedMicrosecondsInFrame The device is attached to a bus running at high speed (125 microseconds / frame). +*/ +enum { + kUSBFullSpeedMicrosecondsInFrame = 1000, + kUSBHighSpeedMicrosecondsInFrame = 125 +}; + +// During low latency transfers, the stack will set the frStatus for each frame to this value. A client can check that to see if the transfer has completed. We set the frStatus to a +// valid return code when the transfer completes. +// +enum { + kUSBLowLatencyIsochTransferKey = 'llit' // Set frStatus field of first frame in isoch transfer to designate as low latency + }; + +// This structure is DEPRECATED. See the LowLatencyUserBufferInfoV2 +// +typedef struct LowLatencyUserBufferInfo LowLatencyUserBufferInfo; + +struct LowLatencyUserBufferInfo { + UInt32 cookie; + void * bufferAddress; + IOByteCount bufferSize; + UInt32 bufferType; + Boolean isPrepared; + LowLatencyUserBufferInfo * nextBuffer; +}; + +// This structure is DEPRECATED. See the LowLatencyUserBufferInfoV3 + +typedef struct LowLatencyUserBufferInfoV2 LowLatencyUserBufferInfoV2; + +struct LowLatencyUserBufferInfoV2 +{ + UInt32 cookie; + void * bufferAddress; + IOByteCount bufferSize; + UInt32 bufferType; + Boolean isPrepared; + void * mappedUHCIAddress; + LowLatencyUserBufferInfoV2 * nextBuffer; +}; + + +// This structure is used to pass information for the low latency calls between user space and the kernel. +// +typedef struct LowLatencyUserBufferInfoV3 LowLatencyUserBufferInfoV3; + +struct LowLatencyUserBufferInfoV3 +{ + uint64_t cookie; + mach_vm_address_t bufferAddress; + mach_vm_size_t bufferSize; + uint64_t bufferType; + uint64_t isPrepared; + mach_vm_address_t mappedUHCIAddress; + LowLatencyUserBufferInfoV3 * nextBuffer; +}; + + + /*! + @enum USBLowLatencyBufferType + @discussion Used to specify what kind of buffer to create when calling LowLatencyCreateBuffer(). + @constant kUSBLowLatencyWriteBuffer The buffer will be used to write data out to a device. + @constant kUSBLowLatencyReadBuffer The buffer will be used to read data from a device. + @constant kUSBLowLatencyFrameListBuffer The buffer will be used for a low latency isoch frame list. +*/ +typedef enum { + kUSBLowLatencyWriteBuffer = 0, + kUSBLowLatencyReadBuffer = 1, + kUSBLowLatencyFrameListBuffer = 2 +} USBLowLatencyBufferType; + +// USB User Notification Types +// +enum { + kUSBNoUserNotificationType = 0, + kUSBNotEnoughPowerNotificationType = 1, + kUSBIndividualOverCurrentNotificationType = 2, + kUSBGangOverCurrentNotificationType = 3 +}; + +/*! + @defined Property Definitions + @discussion Useful property names in USB land. +*/ +#define kUSBDevicePropertySpeed "Device Speed" +#define kUSBDevicePropertyBusPowerAvailable "Bus Power Available" +#define kUSBDevicePropertyAddress "USB Address" +#define kUSBDevicePropertyLocationID "locationID" +#define kUSBProductIDMask "idProductMask" +#define kUSBPreferredConfiguration "Preferred Configuration" +#define kUSBSuspendPort "kSuspendPort" +#define kUSBExpressCardCantWake "ExpressCardCantWake" +#define kUSBControllerNeedsContiguousMemoryForIsoch "Need contiguous memory for isoch" +#define kUSBHubDontAllowLowPower "kUSBHubDontAllowLowPower" +#define kUSBDeviceResumeRecoveryTime "kUSBDeviceResumeRecoveryTime" +#define kUSBOutOfSpecMPSOK "Out of spec MPS OK" +#define kConfigurationDescriptorOverride "ConfigurationDescriptorOverride" +#define kOverrideIfAtLocationID "OverrideIfAtLocationID" + +/*! +@enum USBReEnumerateOptions + @discussion Options used when calling ReEnumerateDevice. + @constant kUSBAddExtraResetTimeBit Setting this bit will cause the Hub driver to wait 100ms before addressing the device after the reset following the re-enumeration. + */ +typedef enum { + kUSBAddExtraResetTimeBit = 31, + kUSBAddExtraResetTimeMask = ( 1 << kUSBAddExtraResetTimeBit) +} USBReEnumerateOptions; + +/*! + @enum USBDeviceInformationBits + @discussion GetUSBDeviceInformation will return a unit32_t value with bits set indicating that a particular state is present in the USB device. These bits are described here + + @constant kUSBInformationDeviceIsCaptiveBit The USB device is directly attached to its hub and cannot be removed. + @constant kUSBInformationDeviceIsAttachedToRootHubBit The USB device is directly attached to the root hub + @constant kUSBInformationDeviceIsInternalBit The USB device is internal to the computer (all the hubs it attaches to are captive) + @constant kUSBInformationDeviceIsConnectedBit The USB device is connected to its hub + @constant kUSBInformationDeviceIsEnabledBit The hub port to which the USB device is attached is enabled + @constant kUSBInformationDeviceIsSuspendedBit The hub port to which the USB device is attached is suspended + @constant kUSBInformationDeviceIsInResetBit The hub port to which the USB device is attached is being reset + @constant kUSBInformationDeviceOvercurrentBit The USB device generated an overcurrent + @constant kUSBInformationDevicePortIsInTestModeBit The hub port to which the USB device is attached is in test mode + @constant kUSBInformationDeviceIsRootHub The device is actually the root hub simulation + @constant kUSBInformationRootHubisBuiltIn If this is a root hub simulation and it's built into the machine, this bit is set. If it's on an expansion card, it will be cleared + + */ + typedef enum { + kUSBInformationDeviceIsCaptiveBit = 0, + kUSBInformationDeviceIsAttachedToRootHubBit = 1, + kUSBInformationDeviceIsInternalBit = 2, + kUSBInformationDeviceIsConnectedBit = 3, + kUSBInformationDeviceIsEnabledBit = 4, + kUSBInformationDeviceIsSuspendedBit = 5, + kUSBInformationDeviceIsInResetBit = 6, + kUSBInformationDeviceOvercurrentBit = 7, + kUSBInformationDevicePortIsInTestModeBit = 8, + kUSBInformationDeviceIsRootHub = 9, + kUSBInformationRootHubisBuiltIn = 10, + kUSBInformationDeviceIsRemote = 11, + kUSBInformationDeviceIsCaptiveMask = (1 << kUSBInformationDeviceIsCaptiveBit), + kUSBInformationDeviceIsAttachedToRootHubMask = (1 << kUSBInformationDeviceIsAttachedToRootHubBit), + kUSBInformationDeviceIsInternalMask = (1 << kUSBInformationDeviceIsInternalBit), + kUSBInformationDeviceIsConnectedMask = (1 << kUSBInformationDeviceIsConnectedBit), + kUSBInformationDeviceIsEnabledMask = (1 << kUSBInformationDeviceIsEnabledBit), + kUSBInformationDeviceIsSuspendedMask = (1 << kUSBInformationDeviceIsSuspendedBit), + kUSBInformationDeviceIsInResetMask = (1 << kUSBInformationDeviceIsInResetBit), + kUSBInformationDeviceOvercurrentMask = (1 << kUSBInformationDeviceOvercurrentBit), + kUSBInformationDevicePortIsInTestModeMask = (1 << kUSBInformationDevicePortIsInTestModeBit), + kUSBInformationDeviceIsRootHubMask = (1 << kUSBInformationDeviceIsRootHub), + kUSBInformationRootHubisBuiltInMask = (1 << kUSBInformationRootHubisBuiltIn), + kUSBInformationDeviceIsRemoteMask = (1 << kUSBInformationDeviceIsRemote) + } USBDeviceInformationBits; + + /*! + @enum USBPowerRequestTypes + @discussion Used to specify what kind of power will be reserved using the IOUSBDevice RequestExtraPower and ReturnExtraPower APIs. + @constant kUSBPowerDuringSleep The power is to be used during sleep. + @constant kUSBPowerDuringWake The power is to be used while the system is awake (i.e not sleeping) + */ + typedef enum { + kUSBPowerDuringSleep = 0, + kUSBPowerDuringWake = 1 + } USBPowerRequestTypes; + + // Apple specific properties +#define kAppleCurrentAvailable "AAPL,current-available" +#define kAppleCurrentInSleep "AAPL,current-in-sleep" +#define kAppleCurrentExtra "AAPL,current-extra" +#define kAppleInternalUSBDevice "AAPL,device-internal" +#define kUSBBusID "AAPL,bus-id" + + +#ifdef __cplusplus +} +#endif + +#endif /* _USB_H */ diff --git a/i386/include/IOKit/usb/USBHub.h b/i386/include/IOKit/usb/USBHub.h new file mode 100644 index 0000000..4bbda15 --- /dev/null +++ b/i386/include/IOKit/usb/USBHub.h @@ -0,0 +1,240 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _USBHUB_H +#define _USBHUB_H + +#include <IOKit/usb/USB.h> +#include <IOKit/usb/USBSpec.h> + + /*! + @header USBHub.h + @abstract Constants and definitions used with Hub devices. + @discussion + */ + + /*! + @enum Hub Descriptor Type + @discussion + */ +enum { + kUSBHubDescriptorType = 0x29 +}; + + /*! + @enum HubFeatures + @discussion Used with SET_FEATURE to set hub and port features + */ +enum { + + kUSBHubLocalPowerChangeFeature = 0, /* Hub features */ + kUSBHubOverCurrentChangeFeature = 1, + + kUSBHubPortConnectionFeature = 0, /* port features */ + kUSBHubPortEnableFeature = 1, + kUSBHubPortSuspendFeature = 2, + kUSBHubPortOverCurrentFeature = 3, + kUSBHubPortResetFeature = 4, + kUSBHubPortPowerFeature = 8, + kUSBHubPortLowSpeedFeature = 9, + kUSBHubPortConnectionChangeFeature = 16, + kUSBHubPortEnableChangeFeature = 17, + kUSBHubPortSuspendChangeFeature = 18, + kUSBHubPortOverCurrentChangeFeature = 19, + kUSBHubPortResetChangeFeature = 20, + kUSBHubPortTestFeature = 21, + kUSBHubPortIndicatorFeature = 22 +}; + + /*! + @enum HubPortStatus + @discussion Used to decode the Port Status and Change + */ +enum { + kHubPortConnection = 0x0001, + kHubPortEnabled = 0x0002, + kHubPortSuspend = 0x0004, + kHubPortOverCurrent = 0x0008, + kHubPortBeingReset = 0x0010, + kHubPortPower = 0x0100, + kHubPortLowSpeed = 0x0200, + kHubPortHighSpeed = 0x0400, + kHubPortTestMode = 0x0800, + kHubPortIndicator = 0x1000, + + // these are the bits which cause the hub port state machine to keep moving + kHubPortStateChangeMask = kHubPortConnection | kHubPortEnabled | kHubPortSuspend | kHubPortOverCurrent | kHubPortBeingReset +}; + + + /*! + @enum HubStatus + @discussion Used to decode the Hub Status and Change + */ +enum { + kHubLocalPowerStatus = 1, + kHubOverCurrentIndicator = 2, + kHubLocalPowerStatusChange = 1, + kHubOverCurrentIndicatorChange = 2 +}; + + /*! + @enum HubCharacteristics + @discussion + */ +enum { + kPerPortSwitchingBit = (1 << 0), + kNoPowerSwitchingBit = (1 << 1), + kCompoundDeviceBit = (1 << 2), + kPerPortOverCurrentBit = (1 << 3), + kNoOverCurrentBit = (1 << 4), + + kHubPortIndicatorBit = 7, + kHubPortIndicatorMask = 0x0080 +}; + +/*! +@enum PowerSwitching + @discussion + */ +enum { + kHubSupportsGangPower = 0, + kHubSupportsIndividualPortPower = 1, + kHubPortSetPowerOff = 0, + kHubPortSetPowerOn = 1 +}; + +/*! +@enum PortIndicatorSelectors + @discussion + */ +enum { + kHubPortIndicatorAutomatic = 0, + kHubPortIndicatorAmber, + kHubPortIndicatorGreen, + kHubPortIndicatorOff +}; + +/*! + @enum Root Hub specific + @discussion + */ +enum { + kPrdRootHubApple = 0x8005, // ProductID for classic speed root hubs + kPrdRootHubAppleE = 0x8006, // ProductID for high speed root hubs + kUSBRootHubPollingRate = 32 // Enpoint polling rate interval for root hubs +}; + +/*! +@enum Hub Device Requests +@discussion Encoding of the hub specific standard requests +<tt> +<pre><b> +Request bmRequestType bRequest wValue wIndex wLength Data</b> +ClearHubFeature 0010 0000B CLEAR_FEATURE Feature Zero Zero None +ClearPortFeature 0010 0011B Feature Port Zero None + +GetBusState 1010 0011B GET_STATE Zero Port One Port Bus State + +GetHubDescriptor 1010 0000B GET_DESCRIPTOR Type Zero Length Descriptor + +GetHubStatus 1010 0000B GET_STATUS Zero Zero Four Hub Status +GetPortStatus 1010 0011B Zero Port Four Port Status + +SetHubDescriptor 0010 0000B SET_DESCRIPTOR Type Zero Length Descriptor + +SetHubFeature 0010 0000B SET_FEATURE Feature Zero Zero None +SetPortFeature 0010 0011B Feature Port Zero None +</pre> +</tt> + */ +enum { + kClearHubFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBClass, kUSBDevice), + kClearPortFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBClass, kUSBOther), + kGetPortState = EncodeRequest(kUSBRqGetState, kUSBIn, kUSBClass, kUSBOther), + kGetHubDescriptor = EncodeRequest(kUSBRqGetDescriptor, kUSBIn, kUSBClass, kUSBDevice), + kGetHubStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBClass, kUSBDevice), + kGetPortStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBClass, kUSBOther), + kSetHubDescriptor = EncodeRequest(kUSBRqGetDescriptor, kUSBOut, kUSBClass, kUSBDevice), + kSetHubFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBClass, kUSBDevice), + kSetPortFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBClass, kUSBOther) +}; + + +/*! + @typedef IOUSBHubDescriptor + @discussion USB Hub Descriptor. See the USB HID Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. +*/ +struct IOUSBHubDescriptor { + UInt8 length; + UInt8 hubType; + UInt8 numPorts; + UInt16 characteristics __attribute__((packed)); + UInt8 powerOnToGood; /* Port settling time, in 2ms */ + UInt8 hubCurrent; + /* These are received packed, will have to be unpacked */ + UInt8 removablePortFlags[8]; + UInt8 pwrCtlPortFlags[8]; +}; + +typedef struct IOUSBHubDescriptor IOUSBHubDescriptor; + +/*! + @typedef IOUSBHubStatus + @discussion Used to get the port status and change flags using GetPortStatus() +*/ +struct IOUSBHubStatus { + UInt16 statusFlags; + UInt16 changeFlags; +}; +typedef struct IOUSBHubStatus IOUSBHubStatus; +typedef IOUSBHubStatus * IOUSBHubStatusPtr; + +typedef struct IOUSBHubStatus IOUSBHubPortStatus; + + +/*! + @typedef IOUSBHubPortReEnumerateParam + @discussion Used to specify the port that needs to be reenumerated +*/ +typedef struct IOUSBHubPortReEnumerateParam IOUSBHubPortReEnumerateParam; + +struct IOUSBHubPortReEnumerateParam { + UInt32 portNumber; + UInt32 options; +}; + +typedef struct IOUSBHubPortClearTTParam IOUSBHubPortClearTTParam; + +struct IOUSBHubPortClearTTParam { + UInt32 portNumber; + UInt32 options; +#if 0 + UInt8 deviceAddress; <<0 + UInt8 endpointNum; <<8 + UInt8 endpointType; <<16 // As split transaction. 00 Control, 10 Bulk + UInt8 IN; <<24 // Direction, 1 = IN, 0 = OUT +#endif +}; + +#endif /* _USBHUB_H */ diff --git a/i386/include/IOKit/usb/USBSpec.h b/i386/include/IOKit/usb/USBSpec.h new file mode 100644 index 0000000..0665819 --- /dev/null +++ b/i386/include/IOKit/usb/USBSpec.h @@ -0,0 +1,470 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +/* + * Constants that both OS9 and OSX want to define, and whose values are + * specified by the USB Standard. + * Put in a seperate file so they can be included if the OS9 include file isn't already + * included. + */ +#ifndef _USBSPEC_H +#define _USBSPEC_H + +#ifdef __cplusplus +extern "C" { +#endif + + /*! + @header USBSpec.h + @abstract Constants and definitions of parameters that are used in communcating with USB devices and interfaces. + @discussion + */ + + /*! + @enum Endpoint type + @discussion Used in IOUSBFindEndpointRequest's type field + */ +enum { + kUSBControl = 0, + kUSBIsoc = 1, + kUSBBulk = 2, + kUSBInterrupt = 3, + kUSBAnyType = 0xFF +}; + + /*! + @enum Endpoint direction + @discussion Used in IOUSBFindEndpointRequest's direction field + */ +enum { + kUSBOut = 0, + kUSBIn = 1, + kUSBNone = 2, + kUSBAnyDirn = 3 +}; + + /*! + @enum Device Request Type + @discussion This type is encoded in the bmRequestType field of a Device Request. It specifies the type of request: standard, class or vendor specific. + */ +enum { + kUSBStandard = 0, + kUSBClass = 1, + kUSBVendor = 2 +}; + + /*! + @enum Device Request Recipient + @discussion This recipient is encoded in the bmRequestType field of a Device Request. It specifies the type of recipient for a request: the device, the interface, or an endpoint. + */ +enum { + kUSBDevice = 0, + kUSBInterface = 1, + kUSBEndpoint = 2, + kUSBOther = 3 +}; + + /*! + @enum Device Request + @discussion Specifies values for the bRequest field of a Device Request. + */ +enum { + kUSBRqGetStatus = 0, + kUSBRqClearFeature = 1, + kUSBRqGetState = 2, + kUSBRqSetFeature = 3, + kUSBRqReserved2 = 4, + kUSBRqSetAddress = 5, + kUSBRqGetDescriptor = 6, + kUSBRqSetDescriptor = 7, + kUSBRqGetConfig = 8, + kUSBRqSetConfig = 9, + kUSBRqGetInterface = 10, + kUSBRqSetInterface = 11, + kUSBRqSyncFrame = 12 +}; + + /*! + @enum USB Descriptors + @discussion Specifies values for diffent descriptor types. + */ +enum { + kUSBAnyDesc = 0, // Wildcard for searches + kUSBDeviceDesc = 1, + kUSBConfDesc = 2, + kUSBStringDesc = 3, + kUSBInterfaceDesc = 4, + kUSBEndpointDesc = 5, + kUSBDeviceQualifierDesc = 6, + kUSBOtherSpeedConfDesc = 7, + kUSBInterfacePowerDesc = 8, + kUSBOnTheGoDesc = 9, + kUSDebugDesc = 10, + kUSBInterfaceAssociationDesc = 11, + kUSBHIDDesc = 0x21, + kUSBReportDesc = 0x22, + kUSBPhysicalDesc = 0x23, + kUSBHUBDesc = 0x29 +}; + + /*! + @enum Feature Selectors + @discussion Used with SET/CLEAR_FEATURE requests. + */ +enum { + kUSBFeatureEndpointStall = 0, + kUSBFeatureDeviceRemoteWakeup = 1 +}; + + /*! + @enum USB Power constants + @discussion Constants relating to USB Power. + */ +enum { + kUSB100mAAvailable = 50, + kUSB500mAAvailable = 250, + kUSB100mA = 50, + kUSBAtrBusPowered = 0x80, + kUSBAtrSelfPowered = 0x40, + kUSBAtrRemoteWakeup = 0x20 +}; + + /*! + @enum USB Release constants + @discussion Constants relating to USB releases as found in the bcdUSB field of the Device Descriptor. + */ +enum { + kUSBRel10 = 0x0100, + kUSBRel11 = 0x0110, + kUSBRel20 = 0x0200 +}; + + + /*! + @enum HID requests + @discussion Constants for HID requests. + */ +enum { + kHIDRqGetReport = 1, + kHIDRqGetIdle = 2, + kHIDRqGetProtocol = 3, + kHIDRqSetReport = 9, + kHIDRqSetIdle = 10, + kHIDRqSetProtocol = 11 +}; + + /*! + @enum HID report types + @discussion Constants for the three kinds of HID reports. + */ +enum { + kHIDRtInputReport = 1, + kHIDRtOutputReport = 2, + kHIDRtFeatureReport = 3 +}; + + + /*! + @enum HID Protocol + @discussion Used in the SET_PROTOCOL device request + */ +enum { + kHIDBootProtocolValue = 0, + kHIDReportProtocolValue = 1 +}; + + + +enum { + kUSBCapsLockKey = 0x39, + kUSBNumLockKey = 0x53, + kUSBScrollLockKey = 0x47 +}; + +/*! +@enum Device Class Codes + @discussion Constants for USB Device classes (bDeviceClass). + */ +enum { + kUSBCompositeClass = 0, + kUSBCommClass = 2, // Deprecated + kUSBCommunicationClass = 2, + kUSBHubClass = 9, + kUSBDataClass = 10, + kUSBPersonalHealthcareClass = 15, + kUSBDiagnosticClass = 220, + kUSBWirelessControllerClass = 224, + kUSBMiscellaneousClass = 239, + kUSBApplicationSpecificClass = 254, + kUSBVendorSpecificClass = 255 +}; + +/*! +@enum Interface Class + @discussion Constants for Interface classes (bInterfaceClass). + */ +enum { + kUSBAudioClass = 1, // Deprecated + kUSBAudioInterfaceClass = 1, + + kUSBCommunicationControlInterfaceClass = 2, + kUSBCommunicationDataInterfaceClass = 10, + + kUSBHIDClass = 3, + kUSBHIDInterfaceClass = 3, + + kUSBPhysicalInterfaceClass = 5, + + kUSBImageInterfaceClass = 6, + + kUSBPrintingClass = 7, // Deprecated + kUSBPrintingInterfaceClass = 7, + + kUSBMassStorageClass = 8, // Deprecated + kUSBMassStorageInterfaceClass = 8, + + kUSBChipSmartCardInterfaceClass = 11, + + kUSBContentSecurityInterfaceClass = 13, + + kUSBVideoInterfaceClass = 14, + + kUSBPersonalHealthcareInterfaceClass = 15, + + kUSBDiagnosticDeviceInterfaceClass = 220, + + kUSBWirelessControllerInterfaceClass = 224, + + kUSBApplicationSpecificInterfaceClass = 254, + + kUSBVendorSpecificInterfaceClass = 255 +}; + +// Obsolete +enum { + + kUSBDisplayClass = 4, // Obsolete +}; + +/*! + @enum Interface SubClass + @discussion Constants for USB Interface SubClasses (bInterfaceSubClass). +*/ +enum { + kUSBCompositeSubClass = 0, + + kUSBHubSubClass = 0, + + // For the kUSBAudioInterfaceClass + // + kUSBAudioControlSubClass = 0x01, + kUSBAudioStreamingSubClass = 0x02, + kUSBMIDIStreamingSubClass = 0x03, + + // For the kUSBApplicationSpecificInterfaceClass + // + kUSBDFUSubClass = 0x01, + kUSBIrDABridgeSubClass = 0x02, + kUSBTestMeasurementSubClass = 0x03, + + // For the kUSBMassStorageInterfaceClass + // + kUSBMassStorageRBCSubClass = 0x01, + kUSBMassStorageATAPISubClass = 0x02, + kUSBMassStorageQIC157SubClass = 0x03, + kUSBMassStorageUFISubClass = 0x04, + kUSBMassStorageSFF8070iSubClass = 0x05, + kUSBMassStorageSCSISubClass = 0x06, + + // For the kUSBHIDInterfaceClass + // + kUSBHIDBootInterfaceSubClass = 0x01, + + // For the kUSBCommunicationDataInterfaceClass + // + kUSBCommDirectLineSubClass = 0x01, + kUSBCommAbstractSubClass = 0x02, + kUSBCommTelephoneSubClass = 0x03, + kUSBCommMultiChannelSubClass = 0x04, + kUSBCommCAPISubClass = 0x05, + kUSBCommEthernetNetworkingSubClass = 0x06, + kUSBATMNetworkingSubClass = 0x07, + + // For the kUSBDiagnosticDeviceInterfaceClass + // + kUSBReprogrammableDiagnosticSubClass = 0x01, + + // For the kUSBWirelessControllerInterfaceClass + // + kUSBRFControllerSubClass = 0x01, + + // For the kUSBMiscellaneousClass + // + kUSBCommonClassSubClass = 0x02, + + // For the kUSBVideoInterfaceClass + // + kUSBVideoControlSubClass = 0x01, + kUSBVideoStreamingSubClass = 0x02, + kUSBVideoInterfaceCollectionSubClass = 0x03 + +}; + +/*! +@enum Interface Protocol + @discussion Reported in the bInterfaceProtocol field of the Interface Descriptor. + */ +enum { + + // For kUSBHIDInterfaceClass + // + kHIDNoInterfaceProtocol = 0, + kHIDKeyboardInterfaceProtocol = 1, + kHIDMouseInterfaceProtocol = 2, + kUSBVendorSpecificProtocol = 0xff, + + // For kUSBDiagnosticDeviceInterfaceClass + // + kUSB2ComplianceDeviceProtocol = 0x01, + + // For kUSBWirelessControllerInterfaceClass + // + kUSBBluetoothProgrammingInterfaceProtocol = 0x01, + + // For kUSBMiscellaneousClass + // + KUSBInterfaceAssociationDescriptorProtocol = 0x01 + +}; + + +/*! + @enum DFU Class Attributes + @discussion +*/ +enum { + kUSBDFUAttributesMask = 0x07, + kUSBDFUCanDownloadBit = 0, + kUSBDFUCanUploadBit = 1, + kUSBDFUManifestationTolerantBit = 2 +}; + +/*! + @enum Printer Class Requests + @discussion The bRequest parameter for Printing Class Sepcific Requests + */ +enum { + kUSPrintingClassGetDeviceID = 0, + kUSPrintingClassGePortStatus = 1, + kUSPrintingClassSoftReset = 2 +}; + + /*! +@enum Endpoint Descriptor bits + @discussion Bit definitions for endpoint descriptor fields + */ +enum { + kUSBbEndpointAddressMask = 0x0f, + kUSBbEndpointDirectionBit = 7, + kUSBbEndpointDirectionMask = ( 1 << kUSBbEndpointDirectionBit ), + kUSBEndpointDirectionOut = 0x00, + kUSBEndpointDirectionIn = 0x80, + kUSBEndpointbmAttributesTransferTypeMask = 0x03, + kUSBEndpointbmAttributesSynchronizationTypeMask = 0x0c, + kUSBEndpointbmAttributesSynchronizationTypeShift = 2, + kUSBEndpointbmAttributesUsageTypeMask = 0x30, + kUSBEndpointbmAttributesUsageTypeShift = 4 +}; + + /*! + @defineblock USB Descriptor and IORegistry constants + @discussion Various constants used to describe the fields in the various USB Device Descriptors and IORegistry names used for some of those fields + + @define kUSBDeviceClass The field in the USB Device Descriptor corresponding to the device class + @define kUSBDeviceSubClass The field in the USB Device Descriptor corresponding to the device sub class + @define kUSBDeviceProtocol The field in the USB Device Descriptor corresponding to the device protocol + @define kUSBDeviceMaxPacketSize The field in the USB Device Descriptor corresponding to the maximum packet size for endpoint 0 + @define kUSBVendorID The field in the USB Device Descriptor corresponding to the device USB Vendor ID + @define kUSBVendorName Deprecated. Use kUSBVendorID + @define kUSBProductID The field in the USB Device Descriptor corresponding to the device USB Product ID + @define kUSBProductName Deprecated. Use kUSBProductID + @define kUSBDeviceReleaseNumber The field in the USB Device Descriptor corresponding to the device release version + @define kUSBManufacturerStringIndex The field in the USB Device Descriptor corresponding to the index for the manufacturer's string + @define kUSBProductStringIndex The field in the USB Device Descriptor corresponding to the index for the product name's string + @define kUSBSerialNumberStringIndex The field in the USB Device Descriptor corresponding to the index for the serial number's string + @define kUSBDeviceNumConfigs The field in the USB Configuration Descriptor corresponding to the number of configurations + @define kUSBInterfaceNumber The field in the USB Configuration Descriptor corresponding to the number of configurations + @define kUSBAlternateSetting The field in the USB Configuration Descriptor corresponding to the number of configurations + @define kUSBNumEndpoints The field in the USB Configuration Descriptor corresponding to the number of configurations + @define kUSBInterfaceClass The field in the USB Interface Descriptor corresponding to the interface class + @define kUSBInterfaceSubClass The field in the USB Interface Descriptor corresponding to the interface sub class + @define kUSBInterfaceProtocol The field in the USB Interface Descriptor corresponding to the interface protocol + @define kUSBInterfaceStringIndex The field in the USB Interface Descriptor corresponding to the index for the interface name's string + @define kUSBConfigurationValue The field in the USB Interface Descriptor corresponding to the configuration + @define kUSBProductString IORegistry key for the device's USB Product string + @define kUSBVendorString IORegistry key for the device's USB manufacturer string + @define kUSBSerialNumberString IORegistry key for the device's USB serial number string + @define kUSB1284DeviceID IORegistry key for the 1284 Device ID of a printer + + */ +#define kUSBDeviceClass "bDeviceClass" +#define kUSBDeviceSubClass "bDeviceSubClass" +#define kUSBDeviceProtocol "bDeviceProtocol" +#define kUSBDeviceMaxPacketSize "bMaxPacketSize0" +#define kUSBVendorID "idVendor" // good name +#define kUSBVendorName kUSBVendorID // bad name - keep for backward compatibility +#define kUSBProductID "idProduct" // good name +#define kUSBProductName kUSBProductID // bad name - keep for backward compatibility +#define kUSBDeviceReleaseNumber "bcdDevice" +#define kUSBManufacturerStringIndex "iManufacturer" +#define kUSBProductStringIndex "iProduct" +#define kUSBSerialNumberStringIndex "iSerialNumber" +#define kUSBDeviceNumConfigs "bNumConfigurations" +#define kUSBInterfaceNumber "bInterfaceNumber" +#define kUSBAlternateSetting "bAlternateSetting" +#define kUSBNumEndpoints "bNumEndpoints" +#define kUSBInterfaceClass "bInterfaceClass" +#define kUSBInterfaceSubClass "bInterfaceSubClass" +#define kUSBInterfaceProtocol "bInterfaceProtocol" +#define kUSBInterfaceStringIndex "iInterface" +#define kUSBConfigurationValue "bConfigurationValue" +#define kUSBProductString "USB Product Name" +#define kUSBVendorString "USB Vendor Name" +#define kUSBSerialNumberString "USB Serial Number" +#define kUSB1284DeviceID "1284 Device ID" + /*! @/defineblock */ + + /*! + @enum Apple USB Vendor ID + @discussion Apple's vendor ID, assigned by the USB-IF +*/ +enum { + kAppleVendorID = 0x05AC +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _USBSPEC_H */ diff --git a/i386/include/IOKit/usb/USBTracepoints.h b/i386/include/IOKit/usb/USBTracepoints.h new file mode 100644 index 0000000..f2fe81e --- /dev/null +++ b/i386/include/IOKit/usb/USBTracepoints.h @@ -0,0 +1,662 @@ +/* + * Copyright � 2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __IOKIT_IO_USB_FAMILY_TRACEPOINTS__ +#define __IOKIT_IO_USB_FAMILY_TRACEPOINTS__ + +#include <IOKit/IOTypes.h> + +#include <sys/kdebug.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#define USB_SYSCTL "debug.USB" +#define kUSBTypeDebug 'USBD' +#define DEBUG_UNUSED( X ) ( void )( X ) + + extern UInt32 gUSBStackDebugFlags; + + typedef struct USBSysctlArgs + { + uint32_t type; + uint32_t operation; + uint32_t debugFlags; + } USBSysctlArgs; + + enum + { + kUSBOperationGetFlags = 0, + kUSBOperationSetFlags = 1 + }; + + // the following bits/masks are for use in the usb boot args + // e.g. boot-args="usb=0x102" will turn on Trace Points and set the EHCI retry count to 1 + // the bits can also be set with a sysctl call + enum + { + kUSBEnableDebugLoggingBit = 0, // bit 0 currently not used + kUSBEnableTracePointsBit = 1, // bit 1 used to turn on Trace Points when a USB controller first loads + kUSBEnableErrorLogBit = 2, // bit 2 (4) turns level 1 log for errors + kUSBDebugRetryCountShift = 8, // bits 8 and 9 will set the retry count for low level bus transactions + kUSBDebugRetryCountReserved = 9, // must be 1, 2, or 3 (0 is invalid, 3 is the default) + + kUSBEnableDebugLoggingMask = (1 << kUSBEnableDebugLoggingBit), + kUSBEnableTracePointsMask = (1 << kUSBEnableTracePointsBit), + kUSBDebugRetryCountMask = (3 << kUSBDebugRetryCountShift), + kUSBEnableErrorLogMask = (1 << kUSBEnableErrorLogBit) + }; + + + /* Kernel Tracepoints + * + * Kernel tracepoints are a logging mechanism reduces the size of a log-laden binary. + * Codes are placed into a buffer, from the kernel, and picked up by a userspace + * tool that displays a unique log message for each tracepoint. Additionally, each + * tracepoint may contain up-to four 32-bit (may change with LP64) arguments. + * + * To add a tracepoint, use the code below as an example: + * USBTrace( kUSBTController, kTPControllerStart, (uintptr_t)myArgValue ); + * Next, add the corresponding tracepoint code in the USBTracer tool, using + * the existing examples. Avoid using confidential information in the log strings. + * Some functions have a argument counter, to signify which of the function's tracepoints + * are actually being logged. When adding a tracepoint using an existing code, you + * must verify that you increment this argument counter properly. + * + * The trace codes consist of the following: + * + * ---------------------------------------------------------------------- + *| Class (8) | SubClass (8) | USBGroup(6) | Code (8) |Func | + *| DBG_IOKIT | DBG_IOUSB | | |Qual(2)| + * ---------------------------------------------------------------------- + * + * DBG_IOKIT(05h) DBG_IOUSB(2Dh) + * + * See <sys/kdebug.h> and IOTimeStamp.h for more details. + */ + + + // USB groupings (max of 64) + enum + { + // Family groupings + kUSBTController = 0, + kUSBTControllerUserClient = 1, + + kUSBTDevice = 2, + kUSBTDeviceUserClient = 3, + + kUSBTHub = 4, + kUSBTHubPort = 5, + kUSBTHSHubUserClient = 6, + kUSBTHID = 7, + kUSBTPipe = 8, + + kUSBTInterfaceUserClient = 9, + + kUSBTEnumeration = 10, // Tracepoints in various components to debug USB enumeration + + + // UIM groupings + kUSBTUHCI = 11, + kUSBTUHCIUIM = 12, + kUSBTUHCIInterrupts = 13, + + kUSBTOHCI = 14, + kUSBTOHCIInterrupts = 15, + + kUSBTEHCI = 20, + kUSBTEHCIHubInfo = 22, + kUSBTEHCIInterrupts = 23, + + // 30-33 reserved + + // 21-25 reserved + kUSBTHubPolicyMaker = 35, + kUSBTCompositeDriver = 36, + + // Actions + kUSBTOutstandingIO = 42, + + // kUSBAudio + kUSBAudio = 50 + + // 61-63 reserved + }; + + // USB Controller Tracepoints 0x052D0000 - 0x052D03FF + // kUSBTController + enum + { + kTPControllerStart = 1, + kTPControllerControlPacketHandler = 2, + kTPControllerMakeDevice = 3, + kTPControllerMakeHubDevice = 4, + kTPControllerCreateRootHubDevice = 5, + kTPControllerClearTTHandler = 6, + kTPControllerClearTT = 7, + kTPControllerDoCreateEP = 8, + kTPControllerReadV2 = 9, + kTPControllerReturnIsochDoneQueue = 10, + kTPControllersetPowerState = 11, + kTPControllerCheckPowerModeBeforeGatedCall = 12, + kTPControllerGatedPowerChange = 13, + kTPControllerCheckForRootHubChanges = 14, + kTPControllerRootHubQueueInterruptRead = 15, + kTPControllerRootHubTimer = 16, + kTPControllerDisjointCompletion = 17, + kTPControllerCheckForDisjointDescriptor = 18, + kTPControllerRead = 19, + kTPControllerV3Start = 20, + kTPAllocatePowerStateArray = 21, + kTPInitForPM = 22, + kTPIsocIOLL = 23, + kTPIsocIO = 24, + kTPControllerWrite = 25, + kTPCompletionCall = 26, + kTPControlTransaction = 27, + kTPInterruptTransaction = 28, + kTPInterruptTransactionData = 29, + kTPBulkTransaction = 30, + kTPBulkTransactionData = 31, + kTPIsocTransaction = 32, + kTPInterruptPacketHandler = 33, + kTPBulkPacketHandler = 34, + kTPDevZeroLock = 35, + kTPControlPacketHandlerData = 36, + kTPDoIOTransferIntrSync = 37, + kTPDoIOTransferBulkSync = 38, + kTPBulkPacketHandlerData = 39, + kTPInterruptPacketHandlerData = 40 + }; + + // USB Device Tracepoints + // kUSBTDevice + enum + { + kTPDeviceInit = 1, + kTPDeviceMessage = 2, + kTPDeviceResetDevice = 3, + kTPDeviceGetFullConfigurationDescriptor = 4, + kTPDeviceGetDeviceDescriptor = 5, + kTPDeviceGetConfigDescriptor = 6, + kTPDeviceSetConfiguration = 7, + kTPDeviceSetFeature = 8, + kTPDeviceDeviceRequest = 9, + kTPDeviceGetConfiguration = 10, + kTPDeviceGetDeviceStatus = 11, + kTPDeviceSuspendDevice = 12, + kTPDeviceReEnumerateDevice = 13, + kTPDeviceConfigLock = 14 + }; + + // USB Pipe Tracepoints + // kUSBTPipe + enum + { + kTPPipeInitToEndpoint = 1, + kTPBulkPipeRead = 2, + kTPBulkPipeWrite = 3, + kTPIsocPipeRead = 4, + kTPIsocPipeWrite = 5, + kTPIsocPipeReadLL = 6, + kTPIsocPipeWriteLL = 7, + kTPIBulkReadTS = 8, + kTPPipeControlRequest = 9, + kTPPipeControlRequestMemDesc = 10 + }; + + + // USB kUSBTControllerUserClient Tracepoints + // kUSBTControllerUserClient + enum + { + kTPControllerUCStart = 1, + kTPControllerUCOpen = 2, + kTPControllerUCReadRegister = 3, + kTPControllerUCWriteRegister = 4 + }; + + // USB kUSBTDeviceUserClient Tracepoints + // kUSBTDeviceUserClient + enum + { + kTPDeviceUCDeviceRequestIn = 1, + kTPDeviceUCDeviceRequestOut = 2, + kTPDeviceUCChangeOutstandingIO = 3, + kTPDeviceUCGetGatedOutstandingIO = 4, + kTPDeviceUCReqComplete = 5 + }; + + // USB InterfaceUserClient Tracepoints + // kUSBTInterfaceUserClient + enum + { + kTPInterfaceUCReadPipe = 1, + kTPInterfaceUCWritePipe = 2, + kTPInterfaceUCControlRequestOut = 3, + kTPInterfaceUCControlRequestIn = 4, + kTPInterfaceUCDoIsochPipeAsync = 5, + kTPInterfaceUCLowLatencyPrepareBuffer = 6, + kTPInterfaceUCChangeOutstandingIO = 7, + kTPInterfaceUCReqComplete = 8, + kTPInterfaceUCIsoReqComplete = 9, + kTPInterfaceUCLLIsoReqComplete = 10 + }; + + + // USB HSHubUserClient Tracepoints + // kUSBTHSHubUserClient + enum + { + kTPHSHubUCInitWithTask = 1, + kTPHSHubUCStart = 2, + kTPHSHubUCClose = 3, + kTPHSHubUCGetNumberOfPorts = 4, + kTPHSHubUCGetLocationID = 5, + kTPHSHubUCPutPortIntoTestMode = 6, + kTPHSHubUCSupportsIndicators = 7, + kTPHSHubUCSetIndicatorForPort = 8, + kTPHSHubUCGetPortIndicatorControl = 9, + kTPHSHubUCSetIndicatorsToAutomatic = 10, + kTPHSHubUCGetPowerSwitchingMode = 11, + kTPHSHubUCGetPortPower = 12, + kTPHSHubUCSetPortPower = 13, + kTPHSHubUCDisablePwrMgmt = 14 + }; + + // USB Hub Tracepoints + // kUSBTHub + enum + { + kTPHubStart = 1, + kTPHubMessage = 2, + kTPHubWillTerminate = 3, + kTPHubPowerStateWillChangeTo = 4, + kTPHubPowerChangeDone = 5, + kTPHubConfigureHub = 6, + kTPHubCheckPowerPowerRequirements = 7, + kTPHubHubPowerChange = 8, + kTPHubAreAllPortsDisconnectedOrSuspended= 9, + kTPHubSuspendPorts = 10, + kTPHubSetPortFeature = 11, + kTPHubClearPortFeature = 12, + kTPHubDoPortAction = 13, + kTPHubInterruptReadHandler = 14, + kTPHubResetPortZero = 15, + kTPHubProcessStateChanged = 16, + kTPHubRearmInterruptRead = 17, + kTPHubDoDeviceRequest = 18, + kTPHubWaitForPortResumes = 19, + kTPHubResetMyPort = 20, + kTPHubDecrementOutstandingIO = 21, + kTPHubChangeOutstandingIO = 22, + kTPHubChangeRaisedPowerState = 23, + kTPHubChangeOutstandingResumes = 24, + kTPHubEnterTestMode = 25, + kTPHubLeaveTestMode = 26, + kTPHubPutPortIntoTestMode = 27, + kTPHubGetPortIndicatorControl = 28, + kTPHubSetIndicatorsToAutomatic = 29, + kTPHubGetPortPower = 30, + kTPHubEnsureUsability = 31, + kTPHubCheckPowerRequirements = 32, + kTPHubWaitForPowerOn = 33, + kTPHubDoPortActionLock = 34, + kTPHubCheckForDeadDevice = 35 + }; + + // USB HubPort Tracepoints + // kUSBTHubPort + enum + { + kTPHubPortStop = 1, + kTPHubPortAddDevice = 2, + kTPHubPortSuspendPort = 3, + kTPHubPortFatalError = 4, + kTPHubPortAddDeviceResetChangeHandler = 5, + kTPHubPortHandleResetPortHandler = 6, + kTPHubPortDefaultOverCrntChangeHandler = 7, + kTPHubPortDefaultConnectionChangeHandler = 8, + kTPHubPortReleaseDevZeroLock = 9, + kTPHubPortDetachDevice = 10, + kTPHubPortGetDevZeroDescriptorWithRetries = 11, + kTPHubPortDisplayOverCurrentNotice = 12, + kTPHubPortWakeSuspendCommand = 13, + kTPHubPortWaitForSuspendCommand = 14, + kTPHubPortEnablePowerAfterOvercurrent = 15 + }; + + // USB HID Tracepoints + // kUSBTHID + enum + { + kTPHIDStart = 1, + kTPHIDpowerStateWillChangeTo = 2, + kTPHIDsetPowerState = 3, + kTPHIDpowerStateDidChangeTo = 4, + kTPHIDpowerChangeDone = 5, + kTPHIDhandleStart = 6, + kTPHIDClearFeatureEndpointHalt = 7, + kTPHIDHandleReport = 8, + kTPHIDSuspendPort = 9, + kTPHIDAbortAndSuspend = 10, + kTPHIDClaimPendingRead = 11, + kTPHIDChangeOutstandingIO = 12, + kTPHIDRearmInterruptRead = 13, + kTPHIDInitializeUSBHIDPowerManagement = 14, + kTPHIDInterruptRead = 15, + kTPHIDInterruptReadError = 16, + kTPHIDCheckForDeadDevice = 17 + }; + + // USB Enumeration Tracepoints + // kUSBTEnumeration + enum + { + kTPEnumerationProcessStatusChanged = 1, + kTPEnumerationInitialGetPortStatus = 2, + kTPEnumerationCallAddDevice = 3, + kTPEnumerationAddDevice = 4, + kTPEnumerationResetPort = 5, + kTPEnumerationAddDeviceResetChangeHandler = 6, + kTPEnumerationRegisterService = 7, + kTPEnumerationLowSpeedDevice = 8, + kTPEnumerationFullSpeedDevice = 9 + + }; + + // USB UHCI Tracepoints + // kUSBTUHCI + enum + { + kTPUHCIMessage = 1, + kTPUHCIGetFrameNumber = 2, + kTPUHCIScavengeIsocTransactions = 3, + kTPUHCIScavengeQueueHeads = 4, + kTPUHCIAllocateQH = 5, + kTPUHCIRootHubStatusChange = 6, + kTPUHCIRHSuspendPort = 7, + kTPUHCIRHHoldPortReset = 8, + kTPUHCIRHResumePortCompletion = 9, + kTPUHCISuspendController = 10, + KTPUHCIResumeController = 11, + KTPUHCIResetControllerState = 12, + KTPUHCIRestartControllerFromReset = 13, + KTPUHCIEnableInterrupts = 14, + KTPUHCIDozeController = 15, + KTPUHCIWakeFromDoze = 16, + KTPUHCIPowerState = 17, + }; + + + // USB UHCI Tracepoints + // kUSBTUHCIUIM + enum + { + kTPUHCIUIMCreateControlEndpoint = 1, + kTPUHCIUIMCreateBulkEndpoint = 2, + kTPUHCIUIMCreateInterruptEndpoint = 3, + kTPUHCIUIMCreateIsochEndpoint = 4, + kTPUHCIUIMCreateIsochTransfer = 5, + kTPUHCIUIMDeleteEndpoint = 6, + kTPUHCIUIMUnlinkQueueHead = 7, + kTPUHCIUIMCheckForTimeouts = 8, + kTPUHCIUIMReturnOneTransaction = 9, + kTPUHCIUIMAllocateTDChain = 10, + kTPUHCIUIMAddIsochFramesToSchedule = 11, + kTPUHCIUIMAbortIsochEP = 12, + kTPUHCIUIMCreateInterruptTransfer = 13, + kTPUHCIUIMHandleEndpointAbort = 14 + }; + + // USB UHCI Interrupt Tracepoints + // kUSBTUHCIInterrupts + enum + { + kTPUHCIInterruptsGetFrameNumberInternal = 1, + kTPUHCIInterruptsFilterInterrupt = 2, + kTPUHCIInterruptsHandleInterrupt = 3, + kTPUHCIUpdateFrameList = 4 + }; + + // USB EHCI Tracepoints + // kUSBTEHCI + enum + { + kTPEHCIRootHubResetPort = 1, + kTPEHCIRootHubPortEnable = 2, + kTPEHCIRootHubPortSuspend = 3, + // kTPEHCIRootHubStatusChange = 4, + kTPEHCIRHResumePortCompletion = 5, + kTPEHCIUIMFinalize = 6, + kTPEHCIGetFrameNumber32 = 7, + kTPEHCIGetFrameNumber = 8, + kTPEHCIAllocateQH = 9, + kTPEHCIEnableAsyncSchedule = 10, + kTPEHCIDisableAsyncSchedule = 11, + kTPEHCIEnablePeriodicSchedule = 12, + kTPEHCIDisablePeriodicSchedule = 13, + kTPEHCIMessage = 14, + kTPEHCIMakeEmptyEndPoint = 15, + kTPEHCIAllocateTDs = 16, + kTPEHCIMungeECHIStatus = 17, + kTPEHCIScavengeIsocTransactions = 18, + kTPEHCIScavengeAnEndpointQueue = 19, + kTPEHCIScavengeCompletedTransactions = 20, + kTPEHCICreateBulkEndpoint = 21, + kTPEHCICreateBulkTransfer = 22, + + kTPEHCICreateInterruptEndpoint = 24, + kTPEHCICreateIsochEndpoint = 25, + kTPEHCIAbortIsochEP = 26, + kTPEHCIHandleEndpointAbort = 27, + kTPEHCICreateInterruptTransfer = 28, + kTPEHCIUnlinkAsyncEndpoint = 29, + kTPEHCIDeleteEndpoint = 30, + kTPEHCICreateHSIsochTransfer = 31, + kTPEHCICreateSplitIsochTransfer = 32, + kTPEHCICreateIsochTransfer = 33, + kTPEHCIAddIsocFramesToSchedule = 34, + kTPEHCIReturnOneTransaction = 35, + kTPEHCICheckEDListForTimeouts = 36, + kTPEHCISuspendUSBBus = 37, + kTPEHCICheckForTimeouts = 38, + kTPEHCIResumeUSBBus = 39, + kTPEHCIRestartUSBBus = 40, + kTPEHCIResetControllerState = 41, + kTPEHCIDozeController = 42, + kTPEHCIWakeControllerFromDoze = 43, + kTPEHCIEnableInterrupts = 44, + kTPEHCIPowerState = 45, + kTPEHCIStopUSBBus = 46, + kTPEHCIRestartControllerFromReset = 47 + }; + + // USB EHCI Interrupt Tracepoints + // kUSBTEHCIInterrupts + enum + { + kTPEHCIInterruptsPollInterrupts = 1, + kTPEHCIInterruptsPrimaryInterruptFilter = 2, + kTPEHCIUpdateFrameList = 3, + }; + + + // USB EHCI Interrupt Tracepoints + // kUSBTEHCIHubInfo + enum + { + kTPEHCIAvailableIsochBandwidth = 1, + kTPEHCIAllocateIsochBandwidth = 2 + }; + + // USB OHCI Tracepoints + // kUSBTOHCI + enum + { + kTPOHCIInitialize = 1, + kTPOHCICreateGeneralTransfer = 2, + kTPOHCIAbortEndpoint = 3, + kTPOHCIDeleteEndpoint = 4, + kTPOHCIEndpointStall = 5, + kTPOHCICreateIsochTransfer = 6, + kTPOHCIAllocateTD = 7, + kTPOHCIAllocateITD = 8, + kTPOHCIAllocateED = 9, + kTPOHCIProcessCompletedITD = 10, + kTPOHCIReturnTransactions = 11, + kTPOHCIMessage = 12, + KTPOHCISuspendUSBBus = 13, + KTPOHCIResumeUSBBus = 14, + KTPOHCIResetControllerState = 15, + KTPOHCIRestartControllerFromReset = 16, + KTPOHCIEnableInterrupts = 17, + KTPOHCIDozeController = 18, + KTPOHCIWakeControllerFromDoze = 19, + KTPOHCIPowerState = 20, + kTPOHCIDoneQueueCompletion = 21 + }; + + // USB OHCI Interrupt Tracepoints + // kUSBTOHCIInterrupts + enum + { + kTPOHCIInterruptsPollInterrupts = 1, + kTPOHCIInterruptsPrimaryInterruptFilter = 2, + kTPOHCIUpdateFrameList = 3 + }; + + + // USB HubPolicyMaker Tracepoints + // kUSBTHubPolicyMaker + enum + { + kTPSetPowerState = 1 + }; + + // USB CompositeDriver Tracepoints + // kUSBTCompositeDriver + enum + { + kTPCompositeDriverConfigureDevice = 1 + }; + + // USB USB OutstandingIO Tracepoints + // kUSBTOutstandingIO + enum + { + kTPDeviceUCDecrement = 1, + kTPDeviceUCIncrement = 2, + kTPInterfaceUCDecrement = 3, + kTPInterfaceUCIncrement = 4, + kTPHubDecrement = 5, + kTPHubIncrement = 6, + kTPHIDDecrement = 7, + kTPHIDIncrement = 8 + }; + + // USB Audio driver Tracepoints + // kUSBAudio + enum + { + kTPAudioDriverRead = 1, + kTPAudioDriverCoalesceInputSamples = 2, + kTPAudioDriverCoalesceError = 3, + kTPAudioDriverCoalesce = 4, + kTPAudioDriverReadHandler = 5, + kTPAudioDriverCoalesceError2 = 6, + kTPAudioDriverConvertInputSamples = 7 + }; + + // Tracepoint macros. +#define USB_TRACE(USBClass, code, funcQualifier) ( ( ( DBG_IOKIT & 0xFF ) << 24) | ( ( DBG_IOUSB & 0xFF ) << 16 ) | ( ( USBClass & 0x3F ) << 10 ) | ( ( code & 0xFF ) << 2 ) | ( funcQualifier & 0x3 ) ) + +#define kTPAllUSB USB_TRACE ( 0, 0, 0 ) + +#define USB_CONTROLLER_TRACE(code) USB_TRACE( kUSBTController, code, DBG_FUNC_NONE ) +#define USB_CONTROLLER_UC_TRACE(code) USB_TRACE( kUSBTControllerUserClient, code, DBG_FUNC_NONE ) +#define USB_DEVICE_TRACE(code) USB_TRACE( kUSBTDevice, code, DBG_FUNC_NONE ) +#define USB_DEVICE_UC_TRACE(code) USB_TRACE( kUSBTDeviceUserClient, code, DBG_FUNC_NONE ) + +#define USB_HUB_TRACE(code) USB_TRACE( kUSBTHub, code, DBG_FUNC_NONE ) +#define USB_HUB_PORT_TRACE(code) USB_TRACE( kUSBTHubPort, code, DBG_FUNC_NONE ) +#define USB_HUB_UC_TRACE(code) USB_TRACE( kUSBTHSHubUserClient, code, DBG_FUNC_NONE ) +#define USB_HID_TRACE(code) USB_TRACE( kUSBTHID, code, DBG_FUNC_NONE ) +#define USB_PIPE_TRACE(code) USB_TRACE( kUSBTPipe, code, DBG_FUNC_NONE ) + +#define USB_INTERFACE_UC_TRACE(code) USB_TRACE( kUSBTInterfaceUserClient, code, DBG_FUNC_NONE ) + +#define USB_ENUMERATION_TRACE(code) USB_TRACE( kUSBTEnumeration, code, DBG_FUNC_NONE ) + +#define USB_UHCI_TRACE(code) USB_TRACE( kUSBTUHCI, code, DBG_FUNC_NONE ) +#define USB_UHCI_UIM_TRACE(code) USB_TRACE( kUSBTUHCIUIM, code, DBG_FUNC_NONE ) +#define USB_UHCI_INTERRUPTS_TRACE(code) USB_TRACE( kUSBTUHCIInterrupts, code, DBG_FUNC_NONE ) + +#define USB_OHCI_TRACE(code) USB_TRACE( kUSBTOHCI, code, DBG_FUNC_NONE ) +#define USB_OHCI_INTERRUPTS_TRACE(code) USB_TRACE( kUSBTOHCIInterrupts, code, DBG_FUNC_NONE ) + +#define USB_EHCI_TRACE(code) USB_TRACE( kUSBTEHCI, code, DBG_FUNC_NONE ) +#define USB_EHCI_HUBINFO_TRACE(code) USB_TRACE( kUSBTEHCIHubInfo, code, DBG_FUNC_NONE ) +#define USB_EHCI_INTERRUPTS_TRACE(code) USB_TRACE( kUSBTEHCIInterrupts, code, DBG_FUNC_NONE ) + +#define USB_HUB_POLICYMAKER_TRACE(code) USB_TRACE( kUSBTHubPolicyMaker, code, DBG_FUNC_NONE ) +#define USB_COMPOSITE_DRIVER_TRACE(code) USB_TRACE( kUSBTCompositeDriver, code, DBG_FUNC_NONE ) + +#define USB_OUTSTANDING_IO_TRACE(code) USB_TRACE( kUSBTOutstandingIO, code, DBG_FUNC_NONE ) + +#define USB_AUDIO_DRIVER_TRACE(code) USB_TRACE( kUSBAudio, code, DBG_FUNC_NONE ) + +#ifdef KERNEL + +#include <IOKit/IOTimeStamp.h> + +#define USBTrace(USBClass, code, a, b, c, d) { \ + if (gUSBStackDebugFlags & kUSBEnableTracePointsMask) { \ + IOTimeStampConstant( USB_TRACE(USBClass, code, DBG_FUNC_NONE), a, b, c, d ); \ + } \ + } + +#define USBTrace_Start(USBClass, code, a, b, c, d) { \ + if (gUSBStackDebugFlags & kUSBEnableTracePointsMask) { \ + IOTimeStampConstant( USB_TRACE(USBClass, code, DBG_FUNC_START), a, b, c, d ); \ + } \ + } + +#define USBTrace_End(USBClass, code, a, b, c, d) { \ + if (gUSBStackDebugFlags & kUSBEnableTracePointsMask) { \ + IOTimeStampConstant( USB_TRACE(USBClass, code, DBG_FUNC_END), a, b, c, d ); \ + } \ + } + +#endif + + + +#ifdef __cplusplus +} +#endif + + +#endif /* __IOKIT_IO_USB_FAMILY_TRACEPOINTS__ */ diff --git a/i386/include/_structs.h b/i386/include/_structs.h new file mode 100644 index 0000000..44443b2 --- /dev/null +++ b/i386/include/_structs.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#include <sys/_structs.h> + diff --git a/i386/include/_types.h b/i386/include/_types.h new file mode 100644 index 0000000..6340283 --- /dev/null +++ b/i386/include/_types.h @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2004, 2008, 2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __TYPES_H_ +#define __TYPES_H_ + +#include <sys/_types.h> + +#if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7 +#define __strfmonlike(fmtarg, firstvararg) \ + __attribute__((__format__ (__strfmon__, fmtarg, firstvararg))) +#define __strftimelike(fmtarg) \ + __attribute__((__format__ (__strftime__, fmtarg, 0))) +#else +#define __strfmonlike(fmtarg, firstvararg) +#define __strftimelike(fmtarg) +#endif + +typedef int __darwin_nl_item; +typedef int __darwin_wctrans_t; +#ifdef __LP64__ +typedef __uint32_t __darwin_wctype_t; +#else /* !__LP64__ */ +typedef unsigned long __darwin_wctype_t; +#endif /* __LP64__ */ + +#ifdef __WCHAR_MAX__ +#define __DARWIN_WCHAR_MAX __WCHAR_MAX__ +#else /* ! __WCHAR_MAX__ */ +#define __DARWIN_WCHAR_MAX 0x7fffffff +#endif /* __WCHAR_MAX__ */ + +#if __DARWIN_WCHAR_MAX > 0xffffU +#define __DARWIN_WCHAR_MIN (-0x7fffffff - 1) +#else +#define __DARWIN_WCHAR_MIN 0 +#endif +#define __DARWIN_WEOF ((__darwin_wint_t)-1) + +#ifndef _FORTIFY_SOURCE +# if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1050) +# define _FORTIFY_SOURCE 0 +# else +# define _FORTIFY_SOURCE 2 /* on by default */ +# endif +#endif + +#endif /* __TYPES_H_ */ diff --git a/i386/include/architecture/alignment.h b/i386/include/architecture/alignment.h new file mode 100644 index 0000000..3a27fc4 --- /dev/null +++ b/i386/include/architecture/alignment.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 1999, 2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1996 NeXT Software, Inc. + * + * Natural alignment of shorts and longs. + * + * HISTORY + * + * 2 Sept 1992 Brian Raymor at NeXT + * Moved over to architecture. + * 18 August 1992 Jack Greenfield at NeXT + * Created. + */ + + +#if defined (__ppc__) +#include "architecture/ppc/alignment.h" +#elif defined (__i386__) +#include "architecture/i386/alignment.h" +#elif defined (__arm__) +#include "architecture/arm/alignment.h" +#else +#error architecture not supported +#endif + + diff --git a/i386/include/architecture/byte_order.h b/i386/include/architecture/byte_order.h new file mode 100644 index 0000000..4542986 --- /dev/null +++ b/i386/include/architecture/byte_order.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 1999-2008 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1992 NeXT Computer, Inc. + * + * Byte ordering conversion. + * + */ + +#ifndef _ARCHITECTURE_BYTE_ORDER_H_ +#define _ARCHITECTURE_BYTE_ORDER_H_ + +#include <libkern/OSByteOrder.h> + + +#endif /* _ARCHITECTURE_BYTE_ORDER_H_ */ diff --git a/i386/include/architecture/i386/alignment.h b/i386/include/architecture/i386/alignment.h new file mode 100644 index 0000000..17dd0ef --- /dev/null +++ b/i386/include/architecture/i386/alignment.h @@ -0,0 +1,69 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1992 NeXT Computer, Inc. + * + * Natural alignment of shorts and longs (for i386) + * + * HISTORY + * + * 2 Sept 1992 Brian Raymor at NeXT + * Moved over to architecture. + * 18 August 1992 Jack Greenfield at NeXT + * Created. + */ + +#ifndef _ARCH_I386_ALIGNMENT_H_ +#define _ARCH_I386_ALIGNMENT_H_ + +/* + * NOP + */ +__inline__ static unsigned short +get_align_short(void *ivalue) +{ + return *((unsigned short *) ivalue); +} + +__inline__ static unsigned short +put_align_short(unsigned short ivalue, void *ovalue) +{ + return *((unsigned short *) ovalue) = ivalue; +} + +/* + * NOP + */ +__inline__ static unsigned long +get_align_long(void *ivalue) +{ + return *((unsigned long *) ivalue); +} + +__inline__ static unsigned long +put_align_long(unsigned long ivalue, void *ovalue) +{ + return *((unsigned long *) ovalue) = ivalue; +} + +#endif /* _ARCH_I386_ALIGNMENT_H_ */ diff --git a/i386/include/architecture/i386/asm_help.h b/i386/include/architecture/i386/asm_help.h new file mode 100644 index 0000000..0207c1d --- /dev/null +++ b/i386/include/architecture/i386/asm_help.h @@ -0,0 +1,398 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1991 NeXT Computer, Inc. All rights reserved. + * + * File: architecture/i386/asm_help.h + * Author: Mike DeMoney, NeXT Computer, Inc. + * Modified for i386 by: Bruce Martin, NeXT Computer, Inc. + * + * This header file defines macros useful when writing assembly code + * for the Intel i386 family processors. + * + * HISTORY + * 10-Mar-92 Bruce Martin (bmartin@next.com) + * Adapted to i386 + * 23-Jan-91 Mike DeMoney (mike@next.com) + * Created. + */ + +#ifndef _ARCH_I386_ASM_HELP_H_ +#define _ARCH_I386_ASM_HELP_H_ + +#include <architecture/i386/reg_help.h> + + +#ifdef __ASSEMBLER__ + +#define ALIGN \ + .align 2, 0x90 + +#define ROUND_TO_STACK(len) \ + (((len) + STACK_INCR - 1) / STACK_INCR * STACK_INCR) + +#ifdef notdef +#if defined(__i386__) +#define CALL_MCOUNT \ + pushl %ebp ;\ + movl %esp, %ebp ;\ + .data ;\ + 1: .long 0 ;\ + .text ;\ + lea 9b,%edx ;\ + call mcount ;\ + popl %ebp ; +#elif defined(__x86_64__) +#define CALL_MCOUNT \ + pushq %rbp ;\ + movq %rsp, %rbp ;\ + .data ;\ + 1: .quad 0 ;\ + .text ;\ + lea 9b,%r13 ;\ + call mcount ;\ + popq %rbp ; +#endif +#else +#define CALL_MCOUNT +#endif + +/* + * Prologue for functions that may call other functions. Saves + * registers and sets up a C frame. + */ +#if defined(__i386__) +#define NESTED_FUNCTION_PROLOGUE(localvarsize) \ + .set __framesize,ROUND_TO_STACK(localvarsize) ;\ + .set __nested_function, 1 ;\ + CALL_MCOUNT \ + .if __framesize ;\ + pushl %ebp ;\ + movl %esp, %ebp ;\ + subl $__framesize, %esp ;\ + .endif ;\ + pushl %edi ;\ + pushl %esi ;\ + pushl %ebx +#elif defined(__x86_64__) +#define NESTED_FUNCTION_PROLOGUE(localvarsize) \ + .set __framesize,ROUND_TO_STACK(localvarsize) ;\ + .set __nested_function, 1 ;\ + CALL_MCOUNT \ + .if __framesize ;\ + pushq %rbp ;\ + movq %rsp, %rbp ;\ + subq $__framesize, %rsp ;\ + .endif ; +#endif + +/* + * Prologue for functions that do not call other functions. Does not + * save registers (this is the functions responsibility). Does set + * up a C frame. + */ +#if defined(__i386__) +#define LEAF_FUNCTION_PROLOGUE(localvarsize) \ + .set __framesize,ROUND_TO_STACK(localvarsize) ;\ + .set __nested_function, 0 ;\ + CALL_MCOUNT \ + .if __framesize ;\ + pushl %ebp ;\ + movl %esp, %ebp ;\ + subl $__framesize, %esp ;\ + .endif +#elif defined(__x86_64__) +#define LEAF_FUNCTION_PROLOGUE(localvarsize) \ + .set __framesize,ROUND_TO_STACK(localvarsize) ;\ + .set __nested_function, 0 ;\ + CALL_MCOUNT \ + .if __framesize ;\ + pushq %rbp ;\ + movq %rsp, %rbp ;\ + subq $__framesize, %rsp ;\ + .endif +#endif + +/* + * Epilogue for any function. + * + * We assume that all Leaf functions will be responsible for saving any + * local registers they clobber. + */ +#if defined(__i386__) +#define FUNCTION_EPILOGUE \ + .if __nested_function ;\ + popl %ebx ;\ + popl %esi ;\ + popl %edi ;\ + .endif ;\ + .if __framesize ;\ + movl %ebp, %esp ;\ + popl %ebp ;\ + .endif ;\ + ret +#elif defined(__x86_64__) +#define FUNCTION_EPILOGUE \ + .if __framesize ;\ + movq %rbp, %rsp ;\ + popq %rbp ;\ + .endif ;\ + ret +#endif + +/* + * Macros for declaring procedures + * + * Use of these macros allows ctags to have a predictable way + * to find various types of declarations. They also simplify + * inserting appropriate symbol table information. + * + * NOTE: these simple stubs will be replaced with more + * complicated versions once we know what the linker and gdb + * will require as far as register use masks and frame declarations. + * These macros may also be ifdef'ed in the future to contain profiling + * code. + * + */ + +/* + * TEXT -- declare start of text segment + */ +#define TEXT \ + .text + +/* + * DATA -- declare start of data segment + */ +#define DATA \ + .data + +/* + * LEAF -- declare global leaf procedure + * NOTE: Control SHOULD NOT FLOW into a LEAF! A LEAF should only + * be jumped to. (A leaf may do an align.) Use a LABEL() if you + * need control to flow into the label. + */ +#define LEAF(name, localvarsize) \ + .globl name ;\ + ALIGN ;\ +name: ;\ + LEAF_FUNCTION_PROLOGUE(localvarsize) + +/* + * X_LEAF -- declare alternate global label for leaf + */ +#define X_LEAF(name, value) \ + .globl name ;\ + .set name,value + +/* + * P_LEAF -- declare private leaf procedure + */ +#define P_LEAF(name, localvarsize) \ + ALIGN ;\ +name: ;\ + LEAF_FUNCTION_PROLOGUE(localvarsize) + +/* + * LABEL -- declare a global code label + * MUST be used (rather than LEAF, NESTED, etc) if control + * "flows into" the label. + */ +#define LABEL(name) \ + .globl name ;\ +name: + +/* + * NESTED -- declare procedure that invokes other procedures + */ +#define NESTED(name, localvarsize) \ + .globl name ;\ + ALIGN ;\ +name: ;\ + NESTED_FUNCTION_PROLOGUE(localvarsize) + +/* + * X_NESTED -- declare alternate global label for nested proc + */ +#define X_NESTED(name, value) \ + .globl name ;\ + .set name,value + +/* + * P_NESTED -- declare private nested procedure + */ +#define P_NESTED(name, localvarsize) \ + ALIGN ;\ +name: ;\ + NESTED_FUNCTION_PROLOGUE(localvarsize) + +/* + * END -- mark end of procedure + */ +#define END(name) \ + FUNCTION_EPILOGUE + + +/* + * Storage definition macros + * The main purpose of these is to allow an easy handle for ctags + */ + +/* + * IMPORT -- import symbol + */ +#define IMPORT(name) \ + .reference name + +/* + * ABS -- declare global absolute symbol + */ +#define ABS(name, value) \ + .globl name ;\ + .set name,value + +/* + * P_ABS -- declare private absolute symbol + */ +#define P_ABS(name, value) \ + .set name,value + +/* + * EXPORT -- declare global label for data + */ +#define EXPORT(name) \ + .globl name ;\ +name: + +/* + * BSS -- declare global zero'ed storage + */ +#define BSS(name,size) \ + .comm name,size + + +/* + * P_BSS -- declare private zero'ed storage + */ +#define P_BSS(name,size) \ + .lcomm name,size + +/* + * dynamic/PIC macros for routines which reference external symbols + */ + +#if defined(__DYNAMIC__) +#if defined(__i386__) +#define PICIFY(var) \ + call 1f ; \ +1: ; \ + popl %edx ; \ + movl L ## var ## __non_lazy_ptr-1b(%edx),%edx +#elif defined(__x86_64__) +#define PICIFY(var) \ + movq var@GOTPCREL(%rip),%r11 +#endif + +#if defined(__i386__) +#define CALL_EXTERN_AGAIN(func) \ + PICIFY(func) ; \ + call *%edx +#elif defined(__x86_64__) +#define CALL_EXTERN_AGAIN(func) \ + call func +#endif + +#if defined(__i386__) +#define NON_LAZY_STUB(var) \ +.section __IMPORT,__pointers,non_lazy_symbol_pointers ; \ +L ## var ## __non_lazy_ptr: ; \ +.indirect_symbol var ; \ +.long 0 ; \ +.text +#elif defined(__x86_64__) +#define NON_LAZY_STUB(var) +#endif + +#define CALL_EXTERN(func) \ + CALL_EXTERN_AGAIN(func) ; \ + NON_LAZY_STUB(func) + +#if defined(__i386__) +#define BRANCH_EXTERN(func) \ + PICIFY(func) ; \ + jmp *%edx ; \ + NON_LAZY_STUB(func) +#elif defined(__x86_64__) +#define BRANCH_EXTERN(func) \ + jmp func +#endif + +#if defined(__i386__) +#define PUSH_EXTERN(var) \ + PICIFY(var) ; \ + movl (%edx),%edx ; \ + pushl %edx ; \ + NON_LAZY_STUB(var) +#endif + +#if defined(__i386__) +#define REG_TO_EXTERN(reg, var) \ + PICIFY(var) ; \ + movl reg, (%edx) ; \ + NON_LAZY_STUB(var) +#elif defined(__x86_64__) +#define REG_TO_EXTERN(reg, var) \ + PICIFY(var) ; \ + mov reg, (%r11) +#endif + +#if defined(__i386__) +#define EXTERN_TO_REG(var, reg) \ + call 1f ; \ +1: ; \ + popl %edx ; \ + movl L ## var ##__non_lazy_ptr-1b(%edx),reg ; \ + NON_LAZY_STUB(var) +#elif defined(__x86_64__) +#define EXTERN_TO_REG(var, reg) \ + PICIFY(var) ; \ + mov (%r11), reg +#endif + +#else +#define BRANCH_EXTERN(func) jmp func +#define PUSH_EXTERN(var) push var +#define CALL_EXTERN(func) call func +#define CALL_EXTERN_AGAIN(func) call func +#if defined(__i386__) +#define REG_TO_EXTERN(reg, var) mov reg, var +#define EXTERN_TO_REG(var, reg) mov $ ## var, reg +#elif defined(__x86_64__) +#define REG_TO_EXTERN(reg, var) mov reg, var ## (%rip) +#define EXTERN_TO_REG(var, reg) mov var ## (%rip), reg +#endif +#endif + +#endif /* __ASSEMBLER__ */ + +#endif /* _ARCH_I386_ASM_HELP_H_ */ diff --git a/i386/include/architecture/i386/byte_order.h b/i386/include/architecture/i386/byte_order.h new file mode 100644 index 0000000..60afd0f --- /dev/null +++ b/i386/include/architecture/i386/byte_order.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _ARCH_I386_BYTE_ORDER_H_ +#define _ARCH_I386_BYTE_ORDER_H_ + +/* + * Maintain source compatibility + */ + +#include <architecture/byte_order.h> + +#endif /* _ARCH_I386_BYTE_ORDER_H_ */ diff --git a/i386/include/architecture/i386/cpu.h b/i386/include/architecture/i386/cpu.h new file mode 100644 index 0000000..c5fc807 --- /dev/null +++ b/i386/include/architecture/i386/cpu.h @@ -0,0 +1,74 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1992 NeXT Computer, Inc. + * + * Intel386 Family: Special processor registers. + * + * HISTORY + * + * 5 April 1992 ? at NeXT + * Created. + */ + +#ifndef _ARCH_I386_CPU_H_ +#define _ARCH_I386_CPU_H_ + +/* + * Control register 0 + */ + +typedef struct _cr0 { + unsigned int pe :1, + mp :1, + em :1, + ts :1, + :1, + ne :1, + :10, + wp :1, + :1, + am :1, + :10, + nw :1, + cd :1, + pg :1; +} cr0_t; + +/* + * Debugging register 6 + */ + +typedef struct _dr6 { + unsigned int b0 :1, + b1 :1, + b2 :1, + b3 :1, + :9, + bd :1, + bs :1, + bt :1, + :16; +} dr6_t; + +#endif /* _ARCH_I386_CPU_H_ */ diff --git a/i386/include/architecture/i386/desc.h b/i386/include/architecture/i386/desc.h new file mode 100644 index 0000000..3997a8a --- /dev/null +++ b/i386/include/architecture/i386/desc.h @@ -0,0 +1,150 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1992 NeXT Computer, Inc. + * + * Intel386 Family: Segment descriptors. + * + * HISTORY + * + * 29 March 1992 ? at NeXT + * Created. + */ + +#ifndef _ARCH_I386_DESC_H_ +#define _ARCH_I386_DESC_H_ + +/* + * Code segment descriptor. + */ + +typedef struct code_desc { + unsigned short limit00; + unsigned short base00; + unsigned char base16; + unsigned char type :5, +#define DESC_CODE_EXEC 0x18 +#define DESC_CODE_READ 0x1a + dpl :2, + present :1; + unsigned char limit16 :4, + :2, + opsz :1, +#define DESC_CODE_16B 0 +#define DESC_CODE_32B 1 + granular:1; +#define DESC_GRAN_BYTE 0 +#define DESC_GRAN_PAGE 1 + unsigned char base24; +} code_desc_t; + +/* + * Data segment descriptor. + */ + +typedef struct data_desc { + unsigned short limit00; + unsigned short base00; + unsigned char base16; + unsigned char type :5, +#define DESC_DATA_RONLY 0x10 +#define DESC_DATA_WRITE 0x12 + dpl :2, + present :1; + unsigned char limit16 :4, + :2, + stksz :1, +#define DESC_DATA_16B 0 +#define DESC_DATA_32B 1 + granular:1; + unsigned char base24; +} data_desc_t; + +/* + * LDT segment descriptor. + */ + +typedef struct ldt_desc { + unsigned short limit00; + unsigned short base00; + unsigned char base16; + unsigned char type :5, +#define DESC_LDT 0x02 + :2, + present :1; + unsigned char limit16 :4, + :3, + granular:1; + unsigned char base24; +} ldt_desc_t; + +#include <architecture/i386/sel.h> + +/* + * Call gate descriptor. + */ + +typedef struct call_gate { + unsigned short offset00; + sel_t seg; + unsigned int argcnt :5, + :3, + type :5, +#define DESC_CALL_GATE 0x0c + dpl :2, + present :1, + offset16:16; +} call_gate_t; + +/* + * Trap gate descriptor. + */ + +typedef struct trap_gate { + unsigned short offset00; + sel_t seg; + unsigned int :8, + type :5, +#define DESC_TRAP_GATE 0x0f + dpl :2, + present :1, + offset16:16; +} trap_gate_t; + + +/* + * Interrupt gate descriptor. + */ + +typedef struct intr_gate { + unsigned short offset00; + sel_t seg; + unsigned int :8, + type :5, +#define DESC_INTR_GATE 0x0e + dpl :2, + present :1, + offset16:16; +} intr_gate_t; + +#endif /* _ARCH_I386_DESC_H_ */ diff --git a/i386/include/architecture/i386/fenv.h b/i386/include/architecture/i386/fenv.h new file mode 100644 index 0000000..9a50747 --- /dev/null +++ b/i386/include/architecture/i386/fenv.h @@ -0,0 +1,287 @@ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/******************************************************************************* +* * +* File: fenv.h * +* * +* Contains: typedefs and prototypes for C99 floating point environment. * +* * +*******************************************************************************/ + +#ifndef __FENV__ +#define __FENV__ + +#if defined( __ppc__ ) || defined( __ppc64__ ) + #error Wrong arch. This is Intel only. +#endif + +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC fenv +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* + A collection of functions designed to provide access to the floating + point environment for numerical programming. It is compliant with + the floating-point requirements in C99. + + Earlier versions of fenv.h were merely "modeled after" C9X. Many of the functions + that formerly returned ints now return void to be standard compliant. + + Note: There are actually two physical floating point environments on x86. There + is the one described by the x87 floating point control and status words, which applies + primarily to calculations done with long double on MacOS X for Intel. There is the + MXCSR which applies primarily to calculations done with scalar float, scalar double + and SSE/SSE2/SSE3. The high level interface, which uses FE_ macros as int arguments + to configure the fexcep_t, returns and works with values that represents the logical + OR of these two sets of flags or masks. That is, if a flag or mask is set in either + environment, it will be set in fexcept_t when the state is read. Likewise, setting + the mask using a fexcep_t will set that mask on both environments. For this reason, + changing the value of the MXCSR state or floating point control/status word state on + your own will make the results of the functions declared in this header undefined. + See below for details about how and when. Exception: you may change the FZ, DAZ, DE + and DM bits in the MXCSR independent of this interface and retain defined behavior, + so long as you do not change the other bits. It is suggested that developers who wish + this level of control access the bits in the fenv_t directly. They are direct copies + of the hardware special purpose registers of similar name. Please consult appropriate + Intel documentation for the processor about the meaning of various bits in each register. + + The file <fenv.h> declares many functions in support of numerical + programming. Programs that test flags or run under + non-default modes must do so under the effect of an enabling + "fenv_access" pragma. +*/ + +/******************************************************************************** +* * +* fenv_t is a type for representing the entire floating-point * +* environment in a single object. * +* * +* fexcept_t is a type for representing the floating-point * +* exception flag state collectively. * +* * +********************************************************************************/ +typedef struct { + unsigned short __control; /* A direct copy of the floaing point control word */ + unsigned short __status; /* A direct copy of the floaing point status word */ + unsigned int __mxcsr; /* A direct copy of the MXCSR */ + char __reserved[8]; /* Reserved for future expansion. */ +} fenv_t; + +typedef unsigned short fexcept_t; + +/* Definitions of floating-point exception macros */ +#define FE_INEXACT 0x0020 +#define FE_UNDERFLOW 0x0010 +#define FE_OVERFLOW 0x0008 +#define FE_DIVBYZERO 0x0004 +#define FE_INVALID 0x0001 +#define FE_ALL_EXCEPT 0x003D + +/* Definitions of rounding direction macros */ +#define FE_TONEAREST 0x0000 +#define FE_DOWNWARD 0x0400 +#define FE_UPWARD 0x0800 +#define FE_TOWARDZERO 0x0C00 + +/* default environment object */ +extern const fenv_t _FE_DFL_ENV; +#define FE_DFL_ENV &_FE_DFL_ENV /* pointer to default environment */ + +/******************************************************************************* +* A environment object that sets to defualt settings and in addition sets the * +* FZ and DAZ bits in the MXCSR, which causes flush-to-zero behavior of * +* denormals. When using this environment, denormals encountered by XMM based * +* calculation (which normally should be all single and double precision scalar * +* floating point calculations, and all SSE/SSE2/SSE3 computation) will be * +* treated as zero. Calculation results that are denormals will also be * +* truncated to zero. This calculation mode is not IEEE-754 compliant, but may * +* prevent lengthy stalls that occur in code that encounters denormals. It is * +* suggested that you do not use this mode unless you have established that * +* denormals are causing trouble for your code. Please use wisely. * +* * +* CAUTION: The math library currently is not architected to do the right * +* thing in the face of DAZ + FZ mode. For example, ceil( +denormal) returns * +* +denormal rather than 1.0 in some versions of MacOS X. In some circumstances * +* this may lead to unexpected application behavior. Use at your own risk. * +* * +* It is not possible to disable denorm stalls on calculation using the x87 FPU.* +*******************************************************************************/ +extern const fenv_t _FE_DFL_DISABLE_SSE_DENORMS_ENV; +#define FE_DFL_DISABLE_SSE_DENORMS_ENV &_FE_DFL_DISABLE_SSE_DENORMS_ENV + +/******************************************************************************* +* The following functions provide high level access to the exception flags.* +* The "int" input argument can be constructed by bitwise ORs of the * +* exception macros: for example: FE_OVERFLOW | FE_INEXACT. * +*******************************************************************************/ + +/******************************************************************************* +* The function "feclearexcept" clears the supported floating point * +* exceptions represented by its argument. * +*******************************************************************************/ + +extern int feclearexcept(int /*excepts*/); + + +/******************************************************************************* +* The function "fegetexceptflag" stores a implementation-defined * +* representation of the states of the floating-point status flags indicated * +* by its integer argument excepts in the object pointed to by the argument, * +* flagp. * +*******************************************************************************/ + +extern int fegetexceptflag(fexcept_t * /*flagp*/, int /*excepts*/); + + +/******************************************************************************* +* The function "feraiseexcept" raises the supported floating-point * +* exceptions represented by its argument. The order in which these * +* floating-point exceptions are raised is unspecified. * +*******************************************************************************/ + +extern int feraiseexcept(int /*excepts*/); + + +/******************************************************************************* +* The function "fesetexceptflag" sets or clears the floating point status * +* flags indicated by the argument excepts to the states stored in the * +* object pointed to by flagp. The value of the *flagp shall have been set * +* by a previous call to fegetexceptflag whose second argument represented * +* at least those floating-point exceptions represented by the argument * +* excepts. This function does not raise floating-point exceptions; it just * +* sets the state of the flags. * +*******************************************************************************/ + +extern int fesetexceptflag(const fexcept_t * /*flagp*/, int /*excepts*/); + + +/******************************************************************************* +* The function "fetestexcept" determines which of the specified subset of * +* the floating-point exception flags are currently set. The excepts * +* argument specifies the floating-point status flags to be queried. This * +* function returns the value of the bitwise OR of the floating-point * +* exception macros corresponding to the currently set floating-point * +* exceptions included in excepts. * +* * +* On MacOS X for Intel, the result is the value of union of the * +* corresponding result from the x87 and SSE floating point states. * +*******************************************************************************/ + +extern int fetestexcept(int /*excepts*/); + + +/******************************************************************************* +* The following functions provide control of rounding direction modes. * +*******************************************************************************/ + +/******************************************************************************* +* The function "fegetround" returns the value of the rounding direction * +* macro which represents the current rounding direction, or a negative * +* if there is no such rounding direction macro or the current rounding * +* direction is not determinable. * +*******************************************************************************/ + +extern int fegetround(void); + + +/******************************************************************************* +* The function "fesetround" establishes the rounding direction represented * +* by its argument "round". If the argument is not equal to the value of a * +* rounding direction macro, the rounding direction is not changed. It * +* returns zero if and only if the argument is equal to a rounding * +* direction macro. * +*******************************************************************************/ + +extern int fesetround(int /*round*/); + + +/******************************************************************************* +* The following functions manage the floating-point environment, exception * +* flags and dynamic modes, as one entity. * +*******************************************************************************/ + +/******************************************************************************* +* The fegetenv function stores the current floating-point enviornment in * +* the object pointed to by envp. * +*******************************************************************************/ +extern int fegetenv(fenv_t * /*envp*/); + +/******************************************************************************* +* The feholdexcept function saves the current floating-point environment in * +* the object pointed to by envp, clears the floating-point status flags, * +* and then installs a non-stop (continue on floating-point exceptions) * +* mode, if available, for all floating-point exceptions. The feholdexcept * +* function returns zero if and only if non-stop floating-point exceptions * +* handling was successfully installed. * +*******************************************************************************/ +extern int feholdexcept(fenv_t * /*envp*/); + +/******************************************************************************* +* The fesetnv function establishes the floating-point environment * +* represented by the object pointed to by envp. The argument envp shall * +* point to an object set by a call to fegetenv or feholdexcept, or equal to * +* a floating-point environment macro -- we define only *FE_DFL_ENV and * +* FE_DISABLE_SSE_DENORMS_ENV -- to be C99 standard compliant and portable * +* to other architectures. Note that fesetnv merely installs the state of * +* the floating-point status flags represented through its argument, and * +* does not raise these floating-point exceptions. * +* * +* On MacOS X for Intel you may test and set the bits in *envp yourself, * +* provided that you conditionalize the code appropriately to preserve * +* portability and you follow the various strictures and suggestions * +* provided by Intel in appropriate processor documentation. Please be aware * +* that because there are two hardware locations for setting and reading * +* floating point environment, this function (and others like it) are not * +* atomic -- that is, for a brief period of time during the function call * +* your new environment will have been applied to one but not both of the * +* floating point engines (x87 and SSE). In addition, the behavior of some * +* higher level interfaces (fegetround) is undefined if the x87 and SSE * +* floating point units rounding modes are configured differently. Please * +* use common sense. * +*******************************************************************************/ +extern int fesetenv(const fenv_t * /*envp*/); + +/******************************************************************************* +* The feupdateenv function saves the currently raised floating-point * +* exceptions in its automatic storage, installs the floating-point * +* environment represented by the object pointed to by envp, and then raises * +* the saved floating-point exceptions. The argument envp shall point to an * +* object set by a call to feholdexcept or fegetenv or equal a * +* floating-point environment macro. * +* * +* Please see the description of feholdexcept for additional ways to create * +* a fenv_t object, which are valid only for MacOS X for Intel. * +*******************************************************************************/ +extern int feupdateenv(const fenv_t * /*envp*/); + + +#ifdef __cplusplus +} +#endif + +#endif /* __FENV__ */ + diff --git a/i386/include/architecture/i386/fpu.h b/i386/include/architecture/i386/fpu.h new file mode 100644 index 0000000..29c260b --- /dev/null +++ b/i386/include/architecture/i386/fpu.h @@ -0,0 +1,170 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1992 NeXT Computer, Inc. + * + * Intel386 Family: Floating Point unit. + * + * HISTORY + * + * 5 October 1992 ? at NeXT + * Added names to previously unamed fields in the mantissa. + * + * 5 April 1992 ? at NeXT + * Created. + */ + +#ifndef _ARCH_I386_FPU_H_ +#define _ARCH_I386_FPU_H_ + +/* + * Data register. + */ + +typedef struct fp_data_reg { + unsigned short mant; + unsigned short mant1 :16, + mant2 :16, + mant3 :16; + unsigned short exp :15, + sign :1; +} fp_data_reg_t; + +/* + * Data register stack. + */ + +typedef struct fp_stack { + fp_data_reg_t ST[8]; +} fp_stack_t; + +/* + * Register stack tag word. + */ + +typedef struct fp_tag { + unsigned short tag0 :2, + tag1 :2, + tag2 :2, + tag3 :2, + tag4 :2, + tag5 :2, + tag6 :2, + tag7 :2; +#define FP_TAG_VALID 0 +#define FP_TAG_ZERO 1 +#define FP_TAG_SPEC 2 +#define FP_TAG_EMPTY 3 +} fp_tag_t; + +/* + * Status word. + */ + +typedef struct fp_status { + unsigned short invalid :1, + denorm :1, + zdiv :1, + ovrfl :1, + undfl :1, + precis :1, + stkflt :1, + errsumm :1, + c0 :1, + c1 :1, + c2 :1, + tos :3, + c3 :1, + busy :1; +} fp_status_t; + +/* + * Control word. + */ + +typedef struct fp_control { + unsigned short invalid :1, + denorm :1, + zdiv :1, + ovrfl :1, + undfl :1, + precis :1, + :2, + pc :2, +#define FP_PREC_24B 0 +#define FP_PREC_53B 2 +#define FP_PREC_64B 3 + rc :2, +#define FP_RND_NEAR 0 +#define FP_RND_DOWN 1 +#define FP_RND_UP 2 +#define FP_CHOP 3 + /*inf*/ :1, + :3; +} fp_control_t; + +#include <architecture/i386/sel.h> + +/* + * Floating point 'environment' + * used by FSTENV/FLDENV instructions. + */ + +typedef struct fp_env { + fp_control_t control; + unsigned short :16; + fp_status_t status; + unsigned short :16; + fp_tag_t tag; + unsigned short :16; + unsigned int ip; + sel_t cs; + unsigned short opcode; + unsigned int dp; + sel_t ds; + unsigned short :16; +} fp_env_t; + +/* + * Floating point state + * used by FSAVE/FRSTOR instructions. + */ + +/* + * To allow the the common idiom of: + * #define environ (*_NSGetEnviron()) + * to be used these fields were renamed. Old code that that does + * not use this idiom can use the old field names by defining + * _ARCHITECTURE_I386_FPU_FPSTATE_LEGACY_FIELD_NAMES_ . + */ +typedef struct fp_state { +#if _ARCHITECTURE_I386_FPU_FPSTATE_LEGACY_FIELD_NAMES_ + fp_env_t environ; + fp_stack_t stack; +#else + fp_env_t fp_environ; + fp_stack_t fp_stack; +#endif +} fp_state_t; + +#endif /* _ARCH_I386_FPU_H_ */ diff --git a/i386/include/architecture/i386/frame.h b/i386/include/architecture/i386/frame.h new file mode 100644 index 0000000..112cbcd --- /dev/null +++ b/i386/include/architecture/i386/frame.h @@ -0,0 +1,129 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1992 NeXT Computer, Inc. + * + * Intel386 Family: Processor exception frame. + * + * HISTORY + * + * 31 August 1992 ? at NeXT + * Added v86 mode stuff. + * + * 8 June 1992 ? at NeXT + * Changed name of write field in err_code_t + * which collided with write() in shlib. + * + * 30 March 1992 ? at NeXT + * Created. + */ + +#ifndef _ARCH_I386_FRAME_H_ +#define _ARCH_I386_FRAME_H_ + +/* + * Format of the error code + * generated by the hardware + * for certain exceptions. + */ + +typedef union err_code { + struct err_code_normal { + unsigned int ext :1, + tbl :2, +#define ERR_GDT 0 +#define ERR_IDT 1 +#define ERR_LDT 2 + index :13, + :16; + } normal; + struct err_code_pgfault { + unsigned int prot :1, + wrtflt :1, + user :1, + :29; + } pgfault; +} err_code_t; + +#include <architecture/i386/sel.h> + +/* + * The actual hardware exception frame + * is variable in size. An error code is + * only pushed for certain exceptions. + * Previous stack information is only + * pushed for exceptions that cause a + * change in privilege level. The dpl + * field of the saved CS selector can be + * used to determine whether this is the + * case. If the interrupted task was + * executing in v86 mode, then the data + * segment registers are also present in + * the exception frame (in addition to + * previous stack information). This + * case can be determined by examining + * eflags. + */ + +typedef struct except_frame { + err_code_t err; + unsigned int eip; + sel_t cs; + unsigned int :0; + unsigned int eflags; + unsigned int esp; + sel_t ss; + unsigned int :0; + unsigned short v_es; + unsigned int :0; + unsigned short v_ds; + unsigned int :0; + unsigned short v_fs; + unsigned int :0; + unsigned short v_gs; + unsigned int :0; +} except_frame_t; + +/* + * Values in eflags. + */ + +#define EFL_CF 0x00001 +#define EFL_PF 0x00004 +#define EFL_AF 0x00010 +#define EFL_ZF 0x00040 +#define EFL_SF 0x00080 +#define EFL_TF 0x00100 +#define EFL_IF 0x00200 +#define EFL_DF 0x00400 +#define EFL_OF 0x00800 +#define EFL_IOPL 0x03000 +#define EFL_NT 0x04000 +#define EFL_RF 0x10000 +#define EFL_VM 0x20000 +#define EFL_AC 0x40000 + +#define EFL_CLR 0xfff88028 +#define EFL_SET 0x00000002 + +#endif /* _ARCH_I386_FRAME_H_ */ diff --git a/i386/include/architecture/i386/io.h b/i386/include/architecture/i386/io.h new file mode 100644 index 0000000..07021a1 --- /dev/null +++ b/i386/include/architecture/i386/io.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1992 NeXT Computer, Inc. + * + * Intel 386 Family: IO space defines. + * + * HISTORY + * + * 11 August 1992 ? at NeXT + * Created. + */ + +#ifndef _ARCH_I386_IO_H_ +#define _ARCH_I386_IO_H_ + +typedef unsigned short io_addr_t; +typedef unsigned short io_len_t; + +#endif /* _ARCH_I386_IO_H_ */ diff --git a/i386/include/architecture/i386/math.h b/i386/include/architecture/i386/math.h new file mode 100644 index 0000000..6723ef4 --- /dev/null +++ b/i386/include/architecture/i386/math.h @@ -0,0 +1,642 @@ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/******************************************************************************* +* * +* File: math.h * +* * +* Contains: typedefs, prototypes, and macros germane to C99 floating point.* +* * +*******************************************************************************/ +#ifndef __MATH__ +#define __MATH__ + +#include "sys/cdefs.h" /* For definition of __DARWIN_UNIX03 et al */ + +#ifdef __cplusplus +extern "C" { +#endif + +/****************************************************************************** +* Floating point data types * +******************************************************************************/ + +/* Define float_t and double_t per C standard, ISO/IEC 9899:1999 7.12 2, + taking advantage of GCC's __FLT_EVAL_METHOD__ (which a compiler may + define anytime and GCC does) that shadows FLT_EVAL_METHOD (which a compiler + must and may define only in float.h). +*/ +#if __FLT_EVAL_METHOD__ == 0 + typedef float float_t; + typedef double double_t; +#elif __FLT_EVAL_METHOD__ == 1 + typedef double float_t; + typedef double double_t; +#elif __FLT_EVAL_METHOD__ == 2 || __FLT_EVAL_METHOD__ == -1 + typedef long double float_t; + typedef long double double_t; +#else /* __FLT_EVAL_METHOD__ */ + #error "Unsupported value of __FLT_EVAL_METHOD__." +#endif /* __FLT_EVAL_METHOD__ */ + + +#if defined(__GNUC__) + #define HUGE_VAL __builtin_huge_val() + #define HUGE_VALF __builtin_huge_valf() + #define HUGE_VALL __builtin_huge_vall() + #define NAN __builtin_nanf("0x7fc00000") /* Constant expression, can be used as initializer. */ + #define __MATH_H_ALWAYS_INLINE__ __attribute__ ((always_inline)) +#else + #define HUGE_VAL 1e500 + #define HUGE_VALF 1e50f + #define HUGE_VALL 1e5000L + #define NAN __nan( ) + #define __MATH_H_ALWAYS_INLINE__ +#endif + +#define INFINITY HUGE_VALF + + +/****************************************************************************** +* Taxonomy of floating point data types * +******************************************************************************/ + +#define FP_NAN 1 +#define FP_INFINITE 2 +#define FP_ZERO 3 +#define FP_NORMAL 4 +#define FP_SUBNORMAL 5 +#define FP_SUPERNORMAL 6 /* meaningful only on PowerPC */ + +/* fma() *function call* is more costly than equivalent (in-line) multiply and add operations */ +/* For single and double precision, the cost isn't too bad, because we can fall back on higher */ +/* precision hardware, with the necessary range to handle infinite precision products. However, */ +/* expect the long double fma to be at least an order of magnitude slower than a simple multiply */ +/* and an add. */ +#undef FP_FAST_FMA +#undef FP_FAST_FMAF +#undef FP_FAST_FMAL + +/* The values returned by `ilogb' for 0 and NaN respectively. */ +#define FP_ILOGB0 (-2147483647 - 1) +#define FP_ILOGBNAN (-2147483647 - 1) + +/* Bitmasks for the math_errhandling macro. */ +#define MATH_ERRNO 1 /* errno set by math functions. */ +#define MATH_ERREXCEPT 2 /* Exceptions raised by math functions. */ + +#define math_errhandling (__math_errhandling()) +extern unsigned int __math_errhandling ( void ); + +/******************************************************************************** +* * +* Inquiry macros * +* * +* fpclassify Returns one of the FP_Å values. * +* isnormal Non-zero if and only if the argument x is normalized. * +* isfinite Non-zero if and only if the argument x is finite. * +* isnan Non-zero if and only if the argument x is a NaN. * +* signbit Non-zero if and only if the sign of the argument x is * +* negative. This includes, NaNs, infinities and zeros. * +* * +********************************************************************************/ + +#define fpclassify(x) \ + ( sizeof (x) == sizeof(float ) ? __fpclassifyf((float)(x)) \ + : sizeof (x) == sizeof(double) ? __fpclassifyd((double)(x)) \ + : __fpclassify ((long double)(x))) + +extern int __fpclassifyf(float ); +extern int __fpclassifyd(double ); +extern int __fpclassify (long double); + +#if defined( __GNUC__ ) && 0 == __FINITE_MATH_ONLY__ + /* Yes, that's right. You only get the fast iswhatever() macros if you do NOT turn on -ffast-math. */ + /* These inline functions require the compiler to be compiling to standard in order to work. */ + /* -ffast-math, among other things, implies that NaNs don't happen. The compiler can in that case */ + /* optimize x != x to be false always, wheras it would be true for NaNs. That breaks __inline_isnan() */ + /* below. */ + #define isnormal(x) \ + ( sizeof (x) == sizeof(float ) ? __inline_isnormalf((float)(x)) \ + : sizeof (x) == sizeof(double) ? __inline_isnormald((double)(x)) \ + : __inline_isnormal ((long double)(x))) + + #define isfinite(x) \ + ( sizeof (x) == sizeof(float ) ? __inline_isfinitef((float)(x)) \ + : sizeof (x) == sizeof(double) ? __inline_isfinited((double)(x)) \ + : __inline_isfinite ((long double)(x))) + + #define isinf(x) \ + ( sizeof (x) == sizeof(float ) ? __inline_isinff((float)(x)) \ + : sizeof (x) == sizeof(double) ? __inline_isinfd((double)(x)) \ + : __inline_isinf ((long double)(x))) + + #define isnan(x) \ + ( sizeof (x) == sizeof(float ) ? __inline_isnanf((float)(x)) \ + : sizeof (x) == sizeof(double) ? __inline_isnand((double)(x)) \ + : __inline_isnan ((long double)(x))) + + #define signbit(x) \ + ( sizeof (x) == sizeof(float ) ? __inline_signbitf((float)(x)) \ + : sizeof (x) == sizeof(double) ? __inline_signbitd((double)(x)) \ + : __inline_signbit((long double)(x))) + + static __inline__ int __inline_isfinitef (float ) __MATH_H_ALWAYS_INLINE__; + static __inline__ int __inline_isfinited (double ) __MATH_H_ALWAYS_INLINE__; + static __inline__ int __inline_isfinite (long double) __MATH_H_ALWAYS_INLINE__; + static __inline__ int __inline_isinff (float ) __MATH_H_ALWAYS_INLINE__; + static __inline__ int __inline_isinfd (double ) __MATH_H_ALWAYS_INLINE__; + static __inline__ int __inline_isinf (long double) __MATH_H_ALWAYS_INLINE__; + static __inline__ int __inline_isnanf (float ) __MATH_H_ALWAYS_INLINE__; + static __inline__ int __inline_isnand (double ) __MATH_H_ALWAYS_INLINE__; + static __inline__ int __inline_isnan (long double) __MATH_H_ALWAYS_INLINE__; + static __inline__ int __inline_isnormalf (float ) __MATH_H_ALWAYS_INLINE__; + static __inline__ int __inline_isnormald (double ) __MATH_H_ALWAYS_INLINE__; + static __inline__ int __inline_isnormal (long double) __MATH_H_ALWAYS_INLINE__; + static __inline__ int __inline_signbitf (float ) __MATH_H_ALWAYS_INLINE__; + static __inline__ int __inline_signbitd (double ) __MATH_H_ALWAYS_INLINE__; + static __inline__ int __inline_signbit (long double) __MATH_H_ALWAYS_INLINE__; + + static __inline__ int __inline_isinff( float __x ) { return __builtin_fabsf(__x) == __builtin_inff(); } + static __inline__ int __inline_isinfd( double __x ) { return __builtin_fabs(__x) == __builtin_inf(); } + static __inline__ int __inline_isinf( long double __x ) { return __builtin_fabsl(__x) == __builtin_infl(); } + static __inline__ int __inline_isfinitef( float __x ) { return __x == __x && __builtin_fabsf(__x) != __builtin_inff(); } + static __inline__ int __inline_isfinited( double __x ) { return __x == __x && __builtin_fabs(__x) != __builtin_inf(); } + static __inline__ int __inline_isfinite( long double __x ) { return __x == __x && __builtin_fabsl(__x) != __builtin_infl(); } + static __inline__ int __inline_isnanf( float __x ) { return __x != __x; } + static __inline__ int __inline_isnand( double __x ) { return __x != __x; } + static __inline__ int __inline_isnan( long double __x ) { return __x != __x; } + static __inline__ int __inline_signbitf( float __x ) { union{ float __f; unsigned int __u; }__u; __u.__f = __x; return (int)(__u.__u >> 31); } + static __inline__ int __inline_signbitd( double __x ) { union{ double __f; unsigned int __u[2]; }__u; __u.__f = __x; return (int)(__u.__u[1] >> 31); } + static __inline__ int __inline_signbit( long double __x ){ union{ long double __ld; struct{ unsigned int __m[2]; short __sexp; }__p; }__u; __u.__ld = __x; return (int) (((unsigned short) __u.__p.__sexp) >> 15); } + static __inline__ int __inline_isnormalf( float __x ) { float fabsf = __builtin_fabsf(__x); if( __x != __x ) return 0; return fabsf < __builtin_inff() && fabsf >= __FLT_MIN__; } + static __inline__ int __inline_isnormald( double __x ) { double fabsf = __builtin_fabs(__x); if( __x != __x ) return 0; return fabsf < __builtin_inf() && fabsf >= __DBL_MIN__; } + static __inline__ int __inline_isnormal( long double __x ) { long double fabsf = __builtin_fabsl(__x); if( __x != __x ) return 0; return fabsf < __builtin_infl() && fabsf >= __LDBL_MIN__; } + +#else + + #define isnormal(x) \ + ( sizeof (x) == sizeof(float ) ? __isnormalf((float)(x)) \ + : sizeof (x) == sizeof(double) ? __isnormald((double)(x)) \ + : __isnormal ((long double)(x))) + + #define isfinite(x) \ + ( sizeof (x) == sizeof(float ) ? __isfinitef((float)(x)) \ + : sizeof (x) == sizeof(double) ? __isfinited((double)(x)) \ + : __isfinite ((long double)(x))) + + #define isinf(x) \ + ( sizeof (x) == sizeof(float ) ? __isinff((float)(x)) \ + : sizeof (x) == sizeof(double) ? __isinfd((double)(x)) \ + : __isinf ((long double)(x))) + + #define isnan(x) \ + ( sizeof (x) == sizeof(float ) ? __isnanf((float)(x)) \ + : sizeof (x) == sizeof(double) ? __isnand((double)(x)) \ + : __isnan ((long double)(x))) + + #define signbit(x) \ + ( sizeof (x) == sizeof(float ) ? __signbitf((float)(x)) \ + : sizeof (x) == sizeof(double) ? __signbitd((double)(x)) \ + : __signbitl((long double)(x))) + + + extern int __isnormalf (float ); + extern int __isnormald (double ); + extern int __isnormal (long double); + + extern int __isfinitef (float ); + extern int __isfinited (double ); + extern int __isfinite (long double); + + extern int __isinff (float ); + extern int __isinfd (double ); + extern int __isinf (long double); + + extern int __isnanf (float ); + extern int __isnand (double ); + extern int __isnan (long double); + + extern int __signbitf (float ); + extern int __signbitd (double ); + extern int __signbitl (long double); + +#endif + + + +/******************************************************************************** +* * +* Math Functions * +* * +********************************************************************************/ + +extern double acos( double ); +extern float acosf( float ); + +extern double asin( double ); +extern float asinf( float ); + +extern double atan( double ); +extern float atanf( float ); + +extern double atan2( double, double ); +extern float atan2f( float, float ); + +extern double cos( double ); +extern float cosf( float ); + +extern double sin( double ); +extern float sinf( float ); + +extern double tan( double ); +extern float tanf( float ); + +extern double acosh( double ); +extern float acoshf( float ); + +extern double asinh( double ); +extern float asinhf( float ); + +extern double atanh( double ); +extern float atanhf( float ); + +extern double cosh( double ); +extern float coshf( float ); + +extern double sinh( double ); +extern float sinhf( float ); + +extern double tanh( double ); +extern float tanhf( float ); + +extern double exp ( double ); +extern float expf ( float ); + +extern double exp2 ( double ); +extern float exp2f ( float ); + +extern double expm1 ( double ); +extern float expm1f ( float ); + +extern double log ( double ); +extern float logf ( float ); + +extern double log10 ( double ); +extern float log10f ( float ); + +extern double log2 ( double ); +extern float log2f ( float ); + +extern double log1p ( double ); +extern float log1pf ( float ); + +extern double logb ( double ); +extern float logbf ( float ); + +extern double modf ( double, double * ); +extern float modff ( float, float * ); + +extern double ldexp ( double, int ); +extern float ldexpf ( float, int ); + +extern double frexp ( double, int * ); +extern float frexpf ( float, int * ); + +extern int ilogb ( double ); +extern int ilogbf ( float ); + +extern double scalbn ( double, int ); +extern float scalbnf ( float, int ); + +extern double scalbln ( double, long int ); +extern float scalblnf ( float, long int ); + +extern double fabs( double ); +extern float fabsf( float ); + +extern double cbrt( double ); +extern float cbrtf( float ); + +extern double hypot ( double, double ); +extern float hypotf ( float, float ); + +extern double pow ( double, double ); +extern float powf ( float, float ); + +extern double sqrt( double ); +extern float sqrtf( float ); + +extern double erf( double ); +extern float erff( float ); + +extern double erfc( double ); +extern float erfcf( float ); + +/* lgamma and lgammaf are not thread-safe. The thread-safe variants + * lgamma_r and lgammaf_r are available on OS X 10.6 and later. + * + * To use the thread-safe variants, you must define the _REENTRANT symbol. + */ +extern double lgamma( double ); +extern float lgammaf( float ); + +extern double tgamma( double ); +extern float tgammaf( float ); + +extern double ceil ( double ); +extern float ceilf ( float ); + +extern double floor ( double ); +extern float floorf ( float ); + +extern double nearbyint ( double ); +extern float nearbyintf ( float ); + +extern double rint ( double ); +extern float rintf ( float ); + +extern long int lrint ( double ); +extern long int lrintf ( float ); + +extern double round ( double ); +extern float roundf ( float ); + +extern long int lround ( double ); +extern long int lroundf ( float ); + +#if ( defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) || ! defined( __STRICT_ANSI__ ) || ! defined( __GNUC__ ) + + /* long long is not part of C90. Make sure you are passing -std=c99 or -std=gnu99 or better if you need this. */ + extern long long int llrint ( double ); + extern long long int llrintf ( float ); + + extern long long int llround ( double ); + extern long long int llroundf ( float ); + +#endif /* #if ( defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) || ! defined( __STRICT_ANSI__ ) || ! defined( __GNUC__ ) */ + +extern double trunc ( double ); +extern float truncf ( float ); + +extern double fmod ( double, double ); +extern float fmodf ( float, float ); + +extern double remainder ( double, double ); +extern float remainderf ( float, float ); + +extern double remquo ( double, double, int * ); +extern float remquof ( float, float, int * ); + +extern double copysign ( double, double ); +extern float copysignf ( float, float ); + +extern double nan( const char * ); +extern float nanf( const char * ); + +extern double nextafter ( double, double ); +extern float nextafterf ( float, float ); + +extern double fdim ( double, double ); +extern float fdimf ( float, float ); + +extern double fmax ( double, double ); +extern float fmaxf ( float, float ); + +extern double fmin ( double, double ); +extern float fminf ( float, float ); + +extern double fma ( double, double, double ); +extern float fmaf ( float, float, float ); + +extern long double acosl(long double); +extern long double asinl(long double); +extern long double atanl(long double); +extern long double atan2l(long double, long double); +extern long double cosl(long double); +extern long double sinl(long double); +extern long double tanl(long double); +extern long double acoshl(long double); +extern long double asinhl(long double); +extern long double atanhl(long double); +extern long double coshl(long double); +extern long double sinhl(long double); +extern long double tanhl(long double); +extern long double expl(long double); +extern long double exp2l(long double); +extern long double expm1l(long double); +extern long double logl(long double); +extern long double log10l(long double); +extern long double log2l(long double); +extern long double log1pl(long double); +extern long double logbl(long double); +extern long double modfl(long double, long double *); +extern long double ldexpl(long double, int); +extern long double frexpl(long double, int *); +extern int ilogbl(long double); +extern long double scalbnl(long double, int); +extern long double scalblnl(long double, long int); +extern long double fabsl(long double); +extern long double cbrtl(long double); +extern long double hypotl(long double, long double); +extern long double powl(long double, long double); +extern long double sqrtl(long double); +extern long double erfl(long double); +extern long double erfcl(long double); + +/* lgammal is not thread-safe. + * The thread-safe variant lgammal_r is available on OS X 10.6 and later. + * + * To use the thread-safe variant, you must define the _REENTRANT symbol. + */ +extern long double lgammal(long double); + +extern long double tgammal(long double); +extern long double ceill(long double); +extern long double floorl(long double); +extern long double nearbyintl(long double); +extern long double rintl(long double); +extern long int lrintl(long double); +extern long double roundl(long double); +extern long int lroundl(long double); + +#if ( defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) || ! defined( __STRICT_ANSI__ ) || ! defined( __GNUC__ ) + /* long long is not part of C90. Make sure you are passing -std=c99 or -std=gnu99 or better if you need this. */ + extern long long int llrintl(long double); + extern long long int llroundl(long double); +#endif /* #if ( defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) || ! defined( __STRICT_ANSI__ ) || ! defined( __GNUC__ ) */ + +extern long double truncl(long double); +extern long double fmodl(long double, long double); +extern long double remainderl(long double, long double); +extern long double remquol(long double, long double, int *); +extern long double copysignl(long double, long double); +extern long double nanl(const char *); +extern long double nextafterl(long double, long double); +extern double nexttoward(double, long double); +extern float nexttowardf(float, long double); +extern long double nexttowardl(long double, long double); +extern long double fdiml(long double, long double); +extern long double fmaxl(long double, long double); +extern long double fminl(long double, long double); +extern long double fmal(long double, long double, long double); + +#define isgreater(x, y) __builtin_isgreater ((x),(y)) +#define isgreaterequal(x, y) __builtin_isgreaterequal ((x),(y)) +#define isless(x, y) __builtin_isless ((x),(y)) +#define islessequal(x, y) __builtin_islessequal ((x),(y)) +#define islessgreater(x, y) __builtin_islessgreater ((x),(y)) +#define isunordered(x, y) __builtin_isunordered ((x),(y)) + +extern double __inf( void ); +extern float __inff( void ); +extern long double __infl( void ); +extern float __nan( void ); /* 10.3 (and later) must retain in ABI for backward compatability */ + +#if !defined(_ANSI_SOURCE) +extern double j0 ( double ); + +extern double j1 ( double ); + +extern double jn ( int, double ); + +extern double y0 ( double ); + +extern double y1 ( double ); + +extern double yn ( int, double ); + +extern double scalb ( double, double ); + + +#define M_E 2.71828182845904523536028747135266250 /* e */ +#define M_LOG2E 1.44269504088896340735992468100189214 /* log 2e */ +#define M_LOG10E 0.434294481903251827651128918916605082 /* log 10e */ +#define M_LN2 0.693147180559945309417232121458176568 /* log e2 */ +#define M_LN10 2.30258509299404568401799145468436421 /* log e10 */ +#define M_PI 3.14159265358979323846264338327950288 /* pi */ +#define M_PI_2 1.57079632679489661923132169163975144 /* pi/2 */ +#define M_PI_4 0.785398163397448309615660845819875721 /* pi/4 */ +#define M_1_PI 0.318309886183790671537767526745028724 /* 1/pi */ +#define M_2_PI 0.636619772367581343075535053490057448 /* 2/pi */ +#define M_2_SQRTPI 1.12837916709551257389615890312154517 /* 2/sqrt(pi) */ +#define M_SQRT2 1.41421356237309504880168872420969808 /* sqrt(2) */ +#define M_SQRT1_2 0.707106781186547524400844362104849039 /* 1/sqrt(2) */ + +#define MAXFLOAT ((float)3.40282346638528860e+38) +extern int signgam; /* required for unix 2003 */ + + +#endif /* !defined(_ANSI_SOURCE) */ + +#if !defined(__NOEXTENSIONS__) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) +#define __WANT_EXTENSIONS__ +#endif + +#ifdef __WANT_EXTENSIONS__ + +#define FP_SNAN FP_NAN +#define FP_QNAN FP_NAN + +extern long int rinttol ( double ); /* Legacy API: please use C99 lrint() instead. */ + +extern long int roundtol ( double ); /* Legacy API: please use C99 lround() instead. */ + +/* + * XOPEN/SVID + */ +#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) +#if (!defined(_XOPEN_SOURCE) || defined(_DARWIN_C_SOURCE)) +#if !defined(__cplusplus) +/* used by matherr below */ +struct exception { + int type; + char *name; + double arg1; + double arg2; + double retval; +}; +#endif + +#define HUGE MAXFLOAT + +/* + * set X_TLOSS = pi*2**52, which is possibly defined in <values.h> + * (one may replace the following line by "#include <values.h>") + */ + +#define X_TLOSS 1.41484755040568800000e+16 + +#define DOMAIN 1 +#define SING 2 +#define OVERFLOW 3 +#define UNDERFLOW 4 +#define TLOSS 5 +#define PLOSS 6 + +#endif /* (!_XOPEN_SOURCE || _DARWIN_C_SOURCE) */ +#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + +#if !defined( __STRICT_ANSI__) && !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) +extern int finite ( double ); /* Legacy API: please use C99 isfinite() instead. */ + +extern double gamma ( double ); /* Legacy API: please use C99 tgamma() instead. */ + +#if (!defined(_XOPEN_SOURCE) || defined(_DARWIN_C_SOURCE)) + +#if !defined(__cplusplus) +extern int matherr ( struct exception * ); +#endif + +/* + * IEEE Test Vector + */ +extern double significand ( double ); + +/* + * BSD math library entry points + */ +extern double drem ( double, double ); /* Legacy API: please use C99 remainder() instead. */ + +/* + * Reentrant version of lgamma; passes signgam back by reference + * as the second argument; user must allocate space for signgam. + */ + +#ifdef _REENTRANT + #include <AvailabilityMacros.h> + // Available on OS X 10.6 and later. + extern float lgammaf_r ( float, int * ) AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER; + extern double lgamma_r ( double, int * ) AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER; + extern long double lgammal_r ( long double, int * ) AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER; +#endif /* _REENTRANT */ + +#endif /* (!_XOPEN_SOURCE || _DARWIN_C_SOURCE) */ +#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + +#endif /* __WANT_EXTENSIONS__ */ + +#ifdef __cplusplus +} +#endif + +#endif /* __MATH__ */ diff --git a/i386/include/architecture/i386/pio.h b/i386/include/architecture/i386/pio.h new file mode 100644 index 0000000..338f158 --- /dev/null +++ b/i386/include/architecture/i386/pio.h @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +#ifndef _ARCH_I386_PIO_H_ +#define _ARCH_I386_PIO_H_ + +typedef unsigned short i386_ioport_t; + +#if defined(__GNUC__) +static __inline__ unsigned long inl( + i386_ioport_t port) +{ + unsigned long datum; + __asm__ volatile("inl %w1, %0" : "=a" (datum) : "Nd" (port)); + return(datum); +} + +static __inline__ unsigned short inw( + i386_ioport_t port) +{ + unsigned short datum; + __asm__ volatile("inw %w1, %w0" : "=a" (datum) : "Nd" (port)); + return(datum); +} + +static __inline__ unsigned char inb( + i386_ioport_t port) +{ + unsigned char datum; + __asm__ volatile("inb %w1, %b0" : "=a" (datum) : "Nd" (port)); + return(datum); +} + +static __inline__ void outl( + i386_ioport_t port, + unsigned long datum) +{ + __asm__ volatile("outl %0, %w1" : : "a" (datum), "Nd" (port)); +} + +static __inline__ void outw( + i386_ioport_t port, + unsigned short datum) +{ + __asm__ volatile("outw %w0, %w1" : : "a" (datum), "Nd" (port)); +} + +static __inline__ void outb( + i386_ioport_t port, + unsigned char datum) +{ + __asm__ volatile("outb %b0, %w1" : : "a" (datum), "Nd" (port)); +} +#endif /* defined(__GNUC__) */ +#endif /* _ARCH_I386_PIO_H_ */ diff --git a/i386/include/architecture/i386/reg_help.h b/i386/include/architecture/i386/reg_help.h new file mode 100644 index 0000000..98c18c5 --- /dev/null +++ b/i386/include/architecture/i386/reg_help.h @@ -0,0 +1,105 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1991 NeXT Computer, Inc. All rights reserved. + * + * File: architecture/i386/reg_help.h + * Author: Mike DeMoney, NeXT Computer, Inc. + * Modified for i386 by: Bruce Martin, NeXT Computer, Inc. + * + * This header file defines cpp macros useful for defining + * machine register and doing machine-level operations. + * + * HISTORY + * 10-Mar-92 Bruce Martin (bmartin@next.com) + * Adapted to i386 + * 23-Jan-91 Mike DeMoney (mike@next.com) + * Created. + */ + +#ifndef _ARCH_I386_REG_HELP_H_ +#define _ARCH_I386_REG_HELP_H_ + +/* Bitfield definition aid */ +#define BITS_WIDTH(msb, lsb) ((msb)-(lsb)+1) +#define BIT_WIDTH(pos) (1) /* mostly to record the position */ + +/* Mask creation */ +#define MKMASK(width, offset) (((unsigned)-1)>>(32-(width))<<(offset)) +#define BITSMASK(msb, lsb) MKMASK(BITS_WIDTH(msb, lsb), lsb & 0x1f) +#define BITMASK(pos) MKMASK(BIT_WIDTH(pos), pos & 0x1f) + +/* Register addresses */ +#if __ASSEMBLER__ +# define REG_ADDR(type, addr) (addr) +#else /* __ASSEMBLER__ */ +# define REG_ADDR(type, addr) (*(volatile type *)(addr)) +#endif /* __ASSEMBLER__ */ + +/* Cast a register to be an unsigned */ +#define CONTENTS(foo) (*(unsigned *) &(foo)) + +/* Stack pointer must always be a multiple of 4 */ +#define STACK_INCR 4 +#define ROUND_FRAME(x) ((((unsigned)(x)) + STACK_INCR - 1) & ~(STACK_INCR-1)) + +/* STRINGIFY -- perform all possible substitutions, then stringify */ +#define __STR(x) #x /* just a helper macro */ +#define STRINGIFY(x) __STR(x) + +/* + * REG_PAIR_DEF -- define a register pair + * Register pairs are appropriately aligned to allow access via + * ld.d and st.d. + * + * Usage: + * struct foo { + * REG_PAIR_DEF( + * bar_t *, barp, + * afu_t, afu + * ); + * }; + * + * Access to individual entries of the pair is via the REG_PAIR + * macro (below). + */ +#define REG_PAIR_DEF(type0, name0, type1, name1) \ + struct { \ + type0 name0 __attribute__(( aligned(8) )); \ + type1 name1; \ + } name0##_##name1 + +/* + * REG_PAIR -- Macro to define names for accessing individual registers + * of register pairs. + * + * Usage: + * arg0 is first element of pair + * arg1 is second element of pair + * arg2 is desired element of pair + * eg: + * #define foo_barp REG_PAIR(barp, afu, afu) + */ +#define REG_PAIR(name0, name1, the_name) \ + name0##_##name1.the_name + +#endif /* _ARCH_I386_REG_HELP_H_ */ diff --git a/i386/include/architecture/i386/sel.h b/i386/include/architecture/i386/sel.h new file mode 100644 index 0000000..80cb516 --- /dev/null +++ b/i386/include/architecture/i386/sel.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1992 NeXT Computer, Inc. + * + * Intel386 Family: Segment selector. + * + * HISTORY + * + * 29 March 1992 ? at NeXT + * Created. + */ + +#ifndef _ARCH_I386_SEL_H_ +#define _ARCH_I386_SEL_H_ + +/* + * Segment selector. + */ + +typedef struct sel { + unsigned short rpl :2, +#define KERN_PRIV 0 +#define USER_PRIV 3 + ti :1, +#define SEL_GDT 0 +#define SEL_LDT 1 + index :13; +} sel_t; + +#define NULL_SEL ((sel_t) { 0, 0, 0 } ) + +#endif /* _ARCH_I386_SEL_H_ */ diff --git a/i386/include/architecture/i386/table.h b/i386/include/architecture/i386/table.h new file mode 100644 index 0000000..3ce1f81 --- /dev/null +++ b/i386/include/architecture/i386/table.h @@ -0,0 +1,98 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1992 NeXT Computer, Inc. + * + * Intel386 Family: Descriptor tables. + * + * HISTORY + * + * 30 March 1992 ? at NeXT + * Created. + */ + +#ifndef _ARCH_I386_TABLE_H_ +#define _ARCH_I386_TABLE_H_ + +#include <architecture/i386/desc.h> +#include <architecture/i386/tss.h> + +/* + * A totally generic descriptor + * table entry. + */ + +typedef union dt_entry { + code_desc_t code; + data_desc_t data; + ldt_desc_t ldt; + tss_desc_t task_state; + call_gate_t call_gate; + trap_gate_t trap_gate; + intr_gate_t intr_gate; + task_gate_t task_gate; +} dt_entry_t; + +#define DESC_TBL_MAX 8192 + +/* + * Global descriptor table. + */ + +typedef union gdt_entry { + code_desc_t code; + data_desc_t data; + ldt_desc_t ldt; + call_gate_t call_gate; + task_gate_t task_gate; + tss_desc_t task_state; +} gdt_entry_t; + +typedef gdt_entry_t gdt_t; + +/* + * Interrupt descriptor table. + */ + +typedef union idt_entry { + trap_gate_t trap_gate; + intr_gate_t intr_gate; + task_gate_t task_gate; +} idt_entry_t; + +typedef idt_entry_t idt_t; + +/* + * Local descriptor table. + */ + +typedef union ldt_entry { + code_desc_t code; + data_desc_t data; + call_gate_t call_gate; + task_gate_t task_gate; +} ldt_entry_t; + +typedef ldt_entry_t ldt_t; + +#endif /* _ARCH_I386_TABLE_H_ */ diff --git a/i386/include/architecture/i386/tss.h b/i386/include/architecture/i386/tss.h new file mode 100644 index 0000000..7f060ec --- /dev/null +++ b/i386/include/architecture/i386/tss.h @@ -0,0 +1,120 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1992 NeXT Computer, Inc. + * + * Intel386 Family: Task State Segment. + * + * HISTORY + * + * 29 March 1992 ? at NeXT + * Created. + */ + +#ifndef _ARCH_I386_TSS_H_ +#define _ARCH_I386_TSS_H_ + +#include <architecture/i386/sel.h> + +/* + * Task State segment. + */ + +typedef struct tss { + sel_t oldtss; + unsigned int :0; + unsigned int esp0; + sel_t ss0; + unsigned int :0; + unsigned int esp1; + sel_t ss1; + unsigned int :0; + unsigned int esp2; + sel_t ss2; + unsigned int :0; + unsigned int cr3; + unsigned int eip; + unsigned int eflags; + unsigned int eax; + unsigned int ecx; + unsigned int edx; + unsigned int ebx; + unsigned int esp; + unsigned int ebp; + unsigned int esi; + unsigned int edi; + sel_t es; + unsigned int :0; + sel_t cs; + unsigned int :0; + sel_t ss; + unsigned int :0; + sel_t ds; + unsigned int :0; + sel_t fs; + unsigned int :0; + sel_t gs; + unsigned int :0; + sel_t ldt; + unsigned int :0; + unsigned int t :1, + :15, + io_bmap :16; +} tss_t; + +#define TSS_SIZE(n) (sizeof (struct tss) + (n)) + +/* + * Task State segment descriptor. + */ + +typedef struct tss_desc { + unsigned short limit00; + unsigned short base00; + unsigned char base16; + unsigned char type :5, +#define DESC_TSS 0x09 + dpl :2, + present :1; + unsigned char limit16 :4, + :3, + granular:1; + unsigned char base24; +} tss_desc_t; + +/* + * Task gate descriptor. + */ + +typedef struct task_gate { + unsigned short :16; + sel_t tss; + unsigned int :8, + type :5, +#define DESC_TASK_GATE 0x05 + dpl :2, + present :1, + :0; +} task_gate_t; + +#endif /* _ARCH_I386_TSS_H_ */ diff --git a/i386/include/assert.h b/i386/include/assert.h new file mode 100644 index 0000000..1bfea51 --- /dev/null +++ b/i386/include/assert.h @@ -0,0 +1,92 @@ +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * (c) UNIX System Laboratories, Inc. + * All or some portions of this file are derived from material licensed + * to the University of California by American Telephone and Telegraph + * Co. or Unix System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)assert.h 8.2 (Berkeley) 1/21/94 + * $FreeBSD: src/include/assert.h,v 1.4 2002/03/23 17:24:53 imp Exp $ + */ + +#include <sys/cdefs.h> +#ifdef __cplusplus +#include <stdlib.h> +#endif /* __cplusplus */ + +/* + * Unlike other ANSI header files, <assert.h> may usefully be included + * multiple times, with and without NDEBUG defined. + */ + +#undef assert +#undef __assert + +#ifdef NDEBUG +#define assert(e) ((void)0) +#else + +#ifndef __GNUC__ + +__BEGIN_DECLS +#ifndef __cplusplus +void abort(void) __dead2; +#endif /* !__cplusplus */ +int printf(const char * __restrict, ...); +__END_DECLS + +#define assert(e) \ + ((void) ((e) ? 0 : __assert (#e, __FILE__, __LINE__))) +#define __assert(e, file, line) \ + ((void)printf ("%s:%u: failed assertion `%s'\n", file, line, e), abort()) + +#else /* __GNUC__ */ + +__BEGIN_DECLS +void __assert_rtn(const char *, const char *, int, const char *) __dead2; +void __eprintf(const char *, const char *, unsigned, const char *) __dead2; +__END_DECLS + +#define __assert(e, file, line) \ + __eprintf ("%s:%u: failed assertion `%s'\n", file, line, e) + +#if __DARWIN_UNIX03 +#define assert(e) \ + (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0) +#else /* !__DARWIN_UNIX03 */ +#define assert(e) \ + (__builtin_expect(!(e), 0) ? __assert (#e, __FILE__, __LINE__) : (void)0) +#endif /* __DARWIN_UNIX03 */ + +#endif /* __GNUC__ */ +#endif /* NDEBUG */ diff --git a/i386/include/ctype.h b/i386/include/ctype.h new file mode 100644 index 0000000..58dca3d --- /dev/null +++ b/i386/include/ctype.h @@ -0,0 +1,438 @@ +/* + * Copyright (c) 2000, 2005, 2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * (c) UNIX System Laboratories, Inc. + * All or some portions of this file are derived from material licensed + * to the University of California by American Telephone and Telegraph + * Co. or Unix System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + * + * This code is derived from software contributed to Berkeley by + * Paul Borman at Krystal Technologies. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)ctype.h 8.4 (Berkeley) 1/21/94 + */ + +//Begin-Libc +//#include "xlocale_private.h" +//End-Libc +#ifndef _CTYPE_H_ +#define _CTYPE_H_ + +#include <runetype.h> + +#define _CTYPE_A 0x00000100L /* Alpha */ +#define _CTYPE_C 0x00000200L /* Control */ +#define _CTYPE_D 0x00000400L /* Digit */ +#define _CTYPE_G 0x00000800L /* Graph */ +#define _CTYPE_L 0x00001000L /* Lower */ +#define _CTYPE_P 0x00002000L /* Punct */ +#define _CTYPE_S 0x00004000L /* Space */ +#define _CTYPE_U 0x00008000L /* Upper */ +#define _CTYPE_X 0x00010000L /* X digit */ +#define _CTYPE_B 0x00020000L /* Blank */ +#define _CTYPE_R 0x00040000L /* Print */ +#define _CTYPE_I 0x00080000L /* Ideogram */ +#define _CTYPE_T 0x00100000L /* Special */ +#define _CTYPE_Q 0x00200000L /* Phonogram */ +#define _CTYPE_SW0 0x20000000L /* 0 width character */ +#define _CTYPE_SW1 0x40000000L /* 1 width character */ +#define _CTYPE_SW2 0x80000000L /* 2 width character */ +#define _CTYPE_SW3 0xc0000000L /* 3 width character */ +#define _CTYPE_SWM 0xe0000000L /* Mask for screen width data */ +#define _CTYPE_SWS 30 /* Bits to shift to get width */ + +#ifdef _NONSTD_SOURCE +/* + * Backward compatibility + */ +#define _A _CTYPE_A /* Alpha */ +#define _C _CTYPE_C /* Control */ +#define _D _CTYPE_D /* Digit */ +#define _G _CTYPE_G /* Graph */ +#define _L _CTYPE_L /* Lower */ +#define _P _CTYPE_P /* Punct */ +#define _S _CTYPE_S /* Space */ +#define _U _CTYPE_U /* Upper */ +#define _X _CTYPE_X /* X digit */ +#define _B _CTYPE_B /* Blank */ +#define _R _CTYPE_R /* Print */ +#define _I _CTYPE_I /* Ideogram */ +#define _T _CTYPE_T /* Special */ +#define _Q _CTYPE_Q /* Phonogram */ +#define _SW0 _CTYPE_SW0 /* 0 width character */ +#define _SW1 _CTYPE_SW1 /* 1 width character */ +#define _SW2 _CTYPE_SW2 /* 2 width character */ +#define _SW3 _CTYPE_SW3 /* 3 width character */ +#endif /* _NONSTD_SOURCE */ + +/* + * _EXTERNALIZE_CTYPE_INLINES_ is defined in locale/nomacros.c to tell us + * to generate code for extern versions of all intermediate inline functions. + */ +#ifdef _EXTERNALIZE_CTYPE_INLINES_ +#define _USE_CTYPE_INLINE_ +#define __DARWIN_CTYPE_static_inline +#else /* !_EXTERNALIZE_CTYPE_INLINES_ */ +#define __DARWIN_CTYPE_static_inline static __inline +#endif /* !_EXTERNALIZE_CTYPE_INLINES_ */ + +/* + * _EXTERNALIZE_CTYPE_INLINES_TOP_ is defined in locale/isctype.c to tell us + * to generate code for extern versions of all top-level inline functions. + */ +#ifdef _EXTERNALIZE_CTYPE_INLINES_TOP_ +#define _USE_CTYPE_INLINE_ +#define __DARWIN_CTYPE_TOP_static_inline +#else /* !_EXTERNALIZE_CTYPE_INLINES_TOP_ */ +#define __DARWIN_CTYPE_TOP_static_inline static __inline +#endif /* _EXTERNALIZE_CTYPE_INLINES_TOP_ */ + +/* + * Use inline functions if we are allowed to and the compiler supports them. + */ +#if !defined(_DONT_USE_CTYPE_INLINE_) && \ + (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus)) + +/* See comments in <machine/_type.h> about __darwin_ct_rune_t. */ +__BEGIN_DECLS +unsigned long ___runetype(__darwin_ct_rune_t); +__darwin_ct_rune_t ___tolower(__darwin_ct_rune_t); +__darwin_ct_rune_t ___toupper(__darwin_ct_rune_t); +__END_DECLS + +__DARWIN_CTYPE_TOP_static_inline int +isascii(int _c) +{ + return ((_c & ~0x7F) == 0); +} + +#ifdef USE_ASCII +__DARWIN_CTYPE_static_inline int +__maskrune(__darwin_ct_rune_t _c, unsigned long _f) +{ + return _DefaultRuneLocale.__runetype[_c & 0xff] & _f; +} +//Begin-Libc +#elif defined(__LIBC__) +__DARWIN_CTYPE_static_inline int +__maskrune(__darwin_ct_rune_t _c, unsigned long _f) +{ + return ((_c < 0 || _c >= _CACHED_RUNES) ? ___runetype(_c) : + __current_locale()->__lc_ctype->_CurrentRuneLocale.__runetype[_c]) & _f; +} +//End-Libc +#else /* !USE_ASCII */ +__BEGIN_DECLS +int __maskrune(__darwin_ct_rune_t, unsigned long); +__END_DECLS +#endif /* USE_ASCII */ + +__DARWIN_CTYPE_static_inline int +__istype(__darwin_ct_rune_t _c, unsigned long _f) +{ +#ifdef USE_ASCII + return !!(__maskrune(_c, _f)); +#else /* USE_ASCII */ + return (isascii(_c) ? !!(_DefaultRuneLocale.__runetype[_c] & _f) + : !!__maskrune(_c, _f)); +#endif /* USE_ASCII */ +} + +__DARWIN_CTYPE_static_inline __darwin_ct_rune_t +__isctype(__darwin_ct_rune_t _c, unsigned long _f) +{ +#ifdef USE_ASCII + return !!(__maskrune(_c, _f)); +#else /* USE_ASCII */ + return (_c < 0 || _c >= _CACHED_RUNES) ? 0 : + !!(_DefaultRuneLocale.__runetype[_c] & _f); +#endif /* USE_ASCII */ +} + +#ifdef USE_ASCII +__DARWIN_CTYPE_static_inline __darwin_ct_rune_t +__toupper(__darwin_ct_rune_t _c) +{ + return _DefaultRuneLocale.__mapupper[_c & 0xff]; +} + +__DARWIN_CTYPE_static_inline __darwin_ct_rune_t +__tolower(__darwin_ct_rune_t _c) +{ + return _DefaultRuneLocale.__maplower[_c & 0xff]; +} +//Begin-Libc +#elif defined(__LIBC__) +/* + * We can't do what we do for __toupper_l() (check for ASCII first, then call + * ___toupper_l() otherwise) because versions of ___toupper() before Tiger + * assume c >= _CACHED_RUNES. So we are stuck making __toupper() a routine + * to hide the extended locale details, outside of Libc. + */ +__DARWIN_CTYPE_static_inline __darwin_ct_rune_t +__toupper(__darwin_ct_rune_t _c) +{ + return (_c < 0 || _c >= _CACHED_RUNES) ? ___toupper(_c) : + __current_locale()->__lc_ctype->_CurrentRuneLocale.__mapupper[_c]; +} + +__DARWIN_CTYPE_static_inline __darwin_ct_rune_t +__tolower(__darwin_ct_rune_t _c) +{ + return (_c < 0 || _c >= _CACHED_RUNES) ? ___tolower(_c) : + __current_locale()->__lc_ctype->_CurrentRuneLocale.__maplower[_c]; +} +//End-Libc +#else /* !USE_ASCII */ +__BEGIN_DECLS +__darwin_ct_rune_t __toupper(__darwin_ct_rune_t); +__darwin_ct_rune_t __tolower(__darwin_ct_rune_t); +__END_DECLS +#endif /* USE_ASCII */ + +__DARWIN_CTYPE_static_inline int +__wcwidth(__darwin_ct_rune_t _c) +{ + unsigned int _x; + + if (_c == 0) + return (0); + _x = (unsigned int)__maskrune(_c, _CTYPE_SWM|_CTYPE_R); + if ((_x & _CTYPE_SWM) != 0) + return ((_x & _CTYPE_SWM) >> _CTYPE_SWS); + return ((_x & _CTYPE_R) != 0 ? 1 : -1); +} + +#ifndef _EXTERNALIZE_CTYPE_INLINES_ + +#define _tolower(c) __tolower(c) +#define _toupper(c) __toupper(c) + +__DARWIN_CTYPE_TOP_static_inline int +isalnum(int _c) +{ + return (__istype(_c, _CTYPE_A|_CTYPE_D)); +} + +__DARWIN_CTYPE_TOP_static_inline int +isalpha(int _c) +{ + return (__istype(_c, _CTYPE_A)); +} + +__DARWIN_CTYPE_TOP_static_inline int +isblank(int _c) +{ + return (__istype(_c, _CTYPE_B)); +} + +__DARWIN_CTYPE_TOP_static_inline int +iscntrl(int _c) +{ + return (__istype(_c, _CTYPE_C)); +} + +/* ANSI -- locale independent */ +__DARWIN_CTYPE_TOP_static_inline int +isdigit(int _c) +{ + return (__isctype(_c, _CTYPE_D)); +} + +__DARWIN_CTYPE_TOP_static_inline int +isgraph(int _c) +{ + return (__istype(_c, _CTYPE_G)); +} + +__DARWIN_CTYPE_TOP_static_inline int +islower(int _c) +{ + return (__istype(_c, _CTYPE_L)); +} + +__DARWIN_CTYPE_TOP_static_inline int +isprint(int _c) +{ + return (__istype(_c, _CTYPE_R)); +} + +__DARWIN_CTYPE_TOP_static_inline int +ispunct(int _c) +{ + return (__istype(_c, _CTYPE_P)); +} + +__DARWIN_CTYPE_TOP_static_inline int +isspace(int _c) +{ + return (__istype(_c, _CTYPE_S)); +} + +__DARWIN_CTYPE_TOP_static_inline int +isupper(int _c) +{ + return (__istype(_c, _CTYPE_U)); +} + +/* ANSI -- locale independent */ +__DARWIN_CTYPE_TOP_static_inline int +isxdigit(int _c) +{ + return (__isctype(_c, _CTYPE_X)); +} + +__DARWIN_CTYPE_TOP_static_inline int +toascii(int _c) +{ + return (_c & 0x7F); +} + +__DARWIN_CTYPE_TOP_static_inline int +tolower(int _c) +{ + return (__tolower(_c)); +} + +__DARWIN_CTYPE_TOP_static_inline int +toupper(int _c) +{ + return (__toupper(_c)); +} + +#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) +__DARWIN_CTYPE_TOP_static_inline int +digittoint(int _c) +{ + return (__maskrune(_c, 0x0F)); +} + +__DARWIN_CTYPE_TOP_static_inline int +ishexnumber(int _c) +{ + return (__istype(_c, _CTYPE_X)); +} + +__DARWIN_CTYPE_TOP_static_inline int +isideogram(int _c) +{ + return (__istype(_c, _CTYPE_I)); +} + +__DARWIN_CTYPE_TOP_static_inline int +isnumber(int _c) +{ + return (__istype(_c, _CTYPE_D)); +} + +__DARWIN_CTYPE_TOP_static_inline int +isphonogram(int _c) +{ + return (__istype(_c, _CTYPE_Q)); +} + +__DARWIN_CTYPE_TOP_static_inline int +isrune(int _c) +{ + return (__istype(_c, 0xFFFFFFF0L)); +} + +__DARWIN_CTYPE_TOP_static_inline int +isspecial(int _c) +{ + return (__istype(_c, _CTYPE_T)); +} +#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ +#endif /* _EXTERNALIZE_CTYPE_INLINES_ */ + +#else /* not using inlines */ + +__BEGIN_DECLS +int isalnum(int); +int isalpha(int); +int isblank(int); +int iscntrl(int); +int isdigit(int); +int isgraph(int); +int islower(int); +int isprint(int); +int ispunct(int); +int isspace(int); +int isupper(int); +int isxdigit(int); +int tolower(int); +int toupper(int); +int isascii(int); +int toascii(int); + +#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) +int _tolower(int); +int _toupper(int); +int digittoint(int); +int ishexnumber(int); +int isideogram(int); +int isnumber(int); +int isphonogram(int); +int isrune(int); +int isspecial(int); +#endif +__END_DECLS + +#endif /* using inlines */ + +#ifdef _USE_EXTENDED_LOCALES_ +#include <xlocale/_ctype.h> +#endif /* _USE_EXTENDED_LOCALES_ */ + +#endif /* !_CTYPE_H_ */ diff --git a/i386/include/device/.svn/all-wcprops b/i386/include/device/.svn/all-wcprops new file mode 100644 index 0000000..206efb7 --- /dev/null +++ b/i386/include/device/.svn/all-wcprops @@ -0,0 +1,17 @@ +K 25 +svn:wc:ra_dav:version-url +V 53 +/svn/chameleon/!svn/ver/881/trunk/i386/include/device +END +device_port.h +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/chameleon/!svn/ver/881/trunk/i386/include/device/device_port.h +END +device_types.h +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/chameleon/!svn/ver/881/trunk/i386/include/device/device_types.h +END diff --git a/i386/include/device/.svn/entries b/i386/include/device/.svn/entries new file mode 100644 index 0000000..b2356fb --- /dev/null +++ b/i386/include/device/.svn/entries @@ -0,0 +1,96 @@ +10 + +dir +2117 +http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/device +http://forge.voodooprojects.org/svn/chameleon + + + +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + +b5af796a-00a8-11df-919b-ffff7a100b7d + +device_port.h +file + + + + +2012-10-03T17:50:21.000000Z +a32061f0b361911908c8f1a738ad6fbd +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +2936 + +device_types.h +file + + + + +2012-10-03T17:50:21.000000Z +3002c6d1dc242f177c4ae99fb073e186 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +4507 + diff --git a/i386/include/device/.svn/text-base/device_port.h.svn-base b/i386/include/device/.svn/text-base/device_port.h.svn-base new file mode 100644 index 0000000..8948ed5 --- /dev/null +++ b/i386/include/device/.svn/text-base/device_port.h.svn-base @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * Author: David B. Golub, Carnegie Mellon University + * Date: 8/89 + */ + +#ifndef _DEVICE_DEVICE_PORT_H_ +#define _DEVICE_DEVICE_PORT_H_ + +#include <device/device_types.h> + +/* + * Master privileged I/O object for this host + */ +extern mach_port_t master_device_port; + +#define DEVICE_PAGER_GUARDED 0x1 +#define DEVICE_PAGER_COHERENT 0x2 +#define DEVICE_PAGER_CACHE_INHIB 0x4 +#define DEVICE_PAGER_WRITE_THROUGH 0x8 +#define DEVICE_PAGER_CONTIGUOUS 0x100 +#define DEVICE_PAGER_NOPHYSCACHE 0x200 + +#endif /* _DEVICE_DEVICE_PORT_H_ */ diff --git a/i386/include/device/.svn/text-base/device_types.h.svn-base b/i386/include/device/.svn/text-base/device_types.h.svn-base new file mode 100644 index 0000000..f71249e --- /dev/null +++ b/i386/include/device/.svn/text-base/device_types.h.svn-base @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * Author: David B. Golub, Carnegie Mellon University + * Date: 3/89 + */ + +#ifndef DEVICE_TYPES_H +#define DEVICE_TYPES_H + +/* + * Types for device interface. + */ +#include <mach/std_types.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/port.h> + +/* + * IO buffer - out-of-line array of characters. + */ +typedef char * io_buf_ptr_t; + +/* + * Some types for IOKit. + */ + +#ifdef IOKIT + +/* must match device_types.defs */ +typedef char io_name_t[128]; +typedef char io_string_t[512]; +typedef char io_struct_inband_t[4096]; + +#if KERNEL +typedef uint64_t io_user_scalar_t; +typedef uint64_t io_user_reference_t; +typedef int io_scalar_inband_t[16]; +// must be the same type as OSAsyncReference +typedef natural_t io_async_ref_t[8]; +typedef io_user_scalar_t io_scalar_inband64_t[16]; +typedef io_user_reference_t io_async_ref64_t[8]; +#elif __LP64__ +typedef uint64_t io_user_scalar_t; +typedef uint64_t io_user_reference_t; +typedef io_user_scalar_t io_scalar_inband_t[16]; +typedef io_user_reference_t io_async_ref_t[8]; +typedef io_user_scalar_t io_scalar_inband64_t[16]; +typedef io_user_reference_t io_async_ref64_t[8]; +#else +typedef int io_user_scalar_t; +typedef natural_t io_user_reference_t; +typedef io_user_scalar_t io_scalar_inband_t[16]; +typedef io_user_reference_t io_async_ref_t[8]; +typedef uint64_t io_scalar_inband64_t[16]; +typedef uint64_t io_async_ref64_t[8]; +#endif // __LP64__ + +#ifdef MACH_KERNEL + +typedef struct IOObject * io_object_t; +typedef io_object_t io_connect_t; + +extern void iokit_remove_reference( io_object_t obj ); + +extern io_object_t iokit_lookup_object_port( ipc_port_t port ); +extern io_connect_t iokit_lookup_connect_port( ipc_port_t port ); + +extern ipc_port_t iokit_make_object_port( io_object_t obj ); +extern ipc_port_t iokit_make_connect_port( io_connect_t obj ); + +extern boolean_t iokit_notify( mach_msg_header_t *msg ); + +#else + +#ifndef __IOKIT_PORTS_DEFINED__ +#define __IOKIT_PORTS_DEFINED__ +typedef mach_port_t io_object_t; +#endif /* __IOKIT_PORTS_DEFINED__ */ + +#endif /* MACH_KERNEL */ + +#endif /* IOKIT */ + +#endif /* DEVICE_TYPES_H */ + diff --git a/i386/include/device/device_port.h b/i386/include/device/device_port.h new file mode 100644 index 0000000..8948ed5 --- /dev/null +++ b/i386/include/device/device_port.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * Author: David B. Golub, Carnegie Mellon University + * Date: 8/89 + */ + +#ifndef _DEVICE_DEVICE_PORT_H_ +#define _DEVICE_DEVICE_PORT_H_ + +#include <device/device_types.h> + +/* + * Master privileged I/O object for this host + */ +extern mach_port_t master_device_port; + +#define DEVICE_PAGER_GUARDED 0x1 +#define DEVICE_PAGER_COHERENT 0x2 +#define DEVICE_PAGER_CACHE_INHIB 0x4 +#define DEVICE_PAGER_WRITE_THROUGH 0x8 +#define DEVICE_PAGER_CONTIGUOUS 0x100 +#define DEVICE_PAGER_NOPHYSCACHE 0x200 + +#endif /* _DEVICE_DEVICE_PORT_H_ */ diff --git a/i386/include/device/device_types.h b/i386/include/device/device_types.h new file mode 100644 index 0000000..f71249e --- /dev/null +++ b/i386/include/device/device_types.h @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * Author: David B. Golub, Carnegie Mellon University + * Date: 3/89 + */ + +#ifndef DEVICE_TYPES_H +#define DEVICE_TYPES_H + +/* + * Types for device interface. + */ +#include <mach/std_types.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/port.h> + +/* + * IO buffer - out-of-line array of characters. + */ +typedef char * io_buf_ptr_t; + +/* + * Some types for IOKit. + */ + +#ifdef IOKIT + +/* must match device_types.defs */ +typedef char io_name_t[128]; +typedef char io_string_t[512]; +typedef char io_struct_inband_t[4096]; + +#if KERNEL +typedef uint64_t io_user_scalar_t; +typedef uint64_t io_user_reference_t; +typedef int io_scalar_inband_t[16]; +// must be the same type as OSAsyncReference +typedef natural_t io_async_ref_t[8]; +typedef io_user_scalar_t io_scalar_inband64_t[16]; +typedef io_user_reference_t io_async_ref64_t[8]; +#elif __LP64__ +typedef uint64_t io_user_scalar_t; +typedef uint64_t io_user_reference_t; +typedef io_user_scalar_t io_scalar_inband_t[16]; +typedef io_user_reference_t io_async_ref_t[8]; +typedef io_user_scalar_t io_scalar_inband64_t[16]; +typedef io_user_reference_t io_async_ref64_t[8]; +#else +typedef int io_user_scalar_t; +typedef natural_t io_user_reference_t; +typedef io_user_scalar_t io_scalar_inband_t[16]; +typedef io_user_reference_t io_async_ref_t[8]; +typedef uint64_t io_scalar_inband64_t[16]; +typedef uint64_t io_async_ref64_t[8]; +#endif // __LP64__ + +#ifdef MACH_KERNEL + +typedef struct IOObject * io_object_t; +typedef io_object_t io_connect_t; + +extern void iokit_remove_reference( io_object_t obj ); + +extern io_object_t iokit_lookup_object_port( ipc_port_t port ); +extern io_connect_t iokit_lookup_connect_port( ipc_port_t port ); + +extern ipc_port_t iokit_make_object_port( io_object_t obj ); +extern ipc_port_t iokit_make_connect_port( io_connect_t obj ); + +extern boolean_t iokit_notify( mach_msg_header_t *msg ); + +#else + +#ifndef __IOKIT_PORTS_DEFINED__ +#define __IOKIT_PORTS_DEFINED__ +typedef mach_port_t io_object_t; +#endif /* __IOKIT_PORTS_DEFINED__ */ + +#endif /* MACH_KERNEL */ + +#endif /* IOKIT */ + +#endif /* DEVICE_TYPES_H */ + diff --git a/i386/include/errno.h b/i386/include/errno.h new file mode 100644 index 0000000..9879cc4 --- /dev/null +++ b/i386/include/errno.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#include <sys/errno.h> + diff --git a/i386/include/float.h b/i386/include/float.h new file mode 100644 index 0000000..84fd005 --- /dev/null +++ b/i386/include/float.h @@ -0,0 +1,281 @@ +/* This file exists soley to keep Metrowerks' compilers happy. The version + used by GCC can be found in /usr/lib/gcc, although it's + not very informative. */ + +#ifndef _FLOAT_H_ + +#if defined(__GNUC__) +#include_next <float.h> + +#elif defined(__MWERKS__) +#define _FLOAT_H_ + +/* APPLE LOCAL begin MW compatibility */ +/* Define various characteristics of floating-point types, if needed. */ +#ifndef __FLT_RADIX__ +#define __FLT_RADIX__ 2 +#endif +#ifndef __FLT_MANT_DIG__ +#define __FLT_MANT_DIG__ 24 +#endif +#ifndef __FLT_DIG__ +#define __FLT_DIG__ 6 +#endif +#ifndef __FLT_EPSILON__ +#define __FLT_EPSILON__ 1.19209290e-07F +#endif +#ifndef __FLT_MIN__ +#define __FLT_MIN__ 1.17549435e-38F +#endif +#ifndef __FLT_MAX__ +#define __FLT_MAX__ 3.40282347e+38F +#endif +#ifndef __FLT_MIN_EXP__ +#define __FLT_MIN_EXP__ (-125) +#endif +#ifndef __FLT_MIN_10_EXP__ +#define __FLT_MIN_10_EXP__ (-37) +#endif +#ifndef __FLT_MAX_EXP__ +#define __FLT_MAX_EXP__ 128 +#endif +#ifndef __FLT_MAX_10_EXP__ +#define __FLT_MAX_10_EXP__ 38 +#endif +#ifndef __DBL_MANT_DIG__ +#define __DBL_MANT_DIG__ 53 +#endif +#ifndef __DBL_DIG__ +#define __DBL_DIG__ 15 +#endif +#ifndef __DBL_EPSILON__ +#define __DBL_EPSILON__ 2.2204460492503131e-16 +#endif +#ifndef __DBL_MIN__ +#define __DBL_MIN__ 2.2250738585072014e-308 +#endif +#ifndef __DBL_MAX__ +#define __DBL_MAX__ 1.7976931348623157e+308 +#endif +#ifndef __DBL_MIN_EXP__ +#define __DBL_MIN_EXP__ (-1021) +#endif +#ifndef __DBL_MIN_10_EXP__ +#define __DBL_MIN_10_EXP__ (-307) +#endif +#ifndef __DBL_MAX_EXP__ +#define __DBL_MAX_EXP__ 1024 +#endif +#ifndef __DBL_MAX_10_EXP__ +#define __DBL_MAX_10_EXP__ 308 +#endif +#ifndef __LDBL_MANT_DIG__ +#define __LDBL_MANT_DIG__ 53 +#endif +#ifndef __LDBL_DIG__ +#define __LDBL_DIG__ 15 +#endif +#ifndef __LDBL_EPSILON__ +#define __LDBL_EPSILON__ 2.2204460492503131e-16 +#endif +#ifndef __LDBL_MIN__ +#define __LDBL_MIN__ 2.2250738585072014e-308 +#endif +#ifndef __LDBL_MAX__ +#define __LDBL_MAX__ 1.7976931348623157e+308 +#endif +#ifndef __LDBL_MIN_EXP__ +#define __LDBL_MIN_EXP__ (-1021) +#endif +#ifndef __LDBL_MIN_10_EXP__ +#define __LDBL_MIN_10_EXP__ (-307) +#endif +#ifndef __LDBL_MAX_EXP__ +#define __LDBL_MAX_EXP__ 1024 +#endif +#ifndef __LDBL_MAX_10_EXP__ +#define __LDBL_MAX_10_EXP__ 308 +#endif +/* APPLE LOCAl end MW compatibility */ + +/* Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* As a special exception, if you include this header file into source + files compiled by GCC, this header file does not by itself cause + the resulting executable to be covered by the GNU General Public + License. This exception does not however invalidate any other + reasons why the executable file might be covered by the GNU General + Public License. */ + +/* + * ISO C Standard: 5.2.4.2.2 Characteristics of floating types <float.h> + */ + + +/* Radix of exponent representation, b. */ +#undef FLT_RADIX +#define FLT_RADIX __FLT_RADIX__ + +/* Number of base-FLT_RADIX digits in the significand, p. */ +#undef FLT_MANT_DIG +#undef DBL_MANT_DIG +#undef LDBL_MANT_DIG +#define FLT_MANT_DIG __FLT_MANT_DIG__ +#define DBL_MANT_DIG __DBL_MANT_DIG__ +#define LDBL_MANT_DIG __LDBL_MANT_DIG__ + +/* Number of decimal digits, q, such that any floating-point number with q + decimal digits can be rounded into a floating-point number with p radix b + digits and back again without change to the q decimal digits, + + p * log10(b) if b is a power of 10 + floor((p - 1) * log10(b)) otherwise +*/ +#undef FLT_DIG +#undef DBL_DIG +#undef LDBL_DIG +#define FLT_DIG __FLT_DIG__ +#define DBL_DIG __DBL_DIG__ +#define LDBL_DIG __LDBL_DIG__ + +/* Minimum int x such that FLT_RADIX**(x-1) is a normalized float, emin */ +#undef FLT_MIN_EXP +#undef DBL_MIN_EXP +#undef LDBL_MIN_EXP +#define FLT_MIN_EXP __FLT_MIN_EXP__ +#define DBL_MIN_EXP __DBL_MIN_EXP__ +#define LDBL_MIN_EXP __LDBL_MIN_EXP__ + +/* Minimum negative integer such that 10 raised to that power is in the + range of normalized floating-point numbers, + + ceil(log10(b) * (emin - 1)) +*/ +#undef FLT_MIN_10_EXP +#undef DBL_MIN_10_EXP +#undef LDBL_MIN_10_EXP +#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__ +#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__ +#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__ + +/* Maximum int x such that FLT_RADIX**(x-1) is a representable float, emax. */ +#undef FLT_MAX_EXP +#undef DBL_MAX_EXP +#undef LDBL_MAX_EXP +#define FLT_MAX_EXP __FLT_MAX_EXP__ +#define DBL_MAX_EXP __DBL_MAX_EXP__ +#define LDBL_MAX_EXP __LDBL_MAX_EXP__ + +/* Maximum integer such that 10 raised to that power is in the range of + representable finite floating-point numbers, + + floor(log10((1 - b**-p) * b**emax)) +*/ +#undef FLT_MAX_10_EXP +#undef DBL_MAX_10_EXP +#undef LDBL_MAX_10_EXP +#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__ +#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__ +#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__ + +/* Maximum representable finite floating-point number, + + (1 - b**-p) * b**emax +*/ +#undef FLT_MAX +#undef DBL_MAX +#undef LDBL_MAX +#define FLT_MAX __FLT_MAX__ +#define DBL_MAX __DBL_MAX__ +#define LDBL_MAX __LDBL_MAX__ + +/* The difference between 1 and the least value greater than 1 that is + representable in the given floating point type, b**1-p. */ +#undef FLT_EPSILON +#undef DBL_EPSILON +#undef LDBL_EPSILON +#define FLT_EPSILON __FLT_EPSILON__ +#define DBL_EPSILON __DBL_EPSILON__ +#define LDBL_EPSILON __LDBL_EPSILON__ + +/* Minimum normalized positive floating-point number, b**(emin - 1). */ +#undef FLT_MIN +#undef DBL_MIN +#undef LDBL_MIN +#define FLT_MIN __FLT_MIN__ +#define DBL_MIN __DBL_MIN__ +#define LDBL_MIN __LDBL_MIN__ + +/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown. */ +/* ??? This is supposed to change with calls to fesetround in <fenv.h>. */ +#undef FLT_ROUNDS +#define FLT_ROUNDS 1 + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +/* The floating-point expression evaluation method. + -1 indeterminate + 0 evaluate all operations and constants just to the range and + precision of the type + 1 evaluate operations and constants of type float and double + to the range and precision of the double type, evaluate + long double operations and constants to the range and + precision of the long double type + 2 evaluate all operations and constants to the range and + precision of the long double type + + ??? This ought to change with the setting of the fp control word; + the value provided by the compiler assumes the widest setting. */ +#undef FLT_EVAL_METHOD +#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__ + +/* Number of decimal digits, n, such that any floating-point number in the + widest supported floating type with pmax radix b digits can be rounded + to a floating-point number with n decimal digits and back again without + change to the value, + + pmax * log10(b) if b is a power of 10 + ceil(1 + pmax * log10(b)) otherwise +*/ +#undef DECIMAL_DIG +#define DECIMAL_DIG __DECIMAL_DIG__ + +#endif /* C99 */ + +#ifdef __cplusplus +extern "C" { +#endif +extern int __fegetfltrounds( void ); +#ifdef __cplusplus +} +#endif +#undef FLT_ROUNDS +#define FLT_ROUNDS (__fegetfltrounds ()) +/* End of GNU CC file */ + +/* APPLE LOCAL begin CW compatibility */ +/* CodeWarrior defines the following on its own. */ +#undef DECIMAL_DIG +/* APPLE LOCAL end CW compatibility */ + +#else +#error This file is only for Metrowerks compatibilty. +#endif + +#endif /* _FLOAT_H_ */ diff --git a/i386/include/i386/_limits.h b/i386/include/i386/_limits.h new file mode 100644 index 0000000..3b9e7a6 --- /dev/null +++ b/i386/include/i386/_limits.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _I386__LIMITS_H_ +#define _I386__LIMITS_H_ + +#define __DARWIN_CLK_TCK 100 /* ticks per second */ + +#endif /* _I386__LIMITS_H_ */ diff --git a/i386/include/i386/_param.h b/i386/include/i386/_param.h new file mode 100644 index 0000000..61f0d24 --- /dev/null +++ b/i386/include/i386/_param.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2008 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _I386__PARAM_H_ +#define _I386__PARAM_H_ + +#include <i386/_types.h> + +/* + * Round p (pointer or byte index) up to a correctly-aligned value for all + * data types (int, long, ...). The result is unsigned int and must be + * cast to any desired pointer type. + */ +#define __DARWIN_ALIGNBYTES (sizeof(__darwin_size_t) - 1) +#define __DARWIN_ALIGN(p) ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES) &~ __DARWIN_ALIGNBYTES) + +#define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1) +#define __DARWIN_ALIGN32(p) ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32) + + +#endif /* _I386__PARAM_H_ */ diff --git a/i386/include/i386/_structs.h b/i386/include/i386/_structs.h new file mode 100644 index 0000000..9cad355 --- /dev/null +++ b/i386/include/i386/_structs.h @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#include <sys/appleapiopts.h> + +#ifdef __need_mcontext_t +#ifndef __need_struct_mcontext +#define __need_struct_mcontext +#endif /* __need_struct_mcontext */ +#endif /* __need_mcontext_t */ + +#if defined(__need_struct_mcontext) +#include <mach/i386/_structs.h> +#endif /* __need_struct_mcontext */ + + +#ifdef __need_struct_mcontext +#undef __need_struct_mcontext + +#ifndef _STRUCT_MCONTEXT32 +#if __DARWIN_UNIX03 +#define _STRUCT_MCONTEXT32 struct __darwin_mcontext32 +_STRUCT_MCONTEXT32 +{ + _STRUCT_X86_EXCEPTION_STATE32 __es; + _STRUCT_X86_THREAD_STATE32 __ss; + _STRUCT_X86_FLOAT_STATE32 __fs; +}; +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_MCONTEXT32 struct mcontext32 +_STRUCT_MCONTEXT32 +{ + _STRUCT_X86_EXCEPTION_STATE32 es; + _STRUCT_X86_THREAD_STATE32 ss; + _STRUCT_X86_FLOAT_STATE32 fs; +}; +#endif /* __DARWIN_UNIX03 */ +#endif /* _STRUCT_MCONTEXT32 */ + +#ifndef _STRUCT_MCONTEXT64 +#if __DARWIN_UNIX03 +#define _STRUCT_MCONTEXT64 struct __darwin_mcontext64 +_STRUCT_MCONTEXT64 +{ + _STRUCT_X86_EXCEPTION_STATE64 __es; + _STRUCT_X86_THREAD_STATE64 __ss; + _STRUCT_X86_FLOAT_STATE64 __fs; +}; +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_MCONTEXT64 struct mcontext64 +_STRUCT_MCONTEXT64 +{ + _STRUCT_X86_EXCEPTION_STATE64 es; + _STRUCT_X86_THREAD_STATE64 ss; + _STRUCT_X86_FLOAT_STATE64 fs; +}; +#endif /* __DARWIN_UNIX03 */ +#endif /* _STRUCT_MCONTEXT64 */ +#endif /* __need_struct_mcontext */ + +#ifdef __need_mcontext_t +#undef __need_mcontext_t +#ifndef _MCONTEXT_T +#define _MCONTEXT_T +#if defined(__LP64__) +typedef _STRUCT_MCONTEXT64 *mcontext_t; +#define _STRUCT_MCONTEXT _STRUCT_MCONTEXT64 +#else +typedef _STRUCT_MCONTEXT32 *mcontext_t; +#define _STRUCT_MCONTEXT _STRUCT_MCONTEXT32 +#endif +#endif /* _MCONTEXT_T */ +#endif /* __need_mcontext_t */ + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#ifndef I386_MCONTEXT_SIZE +#define I386_MCONTEXT_SIZE sizeof(struct mcontext) +#endif /* I386_MCONTEXT_SIZE */ +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + diff --git a/i386/include/i386/_types.h b/i386/include/i386/_types.h new file mode 100644 index 0000000..67741d5 --- /dev/null +++ b/i386/include/i386/_types.h @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _BSD_I386__TYPES_H_ +#define _BSD_I386__TYPES_H_ + +/* + * This header file contains integer types. It's intended to also contain + * flotaing point and other arithmetic types, as needed, later. + */ + +#ifdef __GNUC__ +typedef __signed char __int8_t; +#else /* !__GNUC__ */ +typedef char __int8_t; +#endif /* !__GNUC__ */ +typedef unsigned char __uint8_t; +typedef short __int16_t; +typedef unsigned short __uint16_t; +typedef int __int32_t; +typedef unsigned int __uint32_t; +typedef long long __int64_t; +typedef unsigned long long __uint64_t; + +typedef long __darwin_intptr_t; +typedef unsigned int __darwin_natural_t; + +/* + * The rune type below is declared to be an ``int'' instead of the more natural + * ``unsigned long'' or ``long''. Two things are happening here. It is not + * unsigned so that EOF (-1) can be naturally assigned to it and used. Also, + * it looks like 10646 will be a 31 bit standard. This means that if your + * ints cannot hold 32 bits, you will be in trouble. The reason an int was + * chosen over a long is that the is*() and to*() routines take ints (says + * ANSI C), but they use __darwin_ct_rune_t instead of int. By changing it + * here, you lose a bit of ANSI conformance, but your programs will still + * work. + * + * NOTE: rune_t is not covered by ANSI nor other standards, and should not + * be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and + * rune_t must be the same type. Also wint_t must be no narrower than + * wchar_t, and should also be able to hold all members of the largest + * character set plus one extra value (WEOF). wint_t must be at least 16 bits. + */ + +typedef int __darwin_ct_rune_t; /* ct_rune_t */ + +/* + * mbstate_t is an opaque object to keep conversion state, during multibyte + * stream conversions. The content must not be referenced by user programs. + */ +typedef union { + char __mbstate8[128]; + long long _mbstateL; /* for alignment */ +} __mbstate_t; + +typedef __mbstate_t __darwin_mbstate_t; /* mbstate_t */ + +#if defined(__GNUC__) && defined(__PTRDIFF_TYPE__) +typedef __PTRDIFF_TYPE__ __darwin_ptrdiff_t; /* ptr1 - ptr2 */ +#else +typedef int __darwin_ptrdiff_t; /* ptr1 - ptr2 */ +#endif /* __GNUC__ */ + +#if defined(__GNUC__) && defined(__SIZE_TYPE__) +typedef __SIZE_TYPE__ __darwin_size_t; /* sizeof() */ +#else +typedef unsigned long __darwin_size_t; /* sizeof() */ +#endif + +#if (__GNUC__ > 2) +typedef __builtin_va_list __darwin_va_list; /* va_list */ +#else +typedef void * __darwin_va_list; /* va_list */ +#endif + +#if defined(__GNUC__) && defined(__WCHAR_TYPE__) +typedef __WCHAR_TYPE__ __darwin_wchar_t; /* wchar_t */ +#else +typedef __darwin_ct_rune_t __darwin_wchar_t; /* wchar_t */ +#endif + +typedef __darwin_wchar_t __darwin_rune_t; /* rune_t */ + +#if defined(__GNUC__) && defined(__WINT_TYPE__) +typedef __WINT_TYPE__ __darwin_wint_t; /* wint_t */ +#else +typedef __darwin_ct_rune_t __darwin_wint_t; /* wint_t */ +#endif + +typedef unsigned long __darwin_clock_t; /* clock() */ +typedef __uint32_t __darwin_socklen_t; /* socklen_t (duh) */ +typedef long __darwin_ssize_t; /* byte count or error */ +typedef long __darwin_time_t; /* time() */ + +#endif /* _BSD_I386__TYPES_H_ */ diff --git a/i386/include/i386/eflags.h b/i386/include/i386/eflags.h new file mode 100644 index 0000000..9dc6478 --- /dev/null +++ b/i386/include/i386/eflags.h @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ + +#ifndef _I386_EFLAGS_H_ +#define _I386_EFLAGS_H_ + +/* + * i386 flags register + */ + +#ifndef EFL_CF +#define EFL_CF 0x00000001 /* carry */ +#define EFL_PF 0x00000004 /* parity of low 8 bits */ +#define EFL_AF 0x00000010 /* carry out of bit 3 */ +#define EFL_ZF 0x00000040 /* zero */ +#define EFL_SF 0x00000080 /* sign */ +#define EFL_TF 0x00000100 /* trace trap */ +#define EFL_IF 0x00000200 /* interrupt enable */ +#define EFL_DF 0x00000400 /* direction */ +#define EFL_OF 0x00000800 /* overflow */ +#define EFL_IOPL 0x00003000 /* IO privilege level: */ +#define EFL_IOPL_KERNEL 0x00000000 /* kernel */ +#define EFL_IOPL_USER 0x00003000 /* user */ +#define EFL_NT 0x00004000 /* nested task */ +#define EFL_RF 0x00010000 /* resume without tracing */ +#define EFL_VM 0x00020000 /* virtual 8086 mode */ +#define EFL_AC 0x00040000 /* alignment check */ +#define EFL_VIF 0x00080000 /* virtual interrupt flag */ +#define EFL_VIP 0x00100000 /* virtual interrupt pending */ +#define EFL_ID 0x00200000 /* cpuID instruction */ +#endif + +#define EFL_CLR 0xfff88028 +#define EFL_SET 0x00000002 + +#define EFL_USER_SET (EFL_IF) +#define EFL_USER_CLEAR (EFL_IOPL|EFL_NT|EFL_RF) + +#endif /* _I386_EFLAGS_H_ */ diff --git a/i386/include/i386/endian.h b/i386/include/i386/endian.h new file mode 100644 index 0000000..9f64aa0 --- /dev/null +++ b/i386/include/i386/endian.h @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright 1995 NeXT Computer, Inc. All rights reserved. + */ +/* + * Copyright (c) 1987, 1991, 1993 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)endian.h 8.1 (Berkeley) 6/11/93 + */ + +#ifndef _I386__ENDIAN_H_ +#define _I386__ENDIAN_H_ + +#include <sys/cdefs.h> +/* + * Define _NOQUAD if the compiler does NOT support 64-bit integers. + */ +/* #define _NOQUAD */ + +/* + * Define the order of 32-bit words in 64-bit words. + */ +#define _QUAD_HIGHWORD 1 +#define _QUAD_LOWWORD 0 + +/* + * Definitions for byte order, according to byte significance from low + * address to high. + */ +#define __DARWIN_LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ +#define __DARWIN_BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ +#define __DARWIN_PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ + +#define __DARWIN_BYTE_ORDER __DARWIN_LITTLE_ENDIAN + +#if defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) + +#define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN +#define BIG_ENDIAN __DARWIN_BIG_ENDIAN +#define PDP_ENDIAN __DARWIN_PDP_ENDIAN + +#define BYTE_ORDER __DARWIN_BYTE_ORDER + +#include <sys/_endian.h> + +#endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ +#endif /* !_I386__ENDIAN_H_ */ diff --git a/i386/include/i386/fasttrap_isa.h b/i386/include/i386/fasttrap_isa.h new file mode 100644 index 0000000..d51c7dd --- /dev/null +++ b/i386/include/i386/fasttrap_isa.h @@ -0,0 +1,116 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _FASTTRAP_ISA_H +#define _FASTTRAP_ISA_H + +/* + * #pragma ident "@(#)fasttrap_isa.h 1.6 06/09/19 SMI" + */ + +#include <sys/types.h> +#include <stdint.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#define FASTTRAP_MAX_INSTR_SIZE 15 + +#define FASTTRAP_INSTR 0xcc + +#define FASTTRAP_SUNWDTRACE_SIZE 64 + +typedef uint8_t fasttrap_instr_t; + +typedef struct fasttrap_machtp { + uint8_t ftmt_instr[FASTTRAP_MAX_INSTR_SIZE]; /* orig. instr. */ + uint8_t ftmt_size; /* instruction size */ +#if __sol64 || defined(__APPLE__) + uint8_t ftmt_ripmode; /* %rip-relative handling mode */ + uint8_t ftmt_modrm; /* saved modrm byte */ +#endif + uint8_t ftmt_type; /* emulation type */ + uint8_t ftmt_code; /* branch condition */ + uint8_t ftmt_base; /* branch base */ + uint8_t ftmt_index; /* branch index */ + uint8_t ftmt_scale; /* branch scale */ + uint8_t ftmt_segment; /* segment for memory accesses */ + user_addr_t ftmt_dest; /* destination of control flow */ +} fasttrap_machtp_t; + +#define ftt_instr ftt_mtp.ftmt_instr +#if __sol64 || defined(__APPLE__) +#define ftt_ripmode ftt_mtp.ftmt_ripmode +#define ftt_modrm ftt_mtp.ftmt_modrm +#endif +#define ftt_size ftt_mtp.ftmt_size +#define ftt_type ftt_mtp.ftmt_type +#define ftt_code ftt_mtp.ftmt_code +#define ftt_base ftt_mtp.ftmt_base +#define ftt_index ftt_mtp.ftmt_index +#define ftt_scale ftt_mtp.ftmt_scale +#define ftt_segment ftt_mtp.ftmt_segment +#define ftt_dest ftt_mtp.ftmt_dest + +#define FASTTRAP_T_COMMON 0x00 /* common case -- no emulation */ +#define FASTTRAP_T_JCC 0x01 /* near and far conditional jumps */ +#define FASTTRAP_T_LOOP 0x02 /* loop instructions */ +#define FASTTRAP_T_JCXZ 0x03 /* jump if %ecx/%rcx is zero */ +#define FASTTRAP_T_JMP 0x04 /* relative jump */ +#define FASTTRAP_T_CALL 0x05 /* near call (and link) */ +#define FASTTRAP_T_RET 0x06 /* ret */ +#define FASTTRAP_T_RET16 0x07 /* ret <imm16> */ + +/* + * For performance rather than correctness. + */ +#define FASTTRAP_T_PUSHL_EBP 0x10 /* pushl %ebp (for function entry) */ +#define FASTTRAP_T_NOP 0x11 /* nop */ + +#define FASTTRAP_RIP_1 0x1 +#define FASTTRAP_RIP_2 0x2 +#define FASTTRAP_RIP_X 0x4 + +/* + * Segment values. + */ +#define FASTTRAP_SEG_NONE 0 +#define FASTTRAP_SEG_CS 1 +#define FASTTRAP_SEG_DS 2 +#define FASTTRAP_SEG_ES 3 +#define FASTTRAP_SEG_FS 4 +#define FASTTRAP_SEG_GS 5 +#define FASTTRAP_SEG_SS 6 + +#define FASTTRAP_RETURN_AFRAMES 6 +#define FASTTRAP_ENTRY_AFRAMES 5 +#define FASTTRAP_OFFSET_AFRAMES 5 + +#ifdef __cplusplus +} +#endif + +#endif /* _FASTTRAP_ISA_H */ diff --git a/i386/include/i386/limits.h b/i386/include/i386/limits.h new file mode 100644 index 0000000..9ee7c03 --- /dev/null +++ b/i386/include/i386/limits.h @@ -0,0 +1,107 @@ +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)limits.h 8.3 (Berkeley) 1/4/94 + */ + +#ifndef _I386_LIMITS_H_ +#define _I386_LIMITS_H_ + +#include <sys/cdefs.h> +#include <i386/_limits.h> + +#define CHAR_BIT 8 /* number of bits in a char */ +#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */ + +#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) +#define CLK_TCK __DARWIN_CLK_TCK /* ticks per second */ +#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + +/* + * According to ANSI (section 2.2.4.2), the values below must be usable by + * #if preprocessing directives. Additionally, the expression must have the + * same type as would an expression that is an object of the corresponding + * type converted according to the integral promotions. The subtraction for + * INT_MIN and LONG_MIN is so the value is not unsigned; 2147483648 is an + * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + * These numbers work for pcc as well. The UINT_MAX and ULONG_MAX values + * are written as hex so that GCC will be quiet about large integer constants. + */ +#define SCHAR_MAX 127 /* min value for a signed char */ +#define SCHAR_MIN (-128) /* max value for a signed char */ + +#define UCHAR_MAX 255 /* max value for an unsigned char */ +#define CHAR_MAX 127 /* max value for a char */ +#define CHAR_MIN (-128) /* min value for a char */ + +#define USHRT_MAX 65535 /* max value for an unsigned short */ +#define SHRT_MAX 32767 /* max value for a short */ +#define SHRT_MIN (-32768) /* min value for a short */ + +#define UINT_MAX 0xffffffff /* max value for an unsigned int */ +#define INT_MAX 2147483647 /* max value for an int */ +#define INT_MIN (-2147483647-1) /* min value for an int */ + +#ifdef __LP64__ +#define ULONG_MAX 0xffffffffffffffffUL /* max unsigned long */ +#define LONG_MAX 0x7fffffffffffffffL /* max signed long */ +#define LONG_MIN (-0x7fffffffffffffffL-1) /* min signed long */ +#else /* !__LP64__ */ +#define ULONG_MAX 0xffffffffUL /* max unsigned long */ +#define LONG_MAX 2147483647L /* max signed long */ +#define LONG_MIN (-2147483647L-1) /* min signed long */ +#endif /* __LP64__ */ + +#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */ +#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */ +#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */ + +#if !defined(_ANSI_SOURCE) +#ifdef __LP64__ +#define LONG_BIT 64 +#else /* !__LP64__ */ +#define LONG_BIT 32 +#endif /* __LP64__ */ +#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */ +#define WORD_BIT 32 + +#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) +#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */ + +#define UQUAD_MAX ULLONG_MAX +#define QUAD_MAX LLONG_MAX +#define QUAD_MIN LLONG_MIN + +#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */ +#endif /* !_ANSI_SOURCE */ + +#endif /* _I386_LIMITS_H_ */ diff --git a/i386/include/i386/param.h b/i386/include/i386/param.h new file mode 100644 index 0000000..03a38d2 --- /dev/null +++ b/i386/include/i386/param.h @@ -0,0 +1,169 @@ +/* + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * (c) UNIX System Laboratories, Inc. + * All or some portions of this file are derived from material licensed + * to the University of California by American Telephone and Telegraph + * Co. or Unix System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)param.h 8.1 (Berkeley) 4/4/95 + */ + +/* + * Machine dependent constants for Intel 386. + */ + +#ifndef _I386_PARAM_H_ +#define _I386_PARAM_H_ + +#include <i386/_param.h> + +/* + * Round p (pointer or byte index) up to a correctly-aligned value for all + * data types (int, long, ...). The result is unsigned int and must be + * cast to any desired pointer type. + */ +#define ALIGNBYTES __DARWIN_ALIGNBYTES +#define ALIGN(p) __DARWIN_ALIGN(p) + +#define NBPG 4096 /* bytes/page */ +#define PGOFSET (NBPG-1) /* byte offset into page */ +#define PGSHIFT 12 /* LOG2(NBPG) */ + +#define DEV_BSIZE 512 +#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ +#define BLKDEV_IOSIZE 2048 +#define MAXPHYS (128 * 1024) /* max raw I/O transfer size */ + +#define CLSIZE 1 +#define CLSIZELOG2 0 + +/* + * Constants related to network buffer management. + * MCLBYTES must be no larger than CLBYTES (the software page size), and, + * on machines that exchange pages of input or output buffers with mbuf + * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple + * of the hardware page size. + */ +#define MSIZE 256 /* size of an mbuf */ +#define MCLBYTES 2048 /* large enough for ether MTU */ +#define MCLSHIFT 11 +#define MCLOFSET (MCLBYTES - 1) +#ifndef NMBCLUSTERS +#ifdef GATEWAY +#define NMBCLUSTERS ((1024 * 1024) / MCLBYTES) /* cl map size: 1MB */ +#else +#define NMBCLUSTERS ((1024 * 512) / MCLBYTES) /* cl map size: 0.5MB */ +#endif +#endif + +/* + * Some macros for units conversion + */ +/* Core clicks (NeXT_page_size bytes) to segments and vice versa */ +#define ctos(x) (x) +#define stoc(x) (x) + +/* Core clicks (4096 bytes) to disk blocks */ +#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT)) +#define dtoc(x) ((x)>>(PGSHIFT-DEV_BSHIFT)) +#define dtob(x) ((x)<<DEV_BSHIFT) + +/* clicks to bytes */ +#define ctob(x) ((x)<<PGSHIFT) + +/* bytes to clicks */ +#define btoc(x) (((unsigned)(x)+(NBPG-1))>>PGSHIFT) + +#ifdef __APPLE__ +#define btodb(bytes, devBlockSize) \ + ((unsigned)(bytes) / devBlockSize) +#define dbtob(db, devBlockSize) \ + ((unsigned)(db) * devBlockSize) +#else +#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \ + ((unsigned)(bytes) >> DEV_BSHIFT) +#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \ + ((unsigned)(db) << DEV_BSHIFT) +#endif + +/* + * Map a ``block device block'' to a file system block. + * This should be device dependent, and will be if we + * add an entry to cdevsw/bdevsw for that purpose. + * For now though just use DEV_BSIZE. + */ +#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE)) + +/* + * Macros to decode (and encode) processor status word. + */ +#define STATUS_WORD(rpl, ipl) (((ipl) << 8) | (rpl)) +#define USERMODE(x) (((x) & 3) == 3) +#define BASEPRI(x) (((x) & (255 << 8)) == 0) + + +#if defined(KERNEL) || defined(STANDALONE) +#define DELAY(n) delay(n) + +#else /* defined(KERNEL) || defined(STANDALONE) */ +#define DELAY(n) { register int N = (n); while (--N > 0); } +#endif /* defined(KERNEL) || defined(STANDALONE) */ + +#endif /* _I386_PARAM_H_ */ diff --git a/i386/include/i386/profile.h b/i386/include/i386/profile.h new file mode 100644 index 0000000..26782f8 --- /dev/null +++ b/i386/include/i386/profile.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1997, Apple Computer, Inc. All rights reserved. + * + */ + +#ifndef _BSD_I386_PROFILE_H_ +#define _BSD_I386_PROFILE_H_ + +#include <sys/appleapiopts.h> + + +#endif /* _BSD_I386_PROFILE_H_ */ diff --git a/i386/include/i386/setjmp.h b/i386/include/i386/setjmp.h new file mode 100644 index 0000000..aff6e3c --- /dev/null +++ b/i386/include/i386/setjmp.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. + * + * File: setjmp.h + * + * Declaration of setjmp routines and data structures. + */ +#ifndef _BSD_I386_SETJMP_H +#define _BSD_I386_SETJMP_H + +#include <sys/cdefs.h> + +#if defined(__x86_64__) +/* + * _JBLEN is number of ints required to save the following: + * rflags, rip, rbp, rsp, rbx, r12, r13, r14, r15... these are 8 bytes each + * mxcsr, fp control word, sigmask... these are 4 bytes each + * add 16 ints for future expansion needs... + */ +#define _JBLEN ((9 * 2) + 3 + 16) +typedef int jmp_buf[_JBLEN]; +typedef int sigjmp_buf[_JBLEN + 1]; + +#else + +/* + * _JBLEN is number of ints required to save the following: + * eax, ebx, ecx, edx, edi, esi, ebp, esp, ss, eflags, eip, + * cs, de, es, fs, gs == 16 ints + * onstack, mask = 2 ints + */ + +#define _JBLEN (18) +typedef int jmp_buf[_JBLEN]; +typedef int sigjmp_buf[_JBLEN + 1]; + +#endif + +__BEGIN_DECLS +int setjmp(jmp_buf); +void longjmp(jmp_buf, int); + +#ifndef _ANSI_SOURCE +int _setjmp(jmp_buf); +void _longjmp(jmp_buf, int); +int sigsetjmp(sigjmp_buf, int); +void siglongjmp(sigjmp_buf, int); +#endif /* _ANSI_SOURCE */ + +#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) +void longjmperror(void); +#endif /* neither ANSI nor POSIX */ +__END_DECLS +#endif /* !_BSD_I386_SETJMP_H */ diff --git a/i386/include/i386/signal.h b/i386/include/i386/signal.h new file mode 100644 index 0000000..8419888 --- /dev/null +++ b/i386/include/i386/signal.h @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1992 NeXT Computer, Inc. + * + */ + +#ifndef _I386_SIGNAL_H_ +#define _I386_SIGNAL_H_ 1 + +#include <sys/cdefs.h> + +#ifndef _ANSI_SOURCE +typedef int sig_atomic_t; + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) + +#include <sys/appleapiopts.h> + +#ifdef __APPLE_API_OBSOLETE + +/* + * Information pushed on stack when a signal is delivered. + * This is used by the kernel to restore state following + * execution of the signal handler. It is also made available + * to the handler to allow it to properly restore state if + * a non-standard exit is performed. + */ +#define __need_struct_sigcontext +#include <i386/_structs.h> + +#endif /* __APPLE_API_OBSOLETE */ +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ +#endif /* ! _ANSI_SOURCE */ + +#endif /* _I386_SIGNAL_H_ */ + diff --git a/i386/include/i386/types.h b/i386/include/i386/types.h new file mode 100644 index 0000000..ef4e660 --- /dev/null +++ b/i386/include/i386/types.h @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2000-2008 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright 1995 NeXT Computer, Inc. All rights reserved. + */ +/* + * Copyright (c) 1990, 1993 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)types.h 8.3 (Berkeley) 1/5/94 + */ + +#ifndef _MACHTYPES_H_ +#define _MACHTYPES_H_ + +#include <i386/types.h> + + +#ifndef __ASSEMBLER__ +#include <i386/_types.h> +#include <sys/cdefs.h> +/* + * Basic integral types. Omit the typedef if + * not possible for a machine/compiler combination. + */ +#ifndef _INT8_T +#define _INT8_T +typedef __signed char int8_t; +#endif +typedef unsigned char u_int8_t; +#ifndef _INT16_T +#define _INT16_T +typedef short int16_t; +#endif +typedef unsigned short u_int16_t; +#ifndef _INT32_T +#define _INT32_T +typedef int int32_t; +#endif +typedef unsigned int u_int32_t; +#ifndef _INT64_T +#define _INT64_T +typedef long long int64_t; +#endif +typedef unsigned long long u_int64_t; + +#if __LP64__ +typedef int64_t register_t; +#else +typedef int32_t register_t; +#endif + +#ifndef _INTPTR_T +#define _INTPTR_T +typedef __darwin_intptr_t intptr_t; +#endif +#ifndef _UINTPTR_T +#define _UINTPTR_T +typedef unsigned long uintptr_t; +#endif + +#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) +/* These types are used for reserving the largest possible size. */ +typedef u_int64_t user_addr_t; +typedef u_int64_t user_size_t; +typedef int64_t user_ssize_t; +typedef int64_t user_long_t; +typedef u_int64_t user_ulong_t; +typedef int64_t user_time_t; +typedef int64_t user_off_t; +#define USER_ADDR_NULL ((user_addr_t) 0) +#define CAST_USER_ADDR_T(a_ptr) ((user_addr_t)((uintptr_t)(a_ptr))) + + +#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + +/* This defines the size of syscall arguments after copying into the kernel: */ +typedef u_int64_t syscall_arg_t; + +#ifndef __offsetof +#define __offsetof(type, field) ((size_t)(&((type *)0)->field)) +#endif + +#endif /* __ASSEMBLER__ */ +#endif /* _MACHTYPES_H_ */ diff --git a/i386/include/i386/user_ldt.h b/i386/include/i386/user_ldt.h new file mode 100644 index 0000000..3b61e3f --- /dev/null +++ b/i386/include/i386/user_ldt.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2000-2008 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ + +/* + */ + +#ifndef _I386_USER_LDT_H_ +#define _I386_USER_LDT_H_ + +/* + * User LDT management. + * + * Each task may have its own LDT. + */ + +#define LDT_AUTO_ALLOC 0xffffffff + +#include <sys/cdefs.h> + +union ldt_entry; + +__BEGIN_DECLS +int i386_get_ldt(int, union ldt_entry *, int); +int i386_set_ldt(int, const union ldt_entry *, int); +__END_DECLS + +#endif /* _I386_USER_LDT_H_ */ diff --git a/i386/include/i386/vmparam.h b/i386/include/i386/vmparam.h new file mode 100644 index 0000000..b6389b4 --- /dev/null +++ b/i386/include/i386/vmparam.h @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _BSD_I386_VMPARAM_H_ +#define _BSD_I386_VMPARAM_H_ 1 + +#include <sys/resource.h> + +/* Rosetta dependency on this address */ +#define USRSTACK VM_USRSTACK32 + +#define USRSTACK64 VM_USRSTACK64 + + +/* + * Virtual memory related constants, all in bytes + */ +#ifndef DFLDSIZ +#define DFLDSIZ (RLIM_INFINITY) /* initial data size limit */ +#endif +#ifndef MAXDSIZ +#define MAXDSIZ (RLIM_INFINITY) /* max data size */ +#endif +#ifndef DFLSSIZ +#define DFLSSIZ (8*1024*1024) /* initial stack size limit */ +#endif +#ifndef MAXSSIZ +#define MAXSSIZ (64*1024*1024) /* max stack size */ +#endif +#ifndef DFLCSIZ +#define DFLCSIZ (0) /* initial core size limit */ +#endif +#ifndef MAXCSIZ +#define MAXCSIZ (RLIM_INFINITY) /* max core size */ +#endif /* MAXCSIZ */ + +#endif /* _BSD_I386_VMPARAM_H_ */ diff --git a/i386/include/inttypes.h b/i386/include/inttypes.h new file mode 100644 index 0000000..4f9dd8d --- /dev/null +++ b/i386/include/inttypes.h @@ -0,0 +1,321 @@ +/* + * Copyright (c) 2000, 2001, 2002, 2003, 2004 Apple Computer, Inc. + * All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * <inttypes.h> -- Standard C header, defined in ISO/IEC 9899:1999 + * (aka "C99"), section 7.8. This defines format string conversion + * specifiers suitable for use within arguments to fprintf and fscanf + * and their ilk. + */ + +/* "C++ implementations should define these macros only when + * __STDC_FORMAT_MACROS is defined before <inttypes.h> is included." + */ +#if (!defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)) && !defined(__STDC_FORMAT_MACROS_DEFINED) +#define __STDC_FORMAT_MACROS_DEFINED + +# undef __PRI_8_LENGTH_MODIFIER__ +# undef __PRI_64_LENGTH_MODIFIER__ +# undef __SCN_64_LENGTH_MODIFIER__ + +# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 > 1020 +# define __PRI_8_LENGTH_MODIFIER__ "hh" +# define __PRI_64_LENGTH_MODIFIER__ "ll" +# define __SCN_64_LENGTH_MODIFIER__ "ll" +# else +/* These could be "hh", "ll", and "ll" respectively, but that doesn't work on + 10.2, and these do. Note that there's no way to use scanf to scan a + decimal into a 'char' argument on 10.2, so "hh" is used unconditionally + and programs that use it won't work on Jaguar. */ +# define __PRI_8_LENGTH_MODIFIER__ "" /* none */ +# define __PRI_64_LENGTH_MODIFIER__ "q" +# define __SCN_64_LENGTH_MODIFIER__ "q" +# endif +# define __PRI_MAX_LENGTH_MODIFIER__ "j" +# define __SCN_MAX_LENGTH_MODIFIER__ "j" + +# define PRId8 __PRI_8_LENGTH_MODIFIER__ "d" +# define PRIi8 __PRI_8_LENGTH_MODIFIER__ "i" +# define PRIo8 __PRI_8_LENGTH_MODIFIER__ "o" +# define PRIu8 __PRI_8_LENGTH_MODIFIER__ "u" +# define PRIx8 __PRI_8_LENGTH_MODIFIER__ "x" +# define PRIX8 __PRI_8_LENGTH_MODIFIER__ "X" + +# define PRId16 "hd" +# define PRIi16 "hi" +# define PRIo16 "ho" +# define PRIu16 "hu" +# define PRIx16 "hx" +# define PRIX16 "hX" + +# define PRId32 "d" +# define PRIi32 "i" +# define PRIo32 "o" +# define PRIu32 "u" +# define PRIx32 "x" +# define PRIX32 "X" + +# define PRId64 __PRI_64_LENGTH_MODIFIER__ "d" +# define PRIi64 __PRI_64_LENGTH_MODIFIER__ "i" +# define PRIo64 __PRI_64_LENGTH_MODIFIER__ "o" +# define PRIu64 __PRI_64_LENGTH_MODIFIER__ "u" +# define PRIx64 __PRI_64_LENGTH_MODIFIER__ "x" +# define PRIX64 __PRI_64_LENGTH_MODIFIER__ "X" + +# define PRIdLEAST8 PRId8 +# define PRIiLEAST8 PRIi8 +# define PRIoLEAST8 PRIo8 +# define PRIuLEAST8 PRIu8 +# define PRIxLEAST8 PRIx8 +# define PRIXLEAST8 PRIX8 + +# define PRIdLEAST16 PRId16 +# define PRIiLEAST16 PRIi16 +# define PRIoLEAST16 PRIo16 +# define PRIuLEAST16 PRIu16 +# define PRIxLEAST16 PRIx16 +# define PRIXLEAST16 PRIX16 + +# define PRIdLEAST32 PRId32 +# define PRIiLEAST32 PRIi32 +# define PRIoLEAST32 PRIo32 +# define PRIuLEAST32 PRIu32 +# define PRIxLEAST32 PRIx32 +# define PRIXLEAST32 PRIX32 + +# define PRIdLEAST64 PRId64 +# define PRIiLEAST64 PRIi64 +# define PRIoLEAST64 PRIo64 +# define PRIuLEAST64 PRIu64 +# define PRIxLEAST64 PRIx64 +# define PRIXLEAST64 PRIX64 + +# define PRIdFAST8 PRId8 +# define PRIiFAST8 PRIi8 +# define PRIoFAST8 PRIo8 +# define PRIuFAST8 PRIu8 +# define PRIxFAST8 PRIx8 +# define PRIXFAST8 PRIX8 + +# define PRIdFAST16 PRId16 +# define PRIiFAST16 PRIi16 +# define PRIoFAST16 PRIo16 +# define PRIuFAST16 PRIu16 +# define PRIxFAST16 PRIx16 +# define PRIXFAST16 PRIX16 + +# define PRIdFAST32 PRId32 +# define PRIiFAST32 PRIi32 +# define PRIoFAST32 PRIo32 +# define PRIuFAST32 PRIu32 +# define PRIxFAST32 PRIx32 +# define PRIXFAST32 PRIX32 + +# define PRIdFAST64 PRId64 +# define PRIiFAST64 PRIi64 +# define PRIoFAST64 PRIo64 +# define PRIuFAST64 PRIu64 +# define PRIxFAST64 PRIx64 +# define PRIXFAST64 PRIX64 + +/* int32_t is 'int', but intptr_t is 'long'. */ +# define PRIdPTR "ld" +# define PRIiPTR "li" +# define PRIoPTR "lo" +# define PRIuPTR "lu" +# define PRIxPTR "lx" +# define PRIXPTR "lX" + +# define PRIdMAX __PRI_MAX_LENGTH_MODIFIER__ "d" +# define PRIiMAX __PRI_MAX_LENGTH_MODIFIER__ "i" +# define PRIoMAX __PRI_MAX_LENGTH_MODIFIER__ "o" +# define PRIuMAX __PRI_MAX_LENGTH_MODIFIER__ "u" +# define PRIxMAX __PRI_MAX_LENGTH_MODIFIER__ "x" +# define PRIXMAX __PRI_MAX_LENGTH_MODIFIER__ "X" + +# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 > 1020 +# define SCNd8 __PRI_8_LENGTH_MODIFIER__ "d" +# define SCNi8 __PRI_8_LENGTH_MODIFIER__ "i" +# define SCNo8 __PRI_8_LENGTH_MODIFIER__ "o" +# define SCNu8 __PRI_8_LENGTH_MODIFIER__ "u" +# define SCNx8 __PRI_8_LENGTH_MODIFIER__ "x" +# else +# define SCNd8 "hhd" +# define SCNi8 "hhi" +# define SCNo8 "hho" +# define SCNu8 "hhu" +# define SCNx8 "hhx" +# endif + +# define SCNd16 "hd" +# define SCNi16 "hi" +# define SCNo16 "ho" +# define SCNu16 "hu" +# define SCNx16 "hx" + +# define SCNd32 "d" +# define SCNi32 "i" +# define SCNo32 "o" +# define SCNu32 "u" +# define SCNx32 "x" + +# define SCNd64 __SCN_64_LENGTH_MODIFIER__ "d" +# define SCNi64 __SCN_64_LENGTH_MODIFIER__ "i" +# define SCNo64 __SCN_64_LENGTH_MODIFIER__ "o" +# define SCNu64 __SCN_64_LENGTH_MODIFIER__ "u" +# define SCNx64 __SCN_64_LENGTH_MODIFIER__ "x" + +# define SCNdLEAST8 SCNd8 +# define SCNiLEAST8 SCNi8 +# define SCNoLEAST8 SCNo8 +# define SCNuLEAST8 SCNu8 +# define SCNxLEAST8 SCNx8 + +# define SCNdLEAST16 SCNd16 +# define SCNiLEAST16 SCNi16 +# define SCNoLEAST16 SCNo16 +# define SCNuLEAST16 SCNu16 +# define SCNxLEAST16 SCNx16 + +# define SCNdLEAST32 SCNd32 +# define SCNiLEAST32 SCNi32 +# define SCNoLEAST32 SCNo32 +# define SCNuLEAST32 SCNu32 +# define SCNxLEAST32 SCNx32 + +# define SCNdLEAST64 SCNd64 +# define SCNiLEAST64 SCNi64 +# define SCNoLEAST64 SCNo64 +# define SCNuLEAST64 SCNu64 +# define SCNxLEAST64 SCNx64 + +# define SCNdFAST8 SCNd8 +# define SCNiFAST8 SCNi8 +# define SCNoFAST8 SCNo8 +# define SCNuFAST8 SCNu8 +# define SCNxFAST8 SCNx8 + +# define SCNdFAST16 SCNd16 +# define SCNiFAST16 SCNi16 +# define SCNoFAST16 SCNo16 +# define SCNuFAST16 SCNu16 +# define SCNxFAST16 SCNx16 + +# define SCNdFAST32 SCNd32 +# define SCNiFAST32 SCNi32 +# define SCNoFAST32 SCNo32 +# define SCNuFAST32 SCNu32 +# define SCNxFAST32 SCNx32 + +# define SCNdFAST64 SCNd64 +# define SCNiFAST64 SCNi64 +# define SCNoFAST64 SCNo64 +# define SCNuFAST64 SCNu64 +# define SCNxFAST64 SCNx64 + +# define SCNdPTR "ld" +# define SCNiPTR "li" +# define SCNoPTR "lo" +# define SCNuPTR "lu" +# define SCNxPTR "lx" + +# define SCNdMAX __SCN_MAX_LENGTH_MODIFIER__ "d" +# define SCNiMAX __SCN_MAX_LENGTH_MODIFIER__ "i" +# define SCNoMAX __SCN_MAX_LENGTH_MODIFIER__ "o" +# define SCNuMAX __SCN_MAX_LENGTH_MODIFIER__ "u" +# define SCNxMAX __SCN_MAX_LENGTH_MODIFIER__ "x" + +#endif /* if C++, then __STDC_FORMAT_MACROS enables the above macros */ + +#if !defined(_INTTYPES_H_) +#define _INTTYPES_H_ + +#include <sys/cdefs.h> /* For __BEGIN_DECLS and __END_DECLS */ +#include <_types.h> /* For __darwin_wchar_t */ +#include <stdint.h> + +#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) + /* Translator is not ISO/IEC 9899:1999-compliant. */ +# if !defined(restrict) +# define restrict +# define __RESTRICT_KEYWORD_DEFINED__ +# endif +#endif + +__BEGIN_DECLS + + /* 7.8.2.1 */ + extern intmax_t imaxabs(intmax_t j); + + /* 7.8.2.2 */ + typedef struct { + intmax_t quot; + intmax_t rem; + } imaxdiv_t; + + extern imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom); + + /* 7.8.2.3 */ + extern intmax_t strtoimax(const char * restrict nptr, char ** restrict endptr, int base); + extern uintmax_t strtoumax(const char * restrict nptr, char ** restrict endptr, int base); + +#ifndef __cplusplus /* wchar_t is a built-in type in C++ */ +# ifndef _WCHAR_T +# define _WCHAR_T + typedef __darwin_wchar_t wchar_t; +# endif /* _WCHAR_T */ +#endif /* __cplusplus */ + + /* 7.8.2.4 */ + extern intmax_t wcstoimax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); + extern uintmax_t wcstoumax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); + +/* Poison the following routines if -fshort-wchar is set */ +#if !defined(__cplusplus) && defined(__WCHAR_MAX__) && __WCHAR_MAX__ <= 0xffffU +#pragma GCC poison wcstoimax wcstoumax +#endif + +__END_DECLS + +#ifdef _USE_EXTENDED_LOCALES_ +#include <xlocale/_inttypes.h> +#endif /* _USE_EXTENDED_LOCALES_ */ + +/* + No need to #undef the __*_{8,64}_LENGTH_MODIFIER__ macros; + in fact, you can't #undef them, because later uses of any of + their dependents will *not* then do the intended substitution. + Expansion of a #define like this one: + + #define x IDENT y + + uses the cpp value of IDENT at the location where x is *expanded*, + not where it is #defined. +*/ + +#if defined(__RESTRICT_KEYWORD_DEFINED__) +# undef restrict +# undef __RESTRICT_KEYWORD_DEFINED__ +#endif + +#endif /* !_INTTYPES_H_ */ diff --git a/i386/include/libkern/OSAtomic.h b/i386/include/libkern/OSAtomic.h new file mode 100644 index 0000000..9f2dba4 --- /dev/null +++ b/i386/include/libkern/OSAtomic.h @@ -0,0 +1,209 @@ +/* + * Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _OSATOMIC_H_ +#define _OSATOMIC_H_ + +#include <stddef.h> +#include <sys/cdefs.h> +#include <stdint.h> +#include <stdbool.h> + +/* These are the preferred versions of the atomic and synchronization operations. + * Their implementation is customized at boot time for the platform, including + * late-breaking errata fixes as necessary. They are thread safe. + * + * WARNING: all addresses passed to these functions must be "naturally aligned", ie + * int32_t's must be 32-bit aligned (low 2 bits of address zero), and int64_t's + * must be 64-bit aligned (low 3 bits of address zero.) + * + * Note that some versions of the atomic functions incorporate memory barriers, + * and some do not. Barriers strictly order memory access on a weakly-ordered + * architecture such as PPC. All loads and stores executed in sequential program + * order before the barrier will complete before any load or store executed after + * the barrier. On a uniprocessor, the barrier operation is typically a nop. + * On a multiprocessor, the barrier can be quite expensive on some platforms, + * eg PPC. + * + * Most code will want to use the barrier functions to insure that memory shared + * between threads is properly synchronized. For example, if you want to initialize + * a shared data structure and then atomically increment a variable to indicate + * that the initialization is complete, then you must use OSAtomicIncrement32Barrier() + * to ensure that the stores to your data structure complete before the atomic add. + * Likewise, the consumer of that data structure must use OSAtomicDecrement32Barrier(), + * in order to ensure that their loads of the structure are not executed before + * the atomic decrement. On the other hand, if you are simply incrementing a global + * counter, then it is safe and potentially faster to use OSAtomicIncrement32(). + * + * If you are unsure which version to use, prefer the barrier variants as they are + * safer. + * + * The spinlock and queue operations always incorporate a barrier. + */ +__BEGIN_DECLS + + +/* Arithmetic functions. They return the new value. + */ +int32_t OSAtomicAdd32( int32_t __theAmount, volatile int32_t *__theValue ); +int32_t OSAtomicAdd32Barrier( int32_t __theAmount, volatile int32_t *__theValue ); + +__inline static +int32_t OSAtomicIncrement32( volatile int32_t *__theValue ) + { return OSAtomicAdd32( 1, __theValue); } +__inline static +int32_t OSAtomicIncrement32Barrier( volatile int32_t *__theValue ) + { return OSAtomicAdd32Barrier( 1, __theValue); } + +__inline static +int32_t OSAtomicDecrement32( volatile int32_t *__theValue ) + { return OSAtomicAdd32( -1, __theValue); } +__inline static +int32_t OSAtomicDecrement32Barrier( volatile int32_t *__theValue ) + { return OSAtomicAdd32Barrier( -1, __theValue); } + +#if defined(__ppc64__) || defined(__i386__) || defined(__x86_64__) || defined(__arm__) + +int64_t OSAtomicAdd64( int64_t __theAmount, volatile int64_t *__theValue ); +int64_t OSAtomicAdd64Barrier( int64_t __theAmount, volatile int64_t *__theValue ); + +__inline static +int64_t OSAtomicIncrement64( volatile int64_t *__theValue ) + { return OSAtomicAdd64( 1, __theValue); } +__inline static +int64_t OSAtomicIncrement64Barrier( volatile int64_t *__theValue ) + { return OSAtomicAdd64Barrier( 1, __theValue); } + +__inline static +int64_t OSAtomicDecrement64( volatile int64_t *__theValue ) + { return OSAtomicAdd64( -1, __theValue); } +__inline static +int64_t OSAtomicDecrement64Barrier( volatile int64_t *__theValue ) + { return OSAtomicAdd64Barrier( -1, __theValue); } + +#endif /* defined(__ppc64__) || defined(__i386__) || defined(__x86_64__) || defined(__arm__) */ + + +/* Boolean functions (and, or, xor.) These come in four versions for each operation: + * with and without barriers, and returning the old or new value of the operation. + * The "Orig" versions return the original value, ie before the operation, the non-Orig + * versions return the value after the operation. All are layered on top of + * compare-and-swap. + */ +int32_t OSAtomicOr32( uint32_t __theMask, volatile uint32_t *__theValue ); +int32_t OSAtomicOr32Barrier( uint32_t __theMask, volatile uint32_t *__theValue ); +int32_t OSAtomicOr32Orig( uint32_t __theMask, volatile uint32_t *__theValue ); +int32_t OSAtomicOr32OrigBarrier( uint32_t __theMask, volatile uint32_t *__theValue ); + +int32_t OSAtomicAnd32( uint32_t __theMask, volatile uint32_t *__theValue ); +int32_t OSAtomicAnd32Barrier( uint32_t __theMask, volatile uint32_t *__theValue ); +int32_t OSAtomicAnd32Orig( uint32_t __theMask, volatile uint32_t *__theValue ); +int32_t OSAtomicAnd32OrigBarrier( uint32_t __theMask, volatile uint32_t *__theValue ); + +int32_t OSAtomicXor32( uint32_t __theMask, volatile uint32_t *__theValue ); +int32_t OSAtomicXor32Barrier( uint32_t __theMask, volatile uint32_t *__theValue ); +int32_t OSAtomicXor32Orig( uint32_t __theMask, volatile uint32_t *__theValue ); +int32_t OSAtomicXor32OrigBarrier( uint32_t __theMask, volatile uint32_t *__theValue ); + + +/* Compare and swap. They return true if the swap occured. There are several versions, + * depending on data type and whether or not a barrier is used. + */ +bool OSAtomicCompareAndSwap32( int32_t __oldValue, int32_t __newValue, volatile int32_t *__theValue ); +bool OSAtomicCompareAndSwap32Barrier( int32_t __oldValue, int32_t __newValue, volatile int32_t *__theValue ); +bool OSAtomicCompareAndSwapPtr( void *__oldValue, void *__newValue, void * volatile *__theValue ); +bool OSAtomicCompareAndSwapPtrBarrier( void *__oldValue, void *__newValue, void * volatile *__theValue ); +bool OSAtomicCompareAndSwapInt( int __oldValue, int __newValue, volatile int *__theValue ); +bool OSAtomicCompareAndSwapIntBarrier( int __oldValue, int __newValue, volatile int *__theValue ); +bool OSAtomicCompareAndSwapLong( long __oldValue, long __newValue, volatile long *__theValue ); +bool OSAtomicCompareAndSwapLongBarrier( long __oldValue, long __newValue, volatile long *__theValue ); + +#if defined(__ppc64__) || defined(__i386__) || defined(__x86_64__) || defined(__arm__) + +bool OSAtomicCompareAndSwap64( int64_t __oldValue, int64_t __newValue, volatile int64_t *__theValue ); +bool OSAtomicCompareAndSwap64Barrier( int64_t __oldValue, int64_t __newValue, volatile int64_t *__theValue ); + +#endif /* defined(__ppc64__) || defined(__i386__) || defined(__x86_64__) || defined(__arm__) */ + + +/* Test and set. They return the original value of the bit, and operate on bit (0x80>>(n&7)) + * in byte ((char*)theAddress + (n>>3)). + */ +bool OSAtomicTestAndSet( uint32_t __n, volatile void *__theAddress ); +bool OSAtomicTestAndSetBarrier( uint32_t __n, volatile void *__theAddress ); +bool OSAtomicTestAndClear( uint32_t __n, volatile void *__theAddress ); +bool OSAtomicTestAndClearBarrier( uint32_t __n, volatile void *__theAddress ); + + +/* Spinlocks. These use memory barriers as required to synchronize access to shared + * memory protected by the lock. The lock operation spins, but employs various strategies + * to back off if the lock is held, making it immune to most priority-inversion livelocks. + * The try operation immediately returns false if the lock was held, true if it took the + * lock. The convention is that unlocked is zero, locked is nonzero. + */ +#define OS_SPINLOCK_INIT 0 + +typedef int32_t OSSpinLock; + +bool OSSpinLockTry( volatile OSSpinLock *__lock ); +void OSSpinLockLock( volatile OSSpinLock *__lock ); +void OSSpinLockUnlock( volatile OSSpinLock *__lock ); + + +/* Lockless atomic enqueue and dequeue. These routines manipulate singly + * linked LIFO lists. Ie, a dequeue will return the most recently enqueued + * element, or NULL if the list is empty. The "offset" parameter is the offset + * in bytes of the link field within the data structure being queued. The + * link field should be a pointer type. Memory barriers are incorporated as + * needed to permit thread-safe access to the queue element. + */ +#if defined(__x86_64__) + +typedef volatile struct { + void *opaque1; + long opaque2; +} OSQueueHead __attribute__ ((aligned (16))); + +#else + +typedef volatile struct { + void *opaque1; + long opaque2; +} OSQueueHead; + +#endif + +#define OS_ATOMIC_QUEUE_INIT { NULL, 0 } + +void OSAtomicEnqueue( OSQueueHead *__list, void *__new, size_t __offset); +void* OSAtomicDequeue( OSQueueHead *__list, size_t __offset); + + +/* Memory barrier. It is both a read and write barrier. + */ +void OSMemoryBarrier( void ); + + +__END_DECLS + +#endif /* _OSATOMIC_H_ */ diff --git a/i386/include/libkern/OSByteOrder.h b/i386/include/libkern/OSByteOrder.h new file mode 100644 index 0000000..915a249 --- /dev/null +++ b/i386/include/libkern/OSByteOrder.h @@ -0,0 +1,310 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _OS_OSBYTEORDER_H +#define _OS_OSBYTEORDER_H + +#include <stdint.h> +#include <libkern/_OSByteOrder.h> + +/* Macros for swapping constant values in the preprocessing stage. */ +#define OSSwapConstInt16(x) __DARWIN_OSSwapConstInt16(x) +#define OSSwapConstInt32(x) __DARWIN_OSSwapConstInt32(x) +#define OSSwapConstInt64(x) __DARWIN_OSSwapConstInt64(x) + +#if defined(__GNUC__) + +#if (defined(__ppc__) || defined(__ppc64__)) +#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 + +#else /* ! __GNUC__ */ + +#include <libkern/machine/OSByteOrder.h> + +#endif /* __GNUC__ */ + +#define OSSwapInt16(x) __DARWIN_OSSwapInt16(x) +#define OSSwapInt32(x) __DARWIN_OSSwapInt32(x) +#define OSSwapInt64(x) __DARWIN_OSSwapInt64(x) + +enum { + OSUnknownByteOrder, + OSLittleEndian, + OSBigEndian +}; + +OS_INLINE +int32_t +OSHostByteOrder(void) { +#if defined(__LITTLE_ENDIAN__) + return OSLittleEndian; +#elif defined(__BIG_ENDIAN__) + return OSBigEndian; +#else + return OSUnknownByteOrder; +#endif +} + +#define OSReadBigInt(x, y) OSReadBigInt32(x, y) +#define OSWriteBigInt(x, y, z) OSWriteBigInt32(x, y, z) +#define OSSwapBigToHostInt(x) OSSwapBigToHostInt32(x) +#define OSSwapHostToBigInt(x) OSSwapHostToBigInt32(x) +#define OSReadLittleInt(x, y) OSReadLittleInt32(x, y) +#define OSWriteLittleInt(x, y, z) OSWriteLittleInt32(x, y, z) +#define OSSwapHostToLittleInt(x) OSSwapHostToLittleInt32(x) +#define OSSwapLittleToHostInt(x) OSSwapLittleToHostInt32(x) + +/* Functions for loading native endian values. */ + +OS_INLINE +uint16_t +_OSReadInt16( + const volatile void * base, + uintptr_t byteOffset +) +{ + return *(volatile uint16_t *)((uintptr_t)base + byteOffset); +} + +OS_INLINE +uint32_t +_OSReadInt32( + const volatile void * base, + uintptr_t byteOffset +) +{ + return *(volatile uint32_t *)((uintptr_t)base + byteOffset); +} + +OS_INLINE +uint64_t +_OSReadInt64( + const volatile void * base, + uintptr_t byteOffset +) +{ + return *(volatile uint64_t *)((uintptr_t)base + byteOffset); +} + +/* Functions for storing native endian values. */ + +OS_INLINE +void +_OSWriteInt16( + volatile void * base, + uintptr_t byteOffset, + uint16_t data +) +{ + *(volatile uint16_t *)((uintptr_t)base + byteOffset) = data; +} + +OS_INLINE +void +_OSWriteInt32( + volatile void * base, + uintptr_t byteOffset, + uint32_t data +) +{ + *(volatile uint32_t *)((uintptr_t)base + byteOffset) = data; +} + +OS_INLINE +void +_OSWriteInt64( + volatile void * base, + uintptr_t byteOffset, + uint64_t data +) +{ + *(volatile uint64_t *)((uintptr_t)base + byteOffset) = data; +} + +#if defined(__BIG_ENDIAN__) + +/* Functions for loading big endian to host endianess. */ + +#define OSReadBigInt16(base, byteOffset) _OSReadInt16(base, byteOffset) +#define OSReadBigInt32(base, byteOffset) _OSReadInt32(base, byteOffset) +#define OSReadBigInt64(base, byteOffset) _OSReadInt64(base, byteOffset) + +/* Functions for storing host endianess to big endian. */ + +#define OSWriteBigInt16(base, byteOffset, data) _OSWriteInt16(base, byteOffset, data) +#define OSWriteBigInt32(base, byteOffset, data) _OSWriteInt32(base, byteOffset, data) +#define OSWriteBigInt64(base, byteOffset, data) _OSWriteInt64(base, byteOffset, data) + +/* Functions for loading little endian to host endianess. */ + +#define OSReadLittleInt16(base, byteOffset) OSReadSwapInt16(base, byteOffset) +#define OSReadLittleInt32(base, byteOffset) OSReadSwapInt32(base, byteOffset) +#define OSReadLittleInt64(base, byteOffset) OSReadSwapInt64(base, byteOffset) + +/* Functions for storing host endianess to little endian. */ + +#define OSWriteLittleInt16(base, byteOffset, data) OSWriteSwapInt16(base, byteOffset, data) +#define OSWriteLittleInt32(base, byteOffset, data) OSWriteSwapInt32(base, byteOffset, data) +#define OSWriteLittleInt64(base, byteOffset, data) OSWriteSwapInt64(base, byteOffset, data) + +/* Host endianess to big endian byte swapping macros for constants. */ + +#define OSSwapHostToBigConstInt16(x) ((uint16_t)(x)) +#define OSSwapHostToBigConstInt32(x) ((uint32_t)(x)) +#define OSSwapHostToBigConstInt64(x) ((uint64_t)(x)) + +/* Generic host endianess to big endian byte swapping functions. */ + +#define OSSwapHostToBigInt16(x) ((uint16_t)(x)) +#define OSSwapHostToBigInt32(x) ((uint32_t)(x)) +#define OSSwapHostToBigInt64(x) ((uint64_t)(x)) + +/* Host endianess to little endian byte swapping macros for constants. */ + +#define OSSwapHostToLittleConstInt16(x) OSSwapConstInt16(x) +#define OSSwapHostToLittleConstInt32(x) OSSwapConstInt32(x) +#define OSSwapHostToLittleConstInt64(x) OSSwapConstInt64(x) + +/* Generic host endianess to little endian byte swapping functions. */ + +#define OSSwapHostToLittleInt16(x) OSSwapInt16(x) +#define OSSwapHostToLittleInt32(x) OSSwapInt32(x) +#define OSSwapHostToLittleInt64(x) OSSwapInt64(x) + +/* Big endian to host endianess byte swapping macros for constants. */ + +#define OSSwapBigToHostConstInt16(x) ((uint16_t)(x)) +#define OSSwapBigToHostConstInt32(x) ((uint32_t)(x)) +#define OSSwapBigToHostConstInt64(x) ((uint64_t)(x)) + +/* Generic big endian to host endianess byte swapping functions. */ + +#define OSSwapBigToHostInt16(x) ((uint16_t)(x)) +#define OSSwapBigToHostInt32(x) ((uint32_t)(x)) +#define OSSwapBigToHostInt64(x) ((uint64_t)(x)) + +/* Little endian to host endianess byte swapping macros for constants. */ + +#define OSSwapLittleToHostConstInt16(x) OSSwapConstInt16(x) +#define OSSwapLittleToHostConstInt32(x) OSSwapConstInt32(x) +#define OSSwapLittleToHostConstInt64(x) OSSwapConstInt64(x) + +/* Generic little endian to host endianess byte swapping functions. */ + +#define OSSwapLittleToHostInt16(x) OSSwapInt16(x) +#define OSSwapLittleToHostInt32(x) OSSwapInt32(x) +#define OSSwapLittleToHostInt64(x) OSSwapInt64(x) + +#elif defined(__LITTLE_ENDIAN__) + +/* Functions for loading big endian to host endianess. */ + +#define OSReadBigInt16(base, byteOffset) OSReadSwapInt16(base, byteOffset) +#define OSReadBigInt32(base, byteOffset) OSReadSwapInt32(base, byteOffset) +#define OSReadBigInt64(base, byteOffset) OSReadSwapInt64(base, byteOffset) + +/* Functions for storing host endianess to big endian. */ + +#define OSWriteBigInt16(base, byteOffset, data) OSWriteSwapInt16(base, byteOffset, data) +#define OSWriteBigInt32(base, byteOffset, data) OSWriteSwapInt32(base, byteOffset, data) +#define OSWriteBigInt64(base, byteOffset, data) OSWriteSwapInt64(base, byteOffset, data) + +/* Functions for loading little endian to host endianess. */ + +#define OSReadLittleInt16(base, byteOffset) _OSReadInt16(base, byteOffset) +#define OSReadLittleInt32(base, byteOffset) _OSReadInt32(base, byteOffset) +#define OSReadLittleInt64(base, byteOffset) _OSReadInt64(base, byteOffset) + +/* Functions for storing host endianess to little endian. */ + +#define OSWriteLittleInt16(base, byteOffset, data) _OSWriteInt16(base, byteOffset, data) +#define OSWriteLittleInt32(base, byteOffset, data) _OSWriteInt32(base, byteOffset, data) +#define OSWriteLittleInt64(base, byteOffset, data) _OSWriteInt64(base, byteOffset, data) + +/* Host endianess to big endian byte swapping macros for constants. */ + +#define OSSwapHostToBigConstInt16(x) OSSwapConstInt16(x) +#define OSSwapHostToBigConstInt32(x) OSSwapConstInt32(x) +#define OSSwapHostToBigConstInt64(x) OSSwapConstInt64(x) + +/* Generic host endianess to big endian byte swapping functions. */ + +#define OSSwapHostToBigInt16(x) OSSwapInt16(x) +#define OSSwapHostToBigInt32(x) OSSwapInt32(x) +#define OSSwapHostToBigInt64(x) OSSwapInt64(x) + +/* Host endianess to little endian byte swapping macros for constants. */ + +#define OSSwapHostToLittleConstInt16(x) ((uint16_t)(x)) +#define OSSwapHostToLittleConstInt32(x) ((uint32_t)(x)) +#define OSSwapHostToLittleConstInt64(x) ((uint64_t)(x)) + +/* Generic host endianess to little endian byte swapping functions. */ + +#define OSSwapHostToLittleInt16(x) ((uint16_t)(x)) +#define OSSwapHostToLittleInt32(x) ((uint32_t)(x)) +#define OSSwapHostToLittleInt64(x) ((uint64_t)(x)) + +/* Big endian to host endianess byte swapping macros for constants. */ + +#define OSSwapBigToHostConstInt16(x) OSSwapConstInt16(x) +#define OSSwapBigToHostConstInt32(x) OSSwapConstInt32(x) +#define OSSwapBigToHostConstInt64(x) OSSwapConstInt64(x) + +/* Generic big endian to host endianess byte swapping functions. */ + +#define OSSwapBigToHostInt16(x) OSSwapInt16(x) +#define OSSwapBigToHostInt32(x) OSSwapInt32(x) +#define OSSwapBigToHostInt64(x) OSSwapInt64(x) + +/* Little endian to host endianess byte swapping macros for constants. */ + +#define OSSwapLittleToHostConstInt16(x) ((uint16_t)(x)) +#define OSSwapLittleToHostConstInt32(x) ((uint32_t)(x)) +#define OSSwapLittleToHostConstInt64(x) ((uint64_t)(x)) + +/* Generic little endian to host endianess byte swapping functions. */ + +#define OSSwapLittleToHostInt16(x) ((uint16_t)(x)) +#define OSSwapLittleToHostInt32(x) ((uint32_t)(x)) +#define OSSwapLittleToHostInt64(x) ((uint64_t)(x)) + +#else +#error Unknown endianess. +#endif + +#endif /* ! _OS_OSBYTEORDER_H */ + + diff --git a/i386/include/libkern/OSCacheControl.h b/i386/include/libkern/OSCacheControl.h new file mode 100644 index 0000000..771a704 --- /dev/null +++ b/i386/include/libkern/OSCacheControl.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _OS_CACHE_CONTROL_H_ +#define _OS_CACHE_CONTROL_H_ + +#include <stddef.h> +#include <sys/cdefs.h> +#include <stdint.h> + +__BEGIN_DECLS + + +/* Functions performed by sys_cache_control(): */ + +/* Prepare memory for execution. This should be called + * after writing machine instructions to memory, before + * executing them. It syncs the dcache and icache. + * On IA32 processors this function is a NOP, because + * no synchronization is required. + */ +#define kCacheFunctionPrepareForExecution 1 + +/* Flush data cache(s). This ensures that cached data + * makes it all the way out to DRAM, and then removes + * copies of the data from all processor caches. + * It can be useful when dealing with cache incoherent + * devices or DMA. + */ +#define kCacheFunctionFlushDcache 2 + + +/* perform one of the above cache functions: */ +int sys_cache_control( int function, void *start, size_t len); + +/* equivalent to sys_cache_control(kCacheFunctionPrepareForExecution): */ +void sys_icache_invalidate( void *start, size_t len); + +/* equivalent to sys_cache_control(kCacheFunctionFlushDcache): */ +void sys_dcache_flush( void *start, size_t len); + + +__END_DECLS + +#endif /* _OS_CACHE_CONTROL_H_ */ diff --git a/i386/include/libkern/OSDebug.h b/i386/include/libkern/OSDebug.h new file mode 100644 index 0000000..eaeefc1 --- /dev/null +++ b/i386/include/libkern/OSDebug.h @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + +#ifndef _OS_OSDEBBUG_H +#define _OS_OSDEBBUG_H + +#include <sys/cdefs.h> +#include <mach/mach_types.h> + +__BEGIN_DECLS + +extern int log_leaks; + +/* Use kernel_debug() to log a backtrace */ +extern void trace_backtrace(unsigned int debugid, unsigned int debugid2, unsigned long size, unsigned long data); +/* Report a message with a 4 entry backtrace - very slow */ +extern void OSReportWithBacktrace(const char *str, ...); +extern unsigned OSBacktrace(void **bt, unsigned maxAddrs); + +/*! @function OSKernelStackRemaining + @abstract Returns bytes available below the current stack frame. + @discussion Returns bytes available below the current stack frame. Safe for interrupt or thread context. + @result Approximate byte count available. */ + +vm_offset_t OSKernelStackRemaining( void ); + +__END_DECLS + +#define TRACE_MACHLEAKS(a,b,c,d) \ +do { \ + if (log_leaks) \ + trace_backtrace(a,b,c,d); \ +} while(0) + +#endif /* !_OS_OSDEBBUG_H */ diff --git a/i386/include/libkern/OSKextLib.h b/i386/include/libkern/OSKextLib.h new file mode 100644 index 0000000..dbe2ba2 --- /dev/null +++ b/i386/include/libkern/OSKextLib.h @@ -0,0 +1,472 @@ +/* + * Copyright (c) 2008 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _LIBKERN_OSKEXTLIB_H +#define _LIBKERN_OSKEXTLIB_H + +#include <sys/cdefs.h> +__BEGIN_DECLS + +#include <stdint.h> +#include <mach/kmod.h> +#include <mach/vm_types.h> + +#include <CoreFoundation/CoreFoundation.h> +#include <System/libkern/OSReturn.h> + +/*! + * @header + * + * Declares functions, basic return values, and other constants + * related to kernel extensions (kexts). + */ + +#if PRAGMA_MARK +#pragma mark - +/********************************************************************/ +#pragma mark OSReturn Values for Kernel Extensions +/********************************************************************/ +#endif +/*! + * @group OSReturn Values for Kernel Extensions + * Many kext-related functions return these values, + * as well as those defined under + * <code>@link //apple_ref/c/tdef/OSReturn OSReturn@/link</code> + * and other variants of <code>kern_return_t</code>. + */ + + +#define sub_libkern_kext err_sub(2) +#define libkern_kext_err(code) (sys_libkern|sub_libkern_kext|(code)) + + +/*! + * @define kOSKextReturnInternalError + * @abstract An internal error in the kext library. + * Contrast with <code>@link //apple_ref/c/econst/OSReturnError + * OSReturnError@/link</code>. + */ +#define kOSKextReturnInternalError libkern_kext_err(0x1) + +/*! + * @define kOSKextReturnNoMemory + * @abstract Memory allocation failed. + */ +#define kOSKextReturnNoMemory libkern_kext_err(0x2) + +/*! + * @define kOSKextReturnNoResources + * @abstract Some resource other than memory (such as available load tags) + * is exhausted. + */ +#define kOSKextReturnNoResources libkern_kext_err(0x3) + +/*! + * @define kOSKextReturnNotPrivileged + * @abstract The caller lacks privileges to perform the requested operation. + */ +#define kOSKextReturnNotPrivileged libkern_kext_err(0x4) + +/*! + * @define kOSKextReturnInvalidArgument + * @abstract Invalid argument. + */ +#define kOSKextReturnInvalidArgument libkern_kext_err(0x5) + +/*! + * @define kOSKextReturnNotFound + * @abstract Search item not found. + */ +#define kOSKextReturnNotFound libkern_kext_err(0x6) + +/*! + * @define kOSKextReturnBadData + * @abstract Malformed data (not used for XML). + */ +#define kOSKextReturnBadData libkern_kext_err(0x7) + +/*! + * @define kOSKextReturnSerialization + * @abstract Error converting or (un)serializing URL, string, or XML. + */ +#define kOSKextReturnSerialization libkern_kext_err(0x8) + +/*! + * @define kOSKextReturnUnsupported + * @abstract Operation is no longer or not yet supported. + */ +#define kOSKextReturnUnsupported libkern_kext_err(0x9) + +/*! + * @define kOSKextReturnDisabled + * @abstract Operation is currently disabled. + */ +#define kOSKextReturnDisabled libkern_kext_err(0xa) + +/*! + * @define kOSKextReturnNotAKext + * @abstract Bundle is not a kernel extension. + */ +#define kOSKextReturnNotAKext libkern_kext_err(0xb) + +/*! + * @define kOSKextReturnValidation + * @abstract Validation failures encountered; check diagnostics for details. + */ +#define kOSKextReturnValidation libkern_kext_err(0xc) + +/*! + * @define kOSKextReturnAuthentication + * @abstract Authetication failures encountered; check diagnostics for details. + */ +#define kOSKextReturnAuthentication libkern_kext_err(0xd) + +/*! + * @define kOSKextReturnDependencies + * @abstract Dependency resolution failures encountered; check diagnostics for details. + */ +#define kOSKextReturnDependencies libkern_kext_err(0xe) + +/*! + * @define kOSKextReturnArchNotFound + * @abstract Kext does not contain code for the requested architecture. + */ +#define kOSKextReturnArchNotFound libkern_kext_err(0xf) + +/*! + * @define kOSKextReturnCache + * @abstract An error occurred processing a system kext cache. + */ +#define kOSKextReturnCache libkern_kext_err(0x10) + +/*! + * @define kOSKextReturnDeferred + * @abstract Operation has been posted asynchronously to user space (kernel only). + */ +#define kOSKextReturnDeferred libkern_kext_err(0x11) + +/*! + * @define kOSKextReturnBootLevel + * @abstract Kext not loadable or operation not allowed at current boot level. + */ +#define kOSKextReturnBootLevel libkern_kext_err(0x12) + +/*! + * @define kOSKextReturnNotLoadable + * @abstract Kext cannot be loaded; check diagnostics for details. + */ +#define kOSKextReturnNotLoadable libkern_kext_err(0x13) + +/*! + * @define kOSKextReturnLoadedVersionDiffers + * @abstract A different version (or executable UUID, or executable by checksum) + * of the requested kext is already loaded. + */ +#define kOSKextReturnLoadedVersionDiffers libkern_kext_err(0x14) + +/*! + * @define kOSKextReturnDependencyLoadError + * @abstract A load error occurred on a dependency of the kext being loaded. + */ +#define kOSKextReturnDependencyLoadError libkern_kext_err(0x15) + +/*! + * @define kOSKextReturnLinkError + * @abstract A link failure occured with this kext or a dependency. + */ +#define kOSKextReturnLinkError libkern_kext_err(0x16) + +/*! + * @define kOSKextReturnStartStopError + * @abstract The kext start or stop routine returned an error. + */ +#define kOSKextReturnStartStopError libkern_kext_err(0x17) + +/*! + * @define kOSKextReturnInUse + * @abstract The kext is currently in use or has outstanding references, + * and cannot be unloaded. + */ +#define kOSKextReturnInUse libkern_kext_err(0x18) + +/*! + * @define kOSKextReturnTimeout + * @abstract A kext request has timed out. + */ +#define kOSKextReturnTimeout libkern_kext_err(0x19) + +/*! + * @define kOSKextReturnStopping + * @abstract The kext is in the process of stopping; requests cannot be made. + */ +#define kOSKextReturnStopping libkern_kext_err(0x1a) + +#if PRAGMA_MARK +#pragma mark - +/********************************************************************/ +#pragma mark Kext/OSBundle Property List Keys +/********************************************************************/ +#endif +/*! + * @group Kext Property List Keys + * These constants cover CFBundle properties defined for kernel extensions. + * Because they are used in the kernel, if you want to use one with + * CFBundle APIs you'll need to wrap it in a <code>CFSTR()</code> macro. + */ + + +/*! + * @define kOSBundleCompatibleVersionKey + * @abstract A string giving the backwards-compatible version of a library kext + * in extended Mac OS 'vers' format (####.##.##s{1-255} where 's' + * is a build stage 'd', 'a', 'b', 'f' or 'fc'). + */ +#define kOSBundleCompatibleVersionKey "OSBundleCompatibleVersion" + +/*! + * @define kOSBundleEnableKextLoggingKey + * @abstract Set to true to have the kernel kext logging spec applied + * to the kext. + * See <code>@link //apple_ref/c/econst/OSKextLogSpec + * OSKextLogSpec@/link</code>. + */ +#define kOSBundleEnableKextLoggingKey "OSBundleEnableKextLogging" + +/*! + * @define kOSBundleIsInterfaceKey + * @abstract A boolean value indicating whether the kext executable + * contains only symbol references. + */ +#define kOSBundleIsInterfaceKey "OSBundleIsInterface" + +/*! + * @define kOSBundleLibrariesKey + * @abstract A dictionary listing link dependencies for this kext. + * Keys are bundle identifiers, values are version strings. + */ +#define kOSBundleLibrariesKey "OSBundleLibraries" + +/*! + * @define kOSBundleRequiredKey + * @abstract A string indicating in which kinds of startup this kext + * may need to load during early startup (before + * <code>@link //apple_ref/doc/man/8/kextd kextcache(8)@/link</code>). + * @discussion + * The value is one of: + * <ul> + * <li>@link kOSBundleRequiredRoot "OSBundleRequiredRoot"@/link</li> + * <li>@link kOSBundleRequiredLocalRoot "OSBundleRequiredLocalRoot"@/link</li> + * <li>@link kOSBundleRequiredNetworkRoot "OSBundleRequiredNetworkRoot"@/link</li> + * <li>@link kOSBundleRequiredSafeBoot "OSBundleRequiredSafeBoot"@/link</li> + * <li>@link kOSBundleRequiredConsole "OSBundleRequiredConsole"@/link</li> + * </ul> + * + * Use this property judiciously. + * Every kext that declares a value other than "OSBundleRequiredSafeBoot" + * increases startup time, as the booter must read it into memory, + * or startup kext caches must include it. + */ +#define kOSBundleRequiredKey "OSBundleRequired" + +/*! + * @define kOSBundleAllowUserLoadKey + * @abstract A boolean value indicating whether + * <code>@link //apple_ref/doc/man/8/kextd kextcache(8)@/link</code> + * will honor a non-root process's request to load a kext. + * @discussion + * See <code>@link //apple_ref/doc/compositePage/c/func/KextManagerLoadKextWithURL + * KextManagerLoadKextWithURL@/link</code> + * and <code>@link //apple_ref/doc/compositePage/c/func/KextManagerLoadKextWithIdentifier + * KextManagerLoadKextWithIdentifier@/link</code>. + */ +#define kOSBundleAllowUserLoadKey "OSBundleAllowUserLoad" + +/*! + * @define kOSKernelResourceKey + * @abstract A boolean value indicating whether the kext represents a built-in + * component of the kernel. + */ +#define kOSKernelResourceKey "OSKernelResource" + +/*! + * @define kIOKitPersonalitiesKey + * @abstract A dictionary of dictionaries used in matching for I/O Kit drivers. + */ +#define kIOKitPersonalitiesKey "IOKitPersonalities" + +/* + * @define kIOPersonalityPublisherKey + * @abstract Used in personalities sent to the I/O Kit, + * contains the CFBundleIdentifier of the kext + * that the personality originated in. + */ +#define kIOPersonalityPublisherKey "IOPersonalityPublisher" + + +#if PRAGMA_MARK +/********************************************************************/ +#pragma mark Kext/OSBundle Property Deprecated Keys +/********************************************************************/ +#endif +/* + * @define kOSBundleDebugLevelKey + * @abstract + * Deprecated (used on some releases of Mac OS X prior to 10.6 Snow Leopard). + * Value is an integer from 1-6, corresponding to the verbose levels + * of kext tools on those releases. + * On 10.6 Snow Leopard, use <code>@link OSKextEnableKextLogging + * OSKextEnableKextLogging@/link</code>. + */ +#define kOSBundleDebugLevelKey "OSBundleDebugLevel" + +/*! + * @define kOSBundleSharedExecutableIdentifierKey + * @abstract Deprecated (used on some releases of Mac OS X + * prior to 10.6 Snow Leopard). + * Value is the bundle identifier of the pseudokext + * that contains an executable shared by this kext. + */ +#define kOSBundleSharedExecutableIdentifierKey "OSBundleSharedExecutableIdentifier" + + +#if PRAGMA_MARK +/********************************************************************/ +#pragma mark Kext/OSBundle Property List Values +/********************************************************************/ +#endif + +/*! + * @group Kext Property List Values + * These constants encompass established values + * for kernel extension bundle properties. + */ + +/*! +* @define kOSKextKernelIdentifier +* @abstract +* This is the CFBundleIdentifier user for the kernel itself. +*/ +#define kOSKextKernelIdentifier "__kernel__" + +/*! +* @define kOSBundleRequiredRoot +* @abstract +* This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> +* value indicates that the kext may be needed to mount the root filesystem +* whether starting from a local or a network volume. +*/ +#define kOSBundleRequiredRoot "Root" + +/*! +* @define kOSBundleRequiredLocalRoot +* @abstract +* This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> +* value indicates that the kext may be needed to mount the root filesystem +* when starting from a local disk. +*/ +#define kOSBundleRequiredLocalRoot "Local-Root" + +/*! +* @define kOSBundleRequiredNetworkRoot +* @abstract +* This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> +* value indicates that the kext may be needed to mount the root filesystem +* when starting over a network connection. +*/ +#define kOSBundleRequiredNetworkRoot "Network-Root" + +/*! +* @define kOSBundleRequiredSafeBoot +* @abstract +* This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> +* value indicates that the kext can be loaded during a safe startup. +* This value does not normally cause the kext to be read by the booter +* or included in startup kext caches. +*/ +#define kOSBundleRequiredSafeBoot "Safe Boot" + +/*! +* @define kOSBundleRequiredConsole +* @abstract +* This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> +* value indicates that the kext may be needed for console access +* (specifically in a single-user startup when +* <code>@link //apple_ref/doc/man/8/kextd kextd(8)@/link</code>. +* does not run) +* and should be loaded during early startup. +*/ +#define kOSBundleRequiredConsole "Console" + + +#if PRAGMA_MARK +#pragma mark - +/********************************************************************/ +#pragma mark Kext Information +/********************************************************************/ +#endif +/*! + * @group Kext Information + * Types, constants, and macros providing a kext with information + * about itself. + */ + +/*! + * @typedef OSKextLoadTag + * + * @abstract + * A unique identifier assigned to a loaded instanace of a kext. + * + * @discussion + * If a kext is unloaded and later reloaded, the new instance + * has a different load tag. + * + * A kext can get its own load tag in the <code>kmod_info_t</code> + * structure passed into its module start routine, as the + * <code>id</code> field (cast to this type). + * You can use the load tag with the functions + * <code>@link OSKextRetainKextWithLoadTag + * OSKextRetainKextWithLoadTag@/link</code> and + * <code>@link OSKextReleaseKextWithLoadTag + * OSKextReleaseKextWithLoadTag@/link</code>. + */ +typedef uint32_t OSKextLoadTag; + +/*! + * @define kOSKextInvalidLoadTag + * + * @abstract + * A load tag value that will never be used for a loaded kext; + * indicates kext not found. + */ +#define kOSKextInvalidLoadTag ((OSKextLoadTag)(-1)) + + + +__END_DECLS + +#endif /* _LIBKERN_OSKEXTLIB_H */ diff --git a/i386/include/libkern/OSReturn.h b/i386/include/libkern/OSReturn.h new file mode 100644 index 0000000..b5490c9 --- /dev/null +++ b/i386/include/libkern/OSReturn.h @@ -0,0 +1,198 @@ +/* + * Copyright (c) 2000 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1998 Apple Inc. All rights reserved. + * + * HISTORY + * + */ + +/* + * Core OSReturn values. + */ + +#ifndef __LIBKERN_OSRETURN_H +#define __LIBKERN_OSRETURN_H + +#include <sys/cdefs.h> + +__BEGIN_DECLS + +#include <mach/error.h> + + +/*! + * @header + * + * Declares functions, basic return values, and other constants + * related to kernel extensions (kexts). + */ + +#if PRAGMA_MARK +#pragma mark Core OSReturn Values for Libkern +#endif +/********************************************************************* +* Core OSReturn Values for Libkern +*********************************************************************/ +/*! + * @group Core OSReturn Values for Libkern + * Some kext and I/O Kit functions can return these values, + * as well as other values of + * <code>kern_return_t</code>. + * + * Many of these return values represent internal errors + * in the Libkern C++ run-time typing information system + * based on @link //apple_ref/doc/class/OSMetaClass OSMetaClass@/link; + * you are unlikely to ever see them. + * + */ + + +/*! + * @typedef OSReturn + * @abstract The return type for many Libkern functions. + */ +typedef kern_return_t OSReturn; + +#ifndef sys_libkern +#define sys_libkern err_system(0x37) +#endif /* sys_libkern */ + +#define sub_libkern_common err_sub(0) +#define sub_libkern_metaclass err_sub(1) +#define sub_libkern_reserved err_sub(-1) + +#define libkern_common_err(return) (sys_libkern|sub_libkern_common|(return)) +#define libkern_metaclass_err(return) (sys_libkern|sub_libkern_metaclass|(return)) + +/* See OSKextLib.h for these + * #define sub_libkern_kext err_sub(2) + * #define libkern_kext_err(code) (sys_libkern|sub_libkern_kext|(code)) + */ + +/*! + * @define kOSReturnSuccess + * @abstract Operation successful. + * Equal to <code>@link //apple_ref/c/econst/KERN_SUCCESS + * KERN_SUCCESS@/link</code>. + */ +#define kOSReturnSuccess KERN_SUCCESS + +/*! + * @define kOSReturnError + * @abstract Unspecified Libkern error. + * <b>Not equal</b> to + * <code>@link //apple_ref/c/econst/KERN_FAILURE + * KERN_FAILURE@/link</code>. + */ +#define kOSReturnError libkern_common_err(1) + +/*! + * @define kOSMetaClassInternal + * @abstract Internal OSMetaClass run-time error. + */ +#define kOSMetaClassInternal libkern_metaclass_err(1) + +/*! + * @define kOSMetaClassHasInstances + * @abstract A kext cannot be unloaded because there are instances + * derived from Libkern C++ classes that it defines. + */ +#define kOSMetaClassHasInstances libkern_metaclass_err(2) + +/*! + * @define kOSMetaClassNoInit + * @abstract Internal error: The Libkern C++ class registration system + * was not properly initialized during kext loading. + */ +#define kOSMetaClassNoInit libkern_metaclass_err(3) +// OSMetaClass::preModLoad wasn't called, runtime internal error + +/*! + * @define kOSMetaClassNoTempData + * @abstract Internal error: An allocation failure occurred + * registering Libkern C++ classes during kext loading. + */ +#define kOSMetaClassNoTempData libkern_metaclass_err(4) +// Allocation failure internal data + +/*! + * @define kOSMetaClassNoDicts + * @abstract Internal error: An allocation failure occurred + * registering Libkern C++ classes during kext loading. + */ +#define kOSMetaClassNoDicts libkern_metaclass_err(5) +// Allocation failure for Metaclass internal dictionaries + +/*! + * @define kOSMetaClassNoKModSet + * @abstract Internal error: An allocation failure occurred + * registering Libkern C++ classes during kext loading. + */ +#define kOSMetaClassNoKModSet libkern_metaclass_err(6) +// Allocation failure for internal kmodule set + +/*! + * @define kOSMetaClassNoInsKModSet + * @abstract Internal error: An error occurred registering + * a specific Libkern C++ class during kext loading. + */ +#define kOSMetaClassNoInsKModSet libkern_metaclass_err(7) +// Can't insert the KMod set into the module dictionary + +/*! + * @define kOSMetaClassNoSuper + * @abstract Internal error: No superclass can be found + * for a specific Libkern C++ class during kext loading. + */ +#define kOSMetaClassNoSuper libkern_metaclass_err(8) + +/*! + * @define kOSMetaClassInstNoSuper + * @abstract Internal error: No superclass can be found when constructing + * an instance of a Libkern C++ class. + */ +#define kOSMetaClassInstNoSuper libkern_metaclass_err(9) + +/*! + * @define kOSMetaClassDuplicateClass + * @abstract A duplicate Libkern C++ classname was encountered + * during kext loading. + */ +#define kOSMetaClassDuplicateClass libkern_metaclass_err(10) + +/*! + * @define kOSMetaClassNoKext + * @abstract Internal error: The kext for a Libkern C++ class + * can't be found during kext loading. + */ +#define kOSMetaClassNoKext libkern_metaclass_err(11) + +__END_DECLS + +#endif /* ! __LIBKERN_OSRETURN_H */ diff --git a/i386/include/libkern/OSTypes.h b/i386/include/libkern/OSTypes.h new file mode 100644 index 0000000..6a03a27 --- /dev/null +++ b/i386/include/libkern/OSTypes.h @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * HISTORY + * + */ + +#ifndef _OS_OSTYPES_H +#define _OS_OSTYPES_H + +#define OSTYPES_K64_REV 2 + +typedef unsigned int UInt; +typedef signed int SInt; + +#ifndef __MACTYPES__ /* CF MacTypes.h */ +#ifndef __TYPES__ /* guess... Mac Types.h */ + +typedef unsigned char UInt8; +typedef unsigned short UInt16; +#if __LP64__ +typedef unsigned int UInt32; +#else +typedef unsigned long UInt32; +#endif +typedef unsigned long long UInt64; +#if defined(__BIG_ENDIAN__) +typedef struct UnsignedWide { + UInt32 hi; + UInt32 lo; +} UnsignedWide; +#elif defined(__LITTLE_ENDIAN__) +typedef struct UnsignedWide { + UInt32 lo; + UInt32 hi; +} UnsignedWide; +#else +#error Unknown endianess. +#endif + +typedef signed char SInt8; +typedef signed short SInt16; +#if __LP64__ +typedef signed int SInt32; +#else +typedef signed long SInt32; +#endif +typedef signed long long SInt64; +#if defined(__BIG_ENDIAN__) +typedef struct wide { + SInt32 hi; + UInt32 lo; +} wide; +#elif defined(__LITTLE_ENDIAN__) +typedef struct wide { + UInt32 lo; + SInt32 hi; +} wide; +#else +#error Unknown endianess. +#endif + +typedef SInt32 OSStatus; + +#if defined(__LP64__) && defined(KERNEL) +#ifndef ABSOLUTETIME_SCALAR_TYPE +#define ABSOLUTETIME_SCALAR_TYPE 1 +#endif +typedef UInt64 AbsoluteTime; +#else +typedef UnsignedWide AbsoluteTime; +#endif + +typedef UInt32 OptionBits; + +#if defined(KERNEL) && defined(__LP64__) +/* + * Use intrinsic boolean types for the LP64 kernel, otherwise maintain + * source and binary backward compatibility. This attempts to resolve + * the "(x == true)" vs. "(x)" conditional issue. + */ +#ifdef __cplusplus +typedef bool Boolean; +#else /* !__cplusplus */ +#if defined(__STDC_VERSION__) && ((__STDC_VERSION__ - 199901L) > 0L) +/* only use this if we are sure we are using a c99 compiler */ +typedef _Bool Boolean; +#else /* !c99 */ +/* Fall back to previous definition unless c99 */ +typedef unsigned char Boolean; +#endif /* !c99 */ +#endif /* !__cplusplus */ +#else /* !(KERNEL && __LP64__) */ +typedef unsigned char Boolean; +#endif /* !(KERNEL && __LP64__) */ + +#endif /* __TYPES__ */ +#endif /* __MACTYPES__ */ + +#if !defined(OS_INLINE) +# define OS_INLINE static inline +#endif + +#endif /* _OS_OSTYPES_H */ diff --git a/i386/include/libkern/_OSByteOrder.h b/i386/include/libkern/_OSByteOrder.h new file mode 100644 index 0000000..d8806fc --- /dev/null +++ b/i386/include/libkern/_OSByteOrder.h @@ -0,0 +1,133 @@ +/* + * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _OS__OSBYTEORDER_H +#define _OS__OSBYTEORDER_H + +/* + * This header is normally included from <libkern/OSByteOrder.h>. However, + * <sys/_endian.h> also includes this in the case of little-endian + * architectures, so that we can map OSByteOrder routines to the hton* and ntoh* + * macros. This results in the asymmetry below; we only include + * <libkern/arch/_OSByteOrder.h> for little-endian architectures. + */ + +//#include <sys/_types.h> + +/* Macros for swapping constant values in the preprocessing stage. */ +#define __DARWIN_OSSwapConstInt16(x) \ + ((__uint16_t)((((__uint16_t)(x) & 0xff00) >> 8) | \ + (((__uint16_t)(x) & 0x00ff) << 8))) + +#define __DARWIN_OSSwapConstInt32(x) \ + ((__uint32_t)((((__uint32_t)(x) & 0xff000000) >> 24) | \ + (((__uint32_t)(x) & 0x00ff0000) >> 8) | \ + (((__uint32_t)(x) & 0x0000ff00) << 8) | \ + (((__uint32_t)(x) & 0x000000ff) << 24))) + +#define __DARWIN_OSSwapConstInt64(x) \ + ((__uint64_t)((((__uint64_t)(x) & 0xff00000000000000ULL) >> 56) | \ + (((__uint64_t)(x) & 0x00ff000000000000ULL) >> 40) | \ + (((__uint64_t)(x) & 0x0000ff0000000000ULL) >> 24) | \ + (((__uint64_t)(x) & 0x000000ff00000000ULL) >> 8) | \ + (((__uint64_t)(x) & 0x00000000ff000000ULL) << 8) | \ + (((__uint64_t)(x) & 0x0000000000ff0000ULL) << 24) | \ + (((__uint64_t)(x) & 0x000000000000ff00ULL) << 40) | \ + (((__uint64_t)(x) & 0x00000000000000ffULL) << 56))) + +#if defined(__GNUC__) + +#if defined(__i386__) || defined(__x86_64__) +#include <libkern/i386/_OSByteOrder.h> +#endif + +#if defined(__arm__) +#include <libkern/arm/OSByteOrder.h> +#endif + + +#define __DARWIN_OSSwapInt16(x) \ + (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _OSSwapInt16(x)) + +#define __DARWIN_OSSwapInt32(x) \ + (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt32(x) : _OSSwapInt32(x)) + +#define __DARWIN_OSSwapInt64(x) \ + (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x)) + +#else /* ! __GNUC__ */ + +#if defined(__i386__) || defined(__x86_64__) + +#if !defined(__DARWIN_OS_INLINE) +# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +# define __DARWIN_OS_INLINE static inline +# elif defined(__MWERKS__) || defined(__cplusplus) +# define __DARWIN_OS_INLINE static inline +# else +# define __DARWIN_OS_INLINE static __inline__ +# endif +#endif + +__DARWIN_OS_INLINE +uint16_t +_OSSwapInt16( + uint16_t data +) +{ + return __DARWIN_OSSwapConstInt16(data); +} + +__DARWIN_OS_INLINE +uint32_t +_OSSwapInt32( + uint32_t data +) +{ + return __DARWIN_OSSwapConstInt32(data); +} + +__DARWIN_OS_INLINE +uint64_t +_OSSwapInt64( + uint64_t data +) +{ + return __DARWIN_OSSwapConstInt64(data); +} +#endif + +#define __DARWIN_OSSwapInt16(x) _OSSwapInt16(x) + +#define __DARWIN_OSSwapInt32(x) _OSSwapInt32(x) + +#define __DARWIN_OSSwapInt64(x) _OSSwapInt64(x) + +#endif /* __GNUC__ */ + +#endif /* ! _OS__OSBYTEORDER_H */ diff --git a/i386/include/libkern/crypto/md5.h b/i386/include/libkern/crypto/md5.h new file mode 100644 index 0000000..57e826a --- /dev/null +++ b/i386/include/libkern/crypto/md5.h @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +/* + * MD5.H - header file for MD5.C + */ + +/* + * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All + * rights reserved. + * + * License to copy and use this software is granted provided that it + * is identified as the "RSA Data Security, Inc. MD5 Message-Digest + * Algorithm" in all material mentioning or referencing this software + * or this function. + * + * License is also granted to make and use derivative works provided + * that such works are identified as "derived from the RSA Data + * Security, Inc. MD5 Message-Digest Algorithm" in all material + * mentioning or referencing the derived work. + * + * RSA Data Security, Inc. makes no representations concerning either + * the merchantability of this software or the suitability of this + * software for any particular purpose. It is provided "as is" + * without express or implied warranty of any kind. + * + * These notices must be retained in any copies of any part of this + * documentation and/or software. + */ + +#ifndef _CRYPTO_MD5_H_ +#define _CRYPTO_MD5_H_ + +#include <sys/types.h> +#include <sys/cdefs.h> + +__BEGIN_DECLS + +#define MD5_DIGEST_LENGTH 16 + +/* MD5 context. */ +typedef struct { + u_int32_t state[4]; /* state (ABCD) */ + u_int32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */ + unsigned char buffer[64]; /* input buffer */ +} MD5_CTX; + +extern void MD5Init(MD5_CTX *); +extern void MD5Update(MD5_CTX *, const void *, unsigned int); +extern void MD5Final(unsigned char [MD5_DIGEST_LENGTH], MD5_CTX *); + +__END_DECLS + +#endif /* _CRYPTO_MD5_H_ */ diff --git a/i386/include/libkern/crypto/sha1.h b/i386/include/libkern/crypto/sha1.h new file mode 100644 index 0000000..9acc46b --- /dev/null +++ b/i386/include/libkern/crypto/sha1.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _CRYPTO_SHA1_H_ +#define _CRYPTO_SHA1_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define SHA_DIGEST_LENGTH 20 +#define SHA1_RESULTLEN SHA_DIGEST_LENGTH + +typedef struct sha1_ctxt { + union { + u_int8_t b8[20]; + u_int32_t b32[5]; /* state (ABCDE) */ + } h; + union { + u_int8_t b8[8]; + u_int32_t b32[2]; + u_int64_t b64[1]; /* # of bits, modulo 2^64 (msb first) */ + } c; + union { + u_int8_t b8[64]; + u_int32_t b32[16]; /* input buffer */ + } m; + u_int8_t count; /* unused; for compatibility only */ +} SHA1_CTX; + +/* For compatibility with the other SHA-1 implementation. */ +#define sha1_init(c) SHA1Init(c) +#define sha1_loop(c, b, l) SHA1Update(c, b, l) +#define sha1_result(c, b) SHA1Final(b, c) + +extern void SHA1Init(SHA1_CTX *); +extern void SHA1Update(SHA1_CTX *, const void *, size_t); +extern void SHA1UpdateUsePhysicalAddress(SHA1_CTX *, const void *, size_t); +extern void SHA1Final(void *, SHA1_CTX *); + +#ifdef __cplusplus +} +#endif + +#endif /*_CRYPTO_SHA1_H_*/ diff --git a/i386/include/libkern/i386/OSByteOrder.h b/i386/include/libkern/i386/OSByteOrder.h new file mode 100644 index 0000000..7f19736 --- /dev/null +++ b/i386/include/libkern/i386/OSByteOrder.h @@ -0,0 +1,115 @@ +/* + * Copyright (c) 1999-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _OS_OSBYTEORDERI386_H +#define _OS_OSBYTEORDERI386_H + +#include <stdint.h> +#include <libkern/i386/_OSByteOrder.h> + +#if !defined(OS_INLINE) +#define OS_INLINE __DARWIN_OS_INLINE +#endif + +/* Functions for byte reversed loads. */ + +OS_INLINE +uint16_t +OSReadSwapInt16( + const volatile void * base, + uintptr_t byteOffset +) +{ + uint16_t result; + + result = *(volatile uint16_t *)((uintptr_t)base + byteOffset); + return _OSSwapInt16(result); +} + +OS_INLINE +uint32_t +OSReadSwapInt32( + const volatile void * base, + uintptr_t byteOffset +) +{ + uint32_t result; + + result = *(volatile uint32_t *)((uintptr_t)base + byteOffset); + return _OSSwapInt32(result); +} + +OS_INLINE +uint64_t +OSReadSwapInt64( + const volatile void * base, + uintptr_t byteOffset +) +{ + uint64_t result; + + result = *(volatile uint64_t *)((uintptr_t)base + byteOffset); + return _OSSwapInt64(result); +} + +/* Functions for byte reversed stores. */ + +OS_INLINE +void +OSWriteSwapInt16( + volatile void * base, + uintptr_t byteOffset, + uint16_t data +) +{ + *(volatile uint16_t *)((uintptr_t)base + byteOffset) = _OSSwapInt16(data); +} + +OS_INLINE +void +OSWriteSwapInt32( + volatile void * base, + uintptr_t byteOffset, + uint32_t data +) +{ + *(volatile uint32_t *)((uintptr_t)base + byteOffset) = _OSSwapInt32(data); +} + +OS_INLINE +void +OSWriteSwapInt64( + volatile void * base, + uintptr_t byteOffset, + uint64_t data +) +{ + *(volatile uint64_t *)((uintptr_t)base + byteOffset) = _OSSwapInt64(data); +} + +#endif /* ! _OS_OSBYTEORDERI386_H */ diff --git a/i386/include/libkern/i386/_OSByteOrder.h b/i386/include/libkern/i386/_OSByteOrder.h new file mode 100644 index 0000000..51477bb --- /dev/null +++ b/i386/include/libkern/i386/_OSByteOrder.h @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _OS__OSBYTEORDERI386_H +#define _OS__OSBYTEORDERI386_H + +#if !defined(__DARWIN_OS_INLINE) +# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +# define __DARWIN_OS_INLINE static inline +# elif defined(__MWERKS__) || defined(__cplusplus) +# define __DARWIN_OS_INLINE static inline +# else +# define __DARWIN_OS_INLINE static __inline__ +# endif +#endif + +/* Generic byte swapping functions. */ + +__DARWIN_OS_INLINE +__uint16_t +_OSSwapInt16( + __uint16_t _data +) +{ + return ((_data << 8) | (_data >> 8)); +} + +__DARWIN_OS_INLINE +__uint32_t +_OSSwapInt32( + __uint32_t _data +) +{ +#if defined(__llvm__) + return __builtin_bswap32(_data); +#else + __asm__ ("bswap %0" : "+r" (_data)); + return _data; +#endif +} + +#if defined(__llvm__) +__DARWIN_OS_INLINE +__uint64_t +_OSSwapInt64( + __uint64_t _data +) +{ + return __builtin_bswap64(_data); +} + +#elif defined(__i386__) +__DARWIN_OS_INLINE +__uint64_t +_OSSwapInt64( + __uint64_t _data +) +{ + __asm__ ("bswap %%eax\n\t" + "bswap %%edx\n\t" + "xchgl %%eax, %%edx" + : "+A" (_data)); + return _data; +} +#elif defined(__x86_64__) +__DARWIN_OS_INLINE +__uint64_t +_OSSwapInt64( + __uint64_t _data +) +{ + __asm__ ("bswap %0" : "+r" (_data)); + return _data; +} +#else +#error Unknown architecture +#endif + +#endif /* ! _OS__OSBYTEORDERI386_H */ diff --git a/i386/include/libkern/machine/OSByteOrder.h b/i386/include/libkern/machine/OSByteOrder.h new file mode 100644 index 0000000..4860215 --- /dev/null +++ b/i386/include/libkern/machine/OSByteOrder.h @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _OS_OSBYTEORDERMACHINE_H +#define _OS_OSBYTEORDERMACHINE_H + +#include <stdint.h> + +#if !defined(OS_INLINE) +# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +# define OS_INLINE static inline +# elif defined(__MWERKS__) || defined(__cplusplus) +# define OS_INLINE static inline +# else +# define OS_INLINE static __inline__ +# endif +#endif + +/* Generic byte swapping functions. */ + +OS_INLINE +uint16_t +_OSSwapInt16( + uint16_t data +) +{ + return OSSwapConstInt16(data); +} + +OS_INLINE +uint32_t +_OSSwapInt32( + uint32_t data +) +{ + return OSSwapConstInt32(data); +} + +OS_INLINE +uint64_t +_OSSwapInt64( + uint64_t data +) +{ + return OSSwapConstInt64(data); +} + +/* Functions for byte reversed loads. */ + +OS_INLINE +uint16_t +OSReadSwapInt16( + const volatile void * base, + uintptr_t byteOffset +) +{ + uint16_t data = *(volatile uint16_t *)((uintptr_t)base + byteOffset); + return _OSSwapInt16(data); +} + +OS_INLINE +uint32_t +OSReadSwapInt32( + const volatile void * base, + uintptr_t byteOffset +) +{ + uint32_t data = *(volatile uint32_t *)((uintptr_t)base + byteOffset); + return _OSSwapInt32(data); +} + +OS_INLINE +uint64_t +OSReadSwapInt64( + const volatile void * base, + uintptr_t byteOffset +) +{ + uint64_t data = *(volatile uint64_t *)((uintptr_t)base + byteOffset); + return _OSSwapInt64(data); +} + +/* Functions for byte reversed stores. */ + +OS_INLINE +void +OSWriteSwapInt16( + volatile void * base, + uintptr_t byteOffset, + uint16_t data +) +{ + *(volatile uint16_t *)((uintptr_t)base + byteOffset) = _OSSwapInt16(data); +} + +OS_INLINE +void +OSWriteSwapInt32( + volatile void * base, + uintptr_t byteOffset, + uint32_t data +) +{ + *(volatile uint32_t *)((uintptr_t)base + byteOffset) = _OSSwapInt32(data); +} + +OS_INLINE +void +OSWriteSwapInt64( + volatile void * base, + uintptr_t byteOffset, + uint64_t data +) +{ + *(volatile uint64_t *)((uintptr_t)base + byteOffset) = _OSSwapInt64(data); +} + +#endif /* ! _OS_OSBYTEORDERMACHINE_H */ diff --git a/i386/include/libkern/ppc/OSByteOrder.h b/i386/include/libkern/ppc/OSByteOrder.h new file mode 100644 index 0000000..c666685 --- /dev/null +++ b/i386/include/libkern/ppc/OSByteOrder.h @@ -0,0 +1,206 @@ +/* + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _OS_OSBYTEORDERPPC_H +#define _OS_OSBYTEORDERPPC_H + +#include <stdint.h> + +#if !defined(OS_INLINE) +# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +# define OS_INLINE static inline +# elif defined(__MWERKS__) || defined(__cplusplus) +# define OS_INLINE static inline +# else +# define OS_INLINE static __inline__ +# endif +#endif + +/* Functions for byte reversed loads. */ + +OS_INLINE +uint16_t +OSReadSwapInt16( + const volatile void * base, + uintptr_t byteOffset +) +{ + uint16_t result; + volatile uint16_t *addr = (volatile uint16_t *)((uintptr_t)base + byteOffset); + +#if defined(__llvm__) + result = *addr; + result = ((result << 8) | (result >> 8)); +#else + __asm__ ("lhbrx %0, %2, %1" + : "=r" (result) + : "r" (base), "bO" (byteOffset), "m" (*addr)); +#endif + + return result; +} + +OS_INLINE +uint32_t +OSReadSwapInt32( + const volatile void * base, + uintptr_t byteOffset +) +{ + uint32_t result; + volatile uint32_t *addr = (volatile uint32_t *)((uintptr_t)base + byteOffset); + +#if defined(__llvm__) + result = __builtin_bswap32(*addr); +#else + __asm__ ("lwbrx %0, %2, %1" + : "=r" (result) + : "r" (base), "bO" (byteOffset), "m" (*addr)); +#endif + + return result; +} + +OS_INLINE +uint64_t +OSReadSwapInt64( + const volatile void * base, + uintptr_t byteOffset +) +{ + volatile uint64_t *addr = (volatile uint64_t *)((uintptr_t)base + byteOffset); + union { + uint64_t u64; + uint32_t u32[2]; + } u; + +#if defined(__llvm__) + u.u64 = __builtin_bswap64(*addr); +#else + __asm__ ("lwbrx %0, %3, %2\n\t" + "lwbrx %1, %4, %2" + : "=&r" (u.u32[1]), "=r" (u.u32[0]) + : "r" (base), "bO" (byteOffset), "b" (byteOffset + 4), "m" (*addr)); +#endif + + return u.u64; +} + +/* Functions for byte reversed stores. */ + +OS_INLINE +void +OSWriteSwapInt16( + volatile void * base, + uintptr_t byteOffset, + uint16_t data +) +{ + volatile uint16_t *addr = (volatile uint16_t *)((uintptr_t)base + byteOffset); + +#if defined(__llvm__) + *addr = ((data >> 8) | (data << 8)); +#else + __asm__ ("sthbrx %1, %3, %2" + : "=m" (*addr) + : "r" (data), "r" (base), "bO" (byteOffset)); +#endif +} + +OS_INLINE +void +OSWriteSwapInt32( + volatile void * base, + uintptr_t byteOffset, + uint32_t data +) +{ + volatile uint32_t *addr = (volatile uint32_t *)((uintptr_t)base + byteOffset); + +#if defined(__llvm__) + *addr = __builtin_bswap32(data); +#else + __asm__ ("stwbrx %1, %3, %2" + : "=m" (*addr) + : "r" (data), "r" (base), "bO" (byteOffset)); +#endif +} + +OS_INLINE +void +OSWriteSwapInt64( + volatile void * base, + uintptr_t byteOffset, + uint64_t data +) +{ + volatile uint64_t *addr = (volatile uint64_t *)((uintptr_t)base + byteOffset); + +#if defined(__llvm__) + *addr = __builtin_bswap64(data); +#else + uint32_t hi = (uint32_t)(data >> 32); + uint32_t lo = (uint32_t)(data & 0xffffffff); + + __asm__ ("stwbrx %1, %4, %3\n\t" + "stwbrx %2, %5, %3" + : "=m" (*addr) + : "r" (lo), "r" (hi), "r" (base), "bO" (byteOffset), "b" (byteOffset + 4)); +#endif +} + +/* Generic byte swapping functions. */ + +OS_INLINE +uint16_t +_OSSwapInt16( + uint16_t data +) +{ + return OSReadSwapInt16(&data, 0); +} + +OS_INLINE +uint32_t +_OSSwapInt32( + uint32_t data +) +{ + return OSReadSwapInt32(&data, 0); +} + +OS_INLINE +uint64_t +_OSSwapInt64( + uint64_t data +) +{ + return OSReadSwapInt64(&data, 0); +} + +#endif /* ! _OS_OSBYTEORDERPPC_H */ diff --git a/i386/include/limits.h b/i386/include/limits.h new file mode 100644 index 0000000..a117167 --- /dev/null +++ b/i386/include/limits.h @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* $NetBSD: limits.h,v 1.8 1996/10/21 05:10:50 jtc Exp $ */ + +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)limits.h 8.2 (Berkeley) 1/4/94 + */ + +#ifndef _LIMITS_H_ +#define _LIMITS_H_ + +#include <sys/cdefs.h> +#include <i386/limits.h> +#include <sys/syslimits.h> + +#if !defined(_ANSI_SOURCE) +#define _POSIX_AIO_LISTIO_MAX 2 +#define _POSIX_AIO_MAX 1 +#define _POSIX_DELAYTIMER_MAX 32 +#define _POSIX_HOST_NAME_MAX 255 +#define _POSIX_LOGIN_NAME_MAX 9 +#define _POSIX_MQ_OPEN_MAX 8 +#define _POSIX_MQ_PRIO_MAX 32 + +#define _POSIX_ARG_MAX 4096 +#define _POSIX_CHILD_MAX 25 +#define _POSIX_LINK_MAX 8 +#define _POSIX_MAX_CANON 255 +#define _POSIX_MAX_INPUT 255 +#define _POSIX_NAME_MAX 14 +#define _POSIX_NGROUPS_MAX 8 +#define _POSIX_OPEN_MAX 20 +#define _POSIX_PATH_MAX 256 +#define _POSIX_PIPE_BUF 512 +#define _POSIX_SSIZE_MAX 32767 +#define _POSIX_STREAM_MAX 8 +#define _POSIX_TZNAME_MAX 6 + +#define _POSIX_RE_DUP_MAX 255 +#define _POSIX_RTSIG_MAX 8 +#define _POSIX_SEM_NSEMS_MAX 256 +#define _POSIX_SEM_VALUE_MAX 32767 +#define _POSIX_SIGQUEUE_MAX 32 +#define _POSIX_SS_REPL_MAX 4 +#define _POSIX_SYMLINK_MAX 255 +#define _POSIX_SYMLOOP_MAX 8 +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +#define _POSIX_THREAD_KEYS_MAX 128 +#define _POSIX_THREAD_THREADS_MAX 64 +#define _POSIX_TIMER_MAX 32 +#define _POSIX_TRACE_EVENT_NAME_MAX 30 +#define _POSIX_TRACE_NAME_MAX 8 +#define _POSIX_TRACE_SYS_MAX 8 +#define _POSIX_TRACE_USER_EVENT_MAX 32 +#define _POSIX_TTY_NAME_MAX 9 + +#define _POSIX2_BC_BASE_MAX 99 +#define _POSIX2_BC_DIM_MAX 2048 +#define _POSIX2_BC_SCALE_MAX 99 +#define _POSIX2_BC_STRING_MAX 1000 +#define _POSIX2_CHARCLASS_NAME_MAX 14 +#define _POSIX2_COLL_WEIGHTS_MAX 2 +#define _POSIX2_EQUIV_CLASS_MAX 2 +#define _POSIX2_EXPR_NEST_MAX 32 +#define _POSIX2_LINE_MAX 2048 +#define _POSIX2_RE_DUP_MAX 255 + +#define PTHREAD_STACK_MIN 8192 +#define PTHREAD_DESTRUCTOR_ITERATIONS 4 +#define PTHREAD_KEYS_MAX 512 + +#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) +#define PASS_MAX 128 +#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ + +#define NL_ARGMAX 9 +#define NL_LANGMAX 14 +#define NL_MSGMAX 32767 +#define NL_NMAX 1 +#define NL_SETMAX 255 +#define NL_TEXTMAX 2048 + +#define _XOPEN_IOV_MAX 16 +#define IOV_MAX 1024 +#define _XOPEN_NAME_MAX 255 +#define _XOPEN_PATH_MAX 1024 + +#endif /* _ANSI_SOURCE */ + +/* NZERO to be defined here. TBD. See also sys/param.h */ + +#endif /* !_LIMITS_H_ */ + diff --git a/i386/include/locale.h b/i386/include/locale.h new file mode 100644 index 0000000..ab28ceb --- /dev/null +++ b/i386/include/locale.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 1991, 1993 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)locale.h 8.1 (Berkeley) 6/2/93 + * $FreeBSD: /repoman/r/ncvs/src/include/locale.h,v 1.7 2002/10/09 09:19:27 tjr Exp $ + */ + +#ifndef _LOCALE_H_ +#define _LOCALE_H_ + +#include <_locale.h> + +#define LC_ALL 0 +#define LC_COLLATE 1 +#define LC_CTYPE 2 +#define LC_MONETARY 3 +#define LC_NUMERIC 4 +#define LC_TIME 5 +#define LC_MESSAGES 6 + +#define _LC_LAST 7 /* marks end */ + +__BEGIN_DECLS +char *setlocale(int, const char *); +__END_DECLS + +#endif /* _LOCALE_H_ */ diff --git a/i386/include/mach-o/arch.h b/i386/include/mach-o/arch.h new file mode 100644 index 0000000..526c10f --- /dev/null +++ b/i386/include/mach-o/arch.h @@ -0,0 +1,105 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _MACH_O_ARCH_H_ +#define _MACH_O_ARCH_H_ +/* + * Copyright (c) 1997 Apple Computer, Inc. + * + * Functions that deal with information about architectures. + * + */ + +#include <stdint.h> +#include <mach/machine.h> +#include <architecture/byte_order.h> + +/* The NXArchInfo structs contain the architectures symbolic name + * (such as "ppc"), its CPU type and CPU subtype as defined in + * mach/machine.h, the byte order for the architecture, and a + * describing string (such as "PowerPC"). + * There will both be entries for specific CPUs (such as ppc604e) as + * well as generic "family" entries (such as ppc). + */ +typedef struct { + const char *name; + cpu_type_t cputype; + cpu_subtype_t cpusubtype; + enum NXByteOrder byteorder; + const char *description; +} NXArchInfo; + +#if __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* NXGetAllArchInfos() returns a pointer to an array of all known + * NXArchInfo structures. The last NXArchInfo is marked by a NULL name. + */ +extern const NXArchInfo *NXGetAllArchInfos(void); + +/* NXGetLocalArchInfo() returns the NXArchInfo for the local host, or NULL + * if none is known. + */ +extern const NXArchInfo *NXGetLocalArchInfo(void); + +/* NXGetArchInfoFromName() and NXGetArchInfoFromCpuType() return the + * NXArchInfo from the architecture's name or cputype/cpusubtype + * combination. A cpusubtype of CPU_SUBTYPE_MULTIPLE can be used + * to request the most general NXArchInfo known for the given cputype. + * NULL is returned if no matching NXArchInfo can be found. + */ +extern const NXArchInfo *NXGetArchInfoFromName(const char *name); +extern const NXArchInfo *NXGetArchInfoFromCpuType(cpu_type_t cputype, + cpu_subtype_t cpusubtype); + +/* NXFindBestFatArch() is passed a cputype and cpusubtype and a set of + * fat_arch structs and selects the best one that matches (if any) and returns + * a pointer to that fat_arch struct (or NULL). The fat_arch structs must be + * in the host byte order and correct such that the fat_archs really points to + * enough memory for nfat_arch structs. It is possible that this routine could + * fail if new cputypes or cpusubtypes are added and an old version of this + * routine is used. But if there is an exact match between the cputype and + * cpusubtype and one of the fat_arch structs this routine will always succeed. + */ +extern struct fat_arch *NXFindBestFatArch(cpu_type_t cputype, + cpu_subtype_t cpusubtype, + struct fat_arch *fat_archs, + uint32_t nfat_archs); + +/* NXCombineCpuSubtypes() returns the resulting cpusubtype when combining two + * different cpusubtypes for the specified cputype. If the two cpusubtypes + * can't be combined (the specific subtypes are mutually exclusive) -1 is + * returned indicating it is an error to combine them. This can also fail and + * return -1 if new cputypes or cpusubtypes are added and an old version of + * this routine is used. But if the cpusubtypes are the same they can always + * be combined and this routine will return the cpusubtype pass in. + */ +extern cpu_subtype_t NXCombineCpuSubtypes(cpu_type_t cputype, + cpu_subtype_t cpusubtype1, + cpu_subtype_t cpusubtype2); + +#if __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _MACH_O_ARCH_H_ */ diff --git a/i386/include/mach-o/compact_unwind_encoding.h b/i386/include/mach-o/compact_unwind_encoding.h new file mode 100644 index 0000000..237b226 --- /dev/null +++ b/i386/include/mach-o/compact_unwind_encoding.h @@ -0,0 +1,224 @@ +/* -*- mode: C; c-basic-offset: 4; tab-width: 4 -*- + * + * Copyright (c) 2008-2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef __COMPACT_UNWIND_ENCODING__ +#define __COMPACT_UNWIND_ENCODING__ + +#include <stdint.h> + + +// +// Each final linked mach-o image has an optional __TEXT, __unwind_info section. +// This section is much smaller and faster to use than the __eh_frame section. +// + + + +// +// Compilers usually emit standard Dwarf FDEs. The linker recognizes standard FDEs and +// synthesizes a matching compact_unwind_encoding_t and adds it to the __unwind_info table. +// It is also possible for the compiler to emit __unwind_info entries for functions that +// have different unwind requirements at different ranges in the function. +// +typedef uint32_t compact_unwind_encoding_t; + + + +// +// The __unwind_info section is laid out for an efficient two level lookup. +// The header of the section contains a coarse index that maps function address +// to the page (4096 byte block) containing the unwind info for that function. +// + +#define UNWIND_SECTION_VERSION 1 +struct unwind_info_section_header +{ + uint32_t version; // UNWIND_SECTION_VERSION + uint32_t commonEncodingsArraySectionOffset; + uint32_t commonEncodingsArrayCount; + uint32_t personalityArraySectionOffset; + uint32_t personalityArrayCount; + uint32_t indexSectionOffset; + uint32_t indexCount; + // compact_unwind_encoding_t[] + // uintptr_t personalities[] + // unwind_info_section_header_index_entry[] + // unwind_info_section_header_lsda_index_entry[] +}; + +struct unwind_info_section_header_index_entry +{ + uint32_t functionOffset; + uint32_t secondLevelPagesSectionOffset; // section offset to start of regular or compress page + uint32_t lsdaIndexArraySectionOffset; // section offset to start of lsda_index array for this range +}; + +struct unwind_info_section_header_lsda_index_entry +{ + uint32_t functionOffset; + uint32_t lsdaOffset; +}; + +// +// There are two kinds of second level index pages: regular and compressed. +// A compressed page can hold up to 1021 entries, but it cannot be used +// if too many different encoding types are used. The regular page holds +// 511 entries. +// + +struct unwind_info_regular_second_level_entry +{ + uint32_t functionOffset; + compact_unwind_encoding_t encoding; +}; + +#define UNWIND_SECOND_LEVEL_REGULAR 2 +struct unwind_info_regular_second_level_page_header +{ + uint32_t kind; // UNWIND_SECOND_LEVEL_REGULAR + uint16_t entryPageOffset; + uint16_t entryCount; + // entry array +}; + +#define UNWIND_SECOND_LEVEL_COMPRESSED 3 +struct unwind_info_compressed_second_level_page_header +{ + uint32_t kind; // UNWIND_SECOND_LEVEL_COMPRESSED + uint16_t entryPageOffset; + uint16_t entryCount; + uint16_t encodingsPageOffset; + uint16_t encodingsCount; + // 32-bit entry array + // encodings array +}; + +#define UNWIND_INFO_COMPRESSED_ENTRY_FUNC_OFFSET(entry) (entry & 0x00FFFFFF) +#define UNWIND_INFO_COMPRESSED_ENTRY_ENCODING_INDEX(entry) ((entry >> 24) & 0xFF) + + + +// architecture independent bits +enum { + UNWIND_IS_NOT_FUNCTION_START = 0x80000000, + UNWIND_HAS_LSDA = 0x40000000, + UNWIND_PERSONALITY_MASK = 0x30000000, +}; + + +// x86_64 +// +// 1-bit: start +// 1-bit: has lsda +// 2-bit: personality index +// +// 4-bits: 0=old, 1=rbp based, 2=stack-imm, 3=stack-ind, 4=dwarf +// rbp based: +// 15-bits (5*3-bits per reg) register permutation +// 8-bits for stack offset +// frameless: +// 8-bits stack size +// 3-bits stack adjust +// 3-bits register count +// 10-bits register permutation +// +enum { + UNWIND_X86_64_MODE_MASK = 0x0F000000, + UNWIND_X86_64_MODE_COMPATIBILITY = 0x00000000, + UNWIND_X86_64_MODE_RBP_FRAME = 0x01000000, + UNWIND_X86_64_MODE_STACK_IMMD = 0x02000000, + UNWIND_X86_64_MODE_STACK_IND = 0x03000000, + UNWIND_X86_64_MODE_DWARF = 0x04000000, + + UNWIND_X86_64_RBP_FRAME_REGISTERS = 0x00007FFF, + UNWIND_X86_64_RBP_FRAME_OFFSET = 0x00FF0000, + + UNWIND_X86_64_FRAMELESS_STACK_SIZE = 0x00FF0000, + UNWIND_X86_64_FRAMELESS_STACK_ADJUST = 0x0000E000, + UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT = 0x00001C00, + UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION = 0x000003FF, + + UNWIND_X86_64_DWARF_SECTION_OFFSET = 0x03FFFFFF, +}; + +enum { + UNWIND_X86_64_REG_NONE = 0, + UNWIND_X86_64_REG_RBX = 1, + UNWIND_X86_64_REG_R12 = 2, + UNWIND_X86_64_REG_R13 = 3, + UNWIND_X86_64_REG_R14 = 4, + UNWIND_X86_64_REG_R15 = 5, + UNWIND_X86_64_REG_RBP = 6, +}; + + +// x86 +// +// 1-bit: start +// 1-bit: has lsda +// 2-bit: personality index +// +// 4-bits: 0=old, 1=ebp based, 2=stack-imm, 3=stack-ind, 4=dwarf +// ebp based: +// 15-bits (5*3-bits per reg) register permutation +// 8-bits for stack offset +// frameless: +// 8-bits stack size +// 3-bits stack adjust +// 3-bits register count +// 10-bits register permutation +// +enum { + UNWIND_X86_MODE_MASK = 0x0F000000, + UNWIND_X86_MODE_COMPATIBILITY = 0x00000000, + UNWIND_X86_MODE_EBP_FRAME = 0x01000000, + UNWIND_X86_MODE_STACK_IMMD = 0x02000000, + UNWIND_X86_MODE_STACK_IND = 0x03000000, + UNWIND_X86_MODE_DWARF = 0x04000000, + + UNWIND_X86_EBP_FRAME_REGISTERS = 0x00007FFF, + UNWIND_X86_EBP_FRAME_OFFSET = 0x00FF0000, + + UNWIND_X86_FRAMELESS_STACK_SIZE = 0x00FF0000, + UNWIND_X86_FRAMELESS_STACK_ADJUST = 0x0000E000, + UNWIND_X86_FRAMELESS_STACK_REG_COUNT = 0x00001C00, + UNWIND_X86_FRAMELESS_STACK_REG_PERMUTATION = 0x000003FF, + + UNWIND_X86_DWARF_SECTION_OFFSET = 0x03FFFFFF, +}; + +enum { + UNWIND_X86_REG_NONE = 0, + UNWIND_X86_REG_EBX = 1, + UNWIND_X86_REG_ECX = 2, + UNWIND_X86_REG_EDX = 3, + UNWIND_X86_REG_EDI = 4, + UNWIND_X86_REG_ESI = 5, + UNWIND_X86_REG_EBP = 6, +}; + + +#endif + diff --git a/i386/include/mach-o/dyld.h b/i386/include/mach-o/dyld.h new file mode 100644 index 0000000..3f579ef --- /dev/null +++ b/i386/include/mach-o/dyld.h @@ -0,0 +1,253 @@ +/* + * Copyright (c) 1999-2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _MACH_O_DYLD_H_ +#define _MACH_O_DYLD_H_ + + +#include <stddef.h> +#include <stdint.h> +#include <stdbool.h> + +#include <mach-o/loader.h> +#include <Availability.h> + +#if __cplusplus +extern "C" { +#endif + +/* + * The following functions allow you to iterate through all loaded images. + * This is not a thread safe operation. Another thread can add or remove + * an image during the iteration. + * + * Many uses of these routines can be replace by a call to dladdr() which + * will return the mach_header and name of an image, given an address in + * the image. dladdr() is thread safe. + */ +extern uint32_t _dyld_image_count(void) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); +extern const struct mach_header* _dyld_get_image_header(uint32_t image_index) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); +extern intptr_t _dyld_get_image_vmaddr_slide(uint32_t image_index) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); +extern const char* _dyld_get_image_name(uint32_t image_index) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); + + +/* + * The following functions allow you to install callbacks which will be called + * by dyld whenever an image is loaded or unloaded. During a call to _dyld_register_func_for_add_image() + * the callback func is called for every existing image. Later, it is called as each new image + * is loaded and bound (but initializers not yet run). The callback registered with + * _dyld_register_func_for_remove_image() is called after any terminators in an image are run + * and before the image is un-memory-mapped. + */ +extern void _dyld_register_func_for_add_image(void (*func)(const struct mach_header* mh, intptr_t vmaddr_slide)) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); +extern void _dyld_register_func_for_remove_image(void (*func)(const struct mach_header* mh, intptr_t vmaddr_slide)) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); + + +/* + * NSVersionOfRunTimeLibrary() returns the current_version number of the currently dylib + * specifed by the libraryName. The libraryName parameter would be "bar" for /path/libbar.3.dylib and + * "Foo" for /path/Foo.framework/Versions/A/Foo. It returns -1 if no such library is loaded. + */ +extern int32_t NSVersionOfRunTimeLibrary(const char* libraryName) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); + + +/* + * NSVersionOfRunTimeLibrary() returns the current_version number that the main executable was linked + * against at build time. The libraryName parameter would be "bar" for /path/libbar.3.dylib and + * "Foo" for /path/Foo.framework/Versions/A/Foo. It returns -1 if the main executable did not link + * against the specified library. + */ +extern int32_t NSVersionOfLinkTimeLibrary(const char* libraryName) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); + + +/* + * _NSGetExecutablePath() copies the path of the main executable into the buffer. The bufsize parameter + * should initially be the size of the buffer. The function returns 0 if the path was successfully copied, + * and *bufsize is left unchanged. It returns -1 if the buffer is not large enough, and *bufsize is set + * to the size required. + * + * Note that _NSGetExecutablePath will return "a path" to the executable not a "real path" to the executable. + * That is the path may be a symbolic link and not the real file. With deep directories the total bufsize + * needed could be more than MAXPATHLEN. + */ +extern int _NSGetExecutablePath(char* buf, uint32_t* bufsize) __OSX_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_2_0); + + + +/* + * _dyld_moninit() is a private interface between dyld and libSystem. + */ +extern void _dyld_moninit(void (*monaddition)(char *lowpc, char *highpc)) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); + + + + + +/* + * The following dyld API's are deprecated as of Mac OS X 10.5. They are either + * no longer necessary or are superceeded by dlopen and friends in <dlfcn.h>. + * dlopen/dlsym/dlclose have been available since Mac OS X 10.3 and work with + * dylibs and bundles. + * + * NSAddImage -> dlopen + * NSLookupSymbolInImage -> dlsym + * NSCreateObjectFileImageFromFile -> dlopen + * NSDestroyObjectFileImage -> dlclose + * NSLinkModule -> not needed when dlopen used + * NSUnLinkModule -> not needed when dlclose used + * NSLookupSymbolInModule -> dlsym + * _dyld_image_containing_address -> dladdr + * NSLinkEditError -> dlerror + * + */ + +#ifndef ENUM_DYLD_BOOL +#define ENUM_DYLD_BOOL + #undef FALSE + #undef TRUE + enum DYLD_BOOL { FALSE, TRUE }; +#endif /* ENUM_DYLD_BOOL */ + + +/* Object file image API */ +typedef enum { + NSObjectFileImageFailure, /* for this a message is printed on stderr */ + NSObjectFileImageSuccess, + NSObjectFileImageInappropriateFile, + NSObjectFileImageArch, + NSObjectFileImageFormat, /* for this a message is printed on stderr */ + NSObjectFileImageAccess +} NSObjectFileImageReturnCode; + +typedef struct __NSObjectFileImage* NSObjectFileImage; + +/* NSObjectFileImage can only be used with MH_BUNDLE files */ +extern NSObjectFileImageReturnCode NSCreateObjectFileImageFromFile(const char* pathName, NSObjectFileImage *objectFileImage) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern NSObjectFileImageReturnCode NSCreateObjectFileImageFromMemory(const void *address, size_t size, NSObjectFileImage *objectFileImage) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern bool NSDestroyObjectFileImage(NSObjectFileImage objectFileImage) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); + +extern uint32_t NSSymbolDefinitionCountInObjectFileImage(NSObjectFileImage objectFileImage) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern const char* NSSymbolDefinitionNameInObjectFileImage(NSObjectFileImage objectFileImage, uint32_t ordinal) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern uint32_t NSSymbolReferenceCountInObjectFileImage(NSObjectFileImage objectFileImage) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern const char* NSSymbolReferenceNameInObjectFileImage(NSObjectFileImage objectFileImage, uint32_t ordinal, bool *tentative_definition) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern bool NSIsSymbolDefinedInObjectFileImage(NSObjectFileImage objectFileImage, const char* symbolName) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); +extern void* NSGetSectionDataInObjectFileImage(NSObjectFileImage objectFileImage, const char* segmentName, const char* sectionName, size_t *size) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern bool NSHasModInitObjectFileImage(NSObjectFileImage objectFileImage) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); + +typedef struct __NSModule* NSModule; +extern const char* NSNameOfModule(NSModule m) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern const char* NSLibraryNameForModule(NSModule m) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); + +extern NSModule NSLinkModule(NSObjectFileImage objectFileImage, const char* moduleName, uint32_t options) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +#define NSLINKMODULE_OPTION_NONE 0x0 +#define NSLINKMODULE_OPTION_BINDNOW 0x1 +#define NSLINKMODULE_OPTION_PRIVATE 0x2 +#define NSLINKMODULE_OPTION_RETURN_ON_ERROR 0x4 +#define NSLINKMODULE_OPTION_DONT_CALL_MOD_INIT_ROUTINES 0x8 +#define NSLINKMODULE_OPTION_TRAILING_PHYS_NAME 0x10 + +extern bool NSUnLinkModule(NSModule module, uint32_t options) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +#define NSUNLINKMODULE_OPTION_NONE 0x0 +#define NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED 0x1 +#define NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES 0x2 + +/* symbol API */ +typedef struct __NSSymbol* NSSymbol; +extern bool NSIsSymbolNameDefined(const char* symbolName) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); +extern bool NSIsSymbolNameDefinedWithHint(const char* symbolName, const char* libraryNameHint) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); +extern bool NSIsSymbolNameDefinedInImage(const struct mach_header* image, const char* symbolName) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); +extern NSSymbol NSLookupAndBindSymbol(const char* symbolName) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); +extern NSSymbol NSLookupAndBindSymbolWithHint(const char* symbolName, const char* libraryNameHint) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); +extern NSSymbol NSLookupSymbolInModule(NSModule module, const char* symbolName) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern NSSymbol NSLookupSymbolInImage(const struct mach_header* image, const char* symbolName, uint32_t options) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0 +#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1 +#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY 0x2 +#define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4 +extern const char* NSNameOfSymbol(NSSymbol symbol) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern void * NSAddressOfSymbol(NSSymbol symbol) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern NSModule NSModuleForSymbol(NSSymbol symbol) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); + +/* error handling API */ +typedef enum { + NSLinkEditFileAccessError, + NSLinkEditFileFormatError, + NSLinkEditMachResourceError, + NSLinkEditUnixResourceError, + NSLinkEditOtherError, + NSLinkEditWarningError, + NSLinkEditMultiplyDefinedError, + NSLinkEditUndefinedError +} NSLinkEditErrors; + +/* + * For the NSLinkEditErrors value NSLinkEditOtherError these are the values + * passed to the link edit error handler as the errorNumber (what would be an + * errno value for NSLinkEditUnixResourceError or a kern_return_t value for + * NSLinkEditMachResourceError). + */ +typedef enum { + NSOtherErrorRelocation, + NSOtherErrorLazyBind, + NSOtherErrorIndrLoop, + NSOtherErrorLazyInit, + NSOtherErrorInvalidArgs +} NSOtherErrorNumbers; + +extern void NSLinkEditError(NSLinkEditErrors *c, int *errorNumber, const char** fileName, const char** errorString) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); + +typedef struct { + void (*undefined)(const char* symbolName); + NSModule (*multiple)(NSSymbol s, NSModule oldModule, NSModule newModule); + void (*linkEdit)(NSLinkEditErrors errorClass, int errorNumber, + const char* fileName, const char* errorString); +} NSLinkEditErrorHandlers; + +extern void NSInstallLinkEditErrorHandlers(const NSLinkEditErrorHandlers *handlers) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); + +extern bool NSAddLibrary(const char* pathName) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); +extern bool NSAddLibraryWithSearching(const char* pathName) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); +extern const struct mach_header* NSAddImage(const char* image_name, uint32_t options) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +#define NSADDIMAGE_OPTION_NONE 0x0 +#define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1 +#define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2 +#define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4 +#define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME 0x8 + +extern bool _dyld_present(void) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern bool _dyld_launched_prebound(void) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern bool _dyld_all_twolevel_modules_prebound(void) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern void _dyld_bind_objc_module(const void* objc_module) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern bool _dyld_bind_fully_image_containing_address(const void* address) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern bool _dyld_image_containing_address(const void* address) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); +extern void _dyld_lookup_and_bind(const char* symbol_name, void **address, NSModule* module) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); +extern void _dyld_lookup_and_bind_with_hint(const char* symbol_name, const char* library_name_hint, void** address, NSModule* module) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); +extern void _dyld_lookup_and_bind_fully(const char* symbol_name, void** address, NSModule* module) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); + +extern const struct mach_header* _dyld_get_image_header_containing_address(const void* address) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); + + +#if __cplusplus +} +#endif + +#endif /* _MACH_O_DYLD_H_ */ diff --git a/i386/include/mach-o/dyld_images.h b/i386/include/mach-o/dyld_images.h new file mode 100644 index 0000000..ed710ef --- /dev/null +++ b/i386/include/mach-o/dyld_images.h @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2006-2010 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _DYLD_IMAGES_ +#define _DYLD_IMAGES_ + +#include <stdbool.h> +#include <unistd.h> +#include <mach/mach.h> + +#ifdef __cplusplus +extern "C" { +#endif + + +/* + * Beginning in Mac OS X 10.4, this is how gdb discovers which mach-o images are loaded in a process. + * + * gdb looks for the symbol "_dyld_all_image_infos" in dyld. It contains the fields below. + * + * For a snashot of what images are currently loaded, the infoArray fields contain a pointer + * to an array of all images. If infoArray is NULL, it means it is being modified, come back later. + * + * To be notified of changes, gdb sets a break point on the address pointed to by the notificationn + * field. The function it points to is called by dyld with an array of information about what images + * have been added (dyld_image_adding) or are about to be removed (dyld_image_removing). + * + * The notification is called after infoArray is updated. This means that if gdb attaches to a process + * and infoArray is NULL, gdb can set a break point on notification and let the proccess continue to + * run until the break point. Then gdb can inspect the full infoArray. + * + * The dyldVersion field always points to a C string that contains the dyld version. For instance, + * in dyld-127.3, dyldVersion would contain a pointer to "127.3". + * + * The errorMessage and terminationFlags fields are normally zero. If dyld terminates a process + * (for instance because a required dylib or symbol is missing), then the errorMessage field will + * be set to point to a C string message buffer containing the reason dyld terminate the process. + * The low bit of the terminationFlags will be set if dyld terminated the process before any user + * code ran, in which case there is no need for the crash log to contain the backtrace. + * + * When dyld terminates a process because some required dylib or symbol cannot be bound, in + * addition to the errorMessage field, it now sets the errorKind field and the corresponding + * fields: errorClientOfDylibPath, errorTargetDylibPath, errorSymbol. + * + */ + +enum dyld_image_mode { dyld_image_adding=0, dyld_image_removing=1 }; + +struct dyld_image_info { + const struct mach_header* imageLoadAddress; /* base address image is mapped into */ + const char* imageFilePath; /* path dyld used to load the image */ + uintptr_t imageFileModDate; /* time_t of image file */ + /* if stat().st_mtime of imageFilePath does not match imageFileModDate, */ + /* then file has been modified since dyld loaded it */ +}; + +struct dyld_uuid_info { + const struct mach_header* imageLoadAddress; /* base address image is mapped into */ + uuid_t imageUUID; /* UUID of image */ +}; + +typedef void (*dyld_image_notifier)(enum dyld_image_mode mode, uint32_t infoCount, const struct dyld_image_info info[]); + +/* for use in dyld_all_image_infos.errorKind field */ +enum { dyld_error_kind_none=0, + dyld_error_kind_dylib_missing=1, + dyld_error_kind_dylib_wrong_arch=2, + dyld_error_kind_dylib_version=3, + dyld_error_kind_symbol_missing=4 + }; + + +struct dyld_all_image_infos { + uint32_t version; /* 1 in Mac OS X 10.4 and 10.5 */ + uint32_t infoArrayCount; + const struct dyld_image_info* infoArray; + dyld_image_notifier notification; + bool processDetachedFromSharedRegion; + /* the following fields are only in version 2 (Mac OS X 10.6, iPhoneOS 2.0) and later */ + bool libSystemInitialized; + const struct mach_header* dyldImageLoadAddress; + /* the following field is only in version 3 (Mac OS X 10.6, iPhoneOS 3.0) and later */ + void* jitInfo; + /* the following fields are only in version 5 (Mac OS X 10.6, iPhoneOS 3.0) and later */ + const char* dyldVersion; + const char* errorMessage; + uintptr_t terminationFlags; + /* the following field is only in version 6 (Mac OS X 10.6, iPhoneOS 3.1) and later */ + void* coreSymbolicationShmPage; + /* the following field is only in version 7 (Mac OS X 10.6, iPhoneOS 3.1) and later */ + uintptr_t systemOrderFlag; + /* the following field is only in version 8 (Mac OS X 10.7, iPhoneOS 3.1) and later */ + uintptr_t uuidArrayCount; + const struct dyld_uuid_info* uuidArray; /* only images not in dyld shared cache */ + /* the following field is only in version 9 (Mac OS X 10.7, iOS 4.0) and later */ + struct dyld_all_image_infos* dyldAllImageInfosAddress; + /* the following field is only in version 10 (Mac OS X 10.7, iOS 4.2) and later */ + uintptr_t initialImageCount; + /* the following field is only in version 11 (Mac OS X 10.7, iOS 4.2) and later */ + uintptr_t errorKind; + const char* errorClientOfDylibPath; + const char* errorTargetDylibPath; + const char* errorSymbol; + /* the following field is only in version 12 (Mac OS X 10.7, iOS 4.3) and later */ + uintptr_t sharedCacheSlide; +}; +extern struct dyld_all_image_infos dyld_all_image_infos; + +/* + * Beginning in Mac OS X 10.6, rather than looking up the symbol "_dyld_all_image_infos" + * in dyld's symbol table, you can add DYLD_ALL_IMAGE_INFOS_OFFSET_OFFSET to the mach_header + * for dyld and read the 32-bit unsigned int at that location. Adding that value to dyld's + * mach_header address gets you the address of dyld_all_image_infos in dyld. + */ +#define DYLD_ALL_IMAGE_INFOS_OFFSET_OFFSET 0x1010 + + + +/* + * Beginning in Mac OS X 10.5, this is how gdb discovers where the shared cache is in a process. + * Images that are in the shared cache have their segments rearranged, so when using imageFilePath + * to load the file from disk, you have to know to adjust addresses based on how their segment + * was rearranged. + * + * gdb looks for the symbol "_dyld_shared_region_ranges" in dyld. + * + * It contains information the count of shared regions used by the process. The count is + * the number of start/length pairs. + */ +struct dyld_shared_cache_ranges { + uintptr_t sharedRegionsCount; /* how many ranges follow */ + struct { + uintptr_t start; + uintptr_t length; + } ranges[4]; /* max regions */ +}; +extern struct dyld_shared_cache_ranges dyld_shared_cache_ranges; + + + +#ifdef __cplusplus +} +#endif + +#endif /* _DYLD_IMAGES_ */ diff --git a/i386/include/mach-o/fat.h b/i386/include/mach-o/fat.h new file mode 100644 index 0000000..e2bcf43 --- /dev/null +++ b/i386/include/mach-o/fat.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _MACH_O_FAT_H_ +#define _MACH_O_FAT_H_ +/* + * This header file describes the structures of the file format for "fat" + * architecture specific file (wrapper design). At the begining of the file + * there is one fat_header structure followed by a number of fat_arch + * structures. For each architecture in the file, specified by a pair of + * cputype and cpusubtype, the fat_header describes the file offset, file + * size and alignment in the file of the architecture specific member. + * The padded bytes in the file to place each member on it's specific alignment + * are defined to be read as zeros and can be left as "holes" if the file system + * can support them as long as they read as zeros. + * + * All structures defined here are always written and read to/from disk + * in big-endian order. + */ + +/* + * <mach/machine.h> is needed here for the cpu_type_t and cpu_subtype_t types + * and contains the constants for the possible values of these types. + */ +#include <stdint.h> +#include <mach/machine.h> +#include <architecture/byte_order.h> + +#define FAT_MAGIC 0xcafebabe +#define FAT_CIGAM 0xbebafeca /* NXSwapLong(FAT_MAGIC) */ + +struct fat_header { + uint32_t magic; /* FAT_MAGIC */ + uint32_t nfat_arch; /* number of structs that follow */ +}; + +struct fat_arch { + cpu_type_t cputype; /* cpu specifier (int) */ + cpu_subtype_t cpusubtype; /* machine specifier (int) */ + uint32_t offset; /* file offset to this object file */ + uint32_t size; /* size of this object file */ + uint32_t align; /* alignment as a power of 2 */ +}; + +#endif /* _MACH_O_FAT_H_ */ diff --git a/i386/include/mach-o/getsect.h b/i386/include/mach-o/getsect.h new file mode 100644 index 0000000..cee1f9f --- /dev/null +++ b/i386/include/mach-o/getsect.h @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _MACH_O_GETSECT_H_ +#define _MACH_O_GETSECT_H_ + +#include <stdint.h> +#include <mach-o/loader.h> + +#if __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* + * Runtime interfaces for Mach-O programs. For both 32-bit and 64-bit programs, + * where the sizes returned will be 32-bit or 64-bit based on the size of + * 'unsigned long'. + */ +extern char *getsectdata( + const char *segname, + const char *sectname, + unsigned long *size); + +extern char *getsectdatafromFramework( + const char *FrameworkName, + const char *segname, + const char *sectname, + unsigned long *size); + +extern unsigned long get_end(void); +extern unsigned long get_etext(void); +extern unsigned long get_edata(void); + +#ifndef __LP64__ +/* + * Runtime interfaces for 32-bit Mach-O programs. + */ +extern const struct section *getsectbyname( + const char *segname, + const char *sectname); + +extern uint8_t *getsectiondata( + const struct mach_header *mhp, + const char *segname, + const char *sectname, + unsigned long *size); + +extern const struct segment_command *getsegbyname( + const char *segname); + +extern uint8_t *getsegmentdata( + const struct mach_header *mhp, + const char *segname, + unsigned long *size); + +#else /* defined(__LP64__) */ +/* + * Runtime interfaces for 64-bit Mach-O programs. + */ +extern const struct section_64 *getsectbyname( + const char *segname, + const char *sectname); + +extern uint8_t *getsectiondata( + const struct mach_header_64 *mhp, + const char *segname, + const char *sectname, + unsigned long *size); + +extern const struct segment_command_64 *getsegbyname( + const char *segname); + +extern uint8_t *getsegmentdata( + const struct mach_header_64 *mhp, + const char *segname, + unsigned long *size); + +#endif /* defined(__LP64__) */ + +/* + * Interfaces for tools working with 32-bit Mach-O files. + */ +extern char *getsectdatafromheader( + const struct mach_header *mhp, + const char *segname, + const char *sectname, + uint32_t *size); + +extern const struct section *getsectbynamefromheader( + const struct mach_header *mhp, + const char *segname, + const char *sectname); + +/* + * Interfaces for tools working with 64-bit Mach-O files. + */ +extern char *getsectdatafromheader_64( + const struct mach_header_64 *mhp, + const char *segname, + const char *sectname, + uint64_t *size); + +extern const struct section_64 *getsectbynamefromheader_64( + const struct mach_header_64 *mhp, + const char *segname, + const char *sectname); + +#if __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _MACH_O_GETSECT_H_ */ diff --git a/i386/include/mach-o/i386/swap.h b/i386/include/mach-o/i386/swap.h new file mode 100644 index 0000000..09e322f --- /dev/null +++ b/i386/include/mach-o/i386/swap.h @@ -0,0 +1,96 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#include <architecture/byte_order.h> +#include <mach/i386/thread_status.h> + +extern void swap_i386_thread_state( + i386_thread_state_t *cpu, + enum NXByteOrder target_byte_order); + +/* current i386 thread states */ +#if i386_THREAD_STATE == 1 +extern void swap_i386_float_state( + struct i386_float_state *fpu, + enum NXByteOrder target_byte_order); + +extern void swap_i386_exception_state( + i386_exception_state_t *exc, + enum NXByteOrder target_byte_order); +#endif /* i386_THREAD_STATE == 1 */ + +/* i386 thread states on older releases */ +#if i386_THREAD_STATE == -1 +extern void swap_i386_thread_fpstate( + i386_thread_fpstate_t *fpu, + enum NXByteOrder target_byte_order); + +extern void swap_i386_thread_exceptstate( + i386_thread_exceptstate_t *exc, + enum NXByteOrder target_byte_order); + +extern void swap_i386_thread_cthreadstate( + i386_thread_cthreadstate_t *user, + enum NXByteOrder target_byte_order); +#endif /* i386_THREAD_STATE == -1 */ + +#ifdef x86_THREAD_STATE64 +extern void swap_x86_thread_state64( + x86_thread_state64_t *cpu, + enum NXByteOrder target_byte_order); + +extern void swap_x86_state_hdr( + x86_state_hdr_t *hdr, + enum NXByteOrder target_byte_order); + +extern void swap_x86_float_state64( + x86_float_state64_t *fpu, + enum NXByteOrder target_byte_order); + +extern void swap_x86_exception_state64( + x86_exception_state64_t *exc, + enum NXByteOrder target_byte_order); + +extern void swap_x86_thread_state( + x86_thread_state_t *cpu, + enum NXByteOrder target_byte_order); + +extern void swap_x86_float_state( + x86_float_state_t *fpu, + enum NXByteOrder target_byte_order); + +extern void swap_x86_exception_state( + x86_exception_state_t *exc, + enum NXByteOrder target_byte_order); + +extern void swap_x86_debug_state32( + x86_debug_state32_t *debug, + enum NXByteOrder target_byte_order); + +extern void swap_x86_debug_state64( + x86_debug_state64_t *debug, + enum NXByteOrder target_byte_order); + +extern void swap_x86_debug_state( + x86_debug_state_t *debug, + enum NXByteOrder target_byte_order); +#endif /* x86_THREAD_STATE64 */ diff --git a/i386/include/mach-o/ldsyms.h b/i386/include/mach-o/ldsyms.h new file mode 100644 index 0000000..3f28b1b --- /dev/null +++ b/i386/include/mach-o/ldsyms.h @@ -0,0 +1,133 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _MACHO_LDSYMS_H_ +#define _MACHO_LDSYMS_H_ + +#include <mach-o/loader.h> + +/* + * This file describes the link editor defined symbols. The semantics of a + * link editor symbol is that it is defined by the link editor only if it is + * referenced and it is an error for the user to define them (see the man page + * ld(1)). The standard UNIX link editor symbols: __end, __etext and __edata + * are not not supported by the Apple Mach-O link editor. These symbols are + * really not meaningful in a Mach-O object file and the link editor symbols + * that are supported (described here) replace them. In the case of the + * standard UNIX link editor symbols the program can use the symbol + * __mh_execute_header and walk the load commands of it's program to determine + * the ending (or beginning) of any section or segment in the program. Note + * that the compiler prepends an underbar to all external symbol names coded + * in a high level language. Thus in 'C' names are coded without an underbar + * and symbol names in the symbol table have an underbar. There are two cpp + * macros for each link editor defined name in this file. The macro with a + * leading underbar is the symbol name and the one without is the name as + * coded in 'C'. + */ + +/* + * The value of the link editor defined symbol _MH_EXECUTE_SYM is the address + * of the mach header in a Mach-O executable file type. It does not appear in + * any file type other than a MH_EXECUTE file type. The type of the symbol is + * absolute as the header is not part of any section. + */ +#define _MH_EXECUTE_SYM "__mh_execute_header" +#define MH_EXECUTE_SYM "_mh_execute_header" +extern const struct +#ifdef __LP64__ +mach_header_64 +#else +mach_header +#endif +_mh_execute_header; + +/* + * The value of the link editor defined symbol _MH_BUNDLE_SYM is the address + * of the mach header in a Mach-O bundle file type. It does not appear in + * any file type other than a MH_BUNDLE file type. The type of the symbol is + * an N_SECT symbol even thought the header is not part of any section. This + * symbol is private to the code in the bundle it is a part of. + */ +#define _MH_BUNDLE_SYM "__mh_bundle_header" +#define MH_BUNDLE_SYM "_mh_bundle_header" +extern const struct +#ifdef __LP64__ +mach_header_64 +#else +mach_header +#endif +_mh_bundle_header; + +/* + * The value of the link editor defined symbol _MH_DYLIB_SYM is the address + * of the mach header in a Mach-O dylib file type. It does not appear in + * any file type other than a MH_DYLIB file type. The type of the symbol is + * an N_SECT symbol even thought the header is not part of any section. This + * symbol is private to the code in the library it is a part of. + */ +#define _MH_DYLIB_SYM "__mh_dylib_header" +#define MH_DYLIB_SYM "_mh_dylib_header" +extern const struct +#ifdef __LP64__ +mach_header_64 +#else +mach_header +#endif +_mh_dylib_header; + +/* + * The value of the link editor defined symbol _MH_DYLINKER_SYM is the address + * of the mach header in a Mach-O dylinker file type. It does not appear in + * any file type other than a MH_DYLINKER file type. The type of the symbol is + * an N_SECT symbol even thought the header is not part of any section. This + * symbol is private to the code in the dynamic linker it is a part of. + */ +#define _MH_DYLINKER_SYM "__mh_dylinker_header" +#define MH_DYLINKER_SYM "_mh_dylinker_header" +extern const struct +#ifdef __LP64__ +mach_header_64 +#else +mach_header +#endif +_mh_dylinker_header; + +/* + * For the MH_PRELOAD file type the headers are not loaded as part of any + * segment so the link editor defines symbols defined for the beginning + * and ending of each segment and each section in each segment. The names for + * the symbols for a segment's beginning and end will have the form: + * __SEGNAME__begin and __SEGNAME__end where __SEGNAME is the name of the + * segment. The names for the symbols for a section's beginning and end will + * have the form: __SEGNAME__sectname__begin and __SEGNAME__sectname__end + * where __sectname is the name of the section and __SEGNAME is the segment it + * is in. + * + * The above symbols' types are those of the section they are referring to. + * This is true even for symbols who's values are end's of a section and + * that value is next address after that section and not really in that + * section. This results in these symbols having types referring to sections + * who's values are not in that section. + */ + +#endif /* _MACHO_LDSYMS_H_ */ diff --git a/i386/include/mach-o/loader.h b/i386/include/mach-o/loader.h new file mode 100644 index 0000000..ff18e29 --- /dev/null +++ b/i386/include/mach-o/loader.h @@ -0,0 +1,1402 @@ +/* + * Copyright (c) 1999-2010 Apple Inc. All Rights Reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _MACHO_LOADER_H_ +#define _MACHO_LOADER_H_ + +/* + * This file describes the format of mach object files. + */ +#include <stdint.h> + +/* + * <mach/machine.h> is needed here for the cpu_type_t and cpu_subtype_t types + * and contains the constants for the possible values of these types. + */ +#include <mach/machine.h> + +/* + * <mach/vm_prot.h> is needed here for the vm_prot_t type and contains the + * constants that are or'ed together for the possible values of this type. + */ +#include <mach/vm_prot.h> + +/* + * <machine/thread_status.h> is expected to define the flavors of the thread + * states and the structures of those flavors for each machine. + */ +#include <mach/machine/thread_status.h> +#include <architecture/byte_order.h> + +/* + * The 32-bit mach header appears at the very beginning of the object file for + * 32-bit architectures. + */ +struct mach_header { + uint32_t magic; /* mach magic number identifier */ + cpu_type_t cputype; /* cpu specifier */ + cpu_subtype_t cpusubtype; /* machine specifier */ + uint32_t filetype; /* type of file */ + uint32_t ncmds; /* number of load commands */ + uint32_t sizeofcmds; /* the size of all the load commands */ + uint32_t flags; /* flags */ +}; + +/* Constant for the magic field of the mach_header (32-bit architectures) */ +#define MH_MAGIC 0xfeedface /* the mach magic number */ +#define MH_CIGAM 0xcefaedfe /* NXSwapInt(MH_MAGIC) */ + +/* + * The 64-bit mach header appears at the very beginning of object files for + * 64-bit architectures. + */ +struct mach_header_64 { + uint32_t magic; /* mach magic number identifier */ + cpu_type_t cputype; /* cpu specifier */ + cpu_subtype_t cpusubtype; /* machine specifier */ + uint32_t filetype; /* type of file */ + uint32_t ncmds; /* number of load commands */ + uint32_t sizeofcmds; /* the size of all the load commands */ + uint32_t flags; /* flags */ + uint32_t reserved; /* reserved */ +}; + +/* Constant for the magic field of the mach_header_64 (64-bit architectures) */ +#define MH_MAGIC_64 0xfeedfacf /* the 64-bit mach magic number */ +#define MH_CIGAM_64 0xcffaedfe /* NXSwapInt(MH_MAGIC_64) */ + +/* + * The layout of the file depends on the filetype. For all but the MH_OBJECT + * file type the segments are padded out and aligned on a segment alignment + * boundary for efficient demand pageing. The MH_EXECUTE, MH_FVMLIB, MH_DYLIB, + * MH_DYLINKER and MH_BUNDLE file types also have the headers included as part + * of their first segment. + * + * The file type MH_OBJECT is a compact format intended as output of the + * assembler and input (and possibly output) of the link editor (the .o + * format). All sections are in one unnamed segment with no segment padding. + * This format is used as an executable format when the file is so small the + * segment padding greatly increases its size. + * + * The file type MH_PRELOAD is an executable format intended for things that + * are not executed under the kernel (proms, stand alones, kernels, etc). The + * format can be executed under the kernel but may demand paged it and not + * preload it before execution. + * + * A core file is in MH_CORE format and can be any in an arbritray legal + * Mach-O file. + * + * Constants for the filetype field of the mach_header + */ +#define MH_OBJECT 0x1 /* relocatable object file */ +#define MH_EXECUTE 0x2 /* demand paged executable file */ +#define MH_FVMLIB 0x3 /* fixed VM shared library file */ +#define MH_CORE 0x4 /* core file */ +#define MH_PRELOAD 0x5 /* preloaded executable file */ +#define MH_DYLIB 0x6 /* dynamically bound shared library */ +#define MH_DYLINKER 0x7 /* dynamic link editor */ +#define MH_BUNDLE 0x8 /* dynamically bound bundle file */ +#define MH_DYLIB_STUB 0x9 /* shared library stub for static */ + /* linking only, no section contents */ +#define MH_DSYM 0xa /* companion file with only debug */ + /* sections */ +#define MH_KEXT_BUNDLE 0xb /* x86_64 kexts */ + +/* Constants for the flags field of the mach_header */ +#define MH_NOUNDEFS 0x1 /* the object file has no undefined + references */ +#define MH_INCRLINK 0x2 /* the object file is the output of an + incremental link against a base file + and can't be link edited again */ +#define MH_DYLDLINK 0x4 /* the object file is input for the + dynamic linker and can't be staticly + link edited again */ +#define MH_BINDATLOAD 0x8 /* the object file's undefined + references are bound by the dynamic + linker when loaded. */ +#define MH_PREBOUND 0x10 /* the file has its dynamic undefined + references prebound. */ +#define MH_SPLIT_SEGS 0x20 /* the file has its read-only and + read-write segments split */ +#define MH_LAZY_INIT 0x40 /* the shared library init routine is + to be run lazily via catching memory + faults to its writeable segments + (obsolete) */ +#define MH_TWOLEVEL 0x80 /* the image is using two-level name + space bindings */ +#define MH_FORCE_FLAT 0x100 /* the executable is forcing all images + to use flat name space bindings */ +#define MH_NOMULTIDEFS 0x200 /* this umbrella guarantees no multiple + defintions of symbols in its + sub-images so the two-level namespace + hints can always be used. */ +#define MH_NOFIXPREBINDING 0x400 /* do not have dyld notify the + prebinding agent about this + executable */ +#define MH_PREBINDABLE 0x800 /* the binary is not prebound but can + have its prebinding redone. only used + when MH_PREBOUND is not set. */ +#define MH_ALLMODSBOUND 0x1000 /* indicates that this binary binds to + all two-level namespace modules of + its dependent libraries. only used + when MH_PREBINDABLE and MH_TWOLEVEL + are both set. */ +#define MH_SUBSECTIONS_VIA_SYMBOLS 0x2000/* safe to divide up the sections into + sub-sections via symbols for dead + code stripping */ +#define MH_CANONICAL 0x4000 /* the binary has been canonicalized + via the unprebind operation */ +#define MH_WEAK_DEFINES 0x8000 /* the final linked image contains + external weak symbols */ +#define MH_BINDS_TO_WEAK 0x10000 /* the final linked image uses + weak symbols */ + +#define MH_ALLOW_STACK_EXECUTION 0x20000/* When this bit is set, all stacks + in the task will be given stack + execution privilege. Only used in + MH_EXECUTE filetypes. */ +#define MH_ROOT_SAFE 0x40000 /* When this bit is set, the binary + declares it is safe for use in + processes with uid zero */ + +#define MH_SETUID_SAFE 0x80000 /* When this bit is set, the binary + declares it is safe for use in + processes when issetugid() is true */ + +#define MH_NO_REEXPORTED_DYLIBS 0x100000 /* When this bit is set on a dylib, + the static linker does not need to + examine dependent dylibs to see + if any are re-exported */ +#define MH_PIE 0x200000 /* When this bit is set, the OS will + load the main executable at a + random address. Only used in + MH_EXECUTE filetypes. */ +#define MH_DEAD_STRIPPABLE_DYLIB 0x400000 /* Only for use on dylibs. When + linking against a dylib that + has this bit set, the static linker + will automatically not create a + LC_LOAD_DYLIB load command to the + dylib if no symbols are being + referenced from the dylib. */ +#define MH_HAS_TLV_DESCRIPTORS 0x800000 /* Contains a section of type + S_THREAD_LOCAL_VARIABLES */ + +#define MH_NO_HEAP_EXECUTION 0x1000000 /* When this bit is set, the OS will + run the main executable with + a non-executable heap even on + platforms (e.g. i386) that don't + require it. Only used in MH_EXECUTE + filetypes. */ + +/* + * The load commands directly follow the mach_header. The total size of all + * of the commands is given by the sizeofcmds field in the mach_header. All + * load commands must have as their first two fields cmd and cmdsize. The cmd + * field is filled in with a constant for that command type. Each command type + * has a structure specifically for it. The cmdsize field is the size in bytes + * of the particular load command structure plus anything that follows it that + * is a part of the load command (i.e. section structures, strings, etc.). To + * advance to the next load command the cmdsize can be added to the offset or + * pointer of the current load command. The cmdsize for 32-bit architectures + * MUST be a multiple of 4 bytes and for 64-bit architectures MUST be a multiple + * of 8 bytes (these are forever the maximum alignment of any load commands). + * The padded bytes must be zero. All tables in the object file must also + * follow these rules so the file can be memory mapped. Otherwise the pointers + * to these tables will not work well or at all on some machines. With all + * padding zeroed like objects will compare byte for byte. + */ +struct load_command { + uint32_t cmd; /* type of load command */ + uint32_t cmdsize; /* total size of command in bytes */ +}; + +/* + * After MacOS X 10.1 when a new load command is added that is required to be + * understood by the dynamic linker for the image to execute properly the + * LC_REQ_DYLD bit will be or'ed into the load command constant. If the dynamic + * linker sees such a load command it it does not understand will issue a + * "unknown load command required for execution" error and refuse to use the + * image. Other load commands without this bit that are not understood will + * simply be ignored. + */ +#define LC_REQ_DYLD 0x80000000 + +/* Constants for the cmd field of all load commands, the type */ +#define LC_SEGMENT 0x1 /* segment of this file to be mapped */ +#define LC_SYMTAB 0x2 /* link-edit stab symbol table info */ +#define LC_SYMSEG 0x3 /* link-edit gdb symbol table info (obsolete) */ +#define LC_THREAD 0x4 /* thread */ +#define LC_UNIXTHREAD 0x5 /* unix thread (includes a stack) */ +#define LC_LOADFVMLIB 0x6 /* load a specified fixed VM shared library */ +#define LC_IDFVMLIB 0x7 /* fixed VM shared library identification */ +#define LC_IDENT 0x8 /* object identification info (obsolete) */ +#define LC_FVMFILE 0x9 /* fixed VM file inclusion (internal use) */ +#define LC_PREPAGE 0xa /* prepage command (internal use) */ +#define LC_DYSYMTAB 0xb /* dynamic link-edit symbol table info */ +#define LC_LOAD_DYLIB 0xc /* load a dynamically linked shared library */ +#define LC_ID_DYLIB 0xd /* dynamically linked shared lib ident */ +#define LC_LOAD_DYLINKER 0xe /* load a dynamic linker */ +#define LC_ID_DYLINKER 0xf /* dynamic linker identification */ +#define LC_PREBOUND_DYLIB 0x10 /* modules prebound for a dynamically */ + /* linked shared library */ +#define LC_ROUTINES 0x11 /* image routines */ +#define LC_SUB_FRAMEWORK 0x12 /* sub framework */ +#define LC_SUB_UMBRELLA 0x13 /* sub umbrella */ +#define LC_SUB_CLIENT 0x14 /* sub client */ +#define LC_SUB_LIBRARY 0x15 /* sub library */ +#define LC_TWOLEVEL_HINTS 0x16 /* two-level namespace lookup hints */ +#define LC_PREBIND_CKSUM 0x17 /* prebind checksum */ + +/* + * load a dynamically linked shared library that is allowed to be missing + * (all symbols are weak imported). + */ +#define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD) + +#define LC_SEGMENT_64 0x19 /* 64-bit segment of this file to be + mapped */ +#define LC_ROUTINES_64 0x1a /* 64-bit image routines */ +#define LC_UUID 0x1b /* the uuid */ +#define LC_RPATH (0x1c | LC_REQ_DYLD) /* runpath additions */ +#define LC_CODE_SIGNATURE 0x1d /* local of code signature */ +#define LC_SEGMENT_SPLIT_INFO 0x1e /* local of info to split segments */ +#define LC_REEXPORT_DYLIB (0x1f | LC_REQ_DYLD) /* load and re-export dylib */ +#define LC_LAZY_LOAD_DYLIB 0x20 /* delay load of dylib until first use */ +#define LC_ENCRYPTION_INFO 0x21 /* encrypted segment information */ +#define LC_DYLD_INFO 0x22 /* compressed dyld information */ +#define LC_DYLD_INFO_ONLY (0x22|LC_REQ_DYLD) /* compressed dyld information only */ +#define LC_LOAD_UPWARD_DYLIB (0x23 | LC_REQ_DYLD) /* load upward dylib */ +#define LC_VERSION_MIN_MACOSX 0x24 /* build for MacOSX min OS version */ +#define LC_VERSION_MIN_IPHONEOS 0x25 /* build for iPhoneOS min OS version */ +#define LC_FUNCTION_STARTS 0x26 /* compressed table of function start addresses */ +#define LC_DYLD_ENVIRONMENT 0x27 /* string for dyld to treat + like environment variable */ + +/* + * A variable length string in a load command is represented by an lc_str + * union. The strings are stored just after the load command structure and + * the offset is from the start of the load command structure. The size + * of the string is reflected in the cmdsize field of the load command. + * Once again any padded bytes to bring the cmdsize field to a multiple + * of 4 bytes must be zero. + */ +union lc_str { + uint32_t offset; /* offset to the string */ +#ifndef __LP64__ + char *ptr; /* pointer to the string */ +#endif +}; + +/* + * The segment load command indicates that a part of this file is to be + * mapped into the task's address space. The size of this segment in memory, + * vmsize, maybe equal to or larger than the amount to map from this file, + * filesize. The file is mapped starting at fileoff to the beginning of + * the segment in memory, vmaddr. The rest of the memory of the segment, + * if any, is allocated zero fill on demand. The segment's maximum virtual + * memory protection and initial virtual memory protection are specified + * by the maxprot and initprot fields. If the segment has sections then the + * section structures directly follow the segment command and their size is + * reflected in cmdsize. + */ +struct segment_command { /* for 32-bit architectures */ + uint32_t cmd; /* LC_SEGMENT */ + uint32_t cmdsize; /* includes sizeof section structs */ + char segname[16]; /* segment name */ + uint32_t vmaddr; /* memory address of this segment */ + uint32_t vmsize; /* memory size of this segment */ + uint32_t fileoff; /* file offset of this segment */ + uint32_t filesize; /* amount to map from the file */ + vm_prot_t maxprot; /* maximum VM protection */ + vm_prot_t initprot; /* initial VM protection */ + uint32_t nsects; /* number of sections in segment */ + uint32_t flags; /* flags */ +}; + +/* + * The 64-bit segment load command indicates that a part of this file is to be + * mapped into a 64-bit task's address space. If the 64-bit segment has + * sections then section_64 structures directly follow the 64-bit segment + * command and their size is reflected in cmdsize. + */ +struct segment_command_64 { /* for 64-bit architectures */ + uint32_t cmd; /* LC_SEGMENT_64 */ + uint32_t cmdsize; /* includes sizeof section_64 structs */ + char segname[16]; /* segment name */ + uint64_t vmaddr; /* memory address of this segment */ + uint64_t vmsize; /* memory size of this segment */ + uint64_t fileoff; /* file offset of this segment */ + uint64_t filesize; /* amount to map from the file */ + vm_prot_t maxprot; /* maximum VM protection */ + vm_prot_t initprot; /* initial VM protection */ + uint32_t nsects; /* number of sections in segment */ + uint32_t flags; /* flags */ +}; + +/* Constants for the flags field of the segment_command */ +#define SG_HIGHVM 0x1 /* the file contents for this segment is for + the high part of the VM space, the low part + is zero filled (for stacks in core files) */ +#define SG_FVMLIB 0x2 /* this segment is the VM that is allocated by + a fixed VM library, for overlap checking in + the link editor */ +#define SG_NORELOC 0x4 /* this segment has nothing that was relocated + in it and nothing relocated to it, that is + it maybe safely replaced without relocation*/ +#define SG_PROTECTED_VERSION_1 0x8 /* This segment is protected. If the + segment starts at file offset 0, the + first page of the segment is not + protected. All other pages of the + segment are protected. */ + +/* + * A segment is made up of zero or more sections. Non-MH_OBJECT files have + * all of their segments with the proper sections in each, and padded to the + * specified segment alignment when produced by the link editor. The first + * segment of a MH_EXECUTE and MH_FVMLIB format file contains the mach_header + * and load commands of the object file before its first section. The zero + * fill sections are always last in their segment (in all formats). This + * allows the zeroed segment padding to be mapped into memory where zero fill + * sections might be. The gigabyte zero fill sections, those with the section + * type S_GB_ZEROFILL, can only be in a segment with sections of this type. + * These segments are then placed after all other segments. + * + * The MH_OBJECT format has all of its sections in one segment for + * compactness. There is no padding to a specified segment boundary and the + * mach_header and load commands are not part of the segment. + * + * Sections with the same section name, sectname, going into the same segment, + * segname, are combined by the link editor. The resulting section is aligned + * to the maximum alignment of the combined sections and is the new section's + * alignment. The combined sections are aligned to their original alignment in + * the combined section. Any padded bytes to get the specified alignment are + * zeroed. + * + * The format of the relocation entries referenced by the reloff and nreloc + * fields of the section structure for mach object files is described in the + * header file <reloc.h>. + */ +struct section { /* for 32-bit architectures */ + char sectname[16]; /* name of this section */ + char segname[16]; /* segment this section goes in */ + uint32_t addr; /* memory address of this section */ + uint32_t size; /* size in bytes of this section */ + uint32_t offset; /* file offset of this section */ + uint32_t align; /* section alignment (power of 2) */ + uint32_t reloff; /* file offset of relocation entries */ + uint32_t nreloc; /* number of relocation entries */ + uint32_t flags; /* flags (section type and attributes)*/ + uint32_t reserved1; /* reserved (for offset or index) */ + uint32_t reserved2; /* reserved (for count or sizeof) */ +}; + +struct section_64 { /* for 64-bit architectures */ + char sectname[16]; /* name of this section */ + char segname[16]; /* segment this section goes in */ + uint64_t addr; /* memory address of this section */ + uint64_t size; /* size in bytes of this section */ + uint32_t offset; /* file offset of this section */ + uint32_t align; /* section alignment (power of 2) */ + uint32_t reloff; /* file offset of relocation entries */ + uint32_t nreloc; /* number of relocation entries */ + uint32_t flags; /* flags (section type and attributes)*/ + uint32_t reserved1; /* reserved (for offset or index) */ + uint32_t reserved2; /* reserved (for count or sizeof) */ + uint32_t reserved3; /* reserved */ +}; + +/* + * The flags field of a section structure is separated into two parts a section + * type and section attributes. The section types are mutually exclusive (it + * can only have one type) but the section attributes are not (it may have more + * than one attribute). + */ +#define SECTION_TYPE 0x000000ff /* 256 section types */ +#define SECTION_ATTRIBUTES 0xffffff00 /* 24 section attributes */ + +/* Constants for the type of a section */ +#define S_REGULAR 0x0 /* regular section */ +#define S_ZEROFILL 0x1 /* zero fill on demand section */ +#define S_CSTRING_LITERALS 0x2 /* section with only literal C strings*/ +#define S_4BYTE_LITERALS 0x3 /* section with only 4 byte literals */ +#define S_8BYTE_LITERALS 0x4 /* section with only 8 byte literals */ +#define S_LITERAL_POINTERS 0x5 /* section with only pointers to */ + /* literals */ +/* + * For the two types of symbol pointers sections and the symbol stubs section + * they have indirect symbol table entries. For each of the entries in the + * section the indirect symbol table entries, in corresponding order in the + * indirect symbol table, start at the index stored in the reserved1 field + * of the section structure. Since the indirect symbol table entries + * correspond to the entries in the section the number of indirect symbol table + * entries is inferred from the size of the section divided by the size of the + * entries in the section. For symbol pointers sections the size of the entries + * in the section is 4 bytes and for symbol stubs sections the byte size of the + * stubs is stored in the reserved2 field of the section structure. + */ +#define S_NON_LAZY_SYMBOL_POINTERS 0x6 /* section with only non-lazy + symbol pointers */ +#define S_LAZY_SYMBOL_POINTERS 0x7 /* section with only lazy symbol + pointers */ +#define S_SYMBOL_STUBS 0x8 /* section with only symbol + stubs, byte size of stub in + the reserved2 field */ +#define S_MOD_INIT_FUNC_POINTERS 0x9 /* section with only function + pointers for initialization*/ +#define S_MOD_TERM_FUNC_POINTERS 0xa /* section with only function + pointers for termination */ +#define S_COALESCED 0xb /* section contains symbols that + are to be coalesced */ +#define S_GB_ZEROFILL 0xc /* zero fill on demand section + (that can be larger than 4 + gigabytes) */ +#define S_INTERPOSING 0xd /* section with only pairs of + function pointers for + interposing */ +#define S_16BYTE_LITERALS 0xe /* section with only 16 byte + literals */ +#define S_DTRACE_DOF 0xf /* section contains + DTrace Object Format */ +#define S_LAZY_DYLIB_SYMBOL_POINTERS 0x10 /* section with only lazy + symbol pointers to lazy + loaded dylibs */ +/* + * Section types to support thread local variables + */ +#define S_THREAD_LOCAL_REGULAR 0x11 /* template of initial + values for TLVs */ +#define S_THREAD_LOCAL_ZEROFILL 0x12 /* template of initial + values for TLVs */ +#define S_THREAD_LOCAL_VARIABLES 0x13 /* TLV descriptors */ +#define S_THREAD_LOCAL_VARIABLE_POINTERS 0x14 /* pointers to TLV + descriptors */ +#define S_THREAD_LOCAL_INIT_FUNCTION_POINTERS 0x15 /* functions to call + to initialize TLV + values */ + +/* + * Constants for the section attributes part of the flags field of a section + * structure. + */ +#define SECTION_ATTRIBUTES_USR 0xff000000 /* User setable attributes */ +#define S_ATTR_PURE_INSTRUCTIONS 0x80000000 /* section contains only true + machine instructions */ +#define S_ATTR_NO_TOC 0x40000000 /* section contains coalesced + symbols that are not to be + in a ranlib table of + contents */ +#define S_ATTR_STRIP_STATIC_SYMS 0x20000000 /* ok to strip static symbols + in this section in files + with the MH_DYLDLINK flag */ +#define S_ATTR_NO_DEAD_STRIP 0x10000000 /* no dead stripping */ +#define S_ATTR_LIVE_SUPPORT 0x08000000 /* blocks are live if they + reference live blocks */ +#define S_ATTR_SELF_MODIFYING_CODE 0x04000000 /* Used with i386 code stubs + written on by dyld */ +/* + * If a segment contains any sections marked with S_ATTR_DEBUG then all + * sections in that segment must have this attribute. No section other than + * a section marked with this attribute may reference the contents of this + * section. A section with this attribute may contain no symbols and must have + * a section type S_REGULAR. The static linker will not copy section contents + * from sections with this attribute into its output file. These sections + * generally contain DWARF debugging info. + */ +#define S_ATTR_DEBUG 0x02000000 /* a debug section */ +#define SECTION_ATTRIBUTES_SYS 0x00ffff00 /* system setable attributes */ +#define S_ATTR_SOME_INSTRUCTIONS 0x00000400 /* section contains some + machine instructions */ +#define S_ATTR_EXT_RELOC 0x00000200 /* section has external + relocation entries */ +#define S_ATTR_LOC_RELOC 0x00000100 /* section has local + relocation entries */ + + +/* + * The names of segments and sections in them are mostly meaningless to the + * link-editor. But there are few things to support traditional UNIX + * executables that require the link-editor and assembler to use some names + * agreed upon by convention. + * + * The initial protection of the "__TEXT" segment has write protection turned + * off (not writeable). + * + * The link-editor will allocate common symbols at the end of the "__common" + * section in the "__DATA" segment. It will create the section and segment + * if needed. + */ + +/* The currently known segment names and the section names in those segments */ + +#define SEG_PAGEZERO "__PAGEZERO" /* the pagezero segment which has no */ + /* protections and catches NULL */ + /* references for MH_EXECUTE files */ + + +#define SEG_TEXT "__TEXT" /* the tradition UNIX text segment */ +#define SECT_TEXT "__text" /* the real text part of the text */ + /* section no headers, and no padding */ +#define SECT_FVMLIB_INIT0 "__fvmlib_init0" /* the fvmlib initialization */ + /* section */ +#define SECT_FVMLIB_INIT1 "__fvmlib_init1" /* the section following the */ + /* fvmlib initialization */ + /* section */ + +#define SEG_DATA "__DATA" /* the tradition UNIX data segment */ +#define SECT_DATA "__data" /* the real initialized data section */ + /* no padding, no bss overlap */ +#define SECT_BSS "__bss" /* the real uninitialized data section*/ + /* no padding */ +#define SECT_COMMON "__common" /* the section common symbols are */ + /* allocated in by the link editor */ + +#define SEG_OBJC "__OBJC" /* objective-C runtime segment */ +#define SECT_OBJC_SYMBOLS "__symbol_table" /* symbol table */ +#define SECT_OBJC_MODULES "__module_info" /* module information */ +#define SECT_OBJC_STRINGS "__selector_strs" /* string table */ +#define SECT_OBJC_REFS "__selector_refs" /* string table */ + +#define SEG_ICON "__ICON" /* the icon segment */ +#define SECT_ICON_HEADER "__header" /* the icon headers */ +#define SECT_ICON_TIFF "__tiff" /* the icons in tiff format */ + +#define SEG_LINKEDIT "__LINKEDIT" /* the segment containing all structs */ + /* created and maintained by the link */ + /* editor. Created with -seglinkedit */ + /* option to ld(1) for MH_EXECUTE and */ + /* FVMLIB file types only */ + +#define SEG_UNIXSTACK "__UNIXSTACK" /* the unix stack segment */ + +#define SEG_IMPORT "__IMPORT" /* the segment for the self (dyld) */ + /* modifing code stubs that has read, */ + /* write and execute permissions */ + +/* + * Fixed virtual memory shared libraries are identified by two things. The + * target pathname (the name of the library as found for execution), and the + * minor version number. The address of where the headers are loaded is in + * header_addr. (THIS IS OBSOLETE and no longer supported). + */ +struct fvmlib { + union lc_str name; /* library's target pathname */ + uint32_t minor_version; /* library's minor version number */ + uint32_t header_addr; /* library's header address */ +}; + +/* + * A fixed virtual shared library (filetype == MH_FVMLIB in the mach header) + * contains a fvmlib_command (cmd == LC_IDFVMLIB) to identify the library. + * An object that uses a fixed virtual shared library also contains a + * fvmlib_command (cmd == LC_LOADFVMLIB) for each library it uses. + * (THIS IS OBSOLETE and no longer supported). + */ +struct fvmlib_command { + uint32_t cmd; /* LC_IDFVMLIB or LC_LOADFVMLIB */ + uint32_t cmdsize; /* includes pathname string */ + struct fvmlib fvmlib; /* the library identification */ +}; + +/* + * Dynamicly linked shared libraries are identified by two things. The + * pathname (the name of the library as found for execution), and the + * compatibility version number. The pathname must match and the compatibility + * number in the user of the library must be greater than or equal to the + * library being used. The time stamp is used to record the time a library was + * built and copied into user so it can be use to determined if the library used + * at runtime is exactly the same as used to built the program. + */ +struct dylib { + union lc_str name; /* library's path name */ + uint32_t timestamp; /* library's build time stamp */ + uint32_t current_version; /* library's current version number */ + uint32_t compatibility_version; /* library's compatibility vers number*/ +}; + +/* + * A dynamically linked shared library (filetype == MH_DYLIB in the mach header) + * contains a dylib_command (cmd == LC_ID_DYLIB) to identify the library. + * An object that uses a dynamically linked shared library also contains a + * dylib_command (cmd == LC_LOAD_DYLIB, LC_LOAD_WEAK_DYLIB, or + * LC_REEXPORT_DYLIB) for each library it uses. + */ +struct dylib_command { + uint32_t cmd; /* LC_ID_DYLIB, LC_LOAD_{,WEAK_}DYLIB, + LC_REEXPORT_DYLIB */ + uint32_t cmdsize; /* includes pathname string */ + struct dylib dylib; /* the library identification */ +}; + +/* + * A dynamically linked shared library may be a subframework of an umbrella + * framework. If so it will be linked with "-umbrella umbrella_name" where + * Where "umbrella_name" is the name of the umbrella framework. A subframework + * can only be linked against by its umbrella framework or other subframeworks + * that are part of the same umbrella framework. Otherwise the static link + * editor produces an error and states to link against the umbrella framework. + * The name of the umbrella framework for subframeworks is recorded in the + * following structure. + */ +struct sub_framework_command { + uint32_t cmd; /* LC_SUB_FRAMEWORK */ + uint32_t cmdsize; /* includes umbrella string */ + union lc_str umbrella; /* the umbrella framework name */ +}; + +/* + * For dynamically linked shared libraries that are subframework of an umbrella + * framework they can allow clients other than the umbrella framework or other + * subframeworks in the same umbrella framework. To do this the subframework + * is built with "-allowable_client client_name" and an LC_SUB_CLIENT load + * command is created for each -allowable_client flag. The client_name is + * usually a framework name. It can also be a name used for bundles clients + * where the bundle is built with "-client_name client_name". + */ +struct sub_client_command { + uint32_t cmd; /* LC_SUB_CLIENT */ + uint32_t cmdsize; /* includes client string */ + union lc_str client; /* the client name */ +}; + +/* + * A dynamically linked shared library may be a sub_umbrella of an umbrella + * framework. If so it will be linked with "-sub_umbrella umbrella_name" where + * Where "umbrella_name" is the name of the sub_umbrella framework. When + * staticly linking when -twolevel_namespace is in effect a twolevel namespace + * umbrella framework will only cause its subframeworks and those frameworks + * listed as sub_umbrella frameworks to be implicited linked in. Any other + * dependent dynamic libraries will not be linked it when -twolevel_namespace + * is in effect. The primary library recorded by the static linker when + * resolving a symbol in these libraries will be the umbrella framework. + * Zero or more sub_umbrella frameworks may be use by an umbrella framework. + * The name of a sub_umbrella framework is recorded in the following structure. + */ +struct sub_umbrella_command { + uint32_t cmd; /* LC_SUB_UMBRELLA */ + uint32_t cmdsize; /* includes sub_umbrella string */ + union lc_str sub_umbrella; /* the sub_umbrella framework name */ +}; + +/* + * A dynamically linked shared library may be a sub_library of another shared + * library. If so it will be linked with "-sub_library library_name" where + * Where "library_name" is the name of the sub_library shared library. When + * staticly linking when -twolevel_namespace is in effect a twolevel namespace + * shared library will only cause its subframeworks and those frameworks + * listed as sub_umbrella frameworks and libraries listed as sub_libraries to + * be implicited linked in. Any other dependent dynamic libraries will not be + * linked it when -twolevel_namespace is in effect. The primary library + * recorded by the static linker when resolving a symbol in these libraries + * will be the umbrella framework (or dynamic library). Zero or more sub_library + * shared libraries may be use by an umbrella framework or (or dynamic library). + * The name of a sub_library framework is recorded in the following structure. + * For example /usr/lib/libobjc_profile.A.dylib would be recorded as "libobjc". + */ +struct sub_library_command { + uint32_t cmd; /* LC_SUB_LIBRARY */ + uint32_t cmdsize; /* includes sub_library string */ + union lc_str sub_library; /* the sub_library name */ +}; + +/* + * A program (filetype == MH_EXECUTE) that is + * prebound to its dynamic libraries has one of these for each library that + * the static linker used in prebinding. It contains a bit vector for the + * modules in the library. The bits indicate which modules are bound (1) and + * which are not (0) from the library. The bit for module 0 is the low bit + * of the first byte. So the bit for the Nth module is: + * (linked_modules[N/8] >> N%8) & 1 + */ +struct prebound_dylib_command { + uint32_t cmd; /* LC_PREBOUND_DYLIB */ + uint32_t cmdsize; /* includes strings */ + union lc_str name; /* library's path name */ + uint32_t nmodules; /* number of modules in library */ + union lc_str linked_modules; /* bit vector of linked modules */ +}; + +/* + * A program that uses a dynamic linker contains a dylinker_command to identify + * the name of the dynamic linker (LC_LOAD_DYLINKER). And a dynamic linker + * contains a dylinker_command to identify the dynamic linker (LC_ID_DYLINKER). + * A file can have at most one of these. + * This struct is also used for the LC_DYLD_ENVIRONMENT load command and + * contains string for dyld to treat like environment variable. + */ +struct dylinker_command { + uint32_t cmd; /* LC_ID_DYLINKER, LC_LOAD_DYLINKER or + LC_DYLD_ENVIRONMENT */ + uint32_t cmdsize; /* includes pathname string */ + union lc_str name; /* dynamic linker's path name */ +}; + +/* + * Thread commands contain machine-specific data structures suitable for + * use in the thread state primitives. The machine specific data structures + * follow the struct thread_command as follows. + * Each flavor of machine specific data structure is preceded by an unsigned + * long constant for the flavor of that data structure, an uint32_t + * that is the count of longs of the size of the state data structure and then + * the state data structure follows. This triple may be repeated for many + * flavors. The constants for the flavors, counts and state data structure + * definitions are expected to be in the header file <machine/thread_status.h>. + * These machine specific data structures sizes must be multiples of + * 4 bytes The cmdsize reflects the total size of the thread_command + * and all of the sizes of the constants for the flavors, counts and state + * data structures. + * + * For executable objects that are unix processes there will be one + * thread_command (cmd == LC_UNIXTHREAD) created for it by the link-editor. + * This is the same as a LC_THREAD, except that a stack is automatically + * created (based on the shell's limit for the stack size). Command arguments + * and environment variables are copied onto that stack. + */ +struct thread_command { + uint32_t cmd; /* LC_THREAD or LC_UNIXTHREAD */ + uint32_t cmdsize; /* total size of this command */ + /* uint32_t flavor flavor of thread state */ + /* uint32_t count count of longs in thread state */ + /* struct XXX_thread_state state thread state for this flavor */ + /* ... */ +}; + +/* + * The routines command contains the address of the dynamic shared library + * initialization routine and an index into the module table for the module + * that defines the routine. Before any modules are used from the library the + * dynamic linker fully binds the module that defines the initialization routine + * and then calls it. This gets called before any module initialization + * routines (used for C++ static constructors) in the library. + */ +struct routines_command { /* for 32-bit architectures */ + uint32_t cmd; /* LC_ROUTINES */ + uint32_t cmdsize; /* total size of this command */ + uint32_t init_address; /* address of initialization routine */ + uint32_t init_module; /* index into the module table that */ + /* the init routine is defined in */ + uint32_t reserved1; + uint32_t reserved2; + uint32_t reserved3; + uint32_t reserved4; + uint32_t reserved5; + uint32_t reserved6; +}; + +/* + * The 64-bit routines command. Same use as above. + */ +struct routines_command_64 { /* for 64-bit architectures */ + uint32_t cmd; /* LC_ROUTINES_64 */ + uint32_t cmdsize; /* total size of this command */ + uint64_t init_address; /* address of initialization routine */ + uint64_t init_module; /* index into the module table that */ + /* the init routine is defined in */ + uint64_t reserved1; + uint64_t reserved2; + uint64_t reserved3; + uint64_t reserved4; + uint64_t reserved5; + uint64_t reserved6; +}; + +/* + * The symtab_command contains the offsets and sizes of the link-edit 4.3BSD + * "stab" style symbol table information as described in the header files + * <nlist.h> and <stab.h>. + */ +struct symtab_command { + uint32_t cmd; /* LC_SYMTAB */ + uint32_t cmdsize; /* sizeof(struct symtab_command) */ + uint32_t symoff; /* symbol table offset */ + uint32_t nsyms; /* number of symbol table entries */ + uint32_t stroff; /* string table offset */ + uint32_t strsize; /* string table size in bytes */ +}; + +/* + * This is the second set of the symbolic information which is used to support + * the data structures for the dynamically link editor. + * + * The original set of symbolic information in the symtab_command which contains + * the symbol and string tables must also be present when this load command is + * present. When this load command is present the symbol table is organized + * into three groups of symbols: + * local symbols (static and debugging symbols) - grouped by module + * defined external symbols - grouped by module (sorted by name if not lib) + * undefined external symbols (sorted by name if MH_BINDATLOAD is not set, + * and in order the were seen by the static + * linker if MH_BINDATLOAD is set) + * In this load command there are offsets and counts to each of the three groups + * of symbols. + * + * This load command contains a the offsets and sizes of the following new + * symbolic information tables: + * table of contents + * module table + * reference symbol table + * indirect symbol table + * The first three tables above (the table of contents, module table and + * reference symbol table) are only present if the file is a dynamically linked + * shared library. For executable and object modules, which are files + * containing only one module, the information that would be in these three + * tables is determined as follows: + * table of contents - the defined external symbols are sorted by name + * module table - the file contains only one module so everything in the + * file is part of the module. + * reference symbol table - is the defined and undefined external symbols + * + * For dynamically linked shared library files this load command also contains + * offsets and sizes to the pool of relocation entries for all sections + * separated into two groups: + * external relocation entries + * local relocation entries + * For executable and object modules the relocation entries continue to hang + * off the section structures. + */ +struct dysymtab_command { + uint32_t cmd; /* LC_DYSYMTAB */ + uint32_t cmdsize; /* sizeof(struct dysymtab_command) */ + + /* + * The symbols indicated by symoff and nsyms of the LC_SYMTAB load command + * are grouped into the following three groups: + * local symbols (further grouped by the module they are from) + * defined external symbols (further grouped by the module they are from) + * undefined symbols + * + * The local symbols are used only for debugging. The dynamic binding + * process may have to use them to indicate to the debugger the local + * symbols for a module that is being bound. + * + * The last two groups are used by the dynamic binding process to do the + * binding (indirectly through the module table and the reference symbol + * table when this is a dynamically linked shared library file). + */ + uint32_t ilocalsym; /* index to local symbols */ + uint32_t nlocalsym; /* number of local symbols */ + + uint32_t iextdefsym;/* index to externally defined symbols */ + uint32_t nextdefsym;/* number of externally defined symbols */ + + uint32_t iundefsym; /* index to undefined symbols */ + uint32_t nundefsym; /* number of undefined symbols */ + + /* + * For the for the dynamic binding process to find which module a symbol + * is defined in the table of contents is used (analogous to the ranlib + * structure in an archive) which maps defined external symbols to modules + * they are defined in. This exists only in a dynamically linked shared + * library file. For executable and object modules the defined external + * symbols are sorted by name and is use as the table of contents. + */ + uint32_t tocoff; /* file offset to table of contents */ + uint32_t ntoc; /* number of entries in table of contents */ + + /* + * To support dynamic binding of "modules" (whole object files) the symbol + * table must reflect the modules that the file was created from. This is + * done by having a module table that has indexes and counts into the merged + * tables for each module. The module structure that these two entries + * refer to is described below. This exists only in a dynamically linked + * shared library file. For executable and object modules the file only + * contains one module so everything in the file belongs to the module. + */ + uint32_t modtaboff; /* file offset to module table */ + uint32_t nmodtab; /* number of module table entries */ + + /* + * To support dynamic module binding the module structure for each module + * indicates the external references (defined and undefined) each module + * makes. For each module there is an offset and a count into the + * reference symbol table for the symbols that the module references. + * This exists only in a dynamically linked shared library file. For + * executable and object modules the defined external symbols and the + * undefined external symbols indicates the external references. + */ + uint32_t extrefsymoff; /* offset to referenced symbol table */ + uint32_t nextrefsyms; /* number of referenced symbol table entries */ + + /* + * The sections that contain "symbol pointers" and "routine stubs" have + * indexes and (implied counts based on the size of the section and fixed + * size of the entry) into the "indirect symbol" table for each pointer + * and stub. For every section of these two types the index into the + * indirect symbol table is stored in the section header in the field + * reserved1. An indirect symbol table entry is simply a 32bit index into + * the symbol table to the symbol that the pointer or stub is referring to. + * The indirect symbol table is ordered to match the entries in the section. + */ + uint32_t indirectsymoff; /* file offset to the indirect symbol table */ + uint32_t nindirectsyms; /* number of indirect symbol table entries */ + + /* + * To support relocating an individual module in a library file quickly the + * external relocation entries for each module in the library need to be + * accessed efficiently. Since the relocation entries can't be accessed + * through the section headers for a library file they are separated into + * groups of local and external entries further grouped by module. In this + * case the presents of this load command who's extreloff, nextrel, + * locreloff and nlocrel fields are non-zero indicates that the relocation + * entries of non-merged sections are not referenced through the section + * structures (and the reloff and nreloc fields in the section headers are + * set to zero). + * + * Since the relocation entries are not accessed through the section headers + * this requires the r_address field to be something other than a section + * offset to identify the item to be relocated. In this case r_address is + * set to the offset from the vmaddr of the first LC_SEGMENT command. + * For MH_SPLIT_SEGS images r_address is set to the the offset from the + * vmaddr of the first read-write LC_SEGMENT command. + * + * The relocation entries are grouped by module and the module table + * entries have indexes and counts into them for the group of external + * relocation entries for that the module. + * + * For sections that are merged across modules there must not be any + * remaining external relocation entries for them (for merged sections + * remaining relocation entries must be local). + */ + uint32_t extreloff; /* offset to external relocation entries */ + uint32_t nextrel; /* number of external relocation entries */ + + /* + * All the local relocation entries are grouped together (they are not + * grouped by their module since they are only used if the object is moved + * from it staticly link edited address). + */ + uint32_t locreloff; /* offset to local relocation entries */ + uint32_t nlocrel; /* number of local relocation entries */ + +}; + +/* + * An indirect symbol table entry is simply a 32bit index into the symbol table + * to the symbol that the pointer or stub is refering to. Unless it is for a + * non-lazy symbol pointer section for a defined symbol which strip(1) as + * removed. In which case it has the value INDIRECT_SYMBOL_LOCAL. If the + * symbol was also absolute INDIRECT_SYMBOL_ABS is or'ed with that. + */ +#define INDIRECT_SYMBOL_LOCAL 0x80000000 +#define INDIRECT_SYMBOL_ABS 0x40000000 + + +/* a table of contents entry */ +struct dylib_table_of_contents { + uint32_t symbol_index; /* the defined external symbol + (index into the symbol table) */ + uint32_t module_index; /* index into the module table this symbol + is defined in */ +}; + +/* a module table entry */ +struct dylib_module { + uint32_t module_name; /* the module name (index into string table) */ + + uint32_t iextdefsym; /* index into externally defined symbols */ + uint32_t nextdefsym; /* number of externally defined symbols */ + uint32_t irefsym; /* index into reference symbol table */ + uint32_t nrefsym; /* number of reference symbol table entries */ + uint32_t ilocalsym; /* index into symbols for local symbols */ + uint32_t nlocalsym; /* number of local symbols */ + + uint32_t iextrel; /* index into external relocation entries */ + uint32_t nextrel; /* number of external relocation entries */ + + uint32_t iinit_iterm; /* low 16 bits are the index into the init + section, high 16 bits are the index into + the term section */ + uint32_t ninit_nterm; /* low 16 bits are the number of init section + entries, high 16 bits are the number of + term section entries */ + + uint32_t /* for this module address of the start of */ + objc_module_info_addr; /* the (__OBJC,__module_info) section */ + uint32_t /* for this module size of */ + objc_module_info_size; /* the (__OBJC,__module_info) section */ +}; + +/* a 64-bit module table entry */ +struct dylib_module_64 { + uint32_t module_name; /* the module name (index into string table) */ + + uint32_t iextdefsym; /* index into externally defined symbols */ + uint32_t nextdefsym; /* number of externally defined symbols */ + uint32_t irefsym; /* index into reference symbol table */ + uint32_t nrefsym; /* number of reference symbol table entries */ + uint32_t ilocalsym; /* index into symbols for local symbols */ + uint32_t nlocalsym; /* number of local symbols */ + + uint32_t iextrel; /* index into external relocation entries */ + uint32_t nextrel; /* number of external relocation entries */ + + uint32_t iinit_iterm; /* low 16 bits are the index into the init + section, high 16 bits are the index into + the term section */ + uint32_t ninit_nterm; /* low 16 bits are the number of init section + entries, high 16 bits are the number of + term section entries */ + + uint32_t /* for this module size of */ + objc_module_info_size; /* the (__OBJC,__module_info) section */ + uint64_t /* for this module address of the start of */ + objc_module_info_addr; /* the (__OBJC,__module_info) section */ +}; + +/* + * The entries in the reference symbol table are used when loading the module + * (both by the static and dynamic link editors) and if the module is unloaded + * or replaced. Therefore all external symbols (defined and undefined) are + * listed in the module's reference table. The flags describe the type of + * reference that is being made. The constants for the flags are defined in + * <mach-o/nlist.h> as they are also used for symbol table entries. + */ +struct dylib_reference { + uint32_t isym:24, /* index into the symbol table */ + flags:8; /* flags to indicate the type of reference */ +}; + +/* + * The twolevel_hints_command contains the offset and number of hints in the + * two-level namespace lookup hints table. + */ +struct twolevel_hints_command { + uint32_t cmd; /* LC_TWOLEVEL_HINTS */ + uint32_t cmdsize; /* sizeof(struct twolevel_hints_command) */ + uint32_t offset; /* offset to the hint table */ + uint32_t nhints; /* number of hints in the hint table */ +}; + +/* + * The entries in the two-level namespace lookup hints table are twolevel_hint + * structs. These provide hints to the dynamic link editor where to start + * looking for an undefined symbol in a two-level namespace image. The + * isub_image field is an index into the sub-images (sub-frameworks and + * sub-umbrellas list) that made up the two-level image that the undefined + * symbol was found in when it was built by the static link editor. If + * isub-image is 0 the the symbol is expected to be defined in library and not + * in the sub-images. If isub-image is non-zero it is an index into the array + * of sub-images for the umbrella with the first index in the sub-images being + * 1. The array of sub-images is the ordered list of sub-images of the umbrella + * that would be searched for a symbol that has the umbrella recorded as its + * primary library. The table of contents index is an index into the + * library's table of contents. This is used as the starting point of the + * binary search or a directed linear search. + */ +struct twolevel_hint { + uint32_t + isub_image:8, /* index into the sub images */ + itoc:24; /* index into the table of contents */ +}; + +/* + * The prebind_cksum_command contains the value of the original check sum for + * prebound files or zero. When a prebound file is first created or modified + * for other than updating its prebinding information the value of the check sum + * is set to zero. When the file has it prebinding re-done and if the value of + * the check sum is zero the original check sum is calculated and stored in + * cksum field of this load command in the output file. If when the prebinding + * is re-done and the cksum field is non-zero it is left unchanged from the + * input file. + */ +struct prebind_cksum_command { + uint32_t cmd; /* LC_PREBIND_CKSUM */ + uint32_t cmdsize; /* sizeof(struct prebind_cksum_command) */ + uint32_t cksum; /* the check sum or zero */ +}; + +/* + * The uuid load command contains a single 128-bit unique random number that + * identifies an object produced by the static link editor. + */ +struct uuid_command { + uint32_t cmd; /* LC_UUID */ + uint32_t cmdsize; /* sizeof(struct uuid_command) */ + uint8_t uuid[16]; /* the 128-bit uuid */ +}; + +/* + * The rpath_command contains a path which at runtime should be added to + * the current run path used to find @rpath prefixed dylibs. + */ +struct rpath_command { + uint32_t cmd; /* LC_RPATH */ + uint32_t cmdsize; /* includes string */ + union lc_str path; /* path to add to run path */ +}; + +/* + * The linkedit_data_command contains the offsets and sizes of a blob + * of data in the __LINKEDIT segment. + */ +struct linkedit_data_command { + uint32_t cmd; /* LC_CODE_SIGNATURE, LC_SEGMENT_SPLIT_INFO, + or LC_FUNCTION_STARTS */ + uint32_t cmdsize; /* sizeof(struct linkedit_data_command) */ + uint32_t dataoff; /* file offset of data in __LINKEDIT segment */ + uint32_t datasize; /* file size of data in __LINKEDIT segment */ +}; + +/* + * The encryption_info_command contains the file offset and size of an + * of an encrypted segment. + */ +struct encryption_info_command { + uint32_t cmd; /* LC_ENCRYPTION_INFO */ + uint32_t cmdsize; /* sizeof(struct encryption_info_command) */ + uint32_t cryptoff; /* file offset of encrypted range */ + uint32_t cryptsize; /* file size of encrypted range */ + uint32_t cryptid; /* which enryption system, + 0 means not-encrypted yet */ +}; + +/* + * The version_min_command contains the min OS version on which this + * binary was built to run. + */ +struct version_min_command { + uint32_t cmd; /* LC_VERSION_MIN_MACOSX or + LC_VERSION_MIN_IPHONEOS */ + uint32_t cmdsize; /* sizeof(struct min_version_command) */ + uint32_t version; /* X.Y.Z is encoded in nibbles xxxx.yy.zz */ + uint32_t reserved; /* zero */ +}; + +/* + * The dyld_info_command contains the file offsets and sizes of + * the new compressed form of the information dyld needs to + * load the image. This information is used by dyld on Mac OS X + * 10.6 and later. All information pointed to by this command + * is encoded using byte streams, so no endian swapping is needed + * to interpret it. + */ +struct dyld_info_command { + uint32_t cmd; /* LC_DYLD_INFO or LC_DYLD_INFO_ONLY */ + uint32_t cmdsize; /* sizeof(struct dyld_info_command) */ + + /* + * Dyld rebases an image whenever dyld loads it at an address different + * from its preferred address. The rebase information is a stream + * of byte sized opcodes whose symbolic names start with REBASE_OPCODE_. + * Conceptually the rebase information is a table of tuples: + * <seg-index, seg-offset, type> + * The opcodes are a compressed way to encode the table by only + * encoding when a column changes. In addition simple patterns + * like "every n'th offset for m times" can be encoded in a few + * bytes. + */ + uint32_t rebase_off; /* file offset to rebase info */ + uint32_t rebase_size; /* size of rebase info */ + + /* + * Dyld binds an image during the loading process, if the image + * requires any pointers to be initialized to symbols in other images. + * The bind information is a stream of byte sized + * opcodes whose symbolic names start with BIND_OPCODE_. + * Conceptually the bind information is a table of tuples: + * <seg-index, seg-offset, type, symbol-library-ordinal, symbol-name, addend> + * The opcodes are a compressed way to encode the table by only + * encoding when a column changes. In addition simple patterns + * like for runs of pointers initialzed to the same value can be + * encoded in a few bytes. + */ + uint32_t bind_off; /* file offset to binding info */ + uint32_t bind_size; /* size of binding info */ + + /* + * Some C++ programs require dyld to unique symbols so that all + * images in the process use the same copy of some code/data. + * This step is done after binding. The content of the weak_bind + * info is an opcode stream like the bind_info. But it is sorted + * alphabetically by symbol name. This enable dyld to walk + * all images with weak binding information in order and look + * for collisions. If there are no collisions, dyld does + * no updating. That means that some fixups are also encoded + * in the bind_info. For instance, all calls to "operator new" + * are first bound to libstdc++.dylib using the information + * in bind_info. Then if some image overrides operator new + * that is detected when the weak_bind information is processed + * and the call to operator new is then rebound. + */ + uint32_t weak_bind_off; /* file offset to weak binding info */ + uint32_t weak_bind_size; /* size of weak binding info */ + + /* + * Some uses of external symbols do not need to be bound immediately. + * Instead they can be lazily bound on first use. The lazy_bind + * are contains a stream of BIND opcodes to bind all lazy symbols. + * Normal use is that dyld ignores the lazy_bind section when + * loading an image. Instead the static linker arranged for the + * lazy pointer to initially point to a helper function which + * pushes the offset into the lazy_bind area for the symbol + * needing to be bound, then jumps to dyld which simply adds + * the offset to lazy_bind_off to get the information on what + * to bind. + */ + uint32_t lazy_bind_off; /* file offset to lazy binding info */ + uint32_t lazy_bind_size; /* size of lazy binding infs */ + + /* + * The symbols exported by a dylib are encoded in a trie. This + * is a compact representation that factors out common prefixes. + * It also reduces LINKEDIT pages in RAM because it encodes all + * information (name, address, flags) in one small, contiguous range. + * The export area is a stream of nodes. The first node sequentially + * is the start node for the trie. + * + * Nodes for a symbol start with a uleb128 that is the length of + * the exported symbol information for the string so far. + * If there is no exported symbol, the node starts with a zero byte. + * If there is exported info, it follows the length. First is + * a uleb128 containing flags. Normally, it is followed by a + * uleb128 encoded offset which is location of the content named + * by the symbol from the mach_header for the image. If the flags + * is EXPORT_SYMBOL_FLAGS_REEXPORT, then following the flags is + * a uleb128 encoded library ordinal, then a zero terminated + * UTF8 string. If the string is zero length, then the symbol + * is re-export from the specified dylib with the same name. + * + * After the optional exported symbol information is a byte of + * how many edges (0-255) that this node has leaving it, + * followed by each edge. + * Each edge is a zero terminated UTF8 of the addition chars + * in the symbol, followed by a uleb128 offset for the node that + * edge points to. + * + */ + uint32_t export_off; /* file offset to lazy binding info */ + uint32_t export_size; /* size of lazy binding infs */ +}; + +/* + * The following are used to encode rebasing information + */ +#define REBASE_TYPE_POINTER 1 +#define REBASE_TYPE_TEXT_ABSOLUTE32 2 +#define REBASE_TYPE_TEXT_PCREL32 3 + +#define REBASE_OPCODE_MASK 0xF0 +#define REBASE_IMMEDIATE_MASK 0x0F +#define REBASE_OPCODE_DONE 0x00 +#define REBASE_OPCODE_SET_TYPE_IMM 0x10 +#define REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB 0x20 +#define REBASE_OPCODE_ADD_ADDR_ULEB 0x30 +#define REBASE_OPCODE_ADD_ADDR_IMM_SCALED 0x40 +#define REBASE_OPCODE_DO_REBASE_IMM_TIMES 0x50 +#define REBASE_OPCODE_DO_REBASE_ULEB_TIMES 0x60 +#define REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB 0x70 +#define REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB 0x80 + + +/* + * The following are used to encode binding information + */ +#define BIND_TYPE_POINTER 1 +#define BIND_TYPE_TEXT_ABSOLUTE32 2 +#define BIND_TYPE_TEXT_PCREL32 3 + +#define BIND_SPECIAL_DYLIB_SELF 0 +#define BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE -1 +#define BIND_SPECIAL_DYLIB_FLAT_LOOKUP -2 + +#define BIND_SYMBOL_FLAGS_WEAK_IMPORT 0x1 +#define BIND_SYMBOL_FLAGS_NON_WEAK_DEFINITION 0x8 + +#define BIND_OPCODE_MASK 0xF0 +#define BIND_IMMEDIATE_MASK 0x0F +#define BIND_OPCODE_DONE 0x00 +#define BIND_OPCODE_SET_DYLIB_ORDINAL_IMM 0x10 +#define BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB 0x20 +#define BIND_OPCODE_SET_DYLIB_SPECIAL_IMM 0x30 +#define BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM 0x40 +#define BIND_OPCODE_SET_TYPE_IMM 0x50 +#define BIND_OPCODE_SET_ADDEND_SLEB 0x60 +#define BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB 0x70 +#define BIND_OPCODE_ADD_ADDR_ULEB 0x80 +#define BIND_OPCODE_DO_BIND 0x90 +#define BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB 0xA0 +#define BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED 0xB0 +#define BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB 0xC0 + + +/* + * The following are used on the flags byte of a terminal node + * in the export information. + */ +#define EXPORT_SYMBOL_FLAGS_KIND_MASK 0x03 +#define EXPORT_SYMBOL_FLAGS_KIND_REGULAR 0x00 +#define EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL 0x01 +#define EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION 0x04 +#define EXPORT_SYMBOL_FLAGS_REEXPORT 0x08 +#define EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER 0x10 + +/* + * The symseg_command contains the offset and size of the GNU style + * symbol table information as described in the header file <symseg.h>. + * The symbol roots of the symbol segments must also be aligned properly + * in the file. So the requirement of keeping the offsets aligned to a + * multiple of a 4 bytes translates to the length field of the symbol + * roots also being a multiple of a long. Also the padding must again be + * zeroed. (THIS IS OBSOLETE and no longer supported). + */ +struct symseg_command { + uint32_t cmd; /* LC_SYMSEG */ + uint32_t cmdsize; /* sizeof(struct symseg_command) */ + uint32_t offset; /* symbol segment offset */ + uint32_t size; /* symbol segment size in bytes */ +}; + +/* + * The ident_command contains a free format string table following the + * ident_command structure. The strings are null terminated and the size of + * the command is padded out with zero bytes to a multiple of 4 bytes/ + * (THIS IS OBSOLETE and no longer supported). + */ +struct ident_command { + uint32_t cmd; /* LC_IDENT */ + uint32_t cmdsize; /* strings that follow this command */ +}; + +/* + * The fvmfile_command contains a reference to a file to be loaded at the + * specified virtual address. (Presently, this command is reserved for + * internal use. The kernel ignores this command when loading a program into + * memory). + */ +struct fvmfile_command { + uint32_t cmd; /* LC_FVMFILE */ + uint32_t cmdsize; /* includes pathname string */ + union lc_str name; /* files pathname */ + uint32_t header_addr; /* files virtual address */ +}; + +/* + * Sections of type S_THREAD_LOCAL_VARIABLES contain an array + * of tlv_descriptor structures. + */ +struct tlv_descriptor +{ + void* (*thunk)(struct tlv_descriptor*); + unsigned long key; + unsigned long offset; +}; + +#endif /* _MACHO_LOADER_H_ */ diff --git a/i386/include/mach-o/nlist.h b/i386/include/mach-o/nlist.h new file mode 100644 index 0000000..1c19410 --- /dev/null +++ b/i386/include/mach-o/nlist.h @@ -0,0 +1,312 @@ +/* + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _MACHO_NLIST_H_ +#define _MACHO_NLIST_H_ +/* $NetBSD: nlist.h,v 1.5 1994/10/26 00:56:11 cgd Exp $ */ + +/*- + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * (c) UNIX System Laboratories, Inc. + * All or some portions of this file are derived from material licensed + * to the University of California by American Telephone and Telegraph + * Co. or Unix System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)nlist.h 8.2 (Berkeley) 1/21/94 + */ +#include <stdint.h> + +/* + * Format of a symbol table entry of a Mach-O file for 32-bit architectures. + * Modified from the BSD format. The modifications from the original format + * were changing n_other (an unused field) to n_sect and the addition of the + * N_SECT type. These modifications are required to support symbols in a larger + * number of sections not just the three sections (text, data and bss) in a BSD + * file. + */ +struct nlist { + union { +#ifndef __LP64__ + char *n_name; /* for use when in-core */ +#endif + int32_t n_strx; /* index into the string table */ + } n_un; + uint8_t n_type; /* type flag, see below */ + uint8_t n_sect; /* section number or NO_SECT */ + int16_t n_desc; /* see <mach-o/stab.h> */ + uint32_t n_value; /* value of this symbol (or stab offset) */ +}; + +/* + * This is the symbol table entry structure for 64-bit architectures. + */ +struct nlist_64 { + union { + uint32_t n_strx; /* index into the string table */ + } n_un; + uint8_t n_type; /* type flag, see below */ + uint8_t n_sect; /* section number or NO_SECT */ + uint16_t n_desc; /* see <mach-o/stab.h> */ + uint64_t n_value; /* value of this symbol (or stab offset) */ +}; + +/* + * Symbols with a index into the string table of zero (n_un.n_strx == 0) are + * defined to have a null, "", name. Therefore all string indexes to non null + * names must not have a zero string index. This is bit historical information + * that has never been well documented. + */ + +/* + * The n_type field really contains four fields: + * unsigned char N_STAB:3, + * N_PEXT:1, + * N_TYPE:3, + * N_EXT:1; + * which are used via the following masks. + */ +#define N_STAB 0xe0 /* if any of these bits set, a symbolic debugging entry */ +#define N_PEXT 0x10 /* private external symbol bit */ +#define N_TYPE 0x0e /* mask for the type bits */ +#define N_EXT 0x01 /* external symbol bit, set for external symbols */ + +/* + * Only symbolic debugging entries have some of the N_STAB bits set and if any + * of these bits are set then it is a symbolic debugging entry (a stab). In + * which case then the values of the n_type field (the entire field) are given + * in <mach-o/stab.h> + */ + +/* + * Values for N_TYPE bits of the n_type field. + */ +#define N_UNDF 0x0 /* undefined, n_sect == NO_SECT */ +#define N_ABS 0x2 /* absolute, n_sect == NO_SECT */ +#define N_SECT 0xe /* defined in section number n_sect */ +#define N_PBUD 0xc /* prebound undefined (defined in a dylib) */ +#define N_INDR 0xa /* indirect */ + +/* + * If the type is N_INDR then the symbol is defined to be the same as another + * symbol. In this case the n_value field is an index into the string table + * of the other symbol's name. When the other symbol is defined then they both + * take on the defined type and value. + */ + +/* + * If the type is N_SECT then the n_sect field contains an ordinal of the + * section the symbol is defined in. The sections are numbered from 1 and + * refer to sections in order they appear in the load commands for the file + * they are in. This means the same ordinal may very well refer to different + * sections in different files. + * + * The n_value field for all symbol table entries (including N_STAB's) gets + * updated by the link editor based on the value of it's n_sect field and where + * the section n_sect references gets relocated. If the value of the n_sect + * field is NO_SECT then it's n_value field is not changed by the link editor. + */ +#define NO_SECT 0 /* symbol is not in any section */ +#define MAX_SECT 255 /* 1 thru 255 inclusive */ + +/* + * Common symbols are represented by undefined (N_UNDF) external (N_EXT) types + * who's values (n_value) are non-zero. In which case the value of the n_value + * field is the size (in bytes) of the common symbol. The n_sect field is set + * to NO_SECT. The alignment of a common symbol may be set as a power of 2 + * between 2^1 and 2^15 as part of the n_desc field using the macros below. If + * the alignment is not set (a value of zero) then natural alignment based on + * the size is used. + */ +#define GET_COMM_ALIGN(n_desc) (((n_desc) >> 8) & 0x0f) +#define SET_COMM_ALIGN(n_desc,align) \ + (n_desc) = (((n_desc) & 0xf0ff) | (((align) & 0x0f) << 8)) + +/* + * To support the lazy binding of undefined symbols in the dynamic link-editor, + * the undefined symbols in the symbol table (the nlist structures) are marked + * with the indication if the undefined reference is a lazy reference or + * non-lazy reference. If both a non-lazy reference and a lazy reference is + * made to the same symbol the non-lazy reference takes precedence. A reference + * is lazy only when all references to that symbol are made through a symbol + * pointer in a lazy symbol pointer section. + * + * The implementation of marking nlist structures in the symbol table for + * undefined symbols will be to use some of the bits of the n_desc field as a + * reference type. The mask REFERENCE_TYPE will be applied to the n_desc field + * of an nlist structure for an undefined symbol to determine the type of + * undefined reference (lazy or non-lazy). + * + * The constants for the REFERENCE FLAGS are propagated to the reference table + * in a shared library file. In that case the constant for a defined symbol, + * REFERENCE_FLAG_DEFINED, is also used. + */ +/* Reference type bits of the n_desc field of undefined symbols */ +#define REFERENCE_TYPE 0x7 +/* types of references */ +#define REFERENCE_FLAG_UNDEFINED_NON_LAZY 0 +#define REFERENCE_FLAG_UNDEFINED_LAZY 1 +#define REFERENCE_FLAG_DEFINED 2 +#define REFERENCE_FLAG_PRIVATE_DEFINED 3 +#define REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY 4 +#define REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY 5 + +/* + * To simplify stripping of objects that use are used with the dynamic link + * editor, the static link editor marks the symbols defined an object that are + * referenced by a dynamicly bound object (dynamic shared libraries, bundles). + * With this marking strip knows not to strip these symbols. + */ +#define REFERENCED_DYNAMICALLY 0x0010 + +/* + * For images created by the static link editor with the -twolevel_namespace + * option in effect the flags field of the mach header is marked with + * MH_TWOLEVEL. And the binding of the undefined references of the image are + * determined by the static link editor. Which library an undefined symbol is + * bound to is recorded by the static linker in the high 8 bits of the n_desc + * field using the SET_LIBRARY_ORDINAL macro below. The ordinal recorded + * references the libraries listed in the Mach-O's LC_LOAD_DYLIB, + * LC_LOAD_WEAK_DYLIB, LC_REEXPORT_DYLIB, LC_LOAD_UPWARD_DYLIB, and + * LC_LAZY_LOAD_DYLIB, etc. load commands in the order they appear in the + * headers. The library ordinals start from 1. + * For a dynamic library that is built as a two-level namespace image the + * undefined references from module defined in another use the same nlist struct + * an in that case SELF_LIBRARY_ORDINAL is used as the library ordinal. For + * defined symbols in all images they also must have the library ordinal set to + * SELF_LIBRARY_ORDINAL. The EXECUTABLE_ORDINAL refers to the executable + * image for references from plugins that refer to the executable that loads + * them. + * + * The DYNAMIC_LOOKUP_ORDINAL is for undefined symbols in a two-level namespace + * image that are looked up by the dynamic linker with flat namespace semantics. + * This ordinal was added as a feature in Mac OS X 10.3 by reducing the + * value of MAX_LIBRARY_ORDINAL by one. So it is legal for existing binaries + * or binaries built with older tools to have 0xfe (254) dynamic libraries. In + * this case the ordinal value 0xfe (254) must be treated as a library ordinal + * for compatibility. + */ +#define GET_LIBRARY_ORDINAL(n_desc) (((n_desc) >> 8) & 0xff) +#define SET_LIBRARY_ORDINAL(n_desc,ordinal) \ + (n_desc) = (((n_desc) & 0x00ff) | (((ordinal) & 0xff) << 8)) +#define SELF_LIBRARY_ORDINAL 0x0 +#define MAX_LIBRARY_ORDINAL 0xfd +#define DYNAMIC_LOOKUP_ORDINAL 0xfe +#define EXECUTABLE_ORDINAL 0xff + +/* + * The bit 0x0020 of the n_desc field is used for two non-overlapping purposes + * and has two different symbolic names, N_NO_DEAD_STRIP and N_DESC_DISCARDED. + */ + +/* + * The N_NO_DEAD_STRIP bit of the n_desc field only ever appears in a + * relocatable .o file (MH_OBJECT filetype). And is used to indicate to the + * static link editor it is never to dead strip the symbol. + */ +#define N_NO_DEAD_STRIP 0x0020 /* symbol is not to be dead stripped */ + +/* + * The N_DESC_DISCARDED bit of the n_desc field never appears in linked image. + * But is used in very rare cases by the dynamic link editor to mark an in + * memory symbol as discared and longer used for linking. + */ +#define N_DESC_DISCARDED 0x0020 /* symbol is discarded */ + +/* + * The N_WEAK_REF bit of the n_desc field indicates to the dynamic linker that + * the undefined symbol is allowed to be missing and is to have the address of + * zero when missing. + */ +#define N_WEAK_REF 0x0040 /* symbol is weak referenced */ + +/* + * The N_WEAK_DEF bit of the n_desc field indicates to the static and dynamic + * linkers that the symbol definition is weak, allowing a non-weak symbol to + * also be used which causes the weak definition to be discared. Currently this + * is only supported for symbols in coalesed sections. + */ +#define N_WEAK_DEF 0x0080 /* coalesed symbol is a weak definition */ + +/* + * The N_REF_TO_WEAK bit of the n_desc field indicates to the dynamic linker + * that the undefined symbol should be resolved using flat namespace searching. + */ +#define N_REF_TO_WEAK 0x0080 /* reference to a weak symbol */ + +/* + * The N_ARM_THUMB_DEF bit of the n_desc field indicates that the symbol is + * a defintion of a Thumb function. + */ +#define N_ARM_THUMB_DEF 0x0008 /* symbol is a Thumb function (ARM) */ + +/* + * The N_SYMBOL_RESOLVER bit of the n_desc field indicates that the + * that the function is actually a resolver function and should + * be called to get the address of the real function to use. + * This bit is only available in .o files (MH_OBJECT filetype) + */ +#define N_SYMBOL_RESOLVER 0x0100 + +#ifndef __STRICT_BSD__ +#if __cplusplus +extern "C" { +#endif /* __cplusplus */ +/* + * The function nlist(3) from the C library. + */ +extern int nlist (const char *filename, struct nlist *list); +#if __cplusplus +} +#endif /* __cplusplus */ +#endif /* __STRICT_BSD__ */ + +#endif /* _MACHO_LIST_H_ */ diff --git a/i386/include/mach-o/ranlib.h b/i386/include/mach-o/ranlib.h new file mode 100644 index 0000000..66a1f09 --- /dev/null +++ b/i386/include/mach-o/ranlib.h @@ -0,0 +1,67 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* ranlib.h 4.1 83/05/03 */ +#ifndef _MACH_O_RANLIB_H_ +#define _MACH_O_RANLIB_H_ + +#include <stdint.h> +#include <sys/types.h> /* off_t */ + +/* + * There are two known orders of table of contents for archives. The first is + * the order ranlib(1) originally produced and still produces without any + * options. This table of contents has the archive member name "__.SYMDEF" + * This order has the ranlib structures in the order the objects appear in the + * archive and the symbol names of those objects in the order of symbol table. + * The second know order is sorted by symbol name and is produced with the -s + * option to ranlib(1). This table of contents has the archive member name + * "__.SYMDEF SORTED" and many programs (notably the 1.0 version of ld(1) can't + * tell the difference between names because of the imbedded blank in the name + * and works with either table of contents). This second order is used by the + * post 1.0 link editor to produce faster linking. The original 1.0 version of + * ranlib(1) gets confused when it is run on a archive with the second type of + * table of contents because it and ar(1) which it uses use different ways to + * determined the member name (ar(1) treats all blanks in the name as + * significant and ranlib(1) only checks for the first one). + */ +#define SYMDEF "__.SYMDEF" +#define SYMDEF_SORTED "__.SYMDEF SORTED" + +/* + * Structure of the __.SYMDEF table of contents for an archive. + * __.SYMDEF begins with a long giving the size in bytes of the ranlib + * structures which immediately follow, and then continues with a string + * table consisting of a long giving the number of bytes of strings which + * follow and then the strings themselves. The ran_strx fields index the + * string table whose first byte is numbered 0. + */ +struct ranlib { + union { + uint32_t ran_strx; /* string table index of */ +#ifndef __LP64__ + char *ran_name; /* symbol defined by */ +#endif + } ran_un; + uint32_t ran_off; /* library member at this offset */ +}; +#endif /* _MACH_O_RANLIB_H_ */ diff --git a/i386/include/mach-o/reloc.h b/i386/include/mach-o/reloc.h new file mode 100644 index 0000000..d5741ef --- /dev/null +++ b/i386/include/mach-o/reloc.h @@ -0,0 +1,203 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* $NetBSD: exec.h,v 1.6 1994/10/27 04:16:05 cgd Exp $ */ + +/* + * Copyright (c) 1993 Christopher G. Demetriou + * 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 author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + */ + +#ifndef _MACHO_RELOC_H_ +#define _MACHO_RELOC_H_ +#include <stdint.h> + +/* + * Format of a relocation entry of a Mach-O file. Modified from the 4.3BSD + * format. The modifications from the original format were changing the value + * of the r_symbolnum field for "local" (r_extern == 0) relocation entries. + * This modification is required to support symbols in an arbitrary number of + * sections not just the three sections (text, data and bss) in a 4.3BSD file. + * Also the last 4 bits have had the r_type tag added to them. + */ +struct relocation_info { + int32_t r_address; /* offset in the section to what is being + relocated */ + uint32_t r_symbolnum:24, /* symbol index if r_extern == 1 or section + ordinal if r_extern == 0 */ + r_pcrel:1, /* was relocated pc relative already */ + r_length:2, /* 0=byte, 1=word, 2=long, 3=quad */ + r_extern:1, /* does not include value of sym referenced */ + r_type:4; /* if not 0, machine specific relocation type */ +}; +#define R_ABS 0 /* absolute relocation type for Mach-O files */ + +/* + * The r_address is not really the address as it's name indicates but an offset. + * In 4.3BSD a.out objects this offset is from the start of the "segment" for + * which relocation entry is for (text or data). For Mach-O object files it is + * also an offset but from the start of the "section" for which the relocation + * entry is for. See comments in <mach-o/loader.h> about the r_address feild + * in images for used with the dynamic linker. + * + * In 4.3BSD a.out objects if r_extern is zero then r_symbolnum is an ordinal + * for the segment the symbol being relocated is in. These ordinals are the + * symbol types N_TEXT, N_DATA, N_BSS or N_ABS. In Mach-O object files these + * ordinals refer to the sections in the object file in the order their section + * structures appear in the headers of the object file they are in. The first + * section has the ordinal 1, the second 2, and so on. This means that the + * same ordinal in two different object files could refer to two different + * sections. And further could have still different ordinals when combined + * by the link-editor. The value R_ABS is used for relocation entries for + * absolute symbols which need no further relocation. + */ + +/* + * For RISC machines some of the references are split across two instructions + * and the instruction does not contain the complete value of the reference. + * In these cases a second, or paired relocation entry, follows each of these + * relocation entries, using a PAIR r_type, which contains the other part of the + * reference not contained in the instruction. This other part is stored in the + * pair's r_address field. The exact number of bits of the other part of the + * reference store in the r_address field is dependent on the particular + * relocation type for the particular architecture. + */ + +/* + * To make scattered loading by the link editor work correctly "local" + * relocation entries can't be used when the item to be relocated is the value + * of a symbol plus an offset (where the resulting expresion is outside the + * block the link editor is moving, a blocks are divided at symbol addresses). + * In this case. where the item is a symbol value plus offset, the link editor + * needs to know more than just the section the symbol was defined. What is + * needed is the actual value of the symbol without the offset so it can do the + * relocation correctly based on where the value of the symbol got relocated to + * not the value of the expression (with the offset added to the symbol value). + * So for the NeXT 2.0 release no "local" relocation entries are ever used when + * there is a non-zero offset added to a symbol. The "external" and "local" + * relocation entries remain unchanged. + * + * The implemention is quite messy given the compatibility with the existing + * relocation entry format. The ASSUMPTION is that a section will never be + * bigger than 2**24 - 1 (0x00ffffff or 16,777,215) bytes. This assumption + * allows the r_address (which is really an offset) to fit in 24 bits and high + * bit of the r_address field in the relocation_info structure to indicate + * it is really a scattered_relocation_info structure. Since these are only + * used in places where "local" relocation entries are used and not where + * "external" relocation entries are used the r_extern field has been removed. + * + * For scattered loading to work on a RISC machine where some of the references + * are split across two instructions the link editor needs to be assured that + * each reference has a unique 32 bit reference (that more than one reference is + * NOT sharing the same high 16 bits for example) so it move each referenced + * item independent of each other. Some compilers guarantees this but the + * compilers don't so scattered loading can be done on those that do guarantee + * this. + */ +#if defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__) +/* + * The reason for the ifdef's of __BIG_ENDIAN__ and __LITTLE_ENDIAN__ are that + * when stattered relocation entries were added the mistake of using a mask + * against a structure that is made up of bit fields was used. To make this + * design work this structure must be laid out in memory the same way so the + * mask can be applied can check the same bit each time (r_scattered). + */ +#endif /* defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__) */ +#define R_SCATTERED 0x80000000 /* mask to be applied to the r_address field + of a relocation_info structure to tell that + is is really a scattered_relocation_info + stucture */ +struct scattered_relocation_info { +#ifdef __BIG_ENDIAN__ + uint32_t r_scattered:1, /* 1=scattered, 0=non-scattered (see above) */ + r_pcrel:1, /* was relocated pc relative already */ + r_length:2, /* 0=byte, 1=word, 2=long, 3=quad */ + r_type:4, /* if not 0, machine specific relocation type */ + r_address:24; /* offset in the section to what is being + relocated */ + int32_t r_value; /* the value the item to be relocated is + refering to (without any offset added) */ +#endif /* __BIG_ENDIAN__ */ +#ifdef __LITTLE_ENDIAN__ + uint32_t + r_address:24, /* offset in the section to what is being + relocated */ + r_type:4, /* if not 0, machine specific relocation type */ + r_length:2, /* 0=byte, 1=word, 2=long, 3=quad */ + r_pcrel:1, /* was relocated pc relative already */ + r_scattered:1; /* 1=scattered, 0=non-scattered (see above) */ + int32_t r_value; /* the value the item to be relocated is + refering to (without any offset added) */ +#endif /* __LITTLE_ENDIAN__ */ +}; + +/* + * Relocation types used in a generic implementation. Relocation entries for + * normal things use the generic relocation as discribed above and their r_type + * is GENERIC_RELOC_VANILLA (a value of zero). + * + * Another type of generic relocation, GENERIC_RELOC_SECTDIFF, is to support + * the difference of two symbols defined in different sections. That is the + * expression "symbol1 - symbol2 + constant" is a relocatable expression when + * both symbols are defined in some section. For this type of relocation the + * both relocations entries are scattered relocation entries. The value of + * symbol1 is stored in the first relocation entry's r_value field and the + * value of symbol2 is stored in the pair's r_value field. + * + * A special case for a prebound lazy pointer is needed to beable to set the + * value of the lazy pointer back to its non-prebound state. This is done + * using the GENERIC_RELOC_PB_LA_PTR r_type. This is a scattered relocation + * entry where the r_value feild is the value of the lazy pointer not prebound. + */ +enum reloc_type_generic +{ + GENERIC_RELOC_VANILLA, /* generic relocation as discribed above */ + GENERIC_RELOC_PAIR, /* Only follows a GENERIC_RELOC_SECTDIFF */ + GENERIC_RELOC_SECTDIFF, + GENERIC_RELOC_PB_LA_PTR, /* prebound lazy pointer */ + GENERIC_RELOC_LOCAL_SECTDIFF, + GENERIC_RELOC_TLV /* thread local variables */ +}; + +#endif /* _MACHO_RELOC_H_ */ diff --git a/i386/include/mach-o/stab.h b/i386/include/mach-o/stab.h new file mode 100644 index 0000000..e9e15b2 --- /dev/null +++ b/i386/include/mach-o/stab.h @@ -0,0 +1,122 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _MACHO_STAB_H_ +#define _MACHO_STAB_H_ +/* $NetBSD: stab.h,v 1.4 1994/10/26 00:56:25 cgd Exp $ */ + +/*- + * Copyright (c) 1991 The Regents of the University of California. + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)stab.h 5.2 (Berkeley) 4/4/91 + */ + +/* + * This file gives definitions supplementing <nlist.h> for permanent symbol + * table entries of Mach-O files. Modified from the BSD definitions. The + * modifications from the original definitions were changing what the values of + * what was the n_other field (an unused field) which is now the n_sect field. + * These modifications are required to support symbols in an arbitrary number of + * sections not just the three sections (text, data and bss) in a BSD file. + * The values of the defined constants have NOT been changed. + * + * These must have one of the N_STAB bits on. The n_value fields are subject + * to relocation according to the value of their n_sect field. So for types + * that refer to things in sections the n_sect field must be filled in with the + * proper section ordinal. For types that are not to have their n_value field + * relocatated the n_sect field must be NO_SECT. + */ + +/* + * Symbolic debugger symbols. The comments give the conventional use for + * + * .stabs "n_name", n_type, n_sect, n_desc, n_value + * + * where n_type is the defined constant and not listed in the comment. Other + * fields not listed are zero. n_sect is the section ordinal the entry is + * refering to. + */ +#define N_GSYM 0x20 /* global symbol: name,,NO_SECT,type,0 */ +#define N_FNAME 0x22 /* procedure name (f77 kludge): name,,NO_SECT,0,0 */ +#define N_FUN 0x24 /* procedure: name,,n_sect,linenumber,address */ +#define N_STSYM 0x26 /* static symbol: name,,n_sect,type,address */ +#define N_LCSYM 0x28 /* .lcomm symbol: name,,n_sect,type,address */ +#define N_BNSYM 0x2e /* begin nsect sym: 0,,n_sect,0,address */ +#define N_OPT 0x3c /* emitted with gcc2_compiled and in gcc source */ +#define N_RSYM 0x40 /* register sym: name,,NO_SECT,type,register */ +#define N_SLINE 0x44 /* src line: 0,,n_sect,linenumber,address */ +#define N_ENSYM 0x4e /* end nsect sym: 0,,n_sect,0,address */ +#define N_SSYM 0x60 /* structure elt: name,,NO_SECT,type,struct_offset */ +#define N_SO 0x64 /* source file name: name,,n_sect,0,address */ +#define N_OSO 0x66 /* object file name: name,,0,0,st_mtime */ +#define N_LSYM 0x80 /* local sym: name,,NO_SECT,type,offset */ +#define N_BINCL 0x82 /* include file beginning: name,,NO_SECT,0,sum */ +#define N_SOL 0x84 /* #included file name: name,,n_sect,0,address */ +#define N_PARAMS 0x86 /* compiler parameters: name,,NO_SECT,0,0 */ +#define N_VERSION 0x88 /* compiler version: name,,NO_SECT,0,0 */ +#define N_OLEVEL 0x8A /* compiler -O level: name,,NO_SECT,0,0 */ +#define N_PSYM 0xa0 /* parameter: name,,NO_SECT,type,offset */ +#define N_EINCL 0xa2 /* include file end: name,,NO_SECT,0,0 */ +#define N_ENTRY 0xa4 /* alternate entry: name,,n_sect,linenumber,address */ +#define N_LBRAC 0xc0 /* left bracket: 0,,NO_SECT,nesting level,address */ +#define N_EXCL 0xc2 /* deleted include file: name,,NO_SECT,0,sum */ +#define N_RBRAC 0xe0 /* right bracket: 0,,NO_SECT,nesting level,address */ +#define N_BCOMM 0xe2 /* begin common: name,,NO_SECT,0,0 */ +#define N_ECOMM 0xe4 /* end common: name,,n_sect,0,0 */ +#define N_ECOML 0xe8 /* end common (local name): 0,,n_sect,0,address */ +#define N_LENG 0xfe /* second stab entry with length information */ + +/* + * for the berkeley pascal compiler, pc(1): + */ +#define N_PC 0x30 /* global pascal symbol: name,,NO_SECT,subtype,line */ + +#endif /* _MACHO_STAB_H_ */ diff --git a/i386/include/mach-o/swap.h b/i386/include/mach-o/swap.h new file mode 100644 index 0000000..ba10994 --- /dev/null +++ b/i386/include/mach-o/swap.h @@ -0,0 +1,207 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _MACH_O_SWAP_H_ +#define _MACH_O_SWAP_H_ + +#include <stdint.h> +#include <architecture/byte_order.h> +#include <mach-o/fat.h> +#include <mach-o/loader.h> +#include <mach-o/nlist.h> +#include <mach-o/reloc.h> +#include <mach-o/ranlib.h> + +#if __cplusplus +extern "C" { +#endif /* __cplusplus */ + +extern void swap_fat_header( + struct fat_header *fat_header, + enum NXByteOrder target_byte_order); + +extern void swap_fat_arch( + struct fat_arch *fat_archs, + uint32_t nfat_arch, + enum NXByteOrder target_byte_order); + +extern void swap_mach_header( + struct mach_header *mh, + enum NXByteOrder target_byte_order); + +extern void swap_mach_header_64( + struct mach_header_64 *mh, + enum NXByteOrder target_byte_order); + +extern void swap_load_command( + struct load_command *lc, + enum NXByteOrder target_byte_order); + +extern void swap_segment_command( + struct segment_command *sg, + enum NXByteOrder target_byte_order); + +extern void swap_segment_command_64( + struct segment_command_64 *sg, + enum NXByteOrder target_byte_order); + +extern void swap_section( + struct section *s, + uint32_t nsects, + enum NXByteOrder target_byte_order); + +extern void swap_section_64( + struct section_64 *s, + uint32_t nsects, + enum NXByteOrder target_byte_order); + +extern void swap_symtab_command( + struct symtab_command *st, + enum NXByteOrder target_byte_order); + +extern void swap_dysymtab_command( + struct dysymtab_command *dyst, + enum NXByteOrder target_byte_sex); + +extern void swap_symseg_command( + struct symseg_command *ss, + enum NXByteOrder target_byte_order); + +extern void swap_fvmlib_command( + struct fvmlib_command *fl, + enum NXByteOrder target_byte_order); + +extern void swap_dylib_command( + struct dylib_command *dl, + enum NXByteOrder target_byte_sex); + +extern void swap_sub_framework_command( + struct sub_framework_command *sub, + enum NXByteOrder target_byte_sex); + +extern void swap_sub_umbrella_command( + struct sub_umbrella_command *usub, + enum NXByteOrder target_byte_sex); + +extern void swap_sub_library_command( + struct sub_library_command *lsub, + enum NXByteOrder target_byte_sex); + +extern void swap_sub_client_command( + struct sub_client_command *csub, + enum NXByteOrder target_byte_sex); + +extern void swap_prebound_dylib_command( + struct prebound_dylib_command *pbdylib, + enum NXByteOrder target_byte_sex); + +extern void swap_dylinker_command( + struct dylinker_command *dyld, + enum NXByteOrder target_byte_sex); + +extern void swap_fvmfile_command( + struct fvmfile_command *ff, + enum NXByteOrder target_byte_order); + +extern void swap_thread_command( + struct thread_command *ut, + enum NXByteOrder target_byte_order); + +extern void swap_ident_command( + struct ident_command *ident, + enum NXByteOrder target_byte_order); + +extern void swap_routines_command( + struct routines_command *r_cmd, + enum NXByteOrder target_byte_sex); + +extern void swap_routines_command_64( + struct routines_command_64 *r_cmd, + enum NXByteOrder target_byte_sex); + +extern void swap_twolevel_hints_command( + struct twolevel_hints_command *hints_cmd, + enum NXByteOrder target_byte_sex); + +extern void swap_prebind_cksum_command( + struct prebind_cksum_command *cksum_cmd, + enum NXByteOrder target_byte_sex); + +extern void swap_uuid_command( + struct uuid_command *uuid_cmd, + enum NXByteOrder target_byte_sex); + +extern void swap_twolevel_hint( + struct twolevel_hint *hints, + uint32_t nhints, + enum NXByteOrder target_byte_sex); + +extern void swap_nlist( + struct nlist *symbols, + uint32_t nsymbols, + enum NXByteOrder target_byte_order); + +extern void swap_nlist_64( + struct nlist_64 *symbols, + uint32_t nsymbols, + enum NXByteOrder target_byte_order); + +extern void swap_ranlib( + struct ranlib *ranlibs, + uint32_t nranlibs, + enum NXByteOrder target_byte_order); + +extern void swap_relocation_info( + struct relocation_info *relocs, + uint32_t nrelocs, + enum NXByteOrder target_byte_order); + +extern void swap_indirect_symbols( + uint32_t *indirect_symbols, + uint32_t nindirect_symbols, + enum NXByteOrder target_byte_sex); + +extern void swap_dylib_reference( + struct dylib_reference *refs, + uint32_t nrefs, + enum NXByteOrder target_byte_sex); + +extern void swap_dylib_module( + struct dylib_module *mods, + uint32_t nmods, + enum NXByteOrder target_byte_sex); + +extern void swap_dylib_module_64( + struct dylib_module_64 *mods, + uint32_t nmods, + enum NXByteOrder target_byte_sex); + +extern void swap_dylib_table_of_contents( + struct dylib_table_of_contents *tocs, + uint32_t ntocs, + enum NXByteOrder target_byte_sex); + +#if __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _MACH_O_SWAP_H_ */ diff --git a/i386/include/mach-o/x86_64/reloc.h b/i386/include/mach-o/x86_64/reloc.h new file mode 100644 index 0000000..d3466d8 --- /dev/null +++ b/i386/include/mach-o/x86_64/reloc.h @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Relocations for x86_64 are a bit different than for other architectures in + * Mach-O: Scattered relocations are not used. Almost all relocations produced + * by the compiler are external relocations. An external relocation has the + * r_extern bit set to 1 and the r_symbolnum field contains the symbol table + * index of the target label. + * + * When the assembler is generating relocations, if the target label is a local + * label (begins with 'L'), then the previous non-local label in the same + * section is used as the target of the external relocation. An addend is used + * with the distance from that non-local label to the target label. Only when + * there is no previous non-local label in the section is an internal + * relocation used. + * + * The addend (i.e. the 4 in _foo+4) is encoded in the instruction (Mach-O does + * not have RELA relocations). For PC-relative relocations, the addend is + * stored directly in the instruction. This is different from other Mach-O + * architectures, which encode the addend minus the current section offset. + * + * The relocation types are: + * + * X86_64_RELOC_UNSIGNED // for absolute addresses + * X86_64_RELOC_SIGNED // for signed 32-bit displacement + * X86_64_RELOC_BRANCH // a CALL/JMP instruction with 32-bit displacement + * X86_64_RELOC_GOT_LOAD // a MOVQ load of a GOT entry + * X86_64_RELOC_GOT // other GOT references + * X86_64_RELOC_SUBTRACTOR // must be followed by a X86_64_RELOC_UNSIGNED + * + * The following are sample assembly instructions, followed by the relocation + * and section content they generate in an object file: + * + * call _foo + * r_type=X86_64_RELOC_BRANCH, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo + * E8 00 00 00 00 + * + * call _foo+4 + * r_type=X86_64_RELOC_BRANCH, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo + * E8 04 00 00 00 + * + * movq _foo@GOTPCREL(%rip), %rax + * r_type=X86_64_RELOC_GOT_LOAD, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo + * 48 8B 05 00 00 00 00 + * + * pushq _foo@GOTPCREL(%rip) + * r_type=X86_64_RELOC_GOT, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo + * FF 35 00 00 00 00 + * + * movl _foo(%rip), %eax + * r_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo + * 8B 05 00 00 00 00 + * + * movl _foo+4(%rip), %eax + * r_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo + * 8B 05 04 00 00 00 + * + * movb $0x12, _foo(%rip) + * r_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo + * C6 05 FF FF FF FF 12 + * + * movl $0x12345678, _foo(%rip) + * r_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo + * C7 05 FC FF FF FF 78 56 34 12 + * + * .quad _foo + * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo + * 00 00 00 00 00 00 00 00 + * + * .quad _foo+4 + * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo + * 04 00 00 00 00 00 00 00 + * + * .quad _foo - _bar + * r_type=X86_64_RELOC_SUBTRACTOR, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_bar + * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo + * 00 00 00 00 00 00 00 00 + * + * .quad _foo - _bar + 4 + * r_type=X86_64_RELOC_SUBTRACTOR, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_bar + * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo + * 04 00 00 00 00 00 00 00 + * + * .long _foo - _bar + * r_type=X86_64_RELOC_SUBTRACTOR, r_length=2, r_extern=1, r_pcrel=0, r_symbolnum=_bar + * r_type=X86_64_RELOC_UNSIGNED, r_length=2, r_extern=1, r_pcrel=0, r_symbolnum=_foo + * 00 00 00 00 + * + * lea L1(%rip), %rax + * r_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_prev + * 48 8d 05 12 00 00 00 + * // assumes _prev is the first non-local label 0x12 bytes before L1 + * + * lea L0(%rip), %rax + * r_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=0, r_pcrel=1, r_symbolnum=3 + * 48 8d 05 56 00 00 00 + * // assumes L0 is in third section and there is no previous non-local label. + * // The rip-relative-offset of 0x00000056 is L0-address_of_next_instruction. + * // address_of_next_instruction is the address of the relocation + 4. + * + * add $6,L0(%rip) + * r_type=X86_64_RELOC_SIGNED_1, r_length=2, r_extern=0, r_pcrel=1, r_symbolnum=3 + * 83 05 18 00 00 00 06 + * // assumes L0 is in third section and there is no previous non-local label. + * // The rip-relative-offset of 0x00000018 is L0-address_of_next_instruction. + * // address_of_next_instruction is the address of the relocation + 4 + 1. + * // The +1 comes from SIGNED_1. This is used because the relocation is not + * // at the end of the instruction. + * + * .quad L1 + * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_prev + * 12 00 00 00 00 00 00 00 + * // assumes _prev is the first non-local label 0x12 bytes before L1 + * + * .quad L0 + * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=0, r_pcrel=0, r_symbolnum=3 + * 56 00 00 00 00 00 00 00 + * // assumes L0 is in third section, has an address of 0x00000056 in .o + * // file, and there is no previous non-local label + * + * .quad _foo - . + * r_type=X86_64_RELOC_SUBTRACTOR, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_prev + * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo + * EE FF FF FF FF FF FF FF + * // assumes _prev is the first non-local label 0x12 bytes before this + * // .quad + * + * .quad _foo - L1 + * r_type=X86_64_RELOC_SUBTRACTOR, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_prev + * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo + * EE FF FF FF FF FF FF FF + * // assumes _prev is the first non-local label 0x12 bytes before L1 + * + * .quad L1 - _prev + * // No relocations. This is an assembly time constant. + * 12 00 00 00 00 00 00 00 + * // assumes _prev is the first non-local label 0x12 bytes before L1 + * + * + * + * In final linked images, there are only two valid relocation kinds: + * + * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_pcrel=0, r_extern=1, r_symbolnum=sym_index + * This tells dyld to add the address of a symbol to a pointer sized (8-byte) + * piece of data (i.e on disk the 8-byte piece of data contains the addend). The + * r_symbolnum contains the index into the symbol table of the target symbol. + * + * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_pcrel=0, r_extern=0, r_symbolnum=0 + * This tells dyld to adjust the pointer sized (8-byte) piece of data by the amount + * the containing image was loaded from its base address (e.g. slide). + * + */ +enum reloc_type_x86_64 +{ + X86_64_RELOC_UNSIGNED, // for absolute addresses + X86_64_RELOC_SIGNED, // for signed 32-bit displacement + X86_64_RELOC_BRANCH, // a CALL/JMP instruction with 32-bit displacement + X86_64_RELOC_GOT_LOAD, // a MOVQ load of a GOT entry + X86_64_RELOC_GOT, // other GOT references + X86_64_RELOC_SUBTRACTOR, // must be followed by a X86_64_RELOC_UNSIGNED + X86_64_RELOC_SIGNED_1, // for signed 32-bit displacement with a -1 addend + X86_64_RELOC_SIGNED_2, // for signed 32-bit displacement with a -2 addend + X86_64_RELOC_SIGNED_4, // for signed 32-bit displacement with a -4 addend + X86_64_RELOC_TLV, // for thread local variables +}; diff --git a/i386/include/mach/audit_triggers.defs b/i386/include/mach/audit_triggers.defs new file mode 100644 index 0000000..1d6e279 --- /dev/null +++ b/i386/include/mach/audit_triggers.defs @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2004-2008, Apple Inc. All rights reserved. + * + * @APPLE_BSD_LICENSE_HEADER_START@ + * + * 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. Neither the name of Apple Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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. + * + * @APPLE_BSD_LICENSE_HEADER_END@ +*/ + +/* + * Interface definition for the audit logging facility. + */ + +subsystem +#if KERNEL_USER + KernelUser +#endif /* KERNEL_USER */ + audit_triggers 123; + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> + +simpleroutine audit_triggers( + audit_port : mach_port_t; + in flags : int); + diff --git a/i386/include/mach/boolean.h b/i386/include/mach/boolean.h new file mode 100644 index 0000000..641c396 --- /dev/null +++ b/i386/include/mach/boolean.h @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/boolean.h + * + * Boolean data type. + * + */ + +#ifndef _MACH_BOOLEAN_H_ +#define _MACH_BOOLEAN_H_ + +/* + * Pick up "boolean_t" type definition + */ + +#ifndef ASSEMBLER +#include <mach/machine/boolean.h> +#endif /* ASSEMBLER */ + +/* + * Define TRUE and FALSE if not defined. + */ + +#ifndef TRUE +#define TRUE 1 +#endif /* TRUE */ + +#ifndef FALSE +#define FALSE 0 +#endif /* FALSE */ + +#endif /* _MACH_BOOLEAN_H_ */ diff --git a/i386/include/mach/bootstrap.h b/i386/include/mach/bootstrap.h new file mode 100644 index 0000000..67667c3 --- /dev/null +++ b/i386/include/mach/bootstrap.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Mach bootstrap interfaces (obsolete: header included only for compatibility) + */ +#ifndef _MACH_BOOTSTRAP_H_ +#define _MACH_BOOTSTRAP_H_ + +#endif /* _MACH_BOOTSTRAP_H_ */ diff --git a/i386/include/mach/clock.defs b/i386/include/mach/clock.defs new file mode 100644 index 0000000..440042c --- /dev/null +++ b/i386/include/mach/clock.defs @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * File: mach/clock.defs + * Purpose: Kernel clock subsystem definitions. This + * file defines the clock request interface. + */ + +subsystem +#if KERNEL_SERVER + KernelServer +#endif /* KERNEL_SERVER */ + clock 1000; + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> +#include <mach/clock_types.defs> + +/* + * References to clock objects are returned by: + * host_get_clock_service(host_t,...) + * host_get_clock_control(host_priv_t,...) - Priviledged subclass + */ + +/* + * Get the clock time. + * Available to all. + */ +routine clock_get_time( + clock_serv : clock_serv_t; + out cur_time : mach_timespec_t); + +/* + * Get clock attributes. + * Available to all. + */ +routine clock_get_attributes( + clock_serv : clock_serv_t; + in flavor : clock_flavor_t; + out clock_attr : clock_attr_t, CountInOut); + +/* + * Setup a clock alarm. + * Available to all. + */ +routine clock_alarm( + clock_serv : clock_serv_t; + alarm_type : alarm_type_t; + alarm_time : mach_timespec_t; + alarm_port : clock_reply_t = + MACH_MSG_TYPE_MAKE_SEND_ONCE|polymorphic); + +/* vim: set ft=c : */ diff --git a/i386/include/mach/clock.h b/i386/include/mach/clock.h new file mode 100644 index 0000000..948b489 --- /dev/null +++ b/i386/include/mach/clock.h @@ -0,0 +1,221 @@ +#ifndef _clock_user_ +#define _clock_user_ + +/* Module clock */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef clock_MSG_COUNT +#define clock_MSG_COUNT 3 +#endif /* clock_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mach_types.h> +#include <mach/mach_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine clock_get_time */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t clock_get_time +( + clock_serv_t clock_serv, + mach_timespec_t *cur_time +); + +/* Routine clock_get_attributes */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t clock_get_attributes +( + clock_serv_t clock_serv, + clock_flavor_t flavor, + clock_attr_t clock_attr, + mach_msg_type_number_t *clock_attrCnt +); + +/* Routine clock_alarm */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t clock_alarm +( + clock_serv_t clock_serv, + alarm_type_t alarm_type, + mach_timespec_t alarm_time, + clock_reply_t alarm_port +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__clock_subsystem__defined +#define __Request__clock_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__clock_get_time_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + clock_flavor_t flavor; + mach_msg_type_number_t clock_attrCnt; + } __Request__clock_get_attributes_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t alarm_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + alarm_type_t alarm_type; + mach_timespec_t alarm_time; + } __Request__clock_alarm_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__clock_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__clock_subsystem__defined +#define __RequestUnion__clock_subsystem__defined +union __RequestUnion__clock_subsystem { + __Request__clock_get_time_t Request_clock_get_time; + __Request__clock_get_attributes_t Request_clock_get_attributes; + __Request__clock_alarm_t Request_clock_alarm; +}; +#endif /* !__RequestUnion__clock_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__clock_subsystem__defined +#define __Reply__clock_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_timespec_t cur_time; + } __Reply__clock_get_time_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t clock_attrCnt; + int clock_attr[1]; + } __Reply__clock_get_attributes_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__clock_alarm_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__clock_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__clock_subsystem__defined +#define __ReplyUnion__clock_subsystem__defined +union __ReplyUnion__clock_subsystem { + __Reply__clock_get_time_t Reply_clock_get_time; + __Reply__clock_get_attributes_t Reply_clock_get_attributes; + __Reply__clock_alarm_t Reply_clock_alarm; +}; +#endif /* !__RequestUnion__clock_subsystem__defined */ + +#ifndef subsystem_to_name_map_clock +#define subsystem_to_name_map_clock \ + { "clock_get_time", 1000 },\ + { "clock_get_attributes", 1001 },\ + { "clock_alarm", 1002 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _clock_user_ */ diff --git a/i386/include/mach/clock_priv.defs b/i386/include/mach/clock_priv.defs new file mode 100644 index 0000000..b3854a4 --- /dev/null +++ b/i386/include/mach/clock_priv.defs @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * File: mach/clock_priv.defs + * Purpose: Kernel clock subsystem definitions. This + * file defines the clock request interface. + */ + +subsystem +#if KERNEL_SERVER + KernelServer +#endif /* KERNEL_SERVER */ + clock_priv 1200; + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> +#include <mach/clock_types.defs> + +/* + * References to clock_priv objects are returned by: + * host_get_clock_control(host_priv_t,...) - Priviledged subclass + */ + +/* + * Set the clock time. + * Privileged. + */ +routine clock_set_time( + clock_ctrl : clock_ctrl_t; + new_time : mach_timespec_t); + +/* + * Set clock attributes. + * Privileged. + */ +routine clock_set_attributes( + clock_ctrl : clock_ctrl_t; + in flavor : clock_flavor_t; + in clock_attr : clock_attr_t); + +/* vim: set ft=c : */ diff --git a/i386/include/mach/clock_priv.h b/i386/include/mach/clock_priv.h new file mode 100644 index 0000000..8a38935 --- /dev/null +++ b/i386/include/mach/clock_priv.h @@ -0,0 +1,175 @@ +#ifndef _clock_priv_user_ +#define _clock_priv_user_ + +/* Module clock_priv */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef clock_priv_MSG_COUNT +#define clock_priv_MSG_COUNT 2 +#endif /* clock_priv_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mach_types.h> +#include <mach/mach_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine clock_set_time */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t clock_set_time +( + clock_ctrl_t clock_ctrl, + mach_timespec_t new_time +); + +/* Routine clock_set_attributes */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t clock_set_attributes +( + clock_ctrl_t clock_ctrl, + clock_flavor_t flavor, + clock_attr_t clock_attr, + mach_msg_type_number_t clock_attrCnt +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__clock_priv_subsystem__defined +#define __Request__clock_priv_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_timespec_t new_time; + } __Request__clock_set_time_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + clock_flavor_t flavor; + mach_msg_type_number_t clock_attrCnt; + int clock_attr[1]; + } __Request__clock_set_attributes_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__clock_priv_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__clock_priv_subsystem__defined +#define __RequestUnion__clock_priv_subsystem__defined +union __RequestUnion__clock_priv_subsystem { + __Request__clock_set_time_t Request_clock_set_time; + __Request__clock_set_attributes_t Request_clock_set_attributes; +}; +#endif /* !__RequestUnion__clock_priv_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__clock_priv_subsystem__defined +#define __Reply__clock_priv_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__clock_set_time_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__clock_set_attributes_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__clock_priv_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__clock_priv_subsystem__defined +#define __ReplyUnion__clock_priv_subsystem__defined +union __ReplyUnion__clock_priv_subsystem { + __Reply__clock_set_time_t Reply_clock_set_time; + __Reply__clock_set_attributes_t Reply_clock_set_attributes; +}; +#endif /* !__RequestUnion__clock_priv_subsystem__defined */ + +#ifndef subsystem_to_name_map_clock_priv +#define subsystem_to_name_map_clock_priv \ + { "clock_set_time", 1200 },\ + { "clock_set_attributes", 1201 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _clock_priv_user_ */ diff --git a/i386/include/mach/clock_reply.defs b/i386/include/mach/clock_reply.defs new file mode 100644 index 0000000..9646f90 --- /dev/null +++ b/i386/include/mach/clock_reply.defs @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * File: clock_reply.defs + * Purpose: Kernel clock subsystem definitions. This + * file defines the clock reply interface. + */ + +subsystem +#if KERNEL_USER + KernelUser +#endif /* KERNEL_USER */ + clock_reply 3125107; /* Matches up with old value */ + +#include <mach/std_types.defs> +#include <mach/clock_types.defs> + + +/* + * Reply routine for clock_alarm. + */ +simpleroutine clock_alarm_reply( + alarm_port : clock_reply_t; + alarm_code : kern_return_t; + alarm_type : alarm_type_t; + alarm_time : mach_timespec_t); + +/* vim: set ft=c : */ diff --git a/i386/include/mach/clock_reply.h b/i386/include/mach/clock_reply.h new file mode 100644 index 0000000..d0cf150 --- /dev/null +++ b/i386/include/mach/clock_reply.h @@ -0,0 +1,136 @@ +#ifndef _clock_reply_user_ +#define _clock_reply_user_ + +/* Module clock_reply */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef clock_reply_MSG_COUNT +#define clock_reply_MSG_COUNT 1 +#endif /* clock_reply_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mach_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* SimpleRoutine clock_alarm_reply */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t clock_alarm_reply +( + clock_reply_t alarm_port, + mach_msg_type_name_t alarm_portPoly, + kern_return_t alarm_code, + alarm_type_t alarm_type, + mach_timespec_t alarm_time +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__clock_reply_subsystem__defined +#define __Request__clock_reply_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t alarm_code; + alarm_type_t alarm_type; + mach_timespec_t alarm_time; + } __Request__clock_alarm_reply_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__clock_reply_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__clock_reply_subsystem__defined +#define __RequestUnion__clock_reply_subsystem__defined +union __RequestUnion__clock_reply_subsystem { + __Request__clock_alarm_reply_t Request_clock_alarm_reply; +}; +#endif /* !__RequestUnion__clock_reply_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__clock_reply_subsystem__defined +#define __Reply__clock_reply_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__clock_alarm_reply_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__clock_reply_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__clock_reply_subsystem__defined +#define __ReplyUnion__clock_reply_subsystem__defined +union __ReplyUnion__clock_reply_subsystem { + __Reply__clock_alarm_reply_t Reply_clock_alarm_reply; +}; +#endif /* !__RequestUnion__clock_reply_subsystem__defined */ + +#ifndef subsystem_to_name_map_clock_reply +#define subsystem_to_name_map_clock_reply \ + { "clock_alarm_reply", 3125107 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _clock_reply_user_ */ diff --git a/i386/include/mach/clock_types.defs b/i386/include/mach/clock_types.defs new file mode 100644 index 0000000..4dbacfc --- /dev/null +++ b/i386/include/mach/clock_types.defs @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * File: clock_types.defs + * Purpose: + * Clock kernel interface type declarations + */ + +#ifndef _MACH_CLOCK_TYPES_DEFS_ +#define _MACH_CLOCK_TYPES_DEFS_ + +#include <mach/std_types.defs> + +type clock_serv_t = mach_port_t + cusertype: clock_serv_t +#if KERNEL_SERVER + intran: clock_serv_t convert_port_to_clock(mach_port_t) + outtran: mach_port_t convert_clock_to_port(clock_serv_t) +#endif /* KERNEL_SERVER */ + ; + +type clock_ctrl_t = mach_port_t + cusertype: clock_ctrl_t +#if KERNEL_SERVER + intran: clock_ctrl_t convert_port_to_clock_ctrl(mach_port_t) + outtran: mach_port_t convert_clock_ctrl_to_port(clock_ctrl_t) +#endif /* KERNEL_SERVER */ + ; + +type clock_reply_t = polymorphic|MACH_MSG_TYPE_MAKE_SEND_ONCE; + +type clock_flavor_t = int; +type clock_attr_t = array[*:1] of int; +type mach_timespec_t = struct[2] of int; +type time_t = int; +type sleep_type_t = int; +type alarm_type_t = int; +type clock_res_t = int; +type clock_id_t = int; + +import <mach/mach_types.h>; + +#endif /* _MACH_CLOCK_TYPES_DEFS_ */ + +/* vim: set ft=c : */ diff --git a/i386/include/mach/clock_types.h b/i386/include/mach/clock_types.h new file mode 100644 index 0000000..12035da --- /dev/null +++ b/i386/include/mach/clock_types.h @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * File: clock_types.h + * Purpose: Clock facility header definitions. These + * definitons are needed by both kernel and + * user-level software. + */ + +/* + * All interfaces defined here are obsolete. + */ + +#ifndef _MACH_CLOCK_TYPES_H_ +#define _MACH_CLOCK_TYPES_H_ + +#include <stdint.h> +#include <mach/time_value.h> + +/* + * Type definitions. + */ +typedef int alarm_type_t; /* alarm time type */ +typedef int sleep_type_t; /* sleep time type */ +typedef int clock_id_t; /* clock identification type */ +typedef int clock_flavor_t; /* clock flavor type */ +typedef int *clock_attr_t; /* clock attribute type */ +typedef int clock_res_t; /* clock resolution type */ + +/* + * Normal time specification used by the kernel clock facility. + */ +struct mach_timespec { + unsigned int tv_sec; /* seconds */ + clock_res_t tv_nsec; /* nanoseconds */ +}; +typedef struct mach_timespec mach_timespec_t; + +/* + * Reserved clock id values for default clocks. + */ +#define SYSTEM_CLOCK 0 +#define CALENDAR_CLOCK 1 + +#define REALTIME_CLOCK 0 + +/* + * Attribute names. + */ +#define CLOCK_GET_TIME_RES 1 /* get_time call resolution */ +/* 2 * was map_time call resolution */ +#define CLOCK_ALARM_CURRES 3 /* current alarm resolution */ +#define CLOCK_ALARM_MINRES 4 /* minimum alarm resolution */ +#define CLOCK_ALARM_MAXRES 5 /* maximum alarm resolution */ + +#define NSEC_PER_USEC 1000 /* nanoseconds per microsecond */ +#define USEC_PER_SEC 1000000 /* microseconds per second */ +#define NSEC_PER_SEC 1000000000 /* nanoseconds per second */ + +#define BAD_MACH_TIMESPEC(t) \ + ((t)->tv_nsec < 0 || (t)->tv_nsec >= NSEC_PER_SEC) + +/* t1 <=> t2, also (t1 - t2) in nsec with max of +- 1 sec */ +#define CMP_MACH_TIMESPEC(t1, t2) \ + ((t1)->tv_sec > (t2)->tv_sec ? +NSEC_PER_SEC : \ + ((t1)->tv_sec < (t2)->tv_sec ? -NSEC_PER_SEC : \ + (t1)->tv_nsec - (t2)->tv_nsec)) + +/* t1 += t2 */ +#define ADD_MACH_TIMESPEC(t1, t2) \ + do { \ + if (((t1)->tv_nsec += (t2)->tv_nsec) >= NSEC_PER_SEC) { \ + (t1)->tv_nsec -= NSEC_PER_SEC; \ + (t1)->tv_sec += 1; \ + } \ + (t1)->tv_sec += (t2)->tv_sec; \ + } while (0) + +/* t1 -= t2 */ +#define SUB_MACH_TIMESPEC(t1, t2) \ + do { \ + if (((t1)->tv_nsec -= (t2)->tv_nsec) < 0) { \ + (t1)->tv_nsec += NSEC_PER_SEC; \ + (t1)->tv_sec -= 1; \ + } \ + (t1)->tv_sec -= (t2)->tv_sec; \ + } while (0) + +/* + * Alarm parameter defines. + */ +#define ALRMTYPE 0xff /* type (8-bit field) */ +#define TIME_ABSOLUTE 0x00 /* absolute time */ +#define TIME_RELATIVE 0x01 /* relative time */ + +#define BAD_ALRMTYPE(t) (((t) &~ TIME_RELATIVE) != 0) + +#endif /* _MACH_CLOCK_TYPES_H_ */ diff --git a/i386/include/mach/error.h b/i386/include/mach/error.h new file mode 100644 index 0000000..a32eaee --- /dev/null +++ b/i386/include/mach/error.h @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/error.h + * Purpose: + * error module definitions + * + */ + +#ifndef _MACH_ERROR_H_ +#define _MACH_ERROR_H_ + +#include <mach/kern_return.h> + +/* + * error number layout as follows: + * + * hi lo + * | system(6) | subsystem(12) | code(14) | + */ + + +#define err_none (mach_error_t)0 +#define ERR_SUCCESS (mach_error_t)0 +#define ERR_ROUTINE_NIL (mach_error_fn_t)0 + + +#define err_system(x) (((x)&0x3f)<<26) +#define err_sub(x) (((x)&0xfff)<<14) + +#define err_get_system(err) (((err)>>26)&0x3f) +#define err_get_sub(err) (((err)>>14)&0xfff) +#define err_get_code(err) ((err)&0x3fff) + +#define system_emask (err_system(0x3f)) +#define sub_emask (err_sub(0xfff)) +#define code_emask (0x3fff) + + +/* major error systems */ +#define err_kern err_system(0x0) /* kernel */ +#define err_us err_system(0x1) /* user space library */ +#define err_server err_system(0x2) /* user space servers */ +#define err_ipc err_system(0x3) /* old ipc errors */ +#define err_mach_ipc err_system(0x4) /* mach-ipc errors */ +#define err_dipc err_system(0x7) /* distributed ipc */ +#define err_local err_system(0x3e) /* user defined errors */ +#define err_ipc_compat err_system(0x3f) /* (compatibility) mach-ipc errors */ + +#define err_max_system 0x3f + + +/* unix errors get lumped into one subsystem */ +#define unix_err(errno) (err_kern|err_sub(3)|errno) + +typedef kern_return_t mach_error_t; +typedef mach_error_t (* mach_error_fn_t)( void ); + +#endif /* _MACH_ERROR_H_ */ diff --git a/i386/include/mach/exc.defs b/i386/include/mach/exc.defs new file mode 100644 index 0000000..de6aee7 --- /dev/null +++ b/i386/include/mach/exc.defs @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * Abstract: + * MiG definitions file for Mach exception interface. + */ + +subsystem +#if KERNEL_USER + KernelUser +#endif + exc 2401; + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> + +ServerPrefix catch_; + +type exception_data_t = array[*:2] of integer_t; +type exception_type_t = int; + +routine exception_raise( +#if KERNEL_USER + exception_port : mach_port_move_send_t; + thread : mach_port_move_send_t; + task : mach_port_move_send_t; +#else /* KERNEL_USER */ + exception_port : mach_port_t; + thread : mach_port_t; + task : mach_port_t; +#endif /* KERNEL_USER */ + exception : exception_type_t; + code : exception_data_t + ); + +routine exception_raise_state( +#if KERNEL_USER + exception_port : mach_port_move_send_t; +#else /* KERNEL_USER */ + exception_port : mach_port_t; +#endif /* KERNEL_USER */ + exception : exception_type_t; + code : exception_data_t, const; + inout flavor : int; + old_state : thread_state_t, const; + out new_state : thread_state_t); + +routine exception_raise_state_identity( +#if KERNEL_USER + exception_port : mach_port_move_send_t; + thread : mach_port_move_send_t; + task : mach_port_move_send_t; +#else /* KERNEL_USER */ + exception_port : mach_port_t; + thread : mach_port_t; + task : mach_port_t; +#endif /* KERNEL_USER */ + exception : exception_type_t; + code : exception_data_t; + inout flavor : int; + old_state : thread_state_t; + out new_state : thread_state_t); + +/* vim: set ft=c : */ diff --git a/i386/include/mach/exc.h b/i386/include/mach/exc.h new file mode 100644 index 0000000..3987a6e --- /dev/null +++ b/i386/include/mach/exc.h @@ -0,0 +1,257 @@ +#ifndef _exc_user_ +#define _exc_user_ + +/* Module exc */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef exc_MSG_COUNT +#define exc_MSG_COUNT 3 +#endif /* exc_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mach_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine exception_raise */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t exception_raise +( + mach_port_t exception_port, + mach_port_t thread, + mach_port_t task, + exception_type_t exception, + exception_data_t code, + mach_msg_type_number_t codeCnt +); + +/* Routine exception_raise_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t exception_raise_state +( + mach_port_t exception_port, + exception_type_t exception, + const exception_data_t code, + mach_msg_type_number_t codeCnt, + int *flavor, + const thread_state_t old_state, + mach_msg_type_number_t old_stateCnt, + thread_state_t new_state, + mach_msg_type_number_t *new_stateCnt +); + +/* Routine exception_raise_state_identity */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t exception_raise_state_identity +( + mach_port_t exception_port, + mach_port_t thread, + mach_port_t task, + exception_type_t exception, + exception_data_t code, + mach_msg_type_number_t codeCnt, + int *flavor, + thread_state_t old_state, + mach_msg_type_number_t old_stateCnt, + thread_state_t new_state, + mach_msg_type_number_t *new_stateCnt +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__exc_subsystem__defined +#define __Request__exc_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t thread; + mach_msg_port_descriptor_t task; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + integer_t code[2]; + } __Request__exception_raise_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + integer_t code[2]; + int flavor; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[144]; + } __Request__exception_raise_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t thread; + mach_msg_port_descriptor_t task; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + integer_t code[2]; + int flavor; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[144]; + } __Request__exception_raise_state_identity_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__exc_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__exc_subsystem__defined +#define __RequestUnion__exc_subsystem__defined +union __RequestUnion__exc_subsystem { + __Request__exception_raise_t Request_exception_raise; + __Request__exception_raise_state_t Request_exception_raise_state; + __Request__exception_raise_state_identity_t Request_exception_raise_state_identity; +}; +#endif /* !__RequestUnion__exc_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__exc_subsystem__defined +#define __Reply__exc_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__exception_raise_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + int flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[144]; + } __Reply__exception_raise_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + int flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[144]; + } __Reply__exception_raise_state_identity_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__exc_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__exc_subsystem__defined +#define __ReplyUnion__exc_subsystem__defined +union __ReplyUnion__exc_subsystem { + __Reply__exception_raise_t Reply_exception_raise; + __Reply__exception_raise_state_t Reply_exception_raise_state; + __Reply__exception_raise_state_identity_t Reply_exception_raise_state_identity; +}; +#endif /* !__RequestUnion__exc_subsystem__defined */ + +#ifndef subsystem_to_name_map_exc +#define subsystem_to_name_map_exc \ + { "exception_raise", 2401 },\ + { "exception_raise_state", 2402 },\ + { "exception_raise_state_identity", 2403 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _exc_user_ */ diff --git a/i386/include/mach/exception.h b/i386/include/mach/exception.h new file mode 100644 index 0000000..e7d5d23 --- /dev/null +++ b/i386/include/mach/exception.h @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ + +#ifndef _MACH_EXCEPTION_H_ +#define _MACH_EXCEPTION_H_ + +#include <mach/exception_types.h> + +#endif /* _MACH_EXCEPTION_H_ */ diff --git a/i386/include/mach/exception_types.h b/i386/include/mach/exception_types.h new file mode 100644 index 0000000..642cbe2 --- /dev/null +++ b/i386/include/mach/exception_types.h @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ + +#ifndef _MACH_EXCEPTION_TYPES_H_ +#define _MACH_EXCEPTION_TYPES_H_ + +#include <mach/machine/exception.h> + +/* + * Machine-independent exception definitions. + */ + +#define EXC_BAD_ACCESS 1 /* Could not access memory */ + /* Code contains kern_return_t describing error. */ + /* Subcode contains bad memory address. */ + +#define EXC_BAD_INSTRUCTION 2 /* Instruction failed */ + /* Illegal or undefined instruction or operand */ + +#define EXC_ARITHMETIC 3 /* Arithmetic exception */ + /* Exact nature of exception is in code field */ + +#define EXC_EMULATION 4 /* Emulation instruction */ + /* Emulation support instruction encountered */ + /* Details in code and subcode fields */ + +#define EXC_SOFTWARE 5 /* Software generated exception */ + /* Exact exception is in code field. */ + /* Codes 0 - 0xFFFF reserved to hardware */ + /* Codes 0x10000 - 0x1FFFF reserved for OS emulation (Unix) */ + +#define EXC_BREAKPOINT 6 /* Trace, breakpoint, etc. */ + /* Details in code field. */ + +#define EXC_SYSCALL 7 /* System calls. */ + +#define EXC_MACH_SYSCALL 8 /* Mach system calls. */ + +#define EXC_RPC_ALERT 9 /* RPC alert */ + +#define EXC_CRASH 10 /* Abnormal process exit */ + +/* + * Machine-independent exception behaviors + */ + +# define EXCEPTION_DEFAULT 1 +/* Send a catch_exception_raise message including the identity. + */ + +# define EXCEPTION_STATE 2 +/* Send a catch_exception_raise_state message including the + * thread state. + */ + +# define EXCEPTION_STATE_IDENTITY 3 +/* Send a catch_exception_raise_state_identity message including + * the thread identity and state. + */ + +#define MACH_EXCEPTION_CODES 0x80000000 +/* Send 64-bit code and subcode in the exception header */ + +/* + * Masks for exception definitions, above + * bit zero is unused, therefore 1 word = 31 exception types + */ + +#define EXC_MASK_BAD_ACCESS (1 << EXC_BAD_ACCESS) +#define EXC_MASK_BAD_INSTRUCTION (1 << EXC_BAD_INSTRUCTION) +#define EXC_MASK_ARITHMETIC (1 << EXC_ARITHMETIC) +#define EXC_MASK_EMULATION (1 << EXC_EMULATION) +#define EXC_MASK_SOFTWARE (1 << EXC_SOFTWARE) +#define EXC_MASK_BREAKPOINT (1 << EXC_BREAKPOINT) +#define EXC_MASK_SYSCALL (1 << EXC_SYSCALL) +#define EXC_MASK_MACH_SYSCALL (1 << EXC_MACH_SYSCALL) +#define EXC_MASK_RPC_ALERT (1 << EXC_RPC_ALERT) +#define EXC_MASK_CRASH (1 << EXC_CRASH) + +#define EXC_MASK_ALL (EXC_MASK_BAD_ACCESS | \ + EXC_MASK_BAD_INSTRUCTION | \ + EXC_MASK_ARITHMETIC | \ + EXC_MASK_EMULATION | \ + EXC_MASK_SOFTWARE | \ + EXC_MASK_BREAKPOINT | \ + EXC_MASK_SYSCALL | \ + EXC_MASK_MACH_SYSCALL | \ + EXC_MASK_RPC_ALERT | \ + EXC_MASK_MACHINE) + + +#define FIRST_EXCEPTION 1 /* ZERO is illegal */ + +/* + * Machine independent codes for EXC_SOFTWARE + * Codes 0x10000 - 0x1FFFF reserved for OS emulation (Unix) + * 0x10000 - 0x10002 in use for unix signals + */ +#define EXC_SOFT_SIGNAL 0x10003 /* Unix signal exceptions */ + +#ifndef ASSEMBLER + +#include <mach/port.h> +#include <mach/thread_status.h> +#include <mach/machine/vm_types.h> +/* + * Exported types + */ + +typedef int exception_type_t; +typedef integer_t exception_data_type_t; +typedef int64_t mach_exception_data_type_t; +typedef int exception_behavior_t; +typedef exception_data_type_t *exception_data_t; +typedef mach_exception_data_type_t *mach_exception_data_t; +typedef unsigned int exception_mask_t; +typedef exception_mask_t *exception_mask_array_t; +typedef exception_behavior_t *exception_behavior_array_t; +typedef thread_state_flavor_t *exception_flavor_array_t; +typedef mach_port_t *exception_port_array_t; +typedef mach_exception_data_type_t mach_exception_code_t; +typedef mach_exception_data_type_t mach_exception_subcode_t; + +#endif /* ASSEMBLER */ + +#endif /* _MACH_EXCEPTION_TYPES_H_ */ diff --git a/i386/include/mach/host_info.h b/i386/include/mach/host_info.h new file mode 100644 index 0000000..bc8f803 --- /dev/null +++ b/i386/include/mach/host_info.h @@ -0,0 +1,218 @@ +/* + * Copyright (c) 2000-2009 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ + +/* + * File: mach/host_info.h + * + * Definitions for host_info call. + */ + +#ifndef _MACH_HOST_INFO_H_ +#define _MACH_HOST_INFO_H_ + +#include <mach/message.h> +#include <mach/vm_statistics.h> +#include <mach/machine.h> +#include <mach/machine/vm_types.h> +#include <mach/time_value.h> + +#include <sys/cdefs.h> + +/* + * Generic information structure to allow for expansion. + */ +typedef integer_t *host_info_t; /* varying array of int. */ +typedef integer_t *host_info64_t; /* varying array of int. */ + +#define HOST_INFO_MAX (1024) /* max array size */ +typedef integer_t host_info_data_t[HOST_INFO_MAX]; + +#define KERNEL_VERSION_MAX (512) +typedef char kernel_version_t[KERNEL_VERSION_MAX]; + +#define KERNEL_BOOT_INFO_MAX (4096) +typedef char kernel_boot_info_t[KERNEL_BOOT_INFO_MAX]; + +/* + * Currently defined information. + */ +/* host_info() */ +typedef integer_t host_flavor_t; +#define HOST_BASIC_INFO 1 /* basic info */ +#define HOST_SCHED_INFO 3 /* scheduling info */ +#define HOST_RESOURCE_SIZES 4 /* kernel struct sizes */ +#define HOST_PRIORITY_INFO 5 /* priority information */ +#define HOST_SEMAPHORE_TRAPS 7 /* Has semaphore traps */ +#define HOST_MACH_MSG_TRAP 8 /* Has mach_msg_trap */ + + +#pragma pack(4) + +struct host_basic_info { + integer_t max_cpus; /* max number of CPUs possible */ + integer_t avail_cpus; /* number of CPUs now available */ + natural_t memory_size; /* size of memory in bytes, capped at 2 GB */ + cpu_type_t cpu_type; /* cpu type */ + cpu_subtype_t cpu_subtype; /* cpu subtype */ + cpu_threadtype_t cpu_threadtype; /* cpu threadtype */ + integer_t physical_cpu; /* number of physical CPUs now available */ + integer_t physical_cpu_max; /* max number of physical CPUs possible */ + integer_t logical_cpu; /* number of logical cpu now available */ + integer_t logical_cpu_max; /* max number of physical CPUs possible */ + uint64_t max_mem; /* actual size of physical memory */ +}; + +#pragma pack() + +typedef struct host_basic_info host_basic_info_data_t; +typedef struct host_basic_info *host_basic_info_t; +#define HOST_BASIC_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(host_basic_info_data_t)/sizeof(integer_t))) + +struct host_sched_info { + integer_t min_timeout; /* minimum timeout in milliseconds */ + integer_t min_quantum; /* minimum quantum in milliseconds */ +}; + +typedef struct host_sched_info host_sched_info_data_t; +typedef struct host_sched_info *host_sched_info_t; +#define HOST_SCHED_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(host_sched_info_data_t)/sizeof(integer_t))) + +struct kernel_resource_sizes { + natural_t task; + natural_t thread; + natural_t port; + natural_t memory_region; + natural_t memory_object; +}; + +typedef struct kernel_resource_sizes kernel_resource_sizes_data_t; +typedef struct kernel_resource_sizes *kernel_resource_sizes_t; +#define HOST_RESOURCE_SIZES_COUNT ((mach_msg_type_number_t) \ + (sizeof(kernel_resource_sizes_data_t)/sizeof(integer_t))) + +struct host_priority_info { + integer_t kernel_priority; + integer_t system_priority; + integer_t server_priority; + integer_t user_priority; + integer_t depress_priority; + integer_t idle_priority; + integer_t minimum_priority; + integer_t maximum_priority; +}; + +typedef struct host_priority_info host_priority_info_data_t; +typedef struct host_priority_info *host_priority_info_t; +#define HOST_PRIORITY_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(host_priority_info_data_t)/sizeof(integer_t))) + +/* host_statistics() */ +#define HOST_LOAD_INFO 1 /* System loading stats */ +#define HOST_VM_INFO 2 /* Virtual memory stats */ +#define HOST_CPU_LOAD_INFO 3 /* CPU load stats */ + +/* host_statistics64() */ +#define HOST_VM_INFO64 4 /* 64-bit virtual memory stats */ + + +struct host_load_info { + integer_t avenrun[3]; /* scaled by LOAD_SCALE */ + integer_t mach_factor[3]; /* scaled by LOAD_SCALE */ +}; + +typedef struct host_load_info host_load_info_data_t; +typedef struct host_load_info *host_load_info_t; +#define HOST_LOAD_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(host_load_info_data_t)/sizeof(integer_t))) + +/* in <mach/vm_statistics.h> */ +/* vm_statistics64 */ +#define HOST_VM_INFO64_COUNT ((mach_msg_type_number_t) \ + (sizeof(vm_statistics64_data_t)/sizeof(integer_t))) + +/* size of the latest version of the structure */ +#define HOST_VM_INFO64_LATEST_COUNT HOST_VM_INFO64_COUNT + + +/* vm_statistics */ +#define HOST_VM_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(vm_statistics_data_t)/sizeof(integer_t))) + +/* size of the latest version of the structure */ +#define HOST_VM_INFO_LATEST_COUNT HOST_VM_INFO_COUNT +#define HOST_VM_INFO_REV2_COUNT HOST_VM_INFO_LATEST_COUNT +/* previous versions: adjust the size according to what was added each time */ +#define HOST_VM_INFO_REV1_COUNT /* added "speculative_count" (1 int) */ \ + ((mach_msg_type_number_t) \ + (HOST_VM_INFO_REV2_COUNT - 1)) +#define HOST_VM_INFO_REV0_COUNT /* added "purgable" info (2 ints) */ \ + ((mach_msg_type_number_t) \ + (HOST_VM_INFO_REV1_COUNT - 2)) + +struct host_cpu_load_info { /* number of ticks while running... */ + natural_t cpu_ticks[CPU_STATE_MAX]; /* ... in the given mode */ +}; + +typedef struct host_cpu_load_info host_cpu_load_info_data_t; +typedef struct host_cpu_load_info *host_cpu_load_info_t; +#define HOST_CPU_LOAD_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof (host_cpu_load_info_data_t) / sizeof (integer_t))) + +#endif /* _MACH_HOST_INFO_H_ */ diff --git a/i386/include/mach/host_notify.h b/i386/include/mach/host_notify.h new file mode 100644 index 0000000..6c0ca74 --- /dev/null +++ b/i386/include/mach/host_notify.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_HOST_NOTIFY_H_ +#define _MACH_HOST_NOTIFY_H_ + +#define HOST_NOTIFY_CALENDAR_CHANGE 0 +#define HOST_NOTIFY_TYPE_MAX 0 + +#define HOST_CALENDAR_CHANGED_REPLYID 950 + +#endif /* _MACH_HOST_NOTIFY_H_ */ diff --git a/i386/include/mach/host_notify_reply.defs b/i386/include/mach/host_notify_reply.defs new file mode 100644 index 0000000..85437f8 --- /dev/null +++ b/i386/include/mach/host_notify_reply.defs @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +subsystem +#if KERNEL_USER + KernelUser +#endif /* KERN_USER */ + host_notify_reply 950; + +#include <mach/std_types.defs> + +simpleroutine host_calendar_changed( + notify_port : mach_port_move_send_once_t); + +/* vim: set ft=c : */ diff --git a/i386/include/mach/host_priv.defs b/i386/include/mach/host_priv.defs new file mode 100644 index 0000000..3be3986 --- /dev/null +++ b/i386/include/mach/host_priv.defs @@ -0,0 +1,380 @@ +/* + * Copyright (c) 2000-2004 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ + +/* + * Matchmaker definitions file for Mach kernel interface. + */ +subsystem +#if KERNEL_USER + KernelUser +#endif /* KERNEL_USER */ +#if KERNEL_SERVER + KernelServer +#endif /* KERNEL_SERVER */ + host_priv 400; + +#ifdef KERNEL_USER +userprefix r_; +#endif /* KERNEL_USER */ + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> +#include <mach/clock_types.defs> +#include <mach_debug/mach_debug_types.defs> + +/* + * Get boot configuration information from kernel. + */ +routine host_get_boot_info( + host_priv : host_priv_t; + out boot_info : kernel_boot_info_t); + +/* + * Reboot this host. + * Only available to privileged users. + */ +routine host_reboot( + host_priv : host_priv_t; + options : int); + + +/* + * Return privileged statistics from this host. + */ +routine host_priv_statistics( + host_priv : host_priv_t; + flavor : host_flavor_t; + out host_info_out : host_info_t, CountInOut); + +/* + * Sets the default memory manager, the port to which + * newly-created temporary memory objects are delivered. + * [See (memory_object_default)memory_object_create.] + * Also sets the default cluster size used for pagein/pageout + * to this port. + * The old memory manager port is returned. + */ +routine host_default_memory_manager( + host_priv : host_priv_t; + inout default_manager : memory_object_default_t = + MACH_MSG_TYPE_MAKE_SEND; + cluster_size : memory_object_cluster_size_t); + + +/* + * Specify that the range of the virtual address space + * of the target task must not cause page faults for + * the indicated accesses. + * + * [ To unwire the pages, specify VM_PROT_NONE. ] + */ +routine vm_wire( + host_priv : host_priv_t; + task : vm_map_t; + address : vm_address_t; + size : vm_size_t; + desired_access : vm_prot_t); + +/* + * Specify that the target thread must always be able + * to run and to allocate memory. + */ +routine thread_wire( + host_priv : host_priv_t; + thread : thread_act_t; + wired : boolean_t); + +/* + * Allocate zero-filled, wired, contiguous physical memory + * in the address space of the target task, either at the + * specified address, or wherever space can be found (if + * anywhere is TRUE), of the specified size. The address + * at which the allocation actually took place is returned. + * All pages will be entered into the task's pmap immediately, + * with VM_PROT_ALL. + * + * In addition to all the failure modes of its cousin, + * vm_allocate, this call may also fail if insufficient + * contiguous memory exists to satisfy the request. + * + * Memory obtained from this call should be freed the + * normal way, via vm_deallocate. + * + * N.B. This is an EXPERIMENTAL interface! + */ +routine vm_allocate_cpm( + host_priv : host_priv_t; + task : vm_map_t; + inout address : vm_address_t; + size : vm_size_t; + flags : int); + +/* + * Get list of processors on this host. + */ +routine host_processors( + host_priv : host_priv_t; + out out_processor_list : processor_array_t); + + +/* + * Get control port for a system-wide clock. + * Privileged. + */ +routine host_get_clock_control( + host_priv : host_priv_t; + clock_id : clock_id_t; + out clock_ctrl : clock_ctrl_t); + + +/* + * kernel module interface (obsolete as of SnowLeopard) + * see mach/kmod.h + */ +/* kmod_ MIG calls now return KERN_NOT_SUPPORTED on PPC/i386/x86_64. */ +routine kmod_create( + host_priv : host_priv_t; + info : vm_address_t; + out module : kmod_t); + +routine kmod_destroy( + host_priv : host_priv_t; + module : kmod_t); + +routine kmod_control( + host_priv : host_priv_t; + module : kmod_t; + flavor : kmod_control_flavor_t; + inout data : kmod_args_t); + +/* + * Get a given special port for a given node. + * Special ports are defined in host_special_ports.h; + * examples include the master device port. + * There are a limited number of slots available for system servers. + */ +routine host_get_special_port( + host_priv : host_priv_t; + node : int; + which : int; + out port : mach_port_t); + +/* + * Set a given special port for the local node. + * See host_get_special_port. + */ +routine host_set_special_port( + host_priv : host_priv_t; + which : int; + port : mach_port_t); + +/* + * Set an exception handler for a host on one or more exception types. + * These handlers are invoked for all threads on the host if there are + * no task or thread-specific exception handlers or those handlers returned + * an error. + */ +routine host_set_exception_ports( + host_priv : host_priv_t; + exception_mask : exception_mask_t; + new_port : mach_port_t; + behavior : exception_behavior_t; + new_flavor : thread_state_flavor_t); + + +/* + * Lookup some of the old exception handlers for a host + */ +routine host_get_exception_ports( + host_priv : host_priv_t; + exception_mask : exception_mask_t; + out masks : exception_mask_array_t; + out old_handlers : exception_handler_array_t, SameCount; + out old_behaviors : exception_behavior_array_t, SameCount; + out old_flavors : exception_flavor_array_t, SameCount); + + +/* + * Set an exception handler for a host on one or more exception types. + * At the same time, return the previously defined exception handlers for + * those types. + */ +routine host_swap_exception_ports( + host_priv : host_priv_t; + exception_mask : exception_mask_t; + new_port : mach_port_t; + behavior : exception_behavior_t; + new_flavor : thread_state_flavor_t; + out masks : exception_mask_array_t; + out old_handlerss : exception_handler_array_t, SameCount; + out old_behaviors : exception_behavior_array_t, SameCount; + out old_flavors : exception_flavor_array_t, SameCount); + +/* + * Loads a symbol table for an external file into the kernel debugger. + * The symbol table data is an array of characters. It is assumed that + * the caller and the kernel debugger agree on its format. + * This call is only supported in MACH_DEBUG and MACH_KDB kernels, + * otherwise KERN_FAILURE is returned. + */ +routine host_load_symbol_table( + host : host_priv_t; + task : task_t; + name : symtab_name_t; + symtab : pointer_t); + +/* + * Specify that the range of the virtual address space + * of the target task must not cause page faults for + * the indicated accesses. + * + * [ To unwire the pages, specify VM_PROT_NONE. ] + */ +routine mach_vm_wire( + host_priv : host_priv_t; + task : vm_map_t; + address : mach_vm_address_t; + size : mach_vm_size_t; + desired_access : vm_prot_t); + +/* + * JMM - Keep all processor_set related items at the end for easy + * removal. + */ +/* + * List all processor sets on host. + */ +routine host_processor_sets( + host_priv : host_priv_t; + out processor_sets : processor_set_name_array_t); + +/* + * Get control port for a processor set. + */ +routine host_processor_set_priv( + host_priv : host_priv_t; + set_name : processor_set_name_t; + out set : processor_set_t); + +/************************** Warning *************************************/ +/* The following routines are going away in a future release */ +/* use the appropriate variant of host_set_special_port instead */ +/************************************************************************/ + +/* + * Set the dynamic_pager control port. Other entities + * can request a send right to this port to talk with + * the dynamic_pager utility, setting behavioral parameters + * within the dynamic pager and getting low/high backing store + * resource notifications. + */ +routine set_dp_control_port( + host : host_priv_t; + in control_port : mach_port_t); + +/* + * Get the dynamic_pager control port. This port + * allows the holder to talk directly with the dynamic + * pager utility. + */ +routine get_dp_control_port( + host : host_priv_t; + out contorl_port :mach_port_t); + +/* + * Set the UserNotification daemon access port for this host. + * If this value is already set, the kernel will discard its + * reference to the previously registered port. + */ +routine host_set_UNDServer( + host : host_priv_t; + in server : UNDServerRef); + +/* + * Get the UserNotification daemon access port for this host. + * This can then be used to communicate with that daemon, which + * in turn communicates with the User through whatever means + * available (pop-up-menus for GUI systems, text for non-GUI, etc..). + * + * Access to this port is restricted to privileged clients because + * it is a special purpose port intended for kernel clients. User + * level clients should go directly to the CFUserNotifcation services. + */ +routine host_get_UNDServer( + host : host_priv_t; + out server : UNDServerRef); + +/* + * Perform an operation with a kernel extension, on the kext loading system, + * or request information about loaded kexts or the state of the kext loading + * system. + * Active operations (load, unload, disable/enable) require host_priv/root access. + * Info retrieval does not. + * + * WARNING: THIS ROUTINE IS PRIVATE TO THE KEXT-MANAGEMENT STACK AND IS + * SUBJECT TO CHANGE AT ANY TIME. + */ +routine kext_request( + host_priv : host_priv_t; + in user_log_flags : uint32_t; + in request_data : pointer_t; + out response_data : pointer_t; + out log_data : pointer_t; + out op_result : kern_return_t); + +/* vim: set ft=c : */ diff --git a/i386/include/mach/host_priv.h b/i386/include/mach/host_priv.h new file mode 100644 index 0000000..7a9df1f --- /dev/null +++ b/i386/include/mach/host_priv.h @@ -0,0 +1,1269 @@ +#ifndef _host_priv_user_ +#define _host_priv_user_ + +/* Module host_priv */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef host_priv_MSG_COUNT +#define host_priv_MSG_COUNT 26 +#endif /* host_priv_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mach_types.h> +#include <mach/mach_types.h> +#include <mach_debug/mach_debug_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine host_get_boot_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_get_boot_info +( + host_priv_t host_priv, + kernel_boot_info_t boot_info +); + +/* Routine host_reboot */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_reboot +( + host_priv_t host_priv, + int options +); + +/* Routine host_priv_statistics */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_priv_statistics +( + host_priv_t host_priv, + host_flavor_t flavor, + host_info_t host_info_out, + mach_msg_type_number_t *host_info_outCnt +); + +/* Routine host_default_memory_manager */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_default_memory_manager +( + host_priv_t host_priv, + memory_object_default_t *default_manager, + memory_object_cluster_size_t cluster_size +); + +/* Routine vm_wire */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_wire +( + host_priv_t host_priv, + vm_map_t task, + vm_address_t address, + vm_size_t size, + vm_prot_t desired_access +); + +/* Routine thread_wire */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_wire +( + host_priv_t host_priv, + thread_act_t thread, + boolean_t wired +); + +/* Routine vm_allocate_cpm */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_allocate_cpm +( + host_priv_t host_priv, + vm_map_t task, + vm_address_t *address, + vm_size_t size, + int flags +); + +/* Routine host_processors */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_processors +( + host_priv_t host_priv, + processor_array_t *out_processor_list, + mach_msg_type_number_t *out_processor_listCnt +); + +/* Routine host_get_clock_control */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_get_clock_control +( + host_priv_t host_priv, + clock_id_t clock_id, + clock_ctrl_t *clock_ctrl +); + +/* Routine kmod_create */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t kmod_create +( + host_priv_t host_priv, + vm_address_t info, + kmod_t *module +); + +/* Routine kmod_destroy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t kmod_destroy +( + host_priv_t host_priv, + kmod_t module +); + +/* Routine kmod_control */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t kmod_control +( + host_priv_t host_priv, + kmod_t module, + kmod_control_flavor_t flavor, + kmod_args_t *data, + mach_msg_type_number_t *dataCnt +); + +/* Routine host_get_special_port */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_get_special_port +( + host_priv_t host_priv, + int node, + int which, + mach_port_t *port +); + +/* Routine host_set_special_port */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_set_special_port +( + host_priv_t host_priv, + int which, + mach_port_t port +); + +/* Routine host_set_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_set_exception_ports +( + host_priv_t host_priv, + exception_mask_t exception_mask, + mach_port_t new_port, + exception_behavior_t behavior, + thread_state_flavor_t new_flavor +); + +/* Routine host_get_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_get_exception_ports +( + host_priv_t host_priv, + exception_mask_t exception_mask, + exception_mask_array_t masks, + mach_msg_type_number_t *masksCnt, + exception_handler_array_t old_handlers, + exception_behavior_array_t old_behaviors, + exception_flavor_array_t old_flavors +); + +/* Routine host_swap_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_swap_exception_ports +( + host_priv_t host_priv, + exception_mask_t exception_mask, + mach_port_t new_port, + exception_behavior_t behavior, + thread_state_flavor_t new_flavor, + exception_mask_array_t masks, + mach_msg_type_number_t *masksCnt, + exception_handler_array_t old_handlerss, + exception_behavior_array_t old_behaviors, + exception_flavor_array_t old_flavors +); + +/* Routine host_load_symbol_table */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_load_symbol_table +( + host_priv_t host, + task_t task, + symtab_name_t name, + vm_offset_t symtab, + mach_msg_type_number_t symtabCnt +); + +/* Routine mach_vm_wire */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_wire +( + host_priv_t host_priv, + vm_map_t task, + mach_vm_address_t address, + mach_vm_size_t size, + vm_prot_t desired_access +); + +/* Routine host_processor_sets */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_processor_sets +( + host_priv_t host_priv, + processor_set_name_array_t *processor_sets, + mach_msg_type_number_t *processor_setsCnt +); + +/* Routine host_processor_set_priv */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_processor_set_priv +( + host_priv_t host_priv, + processor_set_name_t set_name, + processor_set_t *set +); + +/* Routine set_dp_control_port */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t set_dp_control_port +( + host_priv_t host, + mach_port_t control_port +); + +/* Routine get_dp_control_port */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t get_dp_control_port +( + host_priv_t host, + mach_port_t *contorl_port +); + +/* Routine host_set_UNDServer */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_set_UNDServer +( + host_priv_t host, + UNDServerRef server +); + +/* Routine host_get_UNDServer */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_get_UNDServer +( + host_priv_t host, + UNDServerRef *server +); + +/* Routine kext_request */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t kext_request +( + host_priv_t host_priv, + uint32_t user_log_flags, + vm_offset_t request_data, + mach_msg_type_number_t request_dataCnt, + vm_offset_t *response_data, + mach_msg_type_number_t *response_dataCnt, + vm_offset_t *log_data, + mach_msg_type_number_t *log_dataCnt, + kern_return_t *op_result +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__host_priv_subsystem__defined +#define __Request__host_priv_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__host_get_boot_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int options; + } __Request__host_reboot_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + host_flavor_t flavor; + mach_msg_type_number_t host_info_outCnt; + } __Request__host_priv_statistics_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t default_manager; + /* end of the kernel processed data */ + NDR_record_t NDR; + memory_object_cluster_size_t cluster_size; + } __Request__host_default_memory_manager_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t task; + /* end of the kernel processed data */ + NDR_record_t NDR; + vm_address_t address; + vm_size_t size; + vm_prot_t desired_access; + } __Request__vm_wire_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t thread; + /* end of the kernel processed data */ + NDR_record_t NDR; + boolean_t wired; + } __Request__thread_wire_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t task; + /* end of the kernel processed data */ + NDR_record_t NDR; + vm_address_t address; + vm_size_t size; + int flags; + } __Request__vm_allocate_cpm_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__host_processors_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + clock_id_t clock_id; + } __Request__host_get_clock_control_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t info; + } __Request__kmod_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kmod_t module; + } __Request__kmod_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t data; + /* end of the kernel processed data */ + NDR_record_t NDR; + kmod_t module; + kmod_control_flavor_t flavor; + mach_msg_type_number_t dataCnt; + } __Request__kmod_control_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int node; + int which; + } __Request__host_get_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t port; + /* end of the kernel processed data */ + NDR_record_t NDR; + int which; + } __Request__host_set_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_mask_t exception_mask; + exception_behavior_t behavior; + thread_state_flavor_t new_flavor; + } __Request__host_set_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + exception_mask_t exception_mask; + } __Request__host_get_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_mask_t exception_mask; + exception_behavior_t behavior; + thread_state_flavor_t new_flavor; + } __Request__host_swap_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t task; + mach_msg_ool_descriptor_t symtab; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t nameOffset; /* MiG doesn't use it */ + mach_msg_type_number_t nameCnt; + char name[32]; + mach_msg_type_number_t symtabCnt; + } __Request__host_load_symbol_table_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t task; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_vm_address_t address; + mach_vm_size_t size; + vm_prot_t desired_access; + } __Request__mach_vm_wire_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__host_processor_sets_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t set_name; + /* end of the kernel processed data */ + } __Request__host_processor_set_priv_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t control_port; + /* end of the kernel processed data */ + } __Request__set_dp_control_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__get_dp_control_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t server; + /* end of the kernel processed data */ + } __Request__host_set_UNDServer_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__host_get_UNDServer_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t request_data; + /* end of the kernel processed data */ + NDR_record_t NDR; + uint32_t user_log_flags; + mach_msg_type_number_t request_dataCnt; + } __Request__kext_request_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__host_priv_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__host_priv_subsystem__defined +#define __RequestUnion__host_priv_subsystem__defined +union __RequestUnion__host_priv_subsystem { + __Request__host_get_boot_info_t Request_host_get_boot_info; + __Request__host_reboot_t Request_host_reboot; + __Request__host_priv_statistics_t Request_host_priv_statistics; + __Request__host_default_memory_manager_t Request_host_default_memory_manager; + __Request__vm_wire_t Request_vm_wire; + __Request__thread_wire_t Request_thread_wire; + __Request__vm_allocate_cpm_t Request_vm_allocate_cpm; + __Request__host_processors_t Request_host_processors; + __Request__host_get_clock_control_t Request_host_get_clock_control; + __Request__kmod_create_t Request_kmod_create; + __Request__kmod_destroy_t Request_kmod_destroy; + __Request__kmod_control_t Request_kmod_control; + __Request__host_get_special_port_t Request_host_get_special_port; + __Request__host_set_special_port_t Request_host_set_special_port; + __Request__host_set_exception_ports_t Request_host_set_exception_ports; + __Request__host_get_exception_ports_t Request_host_get_exception_ports; + __Request__host_swap_exception_ports_t Request_host_swap_exception_ports; + __Request__host_load_symbol_table_t Request_host_load_symbol_table; + __Request__mach_vm_wire_t Request_mach_vm_wire; + __Request__host_processor_sets_t Request_host_processor_sets; + __Request__host_processor_set_priv_t Request_host_processor_set_priv; + __Request__set_dp_control_port_t Request_set_dp_control_port; + __Request__get_dp_control_port_t Request_get_dp_control_port; + __Request__host_set_UNDServer_t Request_host_set_UNDServer; + __Request__host_get_UNDServer_t Request_host_get_UNDServer; + __Request__kext_request_t Request_kext_request; +}; +#endif /* !__RequestUnion__host_priv_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__host_priv_subsystem__defined +#define __Reply__host_priv_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t boot_infoOffset; /* MiG doesn't use it */ + mach_msg_type_number_t boot_infoCnt; + char boot_info[4096]; + } __Reply__host_get_boot_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__host_reboot_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t host_info_outCnt; + integer_t host_info_out[15]; + } __Reply__host_priv_statistics_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t default_manager; + /* end of the kernel processed data */ + } __Reply__host_default_memory_manager_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__vm_wire_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_wire_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + vm_address_t address; + } __Reply__vm_allocate_cpm_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_ports_descriptor_t out_processor_list; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t out_processor_listCnt; + } __Reply__host_processors_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t clock_ctrl; + /* end of the kernel processed data */ + } __Reply__host_get_clock_control_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + kmod_t module; + } __Reply__kmod_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__kmod_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t data; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t dataCnt; + } __Reply__kmod_control_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t port; + /* end of the kernel processed data */ + } __Reply__host_get_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__host_set_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__host_set_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t old_handlers[32]; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t masksCnt; + exception_mask_t masks[32]; + exception_behavior_t old_behaviors[32]; + thread_state_flavor_t old_flavors[32]; + } __Reply__host_get_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t old_handlerss[32]; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t masksCnt; + exception_mask_t masks[32]; + exception_behavior_t old_behaviors[32]; + thread_state_flavor_t old_flavors[32]; + } __Reply__host_swap_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__host_load_symbol_table_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_vm_wire_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_ports_descriptor_t processor_sets; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t processor_setsCnt; + } __Reply__host_processor_sets_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t set; + /* end of the kernel processed data */ + } __Reply__host_processor_set_priv_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__set_dp_control_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t contorl_port; + /* end of the kernel processed data */ + } __Reply__get_dp_control_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__host_set_UNDServer_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t server; + /* end of the kernel processed data */ + } __Reply__host_get_UNDServer_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t response_data; + mach_msg_ool_descriptor_t log_data; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t response_dataCnt; + mach_msg_type_number_t log_dataCnt; + kern_return_t op_result; + } __Reply__kext_request_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__host_priv_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__host_priv_subsystem__defined +#define __ReplyUnion__host_priv_subsystem__defined +union __ReplyUnion__host_priv_subsystem { + __Reply__host_get_boot_info_t Reply_host_get_boot_info; + __Reply__host_reboot_t Reply_host_reboot; + __Reply__host_priv_statistics_t Reply_host_priv_statistics; + __Reply__host_default_memory_manager_t Reply_host_default_memory_manager; + __Reply__vm_wire_t Reply_vm_wire; + __Reply__thread_wire_t Reply_thread_wire; + __Reply__vm_allocate_cpm_t Reply_vm_allocate_cpm; + __Reply__host_processors_t Reply_host_processors; + __Reply__host_get_clock_control_t Reply_host_get_clock_control; + __Reply__kmod_create_t Reply_kmod_create; + __Reply__kmod_destroy_t Reply_kmod_destroy; + __Reply__kmod_control_t Reply_kmod_control; + __Reply__host_get_special_port_t Reply_host_get_special_port; + __Reply__host_set_special_port_t Reply_host_set_special_port; + __Reply__host_set_exception_ports_t Reply_host_set_exception_ports; + __Reply__host_get_exception_ports_t Reply_host_get_exception_ports; + __Reply__host_swap_exception_ports_t Reply_host_swap_exception_ports; + __Reply__host_load_symbol_table_t Reply_host_load_symbol_table; + __Reply__mach_vm_wire_t Reply_mach_vm_wire; + __Reply__host_processor_sets_t Reply_host_processor_sets; + __Reply__host_processor_set_priv_t Reply_host_processor_set_priv; + __Reply__set_dp_control_port_t Reply_set_dp_control_port; + __Reply__get_dp_control_port_t Reply_get_dp_control_port; + __Reply__host_set_UNDServer_t Reply_host_set_UNDServer; + __Reply__host_get_UNDServer_t Reply_host_get_UNDServer; + __Reply__kext_request_t Reply_kext_request; +}; +#endif /* !__RequestUnion__host_priv_subsystem__defined */ + +#ifndef subsystem_to_name_map_host_priv +#define subsystem_to_name_map_host_priv \ + { "host_get_boot_info", 400 },\ + { "host_reboot", 401 },\ + { "host_priv_statistics", 402 },\ + { "host_default_memory_manager", 403 },\ + { "vm_wire", 404 },\ + { "thread_wire", 405 },\ + { "vm_allocate_cpm", 406 },\ + { "host_processors", 407 },\ + { "host_get_clock_control", 408 },\ + { "kmod_create", 409 },\ + { "kmod_destroy", 410 },\ + { "kmod_control", 411 },\ + { "host_get_special_port", 412 },\ + { "host_set_special_port", 413 },\ + { "host_set_exception_ports", 414 },\ + { "host_get_exception_ports", 415 },\ + { "host_swap_exception_ports", 416 },\ + { "host_load_symbol_table", 417 },\ + { "mach_vm_wire", 418 },\ + { "host_processor_sets", 419 },\ + { "host_processor_set_priv", 420 },\ + { "set_dp_control_port", 421 },\ + { "get_dp_control_port", 422 },\ + { "host_set_UNDServer", 423 },\ + { "host_get_UNDServer", 424 },\ + { "kext_request", 425 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _host_priv_user_ */ diff --git a/i386/include/mach/host_reboot.h b/i386/include/mach/host_reboot.h new file mode 100644 index 0000000..65609dd --- /dev/null +++ b/i386/include/mach/host_reboot.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ + +#ifndef _MACH_HOST_REBOOT_ +#define _MACH_HOST_REBOOT_ + +#define HOST_REBOOT_HALT 0x0008 +#define HOST_REBOOT_UPSDELAY 0x0100 +#define HOST_REBOOT_DEBUGGER 0x1000 + +#endif /* _MACH_HOST_REBOOT_ */ diff --git a/i386/include/mach/host_security.defs b/i386/include/mach/host_security.defs new file mode 100644 index 0000000..4098df4 --- /dev/null +++ b/i386/include/mach/host_security.defs @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ + +/* + * File: mach/host_security.defs + * + * Abstract: + * Mach host security operations support. + */ +subsystem +#if KERNEL_SERVER + KernelServer +#endif /* KERNEL_SERVER */ + host_security 600; + +/* + * Basic types + */ +#include <mach/std_types.defs> +#include <mach/mach_types.defs> + + +/* + * Create a new task with an explicit security token + */ +routine host_security_create_task_token( + host_security : host_security_t; + parent_task : task_t; + sec_token : security_token_t; + audit_token : audit_token_t; + host : host_t; + ledgers : ledger_array_t; + inherit_memory : boolean_t; + out child_task : task_t); + +/* + * Change a task's security token + */ +routine host_security_set_task_token( + host_security : host_security_t; + target_task : task_t; + sec_token : security_token_t; + audit_token : audit_token_t; + host : host_t); + +/* vim: set ft=c : */ diff --git a/i386/include/mach/host_security.h b/i386/include/mach/host_security.h new file mode 100644 index 0000000..ee4ed9e --- /dev/null +++ b/i386/include/mach/host_security.h @@ -0,0 +1,197 @@ +#ifndef _host_security_user_ +#define _host_security_user_ + +/* Module host_security */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef host_security_MSG_COUNT +#define host_security_MSG_COUNT 2 +#endif /* host_security_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mach_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine host_security_create_task_token */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_security_create_task_token +( + host_security_t host_security, + task_t parent_task, + security_token_t sec_token, + audit_token_t audit_token, + host_t host, + ledger_array_t ledgers, + mach_msg_type_number_t ledgersCnt, + boolean_t inherit_memory, + task_t *child_task +); + +/* Routine host_security_set_task_token */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_security_set_task_token +( + host_security_t host_security, + task_t target_task, + security_token_t sec_token, + audit_token_t audit_token, + host_t host +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__host_security_subsystem__defined +#define __Request__host_security_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t parent_task; + mach_msg_port_descriptor_t host; + mach_msg_ool_ports_descriptor_t ledgers; + /* end of the kernel processed data */ + NDR_record_t NDR; + security_token_t sec_token; + audit_token_t audit_token; + mach_msg_type_number_t ledgersCnt; + boolean_t inherit_memory; + } __Request__host_security_create_task_token_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t target_task; + mach_msg_port_descriptor_t host; + /* end of the kernel processed data */ + NDR_record_t NDR; + security_token_t sec_token; + audit_token_t audit_token; + } __Request__host_security_set_task_token_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__host_security_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__host_security_subsystem__defined +#define __RequestUnion__host_security_subsystem__defined +union __RequestUnion__host_security_subsystem { + __Request__host_security_create_task_token_t Request_host_security_create_task_token; + __Request__host_security_set_task_token_t Request_host_security_set_task_token; +}; +#endif /* !__RequestUnion__host_security_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__host_security_subsystem__defined +#define __Reply__host_security_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t child_task; + /* end of the kernel processed data */ + } __Reply__host_security_create_task_token_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__host_security_set_task_token_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__host_security_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__host_security_subsystem__defined +#define __ReplyUnion__host_security_subsystem__defined +union __ReplyUnion__host_security_subsystem { + __Reply__host_security_create_task_token_t Reply_host_security_create_task_token; + __Reply__host_security_set_task_token_t Reply_host_security_set_task_token; +}; +#endif /* !__RequestUnion__host_security_subsystem__defined */ + +#ifndef subsystem_to_name_map_host_security +#define subsystem_to_name_map_host_security \ + { "host_security_create_task_token", 600 },\ + { "host_security_set_task_token", 601 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _host_security_user_ */ diff --git a/i386/include/mach/host_special_ports.h b/i386/include/mach/host_special_ports.h new file mode 100644 index 0000000..755327c --- /dev/null +++ b/i386/include/mach/host_special_ports.h @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/host_special_ports.h + * + * Defines codes for access to host-wide special ports. + */ + +#ifndef _MACH_HOST_SPECIAL_PORTS_H_ +#define _MACH_HOST_SPECIAL_PORTS_H_ + +/* + * Cannot be set or gotten from user space + */ +#define HOST_SECURITY_PORT 0 + +/* + * Always provided by kernel (cannot be set from user-space). + */ +#define HOST_PORT 1 +#define HOST_PRIV_PORT 2 +#define HOST_IO_MASTER_PORT 3 +#define HOST_MAX_SPECIAL_KERNEL_PORT 7 /* room to grow */ + +/* + * Not provided by kernel + */ +#define HOST_DYNAMIC_PAGER_PORT (1 + HOST_MAX_SPECIAL_KERNEL_PORT) +#define HOST_AUDIT_CONTROL_PORT (2 + HOST_MAX_SPECIAL_KERNEL_PORT) +#define HOST_USER_NOTIFICATION_PORT (3 + HOST_MAX_SPECIAL_KERNEL_PORT) +#define HOST_AUTOMOUNTD_PORT (4 + HOST_MAX_SPECIAL_KERNEL_PORT) +#define HOST_LOCKD_PORT (5 + HOST_MAX_SPECIAL_KERNEL_PORT) +#define HOST_SEATBELT_PORT (7 + HOST_MAX_SPECIAL_KERNEL_PORT) +#define HOST_KEXTD_PORT (8 + HOST_MAX_SPECIAL_KERNEL_PORT) +#define HOST_CHUD_PORT (9 + HOST_MAX_SPECIAL_KERNEL_PORT) +#define HOST_UNFREED_PORT (10 + HOST_MAX_SPECIAL_KERNEL_PORT) +#define HOST_AMFID_PORT (11 + HOST_MAX_SPECIAL_KERNEL_PORT) +#define HOST_MAX_SPECIAL_PORT (12 + HOST_MAX_SPECIAL_KERNEL_PORT) + /* room to grow here as well */ + +/* + * Special node identifier to always represent the local node. + */ +#define HOST_LOCAL_NODE -1 + +/* + * Definitions for ease of use. + * + * In the get call, the host parameter can be any host, but will generally + * be the local node host port. In the set call, the host must the per-node + * host port for the node being affected. + */ +#define host_get_host_port(host, port) \ + (host_get_special_port((host), \ + HOST_LOCAL_NODE, HOST_PORT, (port))) +#define host_set_host_port(host, port) (KERN_INVALID_ARGUMENT) + +#define host_get_host_priv_port(host, port) \ + (host_get_special_port((host), \ + HOST_LOCAL_NODE, HOST_PRIV_PORT, (port))) +#define host_set_host_priv_port(host, port) (KERN_INVALID_ARGUMENT) + +#define host_get_io_master_port(host, port) \ + (host_get_special_port((host), \ + HOST_LOCAL_NODE, HOST_IO_MASTER_PORT, (port))) +#define host_set_io_master_port(host, port) (KERN_INVALID_ARGUMENT) + +/* + * User-settable special ports. + */ +#define host_get_dynamic_pager_port(host, port) \ + (host_get_special_port((host), \ + HOST_LOCAL_NODE, HOST_DYNAMIC_PAGER_PORT, (port))) +#define host_set_dynamic_pager_port(host, port) \ + (host_set_special_port((host), HOST_DYNAMIC_PAGER_PORT, (port))) + +#define host_get_audit_control_port(host, port) \ + (host_get_special_port((host), \ + HOST_LOCAL_NODE, HOST_AUDIT_CONTROL_PORT, (port))) +#define host_set_audit_control_port(host, port) \ + (host_set_special_port((host), HOST_AUDIT_CONTROL_PORT, (port))) + +#define host_get_user_notification_port(host, port) \ + (host_get_special_port((host), \ + HOST_LOCAL_NODE, HOST_USER_NOTIFICATION_PORT, (port))) +#define host_set_user_notification_port(host, port) \ + (host_set_special_port((host), HOST_USER_NOTIFICATION_PORT, (port))) + +#define host_get_automountd_port(host, port) \ + (host_get_special_port((host), \ + HOST_LOCAL_NODE, HOST_AUTOMOUNTD_PORT, (port))) +#define host_set_automountd_port(host, port) \ + (host_set_special_port((host), HOST_AUTOMOUNTD_PORT, (port))) + +#define host_get_lockd_port(host, port) \ + (host_get_special_port((host), \ + HOST_LOCAL_NODE, HOST_LOCKD_PORT, (port))) +#define host_set_lockd_port(host, port) \ + (host_set_special_port((host), HOST_LOCKD_PORT, (port))) + +#define host_get_kextd_port(host, port) \ + (host_get_special_port((host), \ + HOST_LOCAL_NODE, HOST_KEXTD_PORT, (port))) +#define host_set_kextd_port(host, port) \ + (host_set_special_port((host), HOST_KEXTD_PORT, (port))) + +#define host_get_chud_port(host, port) \ + (host_get_special_port((host), \ + HOST_LOCAL_NODE, HOST_CHUD_PORT, (port))) +#define host_set_chud_port(host, port) \ + (host_set_special_port((host), HOST_CHUD_PORT, (port))) + +#define host_get_unfreed_port(host, port) \ + (host_get_special_port((host), \ + HOST_LOCAL_NODE, HOST_UNFREED_PORT, (port))) +#define host_set_unfreed_port(host, port) \ + (host_set_special_port((host), HOST_UNFREED_PORT, (port))) + +#define host_get_amfid_port(host, port) \ + (host_get_special_port((host), \ + HOST_LOCAL_NODE, HOST_AMFID_PORT, (port))) +#define host_set_amfid_port(host, port) \ + (host_set_special_port((host), HOST_AMFID_PORT, (port))) + +#endif /* _MACH_HOST_SPECIAL_PORTS_H_ */ diff --git a/i386/include/mach/i386/_structs.h b/i386/include/mach/i386/_structs.h new file mode 100644 index 0000000..927d12f --- /dev/null +++ b/i386/include/mach/i386/_structs.h @@ -0,0 +1,561 @@ +/* + * Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ + +#ifndef _MACH_I386__STRUCTS_H_ +#define _MACH_I386__STRUCTS_H_ + +/* + * i386 is the structure that is exported to user threads for + * use in status/mutate calls. This structure should never change. + * + */ + +#if __DARWIN_UNIX03 +#define _STRUCT_X86_THREAD_STATE32 struct __darwin_i386_thread_state +_STRUCT_X86_THREAD_STATE32 +{ + unsigned int __eax; + unsigned int __ebx; + unsigned int __ecx; + unsigned int __edx; + unsigned int __edi; + unsigned int __esi; + unsigned int __ebp; + unsigned int __esp; + unsigned int __ss; + unsigned int __eflags; + unsigned int __eip; + unsigned int __cs; + unsigned int __ds; + unsigned int __es; + unsigned int __fs; + unsigned int __gs; +}; +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_X86_THREAD_STATE32 struct i386_thread_state +_STRUCT_X86_THREAD_STATE32 +{ + unsigned int eax; + unsigned int ebx; + unsigned int ecx; + unsigned int edx; + unsigned int edi; + unsigned int esi; + unsigned int ebp; + unsigned int esp; + unsigned int ss; + unsigned int eflags; + unsigned int eip; + unsigned int cs; + unsigned int ds; + unsigned int es; + unsigned int fs; + unsigned int gs; +}; +#endif /* !__DARWIN_UNIX03 */ + +/* This structure should be double-word aligned for performance */ + +#if __DARWIN_UNIX03 +#define _STRUCT_FP_CONTROL struct __darwin_fp_control +_STRUCT_FP_CONTROL +{ + unsigned short __invalid :1, + __denorm :1, + __zdiv :1, + __ovrfl :1, + __undfl :1, + __precis :1, + :2, + __pc :2, +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define FP_PREC_24B 0 +#define FP_PREC_53B 2 +#define FP_PREC_64B 3 +#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */ + __rc :2, +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define FP_RND_NEAR 0 +#define FP_RND_DOWN 1 +#define FP_RND_UP 2 +#define FP_CHOP 3 +#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */ + /*inf*/ :1, + :3; +}; +typedef _STRUCT_FP_CONTROL __darwin_fp_control_t; +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_FP_CONTROL struct fp_control +_STRUCT_FP_CONTROL +{ + unsigned short invalid :1, + denorm :1, + zdiv :1, + ovrfl :1, + undfl :1, + precis :1, + :2, + pc :2, +#define FP_PREC_24B 0 +#define FP_PREC_53B 2 +#define FP_PREC_64B 3 + rc :2, +#define FP_RND_NEAR 0 +#define FP_RND_DOWN 1 +#define FP_RND_UP 2 +#define FP_CHOP 3 + /*inf*/ :1, + :3; +}; +typedef _STRUCT_FP_CONTROL fp_control_t; +#endif /* !__DARWIN_UNIX03 */ + +/* + * Status word. + */ + +#if __DARWIN_UNIX03 +#define _STRUCT_FP_STATUS struct __darwin_fp_status +_STRUCT_FP_STATUS +{ + unsigned short __invalid :1, + __denorm :1, + __zdiv :1, + __ovrfl :1, + __undfl :1, + __precis :1, + __stkflt :1, + __errsumm :1, + __c0 :1, + __c1 :1, + __c2 :1, + __tos :3, + __c3 :1, + __busy :1; +}; +typedef _STRUCT_FP_STATUS __darwin_fp_status_t; +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_FP_STATUS struct fp_status +_STRUCT_FP_STATUS +{ + unsigned short invalid :1, + denorm :1, + zdiv :1, + ovrfl :1, + undfl :1, + precis :1, + stkflt :1, + errsumm :1, + c0 :1, + c1 :1, + c2 :1, + tos :3, + c3 :1, + busy :1; +}; +typedef _STRUCT_FP_STATUS fp_status_t; +#endif /* !__DARWIN_UNIX03 */ + +/* defn of 80bit x87 FPU or MMX register */ + +#if __DARWIN_UNIX03 +#define _STRUCT_MMST_REG struct __darwin_mmst_reg +_STRUCT_MMST_REG +{ + char __mmst_reg[10]; + char __mmst_rsrv[6]; +}; +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_MMST_REG struct mmst_reg +_STRUCT_MMST_REG +{ + char mmst_reg[10]; + char mmst_rsrv[6]; +}; +#endif /* !__DARWIN_UNIX03 */ + + +/* defn of 128 bit XMM regs */ + +#if __DARWIN_UNIX03 +#define _STRUCT_XMM_REG struct __darwin_xmm_reg +_STRUCT_XMM_REG +{ + char __xmm_reg[16]; +}; +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_XMM_REG struct xmm_reg +_STRUCT_XMM_REG +{ + char xmm_reg[16]; +}; +#endif /* !__DARWIN_UNIX03 */ + +/* + * Floating point state. + */ + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define FP_STATE_BYTES 512 /* number of chars worth of data from fpu_fcw */ +#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */ + +#if __DARWIN_UNIX03 +#define _STRUCT_X86_FLOAT_STATE32 struct __darwin_i386_float_state +_STRUCT_X86_FLOAT_STATE32 +{ + int __fpu_reserved[2]; + _STRUCT_FP_CONTROL __fpu_fcw; /* x87 FPU control word */ + _STRUCT_FP_STATUS __fpu_fsw; /* x87 FPU status word */ + __uint8_t __fpu_ftw; /* x87 FPU tag word */ + __uint8_t __fpu_rsrv1; /* reserved */ + __uint16_t __fpu_fop; /* x87 FPU Opcode */ + __uint32_t __fpu_ip; /* x87 FPU Instruction Pointer offset */ + __uint16_t __fpu_cs; /* x87 FPU Instruction Pointer Selector */ + __uint16_t __fpu_rsrv2; /* reserved */ + __uint32_t __fpu_dp; /* x87 FPU Instruction Operand(Data) Pointer offset */ + __uint16_t __fpu_ds; /* x87 FPU Instruction Operand(Data) Pointer Selector */ + __uint16_t __fpu_rsrv3; /* reserved */ + __uint32_t __fpu_mxcsr; /* MXCSR Register state */ + __uint32_t __fpu_mxcsrmask; /* MXCSR mask */ + _STRUCT_MMST_REG __fpu_stmm0; /* ST0/MM0 */ + _STRUCT_MMST_REG __fpu_stmm1; /* ST1/MM1 */ + _STRUCT_MMST_REG __fpu_stmm2; /* ST2/MM2 */ + _STRUCT_MMST_REG __fpu_stmm3; /* ST3/MM3 */ + _STRUCT_MMST_REG __fpu_stmm4; /* ST4/MM4 */ + _STRUCT_MMST_REG __fpu_stmm5; /* ST5/MM5 */ + _STRUCT_MMST_REG __fpu_stmm6; /* ST6/MM6 */ + _STRUCT_MMST_REG __fpu_stmm7; /* ST7/MM7 */ + _STRUCT_XMM_REG __fpu_xmm0; /* XMM 0 */ + _STRUCT_XMM_REG __fpu_xmm1; /* XMM 1 */ + _STRUCT_XMM_REG __fpu_xmm2; /* XMM 2 */ + _STRUCT_XMM_REG __fpu_xmm3; /* XMM 3 */ + _STRUCT_XMM_REG __fpu_xmm4; /* XMM 4 */ + _STRUCT_XMM_REG __fpu_xmm5; /* XMM 5 */ + _STRUCT_XMM_REG __fpu_xmm6; /* XMM 6 */ + _STRUCT_XMM_REG __fpu_xmm7; /* XMM 7 */ + char __fpu_rsrv4[14*16]; /* reserved */ + int __fpu_reserved1; +}; +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_X86_FLOAT_STATE32 struct i386_float_state +_STRUCT_X86_FLOAT_STATE32 +{ + int fpu_reserved[2]; + _STRUCT_FP_CONTROL fpu_fcw; /* x87 FPU control word */ + _STRUCT_FP_STATUS fpu_fsw; /* x87 FPU status word */ + __uint8_t fpu_ftw; /* x87 FPU tag word */ + __uint8_t fpu_rsrv1; /* reserved */ + __uint16_t fpu_fop; /* x87 FPU Opcode */ + __uint32_t fpu_ip; /* x87 FPU Instruction Pointer offset */ + __uint16_t fpu_cs; /* x87 FPU Instruction Pointer Selector */ + __uint16_t fpu_rsrv2; /* reserved */ + __uint32_t fpu_dp; /* x87 FPU Instruction Operand(Data) Pointer offset */ + __uint16_t fpu_ds; /* x87 FPU Instruction Operand(Data) Pointer Selector */ + __uint16_t fpu_rsrv3; /* reserved */ + __uint32_t fpu_mxcsr; /* MXCSR Register state */ + __uint32_t fpu_mxcsrmask; /* MXCSR mask */ + _STRUCT_MMST_REG fpu_stmm0; /* ST0/MM0 */ + _STRUCT_MMST_REG fpu_stmm1; /* ST1/MM1 */ + _STRUCT_MMST_REG fpu_stmm2; /* ST2/MM2 */ + _STRUCT_MMST_REG fpu_stmm3; /* ST3/MM3 */ + _STRUCT_MMST_REG fpu_stmm4; /* ST4/MM4 */ + _STRUCT_MMST_REG fpu_stmm5; /* ST5/MM5 */ + _STRUCT_MMST_REG fpu_stmm6; /* ST6/MM6 */ + _STRUCT_MMST_REG fpu_stmm7; /* ST7/MM7 */ + _STRUCT_XMM_REG fpu_xmm0; /* XMM 0 */ + _STRUCT_XMM_REG fpu_xmm1; /* XMM 1 */ + _STRUCT_XMM_REG fpu_xmm2; /* XMM 2 */ + _STRUCT_XMM_REG fpu_xmm3; /* XMM 3 */ + _STRUCT_XMM_REG fpu_xmm4; /* XMM 4 */ + _STRUCT_XMM_REG fpu_xmm5; /* XMM 5 */ + _STRUCT_XMM_REG fpu_xmm6; /* XMM 6 */ + _STRUCT_XMM_REG fpu_xmm7; /* XMM 7 */ + char fpu_rsrv4[14*16]; /* reserved */ + int fpu_reserved1; +}; +#endif /* !__DARWIN_UNIX03 */ + +#if __DARWIN_UNIX03 +#define _STRUCT_X86_EXCEPTION_STATE32 struct __darwin_i386_exception_state +_STRUCT_X86_EXCEPTION_STATE32 +{ + unsigned int __trapno; + unsigned int __err; + unsigned int __faultvaddr; +}; +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_X86_EXCEPTION_STATE32 struct i386_exception_state +_STRUCT_X86_EXCEPTION_STATE32 +{ + unsigned int trapno; + unsigned int err; + unsigned int faultvaddr; +}; +#endif /* !__DARWIN_UNIX03 */ + +#if __DARWIN_UNIX03 +#define _STRUCT_X86_DEBUG_STATE32 struct __darwin_x86_debug_state32 +_STRUCT_X86_DEBUG_STATE32 +{ + unsigned int __dr0; + unsigned int __dr1; + unsigned int __dr2; + unsigned int __dr3; + unsigned int __dr4; + unsigned int __dr5; + unsigned int __dr6; + unsigned int __dr7; +}; +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_X86_DEBUG_STATE32 struct x86_debug_state32 +_STRUCT_X86_DEBUG_STATE32 +{ + unsigned int dr0; + unsigned int dr1; + unsigned int dr2; + unsigned int dr3; + unsigned int dr4; + unsigned int dr5; + unsigned int dr6; + unsigned int dr7; +}; +#endif /* !__DARWIN_UNIX03 */ + +/* + * 64 bit versions of the above + */ + +#if __DARWIN_UNIX03 +#define _STRUCT_X86_THREAD_STATE64 struct __darwin_x86_thread_state64 +_STRUCT_X86_THREAD_STATE64 +{ + __uint64_t __rax; + __uint64_t __rbx; + __uint64_t __rcx; + __uint64_t __rdx; + __uint64_t __rdi; + __uint64_t __rsi; + __uint64_t __rbp; + __uint64_t __rsp; + __uint64_t __r8; + __uint64_t __r9; + __uint64_t __r10; + __uint64_t __r11; + __uint64_t __r12; + __uint64_t __r13; + __uint64_t __r14; + __uint64_t __r15; + __uint64_t __rip; + __uint64_t __rflags; + __uint64_t __cs; + __uint64_t __fs; + __uint64_t __gs; +}; +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_X86_THREAD_STATE64 struct x86_thread_state64 +_STRUCT_X86_THREAD_STATE64 +{ + __uint64_t rax; + __uint64_t rbx; + __uint64_t rcx; + __uint64_t rdx; + __uint64_t rdi; + __uint64_t rsi; + __uint64_t rbp; + __uint64_t rsp; + __uint64_t r8; + __uint64_t r9; + __uint64_t r10; + __uint64_t r11; + __uint64_t r12; + __uint64_t r13; + __uint64_t r14; + __uint64_t r15; + __uint64_t rip; + __uint64_t rflags; + __uint64_t cs; + __uint64_t fs; + __uint64_t gs; +}; +#endif /* !__DARWIN_UNIX03 */ + + +#if __DARWIN_UNIX03 +#define _STRUCT_X86_FLOAT_STATE64 struct __darwin_x86_float_state64 +_STRUCT_X86_FLOAT_STATE64 +{ + int __fpu_reserved[2]; + _STRUCT_FP_CONTROL __fpu_fcw; /* x87 FPU control word */ + _STRUCT_FP_STATUS __fpu_fsw; /* x87 FPU status word */ + __uint8_t __fpu_ftw; /* x87 FPU tag word */ + __uint8_t __fpu_rsrv1; /* reserved */ + __uint16_t __fpu_fop; /* x87 FPU Opcode */ + + /* x87 FPU Instruction Pointer */ + __uint32_t __fpu_ip; /* offset */ + __uint16_t __fpu_cs; /* Selector */ + + __uint16_t __fpu_rsrv2; /* reserved */ + + /* x87 FPU Instruction Operand(Data) Pointer */ + __uint32_t __fpu_dp; /* offset */ + __uint16_t __fpu_ds; /* Selector */ + + __uint16_t __fpu_rsrv3; /* reserved */ + __uint32_t __fpu_mxcsr; /* MXCSR Register state */ + __uint32_t __fpu_mxcsrmask; /* MXCSR mask */ + _STRUCT_MMST_REG __fpu_stmm0; /* ST0/MM0 */ + _STRUCT_MMST_REG __fpu_stmm1; /* ST1/MM1 */ + _STRUCT_MMST_REG __fpu_stmm2; /* ST2/MM2 */ + _STRUCT_MMST_REG __fpu_stmm3; /* ST3/MM3 */ + _STRUCT_MMST_REG __fpu_stmm4; /* ST4/MM4 */ + _STRUCT_MMST_REG __fpu_stmm5; /* ST5/MM5 */ + _STRUCT_MMST_REG __fpu_stmm6; /* ST6/MM6 */ + _STRUCT_MMST_REG __fpu_stmm7; /* ST7/MM7 */ + _STRUCT_XMM_REG __fpu_xmm0; /* XMM 0 */ + _STRUCT_XMM_REG __fpu_xmm1; /* XMM 1 */ + _STRUCT_XMM_REG __fpu_xmm2; /* XMM 2 */ + _STRUCT_XMM_REG __fpu_xmm3; /* XMM 3 */ + _STRUCT_XMM_REG __fpu_xmm4; /* XMM 4 */ + _STRUCT_XMM_REG __fpu_xmm5; /* XMM 5 */ + _STRUCT_XMM_REG __fpu_xmm6; /* XMM 6 */ + _STRUCT_XMM_REG __fpu_xmm7; /* XMM 7 */ + _STRUCT_XMM_REG __fpu_xmm8; /* XMM 8 */ + _STRUCT_XMM_REG __fpu_xmm9; /* XMM 9 */ + _STRUCT_XMM_REG __fpu_xmm10; /* XMM 10 */ + _STRUCT_XMM_REG __fpu_xmm11; /* XMM 11 */ + _STRUCT_XMM_REG __fpu_xmm12; /* XMM 12 */ + _STRUCT_XMM_REG __fpu_xmm13; /* XMM 13 */ + _STRUCT_XMM_REG __fpu_xmm14; /* XMM 14 */ + _STRUCT_XMM_REG __fpu_xmm15; /* XMM 15 */ + char __fpu_rsrv4[6*16]; /* reserved */ + int __fpu_reserved1; +}; +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_X86_FLOAT_STATE64 struct x86_float_state64 +_STRUCT_X86_FLOAT_STATE64 +{ + int fpu_reserved[2]; + _STRUCT_FP_CONTROL fpu_fcw; /* x87 FPU control word */ + _STRUCT_FP_STATUS fpu_fsw; /* x87 FPU status word */ + __uint8_t fpu_ftw; /* x87 FPU tag word */ + __uint8_t fpu_rsrv1; /* reserved */ + __uint16_t fpu_fop; /* x87 FPU Opcode */ + + /* x87 FPU Instruction Pointer */ + __uint32_t fpu_ip; /* offset */ + __uint16_t fpu_cs; /* Selector */ + + __uint16_t fpu_rsrv2; /* reserved */ + + /* x87 FPU Instruction Operand(Data) Pointer */ + __uint32_t fpu_dp; /* offset */ + __uint16_t fpu_ds; /* Selector */ + + __uint16_t fpu_rsrv3; /* reserved */ + __uint32_t fpu_mxcsr; /* MXCSR Register state */ + __uint32_t fpu_mxcsrmask; /* MXCSR mask */ + _STRUCT_MMST_REG fpu_stmm0; /* ST0/MM0 */ + _STRUCT_MMST_REG fpu_stmm1; /* ST1/MM1 */ + _STRUCT_MMST_REG fpu_stmm2; /* ST2/MM2 */ + _STRUCT_MMST_REG fpu_stmm3; /* ST3/MM3 */ + _STRUCT_MMST_REG fpu_stmm4; /* ST4/MM4 */ + _STRUCT_MMST_REG fpu_stmm5; /* ST5/MM5 */ + _STRUCT_MMST_REG fpu_stmm6; /* ST6/MM6 */ + _STRUCT_MMST_REG fpu_stmm7; /* ST7/MM7 */ + _STRUCT_XMM_REG fpu_xmm0; /* XMM 0 */ + _STRUCT_XMM_REG fpu_xmm1; /* XMM 1 */ + _STRUCT_XMM_REG fpu_xmm2; /* XMM 2 */ + _STRUCT_XMM_REG fpu_xmm3; /* XMM 3 */ + _STRUCT_XMM_REG fpu_xmm4; /* XMM 4 */ + _STRUCT_XMM_REG fpu_xmm5; /* XMM 5 */ + _STRUCT_XMM_REG fpu_xmm6; /* XMM 6 */ + _STRUCT_XMM_REG fpu_xmm7; /* XMM 7 */ + _STRUCT_XMM_REG fpu_xmm8; /* XMM 8 */ + _STRUCT_XMM_REG fpu_xmm9; /* XMM 9 */ + _STRUCT_XMM_REG fpu_xmm10; /* XMM 10 */ + _STRUCT_XMM_REG fpu_xmm11; /* XMM 11 */ + _STRUCT_XMM_REG fpu_xmm12; /* XMM 12 */ + _STRUCT_XMM_REG fpu_xmm13; /* XMM 13 */ + _STRUCT_XMM_REG fpu_xmm14; /* XMM 14 */ + _STRUCT_XMM_REG fpu_xmm15; /* XMM 15 */ + char fpu_rsrv4[6*16]; /* reserved */ + int fpu_reserved1; +}; +#endif /* !__DARWIN_UNIX03 */ + +#if __DARWIN_UNIX03 +#define _STRUCT_X86_EXCEPTION_STATE64 struct __darwin_x86_exception_state64 +_STRUCT_X86_EXCEPTION_STATE64 +{ + unsigned int __trapno; + unsigned int __err; + __uint64_t __faultvaddr; +}; +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_X86_EXCEPTION_STATE64 struct x86_exception_state64 +_STRUCT_X86_EXCEPTION_STATE64 +{ + unsigned int trapno; + unsigned int err; + __uint64_t faultvaddr; +}; +#endif /* !__DARWIN_UNIX03 */ + +#if __DARWIN_UNIX03 +#define _STRUCT_X86_DEBUG_STATE64 struct __darwin_x86_debug_state64 +_STRUCT_X86_DEBUG_STATE64 +{ + __uint64_t __dr0; + __uint64_t __dr1; + __uint64_t __dr2; + __uint64_t __dr3; + __uint64_t __dr4; + __uint64_t __dr5; + __uint64_t __dr6; + __uint64_t __dr7; +}; +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_X86_DEBUG_STATE64 struct x86_debug_state64 +_STRUCT_X86_DEBUG_STATE64 +{ + __uint64_t dr0; + __uint64_t dr1; + __uint64_t dr2; + __uint64_t dr3; + __uint64_t dr4; + __uint64_t dr5; + __uint64_t dr6; + __uint64_t dr7; +}; +#endif /* !__DARWIN_UNIX03 */ + +#endif /* _MACH_I386__STRUCTS_H_ */ diff --git a/i386/include/mach/i386/asm.h b/i386/include/mach/i386/asm.h new file mode 100644 index 0000000..02a5620 --- /dev/null +++ b/i386/include/mach/i386/asm.h @@ -0,0 +1,308 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ + +#ifndef _I386_ASM_H_ +#define _I386_ASM_H_ + +#ifdef _KERNEL +#include <gprof.h> +#endif /* _KERNEL */ + +#ifdef MACH_KERNEL +#include <mach_kdb.h> +#else /* !MACH_KERNEL */ +#define MACH_KDB 0 +#endif /* !MACH_KERNEL */ + + +#if defined(MACH_KERNEL) || defined(_KERNEL) +#include <gprof.h> +#endif /* MACH_KERNEL || _KERNEL */ + +#if defined(__i386__) + +#define S_PC (%esp) +#define S_ARG0 4(%esp) +#define S_ARG1 8(%esp) +#define S_ARG2 12(%esp) +#define S_ARG3 16(%esp) +#define S_ARG4 20(%esp) + +#define FRAME pushl %ebp; movl %esp, %ebp +#define EMARF leave + +#define B_LINK (%ebp) +#define B_PC 4(%ebp) +#define B_ARG0 8(%ebp) +#define B_ARG1 12(%ebp) +#define B_ARG2 16(%ebp) +#define B_ARG3 20(%ebp) + +#elif defined(__x86_64__) + +#define S_PC (%rsp) + +#define FRAME pushq %rbp; movq %rsp, %rbp +#define EMARF leave + +#define B_LINK (%rbp) +#define B_PC 8(%rbp) + +#else +#error unsupported architecture +#endif + +/* There is another definition of ALIGN for .c sources */ +#ifdef ASSEMBLER +#define ALIGN 4,0x90 +#endif /* ASSEMBLER */ + +#ifndef FALIGN +#define FALIGN ALIGN +#endif + +#define LB(x,n) n +#if __STDC__ +#ifndef __NO_UNDERSCORES__ +#define LCL(x) L ## x +#define EXT(x) _ ## x +#define LEXT(x) _ ## x ## : +#else +#define LCL(x) .L ## x +#define EXT(x) x +#define LEXT(x) x ## : +#endif +#define LBc(x,n) n ## : +#define LBb(x,n) n ## b +#define LBf(x,n) n ## f +#else /* __STDC__ */ +#ifndef __NO_UNDERSCORES__ +#define LCL(x) L/**/x +#define EXT(x) _/**/x +#define LEXT(x) _/**/x/**/: +#else /* __NO_UNDERSCORES__ */ +#define LCL(x) .L/**/x +#define EXT(x) x +#define LEXT(x) x/**/: +#endif /* __NO_UNDERSCORES__ */ +#define LBc(x,n) n/**/: +#define LBb(x,n) n/**/b +#define LBf(x,n) n/**/f +#endif /* __STDC__ */ + +#define SVC .byte 0x9a; .long 0; .word 0x7 + +#define RPC_SVC .byte 0x9a; .long 0; .word 0xf + +#define String .asciz +#define Value .word +#define Times(a,b) (a*b) +#define Divide(a,b) (a/b) + +#define INB inb %dx, %al +#define OUTB outb %al, %dx +#define INL inl %dx, %eax +#define OUTL outl %eax, %dx + +#define data16 .byte 0x66 +#define addr16 .byte 0x67 + +#if !GPROF +#define MCOUNT + +#elif defined(__SHARED__) +#define MCOUNT ; .data;\ + .align ALIGN;\ + LBc(x, 8) .long 0;\ + .text;\ + Gpush;\ + Gload;\ + leal Gotoff(LBb(x,8)),%edx;\ + Egaddr(%eax,_mcount_ptr);\ + Gpop;\ + call *(%eax); + +#else /* !GPROF, !__SHARED__ */ +#define MCOUNT ; call mcount; +#endif /* GPROF */ + +#ifdef __ELF__ +#define ELF_FUNC(x) .type x,@function +#define ELF_DATA(x) .type x,@object +#define ELF_SIZE(x,s) .size x,s +#else +#define ELF_FUNC(x) +#define ELF_DATA(x) +#define ELF_SIZE(x,s) +#endif + +#define Entry(x) .globl EXT(x); ELF_FUNC(EXT(x)); .align FALIGN; LEXT(x) +#define ENTRY(x) Entry(x) MCOUNT +#define ENTRY2(x,y) .globl EXT(x); .globl EXT(y); \ + ELF_FUNC(EXT(x)); ELF_FUNC(EXT(y)); \ + .align FALIGN; LEXT(x); LEXT(y) \ + MCOUNT +#if __STDC__ +#define ASENTRY(x) .globl x; .align FALIGN; x ## : ELF_FUNC(x) MCOUNT +#else +#define ASENTRY(x) .globl x; .align FALIGN; x: ELF_FUNC(x) MCOUNT +#endif /* __STDC__ */ + +#define DATA(x) .globl EXT(x); ELF_DATA(EXT(x)); .align ALIGN; LEXT(x) + +#define End(x) ELF_SIZE(x,.-x) +#define END(x) End(EXT(x)) +#define ENDDATA(x) END(x) +#define Enddata(x) End(x) + +/* + * ELF shared library accessor macros. + * Gpush saves the %ebx register used for the GOT address + * Gpop pops %ebx if we need a GOT + * Gload loads %ebx with the GOT address if shared libraries are used + * Gcall calls an external function. + * Gotoff allows you to reference local labels. + * Gotoff2 allows you to reference local labels with an index reg. + * Gotoff3 allows you to reference local labels with an index reg & size. + * Gaddr loads up a register with an address of an external item. + * Gstack is the number of bytes that Gpush pushes on the stack. + * + * Varients of the above with E or L prefixes do EXT(name) or LCL(name) + * respectively. + */ + +#ifndef __SHARED__ +#define Gpush +#define Gpop +#define Gload +#define Gcall(func) call func +#define Gotoff(lab) lab +#define Gotoff2(l,r) l(r) +#define Gotoff3(l,r,s) l(,r,s) +#define Gaddr(to,lab) movl $lab,to +#define Gcmp(lab,reg) cmpl $lab,reg +#define Gmemload(lab,reg) movl lab,reg +#define Gmemstore(reg,lab,tmp) movl reg,lab +#define Gstack 0 + +#else +#ifdef __ELF__ /* ELF shared libraries */ +#define Gpush pushl %ebx +#define Gpop popl %ebx +#define Gload call 9f; 9: popl %ebx; addl $_GLOBAL_OFFSET_TABLE_+[.-9b],%ebx +#define Gcall(func) call EXT(func)@PLT +#define Gotoff(lab) lab@GOTOFF(%ebx) +#define Gotoff2(l,r) l@GOTOFF(%ebx,r) +#define Gotoff3(l,r,s) l@GOTOFF(%ebx,r,s) +#define Gaddr(to,lab) movl lab@GOT(%ebx),to +#define Gcmp(lab,reg) cmpl reg,lab@GOT(%ebx) +#define Gmemload(lab,reg) movl lab@GOT(%ebx),reg; movl (reg),reg +#define Gmemstore(reg,lab,tmp) movl lab@GOT(%ebx),tmp; movl reg,(tmp) +#define Gstack 4 + +#else /* ROSE shared libraries */ +#define Gpush +#define Gpop +#define Gload +#define Gcall(func) call *9f; .data; .align ALIGN; 9: .long func; .text +#define Gotoff(lab) lab +#define Gotoff2(l,r) l(r) +#define Gotoff3(l,r,s) l(,r,s) +#define Gaddr(to,lab) movl 9f,to; .data; .align ALIGN; 9: .long lab; .text +#define Gcmp(lab,reg) cmpl reg,9f; .data; .align ALIGN; 9: .long lab; .text +#define Gmemload(lab,reg) movl 9f,reg; movl (reg),reg; .data; .align ALIGN; 9: .long lab; .text +#define Gmemstore(reg,lab,tmp) movl 9f,tmp; movl reg,(tmp); .data; .align ALIGN; 9: .long lab; .text +#define Gstack 0 +#endif /* __ELF__ */ +#endif /* __SHARED__ */ + +/* Egotoff is not provided, since external symbols should not use @GOTOFF + relocations. */ +#define Egcall(func) Gcall(EXT(func)) +#define Egaddr(to,lab) Gaddr(to,EXT(lab)) +#define Egcmp(lab,reg) Gcmp(EXT(lab),reg) +#define Egmemload(lab,reg) Gmemload(EXT(lab),reg) +#define Egmemstore(reg,lab,tmp) Gmemstore(reg,EXT(lab),tmp) + +#define Lgotoff(lab) Gotoff(LCL(lab)) +#define Lgotoff2(l,r) Gotoff2(LCL(l),r) +#define Lgotoff3(l,r,s) Gotoff3(LCL(l),r,s) +#define Lgcmp(lab,reg) Gcmp(LCL(lab),reg) +#define Lgmemload(lab,reg) movl Lgotoff(lab),reg +#define Lgmemstore(reg,lab,tmp) movl reg,Lgotoff(lab) + +#ifdef ASSEMBLER +#if MACH_KDB +#include <ddb/stab.h> +/* + * This pseudo-assembler line is added so that there will be at least + * one N_SO entry in the symbol stable to define the current file name. + */ +#endif /* MACH_KDB */ + +#else /* NOT ASSEMBLER */ + +/* These defines are here for .c files that wish to reference global symbols + * within __asm__ statements. + */ +#ifndef __NO_UNDERSCORES__ +#define CC_SYM_PREFIX "_" +#else +#define CC_SYM_PREFIX "" +#endif /* __NO_UNDERSCORES__ */ +#endif /* ASSEMBLER */ + +#endif /* _I386_ASM_H_ */ diff --git a/i386/include/mach/i386/boolean.h b/i386/include/mach/i386/boolean.h new file mode 100644 index 0000000..100f7e7 --- /dev/null +++ b/i386/include/mach/i386/boolean.h @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ + +/* + * File: boolean.h + * + * Boolean type, for I386. + */ + +#ifndef _MACH_I386_BOOLEAN_H_ +#define _MACH_I386_BOOLEAN_H_ + +#if defined(__x86_64__) && !defined(KERNEL) +typedef unsigned int boolean_t; +#else +typedef int boolean_t; +#endif + +#endif /* _MACH_I386_BOOLEAN_H_ */ diff --git a/i386/include/mach/i386/exception.h b/i386/include/mach/i386/exception.h new file mode 100644 index 0000000..77fe4e4 --- /dev/null +++ b/i386/include/mach/i386/exception.h @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ + +#ifndef _MACH_I386_EXCEPTION_H_ +#define _MACH_I386_EXCEPTION_H_ + +/* + * No machine dependent types for the 80386 + */ + +#define EXC_TYPES_COUNT 11 /* incl. illegal exception 0 */ + +/* + * Codes and subcodes for 80386 exceptions. + */ + +#define EXCEPTION_CODE_MAX 2 /* currently code and subcode */ + +/* + * EXC_BAD_INSTRUCTION + */ + +#define EXC_I386_INVOP 1 + +/* + * EXC_ARITHMETIC + */ + +#define EXC_I386_DIV 1 +#define EXC_I386_INTO 2 +#define EXC_I386_NOEXT 3 +#define EXC_I386_EXTOVR 4 +#define EXC_I386_EXTERR 5 +#define EXC_I386_EMERR 6 +#define EXC_I386_BOUND 7 +#define EXC_I386_SSEEXTERR 8 + +/* + * EXC_SOFTWARE + * Note: 0x10000-0x10003 in use for unix signal + */ + +/* + * EXC_BAD_ACCESS + */ + +/* + * EXC_BREAKPOINT + */ + +#define EXC_I386_SGL 1 +#define EXC_I386_BPT 2 + +#define EXC_I386_DIVERR 0 /* divide by 0 eprror */ +#define EXC_I386_SGLSTP 1 /* single step */ +#define EXC_I386_NMIFLT 2 /* NMI */ +#define EXC_I386_BPTFLT 3 /* breakpoint fault */ +#define EXC_I386_INTOFLT 4 /* INTO overflow fault */ +#define EXC_I386_BOUNDFLT 5 /* BOUND instruction fault */ +#define EXC_I386_INVOPFLT 6 /* invalid opcode fault */ +#define EXC_I386_NOEXTFLT 7 /* extension not available fault*/ +#define EXC_I386_DBLFLT 8 /* double fault */ +#define EXC_I386_EXTOVRFLT 9 /* extension overrun fault */ +#define EXC_I386_INVTSSFLT 10 /* invalid TSS fault */ +#define EXC_I386_SEGNPFLT 11 /* segment not present fault */ +#define EXC_I386_STKFLT 12 /* stack fault */ +#define EXC_I386_GPFLT 13 /* general protection fault */ +#define EXC_I386_PGFLT 14 /* page fault */ +#define EXC_I386_EXTERRFLT 16 /* extension error fault */ +#define EXC_I386_ALIGNFLT 17 /* Alignment fault */ +#define EXC_I386_ENDPERR 33 /* emulated extension error flt */ +#define EXC_I386_ENOEXTFLT 32 /* emulated ext not present */ + + +/* + * machine dependent exception masks + */ +#define EXC_MASK_MACHINE 0 + +#endif /* _MACH_I386_EXCEPTION_H_ */ diff --git a/i386/include/mach/i386/fp_reg.h b/i386/include/mach/i386/fp_reg.h new file mode 100644 index 0000000..47a26a9 --- /dev/null +++ b/i386/include/mach/i386/fp_reg.h @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1992-1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ + +#ifndef _I386_FP_SAVE_H_ +#define _I386_FP_SAVE_H_ + + +/* note when allocating this data structure, it must be 16 byte aligned. */ +struct x86_fx_save { + unsigned short fx_control; /* control */ + unsigned short fx_status; /* status */ + unsigned char fx_tag; /* register tags */ + unsigned char fx_bbz1; /* better be zero when calling fxrtstor */ + unsigned short fx_opcode; + unsigned int fx_eip; /* eip instruction */ + unsigned short fx_cs; /* cs instruction */ + unsigned short fx_bbz2; /* better be zero when calling fxrtstor */ + unsigned int fx_dp; /* data address */ + unsigned short fx_ds; /* data segment */ + unsigned short fx_bbz3; /* better be zero when calling fxrtstor */ + unsigned int fx_MXCSR; + unsigned int fx_MXCSR_MASK; + unsigned short fx_reg_word[8][8]; /* STx/MMx registers */ + unsigned short fx_XMM_reg[8][16]; /* XMM0-XMM15 on 64 bit processors */ + /* XMM0-XMM7 on 32 bit processors... unused storage reserved */ + unsigned char fx_reserved[16*6]; /* reserved by intel for future expansion */ +}; + + +/* + * Control register + */ +#define FPC_IE 0x0001 /* enable invalid operation + exception */ +#define FPC_IM FPC_IE +#define FPC_DE 0x0002 /* enable denormalized operation + exception */ +#define FPC_DM FPC_DE +#define FPC_ZE 0x0004 /* enable zero-divide exception */ +#define FPC_ZM FPC_ZE +#define FPC_OE 0x0008 /* enable overflow exception */ +#define FPC_OM FPC_OE +#define FPC_UE 0x0010 /* enable underflow exception */ +#define FPC_PE 0x0020 /* enable precision exception */ +#define FPC_PC 0x0300 /* precision control: */ +#define FPC_PC_24 0x0000 /* 24 bits */ +#define FPC_PC_53 0x0200 /* 53 bits */ +#define FPC_PC_64 0x0300 /* 64 bits */ +#define FPC_RC 0x0c00 /* rounding control: */ +#define FPC_RC_RN 0x0000 /* round to nearest or even */ +#define FPC_RC_RD 0x0400 /* round down */ +#define FPC_RC_RU 0x0800 /* round up */ +#define FPC_RC_CHOP 0x0c00 /* chop */ +#define FPC_IC 0x1000 /* infinity control (obsolete) */ +#define FPC_IC_PROJ 0x0000 /* projective infinity */ +#define FPC_IC_AFF 0x1000 /* affine infinity (std) */ + +/* + * Status register + */ +#define FPS_IE 0x0001 /* invalid operation */ +#define FPS_DE 0x0002 /* denormalized operand */ +#define FPS_ZE 0x0004 /* divide by zero */ +#define FPS_OE 0x0008 /* overflow */ +#define FPS_UE 0x0010 /* underflow */ +#define FPS_PE 0x0020 /* precision */ +#define FPS_SF 0x0040 /* stack flag */ +#define FPS_ES 0x0080 /* error summary */ +#define FPS_C0 0x0100 /* condition code bit 0 */ +#define FPS_C1 0x0200 /* condition code bit 1 */ +#define FPS_C2 0x0400 /* condition code bit 2 */ +#define FPS_TOS 0x3800 /* top-of-stack pointer */ +#define FPS_TOS_SHIFT 11 +#define FPS_C3 0x4000 /* condition code bit 3 */ +#define FPS_BUSY 0x8000 /* FPU busy */ + +/* + * Kind of floating-point support provided by kernel. + */ +#define FP_NO 0 /* no floating point */ +#define FP_SOFT 1 /* software FP emulator */ +#define FP_287 2 /* 80287 */ +#define FP_387 3 /* 80387 or 80486 */ +#define FP_FXSR 4 /* Fast save/restore SIMD Extension */ + +#endif /* _I386_FP_SAVE_H_ */ diff --git a/i386/include/mach/i386/kern_return.h b/i386/include/mach/i386/kern_return.h new file mode 100644 index 0000000..a9df708 --- /dev/null +++ b/i386/include/mach/i386/kern_return.h @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ + +/* + * File: kern_return.h + * Author: Avadis Tevanian, Jr., Michael Wayne Young + * Date: 1985 + * + * Machine-dependent kernel return definitions. + */ + +#ifndef _MACH_I386_KERN_RETURN_H_ +#define _MACH_I386_KERN_RETURN_H_ + +#ifndef ASSEMBLER +typedef int kern_return_t; +#endif /* ASSEMBLER */ + +#endif /* _MACH_I386_KERN_RETURN_H_ */ diff --git a/i386/include/mach/i386/machine_types.defs b/i386/include/mach/i386/machine_types.defs new file mode 100644 index 0000000..6a35615 --- /dev/null +++ b/i386/include/mach/i386/machine_types.defs @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ + +/* + * Header file for basic, machine-dependent data types. i386 version. + */ + +#ifndef _MACHINE_VM_TYPES_DEFS_ +#define _MACHINE_VM_TYPES_DEFS_ 1 + +type short = int16_t; +type int = int32_t; +type unsigned = uint32_t; + +type float = MACH_MSG_TYPE_REAL_32; +type double = MACH_MSG_TYPE_REAL_64; + + +/* from ISO/IEC 988:1999 spec */ +/* 7.18.1.4 Integer types capable of hgolding object pointers */ +/* + * The [u]intptr_t types for the native + * integer type, e.g. 32 or 64 or.. whatever + * register size the machine has. They are + * used for entities that might be either + * [unsigned] integers or pointers, and for + * type-casting between the two. + * + * For instance, the IPC system represents + * a port in user space as an integer and + * in kernel space as a pointer. + */ +#if defined(__LP64__) +type uintptr_t = uint64_t; +type intptr_t = int64_t; +#else +type uintptr_t = uint32_t; +type intptr_t = int32_t; +#endif + +/* + * These are the legacy Mach types that are + * the [rough] equivalents of the standards above. + * They were defined in terms of int, not + * long int, so they remain separate. + */ +#if defined(__LP64__) +type register_t = int64_t; +#else +type register_t = int32_t; +#endif +type integer_t = int32_t; +type natural_t = uint32_t; + +/* + * These are the VM types that scale with the address + * space size of a given process. + */ + +#if defined(__LP64__) +type vm_address_t = uint64_t; +type vm_offset_t = uint64_t; +type vm_size_t = uint64_t; +#else +type vm_address_t = natural_t; +type vm_offset_t = natural_t; +type vm_size_t = natural_t; +#endif + +/* + * The mach_vm_xxx_t types are sized to hold the + * maximum pointer, offset, etc... supported on the + * platform. + */ +type mach_vm_address_t = uint64_t; +type mach_vm_offset_t = uint64_t; +type mach_vm_size_t = uint64_t; + +#if MACH_IPC_COMPAT +/* + * For the old IPC interface + */ +#define MSG_TYPE_PORT_NAME natural_t + +#endif /* MACH_IPC_COMPAT */ + +/* + * These are types used internal to Mach to implement the + * legacy 32-bit VM APIs published by the kernel. + */ +#define VM32_SUPPORT 1 + +type vm32_address_t = uint32_t; +type vm32_offset_t = uint32_t; +type vm32_size_t = uint32_t; + +#endif /* _MACHINE_VM_TYPES_DEFS_ */ + +/* vim: set ft=c : */ diff --git a/i386/include/mach/i386/ndr_def.h b/i386/include/mach/i386/ndr_def.h new file mode 100644 index 0000000..5163f63 --- /dev/null +++ b/i386/include/mach/i386/ndr_def.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ + +/* NDR record for Intel x86s */ + +#include <mach/ndr.h> + +NDR_record_t NDR_record = { + 0, /* mig_reserved */ + 0, /* mig_reserved */ + 0, /* mig_reserved */ + NDR_PROTOCOL_2_0, + NDR_INT_LITTLE_ENDIAN, + NDR_CHAR_ASCII, + NDR_FLOAT_IEEE, + 0, +}; diff --git a/i386/include/mach/i386/processor_info.h b/i386/include/mach/i386/processor_info.h new file mode 100644 index 0000000..8272c6d --- /dev/null +++ b/i386/include/mach/i386/processor_info.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * File: mach/i386/processor_info.h + * + * Data structure definitions for i386 specific processor control + */ + +#ifndef _MACH_I386_PROCESSOR_INFO_H_ +#define _MACH_I386_PROCESSOR_INFO_H_ + +#endif /* _MACH_I386_PROCESSOR_INFO_H_ */ diff --git a/i386/include/mach/i386/rpc.h b/i386/include/mach/i386/rpc.h new file mode 100644 index 0000000..55561f9 --- /dev/null +++ b/i386/include/mach/i386/rpc.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002,2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ + +#ifndef _MACH_I386_RPC_H_ +#define _MACH_I386_RPC_H_ + +#endif /* _MACH_I386_RPC_H_ */ + diff --git a/i386/include/mach/i386/sdt_isa.h b/i386/include/mach/i386/sdt_isa.h new file mode 100644 index 0000000..7934a2c --- /dev/null +++ b/i386/include/mach/i386/sdt_isa.h @@ -0,0 +1,412 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _MACH_I386_SDT_ISA_H +#define _MACH_I386_SDT_ISA_H + +/* + * Only define when testing. This makes the calls into actual calls to + * test functions. + */ +/* #define DTRACE_CALL_TEST */ + +#define DTRACE_STRINGIFY(s) #s +#define DTRACE_TOSTRING(s) DTRACE_STRINGIFY(s) +#define DTRACE_LABEL(p, n) \ + "__dtrace_probe$" DTRACE_TOSTRING(__LINE__) DTRACE_STRINGIFY(_##p##___##n) ":" "\n\t" + +#ifdef DTRACE_CALL_TEST + +#define DTRACE_CALL(p,n) \ + DTRACE_LABEL(p,n) \ + DTRACE_CALL_INSN(p,n) + +#else + +#define DTRACE_CALL(p,n) \ + DTRACE_LABEL(p,n) \ + DTRACE_NOPS + +#endif + +#ifdef __x86_64__ + +#define DTRACE_NOPS \ + "nop" "\n\t" \ + "nop" "\n\t" \ + "nop" "\n\t" + +#define DTRACE_CALL_INSN(p,n) \ + "call _dtracetest" DTRACE_STRINGIFY(_##p##_##n) "\n\t" + +#define ARG1_EXTENT 1 +#define ARGS2_EXTENT 2 +#define ARGS3_EXTENT 3 +#define ARGS4_EXTENT 4 +#define ARGS5_EXTENT 5 +#define ARGS6_EXTENT 6 +#define ARGS7_EXTENT 7 +#define ARGS8_EXTENT 8 +#define ARGS9_EXTENT 10 +#define ARGS10_EXTENT 10 + +#define DTRACE_CALL0ARGS(provider, name) \ + asm volatile ( \ + DTRACE_CALL(provider, name) \ + ); + +#define DTRACE_CALL1ARG(provider, name) \ + asm volatile ("movq\t0x0(%0),%%rdi" "\n\t" \ + DTRACE_CALL(provider, name) \ + : \ + : "r" (__dtrace_args) \ + : "memory", "rdi" \ + ); + +#define DTRACE_CALL2ARGS(provider, name) \ + asm volatile ("movq\t0x0(%0),%%rdi" "\n\t" \ + "movq\t0x8(%0),%%rsi" "\n\t" \ + DTRACE_CALL(provider, name) \ + : \ + : "r" (__dtrace_args) \ + : "memory", "rdi", "rsi" \ + ); + +#define DTRACE_CALL3ARGS(provider, name) \ + asm volatile ("movq\t0x0(%0),%%rdi" "\n\t" \ + "movq\t0x8(%0),%%rsi" "\n\t" \ + "movq\t0x10(%0),%%rdx" "\n\t" \ + DTRACE_CALL(provider, name) \ + : \ + : "r" (__dtrace_args) \ + : "memory", "rdi", "rsi", "rdx" \ + ); + +#define DTRACE_CALL4ARGS(provider, name) \ + asm volatile ("movq\t0x0(%0),%%rdi" "\n\t" \ + "movq\t0x8(%0),%%rsi" "\n\t" \ + "movq\t0x10(%0),%%rdx" "\n\t" \ + "movq\t0x18(%0),%%rcx" "\n\t" \ + DTRACE_CALL(provider, name) \ + : \ + : "r" (__dtrace_args) \ + : "memory", "rdi", "rsi", "rdx", "rcx" \ + ); + +#define DTRACE_CALL5ARGS(provider, name) \ + asm volatile ("movq\t0x0(%0),%%rdi" "\n\t" \ + "movq\t0x8(%0),%%rsi" "\n\t" \ + "movq\t0x10(%0),%%rdx" "\n\t" \ + "movq\t0x18(%0),%%rcx" "\n\t" \ + "movq\t0x20(%0),%%r8" "\n\t" \ + DTRACE_CALL(provider, name) \ + : \ + : "r" (__dtrace_args) \ + : "memory", "rdi", "rsi", "rdx", "rcx", "r8" \ + ); + +#define DTRACE_CALL6ARGS(provider, name) \ + asm volatile ("movq\t0x0(%0),%%rdi" "\n\t" \ + "movq\t0x8(%0),%%rsi" "\n\t" \ + "movq\t0x10(%0),%%rdx" "\n\t" \ + "movq\t0x18(%0),%%rcx" "\n\t" \ + "movq\t0x20(%0),%%r8" "\n\t" \ + "movq\t0x28(%0),%%r9" "\n\t" \ + DTRACE_CALL(provider, name) \ + : \ + : "r" (__dtrace_args) \ + : "memory", "rdi", "rsi", "rdx", "rcx", "r8", "r9" \ + ); + +#define DTRACE_CALL7ARGS(provider, name) \ + asm volatile ("subq\t$0x8,%%rsp" "\n\t" \ + "movq\t0x0(%0),%%rdi" "\n\t" \ + "movq\t0x8(%0),%%rsi" "\n\t" \ + "movq\t0x10(%0),%%rdx" "\n\t" \ + "movq\t0x18(%0),%%rcx" "\n\t" \ + "movq\t0x20(%0),%%r8" "\n\t" \ + "movq\t0x28(%0),%%r9" "\n\t" \ + "movq\t0x30(%0),%%rax" "\n\t" \ + "movq\t%%rax,0x0(%%rsp)" "\n\t" \ + DTRACE_CALL(provider, name) \ + "addq\t$0x8,%%rsp" "\n\t" \ + : \ + : "r" (__dtrace_args) \ + : "memory", "rdi", "rsi", "rdx", "rcx", "r8", "r9", "rax" \ + ); + +#endif // __x86_64__ + +#ifdef __i386__ + +#define DTRACE_NOPS \ + "nop" "\n\t" \ + "leal 0(%%esi), %%esi" "\n\t" + +#define DTRACE_CALL_INSN(p,n) \ + "call _dtracetest" DTRACE_STRINGIFY(_##p##_##n) "\n\t" + +#define ARG1_EXTENT 1 +#define ARGS2_EXTENT 2 +#define ARGS3_EXTENT 4 +#define ARGS4_EXTENT 4 +#define ARGS5_EXTENT 8 +#define ARGS6_EXTENT 8 +#define ARGS7_EXTENT 8 +#define ARGS8_EXTENT 8 +#define ARGS9_EXTENT 12 +#define ARGS10_EXTENT 12 + +/* + * Because this code is used in the kernel, we must not touch any floating point + * or specialized registers. This leaves the following registers: + * + * eax ; volatile, safe to use + * ebx ; PIC register, gcc error when used + * ecx ; volatile, safe to use + * edx ; volatile, safe to use + * esi ; non-volatile, otherwise safe to use + * edi ; non-volatile, otherwise safe to use + * + * Using any of the non volatile register causes a spill to stack which is almost + * certainly a net performance loss. Also, note that the array ref (__dtrace_args) + * consumes one free register. If all three of the volatile regs are used for load/store, + * the compiler will spill a register to hold the array ref. + * + * The end result is that we only pipeline two loads/stores at a time. Blech. + */ + +#define DTRACE_CALL0ARGS(provider, name) \ + asm volatile ( \ + DTRACE_CALL(provider, name) \ + "# eat trailing nl +tabfrom DTRACE_CALL" \ + : \ + : \ + ); + +#define DTRACE_CALL1ARG(provider, name) \ + asm volatile ("subl\t$0x10,%%esp" "\n\t" \ + "movl\t0x0(%0),%%eax" "\n\t" \ + "movl\t%%eax,0x0(%%esp)" "\n\t" \ + DTRACE_CALL(provider, name) \ + "addl\t$0x10,%%esp" \ + : \ + : "r" (__dtrace_args) \ + : "memory", "eax" \ + ); + +#define DTRACE_CALL2ARGS(provider, name) \ + asm volatile ("subl\t$0x10,%%esp" "\n\t" \ + "movl\t0x0(%0),%%eax" "\n\t" \ + "movl\t0x4(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x0(%%esp)" "\n\t" \ + "movl\t%%edx,0x4(%%esp)" "\n\t" \ + DTRACE_CALL(provider, name) \ + "addl\t$0x10,%%esp" \ + : \ + : "r" (__dtrace_args) \ + : "memory", "eax", "edx" \ + ); + +#define DTRACE_CALL3ARGS(provider, name) \ + asm volatile ("subl\t$0x10,%%esp" "\n\t" \ + "movl\t0x0(%0),%%eax" "\n\t" \ + "movl\t0x4(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x0(%%esp)" "\n\t" \ + "movl\t%%edx,0x4(%%esp)" "\n\t" \ + "movl\t0x8(%0),%%eax" "\n\t" \ + "movl\t%%eax,0x8(%%esp)" "\n\t" \ + DTRACE_CALL(provider, name) \ + "addl\t$0x10,%%esp" \ + : \ + : "r" (__dtrace_args) \ + : "memory", "eax", "edx" \ + ); + +#define DTRACE_CALL4ARGS(provider, name) \ + asm volatile ("subl\t$0x10,%%esp" "\n\t" \ + "movl\t0x0(%0),%%eax" "\n\t" \ + "movl\t0x4(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x0(%%esp)" "\n\t" \ + "movl\t%%edx,0x4(%%esp)" "\n\t" \ + "movl\t0x8(%0),%%eax" "\n\t" \ + "movl\t0xC(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x8(%%esp)" "\n\t" \ + "movl\t%%edx,0xC(%%esp)" "\n\t" \ + DTRACE_CALL(provider, name) \ + "addl\t$0x10,%%esp" \ + : \ + : "r" (__dtrace_args) \ + : "memory", "eax", "edx" \ + ); + +#define DTRACE_CALL5ARGS(provider, name) \ + asm volatile ("subl\t$0x20,%%esp" "\n\t" \ + "movl\t0x0(%0),%%eax" "\n\t" \ + "movl\t0x4(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x0(%%esp)" "\n\t" \ + "movl\t%%edx,0x4(%%esp)" "\n\t" \ + "movl\t0x8(%0),%%eax" "\n\t" \ + "movl\t0xC(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x8(%%esp)" "\n\t" \ + "movl\t%%edx,0xC(%%esp)" "\n\t" \ + "movl\t0x10(%0),%%eax" "\n\t" \ + "movl\t%%eax,0x10(%%esp)" "\n\t" \ + DTRACE_CALL(provider, name) \ + "addl\t$0x20,%%esp" \ + : \ + : "r" (__dtrace_args) \ + : "memory", "eax", "edx" \ + ); + +#define DTRACE_CALL6ARGS(provider, name) \ + asm volatile ("subl\t$0x20,%%esp" "\n\t" \ + "movl\t0x0(%0),%%eax" "\n\t" \ + "movl\t0x4(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x0(%%esp)" "\n\t" \ + "movl\t%%edx,0x4(%%esp)" "\n\t" \ + "movl\t0x8(%0),%%eax" "\n\t" \ + "movl\t0xC(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x8(%%esp)" "\n\t" \ + "movl\t%%edx,0xC(%%esp)" "\n\t" \ + "movl\t0x10(%0),%%eax" "\n\t" \ + "movl\t0x14(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x10(%%esp)" "\n\t" \ + "movl\t%%edx,0x14(%%esp)" "\n\t" \ + DTRACE_CALL(provider, name) \ + "addl\t$0x20,%%esp" \ + : \ + : "r" (__dtrace_args) \ + : "memory", "eax", "edx" \ + ); + +#define DTRACE_CALL7ARGS(provider, name) \ + asm volatile ("subl\t$0x20,%%esp" "\n\t" \ + "movl\t0x0(%0),%%eax" "\n\t" \ + "movl\t0x4(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x0(%%esp)" "\n\t" \ + "movl\t%%edx,0x4(%%esp)" "\n\t" \ + "movl\t0x8(%0),%%eax" "\n\t" \ + "movl\t0xC(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x8(%%esp)" "\n\t" \ + "movl\t%%edx,0xC(%%esp)" "\n\t" \ + "movl\t0x10(%0),%%eax" "\n\t" \ + "movl\t0x14(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x10(%%esp)" "\n\t" \ + "movl\t%%edx,0x14(%%esp)" "\n\t" \ + "movl\t0x18(%0),%%eax" "\n\t" \ + "movl\t%%eax,0x18(%%esp)" "\n\t" \ + DTRACE_CALL(provider, name) \ + "addl\t$0x20,%%esp" \ + : \ + : "r" (__dtrace_args) \ + : "memory", "eax", "edx" \ + ); + +#define DTRACE_CALL8ARGS(provider, name) \ + asm volatile ("subl\t$0x20,%%esp" "\n\t" \ + "movl\t0x0(%0),%%eax" "\n\t" \ + "movl\t0x4(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x0(%%esp)" "\n\t" \ + "movl\t%%edx,0x4(%%esp)" "\n\t" \ + "movl\t0x8(%0),%%eax" "\n\t" \ + "movl\t0xC(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x8(%%esp)" "\n\t" \ + "movl\t%%edx,0xC(%%esp)" "\n\t" \ + "movl\t0x10(%0),%%eax" "\n\t" \ + "movl\t0x14(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x10(%%esp)" "\n\t" \ + "movl\t%%edx,0x14(%%esp)" "\n\t" \ + "movl\t0x18(%0),%%eax" "\n\t" \ + "movl\t0x1C(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x18(%%esp)" "\n\t" \ + "movl\t%%edx,0x1C(%%esp)" "\n\t" \ + DTRACE_CALL(provider, name) \ + "addl\t$0x20,%%esp" \ + : \ + : "r" (__dtrace_args) \ + : "memory", "eax", "edx" \ + ); + +#define DTRACE_CALL9ARGS(provider, name) \ + asm volatile ("subl\t$0x30,%%esp" "\n\t" \ + "movl\t0x0(%0),%%eax" "\n\t" \ + "movl\t0x4(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x0(%%esp)" "\n\t" \ + "movl\t%%edx,0x4(%%esp)" "\n\t" \ + "movl\t0x8(%0),%%eax" "\n\t" \ + "movl\t0xC(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x8(%%esp)" "\n\t" \ + "movl\t%%edx,0xC(%%esp)" "\n\t" \ + "movl\t0x10(%0),%%eax" "\n\t" \ + "movl\t0x14(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x10(%%esp)" "\n\t" \ + "movl\t%%edx,0x14(%%esp)" "\n\t" \ + "movl\t0x18(%0),%%eax" "\n\t" \ + "movl\t0x1C(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x18(%%esp)" "\n\t" \ + "movl\t%%edx,0x1C(%%esp)" "\n\t" \ + "movl\t0x20(%0),%%eax" "\n\t" \ + "movl\t%%eax,0x20(%%esp)" "\n\t" \ + DTRACE_CALL(provider, name) \ + "addl\t$0x30,%%esp" \ + : \ + : "r" (__dtrace_args) \ + : "memory", "eax", "edx" \ + ); + +#define DTRACE_CALL10ARGS(provider, name) \ + asm volatile ("subl\t$0x30,%%esp" "\n\t" \ + "movl\t0x0(%0),%%eax" "\n\t" \ + "movl\t0x4(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x0(%%esp)" "\n\t" \ + "movl\t%%edx,0x4(%%esp)" "\n\t" \ + "movl\t0x8(%0),%%eax" "\n\t" \ + "movl\t0xC(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x8(%%esp)" "\n\t" \ + "movl\t%%edx,0xC(%%esp)" "\n\t" \ + "movl\t0x10(%0),%%eax" "\n\t" \ + "movl\t0x14(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x10(%%esp)" "\n\t" \ + "movl\t%%edx,0x14(%%esp)" "\n\t" \ + "movl\t0x18(%0),%%eax" "\n\t" \ + "movl\t0x1C(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x18(%%esp)" "\n\t" \ + "movl\t%%edx,0x1C(%%esp)" "\n\t" \ + "movl\t0x20(%0),%%eax" "\n\t" \ + "movl\t0x24(%0),%%edx" "\n\t" \ + "movl\t%%eax,0x20(%%esp)" "\n\t" \ + "movl\t%%edx,0x24(%%esp)" "\n\t" \ + DTRACE_CALL(provider, name) \ + "addl\t$0x30,%%esp" \ + : \ + : "r" (__dtrace_args) \ + : "memory", "eax", "edx" \ + ); + +#endif // __i386__ + +#endif /* _MACH_I386_SDT_ISA_H */ diff --git a/i386/include/mach/i386/task.h b/i386/include/mach/i386/task.h new file mode 100644 index 0000000..15c8248 --- /dev/null +++ b/i386/include/mach/i386/task.h @@ -0,0 +1,1578 @@ +#ifndef _task_user_ +#define _task_user_ + +/* Module task */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef task_MSG_COUNT +#define task_MSG_COUNT 35 +#endif /* task_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mig.h> +#include <mach/mach_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine task_create */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_create +( + task_t target_task, + ledger_array_t ledgers, + mach_msg_type_number_t ledgersCnt, + boolean_t inherit_memory, + task_t *child_task +); + +/* Routine task_terminate */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_terminate +( + task_t target_task +); + +/* Routine task_threads */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_threads +( + task_t target_task, + thread_act_array_t *act_list, + mach_msg_type_number_t *act_listCnt +); + +/* Routine mach_ports_register */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_ports_register +( + task_t target_task, + mach_port_array_t init_port_set, + mach_msg_type_number_t init_port_setCnt +); + +/* Routine mach_ports_lookup */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_ports_lookup +( + task_t target_task, + mach_port_array_t *init_port_set, + mach_msg_type_number_t *init_port_setCnt +); + +/* Routine task_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_info +( + task_name_t target_task, + task_flavor_t flavor, + task_info_t task_info_out, + mach_msg_type_number_t *task_info_outCnt +); + +/* Routine task_set_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_info +( + task_t target_task, + task_flavor_t flavor, + task_info_t task_info_in, + mach_msg_type_number_t task_info_inCnt +); + +/* Routine task_suspend */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_suspend +( + task_t target_task +); + +/* Routine task_resume */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_resume +( + task_t target_task +); + +/* Routine task_get_special_port */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_get_special_port +( + task_t task, + int which_port, + mach_port_t *special_port +); + +/* Routine task_set_special_port */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_special_port +( + task_t task, + int which_port, + mach_port_t special_port +); + +/* Routine thread_create */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_create +( + task_t parent_task, + thread_act_t *child_act +); + +/* Routine thread_create_running */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_create_running +( + task_t parent_task, + thread_state_flavor_t flavor, + thread_state_t new_state, + mach_msg_type_number_t new_stateCnt, + thread_act_t *child_act +); + +/* Routine task_set_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_exception_ports +( + task_t task, + exception_mask_t exception_mask, + mach_port_t new_port, + exception_behavior_t behavior, + thread_state_flavor_t new_flavor +); + +/* Routine task_get_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_get_exception_ports +( + task_t task, + exception_mask_t exception_mask, + exception_mask_array_t masks, + mach_msg_type_number_t *masksCnt, + exception_handler_array_t old_handlers, + exception_behavior_array_t old_behaviors, + exception_flavor_array_t old_flavors +); + +/* Routine task_swap_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_swap_exception_ports +( + task_t task, + exception_mask_t exception_mask, + mach_port_t new_port, + exception_behavior_t behavior, + thread_state_flavor_t new_flavor, + exception_mask_array_t masks, + mach_msg_type_number_t *masksCnt, + exception_handler_array_t old_handlerss, + exception_behavior_array_t old_behaviors, + exception_flavor_array_t old_flavors +); + +/* Routine lock_set_create */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t lock_set_create +( + task_t task, + lock_set_t *new_lock_set, + int n_ulocks, + int policy +); + +/* Routine lock_set_destroy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t lock_set_destroy +( + task_t task, + lock_set_t lock_set +); + +/* Routine semaphore_create */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t semaphore_create +( + task_t task, + semaphore_t *semaphore, + int policy, + int value +); + +/* Routine semaphore_destroy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t semaphore_destroy +( + task_t task, + semaphore_t semaphore +); + +/* Routine task_policy_set */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_policy_set +( + task_t task, + task_policy_flavor_t flavor, + task_policy_t policy_info, + mach_msg_type_number_t policy_infoCnt +); + +/* Routine task_policy_get */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_policy_get +( + task_t task, + task_policy_flavor_t flavor, + task_policy_t policy_info, + mach_msg_type_number_t *policy_infoCnt, + boolean_t *get_default +); + +/* Routine task_sample */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_sample +( + task_t task, + mach_port_t reply +); + +/* Routine task_policy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_policy +( + task_t task, + policy_t policy, + policy_base_t base, + mach_msg_type_number_t baseCnt, + boolean_t set_limit, + boolean_t change +); + +/* Routine task_set_emulation */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_emulation +( + task_t target_port, + vm_address_t routine_entry_pt, + int routine_number +); + +/* Routine task_get_emulation_vector */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_get_emulation_vector +( + task_t task, + int *vector_start, + emulation_vector_t *emulation_vector, + mach_msg_type_number_t *emulation_vectorCnt +); + +/* Routine task_set_emulation_vector */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_emulation_vector +( + task_t task, + int vector_start, + emulation_vector_t emulation_vector, + mach_msg_type_number_t emulation_vectorCnt +); + +/* Routine task_set_ras_pc */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_ras_pc +( + task_t target_task, + vm_address_t basepc, + vm_address_t boundspc +); + +/* Routine task_assign */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_assign +( + task_t task, + processor_set_t new_set, + boolean_t assign_threads +); + +/* Routine task_assign_default */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_assign_default +( + task_t task, + boolean_t assign_threads +); + +/* Routine task_get_assignment */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_get_assignment +( + task_t task, + processor_set_name_t *assigned_set +); + +/* Routine task_set_policy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_policy +( + task_t task, + processor_set_t pset, + policy_t policy, + policy_base_t base, + mach_msg_type_number_t baseCnt, + policy_limit_t limit, + mach_msg_type_number_t limitCnt, + boolean_t change +); + +/* Routine task_get_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_get_state +( + task_t task, + thread_state_flavor_t flavor, + thread_state_t old_state, + mach_msg_type_number_t *old_stateCnt +); + +/* Routine task_set_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_state +( + task_t task, + thread_state_flavor_t flavor, + thread_state_t new_state, + mach_msg_type_number_t new_stateCnt +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__task_subsystem__defined +#define __Request__task_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_ports_descriptor_t ledgers; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t ledgersCnt; + boolean_t inherit_memory; + } __Request__task_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_terminate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_threads_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_ports_descriptor_t init_port_set; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t init_port_setCnt; + } __Request__mach_ports_register_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__mach_ports_lookup_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + task_flavor_t flavor; + mach_msg_type_number_t task_info_outCnt; + } __Request__task_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + task_flavor_t flavor; + mach_msg_type_number_t task_info_inCnt; + integer_t task_info_in[10]; + } __Request__task_set_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_suspend_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_resume_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int which_port; + } __Request__task_get_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t special_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + int which_port; + } __Request__task_set_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_state_flavor_t flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[144]; + } __Request__thread_create_running_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_mask_t exception_mask; + exception_behavior_t behavior; + thread_state_flavor_t new_flavor; + } __Request__task_set_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + exception_mask_t exception_mask; + } __Request__task_get_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_mask_t exception_mask; + exception_behavior_t behavior; + thread_state_flavor_t new_flavor; + } __Request__task_swap_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int n_ulocks; + int policy; + } __Request__lock_set_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t lock_set; + /* end of the kernel processed data */ + } __Request__lock_set_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int policy; + int value; + } __Request__semaphore_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t semaphore; + /* end of the kernel processed data */ + } __Request__semaphore_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + task_policy_flavor_t flavor; + mach_msg_type_number_t policy_infoCnt; + integer_t policy_info[16]; + } __Request__task_policy_set_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + task_policy_flavor_t flavor; + mach_msg_type_number_t policy_infoCnt; + boolean_t get_default; + } __Request__task_policy_get_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t reply; + /* end of the kernel processed data */ + } __Request__task_sample_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + policy_t policy; + mach_msg_type_number_t baseCnt; + integer_t base[5]; + boolean_t set_limit; + boolean_t change; + } __Request__task_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t routine_entry_pt; + int routine_number; + } __Request__task_set_emulation_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_get_emulation_vector_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t emulation_vector; + /* end of the kernel processed data */ + NDR_record_t NDR; + int vector_start; + mach_msg_type_number_t emulation_vectorCnt; + } __Request__task_set_emulation_vector_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t basepc; + vm_address_t boundspc; + } __Request__task_set_ras_pc_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_set; + /* end of the kernel processed data */ + NDR_record_t NDR; + boolean_t assign_threads; + } __Request__task_assign_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + boolean_t assign_threads; + } __Request__task_assign_default_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_get_assignment_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t pset; + /* end of the kernel processed data */ + NDR_record_t NDR; + policy_t policy; + mach_msg_type_number_t baseCnt; + integer_t base[5]; + mach_msg_type_number_t limitCnt; + integer_t limit[1]; + boolean_t change; + } __Request__task_set_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_state_flavor_t flavor; + mach_msg_type_number_t old_stateCnt; + } __Request__task_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_state_flavor_t flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[144]; + } __Request__task_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__task_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__task_subsystem__defined +#define __RequestUnion__task_subsystem__defined +union __RequestUnion__task_subsystem { + __Request__task_create_t Request_task_create; + __Request__task_terminate_t Request_task_terminate; + __Request__task_threads_t Request_task_threads; + __Request__mach_ports_register_t Request_mach_ports_register; + __Request__mach_ports_lookup_t Request_mach_ports_lookup; + __Request__task_info_t Request_task_info; + __Request__task_set_info_t Request_task_set_info; + __Request__task_suspend_t Request_task_suspend; + __Request__task_resume_t Request_task_resume; + __Request__task_get_special_port_t Request_task_get_special_port; + __Request__task_set_special_port_t Request_task_set_special_port; + __Request__thread_create_t Request_thread_create; + __Request__thread_create_running_t Request_thread_create_running; + __Request__task_set_exception_ports_t Request_task_set_exception_ports; + __Request__task_get_exception_ports_t Request_task_get_exception_ports; + __Request__task_swap_exception_ports_t Request_task_swap_exception_ports; + __Request__lock_set_create_t Request_lock_set_create; + __Request__lock_set_destroy_t Request_lock_set_destroy; + __Request__semaphore_create_t Request_semaphore_create; + __Request__semaphore_destroy_t Request_semaphore_destroy; + __Request__task_policy_set_t Request_task_policy_set; + __Request__task_policy_get_t Request_task_policy_get; + __Request__task_sample_t Request_task_sample; + __Request__task_policy_t Request_task_policy; + __Request__task_set_emulation_t Request_task_set_emulation; + __Request__task_get_emulation_vector_t Request_task_get_emulation_vector; + __Request__task_set_emulation_vector_t Request_task_set_emulation_vector; + __Request__task_set_ras_pc_t Request_task_set_ras_pc; + __Request__task_assign_t Request_task_assign; + __Request__task_assign_default_t Request_task_assign_default; + __Request__task_get_assignment_t Request_task_get_assignment; + __Request__task_set_policy_t Request_task_set_policy; + __Request__task_get_state_t Request_task_get_state; + __Request__task_set_state_t Request_task_set_state; +}; +#endif /* !__RequestUnion__task_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__task_subsystem__defined +#define __Reply__task_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t child_task; + /* end of the kernel processed data */ + } __Reply__task_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_terminate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_ports_descriptor_t act_list; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t act_listCnt; + } __Reply__task_threads_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_ports_register_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_ports_descriptor_t init_port_set; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t init_port_setCnt; + } __Reply__mach_ports_lookup_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t task_info_outCnt; + integer_t task_info_out[10]; + } __Reply__task_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_suspend_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_resume_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t special_port; + /* end of the kernel processed data */ + } __Reply__task_get_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t child_act; + /* end of the kernel processed data */ + } __Reply__thread_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t child_act; + /* end of the kernel processed data */ + } __Reply__thread_create_running_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t old_handlers[32]; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t masksCnt; + exception_mask_t masks[32]; + exception_behavior_t old_behaviors[32]; + thread_state_flavor_t old_flavors[32]; + } __Reply__task_get_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t old_handlerss[32]; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t masksCnt; + exception_mask_t masks[32]; + exception_behavior_t old_behaviors[32]; + thread_state_flavor_t old_flavors[32]; + } __Reply__task_swap_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_lock_set; + /* end of the kernel processed data */ + } __Reply__lock_set_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__lock_set_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t semaphore; + /* end of the kernel processed data */ + } __Reply__semaphore_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__semaphore_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_policy_set_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t policy_infoCnt; + integer_t policy_info[16]; + boolean_t get_default; + } __Reply__task_policy_get_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_sample_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_emulation_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t emulation_vector; + /* end of the kernel processed data */ + NDR_record_t NDR; + int vector_start; + mach_msg_type_number_t emulation_vectorCnt; + } __Reply__task_get_emulation_vector_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_emulation_vector_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_ras_pc_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_assign_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_assign_default_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t assigned_set; + /* end of the kernel processed data */ + } __Reply__task_get_assignment_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[144]; + } __Reply__task_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__task_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__task_subsystem__defined +#define __ReplyUnion__task_subsystem__defined +union __ReplyUnion__task_subsystem { + __Reply__task_create_t Reply_task_create; + __Reply__task_terminate_t Reply_task_terminate; + __Reply__task_threads_t Reply_task_threads; + __Reply__mach_ports_register_t Reply_mach_ports_register; + __Reply__mach_ports_lookup_t Reply_mach_ports_lookup; + __Reply__task_info_t Reply_task_info; + __Reply__task_set_info_t Reply_task_set_info; + __Reply__task_suspend_t Reply_task_suspend; + __Reply__task_resume_t Reply_task_resume; + __Reply__task_get_special_port_t Reply_task_get_special_port; + __Reply__task_set_special_port_t Reply_task_set_special_port; + __Reply__thread_create_t Reply_thread_create; + __Reply__thread_create_running_t Reply_thread_create_running; + __Reply__task_set_exception_ports_t Reply_task_set_exception_ports; + __Reply__task_get_exception_ports_t Reply_task_get_exception_ports; + __Reply__task_swap_exception_ports_t Reply_task_swap_exception_ports; + __Reply__lock_set_create_t Reply_lock_set_create; + __Reply__lock_set_destroy_t Reply_lock_set_destroy; + __Reply__semaphore_create_t Reply_semaphore_create; + __Reply__semaphore_destroy_t Reply_semaphore_destroy; + __Reply__task_policy_set_t Reply_task_policy_set; + __Reply__task_policy_get_t Reply_task_policy_get; + __Reply__task_sample_t Reply_task_sample; + __Reply__task_policy_t Reply_task_policy; + __Reply__task_set_emulation_t Reply_task_set_emulation; + __Reply__task_get_emulation_vector_t Reply_task_get_emulation_vector; + __Reply__task_set_emulation_vector_t Reply_task_set_emulation_vector; + __Reply__task_set_ras_pc_t Reply_task_set_ras_pc; + __Reply__task_assign_t Reply_task_assign; + __Reply__task_assign_default_t Reply_task_assign_default; + __Reply__task_get_assignment_t Reply_task_get_assignment; + __Reply__task_set_policy_t Reply_task_set_policy; + __Reply__task_get_state_t Reply_task_get_state; + __Reply__task_set_state_t Reply_task_set_state; +}; +#endif /* !__RequestUnion__task_subsystem__defined */ + +#ifndef subsystem_to_name_map_task +#define subsystem_to_name_map_task \ + { "task_create", 3400 },\ + { "task_terminate", 3401 },\ + { "task_threads", 3402 },\ + { "mach_ports_register", 3403 },\ + { "mach_ports_lookup", 3404 },\ + { "task_info", 3405 },\ + { "task_set_info", 3406 },\ + { "task_suspend", 3407 },\ + { "task_resume", 3408 },\ + { "task_get_special_port", 3409 },\ + { "task_set_special_port", 3410 },\ + { "thread_create", 3411 },\ + { "thread_create_running", 3412 },\ + { "task_set_exception_ports", 3413 },\ + { "task_get_exception_ports", 3414 },\ + { "task_swap_exception_ports", 3415 },\ + { "lock_set_create", 3416 },\ + { "lock_set_destroy", 3417 },\ + { "semaphore_create", 3418 },\ + { "semaphore_destroy", 3419 },\ + { "task_policy_set", 3420 },\ + { "task_policy_get", 3421 },\ + { "task_sample", 3422 },\ + { "task_policy", 3423 },\ + { "task_set_emulation", 3424 },\ + { "task_get_emulation_vector", 3425 },\ + { "task_set_emulation_vector", 3426 },\ + { "task_set_ras_pc", 3427 },\ + { "task_assign", 3429 },\ + { "task_assign_default", 3430 },\ + { "task_get_assignment", 3431 },\ + { "task_set_policy", 3432 },\ + { "task_get_state", 3433 },\ + { "task_set_state", 3434 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _task_user_ */ diff --git a/i386/include/mach/i386/thread_act.h b/i386/include/mach/i386/thread_act.h new file mode 100644 index 0000000..fde4189 --- /dev/null +++ b/i386/include/mach/i386/thread_act.h @@ -0,0 +1,1155 @@ +#ifndef _thread_act_user_ +#define _thread_act_user_ + +/* Module thread_act */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef thread_act_MSG_COUNT +#define thread_act_MSG_COUNT 25 +#endif /* thread_act_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mig.h> +#include <mach/mach_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine thread_terminate */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_terminate +( + thread_act_t target_act +); + +/* Routine act_get_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t act_get_state +( + thread_act_t target_act, + int flavor, + thread_state_t old_state, + mach_msg_type_number_t *old_stateCnt +); + +/* Routine act_set_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t act_set_state +( + thread_act_t target_act, + int flavor, + thread_state_t new_state, + mach_msg_type_number_t new_stateCnt +); + +/* Routine thread_get_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_get_state +( + thread_act_t target_act, + thread_state_flavor_t flavor, + thread_state_t old_state, + mach_msg_type_number_t *old_stateCnt +); + +/* Routine thread_set_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_set_state +( + thread_act_t target_act, + thread_state_flavor_t flavor, + thread_state_t new_state, + mach_msg_type_number_t new_stateCnt +); + +/* Routine thread_suspend */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_suspend +( + thread_act_t target_act +); + +/* Routine thread_resume */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_resume +( + thread_act_t target_act +); + +/* Routine thread_abort */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_abort +( + thread_act_t target_act +); + +/* Routine thread_abort_safely */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_abort_safely +( + thread_act_t target_act +); + +/* Routine thread_depress_abort */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_depress_abort +( + thread_act_t thread +); + +/* Routine thread_get_special_port */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_get_special_port +( + thread_act_t thr_act, + int which_port, + mach_port_t *special_port +); + +/* Routine thread_set_special_port */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_set_special_port +( + thread_act_t thr_act, + int which_port, + mach_port_t special_port +); + +/* Routine thread_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_info +( + thread_act_t target_act, + thread_flavor_t flavor, + thread_info_t thread_info_out, + mach_msg_type_number_t *thread_info_outCnt +); + +/* Routine thread_set_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_set_exception_ports +( + thread_act_t thread, + exception_mask_t exception_mask, + mach_port_t new_port, + exception_behavior_t behavior, + thread_state_flavor_t new_flavor +); + +/* Routine thread_get_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_get_exception_ports +( + thread_act_t thread, + exception_mask_t exception_mask, + exception_mask_array_t masks, + mach_msg_type_number_t *masksCnt, + exception_handler_array_t old_handlers, + exception_behavior_array_t old_behaviors, + exception_flavor_array_t old_flavors +); + +/* Routine thread_swap_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_swap_exception_ports +( + thread_act_t thread, + exception_mask_t exception_mask, + mach_port_t new_port, + exception_behavior_t behavior, + thread_state_flavor_t new_flavor, + exception_mask_array_t masks, + mach_msg_type_number_t *masksCnt, + exception_handler_array_t old_handlers, + exception_behavior_array_t old_behaviors, + exception_flavor_array_t old_flavors +); + +/* Routine thread_policy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_policy +( + thread_act_t thr_act, + policy_t policy, + policy_base_t base, + mach_msg_type_number_t baseCnt, + boolean_t set_limit +); + +/* Routine thread_policy_set */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_policy_set +( + thread_act_t thread, + thread_policy_flavor_t flavor, + thread_policy_t policy_info, + mach_msg_type_number_t policy_infoCnt +); + +/* Routine thread_policy_get */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_policy_get +( + thread_act_t thread, + thread_policy_flavor_t flavor, + thread_policy_t policy_info, + mach_msg_type_number_t *policy_infoCnt, + boolean_t *get_default +); + +/* Routine thread_sample */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_sample +( + thread_act_t thread, + mach_port_t reply +); + +/* Routine etap_trace_thread */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t etap_trace_thread +( + thread_act_t target_act, + boolean_t trace_status +); + +/* Routine thread_assign */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_assign +( + thread_act_t thread, + processor_set_t new_set +); + +/* Routine thread_assign_default */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_assign_default +( + thread_act_t thread +); + +/* Routine thread_get_assignment */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_get_assignment +( + thread_act_t thread, + processor_set_name_t *assigned_set +); + +/* Routine thread_set_policy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_set_policy +( + thread_act_t thr_act, + processor_set_t pset, + policy_t policy, + policy_base_t base, + mach_msg_type_number_t baseCnt, + policy_limit_t limit, + mach_msg_type_number_t limitCnt +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__thread_act_subsystem__defined +#define __Request__thread_act_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_terminate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int flavor; + mach_msg_type_number_t old_stateCnt; + } __Request__act_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[144]; + } __Request__act_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_state_flavor_t flavor; + mach_msg_type_number_t old_stateCnt; + } __Request__thread_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_state_flavor_t flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[144]; + } __Request__thread_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_suspend_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_resume_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_abort_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_abort_safely_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_depress_abort_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int which_port; + } __Request__thread_get_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t special_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + int which_port; + } __Request__thread_set_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_flavor_t flavor; + mach_msg_type_number_t thread_info_outCnt; + } __Request__thread_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_mask_t exception_mask; + exception_behavior_t behavior; + thread_state_flavor_t new_flavor; + } __Request__thread_set_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + exception_mask_t exception_mask; + } __Request__thread_get_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_mask_t exception_mask; + exception_behavior_t behavior; + thread_state_flavor_t new_flavor; + } __Request__thread_swap_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + policy_t policy; + mach_msg_type_number_t baseCnt; + integer_t base[5]; + boolean_t set_limit; + } __Request__thread_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_policy_flavor_t flavor; + mach_msg_type_number_t policy_infoCnt; + integer_t policy_info[16]; + } __Request__thread_policy_set_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_policy_flavor_t flavor; + mach_msg_type_number_t policy_infoCnt; + boolean_t get_default; + } __Request__thread_policy_get_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t reply; + /* end of the kernel processed data */ + } __Request__thread_sample_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + boolean_t trace_status; + } __Request__etap_trace_thread_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_set; + /* end of the kernel processed data */ + } __Request__thread_assign_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_assign_default_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_get_assignment_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t pset; + /* end of the kernel processed data */ + NDR_record_t NDR; + policy_t policy; + mach_msg_type_number_t baseCnt; + integer_t base[5]; + mach_msg_type_number_t limitCnt; + integer_t limit[1]; + } __Request__thread_set_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__thread_act_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__thread_act_subsystem__defined +#define __RequestUnion__thread_act_subsystem__defined +union __RequestUnion__thread_act_subsystem { + __Request__thread_terminate_t Request_thread_terminate; + __Request__act_get_state_t Request_act_get_state; + __Request__act_set_state_t Request_act_set_state; + __Request__thread_get_state_t Request_thread_get_state; + __Request__thread_set_state_t Request_thread_set_state; + __Request__thread_suspend_t Request_thread_suspend; + __Request__thread_resume_t Request_thread_resume; + __Request__thread_abort_t Request_thread_abort; + __Request__thread_abort_safely_t Request_thread_abort_safely; + __Request__thread_depress_abort_t Request_thread_depress_abort; + __Request__thread_get_special_port_t Request_thread_get_special_port; + __Request__thread_set_special_port_t Request_thread_set_special_port; + __Request__thread_info_t Request_thread_info; + __Request__thread_set_exception_ports_t Request_thread_set_exception_ports; + __Request__thread_get_exception_ports_t Request_thread_get_exception_ports; + __Request__thread_swap_exception_ports_t Request_thread_swap_exception_ports; + __Request__thread_policy_t Request_thread_policy; + __Request__thread_policy_set_t Request_thread_policy_set; + __Request__thread_policy_get_t Request_thread_policy_get; + __Request__thread_sample_t Request_thread_sample; + __Request__etap_trace_thread_t Request_etap_trace_thread; + __Request__thread_assign_t Request_thread_assign; + __Request__thread_assign_default_t Request_thread_assign_default; + __Request__thread_get_assignment_t Request_thread_get_assignment; + __Request__thread_set_policy_t Request_thread_set_policy; +}; +#endif /* !__RequestUnion__thread_act_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__thread_act_subsystem__defined +#define __Reply__thread_act_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_terminate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[144]; + } __Reply__act_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__act_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[144]; + } __Reply__thread_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_suspend_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_resume_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_abort_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_abort_safely_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_depress_abort_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t special_port; + /* end of the kernel processed data */ + } __Reply__thread_get_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_set_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t thread_info_outCnt; + integer_t thread_info_out[12]; + } __Reply__thread_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_set_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t old_handlers[32]; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t masksCnt; + exception_mask_t masks[32]; + exception_behavior_t old_behaviors[32]; + thread_state_flavor_t old_flavors[32]; + } __Reply__thread_get_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t old_handlers[32]; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t masksCnt; + exception_mask_t masks[32]; + exception_behavior_t old_behaviors[32]; + thread_state_flavor_t old_flavors[32]; + } __Reply__thread_swap_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_policy_set_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t policy_infoCnt; + integer_t policy_info[16]; + boolean_t get_default; + } __Reply__thread_policy_get_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_sample_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__etap_trace_thread_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_assign_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_assign_default_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t assigned_set; + /* end of the kernel processed data */ + } __Reply__thread_get_assignment_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_set_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__thread_act_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__thread_act_subsystem__defined +#define __ReplyUnion__thread_act_subsystem__defined +union __ReplyUnion__thread_act_subsystem { + __Reply__thread_terminate_t Reply_thread_terminate; + __Reply__act_get_state_t Reply_act_get_state; + __Reply__act_set_state_t Reply_act_set_state; + __Reply__thread_get_state_t Reply_thread_get_state; + __Reply__thread_set_state_t Reply_thread_set_state; + __Reply__thread_suspend_t Reply_thread_suspend; + __Reply__thread_resume_t Reply_thread_resume; + __Reply__thread_abort_t Reply_thread_abort; + __Reply__thread_abort_safely_t Reply_thread_abort_safely; + __Reply__thread_depress_abort_t Reply_thread_depress_abort; + __Reply__thread_get_special_port_t Reply_thread_get_special_port; + __Reply__thread_set_special_port_t Reply_thread_set_special_port; + __Reply__thread_info_t Reply_thread_info; + __Reply__thread_set_exception_ports_t Reply_thread_set_exception_ports; + __Reply__thread_get_exception_ports_t Reply_thread_get_exception_ports; + __Reply__thread_swap_exception_ports_t Reply_thread_swap_exception_ports; + __Reply__thread_policy_t Reply_thread_policy; + __Reply__thread_policy_set_t Reply_thread_policy_set; + __Reply__thread_policy_get_t Reply_thread_policy_get; + __Reply__thread_sample_t Reply_thread_sample; + __Reply__etap_trace_thread_t Reply_etap_trace_thread; + __Reply__thread_assign_t Reply_thread_assign; + __Reply__thread_assign_default_t Reply_thread_assign_default; + __Reply__thread_get_assignment_t Reply_thread_get_assignment; + __Reply__thread_set_policy_t Reply_thread_set_policy; +}; +#endif /* !__RequestUnion__thread_act_subsystem__defined */ + +#ifndef subsystem_to_name_map_thread_act +#define subsystem_to_name_map_thread_act \ + { "thread_terminate", 3600 },\ + { "act_get_state", 3601 },\ + { "act_set_state", 3602 },\ + { "thread_get_state", 3603 },\ + { "thread_set_state", 3604 },\ + { "thread_suspend", 3605 },\ + { "thread_resume", 3606 },\ + { "thread_abort", 3607 },\ + { "thread_abort_safely", 3608 },\ + { "thread_depress_abort", 3609 },\ + { "thread_get_special_port", 3610 },\ + { "thread_set_special_port", 3611 },\ + { "thread_info", 3612 },\ + { "thread_set_exception_ports", 3613 },\ + { "thread_get_exception_ports", 3614 },\ + { "thread_swap_exception_ports", 3615 },\ + { "thread_policy", 3616 },\ + { "thread_policy_set", 3617 },\ + { "thread_policy_get", 3618 },\ + { "thread_sample", 3619 },\ + { "etap_trace_thread", 3620 },\ + { "thread_assign", 3621 },\ + { "thread_assign_default", 3622 },\ + { "thread_get_assignment", 3623 },\ + { "thread_set_policy", 3624 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _thread_act_user_ */ diff --git a/i386/include/mach/i386/thread_state.h b/i386/include/mach/i386/thread_state.h new file mode 100644 index 0000000..dba05b9 --- /dev/null +++ b/i386/include/mach/i386/thread_state.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ + +#ifndef _MACH_I386_THREAD_STATE_H_ +#define _MACH_I386_THREAD_STATE_H_ + +/* Size of maximum exported thread state in words */ +#define I386_THREAD_STATE_MAX (144) /* Size of biggest state possible */ + +#if defined (__i386__) || defined(__x86_64__) +#define THREAD_STATE_MAX I386_THREAD_STATE_MAX +#endif + +#endif /* _MACH_I386_THREAD_STATE_H_ */ diff --git a/i386/include/mach/i386/thread_status.h b/i386/include/mach/i386/thread_status.h new file mode 100644 index 0000000..65773e3 --- /dev/null +++ b/i386/include/mach/i386/thread_status.h @@ -0,0 +1,297 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: thread_status.h + * Author: Avadis Tevanian, Jr. + * Date: 1985 + * + * This file contains the structure definitions for the thread + * state as applied to I386 processors. + */ + +#ifndef _MACH_I386_THREAD_STATUS_H_ +#define _MACH_I386_THREAD_STATUS_H_ + +#include <mach/i386/_structs.h> +#include <mach/message.h> +#include <mach/i386/fp_reg.h> +#include <mach/i386/thread_state.h> +#include <i386/eflags.h> + +/* + * the i386_xxxx form is kept for legacy purposes since these types + * are externally known... eventually they should be deprecated. + * our internal implementation has moved to the following naming convention + * + * x86_xxxx32 names are used to deal with 32 bit states + * x86_xxxx64 names are used to deal with 64 bit states + * x86_xxxx names are used to deal with either 32 or 64 bit states + * via a self-describing mechanism + */ + +/* + * these are the legacy names which should be deprecated in the future + * they are externally known which is the only reason we don't just get + * rid of them + */ +#define i386_THREAD_STATE 1 +#define i386_FLOAT_STATE 2 +#define i386_EXCEPTION_STATE 3 + +/* + * THREAD_STATE_FLAVOR_LIST 0 + * these are the supported flavors + */ +#define x86_THREAD_STATE32 1 +#define x86_FLOAT_STATE32 2 +#define x86_EXCEPTION_STATE32 3 +#define x86_THREAD_STATE64 4 +#define x86_FLOAT_STATE64 5 +#define x86_EXCEPTION_STATE64 6 +#define x86_THREAD_STATE 7 +#define x86_FLOAT_STATE 8 +#define x86_EXCEPTION_STATE 9 +#define x86_DEBUG_STATE32 10 +#define x86_DEBUG_STATE64 11 +#define x86_DEBUG_STATE 12 +#define THREAD_STATE_NONE 13 + +/* + * Largest state on this machine: + * (be sure mach/machine/thread_state.h matches!) + */ +#define THREAD_MACHINE_STATE_MAX THREAD_STATE_MAX + +/* + * VALID_THREAD_STATE_FLAVOR is a platform specific macro that when passed + * an exception flavor will return if that is a defined flavor for that + * platform. The macro must be manually updated to include all of the valid + * exception flavors as defined above. + */ +#define VALID_THREAD_STATE_FLAVOR(x) \ + ((x == x86_THREAD_STATE32) || \ + (x == x86_FLOAT_STATE32) || \ + (x == x86_EXCEPTION_STATE32) || \ + (x == x86_DEBUG_STATE32) || \ + (x == x86_THREAD_STATE64) || \ + (x == x86_FLOAT_STATE64) || \ + (x == x86_EXCEPTION_STATE64) || \ + (x == x86_DEBUG_STATE64) || \ + (x == x86_THREAD_STATE) || \ + (x == x86_FLOAT_STATE) || \ + (x == x86_EXCEPTION_STATE) || \ + (x == x86_DEBUG_STATE) || \ + (x == THREAD_STATE_NONE)) + +struct x86_state_hdr { + int flavor; + int count; +}; +typedef struct x86_state_hdr x86_state_hdr_t; + +/* + * Default segment register values. + */ + +#define USER_CODE_SELECTOR 0x0017 +#define USER_DATA_SELECTOR 0x001f +#define KERN_CODE_SELECTOR 0x0008 +#define KERN_DATA_SELECTOR 0x0010 + +/* + * to be deprecated in the future + */ +typedef _STRUCT_X86_THREAD_STATE32 i386_thread_state_t; +#define i386_THREAD_STATE_COUNT ((mach_msg_type_number_t) \ + ( sizeof (i386_thread_state_t) / sizeof (int) )) + +typedef _STRUCT_X86_THREAD_STATE32 x86_thread_state32_t; +#define x86_THREAD_STATE32_COUNT ((mach_msg_type_number_t) \ + ( sizeof (x86_thread_state32_t) / sizeof (int) )) + +/* + * to be deprecated in the future + */ +typedef _STRUCT_X86_FLOAT_STATE32 i386_float_state_t; +#define i386_FLOAT_STATE_COUNT ((mach_msg_type_number_t) \ + (sizeof(i386_float_state_t)/sizeof(unsigned int))) + +typedef _STRUCT_X86_FLOAT_STATE32 x86_float_state32_t; +#define x86_FLOAT_STATE32_COUNT ((mach_msg_type_number_t) \ + (sizeof(x86_float_state32_t)/sizeof(unsigned int))) + +/* + * to be deprecated in the future + */ +typedef _STRUCT_X86_EXCEPTION_STATE32 i386_exception_state_t; +#define i386_EXCEPTION_STATE_COUNT ((mach_msg_type_number_t) \ + ( sizeof (i386_exception_state_t) / sizeof (int) )) + +typedef _STRUCT_X86_EXCEPTION_STATE32 x86_exception_state32_t; +#define x86_EXCEPTION_STATE32_COUNT ((mach_msg_type_number_t) \ + ( sizeof (x86_exception_state32_t) / sizeof (int) )) + +#define I386_EXCEPTION_STATE_COUNT i386_EXCEPTION_STATE_COUNT + +typedef _STRUCT_X86_DEBUG_STATE32 x86_debug_state32_t; +#define x86_DEBUG_STATE32_COUNT ((mach_msg_type_number_t) \ + ( sizeof (x86_debug_state32_t) / sizeof (int) )) + +#define X86_DEBUG_STATE32_COUNT x86_DEBUG_STATE32_COUNT + +typedef _STRUCT_X86_THREAD_STATE64 x86_thread_state64_t; +#define x86_THREAD_STATE64_COUNT ((mach_msg_type_number_t) \ + ( sizeof (x86_thread_state64_t) / sizeof (int) )) + +typedef _STRUCT_X86_FLOAT_STATE64 x86_float_state64_t; +#define x86_FLOAT_STATE64_COUNT ((mach_msg_type_number_t) \ + (sizeof(x86_float_state64_t)/sizeof(unsigned int))) + +typedef _STRUCT_X86_EXCEPTION_STATE64 x86_exception_state64_t; +#define x86_EXCEPTION_STATE64_COUNT ((mach_msg_type_number_t) \ + ( sizeof (x86_exception_state64_t) / sizeof (int) )) + +#define X86_EXCEPTION_STATE64_COUNT x86_EXCEPTION_STATE64_COUNT + +typedef _STRUCT_X86_DEBUG_STATE64 x86_debug_state64_t; +#define x86_DEBUG_STATE64_COUNT ((mach_msg_type_number_t) \ + ( sizeof (x86_debug_state64_t) / sizeof (int) )) + +#define X86_DEBUG_STATE64_COUNT x86_DEBUG_STATE64_COUNT + +/* + * Combined thread, float and exception states + */ +struct x86_thread_state { + x86_state_hdr_t tsh; + union { + x86_thread_state32_t ts32; + x86_thread_state64_t ts64; + } uts; +}; + +struct x86_float_state { + x86_state_hdr_t fsh; + union { + x86_float_state32_t fs32; + x86_float_state64_t fs64; + } ufs; +}; + +struct x86_exception_state { + x86_state_hdr_t esh; + union { + x86_exception_state32_t es32; + x86_exception_state64_t es64; + } ues; +}; + +struct x86_debug_state { + x86_state_hdr_t dsh; + union { + x86_debug_state32_t ds32; + x86_debug_state64_t ds64; + } uds; +}; + +typedef struct x86_thread_state x86_thread_state_t; +#define x86_THREAD_STATE_COUNT ((mach_msg_type_number_t) \ + ( sizeof (x86_thread_state_t) / sizeof (int) )) + +typedef struct x86_float_state x86_float_state_t; +#define x86_FLOAT_STATE_COUNT ((mach_msg_type_number_t) \ + (sizeof(x86_float_state_t)/sizeof(unsigned int))) + +typedef struct x86_exception_state x86_exception_state_t; +#define x86_EXCEPTION_STATE_COUNT ((mach_msg_type_number_t) \ + (sizeof(x86_exception_state_t)/sizeof(unsigned int))) + +typedef struct x86_debug_state x86_debug_state_t; +#define x86_DEBUG_STATE_COUNT ((mach_msg_type_number_t) \ + (sizeof(x86_debug_state_t)/sizeof(unsigned int))) + +/* + * Machine-independent way for servers and Mach's exception mechanism to + * choose the most efficient state flavor for exception RPC's: + */ +#define MACHINE_THREAD_STATE x86_THREAD_STATE +#define MACHINE_THREAD_STATE_COUNT x86_THREAD_STATE_COUNT + +/* + * when reloading the segment registers on + * a return out of the kernel, we may take + * a GeneralProtection or SegmentNotPresent + * fault if one or more of the segment + * registers in the saved state was improperly + * specified via an x86_THREAD_STATE32 call + * the frame we push on top of the existing + * save area looks like this... we need to + * carry this as part of the save area + * in case we get hit so that we have a big + * enough stack + */ +struct x86_seg_load_fault32 { + unsigned int trapno; + unsigned int err; + unsigned int eip; + unsigned int cs; + unsigned int efl; +}; + + +#endif /* _MACH_I386_THREAD_STATUS_H_ */ diff --git a/i386/include/mach/i386/vm_param.h b/i386/include/mach/i386/vm_param.h new file mode 100644 index 0000000..edcb834 --- /dev/null +++ b/i386/include/mach/i386/vm_param.h @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ + +/* + * Copyright (c) 1994 The University of Utah and + * the Computer Systems Laboratory at the University of Utah (CSL). + * All rights reserved. + * + * Permission to use, copy, modify and distribute this software is hereby + * granted provided that (1) source code retains these copyright, permission, + * and disclaimer notices, and (2) redistributions including binaries + * reproduce the notices in supporting documentation, and (3) all advertising + * materials mentioning features or use of this software display the following + * acknowledgement: ``This product includes software developed by the + * Computer Systems Laboratory at the University of Utah.'' + * + * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS + * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF + * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * CSL requests users of this software to return to csl-dist@cs.utah.edu any + * improvements that they make and grant CSL redistribution rights. + * + */ + +/* + * File: vm_param.h + * Author: Avadis Tevanian, Jr. + * Date: 1985 + * + * I386 machine dependent virtual memory parameters. + * Most of the declarations are preceeded by I386_ (or i386_) + * which is OK because only I386 specific code will be using + * them. + */ + +#ifndef _MACH_I386_VM_PARAM_H_ +#define _MACH_I386_VM_PARAM_H_ + +#define BYTE_SIZE 8 /* byte size in bits */ + +#define I386_PGBYTES 4096 /* bytes per 80386 page */ +#define I386_PGSHIFT 12 /* bitshift for pages */ + +#define PAGE_SIZE I386_PGBYTES +#define PAGE_SHIFT I386_PGSHIFT +#define PAGE_MASK (PAGE_SIZE - 1) + +#define I386_LPGBYTES 2*1024*1024 /* bytes per large page */ +#define I386_LPGSHIFT 21 /* bitshift for large pages */ +#define I386_LPGMASK (I386_LPGBYTES-1) + +/* + * Convert bytes to pages and convert pages to bytes. + * No rounding is used. + */ + +#define i386_btop(x) ((ppnum_t)((x) >> I386_PGSHIFT)) +#define machine_btop(x) i386_btop(x) +#define i386_ptob(x) (((pmap_paddr_t)(x)) << I386_PGSHIFT) + +/* + * Round off or truncate to the nearest page. These will work + * for either addresses or counts. (i.e. 1 byte rounds to 1 page + * bytes. + */ + +#define i386_round_page(x) ((((pmap_paddr_t)(x)) + I386_PGBYTES - 1) & \ + ~(I386_PGBYTES-1)) +#define i386_trunc_page(x) (((pmap_paddr_t)(x)) & ~(I386_PGBYTES-1)) + + + +#define VM_MIN_ADDRESS64 ((user_addr_t) 0x0000000000000000ULL) +/* + * default top of user stack... it grows down from here + */ +#define VM_USRSTACK64 ((user_addr_t) 0x00007FFF5FC00000ULL) +#define VM_DYLD64 ((user_addr_t) 0x00007FFF5FC00000ULL) +#define VM_LIB64_SHR_DATA ((user_addr_t) 0x00007FFF60000000ULL) +#define VM_LIB64_SHR_TEXT ((user_addr_t) 0x00007FFF80000000ULL) +/* + * the end of the usable user address space , for now about 47 bits. + * the 64 bit commpage is past the end of this + */ +#define VM_MAX_PAGE_ADDRESS ((user_addr_t) 0x00007FFFFFE00000ULL) +/* + * canonical end of user address space for limits checking + */ +#define VM_MAX_USER_PAGE_ADDRESS ((user_addr_t)0x00007FFFFFFFF000ULL) + + +/* system-wide values */ +#define MACH_VM_MIN_ADDRESS ((mach_vm_offset_t) 0) +#define MACH_VM_MAX_ADDRESS ((mach_vm_offset_t) VM_MAX_PAGE_ADDRESS) + +/* process-relative values (all 32-bit legacy only for now) */ +#define VM_MIN_ADDRESS ((vm_offset_t) 0) +#define VM_USRSTACK32 ((vm_offset_t) 0xC0000000) +#define VM_MAX_ADDRESS ((vm_offset_t) 0xFFE00000) + + + +#endif /* _MACH_I386_VM_PARAM_H_ */ diff --git a/i386/include/mach/i386/vm_types.h b/i386/include/mach/i386/vm_types.h new file mode 100644 index 0000000..2c38fa2 --- /dev/null +++ b/i386/include/mach/i386/vm_types.h @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ + +/* + * File: vm_types.h + * Author: Avadis Tevanian, Jr. + * Date: 1985 + * + * Header file for VM data types. I386 version. + */ + +#ifndef _MACH_I386_VM_TYPES_H_ +#define _MACH_I386_VM_TYPES_H_ + +#ifndef ASSEMBLER + +#include <i386/_types.h> +#include <mach/i386/vm_param.h> +#include <stdint.h> + +/* + * natural_t and integer_t are Mach's legacy types for machine- + * independent integer types (unsigned, and signed, respectively). + * Their original purpose was to define other types in a machine/ + * compiler independent way. + * + * They also had an implicit "same size as pointer" characteristic + * to them (i.e. Mach's traditional types are very ILP32 or ILP64 + * centric). We support x86 ABIs that do not follow either of + * these models (specifically LP64). Therefore, we had to make a + * choice between making these types scale with pointers or stay + * tied to integers. Because their use is predominantly tied to + * to the size of an integer, we are keeping that association and + * breaking free from pointer size guarantees. + * + * New use of these types is discouraged. + */ +typedef __darwin_natural_t natural_t; +typedef int integer_t; + +/* + * A vm_offset_t is a type-neutral pointer, + * e.g. an offset into a virtual memory space. + */ +#ifdef __LP64__ +typedef uintptr_t vm_offset_t; +#else /* __LP64__ */ +typedef natural_t vm_offset_t; +#endif /* __LP64__ */ + +/* + * A vm_size_t is the proper type for e.g. + * expressing the difference between two + * vm_offset_t entities. + */ +#ifdef __LP64__ +typedef uintptr_t vm_size_t; +#else /* __LP64__ */ +typedef natural_t vm_size_t; +#endif /* __LP64__ */ + +/* + * This new type is independent of a particular vm map's + * implementation size - and represents appropriate types + * for all possible maps. This is used for interfaces + * where the size of the map is not known - or we don't + * want to have to distinguish. + */ +typedef uint64_t mach_vm_address_t; +typedef uint64_t mach_vm_offset_t; +typedef uint64_t mach_vm_size_t; + +typedef uint64_t vm_map_offset_t; +typedef uint64_t vm_map_address_t; +typedef uint64_t vm_map_size_t; + + +#endif /* ASSEMBLER */ + +/* + * If composing messages by hand (please do not) + */ +#define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32 + +#endif /* _MACH_I386_VM_TYPES_H_ */ diff --git a/i386/include/mach/kern_return.h b/i386/include/mach/kern_return.h new file mode 100644 index 0000000..da73236 --- /dev/null +++ b/i386/include/mach/kern_return.h @@ -0,0 +1,322 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: h/kern_return.h + * Author: Avadis Tevanian, Jr. + * Date: 1985 + * + * Kernel return codes. + * + */ + +#ifndef _MACH_KERN_RETURN_H_ +#define _MACH_KERN_RETURN_H_ + +#include <mach/machine/kern_return.h> + +#define KERN_SUCCESS 0 + +#define KERN_INVALID_ADDRESS 1 + /* Specified address is not currently valid. + */ + +#define KERN_PROTECTION_FAILURE 2 + /* Specified memory is valid, but does not permit the + * required forms of access. + */ + +#define KERN_NO_SPACE 3 + /* The address range specified is already in use, or + * no address range of the size specified could be + * found. + */ + +#define KERN_INVALID_ARGUMENT 4 + /* The function requested was not applicable to this + * type of argument, or an argument is invalid + */ + +#define KERN_FAILURE 5 + /* The function could not be performed. A catch-all. + */ + +#define KERN_RESOURCE_SHORTAGE 6 + /* A system resource could not be allocated to fulfill + * this request. This failure may not be permanent. + */ + +#define KERN_NOT_RECEIVER 7 + /* The task in question does not hold receive rights + * for the port argument. + */ + +#define KERN_NO_ACCESS 8 + /* Bogus access restriction. + */ + +#define KERN_MEMORY_FAILURE 9 + /* During a page fault, the target address refers to a + * memory object that has been destroyed. This + * failure is permanent. + */ + +#define KERN_MEMORY_ERROR 10 + /* During a page fault, the memory object indicated + * that the data could not be returned. This failure + * may be temporary; future attempts to access this + * same data may succeed, as defined by the memory + * object. + */ + +#define KERN_ALREADY_IN_SET 11 + /* The receive right is already a member of the portset. + */ + +#define KERN_NOT_IN_SET 12 + /* The receive right is not a member of a port set. + */ + +#define KERN_NAME_EXISTS 13 + /* The name already denotes a right in the task. + */ + +#define KERN_ABORTED 14 + /* The operation was aborted. Ipc code will + * catch this and reflect it as a message error. + */ + +#define KERN_INVALID_NAME 15 + /* The name doesn't denote a right in the task. + */ + +#define KERN_INVALID_TASK 16 + /* Target task isn't an active task. + */ + +#define KERN_INVALID_RIGHT 17 + /* The name denotes a right, but not an appropriate right. + */ + +#define KERN_INVALID_VALUE 18 + /* A blatant range error. + */ + +#define KERN_UREFS_OVERFLOW 19 + /* Operation would overflow limit on user-references. + */ + +#define KERN_INVALID_CAPABILITY 20 + /* The supplied (port) capability is improper. + */ + +#define KERN_RIGHT_EXISTS 21 + /* The task already has send or receive rights + * for the port under another name. + */ + +#define KERN_INVALID_HOST 22 + /* Target host isn't actually a host. + */ + +#define KERN_MEMORY_PRESENT 23 + /* An attempt was made to supply "precious" data + * for memory that is already present in a + * memory object. + */ + +#define KERN_MEMORY_DATA_MOVED 24 + /* A page was requested of a memory manager via + * memory_object_data_request for an object using + * a MEMORY_OBJECT_COPY_CALL strategy, with the + * VM_PROT_WANTS_COPY flag being used to specify + * that the page desired is for a copy of the + * object, and the memory manager has detected + * the page was pushed into a copy of the object + * while the kernel was walking the shadow chain + * from the copy to the object. This error code + * is delivered via memory_object_data_error + * and is handled by the kernel (it forces the + * kernel to restart the fault). It will not be + * seen by users. + */ + +#define KERN_MEMORY_RESTART_COPY 25 + /* A strategic copy was attempted of an object + * upon which a quicker copy is now possible. + * The caller should retry the copy using + * vm_object_copy_quickly. This error code + * is seen only by the kernel. + */ + +#define KERN_INVALID_PROCESSOR_SET 26 + /* An argument applied to assert processor set privilege + * was not a processor set control port. + */ + +#define KERN_POLICY_LIMIT 27 + /* The specified scheduling attributes exceed the thread's + * limits. + */ + +#define KERN_INVALID_POLICY 28 + /* The specified scheduling policy is not currently + * enabled for the processor set. + */ + +#define KERN_INVALID_OBJECT 29 + /* The external memory manager failed to initialize the + * memory object. + */ + +#define KERN_ALREADY_WAITING 30 + /* A thread is attempting to wait for an event for which + * there is already a waiting thread. + */ + +#define KERN_DEFAULT_SET 31 + /* An attempt was made to destroy the default processor + * set. + */ + +#define KERN_EXCEPTION_PROTECTED 32 + /* An attempt was made to fetch an exception port that is + * protected, or to abort a thread while processing a + * protected exception. + */ + +#define KERN_INVALID_LEDGER 33 + /* A ledger was required but not supplied. + */ + +#define KERN_INVALID_MEMORY_CONTROL 34 + /* The port was not a memory cache control port. + */ + +#define KERN_INVALID_SECURITY 35 + /* An argument supplied to assert security privilege + * was not a host security port. + */ + +#define KERN_NOT_DEPRESSED 36 + /* thread_depress_abort was called on a thread which + * was not currently depressed. + */ + +#define KERN_TERMINATED 37 + /* Object has been terminated and is no longer available + */ + +#define KERN_LOCK_SET_DESTROYED 38 + /* Lock set has been destroyed and is no longer available. + */ + +#define KERN_LOCK_UNSTABLE 39 + /* The thread holding the lock terminated before releasing + * the lock + */ + +#define KERN_LOCK_OWNED 40 + /* The lock is already owned by another thread + */ + +#define KERN_LOCK_OWNED_SELF 41 + /* The lock is already owned by the calling thread + */ + +#define KERN_SEMAPHORE_DESTROYED 42 + /* Semaphore has been destroyed and is no longer available. + */ + +#define KERN_RPC_SERVER_TERMINATED 43 + /* Return from RPC indicating the target server was + * terminated before it successfully replied + */ + +#define KERN_RPC_TERMINATE_ORPHAN 44 + /* Terminate an orphaned activation. + */ + +#define KERN_RPC_CONTINUE_ORPHAN 45 + /* Allow an orphaned activation to continue executing. + */ + +#define KERN_NOT_SUPPORTED 46 + /* Empty thread activation (No thread linked to it) + */ + +#define KERN_NODE_DOWN 47 + /* Remote node down or inaccessible. + */ + +#define KERN_NOT_WAITING 48 + /* A signalled thread was not actually waiting. */ + +#define KERN_OPERATION_TIMED_OUT 49 + /* Some thread-oriented operation (semaphore_wait) timed out + */ + +#define KERN_CODESIGN_ERROR 50 + /* During a page fault, indicates that the page was rejected + * as a result of a signature check. + */ + +#define KERN_RETURN_MAX 0x100 + /* Maximum return value allowable + */ + +#endif /* _MACH_KERN_RETURN_H_ */ diff --git a/i386/include/mach/kmod.h b/i386/include/mach/kmod.h new file mode 100644 index 0000000..f31821d --- /dev/null +++ b/i386/include/mach/kmod.h @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce + * support for mandatory and extensible security protections. This notice + * is included in support of clause 2.2 (b) of the Apple Public License, + * Version 2.0. + */ + +#ifndef _MACH_KMOD_H_ +#define _MACH_KMOD_H_ + +#include <mach/kern_return.h> +#include <mach/mach_types.h> + +#include <sys/cdefs.h> + +__BEGIN_DECLS + +#if PRAGMA_MARK +#pragma mark Basic macros & typedefs +#endif +/*********************************************************************** +* Basic macros & typedefs +***********************************************************************/ +#define KMOD_MAX_NAME 64 + +#define KMOD_RETURN_SUCCESS KERN_SUCCESS +#define KMOD_RETURN_FAILURE KERN_FAILURE + +typedef int kmod_t; + +struct kmod_info; +typedef kern_return_t kmod_start_func_t(struct kmod_info * ki, void * data); +typedef kern_return_t kmod_stop_func_t(struct kmod_info * ki, void * data); + +#if PRAGMA_MARK +#pragma mark Structure definitions +#endif +/*********************************************************************** +* Structure definitions +* +* All structures must be #pragma pack(4). +***********************************************************************/ +#pragma pack(4) + +/* Run-time struct only; never saved to a file */ +typedef struct kmod_reference { + struct kmod_reference * next; + struct kmod_info * info; +} kmod_reference_t; + +/*********************************************************************** +* Warning: Any changes to the kmod_info structure affect the +* KMOD_..._DECL macros below. +***********************************************************************/ + +/* The kmod_info_t structure is only safe to use inside the running + * kernel. If you need to work with a kmod_info_t structure outside + * the kernel, please use the compatibility definitions below. + */ +typedef struct kmod_info { + struct kmod_info * next; + int32_t info_version; // version of this structure + uint32_t id; + char name[KMOD_MAX_NAME]; + char version[KMOD_MAX_NAME]; + int32_t reference_count; // # linkage refs to this + kmod_reference_t * reference_list; // who this refs (links on) + vm_address_t address; // starting address + vm_size_t size; // total size + vm_size_t hdr_size; // unwired hdr size + kmod_start_func_t * start; + kmod_stop_func_t * stop; +} kmod_info_t; + +/* A compatibility definition of kmod_info_t for 32-bit kexts. + */ +typedef struct kmod_info_32_v1 { + uint32_t next_addr; + int32_t info_version; + uint32_t id; + uint8_t name[KMOD_MAX_NAME]; + uint8_t version[KMOD_MAX_NAME]; + int32_t reference_count; + uint32_t reference_list_addr; + uint32_t address; + uint32_t size; + uint32_t hdr_size; + uint32_t start_addr; + uint32_t stop_addr; +} kmod_info_32_v1_t; + +/* A compatibility definition of kmod_info_t for 64-bit kexts. + */ +typedef struct kmod_info_64_v1 { + uint64_t next_addr; + int32_t info_version; + uint32_t id; + uint8_t name[KMOD_MAX_NAME]; + uint8_t version[KMOD_MAX_NAME]; + int32_t reference_count; + uint64_t reference_list_addr; + uint64_t address; + uint64_t size; + uint64_t hdr_size; + uint64_t start_addr; + uint64_t stop_addr; +} kmod_info_64_v1_t; + +#pragma pack() + +#if PRAGMA_MARK +#pragma mark Kmod structure declaration macros +#endif +/*********************************************************************** +* Kmod structure declaration macros +***********************************************************************/ +#define KMOD_INFO_NAME kmod_info +#define KMOD_INFO_VERSION 1 + +#define KMOD_DECL(name, version) \ + static kmod_start_func_t name ## _module_start; \ + static kmod_stop_func_t name ## _module_stop; \ + kmod_info_t KMOD_INFO_NAME = { 0, KMOD_INFO_VERSION, -1U, \ + { #name }, { version }, -1, 0, 0, 0, 0, \ + name ## _module_start, \ + name ## _module_stop }; + +#define KMOD_EXPLICIT_DECL(name, version, start, stop) \ + kmod_info_t KMOD_INFO_NAME = { 0, KMOD_INFO_VERSION, -1U, \ + { #name }, { version }, -1, 0, 0, 0, 0, \ + start, stop }; + +#if PRAGMA_MARK +#pragma mark Kernel private declarations +#endif +/*********************************************************************** +* Kernel private declarations. +***********************************************************************/ + + +#if PRAGMA_MARK +#pragma mark Obsolete kmod stuff +#endif +/*********************************************************************** +* These 3 should be dropped but they're referenced by MIG declarations. +***********************************************************************/ +typedef void * kmod_args_t; +typedef int kmod_control_flavor_t; +typedef kmod_info_t * kmod_info_array_t; + +__END_DECLS + +#endif /* _MACH_KMOD_H_ */ diff --git a/i386/include/mach/ledger.defs b/i386/include/mach/ledger.defs new file mode 100644 index 0000000..76367a9 --- /dev/null +++ b/i386/include/mach/ledger.defs @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ + +subsystem +#if KERNEL_USER + KernelUser +#endif /* KERNEL_USER */ +#if KERNEL_SERVER + KernelServer +#endif /* KERNEL_SERVER */ + ledger 5000; + +#ifdef KERNEL_USER +userprefix r_; +#endif /* KERNEL_USER */ + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> + +/* + * Create a subordinate ledger + */ +routine ledger_create( + parent_ledger : ledger_t; + ledger_ledger : ledger_t; + out new_ledger : ledger_t; + transfer : ledger_item_t); + +/* + * Destroy a ledger + */ +routine ledger_terminate( + ledger : ledger_t); + +/* + * Transfer resources from a parent ledger to a child + */ +routine ledger_transfer( + parent_ledger : ledger_t; + child_ledger : ledger_t; + transfer : ledger_item_t); + +/* + * Return the ledger limit and balance + */ +routine ledger_read( + ledger : ledger_t; + out balance : ledger_item_t; + out limit : ledger_item_t); + +/* vim: set ft=c : */ diff --git a/i386/include/mach/ledger.h b/i386/include/mach/ledger.h new file mode 100644 index 0000000..f0f050f --- /dev/null +++ b/i386/include/mach/ledger.h @@ -0,0 +1,259 @@ +#ifndef _ledger_user_ +#define _ledger_user_ + +/* Module ledger */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef ledger_MSG_COUNT +#define ledger_MSG_COUNT 4 +#endif /* ledger_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mach_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine ledger_create */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t ledger_create +( + ledger_t parent_ledger, + ledger_t ledger_ledger, + ledger_t *new_ledger, + ledger_item_t transfer +); + +/* Routine ledger_terminate */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t ledger_terminate +( + ledger_t ledger +); + +/* Routine ledger_transfer */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t ledger_transfer +( + ledger_t parent_ledger, + ledger_t child_ledger, + ledger_item_t transfer +); + +/* Routine ledger_read */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t ledger_read +( + ledger_t ledger, + ledger_item_t *balance, + ledger_item_t *limit +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__ledger_subsystem__defined +#define __Request__ledger_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t ledger_ledger; + /* end of the kernel processed data */ + NDR_record_t NDR; + ledger_item_t transfer; + } __Request__ledger_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__ledger_terminate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t child_ledger; + /* end of the kernel processed data */ + NDR_record_t NDR; + ledger_item_t transfer; + } __Request__ledger_transfer_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__ledger_read_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__ledger_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__ledger_subsystem__defined +#define __RequestUnion__ledger_subsystem__defined +union __RequestUnion__ledger_subsystem { + __Request__ledger_create_t Request_ledger_create; + __Request__ledger_terminate_t Request_ledger_terminate; + __Request__ledger_transfer_t Request_ledger_transfer; + __Request__ledger_read_t Request_ledger_read; +}; +#endif /* !__RequestUnion__ledger_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__ledger_subsystem__defined +#define __Reply__ledger_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_ledger; + /* end of the kernel processed data */ + } __Reply__ledger_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__ledger_terminate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__ledger_transfer_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + ledger_item_t balance; + ledger_item_t limit; + } __Reply__ledger_read_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__ledger_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__ledger_subsystem__defined +#define __ReplyUnion__ledger_subsystem__defined +union __ReplyUnion__ledger_subsystem { + __Reply__ledger_create_t Reply_ledger_create; + __Reply__ledger_terminate_t Reply_ledger_terminate; + __Reply__ledger_transfer_t Reply_ledger_transfer; + __Reply__ledger_read_t Reply_ledger_read; +}; +#endif /* !__RequestUnion__ledger_subsystem__defined */ + +#ifndef subsystem_to_name_map_ledger +#define subsystem_to_name_map_ledger \ + { "ledger_create", 5000 },\ + { "ledger_terminate", 5001 },\ + { "ledger_transfer", 5002 },\ + { "ledger_read", 5003 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _ledger_user_ */ diff --git a/i386/include/mach/lock_set.defs b/i386/include/mach/lock_set.defs new file mode 100644 index 0000000..c7ee584 --- /dev/null +++ b/i386/include/mach/lock_set.defs @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + * + */ +/* + * File: mach/lock_set.defs + * Author: Joseph CaraDonna + * + * Exported kernel calls + * + */ + +subsystem +#if KERNEL_SERVER + KernelServer +#endif /* KERNEL_SERVER */ + lock_set 617000; + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> + +/* + * a lock_set_t is created and destroyed through the task object. + * lock_set_create(task,&lock_set_t,...); + * lock_set_destroy(task,lock_set_t); + */ + +routine lock_acquire( + lock_set : lock_set_t; + lock_id : int); + +routine lock_release( + lock_set : lock_set_t; + lock_id : int); + +routine lock_try( + lock_set : lock_set_t; + lock_id : int); + +routine lock_make_stable( + lock_set : lock_set_t; + lock_id : int); + +routine lock_handoff( + lock_set : lock_set_t; + lock_id : int); + +routine lock_handoff_accept( + lock_set : lock_set_t; + lock_id : int); + +/* vim: set ft=c : */ diff --git a/i386/include/mach/lock_set.h b/i386/include/mach/lock_set.h new file mode 100644 index 0000000..07a8d13 --- /dev/null +++ b/i386/include/mach/lock_set.h @@ -0,0 +1,326 @@ +#ifndef _lock_set_user_ +#define _lock_set_user_ + +/* Module lock_set */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef lock_set_MSG_COUNT +#define lock_set_MSG_COUNT 6 +#endif /* lock_set_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mach_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine lock_acquire */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t lock_acquire +( + lock_set_t lock_set, + int lock_id +); + +/* Routine lock_release */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t lock_release +( + lock_set_t lock_set, + int lock_id +); + +/* Routine lock_try */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t lock_try +( + lock_set_t lock_set, + int lock_id +); + +/* Routine lock_make_stable */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t lock_make_stable +( + lock_set_t lock_set, + int lock_id +); + +/* Routine lock_handoff */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t lock_handoff +( + lock_set_t lock_set, + int lock_id +); + +/* Routine lock_handoff_accept */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t lock_handoff_accept +( + lock_set_t lock_set, + int lock_id +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__lock_set_subsystem__defined +#define __Request__lock_set_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int lock_id; + } __Request__lock_acquire_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int lock_id; + } __Request__lock_release_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int lock_id; + } __Request__lock_try_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int lock_id; + } __Request__lock_make_stable_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int lock_id; + } __Request__lock_handoff_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int lock_id; + } __Request__lock_handoff_accept_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__lock_set_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__lock_set_subsystem__defined +#define __RequestUnion__lock_set_subsystem__defined +union __RequestUnion__lock_set_subsystem { + __Request__lock_acquire_t Request_lock_acquire; + __Request__lock_release_t Request_lock_release; + __Request__lock_try_t Request_lock_try; + __Request__lock_make_stable_t Request_lock_make_stable; + __Request__lock_handoff_t Request_lock_handoff; + __Request__lock_handoff_accept_t Request_lock_handoff_accept; +}; +#endif /* !__RequestUnion__lock_set_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__lock_set_subsystem__defined +#define __Reply__lock_set_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__lock_acquire_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__lock_release_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__lock_try_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__lock_make_stable_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__lock_handoff_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__lock_handoff_accept_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__lock_set_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__lock_set_subsystem__defined +#define __ReplyUnion__lock_set_subsystem__defined +union __ReplyUnion__lock_set_subsystem { + __Reply__lock_acquire_t Reply_lock_acquire; + __Reply__lock_release_t Reply_lock_release; + __Reply__lock_try_t Reply_lock_try; + __Reply__lock_make_stable_t Reply_lock_make_stable; + __Reply__lock_handoff_t Reply_lock_handoff; + __Reply__lock_handoff_accept_t Reply_lock_handoff_accept; +}; +#endif /* !__RequestUnion__lock_set_subsystem__defined */ + +#ifndef subsystem_to_name_map_lock_set +#define subsystem_to_name_map_lock_set \ + { "lock_acquire", 617000 },\ + { "lock_release", 617001 },\ + { "lock_try", 617002 },\ + { "lock_make_stable", 617003 },\ + { "lock_handoff", 617004 },\ + { "lock_handoff_accept", 617005 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _lock_set_user_ */ diff --git a/i386/include/mach/mach.h b/i386/include/mach/mach.h new file mode 100644 index 0000000..0b3b1a0 --- /dev/null +++ b/i386/include/mach/mach.h @@ -0,0 +1,133 @@ +/* + * Copyright (c) 1999-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ + +/* + * Includes all the types that a normal user + * of Mach programs should need + */ + +#ifndef _MACH_H_ +#define _MACH_H_ + +#define __MACH30__ +#define MACH_IPC_FLAVOR UNTYPED + +#include <mach/std_types.h> +#include <mach/mach_types.h> +#include <mach/mach_interface.h> +#include <mach/mach_port.h> +#include <mach/mach_init.h> +#include <mach/mach_host.h> +#include <mach/thread_switch.h> + +#include <mach/rpc.h> /* for compatibility only */ +#include <mach/mig.h> + +#include <mach/mig_errors.h> +#include <mach/mach_error.h> + +#include <sys/cdefs.h> + +__BEGIN_DECLS +/* + * Standard prototypes + */ +extern void panic_init(mach_port_t); +extern void panic(const char *, ...); + +extern void safe_gets(char *, + char *, + int); + +extern void slot_name(cpu_type_t, + cpu_subtype_t, + char **, + char **); + +extern void mig_reply_setup(mach_msg_header_t *, + mach_msg_header_t *); + +extern void mach_msg_destroy(mach_msg_header_t *); + +extern mach_msg_return_t mach_msg_receive(mach_msg_header_t *); + +extern mach_msg_return_t mach_msg_send(mach_msg_header_t *); + +extern mach_msg_return_t mach_msg_server_once(boolean_t (*) + (mach_msg_header_t *, + mach_msg_header_t *), + mach_msg_size_t, + mach_port_t, + mach_msg_options_t); +extern mach_msg_return_t mach_msg_server(boolean_t (*) + (mach_msg_header_t *, + mach_msg_header_t *), + mach_msg_size_t, + mach_port_t, + mach_msg_options_t); + +/* + * Prototypes for compatibility + */ +extern kern_return_t clock_get_res(mach_port_t, + clock_res_t *); +extern kern_return_t clock_set_res(mach_port_t, + clock_res_t); + +extern kern_return_t clock_sleep(mach_port_t, + int, + mach_timespec_t, + mach_timespec_t *); +__END_DECLS + +#endif /* _MACH_H_ */ diff --git a/i386/include/mach/mach_error.h b/i386/include/mach/mach_error.h new file mode 100644 index 0000000..5840bd5 --- /dev/null +++ b/i386/include/mach/mach_error.h @@ -0,0 +1,93 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie the + * rights to redistribute these changes. + */ + +/* + * File: mach_error.h + * Author: Douglas Orr, Carnegie Mellon University + * Date: Mar. 1988 + * + * Definitions of routines in mach_error.c + */ + +#ifndef _MACH_ERROR_ +#define _MACH_ERROR_ 1 + +#include <mach/error.h> + +#include <sys/cdefs.h> + +__BEGIN_DECLS +char *mach_error_string( +/* + * Returns a string appropriate to the error argument given + */ + mach_error_t error_value + ); + +void mach_error( +/* + * Prints an appropriate message on the standard error stream + */ + const char *str, + mach_error_t error_value + ); + +char *mach_error_type( +/* + * Returns a string with the error system, subsystem and code + */ + mach_error_t error_value + ); +__END_DECLS + +#endif /* _MACH_ERROR_ */ diff --git a/i386/include/mach/mach_exc.defs b/i386/include/mach/mach_exc.defs new file mode 100644 index 0000000..00fae28 --- /dev/null +++ b/i386/include/mach/mach_exc.defs @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * Abstract: + * MiG definitions file for Mach exception interface. + */ + +subsystem +#if KERNEL_USER + KernelUser +#endif + mach_exc 2405; + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> + +ServerPrefix catch_; + +type mach_exception_data_t = array[*:2] of int64_t; +type exception_type_t = int; + +routine mach_exception_raise( +#if KERNEL_USER + exception_port : mach_port_move_send_t; + thread : mach_port_move_send_t; + task : mach_port_move_send_t; +#else /* KERNEL_USER */ + exception_port : mach_port_t; + thread : mach_port_t; + task : mach_port_t; +#endif /* KERNEL_USER */ + exception : exception_type_t; + code : mach_exception_data_t + ); + +routine mach_exception_raise_state( +#if KERNEL_USER + exception_port : mach_port_move_send_t; +#else /* KERNEL_USER */ + exception_port : mach_port_t; +#endif /* KERNEL_USER */ + exception : exception_type_t; + code : mach_exception_data_t, const; + inout flavor : int; + old_state : thread_state_t, const; + out new_state : thread_state_t); + +routine mach_exception_raise_state_identity( +#if KERNEL_USER + exception_port : mach_port_move_send_t; + thread : mach_port_move_send_t; + task : mach_port_move_send_t; +#else /* KERNEL_USER */ + exception_port : mach_port_t; + thread : mach_port_t; + task : mach_port_t; +#endif /* KERNEL_USER */ + exception : exception_type_t; + code : mach_exception_data_t; + inout flavor : int; + old_state : thread_state_t; + out new_state : thread_state_t); + +/* vim: set ft=c : */ diff --git a/i386/include/mach/mach_host.defs b/i386/include/mach/mach_host.defs new file mode 100644 index 0000000..90ba9b9 --- /dev/null +++ b/i386/include/mach/mach_host.defs @@ -0,0 +1,257 @@ +/* + * Copyright (c) 2000-2009 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ + +/* + * File: mach/mach_host.defs + * + * Abstract: + * Mach host operations support. Includes processor allocation and + * control. + */ + +#ifdef MACH_KERNEL +#include <advisory_pageout.h> +#endif /* MACH_KERNEL */ + +subsystem +#if KERNEL_SERVER + KernelServer +#endif /* KERNEL_SERVER */ + mach_host 200; + +/* + * Basic types + */ + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> +#include <mach/clock_types.defs> +#include <mach_debug/mach_debug_types.defs> + +/* + * References to host objects are returned by: + * mach_host_self() - trap + */ + +/* + * Return information about this host. + */ +routine host_info( + host : host_t; + flavor : host_flavor_t; + out host_info_out : host_info_t, CountInOut); + +/* + * Get string describing current kernel version. + */ +routine host_kernel_version( + host : host_t; + out kernel_version : kernel_version_t); + +/* + * Get host page size + * (compatibility for running old libraries on new kernels - + * host_page_size() is now a library routine based on constants) + */ +routine _host_page_size( + host : host_t; + out out_page_size : vm_size_t); + +/* + * Allow pagers to create named entries that point to un-mapped + * abstract memory object. The named entries are generally mappable + * and can be subsetted through the mach_make_memory_entry call + */ +routine mach_memory_object_memory_entry( + host :host_t; + internal :boolean_t; + size :vm_size_t; + permission :vm_prot_t; + pager :memory_object_t; + out entry_handle :mach_port_move_send_t); + + +/* + * Get processor info for all the processors on this host. + * The returned data is an OOL array of processor info. + */ +routine host_processor_info( + host : host_t; + flavor : processor_flavor_t; + out out_processor_count : natural_t; + out out_processor_info : processor_info_array_t); + +/* + * Return host IO master access port + */ +routine host_get_io_master( + host : host_t; + out io_master : io_master_t); + +/* + * Get service port for a processor set. + * Available to all. + */ +routine host_get_clock_service( + host : host_t; + clock_id : clock_id_t; + out clock_serv : clock_serv_t); + +/* + * kernel module interface (obsolete as of SnowLeopard) + * see mach/kmod.h + */ +/* kmod_ MIG calls now return KERN_NOT_SUPPORTED on PPC/i386/x86_64. */ +routine kmod_get_info( + host : host_t; + out modules : kmod_args_t); + +/* + * Returns information about the memory allocation zones. + * Supported in all kernels.. + */ +routine host_zone_info( + host : host_t; + out names : zone_name_array_t, + Dealloc; + out info : zone_info_array_t, + Dealloc); + +/* + * Returns information about the global VP table. + * Only supported in MACH_VM_DEBUG kernels, + * otherwise returns KERN_FAILURE. + */ +routine host_virtual_physical_table_info( + host : host_t; + out info : hash_info_bucket_array_t, + Dealloc); + +/* + * Returns information about the global reverse hash table. + * This call is only valid on MACH_IPC_DEBUG kernels. + * Otherwise, KERN_FAILURE is returned. + */ +routine host_ipc_hash_info( + host : host_t; + out info : hash_info_bucket_array_t, + Dealloc); + +skip; /* was enable_bluebox */ +skip; /* was disable_bluebox */ + +/* + * JMM - Keep processor_set related items at the end for easy + * removal. + */ +/* + * Get default processor set for host. + */ +routine processor_set_default( + host : host_t; + out default_set : processor_set_name_t); + +/* + * Create new processor set. Returns real port for manipulations, + * and name port for obtaining information. + */ +routine processor_set_create( + host : host_t; + out new_set : processor_set_t; + out new_name : processor_set_name_t); + +/* + * Temporary interfaces for conversion to 64 bit data path + */ + +routine mach_memory_object_memory_entry_64( + host :host_t; + internal :boolean_t; + size :memory_object_size_t; + permission :vm_prot_t; + pager :memory_object_t; + out entry_handle :mach_port_move_send_t); + +/* + * Return statistics from this host. + */ +routine host_statistics( + host_priv : host_t; + flavor : host_flavor_t; + out host_info_out : host_info_t, CountInOut); + +routine host_request_notification( + host : host_t; + notify_type : host_flavor_t; + notify_port : mach_port_make_send_once_t); + +routine host_lockgroup_info( + host : host_t; + out lockgroup_info : lockgroup_info_array_t, + Dealloc); + +/* + * Return 64-bit statistics from this host. + */ +routine host_statistics64( + host_priv : host_t; + flavor : host_flavor_t; + out host_info64_out : host_info64_t, CountInOut); + + +/* vim: set ft=c : */ diff --git a/i386/include/mach/mach_host.h b/i386/include/mach/mach_host.h new file mode 100644 index 0000000..70ab53f --- /dev/null +++ b/i386/include/mach/mach_host.h @@ -0,0 +1,873 @@ +#ifndef _mach_host_user_ +#define _mach_host_user_ + +/* Module mach_host */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef mach_host_MSG_COUNT +#define mach_host_MSG_COUNT 20 +#endif /* mach_host_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mach_types.h> +#include <mach/mach_types.h> +#include <mach_debug/mach_debug_types.h> +#include <mach/mach_init.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine host_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_info +( + host_t host, + host_flavor_t flavor, + host_info_t host_info_out, + mach_msg_type_number_t *host_info_outCnt +); + +/* Routine host_kernel_version */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_kernel_version +( + host_t host, + kernel_version_t kernel_version +); + +/* Routine _host_page_size */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t _host_page_size +( + host_t host, + vm_size_t *out_page_size +); + +/* Routine mach_memory_object_memory_entry */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_memory_object_memory_entry +( + host_t host, + boolean_t internal, + vm_size_t size, + vm_prot_t permission, + memory_object_t pager, + mach_port_t *entry_handle +); + +/* Routine host_processor_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_processor_info +( + host_t host, + processor_flavor_t flavor, + natural_t *out_processor_count, + processor_info_array_t *out_processor_info, + mach_msg_type_number_t *out_processor_infoCnt +); + +/* Routine host_get_io_master */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_get_io_master +( + host_t host, + io_master_t *io_master +); + +/* Routine host_get_clock_service */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_get_clock_service +( + host_t host, + clock_id_t clock_id, + clock_serv_t *clock_serv +); + +/* Routine kmod_get_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t kmod_get_info +( + host_t host, + kmod_args_t *modules, + mach_msg_type_number_t *modulesCnt +); + +/* Routine host_zone_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_zone_info +( + host_t host, + zone_name_array_t *names, + mach_msg_type_number_t *namesCnt, + zone_info_array_t *info, + mach_msg_type_number_t *infoCnt +); + +/* Routine host_virtual_physical_table_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_virtual_physical_table_info +( + host_t host, + hash_info_bucket_array_t *info, + mach_msg_type_number_t *infoCnt +); + +/* Routine host_ipc_hash_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_ipc_hash_info +( + host_t host, + hash_info_bucket_array_t *info, + mach_msg_type_number_t *infoCnt +); + +/* Routine processor_set_default */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_set_default +( + host_t host, + processor_set_name_t *default_set +); + +/* Routine processor_set_create */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_set_create +( + host_t host, + processor_set_t *new_set, + processor_set_name_t *new_name +); + +/* Routine mach_memory_object_memory_entry_64 */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_memory_object_memory_entry_64 +( + host_t host, + boolean_t internal, + memory_object_size_t size, + vm_prot_t permission, + memory_object_t pager, + mach_port_t *entry_handle +); + +/* Routine host_statistics */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_statistics +( + host_t host_priv, + host_flavor_t flavor, + host_info_t host_info_out, + mach_msg_type_number_t *host_info_outCnt +); + +/* Routine host_request_notification */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_request_notification +( + host_t host, + host_flavor_t notify_type, + mach_port_t notify_port +); + +/* Routine host_lockgroup_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_lockgroup_info +( + host_t host, + lockgroup_info_array_t *lockgroup_info, + mach_msg_type_number_t *lockgroup_infoCnt +); + +/* Routine host_statistics64 */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t host_statistics64 +( + host_t host_priv, + host_flavor_t flavor, + host_info64_t host_info64_out, + mach_msg_type_number_t *host_info64_outCnt +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__mach_host_subsystem__defined +#define __Request__mach_host_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + host_flavor_t flavor; + mach_msg_type_number_t host_info_outCnt; + } __Request__host_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__host_kernel_version_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request___host_page_size_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t pager; + /* end of the kernel processed data */ + NDR_record_t NDR; + boolean_t internal; + vm_size_t size; + vm_prot_t permission; + } __Request__mach_memory_object_memory_entry_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + processor_flavor_t flavor; + } __Request__host_processor_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__host_get_io_master_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + clock_id_t clock_id; + } __Request__host_get_clock_service_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__kmod_get_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__host_zone_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__host_virtual_physical_table_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__host_ipc_hash_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__processor_set_default_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__processor_set_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t pager; + /* end of the kernel processed data */ + NDR_record_t NDR; + boolean_t internal; + memory_object_size_t size; + vm_prot_t permission; + } __Request__mach_memory_object_memory_entry_64_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + host_flavor_t flavor; + mach_msg_type_number_t host_info_outCnt; + } __Request__host_statistics_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t notify_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + host_flavor_t notify_type; + } __Request__host_request_notification_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__host_lockgroup_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + host_flavor_t flavor; + mach_msg_type_number_t host_info64_outCnt; + } __Request__host_statistics64_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__mach_host_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__mach_host_subsystem__defined +#define __RequestUnion__mach_host_subsystem__defined +union __RequestUnion__mach_host_subsystem { + __Request__host_info_t Request_host_info; + __Request__host_kernel_version_t Request_host_kernel_version; + __Request___host_page_size_t Request__host_page_size; + __Request__mach_memory_object_memory_entry_t Request_mach_memory_object_memory_entry; + __Request__host_processor_info_t Request_host_processor_info; + __Request__host_get_io_master_t Request_host_get_io_master; + __Request__host_get_clock_service_t Request_host_get_clock_service; + __Request__kmod_get_info_t Request_kmod_get_info; + __Request__host_zone_info_t Request_host_zone_info; + __Request__host_virtual_physical_table_info_t Request_host_virtual_physical_table_info; + __Request__host_ipc_hash_info_t Request_host_ipc_hash_info; + __Request__processor_set_default_t Request_processor_set_default; + __Request__processor_set_create_t Request_processor_set_create; + __Request__mach_memory_object_memory_entry_64_t Request_mach_memory_object_memory_entry_64; + __Request__host_statistics_t Request_host_statistics; + __Request__host_request_notification_t Request_host_request_notification; + __Request__host_lockgroup_info_t Request_host_lockgroup_info; + __Request__host_statistics64_t Request_host_statistics64; +}; +#endif /* !__RequestUnion__mach_host_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__mach_host_subsystem__defined +#define __Reply__mach_host_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t host_info_outCnt; + integer_t host_info_out[15]; + } __Reply__host_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t kernel_versionOffset; /* MiG doesn't use it */ + mach_msg_type_number_t kernel_versionCnt; + char kernel_version[512]; + } __Reply__host_kernel_version_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + vm_size_t out_page_size; + } __Reply___host_page_size_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t entry_handle; + /* end of the kernel processed data */ + } __Reply__mach_memory_object_memory_entry_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t out_processor_info; + /* end of the kernel processed data */ + NDR_record_t NDR; + natural_t out_processor_count; + mach_msg_type_number_t out_processor_infoCnt; + } __Reply__host_processor_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t io_master; + /* end of the kernel processed data */ + } __Reply__host_get_io_master_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t clock_serv; + /* end of the kernel processed data */ + } __Reply__host_get_clock_service_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t modules; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t modulesCnt; + } __Reply__kmod_get_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t names; + mach_msg_ool_descriptor_t info; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t namesCnt; + mach_msg_type_number_t infoCnt; + } __Reply__host_zone_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t info; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t infoCnt; + } __Reply__host_virtual_physical_table_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t info; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t infoCnt; + } __Reply__host_ipc_hash_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t default_set; + /* end of the kernel processed data */ + } __Reply__processor_set_default_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_set; + mach_msg_port_descriptor_t new_name; + /* end of the kernel processed data */ + } __Reply__processor_set_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t entry_handle; + /* end of the kernel processed data */ + } __Reply__mach_memory_object_memory_entry_64_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t host_info_outCnt; + integer_t host_info_out[15]; + } __Reply__host_statistics_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__host_request_notification_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t lockgroup_info; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t lockgroup_infoCnt; + } __Reply__host_lockgroup_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t host_info64_outCnt; + integer_t host_info64_out[256]; + } __Reply__host_statistics64_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__mach_host_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__mach_host_subsystem__defined +#define __ReplyUnion__mach_host_subsystem__defined +union __ReplyUnion__mach_host_subsystem { + __Reply__host_info_t Reply_host_info; + __Reply__host_kernel_version_t Reply_host_kernel_version; + __Reply___host_page_size_t Reply__host_page_size; + __Reply__mach_memory_object_memory_entry_t Reply_mach_memory_object_memory_entry; + __Reply__host_processor_info_t Reply_host_processor_info; + __Reply__host_get_io_master_t Reply_host_get_io_master; + __Reply__host_get_clock_service_t Reply_host_get_clock_service; + __Reply__kmod_get_info_t Reply_kmod_get_info; + __Reply__host_zone_info_t Reply_host_zone_info; + __Reply__host_virtual_physical_table_info_t Reply_host_virtual_physical_table_info; + __Reply__host_ipc_hash_info_t Reply_host_ipc_hash_info; + __Reply__processor_set_default_t Reply_processor_set_default; + __Reply__processor_set_create_t Reply_processor_set_create; + __Reply__mach_memory_object_memory_entry_64_t Reply_mach_memory_object_memory_entry_64; + __Reply__host_statistics_t Reply_host_statistics; + __Reply__host_request_notification_t Reply_host_request_notification; + __Reply__host_lockgroup_info_t Reply_host_lockgroup_info; + __Reply__host_statistics64_t Reply_host_statistics64; +}; +#endif /* !__RequestUnion__mach_host_subsystem__defined */ + +#ifndef subsystem_to_name_map_mach_host +#define subsystem_to_name_map_mach_host \ + { "host_info", 200 },\ + { "host_kernel_version", 201 },\ + { "_host_page_size", 202 },\ + { "mach_memory_object_memory_entry", 203 },\ + { "host_processor_info", 204 },\ + { "host_get_io_master", 205 },\ + { "host_get_clock_service", 206 },\ + { "kmod_get_info", 207 },\ + { "host_zone_info", 208 },\ + { "host_virtual_physical_table_info", 209 },\ + { "host_ipc_hash_info", 210 },\ + { "processor_set_default", 213 },\ + { "processor_set_create", 214 },\ + { "mach_memory_object_memory_entry_64", 215 },\ + { "host_statistics", 216 },\ + { "host_request_notification", 217 },\ + { "host_lockgroup_info", 218 },\ + { "host_statistics64", 219 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _mach_host_user_ */ diff --git a/i386/include/mach/mach_init.h b/i386/include/mach/mach_init.h new file mode 100644 index 0000000..36a47fa --- /dev/null +++ b/i386/include/mach/mach_init.h @@ -0,0 +1,130 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987,1986 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ + +/* + * Items provided by the Mach environment initialization. + */ + +#ifndef _MACH_INIT_ +#define _MACH_INIT_ 1 + +#include <mach/mach_types.h> +#include <stdarg.h> + +#include <sys/cdefs.h> + +/* + * Kernel-related ports; how a task/thread controls itself + */ + +__BEGIN_DECLS +extern mach_port_t mach_task_self(void); +extern mach_port_t mach_host_self(void); +extern mach_port_t mach_thread_self(void); +extern kern_return_t host_page_size(host_t, vm_size_t *); + +extern mach_port_t mach_task_self_; +#define mach_task_self() mach_task_self_ +#define current_task() mach_task_self() + +__END_DECLS +#include <mach/mach_traps.h> +__BEGIN_DECLS + +/* + * Other important ports in the Mach user environment + */ + +extern mach_port_t bootstrap_port; +extern mach_port_t name_server_port; +extern mach_port_t environment_port; +extern mach_port_t service_port; + +/* + * Where these ports occur in the "mach_ports_register" + * collection... only servers or the runtime library need know. + */ + +#define NAME_SERVER_SLOT 0 +#define ENVIRONMENT_SLOT 1 +#define SERVICE_SLOT 2 + +#define MACH_PORTS_SLOTS_USED 3 + +/* + * Globally interesting numbers. + * These macros assume vm_page_size is a power-of-2. + */ + +extern vm_size_t vm_page_size; +extern vm_size_t vm_page_mask; +extern int vm_page_shift; + +#define trunc_page(x) ((x) & (~(vm_page_size - 1))) +#define round_page(x) trunc_page((x) + (vm_page_size - 1)) + +/* + * Page-size rounding macros for the fixed-width VM types. + */ +#define mach_vm_trunc_page(x) ((mach_vm_offset_t)(x) & ~((signed)PAGE_MASK)) +#define mach_vm_round_page(x) (((mach_vm_offset_t)(x) + PAGE_MASK) & ~((signed)PAGE_MASK)) + +/* + * fprintf_stderr uses vprintf_stderr_func to produce + * error messages, this can be overridden by a user + * application to point to a user-specified output function + */ +extern int (*vprintf_stderr_func)(const char *format, va_list ap); +__END_DECLS + +#endif /* _MACH_INIT_ */ diff --git a/i386/include/mach/mach_interface.h b/i386/include/mach/mach_interface.h new file mode 100644 index 0000000..af939cb --- /dev/null +++ b/i386/include/mach/mach_interface.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (C) Apple Computer 1998 + * ALL Rights Reserved + */ +/* + * This file represents the interfaces that used to come + * from creating the user headers from the mach.defs file. + * Because mach.defs was decomposed, this file now just + * wraps up all the new interface headers generated from + * each of the new .defs resulting from that decomposition. + */ +#ifndef _MACH_INTERFACE_H_ +#define _MACH_INTERFACE_H_ + +#include <mach/clock_priv.h> +#include <mach/host_priv.h> +#include <mach/host_security.h> +#include <mach/ledger.h> +#include <mach/lock_set.h> +#include <mach/processor.h> +#include <mach/processor_set.h> +#include <mach/semaphore.h> +#include <mach/task.h> +#include <mach/thread_act.h> +#include <mach/vm_map.h> + +#endif /* _MACH_INTERFACE_H_ */ diff --git a/i386/include/mach/mach_param.h b/i386/include/mach/mach_param.h new file mode 100644 index 0000000..e4ead67 --- /dev/null +++ b/i386/include/mach/mach_param.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/mach_param.h + * Author: Avadis Tevanian, Jr., Michael Wayne Young + * Date: 1986 + * + * Mach system sizing parameters + */ + +#ifndef _MACH_MACH_PARAM_H_ +#define _MACH_MACH_PARAM_H_ + +/* Number of "registered" ports */ + +#define TASK_PORT_REGISTER_MAX 3 + +#endif /* _MACH_MACH_PARAM_H_ */ diff --git a/i386/include/mach/mach_port.defs b/i386/include/mach/mach_port.defs new file mode 100644 index 0000000..5801ee4 --- /dev/null +++ b/i386/include/mach/mach_port.defs @@ -0,0 +1,492 @@ +/* + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_FREE_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/mach_port.defs + * Author: Rich Draves + * + * Exported kernel calls. + */ + +subsystem +#if KERNEL_SERVER + KernelServer +#endif /* KERNEL_SERVER */ + mach_port 3200; + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> +#include <mach_debug/mach_debug_types.defs> + +/* + * Returns the set of port and port set names + * to which the target task has access, along with + * the type (set or port) for each name. + */ + +routine mach_port_names( + task : ipc_space_t; + out names : mach_port_name_array_t; + out types : mach_port_type_array_t); + +/* + * Returns the type (set or port) for the port name + * within the target task. Also indicates whether + * there is a dead-name request for the name. + */ + +routine mach_port_type( + task : ipc_space_t; + name : mach_port_name_t; + out ptype : mach_port_type_t); + +/* + * Changes the name by which a port (or port set) is known to + * the target task. The new name can't be in use. The + * old name becomes available for recycling. + */ + +routine mach_port_rename( + task : ipc_space_t; + old_name : mach_port_name_t; + new_name : mach_port_name_t); + +/* + * Allocates the specified kind of object, with the given name. + * The right must be one of + * MACH_PORT_RIGHT_RECEIVE + * MACH_PORT_RIGHT_PORT_SET + * MACH_PORT_RIGHT_DEAD_NAME + * New port sets are empty. New ports don't have any + * send/send-once rights or queued messages. The make-send + * count is zero and their queue limit is MACH_PORT_QLIMIT_DEFAULT. + * New sets, ports, and dead names have one user reference. + */ + +routine mach_port_allocate_name( + task : ipc_space_t; + right : mach_port_right_t; + name : mach_port_name_t); + +/* + * Allocates the specified kind of object. + * The right must be one of + * MACH_PORT_RIGHT_RECEIVE + * MACH_PORT_RIGHT_PORT_SET + * MACH_PORT_RIGHT_DEAD_NAME + * Like port_allocate_name, but the kernel picks a name. + * It can use any name not associated with a right. + */ + +routine mach_port_allocate( + task : ipc_space_t; + right : mach_port_right_t; + out name : mach_port_name_t); + +/* + * Destroys all rights associated with the name and makes it + * available for recycling immediately. The name can be a + * port (possibly with multiple user refs), a port set, or + * a dead name (again, with multiple user refs). + */ + +routine mach_port_destroy( + task : ipc_space_t; + name : mach_port_name_t); + +/* + * Releases one send/send-once/dead-name user ref. + * Just like mach_port_mod_refs -1, but deduces the + * correct type of right. This allows a user task + * to release a ref for a port without worrying + * about whether the port has died or not. + */ + +routine mach_port_deallocate( + task : ipc_space_t; + name : mach_port_name_t); + +/* + * A port set always has one user ref. + * A send-once right always has one user ref. + * A dead name always has one or more user refs. + * A send right always has one or more user refs. + * A receive right always has one user ref. + * The right must be one of + * MACH_PORT_RIGHT_RECEIVE + * MACH_PORT_RIGHT_PORT_SET + * MACH_PORT_RIGHT_DEAD_NAME + * MACH_PORT_RIGHT_SEND + * MACH_PORT_RIGHT_SEND_ONCE + */ + +routine mach_port_get_refs( + task : ipc_space_t; + name : mach_port_name_t; + right : mach_port_right_t; + out refs : mach_port_urefs_t); + +/* + * The delta is a signed change to the task's + * user ref count for the right. Only dead names + * and send rights can have a positive delta. + * The resulting user ref count can't be negative. + * If it is zero, the right is deallocated. + * If the name isn't a composite right, it becomes + * available for recycling. The right must be one of + * MACH_PORT_RIGHT_RECEIVE + * MACH_PORT_RIGHT_PORT_SET + * MACH_PORT_RIGHT_DEAD_NAME + * MACH_PORT_RIGHT_SEND + * MACH_PORT_RIGHT_SEND_ONCE + */ + +routine mach_port_mod_refs( + task : ipc_space_t; + name : mach_port_name_t; + right : mach_port_right_t; + delta : mach_port_delta_t); + +skip; + +/* + * Only valid for receive rights. + * Sets the make-send count for the port. + */ +routine mach_port_set_mscount( + task : ipc_space_t; + name : mach_port_name_t; + mscount : mach_port_mscount_t); + +/* + * Only valid for port sets. Returns a list of + * the members. + */ + +routine mach_port_get_set_status( + task : ipc_space_t; + name : mach_port_name_t; + out members : mach_port_name_array_t); + +/* + * Puts the member port (the task must have receive rights) + * into the after port set. If the port is already a member + * of any set(s), it is atomically removed from those sets as + * part of this operation. (If after is MACH_PORT_NULL, the + * port is still removed from all current sets). + */ + +routine mach_port_move_member( + task : ipc_space_t; + member : mach_port_name_t; + after : mach_port_name_t); + +/* + * Requests a notification from the kernel. The request + * must supply the send-once right which is used for + * the notification. If a send-once right was previously + * registered, it is returned. The msg_id must be one of + * MACH_NOTIFY_PORT_DESTROYED (receive rights) + * MACH_NOTIFY_DEAD_NAME (send/receive/send-once rights) + * MACH_NOTIFY_NO_SENDERS (receive rights) + * + * The sync value specifies whether a notification should + * get sent immediately, if appropriate. The exact meaning + * depends on the notification: + * MACH_NOTIFY_PORT_DESTROYED: must be zero. + * MACH_NOTIFY_DEAD_NAME: if non-zero, then name can be dead, + * and the notification gets sent immediately. + * If zero, then name can't be dead. + * MACH_NOTIFY_NO_SENDERS: the notification gets sent + * immediately if the current mscount is greater + * than or equal to the sync value and there are no + * extant send rights. + */ + +routine mach_port_request_notification( + task : ipc_space_t; + name : mach_port_name_t; + msgid : mach_msg_id_t; + sync : mach_port_mscount_t; + notify : mach_port_send_once_t; + out previous : mach_port_move_send_once_t); + +/* + * Inserts the specified rights into the target task, + * using the specified name. If inserting send/receive + * rights and the task already has send/receive rights + * for the port, then the names must agree. In any case, + * the task gains a user ref for the port. + */ + +routine mach_port_insert_right( + task : ipc_space_t; + name : mach_port_name_t; + poly : mach_port_poly_t); + +/* + * Returns the specified right for the named port + * in the target task, extracting that right from + * the target task. The target task loses a user + * ref and the name may be available for recycling. + * msgt_name must be one of + * MACH_MSG_TYPE_MOVE_RECEIVE + * MACH_MSG_TYPE_COPY_SEND + * MACH_MSG_TYPE_MAKE_SEND + * MACH_MSG_TYPE_MOVE_SEND + * MACH_MSG_TYPE_MAKE_SEND_ONCE + * MACH_MSG_TYPE_MOVE_SEND_ONCE + */ + +routine mach_port_extract_right( + task : ipc_space_t; + name : mach_port_name_t; + msgt_name : mach_msg_type_name_t; + out poly : mach_port_poly_t); + +/* + * Only valid for receive rights. + * Sets the sequence number for the port. + */ + +routine mach_port_set_seqno( + task : ipc_space_t; + name : mach_port_name_t; + seqno : mach_port_seqno_t); + +/* + * Returns information about a port. + */ + +routine mach_port_get_attributes( + task : ipc_space_t; + name : mach_port_name_t; + flavor : mach_port_flavor_t; + out port_info_out : mach_port_info_t, CountInOut); + +/* + * Set attributes of a port + */ + +routine mach_port_set_attributes( + task : ipc_space_t; + name : mach_port_name_t; + flavor : mach_port_flavor_t; + port_info : mach_port_info_t); + + +/* + * Allocates the specified kind of object, qos version. + * The right must be + * MACH_PORT_RIGHT_RECEIVE + * Like port_allocate_name, but the kernel picks a name. + * It can use any name not associated with a right. + */ + +routine mach_port_allocate_qos( + task : ipc_space_t; + right : mach_port_right_t; + inout qos : mach_port_qos_t; + out name : mach_port_name_t); + + +/* + * Generic interface to allocation various kinds of ports. + * Should never be called directly by users (at least not + * unless they are exceedingly masochistic). + */ + +routine mach_port_allocate_full( + task : ipc_space_t; + right : mach_port_right_t; + proto : mach_port_t; + inout qos : mach_port_qos_t; + inout name : mach_port_name_t); + + +/* + * Pre-expand task port name space. + */ +routine task_set_port_space( + task : ipc_space_t; + table_entries : int); + + +/* + * Returns the exact number of extant send rights + * for the given receive right. + * This call is only valid on MACH_IPC_DEBUG kernels. + * Otherwise, KERN_FAILURE is returned. + */ +routine mach_port_get_srights( + task : ipc_space_t; + name : mach_port_name_t; + out srights : mach_port_rights_t); + + +/* + * Returns information about an IPC space. + * This call is only valid on MACH_IPC_DEBUG kernels. + * Otherwise, KERN_FAILURE is returned. + */ +routine mach_port_space_info( + task : ipc_space_t; + out space_info : ipc_info_space_t; + out table_info : ipc_info_name_array_t; + out tree_info : ipc_info_tree_name_array_t); + +/* + * Returns information about the dead-name requests + * registered with the named receive right. + * This call is only valid on MACH_IPC_DEBUG kernels. + * Otherwise, KERN_FAILURE is returned. + */ +routine mach_port_dnrequest_info( + task : ipc_space_t; + name : mach_port_name_t; + out dnr_total : unsigned; /* total size of table */ + out dnr_used : unsigned); /* amount used */ + +/* + * Return the type and address of the kernel object + * that the given send/receive right represents. + * This call is only valid on MACH_IPC_DEBUG kernels. + * Otherwise, KERN_FAILURE is returned. + * + * This interface is DEPRECATED in favor of the new + * mach_port_kernel_object64() call (see below). + */ +routine mach_port_kernel_object( + task : ipc_space_t; + name : mach_port_name_t; + out object_type : unsigned; + out object_addr : unsigned); + + +/* + * Inserts the specified rights into the portset identified + * by the <task, pset> pair. The results of passing in the + * Poly argument via the supplied disposition must yield a + * receive right. + * + * If the <task,pset> pair does not represent a valid portset + * KERN_INVALID_RIGHT is returned. + * + * If the passed in name argument does not represent a receive + * right, KERN_INVALID_CAPABILITY will be returned. + * + * If the port represented by the receive right is already in + * the portset, KERN_ALREADY_IN_SET is returned. + */ +routine mach_port_insert_member( + task : ipc_space_t; + name : mach_port_name_t; + pset : mach_port_name_t); + +/* + * Extracts the specified right from the named portset + * in the target task. + * the target task. The target task loses a user + * ref and the name may be available for recycling. + * msgt_name must be one of + * MACH_MSG_TYPE_MOVE_RECEIVE + * MACH_MSG_TYPE_COPY_SEND + * MACH_MSG_TYPE_MAKE_SEND + * MACH_MSG_TYPE_MOVE_SEND + * MACH_MSG_TYPE_MAKE_SEND_ONCE + * MACH_MSG_TYPE_MOVE_SEND_ONCE + */ + +routine mach_port_extract_member( + task : ipc_space_t; + name : mach_port_name_t; + pset : mach_port_name_t); + +/* + * Only valid for receive rights. + * Gets the context pointer for the port. + */ + +routine mach_port_get_context( + task : ipc_space_t; + name : mach_port_name_t; + out context : mach_vm_address_t); + +/* + * Only valid for receive rights. + * Sets the context pointer for the port. + */ + +routine mach_port_set_context( + task : ipc_space_t; + name : mach_port_name_t; + context : mach_vm_address_t); + +/* + * Return the type and address of the kernel object + * that the given send/receive right represents. + * This call is only valid on MACH_IPC_DEBUG kernels. + * Otherwise, KERN_FAILURE is returned. + */ +routine mach_port_kobject( + task : ipc_space_t; + name : mach_port_name_t; + out object_type : natural_t; + out object_addr : mach_vm_address_t); + + +/* vim: set ft=c : */ diff --git a/i386/include/mach/mach_port.h b/i386/include/mach/mach_port.h new file mode 100644 index 0000000..c964828 --- /dev/null +++ b/i386/include/mach/mach_port.h @@ -0,0 +1,1383 @@ +#ifndef _mach_port_user_ +#define _mach_port_user_ + +/* Module mach_port */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef mach_port_MSG_COUNT +#define mach_port_MSG_COUNT 31 +#endif /* mach_port_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mach_types.h> +#include <mach_debug/mach_debug_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine mach_port_names */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_names +( + ipc_space_t task, + mach_port_name_array_t *names, + mach_msg_type_number_t *namesCnt, + mach_port_type_array_t *types, + mach_msg_type_number_t *typesCnt +); + +/* Routine mach_port_type */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_type +( + ipc_space_t task, + mach_port_name_t name, + mach_port_type_t *ptype +); + +/* Routine mach_port_rename */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_rename +( + ipc_space_t task, + mach_port_name_t old_name, + mach_port_name_t new_name +); + +/* Routine mach_port_allocate_name */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_allocate_name +( + ipc_space_t task, + mach_port_right_t right, + mach_port_name_t name +); + +/* Routine mach_port_allocate */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_allocate +( + ipc_space_t task, + mach_port_right_t right, + mach_port_name_t *name +); + +/* Routine mach_port_destroy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_destroy +( + ipc_space_t task, + mach_port_name_t name +); + +/* Routine mach_port_deallocate */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_deallocate +( + ipc_space_t task, + mach_port_name_t name +); + +/* Routine mach_port_get_refs */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_get_refs +( + ipc_space_t task, + mach_port_name_t name, + mach_port_right_t right, + mach_port_urefs_t *refs +); + +/* Routine mach_port_mod_refs */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_mod_refs +( + ipc_space_t task, + mach_port_name_t name, + mach_port_right_t right, + mach_port_delta_t delta +); + +/* Routine mach_port_set_mscount */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_set_mscount +( + ipc_space_t task, + mach_port_name_t name, + mach_port_mscount_t mscount +); + +/* Routine mach_port_get_set_status */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_get_set_status +( + ipc_space_t task, + mach_port_name_t name, + mach_port_name_array_t *members, + mach_msg_type_number_t *membersCnt +); + +/* Routine mach_port_move_member */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_move_member +( + ipc_space_t task, + mach_port_name_t member, + mach_port_name_t after +); + +/* Routine mach_port_request_notification */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_request_notification +( + ipc_space_t task, + mach_port_name_t name, + mach_msg_id_t msgid, + mach_port_mscount_t sync, + mach_port_t notify, + mach_msg_type_name_t notifyPoly, + mach_port_t *previous +); + +/* Routine mach_port_insert_right */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_insert_right +( + ipc_space_t task, + mach_port_name_t name, + mach_port_t poly, + mach_msg_type_name_t polyPoly +); + +/* Routine mach_port_extract_right */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_extract_right +( + ipc_space_t task, + mach_port_name_t name, + mach_msg_type_name_t msgt_name, + mach_port_t *poly, + mach_msg_type_name_t *polyPoly +); + +/* Routine mach_port_set_seqno */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_set_seqno +( + ipc_space_t task, + mach_port_name_t name, + mach_port_seqno_t seqno +); + +/* Routine mach_port_get_attributes */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_get_attributes +( + ipc_space_t task, + mach_port_name_t name, + mach_port_flavor_t flavor, + mach_port_info_t port_info_out, + mach_msg_type_number_t *port_info_outCnt +); + +/* Routine mach_port_set_attributes */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_set_attributes +( + ipc_space_t task, + mach_port_name_t name, + mach_port_flavor_t flavor, + mach_port_info_t port_info, + mach_msg_type_number_t port_infoCnt +); + +/* Routine mach_port_allocate_qos */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_allocate_qos +( + ipc_space_t task, + mach_port_right_t right, + mach_port_qos_t *qos, + mach_port_name_t *name +); + +/* Routine mach_port_allocate_full */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_allocate_full +( + ipc_space_t task, + mach_port_right_t right, + mach_port_t proto, + mach_port_qos_t *qos, + mach_port_name_t *name +); + +/* Routine task_set_port_space */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_port_space +( + ipc_space_t task, + int table_entries +); + +/* Routine mach_port_get_srights */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_get_srights +( + ipc_space_t task, + mach_port_name_t name, + mach_port_rights_t *srights +); + +/* Routine mach_port_space_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_space_info +( + ipc_space_t task, + ipc_info_space_t *space_info, + ipc_info_name_array_t *table_info, + mach_msg_type_number_t *table_infoCnt, + ipc_info_tree_name_array_t *tree_info, + mach_msg_type_number_t *tree_infoCnt +); + +/* Routine mach_port_dnrequest_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_dnrequest_info +( + ipc_space_t task, + mach_port_name_t name, + unsigned *dnr_total, + unsigned *dnr_used +); + +/* Routine mach_port_kernel_object */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_kernel_object +( + ipc_space_t task, + mach_port_name_t name, + unsigned *object_type, + unsigned *object_addr +); + +/* Routine mach_port_insert_member */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_insert_member +( + ipc_space_t task, + mach_port_name_t name, + mach_port_name_t pset +); + +/* Routine mach_port_extract_member */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_extract_member +( + ipc_space_t task, + mach_port_name_t name, + mach_port_name_t pset +); + +/* Routine mach_port_get_context */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_get_context +( + ipc_space_t task, + mach_port_name_t name, + mach_vm_address_t *context +); + +/* Routine mach_port_set_context */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_set_context +( + ipc_space_t task, + mach_port_name_t name, + mach_vm_address_t context +); + +/* Routine mach_port_kobject */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_port_kobject +( + ipc_space_t task, + mach_port_name_t name, + natural_t *object_type, + mach_vm_address_t *object_addr +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__mach_port_subsystem__defined +#define __Request__mach_port_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__mach_port_names_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + } __Request__mach_port_type_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t old_name; + mach_port_name_t new_name; + } __Request__mach_port_rename_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_right_t right; + mach_port_name_t name; + } __Request__mach_port_allocate_name_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_right_t right; + } __Request__mach_port_allocate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + } __Request__mach_port_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + } __Request__mach_port_deallocate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + mach_port_right_t right; + } __Request__mach_port_get_refs_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + mach_port_right_t right; + mach_port_delta_t delta; + } __Request__mach_port_mod_refs_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + mach_port_mscount_t mscount; + } __Request__mach_port_set_mscount_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + } __Request__mach_port_get_set_status_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t member; + mach_port_name_t after; + } __Request__mach_port_move_member_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t notify; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_port_name_t name; + mach_msg_id_t msgid; + mach_port_mscount_t sync; + } __Request__mach_port_request_notification_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t poly; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_port_name_t name; + } __Request__mach_port_insert_right_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + mach_msg_type_name_t msgt_name; + } __Request__mach_port_extract_right_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + mach_port_seqno_t seqno; + } __Request__mach_port_set_seqno_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + mach_port_flavor_t flavor; + mach_msg_type_number_t port_info_outCnt; + } __Request__mach_port_get_attributes_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + mach_port_flavor_t flavor; + mach_msg_type_number_t port_infoCnt; + integer_t port_info[10]; + } __Request__mach_port_set_attributes_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_right_t right; + mach_port_qos_t qos; + } __Request__mach_port_allocate_qos_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t proto; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_port_right_t right; + mach_port_qos_t qos; + mach_port_name_t name; + } __Request__mach_port_allocate_full_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int table_entries; + } __Request__task_set_port_space_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + } __Request__mach_port_get_srights_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__mach_port_space_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + } __Request__mach_port_dnrequest_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + } __Request__mach_port_kernel_object_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + mach_port_name_t pset; + } __Request__mach_port_insert_member_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + mach_port_name_t pset; + } __Request__mach_port_extract_member_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + } __Request__mach_port_get_context_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + mach_vm_address_t context; + } __Request__mach_port_set_context_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_port_name_t name; + } __Request__mach_port_kobject_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__mach_port_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__mach_port_subsystem__defined +#define __RequestUnion__mach_port_subsystem__defined +union __RequestUnion__mach_port_subsystem { + __Request__mach_port_names_t Request_mach_port_names; + __Request__mach_port_type_t Request_mach_port_type; + __Request__mach_port_rename_t Request_mach_port_rename; + __Request__mach_port_allocate_name_t Request_mach_port_allocate_name; + __Request__mach_port_allocate_t Request_mach_port_allocate; + __Request__mach_port_destroy_t Request_mach_port_destroy; + __Request__mach_port_deallocate_t Request_mach_port_deallocate; + __Request__mach_port_get_refs_t Request_mach_port_get_refs; + __Request__mach_port_mod_refs_t Request_mach_port_mod_refs; + __Request__mach_port_set_mscount_t Request_mach_port_set_mscount; + __Request__mach_port_get_set_status_t Request_mach_port_get_set_status; + __Request__mach_port_move_member_t Request_mach_port_move_member; + __Request__mach_port_request_notification_t Request_mach_port_request_notification; + __Request__mach_port_insert_right_t Request_mach_port_insert_right; + __Request__mach_port_extract_right_t Request_mach_port_extract_right; + __Request__mach_port_set_seqno_t Request_mach_port_set_seqno; + __Request__mach_port_get_attributes_t Request_mach_port_get_attributes; + __Request__mach_port_set_attributes_t Request_mach_port_set_attributes; + __Request__mach_port_allocate_qos_t Request_mach_port_allocate_qos; + __Request__mach_port_allocate_full_t Request_mach_port_allocate_full; + __Request__task_set_port_space_t Request_task_set_port_space; + __Request__mach_port_get_srights_t Request_mach_port_get_srights; + __Request__mach_port_space_info_t Request_mach_port_space_info; + __Request__mach_port_dnrequest_info_t Request_mach_port_dnrequest_info; + __Request__mach_port_kernel_object_t Request_mach_port_kernel_object; + __Request__mach_port_insert_member_t Request_mach_port_insert_member; + __Request__mach_port_extract_member_t Request_mach_port_extract_member; + __Request__mach_port_get_context_t Request_mach_port_get_context; + __Request__mach_port_set_context_t Request_mach_port_set_context; + __Request__mach_port_kobject_t Request_mach_port_kobject; +}; +#endif /* !__RequestUnion__mach_port_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__mach_port_subsystem__defined +#define __Reply__mach_port_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t names; + mach_msg_ool_descriptor_t types; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t namesCnt; + mach_msg_type_number_t typesCnt; + } __Reply__mach_port_names_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_port_type_t ptype; + } __Reply__mach_port_type_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_port_rename_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_port_allocate_name_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_port_name_t name; + } __Reply__mach_port_allocate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_port_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_port_deallocate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_port_urefs_t refs; + } __Reply__mach_port_get_refs_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_port_mod_refs_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_port_set_mscount_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t members; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t membersCnt; + } __Reply__mach_port_get_set_status_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_port_move_member_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t previous; + /* end of the kernel processed data */ + } __Reply__mach_port_request_notification_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_port_insert_right_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t poly; + /* end of the kernel processed data */ + } __Reply__mach_port_extract_right_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_port_set_seqno_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t port_info_outCnt; + integer_t port_info_out[10]; + } __Reply__mach_port_get_attributes_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_port_set_attributes_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_port_qos_t qos; + mach_port_name_t name; + } __Reply__mach_port_allocate_qos_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_port_qos_t qos; + mach_port_name_t name; + } __Reply__mach_port_allocate_full_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_port_space_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_port_rights_t srights; + } __Reply__mach_port_get_srights_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t table_info; + mach_msg_ool_descriptor_t tree_info; + /* end of the kernel processed data */ + NDR_record_t NDR; + ipc_info_space_t space_info; + mach_msg_type_number_t table_infoCnt; + mach_msg_type_number_t tree_infoCnt; + } __Reply__mach_port_space_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + unsigned dnr_total; + unsigned dnr_used; + } __Reply__mach_port_dnrequest_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + unsigned object_type; + unsigned object_addr; + } __Reply__mach_port_kernel_object_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_port_insert_member_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_port_extract_member_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_vm_address_t context; + } __Reply__mach_port_get_context_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_port_set_context_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + natural_t object_type; + mach_vm_address_t object_addr; + } __Reply__mach_port_kobject_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__mach_port_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__mach_port_subsystem__defined +#define __ReplyUnion__mach_port_subsystem__defined +union __ReplyUnion__mach_port_subsystem { + __Reply__mach_port_names_t Reply_mach_port_names; + __Reply__mach_port_type_t Reply_mach_port_type; + __Reply__mach_port_rename_t Reply_mach_port_rename; + __Reply__mach_port_allocate_name_t Reply_mach_port_allocate_name; + __Reply__mach_port_allocate_t Reply_mach_port_allocate; + __Reply__mach_port_destroy_t Reply_mach_port_destroy; + __Reply__mach_port_deallocate_t Reply_mach_port_deallocate; + __Reply__mach_port_get_refs_t Reply_mach_port_get_refs; + __Reply__mach_port_mod_refs_t Reply_mach_port_mod_refs; + __Reply__mach_port_set_mscount_t Reply_mach_port_set_mscount; + __Reply__mach_port_get_set_status_t Reply_mach_port_get_set_status; + __Reply__mach_port_move_member_t Reply_mach_port_move_member; + __Reply__mach_port_request_notification_t Reply_mach_port_request_notification; + __Reply__mach_port_insert_right_t Reply_mach_port_insert_right; + __Reply__mach_port_extract_right_t Reply_mach_port_extract_right; + __Reply__mach_port_set_seqno_t Reply_mach_port_set_seqno; + __Reply__mach_port_get_attributes_t Reply_mach_port_get_attributes; + __Reply__mach_port_set_attributes_t Reply_mach_port_set_attributes; + __Reply__mach_port_allocate_qos_t Reply_mach_port_allocate_qos; + __Reply__mach_port_allocate_full_t Reply_mach_port_allocate_full; + __Reply__task_set_port_space_t Reply_task_set_port_space; + __Reply__mach_port_get_srights_t Reply_mach_port_get_srights; + __Reply__mach_port_space_info_t Reply_mach_port_space_info; + __Reply__mach_port_dnrequest_info_t Reply_mach_port_dnrequest_info; + __Reply__mach_port_kernel_object_t Reply_mach_port_kernel_object; + __Reply__mach_port_insert_member_t Reply_mach_port_insert_member; + __Reply__mach_port_extract_member_t Reply_mach_port_extract_member; + __Reply__mach_port_get_context_t Reply_mach_port_get_context; + __Reply__mach_port_set_context_t Reply_mach_port_set_context; + __Reply__mach_port_kobject_t Reply_mach_port_kobject; +}; +#endif /* !__RequestUnion__mach_port_subsystem__defined */ + +#ifndef subsystem_to_name_map_mach_port +#define subsystem_to_name_map_mach_port \ + { "mach_port_names", 3200 },\ + { "mach_port_type", 3201 },\ + { "mach_port_rename", 3202 },\ + { "mach_port_allocate_name", 3203 },\ + { "mach_port_allocate", 3204 },\ + { "mach_port_destroy", 3205 },\ + { "mach_port_deallocate", 3206 },\ + { "mach_port_get_refs", 3207 },\ + { "mach_port_mod_refs", 3208 },\ + { "mach_port_set_mscount", 3210 },\ + { "mach_port_get_set_status", 3211 },\ + { "mach_port_move_member", 3212 },\ + { "mach_port_request_notification", 3213 },\ + { "mach_port_insert_right", 3214 },\ + { "mach_port_extract_right", 3215 },\ + { "mach_port_set_seqno", 3216 },\ + { "mach_port_get_attributes", 3217 },\ + { "mach_port_set_attributes", 3218 },\ + { "mach_port_allocate_qos", 3219 },\ + { "mach_port_allocate_full", 3220 },\ + { "task_set_port_space", 3221 },\ + { "mach_port_get_srights", 3222 },\ + { "mach_port_space_info", 3223 },\ + { "mach_port_dnrequest_info", 3224 },\ + { "mach_port_kernel_object", 3225 },\ + { "mach_port_insert_member", 3226 },\ + { "mach_port_extract_member", 3227 },\ + { "mach_port_get_context", 3228 },\ + { "mach_port_set_context", 3229 },\ + { "mach_port_kobject", 3230 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _mach_port_user_ */ diff --git a/i386/include/mach/mach_syscalls.h b/i386/include/mach/mach_syscalls.h new file mode 100644 index 0000000..0e04e4f --- /dev/null +++ b/i386/include/mach/mach_syscalls.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ + +#ifndef _MACH_MACH_SYSCALLS_H_ +#define _MACH_MACH_SYSCALLS_H_ + +#include <mach/mach_traps.h> + +#endif /* _MACH_MACH_SYSCALLS_H_ */ diff --git a/i386/include/mach/mach_time.h b/i386/include/mach/mach_time.h new file mode 100644 index 0000000..6a7ce4f --- /dev/null +++ b/i386/include/mach/mach_time.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2001-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_MACH_TIME_H_ +#define _MACH_MACH_TIME_H_ + +#include <mach/mach_types.h> + +#include <sys/cdefs.h> + +struct mach_timebase_info { + uint32_t numer; + uint32_t denom; +}; + +typedef struct mach_timebase_info *mach_timebase_info_t; +typedef struct mach_timebase_info mach_timebase_info_data_t; + +__BEGIN_DECLS + +kern_return_t mach_timebase_info( + mach_timebase_info_t info); + +kern_return_t mach_wait_until( + uint64_t deadline); + + +uint64_t mach_absolute_time(void); +__END_DECLS + +#endif /* _MACH_MACH_TIME_H_ */ diff --git a/i386/include/mach/mach_traps.h b/i386/include/mach/mach_traps.h new file mode 100644 index 0000000..50cbd0a --- /dev/null +++ b/i386/include/mach/mach_traps.h @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * Definitions of general Mach system traps. + * + * These are the definitions as seen from user-space. + * The kernel definitions are in <mach/syscall_sw.h>. + * Kernel RPC functions are defined in <mach/mach_interface.h>. + */ + +#ifndef _MACH_MACH_TRAPS_H_ +#define _MACH_MACH_TRAPS_H_ + +#include <stdint.h> + +#include <mach/std_types.h> +#include <mach/mach_types.h> +#include <mach/kern_return.h> +#include <mach/port.h> +#include <mach/vm_types.h> +#include <mach/clock_types.h> + +#include <machine/endian.h> + +#include <sys/cdefs.h> + +__BEGIN_DECLS + + + +extern kern_return_t macx_swapon( + uint64_t filename, + int flags, + int size, + int priority); + +extern kern_return_t macx_swapoff( + uint64_t filename, + int flags); + +extern kern_return_t macx_triggers( + int hi_water, + int low_water, + int flags, + mach_port_t alert_port); + +extern kern_return_t macx_backing_store_suspend( + boolean_t suspend); + +extern kern_return_t macx_backing_store_recovery( + int pid); + +extern boolean_t swtch_pri(int pri); + +extern boolean_t swtch(void); + +extern kern_return_t thread_switch( + mach_port_name_t thread_name, + int option, + mach_msg_timeout_t option_time); + +extern mach_port_name_t task_self_trap(void); + +/* + * Obsolete interfaces. + */ + +extern kern_return_t task_for_pid( + mach_port_name_t target_tport, + int pid, + mach_port_name_t *t); + +extern kern_return_t task_name_for_pid( + mach_port_name_t target_tport, + int pid, + mach_port_name_t *tn); + +extern kern_return_t pid_for_task( + mach_port_name_t t, + int *x); + +#if !defined(__LP64__) +/* these should go away altogether - so no 64 legacy please */ + +extern kern_return_t map_fd( + int fd, + vm_offset_t offset, + vm_offset_t *va, + boolean_t findspace, + vm_size_t size); + +#endif /* !defined(__LP64__) */ + + +__END_DECLS + +#endif /* _MACH_MACH_TRAPS_H_ */ diff --git a/i386/include/mach/mach_types.defs b/i386/include/mach/mach_types.defs new file mode 100644 index 0000000..d325179 --- /dev/null +++ b/i386/include/mach/mach_types.defs @@ -0,0 +1,474 @@ +/* + * Copyright (c) 2000-2009 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * NOTICE: This file was modified by McAfee Research in 2004 to introduce + * support for mandatory and extensible security protections. This notice + * is included in support of clause 2.2 (b) of the Apple Public License, + * Version 2.0. + */ +/* + */ +/* + * Mach kernel interface type declarations + */ + +#ifndef _MACH_MACH_TYPES_DEFS_ +#define _MACH_MACH_TYPES_DEFS_ + + +#include <mach/std_types.defs> + +type memory_object_offset_t = uint64_t; +type memory_object_size_t = uint64_t; +type memory_object_cluster_size_t = uint32_t; +type memory_object_fault_info_t = array[16] of integer_t; + + +type mach_port_status_t = struct[10] of integer_t; /* obsolete */ + + /* mach_port_info_t: can hold either a + * mach_port_status_t (9 ints) or a + * mach_port_limits_t (1 int). If new flavors of + * mach_port_{get,set}_attributes are added, the size of + * this array may have to be increased. (See mach/port.h) + */ +type mach_port_flavor_t = int; +type mach_port_info_t = array[*:10] of integer_t; + +type task_t = mach_port_t +#if KERNEL_SERVER + intran: task_t convert_port_to_task(mach_port_t) + outtran: mach_port_t convert_task_to_port(task_t) + destructor: task_deallocate(task_t) +#endif /* KERNEL_SERVER */ + ; + +type task_name_t = mach_port_t +#if KERNEL_SERVER + intran: task_name_t convert_port_to_task_name(mach_port_t) + outtran: mach_port_t convert_task_name_to_port(task_name_t) + destructor: task_name_deallocate(task_name_t) +#endif /* KERNEL_SERVER */ + ; + +type thread_t = mach_port_t +#if KERNEL_SERVER + intran: thread_t convert_port_to_thread(mach_port_t) + outtran: mach_port_t convert_thread_to_port(thread_t) + destructor: thread_deallocate(thread_t) +#endif /* KERNEL_SERVER */ + ; + +type thread_act_t = mach_port_t +#if KERNEL_SERVER + intran: thread_act_t convert_port_to_thread(mach_port_t) + outtran: mach_port_t convert_thread_to_port(thread_act_t) + destructor: thread_deallocate(thread_act_t) +#endif /* KERNEL_SERVER */ + ; + +type thread_act_consume_ref_t = mach_port_move_send_t + cusertype: thread_act_t +#if KERNEL_SERVER + intran: thread_act_t convert_port_to_thread(mach_port_t) + destructor: thread_deallocate(thread_act_t) +#endif /* KERNEL_SERVER */ + ; + + /* thread_state_t: This inline array can hold + * a machine-dependent amount of data, defined in + * mach/machine/???? (currently THREAD_STATE_MAX, + * in mach/thread_state.h) + */ +#include <mach/machine/thread_state.h> +type thread_state_flavor_t = int; +type thread_state_t = array[*:THREAD_STATE_MAX] of natural_t; + +type task_array_t = ^array[] of task_t; +type thread_array_t = ^array[] of thread_t; +type thread_act_array_t = ^array[] of thread_act_t; +type act_params_t = array[6] of int; + +type vm_map_t = mach_port_t +#if KERNEL_SERVER + intran: vm_map_t convert_port_to_map(mach_port_t) + destructor: vm_map_deallocate(vm_map_t) +#endif /* KERNEL_SERVER */ + ; + +type vm_task_entry_t = mach_port_t + cusertype: vm_map_t +#if KERNEL_SERVER + intran: vm_map_t convert_port_entry_to_map(mach_port_t) + destructor: vm_map_deallocate(vm_map_t) +#endif /* KERNEL_SERVER */ + ; + +type ipc_space_t = mach_port_t +#if KERNEL_SERVER + intran: ipc_space_t convert_port_to_space(mach_port_t) + destructor: space_deallocate(ipc_space_t) +#endif /* KERNEL_SERVER */ + ; + +type vm_prot_t = int; +type vm_inherit_t = int; +type vm_purgable_t = int; +type xxx_vm_statistics_data_t = struct[13] of integer_t; +type vm_behavior_t = int; +type vm_statistics_data_t = struct[15] of integer_t; +type vm_machine_attribute_t = int; +type vm_machine_attribute_val_t = int; +type vm_sync_t = int; + + /* thread_info_t: this inline array can hold any of: + * thread_basic_info_t (10 ints) + * policy_timeshare_info_t (5 ints) + * policy_fifo_info_t (4 ints) + * policy_rr_info_t (5 ints) + * if other thread_info flavors are added, this + * definition may need to be changed. (See + * mach/thread_info.h and mach/policy.h) */ +type thread_flavor_t = int; +type thread_info_t = array[*:12] of integer_t; + +type thread_policy_flavor_t = natural_t; +type thread_policy_t = array[*:16] of integer_t; + + /* task_info_t: this inline array can hold any of: + * task_basic_info_32_t (8 ints) + * task_basic_info_64_t (10 ints) + * task_events_info_t (8 ints) + * task_thread_times_info_t (4 ints) + * policy_timeshare_info_t (5 ints) + * policy_fifo_info_t (4 ints) + * policy_rr_info_t (5 ints) + * task security token (2 ints) + * task audit token (8 ints) + * If other task_info flavors are added, this + * definition may need to be changed. (See + * mach/task_info.h and mach/policy.h) */ +type task_flavor_t = int; +type task_info_t = array[*:10] of integer_t; + +type task_policy_flavor_t = natural_t; +type task_policy_t = array[*:16] of integer_t; + +type mem_entry_name_port_t = mach_port_t +#if KERNEL_SERVER + intran: mem_entry_name_port_t null_conversion(mach_port_t) + outtran: mach_port_t null_conversion(mem_entry_name_port_t) +#endif /* KERNEL_SERVER */ + ; + +type mem_entry_name_port_move_send_t = mach_port_move_send_t + cusertype: mem_entry_name_port_t +#if KERNEL_SERVER + intran: mem_entry_name_port_t null_conversion(mach_port_t) + outtran: mach_port_t null_conversion(mem_entry_name_port_t) +#endif /* KERNEL_SERVER */ + ; + +type memory_object_default_t = mach_port_t + ; + +type memory_object_t = mach_port_t + ; + + +type memory_object_control_t = mach_port_t + ; + +type memory_object_name_t = mach_port_t + ctype: mach_port_t + ; + + +type memory_object_copy_strategy_t = int; +type memory_object_return_t = int; + +type machine_info_data_t = struct[5] of integer_t; +type machine_slot_data_t = struct[8] of integer_t; + +type host_t = mach_port_t +#if KERNEL_SERVER + intran: host_t convert_port_to_host(mach_port_t) + outtran: mach_port_t convert_host_to_port(host_t) +#endif /* KERNEL_SERVER */ + ; + +type host_priv_t = mach_port_t +#if KERNEL_SERVER + intran: host_priv_t convert_port_to_host_priv(mach_port_t) +#endif /* KERNEL_SERVER */ + ; + +type host_security_t = mach_port_t +#if KERNEL_SERVER + intran: host_security_t convert_port_to_host_security(mach_port_t) +#endif /* KERNEL_SERVER */ + ; + + /* + * host_info_t: variable-sized inline array that can contain: + * + * host_basic_info_old_t (5 ints) + * host_basic_info_t (12 ints) + * host_sched_info_t (2 ints) + * kernel_resource_sizes_t (5 ints) + * host_load_info_t (6 ints) + * vm_statistics32_t (15 ints) + * + * If other host_info flavors are added, this definition may + * need to be changed. (See mach/{host_info,vm_statistics}.h) + */ +type host_flavor_t = int; +type host_info_t = array[*:15] of integer_t; + + + /* + * host_info64_t: variable-sized inline array that can contain: + * + * vm_statistics_t (6 ints and 9 longs) + */ +type host_info64_t = array[*:256] of integer_t; + +type processor_t = mach_port_t +#if KERNEL_SERVER + intran: processor_t convert_port_to_processor(mach_port_t) + outtran: mach_port_t convert_processor_to_port(processor_t) +#endif /* KERNEL_SERVER */ + ; + +type processor_array_t = ^array[] of processor_t; + + /* processor_info_t: variable-sized inline array that can + * contain: + * processor_basic_info_t: (5 ints) + * processor_cpu_load_info_t:(4 ints) + * processor_machine_info_t :(12 ints) + * If other processor_info flavors are added, this definition + * may need to be changed. (See mach/processor_info.h) */ +type processor_flavor_t = int; +type processor_info_t = array[*:12] of integer_t; +type processor_info_array_t = ^array[] of integer_t; + +type processor_set_t = mach_port_t +#if KERNEL_SERVER + intran: processor_set_t convert_port_to_pset(mach_port_t) + outtran: mach_port_t convert_pset_to_port(processor_set_t) + destructor: pset_deallocate(processor_set_t) +#endif /* KERNEL_SERVER */ + ; + +type processor_set_array_t = ^array[] of processor_set_t; + +type processor_set_name_t = mach_port_t +#if KERNEL_SERVER + intran: processor_set_name_t convert_port_to_pset_name(mach_port_t) + outtran: mach_port_t convert_pset_name_to_port(processor_set_name_t) + destructor: pset_deallocate(processor_set_name_t) +#endif /* KERNEL_SERVER */ + ; + +type processor_set_name_array_t = ^array[] of processor_set_name_t; + + /* processor_set_info_t: variable-size inline array + * that can hold: + * processor_set_basic_info (5 ints) + * processor_set_load_info (4 ints) + * policy_timeshare_base_t (1 int) + * policy_fifo_base_t (1 int) + * policy_rr_base_t (1 int) + * policy_timeshare_base_t (1 int) + * policy_fifo_base_t (1 int) + * policy_rr_base_t (1 int) + * policy_t (1 int) + * If other flavors are added, this definition may + * need to be changed. (see mach/processor.h) */ +type processor_set_flavor_t = int; +type processor_set_info_t = array[*:5] of integer_t; + +type bootstrap_t = mach_port_t; + +type kernel_version_t = c_string[*:512]; +type kernel_boot_info_t = c_string[*:4096]; + +type time_value_t = struct[2] of integer_t; + +type mach_port_qos_t = struct[2] of integer_t; + +type emulation_vector_t = ^array[] of vm_offset_t; + +type inline_existence_map_t = array[*:512] of char; + +type policy_t = int; + /* policy_info_t: variable-size inline array. Can hold: + * policy_timeshare_info_t (5 ints) + * policy_fifo_info_t (4 ints) + * policy_rr_info_t (5 ints) */ +type policy_base_t = array[*:5] of integer_t; +type policy_info_t = array[*:2] of integer_t; +type policy_limit_t = array[*:1] of integer_t; + +type ledger_t = mach_port_t +#if KERNEL_SERVER + intran: ledger_t convert_port_to_ledger(mach_port_t) + outtran: mach_port_t convert_ledger_to_port(ledger_t) +#endif /* KERNEL_SERVER */ + ; + +type ledger_array_t = ^array[] of ledger_t; +type ledger_item_t = integer_t; + +type security_token_t = struct[2] of uint32_t; +type audit_token_t = struct[8] of uint32_t; + +type msg_labels_t = mach_port_t; + + /* memory_object_info_t: variable-size inline array: + * memory_object_attr_info_t (5 ints) + * XXX actually it's 6 ints temporarily (object_ready!) + * memory_object_behave_info_t (4 ints) + * memory_object_perf_info_t (2 ints) + * old_memory_object_attr_info_t (3 ints) + * memory_object_norma_info_t (5 ints) + * If other flavors are added, this definition may + * need to be changed. (see mach/memory_object.h) */ +type memory_object_flavor_t = int; +type memory_object_info_t = array[*:6] of int; + + /* vm_region_info_t: variable-size inline array that can hold: + * vm_region_basic_info_t (8 ints) + * If other flavors are added, this definition may + * need to be changed. (see mach/vm_region.h) */ +type vm_region_flavor_t = int; +type vm_region_info_t = array[*:10] of int; +type vm_region_recurse_info_t = array[*:19] of int; + +type vm_page_info_flavor_t = int; +type vm_page_info_t = array[*:32] of int; + +type mach_vm_read_entry_t = array[512] of mach_vm_offset_t; +type vm_read_entry_t = array[512] of vm_offset_t; +#if VM32_SUPPORT +type vm32_read_entry_t = array[512] of vm32_offset_t; +#endif + +type exception_mask_t = int; +type exception_behavior_t = int; + +type exception_handler_t = mach_port_t; + +type exception_handler_array_t = + array[*:32] of exception_handler_t; + +type exception_behavior_array_t = + array[*:32] of exception_behavior_t; + +type exception_flavor_array_t = + array[*:32] of thread_state_flavor_t; + +type exception_mask_array_t = + array[*:32] of exception_mask_t; + +type semaphore_t = mach_port_t +#if KERNEL_SERVER + intran: semaphore_t convert_port_to_semaphore(mach_port_t) + outtran: mach_port_t convert_semaphore_to_port(semaphore_t) + destructor: semaphore_dereference(semaphore_t) +#endif /* KERNEL_SERVER */ + ; + +type semaphore_consume_ref_t = mach_port_move_send_t + cusertype: semaphore_t +#if KERNEL_SERVER + intran: semaphore_t convert_port_to_semaphore(mach_port_t) + outtran: mach_port_t convert_semaphore_to_port(semaphore_t) + destructor: semaphore_dereference(semaphore_t) +#endif /* KERNEL_SERVER */ + ; + +type lock_set_t = mach_port_t +#if KERNEL_SERVER + intran: lock_set_t convert_port_to_lock_set(mach_port_t) + outtran: mach_port_t convert_lock_set_to_port(lock_set_t) + destructor: lock_set_dereference(lock_set_t) +#endif /* KERNEL_SERVER */ + ; + +/* kernel module loader */ +type kmod_t = int; +type kmod_control_flavor_t = int; + +type kmod_args_t = ^array[] of MACH_MSG_TYPE_BYTE + ctype: kmod_args_t; + +type io_master_t = mach_port_t; +type UNDServerRef = mach_port_t; + +#if KERNEL_SERVER + +simport <kern/ipc_mig.h>; /* pick up kernel-specific MIG things */ + +#endif /* KERNEL_SERVER */ + +import <mach/mig.h>; +import <mach/mach_types.h>; + +#endif /* _MACH_MACH_TYPES_DEFS_ */ + +/* vim: set ft=c : */ diff --git a/i386/include/mach/mach_types.h b/i386/include/mach/mach_types.h new file mode 100644 index 0000000..30ebec9 --- /dev/null +++ b/i386/include/mach/mach_types.h @@ -0,0 +1,230 @@ +/* + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce + * support for mandatory and extensible security protections. This notice + * is included in support of clause 2.2 (b) of the Apple Public License, + * Version 2.0. + */ +/* + * File: mach/mach_types.h + * Author: Avadis Tevanian, Jr., Michael Wayne Young + * Date: 1986 + * + * Mach external interface definitions. + * + */ + +#ifndef _MACH_MACH_TYPES_H_ +#define _MACH_MACH_TYPES_H_ + +#include <stdint.h> + +#include <sys/cdefs.h> + +#include <mach/host_info.h> +#include <mach/host_notify.h> +#include <mach/host_special_ports.h> +#include <mach/machine.h> +#include <mach/machine/vm_types.h> +#include <mach/memory_object_types.h> +#include <mach/message.h> +#include <mach/exception_types.h> +#include <mach/port.h> +#include <mach/processor_info.h> +#include <mach/task_info.h> +#include <mach/task_policy.h> +#include <mach/task_special_ports.h> +#include <mach/thread_info.h> +#include <mach/thread_policy.h> +#include <mach/thread_special_ports.h> +#include <mach/thread_status.h> +#include <mach/time_value.h> +#include <mach/clock_types.h> +#include <mach/vm_attributes.h> +#include <mach/vm_inherit.h> +#include <mach/vm_purgable.h> +#include <mach/vm_behavior.h> +#include <mach/vm_prot.h> +#include <mach/vm_statistics.h> +#include <mach/vm_sync.h> +#include <mach/vm_types.h> +#include <mach/vm_region.h> +#include <mach/kmod.h> + + +/* + * If we are not in the kernel, then these will all be represented by + * ports at user-space. + */ +typedef mach_port_t task_t; +typedef mach_port_t task_name_t; +typedef mach_port_t thread_t; +typedef mach_port_t thread_act_t; +typedef mach_port_t ipc_space_t; +typedef mach_port_t host_t; +typedef mach_port_t host_priv_t; +typedef mach_port_t host_security_t; +typedef mach_port_t processor_t; +typedef mach_port_t processor_set_t; +typedef mach_port_t processor_set_control_t; +typedef mach_port_t semaphore_t; +typedef mach_port_t lock_set_t; +typedef mach_port_t ledger_t; +typedef mach_port_t alarm_t; +typedef mach_port_t clock_serv_t; +typedef mach_port_t clock_ctrl_t; + + +/* + * These aren't really unique types. They are just called + * out as unique types at one point in history. So we list + * them here for compatibility. + */ +typedef processor_set_t processor_set_name_t; + +/* + * These types are just hard-coded as ports + */ +typedef mach_port_t clock_reply_t; +typedef mach_port_t bootstrap_t; +typedef mach_port_t mem_entry_name_port_t; +typedef mach_port_t exception_handler_t; +typedef exception_handler_t *exception_handler_array_t; +typedef mach_port_t vm_task_entry_t; +typedef mach_port_t io_master_t; +typedef mach_port_t UNDServerRef; + +/* + * Mig doesn't translate the components of an array. + * For example, Mig won't use the thread_t translations + * to translate a thread_array_t argument. So, these definitions + * are not completely accurate at the moment for other kernel + * components. + */ +typedef task_t *task_array_t; +typedef thread_t *thread_array_t; +typedef processor_set_t *processor_set_array_t; +typedef processor_set_t *processor_set_name_array_t; +typedef processor_t *processor_array_t; +typedef thread_act_t *thread_act_array_t; +typedef ledger_t *ledger_array_t; + +/* + * However the real mach_types got declared, we also have to declare + * types with "port" in the name for compatability with the way OSF + * had declared the user interfaces at one point. Someday these should + * go away. + */ +typedef task_t task_port_t; +typedef task_array_t task_port_array_t; +typedef thread_t thread_port_t; +typedef thread_array_t thread_port_array_t; +typedef ipc_space_t ipc_space_port_t; +typedef host_t host_name_t; +typedef host_t host_name_port_t; +typedef processor_set_t processor_set_port_t; +typedef processor_set_t processor_set_name_port_t; +typedef processor_set_array_t processor_set_name_port_array_t; +typedef processor_set_t processor_set_control_port_t; +typedef processor_t processor_port_t; +typedef processor_array_t processor_port_array_t; +typedef thread_act_t thread_act_port_t; +typedef thread_act_array_t thread_act_port_array_t; +typedef semaphore_t semaphore_port_t; +typedef lock_set_t lock_set_port_t; +typedef ledger_t ledger_port_t; +typedef ledger_array_t ledger_port_array_t; +typedef alarm_t alarm_port_t; +typedef clock_serv_t clock_serv_port_t; +typedef clock_ctrl_t clock_ctrl_port_t; +typedef exception_handler_t exception_port_t; +typedef exception_handler_array_t exception_port_arrary_t; + + +#define TASK_NULL ((task_t) 0) +#define TASK_NAME_NULL ((task_name_t) 0) +#define THREAD_NULL ((thread_t) 0) +#define THR_ACT_NULL ((thread_act_t) 0) +#define IPC_SPACE_NULL ((ipc_space_t) 0) +#define HOST_NULL ((host_t) 0) +#define HOST_PRIV_NULL ((host_priv_t)0) +#define HOST_SECURITY_NULL ((host_security_t)0) +#define PROCESSOR_SET_NULL ((processor_set_t) 0) +#define PROCESSOR_NULL ((processor_t) 0) +#define SEMAPHORE_NULL ((semaphore_t) 0) +#define LOCK_SET_NULL ((lock_set_t) 0) +#define LEDGER_NULL ((ledger_t) 0) +#define ALARM_NULL ((alarm_t) 0) +#define CLOCK_NULL ((clock_t) 0) +#define UND_SERVER_NULL ((UNDServerRef) 0) + +typedef natural_t ledger_item_t; +#define LEDGER_ITEM_INFINITY ((ledger_item_t) (~0)) + +typedef mach_vm_offset_t *emulation_vector_t; +typedef char *user_subsystem_t; + +typedef char *labelstr_t; +/* + * Backwards compatibility, for those programs written + * before mach/{std,mach}_types.{defs,h} were set up. + */ +#include <mach/std_types.h> + +#endif /* _MACH_MACH_TYPES_H_ */ diff --git a/i386/include/mach/mach_vm.defs b/i386/include/mach/mach_vm.defs new file mode 100644 index 0000000..8dbb71f --- /dev/null +++ b/i386/include/mach/mach_vm.defs @@ -0,0 +1,480 @@ +/* + * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_FREE_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/mach_vm.defs + * + * Exported kernel VM calls (for any task on the platform). + */ + +subsystem +#if KERNEL_SERVER + KernelServer +#endif /* KERNEL_SERVER */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) + mach_vm +#else + vm_map_lp64_local +#endif + 4800; + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> +#include <mach_debug/mach_debug_types.defs> + +/* + * Allocate zero-filled memory in the address space + * of the target task, either at the specified address, + * or wherever space can be found (controlled by flags), + * of the specified size. The address at which the + * allocation actually took place is returned. + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_allocate( +#else +routine vm_allocate( +#endif + target : vm_task_entry_t; + inout address : mach_vm_address_t; + size : mach_vm_size_t; + flags : int); + +/* + * Deallocate the specified range from the virtual + * address space of the target virtual memory map. + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_deallocate( +#else +routine vm_deallocate( +#endif + target : vm_task_entry_t; + address : mach_vm_address_t; + size : mach_vm_size_t); + +/* + * Set the current or maximum protection attribute + * for the specified range of the virtual address + * space of the target virtual memory map. The current + * protection limits the memory access rights of threads + * within the map; the maximum protection limits the accesses + * that may be given in the current protection. + * Protections are specified as a set of {read, write, execute} + * *permissions*. + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_protect( +#else +routine vm_protect( +#endif + target_task : vm_task_entry_t; + address : mach_vm_address_t; + size : mach_vm_size_t; + set_maximum : boolean_t; + new_protection : vm_prot_t); + +/* + * Set the inheritance attribute for the specified range + * of the virtual address space of the target address space. + * The inheritance value is one of {none, copy, share}, and + * specifies how the child address space should acquire + * this memory at the time of a task_create call. + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_inherit( +#else +routine vm_inherit( +#endif + target_task : vm_task_entry_t; + address : mach_vm_address_t; + size : mach_vm_size_t; + new_inheritance : vm_inherit_t); + +/* + * Returns the contents of the specified range of the + * virtual address space of the target task. [The + * range must be aligned on a virtual page boundary, + * and must be a multiple of pages in extent. The + * protection on the specified range must permit reading.] + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_read( +#else +routine vm_read( +#endif + target_task : vm_map_t; + address : mach_vm_address_t; + size : mach_vm_size_t; + out data : pointer_t); + +/* + * List corrollary to vm_read, returns mapped contents of specified + * ranges within target address space. + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_read_list( +#else +routine vm_read_list( +#endif + target_task : vm_map_t; + inout data_list : mach_vm_read_entry_t; + count : natural_t); + +/* + * Writes the contents of the specified range of the + * virtual address space of the target task. [The + * range must be aligned on a virtual page boundary, + * and must be a multiple of pages in extent. The + * protection on the specified range must permit writing.] + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_write( +#else +routine vm_write( +#endif + target_task : vm_map_t; + address : mach_vm_address_t; + data : pointer_t); + +/* + * Copy the contents of the source range of the virtual + * address space of the target task to the destination + * range in that same address space. [Both of the + * ranges must be aligned on a virtual page boundary, + * and must be multiples of pages in extent. The + * protection on the source range must permit reading, + * and the protection on the destination range must + * permit writing.] + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_copy( +#else +routine vm_copy( +#endif + target_task : vm_map_t; + source_address : mach_vm_address_t; + size : mach_vm_size_t; + dest_address : mach_vm_address_t); + +/* + * Returns the contents of the specified range of the + * virtual address space of the target task. [There + * are no alignment restrictions, and the results will + * overwrite the area pointed to by data - which must + * already exist. The protection on the specified range + * must permit reading.] + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_read_overwrite( +#else +routine vm_read_overwrite( +#endif + target_task : vm_map_t; + address : mach_vm_address_t; + size : mach_vm_size_t; + data : mach_vm_address_t; + out outsize : mach_vm_size_t); + + +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_msync( +#else +routine vm_msync( +#endif + target_task : vm_map_t; + address : mach_vm_address_t; + size : mach_vm_size_t; + sync_flags : vm_sync_t ); + +/* + * Set the paging behavior attribute for the specified range + * of the virtual address space of the target task. + * The behavior value is one of {default, random, forward + * sequential, reverse sequential} and indicates the expected + * page reference pattern for the specified range. + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_behavior_set( +#else +routine vm_behavior_set( +#endif + target_task : vm_map_t; + address : mach_vm_address_t; + size : mach_vm_size_t; + new_behavior : vm_behavior_t); + + +/* + * Map a user-supplie memory object into the virtual address + * space of the target task. If desired (anywhere is TRUE), + * the kernel will find a suitable address range of the + * specified size; else, the specific address will be allocated. + * + * The beginning address of the range will be aligned on a virtual + * page boundary, be at or beyond the address specified, and + * meet the mask requirements (bits turned on in the mask must not + * be turned on in the result); the size of the range, in bytes, + * will be rounded up to an integral number of virtual pages. + * + * The memory in the resulting range will be associated with the + * specified memory object, with the beginning of the memory range + * referring to the specified offset into the memory object. + * + * The mapping will take the current and maximum protections and + * the inheritance attributes specified; see the vm_protect and + * vm_inherit calls for a description of these attributes. + * + * If desired (copy is TRUE), the memory range will be filled + * with a copy of the data from the memory object; this copy will + * be private to this mapping in this target task. Otherwise, + * the memory in this mapping will be shared with other mappings + * of the same memory object at the same offset (in this task or + * in other tasks). [The Mach kernel only enforces shared memory + * consistency among mappings on one host with similar page alignments. + * The user-defined memory manager for this object is responsible + * for further consistency.] + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_map( +#else +routine vm_map( +#endif + target_task : vm_task_entry_t; + inout address : mach_vm_address_t; + size : mach_vm_size_t; + mask : mach_vm_offset_t; + flags : int; + object : mem_entry_name_port_t; + offset : memory_object_offset_t; + copy : boolean_t; + cur_protection : vm_prot_t; + max_protection : vm_prot_t; + inheritance : vm_inherit_t); + +/* + * Set/Get special properties of memory associated + * to some virtual address range, such as cachability, + * migrability, replicability. Machine-dependent. + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_machine_attribute( +#else +routine vm_machine_attribute( +#endif + target_task : vm_map_t; + address : mach_vm_address_t; + size : mach_vm_size_t; + attribute : vm_machine_attribute_t; + inout value : vm_machine_attribute_val_t); + +/* + * Map portion of a task's address space. + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_remap( +#else +routine vm_remap( +#endif + target_task : vm_map_t; + inout target_address : mach_vm_address_t; + size : mach_vm_size_t; + mask : mach_vm_offset_t; + anywhere : boolean_t; + src_task : vm_map_t; + src_address : mach_vm_address_t; + copy : boolean_t; + out cur_protection : vm_prot_t; + out max_protection : vm_prot_t; + inheritance : vm_inherit_t); + +/* + * Give the caller information on the given location in a virtual + * address space. If a page is mapped return ref and dirty info. + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_page_query( +#else +routine vm_map_page_query( +#endif + target_map :vm_map_t; + offset :mach_vm_offset_t; + out disposition :integer_t; + out ref_count :integer_t); + + +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_region_recurse( +#else +routine vm_region_recurse_64( +#endif + target_task : vm_map_t; + inout address : mach_vm_address_t; + out size : mach_vm_size_t; + inout nesting_depth : natural_t; + out info : vm_region_recurse_info_t,CountInOut); + +/* + * Returns information about the contents of the virtual + * address space of the target task at the specified + * address. The returned protection, inheritance, sharing + * and memory object values apply to the entire range described + * by the address range returned; the memory object offset + * corresponds to the beginning of the address range. + * [If the specified address is not allocated, the next + * highest address range is described. If no addresses beyond + * the one specified are allocated, the call returns KERN_NO_SPACE.] + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_region( +#else +routine vm_region_64( +#endif + target_task : vm_map_t; + inout address : mach_vm_address_t; + out size : mach_vm_size_t; + flavor : vm_region_flavor_t; + out info : vm_region_info_t, CountInOut; + out object_name : memory_object_name_t = + MACH_MSG_TYPE_MOVE_SEND + ctype: mach_port_t); + +/* + * Allow application level processes to create named entries which + * correspond to mapped portions of their address space. These named + * entries can then be manipulated, shared with other processes in + * other address spaces and ultimately mapped in ohter address spaces + * + * THIS INTERFACE IS STILL EVOLVING. + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +#if !defined(__LP64__) || KERNEL_SERVER || XNU_KERNEL_PRIVATE || LIBSYSCALL_INTERFACE +routine _mach_make_memory_entry( +#else +routine mach_make_memory_entry( +#endif +#else +routine mach_make_memory_entry_64( +#endif + target_task :vm_map_t; + inout size :memory_object_size_t; + offset :memory_object_offset_t; + permission :vm_prot_t; + out object_handle :mem_entry_name_port_move_send_t; + parent_handle :mem_entry_name_port_t); + +/* + * Control behavior and investigate state of a "purgable" object in + * the virtual address space of the target task. A purgable object is + * created via a call to mach_vm_allocate() with VM_FLAGS_PURGABLE + * specified. See the routine implementation for a complete + * definition of the routine. + */ +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_purgable_control( +#else +routine vm_purgable_control( +#endif + target_task : vm_map_t; + address : mach_vm_address_t; + control : vm_purgable_t; + inout state : int); + + +#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) +routine mach_vm_page_info( + target_task : vm_map_t; + address : mach_vm_address_t; + flavor : vm_page_info_flavor_t; + out info : vm_page_info_t, CountInOut); +#else +skip; +#endif + +/****************************** Legacy section ***************************/ +/* The following definitions are exist to provide compatibility with */ +/* the legacy APIs. They are no different. We just need to produce */ +/* the user-level stub interface for them. */ +/****************************** Legacy section ***************************/ + + +/* + * These interfaces just aren't supported in the new (wide) model: + * + * mach_vm_region_info() - + * vm_map_pages_info() - + * no user-level replacement for these MACH_DEBUG interfaces + * vm_map_get_upl() - + * no user-level replacement at the moment + * vm_region_info() - + * use mach_vm_region_info() or vm_region_info_64() + * vm_region_recurse() - + * use mach_vm_region_recurse() or vm_region_recurse_64() + */ + +/* + * The following legacy interfaces are provides as macro wrappers to the new + * interfaces. You should strive to use the new ones instead: + * + * vm_map() - + * use mach_vm_map() or vm_map_64() + * vm_region() - + * use mach_vm_region() or vm_region_64() + * mach_make_memory_entry() - + * use mach_vm_make_memory_entry() or mach_make_memory_entry_64() + */ + +/* vim: set ft=c : */ diff --git a/i386/include/mach/mach_vm.h b/i386/include/mach/mach_vm.h new file mode 100644 index 0000000..f72b17e --- /dev/null +++ b/i386/include/mach/mach_vm.h @@ -0,0 +1,1032 @@ +#ifndef _mach_vm_user_ +#define _mach_vm_user_ + +/* Module mach_vm */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef mach_vm_MSG_COUNT +#define mach_vm_MSG_COUNT 20 +#endif /* mach_vm_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mach_types.h> +#include <mach_debug/mach_debug_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine mach_vm_allocate */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_allocate +( + vm_map_t target, + mach_vm_address_t *address, + mach_vm_size_t size, + int flags +); + +/* Routine mach_vm_deallocate */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_deallocate +( + vm_map_t target, + mach_vm_address_t address, + mach_vm_size_t size +); + +/* Routine mach_vm_protect */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_protect +( + vm_map_t target_task, + mach_vm_address_t address, + mach_vm_size_t size, + boolean_t set_maximum, + vm_prot_t new_protection +); + +/* Routine mach_vm_inherit */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_inherit +( + vm_map_t target_task, + mach_vm_address_t address, + mach_vm_size_t size, + vm_inherit_t new_inheritance +); + +/* Routine mach_vm_read */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_read +( + vm_map_t target_task, + mach_vm_address_t address, + mach_vm_size_t size, + vm_offset_t *data, + mach_msg_type_number_t *dataCnt +); + +/* Routine mach_vm_read_list */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_read_list +( + vm_map_t target_task, + mach_vm_read_entry_t data_list, + natural_t count +); + +/* Routine mach_vm_write */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_write +( + vm_map_t target_task, + mach_vm_address_t address, + vm_offset_t data, + mach_msg_type_number_t dataCnt +); + +/* Routine mach_vm_copy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_copy +( + vm_map_t target_task, + mach_vm_address_t source_address, + mach_vm_size_t size, + mach_vm_address_t dest_address +); + +/* Routine mach_vm_read_overwrite */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_read_overwrite +( + vm_map_t target_task, + mach_vm_address_t address, + mach_vm_size_t size, + mach_vm_address_t data, + mach_vm_size_t *outsize +); + +/* Routine mach_vm_msync */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_msync +( + vm_map_t target_task, + mach_vm_address_t address, + mach_vm_size_t size, + vm_sync_t sync_flags +); + +/* Routine mach_vm_behavior_set */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_behavior_set +( + vm_map_t target_task, + mach_vm_address_t address, + mach_vm_size_t size, + vm_behavior_t new_behavior +); + +/* Routine mach_vm_map */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_map +( + vm_map_t target_task, + mach_vm_address_t *address, + mach_vm_size_t size, + mach_vm_offset_t mask, + int flags, + mem_entry_name_port_t object, + memory_object_offset_t offset, + boolean_t copy, + vm_prot_t cur_protection, + vm_prot_t max_protection, + vm_inherit_t inheritance +); + +/* Routine mach_vm_machine_attribute */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_machine_attribute +( + vm_map_t target_task, + mach_vm_address_t address, + mach_vm_size_t size, + vm_machine_attribute_t attribute, + vm_machine_attribute_val_t *value +); + +/* Routine mach_vm_remap */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_remap +( + vm_map_t target_task, + mach_vm_address_t *target_address, + mach_vm_size_t size, + mach_vm_offset_t mask, + boolean_t anywhere, + vm_map_t src_task, + mach_vm_address_t src_address, + boolean_t copy, + vm_prot_t *cur_protection, + vm_prot_t *max_protection, + vm_inherit_t inheritance +); + +/* Routine mach_vm_page_query */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_page_query +( + vm_map_t target_map, + mach_vm_offset_t offset, + integer_t *disposition, + integer_t *ref_count +); + +/* Routine mach_vm_region_recurse */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_region_recurse +( + vm_map_t target_task, + mach_vm_address_t *address, + mach_vm_size_t *size, + natural_t *nesting_depth, + vm_region_recurse_info_t info, + mach_msg_type_number_t *infoCnt +); + +/* Routine mach_vm_region */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_region +( + vm_map_t target_task, + mach_vm_address_t *address, + mach_vm_size_t *size, + vm_region_flavor_t flavor, + vm_region_info_t info, + mach_msg_type_number_t *infoCnt, + mach_port_t *object_name +); + +/* Routine _mach_make_memory_entry */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t _mach_make_memory_entry +( + vm_map_t target_task, + memory_object_size_t *size, + memory_object_offset_t offset, + vm_prot_t permission, + mem_entry_name_port_t *object_handle, + mem_entry_name_port_t parent_handle +); + +/* Routine mach_vm_purgable_control */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_purgable_control +( + vm_map_t target_task, + mach_vm_address_t address, + vm_purgable_t control, + int *state +); + +/* Routine mach_vm_page_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_page_info +( + vm_map_t target_task, + mach_vm_address_t address, + vm_page_info_flavor_t flavor, + vm_page_info_t info, + mach_msg_type_number_t *infoCnt +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__mach_vm_subsystem__defined +#define __Request__mach_vm_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_vm_address_t address; + mach_vm_size_t size; + int flags; + } __Request__mach_vm_allocate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_vm_address_t address; + mach_vm_size_t size; + } __Request__mach_vm_deallocate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_vm_address_t address; + mach_vm_size_t size; + boolean_t set_maximum; + vm_prot_t new_protection; + } __Request__mach_vm_protect_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_vm_address_t address; + mach_vm_size_t size; + vm_inherit_t new_inheritance; + } __Request__mach_vm_inherit_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_vm_address_t address; + mach_vm_size_t size; + } __Request__mach_vm_read_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_vm_read_entry_t data_list; + natural_t count; + } __Request__mach_vm_read_list_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t data; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_vm_address_t address; + mach_msg_type_number_t dataCnt; + } __Request__mach_vm_write_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_vm_address_t source_address; + mach_vm_size_t size; + mach_vm_address_t dest_address; + } __Request__mach_vm_copy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_vm_address_t address; + mach_vm_size_t size; + mach_vm_address_t data; + } __Request__mach_vm_read_overwrite_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_vm_address_t address; + mach_vm_size_t size; + vm_sync_t sync_flags; + } __Request__mach_vm_msync_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_vm_address_t address; + mach_vm_size_t size; + vm_behavior_t new_behavior; + } __Request__mach_vm_behavior_set_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t object; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_vm_address_t address; + mach_vm_size_t size; + mach_vm_offset_t mask; + int flags; + memory_object_offset_t offset; + boolean_t copy; + vm_prot_t cur_protection; + vm_prot_t max_protection; + vm_inherit_t inheritance; + } __Request__mach_vm_map_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_vm_address_t address; + mach_vm_size_t size; + vm_machine_attribute_t attribute; + vm_machine_attribute_val_t value; + } __Request__mach_vm_machine_attribute_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t src_task; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_vm_address_t target_address; + mach_vm_size_t size; + mach_vm_offset_t mask; + boolean_t anywhere; + mach_vm_address_t src_address; + boolean_t copy; + vm_inherit_t inheritance; + } __Request__mach_vm_remap_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_vm_offset_t offset; + } __Request__mach_vm_page_query_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_vm_address_t address; + natural_t nesting_depth; + mach_msg_type_number_t infoCnt; + } __Request__mach_vm_region_recurse_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_vm_address_t address; + vm_region_flavor_t flavor; + mach_msg_type_number_t infoCnt; + } __Request__mach_vm_region_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t parent_handle; + /* end of the kernel processed data */ + NDR_record_t NDR; + memory_object_size_t size; + memory_object_offset_t offset; + vm_prot_t permission; + } __Request___mach_make_memory_entry_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_vm_address_t address; + vm_purgable_t control; + int state; + } __Request__mach_vm_purgable_control_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_vm_address_t address; + vm_page_info_flavor_t flavor; + mach_msg_type_number_t infoCnt; + } __Request__mach_vm_page_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__mach_vm_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__mach_vm_subsystem__defined +#define __RequestUnion__mach_vm_subsystem__defined +union __RequestUnion__mach_vm_subsystem { + __Request__mach_vm_allocate_t Request_mach_vm_allocate; + __Request__mach_vm_deallocate_t Request_mach_vm_deallocate; + __Request__mach_vm_protect_t Request_mach_vm_protect; + __Request__mach_vm_inherit_t Request_mach_vm_inherit; + __Request__mach_vm_read_t Request_mach_vm_read; + __Request__mach_vm_read_list_t Request_mach_vm_read_list; + __Request__mach_vm_write_t Request_mach_vm_write; + __Request__mach_vm_copy_t Request_mach_vm_copy; + __Request__mach_vm_read_overwrite_t Request_mach_vm_read_overwrite; + __Request__mach_vm_msync_t Request_mach_vm_msync; + __Request__mach_vm_behavior_set_t Request_mach_vm_behavior_set; + __Request__mach_vm_map_t Request_mach_vm_map; + __Request__mach_vm_machine_attribute_t Request_mach_vm_machine_attribute; + __Request__mach_vm_remap_t Request_mach_vm_remap; + __Request__mach_vm_page_query_t Request_mach_vm_page_query; + __Request__mach_vm_region_recurse_t Request_mach_vm_region_recurse; + __Request__mach_vm_region_t Request_mach_vm_region; + __Request___mach_make_memory_entry_t Request__mach_make_memory_entry; + __Request__mach_vm_purgable_control_t Request_mach_vm_purgable_control; + __Request__mach_vm_page_info_t Request_mach_vm_page_info; +}; +#endif /* !__RequestUnion__mach_vm_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__mach_vm_subsystem__defined +#define __Reply__mach_vm_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_vm_address_t address; + } __Reply__mach_vm_allocate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_vm_deallocate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_vm_protect_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_vm_inherit_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t data; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t dataCnt; + } __Reply__mach_vm_read_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_vm_read_entry_t data_list; + } __Reply__mach_vm_read_list_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_vm_write_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_vm_copy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_vm_size_t outsize; + } __Reply__mach_vm_read_overwrite_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_vm_msync_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_vm_behavior_set_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_vm_address_t address; + } __Reply__mach_vm_map_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + vm_machine_attribute_val_t value; + } __Reply__mach_vm_machine_attribute_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_vm_address_t target_address; + vm_prot_t cur_protection; + vm_prot_t max_protection; + } __Reply__mach_vm_remap_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + integer_t disposition; + integer_t ref_count; + } __Reply__mach_vm_page_query_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_vm_address_t address; + mach_vm_size_t size; + natural_t nesting_depth; + mach_msg_type_number_t infoCnt; + int info[19]; + } __Reply__mach_vm_region_recurse_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t object_name; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_vm_address_t address; + mach_vm_size_t size; + mach_msg_type_number_t infoCnt; + int info[10]; + } __Reply__mach_vm_region_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t object_handle; + /* end of the kernel processed data */ + NDR_record_t NDR; + memory_object_size_t size; + } __Reply___mach_make_memory_entry_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + int state; + } __Reply__mach_vm_purgable_control_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t infoCnt; + int info[32]; + } __Reply__mach_vm_page_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__mach_vm_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__mach_vm_subsystem__defined +#define __ReplyUnion__mach_vm_subsystem__defined +union __ReplyUnion__mach_vm_subsystem { + __Reply__mach_vm_allocate_t Reply_mach_vm_allocate; + __Reply__mach_vm_deallocate_t Reply_mach_vm_deallocate; + __Reply__mach_vm_protect_t Reply_mach_vm_protect; + __Reply__mach_vm_inherit_t Reply_mach_vm_inherit; + __Reply__mach_vm_read_t Reply_mach_vm_read; + __Reply__mach_vm_read_list_t Reply_mach_vm_read_list; + __Reply__mach_vm_write_t Reply_mach_vm_write; + __Reply__mach_vm_copy_t Reply_mach_vm_copy; + __Reply__mach_vm_read_overwrite_t Reply_mach_vm_read_overwrite; + __Reply__mach_vm_msync_t Reply_mach_vm_msync; + __Reply__mach_vm_behavior_set_t Reply_mach_vm_behavior_set; + __Reply__mach_vm_map_t Reply_mach_vm_map; + __Reply__mach_vm_machine_attribute_t Reply_mach_vm_machine_attribute; + __Reply__mach_vm_remap_t Reply_mach_vm_remap; + __Reply__mach_vm_page_query_t Reply_mach_vm_page_query; + __Reply__mach_vm_region_recurse_t Reply_mach_vm_region_recurse; + __Reply__mach_vm_region_t Reply_mach_vm_region; + __Reply___mach_make_memory_entry_t Reply__mach_make_memory_entry; + __Reply__mach_vm_purgable_control_t Reply_mach_vm_purgable_control; + __Reply__mach_vm_page_info_t Reply_mach_vm_page_info; +}; +#endif /* !__RequestUnion__mach_vm_subsystem__defined */ + +#ifndef subsystem_to_name_map_mach_vm +#define subsystem_to_name_map_mach_vm \ + { "mach_vm_allocate", 4800 },\ + { "mach_vm_deallocate", 4801 },\ + { "mach_vm_protect", 4802 },\ + { "mach_vm_inherit", 4803 },\ + { "mach_vm_read", 4804 },\ + { "mach_vm_read_list", 4805 },\ + { "mach_vm_write", 4806 },\ + { "mach_vm_copy", 4807 },\ + { "mach_vm_read_overwrite", 4808 },\ + { "mach_vm_msync", 4809 },\ + { "mach_vm_behavior_set", 4810 },\ + { "mach_vm_map", 4811 },\ + { "mach_vm_machine_attribute", 4812 },\ + { "mach_vm_remap", 4813 },\ + { "mach_vm_page_query", 4814 },\ + { "mach_vm_region_recurse", 4815 },\ + { "mach_vm_region", 4816 },\ + { "_mach_make_memory_entry", 4817 },\ + { "mach_vm_purgable_control", 4818 },\ + { "mach_vm_page_info", 4819 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _mach_vm_user_ */ diff --git a/i386/include/mach/machine.h b/i386/include/mach/machine.h new file mode 100644 index 0000000..431d3c9 --- /dev/null +++ b/i386/include/mach/machine.h @@ -0,0 +1,344 @@ +/* + * Copyright (c) 2000-2007 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* File: machine.h + * Author: Avadis Tevanian, Jr. + * Date: 1986 + * + * Machine independent machine abstraction. + */ + +#ifndef _MACH_MACHINE_H_ +#define _MACH_MACHINE_H_ + +#include <stdint.h> +#include <mach/machine/vm_types.h> +#include <mach/boolean.h> + +typedef integer_t cpu_type_t; +typedef integer_t cpu_subtype_t; +typedef integer_t cpu_threadtype_t; + +#define CPU_STATE_MAX 4 + +#define CPU_STATE_USER 0 +#define CPU_STATE_SYSTEM 1 +#define CPU_STATE_IDLE 2 +#define CPU_STATE_NICE 3 + + + +/* + * Capability bits used in the definition of cpu_type. + */ +#define CPU_ARCH_MASK 0xff000000 /* mask for architecture bits */ +#define CPU_ARCH_ABI64 0x01000000 /* 64 bit ABI */ + +/* + * Machine types known by all. + */ + +#define CPU_TYPE_ANY ((cpu_type_t) -1) + +#define CPU_TYPE_VAX ((cpu_type_t) 1) +/* skip ((cpu_type_t) 2) */ +/* skip ((cpu_type_t) 3) */ +/* skip ((cpu_type_t) 4) */ +/* skip ((cpu_type_t) 5) */ +#define CPU_TYPE_MC680x0 ((cpu_type_t) 6) +#define CPU_TYPE_X86 ((cpu_type_t) 7) +#define CPU_TYPE_I386 CPU_TYPE_X86 /* compatibility */ +#define CPU_TYPE_X86_64 (CPU_TYPE_X86 | CPU_ARCH_ABI64) + +/* skip CPU_TYPE_MIPS ((cpu_type_t) 8) */ +/* skip ((cpu_type_t) 9) */ +#define CPU_TYPE_MC98000 ((cpu_type_t) 10) +#define CPU_TYPE_HPPA ((cpu_type_t) 11) +#define CPU_TYPE_ARM ((cpu_type_t) 12) +#define CPU_TYPE_MC88000 ((cpu_type_t) 13) +#define CPU_TYPE_SPARC ((cpu_type_t) 14) +#define CPU_TYPE_I860 ((cpu_type_t) 15) +/* skip CPU_TYPE_ALPHA ((cpu_type_t) 16) */ +/* skip ((cpu_type_t) 17) */ +#define CPU_TYPE_POWERPC ((cpu_type_t) 18) +#define CPU_TYPE_POWERPC64 (CPU_TYPE_POWERPC | CPU_ARCH_ABI64) + +/* + * Machine subtypes (these are defined here, instead of in a machine + * dependent directory, so that any program can get all definitions + * regardless of where is it compiled). + */ + +/* + * Capability bits used in the definition of cpu_subtype. + */ +#define CPU_SUBTYPE_MASK 0xff000000 /* mask for feature flags */ +#define CPU_SUBTYPE_LIB64 0x80000000 /* 64 bit libraries */ + + +/* + * Object files that are hand-crafted to run on any + * implementation of an architecture are tagged with + * CPU_SUBTYPE_MULTIPLE. This functions essentially the same as + * the "ALL" subtype of an architecture except that it allows us + * to easily find object files that may need to be modified + * whenever a new implementation of an architecture comes out. + * + * It is the responsibility of the implementor to make sure the + * software handles unsupported implementations elegantly. + */ +#define CPU_SUBTYPE_MULTIPLE ((cpu_subtype_t) -1) +#define CPU_SUBTYPE_LITTLE_ENDIAN ((cpu_subtype_t) 0) +#define CPU_SUBTYPE_BIG_ENDIAN ((cpu_subtype_t) 1) + +/* + * Machine threadtypes. + * This is none - not defined - for most machine types/subtypes. + */ +#define CPU_THREADTYPE_NONE ((cpu_threadtype_t) 0) + +/* + * VAX subtypes (these do *not* necessary conform to the actual cpu + * ID assigned by DEC available via the SID register). + */ + +#define CPU_SUBTYPE_VAX_ALL ((cpu_subtype_t) 0) +#define CPU_SUBTYPE_VAX780 ((cpu_subtype_t) 1) +#define CPU_SUBTYPE_VAX785 ((cpu_subtype_t) 2) +#define CPU_SUBTYPE_VAX750 ((cpu_subtype_t) 3) +#define CPU_SUBTYPE_VAX730 ((cpu_subtype_t) 4) +#define CPU_SUBTYPE_UVAXI ((cpu_subtype_t) 5) +#define CPU_SUBTYPE_UVAXII ((cpu_subtype_t) 6) +#define CPU_SUBTYPE_VAX8200 ((cpu_subtype_t) 7) +#define CPU_SUBTYPE_VAX8500 ((cpu_subtype_t) 8) +#define CPU_SUBTYPE_VAX8600 ((cpu_subtype_t) 9) +#define CPU_SUBTYPE_VAX8650 ((cpu_subtype_t) 10) +#define CPU_SUBTYPE_VAX8800 ((cpu_subtype_t) 11) +#define CPU_SUBTYPE_UVAXIII ((cpu_subtype_t) 12) + +/* + * 680x0 subtypes + * + * The subtype definitions here are unusual for historical reasons. + * NeXT used to consider 68030 code as generic 68000 code. For + * backwards compatability: + * + * CPU_SUBTYPE_MC68030 symbol has been preserved for source code + * compatability. + * + * CPU_SUBTYPE_MC680x0_ALL has been defined to be the same + * subtype as CPU_SUBTYPE_MC68030 for binary comatability. + * + * CPU_SUBTYPE_MC68030_ONLY has been added to allow new object + * files to be tagged as containing 68030-specific instructions. + */ + +#define CPU_SUBTYPE_MC680x0_ALL ((cpu_subtype_t) 1) +#define CPU_SUBTYPE_MC68030 ((cpu_subtype_t) 1) /* compat */ +#define CPU_SUBTYPE_MC68040 ((cpu_subtype_t) 2) +#define CPU_SUBTYPE_MC68030_ONLY ((cpu_subtype_t) 3) + +/* + * I386 subtypes + */ + +#define CPU_SUBTYPE_INTEL(f, m) ((cpu_subtype_t) (f) + ((m) << 4)) + +#define CPU_SUBTYPE_I386_ALL CPU_SUBTYPE_INTEL(3, 0) +#define CPU_SUBTYPE_386 CPU_SUBTYPE_INTEL(3, 0) +#define CPU_SUBTYPE_486 CPU_SUBTYPE_INTEL(4, 0) +#define CPU_SUBTYPE_486SX CPU_SUBTYPE_INTEL(4, 8) // 8 << 4 = 128 +#define CPU_SUBTYPE_586 CPU_SUBTYPE_INTEL(5, 0) +#define CPU_SUBTYPE_PENT CPU_SUBTYPE_INTEL(5, 0) +#define CPU_SUBTYPE_PENTPRO CPU_SUBTYPE_INTEL(6, 1) +#define CPU_SUBTYPE_PENTII_M3 CPU_SUBTYPE_INTEL(6, 3) +#define CPU_SUBTYPE_PENTII_M5 CPU_SUBTYPE_INTEL(6, 5) +#define CPU_SUBTYPE_CELERON CPU_SUBTYPE_INTEL(7, 6) +#define CPU_SUBTYPE_CELERON_MOBILE CPU_SUBTYPE_INTEL(7, 7) +#define CPU_SUBTYPE_PENTIUM_3 CPU_SUBTYPE_INTEL(8, 0) +#define CPU_SUBTYPE_PENTIUM_3_M CPU_SUBTYPE_INTEL(8, 1) +#define CPU_SUBTYPE_PENTIUM_3_XEON CPU_SUBTYPE_INTEL(8, 2) +#define CPU_SUBTYPE_PENTIUM_M CPU_SUBTYPE_INTEL(9, 0) +#define CPU_SUBTYPE_PENTIUM_4 CPU_SUBTYPE_INTEL(10, 0) +#define CPU_SUBTYPE_PENTIUM_4_M CPU_SUBTYPE_INTEL(10, 1) +#define CPU_SUBTYPE_ITANIUM CPU_SUBTYPE_INTEL(11, 0) +#define CPU_SUBTYPE_ITANIUM_2 CPU_SUBTYPE_INTEL(11, 1) +#define CPU_SUBTYPE_XEON CPU_SUBTYPE_INTEL(12, 0) +#define CPU_SUBTYPE_XEON_MP CPU_SUBTYPE_INTEL(12, 1) + +#define CPU_SUBTYPE_INTEL_FAMILY(x) ((x) & 15) +#define CPU_SUBTYPE_INTEL_FAMILY_MAX 15 + +#define CPU_SUBTYPE_INTEL_MODEL(x) ((x) >> 4) +#define CPU_SUBTYPE_INTEL_MODEL_ALL 0 + +/* + * X86 subtypes. + */ + +#define CPU_SUBTYPE_X86_ALL ((cpu_subtype_t)3) +#define CPU_SUBTYPE_X86_64_ALL ((cpu_subtype_t)3) +#define CPU_SUBTYPE_X86_ARCH1 ((cpu_subtype_t)4) + + +#define CPU_THREADTYPE_INTEL_HTT ((cpu_threadtype_t) 1) + +/* + * Mips subtypes. + */ + +#define CPU_SUBTYPE_MIPS_ALL ((cpu_subtype_t) 0) +#define CPU_SUBTYPE_MIPS_R2300 ((cpu_subtype_t) 1) +#define CPU_SUBTYPE_MIPS_R2600 ((cpu_subtype_t) 2) +#define CPU_SUBTYPE_MIPS_R2800 ((cpu_subtype_t) 3) +#define CPU_SUBTYPE_MIPS_R2000a ((cpu_subtype_t) 4) /* pmax */ +#define CPU_SUBTYPE_MIPS_R2000 ((cpu_subtype_t) 5) +#define CPU_SUBTYPE_MIPS_R3000a ((cpu_subtype_t) 6) /* 3max */ +#define CPU_SUBTYPE_MIPS_R3000 ((cpu_subtype_t) 7) + +/* + * MC98000 (PowerPC) subtypes + */ +#define CPU_SUBTYPE_MC98000_ALL ((cpu_subtype_t) 0) +#define CPU_SUBTYPE_MC98601 ((cpu_subtype_t) 1) + +/* + * HPPA subtypes for Hewlett-Packard HP-PA family of + * risc processors. Port by NeXT to 700 series. + */ + +#define CPU_SUBTYPE_HPPA_ALL ((cpu_subtype_t) 0) +#define CPU_SUBTYPE_HPPA_7100 ((cpu_subtype_t) 0) /* compat */ +#define CPU_SUBTYPE_HPPA_7100LC ((cpu_subtype_t) 1) + +/* + * MC88000 subtypes. + */ +#define CPU_SUBTYPE_MC88000_ALL ((cpu_subtype_t) 0) +#define CPU_SUBTYPE_MC88100 ((cpu_subtype_t) 1) +#define CPU_SUBTYPE_MC88110 ((cpu_subtype_t) 2) + +/* + * SPARC subtypes + */ +#define CPU_SUBTYPE_SPARC_ALL ((cpu_subtype_t) 0) + +/* + * I860 subtypes + */ +#define CPU_SUBTYPE_I860_ALL ((cpu_subtype_t) 0) +#define CPU_SUBTYPE_I860_860 ((cpu_subtype_t) 1) + +/* + * PowerPC subtypes + */ +#define CPU_SUBTYPE_POWERPC_ALL ((cpu_subtype_t) 0) +#define CPU_SUBTYPE_POWERPC_601 ((cpu_subtype_t) 1) +#define CPU_SUBTYPE_POWERPC_602 ((cpu_subtype_t) 2) +#define CPU_SUBTYPE_POWERPC_603 ((cpu_subtype_t) 3) +#define CPU_SUBTYPE_POWERPC_603e ((cpu_subtype_t) 4) +#define CPU_SUBTYPE_POWERPC_603ev ((cpu_subtype_t) 5) +#define CPU_SUBTYPE_POWERPC_604 ((cpu_subtype_t) 6) +#define CPU_SUBTYPE_POWERPC_604e ((cpu_subtype_t) 7) +#define CPU_SUBTYPE_POWERPC_620 ((cpu_subtype_t) 8) +#define CPU_SUBTYPE_POWERPC_750 ((cpu_subtype_t) 9) +#define CPU_SUBTYPE_POWERPC_7400 ((cpu_subtype_t) 10) +#define CPU_SUBTYPE_POWERPC_7450 ((cpu_subtype_t) 11) +#define CPU_SUBTYPE_POWERPC_970 ((cpu_subtype_t) 100) + +/* + * ARM subtypes + */ +#define CPU_SUBTYPE_ARM_ALL ((cpu_subtype_t) 0) +#define CPU_SUBTYPE_ARM_V4T ((cpu_subtype_t) 5) +#define CPU_SUBTYPE_ARM_V6 ((cpu_subtype_t) 6) +#define CPU_SUBTYPE_ARM_V5TEJ ((cpu_subtype_t) 7) +#define CPU_SUBTYPE_ARM_XSCALE ((cpu_subtype_t) 8) +#define CPU_SUBTYPE_ARM_V7 ((cpu_subtype_t) 9) + +/* + * CPU families (sysctl hw.cpufamily) + * + * These are meant to identify the CPU's marketing name - an + * application can map these to (possibly) localized strings. + * NB: the encodings of the CPU families are intentionally arbitrary. + * There is no ordering, and you should never try to deduce whether + * or not some feature is available based on the family. + * Use feature flags (eg, hw.optional.altivec) to test for optional + * functionality. + */ +#define CPUFAMILY_UNKNOWN 0 +#define CPUFAMILY_POWERPC_G3 0xcee41549 +#define CPUFAMILY_POWERPC_G4 0x77c184ae +#define CPUFAMILY_POWERPC_G5 0xed76d8aa +#define CPUFAMILY_INTEL_6_13 0xaa33392b +#define CPUFAMILY_INTEL_YONAH 0x73d67300 +#define CPUFAMILY_INTEL_MEROM 0x426f69ef +#define CPUFAMILY_INTEL_PENRYN 0x78ea4fbc +#define CPUFAMILY_INTEL_NEHALEM 0x6b5a4cd2 +#define CPUFAMILY_INTEL_WESTMERE 0x573b5eec +#define CPUFAMILY_ARM_9 0xe73283ae +#define CPUFAMILY_ARM_11 0x8ff620d8 +#define CPUFAMILY_ARM_XSCALE 0x53b005f5 +#define CPUFAMILY_ARM_13 0x0cc90e64 + +/* The following synonyms are deprecated: */ +#define CPUFAMILY_INTEL_6_14 CPUFAMILY_INTEL_YONAH +#define CPUFAMILY_INTEL_6_15 CPUFAMILY_INTEL_MEROM +#define CPUFAMILY_INTEL_6_23 CPUFAMILY_INTEL_PENRYN +#define CPUFAMILY_INTEL_6_26 CPUFAMILY_INTEL_NEHALEM + +#define CPUFAMILY_INTEL_CORE CPUFAMILY_INTEL_YONAH +#define CPUFAMILY_INTEL_CORE2 CPUFAMILY_INTEL_MEROM + + +#endif /* _MACH_MACHINE_H_ */ diff --git a/i386/include/mach/machine/asm.h b/i386/include/mach/machine/asm.h new file mode 100644 index 0000000..59e1da2 --- /dev/null +++ b/i386/include/mach/machine/asm.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_MACHINE_ASM_H +#define _MACH_MACHINE_ASM_H + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _MACH_MACHINE_ASM_H */ diff --git a/i386/include/mach/machine/boolean.h b/i386/include/mach/machine/boolean.h new file mode 100644 index 0000000..1bec00d --- /dev/null +++ b/i386/include/mach/machine/boolean.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_MACHINE_BOOLEAN_H_ +#define _MACH_MACHINE_BOOLEAN_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _MACH_MACHINE_BOOLEAN_H_ */ diff --git a/i386/include/mach/machine/exception.h b/i386/include/mach/machine/exception.h new file mode 100644 index 0000000..5ce83f2 --- /dev/null +++ b/i386/include/mach/machine/exception.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_MACHINE_EXCEPTION_H_ +#define _MACH_MACHINE_EXCEPTION_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _MACH_MACHINE_EXCEPTION_H_ */ diff --git a/i386/include/mach/machine/kern_return.h b/i386/include/mach/machine/kern_return.h new file mode 100644 index 0000000..df37396 --- /dev/null +++ b/i386/include/mach/machine/kern_return.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_MACHINE_KERN_RETURN_H_ +#define _MACH_MACHINE_KERN_RETURN_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _MACH_MACHINE_KERN_RETURN_H_ */ diff --git a/i386/include/mach/machine/machine_types.defs b/i386/include/mach/machine/machine_types.defs new file mode 100644 index 0000000..418d16b --- /dev/null +++ b/i386/include/mach/machine/machine_types.defs @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_MACHINE_MACHINE_TYPES_DEFS +#define _MACH_MACHINE_MACHINE_TYPES_DEFS + +#if defined (__ppc__) || defined (__ppc64__) +#include "mach/ppc/machine_types.defs" +#elif defined (__i386__) || defined(__x86_64__) +#include "mach/i386/machine_types.defs" +#elif defined (__arm__) +#include "mach/arm/machine_types.defs" +#else +#error architecture not supported +#endif + +#endif /* _MACH_MACHINE_THREAD_STATUS_H_ */ + +/* vim: set ft=c : */ diff --git a/i386/include/mach/machine/ndr_def.h b/i386/include/mach/machine/ndr_def.h new file mode 100644 index 0000000..a7b5a9b --- /dev/null +++ b/i386/include/mach/machine/ndr_def.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_MACHINE_NDR_DEF_H +#define _MACH_MACHINE_NDR_DEF_H + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _MACH_MACHINE_NDR_DEF_H */ diff --git a/i386/include/mach/machine/processor_info.h b/i386/include/mach/machine/processor_info.h new file mode 100644 index 0000000..ca96367 --- /dev/null +++ b/i386/include/mach/machine/processor_info.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_MACHINE_PROCESSOR_INFO_H_ +#define _MACH_MACHINE_PROCESSOR_INFO_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _MACH_MACHINE_PROCESSOR_INFO_H_ */ diff --git a/i386/include/mach/machine/rpc.h b/i386/include/mach/machine/rpc.h new file mode 100644 index 0000000..b969bd4 --- /dev/null +++ b/i386/include/mach/machine/rpc.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_MACHINE_RPC_H_ +#define _MACH_MACHINE_RPC_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _MACH_MACHINE_RPC_H_ */ diff --git a/i386/include/mach/machine/sdt.h b/i386/include/mach/machine/sdt.h new file mode 100644 index 0000000..e85508f --- /dev/null +++ b/i386/include/mach/machine/sdt.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2007 Apple Inc. All rights reserved. + */ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _MACH_MACHINE_SYS_SDT_H +#define _MACH_MACHINE_SYS_SDT_H + +#include <mach/machine/sdt_isa.h> + + +#endif /* _MACH_MACHINE_SYS_SDT_H */ diff --git a/i386/include/mach/machine/sdt_isa.h b/i386/include/mach/machine/sdt_isa.h new file mode 100644 index 0000000..a8e1379 --- /dev/null +++ b/i386/include/mach/machine/sdt_isa.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _MACH_MACHINE_SDT_ISA_H_ +#define _MACH_MACHINE_SDT_ISA_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _BSD_MACHINE_SDT_ISA_H_ */ diff --git a/i386/include/mach/machine/thread_state.h b/i386/include/mach/machine/thread_state.h new file mode 100644 index 0000000..18ffca4 --- /dev/null +++ b/i386/include/mach/machine/thread_state.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_MACHINE_THREAD_STATE_H_ +#define _MACH_MACHINE_THREAD_STATE_H_ + +#if defined (__ppc__) || defined(__ppc64__) +#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 + +#endif /* _MACH_MACHINE_THREAD_STATE_H_ */ diff --git a/i386/include/mach/machine/thread_status.h b/i386/include/mach/machine/thread_status.h new file mode 100644 index 0000000..ad5eff0 --- /dev/null +++ b/i386/include/mach/machine/thread_status.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_MACHINE_THREAD_STATUS_H_ +#define _MACH_MACHINE_THREAD_STATUS_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _MACH_MACHINE_THREAD_STATUS_H_ */ diff --git a/i386/include/mach/machine/vm_param.h b/i386/include/mach/machine/vm_param.h new file mode 100644 index 0000000..c71121b --- /dev/null +++ b/i386/include/mach/machine/vm_param.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_MACHINE_VM_PARAM_H_ +#define _MACH_MACHINE_VM_PARAM_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _MACH_MACHINE_VM_PARAM_H_ */ diff --git a/i386/include/mach/machine/vm_types.h b/i386/include/mach/machine/vm_types.h new file mode 100644 index 0000000..b366092 --- /dev/null +++ b/i386/include/mach/machine/vm_types.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_MACHINE_VM_TYPES_H_ +#define _MACH_MACHINE_VM_TYPES_H_ + +#if defined (__ppc__) || defined(__ppc64__) +#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 + +#endif /* _MACH_MACHINE_VM_TYPES_H_ */ diff --git a/i386/include/mach/memory_object_types.h b/i386/include/mach/memory_object_types.h new file mode 100644 index 0000000..5c1f76e --- /dev/null +++ b/i386/include/mach/memory_object_types.h @@ -0,0 +1,271 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: memory_object.h + * Author: Michael Wayne Young + * + * External memory management interface definition. + */ + +#ifndef _MACH_MEMORY_OBJECT_TYPES_H_ +#define _MACH_MEMORY_OBJECT_TYPES_H_ + +/* + * User-visible types used in the external memory + * management interface: + */ + +#include <mach/port.h> +#include <mach/message.h> +#include <mach/vm_prot.h> +#include <mach/vm_sync.h> +#include <mach/vm_types.h> +#include <mach/machine/vm_types.h> + +#include <sys/cdefs.h> + +#define VM_64_BIT_DATA_OBJECTS + +typedef unsigned long long memory_object_offset_t; +typedef unsigned long long memory_object_size_t; +typedef natural_t memory_object_cluster_size_t; +typedef natural_t * memory_object_fault_info_t; + +typedef unsigned long long vm_object_id_t; + + +/* + * Temporary until real EMMI version gets re-implemented + */ + + +typedef mach_port_t memory_object_t; +typedef mach_port_t memory_object_control_t; + + +typedef memory_object_t *memory_object_array_t; + /* A memory object ... */ + /* Used by the kernel to retrieve */ + /* or store data */ + +typedef mach_port_t memory_object_name_t; + /* Used to describe the memory ... */ + /* object in vm_regions() calls */ + +typedef mach_port_t memory_object_default_t; + /* Registered with the host ... */ + /* for creating new internal objects */ + +#define MEMORY_OBJECT_NULL ((memory_object_t) 0) +#define MEMORY_OBJECT_CONTROL_NULL ((memory_object_control_t) 0) +#define MEMORY_OBJECT_NAME_NULL ((memory_object_name_t) 0) +#define MEMORY_OBJECT_DEFAULT_NULL ((memory_object_default_t) 0) + + +typedef int memory_object_copy_strategy_t; + /* How memory manager handles copy: */ +#define MEMORY_OBJECT_COPY_NONE 0 + /* ... No special support */ +#define MEMORY_OBJECT_COPY_CALL 1 + /* ... Make call on memory manager */ +#define MEMORY_OBJECT_COPY_DELAY 2 + /* ... Memory manager doesn't + * change data externally. + */ +#define MEMORY_OBJECT_COPY_TEMPORARY 3 + /* ... Memory manager doesn't + * change data externally, and + * doesn't need to see changes. + */ +#define MEMORY_OBJECT_COPY_SYMMETRIC 4 + /* ... Memory manager doesn't + * change data externally, + * doesn't need to see changes, + * and object will not be + * multiply mapped. + * + * XXX + * Not yet safe for non-kernel use. + */ + +#define MEMORY_OBJECT_COPY_INVALID 5 + /* ... An invalid copy strategy, + * for external objects which + * have not been initialized. + * Allows copy_strategy to be + * examined without also + * examining pager_ready and + * internal. + */ + +typedef int memory_object_return_t; + /* Which pages to return to manager + this time (lock_request) */ +#define MEMORY_OBJECT_RETURN_NONE 0 + /* ... don't return any. */ +#define MEMORY_OBJECT_RETURN_DIRTY 1 + /* ... only dirty pages. */ +#define MEMORY_OBJECT_RETURN_ALL 2 + /* ... dirty and precious pages. */ +#define MEMORY_OBJECT_RETURN_ANYTHING 3 + /* ... any resident page. */ + +/* + * Data lock request flags + */ + +#define MEMORY_OBJECT_DATA_FLUSH 0x1 +#define MEMORY_OBJECT_DATA_NO_CHANGE 0x2 +#define MEMORY_OBJECT_DATA_PURGE 0x4 +#define MEMORY_OBJECT_COPY_SYNC 0x8 +#define MEMORY_OBJECT_DATA_SYNC 0x10 +#define MEMORY_OBJECT_IO_SYNC 0x20 +#define MEMORY_OBJECT_DATA_FLUSH_ALL 0x40 + +/* + * Types for the memory object flavor interfaces + */ + +#define MEMORY_OBJECT_INFO_MAX (1024) +typedef int *memory_object_info_t; +typedef int memory_object_flavor_t; +typedef int memory_object_info_data_t[MEMORY_OBJECT_INFO_MAX]; + + +#define MEMORY_OBJECT_PERFORMANCE_INFO 11 +#define MEMORY_OBJECT_ATTRIBUTE_INFO 14 +#define MEMORY_OBJECT_BEHAVIOR_INFO 15 + + +struct memory_object_perf_info { + memory_object_cluster_size_t cluster_size; + boolean_t may_cache; +}; + +struct memory_object_attr_info { + memory_object_copy_strategy_t copy_strategy; + memory_object_cluster_size_t cluster_size; + boolean_t may_cache_object; + boolean_t temporary; +}; + +struct memory_object_behave_info { + memory_object_copy_strategy_t copy_strategy; + boolean_t temporary; + boolean_t invalidate; + boolean_t silent_overwrite; + boolean_t advisory_pageout; +}; + + +typedef struct memory_object_behave_info *memory_object_behave_info_t; +typedef struct memory_object_behave_info memory_object_behave_info_data_t; + +typedef struct memory_object_perf_info *memory_object_perf_info_t; +typedef struct memory_object_perf_info memory_object_perf_info_data_t; + +typedef struct memory_object_attr_info *memory_object_attr_info_t; +typedef struct memory_object_attr_info memory_object_attr_info_data_t; + +#define MEMORY_OBJECT_BEHAVE_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(memory_object_behave_info_data_t)/sizeof(int))) +#define MEMORY_OBJECT_PERF_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(memory_object_perf_info_data_t)/sizeof(int))) +#define MEMORY_OBJECT_ATTR_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(memory_object_attr_info_data_t)/sizeof(int))) + +#define invalid_memory_object_flavor(f) \ + (f != MEMORY_OBJECT_ATTRIBUTE_INFO && \ + f != MEMORY_OBJECT_PERFORMANCE_INFO && \ + f != OLD_MEMORY_OBJECT_BEHAVIOR_INFO && \ + f != MEMORY_OBJECT_BEHAVIOR_INFO && \ + f != OLD_MEMORY_OBJECT_ATTRIBUTE_INFO) + + +/* + * Used to support options on memory_object_release_name call + */ +#define MEMORY_OBJECT_TERMINATE_IDLE 0x1 +#define MEMORY_OBJECT_RESPECT_CACHE 0x2 +#define MEMORY_OBJECT_RELEASE_NO_OP 0x4 + + +/* named entry processor mapping options */ +/* enumerated */ +#define MAP_MEM_NOOP 0 +#define MAP_MEM_COPYBACK 1 +#define MAP_MEM_IO 2 +#define MAP_MEM_WTHRU 3 +#define MAP_MEM_WCOMB 4 /* Write combining mode */ + /* aka store gather */ + +#define GET_MAP_MEM(flags) \ + ((((unsigned int)(flags)) >> 24) & 0xFF) + +#define SET_MAP_MEM(caching, flags) \ + ((flags) = ((((unsigned int)(caching)) << 24) \ + & 0xFF000000) | ((flags) & 0xFFFFFF)); + +/* leave room for vm_prot bits */ +#define MAP_MEM_ONLY 0x10000 /* change processor caching */ +#define MAP_MEM_NAMED_CREATE 0x20000 /* create extant object */ +#define MAP_MEM_PURGABLE 0x40000 /* create a purgable VM object */ +#define MAP_MEM_NAMED_REUSE 0x80000 /* reuse provided entry if identical */ + + +#endif /* _MACH_MEMORY_OBJECT_TYPES_H_ */ diff --git a/i386/include/mach/message.h b/i386/include/mach/message.h new file mode 100644 index 0000000..15c9be4 --- /dev/null +++ b/i386/include/mach/message.h @@ -0,0 +1,783 @@ +/* + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * NOTICE: This file was modified by McAfee Research in 2004 to introduce + * support for mandatory and extensible security protections. This notice + * is included in support of clause 2.2 (b) of the Apple Public License, + * Version 2.0. + * Copyright (c) 2005 SPARTA, Inc. + */ +/* + */ +/* + * File: mach/message.h + * + * Mach IPC message and primitive function definitions. + */ + +#ifndef _MACH_MESSAGE_H_ +#define _MACH_MESSAGE_H_ + +#include <stdint.h> +#include <mach/port.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/machine/vm_types.h> + +#include <sys/cdefs.h> + +/* + * The timeout mechanism uses mach_msg_timeout_t values, + * passed by value. The timeout units are milliseconds. + * It is controlled with the MACH_SEND_TIMEOUT + * and MACH_RCV_TIMEOUT options. + */ + +typedef natural_t mach_msg_timeout_t; + +/* + * The value to be used when there is no timeout. + * (No MACH_SEND_TIMEOUT/MACH_RCV_TIMEOUT option.) + */ + +#define MACH_MSG_TIMEOUT_NONE ((mach_msg_timeout_t) 0) + +/* + * The kernel uses MACH_MSGH_BITS_COMPLEX as a hint. If it isn't on, it + * assumes the body of the message doesn't contain port rights or OOL + * data. The field is set in received messages. A user task must + * use caution in interpreting the body of a message if the bit isn't + * on, because the mach_msg_type's in the body might "lie" about the + * contents. If the bit isn't on, but the mach_msg_types + * in the body specify rights or OOL data, the behavior is undefined. + * (Ie, an error may or may not be produced.) + * + * The value of MACH_MSGH_BITS_REMOTE determines the interpretation + * of the msgh_remote_port field. It is handled like a msgt_name. + * + * The value of MACH_MSGH_BITS_LOCAL determines the interpretation + * of the msgh_local_port field. It is handled like a msgt_name. + * + * MACH_MSGH_BITS() combines two MACH_MSG_TYPE_* values, for the remote + * and local fields, into a single value suitable for msgh_bits. + * + * MACH_MSGH_BITS_CIRCULAR should be zero; is is used internally. + * + * The unused bits should be zero and are reserved for the kernel + * or for future interface expansion. + */ + +#define MACH_MSGH_BITS_ZERO 0x00000000 +#define MACH_MSGH_BITS_REMOTE_MASK 0x000000ff +#define MACH_MSGH_BITS_LOCAL_MASK 0x0000ff00 +#define MACH_MSGH_BITS_COMPLEX 0x80000000U +#define MACH_MSGH_BITS_USER 0x8000ffffU + +#define MACH_MSGH_BITS_CIRCULAR 0x40000000 /* internal use only */ +#define MACH_MSGH_BITS_USED 0xc000ffffU + +#define MACH_MSGH_BITS_PORTS_MASK \ + (MACH_MSGH_BITS_REMOTE_MASK|MACH_MSGH_BITS_LOCAL_MASK) + +#define MACH_MSGH_BITS(remote, local) \ + ((remote) | ((local) << 8)) +#define MACH_MSGH_BITS_REMOTE(bits) \ + ((bits) & MACH_MSGH_BITS_REMOTE_MASK) +#define MACH_MSGH_BITS_LOCAL(bits) \ + (((bits) & MACH_MSGH_BITS_LOCAL_MASK) >> 8) +#define MACH_MSGH_BITS_PORTS(bits) \ + ((bits) & MACH_MSGH_BITS_PORTS_MASK) +#define MACH_MSGH_BITS_OTHER(bits) \ + ((bits) &~ MACH_MSGH_BITS_PORTS_MASK) + +/* + * Every message starts with a message header. + * Following the message header, if the message is complex, are a count + * of type descriptors and the type descriptors themselves + * (mach_msg_descriptor_t). The size of the message must be specified in + * bytes, and includes the message header, descriptor count, descriptors, + * and inline data. + * + * The msgh_remote_port field specifies the destination of the message. + * It must specify a valid send or send-once right for a port. + * + * The msgh_local_port field specifies a "reply port". Normally, + * This field carries a send-once right that the receiver will use + * to reply to the message. It may carry the values MACH_PORT_NULL, + * MACH_PORT_DEAD, a send-once right, or a send right. + * + * The msgh_seqno field carries a sequence number associated with the + * received-from port. A port's sequence number is incremented every + * time a message is received from it. In sent messages, the field's + * value is ignored. + * + * The msgh_id field is uninterpreted by the message primitives. + * It normally carries information specifying the format + * or meaning of the message. + */ + +typedef unsigned int mach_msg_bits_t; +typedef natural_t mach_msg_size_t; +typedef integer_t mach_msg_id_t; + + +#define MACH_MSG_SIZE_NULL (mach_msg_size_t *) 0 + +typedef unsigned int mach_msg_type_name_t; + +#define MACH_MSG_TYPE_MOVE_RECEIVE 16 /* Must hold receive rights */ +#define MACH_MSG_TYPE_MOVE_SEND 17 /* Must hold send rights */ +#define MACH_MSG_TYPE_MOVE_SEND_ONCE 18 /* Must hold sendonce rights */ +#define MACH_MSG_TYPE_COPY_SEND 19 /* Must hold send rights */ +#define MACH_MSG_TYPE_MAKE_SEND 20 /* Must hold receive rights */ +#define MACH_MSG_TYPE_MAKE_SEND_ONCE 21 /* Must hold receive rights */ +#define MACH_MSG_TYPE_COPY_RECEIVE 22 /* Must hold receive rights */ + +typedef unsigned int mach_msg_copy_options_t; + +#define MACH_MSG_PHYSICAL_COPY 0 +#define MACH_MSG_VIRTUAL_COPY 1 +#define MACH_MSG_ALLOCATE 2 +#define MACH_MSG_OVERWRITE 3 +#ifdef MACH_KERNEL +#define MACH_MSG_KALLOC_COPY_T 4 +#endif /* MACH_KERNEL */ + +/* + * In a complex mach message, the mach_msg_header_t is followed by + * a descriptor count, then an array of that number of descriptors + * (mach_msg_*_descriptor_t). The type field of mach_msg_type_descriptor_t + * (which any descriptor can be cast to) indicates the flavor of the + * descriptor. + * + * Note that in LP64, the various types of descriptors are no longer all + * the same size as mach_msg_descriptor_t, so the array cannot be indexed + * as expected. + */ + +typedef unsigned int mach_msg_descriptor_type_t; + +#define MACH_MSG_PORT_DESCRIPTOR 0 +#define MACH_MSG_OOL_DESCRIPTOR 1 +#define MACH_MSG_OOL_PORTS_DESCRIPTOR 2 +#define MACH_MSG_OOL_VOLATILE_DESCRIPTOR 3 + +#pragma pack(4) + +typedef struct +{ + natural_t pad1; + mach_msg_size_t pad2; + unsigned int pad3 : 24; + mach_msg_descriptor_type_t type : 8; +} mach_msg_type_descriptor_t; + +typedef struct +{ + mach_port_t name; +#if !(defined(KERNEL) && defined(__LP64__)) +// Pad to 8 bytes everywhere except the K64 kernel where mach_port_t is 8 bytes + mach_msg_size_t pad1; +#endif + unsigned int pad2 : 16; + mach_msg_type_name_t disposition : 8; + mach_msg_descriptor_type_t type : 8; +} mach_msg_port_descriptor_t; + +typedef struct +{ + uint32_t address; + mach_msg_size_t size; + boolean_t deallocate: 8; + mach_msg_copy_options_t copy: 8; + unsigned int pad1: 8; + mach_msg_descriptor_type_t type: 8; +} mach_msg_ool_descriptor32_t; + +typedef struct +{ + uint64_t address; + boolean_t deallocate: 8; + mach_msg_copy_options_t copy: 8; + unsigned int pad1: 8; + mach_msg_descriptor_type_t type: 8; + mach_msg_size_t size; +} mach_msg_ool_descriptor64_t; + +typedef struct +{ + void* address; +#if !defined(__LP64__) + mach_msg_size_t size; +#endif + boolean_t deallocate: 8; + mach_msg_copy_options_t copy: 8; + unsigned int pad1: 8; + mach_msg_descriptor_type_t type: 8; +#if defined(__LP64__) + mach_msg_size_t size; +#endif +#if defined(KERNEL) && !defined(__LP64__) + uint32_t pad_end; +#endif +} mach_msg_ool_descriptor_t; + +typedef struct +{ + uint32_t address; + mach_msg_size_t count; + boolean_t deallocate: 8; + mach_msg_copy_options_t copy: 8; + mach_msg_type_name_t disposition : 8; + mach_msg_descriptor_type_t type : 8; +} mach_msg_ool_ports_descriptor32_t; + +typedef struct +{ + uint64_t address; + boolean_t deallocate: 8; + mach_msg_copy_options_t copy: 8; + mach_msg_type_name_t disposition : 8; + mach_msg_descriptor_type_t type : 8; + mach_msg_size_t count; +} mach_msg_ool_ports_descriptor64_t; + +typedef struct +{ + void* address; +#if !defined(__LP64__) + mach_msg_size_t count; +#endif + boolean_t deallocate: 8; + mach_msg_copy_options_t copy: 8; + mach_msg_type_name_t disposition : 8; + mach_msg_descriptor_type_t type : 8; +#if defined(__LP64__) + mach_msg_size_t count; +#endif +#if defined(KERNEL) && !defined(__LP64__) + uint32_t pad_end; +#endif +} mach_msg_ool_ports_descriptor_t; + +/* + * LP64support - This union definition is not really + * appropriate in LP64 mode because not all descriptors + * are of the same size in that environment. + */ +#if defined(__LP64__) && defined(KERNEL) +typedef union +{ + mach_msg_port_descriptor_t port; + mach_msg_ool_descriptor32_t out_of_line; + mach_msg_ool_ports_descriptor32_t ool_ports; + mach_msg_type_descriptor_t type; +} mach_msg_descriptor_t; +#else +typedef union +{ + mach_msg_port_descriptor_t port; + mach_msg_ool_descriptor_t out_of_line; + mach_msg_ool_ports_descriptor_t ool_ports; + mach_msg_type_descriptor_t type; +} mach_msg_descriptor_t; +#endif + +typedef struct +{ + mach_msg_size_t msgh_descriptor_count; +} mach_msg_body_t; + +#define MACH_MSG_BODY_NULL (mach_msg_body_t *) 0 +#define MACH_MSG_DESCRIPTOR_NULL (mach_msg_descriptor_t *) 0 + +typedef struct +{ + mach_msg_bits_t msgh_bits; + mach_msg_size_t msgh_size; + mach_port_t msgh_remote_port; + mach_port_t msgh_local_port; + mach_msg_size_t msgh_reserved; + mach_msg_id_t msgh_id; +} mach_msg_header_t; + +#define MACH_MSG_NULL (mach_msg_header_t *) 0 + +typedef struct +{ + mach_msg_header_t header; + mach_msg_body_t body; +} mach_msg_base_t; + +typedef unsigned int mach_msg_trailer_type_t; + +#define MACH_MSG_TRAILER_FORMAT_0 0 + +typedef unsigned int mach_msg_trailer_size_t; + +typedef struct +{ + mach_msg_trailer_type_t msgh_trailer_type; + mach_msg_trailer_size_t msgh_trailer_size; +} mach_msg_trailer_t; + +typedef struct +{ + mach_msg_trailer_type_t msgh_trailer_type; + mach_msg_trailer_size_t msgh_trailer_size; + mach_port_seqno_t msgh_seqno; +} mach_msg_seqno_trailer_t; + +typedef struct +{ + unsigned int val[2]; +} security_token_t; + +typedef struct +{ + mach_msg_trailer_type_t msgh_trailer_type; + mach_msg_trailer_size_t msgh_trailer_size; + mach_port_seqno_t msgh_seqno; + security_token_t msgh_sender; +} mach_msg_security_trailer_t; + +/* + * The audit token is an opaque token which identifies + * Mach tasks and senders of Mach messages as subjects + * to the BSM audit system. Only the appropriate BSM + * library routines should be used to interpret the + * contents of the audit token as the representation + * of the subject identity within the token may change + * over time. + */ +typedef struct +{ + unsigned int val[8]; +} audit_token_t; + +typedef struct +{ + mach_msg_trailer_type_t msgh_trailer_type; + mach_msg_trailer_size_t msgh_trailer_size; + mach_port_seqno_t msgh_seqno; + security_token_t msgh_sender; + audit_token_t msgh_audit; +} mach_msg_audit_trailer_t; + +typedef struct +{ + mach_msg_trailer_type_t msgh_trailer_type; + mach_msg_trailer_size_t msgh_trailer_size; + mach_port_seqno_t msgh_seqno; + security_token_t msgh_sender; + audit_token_t msgh_audit; + mach_vm_address_t msgh_context; +} mach_msg_context_trailer_t; + + +typedef struct +{ + mach_port_name_t sender; +} msg_labels_t; + +/* + Trailer type to pass MAC policy label info as a mach message trailer. + +*/ + +typedef struct +{ + mach_msg_trailer_type_t msgh_trailer_type; + mach_msg_trailer_size_t msgh_trailer_size; + mach_port_seqno_t msgh_seqno; + security_token_t msgh_sender; + audit_token_t msgh_audit; + mach_vm_address_t msgh_context; + int msgh_ad; + msg_labels_t msgh_labels; +} mach_msg_mac_trailer_t; + +#define MACH_MSG_TRAILER_MINIMUM_SIZE sizeof(mach_msg_trailer_t) + +/* + * These values can change from release to release - but clearly + * code cannot request additional trailer elements one was not + * compiled to understand. Therefore, it is safe to use this + * constant when the same module specified the receive options. + * Otherwise, you run the risk that the options requested by + * another module may exceed the local modules notion of + * MAX_TRAILER_SIZE. + */ +typedef mach_msg_mac_trailer_t mach_msg_max_trailer_t; +#define MAX_TRAILER_SIZE ((mach_msg_size_t)sizeof(mach_msg_max_trailer_t)) + +/* + * Legacy requirements keep us from ever updating these defines (even + * when the format_0 trailers gain new option data fields in the future). + * Therefore, they shouldn't be used going forward. Instead, the sizes + * should be compared against the specific element size requested using + * REQUESTED_TRAILER_SIZE. + */ +typedef mach_msg_security_trailer_t mach_msg_format_0_trailer_t; + +/*typedef mach_msg_mac_trailer_t mach_msg_format_0_trailer_t; +*/ + +#define MACH_MSG_TRAILER_FORMAT_0_SIZE sizeof(mach_msg_format_0_trailer_t) + +#define KERNEL_SECURITY_TOKEN_VALUE { {0, 1} } +extern security_token_t KERNEL_SECURITY_TOKEN; + +#define KERNEL_AUDIT_TOKEN_VALUE { {0, 0, 0, 0, 0, 0, 0, 0} } +extern audit_token_t KERNEL_AUDIT_TOKEN; + +typedef integer_t mach_msg_options_t; + +typedef struct +{ + mach_msg_header_t header; +} mach_msg_empty_send_t; + +typedef struct +{ + mach_msg_header_t header; + mach_msg_trailer_t trailer; +} mach_msg_empty_rcv_t; + +typedef union +{ + mach_msg_empty_send_t send; + mach_msg_empty_rcv_t rcv; +} mach_msg_empty_t; + +#pragma pack() + +/* utility to round the message size - will become machine dependent */ +#define round_msg(x) (((mach_msg_size_t)(x) + sizeof (natural_t) - 1) & \ + ~(sizeof (natural_t) - 1)) + +/* + * There is no fixed upper bound to the size of Mach messages. + */ + +#define MACH_MSG_SIZE_MAX ((mach_msg_size_t) ~0) + +/* + * Compatibility definitions, for code written + * when there was a msgh_kind instead of msgh_seqno. + */ +#define MACH_MSGH_KIND_NORMAL 0x00000000 +#define MACH_MSGH_KIND_NOTIFICATION 0x00000001 +#define msgh_kind msgh_seqno +#define mach_msg_kind_t mach_port_seqno_t + +typedef natural_t mach_msg_type_size_t; +typedef natural_t mach_msg_type_number_t; + +/* + * Values received/carried in messages. Tells the receiver what + * sort of port right he now has. + * + * MACH_MSG_TYPE_PORT_NAME is used to transfer a port name + * which should remain uninterpreted by the kernel. (Port rights + * are not transferred, just the port name.) + */ + +#define MACH_MSG_TYPE_PORT_NONE 0 + +#define MACH_MSG_TYPE_PORT_NAME 15 +#define MACH_MSG_TYPE_PORT_RECEIVE MACH_MSG_TYPE_MOVE_RECEIVE +#define MACH_MSG_TYPE_PORT_SEND MACH_MSG_TYPE_MOVE_SEND +#define MACH_MSG_TYPE_PORT_SEND_ONCE MACH_MSG_TYPE_MOVE_SEND_ONCE + +#define MACH_MSG_TYPE_LAST 22 /* Last assigned */ + +/* + * A dummy value. Mostly used to indicate that the actual value + * will be filled in later, dynamically. + */ + +#define MACH_MSG_TYPE_POLYMORPHIC ((mach_msg_type_name_t) -1) + +/* + * Is a given item a port type? + */ + +#define MACH_MSG_TYPE_PORT_ANY(x) \ + (((x) >= MACH_MSG_TYPE_MOVE_RECEIVE) && \ + ((x) <= MACH_MSG_TYPE_MAKE_SEND_ONCE)) + +#define MACH_MSG_TYPE_PORT_ANY_SEND(x) \ + (((x) >= MACH_MSG_TYPE_MOVE_SEND) && \ + ((x) <= MACH_MSG_TYPE_MAKE_SEND_ONCE)) + +#define MACH_MSG_TYPE_PORT_ANY_RIGHT(x) \ + (((x) >= MACH_MSG_TYPE_MOVE_RECEIVE) && \ + ((x) <= MACH_MSG_TYPE_MOVE_SEND_ONCE)) + +typedef integer_t mach_msg_option_t; + +#define MACH_MSG_OPTION_NONE 0x00000000 + +#define MACH_SEND_MSG 0x00000001 +#define MACH_RCV_MSG 0x00000002 +#define MACH_RCV_LARGE 0x00000004 + +#define MACH_SEND_TIMEOUT 0x00000010 +#define MACH_SEND_INTERRUPT 0x00000040 /* libmach implements */ +#define MACH_SEND_CANCEL 0x00000080 +#define MACH_SEND_ALWAYS 0x00010000 /* internal use only */ +#define MACH_SEND_TRAILER 0x00020000 + +#define MACH_RCV_TIMEOUT 0x00000100 +#define MACH_RCV_NOTIFY 0x00000200 +#define MACH_RCV_INTERRUPT 0x00000400 /* libmach implements */ +#define MACH_RCV_OVERWRITE 0x00001000 + +/* + * NOTE: a 0x00------ RCV mask implies to ask for + * a MACH_MSG_TRAILER_FORMAT_0 with 0 Elements, + * which is equivalent to a mach_msg_trailer_t. + * + * XXXMAC: unlike the rest of the MACH_RCV_* flags, MACH_RCV_TRAILER_LABELS + * needs its own private bit since we only calculate its fields when absolutely + * required. + */ +#define MACH_RCV_TRAILER_NULL 0 +#define MACH_RCV_TRAILER_SEQNO 1 +#define MACH_RCV_TRAILER_SENDER 2 +#define MACH_RCV_TRAILER_AUDIT 3 +#define MACH_RCV_TRAILER_CTX 4 +#define MACH_RCV_TRAILER_AV 7 +#define MACH_RCV_TRAILER_LABELS 8 + +#define MACH_RCV_TRAILER_TYPE(x) (((x) & 0xf) << 28) +#define MACH_RCV_TRAILER_ELEMENTS(x) (((x) & 0xf) << 24) +#define MACH_RCV_TRAILER_MASK ((0xff << 24)) + +#define GET_RCV_ELEMENTS(y) (((y) >> 24) & 0xf) + +/* + * XXXMAC: note that in the case of MACH_RCV_TRAILER_LABELS, + * we just fall through to mach_msg_max_trailer_t. + * This is correct behavior since mach_msg_max_trailer_t is defined as + * mac_msg_mac_trailer_t which is used for the LABELS trailer. + * It also makes things work properly if MACH_RCV_TRAILER_LABELS is ORed + * with one of the other options. + */ +#define REQUESTED_TRAILER_SIZE(y) \ + ((mach_msg_trailer_size_t) \ + ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_NULL) ? \ + sizeof(mach_msg_trailer_t) : \ + ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_SEQNO) ? \ + sizeof(mach_msg_seqno_trailer_t) : \ + ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_SENDER) ? \ + sizeof(mach_msg_security_trailer_t) : \ + ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_AUDIT) ? \ + sizeof(mach_msg_audit_trailer_t) : \ + ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_CTX) ? \ + sizeof(mach_msg_context_trailer_t) : \ + ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_AV) ? \ + sizeof(mach_msg_mac_trailer_t) : \ + sizeof(mach_msg_max_trailer_t)))))))) + +/* + * Much code assumes that mach_msg_return_t == kern_return_t. + * This definition is useful for descriptive purposes. + * + * See <mach/error.h> for the format of error codes. + * IPC errors are system 4. Send errors are subsystem 0; + * receive errors are subsystem 1. The code field is always non-zero. + * The high bits of the code field communicate extra information + * for some error codes. MACH_MSG_MASK masks off these special bits. + */ + +typedef kern_return_t mach_msg_return_t; + +#define MACH_MSG_SUCCESS 0x00000000 + + +#define MACH_MSG_MASK 0x00003e00 + /* All special error code bits defined below. */ +#define MACH_MSG_IPC_SPACE 0x00002000 + /* No room in IPC name space for another capability name. */ +#define MACH_MSG_VM_SPACE 0x00001000 + /* No room in VM address space for out-of-line memory. */ +#define MACH_MSG_IPC_KERNEL 0x00000800 + /* Kernel resource shortage handling an IPC capability. */ +#define MACH_MSG_VM_KERNEL 0x00000400 + /* Kernel resource shortage handling out-of-line memory. */ + +#define MACH_SEND_IN_PROGRESS 0x10000001 + /* Thread is waiting to send. (Internal use only.) */ +#define MACH_SEND_INVALID_DATA 0x10000002 + /* Bogus in-line data. */ +#define MACH_SEND_INVALID_DEST 0x10000003 + /* Bogus destination port. */ +#define MACH_SEND_TIMED_OUT 0x10000004 + /* Message not sent before timeout expired. */ +#define MACH_SEND_INTERRUPTED 0x10000007 + /* Software interrupt. */ +#define MACH_SEND_MSG_TOO_SMALL 0x10000008 + /* Data doesn't contain a complete message. */ +#define MACH_SEND_INVALID_REPLY 0x10000009 + /* Bogus reply port. */ +#define MACH_SEND_INVALID_RIGHT 0x1000000a + /* Bogus port rights in the message body. */ +#define MACH_SEND_INVALID_NOTIFY 0x1000000b + /* Bogus notify port argument. */ +#define MACH_SEND_INVALID_MEMORY 0x1000000c + /* Invalid out-of-line memory pointer. */ +#define MACH_SEND_NO_BUFFER 0x1000000d + /* No message buffer is available. */ +#define MACH_SEND_TOO_LARGE 0x1000000e + /* Send is too large for port */ +#define MACH_SEND_INVALID_TYPE 0x1000000f + /* Invalid msg-type specification. */ +#define MACH_SEND_INVALID_HEADER 0x10000010 + /* A field in the header had a bad value. */ +#define MACH_SEND_INVALID_TRAILER 0x10000011 + /* The trailer to be sent does not match kernel format. */ +#define MACH_SEND_INVALID_RT_OOL_SIZE 0x10000015 + /* compatibility: no longer a returned error */ + +#define MACH_RCV_IN_PROGRESS 0x10004001 + /* Thread is waiting for receive. (Internal use only.) */ +#define MACH_RCV_INVALID_NAME 0x10004002 + /* Bogus name for receive port/port-set. */ +#define MACH_RCV_TIMED_OUT 0x10004003 + /* Didn't get a message within the timeout value. */ +#define MACH_RCV_TOO_LARGE 0x10004004 + /* Message buffer is not large enough for inline data. */ +#define MACH_RCV_INTERRUPTED 0x10004005 + /* Software interrupt. */ +#define MACH_RCV_PORT_CHANGED 0x10004006 + /* compatibility: no longer a returned error */ +#define MACH_RCV_INVALID_NOTIFY 0x10004007 + /* Bogus notify port argument. */ +#define MACH_RCV_INVALID_DATA 0x10004008 + /* Bogus message buffer for inline data. */ +#define MACH_RCV_PORT_DIED 0x10004009 + /* Port/set was sent away/died during receive. */ +#define MACH_RCV_IN_SET 0x1000400a + /* compatibility: no longer a returned error */ +#define MACH_RCV_HEADER_ERROR 0x1000400b + /* Error receiving message header. See special bits. */ +#define MACH_RCV_BODY_ERROR 0x1000400c + /* Error receiving message body. See special bits. */ +#define MACH_RCV_INVALID_TYPE 0x1000400d + /* Invalid msg-type specification in scatter list. */ +#define MACH_RCV_SCATTER_SMALL 0x1000400e + /* Out-of-line overwrite region is not large enough */ +#define MACH_RCV_INVALID_TRAILER 0x1000400f + /* trailer type or number of trailer elements not supported */ +#define MACH_RCV_IN_PROGRESS_TIMED 0x10004011 + /* Waiting for receive with timeout. (Internal use only.) */ + + +__BEGIN_DECLS + +/* + * Routine: mach_msg_overwrite + * Purpose: + * Send and/or receive a message. If the message operation + * is interrupted, and the user did not request an indication + * of that fact, then restart the appropriate parts of the + * operation silently (trap version does not restart). + * + * Distinct send and receive buffers may be specified. If + * no separate receive buffer is specified, the msg parameter + * will be used for both send and receive operations. + * + * In addition to a distinct receive buffer, that buffer may + * already contain scatter control information to direct the + * receiving of the message. + */ + +extern mach_msg_return_t mach_msg_overwrite( + mach_msg_header_t *msg, + mach_msg_option_t option, + mach_msg_size_t send_size, + mach_msg_size_t rcv_size, + mach_port_name_t rcv_name, + mach_msg_timeout_t timeout, + mach_port_name_t notify, + mach_msg_header_t *rcv_msg, + mach_msg_size_t rcv_limit); + + +/* + * Routine: mach_msg + * Purpose: + * Send and/or receive a message. If the message operation + * is interrupted, and the user did not request an indication + * of that fact, then restart the appropriate parts of the + * operation silently (trap version does not restart). + */ +extern mach_msg_return_t mach_msg( + mach_msg_header_t *msg, + mach_msg_option_t option, + mach_msg_size_t send_size, + mach_msg_size_t rcv_size, + mach_port_name_t rcv_name, + mach_msg_timeout_t timeout, + mach_port_name_t notify); + + +__END_DECLS + +#endif /* _MACH_MESSAGE_H_ */ + diff --git a/i386/include/mach/mig.h b/i386/include/mach/mig.h new file mode 100644 index 0000000..b62dd2c --- /dev/null +++ b/i386/include/mach/mig.h @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ + +/* + * Mach MIG Subsystem Interfaces + */ + +#ifndef _MACH_MIG_H_ +#define _MACH_MIG_H_ + +#include <stdint.h> +#include <mach/port.h> +#include <mach/message.h> +#include <mach/vm_types.h> + +#include <sys/cdefs.h> + +#if defined(MACH_KERNEL) + +#if defined(BSMALL_LATER) +/* Really small configurations don't need type checking */ +#define __MigTypeCheck 0 +#else +/* Turn MIG type checking on by default for kernel */ +#define __MigTypeCheck 1 +#endif +#define __MigKernelSpecificCode 1 +#define _MIG_KERNEL_SPECIFIC_CODE_ 1 + +/* Otherwise check legacy setting (temporary) */ +#elif defined(TypeCheck) + +#define __MigTypeCheck TypeCheck + +#elif !defined(__MigTypeCheck) + +/* otherwise, default MIG type checking on - except in small configurations */ +#if defined(BSMALL) +#define __MigTypeCheck 0 +#else +#define __MigTypeCheck 1 +#endif + +#endif /* !defined(__MigTypeCheck) */ + +/* + * Pack MIG message structs. + * This is an indicator of the need to view shared structs in a + * binary-compatible format - and MIG message structs are no different. + */ +#define __MigPackStructs 1 + +/* + * Definition for MIG-generated server stub routines. These routines + * unpack the request message, call the server procedure, and pack the + * reply message. + */ +typedef void (*mig_stub_routine_t) (mach_msg_header_t *InHeadP, + mach_msg_header_t *OutHeadP); + +typedef mig_stub_routine_t mig_routine_t; + +/* + * Definition for MIG-generated server routine. This routine takes a + * message, and returns the appropriate stub function for handling that + * message. + */ +typedef mig_routine_t (*mig_server_routine_t) (mach_msg_header_t *InHeadP); + +/* + * Generic definition for implementation routines. These routines do + * the real work associated with this request. This generic type is + * used for keeping the pointers in the subsystem array. + */ +typedef kern_return_t (*mig_impl_routine_t)(void); + +typedef mach_msg_type_descriptor_t routine_arg_descriptor; +typedef mach_msg_type_descriptor_t *routine_arg_descriptor_t; +typedef mach_msg_type_descriptor_t *mig_routine_arg_descriptor_t; + +#define MIG_ROUTINE_ARG_DESCRIPTOR_NULL ((mig_routine_arg_descriptor_t)0) + +struct routine_descriptor { + mig_impl_routine_t impl_routine; /* Server work func pointer */ + mig_stub_routine_t stub_routine; /* Unmarshalling func pointer */ + unsigned int argc; /* Number of argument words */ + unsigned int descr_count; /* Number complex descriptors */ + routine_arg_descriptor_t + arg_descr; /* pointer to descriptor array*/ + unsigned int max_reply_msg; /* Max size for reply msg */ +}; +typedef struct routine_descriptor *routine_descriptor_t; + +typedef struct routine_descriptor mig_routine_descriptor; +typedef mig_routine_descriptor *mig_routine_descriptor_t; + +#define MIG_ROUTINE_DESCRIPTOR_NULL ((mig_routine_descriptor_t)0) + +typedef struct mig_subsystem { + mig_server_routine_t server; /* pointer to demux routine */ + mach_msg_id_t start; /* Min routine number */ + mach_msg_id_t end; /* Max routine number + 1 */ + mach_msg_size_t maxsize; /* Max reply message size */ + vm_address_t reserved; /* reserved for MIG use */ + mig_routine_descriptor + routine[1]; /* Routine descriptor array */ +} *mig_subsystem_t; + +#define MIG_SUBSYSTEM_NULL ((mig_subsystem_t)0) + +typedef struct mig_symtab { + char *ms_routine_name; + int ms_routine_number; + void (*ms_routine)(void); /* Since the functions in the + * symbol table have unknown + * signatures, this is the best + * we can do... + */ +} mig_symtab_t; + + +__BEGIN_DECLS + +/* Client side reply port allocate */ +extern mach_port_t mig_get_reply_port(void); + +/* Client side reply port deallocate */ +extern void mig_dealloc_reply_port(mach_port_t reply_port); + +/* Client side reply port "deallocation" */ +extern void mig_put_reply_port(mach_port_t reply_port); + +/* Bounded string copy */ +extern int mig_strncpy(char *dest, const char *src, int len); + + +/* Allocate memory for out-of-line mig structures */ +extern void mig_allocate(vm_address_t *, vm_size_t); + +/* Deallocate memory used for out-of-line mig structures */ +extern void mig_deallocate(vm_address_t, vm_size_t); + + +__END_DECLS + +#endif /* _MACH_MIG_H_ */ diff --git a/i386/include/mach/mig_errors.h b/i386/include/mach/mig_errors.h new file mode 100644 index 0000000..f1234bc --- /dev/null +++ b/i386/include/mach/mig_errors.h @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * Mach Interface Generator errors + * + */ + +#ifndef _MACH_MIG_ERRORS_H_ +#define _MACH_MIG_ERRORS_H_ + +#include <mach/mig.h> +#include <mach/ndr.h> +#include <mach/message.h> +#include <mach/kern_return.h> + +#include <sys/cdefs.h> + +/* + * These error codes should be specified as system 4, subsytem 2. + * But alas backwards compatibility makes that impossible. + * The problem is old clients of new servers (eg, the kernel) + * which get strange large error codes when there is a Mig problem + * in the server. Unfortunately, the IPC system doesn't have + * the knowledge to convert the codes in this situation. + */ + +#define MIG_TYPE_ERROR -300 /* client type check failure */ +#define MIG_REPLY_MISMATCH -301 /* wrong reply message ID */ +#define MIG_REMOTE_ERROR -302 /* server detected error */ +#define MIG_BAD_ID -303 /* bad request message ID */ +#define MIG_BAD_ARGUMENTS -304 /* server type check failure */ +#define MIG_NO_REPLY -305 /* no reply should be send */ +#define MIG_EXCEPTION -306 /* server raised exception */ +#define MIG_ARRAY_TOO_LARGE -307 /* array not large enough */ +#define MIG_SERVER_DIED -308 /* server died */ +#define MIG_TRAILER_ERROR -309 /* trailer has an unknown format */ + +/* + * Whenever MIG detects an error, it sends back a generic + * mig_reply_error_t format message. Clients must accept + * these in addition to the expected reply message format. + */ +#pragma pack(4) +typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; +} mig_reply_error_t; +#pragma pack() + + +__BEGIN_DECLS + +#if !defined(__NDR_convert__mig_reply_error_t__defined) +#define __NDR_convert__mig_reply_error_t__defined + +static __inline__ void +__NDR_convert__mig_reply_error_t(__unused mig_reply_error_t *x) +{ +#if defined(__NDR_convert__int_rep__kern_return_t__defined) + if (x->NDR.int_rep != NDR_record.int_rep) + __NDR_convert__int_rep__kern_return_t(&x->RetCode, x->NDR.int_rep); +#endif /* __NDR_convert__int_rep__kern_return_t__defined */ +} +#endif /* !defined(__NDR_convert__mig_reply_error_t__defined) */ + +__END_DECLS + +#endif /* _MACH_MIG_ERRORS_H_ */ diff --git a/i386/include/mach/ndr.h b/i386/include/mach/ndr.h new file mode 100644 index 0000000..cb64d3f --- /dev/null +++ b/i386/include/mach/ndr.h @@ -0,0 +1,207 @@ +/* + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ + +#ifndef _MACH_NDR_H_ +#define _MACH_NDR_H_ + +#include <stdint.h> +#include <sys/cdefs.h> + +typedef struct { + unsigned char mig_vers; + unsigned char if_vers; + unsigned char reserved1; + unsigned char mig_encoding; + unsigned char int_rep; + unsigned char char_rep; + unsigned char float_rep; + unsigned char reserved2; +} NDR_record_t; + +/* + * MIG supported protocols for Network Data Representation + */ +#define NDR_PROTOCOL_2_0 0 + +/* + * NDR 2.0 format flag type definition and values. + */ +#define NDR_INT_BIG_ENDIAN 0 +#define NDR_INT_LITTLE_ENDIAN 1 +#define NDR_FLOAT_IEEE 0 +#define NDR_FLOAT_VAX 1 +#define NDR_FLOAT_CRAY 2 +#define NDR_FLOAT_IBM 3 +#define NDR_CHAR_ASCII 0 +#define NDR_CHAR_EBCDIC 1 + +extern NDR_record_t NDR_record; + +#if defined(BSMALL) +#define __NDR_convert__ 0 +#define __NDR_convert__int_rep__ 0 +#else +#ifndef __NDR_convert__ +#define __NDR_convert__ 1 +#endif /* __NDR_convert__ */ + +#ifndef __NDR_convert__int_rep__ +#define __NDR_convert__int_rep__ 1 +#endif /* __NDR_convert__int_rep__ */ + +#endif /* defined(BSMALL) */ + +#ifndef __NDR_convert__char_rep__ +#define __NDR_convert__char_rep__ 0 +#endif /* __NDR_convert__char_rep__ */ + +#ifndef __NDR_convert__float_rep__ +#define __NDR_convert__float_rep__ 0 +#endif /* __NDR_convert__float_rep__ */ + +#if __NDR_convert__ + +#define __NDR_convert__NOOP do ; while (0) +#define __NDR_convert__UNKNOWN(s) __NDR_convert__NOOP +#define __NDR_convert__SINGLE(a, f, r) do { r((a), (f)); } while (0) +#define __NDR_convert__ARRAY(a, f, c, r) \ + do { int __i__, __C__ = (c); \ + for (__i__ = 0; __i__ < __C__; __i__++) \ + r(&(a)[__i__], f); } while (0) +#define __NDR_convert__2DARRAY(a, f, s, c, r) \ + do { int __i__, __C__ = (c), __S__ = (s); \ + for (__i__ = 0; __i__ < __C__; __i__++) \ + r(&(a)[__i__ * __S__], f, __S__); } while (0) + +#if __NDR_convert__int_rep__ + +#include <libkern/OSByteOrder.h> + +#define __NDR_READSWAP_assign(a, rs) do { *(a) = rs(a); } while (0) + +#define __NDR_READSWAP__uint16_t(a) OSReadSwapInt16((void *)a, 0) +#define __NDR_READSWAP__int16_t(a) (int16_t)OSReadSwapInt16((void *)a, 0) +#define __NDR_READSWAP__uint32_t(a) OSReadSwapInt32((void *)a, 0) +#define __NDR_READSWAP__int32_t(a) (int32_t)OSReadSwapInt32((void *)a, 0) +#define __NDR_READSWAP__uint64_t(a) OSReadSwapInt64((void *)a, 0) +#define __NDR_READSWAP__int64_t(a) (int64_t)OSReadSwapInt64((void *)a, 0) + +__BEGIN_DECLS + +static __inline__ float __NDR_READSWAP__float(float *argp) { + union { + float sv; + uint32_t ull; + } result; + result.ull = __NDR_READSWAP__uint32_t((uint32_t *)argp); + return result.sv; +} + +static __inline__ double __NDR_READSWAP__double(double *argp) { + union { + double sv; + uint64_t ull; + } result; + result.ull = __NDR_READSWAP__uint64_t((uint64_t *)argp); + return result.sv; +} + +__END_DECLS + +#define __NDR_convert__int_rep__int16_t__defined +#define __NDR_convert__int_rep__int16_t(v,f) \ + __NDR_READSWAP_assign(v, __NDR_READSWAP__int16_t) + +#define __NDR_convert__int_rep__uint16_t__defined +#define __NDR_convert__int_rep__uint16_t(v,f) \ + __NDR_READSWAP_assign(v, __NDR_READSWAP__uint16_t) + +#define __NDR_convert__int_rep__int32_t__defined +#define __NDR_convert__int_rep__int32_t(v,f) \ + __NDR_READSWAP_assign(v, __NDR_READSWAP__int32_t) + +#define __NDR_convert__int_rep__uint32_t__defined +#define __NDR_convert__int_rep__uint32_t(v,f) \ + __NDR_READSWAP_assign(v, __NDR_READSWAP__uint32_t) + +#define __NDR_convert__int_rep__int64_t__defined +#define __NDR_convert__int_rep__int64_t(v,f) \ + __NDR_READSWAP_assign(v, __NDR_READSWAP__int64_t) + +#define __NDR_convert__int_rep__uint64_t__defined +#define __NDR_convert__int_rep__uint64_t(v,f) \ + __NDR_READSWAP_assign(v, __NDR_READSWAP__uint64_t) + +#define __NDR_convert__int_rep__float__defined +#define __NDR_convert__int_rep__float(v,f) \ + __NDR_READSWAP_assign(v, __NDR_READSWAP__float) + +#define __NDR_convert__int_rep__double__defined +#define __NDR_convert__int_rep__double(v,f) \ + __NDR_READSWAP_assign(v, __NDR_READSWAP__double) + +#define __NDR_convert__int_rep__boolean_t__defined +#define __NDR_convert__int_rep__boolean_t(v, f) \ + __NDR_convert__int_rep__int32_t(v,f) + +#define __NDR_convert__int_rep__kern_return_t__defined +#define __NDR_convert__int_rep__kern_return_t(v,f) \ + __NDR_convert__int_rep__int32_t(v,f) + +#define __NDR_convert__int_rep__mach_port_name_t__defined +#define __NDR_convert__int_rep__mach_port_name_t(v,f) \ + __NDR_convert__int_rep__uint32_t(v,f) + +#define __NDR_convert__int_rep__mach_msg_type_number_t__defined +#define __NDR_convert__int_rep__mach_msg_type_number_t(v,f) \ + __NDR_convert__int_rep__uint32_t(v,f) + +#endif /* __NDR_convert__int_rep__ */ + +#if __NDR_convert__char_rep__ + +#warning NDR character representation conversions not implemented yet! +#define __NDR_convert__char_rep__char(v,f) __NDR_convert__NOOP +#define __NDR_convert__char_rep__string(v,f,l) __NDR_convert__NOOP + +#endif /* __NDR_convert__char_rep__ */ + +#if __NDR_convert__float_rep__ + +#warning NDR floating point representation conversions not implemented yet! +#define __NDR_convert__float_rep__float(v,f) __NDR_convert__NOOP +#define __NDR_convert__float_rep__double(v,f) __NDR_convert__NOOP + +#endif /* __NDR_convert__float_rep__ */ + +#endif /* __NDR_convert__ */ + +#endif /* _MACH_NDR_H_ */ diff --git a/i386/include/mach/notify.defs b/i386/include/mach/notify.defs new file mode 100644 index 0000000..6f7f81d --- /dev/null +++ b/i386/include/mach/notify.defs @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ + +subsystem +#if KERNEL_USER + KernelUser +#endif + notify 64; + +#include <mach/std_types.defs> + +#if SEQNOS +serverprefix do_seqnos_; +serverdemux seqnos_notify_server; +#else /* !SEQNOS */ +serverprefix do_; +serverdemux notify_server; +#endif /* SEQNOS */ + +/* MACH_NOTIFY_FIRST: 0100 */ +skip; + +/* MACH_NOTIFY_PORT_DELETED: 0101 */ +simpleroutine mach_notify_port_deleted( + notify : mach_port_move_send_once_t; +#if SEQNOS + msgseqno seqno : mach_port_seqno_t; +#endif /* SEQNOS */ + name : mach_port_name_t); + +skip; /* was MACH_NOTIFY_MSG_ACCEPTED: 0102 */ + +skip; /* was NOTIFY_OWNERSHIP_RIGHTS: 0103 */ + +skip; /* was NOTIFY_RECEIVE_RIGHTS: 0104 */ + +/* MACH_NOTIFY_PORT_DESTROYED: 0105 */ +simpleroutine mach_notify_port_destroyed( + notify : mach_port_move_send_once_t; +#if SEQNOS + msgseqno seqno : mach_port_seqno_t; +#endif /* SEQNOS */ + rights : mach_port_move_receive_t); + +/* MACH_NOTIFY_NO_SENDERS: 0106 */ +simpleroutine mach_notify_no_senders( + notify : mach_port_move_send_once_t; +#if SEQNOS + msgseqno seqno : mach_port_seqno_t; +#endif /* SEQNOS */ + mscount : mach_port_mscount_t); + +/* MACH_NOTIFY_SEND_ONCE: 0107 */ +simpleroutine mach_notify_send_once( + notify : mach_port_move_send_once_t +#if SEQNOS +; msgseqno seqno : mach_port_seqno_t +#endif /* SEQNOS */ + ); + +/* MACH_NOTIFY_DEAD_NAME: 0110 */ +simpleroutine mach_notify_dead_name( + notify : mach_port_move_send_once_t; +#if SEQNOS + msgseqno seqno : mach_port_seqno_t; +#endif /* SEQNOS */ + name : mach_port_name_t); + +/* vim: set ft=c : */ diff --git a/i386/include/mach/notify.h b/i386/include/mach/notify.h new file mode 100644 index 0000000..768a865 --- /dev/null +++ b/i386/include/mach/notify.h @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/notify.h + * + * Kernel notification message definitions. + */ + +#ifndef _MACH_NOTIFY_H_ +#define _MACH_NOTIFY_H_ + +#include <mach/port.h> +#include <mach/message.h> +#include <mach/ndr.h> + +/* + * An alternative specification of the notification interface + * may be found in mach/notify.defs. + */ + +#define MACH_NOTIFY_FIRST 0100 +#define MACH_NOTIFY_PORT_DELETED (MACH_NOTIFY_FIRST + 001 ) + /* A send or send-once right was deleted. */ +#define MACH_NOTIFY_PORT_DESTROYED (MACH_NOTIFY_FIRST + 005) + /* A receive right was (would have been) deallocated */ +#define MACH_NOTIFY_NO_SENDERS (MACH_NOTIFY_FIRST + 006) + /* Receive right has no extant send rights */ +#define MACH_NOTIFY_SEND_ONCE (MACH_NOTIFY_FIRST + 007) + /* An extant send-once right died */ +#define MACH_NOTIFY_DEAD_NAME (MACH_NOTIFY_FIRST + 010) + /* Send or send-once right died, leaving a dead-name */ +#define MACH_NOTIFY_LAST (MACH_NOTIFY_FIRST + 015) + +typedef mach_port_t notify_port_t; + +/* + * Hard-coded message structures for receiving Mach port notification + * messages. However, they are not actual large enough to receive + * the largest trailers current exported by Mach IPC (so they cannot + * be used for space allocations in situations using these new larger + * trailers). Instead, the MIG-generated server routines (and + * related prototypes should be used). + */ +typedef struct { + mach_msg_header_t not_header; + NDR_record_t NDR; + mach_port_name_t not_port;/* MACH_MSG_TYPE_PORT_NAME */ + mach_msg_format_0_trailer_t trailer; +} mach_port_deleted_notification_t; + +typedef struct { + mach_msg_header_t not_header; + mach_msg_body_t not_body; + mach_msg_port_descriptor_t not_port;/* MACH_MSG_TYPE_PORT_RECEIVE */ + mach_msg_format_0_trailer_t trailer; +} mach_port_destroyed_notification_t; + +typedef struct { + mach_msg_header_t not_header; + NDR_record_t NDR; + mach_msg_type_number_t not_count; + mach_msg_format_0_trailer_t trailer; +} mach_no_senders_notification_t; + +typedef struct { + mach_msg_header_t not_header; + mach_msg_format_0_trailer_t trailer; +} mach_send_once_notification_t; + +typedef struct { + mach_msg_header_t not_header; + NDR_record_t NDR; + mach_port_name_t not_port;/* MACH_MSG_TYPE_PORT_NAME */ + mach_msg_format_0_trailer_t trailer; +} mach_dead_name_notification_t; + +#endif /* _MACH_NOTIFY_H_ */ diff --git a/i386/include/mach/policy.h b/i386/include/mach/policy.h new file mode 100644 index 0000000..b6ec795 --- /dev/null +++ b/i386/include/mach/policy.h @@ -0,0 +1,235 @@ +/* + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ + +#ifndef _MACH_POLICY_H_ +#define _MACH_POLICY_H_ + +/* + * mach/policy.h + * + * Definitions for scheduing policy. + */ + +/* + * All interfaces defined here are obsolete. + */ + +#include <mach/boolean.h> +#include <mach/message.h> +#include <mach/vm_types.h> + +/* + * Old scheduling control interface + */ +typedef int policy_t; +typedef integer_t *policy_info_t; +typedef integer_t *policy_base_t; +typedef integer_t *policy_limit_t; + +/* + * Policy definitions. Policies should be powers of 2, + * but cannot be or'd together other than to test for a + * policy 'class'. + */ +#define POLICY_NULL 0 /* none */ +#define POLICY_TIMESHARE 1 /* timesharing */ +#define POLICY_RR 2 /* fixed round robin */ +#define POLICY_FIFO 4 /* fixed fifo */ + +#define __NEW_SCHEDULING_FRAMEWORK__ + +/* + * Check if policy is of 'class' fixed-priority. + */ +#define POLICYCLASS_FIXEDPRI (POLICY_RR | POLICY_FIFO) + +/* + * Check if policy is valid. + */ +#define invalid_policy(policy) \ + ((policy) != POLICY_TIMESHARE && \ + (policy) != POLICY_RR && \ + (policy) != POLICY_FIFO) + + +/* + * Types for TIMESHARE policy + */ +struct policy_timeshare_base { + integer_t base_priority; +}; +struct policy_timeshare_limit { + integer_t max_priority; +}; +struct policy_timeshare_info { + integer_t max_priority; + integer_t base_priority; + integer_t cur_priority; + boolean_t depressed; + integer_t depress_priority; +}; + +typedef struct policy_timeshare_base *policy_timeshare_base_t; +typedef struct policy_timeshare_limit *policy_timeshare_limit_t; +typedef struct policy_timeshare_info *policy_timeshare_info_t; + +typedef struct policy_timeshare_base policy_timeshare_base_data_t; +typedef struct policy_timeshare_limit policy_timeshare_limit_data_t; +typedef struct policy_timeshare_info policy_timeshare_info_data_t; + + +#define POLICY_TIMESHARE_BASE_COUNT ((mach_msg_type_number_t) \ + (sizeof(struct policy_timeshare_base)/sizeof(integer_t))) +#define POLICY_TIMESHARE_LIMIT_COUNT ((mach_msg_type_number_t) \ + (sizeof(struct policy_timeshare_limit)/sizeof(integer_t))) +#define POLICY_TIMESHARE_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(struct policy_timeshare_info)/sizeof(integer_t))) + + +/* + * Types for the ROUND ROBIN (RR) policy + */ +struct policy_rr_base { + integer_t base_priority; + integer_t quantum; +}; +struct policy_rr_limit { + integer_t max_priority; +}; +struct policy_rr_info { + integer_t max_priority; + integer_t base_priority; + integer_t quantum; + boolean_t depressed; + integer_t depress_priority; +}; + +typedef struct policy_rr_base *policy_rr_base_t; +typedef struct policy_rr_limit *policy_rr_limit_t; +typedef struct policy_rr_info *policy_rr_info_t; + +typedef struct policy_rr_base policy_rr_base_data_t; +typedef struct policy_rr_limit policy_rr_limit_data_t; +typedef struct policy_rr_info policy_rr_info_data_t; + +#define POLICY_RR_BASE_COUNT ((mach_msg_type_number_t) \ + (sizeof(struct policy_rr_base)/sizeof(integer_t))) +#define POLICY_RR_LIMIT_COUNT ((mach_msg_type_number_t) \ + (sizeof(struct policy_rr_limit)/sizeof(integer_t))) +#define POLICY_RR_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(struct policy_rr_info)/sizeof(integer_t))) + + +/* + * Types for the FIRST-IN-FIRST-OUT (FIFO) policy + */ +struct policy_fifo_base { + integer_t base_priority; +}; +struct policy_fifo_limit { + integer_t max_priority; +}; +struct policy_fifo_info { + integer_t max_priority; + integer_t base_priority; + boolean_t depressed; + integer_t depress_priority; +}; + +typedef struct policy_fifo_base *policy_fifo_base_t; +typedef struct policy_fifo_limit *policy_fifo_limit_t; +typedef struct policy_fifo_info *policy_fifo_info_t; + +typedef struct policy_fifo_base policy_fifo_base_data_t; +typedef struct policy_fifo_limit policy_fifo_limit_data_t; +typedef struct policy_fifo_info policy_fifo_info_data_t; + +#define POLICY_FIFO_BASE_COUNT ((mach_msg_type_number_t) \ + (sizeof(struct policy_fifo_base)/sizeof(integer_t))) +#define POLICY_FIFO_LIMIT_COUNT ((mach_msg_type_number_t) \ + (sizeof(struct policy_fifo_limit)/sizeof(integer_t))) +#define POLICY_FIFO_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(struct policy_fifo_info)/sizeof(integer_t))) + +/* + * Aggregate policy types + */ + +struct policy_bases { + policy_timeshare_base_data_t ts; + policy_rr_base_data_t rr; + policy_fifo_base_data_t fifo; +}; + +struct policy_limits { + policy_timeshare_limit_data_t ts; + policy_rr_limit_data_t rr; + policy_fifo_limit_data_t fifo; +}; + +struct policy_infos { + policy_timeshare_info_data_t ts; + policy_rr_info_data_t rr; + policy_fifo_info_data_t fifo; +}; + +typedef struct policy_bases policy_base_data_t; +typedef struct policy_limits policy_limit_data_t; +typedef struct policy_infos policy_info_data_t; + +#endif /* _MACH_POLICY_H_ */ diff --git a/i386/include/mach/port.h b/i386/include/mach/port.h new file mode 100644 index 0000000..6550139 --- /dev/null +++ b/i386/include/mach/port.h @@ -0,0 +1,319 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * NOTICE: This file was modified by McAfee Research in 2004 to introduce + * support for mandatory and extensible security protections. This notice + * is included in support of clause 2.2 (b) of the Apple Public License, + * Version 2.0. + */ +/* + */ +/* + * File: mach/port.h + * + * Definition of a Mach port + * + * Mach ports are the endpoints to Mach-implemented communications + * channels (usually uni-directional message queues, but other types + * also exist). + * + * Unique collections of these endpoints are maintained for each + * Mach task. Each Mach port in the task's collection is given a + * [task-local] name to identify it - and the the various "rights" + * held by the task for that specific endpoint. + * + * This header defines the types used to identify these Mach ports + * and the various rights associated with them. For more info see: + * + * <mach/mach_port.h> - manipulation of port rights in a given space + * <mach/message.h> - message queue [and port right passing] mechanism + * + */ + +#ifndef _MACH_PORT_H_ +#define _MACH_PORT_H_ + +#include <sys/cdefs.h> +#include <stdint.h> +#include <mach/boolean.h> +#include <mach/machine/vm_types.h> + +/* + * mach_port_name_t - the local identity for a Mach port + * + * The name is Mach port namespace specific. It is used to + * identify the rights held for that port by the task whose + * namespace is implied [or specifically provided]. + * + * Use of this type usually implies just a name - no rights. + * See mach_port_t for a type that implies a "named right." + * + */ + +typedef natural_t mach_port_name_t; +typedef mach_port_name_t *mach_port_name_array_t; + + +/* + * mach_port_t - a named port right + * + * In user-space, "rights" are represented by the name of the + * right in the Mach port namespace. Even so, this type is + * presented as a unique one to more clearly denote the presence + * of a right coming along with the name. + * + * Often, various rights for a port held in a single name space + * will coalesce and are, therefore, be identified by a single name + * [this is the case for send and receive rights]. But not + * always [send-once rights currently get a unique name for + * each right]. + * + */ + +#ifndef _MACH_PORT_T +#define _MACH_PORT_T +typedef mach_port_name_t mach_port_t; +#endif + + +typedef mach_port_t *mach_port_array_t; + +/* + * MACH_PORT_NULL is a legal value that can be carried in messages. + * It indicates the absence of any port or port rights. (A port + * argument keeps the message from being "simple", even if the + * value is MACH_PORT_NULL.) The value MACH_PORT_DEAD is also a legal + * value that can be carried in messages. It indicates + * that a port right was present, but it died. + */ + +#define MACH_PORT_NULL 0 /* intentional loose typing */ +#define MACH_PORT_DEAD ((mach_port_name_t) ~0) +#define MACH_PORT_VALID(name) \ + (((name) != MACH_PORT_NULL) && \ + ((name) != MACH_PORT_DEAD)) + + +/* + * For kernel-selected [assigned] port names, the name is + * comprised of two parts: a generation number and an index. + * This approach keeps the exact same name from being generated + * and reused too quickly [to catch right/reference counting bugs]. + * The dividing line between the constituent parts is exposed so + * that efficient "mach_port_name_t to data structure pointer" + * conversion implementation can be made. But it is possible + * for user-level code to assign their own names to Mach ports. + * These are not required to participate in this algorithm. So + * care should be taken before "assuming" this model. + * + */ + +#ifndef NO_PORT_GEN + +#define MACH_PORT_INDEX(name) ((name) >> 8) +#define MACH_PORT_GEN(name) (((name) & 0xff) << 24) +#define MACH_PORT_MAKE(index, gen) \ + (((index) << 8) | (gen) >> 24) + +#else /* NO_PORT_GEN */ + +#define MACH_PORT_INDEX(name) (name) +#define MACH_PORT_GEN(name) (0) +#define MACH_PORT_MAKE(index, gen) (index) + +#endif /* NO_PORT_GEN */ + + +/* + * These are the different rights a task may have for a port. + * The MACH_PORT_RIGHT_* definitions are used as arguments + * to mach_port_allocate, mach_port_get_refs, etc, to specify + * a particular right to act upon. The mach_port_names and + * mach_port_type calls return bitmasks using the MACH_PORT_TYPE_* + * definitions. This is because a single name may denote + * multiple rights. + */ + +typedef natural_t mach_port_right_t; + +#define MACH_PORT_RIGHT_SEND ((mach_port_right_t) 0) +#define MACH_PORT_RIGHT_RECEIVE ((mach_port_right_t) 1) +#define MACH_PORT_RIGHT_SEND_ONCE ((mach_port_right_t) 2) +#define MACH_PORT_RIGHT_PORT_SET ((mach_port_right_t) 3) +#define MACH_PORT_RIGHT_DEAD_NAME ((mach_port_right_t) 4) +#define MACH_PORT_RIGHT_LABELH ((mach_port_right_t) 5) +#define MACH_PORT_RIGHT_NUMBER ((mach_port_right_t) 6) + +typedef natural_t mach_port_type_t; +typedef mach_port_type_t *mach_port_type_array_t; + +#define MACH_PORT_TYPE(right) \ + ((mach_port_type_t)(((mach_port_type_t) 1) \ + << ((right) + ((mach_port_right_t) 16)))) +#define MACH_PORT_TYPE_NONE ((mach_port_type_t) 0L) +#define MACH_PORT_TYPE_SEND MACH_PORT_TYPE(MACH_PORT_RIGHT_SEND) +#define MACH_PORT_TYPE_RECEIVE MACH_PORT_TYPE(MACH_PORT_RIGHT_RECEIVE) +#define MACH_PORT_TYPE_SEND_ONCE MACH_PORT_TYPE(MACH_PORT_RIGHT_SEND_ONCE) +#define MACH_PORT_TYPE_PORT_SET MACH_PORT_TYPE(MACH_PORT_RIGHT_PORT_SET) +#define MACH_PORT_TYPE_DEAD_NAME MACH_PORT_TYPE(MACH_PORT_RIGHT_DEAD_NAME) +#define MACH_PORT_TYPE_LABELH MACH_PORT_TYPE(MACH_PORT_RIGHT_LABELH) + +/* Convenient combinations. */ + +#define MACH_PORT_TYPE_SEND_RECEIVE \ + (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_RECEIVE) +#define MACH_PORT_TYPE_SEND_RIGHTS \ + (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_SEND_ONCE) +#define MACH_PORT_TYPE_PORT_RIGHTS \ + (MACH_PORT_TYPE_SEND_RIGHTS|MACH_PORT_TYPE_RECEIVE) +#define MACH_PORT_TYPE_PORT_OR_DEAD \ + (MACH_PORT_TYPE_PORT_RIGHTS|MACH_PORT_TYPE_DEAD_NAME) +#define MACH_PORT_TYPE_ALL_RIGHTS \ + (MACH_PORT_TYPE_PORT_OR_DEAD|MACH_PORT_TYPE_PORT_SET) + +/* Dummy type bits that mach_port_type/mach_port_names can return. */ + +#define MACH_PORT_TYPE_DNREQUEST 0x80000000 + +/* User-references for capabilities. */ + +typedef natural_t mach_port_urefs_t; +typedef integer_t mach_port_delta_t; /* change in urefs */ + +/* Attributes of ports. (See mach_port_get_receive_status.) */ + +typedef natural_t mach_port_seqno_t; /* sequence number */ +typedef natural_t mach_port_mscount_t; /* make-send count */ +typedef natural_t mach_port_msgcount_t; /* number of msgs */ +typedef natural_t mach_port_rights_t; /* number of rights */ + +/* + * Are there outstanding send rights for a given port? + */ +#define MACH_PORT_SRIGHTS_NONE 0 /* no srights */ +#define MACH_PORT_SRIGHTS_PRESENT 1 /* srights */ +typedef unsigned int mach_port_srights_t; /* status of send rights */ + +typedef struct mach_port_status { + mach_port_rights_t mps_pset; /* count of containing port sets */ + mach_port_seqno_t mps_seqno; /* sequence number */ + mach_port_mscount_t mps_mscount; /* make-send count */ + mach_port_msgcount_t mps_qlimit; /* queue limit */ + mach_port_msgcount_t mps_msgcount; /* number in the queue */ + mach_port_rights_t mps_sorights; /* how many send-once rights */ + boolean_t mps_srights; /* do send rights exist? */ + boolean_t mps_pdrequest; /* port-deleted requested? */ + boolean_t mps_nsrequest; /* no-senders requested? */ + natural_t mps_flags; /* port flags */ +} mach_port_status_t; + +/* System-wide values for setting queue limits on a port */ +#define MACH_PORT_QLIMIT_ZERO ((mach_port_msgcount_t) 0) +#define MACH_PORT_QLIMIT_BASIC ((mach_port_msgcount_t) 5) +#define MACH_PORT_QLIMIT_SMALL ((mach_port_msgcount_t) 16) +#define MACH_PORT_QLIMIT_LARGE ((mach_port_msgcount_t) 1024) +#define MACH_PORT_QLIMIT_KERNEL ((mach_port_msgcount_t) 65536) +#define MACH_PORT_QLIMIT_MIN MACH_PORT_QLIMIT_ZERO +#define MACH_PORT_QLIMIT_DEFAULT MACH_PORT_QLIMIT_BASIC +#define MACH_PORT_QLIMIT_MAX MACH_PORT_QLIMIT_LARGE + +typedef struct mach_port_limits { + mach_port_msgcount_t mpl_qlimit; /* number of msgs */ +} mach_port_limits_t; + +typedef integer_t *mach_port_info_t; /* varying array of natural_t */ + +/* Flavors for mach_port_get/set_attributes() */ +typedef int mach_port_flavor_t; +#define MACH_PORT_LIMITS_INFO 1 /* uses mach_port_status_t */ +#define MACH_PORT_RECEIVE_STATUS 2 /* uses mach_port_limits_t */ +#define MACH_PORT_DNREQUESTS_SIZE 3 /* info is int */ + +#define MACH_PORT_LIMITS_INFO_COUNT ((natural_t) \ + (sizeof(mach_port_limits_t)/sizeof(natural_t))) +#define MACH_PORT_RECEIVE_STATUS_COUNT ((natural_t) \ + (sizeof(mach_port_status_t)/sizeof(natural_t))) +#define MACH_PORT_DNREQUESTS_SIZE_COUNT 1 + +/* + * Structure used to pass information about port allocation requests. + * Must be padded to 64-bits total length. + */ +typedef struct mach_port_qos { + unsigned int name:1; /* name given */ + unsigned int prealloc:1; /* prealloced message */ + boolean_t pad1:30; + natural_t len; +} mach_port_qos_t; + +#if !__DARWIN_UNIX03 && !defined(_NO_PORT_T_FROM_MACH) +/* + * Mach 3.0 renamed everything to have mach_ in front of it. + * These types and macros are provided for backward compatibility + * but are deprecated. + */ +typedef mach_port_t port_t; +typedef mach_port_name_t port_name_t; +typedef mach_port_name_t *port_name_array_t; + +#define PORT_NULL ((port_t) 0) +#define PORT_DEAD ((port_t) ~0) +#define PORT_VALID(name) \ + ((port_t)(name) != PORT_NULL && (port_t)(name) != PORT_DEAD) + +#endif /* !__DARWIN_UNIX03 && !_NO_PORT_T_FROM_MACH */ + +#endif /* _MACH_PORT_H_ */ diff --git a/i386/include/mach/port_obj.h b/i386/include/mach/port_obj.h new file mode 100644 index 0000000..d2b5f89 --- /dev/null +++ b/i386/include/mach/port_obj.h @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ + +/* + * Define a service to map from a kernel-generated port name + * to server-defined "type" and "value" data to be associated + * with the port. + */ + +#ifndef PORT_OBJ_H +#define PORT_OBJ_H + +#include <mach/port.h> + +struct port_obj_tentry { + void *pos_value; + int pos_type; +}; + +#include <sys/cdefs.h> + +__BEGIN_DECLS +extern void port_obj_init(int); +__END_DECLS + +extern struct port_obj_tentry *port_obj_table; +extern int port_obj_table_size; + +#ifndef PORT_OBJ_ASSERT + +#define port_set_obj_value_type(pname, value, type) \ +do { \ + int ndx; \ + \ + if (!port_obj_table) \ + port_obj_init(port_obj_table_size); \ + ndx = MACH_PORT_INDEX(pname); \ + port_obj_table[ndx].pos_value = (value); \ + port_obj_table[ndx].pos_type = (type); \ +} while (0) + +#define port_get_obj_value(pname) \ + (port_obj_table[MACH_PORT_INDEX(pname)].pos_value) + +#define port_get_obj_type(pname) \ + (port_obj_table[MACH_PORT_INDEX(pname)].pos_type) + +#else /* PORT_OBJ_ASSERT */ + +#define port_set_obj_value_type(pname, value, type) \ +do { \ + int ndx; \ + \ + if (!port_obj_table) \ + port_obj_init(port_obj_table_size); \ + ndx = MACH_PORT_INDEX(pname); \ + assert(ndx > 0); \ + assert(ndx < port_obj_table_size); \ + port_obj_table[ndx].pos_value = (value); \ + port_obj_table[ndx].pos_type = (type); \ +} while (0) + +#define port_get_obj_value(pname) \ + ((MACH_PORT_INDEX(pname) < (unsigned)port_obj_table_size) ? \ + port_obj_table[MACH_PORT_INDEX(pname)].pos_value : \ + (panic("port_get_obj_value: index too big"), (void *)-1)) + +#define port_get_obj_type(pname) \ + ((MACH_PORT_INDEX(pname) < (unsigned)port_obj_table_size) ? \ + port_obj_table[MACH_PORT_INDEX(pname)].pos_type : \ + (panic("port_get_obj_type: index too big"), -1)) + +#endif /* PORT_OBJ_ASSERT */ + +#endif /* PORT_OBJ_H */ diff --git a/i386/include/mach/processor.defs b/i386/include/mach/processor.defs new file mode 100644 index 0000000..f590633 --- /dev/null +++ b/i386/include/mach/processor.defs @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_FREE_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/mach_port.defs + * Author: Rich Draves + * + * Exported kernel calls. + */ + +subsystem +#if KERNEL_SERVER + KernelServer +#endif /* KERNEL_SERVER */ + processor 3000; + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> + +/* + * References to processor objects are returned by: + * host_processors(host_priv_t,...); + * +/* + * Start processor. + */ +routine processor_start( + processor : processor_t); + +/* + * Exit processor -- may not be restartable. + */ + +routine processor_exit( + processor : processor_t); + +/* + * Return information about this processor. + */ +routine processor_info( + processor : processor_t; + flavor : processor_flavor_t; + out host : host_t; + out processor_info_out: processor_info_t, CountInOut); + + +/* + * Do something machine-dependent to processor. + */ +routine processor_control( + processor : processor_t; + processor_cmd : processor_info_t); + +/* + * JMM - Keep processor_set related stuff at the end because + * they likely will be removed. + */ + +/* + * Assign processor to processor set. + */ +routine processor_assign( + processor : processor_t; + new_set : processor_set_t; + wait : boolean_t); + +/* + * Get current assignment for processor. + */ +routine processor_get_assignment( + processor : processor_t; + out assigned_set : processor_set_name_t); + +/* vim: set ft=c : */ diff --git a/i386/include/mach/processor.h b/i386/include/mach/processor.h new file mode 100644 index 0000000..e3afbde --- /dev/null +++ b/i386/include/mach/processor.h @@ -0,0 +1,336 @@ +#ifndef _processor_user_ +#define _processor_user_ + +/* Module processor */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef processor_MSG_COUNT +#define processor_MSG_COUNT 6 +#endif /* processor_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mach_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine processor_start */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_start +( + processor_t processor +); + +/* Routine processor_exit */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_exit +( + processor_t processor +); + +/* Routine processor_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_info +( + processor_t processor, + processor_flavor_t flavor, + host_t *host, + processor_info_t processor_info_out, + mach_msg_type_number_t *processor_info_outCnt +); + +/* Routine processor_control */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_control +( + processor_t processor, + processor_info_t processor_cmd, + mach_msg_type_number_t processor_cmdCnt +); + +/* Routine processor_assign */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_assign +( + processor_t processor, + processor_set_t new_set, + boolean_t wait +); + +/* Routine processor_get_assignment */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_get_assignment +( + processor_t processor, + processor_set_name_t *assigned_set +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__processor_subsystem__defined +#define __Request__processor_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__processor_start_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__processor_exit_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + processor_flavor_t flavor; + mach_msg_type_number_t processor_info_outCnt; + } __Request__processor_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + mach_msg_type_number_t processor_cmdCnt; + integer_t processor_cmd[12]; + } __Request__processor_control_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_set; + /* end of the kernel processed data */ + NDR_record_t NDR; + boolean_t wait; + } __Request__processor_assign_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__processor_get_assignment_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__processor_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__processor_subsystem__defined +#define __RequestUnion__processor_subsystem__defined +union __RequestUnion__processor_subsystem { + __Request__processor_start_t Request_processor_start; + __Request__processor_exit_t Request_processor_exit; + __Request__processor_info_t Request_processor_info; + __Request__processor_control_t Request_processor_control; + __Request__processor_assign_t Request_processor_assign; + __Request__processor_get_assignment_t Request_processor_get_assignment; +}; +#endif /* !__RequestUnion__processor_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__processor_subsystem__defined +#define __Reply__processor_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__processor_start_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__processor_exit_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t host; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t processor_info_outCnt; + integer_t processor_info_out[12]; + } __Reply__processor_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__processor_control_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__processor_assign_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t assigned_set; + /* end of the kernel processed data */ + } __Reply__processor_get_assignment_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__processor_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__processor_subsystem__defined +#define __ReplyUnion__processor_subsystem__defined +union __ReplyUnion__processor_subsystem { + __Reply__processor_start_t Reply_processor_start; + __Reply__processor_exit_t Reply_processor_exit; + __Reply__processor_info_t Reply_processor_info; + __Reply__processor_control_t Reply_processor_control; + __Reply__processor_assign_t Reply_processor_assign; + __Reply__processor_get_assignment_t Reply_processor_get_assignment; +}; +#endif /* !__RequestUnion__processor_subsystem__defined */ + +#ifndef subsystem_to_name_map_processor +#define subsystem_to_name_map_processor \ + { "processor_start", 3000 },\ + { "processor_exit", 3001 },\ + { "processor_info", 3002 },\ + { "processor_control", 3003 },\ + { "processor_assign", 3004 },\ + { "processor_get_assignment", 3005 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _processor_user_ */ diff --git a/i386/include/mach/processor_info.h b/i386/include/mach/processor_info.h new file mode 100644 index 0000000..1607c71 --- /dev/null +++ b/i386/include/mach/processor_info.h @@ -0,0 +1,153 @@ +/* + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ + +/* + * File: mach/processor_info.h + * Author: David L. Black + * Date: 1988 + * + * Data structure definitions for processor_info, processor_set_info + */ + +#ifndef _MACH_PROCESSOR_INFO_H_ +#define _MACH_PROCESSOR_INFO_H_ + +#include <mach/message.h> +#include <mach/machine.h> +#include <mach/machine/processor_info.h> + +/* + * Generic information structure to allow for expansion. + */ +typedef integer_t *processor_info_t; /* varying array of int. */ +typedef integer_t *processor_info_array_t; /* varying array of int */ + +#define PROCESSOR_INFO_MAX (1024) /* max array size */ +typedef integer_t processor_info_data_t[PROCESSOR_INFO_MAX]; + + +typedef integer_t *processor_set_info_t; /* varying array of int. */ + +#define PROCESSOR_SET_INFO_MAX (1024) /* max array size */ +typedef integer_t processor_set_info_data_t[PROCESSOR_SET_INFO_MAX]; + +/* + * Currently defined information. + */ +typedef int processor_flavor_t; +#define PROCESSOR_BASIC_INFO 1 /* basic information */ +#define PROCESSOR_CPU_LOAD_INFO 2 /* cpu load information */ +#define PROCESSOR_PM_REGS_INFO 0x10000001 /* performance monitor register info */ +#define PROCESSOR_TEMPERATURE 0x10000002 /* Processor core temperature */ + +struct processor_basic_info { + cpu_type_t cpu_type; /* type of cpu */ + cpu_subtype_t cpu_subtype; /* subtype of cpu */ + boolean_t running; /* is processor running */ + int slot_num; /* slot number */ + boolean_t is_master; /* is this the master processor */ +}; + +typedef struct processor_basic_info processor_basic_info_data_t; +typedef struct processor_basic_info *processor_basic_info_t; +#define PROCESSOR_BASIC_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(processor_basic_info_data_t)/sizeof(natural_t))) + +struct processor_cpu_load_info { /* number of ticks while running... */ + unsigned int cpu_ticks[CPU_STATE_MAX]; /* ... in the given mode */ +}; + +typedef struct processor_cpu_load_info processor_cpu_load_info_data_t; +typedef struct processor_cpu_load_info *processor_cpu_load_info_t; +#define PROCESSOR_CPU_LOAD_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(processor_cpu_load_info_data_t)/sizeof(natural_t))) + +/* + * Scaling factor for load_average, mach_factor. + */ +#define LOAD_SCALE 1000 + +typedef int processor_set_flavor_t; +#define PROCESSOR_SET_BASIC_INFO 5 /* basic information */ + +struct processor_set_basic_info { + int processor_count; /* How many processors */ + int default_policy; /* When others not enabled */ +}; + +typedef struct processor_set_basic_info processor_set_basic_info_data_t; +typedef struct processor_set_basic_info *processor_set_basic_info_t; +#define PROCESSOR_SET_BASIC_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(processor_set_basic_info_data_t)/sizeof(natural_t))) + +#define PROCESSOR_SET_LOAD_INFO 4 /* scheduling statistics */ + +struct processor_set_load_info { + int task_count; /* How many tasks */ + int thread_count; /* How many threads */ + integer_t load_average; /* Scaled */ + integer_t mach_factor; /* Scaled */ +}; + +typedef struct processor_set_load_info processor_set_load_info_data_t; +typedef struct processor_set_load_info *processor_set_load_info_t; +#define PROCESSOR_SET_LOAD_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(processor_set_load_info_data_t)/sizeof(natural_t))) + + +#endif /* _MACH_PROCESSOR_INFO_H_ */ diff --git a/i386/include/mach/processor_set.defs b/i386/include/mach/processor_set.defs new file mode 100644 index 0000000..dc0f407 --- /dev/null +++ b/i386/include/mach/processor_set.defs @@ -0,0 +1,161 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_FREE_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/mach_port.defs + * Author: Rich Draves + * + * Exported kernel calls. + */ + +subsystem +#if KERNEL_SERVER + KernelServer +#endif /* KERNEL_SERVER */ + processor_set 4000; + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> + +/* + * Return scheduling statistics for a processor set. + */ +routine processor_set_statistics( + pset : processor_set_name_t; + flavor : processor_set_flavor_t; + out info_out : processor_set_info_t, CountInOut); + + +/* + * Destroy processor set. + */ +routine processor_set_destroy( + set : processor_set_t); + + +/* + * Set max priority for processor_set. + */ +routine processor_set_max_priority( + processor_set : processor_set_t; + max_priority : int; + change_threads : boolean_t); + +/* + * Enable policy for processor set + */ +routine processor_set_policy_enable( + processor_set : processor_set_t; + policy : int); + +/* + * Disable policy for processor set + */ +routine processor_set_policy_disable( + processor_set : processor_set_t; + policy : int; + change_threads : boolean_t); + +/* + * List all tasks in processor set. + */ +routine processor_set_tasks( + processor_set : processor_set_t; + out task_list : task_array_t); + +/* + * List all threads in processor set. + */ +routine processor_set_threads( + processor_set : processor_set_t; + out thread_list : thread_act_array_t); + +/* + * Controls the scheduling attributes governing the processor set. + * Allows control of enabled policies, and per-policy base and limit + * priorities. + */ +routine processor_set_policy_control( + pset : processor_set_t; + flavor : processor_set_flavor_t; + policy_info : processor_set_info_t; + change : boolean_t); + + +/* + * Debug Info + * This call is only valid on MACH_DEBUG kernels. + * Otherwise, KERN_FAILURE is returned. + */ +routine processor_set_stack_usage( + pset : processor_set_t; + out ltotal : unsigned; + out space : vm_size_t; + out resident : vm_size_t; + out maxusage : vm_size_t; + out maxstack : vm_offset_t); + +/* + * Get information about processor set. + */ +routine processor_set_info( + set_name : processor_set_name_t; + flavor : int; + out host : host_t; + out info_out : processor_set_info_t, CountInOut); + +/* vim: set ft=c : */ diff --git a/i386/include/mach/processor_set.h b/i386/include/mach/processor_set.h new file mode 100644 index 0000000..1aaf327 --- /dev/null +++ b/i386/include/mach/processor_set.h @@ -0,0 +1,516 @@ +#ifndef _processor_set_user_ +#define _processor_set_user_ + +/* Module processor_set */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef processor_set_MSG_COUNT +#define processor_set_MSG_COUNT 10 +#endif /* processor_set_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mach_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine processor_set_statistics */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_set_statistics +( + processor_set_name_t pset, + processor_set_flavor_t flavor, + processor_set_info_t info_out, + mach_msg_type_number_t *info_outCnt +); + +/* Routine processor_set_destroy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_set_destroy +( + processor_set_t set +); + +/* Routine processor_set_max_priority */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_set_max_priority +( + processor_set_t processor_set, + int max_priority, + boolean_t change_threads +); + +/* Routine processor_set_policy_enable */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_set_policy_enable +( + processor_set_t processor_set, + int policy +); + +/* Routine processor_set_policy_disable */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_set_policy_disable +( + processor_set_t processor_set, + int policy, + boolean_t change_threads +); + +/* Routine processor_set_tasks */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_set_tasks +( + processor_set_t processor_set, + task_array_t *task_list, + mach_msg_type_number_t *task_listCnt +); + +/* Routine processor_set_threads */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_set_threads +( + processor_set_t processor_set, + thread_act_array_t *thread_list, + mach_msg_type_number_t *thread_listCnt +); + +/* Routine processor_set_policy_control */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_set_policy_control +( + processor_set_t pset, + processor_set_flavor_t flavor, + processor_set_info_t policy_info, + mach_msg_type_number_t policy_infoCnt, + boolean_t change +); + +/* Routine processor_set_stack_usage */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_set_stack_usage +( + processor_set_t pset, + unsigned *ltotal, + vm_size_t *space, + vm_size_t *resident, + vm_size_t *maxusage, + vm_offset_t *maxstack +); + +/* Routine processor_set_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t processor_set_info +( + processor_set_name_t set_name, + int flavor, + host_t *host, + processor_set_info_t info_out, + mach_msg_type_number_t *info_outCnt +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__processor_set_subsystem__defined +#define __Request__processor_set_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + processor_set_flavor_t flavor; + mach_msg_type_number_t info_outCnt; + } __Request__processor_set_statistics_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__processor_set_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int max_priority; + boolean_t change_threads; + } __Request__processor_set_max_priority_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int policy; + } __Request__processor_set_policy_enable_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int policy; + boolean_t change_threads; + } __Request__processor_set_policy_disable_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__processor_set_tasks_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__processor_set_threads_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + processor_set_flavor_t flavor; + mach_msg_type_number_t policy_infoCnt; + integer_t policy_info[5]; + boolean_t change; + } __Request__processor_set_policy_control_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__processor_set_stack_usage_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int flavor; + mach_msg_type_number_t info_outCnt; + } __Request__processor_set_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__processor_set_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__processor_set_subsystem__defined +#define __RequestUnion__processor_set_subsystem__defined +union __RequestUnion__processor_set_subsystem { + __Request__processor_set_statistics_t Request_processor_set_statistics; + __Request__processor_set_destroy_t Request_processor_set_destroy; + __Request__processor_set_max_priority_t Request_processor_set_max_priority; + __Request__processor_set_policy_enable_t Request_processor_set_policy_enable; + __Request__processor_set_policy_disable_t Request_processor_set_policy_disable; + __Request__processor_set_tasks_t Request_processor_set_tasks; + __Request__processor_set_threads_t Request_processor_set_threads; + __Request__processor_set_policy_control_t Request_processor_set_policy_control; + __Request__processor_set_stack_usage_t Request_processor_set_stack_usage; + __Request__processor_set_info_t Request_processor_set_info; +}; +#endif /* !__RequestUnion__processor_set_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__processor_set_subsystem__defined +#define __Reply__processor_set_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t info_outCnt; + integer_t info_out[5]; + } __Reply__processor_set_statistics_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__processor_set_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__processor_set_max_priority_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__processor_set_policy_enable_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__processor_set_policy_disable_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_ports_descriptor_t task_list; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t task_listCnt; + } __Reply__processor_set_tasks_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_ports_descriptor_t thread_list; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t thread_listCnt; + } __Reply__processor_set_threads_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__processor_set_policy_control_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + unsigned ltotal; + vm_size_t space; + vm_size_t resident; + vm_size_t maxusage; + vm_offset_t maxstack; + } __Reply__processor_set_stack_usage_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t host; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t info_outCnt; + integer_t info_out[5]; + } __Reply__processor_set_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__processor_set_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__processor_set_subsystem__defined +#define __ReplyUnion__processor_set_subsystem__defined +union __ReplyUnion__processor_set_subsystem { + __Reply__processor_set_statistics_t Reply_processor_set_statistics; + __Reply__processor_set_destroy_t Reply_processor_set_destroy; + __Reply__processor_set_max_priority_t Reply_processor_set_max_priority; + __Reply__processor_set_policy_enable_t Reply_processor_set_policy_enable; + __Reply__processor_set_policy_disable_t Reply_processor_set_policy_disable; + __Reply__processor_set_tasks_t Reply_processor_set_tasks; + __Reply__processor_set_threads_t Reply_processor_set_threads; + __Reply__processor_set_policy_control_t Reply_processor_set_policy_control; + __Reply__processor_set_stack_usage_t Reply_processor_set_stack_usage; + __Reply__processor_set_info_t Reply_processor_set_info; +}; +#endif /* !__RequestUnion__processor_set_subsystem__defined */ + +#ifndef subsystem_to_name_map_processor_set +#define subsystem_to_name_map_processor_set \ + { "processor_set_statistics", 4000 },\ + { "processor_set_destroy", 4001 },\ + { "processor_set_max_priority", 4002 },\ + { "processor_set_policy_enable", 4003 },\ + { "processor_set_policy_disable", 4004 },\ + { "processor_set_tasks", 4005 },\ + { "processor_set_threads", 4006 },\ + { "processor_set_policy_control", 4007 },\ + { "processor_set_stack_usage", 4008 },\ + { "processor_set_info", 4009 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _processor_set_user_ */ diff --git a/i386/include/mach/rpc.h b/i386/include/mach/rpc.h new file mode 100644 index 0000000..565d7ac --- /dev/null +++ b/i386/include/mach/rpc.h @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2002,2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ + +/* + * Mach RPC Subsystem Interfaces + */ + +#ifndef _MACH_RPC_H_ +#define _MACH_RPC_H_ + +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/port.h> +#include <mach/vm_types.h> + +#include <mach/mig.h> +#include <mach/mig_errors.h> +#include <mach/machine/rpc.h> +#include <mach/thread_status.h> + +/* + * These are the types for RPC-specific variants of the MIG routine + * descriptor and subsystem data types. + * + * THIS IS ONLY FOR COMPATIBILITY. WE WILL NOT BE IMPLEMENTING THIS. + */ + +/* + * Basic mach rpc types. + */ +typedef unsigned int routine_arg_type; +typedef unsigned int routine_arg_offset; +typedef unsigned int routine_arg_size; + +/* + * Definitions for a signature's argument and routine descriptor's. + */ +struct rpc_routine_arg_descriptor { + routine_arg_type type; /* Port, Array, etc. */ + routine_arg_size size; /* element size in bytes */ + routine_arg_size count; /* number of elements */ + routine_arg_offset offset; /* Offset in list of routine args */ +}; +typedef struct rpc_routine_arg_descriptor *rpc_routine_arg_descriptor_t; + +struct rpc_routine_descriptor { + mig_impl_routine_t impl_routine; /* Server work func pointer */ + mig_stub_routine_t stub_routine; /* Unmarshalling func pointer */ + unsigned int argc; /* Number of argument words */ + unsigned int descr_count; /* Number of complex argument */ + /* descriptors */ + rpc_routine_arg_descriptor_t + arg_descr; /* Pointer to beginning of */ + /* the arg_descr array */ + unsigned int max_reply_msg; /* Max size for reply msg */ +}; +typedef struct rpc_routine_descriptor *rpc_routine_descriptor_t; + +#define RPC_DESCR_SIZE(x) ((x)->descr_count * \ + sizeof(struct rpc_routine_arg_descriptor)) + +struct rpc_signature { + struct rpc_routine_descriptor rd; + struct rpc_routine_arg_descriptor rad[1]; +}; + +#define RPC_SIGBUF_SIZE 8 + +/* + * A subsystem describes a set of server routines that can be invoked by + * mach_rpc() on the ports that are registered with the subsystem. For + * each routine, the routine number is given, along with the + * address of the implementation function in the server and a + * description of the arguments of the routine (it's "signature"). + * + * This structure definition is only a template for what is really a + * variable-length structure (generated by MIG for each subsystem). + * The actual structures do not always have one entry in the routine + * array, and also have a varying number of entries in the arg_descr + * array. Each routine has an array of zero or more arg descriptors + * one for each complex arg. These arrays are all catenated together + * to form the arg_descr field of the subsystem struct. The + * arg_descr field of each routine entry points to a unique sub-sequence + * within this catenated array. The goal is to keep everything + * contiguous. + */ +struct rpc_subsystem { + void *reserved; /* Reserved for system use */ + + mach_msg_id_t start; /* Min routine number */ + mach_msg_id_t end; /* Max routine number + 1 */ + unsigned int maxsize; /* Max mach_msg size */ + vm_address_t base_addr; /* Address of this struct in user */ + + struct rpc_routine_descriptor /* Array of routine descriptors */ + routine[1 /* Actually, (start-end+1) */ + ]; + + struct rpc_routine_arg_descriptor + arg_descriptor[1 /* Actually, the sum of the descr_ */ + ]; /* count fields for all routines */ +}; +typedef struct rpc_subsystem *rpc_subsystem_t; + +#define RPC_SUBSYSTEM_NULL ((rpc_subsystem_t) 0) + +#endif /* _MACH_RPC_H_ */ diff --git a/i386/include/mach/sdt.h b/i386/include/mach/sdt.h new file mode 100644 index 0000000..3268551 --- /dev/null +++ b/i386/include/mach/sdt.h @@ -0,0 +1,32 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _MACH_SDT_H +#define _MACH_SDT_H + +#include <mach/machine/sdt.h> + +#endif /* _MACH_SDT_H */ diff --git a/i386/include/mach/security.defs b/i386/include/mach/security.defs new file mode 100644 index 0000000..734aa90 --- /dev/null +++ b/i386/include/mach/security.defs @@ -0,0 +1,208 @@ + +/* -*- C++ -*- */ + +subsystem +#if KERNEL_SERVER + KernelServer +#endif KERNEL_SERVER + security 5200; + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> + +type labelstr_t = c_string[*:512]; + +/** + @brief Retrieve a task label as a label handle + @param task Target's task port + @param label Returned label handle + + This call retrieves the label handle of the specified task. + + @return Standard MiG return values (0 for success) +*/ + +routine mach_get_task_label(task : ipc_space_t; + out label : mach_port_name_t); + +/** + @brief Retrieve a task label in textual form + @param task Target's task port + @param policies Comma-delimited list of policies to query + @param label Returned label text + + This call retrieves an externalized task label for the + specified task, with respect to the specified policies. + + @return Standard MiG return values (0 for success) +*/ + +routine mach_get_task_label_text(task : ipc_space_t; + policies : labelstr_t; + out label : labelstr_t); + +/** + @brief Retrieve a port label as a label handle + @param task Issuer's task port + @param port Port to query label from + @param label Returned label handle + + This call retrieves a new label handle for the specified port. + If the port represents a label handle, KERN_INVALID_ARGUMENT is + returned. + + @return Standard MiG return values (0 for success) +*/ + +routine mach_get_label(task : ipc_space_t; + port : mach_port_name_t; + out label : mach_port_name_t); + +/** + @brief Retrieve a port label in textual form + @param task Issuer's task port + @param name Port to query label from + @param policies Comma-delimited list of policies to query + @param label Returned label text + + This call retrieves an externalized port label for the specified port, + with respect to the specified policies. If the port represents a label + handle, the returned label text refers to the stored label and not the + access control label. + + @return Standard MiG return values (0 for success) +*/ + +routine mach_get_label_text(task : ipc_space_t; + name : mach_port_name_t; + policies : labelstr_t; + out label : labelstr_t); + +/** + @brief Relabel a port + @param task Task containing specified ports + @param name Port to relabel + @param label String representation of new label + + This call attempts to relabel the specified port to the + label specified. For label handles, it changes the access control + label and not the stored label. + + @return Standard MiG return values (0 for success) +*/ + +routine mach_set_port_label(task : ipc_space_t; + name : mach_port_name_t; + label : labelstr_t); + +/** + @brief Generic access control check + @param task Any task port + @param subj subject label in textual form + @param obj object label in textual form + @param serv Service or object class name + @param perm Permission, or method, within the specified service + + This function provides a general way for a user process to query + an arbitrary access control decision from the system's security policies. + Currently, there are no standards for the format of the service and + permission names. + + @return Standard MiG return values (0 for success) +*/ + +routine mac_check_service(task : ipc_space_t; + subject : labelstr_t; + object : labelstr_t; + service : labelstr_t; + perm : labelstr_t); + +/** + @brief Generic access control check + @param task Task containing specified ports (usually caller's) + @param subj subject label in textual form + @param obj port containing object label + @param serv Service or object class name + @param perm Permission, or method, within the specified service + + This function provides a general way for a user process to query + an arbitrary access control decision from the system's security policies. + Currently, there are no standards for the format of the service and + permission names. If the port is a label handle, the stored label is + used. Otherwise, its access control label is used. + + @return Standard MiG return values (0 for success) +*/ + +routine mac_port_check_service_obj(task : ipc_space_t; + subject : labelstr_t; + object : mach_port_name_t; + service : labelstr_t; + perm : labelstr_t); + +/** + @brief Generic access control check + @param task Task containing specified ports (usually caller's) + @param subj port containing subject label + @param obj port containing object label + @param serv Service or object class name + @param perm Permission, or method, within the specified service + + This function provides a general way for a user process to query + an arbitrary access control decision from the system's security policies. + Currently, there are no standards for the format of the service and + permission names. If any ports are label handles, the stored label is + used. Otherwise, the access control labels are used. + + @return Standard MiG return values (0 for success) +*/ + +routine mac_port_check_access(task : ipc_space_t; + subject : mach_port_name_t; + object : mach_port_name_t; + service : labelstr_t; + perm : labelstr_t); + +/** + @brief Create a new label handle + @param task Task to receive new ports (usually caller's) + @param name Returned label handle port + @param label String representation of new label + + Creates a new label handle, with the stored label defined by the + given text. Any task may create a label handle with any valid label, + not necessarily one that it has permission to access. A port right + for the new label handle is inserted into the specified task. + Posession of label handles should not imply any security properties. + + @return Standard MiG return values (0 for success) +*/ + +routine mac_label_new(task : ipc_space_t; + out name : mach_port_name_t; + label : labelstr_t); + +/** + @brief Request a computed label + @param task subj,obj,newlabel relative to this task (usually caller's) + @param subj port containing subject label + @param obj port containing object label + @param serv Service or object class name + @param newlabel Returned label handle port + + Ask the loaded policies to compute a label based on the two input labels + and the service name. There is currently no standard for the service name, + or even what the input labels represent (Subject and parent object are only + a suggestion). If any ports are label handles, the stored label is + used. Otherwise, the access control labels are used. A new label handle + is created to contain the computed label, and is stored into the + specified task. + + @return Standard MiG return values (0 for success) +*/ + +routine mac_request_label(task : ipc_space_t; + subject : mach_port_name_t; + object : mach_port_name_t; + service : labelstr_t; + out newlabel : mach_port_name_t); diff --git a/i386/include/mach/semaphore.h b/i386/include/mach/semaphore.h new file mode 100644 index 0000000..660af09 --- /dev/null +++ b/i386/include/mach/semaphore.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2000-2008 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_SEMAPHORE_H_ +#define _MACH_SEMAPHORE_H_ + +#include <mach/port.h> +#include <mach/mach_types.h> +#include <mach/kern_return.h> +#include <mach/sync_policy.h> + +/* + * Forward Declarations + * + * The semaphore creation and deallocation routines are + * defined with the Mach task APIs in <mach/task.h>. + * + * kern_return_t semaphore_create(task_t task, + * semaphore_t *new_semaphore, + * sync_policy_t policy, + * int value); + * + * kern_return_t semaphore_destroy(task_t task, + * semaphore_t semaphore); + */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + +extern kern_return_t semaphore_signal (semaphore_t semaphore); +extern kern_return_t semaphore_signal_all (semaphore_t semaphore); + +extern kern_return_t semaphore_wait (semaphore_t semaphore); + + +extern kern_return_t semaphore_timedwait (semaphore_t semaphore, + mach_timespec_t wait_time); + +extern kern_return_t semaphore_timedwait_signal(semaphore_t wait_semaphore, + semaphore_t signal_semaphore, + mach_timespec_t wait_time); + +extern kern_return_t semaphore_wait_signal (semaphore_t wait_semaphore, + semaphore_t signal_semaphore); + +extern kern_return_t semaphore_signal_thread (semaphore_t semaphore, + thread_t thread); + + +__END_DECLS + + +#endif /* _MACH_SEMAPHORE_H_ */ diff --git a/i386/include/mach/shared_memory_server.h b/i386/include/mach/shared_memory_server.h new file mode 100644 index 0000000..1ca25f3 --- /dev/null +++ b/i386/include/mach/shared_memory_server.h @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * + * File: mach/shared_memory_server.h + * + * protos and struct definitions for shared library + * server and interface + */ + +/* + * XXX + * + * NOTE: this file is deprecated and will be removed in the near future. + * Any project that includes this file should be changed to: + * 1. use <mach/shared_region.h> instead of this file, + * 2. handle the new shared regions, now available on more platforms + */ + +#ifndef _MACH_SHARED_MEMORY_SERVER_H_ +#define _MACH_SHARED_MEMORY_SERVER_H_ + +#warning "<mach/shared_memory_server.h> is deprecated. Please use <mach/shared_region.h> instead." + +#include <sys/cdefs.h> +#include <mach/vm_prot.h> +#include <mach/vm_types.h> +#include <mach/mach_types.h> + +#define VM_PROT_COW 0x8 /* must not interfere with normal prot assignments */ +#define VM_PROT_ZF 0x10 /* must not interfere with normal prot assignments */ + +#ifdef __arm__ +#define GLOBAL_SHARED_TEXT_SEGMENT 0x30000000U +#define GLOBAL_SHARED_DATA_SEGMENT 0x38000000U +#define GLOBAL_SHARED_SEGMENT_MASK 0xF8000000U + +#define SHARED_TEXT_REGION_SIZE 0x08000000 +#define SHARED_DATA_REGION_SIZE 0x08000000 +#else +#define GLOBAL_SHARED_TEXT_SEGMENT 0x90000000U +#define GLOBAL_SHARED_DATA_SEGMENT 0xA0000000U +#define GLOBAL_SHARED_SEGMENT_MASK 0xF0000000U + +#define SHARED_TEXT_REGION_SIZE 0x10000000 +#define SHARED_DATA_REGION_SIZE 0x10000000 +#endif + +#if !defined(__LP64__) + +#define SHARED_LIBRARY_SERVER_SUPPORTED + +#define SHARED_ALTERNATE_LOAD_BASE 0x09000000 + +/* + * Note: the two masks below are useful because the assumption is + * made that these shared regions will always be mapped on natural boundaries + * i.e. if the size is 0x10000000 the object can be mapped at + * 0x20000000, or 0x30000000, but not 0x1000000 + */ +#ifdef __arm__ +#define SHARED_TEXT_REGION_MASK 0x07FFFFFF +#define SHARED_DATA_REGION_MASK 0x07FFFFFF +#else +#define SHARED_TEXT_REGION_MASK 0x0FFFFFFF +#define SHARED_DATA_REGION_MASK 0x0FFFFFFF +#endif + + +/* flags field aliases for copyin_shared_file and load_shared_file */ + +/* IN */ +#define ALTERNATE_LOAD_SITE 0x1 +#define NEW_LOCAL_SHARED_REGIONS 0x2 +#define QUERY_IS_SYSTEM_REGION 0x4 + +/* OUT */ +#define SF_PREV_LOADED 0x1 +#define SYSTEM_REGION_BACKED 0x2 + + +struct sf_mapping { + vm_offset_t mapping_offset; + vm_size_t size; + vm_offset_t file_offset; + vm_prot_t protection; /* read/write/execute/COW/ZF */ + vm_offset_t cksum; +}; +typedef struct sf_mapping sf_mapping_t; + +#endif /* !defined(__LP64__) */ + +/* + * All shared_region_* declarations are a private interface + * between dyld and the kernel. + * + */ +struct shared_file_mapping_np { + mach_vm_address_t sfm_address; + mach_vm_size_t sfm_size; + mach_vm_offset_t sfm_file_offset; + vm_prot_t sfm_max_prot; + vm_prot_t sfm_init_prot; +}; + +struct shared_region_range_np { + mach_vm_address_t srr_address; + mach_vm_size_t srr_size; +}; + + +__BEGIN_DECLS +int shared_region_map_file_np(int fd, + uint32_t mappingCount, + const struct shared_file_mapping_np *mappings, + int64_t *slide_p); +int shared_region_make_private_np(uint32_t rangeCount, + const struct shared_region_range_np *ranges); +__END_DECLS + + +#endif /* _MACH_SHARED_MEMORY_SERVER_H_ */ diff --git a/i386/include/mach/shared_region.h b/i386/include/mach/shared_region.h new file mode 100644 index 0000000..4bea17e --- /dev/null +++ b/i386/include/mach/shared_region.h @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2007 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * + * File: mach/shared_region.h + * + * protos and struct definitions for shared region + */ + +#ifndef _MACH_SHARED_REGION_H_ +#define _MACH_SHARED_REGION_H_ + +#include <sys/cdefs.h> +#include <mach/vm_prot.h> +#include <mach/vm_types.h> +#include <mach/mach_types.h> + +#define SHARED_REGION_BASE_I386 0x90000000ULL +#define SHARED_REGION_SIZE_I386 0x20000000ULL +#define SHARED_REGION_NESTING_BASE_I386 0x90000000ULL +#define SHARED_REGION_NESTING_SIZE_I386 0x20000000ULL +#define SHARED_REGION_NESTING_MIN_I386 0x00200000ULL +#define SHARED_REGION_NESTING_MAX_I386 0xFFE00000ULL + +#define SHARED_REGION_BASE_X86_64 0x00007FFF70000000ULL +#define SHARED_REGION_SIZE_X86_64 0x000000008FE00000ULL +#define SHARED_REGION_NESTING_BASE_X86_64 0x00007FFF80000000ULL +#define SHARED_REGION_NESTING_SIZE_X86_64 0x0000000040000000ULL +#define SHARED_REGION_NESTING_MIN_X86_64 0x0000000000200000ULL +#define SHARED_REGION_NESTING_MAX_X86_64 0xFFFFFFFFFFE00000ULL + +#define SHARED_REGION_BASE_PPC 0x90000000ULL +#define SHARED_REGION_SIZE_PPC 0x20000000ULL +#define SHARED_REGION_NESTING_BASE_PPC 0x90000000ULL +#define SHARED_REGION_NESTING_SIZE_PPC 0x10000000ULL +#define SHARED_REGION_NESTING_MIN_PPC 0x10000000ULL +#define SHARED_REGION_NESTING_MAX_PPC 0x10000000ULL + +#define SHARED_REGION_BASE_PPC64 0x00007FFF60000000ULL +#define SHARED_REGION_SIZE_PPC64 0x00000000A0000000ULL +#define SHARED_REGION_NESTING_BASE_PPC64 0x00007FFF60000000ULL +#define SHARED_REGION_NESTING_SIZE_PPC64 0x00000000A0000000ULL +#define SHARED_REGION_NESTING_MIN_PPC64 0x0000000010000000ULL +#define SHARED_REGION_NESTING_MAX_PPC64 0x0000000010000000ULL + +#define SHARED_REGION_BASE_ARM 0x30000000ULL +#define SHARED_REGION_SIZE_ARM 0x10000000ULL +#define SHARED_REGION_NESTING_BASE_ARM 0x30000000ULL +#define SHARED_REGION_NESTING_SIZE_ARM 0x08000000ULL +#define SHARED_REGION_NESTING_MIN_ARM ? +#define SHARED_REGION_NESTING_MAX_ARM ? + +#if defined(__i386__) +#define SHARED_REGION_BASE SHARED_REGION_BASE_I386 +#define SHARED_REGION_SIZE SHARED_REGION_SIZE_I386 +#define SHARED_REGION_NESTING_BASE SHARED_REGION_NESTING_BASE_I386 +#define SHARED_REGION_NESTING_SIZE SHARED_REGION_NESTING_SIZE_I386 +#define SHARED_REGION_NESTING_MIN SHARED_REGION_NESTING_MIN_I386 +#define SHARED_REGION_NESTING_MAX SHARED_REGION_NESTING_MAX_I386 +#elif defined(__x86_64__) +#define SHARED_REGION_BASE SHARED_REGION_BASE_X86_64 +#define SHARED_REGION_SIZE SHARED_REGION_SIZE_X86_64 +#define SHARED_REGION_NESTING_BASE SHARED_REGION_NESTING_BASE_X86_64 +#define SHARED_REGION_NESTING_SIZE SHARED_REGION_NESTING_SIZE_X86_64 +#define SHARED_REGION_NESTING_MIN SHARED_REGION_NESTING_MIN_X86_64 +#define SHARED_REGION_NESTING_MAX SHARED_REGION_NESTING_MAX_X86_64 +#elif defined(__ppc__) +#define SHARED_REGION_BASE SHARED_REGION_BASE_PPC +#define SHARED_REGION_SIZE SHARED_REGION_SIZE_PPC +#define SHARED_REGION_NESTING_BASE SHARED_REGION_NESTING_BASE_PPC +#define SHARED_REGION_NESTING_SIZE SHARED_REGION_NESTING_SIZE_PPC +#define SHARED_REGION_NESTING_MIN SHARED_REGION_NESTING_MIN_PPC +#define SHARED_REGION_NESTING_MAX SHARED_REGION_NESTING_MAX_PPC +#elif defined(__ppc64__) +#define SHARED_REGION_BASE SHARED_REGION_BASE_PPC64 +#define SHARED_REGION_SIZE SHARED_REGION_SIZE_PPC64 +#define SHARED_REGION_NESTING_BASE SHARED_REGION_NESTING_BASE_PPC64 +#define SHARED_REGION_NESTING_SIZE SHARED_REGION_NESTING_SIZE_PPC64 +#define SHARED_REGION_NESTING_MIN SHARED_REGION_NESTING_MIN_PPC64 +#define SHARED_REGION_NESTING_MAX SHARED_REGION_NESTING_MAX_PPC64 +#elif defined(__arm__) +#define SHARED_REGION_BASE SHARED_REGION_BASE_ARM +#define SHARED_REGION_SIZE SHARED_REGION_SIZE_ARM +#define SHARED_REGION_NESTING_BASE SHARED_REGION_NESTING_BASE_ARM +#define SHARED_REGION_NESTING_SIZE SHARED_REGION_NESTING_SIZE_ARM +#define SHARED_REGION_NESTING_MIN SHARED_REGION_NESTING_MIN_ARM +#define SHARED_REGION_NESTING_MAX SHARED_REGION_NESTING_MAX_ARM +#endif + +/* + * All shared_region_* declarations are a private interface + * between dyld and the kernel. + * + */ +struct shared_file_mapping_np { + mach_vm_address_t sfm_address; + mach_vm_size_t sfm_size; + mach_vm_offset_t sfm_file_offset; + vm_prot_t sfm_max_prot; + vm_prot_t sfm_init_prot; +}; +#define VM_PROT_COW 0x8 /* must not interfere with normal prot assignments */ +#define VM_PROT_ZF 0x10 /* must not interfere with normal prot assignments */ + + +__BEGIN_DECLS +int shared_region_check_np(uint64_t *startaddress); +int shared_region_map_np(int fd, + uint32_t mappingCount, + const struct shared_file_mapping_np *mappings); +__END_DECLS + + +#endif /* _MACH_SHARED_REGION_H_ */ diff --git a/i386/include/mach/std_types.defs b/i386/include/mach/std_types.defs new file mode 100644 index 0000000..0b48383 --- /dev/null +++ b/i386/include/mach/std_types.defs @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2002,2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * Mach kernel standard interface type declarations + */ + +#ifndef _MACH_STD_TYPES_DEFS_ +#define _MACH_STD_TYPES_DEFS_ + +/* from ISO/IEC 988:1999 spec */ +/* 7.18.1.1 Exact-width integer types */ + +type int8_t = MACH_MSG_TYPE_INTEGER_8; +type uint8_t = MACH_MSG_TYPE_INTEGER_8; +type int16_t = MACH_MSG_TYPE_INTEGER_16; +type uint16_t = MACH_MSG_TYPE_INTEGER_16; +type int32_t = MACH_MSG_TYPE_INTEGER_32; +type uint32_t = MACH_MSG_TYPE_INTEGER_32; +type int64_t = MACH_MSG_TYPE_INTEGER_64; +type uint64_t = MACH_MSG_TYPE_INTEGER_64; + +/* + * Legacy fixed-length Mach types which should + * be replaced with the Standard types from above. + */ +type int32 = int32_t; +type unsigned32 = uint32_t; +type int64 = int64_t; +type unsigned64 = uint64_t; + +/* + * Other fixed length Mach types. + */ +type char = MACH_MSG_TYPE_CHAR; +type boolean_t = MACH_MSG_TYPE_BOOLEAN; + +#include <mach/machine/machine_types.defs> + +type kern_return_t = int; + +type pointer_t = ^array[] of MACH_MSG_TYPE_BYTE + ctype: vm_offset_t; + + +type mach_port_t = MACH_MSG_TYPE_COPY_SEND; +type mach_port_array_t = array[] of mach_port_t; + +type mach_port_name_t = MACH_MSG_TYPE_PORT_NAME; +type mach_port_name_array_t = array[] of mach_port_name_t; + +type mach_port_right_t = natural_t; + +type mach_port_type_t = natural_t; +type mach_port_type_array_t = array[] of mach_port_type_t; + +type mach_port_urefs_t = natural_t; +type mach_port_delta_t = integer_t; +type mach_port_seqno_t = natural_t; +type mach_port_mscount_t = unsigned; +type mach_port_msgcount_t = unsigned; +type mach_port_rights_t = unsigned; +type mach_msg_id_t = integer_t; +type mach_msg_size_t = natural_t; +type mach_msg_type_name_t = unsigned; +type mach_msg_options_t = integer_t; + +type mach_port_move_receive_t = MACH_MSG_TYPE_MOVE_RECEIVE + ctype: mach_port_t; +type mach_port_copy_send_t = MACH_MSG_TYPE_COPY_SEND + ctype: mach_port_t; +type mach_port_make_send_t = MACH_MSG_TYPE_MAKE_SEND + ctype: mach_port_t; +type mach_port_move_send_t = MACH_MSG_TYPE_MOVE_SEND + ctype: mach_port_t; +type mach_port_make_send_once_t = MACH_MSG_TYPE_MAKE_SEND_ONCE + ctype: mach_port_t; +type mach_port_move_send_once_t = MACH_MSG_TYPE_MOVE_SEND_ONCE + ctype: mach_port_t; + +type mach_port_receive_t = MACH_MSG_TYPE_PORT_RECEIVE + ctype: mach_port_t; +type mach_port_send_t = MACH_MSG_TYPE_PORT_SEND + ctype: mach_port_t; +type mach_port_send_once_t = MACH_MSG_TYPE_PORT_SEND_ONCE + ctype: mach_port_t; + +type mach_port_poly_t = polymorphic + ctype: mach_port_t; + +import <mach/std_types.h>; +import <mach/mig.h>; + +#endif /* _MACH_STD_TYPES_DEFS_ */ + +/* vim: set ft=c : */ diff --git a/i386/include/mach/std_types.h b/i386/include/mach/std_types.h new file mode 100644 index 0000000..f5b838a --- /dev/null +++ b/i386/include/mach/std_types.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2002,2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * Mach standard external interface type definitions. + * + */ + +#ifndef _MACH_STD_TYPES_H_ +#define _MACH_STD_TYPES_H_ + +#include <stdint.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/port.h> +#include <mach/vm_types.h> + +#endif /* _MACH_STD_TYPES_H_ */ diff --git a/i386/include/mach/sync.h b/i386/include/mach/sync.h new file mode 100644 index 0000000..0a567c2 --- /dev/null +++ b/i386/include/mach/sync.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* +** This file contains compatibilty wrapper header for things that used +** to be generated from mach/sync.defs. Now that code is split into two +** different interface generator files, so include the two resulting +** headers here. +*/ +#include <mach/semaphore.h> +#include <mach/lock_set.h> diff --git a/i386/include/mach/sync_policy.h b/i386/include/mach/sync_policy.h new file mode 100644 index 0000000..1fd8d3f --- /dev/null +++ b/i386/include/mach/sync_policy.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ + +#ifndef _MACH_SYNC_POLICY_H_ +#define _MACH_SYNC_POLICY_H_ + +typedef int sync_policy_t; + +/* + * These options define the wait ordering of the synchronizers + */ +#define SYNC_POLICY_FIFO 0x0 +#define SYNC_POLICY_FIXED_PRIORITY 0x1 +#define SYNC_POLICY_REVERSED 0x2 +#define SYNC_POLICY_ORDER_MASK 0x3 +#define SYNC_POLICY_LIFO (SYNC_POLICY_FIFO|SYNC_POLICY_REVERSED) + + +#define SYNC_POLICY_MAX 0x7 + +#endif /* _MACH_SYNC_POLICY_H_ */ diff --git a/i386/include/mach/task.defs b/i386/include/mach/task.defs new file mode 100644 index 0000000..ceebc95 --- /dev/null +++ b/i386/include/mach/task.defs @@ -0,0 +1,393 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_FREE_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/mach_port.defs + * Author: Rich Draves + * + * Exported kernel calls. + */ + +subsystem +#if KERNEL_SERVER + KernelServer +#endif /* KERNEL_SERVER */ + task 3400; + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> +/* + * Create a new task with an empty set of IPC rights, + * and having an address space constructed from the + * target task (or empty, if inherit_memory is FALSE). + */ +routine task_create( + target_task : task_t; + ledgers : ledger_array_t; + inherit_memory : boolean_t; + out child_task : task_t); + +/* + * Destroy the target task, causing all of its threads + * to be destroyed, all of its IPC rights to be deallocated, + * and all of its address space to be deallocated. + */ +routine task_terminate( + target_task : task_t); + +/* + * Returns the set of threads belonging to the target task. + */ +routine task_threads( + target_task : task_t; + out act_list : thread_act_array_t); + +/* + * Stash a handful of ports for the target task; child + * tasks inherit this stash at task_create time. + */ +routine mach_ports_register( + target_task : task_t; + init_port_set : mach_port_array_t = + ^array[] of mach_port_t); + +/* + * Retrieve the stashed ports for the target task. + */ +routine mach_ports_lookup( + target_task : task_t; + out init_port_set : mach_port_array_t = + ^array[] of mach_port_t); + +/* + * Returns information about the target task. + */ +routine task_info( + target_task : task_name_t; + flavor : task_flavor_t; + out task_info_out : task_info_t, CountInOut); + +/* + * Set task information. + */ +routine task_set_info( + target_task : task_t; + flavor : task_flavor_t; + task_info_in : task_info_t); + +/* + * Increment the suspend count for the target task. + * No threads within a task may run when the suspend + * count for that task is non-zero. + */ +routine task_suspend( + target_task : task_t); + + +/* + * Decrement the suspend count for the target task, + * if the count is currently non-zero. If the resulting + * suspend count is zero, then threads within the task + * that also have non-zero suspend counts may execute. + */ +routine task_resume( + target_task : task_t); + +/* + * Returns the current value of the selected special port + * associated with the target task. + */ +routine task_get_special_port( + task : task_t; + which_port : int; + out special_port : mach_port_t); + +/* + * Set one of the special ports associated with the + * target task. + */ +routine task_set_special_port( + task : task_t; + which_port : int; + special_port : mach_port_t); + +/* + * Create a new thread within the target task, returning + * the port representing the first thr_act in that new thread. The + * initial execution state of the thread is undefined. + */ +routine thread_create( + parent_task : task_t; + out child_act : thread_act_t); + +/* + * Create a new thread within the target task, returning + * the port representing that new thread. The new thread + * is not suspended; its initial execution state is given + * by flavor and new_state. Returns the port representing + * the new thread. + */ +routine thread_create_running( + parent_task : task_t; + flavor : thread_state_flavor_t; + new_state : thread_state_t; + out child_act : thread_act_t); + +/* + * Set an exception handler for a task on one or more exception types. + * These handlers are invoked for all threads in the task if there are + * no thread-specific exception handlers or those handlers returned an + * error. + */ +routine task_set_exception_ports( + task : task_t; + exception_mask : exception_mask_t; + new_port : mach_port_t; + behavior : exception_behavior_t; + new_flavor : thread_state_flavor_t); + + +/* + * Lookup some of the old exception handlers for a task + */ +routine task_get_exception_ports( + task : task_t; + exception_mask : exception_mask_t; + out masks : exception_mask_array_t; + out old_handlers : exception_handler_array_t, SameCount; + out old_behaviors : exception_behavior_array_t, SameCount; + out old_flavors : exception_flavor_array_t, SameCount); + + +/* + * Set an exception handler for a thread on one or more exception types. + * At the same time, return the previously defined exception handlers for + * those types. + */ +routine task_swap_exception_ports( + task : task_t; + exception_mask : exception_mask_t; + new_port : mach_port_t; + behavior : exception_behavior_t; + new_flavor : thread_state_flavor_t; + out masks : exception_mask_array_t; + out old_handlerss : exception_handler_array_t, SameCount; + out old_behaviors : exception_behavior_array_t, SameCount; + out old_flavors : exception_flavor_array_t, SameCount); + +/* + * Create and destroy lock_set and semaphore synchronizers on a + * per-task basis (i.e. the task owns them). + */ +routine lock_set_create( + task : task_t; + out new_lock_set : lock_set_t; + n_ulocks : int; + policy : int); + +routine lock_set_destroy( + task : task_t; + lock_set : lock_set_t); + +routine semaphore_create( + task : task_t; + out semaphore : semaphore_t; + policy : int; + value : int); + +routine semaphore_destroy( + task : task_t; + semaphore : semaphore_consume_ref_t); + +/* + * Set/get policy information for a task. + * (Approved Mac OS X microkernel interface) + */ + +routine task_policy_set( + task : task_t; + flavor : task_policy_flavor_t; + policy_info : task_policy_t); + +routine task_policy_get( + task : task_t; + flavor : task_policy_flavor_t; +out policy_info : task_policy_t, CountInOut; +inout get_default : boolean_t); + +/* + * Removed from the kernel. + */ +#if KERNEL_SERVER +skip; +#else +routine task_sample( + task : task_t; + reply : mach_port_make_send_t); +#endif + +/* + * JMM - Everything from here down is likely to go away soon + */ +/* + * OBSOLETE interface. + */ +routine task_policy( + task : task_t; + policy : policy_t; + base : policy_base_t; + set_limit : boolean_t; + change : boolean_t); + + +/* + * Establish a user-level handler for the specified + * system call. + */ +routine task_set_emulation( + target_port : task_t; + routine_entry_pt: vm_address_t; + routine_number : int); + +/* + * Get user-level handler entry points for all + * emulated system calls. + */ +routine task_get_emulation_vector( + task : task_t; + out vector_start : int; + out emulation_vector: emulation_vector_t); + +/* + * Establish user-level handlers for the specified + * system calls. Non-emulated system calls are specified + * with emulation_vector[i] == EML_ROUTINE_NULL. + */ +routine task_set_emulation_vector( + task : task_t; + vector_start : int; + emulation_vector: emulation_vector_t); + + +/* + * Establish restart pc for interrupted atomic sequences. + */ +routine task_set_ras_pc( + target_task : task_t; + basepc : vm_address_t; + boundspc : vm_address_t); + + +skip; /* was kernel_task_create() */ + +/* + * JMM - Want to eliminate processor_set so keep them at the end. + */ + +/* + * Assign task to processor set. + */ +routine task_assign( + task : task_t; + new_set : processor_set_t; + assign_threads : boolean_t); + +/* + * Assign task to default set. + */ +routine task_assign_default( + task : task_t; + assign_threads : boolean_t); + +/* + * Get current assignment for task. + */ +routine task_get_assignment( + task : task_t; + out assigned_set : processor_set_name_t); + +/* + * OBSOLETE interface. + */ +routine task_set_policy( + task : task_t; + pset : processor_set_t; + policy : policy_t; + base : policy_base_t; + limit : policy_limit_t; + change : boolean_t); + +/* + * Read the selected state which is to be installed on new + * threads in the task as they are created. + */ +routine task_get_state( + task : task_t; + flavor : thread_state_flavor_t; + out old_state : thread_state_t, CountInOut); + +/* + * Set the selected state information to be installed on + * all subsequently created threads in the task. + */ +routine task_set_state( + task : task_t; + flavor : thread_state_flavor_t; + new_state : thread_state_t); + + +/* vim: set ft=c : */ diff --git a/i386/include/mach/task.h b/i386/include/mach/task.h new file mode 100644 index 0000000..459a330 --- /dev/null +++ b/i386/include/mach/task.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#if defined(__i386__) +#include <mach/i386/task.h> +#elif defined(__x86_64__) +#include <mach/x86_64/task.h> +#elif defined(__ppc__) +#include <mach/ppc/task.h> +#elif defined(__ppc64__) +#include <mach/ppc64/task.h> +#elif defined(__arm__) +#include <mach/arm/task.h> +#else +#error unknown architecture +#endif diff --git a/i386/include/mach/task_access.defs b/i386/include/mach/task_access.defs new file mode 100644 index 0000000..1696fd3 --- /dev/null +++ b/i386/include/mach/task_access.defs @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ + +subsystem +#if KERNEL_USER + KernelUser +#endif /* KERN_USER */ + task_access 27000; + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> + +/* + * Verify task_for_pid access for the given pid + * Access granted by return value (success/failure) + */ +routine check_task_access( + task_access_port : mach_port_t; + calling_pid : int32_t; + calling_gid : uint32_t; + target_pid : int32_t; + ServerAuditToken caller_cred : audit_token_t); + +/* + * Search for a code signature for unsigned executables + */ +routine find_code_signature( + task_access_port : mach_port_t; + new_pid : int32_t); + +/* vim: set ft=c : */ diff --git a/i386/include/mach/task_info.h b/i386/include/mach/task_info.h new file mode 100644 index 0000000..cab9c17 --- /dev/null +++ b/i386/include/mach/task_info.h @@ -0,0 +1,244 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * Machine-independent task information structures and definitions. + * + * The definitions in this file are exported to the user. The kernel + * will translate its internal data structures to these structures + * as appropriate. + * + */ + +#ifndef _MACH_TASK_INFO_H_ +#define _MACH_TASK_INFO_H_ + +#include <mach/message.h> +#include <mach/machine/vm_types.h> +#include <mach/time_value.h> +#include <mach/policy.h> + +#include <sys/cdefs.h> + +/* + * Generic information structure to allow for expansion. + */ +typedef natural_t task_flavor_t; +typedef integer_t *task_info_t; /* varying array of int */ + +#define TASK_INFO_MAX (1024) /* maximum array size */ +typedef integer_t task_info_data_t[TASK_INFO_MAX]; + +/* + * Currently defined information structures. + */ + +#pragma pack(4) + +#define TASK_BASIC_INFO_32 4 /* basic information */ +#define TASK_BASIC2_INFO_32 6 + +struct task_basic_info_32 { + integer_t suspend_count; /* suspend count for task */ + natural_t virtual_size; /* virtual memory size (bytes) */ + natural_t resident_size; /* resident memory size (bytes) */ + time_value_t user_time; /* total user run time for + terminated threads */ + time_value_t system_time; /* total system run time for + terminated threads */ + policy_t policy; /* default policy for new threads */ +}; +typedef struct task_basic_info_32 task_basic_info_32_data_t; +typedef struct task_basic_info_32 *task_basic_info_32_t; +#define TASK_BASIC_INFO_32_COUNT \ + (sizeof(task_basic_info_32_data_t) / sizeof(natural_t)) + + +#define TASK_BASIC_INFO_64 5 /* 64-bit capable basic info */ + +struct task_basic_info_64 { + integer_t suspend_count; /* suspend count for task */ + mach_vm_size_t virtual_size; /* virtual memory size (bytes) */ + mach_vm_size_t resident_size; /* resident memory size (bytes) */ + time_value_t user_time; /* total user run time for + terminated threads */ + time_value_t system_time; /* total system run time for + terminated threads */ + policy_t policy; /* default policy for new threads */ +}; +typedef struct task_basic_info_64 task_basic_info_64_data_t; +typedef struct task_basic_info_64 *task_basic_info_64_t; +#define TASK_BASIC_INFO_64_COUNT \ + (sizeof(task_basic_info_64_data_t) / sizeof(natural_t)) + + +/* localized structure - cannot be safely passed between tasks of differing sizes */ + +struct task_basic_info { + integer_t suspend_count; /* suspend count for task */ + vm_size_t virtual_size; /* virtual memory size (bytes) */ + vm_size_t resident_size; /* resident memory size (bytes) */ + time_value_t user_time; /* total user run time for + terminated threads */ + time_value_t system_time; /* total system run time for + terminated threads */ + policy_t policy; /* default policy for new threads */ +}; + +typedef struct task_basic_info task_basic_info_data_t; +typedef struct task_basic_info *task_basic_info_t; +#define TASK_BASIC_INFO_COUNT \ + (sizeof(task_basic_info_data_t) / sizeof(natural_t)) +#if !defined(__LP64__) +#define TASK_BASIC_INFO TASK_BASIC_INFO_32 +#else +#define TASK_BASIC_INFO TASK_BASIC_INFO_64 +#endif + + + +#define TASK_EVENTS_INFO 2 /* various event counts */ + +struct task_events_info { + integer_t faults; /* number of page faults */ + integer_t pageins; /* number of actual pageins */ + integer_t cow_faults; /* number of copy-on-write faults */ + integer_t messages_sent; /* number of messages sent */ + integer_t messages_received; /* number of messages received */ + integer_t syscalls_mach; /* number of mach system calls */ + integer_t syscalls_unix; /* number of unix system calls */ + integer_t csw; /* number of context switches */ +}; +typedef struct task_events_info task_events_info_data_t; +typedef struct task_events_info *task_events_info_t; +#define TASK_EVENTS_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(task_events_info_data_t) / sizeof(natural_t))) + +#define TASK_THREAD_TIMES_INFO 3 /* total times for live threads - + only accurate if suspended */ + +struct task_thread_times_info { + time_value_t user_time; /* total user run time for + live threads */ + time_value_t system_time; /* total system run time for + live threads */ +}; + +typedef struct task_thread_times_info task_thread_times_info_data_t; +typedef struct task_thread_times_info *task_thread_times_info_t; +#define TASK_THREAD_TIMES_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(task_thread_times_info_data_t) / sizeof(natural_t))) + +#define TASK_ABSOLUTETIME_INFO 1 + +struct task_absolutetime_info { + uint64_t total_user; /* total time */ + uint64_t total_system; + uint64_t threads_user; /* existing threads only */ + uint64_t threads_system; +}; + +typedef struct task_absolutetime_info task_absolutetime_info_data_t; +typedef struct task_absolutetime_info *task_absolutetime_info_t; +#define TASK_ABSOLUTETIME_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof (task_absolutetime_info_data_t) / sizeof (natural_t))) + +#define TASK_SECURITY_TOKEN 13 +#define TASK_SECURITY_TOKEN_COUNT ((mach_msg_type_number_t) \ + (sizeof(security_token_t) / sizeof(natural_t))) + +#define TASK_AUDIT_TOKEN 15 +#define TASK_AUDIT_TOKEN_COUNT \ + (sizeof(audit_token_t) / sizeof(natural_t)) + + +#define TASK_AFFINITY_TAG_INFO 16 /* This is experimental. */ + +struct task_affinity_tag_info { + integer_t set_count; + integer_t min; + integer_t max; + integer_t task_count; +}; +typedef struct task_affinity_tag_info task_affinity_tag_info_data_t; +typedef struct task_affinity_tag_info *task_affinity_tag_info_t; +#define TASK_AFFINITY_TAG_INFO_COUNT \ + (sizeof(task_affinity_tag_info_data_t) / sizeof(natural_t)) + +#define TASK_DYLD_INFO 17 /* This is experimental. */ + +struct task_dyld_info { + mach_vm_address_t all_image_info_addr; + mach_vm_size_t all_image_info_size; +}; +typedef struct task_dyld_info task_dyld_info_data_t; +typedef struct task_dyld_info *task_dyld_info_t; +#define TASK_DYLD_INFO_COUNT \ + (sizeof(task_dyld_info_data_t) / sizeof(natural_t)) + +#pragma pack() + + +/* + * Obsolete interfaces. + */ + +#define TASK_SCHED_TIMESHARE_INFO 10 +#define TASK_SCHED_RR_INFO 11 +#define TASK_SCHED_FIFO_INFO 12 + +#define TASK_SCHED_INFO 14 + +#endif /* _MACH_TASK_INFO_H_ */ diff --git a/i386/include/mach/task_ledger.h b/i386/include/mach/task_ledger.h new file mode 100644 index 0000000..5d4bc25 --- /dev/null +++ b/i386/include/mach/task_ledger.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ + +#ifndef _MACH_TASK_LEDGER_H_ +#define _MACH_TASK_LEDGER_H_ + +/* + * Evolving and likely to change. + */ + +/* + * Definitions for task ledger line items + */ +#define ITEM_THREADS 0 /* number of threads */ +#define ITEM_TASKS 1 /* number of tasks */ + +#define ITEM_VM 2 /* virtual space (bytes)*/ + +#define LEDGER_N_ITEMS 3 /* Total line items */ + +#define LEDGER_UNLIMITED 0 /* ignored item.maximum */ + +#endif /* _MACH_TASK_LEDGER_H_ */ diff --git a/i386/include/mach/task_policy.h b/i386/include/mach/task_policy.h new file mode 100644 index 0000000..3a2fb39 --- /dev/null +++ b/i386/include/mach/task_policy.h @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_TASK_POLICY_H_ +#define _MACH_TASK_POLICY_H_ + +#include <mach/mach_types.h> + +/* + * These are the calls for accessing the policy parameters + * of a particular task. + * + * The extra 'get_default' parameter to the second call is + * IN/OUT as follows: + * 1) if asserted on the way in it indicates that the default + * values should be returned, not the ones currently set, in + * this case 'get_default' will always be asserted on return; + * 2) if unasserted on the way in, the current settings are + * desired and if still unasserted on return, then the info + * returned reflects the current settings, otherwise if + * 'get_default' returns asserted, it means that there are no + * current settings due to other parameters taking precedence, + * and the default ones are being returned instead. + */ + +typedef natural_t task_policy_flavor_t; +typedef integer_t *task_policy_t; + +/* +kern_return_t task_policy_set( + task_t task, + task_policy_flavor_t flavor, + task_policy_t policy_info, + mach_msg_type_number_t count); + +kern_return_t task_policy_get( + task_t task, + task_policy_flavor_t flavor, + task_policy_t policy_info, + mach_msg_type_number_t *count, + boolean_t *get_default); +*/ + +/* + * Defined flavors. + */ +/* + * TASK_CATEGORY_POLICY: + * + * This provides information to the kernel about the role + * of the task in the system. + * + * Parameters: + * + * role: Enumerated as follows: + * + * TASK_UNSPECIFIED is the default, since the role is not + * inherited from the parent. + * + * TASK_FOREGROUND_APPLICATION should be assigned when the + * task is a normal UI application in the foreground from + * the HI point of view. + * **N.B. There may be more than one of these at a given time. + * + * TASK_BACKGROUND_APPLICATION should be assigned when the + * task is a normal UI application in the background from + * the HI point of view. + * + * TASK_CONTROL_APPLICATION should be assigned to the unique + * UI application which implements the pop-up application dialog. + * There can only be one task at a time with this designation, + * which is assigned FCFS. + * + * TASK_GRAPHICS_SERVER should be assigned to the graphics + * management (window) server. There can only be one task at + * a time with this designation, which is assigned FCFS. + */ + +#define TASK_CATEGORY_POLICY 1 + +enum task_role { + TASK_RENICED = -1, + TASK_UNSPECIFIED = 0, + TASK_FOREGROUND_APPLICATION, + TASK_BACKGROUND_APPLICATION, + TASK_CONTROL_APPLICATION, + TASK_GRAPHICS_SERVER, + TASK_THROTTLE_APPLICATION, + TASK_DEFAULT_APPLICATION +}; + +typedef enum task_role task_role_t; + +struct task_category_policy { + task_role_t role; +}; + +typedef struct task_category_policy task_category_policy_data_t; +typedef struct task_category_policy *task_category_policy_t; + +#define TASK_CATEGORY_POLICY_COUNT ((mach_msg_type_number_t) \ + (sizeof (task_category_policy_data_t) / sizeof (integer_t))) + +#endif /* _MACH_TASK_POLICY_H_ */ diff --git a/i386/include/mach/task_special_ports.h b/i386/include/mach/task_special_ports.h new file mode 100644 index 0000000..ec980cf --- /dev/null +++ b/i386/include/mach/task_special_ports.h @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/task_special_ports.h + * + * Defines codes for special_purpose task ports. These are NOT + * port identifiers - they are only used for the task_get_special_port + * and task_set_special_port routines. + * + */ + +#ifndef _MACH_TASK_SPECIAL_PORTS_H_ +#define _MACH_TASK_SPECIAL_PORTS_H_ + +typedef int task_special_port_t; + +#define TASK_KERNEL_PORT 1 /* Represents task to the outside + world.*/ + +#define TASK_HOST_PORT 2 /* The host (priv) port for task. */ + +#define TASK_NAME_PORT 3 /* the name (unpriv) port for task */ + +#define TASK_BOOTSTRAP_PORT 4 /* Bootstrap environment for task. */ + +/* + * Evolving and likely to change. + */ + +#define TASK_WIRED_LEDGER_PORT 5 /* Wired resource ledger for task. */ + +#define TASK_PAGED_LEDGER_PORT 6 /* Paged resource ledger for task. */ + +#define TASK_SEATBELT_PORT 7 /* Seatbelt compiler/DEM port for task. */ + +#define TASK_GSSD_PORT 8 /* GSSD port for security context */ + +#define TASK_ACCESS_PORT 9 /* Permission check for task_for_pid. */ + +#define task_get_wired_ledger_port(task, port) \ + (task_get_special_port((task), TASK_WIRED_LEDGER_PORT, (port))) + +#define task_set_wired_ledger_port(task, port) \ + (task_set_special_port((task), TASK_WIRED_LEDGER_PORT, (port))) + +#define task_get_paged_ledger_port(task, port) \ + (task_get_special_port((task), TASK_PAGED_LEDGER_PORT, (port))) + +#define task_set_paged_ledger_port(task, port) \ + (task_set_special_port((task), TASK_PAGED_LEDGER_PORT, (port))) + +/* + * Definitions for ease of use + */ + +#define task_get_kernel_port(task, port) \ + (task_get_special_port((task), TASK_KERNEL_PORT, (port))) + +#define task_set_kernel_port(task, port) \ + (task_set_special_port((task), TASK_KERNEL_PORT, (port))) + +#define task_get_host_port(task, port) \ + (task_get_special_port((task), TASK_HOST_PORT, (port))) + +#define task_set_host_port(task, port) \ + (task_set_special_port((task), TASK_HOST_PORT, (port))) + +#define task_get_bootstrap_port(task, port) \ + (task_get_special_port((task), TASK_BOOTSTRAP_PORT, (port))) + +#define task_set_bootstrap_port(task, port) \ + (task_set_special_port((task), TASK_BOOTSTRAP_PORT, (port))) + +#define task_get_gssd_port(task, port) \ + (task_get_special_port((task), TASK_GSSD_PORT, (port))) + +#define task_set_gssd_port(task, port) \ + (task_set_special_port((task), TASK_GSSD_PORT, (port))) + +#define task_get_task_access_port(task, port) \ + (task_get_special_port((task), TASK_ACCESS_PORT, (port))) + +#define task_set_task_access_port(task, port) \ + (task_set_special_port((task), TASK_ACCESS_PORT, (port))) + +#endif /* _MACH_TASK_SPECIAL_PORTS_H_ */ diff --git a/i386/include/mach/thread_act.defs b/i386/include/mach/thread_act.defs new file mode 100644 index 0000000..47a21a9 --- /dev/null +++ b/i386/include/mach/thread_act.defs @@ -0,0 +1,323 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_FREE_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/mach_port.defs + * Author: Rich Draves + * + * Exported kernel calls. + */ + +subsystem +#if KERNEL_SERVER + KernelServer +#endif /* KERNEL_SERVER */ + thread_act 3600; + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> + +/* + * Destroy the target thread. + * + * JMM - For legacy reasons this consumes a reference to the + * target thread. This will have to change in the future because + * we want the interfaces to be able to be defined in more standard + * IDLs and transports, and most of them do not support the notion + * of reference ownership transfers (just sharing). + */ +routine thread_terminate( + target_act : thread_act_consume_ref_t); + + +/* + * Return the selected state information for the target + * thr_act. If the thr_act is currently executing, the results + * may be stale. [Flavor THREAD_STATE_FLAVOR_LIST provides a + * list of valid flavors for the target thread.] + */ +routine act_get_state( + target_act : thread_act_t; + flavor : int; + out old_state : thread_state_t, CountInOut); + +/* + * Set the selected state information for the target thread. + * If the thread is currently executing, the state change + * may be ill-defined. + */ +routine act_set_state( + target_act : thread_act_t; + flavor : int; + new_state : thread_state_t); + +/* + * Backward compatible old-style thread routines. + * These have different semantics than the new activation versions. + * + * Return the selected state information for the target + * thread. If the thread is currently executing, the results + * may be stale. [Flavor THREAD_STATE_FLAVOR_LIST provides a + * list of valid flavors for the target thr_act.] + */ +routine thread_get_state( + target_act : thread_act_t; + flavor : thread_state_flavor_t; + out old_state : thread_state_t, CountInOut); + +/* + * Set the selected state information for the target thread. + * If the thread is currently executing, the state change + * may be ill-defined. + */ +routine thread_set_state( + target_act : thread_act_t; + flavor : thread_state_flavor_t; + new_state : thread_state_t); + +/* + * Increment the suspend count for the target thread. + * Once this call has completed, the thread will not + * execute any further user or meta- instructions. + * Once suspended, a thread may not execute again until + * its suspend count is zero, and the suspend count + * for its task is also zero. + */ +routine thread_suspend( + target_act : thread_act_t); + +/* + * Decrement the suspend count for the target thread, + * if that count is not already zero. + */ +routine thread_resume( + target_act : thread_act_t); + +/* + * Cause any user or meta- instructions currently being + * executed by the target thread to be aborted. [Meta- + * instructions consist of the basic traps for IPC + * (e.g., msg_send, msg_receive) and self-identification + * (e.g., task_self, thread_self, thread_reply). Calls + * described by MiG interfaces are not meta-instructions + * themselves.] + */ +routine thread_abort( + target_act : thread_act_t); + +/* + * Cause any user or meta- instructions currently being + * executed by the target thread to be aborted so that + * they are transparently restartable. This call fails + * if the abort would result in a non-restartable condition. + * Retry is the caller's responsibility. [Meta- + * instructions consist of the basic traps for IPC + * (e.g., msg_send, msg_receive) and self-identification + * (e.g., task_self, thread_self, thread_reply). Calls + * described by MiG interfaces are not meta-instructions + * themselves.] + */ +routine thread_abort_safely( + target_act : thread_act_t); + + +routine thread_depress_abort( + thread : thread_act_t); + + +/* + * Returns the current value of the selected special port + * associated with the target thread. + */ +routine thread_get_special_port( + thr_act : thread_act_t; + which_port : int; + out special_port : mach_port_t); + +/* + * Set one of the special ports associated with the + * target thread. + */ +routine thread_set_special_port( + thr_act : thread_act_t; + which_port : int; + special_port : mach_port_t); + +/* + * Returns information about the target thread. + */ +routine thread_info( + target_act : thread_act_t; + flavor : thread_flavor_t; + out thread_info_out : thread_info_t, CountInOut); + +/* + * Set an exception handler for a thread on one or more exception types + */ +routine thread_set_exception_ports( + thread : thread_act_t; + exception_mask : exception_mask_t; + new_port : mach_port_t; + behavior : exception_behavior_t; + new_flavor : thread_state_flavor_t); + +/* + * Lookup some of the old exception handlers for a thread + */ +routine thread_get_exception_ports( + thread : thread_act_t; + exception_mask : exception_mask_t; + out masks : exception_mask_array_t; + out old_handlers : exception_handler_array_t, SameCount; + out old_behaviors : exception_behavior_array_t, SameCount; + out old_flavors : exception_flavor_array_t, SameCount); + +/* + * Set an exception handler for a thread on one or more exception types. + * At the same time, return the previously defined exception handlers for + * those types. + */ +routine thread_swap_exception_ports( + thread : thread_act_t; + exception_mask : exception_mask_t; + new_port : mach_port_t; + behavior : exception_behavior_t; + new_flavor : thread_state_flavor_t; + out masks : exception_mask_array_t; + out old_handlers : exception_handler_array_t, SameCount; + out old_behaviors : exception_behavior_array_t, SameCount; + out old_flavors : exception_flavor_array_t, SameCount); + +/* + * OBSOLETE interface. + */ +routine thread_policy( + thr_act : thread_act_t; + policy : policy_t; + base : policy_base_t; + set_limit : boolean_t); + +/* + * Set/get policy information for a thread. + * (Approved Mac OS X microkernel interface) + */ + +routine thread_policy_set( + thread : thread_act_t; + flavor : thread_policy_flavor_t; + policy_info : thread_policy_t); + +routine thread_policy_get( + thread : thread_act_t; + flavor : thread_policy_flavor_t; +out policy_info : thread_policy_t, CountInOut; +inout get_default : boolean_t); + +/* + * Removed from the kernel. + */ +#if KERNEL_SERVER +skip; +#else +routine thread_sample( + thread : thread_act_t; + reply : mach_port_make_send_t); +#endif + +/* + * ETAP has been removed from the kernel. + */ +#if KERNEL_SERVER +skip; +#else +routine etap_trace_thread( + target_act : thread_act_t; + trace_status : boolean_t); +#endif + +/* + * Assign thread to processor set. + */ +routine thread_assign( + thread : thread_act_t; + new_set : processor_set_t); + +/* + * Assign thread to default set. + */ +routine thread_assign_default( + thread : thread_act_t); + +/* + * Get current assignment for thread. + */ +routine thread_get_assignment( + thread : thread_act_t; + out assigned_set : processor_set_name_t); + + +/* + * OBSOLETE interface. + */ +routine thread_set_policy( + thr_act : thread_act_t; + pset : processor_set_t; + policy : policy_t; + base : policy_base_t; + limit : policy_limit_t); + +/* vim: set ft=c : */ diff --git a/i386/include/mach/thread_act.h b/i386/include/mach/thread_act.h new file mode 100644 index 0000000..ac2309b --- /dev/null +++ b/i386/include/mach/thread_act.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#if defined(__i386__) +#include <mach/i386/thread_act.h> +#elif defined(__x86_64__) +#include <mach/x86_64/thread_act.h> +#elif defined(__ppc__) +#include <mach/ppc/thread_act.h> +#elif defined(__ppc64__) +#include <mach/ppc64/thread_act.h> +#elif defined(__arm__) +#include <mach/arm/thread_act.h> +#else +#error unknown architecture +#endif diff --git a/i386/include/mach/thread_info.h b/i386/include/mach/thread_info.h new file mode 100644 index 0000000..5f51aea --- /dev/null +++ b/i386/include/mach/thread_info.h @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/thread_info + * + * Thread information structure and definitions. + * + * The defintions in this file are exported to the user. The kernel + * will translate its internal data structures to these structures + * as appropriate. + * + */ + +#ifndef _MACH_THREAD_INFO_H_ +#define _MACH_THREAD_INFO_H_ + +#include <mach/boolean.h> +#include <mach/policy.h> +#include <mach/time_value.h> +#include <mach/message.h> +#include <mach/machine/vm_types.h> + +/* + * Generic information structure to allow for expansion. + */ +typedef natural_t thread_flavor_t; +typedef integer_t *thread_info_t; /* varying array of int */ + +#define THREAD_INFO_MAX (1024) /* maximum array size */ +typedef integer_t thread_info_data_t[THREAD_INFO_MAX]; + +/* + * Currently defined information. + */ +#define THREAD_BASIC_INFO 3 /* basic information */ + +struct thread_basic_info { + time_value_t user_time; /* user run time */ + time_value_t system_time; /* system run time */ + integer_t cpu_usage; /* scaled cpu usage percentage */ + policy_t policy; /* scheduling policy in effect */ + integer_t run_state; /* run state (see below) */ + integer_t flags; /* various flags (see below) */ + integer_t suspend_count; /* suspend count for thread */ + integer_t sleep_time; /* number of seconds that thread + has been sleeping */ +}; + +typedef struct thread_basic_info thread_basic_info_data_t; +typedef struct thread_basic_info *thread_basic_info_t; +#define THREAD_BASIC_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(thread_basic_info_data_t) / sizeof(natural_t))) + +#define THREAD_IDENTIFIER_INFO 4 /* thread id and other information */ + +struct thread_identifier_info { + uint64_t thread_id; /* system-wide unique 64-bit thread id */ + uint64_t thread_handle; /* handle to be used by libproc */ + uint64_t dispatch_qaddr; /* libdispatch queue address */ +}; + +typedef struct thread_identifier_info thread_identifier_info_data_t; +typedef struct thread_identifier_info *thread_identifier_info_t; +#define THREAD_IDENTIFIER_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(thread_identifier_info_data_t) / sizeof(natural_t))) + +/* + * Scale factor for usage field. + */ + +#define TH_USAGE_SCALE 1000 + +/* + * Thread run states (state field). + */ + +#define TH_STATE_RUNNING 1 /* thread is running normally */ +#define TH_STATE_STOPPED 2 /* thread is stopped */ +#define TH_STATE_WAITING 3 /* thread is waiting normally */ +#define TH_STATE_UNINTERRUPTIBLE 4 /* thread is in an uninterruptible + wait */ +#define TH_STATE_HALTED 5 /* thread is halted at a + clean point */ + +/* + * Thread flags (flags field). + */ +#define TH_FLAGS_SWAPPED 0x1 /* thread is swapped out */ +#define TH_FLAGS_IDLE 0x2 /* thread is an idle thread */ + +/* + * Obsolete interfaces. + */ + +#define THREAD_SCHED_TIMESHARE_INFO 10 +#define THREAD_SCHED_RR_INFO 11 +#define THREAD_SCHED_FIFO_INFO 12 + +#endif /* _MACH_THREAD_INFO_H_ */ diff --git a/i386/include/mach/thread_policy.h b/i386/include/mach/thread_policy.h new file mode 100644 index 0000000..d9530b7 --- /dev/null +++ b/i386/include/mach/thread_policy.h @@ -0,0 +1,218 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _MACH_THREAD_POLICY_H_ +#define _MACH_THREAD_POLICY_H_ + +#include <mach/mach_types.h> + +/* + * These are the calls for accessing the policy parameters + * of a particular thread. + * + * The extra 'get_default' parameter to the second call is + * IN/OUT as follows: + * 1) if asserted on the way in it indicates that the default + * values should be returned, not the ones currently set, in + * this case 'get_default' will always be asserted on return; + * 2) if unasserted on the way in, the current settings are + * desired and if still unasserted on return, then the info + * returned reflects the current settings, otherwise if + * 'get_default' returns asserted, it means that there are no + * current settings due to other parameters taking precedence, + * and the default ones are being returned instead. + */ + +typedef natural_t thread_policy_flavor_t; +typedef integer_t *thread_policy_t; + +/* +kern_return_t thread_policy_set( + thread_t thread, + thread_policy_flavor_t flavor, + thread_policy_t policy_info, + mach_msg_type_number_t count); + +kern_return_t thread_policy_get( + thread_t thread, + thread_policy_flavor_t flavor, + thread_policy_t policy_info, + mach_msg_type_number_t *count, + boolean_t *get_default); +*/ + +/* + * Defined flavors. + */ +/* + * THREAD_STANDARD_POLICY: + * + * This is the standard (fair) scheduling mode, assigned to new + * threads. The thread will be given processor time in a manner + * which apportions approximately equal share to long running + * computations. + * + * Parameters: + * [none] + */ + +#define THREAD_STANDARD_POLICY 1 + +struct thread_standard_policy { + natural_t no_data; +}; + +typedef struct thread_standard_policy thread_standard_policy_data_t; +typedef struct thread_standard_policy *thread_standard_policy_t; + +#define THREAD_STANDARD_POLICY_COUNT 0 + +/* + * THREAD_EXTENDED_POLICY: + * + * Extended form of THREAD_STANDARD_POLICY, which supplies a + * hint indicating whether this is a long running computation. + * + * Parameters: + * + * timeshare: TRUE (the default) results in identical scheduling + * behavior as THREAD_STANDARD_POLICY. + */ + +#define THREAD_EXTENDED_POLICY 1 + +struct thread_extended_policy { + boolean_t timeshare; +}; + +typedef struct thread_extended_policy thread_extended_policy_data_t; +typedef struct thread_extended_policy *thread_extended_policy_t; + +#define THREAD_EXTENDED_POLICY_COUNT ((mach_msg_type_number_t) \ + (sizeof (thread_extended_policy_data_t) / sizeof (integer_t))) + +/* + * THREAD_TIME_CONSTRAINT_POLICY: + * + * This scheduling mode is for threads which have real time + * constraints on their execution. + * + * Parameters: + * + * period: This is the nominal amount of time between separate + * processing arrivals, specified in absolute time units. A + * value of 0 indicates that there is no inherent periodicity in + * the computation. + * + * computation: This is the nominal amount of computation + * time needed during a separate processing arrival, specified + * in absolute time units. + * + * constraint: This is the maximum amount of real time that + * may elapse from the start of a separate processing arrival + * to the end of computation for logically correct functioning, + * specified in absolute time units. Must be (>= computation). + * Note that latency = (constraint - computation). + * + * preemptible: This indicates that the computation may be + * interrupted, subject to the constraint specified above. + */ + +#define THREAD_TIME_CONSTRAINT_POLICY 2 + +struct thread_time_constraint_policy { + uint32_t period; + uint32_t computation; + uint32_t constraint; + boolean_t preemptible; +}; + +typedef struct thread_time_constraint_policy \ + thread_time_constraint_policy_data_t; +typedef struct thread_time_constraint_policy \ + *thread_time_constraint_policy_t; + +#define THREAD_TIME_CONSTRAINT_POLICY_COUNT ((mach_msg_type_number_t) \ + (sizeof (thread_time_constraint_policy_data_t) / sizeof (integer_t))) + +/* + * THREAD_PRECEDENCE_POLICY: + * + * This may be used to indicate the relative value of the + * computation compared to the other threads in the task. + * + * Parameters: + * + * importance: The importance is specified as a signed value. + */ + +#define THREAD_PRECEDENCE_POLICY 3 + +struct thread_precedence_policy { + integer_t importance; +}; + +typedef struct thread_precedence_policy thread_precedence_policy_data_t; +typedef struct thread_precedence_policy *thread_precedence_policy_t; + +#define THREAD_PRECEDENCE_POLICY_COUNT ((mach_msg_type_number_t) \ + (sizeof (thread_precedence_policy_data_t) / sizeof (integer_t))) + +/* + * THREAD_AFFINITY_POLICY: + * + * This policy is experimental. + * This may be used to express affinity relationships + * between threads in the task. Threads with the same affinity tag will + * be scheduled to share an L2 cache if possible. That is, affinity tags + * are a hint to the scheduler for thread placement. + * + * The namespace of affinity tags is generally local to one task. However, + * a child task created after the assignment of affinity tags by its parent + * will share that namespace. In particular, a family of forked processes + * may be created with a shared affinity namespace. + * + * Parameters: + * tag: The affinity set identifier. + */ + +#define THREAD_AFFINITY_POLICY 4 + +struct thread_affinity_policy { + integer_t affinity_tag; +}; + +#define THREAD_AFFINITY_TAG_NULL 0 + +typedef struct thread_affinity_policy thread_affinity_policy_data_t; +typedef struct thread_affinity_policy *thread_affinity_policy_t; + +#define THREAD_AFFINITY_POLICY_COUNT ((mach_msg_type_number_t) \ + (sizeof (thread_affinity_policy_data_t) / sizeof (integer_t))) + +#endif /* _MACH_THREAD_POLICY_H_ */ diff --git a/i386/include/mach/thread_special_ports.h b/i386/include/mach/thread_special_ports.h new file mode 100644 index 0000000..1d44c02 --- /dev/null +++ b/i386/include/mach/thread_special_ports.h @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/thread_special_ports.h + * + * Defines codes for special_purpose thread ports. These are NOT + * port identifiers - they are only used for the thread_get_special_port + * and thread_set_special_port routines. + * + */ + +#ifndef _MACH_THREAD_SPECIAL_PORTS_H_ +#define _MACH_THREAD_SPECIAL_PORTS_H_ + +#define THREAD_KERNEL_PORT 1 /* Represents the thread to the outside + world.*/ + +/* + * Definitions for ease of use + */ + +#define thread_get_kernel_port(thread, port) \ + (thread_get_special_port((thread), THREAD_KERNEL_PORT, (port))) + +#define thread_set_kernel_port(thread, port) \ + (thread_set_special_port((thread), THREAD_KERNEL_PORT, (port))) + +#endif /* _MACH_THREAD_SPECIAL_PORTS_H_ */ diff --git a/i386/include/mach/thread_status.h b/i386/include/mach/thread_status.h new file mode 100644 index 0000000..aead09b --- /dev/null +++ b/i386/include/mach/thread_status.h @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/thread_status.h + * Author: Avadis Tevanian, Jr. + * + * This file contains the structure definitions for the user-visible + * thread state. This thread state is examined with the thread_get_state + * kernel call and may be changed with the thread_set_state kernel call. + * + */ + +#ifndef _MACH_THREAD_STATUS_H_ +#define _MACH_THREAD_STATUS_H_ + +/* + * The actual structure that comprises the thread state is defined + * in the machine dependent module. + */ +#include <mach/machine/vm_types.h> +#include <mach/machine/thread_status.h> +#include <mach/machine/thread_state.h> + +/* + * Generic definition for machine-dependent thread status. + */ + +typedef natural_t *thread_state_t; /* Variable-length array */ + +/* THREAD_STATE_MAX is now defined in <mach/machine/thread_state.h> */ +typedef natural_t thread_state_data_t[THREAD_STATE_MAX]; + +#define THREAD_STATE_FLAVOR_LIST 0 /* List of valid flavors */ +#define THREAD_STATE_FLAVOR_LIST_NEW 128 + +typedef int thread_state_flavor_t; +typedef thread_state_flavor_t *thread_state_flavor_array_t; + +#endif /* _MACH_THREAD_STATUS_H_ */ diff --git a/i386/include/mach/thread_switch.h b/i386/include/mach/thread_switch.h new file mode 100644 index 0000000..f555894 --- /dev/null +++ b/i386/include/mach/thread_switch.h @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ + +#ifndef _MACH_THREAD_SWITCH_H_ +#define _MACH_THREAD_SWITCH_H_ + +#include <mach/mach_types.h> +#include <mach/kern_return.h> +#include <mach/message.h> +#include <mach/mach_traps.h> + +/* + * Constant definitions for thread_switch trap. + */ + +#define SWITCH_OPTION_NONE 0 +#define SWITCH_OPTION_DEPRESS 1 +#define SWITCH_OPTION_WAIT 2 + +#define valid_switch_option(opt) (0 <= (opt) && (opt) <= 2) + +#endif /* _MACH_THREAD_SWITCH_H_ */ diff --git a/i386/include/mach/time_value.h b/i386/include/mach/time_value.h new file mode 100644 index 0000000..e4f912d --- /dev/null +++ b/i386/include/mach/time_value.h @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ + +#ifndef _MACH_TIME_VALUE_H_ +#define _MACH_TIME_VALUE_H_ + +#include <mach/machine/vm_types.h> + +/* + * Time value returned by kernel. + */ + +struct time_value { + integer_t seconds; + integer_t microseconds; +}; + +typedef struct time_value time_value_t; + +/* + * Macros to manipulate time values. Assume that time values + * are normalized (microseconds <= 999999). + */ +#define TIME_MICROS_MAX (1000000) + +#define time_value_add_usec(val, micros) { \ + if (((val)->microseconds += (micros)) \ + >= TIME_MICROS_MAX) { \ + (val)->microseconds -= TIME_MICROS_MAX; \ + (val)->seconds++; \ + } \ +} + +#define time_value_add(result, addend) { \ + (result)->microseconds += (addend)->microseconds; \ + (result)->seconds += (addend)->seconds; \ + if ((result)->microseconds >= TIME_MICROS_MAX) { \ + (result)->microseconds -= TIME_MICROS_MAX; \ + (result)->seconds++; \ + } \ +} + +#endif /* _MACH_TIME_VALUE_H_ */ diff --git a/i386/include/mach/vm_attributes.h b/i386/include/mach/vm_attributes.h new file mode 100644 index 0000000..2be3233 --- /dev/null +++ b/i386/include/mach/vm_attributes.h @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/vm_attributes.h + * Author: Alessandro Forin + * + * Virtual memory attributes definitions. + * + * These definitions are in addition to the machine-independent + * ones (e.g. protection), and are only selectively supported + * on specific machine architectures. + * + */ + +#ifndef _MACH_VM_ATTRIBUTES_H_ +#define _MACH_VM_ATTRIBUTES_H_ + +/* + * Types of machine-dependent attributes + */ +typedef unsigned int vm_machine_attribute_t; + +#define MATTR_CACHE 1 /* cachability */ +#define MATTR_MIGRATE 2 /* migrability */ +#define MATTR_REPLICATE 4 /* replicability */ + +/* + * Values for the above, e.g. operations on attribute + */ +typedef int vm_machine_attribute_val_t; + +#define MATTR_VAL_OFF 0 /* (generic) turn attribute off */ +#define MATTR_VAL_ON 1 /* (generic) turn attribute on */ +#define MATTR_VAL_GET 2 /* (generic) return current value */ + +#define MATTR_VAL_CACHE_FLUSH 6 /* flush from all caches */ +#define MATTR_VAL_DCACHE_FLUSH 7 /* flush from data caches */ +#define MATTR_VAL_ICACHE_FLUSH 8 /* flush from instruction caches */ +#define MATTR_VAL_CACHE_SYNC 9 /* sync I+D caches */ +#define MATTR_VAL_CACHE_SYNC 9 /* sync I+D caches */ + +#define MATTR_VAL_GET_INFO 10 /* get page info (stats) */ + +#endif /* _MACH_VM_ATTRIBUTES_H_ */ diff --git a/i386/include/mach/vm_behavior.h b/i386/include/mach/vm_behavior.h new file mode 100644 index 0000000..ec0ee72 --- /dev/null +++ b/i386/include/mach/vm_behavior.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * File: mach/vm_behavior.h + * + * Virtual memory map behavior definitions. + * + */ + +#ifndef _MACH_VM_BEHAVIOR_H_ +#define _MACH_VM_BEHAVIOR_H_ + +/* + * Types defined: + * + * vm_behavior_t behavior codes. + */ + +typedef int vm_behavior_t; + +/* + * Enumeration of valid values for vm_behavior_t. + * These describe expected page reference behavior for + * for a given range of virtual memory. For implementation + * details see vm/vm_fault.c + */ + + +/* + * The following behaviors affect the memory region's future behavior + * and are stored in the VM map entry data structure. + */ +#define VM_BEHAVIOR_DEFAULT ((vm_behavior_t) 0) /* default */ +#define VM_BEHAVIOR_RANDOM ((vm_behavior_t) 1) /* random */ +#define VM_BEHAVIOR_SEQUENTIAL ((vm_behavior_t) 2) /* forward sequential */ +#define VM_BEHAVIOR_RSEQNTL ((vm_behavior_t) 3) /* reverse sequential */ + +/* + * The following "behaviors" affect the memory region only at the time of the + * call and are not stored in the VM map entry. + */ +#define VM_BEHAVIOR_WILLNEED ((vm_behavior_t) 4) /* will need in near future */ +#define VM_BEHAVIOR_DONTNEED ((vm_behavior_t) 5) /* dont need in near future */ +#define VM_BEHAVIOR_FREE ((vm_behavior_t) 6) /* free memory without write-back */ +#define VM_BEHAVIOR_ZERO_WIRED_PAGES ((vm_behavior_t) 7) /* zero out the wired pages of an entry if it is being deleted without unwiring them first */ +#define VM_BEHAVIOR_REUSABLE ((vm_behavior_t) 8) +#define VM_BEHAVIOR_REUSE ((vm_behavior_t) 9) +#define VM_BEHAVIOR_CAN_REUSE ((vm_behavior_t) 10) + +#endif /*_MACH_VM_BEHAVIOR_H_*/ diff --git a/i386/include/mach/vm_inherit.h b/i386/include/mach/vm_inherit.h new file mode 100644 index 0000000..d6440e4 --- /dev/null +++ b/i386/include/mach/vm_inherit.h @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/vm_inherit.h + * Author: Avadis Tevanian, Jr., Michael Wayne Young + * + * Virtual memory map inheritance definitions. + * + */ + +#ifndef _MACH_VM_INHERIT_H_ +#define _MACH_VM_INHERIT_H_ + +/* + * Types defined: + * + * vm_inherit_t inheritance codes. + */ + +typedef unsigned int vm_inherit_t; /* might want to change this */ + +/* + * Enumeration of valid values for vm_inherit_t. + */ + +#define VM_INHERIT_SHARE ((vm_inherit_t) 0) /* share with child */ +#define VM_INHERIT_COPY ((vm_inherit_t) 1) /* copy into child */ +#define VM_INHERIT_NONE ((vm_inherit_t) 2) /* absent from child */ +#define VM_INHERIT_DONATE_COPY ((vm_inherit_t) 3) /* copy and delete */ + +#define VM_INHERIT_DEFAULT VM_INHERIT_COPY +#define VM_INHERIT_LAST_VALID VM_INHERIT_NONE + +#endif /* _MACH_VM_INHERIT_H_ */ diff --git a/i386/include/mach/vm_map.defs b/i386/include/mach/vm_map.defs new file mode 100644 index 0000000..439c014 --- /dev/null +++ b/i386/include/mach/vm_map.defs @@ -0,0 +1,475 @@ +/* + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_FREE_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/vm_map.defs + * + * Exported (native-sized) kernel VM calls. + */ + +subsystem +#if KERNEL_SERVER + KernelServer +#endif /* KERNEL_SERVER */ + vm_map 3800; + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> +#include <mach_debug/mach_debug_types.defs> + +/* + * Returns information about the contents of the virtual + * address space of the target task at the specified + * address. The returned protection, inheritance, sharing + * and memory object values apply to the entire range described + * by the address range returned; the memory object offset + * corresponds to the beginning of the address range. + * [If the specified address is not allocated, the next + * highest address range is described. If no addresses beyond + * the one specified are allocated, the call returns KERN_NO_SPACE.] + */ +routine vm_region( + target_task : vm_map_t; + inout address : vm_address_t; + out size : vm_size_t; + flavor : vm_region_flavor_t; + out info : vm_region_info_t, CountInOut; + out object_name : memory_object_name_t = + MACH_MSG_TYPE_MOVE_SEND + ctype: mach_port_t); + +/* + * Allocate zero-filled memory in the address space + * of the target task, either at the specified address, + * or wherever space can be found (if anywhere is TRUE), + * of the specified size. The address at which the + * allocation actually took place is returned. + */ +routine vm_allocate( + target_task : vm_task_entry_t; + inout address : vm_address_t; + size : vm_size_t; + flags : int); + +/* + * Deallocate the specified range from the virtual + * address space of the target task. + */ +routine vm_deallocate( + target_task : vm_task_entry_t; + address : vm_address_t; + size : vm_size_t); + +/* + * Set the current or maximum protection attribute + * for the specified range of the virtual address + * space of the target task. The current protection + * limits the memory access rights of threads within + * the task; the maximum protection limits the accesses + * that may be given in the current protection. + * Protections are specified as a set of {read, write, execute} + * *permissions*. + */ +routine vm_protect( + target_task : vm_task_entry_t; + address : vm_address_t; + size : vm_size_t; + set_maximum : boolean_t; + new_protection : vm_prot_t); + +/* + * Set the inheritance attribute for the specified range + * of the virtual address space of the target task. + * The inheritance value is one of {none, copy, share}, and + * specifies how the child address space should acquire + * this memory at the time of a task_create call. + */ +routine vm_inherit( + target_task : vm_task_entry_t; + address : vm_address_t; + size : vm_size_t; + new_inheritance : vm_inherit_t); + +/* + * Returns the contents of the specified range of the + * virtual address space of the target task. [The + * range must be aligned on a virtual page boundary, + * and must be a multiple of pages in extent. The + * protection on the specified range must permit reading.] + */ +routine vm_read( + target_task : vm_map_t; + address : vm_address_t; + size : vm_size_t; + out data : pointer_t); + +/* + * List corrollary to vm_read, returns mapped contents of specified + * ranges within target address space. + */ +routine vm_read_list( + target_task : vm_map_t; + inout data_list : vm_read_entry_t; + count : natural_t); + +/* + * Writes the contents of the specified range of the + * virtual address space of the target task. [The + * range must be aligned on a virtual page boundary, + * and must be a multiple of pages in extent. The + * protection on the specified range must permit writing.] + */ +routine vm_write( + target_task : vm_map_t; + address : vm_address_t; + data : pointer_t); + +/* + * Copy the contents of the source range of the virtual + * address space of the target task to the destination + * range in that same address space. [Both of the + * ranges must be aligned on a virtual page boundary, + * and must be multiples of pages in extent. The + * protection on the source range must permit reading, + * and the protection on the destination range must + * permit writing.] + */ +routine vm_copy( + target_task : vm_map_t; + source_address : vm_address_t; + size : vm_size_t; + dest_address : vm_address_t); + +/* + * Returns the contents of the specified range of the + * virtual address space of the target task. [There + * are no alignment restrictions, and the results will + * overwrite the area pointed to by data - which must + * already exist. The protection on the specified range + * must permit reading.] + */ +routine vm_read_overwrite( + target_task : vm_map_t; + address : vm_address_t; + size : vm_size_t; + data : vm_address_t; + out outsize : vm_size_t); + + +routine vm_msync( + target_task : vm_map_t; + address : vm_address_t; + size : vm_size_t; + sync_flags : vm_sync_t ); + +/* + * Set the paging behavior attribute for the specified range + * of the virtual address space of the target task. + * The behavior value is one of {default, random, forward + * sequential, reverse sequential} and indicates the expected + * page reference pattern for the specified range. + */ +routine vm_behavior_set( + target_task : vm_map_t; + address : vm_address_t; + size : vm_size_t; + new_behavior : vm_behavior_t); + + +/* + * Map a user-defined memory object into the virtual address + * space of the target task. If desired (anywhere is TRUE), + * the kernel will find a suitable address range of the + * specified size; else, the specific address will be allocated. + * + * The beginning address of the range will be aligned on a virtual + * page boundary, be at or beyond the address specified, and + * meet the mask requirements (bits turned on in the mask must not + * be turned on in the result); the size of the range, in bytes, + * will be rounded up to an integral number of virtual pages. + * + * The memory in the resulting range will be associated with the + * specified memory object, with the beginning of the memory range + * referring to the specified offset into the memory object. + * + * The mapping will take the current and maximum protections and + * the inheritance attributes specified; see the vm_protect and + * vm_inherit calls for a description of these attributes. + * + * If desired (copy is TRUE), the memory range will be filled + * with a copy of the data from the memory object; this copy will + * be private to this mapping in this target task. Otherwise, + * the memory in this mapping will be shared with other mappings + * of the same memory object at the same offset (in this task or + * in other tasks). [The Mach kernel only enforces shared memory + * consistency among mappings on one host with similar page alignments. + * The user-defined memory manager for this object is responsible + * for further consistency.] + */ +routine vm_map( + target_task : vm_task_entry_t; + inout address : vm_address_t; + size : vm_size_t; + mask : vm_address_t; + flags : int; + object : mem_entry_name_port_t; + offset : vm_offset_t; + copy : boolean_t; + cur_protection : vm_prot_t; + max_protection : vm_prot_t; + inheritance : vm_inherit_t); + +/* + * Set/Get special properties of memory associated + * to some virtual address range, such as cachability, + * migrability, replicability. Machine-dependent. + */ +routine vm_machine_attribute( + target_task : vm_map_t; + address : vm_address_t; + size : vm_size_t; + attribute : vm_machine_attribute_t; + inout value : vm_machine_attribute_val_t); + +/* + * Map portion of a task's address space. + */ +routine vm_remap( + target_task : vm_map_t; + inout target_address : vm_address_t; + size : vm_size_t; + mask : vm_address_t; + anywhere : boolean_t; + src_task : vm_map_t; + src_address : vm_address_t; + copy : boolean_t; + out cur_protection : vm_prot_t; + out max_protection : vm_prot_t; + inheritance : vm_inherit_t); + +/* + * Require that all future virtual memory allocation + * allocates wired memory. Setting must_wire to FALSE + * disables the wired future feature. + */ +routine task_wire( + target_task : vm_map_t; + must_wire : boolean_t); + + +/* + * Allow application level processes to create named entries which + * correspond to mapped portions of their address space. These named + * entries can then be manipulated, shared with other processes in + * other address spaces and ultimately mapped in ohter address spaces + */ + +routine mach_make_memory_entry( + target_task :vm_map_t; + inout size :vm_size_t; + offset :vm_offset_t; + permission :vm_prot_t; + out object_handle :mem_entry_name_port_move_send_t; + parent_entry :mem_entry_name_port_t); + +/* + * Give the caller information on the given location in a virtual + * address space. If a page is mapped return ref and dirty info. + */ +routine vm_map_page_query( + target_map :vm_map_t; + offset :vm_offset_t; + out disposition :integer_t; + out ref_count :integer_t); + +/* + * Returns information about a region of memory. + * Includes info about the chain of objects rooted at that region. + * Only available in MACH_VM_DEBUG compiled kernels, + * otherwise returns KERN_FAILURE. + */ +routine mach_vm_region_info( + task : vm_map_t; + address : vm_address_t; + out region : vm_info_region_t; + out objects : vm_info_object_array_t); + +routine vm_mapped_pages_info( + task : vm_map_t; + out pages : page_address_array_t); + +#if 0 +/* + * Allow application level processes to create named entries which + * are backed by sub-maps which describe regions of address space. + * These regions of space can have objects mapped into them and + * in turn, can be mapped into target address spaces + */ + +routine vm_region_object_create( + target_task :vm_map_t; + in size :vm_size_t; + out region_object :mach_port_move_send_t); +#else +skip; /* was vm_region_object_create */ +#endif + +/* + * A recursive form of vm_region which probes submaps withint the + * address space. + */ +routine vm_region_recurse( + target_task : vm_map_t; + inout address : vm_address_t; + out size : vm_size_t; + inout nesting_depth : natural_t; + out info : vm_region_recurse_info_t,CountInOut); + + +/* + * The routines below are temporary, meant for transitional use + * as their counterparts are moved from 32 to 64 bit data path + */ + + +routine vm_region_recurse_64( + target_task : vm_map_t; + inout address : vm_address_t; + out size : vm_size_t; + inout nesting_depth : natural_t; + out info : vm_region_recurse_info_t,CountInOut); + +routine mach_vm_region_info_64( + task : vm_map_t; + address : vm_address_t; + out region : vm_info_region_64_t; + out objects : vm_info_object_array_t); + +routine vm_region_64( + target_task : vm_map_t; + inout address : vm_address_t; + out size : vm_size_t; + flavor : vm_region_flavor_t; + out info : vm_region_info_t, CountInOut; + out object_name : memory_object_name_t = + MACH_MSG_TYPE_MOVE_SEND + ctype: mach_port_t); + +routine mach_make_memory_entry_64( + target_task :vm_map_t; + inout size :memory_object_size_t; + offset :memory_object_offset_t; + permission :vm_prot_t; + out object_handle :mach_port_move_send_t; + parent_entry :mem_entry_name_port_t); + + + +routine vm_map_64( + target_task : vm_task_entry_t; + inout address : vm_address_t; + size : vm_size_t; + mask : vm_address_t; + flags : int; + object : mem_entry_name_port_t; + offset : memory_object_offset_t; + copy : boolean_t; + cur_protection : vm_prot_t; + max_protection : vm_prot_t; + inheritance : vm_inherit_t); + +#if 0 +/* + * The UPL interfaces are not ready for user-level export. + */ +routine vm_map_get_upl( + target_task : vm_map_t; + address : vm_map_offset_t; + inout size : vm_size_t; + out upl : upl_t; + out page_info : upl_page_info_array_t, CountInOut; + inout flags : integer_t; + force_data_sync : integer_t); + +routine vm_upl_map( + target_task : vm_map_t; + upl : upl_t; + inout address : vm_address_t); + +routine vm_upl_unmap( + target_task : vm_map_t; + upl : upl_t); +#else +skip; /* was vm_map_get_upl */ +skip; /* was vm_upl_map */ +skip; /* was vm_upl_unmap */ +#endif + +/* + * Control behavior and investigate state of a "purgable" object in + * the virtual address space of the target task. A purgable object is + * created via a call to vm_allocate() with VM_FLAGS_PURGABLE + * specified. See the routine implementation for a complete + * definition of the routine. + */ +routine vm_purgable_control( + target_task : vm_map_t; + address : vm_address_t; + control : vm_purgable_t; + inout state : int); + +/* vim: set ft=c : */ diff --git a/i386/include/mach/vm_map.h b/i386/include/mach/vm_map.h new file mode 100644 index 0000000..1ed28fb --- /dev/null +++ b/i386/include/mach/vm_map.h @@ -0,0 +1,1378 @@ +#ifndef _vm_map_user_ +#define _vm_map_user_ + +/* Module vm_map */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef vm_map_MSG_COUNT +#define vm_map_MSG_COUNT 31 +#endif /* vm_map_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mach_types.h> +#include <mach_debug/mach_debug_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine vm_region */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_region +( + vm_map_t target_task, + vm_address_t *address, + vm_size_t *size, + vm_region_flavor_t flavor, + vm_region_info_t info, + mach_msg_type_number_t *infoCnt, + mach_port_t *object_name +); + +/* Routine vm_allocate */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_allocate +( + vm_map_t target_task, + vm_address_t *address, + vm_size_t size, + int flags +); + +/* Routine vm_deallocate */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_deallocate +( + vm_map_t target_task, + vm_address_t address, + vm_size_t size +); + +/* Routine vm_protect */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_protect +( + vm_map_t target_task, + vm_address_t address, + vm_size_t size, + boolean_t set_maximum, + vm_prot_t new_protection +); + +/* Routine vm_inherit */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_inherit +( + vm_map_t target_task, + vm_address_t address, + vm_size_t size, + vm_inherit_t new_inheritance +); + +/* Routine vm_read */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_read +( + vm_map_t target_task, + vm_address_t address, + vm_size_t size, + vm_offset_t *data, + mach_msg_type_number_t *dataCnt +); + +/* Routine vm_read_list */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_read_list +( + vm_map_t target_task, + vm_read_entry_t data_list, + natural_t count +); + +/* Routine vm_write */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_write +( + vm_map_t target_task, + vm_address_t address, + vm_offset_t data, + mach_msg_type_number_t dataCnt +); + +/* Routine vm_copy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_copy +( + vm_map_t target_task, + vm_address_t source_address, + vm_size_t size, + vm_address_t dest_address +); + +/* Routine vm_read_overwrite */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_read_overwrite +( + vm_map_t target_task, + vm_address_t address, + vm_size_t size, + vm_address_t data, + vm_size_t *outsize +); + +/* Routine vm_msync */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_msync +( + vm_map_t target_task, + vm_address_t address, + vm_size_t size, + vm_sync_t sync_flags +); + +/* Routine vm_behavior_set */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_behavior_set +( + vm_map_t target_task, + vm_address_t address, + vm_size_t size, + vm_behavior_t new_behavior +); + +/* Routine vm_map */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_map +( + vm_map_t target_task, + vm_address_t *address, + vm_size_t size, + vm_address_t mask, + int flags, + mem_entry_name_port_t object, + vm_offset_t offset, + boolean_t copy, + vm_prot_t cur_protection, + vm_prot_t max_protection, + vm_inherit_t inheritance +); + +/* Routine vm_machine_attribute */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_machine_attribute +( + vm_map_t target_task, + vm_address_t address, + vm_size_t size, + vm_machine_attribute_t attribute, + vm_machine_attribute_val_t *value +); + +/* Routine vm_remap */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_remap +( + vm_map_t target_task, + vm_address_t *target_address, + vm_size_t size, + vm_address_t mask, + boolean_t anywhere, + vm_map_t src_task, + vm_address_t src_address, + boolean_t copy, + vm_prot_t *cur_protection, + vm_prot_t *max_protection, + vm_inherit_t inheritance +); + +/* Routine task_wire */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_wire +( + vm_map_t target_task, + boolean_t must_wire +); + +/* Routine mach_make_memory_entry */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_make_memory_entry +( + vm_map_t target_task, + vm_size_t *size, + vm_offset_t offset, + vm_prot_t permission, + mem_entry_name_port_t *object_handle, + mem_entry_name_port_t parent_entry +); + +/* Routine vm_map_page_query */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_map_page_query +( + vm_map_t target_map, + vm_offset_t offset, + integer_t *disposition, + integer_t *ref_count +); + +/* Routine mach_vm_region_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_region_info +( + vm_map_t task, + vm_address_t address, + vm_info_region_t *region, + vm_info_object_array_t *objects, + mach_msg_type_number_t *objectsCnt +); + +/* Routine vm_mapped_pages_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_mapped_pages_info +( + vm_map_t task, + page_address_array_t *pages, + mach_msg_type_number_t *pagesCnt +); + +/* Routine vm_region_recurse */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_region_recurse +( + vm_map_t target_task, + vm_address_t *address, + vm_size_t *size, + natural_t *nesting_depth, + vm_region_recurse_info_t info, + mach_msg_type_number_t *infoCnt +); + +/* Routine vm_region_recurse_64 */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_region_recurse_64 +( + vm_map_t target_task, + vm_address_t *address, + vm_size_t *size, + natural_t *nesting_depth, + vm_region_recurse_info_t info, + mach_msg_type_number_t *infoCnt +); + +/* Routine mach_vm_region_info_64 */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_vm_region_info_64 +( + vm_map_t task, + vm_address_t address, + vm_info_region_64_t *region, + vm_info_object_array_t *objects, + mach_msg_type_number_t *objectsCnt +); + +/* Routine vm_region_64 */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_region_64 +( + vm_map_t target_task, + vm_address_t *address, + vm_size_t *size, + vm_region_flavor_t flavor, + vm_region_info_t info, + mach_msg_type_number_t *infoCnt, + mach_port_t *object_name +); + +/* Routine mach_make_memory_entry_64 */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_make_memory_entry_64 +( + vm_map_t target_task, + memory_object_size_t *size, + memory_object_offset_t offset, + vm_prot_t permission, + mach_port_t *object_handle, + mem_entry_name_port_t parent_entry +); + +/* Routine vm_map_64 */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_map_64 +( + vm_map_t target_task, + vm_address_t *address, + vm_size_t size, + vm_address_t mask, + int flags, + mem_entry_name_port_t object, + memory_object_offset_t offset, + boolean_t copy, + vm_prot_t cur_protection, + vm_prot_t max_protection, + vm_inherit_t inheritance +); + +/* Routine vm_purgable_control */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t vm_purgable_control +( + vm_map_t target_task, + vm_address_t address, + vm_purgable_t control, + int *state +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__vm_map_subsystem__defined +#define __Request__vm_map_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t address; + vm_region_flavor_t flavor; + mach_msg_type_number_t infoCnt; + } __Request__vm_region_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t address; + vm_size_t size; + int flags; + } __Request__vm_allocate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t address; + vm_size_t size; + } __Request__vm_deallocate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t address; + vm_size_t size; + boolean_t set_maximum; + vm_prot_t new_protection; + } __Request__vm_protect_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t address; + vm_size_t size; + vm_inherit_t new_inheritance; + } __Request__vm_inherit_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t address; + vm_size_t size; + } __Request__vm_read_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_read_entry_t data_list; + natural_t count; + } __Request__vm_read_list_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t data; + /* end of the kernel processed data */ + NDR_record_t NDR; + vm_address_t address; + mach_msg_type_number_t dataCnt; + } __Request__vm_write_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t source_address; + vm_size_t size; + vm_address_t dest_address; + } __Request__vm_copy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t address; + vm_size_t size; + vm_address_t data; + } __Request__vm_read_overwrite_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t address; + vm_size_t size; + vm_sync_t sync_flags; + } __Request__vm_msync_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t address; + vm_size_t size; + vm_behavior_t new_behavior; + } __Request__vm_behavior_set_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t object; + /* end of the kernel processed data */ + NDR_record_t NDR; + vm_address_t address; + vm_size_t size; + vm_address_t mask; + int flags; + vm_offset_t offset; + boolean_t copy; + vm_prot_t cur_protection; + vm_prot_t max_protection; + vm_inherit_t inheritance; + } __Request__vm_map_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t address; + vm_size_t size; + vm_machine_attribute_t attribute; + vm_machine_attribute_val_t value; + } __Request__vm_machine_attribute_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t src_task; + /* end of the kernel processed data */ + NDR_record_t NDR; + vm_address_t target_address; + vm_size_t size; + vm_address_t mask; + boolean_t anywhere; + vm_address_t src_address; + boolean_t copy; + vm_inherit_t inheritance; + } __Request__vm_remap_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + boolean_t must_wire; + } __Request__task_wire_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t parent_entry; + /* end of the kernel processed data */ + NDR_record_t NDR; + vm_size_t size; + vm_offset_t offset; + vm_prot_t permission; + } __Request__mach_make_memory_entry_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_offset_t offset; + } __Request__vm_map_page_query_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t address; + } __Request__mach_vm_region_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__vm_mapped_pages_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t address; + natural_t nesting_depth; + mach_msg_type_number_t infoCnt; + } __Request__vm_region_recurse_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t address; + natural_t nesting_depth; + mach_msg_type_number_t infoCnt; + } __Request__vm_region_recurse_64_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t address; + } __Request__mach_vm_region_info_64_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t address; + vm_region_flavor_t flavor; + mach_msg_type_number_t infoCnt; + } __Request__vm_region_64_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t parent_entry; + /* end of the kernel processed data */ + NDR_record_t NDR; + memory_object_size_t size; + memory_object_offset_t offset; + vm_prot_t permission; + } __Request__mach_make_memory_entry_64_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t object; + /* end of the kernel processed data */ + NDR_record_t NDR; + vm_address_t address; + vm_size_t size; + vm_address_t mask; + int flags; + memory_object_offset_t offset; + boolean_t copy; + vm_prot_t cur_protection; + vm_prot_t max_protection; + vm_inherit_t inheritance; + } __Request__vm_map_64_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t address; + vm_purgable_t control; + int state; + } __Request__vm_purgable_control_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__vm_map_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__vm_map_subsystem__defined +#define __RequestUnion__vm_map_subsystem__defined +union __RequestUnion__vm_map_subsystem { + __Request__vm_region_t Request_vm_region; + __Request__vm_allocate_t Request_vm_allocate; + __Request__vm_deallocate_t Request_vm_deallocate; + __Request__vm_protect_t Request_vm_protect; + __Request__vm_inherit_t Request_vm_inherit; + __Request__vm_read_t Request_vm_read; + __Request__vm_read_list_t Request_vm_read_list; + __Request__vm_write_t Request_vm_write; + __Request__vm_copy_t Request_vm_copy; + __Request__vm_read_overwrite_t Request_vm_read_overwrite; + __Request__vm_msync_t Request_vm_msync; + __Request__vm_behavior_set_t Request_vm_behavior_set; + __Request__vm_map_t Request_vm_map; + __Request__vm_machine_attribute_t Request_vm_machine_attribute; + __Request__vm_remap_t Request_vm_remap; + __Request__task_wire_t Request_task_wire; + __Request__mach_make_memory_entry_t Request_mach_make_memory_entry; + __Request__vm_map_page_query_t Request_vm_map_page_query; + __Request__mach_vm_region_info_t Request_mach_vm_region_info; + __Request__vm_mapped_pages_info_t Request_vm_mapped_pages_info; + __Request__vm_region_recurse_t Request_vm_region_recurse; + __Request__vm_region_recurse_64_t Request_vm_region_recurse_64; + __Request__mach_vm_region_info_64_t Request_mach_vm_region_info_64; + __Request__vm_region_64_t Request_vm_region_64; + __Request__mach_make_memory_entry_64_t Request_mach_make_memory_entry_64; + __Request__vm_map_64_t Request_vm_map_64; + __Request__vm_purgable_control_t Request_vm_purgable_control; +}; +#endif /* !__RequestUnion__vm_map_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__vm_map_subsystem__defined +#define __Reply__vm_map_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t object_name; + /* end of the kernel processed data */ + NDR_record_t NDR; + vm_address_t address; + vm_size_t size; + mach_msg_type_number_t infoCnt; + int info[10]; + } __Reply__vm_region_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + vm_address_t address; + } __Reply__vm_allocate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__vm_deallocate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__vm_protect_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__vm_inherit_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t data; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t dataCnt; + } __Reply__vm_read_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + vm_read_entry_t data_list; + } __Reply__vm_read_list_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__vm_write_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__vm_copy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + vm_size_t outsize; + } __Reply__vm_read_overwrite_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__vm_msync_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__vm_behavior_set_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + vm_address_t address; + } __Reply__vm_map_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + vm_machine_attribute_val_t value; + } __Reply__vm_machine_attribute_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + vm_address_t target_address; + vm_prot_t cur_protection; + vm_prot_t max_protection; + } __Reply__vm_remap_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_wire_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t object_handle; + /* end of the kernel processed data */ + NDR_record_t NDR; + vm_size_t size; + } __Reply__mach_make_memory_entry_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + integer_t disposition; + integer_t ref_count; + } __Reply__vm_map_page_query_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t objects; + /* end of the kernel processed data */ + NDR_record_t NDR; + vm_info_region_t region; + mach_msg_type_number_t objectsCnt; + } __Reply__mach_vm_region_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t pages; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t pagesCnt; + } __Reply__vm_mapped_pages_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + vm_address_t address; + vm_size_t size; + natural_t nesting_depth; + mach_msg_type_number_t infoCnt; + int info[19]; + } __Reply__vm_region_recurse_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + vm_address_t address; + vm_size_t size; + natural_t nesting_depth; + mach_msg_type_number_t infoCnt; + int info[19]; + } __Reply__vm_region_recurse_64_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t objects; + /* end of the kernel processed data */ + NDR_record_t NDR; + vm_info_region_64_t region; + mach_msg_type_number_t objectsCnt; + } __Reply__mach_vm_region_info_64_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t object_name; + /* end of the kernel processed data */ + NDR_record_t NDR; + vm_address_t address; + vm_size_t size; + mach_msg_type_number_t infoCnt; + int info[10]; + } __Reply__vm_region_64_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t object_handle; + /* end of the kernel processed data */ + NDR_record_t NDR; + memory_object_size_t size; + } __Reply__mach_make_memory_entry_64_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + vm_address_t address; + } __Reply__vm_map_64_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + int state; + } __Reply__vm_purgable_control_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__vm_map_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__vm_map_subsystem__defined +#define __ReplyUnion__vm_map_subsystem__defined +union __ReplyUnion__vm_map_subsystem { + __Reply__vm_region_t Reply_vm_region; + __Reply__vm_allocate_t Reply_vm_allocate; + __Reply__vm_deallocate_t Reply_vm_deallocate; + __Reply__vm_protect_t Reply_vm_protect; + __Reply__vm_inherit_t Reply_vm_inherit; + __Reply__vm_read_t Reply_vm_read; + __Reply__vm_read_list_t Reply_vm_read_list; + __Reply__vm_write_t Reply_vm_write; + __Reply__vm_copy_t Reply_vm_copy; + __Reply__vm_read_overwrite_t Reply_vm_read_overwrite; + __Reply__vm_msync_t Reply_vm_msync; + __Reply__vm_behavior_set_t Reply_vm_behavior_set; + __Reply__vm_map_t Reply_vm_map; + __Reply__vm_machine_attribute_t Reply_vm_machine_attribute; + __Reply__vm_remap_t Reply_vm_remap; + __Reply__task_wire_t Reply_task_wire; + __Reply__mach_make_memory_entry_t Reply_mach_make_memory_entry; + __Reply__vm_map_page_query_t Reply_vm_map_page_query; + __Reply__mach_vm_region_info_t Reply_mach_vm_region_info; + __Reply__vm_mapped_pages_info_t Reply_vm_mapped_pages_info; + __Reply__vm_region_recurse_t Reply_vm_region_recurse; + __Reply__vm_region_recurse_64_t Reply_vm_region_recurse_64; + __Reply__mach_vm_region_info_64_t Reply_mach_vm_region_info_64; + __Reply__vm_region_64_t Reply_vm_region_64; + __Reply__mach_make_memory_entry_64_t Reply_mach_make_memory_entry_64; + __Reply__vm_map_64_t Reply_vm_map_64; + __Reply__vm_purgable_control_t Reply_vm_purgable_control; +}; +#endif /* !__RequestUnion__vm_map_subsystem__defined */ + +#ifndef subsystem_to_name_map_vm_map +#define subsystem_to_name_map_vm_map \ + { "vm_region", 3800 },\ + { "vm_allocate", 3801 },\ + { "vm_deallocate", 3802 },\ + { "vm_protect", 3803 },\ + { "vm_inherit", 3804 },\ + { "vm_read", 3805 },\ + { "vm_read_list", 3806 },\ + { "vm_write", 3807 },\ + { "vm_copy", 3808 },\ + { "vm_read_overwrite", 3809 },\ + { "vm_msync", 3810 },\ + { "vm_behavior_set", 3811 },\ + { "vm_map", 3812 },\ + { "vm_machine_attribute", 3813 },\ + { "vm_remap", 3814 },\ + { "task_wire", 3815 },\ + { "mach_make_memory_entry", 3816 },\ + { "vm_map_page_query", 3817 },\ + { "mach_vm_region_info", 3818 },\ + { "vm_mapped_pages_info", 3819 },\ + { "vm_region_recurse", 3821 },\ + { "vm_region_recurse_64", 3822 },\ + { "mach_vm_region_info_64", 3823 },\ + { "vm_region_64", 3824 },\ + { "mach_make_memory_entry_64", 3825 },\ + { "vm_map_64", 3826 },\ + { "vm_purgable_control", 3830 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _vm_map_user_ */ diff --git a/i386/include/mach/vm_param.h b/i386/include/mach/vm_param.h new file mode 100644 index 0000000..9a87873 --- /dev/null +++ b/i386/include/mach/vm_param.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/vm_param.h + * Author: Avadis Tevanian, Jr., Michael Wayne Young + * Date: 1985 + * + * Machine independent virtual memory parameters. + * + */ + +#ifndef _MACH_VM_PARAM_H_ +#define _MACH_VM_PARAM_H_ + +#include <mach/machine/vm_param.h> + + +#endif /* _MACH_VM_PARAM_H_ */ diff --git a/i386/include/mach/vm_prot.h b/i386/include/mach/vm_prot.h new file mode 100644 index 0000000..6fe17d4 --- /dev/null +++ b/i386/include/mach/vm_prot.h @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/vm_prot.h + * Author: Avadis Tevanian, Jr., Michael Wayne Young + * + * Virtual memory protection definitions. + * + */ + +#ifndef _MACH_VM_PROT_H_ +#define _MACH_VM_PROT_H_ + +/* + * Types defined: + * + * vm_prot_t VM protection values. + */ + +typedef int vm_prot_t; + +/* + * Protection values, defined as bits within the vm_prot_t type + */ + +#define VM_PROT_NONE ((vm_prot_t) 0x00) + +#define VM_PROT_READ ((vm_prot_t) 0x01) /* read permission */ +#define VM_PROT_WRITE ((vm_prot_t) 0x02) /* write permission */ +#define VM_PROT_EXECUTE ((vm_prot_t) 0x04) /* execute permission */ + +/* + * The default protection for newly-created virtual memory + */ + +#define VM_PROT_DEFAULT (VM_PROT_READ|VM_PROT_WRITE) + +/* + * The maximum privileges possible, for parameter checking. + */ + +#define VM_PROT_ALL (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE) + +/* + * An invalid protection value. + * Used only by memory_object_lock_request to indicate no change + * to page locks. Using -1 here is a bad idea because it + * looks like VM_PROT_ALL and then some. + */ + +#define VM_PROT_NO_CHANGE ((vm_prot_t) 0x08) + +/* + * When a caller finds that he cannot obtain write permission on a + * mapped entry, the following flag can be used. The entry will + * be made "needs copy" effectively copying the object (using COW), + * and write permission will be added to the maximum protections + * for the associated entry. + */ + +#define VM_PROT_COPY ((vm_prot_t) 0x10) + + +/* + * Another invalid protection value. + * Used only by memory_object_data_request upon an object + * which has specified a copy_call copy strategy. It is used + * when the kernel wants a page belonging to a copy of the + * object, and is only asking the object as a result of + * following a shadow chain. This solves the race between pages + * being pushed up by the memory manager and the kernel + * walking down the shadow chain. + */ + +#define VM_PROT_WANTS_COPY ((vm_prot_t) 0x10) + + +/* + * The caller wants this memory region treated as if it had a valid + * code signature. + */ + +#define VM_PROT_TRUSTED ((vm_prot_t) 0x20) + + +#endif /* _MACH_VM_PROT_H_ */ diff --git a/i386/include/mach/vm_purgable.h b/i386/include/mach/vm_purgable.h new file mode 100644 index 0000000..2d8ca30 --- /dev/null +++ b/i386/include/mach/vm_purgable.h @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2003-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +/* + * Virtual memory map purgeable object definitions. + * Objects that will be needed in the future (forward cached objects) should be queued LIFO. + * Objects that have been used and are cached for reuse (backward cached) should be queued FIFO. + * Every user of purgeable memory is entitled to using the highest volatile group (7). + * Only if a client wants some of its objects to definitely be purged earlier, it can put those in + * another group. This could be used to make all FIFO objects (in the lower group) go away before + * any LIFO objects (in the higher group) go away. + * Objects that should not get any chance to stay around can be marked as "obsolete". They will + * be emptied before any other objects or pages are reclaimed. Obsolete objects are not emptied + * in any particular order. + * 'purgeable' is recognized as the correct spelling. For historical reasons, definitions + * in this file are spelled 'purgable'. + */ + +#ifndef _MACH_VM_PURGABLE_H_ +#define _MACH_VM_PURGABLE_H_ + +/* + * Types defined: + * + * vm_purgable_t purgeable object control codes. + */ + +typedef int vm_purgable_t; + +/* + * Enumeration of valid values for vm_purgable_t. + */ +#define VM_PURGABLE_SET_STATE ((vm_purgable_t) 0) /* set state of purgeable object */ +#define VM_PURGABLE_GET_STATE ((vm_purgable_t) 1) /* get state of purgeable object */ +#define VM_PURGABLE_PURGE_ALL ((vm_purgable_t) 2) /* purge all volatile objects now */ + +#define VM_PURGABLE_DEBUG_SHIFT 12 +#define VM_PURGABLE_DEBUG_MASK (0x3 << VM_PURGABLE_DEBUG_SHIFT) +#define VM_PURGABLE_DEBUG_EMPTY (0x1 << VM_PURGABLE_DEBUG_SHIFT) +#define VM_PURGABLE_DEBUG_FAULT (0x2 << VM_PURGABLE_DEBUG_SHIFT) + +/* + * Volatile memory ordering groups (group zero objects are purged before group 1, etc... + * It is implementation dependent as to whether these groups are global or per-address space. + * (for the moment, they are global). + */ +#define VM_VOLATILE_GROUP_SHIFT 8 +#define VM_VOLATILE_GROUP_MASK (7 << VM_VOLATILE_GROUP_SHIFT) +#define VM_VOLATILE_GROUP_DEFAULT VM_VOLATILE_GROUP_7 + +#define VM_VOLATILE_GROUP_0 (0 << VM_VOLATILE_GROUP_SHIFT) +#define VM_VOLATILE_GROUP_1 (1 << VM_VOLATILE_GROUP_SHIFT) +#define VM_VOLATILE_GROUP_2 (2 << VM_VOLATILE_GROUP_SHIFT) +#define VM_VOLATILE_GROUP_3 (3 << VM_VOLATILE_GROUP_SHIFT) +#define VM_VOLATILE_GROUP_4 (4 << VM_VOLATILE_GROUP_SHIFT) +#define VM_VOLATILE_GROUP_5 (5 << VM_VOLATILE_GROUP_SHIFT) +#define VM_VOLATILE_GROUP_6 (6 << VM_VOLATILE_GROUP_SHIFT) +#define VM_VOLATILE_GROUP_7 (7 << VM_VOLATILE_GROUP_SHIFT) + +/* + * Purgeable behavior + * Within the same group, FIFO objects will be emptied before objects that are added later. + * LIFO objects will be emptied after objects that are added later. + * - Input only, not returned on state queries. + */ +#define VM_PURGABLE_BEHAVIOR_SHIFT 6 +#define VM_PURGABLE_BEHAVIOR_MASK (1 << VM_PURGABLE_BEHAVIOR_SHIFT) +#define VM_PURGABLE_BEHAVIOR_FIFO (0 << VM_PURGABLE_BEHAVIOR_SHIFT) +#define VM_PURGABLE_BEHAVIOR_LIFO (1 << VM_PURGABLE_BEHAVIOR_SHIFT) + +/* + * Obsolete object. + * Disregard volatile group, and put object into obsolete queue instead, so it is the next object + * to be purged. + * - Input only, not returned on state queries. + */ +#define VM_PURGABLE_ORDERING_SHIFT 5 +#define VM_PURGABLE_ORDERING_MASK (1 << VM_PURGABLE_ORDERING_SHIFT) +#define VM_PURGABLE_ORDERING_OBSOLETE (1 << VM_PURGABLE_ORDERING_SHIFT) +#define VM_PURGABLE_ORDERING_NORMAL (0 << VM_PURGABLE_ORDERING_SHIFT) + + +/* + * Obsolete parameter - do not use + */ +#define VM_VOLATILE_ORDER_SHIFT 4 +#define VM_VOLATILE_ORDER_MASK (1 << VM_VOLATILE_ORDER_SHIFT) +#define VM_VOLATILE_MAKE_FIRST_IN_GROUP (1 << VM_VOLATILE_ORDER_SHIFT) +#define VM_VOLATILE_MAKE_LAST_IN_GROUP (0 << VM_VOLATILE_ORDER_SHIFT) + +/* + * Valid states of a purgeable object. + */ +#define VM_PURGABLE_STATE_MIN 0 /* minimum purgeable object state value */ +#define VM_PURGABLE_STATE_MAX 3 /* maximum purgeable object state value */ +#define VM_PURGABLE_STATE_MASK 3 /* mask to separate state from group */ + +#define VM_PURGABLE_NONVOLATILE 0 /* purgeable object is non-volatile */ +#define VM_PURGABLE_VOLATILE 1 /* purgeable object is volatile */ +#define VM_PURGABLE_EMPTY 2 /* purgeable object is volatile and empty */ +#define VM_PURGABLE_DENY 3 /* (mark) object not purgeable */ + +#define VM_PURGABLE_ALL_MASKS (VM_PURGABLE_STATE_MASK | \ + VM_VOLATILE_ORDER_MASK | \ + VM_PURGABLE_ORDERING_MASK | \ + VM_PURGABLE_BEHAVIOR_MASK | \ + VM_VOLATILE_GROUP_MASK | \ + VM_PURGABLE_DEBUG_MASK) +#endif /* _MACH_VM_PURGABLE_H_ */ diff --git a/i386/include/mach/vm_region.h b/i386/include/mach/vm_region.h new file mode 100644 index 0000000..ceb42b7 --- /dev/null +++ b/i386/include/mach/vm_region.h @@ -0,0 +1,320 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * File: mach/vm_region.h + * + * Define the attributes of a task's memory region + * + */ + +#ifndef _MACH_VM_REGION_H_ +#define _MACH_VM_REGION_H_ + +#include <mach/boolean.h> +#include <mach/vm_prot.h> +#include <mach/vm_inherit.h> +#include <mach/vm_behavior.h> +#include <mach/vm_types.h> +#include <mach/message.h> +#include <mach/machine/vm_param.h> +#include <mach/machine/vm_types.h> +#include <mach/memory_object_types.h> + +#include <sys/cdefs.h> + +#pragma pack(4) + +// LP64todo: all the current tools are 32bit, obviously never worked for 64b +// so probably should be a real 32b ID vs. ptr. +// Current users just check for equality +typedef uint32_t vm32_object_id_t; + +/* + * Types defined: + * + * vm_region_info_t memory region attributes + */ + +#define VM_REGION_INFO_MAX (1024) +typedef int *vm_region_info_t; +typedef int *vm_region_info_64_t; +typedef int *vm_region_recurse_info_t; +typedef int *vm_region_recurse_info_64_t; +typedef int vm_region_flavor_t; +typedef int vm_region_info_data_t[VM_REGION_INFO_MAX]; + +#define VM_REGION_BASIC_INFO_64 9 +struct vm_region_basic_info_64 { + vm_prot_t protection; + vm_prot_t max_protection; + vm_inherit_t inheritance; + boolean_t shared; + boolean_t reserved; + memory_object_offset_t offset; + vm_behavior_t behavior; + unsigned short user_wired_count; +}; +typedef struct vm_region_basic_info_64 *vm_region_basic_info_64_t; +typedef struct vm_region_basic_info_64 vm_region_basic_info_data_64_t; + +#define VM_REGION_BASIC_INFO_COUNT_64 ((mach_msg_type_number_t) \ + (sizeof(vm_region_basic_info_data_64_t)/sizeof(int))) + +/* + * Passing VM_REGION_BASIC_INFO to vm_region_64 + * automatically converts it to a VM_REGION_BASIC_INFO_64. + * Please use that explicitly instead. + */ +#define VM_REGION_BASIC_INFO 10 + +/* + * This is the legacy basic info structure. It is + * deprecated because it passes only a 32-bit memory object + * offset back - too small for many larger objects (e.g. files). + */ +struct vm_region_basic_info { + vm_prot_t protection; + vm_prot_t max_protection; + vm_inherit_t inheritance; + boolean_t shared; + boolean_t reserved; + uint32_t offset; /* too small for a real offset */ + vm_behavior_t behavior; + unsigned short user_wired_count; +}; + +typedef struct vm_region_basic_info *vm_region_basic_info_t; +typedef struct vm_region_basic_info vm_region_basic_info_data_t; + +#define VM_REGION_BASIC_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(vm_region_basic_info_data_t)/sizeof(int))) + +#define VM_REGION_EXTENDED_INFO 11 + +#define SM_COW 1 +#define SM_PRIVATE 2 +#define SM_EMPTY 3 +#define SM_SHARED 4 +#define SM_TRUESHARED 5 +#define SM_PRIVATE_ALIASED 6 +#define SM_SHARED_ALIASED 7 + +/* + * For submap info, the SM flags above are overlayed when a submap + * is encountered. The field denotes whether or not machine level mapping + * information is being shared. PTE's etc. When such sharing is taking + * place the value returned is SM_TRUESHARED otherwise SM_PRIVATE is passed + * back. + */ + +struct vm_region_extended_info { + vm_prot_t protection; + unsigned int user_tag; + unsigned int pages_resident; + unsigned int pages_shared_now_private; + unsigned int pages_swapped_out; + unsigned int pages_dirtied; + unsigned int ref_count; + unsigned short shadow_depth; + unsigned char external_pager; + unsigned char share_mode; +}; + +typedef struct vm_region_extended_info *vm_region_extended_info_t; +typedef struct vm_region_extended_info vm_region_extended_info_data_t; + +#define VM_REGION_EXTENDED_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(vm_region_extended_info_data_t)/sizeof(int))) + + +#define VM_REGION_TOP_INFO 12 + +struct vm_region_top_info { + unsigned int obj_id; + unsigned int ref_count; + unsigned int private_pages_resident; + unsigned int shared_pages_resident; + unsigned char share_mode; +}; + +typedef struct vm_region_top_info *vm_region_top_info_t; +typedef struct vm_region_top_info vm_region_top_info_data_t; + +#define VM_REGION_TOP_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(vm_region_top_info_data_t)/sizeof(int))) + + + +/* + * vm_region_submap_info will return information on a submap or object. + * The user supplies a nesting level on the call. When a walk of the + * user's map is done and a submap is encountered, the nesting count is + * checked. If the nesting count is greater than 1 the submap is entered and + * the offset relative to the address in the base map is examined. If the + * nesting count is zero, the information on the submap is returned. + * The caller may thus learn about a submap and its contents by judicious + * choice of the base map address and nesting count. The nesting count + * allows penetration of recursively mapped submaps. If a submap is + * encountered as a mapped entry of another submap, the caller may bump + * the nesting count and call vm_region_recurse again on the target address + * range. The "is_submap" field tells the caller whether or not a submap + * has been encountered. + * + * Object only fields are filled in through a walking of the object shadow + * chain (where one is present), and a walking of the resident page queue. + * + */ + +struct vm_region_submap_info { + vm_prot_t protection; /* present access protection */ + vm_prot_t max_protection; /* max avail through vm_prot */ + vm_inherit_t inheritance;/* behavior of map/obj on fork */ + uint32_t offset; /* offset into object/map */ + unsigned int user_tag; /* user tag on map entry */ + unsigned int pages_resident; /* only valid for objects */ + unsigned int pages_shared_now_private; /* only for objects */ + unsigned int pages_swapped_out; /* only for objects */ + unsigned int pages_dirtied; /* only for objects */ + unsigned int ref_count; /* obj/map mappers, etc */ + unsigned short shadow_depth; /* only for obj */ + unsigned char external_pager; /* only for obj */ + unsigned char share_mode; /* see enumeration */ + boolean_t is_submap; /* submap vs obj */ + vm_behavior_t behavior; /* access behavior hint */ + vm32_object_id_t object_id; /* obj/map name, not a handle */ + unsigned short user_wired_count; +}; + +typedef struct vm_region_submap_info *vm_region_submap_info_t; +typedef struct vm_region_submap_info vm_region_submap_info_data_t; + +#define VM_REGION_SUBMAP_INFO_COUNT ((mach_msg_type_number_t) \ + (sizeof(vm_region_submap_info_data_t)/sizeof(int))) + +struct vm_region_submap_info_64 { + vm_prot_t protection; /* present access protection */ + vm_prot_t max_protection; /* max avail through vm_prot */ + vm_inherit_t inheritance;/* behavior of map/obj on fork */ + memory_object_offset_t offset; /* offset into object/map */ + unsigned int user_tag; /* user tag on map entry */ + unsigned int pages_resident; /* only valid for objects */ + unsigned int pages_shared_now_private; /* only for objects */ + unsigned int pages_swapped_out; /* only for objects */ + unsigned int pages_dirtied; /* only for objects */ + unsigned int ref_count; /* obj/map mappers, etc */ + unsigned short shadow_depth; /* only for obj */ + unsigned char external_pager; /* only for obj */ + unsigned char share_mode; /* see enumeration */ + boolean_t is_submap; /* submap vs obj */ + vm_behavior_t behavior; /* access behavior hint */ + vm32_object_id_t object_id; /* obj/map name, not a handle */ + unsigned short user_wired_count; +}; + +typedef struct vm_region_submap_info_64 *vm_region_submap_info_64_t; +typedef struct vm_region_submap_info_64 vm_region_submap_info_data_64_t; + +#define VM_REGION_SUBMAP_INFO_COUNT_64 ((mach_msg_type_number_t) \ + (sizeof(vm_region_submap_info_data_64_t)/sizeof(int))) + +struct vm_region_submap_short_info_64 { + vm_prot_t protection; /* present access protection */ + vm_prot_t max_protection; /* max avail through vm_prot */ + vm_inherit_t inheritance;/* behavior of map/obj on fork */ + memory_object_offset_t offset; /* offset into object/map */ + unsigned int user_tag; /* user tag on map entry */ + unsigned int ref_count; /* obj/map mappers, etc */ + unsigned short shadow_depth; /* only for obj */ + unsigned char external_pager; /* only for obj */ + unsigned char share_mode; /* see enumeration */ + boolean_t is_submap; /* submap vs obj */ + vm_behavior_t behavior; /* access behavior hint */ + vm32_object_id_t object_id; /* obj/map name, not a handle */ + unsigned short user_wired_count; +}; + +typedef struct vm_region_submap_short_info_64 *vm_region_submap_short_info_64_t; +typedef struct vm_region_submap_short_info_64 vm_region_submap_short_info_data_64_t; + +#define VM_REGION_SUBMAP_SHORT_INFO_COUNT_64 ((mach_msg_type_number_t) \ + (sizeof(vm_region_submap_short_info_data_64_t)/sizeof(int))) + + +struct mach_vm_read_entry { + mach_vm_address_t address; + mach_vm_size_t size; +}; + +struct vm_read_entry { + vm_address_t address; + vm_size_t size; +}; + +#if VM32_SUPPORT +struct vm32_read_entry { + vm32_address_t address; + vm32_size_t size; +}; +#endif + + +#define VM_MAP_ENTRY_MAX (256) + +typedef struct mach_vm_read_entry mach_vm_read_entry_t[VM_MAP_ENTRY_MAX]; +typedef struct vm_read_entry vm_read_entry_t[VM_MAP_ENTRY_MAX]; +#if VM32_SUPPORT +typedef struct vm32_read_entry vm32_read_entry_t[VM_MAP_ENTRY_MAX]; +#endif + +#pragma pack() + + +#define VM_PAGE_INFO_MAX +typedef int *vm_page_info_t; +typedef int vm_page_info_data_t[VM_PAGE_INFO_MAX]; +typedef int vm_page_info_flavor_t; + +#define VM_PAGE_INFO_BASIC 1 +struct vm_page_info_basic { + int disposition; + int ref_count; + vm_object_id_t object_id; + memory_object_offset_t offset; + int depth; +}; +typedef struct vm_page_info_basic *vm_page_info_basic_t; +typedef struct vm_page_info_basic vm_page_info_basic_data_t; + +#define VM_PAGE_INFO_BASIC_COUNT ((mach_msg_type_number_t) \ + (sizeof(vm_page_info_basic_data_t)/sizeof(int))) + + +#endif /*_MACH_VM_REGION_H_*/ diff --git a/i386/include/mach/vm_statistics.h b/i386/include/mach/vm_statistics.h new file mode 100644 index 0000000..016a1c2 --- /dev/null +++ b/i386/include/mach/vm_statistics.h @@ -0,0 +1,335 @@ +/* + * Copyright (c) 2000-2009 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + */ +/* + * File: mach/vm_statistics.h + * Author: Avadis Tevanian, Jr., Michael Wayne Young, David Golub + * + * Virtual memory statistics structure. + * + */ + +#ifndef _MACH_VM_STATISTICS_H_ +#define _MACH_VM_STATISTICS_H_ + +#include <mach/machine/vm_types.h> + + +/* + * vm_statistics + * + * History: + * rev0 - original structure. + * rev1 - added purgable info (purgable_count and purges). + * rev2 - added speculative_count. + * + * Note: you cannot add any new fields to this structure. Add them below in + * vm_statistics64. + */ + +struct vm_statistics { + natural_t free_count; /* # of pages free */ + natural_t active_count; /* # of pages active */ + natural_t inactive_count; /* # of pages inactive */ + natural_t wire_count; /* # of pages wired down */ + natural_t zero_fill_count; /* # of zero fill pages */ + natural_t reactivations; /* # of pages reactivated */ + natural_t pageins; /* # of pageins */ + natural_t pageouts; /* # of pageouts */ + natural_t faults; /* # of faults */ + natural_t cow_faults; /* # of copy-on-writes */ + natural_t lookups; /* object cache lookups */ + natural_t hits; /* object cache hits */ + + /* added for rev1 */ + natural_t purgeable_count; /* # of pages purgeable */ + natural_t purges; /* # of pages purged */ + + /* added for rev2 */ + /* + * NB: speculative pages are already accounted for in "free_count", + * so "speculative_count" is the number of "free" pages that are + * used to hold data that was read speculatively from disk but + * haven't actually been used by anyone so far. + */ + natural_t speculative_count; /* # of pages speculative */ +}; + +/* Used by all architectures */ +typedef struct vm_statistics *vm_statistics_t; +typedef struct vm_statistics vm_statistics_data_t; + +#if defined(__ppc__) /* On ppc, vm statistics are still 32-bit */ + +typedef struct vm_statistics *vm_statistics64_t; +typedef struct vm_statistics vm_statistics64_data_t; + +#define VM_STATISTICS_TRUNCATE_TO_32_BIT(value) value + +#else /* !(defined(__ppc__)) */ + +/* + * vm_statistics64 + * + * History: + * rev0 - original structure. + * rev1 - added purgable info (purgable_count and purges). + * rev2 - added speculative_count. + * ---- + * rev3 - changed name to vm_statistics64. + * changed some fields in structure to 64-bit on + * arm, i386 and x86_64 architectures. + * + */ + +struct vm_statistics64 { + natural_t free_count; /* # of pages free */ + natural_t active_count; /* # of pages active */ + natural_t inactive_count; /* # of pages inactive */ + natural_t wire_count; /* # of pages wired down */ + uint64_t zero_fill_count; /* # of zero fill pages */ + uint64_t reactivations; /* # of pages reactivated */ + uint64_t pageins; /* # of pageins */ + uint64_t pageouts; /* # of pageouts */ + uint64_t faults; /* # of faults */ + uint64_t cow_faults; /* # of copy-on-writes */ + uint64_t lookups; /* object cache lookups */ + uint64_t hits; /* object cache hits */ + + /* added for rev1 */ + uint64_t purges; /* # of pages purged */ + natural_t purgeable_count; /* # of pages purgeable */ + + /* added for rev2 */ + /* + * NB: speculative pages are already accounted for in "free_count", + * so "speculative_count" is the number of "free" pages that are + * used to hold data that was read speculatively from disk but + * haven't actually been used by anyone so far. + */ + natural_t speculative_count; /* # of pages speculative */ + +} +#ifdef __arm__ +__attribute__((aligned(8))) +#endif +; + +typedef struct vm_statistics64 *vm_statistics64_t; +typedef struct vm_statistics64 vm_statistics64_data_t; + +/* + * VM_STATISTICS_TRUNCATE_TO_32_BIT + * + * This is used by host_statistics() to truncate and peg the 64-bit in-kernel values from + * vm_statistics64 to the 32-bit values of the older structure above (vm_statistics). + */ +#define VM_STATISTICS_TRUNCATE_TO_32_BIT(value) ((uint32_t)(((value) > UINT32_MAX ) ? UINT32_MAX : (value))) + +#endif /* !(defined(__ppc__)) */ + + +/* included for the vm_map_page_query call */ + +#define VM_PAGE_QUERY_PAGE_PRESENT 0x1 +#define VM_PAGE_QUERY_PAGE_FICTITIOUS 0x2 +#define VM_PAGE_QUERY_PAGE_REF 0x4 +#define VM_PAGE_QUERY_PAGE_DIRTY 0x8 +#define VM_PAGE_QUERY_PAGE_PAGED_OUT 0x10 +#define VM_PAGE_QUERY_PAGE_COPIED 0x20 +#define VM_PAGE_QUERY_PAGE_SPECULATIVE 0x40 +#define VM_PAGE_QUERY_PAGE_EXTERNAL 0x80 +#define VM_PAGE_QUERY_PAGE_CS_VALIDATED 0x100 +#define VM_PAGE_QUERY_PAGE_CS_TAINTED 0x200 + + +/* + * VM allocation flags: + * + * VM_FLAGS_FIXED + * (really the absence of VM_FLAGS_ANYWHERE) + * Allocate new VM region at the specified virtual address, if possible. + * + * VM_FLAGS_ANYWHERE + * Allocate new VM region anywhere it would fit in the address space. + * + * VM_FLAGS_PURGABLE + * Create a purgable VM object for that new VM region. + * + * VM_FLAGS_NO_PMAP_CHECK + * (for DEBUG kernel config only, ignored for other configs) + * Do not check that there is no stale pmap mapping for the new VM region. + * This is useful for kernel memory allocations at bootstrap when building + * the initial kernel address space while some memory is already in use. + * + * VM_FLAGS_OVERWRITE + * The new VM region can replace existing VM regions if necessary + * (to be used in combination with VM_FLAGS_FIXED). + * + * VM_FLAGS_NO_CACHE + * Pages brought in to this VM region are placed on the speculative + * queue instead of the active queue. In other words, they are not + * cached so that they will be stolen first if memory runs low. + */ +#define VM_FLAGS_FIXED 0x0000 +#define VM_FLAGS_ANYWHERE 0x0001 +#define VM_FLAGS_PURGABLE 0x0002 +#define VM_FLAGS_NO_CACHE 0x0010 + +/* + * VM_FLAGS_SUPERPAGE_MASK + * 3 bits that specify whether large pages should be used instead of + * base pages (!=0), as well as the requested page size. + */ +#define VM_FLAGS_SUPERPAGE_MASK 0x70000 /* bits 0x10000, 0x20000, 0x40000 */ +#define VM_FLAGS_SUPERPAGE_SHIFT 16 + +#define SUPERPAGE_NONE 0 /* no superpages, if all bits are 0 */ +#define VM_FLAGS_SUPERPAGE_NONE (SUPERPAGE_NONE<<VM_FLAGS_SUPERPAGE_SHIFT) +#if defined(__x86_64__) || !defined(KERNEL) +#define SUPERPAGE_SIZE_2MB 1 +#define VM_FLAGS_SUPERPAGE_SIZE_2MB (SUPERPAGE_SIZE_2MB<<VM_FLAGS_SUPERPAGE_SHIFT) +#endif + +#define VM_FLAGS_ALIAS_MASK 0xFF000000 +#define VM_GET_FLAGS_ALIAS(flags, alias) \ + (alias) = ((flags) & VM_FLAGS_ALIAS_MASK) >> 24 +#define VM_SET_FLAGS_ALIAS(flags, alias) \ + (flags) = (((flags) & ~VM_FLAGS_ALIAS_MASK) | \ + (((alias) & ~VM_FLAGS_ALIAS_MASK) << 24)) + +/* These are the flags that we accept from user-space */ +#define VM_FLAGS_USER_ALLOCATE (VM_FLAGS_FIXED | \ + VM_FLAGS_ANYWHERE | \ + VM_FLAGS_PURGABLE | \ + VM_FLAGS_NO_CACHE | \ + VM_FLAGS_SUPERPAGE_MASK | \ + VM_FLAGS_ALIAS_MASK) +#define VM_FLAGS_USER_MAP VM_FLAGS_USER_ALLOCATE + +#define VM_MEMORY_MALLOC 1 +#define VM_MEMORY_MALLOC_SMALL 2 +#define VM_MEMORY_MALLOC_LARGE 3 +#define VM_MEMORY_MALLOC_HUGE 4 +#define VM_MEMORY_SBRK 5// uninteresting -- no one should call +#define VM_MEMORY_REALLOC 6 +#define VM_MEMORY_MALLOC_TINY 7 +#define VM_MEMORY_MALLOC_LARGE_REUSABLE 8 +#define VM_MEMORY_MALLOC_LARGE_REUSED 9 + +#define VM_MEMORY_ANALYSIS_TOOL 10 + +#define VM_MEMORY_MACH_MSG 20 +#define VM_MEMORY_IOKIT 21 +#define VM_MEMORY_STACK 30 +#define VM_MEMORY_GUARD 31 +#define VM_MEMORY_SHARED_PMAP 32 +/* memory containing a dylib */ +#define VM_MEMORY_DYLIB 33 +#define VM_MEMORY_OBJC_DISPATCHERS 34 + +// Placeholders for now -- as we analyze the libraries and find how they +// use memory, we can make these labels more specific. +#define VM_MEMORY_APPKIT 40 +#define VM_MEMORY_FOUNDATION 41 +#define VM_MEMORY_COREGRAPHICS 42 +#define VM_MEMORY_CARBON 43 +#define VM_MEMORY_JAVA 44 +#define VM_MEMORY_ATS 50 +#define VM_MEMORY_LAYERKIT 51 +#define VM_MEMORY_CGIMAGE 52 +#define VM_MEMORY_TCMALLOC 53 + +/* private raster data (i.e. layers, some images, QGL allocator) */ +#define VM_MEMORY_COREGRAPHICS_DATA 54 + +/* shared image and font caches */ +#define VM_MEMORY_COREGRAPHICS_SHARED 55 + +/* Memory used for virtual framebuffers, shadowing buffers, etc... */ +#define VM_MEMORY_COREGRAPHICS_FRAMEBUFFERS 56 + +/* Window backing stores, custom shadow data, and compressed backing stores */ +#define VM_MEMORY_COREGRAPHICS_BACKINGSTORES 57 + +/* catch-all for other uses, such as the read-only shared data page */ +#define VM_MEMORY_COREGRAPHICS_MISC VM_MEMORY_COREGRAPHICS + +/* memory allocated by the dynamic loader for itself */ +#define VM_MEMORY_DYLD 60 +/* malloc'd memory created by dyld */ +#define VM_MEMORY_DYLD_MALLOC 61 + +/* Used for sqlite page cache */ +#define VM_MEMORY_SQLITE 62 + +/* JavaScriptCore heaps */ +#define VM_MEMORY_JAVASCRIPT_CORE 63 +/* memory allocated for the JIT */ +#define VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR 64 +#define VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE 65 + +/* memory allocated for GLSL */ +#define VM_MEMORY_GLSL 66 + +/* Reserve 240-255 for application */ +#define VM_MEMORY_APPLICATION_SPECIFIC_1 240 +#define VM_MEMORY_APPLICATION_SPECIFIC_16 255 + +#define VM_MAKE_TAG(tag) ((tag) << 24) + +#endif /* _MACH_VM_STATISTICS_H_ */ diff --git a/i386/include/mach/vm_sync.h b/i386/include/mach/vm_sync.h new file mode 100644 index 0000000..dfb948b --- /dev/null +++ b/i386/include/mach/vm_sync.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + */ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * File: mach/vm_sync.h + * + * Virtual memory synchronisation definitions. + * + */ + +#ifndef _MACH_VM_SYNC_H_ +#define _MACH_VM_SYNC_H_ + +typedef unsigned vm_sync_t; + +/* + * Synchronization flags, defined as bits within the vm_sync_t type + */ + +#define VM_SYNC_ASYNCHRONOUS ((vm_sync_t) 0x01) +#define VM_SYNC_SYNCHRONOUS ((vm_sync_t) 0x02) +#define VM_SYNC_INVALIDATE ((vm_sync_t) 0x04) +#define VM_SYNC_KILLPAGES ((vm_sync_t) 0x08) +#define VM_SYNC_DEACTIVATE ((vm_sync_t) 0x10) +#define VM_SYNC_CONTIGUOUS ((vm_sync_t) 0x20) +#define VM_SYNC_REUSABLEPAGES ((vm_sync_t) 0x40) + +#endif /* _MACH_VM_SYNC_H_ */ diff --git a/i386/include/mach/vm_task.h b/i386/include/mach/vm_task.h new file mode 100644 index 0000000..d2401ac --- /dev/null +++ b/i386/include/mach/vm_task.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* +** This file contains compatibilty wrapper header for things that are +** generated from mach/vm_map.defs into mach/vm_map.h. +** +** This file will go away eventually - please switch. +*/ +#include <mach/vm_map.h> diff --git a/i386/include/mach/vm_types.h b/i386/include/mach/vm_types.h new file mode 100644 index 0000000..37f4bd5 --- /dev/null +++ b/i386/include/mach/vm_types.h @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * @OSF_COPYRIGHT@ + * + */ +#ifndef _MACH_VM_TYPES_H_ +#define _MACH_VM_TYPES_H_ + +#include <mach/port.h> +#include <mach/machine/vm_types.h> + +#include <stdint.h> + +typedef vm_offset_t pointer_t; +typedef vm_offset_t vm_address_t; + +/* + * We use addr64_t for 64-bit addresses that are used on both + * 32 and 64-bit machines. On PPC, they are passed and returned as + * two adjacent 32-bit GPRs. We use addr64_t in places where + * common code must be useable both on 32 and 64-bit machines. + */ +typedef uint64_t addr64_t; /* Basic effective address */ + +/* + * We use reg64_t for addresses that are 32 bits on a 32-bit + * machine, and 64 bits on a 64-bit machine, but are always + * passed and returned in a single GPR on PPC. This type + * cannot be used in generic 32-bit c, since on a 64-bit + * machine the upper half of the register will be ignored + * by the c compiler in 32-bit mode. In c, we can only use the + * type in prototypes of functions that are written in and called + * from assembly language. This type is basically a comment. + */ +typedef uint32_t reg64_t; + +/* + * To minimize the use of 64-bit fields, we keep some physical + * addresses (that are page aligned) as 32-bit page numbers. + * This limits the physical address space to 16TB of RAM. + */ +typedef uint32_t ppnum_t; /* Physical page number */ +#define PPNUM_MAX UINT32_MAX + + + +typedef mach_port_t vm_map_t; + + +#define VM_MAP_NULL ((vm_map_t) 0) + +/* + * Evolving definitions, likely to change. + */ + +typedef uint64_t vm_object_offset_t; +typedef uint64_t vm_object_size_t; + + +typedef mach_port_t upl_t; +typedef mach_port_t vm_named_entry_t; + + +#define UPL_NULL ((upl_t) 0) +#define VM_NAMED_ENTRY_NULL ((vm_named_entry_t) 0) + +#endif /* _MACH_VM_TYPES_H_ */ diff --git a/i386/include/mach/x86_64/.svn/all-wcprops b/i386/include/mach/x86_64/.svn/all-wcprops new file mode 100644 index 0000000..c569814 --- /dev/null +++ b/i386/include/mach/x86_64/.svn/all-wcprops @@ -0,0 +1,17 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/chameleon/!svn/ver/881/trunk/i386/include/mach/x86_64 +END +thread_act.h +K 25 +svn:wc:ra_dav:version-url +V 71 +/svn/chameleon/!svn/ver/881/trunk/i386/include/mach/x86_64/thread_act.h +END +task.h +K 25 +svn:wc:ra_dav:version-url +V 65 +/svn/chameleon/!svn/ver/881/trunk/i386/include/mach/x86_64/task.h +END diff --git a/i386/include/mach/x86_64/.svn/entries b/i386/include/mach/x86_64/.svn/entries new file mode 100644 index 0000000..0636f47 --- /dev/null +++ b/i386/include/mach/x86_64/.svn/entries @@ -0,0 +1,96 @@ +10 + +dir +2117 +http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/mach/x86_64 +http://forge.voodooprojects.org/svn/chameleon + + + +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + +b5af796a-00a8-11df-919b-ffff7a100b7d + +thread_act.h +file + + + + +2012-10-03T17:50:21.000000Z +25d845f2e915a195e887ae48026bf854 +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +25654 + +task.h +file + + + + +2012-10-03T17:50:21.000000Z +d87c8dd8a5baf21d6cd2fb7fd2c6775d +2011-05-26T03:34:29.106114Z +881 +meklort + + + + + + + + + + + + + + + + + + + + + +34704 + diff --git a/i386/include/mach/x86_64/.svn/text-base/task.h.svn-base b/i386/include/mach/x86_64/.svn/text-base/task.h.svn-base new file mode 100644 index 0000000..15c8248 --- /dev/null +++ b/i386/include/mach/x86_64/.svn/text-base/task.h.svn-base @@ -0,0 +1,1578 @@ +#ifndef _task_user_ +#define _task_user_ + +/* Module task */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef task_MSG_COUNT +#define task_MSG_COUNT 35 +#endif /* task_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mig.h> +#include <mach/mach_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine task_create */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_create +( + task_t target_task, + ledger_array_t ledgers, + mach_msg_type_number_t ledgersCnt, + boolean_t inherit_memory, + task_t *child_task +); + +/* Routine task_terminate */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_terminate +( + task_t target_task +); + +/* Routine task_threads */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_threads +( + task_t target_task, + thread_act_array_t *act_list, + mach_msg_type_number_t *act_listCnt +); + +/* Routine mach_ports_register */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_ports_register +( + task_t target_task, + mach_port_array_t init_port_set, + mach_msg_type_number_t init_port_setCnt +); + +/* Routine mach_ports_lookup */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_ports_lookup +( + task_t target_task, + mach_port_array_t *init_port_set, + mach_msg_type_number_t *init_port_setCnt +); + +/* Routine task_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_info +( + task_name_t target_task, + task_flavor_t flavor, + task_info_t task_info_out, + mach_msg_type_number_t *task_info_outCnt +); + +/* Routine task_set_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_info +( + task_t target_task, + task_flavor_t flavor, + task_info_t task_info_in, + mach_msg_type_number_t task_info_inCnt +); + +/* Routine task_suspend */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_suspend +( + task_t target_task +); + +/* Routine task_resume */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_resume +( + task_t target_task +); + +/* Routine task_get_special_port */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_get_special_port +( + task_t task, + int which_port, + mach_port_t *special_port +); + +/* Routine task_set_special_port */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_special_port +( + task_t task, + int which_port, + mach_port_t special_port +); + +/* Routine thread_create */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_create +( + task_t parent_task, + thread_act_t *child_act +); + +/* Routine thread_create_running */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_create_running +( + task_t parent_task, + thread_state_flavor_t flavor, + thread_state_t new_state, + mach_msg_type_number_t new_stateCnt, + thread_act_t *child_act +); + +/* Routine task_set_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_exception_ports +( + task_t task, + exception_mask_t exception_mask, + mach_port_t new_port, + exception_behavior_t behavior, + thread_state_flavor_t new_flavor +); + +/* Routine task_get_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_get_exception_ports +( + task_t task, + exception_mask_t exception_mask, + exception_mask_array_t masks, + mach_msg_type_number_t *masksCnt, + exception_handler_array_t old_handlers, + exception_behavior_array_t old_behaviors, + exception_flavor_array_t old_flavors +); + +/* Routine task_swap_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_swap_exception_ports +( + task_t task, + exception_mask_t exception_mask, + mach_port_t new_port, + exception_behavior_t behavior, + thread_state_flavor_t new_flavor, + exception_mask_array_t masks, + mach_msg_type_number_t *masksCnt, + exception_handler_array_t old_handlerss, + exception_behavior_array_t old_behaviors, + exception_flavor_array_t old_flavors +); + +/* Routine lock_set_create */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t lock_set_create +( + task_t task, + lock_set_t *new_lock_set, + int n_ulocks, + int policy +); + +/* Routine lock_set_destroy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t lock_set_destroy +( + task_t task, + lock_set_t lock_set +); + +/* Routine semaphore_create */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t semaphore_create +( + task_t task, + semaphore_t *semaphore, + int policy, + int value +); + +/* Routine semaphore_destroy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t semaphore_destroy +( + task_t task, + semaphore_t semaphore +); + +/* Routine task_policy_set */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_policy_set +( + task_t task, + task_policy_flavor_t flavor, + task_policy_t policy_info, + mach_msg_type_number_t policy_infoCnt +); + +/* Routine task_policy_get */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_policy_get +( + task_t task, + task_policy_flavor_t flavor, + task_policy_t policy_info, + mach_msg_type_number_t *policy_infoCnt, + boolean_t *get_default +); + +/* Routine task_sample */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_sample +( + task_t task, + mach_port_t reply +); + +/* Routine task_policy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_policy +( + task_t task, + policy_t policy, + policy_base_t base, + mach_msg_type_number_t baseCnt, + boolean_t set_limit, + boolean_t change +); + +/* Routine task_set_emulation */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_emulation +( + task_t target_port, + vm_address_t routine_entry_pt, + int routine_number +); + +/* Routine task_get_emulation_vector */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_get_emulation_vector +( + task_t task, + int *vector_start, + emulation_vector_t *emulation_vector, + mach_msg_type_number_t *emulation_vectorCnt +); + +/* Routine task_set_emulation_vector */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_emulation_vector +( + task_t task, + int vector_start, + emulation_vector_t emulation_vector, + mach_msg_type_number_t emulation_vectorCnt +); + +/* Routine task_set_ras_pc */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_ras_pc +( + task_t target_task, + vm_address_t basepc, + vm_address_t boundspc +); + +/* Routine task_assign */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_assign +( + task_t task, + processor_set_t new_set, + boolean_t assign_threads +); + +/* Routine task_assign_default */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_assign_default +( + task_t task, + boolean_t assign_threads +); + +/* Routine task_get_assignment */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_get_assignment +( + task_t task, + processor_set_name_t *assigned_set +); + +/* Routine task_set_policy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_policy +( + task_t task, + processor_set_t pset, + policy_t policy, + policy_base_t base, + mach_msg_type_number_t baseCnt, + policy_limit_t limit, + mach_msg_type_number_t limitCnt, + boolean_t change +); + +/* Routine task_get_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_get_state +( + task_t task, + thread_state_flavor_t flavor, + thread_state_t old_state, + mach_msg_type_number_t *old_stateCnt +); + +/* Routine task_set_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_state +( + task_t task, + thread_state_flavor_t flavor, + thread_state_t new_state, + mach_msg_type_number_t new_stateCnt +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__task_subsystem__defined +#define __Request__task_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_ports_descriptor_t ledgers; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t ledgersCnt; + boolean_t inherit_memory; + } __Request__task_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_terminate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_threads_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_ports_descriptor_t init_port_set; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t init_port_setCnt; + } __Request__mach_ports_register_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__mach_ports_lookup_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + task_flavor_t flavor; + mach_msg_type_number_t task_info_outCnt; + } __Request__task_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + task_flavor_t flavor; + mach_msg_type_number_t task_info_inCnt; + integer_t task_info_in[10]; + } __Request__task_set_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_suspend_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_resume_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int which_port; + } __Request__task_get_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t special_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + int which_port; + } __Request__task_set_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_state_flavor_t flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[144]; + } __Request__thread_create_running_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_mask_t exception_mask; + exception_behavior_t behavior; + thread_state_flavor_t new_flavor; + } __Request__task_set_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + exception_mask_t exception_mask; + } __Request__task_get_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_mask_t exception_mask; + exception_behavior_t behavior; + thread_state_flavor_t new_flavor; + } __Request__task_swap_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int n_ulocks; + int policy; + } __Request__lock_set_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t lock_set; + /* end of the kernel processed data */ + } __Request__lock_set_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int policy; + int value; + } __Request__semaphore_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t semaphore; + /* end of the kernel processed data */ + } __Request__semaphore_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + task_policy_flavor_t flavor; + mach_msg_type_number_t policy_infoCnt; + integer_t policy_info[16]; + } __Request__task_policy_set_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + task_policy_flavor_t flavor; + mach_msg_type_number_t policy_infoCnt; + boolean_t get_default; + } __Request__task_policy_get_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t reply; + /* end of the kernel processed data */ + } __Request__task_sample_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + policy_t policy; + mach_msg_type_number_t baseCnt; + integer_t base[5]; + boolean_t set_limit; + boolean_t change; + } __Request__task_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t routine_entry_pt; + int routine_number; + } __Request__task_set_emulation_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_get_emulation_vector_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t emulation_vector; + /* end of the kernel processed data */ + NDR_record_t NDR; + int vector_start; + mach_msg_type_number_t emulation_vectorCnt; + } __Request__task_set_emulation_vector_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t basepc; + vm_address_t boundspc; + } __Request__task_set_ras_pc_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_set; + /* end of the kernel processed data */ + NDR_record_t NDR; + boolean_t assign_threads; + } __Request__task_assign_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + boolean_t assign_threads; + } __Request__task_assign_default_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_get_assignment_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t pset; + /* end of the kernel processed data */ + NDR_record_t NDR; + policy_t policy; + mach_msg_type_number_t baseCnt; + integer_t base[5]; + mach_msg_type_number_t limitCnt; + integer_t limit[1]; + boolean_t change; + } __Request__task_set_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_state_flavor_t flavor; + mach_msg_type_number_t old_stateCnt; + } __Request__task_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_state_flavor_t flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[144]; + } __Request__task_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__task_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__task_subsystem__defined +#define __RequestUnion__task_subsystem__defined +union __RequestUnion__task_subsystem { + __Request__task_create_t Request_task_create; + __Request__task_terminate_t Request_task_terminate; + __Request__task_threads_t Request_task_threads; + __Request__mach_ports_register_t Request_mach_ports_register; + __Request__mach_ports_lookup_t Request_mach_ports_lookup; + __Request__task_info_t Request_task_info; + __Request__task_set_info_t Request_task_set_info; + __Request__task_suspend_t Request_task_suspend; + __Request__task_resume_t Request_task_resume; + __Request__task_get_special_port_t Request_task_get_special_port; + __Request__task_set_special_port_t Request_task_set_special_port; + __Request__thread_create_t Request_thread_create; + __Request__thread_create_running_t Request_thread_create_running; + __Request__task_set_exception_ports_t Request_task_set_exception_ports; + __Request__task_get_exception_ports_t Request_task_get_exception_ports; + __Request__task_swap_exception_ports_t Request_task_swap_exception_ports; + __Request__lock_set_create_t Request_lock_set_create; + __Request__lock_set_destroy_t Request_lock_set_destroy; + __Request__semaphore_create_t Request_semaphore_create; + __Request__semaphore_destroy_t Request_semaphore_destroy; + __Request__task_policy_set_t Request_task_policy_set; + __Request__task_policy_get_t Request_task_policy_get; + __Request__task_sample_t Request_task_sample; + __Request__task_policy_t Request_task_policy; + __Request__task_set_emulation_t Request_task_set_emulation; + __Request__task_get_emulation_vector_t Request_task_get_emulation_vector; + __Request__task_set_emulation_vector_t Request_task_set_emulation_vector; + __Request__task_set_ras_pc_t Request_task_set_ras_pc; + __Request__task_assign_t Request_task_assign; + __Request__task_assign_default_t Request_task_assign_default; + __Request__task_get_assignment_t Request_task_get_assignment; + __Request__task_set_policy_t Request_task_set_policy; + __Request__task_get_state_t Request_task_get_state; + __Request__task_set_state_t Request_task_set_state; +}; +#endif /* !__RequestUnion__task_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__task_subsystem__defined +#define __Reply__task_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t child_task; + /* end of the kernel processed data */ + } __Reply__task_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_terminate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_ports_descriptor_t act_list; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t act_listCnt; + } __Reply__task_threads_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_ports_register_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_ports_descriptor_t init_port_set; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t init_port_setCnt; + } __Reply__mach_ports_lookup_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t task_info_outCnt; + integer_t task_info_out[10]; + } __Reply__task_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_suspend_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_resume_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t special_port; + /* end of the kernel processed data */ + } __Reply__task_get_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t child_act; + /* end of the kernel processed data */ + } __Reply__thread_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t child_act; + /* end of the kernel processed data */ + } __Reply__thread_create_running_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t old_handlers[32]; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t masksCnt; + exception_mask_t masks[32]; + exception_behavior_t old_behaviors[32]; + thread_state_flavor_t old_flavors[32]; + } __Reply__task_get_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t old_handlerss[32]; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t masksCnt; + exception_mask_t masks[32]; + exception_behavior_t old_behaviors[32]; + thread_state_flavor_t old_flavors[32]; + } __Reply__task_swap_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_lock_set; + /* end of the kernel processed data */ + } __Reply__lock_set_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__lock_set_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t semaphore; + /* end of the kernel processed data */ + } __Reply__semaphore_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__semaphore_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_policy_set_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t policy_infoCnt; + integer_t policy_info[16]; + boolean_t get_default; + } __Reply__task_policy_get_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_sample_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_emulation_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t emulation_vector; + /* end of the kernel processed data */ + NDR_record_t NDR; + int vector_start; + mach_msg_type_number_t emulation_vectorCnt; + } __Reply__task_get_emulation_vector_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_emulation_vector_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_ras_pc_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_assign_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_assign_default_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t assigned_set; + /* end of the kernel processed data */ + } __Reply__task_get_assignment_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[144]; + } __Reply__task_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__task_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__task_subsystem__defined +#define __ReplyUnion__task_subsystem__defined +union __ReplyUnion__task_subsystem { + __Reply__task_create_t Reply_task_create; + __Reply__task_terminate_t Reply_task_terminate; + __Reply__task_threads_t Reply_task_threads; + __Reply__mach_ports_register_t Reply_mach_ports_register; + __Reply__mach_ports_lookup_t Reply_mach_ports_lookup; + __Reply__task_info_t Reply_task_info; + __Reply__task_set_info_t Reply_task_set_info; + __Reply__task_suspend_t Reply_task_suspend; + __Reply__task_resume_t Reply_task_resume; + __Reply__task_get_special_port_t Reply_task_get_special_port; + __Reply__task_set_special_port_t Reply_task_set_special_port; + __Reply__thread_create_t Reply_thread_create; + __Reply__thread_create_running_t Reply_thread_create_running; + __Reply__task_set_exception_ports_t Reply_task_set_exception_ports; + __Reply__task_get_exception_ports_t Reply_task_get_exception_ports; + __Reply__task_swap_exception_ports_t Reply_task_swap_exception_ports; + __Reply__lock_set_create_t Reply_lock_set_create; + __Reply__lock_set_destroy_t Reply_lock_set_destroy; + __Reply__semaphore_create_t Reply_semaphore_create; + __Reply__semaphore_destroy_t Reply_semaphore_destroy; + __Reply__task_policy_set_t Reply_task_policy_set; + __Reply__task_policy_get_t Reply_task_policy_get; + __Reply__task_sample_t Reply_task_sample; + __Reply__task_policy_t Reply_task_policy; + __Reply__task_set_emulation_t Reply_task_set_emulation; + __Reply__task_get_emulation_vector_t Reply_task_get_emulation_vector; + __Reply__task_set_emulation_vector_t Reply_task_set_emulation_vector; + __Reply__task_set_ras_pc_t Reply_task_set_ras_pc; + __Reply__task_assign_t Reply_task_assign; + __Reply__task_assign_default_t Reply_task_assign_default; + __Reply__task_get_assignment_t Reply_task_get_assignment; + __Reply__task_set_policy_t Reply_task_set_policy; + __Reply__task_get_state_t Reply_task_get_state; + __Reply__task_set_state_t Reply_task_set_state; +}; +#endif /* !__RequestUnion__task_subsystem__defined */ + +#ifndef subsystem_to_name_map_task +#define subsystem_to_name_map_task \ + { "task_create", 3400 },\ + { "task_terminate", 3401 },\ + { "task_threads", 3402 },\ + { "mach_ports_register", 3403 },\ + { "mach_ports_lookup", 3404 },\ + { "task_info", 3405 },\ + { "task_set_info", 3406 },\ + { "task_suspend", 3407 },\ + { "task_resume", 3408 },\ + { "task_get_special_port", 3409 },\ + { "task_set_special_port", 3410 },\ + { "thread_create", 3411 },\ + { "thread_create_running", 3412 },\ + { "task_set_exception_ports", 3413 },\ + { "task_get_exception_ports", 3414 },\ + { "task_swap_exception_ports", 3415 },\ + { "lock_set_create", 3416 },\ + { "lock_set_destroy", 3417 },\ + { "semaphore_create", 3418 },\ + { "semaphore_destroy", 3419 },\ + { "task_policy_set", 3420 },\ + { "task_policy_get", 3421 },\ + { "task_sample", 3422 },\ + { "task_policy", 3423 },\ + { "task_set_emulation", 3424 },\ + { "task_get_emulation_vector", 3425 },\ + { "task_set_emulation_vector", 3426 },\ + { "task_set_ras_pc", 3427 },\ + { "task_assign", 3429 },\ + { "task_assign_default", 3430 },\ + { "task_get_assignment", 3431 },\ + { "task_set_policy", 3432 },\ + { "task_get_state", 3433 },\ + { "task_set_state", 3434 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _task_user_ */ diff --git a/i386/include/mach/x86_64/.svn/text-base/thread_act.h.svn-base b/i386/include/mach/x86_64/.svn/text-base/thread_act.h.svn-base new file mode 100644 index 0000000..fde4189 --- /dev/null +++ b/i386/include/mach/x86_64/.svn/text-base/thread_act.h.svn-base @@ -0,0 +1,1155 @@ +#ifndef _thread_act_user_ +#define _thread_act_user_ + +/* Module thread_act */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef thread_act_MSG_COUNT +#define thread_act_MSG_COUNT 25 +#endif /* thread_act_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mig.h> +#include <mach/mach_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine thread_terminate */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_terminate +( + thread_act_t target_act +); + +/* Routine act_get_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t act_get_state +( + thread_act_t target_act, + int flavor, + thread_state_t old_state, + mach_msg_type_number_t *old_stateCnt +); + +/* Routine act_set_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t act_set_state +( + thread_act_t target_act, + int flavor, + thread_state_t new_state, + mach_msg_type_number_t new_stateCnt +); + +/* Routine thread_get_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_get_state +( + thread_act_t target_act, + thread_state_flavor_t flavor, + thread_state_t old_state, + mach_msg_type_number_t *old_stateCnt +); + +/* Routine thread_set_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_set_state +( + thread_act_t target_act, + thread_state_flavor_t flavor, + thread_state_t new_state, + mach_msg_type_number_t new_stateCnt +); + +/* Routine thread_suspend */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_suspend +( + thread_act_t target_act +); + +/* Routine thread_resume */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_resume +( + thread_act_t target_act +); + +/* Routine thread_abort */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_abort +( + thread_act_t target_act +); + +/* Routine thread_abort_safely */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_abort_safely +( + thread_act_t target_act +); + +/* Routine thread_depress_abort */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_depress_abort +( + thread_act_t thread +); + +/* Routine thread_get_special_port */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_get_special_port +( + thread_act_t thr_act, + int which_port, + mach_port_t *special_port +); + +/* Routine thread_set_special_port */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_set_special_port +( + thread_act_t thr_act, + int which_port, + mach_port_t special_port +); + +/* Routine thread_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_info +( + thread_act_t target_act, + thread_flavor_t flavor, + thread_info_t thread_info_out, + mach_msg_type_number_t *thread_info_outCnt +); + +/* Routine thread_set_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_set_exception_ports +( + thread_act_t thread, + exception_mask_t exception_mask, + mach_port_t new_port, + exception_behavior_t behavior, + thread_state_flavor_t new_flavor +); + +/* Routine thread_get_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_get_exception_ports +( + thread_act_t thread, + exception_mask_t exception_mask, + exception_mask_array_t masks, + mach_msg_type_number_t *masksCnt, + exception_handler_array_t old_handlers, + exception_behavior_array_t old_behaviors, + exception_flavor_array_t old_flavors +); + +/* Routine thread_swap_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_swap_exception_ports +( + thread_act_t thread, + exception_mask_t exception_mask, + mach_port_t new_port, + exception_behavior_t behavior, + thread_state_flavor_t new_flavor, + exception_mask_array_t masks, + mach_msg_type_number_t *masksCnt, + exception_handler_array_t old_handlers, + exception_behavior_array_t old_behaviors, + exception_flavor_array_t old_flavors +); + +/* Routine thread_policy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_policy +( + thread_act_t thr_act, + policy_t policy, + policy_base_t base, + mach_msg_type_number_t baseCnt, + boolean_t set_limit +); + +/* Routine thread_policy_set */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_policy_set +( + thread_act_t thread, + thread_policy_flavor_t flavor, + thread_policy_t policy_info, + mach_msg_type_number_t policy_infoCnt +); + +/* Routine thread_policy_get */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_policy_get +( + thread_act_t thread, + thread_policy_flavor_t flavor, + thread_policy_t policy_info, + mach_msg_type_number_t *policy_infoCnt, + boolean_t *get_default +); + +/* Routine thread_sample */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_sample +( + thread_act_t thread, + mach_port_t reply +); + +/* Routine etap_trace_thread */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t etap_trace_thread +( + thread_act_t target_act, + boolean_t trace_status +); + +/* Routine thread_assign */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_assign +( + thread_act_t thread, + processor_set_t new_set +); + +/* Routine thread_assign_default */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_assign_default +( + thread_act_t thread +); + +/* Routine thread_get_assignment */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_get_assignment +( + thread_act_t thread, + processor_set_name_t *assigned_set +); + +/* Routine thread_set_policy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_set_policy +( + thread_act_t thr_act, + processor_set_t pset, + policy_t policy, + policy_base_t base, + mach_msg_type_number_t baseCnt, + policy_limit_t limit, + mach_msg_type_number_t limitCnt +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__thread_act_subsystem__defined +#define __Request__thread_act_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_terminate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int flavor; + mach_msg_type_number_t old_stateCnt; + } __Request__act_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[144]; + } __Request__act_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_state_flavor_t flavor; + mach_msg_type_number_t old_stateCnt; + } __Request__thread_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_state_flavor_t flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[144]; + } __Request__thread_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_suspend_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_resume_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_abort_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_abort_safely_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_depress_abort_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int which_port; + } __Request__thread_get_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t special_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + int which_port; + } __Request__thread_set_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_flavor_t flavor; + mach_msg_type_number_t thread_info_outCnt; + } __Request__thread_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_mask_t exception_mask; + exception_behavior_t behavior; + thread_state_flavor_t new_flavor; + } __Request__thread_set_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + exception_mask_t exception_mask; + } __Request__thread_get_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_mask_t exception_mask; + exception_behavior_t behavior; + thread_state_flavor_t new_flavor; + } __Request__thread_swap_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + policy_t policy; + mach_msg_type_number_t baseCnt; + integer_t base[5]; + boolean_t set_limit; + } __Request__thread_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_policy_flavor_t flavor; + mach_msg_type_number_t policy_infoCnt; + integer_t policy_info[16]; + } __Request__thread_policy_set_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_policy_flavor_t flavor; + mach_msg_type_number_t policy_infoCnt; + boolean_t get_default; + } __Request__thread_policy_get_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t reply; + /* end of the kernel processed data */ + } __Request__thread_sample_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + boolean_t trace_status; + } __Request__etap_trace_thread_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_set; + /* end of the kernel processed data */ + } __Request__thread_assign_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_assign_default_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_get_assignment_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t pset; + /* end of the kernel processed data */ + NDR_record_t NDR; + policy_t policy; + mach_msg_type_number_t baseCnt; + integer_t base[5]; + mach_msg_type_number_t limitCnt; + integer_t limit[1]; + } __Request__thread_set_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__thread_act_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__thread_act_subsystem__defined +#define __RequestUnion__thread_act_subsystem__defined +union __RequestUnion__thread_act_subsystem { + __Request__thread_terminate_t Request_thread_terminate; + __Request__act_get_state_t Request_act_get_state; + __Request__act_set_state_t Request_act_set_state; + __Request__thread_get_state_t Request_thread_get_state; + __Request__thread_set_state_t Request_thread_set_state; + __Request__thread_suspend_t Request_thread_suspend; + __Request__thread_resume_t Request_thread_resume; + __Request__thread_abort_t Request_thread_abort; + __Request__thread_abort_safely_t Request_thread_abort_safely; + __Request__thread_depress_abort_t Request_thread_depress_abort; + __Request__thread_get_special_port_t Request_thread_get_special_port; + __Request__thread_set_special_port_t Request_thread_set_special_port; + __Request__thread_info_t Request_thread_info; + __Request__thread_set_exception_ports_t Request_thread_set_exception_ports; + __Request__thread_get_exception_ports_t Request_thread_get_exception_ports; + __Request__thread_swap_exception_ports_t Request_thread_swap_exception_ports; + __Request__thread_policy_t Request_thread_policy; + __Request__thread_policy_set_t Request_thread_policy_set; + __Request__thread_policy_get_t Request_thread_policy_get; + __Request__thread_sample_t Request_thread_sample; + __Request__etap_trace_thread_t Request_etap_trace_thread; + __Request__thread_assign_t Request_thread_assign; + __Request__thread_assign_default_t Request_thread_assign_default; + __Request__thread_get_assignment_t Request_thread_get_assignment; + __Request__thread_set_policy_t Request_thread_set_policy; +}; +#endif /* !__RequestUnion__thread_act_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__thread_act_subsystem__defined +#define __Reply__thread_act_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_terminate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[144]; + } __Reply__act_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__act_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[144]; + } __Reply__thread_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_suspend_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_resume_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_abort_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_abort_safely_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_depress_abort_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t special_port; + /* end of the kernel processed data */ + } __Reply__thread_get_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_set_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t thread_info_outCnt; + integer_t thread_info_out[12]; + } __Reply__thread_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_set_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t old_handlers[32]; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t masksCnt; + exception_mask_t masks[32]; + exception_behavior_t old_behaviors[32]; + thread_state_flavor_t old_flavors[32]; + } __Reply__thread_get_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t old_handlers[32]; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t masksCnt; + exception_mask_t masks[32]; + exception_behavior_t old_behaviors[32]; + thread_state_flavor_t old_flavors[32]; + } __Reply__thread_swap_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_policy_set_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t policy_infoCnt; + integer_t policy_info[16]; + boolean_t get_default; + } __Reply__thread_policy_get_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_sample_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__etap_trace_thread_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_assign_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_assign_default_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t assigned_set; + /* end of the kernel processed data */ + } __Reply__thread_get_assignment_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_set_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__thread_act_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__thread_act_subsystem__defined +#define __ReplyUnion__thread_act_subsystem__defined +union __ReplyUnion__thread_act_subsystem { + __Reply__thread_terminate_t Reply_thread_terminate; + __Reply__act_get_state_t Reply_act_get_state; + __Reply__act_set_state_t Reply_act_set_state; + __Reply__thread_get_state_t Reply_thread_get_state; + __Reply__thread_set_state_t Reply_thread_set_state; + __Reply__thread_suspend_t Reply_thread_suspend; + __Reply__thread_resume_t Reply_thread_resume; + __Reply__thread_abort_t Reply_thread_abort; + __Reply__thread_abort_safely_t Reply_thread_abort_safely; + __Reply__thread_depress_abort_t Reply_thread_depress_abort; + __Reply__thread_get_special_port_t Reply_thread_get_special_port; + __Reply__thread_set_special_port_t Reply_thread_set_special_port; + __Reply__thread_info_t Reply_thread_info; + __Reply__thread_set_exception_ports_t Reply_thread_set_exception_ports; + __Reply__thread_get_exception_ports_t Reply_thread_get_exception_ports; + __Reply__thread_swap_exception_ports_t Reply_thread_swap_exception_ports; + __Reply__thread_policy_t Reply_thread_policy; + __Reply__thread_policy_set_t Reply_thread_policy_set; + __Reply__thread_policy_get_t Reply_thread_policy_get; + __Reply__thread_sample_t Reply_thread_sample; + __Reply__etap_trace_thread_t Reply_etap_trace_thread; + __Reply__thread_assign_t Reply_thread_assign; + __Reply__thread_assign_default_t Reply_thread_assign_default; + __Reply__thread_get_assignment_t Reply_thread_get_assignment; + __Reply__thread_set_policy_t Reply_thread_set_policy; +}; +#endif /* !__RequestUnion__thread_act_subsystem__defined */ + +#ifndef subsystem_to_name_map_thread_act +#define subsystem_to_name_map_thread_act \ + { "thread_terminate", 3600 },\ + { "act_get_state", 3601 },\ + { "act_set_state", 3602 },\ + { "thread_get_state", 3603 },\ + { "thread_set_state", 3604 },\ + { "thread_suspend", 3605 },\ + { "thread_resume", 3606 },\ + { "thread_abort", 3607 },\ + { "thread_abort_safely", 3608 },\ + { "thread_depress_abort", 3609 },\ + { "thread_get_special_port", 3610 },\ + { "thread_set_special_port", 3611 },\ + { "thread_info", 3612 },\ + { "thread_set_exception_ports", 3613 },\ + { "thread_get_exception_ports", 3614 },\ + { "thread_swap_exception_ports", 3615 },\ + { "thread_policy", 3616 },\ + { "thread_policy_set", 3617 },\ + { "thread_policy_get", 3618 },\ + { "thread_sample", 3619 },\ + { "etap_trace_thread", 3620 },\ + { "thread_assign", 3621 },\ + { "thread_assign_default", 3622 },\ + { "thread_get_assignment", 3623 },\ + { "thread_set_policy", 3624 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _thread_act_user_ */ diff --git a/i386/include/mach/x86_64/task.h b/i386/include/mach/x86_64/task.h new file mode 100644 index 0000000..15c8248 --- /dev/null +++ b/i386/include/mach/x86_64/task.h @@ -0,0 +1,1578 @@ +#ifndef _task_user_ +#define _task_user_ + +/* Module task */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef task_MSG_COUNT +#define task_MSG_COUNT 35 +#endif /* task_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mig.h> +#include <mach/mach_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine task_create */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_create +( + task_t target_task, + ledger_array_t ledgers, + mach_msg_type_number_t ledgersCnt, + boolean_t inherit_memory, + task_t *child_task +); + +/* Routine task_terminate */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_terminate +( + task_t target_task +); + +/* Routine task_threads */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_threads +( + task_t target_task, + thread_act_array_t *act_list, + mach_msg_type_number_t *act_listCnt +); + +/* Routine mach_ports_register */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_ports_register +( + task_t target_task, + mach_port_array_t init_port_set, + mach_msg_type_number_t init_port_setCnt +); + +/* Routine mach_ports_lookup */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_ports_lookup +( + task_t target_task, + mach_port_array_t *init_port_set, + mach_msg_type_number_t *init_port_setCnt +); + +/* Routine task_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_info +( + task_name_t target_task, + task_flavor_t flavor, + task_info_t task_info_out, + mach_msg_type_number_t *task_info_outCnt +); + +/* Routine task_set_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_info +( + task_t target_task, + task_flavor_t flavor, + task_info_t task_info_in, + mach_msg_type_number_t task_info_inCnt +); + +/* Routine task_suspend */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_suspend +( + task_t target_task +); + +/* Routine task_resume */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_resume +( + task_t target_task +); + +/* Routine task_get_special_port */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_get_special_port +( + task_t task, + int which_port, + mach_port_t *special_port +); + +/* Routine task_set_special_port */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_special_port +( + task_t task, + int which_port, + mach_port_t special_port +); + +/* Routine thread_create */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_create +( + task_t parent_task, + thread_act_t *child_act +); + +/* Routine thread_create_running */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_create_running +( + task_t parent_task, + thread_state_flavor_t flavor, + thread_state_t new_state, + mach_msg_type_number_t new_stateCnt, + thread_act_t *child_act +); + +/* Routine task_set_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_exception_ports +( + task_t task, + exception_mask_t exception_mask, + mach_port_t new_port, + exception_behavior_t behavior, + thread_state_flavor_t new_flavor +); + +/* Routine task_get_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_get_exception_ports +( + task_t task, + exception_mask_t exception_mask, + exception_mask_array_t masks, + mach_msg_type_number_t *masksCnt, + exception_handler_array_t old_handlers, + exception_behavior_array_t old_behaviors, + exception_flavor_array_t old_flavors +); + +/* Routine task_swap_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_swap_exception_ports +( + task_t task, + exception_mask_t exception_mask, + mach_port_t new_port, + exception_behavior_t behavior, + thread_state_flavor_t new_flavor, + exception_mask_array_t masks, + mach_msg_type_number_t *masksCnt, + exception_handler_array_t old_handlerss, + exception_behavior_array_t old_behaviors, + exception_flavor_array_t old_flavors +); + +/* Routine lock_set_create */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t lock_set_create +( + task_t task, + lock_set_t *new_lock_set, + int n_ulocks, + int policy +); + +/* Routine lock_set_destroy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t lock_set_destroy +( + task_t task, + lock_set_t lock_set +); + +/* Routine semaphore_create */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t semaphore_create +( + task_t task, + semaphore_t *semaphore, + int policy, + int value +); + +/* Routine semaphore_destroy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t semaphore_destroy +( + task_t task, + semaphore_t semaphore +); + +/* Routine task_policy_set */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_policy_set +( + task_t task, + task_policy_flavor_t flavor, + task_policy_t policy_info, + mach_msg_type_number_t policy_infoCnt +); + +/* Routine task_policy_get */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_policy_get +( + task_t task, + task_policy_flavor_t flavor, + task_policy_t policy_info, + mach_msg_type_number_t *policy_infoCnt, + boolean_t *get_default +); + +/* Routine task_sample */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_sample +( + task_t task, + mach_port_t reply +); + +/* Routine task_policy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_policy +( + task_t task, + policy_t policy, + policy_base_t base, + mach_msg_type_number_t baseCnt, + boolean_t set_limit, + boolean_t change +); + +/* Routine task_set_emulation */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_emulation +( + task_t target_port, + vm_address_t routine_entry_pt, + int routine_number +); + +/* Routine task_get_emulation_vector */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_get_emulation_vector +( + task_t task, + int *vector_start, + emulation_vector_t *emulation_vector, + mach_msg_type_number_t *emulation_vectorCnt +); + +/* Routine task_set_emulation_vector */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_emulation_vector +( + task_t task, + int vector_start, + emulation_vector_t emulation_vector, + mach_msg_type_number_t emulation_vectorCnt +); + +/* Routine task_set_ras_pc */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_ras_pc +( + task_t target_task, + vm_address_t basepc, + vm_address_t boundspc +); + +/* Routine task_assign */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_assign +( + task_t task, + processor_set_t new_set, + boolean_t assign_threads +); + +/* Routine task_assign_default */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_assign_default +( + task_t task, + boolean_t assign_threads +); + +/* Routine task_get_assignment */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_get_assignment +( + task_t task, + processor_set_name_t *assigned_set +); + +/* Routine task_set_policy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_policy +( + task_t task, + processor_set_t pset, + policy_t policy, + policy_base_t base, + mach_msg_type_number_t baseCnt, + policy_limit_t limit, + mach_msg_type_number_t limitCnt, + boolean_t change +); + +/* Routine task_get_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_get_state +( + task_t task, + thread_state_flavor_t flavor, + thread_state_t old_state, + mach_msg_type_number_t *old_stateCnt +); + +/* Routine task_set_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t task_set_state +( + task_t task, + thread_state_flavor_t flavor, + thread_state_t new_state, + mach_msg_type_number_t new_stateCnt +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__task_subsystem__defined +#define __Request__task_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_ports_descriptor_t ledgers; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t ledgersCnt; + boolean_t inherit_memory; + } __Request__task_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_terminate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_threads_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_ports_descriptor_t init_port_set; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t init_port_setCnt; + } __Request__mach_ports_register_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__mach_ports_lookup_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + task_flavor_t flavor; + mach_msg_type_number_t task_info_outCnt; + } __Request__task_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + task_flavor_t flavor; + mach_msg_type_number_t task_info_inCnt; + integer_t task_info_in[10]; + } __Request__task_set_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_suspend_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_resume_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int which_port; + } __Request__task_get_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t special_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + int which_port; + } __Request__task_set_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_state_flavor_t flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[144]; + } __Request__thread_create_running_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_mask_t exception_mask; + exception_behavior_t behavior; + thread_state_flavor_t new_flavor; + } __Request__task_set_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + exception_mask_t exception_mask; + } __Request__task_get_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_mask_t exception_mask; + exception_behavior_t behavior; + thread_state_flavor_t new_flavor; + } __Request__task_swap_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int n_ulocks; + int policy; + } __Request__lock_set_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t lock_set; + /* end of the kernel processed data */ + } __Request__lock_set_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int policy; + int value; + } __Request__semaphore_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t semaphore; + /* end of the kernel processed data */ + } __Request__semaphore_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + task_policy_flavor_t flavor; + mach_msg_type_number_t policy_infoCnt; + integer_t policy_info[16]; + } __Request__task_policy_set_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + task_policy_flavor_t flavor; + mach_msg_type_number_t policy_infoCnt; + boolean_t get_default; + } __Request__task_policy_get_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t reply; + /* end of the kernel processed data */ + } __Request__task_sample_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + policy_t policy; + mach_msg_type_number_t baseCnt; + integer_t base[5]; + boolean_t set_limit; + boolean_t change; + } __Request__task_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t routine_entry_pt; + int routine_number; + } __Request__task_set_emulation_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_get_emulation_vector_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t emulation_vector; + /* end of the kernel processed data */ + NDR_record_t NDR; + int vector_start; + mach_msg_type_number_t emulation_vectorCnt; + } __Request__task_set_emulation_vector_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + vm_address_t basepc; + vm_address_t boundspc; + } __Request__task_set_ras_pc_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_set; + /* end of the kernel processed data */ + NDR_record_t NDR; + boolean_t assign_threads; + } __Request__task_assign_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + boolean_t assign_threads; + } __Request__task_assign_default_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__task_get_assignment_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t pset; + /* end of the kernel processed data */ + NDR_record_t NDR; + policy_t policy; + mach_msg_type_number_t baseCnt; + integer_t base[5]; + mach_msg_type_number_t limitCnt; + integer_t limit[1]; + boolean_t change; + } __Request__task_set_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_state_flavor_t flavor; + mach_msg_type_number_t old_stateCnt; + } __Request__task_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_state_flavor_t flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[144]; + } __Request__task_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__task_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__task_subsystem__defined +#define __RequestUnion__task_subsystem__defined +union __RequestUnion__task_subsystem { + __Request__task_create_t Request_task_create; + __Request__task_terminate_t Request_task_terminate; + __Request__task_threads_t Request_task_threads; + __Request__mach_ports_register_t Request_mach_ports_register; + __Request__mach_ports_lookup_t Request_mach_ports_lookup; + __Request__task_info_t Request_task_info; + __Request__task_set_info_t Request_task_set_info; + __Request__task_suspend_t Request_task_suspend; + __Request__task_resume_t Request_task_resume; + __Request__task_get_special_port_t Request_task_get_special_port; + __Request__task_set_special_port_t Request_task_set_special_port; + __Request__thread_create_t Request_thread_create; + __Request__thread_create_running_t Request_thread_create_running; + __Request__task_set_exception_ports_t Request_task_set_exception_ports; + __Request__task_get_exception_ports_t Request_task_get_exception_ports; + __Request__task_swap_exception_ports_t Request_task_swap_exception_ports; + __Request__lock_set_create_t Request_lock_set_create; + __Request__lock_set_destroy_t Request_lock_set_destroy; + __Request__semaphore_create_t Request_semaphore_create; + __Request__semaphore_destroy_t Request_semaphore_destroy; + __Request__task_policy_set_t Request_task_policy_set; + __Request__task_policy_get_t Request_task_policy_get; + __Request__task_sample_t Request_task_sample; + __Request__task_policy_t Request_task_policy; + __Request__task_set_emulation_t Request_task_set_emulation; + __Request__task_get_emulation_vector_t Request_task_get_emulation_vector; + __Request__task_set_emulation_vector_t Request_task_set_emulation_vector; + __Request__task_set_ras_pc_t Request_task_set_ras_pc; + __Request__task_assign_t Request_task_assign; + __Request__task_assign_default_t Request_task_assign_default; + __Request__task_get_assignment_t Request_task_get_assignment; + __Request__task_set_policy_t Request_task_set_policy; + __Request__task_get_state_t Request_task_get_state; + __Request__task_set_state_t Request_task_set_state; +}; +#endif /* !__RequestUnion__task_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__task_subsystem__defined +#define __Reply__task_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t child_task; + /* end of the kernel processed data */ + } __Reply__task_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_terminate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_ports_descriptor_t act_list; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t act_listCnt; + } __Reply__task_threads_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_ports_register_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_ports_descriptor_t init_port_set; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t init_port_setCnt; + } __Reply__mach_ports_lookup_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t task_info_outCnt; + integer_t task_info_out[10]; + } __Reply__task_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_suspend_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_resume_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t special_port; + /* end of the kernel processed data */ + } __Reply__task_get_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t child_act; + /* end of the kernel processed data */ + } __Reply__thread_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t child_act; + /* end of the kernel processed data */ + } __Reply__thread_create_running_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t old_handlers[32]; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t masksCnt; + exception_mask_t masks[32]; + exception_behavior_t old_behaviors[32]; + thread_state_flavor_t old_flavors[32]; + } __Reply__task_get_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t old_handlerss[32]; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t masksCnt; + exception_mask_t masks[32]; + exception_behavior_t old_behaviors[32]; + thread_state_flavor_t old_flavors[32]; + } __Reply__task_swap_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_lock_set; + /* end of the kernel processed data */ + } __Reply__lock_set_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__lock_set_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t semaphore; + /* end of the kernel processed data */ + } __Reply__semaphore_create_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__semaphore_destroy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_policy_set_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t policy_infoCnt; + integer_t policy_info[16]; + boolean_t get_default; + } __Reply__task_policy_get_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_sample_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_emulation_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_ool_descriptor_t emulation_vector; + /* end of the kernel processed data */ + NDR_record_t NDR; + int vector_start; + mach_msg_type_number_t emulation_vectorCnt; + } __Reply__task_get_emulation_vector_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_emulation_vector_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_ras_pc_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_assign_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_assign_default_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t assigned_set; + /* end of the kernel processed data */ + } __Reply__task_get_assignment_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[144]; + } __Reply__task_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__task_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__task_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__task_subsystem__defined +#define __ReplyUnion__task_subsystem__defined +union __ReplyUnion__task_subsystem { + __Reply__task_create_t Reply_task_create; + __Reply__task_terminate_t Reply_task_terminate; + __Reply__task_threads_t Reply_task_threads; + __Reply__mach_ports_register_t Reply_mach_ports_register; + __Reply__mach_ports_lookup_t Reply_mach_ports_lookup; + __Reply__task_info_t Reply_task_info; + __Reply__task_set_info_t Reply_task_set_info; + __Reply__task_suspend_t Reply_task_suspend; + __Reply__task_resume_t Reply_task_resume; + __Reply__task_get_special_port_t Reply_task_get_special_port; + __Reply__task_set_special_port_t Reply_task_set_special_port; + __Reply__thread_create_t Reply_thread_create; + __Reply__thread_create_running_t Reply_thread_create_running; + __Reply__task_set_exception_ports_t Reply_task_set_exception_ports; + __Reply__task_get_exception_ports_t Reply_task_get_exception_ports; + __Reply__task_swap_exception_ports_t Reply_task_swap_exception_ports; + __Reply__lock_set_create_t Reply_lock_set_create; + __Reply__lock_set_destroy_t Reply_lock_set_destroy; + __Reply__semaphore_create_t Reply_semaphore_create; + __Reply__semaphore_destroy_t Reply_semaphore_destroy; + __Reply__task_policy_set_t Reply_task_policy_set; + __Reply__task_policy_get_t Reply_task_policy_get; + __Reply__task_sample_t Reply_task_sample; + __Reply__task_policy_t Reply_task_policy; + __Reply__task_set_emulation_t Reply_task_set_emulation; + __Reply__task_get_emulation_vector_t Reply_task_get_emulation_vector; + __Reply__task_set_emulation_vector_t Reply_task_set_emulation_vector; + __Reply__task_set_ras_pc_t Reply_task_set_ras_pc; + __Reply__task_assign_t Reply_task_assign; + __Reply__task_assign_default_t Reply_task_assign_default; + __Reply__task_get_assignment_t Reply_task_get_assignment; + __Reply__task_set_policy_t Reply_task_set_policy; + __Reply__task_get_state_t Reply_task_get_state; + __Reply__task_set_state_t Reply_task_set_state; +}; +#endif /* !__RequestUnion__task_subsystem__defined */ + +#ifndef subsystem_to_name_map_task +#define subsystem_to_name_map_task \ + { "task_create", 3400 },\ + { "task_terminate", 3401 },\ + { "task_threads", 3402 },\ + { "mach_ports_register", 3403 },\ + { "mach_ports_lookup", 3404 },\ + { "task_info", 3405 },\ + { "task_set_info", 3406 },\ + { "task_suspend", 3407 },\ + { "task_resume", 3408 },\ + { "task_get_special_port", 3409 },\ + { "task_set_special_port", 3410 },\ + { "thread_create", 3411 },\ + { "thread_create_running", 3412 },\ + { "task_set_exception_ports", 3413 },\ + { "task_get_exception_ports", 3414 },\ + { "task_swap_exception_ports", 3415 },\ + { "lock_set_create", 3416 },\ + { "lock_set_destroy", 3417 },\ + { "semaphore_create", 3418 },\ + { "semaphore_destroy", 3419 },\ + { "task_policy_set", 3420 },\ + { "task_policy_get", 3421 },\ + { "task_sample", 3422 },\ + { "task_policy", 3423 },\ + { "task_set_emulation", 3424 },\ + { "task_get_emulation_vector", 3425 },\ + { "task_set_emulation_vector", 3426 },\ + { "task_set_ras_pc", 3427 },\ + { "task_assign", 3429 },\ + { "task_assign_default", 3430 },\ + { "task_get_assignment", 3431 },\ + { "task_set_policy", 3432 },\ + { "task_get_state", 3433 },\ + { "task_set_state", 3434 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _task_user_ */ diff --git a/i386/include/mach/x86_64/thread_act.h b/i386/include/mach/x86_64/thread_act.h new file mode 100644 index 0000000..fde4189 --- /dev/null +++ b/i386/include/mach/x86_64/thread_act.h @@ -0,0 +1,1155 @@ +#ifndef _thread_act_user_ +#define _thread_act_user_ + +/* Module thread_act */ + +#include <string.h> +#include <mach/ndr.h> +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/notify.h> +#include <mach/mach_types.h> +#include <mach/message.h> +#include <mach/mig_errors.h> +#include <mach/port.h> + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef thread_act_MSG_COUNT +#define thread_act_MSG_COUNT 25 +#endif /* thread_act_MSG_COUNT */ + +#include <mach/std_types.h> +#include <mach/mig.h> +#include <mach/mig.h> +#include <mach/mach_types.h> + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + +#include <sys/cdefs.h> +__BEGIN_DECLS + + +/* Routine thread_terminate */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_terminate +( + thread_act_t target_act +); + +/* Routine act_get_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t act_get_state +( + thread_act_t target_act, + int flavor, + thread_state_t old_state, + mach_msg_type_number_t *old_stateCnt +); + +/* Routine act_set_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t act_set_state +( + thread_act_t target_act, + int flavor, + thread_state_t new_state, + mach_msg_type_number_t new_stateCnt +); + +/* Routine thread_get_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_get_state +( + thread_act_t target_act, + thread_state_flavor_t flavor, + thread_state_t old_state, + mach_msg_type_number_t *old_stateCnt +); + +/* Routine thread_set_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_set_state +( + thread_act_t target_act, + thread_state_flavor_t flavor, + thread_state_t new_state, + mach_msg_type_number_t new_stateCnt +); + +/* Routine thread_suspend */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_suspend +( + thread_act_t target_act +); + +/* Routine thread_resume */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_resume +( + thread_act_t target_act +); + +/* Routine thread_abort */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_abort +( + thread_act_t target_act +); + +/* Routine thread_abort_safely */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_abort_safely +( + thread_act_t target_act +); + +/* Routine thread_depress_abort */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_depress_abort +( + thread_act_t thread +); + +/* Routine thread_get_special_port */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_get_special_port +( + thread_act_t thr_act, + int which_port, + mach_port_t *special_port +); + +/* Routine thread_set_special_port */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_set_special_port +( + thread_act_t thr_act, + int which_port, + mach_port_t special_port +); + +/* Routine thread_info */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_info +( + thread_act_t target_act, + thread_flavor_t flavor, + thread_info_t thread_info_out, + mach_msg_type_number_t *thread_info_outCnt +); + +/* Routine thread_set_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_set_exception_ports +( + thread_act_t thread, + exception_mask_t exception_mask, + mach_port_t new_port, + exception_behavior_t behavior, + thread_state_flavor_t new_flavor +); + +/* Routine thread_get_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_get_exception_ports +( + thread_act_t thread, + exception_mask_t exception_mask, + exception_mask_array_t masks, + mach_msg_type_number_t *masksCnt, + exception_handler_array_t old_handlers, + exception_behavior_array_t old_behaviors, + exception_flavor_array_t old_flavors +); + +/* Routine thread_swap_exception_ports */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_swap_exception_ports +( + thread_act_t thread, + exception_mask_t exception_mask, + mach_port_t new_port, + exception_behavior_t behavior, + thread_state_flavor_t new_flavor, + exception_mask_array_t masks, + mach_msg_type_number_t *masksCnt, + exception_handler_array_t old_handlers, + exception_behavior_array_t old_behaviors, + exception_flavor_array_t old_flavors +); + +/* Routine thread_policy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_policy +( + thread_act_t thr_act, + policy_t policy, + policy_base_t base, + mach_msg_type_number_t baseCnt, + boolean_t set_limit +); + +/* Routine thread_policy_set */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_policy_set +( + thread_act_t thread, + thread_policy_flavor_t flavor, + thread_policy_t policy_info, + mach_msg_type_number_t policy_infoCnt +); + +/* Routine thread_policy_get */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_policy_get +( + thread_act_t thread, + thread_policy_flavor_t flavor, + thread_policy_t policy_info, + mach_msg_type_number_t *policy_infoCnt, + boolean_t *get_default +); + +/* Routine thread_sample */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_sample +( + thread_act_t thread, + mach_port_t reply +); + +/* Routine etap_trace_thread */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t etap_trace_thread +( + thread_act_t target_act, + boolean_t trace_status +); + +/* Routine thread_assign */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_assign +( + thread_act_t thread, + processor_set_t new_set +); + +/* Routine thread_assign_default */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_assign_default +( + thread_act_t thread +); + +/* Routine thread_get_assignment */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_get_assignment +( + thread_act_t thread, + processor_set_name_t *assigned_set +); + +/* Routine thread_set_policy */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t thread_set_policy +( + thread_act_t thr_act, + processor_set_t pset, + policy_t policy, + policy_base_t base, + mach_msg_type_number_t baseCnt, + policy_limit_t limit, + mach_msg_type_number_t limitCnt +); + +__END_DECLS + +/********************** Caution **************************/ +/* The following data types should be used to calculate */ +/* maximum message sizes only. The actual message may be */ +/* smaller, and the position of the arguments within the */ +/* message layout may vary from what is presented here. */ +/* For example, if any of the arguments are variable- */ +/* sized, and less than the maximum is sent, the data */ +/* will be packed tight in the actual message to reduce */ +/* the presence of holes. */ +/********************** Caution **************************/ + +/* typedefs for all requests */ + +#ifndef __Request__thread_act_subsystem__defined +#define __Request__thread_act_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_terminate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int flavor; + mach_msg_type_number_t old_stateCnt; + } __Request__act_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[144]; + } __Request__act_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_state_flavor_t flavor; + mach_msg_type_number_t old_stateCnt; + } __Request__thread_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_state_flavor_t flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[144]; + } __Request__thread_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_suspend_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_resume_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_abort_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_abort_safely_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_depress_abort_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + int which_port; + } __Request__thread_get_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t special_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + int which_port; + } __Request__thread_set_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_flavor_t flavor; + mach_msg_type_number_t thread_info_outCnt; + } __Request__thread_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_mask_t exception_mask; + exception_behavior_t behavior; + thread_state_flavor_t new_flavor; + } __Request__thread_set_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + exception_mask_t exception_mask; + } __Request__thread_get_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_mask_t exception_mask; + exception_behavior_t behavior; + thread_state_flavor_t new_flavor; + } __Request__thread_swap_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + policy_t policy; + mach_msg_type_number_t baseCnt; + integer_t base[5]; + boolean_t set_limit; + } __Request__thread_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_policy_flavor_t flavor; + mach_msg_type_number_t policy_infoCnt; + integer_t policy_info[16]; + } __Request__thread_policy_set_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + thread_policy_flavor_t flavor; + mach_msg_type_number_t policy_infoCnt; + boolean_t get_default; + } __Request__thread_policy_get_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t reply; + /* end of the kernel processed data */ + } __Request__thread_sample_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + boolean_t trace_status; + } __Request__etap_trace_thread_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t new_set; + /* end of the kernel processed data */ + } __Request__thread_assign_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_assign_default_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + } __Request__thread_get_assignment_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t pset; + /* end of the kernel processed data */ + NDR_record_t NDR; + policy_t policy; + mach_msg_type_number_t baseCnt; + integer_t base[5]; + mach_msg_type_number_t limitCnt; + integer_t limit[1]; + } __Request__thread_set_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__thread_act_subsystem__defined */ + +/* union of all requests */ + +#ifndef __RequestUnion__thread_act_subsystem__defined +#define __RequestUnion__thread_act_subsystem__defined +union __RequestUnion__thread_act_subsystem { + __Request__thread_terminate_t Request_thread_terminate; + __Request__act_get_state_t Request_act_get_state; + __Request__act_set_state_t Request_act_set_state; + __Request__thread_get_state_t Request_thread_get_state; + __Request__thread_set_state_t Request_thread_set_state; + __Request__thread_suspend_t Request_thread_suspend; + __Request__thread_resume_t Request_thread_resume; + __Request__thread_abort_t Request_thread_abort; + __Request__thread_abort_safely_t Request_thread_abort_safely; + __Request__thread_depress_abort_t Request_thread_depress_abort; + __Request__thread_get_special_port_t Request_thread_get_special_port; + __Request__thread_set_special_port_t Request_thread_set_special_port; + __Request__thread_info_t Request_thread_info; + __Request__thread_set_exception_ports_t Request_thread_set_exception_ports; + __Request__thread_get_exception_ports_t Request_thread_get_exception_ports; + __Request__thread_swap_exception_ports_t Request_thread_swap_exception_ports; + __Request__thread_policy_t Request_thread_policy; + __Request__thread_policy_set_t Request_thread_policy_set; + __Request__thread_policy_get_t Request_thread_policy_get; + __Request__thread_sample_t Request_thread_sample; + __Request__etap_trace_thread_t Request_etap_trace_thread; + __Request__thread_assign_t Request_thread_assign; + __Request__thread_assign_default_t Request_thread_assign_default; + __Request__thread_get_assignment_t Request_thread_get_assignment; + __Request__thread_set_policy_t Request_thread_set_policy; +}; +#endif /* !__RequestUnion__thread_act_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__thread_act_subsystem__defined +#define __Reply__thread_act_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_terminate_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[144]; + } __Reply__act_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__act_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[144]; + } __Reply__thread_get_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_set_state_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_suspend_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_resume_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_abort_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_abort_safely_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_depress_abort_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t special_port; + /* end of the kernel processed data */ + } __Reply__thread_get_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_set_special_port_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t thread_info_outCnt; + integer_t thread_info_out[12]; + } __Reply__thread_info_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_set_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t old_handlers[32]; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t masksCnt; + exception_mask_t masks[32]; + exception_behavior_t old_behaviors[32]; + thread_state_flavor_t old_flavors[32]; + } __Reply__thread_get_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t old_handlers[32]; + /* end of the kernel processed data */ + NDR_record_t NDR; + mach_msg_type_number_t masksCnt; + exception_mask_t masks[32]; + exception_behavior_t old_behaviors[32]; + thread_state_flavor_t old_flavors[32]; + } __Reply__thread_swap_exception_ports_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_policy_set_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + mach_msg_type_number_t policy_infoCnt; + integer_t policy_info[16]; + boolean_t get_default; + } __Reply__thread_policy_get_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_sample_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__etap_trace_thread_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_assign_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_assign_default_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t assigned_set; + /* end of the kernel processed data */ + } __Reply__thread_get_assignment_t; +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__thread_set_policy_t; +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__thread_act_subsystem__defined */ + +/* union of all replies */ + +#ifndef __ReplyUnion__thread_act_subsystem__defined +#define __ReplyUnion__thread_act_subsystem__defined +union __ReplyUnion__thread_act_subsystem { + __Reply__thread_terminate_t Reply_thread_terminate; + __Reply__act_get_state_t Reply_act_get_state; + __Reply__act_set_state_t Reply_act_set_state; + __Reply__thread_get_state_t Reply_thread_get_state; + __Reply__thread_set_state_t Reply_thread_set_state; + __Reply__thread_suspend_t Reply_thread_suspend; + __Reply__thread_resume_t Reply_thread_resume; + __Reply__thread_abort_t Reply_thread_abort; + __Reply__thread_abort_safely_t Reply_thread_abort_safely; + __Reply__thread_depress_abort_t Reply_thread_depress_abort; + __Reply__thread_get_special_port_t Reply_thread_get_special_port; + __Reply__thread_set_special_port_t Reply_thread_set_special_port; + __Reply__thread_info_t Reply_thread_info; + __Reply__thread_set_exception_ports_t Reply_thread_set_exception_ports; + __Reply__thread_get_exception_ports_t Reply_thread_get_exception_ports; + __Reply__thread_swap_exception_ports_t Reply_thread_swap_exception_ports; + __Reply__thread_policy_t Reply_thread_policy; + __Reply__thread_policy_set_t Reply_thread_policy_set; + __Reply__thread_policy_get_t Reply_thread_policy_get; + __Reply__thread_sample_t Reply_thread_sample; + __Reply__etap_trace_thread_t Reply_etap_trace_thread; + __Reply__thread_assign_t Reply_thread_assign; + __Reply__thread_assign_default_t Reply_thread_assign_default; + __Reply__thread_get_assignment_t Reply_thread_get_assignment; + __Reply__thread_set_policy_t Reply_thread_set_policy; +}; +#endif /* !__RequestUnion__thread_act_subsystem__defined */ + +#ifndef subsystem_to_name_map_thread_act +#define subsystem_to_name_map_thread_act \ + { "thread_terminate", 3600 },\ + { "act_get_state", 3601 },\ + { "act_set_state", 3602 },\ + { "thread_get_state", 3603 },\ + { "thread_set_state", 3604 },\ + { "thread_suspend", 3605 },\ + { "thread_resume", 3606 },\ + { "thread_abort", 3607 },\ + { "thread_abort_safely", 3608 },\ + { "thread_depress_abort", 3609 },\ + { "thread_get_special_port", 3610 },\ + { "thread_set_special_port", 3611 },\ + { "thread_info", 3612 },\ + { "thread_set_exception_ports", 3613 },\ + { "thread_get_exception_ports", 3614 },\ + { "thread_swap_exception_ports", 3615 },\ + { "thread_policy", 3616 },\ + { "thread_policy_set", 3617 },\ + { "thread_policy_get", 3618 },\ + { "thread_sample", 3619 },\ + { "etap_trace_thread", 3620 },\ + { "thread_assign", 3621 },\ + { "thread_assign_default", 3622 },\ + { "thread_get_assignment", 3623 },\ + { "thread_set_policy", 3624 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _thread_act_user_ */ diff --git a/i386/include/machine/_limits.h b/i386/include/machine/_limits.h new file mode 100644 index 0000000..373e726 --- /dev/null +++ b/i386/include/machine/_limits.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2004-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _BSD_MACHINE__LIMITS_H_ +#define _BSD_MACHINE__LIMITS_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _BSD_MACHINE__LIMITS_H_ */ diff --git a/i386/include/machine/_param.h b/i386/include/machine/_param.h new file mode 100644 index 0000000..4171fd0 --- /dev/null +++ b/i386/include/machine/_param.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2004-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#if defined (__ppc__) || defined (__ppc64__) +#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 diff --git a/i386/include/machine/_structs.h b/i386/include/machine/_structs.h new file mode 100644 index 0000000..0e35938 --- /dev/null +++ b/i386/include/machine/_structs.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2004-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#if defined (__ppc__) || defined (__ppc64__) +#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 diff --git a/i386/include/machine/_types.h b/i386/include/machine/_types.h new file mode 100644 index 0000000..9f2d6d2 --- /dev/null +++ b/i386/include/machine/_types.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2003-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _BSD_MACHINE__TYPES_H_ +#define _BSD_MACHINE__TYPES_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _BSD_MACHINE__TYPES_H_ */ diff --git a/i386/include/machine/byte_order.h b/i386/include/machine/byte_order.h new file mode 100644 index 0000000..4008142 --- /dev/null +++ b/i386/include/machine/byte_order.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1995 NeXT Computer, Inc. + */ + +#ifndef _BSD_MACHINE_BYTE_ORDER_H_ +#define _BSD_MACHINE_BYTE_ORDER_H_ + +#include <architecture/byte_order.h> + +#endif /* _BSD_MACHINE_BYTE_ORDER_H_ */ diff --git a/i386/include/machine/endian.h b/i386/include/machine/endian.h new file mode 100644 index 0000000..a49d52a --- /dev/null +++ b/i386/include/machine/endian.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright 1995 NeXT Computer, Inc. All rights reserved. + */ +#ifndef _BSD_MACHINE_ENDIAN_H_ +#define _BSD_MACHINE_ENDIAN_H_ + +#if defined (__ppc__) || defined(__ppc64__) +#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 + +#endif /* _BSD_MACHINE_ENDIAN_H_ */ diff --git a/i386/include/machine/fasttrap_isa.h b/i386/include/machine/fasttrap_isa.h new file mode 100644 index 0000000..fa881d3 --- /dev/null +++ b/i386/include/machine/fasttrap_isa.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _BSD_MACHINE_FASTTRAP_ISA_H_ +#define _BSD_MACHINE_FASTTRAP_ISA_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _BSD_MACHINE_FASTTRAP_ISA_H_ */ diff --git a/i386/include/machine/limits.h b/i386/include/machine/limits.h new file mode 100644 index 0000000..d52080f --- /dev/null +++ b/i386/include/machine/limits.h @@ -0,0 +1,13 @@ +/* This is the `system' limits.h, independent of any particular + compiler. GCC provides its own limits.h which can be found in + /usr/lib/gcc, although it is not very informative. + This file is public domain. */ +#if defined (__ppc__) || defined (__ppc64__) +#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 diff --git a/i386/include/machine/param.h b/i386/include/machine/param.h new file mode 100644 index 0000000..0b2a2ad --- /dev/null +++ b/i386/include/machine/param.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright 1995 NeXT Computer, Inc. All rights reserved. + */ +#ifndef _BSD_MACHINE_PARAM_H_ +#define _BSD_MACHINE_PARAM_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _BSD_MACHINE_PARAM_H_ */ diff --git a/i386/include/machine/profile.h b/i386/include/machine/profile.h new file mode 100644 index 0000000..45e4de8 --- /dev/null +++ b/i386/include/machine/profile.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 1997-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * History : + * 29-Sep-1997 Umesh Vaishampayan + * Created. + */ +#ifndef _BSD_MACHINE_PROFILE_H_ +#define _BSD_MACHINE_PROFILE_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _BSD_MACHINE_PROFILE_H_ */ diff --git a/i386/include/machine/setjmp.h b/i386/include/machine/setjmp.h new file mode 100644 index 0000000..9aa71b5 --- /dev/null +++ b/i386/include/machine/setjmp.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved + */ +#ifndef _MACHINE_SETJMP_H_ +#define _MACHINE_SETJMP_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _MACHINE_SETJMP_H_ */ diff --git a/i386/include/machine/signal.h b/i386/include/machine/signal.h new file mode 100644 index 0000000..7457d1c --- /dev/null +++ b/i386/include/machine/signal.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _BSD_MACHINE_SIGNAL_H_ +#define _BSD_MACHINE_SIGNAL_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _BSD_MACHINE_SIGNAL_H_ */ diff --git a/i386/include/machine/types.h b/i386/include/machine/types.h new file mode 100644 index 0000000..2bff809 --- /dev/null +++ b/i386/include/machine/types.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright 1995 NeXT Computer, Inc. All rights reserved. + */ +#ifndef _BSD_MACHINE_TYPES_H_ +#define _BSD_MACHINE_TYPES_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _BSD_MACHINE_TYPES_H_ */ diff --git a/i386/include/machine/vmparam.h b/i386/include/machine/vmparam.h new file mode 100644 index 0000000..d9d0d74 --- /dev/null +++ b/i386/include/machine/vmparam.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _BSD_MACHINE_VMPARAM_H_ +#define _BSD_MACHINE_VMPARAM_H_ + +#if defined (__ppc__) || defined (__ppc64__) +#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 + +#endif /* _BSD_MACHINE_VMPARAM_H_ */ diff --git a/i386/include/math.h b/i386/include/math.h new file mode 100644 index 0000000..6b2172f --- /dev/null +++ b/i386/include/math.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef __MATH_H__ +#define __MATH_H__ + +#if (defined(__ppc__) || defined(__ppc64__)) +#include "architecture/ppc/math.h" +#elif (defined (__i386__) || defined( __x86_64__ )) +#include "architecture/i386/math.h" +#elif defined(__arm__) +#include "architecture/arm/math.h" +#else +#error Unknown architecture +#endif + +#endif /* __MATH_H__ */ diff --git a/i386/include/pexpert/boot.h b/i386/include/pexpert/boot.h new file mode 100644 index 0000000..f26ec4a --- /dev/null +++ b/i386/include/pexpert/boot.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _PEXPERT_BOOT_H_ +#define _PEXPERT_BOOT_H_ + +#include <pexpert/machine/boot.h> + +#endif /* _PEXPERT_BOOT_H_ */ diff --git a/i386/include/pexpert/i386/boot.h b/i386/include/pexpert/i386/boot.h new file mode 100644 index 0000000..369c2c4 --- /dev/null +++ b/i386/include/pexpert/i386/boot.h @@ -0,0 +1,177 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _PEXPERT_I386_BOOT_H +#define _PEXPERT_I386_BOOT_H + +#include <stdint.h> + +/* + * What the booter leaves behind for the kernel. + */ + +/* + * Types of boot driver that may be loaded by the booter. + */ +enum { + kBootDriverTypeInvalid = 0, + kBootDriverTypeKEXT = 1, + kBootDriverTypeMKEXT = 2 +}; + +enum { + kEfiReservedMemoryType = 0, + kEfiLoaderCode = 1, + kEfiLoaderData = 2, + kEfiBootServicesCode = 3, + kEfiBootServicesData = 4, + kEfiRuntimeServicesCode = 5, + kEfiRuntimeServicesData = 6, + kEfiConventionalMemory = 7, + kEfiUnusableMemory = 8, + kEfiACPIReclaimMemory = 9, + kEfiACPIMemoryNVS = 10, + kEfiMemoryMappedIO = 11, + kEfiMemoryMappedIOPortSpace = 12, + kEfiPalCode = 13, + kEfiMaxMemoryType = 14 +}; + +/* + * Memory range descriptor. + */ +typedef struct EfiMemoryRange { + uint32_t Type; + uint32_t Pad; + uint64_t PhysicalStart; + uint64_t VirtualStart; + uint64_t NumberOfPages; + uint64_t Attribute; +} EfiMemoryRange; + +#define BOOT_LINE_LENGTH 1024 +#define BOOT_STRING_LEN BOOT_LINE_LENGTH + +/* + * Video information.. + */ + +struct Boot_Video { + uint32_t v_baseAddr; /* Base address of video memory */ + uint32_t v_display; /* Display Code (if Applicable */ + uint32_t v_rowBytes; /* Number of bytes per pixel row */ + uint32_t v_width; /* Width */ + uint32_t v_height; /* Height */ + uint32_t v_depth; /* Pixel Depth */ +}; + +typedef struct Boot_Video Boot_Video; + +/* Values for v_display */ + +#define GRAPHICS_MODE 1 +#define FB_TEXT_MODE 2 + +/* Struct describing an image passed in by the booter */ +struct boot_icon_element { + unsigned int width; + unsigned int height; + int y_offset_from_center; + unsigned int data_size; + unsigned int __reserved1[4]; + unsigned char data[0]; +}; +typedef struct boot_icon_element boot_icon_element; + +/* Boot argument structure - passed into Mach kernel at boot time. + * "Revision" can be incremented for compatible changes + */ +#define kBootArgsRevision 0 +#define kBootArgsVersion 2 + +/* Snapshot constants of previous revisions that are supported */ +#define kBootArgsVersion1 1 +#define kBootArgsVersion2 2 +#define kBootArgsRevision2_0 0 + +#define kBootArgsEfiMode32 32 +#define kBootArgsEfiMode64 64 + +/* Bitfields for boot_args->flags */ +#define kBootArgsFlagRebootOnPanic (1 << 0) +#define kBootArgsFlagHiDPI (1 << 1) + +typedef struct boot_args { + uint16_t Revision; /* Revision of boot_args structure */ + uint16_t Version; /* Version of boot_args structure */ + + uint8_t efiMode; /* 32 = 32-bit, 64 = 64-bit */ + uint8_t debugMode; /* Bit field with behavior changes */ + uint16_t flags; + + char CommandLine[BOOT_LINE_LENGTH]; /* Passed in command line */ + + uint32_t MemoryMap; /* Physical address of memory map */ + uint32_t MemoryMapSize; + uint32_t MemoryMapDescriptorSize; + uint32_t MemoryMapDescriptorVersion; + + Boot_Video Video; /* Video Information */ + + uint32_t deviceTreeP; /* Physical address of flattened device tree */ + uint32_t deviceTreeLength; /* Length of flattened tree */ + + uint32_t kaddr; /* Physical address of beginning of kernel text */ + uint32_t ksize; /* Size of combined kernel text+data+efi */ + + uint32_t efiRuntimeServicesPageStart; /* physical address of defragmented runtime pages */ + uint32_t efiRuntimeServicesPageCount; + uint64_t efiRuntimeServicesVirtualPageStart; /* virtual address of defragmented runtime pages */ + + uint32_t efiSystemTable; /* physical address of system table in runtime area */ + uint32_t kslide; + + uint32_t performanceDataStart; /* physical address of log */ + uint32_t performanceDataSize; + + uint32_t keyStoreDataStart; /* physical address of key store data */ + uint32_t keyStoreDataSize; + uint64_t bootMemStart; + uint64_t bootMemSize; + uint64_t PhysicalMemorySize; + uint64_t FSBFrequency; + uint64_t pciConfigSpaceBaseAddress; + uint32_t pciConfigSpaceStartBusNumber; + uint32_t pciConfigSpaceEndBusNumber; + uint32_t __reserved4[730]; + +} boot_args; + +extern char assert_boot_args_size_is_4096[sizeof(boot_args) == 4096 ? 1 : -1]; + +#endif /* _PEXPERT_I386_BOOT_H */ + diff --git a/i386/include/pexpert/i386/efi.h b/i386/include/pexpert/i386/efi.h new file mode 100644 index 0000000..5ef5015 --- /dev/null +++ b/i386/include/pexpert/i386/efi.h @@ -0,0 +1,558 @@ +/* + * Copyright (c) 2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _PEXPERT_I386_EFI_H +#define _PEXPERT_I386_EFI_H + +#include <stdint.h> + +typedef uint8_t EFI_UINT8; +typedef uint16_t EFI_UINT16; +typedef uint32_t EFI_UINT32; +typedef uint64_t EFI_UINT64; + +typedef uint32_t EFI_UINTN; /* natural size for firmware, not kernel */ + +typedef int8_t EFI_INT8; +typedef int16_t EFI_INT16; +typedef int32_t EFI_INT32; +typedef int64_t EFI_INT64; + +typedef int8_t EFI_CHAR8; +typedef int16_t EFI_CHAR16; +typedef int32_t EFI_CHAR32; +typedef int64_t EFI_CHAR64; + +typedef uint32_t EFI_STATUS; +typedef uint8_t EFI_BOOLEAN; +typedef void VOID; + +typedef uint32_t EFI_PTR32; +typedef uint32_t EFI_HANDLE32; + +typedef uint64_t EFI_PTR64; +typedef uint64_t EFI_HANDLE64; +/* + +Portions Copyright 2004, Intel Corporation +All rights reserved. This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +*/ + + +// +// Modifiers for EFI Runtime and Boot Services +// +#define EFI_RUNTIMESERVICE +#define EFIAPI +#define IN +#define OUT +#define OPTIONAL + +#define EFI_MAX_BIT 0x80000000 + +// +// Set the upper bit to indicate EFI Error. +// +#define EFIERR(a) (EFI_MAX_BIT | (a)) + +#define EFIWARN(a) (a) +#define EFI_ERROR(a) (((INTN) (a)) < 0) + +#define EFI_SUCCESS 0 +#define EFI_LOAD_ERROR EFIERR (1) +#define EFI_INVALID_PARAMETER EFIERR (2) +#define EFI_UNSUPPORTED EFIERR (3) +#define EFI_BAD_BUFFER_SIZE EFIERR (4) +#define EFI_BUFFER_TOO_SMALL EFIERR (5) +#define EFI_NOT_READY EFIERR (6) +#define EFI_DEVICE_ERROR EFIERR (7) +#define EFI_WRITE_PROTECTED EFIERR (8) +#define EFI_OUT_OF_RESOURCES EFIERR (9) +#define EFI_VOLUME_CORRUPTED EFIERR (10) +#define EFI_VOLUME_FULL EFIERR (11) +#define EFI_NO_MEDIA EFIERR (12) +#define EFI_MEDIA_CHANGED EFIERR (13) +#define EFI_NOT_FOUND EFIERR (14) +#define EFI_ACCESS_DENIED EFIERR (15) +#define EFI_NO_RESPONSE EFIERR (16) +#define EFI_NO_MAPPING EFIERR (17) +#define EFI_TIMEOUT EFIERR (18) +#define EFI_NOT_STARTED EFIERR (19) +#define EFI_ALREADY_STARTED EFIERR (20) +#define EFI_ABORTED EFIERR (21) +#define EFI_ICMP_ERROR EFIERR (22) +#define EFI_TFTP_ERROR EFIERR (23) +#define EFI_PROTOCOL_ERROR EFIERR (24) +#define EFI_INCOMPATIBLE_VERSION EFIERR (25) +#define EFI_SECURITY_VIOLATION EFIERR (26) +#define EFI_CRC_ERROR EFIERR (27) + +#define EFI_WARN_UNKNOWN_GLYPH EFIWARN (1) +#define EFI_WARN_DELETE_FAILURE EFIWARN (2) +#define EFI_WARN_WRITE_FAILURE EFIWARN (3) +#define EFI_WARN_BUFFER_TOO_SMALL EFIWARN (4) + +// +// EFI Specification Revision information +// +#define EFI_SPECIFICATION_MAJOR_REVISION 1 +#define EFI_SPECIFICATION_MINOR_REVISION 10 + +typedef struct { + EFI_UINT32 Data1; + EFI_UINT16 Data2; + EFI_UINT16 Data3; + EFI_UINT8 Data4[8]; +} EFI_GUID; + +#define APPLE_VENDOR_GUID \ + {0xAC39C713, 0x7E50, 0x423D, {0x88, 0x9D, 0x27,0x8F, 0xCC, 0x34, 0x22, 0xB6} } + +#define EFI_GLOBAL_VARIABLE_GUID \ + {0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C} } + +typedef union { + EFI_GUID Guid; + EFI_UINT8 Raw[16]; +} EFI_GUID_UNION; + +// +// EFI Time Abstraction: +// Year: 2000 - 20XX +// Month: 1 - 12 +// Day: 1 - 31 +// Hour: 0 - 23 +// Minute: 0 - 59 +// Second: 0 - 59 +// Nanosecond: 0 - 999,999,999 +// TimeZone: -1440 to 1440 or 2047 +// +typedef struct { + EFI_UINT16 Year; + EFI_UINT8 Month; + EFI_UINT8 Day; + EFI_UINT8 Hour; + EFI_UINT8 Minute; + EFI_UINT8 Second; + EFI_UINT8 Pad1; + EFI_UINT32 Nanosecond; + EFI_INT16 TimeZone; + EFI_UINT8 Daylight; + EFI_UINT8 Pad2; +} EFI_TIME; + +// +// Bit definitions for EFI_TIME.Daylight +// +#define EFI_TIME_ADJUST_DAYLIGHT 0x01 +#define EFI_TIME_IN_DAYLIGHT 0x02 + +// +// Value definition for EFI_TIME.TimeZone +// +#define EFI_UNSPECIFIED_TIMEZONE 0x07FF + +typedef enum { + EfiReservedMemoryType, + EfiLoaderCode, + EfiLoaderData, + EfiBootServicesCode, + EfiBootServicesData, + EfiRuntimeServicesCode, + EfiRuntimeServicesData, + EfiConventionalMemory, + EfiUnusableMemory, + EfiACPIReclaimMemory, + EfiACPIMemoryNVS, + EfiMemoryMappedIO, + EfiMemoryMappedIOPortSpace, + EfiPalCode, + EfiMaxMemoryType +} EFI_MEMORY_TYPE; + +typedef struct { + EFI_UINT64 Signature; + EFI_UINT32 Revision; + EFI_UINT32 HeaderSize; + EFI_UINT32 CRC32; + EFI_UINT32 Reserved; +} __attribute__((aligned(8))) EFI_TABLE_HEADER; + +// +// possible caching types for the memory range +// +#define EFI_MEMORY_UC 0x0000000000000001ULL +#define EFI_MEMORY_WC 0x0000000000000002ULL +#define EFI_MEMORY_WT 0x0000000000000004ULL +#define EFI_MEMORY_WB 0x0000000000000008ULL +#define EFI_MEMORY_UCE 0x0000000000000010ULL + +// +// physical memory protection on range +// +#define EFI_MEMORY_WP 0x0000000000001000ULL +#define EFI_MEMORY_RP 0x0000000000002000ULL +#define EFI_MEMORY_XP 0x0000000000004000ULL + +// +// range requires a runtime mapping +// +#define EFI_MEMORY_RUNTIME 0x8000000000000000ULL +#define EFI_MEMORY_KERN_RESERVED (1ULL << 59) +typedef EFI_UINT64 EFI_PHYSICAL_ADDRESS; +typedef EFI_UINT64 EFI_VIRTUAL_ADDRESS; + +#define EFI_MEMORY_DESCRIPTOR_VERSION 1 +typedef struct { + EFI_UINT32 Type; + EFI_UINT32 Pad; + EFI_PHYSICAL_ADDRESS PhysicalStart; + EFI_VIRTUAL_ADDRESS VirtualStart; + EFI_UINT64 NumberOfPages; + EFI_UINT64 Attribute; +} __attribute__((aligned(8))) EFI_MEMORY_DESCRIPTOR; + + +typedef +EFI_RUNTIMESERVICE +EFI_STATUS +(EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP) ( + IN EFI_UINTN MemoryMapSize, + IN EFI_UINTN DescriptorSize, + IN EFI_UINT32 DescriptorVersion, + IN EFI_MEMORY_DESCRIPTOR * VirtualMap + ); + +typedef +EFI_RUNTIMESERVICE +EFI_STATUS +(EFIAPI *EFI_CONVERT_POINTER) ( + IN EFI_UINTN DebugDisposition, + IN OUT VOID **Address + ); + +// +// Variable attributes +// +#define EFI_VARIABLE_NON_VOLATILE 0x00000001 +#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 +#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 +#define EFI_VARIABLE_READ_ONLY 0x00000008 + +typedef +EFI_RUNTIMESERVICE +EFI_STATUS +(EFIAPI *EFI_GET_VARIABLE) ( + IN EFI_CHAR16 * VariableName, + IN EFI_GUID * VendorGuid, + OUT EFI_UINT32 * Attributes OPTIONAL, + IN OUT EFI_UINTN * DataSize, + OUT VOID * Data + ); + +typedef +EFI_RUNTIMESERVICE +EFI_STATUS +(EFIAPI *EFI_GET_NEXT_VARIABLE_NAME) ( + IN OUT EFI_UINTN * VariableNameSize, + IN OUT EFI_CHAR16 * VariableName, + IN OUT EFI_GUID * VendorGuid + ); + +typedef +EFI_RUNTIMESERVICE +EFI_STATUS +(EFIAPI *EFI_SET_VARIABLE) ( + IN EFI_CHAR16 * VariableName, + IN EFI_GUID * VendorGuid, + IN EFI_UINT32 Attributes, + IN EFI_UINTN DataSize, + IN VOID * Data + ); + +// +// EFI Time +// +typedef struct { + EFI_UINT32 Resolution; + EFI_UINT32 Accuracy; + EFI_BOOLEAN SetsToZero; +} __attribute__((aligned(4))) EFI_TIME_CAPABILITIES; + +typedef +EFI_RUNTIMESERVICE +EFI_STATUS +(EFIAPI *EFI_GET_TIME) ( + OUT EFI_TIME * Time, + OUT EFI_TIME_CAPABILITIES * Capabilities OPTIONAL + ); + +typedef +EFI_RUNTIMESERVICE +EFI_STATUS +(EFIAPI *EFI_SET_TIME) ( + IN EFI_TIME * Time + ); + +typedef +EFI_RUNTIMESERVICE +EFI_STATUS +(EFIAPI *EFI_GET_WAKEUP_TIME) ( + OUT EFI_BOOLEAN * Enabled, + OUT EFI_BOOLEAN * Pending, + OUT EFI_TIME * Time + ); + +typedef +EFI_RUNTIMESERVICE +EFI_STATUS +(EFIAPI *EFI_SET_WAKEUP_TIME) ( + IN EFI_BOOLEAN Enable, + IN EFI_TIME * Time OPTIONAL + ); + +typedef enum { + EfiResetCold, + EfiResetWarm, + EfiResetShutdown, + +#ifdef TIANO_EXTENSION_FLAG + EfiResetUpdate +#endif + +} EFI_RESET_TYPE; + +typedef +EFI_RUNTIMESERVICE +VOID +(EFIAPI *EFI_RESET_SYSTEM) ( + IN EFI_RESET_TYPE ResetType, + IN EFI_STATUS ResetStatus, + IN EFI_UINTN DataSize, + IN EFI_CHAR16 * ResetData OPTIONAL + ); + +typedef +EFI_RUNTIMESERVICE +EFI_STATUS +(EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT) ( + OUT EFI_UINT32 * HighCount + ); + +// +// Definition of Status Code extended data header +// +// HeaderSize The size of the architecture. This is specified to enable +// the future expansion +// +// Size The size of the data in bytes. This does not include the size +// of the header structure. +// +// Type A GUID defining the type of the data +// +// +#ifdef TIANO_EXTENSION_FLAG + +typedef +EFI_RUNTIMESERVICE +EFI_STATUS +(EFIAPI *EFI_REPORT_STATUS_CODE) ( + IN EFI_STATUS_CODE_TYPE Type, + IN EFI_STATUS_CODE_VALUE Value, + IN EFI_UINT32 Instance, + IN EFI_GUID * CallerId OPTIONAL, + IN EFI_STATUS_CODE_DATA * Data OPTIONAL + ); + +#endif +// +// EFI Runtime Services Table +// +#define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552ULL +#define EFI_RUNTIME_SERVICES_REVISION ((EFI_SPECIFICATION_MAJOR_REVISION << 16) | (EFI_SPECIFICATION_MINOR_REVISION)) + +typedef struct { + EFI_TABLE_HEADER Hdr; + + // + // Time services + // + EFI_PTR32 GetTime; + EFI_PTR32 SetTime; + EFI_PTR32 GetWakeupTime; + EFI_PTR32 SetWakeupTime; + + // + // Virtual memory services + // + EFI_PTR32 SetVirtualAddressMap; + EFI_PTR32 ConvertPointer; + + // + // Variable services + // + EFI_PTR32 GetVariable; + EFI_PTR32 GetNextVariableName; + EFI_PTR32 SetVariable; + + // + // Misc + // + EFI_PTR32 GetNextHighMonotonicCount; + EFI_PTR32 ResetSystem; + +#ifdef TIANO_EXTENSION_FLAG + // + // //////////////////////////////////////////////////// + // Extended EFI Services + ////////////////////////////////////////////////////// + // + EFI_PTR32 ReportStatusCode; +#endif + +} __attribute__((aligned(8))) EFI_RUNTIME_SERVICES_32; + +typedef struct { + EFI_TABLE_HEADER Hdr; + + // + // Time services + // + EFI_PTR64 GetTime; + EFI_PTR64 SetTime; + EFI_PTR64 GetWakeupTime; + EFI_PTR64 SetWakeupTime; + + // + // Virtual memory services + // + EFI_PTR64 SetVirtualAddressMap; + EFI_PTR64 ConvertPointer; + + // + // Variable services + // + EFI_PTR64 GetVariable; + EFI_PTR64 GetNextVariableName; + EFI_PTR64 SetVariable; + + // + // Misc + // + EFI_PTR64 GetNextHighMonotonicCount; + EFI_PTR64 ResetSystem; + +#ifdef TIANO_EXTENSION_FLAG + // + // //////////////////////////////////////////////////// + // Extended EFI Services + ////////////////////////////////////////////////////// + // + EFI_PTR64 ReportStatusCode; +#endif + +} __attribute__((aligned(8))) EFI_RUNTIME_SERVICES_64; + +// +// EFI Configuration Table +// +typedef struct { + EFI_GUID VendorGuid; + EFI_PTR32 VendorTable; +} EFI_CONFIGURATION_TABLE_32; + +typedef struct { + EFI_GUID VendorGuid; + EFI_PTR64 VendorTable; +} __attribute__((aligned(8))) EFI_CONFIGURATION_TABLE_64; + +// +// EFI System Table +// +#define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249ULL +#define EFI_SYSTEM_TABLE_REVISION ((EFI_SPECIFICATION_MAJOR_REVISION << 16) | (EFI_SPECIFICATION_MINOR_REVISION)) +#define EFI_2_00_SYSTEM_TABLE_REVISION ((2 << 16) | 00) +#define EFI_1_02_SYSTEM_TABLE_REVISION ((1 << 16) | 02) +#define EFI_1_10_SYSTEM_TABLE_REVISION ((1 << 16) | 10) + +typedef struct EFI_SYSTEM_TABLE_32 { + EFI_TABLE_HEADER Hdr; + + EFI_PTR32 FirmwareVendor; + EFI_UINT32 FirmwareRevision; + + EFI_HANDLE32 ConsoleInHandle; + EFI_PTR32 ConIn; + + EFI_HANDLE32 ConsoleOutHandle; + EFI_PTR32 ConOut; + + EFI_HANDLE32 StandardErrorHandle; + EFI_PTR32 StdErr; + + EFI_PTR32 RuntimeServices; + EFI_PTR32 BootServices; + + EFI_UINT32 NumberOfTableEntries; + EFI_PTR32 ConfigurationTable; + +} __attribute__((aligned(8))) EFI_SYSTEM_TABLE_32; + +typedef struct EFI_SYSTEM_TABLE_64 { + EFI_TABLE_HEADER Hdr; + + EFI_PTR64 FirmwareVendor; + EFI_UINT32 FirmwareRevision; + + EFI_UINT32 __pad; + + EFI_HANDLE64 ConsoleInHandle; + EFI_PTR64 ConIn; + + EFI_HANDLE64 ConsoleOutHandle; + EFI_PTR64 ConOut; + + EFI_HANDLE64 StandardErrorHandle; + EFI_PTR64 StdErr; + + EFI_PTR64 RuntimeServices; + EFI_PTR64 BootServices; + + EFI_UINT64 NumberOfTableEntries; + EFI_PTR64 ConfigurationTable; + +} __attribute__((aligned(8))) EFI_SYSTEM_TABLE_64; + +#endif /* _PEXPERT_I386_EFI_H */ diff --git a/i386/include/pexpert/i386/protos.h b/i386/include/pexpert/i386/protos.h new file mode 100644 index 0000000..854f8c4 --- /dev/null +++ b/i386/include/pexpert/i386/protos.h @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _PEXPERT_I386_PROTOS_H +#define _PEXPERT_I386_PROTOS_H + +//------------------------------------------------------------------------ +// x86 IN/OUT I/O inline functions. +// +// IN : inb, inw, inl +// IN(port) +// +// OUT: outb, outw, outl +// OUT(port, data) + +typedef unsigned short i386_ioport_t; + +#define __IN(s, u) \ +static __inline__ unsigned u \ +in##s(i386_ioport_t port) \ +{ \ + unsigned u data; \ + asm volatile ( \ + "in" #s " %1,%0" \ + : "=a" (data) \ + : "d" (port)); \ + return (data); \ +} + +#define __OUT(s, u) \ +static __inline__ void \ +out##s(i386_ioport_t port, unsigned u data) \ +{ \ + asm volatile ( \ + "out" #s " %1,%0" \ + : \ + : "d" (port), "a" (data)); \ +} + +__IN(b, char) +__IN(w, short) +__IN(l, long) + +__OUT(b, char) +__OUT(w, short) +__OUT(l, long) + +extern void cninit(void); +extern int sprintf(char * str, const char * format, ...); + +//------------------------------------------------------------------------ +// from osfmk/console/panic_dialog.c +extern void panic_ui_initialize(const unsigned char * clut); + +/* ------------------------------------------------------------------------ + * from osfmk/i386/serial_io.h + */ +int switch_to_serial_console(void); +void switch_to_old_console(int); +boolean_t console_is_serial(void); +int serial_init(void); +void serial_putc(char); +int serial_getc(void); + +/* ------------------------------------------------------------------------ + * from osfmk/kern/misc_protos.h + */ +void cnputc(char); +int cngetc(void); + +#endif /* _PEXPERT_I386_PROTOS_H */ diff --git a/i386/include/pexpert/machine/boot.h b/i386/include/pexpert/machine/boot.h new file mode 100644 index 0000000..d078b39 --- /dev/null +++ b/i386/include/pexpert/machine/boot.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _PEXPERT_MACHINE_BOOT_H +#define _PEXPERT_MACHINE_BOOT_H + +#if defined (__i386__) || defined(__x86_64__) +#include "pexpert/i386/boot.h" +#elif defined (__arm__) +#include "pexpert/arm/boot.h" +#else +#error architecture not supported +#endif + +#endif /* _PEXPERT_MACHINE_BOOT_H */ diff --git a/i386/include/pexpert/machine/protos.h b/i386/include/pexpert/machine/protos.h new file mode 100644 index 0000000..441a924 --- /dev/null +++ b/i386/include/pexpert/machine/protos.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _PEXPERT_MACHINE_PROTOS_H +#define _PEXPERT_MACHINE_PROTOS_H + +#if defined (__i386__) || defined(__x86_64__) +#include "pexpert/i386/protos.h" +#elif defined (__arm__) +#include "pexpert/arm/protos.h" +#else +#error architecture not supported +#endif + +#endif /* _PEXPERT_MACHINE_PROTOS_H */ diff --git a/i386/include/pexpert/pexpert.h b/i386/include/pexpert/pexpert.h new file mode 100644 index 0000000..d661b10 --- /dev/null +++ b/i386/include/pexpert/pexpert.h @@ -0,0 +1,306 @@ +/* + * Copyright (c) 2000-2009 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _PEXPERT_PEXPERT_H_ +#define _PEXPERT_PEXPERT_H_ + +#include <sys/cdefs.h> + +#include <IOKit/IOInterrupts.h> +#include <kern/kern_types.h> + +__BEGIN_DECLS +#include <mach/boolean.h> +#include <mach/kern_return.h> +#include <mach/machine/vm_types.h> + +#include <pexpert/boot.h> + +typedef void *cpu_id_t; + +#if defined(__arm__) +#endif + +void PE_enter_debugger( + const char *cause); + +void PE_init_platform( + boolean_t vm_initialized, + void *args); + +#if defined(__arm__) +uint32_t PE_get_security_epoch( + void); +uint32_t PE_i_can_has_debugger( + uint32_t *); + +/* + * If invoked with NULL first argument, return the max buffer size that can + * be saved in the second argument + */ +void PE_save_buffer_to_vram( + unsigned char *, + unsigned int *); +#endif + +void PE_init_kprintf( + boolean_t vm_initialized); + +extern int32_t gPESerialBaud; + +unsigned int PE_init_taproot(vm_offset_t *taddr); + +extern void (*PE_kputc)(char c); + +void PE_init_printf( + boolean_t vm_initialized); + +extern void (*PE_putc)(char c); + +void PE_init_iokit( + void); + +struct clock_frequency_info_t { + unsigned long bus_clock_rate_hz; + unsigned long cpu_clock_rate_hz; + unsigned long dec_clock_rate_hz; + unsigned long bus_clock_rate_num; + unsigned long bus_clock_rate_den; + unsigned long bus_to_cpu_rate_num; + unsigned long bus_to_cpu_rate_den; + unsigned long bus_to_dec_rate_num; + unsigned long bus_to_dec_rate_den; + unsigned long timebase_frequency_hz; + unsigned long timebase_frequency_num; + unsigned long timebase_frequency_den; + unsigned long long bus_frequency_hz; + unsigned long long bus_frequency_min_hz; + unsigned long long bus_frequency_max_hz; + unsigned long long cpu_frequency_hz; + unsigned long long cpu_frequency_min_hz; + unsigned long long cpu_frequency_max_hz; + unsigned long long prf_frequency_hz; + unsigned long long prf_frequency_min_hz; + unsigned long long prf_frequency_max_hz; + unsigned long long mem_frequency_hz; + unsigned long long mem_frequency_min_hz; + unsigned long long mem_frequency_max_hz; + unsigned long long fix_frequency_hz; +}; + +typedef struct clock_frequency_info_t clock_frequency_info_t; + +extern clock_frequency_info_t gPEClockFrequencyInfo; + +struct timebase_freq_t { + unsigned long timebase_num; + unsigned long timebase_den; +}; + +typedef void (*timebase_callback_func)(struct timebase_freq_t *timebase_freq); + +void PE_register_timebase_callback(timebase_callback_func callback); + +void PE_call_timebase_callback(void); + +void PE_install_interrupt_handler( + void *nub, int source, + void *target, IOInterruptHandler handler, void *refCon); + +#ifndef _FN_KPRINTF +#define _FN_KPRINTF +void kprintf(const char *fmt, ...) __printflike(1,2); +#endif + + +#if CONFIG_NO_KPRINTF_STRINGS +#define kprintf(x, ...) do {} while (0) +#endif + +void init_display_putc(unsigned char *baseaddr, int rowbytes, int height); +void display_putc(char c); + +enum { + kPEReadTOD, + kPEWriteTOD +}; +extern int (*PE_read_write_time_of_day)( + unsigned int options, + long * secs); + +enum { + kPEWaitForInput = 0x00000001, + kPERawInput = 0x00000002 +}; +extern int (*PE_poll_input)( + unsigned int options, + char * c); + +extern int (*PE_write_IIC)( + unsigned char addr, + unsigned char reg, + unsigned char data); + +/* Private Stuff - eventually put in pexpertprivate.h */ +enum { + kDebugTypeNone = 0, + kDebugTypeDisplay = 1, + kDebugTypeSerial = 2 +}; + +/* Scale factor values for PE_Video.v_scale */ +enum { + kPEScaleFactorUnknown = 0, + kPEScaleFactor1x = 1, + kPEScaleFactor2x = 2 +}; + +struct PE_Video { + unsigned long v_baseAddr; /* Base address of video memory */ + unsigned long v_rowBytes; /* Number of bytes per pixel row */ + unsigned long v_width; /* Width */ + unsigned long v_height; /* Height */ + unsigned long v_depth; /* Pixel Depth */ + unsigned long v_display; /* Text or Graphics */ + char v_pixelFormat[64]; + unsigned long v_offset; /* offset into video memory to start at */ + unsigned long v_length; /* length of video memory (0 for v_rowBytes * v_height) */ + unsigned char v_rotate; /* Rotation: 0:normal, 1:right 90, 2:left 180, 3:left 90 */ + unsigned char v_scale; /* Scale Factor for both X & Y */ + char reserved1[2]; +#ifdef __LP64__ + long reserved2; +#else + long v_baseAddrHigh; +#endif +}; + +typedef struct PE_Video PE_Video; + +extern void initialize_screen(PE_Video *, unsigned int); + +extern void dim_screen(void); + +extern int PE_current_console( + PE_Video *info); + +extern void PE_create_console( + void); + +extern int PE_initialize_console( + PE_Video *newInfo, + int op); + +#define kPEGraphicsMode 1 +#define kPETextMode 2 +#define kPETextScreen 3 +#define kPEAcquireScreen 4 +#define kPEReleaseScreen 5 +#define kPEEnableScreen 6 +#define kPEDisableScreen 7 +#define kPEBaseAddressChange 8 + +extern void PE_display_icon( unsigned int flags, + const char * name ); + +typedef struct PE_state { + boolean_t initialized; + PE_Video video; + void *deviceTreeHead; + void *bootArgs; +} PE_state_t; + +extern PE_state_t PE_state; + +extern char * PE_boot_args( + void); + +#if !defined(__LP64__) && !defined(__arm__) +extern boolean_t PE_parse_boot_arg( + const char *arg_string, + void *arg_ptr) __deprecated; +#endif + +extern boolean_t PE_parse_boot_argn( + const char *arg_string, + void *arg_ptr, + int max_arg); + +extern boolean_t PE_get_default( + const char *property_name, + void *property_ptr, + unsigned int max_property); + +#define PE_default_value(_key, _variable, _default) \ + do { \ + if (!PE_get_default((_key), &(_variable), sizeof(_variable))) \ + _variable = _default; \ + } while(0) + +enum { + kPEOptionKey = 0x3a, + kPECommandKey = 0x37, + kPEControlKey = 0x36, + kPEShiftKey = 0x38 +}; + +extern boolean_t PE_get_hotkey( + unsigned char key); + +extern kern_return_t PE_cpu_start( + cpu_id_t target, + vm_offset_t start_paddr, + vm_offset_t arg_paddr); + +extern void PE_cpu_halt( + cpu_id_t target); + +extern void PE_cpu_signal( + cpu_id_t source, + cpu_id_t target); + +extern void PE_cpu_machine_init( + cpu_id_t target, + boolean_t bootb); + +extern void PE_cpu_machine_quiesce( + cpu_id_t target); + +extern void pe_init_debug(void); + +extern boolean_t PE_imgsrc_mount_supported(void); + +#if defined(__arm__) +typedef void (*perfmon_interrupt_handler_func)(cpu_id_t source); +extern kern_return_t PE_cpu_perfmon_interrupt_install_handler(perfmon_interrupt_handler_func handler); +extern void PE_cpu_perfmon_interrupt_enable(cpu_id_t target, boolean_t enable); +#endif + + +__END_DECLS + +#endif /* _PEXPERT_PEXPERT_H_ */ diff --git a/i386/include/pexpert/protos.h b/i386/include/pexpert/protos.h new file mode 100644 index 0000000..78b7a8b --- /dev/null +++ b/i386/include/pexpert/protos.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _PEXPERT_PROTOS_H_ +#define _PEXPERT_PROTOS_H_ + + +#endif /* _PEXPERT_PROTOS_H_ */ diff --git a/i386/include/runetype.h b/i386/include/runetype.h new file mode 100644 index 0000000..fd16b82 --- /dev/null +++ b/i386/include/runetype.h @@ -0,0 +1,136 @@ +/*- + * Copyright (c) 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Borman at Krystal Technologies. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)runetype.h 8.1 (Berkeley) 6/2/93 + */ + +#ifndef _RUNETYPE_H_ +#define _RUNETYPE_H_ + +#include <_types.h> + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) + +#ifndef _SIZE_T +#define _SIZE_T +typedef __darwin_size_t size_t; +#endif + +#ifndef _CT_RUNE_T +#define _CT_RUNE_T +typedef __darwin_ct_rune_t ct_rune_t; +#endif + +#ifndef _RUNE_T +#define _RUNE_T +typedef __darwin_rune_t rune_t; +#endif + +#ifndef __cplusplus +#ifndef _WCHAR_T +#define _WCHAR_T +typedef __darwin_wchar_t wchar_t; +#endif /* _WCHAR_T */ +#endif /* __cplusplus */ + +#ifndef _WINT_T +#define _WINT_T +typedef __darwin_wint_t wint_t; +#endif + +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + +#define _CACHED_RUNES (1 <<8 ) /* Must be a power of 2 */ +#define _CRMASK (~(_CACHED_RUNES - 1)) + +/* + * The lower 8 bits of runetype[] contain the digit value of the rune. + */ +typedef struct { + __darwin_rune_t __min; /* First rune of the range */ + __darwin_rune_t __max; /* Last rune (inclusive) of the range */ + __darwin_rune_t __map; /* What first maps to in maps */ + __uint32_t *__types; /* Array of types in range */ +} _RuneEntry; + +typedef struct { + int __nranges; /* Number of ranges stored */ + _RuneEntry *__ranges; /* Pointer to the ranges */ +} _RuneRange; + +typedef struct { + char __name[14]; /* CHARCLASS_NAME_MAX = 14 */ + __uint32_t __mask; /* charclass mask */ +} _RuneCharClass; + +typedef struct { + char __magic[8]; /* Magic saying what version we are */ + char __encoding[32]; /* ASCII name of this encoding */ + + __darwin_rune_t (*__sgetrune)(const char *, __darwin_size_t, char const **); + int (*__sputrune)(__darwin_rune_t, char *, __darwin_size_t, char **); + __darwin_rune_t __invalid_rune; + + __uint32_t __runetype[_CACHED_RUNES]; + __darwin_rune_t __maplower[_CACHED_RUNES]; + __darwin_rune_t __mapupper[_CACHED_RUNES]; + + /* + * The following are to deal with Runes larger than _CACHED_RUNES - 1. + * Their data is actually contiguous with this structure so as to make + * it easier to read/write from/to disk. + */ + _RuneRange __runetype_ext; + _RuneRange __maplower_ext; + _RuneRange __mapupper_ext; + + void *__variable; /* Data which depends on the encoding */ + int __variable_len; /* how long that data is */ + + /* + * extra fields to deal with arbitrary character classes + */ + int __ncharclasses; + _RuneCharClass *__charclasses; +} _RuneLocale; + +#define _RUNE_MAGIC_A "RuneMagA" /* Indicates version A of RuneLocale */ + +__BEGIN_DECLS +extern _RuneLocale _DefaultRuneLocale; +extern _RuneLocale *_CurrentRuneLocale; +__END_DECLS + +#endif /* !_RUNETYPE_H_ */ diff --git a/i386/include/setjmp.h b/i386/include/setjmp.h new file mode 100644 index 0000000..4fced23 --- /dev/null +++ b/i386/include/setjmp.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _BSD_SETJMP_H +#define _BSD_SETJMP_H + +#include <machine/setjmp.h> + +#endif /* _BSD_SETJMP_H */ diff --git a/i386/include/signal.h b/i386/include/signal.h new file mode 100644 index 0000000..08ad77e --- /dev/null +++ b/i386/include/signal.h @@ -0,0 +1,187 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/*- + * Copyright (c) 1991, 1993 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)signal.h 8.3 (Berkeley) 3/30/94 + */ + +#ifndef _USER_SIGNAL_H +#define _USER_SIGNAL_H + +#include <sys/cdefs.h> +#include <_types.h> +#include <sys/signal.h> + +#ifndef _PTHREAD_T +typedef __darwin_pthread_t pthread_t; +#define _PTHREAD_T +#endif + +#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) +extern __const char *__const sys_signame[NSIG]; +extern __const char *__const sys_siglist[NSIG]; +#endif + +__BEGIN_DECLS +int raise(int); +__END_DECLS + +#ifndef _ANSI_SOURCE +__BEGIN_DECLS +void (*bsd_signal(int, void (*)(int)))(int); +//Begin-Libc +#ifndef LIBC_ALIAS_KILL +//End-Libc +int kill(pid_t, int) __DARWIN_ALIAS(kill); +//Begin-Libc +#else /* LIBC_ALIAS_KILL */ +int kill(pid_t, int) LIBC_ALIAS(kill); +#endif /* !LIBC_ALIAS_KILL */ +//End-Libc +//Begin-Libc +#ifndef LIBC_ALIAS_KILLPG +//End-Libc +int killpg(pid_t, int) __DARWIN_ALIAS(killpg); +//Begin-Libc +#else /* LIBC_ALIAS_KILLPG */ +int killpg(pid_t, int) LIBC_ALIAS(killpg); +#endif /* !LIBC_ALIAS_KILLPG */ +//End-Libc +int pthread_kill(pthread_t, int); +//Begin-Libc +#ifndef LIBC_ALIAS_PTHREAD_SIGMASK +//End-Libc +int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIAS(pthread_sigmask); +//Begin-Libc +#else /* LIBC_ALIAS_PTHREAD_SIGMASK */ +int pthread_sigmask(int, const sigset_t *, sigset_t *) LIBC_ALIAS(pthread_sigmask); +#endif /* !LIBC_ALIAS_PTHREAD_SIGMASK */ +//End-Libc +int sigaction(int, const struct sigaction * __restrict, + struct sigaction * __restrict); +int sigaddset(sigset_t *, int); +//Begin-Libc +#ifndef LIBC_ALIAS_SIGALTSTACK +//End-Libc +int sigaltstack(const stack_t * __restrict, stack_t * __restrict) __DARWIN_ALIAS(sigaltstack); +//Begin-Libc +#else /* LIBC_ALIAS_SIGALTSTACK */ +int sigaltstack(const stack_t * __restrict, stack_t * __restrict) LIBC_ALIAS(sigaltstack); +#endif /* !LIBC_ALIAS_SIGALTSTACK */ +//End-Libc +int sigdelset(sigset_t *, int); +int sigemptyset(sigset_t *); +int sigfillset(sigset_t *); +int sighold(int); +int sigignore(int); +int siginterrupt(int, int); +int sigismember(const sigset_t *, int); +//Begin-Libc +#ifndef LIBC_ALIAS_SIGPAUSE +//End-Libc +int sigpause(int) __DARWIN_ALIAS_C(sigpause); +//Begin-Libc +#else /* LIBC_ALIAS_SIGPAUSE */ +int sigpause(int) LIBC_ALIAS_C(sigpause); +#endif /* !LIBC_ALIAS_SIGPAUSE */ +//End-Libc +int sigpending(sigset_t *); +int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict); +int sigrelse(int); +void (*sigset(int, void (*)(int)))(int); +//Begin-Libc +#ifndef LIBC_ALIAS_SIGSUSPEND +//End-Libc +int sigsuspend(const sigset_t *) __DARWIN_ALIAS_C(sigsuspend); +//Begin-Libc +#else /* LIBC_ALIAS_SIGSUSPEND */ +int sigsuspend(const sigset_t *) LIBC_ALIAS_C(sigsuspend); +#endif /* !LIBC_ALIAS_SIGSUSPEND */ +//End-Libc +//Begin-Libc +#ifndef LIBC_ALIAS_SIGWAIT +//End-Libc +int sigwait(const sigset_t * __restrict, int * __restrict) __DARWIN_ALIAS_C(sigwait); +//Begin-Libc +#else /* LIBC_ALIAS_SIGWAIT */ +int sigwait(const sigset_t * __restrict, int * __restrict) LIBC_ALIAS_C(sigwait); +#endif /* !LIBC_ALIAS_SIGWAIT */ +//End-Libc +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +void psignal(unsigned int, const char *); +int sigblock(int); +int sigsetmask(int); +int sigvec(int, struct sigvec *, struct sigvec *); +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ +__END_DECLS + +/* List definitions after function declarations, or Reiser cpp gets upset. */ +#if defined(__i386__) || defined(__x86_64__) +/* The left shift operator on intel is modulo 32 */ +static __inline int +__sigbits(int __signo) +{ + return __signo > __DARWIN_NSIG ? 0 : (1 << (__signo - 1)); +} +#else /* !__i386__ && !__x86_64__ */ +#define __sigbits(signo) (1 << ((signo) - 1)) +#endif /* __i386__ || __x86_64__ */ + +#define sigaddset(set, signo) (*(set) |= __sigbits(signo), 0) +#define sigdelset(set, signo) (*(set) &= ~__sigbits(signo), 0) +#define sigismember(set, signo) ((*(set) & __sigbits(signo)) != 0) +#define sigemptyset(set) (*(set) = 0, 0) +#define sigfillset(set) (*(set) = ~(sigset_t)0, 0) +#endif /* !_ANSI_SOURCE */ + +#endif /* !_USER_SIGNAL_H */ diff --git a/i386/include/stdarg.h b/i386/include/stdarg.h new file mode 100644 index 0000000..ede00f0 --- /dev/null +++ b/i386/include/stdarg.h @@ -0,0 +1,133 @@ +/* Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GCC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, if you include this header file into source + files compiled by GCC, this header file does not by itself cause + the resulting executable to be covered by the GNU General Public + License. This exception does not however invalidate any other + reasons why the executable file might be covered by the GNU General + Public License. */ + +/* + * ISO C Standard: 7.15 Variable arguments <stdarg.h> + */ + +#ifndef _STDARG_H +#ifndef _ANSI_STDARG_H_ +#ifndef __need___va_list +#define _STDARG_H +#define _ANSI_STDARG_H_ +#endif /* not __need___va_list */ +#undef __need___va_list + +/* Define __gnuc_va_list. */ + +#ifndef __GNUC_VA_LIST +#define __GNUC_VA_LIST +typedef __builtin_va_list __gnuc_va_list; +#endif + +/* Define the standard macros for the user, + if this invocation was from the user program. */ +#ifdef _STDARG_H + +#define va_start(v,l) __builtin_va_start(v,l) +#define va_end(v) __builtin_va_end(v) +#define va_arg(v,l) __builtin_va_arg(v,l) +#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L +#define va_copy(d,s) __builtin_va_copy(d,s) +#endif +#define __va_copy(d,s) __builtin_va_copy(d,s) + +/* Define va_list, if desired, from __gnuc_va_list. */ +/* We deliberately do not define va_list when called from + stdio.h, because ANSI C says that stdio.h is not supposed to define + va_list. stdio.h needs to have access to that data type, + but must not use that name. It should use the name __gnuc_va_list, + which is safe because it is reserved for the implementation. */ + +#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */ +#undef _VA_LIST +#endif + +#ifdef _BSD_VA_LIST +#undef _BSD_VA_LIST +#endif + +#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST)) +/* SVR4.2 uses _VA_LIST for an internal alias for va_list, + so we must avoid testing it and setting it here. + SVR4 uses _VA_LIST as a flag in stdarg.h, but we should + have no conflict with that. */ +#ifndef _VA_LIST_ +#define _VA_LIST_ +#ifdef __i860__ +#ifndef _VA_LIST +#define _VA_LIST va_list +#endif +#endif /* __i860__ */ +typedef __gnuc_va_list va_list; +#ifdef _SCO_DS +#define __VA_LIST +#endif +#endif /* _VA_LIST_ */ +#else /* not __svr4__ || _SCO_DS */ + +/* The macro _VA_LIST_ is the same thing used by this file in Ultrix. + But on BSD NET2 we must not test or define or undef it. + (Note that the comments in NET 2's ansi.h + are incorrect for _VA_LIST_--see stdio.h!) */ +#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT) +/* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */ +#ifndef _VA_LIST_DEFINED +/* The macro _VA_LIST is used in SCO Unix 3.2. */ +#ifndef _VA_LIST +/* The macro _VA_LIST_T_H is used in the Bull dpx2 */ +#ifndef _VA_LIST_T_H +/* The macro __va_list__ is used by BeOS. */ +#ifndef __va_list__ +typedef __gnuc_va_list va_list; +#endif /* not __va_list__ */ +#endif /* not _VA_LIST_T_H */ +#endif /* not _VA_LIST */ +#endif /* not _VA_LIST_DEFINED */ +#if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__)) +#define _VA_LIST_ +#endif +#ifndef _VA_LIST +#define _VA_LIST +#endif +#ifndef _VA_LIST_DEFINED +#define _VA_LIST_DEFINED +#endif +#ifndef _VA_LIST_T_H +#define _VA_LIST_T_H +#endif +#ifndef __va_list__ +#define __va_list__ +#endif + +#endif /* not _VA_LIST_, except on certain systems */ + +#endif /* not __svr4__ */ + +#endif /* _STDARG_H */ + +#endif /* not _ANSI_STDARG_H_ */ +#endif /* not _STDARG_H */ diff --git a/i386/include/stdbool.h b/i386/include/stdbool.h new file mode 100644 index 0000000..994cee8 --- /dev/null +++ b/i386/include/stdbool.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2000 Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org> + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. + * + * $FreeBSD: src/include/stdbool.h,v 1.6 2002/08/16 07:33:14 alfred Exp $ + */ + +#ifndef _STDBOOL_H_ +#define _STDBOOL_H_ + +#define __bool_true_false_are_defined 1 + +#ifndef __cplusplus + +#define bool _Bool +#if __STDC_VERSION__ < 199901L && __GNUC__ < 3 +typedef int _Bool; +#endif + +#define false (bool)0 +#define true (bool)1 + +#endif /* !__cplusplus */ + +#endif /* !_STDBOOL_H_ */ diff --git a/i386/include/stddef.h b/i386/include/stddef.h new file mode 100644 index 0000000..9fc87ee --- /dev/null +++ b/i386/include/stddef.h @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* $OpenBSD: stddef.h,v 1.2 1997/09/21 10:45:52 niklas Exp $ */ +/* $NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $ */ + +/*- + * Copyright (c) 1990 The Regents of the University of California. + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)stddef.h 5.5 (Berkeley) 4/3/91 + */ + +#if !defined(__STDDEF_H__) + +#if !defined(__need_wchar_t) && !defined(__need_size_t) \ + && !defined(__need_ptrdiff_t) && !defined(__need_NULL) \ + && !defined(__need_wint_t) +#define __STDDEF_H__ +#endif /* none of __need_* defined */ + +#include <sys/_types.h> + +#if defined(__STDDEF_H__) || defined(__need_ptrdiff_t) +#ifndef _PTRDIFF_T +#define _PTRDIFF_T +typedef __darwin_ptrdiff_t ptrdiff_t; +#endif /* _PTRDIFF_T */ +#endif /* __STDDEF_H__ || __need_ptrdiff_t */ + +#if defined(__STDDEF_H__) || defined(__need_size_t) +#ifndef _SIZE_T +#define _SIZE_T +/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: + * _GCC_SIZE_T */ +typedef __darwin_size_t size_t; +#endif /* _SIZE_T */ +#endif /* __STDDEF_H__ || __need_size_t */ + +#if defined(__STDDEF_H__) || defined(__need_wchar_t) +#ifndef __cplusplus +#ifndef _WCHAR_T +#define _WCHAR_T +typedef __darwin_wchar_t wchar_t; +#endif /* _WCHAR_T */ +#endif /* __cplusplus */ +#endif /* __STDDEF_H__ || __need_wchar_t */ + +#if (defined(__STDDEF_H__) && !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))) \ + || defined(__need_wint_t) +#ifndef _WINT_T +#define _WINT_T +typedef __darwin_wint_t wint_t; +#endif /* _WINT_T */ +#endif /* __STDDEF_H__ && !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) || __need_wchar_t */ + +#if defined(__STDDEF_H__) || defined(__need_NULL) +#ifndef NULL +#define NULL __DARWIN_NULL +#endif /* ! NULL */ +#endif /* __STDDEF_H__ || __need_NULL */ + +#ifdef __STDDEF_H__ +#if defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 5 || __GNUC__ > 3) +#ifndef __offsetof /* Deprecated: for source compatability only */ +#define __offsetof(type, field) __builtin_offsetof(type, field) +#endif +#define offsetof(type, field) __builtin_offsetof(type, field) +#else /* ! (gcc >= 3.5) */ +#ifndef __offsetof /* Deprecated: for source compatability only */ +#define __offsetof(type, field) ((size_t)(&((type *)0)->field)) +#endif +#define offsetof(type, field) ((size_t)(&((type *)0)->field)) +#endif /* (gcc >= 3.5) */ +#endif /* __STDDEF_H__ */ + +#endif /* __STDDEF_H__ */ + +#undef __need_ptrdiff_t +#undef __need_size_t +#undef __need_wchar_t +#undef __need_wint_t +#undef __need_NULL diff --git a/i386/include/stdint.h b/i386/include/stdint.h new file mode 100644 index 0000000..1126b56 --- /dev/null +++ b/i386/include/stdint.h @@ -0,0 +1,253 @@ +/* + * Copyright (c) 2000, 2001, 2003, 2004, 2008 Apple Computer, Inc. + * All rights reserved. + */ + +#ifndef _STDINT_H_ +#define _STDINT_H_ + +#if __LP64__ +#define __WORDSIZE 64 +#else +#define __WORDSIZE 32 +#endif + +/* from ISO/IEC 988:1999 spec */ + +/* 7.18.1.1 Exact-width integer types */ +#ifndef _INT8_T +#define _INT8_T +typedef signed char int8_t; +#endif /*_INT8_T */ + +#ifndef _INT16_T +#define _INT16_T +typedef short int16_t; +#endif /* _INT16_T */ + +#ifndef _INT32_T +#define _INT32_T +typedef int int32_t; +#endif /* _INT32_T */ + +#ifndef _INT64_T +#define _INT64_T +typedef long long int64_t; +#endif /* _INT64_T */ + +#ifndef _UINT8_T +#define _UINT8_T +typedef unsigned char uint8_t; +#endif /*_UINT8_T */ + +#ifndef _UINT16_T +#define _UINT16_T +typedef unsigned short uint16_t; +#endif /* _UINT16_T */ + +#ifndef _UINT32_T +#define _UINT32_T +typedef unsigned int uint32_t; +#endif /* _UINT32_T */ + +#ifndef _UINT64_T +#define _UINT64_T +typedef unsigned long long uint64_t; +#endif /* _UINT64_T */ + +/* 7.18.1.2 Minimum-width integer types */ +typedef int8_t int_least8_t; +typedef int16_t int_least16_t; +typedef int32_t int_least32_t; +typedef int64_t int_least64_t; +typedef uint8_t uint_least8_t; +typedef uint16_t uint_least16_t; +typedef uint32_t uint_least32_t; +typedef uint64_t uint_least64_t; + + +/* 7.18.1.3 Fastest-width integer types */ +typedef int8_t int_fast8_t; +typedef int16_t int_fast16_t; +typedef int32_t int_fast32_t; +typedef int64_t int_fast64_t; +typedef uint8_t uint_fast8_t; +typedef uint16_t uint_fast16_t; +typedef uint32_t uint_fast32_t; +typedef uint64_t uint_fast64_t; + + +/* 7.18.1.4 Integer types capable of holding object pointers */ + +#ifndef _INTPTR_T +#define _INTPTR_T +typedef long intptr_t; +#endif /* _INTPTR_T */ + +#ifndef _UINTPTR_T +#define _UINTPTR_T +typedef unsigned long uintptr_t; +#endif /* _UINTPTR_T */ + + +/* 7.18.1.5 Greatest-width integer types */ +#ifndef _INTMAX_T +#define _INTMAX_T +#ifdef __INTMAX_TYPE__ +typedef __INTMAX_TYPE__ intmax_t; +#else /* __INTMAX_TYPE__ */ +typedef long long intmax_t; +#endif /* __INTMAX_TYPE__ */ +#endif /* _INTMAX_T */ + +#ifndef _UINTMAX_T +#define _UINTMAX_T +#ifdef __UINTMAX_TYPE__ +typedef __UINTMAX_TYPE__ uintmax_t; +#else /* __UINTMAX_TYPE__ */ +typedef unsigned long long uintmax_t; +#endif /* __UINTMAX_TYPE__ */ +#endif /* _UINTMAX_T */ + +/* 7.18.2 Limits of specified-width integer types: + * These #defines specify the minimum and maximum limits + * of each of the types declared above. + */ + + +/* 7.18.2.1 Limits of exact-width integer types */ +#define INT8_MAX 127 +#define INT16_MAX 32767 +#define INT32_MAX 2147483647 +#define INT64_MAX 9223372036854775807LL + +#define INT8_MIN -128 +#define INT16_MIN -32768 + /* + Note: the literal "most negative int" cannot be written in C -- + the rules in the standard (section 6.4.4.1 in C99) will give it + an unsigned type, so INT32_MIN (and the most negative member of + any larger signed type) must be written via a constant expression. + */ +#define INT32_MIN (-INT32_MAX-1) +#define INT64_MIN (-INT64_MAX-1) + +#define UINT8_MAX 255 +#define UINT16_MAX 65535 +#define UINT32_MAX 4294967295U +#define UINT64_MAX 18446744073709551615ULL + +/* 7.18.2.2 Limits of minimum-width integer types */ +#define INT_LEAST8_MIN INT8_MIN +#define INT_LEAST16_MIN INT16_MIN +#define INT_LEAST32_MIN INT32_MIN +#define INT_LEAST64_MIN INT64_MIN + +#define INT_LEAST8_MAX INT8_MAX +#define INT_LEAST16_MAX INT16_MAX +#define INT_LEAST32_MAX INT32_MAX +#define INT_LEAST64_MAX INT64_MAX + +#define UINT_LEAST8_MAX UINT8_MAX +#define UINT_LEAST16_MAX UINT16_MAX +#define UINT_LEAST32_MAX UINT32_MAX +#define UINT_LEAST64_MAX UINT64_MAX + +/* 7.18.2.3 Limits of fastest minimum-width integer types */ +#define INT_FAST8_MIN INT8_MIN +#define INT_FAST16_MIN INT16_MIN +#define INT_FAST32_MIN INT32_MIN +#define INT_FAST64_MIN INT64_MIN + +#define INT_FAST8_MAX INT8_MAX +#define INT_FAST16_MAX INT16_MAX +#define INT_FAST32_MAX INT32_MAX +#define INT_FAST64_MAX INT64_MAX + +#define UINT_FAST8_MAX UINT8_MAX +#define UINT_FAST16_MAX UINT16_MAX +#define UINT_FAST32_MAX UINT32_MAX +#define UINT_FAST64_MAX UINT64_MAX + +/* 7.18.2.4 Limits of integer types capable of holding object pointers */ + +#if __WORDSIZE == 64 +#define INTPTR_MIN INT64_MIN +#define INTPTR_MAX INT64_MAX +#else +#define INTPTR_MIN INT32_MIN +#define INTPTR_MAX INT32_MAX +#endif + +#if __WORDSIZE == 64 +#define UINTPTR_MAX UINT64_MAX +#else +#define UINTPTR_MAX UINT32_MAX +#endif + +/* 7.18.2.5 Limits of greatest-width integer types */ +#define INTMAX_MIN INT64_MIN +#define INTMAX_MAX INT64_MAX + +#define UINTMAX_MAX UINT64_MAX + +/* 7.18.3 "Other" */ +#if __WORDSIZE == 64 +#define PTRDIFF_MIN INT64_MIN +#define PTRDIFF_MAX INT64_MAX +#else +#define PTRDIFF_MIN INT32_MIN +#define PTRDIFF_MAX INT32_MAX +#endif + +/* We have no sig_atomic_t yet, so no SIG_ATOMIC_{MIN,MAX}. + Should end up being {-127,127} or {0,255} ... or bigger. + My bet would be on one of {U}INT32_{MIN,MAX}. */ + +#if __WORDSIZE == 64 +#define SIZE_MAX UINT64_MAX +#else +#define SIZE_MAX UINT32_MAX +#endif + +#ifndef WCHAR_MAX +# ifdef __WCHAR_MAX__ +# define WCHAR_MAX __WCHAR_MAX__ +# else +# define WCHAR_MAX 0x7fffffff +# endif +#endif + +/* WCHAR_MIN should be 0 if wchar_t is an unsigned type and + (-WCHAR_MAX-1) if wchar_t is a signed type. Unfortunately, + it turns out that -fshort-wchar changes the signedness of + the type. */ +#ifndef WCHAR_MIN +# if WCHAR_MAX == 0xffff +# define WCHAR_MIN 0 +# else +# define WCHAR_MIN (-WCHAR_MAX-1) +# endif +#endif + +#define WINT_MIN INT32_MIN +#define WINT_MAX INT32_MAX + +#define SIG_ATOMIC_MIN INT32_MIN +#define SIG_ATOMIC_MAX INT32_MAX + +/* 7.18.4 Macros for integer constants */ +#define INT8_C(v) (v) +#define INT16_C(v) (v) +#define INT32_C(v) (v) +#define INT64_C(v) (v ## LL) + +#define UINT8_C(v) (v ## U) +#define UINT16_C(v) (v ## U) +#define UINT32_C(v) (v ## U) +#define UINT64_C(v) (v ## ULL) + +#define INTMAX_C(v) (v ## LL) +#define UINTMAX_C(v) (v ## ULL) + +#endif /* _STDINT_H_ */ diff --git a/i386/include/stdio.h b/i386/include/stdio.h new file mode 100644 index 0000000..455960c --- /dev/null +++ b/i386/include/stdio.h @@ -0,0 +1,503 @@ +/* + * Copyright (c) 2000, 2005, 2007, 2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Chris Torek. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)stdio.h 8.5 (Berkeley) 4/29/95 + */ + +#ifndef _STDIO_H_ +#define _STDIO_H_ + +#include <_types.h> + +#ifndef _VA_LIST +#define _VA_LIST +/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: + * __gnuc_va_list and include <stdarg.h> */ +typedef __darwin_va_list va_list; +#endif + +#ifndef _OFF_T +#define _OFF_T +typedef __darwin_off_t off_t; +#endif + +#ifndef _SIZE_T +#define _SIZE_T +typedef __darwin_size_t size_t; +#endif + +#ifndef NULL +#define NULL __DARWIN_NULL +#endif /* ! NULL */ + +typedef __darwin_off_t fpos_t; + +#define _FSTDIO /* Define for new stdio with functions. */ + +/* + * NB: to fit things in six character monocase externals, the stdio + * code uses the prefix `__s' for stdio objects, typically followed + * by a three-character attempt at a mnemonic. + */ + +/* stdio buffers */ +struct __sbuf { + unsigned char *_base; + int _size; +}; + +/* hold a buncha junk that would grow the ABI */ +struct __sFILEX; + +/* + * stdio state variables. + * + * The following always hold: + * + * if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), + * _lbfsize is -_bf._size, else _lbfsize is 0 + * if _flags&__SRD, _w is 0 + * if _flags&__SWR, _r is 0 + * + * This ensures that the getc and putc macros (or inline functions) never + * try to write or read from a file that is in `read' or `write' mode. + * (Moreover, they can, and do, automatically switch from read mode to + * write mode, and back, on "r+" and "w+" files.) + * + * _lbfsize is used only to make the inline line-buffered output stream + * code as compact as possible. + * + * _ub, _up, and _ur are used when ungetc() pushes back more characters + * than fit in the current _bf, or when ungetc() pushes back a character + * that does not match the previous one in _bf. When this happens, + * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff + * _ub._base!=NULL) and _up and _ur save the current values of _p and _r. + * + * NB: see WARNING above before changing the layout of this structure! + */ +typedef struct __sFILE { + unsigned char *_p; /* current position in (some) buffer */ + int _r; /* read space left for getc() */ + int _w; /* write space left for putc() */ + short _flags; /* flags, below; this FILE is free if 0 */ + short _file; /* fileno, if Unix descriptor, else -1 */ + struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */ + int _lbfsize; /* 0 or -_bf._size, for inline putc */ + + /* operations */ + void *_cookie; /* cookie passed to io functions */ + int (*_close)(void *); + int (*_read) (void *, char *, int); + fpos_t (*_seek) (void *, fpos_t, int); + int (*_write)(void *, const char *, int); + + /* separate buffer for long sequences of ungetc() */ + struct __sbuf _ub; /* ungetc buffer */ + struct __sFILEX *_extra; /* additions to FILE to not break ABI */ + int _ur; /* saved _r when _r is counting ungetc data */ + + /* tricks to meet minimum requirements even when malloc() fails */ + unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */ + unsigned char _nbuf[1]; /* guarantee a getc() buffer */ + + /* separate buffer for fgetln() when line crosses buffer boundary */ + struct __sbuf _lb; /* buffer for fgetln() */ + + /* Unix stdio files get aligned to block boundaries on fseek() */ + int _blksize; /* stat.st_blksize (may be != _bf._size) */ + fpos_t _offset; /* current lseek offset (see WARNING) */ +} FILE; + +__BEGIN_DECLS +#if __DARWIN_UNIX03 +extern FILE *__stdinp; +extern FILE *__stdoutp; +extern FILE *__stderrp; +#else /* !__DARWIN_UNIX03 */ +extern FILE __sF[]; +#endif /* __DARWIN_UNIX03 */ +__END_DECLS + +#define __SLBF 0x0001 /* line buffered */ +#define __SNBF 0x0002 /* unbuffered */ +#define __SRD 0x0004 /* OK to read */ +#define __SWR 0x0008 /* OK to write */ + /* RD and WR are never simultaneously asserted */ +#define __SRW 0x0010 /* open for reading & writing */ +#define __SEOF 0x0020 /* found EOF */ +#define __SERR 0x0040 /* found error */ +#define __SMBF 0x0080 /* _buf is from malloc */ +#define __SAPP 0x0100 /* fdopen()ed in append mode */ +#define __SSTR 0x0200 /* this is an sprintf/snprintf string */ +#define __SOPT 0x0400 /* do fseek() optimisation */ +#define __SNPT 0x0800 /* do not do fseek() optimisation */ +#define __SOFF 0x1000 /* set iff _offset is in fact correct */ +#define __SMOD 0x2000 /* true => fgetln modified _p text */ +#define __SALC 0x4000 /* allocate string space dynamically */ +#define __SIGN 0x8000 /* ignore this file in _fwalk */ + +/* + * The following three definitions are for ANSI C, which took them + * from System V, which brilliantly took internal interface macros and + * made them official arguments to setvbuf(), without renaming them. + * Hence, these ugly _IOxxx names are *supposed* to appear in user code. + * + * Although numbered as their counterparts above, the implementation + * does not rely on this. + */ +#define _IOFBF 0 /* setvbuf should set fully buffered */ +#define _IOLBF 1 /* setvbuf should set line buffered */ +#define _IONBF 2 /* setvbuf should set unbuffered */ + +#define BUFSIZ 1024 /* size of buffer used by setbuf */ +#define EOF (-1) + +/* + * FOPEN_MAX is a minimum maximum, and is the number of streams that + * stdio can provide without attempting to allocate further resources + * (which could fail). Do not use this for anything. + */ + /* must be == _POSIX_STREAM_MAX <limits.h> */ +#define FOPEN_MAX 20 /* must be <= OPEN_MAX <sys/syslimits.h> */ +#define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */ + +/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */ +#ifndef _ANSI_SOURCE +#define P_tmpdir "/var/tmp/" +#endif +#define L_tmpnam 1024 /* XXX must be == PATH_MAX */ +#define TMP_MAX 308915776 + +#ifndef SEEK_SET +#define SEEK_SET 0 /* set file offset to offset */ +#endif +#ifndef SEEK_CUR +#define SEEK_CUR 1 /* set file offset to current plus offset */ +#endif +#ifndef SEEK_END +#define SEEK_END 2 /* set file offset to EOF plus offset */ +#endif + +#if __DARWIN_UNIX03 +#define stdin __stdinp +#define stdout __stdoutp +#define stderr __stderrp +#else /* !__DARWIN_UNIX03 */ +#define stdin (&__sF[0]) +#define stdout (&__sF[1]) +#define stderr (&__sF[2]) +#endif /* __DARWIN_UNIX03 */ + +/* + * Functions defined in ANSI C standard. + */ +__BEGIN_DECLS +void clearerr(FILE *); +int fclose(FILE *); +int feof(FILE *); +int ferror(FILE *); +int fflush(FILE *); +int fgetc(FILE *); +int fgetpos(FILE * __restrict, fpos_t *); +char *fgets(char * __restrict, int, FILE *); +#if defined(__DARWIN_10_6_AND_LATER) && (defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE)) +FILE *fopen(const char * __restrict, const char * __restrict) __DARWIN_EXTSN(fopen); +#else /* < 10.6 || !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */ +//Begin-Libc +#ifndef LIBC_ALIAS_FOPEN +//End-Libc +FILE *fopen(const char * __restrict, const char * __restrict) __DARWIN_10_6_AND_LATER_ALIAS(__DARWIN_ALIAS(fopen)); +//Begin-Libc +#else /* LIBC_ALIAS_FOPEN */ +FILE *fopen(const char * __restrict, const char * __restrict) LIBC_ALIAS(fopen); +#endif /* !LIBC_ALIAS_FOPEN */ +//End-Libc +#endif /* >= 10.6 &&_(DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */ +int fprintf(FILE * __restrict, const char * __restrict, ...) __DARWIN_LDBL_COMPAT(fprintf); +int fputc(int, FILE *); +//Begin-Libc +#ifndef LIBC_ALIAS_FPUTS +//End-Libc +int fputs(const char * __restrict, FILE * __restrict) __DARWIN_ALIAS(fputs); +//Begin-Libc +#else /* LIBC_ALIAS_FPUTS */ +int fputs(const char * __restrict, FILE * __restrict) LIBC_ALIAS(fputs); +#endif /* !LIBC_ALIAS_FPUTS */ +//End-Libc +size_t fread(void * __restrict, size_t, size_t, FILE * __restrict); +//Begin-Libc +#ifndef LIBC_ALIAS_FREOPEN +//End-Libc +FILE *freopen(const char * __restrict, const char * __restrict, + FILE * __restrict) __DARWIN_ALIAS(freopen); +//Begin-Libc +#else /* LIBC_ALIAS_FREOPEN */ +FILE *freopen(const char * __restrict, const char * __restrict, + FILE * __restrict) LIBC_ALIAS(freopen); +#endif /* !LIBC_ALIAS_FREOPEN */ +//End-Libc +int fscanf(FILE * __restrict, const char * __restrict, ...) __DARWIN_LDBL_COMPAT(fscanf); +int fseek(FILE *, long, int); +int fsetpos(FILE *, const fpos_t *); +long ftell(FILE *); +//Begin-Libc +#ifndef LIBC_ALIAS_FWRITE +//End-Libc +size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict) __DARWIN_ALIAS(fwrite); +//Begin-Libc +#else /* LIBC_ALIAS_FWRITE */ +size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict) LIBC_ALIAS(fwrite); +#endif /* !LIBC_ALIAS_FWRITE */ +//End-Libc +int getc(FILE *); +int getchar(void); +char *gets(char *); +#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) +extern __const int sys_nerr; /* perror(3) external variables */ +extern __const char *__const sys_errlist[]; +#endif +void perror(const char *); +int printf(const char * __restrict, ...) __DARWIN_LDBL_COMPAT(printf); +int putc(int, FILE *); +int putchar(int); +int puts(const char *); +int remove(const char *); +int rename (const char *, const char *); +void rewind(FILE *); +int scanf(const char * __restrict, ...) __DARWIN_LDBL_COMPAT(scanf); +void setbuf(FILE * __restrict, char * __restrict); +int setvbuf(FILE * __restrict, char * __restrict, int, size_t); +int sprintf(char * __restrict, const char * __restrict, ...) __DARWIN_LDBL_COMPAT(sprintf); +int sscanf(const char * __restrict, const char * __restrict, ...) __DARWIN_LDBL_COMPAT(sscanf); +FILE *tmpfile(void); +char *tmpnam(char *); +int ungetc(int, FILE *); +int vfprintf(FILE * __restrict, const char * __restrict, va_list) __DARWIN_LDBL_COMPAT(vfprintf); +int vprintf(const char * __restrict, va_list) __DARWIN_LDBL_COMPAT(vprintf); +int vsprintf(char * __restrict, const char * __restrict, va_list) __DARWIN_LDBL_COMPAT(vsprintf); +#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) +int asprintf(char **, const char *, ...) __DARWIN_LDBL_COMPAT(asprintf); +int vasprintf(char **, const char *, va_list) __DARWIN_LDBL_COMPAT(vasprintf); +#endif +__END_DECLS + +/* + * Functions defined in POSIX 1003.1. + */ +#ifndef _ANSI_SOURCE +#define L_ctermid 1024 /* size for ctermid(); PATH_MAX */ + +__BEGIN_DECLS +char *ctermid(char *); +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +char *ctermid_r(char *); +#endif /* not POSIX */ +#if defined(__DARWIN_10_6_AND_LATER) && (defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE)) +FILE *fdopen(int, const char *) __DARWIN_EXTSN(fdopen); +#else /* < 10.6 || !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */ +//Begin-Libc +#ifndef LIBC_ALIAS_FDOPEN +//End-Libc +FILE *fdopen(int, const char *) __DARWIN_10_6_AND_LATER_ALIAS(__DARWIN_ALIAS(fdopen)); +//Begin-Libc +#else /* LIBC_ALIAS_FDOPEN */ +FILE *fdopen(int, const char *) LIBC_ALIAS(fdopen); +#endif /* !LIBC_ALIAS_FDOPEN */ +//End-Libc +#endif /* >= 10.6 &&_(DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +char *fgetln(FILE *, size_t *); +#endif /* not POSIX */ +int fileno(FILE *); +void flockfile(FILE *); +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +__const char + *fmtcheck(const char *, const char *); +int fpurge(FILE *); +#endif /* not POSIX */ +int fseeko(FILE *, off_t, int); +off_t ftello(FILE *); +int ftrylockfile(FILE *); +void funlockfile(FILE *); +int getc_unlocked(FILE *); +int getchar_unlocked(void); +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +int getw(FILE *); +#endif /* not POSIX */ +int pclose(FILE *); +#if defined(__DARWIN_10_6_AND_LATER) && (defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE)) +FILE *popen(const char *, const char *) __DARWIN_EXTSN(popen); +#else /* < 10.6 || !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */ +//Begin-Libc +#ifndef LIBC_ALIAS_POPEN +//End-Libc +FILE *popen(const char *, const char *) __DARWIN_10_6_AND_LATER_ALIAS(__DARWIN_ALIAS(popen)); +//Begin-Libc +#else /* LIBC_ALIAS_POPEN */ +FILE *popen(const char *, const char *) LIBC_ALIAS(popen); +#endif /* !LIBC_ALIAS_POPEN */ +//End-Libc +#endif /* >= 10.6 &&_(DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */ +int putc_unlocked(int, FILE *); +int putchar_unlocked(int); +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +int putw(int, FILE *); +void setbuffer(FILE *, char *, int); +int setlinebuf(FILE *); +#endif /* not POSIX */ +int snprintf(char * __restrict, size_t, const char * __restrict, ...) __DARWIN_LDBL_COMPAT(snprintf); +//Begin-Libc +#ifndef LIBC_ALIAS_TEMPNAM +//End-Libc +char *tempnam(const char *, const char *) __DARWIN_ALIAS(tempnam); +//Begin-Libc +#else /* LIBC_ALIAS_TEMPNAM */ +char *tempnam(const char *, const char *) LIBC_ALIAS(tempnam); +#endif /* !LIBC_ALIAS_TEMPNAM */ +//End-Libc +int vfscanf(FILE * __restrict, const char * __restrict, va_list) __DARWIN_LDBL_COMPAT(vfscanf); +int vscanf(const char * __restrict, va_list) __DARWIN_LDBL_COMPAT(vscanf); +int vsnprintf(char * __restrict, size_t, const char * __restrict, va_list) __DARWIN_LDBL_COMPAT(vsnprintf); +int vsscanf(const char * __restrict, const char * __restrict, va_list) __DARWIN_LDBL_COMPAT(vsscanf); +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +FILE *zopen(const char *, const char *, int); +#endif /* not POSIX */ +__END_DECLS + +/* + * Stdio function-access interface. + */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +__BEGIN_DECLS +FILE *funopen(const void *, + int (*)(void *, char *, int), + int (*)(void *, const char *, int), + fpos_t (*)(void *, fpos_t, int), + int (*)(void *)); +__END_DECLS +#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0) +#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) +#endif /* not POSIX */ +#endif /* not ANSI */ + +/* + * Functions internal to the implementation. + */ +__BEGIN_DECLS +int __srget(FILE *); +int __svfscanf(FILE *, const char *, va_list) __DARWIN_LDBL_COMPAT(__svfscanf); +int __swbuf(int, FILE *); +__END_DECLS + +/* + * The __sfoo macros are here so that we can + * define function versions in the C library. + */ +#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++)) +#if defined(__GNUC__) && defined(__STDC__) +static __inline int __sputc(int _c, FILE *_p) { + if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) + return (*_p->_p++ = _c); + else + return (__swbuf(_c, _p)); +} +#else +/* + * This has been tuned to generate reasonable code on the vax using pcc. + */ +#define __sputc(c, p) \ + (--(p)->_w < 0 ? \ + (p)->_w >= (p)->_lbfsize ? \ + (*(p)->_p = (c)), *(p)->_p != '\n' ? \ + (int)*(p)->_p++ : \ + __swbuf('\n', p) : \ + __swbuf((int)(c), p) : \ + (*(p)->_p = (c), (int)*(p)->_p++)) +#endif + +#define __sfeof(p) (((p)->_flags & __SEOF) != 0) +#define __sferror(p) (((p)->_flags & __SERR) != 0) +#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) +#define __sfileno(p) ((p)->_file) + +#ifndef _ANSI_SOURCE +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define feof_unlocked(p) __sfeof(p) +#define ferror_unlocked(p) __sferror(p) +#define clearerr_unlocked(p) __sclearerr(p) +#define fileno_unlocked(p) __sfileno(p) +#endif /* not POSIX */ + +#ifndef lint +#define getc_unlocked(fp) __sgetc(fp) +#define putc_unlocked(x, fp) __sputc(x, fp) +#endif /* lint */ + +#define getchar_unlocked() getc_unlocked(stdin) +#define putchar_unlocked(x) putc_unlocked(x, stdout) +#endif /* not ANSI */ + +#ifdef _USE_EXTENDED_LOCALES_ +#include <xlocale/_stdio.h> +#endif /* _USE_EXTENDED_LOCALES_ */ + +#if defined (__GNUC__) && _FORTIFY_SOURCE > 0 && !defined (__cplusplus) +/* Security checking functions. */ +#include <secure/_stdio.h> +#endif + +#endif /* _STDIO_H_ */ diff --git a/i386/include/stdlib.h b/i386/include/stdlib.h new file mode 100644 index 0000000..a177dbb --- /dev/null +++ b/i386/include/stdlib.h @@ -0,0 +1,320 @@ +/* + * Copyright (c) 2000, 2002 - 2008 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)stdlib.h 8.5 (Berkeley) 5/19/95 + */ + +#ifndef _STDLIB_H_ +#define _STDLIB_H_ + +#include <sys/types.h> + +#ifndef _SIZE_T +#define _SIZE_T +/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: + * _GCC_SIZE_T */ +typedef __darwin_size_t size_t; +#endif + +#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) +#ifndef _CT_RUNE_T +#define _CT_RUNE_T +typedef __darwin_ct_rune_t ct_rune_t; +#endif + +#ifndef _RUNE_T +#define _RUNE_T +typedef __darwin_rune_t rune_t; +#endif +#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + +#ifndef __cplusplus +#ifndef _WCHAR_T +#define _WCHAR_T +typedef __darwin_wchar_t wchar_t; +#endif /* _WCHAR_T */ +#endif /* __cplusplus */ + +typedef struct { + int quot; /* quotient */ + int rem; /* remainder */ +} div_t; + +typedef struct { + long quot; /* quotient */ + long rem; /* remainder */ +} ldiv_t; + +#if !__DARWIN_NO_LONG_LONG +typedef struct { + long long quot; + long long rem; +} lldiv_t; +#endif /* !__DARWIN_NO_LONG_LONG */ + +#ifndef NULL +#define NULL __DARWIN_NULL +#endif /* ! NULL */ + +#define EXIT_FAILURE 1 +#define EXIT_SUCCESS 0 + +#define RAND_MAX 0x7fffffff + +#ifdef _USE_EXTENDED_LOCALES_ +#include <_xlocale.h> +#endif /* _USE_EXTENDED_LOCALES_ */ + +#ifndef MB_CUR_MAX +#ifdef _USE_EXTENDED_LOCALES_ +#define MB_CUR_MAX (___mb_cur_max()) +#ifndef MB_CUR_MAX_L +#define MB_CUR_MAX_L(x) (___mb_cur_max_l(x)) +#endif /* !MB_CUR_MAX_L */ +#else /* !_USE_EXTENDED_LOCALES_ */ +extern int __mb_cur_max; +#define MB_CUR_MAX __mb_cur_max +#endif /* _USE_EXTENDED_LOCALES_ */ +#endif /* MB_CUR_MAX */ + +#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) \ + && defined(_USE_EXTENDED_LOCALES_) && !defined(MB_CUR_MAX_L) +#define MB_CUR_MAX_L(x) (___mb_cur_max_l(x)) +#endif +//Begin-Libc +/* f must be a literal string */ +#define LIBC_ABORT(f,...) abort_report_np("%s:%s:%u: " f, __FILE__, __func__, __LINE__, ## __VA_ARGS__) +//End-Libc + +__BEGIN_DECLS +void abort(void) __dead2; +//Begin-Libc +__private_extern__ +void abort_report_np(const char *, ...) __dead2 __printflike(1, 2); +//End-Libc +int abs(int) __pure2; +int atexit(void (*)(void)); +double atof(const char *); +int atoi(const char *); +long atol(const char *); +#if !__DARWIN_NO_LONG_LONG +long long + atoll(const char *); +#endif /* !__DARWIN_NO_LONG_LONG */ +void *bsearch(const void *, const void *, size_t, + size_t, int (*)(const void *, const void *)); +void *calloc(size_t, size_t); +div_t div(int, int) __pure2; +void exit(int) __dead2; +void free(void *); +char *getenv(const char *); +long labs(long) __pure2; +ldiv_t ldiv(long, long) __pure2; +#if !__DARWIN_NO_LONG_LONG +long long + llabs(long long); +lldiv_t lldiv(long long, long long); +#endif /* !__DARWIN_NO_LONG_LONG */ +void *malloc(size_t); +int mblen(const char *, size_t); +size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); +int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); +int posix_memalign(void **, size_t, size_t); +void qsort(void *, size_t, size_t, + int (*)(const void *, const void *)); +int rand(void); +void *realloc(void *, size_t); +void srand(unsigned); +double strtod(const char *, char **) __DARWIN_ALIAS(strtod); +float strtof(const char *, char **) __DARWIN_ALIAS(strtof); +long strtol(const char *, char **, int); +long double + strtold(const char *, char **) __DARWIN_LDBL_COMPAT(strtold); +#if !__DARWIN_NO_LONG_LONG +long long + strtoll(const char *, char **, int); +#endif /* !__DARWIN_NO_LONG_LONG */ +unsigned long + strtoul(const char *, char **, int); +#if !__DARWIN_NO_LONG_LONG +unsigned long long + strtoull(const char *, char **, int); +#endif /* !__DARWIN_NO_LONG_LONG */ +//Begin-Libc +#ifndef LIBC_ALIAS_SYSTEM +//End-Libc +int system(const char *) __DARWIN_ALIAS_C(system); +//Begin-Libc +#else /* LIBC_ALIAS_SYSTEM */ +int system(const char *) LIBC_ALIAS_C(system); +#endif /* !LIBC_ALIAS_SYSTEM */ +//End-Libc +size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t); +int wctomb(char *, wchar_t); + +#ifndef _ANSI_SOURCE +void _Exit(int) __dead2; +long a64l(const char *); +double drand48(void); +char *ecvt(double, int, int *__restrict, int *__restrict); /* LEGACY */ +double erand48(unsigned short[3]); +char *fcvt(double, int, int *__restrict, int *__restrict); /* LEGACY */ +char *gcvt(double, int, char *); /* LEGACY */ +int getsubopt(char **, char * const *, char **); +int grantpt(int); +#if __DARWIN_UNIX03 +char *initstate(unsigned, char *, size_t); /* no __DARWIN_ALIAS needed */ +#else /* !__DARWIN_UNIX03 */ +char *initstate(unsigned long, char *, long); +#endif /* __DARWIN_UNIX03 */ +long jrand48(unsigned short[3]); +char *l64a(long); +void lcong48(unsigned short[7]); +long lrand48(void); +char *mktemp(char *); +int mkstemp(char *); +long mrand48(void); +long nrand48(unsigned short[3]); +int posix_openpt(int); +char *ptsname(int); +//Begin-Libc +#ifndef LIBC_ALIAS_PUTENV +//End-Libc +int putenv(char *) __DARWIN_ALIAS(putenv); +//Begin-Libc +#else /* LIBC_ALIAS_PUTENV */ +int putenv(char *) LIBC_ALIAS(putenv); +#endif /* !LIBC_ALIAS_PUTENV */ +//End-Libc +long random(void); +int rand_r(unsigned *); +//Begin-Libc +#ifdef __LIBC__ +#ifndef LIBC_ALIAS_REALPATH +char *realpath(const char * __restrict, char * __restrict) __DARWIN_EXTSN(realpath); +#else /* LIBC_ALIAS_REALPATH */ +#ifdef VARIANT_DARWINEXTSN +char *realpath(const char * __restrict, char * __restrict) LIBC_EXTSN(realpath); +#else /* !VARIANT_DARWINEXTSN */ +char *realpath(const char * __restrict, char * __restrict) LIBC_ALIAS(realpath); +#endif /* VARIANT_DARWINEXTSN */ +#endif /* !LIBC_ALIAS_REALPATH */ +#else /* !__LIBC__ */ +//End-Libc +#if (__DARWIN_UNIX03 && !defined(_POSIX_C_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(_DARWIN_BETTER_REALPATH) +char *realpath(const char * __restrict, char * __restrict) __DARWIN_EXTSN(realpath); +#else /* (!__DARWIN_UNIX03 || _POSIX_C_SOURCE) && !_DARWIN_C_SOURCE && !_DARWIN_BETTER_REALPATH */ +char *realpath(const char * __restrict, char * __restrict) __DARWIN_ALIAS(realpath); +#endif /* (__DARWIN_UNIX03 && _POSIX_C_SOURCE) || _DARWIN_C_SOURCE || _DARWIN_BETTER_REALPATH */ +//Begin-Libc +#endif /* __LIBC__ */ +//End-Libc +unsigned short + *seed48(unsigned short[3]); +//Begin-Libc +#ifndef LIBC_ALIAS_SETENV +//End-Libc +int setenv(const char *, const char *, int) __DARWIN_ALIAS(setenv); +//Begin-Libc +#else /* LIBC_ALIAS_SETENV */ +int setenv(const char *, const char *, int) LIBC_ALIAS(setenv); +#endif /* !LIBC_ALIAS_SETENV */ +//End-Libc +#if __DARWIN_UNIX03 +//Begin-Libc +#ifndef LIBC_ALIAS_SETKEY +//End-Libc +void setkey(const char *) __DARWIN_ALIAS(setkey); +//Begin-Libc +#else /* LIBC_ALIAS_SETKEY */ +void setkey(const char *) LIBC_ALIAS(setkey); +#endif /* !LIBC_ALIAS_SETKEY */ +//End-Libc +#else /* !__DARWIN_UNIX03 */ +int setkey(const char *); +#endif /* __DARWIN_UNIX03 */ +char *setstate(const char *); +void srand48(long); +#if __DARWIN_UNIX03 +void srandom(unsigned); +#else /* !__DARWIN_UNIX03 */ +void srandom(unsigned long); +#endif /* __DARWIN_UNIX03 */ +int unlockpt(int); +#if __DARWIN_UNIX03 +//Begin-Libc +#ifndef LIBC_ALIAS_UNSETENV +//End-Libc +int unsetenv(const char *) __DARWIN_ALIAS(unsetenv); +//Begin-Libc +#else /* LIBC_ALIAS_UNSETENV */ +int unsetenv(const char *) LIBC_ALIAS(unsetenv); +#endif /* !LIBC_ALIAS_UNSETENV */ +//End-Libc +#else /* !__DARWIN_UNIX03 */ +void unsetenv(const char *); +#endif /* __DARWIN_UNIX03 */ +#endif /* !_ANSI_SOURCE */ + +/* Poison the following routines if -fshort-wchar is set */ +#if !defined(__cplusplus) && defined(__WCHAR_MAX__) && __WCHAR_MAX__ <= 0xffffU +#pragma GCC poison mbstowcs mbtowc wcstombs wctomb +#endif +__END_DECLS + +#ifdef _USE_EXTENDED_LOCALES_ +#include <xlocale/_stdlib.h> +#endif /* _USE_EXTENDED_LOCALES_ */ + +#endif /* _STDLIB_H_ */ diff --git a/i386/include/string.h b/i386/include/string.h new file mode 100644 index 0000000..6c16441 --- /dev/null +++ b/i386/include/string.h @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2000, 2007 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)string.h 8.1 (Berkeley) 6/2/93 + */ + +#ifndef _STRING_H_ +#define _STRING_H_ +#include <_types.h> + +#ifndef _SIZE_T +#define _SIZE_T +typedef __darwin_size_t size_t; +#endif + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) /* For swab */ +#ifndef _SSIZE_T +#define _SSIZE_T +typedef __darwin_ssize_t ssize_t; +#endif +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + +#ifndef NULL +#define NULL __DARWIN_NULL +#endif /* ! NULL */ + +#include <sys/cdefs.h> + +__BEGIN_DECLS +void *memchr(const void *, int, size_t); +int memcmp(const void *, const void *, size_t); +void *memcpy(void *, const void *, size_t); +void *memmove(void *, const void *, size_t); +void *memset(void *, int, size_t); +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +char *stpcpy(char *, const char *); +char *strcasestr(const char *, const char *); +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ +char *strcat(char *, const char *); +char *strchr(const char *, int); +int strcmp(const char *, const char *); +int strcoll(const char *, const char *); +char *strcpy(char *, const char *); +size_t strcspn(const char *, const char *); +//Begin-Libc +#ifndef LIBC_ALIAS_STRERROR +//End-Libc +char *strerror(int) __DARWIN_ALIAS(strerror); +//Begin-Libc +#else /* LIBC_ALIAS_STRERROR */ +char *strerror(int) LIBC_ALIAS(strerror); +#endif /* !LIBC_ALIAS_STRERROR */ +//End-Libc +int strerror_r(int, char *, size_t); +size_t strlen(const char *); +char *strncat(char *, const char *, size_t); +int strncmp(const char *, const char *, size_t); +char *strncpy(char *, const char *, size_t); +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +char *strnstr(const char *, const char *, size_t); +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ +char *strpbrk(const char *, const char *); +char *strrchr(const char *, int); +size_t strspn(const char *, const char *); +char *strstr(const char *, const char *); +char *strtok(char *, const char *); +size_t strxfrm(char *, const char *, size_t); + +/* Nonstandard routines */ +#ifndef _ANSI_SOURCE +void *memccpy(void *, const void *, int, size_t); +char *strtok_r(char *, const char *, char **); +char *strdup(const char *); +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +int bcmp(const void *, const void *, size_t); +void bcopy(const void *, void *, size_t); +void bzero(void *, size_t); +int ffs(int); +int ffsl(long); +int fls(int); +int flsl(long); +char *index(const char *, int); +void memset_pattern4(void *, const void *, size_t); +void memset_pattern8(void *, const void *, size_t); +void memset_pattern16(void *, const void *, size_t); +char *rindex(const char *, int); +int strcasecmp(const char *, const char *); +size_t strlcat(char *, const char *, size_t); +size_t strlcpy(char *, const char *, size_t); +void strmode(int, char *); +int strncasecmp(const char *, const char *, size_t); +char *strsep(char **, const char *); +char *strsignal(int sig); +void swab(const void * __restrict, void * __restrict, ssize_t); +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ +#endif /* !_ANSI_SOURCE */ +__END_DECLS + +#ifdef _USE_EXTENDED_LOCALES_ +#include <xlocale/_string.h> +#endif /* _USE_EXTENDED_LOCALES_ */ + +#endif /* _STRING_H_ */ diff --git a/i386/include/sys/_endian.h b/i386/include/sys/_endian.h new file mode 100644 index 0000000..3fb0f06 --- /dev/null +++ b/i386/include/sys/_endian.h @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2004, 2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +/* + * Copyright (c) 1995 NeXT Computer, Inc. All rights reserved. + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1987, 1991, 1993 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + */ + +#ifndef _SYS__ENDIAN_H_ +#define _SYS__ENDIAN_H_ + +#include <sys/cdefs.h> + +/* + * Macros for network/external number representation conversion. + */ + +#if defined(lint) + +__BEGIN_DECLS +__uint16_t ntohs(__uint16_t); +__uint16_t htons(__uint16_t); +__uint32_t ntohl(__uint32_t); +__uint32_t htonl(__uint32_t); +__END_DECLS + +#elif __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN + +#define ntohl(x) ((__uint32_t)(x)) +#define ntohs(x) ((__uint16_t)(x)) +#define htonl(x) ((__uint32_t)(x)) +#define htons(x) ((__uint16_t)(x)) + +#if defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) +#define NTOHL(x) (x) +#define NTOHS(x) (x) +#define HTONL(x) (x) +#define HTONS(x) (x) +#endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ + +#else /* __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN */ + +#include <libkern/_OSByteOrder.h> + +#define ntohs(x) __DARWIN_OSSwapInt16(x) +#define htons(x) __DARWIN_OSSwapInt16(x) + +#define ntohl(x) __DARWIN_OSSwapInt32(x) +#define htonl(x) __DARWIN_OSSwapInt32(x) + +#if defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) +#define NTOHL(x) (x) = ntohl((__uint32_t)x) +#define NTOHS(x) (x) = ntohs((__uint16_t)x) +#define HTONL(x) (x) = htonl((__uint32_t)x) +#define HTONS(x) (x) = htons((__uint16_t)x) +#endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ +#endif /* __DARWIN_BYTE_ORDER */ +#endif /* !_SYS__ENDIAN_H_ */ diff --git a/i386/include/sys/_select.h b/i386/include/sys/_select.h new file mode 100644 index 0000000..6f70921 --- /dev/null +++ b/i386/include/sys/_select.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2005, 2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +/* + * This is called from sys/select.h and sys/time.h for the common prototype + * of select(). Setting _DARWIN_C_SOURCE or _DARWIN_UNLIMITED_SELECT uses + * the version of select() that does not place a limit on the first argument + * (nfds). In the UNIX conformance case, values of nfds greater than + * FD_SETSIZE will return an error of EINVAL. + */ +#ifndef _SYS__SELECT_H_ +#define _SYS__SELECT_H_ + +int select(int, fd_set * __restrict, fd_set * __restrict, + fd_set * __restrict, struct timeval * __restrict) +#if defined(_DARWIN_C_SOURCE) || defined(_DARWIN_UNLIMITED_SELECT) + __DARWIN_EXTSN_C(select) +#else /* !_DARWIN_C_SOURCE && !_DARWIN_UNLIMITED_SELECT */ +# if defined(__LP64__) && !__DARWIN_NON_CANCELABLE + __DARWIN_1050(select) +# else /* !__LP64__ || __DARWIN_NON_CANCELABLE */ + __DARWIN_ALIAS_C(select) +# endif /* __LP64__ && !__DARWIN_NON_CANCELABLE */ +#endif /* _DARWIN_C_SOURCE || _DARWIN_UNLIMITED_SELECT */ + ; + +#endif /* !_SYS__SELECT_H_ */ diff --git a/i386/include/sys/_structs.h b/i386/include/sys/_structs.h new file mode 100644 index 0000000..5c9db95 --- /dev/null +++ b/i386/include/sys/_structs.h @@ -0,0 +1,236 @@ +/* + * Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#include <sys/cdefs.h> + +#ifdef __need_ucontext_t +#ifndef __need_struct_ucontext +#define __need_struct_ucontext +#endif /* __need_struct_ucontext */ +#endif /* __need_ucontext_t */ + +#ifdef __need_ucontext64_t +#ifndef __need_struct_ucontext64 +#define __need_struct_ucontext64 +#endif /* __need_struct_ucontext64 */ +#endif /* __need_ucontext64_t */ + +#ifdef __need_struct_ucontext +#ifndef __need_struct_mcontext +#define __need_struct_mcontext +#endif /* __need_struct_mcontext */ +#endif /* __need_struct_ucontext */ + +#ifdef __need_struct_ucontext64 +#ifndef __need_struct_mcontext64 +#define __need_struct_mcontext64 +#endif /* __need_struct_mcontext64 */ +#endif /* __need_struct_ucontext64 */ + +#if defined(__need_struct_mcontext) || defined(__need_struct_mcontext64) +#include <machine/_structs.h> +#endif /* __need_struct_mcontext || __need_struct_mcontext64 */ + +#if defined(__need_stack_t) || defined(__need_struct_ucontext) || defined(__need_struct_ucontext64) +#ifndef __need_struct_sigaltstack +#define __need_struct_sigaltstack +#endif /* __need_struct_sigaltstack */ +#endif /* __need_stack_t || __need_struct_ucontext || __need_struct_ucontext64 */ + +#ifdef __need_struct_sigaltstack +#undef __need_struct_sigaltstack +/* Structure used in sigaltstack call. */ +#ifndef _STRUCT_SIGALTSTACK +#if __DARWIN_UNIX03 +#define _STRUCT_SIGALTSTACK struct __darwin_sigaltstack +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_SIGALTSTACK struct sigaltstack +#endif /* __DARWIN_UNIX03 */ +_STRUCT_SIGALTSTACK +{ + void *ss_sp; /* signal stack base */ + __darwin_size_t ss_size; /* signal stack length */ + int ss_flags; /* SA_DISABLE and/or SA_ONSTACK */ +}; +#endif /* _STRUCT_SIGALTSTACK */ +#endif /* __need_struct_sigaltstack */ + +#ifdef __need_struct_timespec +#undef __need_struct_timespec +#ifndef _STRUCT_TIMESPEC +#define _STRUCT_TIMESPEC struct timespec +_STRUCT_TIMESPEC +{ + __darwin_time_t tv_sec; + long tv_nsec; +}; +#endif /* _STRUCT_TIMESPEC */ +#endif /* __need_struct_timespec */ + +#ifdef __need_struct_timeval +#undef __need_struct_timeval +#ifndef _STRUCT_TIMEVAL +#define _STRUCT_TIMEVAL struct timeval +_STRUCT_TIMEVAL +{ + __darwin_time_t tv_sec; /* seconds */ + __darwin_suseconds_t tv_usec; /* and microseconds */ +}; +#endif /* _STRUCT_TIMEVAL */ +#endif /* __need_struct_timeval */ + +#ifdef __need_struct_timeval32 +#undef __need_struct_timeval32 +#ifndef _STRUCT_TIMEVAL32 +#define _STRUCT_TIMEVAL32 struct timeval32 +_STRUCT_TIMEVAL32 +{ + __int32_t tv_sec; /* seconds */ + __int32_t tv_usec; /* and microseconds */ +}; +#endif /* _STRUCT_TIMEVAL32 */ +#endif /* __need_struct_timeval32 */ + +#ifdef __need_struct_ucontext +#undef __need_struct_ucontext +#ifndef _STRUCT_UCONTEXT +#if __DARWIN_UNIX03 +#define _STRUCT_UCONTEXT struct __darwin_ucontext +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_UCONTEXT struct ucontext +#endif /* __DARWIN_UNIX03 */ +_STRUCT_UCONTEXT +{ + int uc_onstack; + __darwin_sigset_t uc_sigmask; /* signal mask used by this context */ + _STRUCT_SIGALTSTACK uc_stack; /* stack used by this context */ + _STRUCT_UCONTEXT *uc_link; /* pointer to resuming context */ + __darwin_size_t uc_mcsize; /* size of the machine context passed in */ + _STRUCT_MCONTEXT *uc_mcontext; /* pointer to machine specific context */ +#ifdef _XOPEN_SOURCE + _STRUCT_MCONTEXT __mcontext_data; +#endif /* _XOPEN_SOURCE */ +}; +#endif /* _STRUCT_UCONTEXT */ +#endif /* __need_struct_ucontext */ + +#ifdef __need_struct_ucontext64 +#undef __need_struct_ucontext64 +#ifndef _STRUCT_UCONTEXT64 +#if __DARWIN_UNIX03 +#define _STRUCT_UCONTEXT64 struct __darwin_ucontext64 +#else /* !__DARWIN_UNIX03 */ +#define _STRUCT_UCONTEXT64 struct ucontext64 +#endif /* __DARWIN_UNIX03 */ +_STRUCT_UCONTEXT64 +{ + int uc_onstack; + __darwin_sigset_t uc_sigmask; /* signal mask used by this context */ + _STRUCT_SIGALTSTACK uc_stack; /* stack used by this context */ + _STRUCT_UCONTEXT64 *uc_link; /* pointer to resuming context */ + __darwin_size_t uc_mcsize; /* size of the machine context passed in */ + _STRUCT_MCONTEXT64 *uc_mcontext64; /* pointer to machine specific context */ +}; +#endif /* _STRUCT_UCONTEXT64 */ +#endif /* __need_struct_ucontext64 */ + + +#ifdef __need_fd_set +#undef __need_fd_set +#ifndef _FD_SET +#define _FD_SET +/* + * Select uses bit masks of file descriptors in longs. These macros + * manipulate such bit fields (the filesystem macros use chars). The + * extra protection here is to permit application redefinition above + * the default size. + */ +#ifdef FD_SETSIZE +#define __DARWIN_FD_SETSIZE FD_SETSIZE +#else /* !FD_SETSIZE */ +#define __DARWIN_FD_SETSIZE 1024 +#endif /* FD_SETSIZE */ +#define __DARWIN_NBBY 8 /* bits in a byte */ +#define __DARWIN_NFDBITS (sizeof(__int32_t) * __DARWIN_NBBY) /* bits per mask */ +#define __DARWIN_howmany(x, y) ((((x) % (y)) == 0) ? ((x) / (y)) : (((x) / (y)) + 1)) /* # y's == x bits? */ + +__BEGIN_DECLS +typedef struct fd_set { + __int32_t fds_bits[__DARWIN_howmany(__DARWIN_FD_SETSIZE, __DARWIN_NFDBITS)]; +} fd_set; +__END_DECLS + +/* This inline avoids argument side-effect issues with FD_ISSET() */ +static __inline int +__darwin_fd_isset(int _n, const struct fd_set *_p) +{ + return (_p->fds_bits[_n/__DARWIN_NFDBITS] & (1<<(_n % __DARWIN_NFDBITS))); +} + +#define __DARWIN_FD_SET(n, p) do { int __fd = (n); ((p)->fds_bits[__fd/__DARWIN_NFDBITS] |= (1<<(__fd % __DARWIN_NFDBITS))); } while(0) +#define __DARWIN_FD_CLR(n, p) do { int __fd = (n); ((p)->fds_bits[__fd/__DARWIN_NFDBITS] &= ~(1<<(__fd % __DARWIN_NFDBITS))); } while(0) +#define __DARWIN_FD_ISSET(n, p) __darwin_fd_isset((n), (p)) + +#if __GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 3 +/* + * Use the built-in bzero function instead of the library version so that + * we do not pollute the namespace or introduce prototype warnings. + */ +#define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p))) +#else +#define __DARWIN_FD_ZERO(p) bzero(p, sizeof(*(p))) +#endif + +#define __DARWIN_FD_COPY(f, t) bcopy(f, t, sizeof(*(f))) +#endif /* _FD_SET */ +#endif /* __need_fd_set */ + +#ifdef __need_stack_t +#undef __need_stack_t +#ifndef _STACK_T +#define _STACK_T +typedef _STRUCT_SIGALTSTACK stack_t; /* [???] signal stack */ +#endif /* _STACK_T */ +#endif /* __need_stack_t */ + +#ifdef __need_ucontext_t +#undef __need_ucontext_t +/* user context */ +#ifndef _UCONTEXT_T +#define _UCONTEXT_T +typedef _STRUCT_UCONTEXT ucontext_t; /* [???] user context */ +#endif /* _UCONTEXT_T */ +#endif /* __need_ucontext_t */ + +#ifdef __need_ucontext64_t +#undef __need_ucontext64_t +#ifndef _UCONTEXT64_T +#define _UCONTEXT64_T +typedef _STRUCT_UCONTEXT64 ucontext64_t; /* [???] user context */ +#endif /* _UCONTEXT64_T */ +#endif /* __need_ucontext64_t */ diff --git a/i386/include/sys/_types.h b/i386/include/sys/_types.h new file mode 100644 index 0000000..9047dc2 --- /dev/null +++ b/i386/include/sys/_types.h @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2003-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _SYS__TYPES_H_ +#define _SYS__TYPES_H_ + +#include <sys/cdefs.h> +#include <machine/_types.h> + +/* + * Type definitions; takes common type definitions that must be used + * in multiple header files due to [XSI], removes them from the system + * space, and puts them in the implementation space. + */ + +#ifdef __cplusplus +#ifdef __GNUG__ +#define __DARWIN_NULL __null +#else /* ! __GNUG__ */ +#ifdef __LP64__ +#define __DARWIN_NULL (0L) +#else /* !__LP64__ */ +#define __DARWIN_NULL 0 +#endif /* __LP64__ */ +#endif /* __GNUG__ */ +#else /* ! __cplusplus */ +#define __DARWIN_NULL ((void *)0) +#endif /* __cplusplus */ + +typedef __int64_t __darwin_blkcnt_t; /* total blocks */ +typedef __int32_t __darwin_blksize_t; /* preferred block size */ +typedef __int32_t __darwin_dev_t; /* dev_t */ +typedef unsigned int __darwin_fsblkcnt_t; /* Used by statvfs and fstatvfs */ +typedef unsigned int __darwin_fsfilcnt_t; /* Used by statvfs and fstatvfs */ +typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */ +typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/ +typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */ +#if __DARWIN_64_BIT_INO_T +typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */ +#else /* !__DARWIN_64_BIT_INO_T */ +typedef __uint32_t __darwin_ino_t; /* [???] Used for inodes */ +#endif /* __DARWIN_64_BIT_INO_T */ +typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */ +typedef __darwin_mach_port_name_t __darwin_mach_port_t; /* Used by mach */ +typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */ +typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */ +#ifndef _OFF_T +#define _OFF_T +typedef __darwin_off_t off_t; +#endif +typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */ +typedef __uint32_t __darwin_sigset_t; /* [???] signal set */ +typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */ +typedef __uint32_t __darwin_uid_t; /* [???] user IDs */ +typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */ +typedef unsigned char __darwin_uuid_t[16]; +typedef char __darwin_uuid_string_t[37]; + +#endif /* _SYS__TYPES_H_ */ diff --git a/i386/include/sys/appleapiopts.h b/i386/include/sys/appleapiopts.h new file mode 100644 index 0000000..2055701 --- /dev/null +++ b/i386/include/sys/appleapiopts.h @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef __SYS_APPLEAPIOPTS_H__ +#define __SYS_APPLEAPIOPTS_H__ + + +#ifndef __APPLE_API_STANDARD +#define __APPLE_API_STANDARD +#endif /* __APPLE_API_STANDARD */ + +#ifndef __APPLE_API_STABLE +#define __APPLE_API_STABLE +#endif /* __APPLE_API_STABLE */ + +#ifndef __APPLE_API_STRICT_CONFORMANCE + +#ifndef __APPLE_API_EVOLVING +#define __APPLE_API_EVOLVING +#endif /* __APPLE_API_EVOLVING */ + +#ifndef __APPLE_API_UNSTABLE +#define __APPLE_API_UNSTABLE +#endif /* __APPLE_API_UNSTABLE */ + +#ifndef __APPLE_API_PRIVATE +#define __APPLE_API_PRIVATE +#endif /* __APPLE_API_PRIVATE */ + +#ifndef __APPLE_API_OBSOLETE +#define __APPLE_API_OBSOLETE +#endif /* __APPLE_API_OBSOLETE */ + +#endif /* __APPLE_API_STRICT_CONFORMANCE */ + +#endif /* __SYS_APPLEAPIOPTS_H__ */ + diff --git a/i386/include/sys/buf.h b/i386/include/sys/buf.h new file mode 100644 index 0000000..6f0db77 --- /dev/null +++ b/i386/include/sys/buf.h @@ -0,0 +1,859 @@ +/* + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ +/* + * Copyright (c) 1982, 1986, 1989, 1993 + * The Regents of the University of California. All rights reserved. + * (c) UNIX System Laboratories, Inc. + * All or some portions of this file are derived from material licensed + * to the University of California by American Telephone and Telegraph + * Co. or Unix System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)buf.h 8.9 (Berkeley) 3/30/95 + */ + +#ifndef _SYS_BUF_H_ +#define _SYS_BUF_H_ + +#include <sys/cdefs.h> +#include <sys/kernel_types.h> +#include <mach/memory_object_types.h> + + +#define B_WRITE 0x00000000 /* Write buffer (pseudo flag). */ +#define B_READ 0x00000001 /* Read buffer. */ +#define B_ASYNC 0x00000002 /* Start I/O, do not wait. */ +#define B_NOCACHE 0x00000004 /* Do not cache block after use. */ +#define B_DELWRI 0x00000008 /* Delay I/O until buffer reused. */ +#define B_LOCKED 0x00000010 /* Locked in core (not reusable). */ +#define B_PHYS 0x00000020 /* I/O to user memory. */ +#define B_CLUSTER 0x00000040 /* UPL based I/O generated by cluster layer */ +#define B_PAGEIO 0x00000080 /* Page in/out */ +#define B_META 0x00000100 /* buffer contains meta-data. */ +#define B_RAW 0x00000200 /* Set by physio for raw transfers. */ +#define B_FUA 0x00000400 /* Write-through disk cache(if supported) */ +#define B_PASSIVE 0x00000800 /* PASSIVE I/Os are ignored by THROTTLE I/O */ +#define B_IOSTREAMING 0x00001000 /* sequential access pattern detected */ +#define B_THROTTLED_IO 0x00002000 /* low priority I/O */ +/* + * make sure to check when adding flags that + * that the new flags don't overlap the definitions + * in buf_internal.h + */ + +__BEGIN_DECLS + +/*! + @function buf_markaged + @abstract Mark a buffer as "aged," i.e. as a good candidate to be discarded and reused after buf_brelse(). + @param bp Buffer to mark. + */ +void buf_markaged(buf_t); + +/*! + @function buf_markinvalid + @abstract Mark a buffer as not having valid data and being ready for immediate reuse after buf_brelse(). + @param bp Buffer to mark. + */ +void buf_markinvalid(buf_t); + +/*! + @function buf_markdelayed + @abstract Mark a buffer as a delayed write: mark it dirty without actually scheduling I/O. + @discussion Data will be flushed to disk at some later time, not with brelse(). A sync()/fsync() + or pressure necessitating reuse of the buffer will cause it to be written back to disk. + @param bp Buffer to mark. + */ +void buf_markdelayed(buf_t); + +/*! + @function buf_markeintr + @abstract Mark a buffer as having been interrupted during I/O. + @discussion Waiters for I/O to complete (buf_biowait()) will return with EINTR when woken up. + buf_markeintr does not itself do a wakeup. + @param bp Buffer to mark. + */ +void buf_markeintr(buf_t); + +/*! + @function buf_markfua + @abstract Mark a buffer for write through disk cache, if disk supports it. + @param bp Buffer to mark. + */ +void buf_markfua(buf_t); + +/*! + @function buf_fua + @abstract Check if a buffer is marked for write through disk caches. + @param bp Buffer to test. + @return Nonzero if buffer is marked for write-through, 0 if not. + */ +int buf_fua(buf_t); + +/*! + @function buf_valid + @abstract Check if a buffer contains valid data. + @param bp Buffer to test. + @return Nonzero if buffer has valid data, 0 if not. + */ +int buf_valid(buf_t); + +/*! + @function buf_fromcache + @abstract Check if a buffer's data was found in core. + @discussion Will return truth after a buf_getblk that finds a valid buffer in the cache or the relevant + data in core (but not in a buffer). + @param bp Buffer to test. + @return Nonzero if we got this buffer's data without doing I/O, 0 if not. + */ +int buf_fromcache(buf_t); + +/*! + @function buf_upl + @abstract Get the upl (Universal Page List) associated with a buffer. + @discussion Buffers allocated with buf_alloc() are not returned with a upl, and + traditional buffers only have a upl while an I/O is in progress. + @param bp Buffer whose upl to grab. + @return Buffer's upl if it has one, else NULL. + */ +void * buf_upl(buf_t); + +/*! + @function buf_uploffset + @abstract Get the offset into a UPL at which this buffer begins. + @discussion This function should only be called on iobufs, i.e. buffers allocated with buf_alloc(). + @param bp Buffer whose uploffset to grab. + @return Buffer's uploffset--does not check whether that value makes sense for this buffer. + */ +uint32_t buf_uploffset(buf_t); + + + +/*! + @function buf_proc + @abstract Get the process associated with this buffer. + @discussion buf_proc() will generally return NULL; a process is currently only associated with + a buffer in the event of a physio() call. + @param bp Buffer whose associated process to find. + @return Associated process, possibly NULL. + */ +proc_t buf_proc(buf_t); + +/*! + @function buf_dirtyoff + @abstract Get the starting offset of the dirty region associated with a buffer. + @discussion The dirty offset is zero unless someone explicitly calls buf_setdirtyoff() (which the kernel does not). + @param bp Buffer whose dirty offset to get. + @return Dirty offset (0 if not explicitly changed). + */ +uint32_t buf_dirtyoff(buf_t); + +/*! + @function buf_dirtyend + @abstract Get the ending offset of the dirty region associated with a buffer. + @discussion If the buffer's data was found incore and dirty, the dirty end is the size of the block; otherwise, unless + someone outside of xnu explicitly changes it by calling buf_setdirtyend(), it will be zero. + @param bp Buffer whose dirty end to get. + @return 0 if buffer is found clean; size of buffer if found dirty. Can be set to any value by callers of buf_setdirtyend(). + */ +uint32_t buf_dirtyend(buf_t); + +/*! + @function buf_setdirtyoff + @abstract Set the starting offset of the dirty region associated with a buffer. + @discussion This value is zero unless someone set it explicitly. + @param bp Buffer whose dirty end to set. + @return void. + */ +void buf_setdirtyoff(buf_t, uint32_t); + +/*! + @function buf_setdirtyend + @abstract Set the ending offset of the dirty region associated with a buffer. + @discussion If the buffer's data was found incore and dirty, the dirty end is the size of the block; otherwise, unless + someone outside of xnu explicitly changes it by calling buf_setdirtyend(), it will be zero. + @param bp Buffer whose dirty end to set. + @return void. + */ +void buf_setdirtyend(buf_t, uint32_t); + +/*! + @function buf_error + @abstract Get the error value associated with a buffer. + @discussion Errors are set with buf_seterror(). + @param bp Buffer whose error value to retrieve. + @return Error value, directly. + */ +errno_t buf_error(buf_t); + +/*! + @function buf_seterror + @abstract Set an error value on a buffer. + @param bp Buffer whose error value to set. + @return void. + */ +void buf_seterror(buf_t, errno_t); + +/*! + @function buf_setflags + @abstract Set flags on a buffer. + @discussion: buffer_flags |= flags + @param bp Buffer whose flags to set. + @param flags Flags to add to buffer's mask. B_LOCKED/B_NOCACHE/B_ASYNC/B_READ/B_WRITE/B_PAGEIO/B_FUA + @return void. + */ +void buf_setflags(buf_t, int32_t); + +/*! + @function buf_clearflags + @abstract Clear flags on a buffer. + @discussion: buffer_flags &= ~flags + @param bp Buffer whose flags to clear. + @param flags Flags to remove from buffer's mask. B_LOCKED/B_NOCACHE/B_ASYNC/B_READ/B_WRITE/B_PAGEIO/B_FUA + @return void. + */ +void buf_clearflags(buf_t, int32_t); + +/*! + @function buf_flags + @abstract Get flags set on a buffer. + @discussion Valid flags are B_LOCKED/B_NOCACHE/B_ASYNC/B_READ/B_WRITE/B_PAGEIO/B_FUA. + @param bp Buffer whose flags to grab. + @return flags. + */ +int32_t buf_flags(buf_t); + +/*! + @function buf_reset + @abstract Reset I/O flag state on a buffer. + @discussion Clears current flags on a buffer (internal and external) and allows some new flags to be set. + Used perhaps to prepare an iobuf for reuse. + @param bp Buffer whose flags to grab. + @param flags Flags to set on buffer: B_READ, B_WRITE, B_ASYNC, B_NOCACHE. + @return void. + */ +void buf_reset(buf_t, int32_t); + +/*! + @function buf_map + @abstract Get virtual mappings for buffer data. + @discussion For buffers created through buf_getblk() (i.e. traditional buffer cache usage), + buf_map() just returns the address at which data was mapped by but_getblk(). For a B_CLUSTER buffer, i.e. an iobuf + whose upl state is managed manually, there are two possibilities. If the buffer was created + with an underlying "real" buffer through cluster_bp(), the mapping of the "real" buffer is returned. + Otherwise, the buffer was created with buf_alloc() and buf_setupl() was subsequently called; buf_map() + will call ubc_upl_map() to get a mapping for the buffer's upl and return the start of that mapping + plus the buffer's upl offset (set in buf_setupl()). In the last case, buf_unmap() must later be called + to tear down the mapping. NOTE: buf_map() does not set the buffer data pointer; this must be done with buf_setdataptr(). + @param bp Buffer whose mapping to find or create. + @param io_addr Destination for mapping address. + @return 0 for success, ENOMEM if unable to map the buffer. + */ +errno_t buf_map(buf_t, caddr_t *); + +/*! + @function buf_unmap + @abstract Release mappings for buffer data. + @discussion For buffers created through buf_getblk() (i.e. traditional buffer cache usage), + buf_unmap() does nothing; buf_brelse() will take care of unmapping. For a B_CLUSTER buffer, i.e. an iobuf + whose upl state is managed manually, there are two possibilities. If the buffer was created + with an underlying "real" buffer through cluster_bp(), buf_unmap() does nothing; buf_brelse() on the + underlying buffer will tear down the mapping. Otherwise, the buffer was created with buf_alloc() and + buf_setupl() was subsequently called; buf_map() created the mapping. In this case, buf_unmap() will + unmap the buffer. + @param bp Buffer whose mapping to find or create. + @param io_addr Destination for mapping address. + @return 0 for success, EINVAL if unable to unmap buffer. + */ +errno_t buf_unmap(buf_t); + +/*! + @function buf_setdrvdata + @abstract Set driver-specific data on a buffer. + @param bp Buffer whose driver-data to set. + @param drvdata Opaque driver data. + @return void. + */ +void buf_setdrvdata(buf_t, void *); + +/*! + @function buf_setdrvdata + @abstract Get driver-specific data from a buffer. + @param bp Buffer whose driver data to get. + @return Opaque driver data. + */ +void * buf_drvdata(buf_t); + +/*! + @function buf_setfsprivate + @abstract Set filesystem-specific data on a buffer. + @param bp Buffer whose filesystem data to set. + @param fsprivate Opaque filesystem data. + @return void. + */ +void buf_setfsprivate(buf_t, void *); + +/*! + @function buf_fsprivate + @abstract Get filesystem-specific data from a buffer. + @param bp Buffer whose filesystem data to get. + @return Opaque filesystem data. + */ +void * buf_fsprivate(buf_t); + +/*! + @function buf_blkno + @abstract Get physical block number associated with a buffer, in the sense of VNOP_BLOCKMAP. + @discussion When a buffer's physical block number is the same is its logical block number, then the physical + block number is considered uninitialized. A physical block number of -1 indicates that there is no valid + physical mapping (e.g. the logical block is invalid or corresponds to a sparse region in a file). Physical + block number is normally set by the cluster layer or by buf_getblk(). + @param bp Buffer whose physical block number to get. + @return Block number. + */ +daddr64_t buf_blkno(buf_t); + +/*! + @function buf_lblkno + @abstract Get logical block number associated with a buffer. + @discussion Logical block number is set on traditionally-used buffers by an argument passed to buf_getblk(), + for example by buf_bread(). + @param bp Buffer whose logical block number to get. + @return Block number. + */ +daddr64_t buf_lblkno(buf_t); + +/*! + @function buf_setblkno + @abstract Set physical block number associated with a buffer. + @discussion Physical block number is generally set by the cluster layer or by buf_getblk(). + @param bp Buffer whose physical block number to set. + @param blkno Block number to set. + @return void. + */ +void buf_setblkno(buf_t, daddr64_t); + +/*! + @function buf_setlblkno + @abstract Set logical block number associated with a buffer. + @discussion Logical block number is set on traditionally-used buffers by an argument passed to buf_getblk(), + for example by buf_bread(). + @param bp Buffer whose logical block number to set. + @param lblkno Block number to set. + @return void. + */ +void buf_setlblkno(buf_t, daddr64_t); + +/*! + @function buf_count + @abstract Get count of valid bytes in a buffer. This may be less than the space allocated to the buffer. + @param bp Buffer whose byte count to get. + @return Byte count. + */ +uint32_t buf_count(buf_t); + +/*! + @function buf_size + @abstract Get size of data region allocated to a buffer. + @discussion May be larger than amount of valid data in buffer. + @param bp Buffer whose size to get. + @return Size. + */ +uint32_t buf_size(buf_t); + +/*! + @function buf_resid + @abstract Get a count of bytes which were not consumed by an I/O on a buffer. + @discussion Set when an I/O operations completes. + @param bp Buffer whose outstanding count to get. + @return Count of unwritten/unread bytes. + */ +uint32_t buf_resid(buf_t); + +/*! + @function buf_setcount + @abstract Set count of valid bytes in a buffer. This may be less than the space allocated to the buffer. + @param bp Buffer whose byte count to set. + @param bcount Count to set. + @return void. + */ +void buf_setcount(buf_t, uint32_t); + +/*! + @function buf_setsize + @abstract Set size of data region allocated to a buffer. + @discussion May be larger than amount of valid data in buffer. Should be used by + code which is manually providing storage for an iobuf, one allocated with buf_alloc(). + @param bp Buffer whose size to set. + @return void. + */ +void buf_setsize(buf_t, uint32_t); + +/*! + @function buf_setresid + @abstract Set a count of bytes outstanding for I/O in a buffer. + @discussion Set when an I/O operations completes. Examples: called by IOStorageFamily when I/O + completes, often called on an "original" buffer when using a manipulated buffer to perform I/O + on behalf of the first. + @param bp Buffer whose outstanding count to set. + @return Count of unwritten/unread bytes. + */ +void buf_setresid(buf_t, uint32_t); + +/*! + @function buf_setdataptr + @abstract Set the address at which a buffer's data will be stored. + @discussion In traditional buffer use, the data pointer will be set automatically. This routine is + useful with iobufs (allocated with buf_alloc()). + @param bp Buffer whose data pointer to set. + @param data Pointer to data region. + @return void. + */ +void buf_setdataptr(buf_t, uintptr_t); + +/*! + @function buf_dataptr + @abstract Get the address at which a buffer's data is stored; for iobufs, this must + be set with buf_setdataptr(). See buf_map(). + @param bp Buffer whose data pointer to retrieve. + @return Data pointer; NULL if unset. + */ +uintptr_t buf_dataptr(buf_t); + +/*! + @function buf_vnode + @abstract Get the vnode associated with a buffer. + @discussion Every buffer is associated with a file. Because there is an I/O in flight, + there is an iocount on this vnode; it is returned WITHOUT an extra iocount, and vnode_put() + need NOT be called. + @param bp Buffer whose vnode to retrieve. + @return Buffer's vnode. + */ +vnode_t buf_vnode(buf_t); + +/*! + @function buf_setvnode + @abstract Set the vnode associated with a buffer. + @discussion This call need not be used on traditional buffers; it is for use with iobufs. + @param bp Buffer whose vnode to set. + @param vp The vnode to attach to the buffer. + @return void. + */ +void buf_setvnode(buf_t, vnode_t); + +/*! + @function buf_setdevice + @abstract Set the device associated with a buffer. + @discussion A buffer's device is set in buf_strategy() (or in buf_getblk() if the file is a device). + It is also set on an iobuf if buf_alloc() is passed a device vnode. + @param bp Buffer whose device ID to set. + @param vp Device to set on the buffer. + @return 0 for success, EINVAL if vp is not a device file. + */ +errno_t buf_setdevice(buf_t, vnode_t); + +/*! + @function buf_strategy + @abstract Pass an I/O request for a buffer down to the device layer. + @discussion This is one of the most important routines in the buffer cache layer. For buffers obtained + through buf_getblk, it handles finding physical block numbers for the I/O (with VNOP_BLKTOOFF and + VNOP_BLOCKMAP), packaging the I/O into page-sized chunks, and initiating I/O on the disk by calling + the device's strategy routine. If a buffer's UPL has been set manually with buf_setupl(), it assumes + that the request is already correctly configured with a block number and a size divisible by page size + and will just call directly to the device. + @param devvp Device on which to perform I/O + @param ap vnop_strategy_args structure (most importantly, a buffer). + @return 0 for success, or errors from filesystem or device layers. + */ +errno_t buf_strategy(vnode_t, void *); + +/* + * Flags for buf_invalblkno() + */ +#define BUF_WAIT 0x01 + +/*! + @function buf_invalblkno + @abstract Invalidate a filesystem logical block in a file. + @discussion buf_invalblkno() tries to make the data for a given block in a file + invalid; if the buffer for that block is found in core and is not busy, we mark it + invalid and call buf_brelse() (see "flags" param for what happens if the buffer is busy). + buf_brelse(), noticing that it is invalid, will + will return the buffer to the empty-buffer list and tell the VM subsystem to abandon + the relevant pages. Data will not be written to backing store--it will be cast aside. + Note that this function will only work if the block in question has been + obtained with a buf_getblk(). If data has been read into core without using + traditional buffer cache routines, buf_invalblkno() will not be able to invalidate it--this + includes the use of iobufs. + @param bp Buffer whose block to invalidate. + @param lblkno Logical block number. + @param flags BUF_WAIT: wait for busy buffers to become unbusy and invalidate them then. Otherwise, + just return EBUSY for busy blocks. + @return 0 for success, EINVAL if vp is not a device file. + */ +errno_t buf_invalblkno(vnode_t, daddr64_t, int); + +/*! + @function buf_callback + @abstract Get the function set to be called when I/O on a buffer completes. + @discussion A function returned by buf_callback was originally set with buf_setcallback(). + @param bp Buffer whose callback to get. + @return 0 for success, or errors from filesystem or device layers. + */ +void * buf_callback(buf_t); + +/*! + @function buf_setcallback + @abstract Set a function to be called once when I/O on a buffer completes. + @discussion A one-shot callout set with buf_setcallback() will be called from buf_biodone() + when I/O completes. It will be passed the "transaction" argument as well as the buffer. + buf_setcallback() also marks the buffer as B_ASYNC. + @param bp Buffer whose callback to set. + @param callback function to use as callback. + @param transaction Additional argument to callback function. + @return 0; always succeeds. + */ +errno_t buf_setcallback(buf_t, void (*)(buf_t, void *), void *); + +/*! + @function buf_setupl + @abstract Set the UPL (Universal Page List), and offset therein, on a buffer. + @discussion buf_setupl() should only be called on buffers allocated with buf_alloc(). + A subsequent call to buf_map() will map the UPL and give back the address at which data + begins. After buf_setupl() is called, a buffer is marked B_CLUSTER; when this is the case, + buf_strategy() assumes that a buffer is correctly configured to be passed to the device + layer without modification. Passing a NULL upl will clear the upl and the B_CLUSTER flag on the + buffer. + @param bp Buffer whose upl to set. + @param upl UPL to set in the buffer. + @parma offset Offset within upl at which relevant data begin. + @return 0 for success, EINVAL if the buffer was not allocated with buf_alloc(). + */ +errno_t buf_setupl(buf_t, upl_t, uint32_t); + +/*! + @function buf_clone + @abstract Clone a buffer with a restricted range and an optional callback. + @discussion Generates a buffer which is identical to its "bp" argument except that + it spans a subset of the data of the original. The buffer to be cloned should + have been allocated with buf_alloc(). Checks its arguments to make sure + that the data subset is coherent. Optionally, adds a callback function and argument to it + to be called when I/O completes (as with buf_setcallback(), but B_ASYNC is not set). If the original buffer had + a upl set through buf_setupl(), this upl is copied to the new buffer; otherwise, the original's + data pointer is used raw. The buffer must be released with buf_free(). + @param bp Buffer to clone. + @param io_offset Offset, relative to start of data in original buffer, at which new buffer's data will begin. + @param io_size Size of buffer region in new buffer, in the sense of buf_count(). + @param iodone Callback to be called from buf_biodone() when I/O completes, in the sense of buf_setcallback(). + @param arg Argument to pass to iodone() callback. + @return NULL if io_offset/io_size combination is invalid for the buffer to be cloned; otherwise, the new buffer. + */ +buf_t buf_clone(buf_t, int, int, void (*)(buf_t, void *), void *); + +/*! + @function buf_alloc + @abstract Allocate an uninitialized buffer. + @discussion A buffer returned by buf_alloc() is marked as busy and as an iobuf; it has no storage set up and must be + set up using buf_setdataptr() or buf_setupl()/buf_map(). + @param vp vnode to associate with the buffer: optionally NULL. If vp is a device file, then + the buffer's associated device will be set. If vp is NULL, it can be set later with buf_setvnode(). + @return New buffer. + */ +buf_t buf_alloc(vnode_t); + +/*! + @function buf_free + @abstract Free a buffer that was allocated with buf_alloc(). + @discussion The storage (UPL, data pointer) associated with an iobuf must be freed manually. + @param bp The buffer to free. + @return void. + */ +void buf_free(buf_t); + +/* + * flags for buf_invalidateblks + */ +#define BUF_WRITE_DATA 0x0001 /* write data blocks first */ +#define BUF_SKIP_META 0x0002 /* skip over metadata blocks */ + +/*! + @function buf_invalidateblks + @abstract Invalidate all the blocks associated with a vnode. + @discussion This function does for all blocks associated with a vnode what buf_invalblkno does for one block. + Again, it will only be able to invalidate data which were populated with traditional buffer cache routines, + i.e. by buf_getblk() and callers thereof. Unlike buf_invalblkno(), it can be made to write dirty data to disk + rather than casting it aside. + @param bp The buffer whose data to invalidate. + @param flags BUF_WRITE_DATA: write dirty data to disk with VNOP_BWRITE() before kicking buffer cache entries out. + BUF_SKIP_META: do not invalidate metadata blocks. + @param slpflag Flags to pass to "msleep" while waiting to acquire busy buffers. + @param slptimeo Timeout in "hz" (1/100 second) to wait for a buffer to become unbusy before waking from sleep + and re-starting the scan. + @return 0 for success, error values from msleep(). + */ +int buf_invalidateblks(vnode_t, int, int, int); + +/* + * flags for buf_flushdirtyblks and buf_iterate + */ +#define BUF_SKIP_NONLOCKED 0x01 +#define BUF_SKIP_LOCKED 0x02 +#define BUF_SCAN_CLEAN 0x04 /* scan the clean buffers */ +#define BUF_SCAN_DIRTY 0x08 /* scan the dirty buffers */ +#define BUF_NOTIFY_BUSY 0x10 /* notify the caller about the busy pages during the scan */ + + +#define BUF_RETURNED 0 +#define BUF_RETURNED_DONE 1 +#define BUF_CLAIMED 2 +#define BUF_CLAIMED_DONE 3 +/*! + @function buf_flushdirtyblks + @abstract Write dirty file blocks to disk. + @param vp The vnode whose blocks to flush. + @param wait Wait for writes to complete before returning. + @param flags Can pass zero, meaning "flush all dirty buffers." + BUF_SKIP_NONLOCKED: Skip buffers which are not busy when we encounter them. + BUF_SKIP_LOCKED: Skip buffers which are busy when we encounter them. + @param msg String to pass to msleep(). + @return void. + */ +void buf_flushdirtyblks(vnode_t, int, int, const char *); + +/*! + @function buf_iterate + @abstract Perform some operation on all buffers associated with a vnode. + @param vp The vnode whose buffers to scan. + @param callout Function to call on each buffer. Should return one of: + BUF_RETURNED: buf_iterate() should call buf_brelse() on the buffer. + BUF_RETURNED_DONE: buf_iterate() should call buf_brelse() on the buffer and then stop iterating. + BUF_CLAIMED: buf_iterate() should continue iterating (and not call buf_brelse()). + BUF_CLAIMED_DONE: buf_iterate() should stop iterating (and not call buf_brelse()). + @param flag + BUF_SKIP_NONLOCKED: Skip buffers which are not busy when we encounter them. BUF_SKIP_LOCKED: Skip buffers which are busy when we encounter them. + BUF_SCAN_CLEAN: Call out on clean buffers. + BUF_SCAN_DIRTY: Call out on dirty buffers. + BUF_NOTIFY_BUSY: If a buffer cannot be acquired, pass a NULL buffer to callout; otherwise, + that buffer will be silently skipped. + @param arg Argument to pass to callout in addition to buffer. + @return void. + */ +void buf_iterate(vnode_t, int (*)(buf_t, void *), int, void *); + +/*! + @function buf_clear + @abstract Zero out the storage associated with a buffer. + @discussion Calls buf_map() to get the buffer's data address; for a B_CLUSTER + buffer (one which has had buf_setupl() called on it), it tries to map the buffer's + UPL into memory; should only be called once during the life cycle of an iobuf (one allocated + with buf_alloc()). + @param bp The buffer to zero out. + @return void. + */ +void buf_clear(buf_t); + +/*! + @function buf_bawrite + @abstract Start an asychronous write on a buffer. + @discussion Calls VNOP_BWRITE to start the process of propagating an asynchronous write down to the device layer. + Callers can wait for writes to complete at their discretion using buf_biowait(). When this function is called, + data should already have been written to the buffer's data region. + @param bp The buffer on which to initiate I/O. + @param throttle If "throttle" is nonzero and more than VNODE_ASYNC_THROTTLE writes are in progress on this file, + buf_bawrite() will block until the write count drops below VNODE_ASYNC_THROTTLE. If "throttle" is zero and the write + count is high, it will fail with EWOULDBLOCK; the caller can decide whether to make a blocking call or pursue + other opportunities. + @return EWOULDBLOCK if write count is high and "throttle" is zero; otherwise, errors from VNOP_BWRITE. + */ +errno_t buf_bawrite(buf_t); + +/*! + @function buf_bdwrite + @abstract Mark a buffer for delayed write. + @discussion Marks a buffer as waiting for delayed write and the current I/O as complete; data will be written to backing store + before the buffer is reused, but it will not be queued for I/O immediately. Note that for buffers allocated + with buf_alloc(), there are no such guarantees; you must take care of your own flushing to disk. If + the number of delayed writes pending on the system is greater than an internal limit and the caller has not + requested otherwise [see return_error] , buf_bdwrite() will unilaterally launch an asynchronous I/O with buf_bawrite() to keep the pile of + delayed writes from getting too large. + @param bp The buffer to mark for delayed write. + @param return_error If the number of pending delayed writes systemwide is larger than an internal limit, + return EAGAIN rather than doing an asynchronous write. + @return EAGAIN for return_error != 0 case, 0 for succeess, errors from buf_bawrite. + */ +errno_t buf_bdwrite(buf_t); + +/*! + @function buf_bwrite + @abstract Write a buffer's data to backing store. + @discussion Once the data in a buffer has been modified, buf_bwrite() starts sending it to disk by calling + VNOP_STRATEGY. Unless B_ASYNC has been set on the buffer (by buf_setflags() or otherwise), data will have + been written to disk when buf_bwrite() returns. See Bach (p 56). + @param bp The buffer to write to disk. + @return 0 for success; errors from buf_biowait(). + */ +errno_t buf_bwrite(buf_t); + +/*! + @function buf_biodone + @abstract Mark an I/O as completed. + @discussion buf_biodone() should be called by whosoever decides that an I/O on a buffer is complete; for example, + IOStorageFamily. It clears the dirty flag on a buffer and signals on the vnode that a write has completed + with vnode_writedone(). If a callout or filter has been set on the buffer, that function is called. In the case + of a callout, that function is expected to take care of cleaning up and freeing the buffer. + Otherwise, if the buffer is marked B_ASYNC (e.g. it was passed to buf_bawrite()), then buf_biodone() + considers itself justified in calling buf_brelse() to return it to free lists--no one is waiting for it. Finally, + waiters on the bp (e.g. in buf_biowait()) are woken up. + @param bp The buffer to mark as done with I/O. + @return void. + */ +void buf_biodone(buf_t); + +/*! + @function buf_biowait + @abstract Wait for I/O on a buffer to complete. + @discussion Waits for I/O on a buffer to finish, as marked by a buf_biodone() call. + @param bp The buffer to wait on. + @return 0 for a successful wait; nonzero the buffer has been marked as EINTR or had an error set on it. + */ +errno_t buf_biowait(buf_t); + +/*! + @function buf_brelse + @abstract Release any claim to a buffer, sending it back to free lists. + @discussion buf_brelse() cleans up buffer state and releases a buffer to the free lists. If the buffer + is not marked invalid and its pages are dirty (e.g. a delayed write was made), its data will be commited + to backing store. If it is marked invalid, its data will be discarded completely. + A valid, cacheable buffer will be put on a list and kept in the buffer hash so it + can be found again; otherwise, it will be dissociated from its vnode and treated as empty. Which list a valid + buffer is placed on depends on the use of buf_markaged(), whether it is metadata, and the B_LOCKED flag. A + B_LOCKED buffer will not be available for reuse by other files, though its data may be paged out. + Note that buf_brelse() is intended for use with traditionally allocated buffers. + @param bp The buffer to release. + @retrn void. + */ +void buf_brelse(buf_t); + +/*! + @function minphys + @abstract Adjust a buffer's count to be no more than maximum physical I/O transfer size for the host architecture. + @discussion physio() takes as a parameter a function to bound transfer sizes for each VNOP_STRATEGY() call. minphys() + is a default implementation. It calls buf_setcount() to make the buffer's count the min() of its current count + and the max I/O size for the host architecture. + @param bp The buffer whose byte count to modify. + @return New byte count. + */ +u_int minphys(buf_t bp); + +/* + * Flags for operation type in getblk() + */ +#define BLK_READ 0x01 /* buffer for read */ +#define BLK_WRITE 0x02 /* buffer for write */ +#define BLK_META 0x10 /* buffer for metadata */ +/* + * modifier for above flags... if set, getblk will only return + * a bp that is already valid... i.e. found in the cache + */ +#define BLK_ONLYVALID 0x80000000 + +/*! + @function buf_getblk + @abstract Traditional buffer cache routine to get a buffer corresponding to a logical block in a file. + @discussion buf_getblk() gets a buffer, not necessarily containing valid data, representing a block in a file. + A metadata buffer will be returned with its own zone-allocated storage, managed by the traditional buffer-cache + layer, whereas data buffers will be returned hooked into backing by the UBC (which in fact controls the caching of data). + buf_getblk() first looks for the buffer header in cache; if the buffer is in-core but busy, buf_getblk() will wait for it to become + unbusy, depending on the slpflag and slptimeo parameters. If the buffer is found unbusy and is a metadata buffer, + it must already contain valid data and will be returned directly; data buffers will have a UPL configured to + prepare for interaction with the underlying UBC. If the buffer is found in core, it will be marked as such + and buf_fromcache() will return truth. A buffer is allocated and initialized (but not filled with data) + if none is found in core. buf_bread(), buf_breadn(), buf_meta_bread(), and buf_meta_breadn() all + return buffers obtained with buf_getblk(). + @param vp File for which to get block. + @param blkno Logical block number. + @param size Size of block. + @param slpflag Flag to pass to msleep() while waiting for buffer to become unbusy. + @param slptimeo Time, in milliseconds, to wait for buffer to become unbusy. 0 means to wait indefinitely. + @param operation BLK_READ: want a read buffer. BLK_WRITE: want a write buffer. BLK_META: want a metadata buffer. BLK_ONLYVALID: + only return buffers which are found in core (do not allocate anew), and do not change buffer size. The last remark means + that if a given logical block is found in core with a different size than what is requested, the buffer size will not be modified. + @return Buffer found in core or newly allocated, either containing valid data or ready for I/O. + */ +buf_t buf_getblk(vnode_t, daddr64_t, int, int, int, int); + +/*! + @function buf_geteblk + @abstract Get a metadata buffer which is marked invalid and not associated with any vnode. + @discussion A buffer is returned with zone-allocated storage of the specified size, marked B_META and invalid. + It has no vnode and is not visible in the buffer hash. + @param size Size of buffer. + @return Always returns a new buffer. + */ +buf_t buf_geteblk(int); + + +__END_DECLS + + +/* Macros to clear/set/test flags. */ +#define SET(t, f) (t) |= (f) +#define CLR(t, f) (t) &= ~(f) +#define ISSET(t, f) ((t) & (f)) + + +#endif /* !_SYS_BUF_H_ */ diff --git a/i386/include/sys/cdefs.h b/i386/include/sys/cdefs.h new file mode 100644 index 0000000..3240187 --- /dev/null +++ b/i386/include/sys/cdefs.h @@ -0,0 +1,583 @@ +/* + * Copyright (c) 2000-2009 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* Copyright 1995 NeXT Computer, Inc. All rights reserved. */ +/* + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Berkeley Software Design, Inc. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)cdefs.h 8.8 (Berkeley) 1/9/95 + */ + +#ifndef _CDEFS_H_ +#define _CDEFS_H_ + +#if defined(__cplusplus) +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS } +#else +#define __BEGIN_DECLS +#define __END_DECLS +#endif + +/* + * The __CONCAT macro is used to concatenate parts of symbol names, e.g. + * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. + * The __CONCAT macro is a bit tricky -- make sure you don't put spaces + * in between its arguments. __CONCAT can also concatenate double-quoted + * strings produced by the __STRING macro, but this only works with ANSI C. + */ +#if defined(__STDC__) || defined(__cplusplus) +#define __P(protos) protos /* full-blown ANSI C */ +#define __CONCAT(x,y) x ## y +#define __STRING(x) #x + +#define __const const /* define reserved names to standard */ +#define __signed signed +#define __volatile volatile +#if defined(__cplusplus) +#define __inline inline /* convert to C++ keyword */ +#else +#ifndef __GNUC__ +#define __inline /* delete GCC keyword */ +#endif /* !__GNUC__ */ +#endif /* !__cplusplus */ + +#else /* !(__STDC__ || __cplusplus) */ +#define __P(protos) () /* traditional C preprocessor */ +#define __CONCAT(x,y) x/**/y +#define __STRING(x) "x" + +#ifndef __GNUC__ +#define __const /* delete pseudo-ANSI C keywords */ +#define __inline +#define __signed +#define __volatile +#endif /* !__GNUC__ */ + +/* + * In non-ANSI C environments, new programs will want ANSI-only C keywords + * deleted from the program and old programs will want them left alone. + * When using a compiler other than gcc, programs using the ANSI C keywords + * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS. + * When using "gcc -traditional", we assume that this is the intent; if + * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone. + */ +#ifndef NO_ANSI_KEYWORDS +#define const __const /* convert ANSI C keywords */ +#define inline __inline +#define signed __signed +#define volatile __volatile +#endif /* !NO_ANSI_KEYWORDS */ +#endif /* !(__STDC__ || __cplusplus) */ + +/* + * GCC1 and some versions of GCC2 declare dead (non-returning) and + * pure (no side effects) functions using "volatile" and "const"; + * unfortunately, these then cause warnings under "-ansi -pedantic". + * GCC2 uses a new, peculiar __attribute__((attrs)) style. All of + * these work for GNU C++ (modulo a slight glitch in the C++ grammar + * in the distribution version of 2.5.5). + */ +#if defined(__MWERKS__) && (__MWERKS__ > 0x2400) + /* newer Metrowerks compilers support __attribute__() */ +#elif __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 5 +#define __dead2 __attribute__((__noreturn__)) +#define __pure2 __attribute__((__const__)) +#if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 7 +#define __unused /* no attribute */ +#else +#define __unused __attribute__((__unused__)) +#endif +#else +#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */ +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) +/* __dead and __pure are depreciated. Use __dead2 and __pure2 instead */ +#define __dead __volatile +#define __pure __const +#endif +#endif + +/* Delete pseudo-keywords wherever they are not available or needed. */ +#ifndef __dead +#define __dead +#define __pure +#endif +#ifndef __dead2 +#define __dead2 +#define __pure2 +#define __unused +#endif + +/* + * GCC 2.95 provides `__restrict' as an extension to C90 to support the + * C99-specific `restrict' type qualifier. We happen to use `__restrict' as + * a way to define the `restrict' type qualifier without disturbing older + * software that is unaware of C99 keywords. + */ +#if !(__GNUC__ == 2 && __GNUC_MINOR__ == 95) +#if __STDC_VERSION__ < 199901 +#define __restrict +#else +#define __restrict restrict +#endif +#endif + +/* + * Compiler-dependent macros to declare that functions take printf-like + * or scanf-like arguments. They are null except for versions of gcc + * that are known to support the features properly. Functions declared + * with these attributes will cause compilation warnings if there is a + * mismatch between the format string and subsequent function parameter + * types. + */ +#if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7 +#define __printflike(fmtarg, firstvararg) \ + __attribute__((__format__ (__printf__, fmtarg, firstvararg))) +#define __scanflike(fmtarg, firstvararg) \ + __attribute__((__format__ (__scanf__, fmtarg, firstvararg))) +#else +#define __printflike(fmtarg, firstvararg) +#define __scanflike(fmtarg, firstvararg) +#endif + +#define __IDSTRING(name,string) static const char name[] __unused = string + +#ifndef __COPYRIGHT +#define __COPYRIGHT(s) __IDSTRING(copyright,s) +#endif + +#ifndef __RCSID +#define __RCSID(s) __IDSTRING(rcsid,s) +#endif + +#ifndef __SCCSID +#define __SCCSID(s) __IDSTRING(sccsid,s) +#endif + +#ifndef __PROJECT_VERSION +#define __PROJECT_VERSION(s) __IDSTRING(project_version,s) +#endif + +/* + * COMPILATION ENVIRONMENTS + * + * DEFAULT By default newly complied code will get POSIX APIs plus + * Apple API extensions in scope. + * + * Most users will use this compilation environment to avoid + * behavioral differences between 32 and 64 bit code. + * + * LEGACY Defining _NONSTD_SOURCE will get pre-POSIX APIs plus Apple + * API extensions in scope. + * + * This is generally equivalent to the Tiger release compilation + * environment, except that it cannot be applied to 64 bit code; + * its use is discouraged. + * + * We expect this environment to be deprecated in the future. + * + * STRICT Defining _POSIX_C_SOURCE or _XOPEN_SOURCE restricts the + * available APIs to exactly the set of APIs defined by the + * corresponding standard, based on the value defined. + * + * A correct, portable definition for _POSIX_C_SOURCE is 200112L. + * A correct, portable definition for _XOPEN_SOURCE is 600L. + * + * Apple API extensions are not visible in this environment, + * which can cause Apple specific code to fail to compile, + * or behave incorrectly if prototypes are not in scope or + * warnings about missing prototypes are not enabled or ignored. + * + * In any compilation environment, for correct symbol resolution to occur, + * function prototypes must be in scope. It is recommended that all Apple + * tools users add either the "-Wall" or "-Wimplicit-function-declaration" + * compiler flags to their projects to be warned when a function is being + * used without a prototype in scope. + */ + +/* These settings are particular to each product. */ +/* Product: MacOSX */ +#define __DARWIN_ONLY_64_BIT_INO_T 0 +/* #undef __DARWIN_ONLY_UNIX_CONFORMANCE (automatically set for 64-bit) */ +#define __DARWIN_ONLY_VERS_1050 0 + +/* + * The __DARWIN_ALIAS macros are used to do symbol renaming; they allow + * legacy code to use the old symbol, thus maintaining binary compatibility + * while new code can use a standards compliant version of the same function. + * + * __DARWIN_ALIAS is used by itself if the function signature has not + * changed, it is used along with a #ifdef check for __DARWIN_UNIX03 + * if the signature has changed. Because the __LP64__ environment + * only supports UNIX03 semantics it causes __DARWIN_UNIX03 to be + * defined, but causes __DARWIN_ALIAS to do no symbol mangling. + * + * As a special case, when XCode is used to target a specific version of the + * OS, the manifest constant __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ + * will be defined by the compiler, with the digits representing major version + * time 100 + minor version times 10 (e.g. 10.5 := 1050). If we are targeting + * pre-10.5, and it is the default compilation environment, revert the + * compilation environment to pre-__DARWIN_UNIX03. + */ +#if !defined(__DARWIN_ONLY_UNIX_CONFORMANCE) +# if defined(__LP64__) +# define __DARWIN_ONLY_UNIX_CONFORMANCE 1 +# else /* !__LP64__ */ +# define __DARWIN_ONLY_UNIX_CONFORMANCE 0 +# endif /* __LP64__ */ +#endif /* !__DARWIN_ONLY_UNIX_CONFORMANCE */ + +#if !defined(__DARWIN_UNIX03) +# if __DARWIN_ONLY_UNIX_CONFORMANCE +# if defined(_NONSTD_SOURCE) +# error "Can't define _NONSTD_SOURCE when only UNIX conformance is available." +# endif /* _NONSTD_SOURCE */ +# define __DARWIN_UNIX03 1 +# elif defined(_DARWIN_C_SOURCE) || defined(_XOPEN_SOURCE) || defined(_POSIX_C_SOURCE) +# if defined(_NONSTD_SOURCE) +# error "Can't define both _NONSTD_SOURCE and any of _DARWIN_C_SOURCE, _XOPEN_SOURCE or _POSIX_C_SOURCE." +# endif /* _NONSTD_SOURCE */ +# define __DARWIN_UNIX03 1 +# elif defined(_NONSTD_SOURCE) +# define __DARWIN_UNIX03 0 +# else /* default */ +# if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1050) +# define __DARWIN_UNIX03 0 +# else /* __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 */ +# define __DARWIN_UNIX03 1 +# endif /* __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 */ +# endif /* _DARWIN_C_SOURCE || _XOPEN_SOURCE || _POSIX_C_SOURCE || __LP64__ */ +#endif /* !__DARWIN_UNIX03 */ + +#if !defined(__DARWIN_64_BIT_INO_T) +# if defined(_DARWIN_USE_64_BIT_INODE) +# if defined(_DARWIN_NO_64_BIT_INODE) +# error "Can't define both _DARWIN_USE_64_BIT_INODE and _DARWIN_NO_64_BIT_INODE." +# endif /* _DARWIN_NO_64_BIT_INODE */ +# define __DARWIN_64_BIT_INO_T 1 +# elif defined(_DARWIN_NO_64_BIT_INODE) +# if __DARWIN_ONLY_64_BIT_INO_T +# error "Can't define _DARWIN_NO_64_BIT_INODE when only 64-bit inodes are available." +# endif /* __DARWIN_ONLY_64_BIT_INO_T */ +# define __DARWIN_64_BIT_INO_T 0 +# else /* default */ +# if __DARWIN_ONLY_64_BIT_INO_T +# define __DARWIN_64_BIT_INO_T 1 +# elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1060) || __DARWIN_UNIX03 == 0 +# define __DARWIN_64_BIT_INO_T 0 +# else /* default */ +# define __DARWIN_64_BIT_INO_T 1 +# endif /* __DARWIN_ONLY_64_BIT_INO_T */ +# endif +#endif /* !__DARWIN_64_BIT_INO_T */ + +#if !defined(__DARWIN_VERS_1050) +# if __DARWIN_ONLY_VERS_1050 +# define __DARWIN_VERS_1050 1 +# elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1050) || __DARWIN_UNIX03 == 0 +# define __DARWIN_VERS_1050 0 +# else /* default */ +# define __DARWIN_VERS_1050 1 +# endif +#endif /* !__DARWIN_VERS_1050 */ + +#if !defined(__DARWIN_NON_CANCELABLE) +# define __DARWIN_NON_CANCELABLE 0 +#endif /* !__DARWIN_NON_CANCELABLE */ + +/* + * symbol suffixes used for symbol versioning + */ +#if __DARWIN_UNIX03 +# if __DARWIN_ONLY_UNIX_CONFORMANCE +# define __DARWIN_SUF_UNIX03 /* nothing */ +# else /* !__DARWIN_ONLY_UNIX_CONFORMANCE */ +# define __DARWIN_SUF_UNIX03 "$UNIX2003" +# endif /* __DARWIN_ONLY_UNIX_CONFORMANCE */ + +# if __DARWIN_64_BIT_INO_T +# if __DARWIN_ONLY_64_BIT_INO_T +# define __DARWIN_SUF_64_BIT_INO_T /* nothing */ +# else /* !__DARWIN_ONLY_64_BIT_INO_T */ +# define __DARWIN_SUF_64_BIT_INO_T "$INODE64" +# endif /* __DARWIN_ONLY_64_BIT_INO_T */ +# else /* !__DARWIN_64_BIT_INO_T */ +# define __DARWIN_SUF_64_BIT_INO_T /* nothing */ +# endif /* __DARWIN_64_BIT_INO_T */ + +# if __DARWIN_VERS_1050 +# if __DARWIN_ONLY_VERS_1050 +# define __DARWIN_SUF_1050 /* nothing */ +# else /* !__DARWIN_ONLY_VERS_1050 */ +# define __DARWIN_SUF_1050 "$1050" +# endif /* __DARWIN_ONLY_VERS_1050 */ +# else /* !__DARWIN_VERS_1050 */ +# define __DARWIN_SUF_1050 /* nothing */ +# endif /* __DARWIN_VERS_1050 */ + +# if __DARWIN_NON_CANCELABLE +# define __DARWIN_SUF_NON_CANCELABLE "$NOCANCEL" +# else /* !__DARWIN_NON_CANCELABLE */ +# define __DARWIN_SUF_NON_CANCELABLE /* nothing */ +# endif /* __DARWIN_NON_CANCELABLE */ + +#else /* !__DARWIN_UNIX03 */ +# define __DARWIN_SUF_UNIX03 /* nothing */ +# define __DARWIN_SUF_64_BIT_INO_T /* nothing */ +# define __DARWIN_SUF_NON_CANCELABLE /* nothing */ +# define __DARWIN_SUF_1050 /* nothing */ +#endif /* __DARWIN_UNIX03 */ + +#define __DARWIN_SUF_EXTSN "$DARWIN_EXTSN" + +/* + * symbol versioning macros + */ +#define __DARWIN_ALIAS(sym) __asm("_" __STRING(sym) __DARWIN_SUF_UNIX03) +#define __DARWIN_ALIAS_C(sym) __asm("_" __STRING(sym) __DARWIN_SUF_NON_CANCELABLE __DARWIN_SUF_UNIX03) +#define __DARWIN_ALIAS_I(sym) __asm("_" __STRING(sym) __DARWIN_SUF_64_BIT_INO_T __DARWIN_SUF_UNIX03) +#define __DARWIN_INODE64(sym) __asm("_" __STRING(sym) __DARWIN_SUF_64_BIT_INO_T) + +#define __DARWIN_1050(sym) __asm("_" __STRING(sym) __DARWIN_SUF_1050) +#define __DARWIN_1050ALIAS(sym) __asm("_" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_UNIX03) +#define __DARWIN_1050ALIAS_C(sym) __asm("_" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_NON_CANCELABLE __DARWIN_SUF_UNIX03) +#define __DARWIN_1050ALIAS_I(sym) __asm("_" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_64_BIT_INO_T __DARWIN_SUF_UNIX03) +#define __DARWIN_1050INODE64(sym) __asm("_" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_64_BIT_INO_T) + +#define __DARWIN_EXTSN(sym) __asm("_" __STRING(sym) __DARWIN_SUF_EXTSN) +#define __DARWIN_EXTSN_C(sym) __asm("_" __STRING(sym) __DARWIN_SUF_EXTSN __DARWIN_SUF_NON_CANCELABLE) + +/* + * symbol release macros + */ +#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1060) +#undef __DARWIN_10_6_AND_LATER +#define __DARWIN_10_6_AND_LATER_ALIAS(x) /* nothing */ +#else /* 10.6 and beyond */ +#define __DARWIN_10_6_AND_LATER +#define __DARWIN_10_6_AND_LATER_ALIAS(x) x +#endif + + +/* + * POSIX.1 requires that the macros we test be defined before any standard + * header file is included. This permits us to convert values for feature + * testing, as necessary, using only _POSIX_C_SOURCE. + * + * Here's a quick run-down of the versions: + * defined(_POSIX_SOURCE) 1003.1-1988 + * _POSIX_C_SOURCE == 1L 1003.1-1990 + * _POSIX_C_SOURCE == 2L 1003.2-1992 C Language Binding Option + * _POSIX_C_SOURCE == 199309L 1003.1b-1993 + * _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, + * and the omnibus ISO/IEC 9945-1: 1996 + * _POSIX_C_SOURCE == 200112L 1003.1-2001 + * + * In addition, the X/Open Portability Guide, which is now the Single UNIX + * Specification, defines a feature-test macro which indicates the version of + * that specification, and which subsumes _POSIX_C_SOURCE. + */ + +/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1L. */ +#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1L +#undef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 199009L +#endif + +/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2L. */ +#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2L +#undef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 199209L +#endif + +/* Deal with various X/Open Portability Guides and Single UNIX Spec. */ +#ifdef _XOPEN_SOURCE +#if _XOPEN_SOURCE - 0L >= 600L +#undef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 200112L +#elif _XOPEN_SOURCE - 0L >= 500L +#undef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 199506L +#endif +#endif + +/* + * Deal with all versions of POSIX. The ordering relative to the tests above is + * important. + */ +#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) +#define _POSIX_C_SOURCE 198808L +#endif + +/* + * long long is not supported in c89 (__STRICT_ANSI__), but g++ -ansi and + * c99 still want long longs. While not perfect, we allow long longs for + * g++. + */ +#define __DARWIN_NO_LONG_LONG (defined(__STRICT_ANSI__) \ + && (__STDC_VERSION__-0 < 199901L) \ + && !defined(__GNUG__)) + +/* + * Long double compatibility macro allow selecting variant symbols based + * on the old (compatible) 64-bit long doubles, or the new 128-bit + * long doubles. This applies only to ppc; i386 already has long double + * support, while ppc64 doesn't have any backwards history. + */ +#if defined(__arm__) +# define __DARWIN_LDBL_COMPAT(x) /* nothing */ +# define __DARWIN_LDBL_COMPAT2(x) /* nothing */ +# define __DARWIN_LONG_DOUBLE_IS_DOUBLE 1 +#elif defined(__ppc__) +# if defined(__LDBL_MANT_DIG__) && defined(__DBL_MANT_DIG__) && \ + __LDBL_MANT_DIG__ > __DBL_MANT_DIG__ +# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 < 1040 +# define __DARWIN_LDBL_COMPAT(x) __asm("_" __STRING(x) "$LDBLStub") +# else +# define __DARWIN_LDBL_COMPAT(x) __asm("_" __STRING(x) "$LDBL128") +# endif +# define __DARWIN_LDBL_COMPAT2(x) __asm("_" __STRING(x) "$LDBL128") +# define __DARWIN_LONG_DOUBLE_IS_DOUBLE 0 +# else +# define __DARWIN_LDBL_COMPAT(x) /* nothing */ +# define __DARWIN_LDBL_COMPAT2(x) /* nothing */ +# define __DARWIN_LONG_DOUBLE_IS_DOUBLE 1 +# endif +#elif defined(__i386__) || defined(__ppc64__) || defined(__x86_64__) +# define __DARWIN_LDBL_COMPAT(x) /* nothing */ +# define __DARWIN_LDBL_COMPAT2(x) /* nothing */ +# define __DARWIN_LONG_DOUBLE_IS_DOUBLE 0 +#else +# error Unknown architecture +#endif + +/* + * Deprecation macro + */ +#if __GNUC__ >= 3 +#define __deprecated __attribute__((deprecated)) +#else +#define __deprecated /* nothing */ +#endif + +/***************************************** + * Public darwin-specific feature macros + *****************************************/ + +/* + * _DARWIN_FEATURE_64_BIT_INODE indicates that the ino_t type is 64-bit, and + * structures modified for 64-bit inodes (like struct stat) will be used. + */ +#if __DARWIN_64_BIT_INO_T +#define _DARWIN_FEATURE_64_BIT_INODE 1 +#endif + +/* + * _DARWIN_FEATURE_LONG_DOUBLE_IS_DOUBLE indicates when the long double type + * is the same as the double type (ppc and arm only) + */ +#if __DARWIN_LONG_DOUBLE_IS_DOUBLE +#define _DARWIN_FEATURE_LONG_DOUBLE_IS_DOUBLE 1 +#endif + +/* + * _DARWIN_FEATURE_64_ONLY_BIT_INODE indicates that the ino_t type may only + * be 64-bit; there is no support for 32-bit ino_t when this macro is defined + * (and non-zero). There is no struct stat64 either, as the regular + * struct stat will already be the 64-bit version. + */ +#if __DARWIN_ONLY_64_BIT_INO_T +#define _DARWIN_FEATURE_ONLY_64_BIT_INODE 1 +#endif + +/* + * _DARWIN_FEATURE_ONLY_VERS_1050 indicates that only those APIs updated + * in 10.5 exists; no pre-10.5 variants are available. + */ +#if __DARWIN_ONLY_VERS_1050 +#define _DARWIN_FEATURE_ONLY_VERS_1050 1 +#endif + +/* + * _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE indicates only UNIX conforming API + * are available (the legacy BSD APIs are not available) + */ +#if __DARWIN_ONLY_UNIX_CONFORMANCE +#define _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE 1 +#endif + +/* + * _DARWIN_FEATURE_UNIX_CONFORMANCE indicates whether UNIX conformance is on, + * and specifies the conformance level (3 is SUSv3) + */ +#if __DARWIN_UNIX03 +#define _DARWIN_FEATURE_UNIX_CONFORMANCE 3 +#endif + +/* + * This macro casts away the qualifier from the variable + * + * Note: use at your own risk, removing qualifiers can result in + * catastrophic run-time failures. + */ +#ifndef __CAST_AWAY_QUALIFIER +#define __CAST_AWAY_QUALIFIER(variable, qualifier, type) (type) ((char *)0 + ((qualifier char *)(variable) - (qualifier char *)0) ) +#endif + +#endif /* !_CDEFS_H_ */ diff --git a/i386/include/sys/disk.h b/i386/include/sys/disk.h new file mode 100644 index 0000000..bd61eb6 --- /dev/null +++ b/i386/include/sys/disk.h @@ -0,0 +1,139 @@ +/* + * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _SYS_DISK_H_ +#define _SYS_DISK_H_ + +#include <stdint.h> +//#include <sys/ioctl.h> + +/* + * Definitions + * + * ioctl description + * ------------------------------------- --------------------------------------- + * DKIOCEJECT eject media + * DKIOCSYNCHRONIZECACHE flush media + * + * DKIOCFORMAT format media + * DKIOCGETFORMATCAPACITIES get media's formattable capacities + * + * DKIOCGETBLOCKSIZE get media's block size + * DKIOCGETBLOCKCOUNT get media's block count + * DKIOCGETFIRMWAREPATH get media's firmware path + * + * DKIOCISFORMATTED is media formatted? + * DKIOCISWRITABLE is media writable? + * + * DKIOCREQUESTIDLE idle media + * DKIOCDISCARD delete unused data + * + * DKIOCGETMAXBLOCKCOUNTREAD get maximum block count for reads + * DKIOCGETMAXBLOCKCOUNTWRITE get maximum block count for writes + * DKIOCGETMAXBYTECOUNTREAD get maximum byte count for reads + * DKIOCGETMAXBYTECOUNTWRITE get maximum byte count for writes + * + * DKIOCGETMAXSEGMENTCOUNTREAD get maximum segment count for reads + * DKIOCGETMAXSEGMENTCOUNTWRITE get maximum segment count for writes + * DKIOCGETMAXSEGMENTBYTECOUNTREAD get maximum segment byte count for reads + * DKIOCGETMAXSEGMENTBYTECOUNTWRITE get maximum segment byte count for writes + * + * DKIOCGETMINSEGMENTALIGNMENTBYTECOUNT get minimum segment alignment in bytes + * DKIOCGETMAXSEGMENTADDRESSABLEBITCOUNT get maximum segment width in bits + * + * DKIOCGETPHYSICALBLOCKSIZE get device's block size + * DKIOCGETCOMMANDPOOLSIZE get device's queue depth + */ + +typedef struct +{ + uint64_t offset; + uint64_t length; + + uint8_t reserved0128[16]; /* reserved, clear to zero */ +} dk_discard_t; + +typedef struct +{ + char path[128]; +} dk_firmware_path_t; + +typedef struct +{ + uint64_t blockCount; + uint32_t blockSize; + + uint8_t reserved0096[4]; /* reserved, clear to zero */ +} dk_format_capacity_t; + +typedef struct +{ + dk_format_capacity_t * capacities; + uint32_t capacitiesCount; /* use zero to probe count */ + +#ifdef __LP64__ + uint8_t reserved0096[4]; /* reserved, clear to zero */ +#else /* !__LP64__ */ + uint8_t reserved0064[8]; /* reserved, clear to zero */ +#endif /* !__LP64__ */ +} dk_format_capacities_t; + +#define DKIOCEJECT _IO('d', 21) +#define DKIOCSYNCHRONIZECACHE _IO('d', 22) + +#define DKIOCFORMAT _IOW('d', 26, dk_format_capacity_t) +#define DKIOCGETFORMATCAPACITIES _IOWR('d', 26, dk_format_capacities_t) + +#define DKIOCGETBLOCKSIZE _IOR('d', 24, uint32_t) +#define DKIOCGETBLOCKCOUNT _IOR('d', 25, uint64_t) +#define DKIOCGETFIRMWAREPATH _IOR('d', 28, dk_firmware_path_t) + +#define DKIOCISFORMATTED _IOR('d', 23, uint32_t) +#define DKIOCISWRITABLE _IOR('d', 29, uint32_t) + +#define DKIOCREQUESTIDLE _IO('d', 30) +#define DKIOCDISCARD _IOW('d', 31, dk_discard_t) + +#define DKIOCGETMAXBLOCKCOUNTREAD _IOR('d', 64, uint64_t) +#define DKIOCGETMAXBLOCKCOUNTWRITE _IOR('d', 65, uint64_t) +#define DKIOCGETMAXBYTECOUNTREAD _IOR('d', 70, uint64_t) +#define DKIOCGETMAXBYTECOUNTWRITE _IOR('d', 71, uint64_t) + +#define DKIOCGETMAXSEGMENTCOUNTREAD _IOR('d', 66, uint64_t) +#define DKIOCGETMAXSEGMENTCOUNTWRITE _IOR('d', 67, uint64_t) +#define DKIOCGETMAXSEGMENTBYTECOUNTREAD _IOR('d', 68, uint64_t) +#define DKIOCGETMAXSEGMENTBYTECOUNTWRITE _IOR('d', 69, uint64_t) + +#define DKIOCGETMINSEGMENTALIGNMENTBYTECOUNT _IOR('d', 74, uint64_t) +#define DKIOCGETMAXSEGMENTADDRESSABLEBITCOUNT _IOR('d', 75, uint64_t) + +#define DKIOCGETPHYSICALBLOCKSIZE _IOR('d', 77, uint32_t) +#define DKIOCGETCOMMANDPOOLSIZE _IOR('d', 78, uint32_t) + + +#endif /* _SYS_DISK_H_ */ diff --git a/i386/include/sys/kernel_types.h b/i386/include/sys/kernel_types.h new file mode 100644 index 0000000..7d7d709 --- /dev/null +++ b/i386/include/sys/kernel_types.h @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2004-2010 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ + +#ifndef _KERN_SYS_KERNELTYPES_H_ +#define _KERN_SYS_KERNELTYPES_H_ + +#include <sys/cdefs.h> +#include <sys/types.h> +#include <stdint.h> + +#ifdef BSD_BUILD +/* Macros(?) to clear/set/test flags. */ +#define SET(t, f) (t) |= (f) +#define CLR(t, f) (t) &= ~(f) +#define ISSET(t, f) ((t) & (f)) +#endif + + +typedef int errno_t; +typedef int64_t daddr64_t; + +#ifndef BSD_BUILD +struct buf; +typedef struct buf * buf_t; + +struct file; +typedef struct file * file_t; + +#ifndef __LP64__ +struct ucred; +typedef struct ucred * ucred_t; +#endif + +struct mount; +typedef struct mount * mount_t; + +struct vnode; +typedef struct vnode * vnode_t; + +struct proc; +typedef struct proc * proc_t; + +struct uio; +typedef struct uio * uio_t; + +struct vfs_context; +typedef struct vfs_context * vfs_context_t; + +struct vfstable; +typedef struct vfstable * vfstable_t; + +struct __ifnet; +struct __mbuf; +struct __pkthdr; +struct __socket; +struct __sockopt; +struct __ifaddr; +struct __ifmultiaddr; +struct __ifnet_filter; +struct __rtentry; +struct __if_clone; + +typedef struct __ifnet* ifnet_t; +typedef struct __mbuf* mbuf_t; +typedef struct __pkthdr* pkthdr_t; +typedef struct __socket* socket_t; +typedef struct __sockopt* sockopt_t; +typedef struct __ifaddr* ifaddr_t; +typedef struct __ifmultiaddr* ifmultiaddr_t; +typedef struct __ifnet_filter* interface_filter_t; +typedef struct __rtentry* route_t; +typedef struct __if_clone* if_clone_t; + +#else /* BSD_BUILD */ + +typedef struct buf * buf_t; +typedef struct file * file_t; +#ifndef __LP64__ +typedef struct ucred * ucred_t; +#endif +typedef struct mount * mount_t; +typedef struct vnode * vnode_t; +typedef struct proc * proc_t; +typedef struct uio * uio_t; +typedef struct user_iovec * user_iovec_t; +typedef struct vfs_context * vfs_context_t; +typedef struct vfstable * vfstable_t; + + +#endif /* !BSD_BUILD */ + +#ifndef _KAUTH_GUID +#define _KAUTH_GUID +/* Apple-style globally unique identifier */ +typedef struct { +#define KAUTH_GUID_SIZE 16 /* 128-bit identifier */ + unsigned char g_guid[KAUTH_GUID_SIZE]; +} guid_t; +#define _GUID_T +#endif /* _KAUTH_GUID */ + +#ifndef _KAUTH_ACE +#define _KAUTH_ACE +struct kauth_ace; +typedef struct kauth_ace * kauth_ace_t; +#endif +#ifndef _KAUTH_ACL +#define _KAUTH_ACL +struct kauth_acl; +typedef struct kauth_acl * kauth_acl_t; +#endif +#ifndef _KAUTH_FILESEC +#define _KAUTH_FILESEC +struct kauth_filesec; +typedef struct kauth_filesec * kauth_filesec_t; +#endif + +#endif /* !_KERN_SYS_KERNELTYPES_H_ */ diff --git a/i386/include/sys/param.h b/i386/include/sys/param.h new file mode 100644 index 0000000..395fdf5 --- /dev/null +++ b/i386/include/sys/param.h @@ -0,0 +1,250 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1995, 1997 Apple Computer, Inc. All Rights Reserved */ +/*- + * Copyright (c) 1982, 1986, 1989, 1993 + * The Regents of the University of California. All rights reserved. + * (c) UNIX System Laboratories, Inc. + * All or some portions of this file are derived from material licensed + * to the University of California by American Telephone and Telegraph + * Co. or Unix System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)param.h 8.3 (Berkeley) 4/4/95 + */ + +#ifndef _SYS_PARAM_H_ +#define _SYS_PARAM_H_ + +#define BSD 199506 /* System version (year & month). */ +#define BSD4_3 1 +#define BSD4_4 1 + +#define NeXTBSD 1995064 /* NeXTBSD version (year, month, release) */ +#define NeXTBSD4_0 0 /* NeXTBSD 4.0 */ + +#ifndef NULL +#define NULL __DARWIN_NULL +#endif /* ! NULL */ + +#ifndef LOCORE +#include <sys/types.h> +#endif + +/* + * Machine-independent constants (some used in following include files). + * Redefined constants are from POSIX 1003.1 limits file. + * + * MAXCOMLEN should be >= sizeof(ac_comm) (see <acct.h>) + * MAXLOGNAME should be >= UT_NAMESIZE (see <utmp.h>) + */ +#include <sys/syslimits.h> + +#define MAXCOMLEN 16 /* max command name remembered */ +#define MAXINTERP 64 /* max interpreter file name length */ +#define MAXLOGNAME 255 /* max login name length */ +#define MAXUPRC CHILD_MAX /* max simultaneous processes */ +#define NCARGS ARG_MAX /* max bytes for an exec function */ +#define NGROUPS NGROUPS_MAX /* max number groups */ +#define NOFILE 256 /* default max open files per process */ +#define NOGROUP 65535 /* marker for empty group set member */ +#define MAXHOSTNAMELEN 256 /* max hostname size */ +#define MAXDOMNAMELEN 256 /* maximum domain name length */ + +/* Machine type dependent parameters. */ +#include <i386/param.h> + +/* More types and definitions used throughout the kernel. */ +#include <limits.h> + +/* + * Priorities. Note that with 32 run queues, differences less than 4 are + * insignificant. + */ +#define PSWP 0 +#define PVM 4 +#define PINOD 8 +#define PRIBIO 16 +#define PVFS 20 +#define PZERO 22 /* No longer magic, shouldn't be here. XXX */ +#define PSOCK 24 +#define PWAIT 32 +#define PLOCK 36 +#define PPAUSE 40 +#define PUSER 50 +#define MAXPRI 127 /* Priorities range from 0 through MAXPRI. */ + +#define PRIMASK 0x0ff +#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */ +#define PTTYBLOCK 0x200 /* for tty SIGTTOU and SIGTTIN blocking */ +#define PDROP 0x400 /* OR'd with pri to stop re-aquistion of mutex upon wakeup */ +#define PSPIN 0x800 /* OR'd with pri to require mutex in spin mode upon wakeup */ + +#define NBPW sizeof(int) /* number of bytes per word (integer) */ + +#define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */ +#define NODEV (dev_t)(-1) /* non-existent device */ + +/* + * Clustering of hardware pages on machines with ridiculously small + * page sizes is done here. The paging subsystem deals with units of + * CLSIZE pte's describing NBPG (from machine/param.h) pages each. + */ +#define CLBYTES (CLSIZE*NBPG) +#define CLOFSET (CLSIZE*NBPG-1) /* for clusters, like PGOFSET */ +#define claligned(x) ((((int)(x))&CLOFSET)==0) +#define CLOFF CLOFSET +#define CLSHIFT (PGSHIFT+CLSIZELOG2) + +#if CLSIZE==1 +#define clbase(i) (i) +#define clrnd(i) (i) +#else +/* Give the base virtual address (first of CLSIZE). */ +#define clbase(i) ((i) &~ (CLSIZE-1)) +/* Round a number of clicks up to a whole cluster. */ +#define clrnd(i) (((i) + (CLSIZE-1)) &~ (CLSIZE-1)) +#endif + +#define CBLOCK 64 /* Clist block size, must be a power of 2. */ +#define CBQSIZE (CBLOCK/NBBY) /* Quote bytes/cblock - can do better. */ + /* Data chars/clist. */ +#define CBSIZE (CBLOCK - sizeof(struct cblock *) - CBQSIZE) +#define CROUND (CBLOCK - 1) /* Clist rounding. */ + +/* + * File system parameters and macros. + * + * The file system is made out of blocks of at most MAXPHYS units, with + * smaller units (fragments) only in the last direct block. MAXBSIZE + * primarily determines the size of buffers in the buffer pool. It may be + * made larger than MAXPHYS without any effect on existing file systems; + * however making it smaller may make some file systems unmountable. + * We set this to track the value of (MAX_UPL_TRANSFER*PAGE_SIZE) from + * osfmk/mach/memory_object_types.h to bound it at the maximum UPL size. + */ +#define MAXBSIZE (256 * 4096) +#define MAXPHYSIO MAXPHYS +#define MAXFRAG 8 + +#define MAXPHYSIO_WIRED (16 * 1024 * 1024) + +/* + * MAXPATHLEN defines the longest permissable path length after expanding + * symbolic links. It is used to allocate a temporary buffer from the buffer + * pool in which to do the name expansion, hence should be a power of two, + * and must be less than or equal to MAXBSIZE. MAXSYMLINKS defines the + * maximum number of symbolic links that may be expanded in a path name. + * It should be set high enough to allow all legitimate uses, but halt + * infinite loops reasonably quickly. + */ +#define MAXPATHLEN PATH_MAX +#define MAXSYMLINKS 32 + +/* Bit map related macros. */ +#define setbit(a,i) (((char *)(a))[(i)/NBBY] |= 1<<((i)%NBBY)) +#define clrbit(a,i) (((char *)(a))[(i)/NBBY] &= ~(1<<((i)%NBBY))) +#define isset(a,i) (((char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) +#define isclr(a,i) ((((char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) == 0) + +/* Macros for counting and rounding. */ +#ifndef howmany +#define howmany(x, y) ((((x) % (y)) == 0) ? ((x) / (y)) : (((x) / (y)) + 1)) +#endif +#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) +#define powerof2(x) ((((x)-1)&(x))==0) + +/* Macros for min/max. */ +#ifndef MIN +#define MIN(a,b) (((a)<(b))?(a):(b)) +#endif /* MIN */ +#ifndef MAX +#define MAX(a,b) (((a)>(b))?(a):(b)) +#endif /* MAX */ + +/* + * Constants for setting the parameters of the kernel memory allocator. + * + * 2 ** MINBUCKET is the smallest unit of memory that will be + * allocated. It must be at least large enough to hold a pointer. + * + * Units of memory less or equal to MAXALLOCSAVE will permanently + * allocate physical memory; requests for these size pieces of + * memory are quite fast. Allocations greater than MAXALLOCSAVE must + * always allocate and free physical memory; requests for these + * size allocations should be done infrequently as they will be slow. + * + * Constraints: CLBYTES <= MAXALLOCSAVE <= 2 ** (MINBUCKET + 14), and + * MAXALLOCSIZE must be a power of two. + */ +#define MINBUCKET 4 /* 4 => min allocation of 16 bytes */ +#define MAXALLOCSAVE (2 * CLBYTES) + +/* + * Scale factor for scaled integers used to count %cpu time and load avgs. + * + * The number of CPU `tick's that map to a unique `%age' can be expressed + * by the formula (1 / (2 ^ (FSHIFT - 11))). The maximum load average that + * can be calculated (assuming 32 bits) can be closely approximated using + * the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15). + * + * For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age', + * FSHIFT must be at least 11; this gives us a maximum load avg of ~1024. + */ +#define FSHIFT 11 /* bits to right of fixed binary point */ +#define FSCALE (1<<FSHIFT) + +#endif /* _SYS_PARAM_H_ */ diff --git a/i386/include/sys/reboot.h b/i386/include/sys/reboot.h new file mode 100644 index 0000000..147a209 --- /dev/null +++ b/i386/include/sys/reboot.h @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ +/* + * Copyright (c) 1982, 1986, 1988, 1993, 1994 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)reboot.h 8.3 (Berkeley) 12/13/94 + */ + +#ifndef _SYS_REBOOT_H_ +#define _SYS_REBOOT_H_ + +/* + * Arguments to reboot system call. + */ + +#ifdef __APPLE_API_PRIVATE +#define RB_AUTOBOOT 0 /* flags for system auto-booting itself */ + +#define RB_ASKNAME 0x01 /* ask for file name to reboot from */ +#define RB_SINGLE 0x02 /* reboot to single user only */ +#define RB_NOSYNC 0x04 /* dont sync before reboot */ +#define RB_HALT 0x08 /* don't reboot, just halt */ +#define RB_INITNAME 0x10 /* name given for /etc/init */ +#define RB_DFLTROOT 0x20 /* use compiled-in rootdev */ +#define RB_ALTBOOT 0x40 /* use /boot.old vs /boot */ +#define RB_UNIPROC 0x80 /* don't start slaves */ +#define RB_SAFEBOOT 0x100 /* booting safe */ +#define RB_UPSDELAY 0x200 /* Delays restart by 5 minutes */ +#define RB_QUICK 0x400 /* quick and ungraceful reboot with file system caches flushed*/ +#define RB_PANIC 0 /* reboot due to panic */ +#define RB_BOOT 1 /* reboot due to boot() */ + +#endif /* __APPLE_API_PRIVATE */ + +#ifdef __APPLE_API_OBSOLETE +/* + * Constants for converting boot-style device number to type, + * adaptor (uba, mba, etc), unit number and partition number. + * Type (== major device number) is in the low byte + * for backward compatibility. Except for that of the "magic + * number", each mask applies to the shifted value. + * Format: + * (4) (4) (4) (4) (8) (8) + * -------------------------------- + * |MA | AD| CT| UN| PART | TYPE | + * -------------------------------- + */ +#define B_ADAPTORSHIFT 24 +#define B_ADAPTORMASK 0x0f +#define B_ADAPTOR(val) (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK) +#define B_CONTROLLERSHIFT 20 +#define B_CONTROLLERMASK 0xf +#define B_CONTROLLER(val) (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK) +#define B_UNITSHIFT 16 +#define B_UNITMASK 0xff +#define B_UNIT(val) (((val) >> B_UNITSHIFT) & B_UNITMASK) +#define B_PARTITIONSHIFT 8 +#define B_PARTITIONMASK 0xff +#define B_PARTITION(val) (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK) +#define B_TYPESHIFT 0 +#define B_TYPEMASK 0xff +#define B_TYPE(val) (((val) >> B_TYPESHIFT) & B_TYPEMASK) +#define B_MAGICMASK 0xf0000000 +#define B_DEVMAGIC 0xa0000000 + +#define MAKEBOOTDEV(type, adaptor, controller, unit, partition) \ + (((type) << B_TYPESHIFT) | ((adaptor) << B_ADAPTORSHIFT) | \ + ((controller) << B_CONTROLLERSHIFT) | ((unit) << B_UNITSHIFT) | \ + ((partition) << B_PARTITIONSHIFT) | B_DEVMAGIC) + +#endif /* __APPLE_API_OBSOLETE */ + + +#endif /* _SYS_REBOOT_H_ */ diff --git a/i386/include/sys/select.h b/i386/include/sys/select.h new file mode 100644 index 0000000..49a4572 --- /dev/null +++ b/i386/include/sys/select.h @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1992, 1993 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)select.h 8.2 (Berkeley) 1/4/94 + */ + +#ifndef _SYS_SELECT_H_ +#define _SYS_SELECT_H_ + +#include <sys/appleapiopts.h> +#include <sys/cdefs.h> +#include <sys/_types.h> + +/* + * [XSI] The <sys/select.h> header shall define the fd_set type as a structure. + * The timespec structure shall be defined as described in <time.h> + * The <sys/select.h> header shall define the timeval structure. + */ +#define __need_fd_set +#define __need_struct_timespec +#define __need_struct_timeval +#include <sys/_structs.h> + +/* + * The time_t and suseconds_t types shall be defined as described in + * <sys/types.h> + * The sigset_t type shall be defined as described in <signal.h> + */ +#ifndef _TIME_T +#define _TIME_T +typedef __darwin_time_t time_t; +#endif + +#ifndef _SUSECONDS_T +#define _SUSECONDS_T +typedef __darwin_suseconds_t suseconds_t; +#endif + +#ifndef _SIGSET_T +#define _SIGSET_T +typedef __darwin_sigset_t sigset_t; +#endif + +/* + * [XSI] FD_CLR, FD_ISSET, FD_SET, FD_ZERO may be declared as a function, or + * defined as a macro, or both + * [XSI] FD_SETSIZE shall be defined as a macro + */ + +/* + * Select uses bit masks of file descriptors in longs. These macros + * manipulate such bit fields (the filesystem macros use chars). The + * extra protection here is to permit application redefinition above + * the default size. + */ +#ifndef FD_SETSIZE +#define FD_SETSIZE __DARWIN_FD_SETSIZE +#endif /* FD_SETSIZE */ +#ifndef FD_SET +#define FD_SET(n, p) __DARWIN_FD_SET(n, p) +#endif /* FD_SET */ +#ifndef FD_CLR +#define FD_CLR(n, p) __DARWIN_FD_CLR(n, p) +#endif /* FD_CLR */ +#ifndef FD_ISSET +#define FD_ISSET(n, p) __DARWIN_FD_ISSET(n, p) +#endif /* FD_ISSET */ +#ifndef FD_ZERO +#define FD_ZERO(p) __DARWIN_FD_ZERO(p) +#endif /* FD_ZERO */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#ifndef FD_COPY +#define FD_COPY(f, t) __DARWIN_FD_COPY(f, t) +#endif /* FD_COPY */ +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + + +__BEGIN_DECLS + +#ifndef __MWERKS__ +int pselect(int, fd_set * __restrict, fd_set * __restrict, + fd_set * __restrict, const struct timespec * __restrict, + const sigset_t * __restrict) +#if defined(_DARWIN_C_SOURCE) || defined(_DARWIN_UNLIMITED_SELECT) + __DARWIN_EXTSN_C(pselect) +#else /* !_DARWIN_C_SOURCE && !_DARWIN_UNLIMITED_SELECT */ +# if defined(__LP64__) && !__DARWIN_NON_CANCELABLE + __DARWIN_1050(pselect) +# else /* !__LP64__ || __DARWIN_NON_CANCELABLE */ + __DARWIN_ALIAS_C(pselect) +# endif /* __LP64__ && !__DARWIN_NON_CANCELABLE */ +#endif /* _DARWIN_C_SOURCE || _DARWIN_UNLIMITED_SELECT */ + ; +#endif /* __MWERKS__ */ + +#include <sys/_select.h> /* select() prototype */ + +__END_DECLS + + +#endif /* !_SYS_SELECT_H_ */ diff --git a/i386/include/sys/socket.h b/i386/include/sys/socket.h new file mode 100644 index 0000000..a19105a --- /dev/null +++ b/i386/include/sys/socket.h @@ -0,0 +1,629 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1998, 1999 Apple Computer, Inc. All Rights Reserved */ +/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ +/* + * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)socket.h 8.4 (Berkeley) 2/21/94 + * $FreeBSD: src/sys/sys/socket.h,v 1.39.2.7 2001/07/03 11:02:01 ume Exp $ + */ +/* + * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce + * support for mandatory and extensible security protections. This notice + * is included in support of clause 2.2 (b) of the Apple Public License, + * Version 2.0. + */ + +#ifndef _SYS_SOCKET_H_ +#define _SYS_SOCKET_H_ + +#include <sys/types.h> +#include <sys/cdefs.h> +#include <machine/_param.h> + +/* + * Definitions related to sockets: types, address families, options. + */ + +/* + * Data types. + */ +#ifndef _GID_T +typedef __darwin_gid_t gid_t; +#define _GID_T +#endif + +#ifndef _OFF_T +typedef __darwin_off_t off_t; +#define _OFF_T +#endif + +#ifndef _PID_T +typedef __darwin_pid_t pid_t; +#define _PID_T +#endif + +#ifndef _SA_FAMILY_T +#define _SA_FAMILY_T +typedef __uint8_t sa_family_t; +#endif + +#ifndef _SOCKLEN_T +#define _SOCKLEN_T +typedef __darwin_socklen_t socklen_t; +#endif + +/* XXX Not explicitly defined by POSIX, but function return types are */ +#ifndef _SIZE_T +#define _SIZE_T +typedef __darwin_size_t size_t; +#endif + +/* XXX Not explicitly defined by POSIX, but function return types are */ +#ifndef _SSIZE_T +#define _SSIZE_T +typedef __darwin_ssize_t ssize_t; +#endif + +/* + * [XSI] The iovec structure shall be defined as described in <sys/uio.h>. + */ +#ifndef _STRUCT_IOVEC +#define _STRUCT_IOVEC +struct iovec { + void * iov_base; /* [XSI] Base address of I/O memory region */ + size_t iov_len; /* [XSI] Size of region iov_base points to */ +}; +#endif + +/* + * Types + */ +#define SOCK_STREAM 1 /* stream socket */ +#define SOCK_DGRAM 2 /* datagram socket */ +#define SOCK_RAW 3 /* raw-protocol interface */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define SOCK_RDM 4 /* reliably-delivered message */ +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ +#define SOCK_SEQPACKET 5 /* sequenced packet stream */ + +/* + * Option flags per-socket. + */ +#define SO_DEBUG 0x0001 /* turn on debugging info recording */ +#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ +#define SO_REUSEADDR 0x0004 /* allow local address reuse */ +#define SO_KEEPALIVE 0x0008 /* keep connections alive */ +#define SO_DONTROUTE 0x0010 /* just use interface addresses */ +#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */ +#define SO_LINGER 0x0080 /* linger on close if data present (in ticks) */ +#else +#define SO_LINGER 0x1080 /* linger on close if data present (in seconds) */ +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ +#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define SO_REUSEPORT 0x0200 /* allow local address & port reuse */ +#define SO_TIMESTAMP 0x0400 /* timestamp received dgram traffic */ +#ifndef __APPLE__ +#define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */ +#else +#define SO_DONTTRUNC 0x2000 /* APPLE: Retain unread data */ + /* (ATOMIC proto) */ +#define SO_WANTMORE 0x4000 /* APPLE: Give hint when more data ready */ +#define SO_WANTOOBFLAG 0x8000 /* APPLE: Want OOB in MSG_FLAG on receive */ +#endif +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + +/* + * Additional options, not kept in so_options. + */ +#define SO_SNDBUF 0x1001 /* send buffer size */ +#define SO_RCVBUF 0x1002 /* receive buffer size */ +#define SO_SNDLOWAT 0x1003 /* send low-water mark */ +#define SO_RCVLOWAT 0x1004 /* receive low-water mark */ +#define SO_SNDTIMEO 0x1005 /* send timeout */ +#define SO_RCVTIMEO 0x1006 /* receive timeout */ +#define SO_ERROR 0x1007 /* get error status and clear */ +#define SO_TYPE 0x1008 /* get socket type */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +/*efine SO_PRIVSTATE 0x1009 get/deny privileged state */ +#ifdef __APPLE__ +#define SO_NREAD 0x1020 /* APPLE: get 1st-packet byte count */ +#define SO_NKE 0x1021 /* APPLE: Install socket-level NKE */ +#define SO_NOSIGPIPE 0x1022 /* APPLE: No SIGPIPE on EPIPE */ +#define SO_NOADDRERR 0x1023 /* APPLE: Returns EADDRNOTAVAIL when src is not available anymore */ +#define SO_NWRITE 0x1024 /* APPLE: Get number of bytes currently in send socket buffer */ +#define SO_REUSESHAREUID 0x1025 /* APPLE: Allow reuse of port/socket by different userids */ +#ifdef __APPLE_API_PRIVATE +#define SO_NOTIFYCONFLICT 0x1026 /* APPLE: send notification if there is a bind on a port which is already in use */ +#define SO_UPCALLCLOSEWAIT 0x1027 /* APPLE: block on close until an upcall returns */ +#endif +#define SO_LINGER_SEC 0x1080 /* linger on close if data present (in seconds) */ +#define SO_RESTRICTIONS 0x1081 /* APPLE: deny inbound/outbound/both/flag set */ +#define SO_RESTRICT_DENYIN 0x00000001 /* flag for SO_RESTRICTIONS - deny inbound */ +#define SO_RESTRICT_DENYOUT 0x00000002 /* flag for SO_RESTRICTIONS - deny outbound */ +#define SO_RESTRICT_DENYSET 0x80000000 /* flag for SO_RESTRICTIONS - deny has been set */ +#define SO_RANDOMPORT 0x1082 /* APPLE: request local port randomization */ +#define SO_NP_EXTENSIONS 0x1083 /* To turn off some POSIX behavior */ +#endif +#define SO_LABEL 0x1010 /* socket's MAC label */ +#define SO_PEERLABEL 0x1011 /* socket's peer MAC label */ +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + +/* + * Structure used for manipulating linger option. + */ +struct linger { + int l_onoff; /* option on/off */ + int l_linger; /* linger time */ +}; + +#ifndef __APPLE__ +struct accept_filter_arg { + char af_name[16]; + char af_arg[256-16]; +}; +#endif + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#ifdef __APPLE__ + +/* + * Structure to control non-portable Sockets extension to POSIX + */ +struct so_np_extensions { + u_int32_t npx_flags; + u_int32_t npx_mask; +}; + +#define SONPX_SETOPTSHUT 0x000000001 /* flag for allowing setsockopt after shutdown */ + + + +#endif +#endif + +/* + * Level number for (get/set)sockopt() to apply to socket itself. + */ +#define SOL_SOCKET 0xffff /* options for socket level */ + + +/* + * Address families. + */ +#define AF_UNSPEC 0 /* unspecified */ +#define AF_UNIX 1 /* local to host (pipes) */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define AF_LOCAL AF_UNIX /* backward compatibility */ +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ +#define AF_INET 2 /* internetwork: UDP, TCP, etc. */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define AF_IMPLINK 3 /* arpanet imp addresses */ +#define AF_PUP 4 /* pup protocols: e.g. BSP */ +#define AF_CHAOS 5 /* mit CHAOS protocols */ +#define AF_NS 6 /* XEROX NS protocols */ +#define AF_ISO 7 /* ISO protocols */ +#define AF_OSI AF_ISO +#define AF_ECMA 8 /* European computer manufacturers */ +#define AF_DATAKIT 9 /* datakit protocols */ +#define AF_CCITT 10 /* CCITT protocols, X.25 etc */ +#define AF_SNA 11 /* IBM SNA */ +#define AF_DECnet 12 /* DECnet */ +#define AF_DLI 13 /* DEC Direct data link interface */ +#define AF_LAT 14 /* LAT */ +#define AF_HYLINK 15 /* NSC Hyperchannel */ +#define AF_APPLETALK 16 /* Apple Talk */ +#define AF_ROUTE 17 /* Internal Routing Protocol */ +#define AF_LINK 18 /* Link layer interface */ +#define pseudo_AF_XTP 19 /* eXpress Transfer Protocol (no AF) */ +#define AF_COIP 20 /* connection-oriented IP, aka ST II */ +#define AF_CNT 21 /* Computer Network Technology */ +#define pseudo_AF_RTIP 22 /* Help Identify RTIP packets */ +#define AF_IPX 23 /* Novell Internet Protocol */ +#define AF_SIP 24 /* Simple Internet Protocol */ +#define pseudo_AF_PIP 25 /* Help Identify PIP packets */ +#ifdef __APPLE__ +/*define pseudo_AF_BLUE 26 Identify packets for Blue Box - Not used */ +#define AF_NDRV 27 /* Network Driver 'raw' access */ +#endif +#define AF_ISDN 28 /* Integrated Services Digital Network*/ +#define AF_E164 AF_ISDN /* CCITT E.164 recommendation */ +#define pseudo_AF_KEY 29 /* Internal key-management function */ +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ +#define AF_INET6 30 /* IPv6 */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define AF_NATM 31 /* native ATM access */ +#ifdef __APPLE__ +#define AF_SYSTEM 32 /* Kernel event messages */ +#define AF_NETBIOS 33 /* NetBIOS */ +#define AF_PPP 34 /* PPP communication protocol */ +#else +#define AF_ATM 30 /* ATM */ +#endif +#define pseudo_AF_HDRCMPLT 35 /* Used by BPF to not rewrite headers + * in interface output routine + */ +#define AF_RESERVED_36 36 /* Reserved for internal usage */ + +#ifndef __APPLE__ +#define AF_NETGRAPH 32 /* Netgraph sockets */ +#endif +#define AF_IEEE80211 37 /* IEEE 802.11 protocol */ +#define AF_MAX 38 +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + +/* + * [XSI] Structure used by kernel to store most addresses. + */ +struct sockaddr { + __uint8_t sa_len; /* total length */ + sa_family_t sa_family; /* [XSI] address family */ + char sa_data[14]; /* [XSI] addr value (actually larger) */ +}; + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define SOCK_MAXADDRLEN 255 /* longest possible addresses */ + +/* + * Structure used by kernel to pass protocol + * information in raw sockets. + */ +struct sockproto { + __uint16_t sp_family; /* address family */ + __uint16_t sp_protocol; /* protocol */ +}; +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE)*/ + +/* + * RFC 2553: protocol-independent placeholder for socket addresses + */ +#define _SS_MAXSIZE 128 +#define _SS_ALIGNSIZE (sizeof(__int64_t)) +#define _SS_PAD1SIZE \ + (_SS_ALIGNSIZE - sizeof(__uint8_t) - sizeof(sa_family_t)) +#define _SS_PAD2SIZE \ + (_SS_MAXSIZE - sizeof(__uint8_t) - sizeof(sa_family_t) - \ + _SS_PAD1SIZE - _SS_ALIGNSIZE) + +/* + * [XSI] sockaddr_storage + */ +struct sockaddr_storage { + __uint8_t ss_len; /* address length */ + sa_family_t ss_family; /* [XSI] address family */ + char __ss_pad1[_SS_PAD1SIZE]; + __int64_t __ss_align; /* force structure storage alignment */ + char __ss_pad2[_SS_PAD2SIZE]; +}; + +/* + * Protocol families, same as address families for now. + */ +#define PF_UNSPEC AF_UNSPEC +#define PF_LOCAL AF_LOCAL +#define PF_UNIX PF_LOCAL /* backward compatibility */ +#define PF_INET AF_INET +#define PF_IMPLINK AF_IMPLINK +#define PF_PUP AF_PUP +#define PF_CHAOS AF_CHAOS +#define PF_NS AF_NS +#define PF_ISO AF_ISO +#define PF_OSI AF_ISO +#define PF_ECMA AF_ECMA +#define PF_DATAKIT AF_DATAKIT +#define PF_CCITT AF_CCITT +#define PF_SNA AF_SNA +#define PF_DECnet AF_DECnet +#define PF_DLI AF_DLI +#define PF_LAT AF_LAT +#define PF_HYLINK AF_HYLINK +#define PF_APPLETALK AF_APPLETALK +#define PF_ROUTE AF_ROUTE +#define PF_LINK AF_LINK +#define PF_XTP pseudo_AF_XTP /* really just proto family, no AF */ +#define PF_COIP AF_COIP +#define PF_CNT AF_CNT +#define PF_SIP AF_SIP +#define PF_IPX AF_IPX /* same format as AF_NS */ +#define PF_RTIP pseudo_AF_RTIP /* same format as AF_INET */ +#define PF_PIP pseudo_AF_PIP +#ifdef __APPLE__ +#define PF_NDRV AF_NDRV +#endif +#define PF_ISDN AF_ISDN +#define PF_KEY pseudo_AF_KEY +#define PF_INET6 AF_INET6 +#define PF_NATM AF_NATM +#ifdef __APPLE__ +#define PF_SYSTEM AF_SYSTEM +#define PF_NETBIOS AF_NETBIOS +#define PF_PPP AF_PPP +#define PF_RESERVED_36 AF_RESERVED_36 + +#else +#define PF_ATM AF_ATM +#define PF_NETGRAPH AF_NETGRAPH +#endif + +#define PF_MAX AF_MAX + +/* + * These do not have socket-layer support: + */ +#define PF_VLAN ((uint32_t)0x766c616e) /* 'vlan' */ +#define PF_BOND ((uint32_t)0x626f6e64) /* 'bond' */ + +/* + * Definitions for network related sysctl, CTL_NET. + * + * Second level is protocol family. + * Third level is protocol number. + * + * Further levels are defined by the individual families below. + */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define NET_MAXID AF_MAX +#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ + + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +/* + * PF_ROUTE - Routing table + * + * Three additional levels are defined: + * Fourth: address family, 0 is wildcard + * Fifth: type of info, defined below + * Sixth: flag(s) to mask with for NET_RT_FLAGS + */ +#define NET_RT_DUMP 1 /* dump; may limit to a.f. */ +#define NET_RT_FLAGS 2 /* by flags, e.g. RESOLVING */ +#define NET_RT_IFLIST 3 /* survey interface list */ +#define NET_RT_STAT 4 /* routing statistics */ +#define NET_RT_TRASH 5 /* routes not in table but not freed */ +#define NET_RT_IFLIST2 6 /* interface list with addresses */ +#define NET_RT_DUMP2 7 /* dump; may limit to a.f. */ +#define NET_RT_MAXID 8 +#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ + + +/* + * Maximum queue length specifiable by listen. + */ +#define SOMAXCONN 128 + +/* + * [XSI] Message header for recvmsg and sendmsg calls. + * Used value-result for recvmsg, value only for sendmsg. + */ +struct msghdr { + void *msg_name; /* [XSI] optional address */ + socklen_t msg_namelen; /* [XSI] size of address */ + struct iovec *msg_iov; /* [XSI] scatter/gather array */ + int msg_iovlen; /* [XSI] # elements in msg_iov */ + void *msg_control; /* [XSI] ancillary data, see below */ + socklen_t msg_controllen; /* [XSI] ancillary data buffer len */ + int msg_flags; /* [XSI] flags on received message */ +}; + + +#define MSG_OOB 0x1 /* process out-of-band data */ +#define MSG_PEEK 0x2 /* peek at incoming message */ +#define MSG_DONTROUTE 0x4 /* send without using routing tables */ +#define MSG_EOR 0x8 /* data completes record */ +#define MSG_TRUNC 0x10 /* data discarded before delivery */ +#define MSG_CTRUNC 0x20 /* control data lost before delivery */ +#define MSG_WAITALL 0x40 /* wait for full request or error */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define MSG_DONTWAIT 0x80 /* this message should be nonblocking */ +#define MSG_EOF 0x100 /* data completes connection */ +#ifdef __APPLE__ +#define MSG_WAITSTREAM 0x200 /* wait up to full request.. may return partial */ +#define MSG_FLUSH 0x400 /* Start of 'hold' seq; dump so_temp */ +#define MSG_HOLD 0x800 /* Hold frag in so_temp */ +#define MSG_SEND 0x1000 /* Send the packet in so_temp */ +#define MSG_HAVEMORE 0x2000 /* Data ready to be read */ +#define MSG_RCVMORE 0x4000 /* Data remains in current pkt */ +#endif +#define MSG_NEEDSA 0x10000 /* Fail receive if socket address cannot be allocated */ +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + +/* + * Header for ancillary data objects in msg_control buffer. + * Used for additional information with/about a datagram + * not expressible by flags. The format is a sequence + * of message elements headed by cmsghdr structures. + */ +struct cmsghdr { + socklen_t cmsg_len; /* [XSI] data byte count, including hdr */ + int cmsg_level; /* [XSI] originating protocol */ + int cmsg_type; /* [XSI] protocol-specific type */ +/* followed by unsigned char cmsg_data[]; */ +}; + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#ifndef __APPLE__ +/* + * While we may have more groups than this, the cmsgcred struct must + * be able to fit in an mbuf, and NGROUPS_MAX is too large to allow + * this. +*/ +#define CMGROUP_MAX 16 + +/* + * Credentials structure, used to verify the identity of a peer + * process that has sent us a message. This is allocated by the + * peer process but filled in by the kernel. This prevents the + * peer from lying about its identity. (Note that cmcred_groups[0] + * is the effective GID.) + */ +struct cmsgcred { + pid_t cmcred_pid; /* PID of sending process */ + uid_t cmcred_uid; /* real UID of sending process */ + uid_t cmcred_euid; /* effective UID of sending process */ + gid_t cmcred_gid; /* real GID of sending process */ + short cmcred_ngroups; /* number or groups */ + gid_t cmcred_groups[CMGROUP_MAX]; /* groups */ +}; +#endif +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + +/* given pointer to struct cmsghdr, return pointer to data */ +#define CMSG_DATA(cmsg) ((unsigned char *)(cmsg) + \ + __DARWIN_ALIGN32(sizeof(struct cmsghdr))) + +/* + * RFC 2292 requires to check msg_controllen, in case that the kernel returns + * an empty list for some reasons. + */ +#define CMSG_FIRSTHDR(mhdr) \ + ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ + (struct cmsghdr *)(mhdr)->msg_control : \ + (struct cmsghdr *)0L) + + +/* + * Given pointer to struct cmsghdr, return pointer to next cmsghdr + * RFC 2292 says that CMSG_NXTHDR(mhdr, NULL) is equivalent to CMSG_FIRSTHDR(mhdr) + */ +#define CMSG_NXTHDR(mhdr, cmsg) \ + ((char *)(cmsg) == (char *)0L ? CMSG_FIRSTHDR(mhdr) : \ + ((((unsigned char *)(cmsg) + \ + __DARWIN_ALIGN32((__uint32_t)(cmsg)->cmsg_len) + \ + __DARWIN_ALIGN32(sizeof(struct cmsghdr))) > \ + ((unsigned char *)(mhdr)->msg_control + \ + (mhdr)->msg_controllen)) ? \ + (struct cmsghdr *)0L /* NULL */ : \ + (struct cmsghdr *)((unsigned char *)(cmsg) + \ + __DARWIN_ALIGN32((__uint32_t)(cmsg)->cmsg_len)))) + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +/* RFC 2292 additions */ +#define CMSG_SPACE(l) (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + __DARWIN_ALIGN32(l)) +#define CMSG_LEN(l) (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + (l)) + +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + +/* "Socket"-level control message types: */ +#define SCM_RIGHTS 0x01 /* access rights (array of int) */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define SCM_TIMESTAMP 0x02 /* timestamp (struct timeval) */ +#define SCM_CREDS 0x03 /* process creds (struct cmsgcred) */ + +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + +/* + * howto arguments for shutdown(2), specified by Posix.1g. + */ +#define SHUT_RD 0 /* shut down the reading side */ +#define SHUT_WR 1 /* shut down the writing side */ +#define SHUT_RDWR 2 /* shut down both sides */ + +#if !defined(_POSIX_C_SOURCE) +/* + * sendfile(2) header/trailer struct + */ +struct sf_hdtr { + struct iovec *headers; /* pointer to an array of header struct iovec's */ + int hdr_cnt; /* number of header iovec's */ + struct iovec *trailers; /* pointer to an array of trailer struct iovec's */ + int trl_cnt; /* number of trailer iovec's */ +}; + + +#endif /* !_POSIX_C_SOURCE */ + +__BEGIN_DECLS +int accept(int, struct sockaddr * __restrict, socklen_t * __restrict) + __DARWIN_ALIAS_C(accept); +int bind(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS(bind); +int connect(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS_C( connect); +int getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict) + __DARWIN_ALIAS(getpeername); +int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict) + __DARWIN_ALIAS(getsockname); +int getsockopt(int, int, int, void * __restrict, socklen_t * __restrict); +int listen(int, int) __DARWIN_ALIAS(listen); +ssize_t recv(int, void *, size_t, int) __DARWIN_ALIAS_C(recv); +ssize_t recvfrom(int, void *, size_t, int, struct sockaddr * __restrict, + socklen_t * __restrict) __DARWIN_ALIAS_C(recvfrom); +ssize_t recvmsg(int, struct msghdr *, int) __DARWIN_ALIAS_C(recvmsg); +ssize_t send(int, const void *, size_t, int) __DARWIN_ALIAS_C(send); +ssize_t sendmsg(int, const struct msghdr *, int) __DARWIN_ALIAS_C(sendmsg); +ssize_t sendto(int, const void *, size_t, + int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS_C(sendto); +int setsockopt(int, int, int, const void *, socklen_t); +int shutdown(int, int); +int sockatmark(int); +int socket(int, int, int); +int socketpair(int, int, int, int *) __DARWIN_ALIAS(socketpair); + +#if !defined(_POSIX_C_SOURCE) +int sendfile(int, int, off_t, off_t *, struct sf_hdtr *, int); +#endif /* !_POSIX_C_SOURCE */ + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +void pfctlinput(int, struct sockaddr *); +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ +__END_DECLS + + + +#endif /* !_SYS_SOCKET_H_ */ diff --git a/i386/include/sys/syscall.h b/i386/include/sys/syscall.h new file mode 100644 index 0000000..1f5aeb7 --- /dev/null +++ b/i386/include/sys/syscall.h @@ -0,0 +1,477 @@ +/* + * Copyright (c) 2004-2008 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + * + * + * System call switch table. + * + * DO NOT EDIT-- this file is automatically generated. + * created from /SourceCache/xnu/xnu-1504.7.4/bsd/kern/syscalls.master + */ + +#ifndef _SYS_SYSCALL_H_ +#define _SYS_SYSCALL_H_ + +#include <sys/appleapiopts.h> +#ifdef __APPLE_API_PRIVATE +#define SYS_syscall 0 +#define SYS_exit 1 +#define SYS_fork 2 +#define SYS_read 3 +#define SYS_write 4 +#define SYS_open 5 +#define SYS_close 6 +#define SYS_wait4 7 + /* 8 old creat */ +#define SYS_link 9 +#define SYS_unlink 10 + /* 11 old execv */ +#define SYS_chdir 12 +#define SYS_fchdir 13 +#define SYS_mknod 14 +#define SYS_chmod 15 +#define SYS_chown 16 + /* 17 old break */ +#define SYS_getfsstat 18 + /* 19 old lseek */ +#define SYS_getpid 20 + /* 21 old mount */ + /* 22 old umount */ +#define SYS_setuid 23 +#define SYS_getuid 24 +#define SYS_geteuid 25 +#define SYS_ptrace 26 +#define SYS_recvmsg 27 +#define SYS_sendmsg 28 +#define SYS_recvfrom 29 +#define SYS_accept 30 +#define SYS_getpeername 31 +#define SYS_getsockname 32 +#define SYS_access 33 +#define SYS_chflags 34 +#define SYS_fchflags 35 +#define SYS_sync 36 +#define SYS_kill 37 + /* 38 old stat */ +#define SYS_getppid 39 + /* 40 old lstat */ +#define SYS_dup 41 +#define SYS_pipe 42 +#define SYS_getegid 43 +#define SYS_profil 44 + /* 45 old ktrace */ +#define SYS_sigaction 46 +#define SYS_getgid 47 +#define SYS_sigprocmask 48 +#define SYS_getlogin 49 +#define SYS_setlogin 50 +#define SYS_acct 51 +#define SYS_sigpending 52 +#define SYS_sigaltstack 53 +#define SYS_ioctl 54 +#define SYS_reboot 55 +#define SYS_revoke 56 +#define SYS_symlink 57 +#define SYS_readlink 58 +#define SYS_execve 59 +#define SYS_umask 60 +#define SYS_chroot 61 + /* 62 old fstat */ + /* 63 used internally , reserved */ + /* 64 old getpagesize */ +#define SYS_msync 65 +#define SYS_vfork 66 + /* 67 old vread */ + /* 68 old vwrite */ + /* 69 old sbrk */ + /* 70 old sstk */ + /* 71 old mmap */ + /* 72 old vadvise */ +#define SYS_munmap 73 +#define SYS_mprotect 74 +#define SYS_madvise 75 + /* 76 old vhangup */ + /* 77 old vlimit */ +#define SYS_mincore 78 +#define SYS_getgroups 79 +#define SYS_setgroups 80 +#define SYS_getpgrp 81 +#define SYS_setpgid 82 +#define SYS_setitimer 83 + /* 84 old wait */ +#define SYS_swapon 85 +#define SYS_getitimer 86 + /* 87 old gethostname */ + /* 88 old sethostname */ +#define SYS_getdtablesize 89 +#define SYS_dup2 90 + /* 91 old getdopt */ +#define SYS_fcntl 92 +#define SYS_select 93 + /* 94 old setdopt */ +#define SYS_fsync 95 +#define SYS_setpriority 96 +#define SYS_socket 97 +#define SYS_connect 98 + /* 99 old accept */ +#define SYS_getpriority 100 + /* 101 old send */ + /* 102 old recv */ + /* 103 old sigreturn */ +#define SYS_bind 104 +#define SYS_setsockopt 105 +#define SYS_listen 106 + /* 107 old vtimes */ + /* 108 old sigvec */ + /* 109 old sigblock */ + /* 110 old sigsetmask */ +#define SYS_sigsuspend 111 + /* 112 old sigstack */ + /* 113 old recvmsg */ + /* 114 old sendmsg */ + /* 115 old vtrace */ +#define SYS_gettimeofday 116 +#define SYS_getrusage 117 +#define SYS_getsockopt 118 + /* 119 old resuba */ +#define SYS_readv 120 +#define SYS_writev 121 +#define SYS_settimeofday 122 +#define SYS_fchown 123 +#define SYS_fchmod 124 + /* 125 old recvfrom */ +#define SYS_setreuid 126 +#define SYS_setregid 127 +#define SYS_rename 128 + /* 129 old truncate */ + /* 130 old ftruncate */ +#define SYS_flock 131 +#define SYS_mkfifo 132 +#define SYS_sendto 133 +#define SYS_shutdown 134 +#define SYS_socketpair 135 +#define SYS_mkdir 136 +#define SYS_rmdir 137 +#define SYS_utimes 138 +#define SYS_futimes 139 +#define SYS_adjtime 140 + /* 141 old getpeername */ +#define SYS_gethostuuid 142 + /* 143 old sethostid */ + /* 144 old getrlimit */ + /* 145 old setrlimit */ + /* 146 old killpg */ +#define SYS_setsid 147 + /* 148 old setquota */ + /* 149 old qquota */ + /* 150 old getsockname */ +#define SYS_getpgid 151 +#define SYS_setprivexec 152 +#define SYS_pread 153 +#define SYS_pwrite 154 +#define SYS_nfssvc 155 + /* 156 old getdirentries */ +#define SYS_statfs 157 +#define SYS_fstatfs 158 +#define SYS_unmount 159 + /* 160 old async_daemon */ +#define SYS_getfh 161 + /* 162 old getdomainname */ + /* 163 old setdomainname */ + /* 164 */ +#define SYS_quotactl 165 + /* 166 old exportfs */ +#define SYS_mount 167 + /* 168 old ustat */ +#define SYS_csops 169 + /* 170 old table */ + /* 171 old wait3 */ + /* 172 old rpause */ +#define SYS_waitid 173 + /* 174 old getdents */ + /* 175 old gc_control */ +#define SYS_add_profil 176 + /* 177 */ + /* 178 */ + /* 179 */ +#define SYS_kdebug_trace 180 +#define SYS_setgid 181 +#define SYS_setegid 182 +#define SYS_seteuid 183 +#define SYS_sigreturn 184 +#define SYS_chud 185 + /* 186 */ +#define SYS_fdatasync 187 +#define SYS_stat 188 +#define SYS_fstat 189 +#define SYS_lstat 190 +#define SYS_pathconf 191 +#define SYS_fpathconf 192 + /* 193 */ +#define SYS_getrlimit 194 +#define SYS_setrlimit 195 +#define SYS_getdirentries 196 +#define SYS_mmap 197 + /* 198 __syscall */ +#define SYS_lseek 199 +#define SYS_truncate 200 +#define SYS_ftruncate 201 +#define SYS___sysctl 202 +#define SYS_mlock 203 +#define SYS_munlock 204 +#define SYS_undelete 205 +#define SYS_ATsocket 206 +#define SYS_ATgetmsg 207 +#define SYS_ATputmsg 208 +#define SYS_ATPsndreq 209 +#define SYS_ATPsndrsp 210 +#define SYS_ATPgetreq 211 +#define SYS_ATPgetrsp 212 + /* 213 Reserved for AppleTalk */ + /* 214 */ + /* 215 */ +#define SYS_mkcomplex 216 +#define SYS_statv 217 +#define SYS_lstatv 218 +#define SYS_fstatv 219 +#define SYS_getattrlist 220 +#define SYS_setattrlist 221 +#define SYS_getdirentriesattr 222 +#define SYS_exchangedata 223 + /* 224 old checkuseraccess / fsgetpath ( which moved to 427 ) */ +#define SYS_searchfs 225 +#define SYS_delete 226 +#define SYS_copyfile 227 +#define SYS_fgetattrlist 228 +#define SYS_fsetattrlist 229 +#define SYS_poll 230 +#define SYS_watchevent 231 +#define SYS_waitevent 232 +#define SYS_modwatch 233 +#define SYS_getxattr 234 +#define SYS_fgetxattr 235 +#define SYS_setxattr 236 +#define SYS_fsetxattr 237 +#define SYS_removexattr 238 +#define SYS_fremovexattr 239 +#define SYS_listxattr 240 +#define SYS_flistxattr 241 +#define SYS_fsctl 242 +#define SYS_initgroups 243 +#define SYS_posix_spawn 244 +#define SYS_ffsctl 245 + /* 246 */ +#define SYS_nfsclnt 247 +#define SYS_fhopen 248 + /* 249 */ +#define SYS_minherit 250 +#define SYS_semsys 251 +#define SYS_msgsys 252 +#define SYS_shmsys 253 +#define SYS_semctl 254 +#define SYS_semget 255 +#define SYS_semop 256 + /* 257 */ +#define SYS_msgctl 258 +#define SYS_msgget 259 +#define SYS_msgsnd 260 +#define SYS_msgrcv 261 +#define SYS_shmat 262 +#define SYS_shmctl 263 +#define SYS_shmdt 264 +#define SYS_shmget 265 +#define SYS_shm_open 266 +#define SYS_shm_unlink 267 +#define SYS_sem_open 268 +#define SYS_sem_close 269 +#define SYS_sem_unlink 270 +#define SYS_sem_wait 271 +#define SYS_sem_trywait 272 +#define SYS_sem_post 273 +#define SYS_sem_getvalue 274 +#define SYS_sem_init 275 +#define SYS_sem_destroy 276 +#define SYS_open_extended 277 +#define SYS_umask_extended 278 +#define SYS_stat_extended 279 +#define SYS_lstat_extended 280 +#define SYS_fstat_extended 281 +#define SYS_chmod_extended 282 +#define SYS_fchmod_extended 283 +#define SYS_access_extended 284 +#define SYS_settid 285 +#define SYS_gettid 286 +#define SYS_setsgroups 287 +#define SYS_getsgroups 288 +#define SYS_setwgroups 289 +#define SYS_getwgroups 290 +#define SYS_mkfifo_extended 291 +#define SYS_mkdir_extended 292 +#define SYS_identitysvc 293 +#define SYS_shared_region_check_np 294 +#define SYS_shared_region_map_np 295 +#define SYS_vm_pressure_monitor 296 +#define SYS_psynch_rw_longrdlock 297 +#define SYS_psynch_rw_yieldwrlock 298 +#define SYS_psynch_rw_downgrade 299 +#define SYS_psynch_rw_upgrade 300 +#define SYS_psynch_mutexwait 301 +#define SYS_psynch_mutexdrop 302 +#define SYS_psynch_cvbroad 303 +#define SYS_psynch_cvsignal 304 +#define SYS_psynch_cvwait 305 +#define SYS_psynch_rw_rdlock 306 +#define SYS_psynch_rw_wrlock 307 +#define SYS_psynch_rw_unlock 308 +#define SYS_psynch_rw_unlock2 309 +#define SYS_getsid 310 +#define SYS_settid_with_pid 311 + /* 312 old __pthread_cond_timedwait */ +#define SYS_aio_fsync 313 +#define SYS_aio_return 314 +#define SYS_aio_suspend 315 +#define SYS_aio_cancel 316 +#define SYS_aio_error 317 +#define SYS_aio_read 318 +#define SYS_aio_write 319 +#define SYS_lio_listio 320 + /* 321 old __pthread_cond_wait */ +#define SYS_iopolicysys 322 + /* 323 */ +#define SYS_mlockall 324 +#define SYS_munlockall 325 + /* 326 */ +#define SYS_issetugid 327 +#define SYS___pthread_kill 328 +#define SYS___pthread_sigmask 329 +#define SYS___sigwait 330 +#define SYS___disable_threadsignal 331 +#define SYS___pthread_markcancel 332 +#define SYS___pthread_canceled 333 +#define SYS___semwait_signal 334 + /* 335 old utrace */ +#define SYS_proc_info 336 +#define SYS_sendfile 337 +#define SYS_stat64 338 +#define SYS_fstat64 339 +#define SYS_lstat64 340 +#define SYS_stat64_extended 341 +#define SYS_lstat64_extended 342 +#define SYS_fstat64_extended 343 +#define SYS_getdirentries64 344 +#define SYS_statfs64 345 +#define SYS_fstatfs64 346 +#define SYS_getfsstat64 347 +#define SYS___pthread_chdir 348 +#define SYS___pthread_fchdir 349 +#define SYS_audit 350 +#define SYS_auditon 351 + /* 352 */ +#define SYS_getauid 353 +#define SYS_setauid 354 +#define SYS_getaudit 355 +#define SYS_setaudit 356 +#define SYS_getaudit_addr 357 +#define SYS_setaudit_addr 358 +#define SYS_auditctl 359 +#define SYS_bsdthread_create 360 +#define SYS_bsdthread_terminate 361 +#define SYS_kqueue 362 +#define SYS_kevent 363 +#define SYS_lchown 364 +#define SYS_stack_snapshot 365 +#define SYS_bsdthread_register 366 +#define SYS_workq_open 367 +#define SYS_workq_kernreturn 368 +#define SYS_kevent64 369 +#define SYS___old_semwait_signal 370 +#define SYS___old_semwait_signal_nocancel 371 +#define SYS_thread_selfid 372 + /* 373 */ + /* 374 */ + /* 375 */ + /* 376 */ + /* 377 */ + /* 378 */ + /* 379 */ +#define SYS___mac_execve 380 +#define SYS___mac_syscall 381 +#define SYS___mac_get_file 382 +#define SYS___mac_set_file 383 +#define SYS___mac_get_link 384 +#define SYS___mac_set_link 385 +#define SYS___mac_get_proc 386 +#define SYS___mac_set_proc 387 +#define SYS___mac_get_fd 388 +#define SYS___mac_set_fd 389 +#define SYS___mac_get_pid 390 +#define SYS___mac_get_lcid 391 +#define SYS___mac_get_lctx 392 +#define SYS___mac_set_lctx 393 +#define SYS_setlcid 394 +#define SYS_getlcid 395 +#define SYS_read_nocancel 396 +#define SYS_write_nocancel 397 +#define SYS_open_nocancel 398 +#define SYS_close_nocancel 399 +#define SYS_wait4_nocancel 400 +#define SYS_recvmsg_nocancel 401 +#define SYS_sendmsg_nocancel 402 +#define SYS_recvfrom_nocancel 403 +#define SYS_accept_nocancel 404 +#define SYS_msync_nocancel 405 +#define SYS_fcntl_nocancel 406 +#define SYS_select_nocancel 407 +#define SYS_fsync_nocancel 408 +#define SYS_connect_nocancel 409 +#define SYS_sigsuspend_nocancel 410 +#define SYS_readv_nocancel 411 +#define SYS_writev_nocancel 412 +#define SYS_sendto_nocancel 413 +#define SYS_pread_nocancel 414 +#define SYS_pwrite_nocancel 415 +#define SYS_waitid_nocancel 416 +#define SYS_poll_nocancel 417 +#define SYS_msgsnd_nocancel 418 +#define SYS_msgrcv_nocancel 419 +#define SYS_sem_wait_nocancel 420 +#define SYS_aio_suspend_nocancel 421 +#define SYS___sigwait_nocancel 422 +#define SYS___semwait_signal_nocancel 423 +#define SYS___mac_mount 424 +#define SYS___mac_get_mount 425 +#define SYS___mac_getfsstat 426 +#define SYS_fsgetpath 427 +#define SYS_audit_session_self 428 +#define SYS_audit_session_join 429 +#define SYS_pid_suspend 430 +#define SYS_pid_resume 431 +#define SYS_fileport_makeport 432 +#define SYS_fileport_makefd 433 +#define SYS_MAXSYSCALL 434 + +#endif /* __APPLE_API_PRIVATE */ +#endif /* !_SYS_SYSCALL_H_ */ diff --git a/i386/include/sys/syslimits.h b/i386/include/sys/syslimits.h new file mode 100644 index 0000000..a020b39 --- /dev/null +++ b/i386/include/sys/syslimits.h @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* $NetBSD: syslimits.h,v 1.15 1997/06/25 00:48:09 lukem Exp $ */ + +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)syslimits.h 8.1 (Berkeley) 6/2/93 + */ + +#ifndef _SYS_SYSLIMITS_H_ +#define _SYS_SYSLIMITS_H_ + +#include <sys/cdefs.h> + +#if !defined(_ANSI_SOURCE) +/* + * Note: CHILD_MAX *must* be less than hard_maxproc, which is set at + * compile time; you *cannot* set it higher than the hard limit!! + */ +#define ARG_MAX (256 * 1024) /* max bytes for an exec function */ +#define CHILD_MAX 266 /* max simultaneous processes */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define GID_MAX 2147483647U /* max value for a gid_t (2^31-2) */ +#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ +#define LINK_MAX 32767 /* max file link count */ +#define MAX_CANON 1024 /* max bytes in term canon input line */ +#define MAX_INPUT 1024 /* max bytes in terminal input */ +#define NAME_MAX 255 /* max bytes in a file name */ +#define NGROUPS_MAX 16 /* max supplemental group id's */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define UID_MAX 2147483647U /* max value for a uid_t (2^31-2) */ + +#define OPEN_MAX 10240 /* max open files per process - todo, make a config option? */ + +#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ +#define PATH_MAX 1024 /* max bytes in pathname */ +#define PIPE_BUF 512 /* max bytes for atomic pipe writes */ + +#define BC_BASE_MAX 99 /* max ibase/obase values in bc(1) */ +#define BC_DIM_MAX 2048 /* max array elements in bc(1) */ +#define BC_SCALE_MAX 99 /* max scale value in bc(1) */ +#define BC_STRING_MAX 1000 /* max const string length in bc(1) */ +#define CHARCLASS_NAME_MAX 14 /* max character class name size */ +#define COLL_WEIGHTS_MAX 2 /* max weights for order keyword */ +#define EQUIV_CLASS_MAX 2 +#define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */ +#define LINE_MAX 2048 /* max bytes in an input line */ +#define RE_DUP_MAX 255 /* max RE's in interval notation */ + +#if __DARWIN_UNIX03 +#define NZERO 20 /* default priority [XSI] */ + /* = ((PRIO_MAX - PRIO_MIN) / 2) + 1 */ + /* range: 0 - 39 [(2 * NZERO) - 1] */ + /* 0 is not actually used */ +#else /* !__DARWIN_UNIX03 */ +#define NZERO 0 /* default priority */ + /* range: -20 - 20 */ + /* (PRIO_MIN - PRIO_MAX) */ +#endif /* __DARWIN_UNIX03 */ +#endif /* !_ANSI_SOURCE */ + +#endif /* !_SYS_SYSLIMITS_H_ */ diff --git a/i386/include/sys/time.h b/i386/include/sys/time.h new file mode 100644 index 0000000..4b2d999 --- /dev/null +++ b/i386/include/sys/time.h @@ -0,0 +1,221 @@ +/* + * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ +/* + * Copyright (c) 1982, 1986, 1993 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)time.h 8.2 (Berkeley) 7/10/94 + */ + +#ifndef _SYS_TIME_H_ +#define _SYS_TIME_H_ + +#include <sys/cdefs.h> +#include <sys/_types.h> + +/* + * [XSI] The fd_set type shall be defined as described in <sys/select.h>. + * The timespec structure shall be defined as described in <time.h> + */ +#define __need_fd_set +#define __need_struct_timespec +#define __need_struct_timeval +#include <sys/_structs.h> + +#ifndef _TIME_T +#define _TIME_T +typedef __darwin_time_t time_t; +#endif + +#ifndef _SUSECONDS_T +#define _SUSECONDS_T +typedef __darwin_suseconds_t suseconds_t; +#endif + +/* + * Structure used as a parameter by getitimer(2) and setitimer(2) system + * calls. + */ +struct itimerval { + struct timeval it_interval; /* timer interval */ + struct timeval it_value; /* current value */ +}; + +/* + * Names of the interval timers, and structure + * defining a timer setting. + */ +#define ITIMER_REAL 0 +#define ITIMER_VIRTUAL 1 +#define ITIMER_PROF 2 + +/* + * Select uses bit masks of file descriptors in longs. These macros + * manipulate such bit fields (the filesystem macros use chars). The + * extra protection here is to permit application redefinition above + * the default size. + */ +#ifndef FD_SETSIZE +#define FD_SETSIZE __DARWIN_FD_SETSIZE +#endif /* FD_SETSIZE */ +#ifndef FD_SET +#define FD_SET(n, p) __DARWIN_FD_SET(n, p) +#endif /* FD_SET */ +#ifndef FD_CLR +#define FD_CLR(n,p) __DARWIN_FD_CLR(n, p) +#endif /* FD_CLR */ +#ifndef FD_ISSET +#define FD_ISSET(n, p) __DARWIN_FD_ISSET(n, p) +#endif /* FD_ISSET */ +#ifndef FD_ZERO +#define FD_ZERO(p) __DARWIN_FD_ZERO(p) +#endif /* FD_ZERO */ + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) + +#ifndef FD_COPY +#define FD_COPY(f, t) __DARWIN_FD_COPY(f, t) +#endif /* FD_COPY */ + +#define TIMEVAL_TO_TIMESPEC(tv, ts) { \ + (ts)->tv_sec = (tv)->tv_sec; \ + (ts)->tv_nsec = (tv)->tv_usec * 1000; \ +} +#define TIMESPEC_TO_TIMEVAL(tv, ts) { \ + (tv)->tv_sec = (ts)->tv_sec; \ + (tv)->tv_usec = (ts)->tv_nsec / 1000; \ +} + +struct timezone { + int tz_minuteswest; /* minutes west of Greenwich */ + int tz_dsttime; /* type of dst correction */ +}; +#define DST_NONE 0 /* not on dst */ +#define DST_USA 1 /* USA style dst */ +#define DST_AUST 2 /* Australian style dst */ +#define DST_WET 3 /* Western European dst */ +#define DST_MET 4 /* Middle European dst */ +#define DST_EET 5 /* Eastern European dst */ +#define DST_CAN 6 /* Canada */ + +/* Operations on timevals. */ +#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 +#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) +#define timercmp(tvp, uvp, cmp) \ + (((tvp)->tv_sec == (uvp)->tv_sec) ? \ + ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ + ((tvp)->tv_sec cmp (uvp)->tv_sec)) +#define timeradd(tvp, uvp, vvp) \ + do { \ + (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ + (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ + if ((vvp)->tv_usec >= 1000000) { \ + (vvp)->tv_sec++; \ + (vvp)->tv_usec -= 1000000; \ + } \ + } while (0) +#define timersub(tvp, uvp, vvp) \ + do { \ + (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ + (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ + if ((vvp)->tv_usec < 0) { \ + (vvp)->tv_sec--; \ + (vvp)->tv_usec += 1000000; \ + } \ + } while (0) + +#define timevalcmp(l, r, cmp) timercmp(l, r, cmp) /* freebsd */ + +/* + * Getkerninfo clock information structure + */ +struct clockinfo { + int hz; /* clock frequency */ + int tick; /* micro-seconds per hz tick */ + int tickadj; /* clock skew rate for adjtime() */ + int stathz; /* statistics clock frequency */ + int profhz; /* profiling clock frequency */ +}; +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#include <time.h> +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + +__BEGIN_DECLS + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +int adjtime(const struct timeval *, struct timeval *); +int futimes(int, const struct timeval *); +int lutimes(const char *, const struct timeval *); +int settimeofday(const struct timeval *, const struct timezone *); +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + +int getitimer(int, struct itimerval *); +int gettimeofday(struct timeval * __restrict, void * __restrict); + +#include <sys/_select.h> /* select() prototype */ + +int setitimer(int, const struct itimerval * __restrict, + struct itimerval * __restrict); +int utimes(const char *, const struct timeval *); + +__END_DECLS + + +#endif /* !_SYS_TIME_H_ */ diff --git a/i386/include/sys/types.h b/i386/include/sys/types.h new file mode 100644 index 0000000..01d4f2b --- /dev/null +++ b/i386/include/sys/types.h @@ -0,0 +1,239 @@ +/* + * Copyright (c) 2000-2008 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ +/* + * Copyright (c) 1982, 1986, 1991, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * (c) UNIX System Laboratories, Inc. + * All or some portions of this file are derived from material licensed + * to the University of California by American Telephone and Telegraph + * Co. or Unix System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)types.h 8.4 (Berkeley) 1/21/94 + */ + +#ifndef _SYS_TYPES_H_ +#define _SYS_TYPES_H_ + +#ifndef __ASSEMBLER__ +#include <sys/cdefs.h> + +/* Machine type dependent parameters. */ +#include <machine/types.h> +#include <sys/_types.h> +#include <machine/endian.h> + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +typedef unsigned char u_char; +typedef unsigned short u_short; +typedef unsigned int u_int; +#ifndef _U_LONG +typedef unsigned long u_long; +#define _U_LONG +#endif +typedef unsigned short ushort; /* Sys V compatibility */ +typedef unsigned int uint; /* Sys V compatibility */ +#endif + +typedef u_int64_t u_quad_t; /* quads */ +typedef int64_t quad_t; +typedef quad_t * qaddr_t; + +typedef char * caddr_t; /* core address */ +typedef int32_t daddr_t; /* disk address */ + +typedef u_int32_t fixpt_t; /* fixed point number */ + + +#ifndef _IN_ADDR_T +#define _IN_ADDR_T +typedef __uint32_t in_addr_t; /* base type for internet address */ +#endif + +#ifndef _IN_PORT_T +#define _IN_PORT_T +typedef __uint16_t in_port_t; +#endif + + +#ifndef _KEY_T +#define _KEY_T +typedef __int32_t key_t; /* IPC key (for Sys V IPC) */ +#endif + +#ifndef _NLINK_T +typedef __uint16_t nlink_t; /* link count */ +#define _NLINK_T +#endif + +typedef int32_t segsz_t; /* segment size */ +typedef int32_t swblk_t; /* swap offset */ + + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +/* Major, minor numbers, dev_t's. */ +#if defined(__cplusplus) +/* + * These lowercase macros tend to match member functions in some C++ code, + * so for C++, we must use inline functions instead. + */ + +static inline __int32_t major(__uint32_t _x) +{ + return (__int32_t)(((__uint32_t)_x >> 24) & 0xff); +} + +static inline __int32_t minor(__uint32_t _x) +{ + return (__int32_t)((_x) & 0xffffff); +} +#else /* !__cplusplus */ + +#define major(x) ((int32_t)(((u_int32_t)(x) >> 24) & 0xff)) +#define minor(x) ((int32_t)((x) & 0xffffff)) + +#endif /* !__cplusplus */ +#endif /* !_POSIX_C_SOURCE */ + +#ifndef _CLOCK_T +#define _CLOCK_T +typedef __darwin_clock_t clock_t; +#endif + +#ifndef _SIZE_T +#define _SIZE_T +/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see + * _GCC_SIZE_T */ +typedef __darwin_size_t size_t; +#endif + +#ifndef _SSIZE_T +#define _SSIZE_T +typedef __darwin_ssize_t ssize_t; +#endif + +#ifndef _TIME_T +#define _TIME_T +typedef __darwin_time_t time_t; +#endif + + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +/* + * This code is present here in order to maintain historical backward + * compatability, and is intended to be removed at some point in the + * future; please include <sys/select.h> instead. + */ +#define __need_fd_set +#include <sys/_structs.h> + +#define NBBY __DARWIN_NBBY /* bits in a byte */ +#define NFDBITS __DARWIN_NFDBITS /* bits per mask */ +#define howmany(x, y) __DARWIN_howmany(x, y) /* # y's == x bits? */ +typedef __int32_t fd_mask; + +/* + * Select uses bit masks of file descriptors in longs. These macros + * manipulate such bit fields (the filesystem macros use chars). The + * extra protection here is to permit application redefinition above + * the default size. + */ +#ifndef FD_SETSIZE +#define FD_SETSIZE __DARWIN_FD_SETSIZE +#endif /* FD_SETSIZE */ +#ifndef FD_SET +#define FD_SET(n, p) __DARWIN_FD_SET(n, p) +#endif /* FD_SET */ +#ifndef FD_CLR +#define FD_CLR(n, p) __DARWIN_FD_CLR(n, p) +#endif /* FD_CLR */ +#ifndef FD_ISSET +#define FD_ISSET(n, p) __DARWIN_FD_ISSET(n, p) +#endif /* FD_ISSET */ +#ifndef FD_ZERO +#define FD_ZERO(p) __DARWIN_FD_ZERO(p) +#endif /* FD_ZERO */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#ifndef FD_COPY +#define FD_COPY(f, t) __DARWIN_FD_COPY(f, t) +#endif /* FD_COPY */ +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ + + +#if defined(__STDC__) && defined(KERNEL) +/* + * Forward structure declarations for function prototypes. We include the + * common structures that cross subsystem boundaries here; others are mostly + * used in the same place that the structure is defined. + */ +struct proc; +struct pgrp; +struct ucred; +struct rusage; +struct file; +struct buf; +struct tty; +struct uio; +#endif + +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ +#endif /* __ASSEMBLER__ */ + + + + +#endif /* !_SYS_TYPES_H_ */ diff --git a/i386/include/sys/unistd.h b/i386/include/sys/unistd.h new file mode 100644 index 0000000..d80b3bb --- /dev/null +++ b/i386/include/sys/unistd.h @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)unistd.h 8.2 (Berkeley) 1/7/94 + */ + +#ifndef _SYS_UNISTD_H_ +#define _SYS_UNISTD_H_ + +#include <sys/cdefs.h> + +/* + * Although we have saved user/group IDs, we do not use them in setuid + * as described in POSIX 1003.1, because the feature does not work for + * root. We use the saved IDs in seteuid/setegid, which are not currently + * part of the POSIX 1003.1 specification. + */ +#ifdef _NOT_AVAILABLE +#define _POSIX_SAVED_IDS /* saved set-user-ID and set-group-ID */ +#endif + +#define _POSIX_VERSION 200112L +#define _POSIX2_VERSION 200112L + +/* execution-time symbolic constants */ + /* may disable terminal special characters */ +#ifndef _POSIX_VDISABLE +#define _POSIX_VDISABLE ((unsigned char)'\377') +#endif + +#define _POSIX_THREAD_KEYS_MAX 128 + +/* access function */ +#define F_OK 0 /* test for existence of file */ +#define X_OK (1<<0) /* test for execute or search permission */ +#define W_OK (1<<1) /* test for write permission */ +#define R_OK (1<<2) /* test for read permission */ + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +/* + * Extended access functions. + * Note that we depend on these matching the definitions in sys/kauth.h, + * but with the bits shifted left by 8. + */ +#define _READ_OK (1<<9) /* read file data / read directory */ +#define _WRITE_OK (1<<10) /* write file data / add file to directory */ +#define _EXECUTE_OK (1<<11) /* execute file / search in directory*/ +#define _DELETE_OK (1<<12) /* delete file / delete directory */ +#define _APPEND_OK (1<<13) /* append to file / add subdirectory to directory */ +#define _RMFILE_OK (1<<14) /* - / remove file from directory */ +#define _RATTR_OK (1<<15) /* read basic attributes */ +#define _WATTR_OK (1<<16) /* write basic attributes */ +#define _REXT_OK (1<<17) /* read extended attributes */ +#define _WEXT_OK (1<<18) /* write extended attributes */ +#define _RPERM_OK (1<<19) /* read permissions */ +#define _WPERM_OK (1<<20) /* write permissions */ +#define _CHOWN_OK (1<<21) /* change ownership */ + +#define _ACCESS_EXTENDED_MASK (_READ_OK | _WRITE_OK | _EXECUTE_OK | \ + _DELETE_OK | _APPEND_OK | \ + _RMFILE_OK | _REXT_OK | \ + _WEXT_OK | _RATTR_OK | _WATTR_OK | _RPERM_OK | \ + _WPERM_OK | _CHOWN_OK) +#endif + +/* whence values for lseek(2) */ +#ifndef SEEK_SET +#define SEEK_SET 0 /* set file offset to offset */ +#define SEEK_CUR 1 /* set file offset to current plus offset */ +#define SEEK_END 2 /* set file offset to EOF plus offset */ +#endif /* !SEEK_SET */ + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +/* whence values for lseek(2); renamed by POSIX 1003.1 */ +#define L_SET SEEK_SET +#define L_INCR SEEK_CUR +#define L_XTND SEEK_END +#endif + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +struct accessx_descriptor { + unsigned int ad_name_offset; + int ad_flags; + int ad_pad[2]; +}; +#define ACCESSX_MAX_DESCRIPTORS 100 +#define ACCESSX_MAX_TABLESIZE (16 * 1024) +#endif + +/* configurable pathname variables */ +#define _PC_LINK_MAX 1 +#define _PC_MAX_CANON 2 +#define _PC_MAX_INPUT 3 +#define _PC_NAME_MAX 4 +#define _PC_PATH_MAX 5 +#define _PC_PIPE_BUF 6 +#define _PC_CHOWN_RESTRICTED 7 +#define _PC_NO_TRUNC 8 +#define _PC_VDISABLE 9 + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define _PC_NAME_CHARS_MAX 10 +#define _PC_CASE_SENSITIVE 11 +#define _PC_CASE_PRESERVING 12 +#define _PC_EXTENDED_SECURITY_NP 13 +#define _PC_AUTH_OPAQUE_NP 14 +#endif + +#define _PC_2_SYMLINKS 15 /* Symlink supported in directory */ +#define _PC_ALLOC_SIZE_MIN 16 /* Minimum storage actually allocated */ +#define _PC_ASYNC_IO 17 /* Async I/O [AIO] supported? */ +#define _PC_FILESIZEBITS 18 /* # of bits to represent file size */ +#define _PC_PRIO_IO 19 /* Priority I/O [PIO] supported? */ +#define _PC_REC_INCR_XFER_SIZE 20 /* Recommended increment for next two */ +#define _PC_REC_MAX_XFER_SIZE 21 /* Recommended max file transfer size */ +#define _PC_REC_MIN_XFER_SIZE 22 /* Recommended min file transfer size */ +#define _PC_REC_XFER_ALIGN 23 /* Recommended buffer alignment */ +#define _PC_SYMLINK_MAX 24 /* Max # of bytes in symlink name */ +#define _PC_SYNC_IO 25 /* Sync I/O [SIO] supported? */ + +/* configurable system strings */ +#define _CS_PATH 1 + +#endif /* !_SYS_UNISTD_H_ */ diff --git a/i386/include/sys/vnode.h b/i386/include/sys/vnode.h new file mode 100644 index 0000000..9e1a0c7 --- /dev/null +++ b/i386/include/sys/vnode.h @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2000-2010 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)vnode.h 8.17 (Berkeley) 5/20/95 + */ + +#ifndef _VNODE_H_ +#define _VNODE_H_ + +#include <sys/appleapiopts.h> +#include <sys/cdefs.h> + +/* + * The vnode is the focus of all file activity in UNIX. There is a + * unique vnode allocated for each active file, each current directory, + * each mounted-on file, text file, and the root. + */ + +/* + * Vnode types. VNON means no type. + */ +enum vtype { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO, VBAD, VSTR, + VCPLX }; + +/* + * Vnode tag types. + * These are for the benefit of external programs only (e.g., pstat) + * and should NEVER be inspected by the kernel. + */ +enum vtagtype { + VT_NON, VT_UFS, VT_NFS, VT_MFS, VT_MSDOSFS, VT_LFS, VT_LOFS, VT_FDESC, + VT_PORTAL, VT_NULL, VT_UMAP, VT_KERNFS, VT_PROCFS, VT_AFS, VT_ISOFS, + VT_UNION, VT_HFS, VT_ZFS, VT_DEVFS, VT_WEBDAV, VT_UDF, VT_AFP, + VT_CDDA, VT_CIFS, VT_OTHER}; + + +/* + * flags for VNOP_BLOCKMAP + */ +#define VNODE_READ 0x01 +#define VNODE_WRITE 0x02 + + + +/* flags for VNOP_ALLOCATE */ +#define PREALLOCATE 0x00000001 /* preallocate allocation blocks */ +#define ALLOCATECONTIG 0x00000002 /* allocate contigious space */ +#define ALLOCATEALL 0x00000004 /* allocate all requested space */ + /* or no space at all */ +#define FREEREMAINDER 0x00000008 /* deallocate allocated but */ + /* unfilled blocks */ +#define ALLOCATEFROMPEOF 0x00000010 /* allocate from the physical eof */ +#define ALLOCATEFROMVOL 0x00000020 /* allocate from the volume offset */ + +/* + * Token indicating no attribute value yet assigned. some user source uses this + */ +#define VNOVAL (-1) + + + +#endif /* !_VNODE_H_ */ diff --git a/i386/include/time.h b/i386/include/time.h new file mode 100644 index 0000000..2914d40 --- /dev/null +++ b/i386/include/time.h @@ -0,0 +1,213 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * (c) UNIX System Laboratories, Inc. + * All or some portions of this file are derived from material licensed + * to the University of California by American Telephone and Telegraph + * Co. or Unix System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)time.h 8.3 (Berkeley) 1/21/94 + */ + +#ifndef _TIME_H_ +#define _TIME_H_ + +#include <_types.h> + +#define __need_struct_timespec +#include <_structs.h> + +#ifndef NULL +#define NULL __DARWIN_NULL +#endif /* ! NULL */ + +#ifndef _CLOCK_T +#define _CLOCK_T +typedef __darwin_clock_t clock_t; +#endif + +#ifndef _SIZE_T +#define _SIZE_T +typedef __darwin_size_t size_t; +#endif + +#ifndef _TIME_T +#define _TIME_T +typedef __darwin_time_t time_t; +#endif + +struct tm { + int tm_sec; /* seconds after the minute [0-60] */ + int tm_min; /* minutes after the hour [0-59] */ + int tm_hour; /* hours since midnight [0-23] */ + int tm_mday; /* day of the month [1-31] */ + int tm_mon; /* months since January [0-11] */ + int tm_year; /* years since 1900 */ + int tm_wday; /* days since Sunday [0-6] */ + int tm_yday; /* days since January 1 [0-365] */ + int tm_isdst; /* Daylight Savings Time flag */ + long tm_gmtoff; /* offset from CUT in seconds */ + char *tm_zone; /* timezone abbreviation */ +}; + +#if __DARWIN_UNIX03 +#define CLOCKS_PER_SEC 1000000 /* [XSI] */ +#else /* !__DARWIN_UNIX03 */ +#include <machine/_limits.h> /* Include file containing CLK_TCK. */ + +#define CLOCKS_PER_SEC (__DARWIN_CLK_TCK) +#endif /* __DARWIN_UNIX03 */ + +#ifndef _ANSI_SOURCE +extern char *tzname[]; +#endif + +extern int getdate_err; +#if __DARWIN_UNIX03 +//Begin-Libc +#ifndef LIBC_ALIAS_TIMEZONE +//End-Libc +extern long timezone __DARWIN_ALIAS(timezone); +//Begin-Libc +#else /* LIBC_ALIAS_TIMEZONE */ +extern long timezone LIBC_ALIAS(timezone); +#endif /* !LIBC_ALIAS_TIMEZONE */ +//End-Libc +#endif /* __DARWIN_UNIX03 */ +extern int daylight; + +__BEGIN_DECLS +char *asctime(const struct tm *); +//Begin-Libc +#ifndef LIBC_ALIAS_CLOCK +//End-Libc +clock_t clock(void) __DARWIN_ALIAS(clock); +//Begin-Libc +#else /* LIBC_ALIAS_CLOCK */ +clock_t clock(void) LIBC_ALIAS(clock); +#endif /* !LIBC_ALIAS_CLOCK */ +//End-Libc +char *ctime(const time_t *); +double difftime(time_t, time_t); +struct tm *getdate(const char *); +struct tm *gmtime(const time_t *); +struct tm *localtime(const time_t *); +//Begin-Libc +#ifndef LIBC_ALIAS_MKTIME +//End-Libc +time_t mktime(struct tm *) __DARWIN_ALIAS(mktime); +//Begin-Libc +#else /* LIBC_ALIAS_MKTIME */ +time_t mktime(struct tm *) LIBC_ALIAS(mktime); +#endif /* !LIBC_ALIAS_MKTIME */ +//End-Libc +//Begin-Libc +#ifndef LIBC_ALIAS_STRFTIME +//End-Libc +size_t strftime(char * __restrict, size_t, const char * __restrict, const struct tm * __restrict) __DARWIN_ALIAS(strftime); +//Begin-Libc +#else /* LIBC_ALIAS_STRFTIME */ +size_t strftime(char * __restrict, size_t, const char * __restrict, const struct tm * __restrict) LIBC_ALIAS(strftime); +#endif /* !LIBC_ALIAS_STRFTIME */ +//End-Libc +//Begin-Libc +#ifndef LIBC_ALIAS_STRPTIME +//End-Libc +char *strptime(const char * __restrict, const char * __restrict, struct tm * __restrict) __DARWIN_ALIAS(strptime); +//Begin-Libc +#else /* LIBC_ALIAS_STRPTIME */ +char *strptime(const char * __restrict, const char * __restrict, struct tm * __restrict) LIBC_ALIAS(strptime); +#endif /* !LIBC_ALIAS_STRPTIME */ +//End-Libc +time_t time(time_t *); + +#ifndef _ANSI_SOURCE +void tzset(void); +#endif /* not ANSI */ + +/* [TSF] Thread safe functions */ +char *asctime_r(const struct tm * __restrict, char * __restrict); +char *ctime_r(const time_t *, char *); +struct tm *gmtime_r(const time_t * __restrict, struct tm * __restrict); +struct tm *localtime_r(const time_t * __restrict, struct tm * __restrict); + +#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) +time_t posix2time(time_t); +#if !__DARWIN_UNIX03 +char *timezone(int, int); +#endif /* !__DARWIN_UNIX03 */ +void tzsetwall(void); +time_t time2posix(time_t); +time_t timelocal(struct tm * const); +time_t timegm(struct tm * const); +#endif /* neither ANSI nor POSIX */ + +#if !defined(_ANSI_SOURCE) +//Begin-Libc +#ifndef LIBC_ALIAS_NANOSLEEP +//End-Libc +int nanosleep(const struct timespec *, struct timespec *) __DARWIN_ALIAS_C(nanosleep); +//Begin-Libc +#else /* LIBC_ALIAS_NANOSLEEP */ +int nanosleep(const struct timespec *, struct timespec *) LIBC_ALIAS_C(nanosleep); +#endif /* !LIBC_ALIAS_NANOSLEEP */ +//End-Libc +#endif +__END_DECLS + +#ifdef _USE_EXTENDED_LOCALES_ +#include <xlocale/_time.h> +#endif /* _USE_EXTENDED_LOCALES_ */ + +#endif /* !_TIME_H_ */ diff --git a/i386/include/unistd.h b/i386/include/unistd.h new file mode 100644 index 0000000..a15eee6 --- /dev/null +++ b/i386/include/unistd.h @@ -0,0 +1,623 @@ +/* + * Copyright (c) 2000, 2002-2006, 2008, 2009 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/*- + * Copyright (c) 1998-1999 Apple Computer, Inc. All Rights Reserved + * Copyright (c) 1991, 1993, 1994 + * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)unistd.h 8.12 (Berkeley) 4/27/95 + * + * Copyright (c) 1998 Apple Compter, Inc. + * All Rights Reserved + */ + +/* History: + 7/14/99 EKN at Apple fixed getdirentriesattr from getdirentryattr + 3/26/98 CHW at Apple added real interface to searchfs call + 3/5/98 CHW at Apple added hfs semantic system calls headers +*/ + +#ifndef _UNISTD_H_ +#define _UNISTD_H_ + +#include <_types.h> +#include <sys/unistd.h> + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#ifndef _DEV_T +#define _DEV_T +typedef __darwin_dev_t dev_t; +#endif +#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ + +#ifndef _GID_T +#define _GID_T +typedef __darwin_gid_t gid_t; +#endif + +#ifndef _INTPTR_T +#define _INTPTR_T +typedef __darwin_intptr_t intptr_t; +#endif + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#ifndef _MODE_T +#define _MODE_T +typedef __darwin_mode_t mode_t; +#endif +#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ + +#ifndef _OFF_T +#define _OFF_T +typedef __darwin_off_t off_t; +#endif + +#ifndef _PID_T +#define _PID_T +typedef __darwin_pid_t pid_t; +#endif + +#ifndef _SIZE_T +#define _SIZE_T +/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: + * _GCC_SIZE_T */ +typedef __darwin_size_t size_t; +#endif + +#ifndef _SSIZE_T +#define _SSIZE_T +typedef __darwin_ssize_t ssize_t; +#endif + +#ifndef _UID_T +#define _UID_T +typedef __darwin_uid_t uid_t; /* user id */ +#endif + +#ifndef _USECONDS_T +#define _USECONDS_T +typedef __darwin_useconds_t useconds_t; +#endif + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#ifndef _UUID_T +#define _UUID_T +typedef __darwin_uuid_t uuid_t; +#endif /* _UUID_T */ +#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ + +#define STDIN_FILENO 0 /* standard input file descriptor */ +#define STDOUT_FILENO 1 /* standard output file descriptor */ +#define STDERR_FILENO 2 /* standard error file descriptor */ + +#ifndef NULL +#define NULL __DARWIN_NULL +#endif /* ! NULL */ + +/* Version test macros */ +/* _POSIX_VERSION and _POSIX2_VERSION from sys/unistd.h */ +#define _XOPEN_VERSION 600 /* [XSI] */ +#define _XOPEN_XCU_VERSION 4 /* Older standard */ + + +/* Please keep this list in the same order as the applicable standard */ +#define _POSIX_ADVISORY_INFO (-1) /* [ADV] */ +#define _POSIX_ASYNCHRONOUS_IO (-1) /* [AIO] */ +#define _POSIX_BARRIERS (-1) /* [BAR] */ +#define _POSIX_CHOWN_RESTRICTED 200112L +#define _POSIX_CLOCK_SELECTION (-1) /* [CS] */ +#define _POSIX_CPUTIME (-1) /* [CPT] */ +#define _POSIX_FSYNC 200112L /* [FSC] */ +#define _POSIX_IPV6 200112L +#define _POSIX_JOB_CONTROL 200112L +#define _POSIX_MAPPED_FILES 200112L /* [MF] */ +#define _POSIX_MEMLOCK (-1) /* [ML] */ +#define _POSIX_MEMLOCK_RANGE (-1) /* [MR] */ +#define _POSIX_MEMORY_PROTECTION 200112L /* [MPR] */ +#define _POSIX_MESSAGE_PASSING (-1) /* [MSG] */ +#define _POSIX_MONOTONIC_CLOCK (-1) /* [MON] */ +#define _POSIX_NO_TRUNC 200112L +#define _POSIX_PRIORITIZED_IO (-1) /* [PIO] */ +#define _POSIX_PRIORITY_SCHEDULING (-1) /* [PS] */ +#define _POSIX_RAW_SOCKETS (-1) /* [RS] */ +#define _POSIX_READER_WRITER_LOCKS 200112L /* [THR] */ +#define _POSIX_REALTIME_SIGNALS (-1) /* [RTS] */ +#define _POSIX_REGEXP 200112L +#define _POSIX_SAVED_IDS 200112L /* XXX required */ +#define _POSIX_SEMAPHORES (-1) /* [SEM] */ +#define _POSIX_SHARED_MEMORY_OBJECTS (-1) /* [SHM] */ +#define _POSIX_SHELL 200112L +#define _POSIX_SPAWN (-1) /* [SPN] */ +#define _POSIX_SPIN_LOCKS (-1) /* [SPI] */ +#define _POSIX_SPORADIC_SERVER (-1) /* [SS] */ +#define _POSIX_SYNCHRONIZED_IO (-1) /* [SIO] */ +#define _POSIX_THREAD_ATTR_STACKADDR 200112L /* [TSA] */ +#define _POSIX_THREAD_ATTR_STACKSIZE 200112L /* [TSS] */ +#define _POSIX_THREAD_CPUTIME (-1) /* [TCT] */ +#define _POSIX_THREAD_PRIO_INHERIT (-1) /* [TPI] */ +#define _POSIX_THREAD_PRIO_PROTECT (-1) /* [TPP] */ +#define _POSIX_THREAD_PRIORITY_SCHEDULING (-1) /* [TPS] */ +#define _POSIX_THREAD_PROCESS_SHARED 200112L /* [TSH] */ +#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L /* [TSF] */ +#define _POSIX_THREAD_SPORADIC_SERVER (-1) /* [TSP] */ +#define _POSIX_THREADS 200112L /* [THR] */ +#define _POSIX_TIMEOUTS (-1) /* [TMO] */ +#define _POSIX_TIMERS (-1) /* [TMR] */ +#define _POSIX_TRACE (-1) /* [TRC] */ +#define _POSIX_TRACE_EVENT_FILTER (-1) /* [TEF] */ +#define _POSIX_TRACE_INHERIT (-1) /* [TRI] */ +#define _POSIX_TRACE_LOG (-1) /* [TRL] */ +#define _POSIX_TYPED_MEMORY_OBJECTS (-1) /* [TYM] */ +#ifndef _POSIX_VDISABLE +#define _POSIX_VDISABLE 0xff /* same as sys/termios.h */ +#endif /* _POSIX_VDISABLE */ + +#define _POSIX2_C_BIND 200112L +#define _POSIX2_C_DEV 200112L /* c99 command */ +#define _POSIX2_CHAR_TERM 200112L +#define _POSIX2_FORT_DEV (-1) /* fort77 command */ +#define _POSIX2_FORT_RUN 200112L +#define _POSIX2_LOCALEDEF 200112L /* localedef command */ +#define _POSIX2_PBS (-1) +#define _POSIX2_PBS_ACCOUNTING (-1) +#define _POSIX2_PBS_CHECKPOINT (-1) +#define _POSIX2_PBS_LOCATE (-1) +#define _POSIX2_PBS_MESSAGE (-1) +#define _POSIX2_PBS_TRACK (-1) +#define _POSIX2_SW_DEV 200112L +#define _POSIX2_UPE 200112L /* XXXX no fc, newgrp, tabs */ + +#define _V6_ILP32_OFF32 (-1) +#define _V6_ILP32_OFFBIG (1) +#define _V6_LP64_OFF64 (-1) +#define _V6_LPBIG_OFFBIG (-1) + +#define _XBS5_ILP32_OFF32 _V6_ILP32_OFF32 /* legacy */ +#define _XBS5_ILP32_OFFBIG _V6_ILP32_OFFBIG /* legacy */ +#define _XBS5_LP64_OFF64 _V6_LP64_OFF64 /* legacy */ +#define _XBS5_LPBIG_OFFBIG _V6_LPBIG_OFFBIG /* legacy */ + +#define _XOPEN_CRYPT (1) +#define _XOPEN_ENH_I18N (1) /* XXX required */ +#define _XOPEN_LEGACY (-1) /* no ftime gcvt, wcswcs */ +#define _XOPEN_REALTIME (-1) /* no q'ed signals, mq_* */ +#define _XOPEN_REALTIME_THREADS (-1) /* no posix_spawn, et. al. */ +#define _XOPEN_SHM (1) +#define _XOPEN_STREAMS (-1) +#define _XOPEN_UNIX (1) + + +#define F_ULOCK 0 /* unlock locked section */ +#define F_LOCK 1 /* lock a section for exclusive use */ +#define F_TLOCK 2 /* test and lock a section for exclusive use */ +#define F_TEST 3 /* test a section for locks by other procs */ + +/* configurable system variables */ +#define _SC_ARG_MAX 1 +#define _SC_CHILD_MAX 2 +#define _SC_CLK_TCK 3 +#define _SC_NGROUPS_MAX 4 +#define _SC_OPEN_MAX 5 +#define _SC_JOB_CONTROL 6 +#define _SC_SAVED_IDS 7 +#define _SC_VERSION 8 +#define _SC_BC_BASE_MAX 9 +#define _SC_BC_DIM_MAX 10 +#define _SC_BC_SCALE_MAX 11 +#define _SC_BC_STRING_MAX 12 +#define _SC_COLL_WEIGHTS_MAX 13 +#define _SC_EXPR_NEST_MAX 14 +#define _SC_LINE_MAX 15 +#define _SC_RE_DUP_MAX 16 +#define _SC_2_VERSION 17 +#define _SC_2_C_BIND 18 +#define _SC_2_C_DEV 19 +#define _SC_2_CHAR_TERM 20 +#define _SC_2_FORT_DEV 21 +#define _SC_2_FORT_RUN 22 +#define _SC_2_LOCALEDEF 23 +#define _SC_2_SW_DEV 24 +#define _SC_2_UPE 25 +#define _SC_STREAM_MAX 26 +#define _SC_TZNAME_MAX 27 +#define _SC_ASYNCHRONOUS_IO 28 +#define _SC_PAGESIZE 29 +#define _SC_MEMLOCK 30 +#define _SC_MEMLOCK_RANGE 31 +#define _SC_MEMORY_PROTECTION 32 +#define _SC_MESSAGE_PASSING 33 +#define _SC_PRIORITIZED_IO 34 +#define _SC_PRIORITY_SCHEDULING 35 +#define _SC_REALTIME_SIGNALS 36 +#define _SC_SEMAPHORES 37 +#define _SC_FSYNC 38 +#define _SC_SHARED_MEMORY_OBJECTS 39 +#define _SC_SYNCHRONIZED_IO 40 +#define _SC_TIMERS 41 +#define _SC_AIO_LISTIO_MAX 42 +#define _SC_AIO_MAX 43 +#define _SC_AIO_PRIO_DELTA_MAX 44 +#define _SC_DELAYTIMER_MAX 45 +#define _SC_MQ_OPEN_MAX 46 +#define _SC_MAPPED_FILES 47 /* swap _SC_PAGESIZE vs. BSD */ +#define _SC_RTSIG_MAX 48 +#define _SC_SEM_NSEMS_MAX 49 +#define _SC_SEM_VALUE_MAX 50 +#define _SC_SIGQUEUE_MAX 51 +#define _SC_TIMER_MAX 52 +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define _SC_NPROCESSORS_CONF 57 +#define _SC_NPROCESSORS_ONLN 58 +#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */ +#define _SC_2_PBS 59 +#define _SC_2_PBS_ACCOUNTING 60 +#define _SC_2_PBS_CHECKPOINT 61 +#define _SC_2_PBS_LOCATE 62 +#define _SC_2_PBS_MESSAGE 63 +#define _SC_2_PBS_TRACK 64 +#define _SC_ADVISORY_INFO 65 +#define _SC_BARRIERS 66 +#define _SC_CLOCK_SELECTION 67 +#define _SC_CPUTIME 68 +#define _SC_FILE_LOCKING 69 +#define _SC_GETGR_R_SIZE_MAX 70 +#define _SC_GETPW_R_SIZE_MAX 71 +#define _SC_HOST_NAME_MAX 72 +#define _SC_LOGIN_NAME_MAX 73 +#define _SC_MONOTONIC_CLOCK 74 +#define _SC_MQ_PRIO_MAX 75 +#define _SC_READER_WRITER_LOCKS 76 +#define _SC_REGEXP 77 +#define _SC_SHELL 78 +#define _SC_SPAWN 79 +#define _SC_SPIN_LOCKS 80 +#define _SC_SPORADIC_SERVER 81 +#define _SC_THREAD_ATTR_STACKADDR 82 +#define _SC_THREAD_ATTR_STACKSIZE 83 +#define _SC_THREAD_CPUTIME 84 +#define _SC_THREAD_DESTRUCTOR_ITERATIONS 85 +#define _SC_THREAD_KEYS_MAX 86 +#define _SC_THREAD_PRIO_INHERIT 87 +#define _SC_THREAD_PRIO_PROTECT 88 +#define _SC_THREAD_PRIORITY_SCHEDULING 89 +#define _SC_THREAD_PROCESS_SHARED 90 +#define _SC_THREAD_SAFE_FUNCTIONS 91 +#define _SC_THREAD_SPORADIC_SERVER 92 +#define _SC_THREAD_STACK_MIN 93 +#define _SC_THREAD_THREADS_MAX 94 +#define _SC_TIMEOUTS 95 +#define _SC_THREADS 96 +#define _SC_TRACE 97 +#define _SC_TRACE_EVENT_FILTER 98 +#define _SC_TRACE_INHERIT 99 +#define _SC_TRACE_LOG 100 +#define _SC_TTY_NAME_MAX 101 +#define _SC_TYPED_MEMORY_OBJECTS 102 +#define _SC_V6_ILP32_OFF32 103 +#define _SC_V6_ILP32_OFFBIG 104 +#define _SC_V6_LP64_OFF64 105 +#define _SC_V6_LPBIG_OFFBIG 106 +#define _SC_IPV6 118 +#define _SC_RAW_SOCKETS 119 +#define _SC_SYMLOOP_MAX 120 +#define _SC_ATEXIT_MAX 107 +#define _SC_IOV_MAX 56 +#define _SC_PAGE_SIZE _SC_PAGESIZE +#define _SC_XOPEN_CRYPT 108 +#define _SC_XOPEN_ENH_I18N 109 +#define _SC_XOPEN_LEGACY 110 +#define _SC_XOPEN_REALTIME 111 +#define _SC_XOPEN_REALTIME_THREADS 112 +#define _SC_XOPEN_SHM 113 +#define _SC_XOPEN_STREAMS 114 +#define _SC_XOPEN_UNIX 115 +#define _SC_XOPEN_VERSION 116 +#define _SC_XOPEN_XCU_VERSION 121 +#define _SC_XBS5_ILP32_OFF32 122 +#define _SC_XBS5_ILP32_OFFBIG 123 +#define _SC_XBS5_LP64_OFF64 124 +#define _SC_XBS5_LPBIG_OFFBIG 125 +#define _SC_SS_REPL_MAX 126 +#define _SC_TRACE_EVENT_NAME_MAX 127 +#define _SC_TRACE_NAME_MAX 128 +#define _SC_TRACE_SYS_MAX 129 +#define _SC_TRACE_USER_EVENT_MAX 130 +#define _SC_PASS_MAX 131 + +#ifndef _CS_PATH /* XXX temporary #ifdef'ed for <sys/unistd.h> */ +#define _CS_PATH 1 +#endif +#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 2 +#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 3 +#define _CS_POSIX_V6_ILP32_OFF32_LIBS 4 +#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 5 +#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 6 +#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 7 +#define _CS_POSIX_V6_LP64_OFF64_CFLAGS 8 +#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 9 +#define _CS_POSIX_V6_LP64_OFF64_LIBS 10 +#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 11 +#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 12 +#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 13 +#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 14 + +/* reserved for compatibility with Issue 5 */ +#define _CS_XBS5_ILP32_OFF32_CFLAGS 20 +#define _CS_XBS5_ILP32_OFF32_LDFLAGS 21 +#define _CS_XBS5_ILP32_OFF32_LIBS 22 +#define _CS_XBS5_ILP32_OFF32_LINTFLAGS 23 +#define _CS_XBS5_ILP32_OFFBIG_CFLAGS 24 +#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS 25 +#define _CS_XBS5_ILP32_OFFBIG_LIBS 26 +#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS 27 +#define _CS_XBS5_LP64_OFF64_CFLAGS 28 +#define _CS_XBS5_LP64_OFF64_LDFLAGS 29 +#define _CS_XBS5_LP64_OFF64_LIBS 30 +#define _CS_XBS5_LP64_OFF64_LINTFLAGS 31 +#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS 32 +#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS 33 +#define _CS_XBS5_LPBIG_OFFBIG_LIBS 34 +#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS 35 + +#define _CS_DARWIN_USER_DIR 65536 +#define _CS_DARWIN_USER_TEMP_DIR 65537 +#define _CS_DARWIN_USER_CACHE_DIR 65538 + +__BEGIN_DECLS + +void _exit(int) __dead2; +int access(const char *, int); +unsigned int + alarm(unsigned int); +int chdir(const char *); +int chown(const char *, uid_t, gid_t); +int close(int) __DARWIN_ALIAS_C(close); +size_t confstr(int, char *, size_t) __DARWIN_ALIAS(confstr); +char *crypt(const char *, const char *); +char *ctermid(char *); +int dup(int); +int dup2(int, int); +#if __DARWIN_UNIX03 +void encrypt(char *, int) __DARWIN_ALIAS(encrypt); +#else /* !__DARWIN_UNIX03 */ +int encrypt(char *, int); +#endif /* __DARWIN_UNIX03 */ +int execl(const char *, const char *, ...); +int execle(const char *, const char *, ...); +int execlp(const char *, const char *, ...); +int execv(const char *, char * const *); +int execve(const char *, char * const *, char * const *); +int execvp(const char *, char * const *); +int fchown(int, uid_t, gid_t); +int fchdir(int); +pid_t fork(void); +long fpathconf(int, int); +int fsync(int) __DARWIN_ALIAS_C(fsync); +int ftruncate(int, off_t); +char *getcwd(char *, size_t); +gid_t getegid(void); +uid_t geteuid(void); +gid_t getgid(void); +#if defined(_DARWIN_UNLIMITED_GETGROUPS) || defined(_DARWIN_C_SOURCE) +int getgroups(int, gid_t []) __DARWIN_EXTSN(getgroups); +#else /* !_DARWIN_UNLIMITED_GETGROUPS && !_DARWIN_C_SOURCE */ +int getgroups(int, gid_t []); +#endif /* _DARWIN_UNLIMITED_GETGROUPS || _DARWIN_C_SOURCE */ +long gethostid(void); +int gethostname(char *, size_t); +char *getlogin(void); +int getlogin_r(char *, size_t); +int getopt(int, char * const [], const char *) __DARWIN_ALIAS(getopt); +pid_t getpgid(pid_t); +pid_t getpgrp(void); +pid_t getpid(void); +pid_t getppid(void); +pid_t getsid(pid_t); +uid_t getuid(void); +char *getwd(char *); /* obsoleted by getcwd() */ +int isatty(int); +int lchown(const char *, uid_t, gid_t) __DARWIN_ALIAS(lchown); +int link(const char *, const char *); +int lockf(int, int, off_t) __DARWIN_ALIAS_C(lockf); +off_t lseek(int, off_t, int); +int nice(int) __DARWIN_ALIAS(nice); +long pathconf(const char *, int); +int pause(void) __DARWIN_ALIAS_C(pause); +int pipe(int [2]); +ssize_t pread(int, void *, size_t, off_t) __DARWIN_ALIAS_C(pread); +ssize_t pwrite(int, const void *, size_t, off_t) __DARWIN_ALIAS_C(pwrite); +ssize_t read(int, void *, size_t) __DARWIN_ALIAS_C(read); +ssize_t readlink(const char * __restrict, char * __restrict, size_t); +int rmdir(const char *); +int setegid(gid_t); +int seteuid(uid_t); +int setgid(gid_t); +int setpgid(pid_t, pid_t); +#if __DARWIN_UNIX03 +pid_t setpgrp(void) __DARWIN_ALIAS(setpgrp); +#else /* !__DARWIN_UNIX03 */ +int setpgrp(pid_t pid, pid_t pgrp); /* obsoleted by setpgid() */ +#endif /* __DARWIN_UNIX03 */ +int setregid(gid_t, gid_t) __DARWIN_ALIAS(setregid); +int setreuid(uid_t, uid_t) __DARWIN_ALIAS(setreuid); +pid_t setsid(void); +int setuid(uid_t); +unsigned int + sleep(unsigned int) __DARWIN_ALIAS_C(sleep); +void swab(const void * __restrict, void * __restrict, ssize_t); +int symlink(const char *, const char *); +void sync(void); +long sysconf(int); +pid_t tcgetpgrp(int); +int tcsetpgrp(int, pid_t); +int truncate(const char *, off_t); +char *ttyname(int); +#if __DARWIN_UNIX03 +int ttyname_r(int, char *, size_t) __DARWIN_ALIAS(ttyname_r); +#else /* !__DARWIN_UNIX03 */ +char *ttyname_r(int, char *, size_t); +#endif /* __DARWIN_UNIX03 */ +useconds_t + ualarm(useconds_t, useconds_t); +int unlink(const char *); +int usleep(useconds_t) __DARWIN_ALIAS_C(usleep); +pid_t vfork(void); +ssize_t write(int, const void *, size_t) __DARWIN_ALIAS_C(write); + +extern char *optarg; /* getopt(3) external variables */ +extern int optind, opterr, optopt; + +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#include <sys/select.h> + +void _Exit(int) __dead2; +int accessx_np(const struct accessx_descriptor *, size_t, int *, uid_t); +int acct(const char *); +int add_profil(char *, size_t, unsigned long, unsigned int); +void *brk(const void *); +int chroot(const char *); +void endusershell(void); +int execvP(const char *, const char *, char * const *); +char *fflagstostr(unsigned long); +int getdtablesize(void); +int getdomainname(char *, int); +int getgrouplist(const char *, int, int *, int *); +int gethostuuid(uuid_t, const struct timespec *); +mode_t getmode(const void *, mode_t); +int getpagesize(void) __pure2; +char *getpass(const char *); +int getpeereid(int, uid_t *, gid_t *); +int getpgid(pid_t _pid); +int getsgroups_np(int *, uuid_t); +int getsid(pid_t _pid); +char *getusershell(void); +int getwgroups_np(int *, uuid_t); +int initgroups(const char *, int); +int iruserok(unsigned long, int, const char *, const char *); +int iruserok_sa(const void *, int, int, const char *, const char *); +int issetugid(void); +char *mkdtemp(char *); +int mknod(const char *, mode_t, dev_t); +int mkstemp(char *); +int mkstemps(char *, int); +char *mktemp(char *); +int nfssvc(int, void *); +int profil(char *, size_t, unsigned long, unsigned int); +int pthread_setugid_np(uid_t, gid_t); +int pthread_getugid_np( uid_t *, gid_t *); +int rcmd(char **, int, const char *, const char *, const char *, int *); +int rcmd_af(char **, int, const char *, const char *, const char *, int *, + int); +int reboot(int); +int revoke(const char *); +int rresvport(int *); +int rresvport_af(int *, int); +int ruserok(const char *, int, const char *, const char *); +void *sbrk(int); +int setdomainname(const char *, int); +int setgroups(int, const gid_t *); +void sethostid(long); +int sethostname(const char *, int); +#if __DARWIN_UNIX03 +void setkey(const char *) __DARWIN_ALIAS(setkey); +#else /* !__DARWIN_UNIX03 */ +int setkey(const char *); +#endif /* __DARWIN_UNIX03 */ +int setlogin(const char *); +void *setmode(const char *) __DARWIN_ALIAS(setmode); +int setrgid(gid_t); +int setruid(uid_t); +int setsgroups_np(int, const uuid_t); +void setusershell(void); +int setwgroups_np(int, const uuid_t); +int strtofflags(char **, unsigned long *, unsigned long *); +int swapon(const char *); +int syscall(int, ...); +int ttyslot(void); +int undelete(const char *); +int unwhiteout(const char *); +void *valloc(size_t); + +extern char *suboptarg; /* getsubopt(3) external variable */ +int getsubopt(char **, char * const *, char **); + +/* HFS & HFS Plus semantics system calls go here */ +#ifdef __LP64__ +int fgetattrlist(int,void*,void*,size_t,unsigned int); +int fsetattrlist(int,void*,void*,size_t,unsigned int); +int getattrlist(const char*,void*,void*,size_t,unsigned int) __DARWIN_ALIAS(getattrlist); +int setattrlist(const char*,void*,void*,size_t,unsigned int) __DARWIN_ALIAS(setattrlist); +int exchangedata(const char*,const char*,unsigned int); +int getdirentriesattr(int,void*,void*,size_t,unsigned int*,unsigned int*,unsigned int*,unsigned int); + +#else /* __LP64__ */ +int fgetattrlist(int,void*,void*,size_t,unsigned long); +int fsetattrlist(int,void*,void*,size_t,unsigned long); +int getattrlist(const char*,void*,void*,size_t,unsigned long) __DARWIN_ALIAS(getattrlist); +int setattrlist(const char*,void*,void*,size_t,unsigned long) __DARWIN_ALIAS(setattrlist); +int exchangedata(const char*,const char*,unsigned long); +int getdirentriesattr(int,void*,void*,size_t,unsigned long*,unsigned long*,unsigned long*,unsigned long); + +#endif /* __LP64__ */ + +struct fssearchblock; +struct searchstate; + +int searchfs(const char *, struct fssearchblock *, unsigned long *, unsigned int, unsigned int, struct searchstate *); +int fsctl(const char *,unsigned long,void*,unsigned int); +int ffsctl(int,unsigned long,void*,unsigned int); + +extern int optreset; + +#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ +__END_DECLS + +#endif /* !_UNISTD_H_ */ diff --git a/i386/include/unwind.h b/i386/include/unwind.h new file mode 100644 index 0000000..24cb87e --- /dev/null +++ b/i386/include/unwind.h @@ -0,0 +1,245 @@ +/* Exception handling and frame unwind runtime interface routines. + Copyright (C) 2001, 2003, 2004, 2006 Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GCC is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +/* As a special exception, if you include this header file into source + files compiled by GCC, this header file does not by itself cause + the resulting executable to be covered by the GNU General Public + License. This exception does not however invalidate any other + reasons why the executable file might be covered by the GNU General + Public License. */ + +/* This is derived from the C++ ABI for IA-64. Where we diverge + for cross-architecture compatibility are noted with "@@@". */ + +#ifndef _UNWIND_H +#define _UNWIND_H + +#ifndef HIDE_EXPORTS +#ifdef __GCC__ +#pragma GCC visibility push(default) +#endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Level 1: Base ABI */ + +/* @@@ The IA-64 ABI uses uint64 throughout. Most places this is + inefficient for 32-bit and smaller machines. */ +typedef unsigned _Unwind_Word __attribute__((__mode__(__word__))); +typedef signed _Unwind_Sword __attribute__((__mode__(__word__))); +#if defined(__ia64__) && defined(__hpux__) +typedef unsigned _Unwind_Ptr __attribute__((__mode__(__word__))); +#else +typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__))); +#endif +typedef unsigned _Unwind_Internal_Ptr __attribute__((__mode__(__pointer__))); + +/* @@@ The IA-64 ABI uses a 64-bit word to identify the producer and + consumer of an exception. We'll go along with this for now even on + 32-bit machines. We'll need to provide some other option for + 16-bit machines and for machines with > 8 bits per byte. */ +typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__))); + +/* The unwind interface uses reason codes in several contexts to + identify the reasons for failures or other actions. */ +typedef enum +{ + _URC_NO_REASON = 0, + _URC_FOREIGN_EXCEPTION_CAUGHT = 1, + _URC_FATAL_PHASE2_ERROR = 2, + _URC_FATAL_PHASE1_ERROR = 3, + _URC_NORMAL_STOP = 4, + _URC_END_OF_STACK = 5, + _URC_HANDLER_FOUND = 6, + _URC_INSTALL_CONTEXT = 7, + _URC_CONTINUE_UNWIND = 8 +} _Unwind_Reason_Code; + + +/* The unwind interface uses a pointer to an exception header object + as its representation of an exception being thrown. In general, the + full representation of an exception object is language- and + implementation-specific, but it will be prefixed by a header + understood by the unwind interface. */ + +struct _Unwind_Exception; + +typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code, + struct _Unwind_Exception *); + +struct _Unwind_Exception +{ + _Unwind_Exception_Class exception_class; + _Unwind_Exception_Cleanup_Fn exception_cleanup; + _Unwind_Word private_1; + _Unwind_Word private_2; + + /* @@@ The IA-64 ABI says that this structure must be double-word aligned. + Taking that literally does not make much sense generically. Instead we + provide the maximum alignment required by any type for the machine. */ +} __attribute__((__aligned__)); + + +/* The ACTIONS argument to the personality routine is a bitwise OR of one + or more of the following constants. */ +typedef int _Unwind_Action; + +#define _UA_SEARCH_PHASE 1 +#define _UA_CLEANUP_PHASE 2 +#define _UA_HANDLER_FRAME 4 +#define _UA_FORCE_UNWIND 8 +#define _UA_END_OF_STACK 16 + +/* This is an opaque type used to refer to a system-specific data + structure used by the system unwinder. This context is created and + destroyed by the system, and passed to the personality routine + during unwinding. */ +struct _Unwind_Context; + +/* Raise an exception, passing along the given exception object. */ +extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *); + +/* Raise an exception for forced unwinding. */ + +typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) + (int, _Unwind_Action, _Unwind_Exception_Class, + struct _Unwind_Exception *, struct _Unwind_Context *, void *); + +extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *, + _Unwind_Stop_Fn, + void *); + +/* Helper to invoke the exception_cleanup routine. */ +extern void _Unwind_DeleteException (struct _Unwind_Exception *); + +/* Resume propagation of an existing exception. This is used after + e.g. executing cleanup code, and not to implement rethrowing. */ +extern void _Unwind_Resume (struct _Unwind_Exception *); + +/* @@@ Resume propagation of an FORCE_UNWIND exception, or to rethrow + a normal exception that was handled. */ +extern _Unwind_Reason_Code _Unwind_Resume_or_Rethrow (struct _Unwind_Exception *); + +/* @@@ Use unwind data to perform a stack backtrace. The trace callback + is called for every stack frame in the call chain, but no cleanup + actions are performed. */ +typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn) + (struct _Unwind_Context *, void *); + +extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *); + +/* These functions are used for communicating information about the unwind + context (i.e. the unwind descriptors and the user register state) between + the unwind library and the personality routine and landing pad. Only + selected registers maybe manipulated. */ + +extern _Unwind_Word _Unwind_GetGR (struct _Unwind_Context *, int); +extern void _Unwind_SetGR (struct _Unwind_Context *, int, _Unwind_Word); + +extern _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *); +extern _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *); +extern void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr); + +/* @@@ Retrieve the CFA of the given context. */ +extern _Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *); + +extern void *_Unwind_GetLanguageSpecificData (struct _Unwind_Context *); + +extern _Unwind_Ptr _Unwind_GetRegionStart (struct _Unwind_Context *); + + +/* The personality routine is the function in the C++ (or other language) + runtime library which serves as an interface between the system unwind + library and language-specific exception handling semantics. It is + specific to the code fragment described by an unwind info block, and + it is always referenced via the pointer in the unwind info block, and + hence it has no ABI-specified name. + + Note that this implies that two different C++ implementations can + use different names, and have different contents in the language + specific data area. Moreover, that the language specific data + area contains no version info because name of the function invoked + provides more effective versioning by detecting at link time the + lack of code to handle the different data format. */ + +typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn) + (int, _Unwind_Action, _Unwind_Exception_Class, + struct _Unwind_Exception *, struct _Unwind_Context *); + +/* @@@ The following alternate entry points are for setjmp/longjmp + based unwinding. */ + +struct SjLj_Function_Context; +extern void _Unwind_SjLj_Register (struct SjLj_Function_Context *); +extern void _Unwind_SjLj_Unregister (struct SjLj_Function_Context *); + +extern _Unwind_Reason_Code _Unwind_SjLj_RaiseException + (struct _Unwind_Exception *); +extern _Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind + (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *); +extern void _Unwind_SjLj_Resume (struct _Unwind_Exception *); +extern _Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow (struct _Unwind_Exception *); + +/* @@@ The following provide access to the base addresses for text + and data-relative addressing in the LDSA. In order to stay link + compatible with the standard ABI for IA-64, we inline these. */ + +#ifdef __ia64__ +#include <stdlib.h> + +static inline _Unwind_Ptr +_Unwind_GetDataRelBase (struct _Unwind_Context *_C) +{ + /* The GP is stored in R1. */ + return _Unwind_GetGR (_C, 1); +} + +static inline _Unwind_Ptr +_Unwind_GetTextRelBase (struct _Unwind_Context *_C __attribute__ ((__unused__))) +{ + abort (); + return 0; +} + +/* @@@ Retrieve the Backing Store Pointer of the given context. */ +extern _Unwind_Word _Unwind_GetBSP (struct _Unwind_Context *); +#else +extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *); +extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *); +#endif + +/* @@@ Given an address, return the entry point of the function that + contains it. */ +extern void * _Unwind_FindEnclosingFunction (void *pc); + +#ifdef __cplusplus +} +#endif + +#ifndef HIDE_EXPORTS +#ifdef __GCC__ +#pragma GCC visibility pop +#endif +#endif + +#endif /* unwind.h */ diff --git a/i386/libsa/Makefile b/i386/libsa/Makefile index 2b0069d..9085a72 100644 --- a/i386/libsa/Makefile +++ b/i386/libsa/Makefile @@ -5,9 +5,9 @@ # # - Major cleanup (PikerAlpha, October 2012). # - Output added for rm/ar/ranlib actions (PikerAlpha, November 2012). +# - Enabled clang compilation (dgsga,PikerAlpha, November 2012. Credits to Evan Lojewski for original work). # - include ../MakePaths.dir UTILDIR = ../util @@ -17,8 +17,8 @@ OPTIM = -Os -Oz CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Werror \ -fno-builtin -static $(OMIT_FRAME_POINTER_CFLAG) \ -DSETTINGS_FILE=SETTINGS/$(MAKE_TARGET_MODEL).h \ - -mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ - -march=pentium4 -msse2 -mfpmath=sse -msoft-float + -fno-stack-protector \ + -march=pentium4 -msse2 -msoft-float INC = -I. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSAIODIR) @@ -33,10 +33,10 @@ DIRS_NEEDED = $(OBJROOT) $(SYMROOT) $(MAKEGOAL): $(DIRS_NEEDED) $(LIBS) $(LIBS): $(SA_OBJS) - @echo "\t[RM] $(SYMROOT)/$@" + @echo "\t[RM] $@" @rm -f $(SYMROOT)/$@ @echo "\t[AR] $@" - @ar q $(SYMROOT)/$@ $^ &> /dev/null + @ar qc $(SYMROOT)/$@ $^ &> /dev/null @echo "\t[RANLIB] $@" @ranlib $(SYMROOT)/$@ diff --git a/i386/libsaio/Makefile b/i386/libsaio/Makefile index 3e13d49..7a8b670 100644 --- a/i386/libsaio/Makefile +++ b/i386/libsaio/Makefile @@ -8,6 +8,7 @@ # - Static data selectors added (PikerAlpha, October 2012). # - STATIC_DATA_FILENAME added (PikerAlpha, October 2012). # - Output added for rm/ar/ranlib actions (PikerAlpha, November 2012). +# - Enabled clang compilation (dgsga, PikerAlpha, November 2012. Credits to Evan Lojewski for original work). # include ../MakePaths.dir @@ -29,8 +30,8 @@ CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost \ -DEFI_DATA_FILE=../config/$(MAKE_EFI_DATA_FILE) \ -DSMBIOS_DATA_FILE=../config/$(MAKE_SMBIOS_DATA_FILE) \ -fno-builtin -static $(OMIT_FRAME_POINTER_CFLAG) \ - -mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ - -march=pentium4 -msse2 -mfpmath=sse -msoft-float + -fno-stack-protector \ + -march=pentium4 -msse2 -msoft-float INC = -I. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) @@ -51,10 +52,10 @@ DIRS_NEEDED = $(OBJROOT) $(SYMROOT) $(MAKEGOAL): $(DIRS_NEEDED) libsaio.h $(LIBS) $(LIBS): $(SAIO_OBJS) - @echo "\t[RM] $(SYMROOT)/$@" + @echo "\t[RM] $@" @rm -f $@ @echo "\t[AR] $@" - @ar q $(SYMROOT)/$@ $^ &> /dev/null + @ar qc $(SYMROOT)/$@ $^ &> /dev/null @echo "\t[RANLIB] $@" @ranlib $(SYMROOT)/$@ diff --git a/i386/libsaio/smbios/static_data.h b/i386/libsaio/smbios/static_data.h index dc4f429..85823ee 100755 --- a/i386/libsaio/smbios/static_data.h +++ b/i386/libsaio/smbios/static_data.h @@ -17,7 +17,7 @@ #include "essentials.h" int tableLength = 0; - long fileSize = 0; + //long fileSize = 0; ***unused variable #if LOAD_MODEL_SPECIFIC_SMBIOS_DATA char dirSpec[32] = ""; diff --git a/i386/libsaio/stringTable.c b/i386/libsaio/stringTable.c index fe725ad..73e55e0 100755 --- a/i386/libsaio/stringTable.c +++ b/i386/libsaio/stringTable.c @@ -316,23 +316,23 @@ long ParseXMLFile(char * buffer, TagPtr * dict) int loadSystemConfig(config_file_t *config) { - char path[80] = ""; // Long enough for the longest (default) path. + char *path = malloc(80); // Long enough for the longest (default) path. static char * dirspec[] = { - + #if LION_RECOVERY_SUPPORT "com.apple.recovery.boot", #endif - + #if LION_INSTALL_SUPPORT - ".IABootFiles", + ".IABootFiles", "OS X Install Data", "Mac OS X Install Data", #endif "Library/Preferences/SystemConfiguration" // The default. - + #if APPLE_RAID_SUPPORT /* - * This is a temporarily change to test RAID support, but it + * This is a temporarily change to test RAID support, but it * will be rewritten right after Bryan confirms that it works. */ , @@ -341,27 +341,27 @@ int loadSystemConfig(config_file_t *config) "com.apple.boot.S/Library/Preferences/SystemConfiguration" #endif }; - + int i, fd; - + for (i = 0; i < sizeof(dirspec) / sizeof(dirspec[0]); i++) { sprintf(path, "/%s/%s", dirspec[i], "com.apple.Boot.plist"); - + if ((fd = open(path, 0)) >= 0) { - // IO_CONFIG_DATA_SIZE is defined as 4096 in bios.h and which should + // IO_CONFIG_DATA_SIZE is defined as 4096 in bios.h and which should // be sufficient enough for RevoBoot (size was 4K for years already). read(fd, config->plist, IO_CONFIG_DATA_SIZE); close(fd); - + // Build XML dictionary. ParseXMLFile(config->plist, &config->dictionary); - + return 0; } } - + return -1; } diff --git a/i386/util/Makefile b/i386/util/Makefile index e4ccd5f..714a6f4 100644 --- a/i386/util/Makefile +++ b/i386/util/Makefile @@ -4,6 +4,7 @@ # Updates: # # - Major cleanup (PikerAlpha, October 2012). +# - Fixed clang compilation (dgsga, November 2012. Credits to Evan Lojewski for original work). # @@ -17,15 +18,15 @@ CFLAGS = $(RC_CFLAGS) $(OPTIM) -Wmost -Werror -g LDFLAGS = DEFINES= -PROGRAMS = md machOconv +PROGRAMS = machOconv segsize +OBJS = machOconv.o segsize.o DIRS_NEEDED = $(OBJROOT) $(SYMROOT) $(LANGDIR) $(MAKEGOAL): $(DIRS_NEEDED) $(PROGRAMS) -machOconv: machOconv.o - @$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $(SYMROOT)/$(@F) machOconv.o -md: - @$(CC) -mdynamic-no-pic -Wall -dead_strip -arch i386 -mmacosx-version-min=10.5 md.c -o $(SYMROOT)/md +$(PROGRAMS): $(OBJS) + @echo "\t[CC] $(@F)" + @$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $(SYMROOT)/$(@F) $(OBJROOT)/$(@F).o include ../MakeInc.dir diff --git a/i386/util/ld_classic b/i386/util/ld_classic deleted file mode 100755 index 3d0fd45ed853debab0c6db6b5c05939e25bbd69a..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc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_K1$FspQ<m``$#+ zd;9$uMf8gTxwuM1`wo7&+t1yk!O)f5Z%S(zvU{ZW^94$UsafjOa`FdtTG~Fb>OA$; zhP0j4!Q5)&v(XL7kyMWOKUDHL`*(K_Ma7(`xN^FY)JL~I*M{k0z%$yflX6!Ydg<tA zUdx>kyvNaw<Ni8zJKip1YVixZ=K=JOq|AZqtAY6(C%*<?>f-e(3~XjUq}YjfcY5=g zkW*Yu!o_0Sq;T4smh-tIs`G$JKtrfl7`gzQTzSACLZN5>*8?Ja7zme&u%N(dfsTMm zzA+hpUP~pTaBB9(**%`R%Fu}nW-XJ98Ozi(x(N&KH%H!CG(6rH<&4sdKk}$tJTbne z&gA8C?9$j?A`apD7YhpS5}u#+X}P={Kbd$quC)4f<PEWo-8Uvbn2E5@KB+8Xsfqrs zQ@y>cOxA^YFQ=gkFMZ;I-xOKaVX_l(Hu&bditTg8)PbK>?${Kix(XUIt9L~PquR1| zigyodbWU^Euygrpm@1I!EaEx7m>NcSeD}|l{-BpNQ%w~qo%GqUG2Y&S?K@8Rx|FKO zn2uiG9rmG#NOQ}{mJAW-D1X`1ectqWNA(yYT+V&B03WqDr^bW??d)uqfCY~f=z%;u SO8d|DPYe9h0{<6U;J*N5UQ(n0 diff --git a/i386/util/ld_classic.1 b/i386/util/ld_classic.1 deleted file mode 100644 index 49d0311..0000000 --- a/i386/util/ld_classic.1 +++ /dev/null @@ -1,1823 +0,0 @@ -.TH LD_CLASSIC 1 "August 4, 2006" "Apple Computer, Inc." -.SH NAME -ld_classic \- The old Mach object file link editor -.SH SYNOPSIS -.B ld_classic -[ -.I "option \&..." -] [ -.I "file \&..." -] -.SH DESCRIPTION -The -.I ld_classic -command combines several Mach-O (Mach object) files into one by combining like sections -in like segments from all the object files, resolving external references, and -searching libraries. In the simplest case several object -.I files -are given, and -.I ld_classic -combines them, producing an object file which can either be executed or -become the input for a further -.I ld_classic -run. (In the latter case, the -.B \-r -option must be given to preserve the relocation information.) Unless an output -file is specified, -.I ld_classic -produces a file named -.BR a.out . -This file is made executable only if no errors occurred during the link editing -and there are no undefined symbols. -.SH "UNIVERSAL FILE SUPPORT" -The link editor accepts ``universal'' (multiple-architecture) input files, but -always creates a ``thin'' (single-architecture), standard Mach-O output file. -The architecture is specified using the -.B \-arch -.I " arch_type" -option. If this option is not used, -.IR ld_classic (1) -attempts to determine the output architecture by examining the first object -file encountered on the command line. If it is a ``thin'' -file, its architecture determines that of the output file. If the first input -file is a ``universal'' file, the ``best'' architecture for the host is used. -(See the explanation of the -.B \-arch -option, below.) -.PP -The compiler driver -.IR cc (1) -handles creating universal executables by calling -.IR ld_classic (1) -multiple times and using -.IR lipo (1) -to create a ``universal'' file from the results of the -.IR ld_classic (1) -executions. -.SH "OUTPUT FILE LAYOUT" -.PP -The object files are loaded in the order in which they are specified on the -command line. The segments and the -sections in those segments will appear in the output file in the order they are -encountered in the object files being linked. All zero fill sections will appear -after all non-zero fill sections in their segments. -.PP -Sections created from files with the -.B \-sectcreate -option will appear in the output file last. Section names for sections created -from files are not allowed to overlap with a section name in the same segment -as a section coming from an object file. Sections created from files may be in -a segment which has sections from object files and if so will be loaded at the -end of the non-zero fill sections for that segment. -.PP -If the option -.B \-seglinkedit -is specified, the segment it creates is the last segment in the output file. -.PP -The address of each segment can be specified with -.B \-segaddr, -which takes the segment's name as an argument. -The address of the first segment can alternatively be specified using -.B \-seg1addr, -in which case a segment name is not used. -Segments that do not have a specified -address will be assigned addresses in the order in which they appear -in the output file. A segment's address will be assigned -based on the ending address of the previous segment. -If the address of the -first segment has not been specified by name, -its assigned address will be -the specified (via -.BR \-seg1addr ) -or default first segment address. -If neither flag is used to specify the first segment's address, its -default address is zero -for all formats except the demand-paged executable format -.SM (MH_EXECUTE), -in which case the default first address is the value of the segment alignment. -.PP -For demand-paged executable format -.SM (MH_EXECUTE) -output files, -if none of the segments' addresses covers address zero through -the value of the segment alignment, a segment with no access protection -will be created to cover those addresses. This segment, named -.SM "``_\|_PAGEZERO''," -is created so that any attempt to dereference a NULL pointer will cause a -memory exception. -.PP -The entry point of the output file is the beginning of -the first section in the first segment (unless the -.B \-e -option is specified). -.SH STATIC ARCHIVE LIBRARIES -.PP -.I ld_classic -supports two types of libraries: static archive libraries and dynamic shared -libraries. Searching for undefined symbols is performed differently for dynamic -shared libraries than it is for static archive libraries. The searching of -dynamic shared libraries is described later. -.PP -When a static archive library is specified as an argument to -.IR ld_classic , -it is searched exactly once, at the -point it is encountered in the argument list. Only those members defining an unresolved external -reference, as defined by the static archive library's table of contents, -are loaded. To produce the table of contents, all static archive libraries must be processed by -.IR ranlib (1). -.PP -Generally, a static archive library does not have multiple members that define -the same symbol. For these types of libraries, the order of the members is not important, so -the table of contents can be sorted for faster link editing using the -.B \-s -option to -.IR ranlib (1). -The first member -of the static archive library is named -.SM "``\_\^\_.SYMDEF SORTED''," -which is understood to be a sorted table of contents. -.PP -If the static archive library does have multiple members that define -the same symbol, the table of contents that -.IR ranlib (1) -produces can't be sorted. Instead, it follows the order in which the members -appear in the static archive library. The link editor searches the table of -contents iteratively, loading members until no further references are -satisfied. In the unsorted case, the first member of the static archive -library is named -.SM "``\_\^\_.SYMDEF''," -which is understood to be a table of contents in -the order of the archive members. -.PP -Static archive library members can also be loaded in response to -the -.B \-ObjC -and -.B \-all_load -flags. See their descriptions below. - -.SH DYNAMIC SHARED LIBRARIES -.PP -When a dynamic shared library or an object file that was linked against a -dynamic shared library is specified as an argument to -.IR ld_classic , -that library is placed in the dynamic shared library search list. The order of -the search list is always the same order the libraries were encountered on the -command line. When linking -flat_namespace, all dynamic libraries that the -dynamic libraries are dependent upon are added to the end of the search list. -.PP -Once the search list is constructed, the static link editor checks for undefined -symbols by simulating the way the dynamic linker will search for undefined -symbols at runtime. For each undefined symbol, the static link editor searches -each library in the search list until it finds a module that defines the symbol. -With each undefined symbol, the search starts with the first library in the -list. This is different than for static archive libraries, where each library -is searched exactly once for all undefined symbols. -.PP -The static link editor simulates dynamic linking as if all the undefined -symbols are to be bound at program launch time. The dynamic linker actually -binds undefined symbols as they are encountered during execution instead of at -program launch. However, the static link editor always produces the same linking -as the dynamic linker as long as none of the dynamic shared libraries define the -same symbol. Different linking can occur only when there is more than one -definition of a symbol and the library modules that contain the definitions for -that symbol do not define and reference exactly the same symbols. In this case, -even different executions of the same program can produce different linking -because the dynamic linker binds undefined functions as they are called, and -this affects the order in which undefined symbols are bound. Because it can -produce different dynamic linking, using dynamic shared libraries that define -the same symbols in the same program is strongly discouraged. -.PP -If a static archive library appears after a dynamic shared library on the -command line, the static library is placed in the dynamic library search list -and is searched as a dynamic library. In this way, when a dynamic library has -undefined symbols, it will cause the appropriate members of the static libraries -to be loaded into the output. Searching static libraries as dynamic libraries -can cause problems if the dynamic library later changes to reference symbols -from the static library that it did not previously reference. In this case when -the program runs, the dynamic linker will report these symbols as undefined -because the members for these symbols were not loaded into the output. - -.SH TWO-LEVEL AND FLAT NAMESPACES -.PP -Two-level and flat namespaces refer to how references to symbols in dynamic -libraries are resolved to a definition in specific dynamic library. For -two-level namespace that resolution is done at static link time when each -image (program, bundle and shared library) is built. When a program is using -images built with two-level namespace there may be different global symbols -with the same name being used by different images in the program (this is now -the default). When a program is using all flat namespace images then only one -global symbol for each global symbol name is used by all images of the program -(this was the default in MacOS X 10.0). -.PP -When creating an output file with the static link editor that links against -dynamic libraries, the references to symbols in those libraries can be recorded -at static link time to bind to a specific library definition (two-level -namespace) or left to be bound at execution time to the first library in the -search order of the program (flat namespace). A program, its dynamic libraries -and its bundles may each be either two-level or flat namespace images. The -dynamic linker will bind each image according to how it was built. -.PP -When creating an output file with the static link editor when -.B \-twolevel_namespace -is in effect (now the default) all undefined references must be satisfied at -static link time. The flags to allow undefined references, -.BI \-U symbol_name, -.BI \-undefined " warning" -and -.BI \-undefined " suppress" -can't be used. -When the environment variable -.B MACOSX_DEPLOYMENT_TARGET -is set to -.B 10.3 -or higher then -.BI \-undefined " dynamic_lookup" -can also be used. The specific library definition recorded -for each reference is the first library that has a definition as listed on the -link line. Listing an umbrella framework implies all of its sub-frameworks, -sub-umbrellas and sub-libraries. For any reference to a definition found in -an umbrella framework's sub-framework, sub-umbrella or sub-library will be -recorded as coming from the umbrella framework. Then at execution time the -dynamic linker will search that umbrella framework's sub-frameworks, -sub-umbrellas and sub-libraries for those references. -Also when two-level namespace is in effect only those frameworks listed on the -link line (and sub-frameworks, sub-umbrellas and sub-libraries of umbrella -frameworks) are searched. Other dependent libraries which are not -sub-frameworks, sub-umbrellas or sub-libraries of umbrella frameworks are not -searched. -.RS -.PP -When creating bundles (MH_BUNDLE outputs) with the static link editor when -two-level namespace is in effect (now the default) and the bundle has -references to symbols -expected to be defined in the program loading the bundle, then the -.BI \-bundle_loader " executable" -must be used. -.PP -When creating an output file with the static link editor when -.B \-flat_namespace -is in effect (the MacOS X 10.0 default) all undefined references must be -satisfied at static link time when -.BI \-undefined " error" -(the default) is used. The static -link editor checks the undefined references by searching all the libraries -listed on the link line then all dependent libraries. The undefined symbols -in the created output file are left to be resolved at execution time by the -dynamic link editor in the dynamic libraries in the search order of the program. - -.SH MULTIPLY DEFINED SYMBOLS -.PP -If there are multiply defined symbols in the object files being linked into -the output file being created this always results in a multiply defined -symbol error. -.PP -When the static link editor links symbols in from a dynamic library that result -in multiply defined symbols the handling depends on the type of name space of -output file being created and possibly the type of name space of the dynamic -library. -.PP -When the static link editor is creating a two-level namespace image and a -there is a multiply defined symbol from dynamic library then that generates a -multiply defined symbol warning (by default), where the treatment of this -warning can be changed with the -.B \-multiply_defined -flag. -.PP -When the static link editor is creating a flat namespace image and a there is -a multiply defined symbol from dynamic library, if the library is a flat -namespace image then that generates a multiply defined symbol error. If the -library is a two-level namespace image then that generates a multiply defined -symbol warning (by default), where the treatment of this warning can be changed -with the -.B \-multiply_defined -flag. - -.SH "USING THE DYNAMIC LINK EDITOR AND DYNAMIC SHARED LIBRARIES" -.PP -The option -.B \-dynamic -must be specified in order to use dynamic shared libraries (and any of the features used to implement them) and/or the dynamic link editor. -To make sure that the output is not using any features that would -require the dynamic link editor, the flag -.B \-static -can be specified. -Only one of these flags can be specified. - -.SH "LINK EDITOR DEFINED SYMBOLS" -.PP -There is a group of link editor defined symbols for the -.SM MH_EXECUTE, -.SM MH_DYLIB -and -.SM MH_PRELOAD -file types (see the header file <mach-o/ldsyms.h>). Link editor symbols are -reserved; it is an error if an input object file defines such a symbol. -Only those link editor symbols that are referenced by the object file -appear in the output file's symbol table. -.PP -The link editor defined symbol `\_\^\_mh_execute_header' -(`\_mh_execute_header' in C) is reserved when the output file format is -.SM MH_EXECUTE. -This symbol is the address of the Mach header in a Mach-O executable (a -file of type -.SM MH_EXECUTE). -It does not appear in -any other Mach-O file type. It can be used to get to the addresses and -sizes of all the segments and sections in the executable. This can be done by parsing the headers -and load commands (see -.IR Mach-O (5)). -.PP -The link editor defined symbol `\_\^\_mh_dylib_header' -(`\_mh_dylib_header' in C) is reserved when the output file format is -.SM MH_DYLIB. -This symbol is the address of the Mach header in a Mach-O dynamic shared library -(a file of type -.SM MH_DYLIB) -and is a private external symbol. -It does not appear in -any other Mach-O file type. It can be used to get to the addresses and -sizes of all the segments and sections in a dynamic shared library. The -addresses, however, must have the value -.IR _dyld_get_image_vmaddr_slide (3) -added to them. -.PP -The -.SM MH_PRELOAD -file type has link editor defined symbols for the -beginning and ending of each segment, and for the -beginning and ending of each section within a segment. -These names are provided for use in a Mach-O preloaded file, -since it does not have its headers loaded as part of the first segment. -The names of the symbols for a segment's beginning and end -have the form: \_\^\_SEGNAME\_\^\_begin and \_\^\_SEGNAME\_\^\_end, -where \_\^\_SEGNAME is the name of the segment. Similarly, the symbols for -a section have the form: -\_\^\_SEGNAME\_\^\_sectname\_\^\_begin and \_\^\_SEGNAME\_\^\_sectname\_\^\_end, -where \_\^\_sectname is the name of the section in the segment \_\^\_SEGNAME. -These symbols' types are those of the section that the names refer to. -(A symbol that refers to the end of a section actually has, as its value, the beginning address of the next section, but the symbol's type is still that of the section mentioned in the symbol's name.) -.SH OPTIONS -.PP -.I Ld -understands several options. Filenames and -options that refer to libraries (such as -.B \-l -and -.BR \-framework ), -as well as options that create symbols (such as -.B \-u -and -.BR \-i ), -are position-dependent: They define the load order and affect what gets -loaded from libraries. -Some -.I ld_classic -options overlap with compiler options. If the compiler driver -.IR cc (1) -is used to invoke -.I ld_classic , -it maybe necessary to pass the -.IR ld_classic (1) -options to -.IR cc (1) -using -.BR \-Wl,\-option,argument1,argument2 . - -In this release of the static link editor, 64-bit code is processed by a the new -link editor /usr/bin/ld. And it is an error to pass -arch ppc64 or -arch x86_64 -to -.IR ld_classic (1). - -The most common option is: -.TP -.BI \-o " name" -The output file is named -.IR name , -instead of -.BR a.out . - -.PP -The following flags are related to architectures: -.TP -.BI \-arch " arch_type" -Specifies the architecture, -.I arch_type, -for the output file. ``Universal'' input files that do not contain this -specified architecture are ignored. Only one -.BI \-arch " arch_type" -can be specified. See -.IR arch (3) -for the currently known -.IR arch_type s. -If -.I " arch_type" -specifies a certain implementation of an architecture (such as -.BI \-arch " m68040" -or -.BI \-arch " i486" -), the resulting object file has that specific CPU subtype, and it is an -error if any input file has a CPU subtype that will not combine to the CPU subtype -for -.IR " arch_type" . -.IP -The default output file architecture is determined by the first object file to -be linked. If it is a ``thin'' (standard Mach-O) file, or a ``universal'' file -that contains only one architecture, the output file will have the same -architecture. Otherwise, if it is a ``universal'' file -containing an architecture that would execute on the host, then the ``best'' -architecture is used, as defined by what the kernel exec(2) would select. -Otherwise, it is an error, and a -.BI \-arch " arch_type" -must be specified. -For family architectures (like ppc and i386) the CPU subtype of the linked -output is the ALL cpusubtype. For specific CPU subtypes (ppc7400 vs. ppc970), -the resulting CPU subtype of the linked output is to 'combine' the CPU subtypes. -The combining is CPU specific and generally results in the minimum CPU subtype -needed to support all the combined CPU subtypes. -.TP -.B \-arch_multiple -This flag is used by the -.IR cc (1) -driver program when it is run with multiple -.BI \-arch " arch_type" -flags. It instructs programs like -.IR ld_classic (1) -to precede any displayed message with a line stating -the program name, in this case -.IR ld_classic , -and the architecture (from the -.BI \-arch " arch_type" -flag). This helps distinguish which architecture the error messages refer to. -.TP -.B \-force_cpusubtype_ALL -The -.B \-force_cpusubtype_ALL -flag causes the CPU subtype to remain the -.SM ALL -CPU subtype and not to be combined or -changed. This flag has precedence over any -.BI \-arch " arch_type" -flag for a specific implementation. -This is the default for all x86 architectures. -.PP -The following flags are related to using the dynamic link editor and/or -dynamic shared libraries (and any of the features used to implement them): -.TP -.B \-dynamic -Allows use of the features associated with dynamic link editor. The default is -.B \-dynamic. -.TP -.B \-static -Causes those features associated with dynamic link editor to be treated as -an error. (The description for the options that will cause an error if you use them in conjunction with -.B \-static -are marked with the statement "when -.B \-dynamic - is used"). -.TP -.BI \-read_only_relocs " treatment" -Specifies how relocation entries in read-only sections are to be treated when -.B \-dynamic -is used. -To get the best possible sharing, the read-only sections should not have any -relocation entries. -If they do, the dynamic linker will write on the section. -Having relocation entries appear in read-only sections is normally avoided by compiling with the option -.B \-dynamic. -But in such cases non-converted assembly code -or objects not compiled with -.B \-dynamic -relocation entries will appear in read-only sections. -The -.I treatment -can be: -.I error, -.I warning, -or -.I suppress. -Which cause the treatment of relocation entries in read-only sections as either, -errors, warnings, or suppressed messages. -The default is to treat these as errors. -.TP -.BI \-sect_diff_relocs " treatment" -Specifies how section difference relocation enries are to be treated when -.B \-dynamic -and -.B \-execute -are used. -To get the best possible code generation the compiler should not generate code -for executables (MH_EXECUTE format outputs) that have any section difference -relocation entries. The -.IR gcc (1) -compiler has the -.B \-mdynamic-no-pic -flag for generating code for executables. The default treatment is -.I suppress, -where no message is printed. The other treatments are -.I error -or -.I warning. -This option can also be specified by setting the environment variable -.SM LD_SECT_DIFF_RELOCS -to the treatment values. -.TP -.BI \-weak_reference_mismatches " treatment" -Specifies how to treat mismatches of symbol references in the the object files -being linked. Normally the all the undefined symbol references of the object -files being linked should be consistent for each undefined symbol. That is all -undefined symbols should either be weak or non-weak references. The default -treatment is -.I error, -where the link fails with an error message. The other treatments are -.I weak -or -.I non-weak, -which makes mismatched undefined symbol references either weak or non-weak -in the output, respectively. Care must be taken when using the treatment -.I weak -as the use of the non-weak symbol references in an object file may cause the -program to crash when the symbol is not present at execution time. -.TP -.B \-prebind -Have the static linker, -.IR ld_classic (1), -prebind an executable's or dynamic shared library's undefined symbols to the -addresses of the dynamic libraries it is being linked with. -This optimization can only be done if the libraries don't overlap and -no symbols are overridden. -When the resulting program is run and the same libraries are used to run the -program as when the program was linked, the dynamic linker can use the prebound -addresses. -If not, the dynamic linker undoes the prebinding and binds normally. -This option can also be specified by setting the environment variable -.SM LD_PREBIND. -If the environment variable -.SM LD_FORCE_NO_PREBIND -is set both the option -.B \-prebind -.SM LD_PREBIND -environment variable are ignore and the output is not prebound. -Or if the environment variable -.B MACOSX_DEPLOYMENT_TARGET -is set to 10.4 or greater and the output is not a split a dynamic library the -output is not prebound. -.TP -.B \-noprebind -Do not have the static linker, -.IR ld_classic (1), -prebind the output. If this is specified the environment variable -.SM LD_PREBIND -is ignored. -.TP -.B \-prebind_allow_overlap -Have the static linker, -.IR ld_classic (1), -prebind the output even if the addresses of the dynamic libraries it uses -overlap. The resulting output can then have -.IR redo_prebinding (1) -run on it to fix up the prebinding after the overlapping dynamic libraries -have been rebuilt. This option can also be specified by setting the -environment variable -.SM LD_PREBIND_ALLOW_OVERLAP. -.TP -.B \-prebind_all_twolevel_modules -Have the static linker, -.IR ld_classic (1), -mark all modules from prebound two-level namespace dynamic libraries as used -by the program even if they are not statically referenced. This can provide -improved launch time for programs like Objective-C programs that use symbols -indirectly through NIB files. This option can also be specified by setting the -environment variable -.SM LD_PREBIND_ALL_TWOLEVEL_MODULES. -.TP -.B \-noprebind_all_twolevel_modules -Don't have the static linker, -.IR ld_classic (1), -mark all modules from prebound two-level namespace dynamic libraries as used -by the program. This flag overrides the setting of the -environment variable -.SM LD_PREBIND_ALL_TWOLEVEL_MODULES. -.TP -.B \-nofixprebinding -Have the static linker, -.IR ld_classic (1), -mark the executable so that the dynamic linker will never notify the prebinding -agent if this launched and its prebinding is out of date. This is used when -building the prebinding agent itself. -.PP -The following flags are related to libraries: -.TP -.BI \-l x -This -option is an abbreviation for the library name -.RI `lib x .a', -where -.I x -is a string. -If -.B \-dynamic -is specified the abbreviation for the library name is first search as -.RI `lib x .dylib' -and then -.RI `lib x .a' -is searched for. -.I ld_classic -searches for libraries first in any directories -specified with -.B \-L -options, then in any directories specified in the colon separated set of paths -in the environment variable LD_LIBRARY_PATH, then the standard directories -.BR /lib , -.BR /usr/lib , -and -.BR "/usr/local/lib" . -A library is searched when its name is encountered, -so the placement of the -.B \-l -flag is significant. If string -.I x -is of the form -.IR x .o, -then that file is searched for in the same places, but without prepending -`lib' or appending `.a' or `.dylib' to the filename. -.TP -.BI \-weak-l x -This is the same as the -.BI \-l x -but forces the library and all references to it to be marked as weak imports. -Care must be taken when using this as the use of the non-weak symbol references -in an object file may cause the program to crash when the symbol or library is -not present at execution time. -.TP -.BI \-weak_library " file_name_path_to_library" -This is the same as listing a file name path to a library on the link line -except that it forces the library and all references to it to be marked as -weak imports. -Care must be taken when using this as the use of the non-weak symbol references -in an object file may cause the program to crash when the symbol or library is -not present at execution time. -.TP -.BI \-L dir -Add -.I dir -to the list of directories in which to search for libraries. -Directories specified with -.B \-L -are searched before the standard directories. -.TP -.B \-Z -Do not search the standard directories when searching for libraries. -.TP -.BI "\-syslibroot " rootdir -Prepend -.I rootdir -to the standard directories when searching for libraries or frameworks. -.TP -.B \-search_paths_first -By default when the -.B \-dynamic -flag is in effect, the -.BI \-l x -and -.BI \-weak-l x -options first search for a file of the form -.RI `lib x .dylib' -in each directory in the library search path, then a file of the form -.RI `lib x .a' -is searched for in the library search paths. -This option changes it so that in each path -.RI `lib x .dylib' -is searched for then -.RI `lib x .a' -before the next path in the library search path is searched. -.TP -.BI "\-framework " name[,suffix] -Specifies a framework to link against. Frameworks are dynamic shared libraries, -but they are stored in different locations, and therefore must be searched for -differently. When this option is specified, -.I ld_classic -searches for framework `\fIname\fR.framework/\fIname\fR' -first in any directories -specified with the -.B \-F -option, then in the standard framework directories -.BR /Library/Frameworks , -.BR /Network/Library/Frameworks , -and -.BR "/System/Library/Frameworks" . -The placement of the -.B \-framework -option is significant, as it determines when and how the framework is searched. -If the optional suffix is specified the framework is first searched for the -name with the suffix and then without. -.TP -.BI "\-weak_framework " name[,suffix] -This is the same as the -.BI "\-framework " name[,suffix] -but forces the framework and all references to it to be marked as weak imports. -Care must be taken when using this as the use of the non-weak symbol references -in an object file may cause the program to crash when the symbol or framework is -not present at execution time. -.TP -.BI \-F dir -Add -.I dir -to the list of directories in which to search for frameworks. -Directories specified with -.B \-F -are searched before the standard framework directories. -.TP -.B \-ObjC -Loads all members of static archive libraries that define an Objective C class or a category. This option does not apply to dynamic shared libraries. -.TP -.B \-all_load -Loads all members of static archive libraries. -This option does not apply to dynamic shared -libraries. -.TP -.BI \-dylib_file " install_name:file_name" -Specifies that a dynamic shared library is in a different location than its standard location. Use this option when you link with a library that is dependent on a dynamic library, and the dynamic library is in a location other than its default location. -.I install_name -specifies the path where the library normally resides. -.I file_name -specifies the path of the library you want to use instead. -For example, if you link to a library that depends upon the dynamic library libsys and you have libsys installed in a nondefault location, you would use this option: -\fB\-dylib_file /lib/libsys_s.A.dylib:/me/lib/libsys_s.A.dylib\fR. -.TP -.BI \-executable_path " path_name" -Specifies that -.I path_name -is used to replace -.I @executable_path -for dependent libraries. - -.PP -The following options specify the output file format (the file type): -.TP -.B "\-execute" -Produce a Mach-O demand-paged executable format file. The headers are placed -in the first segment, and all segments are padded to the segment alignment. -This has a file type of -.SM MH_EXECUTE. -This is the default. If no segment address is specified at address zero, a -segment with no protection (no read, write, or execute permission) is created -at address zero. -This segment, whose size is that of the segment -alignment, is named -.SM ``_\|_PAGEZERO''. -This option was previously named -.BR "\-Mach" , -which will continue to be recognized. -.TP -.B \-object -Produce a Mach-O file in the relocatable object file format that is -intended for execution. This differs from using the -.B \-r -option in that it defines common symbols, does not allow undefined symbols and -does not preserve relocation entries. This has a file type of -.SM MH_OBJECT. -In this format all sections are placed in one unnamed segment with all -protections (read, write, execute) allowed on that segment. This is intended -for extremely small programs that would otherwise be large due to segment -padding. In this format, and all -.SM non-MH_EXECUTE -formats, the link editor -defined symbol ``\_\^\_mh_execute_header'' is not defined since the headers are -not part of the segment. This format file can't be used with the dynamic -linker. -.TP -.B \-preload -Produce a Mach-O preloaded executable format file. The headers are not placed -in any segment. All sections are placed in their proper segments and they are -padded to the segment alignment. This has a file type of -.SM MH_PRELOAD. -This option was previously -.BR "\-p" , -which will continue to be recognized. -.TP -.B "\-dylib" -Produce a Mach-O dynamically linked shared library format file. The headers are -placed in the first segment. All sections are placed in their proper segments -and they are padded to the segment alignment. This has a file type of -.SM MH_DYLIB. -This option is used by -.IR libtool (1) -when its -.B \-dynamic -option is specified. -.TP -.B "\-bundle" -Produce a Mach-O bundle format file. The headers are placed in the first -segment. All sections are placed in their proper segments -and they are padded to the segment alignment. This has a file type of -.SM MH_BUNDLE. -.TP -.B "\-dylinker" -Produces a Mach-O dynamic link editor format file. The headers are placed in the -first segment. All sections are placed in their proper segments, and they are -padded to the segment alignment. This has a file type of -.SM MH_DYLINKER. -.TP -.B \-fvmlib -Produce a Mach-O fixed VM shared library format file. The headers are placed -in the first segment but the first section in that segment will be placed on -the next segment alignment boundary in that segment. All sections are placed -in their proper segments and they are padded to the segment alignment. -This has a file type of -.SM MH_FVMLIB. - -.PP -The following flags affect the contents of the output file: -.TP -.B \-r -Save the relocation information in the output file -so that it can be the subject of another -.I ld_classic -run. The resulting file type is a Mach-O relocatable file -.SM (MH_OBJECT) -if not otherwise specified. -This flag also prevents final definitions from being -given to common symbols, -and suppresses the `undefined symbol' diagnostics. -.TP -.B \-d -Force definition of common storage even if the -.B \-r -option is present. This option also forces link editor defined symbols to be defined. -This option is assumed when there is a dynamic link editor load command in the input -and -.B \-r -is not specified. - -.PP -The following flags support segment specifications: -.TP -.BI "\-segalign" " value" -Specifies the segment alignment. -.I value -is a hexadecimal number that must be an integral power of 2. -The default is the target pagesize (currently 1000 hex for the PowerPC and -i386). -.TP -.BI "\-seg1addr" " addr" -Specifies the starting address of the first segment in the output file. -.I addr -is a hexadecimal number and must be a multiple of the segment alignment. -This option can also be specified as -.B "\-image_base." -.TP -.BI "\-segaddr" " name addr" -Specifies the starting address of the segment named -.I name -to be -.I addr. -The address must be a hexadecimal number that is a multiple of the segment alignment. -.TP -.BI "\-segs_read_only_addr" " addr" -Specifies the starting address of the read-only segments in a dynamic shared -library. When this option is used the dynamic shared library is built such -that the read-only and read-write segments are split into separate address -ranges. By default the read-write segments are 256meg (0x10000000) after -the read-only segments. -.I addr -is a hexadecimal number and must be a multiple of the segment alignment. -.TP -.BI "\-segs_read_write_addr" " addr" -Specifies the starting address of the read-write segments in a dynamic shared -library. When this option is used the -.B \-segs_read_only_addr -must also be used (see above). -.I addr -is a hexadecimal number and must be a multiple of the segment alignment. -.TP -.BI "\-seg_addr_table" " filename" -For dynamic shared libraries the -.B "\-seg1addr" -or the pair of -.B "\-segs_read_only_addr" -and -.B "\-segs_read_write_addr" -are specified by an entry in the segment address table in -.I filename -that matches the install name of the library. -The entries in the table are lines containing either a single hex address and an -install name or two hex addresses and an install name. In the first form the -single hex address is used as the -.B "\-seg1addr". -In the second form the first address is used as the -.B "\-segs_read_only_addr" -address and the second address is used as the -.B "\-segs_read_write_addr" -address. -This option can also be specified by setting the environment variable -.SM LD_SEG_ADDR_TABLE. -If the environment variable is set then any -.BR "\-seg1addr" , -.BR "\-segs_read_only_addr" , -.B "\-segs_read_write_addr" -and -.B "\-seg_addr_table" -options are ignored and a warning is printed. -.TP -.BI "\-seg_addr_table_filename" " pathname" -Use -.B pathname -instead of the install name of the library for matching an entry in the segment -address table. -.TP -.BI "\-segprot" " name max init" -Specifies the maximum and initial virtual memory protection of the named -segment, -.I name, -to be -.I max -and -.I init -,respectively. The values for -.I max -and -.I init -are any combination of the characters `r' (for read), `w' (for write), -`x' (for execute) and '\-' (no access). The default is `rwx' for the maximum -protection for all segments for PowerPC architecures and `rw` for the all Intel -architecures. -The default for the initial protection for all segments is `rw' unless the -segment contains a section which contains some machine instructions, in which -case the default for the initial protection is `rwx' (and for Intel -architecures it also sets the maximum protection to `rwx' in this case). -The default for the initial protection for the -.SM "``_\|_TEXT''" -segment is `rx' (not writable). -.TP -.B \-seglinkedit -Create the link edit segment, named -.SM "``_\|_LINKEDIT''" -(this is the default). -This segment contains all the link edit information (relocation information, -symbol table, string table, etc.) in the object file. If the segment protection -for this segment is not specified, the initial protection is not writable. -This can only be specified when the output file type is not -.SM MH_OBJECT -and -.SM MH_PRELOAD -output file types. To get at the contents of this section, the Mach header -and load commands must be parsed from the link editor defined symbols like -`\_\^\_mh_execute_header' (see -.IR Mach-O (5)). -.TP -.B \-noseglinkedit -Do not create the link edit segment (see -.B \-seglinkedit -above). -.TP -.BI "\-pagezero_size" " value" -Specifies the segment size of _\|_PAGEZERO to be of size -.IR value , -where -.I value -is a hexadecimal number rounded to the segment alignment. -The default is the target pagesize (currently, 1000 hexadecimal for the PowerPC -and for i386). -.TP -.BI "\-stack_addr" " value" -Specifies the initial address of the stack pointer -.IR value , -where -.I value -is a hexadecimal number rounded to the segment alignment. -The default segment alignment is the target pagesize (currently, 1000 -hexadecimal for the PowerPC and for i386). -If -.B \-stack_size -is specified and -.B \-stack_addr -is not, a default stack address specific for the architecture being linked will -be used and its value printed as a warning message. -This creates a segment named _\|_UNIXSTACK. Note that the initial stack address -will be either at the high address of the segment or the low address of the -segment depending on which direction the stack grows for the architecture being -linked. -.TP -.BI "\-stack_size" " value" -Specifies the size of the stack segment -.IR value , -where -.I value -is a hexadecimal number rounded to the segment alignment. -The default segment alignment is the target pagesize (currently, 1000 -hexadecimal for the PowerPC and for i386). -If -.B \-stack_addr -is specified and -.B \-stack_size -is not, a default stack size specific for the architecture being linked will be -used and its value printed as a warning message. -This creates a segment named _\|_UNIXSTACK . -.TP -.B \-allow_stack_execute -Marks executable so that all stacks in the task will be given stack execution -privilege. This includes pthread stacks. - -.PP -The following flags support section specifications: -.TP -.BI "\-sectcreate" " segname sectname file" -The section -.I sectname -in the segment -.I segname -is created from the contents of -.I file. -The combination of -.I segname -and -.I sectname -must be unique; there cannot already be a section -.I (segname,sectname) -in any input object file. -This option was previously called -.BR "\-segcreate" , -which will continue to be recognized. -.TP -.BI "\-sectalign" " segname sectname value" -The section named -.I sectname -in the segment -.I segname -will have its alignment set to -.IR value , -where -.I value -is a hexadecimal number that must be an integral power of 2. -This can be used to set the alignment of a section created from a file, or to -increase the alignment of a section from an object file, or to set the maximum -alignment of the -.SM (_\|_DATA,_\|_common) -section, where common symbols are defined -by the link editor. Setting the alignment of a literal section causes the -individual literals to be aligned on that boundary. If the section -alignment is not specified by a section header in an object file or on the -command line, it defaults to 10 (hex), indicating 16-byte alignment. -.TP -.BI "\-sectorder" " segname sectname orderfile" -The section -.I sectname -in the segment -.I segname -of the input files will be broken up into blocks associated with -symbols in the section. The output section will be created by ordering -the blocks as specified by the lines in the -.I orderfile. -These blocks are aligned to the output file's section alignment for this -section. Any section can be ordered in the output file except symbol pointer and symbol stub sections. -.IP -For non-literal sections, each line of the -.I orderfile -contains an object name and a symbol name, separated by a single colon (':'). -Lines that start with # are ignored and treated as comments. -If the object file is -in an archive, the archive name, followed by a single colon, must precede the -object file name. The object file names and archive names should be exactly the -names as seen by the link editor, but if not, the link editor attempts to match -up the names the best it can. -For non-literal sections, the easiest way to generate an order file is -with the ``\f3\-jonls +\f2segname sectname\f1'' options to -.IR nm (1). -.IP -The format of the -.I orderfile -for literal sections is specific to each type of literal section. For C -string literal sections, each line of the order file contains one literal C -string, which may include ANSI C escape sequences. For four-byte literal -sections, the order file format is one 32-bit hex number with a leading 0x -per -line, with the rest of the line treated as a comment. For eight-byte literal -sections, the order file has two 32-bit hex numbers per line; each number -has a leading 0x, the two numbers are separated by white -space, and the rest of the line is treated as a comment. -For literal pointer sections, the lines in the order file represent -pointers, one per line. A literal pointer is represented by the name of -the segment that contains the literal being pointed to, followed by the -section name, followed by the literal. These three strings are separated -by colons with no extra white space. -For all the literal sections, each line in the the order file is simply entered -into the literal section and will appear in the output file in the same order -as in the -order file. There is no check to see whether the literal is present -in the loaded objects. -For literal sections, the easiest way to generate an order file is with -the ``\f3\-X \-v \-s \f2segname sectname\f1'' options to -.IR otool (1). -.TP -.B \-sectorder_detail -When using the -.B \-sectorder -option, any pairs of object file names and symbol names that are found in -the loaded objects, but not specified in the -.IR orderfile , -are placed last in the output file's section. These pairs are ordered by -object file (as the filenames appear -on the command line), with the different symbols from a given object -file being ordered by -increasing symbol address (that is, the order -in which the symbols occurred in the object file, -not their order in the symbol table). By default, the link editor displays a summary -that simply shows the number -of symbol names found in the loaded objects but not in the -.IR orderfile , -as well as the number of symbol names listed in the -.I orderfile -but not found in the loaded objects. (The summary is omitted if both values -are zero.) To instead produce a detailed list of these symbols, use the -.B \-sectorder_detail -flag. If an object file-symbol name pair is listed multiple times, a -warning is generated, and the first occurrence is used. -.TP -.BI "\-sectobjectsymbols" " segname sectname" -This causes the link editor to generate local symbols in the section -.I sectname -in the segment -.IR segname . -Each object file that has one of these sections will have a local -symbol created -whose name is that of the object file, or of the member of the archive. -The symbol's value will be the first address where that object file's section -was loaded. The symbol has the type N_SECT and its section number is the -the same as that of the section -.I (segname,sectname) -in the output file. -This symbol will be placed in the symbol table just before all other local -symbols -for the object file. This feature is typically used where the section is -.SM (\_\^\_TEXT,\_\^\_text), -in order to help the debugger debug object files produced by old versions of -the compiler or by non-Apple compilers. - -.PP -The following flags are related to name spaces: -.TP -.B \-twolevel_namespace -Specifies the output to be built as a two-level namespace image. -This option can also be specified by setting the environment variable -.SM LD_TWOLEVEL_NAMESPACE. -This is the default. -.TP -.B \-flat_namespace -Specifies the output to be built as a flat namespace image. -This is not the default (but was the default in MacOS X 10.0). -.TP -.B \-force_flat_namespace -Specifies the executable output to be built and executed treating all its -dynamic libraries as flat namespace images. This marks the executable so that -the dynamic link editor treats all dynamic libraries as flat namespace -images when the program is executed. -.TP -.BI \-bundle_loader " executable" -This specifies the -.I executable -that will be loading the bundle output file being linked. Undefined symbols -from the bundle are checked against the specified executable like it was one of -the dynamic libraries the bundle was linked with. If the bundle being created -with -.B \-twolevel_namespace -in effect then the searching of the executable for -symbols is based on the placement of the -.B \-bundle_loader -flag relative to the dynamic libraries. If the the bundle being created with -.B \-flat_namespace -then the searching of the executable is done before all dynamic libraries. -.TP -.B \-private_bundle -This allows symbols defined in the output to also be defined in executable in -the -.B \-bundle_loader -argument -when -.B \-flat_namespace -is in effect. -This implies that the bundle output file being created is going to be loaded by -the executable with the -.B NSLINKMODULE_OPTION_PRIVATE -option to -.IR NSLinkModule (3). -.TP -.B \-twolevel_namespace_hints -Specifies to create the output with the two-level namespace hints table to be -used by the dynamic linker. This is the default except when the -.B \-bundle -flag is specified. If this is used when the -.B \-bundle -flag is specified the bundle will fail to load on a MacOS X 10.0 system with a -malformed object error. -.TP -.BI \-multiply_defined " treatment" -Specifies how multiply defined symbols in dynamic libraries when -.B \-twolevel_namespace -is in effect are to be treated. -.I treatment -can be: -.I error, -.I warning, -or -.I suppress. -Which cause the treatment of multiply defined symbols in dynamic libraries -as either, errors, warnings, or suppresses the checking of multiply symbols -from dynamic libraries when -.B \-twolevel_namespace -is in effect. -The default is to treat multiply defined symbols in dynamic libraries as -warnings when -.B \-twolevel_namespace -is in effect. -.TP -.BI \-multiply_defined_unused " treatment" -Specifies how unused multiply defined symbols in dynamic libraries when -.B \-twolevel_namespace -is in effect are to be treated. -An unused multiply defined symbol is one in which there is a symbol defined in -the output that is also defined in the dynamic libraries the output is linked -with but the symbol in the dynamic library is not used by any reference in the -output. -.I treatment -can be: -.I error, -.I warning, -or -.I suppress. -The default for unused multiply defined symbols is to suppress these messages. -.TP -.B -nomultidefs -specifying this flag marks the umbrella being created such that the dynamic -linker is guaranteed that no multiple definitions of symbols in the umbrella's -sub-images will ever exist. This allows the dynamic linker to always use the -two-level namespace lookup hints even if the timestamps of the sub-images -do not match. This flag implies -.BI \-multiply_defined " error". - -.PP -The following flags are related to symbols. These flags' arguments -are external symbols whose names have `_' prepended to the C, -.SM FORTRAN, -or Pascal variable name. -.TP -.BI \-y sym -Display each file in which -.I sym -appears, its type, and whether the file defines or references it. Any -multiply defined symbols are automatically -traced. Like most of the other symbol-related flags, -.B \-y -takes only one argument; the flag may be specified more than once in the -command line to trace more than one symbol. -.TP -.BI \-Y " number" -For the first -.I number -undefined symbols, displays each file in which the symbol appears, its type and whether the file defines or references it (that is, the same style of output produced by the -.B \-y -option). To keep the output manageable, this option displays at most -.I number -references. -.TP -.B \-keep_private_externs -Don't turn private external symbols into static symbols, but rather leave them -as private external in the resulting output file. -.TP -.B \-m -Don't treat multiply defined symbols from the linked objects as a hard error; -instead, simply print a warning. The first linked object defining such a symbol -is used for linking; its value is used for the symbol in the symbol table. The -code and data for all such symbols are copied into the output. The duplicate -symbols other than the first symbol may still end up being used in the resulting -output file through local references. This can still produce a resulting output -file that is in error. This flag's use is strongly discouraged! -.TP -.B \-whyload -Indicate why each member of a library is loaded. In other words, indicate -which currently undefined symbol is being resolved, causing that -member to be loaded. This in combination with the above -.BI \-y sym -flag can help determine exactly why a link edit is failing due to multiply -defined symbols. -.B -.TP -.BI \-u " sym" -Enter the argument -.I sym -into the symbol table as an undefined symbol. This is useful -for loading wholly from a library, since initially the symbol -table is empty and an unresolved reference is needed -to force the loading of the first object file. -.TP -.BI \-e " sym" -The argument -.I sym -is taken to be the symbol name of the entry point of -the resulting file. By default, the entry point is the address of the -first section in the first segment. -.TP -.BI \-i definition:indirect -Create an indirect symbol for the symbol name -.I definition -which is defined to be the same as the symbol name -.I indirect -(which is taken to be undefined). When a definition of the symbol named -.I indirect -is linked, both symbols will take on the defined type and value. -.IP -This option overlaps with a compiler option. -If you use the compiler driver -.IR cc (1) -to invoke \fIld_classic\fR, -invoke this option in this way: -.BI \-Wl,\-i definition:indirect. - -.TP -.BI \-undefined " treatment" -Specifies how undefined symbols are to be treated. -.I treatment -can be: -.I error, -.I warning, -or -.I suppress. -Which cause the treatment of undefined symbols as either, errors, warnings, or -suppresses the checking of undefined symbols. -The default is to treat undefined symbols as errors. -When the environment variable -.B MACOSX_DEPLOYMENT_TARGET -is set to -.B 10.3 -or higher then -.BI \-undefined " dynamic_lookup" -can also be used to allow any undefined symbols to be looked up dynamically at -runtime. Use of a binary built with this flag requires a system with a dynamic -linker from Mac OS X 10.3 or later. -The flag -.BI \-undefined " define_a_way" -can also be used to cause the static linker to create a private definition for -all undefined symbols. This flag should only be used if it is known that the -undefined symbols are not referenced as any use of them may cause a crash. -.TP -.BI \-U " sym" -Allow the symbol -.I sym -to be undefined, even if the -.B \-r -flag is not given. Produce an executable file if the only undefined -symbols are those specified with -.BR \-U. -.IP -This option overlaps with a compiler option. -If you use the compiler driver -.IR cc (1) -to invoke \fIld_classic\fR, -invoke this option in this way: -.BI \-Wl,\-U, sym. -.TP -.B \-bind_at_load -Causes the output file to be marked such that the dynamic linker will bind all -undefined references when the file is loaded or launched. - -.PP -The following flags are related to stripping link edit information. -This information can also be removed by -.IR strip (1), -which uses the same options. (The -exception is the -.B \-s -flag below, but this is the same as -.IR strip (1) -with no arguments.) -The following flags are listed in decreasing level of stripping. -.TP -.B \-s -Completely strip the output; that is, remove the symbol table -and relocation information. -.TP -.B \-x -Strips the non-global symbols; only saves external symbols. -.IP -This option overlaps with a compiler option. -If you use the compiler driver -.IR cc (1) -to invoke \fIld_classic\fR, -invoke this option in this way: -.B \-Wl,\-x. -.TP -.B \-S -Strip debugging symbols; only save local and global symbols. -.TP -.B \-X -Strip local symbols whose names begin with `L'; save all other symbols. -(The compiler and assembler currently strip these internally-generated -labels by default, so they generally do not appear in object files -seen by the link editor.) -.TP -.B \-Sp -Strip, edit and add debugging symbols so the debugger can used most of the -debugging symbols from the object files. -.TP -.B \-Si -Strip duplicate debugging symbols from include files. This is -the default. -.TP -.B \-b -Strip the base file's symbols from the output file. (The base file -is given as the argument to the -.B \-A -option.) -.IP -This option overlaps with a compiler option. -If you use the compiler driver -.IR cc (1) -to invoke \fIld_classic\fR, -invoke this option in this way: -.B \-Wl,\-b. -.TP -.B \-Sn -Don't strip any symbols. -.TP -.BI \-exported_symbols_list " filename" -The specified -.I filename -contains lists of global symbol names that will remain as global symbols in the -output file. All other global symbols will be treated as if they were marked as -.I __private_extern__ -and will not be global in the output file. The symbol names listed in -.I filename -must be one per line. Leading and trailing white space are not part of the -symbol name. Lines starting with # are ignored, as are lines with only white -space. -.TP -.BI \-unexported_symbols_list " filename" -The specified -.I filename -contains lists of global symbol names that will not remain as global symbols in -the output file. The symbols will be treated as if they were marked as -.I __private_extern__ -and will not be global in the output file. The symbol names listed in -.I filename -must be one per line. Leading and trailing white space are not part of the -symbol name. Lines starting with # are ignored, as are lines with only white -space. -.TP -.BI \-no_uuid -Do not emit an LC_UUID load command in the linked output file. - -.TP -.B -dead_strip -Remove blocks of code and data that are unreachable by the entry point or -exported symbols. -.TP -.B -no_dead_strip_inits_and_terms -When specified along with -.B -dead_strip -cause all constructors and destructors to never be dead stripped. - -.PP -The remaining options are infrequently used: -.TP -.B \-v -Print the version of the linker. -.TP -.B \-w -Suppresses all warning messages. -.TP -.B \-no_arch_warnings -Suppresses warning messages about files that have the wrong architecture for the -.B \-arch -flag. -.TP -.B \-arch_errors_fatal -Cause the errors having to do with files that have the wrong architecture to be -fatal and stop the link editor. -.TP -.B \-M -Produce a load map, listing all the segments and sections. The list -includes the address where each input file's section appears in the -output file, as well as the section's size. -.IP -This option overlaps with a compiler option. -If you use the compiler driver -.IR cc (1) -to invoke \fIld_classic\fR, -invoke this option in this way: -.B \-Wl,\-M. -.TP -.B \-whatsloaded -Display a single line listing each object file that is -loaded. Names of objects in archives have the form libfoo.a(bar.o). -.TP -.BI \-filelist " listfile[,dirname]" -Specifies that the linker should link the files listed in -.I listfile . -This is an alternative to listing the files on the command line. The file names are listed one per line separated -only by newlines. (Spaces and tabs are assumed to be part of the file name.) -If the optional directory name, -.I dirname -is specified, it is prepended to each name in the list file. -.TP -.BI "\-headerpad" " value" -Specifies the minimum amount of space ("padding") following -the headers for the -.SM MH_EXECUTE -format and all output file types with the dynamic linker. -.I value -is a hexadecimal number. -When a segment's size is rounded up to the segment alignment, there -is extra space left over, which is placed between the headers and the sections, rather than at the end of the segment. The -.B headerpad -option specifies the minimum size of this padding, -which can be useful if the headers will be altered later. -The default value is the larger of 2 * sizeof(struct section) so the program -/usr/bin/objcunique can always add two section headers, or if the output is an -MH_EXECUTE filetype and -.B \-prebind -is specified 3 times the size of the LC_PREBOUND_DYLIB load commands. -The actual amount of pad will be as large as the amount of the first -segment's round-off. -(That is, take the total size of the first segments' -headers and non-zerofill sections, round this size -up to the segment alignment, -and use the difference between the rounded -and unrounded sizes as the minimum amount of padding.) -.TP -.B \-headerpad_max_install_names -Add to the header padding enough space to allow changing all dynamic shared -library paths recorded in the output file to be changed to MAXPATHLEN in length. -.TP -.B \-t -Trace the progress of the link editor; display the name of each file -that is -loaded as it is processed in the first and second pass of the link -editor. -.TP -.BI \-A " basefile" -Incremental loading: linking is to be done in a manner -that lets the resulting object be read into an already executing -program, the -.IR basefile . -.I basefile -is the name of a file whose symbol table will be taken as a basis -on which to define additional symbols. -Only newly linked material will be entered into the -.BR a.out -file, but the new symbol table will reflect -every symbol defined in the base file and the newly linked files. -Option(s) to specify the addresses of the segments are typically -needed, since -the default addresses tend to overlap with the -.I basefile. -The default format of the object file is -.SM MH_OBJECT. -Note: It is strongly recommended that this option NOT be used, -because the dyld package described in -.IR dyld (3) -is a much easier alternative. -.TP -.BI \-dylib_install_name " name" -For dynamic shared library files, specifies the name of the file -the library will be installed in for programs that use it. If this is not -specified, the name specified in the -.BI \-o " name" -option will be used. -This option is used as the -.IR libtool (1) -.BI \-install_name " name" -option when its -.B \-dynamic -option is specified. -.TP -.BI \-umbrella " framework_name" -Specifies this is a subframework where -.I framework_name -is the name of the umbrella framework this subframework is a part of. Where -.I framework_name -is the same as the argument to the -.BI \-framework " framework_name" -option. This subframework can then only be linked into the umbrella framework -with the same -.I framework_name -or another subframework with the same umbrella framework name. Any other -attempt to statically link this subframework directly will result in an error -stating to link with the umbrella framework instead. When building the umbrella -framework that uses this subframework no additional options are required. -However the install name of the umbrella framework, required to be specified -with -.BR \-dylib_install_name , -must have the proper format for an install name of a framework for the -.I framework_name -of the umbrella framework to be determined. -.TP -.BI \-allowable_client " client_name" -Specifies that for this subframework the -.I client_name -can link with this subframework without error even though it is not part of -the umbrella framework that this subframework is part of. The -.I client_name -can be another framework name or a name used by bundles (see the -.BI \-client_name " client_name" -option below). -.TP -.BI \-client_name " client_name" -Specifies the -.I client_name -of a bundle for checking of allowable clients of subframeworks (see the -.BI \-allowable_client " client_name" -option above). -.TP -.BI \-sub_umbrella " framework_name" -Specifies that the -.I framework_name -being linked by a dynamic library is to be treated as one of the -subframeworks with respect to twolevel namespace. -.TP -.BI \-sub_library " library_name" -Specifies that the -.I library_name -being linked by a dynamic library is to be treated as one of the -sublibraries with respect to twolevel namespace. For example the -.I library_name -for -.I /usr/lib/libobjc_profile.A.dylib -would be -.I libobjc. -.TP -.BI \-init " sym" -The argument -.I sym -is taken to be the symbol name of the dynamic shared library initialization -routine. If any module is used from the dynamic library the library -initialization routine is called before any symbol is used from the library -including C++ static initializers (and #pragma CALL_ON_LOAD routines). -.TP -.B \-run_init_lazily -This option is obsolete. -.TP -.BI \-dylib_compatibility_version " number" -For dynamic shared library files, this specifies the compatibility version number -of the library. When a library is used by a program, the compatibility version is checked -and if the program's version is greater that the library's version, it is an error. -The format of -.I number -is -.I X[.Y[.Z]] -where -.I X -must be a positive non-zero number less than or equal to 65535, and -.I .Y -and -.I .Z -are optional and if present must be non-negative numbers less than or -equal to 255. -If the compatibility version number is not specified, it has a -value of 0 and no checking is done when the library is used. -This option is used as the -.IR libtool (1) -.BI \-compatibility_version " number" -option -when its -.B \-dynamic -option is set. -.TP -.BI \-dylib_current_version " number" -For dynamic shared library files, specifies the current version number -of the library. The current version of the library can be obtained -programmatically by the user of the library so it can determine exactly which version of the library it is using. -The format of -.I number -is -.I X[.Y[.Z]] -where -.I X -must be a positive non-zero number less than or equal to 65535, and -.I .Y -and -.I .Z -are optional and if present must be non-negative numbers less than or -equal to 255. -If the version number is not specified, it has a -value of 0. -This option is used as the -.IR libtool (1) -.BI \-current_version " number" -option when its -.B \-dynamic -option is set. -.TP -.BI \-single_module -When building a dynamic library build the library so that it contains only -one module. -.TP -.BI \-multi_module -When building a dynamic library build the library so that it contains one -module for each object file linked in. This is the default. -.TP -.BI \-dylinker_install_name " name" -For dynamic link editor files, specifies the name of the file -the dynamic link editor will be installed in for programs that use it. -.TP -.BI \-macosx_version_min " version" -This overrides the -.B MACOSX_DEPLOYMENT_TARGET -environment variable (see below). Unlike other linker options, this one may -be specified multiple times; only the last occurrence is effective. -.PP -The following environment variable is used to control the use of incompatible -features in the output with respect to Mac OS X releases. -.TP -.B MACOSX_DEPLOYMENT_TARGET -This is set to indicate the oldest Mac OS X version that that the output is to -be used on. When this is set to a release that is older than the current -release features that are incompatible with that release will be disabled. If -a feature is seen in the input that can't be in the output due to this setting -a warning is issued. The current allowable values for this are -.B 10.1, -.B 10.2 -.B 10.3, -and -.B 10.4 -with the default being -.B 10.4 -for the i386 architecture and -.B 10.1 -for all other architectures. -.PP -The following environment variables are used by Apple's Build and Integration -team: -.TP -.B LD_TRACE_ARCHIVES -When this is set it causes a message of the form ``[Logging for XBS] -Used static archive: -.I filename'' -for each static archive that has members linked into the output. -.TP -.B LD_TRACE_DYLIBS -When this is set it causes a message of the form ``[Logging for XBS] -Used dynamic library: -.I filename'' -for each dynamic library linked into the output. -.TP -.B RC_TRACE_PREBINDING_DISABLED -When this is set it causes a message of the form ``[Logging for XBS -prebinding disabled for -.I filename -because -.I reason''. -Where -.I filename -is the value of the -.B \-final_output -argument if specified or the value of the -.B \-o -argument. -.TP -.BI \-final_output " filename" -The argument -.I filename -is used in the above message when RC_TRACE_PREBINDING_DISABLED is set. -.TP -.B LD_TRACE_FILE -When this is set, messages displayed due to the -.B LD_TRACE_ARCHIVES -, -.B LD_TRACE_DYLIBS -, and -.B LD_TRACE_PREBINDING_DISABLED -environment variables are printed to the file whose path is specified -by this variable instead of stdout. -.TP -.B LD_SPLITSEGS_NEW_LIBRARIES -When set and -.B MACOSX_DEPLOYMENT_TARGET -is set to 10.4 or greater and the output is a dynamic library, and if the -install name of the library is not listed the segment address table, and if the -environment variable -.B LD_UNPREBOUND_LIBRARIES -is set with a file name with a list of library install names and the install -name is not listed, then this is built as a split shared library. - -.PP -Options available in early versions of the Mach-O link editor -may no longer be supported. - -.SH FILES -.ta \w'/Network/Library/Frameworks/*.framework/*\ \ 'u -/lib/lib*.{a,dylib} libraries -.br -/usr/lib/lib*.{a,dylib} -.br -/usr/local/lib/lib*.{a,dylib} -.br -/Library/Frameworks/*.framework/* framework libraries -.br -/Network/Library/Frameworks/*.framework/* framework libraries -.br -/System/Library/Frameworks/*.framework/* framework libraries -.br -a.out output file -.SH "SEE ALSO" -as(1), ar(1), cc(1), libtool(1), ranlib(1), nm(1), otool(1) lipo(1), ld(1), -arch(3), dyld(3), Mach-O(5), strip(1), redo_prebinding(1) diff --git a/i386/util/machOconv.c b/i386/util/machOconv.c old mode 100755 new mode 100644 index 5e31c44..540efe3 --- a/i386/util/machOconv.c +++ b/i386/util/machOconv.c @@ -34,19 +34,18 @@ int infile, outfile; struct mach_header mh; -void * cmds; +void * cmds; -static bool swap_ends; +static bool swap_ends; static unsigned long swap(unsigned long x) { - if (swap_ends) - return OSSwapInt32(x); - - return x; + if (swap_ends) return OSSwapInt32(x); + else return x; } -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { kern_return_t result; vm_address_t data; @@ -54,130 +53,138 @@ int main(int argc, char *argv[]) char * cp; if (argc == 2) - { - infile = open(argv[1], O_RDONLY); - - if (infile < 0) - goto usage; - - outfile = fileno(stdout); + { + infile = open(argv[1], O_RDONLY); + if (infile < 0) goto usage; + outfile = fileno(stdout); } else if (argc == 3) - { - infile = open(argv[1], O_RDONLY); - - if (infile < 0) - goto usage; - - outfile = open(argv[2], O_WRONLY|O_CREAT|O_TRUNC, 0644); - - if (outfile < 0) - goto usage; + { + infile = open(argv[1], O_RDONLY); + if (infile < 0) goto usage; + outfile = open(argv[2], O_WRONLY|O_CREAT|O_TRUNC, 0644); + if (outfile < 0) goto usage; } - else - { -usage: - fprintf(stderr, "usage: machOconv inputfile [outputfile]\n"); - exit(1); + else + { + usage: + fprintf(stderr, "usage: machOconv inputfile [outputfile]\n"); + exit(1); } nc = read(infile, &mh, sizeof (mh)); - if (nc < 0) - { - perror("read mach header"); - exit(1); + { + perror("read mach header"); + exit(1); } - + if (nc < (int)sizeof (mh)) - { - fprintf(stderr, "read mach header: premature EOF %d\n", nc); - exit(1); + { + fprintf(stderr, "read mach header: premature EOF %d\n", nc); + exit(1); } - - if (mh.magic == MH_MAGIC) - swap_ends = false; - else if (mh.magic == MH_CIGAM) - swap_ends = true; + + + if (mh.magic == MH_MAGIC) swap_ends = false; + else if (mh.magic == MH_CIGAM) swap_ends = true; else - { - fprintf(stderr, "bad magic number %lx\n", (unsigned long)mh.magic); - exit(1); + { + fprintf(stderr, "bad magic number %lx\n", (unsigned long)mh.magic); + exit(1); } - + cmds = calloc(swap(mh.sizeofcmds), sizeof (char)); - if (cmds == 0) - { - fprintf(stderr, "alloc load commands: no memory\n"); - exit(1); + { + fprintf(stderr, "alloc load commands: no memory\n"); + exit(1); } nc = read(infile, cmds, swap(mh.sizeofcmds)); - - if (nc < 0) - { - perror("read load commands"); - exit(1); + if (nc < 0) + { + perror("read load commands"); + exit(1); } - if (nc < (int)swap(mh.sizeofcmds)) - { - fprintf(stderr, "read load commands: premature EOF %d\n", nc); - exit(1); + { + fprintf(stderr, "read load commands: premature EOF %d\n", nc); + exit(1); } - for (ncmds = swap(mh.ncmds), cp = cmds; ncmds > 0; ncmds--) - { - bool isDATA; - unsigned vmsize; + unsigned long vmstart = (unsigned long)-1; + // First pass: determine actual load address + for (ncmds = swap(mh.ncmds), cp = cmds; + ncmds > 0; ncmds--) + { +#define lcp ((struct load_command *)cp) +#define scp ((struct segment_command *)cp) + + switch(swap(lcp->cmd)) + { + case LC_SEGMENT: + if(vmstart > swap(scp->vmaddr)) + { + vmstart = swap(scp->vmaddr); + } + } + cp += swap(lcp->cmdsize); + + } + + // Second pass: output to file. + for (ncmds = swap(mh.ncmds), cp = cmds; + ncmds > 0; ncmds--) + { #define lcp ((struct load_command *)cp) - switch(swap(lcp->cmd)) - { - case LC_SEGMENT: #define scp ((struct segment_command *)cp) - isDATA = (strcmp(scp->segname, "__DATA") == 0); - - if (isDATA) - vmsize = swap(scp->filesize); - else - vmsize = swap(scp->vmsize); - - result = vm_allocate(mach_task_self(), &data, vmsize, true); - - if (result != KERN_SUCCESS) - { - mach_error("vm_allocate segment data", result); - exit(1); - } - - lseek(infile, swap(scp->fileoff), L_SET); - nc = read(infile, (void *)data, swap(scp->filesize)); - - if (nc < 0) { - perror("read segment data"); - exit(1); - } - - if (nc < (int)swap(scp->filesize)) - { - fprintf(stderr, "read segment data: premature EOF %d\n", nc); - exit(1); - } - - nc = write(outfile, (void *)data, vmsize); - - if (nc < (int)vmsize) - { - perror("write segment data"); - exit(1); - } - - vm_deallocate(mach_task_self(), data, vmsize); - break; - } - cp += swap(lcp->cmdsize); + bool isDATA; + unsigned vmsize; + + switch(swap(lcp->cmd)) + { + case LC_SEGMENT: + isDATA = (strcmp(scp->segname, "__DATA") == 0); + if (isDATA) + { + vmsize = swap(scp->filesize); + } + else + { + vmsize = swap(scp->vmsize); + } + + result = vm_allocate(mach_task_self(), &data, vmsize, true); + if (result != KERN_SUCCESS) { + mach_error("vm_allocate segment data", result); + exit(1); + } + + lseek(infile, swap(scp->fileoff), L_SET); + nc = read(infile, (void *)data, swap(scp->filesize)); + if (nc < 0) { + perror("read segment data"); + exit(1); + } + if (nc < (int)swap(scp->filesize)) { + fprintf(stderr, "read segment data: premature EOF %d\n", nc); + exit(1); + } + + lseek(outfile, swap(scp->vmaddr) - vmstart, L_SET); + nc = write(outfile, (void *)data, vmsize); + if (nc < (int)vmsize) { + perror("write segment data"); + exit(1); + } + + vm_deallocate(mach_task_self(), data, vmsize); + break; + } + + cp += swap(lcp->cmdsize); } exit(0); diff --git a/i386/util/md.1 b/i386/util/md.1 deleted file mode 100644 index 9505f88..0000000 --- a/i386/util/md.1 +++ /dev/null @@ -1,121 +0,0 @@ -.\" Man page Copyright (c) 2002 -.\" Apple Computer -.\" -.\" 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. -.\" -.\" THIS DOCUMENTATION IS PROVIDED BY THE APPLE ``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 APPLE 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. -.\" -.\" -.Dd "December 25, 2002" -.Dt md 1 -.Os -.Sh NAME -.Nm md -.Nd process raw dependency files produced by cpp -MD -.Sh SYNOPSIS -.Nm -.Op Fl d -.Op Fl f -.Op Fl m Ar makefile -.Op Fl u Ar makefile -.Op Fl o Ar outputfile -.Op Fl v -.Op Fl x -.Op Fl D Ar c|d|m|o|t|D -.Sh DESCRIPTION -The -.Nm -command basically does two things: -.Pp -Process the raw dependency files produced by the cpp -MD option. -There is one line in the file for every #include encountered, but -there are repeats and patterns like .../dir1/../dir2 that appear which -should reduce to .../dir2. -.Nm -canonicalizes and flushes repeats from the dependency list. -It also sorts the file names and "fills" them to a 78 character line. -.Pp -.Nm -also updates the makefile directly with the dependency information, -so the .d file can be thrown away (see -.Ar d -option). This is done to save space. -.Nm -assumes that dependency information in the makefile is sorted by .o -file name and it procedes to merge in (add/or replace [as appropriate]) -the new dependency lines that it has generated. -For time efficiency, -.Nm -assumes that any .d files it is given that were created -before the creation date of the "makefile" were processed -already. It ignores them unless the force flag -.Op f -is given. -.Pp -.Sh FLAG SUMMARY -.Bl -tag -width indent -.It Fl D Ar c|D|d|m|o|t -Specify debugging option(s): -.Bl -tag -width indent -.It c -show file contents -.It D -show very low level debugging -.It d -show new dependency crunching -.It m -show generation of makefile -.It o -show files being opened -.It t -show time comparisons -.El -.It Fl d -Delete the .d file after it is processed -.It Fl f -Force an update of the dependencies in the makefile, -even if the makefile is more recent than the .n file. -(This implies that -.Nm -has been run already.) -.It Fl m Ar makefile -Specify the makefile to be upgraded. The defaults are -.Ar makefile -and then -.Ar Makefile . -.It Fl o Ar outputfile -Specify an output file (other than a makefile) for the dependencies. -.It Fl u Ar makefile -Like -.Fl m , -but the file will be created if necessary. -.It Fl v -Set the verbose flag. -.It Fl x -Expunge old dependency information from the makefile. -.El -.Sh SEE ALSO -.Xr make 1 -.Sh BUGS -Old, possibly not used by anyone. -.Sh HISTORY -The -.Nm -utility was written by Robert V. Baron at Carnegie-Mellon University. diff --git a/i386/util/md.c b/i386/util/md.c deleted file mode 100644 index 99954f6..0000000 --- a/i386/util/md.c +++ /dev/null @@ -1,726 +0,0 @@ -/* ************************************************************************ *\ - * * - * File: md.c * - * * - * Updates makefiles from the .n dependency files generated by the * - * -MD option to "cc" (and "cpp"). * - * * - * Abstract: * - * * - * Basically, "md" does two things: * - * 1) It processes the raw dependency files produced by the cpp -MD * - * option. There is one line in the file for every #include * - * encountered, but there are repeats and patterns like * - * .../dir1/../dir2 appear which should reduce to .../dir2 * - * Md canonicalizes and flushes repeats from the dependency * - * list. It also sorts the file names and "fills" them to a 78 * - * character line. * - * 2) Md also updates the makefile directly with the dependency * - * information, so the .d file can be thrown away (-- -d option) * - * This is done to save space. Md assumes that dependency * - * information in the makefile is sorted by .o file name and it * - * procedes to merge in (add/or replace [as appropriate]) the new * - * dependency lines that it has generated. For time effeciency, * - * Md assumes that any .d files it is given that were created * - * before the creation date of the "makefile" were processed * - * already. It ignores them unless the force flag (-f) is given. * - * * - * Arguments: * - * * - * -d delete the .d file after it is processed * - * -f force an update of the dependencies in the makefile * - * even though the makefile is more recent than the .n file * - * (This implies that md has been run already.) * - * -m specify the makefile to be upgraded. The defaults are * - * "makefile" and then "Makefile". * - * -u like -m above, but the file will be created if necessary * - * -o specify an output file for the dependencies other than a * - * makefile * - * -v set the verbose flag * - * -x expunge old dependency info from makefile * - * -D subswitch for debugging. can be followed by any of * - * "c", "d", "m", "o", "t", "D" meaning: * - * c show file contents * - * d show new dependency crunching * - * m show generation of makefile * - * o show files being opened * - * t show time comparisons * - * D show very low level debugging * - * * - * Author: Robert V. Baron * - * Copyright (c) 1986 by Robert V. Baron * - * * - * HISTORY * - * 29-Apr-87 Robert Baron (rvb) at Carnegie-Mellon University - * If specified -u file does not exist, assume it is empty and - * generate one. As a sanity check, it must be possible to create - * the output file. - * Also, generalized fix below to handle any case of . as a - * file name. - * - * 25-Mar-87 Mary Thompson (mrt) at Carnegie Mellon - * Fixed up pathnamecanonicalization to recognize .// and - * drop the second / as well. mmax cpp generates this form. - * - * 6-Jan-87 Robert Baron (rvb) at Carnegie-Mellon University - * Fixed up pathname canonicalization to that ../../, etc would be - * handled correctly. - * Also made "force" on by default. - * - * 16-Mar-86 Robert Baron (rvb) at Carnegie-Mellon University - * Created 4/16/86 * - * * - \* ************************************************************************ */ - -/* cleaned and adapted for Chameleon by cparm */ - -#include <sys/types.h> -#include <sys/stat.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <fcntl.h> - -#define LINESIZE 65536 // NeXT_MOD - -#define OUTLINELEN 79 -#define IObuffer 50000 -#define SALUTATION "# Dependencies for File:" -#define SALUTATIONLEN (sizeof SALUTATION - 1) -#define OLDSALUTATION "# DO NOT DELETE THIS LINE" -#define OLDSALUTATIONLEN (sizeof OLDSALUTATION - 1) - -static char file_array[IObuffer]; /* read file and store crunched names */ -static char dep_line[LINESIZE]; /* line being processed */ -static char dot_o[LINESIZE]; /* <foo.o>: prefix */ -static char *path_component[100]; /* stores components for a path while being - crunched */ - -static struct dep { /* stores paths that a file depends on */ - int len; - char *str; -} dep_files[1000]; -static int dep_file_index; - -static int qsort_strcmp(struct dep *a, struct dep *b) -{ - extern int strcmp(); - return strcmp(a->str, b->str); -} - -static char *outfile = (char *) 0; /* generate dependency file */ -static FILE *out; - -static char *makefile = (char *) 0; /* user supplied makefile name */ -static char *real_mak_name; /* actual makefile name (if not supplied) */ -static char shadow_mak_name[LINESIZE]; /* changes done here then renamed */ -static FILE *mak; /* for reading makefile */ -static FILE *makout; /* for writing shadow */ -static char makbuf[LINESIZE]; /* one line buffer for makefile */ -static struct stat makstat; /* stat of makefile for time comparisons */ -static int mak_eof = 0; /* eof seen on makefile */ - -static int delete = 0; /* -d delete dependency file */ -static int debug = 0; -static int D_contents = 0; /* print file contents */ -static int D_depend = 0; /* print dependency processing info */ -static int D_make = 0; /* print makefile processing info */ -static int D_open = 0; /* print after succesful open */ -static int D_time = 0; /* print time comparison info */ -static int force = 1; /* always update dependency info */ -static int update = 0; /* it's ok if the -m file does not exist */ -static int verbose = 0; /* tell me something */ -static int expunge = 0; /* first flush dependency stuff from makefile */ - - -static char *name; -static int read_dep(register char *file); -static void save_dot_o(void); -static void parse_dep(void); -static void output_dep(FILE *out); -static FILE *find_mak(char *file); -static FILE *temp_mak(void); -static void scan_mak(FILE *, FILE *, char *); -static void expunge_mak(register FILE *makin, register FILE *makout); -static void skip_mak(register FILE *makin, register FILE *makout); -static void finish_mak(FILE *, FILE *); - -int main(int argc, register char **argv) -{ - int size; - - name = *argv; - { - register char *cp =name; - while (*cp) if (*cp++ == '/') name = cp; - } - - for ( argv++ ; --argc ; argv++ ) - { - - register char *token = *argv; - if (*token++ != '-' || !*token) - break; - else - { - register int flag; - for ( ; (flag = *token++) ; ) - { - switch (flag) - { - case 'd': - delete++; - break; - case 'f': - force++; - break; - case 'u': - update++; - case 'm': - makefile = *++argv; - if (--argc < 0) goto usage; - break; - case 'o': - outfile = *++argv; - if (--argc < 0) goto usage; - break; - case 'v': - verbose++; - break; - case 'x': - expunge++; - break; - case 'D': - for ( ; (flag = *token++) ; ) - switch (flag) - { - case 'c': - D_contents++; - break; - case 'd': - D_depend++; - break; - case 'm': - D_make++; - break; - case 'o': - D_open++; - break; - case 't': - D_time++; - break; - case 'D': - debug++; - break; - default: - goto letters; - - } - goto newtoken; - default: - goto usage; - } - letters: ; - } - } - newtoken: ; - } - - if (!expunge && argc < 1) goto usage; - if ((int) outfile && (int) makefile) /* not both */ - goto usage; - - if ((int) outfile) - { - /* - * NeXT_MOD, For SGS stuff, in case still linked to master version - */ - unlink(outfile); - - if ((out = fopen(outfile, "w")) == NULL) - { - fprintf(stderr, "%s: outfile = \"%s\" ", name, outfile); - perror("fopen"); - fflush(stdout), fflush(stderr); - exit(1); - } - else if (D_open) - printf("%s: opened outfile \"%s\"\n", name, outfile); - } - else if ((mak = find_mak(makefile))) - { - makout = temp_mak(); - out = makout; - if (expunge) - expunge_mak(mak, makout); - else - skip_mak(mak, makout); - } - else if (mak_eof && /* non existent file == mt file */ - (int)(makout = temp_mak())) - { /* but we need to be able */ - out = makout; /* to write here */ - } - else if (makefile) - { - fprintf(stderr, "%s: makefile \"%s\" can not be opened or stat'ed\n", - name, makefile); - exit(2); - } - - for (; argc--; argv++) - { - dep_file_index = 0; - - if ((size = read_dep(*argv))) - { - - save_dot_o(); - if (D_depend) printf("%s: dot_o = \"%s\"\n", name, dot_o); - - parse_dep(); - if (mak) scan_mak(mak, makout, dot_o); - if (out) output_dep(out); - - if (delete) - unlink(*argv); - } - } - - if (mak) finish_mak(mak, makout); - rename(shadow_mak_name, real_mak_name); - exit(0); -usage: - fprintf(stderr, "usage: md -f -Dcdmot -m makefile -o outputfile -v <file1> ... <filen>\n"); - exit(1); - return 1; -} - - -static int read_dep(register char *file) -{ - register int fd; - register int size; - struct stat statbuf; - - if ((fd = open(file, 0)) < 0) - { - fprintf(stderr, "%s: file = \"%s\" ", name, file); - perror("open"); - fflush(stdout), fflush(stderr); - return 0; - } - if (D_open) - printf("%s: opened dependency file \"%s\"\n", name, file); - - if (fstat(fd, &statbuf) < 0) - { - fprintf(stderr, "%s: file = \"%s\" ", name, file); - perror("stat"); - fflush(stdout), fflush(stderr); - goto out; - } - switch(statbuf.st_mode & S_IFMT) - { - case S_IFREG: - if (D_time) - printf("%s: file time = %ld\n", name, statbuf.st_mtime); - - if (statbuf.st_size > IObuffer) - { - fprintf(stderr, "%s: file \"%s\" tooo big for IObuffer\n", - name, file); - goto out; - } else if (force) - break; - else if ((int) mak && statbuf.st_mtime < makstat.st_mtime) - { - if (verbose || D_time) - fprintf(stderr, "%s: skipping \"%s\" %ld < %ld \"%s\"\n", - name, file, statbuf.st_mtime, makstat.st_mtime, - real_mak_name); - goto out; - } else /* >= =>ok */ - break; - case S_IFDIR: - case S_IFLNK: - case S_IFCHR: - case S_IFBLK: - case S_IFSOCK: - default: - fprintf(stderr, "%s: bad mode: 0%o on \"%s\"\n", - name, statbuf.st_mode, file); - fflush(stdout), fflush(stderr); - goto out; - } - - if ((size = read(fd, file_array, sizeof (file_array))) < 0) - { - fprintf(stderr, "%s: file = \"%s\" ", name, file); - perror("read"); - fflush(stdout), fflush(stderr); - goto out; - } - file_array[size] = 0; - - if (close(fd) < 0) - { - fprintf(stderr, "%s: file = \"%s\" ", name, file); - perror("close"); - fflush(stdout), fflush(stderr); - return 0; - } - - if (D_depend && D_contents) - printf("file_array: \"%s\"\n", file_array); - return size; -out: ; - close(fd); - return 0; -} - -static void save_dot_o(void) -{ - register char *cp = file_array; - register char *svp = dot_o; - register int c; - - while ((*svp++ = (c = *cp++)) && c != ':'); - *svp = 0; -} - -static void parse_dep(void) -{ - register char *lp = file_array; - register int c; - - while (*lp) - { - register char *tlp = lp; - register char *cp = dep_line; - register int i = 0; - int abspath = 0; - char oldc; - char *oldcp; - - /* get a line to process */ - while ((c = *lp++) && c != '\n') - { - if (c == '\\') - lp++; /* skip backslash newline */ - else - *cp++ = c; - } - if (!c) - break; - *cp = 0; - cp = dep_line; - lp[-1] = 0; - /* skip .o file name */ - while ((c = *cp++) && c != ':'); if (!c) continue; - next_filename: - i = 0; - abspath = 0; - while ((c = *cp) && (c == ' ' || c == '\t')) cp++; if (!c) continue; - - /* canonicalization processing */ - - /* initial / is remembered */ - if (c == '/') - abspath++; - - while (c && c != ' ' && c != '\t') - { - if (D_depend) printf("i = %d going \"%s\"\n", i, cp); - /* kill \'s */ - while ((c = *cp) && c == '/') cp++; if (!c) break; - path_component[i] = cp; - /* swallow chars till next / or null */ - while ((c = *cp++) && c != '/' && c != ' ' && c != '\t'); - if (c) cp[-1]=0;/* end component C style */ - - /* ignore . */; - if (!strcmp(path_component[i], ".")) - ; /* if "component" != .. */ - else /* don't reduce /component/.. to nothing */ - i++; /* there could be symbolic links! */ - } - /* reassemble components */ - oldc = c; /* save c */ - oldcp = cp; /* save cp */ - cp = tlp; /* overwrite line in buffer */ - if (abspath) - *cp++ = '/'; - for (c=0; c<i; c++) {register char *ccp = path_component[c]; - while ((*cp++ = *ccp++)); - *--cp = '/'; - cp++; - } - *--cp = 0; - - c=dep_file_index++; - dep_files[c].str = tlp; - dep_files[c].len = cp - tlp; - if (D_depend) - printf("%s: dep_file[%d] = \"%s\" Len %ld\n", - name, dep_file_index - 1, tlp, (long)(cp - tlp)); - tlp = cp + 1; - if (oldc) - { - cp = oldcp; - goto next_filename; - } - } -} - -static void output_dep(FILE *out) -{ - register int j; - register int size = 1000; - register int dot_o_len = strlen(dot_o); - register struct dep *dp = dep_files; - int written = 0; - - if (D_depend && debug) - for(j = 0; j < dep_file_index; j++) - { - printf("dep_files[%d] = %s\n", j, dep_files[j].str); - } - typedef int (*qsort_strcmp_fixer)(const void *, const void *); - - int (*qsort_strcmp_fix)(const void *, const void *) = (qsort_strcmp_fixer)qsort_strcmp; - - qsort(dep_files, dep_file_index, sizeof (struct dep), qsort_strcmp_fix); - - if (D_depend && debug) - for(j = 0; j < dep_file_index; j++) - { - printf("dep_files[%d] = %s\n", j, dep_files[j].str); - } - - fprintf(out, "%s %s", SALUTATION, dot_o); - for(j = 0; j < dep_file_index; j++, dp++) - { - register int len = dp->len; - register char *str = dp->str; - if (j && len == (dp-1)->len && !strcmp(str, (dp-1)->str)) - continue; - written++; - if (size + len + 1 > OUTLINELEN) - { - fprintf(out, "\n%s %s", dot_o, str); - size = dot_o_len + len + 1; - } - else - { - fprintf(out, " %s", str); - size += len + 1; - } - } - fprintf(out, "\n"); - if (verbose) - fprintf(stdout, "%s: \"%s\" %d => %d\n", name, dot_o, dep_file_index, written); -} - -/* process makefile */ -static FILE *find_mak(char *file) -{ - FILE *mak; - - if ((int) file) - { - if ((mak = fopen(file, "r")) != NULL) - { - real_mak_name = file; - } - else if (update) - { - mak_eof = 1; - real_mak_name = file; - return NULL; - } - else - { - fprintf(stderr, "%s: file = \"%s\" ", name, file); - perror("fopen"); - fflush(stdout), fflush(stderr); - return NULL; - } - } - else - { - if ((mak = fopen("makefile", "r")) != NULL) - { - real_mak_name = "makefile"; - } - else if ((mak = fopen("Makefile", "r")) != NULL) - { - real_mak_name = "Makefile"; - } - else return NULL; - } - - if (fstat(fileno(mak), &makstat) < 0) - { - fprintf(stderr, "%s: file = \"%s\" ", name, real_mak_name); - perror("stat"); - fflush(stdout), fflush(stderr); - return NULL; - } - if (D_open) - printf("%s: opened makefile \"%s\"\n", name, real_mak_name); - if (D_time) - printf("%s: makefile time = %ld\n", name, makstat.st_mtime); - - return mak; -} - -static FILE *temp_mak(void) -{ - FILE *mak; - - strlcpy(shadow_mak_name, real_mak_name, sizeof(shadow_mak_name)); - strlcat(shadow_mak_name, ".md", sizeof(shadow_mak_name)); - - /* - * For SGS stuff, in case still linked to master version - */ - unlink(shadow_mak_name); - if ((mak = fopen(shadow_mak_name, "w")) == NULL) - { - fprintf(stderr, "%s: file = \"%s\" ", name, shadow_mak_name); - perror("fopen"); - fflush(stdout), fflush(stderr); - return NULL; - } - if (D_open) - printf("%s: opened makefile.md \"%s\"\n", name, shadow_mak_name); - - return mak; -} - -static void skip_mak(register FILE *makin, register FILE *makout) -{ - register int len = SALUTATIONLEN; - - if (D_make) - printf("skipping in \"%s\" ", real_mak_name); - - while (fgets(makbuf, LINESIZE, makin) != NULL) - { - if (D_make && D_contents) - printf("%s: \"%s\"\n", real_mak_name, makbuf); - if (strncmp(makbuf, SALUTATION, len)) - { - fputs(makbuf, makout); - } - else - break; - } - mak_eof = feof(makin); - if (mak_eof) - fclose(makin); - if (D_make) - printf("eof = %d str = \"%s\"", mak_eof, makbuf); -} - -static void expunge_mak(register FILE *makin, register FILE *makout) -{ - register int len = SALUTATIONLEN; - register int oldlen = OLDSALUTATIONLEN; - - if (D_make) - printf("expunging in \"%s\" ", real_mak_name); - - while (fgets(makbuf, LINESIZE, makin) != NULL) - { - if (D_make && D_contents) - printf("%s: \"%s\"\n", real_mak_name, makbuf); - if (! strncmp(makbuf, SALUTATION, len) || - ! strncmp(makbuf, OLDSALUTATION, oldlen)) - break; - else - fputs(makbuf, makout); - } - mak_eof = 1; - if (mak_eof) - fclose(makin); - if (D_make) - printf("eof = %d str = \"%s\"", mak_eof, makbuf); -} - -static void -scan_mak(FILE *makin, FILE *makout, char *file) -{ - register char *cp = &makbuf[SALUTATIONLEN+1]; - register int len = strlen(file); - register int ret; - - if (D_make) - printf("scanning in \"%s\" for \"%s\"\n", real_mak_name, file); - - do { - if (mak_eof) /* don't scan any more */ - return; - - ret = strncmp(cp, file, len); - if (D_make) - printf("saw \"%s\" ret = %d\n", cp, ret); - - if (ret < 0) { /* skip forward till match or greater */ - fputs(makbuf, makout); /* line we're looking at */ - while (fgets(makbuf, LINESIZE, makin) != NULL) - { - if (strncmp(makbuf, SALUTATION, SALUTATIONLEN)) - { - fputs(makbuf, makout); - } - else - break; - } - mak_eof = feof(makin); - - if (mak_eof) - fclose(makin); - - continue; - } - else if (ret == 0) - { /* flush match */ - while (fgets(makbuf, LINESIZE, makin) != NULL) - { - if (strncmp(makbuf, SALUTATION, SALUTATIONLEN)) - { - ; /* flush old stuff */ - } - else - break; - } - mak_eof = feof(makin); - if (mak_eof) - fclose(makin); - break; - } - else - { /* no luck this time */ - break; - } - } while (1); -} - -static void -finish_mak(FILE *makin, FILE *makout) -{ - if (mak_eof) /* don't scan any more */ - return; - - if (D_make) - printf("finishing in \"%s\"\n", real_mak_name); - - fputs(makbuf, makout); /* line we're looking at */ - while (fgets(makbuf, LINESIZE, makin) != NULL) - { - fputs(makbuf, makout); - } -} diff --git a/i386/util/segsize.c b/i386/util/segsize.c new file mode 100644 index 0000000..592878a --- /dev/null +++ b/i386/util/segsize.c @@ -0,0 +1,128 @@ +/* + * Copyright (c) 1999-2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights + * Reserved. This file contains Original Code and/or Modifications of + * Original Code as defined in and that are subject to the Apple Public + * Source License Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. Please obtain a copy of the + * License at http://www.apple.com/publicsource and read it before using + * this file. + * + * The Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#include <stdio.h> +#include <stdlib.h> +#include <stdbool.h> +#include <mach/mach.h> +#include <mach/mach_error.h> +#include <sys/file.h> +#include <mach-o/loader.h> +#include <libkern/OSByteOrder.h> +#include <unistd.h> + +int infile; + +struct mach_header mh; +void * cmds; + +static bool swap_ends; + +static unsigned long swap( + unsigned long x + ) +{ + if (swap_ends) + return OSSwapInt32(x); + else + return x; +} + +int +main(int argc, char *argv[]) +{ + int nc, ncmds; + char * cp; + + if (argc == 3) { + infile = open(argv[1], O_RDONLY); + if (infile < 0) + goto usage; + } + else { + usage: + fprintf(stderr, "usage: segsize segment\n"); + exit(1); + } + + nc = read(infile, &mh, sizeof (mh)); + if (nc < 0) { + perror("read mach header"); + exit(1); + } + if (nc < (int)sizeof (mh)) { + fprintf(stderr, "read mach header: premature EOF %d\n", nc); + exit(1); + } + if (mh.magic == MH_MAGIC) + swap_ends = false; + else if (mh.magic == MH_CIGAM) + swap_ends = true; + else { + fprintf(stderr, "bad magic number %lx\n", (unsigned long)mh.magic); + exit(1); + } + + cmds = calloc(swap(mh.sizeofcmds), sizeof (char)); + if (cmds == 0) { + fprintf(stderr, "alloc load commands: no memory\n"); + exit(1); + } + nc = read(infile, cmds, swap(mh.sizeofcmds)); + if (nc < 0) { + perror("read load commands"); + exit(1); + } + if (nc < (int)swap(mh.sizeofcmds)) { + fprintf(stderr, "read load commands: premature EOF %d\n", nc); + exit(1); + } + + for ( ncmds = swap(mh.ncmds), cp = cmds; + ncmds > 0; ncmds--) { +// bool isDATA; +// unsigned vmsize; + +#define lcp ((struct load_command *)cp) + switch(swap(lcp->cmd)) { + + case LC_SEGMENT: +#define scp ((struct segment_command *)cp) + if(strcmp(scp->segname, argv[2]) == 0) + { + printf("%ld\n", swap(scp->vmsize)); +#if 0 + if (isDATA) + vmsize = swap(scp->filesize); + else + vmsize = swap(scp->vmsize); +#endif + } + break; + } + + cp += swap(lcp->cmdsize); + } + + exit(0); +} From 354dbcbac15449bb77ec0cde43599f0539118cf0 Mon Sep 17 00:00:00 2001 From: Dave Griffin <davegriffin@stainedglass1.plus.com> Date: Sun, 11 Nov 2012 10:48:41 +0000 Subject: [PATCH 130/623] Pruned include dir --- .../include/IOKit/acpi/IOACPIPlatformDevice.h | 254 -- .../include/IOKit/acpi/IOACPIPlatformExpert.h | 178 -- i386/include/IOKit/acpi/IOACPITypes.h | 136 -- i386/include/IOKit/ata/ATADeviceNub.h | 164 -- i386/include/IOKit/ata/ATATimerEventSource.h | 126 - i386/include/IOKit/ata/IOATABusCommand.h | 250 -- i386/include/IOKit/ata/IOATABusInfo.h | 219 -- i386/include/IOKit/ata/IOATACommand.h | 478 ---- i386/include/IOKit/ata/IOATAController.h | 314 --- i386/include/IOKit/ata/IOATADevConfig.h | 239 -- i386/include/IOKit/ata/IOATADevice.h | 179 -- i386/include/IOKit/ata/IOATARegI386.h | 76 - i386/include/IOKit/ata/IOATATypes.h | 393 --- i386/include/IOKit/ata/IOPCIATA.h | 200 -- i386/include/IOKit/ata/MacIOATA.h | 225 -- i386/include/IOKit/audio/IOAudioControl.h | 595 ----- .../IOKit/audio/IOAudioControlUserClient.h | 90 - i386/include/IOKit/audio/IOAudioDebug.h | 61 - i386/include/IOKit/audio/IOAudioDefines.h | 465 ---- i386/include/IOKit/audio/IOAudioDevice.h | 749 ------ i386/include/IOKit/audio/IOAudioEngine.h | 865 ------- .../IOKit/audio/IOAudioEngineUserClient.h | 270 --- .../include/IOKit/audio/IOAudioLevelControl.h | 205 -- i386/include/IOKit/audio/IOAudioPort.h | 184 -- .../IOKit/audio/IOAudioSelectorControl.h | 122 - i386/include/IOKit/audio/IOAudioStream.h | 289 --- .../IOKit/audio/IOAudioToggleControl.h | 121 - i386/include/IOKit/audio/IOAudioTypes.h | 661 ----- i386/include/IOKit/avc/IOFireWireAVCCommand.h | 94 - i386/include/IOKit/avc/IOFireWireAVCConsts.h | 259 -- .../IOKit/avc/IOFireWireAVCRequestSpace.h | 31 - .../IOKit/avc/IOFireWireAVCTargetSpace.h | 297 --- i386/include/IOKit/avc/IOFireWireAVCUnit.h | 408 ---- .../IOKit/avc/IOFireWireAVCUserClientCommon.h | 124 - i386/include/IOKit/avc/IOFireWirePCRSpace.h | 202 -- i386/include/IOKit/bluetooth/Bluetooth.h | 2158 ----------------- .../bluetooth/BluetoothAssignedNumbers.h | 552 ----- .../bluetooth/IOBluetoothHCIController.h | 1370 ----------- .../IOKit/bluetooth/IOBluetoothHCIRequest.h | 155 -- .../IOKit/bluetooth/IOBluetoothHIDDriver.h | 230 -- .../bluetooth/IOBluetoothHIDDriverTypes.h | 61 - .../IOKit/bluetooth/IOBluetoothInternal.h | 103 - .../IOKit/bluetooth/IOBluetoothTypes.h | 23 - .../IOKit/firewire/IOConfigDirectory.h | 182 -- .../include/IOKit/firewire/IOFWAddressSpace.h | 331 --- .../IOKit/firewire/IOFWAsyncStreamListener.h | 132 - i386/include/IOKit/firewire/IOFWCommand.h | 977 -------- i386/include/IOKit/firewire/IOFWDCL.h | 346 --- i386/include/IOKit/firewire/IOFWDCLPool.h | 160 -- i386/include/IOKit/firewire/IOFWDCLProgram.h | 133 - .../IOKit/firewire/IOFWDCLTranslator.h | 114 - .../include/IOKit/firewire/IOFWIsochChannel.h | 132 - i386/include/IOKit/firewire/IOFWIsochPort.h | 66 - .../IOKit/firewire/IOFWLocalIsochPort.h | 135 -- .../IOKit/firewire/IOFWPHYPacketListener.h | 77 - .../IOKit/firewire/IOFWPhysicalAddressSpace.h | 263 -- .../IOKit/firewire/IOFWPseudoAddressSpace.h | 370 --- i386/include/IOKit/firewire/IOFWRegs.h | 73 - ...IOFWSimpleContiguousPhysicalAddressSpace.h | 66 - .../firewire/IOFWSimplePhysicalAddressSpace.h | 70 - i386/include/IOKit/firewire/IOFWSyncer.h | 54 - .../IOKit/firewire/IOFWUserObjectExporter.h | 95 - i386/include/IOKit/firewire/IOFWUtils.h | 32 - i386/include/IOKit/firewire/IOFireWireBus.h | 373 --- .../IOKit/firewire/IOFireWireController.h | 1089 --------- .../include/IOKit/firewire/IOFireWireDevice.h | 289 --- .../IOKit/firewire/IOFireWireFamilyCommon.h | 1235 ---------- .../IOKit/firewire/IOFireWireIRMAllocation.h | 116 - .../IOKit/firewire/IOFireWireLocalNode.h | 143 -- .../firewire/IOFireWireMultiIsochReceive.h | 137 -- i386/include/IOKit/firewire/IOFireWireNub.h | 293 --- .../IOKit/firewire/IOFireWirePowerManager.h | 78 - i386/include/IOKit/firewire/IOFireWireUnit.h | 167 -- .../IOKit/firewire/IOLocalConfigDirectory.h | 110 - .../IOKit/firewire/IORemoteConfigDirectory.h | 92 - .../IOKit/graphics/IOAccelClientConnect.h | 44 - .../IOKit/graphics/IOAccelSurfaceConnect.h | 182 -- i386/include/IOKit/graphics/IOAccelTypes.h | 101 - i386/include/IOKit/graphics/IOAccelerator.h | 42 - i386/include/IOKit/graphics/IODisplay.h | 292 --- i386/include/IOKit/graphics/IOFramebuffer.h | 827 ------- .../IOKit/graphics/IOFramebufferShared.h | 255 -- .../include/IOKit/graphics/IOGraphicsDevice.h | 47 - .../include/IOKit/graphics/IOGraphicsEngine.h | 51 - .../IOKit/graphics/IOGraphicsInterfaceTypes.h | 301 --- i386/include/IOKit/graphics/IOGraphicsTypes.h | 1260 ---------- i386/include/IOKit/hid/IOHIDDevice.h | 706 ------ i386/include/IOKit/hid/IOHIDElement.h | 106 - i386/include/IOKit/hid/IOHIDInterface.h | 252 -- i386/include/IOKit/hid/IOHIDKeys.h | 349 --- i386/include/IOKit/hid/IOHIDUsageTables.h | 1665 ------------- .../include/IOKit/hidevent/IOHIDEventDriver.h | 171 -- .../IOKit/hidevent/IOHIDEventService.h | 394 --- .../IOKit/hidsystem/IOHIDDescriptorParser.h | 939 ------- i386/include/IOKit/hidsystem/IOHIDParameter.h | 310 --- i386/include/IOKit/hidsystem/IOHIDShared.h | 341 --- i386/include/IOKit/hidsystem/IOHIDSystem.h | 785 ------ i386/include/IOKit/hidsystem/IOHIDTypes.h | 171 -- .../IOKit/hidsystem/IOHIDUsageTables.h | 1665 ------------- i386/include/IOKit/hidsystem/IOHIDevice.h | 71 - i386/include/IOKit/hidsystem/IOHIKeyboard.h | 268 -- .../IOKit/hidsystem/IOHIKeyboardMapper.h | 350 --- i386/include/IOKit/hidsystem/IOHIPointing.h | 280 --- i386/include/IOKit/hidsystem/IOLLEvent.h | 558 ----- i386/include/IOKit/hidsystem/ev_keymap.h | 166 -- i386/include/IOKit/i2c/IOI2CInterface.h | 262 -- i386/include/IOKit/ndrvsupport/IOMacOSTypes.h | 441 ---- i386/include/IOKit/ndrvsupport/IOMacOSVideo.h | 1391 ----------- .../IOKit/ndrvsupport/IONDRVFramebuffer.h | 352 --- .../IOKit/ndrvsupport/IONDRVLibraries.h | 696 ------ .../include/IOKit/ndrvsupport/IONDRVSupport.h | 95 - .../IOKit/network/IOBasicOutputQueue.h | 319 --- .../IOKit/network/IOEthernetController.h | 502 ---- .../IOKit/network/IOEthernetInterface.h | 328 --- i386/include/IOKit/network/IOEthernetStats.h | 161 -- .../IOKit/network/IOGatedOutputQueue.h | 140 -- i386/include/IOKit/network/IOKernelDebugger.h | 324 --- .../IOKit/network/IOMbufMemoryCursor.h | 381 --- .../IOKit/network/IONetworkController.h | 1452 ----------- i386/include/IOKit/network/IONetworkData.h | 477 ---- .../IOKit/network/IONetworkInterface.h | 1104 --------- i386/include/IOKit/network/IONetworkMedium.h | 426 ---- i386/include/IOKit/network/IONetworkStats.h | 87 - i386/include/IOKit/network/IOOutputQueue.h | 270 --- i386/include/IOKit/network/IOPacketQueue.h | 290 --- i386/include/IOKit/nvram/IONVRAMController.h | 49 - i386/include/IOKit/pci/IOAGPDevice.h | 222 -- i386/include/IOKit/pci/IOPCIBridge.h | 381 --- i386/include/IOKit/pci/IOPCIDevice.h | 673 ----- i386/include/IOKit/platform/.svn/all-wcprops | 29 - i386/include/IOKit/platform/.svn/entries | 164 -- .../.svn/text-base/AppleMacIO.h.svn-base | 79 - .../text-base/AppleMacIODevice.h.svn-base | 60 - .../.svn/text-base/AppleNMI.h.svn-base | 76 - .../text-base/ApplePlatformExpert.h.svn-base | 91 - i386/include/IOKit/platform/AppleMacIO.h | 79 - .../include/IOKit/platform/AppleMacIODevice.h | 60 - i386/include/IOKit/platform/AppleNMI.h | 76 - .../IOKit/platform/ApplePlatformExpert.h | 91 - i386/include/IOKit/power/.svn/all-wcprops | 11 - i386/include/IOKit/power/.svn/entries | 62 - .../.svn/text-base/IOPwrController.h.svn-base | 41 - i386/include/IOKit/power/IOPwrController.h | 41 - i386/include/IOKit/ppc/.svn/all-wcprops | 11 - i386/include/IOKit/ppc/.svn/entries | 62 - .../ppc/.svn/text-base/IODBDMA.h.svn-base | 367 --- i386/include/IOKit/ppc/IODBDMA.h | 367 --- i386/include/IOKit/pwr_mgt/.svn/all-wcprops | 59 - i386/include/IOKit/pwr_mgt/.svn/entries | 334 --- .../pwr_mgt/.svn/text-base/IOPM.h.svn-base | 654 ----- .../.svn/text-base/IOPMDeprecated.h.svn-base | 177 -- .../.svn/text-base/IOPMLibDefs.h.svn-base | 40 - .../.svn/text-base/IOPMPowerSource.h.svn-base | 300 --- .../text-base/IOPMPowerSourceList.h.svn-base | 54 - .../.svn/text-base/IOPMPrivate.h.svn-base | 269 -- .../.svn/text-base/IOPMpowerState.h.svn-base | 72 - .../text-base/IOPowerConnection.h.svn-base | 159 -- .../.svn/text-base/RootDomain.h.svn-base | 251 -- i386/include/IOKit/pwr_mgt/IOPM.h | 654 ----- i386/include/IOKit/pwr_mgt/IOPMDeprecated.h | 177 -- i386/include/IOKit/pwr_mgt/IOPMLibDefs.h | 40 - i386/include/IOKit/pwr_mgt/IOPMPowerSource.h | 300 --- .../IOKit/pwr_mgt/IOPMPowerSourceList.h | 54 - i386/include/IOKit/pwr_mgt/IOPMPrivate.h | 269 -- i386/include/IOKit/pwr_mgt/IOPMpowerState.h | 72 - .../include/IOKit/pwr_mgt/IOPowerConnection.h | 159 -- i386/include/IOKit/pwr_mgt/RootDomain.h | 251 -- i386/include/IOKit/rtc/.svn/all-wcprops | 11 - i386/include/IOKit/rtc/.svn/entries | 62 - .../.svn/text-base/IORTCController.h.svn-base | 46 - i386/include/IOKit/rtc/IORTCController.h | 46 - i386/include/IOKit/sbp2/.svn/all-wcprops | 59 - i386/include/IOKit/sbp2/.svn/entries | 334 --- ...WireSBP2LSIWorkaroundDescriptor.h.svn-base | 292 --- .../text-base/IOFireWireSBP2LUN.h.svn-base | 270 --- .../text-base/IOFireWireSBP2Login.h.svn-base | 1078 -------- .../IOFireWireSBP2ManagementORB.h.svn-base | 345 --- .../text-base/IOFireWireSBP2ORB.h.svn-base | 547 ----- .../text-base/IOFireWireSBP2Target.h.svn-base | 224 -- .../IOFireWireSBP2UserClient.h.svn-base | 186 -- .../IOFireWireSBP2UserClientCommon.h.svn-base | 79 - ...eWireSerialBusProtocolTransport.h.svn-base | 449 ---- .../IOFireWireSBP2LSIWorkaroundDescriptor.h | 292 --- i386/include/IOKit/sbp2/IOFireWireSBP2LUN.h | 270 --- i386/include/IOKit/sbp2/IOFireWireSBP2Login.h | 1078 -------- .../IOKit/sbp2/IOFireWireSBP2ManagementORB.h | 345 --- i386/include/IOKit/sbp2/IOFireWireSBP2ORB.h | 547 ----- .../include/IOKit/sbp2/IOFireWireSBP2Target.h | 224 -- .../IOKit/sbp2/IOFireWireSBP2UserClient.h | 186 -- .../sbp2/IOFireWireSBP2UserClientCommon.h | 79 - .../IOFireWireSerialBusProtocolTransport.h | 449 ---- i386/include/IOKit/scsi/.svn/all-wcprops | 155 -- i386/include/IOKit/scsi/.svn/entries | 881 ------- .../.svn/text-base/IOBDServices.h.svn-base | 241 -- .../IOBlockStorageServices.h.svn-base | 158 -- .../IOCompactDiscServices.h.svn-base | 230 -- .../.svn/text-base/IODVDServices.h.svn-base | 251 -- .../IOReducedBlockServices.h.svn-base | 147 -- .../IOSCSIBlockCommandsDevice.h.svn-base | 1146 --------- .../IOSCSIMultimediaCommandsDevice.h.svn-base | 1057 -------- .../IOSCSIPeripheralDeviceNub.h.svn-base | 233 -- .../IOSCSIPeripheralDeviceType00.h.svn-base | 102 - .../IOSCSIPeripheralDeviceType05.h.svn-base | 75 - .../IOSCSIPeripheralDeviceType07.h.svn-base | 75 - .../IOSCSIPeripheralDeviceType0E.h.svn-base | 77 - .../IOSCSIPrimaryCommandsDevice.h.svn-base | 805 ------ .../IOSCSIProtocolInterface.h.svn-base | 854 ------- .../IOSCSIProtocolServices.h.svn-base | 362 --- ...OSCSIReducedBlockCommandsDevice.h.svn-base | 438 ---- .../SCSICmds_INQUIRY_Definitions.h.svn-base | 923 ------- .../SCSICmds_MODE_Definitions.h.svn-base | 559 ----- ...ICmds_READ_CAPACITY_Definitions.h.svn-base | 141 -- ...CSICmds_REPORT_LUNS_Definitions.h.svn-base | 146 -- .../SCSICmds_REQUEST_SENSE_Defs.h.svn-base | 234 -- .../SCSICommandDefinitions.h.svn-base | 479 ---- .../SCSICommandOperationCodes.h.svn-base | 941 ------- .../scsi/.svn/text-base/SCSIPort.h.svn-base | 77 - .../scsi/.svn/text-base/SCSITask.h.svn-base | 456 ---- i386/include/IOKit/scsi/IOBDServices.h | 241 -- .../IOKit/scsi/IOBlockStorageServices.h | 158 -- .../IOKit/scsi/IOCompactDiscServices.h | 230 -- i386/include/IOKit/scsi/IODVDServices.h | 251 -- .../IOKit/scsi/IOReducedBlockServices.h | 147 -- .../IOKit/scsi/IOSCSIBlockCommandsDevice.h | 1146 --------- .../scsi/IOSCSIMultimediaCommandsDevice.h | 1057 -------- .../IOKit/scsi/IOSCSIPeripheralDeviceNub.h | 233 -- .../IOKit/scsi/IOSCSIPeripheralDeviceType00.h | 102 - .../IOKit/scsi/IOSCSIPeripheralDeviceType05.h | 75 - .../IOKit/scsi/IOSCSIPeripheralDeviceType07.h | 75 - .../IOKit/scsi/IOSCSIPeripheralDeviceType0E.h | 77 - .../IOKit/scsi/IOSCSIPrimaryCommandsDevice.h | 805 ------ .../IOKit/scsi/IOSCSIProtocolInterface.h | 854 ------- .../IOKit/scsi/IOSCSIProtocolServices.h | 362 --- .../scsi/IOSCSIReducedBlockCommandsDevice.h | 438 ---- .../IOKit/scsi/SCSICmds_INQUIRY_Definitions.h | 923 ------- .../IOKit/scsi/SCSICmds_MODE_Definitions.h | 559 ----- .../scsi/SCSICmds_READ_CAPACITY_Definitions.h | 141 -- .../scsi/SCSICmds_REPORT_LUNS_Definitions.h | 146 -- .../IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h | 234 -- .../IOKit/scsi/SCSICommandDefinitions.h | 479 ---- .../IOKit/scsi/SCSICommandOperationCodes.h | 941 ------- i386/include/IOKit/scsi/SCSIPort.h | 77 - i386/include/IOKit/scsi/SCSITask.h | 456 ---- i386/include/IOKit/scsi/spi/.svn/all-wcprops | 11 - i386/include/IOKit/scsi/spi/.svn/entries | 62 - ...SCSIParallelInterfaceController.h.svn-base | 1568 ------------ .../spi/IOSCSIParallelInterfaceController.h | 1568 ------------ i386/include/IOKit/serial/.svn/all-wcprops | 35 - i386/include/IOKit/serial/.svn/entries | 198 -- .../IOModemSerialStreamSync.h.svn-base | 42 - .../IORS232SerialStreamSync.h.svn-base | 172 -- .../text-base/IOSerialDriverSync.h.svn-base | 91 - .../.svn/text-base/IOSerialKeys.h.svn-base | 80 - .../text-base/IOSerialStreamSync.h.svn-base | 275 --- .../IOKit/serial/IOModemSerialStreamSync.h | 42 - .../IOKit/serial/IORS232SerialStreamSync.h | 172 -- .../include/IOKit/serial/IOSerialDriverSync.h | 91 - i386/include/IOKit/serial/IOSerialKeys.h | 80 - .../include/IOKit/serial/IOSerialStreamSync.h | 275 --- i386/include/IOKit/storage/.svn/all-wcprops | 185 -- i386/include/IOKit/storage/.svn/entries | 1051 -------- .../text-base/IOAppleLabelScheme.h.svn-base | 191 -- .../IOApplePartitionScheme.h.svn-base | 122 - .../IOBDBlockStorageDevice.h.svn-base | 157 -- .../IOBDBlockStorageDriver.h.svn-base | 152 -- .../.svn/text-base/IOBDMedia.h.svn-base | 297 --- .../text-base/IOBDMediaBSDClient.h.svn-base | 182 -- .../.svn/text-base/IOBDTypes.h.svn-base | 133 - .../text-base/IOBlockStorageDevice.h.svn-base | 80 - .../text-base/IOBlockStorageDriver.h.svn-base | 245 -- .../IOCDBlockStorageDevice.h.svn-base | 60 - .../IOCDBlockStorageDriver.h.svn-base | 51 - .../.svn/text-base/IOCDMedia.h.svn-base | 553 ----- .../text-base/IOCDMediaBSDClient.h.svn-base | 199 -- .../text-base/IOCDPartitionScheme.h.svn-base | 226 -- .../.svn/text-base/IOCDTypes.h.svn-base | 492 ---- .../IODVDBlockStorageDevice.h.svn-base | 145 -- .../IODVDBlockStorageDriver.h.svn-base | 219 -- .../.svn/text-base/IODVDMedia.h.svn-base | 357 --- .../text-base/IODVDMediaBSDClient.h.svn-base | 197 -- .../.svn/text-base/IODVDTypes.h.svn-base | 451 ---- .../IOFDiskPartitionScheme.h.svn-base | 105 - .../.svn/text-base/IOFilterScheme.h.svn-base | 289 --- ...OFireWireStorageCharacteristics.h.svn-base | 63 - .../IOGUIDPartitionScheme.h.svn-base | 90 - .../storage/.svn/text-base/IOMedia.h.svn-base | 231 -- .../text-base/IOMediaBSDClient.h.svn-base | 29 - .../text-base/IOPartitionScheme.h.svn-base | 373 --- .../.svn/text-base/IOStorage.h.svn-base | 217 -- .../IOStorageDeviceCharacteristics.h.svn-base | 659 ----- ...OStorageProtocolCharacteristics.h.svn-base | 1758 -------------- .../IOKit/storage/IOAppleLabelScheme.h | 191 -- .../IOKit/storage/IOApplePartitionScheme.h | 122 - .../IOKit/storage/IOBDBlockStorageDevice.h | 157 -- .../IOKit/storage/IOBDBlockStorageDriver.h | 152 -- i386/include/IOKit/storage/IOBDMedia.h | 297 --- .../IOKit/storage/IOBDMediaBSDClient.h | 182 -- i386/include/IOKit/storage/IOBDTypes.h | 133 - .../IOKit/storage/IOBlockStorageDevice.h | 80 - .../IOKit/storage/IOBlockStorageDriver.h | 245 -- .../IOKit/storage/IOCDBlockStorageDevice.h | 60 - .../IOKit/storage/IOCDBlockStorageDriver.h | 51 - i386/include/IOKit/storage/IOCDMedia.h | 553 ----- .../IOKit/storage/IOCDMediaBSDClient.h | 199 -- .../IOKit/storage/IOCDPartitionScheme.h | 226 -- i386/include/IOKit/storage/IOCDTypes.h | 492 ---- .../IOKit/storage/IODVDBlockStorageDevice.h | 145 -- .../IOKit/storage/IODVDBlockStorageDriver.h | 219 -- i386/include/IOKit/storage/IODVDMedia.h | 357 --- .../IOKit/storage/IODVDMediaBSDClient.h | 197 -- i386/include/IOKit/storage/IODVDTypes.h | 451 ---- .../IOKit/storage/IOFDiskPartitionScheme.h | 105 - i386/include/IOKit/storage/IOFilterScheme.h | 289 --- .../IOFireWireStorageCharacteristics.h | 63 - .../IOKit/storage/IOGUIDPartitionScheme.h | 90 - i386/include/IOKit/storage/IOMedia.h | 231 -- i386/include/IOKit/storage/IOMediaBSDClient.h | 29 - .../include/IOKit/storage/IOPartitionScheme.h | 373 --- i386/include/IOKit/storage/IOStorage.h | 217 -- .../storage/IOStorageDeviceCharacteristics.h | 659 ----- .../IOStorageProtocolCharacteristics.h | 1758 -------------- .../IOKit/storage/ata/.svn/all-wcprops | 17 - i386/include/IOKit/storage/ata/.svn/entries | 96 - .../IOATAPIProtocolTransport.h.svn-base | 365 --- .../text-base/IOATAStorageDefines.h.svn-base | 321 --- .../storage/ata/IOATAPIProtocolTransport.h | 365 --- .../IOKit/storage/ata/IOATAStorageDefines.h | 321 --- i386/include/IOKit/stream/.svn/all-wcprops | 29 - i386/include/IOKit/stream/.svn/entries | 164 -- .../stream/.svn/text-base/IOStream.h.svn-base | 609 ----- .../.svn/text-base/IOStreamFamily.h.svn-base | 13 - .../.svn/text-base/IOStreamShared.h.svn-base | 175 -- .../text-base/IOStreamUserClient.h.svn-base | 76 - i386/include/IOKit/stream/IOStream.h | 609 ----- i386/include/IOKit/stream/IOStreamFamily.h | 13 - i386/include/IOKit/stream/IOStreamShared.h | 175 -- .../include/IOKit/stream/IOStreamUserClient.h | 76 - .../IOKit/system_management/.svn/all-wcprops | 11 - .../IOKit/system_management/.svn/entries | 62 - .../.svn/text-base/IOWatchDogTimer.h.svn-base | 55 - .../IOKit/system_management/IOWatchDogTimer.h | 55 - i386/include/IOKit/usb/.svn/all-wcprops | 155 -- i386/include/IOKit/usb/.svn/entries | 878 ------- .../text-base/IOUFIStorageServices.h.svn-base | 136 -- .../usb/.svn/text-base/IOUSBBus.h.svn-base | 35 - .../.svn/text-base/IOUSBCommand.h.svn-base | 266 -- .../text-base/IOUSBCompositeDriver.h.svn-base | 127 - .../.svn/text-base/IOUSBController.h.svn-base | 1073 -------- .../IOUSBControllerListElement.h.svn-base | 126 - .../text-base/IOUSBControllerV2.h.svn-base | 374 --- .../text-base/IOUSBControllerV3.h.svn-base | 233 -- .../usb/.svn/text-base/IOUSBDevice.h.svn-base | 639 ----- .../.svn/text-base/IOUSBHIDDriver.h.svn-base | 289 --- .../.svn/text-base/IOUSBHubDevice.h.svn-base | 247 -- .../text-base/IOUSBHubPolicyMaker.h.svn-base | 218 -- .../.svn/text-base/IOUSBInterface.h.svn-base | 264 -- .../usb/.svn/text-base/IOUSBLog.h.svn-base | 240 -- .../IOUSBMassStorageClass.h.svn-base | 507 ---- .../IOUSBMassStorageUFISubclass.h.svn-base | 355 --- .../usb/.svn/text-base/IOUSBNub.h.svn-base | 69 - .../usb/.svn/text-base/IOUSBPipe.h.svn-base | 387 --- .../text-base/IOUSBRootHubDevice.h.svn-base | 97 - .../.svn/text-base/IOUSBUserClient.h.svn-base | 144 -- .../.svn/text-base/IOUSBWorkLoop.h.svn-base | 64 - .../IOKit/usb/.svn/text-base/USB.h.svn-base | 1076 -------- .../usb/.svn/text-base/USBHub.h.svn-base | 240 -- .../usb/.svn/text-base/USBSpec.h.svn-base | 470 ---- .../.svn/text-base/USBTracepoints.h.svn-base | 662 ----- i386/include/IOKit/usb/IOUFIStorageServices.h | 136 -- i386/include/IOKit/usb/IOUSBBus.h | 35 - i386/include/IOKit/usb/IOUSBCommand.h | 266 -- i386/include/IOKit/usb/IOUSBCompositeDriver.h | 127 - i386/include/IOKit/usb/IOUSBController.h | 1073 -------- .../IOKit/usb/IOUSBControllerListElement.h | 126 - i386/include/IOKit/usb/IOUSBControllerV2.h | 374 --- i386/include/IOKit/usb/IOUSBControllerV3.h | 233 -- i386/include/IOKit/usb/IOUSBDevice.h | 639 ----- i386/include/IOKit/usb/IOUSBHIDDriver.h | 289 --- i386/include/IOKit/usb/IOUSBHubDevice.h | 247 -- i386/include/IOKit/usb/IOUSBHubPolicyMaker.h | 218 -- i386/include/IOKit/usb/IOUSBInterface.h | 264 -- i386/include/IOKit/usb/IOUSBLog.h | 240 -- .../include/IOKit/usb/IOUSBMassStorageClass.h | 507 ---- .../IOKit/usb/IOUSBMassStorageUFISubclass.h | 355 --- i386/include/IOKit/usb/IOUSBNub.h | 69 - i386/include/IOKit/usb/IOUSBPipe.h | 387 --- i386/include/IOKit/usb/IOUSBRootHubDevice.h | 97 - i386/include/IOKit/usb/IOUSBUserClient.h | 144 -- i386/include/IOKit/usb/IOUSBWorkLoop.h | 64 - i386/include/IOKit/usb/USB.h | 1076 -------- i386/include/IOKit/usb/USBHub.h | 240 -- i386/include/IOKit/usb/USBSpec.h | 470 ---- i386/include/IOKit/usb/USBTracepoints.h | 662 ----- i386/include/libkern/crypto/md5.h | 79 - i386/include/libkern/crypto/sha1.h | 70 - i386/include/libkern/ppc/OSByteOrder.h | 206 -- i386/include/mach-o/i386/swap.h | 96 - i386/include/mach-o/x86_64/reloc.h | 185 -- i386/include/mach/x86_64/.svn/all-wcprops | 17 - i386/include/mach/x86_64/.svn/entries | 96 - .../x86_64/.svn/text-base/task.h.svn-base | 1578 ------------ .../.svn/text-base/thread_act.h.svn-base | 1155 --------- i386/include/mach/x86_64/task.h | 1578 ------------ i386/include/mach/x86_64/thread_act.h | 1155 --------- 404 files changed, 131112 deletions(-) delete mode 100644 i386/include/IOKit/acpi/IOACPIPlatformDevice.h delete mode 100644 i386/include/IOKit/acpi/IOACPIPlatformExpert.h delete mode 100644 i386/include/IOKit/acpi/IOACPITypes.h delete mode 100644 i386/include/IOKit/ata/ATADeviceNub.h delete mode 100644 i386/include/IOKit/ata/ATATimerEventSource.h delete mode 100644 i386/include/IOKit/ata/IOATABusCommand.h delete mode 100644 i386/include/IOKit/ata/IOATABusInfo.h delete mode 100644 i386/include/IOKit/ata/IOATACommand.h delete mode 100644 i386/include/IOKit/ata/IOATAController.h delete mode 100644 i386/include/IOKit/ata/IOATADevConfig.h delete mode 100644 i386/include/IOKit/ata/IOATADevice.h delete mode 100644 i386/include/IOKit/ata/IOATARegI386.h delete mode 100644 i386/include/IOKit/ata/IOATATypes.h delete mode 100644 i386/include/IOKit/ata/IOPCIATA.h delete mode 100644 i386/include/IOKit/ata/MacIOATA.h delete mode 100644 i386/include/IOKit/audio/IOAudioControl.h delete mode 100644 i386/include/IOKit/audio/IOAudioControlUserClient.h delete mode 100644 i386/include/IOKit/audio/IOAudioDebug.h delete mode 100644 i386/include/IOKit/audio/IOAudioDefines.h delete mode 100644 i386/include/IOKit/audio/IOAudioDevice.h delete mode 100644 i386/include/IOKit/audio/IOAudioEngine.h delete mode 100644 i386/include/IOKit/audio/IOAudioEngineUserClient.h delete mode 100644 i386/include/IOKit/audio/IOAudioLevelControl.h delete mode 100644 i386/include/IOKit/audio/IOAudioPort.h delete mode 100644 i386/include/IOKit/audio/IOAudioSelectorControl.h delete mode 100644 i386/include/IOKit/audio/IOAudioStream.h delete mode 100644 i386/include/IOKit/audio/IOAudioToggleControl.h delete mode 100644 i386/include/IOKit/audio/IOAudioTypes.h delete mode 100644 i386/include/IOKit/avc/IOFireWireAVCCommand.h delete mode 100644 i386/include/IOKit/avc/IOFireWireAVCConsts.h delete mode 100644 i386/include/IOKit/avc/IOFireWireAVCRequestSpace.h delete mode 100644 i386/include/IOKit/avc/IOFireWireAVCTargetSpace.h delete mode 100644 i386/include/IOKit/avc/IOFireWireAVCUnit.h delete mode 100644 i386/include/IOKit/avc/IOFireWireAVCUserClientCommon.h delete mode 100644 i386/include/IOKit/avc/IOFireWirePCRSpace.h delete mode 100644 i386/include/IOKit/bluetooth/Bluetooth.h delete mode 100644 i386/include/IOKit/bluetooth/BluetoothAssignedNumbers.h delete mode 100644 i386/include/IOKit/bluetooth/IOBluetoothHCIController.h delete mode 100644 i386/include/IOKit/bluetooth/IOBluetoothHCIRequest.h delete mode 100644 i386/include/IOKit/bluetooth/IOBluetoothHIDDriver.h delete mode 100644 i386/include/IOKit/bluetooth/IOBluetoothHIDDriverTypes.h delete mode 100644 i386/include/IOKit/bluetooth/IOBluetoothInternal.h delete mode 100644 i386/include/IOKit/bluetooth/IOBluetoothTypes.h delete mode 100644 i386/include/IOKit/firewire/IOConfigDirectory.h delete mode 100644 i386/include/IOKit/firewire/IOFWAddressSpace.h delete mode 100644 i386/include/IOKit/firewire/IOFWAsyncStreamListener.h delete mode 100644 i386/include/IOKit/firewire/IOFWCommand.h delete mode 100644 i386/include/IOKit/firewire/IOFWDCL.h delete mode 100644 i386/include/IOKit/firewire/IOFWDCLPool.h delete mode 100644 i386/include/IOKit/firewire/IOFWDCLProgram.h delete mode 100644 i386/include/IOKit/firewire/IOFWDCLTranslator.h delete mode 100644 i386/include/IOKit/firewire/IOFWIsochChannel.h delete mode 100644 i386/include/IOKit/firewire/IOFWIsochPort.h delete mode 100644 i386/include/IOKit/firewire/IOFWLocalIsochPort.h delete mode 100644 i386/include/IOKit/firewire/IOFWPHYPacketListener.h delete mode 100644 i386/include/IOKit/firewire/IOFWPhysicalAddressSpace.h delete mode 100644 i386/include/IOKit/firewire/IOFWPseudoAddressSpace.h delete mode 100644 i386/include/IOKit/firewire/IOFWRegs.h delete mode 100644 i386/include/IOKit/firewire/IOFWSimpleContiguousPhysicalAddressSpace.h delete mode 100644 i386/include/IOKit/firewire/IOFWSimplePhysicalAddressSpace.h delete mode 100644 i386/include/IOKit/firewire/IOFWSyncer.h delete mode 100644 i386/include/IOKit/firewire/IOFWUserObjectExporter.h delete mode 100644 i386/include/IOKit/firewire/IOFWUtils.h delete mode 100644 i386/include/IOKit/firewire/IOFireWireBus.h delete mode 100644 i386/include/IOKit/firewire/IOFireWireController.h delete mode 100644 i386/include/IOKit/firewire/IOFireWireDevice.h delete mode 100644 i386/include/IOKit/firewire/IOFireWireFamilyCommon.h delete mode 100644 i386/include/IOKit/firewire/IOFireWireIRMAllocation.h delete mode 100644 i386/include/IOKit/firewire/IOFireWireLocalNode.h delete mode 100644 i386/include/IOKit/firewire/IOFireWireMultiIsochReceive.h delete mode 100644 i386/include/IOKit/firewire/IOFireWireNub.h delete mode 100644 i386/include/IOKit/firewire/IOFireWirePowerManager.h delete mode 100644 i386/include/IOKit/firewire/IOFireWireUnit.h delete mode 100644 i386/include/IOKit/firewire/IOLocalConfigDirectory.h delete mode 100644 i386/include/IOKit/firewire/IORemoteConfigDirectory.h delete mode 100644 i386/include/IOKit/graphics/IOAccelClientConnect.h delete mode 100644 i386/include/IOKit/graphics/IOAccelSurfaceConnect.h delete mode 100644 i386/include/IOKit/graphics/IOAccelTypes.h delete mode 100644 i386/include/IOKit/graphics/IOAccelerator.h delete mode 100644 i386/include/IOKit/graphics/IODisplay.h delete mode 100644 i386/include/IOKit/graphics/IOFramebuffer.h delete mode 100644 i386/include/IOKit/graphics/IOFramebufferShared.h delete mode 100644 i386/include/IOKit/graphics/IOGraphicsDevice.h delete mode 100644 i386/include/IOKit/graphics/IOGraphicsEngine.h delete mode 100644 i386/include/IOKit/graphics/IOGraphicsInterfaceTypes.h delete mode 100644 i386/include/IOKit/graphics/IOGraphicsTypes.h delete mode 100644 i386/include/IOKit/hid/IOHIDDevice.h delete mode 100644 i386/include/IOKit/hid/IOHIDElement.h delete mode 100644 i386/include/IOKit/hid/IOHIDInterface.h delete mode 100644 i386/include/IOKit/hid/IOHIDKeys.h delete mode 100644 i386/include/IOKit/hid/IOHIDUsageTables.h delete mode 100644 i386/include/IOKit/hidevent/IOHIDEventDriver.h delete mode 100644 i386/include/IOKit/hidevent/IOHIDEventService.h delete mode 100644 i386/include/IOKit/hidsystem/IOHIDDescriptorParser.h delete mode 100644 i386/include/IOKit/hidsystem/IOHIDParameter.h delete mode 100644 i386/include/IOKit/hidsystem/IOHIDShared.h delete mode 100644 i386/include/IOKit/hidsystem/IOHIDSystem.h delete mode 100644 i386/include/IOKit/hidsystem/IOHIDTypes.h delete mode 100644 i386/include/IOKit/hidsystem/IOHIDUsageTables.h delete mode 100644 i386/include/IOKit/hidsystem/IOHIDevice.h delete mode 100644 i386/include/IOKit/hidsystem/IOHIKeyboard.h delete mode 100644 i386/include/IOKit/hidsystem/IOHIKeyboardMapper.h delete mode 100644 i386/include/IOKit/hidsystem/IOHIPointing.h delete mode 100644 i386/include/IOKit/hidsystem/IOLLEvent.h delete mode 100644 i386/include/IOKit/hidsystem/ev_keymap.h delete mode 100644 i386/include/IOKit/i2c/IOI2CInterface.h delete mode 100644 i386/include/IOKit/ndrvsupport/IOMacOSTypes.h delete mode 100644 i386/include/IOKit/ndrvsupport/IOMacOSVideo.h delete mode 100644 i386/include/IOKit/ndrvsupport/IONDRVFramebuffer.h delete mode 100644 i386/include/IOKit/ndrvsupport/IONDRVLibraries.h delete mode 100644 i386/include/IOKit/ndrvsupport/IONDRVSupport.h delete mode 100644 i386/include/IOKit/network/IOBasicOutputQueue.h delete mode 100644 i386/include/IOKit/network/IOEthernetController.h delete mode 100644 i386/include/IOKit/network/IOEthernetInterface.h delete mode 100644 i386/include/IOKit/network/IOEthernetStats.h delete mode 100644 i386/include/IOKit/network/IOGatedOutputQueue.h delete mode 100644 i386/include/IOKit/network/IOKernelDebugger.h delete mode 100644 i386/include/IOKit/network/IOMbufMemoryCursor.h delete mode 100644 i386/include/IOKit/network/IONetworkController.h delete mode 100644 i386/include/IOKit/network/IONetworkData.h delete mode 100644 i386/include/IOKit/network/IONetworkInterface.h delete mode 100644 i386/include/IOKit/network/IONetworkMedium.h delete mode 100644 i386/include/IOKit/network/IONetworkStats.h delete mode 100644 i386/include/IOKit/network/IOOutputQueue.h delete mode 100644 i386/include/IOKit/network/IOPacketQueue.h delete mode 100644 i386/include/IOKit/nvram/IONVRAMController.h delete mode 100644 i386/include/IOKit/pci/IOAGPDevice.h delete mode 100644 i386/include/IOKit/pci/IOPCIBridge.h delete mode 100644 i386/include/IOKit/pci/IOPCIDevice.h delete mode 100644 i386/include/IOKit/platform/.svn/all-wcprops delete mode 100644 i386/include/IOKit/platform/.svn/entries delete mode 100644 i386/include/IOKit/platform/.svn/text-base/AppleMacIO.h.svn-base delete mode 100644 i386/include/IOKit/platform/.svn/text-base/AppleMacIODevice.h.svn-base delete mode 100644 i386/include/IOKit/platform/.svn/text-base/AppleNMI.h.svn-base delete mode 100644 i386/include/IOKit/platform/.svn/text-base/ApplePlatformExpert.h.svn-base delete mode 100644 i386/include/IOKit/platform/AppleMacIO.h delete mode 100644 i386/include/IOKit/platform/AppleMacIODevice.h delete mode 100644 i386/include/IOKit/platform/AppleNMI.h delete mode 100644 i386/include/IOKit/platform/ApplePlatformExpert.h delete mode 100644 i386/include/IOKit/power/.svn/all-wcprops delete mode 100644 i386/include/IOKit/power/.svn/entries delete mode 100644 i386/include/IOKit/power/.svn/text-base/IOPwrController.h.svn-base delete mode 100644 i386/include/IOKit/power/IOPwrController.h delete mode 100644 i386/include/IOKit/ppc/.svn/all-wcprops delete mode 100644 i386/include/IOKit/ppc/.svn/entries delete mode 100644 i386/include/IOKit/ppc/.svn/text-base/IODBDMA.h.svn-base delete mode 100644 i386/include/IOKit/ppc/IODBDMA.h delete mode 100644 i386/include/IOKit/pwr_mgt/.svn/all-wcprops delete mode 100644 i386/include/IOKit/pwr_mgt/.svn/entries delete mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/IOPM.h.svn-base delete mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMDeprecated.h.svn-base delete mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMLibDefs.h.svn-base delete mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPowerSource.h.svn-base delete mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPowerSourceList.h.svn-base delete mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPrivate.h.svn-base delete mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMpowerState.h.svn-base delete mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/IOPowerConnection.h.svn-base delete mode 100644 i386/include/IOKit/pwr_mgt/.svn/text-base/RootDomain.h.svn-base delete mode 100644 i386/include/IOKit/pwr_mgt/IOPM.h delete mode 100644 i386/include/IOKit/pwr_mgt/IOPMDeprecated.h delete mode 100644 i386/include/IOKit/pwr_mgt/IOPMLibDefs.h delete mode 100644 i386/include/IOKit/pwr_mgt/IOPMPowerSource.h delete mode 100644 i386/include/IOKit/pwr_mgt/IOPMPowerSourceList.h delete mode 100644 i386/include/IOKit/pwr_mgt/IOPMPrivate.h delete mode 100644 i386/include/IOKit/pwr_mgt/IOPMpowerState.h delete mode 100644 i386/include/IOKit/pwr_mgt/IOPowerConnection.h delete mode 100644 i386/include/IOKit/pwr_mgt/RootDomain.h delete mode 100644 i386/include/IOKit/rtc/.svn/all-wcprops delete mode 100644 i386/include/IOKit/rtc/.svn/entries delete mode 100644 i386/include/IOKit/rtc/.svn/text-base/IORTCController.h.svn-base delete mode 100644 i386/include/IOKit/rtc/IORTCController.h delete mode 100644 i386/include/IOKit/sbp2/.svn/all-wcprops delete mode 100644 i386/include/IOKit/sbp2/.svn/entries delete mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2LSIWorkaroundDescriptor.h.svn-base delete mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2LUN.h.svn-base delete mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2Login.h.svn-base delete mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2ManagementORB.h.svn-base delete mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2ORB.h.svn-base delete mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2Target.h.svn-base delete mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2UserClient.h.svn-base delete mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2UserClientCommon.h.svn-base delete mode 100644 i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSerialBusProtocolTransport.h.svn-base delete mode 100644 i386/include/IOKit/sbp2/IOFireWireSBP2LSIWorkaroundDescriptor.h delete mode 100644 i386/include/IOKit/sbp2/IOFireWireSBP2LUN.h delete mode 100644 i386/include/IOKit/sbp2/IOFireWireSBP2Login.h delete mode 100644 i386/include/IOKit/sbp2/IOFireWireSBP2ManagementORB.h delete mode 100644 i386/include/IOKit/sbp2/IOFireWireSBP2ORB.h delete mode 100644 i386/include/IOKit/sbp2/IOFireWireSBP2Target.h delete mode 100644 i386/include/IOKit/sbp2/IOFireWireSBP2UserClient.h delete mode 100644 i386/include/IOKit/sbp2/IOFireWireSBP2UserClientCommon.h delete mode 100644 i386/include/IOKit/sbp2/IOFireWireSerialBusProtocolTransport.h delete mode 100644 i386/include/IOKit/scsi/.svn/all-wcprops delete mode 100644 i386/include/IOKit/scsi/.svn/entries delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOBDServices.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOBlockStorageServices.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOCompactDiscServices.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/IODVDServices.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOReducedBlockServices.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIBlockCommandsDevice.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIMultimediaCommandsDevice.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceNub.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType00.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType05.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType07.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType0E.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIPrimaryCommandsDevice.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIProtocolInterface.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIProtocolServices.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/IOSCSIReducedBlockCommandsDevice.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSICmds_INQUIRY_Definitions.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSICmds_MODE_Definitions.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSICmds_READ_CAPACITY_Definitions.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSICmds_REPORT_LUNS_Definitions.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSICmds_REQUEST_SENSE_Defs.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSICommandDefinitions.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSICommandOperationCodes.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSIPort.h.svn-base delete mode 100644 i386/include/IOKit/scsi/.svn/text-base/SCSITask.h.svn-base delete mode 100644 i386/include/IOKit/scsi/IOBDServices.h delete mode 100644 i386/include/IOKit/scsi/IOBlockStorageServices.h delete mode 100644 i386/include/IOKit/scsi/IOCompactDiscServices.h delete mode 100644 i386/include/IOKit/scsi/IODVDServices.h delete mode 100644 i386/include/IOKit/scsi/IOReducedBlockServices.h delete mode 100644 i386/include/IOKit/scsi/IOSCSIBlockCommandsDevice.h delete mode 100644 i386/include/IOKit/scsi/IOSCSIMultimediaCommandsDevice.h delete mode 100644 i386/include/IOKit/scsi/IOSCSIPeripheralDeviceNub.h delete mode 100644 i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType00.h delete mode 100644 i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType05.h delete mode 100644 i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType07.h delete mode 100644 i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType0E.h delete mode 100644 i386/include/IOKit/scsi/IOSCSIPrimaryCommandsDevice.h delete mode 100644 i386/include/IOKit/scsi/IOSCSIProtocolInterface.h delete mode 100644 i386/include/IOKit/scsi/IOSCSIProtocolServices.h delete mode 100644 i386/include/IOKit/scsi/IOSCSIReducedBlockCommandsDevice.h delete mode 100644 i386/include/IOKit/scsi/SCSICmds_INQUIRY_Definitions.h delete mode 100644 i386/include/IOKit/scsi/SCSICmds_MODE_Definitions.h delete mode 100644 i386/include/IOKit/scsi/SCSICmds_READ_CAPACITY_Definitions.h delete mode 100644 i386/include/IOKit/scsi/SCSICmds_REPORT_LUNS_Definitions.h delete mode 100644 i386/include/IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h delete mode 100644 i386/include/IOKit/scsi/SCSICommandDefinitions.h delete mode 100644 i386/include/IOKit/scsi/SCSICommandOperationCodes.h delete mode 100644 i386/include/IOKit/scsi/SCSIPort.h delete mode 100644 i386/include/IOKit/scsi/SCSITask.h delete mode 100644 i386/include/IOKit/scsi/spi/.svn/all-wcprops delete mode 100644 i386/include/IOKit/scsi/spi/.svn/entries delete mode 100644 i386/include/IOKit/scsi/spi/.svn/text-base/IOSCSIParallelInterfaceController.h.svn-base delete mode 100644 i386/include/IOKit/scsi/spi/IOSCSIParallelInterfaceController.h delete mode 100644 i386/include/IOKit/serial/.svn/all-wcprops delete mode 100644 i386/include/IOKit/serial/.svn/entries delete mode 100644 i386/include/IOKit/serial/.svn/text-base/IOModemSerialStreamSync.h.svn-base delete mode 100644 i386/include/IOKit/serial/.svn/text-base/IORS232SerialStreamSync.h.svn-base delete mode 100644 i386/include/IOKit/serial/.svn/text-base/IOSerialDriverSync.h.svn-base delete mode 100644 i386/include/IOKit/serial/.svn/text-base/IOSerialKeys.h.svn-base delete mode 100644 i386/include/IOKit/serial/.svn/text-base/IOSerialStreamSync.h.svn-base delete mode 100644 i386/include/IOKit/serial/IOModemSerialStreamSync.h delete mode 100644 i386/include/IOKit/serial/IORS232SerialStreamSync.h delete mode 100644 i386/include/IOKit/serial/IOSerialDriverSync.h delete mode 100644 i386/include/IOKit/serial/IOSerialKeys.h delete mode 100644 i386/include/IOKit/serial/IOSerialStreamSync.h delete mode 100644 i386/include/IOKit/storage/.svn/all-wcprops delete mode 100644 i386/include/IOKit/storage/.svn/entries delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOAppleLabelScheme.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOApplePartitionScheme.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOBDBlockStorageDevice.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOBDBlockStorageDriver.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOBDMedia.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOBDMediaBSDClient.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOBDTypes.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOBlockStorageDevice.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOBlockStorageDriver.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOCDBlockStorageDevice.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOCDBlockStorageDriver.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOCDMedia.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOCDMediaBSDClient.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOCDPartitionScheme.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOCDTypes.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IODVDBlockStorageDevice.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IODVDBlockStorageDriver.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IODVDMedia.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IODVDMediaBSDClient.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IODVDTypes.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOFDiskPartitionScheme.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOFilterScheme.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOFireWireStorageCharacteristics.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOGUIDPartitionScheme.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOMedia.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOMediaBSDClient.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOPartitionScheme.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOStorage.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOStorageDeviceCharacteristics.h.svn-base delete mode 100644 i386/include/IOKit/storage/.svn/text-base/IOStorageProtocolCharacteristics.h.svn-base delete mode 100644 i386/include/IOKit/storage/IOAppleLabelScheme.h delete mode 100644 i386/include/IOKit/storage/IOApplePartitionScheme.h delete mode 100644 i386/include/IOKit/storage/IOBDBlockStorageDevice.h delete mode 100644 i386/include/IOKit/storage/IOBDBlockStorageDriver.h delete mode 100644 i386/include/IOKit/storage/IOBDMedia.h delete mode 100644 i386/include/IOKit/storage/IOBDMediaBSDClient.h delete mode 100644 i386/include/IOKit/storage/IOBDTypes.h delete mode 100644 i386/include/IOKit/storage/IOBlockStorageDevice.h delete mode 100644 i386/include/IOKit/storage/IOBlockStorageDriver.h delete mode 100644 i386/include/IOKit/storage/IOCDBlockStorageDevice.h delete mode 100644 i386/include/IOKit/storage/IOCDBlockStorageDriver.h delete mode 100644 i386/include/IOKit/storage/IOCDMedia.h delete mode 100644 i386/include/IOKit/storage/IOCDMediaBSDClient.h delete mode 100644 i386/include/IOKit/storage/IOCDPartitionScheme.h delete mode 100644 i386/include/IOKit/storage/IOCDTypes.h delete mode 100644 i386/include/IOKit/storage/IODVDBlockStorageDevice.h delete mode 100644 i386/include/IOKit/storage/IODVDBlockStorageDriver.h delete mode 100644 i386/include/IOKit/storage/IODVDMedia.h delete mode 100644 i386/include/IOKit/storage/IODVDMediaBSDClient.h delete mode 100644 i386/include/IOKit/storage/IODVDTypes.h delete mode 100644 i386/include/IOKit/storage/IOFDiskPartitionScheme.h delete mode 100644 i386/include/IOKit/storage/IOFilterScheme.h delete mode 100644 i386/include/IOKit/storage/IOFireWireStorageCharacteristics.h delete mode 100644 i386/include/IOKit/storage/IOGUIDPartitionScheme.h delete mode 100644 i386/include/IOKit/storage/IOMedia.h delete mode 100644 i386/include/IOKit/storage/IOMediaBSDClient.h delete mode 100644 i386/include/IOKit/storage/IOPartitionScheme.h delete mode 100644 i386/include/IOKit/storage/IOStorage.h delete mode 100644 i386/include/IOKit/storage/IOStorageDeviceCharacteristics.h delete mode 100644 i386/include/IOKit/storage/IOStorageProtocolCharacteristics.h delete mode 100644 i386/include/IOKit/storage/ata/.svn/all-wcprops delete mode 100644 i386/include/IOKit/storage/ata/.svn/entries delete mode 100644 i386/include/IOKit/storage/ata/.svn/text-base/IOATAPIProtocolTransport.h.svn-base delete mode 100644 i386/include/IOKit/storage/ata/.svn/text-base/IOATAStorageDefines.h.svn-base delete mode 100644 i386/include/IOKit/storage/ata/IOATAPIProtocolTransport.h delete mode 100644 i386/include/IOKit/storage/ata/IOATAStorageDefines.h delete mode 100644 i386/include/IOKit/stream/.svn/all-wcprops delete mode 100644 i386/include/IOKit/stream/.svn/entries delete mode 100644 i386/include/IOKit/stream/.svn/text-base/IOStream.h.svn-base delete mode 100644 i386/include/IOKit/stream/.svn/text-base/IOStreamFamily.h.svn-base delete mode 100644 i386/include/IOKit/stream/.svn/text-base/IOStreamShared.h.svn-base delete mode 100644 i386/include/IOKit/stream/.svn/text-base/IOStreamUserClient.h.svn-base delete mode 100644 i386/include/IOKit/stream/IOStream.h delete mode 100644 i386/include/IOKit/stream/IOStreamFamily.h delete mode 100644 i386/include/IOKit/stream/IOStreamShared.h delete mode 100644 i386/include/IOKit/stream/IOStreamUserClient.h delete mode 100644 i386/include/IOKit/system_management/.svn/all-wcprops delete mode 100644 i386/include/IOKit/system_management/.svn/entries delete mode 100644 i386/include/IOKit/system_management/.svn/text-base/IOWatchDogTimer.h.svn-base delete mode 100644 i386/include/IOKit/system_management/IOWatchDogTimer.h delete mode 100644 i386/include/IOKit/usb/.svn/all-wcprops delete mode 100644 i386/include/IOKit/usb/.svn/entries delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUFIStorageServices.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBBus.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBCommand.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBCompositeDriver.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBController.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBControllerListElement.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBControllerV2.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBControllerV3.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBDevice.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBHIDDriver.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBHubDevice.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBHubPolicyMaker.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBInterface.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBLog.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBMassStorageClass.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBMassStorageUFISubclass.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBNub.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBPipe.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBRootHubDevice.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBUserClient.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/IOUSBWorkLoop.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/USB.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/USBHub.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/USBSpec.h.svn-base delete mode 100644 i386/include/IOKit/usb/.svn/text-base/USBTracepoints.h.svn-base delete mode 100644 i386/include/IOKit/usb/IOUFIStorageServices.h delete mode 100644 i386/include/IOKit/usb/IOUSBBus.h delete mode 100644 i386/include/IOKit/usb/IOUSBCommand.h delete mode 100644 i386/include/IOKit/usb/IOUSBCompositeDriver.h delete mode 100644 i386/include/IOKit/usb/IOUSBController.h delete mode 100644 i386/include/IOKit/usb/IOUSBControllerListElement.h delete mode 100644 i386/include/IOKit/usb/IOUSBControllerV2.h delete mode 100644 i386/include/IOKit/usb/IOUSBControllerV3.h delete mode 100644 i386/include/IOKit/usb/IOUSBDevice.h delete mode 100644 i386/include/IOKit/usb/IOUSBHIDDriver.h delete mode 100644 i386/include/IOKit/usb/IOUSBHubDevice.h delete mode 100644 i386/include/IOKit/usb/IOUSBHubPolicyMaker.h delete mode 100644 i386/include/IOKit/usb/IOUSBInterface.h delete mode 100644 i386/include/IOKit/usb/IOUSBLog.h delete mode 100644 i386/include/IOKit/usb/IOUSBMassStorageClass.h delete mode 100644 i386/include/IOKit/usb/IOUSBMassStorageUFISubclass.h delete mode 100644 i386/include/IOKit/usb/IOUSBNub.h delete mode 100644 i386/include/IOKit/usb/IOUSBPipe.h delete mode 100644 i386/include/IOKit/usb/IOUSBRootHubDevice.h delete mode 100644 i386/include/IOKit/usb/IOUSBUserClient.h delete mode 100644 i386/include/IOKit/usb/IOUSBWorkLoop.h delete mode 100644 i386/include/IOKit/usb/USB.h delete mode 100644 i386/include/IOKit/usb/USBHub.h delete mode 100644 i386/include/IOKit/usb/USBSpec.h delete mode 100644 i386/include/IOKit/usb/USBTracepoints.h delete mode 100644 i386/include/libkern/crypto/md5.h delete mode 100644 i386/include/libkern/crypto/sha1.h delete mode 100644 i386/include/libkern/ppc/OSByteOrder.h delete mode 100644 i386/include/mach-o/i386/swap.h delete mode 100644 i386/include/mach-o/x86_64/reloc.h delete mode 100644 i386/include/mach/x86_64/.svn/all-wcprops delete mode 100644 i386/include/mach/x86_64/.svn/entries delete mode 100644 i386/include/mach/x86_64/.svn/text-base/task.h.svn-base delete mode 100644 i386/include/mach/x86_64/.svn/text-base/thread_act.h.svn-base delete mode 100644 i386/include/mach/x86_64/task.h delete mode 100644 i386/include/mach/x86_64/thread_act.h diff --git a/i386/include/IOKit/acpi/IOACPIPlatformDevice.h b/i386/include/IOKit/acpi/IOACPIPlatformDevice.h deleted file mode 100644 index ebf0ccf..0000000 --- a/i386/include/IOKit/acpi/IOACPIPlatformDevice.h +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Copyright (c) 2003-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOACPIPLATFORMDEVICE_H -#define _IOKIT_IOACPIPLATFORMDEVICE_H - -#include <libkern/c++/OSContainers.h> -#include <IOKit/IOPlatformExpert.h> -#include <IOKit/acpi/IOACPITypes.h> - -class IOACPIPlatformExpert; - -class IOACPIPlatformDevice : public IOPlatformDevice -{ - OSDeclareDefaultStructors( IOACPIPlatformDevice ) - -protected: - void * _deviceHandle; - UInt32 _deviceType; - UInt32 _powerFlags; - UInt32 * _powerStateFlags; - UInt32 _sleepPowerState; - IOService * _acpiParent; - IOACPIPlatformExpert * _platform; - - /*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties - of the class in the future. - */ - struct ExpansionData { }; - - /*! @var reserved - Reserved for future use. (Internal use only) - */ - ExpansionData * reserved; - - virtual bool initACPIPowerManagement( IOService * powerParent ); - virtual void stopACPIPowerManagement( IOService * powerParent ); - -public: - virtual bool init( IOService * platform, - void * handle, - OSDictionary * properties ); - - virtual void free( void ); - - virtual bool attachToParent( IORegistryEntry * parent, - const IORegistryPlane * plane ); - - virtual void detachFromParent( IORegistryEntry * parent, - const IORegistryPlane * plane ); - - virtual bool getPathComponent( char * path, int * length, - const IORegistryPlane * plane ) const; - - virtual bool compareName( OSString * name, - OSString ** matched ) const; - - virtual IOReturn getResources( void ); - - virtual void * getDeviceHandle( void ) const; - - virtual UInt32 getDeviceStatus( void ) const; - - enum { - kTypeDevice = 0, - kTypeProcessor = 1, - kTypePowerResource = 2 - }; - - virtual UInt32 getDeviceType( void ) const; - - virtual void setDeviceType( UInt32 deviceType ); - - // Method (object) evaluation - - virtual IOReturn validateObject( const OSSymbol * objectName ); - - virtual IOReturn validateObject( const char * objectName ); - - virtual IOReturn evaluateObject( const OSSymbol * objectName, - OSObject ** result = 0, - OSObject * params[] = 0, - IOItemCount paramCount = 0, - IOOptionBits options = 0 ); - - virtual IOReturn evaluateObject( const char * objectName, - OSObject ** result = 0, - OSObject * params[] = 0, - IOItemCount paramCount = 0, - IOOptionBits options = 0 ); - - virtual IOReturn evaluateInteger( const OSSymbol * objectName, - UInt32 * resultInt32, - OSObject * params[] = 0, - IOItemCount paramCount = 0, - IOOptionBits options = 0 ); - - virtual IOReturn evaluateInteger( const char * objectName, - UInt32 * resultInt32, - OSObject * params[] = 0, - IOItemCount paramCount = 0, - IOOptionBits options = 0 ); - - virtual IOReturn evaluateInteger( const OSSymbol * objectName, - UInt64 * resultInt64, - OSObject * params[] = 0, - IOItemCount paramCount = 0, - IOOptionBits options = 0 ); - - virtual IOReturn evaluateInteger( const char * objectName, - UInt64 * resultInt64, - OSObject * params[] = 0, - IOItemCount paramCount = 0, - IOOptionBits options = 0 ); - - // ACPI table access - - virtual const OSData * getACPITableData( const char * tableName, - UInt32 tableInstance = 0 ) const; - - // Map ACPI event to interrupt event source index - - virtual SInt32 installInterruptForFixedEvent( UInt32 fixedEvent ); - - virtual SInt32 installInterruptForGPE( UInt32 gpeNumber, - void * gpeBlockDevice = 0, - IOOptionBits options = 0 ); - - // ACPI global lock acquire/release - - virtual IOReturn acquireGlobalLock( UInt32 * lockToken, - const mach_timespec_t * timeout = 0 ); - - virtual void releaseGlobalLock( UInt32 lockToken ); - - // Address space handler registration - - virtual IOReturn registerAddressSpaceHandler( - IOACPIAddressSpaceID spaceID, - IOACPIAddressSpaceHandler handler, - void * context, - IOOptionBits options = 0 ); - - virtual void unregisterAddressSpaceHandler( - IOACPIAddressSpaceID spaceID, - IOACPIAddressSpaceHandler handler, - IOOptionBits options = 0 ); - - // Address space access - - virtual IOReturn readAddressSpace( UInt64 * value, - IOACPIAddressSpaceID spaceID, - IOACPIAddress address, - UInt32 bitWidth, - UInt32 bitOffset = 0, - IOOptionBits options = 0 ); - - virtual IOReturn writeAddressSpace( UInt64 value, - IOACPIAddressSpaceID spaceID, - IOACPIAddress address, - UInt32 bitWidth, - UInt32 bitOffset = 0, - IOOptionBits options = 0 ); - - // Power management - - virtual bool hasSystemWakeCapability( void ) const; - - virtual IOReturn setSystemWakeCapabilityEnable( bool enable ); - - virtual bool hasACPIPowerStateSupport( UInt32 powerState ) const; - - virtual IOReturn setACPIPowerManagementEnable( - bool enable, - UInt32 powerState = kIOACPIDevicePowerStateD3, - IOOptionBits options = 0 ); - - virtual IOReturn setPowerState( unsigned long powerState, - IOService * whatDevice ); - - // I/O space helpers - - virtual void ioWrite32( UInt16 offset, UInt32 value, - IOMemoryMap * map = 0 ); - - virtual void ioWrite16( UInt16 offset, UInt16 value, - IOMemoryMap * map = 0 ); - - virtual void ioWrite8( UInt16 offset, UInt8 value, - IOMemoryMap * map = 0 ); - - virtual UInt32 ioRead32( UInt16 offset, IOMemoryMap * map = 0 ); - - virtual UInt16 ioRead16( UInt16 offset, IOMemoryMap * map = 0 ); - - virtual UInt8 ioRead8( UInt16 offset, IOMemoryMap * map = 0 ); - - // vtable padding - - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 0 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 1 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 2 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 3 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 4 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 5 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 6 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 7 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 8 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 9 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 10 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 11 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 12 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 13 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 14 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 15 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 16 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 17 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 18 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 19 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 20 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 21 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 22 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 23 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 24 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 25 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 26 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 27 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 28 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 29 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 30 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformDevice, 31 ); -}; - -#endif /* !_IOKIT_IOACPIPLATFORMDEVICE_H */ diff --git a/i386/include/IOKit/acpi/IOACPIPlatformExpert.h b/i386/include/IOKit/acpi/IOACPIPlatformExpert.h deleted file mode 100644 index 413f396..0000000 --- a/i386/include/IOKit/acpi/IOACPIPlatformExpert.h +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 2003-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOACPIPLATFORMEXPERT_H -#define _IOKIT_IOACPIPLATFORMEXPERT_H - -#include <IOKit/IOPlatformExpert.h> // superclass -#include <IOKit/acpi/IOACPIPlatformDevice.h> // children - -class IOACPIPlatformExpert : public IODTPlatformExpert -{ - OSDeclareAbstractStructors( IOACPIPlatformExpert ) - - friend class IOACPIPlatformDevice; - -protected: - /*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties - of the class in the future. - */ - struct ExpansionData { }; - - /*! @var reserved - Reserved for future use. (Internal use only) - */ - ExpansionData * reserved; - -public: - virtual bool start( IOService * provider ); - -protected: - // Map ACPI event to interrupt event source index - - virtual SInt32 installDeviceInterruptForFixedEvent( - IOService * device, - UInt32 fixedEvent ) = 0; - - virtual SInt32 installDeviceInterruptForGPE( - IOService * device, - UInt32 gpeNumber, - void * gpeBlockDevice, - IOOptionBits options ) = 0; - - // ACPI global lock acquisition - - virtual IOReturn acquireGlobalLock( IOService * client, - UInt32 * lockToken, - const mach_timespec_t * timeout ) = 0; - - virtual void releaseGlobalLock( IOService * client, - UInt32 lockToken ) = 0; - - // ACPI method and object evaluation - - virtual IOReturn validateObject( IOACPIPlatformDevice * device, - const OSSymbol * objectName ) = 0; - - virtual IOReturn validateObject( IOACPIPlatformDevice * device, - const char * objectName ); - - virtual IOReturn evaluateObject( IOACPIPlatformDevice * device, - const OSSymbol * objectName, - OSObject ** result, - OSObject * params[], - IOItemCount paramCount, - IOOptionBits options ) = 0; - - virtual IOReturn evaluateObject( IOACPIPlatformDevice * device, - const char * objectName, - OSObject ** result, - OSObject * params[], - IOItemCount paramCount, - IOOptionBits options ); - - // ACPI table - - virtual const OSData * getACPITableData( - const char * tableName, - UInt32 tableInstance ) = 0; - - // Address space handler - - virtual IOReturn registerAddressSpaceHandler( - IOACPIPlatformDevice * device, - IOACPIAddressSpaceID spaceID, - IOACPIAddressSpaceHandler handler, - void * context, - IOOptionBits options ) = 0; - - virtual void unregisterAddressSpaceHandler( - IOACPIPlatformDevice * device, - IOACPIAddressSpaceID spaceID, - IOACPIAddressSpaceHandler handler, - IOOptionBits options ) = 0; - - // Address space read/write - - virtual IOReturn readAddressSpace( UInt64 * value, - IOACPIAddressSpaceID spaceID, - IOACPIAddress address, - UInt32 bitWidth, - UInt32 bitOffset, - IOOptionBits options ) = 0; - - virtual IOReturn writeAddressSpace( UInt64 value, - IOACPIAddressSpaceID spaceID, - IOACPIAddress address, - UInt32 bitWidth, - UInt32 bitOffset, - IOOptionBits options ) = 0; - - // Device power management - - virtual IOReturn setDevicePowerState( IOACPIPlatformDevice * device, - UInt32 powerState ) = 0; - - virtual IOReturn getDevicePowerState( IOACPIPlatformDevice * device, - UInt32 * powerState ) = 0; - - virtual IOReturn setDeviceWakeEnable( IOACPIPlatformDevice * device, - bool enable ) = 0; - - // vtable padding - - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 0 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 1 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 2 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 3 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 4 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 5 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 6 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 7 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 8 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 9 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 10 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 11 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 12 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 13 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 14 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 15 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 16 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 17 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 18 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 19 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 20 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 21 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 22 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 23 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 24 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 25 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 26 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 27 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 28 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 29 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 30 ); - OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 31 ); -}; - -#endif /* !_IOKIT_IOACPIPLATFORMEXPERT_H */ diff --git a/i386/include/IOKit/acpi/IOACPITypes.h b/i386/include/IOKit/acpi/IOACPITypes.h deleted file mode 100644 index 6215cd4..0000000 --- a/i386/include/IOKit/acpi/IOACPITypes.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2003-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __IOKIT_IOACPITYPES_H -#define __IOKIT_IOACPITYPES_H - -#include <IOKit/IOMessage.h> - -extern const IORegistryPlane * gIOACPIPlane; -extern const OSSymbol * gIOACPIHardwareIDKey; -extern const OSSymbol * gIOACPIUniqueIDKey; -extern const OSSymbol * gIOACPIAddressKey; -extern const OSSymbol * gIOACPIDeviceStatusKey; - -#pragma pack(1) - -struct IOACPIAddressSpaceDescriptor { - UInt32 resourceType; - UInt32 generalFlags; - UInt32 typeSpecificFlags; - UInt32 reserved1; - UInt64 granularity; - UInt64 minAddressRange; - UInt64 maxAddressRange; - UInt64 translationOffset; - UInt64 addressLength; - UInt64 reserved2; - UInt64 reserved3; - UInt64 reserved4; -}; - -enum { - kIOACPIMemoryRange = 0, - kIOACPIIORange = 1, - kIOACPIBusNumberRange = 2 -}; - -typedef UInt32 IOACPIAddressSpaceID; - -enum { - kIOACPIAddressSpaceIDSystemMemory = 0, - kIOACPIAddressSpaceIDSystemIO = 1, - kIOACPIAddressSpaceIDPCIConfiguration = 2, - kIOACPIAddressSpaceIDEmbeddedController = 3, - kIOACPIAddressSpaceIDSMBus = 4 -}; - -/* - * Address space operation - */ -enum { - kIOACPIAddressSpaceOpRead = 0, - kIOACPIAddressSpaceOpWrite = 1 -}; - -/* - * 64-bit ACPI address - */ -union IOACPIAddress { - UInt64 addr64; - struct { - unsigned int offset :16; - unsigned int function :3; - unsigned int device :5; - unsigned int bus :8; - unsigned int segment :16; - unsigned int reserved :16; - } pci; -}; - -/* - * Address space handler - */ -typedef IOReturn (*IOACPIAddressSpaceHandler)( UInt32 operation, - IOACPIAddress address, - UInt64 * value, - UInt32 bitWidth, - UInt32 bitOffset, - void * context ); - -/* - * ACPI fixed event types - */ -enum { - kIOACPIFixedEventPMTimer = 0, - kIOACPIFixedEventPowerButton = 2, - kIOACPIFixedEventSleepButton = 3, - kIOACPIFixedEventRealTimeClock = 4 -}; - -#pragma pack() - -/* - * FIXME: Move to xnu/iokit to reserve the ACPI family code. - */ -#ifndef sub_iokit_acpi -#define sub_iokit_acpi err_sub(10) -#endif - -/* - * ACPI notify message sent to all clients and interested parties. - * The notify code can be read from the argument as an UInt32. - */ -#define kIOACPIMessageDeviceNotification iokit_family_msg(sub_iokit_acpi, 0x10) - -/* - * ACPI device power states - */ -enum { - kIOACPIDevicePowerStateD0 = 0, - kIOACPIDevicePowerStateD1 = 1, - kIOACPIDevicePowerStateD2 = 2, - kIOACPIDevicePowerStateD3 = 3, - kIOACPIDevicePowerStateCount = 4 -}; - -#endif /* !__IOKIT_IOACPITYPES_H */ diff --git a/i386/include/IOKit/ata/ATADeviceNub.h b/i386/include/IOKit/ata/ATADeviceNub.h deleted file mode 100644 index db14182..0000000 --- a/i386/include/IOKit/ata/ATADeviceNub.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - @header ATADeviceNub.h - @abstract A concrete implementation of IOATADevice. - */ - -#ifndef _ATADEVICENUB_H -#define _ATADEVICENUB_H - -#include <IOKit/IOTypes.h> -#include "IOATATypes.h" -#include "IOATADevice.h" -#include "IOATAController.h" - -#include "IOATABusCommand.h" - - -/*! -@class ATADeviceNub -@abstract ATADeviceNub is a concrete implementation of IOATADevice. -@discussion clients of IOATA (disk drivers) should use the interface presented -by IOATADevice. Concrete nubs are private to the IOATA family and -specific subclasses of IOATADevice are instantiated by controller -drivers to provide the abstract interface to clients. - -*/ -class ATADeviceNub : public IOATADevice -{ - OSDeclareDefaultStructors(ATADeviceNub); - -public: - - /*!@function ataDeviceNub - @abstract static creator function - used by IOATAControllers to create nubs. - */ - static ATADeviceNub* ataDeviceNub( IOATAController* provider, ataUnitID unit, ataDeviceType devType); - - /*!@function attach - @abstract override of IOService method. - */ - virtual bool attach(IOService* provider ); - - - // overrides from IOATADevice to provide actual client interface - - - /*!@function executeCommand - @abstract Submit IO requests - */ - virtual IOReturn executeCommand(IOATACommand* command); - - // create and destroy IOATACommands - /*!@function allocCommand - @abstract create command objects for clients. - */ - virtual IOATACommand* allocCommand( void ); - - /*!@function freeCommand - @abstract Clients use this method to dispose of command objects. - */ - virtual void freeCommand( IOATACommand* inCommand); - - -protected: - - /*!@function init - @abstract used after creating the nub. - */ - virtual bool init(IOATAController* provider, ataUnitID unit, ataDeviceType devType); - - /*!@function publishProperties - @abstract publish the nub's properties in the device tree. - */ - virtual void publishProperties( void ); - - /*!@function publishBusProperties - @abstract puts info about this device's bus capability in the device tree. - */ - virtual void publishBusProperties(void); - - /*!@function publishVendorProperties - @abstract will be deprecated. - */ - virtual void publishVendorProperties( void ); - - /*!@function getDeviceID - @abstract get the unit id of this drive (0 or 1) - */ - virtual IOReturn getDeviceID(void); - - /*!@function MyATACallback - @abstract to be deprecated. - */ - static void MyATACallback(IOATACommand* command ); - - /*!@function processCallback - @abstract to be deprecated. - */ - void processCallback(IOATACommand* command ); - - /*!@function swapBytes16 - @abstract to be deprecated. - */ - void swapBytes16( UInt8* dataBuffer, IOByteCount length); - - UInt8* buffer; - -protected: -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the ATADeviceNub in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - -private: - OSMetaClassDeclareReservedUnused(ATADeviceNub, 0); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 1); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 2); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 3); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 4); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 5); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 6); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 7); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 8); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 9); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 10); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 11); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 12); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 13); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 14); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 15); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 16); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 17); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 18); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 19); - OSMetaClassDeclareReservedUnused(ATADeviceNub, 20); - -}; - -#endif /* !_IOATABUSNUB_H */ diff --git a/i386/include/IOKit/ata/ATATimerEventSource.h b/i386/include/IOKit/ata/ATATimerEventSource.h deleted file mode 100644 index 864fa9e..0000000 --- a/i386/include/IOKit/ata/ATATimerEventSource.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2001-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _ATATIMEREVENTSOURCE_H -#define _ATATIMEREVENTSOURCE_H - - -#include <IOKit/IOTypes.h> -#include <IOKit/IOCommandGate.h> -#include <IOKit/IOService.h> -#include <IOKit/IOWorkLoop.h> -#include <IOKit/IOTimerEventSource.h> - - -/*! -@class ATATimerEventSource - -@discussion -Extend the timer event source to allow checking for timer expiration -from behind the workloop. -*/ - -class ATATimerEventSource : public IOTimerEventSource -{ - OSDeclareDefaultStructors(ATATimerEventSource); - - public: - - /*!@function ataTimerEventSource - @abstract allocate an instance of this type. - */ - static ATATimerEventSource * - ataTimerEventSource(OSObject *owner, Action action = 0); - - /*!@function hasTimedOut - @abstract returns true if the timer has expired since the last enable/disable or setTimeout() or wakeAtTime() call. - */ - virtual bool hasTimedOut( void ); - - // override to initialize the time out flag. - /*!@function - @abstract - */ - virtual bool init(OSObject *owner, Action action = 0); - - /*!@function enable - @abstract overrides in order to set/clear the timed out flag - */ - virtual void enable(); - - /*!@function disable - @abstract overrides in order to set/clear the timed out flag - */ - virtual void disable(); - - /*!@function wakeAtTime - @abstract overrides in order to set/clear the timed out flag - */ - virtual IOReturn wakeAtTime(UnsignedWide abstime); - - /*!@function cancelTimeout - @abstract overrides in order to set/clear the timed out flag - */ - virtual void cancelTimeout(); - -protected: - - enum{ kTimedOutTrue = 'true', - kTimedOutFalse = 'fals' - }; - - UInt32 hasExpired; - - - /*!@function myTimeout - @abstract my timeout function which sets the timedOut flag atomically. - */ - static void myTimeout(void *self); - - /*!@function setTimeoutFunc - @abstract override to install my timeout function instead of the super's. - */ - virtual void setTimeoutFunc(); - - /*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. - */ - struct ExpansionData { }; - - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - -private: - OSMetaClassDeclareReservedUnused(ATATimerEventSource, 0); - OSMetaClassDeclareReservedUnused(ATATimerEventSource, 1); - OSMetaClassDeclareReservedUnused(ATATimerEventSource, 2); - OSMetaClassDeclareReservedUnused(ATATimerEventSource, 3); - OSMetaClassDeclareReservedUnused(ATATimerEventSource, 4); - OSMetaClassDeclareReservedUnused(ATATimerEventSource, 5); - OSMetaClassDeclareReservedUnused(ATATimerEventSource, 6); - OSMetaClassDeclareReservedUnused(ATATimerEventSource, 7); - -}; - - -#endif /*_ATATIMEREVENTSOURCE_H*/ diff --git a/i386/include/IOKit/ata/IOATABusCommand.h b/i386/include/IOKit/ata/IOATABusCommand.h deleted file mode 100644 index 94b3bca..0000000 --- a/i386/include/IOKit/ata/IOATABusCommand.h +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/* - * - * IOATABusCommand.h - * - */ - -#ifndef _IOATABUSCOMMAND_H -#define _IOATABUSCOMMAND_H - -#include <IOKit/IOTypes.h> -#include "IOATATypes.h" -#include "IOATACommand.h" - - -class IOSyncer; - - -/*! - -@class IOATABusCommand - -@discussion ATA Device (disk) drivers should use the superclass, IOATACommand -and may not derive or use any subclass of IOATACommand. - -IOATABusCommand is the subclass of IOATACommand used by -IOATAControllers. Controller classes may override this class to -provide additional fields as their needs dictate or may use this -as a concrete class if it is sufficient. - -IOATAControllers are always paired with specific IOATADevices -and each specific subclass of IOATADevice is in turn the factory method -for IOATACommands for use by disk drivers. - -In this manner, mass-storage device drivers (disk drivers, clients of -ATA bus controllers) see only the generalized interface of IOATADevice -and the generalized interface of IOATACommand. This provides isolation -from specific bus details for disk drivers and offers flexibility to -controllers to add per-command fields and state variables for their own -internal use. - -*/ - -class IOATABusCommand : public IOATACommand { - - OSDeclareDefaultStructors( IOATABusCommand ); - - public: - - // data items for use by IOATAController - - /*! @var queueChain queue header for use by IOATAController. */ - queue_chain_t queueChain; - - /*! @var state state-semaphore for use by IOATAController */ - UInt32 state; - - /*! @var syncer IOSyncer for use by IOATAController */ - IOSyncer* syncer; - - - - /*!@function allocateCmd - @abstract factory method to create an instance of this class used by subclasses of IOATADevice - */ - static IOATABusCommand* allocateCmd(void); - - /*!@function zeroCommand - @abstract set to blank state, call prior to re-use of this object - */ - virtual void zeroCommand(void); - - /*!@function getOpcode - @abstract return the command opcode - */ - virtual ataOpcode getOpcode( void ); - - /*!@function getFlags - @abstract return the flags for this command. - */ - virtual ataFlags getFlags ( void ); - - /*!@function getRegMask - @abstract get the register mask for desired regs - */ - virtual ataRegMask getRegMask( void ); - - /*!@function getUnit - @abstract return the unit id (0 master, 1 slave) - */ - virtual ataUnitID getUnit( void ); - - /*!@function getTimeoutMS - @abstract return the timeout value for this command - */ - virtual UInt32 getTimeoutMS (void ); - - /*!@function setResult - @abstract set the result code - */ - virtual void setResult( IOReturn ); - - /*!@function getCallbackPtr - @abstract return the callback pointer - */ - virtual IOATACompletionFunction* getCallbackPtr (void ); - - - /*!@function executeCallback - @abstract call the completion callback function - */ - virtual void executeCallback(void); - - /*!@function getTaskFilePtr - @abstract return the taskfile structure pointer. - */ - virtual ataTaskFile* getTaskFilePtr(void); - - /*!@function getPacketSize - @abstract return the size of atapi packet if any. - */ - virtual UInt16 getPacketSize(void); - - /*!@function getPacketData - @abstract return pointer to the array of packet data. - */ - virtual UInt16* getPacketData(void); - - /*!@function getTransferChunkSize - @abstract number of bytes between interrupts. - */ - virtual IOByteCount getTransferChunkSize(void); - - /*!@function setActualTransfer - @abstract set the byte count of bytes actually transferred. - */ - virtual void setActualTransfer ( IOByteCount bytesTransferred ); - - /*!@function getBuffer - @abstract get pointer to the memory descriptor for this transaction - */ - virtual IOMemoryDescriptor* getBuffer ( void); - - /*!@function getPosition - @abstract the position within the memory buffer for the transaction. - */ - virtual IOByteCount getPosition (void); - - /*!@function getByteCount - @abstract return the byte count for this transaction to transfer. - */ - virtual IOByteCount getByteCount (void); - - /*!@function setCommandInUse - @abstract mark the command as being in progress. - */ - virtual void setCommandInUse( bool inUse = true); - - - protected: - - // - /*!@function init - @abstract Zeroes all data, returns false if allocation fails. protected. - */ - virtual bool init(); - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - -private: - OSMetaClassDeclareReservedUnused(IOATABusCommand, 0); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 1); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 2); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 3); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 4); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 5); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 6); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 7); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 8); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 9); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 10); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 11); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 12); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 13); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 14); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 15); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 16); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 17); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 18); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 19); - OSMetaClassDeclareReservedUnused(IOATABusCommand, 20); -}; - -#include <IOKit/IODMACommand.h> - -class IOATABusCommand64 : public IOATABusCommand -{ - - OSDeclareDefaultStructors( IOATABusCommand64 ); - - public: - - // new features - static IOATABusCommand64* allocateCmd32(void); - virtual IODMACommand* GetDMACommand( void ); - - - - // overrides for IODMACommand setup - virtual void zeroCommand(void); - virtual void setBuffer ( IOMemoryDescriptor* inDesc); - virtual void setCommandInUse( bool inUse = true); - virtual void executeCallback(void); - - - protected: - IODMACommand* _dmaCmd; - virtual bool init(); - virtual void free(); -}; - -#endif /*_IOATABUSCOMMAND_H*/ diff --git a/i386/include/IOKit/ata/IOATABusInfo.h b/i386/include/IOKit/ata/IOATABusInfo.h deleted file mode 100644 index 6faec4c..0000000 --- a/i386/include/IOKit/ata/IOATABusInfo.h +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) 2000-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOATABUSINFO_H -#define _IOATABUSINFO_H - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOTypes.h> -#include "IOATATypes.h" - -/*! -@class IOATABusInfo -@discussion used to indicate the capabilities of the bus the device is connected to, PIO and DMA modes supported, etc. -*/ - -class IOATABusInfo : public OSObject -{ - OSDeclareDefaultStructors( IOATABusInfo ); - - public: - - /*!@function atabusinfo - @abstract factory method - */ - static IOATABusInfo* atabusinfo(void); - - /*!@function zeroData - @abstract set this object to a blank state. - */ - virtual void zeroData(void); - - // Used by clients of ATAControllers to find out about the bus - // capability. - - /*!@function getSocketType - @abstract returns the socket type, internal fixed, media-bay, PC-Card - Used by clients of ATAControllers to find out about the bus - */ - ataSocketType getSocketType( void ); - - /*!@function getPIOModes - @abstract returns the bit-significant map of PIO mode(s) supported on the bus. - Used by clients of ATAControllers to find out about the bus. - */ - UInt8 getPIOModes( void ); - - /*!@function getDMAModes - @abstract bit-significant map of DMA mode(s) supported on the bus. - Used by clients of ATAControllers to find out about the bus. - */ - UInt8 getDMAModes( void ); - - /*!@function getUltraModes - @abstract bit-significant map of Ultra mode(s) supported on the bus. - Used by clients of ATAControllers to find out about the bus. - */ - UInt8 getUltraModes( void ); - - /*!@function getUnits - @abstract How many devices are present on bus. - Used by clients of ATAControllers to find out about the bus. - */ - UInt8 getUnits( void ); - - /*!@function supportsDMA - @abstract True = DMA supported on bus - inferred by looking at the DMA mode bits. - Used by clients of ATAControllers to find out about the bus. - */ - bool supportsDMA( void ); - - /*!@function supportsExtendedLBA - @abstract Supports 48-bit LBA if true. - Used by clients of ATAControllers to find out about the bus. - */ - bool supportsExtendedLBA( void ); - - /*!@function maxBlocksExtended - @abstract The maximum number of 512-byte blocks this controller supports - in a single Extended LBA transfer. Some controllers may be limited to less than - the maximum sector count allowed under extended LBA protocol. - */ - UInt16 maxBlocksExtended(void); - - /*!@function supportsOverlapped - @abstract Supports overlapped packet feature set if true. - Used by clients of ATAControllers to find out about the bus. - */ - bool supportsOverlapped( void ); - - /*!@function supportsDMAQueued - @abstract Supports DMA Queued Feature set if true. - Used by clients of ATAControllers to find out about the bus. - */ - bool supportsDMAQueued( void ); - - - // Used by ATAControllers to generate an information object. - // Would not be used by disk device drivers normally. - // Bus controllers should set these items everytime. - - /*!@function setSocketType - @abstract internal fixed, media-bay, PC-Card. Set by ATAControllers. - */ - void setSocketType( ataSocketType inSocketType ); - - /*!@function setPIOModes - @abstract Bit significant map of supported transfer modes. Set by ATAControllers. - */ - void setPIOModes( UInt8 inModeBitMap); - - /*!@function setDMAModes - @abstract Bit significant map of supported transfer modes. Set by ATAControllers. - */ - void setDMAModes( UInt8 inModeBitMap ); - - /*!@function setUltraModes - @abstract Bit significant map of supported transfer modes. Set by ATAControllers. - */ - void setUltraModes( UInt8 inModeBitMap ); - - /*!@function setUnits - @abstract set to indicate how many devices are on this bus. Set by ATAControllers. - */ - void setUnits( UInt8 inNumUnits ); - - // Optional bus protocols some busses may support - /*!@function setExtendedLBA - @abstract Set true for supports 48-bit LBA. Set by ATAControllers. - */ - void setExtendedLBA( bool inState ); - - /*!function setMaxBlocksExtended - @abstract value set by controllers to indicate the maximum number of blocks - allowed in a single transfer of data. Some dma engines may not be capable of supporting the full - 16-bit worth of sector count allowed under 48 bit extended LBA. Default is 256 blocks, same as - standard ATA. - */ - void setMaxBlocksExtended( UInt16 inMaxBlocks); - - /*!@function setOverlapped - @abstract Set true for supports overlapped packet feature set. Set by ATAControllers. - */ - void setOverlapped( bool inState); - - /*!@function setDMAQueued - @abstract Set true if supports DMA Queued Feature. Set by ATAControllers. - */ - void setDMAQueued( bool inState); // - - protected: - - UInt8 _PIOModes; /* PIO modes supported (bit-significant) */ - UInt8 _MultiDMAModes; /* <--: Multiword DMA modes supported (b-sig) */ - UInt8 _UltraDMAModes; /* <--: Ultra DMA modes supported (b-sig) */ - bool _ExtendedLBA; /* <--: Suppports 48-bit LBA protocol */ - bool _Overlapped; /* <--: Supports overlapped packet feature set */ - bool _DMAQueued; /* <--: Supports DMA Queued Feature set */ - ataSocketType _SocketType; /* <--: Indicates bus is fixed internal, removable media-bay, removable PC-Card or unknown type */ - UInt8 _numUnits; /* <--: How many devices on this bus */ - UInt16 _maxBlocksExtended; - - protected: -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - virtual bool init(); - -private: - OSMetaClassDeclareReservedUnused(IOATABusInfo, 0); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 1); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 2); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 3); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 4); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 5); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 6); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 7); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 8); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 9); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 10); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 11); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 12); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 13); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 14); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 15); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 16); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 17); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 18); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 19); - OSMetaClassDeclareReservedUnused(IOATABusInfo, 20); -}; - - -#endif /* !_IOATABUSINFO_H */ diff --git a/i386/include/IOKit/ata/IOATACommand.h b/i386/include/IOKit/ata/IOATACommand.h deleted file mode 100644 index 773f28a..0000000 --- a/i386/include/IOKit/ata/IOATACommand.h +++ /dev/null @@ -1,478 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/* - * - * IOATACommand.h - * - */ - -#ifndef _IOATACOMMAND_H -#define _IOATACOMMAND_H - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOTypes.h> -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IOCommand.h> -#include "IOATATypes.h" - - -class IOExtendedLBA; -class IOATACommand; - - -/*! @typedef IOATACompletionFunction callback function for ATA disk devices. -*/ -typedef void (IOATACompletionFunction)(IOATACommand* command ); - - -/*! -@class IOATACommand - -@discussion -Command structure superclass, created and freed only by IOATADevice objects -populated by disk device drivers with command parameters -then submitted for operation to their IOATADevice provider for execution. - -IOATACommand is a virtual class, a concrete subclass contains the methods and fields needed -by IOATAControllers. Subclasses may be specific to particular controller hardware. -Disk device drivers will only have visibility to this interface and may not subclass this object. -Disk device drivers should instead make use of the void* refcon field which the controllers will not -touch -*/ - -class IOATACommand : public IOCommand { - - OSDeclareAbstractStructors( IOATACommand ); - - public: - - /*!@function zeroCommand - @abstract set to blank state, MUST call prior to re-use of this object - */ - virtual void zeroCommand(void); - - /*!@function setOpcode - @abstract command opcode as defined in IOATATypes. - */ - virtual void setOpcode( ataOpcode inCode); - - /*!@function setFlags - @abstract set the flags for this command, as defined in IOATATypes. - */ - virtual void setFlags( UInt32 inFlags); - - /*!@function setUnit - @abstract set the unit number for this command. - */ - virtual void setUnit( ataUnitID inUnit); - - /*!@function setTimeoutMS - @abstract how long to allow this command to complete, in milliseconds, once issued to - the hardware. if the time period expires, this command will return with a timeout error. - */ - virtual void setTimeoutMS( UInt32 inMs); - - /*!@function setCallbackPtr - @abstract set the function pointer to call when this command completes. - */ - virtual void setCallbackPtr (IOATACompletionFunction* inCompletion); - - /*!@function setRegMask - @abstract used when accessing registers or reading registers on an error result. Mask is defined - in IOATATypes.h - */ - virtual void setRegMask( ataRegMask mask); - - // memory information - // Since ATA hardware is limited in the amount of bytes - // that can be transfered in a command, the disk driver shall supply - // a seperate offset and byte count per transfer. - // the offset may be any amount. The byte count must be a multiple of the - // sector size of the device, ie, N * 512 bytes for ata hard drives. - /*!@function setBuffer - @abstract set the IIOMemoryDescriptor for this transaction. - */ - virtual void setBuffer ( IOMemoryDescriptor* inDesc); - - /*!@function setPosition - @abstract used to set an offset into the memory descriptor for this transfer. - */ - virtual void setPosition (IOByteCount fromPosition); - - /*!@function setByteCount - @abstract set the byte count for this transaction. Should agree with the device command and the - memory descriptor in use. - */ - virtual void setByteCount (IOByteCount numBytes); - - /*!@function setTransferChunkSize - @abstract set the size of transfer between intervening interrupts. necessary when doing PIO Read/Write Multiple, etc. so the controller knows when to expect an interrupt during multi-sector data transfers. - */ - virtual void setTransferChunkSize( IOByteCount chunk = kATADefaultSectorSize); - - /*!@function setFeatures - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual void setFeatures( UInt8 in); - - /*!@function getErrorReg - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual UInt8 getErrorReg (void ); - - /*!@function setSectorCount - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual void setSectorCount( UInt8 in); - - /*!@function getSectorCount - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual UInt8 getSectorCount (void ); - - /*!@function setSectorNumber - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual void setSectorNumber( UInt8 in); - - /*!@function getSectorNumber - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual UInt8 getSectorNumber (void ); - - /*!@function setCylLo - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual void setCylLo ( UInt8 in); - - /*!@function getCylLo - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual UInt8 getCylLo (void ); - - /*!@function setCylHi - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual void setCylHi( UInt8 in); - - /*!@function getCylHi - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual UInt8 getCylHi (void ); - - /*!@function setDevice_Head - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual void setDevice_Head( UInt8 in); - - /*!@function getDevice_Head - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual UInt8 getDevice_Head (void ); - - /*!@function setCommand - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual void setCommand ( UInt8 in); - - /*!@function getStatus - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual UInt8 getStatus (void ); - - /*!@function setLBA28 - @abstract convenience method that sets the taskfile registers into a 28-bit LBA address, with unit selected and LBA bit set. return err if param out of range, return kIOSuccess (kATANoErr) = 0 on return if successful - */ - virtual IOReturn setLBA28( UInt32 lba, ataUnitID inUnit); - - /*!@function setPacketCommand - @abstract ATAPI command packet max size is 16 bytes. Makes deep copy of data. - */ - virtual IOReturn setPacketCommand( UInt16 packetSizeBytes, UInt8* command); - - // the following registers are only accessed by register access - // commands. Not by normal command dispatch where they are handled - // by the controller. - - // not part of task file params. not written to device when sending commands. - virtual void setDataReg ( UInt16 in); - virtual UInt16 getDataReg (void ); - - // not part of taskfile. Not usually used except by controller. - virtual void setControl ( UInt8 in); - virtual UInt8 getAltStatus (void ); - - // return values - /*!@function getResult - @abstract IOReturn value of the result of this command. ATA family errors are defined in IOATATypes.h - */ - virtual IOReturn getResult (void); - - /*!@function getBuffer - @abstract the IOMemoryDescriptor used in this transaction. - */ - virtual IOMemoryDescriptor* getBuffer ( void ); - - /*!@function getActualTransfer - @abstract The byte count on the ending result, as best as can be determined by the controller. May be zero, but partial transfer may have occurred on error in some cases. - */ - virtual IOByteCount getActualTransfer ( void ); - - /*!@function getEndStatusReg - @abstract the value of the status register on the end of the command. - */ - virtual UInt8 getEndStatusReg (void); // always returned - - /*!@function getEndErrorReg - @abstract If the error bit was set in the status register, the value of the error register is returned at the end of a command. - */ - virtual UInt8 getEndErrorReg( void ); - - /*!@function getCommandInUse - @abstract returns true if IOATAController is still in control of the command. - */ - virtual bool getCommandInUse( void ); // returns true if IOATAController is using the command. - - // for use by disk drivers, clients of IOATADevice only. - // IOATADevice and IOATAControllers shall not use this field in any manner - /*!@var refCon - @abstract for use by disk drivers, clients of IOATADevice only. IOATADevice and IOATAControllers shall not use this field in any manner. - */ - void* refCon; - - /*!@var refCon2 - @abstract for use by disk drivers, clients of IOATADevice only. IOATADevice and IOATAControllers shall not use this field in any manner. - */ - void* refCon2; - - protected: - // < return from ATA controllers to disk drivers - // > sent to ATA controllers from disk drivers - ataOpcode _opCode; // > Command code for the controller. - UInt32 _flags; // > Flags for this command - ataRegisterImage _taskFile; // <> Taskfile + data and control registers. - ATAPICmdPacket _packet; // > ATAPI packet - ataUnitID _unit; // > Unit number - UInt32 _timeoutMS; // > timeout command in ms. - IOMemoryDescriptor* _desc; // > Buffer for data may be nil if command transfer no data - IOByteCount _position; // > Position within the descriptor for this command - IOByteCount _byteCount; // > How many bytes to transfer. - IOByteCount _logicalChunkSize; // > How many bytes between intervening interrupts (R/W Multiple) - ataRegMask _regMask; // > Which registers to write or read for reg access commands - IOATACompletionFunction* _callback; // > if nil, command is synchronous - - IOReturn _result; // < result - IOByteCount _actualByteCount; // < actual bytes transfered. - UInt8 _status; // < Status register at end of command - UInt8 _errReg; // < Error register at end of command if error bit set. - bool _inUse; // < true while IOATAController has possesion of the command - - - virtual bool init(); -protected: -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. - */ - struct ExpansionData {IOExtendedLBA* extLBA; }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *fExpansionData; - - // overrides - virtual void free(); - - -private: - OSMetaClassDeclareReservedUsed(IOATACommand, 0); // set end result - OSMetaClassDeclareReservedUsed(IOATACommand, 1); // get extendedLBAPtr - OSMetaClassDeclareReservedUnused(IOATACommand, 2); - OSMetaClassDeclareReservedUnused(IOATACommand, 3); - OSMetaClassDeclareReservedUnused(IOATACommand, 4); - OSMetaClassDeclareReservedUnused(IOATACommand, 5); - OSMetaClassDeclareReservedUnused(IOATACommand, 6); - OSMetaClassDeclareReservedUnused(IOATACommand, 7); - OSMetaClassDeclareReservedUnused(IOATACommand, 8); - OSMetaClassDeclareReservedUnused(IOATACommand, 9); - OSMetaClassDeclareReservedUnused(IOATACommand, 10); - OSMetaClassDeclareReservedUnused(IOATACommand, 11); - OSMetaClassDeclareReservedUnused(IOATACommand, 12); - OSMetaClassDeclareReservedUnused(IOATACommand, 13); - OSMetaClassDeclareReservedUnused(IOATACommand, 14); - OSMetaClassDeclareReservedUnused(IOATACommand, 15); - OSMetaClassDeclareReservedUnused(IOATACommand, 16); - OSMetaClassDeclareReservedUnused(IOATACommand, 17); - OSMetaClassDeclareReservedUnused(IOATACommand, 18); - OSMetaClassDeclareReservedUnused(IOATACommand, 19); - OSMetaClassDeclareReservedUnused(IOATACommand, 20); - -public: - virtual void setEndResult(UInt8 inStatus, UInt8 endError ); - virtual IOExtendedLBA* getExtendedLBA(void); - - -}; - - -/*! -@class IOExtendedLBA - -@discussion -If 48-bit LBAs are supported, IOExtendedLBA is used to represent a 48-bit LBA. -The driver examines the ATA identify data to determine if 48-bit addressing is -supported. -*/ - -class IOExtendedLBA : public OSObject -{ - OSDeclareDefaultStructors( IOExtendedLBA ); - - public: - static IOExtendedLBA* createIOExtendedLBA(IOATACommand* owner); - - // terminology as established in ATA/ATAPI-6. - // for the extended LBA address - - /*!@function setLBALow16 - @abstract convenience method that sets the lower 16 bits of a 48-bit LBA - */ - virtual void setLBALow16( UInt16 lbaLow); - - /*!@function getLBALow16 - @abstract convenience method that gets the lower 16 bits of a 48-bit LBA - */ - virtual UInt16 getLBALow16 (void); - - /*!@function setLBAMid16 - @abstract convenience method that sets the middle 16 bits of a 48-bit LBA - */ - virtual void setLBAMid16 (UInt16 lbaMid); - - /*!@function getLBAMid16 - @abstract convenience method that gets the middle 16 bits of a 48-bit LBA - */ - virtual UInt16 getLBAMid16( void ); - - /*!@function setLBAHigh16 - @abstract convenience method that sets the high 16 bits of a 48-bit LBA - */ - virtual void setLBAHigh16( UInt16 lbaHigh ); - - /*!@function getLBAHigh16 - @abstract convenience method that gets the high 16 bits of a 48-bit LBA - */ - virtual UInt16 getLBAHigh16( void ); - - /*!@function setSectorCount16 - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual void setSectorCount16( UInt16 sectorCount ); - - /*!@function getSectorCount16 - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual UInt16 getSectorCount16( void ); - - /*!@function setFeatures16 - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual void setFeatures16( UInt16 features ); - - /*!@function getFeatures16 - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual UInt16 getFeatures16( void ); - - /*!@function setDevice - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual void setDevice( UInt8 inDevice ); - - /*!@function getDevice - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual UInt8 getDevice( void ); - - /*!@function setCommand - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual void setCommand( UInt8 inCommand ); - - /*!@function getCommand - @abstract Taskfile access. Registers are named in accordance with ATA Standards conventions - */ - virtual UInt8 getCommand( void ); - - /*!@function setExtendedLBA - @abstract convenience method that sets the taskfile registers into a 48-bit LBA address, along with sector count, and unit selected and LBA bit set - */ - virtual void setExtendedLBA( UInt32 inLBAHi, UInt32 inLBALo, ataUnitID inUnit, UInt16 extendedCount, UInt8 extendedCommand); - - /*!@function getExtendedLBA - @abstract convenience method that gets a 48-bit LBA - */ - virtual void getExtendedLBA( UInt32* outLBAHi, UInt32* outLBALo ); - - /*!@function zeroData - @abstract convenience method that zeros out the lba, sector count, features, device, and command member variables - */ - virtual void zeroData(void); - - /*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties in the future. - */ - struct ExpansionData { }; - - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - - protected: - - IOATACommand* owner; - UInt16 lbaLow; - UInt16 lbaMid; - UInt16 lbaHigh; - UInt16 sectorCount; - UInt16 features; - UInt16 device; - UInt16 command; - - private: - OSMetaClassDeclareReservedUnused(IOExtendedLBA, 0); - OSMetaClassDeclareReservedUnused(IOExtendedLBA, 1); - OSMetaClassDeclareReservedUnused(IOExtendedLBA, 2); - OSMetaClassDeclareReservedUnused(IOExtendedLBA, 3); - OSMetaClassDeclareReservedUnused(IOExtendedLBA, 4); - OSMetaClassDeclareReservedUnused(IOExtendedLBA, 5); - OSMetaClassDeclareReservedUnused(IOExtendedLBA, 6); - OSMetaClassDeclareReservedUnused(IOExtendedLBA, 7); - OSMetaClassDeclareReservedUnused(IOExtendedLBA, 8); - OSMetaClassDeclareReservedUnused(IOExtendedLBA, 9); - OSMetaClassDeclareReservedUnused(IOExtendedLBA, 10); - - -}; - -#endif diff --git a/i386/include/IOKit/ata/IOATAController.h b/i386/include/IOKit/ata/IOATAController.h deleted file mode 100644 index 3758941..0000000 --- a/i386/include/IOKit/ata/IOATAController.h +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOATACONTROLLER_H -#define _IOATACONTROLLER_H - -#include <IOKit/IOTypes.h> -#include <IOKit/IOBufferMemoryDescriptor.h> -#include <IOKit/IOCommandGate.h> -#include <IOKit/IOService.h> -#include <IOKit/IOWorkLoop.h> -#include "ATATimerEventSource.h" - -class IOATADevice; -class IOATABusCommand; -class IOATABusInfo; -class IOATADevConfig; - -/*! @class IOATAController - @abstract The base class for ata controller family. Provides the interface common to all ata bus controllers. - @discussion Subclasses of IOATAController implement drivers for specific bus hardware. Disk devices are clients of - IOATAController and communicate via the IOATABusNub instantiated for each device discovered by the specific IOATAController - subclass when it probes hardware. Via the nub, the ATA Controller provides standard information about bus capability, accepts - requests for transfer mode configuration (timing), accepts requests for IO and bus operations, notifies the device driver about - bus events which may affect the device, such as soft-resets or device removal (ie, media-bay and PC-card) and removal of queued - IO requests which have not been dispatched into the hardware. - - @discussion The header doc for this class is incomplete. The source however is heavily commented and should be consulted until - such time as complete header doc is available. -*/ - - - -class IOATAController : public IOService -{ - OSDeclareDefaultStructors(IOATAController); - -public: - - - /*--- Common ATA Controller Interface ---*/ - // find out bus capability - virtual IOReturn provideBusInfo( IOATABusInfo* infoOut); - - // set and get bus timing configuration for a specific unit - virtual IOReturn selectConfig( IOATADevConfig* configRequest, UInt32 unitNumber); - virtual IOReturn getConfig( IOATADevConfig* configRequest, UInt32 unitNumber); - - // The main call puts something on the work loop - virtual IOReturn executeCommand( IOATADevice* nub, IOATABusCommand* cmd); - - - - /*-- Power Management ---*/ - - // TBD - - - /*--- Overrides from IOService ---*/ - virtual bool init(OSDictionary * properties); - - virtual IOService* probe( IOService* provider, SInt32* score ); - virtual bool start( IOService* provider ); - - -protected: - - enum { - kBusFree = 'free', // bus is available - kBusBusy = 'busy', // bus is busy with request - kQueueOpen = '!lck', // queue is not locked - kQueueLocked = 'LOCK', // queue is frozen and not - kImmediateLocked = '!Imd', // immediate commands may not be processed - kImmediateOK = 'Immd' // immediate commands allowed. - }; - - /* Transaction State indicator definition - indicates what action is next*/ - enum transState { - kATAInitial = 0x00, // in queue - kATAStarted = 0x01, // issue taskfile - kATAPICmd = 0x02, // issue packet - kATADataTx = 0x03, // data transfer phase - kATAStatus = 0x04, // read status - kATAComplete = 0x05, // io complete - kATADone = 0x06 // completion callout called - }; - - struct ataDevInfo { - ataDeviceType type; // ata, atapi, unknown - atapiConfig packetSend; // slow DRQ, IRQ, or fast DRQ for packet - }; - - - struct ataDoubleBuffer - { - IOPhysicalAddress physicalBuffer; - IOLogicalAddress logicalBuffer; - IOByteCount bufferSize; - - }; - - - IOService* _provider; - IOWorkLoop* _workLoop; - IOCommandGate* _cmdGate; - ATATimerEventSource* _timer; - queue_head_t _commandQueue; - IOATABusCommand* _currentCommand; - UInt32 _busState; - UInt32 _queueState; - UInt32 _immediateGate; - ataUnitID _selectedUnit; - ataDevInfo _devInfo[2]; - IOATADevice* _nub[2]; - ataDoubleBuffer _doubleBuffer; - - IOATARegPtr8 _tfFeatureReg; - IOATARegPtr8 _tfSCountReg; - IOATARegPtr8 _tfSectorNReg; - IOATARegPtr8 _tfCylLoReg; - IOATARegPtr8 _tfCylHiReg; - IOATARegPtr8 _tfSDHReg; - IOATARegPtr8 _tfStatusCmdReg; - IOATARegPtr16 _tfDataReg; - IOATARegPtr8 _tfAltSDevCReg; - - - // false if couldn't allocate the per-bus double buffer. - // controllers should provide implementation where needed - // for DMA hardware compatibility. The default method provides - // a 4K buffer for PIO since MemoryDescriptors do not by default have - // logical addresses in the kernel space. - virtual bool allocateDoubleBuffer( void ); - - // perform 2-byte endian swap. Only useful on PIO transfers and identify data - virtual void swapBytes16( UInt8* dataBuffer, IOByteCount length); - -/*! @function handleCommand - @abstract Called by executeCommand() to handle the client command - from the workloop context. - @param command The command code. - @param param1 Command parameter. - @param param2 Command parameter. - @param param3 Command parameter. - @result kIOReturnSuccess on success, or an error code otherwise. */ - - virtual IOReturn handleCommand( void * command, - void * param1 = 0, - void * param2 = 0, - void * param3 = 0); - - -/*! @function busCanDispatch - @abstract answers whether the bus is in state such that the next command - can be dispatched. - @result true - bus is free to issue commands. false - bus cannot issue - commands at this time. */ - virtual bool busCanDispatch( void ); - - -/*! @function dispatchNext - @abstract Causes the command at the front of the queue to dequeue, made the - current command and begin execution. - @result noErr indicates successful dispatch. */ - virtual IOReturn dispatchNext( void ); - - // sets the result code, free's the bus state, dispatch next command and execute completion - virtual void completeIO( IOReturn commandResult ); - - // Command queue handlers. - virtual IOReturn enqueueCommand( IOATABusCommand* command); - virtual IOATABusCommand* dequeueFirstCommand( void ); - - // event notifier for clients - virtual void executeEventCallouts( ataEventCode event, ataUnitID unit); - - // default handler for device interrupts. - virtual IOReturn handleDeviceInterrupt( void ); - - - // timer functions - // starts the timeout on the current command - virtual IOReturn startTimer( UInt32 inMS); - //disable and clear a running timer. - virtual void stopTimer( void ); - // called when a timeout occurs. - virtual void handleTimeout( void ); - // true if the timer has expired - virtual bool checkTimeout( void ); - - // handle IO opcodes - virtual IOReturn handleExecIO( void ); - virtual IOReturn handleRegAccess( void ); - virtual IOReturn handleBusReset(void); - virtual IOReturn handleQueueFlush( void ); - - // various protocol phases - virtual IOReturn asyncData(void); - virtual IOReturn asyncStatus(void); - virtual IOReturn asyncIO(void); - virtual IOReturn asyncCommand(void); - virtual IOReturn synchronousIO(void); - - // hardware access - virtual IOReturn selectDevice( ataUnitID unit ); - virtual IOReturn issueCommand( void ); - virtual IOReturn writePacket( void ); - virtual IOReturn softResetBus( bool doATAPI = false ); - - virtual IOReturn startDMA( void ); - virtual IOReturn stopDMA( void ); - - virtual bool ATAPISlaveExists( void ); - virtual UInt32 scanForDrives( void ); - - virtual bool waitForU8Status (UInt8 mask, UInt8 value); - - virtual IOByteCount readATAPIByteCount( void ); - virtual void handleOverrun( IOByteCount length); - virtual IOReturn registerAccess(bool isWrite); - - // PIO data transfers - virtual IOReturn txDataIn (IOLogicalAddress buf, IOByteCount length); - virtual IOReturn txDataOut (IOLogicalAddress buf, IOByteCount length); - - virtual IOATAController::transState determineATAPIState(void); - - // device should set the controller to the config for this device - virtual void selectIOTiming( ataUnitID unit ); - - // subclasses MUST implement this function in order to initialize - // the pointers to the ATA task file registers during start() time. - virtual bool configureTFPointers(void); - - // convert a bit-significant indicator to a numeric value. - virtual UInt16 bitSigToNumeric( UInt16 binary); - - // for 48 bit register reading and writing - UInt16 readExtRegister( IOATARegPtr8 inRegister ); - void writeExtRegister( IOATARegPtr8 inRegister, UInt16 inValue ); - - // overrides - virtual void free(); - -private: - - // used called by the commandgate in executeCommand. - static void executeCommandAction(OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3); - - // callout used by the timer to indicate the timeout failure. - static void timeoutOccured( OSObject *owner, - IOTimerEventSource *sender); - -protected: -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOATAController in the future. - */ - typedef struct ExpansionData - { - IOBufferMemoryDescriptor* _doubleBufferDesc; - } ExpansionData; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - -private: - OSMetaClassDeclareReservedUnused(IOATAController, 0); - OSMetaClassDeclareReservedUnused(IOATAController, 1); - OSMetaClassDeclareReservedUnused(IOATAController, 2); - OSMetaClassDeclareReservedUnused(IOATAController, 3); - OSMetaClassDeclareReservedUnused(IOATAController, 4); - OSMetaClassDeclareReservedUnused(IOATAController, 5); - OSMetaClassDeclareReservedUnused(IOATAController, 6); - OSMetaClassDeclareReservedUnused(IOATAController, 7); - OSMetaClassDeclareReservedUnused(IOATAController, 8); - OSMetaClassDeclareReservedUnused(IOATAController, 9); - OSMetaClassDeclareReservedUnused(IOATAController, 10); - OSMetaClassDeclareReservedUnused(IOATAController, 11); - OSMetaClassDeclareReservedUnused(IOATAController, 12); - OSMetaClassDeclareReservedUnused(IOATAController, 13); - OSMetaClassDeclareReservedUnused(IOATAController, 14); - OSMetaClassDeclareReservedUnused(IOATAController, 15); - OSMetaClassDeclareReservedUnused(IOATAController, 16); - OSMetaClassDeclareReservedUnused(IOATAController, 17); - OSMetaClassDeclareReservedUnused(IOATAController, 18); - OSMetaClassDeclareReservedUnused(IOATAController, 19); - OSMetaClassDeclareReservedUnused(IOATAController, 20); -}; -#endif /* !_IOATACONTROLLER_H */ diff --git a/i386/include/IOKit/ata/IOATADevConfig.h b/i386/include/IOKit/ata/IOATADevConfig.h deleted file mode 100644 index e5714c3..0000000 --- a/i386/include/IOKit/ata/IOATADevConfig.h +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Copyright (c) 2000-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOATADEVCONFIG_H -#define _IOATADEVCONFIG_H - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOTypes.h> -#include "IOATATypes.h" -#include "IOATABusInfo.h" - - -/*! - @class IOATADevConfig - @abstract used for configuring and communicating the desired transfer modes of a device. - A disk driver would typically use this object in conjunction with the 512-bytes of identification - data from the drive and the IOATABusInfo object for the bus it is connected to. - This object will determine the best matching transfer speeds available. - the device driver will then send a series of Set Features commands to configure the drive - and this object to the bus through the IOATADevice nub in order to configure the optimum transfer mode. - The driver for the disk drive may choose to populate this object with whatever transfer mode - desired, in the event that a different mode is required. - @discussion usually use the initWithBestSelection to make a best mode match. - The Mode accessors use bit significance to indicate a selected mode or supported modes(s) - ie, 00000001b indicates Mode-0, 00000010b indicates mode 1, etc. - Selected mode is indicated by a single set bit. No bit set indicates no mode in that class is selected. - ie, a bus will support multiple possible modes, but will only have one mode selected at that time. - -*/ - -class IOATADevConfig : public OSObject { - - OSDeclareDefaultStructors( IOATADevConfig ); - - public: - - /*!@function atadevconfig - @abstract static creator function. - */ - static IOATADevConfig* atadevconfig(void); - - /*!@function initWithBestSelection - @abstract Handy initializer: pass the 512-byte result of the Identify Device or - Identify Packet Device in endian-order for your platform (byte-swapped on PPC) - and the IOATABusInfo object for the bus. The object will initialize all fields - and select the best transfer modes that match on bus and device. - If the return value was 0 (success or noErr), then a matching mode is supported. - Examine the PIO and UDMA/DMA fields and to generate the apropriate SET FEATURES - parameters for your drive and send this initialised object to the IOATAController - when requesting a speed configuration. - failure means no supported transfer modes matched between bus and device info. - - @param identifyData 512 bytes of data obtained from the device via IDENTIFY DEVICE or IDENTIFY PACKET DEVICE command. - @param busInfo pointer to an IOATAbusInfo object obtained from a previous atanub->provideBusInfo() call. - @result kIOSuccess (0) when a matching transfer mode is available between the device and controller. - */ - IOReturn initWithBestSelection( const UInt16* identifyData, IOATABusInfo* busInfo); - - // intitialize with the 512 byte data from an ATA device identify command - IOReturn assignFromData( const UInt16* identifyData ); - - /*!@function setPacketConfig - @param packetConfig - @abstract For ATAPI devices, if the device asserts interrupt after the Packet Command when it is ready to accept the packet, set this value to true (mostly older devices). If the device accepts the packet only by asserting DRQ bit in status, then set this value false. Tells the bus controller whether to wait for packet acceptance or set pending interrupt. - */ - void setPacketConfig ( atapiConfig packetConfig); - - /*!@function getPacketConfig - @result atapiConfig as defined in IOATATypes.h - */ - atapiConfig getPacketConfig( void ); - - // The following Mode accessors use bit significance to indicate a selected mode or supported modes(s) - // ie, 00000001b indicates Mode-0, 00000010b indicates mode 1, etc. - // Selected mode is indicated by a single set bit. No bit set indicates no mode in that class is selected. - // ie, a bus will support multiple possible modes, but will only have one mode selected at that time. - - /*!@function setPIOMode - @param inModeBitMap bit-significant map of PIO mode - */ - void setPIOMode( UInt8 inModeBitMap); // bit-significant map of PIO mode(s) - - /*!@function getPIOMode - @result bit-significant map of PIO mode - */ - UInt8 getPIOMode( void ); - - /*!@function setDMAMode - @param inModeBitMap bit-significant map of DMA mode - */ - void setDMAMode( UInt8 inModeBitMap ); // bit-significant map of DMA mode(s) - - /*!@function getDMAMode - @result bit-significant map of DMA mode - */ - UInt8 getDMAMode( void ); - - /*!@function setUltraMode - @param inModeBitMap bit-significant map of Ultra mode - */ - void setUltraMode( UInt8 inModeBitMap ); // bit-significant map of Ultra mode(s) - - /*!@function getUltraMode - @result bit-significant map of Ultra mode - */ - UInt8 getUltraMode( void ); - - // The following cycle time accessors report cycle times in nanoseconds. - // A device requesting a mode should also request a cycle time as reported in the device's identification page. - // A bus controller will configure the bus not to exceed (go faster than) the minimum time requested. - // When a bus controller reports a mode configuration, the cycle time indicates the busses contract not to go - // faster than. However an actual cycle time may be slower than the indicated time. - /*!@function setPIOCycleTime - @param inNS PIO cycle time in nanoseconds. - */ - void setPIOCycleTime( UInt16 inNS ); - - /*!@function getPIOCycleTime - @result reported PIO CycleTime in nanoseconds. - */ - UInt16 getPIOCycleTime( void ); - - /*!@function setDMACycleTime - @param inNS reported multiword DMA Cycle time in nanoseconds. - */ - void setDMACycleTime( UInt16 inNS ); - - /*!@function getDMACycleTime - @result Reported multiword DMA cycle time in nanoseconds. - */ - UInt16 getDMACycleTime( void ); - - // Ultra ATA defines cycle times a device must meet to comply with standards. - // No cycle time field is needed. - - // convert bit-significant to numeric value - /*!@function bitSigToNumeric - @abstract converts a bit-significant field to a numerical value. Note that a bit field of 0x00 has no defined result. - @param binary the bit significant field. - @result the numerical value of the highest bit set in the field. - */ - virtual UInt8 bitSigToNumeric( UInt16 binary); - - - protected: - - atapiConfig _atapiIRQForPacket; // enum for bits 5 and 6 of word zero of - // the identify packet device info data for PACKET devices ONLY. - // shift word-0 5-bits left, mask 0x03 and these enums apply. - // values are: - - // kATAPIDRQSlow = 0x00 - wait up to 3MS for packet on DRQ - // kATAPIIRQPacket = 0x01, - device asserts IRQ for packet - // kATAPIDRQFast = 0x10, - packet on DRQ within 50us - // kATAPIUnknown = 0x11 - reserved as of ATA/ATAPI-5 - - - - - UInt8 _ataPIOMode; /* <->: PIO Mode Timing class bit-significant */ - UInt16 _ataPIOCycleTime; /* <->: Cycle time in ns for PIO mode */ - UInt8 _ataMultiDMAMode; /* <->: Multiple Word DMA Timing Class bit-significant*/ - UInt16 _ataMultiCycleTime; /* <->: Cycle time in ns for Multiword DMA mode */ - UInt8 _ataUltraDMAMode; /* <->: Ultra DMA timing class bit-significant */ - - IOReturn _AssignPIOData( const UInt16* identifyData); - IOReturn _AssignDMAData(const UInt16* identifyData); - IOReturn _AssignUltraData(const UInt16* identifyData); - UInt8 _MostSignificantBit( UInt8 inByte); - - - virtual bool init(); -protected: -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - -private: - OSMetaClassDeclareReservedUnused(IOATADevConfig, 0); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 1); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 2); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 3); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 4); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 5); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 6); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 7); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 8); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 9); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 10); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 11); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 12); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 13); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 14); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 15); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 16); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 17); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 18); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 19); - OSMetaClassDeclareReservedUnused(IOATADevConfig, 20); - -public: - -//some static utility functions to parse the identify data for feature support - - static bool sDriveSupports48BitLBA( const UInt16* identifyData ); - static UInt32 sDriveExtendedLBASize( UInt32* lbaHi, UInt32* lbaLo, const UInt16* identifyData); // result returned is same as lbaLo. - -}; - - -// header doc info goes here. I find putting it within the delcarations more confusing than putting it all in the bottom of the header. - - -#endif /* !_IOATADEVCONFIG_H */ diff --git a/i386/include/IOKit/ata/IOATADevice.h b/i386/include/IOKit/ata/IOATADevice.h deleted file mode 100644 index 78be513..0000000 --- a/i386/include/IOKit/ata/IOATADevice.h +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * IOATADevice.h - * - * This object implements a relay to an ATA Bus where a drive is attached. - */ - - -#ifndef _IOATADEVICE_H -#define _IOATADEVICE_H - -#include <IOKit/IOService.h> -#include <IOKit/IOTypes.h> -#include "IOATATypes.h" -#include "IOATACommand.h" -#include "IOATABusInfo.h" -#include "IOATADevConfig.h" - -class IOATAController; - - -/*! - @class IOATADevice - @abstract This object implements a relay to an ATA Bus where a drive is attached. - @discussion IOATADevice is the superclass which represents a particular device attached to a particular IOATAController (bus). IOATADevice is the provider for ATA mass-storage device drivers.IOATADevice is the factory for all IOATACommand objects and is responsible for creating and freeing IOATACommands. IOATAControllers will create an instance of IOATADevice for each device physically connected to the ata bus. IOATADevice is virtual and specific subclass should be implemented for particular types of IOATAController. In this manner, controller-specifc IOATACommands may be paired with the proper type of controller. -*/ - -class IOATADevice : public IOService -{ - OSDeclareDefaultStructors(IOATADevice); - -public: - - // - /*!@function getUnitID - @abstract Determine whether this device is number 0 or 1 (ie, master/slave) - @result ataUnitID - 0 or 1. - */ - virtual ataUnitID getUnitID( void ); - - // - /*!@function getDeviceType - @abstract Find out what kind of device this nub is (ata or atapi) - @result ataDeviceType as defined in IOATATypes.h - */ - virtual ataDeviceType getDeviceType( void ); - - // - /*!@function provideBusInfo - @abstract Find out the bus capability so the client can choose the features to set and commands to run. - @param getInfo a pointer to a valid IOATABusInfo object. - @result kIOSuccess (0) and the getInfo object will be filled out by the bus controller with information about the bus. - */ - virtual IOReturn provideBusInfo( IOATABusInfo* getInfo); - - // - /*!@function selectConfig - @abstract Tell the bus what speed to use for your device. - @param configRequest pointer to a valid and initialized IOATADevConfig object. - @result kIOSuccess (0) if the configuration was succesfully selected. - @discussion This should only be called once during a disk drivers start method before registering its availability, and must be called prior to issuing any data IO transactions. - */ - virtual IOReturn selectConfig( IOATADevConfig* configRequest); - - // - /*!@function provideConfig - @abstract Find out what speed the bus has configured for this unit. - @param configRequest pointer to a valid IOATADevConfig object. - @result kIOSuccess (0) on successful completion and configRequest will contain the configuration information. - */ - virtual IOReturn provideConfig( IOATADevConfig* configRequest); - - // Submit IO requests - /*! - @function executeCommand - @abstract Submit IO requests - @param command pointer to a valid IOATACommand with the command to be executed. - @result kIOSuccess (0) if the command was successfully queued in the controller. - */ - virtual IOReturn executeCommand(IOATACommand* command); - - // create and destroy IOATACommands - /*! - @function allocCommand - @abstract create IOATACommands. Device drivers should allocate command objects only through this method. - @result null if allocation failed. Retain count is one. - */ - virtual IOATACommand* allocCommand( void ); - - /*! - @function freeCommand - @abstract release a command object that is no longer needed. Do not free an object in use and do not release the object anymore times than you have retained it. - @param inCommand the command to be released. - */ - virtual void freeCommand( IOATACommand* inCommand); - - // matching stuff for IOBSDInit and so on. - /*!@function matchPropertyTable - @abstract matching stuff for IOBSDInit and so on. - */ - virtual bool matchPropertyTable(OSDictionary * table); - - /*!@function matchLocation - @abstract matching stuff for IOBSDInit and so on. - */ - virtual IOService* matchLocation(IOService * client); - - /*!@function matchPropertyTable - @abstract matching stuff for IOBSDInit and so on. - */ - virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); - - // called by controllers when they need to send a message to client drivers. - /*! - @function notifyEvent - @abstract called by controllers when they need to send a message to client (disk) drivers. - */ - virtual void notifyEvent( UInt32 event ); - - -protected: - IOATAController* _provider; - ataUnitID _unitNumber; // 0 - master, 1 - slave, -1 = not Valid - ataDeviceType _deviceType; // ata, atapi, unknown -protected: -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - -private: - OSMetaClassDeclareReservedUnused(IOATADevice, 0); - OSMetaClassDeclareReservedUnused(IOATADevice, 1); - OSMetaClassDeclareReservedUnused(IOATADevice, 2); - OSMetaClassDeclareReservedUnused(IOATADevice, 3); - OSMetaClassDeclareReservedUnused(IOATADevice, 4); - OSMetaClassDeclareReservedUnused(IOATADevice, 5); - OSMetaClassDeclareReservedUnused(IOATADevice, 6); - OSMetaClassDeclareReservedUnused(IOATADevice, 7); - OSMetaClassDeclareReservedUnused(IOATADevice, 8); - OSMetaClassDeclareReservedUnused(IOATADevice, 9); - OSMetaClassDeclareReservedUnused(IOATADevice, 10); - OSMetaClassDeclareReservedUnused(IOATADevice, 11); - OSMetaClassDeclareReservedUnused(IOATADevice, 12); - OSMetaClassDeclareReservedUnused(IOATADevice, 13); - OSMetaClassDeclareReservedUnused(IOATADevice, 14); - OSMetaClassDeclareReservedUnused(IOATADevice, 15); - OSMetaClassDeclareReservedUnused(IOATADevice, 16); - OSMetaClassDeclareReservedUnused(IOATADevice, 17); - OSMetaClassDeclareReservedUnused(IOATADevice, 18); - OSMetaClassDeclareReservedUnused(IOATADevice, 19); - OSMetaClassDeclareReservedUnused(IOATADevice, 20); -}; - -#endif /* !_IOATABUSNUB_H */ diff --git a/i386/include/IOKit/ata/IOATARegI386.h b/i386/include/IOKit/ata/IOATARegI386.h deleted file mode 100644 index 73016ba..0000000 --- a/i386/include/IOKit/ata/IOATARegI386.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2000-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOATAREGI386_H -#define _IOATAREGI386_H - -#include <libkern/c++/OSObject.h> - -/* - * IOATAReg: ATA register abstract base class. - */ -#define DefineIOATAReg(w) \ -class IOATAReg##w : public OSObject \ -{ \ - OSDeclareAbstractStructors( IOATAReg##w ) \ - \ -public: \ - virtual void operator = (UInt##w rhs) = 0; \ - virtual operator UInt##w() const = 0; \ -} - -DefineIOATAReg( 8 ); -DefineIOATAReg( 16 ); -DefineIOATAReg( 32 ); - -typedef IOATAReg8 * IOATARegPtr8; -typedef IOATAReg16 * IOATARegPtr16; -typedef IOATAReg32 * IOATARegPtr32; - -#define IOATARegPtr8Cast(x) (x) - -/* - * IOATAIOReg: I/O mapped ATA registers. - */ -#define DefineIOATAIOReg(w) \ -class IOATAIOReg##w : public IOATAReg##w \ -{ \ - OSDeclareDefaultStructors( IOATAIOReg##w ) \ - \ -protected: \ - UInt16 _address; \ - \ -public: \ - static IOATAIOReg##w * withAddress( UInt16 address ); \ - \ - virtual bool initWithAddress( UInt16 address ); \ - virtual UInt16 getAddress() const; \ - \ - virtual void operator = (UInt##w rhs); \ - virtual operator UInt##w() const; \ -} - -DefineIOATAIOReg( 8 ); -DefineIOATAIOReg( 16 ); -DefineIOATAIOReg( 32 ); - -#endif /* !_IOATAREGI386_H */ diff --git a/i386/include/IOKit/ata/IOATATypes.h b/i386/include/IOKit/ata/IOATATypes.h deleted file mode 100644 index a3be9dc..0000000 --- a/i386/include/IOKit/ata/IOATATypes.h +++ /dev/null @@ -1,393 +0,0 @@ -/* - * Copyright (c) 2000-2008 Apple, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOATATYPES_H -#define _IOATATYPES_H - -#include <IOKit/IOTypes.h> - - -/*! - -@header IOATAtypes.h -@discussion contains various definitions and constants for use in the IOATAFamily and clients. Header Doc is incomplete at this point, but file is heavily commented. - -*/ -// property strings -#define kATADevPropertyKey "ata device type" -#define kATATypeATAString "ata" -#define kATATypeATAPIString "atapi" -#define kATATypeUnknownString "unknown" - -#define kATAVendorPropertyKey "device model" -#define kATARevisionPropertyKey "device revision" -#define kATASerialNumPropertyKey "device serial" - -#define kATAUnitNumberKey "unit number" - -#define kATASocketKey "socket type" -#define kATAInternalSocketString "internal" -#define kATAMediaBaySocketString "media-bay" -#define kATAPCCardSocketString "pccard" -#define kATAInternalSATAString "serial-ata" -#define kATASATABayString "sata-bay" -#define kATAInternalSATA2 "serial-ata-2" -#define kATASATA2BayString "sata-2-bay" -#define kATAUnkownSocketString "unknown" - -#define kATANotifyOnChangeKey "media-notify" - -// allows for porting to non-memory-mapped IO systems, such as x86. -// for such a platform, create a class and overload the assignment operators -// so that the correct IO operation is performed and define the type for that architecture port. -#ifdef __ppc__ -#define IOATARegPtr8 volatile UInt8* -#define IOATARegPtr16 volatile UInt16* -#define IOATARegPtr32 volatile UInt32* -#define IOATARegPtr8Cast(x) ((IOATARegPtr8)(x)) -#elif defined( __i386__ ) || defined( __x86_64__ ) -#include <IOKit/ata/IOATARegI386.h> -#else -#error Unknown machine architecture -#endif - -enum ataSocketType{ - - kUnknownSocket = 0, - kInternalATASocket, - kMediaBaySocket , - kPCCardSocket, - kInternalSATA, - kSATABay, - kInternalSATA2, - kSATA2Bay - -} ; - - -enum ataDeviceType { - - kUnknownATADeviceType = 0, - kATADeviceType, - kATAPIDeviceType - -} ; - -// enum for bits 5 and 6 of word zero of -// the identify packet device info data. -// shift word-0 5-bits left, mask 0x03 and these enums apply. -enum atapiConfig { - - kATAPIDRQSlow = 0x00, - kATAPIIRQPacket = 0x01, - kATAPIDRQFast = 0x10, - kATAPIUnknown = 0x11 - -}; - - -enum ataUnitID { - - kATAInvalidDeviceID = -1, - kATADevice0DeviceID = 0, /* aka, Master. Device 0 is the correct terminology */ - kATADevice1DeviceID = 1 /* aka, Slave. Device 1 is the correct terminology */ - -} ; - -enum { - - kATADefaultSectorSize = 512 -}; - -/* Task file definition *** Error Register *** */ -enum { - bATABadBlock = 7, /* bit number of bad block error bit*/ - bATAUncorrectable = 6, /* bit number of uncorrectable error bit*/ - bATAMediaChanged = 5, /* bit number of media changed indicator*/ - bATAIDNotFound = 4, /* bit number of ID not found error bit*/ - bATAMediaChangeReq = 3, /* bit number of media changed request*/ - bATACommandAborted = 2, /* bit number of command abort bit*/ - bATATrack0NotFound = 1, /* bit number of track not found*/ - bATAAddressNotFound = 0, /* bit number of address mark not found*/ - mATABadBlock = 1 << bATABadBlock, /* Bad Block Detected*/ - mATAUncorrectable = 1 << bATAUncorrectable, /* Uncorrectable Data Error*/ - mATAMediaChanged = 1 << bATAMediaChanged, /* Media Changed Indicator (for removable)*/ - mATAIDNotFound = 1 << bATAIDNotFound, /* ID Not Found*/ - mATAMediaChangeReq = 1 << bATAMediaChangeReq, /* Media Change Requested (NOT IMPLEMENTED)*/ - mATACommandAborted = 1 << bATACommandAborted, /* Aborted Command*/ - mATATrack0NotFound = 1 << bATATrack0NotFound, /* Track 0 Not Found*/ - mATAAddressNotFound = 1 << bATAAddressNotFound /* Address Mark Not Found*/ -}; - -/* Task file definition *** Features register *** */ -enum { - bATAPIuseDMA = 0, /* bit number of useDMA bit (ATAPI)*/ - mATAPIuseDMA = 1 << bATAPIuseDMA -}; - -/* Task file definition *** ataTFSDH Register *** */ -enum { - mATAHeadNumber = 0x0F, /* Head Number (bits 0-3) */ - mATASectorSize = 0xA0, /* bit 7=1; bit 5 = 01 (512 sector size) <DP4>*/ - mATADriveSelect = 0x10, /* Drive (0 = master, 1 = slave) */ - mATALBASelect = 0x40 /* LBA mode bit (0 = chs, 1 = LBA)*/ -}; - -/* Task file definition *** Status Register *** */ -enum { - bATABusy = 7, /* bit number of BSY bit*/ - bATADriveReady = 6, /* bit number of drive ready bit*/ - bATAWriteFault = 5, /* bit number of write fault bit*/ - bATASeekComplete = 4, /* bit number of seek complete bit*/ - bATADataRequest = 3, /* bit number of data request bit*/ - bATADataCorrected = 2, /* bit number of data corrected bit*/ - bATAIndex = 1, /* bit number of index mark*/ - bATAError = 0, /* bit number of error bit*/ - mATABusy = 1 << bATABusy, /* Unit is busy*/ - mATADriveReady = 1 << bATADriveReady, /* Unit is ready*/ - mATAWriteFault = 1 << bATAWriteFault, /* Unit has a write fault condition*/ - mATASeekComplete = 1 << bATASeekComplete, /* Unit seek complete*/ - mATADataRequest = 1 << bATADataRequest, /* Unit data request*/ - mATADataCorrected = 1 << bATADataCorrected, /* Data corrected*/ - mATAIndex = 1 << bATAIndex, /* Index mark - NOT USED*/ - mATAError = 1 << bATAError /* Error condition - see error register*/ -}; - -/* Task file definition *** Device Control Register *** */ -enum { - bATADCROne = 3, /* bit number of always one bit*/ - bATADCRReset = 2, /* bit number of reset bit*/ - bATADCRnIntEnable = 1, /* bit number of interrupt disable*/ - mATADCROne = 1 << bATADCROne, /* always one bit*/ - mATADCRReset = 1 << bATADCRReset, /* Reset (1 = reset)*/ - mATADCRnIntEnable = 1 << bATADCRnIntEnable /* Interrupt Disable(0 = enabled)*/ -}; - - -/* 'ataRegMask' field of the ataRegAccess definition*/ -enum ataRegMask{ - - bATAAltSDevCValid = 14, /* bit number of alternate status/device cntrl valid bit*/ - bATAStatusCmdValid = 7, /* bit number of status/command valid bit*/ - bATASDHValid = 6, /* bit number of ataTFSDH valid bit*/ - bATACylinderHiValid = 5, /* bit number of cylinder high valid bit*/ - bATACylinderLoValid = 4, /* bit number of cylinder low valid bit*/ - bATASectorNumValid = 3, /* bit number of sector number valid bit*/ - bATASectorCntValid = 2, /* bit number of sector count valid bit*/ - bATAErrFeaturesValid = 1, /* bit number of error/features valid bit*/ - bATADataValid = 0, /* bit number of data valid bit*/ - mATAAltSDevCValid = 1 << bATAAltSDevCValid, /* alternate status/device control valid*/ - mATAStatusCmdValid = 1 << bATAStatusCmdValid, /* status/command valid*/ - mATASDHValid = 1 << bATASDHValid, /* ataTFSDH valid*/ - mATACylinderHiValid = 1 << bATACylinderHiValid, /* cylinder high valid*/ - mATACylinderLoValid = 1 << bATACylinderLoValid, /* cylinder low valid*/ - mATASectorNumValid = 1 << bATASectorNumValid, /* sector number valid*/ - mATASectorCntValid = 1 << bATASectorCntValid, /* sector count valid*/ - mATAErrFeaturesValid = 1 << bATAErrFeaturesValid, /* error/features valid*/ - mATADataValid = 1 << bATADataValid /* data valid*/ - -} ; - - -enum ataFlags{ - bATAFlagQuiesce = 20, - bATAFlagNoIRQ = 19, /* bit Number of no IRQ protocol flag*/ - bATAFlag48BitLBA = 18, - bATAFlagDMAQueued = 17, - bATAFlagOverlapped = 16, - bATAFlagUseConfigSpeed = 15, /* bit number of use configured speed flag*/ - bATAFlagByteSwap = 14, /* bit number of byte swap flag*/ - bATAFlagIORead = 13, /* bit number of I/O read flag*/ - bATAFlagIOWrite = 12, /* bit number of I/O write flag*/ - bATAFlagTFAccessResult = 8, /* bit number of get register results on command completion.*/ - bATAFlagUseDMA = 7, /* bit number of use DMA flag*/ - bATAFlagProtocolATAPI = 5, /* bit number of ATAPI protocol*/ - bATAFlagImmediate = 1, /* bit number of immediate flag */ - bATAFlagTFAccess = 0, /* bit number of TF access */ - - mATAFlagQuiesce = 1 << bATAFlagQuiesce, - mATAFlagUseNoIRQ = 1 << bATAFlagNoIRQ, /* Special purpose! Avoid using! No-IRQ, polled synchronous protocol valid only for PIO commands*/ - mATAFlag48BitLBA = 1 << bATAFlag48BitLBA, /* Use 48 bit extended LBA protocol on this command. Requires support from the controller.*/ - mATAFlagDMAQueued = 1 << bATAFlagDMAQueued, /* Use tagged dma queuing protocol on this command. Requires support from the controller.*/ - mATAFlagOverlapped = 1 << bATAFlagOverlapped, /* Use overllaped protocol on this command. Requires support from the controller.*/ - mATAFlagUseConfigSpeed = 1 << bATAFlagUseConfigSpeed, /* Use the configured interface speed = true. False = use default PIO (slow) speed. valid only for PIO commands*/ - mATAFlagByteSwap = 1 << bATAFlagByteSwap, /* Swap data bytes (read - after; write - before)*/ - mATAFlagIORead = 1 << bATAFlagIORead, /* Read (in) operation*/ - mATAFlagIOWrite = 1 << bATAFlagIOWrite, /* Write (out) operation*/ - mATAFlagTFAccessResult = 1 << bATAFlagTFAccessResult, /* get contents of TaskFile registers indicated in TFMask on command completion, even if no error*/ - mATAFlagUseDMA = 1 << bATAFlagUseDMA, - mATAFlagProtocolATAPI = 1 << bATAFlagProtocolATAPI, /* ATAPI protocol indicator*/ - mATAFlagImmediate = 1 << bATAFlagImmediate, /* Put command at head of queue */ - mATAFlagTFAccess = 1 << bATAFlagTFAccess, /* Return Taskfile on error status*/ - -} ; - -/* The Function codes sent to controllers*/ -enum ataOpcode { - - kATANoOp = 0, - kATAFnExecIO , /* Execute ATA I/O */ - kATAPIFnExecIO, /* ATAPI I/O */ - kATAFnRegAccess , /* Register Access */ - - kATAFnQFlush , /* I/O Queue flush requests for your unit number */ - kATAFnBusReset /* Reset ATA bus */ - -} ; - - -/* The ATA Event codes */ -/* sent when calling the device driver's event handler*/ -enum ataEventCode { - kATANullEvent = 0x00, /* Just kidding -- nothing happened*/ - kATAOnlineEvent = 0x01, /* An ATA device has come online*/ - kATAOfflineEvent = 0x02, /* An ATA device has gone offline*/ - kATARemovedEvent = 0x03, /* An ATA device has been removed from the bus*/ - kATAResetEvent = 0x04, /* Someone gave a hard reset to the drive*/ - kATAOfflineRequest = 0x05, /* Someone requesting to offline the drive*/ - kATAEjectRequest = 0x06, /* Someone requesting to eject the drive*/ - kATAPIResetEvent = 0x07, /* Someone gave a ATAPI reset to the drive*/ - kATAReservedEvent = 0x80 /* RESERVED*/ -}; - - -// These need to be combined with a new enumeration of the current ATA/ATAPI command set. -// Some opcodes are of interest to ATA controllers, since they imply special protocols -// or handling. Device Reset, Execute Device Diagnostics have subtle side effects that -// controllers need to be aware of, so we snoop for those commands being issued. -// the rest are here for informational purposes. - -// BUG make new enum for all current ATA commands. - -enum { - kSOFTRESET = 0x008, // ATAPI Soft Reset command - kPACKET = 0x0A0, // ATAPI Packet command - kID_DRIVE = 0x0A1 // ATAPI Identify drive command -}; -/* ATA Command Opcode definition*/ -enum { - kATAcmdWORetry = 0x01, /* Without I/O retry option*/ - kATAcmdNOP = 0x0000, /* NOP operation - media detect*/ - kATAcmdRecal = 0x0010, /* Recalibrate command */ - kATAcmdRead = 0x0020, /* Read command */ - kATAcmdReadLong = 0x0022, /* Read Long command*/ - kATAcmdReadExtended = 0x0024, /* Read Extended (with retries)*/ - kATAcmdReadDMAExtended = 0x0025, /* Read DMA Extended (with retries)*/ - kATAcmdWrite = 0x0030, /* Write command */ - kATAcmdWriteLong = 0x0032, /* Write Long*/ - kATAcmdWriteExtended = 0x0034, /* Write Extended (with retries)*/ - kATAcmdWriteDMAExtended = 0x0035, /* Write DMA Extended (with retries)*/ - kATAcmdWriteVerify = 0x003C, /* Write verify*/ - kATAcmdReadVerify = 0x0040, /* Read Verify command */ - kATAcmdFormatTrack = 0x0050, /* Format Track command */ - kATAcmdSeek = 0x0070, /* Seek command */ - kATAcmdDiagnostic = 0x0090, /* Drive Diagnostic command */ - kATAcmdInitDrive = 0x0091, /* Init drive parameters command */ - kATAcmdReadMultiple = 0x00C4, /* Read multiple*/ - kATAcmdWriteMultiple = 0x00C5, /* Write multiple*/ - kATAcmdSetRWMultiple = 0x00C6, /* Set Multiple for Read/Write Multiple*/ - kATAcmdReadDMA = 0x00C8, /* Read DMA (with retries)*/ - kATAcmdWriteDMA = 0x00CA, /* Write DMA (with retries)*/ - kATAcmdMCAcknowledge = 0x00DB, /* Acknowledge media change - removable*/ - kATAcmdDoorLock = 0x00DE, /* Door lock*/ - kATAcmdDoorUnlock = 0x00DF, /* Door unlock*/ - kATAcmdStandbyImmed = 0x00E0, /* Standby Immediate*/ - kATAcmdIdleImmed = 0x00E1, /* Idle Immediate*/ - kATAcmdStandby = 0x00E2, /* Standby*/ - kATAcmdIdle = 0x00E3, /* Idle*/ - kATAcmdReadBuffer = 0x00E4, /* Read sector buffer command */ - kATAcmdCheckPowerMode = 0x00E5, /* Check power mode command <04/04/94>*/ - kATAcmdSleep = 0x00E6, /* Sleep*/ - kATAcmdFlushCache = 0x00E7, /* Flush Cache */ - kATAcmdWriteBuffer = 0x00E8, /* Write sector buffer command */ - kATAcmdWriteSame = 0x00E9, /* Write same data to multiple sectors*/ - kATAcmdFlushCacheExtended = 0x00EA, /* Flush Cache Extended */ - kATAcmdDriveIdentify = 0x00EC, /* Identify Drive command */ - kATAcmdMediaEject = 0x00ED, /* Media Eject*/ - kATAcmdSetFeatures = 0x00EF /* Set Features*/ -}; - -/* Set feature command opcodes*/ -enum { - kATAEnableWriteCache = 0x02, /* Enable write cache*/ - kATASetTransferMode = 0x03, /* Set transfer mode*/ - kATAEnableAPM = 0x05, /* Enable Advanced Power Management*/ - kATASetPIOMode = 0x08, /* PIO Flow Control Tx Mode bit*/ - kATADisableWriteCache = 0x82, /* disable write cache*/ - kATAEnableReadAhead = 0xAA /* Read look-ahead enable*/ -}; - -// revisit the opcode enumerations. - -////////////////////// - - -/* task file for ata */ -typedef struct ataTaskFile { - - UInt8 ataTFFeatures; /* <-> Error(R) or ataTFFeatures(W) register image */ - UInt8 ataTFCount; /* <-> Sector count/remaining */ - UInt8 ataTFSector; /* <-> Sector start/finish */ - UInt8 ataTFCylLo; /* <-> ataTFCylLo */ - UInt8 ataTFCylHigh; /* <-> ataTFCylHigh */ - UInt8 ataTFSDH; /* <-> ataTFSDH register image*/ - UInt8 ataTFCommand; /* <-> Status(R) or Command(W) register image */ - -} ataTaskFile; - - -typedef struct ataRegisterImage { - - ataTaskFile taskFile; - UInt16 ataDataRegister; /* <-> Data register. */ - UInt8 ataAltSDevCReg; /* <->: Alternate status(R) or Device Control(W) register image*/ - -} ataRegisterImage ; - - -typedef struct ATAPICmdPacket{ - - UInt16 atapiPacketSize; /* Size of command packet in bytes */ - UInt16 atapiCommandByte[8]; /* The command packet itself*/ - -}ATAPICmdPacket; - - - -// Error and result codes: TBD -enum { - kATAErrUnknownType = -1, - kATANoErr = 0, - kATAQueueEmpty = 1, - kATAUnknownOpcode, - kATATimeoutErr, - kATAInvalidDevID, - kATAErrDevBusy, - kATAModeNotSupported, - kATADevIntNoCmd, - kATADeviceError, - kATADMAErr -}; - - -#endif /* !_IOATATYPES_H */ diff --git a/i386/include/IOKit/ata/IOPCIATA.h b/i386/include/IOKit/ata/IOPCIATA.h deleted file mode 100644 index 62067b2..0000000 --- a/i386/include/IOKit/ata/IOPCIATA.h +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _DRV_PCI_ATA_H -#define _DRV_PCI_ATA_H - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOTypes.h> -#include "IOATAController.h" -#include <IOKit/IOMemoryCursor.h> -#include <IOKit/IOBufferMemoryDescriptor.h> - -#include <IOKit/IOInterruptEventSource.h> - -/*! @class IOPCIATA - @abstract The base class for PCI-IDE ata controller family. - @discussion class defining the common elements of bus-mastering PCI ATA controllers which meet or at least loosely follow the pci bus mastering pci-ide controller spec. Header doc is incomplete, but source is heavily commented. - -*/ - - - -class IOPCIATA : public IOATAController -{ - OSDeclareDefaultStructors(IOPCIATA); - -public: - - /*--- Overrides from IOATAController ---*/ - virtual bool init(OSDictionary * properties); - virtual bool start( IOService* provider ); - -protected: - - // The DMA states: not in use, in use and running with additional passes needed, - // in use on final pass, transfer complete, and failure - enum ATADMAState - { - // DMA state flags - kATADMAInactive, - kATADMAStarting, - kATADMAActive, - kATADMAStatus, - kATADMAComplete, - kATADMAError, - - }; - - enum { - // PRD flags - kLast_PRD = 0x8000, - kContinue_PRD = 0, - - }; - - - enum { - mBMCmdStartOutput = 0x01, // start engine to transfer from memory to device. - mBMCmdStartInput = (1 << 3 ) | 0x01, // start engine to transfer from device to memory - mBMCmdStop = 0x00, // halt engine. - }; - - enum { - // bus master status register definitions. - bBMStatusSimplex = 7, // 0 = simultaneous transactions allowed. 1 = primary and secondary busses may not be active at same time. - bBMStatusDrv1 = 6, // 1 = device 1 and bus are already configured by some other software/firmware - bBMStatusDrv0 = 5, // 1 = device 0 and bus are already configured by some other software/firmware - bBMStatusInt = 2, // 1 = device has asserted INTRQ and all data is flushed to/from memory. - bBMStatusError = 1, // 1 = an error in the DMA has occured. Software clears by writing 1 to this bit. - bBMStatusActive = 0, // 1 = DMA engine is active. - }; - - enum{ - - mBMStatusSimplex = 1 << 7, - mBMStatusDrv1 = 1 << 6, - mBMStatusDrv0 = 1 << 5, - mBMStatusInt = 1 << 2, - mBMStatusError = 1 << 1, - mBMStatusActive = 1 - }; - - // the physical region descriptor used for the dma engine. - struct PRD - { - UInt32 bufferPtr; // address - UInt16 byteCount; // 16 bit byte count where 0x0000 = 64K - UInt16 flags; // 0 in flags means contine, 0x80 means stop - }; - - - // descendants of this class MUST initialize these values - // prior to activating any DMA command. - IOATARegPtr8 _bmCommandReg; - IOATARegPtr8 _bmStatusReg; - IOATARegPtr32 _bmPRDAddresReg; - - // semaphore for DMA state - UInt32 _dmaState; - - // table of PRD descriptors - PRD* _prdTable; - IOPhysicalAddress _prdTablePhysical; - - IONaturalMemoryCursor* _DMACursor; - - // override from IOATAController - // activate the DMA engine as per the current command - virtual IOReturn startDMA( void ); - - // override from IOATAController - // safely halt the DMA engine regardless of state - virtual IOReturn stopDMA( void ); - - // allocate memory for the PRD descriptors. - virtual bool allocDMAChannel(void); - - // fill CC with stop commands. - virtual void initATADMAChains (PRD* descPtr); - - // fill out a PRD, respecting endianess - virtual void setPRD(UInt8 *bffr, UInt16 count, PRD *tableElement, UInt16 end); - - // setup the CC with IO commands - virtual IOReturn createChannelCommands(void); - - // deallocate memory for the DMA engine - virtual bool freeDMAChannel(void); - - // clean up on device interrupt - virtual IOReturn handleDeviceInterrupt(void); - - // activate the DMA engine - virtual void activateDMAEngine(void); - - // shutdown the DMA engine - virtual void stopDMAEngine(void); - - // safely suspend the DMA engine - virtual void shutDownATADMA (void); - - // overrides - virtual void free(); -protected: -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOPCIATA class in the future. - */ - typedef struct ExpansionData - { - IOBufferMemoryDescriptor* _prdBuffer; - } ExpansionData; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - -private: - OSMetaClassDeclareReservedUnused(IOPCIATA, 0); - OSMetaClassDeclareReservedUnused(IOPCIATA, 1); - OSMetaClassDeclareReservedUnused(IOPCIATA, 2); - OSMetaClassDeclareReservedUnused(IOPCIATA, 3); - OSMetaClassDeclareReservedUnused(IOPCIATA, 4); - OSMetaClassDeclareReservedUnused(IOPCIATA, 5); - OSMetaClassDeclareReservedUnused(IOPCIATA, 6); - OSMetaClassDeclareReservedUnused(IOPCIATA, 7); - OSMetaClassDeclareReservedUnused(IOPCIATA, 8); - OSMetaClassDeclareReservedUnused(IOPCIATA, 9); - OSMetaClassDeclareReservedUnused(IOPCIATA, 10); - OSMetaClassDeclareReservedUnused(IOPCIATA, 11); - OSMetaClassDeclareReservedUnused(IOPCIATA, 12); - OSMetaClassDeclareReservedUnused(IOPCIATA, 13); - OSMetaClassDeclareReservedUnused(IOPCIATA, 14); - OSMetaClassDeclareReservedUnused(IOPCIATA, 15); - OSMetaClassDeclareReservedUnused(IOPCIATA, 16); - OSMetaClassDeclareReservedUnused(IOPCIATA, 17); - OSMetaClassDeclareReservedUnused(IOPCIATA, 18); - OSMetaClassDeclareReservedUnused(IOPCIATA, 19); - OSMetaClassDeclareReservedUnused(IOPCIATA, 20); -}; - -#endif // _DRV_PCI_ATA_H diff --git a/i386/include/IOKit/ata/MacIOATA.h b/i386/include/IOKit/ata/MacIOATA.h deleted file mode 100644 index fad6c33..0000000 --- a/i386/include/IOKit/ata/MacIOATA.h +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#if defined(__ppc__) - - -#ifndef _DRV_MACIO_ATA_H -#define _DRV_MACIO_ATA_H - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOTypes.h> -#include "IOATAController.h" -#include <IOKit/ppc/IODBDMA.h> -#include <IOKit/IOMemoryCursor.h> - -#include <IOKit/IOInterruptEventSource.h> - - -/*! @class MacIOATA - @abstract The base class for MAC-IO ata controller family. . - @discussion class defining the portions of MacIO ATA cells which are shared - in common between Heathrow and Key Largo ATA Cells. - These controllers share a common register file layout, interrupt - source format and all use DBDMA engines. These are different from - other ATA controllers, such as most PCI-IDE and PC-Card ATA ports. - Each cell type has some distinctive features that must be implemented - by a specific driver subclass. As much common code as possible is - presented in this superclass. - -*/ - -class MacIOATA : public IOATAController -{ - OSDeclareDefaultStructors(MacIOATA); - -public: - - /*--- Overrides from IOATAController ---*/ - virtual bool init(OSDictionary * properties); - virtual bool start( IOService* provider ); - virtual IOReturn message (UInt32 type, IOService* provider, void* argument = 0); - -protected: - - // The DMA states: not in use, in use and running with additional passes needed, - // in use on final pass, transfer complete, and failure - enum ATADMAState - { - kATADMAInactive, - kATADMAStarting, - kATADMAActive, - kATADMAStatus, - kATADMAComplete, - kATADMAError - }; - - - - // the address of the timing register in the controller - volatile UInt32* _timingConfigReg; - // the timing values to use for each device. - UInt32 _timingConfig[2]; - - // semaphore for DMA state - UInt32 _dmaState; - - // indicates whether a DMA interrupt is expected - UInt32 _dmaIntExpected; - - // pointer to the DMA control register address. - volatile IODBDMAChannelRegisters* _dmaControlReg; - - // mappings to the controller and DMA engine registers - // we have to free these when we go away. - IOMemoryMap* _baseAddressMap; - IOMemoryMap* _dmaBaseMap; - - // the DBDMA memory cursor - IODBDMAMemoryCursor* _DMACursor; - - // the DBDMA descriptor table - IODBDMADescriptor* _descriptors; - IOPhysicalAddress _descriptorsPhysical; - - // interrupt event sources - IOInterruptEventSource* _devIntSrc; - IOInterruptEventSource* _dmaIntSrc; - - // flag indicating device and dma engine interrupts need - // re-synchronization. - - bool _resyncInterrupts; -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - // overriden to allow synchronization of DMA vs. device interrupts. - virtual IOReturn handleDeviceInterrupt(void); - // overriden here to allow for reporting of DMA errs - virtual IOReturn asyncStatus(void); - - // overriden here to allow for clean up of DMA resynch flag on timeout. - virtual void handleTimeout(void); - - - // called by the superclass::start method in order to - // find and enable access to the ATA task file. - virtual bool configureTFPointers(void); - - // allocate memory for the DMA descriptors. - virtual bool allocDMAChannel(void); - - // fill CC with stop commands. - virtual void initATADMAChains (IODBDMADescriptor* descPtr); - - // setup the CC with IO commands - virtual IOReturn createChannelCommands(void); - - // deallocate memory for the DMA engine - virtual bool freeDMAChannel(void); - - // connect the device (drive) interrupt to our workloop - virtual bool createDeviceInterrupt(void); - - // connect the DMA interrupt to our workloop. - virtual bool createDMAInterrupt(void); - - - // override from IOATAController - // activate the DMA engine as per the current command - virtual IOReturn startDMA( void ); - - // override from IOATAController - // safely halt the DMA engine regardless of state - virtual IOReturn stopDMA( void ); - - // handle the interrupt processing - virtual void processDMAInterrupt (void); - - // activate the DMA engine - virtual void activateDMAEngine(void); - - // shutdown the DMA engine - virtual void stopDMAEngine(void); - - // safely suspend the DMA engine - virtual void shutDownATADMA (void); - - // check the command chain after run to update byte counts - // and check for errors - virtual bool scanATADMAChain (IOByteCount* byteCount); - - - // c to c++ glue code. - static void deviceInterruptOccurred(OSObject*, IOInterruptEventSource *, int count); - static void dmaInterruptOccurred(OSObject*, IOInterruptEventSource *, int count); - - // overrides - virtual void free(); - - // media bay specific code - bool isMediaBay; - bool isBusOnline; - - virtual IOReturn executeCommand(IOATADevice* nub, IOATABusCommand* command); - virtual IOReturn handleQueueFlush( void ); - virtual bool checkTimeout( void ); - static void cleanUpAction(OSObject * owner, void*, void*, void*, void*); - virtual void cleanUpBus(void); - virtual IOReturn handleBusReset(void); - // end media bay specific. - -private: - OSMetaClassDeclareReservedUnused(MacIOATA, 0); - OSMetaClassDeclareReservedUnused(MacIOATA, 1); - OSMetaClassDeclareReservedUnused(MacIOATA, 2); - OSMetaClassDeclareReservedUnused(MacIOATA, 3); - OSMetaClassDeclareReservedUnused(MacIOATA, 4); - OSMetaClassDeclareReservedUnused(MacIOATA, 5); - OSMetaClassDeclareReservedUnused(MacIOATA, 6); - OSMetaClassDeclareReservedUnused(MacIOATA, 7); - OSMetaClassDeclareReservedUnused(MacIOATA, 8); - OSMetaClassDeclareReservedUnused(MacIOATA, 9); - OSMetaClassDeclareReservedUnused(MacIOATA, 10); - OSMetaClassDeclareReservedUnused(MacIOATA, 11); - OSMetaClassDeclareReservedUnused(MacIOATA, 12); - OSMetaClassDeclareReservedUnused(MacIOATA, 13); - OSMetaClassDeclareReservedUnused(MacIOATA, 14); - OSMetaClassDeclareReservedUnused(MacIOATA, 15); - OSMetaClassDeclareReservedUnused(MacIOATA, 16); - OSMetaClassDeclareReservedUnused(MacIOATA, 17); - OSMetaClassDeclareReservedUnused(MacIOATA, 18); - OSMetaClassDeclareReservedUnused(MacIOATA, 19); - OSMetaClassDeclareReservedUnused(MacIOATA, 20); - -}; - -#endif // _DRV_MACIO_ATA_H - - -#endif // defined(ppc) diff --git a/i386/include/IOKit/audio/IOAudioControl.h b/i386/include/IOKit/audio/IOAudioControl.h deleted file mode 100644 index d1d9019..0000000 --- a/i386/include/IOKit/audio/IOAudioControl.h +++ /dev/null @@ -1,595 +0,0 @@ -/* - * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOAUDIOCONTROL_H -#define _IOKIT_IOAUDIOCONTROL_H - -#include <IOKit/IOService.h> -#ifndef IOAUDIOFAMILY_SELF_BUILD -#include <IOKit/audio/IOAudioEngine.h> -#else -#include "IOAudioEngine.h" -#endif - -class IOAudioPort; -class OSDictionary; -class OSSet; -class IOAudioUserClient; -class IOAudioControlUserClient; -class IOWorkLoop; -class IOCommandGate; - -/*! - * @class IOAudioControl - * @abstract Represents any controllable attribute of an IOAudioDevice. - * @discussion An IOAudioControl instance may belong to one IOAudioPort. Additionally, it may associated - * with an IOAudioEngine as a default control for that IOAudioEngine. - * - * When its value changes, it sends a notification to the CoreAudio.framework (HAL). It also makes a call - * to the ValueChangeHandler. - * - * The base IOAudioControl class contains a type, a value and a channel ID representing the channel(s) which - * the control acts on. It may also contain a readable format for the name of the channel as well as a - * control ID that can be used to identify unique controls. Additionally it may contain a subType and a usage. - * Each type has its own set of possible subTypes. There currently four different control types defined: - * kIOAudioControlTypeLevel, kIOAudioControlTypeToggle, kIOAudioControlTypeSelector. - * Each one is represented by a subclass of IOAudioControl: IOAudioLevelControl, IOAudioToggleControl, - * IOAudioSelectorControl. The level control defines a range of allowed values and has - * a defined subtype of kIOAudioLevelControlSubTypeVolume used to define a volume control. The toggle control - * allows for a boolean value and has a defined subtype kIOAudioToggleControlSubTypeMute for a mute control. The - * selector control has a list of allowed selections with a value and description for each allowed selection and - * has the following sub types: kIOAudioSelectorControlSubTypeOutput for an output selector and - * kIOAudioSelectorControlSubTypeInput for an input selector. See the subclass documentation for a more - * complete description of each - * - * There are enums for default channel ID values and common channel names in IOAudioTypes.h. The channel ID - * values are prefixed with 'kIOAudioControlChannelID' and the common channel names are prefixed with - * 'kIOAudioControlChannelName'. All of the attributes of the IOAudioControl are stored in the registry. - * The key used for each attribute is defined in IOAudioTypes.h with the define matching the following - * pattern: 'kIOAudioControl<attribute name>Key'. For example: kIOAudioControlChannelIDKey. - * - * In addition to the existing defined control types, drivers can define their own as well for other purposes. - * - * Changes to the IOAudioControl's value made by the CoreAudio.framework are done through the IORegistry. - * When the CoreAudio.framework initiates a value change, the control receives a setProperties() message. - * The setProperties() implementation looks for the property 'IOAudioControlValue' and if present, calls - * setValue() on the driver's IOWorkLoop with the new value. The setValue() function first checks to see - * if the new value is different. If so, it calls performValueChange() to call through to the driver - * to make the change in the hardware. If that call succeeds the value is changed and the new value is set - * in the registry. Additionally notifications are sent to all clients that have registered for them. - */ -class IOAudioControl : public IOService -{ - friend class IOAudioPort; - friend class IOAudioDevice; - friend class IOAudioEngine; - - OSDeclareDefaultStructors(IOAudioControl) - -public: - - /*! - * @typedef IntValueChangeHandler - * @abstract Handler function used to make a notification when a value is to be changed. - * @param target Reference supplied when the handler was registered. - * @param audioControl The IOAudioControl that is changing. - * @param oldValue The old value of the control. - * @param newValue The new value the control is being changed to. - * @result Must return kIOReturnSuccess when the hardware is successfully updated. - */ - typedef IOReturn (*IntValueChangeHandler)(OSObject *target, IOAudioControl *audioControl, SInt32 oldValue, SInt32 newValue); - typedef IOReturn (*DataValueChangeHandler)(OSObject *target, IOAudioControl *audioControl, const void *oldData, UInt32 oldDataSize, const void *newData, UInt32 newDataSize); - typedef IOReturn (*ObjectValueChangeHandler)(OSObject *target, IOAudioControl *audioControl, OSObject *oldValue, OSObject *newValue); - -protected: - /*! @var workLoop - The IOWorkLoop for the audio driver - shared from the IOAudioDevice. - */ - IOWorkLoop *workLoop; - /*! @var commandGate - The IOCommandGate for this control - attached to the driver's IOWorkLoop. - */ - IOCommandGate *commandGate; - - /*! @var isStarted - Internal state keeping track of when the IOAudioControl has been started. - */ - bool isStarted; - - /*! @var controlID - An optional identifier that can be used to identify the control. - */ - UInt32 controlID; - /*! @var channelID - The ID of the channel this control affects - may be kIOAudioControlChannelIDAll if it represents all channels. - */ - UInt32 channelID; - - UInt32 type; - UInt32 subType; - UInt32 usage; - - OSObject *value; - - typedef enum { - kIntValueChangeHandler, - kDataValueChangeHandler, - kObjectValueChangeHandler - } ValueChangeHandlerType; - - ValueChangeHandlerType valueChangeHandlerType; - - union { - IntValueChangeHandler intHandler; - DataValueChangeHandler dataHandler; - ObjectValueChangeHandler objectHandler; - } valueChangeHandler; - - OSObject *valueChangeTarget; - - /*! @var clients - A list of user clients that have requested value change notifications. - */ - OSSet *userClients; - -protected: - struct ExpansionData { - IOAudioEngine * providerEngine; - OSArray * notificationQueue; - }; - - ExpansionData *reserved; - -public: - // OSMetaClassDeclareReservedUsed(IOAudioControl, 0); - virtual void sendChangeNotification(UInt32 notificationType); - - // OSMetaClassDeclareReservedUsed(IOAudioControl, 1); - /*! - * @function setReadOnlyFlag - * @abstract Call this function to say that a control is read only. - * This call cannot be undone, so if a control is only temporarily unsetable, - * do not use this call but instead return an error from the control handler. - */ - virtual void setReadOnlyFlag(); - - // OSMetaClassDeclareReservedUsed(IOAudioControl, 2); - virtual void sendQueuedNotifications(void); - - // OSMetaClassDeclareReservedUsed(IOAudioControl, 3); - /*! - * @function createUserClient - * @abstract Creates a new IOAudioControlUserClient instance. - * @discussion This function is called by newUserClient() to create a new IOAudioControlUserClient instance. This function may be overridden by subclasses that need to add functionality - * to the IOAudioControlUserClient. In that case, they must subclass IOAudioControlUserClient - * and return a new, initialized instance of that subclass. - * A derived class that requires overriding of createUserClient should override the version with the properties - * parameter for Intel targets, and without the properties parameter for PPC targets. The #if __i386__ directive - * can be used to select between the two behaviors. - * @param task The task requesting the new user client. - * @param securityID Optional security paramater passed in by the client - ignored. - * @param type Optional user client type passed in by the client. - * @param newUserClient The IOAudioControlUserClient * must be stored in this param on a successful - * completion. - * @param properties A dictionary of additional properties for the connection. - * @result Returns kIOReturnSuccess on success. - */ - virtual IOReturn createUserClient(task_t task, void *securityID, UInt32 type, IOAudioControlUserClient **newUserClient, OSDictionary *properties); - -private: - OSMetaClassDeclareReservedUsed(IOAudioControl, 0); - OSMetaClassDeclareReservedUsed(IOAudioControl, 1); - OSMetaClassDeclareReservedUsed(IOAudioControl, 2); - OSMetaClassDeclareReservedUsed(IOAudioControl, 3); - - OSMetaClassDeclareReservedUnused(IOAudioControl, 4); - OSMetaClassDeclareReservedUnused(IOAudioControl, 5); - OSMetaClassDeclareReservedUnused(IOAudioControl, 6); - OSMetaClassDeclareReservedUnused(IOAudioControl, 7); - OSMetaClassDeclareReservedUnused(IOAudioControl, 8); - OSMetaClassDeclareReservedUnused(IOAudioControl, 9); - OSMetaClassDeclareReservedUnused(IOAudioControl, 10); - OSMetaClassDeclareReservedUnused(IOAudioControl, 11); - OSMetaClassDeclareReservedUnused(IOAudioControl, 12); - OSMetaClassDeclareReservedUnused(IOAudioControl, 13); - OSMetaClassDeclareReservedUnused(IOAudioControl, 14); - OSMetaClassDeclareReservedUnused(IOAudioControl, 15); - OSMetaClassDeclareReservedUnused(IOAudioControl, 16); - OSMetaClassDeclareReservedUnused(IOAudioControl, 17); - OSMetaClassDeclareReservedUnused(IOAudioControl, 18); - OSMetaClassDeclareReservedUnused(IOAudioControl, 19); - OSMetaClassDeclareReservedUnused(IOAudioControl, 20); - OSMetaClassDeclareReservedUnused(IOAudioControl, 21); - OSMetaClassDeclareReservedUnused(IOAudioControl, 22); - OSMetaClassDeclareReservedUnused(IOAudioControl, 23); - -public: - - /*! - * @function withAttributes - * @abstract Static function that allocates a new IOAudioControl with the given attributes. - * @param type The type of the control. Common, known types are defined in IOAudioTypes.h. They currently - * consist of kIOAudioControlTypeLevel, kIOAudioControlTypeToggle, kIOAudioControlTypeSelector. - * @param channelID The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h. - * @param channelName An optional name for the channel. Common names are located in IOAudioDefines.h. Any name not - * defined in IOAudioDefines.h must be localized in order to be properly displayed in multiple languages. - * @param cntrlID An optional ID for the control that can be used to uniquely identify controls - * @param subType An optional subType specific to the given type - * @param usage An optional value specifying how the control will be used. Currently defined usages are kIOAudioControlUsageInput, - * kIOAudioControlUsageOutput and kIOAudioControlUsagePassThru. This value is used when a control is set as a default control - * on an IOAudioEngine. - * @result Returns a newly allocated and initialized IOAudioControl. - */ - static IOAudioControl *withAttributes(UInt32 type, - OSObject *initialValue, - UInt32 channelID, - const char *channelName = 0, - UInt32 cntrlID = 0, - UInt32 subType = 0, - UInt32 usage = 0); - - /*! - * @function init - * @abstract Initializes a newly allocated IOAudioControl with the given attributes. - * @param type The type of the control. Common, known types are defined in IOAudioTypes.h. They currently - * consist of kIOAudioControlTypeLevel, kIOAudioControlTypeToggle, kIOAudioControlTypeSelector. - * @param channelID The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h. - * @param channelName An optional name for the channel. Common names are located in IOAudioDefines.h. Any name not - * defined in IOAudioDefines.h must be localized in order to be properly displayed in multiple languages. - * @param cntrlID An optional ID for the control that can be used to uniquely identify controls - * @param subType An optional subType specific to the given type - * @param usage An optional value specifying how the control will be used. Currently defined usages are kIOAudioControlUsageInput, - * kIOAudioControlUsageOutput and kIOAudioControlUsagePassThru. This value is used when a control is set as a default control - * on an IOAudioEngine. - * @param properties Standard property list passed to the init() function of any new IOService. This dictionary - * gets stored in the registry entry for this instance. - * @result Returns true on success. - */ - virtual bool init(UInt32 type, - OSObject *initialValue, - UInt32 channelID, - const char *channelName = 0, - UInt32 cntrlID = 0, - UInt32 subType = 0, - UInt32 usage = 0, - OSDictionary *properties = 0); - - /*! - * @function free - * @abstract Frees all of the resources allocated by the IOAudioControl. - * @discussion Do not call this directly. This is called automatically by the system when the instance's - * refcount goes to 0. To decrement the refcount, call release() on the object. - */ - virtual void free(); - - /*! - * @function start - * @abstract Starts a newly created IOAudioControl. - * @discussion This is called automatically by IOAudioPort when addAudioControl() is called or by IOAudioEngine - * when addDefaultAudioControl() is called. It will only be called by the first call to either addAudioControl() or - * addDefaultAudioControl(). - * @param provider The IOAudioPort or IOAudioEngine that owns this control. - * @result Returns true on success. - */ - virtual bool start(IOService *provider); - - virtual bool attachAndStart(IOService *provider); - - /*! - * @function getIsStarted - * @abstract Returns true after start() has been called. - * @discussion Used by IOAudioPort and IOAudioEngine to decide if the control needs to be started. - */ - virtual bool getIsStarted(); - - /*! - * @function stop - * @abstract Stops the control when the provider is going away. - * @param provider The IOAudioPort or IOAudioEngine that owns this control. - */ - virtual void stop(IOService *provider); - - /*! - * @function getWorkLoop - * @abstract Returns the IOWorkLoop for the whole audio driver. - */ - virtual IOWorkLoop *getWorkLoop(); - - /*! - * @function getCommandGate - * @abstract Returns the IOCommandGate for this IOAudioControl. - */ - virtual IOCommandGate *getCommandGate(); - - /*! - * @function newUserClient - * @abstract Creates a new user client object for this IOAudioControl instance. - * @discussion This is called automatically by I/O Kit when a user process opens a connection to this - * IOAudioControl. This is typically done when the user process needs to register for value change - * notifications. This implementation allocates a new IOAudioControlUserClient object. There is no - * need to call this directly. - * A derived class that requires overriding of newUserClient should override the version with the properties - * parameter for Intel targets, and without the properties parameter for PPC targets. The #if __i386__ directive - * can be used to select between the two behaviors. - * @param task The task requesting the new user client. - * @param securityID Optional security paramater passed in by the client - ignored. - * @param type Optional user client type passed in by the client - 0 for the default user client type. - * @param handler The new IOUserClient * must be stored in this param on a successful completion. - * @param properties A dictionary of additional properties for the connection. - * @result Returns kIOReturnSuccess on success. May also result kIOReturnError or kIOReturnNoMemory. - */ - virtual IOReturn newUserClient(task_t task, void *securityID, UInt32 type, IOUserClient **handler); - virtual IOReturn newUserClient(task_t task, void *securityID, UInt32 type, OSDictionary *properties, IOUserClient **handler); - - /*! - * @function createUserClient - * @abstract Creates a new IOAudioControlUserClient instance. - * @discussion This function is called by newUserClient() to create a new IOAudioControlUserClient instance. This function may be overridden by subclasses that need to add functionality - * to the IOAudioControlUserClient. In that case, they must subclass IOAudioControlUserClient - * and return a new, initialized instance of that subclass. - * A derived class that requires overriding of createUserClient should override the version with the properties - * parameter for Intel targets, and without the properties parameter for PPC targets. The #if __i386__ directive - * can be used to select between the two behaviors. - * @param task The task requesting the new user client. - * @param securityID Optional security paramater passed in by the client - ignored. - * @param type Optional user client type passed in by the client. - * @param newUserClient The IOAudioControlUserClient * must be stored in this param on a successful - * completion. - * @result Returns kIOReturnSuccess on success. - */ - virtual IOReturn createUserClient(task_t task, void *securityID, UInt32 type, IOAudioControlUserClient **newUserClient); - - /*! - * @function clientClosed - * @abstract Called automatically by the IOAudioControlUserClient when a user client closes its - * connection to the control. - * @param client The user client object that has disconnected. - */ - virtual void clientClosed(IOAudioControlUserClient *client); - - /*! - * @function setProperties - * @abstract Changes a property of this IOService. - * @discussion This is called when the user client changes a property of this - * IOAudioControl. In this case it is used to change the value. This function - * looks for that property and then calls setValue() through the IOCommandGate and - * setValueAction(). - * @param properties An OSDictionary containing the properties to change. - * @result Returns kIOReturnSuccess on success. - */ - virtual IOReturn setProperties(OSObject *properties); - - virtual void setValueChangeHandler(IntValueChangeHandler intValueChangeHandler, OSObject *target); - virtual void setValueChangeHandler(DataValueChangeHandler dataValueChangeHandler, OSObject *target); - virtual void setValueChangeHandler(ObjectValueChangeHandler objectValueChangeHandler, OSObject *target); - - virtual void setValueChangeTarget(OSObject *target); - - /*! - * @function flushValue - * @abstract Forces the control to be flushed out to the hardware. - * @discussion This function calls performValueChange() directly with the current value of the IOAudioControl. - * @result Returns the result of performValueChange() - kIOReturnSuccess on success. - */ - virtual IOReturn flushValue(); - - /*! - * @function setValueAction - * @abstract IOCommandGate Action which calls setValue() while holding the IOCommandGate. - * @discussion This is needed to allow setValue() to be called on the IOWorkLoop. - * @param owner The owner of the IOCommandGate (the IOAudioControl in this case). - * @param arg1 The new value for the IOAudioControl. - * @result Returns the result of setValue() - kIOReturnSuccess on success. - */ - static IOReturn setValueAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - - static IOReturn _setValueAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // <rdar://7529580> - - /*! - * @function setValue - * @abstract Sets the value for this control. - * @discussion When the control's value is changed, a call is made to performValueChange(). If that call - * succeeds, the value is set and sendValueChangeNotification() is called to send a notification to the - * user clients. This function must be called on the IOWorkLoop. - * @param newValue The new value for this control. - * @result Returns kIOReturnSuccess if the value is successfully set. - */ - virtual IOReturn setValue(OSObject *newValue); - - virtual IOReturn setValue(SInt32 intValue); - - /*! - * @function hardwareValueChanged - * @abstract Updates the value for this control and sends out the value changed notification. - * @discussion This is designed to be called by the driver when it detects that the hardware's value has - * changed without driver intervention (e.g. when an external event causes the change). The difference between - * hardwareValueChanged() and setValue() is that hardwareValueChanged() doesn't call performValueChange() which - * sends a message back to the driver to cause it to change the hardware with the new value. This function must - * be called on the IOWorkLoop. - * @param newValue The new value for this control. - * @result Returns kIOReturnSuccess if the value is successfully updated. - */ - virtual IOReturn hardwareValueChanged(OSObject *newValue); - - /*! - * @function getValue - * @abstract Returns the current value of the control. - */ - virtual OSObject *getValue(); - virtual SInt32 getIntValue(); - virtual const void *getDataBytes(); - virtual UInt32 getDataLength(); - - /*! - * @function getControlID - * @abstract Returns the control ID for the control. - */ - virtual UInt32 getControlID(); - - /*! - * @function getChannelID - * @abstract Returns the channel ID for the control. - */ - virtual UInt32 getChannelID(); - - virtual UInt32 getType(); - virtual UInt32 getSubType(); - virtual UInt32 getUsage(); - - virtual void setCoreAudioPropertyID(UInt32 propertyID); - - void setWorkLoop(IOWorkLoop *wl); - -protected: - /*! - * @function sendValueChangeNotification - * @abstract Called when the value has changed for the control. - * @discussion This function sends out the value change notification to the user clients. - */ - virtual void sendValueChangeNotification(); - - /*! - * @function setChannelName - * @abstract Called at init time to set the channel name for this IOAudioControl. - */ - virtual void setChannelName(const char *channelName); - - /*! - * @function setChannelID - * @abstract Called at init time to set the channel ID for this IOAudioControl. - */ - virtual void setChannelID(UInt32 newChannelID); - virtual void setChannelNumber(SInt32 channelNumber); - - /*! - * @function setSubType - * @abstract Called at init time to set the control subType. - */ - virtual void setType(UInt32 type); - - /*! - * @function setType - * @abstract Called at init time to set the control type. - */ - virtual void setSubType(UInt32 subType); - - /*! - * @function setUsage - * @abstract Called at init time to set the control usage. - */ - virtual void setUsage(UInt32 usage); - - /*! - * @function setControlID - * @abstract Sets the controlID for this control. - * @discussion The control ID is an optional attribute that can be used to track IOAudioControls. A typical - * use is for the IOAudioDevice to assign a unique controlID to each control that it creates and then - * do a switch statement on the id of the control when it gets an audioControlValueChanged() notification. - * Typically the control ID is set when the object is created and doesn't need to be called again. - * @param cntrlID The control ID for the control. - */ - virtual void setControlID(UInt32 cntrlID); - - /*! - * @function validateValue - * @abstract Called by setValue() to verify that the value is valid. - * @param newValue The new value to be verified. - * @result Returns kIOReturnSuccess if the value is valid. - */ - virtual IOReturn validateValue(OSObject *newValue); - - /*! - * @function updateValue - * @abstract Called by setValue() in order to update the value and the registry. - * @discussion It also calls - * sendValueChangedNotification() to send notifications to the user clients. - * @param newValue The new value to b updated. - * @result Returns kIOReturnSuccess if the value is successfully updated. - */ - virtual IOReturn updateValue(OSObject *newValue); - - virtual IOReturn _setValue(OSObject *newValue); - - /*! - * @function performValueChange - * @abstract Called by setValue() to make the call to the valueChangeHandler - * to update the hardware. - * @result Returns the result of the handler call (or kIOReturnError on an error). - */ - virtual IOReturn performValueChange(OSObject *newValue); - - /*! - * @function addUserClientAction - * @abstract IOCommandGate Action which calls addUserClient() while holding the IOCommandGate. - * @discussion This is needed to allow addUserClient() to be called on the IOWorkLoop. - * @param owner The owner of the IOCommandGate (the IOAudioControl in this case). - * @param arg1 The IOAudioControlUserClient to be added. - * @result Returns the result of addUserClient() - kIOReturnSuccess on success. - */ - static IOReturn addUserClientAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - - static IOReturn _addUserClientAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // <rdar://7529580> - - /*! - * @function removeUserClientAction - * @abstract IOCommandGate Action which calls removeUserClient() while holding the IOCommandGate. - * @discussion This is needed to allow removeUserClient() to be called on the IOWorkLoop. - * @param owner The owner of the IOCommandGate (the IOAudioControl in this case). - * @param arg1 The IOAudioControlUserClient to be removed. - * @result Returns the result of removeUserClient() - kIOReturnSuccess on success. - */ - static IOReturn removeUserClientAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - - static IOReturn _removeUserClientAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // <rdar://7529580> - - /*! - * @function detachUserClientsAction - */ - static IOReturn detachUserClientsAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - - /*! - * @function addUserClient - * @abstract Called on the IOWorkLoop to add a new IOAudioControlUserClient. - * @discussion There is no need to call this directly. It is called on the workLoop - * by newUserClient() through addUserClientAction(). - * @param newUserClient The IOAudioControlUserClientto be added. - * @result Returns kIOReturnSuccess on success. - */ - virtual IOReturn addUserClient(IOAudioControlUserClient *newUserClient); - - /*! - * @function removeUserClient - * @abstract Called on the IOWorkLoop to remove an IOAudioControlUserClient. - * @discussion This is called on the IOWorkLoop by clientClosed() through - * removeUserClientAction() when the user client is going away. It should - * not be called directly. - * @param userClient The IOAudioControlUserClient to be removed. - * @result Returns kIOReturnSuccess on success. - */ - virtual IOReturn removeUserClient(IOAudioControlUserClient *userClient); - - virtual IOReturn detachUserClients(); - -}; - -#endif /* _IOKIT_IOAUDIOCONTROL_H */ - diff --git a/i386/include/IOKit/audio/IOAudioControlUserClient.h b/i386/include/IOKit/audio/IOAudioControlUserClient.h deleted file mode 100644 index 4ceb05f..0000000 --- a/i386/include/IOKit/audio/IOAudioControlUserClient.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOAUDIOCONTROLUSERCLIENT_H -#define _IOKIT_IOAUDIOCONTROLUSERCLIENT_H - -#include <IOKit/IOUserClient.h> - -#ifndef IOAUDIOFAMILY_SELF_BUILD -#include <IOKit/audio/IOAudioTypes.h> -#else -#include "IOAudioTypes.h" -#endif - -class IOAudioControl; - -class IOAudioControlUserClient : public IOUserClient -{ - OSDeclareDefaultStructors(IOAudioControlUserClient) - -protected: - task_t clientTask; - IOAudioControl * audioControl; - IOAudioNotificationMessage * notificationMessage; - - virtual IOReturn clientClose(); - virtual IOReturn clientDied(); - -protected: - struct ExpansionData { }; - - ExpansionData *reserved; - -public: - virtual void sendChangeNotification(UInt32 notificationType); - // OSMetaClassDeclareReservedUsed(IOAudioControlUserClient, 1); - virtual bool initWithAudioControl(IOAudioControl *control, task_t owningTask, void *securityID, UInt32 type, OSDictionary *properties); - -private: - OSMetaClassDeclareReservedUsed(IOAudioControlUserClient, 0); - OSMetaClassDeclareReservedUsed(IOAudioControlUserClient, 1); - - OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 2); - OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 3); - OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 4); - OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 5); - OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 6); - OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 7); - OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 8); - OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 9); - OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 10); - OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 11); - OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 12); - OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 13); - OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 14); - OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 15); - -public: - static IOAudioControlUserClient *withAudioControl(IOAudioControl *control, task_t clientTask, void *securityID, UInt32 type); - static IOAudioControlUserClient *withAudioControl(IOAudioControl *control, task_t clientTask, void *securityID, UInt32 type, OSDictionary *properties); - - virtual bool initWithAudioControl(IOAudioControl *control, task_t owningTask, void *securityID, UInt32 type); - - virtual void free(); - - virtual IOReturn registerNotificationPort(mach_port_t port, UInt32 type, UInt32 refCon); - - virtual void sendValueChangeNotification(); -}; - -#endif /* _IOKIT_IOAUDIOCONTROLUSERCLIENT_H */ diff --git a/i386/include/IOKit/audio/IOAudioDebug.h b/i386/include/IOKit/audio/IOAudioDebug.h deleted file mode 100644 index 04b744e..0000000 --- a/i386/include/IOKit/audio/IOAudioDebug.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOAUDIODEBUG_H -#define _IOAUDIODEBUG_H - -#ifdef DEBUG - #define DEBUG_LEVEL 1 - #define DEBUG_USE_FIRELOG 1 - - #ifdef DEBUG_USE_FIRELOG - #include <IOKit/firewire/FireLog.h> - #define audioDebugIOLog( level, message... ) \ - do {FireLog( message ); FireLog("\n");} while (0) - - #else - #include <IOKit/usb/IOUSBLog.h> - #define audioDebugIOLog( level, message... ) \ - do {USBLog( level, message );} while (0) - #endif - - - - #ifdef assert - #undef assert - - #define AssertionMessage( cond, file, line ) \ - "assert \"" #cond "\" failed in " #file " at line " #line - - #define AssertionFailed( cond, file, line ) \ - panic(AssertionMessage( cond, file, line )); - - #define assert( cond ) \ - if( !(cond) ) { \ - AssertionFailed( cond, __FILE__, __LINE__ ) \ - } - #endif -#else - #define audioDebugIOLog( level, message... ) ; -#endif - -#endif /* _IOAUDIODEBUG_H */ diff --git a/i386/include/IOKit/audio/IOAudioDefines.h b/i386/include/IOKit/audio/IOAudioDefines.h deleted file mode 100644 index 068267a..0000000 --- a/i386/include/IOKit/audio/IOAudioDefines.h +++ /dev/null @@ -1,465 +0,0 @@ -/* - * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOAUDIODEFINES_H -#define _IOAUDIODEFINES_H - -#define kIOAudioDeviceClassName "IOAudioDevice" -#define kIOAudioEngineClassName "IOAudioEngine" -#define kIOAudioStreamClassName "IOAudioStream" -#define kIOAudioPortClassName "IOAudioPort" -#define kIOAudioControlClassName "IOAudioControl" - -/*! - * @defined kIOAudioSampleRateKey - * @abstract The key in the IORegistry for the IOAudioEngine sample rate attribute - * @discussion This value is represented as an integer in samples per second. - */ -#define kIOAudioSampleRateKey "IOAudioSampleRate" - -#define kIOAudioSampleRateWholeNumberKey "IOAudioSampleRateWholeNumber" -#define kIOAudioSampleRateFractionKey "IOAudioSampleRateFraction" - - - -/****** - * - * IOAudioDevice defines - * - *****/ - - -/*! - * @defined kIOAudioDeviceNameKey - * @abstract The key in the IORegistry for the IOAudioDevice name attribute. - */ -#define kIOAudioDeviceNameKey "IOAudioDeviceName" - -#define kIOAudioDeviceShortNameKey "IOAudioDeviceShortName" - -/*! - * @defined kIOAudioDeviceManufacturerNameKey - * @abstract The key in the IORegistry for the IOAudioDevice manufacturer name attribute. - */ -#define kIOAudioDeviceManufacturerNameKey "IOAudioDeviceManufacturerName" - -#define kIOAudioDeviceLocalizedBundleKey "IOAudioDeviceLocalizedBundle" - -#define kIOAudioDeviceTransportTypeKey "IOAudioDeviceTransportType" - -#define kIOAudioDeviceConfigurationAppKey "IOAudioDeviceConfigurationApplication" - -#define kIOAudioDeviceCanBeDefaults "IOAudioDeviceCanBeDefaults" - -#define kIOAudioDeviceModelIDKey "IOAudioDeviceModelID" - - -/*! - * @defined kIOAudioDeviceIconName - * @abstract The key in the IORegistry for the IOAudioDevice icon name attribute. - */ -#define kIOAudioDeviceIconNameKey "IOAudioDeviceIconName" - -#define kIOAudioDeviceIconTypeKey "IOAudioDeviceIconType" - -#define kIOAudioDeviceIconSubDirKey "IOAudioDeviceIconSubDir" - -/***** - * - * IOAudioEngine defines - * - *****/ - - - /*! - * @defined kIOAudioEngineStateKey - * @abstract The key in the IORegistry for the IOAudioEngine state atrribute - * @discussion The value for this key may be one of: "Running", "Stopped" or "Paused". Currently the "Paused" - * state is unimplemented. - */ -#define kIOAudioEngineStateKey "IOAudioEngineState" - -/*! - * @defined kIOAudioEngineOutputSampleLatencyKey - * @abstract The key in the IORegistry for the IOAudioEngine output sample latency key - * @discussion - */ -#define kIOAudioEngineOutputSampleLatencyKey "IOAudioEngineOutputSampleLatency" - -/*! - * @defined kIOAudioStreamSampleLatencyKey - * @abstract The key in the IORegistry for the IOAudioStream output sample latency key - * @discussion Tells the HAL how much latency is on a particular stream. If two streams - * on the same engine have different latencies (e.g. one is analog, one is digital), then - * set this property on both streams to inform the HAL of the latency differences. Alternately, - * you can set the engine latency, and just include the latency additional to that for the particular - * stream. The HAL will add the engine and stream latency numbers together to get the total latency. - */ -#define kIOAudioStreamSampleLatencyKey "IOAudioStreamSampleLatency" - -#define kIOAudioEngineInputSampleLatencyKey "IOAudioEngineInputSampleLatency" - -#define kIOAudioEngineSampleOffsetKey "IOAudioEngineSampleOffset" - -#define kIOAudioEngineInputSampleOffsetKey "IOAudioEngineInputSampleOffset" - -#define kIOAudioEngineNumSampleFramesPerBufferKey "IOAudioEngineNumSampleFramesPerBuffer" - -#define kIOAudioEngineCoreAudioPlugInKey "IOAudioEngineCoreAudioPlugIn" - -#define kIOAudioEngineNumActiveUserClientsKey "IOAudioEngineNumActiveUserClients" - -#define kIOAudioEngineUserClientActiveKey "IOAudioEngineUserClientActive" - -#define kIOAudioEngineGlobalUniqueIDKey "IOAudioEngineGlobalUniqueID" - -#define kIOAudioEngineDescriptionKey "IOAudioEngineDescription" - -#define kIOAudioEngineClockIsStableKey "IOAudioEngineClockIsStable" - -#define kIOAudioEngineClockDomainKey "IOAudioEngineClockDomain" - -#define kIOAudioEngineIsHiddenKey "IOAudioEngineIsHidden" -/*! - * @defined kIOAudioEngineFullChannelNamesKey - * @abstract The key in the IORegistry for the IOAudioEngine's dictionary of fully constructed names for each channel keyed by the device channel - * @discussion - */ -#define kIOAudioEngineFullChannelNamesKey "IOAudioEngineChannelNames" - -/*! - * @defined kIOAudioEngineFullChannelNamesKey - * @abstract The key in the IORegistry for the IOAudioEngine's dictionary of category names for each channel keyed by the device channel - * @discussion - */ -#define kIOAudioEngineFullChannelCategoryNamesKey "IOAudioEngineChannelCategoryNames" - -/*! - * @defined kIOAudioEngineFullChannelNamesKey - * @abstract The key in the IORegistry for the IOAudioEngine's dictionary of number names for each channel keyed by the device channel - * @discussion - */ -#define kIOAudioEngineFullChannelNumberNamesKey "IOAudioEngineChannelNumberNames" - -#define kIOAudioEngineFullChannelNameKeyInputFormat "InputChannel%u" - -#define kIOAudioEngineFullChannelNameKeyOutputFormat "OutputChannel%u" - -#define kIOAudioEngineFlavorKey "IOAudioEngineFlavor" - -#define kIOAudioEngineAlwaysLoadCoreAudioPlugInKey "IOAudioEngineAlwaysLoadCoreAudioPlugIn" - -/*! - * @defined kIOAudioEngineInputChannelLayoutKey - * @abstract The key in the IORegistry for the IOAudioEngine's dictionary describes an array of OSNumber data that describe the spatial position of each channel. See IOAudioTypes.h. - * @discussion - */ - -#ifndef __OPEN_SOURCE__ -// <rdar://6868206> -#endif -#define kIOAudioEngineInputChannelLayoutKey "IOAudioEngineInputChannelLayout" - -/*! - * @defined kIOAudioEngineOutputChannelLayoutKey - * @abstract The key in the IORegistry for the IOAudioEngine's dictionary describes an array of OSNumber data that describe the spatial position of each channel. See IOAudioTypes.h. - * @discussion - */ - -#ifndef __OPEN_SOURCE__ -// <rdar://6868206> -#endif -#define kIOAudioEngineOutputChannelLayoutKey "IOAudioEngineOutputChannelLayout" - -/***** - * - * IOAudioStream defines - * - *****/ - - -#define kIOAudioStreamIDKey "IOAudioStreamID" -#define kIOAudioStreamDescriptionKey "IOAudioStreamDescription" -#define kIOAudioStreamNumClientsKey "IOAudioStreamNumClients" - -/*! - * @defined kIOAudioStreamDirectionKey - * @abstract The key in the IORegistry for the IOAudioStream direction attribute. - * @discussion The value for this key may be either "Output" or "Input". - */ -#define kIOAudioStreamDirectionKey "IOAudioStreamDirection" - -#define kIOAudioStreamStartingChannelIDKey "IOAudioStreamStartingChannelID" -#define kIOAudioStreamStartingChannelNumberKey "IOAudioStreamStartingChannelNumber" -#define kIOAudioStreamAvailableKey "IOAudioStreamAvailable" - -#define kIOAudioStreamFormatKey "IOAudioStreamFormat" -#define kIOAudioStreamAvailableFormatsKey "IOAudioStreamAvailableFormats" - -#define kIOAudioStreamNumChannelsKey "IOAudioStreamNumChannels" -#define kIOAudioStreamSampleFormatKey "IOAudioStreamSampleFormat" - -#define kIOAudioStreamNumericRepresentationKey "IOAudioStreamNumericRepresentation" - -#define kIOAudioStreamFormatFlagsKey "IOAudioStreamFormatFlags" -#define kIOAudioStreamFramesPerPacketKey "IOAudioStreamFramesPerPacket" -#define kIOAudioStreamBytesPerPacketKey "IOAudioStreamBytesPerPacket" - - -#define kIOAudioStreamBitDepthKey "IOAudioStreamBitDepth" -#define kIOAudioStreamBitWidthKey "IOAudioStreamBitWidth" - -#define kIOAudioStreamAlignmentKey "IOAudioStreamAlignment" - -#define kIOAudioStreamByteOrderKey "IOAudioStreamByteOrder" - -#define kIOAudioStreamIsMixableKey "IOAudioStreamIsMixable" - -#define kIOAudioStreamMinimumSampleRateKey "IOAudioStreamMinimumSampleRate" -#define kIOAudioStreamMaximumSampleRateKey "IOAudioStreamMaximumSampleRate" - -#define kIOAudioStreamDriverTagKey "IOAudioStreamDriverTag" - -#define kIOAudioStreamTerminalTypeKey "IOAudioStreamTerminalType" - -/***** - * - * IOAudioPort defines - * - *****/ - - - /*! - * @defined kIOAudioPortTypeKey - * @abstract The key in the IORegistry for the IOAudioPort type attribute. - * @discussion This is a driver-defined text attribute that may contain any type. - * Common types are defined as: "Speaker", "Headphones", "Microphone", "CD", "Line", "Digital", "Mixer", "PassThru". - */ -#define kIOAudioPortTypeKey "IOAudioPortType" - -/*! - * @defined kIOAudioPortSubTypeKey - * @abstract The key in the IORegistry for the IOAudioPort subtype attribute. - * @discussion The IOAudioPort subtype is a driver-defined text attribute designed to complement the type - * attribute. - */ -#define kIOAudioPortSubTypeKey "IOAudioPortSubType" - -/*! - * @defined kIOAudioPortNameKey - * @abstract The key in the IORegistry for the IOAudioPort name attribute. - */ -#define kIOAudioPortNameKey "IOAudioPortName" - - - -/***** - * - * IOAudioControl defines - * - *****/ - - - /*! - * @defined kIOAudioControlTypeKey - * @abstract The key in the IORegistry for the IOAudioCntrol type attribute. - * @discussion The value of this text attribute may be defined by the driver, however system-defined - * types recognized by the upper-level software are "Level", "Mute", "Selector". - */ -#define kIOAudioControlTypeKey "IOAudioControlType" - -#define kIOAudioControlSubTypeKey "IOAudioControlSubType" - -#define kIOAudioControlUsageKey "IOAudioControlUsage" - -#define kIOAudioControlIDKey "IOAudioControlID" - -/*! - * @defined kIOAudioControlChannelIDKey - * @abstract The key in the IORegistry for the IOAudioControl channel ID attribute - * @discussion The value for this key is an integer which may be driver defined. Default values for - * common channel types are provided in the following defines. - */ -#define kIOAudioControlChannelIDKey "IOAudioControlChannelID" - -#define kIOAudioControlChannelNumberKey "IOAudioControlChannelNumber" - -#define kIOAudioControlCoreAudioPropertyIDKey "IOAudioControlCoreAudioPropertyID" -/*! - * @defined kIOAudioControlChannelNameKey - * @abstract The key in the IORegistry for the IOAudioControl name attribute. - * @discussion This name should be a human-readable name for the channel(s) represented by the port. - * *** NOTE *** We really need to make all of the human-readable attributes that have potential to - * be used in a GUI localizable. There will need to be localized strings in the kext bundle matching - * the text. - */ -#define kIOAudioControlChannelNameKey "IOAudioControlChannelName" - -/*! - * @defined kIOAudioControlChannelNameAll - * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing - * the channel name for all channels. - */ -#define kIOAudioControlChannelNameAll "All Channels" - -/*! - * @defined kIOAudioControlChannelNameLeft - * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing - * the channel name for the left channel. - */ -#define kIOAudioControlChannelNameLeft "Left" - -/*! - * @defined kIOAudioControlChannelNameRight - * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing - * the channel name for the right channel. - */ -#define kIOAudioControlChannelNameRight "Right" - -/*! - * @defined kIOAudioControlChannelNameCenter - * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing - * the channel name for the center channel. - */ -#define kIOAudioControlChannelNameCenter "Center" - -/*! - * @defined kIOAudioControlChannelNameLeftRear - * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing - * the channel name for the left rear channel. - */ -#define kIOAudioControlChannelNameLeftRear "LeftRear" - -/*! - * @defined kIOAudioControlChannelNameRightRear - * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing - * the channel name for the right rear channel. - */ -#define kIOAudioControlChannelNameRightRear "RightRear" - -/*! - * @defined kIOAudioControlChannelNameSub - * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing - * the channel name for the sub/LFE channel. - */ -#define kIOAudioControlChannelNameSub "Sub" - -/*! - * @defined kIOAudioControlChannelNameFrontLeftCenter - * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing - * the channel name for the FrontLeftCenter channel. - */ -#define kIOAudioControlChannelNameFrontLeftCenter "FrontLeftCenter" - -/*! - * @defined kIOAudioControlChannelNameFrontRightCenter - * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing - * the channel name for the FrontRightCenter channel. - */ -#define kIOAudioControlChannelNameFrontRightCenter "FrontRightCenter" - -/*! - * @defined kIOAudioControlChannelNameRearCenter - * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing - * the channel name for the RearCenter channel. - */ -#define kIOAudioControlChannelNameRearCenter "RearCenter" - -/*! - * @defined kIOAudioControlChannelNameSurroundLeft - * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing - * the channel name for the SurroundLeft channel. - */ -#define kIOAudioControlChannelNameSurroundLeft "SurroundLeft" - -/*! - * @defined kIOAudioControlChannelNameSurroundRight - * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing - * the channel name for the SurroundRight channel. - */ -#define kIOAudioControlChannelNameSurroundRight "SurroundRight" - - -/*! - * @defined kIOAudioControlValueKey - * @abstract The key in the IORegistry for the IOAudioControl value attribute. - * @discussion The value returned by this key is a 32-bit integer representing the current value of the IOAudioControl. - */ -#define kIOAudioControlValueKey "IOAudioControlValue" - -/*! - * @defined kIOAudioControlValueIsReadOnlyKey - * @abstract The key in the IORegistry for the IOAudioControl value-is-read-only attribute. - * @discussion The value returned by this key is a 32-bit integer but the value doesn't have any direct meaning. - * Instead, the presence of this key indicates that the value for the control is read-only - */ -#define kIOAudioControlValueIsReadOnlyKey "IOAudioControlValueIsReadOnly" - -/*! - * @defined kIOAudioLevelControlMinValueKey - * @abstract The key in the IORegistry for the IOAudioControl minimum value attribute. - * @discussion The value returned by this key is a 32-bit integer representing the minimum value for the IOAudioControl. - * This is currently only valid for Level controls or other driver-defined controls that have a minimum and maximum - * value. - */ -#define kIOAudioLevelControlMinValueKey "IOAudioLevelControlMinValue" - -/*! - * @defined kIOAudioLevelControlMaxValueKey - * @abstract The key in the IORegistry for the IOAudioControl maximum value attribute. - * @discussion The value returned by this key is a 32-bit integer representing the maximum value for the IOAudioControl. - * This is currently only valid for Level controls or other driver-defined controls that have a minimum and maximum - * value. - */ -#define kIOAudioLevelControlMaxValueKey "IOAudioLevelControlMaxValue" - -/*! - * @defined kIOAudioLevelControlMinDBKey - * @abstract The key in the IORgistry for the IOAudioControl minimum db value attribute. - * @discussion The value returned by this key is a fixed point value in 16.16 format represented as a 32-bit - * integer. It represents the minimum value in db for the IOAudioControl. This value matches the minimum - * value attribute. This is currently valid for Level controls or other driver-defined controls that have a - * minimum and maximum db value. - */ -#define kIOAudioLevelControlMinDBKey "IOAudioLevelControlMinDB" - -/*! - * @defined kIOAudioLevelControlMaxDBKey - * @abstract The key in the IORgistry for the IOAudioControl maximum db value attribute. - * @discussion The value returned by this key is a fixed point value in 16.16 format represented as a 32-bit - * integer. It represents the maximum value in db for the IOAudioControl. This value matches the maximum - * value attribute. This is currently valid for Level controls or other driver-defined controls that have a - * minimum and maximum db value. - */ -#define kIOAudioLevelControlMaxDBKey "IOAudioLevelControlMaxDB" - -#define kIOAudioLevelControlRangesKey "IOAudioLevelControlRanges" - -#define kIOAudioLevelControlUseLinearScale "IOAudioLevelControlUseLinearScale" - -#define kIOAudioSelectorControlAvailableSelectionsKey "IOAudioSelectorControlAvailableSelections" -#define kIOAudioSelectorControlSelectionValueKey "IOAudioSelectorControlSelectionValue" -#define kIOAudioSelectorControlSelectionDescriptionKey "IOAudioSelectorControlSelectionDescriptionKey" - -#define kIOAudioSelectorControlClockSourceKey "IOAudioSelectorControlClockSourceKey" - -#endif /* _IOAUDIODEFINES_H */ diff --git a/i386/include/IOKit/audio/IOAudioDevice.h b/i386/include/IOKit/audio/IOAudioDevice.h deleted file mode 100644 index 6d55147..0000000 --- a/i386/include/IOKit/audio/IOAudioDevice.h +++ /dev/null @@ -1,749 +0,0 @@ -/* - * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOAudioDevice - */ - -#ifndef _IOKIT_IOAUDIODEVICE_H -#define _IOKIT_IOAUDIODEVICE_H - -#include <IOKit/IOService.h> - -#ifndef IOAUDIOFAMILY_SELF_BUILD -#include <IOKit/audio/IOAudioTypes.h> -#include <IOKit/audio/IOAudioStream.h> -#else -#include "IOAudioTypes.h" -#include "IOAudioStream.h" -#endif - -class IOAudioEngine; -class IOAudioStream; -class IOAudioPort; -class IOAudioControl; -class OSDictionary; -class OSSet; -class OSArray; -class IOTimerEventSource; -class IOCommandGate; - -/*! - * enum IOAudioDevicePowerState - * @abstract Identifies the power state of the audio device - * @discussion A newly created IOAudioDevices defaults to the idle state. - * @constant kIOAudioDeviceSleep State set when the system is going to sleep - * @constant kIOAudioDeviceIdle State when the system is awake but none of the IOAudioEngines are in use - * @constant kIOAudioDeviceActive State when one ore more IOAudioEngines are in use. This state transition must complete before the system will begin playing audio. - */ -typedef enum _IOAudioDevicePowerState { - kIOAudioDeviceSleep = 0, // When sleeping - kIOAudioDeviceIdle = 1, // When no audio engines running - kIOAudioDeviceActive = 2 // audio engines running -} IOAudioDevicePowerState; - -/*! - * @class IOAudioDevice - * @abstract Abstract base class for a single piece of audio hardware. The IOAudioDevice provides - * the central coordination point for an audio driver. - * @discussion An audio driver is required to subclass IOAudioDevice in order to provide - * working audio to the system. A single driver instance will contain a single instance of the - * driver's IOAudioDevice subclass. The subclass is responsible for mapping all hardware device - * resources from the service provider nub. It must control access to the hardware so that the - * hardware doesn't get into an inconsistent state. It is possible that different threads may make - * requests of the hardware at the same time. The IOAudioDevice superclass provides an IOWorkLoop - * and IOCommandGate on the IOWorkLoop through which all hardware accesses may be synchronized. - * All entry points to all parts of the driver controlled by the IOAudioFamily will be synchronized - * through this one IOWorkLoop. - * - * The IOAudioDevice subclass is responsible for creating the rest of the pieces of the driver. - * It must identify and create all IOAudioEngines that are not automatically created by the system - * (i.e. those that are not matched and instantiated by IOKit directly). - * - * The IOAudioDevice subclass must enumerate and create all IOAudioControls to match - * the device capabilities. - * - * It must also execute control value chages when requested by the system (i.e. volume adjustments). - * - * In order to allow sleep and wake to work on the system, the IOAudioDevice subclass is responsible - * for performing the necessary actions to sleep and wake its hardware (and restore necessary state - * on wake). - * - * The IOAudioDevice class provides timer services that allow different elements in the audio driver - * to receive timer notifications as needed. These services were designed with the idea that most - * timed events in a typical audio driver need to be done at least as often as a certain interval. - * Further, it is designed with the idea that being called more often than the specified interval - * doesn't hurt anything - and in fact may help. With this in mind, the timer services provided - * by the IOAudioDevice class allow different targets to register for timer callbacks at least as - * often as the specified interval. The actual interval will be the smallest of the intervals of - * all of the callbacks. This way, we avoid the overhead of having many timers in a single audio - * device. As an example, each output IOAudioEngine has a timer to run the erase head. It doesn't hurt - * to have the erase head run more often. Also, a typical IOAudioDevice subclass may need to run a timer - * to check for device state changes (e.g. jack insertions). - * - * There are a number of strings passed from the driver to the CoreAudio.framework and then into - * applications. All of those strings should be localized by the driver. In order to do that - * the kext bundle should have localized string files following the Mac OS X localization - * instructions. The IOAudioDevice should contain a property with the name of the bundle/kext - * that contains the localized string resources. To do that, the driver's personality in - * the bundle resources could have a property named 'IOAudioDeviceLocalizedBundle' with the path - * of the bundle/kext relative to '/System/Library/Extensions'. It could also be set by the - * IOAudioDevice subclass in its initHardware() function. To do so, call - * setProperty(kIOAudioDeviceLocalizedBundleKey, "Driver.kext"). - * - * In a typical driver, the IOAudioDevice subclass will implement initHardware() to perform the - * hardware initialization and driver construction. Within that initialization it must create at - * least one IOAudioEngine instance and activate it. In order to activate a new IOAudioEngine - * activateAudioEngine() should be called for each one. It must create the IOAudioControls - * matching the hardware capabilities to allow the system to set volume, mute and input selection. - * To add those controls to the driver, each control should be attached to the IOAudioEngine to - * which it applies by calling addDefaultAudioControl() on the IOAudioEngine. - * During initialization it should also call setDeviceName(), setDeviceShortName() and - * setManufacturerName() with localized strings representing each of the attributes. - * - * If the driver is to work properly after sleep/wake, it must implement performPowerStateChange() - * and deal with the sleep and wake transitions. It may also deal with the idle state transitions - * to turn off device power when it isn't in use (especially useful for devices attached to a - * portable running on battery power). - */ - -class IOAudioDevice : public IOService -{ - friend class IOAudioEngine; - - OSDeclareDefaultStructors(IOAudioDevice) - -protected: - /*! @var workLoop The IOWorkLoop for the driver - this is shared with the other objects in the driver */ - IOWorkLoop *workLoop; - /*! @var commandGate The IOCommandGate for this IOAudioDevice. It is attached to workLoop */ - IOCommandGate *commandGate; - /*! @var timerEventSource An IOTimerEventSource attached to workLoop used for the timer services */ - IOTimerEventSource *timerEventSource; - - /*! @var duringStartup State variable set to true while the driver is starting up and false all other times */ - bool duringStartup; - /*! @var familyManagePower Set to true if the family is supposed to manage power - this is the default state. It can be changed early in the initialization process with a call to setFamilyManagePower(). */ - bool familyManagePower; - /*! @var asyncPowerStateChangeInProgress Set to true while an asynchronous power change is pending and false all other times. */ - bool asyncPowerStateChangeInProgress; - - /*! @var numRunningAudioEngines The number of running IOAudioEngines. This is used to maintain idle vs active power state. */ - UInt32 numRunningAudioEngines; - - /*! @var currentPowerState Used to track the existing power state - can be fetched by calling getPowerState() */ - IOAudioDevicePowerState currentPowerState; - /*! @var pendingPowerState If a power state change is in progress, this represents the pending power state. All other times this is the same as the currentPowerState. */ - IOAudioDevicePowerState pendingPowerState; - - /*! @var audioEngines The set of IOAudioEngine objects vended by the IOAudioDevice. */ - OSArray * audioEngines; - /*! @var timerEvents The set of timer events in use by the device. - * @discussion The key for the dictionary is the target of the event. This means that a single target may - * have only a single event associated with it. - */ - OSDictionary * timerEvents; - /*! @var audioPorts The set of IOAudioPort objects associated with the IOAudioDevice */ - OSSet * audioPorts; - - /*! @var minimumInterval The smallest timer interval requested by all timer event targets. */ - AbsoluteTime minimumInterval; - /*! @var previousTimerFire The time of the last timer event. - * @discussion This is used to schedule the next timer event. - */ - AbsoluteTime previousTimerFire; - -public: - /*! @var gIOAudioPlane A static IORegistryPlane representing the new IOAudioPlane that the IOAudioFamily uses - * to represent the signal chain of the device. - */ - static const IORegistryPlane *gIOAudioPlane; - -protected: - struct ExpansionData { - unsigned long long idleSleepDelayTime; - IOTimerEventSource * idleTimer; - }; - - ExpansionData *reserved; - -public: - static void idleAudioSleepHandlerTimer(OSObject *owner, IOTimerEventSource *sender); - virtual IOReturn setAggressiveness(unsigned long type, unsigned long newLevel); - - // OSMetaClassDeclareReservedUsed(IOAudioDevice, 0); - virtual void setDeviceTransportType(const UInt32 transportType); - - // OSMetaClassDeclareReservedUsed(IOAudioDevice, 1); - /*! - * @function setIdleAudioSleepTime - * @abstract This function is to be called by a driver that doesn't want to be told about the audio - * going idle immediately, but at some point in the future. - * @discussion This is useful if the device will want to power down its hardware into an idle sleep - * state, but doesn't want to do that unless audio hasn't been used for a while. Calling this function - * immediately changes the idle sleep timer and queues it up if the idle is different from the previous - * idle time. The idle time defaults to 0, which means be called immediately (backwards compatible with - * previous versions of IOAudioFamily). A value of 0xffffffffffffffffULL means don't ever tell the - * driver about going idle. - * @param sleepDelay The amount of time, in nanoseconds, before the hardware should be told to go idle. - */ - virtual void setIdleAudioSleepTime(unsigned long long sleepDelay); - - // OSMetaClassDeclareReservedUsed(IOAudioDevice, 2); - virtual void scheduleIdleAudioSleep(void); - - // OSMetaClassDeclareReservedUsed(IOAudioDevice, 3); - /*! - * @function setConfigurationApplicationBundle - * @abstract This function is to be called if an external configuration application is available to set - * which application to launch. - * @discussion This is useful for device drivers that are too complex to be represented by the Sound Preferences - * panel. The bundle ID is a more flexible way of specifying where the application is than a hard coded path. - * @param bundleID The bundle ID of the application to be launched by the HAL for configuration of the device and its engine(s). - */ - virtual void setConfigurationApplicationBundle(const char *bundleID); - - // OSMetaClassDeclareReservedUsed(IOAudioDevice, 4); - /*! - * @function setDeviceCanBeDefault - * @abstract This function is to be called to tell CoreAudio if this device shouldn't be a default device. - * @discussion This is useful for device drivers that don't want to be a default device. Can be called with - * kIOAudioDeviceCanBeDefaultNothing to prevent CoreAudio from allowing this device to be any default device, or it - * can be called with any combination of kIOAudioDeviceCanBeDefaultInput, kIOAudioDeviceCanBeDefaultOutput, or - * kIOAudioDeviceCanBeSystemOutput. The default is - * (kIOAudioDeviceCanBeDefaultInput | kIOAudioDeviceCanBeDefaultOutput | kIOAudioDeviceCanBeSystemOutput). - * @param defaultsFlags The flags to instruct CoreAudio to allow this device to be only the indicated default devices. - */ - virtual void setDeviceCanBeDefault(UInt32 defaultsFlags); - - // OSMetaClassDeclareReservedUsed(IOAudioDevice, 5); - virtual void setDeviceModelName(const char * modelName); - -private: - OSMetaClassDeclareReservedUsed(IOAudioDevice, 0); - OSMetaClassDeclareReservedUsed(IOAudioDevice, 1); - OSMetaClassDeclareReservedUsed(IOAudioDevice, 2); - OSMetaClassDeclareReservedUsed(IOAudioDevice, 3); - OSMetaClassDeclareReservedUsed(IOAudioDevice, 4); - OSMetaClassDeclareReservedUsed(IOAudioDevice, 5); - - OSMetaClassDeclareReservedUnused(IOAudioDevice, 6); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 7); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 8); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 9); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 10); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 11); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 12); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 13); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 14); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 15); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 16); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 17); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 18); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 19); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 20); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 21); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 22); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 23); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 24); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 25); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 26); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 27); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 28); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 29); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 30); - OSMetaClassDeclareReservedUnused(IOAudioDevice, 31); - - -public: - // Initialization - - /*! - * @function init - * @abstract Initialize a newly created instance of IOAudioDevice. - * @discussion This implementation initializes all of the data structures and variables used by the - * IOAudioDevice. The currentPowerState and pendingPowerState variables are set to kIOAudioDeviceIdle. - * A subclass that overrides this method must call the superclass' implementation. - * @param properties An OSDictionary of the device properties that gets passed to super::init and set - * in the IORegistry. - * @result true if initialization was successful - */ - virtual bool init(OSDictionary *properties); - - /*! - * @function free - * @abstract Frees resources used by the IOAudioDevice instance - * @discussion This method will deactivate all audio audio engines and release the audioEngines OSSet. - * It will also deactivate all of the audio ports and release the audioPorts OSSet. It will release - * the timerEvents OSDictionary as well as cancel any outstanding timer callbacks. It will clean up - * all of the event sources and the workLoop. - * - * Do not call this directly. This is called automatically by the system when the instance's - * refcount goes to 0. To decrement the refcount, call release() on the object. - */ - - virtual void free(); - - /*! - * @function start - * @abstract This function is called automatically by the system to tell the driver to start vending - * services to the rest of the system. - * @discussion The start() implementation in IOAudioDevice starts by calling start() on its superclass. - * It then calls initHardware() which the subclass should override to properly initialize itself and - * the hardware. If that call succeeds, it sets up power management if the family is supposed to - * manage power (checking the familyManagePower variable). Then finally it calls registerService() - * to make the IOAudioDevice visible in the IORegistry. - * @param provider This is the service provider nub that provides access to the hardware resources. - * @result Returns true on success - */ - virtual bool start(IOService *provider); - - /*! - * @function stop - * @abstract This is responsible for stopping the device after the system is done with it (or - * if the device is removed from the system). - * @discussion The IOAudioDevice implentation of stop() disables the timer services, deactivates - * all of the audio audio engines and audio ports and stops power management of the device. - * The audio engine and port deactivation causes all of the audio engines to get stopped and - * all of the audio engine and port resources and objects to be released. A subclass' implementation - * may could shut down hardware here if necessary. If this function is overridden by a subclass, - * the superclass' implementation must be called. - * @param The service provider nub for the device. - */ - virtual void stop(IOService *provider); - virtual bool willTerminate(IOService *provider, IOOptionBits options); - - /*! - * @function initHardware - * @abstract This function is called by start() to provide a convenient place for the subclass to - * perform its initialization. - * @discussion In a typical implementation, a driver would implementation this function and perform - * a number of tasks. Those include mapping hardware resources, initializing the hardware to a known - * state, creating the IOAudioEngines, IOAudioControls and IOAudioStreams. Additionally it - * should also call setDeviceName(), setDeviceShortName(), setManufacturerName(). Upon return of - * this function, the device should be ready to begin vending services to the system. - * @param provider The service provider nub for the device. - * @result This function should return true on a successful initialization. - */ - virtual bool initHardware(IOService *provider); - - /*! - * @function setDeviceName - * @abstract Sets the name of the device - * @discussion This method should be called during initialization or startup. It should - * be set by the time initHardware() completes. The device name is used by the - * CoreAudio.framework to identify the particular piece of hardware. This string should - * should be localized by the driver. - */ - virtual void setDeviceName(const char *deviceName); - - /*! - * @function setDeviceShortName - * @abstract Sets the short name of the device - * @discussion The short name is a shorter representation of the device name. It may be used - * by applications when the device name is too long. It should be set by the time initHardware() - * completes. The string should be localized by the driver. - */ - virtual void setDeviceShortName(const char *shortName); - - /*! - * @function setManufacturerName - * @abstract Sets the manufacturer name of the device - * @discussion This method should be called during initialization or startup. This should be - * called by the time initHardware() completes. The string should be localized by the driver. - */ - virtual void setManufacturerName(const char *manufacturerName); - - - // IOWorkLoop, IOCommandGate management - - /*! - * @function getWorkLoop - * @abstract Returns the IOWorkLoop for the driver - * @discussion The IOWorkLoop is used to synchronized all critical aspects of the driver. This - * includes all entry points to the driver as well as power management. - */ - virtual IOWorkLoop *getWorkLoop() const; - - /*! - * @function getCommandGate - * @abstract Returns the IOCommandGate for this IOAudioDevice - * @discussion This IOCommandGate allows calls into this IOAudioDevice to be synchronized on - * the IOWorkLoop. - */ - virtual IOCommandGate *getCommandGate() const; - - - // IOAudioEngine management - - /*! - * @function activateAudioEngine - * @abstract This simply calls activateAudioEngine(IOAudioEngine *audioEngine, - * bool shouldStartAudioEngine) with a value of true for shouldStartAudioEngine. - * @param audioEngine The IOAudioEngine instance to be activated. It is treated as a newly - * allocated instance. - * @result Returns true if the audio engine was successfully activated. - */ - virtual IOReturn activateAudioEngine(IOAudioEngine *audioEngine); - - /*! - * @function activateAudioEngine - * @abstract This is called to add a new IOAudioEngine object to the IOAudioDevice. - * @discussion Once the IOAudioEngine has been activated by this function, it is ready - * to begin moving audio data. This should be called either during the subclass' initHardware() - * implementation for each IOAudioEngine the device creates. Or it should be called by - * the IOAudioEngine itself if the audio engine was automatically created by IOKit's matching - * process. The system won't be able to properly track and control IOAudioEngines if - * they are not activated though this function. - * This implementation will retain the IOAudioEngine while it maintains control of it. - * When the audio engine is deactivated, the IOAudioEngine will be released. If the - * IOAudioDevice subclass is passing a newly instantiated IOAudioEngine, it will need to release - * the audio engine after it has been activated. This will insure that the refCount on the audio engine - * is correct when it gets deactivated when the driver is stopped. That allows the audio engine to be - * freed when it is no longer needed. - * @param audioEngine The IOAudioEngine instance to be activated. - * @param shouldStartAudioEngine If true, the audio engine is treated as a newly allocated IOAudioEngine - * instance and is appropriately attached and started according to IOKit convention. If it is false - * it is assumed that some other process (possibly the IOKit matching process) has started the - * IOAudioEngine and will skip that step. - * @result Returns true if the audio engine was successfully activated. - */ - virtual IOReturn activateAudioEngine(IOAudioEngine *audioEngine, bool shouldStartAudioEngine); - - /*! - * @function deactivateAllAudioEngines - * @abstract Deactivates all of the audio engines in the device. - * @discussion This is called by the stop() and free() methods in IOAudioDevice to completely - * shut down all audio engines as the driver is being shut down. - */ - virtual void deactivateAllAudioEngines(); - - - // Power management - - /*! - * @function setFamilyManagePower - * @abstract Called set whether or not the family should manage the device power throught the - * IOService power management APIs. - * @discussion The default behavior is for the family to manage power. It is only necessary to - * call this function if the driver does not want the family to manage power. It is not - * recommended that this function be called because it makes power management much more - * difficult for the driver. If this function is to be called, it must be called before - * initHardware() completes. Immediately after initHardware() is called by start(), - * the power management system is initialized if the family is to manage power. - * @param manage Set to false if it is not desired that the family does the power management - */ - virtual void setFamilyManagePower(bool manage); - - /*! - * @function setPowerState - * @abstract Called by the power management system in IOService when the power state of this - * service needs to change. - * @discussion The default implementation of IOAudioDevice sets up two power states for IOService - * to use. State 0 is sleep and state 1 is wake. This function should not be called directly. - * It is only supposed to be used by the IOService power management services. - * @param powerStateOrdinal The number of the power state as defined by the IOAudioDevice - - * 0 for sleep, 1 for wake. - * @param device The power management policy maker. - * @result Returns kIOPMAckImplied (0) when the power state change is complete. Otherwise the an - * upper bound on the number of microseconds until the state change is complete is returned. - */ - virtual IOReturn setPowerState(unsigned long powerStateOrdinal, IOService *device); - - /*! - * @function setPowerStateAction - * @abstract IOCommandGate Action which calls protectedSetPowerState() while holding the IOCommandGate - * @discussion This is needed to allow protectedSetPowerState() to be called on the IOWorkLoop - * @param owner The owner of the IOCommandGate (the IOAudioDevice in this case) - * @param arg1 The powerStateOrdinal to be passed to protectedSetPowerState() - * @param arg2 The device to be passed to protectedSetPowerState() - * @result Returns the result of protectedSetPowerState() - */ - static IOReturn setPowerStateAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - - /*! - * @function protectedSetPowerState - * @abstract Called by setPowerStateAction() to deal with a power state change from the IOService - * power management facility. - * @discussion This function is responsible for performing the necessary sleep and wake tasks - * when the system is sleeping or waking. If an outstanding power state change is in progress, - * it will wait until the state changes has completed. While sleeping, all audio engines are - * stopped before calling initiatePowerStateChange() to call performPowerStateChange() to let - * the driver deal with the sleep request. When waking, it determines if the device should be - * idle or active and continues to call initiatePowerStateChange(). If initiatePowerStateChange() - * indicates that the power state change is occuring asynchronously, it returns the number of - * microseconds. This function must be called on the IOWorkLoop, but should not be called - * directly. - * @param powerStateOrdinal Param passed to setPowerState() - 0 for sleep, 1 for wake - * @param device Param passed to setPowerState - the device initiating the power state change - * @result Returns 0 if the power state change is complete - the number of microseconds until - * complete if its asynchronous. - */ - virtual IOReturn protectedSetPowerState(unsigned long powerStateOrdinal, IOService *device); - - /*! - * @function performPowerStateChange - * @abstract This function is called by the IOAudioDevice when a power state change is needed. - * @discussion In order to deal with power state changes, a subclass must override this function. - * Any combination of old and new power states may be passed to this function. If work is to - * be performed while transitioning to sleep, check for a newPowerState of kIOAudioDeviceSleep. - * If work is to be performed while transitioning from sleep, check for an oldPowerState of - * kIOAudioDeviceSleep. A power state of kIOAudioDeviceIdle means the system is awake, but - * no clients are currently playing or recording audio (i.e. no IOAudioEngines are active). - * A power state of kIOAudioDeviceActive means that at least one IOAudioEngine is active. - * It is possible for a power state change to be performed synchronously or asynchronously. - * In the case of a synchronous power state change, simple leave microsecondsUntilComplete - * alone and return kIOReturnSuccess. If an asynchronous power state change is needed the - * driver should do whatever needed to schedule another thread to finish the state change - * and set the microsecondsUntilComplete to an upper bound on the amount of time it will - * take to complete the power state change. Then when the power state change is complete, - * a call must be made to completePowerStateChange(). During an asynchronous power state - * change, the current power state will remain the same as before the transition began, - * and the pendingPowerState is set to the new power state that will be set when the - * change is complete. - * @param oldPowerState The power state before the power state change - * @param newPowerState The power state being transitioned to - * @param microsecondsUntilComplete A pointer to a value representing an upper bound on - * the number of microseconds to complete an asynchronous power state change. It points - * to a value of zero at the start and if it remains zero, the state change is complete - * upon a successful return from the function. - * @result Returns kIOReturnSuccess on a successful completion - */ - virtual IOReturn performPowerStateChange(IOAudioDevicePowerState oldPowerState, - IOAudioDevicePowerState newPowerState, - UInt32 *microsecondsUntilComplete); - - /*! - * @function completePowerStateChange - * @abstract Called when a power state change is complete - * @discussion In the case of an asynchronous power state change, a subclass is responsible - * for calling this function. It is safe to call this function if not on the IOWorkLoop. - * This function calls protectedCompletePowerStateChange() through the IOCommandGate and - * completePowerStateChangeAction(). If the call is already on the IOWorkLoop, it is safe - * to call protectedCompletePowerStateChange() directly. - * @result Returns kIOReturnSuccess on a successful completion - */ - virtual IOReturn completePowerStateChange(); - - /*! - * @function completePowerStateChangeAction - * @abstract IOCommandGate Action which calls protectedCompletePowerStateChange() while holding the - * IOCommandGate. - * @discussion This is needed to allow protectedCompletePowerStateChange() to be called on the IOWorkLoop. - * @param owner The owner of the IOCommandGate (the IOAudioDevice in this case) - * @result Returns the result of protectedCompletePowerStateChange() - */ - static IOReturn completePowerStateChangeAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - - /*! - * @function protectedCompletePowerStateChange() - * @abstract Called on the IOWorkLoop when a power state change is complete. - * @discussion This function does the work to complete a power state change (both synchronous and - * asynchronous). If the system is waking from sleep, the timer system is restarted and the - * audio engines are resumed. If this was called as a result of an asynchronous power state changed - * it makes the IOService power management call acknowledgePowerChange() and resets the - * asyncPowerStateChangeInProgress variable. Finally it sets the currentPowerState to the - * pendingPowerState. This function must be called on the IOWorkLoop. If a subclass is not - * on the IOWorkLoop (e.g. holding the IOCommandGate), call completePowerStateChange() instead. - * @result Returns kIOReturnSuccess on success - */ - virtual IOReturn protectedCompletePowerStateChange(); - - /*! - * @function getPowerState - * @abstract Returns the current power state (the old power state if a change is in progress). - * @result The current power state - */ - virtual IOAudioDevicePowerState getPowerState(); - - /*! - * @function getPendingPowerState - * @abstract Returns the pending power state if a state change is in progress. Otherwise it - * returns the current power state change. - * @result The pending power state - */ - virtual IOAudioDevicePowerState getPendingPowerState(); - - /*! - * @function waitForPendingPowerStateChange - * @abstract Called internally to wait until a pending power state change is complete. - * @discussion This is only used by internal functions to wait during pending power - * state changes. It is used to prevent multiple power state changes at the same time. - * This function must be called while holding the IOCommandGate. If an asynchronous - * power state change is in progress this function will block until the state change - * if complete. Once complete, it will return while still holding the IOCommandGate. - */ - virtual void waitForPendingPowerStateChange(); - - /*! - * @function initiatePowerStateChange - * @abstract Called internally to execute a power state change - * @discussion This function must be called on the IOWorkLoop. It calls performPowerStateChange() - * to let the driver process the state change. If the state change is completed synchronously - * by the driver (subclass) it calls protectedCompletePowerStateChange(). If done asynchronously - * it returns the microsecondsUntilComplete that was set by performPowerStateChange(). This - * function should not be called directly. - * @param microsecondsUntilComplete Pointer to the microsecondsUntilComplete that should be set - * by performPowerStateChange if an asynchronous power state change was started. - * @result Returns kIOReturnSuccess on success - */ - virtual IOReturn initiatePowerStateChange(UInt32 *microsecondsUntilComplete = NULL); - - - // IOAudioControl management - - /*! - * @function flushAudioControls - * @abstract Forces each IOAudioControl in the driver to have its value flushed out to the hardware. - * That will cause either the IOAudioControl's ValueChangeHandler to be called. - * @discussion This can be used to force the hardware to get updated with the current value - * of each control. It may be useful during wake for example. - */ - virtual void flushAudioControls(); - - - // Timer services - - /*! - * @typedef TimerEvent - * @abstract Generic timer event callback for IOAudioDevice timer targets - * @discussion TimerEvent callback function takes two arguments; the target of - * the timer event and the IOAudioDevice sending the event. - * @param target The target of the timer event - passed in when the timer event was registered - * @param audioDevice The IOAudioDevice sending the event - */ - typedef void (*TimerEvent)(OSObject *target, IOAudioDevice *audioDevice); - - /*! - * @function addTimerEvent - * @abstract Adds a TimerEvent callback for the given target called at least as often - * as specified in interval. - * @discussion The frequency of the timer event callbacks will be the smallest interval - * specified by all targets. Only one interval and callback may be specified per target. - * If a addTimerEvent is called twice with the same target, the second one overrides the - * first. There is currently a bug triggered if the first call had the smallest interval. - * In that case, that smallest interval would still be used. - * @param target This parameter is the target object of the TimerEvent. - * @param event The callback function called each time the timer fires. - * @param interval The callback will be called at least this often. - * @result Returns kIOReturnSuccess if the timer event was successfully added. - */ - virtual IOReturn addTimerEvent(OSObject *target, TimerEvent event, AbsoluteTime interval); - - /*! - * @function removeTimerEvent - * @abstract Removes the timer event for the given target. - * @discussion If the interval for the target to be removed is the smallest interval, - * the timer interval is recalculated based on the remaining targets. The next fire - * time is readjusted based on the new interval compared to the last fire time. - * @param target The target whose timer event will be removed. - */ - virtual void removeTimerEvent(OSObject *target); - - /*! - * @function removeAllTimerEvents - * @abstract Removes all timer events and stops the timer - * @discussion Called during teardown of the driver - */ - virtual void removeAllTimerEvents(); - - - // IOAudioPort management - - /*! - * @function attachAudioPort - * @abstract Adds the port to the IOAudioDevice's list of ports and attaches the port to its parent - * and attaches the child to the port. - * @discussion This function provides the functionality to represent the device's signal chain in the - * IOAudioPlane in the IORegistry. An IOAudioPort's parent(s) are before it in the signal chain - * and its children are after it. This method may be called multiple times for a single IOAudioPort. - * This is necessary when there are many children or parents. Once a relationship is made, it is not - * necessary to make the reverse relationship. A NULL value may be passed in for either the parent - * or child or both. - * The IOAudioPort passed in should be a newly allocated IOAudioPort instance. This function will - * appropriately attach and start the port object. NOTE: It is not necessary to use IOAudioPorts - * in a fully functional audio driver. - * @param port The newly created IOAudioPort instance to be activated. - * @param parent A parent IOAudioPort or IOAudioEngine of the given port. - * @param child A child IOAudioPort or IOAudioEngine of the given port. - * @result Returns true when the port has been successfully added and attached. - */ - virtual IOReturn attachAudioPort(IOAudioPort *port, IORegistryEntry *parent, IORegistryEntry *child); - - /*! - * @function detachAllAudioPorts - * @abstract Deactivates all of the ports in the device. - * @discussion This is called by the stop() and free() methods in IOAudioDevice to completely - * shut down all ports as the driver is being shut down. - */ - virtual void detachAllAudioPorts(); - -protected: - /*! - * @function timerFired - * @abstract Internal static function called when the timer fires. - * @discussion This function simply calls dispatchTimerEvents() on the IOAudioDevice to do just that. - * @param target The IOAudioDevice instance that initiated the timer callback. - * @param sender The IOTimerEventSources calling this callback - */ - static void timerFired(OSObject *target, IOTimerEventSource *sender); - - /*! - * @function dispatchTimerEvents - * @abstract Called by timerFired() to cause the timer event callbacks to be called. - * @discussion This method iterates through all of the timer event targets and calls - * the callback on each. Unless the force flag is set to true, the timer events will - * only be dispatched if the power state is not kIOAudioDeviceSleep. This prevents - * unexpected timer firings while making wake->sleep->wake transitions. This function must - * be called on the IOWorkLoop. - * @function force A bool param to allow the timer events to be dispatched even if the - * device is in the kIOAudioDeviceSleep power state. - */ - virtual void dispatchTimerEvents(bool force); - - /*! - * @function audioEngineStarting - * @abstract Called by IOAudioEngine when it is starting up - * @discussion This should only be called while on the IOWorkLoop. It is not intended to be called - * directly. It is called when an IOAudioEngine is starting up to allow the IOAudioDevice - * to keep track of running audio engines and change the power state from kIOAudioDeviceIdle to - * kIOAudioDeviceActive when the first audio engine starts up. If the state change is done - * asynchronously, it waits for the state change to complete. This is to ensure that the - * system doesn't start playing audio until the IOAudioDevice has completed its transition - * to kIOAudioDeviceActive. - */ - virtual void audioEngineStarting(); - - /*! - * @function audioEngineStopped - * @abstract Called by IOAudioEngine when it has stopped - * @discussion This should only be called while on the IOWorkLoop. It is not intended to be called - * directly. It is called when an IOAudioEngine has stopped to allow the IOAudioDevice - * to keep track of running audio engines and change the power state from kIOAudioDeviceActive - * to kIOAudioDeviceIdle when the last audio engine stops. If the state change is done - * asynchronously, it waits for the state change to complete. - */ - virtual void audioEngineStopped(); - -}; - -#endif /* _IOKIT_IOAUDIODEVICE_H */ diff --git a/i386/include/IOKit/audio/IOAudioEngine.h b/i386/include/IOKit/audio/IOAudioEngine.h deleted file mode 100644 index 19477b5..0000000 --- a/i386/include/IOKit/audio/IOAudioEngine.h +++ /dev/null @@ -1,865 +0,0 @@ -/* - * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOAudioEngine - */ - -#ifndef _IOKIT_IOAUDIOENGINE_H -#define _IOKIT_IOAUDIOENGINE_H - -#include <IOKit/IOService.h> - -#ifndef IOAUDIOFAMILY_SELF_BUILD -#include <IOKit/audio/IOAudioTypes.h> -#else -#include "IOAudioTypes.h" -#endif -#include <IOKit/IOBufferMemoryDescriptor.h> - -class OSDictionary; -class OSCollection; -class OSOrderedSet; -class IOAudioEngineUserClient; -class IOAudioDevice; -class IOAudioStream; -class IOAudioControl; -class IOCommandGate; - -#define IOAUDIOENGINE_DEFAULT_NUM_ERASES_PER_BUFFER 4 - -/*! - * @typedef IOAudioEnginePosition - * @abstract Represents a position in an audio audio engine. - * @discussion This position is based on the sample frame within a - * loop around the sample buffer, and the loop count which starts at 0 when the audio engine - * begins playback. - * @field fSampleFrame The sample frame within the buffer - starts at 0. - * @field fLoopCount The number of times the ring buffer has looped. - */ -typedef struct { - UInt32 fSampleFrame; - UInt32 fLoopCount; -} IOAudioEnginePosition; - -#define CMP_IOAUDIOENGINEPOSITION(p1, p2) \ - (((p1)->fLoopCount > (p2)->fLoopCount) ? 1 : \ - ((p1)->fLoopCount == (p2)->fLoopCount) && ((p1)->fSampleFrame > (p2)->fSampleFrame) ? 1 : \ - ((p1)->fLoopCount == (p2)->fLoopCount) && ((p1)->fSampleFrame == (p2)->fSampleFrame) ? 0 : -1) - -#define IOAUDIOENGINEPOSITION_IS_ZERO(p1) (((p1)->fLoopCount == 0) && ((p1)->fSampleFrame == 0)) - -/*! - * @class IOAudioEngine - * @abstract Abstract base class for a single audio audio / I/O engine. - * @discussion An IOAudioEngine is defined by a single I/O engine to transfer data to - * or from one or more sample buffers. Each sample buffer is represented by a single IOAudioStream - * instance. A single IOAudioEngine must contain at least one IOAudioStream, but has no upper - * limit on the number of IOAudioStreams it may contain. An IOAudioEngine instance may contain - * both input and output IOAudioStreams. - * - * An audio driver must subclass IOAudioEngine in order to provide certain services. An - * IOAudioEngine subclass must start and stop the I/O engine when requested. The I/O - * engine should be continuously running and loop around from end to beginning. While the audio - * engine is running, it must take a timestamp as the sample buffer(s) wrap around and start at - * the beginning. The CoreAudio.framework uses the timestamp to calculate the exact position of - * the audio engine. An IOAudioEngine subclass must implement getCurrentSampleFrame() to provide - * a sample position on demand. Finally, an IOAudioEngine subclass must provide clipping and - * format conversion routines to go to/from the CoreAudio.framework's native float format. - * - * If multiple stream formats or sample rates are allowed, the IOAudioEngine - * subclass must provide support for changing the hardware when a format or sample rate is - * changed. - * - * There are several attributes associated with a single IOAudioEngine: - * - * The IOAudioEngine superclass provides a shared status buffer that contains all of the dynamic pieces - * of information about the audio engine (type IOAudioEngineStatus). It runs an erase process on - * all of the output streams. The erase head is used to zero out the mix and sample buffers after - * the samples have been played. Additionally, the IOAudioEngine superclass handles the - * communication with the CoreAudio.framework and makes the decision to start and stop the - * audio engine when it detects it is in use. - * - * In order for an audio device to play back or record sound, an IOAudioEngine subclass must be created. - * The subclass must initialize all of the necessary hardware resources to prepare for starting the - * audio I/O engine. It typically will perform these tasks in the initHardware() method. A subclass - * may also implement a stop() method which is called as the driver is being torn down. This is - * typically called in preparation of removing the device from the system for removable devices. - * - * In addition to initializing the necessary hardware, there are a number of other tasks an - * IOAudioEngine must do during initHardware(). It must create the necessary IOAudioStream objects - * to match the device capabilities. Each IOAudioStream must be added using addAudioStream(). It - * also should create the IOAudioControls needed to control the various attributes of the audio engine: - * output volume, mute, input gain, input selection, analog passthru. To do that, addDefaultAudioControl() - * should be called with each IOAudioControl to be attached to the IOAudioEngine. In order to provide - * for proper synchronization, the latency of the audio engine should be specified with setSampleLatency(). - * This value represents the latency between the timestamp taken at the beginning of the buffer and - * when the audio is actually played (or recorded) by the device. If a device is block based or if - * there is a need to keep the CoreAudio.framework a certain number of samples ahead of (or behind for - * input) the I/O head, that value should be specified using setSampleOffset(). If this is not specified - * the CoreAudio.framework may attempt to get as close to the I/O head as possible. - * - * The following fields in the shared IOAudioEngineStatus struct must be maintained by the subclass - * implementation: - * <pre> - * <t> fCurrentLoopCount - the number of times the sample buffer has wrapped around to the beginning - * <t> fLastLoopTime - timestamp of the most recent time that the I/O engine looped back to the - * beginning of the sample buffer - * </pre> - * It is critically important that the fLastLoopTime field be as accurate as possible. It is - * the basis for the entire timer and synchronization mechanism used by the audio system. - * - * At init time, the IOAudioEngine subclass must call setNumSampleFramesPerBuffer() to indicate how large - * each of the sample buffers are (measured in sample frames). Within a single IOAudioEngine, all sample - * buffers must be the same size and be running at the same sample rate. If different buffers/streams can - * be run at different rates, separate IOAudioEngines should be used. The IOAudioEngine subclass must - * also call setSampleRate() at init time to indicate the starting sample rate of the device. - * - */ - -class IOAudioEngine : public IOService -{ - OSDeclareAbstractStructors(IOAudioEngine) - - friend class IOAudioEngineUserClient; - friend class IOAudioDevice; - friend class IOAudioStream; - -public: - /*! @var gSampleRateWholeNumberKey */ - static const OSSymbol *gSampleRateWholeNumberKey; - /*! @var gSampleRateFractionKey */ - static const OSSymbol *gSampleRateFractionKey; - - /*! @var numSampleFramesPerBuffer */ - UInt32 numSampleFramesPerBuffer; - - /*! @var sampleRate - * The current sample rate of the audio engine in samples per second. */ - IOAudioSampleRate sampleRate; - - /*! @var numErasesPerBuffer - * The number of times the erase head get scheduled to run for each - * cycle of the audio engine. */ - UInt32 numErasesPerBuffer; - /*! @var runEraseHead - * Set to true if the erase head is to run when the audio engine is running. This is the case if there are any output streams. */ - bool runEraseHead; - - /*! @var audioEngineStopPosition - * When all clients have disconnected, this is set to one buffer length past the - * current audio engine position at the time. Then when the stop position is reached, the audio engine - * is stopped */ - IOAudioEnginePosition audioEngineStopPosition; - - /*! @var isRegistered - * Internal state variable to keep track or whether registerService() has been called. */ - bool isRegistered; - /*! @var configurationChangeInProgress - * Set to true after beginConfigurationChange() and false upon a - * subsequent call to completeConfigurationChange() or cancelConfigurationChange(). */ - bool configurationChangeInProgress; - - /*! @var state - * The current state of the IOAudioEngine - running, stopped, paused. */ - IOAudioEngineState state; - - /*! @var status - * Status struct shared with the CoreAudio.framework. */ - IOAudioEngineStatus * status; - - /*! @var audioDevice - * The IOAudioDevice instance to which the IOAudioEngine belongs. */ - IOAudioDevice * audioDevice; - - /*! @var workLoop - * The IOWorkLoop for the audio driver - shared with the IOAudioDevice. */ - IOWorkLoop *workLoop; - /*! @var commandGate - * The IOCommandGate for this audio engine - attached to the driver's IOWorkLoop. */ - IOCommandGate *commandGate; - - /*! @var inputStreams - * An OSSet of all of the input IOAudioStreams attached to this IOAudioEngine. */ - OSOrderedSet *inputStreams; - UInt32 maxNumInputChannels; - /*! @var outputStreams - * An OSSet of all of the output IOAudioStreams attached to this IOAudioEngine. */ - OSOrderedSet *outputStreams; - UInt32 maxNumOutputChannels; - /*! @var userClients - * An OSSet of all of the currently connected user clients. */ - OSSet *userClients; - /*! @var defaultAudioControls - * All of the IOAudioControls that affect this audio engine. */ - OSSet *defaultAudioControls; - - /*! @var numActiveUserClients - * A total of the active user clients - those that are currently playing or - * recording audio. */ - UInt32 numActiveUserClients; - UInt32 sampleOffset; // used for input and output if inputSampleOffset is not set, if inputSampleOffset is set used as output only - - UInt32 index; - bool duringStartup; - -protected: - - /*! - * @var deviceStartedAudioEngine - * Used by the IOAudioDevice to determine responsibility for shutting - * the audio engine down when it is no longer needed. - */ - bool deviceStartedAudioEngine; - -protected: - struct ExpansionData { - UInt32 pauseCount; - IOBufferMemoryDescriptor *statusDescriptor; - IOBufferMemoryDescriptor *bytesInInputBufferArrayDescriptor; - IOBufferMemoryDescriptor *bytesInOutputBufferArrayDescriptor; - UInt32 mixClipOverhead; - OSArray *streams; - UInt32 inputSampleOffset; - }; - - ExpansionData *reserved; - -// static UInt32 sInstanceCount; - -public: - // OSMetaClassDeclareReservedUsed(IOAudioEngine, 0); - virtual IOReturn performFormatChange(IOAudioStream *audioStream, const IOAudioStreamFormat *newFormat, const IOAudioStreamFormatExtension *formatExtension, const IOAudioSampleRate *newSampleRate); - // OSMetaClassDeclareReservedUsed(IOAudioEngine, 1); - virtual IOBufferMemoryDescriptor * getStatusDescriptor(); - // OSMetaClassDeclareReservedUsed(IOAudioEngine, 2); - virtual IOReturn getNearestStartTime(IOAudioStream *audioStream, IOAudioTimeStamp *ioTimeStamp, bool isInput); - // OSMetaClassDeclareReservedUsed(IOAudioEngine, 3); - virtual IOBufferMemoryDescriptor * getBytesInInputBufferArrayDescriptor(); - // OSMetaClassDeclareReservedUsed(IOAudioEngine, 4); - virtual IOBufferMemoryDescriptor * getBytesInOutputBufferArrayDescriptor(); - // OSMetaClassDeclareReservedUsed(IOAudioEngine, 5); - /*! - * @function eraseOutputSamples - * @abstract This function allows for the actual erasing of the mix and sample buffer to be overridden by - * a child class. - * @param mixBuf Pointer to the IOAudioFamily allocated mix buffer. - * @param sampleBuf Pointer to the child class' sample buffer. - * @param firstSampleFrame Index to the first sample frame to erase. - * @param numSampleFrames Number of sample frames to erase. - * @param streamFormat Format of the data to be erased. - * @param audioStream Pointer to stream object that corresponds to the sample buffer being erased. - * @result Must return kIOReturnSuccess if the samples have been erased. - */ - virtual IOReturn eraseOutputSamples(const void *mixBuf, void *sampleBuf, UInt32 firstSampleFrame, UInt32 numSampleFrames, const IOAudioStreamFormat *streamFormat, IOAudioStream *audioStream); - // OSMetaClassDeclareReservedUsed(IOAudioEngine, 6); - /*! - * @function setClockIsStable - * @abstract This function sets a flag that CoreAudio uses to select its sample rate tracking algorithm. Set - * this to TRUE unless that results in dropped audio. If the driver is experiencing unexplained dropouts - * setting this FALSE might help. - * @param clockIsStable TRUE tells CoreAudio to use an agressive PLL to quickly lock to the engine's sample rate - * while FALSE tells CoreAudio to adjust more slowly to perceived sample rate changes that might just be the - * result of an unstable clock. - */ - virtual void setClockIsStable(bool clockIsStable); - - // OSMetaClassDeclareReservedUsed(IOAudioEngine, 7); - /*! - * @function setMixClipOverhead - * @abstract Used to tell IOAudioFamily when the watchdog timer must fire by. - * @discussion setMixClipOverhead allows an audio engine to tell IOAudioFamily how much time - * an engine will take to mix and clip its samples, in percent. - * The default value is 10, meaning 10%. This will cause IOAudioFamily to make - * the watchdog timer fire when there is just over 10% of the time to complete - * a buffer set left (e.g. 51 samples when the HAL is using a buffer size of 512 - * samples). - * @param newMixClipOverhead How much time per buffer should be made available for the - * mix and clip routines to run. Valid values are 1 through 99, inclusive. - * @result return no error - */ - virtual void setMixClipOverhead(UInt32 newMixClipOverhead); - - // OSMetaClassDeclareReservedUsed(IOAudioEngine, 8); - /*! - * @function setClockDomain - * @abstract Sets a property that CoreAudio uses to determine how devices are synchronized. If an audio device can tell that it is - * synchronized to another engine, it should set this value to that engine's clock domain. If an audio device can be a clock master, it may publish - * its own clock domain for other devices to use. - * @param clockDomain is the unique ID of another engine that this engine realizes it is synchronized to, use the default value kIOAudioNewClockDomain - * to have IOAudioEngine create a unique clock domain. - */ - virtual void setClockDomain(UInt32 clockDomain = kIOAudioNewClockDomain); - - // OSMetaClassDeclareReservedUsed(IOAudioEngine, 9); - /*! - * @function convertInputSamplesVBR - * @abstract Override this method if you want to return a different number of sample frames than was requested. - */ - virtual IOReturn convertInputSamplesVBR(const void *sampleBuf, void *destBuf, UInt32 firstSampleFrame, UInt32 &numSampleFrames, const IOAudioStreamFormat *streamFormat, IOAudioStream *audioStream); - - // OSMetaClassDeclareReservedUsed(IOAudioEngine, 10); - /*! - * @function setInputSampleOffset - * @abstract set the offset CoreAudio will read from off the current read pointer - * @param numSamples size of offset in sample - */ - virtual void setInputSampleOffset(UInt32 numSamples); - - // OSMetaClassDeclareReservedUsed(IOAudioEngine, 11); - /*! - * @function setOutputSampleOffset - * @abstract set the offset CoreAudio will write at off the current write pointer - * @param numSamples size of offset in sample - */ - virtual void setOutputSampleOffset(UInt32 numSamples); - -protected: - - // OSMetaClassDeclareReservedUsed(IOAudioEngine, 12); - virtual IOReturn createUserClient(task_t task, void *securityID, UInt32 type, IOAudioEngineUserClient **newUserClient, OSDictionary *properties); - -public: - - // OSMetaClassDeclareReservedUsed(IOAudioEngine, 13); - /*! - * @function setAttributeForConnection - * @abstract Generic method to set some attribute of the audio engine, specific to one connection. - * @discussion IOAudioEngine subclasses may implement this method to allow arbitrary attribute/value pairs to be set, specific to one connection. - * @param attribute Defines the attribute to be set. - * @param value The new value for the attribute. - * @result an IOReturn code. - */ - - virtual IOReturn setAttributeForConnection( SInt32 connectIndex, UInt32 attribute, uintptr_t value ); - - // OSMetaClassDeclareReservedUsed(IOAudioEngine, 14); - /*! @function getAttributeForConnection - * @abstract Generic method to retrieve some attribute of the audio engine, specific to one connection. - * @discussion IOAudioEngine subclasses may implement this method to allow arbitrary attribute/value pairs to be returned, specific to one connection. - * @param attribute Defines the attribute to be returned. Some defined attributes are:<br> - * @param value Returns the value for the attribute. - * @result an IOReturn code. - */ - - virtual IOReturn getAttributeForConnection( SInt32 connectIndex, UInt32 attribute, uintptr_t * value ); - -private: - OSMetaClassDeclareReservedUsed(IOAudioEngine, 0); - OSMetaClassDeclareReservedUsed(IOAudioEngine, 1); - OSMetaClassDeclareReservedUsed(IOAudioEngine, 2); - OSMetaClassDeclareReservedUsed(IOAudioEngine, 3); - OSMetaClassDeclareReservedUsed(IOAudioEngine, 4); - OSMetaClassDeclareReservedUsed(IOAudioEngine, 5); - OSMetaClassDeclareReservedUsed(IOAudioEngine, 6); - OSMetaClassDeclareReservedUsed(IOAudioEngine, 7); - OSMetaClassDeclareReservedUsed(IOAudioEngine, 8); - OSMetaClassDeclareReservedUsed(IOAudioEngine, 9); - OSMetaClassDeclareReservedUsed(IOAudioEngine, 10); - OSMetaClassDeclareReservedUsed(IOAudioEngine, 11); - OSMetaClassDeclareReservedUsed(IOAudioEngine, 12); - OSMetaClassDeclareReservedUsed(IOAudioEngine, 13); - OSMetaClassDeclareReservedUsed(IOAudioEngine, 14); - - OSMetaClassDeclareReservedUnused(IOAudioEngine, 15); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 16); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 17); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 18); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 19); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 20); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 21); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 22); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 23); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 24); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 25); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 26); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 27); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 28); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 29); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 30); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 31); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 32); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 33); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 34); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 35); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 36); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 37); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 38); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 39); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 40); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 41); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 42); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 43); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 44); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 45); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 46); - OSMetaClassDeclareReservedUnused(IOAudioEngine, 47); - -public: - /*! - * @function createDictionaryFromSampleRate - * @abstract Generates a dictionary matching the given sample rate. - * @discussion This is an internal routine used to generate a dictionary matching the given sample rate. It is used to generate a sample rate dictionary for the I/O Registry - used by the - * CoreAudio.framework. - * @result Returns the newly create OSDictionary. - */ - static OSDictionary *createDictionaryFromSampleRate(const IOAudioSampleRate *sampleRate, OSDictionary *rateDict = 0); - - /*! - * @function createSampleRateFromDictionary - * @abstract Generates a sample rate from an OSDictionary. - * @discussion This is an internal routine used to generate a sample rate from an OSDictionary. It is used to generate a sample rate give a new OSDictionary from the IORegistry - coming - * from the CoreAudio.framework. - * @result Returns the sample rate. - */ - static IOAudioSampleRate *createSampleRateFromDictionary(const OSDictionary *rateDict, IOAudioSampleRate *sampleRate = 0); - - /*! - * @function init - * @abstract Performs initialization of a newly allocated IOAudioEngine. - * @discussion This function is responsible for initialization of all of the general attributes of - * a new IOAudioEngine. It initializes instance variables to their default - * values and allocates the shared status buffer. Subclasses will likely want to override this method - * and do all of their common initialization in their implementation. They do need to be sure to call - * IOAudioEngine's implementation of init and pay attention to the return value. - * @param properties The default properties for the IOAudioEngine. - * @result Returns true if initialization was successful. - */ - virtual bool init(OSDictionary *properties); - - /*! - * @function free - * @abstract Frees all of the resources allocated by the IOAudioEngine. - * @discussion Do not call this directly. This is called automatically by the system when the instance's - * refcount goes to 0. To decrement the refcount, call release() on the object. - */ - virtual void free(); - - /*! - * @function getWorkLoop - * @abstract Returns the IOWorkLoop for the driver. - */ - virtual IOWorkLoop *getWorkLoop() const; - - /*! - * @function getCommandGate - * @abstract Returns the IOCommandGate for this IOAudioEngine. - */ - virtual IOCommandGate *getCommandGate() const; - - /*! - * @function start - * @abstract A simple cover function for start(IOService *, IOAudioDevice *) that assumes the provider - * is the IOAudioDevice. - * @discussion Subclasses will want to override start(IOService *, IOAudioDevice *) rather than this - * one. - * @param provider The service provider for the IOAudioEngine (the IOAudioDevice in this case). - * @result Returns true if the IOAudioEngine was successfully started. - */ - virtual bool start(IOService *provider); - - /*! - * @function start - * @abstract Standard IOKit start() routine called to start an IOService. - * @discussion This function is called in order to prepare the IOAudioEngine for use. It does NOT - * mean that the audio I/O engine itself should be started. This implementation gets the IOWorkLoop - * from the IOAudioDevice and allocates an IOCommandGate. Finally it calls initHardware() in which - * all of the subclass-specific device initialization should be done. Upon return from initHardware() - * all IOAudioStreams should be created and added to the audio engine. Also, all IOAudioControls - * for this IOAudioEngine should be created and attached. - * @param provider The service provider for the IOAudioEngine. - * @param device The IOAudioDevice to which this IOAudioEngine belongs. - * @result Returns true if the service was successfully started. - */ - virtual bool start(IOService *provider, IOAudioDevice *device); - - /*! - * @function initHardware - * @abstract This function is called by start() to provide a convenient place for the subclass to - * perform its hardware initialization. - * @discussion Upon return from this function, all IOAudioStreams and IOAudioControls should be created - * and the audio engine should be ready to be started when a client requests that playback begin. - * @function provider The service provider numb for this audio engine - typically the IOAudioDevice. - * @result Returns true if the hardware was successfully initialized. - */ - virtual bool initHardware(IOService *provider); - - /*! - * @function stop - * @abstract Stops the service and prepares for the driver to be terminated. - * @discussion This function is called before the driver is terminated and usually means that the device - * has been removed from the system. - * @param provider The service provider for the IOAudioEngine. - */ - virtual void stop(IOService *provider); - - /*! - * @function registerService - * @abstract Called when this audio engine is ready to begin vending services. - * @discussion This function is called by IOAudioDevice::activateAudioEngine() once the audio engine - * has been fully initialized and is ready to begin audio playback. - * @param options - */ - virtual void registerService(IOOptionBits options = 0); - - virtual void setAudioDevice(IOAudioDevice *device); - virtual void setIndex(UInt32 index); - - virtual void setDescription(const char *description); - - /*! - * @function newUserClient - * @abstract Requests a new user client object for this service. - * @discussion This function is called automatically by I/O Kit when a user process attempts - * to connect to this service. It allocates a new IOAudioEngineUserClient object and increments - * the number of connections for this audio engine. If this is the first user client for this IOAudioEngine, - * it calls startAudioEngine(). There is no need to call this function directly. - * A derived class that requires overriding of newUserClient should override the version with the properties - * parameter for Intel targets, and without the properties parameter for PPC targets. The #if __i386__ directive - * can be used to select between the two behaviors. - * @param task The task requesting the new user client. - * @param securityID Optional security paramater passed in by the client - ignored. - * @param type Optional user client type passed in by the client - ignored. - * @param handler The new IOUserClient * must be stored in this param on a successful completion. - * @param properties A dictionary of additional properties for the connection. - * @result Returns kIOReturnSuccess on success. May also result kIOReturnError or kIOReturnNoMemory. - */ - virtual IOReturn newUserClient(task_t task, void *securityID, UInt32 type, IOUserClient **handler); - virtual IOReturn newUserClient(task_t task, void *securityID, UInt32 type, OSDictionary *properties, IOUserClient **handler); - - /*! - * @function addAudioStream - * @abstract Adds an IOAudioStream to the audio engine. - * @discussion This function is called by the driver to add an IOAudioStream to the audio engine. This must be called at least once to make sure the audio engine has at least one IOAudioStream. - * @param stream The IOAudioStream to be added. - * @result Returns kIOReturnSuccess if the stream was successfully added. - */ - virtual IOReturn addAudioStream(IOAudioStream *stream); - - virtual IOAudioStream *getAudioStream(IOAudioStreamDirection direction, UInt32 channelID); - - virtual void lockAllStreams(); - virtual void unlockAllStreams(); - - virtual void updateChannelNumbers(); - - /*! - * @function resetStatusBuffer - * @abstract Resets the status buffer to its default values. - * @discussion This is called during startAudioEngine() and resumeAudioEngine() to clear out the status buffer - * in preparation of starting up the I/O engine. There is no need to call this directly. - */ - virtual void resetStatusBuffer(); - - /*! - * @function clearAllSampleBuffers - * @abstract Zeros out all of the sample and mix buffers associated with the IOAudioEngine - * @discussion This is called during resumeAudioEngine() since the audio engine gets started back at the - * beginning of the sample buffer. - */ - virtual void clearAllSampleBuffers(); - - /*! - * @function getCurrentSampleFrame - * @abstract Gets the current sample frame from the IOAudioEngine subclass. - * @result - */ - virtual UInt32 getCurrentSampleFrame() = 0; - - /*! - * @function startAudioEngine - * @abstract Starts the audio I/O engine. - * @discussion This method is called automatically when the audio engine is placed into use the first time. - * This must be overridden by the subclass. No call to the superclass's implementation is - * necessary. The subclass's implementation must start up the audio I/O engine. This includes any audio - * engine that needs to be started as well as any interrupts that need to be enabled. Upon successfully - * starting the engine, the subclass's implementation must call setState(kIOAudioEngineRunning). If - * it has also checked the state using getState() earlier in the implementation, the stateLock must be - * acquired for the entire initialization process (using IORecursiveLockLock(stateLock) and - * IORecursiveLockUnlock(stateLock)) to ensure that the state remains consistent. See the general class - * comments for an example. - * @result Must return kIOReturnSuccess on a successful start of the engine. - */ - virtual IOReturn startAudioEngine(); - - /*! - * @function stopAudioEngine - * @abstract Stops the audio I/O engine. - * @discussion This method is called automatically when the last client disconnects from this audio engine. - * It must be overridden by the subclass. No call to the superclass's implementation is necessary. - * The subclass's implementation must stop the audio I/O engine. The audio engine (if it exists) should - * be stopped and any interrupts disabled. Upon successfully stopping the engine, the subclass must call - * setState(kAudioEngineStopped). If it has also checked the state using getState() earlier in the - * implementation, the stateLock must be acquired for the entire initialization process (using - * IORecursiveLockLock(stateLock) and IORecursiveLockUnlock(stateLock)) to ensure that the state remains - * consistent. - * @result Must return kIOReturnSuccess on a successful stop of the engine. - */ - virtual IOReturn stopAudioEngine(); - virtual IOReturn pauseAudioEngine(); - virtual IOReturn resumeAudioEngine(); - - /*! - * @function performAudioEngineStart - * @abstract Called to start the audio I/O engine - * @discussion This method is called by startAudioEngine(). This must be overridden by the subclass. - * No call to the superclass' implementation is necessary. The subclass' implementation must start up the - * audio I/O engine. This includes any audio engine that needs to be started as well as any interrupts - * that need to be enabled. - * @result Must return kIOReturnSuccess on a successful start of the engine. - */ - virtual IOReturn performAudioEngineStart(); - - /*! - * @function performAudioEngineStop - * @abstract Called to stop the audio I/O engine - * @discussion This method is called by stopAudioEngine() and pauseAudioEngine. - * This must be overridden by the subclass. No call to the superclass' implementation is - * necessary. The subclass' implementation must stop the audio I/O engine. This includes any audio - * engine that needs to be stopped as well as any interrupts that need to be disabled. - * @result Must return kIOReturnSuccess on a successful stop of the engine. - */ - virtual IOReturn performAudioEngineStop(); - - /*! - * @function getState - * @abstract Returns the current state of the IOAudioEngine. - * @discussion If this method is called in preparation for calling setState(), the stateLock must - * be acquired before the first call to getState() and held until after the last call to setState(). - * Be careful not to return from the code acquiring the lock while the lock is being held. That - * will cause a deadlock situation. - * @result The current state of the IOAudioEngine: kIOAudioEngineRunning, kIOAudioEngineStopped. - */ - virtual IOAudioEngineState getState(); - - /*! - * @function getSampleRate - * @abstract Returns the sample rate of the IOAudioEngine in samples per second. - */ - virtual const IOAudioSampleRate *getSampleRate(); - - virtual IOReturn hardwareSampleRateChanged(const IOAudioSampleRate *sampleRate); - - /*! - * @function getRunEraseHead - * @abstract Returns true if the audio engine will run the erase head when the audio engine is running. - */ - virtual bool getRunEraseHead(); - - /*! - * @function getStatus - * @abstract Returns a pointer to the shared status buffer. - */ - virtual const IOAudioEngineStatus *getStatus(); - - /*! - * @function timerCallback - * @abstract A static method used as a callback for the IOAudioDevice timer services. - * @discussion This method implements the IOAudioDevice::TimerEvent type. - * @param arg1 The IOAudioEngine that is the target of the event. - * @param device The IOAudioDevice that sent the timer event. - */ - static void timerCallback(OSObject *arg1, IOAudioDevice *device); - - /*! - * @function timerFired - * @abstract Indicates the timer has fired. - * @discussion This method is called by timerCallback to indicate the timer has fired. This method calls performErase() and performFlush() to do erase head processing and - * audio engine flushing each time the timer event fires. - */ - virtual void timerFired(); - - /*! - * @function getTimerInterval - * @abstract Gets the timer interval for use by the timer event. - * @discussion This method is called each time the timer event is enabled through addTimer(). The default - * implementation is set to return a value such that the timer event runs n times each cycle of the audio - * engine through the sample buffer. The value n is stored as the instance variable: numErasesPerBuffer. - * The default value of numErasesPerBuffer is set to IOAUDIOENGINE_DEFAULT_NUM_ERASES_PER_BUFFER which is 4. - * A subclass may change the value of numErasesPerBuffer or override getTimerInterval. If it is overridden, - * the subclass should call the superclass's implementation, compare its interval with the superclass's and - * return the smaller of the two. - * @result Returns the interval for the timer event. - */ - virtual AbsoluteTime getTimerInterval(); - - /*! - * @function performErase - * @abstract Performs erase head processing. - * @discussion This method is called automatically each time the timer event fires and erases the sample - * buffer and mix buffer from the previous location up to the current location of the audio engine. - */ - virtual void performErase(); - - /*! - * @function performFlush - * @abstract Performs the flush operation. - * @discussion This method is called automatically each time the timer event fires. It stops the audio engine - * if there are no more clients and the audio engine is passed the latest flush ending position. - */ - virtual void performFlush(); - - virtual void stopEngineAtPosition(IOAudioEnginePosition *endingPosition); - - virtual IOReturn mixOutputSamples(const void *sourceBuf, void *mixBuf, UInt32 firstSampleFrame, UInt32 numSampleFrames, const IOAudioStreamFormat *streamFormat, IOAudioStream *audioStream); - virtual IOReturn clipOutputSamples(const void *mixBuf, void *sampleBuf, UInt32 firstSampleFrame, UInt32 numSampleFrames, const IOAudioStreamFormat *streamFormat, IOAudioStream *audioStream); - virtual void resetClipPosition(IOAudioStream *audioStream, UInt32 clipSampleFrame); - virtual IOReturn convertInputSamples(const void *sampleBuf, void *destBuf, UInt32 firstSampleFrame, UInt32 numSampleFrames, const IOAudioStreamFormat *streamFormat, IOAudioStream *audioStream); - - virtual void takeTimeStamp(bool incrementLoopCount = true, AbsoluteTime *timestamp = NULL); - virtual IOReturn getLoopCountAndTimeStamp(UInt32 *loopCount, AbsoluteTime *timestamp); - - virtual IOReturn calculateSampleTimeout(AbsoluteTime *sampleInterval, UInt32 numSampleFrames, IOAudioEnginePosition *startingPosition, AbsoluteTime *wakeupTime); - - virtual IOReturn performFormatChange(IOAudioStream *audioStream, const IOAudioStreamFormat *newFormat, const IOAudioSampleRate *newSampleRate); - - virtual void beginConfigurationChange(); - virtual void completeConfigurationChange(); - virtual void cancelConfigurationChange(); - - virtual IOReturn addDefaultAudioControl(IOAudioControl *defaultAudioControl); - virtual IOReturn removeDefaultAudioControl(IOAudioControl *defaultAudioControl); - virtual void removeAllDefaultAudioControls(); - - virtual OSString *getGlobalUniqueID(); - virtual OSString *getLocalUniqueID(); - -protected: - - /*! - * @function initKeys - * @abstract Generates the OSSymbols with the keys. - * @discussion Do not call this directly. This is an internal initialization routine. - */ - static void initKeys(); - - virtual void setNumSampleFramesPerBuffer(UInt32 numSampleFrames); - virtual UInt32 getNumSampleFramesPerBuffer(); - - /*! - * @function setState - * @abstract Indicates that the audio engine is in the specified state. - * @discussion This method simply sets the internal state of the audio engine to the specified state. It does not - * affect a change to the state. It does however keep other internal state-related attributes consistent. - * For example, it enables or disables the timer as needed when the state changes to running or stopped. - * @param newState The state the audio engine is in. - * @result Returns the old state. - */ - virtual IOAudioEngineState setState(IOAudioEngineState newState); - - /*! - * @function setSampleRate - * @abstract Records the sample rate of the audio engine. - * @discussion This method must be called during initialization of a new audio engine to record the audio engine's - * initial sample rate. It also is intended to be used to record changes to the sample rate during use. - * Currently changing sample rates after the audio engine has been started is not supported. - * It may require that the sample buffers be re-sized. This will be available in an upcoming release. - * @param newSampleRate The sample rate of the audio engine in samples per second. - */ - virtual void setSampleRate(const IOAudioSampleRate *newSampleRate); - - /*! - * @function setSampleLatency - * @abstract Sets the sample latency for the audio engine. - * @discussion The sample latency represents the number of samples ahead of the playback head - * that it is safe to write into the sample buffer. The audio device API will never write - * closer to the playback head than the number of samples specified. For input audio engines - * the number of samples is behind the record head. - */ - virtual void setSampleLatency(UInt32 numSamples); - virtual void setOutputSampleLatency(UInt32 numSamples); - virtual void setInputSampleLatency(UInt32 numSamples); - virtual void setSampleOffset(UInt32 numSamples); - - /*! - * @function setRunEraseHead - * @abstract Tells the audio engine whether or not to run the erase head. - * @discussion By default, output audio engines run the erase head and input audio engines do not. This method can - * be called after setDirection() is called in order to change the default behavior. - * @param runEraseHead The audio engine will run the erase head if this value is true. - */ - virtual void setRunEraseHead(bool runEraseHead); - - /*! - * @function clientClosed - * @abstract Called automatically when a user client closes its connection to the audio engine. - * @discussion This method decrements the number of connections to the audio engine and if they reach - * zero, the audio engine is called with a call to stopAudioEngine(). This method should not be called directly. - * @param client The user client that has disconnected. - */ - virtual void clientClosed(IOAudioEngineUserClient *client); - - /*! - * @function addTimer - * @abstract Enables the timer event for the audio engine. - * @discussion There is a timer event needed by the IOAudioEngine for processing the erase head - * and performing flushing operations. When the timer fires, the method timerFired() is ultimately - * called which in turn calls performErase() and performFlush(). This is called automatically - * to enable the timer event for this audio engine. It is called by setState() when the audio engine state - * is set to kIOAudioEngineRunning. When the timer is no longer needed, removeTimer() is called. - * There is no need to call this directly. - */ - virtual void addTimer(); - - /*! - * @function removeTimer - * @abstract Disables the timer event for the audio engine. - * @discussion This method is called automatically to disable the timer event for this audio engine. - * There is need to call it directly. This method is called by setState() when the audio engine state - * is changed from kIOAudioEngineRunning to one of the stopped states. - */ - virtual void removeTimer(); - - virtual void sendFormatChangeNotification(IOAudioStream *audioStream); - virtual void sendNotification(UInt32 notificationType); - - virtual IOReturn createUserClient(task_t task, void *securityID, UInt32 type, IOAudioEngineUserClient **newUserClient); - - static IOReturn _addUserClientAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // <rdar://7529580> - static IOReturn addUserClientAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - static IOReturn _removeUserClientAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // <rdar://7529580> - static IOReturn removeUserClientAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - static IOReturn detachUserClientsAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - - virtual IOReturn addUserClient(IOAudioEngineUserClient *newUserClient); - virtual IOReturn removeUserClient(IOAudioEngineUserClient *userClient); - virtual IOReturn detachUserClients(); - - virtual IOReturn startClient(IOAudioEngineUserClient *userClient); - virtual IOReturn stopClient(IOAudioEngineUserClient *userClient); - - virtual IOReturn incrementActiveUserClients(); - virtual IOReturn decrementActiveUserClients(); - - virtual void detachAudioStreams(); - void setWorkLoopOnAllAudioControls(IOWorkLoop *wl); - - static inline void lockStreamForIO(IOAudioStream *stream); - static inline void unlockStreamForIO(IOAudioStream *stream); - - // These aren't virtual by design - UInt32 getNextStreamID(IOAudioStream * newStream); - IOAudioStream * getStreamForID(UInt32 streamID); - -}; - -#endif /* _IOKIT_IOAUDIOENGINE_H */ diff --git a/i386/include/IOKit/audio/IOAudioEngineUserClient.h b/i386/include/IOKit/audio/IOAudioEngineUserClient.h deleted file mode 100644 index cc51a83..0000000 --- a/i386/include/IOKit/audio/IOAudioEngineUserClient.h +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOAUDIOENGINEUSERCLIENT_H -#define _IOKIT_IOAUDIOENGINEUSERCLIENT_H - -#include <IOKit/IOUserClient.h> -#ifndef IOAUDIOFAMILY_SELF_BUILD -#include <IOKit/audio/IOAudioEngine.h> -#include <IOKit/audio/IOAudioTypes.h> -#else -#include "IOAudioEngine.h" -#include "IOAudioTypes.h" -#endif -#include <IOKit/IOBufferMemoryDescriptor.h> - -class IOAudioEngine; -class IOAudioStream; -class IOMemoryDescriptor; -class IOCommandGate; -class IOWorkLoop; - -class IOAudioEngineUserClient; -class IOAudioClientBufferSet; -typedef struct IOAudioFormatNotification; -typedef struct IOAudioClientBuffer { - IOAudioEngineUserClient *userClient; - IOAudioStream *audioStream; - void *sourceBuffer; - IOMemoryDescriptor *sourceBufferDescriptor; - IOMemoryMap *sourceBufferMap; - void *unmappedSourceBuffer; - UInt32 numSampleFrames; - UInt32 numChannels; - IOAudioEnginePosition mixedPosition; - struct IOAudioClientBuffer *mNextBuffer32; - struct IOAudioClientBuffer *nextClip; - struct IOAudioClientBuffer *previousClip; - struct IOAudioClientBuffer *nextClient; - IOAudioBufferDataDescriptor *bufferDataDescriptor; -} IOAudioClientBuffer; - -/* IOAudioClientBuffer64 added for binary compatibility with old PPC drivers covered by <rdar://problem/4651809> */ -typedef struct IOAudioClientBuffer64 -{ - IOAudioClientBuffer mAudioClientBuffer32; - mach_vm_address_t mUnmappedSourceBuffer64; - struct IOAudioClientBuffer64 *mNextBuffer64; -} IOAudioClientBuffer64; - -typedef struct IOAudioClientBufferExtendedInfo { - // Added stuff for registerClientParameterBuffer - UInt32 bufferSetID; - void *paramBuffer; - IOMemoryDescriptor *paramBufferDescriptor; - IOMemoryMap *paramBufferMap; - void *unmappedParamBuffer; - struct IOAudioClientBufferExtendedInfo *mNextExtended; -} IOAudioClientBufferExtendedInfo; -/* IOAudioClientBufferExtendedInfo64 added for binary compatibility with old PPC drivers covered by <rdar://problem/4651809> */ -typedef struct IOAudioClientBufferExtendedInfo64 -{ - IOAudioClientBufferExtendedInfo mAudioClientBufferExtended32; - mach_vm_address_t mUnmappedParamBuffer64; - struct IOAudioClientBufferExtendedInfo64 *mNextExtended64; -} IOAudioClientBufferExtendedInfo64; - - -class IOAudioEngineUserClient : public IOUserClient - { - OSDeclareDefaultStructors(IOAudioEngineUserClient) - - friend class IOAudioEngine; - friend class IOAudioClientBufferSet; - friend class IOAudioStream; - - protected: - IOAudioEngine *audioEngine; - - IOWorkLoop *workLoop; - IOCommandGate *commandGate; - - IOExternalMethod old_methods[5]; // It's size can't be changed for binary compatibility reasons, no longer used. - IOExternalTrap trap; - - task_t clientTask; - UInt32 numSampleFrames; // Never used... - - IOAudioClientBufferSet *clientBufferSetList; - IORecursiveLock *clientBufferLock; - - IOAudioNotificationMessage *notificationMessage; - - bool online; - - protected: - struct ExpansionData { - IOAudioClientBufferExtendedInfo64 *extendedInfo; - IOExternalMethod methods[kIOAudioEngineNumCalls]; // This size can be changed, this is the new methods pointer - UInt32 classicMode; - }; - - ExpansionData *reserved; - - public: - virtual IOReturn externalMethod( uint32_t selector, IOExternalMethodArguments * arguments, IOExternalMethodDispatch * dispatch, - OSObject * target, void * reference); - // New code added here... - // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 0); - virtual IOReturn registerClientParameterBuffer (void * parameterBuffer, UInt32 bufferSetID); // unused function - // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 1); - virtual IOAudioClientBufferExtendedInfo * findExtendedInfo(UInt32 bufferSetID); - // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 2); - virtual IOReturn getNearestStartTime(IOAudioStream *audioStream, IOAudioTimeStamp *ioTimeStamp, UInt32 isInput); - // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 3); - virtual IOReturn getClientNearestStartTime(IOAudioStream *audioStream, IOAudioTimeStamp *ioTimeStamp, UInt32 isInput); - // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 4); - virtual IOReturn safeRegisterClientBuffer(UInt32 audioStreamIndex, void * sourceBuffer, UInt32 bufSizeInBytes, UInt32 bufferSetID); - // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 5); - virtual bool initWithAudioEngine(IOAudioEngine *engine, task_t task, void *securityToken, UInt32 type, OSDictionary *properties); - // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 6); <rdar://problems/5321701> - virtual IOReturn safeRegisterClientBuffer64(UInt32 audioStreamIndex, mach_vm_address_t * sourceBuffer, UInt32 bufSizeInBytes, UInt32 bufferSetID); - // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 7); <rdar://problems/5321701> - virtual IOReturn registerClientBuffer64(IOAudioStream *audioStream, mach_vm_address_t sourceBuffer, UInt32 bufSizeInBytes, UInt32 bufferSetID); - // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 8); <rdar://problems/5321701> - virtual IOReturn registerBuffer64(IOAudioStream *audioStream, mach_vm_address_t sourceBuffer, UInt32 bufSizeInBytes, UInt32 bufferSetID); - // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 9); <rdar://problems/5321701> - virtual IOReturn unregisterBuffer64(mach_vm_address_t sourceBuffer, UInt32 bufferSetID); - // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 10); <rdar://problems/5321701> - virtual IOReturn unregisterClientBuffer64(mach_vm_address_t * sourceBuffer, UInt32 bufferSetID); - // OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 11); <rdar://problems/5321701> - virtual IOAudioClientBufferExtendedInfo64 * findExtendedInfo64(UInt32 bufferSetID); - - - - private: - OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 0); - OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 1); - OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 2); - OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 3); - OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 4); - OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 5); - OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 6); - OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 7); - OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 8); - OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 9); - OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 10); - OSMetaClassDeclareReservedUsed(IOAudioEngineUserClient, 11); - - - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 12); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 13); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 14); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 15); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 16); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 17); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 18); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 19); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 20); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 21); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 22); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 23); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 24); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 25); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 26); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 27); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 28); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 29); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 30); - OSMetaClassDeclareReservedUnused(IOAudioEngineUserClient, 31); - - protected: - virtual IOReturn clientClose(); - virtual IOReturn clientDied(); - - static IOReturn _closeClientAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // <rdar://7529580> - static IOReturn closeClientAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - virtual IOReturn closeClient(); - - - virtual IOReturn clientMemoryForType(UInt32 type, UInt32 *flags, IOMemoryDescriptor **memory); - virtual IOExternalMethod *getExternalMethodForIndex(UInt32 index); - virtual IOExternalTrap *getExternalTrapForIndex(UInt32 index); - virtual IOReturn registerNotificationPort(mach_port_t port, UInt32 type, UInt32 refCon); - - static IOReturn _registerNotificationAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // <rdar://7529580> - static IOReturn registerNotificationAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - virtual IOReturn registerNotification(mach_port_t port, UInt32 refCon); - - virtual void setOnline(bool newOnline); - - virtual IOReturn performClientOutput(UInt32 firstSampleFrame, UInt32 loopCount, IOAudioClientBufferSet *bufferSet, UInt32 sampleIntervalHi, UInt32 sampleIntervalLo); - virtual IOReturn performClientInput(UInt32 firstSampleFrame, IOAudioClientBufferSet *bufferSet); - virtual void performWatchdogOutput(IOAudioClientBufferSet *clientBufferSet, UInt32 generationCount); - - virtual void lockBuffers(); - virtual void unlockBuffers(); - - public: - - static IOAudioEngineUserClient *withAudioEngine(IOAudioEngine *engine, task_t clientTask, void *securityToken, UInt32 type); - static IOAudioEngineUserClient *withAudioEngine(IOAudioEngine *engine, task_t clientTask, void *securityToken, UInt32 type, OSDictionary *properties); - - virtual bool initWithAudioEngine(IOAudioEngine *engine, task_t task, void *securityToken, UInt32 type); - - virtual void free(); - virtual void freeClientBufferSetList(); - virtual void freeClientBuffer(IOAudioClientBuffer64 *clientBuffer); - - virtual void stop(IOService *provider); - - virtual bool isOnline(); - - virtual IOReturn registerBuffer(IOAudioStream *audioStream, void* sourceBuffer, UInt32 bufSizeInBytes, UInt32 bufferSetID); - virtual IOReturn unregisterBuffer( void * sourceBuffer, UInt32 bufferSetID); - - static IOReturn _registerBufferAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // <rdar://7529580> - static IOReturn registerBufferAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - static IOReturn _unregisterBufferAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // <rdar://7529580> - static IOReturn unregisterBufferAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - - virtual IOReturn registerClientBuffer(IOAudioStream *audioStream, void * sourceBuffer, UInt32 bufSizeInBytes, UInt32 bufferSetID); - virtual IOReturn unregisterClientBuffer(void * sourceBuffer, UInt32 bufferSetID); - - static IOReturn _getNearestStartTimeAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // <rdar://7529580> - static IOReturn getNearestStartTimeAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - - virtual IOAudioClientBufferSet *findBufferSet(UInt32 bufferSetID); - virtual void removeBufferSet(IOAudioClientBufferSet *bufferSet); - - virtual IOReturn getConnectionID(UInt32 *connectionID); - - virtual IOReturn clientStart(); - virtual IOReturn clientStop(); - - static IOReturn _startClientAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // <rdar://7529580> - static IOReturn startClientAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - static IOReturn _stopClientAction(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); // <rdar://7529580> - static IOReturn stopClientAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - - virtual IOReturn startClient(); - virtual IOReturn stopClient(); - - virtual IOReturn performClientIO(UInt32 firstSampleFrame, UInt32 loopCount, bool inputIO, UInt32 bufferSetID, UInt32 sampleIntervalHi, UInt32 sampleIntervalLo); - - virtual void sendFormatChangeNotification(IOAudioStream *audioStream); - virtual IOReturn sendNotification(UInt32 notificationType); - - }; - -#endif /* _IOKIT_IOAUDIOENGINEUSERCLIENT_H */ diff --git a/i386/include/IOKit/audio/IOAudioLevelControl.h b/i386/include/IOKit/audio/IOAudioLevelControl.h deleted file mode 100644 index d76786d..0000000 --- a/i386/include/IOKit/audio/IOAudioLevelControl.h +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOAUDIOLEVELCONTROL_H -#define _IOKIT_IOAUDIOLEVELCONTROL_H - -#ifndef IOAUDIOFAMILY_SELF_BUILD -#include <IOKit/audio/IOAudioControl.h> -#else -#include "IOAudioControl.h" -#endif - -class OSArray; - -/*! - * @class IOAudioLevelControl - * @abstract - * @discussion - */ - -class IOAudioLevelControl : public IOAudioControl -{ - OSDeclareDefaultStructors(IOAudioLevelControl) - -protected: - SInt32 minValue; - SInt32 maxValue; - IOFixed minDB; - IOFixed maxDB; - - OSArray *ranges; - -protected: - struct ExpansionData { }; - - ExpansionData *reserved; - -public: - static IOAudioLevelControl *createPassThruVolumeControl (SInt32 initialValue, - SInt32 minValue, - SInt32 maxValue, - IOFixed minDB, - IOFixed maxDB, - UInt32 channelID, - const char *channelName, - UInt32 cntrlID); - - // OSMetaClassDefineReservedUnused(IOAudioLevelControl, 0); - /*! - * @function setLinearScale - * @abstract This function tells CoreAudio if it should apply a curve to the scaler representation of the volume. - * @param useLinearScale TRUE instructs CoreAudio to not apply a curve to the scaler representation of the volume, - * FALSE instructs CoreAudio to apply a curve, which is CoreAudio's default behavior. - */ - virtual void setLinearScale(bool useLinearScale); - -private: - OSMetaClassDeclareReservedUsed(IOAudioLevelControl, 0); - - OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 1); - OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 2); - OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 3); - OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 4); - OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 5); - OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 6); - OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 7); - OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 8); - OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 9); - OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 10); - OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 11); - OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 12); - OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 13); - OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 14); - OSMetaClassDeclareReservedUnused(IOAudioLevelControl, 15); - -public: - /*! - * @function create - * @abstract Allocates a new level control with the given attributes - * @param initialValue The initial value of the control - * @param minValue The lowest possible value the control may have - * @param maxValue The highest possible value the control may have - * @param minDB A fixed point representation of the db value matching minValue - * @param maxDB A fixed point representation of the db value matching maxValue - * @param channelID The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h. - * @param channelName An optional name for the channel. Common names are located in IOAudioTypes.h. - * @param cntrlID An optional ID for the control that can be used to uniquely identify controls. - * @result Returns a newly allocted and initialized level IOAudioControl - */ - static IOAudioLevelControl *create(SInt32 initialValue, - SInt32 minValue, - SInt32 maxValue, - IOFixed minDB, - IOFixed maxDB, - UInt32 channelID, - const char *channelName = 0, - UInt32 cntrlID = 0, - UInt32 subType = 0, - UInt32 usage = 0); - - static IOAudioLevelControl *createVolumeControl(SInt32 initialValue, - SInt32 minValue, - SInt32 maxValue, - IOFixed minDB, - IOFixed maxDB, - UInt32 channelID, - const char *channelName = 0, - UInt32 cntrlID = 0, - UInt32 usage = 0); - - /*! - * @function init - * @abstract Initializes a newly allocated IOAudioLevelControl with the given attributes - * @param initialValue The initial value of the control - * @param minValue The lowest possible value the control may have - * @param maxValue The highest possible value the control may have - * @param minDB A fixed point representation of the db value matching minValue - * @param maxDB A fixed point representation of the db value matching maxValue - * @param channelID The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h. - * @param channelName An optional name for the channel. Common names are located in IOAudioTypes.h. - * @param cntrlID An optional ID for the control that can be used to uniquely identify controls. - * @param properties Standard property list passed to the init() function of any new IOService. This dictionary - * gets stored in the registry entry for this service. - * @result Returns true on success - */ - virtual bool init(SInt32 initialValue, - SInt32 minValue, - SInt32 maxValue, - IOFixed minDB, - IOFixed maxDB, - UInt32 channelID, - const char *channelName = 0, - UInt32 cntrlID = 0, - UInt32 subType = 0, - UInt32 usage = 0, - OSDictionary *properties = 0); - - virtual void free(); - - /*! - * @function setMinValue - * @abstract Sets the minimum value the control may have - * @param minValue The minimum value for the control - */ - virtual void setMinValue(SInt32 minValue); - - virtual SInt32 getMinValue(); - - /*! - * @function setMaxValue - * @abstract Sets the maximum value the control may have - * @param maxValue The maximum value for the control - */ - virtual void setMaxValue(SInt32 maxValue); - - virtual SInt32 getMaxValue(); - - /*! - * @function setMinDB - * @abstract Sets the minimum value in db that the control may have - * @discussion This value is represented as an IOFixed value which is a fixed point number. The IOFixed - * type is a 16.16 fixed point value. - * @param minDB The minimum value in db for the control - */ - virtual void setMinDB(IOFixed minDB); - - virtual IOFixed getMinDB(); - - /*! - * @function setMaxDB - * @abstract Sets the maximum value in db that the control may have - * @discussion This value is represented as an IOFixed value which is a fixed point number. The IOFixed - * type is a 16.16 fixed point value. - * @param maxDB The maximum value in db for the control - */ - virtual void setMaxDB(IOFixed maxDB); - - virtual IOFixed getMaxDB(); - - virtual IOReturn addRange(SInt32 minValue, SInt32 maxValue, IOFixed minDB, IOFixed maxDB); - virtual IOReturn addNegativeInfinity(SInt32 negativeInfinityValue); - - virtual IOReturn validateValue(OSObject *newValue); -}; - -#endif /* _IOKIT_IOAUDIOLEVELCONTROL_H */ diff --git a/i386/include/IOKit/audio/IOAudioPort.h b/i386/include/IOKit/audio/IOAudioPort.h deleted file mode 100644 index 728c65e..0000000 --- a/i386/include/IOKit/audio/IOAudioPort.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOAUDIOPORT_H -#define _IOKIT_IOAUDIOPORT_H - -#include <IOKit/IOService.h> - -class IOAudioDevice; -class IOAudioControl; -class OSDictionary; - -/*! - * @class IOAudioPort - * @abstract Represents a logical or physical port or functional unit in an audio device. - * @discussion An IOAudioPort represents an element in the signal chain in the audio device. It may contain - * one or more controls (represented by IOAudioControl) by which different attributes of the port may be - * represented and adjusted. - * - * IOAudioPort objects are connected up in the IORegistry in the IOAudioPlane to represent the signal chain of - * the device. They may be connected to other IOAudioPorts as well as IOAudioEngines to indicate they either - * feed into or are fed by one of the audio engines (i.e. they provide input to or take output from the computer). - */ -class IOAudioPort : public IOService -{ - friend class IOAudioDevice; - - OSDeclareDefaultStructors(IOAudioPort) - -public: - /* @var audioDevice The IOAudioDevice that this IOAudioPort belongs to. */ - IOAudioDevice * audioDevice; - /* @var audioControls A set containg all of the IOAudioControl instances that belong to the port. */ - OSSet * audioControls; - bool isRegistered; - -protected: - struct ExpansionData { }; - - ExpansionData *reserved; - -private: - OSMetaClassDeclareReservedUnused(IOAudioPort, 0); - OSMetaClassDeclareReservedUnused(IOAudioPort, 1); - OSMetaClassDeclareReservedUnused(IOAudioPort, 2); - OSMetaClassDeclareReservedUnused(IOAudioPort, 3); - OSMetaClassDeclareReservedUnused(IOAudioPort, 4); - OSMetaClassDeclareReservedUnused(IOAudioPort, 5); - OSMetaClassDeclareReservedUnused(IOAudioPort, 6); - OSMetaClassDeclareReservedUnused(IOAudioPort, 7); - OSMetaClassDeclareReservedUnused(IOAudioPort, 8); - OSMetaClassDeclareReservedUnused(IOAudioPort, 9); - OSMetaClassDeclareReservedUnused(IOAudioPort, 10); - OSMetaClassDeclareReservedUnused(IOAudioPort, 11); - OSMetaClassDeclareReservedUnused(IOAudioPort, 12); - OSMetaClassDeclareReservedUnused(IOAudioPort, 13); - OSMetaClassDeclareReservedUnused(IOAudioPort, 14); - OSMetaClassDeclareReservedUnused(IOAudioPort, 15); - OSMetaClassDeclareReservedUnused(IOAudioPort, 16); - OSMetaClassDeclareReservedUnused(IOAudioPort, 17); - OSMetaClassDeclareReservedUnused(IOAudioPort, 18); - OSMetaClassDeclareReservedUnused(IOAudioPort, 19); - OSMetaClassDeclareReservedUnused(IOAudioPort, 20); - OSMetaClassDeclareReservedUnused(IOAudioPort, 21); - OSMetaClassDeclareReservedUnused(IOAudioPort, 22); - OSMetaClassDeclareReservedUnused(IOAudioPort, 23); - OSMetaClassDeclareReservedUnused(IOAudioPort, 24); - OSMetaClassDeclareReservedUnused(IOAudioPort, 25); - OSMetaClassDeclareReservedUnused(IOAudioPort, 26); - OSMetaClassDeclareReservedUnused(IOAudioPort, 27); - OSMetaClassDeclareReservedUnused(IOAudioPort, 28); - OSMetaClassDeclareReservedUnused(IOAudioPort, 29); - OSMetaClassDeclareReservedUnused(IOAudioPort, 30); - OSMetaClassDeclareReservedUnused(IOAudioPort, 31); - -public: - /*! - * @function withAttributes - * @abstract Allocates a new IOAudioPort instance with the given attributes - * @discussion This static method allocates a new IOAudioPort and calls initWithAttributes() on it with - * the parameters passed in to it. - * @param portType A readable string representing the type of port. Common port types are defined in - * IOAudioTypes.h and are prefixed with 'kIOAudioPortType'. Please provide feedback if there are - * other common port types that should be included. - * @param portName A readable string representing the name of the port. For example: 'Internal Speaker', - * 'Line Out'. This field is optional, but useful for providing information to the application/user. - * @param subType Developer defined readable string representing a subtype for the port. (optional) - * @param properties Standard property list passed to the init of any new IOService. This dictionary - * gets stored in the registry for this instance. (optional) - * @result Returns the newly allocated and initialized IOAudioPort instance. - */ - static IOAudioPort *withAttributes(UInt32 portType, const char *portName = 0, UInt32 subType = 0, OSDictionary *properties = 0); - - /*! - * @function initWithAttributes - * @abstract Initializes a newly allocated IOAudioPort instance with the given attributes - * @discussion The properties parameter is passed on the superclass' init(). The portType, subType - * and properties parameters are optional, however portType is recommended. - * @param portType A readable string representing the type of port. Common port types are defined in - * IOAudioTypes.h and are prefixed with 'kIOAudioPortType'. Please provide feedback if there are - * other common port types that should be included. - * @param portName A readable string representing the name of the port. For example: 'Internal Speaker', - * 'Line Out'. This field is optional, but useful for providing information to the application/user. - * @param subType Developer defined readable string representing a subtype for the port. (optional) - * @param properties Standard property list passed to the init of any new IOService. This dictionary - * gets stored in the registry for this instance. (optional) - * @result Returns true on success. - */ - virtual bool initWithAttributes(UInt32 portType, const char *portName = 0, UInt32 subType = 0, OSDictionary *properties = 0); - - /*! - * @function free - * @abstract Frees all of the resources allocated by the IOAudioPort. - * @discussion Do not call this directly. This is called automatically by the system when the instance's - * refcount goes to 0. To decrement the refcount, call release() on the object. - */ - virtual void free(); - - /*! - * @function start - * @abstract Called to start a newly created IOAudioPort. - * @discussion This is called automatically by IOAudioDevice when attachAudioPort() is called. - * @param provider The IOAudioDevice that owns this port - * @result Returns true on success - */ - virtual bool start(IOService *provider); - - /*! - * @function stop - * @abstract Called when the IOAudioDevice is stopping when it is no longer available. - * @discussion This method calls deactivateAudioControls() to shut down all of the controls associated with - * this port. - * @param provider The IOAudioDevice that owns this port - */ - virtual void stop(IOService *provider); - - virtual void registerService(IOOptionBits options = 0); - - virtual IOAudioDevice *getAudioDevice(); - - /*! - * @function addAudioControl - * @abstract Adds a newly created IOAudioControl instance to the port. - * @discussion This method is responsible for starting the new IOAudioControl and adding it to the internal - * audioControls array. - * @param control A newly created IOAudioControl instance that should belong to this port. - * @result Returns true on successfully staring the IOAudioControl. - */ - virtual IOReturn addAudioControl(IOAudioControl *control); - - /*! - * @function deactivateAudioControls - * @abstract Called to shut down all of the audio controls for this port. - * @discussion This will stop all of the audio controls and release them so that the instances may be - * freed. This is called from the free() method. - */ - virtual void deactivateAudioControls(); - -protected: - virtual void setType(UInt32 portType); - virtual void setSubType(UInt32 subType); - virtual void setName(const char *name); -}; - -#endif /* _IOKIT_IOAUDIOPORT_H */ diff --git a/i386/include/IOKit/audio/IOAudioSelectorControl.h b/i386/include/IOKit/audio/IOAudioSelectorControl.h deleted file mode 100644 index 8687810..0000000 --- a/i386/include/IOKit/audio/IOAudioSelectorControl.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOAUDIOSELECTORCONTROL_H -#define _IOKIT_IOAUDIOSELECTORCONTROL_H - -#ifndef IOAUDIOFAMILY_SELF_BUILD -#include <IOKit/audio/IOAudioControl.h> -#else -#include "IOAudioControl.h" -#endif - -class OSString; -class OSArray; - -class IOAudioSelectorControl : public IOAudioControl -{ - OSDeclareDefaultStructors(IOAudioSelectorControl) - -protected: - - OSArray *availableSelections; - -protected: - struct ExpansionData { }; - - ExpansionData *reserved; - -public: - static IOAudioSelectorControl *createOutputSelector(SInt32 initialValue, - UInt32 channelID, - const char *channelName = 0, - UInt32 cntrlID = 0); - static IOAudioSelectorControl *createOutputClockSelector(SInt32 initialValue, - UInt32 channelID, - UInt32 clockSource, - const char *channelName = 0, - UInt32 cntrlID = 0); - static IOAudioSelectorControl *createInputClockSelector(SInt32 initialValue, - UInt32 channelID, - UInt32 clockSource, - const char *channelName = 0, - UInt32 cntrlID = 0); - - // OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 0); - virtual IOReturn removeAvailableSelection(SInt32 selectionValue); - // OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 1); - virtual IOReturn replaceAvailableSelection(SInt32 selectionValue, const char *selectionDescription); - // OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 2); - virtual IOReturn replaceAvailableSelection(SInt32 selectionValue, OSString *selectionDescription); - -private: - OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 0); - OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 1); - OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 2); - - OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 3); - OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 4); - OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 5); - OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 6); - OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 7); - OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 8); - OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 9); - OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 10); - OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 11); - OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 12); - OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 13); - OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 14); - OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 15); - -public: - static IOAudioSelectorControl *create(SInt32 initialValue, - UInt32 channelID, - const char *channelName = 0, - UInt32 cntrlID = 0, - UInt32 subType = 0, - UInt32 usage = 0); - - static IOAudioSelectorControl *createInputSelector(SInt32 initialValue, - UInt32 channelID, - const char *channelName = 0, - UInt32 cntrlID = 0); - - virtual bool init(SInt32 initialValue, - UInt32 channelID, - const char *channelName = 0, - UInt32 cntrlID = 0, - UInt32 subType = 0, - UInt32 usage = 0, - OSDictionary *properties = 0); - - virtual void free(); - - virtual IOReturn addAvailableSelection(SInt32 selectionValue, const char *selectionDescription); - virtual IOReturn addAvailableSelection(SInt32 selectionValue, OSString *selectionDescription); - - virtual bool valueExists(SInt32 selectorValue); - - virtual IOReturn validateValue(OSObject *newValue); - -}; - -#endif /* _IOKIT_IOAUDIOSELECTORCONTROL_H */ diff --git a/i386/include/IOKit/audio/IOAudioStream.h b/i386/include/IOKit/audio/IOAudioStream.h deleted file mode 100644 index 07f40be..0000000 --- a/i386/include/IOKit/audio/IOAudioStream.h +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOAUDIOSTREAM_H -#define _IOKIT_IOAUDIOSTREAM_H - -#include <IOKit/IOService.h> -#ifndef IOAUDIOFAMILY_SELF_BUILD -#include <IOKit/audio/IOAudioEngine.h> -#include <IOKit/audio/IOAudioTypes.h> -#else -#include "IOAudioEngine.h" -#include "IOAudioTypes.h" -#endif - -class OSSymbol; -class OSArray; -class OSDictionary; -class OSSet; - -class IOCommandGate; -class IOAudioControl; - -typedef struct IOAudioClientBuffer; -typedef struct IOAudioStreamFormatDesc; - -/*! - * @class IOAudioStream - * @abstract This class wraps a single sample buffer in an audio driver. - * @discussion An IOAudioStream represents one hardware sample buffer as well as the direction - * of that buffer, the mix buffer that multiple clients mix into as well as a list of - * all of the formats to which this buffer can be set. - * - * When an IOAudioEngine is created during init time in the driver, an IOAudioStream must be - * created for each sample buffer in the device. Typically, the sample buffer will be interleaved - * (or single channel), as a non-interleaved buffer should be divided into multiple single-channel - * buffers (and multiple IOAudioStreams). - * - * Additionally, when an IOAudioStream is created it must have all of the possible formats (and - * allowed sample rates for each format) set and must have the currently set format specified - * (addAvailableFormat() and setFormat()). - */ - -class IOAudioStream : public IOService -{ - OSDeclareDefaultStructors(IOAudioStream) - - friend class IOAudioEngine; - friend class IOAudioEngineUserClient; - -public: - - typedef IOReturn (*AudioIOFunction)(const void *mixBuf, void *sampleBuf, UInt32 firstSampleFrame, UInt32 numSampleFrames, const IOAudioStreamFormat *streamFormat, IOAudioStream *audioStream); - - static const OSSymbol *gDirectionKey; - static const OSSymbol *gNumChannelsKey; - static const OSSymbol *gSampleFormatKey; - static const OSSymbol *gNumericRepresentationKey; - static const OSSymbol *gBitDepthKey; - static const OSSymbol *gBitWidthKey; - static const OSSymbol *gAlignmentKey; - static const OSSymbol *gByteOrderKey; - static const OSSymbol *gIsMixableKey; - static const OSSymbol *gDriverTagKey; - static const OSSymbol *gMinimumSampleRateKey; - static const OSSymbol *gMaximumSampleRateKey; - - static void initKeys(); - - static OSDictionary *createDictionaryFromFormat(const IOAudioStreamFormat *streamFormat, const IOAudioStreamFormatExtension *formatExtension, OSDictionary *formatDict = 0); - static IOAudioStreamFormat *createFormatFromDictionary(const OSDictionary *formatDict, IOAudioStreamFormat *streamFormat = 0, IOAudioStreamFormatExtension *formatExtension = 0); - - IOAudioEngine *audioEngine; - IOWorkLoop *workLoop; - IOCommandGate *commandGate; - IORecursiveLock *streamIOLock; - - UInt32 numClients; - - IOAudioStreamDirection direction; - - IOAudioStreamFormat format; - IOAudioStreamFormatDesc *availableFormats; - OSArray *availableFormatDictionaries; - UInt32 numAvailableFormats; - - UInt32 startingChannelID; - UInt32 maxNumChannels; - - void *sampleBuffer; - UInt32 sampleBufferSize; - - void *mixBuffer; - UInt32 mixBufferSize; - bool streamAllocatedMixBuffer; - - AudioIOFunction *audioIOFunctions; - UInt32 numIOFunctions; - - bool streamAvailable; - - OSSet *defaultAudioControls; - - IOAudioEnginePosition startingPosition; - IOAudioEnginePosition clippedPosition; - - IOAudioClientBuffer *clientBufferListStart; - IOAudioClientBuffer *clientBufferListEnd; - - IOAudioClientBuffer *userClientList; - -protected: - - struct ExpansionData { - IOAudioStreamFormatExtension streamFormatExtension; - UInt32 mSampleFramesReadByEngine; - IOReturn mClipOutputStatus; - }; - - ExpansionData *reserved; - -public: -// New code added here: - // OSMetaClassDeclareReservedUsed(IOAudioStream, 0); - virtual const IOAudioStreamFormatExtension *getFormatExtension(); - // OSMetaClassDeclareReservedUsed(IOAudioStream, 1); - virtual IOReturn setFormat(const IOAudioStreamFormat *streamFormat, const IOAudioStreamFormatExtension *formatExtension, bool callDriver = true); - // OSMetaClassDeclareReservedUsed(IOAudioStream, 2); - virtual IOReturn setFormat(const IOAudioStreamFormat *streamFormat, const IOAudioStreamFormatExtension *formatExtension, OSDictionary *formatDict, bool callDriver = true); - // OSMetaClassDeclareReservedUsed(IOAudioStream, 3); - virtual void addAvailableFormat(const IOAudioStreamFormat *streamFormat, const IOAudioStreamFormatExtension *formatExtension, const IOAudioSampleRate *minRate, const IOAudioSampleRate *maxRate, const AudioIOFunction *ioFunctionList = NULL, UInt32 numFunctions = 0); - // OSMetaClassDeclareReservedUsed(IOAudioStream, 4); - virtual void addAvailableFormat(const IOAudioStreamFormat *streamFormat, const IOAudioStreamFormatExtension *formatExtension, const IOAudioSampleRate *minRate, const IOAudioSampleRate *maxRate, AudioIOFunction ioFunction); - // OSMetaClassDeclareReservedUsed(IOAudioStream, 5); - virtual bool validateFormat(IOAudioStreamFormat *streamFormat, IOAudioStreamFormatExtension *formatExtension, IOAudioStreamFormatDesc *formatDesc); - // OSMetaClassDeclareReservedUsed(IOAudioStream, 6); - virtual void setTerminalType(const UInt32 terminalType); - // OSMetaClassDeclareReservedUsed(IOAudioStream, 7); - virtual IOReturn mixOutputSamples(const void *sourceBuf, void *mixBuf, UInt32 firstSampleFrame, UInt32 numSampleFrames, const IOAudioStreamFormat *streamFormat, IOAudioStream *audioStream); - // OSMetaClassDeclareReservedUsed(IOAudioStream, 8); - virtual void setSampleLatency(UInt32 numSamples); - // OSMetaClassDeclareReservedUsed(IOAudioStream, 9); - virtual bool validateFormat(IOAudioStreamFormat *streamFormat, IOAudioStreamFormatExtension *formatExtension, IOAudioStreamFormatDesc *formatDesc, const IOAudioSampleRate *sampleRate); - // OSMetaClassDeclareReservedUsed(IOAudioStream, 10); - virtual UInt32 getNumSampleFramesRead(); - // OSMetaClassDeclareReservedUsed(IOAudioStream, 11); - virtual void setDefaultNumSampleFramesRead(UInt32); - -private: - OSMetaClassDeclareReservedUsed(IOAudioStream, 0); - OSMetaClassDeclareReservedUsed(IOAudioStream, 1); - OSMetaClassDeclareReservedUsed(IOAudioStream, 2); - OSMetaClassDeclareReservedUsed(IOAudioStream, 3); - OSMetaClassDeclareReservedUsed(IOAudioStream, 4); - OSMetaClassDeclareReservedUsed(IOAudioStream, 5); - OSMetaClassDeclareReservedUsed(IOAudioStream, 6); - OSMetaClassDeclareReservedUsed(IOAudioStream, 7); - OSMetaClassDeclareReservedUsed(IOAudioStream, 8); - OSMetaClassDeclareReservedUsed(IOAudioStream, 9); - OSMetaClassDeclareReservedUsed(IOAudioStream, 10); - OSMetaClassDeclareReservedUsed(IOAudioStream, 11); - - OSMetaClassDeclareReservedUnused(IOAudioStream, 12); - OSMetaClassDeclareReservedUnused(IOAudioStream, 13); - OSMetaClassDeclareReservedUnused(IOAudioStream, 14); - OSMetaClassDeclareReservedUnused(IOAudioStream, 15); - OSMetaClassDeclareReservedUnused(IOAudioStream, 16); - OSMetaClassDeclareReservedUnused(IOAudioStream, 17); - OSMetaClassDeclareReservedUnused(IOAudioStream, 18); - OSMetaClassDeclareReservedUnused(IOAudioStream, 19); - OSMetaClassDeclareReservedUnused(IOAudioStream, 20); - OSMetaClassDeclareReservedUnused(IOAudioStream, 21); - OSMetaClassDeclareReservedUnused(IOAudioStream, 22); - OSMetaClassDeclareReservedUnused(IOAudioStream, 23); - OSMetaClassDeclareReservedUnused(IOAudioStream, 24); - OSMetaClassDeclareReservedUnused(IOAudioStream, 25); - OSMetaClassDeclareReservedUnused(IOAudioStream, 26); - OSMetaClassDeclareReservedUnused(IOAudioStream, 27); - OSMetaClassDeclareReservedUnused(IOAudioStream, 28); - OSMetaClassDeclareReservedUnused(IOAudioStream, 29); - OSMetaClassDeclareReservedUnused(IOAudioStream, 30); - OSMetaClassDeclareReservedUnused(IOAudioStream, 31); - OSMetaClassDeclareReservedUnused(IOAudioStream, 32); - OSMetaClassDeclareReservedUnused(IOAudioStream, 33); - OSMetaClassDeclareReservedUnused(IOAudioStream, 34); - OSMetaClassDeclareReservedUnused(IOAudioStream, 35); - OSMetaClassDeclareReservedUnused(IOAudioStream, 36); - OSMetaClassDeclareReservedUnused(IOAudioStream, 37); - OSMetaClassDeclareReservedUnused(IOAudioStream, 38); - OSMetaClassDeclareReservedUnused(IOAudioStream, 39); - OSMetaClassDeclareReservedUnused(IOAudioStream, 40); - OSMetaClassDeclareReservedUnused(IOAudioStream, 41); - OSMetaClassDeclareReservedUnused(IOAudioStream, 42); - OSMetaClassDeclareReservedUnused(IOAudioStream, 43); - OSMetaClassDeclareReservedUnused(IOAudioStream, 44); - OSMetaClassDeclareReservedUnused(IOAudioStream, 45); - OSMetaClassDeclareReservedUnused(IOAudioStream, 46); - OSMetaClassDeclareReservedUnused(IOAudioStream, 47); - -public: - virtual bool initWithAudioEngine(IOAudioEngine *engine, IOAudioStreamDirection dir, UInt32 startChannelID, const char *streamDescription = NULL, OSDictionary *properties = 0); - virtual void free(); - - virtual void stop(IOService *provider); - - virtual IOWorkLoop *getWorkLoop() const; - - virtual IOReturn setProperties(OSObject *properties); - - virtual IOAudioStreamDirection getDirection(); - - virtual void setSampleBuffer(void *buffer, UInt32 size); - virtual void *getSampleBuffer(); - virtual UInt32 getSampleBufferSize(); - - virtual void setMixBuffer(void *buffer, UInt32 size); - virtual void *getMixBuffer(); - virtual UInt32 getMixBufferSize(); - - virtual void numSampleFramesPerBufferChanged(); - - virtual void clearSampleBuffer(); - - virtual void setIOFunction(AudioIOFunction ioFunction); - virtual void setIOFunctionList(const AudioIOFunction *ioFunctionList, UInt32 numFunctions); - - virtual const IOAudioStreamFormat *getFormat(); - static IOReturn setFormatAction(OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4); - virtual IOReturn setFormat(const IOAudioStreamFormat *streamFormat, bool callDriver = true); - virtual IOReturn setFormat(OSDictionary *formatDict); - virtual IOReturn setFormat(const IOAudioStreamFormat *streamFormat, OSDictionary *formatDict, bool callDriver = true); - virtual IOReturn hardwareFormatChanged(const IOAudioStreamFormat *streamFormat); - virtual void addAvailableFormat(const IOAudioStreamFormat *streamFormat, const IOAudioSampleRate *minRate, const IOAudioSampleRate *maxRate, const AudioIOFunction *ioFunctionList = NULL, UInt32 numFunctions = 0); - virtual void addAvailableFormat(const IOAudioStreamFormat *streamFormat, const IOAudioSampleRate *minRate, const IOAudioSampleRate *maxRate, AudioIOFunction ioFunction); - virtual void clearAvailableFormats(); - virtual bool validateFormat(IOAudioStreamFormat *streamFormat, IOAudioStreamFormatDesc *formatDesc); - - virtual UInt32 getStartingChannelID(); - virtual UInt32 getMaxNumChannels(); - - virtual void setStreamAvailable(bool available); - virtual bool getStreamAvailable(); - - virtual IOReturn addDefaultAudioControl(IOAudioControl *defaultAudioControl); - virtual void removeDefaultAudioControls(); - -protected: - virtual void lockStreamForIO(); - virtual void unlockStreamForIO(); - - virtual void updateNumClients(); - virtual IOReturn addClient(IOAudioClientBuffer *clientBuffer); - virtual void removeClient(IOAudioClientBuffer *clientBuffer); - virtual UInt32 getNumClients(); - - virtual IOReturn processOutputSamples(IOAudioClientBuffer *clientBuffer, UInt32 firstSampleFrame, UInt32 loopCount, bool samplesAvailable); - virtual IOReturn readInputSamples(IOAudioClientBuffer *clientBuffer, UInt32 firstSampleFrame); - - virtual void resetClipInfo(); - virtual void clipIfNecessary(); - virtual void clipOutputSamples(UInt32 startingSampleFrame, UInt32 numSampleFrames); - - virtual void setStartingChannelNumber(UInt32 channelNumber); - -private: - virtual void setDirection(IOAudioStreamDirection dir); - -}; - -#endif /* _IOKIT_IOAUDIOSTREAM_H */ diff --git a/i386/include/IOKit/audio/IOAudioToggleControl.h b/i386/include/IOKit/audio/IOAudioToggleControl.h deleted file mode 100644 index 95bfb4a..0000000 --- a/i386/include/IOKit/audio/IOAudioToggleControl.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOAUDIOTOGGLECONTROL_H -#define _IOKIT_IOAUDIOTOGGLECONTROL_H - -#ifndef IOAUDIOFAMILY_SELF_BUILD -#include <IOKit/audio/IOAudioControl.h> -#else -#include "IOAudioControl.h" -#endif - -/*! - * @class IOAudioToggleControl - */ - -class IOAudioToggleControl : public IOAudioControl -{ - OSDeclareDefaultStructors(IOAudioToggleControl) - -protected: - struct ExpansionData { }; - - ExpansionData *reserved; - -// New code added here -public: - /*! - * @function createPassThruMuteControl - * @abstract Allocates a new pass through mute control with the given attributes - * @param initialValue The initial value of the control - * @param channelID The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h. - * @param channelName An optional name for the channel. Common names are located in IOAudioPort.h. - * @param cntrlID An optional ID for the control that can be used to uniquely identify controls - * @result Returns a newly allocated and initialized mute IOAudioControl - */ - static IOAudioToggleControl *createPassThruMuteControl (bool initialValue, - UInt32 channelID, - const char *channelName, - UInt32 cntrlID); - -private: - OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 0); - OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 1); - OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 2); - OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 3); - OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 4); - OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 5); - OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 6); - OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 7); - OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 8); - OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 9); - OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 10); - OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 11); - OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 12); - OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 13); - OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 14); - OSMetaClassDeclareReservedUnused(IOAudioToggleControl, 15); - -public: - /*! - * @function create - * @abstract Allocates a new mute control with the given attributes - * @param initialValue The initial value of the control - * @param channelID The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h. - * @param channelName An optional name for the channel. Common names are located in IOAudioPort.h. - * @param cntrlID An optional ID for the control that can be used to uniquely identify controls - * @result Returns a newly allocated and initialized mute IOAudioControl - */ - static IOAudioToggleControl *create(bool initialValue, - UInt32 channelID, - const char *channelName = 0, - UInt32 cntrlID = 0, - UInt32 subType = 0, - UInt32 usage = 0); - - static IOAudioToggleControl *createMuteControl(bool initialValue, - UInt32 channelID, - const char *channelName = 0, - UInt32 cntrlID = 0, - UInt32 usage = 0); - - /*! - * @function init - * @abstract Initializes a newly allocated IOAudioToggleControl with the given attributes - * @param initialValue The initial value of the control - * @param channelID The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h. - * @param channelName An optional name for the channel. Common names are located in IOAudioPort.h. - * @param cntrlID An optional ID for the control that can be used to uniquely identify controls - * @result Returns truen on success - */ - virtual bool init(bool initialValue, - UInt32 channelID, - const char *channelName = 0, - UInt32 cntrlID = 0, - UInt32 subType = 0, - UInt32 usage = 0, - OSDictionary *properties = 0); - -}; - -#endif /* _IOKIT_IOAUDIOTOGGLECONTROL_H */ diff --git a/i386/include/IOKit/audio/IOAudioTypes.h b/i386/include/IOKit/audio/IOAudioTypes.h deleted file mode 100644 index 0526575..0000000 --- a/i386/include/IOKit/audio/IOAudioTypes.h +++ /dev/null @@ -1,661 +0,0 @@ -/* - * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOAUDIOTYPES_H -#define _IOKIT_IOAUDIOTYPES_H - -#include <libkern/OSTypes.h> -#include <mach/message.h> -#include <device/device_types.h> - - -/*! - * @enum IOAudioEngineMemory - * @abstract Used to identify the type of memory requested by a client process to be mapped into its process space - * @discussion This is the parameter to the type field of IOMapMemory when called on an IOAudioEngine. This is - * only intended for use by the Audio Device API library. - * @constant kIOAudioSampleBuffer This requests the IOAudioEngine's sample buffer - * @constant kIOAudioStatusBuffer This requests the IOAudioEngine's status buffer. It's type is IOAudioEngineStatus. - * @constant kIOAudioMixBuffer This requests the IOAudioEngine's mix buffer -*/ -typedef enum _IOAudioEngineMemory { - kIOAudioStatusBuffer = 0, - kIOAudioSampleBuffer = 1, - kIOAudioMixBuffer = 2, - kIOAudioBytesInInputBuffer = 3, - kIOAudioBytesInOutputBuffer = 4 -} IOAudioEngineMemory; - -/*! - * @enum IOAudioEngineCalls - * @abstract The set of constants passed to IOAudioEngineUserClient::getExternalMethodForIndex() when making calls - * from the IOAudioFamily user client code. - */ -typedef enum _IOAudioEngineCalls { - kIOAudioEngineCallRegisterClientBuffer = 0, - kIOAudioEngineCallUnregisterClientBuffer = 1, - kIOAudioEngineCallGetConnectionID = 2, - kIOAudioEngineCallStart = 3, - kIOAudioEngineCallStop = 4, - kIOAudioEngineCallGetNearestStartTime = 5 -} IOAudioEngineCalls; - -/*! @defined kIOAudioEngineNumCalls The number of elements in the IOAudioEngineCalls enum. */ -#define kIOAudioEngineNumCalls 6 - -typedef enum _IOAudioEngineTraps { - kIOAudioEngineTrapPerformClientIO = 0 -} IOAudioEngineTraps; - -typedef enum _IOAudioEngineNotifications { - kIOAudioEngineAllNotifications = 0, - kIOAudioEngineStreamFormatChangeNotification = 1, - kIOAudioEngineChangeNotification = 2, - kIOAudioEngineStartedNotification = 3, - kIOAudioEngineStoppedNotification = 4, - kIOAudioEnginePausedNotification = 5, - kIOAudioEngineResumedNotification = 6 -} IOAudioEngineNotifications; - -/*! - * @enum IOAudioEngineState - * @abstract Represents the state of an IOAudioEngine - * @constant kIOAudioEngineRunning The IOAudioEngine is currently running - it is transferring data to or - * from the device. - * @constant kIOAudioEngineStopped The IOAudioEngine is currently stopped - no activity is occurring. - */ - -typedef enum _IOAudioEngineState { - kIOAudioEngineStopped = 0, - kIOAudioEngineRunning = 1, - kIOAudioEnginePaused = 2, - kIOAudioEngineResumed = 3 -} IOAudioEngineState; - - -/*! - * @typedef IOAudioEngineStatus - * @abstract Shared-memory structure giving audio engine status - * @discussion - * @field fVersion Indicates version of this structure - * @field fCurrentLoopCount Number of times around the ring buffer since the audio engine started - * @field fLastLoopTime Timestamp of the last time the ring buffer wrapped - * @field fEraseHeadSampleFrame Location of the erase head in sample frames - erased up to but not - * including the given sample frame - */ - -typedef struct _IOAudioEngineStatus { - UInt32 fVersion; - volatile UInt32 fCurrentLoopCount; - volatile AbsoluteTime fLastLoopTime; - volatile UInt32 fEraseHeadSampleFrame; -} IOAudioEngineStatus; - -#define kIOAudioEngineCurrentStatusStructVersion 2 - -typedef struct _IOAudioStreamFormat { - UInt32 fNumChannels; - UInt32 fSampleFormat; - UInt32 fNumericRepresentation; - UInt8 fBitDepth; - UInt8 fBitWidth; - UInt8 fAlignment; - UInt8 fByteOrder; - UInt8 fIsMixable; - UInt32 fDriverTag; -} IOAudioStreamFormat; - -#define kFormatExtensionInvalidVersion 0 -#define kFormatExtensionCurrentVersion 1 - -typedef struct _IOAudioStreamFormatExtension { - UInt32 fVersion; - UInt32 fFlags; - UInt32 fFramesPerPacket; - UInt32 fBytesPerPacket; -} IOAudioStreamFormatExtension; - -typedef struct _IOAudioBufferDataDescriptor { - UInt32 fActualDataByteSize; - UInt32 fActualNumSampleFrames; - UInt32 fTotalDataByteSize; - UInt32 fNominalDataByteSize; - UInt8 fData[1]; -} IOAudioBufferDataDescriptor; - -#define kStreamDataDescriptorInvalidVersion 0 -#define kStreamDataDescriptorCurrentVersion 1 - -typedef struct _IOAudioStreamDataDescriptor { - UInt32 fVersion; - UInt32 fNumberOfStreams; - UInt32 fStreamLength[1]; // Array with fNumberOfStreams number of entries -} IOAudioStreamDataDescriptor; - -typedef struct _IOAudioSampleIntervalDescriptor { - UInt32 sampleIntervalHi; - UInt32 sampleIntervalLo; -} IOAudioSampleIntervalDescriptor; - -/*! - @struct SMPTETime - @abstract A structure for holding a SMPTE time. - @field fSubframes - The number of subframes in the full message. - @field fSubframeDivisor - The number of subframes per frame (typically 80). - @field fCounter - The total number of messages received. - @field fType - The kind of SMPTE time using the SMPTE time type constants. - @field fFlags - A set of flags that indicate the SMPTE state. - @field fHours - The number of hourse in the full message. - @field fMinutes - The number of minutes in the full message. - @field fSeconds - The number of seconds in the full message. - @field fFrames - The number of frames in the full message. -*/ -typedef struct _IOAudioSMPTETime -{ - SInt16 fSubframes; - SInt16 fSubframeDivisor; - UInt32 fCounter; - UInt32 fType; - UInt32 fFlags; - SInt16 fHours; - SInt16 fMinutes; - SInt16 fSeconds; - SInt16 fFrames; - -} IOAudioSMPTETime; - -// constants describing SMPTE types (taken from the MTC spec) -enum -{ - kIOAudioSMPTETimeType24 = 0, - kIOAudioSMPTETimeType25 = 1, - kIOAudioSMPTETimeType30Drop = 2, - kIOAudioSMPTETimeType30 = 3, - kIOAudioSMPTETimeType2997 = 4, - kIOAudioSMPTETimeType2997Drop = 5 -}; - -// flags describing a SMPTE time stamp -enum -{ - kIOAudioSMPTETimeValid = (1L << 0), // the full time is valid - kIOAudioSMPTETimeRunning = (1L << 1) // time is running -}; - -// A struct for encapsulating the parts of a time stamp. The flags -// say which fields are valid. -typedef struct _IOAudioTimeStamp -{ - UInt64 fSampleTime; // the absolute sample time, was a Float64 - UInt64 fHostTime; // the host's root timebase's time - UInt64 fRateScalar; // the system rate scalar, was a Float64 - UInt64 fWordClockTime; // the word clock time - IOAudioSMPTETime fSMPTETime; // the SMPTE time - UInt32 fFlags; // the flags indicate which fields are valid - UInt32 fReserved; // reserved, pads the structure out to force 8 byte alignment -} IOAudioTimeStamp; - -// flags for the AudioTimeStamp sturcture -enum -{ - kIOAudioTimeStampSampleTimeValid = (1L << 0), - kIOAudioTimeStampHostTimeValid = (1L << 1), - kIOAudioTimeStampRateScalarValid = (1L << 2), - kIOAudioTimeStampWordClockTimeValid = (1L << 3), - kIOAudioTimeStampSMPTETimeValid = (1L << 4) -}; - -// Some commonly used combinations of timestamp flags -enum -{ - kIOAudioTimeStampSampleHostTimeValid = (kIOAudioTimeStampSampleTimeValid | kIOAudioTimeStampHostTimeValid) -}; - -/*! -* @enum IOAudioStreamDirection - * @abstract Represents the direction of an IOAudioStream - * @constant kIOAudioStreamDirectionOutput Output buffer - * @constant kIOAudioStreamDirectionInput Input buffer - */ - -typedef enum _IOAudioStreamDirection { - kIOAudioStreamDirectionOutput = 0, - kIOAudioStreamDirectionInput = 1 -} IOAudioStreamDirection; - -enum { - kIOAudioDeviceCanBeDefaultNothing = 0, - kIOAudioDeviceCanBeDefaultInput = (1L << 0), - kIOAudioDeviceCanBeDefaultOutput = (1L << 1), - kIOAudioDeviceCanBeSystemOutput = (1L << 2) -}; - -/*! - * @defined kIOAudioEngineDefaultMixBufferSampleSize - */ - -#define kIOAudioEngineDefaultMixBufferSampleSize sizeof(float) - -/* The following are for use only by the IOKit.framework audio family code */ - -/*! - * @enum IOAudioControlCalls - * @abstract The set of constants passed to IOAudioControlUserClient::getExternalMethodForIndex() when making calls - * from the IOAudioFamily user client code. - * @constant kIOAudioControlCallSetValue Used to set the value of an IOAudioControl. - * @constant kIOAudioControlCallGetValue Used to get the value of an IOAudioControl. - */ -typedef enum _IOAudioControlCalls { - kIOAudioControlCallSetValue = 0, - kIOAudioControlCallGetValue = 1 -} IOAudioControlCalls; - -/*! @defined kIOAudioControlNumCalls The number of elements in the IOAudioControlCalls enum. */ -#define kIOAudioControlNumCalls 2 - -/*! - * @enum IOAudioControlNotifications - * @abstract The set of constants passed in the type field of IOAudioControlUserClient::registerNotificaitonPort(). - * @constant kIOAudioControlValueChangeNotification Used to request value change notifications. - * @constant kIOAudioControlRangeChangeNotification Used to request range change notifications. - */ -typedef enum _IOAudioControlNotifications { - kIOAudioControlValueChangeNotification = 0, - kIOAudioControlRangeChangeNotification = 1 -} IOAudioControlNotifications; - -/*! - * @struct IOAudioNotificationMessage - * @abstract Used in the mach message for IOAudio notifications. - * @field messageHeader Standard mach message header - * @field ref The param passed to registerNotificationPort() in refCon. - */ -typedef struct _IOAudioNotificationMessage { - mach_msg_header_t messageHeader; - UInt32 type; - UInt32 ref; - void * sender; -} IOAudioNotificationMessage; - -typedef struct _IOAudioSampleRate { - UInt32 whole; - UInt32 fraction; -} IOAudioSampleRate; - -#define kNoIdleAudioPowerDown 0xffffffffffffffffULL - -enum { - kIOAudioPortTypeOutput = 'outp', - kIOAudioPortTypeInput = 'inpt', - kIOAudioPortTypeMixer = 'mixr', - kIOAudioPortTypePassThru = 'pass', - kIOAudioPortTypeProcessing = 'proc' -}; - -enum { - kIOAudioOutputPortSubTypeInternalSpeaker = 'ispk', - kIOAudioOutputPortSubTypeExternalSpeaker = 'espk', - kIOAudioOutputPortSubTypeHeadphones = 'hdpn', - kIOAudioOutputPortSubTypeLine = 'line', - kIOAudioOutputPortSubTypeSPDIF = 'spdf', - - kIOAudioInputPortSubTypeInternalMicrophone = 'imic', - kIOAudioInputPortSubTypeExternalMicrophone = 'emic', - kIOAudioInputPortSubTypeCD = 'cd ', - kIOAudioInputPortSubTypeLine = 'line', - kIOAudioInputPortSubTypeSPDIF = 'spdf' -}; - -enum { - kIOAudioControlTypeLevel = 'levl', - kIOAudioControlTypeToggle = 'togl', - kIOAudioControlTypeJack = 'jack', - kIOAudioControlTypeSelector = 'slct' -}; - -enum { - kIOAudioLevelControlSubTypeVolume = 'vlme', - kIOAudioLevelControlSubTypeLFEVolume = 'subv', - kIOAudioLevelControlSubTypePRAMVolume = 'pram', - kIOAudioToggleControlSubTypeMute = 'mute', - kIOAudioToggleControlSubTypeSolo = 'solo', - kIOAudioToggleControlSubTypeLFEMute = 'subm', - kIOAudioToggleControlSubTypeiSubAttach = 'atch', - kIOAudioSelectorControlSubTypeOutput = 'outp', - kIOAudioSelectorControlSubTypeInput = 'inpt', - kIOAudioSelectorControlSubTypeClockSource = 'clck', - kIOAudioSelectorControlSubTypeDestination = 'dest', - kIOAudioSelectorControlSubTypeChannelNominalLineLevel = 'nlev', - kIOAudioSelectorControlSubTypeChannelLevelPlus4dBu = '4dbu', - kIOAudioSelectorControlSubTypeChannelLevelMinus10dBV = '10db', - kIOAudioSelectorControlSubTypeChannelLevelMinus20dBV = '20db', - kIOAudioSelectorControlSubTypeChannelLevelMicLevel = 'micl', - kIOAudioSelectorControlSubTypeChannelLevelInstrumentLevel = 'istl' -}; - -enum { - kIOAudioControlUsageOutput = 'outp', - kIOAudioControlUsageInput = 'inpt', - kIOAudioControlUsagePassThru = 'pass', - kIOAudioControlUsageCoreAudioProperty = 'prop' -}; - -enum { - kIOAudioControlChannelNumberInactive = -1, - kIOAudioControlChannelIDAll = 0, - kIOAudioControlChannelIDDefaultLeft = 1, - kIOAudioControlChannelIDDefaultRight = 2, - kIOAudioControlChannelIDDefaultCenter = 3, - kIOAudioControlChannelIDDefaultLeftRear = 4, - kIOAudioControlChannelIDDefaultRightRear = 5, - kIOAudioControlChannelIDDefaultSub = 6, - kIOAudioControlChannelIDDefaultFrontLeftCenter = 7, - kIOAudioControlChannelIDDefaultFrontRightCenter = 8, - kIOAudioControlChannelIDDefaultRearCenter = 9, - kIOAudioControlChannelIDDefaultSurroundLeft = 10, - kIOAudioControlChannelIDDefaultSurroundRight = 11 -}; - -enum { - kIOAudioSelectorControlSelectionValueNone = 'none', - - // Output-specific selection IDs - kIOAudioSelectorControlSelectionValueInternalSpeaker = 'ispk', - kIOAudioSelectorControlSelectionValueExternalSpeaker = 'espk', - kIOAudioSelectorControlSelectionValueHeadphones = 'hdpn', - - // Input-specific selection IDs - kIOAudioSelectorControlSelectionValueInternalMicrophone = 'imic', - kIOAudioSelectorControlSelectionValueExternalMicrophone = 'emic', - kIOAudioSelectorControlSelectionValueCD = 'cd ', - - // Common selection IDs - kIOAudioSelectorControlSelectionValueLine = 'line', - kIOAudioSelectorControlSelectionValueSPDIF = 'spdf' -}; - -enum { - kIOAudioStreamSampleFormatLinearPCM = 'lpcm', - kIOAudioStreamSampleFormatIEEEFloat = 'ieee', - kIOAudioStreamSampleFormatALaw = 'alaw', - kIOAudioStreamSampleFormatMuLaw = 'ulaw', - kIOAudioStreamSampleFormatMPEG = 'mpeg', - kIOAudioStreamSampleFormatAC3 = 'ac-3', - kIOAudioStreamSampleFormat1937AC3 = 'cac3', - kIOAudioStreamSampleFormat1937MPEG1 = 'mpg1', - kIOAudioStreamSampleFormat1937MPEG2 = 'mpg2', - kIOAudioStreamSampleFormatTimeCode = 'time' // a stream of IOAudioTimeStamp structures that capture any incoming time code information -}; - -enum { - kIOAudioStreamNumericRepresentationSignedInt = 'sint', - kIOAudioStreamNumericRepresentationUnsignedInt = 'uint', - kIOAudioStreamNumericRepresentationIEEE754Float = 'flot' -}; - -enum { - kIOAudioClockSelectorTypeInternal = 'int ', - kIOAudioClockSelectorTypeExternal = 'ext ', - kIOAudioClockSelectorTypeAESEBU = 'asbu', - kIOAudioClockSelectorTypeTOSLink = 'tosl', - kIOAudioClockSelectorTypeSPDIF = 'spdf', - kIOAudioClockSelectorTypeADATOptical = 'adto', - kIOAudioClockSelectorTypeADAT9Pin = 'adt9', - kIOAudioClockSelectorTypeSMPTE = 'smpt', - kIOAudioClockSelectorTypeVideo = 'vdeo', - kIOAudioClockSelectorTypeControl = 'cnrl', - kIOAudioClockSelectorTypeOther = 'othr', -}; - -enum { - kIOAudioStreamAlignmentLowByte = 0, - kIOAudioStreamAlignmentHighByte = 1 -}; - -enum { - kIOAudioStreamByteOrderBigEndian = 0, - kIOAudioStreamByteOrderLittleEndian = 1 -}; - -enum { - kIOAudioLevelControlNegativeInfinity = 0xffffffff -}; - -enum { - kIOAudioNewClockDomain = 0xffffffff -}; - -// Device connection types -#ifndef __OPEN_SOURCE__ -// <rdar://7130813> Added kIOAudioDeviceTransportTypeDisplayPort -#endif -enum { - kIOAudioDeviceTransportTypeBuiltIn = 'bltn', - kIOAudioDeviceTransportTypePCI = 'pci ', - kIOAudioDeviceTransportTypeUSB = 'usb ', - kIOAudioDeviceTransportTypeFireWire = '1394', - kIOAudioDeviceTransportTypeNetwork = 'ntwk', - kIOAudioDeviceTransportTypeWireless = 'wrls', - kIOAudioDeviceTransportTypeOther = 'othr', - kIOAudioDeviceTransportTypeBluetooth = 'blue', - kIOAudioDeviceTransportTypeVirtual = 'virt', - kIOAudioDeviceTransportTypeDisplayPort = 'dprt', - kIOAudioDeviceTransportTypeHdmi = 'hdmi' - -}; - -// types that go nowhere -enum { - OUTPUT_NULL = 0x0100, - INPUT_NULL = 0x0101 -}; - -// Input terminal types -enum { - INPUT_UNDEFINED = 0x0200, - INPUT_MICROPHONE = 0x0201, - INPUT_DESKTOP_MICROPHONE = 0x0202, - INPUT_PERSONAL_MICROPHONE = 0x0203, - INPUT_OMNIDIRECTIONAL_MICROPHONE = 0x0204, - INPUT_MICROPHONE_ARRAY = 0x0205, - INPUT_PROCESSING_MICROPHONE_ARRAY = 0x0206, - INPUT_MODEM_AUDIO = 0x207 -}; - -// Output terminal types -enum { - OUTPUT_UNDEFINED = 0x0300, - OUTPUT_SPEAKER = 0x0301, - OUTPUT_HEADPHONES = 0x0302, - OUTPUT_HEAD_MOUNTED_DISPLAY_AUDIO = 0x0303, - OUTPUT_DESKTOP_SPEAKER = 0x0304, - OUTPUT_ROOM_SPEAKER = 0x0305, - OUTPUT_COMMUNICATION_SPEAKER = 0x0306, - OUTPUT_LOW_FREQUENCY_EFFECTS_SPEAKER = 0x0307 -}; - -// Bi-directional terminal types -enum { - BIDIRECTIONAL_UNDEFINED = 0x0400, - BIDIRECTIONAL_HANDSET = 0x0401, - BIDIRECTIONAL_HEADSET = 0x0402, - BIDIRECTIONAL_SPEAKERPHONE_NO_ECHO_REDX = 0x0403, - BIDIRECTIONAL_ECHO_SUPPRESSING_SPEAKERPHONE = 0x0404, - BIDIRECTIONAL_ECHO_CANCELING_SPEAKERPHONE = 0x0405 -}; - -// Telephony terminal types -enum { - TELEPHONY_UNDEFINED = 0x0500, - TELEPHONY_PHONE_LINE = 0x0501, - TELEPHONY_TELEPHONE = 0x0502, - TELEPHONY_DOWN_LINE_PHONE = 0x0503 -}; - -// External terminal types -enum { - EXTERNAL_UNDEFINED = 0x0600, - EXTERNAL_ANALOG_CONNECTOR = 0x0601, - EXTERNAL_DIGITAL_AUDIO_INTERFACE = 0x0602, - EXTERNAL_LINE_CONNECTOR = 0x0603, - EXTERNAL_LEGACY_AUDIO_CONNECTOR = 0x0604, - EXTERNAL_SPDIF_INTERFACE = 0x0605, - EXTERNAL_1394_DA_STREAM = 0x0606, - EXTERNAL_1394_DV_STREAM_SOUNDTRACK = 0x0607, - EXTERNAL_ADAT = 0x0608, - EXTERNAL_TDIF = 0x0609, - EXTERNAL_MADI = 0x060A -}; - -// Embedded terminal types -enum { - EMBEDDED_UNDEFINED = 0x0700, - EMBEDDED_LEVEL_CALIBRATION_NOISE_SOURCE = 0x0701, - EMBEDDED_EQUALIZATION_NOISE = 0x0702, - EMBEDDED_CD_PLAYER = 0x0703, - EMBEDDED_DAT = 0x0704, - EMBEDDED_DCC = 0x0705, - EMBEDDED_MINIDISK = 0x0706, - EMBEDDED_ANALOG_TAPE = 0x0707, - EMBEDDED_PHONOGRAPH = 0x0708, - EMBEDDED_VCR_AUDIO = 0x0709, - EMBEDDED_VIDEO_DISC_AUDIO = 0x070A, - EMBEDDED_DVD_AUDIO = 0x070B, - EMBEDDED_TV_TUNER_AUDIO = 0x070C, - EMBEDDED_SATELLITE_RECEIVER_AUDIO = 0x070D, - EMBEDDED_CABLE_TUNER_AUDIO = 0x070E, - EMBEDDED_DSS_AUDIO = 0x070F, - EMBEDDED_RADIO_RECEIVER = 0x0710, - EMBEDDED_RADIO_TRANSMITTER = 0x0711, - EMBEDDED_MULTITRACK_RECORDER = 0x0712, - EMBEDDED_SYNTHESIZER = 0x0713 -}; - -// Processing terminal types -enum { - PROCESSOR_UNDEFINED = 0x0800, - PROCESSOR_GENERAL = 0x0801 -}; - -// Channel spatial position types - -#ifndef __OPEN_SOURCE__ -// <rdar://6868206> NOTE: the following are derived from CoreAudioTypes.h -#endif - -#define kIOAudioChannelLabel_Discrete_field_ba 16 -enum { - kIOAudioChannelLabel_Unknown = 0xFFFFFFFF, // unknown or unspecified other use - kIOAudioChannelLabel_Unused = 0, // channel is present, but has no intended use or destination - kIOAudioChannelLabel_UseCoordinates = 100, // channel is described by the mCoordinates fields. - - kIOAudioChannelLabel_Left = 1, - kIOAudioChannelLabel_Right = 2, - kIOAudioChannelLabel_Center = 3, - kIOAudioChannelLabel_LFEScreen = 4, - kIOAudioChannelLabel_LeftSurround = 5, // WAVE: "Back Left" - kIOAudioChannelLabel_RightSurround = 6, // WAVE: "Back Right" - kIOAudioChannelLabel_LeftCenter = 7, - kIOAudioChannelLabel_RightCenter = 8, - kIOAudioChannelLabel_CenterSurround = 9, // WAVE: "Back Center" or plain "Rear Surround" - kIOAudioChannelLabel_LeftSurroundDirect = 10, // WAVE: "Side Left" - kIOAudioChannelLabel_RightSurroundDirect = 11, // WAVE: "Side Right" - kIOAudioChannelLabel_TopCenterSurround = 12, - kIOAudioChannelLabel_VerticalHeightLeft = 13, // WAVE: "Top Front Left" - kIOAudioChannelLabel_VerticalHeightCenter = 14, // WAVE: "Top Front Center" - kIOAudioChannelLabel_VerticalHeightRight = 15, // WAVE: "Top Front Right" - - kIOAudioChannelLabel_TopBackLeft = 16, - kIOAudioChannelLabel_TopBackCenter = 17, - kIOAudioChannelLabel_TopBackRight = 18, - - kIOAudioChannelLabel_RearSurroundLeft = 33, - kIOAudioChannelLabel_RearSurroundRight = 34, - kIOAudioChannelLabel_LeftWide = 35, - kIOAudioChannelLabel_RightWide = 36, - kIOAudioChannelLabel_LFE2 = 37, - kIOAudioChannelLabel_LeftTotal = 38, // matrix encoded 4 channels - kIOAudioChannelLabel_RightTotal = 39, // matrix encoded 4 channels - kIOAudioChannelLabel_HearingImpaired = 40, - kIOAudioChannelLabel_Narration = 41, - kIOAudioChannelLabel_Mono = 42, - kIOAudioChannelLabel_DialogCentricMix = 43, - - kIOAudioChannelLabel_CenterSurroundDirect = 44, // back center, non diffuse - - kIOAudioChannelLabel_Haptic = 45, - - // first order ambisonic channels - kIOAudioChannelLabel_Ambisonic_W = 200, - kIOAudioChannelLabel_Ambisonic_X = 201, - kIOAudioChannelLabel_Ambisonic_Y = 202, - kIOAudioChannelLabel_Ambisonic_Z = 203, - - // Mid/Side Recording - kIOAudioChannelLabel_MS_Mid = 204, - kIOAudioChannelLabel_MS_Side = 205, - - // X-Y Recording - kIOAudioChannelLabel_XY_X = 206, - kIOAudioChannelLabel_XY_Y = 207, - - // other - kIOAudioChannelLabel_HeadphonesLeft = 301, - kIOAudioChannelLabel_HeadphonesRight = 302, - kIOAudioChannelLabel_ClickTrack = 304, - kIOAudioChannelLabel_ForeignLanguage = 305, - - // generic discrete channel - kIOAudioChannelLabel_Discrete = 400, - - // numbered discrete channel - kIOAudioChannelLabel_Discrete_0 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 0, - kIOAudioChannelLabel_Discrete_1 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 1, - kIOAudioChannelLabel_Discrete_2 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 2, - kIOAudioChannelLabel_Discrete_3 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 3, - kIOAudioChannelLabel_Discrete_4 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 4, - kIOAudioChannelLabel_Discrete_5 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 5, - kIOAudioChannelLabel_Discrete_6 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 6, - kIOAudioChannelLabel_Discrete_7 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 7, - kIOAudioChannelLabel_Discrete_8 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 8, - kIOAudioChannelLabel_Discrete_9 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 9, - kIOAudioChannelLabel_Discrete_10 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 10, - kIOAudioChannelLabel_Discrete_11 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 11, - kIOAudioChannelLabel_Discrete_12 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 12, - kIOAudioChannelLabel_Discrete_13 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 13, - kIOAudioChannelLabel_Discrete_14 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 14, - kIOAudioChannelLabel_Discrete_15 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 15, - kIOAudioChannelLabel_Discrete_65535 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 65535 -}; - - - -#endif /* _IOKIT_IOAUDIOTYPES_H */ diff --git a/i386/include/IOKit/avc/IOFireWireAVCCommand.h b/i386/include/IOKit/avc/IOFireWireAVCCommand.h deleted file mode 100644 index ff9850d..0000000 --- a/i386/include/IOKit/avc/IOFireWireAVCCommand.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 1998-2001 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _IOKIT_IOFireWireAVCCommand_H -#define _IOKIT_IOFireWireAVCCommand_H - -#include <IOKit/firewire/IOFWCommand.h> - -/*! @class IOFireWireAVCCommand -*/ -class IOFireWireAVCCommand : public IOFWCommand -{ - OSDeclareDefaultStructors(IOFireWireAVCCommand) - -protected: - IOFWCommand *fWriteCmd; - IOMemoryDescriptor *fMem; - const UInt8 *fCommand; - - UInt32 fCmdLen; - UInt8 *fResponse; - UInt32 *fResponseLen; - int fCurRetries; - int fMaxRetries; - - UInt32 fWriteGen; - UInt16 fWriteNodeID; - bool bypassRobustCommandResponseMatching; - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { - bool fStarted; - bool fSyncWakeupSignaled; - }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *fIOFireWireAVCCommandExpansion; - - static void writeDone(void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd); - - virtual IOReturn complete(IOReturn status); - virtual IOReturn execute(); - virtual void free(); - -public: - virtual bool init(IOFireWireNub *device, const UInt8 * command, UInt32 cmdLen, - UInt8 * response, UInt32 * responseLen); - virtual IOReturn reinit(IOFireWireNub *device, const UInt8 * command, UInt32 cmdLen, - UInt8 * response, UInt32 * responseLen); - - static IOFireWireAVCCommand *withNub(IOFireWireNub *device, const UInt8 * command, UInt32 cmdLen, - UInt8 * response, UInt32 * responseLen); - - static IOFireWireAVCCommand *withNub(IOFireWireNub *device, UInt32 generation, - const UInt8 * command, UInt32 cmdLen, UInt8 * response, UInt32 * responseLen); - - virtual UInt32 handleResponse(UInt16 nodeID, UInt32 len, const void *buf); - - virtual IOReturn resetInterimTimeout(); - - virtual UInt32 handleResponseWithSimpleMatching(UInt16 nodeID, UInt32 len, const void *buf); - - virtual IOReturn submit(bool queue = false); - -private: - OSMetaClassDeclareReservedUsed(IOFireWireAVCCommand, 0); - OSMetaClassDeclareReservedUnused(IOFireWireAVCCommand, 1); - OSMetaClassDeclareReservedUnused(IOFireWireAVCCommand, 2); - OSMetaClassDeclareReservedUnused(IOFireWireAVCCommand, 3); -}; - -#endif // _IOKIT_IOFireWireAVCCommand_H - diff --git a/i386/include/IOKit/avc/IOFireWireAVCConsts.h b/i386/include/IOKit/avc/IOFireWireAVCConsts.h deleted file mode 100644 index ae7a12c..0000000 --- a/i386/include/IOKit/avc/IOFireWireAVCConsts.h +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Copyright (c) 1998-2001 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _IOKIT_IOFIREWIREAVCCONSTS_H -#define _IOKIT_IOFIREWIREAVCCONSTS_H - -// Fields of AVC frame -typedef enum { - kAVCCommandResponse = 0, - kAVCAddress = 1, - kAVCOpcode = 2, - kAVCOperand0 = 3, - kAVCOperand1 = 4, - kAVCOperand2 = 5, - kAVCOperand3 = 6, - kAVCOperand4 = 7, - kAVCOperand5 = 8, - kAVCOperand6 = 9, - kAVCOperand7 = 10, - kAVCOperand8 = 11 -} IOAVCFrameFields; - -// Command/Response values -typedef enum { - kAVCControlCommand = 0x00, - kAVCStatusInquiryCommand = 0x01, - kAVCSpecificInquiryCommand = 0x02, - kAVCNotifyCommand = 0x03, - kAVCGeneralInquiryCommand = 0x04, - kAVCNotImplementedStatus = 0x08, - kAVCAcceptedStatus = 0x09, - kAVCRejectedStatus = 0x0a, - kAVCInTransitionStatus = 0x0b, - kAVCImplementedStatus = 0x0c, - kAVCChangedStatus = 0x0d, - kAVCInterimStatus = 0x0f -} IOAVCCommandResponse; - -// Opcodes -typedef enum { - - // Unit commands - kAVCPlugInfoOpcode = 0x02, - kAVCOutputPlugSignalFormatOpcode = 0x18, - kAVCInputPlugSignalFormatOpcode = 0x19, - kAVCUnitInfoOpcode = 0x30, - kAVCSubunitInfoOpcode = 0x31, - kAVCConnectionsOpcode = 0x22, - kAVCConnectOpcode = 0x24, - kAVCDisconnectOpcode = 0x25, - kAVCPowerOpcode = 0xB2, - kAVCSignalSourceOpcode = 0x1A, - - // Vendor dependent commands - kAVCVendorDependentOpcode = 0x00, - - // Subunit commands - kAVCOutputSignalModeOpcode = 0x78, - kAVCInputSignalModeOpcode = 0x79, - kAVCSignalModeSD525_60 = 0x00, - kAVCSignalModeSDL525_60 = 0x04, - kAVCSignalModeHD1125_60 = 0x08, - kAVCSignalModeSD625_50 = 0x80, - kAVCSignalModeSDL625_50 = 0x84, - kAVCSignalModeHD1250_50 = 0x88, - kAVCSignalModeDVCPro525_60 = 0x78, - kAVCSignalModeDVCPro625_50 = 0xf8, - - kAVCSignalModeDummyOperand = 0xff, - kAVCSignalModeMask_50 = 0x80, - kAVCSignalModeMask_STYPE = 0x7c, - kAVCSignalModeMask_SDL = 0x04, - kAVCSignalModeMask_DVCPro25 = 0x78 - -} IOAVCOpcodes; - -// Unit/Subunit types -typedef enum { - kAVCVideoMonitor = 0x00, - kAVCAudio = 0x01, - kAVCPrinter = 0x02, - kAVCDiskRecorder = 0x03, - kAVCTapeRecorder = 0x04, - kAVCTuner = 0x05, - kAVCVideoCamera = 0x07, - kAVCCameraStorage = 0x0b, - kAVCVendorUnique = 0x1c, - kAVCNumSubUnitTypes = 0x20 -} IOAVCUnitTypes; - -#define kAVCAllOpcodes 0xFF -#define kAVCAllSubunitsAndUnit 0xEE -#define kAVCMaxNumPlugs 31 -#define kAVCAnyAvailableIsochPlug 0x7F -#define kAVCAnyAvailableExternalPlug 0xFF -#define kAVCAnyAvailableSubunitPlug 0xFF -#define kAVCMultiplePlugs 0xFD -#define kAVCInvalidPlug 0xFE - - -#define IOAVCAddress(type, id) (((type) << 3) | (id)) -#define kAVCUnitAddress 0xff -#define IOAVCType(address) ((address) >> 3) -#define IOAVCId(address) ((address) & 0x7) - -// Macros for Plug Control Register field manipulation - -// Master control registers -#define kIOFWPCRDataRate FWBitRange(0,1) -#define kIOFWPCRDataRatePhase FWBitRangePhase(0,1) -#define kIOFWPCRExtension FWBitRange(8,15) -#define kIOFWPCRExtensionPhase FWBitRangePhase(8,15) -#define kIOFWPCRNumPlugs FWBitRange(27,31) -#define kIOFWPCRNumPlugsPhase FWBitRangePhase(27,31) - -// master output register -#define kIOFWPCRBroadcastBase FWBitRange(2,7) -#define kIOFWPCRBroadcastBasePhase FWBitRangePhase(2,7) - -// plug registers -#define kIOFWPCROnline FWBitRange(0,0) -#define kIOFWPCROnlinePhase FWBitRangePhase(0,0) -#define kIOFWPCRBroadcast FWBitRange(1,1) -#define kIOFWPCRBroadcastPhase FWBitRangePhase(1,1) -#define kIOFWPCRP2PCount FWBitRange(2,7) -#define kIOFWPCRP2PCountPhase FWBitRangePhase(2,7) -#define kIOFWPCRChannel FWBitRange(10,15) -#define kIOFWPCRChannelPhase FWBitRangePhase(10,15) - -// Extra fields for output plug registers -#define kIOFWPCROutputDataRate FWBitRange(16,17) -#define kIOFWPCROutputDataRatePhase FWBitRangePhase(16,17) -#define kIOFWPCROutputOverhead FWBitRange(18,21) -#define kIOFWPCROutputOverheadPhase FWBitRangePhase(18,21) -#define kIOFWPCROutputPayload FWBitRange(22,31) -#define kIOFWPCROutputPayloadPhase FWBitRangePhase(22,31) - -// async plug numbers - -enum -{ - kFWAVCAsyncPlug0 = 0xa0, - kFWAVCAsyncPlug1 = 0xa1, - kFWAVCAsyncPlug2 = 0xa2, - kFWAVCAsyncPlug3 = 0xa3, - kFWAVCAsyncPlug4 = 0xa4, - kFWAVCAsyncPlug5 = 0xa5, - kFWAVCAsyncPlug6 = 0xa6, - kFWAVCAsyncPlug7 = 0xa7, - kFWAVCAsyncPlug8 = 0xa8, - kFWAVCAsyncPlug9 = 0xa9, - kFWAVCAsyncPlug10 = 0xa1, - kFWAVCAsyncPlug11 = 0xab, - kFWAVCAsyncPlug12 = 0xac, - kFWAVCAsyncPlug13 = 0xad, - kFWAVCAsyncPlug14 = 0xae, - kFWAVCAsyncPlug15 = 0xaf, - kFWAVCAsyncPlug16 = 0xb0, - kFWAVCAsyncPlug17 = 0xb1, - kFWAVCAsyncPlug18 = 0xb2, - kFWAVCAsyncPlug19 = 0xb3, - kFWAVCAsyncPlug20 = 0xb4, - kFWAVCAsyncPlug21 = 0xb5, - kFWAVCAsyncPlug22 = 0xb6, - kFWAVCAsyncPlug23 = 0xb7, - kFWAVCAsyncPlug24 = 0xb8, - kFWAVCAsyncPlug25 = 0xb9, - kFWAVCAsyncPlug26 = 0xba, - kFWAVCAsyncPlug27 = 0xbb, - kFWAVCAsyncPlug28 = 0xbc, - kFWAVCAsyncPlug29 = 0xbd, - kFWAVCAsyncPlug30 = 0xbe, - kFWAVCAsyncPlugAny = 0xbf -}; - -enum -{ - kFWAVCStateBusSuspended = 0, - kFWAVCStateBusResumed = 1, - kFWAVCStatePlugReconnected = 2, - kFWAVCStatePlugDisconnected = 3, - kFWAVCStateDeviceRemoved = 4 -}; - -enum -{ - kFWAVCConsumerMode_MORE = 1, - kFWAVCConsumerMode_LAST = 4, - kFWAVCConsumerMode_LESS = 5, - kFWAVCConsumerMode_JUNK = 6, - kFWAVCConsumerMode_LOST = 7 -}; - -enum -{ - kFWAVCProducerMode_SEND = 5, - kFWAVCProducerMode_TOSS = 7 -}; - - -typedef enum -{ - IOFWAVCPlugSubunitSourceType, - IOFWAVCPlugSubunitDestType, - IOFWAVCPlugIsochInputType, - IOFWAVCPlugIsochOutputType, - IOFWAVCPlugAsynchInputType, - IOFWAVCPlugAsynchOutputType, - IOFWAVCPlugExternalInputType, - IOFWAVCPlugExternalOutputType -} IOFWAVCPlugTypes; - -typedef enum -{ - kIOFWAVCSubunitPlugMsgConnected, - kIOFWAVCSubunitPlugMsgDisconnected, - kIOFWAVCSubunitPlugMsgConnectedPlugModified, - kIOFWAVCSubunitPlugMsgSignalFormatModified -} IOFWAVCSubunitPlugMessages; - -// Some plug signal formats -#define kAVCPlugSignalFormatNTSCDV 0x80000000 -#define kAVCPlugSignalFormatPalDV 0x80800000 -#define kAVCPlugSignalFormatMPEGTS 0xA0000000 - -// Possible states of an AVCAsynchronousCommand -typedef enum -{ - kAVCAsyncCommandStatePendingRequest, - kAVCAsyncCommandStateRequestSent, - kAVCAsyncCommandStateRequestFailed, - kAVCAsyncCommandStateWaitingForResponse, - kAVCAsyncCommandStateReceivedInterimResponse, - kAVCAsyncCommandStateReceivedFinalResponse, - kAVCAsyncCommandStateTimeOutBeforeResponse, - kAVCAsyncCommandStateBusReset, - kAVCAsyncCommandStateOutOfMemory, - kAVCAsyncCommandStateCanceled -} IOFWAVCAsyncCommandState; - -#endif // _IOKIT_IOFIREWIREAVCCONSTS_H diff --git a/i386/include/IOKit/avc/IOFireWireAVCRequestSpace.h b/i386/include/IOKit/avc/IOFireWireAVCRequestSpace.h deleted file mode 100644 index c02797f..0000000 --- a/i386/include/IOKit/avc/IOFireWireAVCRequestSpace.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2001 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * - * IOFireWirePCRSpace.h - * - * Class to multiplex access to the FCP request address. - */ -#ifndef _IOKIT_IOFIREWIREAVCREQUESTSPACE_H -#define _IOKIT_IOFIREWIREAVCREQUESTSPACE_H - -#endif /* _IOKIT_IOFIREWIREAVCREQUESTSPACE_H */ diff --git a/i386/include/IOKit/avc/IOFireWireAVCTargetSpace.h b/i386/include/IOKit/avc/IOFireWireAVCTargetSpace.h deleted file mode 100644 index 4f3cdb0..0000000 --- a/i386/include/IOKit/avc/IOFireWireAVCTargetSpace.h +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/* - * - * IOFireWireAVCTargetSpace.h - * - * Class to centralize the AVC Target mode support - * - */ - -#ifndef _IOKIT_IOFIREWIREAVCTARGETSPACE_H -#define _IOKIT_IOFIREWIREAVCTARGETSPACE_H - -#include <IOKit/IOUserClient.h> -#include <IOKit/IOBufferMemoryDescriptor.h> - -#include <IOKit/firewire/IOFWAddressSpace.h> -#include <IOKit/firewire/IOLocalConfigDirectory.h> -#include <IOKit/avc/IOFireWireAVCConsts.h> -#include <IOKit/avc/IOFireWireAVCUserClientCommon.h> - -class IOFireWireAVCProtocolUserClient; -class AVCCommandHandlerInfo; -class AVCSubunitInfo; - -typedef void (*IOFireWireAVCTargetCommandHandlerCallback)(const AVCCommandHandlerInfo *pCmdInfo, - UInt32 generation, - UInt16 nodeID, - const void *command, - UInt32 cmdLen, - IOFWSpeed &speed, - UInt32 handlerSearchIndex); - -typedef void (*IOFireWireAVCSubunitPlugHandlerCallback)(const AVCSubunitInfo *pSubunitInfo, - IOFWAVCSubunitPlugMessages plugMessage, - IOFWAVCPlugTypes plugType, - UInt32 plugNum, - UInt32 messageParams, - UInt32 generation, - UInt16 nodeID); - -/*! -@class AVCCommandHandlerInfo -@abstract internal class to manage installed command handlers -*/ -class AVCCommandHandlerInfo : public OSObject -{ - OSDeclareDefaultStructors(AVCCommandHandlerInfo) -public: - IOFireWireAVCProtocolUserClient * userClient; - IOFireWireAVCTargetCommandHandlerCallback callBack; - OSAsyncReference64 asyncRef; - UInt32 subUnitTypeAndID; - UInt32 opCode; - uint64_t userCallBack; - uint64_t userRefCon; -}; - -typedef struct _AVCSubunitPlugRecord -{ - UInt32 plugSignalFormat; - UInt32 connectionCount; -}AVCSubunitPlugRecord; - -/*! -@class AVCSubunitInfo -@abstract internal class to manage installed subunits -*/ -class AVCSubunitInfo : public OSObject -{ - OSDeclareDefaultStructors(AVCSubunitInfo) - bool init(); - void free(); -public: - static AVCSubunitInfo *create(); - IOFireWireAVCProtocolUserClient * userClient; - IOFireWireAVCSubunitPlugHandlerCallback callBack; - OSAsyncReference64 asyncRef; - UInt32 subunitTypeAndID; - UInt32 numSourcePlugs; - UInt32 numDestPlugs; - uint64_t userCallBack; - uint64_t userRefCon; - AVCSubunitPlugRecord *sourcePlugRecords; - AVCSubunitPlugRecord *destPlugRecords; -}; - -typedef struct _AVCUnitPlugRecord -{ - UInt32 connectionCount; -}AVCUnitPlugRecord; - -typedef struct _AVCUnitPlugs -{ - UInt32 numIsochInPlugs; - UInt32 numIsochOutPlugs; - UInt32 numExternalInPlugs; - UInt32 numExternalOutPlugs; - AVCUnitPlugRecord isochInPlugRecord[kAVCMaxNumPlugs]; - AVCUnitPlugRecord isochOutPlugRecord[kAVCMaxNumPlugs]; - AVCUnitPlugRecord externalInPlugRecord[kAVCMaxNumPlugs]; - AVCUnitPlugRecord externalOutPlugRecord[kAVCMaxNumPlugs]; -}AVCUnitPlugs; - -/*! -@class UCInfo -@abstract internal class to manage multiple protocol user clients -*/ -class UCInfo : public OSObject -{ - OSDeclareDefaultStructors(UCInfo) -public: - IOFireWireAVCProtocolUserClient *fUserClient; -}; - -/*! -@class AVCConnectionRecord -@abstract internal class to manage AVC connections -*/ -class AVCConnectionRecord : public OSObject -{ - OSDeclareDefaultStructors(AVCConnectionRecord) -public: - UInt32 sourceSubunitTypeAndID; - IOFWAVCPlugTypes sourcePlugType; - UInt32 sourcePlugNum; - UInt32 destSubunitTypeAndID; - IOFWAVCPlugTypes destPlugType; - UInt32 destPlugNum; - bool lockConnection; - bool permConnection; -}; - -/*! -@class IOFireWireAVCTargetSpace -@abstract object to centralize the AVC Target mode support -*/ -class IOFireWireAVCTargetSpace : public IOFWPseudoAddressSpace -{ - OSDeclareDefaultStructors(IOFireWireAVCTargetSpace) - -protected: - UInt32 fBuf[512]; - UInt32 fActivations; - IOFireWireController *fController; - IOLocalConfigDirectory * fAVCLocalConfigDirectory; - OSArray * fUserClients; - OSArray * fCommandHandlers; - OSArray * fSubunits; - OSArray * fConnectionRecords; - AVCUnitPlugs fUnitPlugs; - IORecursiveLock * fLock; - - /*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - virtual UInt32 doWrite(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, - const void *buf, IOFWRequestRefCon refcon); - - - IOReturn targetSendAVCResponse(UInt32 generation, UInt16 nodeID, IOBufferMemoryDescriptor *pBufMemDesc, UInt32 size); - - // Internal AVC Target Command Handlers - IOReturn handleUnitInfoCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); - IOReturn handleSubUnitInfoCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); - IOReturn handlePlugInfoCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); - IOReturn handlePowerCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); - IOReturn handleConnectCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); - IOReturn handleDisconnectCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); - IOReturn handleInputPlugSignalFormatCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); - IOReturn handleOutputPlugSignalFormatCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); - IOReturn handleConnectionsCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); - IOReturn handleSignalSourceCommand(UInt16 nodeID, UInt32 generation, const char *buf, UInt32 len); - - UInt32 subUnitOfTypeCount(UInt32 type); - AVCSubunitInfo *getSubunitInfo(UInt32 subunitTypeAndID); - bool canConnectDestPlug(UInt32 destSubunitTypeAndID, - IOFWAVCPlugTypes destPlugType, - UInt32 *destPlugNum); - -public: - - // Activate/Deactivate Functions - virtual IOReturn activateWithUserClient(IOFireWireAVCProtocolUserClient *userClient); - virtual void deactivateWithUserClient(IOFireWireAVCProtocolUserClient *userClient); - - /*! - @function init - @abstract initializes the IOFireWireAVCTargetSpace object - */ - virtual bool init(IOFireWireController *controller); - - /*! - @function getAVCTargetSpace - @abstract returns the IOFireWireAVCTargetSpace object for the given FireWire bus - @param bus The FireWire bus - */ - static IOFireWireAVCTargetSpace *getAVCTargetSpace(IOFireWireController *controller); - - /*! - @function publishAVCUnitDirectory - @abstract Creates a local AVC Unit directory if it doesn't already exist - */ - virtual IOReturn publishAVCUnitDirectory(void); - - virtual IOReturn installAVCCommandHandler(IOFireWireAVCProtocolUserClient *userClient, - IOFireWireAVCTargetCommandHandlerCallback callBack, - OSAsyncReference64 asyncRef, - UInt32 subUnitTypeAndID, - UInt32 opCode, - uint64_t userCallBack, - uint64_t userRefCon); - - virtual IOReturn addSubunit(IOFireWireAVCProtocolUserClient *userClient, - IOFireWireAVCSubunitPlugHandlerCallback callBack, - OSAsyncReference64 asyncRef, - UInt32 subunitType, - UInt32 numSourcePlugs, - UInt32 numDestPlugs, - uint64_t userCallBack, - uint64_t userRefCon, - UInt32 *subUnitID); - - virtual IOReturn setSubunitPlugSignalFormat(IOFireWireAVCProtocolUserClient *userClient, - UInt32 subunitTypeAndID, - IOFWAVCPlugTypes plugType, - UInt32 plugNum, - UInt32 signalFormat); - - virtual IOReturn getSubunitPlugSignalFormat(IOFireWireAVCProtocolUserClient *userClient, - UInt32 subunitTypeAndID, - IOFWAVCPlugTypes plugType, - UInt32 plugNum, - UInt32 *pSignalFormat); - - virtual IOReturn connectTargetPlugs(IOFireWireAVCProtocolUserClient *userClient, - AVCConnectTargetPlugsInParams *inParams, - AVCConnectTargetPlugsOutParams *outParams); - - virtual IOReturn disconnectTargetPlugs(IOFireWireAVCProtocolUserClient *userClient, - UInt32 sourceSubunitTypeAndID, - IOFWAVCPlugTypes sourcePlugType, - UInt32 sourcePlugNum, - UInt32 destSubunitTypeAndID, - IOFWAVCPlugTypes destPlugType, - UInt32 destPlugNum); - - virtual IOReturn getTargetPlugConnection(IOFireWireAVCProtocolUserClient *userClient, - AVCGetTargetPlugConnectionInParams *inParams, - AVCGetTargetPlugConnectionOutParams *outParams); - - virtual IOReturn findAVCRequestHandler(IOFireWireAVCProtocolUserClient *userClient, - UInt32 generation, - UInt16 nodeID, - IOFWSpeed speed, - UInt32 handlerSearchIndex, - const char *pCmdBuf, - UInt32 cmdLen); - - virtual void pcrModified(IOFWAVCPlugTypes plugType, - UInt32 plugNum, - UInt32 newValue); - -private: - OSMetaClassDeclareReservedUnused(IOFireWireAVCTargetSpace, 0); - OSMetaClassDeclareReservedUnused(IOFireWireAVCTargetSpace, 1); - OSMetaClassDeclareReservedUnused(IOFireWireAVCTargetSpace, 2); - OSMetaClassDeclareReservedUnused(IOFireWireAVCTargetSpace, 3); -}; - -#endif /*_IOKIT_IOFIREWIREAVCTARGETSPACE_H */ \ No newline at end of file diff --git a/i386/include/IOKit/avc/IOFireWireAVCUnit.h b/i386/include/IOKit/avc/IOFireWireAVCUnit.h deleted file mode 100644 index 0abf1cd..0000000 --- a/i386/include/IOKit/avc/IOFireWireAVCUnit.h +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Copyright (c) 1998-2001 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOFIREWIREAVCUNIT_H -#define _IOKIT_IOFIREWIREAVCUNIT_H - -#include <IOKit/IOService.h> -#include <IOKit/firewire/IOFWRegs.h> -#include <IOKit/firewire/IOFWAddressSpace.h> -#include <IOKit/firewire/IOFWCommand.h> -#include <IOKit/avc/IOFireWireAVCConsts.h> - -extern const OSSymbol *gIOAVCUnitType; - -class IOFireWireNub; -class IOFireWireAVCCommand; -class IOFireWirePCRSpace; -class IOFireWireAVCUnit; -class IOFireWireAVCSubUnit; -class IOFireWireAVCAsynchronousCommand; -class IOFireWireAVCNub; - -// The callback prototype for AVC Asynchronous Commands -typedef void (*IOFireWireAVCAsynchronousCommandCallback)(void *pRefCon, IOFireWireAVCAsynchronousCommand *pCommandObject); - -const UInt16 kIOFWAVCAsyncCmdFreed = 0xdead; - -/*! -@class IOFireWireAVCAsynchronousCommand -*/ -class IOFireWireAVCAsynchronousCommand : public IOCommand -{ - OSDeclareDefaultStructors(IOFireWireAVCAsynchronousCommand) - void free(void); - - friend class IOFireWireAVCUnit; - -protected: - /*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - -public: - IOReturn init(const UInt8 * command, UInt32 len, IOFireWireAVCAsynchronousCommandCallback completionCallback, void *pClientRefCon); - IOReturn submit(IOFireWireAVCNub *pAVCNub); - IOReturn cancel(void); - IOReturn reinit(const UInt8 * command, UInt32 cmdLen); - - // This function returns true if this command is currently waiting for a response - bool isPending(void); - - IOFWAVCAsyncCommandState cmdState; - void *pRefCon; - UInt8 *pCommandBuf; - UInt32 cmdLen; - UInt8 *pInterimResponseBuf; - UInt32 interimResponseLen; - UInt8 *pFinalResponseBuf; - UInt32 finalResponseLen; - -protected: - IOFireWireAVCAsynchronousCommandCallback fCallback; - IOFireWireAVCUnit *fAVCUnit; - IOMemoryDescriptor *fMem; - IOFWCommand *fWriteCmd; - IOFWDelayCommand *fDelayCmd; - UInt16 fWriteNodeID; - UInt32 fWriteGen; - -private: - OSMetaClassDeclareReservedUnused(IOFireWireAVCAsynchronousCommand, 0); - OSMetaClassDeclareReservedUnused(IOFireWireAVCAsynchronousCommand, 1); - OSMetaClassDeclareReservedUnused(IOFireWireAVCAsynchronousCommand, 2); - OSMetaClassDeclareReservedUnused(IOFireWireAVCAsynchronousCommand, 3); -}; - -/*! - @class IOFireWireAVCNub - @abstract nub for AVC devices -*/ -class IOFireWireAVCNub : public IOService -{ - OSDeclareDefaultStructors(IOFireWireAVCNub) - -protected: - IOFireWireNub * fDevice; - -public: - // execute AVC command -/*! - @function AVCCommand - @abstract Sends an AVC command to the device and stores the response. - @param command Pointer to command to send. - @param cmdLen Length of the command. - @param response Pointer to place to store the response. - @param responseLen Pointer to response length - initialize to the size of the buffer pointed to by response, - updated to the number of bytes returned by the device. -*/ - virtual IOReturn AVCCommand(const UInt8 * command, UInt32 cmdLen, UInt8 * response, UInt32 *responseLen) = 0; - -/*! - @function AVCCommandInGeneration - @abstract Sends an AVC command to the device and stores the response. The command must complete in the specified - FireWire bus generation otherwise kIOFireWireBusReset is returned. - @param generation The bus generation that the command must execute in. - @param command Pointer to command to send. - @param cmdLen Length of the command. - @param response Pointer to place to store the response. - @param responseLen Pointer to response length - initialize to the size of the buffer pointed to by response, - updated to the number of bytes returned by the device. -*/ - virtual IOReturn AVCCommandInGeneration(UInt32 generation, - const UInt8 * command, UInt32 cmdLen, UInt8 * response, UInt32 *responseLen) = 0; - -/*! - @function getDevice - @abstract Returns the FireWire device nub that is this object's provider . -*/ - IOFireWireNub* getDevice() const - {return fDevice;}; - -/*! - @function updateAVCCommandTimeout - @abstract By default, AVCCommands timeout 10 seconds after receiving an Interim response. - This function resets the timeout of the current command to 10 seconds from the current time. - Call this repeatedly for AVC commands that take a very long time to execute to prevent premature - timeout. -*/ - virtual IOReturn updateAVCCommandTimeout() = 0; - -private: - OSMetaClassDeclareReservedUsed(IOFireWireAVCNub, 0); - OSMetaClassDeclareReservedUnused(IOFireWireAVCNub, 1); - OSMetaClassDeclareReservedUnused(IOFireWireAVCNub, 2); - OSMetaClassDeclareReservedUnused(IOFireWireAVCNub, 3); -}; - -/*! - @class IOFireWireAVCUnit - @abstract nub for AVC devices -*/ -class IOFireWireAVCUnit : public IOFireWireAVCNub -{ - OSDeclareDefaultStructors(IOFireWireAVCUnit) - - friend class IOFireWireAVCAsynchronousCommand; - -protected: - IOFWPseudoAddressSpace *fFCPResponseSpace; - IOLock *avcLock; - IOFireWireAVCCommand *fCommand; - - UInt8 fSubUnitCount[kAVCNumSubUnitTypes]; - - bool fStarted; - IOLock *cmdLock; - -/*! @struct ExpansionData - @discussion This structure is used to expand the capablilties of the class in a binary compatible way - */ - struct ExpansionData - { - OSArray * fAVCAsyncCommands; - IOFireWireController *fControl; - bool enableRobustAVCCommandResponseMatching; - }; - -/*! @var fIOFireWireAVCUnitExpansion - */ - ExpansionData *fIOFireWireAVCUnitExpansion; - - static UInt32 AVCResponse(void *refcon, UInt16 nodeID, IOFWSpeed &speed, - FWAddress addr, UInt32 len, const void *buf, IOFWRequestRefCon requestRefcon); - - static void rescanSubUnits(void *arg); - - virtual void free(void); - - virtual void updateSubUnits(bool firstTime); - - static void AVCAsynchRequestWriteDone(void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd); - static void AVCAsynchDelayDone(void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd); - -public: - // IOService overrides - virtual bool start(IOService *provider); - virtual IOReturn message(UInt32 type, IOService *provider, void *argument); - virtual IOReturn setProperties (OSObject * properties ); - -/*! @function handleOpen - @abstract Overrideable method to control the open / close behaviour of an IOService. - @discussion See IOService for discussion. - @param forClient Designates the client of the provider requesting the open. - @param options Options for the open, may be interpreted by the implementor of handleOpen. - @result Return true if the open was successful, false otherwise. -*/ - - virtual bool handleOpen( IOService * forClient, - IOOptionBits options, - void * arg ); -/*! - @function handleClose - @abstract Overrideable method to control the open / close behaviour of an IOService. - @discussion See IOService for discussion. - @param forClient Designates the client of the provider requesting the close. - @param options Options for the close, may be interpreted by the implementor of handleOpen. -*/ - - virtual void handleClose( IOService * forClient, - IOOptionBits options ); - - -/*! - @function matchPropertyTable - @abstract Matching language support - Match on the following properties of the unit: - Vendor_ID - GUID - Unit_Type - and available sub-units, match if the device has at least the requested number of a sub-unit type: - AVCSubUnit_0 -> AVCSubUnit_1f -*/ - virtual bool matchPropertyTable(OSDictionary * table); - - // execute AVC command -/*! - @function AVCCommand - @abstract Sends an AVC command to the device and stores the response. - @param command Pointer to command to send. - @param cmdLen Length of the command. - @param response Pointer to place to store the response. - @param responseLen Pointer to response length - initialize to the size of the buffer pointed to by response, - updated to the number of bytes returned by the device. -*/ - virtual IOReturn AVCCommand(const UInt8 * command, UInt32 cmdLen, UInt8 * response, UInt32 *responseLen); - -/*! - @function AVCCommandInGeneration - @abstract Sends an AVC command to the device and stores the response. The command must complete in the specified - FireWire bus generation otherwise kIOFireWireBusReset is returned. - @param generation The bus generation that the command must execute in. - @param command Pointer to command to send. - @param cmdLen Length of the command. - @param response Pointer to place to store the response. - @param responseLen Pointer to response length - initialize to the size of the buffer pointed to by response, - updated to the number of bytes returned by the device. -*/ - virtual IOReturn AVCCommandInGeneration(UInt32 generation, - const UInt8 * command, UInt32 cmdLen, UInt8 * response, UInt32 *responseLen); - -/*! - @function updateAVCCommandTimeout - @abstract By default, AVCCommands timeout 10 seconds after receiving an Interim response. - This function resets the timeout of the current command to 10 seconds from the current time. - Call this repeatedly for AVC commands that take a very long time to execute to prevent premature - timeout. -*/ - virtual IOReturn updateAVCCommandTimeout(); - -protected: - UInt32 indexOfAVCAsynchronousCommandObject(IOFireWireAVCAsynchronousCommand *pCommandObject); - void removeAVCAsynchronousCommandObjectAtIndex(UInt32 index); - - void lockAVCAsynchronousCommandLock(); - - void unlockAVCAsynchronousCommandLock(); - - bool available(); - -private: - - OSMetaClassDeclareReservedUnused(IOFireWireAVCUnit, 0); - OSMetaClassDeclareReservedUnused(IOFireWireAVCUnit, 1); - OSMetaClassDeclareReservedUnused(IOFireWireAVCUnit, 2); - OSMetaClassDeclareReservedUnused(IOFireWireAVCUnit, 3); - -}; - -/*! - @class IOFireWireAVCSubUnit - @abstract nub for sub unit of AVC devices. Just for matching, calls the AVC unit for all functions. -*/ -class IOFireWireAVCSubUnit : public IOFireWireAVCNub -{ - OSDeclareDefaultStructors(IOFireWireAVCSubUnit) - - friend class IOFireWireAVCAsynchronousCommand; - -protected: - IOFireWireAVCUnit *fAVCUnit; - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - -public: - virtual bool init(OSDictionary *propTable, IOFireWireAVCUnit *provider); - - // IOService overrides - virtual IOReturn message(UInt32 type, IOService *provider, void *argument); - -/*! @function handleOpen - @abstract Overrideable method to control the open / close behaviour of an IOService. - @discussion See IOService for discussion. - @param forClient Designates the client of the provider requesting the open. - @param options Options for the open, may be interpreted by the implementor of handleOpen. - @result Return true if the open was successful, false otherwise. -*/ - - virtual bool handleOpen( IOService * forClient, - IOOptionBits options, - void * arg ); -/*! - @function handleClose - @abstract Overrideable method to control the open / close behaviour of an IOService. - @discussion See IOService for discussion. - @param forClient Designates the client of the provider requesting the close. - @param options Options for the close, may be interpreted by the implementor of handleOpen. -*/ - - virtual void handleClose( IOService * forClient, - IOOptionBits options ); - - -/*! - @function matchPropertyTable - @abstract Matching language support - Match on the following properties of the sub unit: - Vendor_ID - GUID - SubUnit_Type -*/ - virtual bool matchPropertyTable(OSDictionary * table); - - // execute AVC command -/*! - @function AVCCommand - @abstract Sends an AVC command to the device and stores the response. - @param command Pointer to command to send. - @param cmdLen Length of the command. - @param response Pointer to place to store the response. - @param responseLen Pointer to response length - initialize to the size of the buffer pointed to by response, - updated to the number of bytes returned by the device. -*/ - virtual IOReturn AVCCommand(const UInt8 * command, UInt32 cmdLen, UInt8 * response, UInt32 *responseLen); - -/*! - @function AVCCommandInGeneration - @abstract Sends an AVC command to the device and stores the response. The command must complete in the specified - FireWire bus generation otherwise kIOFireWireBusReset is returned. - @param generation The bus generation that the command must execute in. - @param command Pointer to command to send. - @param cmdLen Length of the command. - @param response Pointer to place to store the response. - @param responseLen Pointer to response length - initialize to the size of the buffer pointed to by response, - updated to the number of bytes returned by the device. -*/ - virtual IOReturn AVCCommandInGeneration(UInt32 generation, - const UInt8 * command, UInt32 cmdLen, UInt8 * response, UInt32 *responseLen); - -/*! - @function updateAVCCommandTimeout - @abstract By default, AVCCommands timeout 10 seconds after receiving an Interim response. - This function resets the timeout of the current command to 10 seconds from the current time. - Call this repeatedly for AVC commands that take a very long time to execute to prevent premature - timeout. -*/ - virtual IOReturn updateAVCCommandTimeout(); - -private: - OSMetaClassDeclareReservedUnused(IOFireWireAVCSubUnit, 0); - OSMetaClassDeclareReservedUnused(IOFireWireAVCSubUnit, 1); - OSMetaClassDeclareReservedUnused(IOFireWireAVCSubUnit, 2); - OSMetaClassDeclareReservedUnused(IOFireWireAVCSubUnit, 3); - -}; - -#endif // _IOKIT_IOFIREWIREAVCUNIT_H - diff --git a/i386/include/IOKit/avc/IOFireWireAVCUserClientCommon.h b/i386/include/IOKit/avc/IOFireWireAVCUserClientCommon.h deleted file mode 100644 index cecf812..0000000 --- a/i386/include/IOKit/avc/IOFireWireAVCUserClientCommon.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 1998-2001 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOFIREWIREAVCUSERCLIENTCOMMON_H_ -#define _IOKIT_IOFIREWIREAVCUSERCLIENTCOMMON_H_ - -#include <IOKit/avc/IOFireWireAVCConsts.h> - -#define kIOFireWireAVCLibConnection 13 - -enum IOFWAVCUserClientCommandCodes { - kIOFWAVCUserClientOpen, // kIOUCScalarIScalarO 0,0 - kIOFWAVCUserClientClose, // kIOUCScalarIScalarO 0,0 - kIOFWAVCUserClientOpenWithSessionRef, // kIOUCScalarIScalarO 1,0 - kIOFWAVCUserClientGetSessionRef, // kIOUCScalarIScalarO 0,1 - kIOFWAVCUserClientAVCCommand, // kIOUCStructIStructO -1,-1 - kIOFWAVCUserClientAVCCommandInGen, // kIOUCStructIStructO -1,-1 - kIOFWAVCUserClientUpdateAVCCommandTimeout, // kIOUCScalarIScalarO 0,0 - kIOFWAVCUserClientMakeP2PInputConnection, // KIOUCScalarIScalarO 1, 0 - kIOFWAVCUserClientBreakP2PInputConnection, // KIOUCScalarIScalarO 1, 0 - kIOFWAVCUserClientMakeP2POutputConnection, // KIOUCScalarIScalarO 1, 0 - kIOFWAVCUserClientBreakP2POutputConnection, // KIOUCScalarIScalarO 1, 0 - kIOFWAVCUserClientCreateAsyncAVCCommand, // kIOUCStructIStructO -1,-1 - kIOFWAVCUserClientSubmitAsyncAVCCommand, // kIOUCScalarIScalarO 1, 0 - kIOFWAVCUserClientCancelAsyncAVCCommand, // kIOUCScalarIScalarO 1, 0 - kIOFWAVCUserClientReleaseAsyncAVCCommand, // kIOUCScalarIScalarO 1, 0 - kIOFWAVCUserClientReinitAsyncAVCCommand, // // kIOUCScalarIStructI 1, -1 - kIOFWAVCUserClientNumCommands -}; - -enum IOFWAVCUserClientAsyncCommandCodes { - kIOFWAVCUserClientInstallAsyncAVCCommandCallback = kIOFWAVCUserClientNumCommands, // kIOUCScalarIScalarO 1, 1 - kIOFWAVCUserClientNumAsyncCommands -}; - - -enum IOFWAVCProtocolUserClientCommandCodes { - kIOFWAVCProtocolUserClientSendAVCResponse, // kIOUCScalarIStructI 2, -1 - kIOFWAVCProtocolUserClientFreeInputPlug, // kIOUCScalarIScalarO 1, 0 - kIOFWAVCProtocolUserClientReadInputPlug, // kIOUCScalarIScalarO 1, 1 - kIOFWAVCProtocolUserClientUpdateInputPlug, // kIOUCScalarIScalarO 3, 0 - kIOFWAVCProtocolUserClientFreeOutputPlug, // kIOUCScalarIScalarO 1, 0 - kIOFWAVCProtocolUserClientReadOutputPlug, // kIOUCScalarIScalarO 1, 1 - kIOFWAVCProtocolUserClientUpdateOutputPlug, // kIOUCScalarIScalarO 3, 0 - kIOFWAVCProtocolUserClientReadOutputMasterPlug, // kIOUCScalarIScalarO 0, 1 - kIOFWAVCProtocolUserClientUpdateOutputMasterPlug, // kIOUCScalarIScalarO 2, 0 - kIOFWAVCProtocolUserClientReadInputMasterPlug, // kIOUCScalarIScalarO 0, 1 - kIOFWAVCProtocolUserClientUpdateInputMasterPlug, // kIOUCScalarIScalarO 2, 0 - kIOFWAVCProtocolUserClientPublishAVCUnitDirectory, // kIOUCScalarIScalarO 0, 0 - kIOFWAVCProtocolUserClientSetSubunitPlugSignalFormat, // kIOUCScalarIScalarO 4, 0 - kIOFWAVCProtocolUserClientGetSubunitPlugSignalFormat, // kIOUCScalarIScalarO 3, 1 - kIOFWAVCProtocolUserClientConnectTargetPlugs, // kIOUCStructIStructO - kIOFWAVCProtocolUserClientDisconnectTargetPlugs, // kIOUCScalarIScalarO 6, 0 - kIOFWAVCProtocolUserClientGetTargetPlugConnection, // kIOUCStructIStructO - kIOFWAVCProtocolUserClientAVCRequestNotHandled, // kIOUCScalarIStructI 4, -1 - kIOFWAVCProtocolUserClientNumCommands -}; - -enum IOFWAVCProtocolUserClientAsyncCommandCodes { - kIOFWAVCProtocolUserClientSetAVCRequestCallback = kIOFWAVCProtocolUserClientNumCommands, // kIOUCScalarIScalarO 2, 0 - kIOFWAVCProtocolUserClientAllocateInputPlug, // kIOUCScalarIScalarO 1, 1 - kIOFWAVCProtocolUserClientAllocateOutputPlug, // kIOUCScalarIScalarO 1, 1 - kIOFWAVCProtocolUserClientInstallAVCCommandHandler, // kIOUCScalarIScalarO 4, 0 - kIOFWAVCProtocolUserClientAddSubunit, // kIOUCScalarIScalarO 5, 1 - kIOFWAVCProtocolUserClientNumAsyncCommands -}; - -typedef struct _AVCConnectTargetPlugsInParams -{ - UInt32 sourceSubunitTypeAndID; - IOFWAVCPlugTypes sourcePlugType; - UInt32 sourcePlugNum; - UInt32 destSubunitTypeAndID; - IOFWAVCPlugTypes destPlugType; - UInt32 destPlugNum; - Boolean lockConnection; - Boolean permConnection; -}AVCConnectTargetPlugsInParams; - -typedef struct _AVCConnectTargetPlugsOutParams -{ - UInt32 sourcePlugNum; - UInt32 destPlugNum; -}AVCConnectTargetPlugsOutParams; - -typedef struct _AVCGetTargetPlugConnectionInParams -{ - UInt32 subunitTypeAndID; - IOFWAVCPlugTypes plugType; - UInt32 plugNum; -}AVCGetTargetPlugConnectionInParams; - -typedef struct _AVCGetTargetPlugConnectionOutParams -{ - UInt32 connectedSubunitTypeAndID; - IOFWAVCPlugTypes connectedPlugType; - UInt32 connectedPlugNum; - Boolean lockConnection; - Boolean permConnection; -}AVCGetTargetPlugConnectionOutParams; - -#define kAsyncCmdSharedBufInterimRespOffset 0 -#define kAsyncCmdSharedBufFinalRespOffset 512 - -#endif // _IOKIT_IOFIREWIREAVCUSERCLIENTCOMMON_H_ \ No newline at end of file diff --git a/i386/include/IOKit/avc/IOFireWirePCRSpace.h b/i386/include/IOKit/avc/IOFireWirePCRSpace.h deleted file mode 100644 index 9f31176..0000000 --- a/i386/include/IOKit/avc/IOFireWirePCRSpace.h +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright (c) 2001 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * - * IOFireWirePCRSpace.h - * - * Class to multiplex access to the PCR addresses. - */ -#ifndef _IOKIT_IOFIREWIREPCRSPACE_H -#define _IOKIT_IOFIREWIREPCRSPACE_H - -#include <IOKit/firewire/IOFWAddressSpace.h> -#include <IOKit/avc/IOFireWireAVCTargetSpace.h> - -/*! - @typedef IOFireWirePCRCallback - @abstract Callback called after a successful lock transaction to a plug. - @param refcon refcon supplied to the IOFireWireFCPSpace when a client is registered - @param nodeID is the node originating the request - @param plugNo is the plug number - @param oldVal is the value the plug used to contain - @param newVal is the quad written into the plug - - */ -typedef void (*IOFireWirePCRCallback)(void *refcon, UInt16 nodeID, UInt32 plug, UInt32 oldVal, UInt32 newVal); - -class IOFireWireBus; - -/*! - @class IOFireWirePCRSpace - @abstract object to multiplex users of the PCR plug registers -*/ -class IOFireWirePCRSpace : public IOFWPseudoAddressSpace -{ - OSDeclareDefaultStructors(IOFireWirePCRSpace) - -protected: - struct Client { - IOFireWirePCRCallback func; - void * refcon; - }; - UInt32 fBuf[64]; - - Client fClients[64]; - UInt32 fActivations; - IOFireWireAVCTargetSpace * fAVCTargetSpace; - IONotifier *fNotifier; - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - // Override to notify client of each plug seperately - virtual UInt32 doWrite(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, - const void *buf, IOFWRequestRefCon refcon); - - virtual IOReturn allocatePlug(void *refcon, IOFireWirePCRCallback func, UInt32 &plug, Client* head); - virtual void freePlug(UInt32 plug, Client* head); - virtual UInt32 readPlug(UInt32 plug); - virtual IOReturn updatePlug(UInt32 plug, UInt32 oldVal, UInt32 newVal); - -public: - - // Override to handle multiple activations (one per client) - virtual IOReturn activate(); - virtual void deactivate(); - -/*! - @function init - @abstract initializes the IOFireWirePCRSpace object -*/ - virtual bool init(IOFireWireBus *bus); -/*! - @function getPCRAddressSpace - @abstract returns the IOFireWirePCRSpace object for the given FireWire bus - @param bus The FireWire bus -*/ - static IOFireWirePCRSpace *getPCRAddressSpace(IOFireWireBus *bus); -/*! - @function allocateInputPlug - @abstract allocates an input plug. - @param refcon arbitrary value passed back as first argument of callback. - @param func callback function when a successful lock transaction to the plug has been performed - @param plug set to the plug number if a plug is successfully allocated -*/ - virtual IOReturn allocateInputPlug(void *refcon, IOFireWirePCRCallback func, UInt32 &plug); -/*! - @function freeInputPlug - @abstract deallocates an input plug. - @param plug value returned by allocateInputPlug. -*/ - virtual void freeInputPlug(UInt32 plug); -/*! - @function readInputPlug - @abstract returns the current value of an input plug. - @param plug value returned by allocateInputPlug. -*/ - virtual UInt32 readInputPlug(UInt32 plug); -/*! - @function updateInputPlug - @abstract updates the value of an input plug (simulating a lock transaction). - @param plug value returned by allocateInputPlug. - @param oldVal value returned by readInputPlug. - @param newVal new value to store in plug if it's current value is oldVal. -*/ - virtual IOReturn updateInputPlug(UInt32 plug, UInt32 oldVal, UInt32 newVal); -/*! - @function allocateOutputPlug - @abstract allocates an output plug. - @param refcon arbitrary value passed back as first argument of callback. - @param func callback function when a successful lock transaction to the plug has been performed - @param plug set to the plug number if a plug is successfully allocated -*/ - virtual IOReturn allocateOutputPlug(void *refcon, IOFireWirePCRCallback func, UInt32 &plug); -/*! - @function freeOutputPlug - @abstract deallocates an output plug. - @param plug value returned by allocateOutputPlug. -*/ - virtual void freeOutputPlug(UInt32 plug); -/*! - @function readOutputPlug - @abstract returns the current value of an output plug. - @param plug value returned by allocateOutputPlug. -*/ - virtual UInt32 readOutputPlug(UInt32 plug); -/*! - @function updateOutputPlug - @abstract updates the value of an output plug (simulating a lock transaction). - @param plug value returned by allocateOutputPlug. - @param oldVal value returned by readOutputPlug. - @param newVal new value to store in plug if it's current value is oldVal. -*/ - virtual IOReturn updateOutputPlug(UInt32 plug, UInt32 oldVal, UInt32 newVal); -/*! - @function readOutputMasterPlug - @abstract returns the current value of the output master plug. -*/ - virtual UInt32 readOutputMasterPlug(); -/*! - @function updateOutputMasterPlug - @abstract updates the value of the master output plug (simulating a lock transaction). - @param oldVal value returned by readOutputMasterPlug. - @param newVal new value to store in plug if it's current value is oldVal. -*/ - virtual IOReturn updateOutputMasterPlug(UInt32 oldVal, UInt32 newVal); -/*! - @function readInputMasterPlug - @abstract returns the current value of the input master plug. -*/ - virtual UInt32 readInputMasterPlug(); -/*! - @function updateInputMasterPlug - @abstract updates the value of the master input plug (simulating a lock transaction). - @param oldVal value returned by readInputMasterPlug. - @param newVal new value to store in plug if it's current value is oldVal. -*/ - virtual IOReturn updateInputMasterPlug(UInt32 oldVal, UInt32 newVal); - - /*! - @function setAVCTargetSpacePointer - */ - virtual void setAVCTargetSpacePointer(IOFireWireAVCTargetSpace *pAVCTargetSpace); - - /*! - @function clearAllP2PConnections - */ - virtual void clearAllP2PConnections(void); - -private: - OSMetaClassDeclareReservedUnused(IOFireWirePCRSpace, 0); - OSMetaClassDeclareReservedUnused(IOFireWirePCRSpace, 1); - OSMetaClassDeclareReservedUnused(IOFireWirePCRSpace, 2); - OSMetaClassDeclareReservedUnused(IOFireWirePCRSpace, 3); - -}; - -#endif /* _IOKIT_IOFIREWIREPCRSPACE_H */ diff --git a/i386/include/IOKit/bluetooth/Bluetooth.h b/i386/include/IOKit/bluetooth/Bluetooth.h deleted file mode 100644 index 6692b90..0000000 --- a/i386/include/IOKit/bluetooth/Bluetooth.h +++ /dev/null @@ -1,2158 +0,0 @@ -/* - File: Bluetooth.h - Contains: Public interfaces for Bluetooth technology. - Copyright: (c) 2002-2007 by Apple Inc. All rights reserved. -*/ - -#pragma once - -#ifdef KERNEL -#include <IOKit/bluetooth/BluetoothAssignedNumbers.h> -#else -#include <CoreFoundation/CFBase.h> -#include <IOBluetooth/BluetoothAssignedNumbers.h> -#endif - -#include <IOKit/IOTypes.h> -#include <libkern/OSByteOrder.h> - -//--------------------------------------------------------------------------------------------------------------------------- -/*! @header Bluetooth - Bluetooth wireless technology -*/ - -#ifdef __cplusplus - extern "C" { -#endif - - -#if 0 - -#pragma mark === Baseband === -#endif - -//=========================================================================================================================== -// Baseband -//=========================================================================================================================== - -typedef UInt16 BluetoothConnectionHandle; // Upper 4 bits are reserved. -typedef uint8_t BluetoothLMPHandle; -enum -{ - kBluetoothConnectionHandleNone = 0xffff -}; - -typedef UInt8 BluetoothReasonCode; -typedef UInt8 BluetoothEncryptionEnable; -enum -{ - kBluetoothEncryptionEnableOff = 0x00, - kBluetoothEncryptionEnableOn = 0x01 -}; - -typedef UInt8 BluetoothKeyFlag; -enum -{ - kBluetoothKeyFlagSemiPermanent = 0x00, - kBluetoothKeyFlagTemporary = 0x01 -}; - -typedef UInt8 BluetoothKeyType; -enum -{ - kBluetoothKeyTypeCombination = 0x00, - kBluetoothKeyTypeLocalUnit = 0x01, - kBluetoothKeyTypeRemoteUnit = 0x02, - kBluetoothKeyTypeDebugCombination = 0x03, - kBluetoothKeyTypeUnauthenticatedCombination = 0x04, - kBluetoothKeyTypeAuthenticatedCombination = 0x05, - kBluetoothKeyTypeChangedCombination = 0x06, -}; - -// Packet types (Bluetooth spec section 7.1.5 - Create Connection) - -typedef UInt16 BluetoothPacketType; -enum -{ - kBluetoothPacketTypeReserved1 = 0x0001, - kBluetoothPacketType2DH1Omit = 0x0002, // Masks OUT this packet type - kBluetoothPacketType3DH1Omit = 0x0004, // Masks OUT this packet type - - kBluetoothPacketTypeDM1 = 0x0008, - kBluetoothPacketTypeDH1 = 0x0010, - kBluetoothPacketTypeHV1 = 0x0020, // Reserved - kBluetoothPacketTypeHV2 = 0x0040, // Reserved - kBluetoothPacketTypeHV3 = 0x0080, // Reserved - kBluetoothPacketTypeDV = 0x0100, // Reserved - kBluetoothPacketType2DH3Omit = 0x0100, // Masks OUT this packet type - kBluetoothPacketType3DH3Omit = 0x0200, // Masks OUT this packet type - kBluetoothPacketTypeAUX = 0x0200, // Deprecated - - kBluetoothPacketTypeDM3 = 0x0400, - kBluetoothPacketTypeDH3 = 0x0800, - - kBluetoothPacketType2DH5Omit = 0x1000, // Masks OUT this packet type - kBluetoothPacketType3DM5Omit = 0x2000, // Masks OUT this packet type - - kBluetoothPacketTypeDM5 = 0x4000, - kBluetoothPacketTypeDH5 = 0x8000, - - kBluetoothPacketTypeEnd -}; - -// Setup Synchronous Packet types (Bluetooth 2.1 spec section 7.1.26 - Setup Synchronous Command) - -enum -{ - kBluetoothSynchronousConnectionPacketTypeHV1 = 0x0001, - kBluetoothSynchronousConnectionPacketTypeHV2 = 0x0002, - kBluetoothSynchronousConnectionPacketTypeHV3 = 0x0004, - kBluetoothSynchronousConnectionPacketTypeEV3 = 0x0008, - kBluetoothSynchronousConnectionPacketTypeEV4 = 0x0010, - kBluetoothSynchronousConnectionPacketTypeEV5 = 0x0020, - - // masking out certain types: - - kBluetoothSynchronousConnectionPacketType2EV3Omit = 0x0040, - kBluetoothSynchronousConnectionPacketType3EV3Omit = 0x0080, - kBluetoothSynchronousConnectionPacketType2EV5Omit = 0x0100, - kBluetoothSynchronousConnectionPacketType3EV5Omit = 0x0200, - - kBluetoothSynchronousConnectionPacketTypeAll = 0xFFFF, - - kBluetoothSynchronousConnectionPacketTypeEnd -}; - - -// LAP/Inquiry Access Codes - -typedef UInt32 BluetoothLAP; -enum -{ - kBluetoothGeneralInquiryAccessCodeIndex = 0, // General/Unlimited Inquiry Access Code (GIAC) - kBluetoothGeneralInquiryAccessCodeLAPValue = 0x9E8B33, // General/Unlimited Inquiry Access Code (GIAC) - - kBluetoothLimitedInquiryAccessCodeIndex = 1, // Limited Dedicated Inquiry Access Code (LIAC) - kBluetoothLimitedInquiryAccessCodeLAPValue = 0x9E8B00, // Limited Dedicated Inquiry Access Code (LIAC) - - // All other access codes are reserved for future use (indices 2-63, LAP values 0x9E8B01-0x9E8B32 and 0x9E8B34-0x9E8B3F). - - kBluetoothLimitedInquiryAccessCodeEnd -}; - -// PageScanRepetitionMode - -typedef UInt8 BluetoothPageScanRepetitionMode; -enum -{ - kBluetoothPageScanRepetitionModeR0 = 0x00, - kBluetoothPageScanRepetitionModeR1 = 0x01, - kBluetoothPageScanRepetitionModeR2 = 0x02 - - // All other values are reserved for future use. -}; - -// PageScanPeriodMode - -typedef UInt8 BluetoothPageScanPeriodMode; -enum -{ - kBluetoothPageScanPeriodModeP0 = 0x00, - kBluetoothPageScanPeriodModeP1 = 0x01, - kBluetoothPageScanPeriodModeP2 = 0x02 - - // All other values are reserved for future use. -}; - -// PageScanMode - -typedef UInt8 BluetoothPageScanMode; -enum -{ - kBluetoothPageScanModeMandatory = 0x00, - kBluetoothPageScanModeOptional1 = 0x01, - kBluetoothPageScanModeOptional2 = 0x02, - kBluetoothPageScanModeOptional3 = 0x03 - - // All other values are reserved for future use. -}; - -#if 0 -#pragma mark - -#pragma mark === Devices === -#endif - -typedef struct BluetoothDeviceAddress BluetoothDeviceAddress; -struct BluetoothDeviceAddress -{ - UInt8 data[ 6 ]; -}; - -typedef struct BluetoothKey BluetoothKey; -struct BluetoothKey -{ - UInt8 data[ 16 ]; -}; - -typedef struct BluetoothPINCode BluetoothPINCode; -struct BluetoothPINCode -{ - UInt8 data[ 16 ]; // PIN codes may be up to 128 bits. -}; - - -// Physical layout of the "class of device/service" field (see Bluetooth Assigned Numbers section 1.2): -// -// 2 2 2 2 1 1 1 1 1 1 1 1 1 1 -// 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 <- Bit Transmission Order -// +---------------+---------------+---------------+ -// | octet 3 | octet 2 | octet 1 | <- Octet Transmission Order -// +---------------+---------------+---------------+ -// <------ 11 bits ----->< 5 bits ><- 6 bits -> -// +---------------------+---------+-----------+-+-+ -// | Service Classes | Major | Minor | | | -// +-+-+-+-+-+-+-+-+-+-+-+ Device | Device |0|0| -// | | | | | | | |*|*|*| | Class | Class | | | -// +-+-+-+-+-+-+-+-+-+-+-+---------+-----------+-+-+ -// | | | | | | | | | -// | | | | | | | + Limited Discoverable +- Format Type -// | | | | | | +- Networking -// | | | | | +- Rendering -// | | | | +- Capturing -// | | | +- Object Transfer -// | | +- Audio -// | +- Telephony -// +- Information - -typedef UInt32 BluetoothClassOfDevice; - -#define BluetoothGetDeviceClassMajor( inCOD ) ( (inCOD & 0x00001F00) >> 8 ) -#define BluetoothGetDeviceClassMinor( inCOD ) ( (inCOD & 0x000000FC) >> 2 ) -#define BluetoothGetServiceClassMajor( inCOD ) ( (inCOD & 0x00FFE000) >> 13 ) -#define BluetoothMakeClassOfDevice( inServiceClassMajor, inDeviceClassMajor, inDeviceClassMinor ) \ - (((inServiceClassMajor << 13) & 0x00FFE000) | ((inDeviceClassMajor << 8) & 0x00001F00) | ((inDeviceClassMinor << 2) & 0x000000FC)) - -/// -/// Major Service Classes (11-bit value - bits 13-23 of Device/Service field) -/// - -typedef UInt32 BluetoothServiceClassMajor; -// Service Class Major enum in BluetoothAssignedNumbers.h - -/// -/// Major Device Classes (5-bit value - bits 8-12 of Device/Service field) -/// - -typedef UInt32 BluetoothDeviceClassMajor; -// Device Class Major enum in BluetoothAssignedNumbers.h - -/// -/// Minor Device Classes (6-bit value - bits 2-7 of Device/Service field) -/// - -typedef UInt32 BluetoothDeviceClassMinor; -// Device Class Minor enum in BluetoothAssignedNumbers.h - -// Misc Device Types - -enum -{ - kBluetoothDeviceNameMaxLength = 248 -}; -typedef UInt8 BluetoothDeviceName[ 256 ]; // Max 248 bytes of UTF-8 encoded Unicode. -typedef UInt16 BluetoothClockOffset; // Bits 14-0 come from bits 16-2 of CLKslav-CLKmaster. -typedef UInt8 BluetoothRole; // -typedef UInt8 BluetoothAllowRoleSwitch; // 0x00-0x01 valid, 0x02-0xFF reserved. -enum -{ - kBluetoothDontAllowRoleSwitch = 0x00, - kBluetoothAllowRoleSwitch = 0x01 -}; - -enum -{ - kBluetoothRoleBecomeMaster = 0x00, - kBluetoothRoleRemainSlave = 0x01 -}; - -typedef struct BluetoothSetEventMask BluetoothSetEventMask; -struct BluetoothSetEventMask -{ - UInt8 data[ 8 ]; -}; - -typedef UInt8 BluetoothPINType; - - -#if 0 -#pragma mark - -#pragma mark === L2CAP === -#endif - -//=========================================================================================================================== -// Logical Link Control and Adaptation Protocol (L2CAP) -//=========================================================================================================================== - - -// ACL Packet values (Bluetooth L2CAP spec section 1). - -enum -{ - kBluetoothL2CAPMaxPacketSize = 65535, // Max number of data bytes in an L2CAP packet. - - kBluetoothACLLogicalChannelReserved = 0, // [00] Reserved for future use - kBluetoothACLLogicalChannelL2CAPContinue = 1, // [01] Continuation of L2CAP packet. - kBluetoothACLLogicalChannelL2CAPStart = 2, // [10] Start of L2CAP packet. - kBluetoothACLLogicalChannelLMP = 3 // [11] Link Manager Protocol packet. -}; - -// Channel Identifiers (Bluetooth L2CAP spec section 2.1). - -typedef UInt16 BluetoothL2CAPChannelID; -enum -{ - kBluetoothL2CAPChannelNull = 0x0000, // Illegal, should not be used - kBluetoothL2CAPChannelSignalling = 0x0001, // L2CAP signalling channel - kBluetoothL2CAPChannelConnectionLessData = 0x0002, // L2CAP connection less data - kBluetoothL2CAPChannelAMPManagerProtocol = 0x0003, // AMP Manager Protocol - - // Range 0x0003 to 0x003F reserved for future use. - kBluetoothL2CAPChannelReservedStart = 0x0004, - kBluetoothL2CAPChannelReservedEnd = 0x003F, - - // Range 0x0040 to 0xFFFF are dynamically allocated. - kBluetoothL2CAPChannelDynamicStart = 0x0040, - kBluetoothL2CAPChannelDynamicEnd = 0xffff, - kBluetoothL2CAPChannelEnd = 0xffff -}; - -typedef BluetoothL2CAPChannelID BluetoothL2CAPGroupID; - -// Protocol/Service Multiplexor (PSM) values (Bluetooth L2CAP spec section 5.2). - -typedef UInt16 BluetoothL2CAPPSM; -// PSM enum in BluetoothAssignedNumbers.h - -// Command Codes - -typedef enum -{ - kBluetoothL2CAPCommandCodeReserved = 0x00, - kBluetoothL2CAPCommandCodeCommandReject = 0x01, - kBluetoothL2CAPCommandCodeConnectionRequest = 0x02, - kBluetoothL2CAPCommandCodeConnectionResponse = 0x03, - kBluetoothL2CAPCommandCodeConfigureRequest = 0x04, - kBluetoothL2CAPCommandCodeConfigureResponse = 0x05, - kBluetoothL2CAPCommandCodeDisconnectionRequest = 0x06, - kBluetoothL2CAPCommandCodeDisconnectionResponse = 0x07, - kBluetoothL2CAPCommandCodeEchoRequest = 0x08, - kBluetoothL2CAPCommandCodeEchoResponse = 0x09, - kBluetoothL2CAPCommandCodeInformationRequest = 0x0A, - kBluetoothL2CAPCommandCodeInformationResponse = 0x0B, - kBluetoothL2CAPCommandCodeCreateChannelRequest = 0x0C, - kBluetoothL2CAPCommandCodeCreateChannelResponse = 0x0D, - kBluetoothL2CAPCommandCodeMoveChannelRequest = 0x0E, - kBluetoothL2CAPCommandCodeMoveChannelResponse = 0x0F, - kBluetoothL2CAPCommandCodeMoveChannelConfirmation = 0x10, - kBluetoothL2CAPCommandCodeMoveChannelConfirmationResponse = 0x11, -} BluetoothL2CAPCommandCode; - -// Command Reject - -typedef enum -{ - kBluetoothL2CAPCommandRejectReasonCommandNotUnderstood = 0x0000, - kBluetoothL2CAPCommandRejectReasonSignallingMTUExceeded = 0x0001, - kBluetoothL2CAPCommandRejectReasonInvalidCIDInRequest = 0x0002, -} BluetoothL2CAPCommandRejectReason; - -typedef UInt16 BluetoothL2CAPMTU; -typedef UInt16 BluetoothL2CAPLinkTimeout; -typedef UInt16 BluetoothL2CAPFlushTimeout; -enum -{ - kBluetoothL2CAPFlushTimeoutUseExisting = 0x0000, - kBluetoothL2CAPFlushTimeoutImmediate = 0x0001, - kBluetoothL2CAPFlushTimeoutForever = 0xFFFF, - - kBluetoothL2CAPFlushTimeoutEnd -}; - -typedef struct BluetoothL2CAPQualityOfServiceOptions BluetoothL2CAPQualityOfServiceOptions; -struct BluetoothL2CAPQualityOfServiceOptions -{ - UInt8 flags; - UInt8 serviceType; - UInt32 tokenRate; - UInt32 tokenBucketSize; - UInt32 peakBandwidth; - UInt32 latency; - UInt32 delayVariation; -}; - -typedef struct BluetoothL2CAPRetransmissionAndFlowControlOptions BluetoothL2CAPRetransmissionAndFlowControlOptions; -struct BluetoothL2CAPRetransmissionAndFlowControlOptions -{ - UInt8 flags; - UInt8 txWindowSize; - UInt8 maxTransmit; - UInt16 retransmissionTimeout; - UInt16 monitorTimeout; - UInt16 maxPDUPayloadSize; -}; - -enum -{ - kBluetoothL2CAPInfoTypeMaxConnectionlessMTUSize = 0x0001 -}; - -// Packets - -enum -{ - kBluetoothL2CAPPacketHeaderSize = 4 -}; - -typedef UInt16 BluetoothL2CAPByteCount; -typedef UInt8 BluetoothL2CAPCommandID; -typedef UInt16 BluetoothL2CAPCommandByteCount; - -typedef enum -{ - kBluetoothL2CAPConnectionResultSuccessful = 0x0000, - kBluetoothL2CAPConnectionResultPending = 0x0001, - kBluetoothL2CAPConnectionResultRefusedPSMNotSupported = 0x0002, - kBluetoothL2CAPConnectionResultRefusedSecurityBlock = 0x0003, - kBluetoothL2CAPConnectionResultRefusedNoResources = 0x0004, -} BluetoothL2CAPConnectionResult; - -typedef enum -{ - kBluetoothL2CAPConnectionStatusNoInfoAvailable = 0x0000, - kBluetoothL2CAPConnectionStatusAuthenticationPending = 0x0001, - kBluetoothL2CAPConnectionStatusAuthorizationPending = 0x0002, -} BluetoothL2CAPConnectionStatus; - -typedef enum -{ - kBluetoothL2CAPConfigurationResultSuccess = 0x0000, - kBluetoothL2CAPConfigurationResultUnacceptableParams = 0x0001, - kBluetoothL2CAPConfigurationResultRejected = 0x0002, - kBluetoothL2CAPConfigurationResultUnknownOptions = 0x0003, -} BluetoothL2CAPConfigurationResult; - -typedef enum -{ - kBluetoothL2CAPConfigurationOptionMTU = 0x01, - kBluetoothL2CAPConfigurationOptionFlushTimeout = 0x02, - kBluetoothL2CAPConfigurationOptionQoS = 0x03, - kBluetoothL2CAPConfigurationOptionRetransmissionAndFlowControl = 0x04 -} BluetoothL2CAPConfigurationOption; - -enum -{ - kBluetoothL2CAPConfigurationOptionMTULength = 2, - kBluetoothL2CAPConfigurationOptionFlushTimeoutLength = 2, - kBluetoothL2CAPConfigurationOptionQoSLength = 22, - kBluetoothL2CAPConfigurationOptionRetransmissionAndFlowControlLength = 9 -}; - -typedef enum -{ - kBluetoothL2CAPConfigurationRetransmissionModeFlag = 0x01, - kBluetoothL2CAPConfigurationFlowControlModeFlag = 0x02, - kBluetoothL2CAPConfigurationBasicL2CAPModeFlag = 0x00, -} BluetoothL2CAPConfigurationRetransmissionAndFlowControlFlags; - - -typedef enum -{ - kBluetoothL2CAPInformationTypeConnectionlessMTU = 0x0001, - kBluetoothL2CAPInformationTypeExtendedFeatures = 0x0002, - kBluetoothL2CAPInformationTypeFixedChannelsSupported = 0x0003, -} BluetoothL2CAPInformationType; - -typedef enum -{ - kBluetoothL2CAPInformationResultSuccess = 0x0000, - kBluetoothL2CAPInformationResultNotSupported = 0x0001, -} BluetoothL2CAPInformationResult; - -typedef enum -{ - kBluetoothL2CAPInformationNoExtendedFeatures = 0x00000000, - kBluetoothL2CAPInformationFlowControlMode = 0x00000001, - kBluetoothL2CAPInformationRetransmissionMode = 0x00000002, - kBluetoothL2CAPInformationBidirectionalQoS = 0x00000004, - kBluetoothL2CAPInformationEnhancedRetransmissionMode = 0x00000008, - kBluetoothL2CAPInformationStreamingMode = 0x00000010, - kBluetoothL2CAPInformationFCSOption = 0x00000020, - kBluetoothL2CAPInformationExtendedFlowSpecification = 0x00000040, - kBluetoothL2CAPInformationFixedChannels = 0x00000080, - kBluetoothL2CAPInformationExtendedWindowSize = 0x00000100, - kBluetoothL2CAPUnicastConnectionlessDataReception = 0x00000200, -} BluetoothL2CAPInformationExtendedFeaturesMask; - -typedef enum -{ - kBluetoothL2CAPQoSTypeNoTraffic = 0x00, - kBluetoothL2CAPQoSTypeBestEffort = 0x01, - kBluetoothL2CAPQoSTypeGuaranteed = 0x02, -} BluetoothL2CAPQoSType; - -enum -{ - kBluetoothL2CAPMTUMinimum = 0x0030, // 48 bytes - kBluetoothL2CAPMTUDefault = 0x03F9, // 11.10.08 - dropped back to 1017 from 1021 (don't aggravate the 3DH5 problem between CSR<->BRCM just yet) - kBluetoothL2CAPMTUMaximum = 0xffff, - kBluetoothL2CAPMTUStart = 0x7fff, - kBluetoothL2CAPMTUSIG = 0x0030, // 48 bytes - kBluetoothL2CAPFlushTimeoutDefault = kBluetoothL2CAPFlushTimeoutForever, // 0xffff - kBluetoothL2CAPQoSFlagsDefault = 0, - kBluetoothL2CAPQoSTypeDefault = kBluetoothL2CAPQoSTypeBestEffort, // 0x01 - kBluetoothL2CAPQoSTokenRateDefault = 0x00000000, - kBluetoothL2CAPQoSTokenBucketSizeDefault = 0x00000000, - kBluetoothL2CAPQoSPeakBandwidthDefault = 0x00000000, - kBluetoothL2CAPQoSLatencyDefault = 0xffffffff, - kBluetoothL2CAPQoSDelayVariationDefault = 0xffffffff -}; - -#pragma mark === AMP Manager === -typedef enum { - kBluetoothAMPManagerCodeReserved = 0x00, - kBluetoothAMPManagerCodeAMPCommandReject = 0x01, - kBluetoothAMPManagerCodeAMPDiscoverRequest = 0x02, - kBluetoothAMPManagerCodeAMPDiscoverResponse = 0x03, - kBluetoothAMPManagerCodeAMPChangeNotify = 0x04, - kBluetoothAMPManagerCodeAMPChangeResponse = 0x05, - kBluetoothAMPManagerCodeAMPGetInfoRequest = 0x06, - kBluetoothAMPManagerCodeAMPGetInfoResponse = 0x07, - kBluetoothAMPManagerCodeAMPGetAssocRequest = 0x08, - kBluetoothAMPManagerCodeAMPGetAssocResponse = 0x09, - kBluetoothAMPManagerCodeAMPCreatePhysicalLinkRequest = 0x0A, - kBluetoothAMPManagerCodeAMPCreatePhysicalLinkResponse = 0x0B, - kBluetoothAMPManagerCodeAMPDisconnectPhysicalLinkRequest = 0x0C, - kBluetoothAMPManagerCodeAMPDisconnectPhysicalLinkResponse = 0x0D, -} BluetoothAMPManagerCode; - -typedef enum { - kBluetoothAMPManagerCommandRejectReasonCommandNotRecognized = 0x0000, -} BluetoothAMPCommandRejectReason; - -typedef enum { - kBluetoothAMPManagerDiscoverResponseControllerStatusPoweredDown = 0x00, - kBluetoothAMPManagerDiscoverResponseControllerStatusBluetoothOnly = 0x01, - kBluetoothAMPManagerDiscoverResponseControllerStatusNoCapacity = 0x02, - kBluetoothAMPManagerDiscoverResponseControllerStatusLowCapacity = 0x03, - kBluetoothAMPManagerDiscoverResponseControllerStatusMediumCapacity = 0x04, - kBluetoothAMPManagerDiscoverResponseControllerStatusHighCapacity = 0x05, - kBluetoothAMPManagerDiscoverResponseControllerStatusFullCapacity = 0x06, -} BluetoothAMPDiscoverResponseControllerStatus; - -typedef enum { - kBluetoothAMPManagerGetInfoResponseSuccess = 0x00, - kBluetoothAMPManagerGetInfoResponseInvalidControllerID = 0x01, -} BluetoothAMPGetInfoResponseStatus; - -typedef enum { - kBluetoothAMPManagerGetAssocResponseSuccess = 0x00, - kBluetoothAMPManagerGetAssocResponseInvalidControllerID = 0x01, -} BluetoothAMPGetAssocResponseStatus; - -typedef enum { - kBluetoothAMPManagerCreatePhysicalLinkResponseSuccess = 0x00, - kBluetoothAMPManagerCreatePhysicalLinkResponseInvalidControllerID = 0x01, - kBluetoothAMPManagerCreatePhysicalLinkResponseUnableToStartLinkCreation = 0x02, - kBluetoothAMPManagerCreatePhysicalLinkResponseCollisionOccurred = 0x03, - kBluetoothAMPManagerCreatePhysicalLinkResponseAMPDisconnectedPhysicalLinkRequestReceived = 0x04, - kBluetoothAMPManagerCreatePhysicalLinkResponsePhysicalLinkAlreadyExists = 0x05, - kBluetoothAMPManagerCreatePhysicalLinkResponseSecurityViolation = 0x06, -} BluetoothAMPCreatePhysicalLinkResponseStatus; - -typedef enum { - kBluetoothAMPManagerDisconnectPhysicalLinkResponseSuccess = 0x00, - kBluetoothAMPManagerDisconnectPhysicalLinkResponseInvalidControllerID = 0x01, - kBluetoothAMPManagerDisconnectPhysicalLinkResponseNoPhysicalLink = 0x02, -} BluetoothAMPDisconnectPhysicalLinkResponseStatus; - -#if 0 -#pragma mark - -#pragma mark === HCI === -#endif - -//=========================================================================================================================== -// Host Controller Interface (HCI) -//=========================================================================================================================== - -// HCI Command Packet -// ------------------ -// -// 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 -// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 -// +--------------------------------+---------------+--------------+ -// | OpCode | | | -// +--------------------+-----------| Param Length | Params... | -// | OCF | OGF | | | -// +--------------------+-----------+---------------+--------------+ -// | | -// | Params... | -// | | -// +---------------------------------------------------------------+ - -// Commands - -typedef UInt8 BluetoothHCICommandOpCodeGroup; -typedef UInt16 BluetoothHCICommandOpCodeCommand; -typedef UInt16 BluetoothHCICommandOpCode; -typedef UInt32 BluetoothHCIVendorCommandSelector; - -#define BluetoothHCIMakeCommandOpCode( GROUP, CMD ) ( ( ( ( GROUP ) & 0x003F ) << 10 ) | ( ( CMD ) & 0x03FF ) ) -#define BluetoothHCIMakeCommandOpCodeEndianSwap( GROUP, CMD ) ( CFSwapInt16HostToLittle ( BluetoothHCIMakeCommandOpCode( GROUP, CMD ) ) ) -#define BluetoothHCIExtractCommandOpCodeGroup( OPCODE ) ( ( ( OPCODE ) >> 10 ) & 0x003F ) -#define BluetoothHCIExtractCommandOpCodeCommand( OPCODE ) ( ( OPCODE ) & 0x03FF ) - -#define BluetoothHCIMakeCommandOpCodeHostOrder(GROUP, CMD ) OSSwapLittleToHostConstInt16( ( ( ( GROUP ) & 0x003F ) << 10 ) | ( ( CMD ) & 0x03FF ) ) - - -enum -{ - // Command Group: NoOp - - kBluetoothHCIOpCodeNoOp = 0, - kBluetoothHCICommandGroupNoOp = 0x00, - kBluetoothHCICommandNoOp = 0x0000, - - // Command Group: Link Control - - kBluetoothHCICommandGroupLinkControl = 0x01, - kBluetoothHCICommandInquiry = 0x0001, - kBluetoothHCICommandInquiryCancel = 0x0002, - kBluetoothHCICommandPeriodicInquiryMode = 0x0003, - kBluetoothHCICommandExitPeriodicInquiryMode = 0x0004, - kBluetoothHCICommandCreateConnection = 0x0005, - kBluetoothHCICommandDisconnect = 0x0006, - kBluetoothHCICommandAddSCOConnection = 0x0007, - kBluetoothHCICommandCreateConnectionCancel = 0x0008, - kBluetoothHCICommandAcceptConnectionRequest = 0x0009, - kBluetoothHCICommandRejectConnectionRequest = 0x000A, - kBluetoothHCICommandLinkKeyRequestReply = 0x000B, - kBluetoothHCICommandLinkKeyRequestNegativeReply = 0x000C, - kBluetoothHCICommandPINCodeRequestReply = 0x000D, - kBluetoothHCICommandPINCodeRequestNegativeReply = 0x000E, - kBluetoothHCICommandChangeConnectionPacketType = 0x000F, - kBluetoothHCICommandAuthenticationRequested = 0x0011, - kBluetoothHCICommandSetConnectionEncryption = 0x0013, - kBluetoothHCICommandChangeConnectionLinkKey = 0x0015, - kBluetoothHCICommandMasterLinkKey = 0x0017, - kBluetoothHCICommandRemoteNameRequest = 0x0019, - kBluetoothHCICommandReadRemoteSupportedFeatures = 0x001B, - kBluetoothHCICommandReadRemoteExtendedFeatures = 0x001C, - kBluetoothHCICommandReadRemoteVersionInformation = 0x001D, - kBluetoothHCICommandReadClockOffset = 0x001F, - kBluetoothHCICommandRemoteNameRequestCancel = 0x001A, - kBluetoothHCICommandReadLMPHandle = 0x0020, - kBluetoothHCICommandSetupSynchronousConnection = 0x0028, - kBluetoothHCICommandAcceptSynchronousConnectionRequest = 0x0029, - kBluetoothHCICommandRejectSynchronousConnectionRequest = 0x002A, - kBluetoothHCICommandIOCapabilityRequestReply = 0x002B, - kBluetoothHCICommandUserConfirmationRequestReply = 0x002C, - kBluetoothHCICommandUserConfirmationRequestNegativeReply = 0x002D, - kBluetoothHCICommandUserPasskeyRequestReply = 0x002E, - kBluetoothHCICommandUserPasskeyRequestNegativeReply = 0x002F, - kBluetoothHCICommandRemoteOOBDataRequestReply = 0x0030, - kBluetoothHCICommandRemoteOOBDataRequestNegativeReply = 0x0033, - - // Command Group: Link Policy - - kBluetoothHCICommandGroupLinkPolicy = 0x02, - kBluetoothHCICommandHoldMode = 0x0001, - kBluetoothHCICommandSniffMode = 0x0003, - kBluetoothHCICommandExitSniffMode = 0x0004, - kBluetoothHCICommandParkMode = 0x0005, - kBluetoothHCICommandExitParkMode = 0x0006, - kBluetoothHCICommandQoSSetup = 0x0007, - kBluetoothHCICommandRoleDiscovery = 0x0009, - kBluetoothHCICommandSwitchRole = 0x000B, - kBluetoothHCICommandReadLinkPolicySettings = 0x000C, - kBluetoothHCICommandWriteLinkPolicySettings = 0x000D, - kBluetoothHCICommandReadDefaultLinkPolicySettings = 0x000E, - kBluetoothHCICommandWriteDefaultLinkPolicySettings = 0x000F, - kBluetoothHCICommandFlowSpecification = 0x0010, - kBluetoothHCICommandSniffSubrating = 0x0011, - kBluetoothHCICommandAcceptSniffRequest = 0x0031, - kBluetoothHCICommandRejectSniffRequest = 0x0032, - - // Command Group: Host Controller & Baseband - - kBluetoothHCICommandGroupHostController = 0x03, - kBluetoothHCICommandSetEventMask = 0x0001, - kBluetoothHCICommandReset = 0x0003, - kBluetoothHCICommandSetEventFilter = 0x0005, - kBluetoothHCICommandFlush = 0x0008, - kBluetoothHCICommandReadPINType = 0x0009, - kBluetoothHCICommandWritePINType = 0x000A, - kBluetoothHCICommandCreateNewUnitKey = 0x000B, - kBluetoothHCICommandReadStoredLinkKey = 0x000D, - kBluetoothHCICommandWriteStoredLinkKey = 0x0011, - kBluetoothHCICommandDeleteStoredLinkKey = 0x0012, - kBluetoothHCICommandChangeLocalName = 0x0013, - kBluetoothHCICommandReadLocalName = 0x0014, - kBluetoothHCICommandReadConnectionAcceptTimeout = 0x0015, - kBluetoothHCICommandWriteConnectionAcceptTimeout = 0x0016, - kBluetoothHCICommandReadPageTimeout = 0x0017, - kBluetoothHCICommandWritePageTimeout = 0x0018, - kBluetoothHCICommandReadScanEnable = 0x0019, - kBluetoothHCICommandWriteScanEnable = 0x001A, - kBluetoothHCICommandReadPageScanActivity = 0x001B, - kBluetoothHCICommandWritePageScanActivity = 0x001C, - kBluetoothHCICommandReadInquiryScanActivity = 0x001D, - kBluetoothHCICommandWriteInquiryScanActivity = 0x001E, - kBluetoothHCICommandReadAuthenticationEnable = 0x001F, - kBluetoothHCICommandWriteAuthenticationEnable = 0x0020, - kBluetoothHCICommandReadEncryptionMode = 0x0021, - kBluetoothHCICommandWriteEncryptionMode = 0x0022, - kBluetoothHCICommandReadClassOfDevice = 0x0023, - kBluetoothHCICommandWriteClassOfDevice = 0x0024, - kBluetoothHCICommandReadVoiceSetting = 0x0025, - kBluetoothHCICommandWriteVoiceSetting = 0x0026, - kBluetoothHCICommandReadAutomaticFlushTimeout = 0x0027, - kBluetoothHCICommandWriteAutomaticFlushTimeout = 0x0028, - kBluetoothHCICommandReadNumberOfBroadcastRetransmissions = 0x0029, - kBluetoothHCICommandWriteNumberOfBroadcastRetransmissions = 0x002A, - kBluetoothHCICommandReadHoldModeActivity = 0x002B, - kBluetoothHCICommandWriteHoldModeActivity = 0x002C, - kBluetoothHCICommandReadTransmitPowerLevel = 0x002D, - kBluetoothHCICommandReadSCOFlowControlEnable = 0x002E, - kBluetoothHCICommandWriteSCOFlowControlEnable = 0x002F, - kBluetoothHCICommandSetHostControllerToHostFlowControl = 0x0031, - kBluetoothHCICommandHostBufferSize = 0x0033, - kBluetoothHCICommandHostNumberOfCompletedPackets = 0x0035, - kBluetoothHCICommandReadLinkSupervisionTimeout = 0x0036, - kBluetoothHCICommandWriteLinkSupervisionTimeout = 0x0037, - kBluetoothHCICommandReadNumberOfSupportedIAC = 0x0038, - kBluetoothHCICommandReadCurrentIACLAP = 0x0039, - kBluetoothHCICommandWriteCurrentIACLAP = 0x003A, - kBluetoothHCICommandReadPageScanPeriodMode = 0x003B, - kBluetoothHCICommandWritePageScanPeriodMode = 0x003C, - kBluetoothHCICommandReadPageScanMode = 0x003D, - kBluetoothHCICommandWritePageScanMode = 0x003E, - kBluetoothHCICommandSetAFHClassification = 0x003F, - kBluetoothHCICommandReadInquiryScanType = 0x0042, - kBluetoothHCICommandWriteInquiryScanType = 0x0043, - kBluetoothHCICommandReadInquiryMode = 0x0044, - kBluetoothHCICommandWriteInquiryMode = 0x0045, - kBluetoothHCICommandReadPageScanType = 0x0046, - kBluetoothHCICommandWritePageScanType = 0x0047, - kBluetoothHCICommandReadAFHChannelAssessmentMode = 0x0048, - kBluetoothHCICommandWriteAFHChannelAssessmentMode = 0x0049, - kBluetoothHCICommandReadExtendedInquiryResponse = 0x0051, - kBluetoothHCICommandWriteExtendedInquiryResponse = 0x0052, - kBluetoothHCICommandReadSimplePairingMode = 0x0055, - kBluetoothHCICommandWriteSimplePairingMode = 0x0056, - kBluetoothHCICommandReadLocalOOBData = 0x0057, - kBluetoothHCICommandReadInquiryResponseTransmitPower = 0x0058, - kBluetoothHCICommandWriteInquiryResponseTransmitPower = 0x0059, - kBluetoothHCICommandReadDefaultErroneousDataReporting = 0x005A, - kBluetoothHCICommandWriteDefaultErroneousDataReporting = 0x005B, - kBluetoothHCICommandReadPersistentSniffInterval = 0x005C, - kBluetoothHCICommandWritePersistentSniffInterval = 0x005D, - kBluetoothHCICommandDeletePersistentSniffInterval = 0x005E, - kBluetoothHCICommandEnhancedFlush = 0x005F, - kBluetoothHCICommandSendKeypressNotification = 0x0060, - - // Command Group: Informational - - kBluetoothHCICommandGroupInformational = 0x04, - kBluetoothHCICommandReadLocalVersionInformation = 0x0001, - kBluetoothHCICommandReadLocalSupportedCommands = 0x0002, - kBluetoothHCICommandReadLocalSupportedFeatures = 0x0003, - kBluetoothHCICommandReadLocalExtendedFeatures = 0x0004, - kBluetoothHCICommandReadBufferSize = 0x0005, - kBluetoothHCICommandReadCountryCode = 0x0007, - kBluetoothHCICommandReadDeviceAddress = 0x0009, - - // Command Group: Status - - kBluetoothHCICommandGroupStatus = 0x05, - kBluetoothHCICommandReadFailedContactCounter = 0x0001, - kBluetoothHCICommandResetFailedContactCounter = 0x0002, - kBluetoothHCICommandGetLinkQuality = 0x0003, - kBluetoothHCICommandReadRSSI = 0x0005, - kBluetoothHCICommandReadAFHMappings = 0x0006, - kBluetoothHCICommandReadClock = 0x0007, - - // Command Group: Testing - - kBluetoothHCICommandGroupTesting = 0x06, - kBluetoothHCICommandReadLoopbackMode = 0x0001, - kBluetoothHCICommandWriteLoopbackMode = 0x0002, - kBluetoothHCICommandEnableDeviceUnderTestMode = 0x0003, - kBluetoothHCICommandWriteSimplePairingDebugMode = 0x0004, - - // Command Group: Logo Testing (no commands yet) - - kBluetoothHCICommandGroupLogoTesting = 0x3E, - - // Command Group: Vendor Specific (from Broadcom HCI Programmer's Reference Guide) - - kBluetoothHCICommandGroupVendorSpecific = 0x3f, - kBluetoothHCICommandWriteDeviceAddress = 0x0001, - kBluetoothHCICommandWriteHoppingChannels = 0x0012, - kBluetoothHCICommandInvalidateFlashAndReboot = 0x0017, - kBluetoothHCICommandSetMaxPower = 0x0026, - kBluetoothHCICommandEnableHIDEmulation = 0x003B, - kBluetoothHCICommandEnableRadio = 0x0034, - kBluetoothHCIGetHIDDeviceList = 0x0036, - kBluetoothHCIAddHIDDevice = 0x0037, - kBluetoothHCIRemoveHIDDevice = 0x0039, - - kBluetoothHCICommandGroupMax = 0x40, - kBluetoothHCICommandMax = 0x03FF -}; - -// HCI Data Types - -typedef UInt8 BluetoothHCIQoSFlags; -typedef UInt8 BluetoothHCIParamByteCount; -typedef UInt16 BluetoothHCIACLDataByteCount; -typedef UInt8 BluetoothHCISCODataByteCount; -typedef UInt8 BluetoothHCIInquiryLength; -typedef UInt8 BluetoothHCIResponseCount; -typedef UInt8 BluetoothHCICountryCode; -typedef UInt16 BluetoothHCIModeInterval; -typedef UInt16 BluetoothHCISniffAttemptCount; -typedef UInt16 BluetoothHCISniffTimeout; -typedef UInt16 BluetoothHCIParkModeBeaconInterval; - -typedef UInt8 BluetoothMaxSlots; -typedef UInt16 BluetoothManufacturerName; -typedef UInt8 BluetoothLMPVersion; -typedef UInt16 BluetoothLMPSubversion; - -typedef UInt8 BluetoothHCIConnectionMode; -enum BluetoothHCIConnectionModes -{ - kConnectionActiveMode = 0, - kConnectionHoldMode = 1, - kConnectionSniffMode = 2, - kConnectionParkMode = 3, - kConnectionModeReservedForFutureUse = 4, -}; - -typedef struct BluetoothHCISupportedFeatures BluetoothHCISupportedFeatures; -struct BluetoothHCISupportedFeatures -{ - UInt8 data[8]; -}; - -#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 -typedef UInt8 BluetoothHCIPageNumber; -typedef struct BluetoothHCIExtendedFeaturesInfo BluetoothHCIExtendedFeaturesInfo; -struct BluetoothHCIExtendedFeaturesInfo -{ - BluetoothHCIPageNumber page; - BluetoothHCIPageNumber maxPage; - UInt8 data[8]; -}; -#endif /* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 */ - -enum BluetoothFeatureBits -{ - // Byte 0 of the support features data structure. - - kBluetoothFeatureThreeSlotPackets = (1 << 0L), - kBluetoothFeatureFiveSlotPackets = (1 << 1L), - kBluetoothFeatureEncryption = (1 << 2L), - kBluetoothFeatureSlotOffset = (1 << 3L), - kBluetoothFeatureTimingAccuracy = (1 << 4L), - kBluetoothFeatureSwitchRoles = (1 << 5L), - kBluetoothFeatureHoldMode = (1 << 6L), - kBluetoothFeatureSniffMode = (1 << 7L), - - // Byte 1 of the support features data structure. - - kBluetoothFeatureParkMode = (1 << 0L), - kBluetoothFeatureRSSI = (1 << 1L), - kBluetoothFeaturePowerControlRequests = (1 << 1L), - kBluetoothFeatureChannelQuality = (1 << 2L), - kBluetoothFeatureSCOLink = (1 << 3L), - kBluetoothFeatureHV2Packets = (1 << 4L), - kBluetoothFeatureHV3Packets = (1 << 5L), - kBluetoothFeatureULawLog = (1 << 6L), - kBluetoothFeatureALawLog = (1 << 7L), - - // Byte 2 of the support features data structure. - - kBluetoothFeatureCVSD = (1 << 0L), - kBluetoothFeaturePagingScheme = (1 << 1L), - kBluetoothFeaturePowerControl = (1 << 2L), - kBluetoothFeatureTransparentSCOData = (1 << 3L), - kBluetoothFeatureFlowControlLagBit0 = (1 << 4L), - kBluetoothFeatureFlowControlLagBit1 = (1 << 5L), - kBluetoothFeatureFlowControlLagBit2 = (1 << 6L), - kBluetoothFeatureBroadcastEncryption = (1 << 7L), - - // Byte 3 of the support features data structure. - - kBluetoothFeatureScatterMode = (1 << 0L), - kBluetoothFeatureEnhancedDataRateACL2MbpsMode = (1 << 1L), - kBluetoothFeatureEnhancedDataRateACL3MbpsMode = (1 << 2L), - kBluetoothFeatureEnhancedInquiryScan = (1 << 3L), - kBluetoothFeatureInterlacedInquiryScan = (1 << 4L), - kBluetoothFeatureInterlacedPageScan = (1 << 5L), - kBluetoothFeatureRSSIWithInquiryResult = (1 << 6L), - kBluetoothFeatureExtendedSCOLink = (1 << 7L), - - // Byte 4 of the support features data structure. - - kBluetoothFeatureEV4Packets = (1 << 0L), - kBluetoothFeatureEV5Packets = (1 << 1L), - kBluetoothFeatureAbsenceMasks = (1 << 2L), - kBluetoothFeatureAFHCapableSlave = (1 << 3L), - kBluetoothFeatureAFHClassificationSlave = (1 << 4L), - kBluetoothFeatureAliasAuhentication = (1 << 5L), - kBluetoothFeatureAnonymityMode = (1 << 6L), - kBluetoothFeature3SlotEnhancedDataRateACLPackets = (1 << 7L), - - // Byte 5 of the support features data structure. - - kBluetoothFeature5SlotEnhancedDataRateACLPackets = (1 << 0L), // 2.0 version of this header had this at the wrong bit location - kBluetoothFeatureSniffSubrating = (1 << 1L), - kBluetoothFeaturePauseEncryption = (1 << 2L), - kBluetoothFeatureAFHCapableMaster = (1 << 3L), - kBluetoothFeatureAFHClassificationMaster = (1 << 4L), - kBluetoothFeatureEnhancedDataRateeSCO2MbpsMode = (1 << 5L), - kBluetoothFeatureEnhancedDataRateeSCO3MbpsMode = (1 << 6L), - kBluetoothFeature3SlotEnhancedDataRateeSCOPackets = (1 << 7L), - - // Byte 6 of the support features data structure. - - kBluetoothFeatureExtendedInquiryResponse = (1 << 0L), - kBluetoothFeatureSecureSimplePairing = (1 << 3L), - kBluetoothFeatureEncapsulatedPDU = (1 << 4L), - kBluetoothFeatureErroneousDataReporting = (1 << 5L), - kBluetoothFeatureNonFlushablePacketBoundaryFlag = (1 << 6L), - - // Byte 7 of the support features data structure. - - kBluetoothFeatureLinkSupervisionTimeoutChangedEvent = (1 << 0L), - kBluetoothFeatureInquiryTransmissionPowerLevel = (1 << 1L), - kBluetoothFeatureExtendedFeatures = (1 << 7L), - - // Byte 8 of the support features data structure (extended) - - kBluetoothFeatureSimpleSecurePairingHostMode = (1 << 0L), - -}; - -typedef UInt16 BluetoothHCIFailedContactCount; -typedef struct BluetoothHCIFailedContactInfo BluetoothHCIFailedContactInfo; -struct BluetoothHCIFailedContactInfo -{ - BluetoothHCIFailedContactCount count; - BluetoothConnectionHandle handle; -}; - -typedef SInt8 BluetoothHCIRSSIValue; /* Valid Range: -127 to +20 */ -typedef struct BluetoothHCIRSSIInfo BluetoothHCIRSSIInfo; -struct BluetoothHCIRSSIInfo -{ - BluetoothConnectionHandle handle; - BluetoothHCIRSSIValue RSSIValue; -}; - -typedef UInt8 BluetoothHCILinkQuality; -typedef struct BluetoothHCILinkQualityInfo BluetoothHCILinkQualityInfo; -struct BluetoothHCILinkQualityInfo -{ - BluetoothConnectionHandle handle; - BluetoothHCILinkQuality qualityValue; -}; - -typedef UInt8 BluetoothHCIRole; -typedef struct BluetoothHCIRoleInfo BluetoothHCIRoleInfo; -struct BluetoothHCIRoleInfo -{ - UInt8 role; - BluetoothConnectionHandle handle; -}; - -enum BluetoothHCIRoles -{ - kBluetoothHCIMasterRole = 0x00, - kBluetoothHCISlaveRole = 0x01 -}; - -typedef UInt16 BluetoothHCILinkPolicySettings; -enum BluetoothHCILinkPolicySettingsValues -{ - kDisableAllLMModes = 0x0000, - kEnableMasterSlaveSwitch = 0x0001, - kEnableHoldMode = 0x0002, - kEnableSniffMode = 0x0004, - kEnableParkMode = 0x0008, - kReservedForFutureUse = 0x0010 -}; - -typedef struct BluetoothHCILinkPolicySettingsInfo BluetoothHCILinkPolicySettingsInfo; -struct BluetoothHCILinkPolicySettingsInfo -{ - BluetoothHCILinkPolicySettings settings; - BluetoothConnectionHandle handle; -}; - - -typedef struct BluetoothHCIQualityOfServiceSetupParams BluetoothHCIQualityOfServiceSetupParams; -struct BluetoothHCIQualityOfServiceSetupParams -{ - UInt8 flags; - UInt8 serviceType; - UInt32 tokenRate; - UInt32 peakBandwidth; - UInt32 latency; - UInt32 delayVariation; -}; - -typedef UInt8 BluetoothHCILoopbackMode; -enum -{ - kBluetoothHCILoopbackModeOff = 0x00, - kBluetoothHCILoopbackModeLocal = 0x01, - kBluetoothHCILoopbackModeRemote = 0x02 -}; - -typedef UInt32 BluetoothHCIOperationID; -typedef UInt32 BluetoothHCIEventID; -typedef UInt32 BluetoothHCIDataID; -typedef UInt32 BluetoothHCISignalID; -typedef UInt32 BluetoothHCITransportID; -typedef UInt32 BluetoothHCITransportCommandID; -typedef UInt32 BluetoothHCIRequestID; - - -// Version Information - -typedef struct BluetoothHCIVersionInfo BluetoothHCIVersionInfo; -struct BluetoothHCIVersionInfo -{ - // Local & Remote information - - BluetoothManufacturerName manufacturerName; - BluetoothLMPVersion lmpVersion; - BluetoothLMPSubversion lmpSubVersion; - - // Local information only - - UInt8 hciVersion; - UInt16 hciRevision; -}; - -// HCI buffer sizes. - -typedef struct BluetoothHCIBufferSize BluetoothHCIBufferSize; -struct BluetoothHCIBufferSize -{ - UInt16 ACLDataPacketLength; - UInt8 SCODataPacketLength; - UInt16 totalNumACLDataPackets; - UInt16 totalNumSCODataPackets; -}; - -// Timeouts -typedef UInt16 BluetoothHCIConnectionAcceptTimeout; -typedef UInt16 BluetoothHCIPageTimeout; -enum BluetoothHCITimeoutValues -{ - kDefaultPageTimeout = 0x2000, -}; - -#define BluetoothGetSlotsFromSeconds( inSeconds ) ( (inSeconds/.000625 ) ) - - -// Link Keys -typedef UInt16 BluetoothHCINumLinkKeysDeleted; -typedef UInt8 BluetoothHCINumLinkKeysToWrite; -typedef UInt8 BluetoothHCIDeleteStoredLinkKeyFlag; -enum BluetoothHCIDeleteStoredLinkKeyFlags -{ - kDeleteKeyForSpecifiedDeviceOnly = 0x00, - kDeleteAllStoredLinkKeys = 0x01, -}; - -typedef UInt8 BluetoothHCIReadStoredLinkKeysFlag; -enum BluetoothHCIReadStoredLinkKeysFlags -{ - kReturnLinkKeyForSpecifiedDeviceOnly = 0x00, - kReadAllStoredLinkKeys = 0x01, -}; - -typedef struct BluetoothHCIStoredLinkKeysInfo BluetoothHCIStoredLinkKeysInfo; -struct BluetoothHCIStoredLinkKeysInfo -{ - UInt16 numLinkKeysRead; - UInt16 maxNumLinkKeysAllowedInDevice; -}; - - -// Page Scan - -typedef UInt8 BluetoothHCIPageScanMode; -enum BluetoothHCIPageScanModes -{ - kMandatoryPageScanMode = 0x00, - kOptionalPageScanMode1 = 0x01, - kOptionalPageScanMode2 = 0x02, - kOptionalPageScanMode3 = 0x03, -}; - -typedef UInt8 BluetoothHCIPageScanPeriodMode; -enum BluetoothHCIPageScanPeriodModes -{ - kP0Mode = 0x00, - kP1Mode = 0x01, - kP2Mode = 0x02, -}; - -typedef UInt8 BluetoothHCIPageScanEnableState; -enum BluetoothHCIPageScanEnableStates -{ - kNoScansEnabled = 0x00, - kInquiryScanEnabledPageScanDisabled = 0x01, - kInquiryScanDisabledPageScanEnabled = 0x02, - kInquiryScanEnabledPageScanEnabled = 0x03, -}; - -typedef struct BluetoothHCIScanActivity BluetoothHCIScanActivity; -struct BluetoothHCIScanActivity -{ - UInt16 scanInterval; - UInt16 scanWindow; -}; - -typedef struct BluetoothHCIInquiryAccessCode BluetoothHCIInquiryAccessCode; -struct BluetoothHCIInquiryAccessCode -{ - UInt8 data[3]; -}; - -typedef UInt8 BluetoothHCIInquiryAccessCodeCount; -typedef struct BluetoothHCICurrentInquiryAccessCodes BluetoothHCICurrentInquiryAccessCodes; -struct BluetoothHCICurrentInquiryAccessCodes -{ - BluetoothHCIInquiryAccessCodeCount count; // Number of codes in array. - BluetoothHCIInquiryAccessCode * codes; // Ptr to array of codes. -}; - -typedef struct BluetoothHCILinkSupervisionTimeout BluetoothHCILinkSupervisionTimeout; -struct BluetoothHCILinkSupervisionTimeout -{ - BluetoothConnectionHandle handle; - UInt16 timeout; -}; - -typedef UInt8 BluetoothHCIFlowControlState; -enum BluetoothHCISCOFlowControlStates -{ - kSCOFlowControlDisabled = 0x00, - kSCOFlowControlEnabled = 0x01 -}; - -enum BluetoothHCIGeneralFlowControlStates -{ - kHostControllerToHostFlowControlOff = 0x00, - kHCIACLDataPacketsOnHCISCODataPacketsOff = 0x01, - kHCIACLDataPacketsOffHCISCODataPacketsOn = 0x02, - kHCIACLDataPacketsOnHCISCODataPacketsOn = 0x03, -}; - -typedef SInt8 BluetoothHCITransmitPowerLevel; -typedef UInt8 BluetoothHCITransmitPowerLevelType; -enum BluetoothHCITransmitReadPowerLevelTypes -{ - kReadCurrentTransmitPowerLevel = 0x00, - kReadMaximumTransmitPowerLevel = 0x01, -}; - -typedef UInt8 BluetoothHCIAFHChannelAssessmentMode; -enum BluetoothHCIAFHChannelAssessmentModes -{ - kAFHChannelAssessmentModeDisabled = 0x00, - kAFHChannelAssessmentModeEnabled = 0x01 -}; - - -typedef struct BluetoothHCITransmitPowerLevelInfo BluetoothHCITransmitPowerLevelInfo; -struct BluetoothHCITransmitPowerLevelInfo -{ - BluetoothConnectionHandle handle; - BluetoothHCITransmitPowerLevel level; // Range: -70 <= N <= 20 (units are dBm) -}; - -typedef UInt8 BluetoothHCINumBroadcastRetransmissions; -typedef UInt8 BluetoothHCIHoldModeActivity; -enum BluetoothHCIHoldModeActivityStates -{ - kMaintainCurrentPowerState = 0x00, - kSuspendPageScan = 0x01, - kSuspendInquiryScan = 0x02, - kSuspendPeriodicInquiries = 0x03, -}; - -typedef UInt8 BluetoothHCIAuthenticationEnable; -enum BluetoothHCIAuthentionEnableModes -{ - kAuthenticationDisabled = 0x00, - kAuthenticationEnabled = 0x01, -}; - -typedef UInt8 BluetoothHCIEncryptionMode; -enum BluetoothHCIEncryptionModes -{ - kEncryptionDisabled = 0x00, // Default. - kEncryptionOnlyForPointToPointPackets = 0x01, - kEncryptionForBothPointToPointAndBroadcastPackets = 0x02, -}; - -typedef UInt16 BluetoothHCIAutomaticFlushTimeout; -typedef struct BluetoothHCIAutomaticFlushTimeoutInfo BluetoothHCIAutomaticFlushTimeoutInfo; -struct BluetoothHCIAutomaticFlushTimeoutInfo -{ - BluetoothConnectionHandle handle; - BluetoothHCIAutomaticFlushTimeout timeout; -}; - -#define kInfoStringMaxLength 25 -typedef struct BluetoothTransportInfo BluetoothTransportInfo; -typedef BluetoothTransportInfo* BluetoothTransportInfoPtr; -struct BluetoothTransportInfo -{ - UInt32 productID; - UInt32 vendorID; - UInt32 type; - char productName[kInfoStringMaxLength]; - char vendorName[kInfoStringMaxLength]; -}; - -enum BluetoothTransportTypes -{ - kBluetoothTransportTypeUSB = 0x01, - kBluetoothTransportTypePCCard = 0x02, - kBluetoothTransportTypePCICard = 0x03 -}; - -// Inquiries - -typedef struct BluetoothHCIInquiryResult BluetoothHCIInquiryResult; -struct BluetoothHCIInquiryResult -{ - BluetoothDeviceAddress deviceAddress; - BluetoothPageScanRepetitionMode pageScanRepetitionMode; - BluetoothHCIPageScanPeriodMode pageScanPeriodMode; - BluetoothHCIPageScanMode pageScanMode; - BluetoothClassOfDevice classOfDevice; - BluetoothClockOffset clockOffset; -}; - -#define kBluetoothHCIInquiryResultsMaxResults 50 -typedef struct BluetoothHCIInquiryResults BluetoothHCIInquiryResults; -struct BluetoothHCIInquiryResults -{ - BluetoothHCIInquiryResult results[kBluetoothHCIInquiryResultsMaxResults]; - IOItemCount count; -}; - -#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0 - -//Inquiries with RSSI (v1.2 specification) - -typedef struct BluetoothHCIInquiryWithRSSIResult BluetoothHCIInquiryWithRSSIResult; -struct BluetoothHCIInquiryWithRSSIResult -{ - BluetoothDeviceAddress deviceAddress; - BluetoothPageScanRepetitionMode pageScanRepetitionMode; - UInt8 reserved; - BluetoothClassOfDevice classOfDevice; - BluetoothClockOffset clockOffset; - BluetoothHCIRSSIValue RSSIValue; -}; - -typedef struct BluetoothHCIInquiryWithRSSIResults BluetoothHCIInquiryWithRSSIResults; -struct BluetoothHCIInquiryWithRSSIResults -{ - BluetoothHCIInquiryWithRSSIResult results[50]; - IOItemCount count; -}; - -//Inquiries with 'Extended Inquiry Response' (v2.1 specification) - -typedef UInt8 BluetoothHCIFECRequired; -enum BluetoothHCIFECRequiredValues -{ - kBluetoothHCIFECRequired = 0x00, - kBluetoothHCIFECNotRequired = 0x01 -}; - -typedef UInt8 BluetoothHCIInquiryMode; -enum BluetoothHCIInquiryModes -{ - kBluetoothHCIInquiryModeResultFormatStandard = 0x00, - kBluetoothHCIInquiryModeResultFormatWithRSSI = 0x01, - kBluetoothHCIInquiryModeResultFormatWithRSSIOrExtendedInquiryResultFormat = 0x02 -}; - -typedef UInt8 BluetoothHCIExtendedInquiryResponseDataType; - -typedef struct BluetoothHCIExtendedInquiryResponse BluetoothHCIExtendedInquiryResponse; /* Extended Inquiry Response [EIR] data, consisting of a sequence of data structures in this format: [length(1byte)][data type(1byte)][data(e.g. device name)] */ -struct BluetoothHCIExtendedInquiryResponse -{ - UInt8 data[ 240 ]; -}; - -typedef struct BluetoothHCIReadExtendedInquiryResponseResults BluetoothHCIReadExtendedInquiryResponseResults; -struct BluetoothHCIReadExtendedInquiryResponseResults -{ - BluetoothHCIFECRequired outFECRequired; - BluetoothHCIExtendedInquiryResponse extendedInquiryResponse; -}; - -typedef struct BluetoothHCIExtendedInquiryResult BluetoothHCIExtendedInquiryResult; -struct BluetoothHCIExtendedInquiryResult -{ - UInt8 numberOfReponses; /* always a value of 1 */ - BluetoothDeviceAddress deviceAddress; - BluetoothPageScanRepetitionMode pageScanRepetitionMode; - UInt8 reserved; - BluetoothClassOfDevice classOfDevice; - BluetoothClockOffset clockOffset; - BluetoothHCIRSSIValue RSSIValue; - BluetoothHCIExtendedInquiryResponse extendedInquiryResponse; -}; - -// 'Simple Pairing' (v2.1 specification) - -typedef UInt8 BluetoothHCISimplePairingMode; -enum BluetoothHCISimplePairingModes -{ - kBluetoothHCISimplePairingModeNotSet = 0x00, - kBluetoothHCISimplePairingModeEnabled = 0x01 -}; - -typedef UInt8 BluetoothSimplePairingDebugMode; -enum BluetoothSimplePairingDebugModes -{ - kBluetoothHCISimplePairingDebugModeDisabled = 0x00, - kBluetoothHCISimplePairingDebugModeEnabled = 0x01 -}; - -typedef struct BluetoothHCISimplePairingOOBData BluetoothHCISimplePairingOOBData; -struct BluetoothHCISimplePairingOOBData -{ - UInt8 data[ 16 ]; -}; - -typedef struct BluetoothHCIReadLocalOOBDataResults BluetoothHCIReadLocalOOBDataResults; -struct BluetoothHCIReadLocalOOBDataResults -{ - BluetoothHCISimplePairingOOBData hash; - BluetoothHCISimplePairingOOBData randomizer; -}; - -typedef UInt8 BluetoothIOCapability; -enum BluetoothIOCapabilities -{ - kBluetoothCapabilityTypeDisplayOnly = 0x00, - kBluetoothCapabilityTypeDisplayYesNo = 0x01, - kBluetoothCapabilityTypeKeyboardOnly = 0x02, - kBluetoothCapabilityTypeNoInputNoOutput = 0x03 -}; - -typedef UInt8 BluetoothOOBDataPresence; -enum BluetoothOOBDataPresenceValues -{ - kBluetoothOOBAuthenticationDataNotPresent = 0x00, - kBluetoothOOBAuthenticationDataFromRemoteDevicePresent = 0x01 -}; - -typedef UInt8 BluetoothAuthenticationRequirements; -enum BluetoothAuthenticationRequirementsValues -{ - kBluetoothAuthenticationRequirementsMITMProtectionNotRequired = 0x00, /* Numeric comparison with automatic accept allowed */ - kBluetoothAuthenticationRequirementsMITMProtectionRequired = 0x01, /* Refer to BluetoothIOCapabilities to determine authentication procedure */ - kBluetoothAuthenticationRequirementsMITMProtectionNotRequiredNoBonding = 0x00, - kBluetoothAuthenticationRequirementsMITMProtectionRequiredNoBonding = 0x01, - kBluetoothAuthenticationRequirementsMITMProtectionNotRequiredDedicatedBonding = 0x02, - kBluetoothAuthenticationRequirementsMITMProtectionRequiredDedicatedBonding = 0x03, - kBluetoothAuthenticationRequirementsMITMProtectionNotRequiredGeneralBonding = 0x04, - kBluetoothAuthenticationRequirementsMITMProtectionRequiredGeneralBonding = 0x05 -}; - -typedef struct BluetoothIOCapabilityResponse BluetoothIOCapabilityResponse; -struct BluetoothIOCapabilityResponse -{ - BluetoothDeviceAddress deviceAddress; - BluetoothIOCapability ioCapability; /* possible values from BluetoothIOCapabilities above */ - BluetoothOOBDataPresence OOBDataPresence; - BluetoothAuthenticationRequirements authenticationRequirements; -}; - -typedef UInt32 BluetoothPasskey; - -typedef struct BluetoothUserPasskeyNotification BluetoothUserPasskeyNotification; -struct BluetoothUserPasskeyNotification -{ - BluetoothDeviceAddress deviceAddress; - BluetoothPasskey passkey; /* passkey for display. valid values are 000000 - 999999 */ -}; - -typedef UInt8 BluetoothKeypressNotificationType; -enum BluetoothKeypressNotificationTypes -{ - kBluetoothKeypressNotificationTypePasskeyEntryStarted = 0, - kBluetoothKeypressNotificationTypePasskeyDigitEntered = 1, - kBluetoothKeypressNotificationTypePasskeyDigitErased = 2, - kBluetoothKeypressNotificationTypePasskeyCleared = 3, - kBluetoothKeypressNotificationTypePasskeyEntryCompleted = 4 -}; - -typedef struct BluetoothKeypressNotification BluetoothKeypressNotification; -struct BluetoothKeypressNotification -{ - BluetoothDeviceAddress deviceAddress; - BluetoothKeypressNotificationType notificationType; -}; - -typedef SInt8 TransmissionPower; - -typedef UInt8 BluetoothAFHMode; -typedef struct BluetoothAFHResults BluetoothAFHResults; -struct BluetoothAFHResults -{ - BluetoothConnectionHandle handle; - BluetoothAFHMode mode; - UInt8 afhMap[10]; -}; - -#endif /* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0 */ - -#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 - -typedef UInt32 BluetoothNumericValue; - -typedef struct BluetoothUserConfirmationRequest BluetoothUserConfirmationRequest; -struct BluetoothUserConfirmationRequest -{ - BluetoothDeviceAddress deviceAddress; - BluetoothNumericValue numericValue; /* numeric value for display. valid values are 000000 - 999999 */ -}; - -typedef struct BluetoothHCIEventSimplePairingCompleteResults BluetoothHCIEventSimplePairingCompleteResults; -struct BluetoothHCIEventSimplePairingCompleteResults -{ - BluetoothDeviceAddress deviceAddress; -}; - -#endif /* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 */ - - -// Packet Sizes - -enum -{ - kBluetoothHCICommandPacketHeaderSize = 3, - kBluetoothHCICommandPacketMaxDataSize = 255, - kBluetoothHCIMaxCommandPacketSize = kBluetoothHCICommandPacketHeaderSize + kBluetoothHCICommandPacketMaxDataSize, - - kBluetoothHCIEventPacketHeaderSize = 2, - kBluetoothHCIEventPacketMaxDataSize = 255, - kBluetoothHCIMaxEventPacketSize = kBluetoothHCIEventPacketHeaderSize + kBluetoothHCIEventPacketMaxDataSize, - - kBluetoothHCIDataPacketHeaderSize = 4, - kBluetoothHCIDataPacketMaxDataSize = 65535, - kBluetoothHCIMaxDataPacketSize = kBluetoothHCIDataPacketHeaderSize + kBluetoothHCIDataPacketMaxDataSize -}; - -typedef UInt8 BluetoothHCIEventCode; -typedef UInt8 BluetoothLinkType; -enum BluetoothLinkTypes -{ - kBluetoothSCOConnection = 0, - kBluetoothACLConnection = 1, - kBluetoothESCOConnection = 2, - kBluetoothLinkTypeNone = 0xff -}; - -typedef UInt16 BluetoothHCIVoiceSetting; // 10 bits meaningful -typedef UInt8 BluetoothHCISupportedIAC; - -typedef uint32_t BluetoothHCITransmitBandwidth; -typedef uint32_t BluetoothHCIReceiveBandwidth; -typedef uint16_t BluetoothHCIMaxLatency; -typedef uint8_t BluetoothHCIRetransmissionEffort; -enum BluetoothHCIRetransmissionEffortTypes -{ - kHCIRetransmissionEffortTypeNone = 0x00, - kHCIRetransmissionEffortTypeAtLeastOneAndOptimizeForPower = 0x01, - kHCIRetransmissionEffortTypeAtLeastOneAndOptimizeLinkQuality = 0x02, - kHCIRetransmissionEffortTypeDontCare = 0xFF, -}; - - -// Setup Synchronous Packet types (Bluetooth 2.1 spec section 7.7.35 - Setup Synchronous Command Complete Event) - -typedef uint8_t BluetoothAirMode; -enum -{ - kBluetoothAirModeULawLog = 0x00, - kBluetoothAirModeALawLog = 0x01, - kBluetoothAirModeCVSD = 0x02, - kBluetoothAirModeTransparentData = 0x03 -}; - -typedef struct BluetoothSynchronousConnectionInfo BluetoothSynchronousConnectionInfo; -struct BluetoothSynchronousConnectionInfo -{ - BluetoothHCITransmitBandwidth transmitBandWidth; - BluetoothHCIReceiveBandwidth receiveBandWidth; - BluetoothHCIMaxLatency maxLatency; - BluetoothHCIVoiceSetting voiceSetting; - BluetoothHCIRetransmissionEffort retransmissionEffort; - BluetoothPacketType packetType; -}; - -typedef struct BluetoothHCIEventSynchronousConnectionCompleteResults BluetoothHCIEventSynchronousConnectionCompleteResults; -struct BluetoothHCIEventSynchronousConnectionCompleteResults -{ - BluetoothConnectionHandle connectionHandle; - BluetoothDeviceAddress deviceAddress; - BluetoothLinkType linkType; - uint8_t transmissionInterval; - uint8_t retransmissionWindow; - uint16_t receivePacketLength; - uint16_t transmitPacketLength; - BluetoothAirMode airMode; -}; - - -typedef UInt8 BluetoothHCIStatus; -typedef UInt8 BluetoothHCIEventStatus; - -// Events. - -enum -{ - kBluetoothHCIEventInquiryComplete = 0x01, - kBluetoothHCIEventInquiryResult = 0x02, - kBluetoothHCIEventConnectionComplete = 0x03, - kBluetoothHCIEventConnectionRequest = 0x04, - kBluetoothHCIEventDisconnectionComplete = 0x05, - kBluetoothHCIEventAuthenticationComplete = 0x06, - kBluetoothHCIEventRemoteNameRequestComplete = 0x07, - kBluetoothHCIEventEncryptionChange = 0x08, - kBluetoothHCIEventChangeConnectionLinkKeyComplete = 0x09, - kBluetoothHCIEventMasterLinkKeyComplete = 0x0A, - kBluetoothHCIEventReadRemoteSupportedFeaturesComplete = 0x0B, - kBluetoothHCIEventReadRemoteVersionInformationComplete = 0x0C, - kBluetoothHCIEventQoSSetupComplete = 0x0D, - kBluetoothHCIEventCommandComplete = 0x0E, - kBluetoothHCIEventCommandStatus = 0x0F, - kBluetoothHCIEventHardwareError = 0x10, - kBluetoothHCIEventFlushOccurred = 0x11, - kBluetoothHCIEventRoleChange = 0x12, - kBluetoothHCIEventNumberOfCompletedPackets = 0x13, - kBluetoothHCIEventModeChange = 0x14, - kBluetoothHCIEventReturnLinkKeys = 0x15, - kBluetoothHCIEventPINCodeRequest = 0x16, - kBluetoothHCIEventLinkKeyRequest = 0x17, - kBluetoothHCIEventLinkKeyNotification = 0x18, - kBluetoothHCIEventLoopbackCommand = 0x19, - kBluetoothHCIEventDataBufferOverflow = 0x1A, - kBluetoothHCIEventMaxSlotsChange = 0x1B, - kBluetoothHCIEventReadClockOffsetComplete = 0x1C, - kBluetoothHCIEventConnectionPacketType = 0x1D, - kBluetoothHCIEventQoSViolation = 0x1E, - kBluetoothHCIEventPageScanModeChange = 0x1F, - kBluetoothHCIEventPageScanRepetitionModeChange = 0x20, - - // [v1.2] - - kBluetoothHCIEventFlowSpecificationComplete = 0x21, - kBluetoothHCIEventInquiryResultWithRSSI = 0x22, - kBluetoothHCIEventReadRemoteExtendedFeaturesComplete = 0x23, - kBluetoothHCIEventSynchronousConnectionComplete = 0x2C, - kBluetoothHCIEventSynchronousConnectionChanged = 0x2D, - - // [v2.1] - - kBluetoothHCIEventSniffSubstrate = 0x2E, - kBluetoothHCIEventExtendedInquiryResult = 0x2F, - kBluetoothHCIEventIOCapabilityRequest = 0x31, - kBluetoothHCIEventIOCapabilityResponse = 0x32, - kBluetoothHCIEventUserConfirmationRequest = 0x33, - kBluetoothHCIEventUserPasskeyRequest = 0x34, - kBluetoothHCIEventRemoteOOBDataRequest = 0x35, - kBluetoothHCIEventSimplePairingComplete = 0x36, - kBluetoothHCIEventLinkSupervisionTimeoutChanged = 0x38, - kBluetoothHCIEventEnhancedFlushComplete = 0x39, - kBluetoothHCIEventSniffRequest = 0x3A, - kBluetoothHCIEventUserPasskeyNotification = 0x3B, - kBluetoothHCIEventKeypressNotification = 0x3C, - - kBluetoothHCIEventLogoTesting = 0xFE, - kBluetoothHCIEventVendorSpecific = 0xFF -}; - -// HCI Event Masks - -// Event masks are 8 octets according to the spec. v2.1 introduces some event masks that -// actually exceed 32 bits so the 4 byte enum we had before Bluetooth 2.0 will still work for old -// the masks, but the new masks need to be defined as 64 bits. - -typedef uint64_t BluetoothHCIEventMask; - -#define kBluetoothHCIEventMaskDefault64Bit 0x00001FFFFFFFFFFFLL -#define kBluetoothHCIEventMaskAll64Bit 0xFFFFFFFFFFFFFFFFLL - - // [v1.2] - -#define kBluetoothHCIEventMaskFlowSpecificationCompleteEvent 0x0000000100000000LL -#define kBluetoothHCIEventMaskInquiryResultWithRSSIEvent 0x0000000200000000LL -#define kBluetoothHCIEventMaskReadRemoteExtendedFeaturesCompleteEvent 0x0000000400000000LL -#define kBluetoothHCIEventMaskSynchronousConnectionCompleteEvent 0x0000080000000000LL -#define kBluetoothHCIEventMaskSynchronousConnectionChangedEvent 0x0000100000000000LL - - // [v2.1] - -#define kBluetoothHCIEventMaskSniffSubstrateEvent 0x0000200000000000LL -#define kBluetoothHCIEventMaskExtendedInquiryResultEvent 0x0000400000000000LL -#define kBluetoothHCIEventMaskLinkSupervisionTimeoutChangedEvent 0x0080000000000000LL -#define kBluetoothHCIEventMaskEnhancedFlushCompleteEvent 0x0100000000000000LL - - // [v2.1 Secure Simple Pairing] - -#define kBluetoothHCIEventMaskIOCapabilityRequestEvent 0x0001000000000000LL -#define kBluetoothHCIEventMaskIOCapabilityRequestReplyEvent 0x0002000000000000LL -#define kBluetoothHCIEventMaskUserConfirmationRequestEvent 0x0004000000000000LL -#define kBluetoothHCIEventMaskUserPasskeyRequestEvent 0x0008000000000000LL -#define kBluetoothHCIEventMaskRemoteOOBDataRequestEvent 0x0010000000000000LL -#define kBluetoothHCIEventMaskSimplePairingCompleteEvent 0x0020000000000000LL -#define kBluetoothHCIEventMaskUserPasskeyNotificationEvent 0x0400000000000000LL -#define kBluetoothHCIEventMaskKeypressNotificationEvent 0x0800000000000000LL - -enum -{ - kBluetoothHCIEventMaskNone = 0x00000000, - kBluetoothHCIEventMaskInquiryComplete = 0x00000001, - kBluetoothHCIEventMaskInquiryResult = 0x00000002, - kBluetoothHCIEventMaskConnectionComplete = 0x00000004, - kBluetoothHCIEventMaskConnectionRequest = 0x00000008, - kBluetoothHCIEventMaskDisconnectionComplete = 0x00000010, - kBluetoothHCIEventMaskAuthenticationComplete = 0x00000020, - kBluetoothHCIEventMaskRemoteNameRequestComplete = 0x00000040, - kBluetoothHCIEventMaskEncryptionChange = 0x00000080, - kBluetoothHCIEventMaskChangeConnectionLinkKeyComplete = 0x00000100, - kBluetoothHCIEventMaskMasterLinkKeyComplete = 0x00000200, - kBluetoothHCIEventMaskReadRemoteSupportedFeaturesComplete = 0x00000400, - kBluetoothHCIEventMaskReadRemoteVersionInformationComplete = 0x00000800, - kBluetoothHCIEventMaskQoSSetupComplete = 0x00001000, - kBluetoothHCIEventMaskCommandComplete = 0x00002000, - kBluetoothHCIEventMaskCommandStatus = 0x00004000, - kBluetoothHCIEventMaskHardwareError = 0x00008000, - kBluetoothHCIEventMaskFlushOccurred = 0x00010000, - kBluetoothHCIEventMaskRoleChange = 0x00020000, - - kBluetoothHCIEventMaskNumberOfCompletedPackets = 0x00040000, - kBluetoothHCIEventMaskModeChange = 0x00080000, - kBluetoothHCIEventMaskReturnLinkKeys = 0x00100000, - kBluetoothHCIEventMaskPINCodeRequest = 0x00200000, - kBluetoothHCIEventMaskLinkKeyRequest = 0x00400000, - kBluetoothHCIEventMaskLinkKeyNotification = 0x00800000, - kBluetoothHCIEventMaskLoopbackCommand = 0x01000000, - kBluetoothHCIEventMaskDataBufferOverflow = 0x02000000, - kBluetoothHCIEventMaskMaxSlotsChange = 0x04000000, - kBluetoothHCIEventMaskReadClockOffsetComplete = 0x08000000, - kBluetoothHCIEventMaskConnectionPacketTypeChanged = 0x10000000, - kBluetoothHCIEventMaskQoSViolation = 0x20000000, - kBluetoothHCIEventMaskPageScanModeChange = 0x40000000, - kBluetoothHCIEventMaskPageScanRepetitionModeChange = 0x80000000, - - kBluetoothHCIEventMaskAll = 0xFFFFFFFF, - kBluetoothHCIEventMaskDefault = kBluetoothHCIEventMaskAll /* Use kBluetoothHCIEventMaskDefault64Bit above! */ -}; - -// Event results structures. - -typedef struct BluetoothHCIEventConnectionCompleteResults BluetoothHCIEventConnectionCompleteResults; -struct BluetoothHCIEventConnectionCompleteResults -{ - BluetoothConnectionHandle connectionHandle; - BluetoothDeviceAddress deviceAddress; - BluetoothLinkType linkType; - BluetoothHCIEncryptionMode encryptionMode; -}; - -typedef struct BluetoothHCIEventDisconnectionCompleteResults BluetoothHCIEventDisconnectionCompleteResults; -struct BluetoothHCIEventDisconnectionCompleteResults -{ - BluetoothConnectionHandle connectionHandle; - BluetoothReasonCode reason; -}; - -typedef struct BluetoothHCIEventReadSupportedFeaturesResults BluetoothHCIEventReadSupportedFeaturesResults; -struct BluetoothHCIEventReadSupportedFeaturesResults -{ - BluetoothConnectionHandle connectionHandle; - BluetoothHCISupportedFeatures supportedFeatures; -}; - -#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 -typedef struct BluetoothHCIEventReadExtendedFeaturesResults BluetoothHCIEventReadExtendedFeaturesResults; -struct BluetoothHCIEventReadExtendedFeaturesResults -{ - BluetoothConnectionHandle connectionHandle; - BluetoothHCIExtendedFeaturesInfo supportedFeaturesInfo; -}; -#endif /* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 */ - -typedef struct BluetoothHCIEventReadRemoteVersionInfoResults BluetoothHCIEventReadRemoteVersionInfoResults; -struct BluetoothHCIEventReadRemoteVersionInfoResults -{ - BluetoothConnectionHandle connectionHandle; - BluetoothLMPVersion lmpVersion; - BluetoothManufacturerName manufacturerName; - BluetoothLMPSubversion lmpSubversion; -}; - -typedef struct BluetoothHCIEventRemoteNameRequestResults BluetoothHCIEventRemoteNameRequestResults; -struct BluetoothHCIEventRemoteNameRequestResults -{ - BluetoothDeviceAddress deviceAddress; - BluetoothDeviceName deviceName; -}; - -typedef struct BluetoothHCIEventReadClockOffsetResults BluetoothHCIEventReadClockOffsetResults; -struct BluetoothHCIEventReadClockOffsetResults -{ - BluetoothConnectionHandle connectionHandle; - BluetoothClockOffset clockOffset; -}; - -typedef struct BluetoothHCIEventConnectionRequestResults BluetoothHCIEventConnectionRequestResults; -struct BluetoothHCIEventConnectionRequestResults -{ - BluetoothDeviceAddress deviceAddress; - BluetoothClassOfDevice classOfDevice; - BluetoothLinkType linkType; -}; - -typedef struct BluetoothHCIEventLinkKeyNotificationResults BluetoothHCIEventLinkKeyNotificationResults; -struct BluetoothHCIEventLinkKeyNotificationResults -{ - BluetoothDeviceAddress deviceAddress; - BluetoothKey linkKey; - BluetoothKeyType keyType; -}; - -typedef struct BluetoothHCIEventMaxSlotsChangeResults BluetoothHCIEventMaxSlotsChangeResults; -struct BluetoothHCIEventMaxSlotsChangeResults -{ - BluetoothConnectionHandle connectionHandle; - BluetoothMaxSlots maxSlots; -}; - -typedef struct BluetoothHCIEventModeChangeResults BluetoothHCIEventModeChangeResults; -struct BluetoothHCIEventModeChangeResults -{ - BluetoothConnectionHandle connectionHandle; - BluetoothHCIConnectionMode mode; - BluetoothHCIModeInterval modeInterval; -}; - -typedef struct BluetoothHCIEventReturnLinkKeysResults BluetoothHCIEventReturnLinkKeysResults; -struct BluetoothHCIEventReturnLinkKeysResults -{ - UInt8 numLinkKeys; - struct { - BluetoothDeviceAddress deviceAddress; - BluetoothKey linkKey; - } linkKeys[1]; -}; - -typedef struct BluetoothHCIEventAuthenticationCompleteResults BluetoothHCIEventAuthenticationCompleteResults; -struct BluetoothHCIEventAuthenticationCompleteResults -{ - BluetoothConnectionHandle connectionHandle; -}; - -typedef struct BluetoothHCIEventEncryptionChangeResults BluetoothHCIEventEncryptionChangeResults; -struct BluetoothHCIEventEncryptionChangeResults -{ - BluetoothConnectionHandle connectionHandle; - BluetoothEncryptionEnable enable; -}; - -typedef struct BluetoothHCIEventChangeConnectionLinkKeyCompleteResults BluetoothHCIEventChangeConnectionLinkKeyCompleteResults; -struct BluetoothHCIEventChangeConnectionLinkKeyCompleteResults -{ - BluetoothConnectionHandle connectionHandle; -}; - -typedef struct BluetoothHCIEventMasterLinkKeyCompleteResults BluetoothHCIEventMasterLinkKeyCompleteResults; -struct BluetoothHCIEventMasterLinkKeyCompleteResults -{ - BluetoothConnectionHandle connectionHandle; - BluetoothKeyFlag keyFlag; -}; - -typedef struct BluetoothHCIEventQoSSetupCompleteResults BluetoothHCIEventQoSSetupCompleteResults; -struct BluetoothHCIEventQoSSetupCompleteResults -{ - BluetoothConnectionHandle connectionHandle; - BluetoothHCIQualityOfServiceSetupParams setupParams; -}; - -typedef struct BluetoothHCIEventHardwareErrorResults BluetoothHCIEventHardwareErrorResults; -struct BluetoothHCIEventHardwareErrorResults -{ - BluetoothHCIStatus error; -}; - -typedef struct BluetoothHCIEventFlushOccurredResults BluetoothHCIEventFlushOccurredResults; -struct BluetoothHCIEventFlushOccurredResults -{ - BluetoothConnectionHandle connectionHandle; -}; - -typedef struct BluetoothHCIEventRoleChangeResults BluetoothHCIEventRoleChangeResults; -struct BluetoothHCIEventRoleChangeResults -{ - BluetoothConnectionHandle connectionHandle; - BluetoothDeviceAddress deviceAddress; - BluetoothRole role; -}; - -typedef struct BluetoothHCIEventDataBufferOverflowResults BluetoothHCIEventDataBufferOverflowResults; -struct BluetoothHCIEventDataBufferOverflowResults -{ - BluetoothLinkType linkType; -}; - -typedef struct BluetoothHCIEventConnectionPacketTypeResults BluetoothHCIEventConnectionPacketTypeResults; -struct BluetoothHCIEventConnectionPacketTypeResults -{ - BluetoothConnectionHandle connectionHandle; - BluetoothPacketType packetType; -}; - -typedef struct BluetoothHCIEventReadRemoteSupportedFeaturesResults BluetoothHCIEventReadRemoteSupportedFeaturesResults; -struct BluetoothHCIEventReadRemoteSupportedFeaturesResults -{ - BluetoothHCIStatus error; - BluetoothConnectionHandle connectionHandle; - BluetoothHCISupportedFeatures lmpFeatures; -}; - -#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 -typedef struct BluetoothHCIEventReadRemoteExtendedFeaturesResults BluetoothHCIEventReadRemoteExtendedFeaturesResults; -struct BluetoothHCIEventReadRemoteExtendedFeaturesResults -{ - BluetoothHCIStatus error; - BluetoothConnectionHandle connectionHandle; - BluetoothHCIPageNumber page; - BluetoothHCIPageNumber maxPage; - BluetoothHCISupportedFeatures lmpFeatures; -}; -#endif /* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 */ - -typedef struct BluetoothHCIEventQoSViolationResults BluetoothHCIEventQoSViolationResults; -struct BluetoothHCIEventQoSViolationResults -{ - BluetoothConnectionHandle connectionHandle; -}; - -typedef struct BluetoothHCIEventPageScanModeChangeResults BluetoothHCIEventPageScanModeChangeResults; -struct BluetoothHCIEventPageScanModeChangeResults -{ - BluetoothDeviceAddress deviceAddress; - BluetoothPageScanMode pageScanMode; -}; - -typedef struct BluetoothHCIEventPageScanRepetitionModeChangeResults BluetoothHCIEventPageScanRepetitionModeChangeResults; -struct BluetoothHCIEventPageScanRepetitionModeChangeResults -{ - BluetoothDeviceAddress deviceAddress; - BluetoothPageScanRepetitionMode pageScanRepetitionMode; -}; - -typedef struct BluetoothHCIEventVendorSpecificResults BluetoothHCIEventVendorSpecificResults; -struct BluetoothHCIEventVendorSpecificResults -{ - UInt8 length; - UInt8 data[255]; -}; - -#define kNoNotifyProc NULL -#define kNoUserRefCon NULL - -typedef struct BluetoothHCIRequestCallbackInfo BluetoothHCIRequestCallbackInfo; -struct BluetoothHCIRequestCallbackInfo -{ - mach_vm_address_t userCallback; // Proc to call when async handler is called. - mach_vm_address_t userRefCon; // For user's info. - mach_vm_address_t internalRefCon; // For our purposes. - mach_vm_address_t asyncIDRefCon; // For our aync calls. - mach_vm_address_t reserved; // For the future. Currently Unused. -}; - -// Error codes - -enum -{ - kBluetoothHCIErrorSuccess = 0x00, - kBluetoothHCIErrorUnknownHCICommand = 0x01, - kBluetoothHCIErrorNoConnection = 0x02, - kBluetoothHCIErrorHardwareFailure = 0x03, - kBluetoothHCIErrorPageTimeout = 0x04, - kBluetoothHCIErrorAuthenticationFailure = 0x05, - kBluetoothHCIErrorKeyMissing = 0x06, - kBluetoothHCIErrorMemoryFull = 0x07, - kBluetoothHCIErrorConnectionTimeout = 0x08, - kBluetoothHCIErrorMaxNumberOfConnections = 0x09, - kBluetoothHCIErrorMaxNumberOfSCOConnectionsToADevice = 0x0A, - kBluetoothHCIErrorACLConnectionAlreadyExists = 0x0B, - kBluetoothHCIErrorCommandDisallowed = 0x0C, - kBluetoothHCIErrorHostRejectedLimitedResources = 0x0D, - kBluetoothHCIErrorHostRejectedSecurityReasons = 0x0E, - kBluetoothHCIErrorHostRejectedRemoteDeviceIsPersonal = 0x0F, - kBluetoothHCIErrorHostTimeout = 0x10, - kBluetoothHCIErrorUnsupportedFeatureOrParameterValue = 0x11, - kBluetoothHCIErrorInvalidHCICommandParameters = 0x12, - kBluetoothHCIErrorOtherEndTerminatedConnectionUserEnded = 0x13, - kBluetoothHCIErrorOtherEndTerminatedConnectionLowResources = 0x14, - kBluetoothHCIErrorOtherEndTerminatedConnectionAboutToPowerOff = 0x15, - kBluetoothHCIErrorConnectionTerminatedByLocalHost = 0x16, - kBluetoothHCIErrorRepeatedAttempts = 0x17, - kBluetoothHCIErrorPairingNotAllowed = 0x18, - kBluetoothHCIErrorUnknownLMPPDU = 0x19, - kBluetoothHCIErrorUnsupportedRemoteFeature = 0x1A, - kBluetoothHCIErrorSCOOffsetRejected = 0x1B, - kBluetoothHCIErrorSCOIntervalRejected = 0x1C, - kBluetoothHCIErrorSCOAirModeRejected = 0x1D, - kBluetoothHCIErrorInvalidLMPParameters = 0x1E, - kBluetoothHCIErrorUnspecifiedError = 0x1F, - kBluetoothHCIErrorUnsupportedLMPParameterValue = 0x20, - kBluetoothHCIErrorRoleChangeNotAllowed = 0x21, - kBluetoothHCIErrorLMPResponseTimeout = 0x22, - kBluetoothHCIErrorLMPErrorTransactionCollision = 0x23, - kBluetoothHCIErrorLMPPDUNotAllowed = 0x24, - kBluetoothHCIErrorEncryptionModeNotAcceptable = 0x25, // Added Core Spec, v1.1 - kBluetoothHCIErrorUnitKeyUsed = 0x26, // 1.1 - kBluetoothHCIErrorQoSNotSupported = 0x27, // 1.1 - kBluetoothHCIErrorInstantPassed = 0x28, // 1.1 - kBluetoothHCIErrorPairingWithUnitKeyNotSupported = 0x29, // 1.1 - kBluetoothHCIErrorHostRejectedUnacceptableDeviceAddress = 0x0F, // 2.0+ - kBluetoothHCIErrorDifferentTransactionCollision = 0x2A, // 1.2 - kBluetoothHCIErrorQoSUnacceptableParameter = 0x2C, // 1.2 - kBluetoothHCIErrorQoSRejected = 0x2D, // 1.2 - kBluetoothHCIErrorChannelClassificationNotSupported = 0x2E, // 1.2 - kBluetoothHCIErrorInsufficientSecurity = 0x2F, // 1.2 - kBluetoothHCIErrorParameterOutOfMandatoryRange = 0x30, // 1.2 - kBluetoothHCIErrorRoleSwitchPending = 0x31, // 1.2 - kBluetoothHCIErrorReservedSlotViolation = 0x34, // 1.2 - kBluetoothHCIErrorRoleSwitchFailed = 0x35, // 1.2 - kBluetoothHCIErrorExtendedInquiryResponseTooLarge = 0x36, // 2.1 - kBluetoothHCIErrorSecureSimplePairingNotSupportedByHost = 0x37, // 2.1 - - kBluetoothHCIErrorMax = 0x37 -}; - -#if 0 -#pragma mark === HCI Power Mode === -#endif - -//=========================================================================================================================== -// HCI Power Mode -//=========================================================================================================================== - -typedef enum -{ - kBluetoothHCIPowerStateON = 0x01, - kBluetoothHCIPowerStateOFF = 0x00, - kBluetoothHCIPowerStateUnintialized = 0xFF, -} BluetoothHCIPowerState; - -enum -{ - kBluetoothHCIErrorPowerIsOFF = (kBluetoothHCIErrorMax + 1) -}; - -#if 0 -#pragma mark === HCI USB Transport === -#endif - -//=========================================================================================================================== -// HCI USB Transport -//=========================================================================================================================== - -//--------------------------------------------------------------------------------------------------------------------------- -/*! @enum BluetoothHCIUSBDeviceMatchingConstants - @abstract Bluetooth USB device matching constants - @constant kBluetoothHCITransportUSBClassCode Wireless Controller - @constant kBluetoothHCITransportUSBSubClassCode RF Controller - @constant kBluetoothHCITransportUSBProtocolCode Bluetooth Programming -*/ - -enum -{ - kBluetoothHCITransportUSBClassCode = 0xE0, - kBluetoothHCITransportUSBSubClassCode = 0x01, - kBluetoothHCITransportUSBProtocolCode = 0x01 -}; - -#if 0 -#pragma mark === TCI - L2CAP === -#endif - -//=========================================================================================================================== -// TCI - L2CAP -//=========================================================================================================================== - -enum -{ - kBluetoothL2CAPTCIEventIDReserved = 0x00, - kBluetoothL2CAPTCIEventIDL2CA_ConnectInd = 0x01, - kBluetoothL2CAPTCIEventIDL2CA_ConfigInd = 0x02, - kBluetoothL2CAPTCIEventIDL2CA_DisconnectInd = 0x03, - kBluetoothL2CAPTCIEventIDL2CA_QoSViolationInd = 0x04, - kBluetoothL2CAPTCIEventIDL2CA_TimeOutInd = 0x05 -}; - -enum -{ - kBluetoothL2CAPTCICommandReserved = 0x0000, - kBluetoothL2CAPTCICommandL2CA_ConnectReq = 0x0001, - kBluetoothL2CAPTCICommandL2CA_DisconnectReq = 0x0002, - kBluetoothL2CAPTCICommandL2CA_ConfigReq = 0x0003, - kBluetoothL2CAPTCICommandL2CA_DisableCLT = 0x0004, - kBluetoothL2CAPTCICommandL2CA_EnableCLT = 0x0005, - kBluetoothL2CAPTCICommandL2CA_GroupCreate = 0x0006, - kBluetoothL2CAPTCICommandL2CA_GroupClose = 0x0007, - kBluetoothL2CAPTCICommandL2CA_GroupAddMember = 0x0008, - kBluetoothL2CAPTCICommandL2CA_GroupRemoveMember = 0x0009, - kBluetoothL2CAPTCICommandL2CA_GroupMembership = 0x000A, - kBluetoothL2CAPTCICommandL2CA_WriteData = 0x000B, - kBluetoothL2CAPTCICommandL2CA_ReadData = 0x000C, - kBluetoothL2CAPTCICommandL2CA_Ping = 0x000D, - kBluetoothL2CAPTCICommandL2CA_GetInfo = 0x000E, - kBluetoothL2CAPTCICommandL2CA_Reserved1 = 0x000F, - kBluetoothL2CAPTCICommandL2CA_Reserved2 = 0x0010, - kBluetoothL2CAPTCICommandL2CA_ConnectResp = 0x0011, - kBluetoothL2CAPTCICommandL2CA_DisconnectResp = 0x0012, - kBluetoothL2CAPTCICommandL2CA_ConfigResp = 0x0013 -}; - -#if 0 -#pragma mark - -#pragma mark === RFCOMM === -#endif - -//=========================================================================================================================== -// RFCOMM -//=========================================================================================================================== -#define kMaxChannelIDPerSide 31 - -typedef UInt8 BluetoothRFCOMMChannelID; - -#define RFCOMM_CHANNEL_ID_IS_VALID( CHANNEL ) (( CHANNEL >= 1 ) && ( CHANNEL <= 30 )) - -typedef UInt16 BluetoothRFCOMMMTU; - -typedef enum BluetoothRFCOMMParityType -{ - kBluetoothRFCOMMParityTypeNoParity = 0, - kBluetoothRFCOMMParityTypeOddParity, - kBluetoothRFCOMMParityTypeEvenParity, - kBluetoothRFCOMMParityTypeMaxParity -} BluetoothRFCOMMParityType; - -typedef enum BluetoothRFCOMMLineStatus -{ - BluetoothRFCOMMLineStatusNoError = 0, - BluetoothRFCOMMLineStatusOverrunError, - BluetoothRFCOMMLineStatusParityError, - BluetoothRFCOMMLineStatusFramingError -} BluetoothRFCOMMLineStatus; - -#if 0 -#pragma mark - -#pragma mark === SDP === -#endif - -//=========================================================================================================================== -// SDP -//=========================================================================================================================== - -typedef UInt8 BluetoothSDPPDUID; -enum { - kBluetoothSDPPDUIDReserved = 0, - kBluetoothSDPPDUIDErrorResponse = 1, - kBluetoothSDPPDUIDServiceSearchRequest = 2, - kBluetoothSDPPDUIDServiceSearchResponse = 3, - kBluetoothSDPPDUIDServiceAttributeRequest = 4, - kBluetoothSDPPDUIDServiceAttributeResponse = 5, - kBluetoothSDPPDUIDServiceSearchAttributeRequest = 6, - kBluetoothSDPPDUIDServiceSearchAttributeResponse = 7 -}; - -#define IS_REQUEST_PDU( _pduID ) ( ( _pduID == kBluetoothSDPPDUIDServiceSearchRequest ) || \ - ( _pduID == kBluetoothSDPPDUIDServiceAttributeRequest ) || \ - ( _pduID == kBluetoothSDPPDUIDServiceSearchAttributeRequest ) ) - -#define IS_RESPONSE_PDU( _pduID ) ( ( _pduID == kBluetoothSDPPDUIDErrorResponse ) || \ - ( _pduID == kBluetoothSDPPDUIDServiceSearchResponse ) || \ - ( _pduID == kBluetoothSDPPDUIDServiceAttributeResponse ) || \ - ( _pduID == kBluetoothSDPPDUIDServiceSearchAttributeResponse ) ) - -typedef UInt16 BluetoothSDPErrorCode; -enum { - kBluetoothSDPErrorCodeSuccess = 0x0000, - kBluetoothSDPErrorCodeReserved = 0x0000, - kBluetoothSDPErrorCodeInvalidSDPVersion = 0x0001, - kBluetoothSDPErrorCodeInvalidServiceRecordHandle = 0x0002, - kBluetoothSDPErrorCodeInvalidRequestSyntax = 0x0003, - kBluetoothSDPErrorCodeInvalidPDUSize = 0x0004, - kBluetoothSDPErrorCodeInvalidContinuationState = 0x0005, - kBluetoothSDPErrorCodeInsufficientResources = 0x0006, - - kBluetoothSDPErrorCodeReservedStart = 0x0007, - kBluetoothSDPErrorCodeReservedEnd = 0xFFFF -}; - -typedef UInt16 BluetoothSDPTransactionID; - -typedef UInt32 BluetoothSDPServiceRecordHandle; - -enum { - kBluetoothSDPDataElementTypeNil = 0, - kBluetoothSDPDataElementTypeUnsignedInt = 1, - kBluetoothSDPDataElementTypeSignedInt = 2, - kBluetoothSDPDataElementTypeUUID = 3, - kBluetoothSDPDataElementTypeString = 4, - kBluetoothSDPDataElementTypeBoolean = 5, - kBluetoothSDPDataElementTypeDataElementSequence = 6, - kBluetoothSDPDataElementTypeDataElementAlternative = 7, - kBluetoothSDPDataElementTypeURL = 8, - kBluetoothSDPDataElementTypeReservedStart = 9, - kBluetoothSDPDataElementTypeReservedEnd = 31 -}; - -typedef UInt16 BluetoothSDPUUID16; -typedef UInt32 BluetoothSDPUUID32; - -typedef UInt8 BluetoothSDPDataElementTypeDescriptor; -typedef UInt8 BluetoothSDPDataElementSizeDescriptor; - -typedef UInt16 BluetoothSDPServiceAttributeID; - -#ifdef __cplusplus - } -#endif diff --git a/i386/include/IOKit/bluetooth/BluetoothAssignedNumbers.h b/i386/include/IOKit/bluetooth/BluetoothAssignedNumbers.h deleted file mode 100644 index ea5db2e..0000000 --- a/i386/include/IOKit/bluetooth/BluetoothAssignedNumbers.h +++ /dev/null @@ -1,552 +0,0 @@ -/* - File: BluetoothAssignedNumbers.h - Copyright: (c) 2002-2008 by Apple Computer, Inc. All rights reserved. -*/ - -#pragma once - -#ifdef __cplusplus - extern "C" { -#endif - -#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0 - -#pragma mark - -#pragma mark === General === - -enum BluetoothCompanyIdentifers -{ - kBluetoothCompanyIdentiferEricssonTechnologyLicensing = 0, - kBluetoothCompanyIdentiferNokiaMobilePhones = 1, - kBluetoothCompanyIdentiferIntel = 2, - kBluetoothCompanyIdentiferIBM = 3, - kBluetoothCompanyIdentiferToshiba = 4, - kBluetoothCompanyIdentifer3Com = 5, - kBluetoothCompanyIdentiferMicrosoft = 6, - kBluetoothCompanyIdentiferLucent = 7, - kBluetoothCompanyIdentiferMotorola = 8, - kBluetoothCompanyIdentiferInfineonTechnologiesAG = 9, - kBluetoothCompanyIdentiferCambridgeSiliconRadio = 10, - kBluetoothCompanyIdentiferSiliconWave = 11, - kBluetoothCompanyIdentiferDigianswerAS = 12, - kBluetoothCompanyIdentiferTexasInstruments = 13, - kBluetoothCompanyIdentiferParthusTechnologies = 14, - kBluetoothCompanyIdentiferBroadcom = 15, - kBluetoothCompanyIdentiferMitelSemiconductor = 16, - kBluetoothCompanyIdentiferWidcomm = 17, - kBluetoothCompanyIdentiferZeevo = 18, - kBluetoothCompanyIdentiferAtmel = 19, - kBluetoothCompanyIdentiferMistubishiElectric = 20, - kBluetoothCompanyIdentiferRTXTelecom = 21, - kBluetoothCompanyIdentiferKCTechnology = 22, - kBluetoothCompanyIdentiferNewlogic = 23, - kBluetoothCompanyIdentiferTransilica = 24, - kBluetoothCompanyIdentiferRohdeandSchwarz = 25, - kBluetoothCompanyIdentiferTTPCom = 26, - kBluetoothCompanyIdentiferSigniaTechnologies = 27, - kBluetoothCompanyIdentiferConexantSystems = 28, - kBluetoothCompanyIdentiferQualcomm = 29, - kBluetoothCompanyIdentiferInventel = 30, - kBluetoothCompanyIdentiferAVMBerlin = 31, - kBluetoothCompanyIdentiferBandspeed = 32, - kBluetoothCompanyIdentiferMansella = 33, - kBluetoothCompanyIdentiferNEC = 34, - kBluetoothCompanyIdentiferWavePlusTechnology = 35, - kBluetoothCompanyIdentiferAlcatel = 36, - kBluetoothCompanyIdentiferPhilipsSemiconductor = 37, - kBluetoothCompanyIdentiferCTechnologies = 38, - kBluetoothCompanyIdentiferOpenInterface = 39, - kBluetoothCompanyIdentiferRFCMicroDevices = 40, - kBluetoothCompanyIdentiferHitachi = 41, - kBluetoothCompanyIdentiferSymbolTechnologies = 42, - kBluetoothCompanyIdentiferTenovis = 43, - kBluetoothCompanyIdentiferMacronixInternational = 44, - kBluetoothCompanyIdentiferGCTSemiconductor = 45, - kBluetoothCompanyIdentiferNorwoodSystems = 46, - kBluetoothCompanyIdentiferMewTelTechnology = 47, - kBluetoothCompanyIdentiferSTMicroelectronics = 48, - kBluetoothCompanyIdentiferSynopsys = 49, - kBluetoothCompanyIdentiferRedMCommunications = 50, - kBluetoothCompanyIdentiferCommil = 51, - kBluetoothCompanyIdentiferCATC = 52, - kBluetoothCompanyIdentiferEclipse = 53, - kBluetoothCompanyIdentiferRenesasTechnology = 54, - kBluetoothCompanyIdentiferMobilian = 55, - kBluetoothCompanyIdentiferTerax = 56, - kBluetoothCompanyIdentiferIntegratedSystemSolution = 57, - kBluetoothCompanyIdentiferMatsushitaElectricIndustrial = 58, - kBluetoothCompanyIdentiferGennum = 59, - kBluetoothCompanyIdentiferResearchInMotion = 60, - kBluetoothCompanyIdentiferIPextreme = 61, - kBluetoothCompanyIdentiferSystemsAndChips = 62, - kBluetoothCompanyIdentiferBluetoothSIG = 63, - kBluetoothCompanyIdentiferSeikoEpson = 64, - kBluetoothCompanyIdentiferIntegratedSiliconSolution = 65, - kBluetoothCompanyIdentiferCONWISETechnology = 66, - kBluetoothCompanyIdentiferParrotSA = 67, - kBluetoothCompanyIdentiferSocketCommunications = 68, - kBluetoothCompanyIdentiferAtherosCommunications = 69, - kBluetoothCompanyIdentiferMediaTek = 70, - kBluetoothCompanyIdentiferBluegiga = 71, - kBluetoothCompanyIdentiferMarvellTechnologyGroup = 72, - kBluetoothCompanyIdentifer3DSP = 73, - kBluetoothCompanyIdentiferAccelSemiconductor = 74, - kBluetoothCompanyIdentiferContinentialAutomotiveSystems = 75, - kBluetoothCompanyIdentiferApple = 76, - kBluetoothCompanyIdentiferStaccatoCommunications = 77, - kBluetoothCompanyIdentiferAvagoTechnologies = 78, - kBluetoothCompanyIdentiferAPT = 79, - - kBluetoothCompanyIdentiferInteropIdentifier = 65535 -}; - -#endif /* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0 */ - -#pragma mark - -#pragma mark === Baseband === - -//================================================================================================================== -// Baseband -//================================================================================================================== - -// -// Service Class Major -// - -enum -{ - kBluetoothServiceClassMajorLimitedDiscoverableMode = 0x001, // Bit 13 - Limited Discoverable Mode - kBluetoothServiceClassMajorReserved1 = 0x002, // Bit 14 - Reserved for future use. - kBluetoothServiceClassMajorReserved2 = 0x004, // Bit 15 - Reserved for future use. - kBluetoothServiceClassMajorPositioning = 0x008, // Bit 16 - Positioning (Location ID) - kBluetoothServiceClassMajorNetworking = 0x010, // Bit 17 - LAN, Ad hoc, etc... - kBluetoothServiceClassMajorRendering = 0x020, // Bit 18 - Printing, Speaker, etc... - kBluetoothServiceClassMajorCapturing = 0x040, // Bit 19 - Scanner, Microphone, etc... - kBluetoothServiceClassMajorObjectTransfer = 0x080, // Bit 20 - v-Inbox, v-Folder, etc... - kBluetoothServiceClassMajorAudio = 0x100, // Bit 21 - Speaker, Microphone, Headset, etc... - kBluetoothServiceClassMajorTelephony = 0x200, // Bit 22 - Cordless telephony, Modem, Headset, etc... - kBluetoothServiceClassMajorInformation = 0x400, // Bit 23 - Web server, WAP server, etc... - - kBluetoothServiceClassMajorAny = '****', // Pseudo-class - means anything acceptable. - kBluetoothServiceClassMajorNone = 'none', // Pseudo-class - means no matching. - - kBluetoothServiceClassMajorEnd -}; - -// -// Device Class Major -// - -enum -{ - kBluetoothDeviceClassMajorMiscellaneous = 0x00, // [00000] Miscellaneous - kBluetoothDeviceClassMajorComputer = 0x01, // [00001] Desktop, Notebook, PDA, Organizers, etc... - kBluetoothDeviceClassMajorPhone = 0x02, // [00010] Cellular, Cordless, Payphone, Modem, etc... - kBluetoothDeviceClassMajorLANAccessPoint = 0x03, // [00011] LAN Access Point - kBluetoothDeviceClassMajorAudio = 0x04, // [00100] Headset, Speaker, Stereo, etc... - kBluetoothDeviceClassMajorPeripheral = 0x05, // [00101] Mouse, Joystick, Keyboards, etc... - kBluetoothDeviceClassMajorImaging = 0x06, // [00110] Printing, scanner, camera, display, etc... - kBluetoothDeviceClassMajorUnclassified = 0x1F, // [11111] Specific device code not assigned - - // Range 0x06 to 0x1E Reserved for future use. - - kBluetoothDeviceClassMajorAny = '****', // Pseudo-class - means anything acceptable. - kBluetoothDeviceClassMajorNone = 'none', // Pseudo-class - means no matching. - - kBluetoothDeviceClassMajorEnd -}; - -// -// Device Class Minor -// - -enum -{ - /// - /// Computer Major Class - /// - - kBluetoothDeviceClassMinorComputerUnclassified = 0x00, // [000000] Specific device code not assigned - kBluetoothDeviceClassMinorComputerDesktopWorkstation = 0x01, // [000001] Desktop workstation - kBluetoothDeviceClassMinorComputerServer = 0x02, // [000010] Server-class computer - kBluetoothDeviceClassMinorComputerLaptop = 0x03, // [000011] Laptop - kBluetoothDeviceClassMinorComputerHandheld = 0x04, // [000100] Handheld PC/PDA (clam shell) - kBluetoothDeviceClassMinorComputerPalmSized = 0x05, // [000101] Palm-sized PC/PDA - kBluetoothDeviceClassMinorComputerWearable = 0x06, // [000110] Wearable computer (watch sized) - - // Range 0x06 to 0x7F Reserved for future use. - - - /// - /// Phone Major Class - /// - - kBluetoothDeviceClassMinorPhoneUnclassified = 0x00, // [000000] Specific device code not assigned - kBluetoothDeviceClassMinorPhoneCellular = 0x01, // [000001] Cellular - kBluetoothDeviceClassMinorPhoneCordless = 0x02, // [000010] Cordless - kBluetoothDeviceClassMinorPhoneSmartPhone = 0x03, // [000011] Smart phone - kBluetoothDeviceClassMinorPhoneWiredModemOrVoiceGateway = 0x04, // [000100] Wired modem or voice gateway - kBluetoothDeviceClassMinorPhoneCommonISDNAccess = 0x05, // [000101] Common ISDN Access - - // Range 0x05 to 0x7F Reserved for future use. - - - /// - /// LAN Access Point Major Class - /// - - // $$$ TO DO: LAN Access Point minor classes are broken into bits 5-7 for utilization and bits 2-4 for class. - - - /// - /// Audio Major Class - /// - - kBluetoothDeviceClassMinorAudioUnclassified = 0x00, // [000000] Specific device code not assigned - kBluetoothDeviceClassMinorAudioHeadset = 0x01, // [000001] Device conforms to the Headset profile - kBluetoothDeviceClassMinorAudioHandsFree = 0x02, // [000010] Hands-free - kBluetoothDeviceClassMinorAudioReserved1 = 0x03, // [000011] Reserved - kBluetoothDeviceClassMinorAudioMicrophone = 0x04, // [000100] Microphone - kBluetoothDeviceClassMinorAudioLoudspeaker = 0x05, // [000101] Loudspeaker - kBluetoothDeviceClassMinorAudioHeadphones = 0x06, // [000110] Headphones - kBluetoothDeviceClassMinorAudioPortable = 0x07, // [000111] Portable Audio - kBluetoothDeviceClassMinorAudioCar = 0x08, // [001000] Car Audio - kBluetoothDeviceClassMinorAudioSetTopBox = 0x09, // [001001] Set-top box - kBluetoothDeviceClassMinorAudioHiFi = 0x0a, // [001010] HiFi Audio Device - kBluetoothDeviceClassMinorAudioVCR = 0x0b, // [001011] VCR - kBluetoothDeviceClassMinorAudioVideoCamera = 0x0c, // [001100] Video Camera - kBluetoothDeviceClassMinorAudioCamcorder = 0x0d, // [001101] Camcorder - kBluetoothDeviceClassMinorAudioVideoMonitor = 0x0e, // [001110] Video Monitor - kBluetoothDeviceClassMinorAudioVideoDisplayAndLoudspeaker = 0x0f, // [001111] Video Display and Loudspeaker - kBluetoothDeviceClassMinorAudioVideoConferencing = 0x10, // [010000] Video Conferencing - kBluetoothDeviceClassMinorAudioReserved2 = 0x11, // [010001] Reserved - kBluetoothDeviceClassMinorAudioGamingToy = 0x12, // [010010] Gaming/Toy - - - // Range 0x13 to 0x7F Reserved for future use. - - - /// - /// Peripheral Major Class - /// - - // Peripheral1 subclass is bits 7 & 6 - - kBluetoothDeviceClassMinorPeripheral1Keyboard = 0x10, // [01XXXX] Keyboard - kBluetoothDeviceClassMinorPeripheral1Pointing = 0x20, // [10XXXX] Pointing device - kBluetoothDeviceClassMinorPeripheral1Combo = 0x30, // [11XXXX] Combo keyboard/pointing device - - // Peripheral2 subclass is bits 5-2 - - kBluetoothDeviceClassMinorPeripheral2Unclassified = 0x00, // [XX0000] Uncategorized device - kBluetoothDeviceClassMinorPeripheral2Joystick = 0x01, // [XX0001] Joystick - kBluetoothDeviceClassMinorPeripheral2Gamepad = 0x02, // [XX0010] Gamepad - kBluetoothDeviceClassMinorPeripheral2RemoteControl = 0x03, // [XX0011] Remote control - kBluetoothDeviceClassMinorPeripheral2SensingDevice = 0x04, // [XX0100] Sensing device - kBluetoothDeviceClassMinorPeripheral2DigitizerTablet = 0x05, // [XX0101] Digitizer Tablet - kBluetoothDeviceClassMinorPeripheral2CardReader = 0x06, // [XX0110] Card Reader - - kBluetoothDeviceClassMinorPeripheral2AnyPointing = 'poin', // Anything under MinorPeripheral1Pointing - - // Range 0x05 to 0x0f reserved for future use - - - /// - /// Imaging Major Class - /// - - // Imaging1 subclass is bits 7 - 4 - - kBluetoothDeviceClassMinorImaging1Display = 0x04, // [XXX1XX] Display - kBluetoothDeviceClassMinorImaging1Camera = 0x08, // [XX1XXX] Camera - kBluetoothDeviceClassMinorImaging1Scanner = 0x10, // [X1XXXX] Scanner - kBluetoothDeviceClassMinorImaging1Printer = 0x20, // [1XXXXX] Printer - - // Imaging2 subclass is bits 3 - 2 - - kBluetoothDeviceClassMinorImaging2Unclassified = 0x00, // [XXXX00] Uncategorized, default - - // Range 0x01 - 0x03 reserved for future use - - - /// - /// Misc - /// - - kBluetoothDeviceClassMinorAny = '****', // Pseudo-class - means anything acceptable. - kBluetoothDeviceClassMinorNone = 'none', // Pseudo-class - means no matching. - - kBluetoothDeviceClassMinorEnd -}; - - -// Peripheral devices bits 7 & 6 -#define BluetoothCoDMinorPeripheral1(minorClass) (minorClass & 0x30) - -// Peripheral devices bits 5 - 2 -#define BluetoothCoDMinorPeripheral2(minorClass) (minorClass & 0x0f) - -#pragma mark - -#pragma mark === L2CAP === - -//=========================================================================================================================== -// L2CAP -//=========================================================================================================================== - -enum -{ - kBluetoothL2CAPPSMSDP = 0x0001, - kBluetoothL2CAPPSMRFCOMM = 0x0003, - kBluetoothL2CAPPSMTCS_BIN = 0x0005, // Telephony Control Specifictation / TCS Binary - kBluetoothL2CAPPSMTCS_BIN_Cordless = 0x0007, // Telephony Control Specifictation / TCS Binary - kBluetoothL2CAPPSMBNEP = 0x000F, // Bluetooth Network Encapsulation Protocol - kBluetoothL2CAPPSMHIDControl = 0x0011, // HID profile - control interface - kBluetoothL2CAPPSMHIDInterrupt = 0x0013, // HID profile - interrupt interface - kBluetoothL2CAPPSMAVCTP = 0x0017, // Audio/Video Control Transport Protocol - kBluetoothL2CAPPSMAVDTP = 0x0019, // Audio/Video Distribution Transport Protocol - kBluetoothL2CAPPSMUID_C_Plane = 0x001D, // Unrestricted Digital Information Profile (UDI) - - // Range < 0x1000 reserved. - kBluetoothL2CAPPSMReservedStart = 0x0001, - kBluetoothL2CAPPSMReservedEnd = 0x1000, - - // Range 0x1001-0xFFFF dynamically assigned. - kBluetoothL2CAPPSMDynamicStart = 0x1001, - kBluetoothL2CAPPSMD2D = 0x100F, - kBluetoothL2CAPPSMDynamicEnd = 0xFFFF, - - kBluetoothL2CAPPSMNone = 0x0000 -}; - - -#pragma mark - -#pragma mark === SDP === - -//=========================================================================================================================== -// Service Discovery Protocol -//=========================================================================================================================== - -enum -{ - // General - - kBluetoothSDPUUID16Base = 0x0000, // 00000000-0000-1000-8000-00805f9b34fb - - // Protocols - - kBluetoothSDPUUID16SDP = 0x0001, // 00000001-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16UDP = 0x0002, // 00000002-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16RFCOMM = 0x0003, // 00000003-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16TCP = 0x0004, // 00000004-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16TCSBIN = 0x0005, // 00000005-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16TCSAT = 0x0006, // 00000006-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16OBEX = 0x0008, // 00000008-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16IP = 0x0009, // 00000009-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16FTP = 0x000A, // 0000000A-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16HTTP = 0x000C, // 0000000C-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16WSP = 0x000E, // 0000000E-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16BNEP = 0x000F, - kBluetoothSDPUUID16UPNP = 0x0010, - kBluetoothSDPUUID16HIDP = 0x0011, - kBluetoothSDPUUID16HardcopyControlChannel = 0x0012, - kBluetoothSDPUUID16HardcopyDataChannel = 0x0014, - kBluetoothSDPUUID16HardcopyNotification = 0x0016, - kBluetoothSDPUUID16AVCTP = 0x0017, - kBluetoothSDPUUID16AVDTP = 0x0019, - kBluetoothSDPUUID16CMPT = 0x001B, - kBluetoothSDPUUID16UDI_C_Plane = 0x001D, - kBluetoothSDPUUID16L2CAP = 0x0100, // 00000100-0000-1000-8000-00805f9b34fb -}; - -enum SDPServiceClasses -{ - kBluetoothSDPUUID16ServiceClassServiceDiscoveryServer = 0x1000, // 00001000-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassBrowseGroupDescriptor = 0x1001, // 00001001-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassPublicBrowseGroup = 0x1002, // 00001002-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassSerialPort = 0x1101, // 00001101-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassLANAccessUsingPPP = 0x1102, // 00001102-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassDialupNetworking = 0x1103, // 00001103-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassIrMCSync = 0x1104, // 00001104-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassOBEXObjectPush = 0x1105, // 00001105-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassOBEXFileTransfer = 0x1106, // 00001106-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassIrMCSyncCommand = 0x1107, // 00001107-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassHeadset = 0x1108, // 00001108-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassCordlessTelephony = 0x1109, // 00001109-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassAudioSource = 0x110A, - kBluetoothSDPUUID16ServiceClassAudioSink = 0x110B, - kBluetoothSDPUUID16ServiceClassAVRemoteControlTarget = 0x110C, - kBluetoothSDPUUID16ServiceClassAdvancedAudioDistribution = 0x110D, - kBluetoothSDPUUID16ServiceClassAVRemoteControl = 0x110E, - kBluetoothSDPUUID16ServiceClassVideoConferencing = 0x110F, - kBluetoothSDPUUID16ServiceClassIntercom = 0x1110, // 00001110-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassFax = 0x1111, // 00001111-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassHeadsetAudioGateway = 0x1112, // 00001112-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassWAP = 0x1113, - kBluetoothSDPUUID16ServiceClassWAPClient = 0x1114, - kBluetoothSDPUUID16ServiceClassPANU = 0x1115, - kBluetoothSDPUUID16ServiceClassNAP = 0x1116, - kBluetoothSDPUUID16ServiceClassGN = 0x1117, - kBluetoothSDPUUID16ServiceClassDirectPrinting = 0x1118, - kBluetoothSDPUUID16ServiceClassReferencePrinting = 0x1119, - kBluetoothSDPUUID16ServiceClassImaging = 0x111A, - kBluetoothSDPUUID16ServiceClassImagingResponder = 0x111B, - kBluetoothSDPUUID16ServiceClassImagingAutomaticArchive = 0x111C, - kBluetoothSDPUUID16ServiceClassImagingReferencedObjects = 0x111D, - kBluetoothSDPUUID16ServiceClassHandsFree = 0x111E, - kBluetoothSDPUUID16ServiceClassHandsFreeAudioGateway = 0x111F, - kBluetoothSDPUUID16ServiceClassDirectPrintingReferenceObjectsService = 0x1120, - kBluetoothSDPUUID16ServiceClassReflectedUI = 0x1121, - kBluetoothSDPUUID16ServiceClassBasicPrinting = 0x1122, - kBluetoothSDPUUID16ServiceClassPrintingStatus = 0x1123, - kBluetoothSDPUUID16ServiceClassHumanInterfaceDeviceService = 0x1124, - kBluetoothSDPUUID16ServiceClassHardcopyCableReplacement = 0x1125, - kBluetoothSDPUUID16ServiceClassHCR_Print = 0x1126, - kBluetoothSDPUUID16ServiceClassHCR_Scan = 0x1127, - kBluetoothSDPUUID16ServiceClassCommonISDNAccess = 0x1128, - kBluetoothSDPUUID16ServiceClassVideoConferencingGW = 0x1129, - kBluetoothSDPUUID16ServiceClassUDI_MT = 0x112A, - kBluetoothSDPUUID16ServiceClassUDI_TA = 0x112B, - kBluetoothSDPUUID16ServiceClassAudioVideo = 0x112C, - kBluetoothSDPUUID16ServiceClassSIM_Access = 0x112D, - kBluetoothSDPUUID16ServiceClassPhonebookAccess_PCE = 0x112E, - kBluetoothSDPUUID16ServiceClassPhonebookAccess_PSE = 0x112F, - kBluetoothSDPUUID16ServiceClassPhonebookAccess = 0x1130, - kBluetoothSDPUUID16ServiceClassHeadset_HS = 0x1131, - kBluetoothSDPUUID16ServiceClassMessageAccessServer = 0x1132, - kBluetoothSDPUUID16ServiceClassMessageNotificationServer = 0x1133, - kBluetoothSDPUUID16ServiceClassMessageAccessProfile = 0x1134, - kBluetoothSDPUUID16ServiceClassPnPInformation = 0x1200, // 00001200-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassGenericNetworking = 0x1201, // 00001201-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassGenericFileTransfer = 0x1202, // 00001202-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassGenericAudio = 0x1203, // 00001203-0000-1000-8000-00805f9b34fb - kBluetoothSDPUUID16ServiceClassGenericTelephony = 0x1204 // 00001204-0000-1000-8000-00805f9b34fb -}; - -enum SDPAttributeIdentifierCodes -{ - kBluetoothSDPAttributeIdentifierServiceRecordHandle = 0x0000, - kBluetoothSDPAttributeIdentifierServiceClassIDList = 0x0001, - kBluetoothSDPAttributeIdentifierServiceRecordState = 0x0002, - kBluetoothSDPAttributeIdentifierServiceID = 0x0003, - kBluetoothSDPAttributeIdentifierProtocolDescriptorList = 0x0004, - kBluetoothSDPAttributeIdentifierBrowseGroupList = 0x0005, - kBluetoothSDPAttributeIdentifierLanguageBaseAttributeIDList = 0x0006, - kBluetoothSDPAttributeIdentifierServiceInfoTimeToLive = 0x0007, - kBluetoothSDPAttributeIdentifierServiceAvailability = 0x0008, - kBluetoothSDPAttributeIdentifierBluetoothProfileDescriptorList = 0x0009, - kBluetoothSDPAttributeIdentifierDocumentationURL = 0x000A, - kBluetoothSDPAttributeIdentifierClientExecutableURL = 0x000B, - kBluetoothSDPAttributeIdentifierIconURL = 0x000C, - kBluetoothSDPAttributeIdentifierAdditionalProtocolsDescriptorList = 0x000D, - - // Service Discovery Server - kBluetoothSDPAttributeIdentifierVersionNumberList = 0x0200, - kBluetoothSDPAttributeIdentifierServiceDatabaseState = 0x0201, - - // Browse Group Descriptor - kBluetoothSDPAttributeIdentifierGroupID = 0x0200, - - // PAN - kBluetoothSDPAttributeIdentifierIPSubnet = 0x0200, - -#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 - - // HID Required Type Section Notes - kBluetoothSDPAttributeIdentifierHIDReleaseNumber = 0x0200, // O uint16 7.11.1 - kBluetoothSDPAttributeIdentifierHIDParserVersion = 0x0201, // M uint16 - - kBluetoothSDPAttributeIdentifierHIDDeviceSubclass = 0x0202, // M uint8 7.11.2 Should match the low order 8 bits of CoD unless a combo device - kBluetoothSDPAttributeIdentifierHIDCountryCode = 0x0203, // M uint8 7.11.3 - kBluetoothSDPAttributeIdentifierHIDVirtualCable = 0x0204, // M bool 7.11.4 - kBluetoothSDPAttributeIdentifierHIDReconnectInitiate = 0x0205, // M bool 7.11.5 - kBluetoothSDPAttributeIdentifierHIDDescriptorList = 0x0206, // M sequence 7.11.6 Layout is defined in Section 6.2 of the HID Specification - kBluetoothSDPAttributeIdentifierHIDLangIDBaseList = 0x0207, // M sequence 7.11.7 - kBluetoothSDPAttributeIdentifierHIDSDPDisable = 0x0208, // O bool 7.11.8 - kBluetoothSDPAttributeIdentifierHIDBatteryPower = 0x0209, // O bool 7.11.9 - kBluetoothSDPAttributeIdentifierHIDRemoteWake = 0x020A, // O bool 7.11.10 - kBluetoothSDPAttributeIdentifierHIDProfileVersion = 0x020B, // M uint16 7.11.14 - kBluetoothSDPAttributeIdentifierHIDSupervisionTimeout = 0x020C, // O uint16 7.11.12 Default to 5 seconds or longer if not defined - kBluetoothSDPAttributeIdentifierHIDNormallyConnectable = 0x020D, // O bool 7.11.13 - kBluetoothSDPAttributeIdentifierHIDBootDevice = 0x020E, // M bool 7.11.11 Only defined for mice and keyboards as of HID 1.0 - -#endif - - kBluetoothSDPAttributeIdentifierServiceVersion = 0x0300, - kBluetoothSDPAttributeIdentifierExternalNetwork = 0x0301, // Cordless telephony - kBluetoothSDPAttributeIdentifierNetwork = 0x0301, // Handsfree Profile (HFP) - kBluetoothSDPAttributeIdentifierSupportedDataStoresList = 0x0301, // Sync Profile - kBluetoothSDPAttributeIdentifierFaxClass1Support = 0x0302, // Fax Profile - kBluetoothSDPAttributeIdentifierRemoteAudioVolumeControl = 0x0302, // GAP??? - kBluetoothSDPAttributeIdentifierFaxClass2_0Support = 0x0303, - kBluetoothSDPAttributeIdentifierSupporterFormatsList = 0x0303, - kBluetoothSDPAttributeIdentifierFaxClass2Support = 0x0304, - kBluetoothSDPAttributeIdentifierAudioFeedbackSupport = 0x0305, - kBluetoothSDPAttributeIdentifierNetworkAddress = 0x0306, // WAP - kBluetoothSDPAttributeIdentifierWAPGateway = 0x0307, // WAP - kBluetoothSDPAttributeIdentifierHomepageURL = 0x0308, // WAP - kBluetoothSDPAttributeIdentifierWAPStackType = 0x0309, // WAP - kBluetoothSDPAttributeIdentifierSecurityDescription = 0x030A, // PAN - kBluetoothSDPAttributeIdentifierNetAccessType = 0x030B, // PAN - kBluetoothSDPAttributeIdentifierMaxNetAccessRate = 0x030C, // PAN - kBluetoothSDPAttributeIdentifierSupportedCapabilities = 0x0310, // Imaging - kBluetoothSDPAttributeIdentifierSupportedFeatures = 0x0311, // Imaging & HFP - kBluetoothSDPAttributeIdentifierSupportedFunctions = 0x0312, // Imaging - kBluetoothSDPAttributeIdentifierTotalImagingDataCapacity = 0x0313, // Imaging - - kBluetoothSDPAttributeIdentifierServiceName = 0x0000, /* +language base offset*/ - kBluetoothSDPAttributeIdentifierServiceDescription = 0x0001, /* +language base offset*/ - kBluetoothSDPAttributeIdentifierProviderName = 0x0002 /* +language base offset*/ -}; - -enum SDPAttributeDeviceIdentificationRecord -{ - /* Values taken from the Bluetooth Device Identification specification, 1.0 draft, 1.16.2003 */ - - kBluetoothSDPAttributeDeviceIdentifierServiceDescription = 0x0001, /* String */ - kBluetoothSDPAttributeDeviceIdentifierDocumentationURL = 0x000A, /* URL */ - kBluetoothSDPAttributeDeviceIdentifierClientExecutableURL = 0x000B, /* URL */ - kBluetoothSDPAttributeDeviceIdentifierSpecificationID = 0x0200, /* 2 byte unsigned integer */ - kBluetoothSDPAttributeDeviceIdentifierVendorID = 0x0201, /* 2 byte unsigned integer */ - kBluetoothSDPAttributeDeviceIdentifierProductID = 0x0202, /* 2 byte unsigned integer */ - kBluetoothSDPAttributeDeviceIdentifierVersion = 0x0203, /* 2 byte unsigned integer */ - kBluetoothSDPAttributeDeviceIdentifierPrimaryRecord = 0x0204, /* Boolean */ - kBluetoothSDPAttributeDeviceIdentifierVendorIDSource = 0x0205, /* 2 byte unsigned integer */ - kBluetoothSDPAttributeDeviceIdentifierReservedRangeStart = 0x0206, - kBluetoothSDPAttributeDeviceIdentifierReservedRangeEnd = 0x02FF - -}; - -enum ProtocolParameters -{ - kBluetoothSDPProtocolParameterL2CAPPSM = 1, - kBluetoothSDPProtocolParameterRFCOMMChannel = 1, - kBluetoothSDPProtocolParameterTCPPort = 1, - kBluetoothSDPProtocolParameterUDPPort = 1, - kBluetoothSDPProtocolParameterBNEPVersion = 1, - kBluetoothSDPProtocolParameterBNEPSupportedNetworkPacketTypeList = 2 -}; - -#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0 - -//Inquiries with 'Extended Inquiry Response' (v2.1 specification) - -enum BluetoothHCIExtendedInquiryResponseDataTypes -{ - kBluetoothHCIExtendedInquiryResponseDataTypeFlags = 0x01, - kBluetoothHCIExtendedInquiryResponseDataType16BitServiceClassUUIDsWithMoreAvailable = 0x02, - kBluetoothHCIExtendedInquiryResponseDataType16BitServiceClassUUIDsCompleteList = 0x03, - kBluetoothHCIExtendedInquiryResponseDataType32BitServiceClassUUIDsWithMoreAvailable = 0x04, - kBluetoothHCIExtendedInquiryResponseDataType32BitServiceClassUUIDsCompleteList = 0x05, - kBluetoothHCIExtendedInquiryResponseDataType128BitServiceClassUUIDsWithMoreAvailable = 0x06, - kBluetoothHCIExtendedInquiryResponseDataType128BitServiceClassUUIDsCompleteList = 0x07, - kBluetoothHCIExtendedInquiryResponseDataTypeShortenedLocalName = 0x08, - kBluetoothHCIExtendedInquiryResponseDataTypeCompleteLocalName = 0x09, - kBluetoothHCIExtendedInquiryResponseDataTypeDeviceID = 0x10, - kBluetoothHCIExtendedInquiryResponseDataTypeManufacturerSpecificData = 0xFF -}; - -#endif /* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0 */ - - -#ifdef __cplusplus - } -#endif diff --git a/i386/include/IOKit/bluetooth/IOBluetoothHCIController.h b/i386/include/IOKit/bluetooth/IOBluetoothHCIController.h deleted file mode 100644 index 303795e..0000000 --- a/i386/include/IOKit/bluetooth/IOBluetoothHCIController.h +++ /dev/null @@ -1,1370 +0,0 @@ -/* - File: IOBluetoothHCIController.h - Contains: Bluetooth Host Controller base class. - Copyright: (c) 2001-2008 by Apple, all rights reserved. -*/ - - -#pragma once - -//==================================================================================================== -// Imports -//==================================================================================================== - -#import <IOKit/IOService.h> -#import <IOKit/system.h> -#import <IOKit/system.h> -#import <kern/thread_call.h> - -#import </usr/include/AvailabilityMacros.h> - -#include <IOKit/pwr_mgt/RootDomain.h> - -#import <IOKit/bluetooth/Bluetooth.h> - -#import <IOKit/bluetooth/IOBluetoothTypes.h> -#import <IOKit/bluetooth/IOBluetoothInternal.h> - -//==================================================================================================== -// Forward declarations -//==================================================================================================== - -class OSSet; -class IOWorkLoop; -class IOCommandGate; -class IOWorkQueue; -class IOBluetoothDevice; -class IOBluetoothHCIRequest; -class IOBluetoothHCIController; -class IOBluetoothACLMemoryDescriptor; -class IOTimerEventSource; -class IOBluetoothInactivityTimerEventSource; -class IOBluetoothHCIPacketLogUserClient; - -//==================================================================================================== -// defines, typdefs, etc. -//==================================================================================================== - -#define kNoReturnParam NULL - -typedef uint16_t DevicePublishNotificationStateType; -enum DevicePublishNotificationStateTypes -{ - kHasNotRegisteredForDevicePublishNotification = 0x0001, - kHasRegisteredForDevicePublishNotification = 0x0002, - kDevicePublishNotificationCalled = 0x0004, - kDevicePublishNotificationProcessed = 0x0008 -}; - -typedef UInt32 HCIDataHandlerType; -enum HCIDataHandlerTypes -{ - kTransportDataTypeHCIEvents, - kTransportDataTypeACL, - kTransportDataTypeSCO -}; - -typedef IOReturn (*IOBluetoothIncomingDataAction) ( IOBluetoothHCIController *hciController, UInt8 *inDataPtr, UInt32 inDataSize, UInt32 inSequenceNumber ); -typedef IOReturn (*IOBluetoothHCIControllerDataHandler) ( void * contextPtr, const UInt8 * data, UInt32 dataSize ); - -typedef struct HCIDataHandler HCIDataHandler; -struct HCIDataHandler -{ - IOBluetoothHCIControllerDataHandler procPtr; - void * contextPtr; -}; - -typedef struct HCIEventNotificationListener HCIEventNotificationListener; -struct HCIEventNotificationListener -{ - task_t owningTask; // Used to ID these things when adding/removing them from our listener pool. - mach_port_t port; // Mach port to send out the notificaton. - void * refCon; // RefCon for the port's use. -}; - -#define POWER_STATE_CHANGE_IN_PROGRESS() ( mCurrentInternalPowerState != mPendingInternalPowerState ) -#define IS_POWERING_DOWN() ( POWER_STATE_CHANGE_IN_PROGRESS() && ( mPendingInternalPowerState == kIOBluetoothHCIControllerInternalPowerStateOff ) ) - -//==================================================================================================== -// Callback structure for data: -//==================================================================================================== - -typedef struct SendDataContext -{ - // Data sent: - IOMemoryDescriptor *memoryDescriptorPointer; - - // Referece to the device that sent the data: - IOBluetoothDevice *devicePointer; - void *devicePointerContextInfo0; - void *devicePointerContextInfo1; - - // And the controller that received it: - IOBluetoothHCIController *hciController; - void *controllerPointerContextInfo0; - void *controllerPointerContextInfo1; - - // ReturnValue: - IOReturn sendingWasSuccessful; -} SendDataContext; - - -//==================================================================================================== -// Keep track of hearing devices -//==================================================================================================== -typedef struct HearingDeviceListType -{ - BluetoothDeviceAddress mDeviceAddress; - bool mRemoveDeviceCalled; - DevicePublishNotificationStateType mDevicePublishNotificationState; - HearingDeviceListType * mNextDevice; - HearingDeviceListType * mPreviousDevice; -} HearingDeviceListType; - -//==================================================================================================== -// IOBluetoothHCIController -//==================================================================================================== - -class IOBluetoothHCIController : public IOService -{ - // We don't make many friends, but at least we have a few... - - friend class IOBluetoothHCIPacketLogUserClient; - friend class IOBluetoothSerialManager; - friend class IOBluetoothHCIUserClient; - friend class IOBluetoothDevice; - friend class IOBluetoothHCIRequest; - - // IOKit stuff. - - OSDeclareDefaultStructors( IOBluetoothHCIController ) - -protected: - - IOWorkLoop * mWorkLoop; - IOCommandGate * mCommandGate; - IOWorkQueue * mWorkQueue; - IOTimerEventSource * mTimerEventSource; - Boolean mShouldRunInactivityTimer; - - // Data and request queue stuff. - - HCIEventNotificationListener* mHCIEventListenersList; - size_t mHCIEventListenersListSize; - HCIDataHandler* mHCIEventDataHandlerList; - size_t mHCIEventDataHandlerListSize; - HCIDataHandler* mACLDataHandlerList; - size_t mACLDataHandlerListSize; - HCIDataHandler* mSCODataHandlerList; - size_t mSCODataHandlerListSize; - - IOBluetoothHCIRequest * mBusyQueueHead; - IOBluetoothHCIRequest * mWaitQueueHead; - IOBluetoothHCIRequest ** mHCIRequestList; - - IOBluetoothDevice * mDeviceListHead; - - OSSet * mPacketLogClients; - UInt8 * mPacketLogBuffer; - UInt32 mPacketLogBufferSize; - - uint8_t * mEventDataBuffer; // Events without matching requests will use this. - size_t mEventDataBufferSize; - - // This keeps track of the ACL packets we actually sent: - BluetoothHCIBufferSize mHCIBufferSize; - UInt16 mNumOutstandingACLPackets; - - OSArray * mAllowedIncomingL2CAPChannels; - - UInt32 mNextAvailableSequenceNumber; - UInt32 mCurrentlyExecutingSequenceNumber; - UInt16 mActiveConnections; - - // Packet Queue description: - typedef struct QueuePacketHolder { - IOMemoryDescriptor *memDescriptor; // The data we need to send - SendDataContext * contextPtr; // Context pointer for the sent data. - IOBluetoothDevice * inTargetDevice; // The device that enqueued the data. - struct QueuePacketHolder *next; // The next block in the queue. - } QueuePacketHolder; - QueuePacketHolder *mACLQueueHead, *mACLQueueTail; - - // Counters to limit the number of packets in the queue (we do not want to go out of memory) - UInt32 mNumberOfPacketsInQueue; - - // The allowed RFCOMM channels - OSArray *mAllowedIncomingRFCOMMChannels; - - IOBluetoothHCIControllerInternalPowerState mCurrentInternalPowerState; - IOBluetoothHCIControllerInternalPowerState mPendingInternalPowerState; - Boolean mAsyncPowerStateChangeInProgress; - UInt32 mPendingPowerStateChangeOptions; - IOBluetoothHCIControllerPowerOptions mControllerPowerOptions; - Boolean mPowerStateChangeIsUserEnforced; - - Boolean mHardwareSetupComplete; - - IOBluetoothHCIControllerConfigState mControllerConfigState; - IOBluetoothHCIControllerConfigState mPreviousControllerConfigState; - - IOBluetoothHCIControllerFeatureFlags mControllerFeatureFlags; - - // Overrides. - - bool start( IOService * provider ); - - bool init( OSDictionary* dictionary ); - - virtual void free(); - -#if defined( MAC_OS_X_VERSION_10_5 ) - virtual void systemWillShutdown( IOOptionBits specifier ); -#endif - - static IOReturn initHardwareAction( OSObject *owner, - void *arg1, - void *arg2, - void *arg3, - void *arg4 ); - - virtual bool initHardware( IOService * provider ); - - static IOReturn setupHardwareAction( OSObject *owner, - void *arg1, - void *arg2, - void *arg3, - void *arg4 ); - - virtual IOReturn setupHardware( IOService* provider ); - - virtual void hardwareSetupComplete( IOReturn status ); - - virtual void setConfigState( IOBluetoothHCIControllerConfigState configState ); - virtual bool terminate( IOOptionBits options = 0 ); - virtual bool willTerminate( IOService * provider, IOOptionBits options ); - virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer ); - - void stop( IOService * provider ); - - IOReturn newUserClient( task_t owningTask, - void * securityID, - UInt32 type, - IOUserClient ** handler ); - - uint32_t CountExistingHCIControllers(); - - virtual IOReturn powerStateWillChangeTo( IOPMPowerFlags powerFlags, - unsigned long powerState, - IOService * from ); - - virtual unsigned long maxCapabilityForDomainState( IOPMPowerFlags domainState ); - - virtual unsigned long initialPowerStateForDomainState ( IOPMPowerFlags powerFlags ); - - // Our protected custom stuff. - - static IOReturn DetachUserClientsAction( OSObject *owner, - void *arg1, - void *arg2, - void *arg3, - void *arg4 ); - - virtual void DetachUserClients(); - - static IOReturn setPropertiesAction( OSObject *owner, - void *arg1, - void *arg2, - void *arg3, - void *arg4 ); - - virtual IOReturn setPropertiesWL( OSObject * properties ); - - static IOReturn AddPacketLogUserClientAction( OSObject *owner, - void *arg1, - void *arg2, - void *arg3, - void *arg4 ); - - virtual IOReturn AddPacketLogUserClient( IOBluetoothHCIPacketLogUserClient *newPacketLogUserClient ); - - virtual bool PacketLogFillBufferedData(); - - virtual void PacketLogClientClosed( IOBluetoothHCIPacketLogUserClient *packetLogClient ); - - virtual void LogPacket( UInt8 packetType, void *packetData, size_t packetSize ); - - static IOReturn LogPacketAction( OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4 ); - - virtual void DesyncIncomingData( IOBluetoothIncomingDataAction action, UInt8 *inDataPtr, UInt32 inDataSize ); - - static void DesyncIncomingDataAction( IOBluetoothHCIController *hciController, IOBluetoothIncomingDataAction action, void *inDataPtr, UInt32 inDataSize, UInt32 sequenceNumber ); - - virtual void SynchronizePacketSequence( UInt32 sequenceNumber ); - - virtual IOReturn AddDevice( IOBluetoothDevice *inDevice ); - - virtual IOReturn RemoveDevice( IOBluetoothDevice *inDevice ); - - virtual IOReturn CreateDeviceFromConnectionResults( BluetoothHCIEventConnectionCompleteResults *connectionResults ); - - virtual IOReturn DestroyDeviceWithDisconnectionResults( BluetoothHCIEventDisconnectionCompleteResults *disconnectionResults ); - - virtual IOReturn DestroyDevice( IOBluetoothDevice *inDevice ); - - virtual IOReturn DestroyAllDevices(); - - virtual void FlushDeviceACLPackets( IOBluetoothDevice *inDevice ); - - virtual void DecrementOutstandingACLPackets( UInt16 delta ); - - virtual void ProcessFlushOccurredEvent( BluetoothHCIEventFlushOccurredResults *inFlushResults ); - - virtual void ProcessNumCompletedPacketsEvent( UInt8 *inDataPtr ); - - virtual void ProcessHCIControllerResetEvent(); - - virtual IOReturn DispatchIncomingACLData( UInt8 *inDataPtr, UInt32 inDataSize ); - - // Common methods for L2CAP and RFCOMM channel managment: - virtual void MergeChannelDescription(OSDictionary *destination , OSDictionary *source); - virtual void RemoveChannelRestrictions(OSDictionary *toChange , OSDictionary *removeRule, const char *key); - virtual Boolean IsAllowedDevice(OSDictionary *description , IOBluetoothDevice *device); - virtual void RemoveAllRules(); - - // L2CAP channel managment methods: - virtual void RemoveAllowedIncomingL2CAPChannel( OSObject *channelID ); - virtual IOReturn AddAllowedIncomingL2CAPChannel( OSDictionary *channelDescription ); - virtual OSDictionary *GetIncomingL2CAPChannelDescription( OSNumber *psmNumber ); - - // L2CAP channel accessory methods: - virtual void AddAllowedIncomingL2CAPChannel( BluetoothL2CAPPSM incomingPSM ); - virtual void AddAllowedIncomingL2CAPChannel( OSNumber *psmNumber ); - virtual void RemoveAllowedIncomingL2CAPChannel( BluetoothL2CAPPSM incomingPSM ); - - // RFCOMM channel managment methods: - virtual OSDictionary *GetIncomingRFCOMMChannelDescription( OSNumber *channelIDNumber ); - virtual IOReturn AddAllowedIncomingRFCOMMChannel( OSDictionary *channelDescription ); - virtual void RemoveAllowedIncomingRFCOMMChannel( OSObject *channelID ); - - // RFCOMM channel accessory methods: - virtual void AddAllowedIncomingRFCOMMChannel( BluetoothRFCOMMChannelID incomingChannelID ); - virtual void AddAllowedIncomingRFCOMMChannel( OSNumber *channelIDNumber ); - virtual void AddSecureIncomingRFCOMMChannel( BluetoothRFCOMMChannelID incomingChannelID ); - virtual void AddSecureIncomingRFCOMMChannel( OSNumber *channelIDNumber ); - virtual void RemoveAllowedIncomingRFCOMMChannel( BluetoothRFCOMMChannelID incomingChannelID ); - - virtual IOReturn TransferACLPacketToHW(IOMemoryDescriptor *memDescriptor, - SendDataContext * contextPtr); - - // ACL Packet queue: - virtual IOReturn EnqueuePacket( IOMemoryDescriptor *memDescriptor, - SendDataContext *contextPtr, - IOBluetoothDevice *inTargetDevice); - - virtual IOReturn DequeuePacket(); - - virtual IOReturn RemoveAllPacketsBelongingTo(IOBluetoothDevice *inTargetDevice); - -public: - - // IOWorkLoop and IOCommandGate accessors - - virtual IOWorkLoop *getWorkLoop() const; - - virtual IOCommandGate *getCommandGate() const; - - virtual IOReturn setProperties( OSObject * properties ); - - // Subclasses must implement these for it to be a working transport - // in the Bluetooth Family world. - - virtual IOReturn SendHCIRequest( UInt8 * buffer, - IOByteCount bufferSize ); - - static IOReturn SendACLCompletedAction ( OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6 ); - - virtual void SendACLCompleted( SendDataContext *contextPtr); - - virtual IOReturn SendACLData( IOMemoryDescriptor *memDescriptor, - SendDataContext * contextPtr ); - - virtual IOReturn GetTransportInfo( BluetoothTransportInfo * infoStruct ); - - static IOReturn SendSCOCompletedAction ( OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6 ); - - // Override to do something custom with the data. Otherwise, the registered data handler - // will get a peek at it. - - // The ProcessXXXData() functions are safe to be called from anywhere. - // They call ProcessXXXDataWL() on the workloop using ProcessXXXDataAction() - - virtual void ProcessEventData( UInt8 * inDataPtr, UInt32 inDataSize ); - - virtual void ProcessACLData( UInt8 * data, UInt32 dataSize ); - - virtual void ProcessSCOData( UInt8 * data, UInt32 dataSize, UInt32 inMissingData, AbsoluteTime inTimestamp, Boolean copyData ); - - virtual void ProcessEventDataWL( UInt8 * inDataPtr, UInt32 inDataSize, UInt32 sequenceNumber ); - - virtual void ProcessACLDataWL( UInt8 * data, UInt32 dataSize, UInt32 sequenceNumber ); - - virtual void ProcessSCODataWL( UInt8 * data, UInt32 dataSize, UInt32 inMissingData, AbsoluteTime inTimestamp, Boolean copyData ); - - static IOReturn ProcessEventDataAction( IOBluetoothHCIController * hciController, - UInt8 * incomingDataPtr, - UInt32 inDataSize, - UInt32 inSequenceNumber ); - - static IOReturn ProcessACLDataAction( IOBluetoothHCIController * hciController, - UInt8 * incomingDataPtr, - UInt32 inDataSize, - UInt32 inSequenceNumber ); - - // The following is only a "ghost" call and exists only to make the compiler happy, its implementation - // does not do anything. - static IOReturn ProcessSCODataAction( IOBluetoothHCIController * hciController, - UInt8 * incomingDataPtr, - UInt32 inDataSize, - UInt32 inMissingData, - UInt32 inTimestampHi, - UInt32 inTimestampLo, - Boolean inCopyData ); - - static IOReturn ProcessSCODataActionAT( IOBluetoothHCIController * hciController, - UInt8 * incomingDataPtr, - UInt32 inDataSize, - UInt32 inMissingData, - AbsoluteTime* inTimestamp, - Boolean inCopyData ); - - // Data processing helpers. - - virtual bool GetCompleteCodeForCommand( BluetoothHCICommandOpCode inOpCode, - BluetoothHCIEventCode *outEventCode ); - - virtual bool GetOpCodeAndEventCode( UInt8 * inDataPtr, - BluetoothHCICommandOpCode * outOpCode, - BluetoothHCIEventCode * eventCode, - BluetoothHCIEventStatus * outStatus, - BluetoothDeviceAddress * outDeviceAddress, - BluetoothConnectionHandle * outConnectionHandle ); - - virtual IOReturn FindConnectionCompleteType( BluetoothHCICommandOpCode * outOpCode ); - - virtual IOReturn HandleSpecialOpcodes( BluetoothHCICommandOpCode opCode ); - - // This is a hook for other interested parties to get HCI event notifications. When a user client is created, - // that mach_port_t will be passed on to us via these calls so that their port will get HCI events that aren't - // specifically tied to a requst object, but occur due to requests they make. - - virtual IOReturn AddHCIEventNotification( task_t inOwningTask, mach_port_t inPort, void * refCon ); - - virtual void BroadcastEventNotification( BluetoothHCIRequestID inID, - BluetoothHCIEventCode inEventCode, - IOReturn eventStatus, - UInt8 * inDataToSendPtr, - IOByteCount inDataSize, - BluetoothHCICommandOpCode inOpCode ); - - virtual void BroadcastConfigStateChangeNotification( IOBluetoothHCIControllerConfigState oldState, - IOBluetoothHCIControllerConfigState newState ); - - virtual IOReturn RemoveHCIEventNotification( task_t inOwningTask ); - - // This is a hook for other interested parties to get data from transports. They will register itself - // with these to receive the raw data from the transport, bypassing HCI code. - - virtual IOReturn AddDataClient( HCIDataHandlerType inType, - IOBluetoothHCIControllerDataHandler inProcPtr, - void * inContextPtr ); - - virtual IOReturn NotifyDataClients( HCIDataHandlerType inType, UInt8 * inDataPtr, UInt32 inDataSize ); - - virtual IOReturn RemoveDataClient( HCIDataHandlerType inType, IOBluetoothHCIControllerDataHandler inProcPtr ); - - // Request creation, deletion and other data processing stuff. - - virtual IOReturn HCIRequestCreate( BluetoothHCIRequestID * outRequestID, - bool inDoAsyncNotify = TRUE, - UInt32 inTimeout = 5, - BluetoothHCIRequestCallbackInfo * inCallbackInfo = NULL, - task_t inTaskID = 0, - UInt32 inControlFlags = 0 ); - - virtual IOReturn HCIRequestDelete( task_t inTask, BluetoothHCIRequestID inID ); - - virtual IOReturn LookupRequest( BluetoothHCIRequestID inID, IOBluetoothHCIRequest ** outRequestPtr ); - - virtual IOReturn PrepareRequestForNewCommand( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inDeviceAddress, - BluetoothConnectionHandle inConnectionHandle ); - - virtual IOReturn EnqueueRequest( IOBluetoothHCIRequest * inRequestPtr ); - - virtual IOReturn FindQueuedRequest( BluetoothHCICommandOpCode opCode, - BluetoothDeviceAddress * inDeviceAddress, - BluetoothConnectionHandle inConnectionHandle, - Boolean inUseAttributes, - IOBluetoothHCIRequest ** outRequestPtr ); - - virtual IOReturn DequeueRequest( IOBluetoothHCIRequest * inRequestPtr ); - - virtual IOReturn EnqueueWaitRequest( IOBluetoothHCIRequest * inRequestPtr ); - - virtual IOReturn FindQueuedWaitRequest( BluetoothHCICommandOpCode opCode, IOBluetoothHCIRequest ** outRequestPtr ); - - virtual IOReturn DequeueWaitRequest( IOBluetoothHCIRequest * inRequestPtr ); - - virtual IOReturn AbortRequest( IOBluetoothHCIRequest * inRequestPtr ); - - virtual IOReturn FindNextExpiringRequest( BluetoothHCICommandOpCode opCode, IOBluetoothHCIRequest ** outRequestPtr ); - - virtual IOReturn ProcessWaitingRequests(); - - inline IOBluetoothHCIRequest* GetNextWaitRequest() { return( mWaitQueueHead ); } - - inline IOBluetoothHCIRequest* GetNextBusyRequest() { return( mBusyQueueHead ); } - - virtual void TakeAHexDump( const void *inData, UInt32 inDataSize ); - - virtual IOReturn DumpStats(); - - virtual IOBluetoothHCIControllerPowerOptions GetControllerPowerOptions(); - virtual IOBluetoothHCIControllerInternalPowerState GetControllerPowerState(); - virtual IOReturn WaitForControllerPowerState( IOBluetoothHCIControllerInternalPowerState powerState ); - - virtual IOReturn RequestPowerStateChange( IOBluetoothHCIControllerInternalPowerState newPowerState ); - - virtual IOReturn SendHCIRequestFormatted( BluetoothHCIRequestID inID, - BluetoothHCICommandOpCode inOpCode, - IOByteCount outResultsSize, - void * outResultsPtr, - const char * inFormat, - ... ); - - static void RequestExpired( OSObject *owner, IOTimerEventSource *sender ); - - // Misc stuff. - - IOReturn DisposeRequestsForTaskID( task_t inTaskID ); - - IOReturn KillAllPendingRequests( Boolean destroy, Boolean includeIdleRequests ); - void SendingRequest( IOBluetoothHCIRequest *requestPtr ); - void DecrementActiveConnections( ); - - virtual void ActiveConnectionsInProgress( ); - virtual void AllConnectionsGone( ); - - virtual IOReturn SendRawHCICommand( BluetoothHCIRequestID inID, - char * buffer, - UInt32 bufferSize ); - - // Vendor Specific stuff. - - virtual IOReturn VendorCommand( BluetoothHCIRequestID inID, - BluetoothHCIVendorCommandSelector inSelector, - UInt8 * inCommandData, - IOByteCount inCommandDataSize, - IOByteCount outBufferSize, - UInt8 * outBuffer ); - - // IOBluetoothDevice object management - - virtual IOBluetoothDevice * FindDeviceWithHandle( BluetoothConnectionHandle inConnectionHandle ); - - virtual IOBluetoothDevice * FindDeviceWithAddress( const BluetoothDeviceAddress *inDeviceAddress ); - - virtual IOReturn SendACLPacket( IOBluetoothACLMemoryDescriptor *memDescriptor, - SendDataContext * contextPtr, - IOBluetoothDevice * inTargetDevice = NULL ); - - - // API for the serial manager to open a new connection - - virtual IOBluetoothDevice *OpenDeviceConnection( const BluetoothDeviceAddress *inDeviceAddress ); - - static IOReturn OpenDeviceConnectionAction( OSObject *owner, - void *arg1, - void *arg2, - void *arg3, - void *arg4 ); - - virtual IOBluetoothDevice *OpenDeviceConnectionWL( const BluetoothDeviceAddress *inDeviceAddress ); - - // API to track the secure state of RFCOMM channels - virtual Boolean IsSecureIncomingRFCOMMChannel( BluetoothRFCOMMChannelID incomingChannelID ); - virtual Boolean IsSecureIncomingRFCOMMChannel( OSNumber *channelIDNumber ); - - // API to track allowed incoming L2CAP and RFCOMM channels given a device: - virtual Boolean IsAllowedIncomingL2CAPChannelForDevice( BluetoothL2CAPPSM incomingPSM, IOBluetoothDevice *device ); - virtual Boolean IsAllowedIncomingRFCOMMChannelForDevice( BluetoothRFCOMMChannelID incomingChannelID, IOBluetoothDevice *device ); - - // Enabled state for RFCOMM channels: - virtual void SetEnabledIncomingRFCOMMChannel( OSNumber *channelIDNumber, bool ShouldBeEnabled); - virtual void SetEnabledIncomingRFCOMMChannel( BluetoothRFCOMMChannelID incomingChannelID, bool ShouldBeEnabled); - - virtual Boolean ShouldRunInactivityTimer(); // NOT USED: See StartIdleTimer - virtual void SetRunInactivityTimer( Boolean shouldRun ); // NOT USED: See StopIdleTimer - - //============================ - - // From here on out, we implement each of the commands in the HCI spec. You can work around - // hardware bugs by overriding any of these functions if necessary. - - - // Link Control Commands. - - virtual IOReturn BluetoothHCIInquiry( BluetoothHCIRequestID inID, - BluetoothLAP inLAP, - BluetoothHCIInquiryLength inInquiryLength, - BluetoothHCIResponseCount inMaxResponseCount, - BluetoothHCIInquiryResults * outResults ); - - virtual IOReturn BluetoothHCIInquiryCancel( BluetoothHCIRequestID inID ); - - virtual IOReturn BluetoothHCIPeriodicInquiryMode( BluetoothHCIRequestID inID, - BluetoothHCIInquiryLength inMaxPeriodLength, - BluetoothHCIInquiryLength inMinPeriodLength, - BluetoothLAP inLAP, - BluetoothHCIInquiryLength inInquiryLength, - BluetoothHCIResponseCount inMaxResponses, - BluetoothHCIInquiryResults * outResults ); - - virtual IOReturn BluetoothHCIExitPeriodicInquiryMode( BluetoothHCIRequestID inID ); - - virtual IOReturn BluetoothHCICreateConnection( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddressPtr, - BluetoothPacketType inPacketType, - BluetoothPageScanRepetitionMode inPageScanRepetitionMode, - BluetoothPageScanMode inPageScanMode, - BluetoothClockOffset inClockOffset, - BluetoothAllowRoleSwitch inAllowRoleSwitch, - BluetoothHCIEventConnectionCompleteResults *outConnectionHandle ); - - virtual IOReturn BluetoothHCIDisconnect( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothReasonCode inReason, - BluetoothHCIEventDisconnectionCompleteResults * outResults ); - - virtual IOReturn BluetoothHCIAddSCOConnection( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inACLConnectionHandle, - BluetoothPacketType inPacketType ); - - virtual IOReturn BluetoothHCIAcceptConnectionRequest( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddressPtr, - BluetoothRole inRole ); - - virtual IOReturn BluetoothHCIRejectConnectionRequest( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddressPtr, - BluetoothReasonCode inReason ); - - virtual IOReturn BluetoothHCILinkKeyRequestReply( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddressPtr, - const BluetoothKey * inKeyPtr, - BluetoothDeviceAddress * outAddress ); - - virtual IOReturn BluetoothHCILinkKeyRequestNegativeReply( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddressPtr, - BluetoothDeviceAddress * outAddress ); - - virtual IOReturn BluetoothHCIPINCodeRequestReply( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddressPtr, - IOByteCount inPINCodeSize, - const BluetoothPINCode * inPINCode, - BluetoothDeviceAddress * outAddress ); - - virtual IOReturn BluetoothHCIPINCodeRequestNegativeReply( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddressPtr, - BluetoothDeviceAddress * outAddress ); - - virtual IOReturn BluetoothHCIChangeConnectionPacketType( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothPacketType inPacketType ); - - virtual IOReturn BluetoothHCIAuthenticationRequested( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle ); - - virtual IOReturn BluetoothHCISetEncryptionEnable( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothEncryptionEnable inEncryptionEnable ); - - virtual IOReturn BluetoothHCIChangeConnectionLinkKey( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle ); - - virtual IOReturn BluetoothHCIMasterLinkKey( BluetoothHCIRequestID inID, - BluetoothKeyFlag inKeyFlag ); - - virtual IOReturn BluetoothHCIRemoteNameRequest( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddressPtr, - BluetoothPageScanRepetitionMode inPageScanRepetitionMode, - BluetoothPageScanMode inPageScanMode, - BluetoothClockOffset inClockOffset, - BluetoothHCIEventRemoteNameRequestResults * outName ); - - virtual IOReturn BluetoothHCIReadRemoteSupportedFeatures( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothHCIEventReadRemoteSupportedFeaturesResults * outFeatures ); - - virtual IOReturn BluetoothHCIReadRemoteVersionInformation( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothHCIEventReadRemoteVersionInfoResults * outVersionInfo ); - - virtual IOReturn BluetoothHCIReadClockOffset( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothClockOffset * outClockOffset ); - - // Link Policy commands. - - virtual IOReturn BluetoothHCIHoldMode( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothHCIModeInterval inHoldModeMaxInterval, - BluetoothHCIModeInterval inHoldModeMinInterval ); - - virtual IOReturn BluetoothHCISniffMode( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothHCIModeInterval inSniffModeMaxInterval, - BluetoothHCIModeInterval inSniffModeMinInterval, - BluetoothHCISniffAttemptCount inSniffAttemptCount, - BluetoothHCISniffTimeout inSniffModeTimeout ); - - virtual IOReturn BluetoothHCIExitSniffMode( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle ); - - virtual IOReturn BluetoothHCIParkMode( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothHCIParkModeBeaconInterval inMaxInterval, - BluetoothHCIParkModeBeaconInterval inMinInterval ); - - virtual IOReturn BluetoothHCIExitParkMode( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle ); - - virtual IOReturn BluetoothHCIQualityOfServiceSetup( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothHCIQualityOfServiceSetupParams * inSetupPtr ); - - virtual IOReturn BluetoothHCIRoleDiscovery( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothHCIRoleInfo * outRoleInfo ); - - virtual IOReturn BluetoothHCISwitchRole( BluetoothHCIRequestID inID, - BluetoothDeviceAddress * inAddressPtr, - BluetoothHCIRole inNewRole ); - - virtual IOReturn BluetoothHCIReadLinkPolicySettings( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothHCILinkPolicySettingsInfo * outSettingsInfo ); - - virtual IOReturn BluetoothHCIWriteLinkPolicySettings( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothHCILinkPolicySettings inSettings, - BluetoothConnectionHandle * outConnectionHandle ); - - // Host controller and baseband commands. - - virtual IOReturn BluetoothHCISetEventMask( BluetoothHCIRequestID inID, - BluetoothSetEventMask * inMask ); - - virtual IOReturn BluetoothHCIReset( BluetoothHCIRequestID inID ); - - virtual IOReturn BluetoothHCISetEventFilter( BluetoothHCIRequestID inID ); - - virtual IOReturn BluetoothHCIFlush( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inHandle ); - - virtual IOReturn BluetoothHCIReadPINType( BluetoothHCIRequestID inID, - BluetoothPINType * outType ); - - virtual IOReturn BluetoothHCIWritePINType( BluetoothHCIRequestID inID, - BluetoothPINType inType ); - - virtual IOReturn BluetoothHCICreateNewUnitKey( BluetoothHCIRequestID inID ); - - virtual IOReturn BluetoothHCIReadStoredLinkKey( BluetoothHCIRequestID inID, - BluetoothDeviceAddress * targetDevice, - BluetoothHCIReadStoredLinkKeysFlag * inFlags, - BluetoothHCIStoredLinkKeysInfo * outKeysInfo ); - - virtual IOReturn BluetoothHCIWriteStoredLinkKey( BluetoothHCIRequestID inID, - IOItemCount inNumKeysToWrite, - BluetoothDeviceAddress inDeviceAddresses[], - BluetoothKey inLinkKeys[], - BluetoothHCINumLinkKeysToWrite * outNumKeysWritten ); - - virtual IOReturn BluetoothHCIDeleteStoredLinkKey( BluetoothHCIRequestID inID, - BluetoothDeviceAddress * targetDevice, - BluetoothHCIDeleteStoredLinkKeyFlag * inFlag, - BluetoothHCINumLinkKeysDeleted * outNumDeleted ); - - virtual IOReturn BluetoothHCIReadLocalName( BluetoothHCIRequestID inID, - BluetoothDeviceName name ); - - virtual IOReturn BluetoothHCIChangeLocalName( BluetoothHCIRequestID inID, - BluetoothDeviceName newName ); - - virtual IOReturn BluetoothHCIReadConnectionAcceptTimeout( BluetoothHCIRequestID inID, - BluetoothHCIConnectionAcceptTimeout * outTimeout ); - - virtual IOReturn BluetoothHCIWriteConnectionAcceptTimeout( BluetoothHCIRequestID inID, - BluetoothHCIConnectionAcceptTimeout inTimeout ); - - virtual IOReturn BluetoothHCIReadPageTimeout( BluetoothHCIRequestID inID, - BluetoothHCIPageTimeout * outDataPtr ); - - virtual IOReturn BluetoothHCIWritePageTimeout( BluetoothHCIRequestID inID, - BluetoothHCIPageTimeout inTimeout ); - - virtual IOReturn BluetoothHCIReadScanEnable( BluetoothHCIRequestID inID, - BluetoothHCIPageScanEnableState * outState ); - - virtual IOReturn BluetoothHCIWriteScanEnable( BluetoothHCIRequestID inID, - BluetoothHCIPageScanEnableState inState ); - - virtual IOReturn BluetoothHCIReadPageScanActivity( BluetoothHCIRequestID inID, - BluetoothHCIScanActivity * outActivityInfo ); - - virtual IOReturn BluetoothHCIWritePageScanActivity( BluetoothHCIRequestID inID, - BluetoothHCIScanActivity * inActivityInfo ); - - virtual IOReturn BluetoothHCIReadInquiryScanActivity( BluetoothHCIRequestID inID, - BluetoothHCIScanActivity * outActivityInfo ); - - virtual IOReturn BluetoothHCIWriteInquiryScanActivity( BluetoothHCIRequestID inID, - BluetoothHCIScanActivity * inActivityInfo ); - - virtual IOReturn BluetoothHCIReadAuthenticationEnable( BluetoothHCIRequestID inID, - BluetoothHCIAuthenticationEnable * outAuthenticationState ); - - virtual IOReturn BluetoothHCIWriteAuthenticationEnable( BluetoothHCIRequestID inID, - BluetoothHCIAuthenticationEnable inAuthenticationState ); - - virtual IOReturn BluetoothHCIReadEncryptionMode( BluetoothHCIRequestID inID, - BluetoothHCIEncryptionMode * outEncryptionState ); - - virtual IOReturn BluetoothHCIWriteEncryptionMode( BluetoothHCIRequestID inID, - BluetoothHCIEncryptionMode inEncryptionMode ); - - virtual IOReturn BluetoothHCIReadClassOfDevice( BluetoothHCIRequestID inID, - BluetoothClassOfDevice * outClassOfDevice ); - - virtual IOReturn BluetoothHCIWriteClassOfDevice( BluetoothHCIRequestID inID, - BluetoothClassOfDevice inClassOfDevice ); - - virtual IOReturn BluetoothHCIReadVoiceSetting( BluetoothHCIRequestID inID, - BluetoothHCIVoiceSetting * outVoiceSetting ); - - virtual IOReturn BluetoothHCIWriteVoiceSetting( BluetoothHCIRequestID inID, - BluetoothHCIVoiceSetting inVoiceSetting ); - - virtual IOReturn BluetoothHCIReadAutomaticFlushTimeout( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothHCIAutomaticFlushTimeoutInfo * outAutomaticFlushTimeoutInfo ); - - - virtual IOReturn BluetoothHCIWriteAutomaticFlushTimeout( BluetoothHCIRequestID inID, - BluetoothHCIAutomaticFlushTimeoutInfo * inAutomaticFlushTimeoutInfo, - BluetoothConnectionHandle * outConnectionHandle ); - - virtual IOReturn BluetoothHCIReadNumBroadcastRetransmissions( BluetoothHCIRequestID inID, - BluetoothHCINumBroadcastRetransmissions * outNumRetrans ); - - virtual IOReturn BluetoothHCIWriteNumBroadcastRetransmissions( BluetoothHCIRequestID inID, - BluetoothHCINumBroadcastRetransmissions inNumRetrans ); - - virtual IOReturn BluetoothHCIReadHoldModeActivity( BluetoothHCIRequestID inID, - BluetoothHCIHoldModeActivity * outState ); - - virtual IOReturn BluetoothHCIWriteHoldModeActivity( BluetoothHCIRequestID inID, - BluetoothHCIHoldModeActivity inState ); - - virtual IOReturn BluetoothHCIReadTransmitPowerLevel( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inHandle, - BluetoothHCITransmitPowerLevelType inType, - BluetoothHCITransmitPowerLevelInfo * outLevelInfo ); - - virtual IOReturn BluetoothHCIReadSCOFlowControlEnable( BluetoothHCIRequestID inID, - BluetoothHCIFlowControlState * outState ); - - virtual IOReturn BluetoothHCIWriteSCOFlowControlEnable( BluetoothHCIRequestID inID, - BluetoothHCIFlowControlState inState ); - - virtual IOReturn BluetoothHCISetHostControllerToHostFlowControl( BluetoothHCIRequestID inID, - BluetoothHCIFlowControlState inState ); - - virtual IOReturn BluetoothHCIHostBufferSize( BluetoothHCIRequestID inID, - BluetoothHCIBufferSize * inSize ); - - virtual IOReturn BluetoothHCIHostNumberOfCompletePackets( BluetoothHCIRequestID inID ); - - virtual IOReturn BluetoothHCIReadLinkSupervisionTimeout( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inHandle, - BluetoothHCILinkSupervisionTimeout * outInfo ); - - virtual IOReturn BluetoothHCIWriteLinkSupervisionTimeout( BluetoothHCIRequestID inID, - BluetoothHCILinkSupervisionTimeout * inInfo, - BluetoothConnectionHandle * outHandle ); - - virtual IOReturn BluetoothHCIReadNumberOfSupportedIAC( BluetoothHCIRequestID inID, - BluetoothHCISupportedIAC * outNumSupported ); - - virtual IOReturn BluetoothHCIReadCurrentIACLAP( BluetoothHCIRequestID inID ); - - virtual IOReturn BluetoothHCIWriteCurrentIACLAP( BluetoothHCIRequestID inID ); - - virtual IOReturn BluetoothHCIReadPageScanPeriodMode( BluetoothHCIRequestID inID, - BluetoothHCIPageScanPeriodMode * outMode ); - - virtual IOReturn BluetoothHCIWritePageScanPeriodMode( BluetoothHCIRequestID inID, - BluetoothHCIPageScanPeriodMode inMode ); - - virtual IOReturn BluetoothHCIReadPageScanMode( BluetoothHCIRequestID inID, - BluetoothHCIPageScanMode * outMode ); - - virtual IOReturn BluetoothHCIWritePageScanMode( BluetoothHCIRequestID inID, - BluetoothHCIPageScanMode inMode ); - - // Informational commands. - - virtual IOReturn BluetoothHCIReadLocalVersionInformation( BluetoothHCIRequestID inID, - BluetoothHCIVersionInfo * outVersionInfo ); - - virtual IOReturn BluetoothHCIReadLocalSupportedFeatures( BluetoothHCIRequestID inID, - BluetoothHCISupportedFeatures * outFeatures ); - - virtual IOReturn BluetoothHCIReadBufferSize( BluetoothHCIRequestID inID, - BluetoothHCIBufferSize * outSize ); - - virtual IOReturn BluetoothHCIReadCountryCode( BluetoothHCIRequestID inID, - BluetoothHCICountryCode * outCountryCode ); - - virtual IOReturn BluetoothHCIReadDeviceAddress( BluetoothHCIRequestID inID, - BluetoothDeviceAddress * outAddress ); - - // Status commands. - - virtual IOReturn BluetoothHCIReadFailedContactCounter( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothHCIFailedContactInfo * outFailedContactCount ); - - virtual IOReturn BluetoothHCIResetFailedContactCounter( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle ); - - virtual IOReturn BluetoothHCIGetLinkQuality( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothHCILinkQualityInfo * outLinkQualityInfo ); - - virtual IOReturn BluetoothHCIReadRSSI( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothHCIRSSIInfo * outRSSIInfo ); - - // Testing Commands. - - virtual IOReturn BluetoothHCIReadLoopbackMode( BluetoothHCIRequestID inID, - BluetoothHCILoopbackMode * inLoopbackMode ); - - virtual IOReturn BluetoothHCIWriteLoopbackMode( BluetoothHCIRequestID inID, - BluetoothHCILoopbackMode inLoopbackMode ); - - virtual IOReturn BluetoothHCIEnableDeviceUnderTestMode( BluetoothHCIRequestID inID ); - - virtual IOBluetoothHCIControllerFeatureFlags GetControllerFeatureFlags(); - -protected: - - // Power managment functions: - - virtual bool configurePM(IOService *provider); - - virtual IOReturn setPowerState( unsigned long powerStateOrdinal, IOService* whatDevice ); - static IOReturn setPowerStateAction( OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4 ); - virtual IOReturn setPowerStateWL( unsigned long powerStateOrdinal, IOService* whatDevice ); - - virtual void UpdatePowerStateProperty( IOBluetoothHCIControllerInternalPowerState powerState ); - - virtual void SetControllerPowerOptions( IOBluetoothHCIControllerPowerOptions controllerPowerOptions ); - virtual IOReturn PerformPowerStateChange( IOBluetoothHCIControllerInternalPowerState oldPowerState, - IOBluetoothHCIControllerInternalPowerState newPowerState, - UInt32 powerStateOptions, - UInt32 *microsecondsUntilComplete ); - virtual void CompletePowerStateChange(); - - virtual void SetControllerFeatureFlags( IOBluetoothHCIControllerFeatureFlags featureFlags ); - - virtual IOReturn setAggressiveness( unsigned long type, unsigned long newLevel ); - - // Enablers for future Changes. - - typedef struct ExpansionData - { - void *mUnsedPointer1, *mUnsedPointer2; - - // Max number of HCI command allowed; - UInt8 mNumberOfCommandsAllowedByHardware; - UInt8 mNumConfiguredHIDDevices; - UInt8 mControllerSleepFlags; - - // This pointer is depreacted and free for future uses. - void* mUnusedPointer; - - // AFH support: - // the mask for the channels to use: - UInt8 mMaskByte[10]; - - // AirPort changes notifications: - IONotifier *windowServerNotifier; - IONotifier *mAirPortPCI; - Boolean mProcessingConnectionRequest; - Boolean mWaitingForCompletedACLPacketsToSleep; - - // SCO Support - UInt8 mNumSCOConnections; - UInt8 *mSCOPacketBuffer; - UInt16 mNumBufferedSCOBytes; - AbsoluteTime mBufferedSCOPacketTimestamp; - - // Repository for the packets when logging at boot - OSArray *mRepositoryForBoot; - UInt16 mMaxNumberOfBootPackets; - - IOService *mOverriddenControllerProvider; - - size_t mHCIRequestListSize; - uint32_t mNewRequestIndex; - - IOBluetoothInactivityTimerEventSource *mIdleTimer; - Boolean mSystemOnTheWayToSleep; - - // New Airport notifications: - IONotifier *mIO80211Interface; - - UInt32 mNextAvailableSCOSequenceNumber; - UInt32 mCurrentlyExecutingSCOSequenceNumber; - - Boolean mNeedToCleanUpWaitForAckQueue; - Boolean mResettingDevice; - - HearingDeviceListType *mConnectedHearingDeviceListHead; - HearingDeviceListType *mConnectedHearingDeviceListTail; - - } ExpansionData; - - ExpansionData* mExpansionData; - -#define mConnectedHearingDeviceListTail IOBluetoothHCIController::mExpansionData->mConnectedHearingDeviceListTail -#define mConnectedHearingDeviceListHead IOBluetoothHCIController::mExpansionData->mConnectedHearingDeviceListHead -#define mResettingDevice IOBluetoothHCIController::mExpansionData->mResettingDevice -#define mNeedToCleanUpWaitForAckQueue IOBluetoothHCIController::mExpansionData->mNeedToCleanUpWaitForAckQueue -#define mNextAvailableSCOSequenceNumber IOBluetoothHCIController::mExpansionData->mNextAvailableSCOSequenceNumber -#define mCurrentlyExecutingSCOSequenceNumber IOBluetoothHCIController::mExpansionData->mCurrentlyExecutingSCOSequenceNumber - -#define mNumberOfCommandsAllowedByHardware IOBluetoothHCIController::mExpansionData->mNumberOfCommandsAllowedByHardware -#define mNumConfiguredHIDDevices IOBluetoothHCIController::mExpansionData->mNumConfiguredHIDDevices -#define mControllerSleepFlags IOBluetoothHCIController::mExpansionData->mControllerSleepFlags -#define mSleepWakeNotifier IOBluetoothHCIController::mExpansionData->mSleepWakeNotifier - -#define mMaskByte IOBluetoothHCIController::mExpansionData->mMaskByte -#define windowServerNotifier IOBluetoothHCIController::mExpansionData->windowServerNotifier -#define mAirPortPCI IOBluetoothHCIController::mExpansionData->mAirPortPCI -#define mProcessingConnectionRequest IOBluetoothHCIController::mExpansionData->mProcessingConnectionRequest -#define mWaitingForCompletedACLPacketsToSleep IOBluetoothHCIController::mExpansionData->mWaitingForCompletedACLPacketsToSleep - -#define mNumSCOConnections IOBluetoothHCIController::mExpansionData->mNumSCOConnections -#define mSCOPacketBuffer IOBluetoothHCIController::mExpansionData->mSCOPacketBuffer -#define mNumBufferedSCOBytes IOBluetoothHCIController::mExpansionData->mNumBufferedSCOBytes -#define mBufferedSCOPacketTimestamp IOBluetoothHCIController::mExpansionData->mBufferedSCOPacketTimestamp -#define mRepositoryForBoot IOBluetoothHCIController::mExpansionData->mRepositoryForBoot -#define mMaxNumberOfBootPackets IOBluetoothHCIController::mExpansionData->mMaxNumberOfBootPackets -#define mOverriddenControllerProvider IOBluetoothHCIController::mExpansionData->mOverriddenControllerProvider -#define mHCIRequestListSize IOBluetoothHCIController::mExpansionData->mHCIRequestListSize -#define mNewRequestIndex IOBluetoothHCIController::mExpansionData->mNewRequestIndex -#define mIdleTimer IOBluetoothHCIController::mExpansionData->mIdleTimer -#define mSystemOnTheWayToSleep IOBluetoothHCIController::mExpansionData->mSystemOnTheWayToSleep -#define mIO80211Interface IOBluetoothHCIController::mExpansionData->mIO80211Interface - - enum { - kIOBluetoothHCIControllerSleepFlagInquiryScanWasEnabled = 0x01 - }; - - -private: - - // Command Packet Queue: - virtual IOReturn EnqueueRequestForController( IOBluetoothHCIRequest *requestPtr ); // Was OSMetaClassDeclareReservedUnused( IOBluetoothHCIController, 0 ) - virtual IOReturn DequeueAndSendRequests(); // Was OSMetaClassDeclareReservedUnused( IOBluetoothHCIController, 1 ) - virtual IOReturn RemoveAllRequestsFromQueue(); // Was OSMetaClassDeclareReservedUnused( IOBluetoothHCIController, 2 ) - - // New Device creation upon connection: - IOReturn CreateDeviceFromConnectionResults( BluetoothHCIEventConnectionCompleteResults *connectionResults, bool isInitiator); - - // Expanded version of OpenDeviceConnection MUST BE CALLED IN THE WORKLOOP - virtual IOBluetoothDevice *OpenDeviceConnection( const BluetoothDeviceAddress *inDeviceAddress, BluetoothHCIPageTimeout pageTimeoutValue, bool authenticationRequired); - - // sleepWakeHandler DEPRECATED METHOD RETURNS kIOReturnUnsupported ALL THE TIME ! - static IOReturn sleepWakeHandler( void *target, void *refCon, UInt32 messageType, IOService *service, void *messageArgument, vm_size_t argSize ); - - static IOReturn restartShutdownAction( OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4 ); - static IOReturn systemSleepWakeAction( OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4 ); - -public: - virtual IOReturn restartShutdownWL( UInt32 messageType, void *reserved); - - // AFH support: - virtual UInt8 *rangeForChannel(UInt16 channel); - virtual IOReturn handleAirPortChangesChannelWL(IOService *serviceForAirport); - - // Version of stop in the workloop - virtual void stopWL( IOService * provider ); - -private: - static bool staticAirPortDriverNotification(void *us, void *unused, IOService * yourDevice); - static IOReturn handleAirPortChangesChannelAction( OSObject *owner, void *castMeToServiceForAirport, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6 ); - - static bool windowServerDidAppear( void * target, void * refCon, IOService * newService, IONotifier * notifier ); - static IOReturn windowServerDidAppearAction( OSObject *owner, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6 ); - - // Expansion slots: - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 0 ); - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 1 ); - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 2 ); - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 3 ); - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 4 ); - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 5 ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 6 ); - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 7 ); - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 8 ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 9 ); - virtual void SetNumSCOConnections( UInt8 numSCOConnections ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 10 ); - virtual void UpdateSCOConnections( UInt8 numSCOConnections ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 11 ); - virtual IOBluetoothDevice *FindDeviceWithSCOHandle( BluetoothConnectionHandle inConnectionHandle ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 12 ); - virtual IOReturn SendSCOData( IOMemoryDescriptor *scoDataDescriptor, - SendDataContext *scoDataContext ); - -protected: - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 13 ); - virtual void SendSCOCompleted( SendDataContext *contextPtr, AbsoluteTime timestamp ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 14 ); - virtual IOReturn DispatchIncomingSCOData( UInt8 *inDataPtr, UInt32 inDataSize, UInt32 inMissingData, AbsoluteTime inTimestamp ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 15 ); - virtual bool willTerminateWL( IOService * provider, IOOptionBits options ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 16 ); - virtual bool shouldOverrideExistingController( IOBluetoothHCIController *controller ); - - static void idleTimerFired( OSObject *owner, IOTimerEventSource *timerEventSource ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 17 ); - virtual void handleIdleTimeout(); - - static IOReturn terminateAction( OSObject *owner, - void *arg1, - void *arg2, - void *arg3, - void *arg4 ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 18 ); - virtual IOReturn terminateWL( IOOptionBits options ); - - // Support for dynamic channel width - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 19 ); - virtual UInt8 *rangeForChannel(UInt16 channel, SInt16 width); - -public: - - // v1.2 + v2.1 commands - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 20 ); - virtual IOReturn BluetoothHCIReadExtendedInquiryResponse( BluetoothHCIRequestID inID, - BluetoothHCIReadExtendedInquiryResponseResults * outData ); - - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 21 ); - virtual IOReturn BluetoothHCIWriteExtendedInquiryResponse( BluetoothHCIRequestID inID, - BluetoothHCIFECRequired inFECRequired, - BluetoothHCIExtendedInquiryResponse * inData ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 22 ); - virtual IOReturn BluetoothHCIReadInquiryMode( BluetoothHCIRequestID inID, - BluetoothHCIInquiryMode * outMode ); - - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 23 ); - virtual IOReturn BluetoothHCIWriteInquiryMode( BluetoothHCIRequestID inID, - BluetoothHCIInquiryMode inMode ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 24 ); - virtual IOReturn BluetoothHCIReadSimplePairingMode( BluetoothHCIRequestID inID, - BluetoothHCISimplePairingMode * outMode ); - - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 25 ); - virtual IOReturn BluetoothHCIWriteSimplePairingMode( BluetoothHCIRequestID inID, - BluetoothHCISimplePairingMode inMode ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 26 ); - virtual IOReturn BluetoothHCIIOCapabilityRequestReply( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddress, - BluetoothIOCapability inIOCapability, - BluetoothOOBDataPresence inOOBDataPresence, - BluetoothAuthenticationRequirements inAuthenticationRequirements ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 27 ); - virtual IOReturn BluetoothHCIReadLocalOOBData( BluetoothHCIRequestID inID, - BluetoothHCIReadLocalOOBDataResults * outData ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 28 ); - virtual IOReturn BluetoothHCIReadInquiryResponseTransmitPower( BluetoothHCIRequestID inID, - BluetoothHCITransmitPowerLevel * outData ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 29 ); - virtual IOReturn BluetoothHCIWriteInquiryResponseTransmitPower( BluetoothHCIRequestID inID, - BluetoothHCITransmitPowerLevel inData ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 30 ); - virtual IOReturn BluetoothHCIUserConfirmationRequestReply( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddress ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 31 ); - virtual IOReturn BluetoothHCIUserConfirmationRequestNegativeReply( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddress ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 32 ); - virtual IOReturn BluetoothHCIUserPasskeyRequestReply( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddress, - BluetoothPasskey inPasskey); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 33 ); - virtual IOReturn BluetoothHCIUserPasskeyRequestNegativeReply( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddress ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 34 ); - virtual IOReturn BluetoothHCIRemoteOOBDataRequestReply( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddress, - BluetoothHCISimplePairingOOBData * hash, - BluetoothHCISimplePairingOOBData * randomizer ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 35 ); - virtual IOReturn BluetoothHCIRemoteOOBDataRequestNegativeReply( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddress ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 36 ); - virtual IOReturn BluetoothHCIWriteSimplePairingDebugMode( BluetoothHCIRequestID inID, - BluetoothSimplePairingDebugMode inData ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 37 ); - virtual IOReturn BluetoothHCISendKeypressNotification( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddress, - BluetoothKeypressNotificationType inData ); - -protected: - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 38 ); - virtual IOReturn systemSleepWakeWL( UInt32 messageType, void *reserved); - -public: - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 39 ); - virtual IOReturn BluetoothHCIReadLocalExtendedFeatures( BluetoothHCIRequestID inID, - BluetoothHCIPageNumber inPageNumber, - BluetoothHCIExtendedFeaturesInfo * outFeatures ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 40 ); - virtual IOReturn BluetoothHCIReadRemoteExtendedFeatures( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothHCIPageNumber inPageNumber, - BluetoothHCIEventReadRemoteExtendedFeaturesResults * outFeatures ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 41 ); - virtual IOReturn BluetoothHCIReadAFHChannelAssessmentMode( BluetoothHCIRequestID inID, - BluetoothHCIAFHChannelAssessmentMode * outData ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 42 ); - virtual IOReturn BluetoothHCIWriteAFHChannelAssessmentMode( BluetoothHCIRequestID inID, - BluetoothHCIAFHChannelAssessmentMode inData ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 43 ); - virtual IOReturn BluetoothHCISetAFHHostChannelClassification( BluetoothHCIRequestID inID, - uint8_t * inDataPtr, - uint8_t inDataLength ); - -private: - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 44 ); - virtual IOReturn BluetoothHCIReadAFHChannelMap( BluetoothHCIRequestID inID, - BluetoothConnectionHandle inConnectionHandle, - BluetoothAFHResults * outData ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 45 ); - virtual void SynchronizeSCOPacketSequence( UInt32 sequenceNumber ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 46 ); - virtual IOReturn BluetoothHCICreateConnectionCancel( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddressPtr, - BluetoothDeviceAddress * outAddress ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 47 ); - virtual IOReturn BluetoothHCIRemoteNameRequestCancel( BluetoothHCIRequestID inID, - const BluetoothDeviceAddress * inAddressPtr, - BluetoothDeviceAddress * outAddress ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 48 ); - void StartIdleTimer( uint32_t milliseconds ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 49 ); - void StopIdleTimer(); - -public: - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 50 ); - virtual IOReturn setUnackQueueCompletionCalled(void * memoryDescriptor); - -protected: - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 51 ); - virtual IOReturn RemovePacket(IOMemoryDescriptor *memDescriptor); - -public: - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 52 ); - IOReturn exitHIDSniff(bool exitSniff); - -public: - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 53 ); - virtual IOReturn WaitForControllerPowerStateWithTimeout( IOBluetoothHCIControllerInternalPowerState powerState, - UInt32 waitTimeInMicroSecond); -public: - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 54 ); - void SetHCIDriverExistsVariableTo( bool isLoaded ); - -public: - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 55 ); - virtual IOReturn ToggleLMPLogging( ); - -public: - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 56 ); - virtual HearingDeviceListType * FindHearingDeviceWithAddress( const BluetoothDeviceAddress *inDeviceAddress ); - -public: - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 57 ); - virtual IOReturn AddHearingDevice( IOBluetoothDevice *inDevice ); - -public: - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 58 ); - virtual IOReturn RemoveHearingDevice( IOBluetoothDevice *inDevice, bool all ); - -public: - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 59 ); - virtual IOReturn SetDevicePublishNotificationState( const BluetoothDeviceAddress *inDeviceAddress, DevicePublishNotificationStateType state ); - -public: - OSMetaClassDeclareReservedUsed( IOBluetoothHCIController, 60 ); - virtual DevicePublishNotificationStateType * GetDevicePublishNotificationState( const BluetoothDeviceAddress *inDeviceAddress ); - -private: - OSMetaClassDeclareReservedUnused( IOBluetoothHCIController, 61 ); - OSMetaClassDeclareReservedUnused( IOBluetoothHCIController, 62 ); - OSMetaClassDeclareReservedUnused( IOBluetoothHCIController, 63 ); -}; diff --git a/i386/include/IOKit/bluetooth/IOBluetoothHCIRequest.h b/i386/include/IOKit/bluetooth/IOBluetoothHCIRequest.h deleted file mode 100644 index c9d970e..0000000 --- a/i386/include/IOKit/bluetooth/IOBluetoothHCIRequest.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - File: IOBluetoothHCIRequest.h - Contains: Bluetooth Host Controller request object. - Copyright: (c) 2001-2008 by Apple, all rights reserved. -*/ - -#pragma once - -#import <IOKit/IOService.h> -#import <IOKit/system.h> - -#import <IOKit/bluetooth/Bluetooth.h> - - -class IOCommandGate; -class IOTimerEventSource; -class IOBluetoothHCIController; - -// Forward declaration to avoid the need to include IOBluetoothHCIUserLibShared.h -typedef struct BluetoothHCINotificationMessage; - -//=========================================================================================================================== -// enums, macros, etc. -//=========================================================================================================================== - -enum -{ - kMaxHCIBufferLength = 512 -}; - -typedef UInt8 BluetoothHCIRequestState; -enum BluetoothHCIRequestStates -{ - kHCIRequestStateIdle = 0, // Doing nothing - neither waiting nor busy. usually waiting for deletion. - kHCIRequestStateWaiting = 1, // On the wait queue - request has not been processed in any way. - kHCIRequestStateBusy = 2, // On the busy queue - request is sent and is currently processing -}; - - -//=========================================================================================================================== -// IOBluetoothHCIRequest -//=========================================================================================================================== - -class IOBluetoothHCIRequest : public OSObject -{ - OSDeclareDefaultStructors( IOBluetoothHCIRequest ) - - UInt8 mPrivateResultsBuffer[kMaxHCIBufferLength*4]; // Just in case they didn't give a results ptr. - IOByteCount mPrivateResultsSize; // Result size. - BluetoothHCITransportID mTransportID; // Transport ID to use for this request. - UInt8 mState; // Busy, waiting, idle. - bool mAsyncNotify; - task_t mOwningTaskID; - BluetoothHCIRequestCallbackInfo mCallbackInfo; // When this request is complete, call this. - BluetoothHCICommandOpCode mOpCode; - BluetoothDeviceAddress mDeviceAddress; - BluetoothConnectionHandle mConnectionHandle; - BluetoothHCINotificationMessage * mNotificationMessage; - IOByteCount mNotificationMessageSize; - - -public: - - IOBluetoothHCIRequest * mNextBusy; // Points to next request element on busy queue. - IOBluetoothHCIRequest * mNextWait; // Points to next request element on wait queue. - IOBluetoothHCIRequest * mNextAllocated; // Points to next allocated request element. - IOBluetoothHCIRequest * mPreviousAllocated; // Points to next allocated request element. - BluetoothHCIRequestID mID; // For internal identification. - UInt8 mCommandBuffer[kMaxHCIBufferLength]; // Built-up HCI Command to send to the transport. - IOByteCount mCommandBufferSize; // Size of command buffer. - - UInt8 * mResultsPtr; // Result ptr, provided by object creator. - IOByteCount mResultsSize; // Result size. - - IOCommandGate * mCommandGate; - IOTimerEventSource * mTimer; - IOBluetoothHCIController * mHCIController; - IOReturn mStatus; // Success/failure code of request. - UInt32 mTimeout; // Timeout for request to complete, in milliseconds. - UInt32 mControlFlags; - int mPID; // Creating Task - bool mHCIRequestDeleteWasCalled; // Fixed rdar://problem/7044168 - - -public: - - bool init( IOCommandGate *commandGate, IOBluetoothHCIController *hciController ); - void free(); - - static IOBluetoothHCIRequest * Create( IOCommandGate *commandGate, IOBluetoothHCIController *hciController, bool async = TRUE, UInt32 timeout = 5, UInt32 controlFlags = 0 ); - static IOReturn Dispose( IOBluetoothHCIRequest * inObject ); - - - // Called when a request is started on a transport, and completed. - - IOReturn Start(); - void Complete(); - - // Accessors for object members. - - void SetState( BluetoothHCIRequestState inState ); - BluetoothHCIRequestState GetState() { return( mState ); } - - void SetHCIStatus( BluetoothHCIStatus inStatus ) { mStatus = inStatus; } - BluetoothHCIStatus GetHCIStatus() { return( mStatus ); } - - void SetID( BluetoothHCIRequestID inID ) { mID = inID; } - BluetoothHCIRequestID GetID() { return( mID ); } - - void SetCallbackInfo( BluetoothHCIRequestCallbackInfo * inInfo ); - BluetoothHCIRequestCallbackInfo * GetCallbackInfo() { return( &mCallbackInfo ); } - - void SetOwningTaskID( task_t inTaskID ) { mOwningTaskID = inTaskID; } - task_t GetOwningTaskID() { return( mOwningTaskID ); } - - void * GetCommandBuffer(); - - BluetoothHCICommandOpCode GetCommandOpCode(); - void SetCommandOpCode( BluetoothHCICommandOpCode inOpCode ) { mOpCode = inOpCode; } - - BluetoothDeviceAddress * GetDeviceAddress() { return &mDeviceAddress; } - void SetDeviceAddress( const BluetoothDeviceAddress *inDeviceAddress ) { if ( inDeviceAddress != NULL ) memcpy( &mDeviceAddress, inDeviceAddress, sizeof( BluetoothDeviceAddress ) ); } - void ClearDeviceAddress() { bzero( &mDeviceAddress, sizeof( BluetoothDeviceAddress ) ); } - Boolean CompareDeviceAddress( const BluetoothDeviceAddress *inDeviceAddress ); - - BluetoothConnectionHandle GetConnectionHandle() { return mConnectionHandle; } - void SetConnectionHandle( BluetoothConnectionHandle inConnectionHandle ) { mConnectionHandle = inConnectionHandle; } - void ClearConnectionHandle() { mConnectionHandle = kBluetoothConnectionHandleNone; } - - void SetTimeout( UInt32 inTimeout ) { mTimeout = inTimeout; } // in milliseconds - UInt32 GetTimeout() { return( mTimeout ); } - - void StartTimer(); - - static void timerFired( OSObject *owner, IOTimerEventSource *sender ); - void handleTimeout(); - - void CopyDataIntoResultsPtr( UInt8 * inDataPtr, IOByteCount inSize ); - void SetParamPtrAndSize( UInt8 paramNumber, UInt8 * inParamPtr, IOByteCount inSize ); - - void SetResultsBufferPtrAndSize( UInt8 * resultsBuffer, IOByteCount inSize ); - void SetResultsDataSize( IOByteCount inCount ); - UInt8 * GetResultsBuffer(); - IOByteCount GetResultsBufferSize(); - - mach_vm_address_t GetNotificationRefCon() { return( mCallbackInfo.asyncIDRefCon ); } - - void SetDoAsyncNotify( bool inAsyncNotify ) { mAsyncNotify = inAsyncNotify; } - Boolean IsSynchronous() { return !mAsyncNotify; } - - void SetControlFlags( UInt32 controlFlags ) { mControlFlags = controlFlags; } - UInt32 GetControlFlags() { return mControlFlags; } - - const char * RequestDescription(); -}; diff --git a/i386/include/IOKit/bluetooth/IOBluetoothHIDDriver.h b/i386/include/IOKit/bluetooth/IOBluetoothHIDDriver.h deleted file mode 100644 index b3bb449..0000000 --- a/i386/include/IOKit/bluetooth/IOBluetoothHIDDriver.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - File: IOBluetoothHIDDriver.h - Contains: Driver for generic Bluetooth HID devices. - Copyright: (c) 2001-2008 by Apple, all rights reserved. -*/ - -#ifndef IOBLUETOOTHHIDDRIVER_H -#define IOBLUETOOTHHIDDRIVER_H - -#include <IOKit/hid/IOHIDDevice.h> -#include <IOKit/bluetooth/Bluetooth.h> - -//=========================================================================================================================== -// Forwards -//=========================================================================================================================== - -class IOTimerEventSource; -class IOWorkLoop; - -class IOBluetoothL2CAPChannel; -class IOBluetoothDevice; -class IOWorkQueue; - -//=========================================================================================================================== -// IOBluetoothHIDDriver -//=========================================================================================================================== - -class IOBluetoothHIDDriver : public IOHIDDevice -{ - OSDeclareDefaultStructors( IOBluetoothHIDDriver ) - - IOWorkLoop* _workLoop; - IOCommandGate* _commandGate; - - IOWorkQueue *_desyncWorkQueue; - - IOBluetoothL2CAPChannel* _controlChannel; - IOBluetoothL2CAPChannel* _interruptChannel; - - IOBluetoothDevice* _device; - - IOMemoryDescriptor* _memDescriptor; - IOMemoryDescriptor* _getReportDescriptor; - IONotifier* _interruptOpenNotification; - IOTimerEventSource* _timer; - IONotifier* _sleepWakeNotifier; - - bool _deviceReady; - - UInt8 _expectedReportID; - UInt8 _expectedReportType; - UInt8 _handshake; - - OSDictionary* _deviceProperties; - - UInt16 _vendorIDSource; - UInt16 _vendorID; - UInt16 _productID; - UInt16 _deviceVersion; - uint32_t _classOfDevice; - UInt16 _countryCode; - - BluetoothDeviceAddress _deviceAddress; - char _deviceAddressString[20]; - - uint32_t _outstandingIO; - bool _sendOutstanding; - - // Debug / Behavior Modifiers - UInt8 _verboseLevel; - bool _logPackets; - bool _decodePackets; - bool _logOutstandingIO; - bool _suppressDisconnectNotifications; - bool _suppressSetProtocol; - bool _driverIsAwake; - bool _reservedFlag4; - UInt8 _reservedByte; - - struct ExpansionData - { - OSArray* _sendQueue; - - uint8_t *interruptBuffer; - uint32_t interruptBufferUsed; - - uint8_t *controlBuffer; - uint32_t controlBufferUsed; - - uint8_t deviceSupportsSuspend; - - uint32_t getReportTimeoutMS; - uint32_t setReportTimeoutMS; - - uint32_t outstandingMemoryBlockCount; - bool waitingForMemoryBlockCount; - }; - ExpansionData *_expansionData; - -public: - // Standard IOService Methods - virtual IOService* probe( IOService * provider, SInt32 * score ); - virtual bool init( OSDictionary *properties ); - virtual void free(); - virtual bool willTerminate( IOService * provider, IOOptionBits options ); - - // Starting & Stopping - virtual bool handleStart( IOService * provider ); - virtual void handleStop( IOService * provider ); - virtual void deviceReady(); - virtual void closeDownServices(); - - // Power Management - virtual void handleSleep(); - virtual void handleWake(); - virtual void handleShutdown(); // Does nothing - virtual void handleRestart(); // Does nothing - - // HID Properties - virtual OSString* newTransportString() const; - virtual OSString* newManufacturerString() const; - virtual OSString* newProductString() const; - virtual OSNumber* newVendorIDSourceNumber() const; - virtual OSNumber* newVendorIDNumber() const; - virtual OSNumber* newProductIDNumber() const; - virtual OSNumber* newVersionNumber() const; - virtual IOReturn newReportDescriptor( IOMemoryDescriptor ** descriptor ) const; - virtual OSString* newSerialNumberString() const; - virtual OSNumber* newLocationIDNumber() const; - virtual OSNumber* newCountryCodeNumber() const; - virtual OSNumber* newReportIntervalNumber() const; - - // Main UserLand Entry Points - virtual IOReturn getReport( IOMemoryDescriptor* report, IOHIDReportType reportType, IOOptionBits options = 0 ); - virtual IOReturn setReport( IOMemoryDescriptor* report, IOHIDReportType reportType, IOOptionBits options = 0 ); - virtual IOReturn setProperties( OSObject* properties ); - - // General IO - virtual IOReturn sendData( IOBluetoothL2CAPChannel* theChannel, void* theData, IOByteCount theSize ); - virtual void processControlData( UInt8 *buffer, UInt16 length ); - virtual void processInterruptData( UInt8 *buffer, UInt16 length ); - virtual IOReturn waitForData( IOMemoryDescriptor* report, UInt8 btReportType, UInt8 reportID ); - virtual IOReturn waitForHandshake(); - - // HID Transaction Methods - virtual IOReturn hidControl( UInt8 controlOperation ); - virtual int getProtocol(); - virtual IOReturn setProtocol( UInt8 protocol ); - virtual int getIdle(); - virtual IOReturn setIdle( UInt8 idleRate ); - - // Device Introspection - virtual bool isKeyboard(); - virtual bool isMouse(); - - // Misc - virtual IOReturn setPowerState( unsigned long powerStateOrdinal, IOService* whatDevice ); - virtual IOReturn createCommandGate( IOService* provider ); - virtual IOReturn getDeviceProperties( IOService* provider ); - virtual bool readDeviceName(); - - // Command Gate Actions - static IOReturn staticCloseDownServicesAction( OSObject* owner, void* arg1, void* arg2, void* arg3, void* arg4 ); - static IOReturn staticSendToAction( OSObject* owner, void* theChannel, void* theData, void *theSize, void* ); - static IOReturn staticPrepControlChannelAction( OSObject* owner, void* arg1, void* arg2, void* arg3, void* arg4 ); - static IOReturn staticPrepInterruptChannelAction( OSObject* owner, void* arg1, void* arg2, void* arg3, void* arg4 ); - static IOReturn staticGetReportAction( OSObject* owner, void* arg1, void* arg2, void* arg3, void* arg4 ); - static IOReturn staticSetReportAction( OSObject* owner, void* arg1, void* arg2, void* arg3, void* arg4 ); - static IOReturn staticProcessCommandAction( OSObject* owner, void* arg1, void* arg2, void* arg3, void* arg4 ); - static IOReturn staticGetDevicePropertiesAction( OSObject* owner, void* arg1, void* arg2, void* arg3, void* arg4 ); - static IOReturn staticInterruptChannelOpeningAction( OSObject* owner, void* newService, void* arg2, void* arg3, void* arg4 ); - static IOReturn staticWillTerminateAction( OSObject* owner, void* arg1, void* arg2, void* arg3, void* arg4 ); - - // Work Loop Methods - virtual void closeDownServicesWL(); - virtual IOReturn prepInterruptChannelWL(); - virtual IOReturn getReportWL( IOMemoryDescriptor* report, IOHIDReportType reportType, IOOptionBits options ); - virtual IOReturn setReportWL( IOMemoryDescriptor* report, IOHIDReportType reportType, IOOptionBits options ); - virtual IOReturn processCommandWL( OSString* command, OSNumber* commandParameter ); - virtual IOReturn getDevicePropertiesWL( IOService* provider ); - virtual IOReturn interruptChannelOpeningWL( IOBluetoothL2CAPChannel* theChannel ); - - // Timeout Handler - static void timerFired( OSObject* owner, IOTimerEventSource* sender ); - virtual void handleTimeout(); - - // IO Counting - virtual void incrementOutstandingIO(); - virtual void decrementOutstandingIO(); - -private: - // Lazy Interrupt Channel Methods - static bool interruptChannelOpeningCallback( void* me, void* ignoreMe, IOService* newService, IONotifier *notifier ); - static IOReturn powerStateHandler( void *target, void *refCon, UInt32 messageType, IOService *service, void *messageArgument, vm_size_t argSize ); - -public: - OSMetaClassDeclareReservedUsed( IOBluetoothHIDDriver, 0 ); - virtual void sendDeviceDisconnectNotifications( void ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHIDDriver, 1 ); - virtual IOReturn setPowerStateWL( unsigned long powerStateOrdinal, IOService* whatDevice ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHIDDriver, 2 ); - virtual void sendDeviceConnectNotifications( void ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHIDDriver, 3 ); - virtual void decrementOutstandingMemoryBlockCount( void ); - - OSMetaClassDeclareReservedUsed( IOBluetoothHIDDriver, 4 ); - virtual IOReturn willTerminateWL( void ); - -public: - OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 5 ); - OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 6 ); - OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 7 ); - OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 8 ); - OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 9 ); - OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 10 ); - OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 11 ); - OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 12 ); - OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 13 ); - OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 14 ); - OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 15 ); - OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 16 ); - OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 17 ); - OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 18 ); - OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 19 ); -}; - -#endif // IOBLUETOOTHHIDDRIVER_H diff --git a/i386/include/IOKit/bluetooth/IOBluetoothHIDDriverTypes.h b/i386/include/IOKit/bluetooth/IOBluetoothHIDDriverTypes.h deleted file mode 100644 index 8d722aa..0000000 --- a/i386/include/IOKit/bluetooth/IOBluetoothHIDDriverTypes.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - File: IOBluetoothHIDDriverTypes.h - Contains: Type defined for the IOBluetoothHIDDriver.h. - Copyright: (c) 2001-2008 by Apple, all rights reserved. -*/ - - -#ifndef IOBLUETOOTHHIDDRIVERTYPES_H -#define IOBLUETOOTHHIDDRIVERTYPES_H - -// Vendor ID Sources -//------------------ -#define kVendorIDSourceBluetoothSIG 0x1 -#define kVendorIDSourceUSBIF 0x2 - -// Bluetooth HID Transaction Headers -//---------------------------------- -#define IOBTHID_HANDSHAKE_HEADER 0x00 -#define IOBTHID_HID_CONTROL_HEADER 0x10 -#define IOBTHID_GET_REPORT_HEADER 0x40 -#define IOBTHID_SET_REPORT_HEADER 0x50 -#define IOBTHID_GET_PROTOCOL_HEADER 0x60 -#define IOBTHID_SET_PROTOCOL_HEADER 0x70 -#define IOBTHID_GET_IDLE_HEADER 0x80 -#define IOBTHID_SET_IDLE_HEADER 0x90 -#define IOBTHID_DATA_HEADER 0xA0 -#define IOBTHID_DATC_HEADER 0xB0 - -// Handshake Types -//---------------- -#define IOBTHID_HANDSHAKE_SUCCESSFUL 0x0 -#define IOBTHID_HANDSHAKE_NOT_READY 0x1 -#define IOBTHID_HANDSHAKE_INVALID_REPORT_ID 0x2 -#define IOBTHID_HANDSHAKE_UNSUPPORTED_REQUEST 0x3 -#define IOBTHID_HANDSHAKE_INVALID_PARAMETER 0x4 -#define IOBTHID_HANDSHAKE_ERR_UNKNOWN 0xE -#define IOBTHID_HANDSHAKE_ERR_FATAL 0xF - -// HID_Control Types -//------------------ -#define IOBTHID_CONTROL_NOP 0x0 -#define IOBTHID_CONTROL_HARD_RESET 0x1 -#define IOBTHID_CONTROL_SOFT_RESET 0x2 -#define IOBTHID_CONTROL_SUSPEND 0x3 -#define IOBTHID_CONTROL_EXIT_SUSPEND 0x4 -#define IOBTHID_CONTROL_VC_UNPLUG 0x5 - -// Protocol Types -//--------------- -#define IOBTHID_BOOT_PROTOCOL 0x0 -#define IOBTHID_REPORT_PROTOCOL 0x1 - -// Report Types -//------------- -#define IOBTHID_RESERVED_REPORT 0x0 -#define IOBTHID_OTHER_REPORT 0x0 -#define IOBTHID_INPUT_REPORT 0x1 -#define IOBTHID_OUTPUT_REPORT 0x2 -#define IOBTHID_FEATURE_REPORT 0x3 - -#endif // IOBLUETOOTHHIDDRIVERTYPES_H diff --git a/i386/include/IOKit/bluetooth/IOBluetoothInternal.h b/i386/include/IOKit/bluetooth/IOBluetoothInternal.h deleted file mode 100644 index ed40a76..0000000 --- a/i386/include/IOKit/bluetooth/IOBluetoothInternal.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - File: BluetoothInternal.h - Contains: Internal types and macros needed by public kernel APIs. - Copyright: 2003-2007 by Apple, Inc. All rights reserved. -*/ - -#pragma once - -typedef enum IOBluetoothHCIControllerConfigState -{ - kIOBluetoothHCIControllerConfigStateOnline = 0, // Controller is configured and ready for clients - kIOBluetoothHCIControllerConfigStateKernelSetupPending = 1, // New controller - kernel setup in progress - kIOBluetoothHCIControllerConfigStateDaemonSetupPending = 2, // New controller - daemon setup in progress - kIOBluetoothHCIControllerConfigStateDaemonSetupComplete = 3, // New controller - daemon setup complete - kIOBluetoothHCIControllerConfigStateResetPending = 4, // HCI reset has been issued - kIOBluetoothHCIControllerConfigStateKernelPostResetSetupPending = 5, // HCI reset complete - kernel setup in progress - kIOBluetoothHCIControllerConfigStateDaemonPostResetSetupPending = 6, // HCI reset complete - daemon setup in progress - kIOBluetoothHCIControllerConfigStateDaemonPostResetSetupComplete = 7, // HCI reset complete - daemon setup complete - kIOBluetoothHCIControllerConfigStateUninitialized = 8 -} IOBluetoothHCIControllerConfigState; - -typedef UInt32 IOBluetoothHCIControllerPowerOptions; -enum -{ - kIOBluetoothHCIControllerPowerOptionPowerOffSupported = 0x00000001, - kIOBluetoothHCIControllerPowerOptionWakeFromExistingConnectionSupported = 0x00000002, - kIOBluetoothHCIControllerPowerOptionWakeFromNewConnectionSupported = 0x00000004, - kIOBluetoothHCIControllerPowerOptionIdleWithConnectionSupported = 0x00000008, - kIOBluetoothHCIControllerPowerOptionIdleWhenInternalPower = 0x00000010 -}; - -enum IOBluetoothHCIControllerSleepOptions -{ - kIOBluetoothHCIControllerAllowWakeFromExistingConnection = 0x00000001, - kIOBluetoothHCIControllerAllowWakeFromNewConnection = 0x00000002, - kIOBluetoothHCIControllerTemporaryOnFromIdle = 0x00000004 -}; - -#define HCI_CONTROLLER_POWER_OFF_SUPPORTED( _controllerPowerOptions ) ( ( _controllerPowerOptions & kIOBluetoothHCIControllerPowerOptionPowerOffSupported ) == kIOBluetoothHCIControllerPowerOptionPowerOffSupported ) -#define HCI_CONTROLLER_SLEEP_SUPPORTED( _controllerPowerOptions ) \ - ( ( _controllerPowerOptions & \ - ( kIOBluetoothHCIControllerPowerOptionWakeFromExistingConnectionSupported | \ - kIOBluetoothHCIControllerPowerOptionWakeFromNewConnectionSupported ) ) != 0 ) - -typedef enum IOBluetoothHCIControllerInternalPowerState -{ - kIOBluetoothHCIControllerInternalPowerStateOff = 0, - kIOBluetoothHCIControllerInternalPowerStateOn = 1, - kIOBluetoothHCIControllerInternalPowerStateSleep = 2, - kIOBluetoothHCIControllerInternalPowerStateIdle = 3 -} IOBluetoothHCIControllerInternalPowerState; - -enum IOBluetoothHCIControllerPowerStateOrdinal -{ - kIOBluetoothHCIControllerPowerStateOrdinalOff = 0, - kIOBluetoothHCIControllerPowerStateOrdinalIdle = 1, - kIOBluetoothHCIControllerPowerStateOrdinalOn = 2 -}; - -typedef UInt32 IOBluetoothHCIControllerFeatureFlags; - -enum -{ - kIOBluetoothHCIControllerFeatureFlagVendorCommandFlowControl = 0x00000001, - kIOBluetoothHCIControllerFeatureFlagSCOSupported = 0x00000002, - kIOBluetoothHCIControllerFeatureFlagSerializeCommands = 0x10000000 -}; - -//=========================================================================================================================== -// Private_UnifiedInquiryResult -//=========================================================================================================================== - -typedef struct IOBluetoothHCIUnifiedInquiryResult IOBluetoothHCIUnifiedInquiryResult; -struct IOBluetoothHCIUnifiedInquiryResult -{ - BluetoothHCIInquiryResult originalInquiryResult; - - // event code will be either: - // kBluetoothHCIEventInquiryResult, kBluetoothHCIEventInquiryResultWithRSSI, or kBluetoothHCIEventExtendedInquiryResult - - BluetoothHCIEventCode eventCode; - - // kBluetoothHCIEventExtendedInquiryResult only - - BluetoothHCIExtendedInquiryResponse extendedInquiryResponse; - - // kBluetoothHCIEventExtendedInquiryResult or kBluetoothHCIEventInquiryResultWithRSSI only - - UInt8 reserved; - BluetoothHCIRSSIValue RSSIValue; -}; - -#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0 - -enum BluetoothHCIExtendedInquiryResponseDataTypesAppleSpecificInfo -{ - kBluetoothHCIExtendedInquiryResponseDataTypeAppleSpecificInfoReserved = 0x00, - kBluetoothHCIExtendedInquiryResponseDataTypeAppleSpecificInfoModelIdentifier = 0x01, /* UTF8String char data */ - kBluetoothHCIExtendedInquiryResponseDataTypeAppleSpecificInfoThirdPartyAdvertising = 0x02, -}; - -#endif /* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0 */ - diff --git a/i386/include/IOKit/bluetooth/IOBluetoothTypes.h b/i386/include/IOKit/bluetooth/IOBluetoothTypes.h deleted file mode 100644 index 07ee4c2..0000000 --- a/i386/include/IOKit/bluetooth/IOBluetoothTypes.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - File: IOBluetoothTypes.h - Contains: Family provided types and defines - shared between user and kernel code. - Copyright: © 2002-2007 by Apple Inc. All rights reserved. -*/ - -#pragma once - -#include <IOKit/IOReturn.h> - -// Error returns -#ifndef sub_iokit_bluetooth -#define sub_iokit_bluetooth err_sub(8) -#endif - -#define iokit_bluetooth_err(return) (sys_iokit|sub_iokit_bluetooth|return) - -#define kIOBluetoothDeviceResetError iokit_bluetooth_err(1) // Device reset interrupted pending operation -#define kIOBluetoothConnectionAlreadyExists iokit_bluetooth_err(2) // Attempting to open a connection that already exists -#define kIOBluetoothNoHCIController iokit_bluetooth_err(3) // No HCI controller is present -#define kIOBluetoothHCIPowerStatesNotSupported iokit_bluetooth_err(4) // HCI controller does not support changing power states - - diff --git a/i386/include/IOKit/firewire/IOConfigDirectory.h b/i386/include/IOKit/firewire/IOConfigDirectory.h deleted file mode 100644 index d72ed21..0000000 --- a/i386/include/IOKit/firewire/IOConfigDirectory.h +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __IOCONFIGDIRECTORY_H__ -#define __IOCONFIGDIRECTORY_H__ - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOReturn.h> - -#include <IOKit/firewire/IOFireWireFamilyCommon.h> - -class OSData; -class OSString; -class OSIterator; -class IOFireWireDevice; - -/*! @class IOConfigDirectory -*/ -class IOConfigDirectory : public OSObject -{ - OSDeclareAbstractStructors(IOConfigDirectory); - -protected: - int fStart; // Offset into ROM of start of this dir - int fType; // Directory type - int fNumEntries; // In directory - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - virtual bool initWithOffset(int start, int type); - - virtual const UInt32 *getBase() = 0; - virtual IOReturn createIterator(UInt32 testVal, UInt32 testMask, - OSIterator *&iterator); - virtual IOConfigDirectory *getSubDir(int start, int type) = 0; - -public: - /*! - @function update - makes sure that the ROM has at least the specified capacity, - and that the ROM is uptodate from its start to at least the - specified quadlet offset. - @result kIOReturnSuccess if the specified offset is now - accessable at romBase[offset]. - */ - virtual IOReturn update(UInt32 offset, const UInt32 *&romBase) = 0; - - /*! - @function getKeyType - Gets the data type for the specified key - @param type on return, set to the data type - @result kIOReturnSuccess if the key exists in the dictionary - */ - virtual IOReturn getKeyType(int key, IOConfigKeyType &type); - /*! - @function getKeyValue - Gets the value for the specified key, in a variety of forms. - @param value on return, set to the data type - @param text if non-zero, on return points to the - string description of the field, or NULL if no text found. - @result kIOReturnSuccess if the key exists in the dictionary - and is of a type appropriate for the value parameter - @param value reference to variable to store the entry's value - */ - virtual IOReturn getKeyValue(int key, UInt32 &value, OSString** text = NULL); - virtual IOReturn getKeyValue(int key, OSData *&value, - OSString** text = NULL); - virtual IOReturn getKeyValue(int key, IOConfigDirectory *&value, - OSString** text = NULL); - virtual IOReturn getKeyOffset(int key, FWAddress &value, - OSString** text = NULL); - - - /*! - @function getIndexType - Gets the data type for entry at the specified index - @param type on return, set to the data type - @result kIOReturnSuccess if the index exists in the dictionary - */ - virtual IOReturn getIndexType(int index, IOConfigKeyType &type); - /*! - @function getIndexKey - Gets the key for entry at the specified index - @param key on return, set to the key - @result kIOReturnSuccess if the index exists in the dictionary - */ - virtual IOReturn getIndexKey(int index, int &key); - - /*! - @function getIndexValue - Gets the value at the specified index of the directory, - in a variety of forms. - @param type on return, set to the data type - @result kIOReturnSuccess if the index exists in the dictionary - and is of a type appropriate for the value parameter - @param value reference to variable to store the entry's value - */ - virtual IOReturn getIndexValue(int index, UInt32 &value); - virtual IOReturn getIndexValue(int index, OSData *&value); - virtual IOReturn getIndexValue(int index, OSString *&value); - virtual IOReturn getIndexValue(int index, IOConfigDirectory *&value); - virtual IOReturn getIndexOffset(int index, FWAddress &value); - virtual IOReturn getIndexOffset(int index, UInt32 &value); - - /*! - @function getIndexEntry - Gets the entry at the specified index of the directory, - as a raw UInt32. - @param entry on return, set to the entry value - @result kIOReturnSuccess if the index exists in the dictionary - @param value reference to variable to store the entry's value - */ - virtual IOReturn getIndexEntry(int index, UInt32 &value); - - /*! - @function getSubdirectories - Creates an iterator over the subdirectories of the directory. - @param iterator on return, set to point to an OSIterator - @result kIOReturnSuccess if the iterator could be created - */ - virtual IOReturn getSubdirectories(OSIterator *&iterator); - - /*! - @function getKeySubdirectories - Creates an iterator over subdirectories of a given type of the directory. - @param key type of subdirectory to iterate over - @param iterator on return, set to point to an OSIterator - @result kIOReturnSuccess if the iterator could be created - */ - virtual IOReturn getKeySubdirectories(int key, OSIterator *&iterator); - - int getType() const; - - int getNumEntries() const; - -protected: - - virtual const UInt32 * lockData( void ) = 0; - virtual void unlockData( void ) = 0; - virtual IOReturn updateROMCache( UInt32 offset, UInt32 length ) = 0; - virtual IOReturn checkROMState( void ) = 0; - -private: - OSMetaClassDeclareReservedUnused(IOConfigDirectory, 0); - OSMetaClassDeclareReservedUnused(IOConfigDirectory, 1); - OSMetaClassDeclareReservedUnused(IOConfigDirectory, 2); - OSMetaClassDeclareReservedUnused(IOConfigDirectory, 3); - OSMetaClassDeclareReservedUnused(IOConfigDirectory, 4); - OSMetaClassDeclareReservedUnused(IOConfigDirectory, 5); - OSMetaClassDeclareReservedUnused(IOConfigDirectory, 6); - OSMetaClassDeclareReservedUnused(IOConfigDirectory, 7); - OSMetaClassDeclareReservedUnused(IOConfigDirectory, 8); - -}; - -#endif /* __IOCONFIGDIRECTORY_H__ */ diff --git a/i386/include/IOKit/firewire/IOFWAddressSpace.h b/i386/include/IOKit/firewire/IOFWAddressSpace.h deleted file mode 100644 index 7ad6764..0000000 --- a/i386/include/IOKit/firewire/IOFWAddressSpace.h +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/* - * - * IOFWAddressSpace.h - * - * Classes which describe addresses in the local node which are accessable to other nodes - * via firewire asynchronous read/write/lock requests. - */ - -#ifndef _IOKIT_IOFWADDRESSSPACE_H -#define _IOKIT_IOFWADDRESSSPACE_H - -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/firewire/IOFireWireFamilyCommon.h> - -class IOFireWireDevice; -class IOFireWireBus; -class IOFireWireController; - -typedef void * IOFWRequestRefCon; - -/*! @function FWWriteCallback - @abstract Callback called when a write request packet is received for - a 'virtual' firewire address. - @param device is the node originating the request - @param speed is the FireWire speed of the request, update it if you need to control - the speed of the reply, otherwise the response will be the same speed. - @param addr is the address the device is requesting to write to - @param len is the number of bytes to write - @param buf contains the packet data - @param requestRefcon refcon Can be queried for extra info about the request, - using IOFireWireController::isLockRequest(), isQuadRequest() - @result return: - kFWResponseComplete = 0, OK - kFWResponseConflictError = 4, Resource conflict, may retry - kFWResponseDataError = 5, Data not available - kFWResponseTypeError = 6, Operation not supported - kFWResponseAddressError = 7 Address not valid in target device */ -typedef UInt32 (*FWWriteCallback)(void *refcon, UInt16 nodeID, IOFWSpeed &speed, - FWAddress addr, UInt32 len, const void *buf, IOFWRequestRefCon requestRefcon); - -/*! @function FWReadCallback - @abstract Callback called when a read request packet is received for - a 'virtual' firewire address. - @param nodeID is the node originating the request - @param speed is the FireWire speed of the request, update it if you need to control - the speed of the reply, otherwise the response will be the same speed. - @param addr is the address the device is requesting to read from - @param len is the number of bytes to read - @param buf contains the packet data - @param offset on return points to the offset into *buf of the packet data - @param requestRefcon refcon to pass back if sending a delayed response. Also can be queried - for extra info about the request - @result return: - kFWResponsePending = -1, Pseudo response, real response sent later. - kFWResponseComplete = 0, OK! - kFWResponseConflictError = 4, Resource conflict, may retry - kFWResponseDataError = 5, Data not available - kFWResponseTypeError = 6, Operation not supported - kFWResponseAddressError = 7 Address not valid in target device - - A return of kFWResponsePending should be followed at some later time by a call to - IOFireWireController::asyncReadResponse */ -typedef UInt32 (*FWReadCallback)(void *refcon, UInt16 nodeID, IOFWSpeed &speed, - FWAddress addr, UInt32 len, IOMemoryDescriptor **buf, - IOByteCount * offset, IOFWRequestRefCon requestRefcon); - -class IOFWAddressSpace; - -#pragma mark - - -/*! @class IOFWAddressSpaceAux - @discussion An IOFWAddressSpaceAux is for internal use only. You should never subclass IOFWAddressSpaceAux -*/ - -class IOFWAddressSpaceAux : public OSObject -{ - OSDeclareDefaultStructors(IOFWAddressSpaceAux) - - friend class IOFWAddressSpace; - -protected: - - IOFWAddressSpace * fPrimary; - IOFireWireController * fControl; - - OSSet * fTrustedNodeSet; - OSIterator * fTrustedNodeSetIterator; - - bool fExclusive; - - /*! - @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - - struct ExpansionData { }; - - /*! - @var reserved - Reserved for future use. (Internal use only) - */ - - ExpansionData * reserved; - - virtual bool init( IOFWAddressSpace * primary ); - virtual void free(); - - virtual bool isTrustedNode( UInt16 nodeID ); - virtual void addTrustedNode( IOFireWireDevice * device ); - virtual void removeTrustedNode( IOFireWireDevice * device ); - virtual void removeAllTrustedNodes( void ); - - bool isExclusive( void ); - void setExclusive( bool exclusive ); - - virtual bool intersects( IOFWAddressSpace * space ); - -private: - OSMetaClassDeclareReservedUsed(IOFWAddressSpaceAux, 0); - OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 1); - OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 2); - OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 3); - OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 4); - OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 5); - OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 6); - OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 7); - OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 8); - OSMetaClassDeclareReservedUnused(IOFWAddressSpaceAux, 9); - -}; - -#pragma mark - - -/* - * Base class for FireWire address space objects - */ - -/*! - @class IOFWAddressSpace -*/ - -class IOFWAddressSpace : public OSObject -{ - OSDeclareAbstractStructors(IOFWAddressSpace) - - friend class IOFWAddressSpaceAux; - -protected: - - IOFireWireController *fControl; - - /*! - @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - - struct ExpansionData - { - IOFWAddressSpaceAux * fAuxiliary; - }; - - /*! - @var reserved - Reserved for future use. (Internal use only) - */ - - ExpansionData * fIOFWAddressSpaceExpansion; - - virtual bool init(IOFireWireBus *bus); - virtual void free(); - -public: - - /*! @function doRead - @abstract An abstract method for processing an address space read request - @param nodeID FireWire Read from nodeID. - @param speed at this 'speed'. - @param addr with FireWire address 'addr'. - @param len read 'len' bytes from nodeID. - @param buf points to a memory descriptor containing the packet data. - @param offset start from this 'offset' in 'buf'. - @param refcon Can be queried for extra info about the request. - @result UIn32 returns kFWResponseComplete on success */ - virtual UInt32 doRead(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, - IOMemoryDescriptor **buf, IOByteCount * offset, - IOFWRequestRefCon refcon) = 0; - - /*! @function doWrite - @abstract An abstract method for processing an address space write request - @param nodeID FireWire Write to nodeID. - @param speed at this 'speed'. - @param addr with FireWire address 'addr'. - @param len write 'len' bytes to nodeID. - @param buf obtain bytes from location given by 'buf'. - @param refcon Can be queried for extra info about the request. - @result UIn32 returns kFWResponseComplete on success */ - virtual UInt32 doWrite(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, - const void *buf, IOFWRequestRefCon refcon) = 0; - - /*! @function doLock - @abstract A method for processing a lock request. - @param nodeID FireWire Lock request for nodeID. - @param speed at this 'speed'. - @param addr with FireWire address 'addr'. - @param inlen 'inlen' bytes to use. - @param newVal new value to write at 'addr' location . - @param outLen 'outLen' bytes for result. - @param oldVal old value read from 'addr' location. - @param extType Type like kFWExtendedTCodeCompareSwap. - @param refcon Can be queried for extra info about the request. - @result UIn32 returns kFWResponseComplete on success */ - virtual UInt32 doLock(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 inlen, - const UInt32 *newVal, UInt32 &outLen, UInt32 *oldVal, - UInt32 extType, IOFWRequestRefCon refcon); - - /*! @function activate - @abstract Address space is ready for handling requests. - @result IOReturn - */ - virtual IOReturn activate(); - - /*! @function deactivate - @abstract Address space request handler is disabled. - @result none - */ - virtual void deactivate(); - - /*! @function contains - @abstract returns number of bytes starting at addr in this space - @result 0 if it doesn't contain the address - */ - virtual UInt32 contains(FWAddress addr); - - /*! @function isTrustedNode - @abstract returns true if the node is added as a trusted node - @param nodeID is the nodeID to verify whether its trusted. - @result false if nodeID is not trusted - */ - inline bool isTrustedNode( UInt16 nodeID ) - { return fIOFWAddressSpaceExpansion->fAuxiliary->isTrustedNode( nodeID ); } - - /*! @function addTrustedNode - @abstract Add a trusted node. - @param device object pointing to a FireWire node on the bus. - @result none - */ - inline void addTrustedNode( IOFireWireDevice * device ) - { fIOFWAddressSpaceExpansion->fAuxiliary->addTrustedNode( device ); } - - /*! @function removeTrustedNode - @abstract Remove a trusted node. - @param device object pointing to a FireWire node on the bus. - @result none - */ - inline void removeTrustedNode( IOFireWireDevice * device ) - { fIOFWAddressSpaceExpansion->fAuxiliary->removeTrustedNode( device ); } - - /*! @function removeAllTrustedNodes - @abstract Remove all trusted nodes. - @result none - */ - inline void removeAllTrustedNodes( void ) - { fIOFWAddressSpaceExpansion->fAuxiliary->removeAllTrustedNodes(); } - - /*! @function isExclusive - @abstract Checks if an address space wants exclusive control of its address range - @result True if the address space is marked exclusive false otherwise - */ - - inline bool isExclusive( void ) - { return fIOFWAddressSpaceExpansion->fAuxiliary->isExclusive(); } - - /*! @function setExclusive - @abstract Sets if this address space requires exclusive control of its address range. Exclusivity should be set before an address space is activated. - @param exclusive True if address space should be exclusive, false otherwise - @result none - */ - - inline void setExclusive( bool exclusive ) - { fIOFWAddressSpaceExpansion->fAuxiliary->setExclusive( exclusive ); } - - /*! @function intersects - @abstract Checks this address space intersects with the given address range. Currently only supports IOFWPsuedoAddressSpaces. - @param space An address space to compare against - @result True if the address spaces intersect false otherwise - */ - - inline bool intersects( IOFWAddressSpace * space ) - { return fIOFWAddressSpaceExpansion->fAuxiliary->intersects( space ); } - - -protected: - - virtual IOFWAddressSpaceAux * createAuxiliary( void ); - -private: - OSMetaClassDeclareReservedUsed(IOFWAddressSpace, 0); - OSMetaClassDeclareReservedUsed(IOFWAddressSpace, 1); - -}; - -// the physical and psuedo address space classes used to be defined here -// for backwards compatibility, we pull them in now. the ifdefs surrounding -// the content of the header files ensures we do not multiply include a header. - -#include <IOKit/firewire/IOFWPseudoAddressSpace.h> -#include <IOKit/firewire/IOFWPhysicalAddressSpace.h> - -#endif /* _IOKIT_IOFWADDRESSSPACE */ diff --git a/i386/include/IOKit/firewire/IOFWAsyncStreamListener.h b/i386/include/IOKit/firewire/IOFWAsyncStreamListener.h deleted file mode 100644 index cef64f8..0000000 --- a/i386/include/IOKit/firewire/IOFWAsyncStreamListener.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 1998-2001 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _IOKIT_IOFWASYNCSTREAMLISTENER_H -#define _IOKIT_IOFWASYNCSTREAMLISTENER_H - -#include <IOKit/firewire/IOFireWireLink.h> -#include <IOKit/firewire/IOFWCommand.h> -#include <IOKit/IOBufferMemoryDescriptor.h> -#include <IOKit/firewire/IOFWDCLProgram.h> - -class IOFWAsyncStreamReceiver; -class IOFWAsyncStreamReceivePort; - -/*! @class IOFWAsyncStreamListener -*/ -class IOFWAsyncStreamListener : public OSObject -{ - OSDeclareDefaultStructors(IOFWAsyncStreamListener) - -friend class IOFWAsyncStreamReceiver; -friend class IOFireWireController; - -public: - -/*! @function initAll - @abstract Creates an AsyncStream client for an Isoch channel. - @param control Points to IOFireWireController. - @param channel Isoch channel for listening. - @param proc Callback on packet reception. - @param obj Client's callback object. - @result returns true on success, else false. */ - bool initAll( IOFireWireController *control, UInt32 channel, FWAsyncStreamReceiveCallback proc, void *refcon ); - -/*! @function setListenerHandler - @abstract Set the callback that should be called to handle incoming async stream packets - @param inReceiver The callback to set. - @result Returns the callback that was previously set or nil for none.*/ - const FWAsyncStreamReceiveCallback setListenerHandler( FWAsyncStreamReceiveCallback inReceiver ); - -/*! @function TurnOffNotification - @abstract Turns off client callback notification. - @result none. */ - inline void TurnOffNotification() { fNotify = false; }; - -/*! @function TurnOnNotification - @abstract Turns on client callback notification. - @result none. */ - inline void TurnOnNotification() { fNotify = true; }; - -/*! @function IsNotificationOn - @abstract checks the notification state. - @result true if ON, else false */ - inline bool IsNotificationOn() { return fNotify; }; - -/*! @function setFlags - @abstract set flags for the listener. - @param flags indicate performance metrics. - @result none. */ - void setFlags( UInt32 flags ); - -/*! @function getFlags - @abstract get the flags of listener. - @param none. - @result flags. */ - UInt32 getFlags(); - -/*! @function getRefCon - @abstract get the refcon specific to this listener. - @param none. - @result fRefCon refcon passed during initialization. */ - inline void* getRefCon() { return fRefCon; }; - -/*! @function getOverrunCounter - @abstract get overrun counter from the DCL program. - @param none. - @result returns the counter value. */ - UInt32 getOverrunCounter(); - -protected: - - FWAsyncStreamReceiveCallback fClientProc; - void *fRefCon; - IOFWAsyncStreamReceiver *fReceiver; - bool fNotify; - UInt32 fFlags; - IOFireWireController *fControl; - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - virtual void free(); - -private: -/*! function getReceiver - abstract Returns the Async Stream receiver object which tracks multiple - IOFWAsyncStreamListeners for the same Isoc channel. */ - inline IOFWAsyncStreamReceiver *getReceiver() { return fReceiver; }; - -/*! function invokeClients - abstract Invokes client's callback function with fRefCon. */ - void invokeClients( UInt8 *buffer ); - - OSMetaClassDeclareReservedUnused(IOFWAsyncStreamListener, 0); - OSMetaClassDeclareReservedUnused(IOFWAsyncStreamListener, 1); -}; -#endif // _IOKIT_IOFWASYNCSTREAMLISTENER_H - diff --git a/i386/include/IOKit/firewire/IOFWCommand.h b/i386/include/IOKit/firewire/IOFWCommand.h deleted file mode 100644 index fdf85b5..0000000 --- a/i386/include/IOKit/firewire/IOFWCommand.h +++ /dev/null @@ -1,977 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * - * IOFWCommand.h - * - */ -#ifndef _IOKIT_IOFWCOMMAND_H -#define _IOKIT_IOFWCOMMAND_H - -#include <IOKit/IOCommand.h> -#include <IOKit/IOLib.h> - -#include <IOKit/firewire/IOFireWireFamilyCommon.h> - -#include <IOKit/firewire/IOFWSyncer.h> - -#define kFWCmdDefaultRetries 3 -#define kFWCmdZeroRetries 0 -#define kFWCmdReducedRetries 2 -#define kFWCmdIncreasedRetries 6 - -class IOMemoryDescriptor; -class IOSyncer; -class IOFireWireBus; -class IOFireWireController; -class IOFireWireNub; -class IOFWAddressSpace; // Description of chunk of local FW address space -class IOFWCommand; -class IOFWBusCommand; -class IOFWAsyncStreamCommand; -class IOCommandGate; -class IOFWAsyncPHYCommand; - -struct AsyncPendingTrans; - -// Struct for head of command queue -/*! - @struct IOFWCmdQ - @abstract Structure for head of a queue of IOFWCommands - @field fHead Points to the head of the queue, or NULL if queue is empty - @field fTail Points to the tail of the queue, or NULL if queue is empty - @function headChanged called when head command is changed, or the command - itself changes state. -*/ - -struct IOFWCmdQ -{ - IOFWCommand *fHead; - IOFWCommand *fTail; - bool executeQueue(bool all); - virtual void headChanged(IOFWCommand *oldHead); - - virtual ~IOFWCmdQ() {} - - void checkProgress( void ); -}; - -// Callback when device command completes asynchronously -typedef void (*FWDeviceCallback)(void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd); - -// Callback when bus command completes asynchronously -typedef void (*FWBusCallback)(void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd); - -// Callback when async stream command completes asynchronously -typedef void (*FWAsyncStreamCallback)(void *refcon, IOReturn status, IOFireWireBus *bus, IOFWAsyncStreamCommand *fwCmd); - -// Callback when async stream command completes asynchronously -typedef void (*FWAsyncPHYCallback)(void *refcon, IOReturn status, IOFireWireBus *bus, IOFWAsyncPHYCommand *fwCmd ); - -// Callback when async stream packet is received -typedef void (*FWAsyncStreamReceiveCallback)(void *refcon, const void *buf); - -#pragma mark - - -/* - * Base class for FireWire commands - */ -/*! @class IOFWCommand -*/ -class IOFWCommand : public IOCommand -{ - OSDeclareAbstractStructors(IOFWCommand) - -protected: - IOReturn fStatus; - IOFireWireController *fControl; - IOFWCommand * fQueuePrev; - IOFWCommand * fQueueNext; - IOFWCmdQ * fQueue; - UInt32 fTimeout; // How long (in microsecs) after execute() to timeout - AbsoluteTime fDeadline; // Time after which this command has timed out. - IOFWSyncer * fSyncWakeup; - UInt8 fSync; - UInt8 fCancelOnReset; - UInt8 spare[2]; - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct MemberVariables - { - void * fFWIMRefCon; - IOReturn fCompletionStatus; - bool fSubmitTimeLatched; - AbsoluteTime fSubmitTime; - bool fFlush; - }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - MemberVariables * fMembers; - - virtual IOReturn complete(IOReturn status); - virtual void updateTimer(); - virtual IOReturn startExecution(); - - /* - * Execute the FWCommand immediately - * must be called with the workloop gate closed - */ - virtual IOReturn execute() = 0; - -public: - - virtual bool initWithController(IOFireWireController *control); - virtual void free( void ); - - IOReturn getStatus() const { return fStatus; }; - - /* - * Submit the FWCommand. - * if queue is false the command's execute() - * method will be called on the caller's thread, otherwise - * the command wil be queued for execution on the work loop thread. - */ - virtual IOReturn submit(bool queue = false); - - /* - * Cancel command, causes it to complete with given status - */ - virtual IOReturn cancel(IOReturn reason); - - /*! - @function setHead - inserts a command at the head of a queue. - @param queue queue command is being added to - */ - virtual void setHead(IOFWCmdQ &queue); - /*! - @function insertAfter - inserts a command after the specified one. - @param prev command to insert after - @param queue queue command is being added to - */ - virtual void insertAfter(IOFWCommand &prev); - - /*! - @function removeFromQ - Removes command from current queue. - */ - virtual void removeFromQ(); - - IOFWCommand *getPrevious() const - { return fQueuePrev; }; - IOFWCommand *getNext() const - { return fQueueNext; }; - const AbsoluteTime &getDeadline() const - { return fDeadline; }; - - bool cancelOnReset() const - { return fCancelOnReset; }; - - bool Busy() const - { return fStatus == kIOReturnBusy || fStatus == kIOFireWirePending;}; - - void setTimeout( UInt32 timeout ) - { fTimeout = timeout; }; - - friend class IOFWCmdQ; - - void * getFWIMRefCon( void ) - { - return fMembers->fFWIMRefCon; - } - - void setFWIMRefCon( void * refcon ) - { - fMembers->fFWIMRefCon = refcon; - } - - void setFlush( bool flush ) - { - fMembers->fFlush = flush; - } - - virtual IOReturn checkProgress( void ); - -private: - OSMetaClassDeclareReservedUsed(IOFWCommand, 0); - OSMetaClassDeclareReservedUnused(IOFWCommand, 1); - -}; - -#pragma mark - - -/* - * Bus control commands - */ -/*! @class IOFWBusCommand -*/ -class IOFWBusCommand : public IOFWCommand -{ - OSDeclareAbstractStructors(IOFWBusCommand) - -protected: - FWBusCallback fComplete; - void * fRefCon; - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - virtual IOReturn complete(IOReturn status); - - virtual bool initWithController(IOFireWireController *control, - FWBusCallback completion=NULL, void *refcon=NULL); - virtual IOReturn reinit(FWBusCallback completion, void *refcon); - -private: - OSMetaClassDeclareReservedUnused(IOFWBusCommand, 0); - -}; - -#pragma mark - - -/* - * Command to execute some code after a specified delay (in microseconds) - * All it does is timeout after the specified delay, hence calling the completion - * callback. - */ -/*! @class IOFWDelayCommand -*/ -class IOFWDelayCommand : public IOFWBusCommand -{ - OSDeclareDefaultStructors(IOFWDelayCommand) - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - -protected: - virtual IOReturn execute(); - -public: - virtual bool initWithDelay(IOFireWireController *control, UInt32 uSecs, - FWBusCallback completion, void *refcon); - virtual IOReturn reinit(UInt32 uSecs, FWBusCallback completion, void *refcon); - -private: - OSMetaClassDeclareReservedUnused(IOFWDelayCommand, 0); - -}; - -/* - * Send an async request to a device - */ -class IOFWUserReadQuadletCommand ; -class IOFWUserWriteCommand ; - -#pragma mark - - -/*! @class IOFWAsyncCommand -*/ -class IOFWAsyncCommand : public IOFWCommand -{ - OSDeclareAbstractStructors(IOFWAsyncCommand) - -protected: - IOFireWireNub * fDevice; - FWDeviceCallback fComplete; - void * fRefCon; - IOMemoryDescriptor *fMemDesc; - AsyncPendingTrans * fTrans; - UInt32 fAddressHi; - UInt32 fAddressLo; - IOByteCount fBytesTransferred; - int fSize; - int fSpeed; - int fMaxPack; - int fCurRetries; - int fMaxRetries; - UInt32 fGeneration; // bus topology fNodeID is valid for. - UInt16 fNodeID; - bool fFailOnReset; - bool fWrite; - - typedef struct - { - // some of our subclasses didn't have room for expansion data, so - // we've reserved space for their use here. - - void * fSubclassMembers; - int fMaxSpeed; - int fAckCode; - UInt32 fResponseCode; - UInt32 fFastRetryCount; - int fResponseSpeed; - bool fForceBlockRequests; - } - MemberVariables; - - MemberVariables * fMembers; - - virtual IOReturn complete(IOReturn status); - virtual bool initWithController(IOFireWireController *control); - virtual bool initAll(IOFireWireNub *device, FWAddress devAddress, - IOMemoryDescriptor *hostMem, - FWDeviceCallback completion, void *refcon, bool failOnReset); - virtual bool initAll(IOFireWireController *control, - UInt32 generation, FWAddress devAddress, - IOMemoryDescriptor *hostMem, - FWDeviceCallback completion, void *refcon); - virtual void free( void ); - virtual IOReturn reinit(FWAddress devAddress, IOMemoryDescriptor *hostMem, - FWDeviceCallback completion, void *refcon, bool failOnReset); - virtual IOReturn reinit(UInt32 generation, FWAddress devAddress, IOMemoryDescriptor *hostMem, - FWDeviceCallback completion, void *refcon); - bool createMemberVariables( void ); - void destroyMemberVariables( void ); -public: - // Utility for setting generation on newly created command - virtual void setGeneration(UInt32 generation) - { fGeneration = generation; } - - // To be called by IOFireWireController and derived classes. - virtual void gotPacket(int rcode, const void* data, int size) = 0; - virtual void gotAck(int ackCode); - - // update nodeID/generation after bus reset, from the device object - IOReturn updateGeneration(); - // explicitly update nodeID/generation after bus reset - IOReturn updateNodeID(UInt32 generation, UInt16 nodeID); - - // Generally useful stuff - IOByteCount getBytesTransferred() const - { return fBytesTransferred; }; - - FWAddress getAddress() const - { return FWAddress(fAddressHi, fAddressLo, fNodeID); } - - bool failOnReset() const - { return fFailOnReset; } - - IOFireWireNub * getDevice() const - { return fDevice; } - - /*! - @function setMaxPacket - Sets the maximum size for block transfers used by the command. - The command is initialized to use the maximum packet size calculated from the device's - PHY speed, bus info block and the bus topology. - Call this method before calling submit(). - @param maxBytes Maximum packet size in bytes. If the maxsize is 4 then quadlet transfers will be used. - */ - IOReturn setMaxPacket(UInt32 maxBytes) - { - if(fStatus == kIOReturnBusy || fStatus == kIOFireWirePending) - return fStatus; - fMaxPack = maxBytes; - return kIOReturnSuccess; - } - - void setMaxSpeed( int speed ); - - void setAckCode( int ack ); - int getAckCode( void ); - - void setRetries( int retries); - int getMaxRetries( void ); - - void setResponseCode( UInt32 rcode ); - UInt32 getResponseCode( void ) const; - - void setFastRetryCount( UInt32 count ) - { fMembers->fFastRetryCount = count; }; - - UInt32 getFastRetryCount( void ) - { return fMembers->fFastRetryCount; }; - - void setResponseSpeed( int speed ) - { fMembers->fResponseSpeed = speed; }; - - int getResponseSpeed( void ) - { return fMembers->fResponseSpeed; }; - - // forces even 4 byte transactions to be block requests - void setForceBlockRequests( bool enabled ) - { fMembers->fForceBlockRequests = enabled; } - - virtual IOReturn checkProgress( void ); - -private: - OSMetaClassDeclareReservedUnused(IOFWAsyncCommand, 0); - OSMetaClassDeclareReservedUnused(IOFWAsyncCommand, 1); - OSMetaClassDeclareReservedUnused(IOFWAsyncCommand, 2); - OSMetaClassDeclareReservedUnused(IOFWAsyncCommand, 3); - -}; - -#pragma mark - - -/* - * Concrete async requests - read, write and hordes of read/modify/write - */ -class IOFWReadCommand : public IOFWAsyncCommand -{ - OSDeclareDefaultStructors(IOFWReadCommand) - -protected: - - virtual void gotPacket(int rcode, const void* data, int size); - - virtual IOReturn execute(); - -public: - virtual bool initAll(IOFireWireNub *device, FWAddress devAddress, - IOMemoryDescriptor *hostMem, - FWDeviceCallback completion, void *refcon, bool failOnReset); - virtual bool initAll(IOFireWireController *control, - UInt32 generation, FWAddress devAddress, - IOMemoryDescriptor *hostMem, - FWDeviceCallback completion, void *refcon); - virtual IOReturn reinit(FWAddress devAddress, IOMemoryDescriptor *hostMem, - FWDeviceCallback completion=NULL, void *refcon=NULL, - bool failOnReset=false); - virtual IOReturn reinit(UInt32 generation, FWAddress devAddress, IOMemoryDescriptor *hostMem, - FWDeviceCallback completion=NULL, void *refcon=NULL); - -private: - OSMetaClassDeclareReservedUnused(IOFWReadCommand, 0); - OSMetaClassDeclareReservedUnused(IOFWReadCommand, 1); -}; - -#pragma mark - - -/*! - @class IOFWReadQuadCommand - @discussion An easier to use version of IOFWReadCommand for use when the data to be transferred - is an integer number of quads. - Note that block read requests will be used for transfers greater than one quad unless setMaxPacket(4) - is called. -*/ - -class IOFWReadQuadCommand : public IOFWAsyncCommand -{ - OSDeclareDefaultStructors(IOFWReadQuadCommand) - -protected: - - UInt32 * fQuads; - - typedef struct - { - bool fPingTime; - } - MemberVariables; - - bool createMemberVariables( void ); - void destroyMemberVariables( void ); - virtual void free( void ); - - virtual void gotPacket(int rcode, const void* data, int size); - - virtual IOReturn execute(); - -public: - virtual bool initAll(IOFireWireNub *device, FWAddress devAddress, - UInt32 *quads, int numQuads, - FWDeviceCallback completion, void *refcon, bool failOnReset); - - virtual bool initAll(IOFireWireController *control, - UInt32 generation, FWAddress devAddress, - UInt32 *quads, int numQuads, - FWDeviceCallback completion, void *refcon); - - virtual IOReturn reinit(FWAddress devAddress, UInt32 *quads, int numQuads, - FWDeviceCallback completion=NULL, void *refcon=NULL, - bool failOnReset=false); - - virtual IOReturn reinit(UInt32 generation, FWAddress devAddress, UInt32 *quads, int numQuads, - FWDeviceCallback completion=NULL, void *refcon=NULL); - - void setPingTime( bool state ) - { ((MemberVariables*)fMembers->fSubclassMembers)->fPingTime = state; }; - -private: - OSMetaClassDeclareReservedUnused(IOFWReadQuadCommand, 0); - OSMetaClassDeclareReservedUnused(IOFWReadQuadCommand, 1); -}; - -#pragma mark - - -class IOFWWriteCommand : public IOFWAsyncCommand -{ - - OSDeclareDefaultStructors(IOFWWriteCommand) - -protected: - - int fPackSize; - - typedef struct - { - bool fDeferredNotify; - bool fFastRetryOnBusy; - } - MemberVariables; - - virtual IOReturn execute(); - - virtual void gotPacket( int rcode, const void* data, int size ); - - bool createMemberVariables( void ); - void destroyMemberVariables( void ); - -public: - - virtual bool initWithController(IOFireWireController *control); - virtual bool initAll( IOFireWireNub * device, - FWAddress devAddress, - IOMemoryDescriptor * hostMem, - FWDeviceCallback completion, - void * refcon, - bool failOnReset ); - - virtual bool initAll( IOFireWireController * control, - UInt32 generation, - FWAddress devAddress, - IOMemoryDescriptor * hostMem, - FWDeviceCallback completion, - void * refcon ); - virtual void free( void ); - - virtual IOReturn reinit( FWAddress devAddress, - IOMemoryDescriptor * hostMem, - FWDeviceCallback completion = NULL, - void * refcon = NULL, - bool failOnReset = false ); - - virtual IOReturn reinit( UInt32 generation, - FWAddress devAddress, - IOMemoryDescriptor * hostMem, - FWDeviceCallback completion = NULL, - void * refcon = NULL ); - - void setDeferredNotify( bool state ) - { ((MemberVariables*)fMembers->fSubclassMembers)->fDeferredNotify = state; }; - - void setFastRetryOnBusy( bool state ) - { ((MemberVariables*)fMembers->fSubclassMembers)->fFastRetryOnBusy = state; }; - -private: - - OSMetaClassDeclareReservedUnused(IOFWWriteCommand, 0); - OSMetaClassDeclareReservedUnused(IOFWWriteCommand, 1); - -}; - -#pragma mark - - -/*! - @class IOFWWriteQuadCommand - @discussion An easier to use version of IOFWWriteCommand for use when the data to be transferred - is small and an integer number of quads. - Note that block read requests will be used for transfers greater than one quad unless setMaxPacket(4) - is called. - kMaxWriteQuads is the largest legal number of quads that this object can be asked to transfer - (the data is copied into an internal buffer in init() and reinit()). -*/ - -class IOFWWriteQuadCommand : public IOFWAsyncCommand -{ - - OSDeclareDefaultStructors(IOFWWriteQuadCommand) - -public: - - enum - { - kMaxWriteQuads = 8 - }; - -protected: - - UInt32 fQuads[kMaxWriteQuads]; - UInt32 * fQPtr; - int fPackSize; - - typedef struct - { - bool fDeferredNotify; - IOMemoryDescriptor * fMemory; - } - MemberVariables; - - virtual void gotPacket( int rcode, const void* data, int size ); - - virtual IOReturn execute(); - - bool createMemberVariables( void ); - void destroyMemberVariables( void ); - -public: - virtual bool initWithController(IOFireWireController *control); - - virtual bool initAll( IOFireWireNub * device, - FWAddress devAddress, - UInt32 * quads, - int numQuads, - FWDeviceCallback completion, - void * refcon, - bool failOnReset ); - - virtual bool initAll( IOFireWireController * control, - UInt32 generation, - FWAddress devAddress, - UInt32 * quads, - int numQuads, - FWDeviceCallback completion, - void * refcon ); - - virtual void free( void ); - - virtual IOReturn reinit( FWAddress devAddress, - UInt32 * quads, - int numQuads, - FWDeviceCallback completion = NULL, - void * refcon = NULL, - bool failOnReset = false ); - - virtual IOReturn reinit( UInt32 generation, - FWAddress devAddress, - UInt32 * quads, - int numQuads, - FWDeviceCallback completion = NULL, - void * refcon = NULL ); - -protected: - - void setQuads( UInt32 * quads, int numQuads ); - bool createMemoryDescriptor( void ); - void destroyMemoryDescriptor( void ); - -public: - - void setDeferredNotify( bool state ) - { ((MemberVariables*)fMembers->fSubclassMembers)->fDeferredNotify = state; }; - -private: - - OSMetaClassDeclareReservedUnused(IOFWWriteQuadCommand, 0); - OSMetaClassDeclareReservedUnused(IOFWWriteQuadCommand, 1); - -}; - -/* - * May need more parameters for some of these, - * and/or derive from a base Lock transaction command - */ - -#pragma mark - - -/*! @class IOFWCompareAndSwapCommand -*/ -class IOFWCompareAndSwapCommand : public IOFWAsyncCommand -{ - OSDeclareDefaultStructors(IOFWCompareAndSwapCommand) - -protected: - UInt32 fInputVals[4]; - UInt32 fOldVal[2]; - - typedef struct - { - IOMemoryDescriptor * fMemory; - } - MemberVariables; - - MemberVariables * fMembers; - - virtual void gotPacket(int rcode, const void* data, int size); - - virtual IOReturn execute(); - -public: - // Compare to cmpVal, and if equal replace with newVal. - // Size = 1 for 32 bit operation (one quad), 2 for 64 bit (two quads) - virtual bool initWithController(IOFireWireController *control); - virtual bool initAll(IOFireWireNub *device, FWAddress devAddress, - const UInt32 *cmpVal, const UInt32 *newVal, int size, - FWDeviceCallback completion, void *refcon, bool failOnReset); - virtual bool initAll(IOFireWireController *control, - UInt32 generation, FWAddress devAddress, - const UInt32 *cmpVal, const UInt32 *newVal, int size, - FWDeviceCallback completion, void *refcon); - - virtual IOReturn reinit(FWAddress devAddress, const UInt32 *cmpVal, const UInt32 *newVal, int size, - FWDeviceCallback completion=NULL, void *refcon=NULL, bool failOnReset=false); - virtual IOReturn reinit(UInt32 generation, FWAddress devAddress, - const UInt32 *cmpVal, const UInt32 *newVal, int size, - FWDeviceCallback completion=NULL, void *refcon=NULL); - - // sets oldVal to the old value returned by the device, and - // returns true if it was the expected value, ie. the lock succeeded - virtual bool locked(UInt32 *oldVal); - - virtual void free( void ); - -protected: - - bool createMemberVariables( void ); - void destroyMemberVariables( void ); - - void setInputVals( const UInt32 * cmpVal, const UInt32 * newVal, int size ); - - bool createMemoryDescriptor( void ); - void destroyMemoryDescriptor( void ); - -private: - OSMetaClassDeclareReservedUnused(IOFWCompareAndSwapCommand, 0); - OSMetaClassDeclareReservedUnused(IOFWCompareAndSwapCommand, 1); - OSMetaClassDeclareReservedUnused(IOFWCompareAndSwapCommand, 2); - OSMetaClassDeclareReservedUnused(IOFWCompareAndSwapCommand, 3); - -}; - -/* - * Send an async stream packet - */ - -#pragma mark - - -/*! @class IOFWAsyncStreamCommand -*/ -class IOFWAsyncStreamCommand : public IOFWCommand -{ - // temporary for debugging: - friend class IOFireWireUserClient ; - - OSDeclareDefaultStructors(IOFWAsyncStreamCommand) - -protected: - FWAsyncStreamCallback fComplete; - void * fRefCon; - IOMemoryDescriptor * fMemDesc; - int fSpeed; - int fSize; - int fCurRetries; - int fMaxRetries; - int fChannel; - int fSyncBits; - int fTag; - UInt32 fGeneration; // bus topology fNodeID is valid for. - bool fFailOnReset; - - typedef struct - { } - MemberVariables; - - MemberVariables * fMembers; - - virtual IOReturn complete( - IOReturn status); - - // To be called by IOFireWireController and derived classes. - virtual IOReturn execute(); - -public: - - virtual bool initAll( - IOFireWireController * control, - UInt32 generation, - UInt32 channel, - UInt32 sync, - UInt32 tag, - IOMemoryDescriptor * hostMem, - UInt32 size, - int speed, - FWAsyncStreamCallback completion, - void * refcon); - - virtual void free( void ); - - virtual IOReturn reinit( UInt32 generation, - UInt32 channel, - UInt32 sync, - UInt32 tag, - IOMemoryDescriptor * hostMem, - UInt32 size, - int speed, - FWAsyncStreamCallback completion, - void * refcon); - - virtual void gotAck( - int ackCode); - // Utility for setting generation on newly created command - virtual void setGeneration( - UInt32 generation) - { fGeneration = generation; } - - - // update nodeID/generation after bus reset, from the device object - IOReturn updateGeneration(); - - bool failOnReset() const - { return fFailOnReset; } - -private: - OSMetaClassDeclareReservedUnused(IOFWAsyncStreamCommand, 0); - OSMetaClassDeclareReservedUnused(IOFWAsyncStreamCommand, 1); - -public: - virtual bool initAll( - IOFireWireController * control, - UInt32 generation, - UInt32 channel, - UInt32 sync, - UInt32 tag, - IOMemoryDescriptor * hostMem, - UInt32 size, - int speed, - FWAsyncStreamCallback completion, - void * refcon, - bool failOnReset ); - - - virtual IOReturn reinit( - UInt32 generation, - UInt32 channel, - UInt32 sync, - UInt32 tag, - IOMemoryDescriptor * hostMem, - UInt32 size, - int speed, - FWAsyncStreamCallback completion, - void * refcon, - bool failOnReset); - - -}; - -/* - * Send an async PHY packet - */ - -#pragma mark - - -/*! @class IOFWAsyncPHYCommand -*/ -class IOFWAsyncPHYCommand : public IOFWCommand -{ - // temporary for debugging: - friend class IOFireWireUserClient; - - OSDeclareDefaultStructors( IOFWAsyncPHYCommand ) - -protected: - AsyncPendingTrans * fTrans; - FWAsyncPHYCallback fComplete; - void * fRefCon; - int fCurRetries; - int fMaxRetries; - UInt32 fGeneration; - bool fFailOnReset; - UInt32 fData1; - UInt32 fData2; - int fAckCode; - UInt32 fResponseCode; - - typedef struct - { } - MemberVariables; - - MemberVariables * fMembers; - - virtual IOReturn complete( - IOReturn status ); - - // To be called by IOFireWireController and derived classes. - virtual IOReturn execute(); - - void setResponseCode( UInt32 rcode ); - void setAckCode( int ack ); - -public: - - virtual bool initAll( - IOFireWireController * control, - UInt32 generation, - UInt32 data1, - UInt32 data2, - FWAsyncPHYCallback completion, - void * refcon, - bool failOnReset ); - virtual void free( void ); - - virtual IOReturn reinit( UInt32 generation, - UInt32 data1, - UInt32 data2, - FWAsyncPHYCallback completion, - void * refcon, - bool failOnReset ); - - virtual void gotAck( - int ackCode ); - - // Utility for setting generation on newly created command - virtual void setGeneration( - UInt32 generation ) - { fGeneration = generation; } - - - // update nodeID/generation after bus reset, from the device object - IOReturn updateGeneration(); - - bool failOnReset() const - { return fFailOnReset; } - - - virtual void gotPacket( int rcode ); - - int getAckCode( void ); - UInt32 getResponseCode( void ) const; - - void setRetries( int retries); -private: - OSMetaClassDeclareReservedUnused(IOFWAsyncPHYCommand, 0); - OSMetaClassDeclareReservedUnused(IOFWAsyncPHYCommand, 1); - OSMetaClassDeclareReservedUnused(IOFWAsyncPHYCommand, 2); - OSMetaClassDeclareReservedUnused(IOFWAsyncPHYCommand, 3); - OSMetaClassDeclareReservedUnused(IOFWAsyncPHYCommand, 4); - OSMetaClassDeclareReservedUnused(IOFWAsyncPHYCommand, 5); - OSMetaClassDeclareReservedUnused(IOFWAsyncPHYCommand, 6); - OSMetaClassDeclareReservedUnused(IOFWAsyncPHYCommand, 7); -}; - -#endif /* _IOKIT_IOFWCOMMAND_H */ diff --git a/i386/include/IOKit/firewire/IOFWDCL.h b/i386/include/IOKit/firewire/IOFWDCL.h deleted file mode 100644 index 8919485..0000000 --- a/i386/include/IOKit/firewire/IOFWDCL.h +++ /dev/null @@ -1,346 +0,0 @@ -/* -* IOFWDCL.h -* IOFireWireFamily -* -* Created by Niels on Fri Feb 21 2003. -* Copyright (c) 2003 Apple Computer, Inc. All rights reserved. -* -* $Log: IOFWDCL.h,v $ -* Revision 1.20 2008/11/14 00:17:11 arulchan -* fix for rdar://5939334 -* -* Revision 1.19 2007/03/14 01:01:12 collin -* *** empty log message *** -* -* Revision 1.18 2007/01/26 23:42:19 ayanowit -* another fix for nuDCL rosetta mode -* -* Revision 1.17 2006/08/16 01:41:41 collin -* *** empty log message *** -* -* Revision 1.16 2006/03/09 22:26:46 niels -* fix 4466075 -* -* Revision 1.15 2006/03/09 22:20:14 niels -* fix 4466075 -* -* Revision 1.14 2006/03/09 21:40:44 niels -* fix 4466075 -* -* Revision 1.13 2006/02/09 00:21:50 niels -* merge chardonnay branch to tot -* -* Revision 1.12.4.1 2005/08/06 01:31:31 collin -* *** empty log message *** -* -* Revision 1.12 2005/02/18 03:19:03 niels -* fix isight -* -* Revision 1.11 2004/04/19 21:51:49 niels -* *** empty log message *** -* -* Revision 1.10 2004/03/25 00:00:23 niels -* fix panic allocating large physical address spaces -* -* Revision 1.9 2003/10/31 02:40:58 niels -* *** empty log message *** -* -* Revision 1.8 2003/08/26 05:11:21 niels -* *** empty log message *** -* -* Revision 1.7 2003/08/25 08:39:15 niels -* *** empty log message *** -* -* Revision 1.6 2003/08/18 23:18:14 niels -* *** empty log message *** -* -* Revision 1.5 2003/08/08 22:30:32 niels -* *** empty log message *** -* -* Revision 1.4 2003/07/30 05:22:14 niels -* *** empty log message *** -* -* Revision 1.3 2003/07/29 22:49:22 niels -* *** empty log message *** -* -* Revision 1.2 2003/07/21 06:52:58 niels -* merge isoch to TOT -* -* Revision 1.1.2.5 2003/07/18 00:17:41 niels -* *** empty log message *** -* -* Revision 1.1.2.4 2003/07/14 22:08:53 niels -* *** empty log message *** -* -* Revision 1.1.2.3 2003/07/11 18:15:33 niels -* *** empty log message *** -* -* Revision 1.1.2.2 2003/07/03 22:10:24 niels -* fix iidc/dv rcv -* -* Revision 1.1.2.1 2003/07/01 20:54:06 niels -* isoch merge -* -*/ - -#import <IOKit/firewire/IOFireWireFamilyCommon.h> - -#import <libkern/c++/OSObject.h> -#import <libkern/c++/OSSet.h> -#import <IOKit/IOTypes.h> - -class IODCLProgram ; -class OSIterator ; -class IOFireWireLink ; -class IOMemoryMap ; - -/*! @class IOFWDCL -*/ - -class IOFWDCL : public OSObject -{ - OSDeclareAbstractStructors( IOFWDCL ) ; - - public: - - typedef void (*Callback)( void * refcon ) ; - - enum - { - kDynamic = BIT(1)//kNuDCLDynamic, - ,kUpdateBeforeCallback = BIT(2)//kNuDCLUpdateBeforeCallback - ,kUser = BIT(18) // kNuDCLUser - ,kBigEndianUpdates = BIT(19) // NOTE: Don't change this without making similar change to IOFireWireLib's NuDCL::Export(...)! - } ; - - class InternalData - { - public: - - IOFWDCL * lastBranch ; - } ; - - protected: - - IOFWDCL* fBranch ; - Callback fCallback ; - volatile UInt32 * fTimeStampPtr ; - UInt32 fRangeCount ; - IOVirtualRange * fRanges ; - OSSet* fUpdateList ; - OSIterator * fUpdateIterator ; - volatile UInt32 * fUserStatusPtr ; - void* fRefcon ; - UInt32 fFlags ; - - InternalData * fLoLevel ; - - public: - - // - // IOFWDCL public API: - // - - virtual bool initWithRanges ( - OSSet * updateSet, - unsigned rangesCount = 0, - IOVirtualRange ranges [] = NULL ) ; - - void setBranch( IOFWDCL* branch ) ; - IOFWDCL* getBranch() const ; - void setTimeStampPtr ( UInt32* timeStampPtr ) ; - UInt32* getTimeStampPtr () const ; - void setCallback( Callback callback ) ; - Callback getCallback() const ; - void setStatusPtr( UInt32* statusPtr ) ; - UInt32* getStatusPtr() const ; - void setRefcon( void * refcon ) ; - void * getRefcon() const ; - const OSSet* getUpdateList() const ; - - virtual IOReturn addRange ( IOVirtualRange& range ) ; - virtual IOReturn setRanges ( UInt32 numRanges, IOVirtualRange ranges[] ) ; - virtual UInt32 getRanges( UInt32 maxRanges, IOVirtualRange ranges[] ) const ; - virtual UInt32 countRanges() ; - virtual IOReturn getSpan( IOVirtualRange& result ) const ; - virtual IOByteCount getSize() const ; - IOReturn appendUpdateList( IOFWDCL* updateDCL ) ; - IOReturn setUpdateList( OSSet* updateList ) ; - void emptyUpdateList() ; - void setFlags( UInt32 flags ) ; - UInt32 getFlags() const ; - - - virtual void update() = 0 ; - - // OSObject - - virtual void free () ; - - public: - - // - // internal use only; please don't use... - // - - virtual IOReturn compile( IODCLProgram & , bool & ) = 0 ; - virtual void link () = 0 ; - - OSMetaClassDeclareReservedUnused ( IOFWDCL, 4 ) ; // used to be relink() - - public : - virtual bool interrupt( bool &, IOFWDCL * & ) = 0 ; - virtual void finalize ( IODCLProgram & ) ; - virtual IOReturn importUserDCL ( - UInt8 * data, - IOByteCount & dataSize, - IOMemoryMap * bufferMap, - const OSArray * dcl ) ; - - protected : - - friend class IOFWDCLFriend ; - - public : - - // dump DCL info... - virtual void debug() ; - - public: - - // - // internal use only; please don't use... - // - - virtual bool checkForInterrupt() = 0 ; - - OSMetaClassDeclareReservedUsed ( IOFWDCL, 0 ) ; - OSMetaClassDeclareReservedUnused ( IOFWDCL, 1 ) ; - OSMetaClassDeclareReservedUnused ( IOFWDCL, 2 ) ; - OSMetaClassDeclareReservedUnused ( IOFWDCL, 3 ) ; -// OSMetaClassDeclareReservedUnused ( ***, 4 ) ; // used above - -} ; - -#pragma mark - - -/*! @class IOFWReceiveDCL -*/ - -class IOFWReceiveDCL : public IOFWDCL -{ - OSDeclareAbstractStructors( IOFWReceiveDCL ) - - protected : - - UInt8 fHeaderBytes ; - bool fWait ; - - public: - - // me - virtual bool initWithParams( - OSSet * updateSet, - UInt8 headerBytes, - unsigned rangesCount, - IOVirtualRange ranges [] ) ; - IOReturn setWaitControl( bool wait ) ; - - public : - - // internal use only: - virtual IOReturn importUserDCL ( - UInt8 * data, - IOByteCount & dataSize, - IOMemoryMap * bufferMap, - const OSArray * dcl ) ; - - protected : - - virtual void debug() ; - -} ; - -#pragma mark - - -/*! @class IOFWSendDCL -*/ - -class IOFWSendDCL : public IOFWDCL -{ - OSDeclareAbstractStructors( IOFWSendDCL ) - - protected: - - UInt32 * fUserHeaderPtr ; // pointer to 2 quadlets containing isoch header for this packet - UInt32 * fUserHeaderMaskPtr ; // pointer to 2 quadlets; used to mask header quadlets - IOFWDCL * fSkipBranchDCL ; - Callback fSkipCallback ; - void * fSkipRefcon ; - UInt8 fSync ; - UInt8 fTag ; - - public: - - // OSObject - virtual void free() ; - - // IOFWDCL - virtual IOReturn addRange ( IOVirtualRange& range ) ; - virtual IOReturn setRanges ( UInt32 numRanges, IOVirtualRange ranges[] ) ; - - // me - virtual bool initWithParams( OSSet * updateSet, - unsigned rangesCount = 0, - IOVirtualRange ranges [] = NULL, - UInt8 sync = 0, - UInt8 tag = 0 ) ; - - void setUserHeaderPtr( UInt32* userHeaderPtr, UInt32 * maskPtr ) ; - UInt32 * getUserHeaderPtr() ; - UInt32 * getUserHeaderMask() ; - void setSkipBranch( IOFWDCL * skipBranchDCL ) ; - IOFWDCL * getSkipBranch() const ; - void setSkipCallback( Callback callback ) ; - Callback getSkipCallback() const ; - void setSkipRefcon( void * refcon = 0 ) ; - void * getSkipRefcon() const ; - void setSync( UInt8 sync ) ; - UInt8 getSync() const ; - void setTag( UInt8 tag ) ; - UInt8 getTag() const ; - - public : - - // internal use only: - virtual IOReturn importUserDCL ( - UInt8 * data, - IOByteCount & dataSize, - IOMemoryMap * bufferMap, - const OSArray * dcl ) ; - protected : - - virtual void debug() ; -} ; - -#pragma mark - - -/*! @class IOFWSkipCycleDCL -*/ - -class IOFWSkipCycleDCL : public IOFWDCL -{ - OSDeclareAbstractStructors( IOFWSkipCycleDCL ) - - public: - - virtual bool init() ; - - virtual IOReturn addRange ( IOVirtualRange& range ) ; - virtual IOReturn setRanges ( UInt32 numRanges, IOVirtualRange ranges[] ) ; - virtual IOReturn getSpan( IOVirtualRange& result ) ; - - protected : - - virtual void debug() ; -} ; diff --git a/i386/include/IOKit/firewire/IOFWDCLPool.h b/i386/include/IOKit/firewire/IOFWDCLPool.h deleted file mode 100644 index 005b62a..0000000 --- a/i386/include/IOKit/firewire/IOFWDCLPool.h +++ /dev/null @@ -1,160 +0,0 @@ -/* - * IOFWNuDCLPool.h - * IOFireWireFamily - * - * Created by Niels on Fri Mar 07 2003. - * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. - * - * $Log: IOFWDCLPool.h,v $ - * Revision 1.15 2008/11/14 00:17:12 arulchan - * fix for rdar://5939334 - * - * Revision 1.14 2008/03/03 23:31:42 ayanowit - * another gcc-42 fix. - * - * Revision 1.13 2007/01/26 20:52:31 ayanowit - * changes to user-space isoch stuff to support 64-bit apps. - * - * Revision 1.12 2006/02/09 00:21:50 niels - * merge chardonnay branch to tot - * - * Revision 1.11 2005/04/12 20:09:13 niels - * fix memory leak importing NuDCL programs from user space - * - * Revision 1.10.20.2 2006/01/31 04:49:50 collin - * *** empty log message *** - * - * Revision 1.10 2003/11/07 21:24:28 niels - * *** empty log message *** - * - * Revision 1.9 2003/11/07 21:01:18 niels - * *** empty log message *** - * - * Revision 1.8 2003/08/25 08:39:15 niels - * *** empty log message *** - * - * Revision 1.7 2003/08/22 18:15:16 niels - * *** empty log message *** - * - * Revision 1.6 2003/08/15 04:36:55 niels - * *** empty log message *** - * - * Revision 1.5 2003/07/30 05:22:14 niels - * *** empty log message *** - * - * Revision 1.4 2003/07/21 08:48:20 niels - * *** empty log message *** - * - * Revision 1.3 2003/07/21 07:52:13 niels - * *** empty log message *** - * - * Revision 1.2 2003/07/21 06:52:58 niels - * merge isoch to TOT - * - * Revision 1.1.2.3 2003/07/11 18:15:34 niels - * *** empty log message *** - * - * Revision 1.1.2.2 2003/07/09 21:24:00 niels - * *** empty log message *** - * - * Revision 1.1.2.1 2003/07/01 20:54:06 niels - * isoch merge - * - */ - -#import <libkern/c++/OSObject.h> -#import <libkern/c++/OSArray.h> -#import <IOKit/IOTypes.h> - -class IOFireWireLink ; -class IOFWDCL ; -class IOFWReceiveDCL ; -class IOFWSendDCL ; -class IOFWSkipCycleDCL ; -class IOFireWireUserClient ; -class IOMemoryDescriptor ; -class IOMemoryMap ; -class OSSet; - -/*! @class IOFWDCLPool - @discussion You should never subclass IOFWDCLPool -*/ - -class IOFWDCLPool : public OSObject -{ - OSDeclareAbstractStructors( IOFWDCLPool ) - - friend class IOFireWireUserClient ; - friend class IOFWUserLocalIsochPort ; - - protected: - - class Expansion* fReserved ; // for class expansion - - IOFireWireLink * fLink ; - UInt8 fCurrentTag ; - UInt8 fCurrentSync ; - OSArray* fProgram ; - DCLNuDCLLeader fLeader ; - - public: - - // OSObject - - virtual void free() ; - - // me - - virtual bool initWithLink ( IOFireWireLink& link, UInt32 capacity ) ; - - virtual void setCurrentTagAndSync ( UInt8 tag, UInt8 sync ) ; - - virtual IOFWReceiveDCL* appendReceiveDCL ( - OSSet * updateSet, - UInt8 headerBytes, - UInt32 rangesCount, - IOVirtualRange ranges[] ) ; - virtual IOFWSendDCL* appendSendDCL ( - OSSet * updateSet, - UInt32 rangesCount, - IOVirtualRange ranges[] ) ; - virtual IOFWSkipCycleDCL* appendSkipCycleDCL () ; - virtual const OSArray * getProgramRef () const ; - - protected : - - IOReturn importUserProgram ( - IOMemoryDescriptor * userExportDesc, - unsigned bufferRangeCount, - IOAddressRange bufferRanges[], - IOMemoryMap * bufferMap ) ; - IOReturn importUserDCL( - IOFWDCL * dcl, - void * importData, - IOByteCount & dataSize, - IOMemoryMap * bufferMap ) ; - - - protected : - - virtual IOFWReceiveDCL * allocReceiveDCL () = 0 ; - virtual IOFWSendDCL * allocSendDCL () = 0 ; - virtual IOFWSkipCycleDCL * allocSkipCycleDCL () = 0 ; - - private : - - void appendDCL( IOFWDCL * dcl ) ; - - public : - - DCLCommand * getProgram() ; - - OSMetaClassDeclareReservedUnused ( IOFWDCLPool, 0); - OSMetaClassDeclareReservedUnused ( IOFWDCLPool, 1); - OSMetaClassDeclareReservedUnused ( IOFWDCLPool, 2); - OSMetaClassDeclareReservedUnused ( IOFWDCLPool, 3); - OSMetaClassDeclareReservedUnused ( IOFWDCLPool, 4); - OSMetaClassDeclareReservedUnused ( IOFWDCLPool, 5); - OSMetaClassDeclareReservedUnused ( IOFWDCLPool, 6); - OSMetaClassDeclareReservedUnused ( IOFWDCLPool, 7); -} ; diff --git a/i386/include/IOKit/firewire/IOFWDCLProgram.h b/i386/include/IOKit/firewire/IOFWDCLProgram.h deleted file mode 100644 index cf91f06..0000000 --- a/i386/include/IOKit/firewire/IOFWDCLProgram.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_IOFWDCLPROGRAM_H -#define _IOKIT_IOFWDCLPROGRAM_H - -#include <libkern/c++/OSObject.h> -#include <IOKit/firewire/IOFireWireFamilyCommon.h> -#include <IOKit/firewire/IOFireWireBus.h> -#include <IOKit/IOMemoryCursor.h> - -/*! @class IODCLProgram -*/ -class IODCLProgram : public OSObject -{ - OSDeclareAbstractStructors(IODCLProgram) - - private : - - void * reserved0 ;//fDCLTaskToKernel; - void * reserved1 ;//fDataTaskToKernel; - void * reserved2 ;//fDataBase; - void * reserved3 ;// IOMemoryDescriptor * fDCLDesc; - IOMemoryMap * fBufferMem ; - void * reserved5 ;// IOMemoryCursor * fDataCursor; - - protected: - - /*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData - { - IOFWIsochResourceFlags resourceFlags ; - }; - - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * fExpansionData ; - - public : - - virtual void setIsochResourceFlags ( IOFWIsochResourceFlags flags ) ; // formerly getPhysicalSegs() - IOFWIsochResourceFlags getIsochResourceFlags () const ; - - protected: - - virtual void free () ; - - public: - - virtual bool init ( IOFireWireBus::DCLTaskInfo * info = NULL ) ; - virtual IOReturn allocateHW ( - IOFWSpeed speed, - UInt32 chan) = 0; - virtual IOReturn releaseHW () = 0; - virtual IOReturn compile ( - IOFWSpeed speed, - UInt32 chan) = 0; - virtual IOReturn notify ( - IOFWDCLNotificationType notificationType, - DCLCommand ** dclCommandList, - UInt32 numDCLCommands ) = 0; - virtual IOReturn start () = 0; - virtual void stop () = 0; - virtual IOReturn pause (); - virtual IOReturn resume (); - - virtual void setForceStopProc( - IOFWIsochChannel::ForceStopNotificationProc proc, - void * refCon, - IOFWIsochChannel * channel ) ; - protected : - - void generateBufferMap( DCLCommand * program ) ; - IOReturn virtualToPhysical( - IOVirtualRange ranges[], - unsigned rangeCount, - IOMemoryCursor::IOPhysicalSegment outSegments[], - unsigned & outPhysicalSegmentCount, - unsigned maxSegments ) ; - - public : - - IOMemoryMap * getBufferMap() const ; - - public : - - // close/open isoch workloop gate... - // clients should not need to call these. - virtual void closeGate() = 0 ; - virtual void openGate() = 0 ; - - virtual IOReturn synchronizeWithIO() = 0 ; - - private: - - OSMetaClassDeclareReservedUsed(IODCLProgram, 0); - OSMetaClassDeclareReservedUsed(IODCLProgram, 1); - OSMetaClassDeclareReservedUnused(IODCLProgram, 2); - OSMetaClassDeclareReservedUnused(IODCLProgram, 3); - OSMetaClassDeclareReservedUnused(IODCLProgram, 4); - -}; - -#endif /* ! _IOKIT_IOFWDCLPROGRAM_H */ - diff --git a/i386/include/IOKit/firewire/IOFWDCLTranslator.h b/i386/include/IOKit/firewire/IOFWDCLTranslator.h deleted file mode 100644 index e02067c..0000000 --- a/i386/include/IOKit/firewire/IOFWDCLTranslator.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. - * - * A DCL program to interpret (in software) a program that's too complicated - * for the DMA engine. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_IOFWDCLTRANSLATOR_H -#define _IOKIT_IOFWDCLTRANSLATOR_H - -#include <libkern/c++/OSObject.h> -#include <IOKit/firewire/IOFWDCLProgram.h> - - -/*! @class IODCLTranslator -*/ - -class IODCLTranslator : public IODCLProgram -{ - OSDeclareAbstractStructors(IODCLTranslator) - -protected: - enum - { - kNumPingPongs = 2, - kNumPacketsPerPingPong = 500, - kMaxIsochPacketSize = 1000, - kPingPongBufferSize = kNumPingPongs * kNumPacketsPerPingPong * kMaxIsochPacketSize - }; - - // Opcodes and buffer for pingpong program - DCLLabel fStartLabel; - DCLTransferPacket fTransfers[kNumPingPongs*kNumPacketsPerPingPong]; - DCLCallProc fCalls[kNumPingPongs]; - DCLJump fJumpToStart; - UInt8 fBuffer[kPingPongBufferSize]; - - IODCLProgram * fHWProgram; // Hardware program executing our opcodes - DCLCommand* fToInterpret; // The commands to interpret - DCLCommand* fCurrentDCLCommand; // Current command to interpret - int fPingCount; // Are we pinging or ponging? - UInt32 fPacketHeader; - - static void ListeningDCLPingPongProc(DCLCommand* pDCLCommand); - static void TalkingDCLPingPongProc(DCLCommand* pDCLCommand); - -public: - virtual bool init(DCLCommand* toInterpret); - virtual IOReturn allocateHW(IOFWSpeed speed, UInt32 chan); - virtual IOReturn releaseHW(); - virtual IOReturn notify(IOFWDCLNotificationType notificationType, - DCLCommand** dclCommandList, UInt32 numDCLCommands); - virtual void stop(); - - DCLCommand* getTranslatorOpcodes(); - void setHWProgram(IODCLProgram *program); -}; - -/*! @class IODCLTranslateTalk -*/ - -class IODCLTranslateTalk : public IODCLTranslator -{ - OSDeclareDefaultStructors(IODCLTranslateTalk) - -protected: - -public: - virtual IOReturn compile(IOFWSpeed speed, UInt32 chan); - virtual IOReturn start(); - -}; - -/*! @class IODCLTranslateListen -*/ - -class IODCLTranslateListen : public IODCLTranslator -{ - OSDeclareDefaultStructors(IODCLTranslateListen) - -protected: - -public: - virtual IOReturn compile(IOFWSpeed speed, UInt32 chan); - virtual IOReturn start(); - -}; -#endif /* ! _IOKIT_IOFWDCLPROGRAM_H */ - diff --git a/i386/include/IOKit/firewire/IOFWIsochChannel.h b/i386/include/IOKit/firewire/IOFWIsochChannel.h deleted file mode 100644 index 4bbd6c8..0000000 --- a/i386/include/IOKit/firewire/IOFWIsochChannel.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_IOFWISOCHCHANNEL_H -#define _IOKIT_IOFWISOCHCHANNEL_H - -#include <libkern/c++/OSObject.h> -#include <IOKit/firewire/IOFireWireFamilyCommon.h> - -enum -{ - kFWIsochChannelUnknownCondition = 0, - kFWIsochChannelNotEnoughBandwidth = 1, - kFWIsochChannelChannelNotAvailable = 2 -}; - -class IOFireWireController; -class IOFWIsochChannel; -class IOFWIsochPort; -class OSSet; -class IOFWReadQuadCommand; -class IOFWCompareAndSwapCommand; - -/*! @class IOFWIsochChannel -*/ -class IOFWIsochChannel : public OSObject -{ - OSDeclareDefaultStructors(IOFWIsochChannel) - - public: - - typedef IOReturn (ForceStopNotificationProc)(void* refCon, IOFWIsochChannel* channel, UInt32 stopCondition ); - -protected: - IOFireWireController * fControl; - ForceStopNotificationProc* fStopProc; - void * fStopRefCon; - IOFWIsochPort * fTalker; - OSSet * fListeners; - bool fDoIRM; - UInt32 fBandwidth; // Allocation units used - UInt32 fPacketSize; - IOFWSpeed fPrefSpeed; - IOFWSpeed fSpeed; // Actual speed used - UInt32 fChannel; // Actual channel used - IOFWReadQuadCommand * fReadCmd; - IOFWCompareAndSwapCommand * fLockCmd; - UInt32 fGeneration; // When bandwidth was allocated - - IOLock * fLock; - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - static void threadFunc( void * arg ); - - virtual IOReturn updateBandwidth(bool claim); - virtual void reallocBandwidth( UInt32 generation ); - virtual void free(); - -public: - // Called from IOFireWireController - virtual bool init( IOFireWireController *control, bool doIRM, UInt32 packetSize, - IOFWSpeed prefSpeed, ForceStopNotificationProc* stopProc, - void *stopRefCon ); - virtual void handleBusReset(); - - // Called by clients - virtual IOReturn setTalker(IOFWIsochPort *talker); - virtual IOReturn addListener(IOFWIsochPort *listener); - - virtual IOReturn allocateChannel(); - virtual IOReturn releaseChannel(); - virtual IOReturn start(); - virtual IOReturn stop(); - -protected: - // handles IRM and channel determination and allocation. - // called by both user and kernel isoch channels - IOReturn allocateChannelBegin( IOFWSpeed speed, UInt64 allowedChans, UInt32 * channel = NULL ) ; - - // handles IRM and channel allocation. - // called by both user and kernel isoch channels - IOReturn releaseChannelComplete() ; - - IOReturn checkMemoryInRange( IOMemoryDescriptor * memory ); - -private: - OSMetaClassDeclareReservedUnused(IOFWIsochChannel, 0); - OSMetaClassDeclareReservedUnused(IOFWIsochChannel, 1); - OSMetaClassDeclareReservedUnused(IOFWIsochChannel, 2); - OSMetaClassDeclareReservedUnused(IOFWIsochChannel, 3); - -}; - -typedef IOFWIsochChannel::ForceStopNotificationProc FWIsochChannelForceStopNotificationProc ; -typedef IOFWIsochChannel::ForceStopNotificationProc* FWIsochChannelForceStopNotificationProcPtr ; - -#endif /* ! _IOKIT_IOFWISOCHCHANNEL_H */ - diff --git a/i386/include/IOKit/firewire/IOFWIsochPort.h b/i386/include/IOKit/firewire/IOFWIsochPort.h deleted file mode 100644 index 793c5e9..0000000 --- a/i386/include/IOKit/firewire/IOFWIsochPort.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. - * - * IOFWIsochPort is an abstract object that represents hardware on the bus - * (locally or remotely) that sends or receives isochronous packets. - * Local ports are implemented by the local device driver, - * Remote ports are implemented by the driver for the remote device. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_IOFWISOCHPORT_H -#define _IOKIT_IOFWISOCHPORT_H - -#include <libkern/c++/OSObject.h> -#include <IOKit/firewire/IOFireWireFamilyCommon.h> - -/*! @class IOFWIsochPort -*/ - -class IOFWIsochPort : public OSObject -{ - OSDeclareAbstractStructors(IOFWIsochPort) - -public: - // Return maximum speed and channels supported - // (bit n set = chan n supported) - virtual IOReturn getSupported(IOFWSpeed &maxSpeed, UInt64 &chanSupported) = 0; - - // Allocate hardware resources for port - virtual IOReturn allocatePort(IOFWSpeed speed, UInt32 chan) = 0; - virtual IOReturn releasePort() = 0; // Free hardware resources - virtual IOReturn start() = 0; // Start port processing packets - virtual IOReturn stop() = 0; // Stop processing packets - -private: - OSMetaClassDeclareReservedUnused(IOFWIsochPort, 0); - OSMetaClassDeclareReservedUnused(IOFWIsochPort, 1); - -}; - -#endif /* ! _IOKIT_IOFWISOCHPORT_H */ - diff --git a/i386/include/IOKit/firewire/IOFWLocalIsochPort.h b/i386/include/IOKit/firewire/IOFWLocalIsochPort.h deleted file mode 100644 index 493f719..0000000 --- a/i386/include/IOKit/firewire/IOFWLocalIsochPort.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. - * - * IOFWIsochPort is an abstract object that represents hardware on the bus - * (locally or remotely) that sends or receives isochronous packets. - * Local ports are implemented by the local device driver, - * Remote ports are implemented by the driver for the remote device. - * - * HISTORY - * - * $Log: IOFWLocalIsochPort.h,v $ - * Revision 1.10 2004/06/10 20:57:36 niels - * *** empty log message *** - * - * Revision 1.9 2003/08/30 00:16:44 collin - * *** empty log message *** - * - * Revision 1.8 2003/08/15 04:36:55 niels - * *** empty log message *** - * - * Revision 1.7 2003/07/29 22:49:22 niels - * *** empty log message *** - * - * Revision 1.6 2003/07/21 06:52:58 niels - * merge isoch to TOT - * - * Revision 1.5.14.1 2003/07/01 20:54:07 niels - * isoch merge - * - */ - - -#ifndef _IOKIT_IOFWLOCALISOCHPORT_H -#define _IOKIT_IOFWLOCALISOCHPORT_H - -#import <IOKit/firewire/IOFireWireFamilyCommon.h> -#import <IOKit/firewire/IOFWIsochPort.h> - -class IOFireWireController; -class IODCLProgram; - -/*! @class IOFWLocalIsochPort -*/ -class IOFWLocalIsochPort : public IOFWIsochPort -{ - OSDeclareDefaultStructors(IOFWLocalIsochPort) - - protected: - - IOFireWireController * fControl; - IODCLProgram * fProgram; - - /*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData - { - } ; - - ExpansionData * fExpansion ; - - protected : - - virtual void free ( void ) ; - - public: - - virtual bool init ( - IODCLProgram * program, - IOFireWireController * control ) ; - - // Return maximum speed and channels supported - // (bit n set = chan n supported) - virtual IOReturn getSupported ( - IOFWSpeed & maxSpeed, - UInt64 & chanSupported ) ; - - // Allocate hardware resources for port - virtual IOReturn allocatePort ( - IOFWSpeed speed, - UInt32 chan ) ; - virtual IOReturn releasePort ( void ) ; // Free hardware resources - virtual IOReturn start ( void ) ; // Start port processing packets - virtual IOReturn stop ( void ) ; // Stop processing packets - - /*! @function notify - @abstract Informs hardware of a change to the DCL program. - @param notificationType Type of change. - @param dclCommandList List of DCL commands that have been changed. - @param numDCLCommands Number of commands in list. - @result IOKit error code. */ - virtual IOReturn notify( - IOFWDCLNotificationType notificationType, - DCLCommand ** dclCommandList, - UInt32 numDCLCommands ) ; - static void printDCLProgram ( - const DCLCommand * dcl, - UInt32 count = 0, - void (*printFN)( const char *format, ...) = NULL, - unsigned lineDelayMS = 0 ) ; - IOReturn setIsochResourceFlags ( - IOFWIsochResourceFlags flags ) ; - IODCLProgram * getProgramRef() const ; - - IOReturn synchronizeWithIO() ; - - private: - - OSMetaClassDeclareReservedUnused ( IOFWLocalIsochPort, 0 ) ; - OSMetaClassDeclareReservedUnused ( IOFWLocalIsochPort, 1 ) ; -}; - -#endif /* ! _IOKIT_IOFWLOCALISOCHPORT_H */ - diff --git a/i386/include/IOKit/firewire/IOFWPHYPacketListener.h b/i386/include/IOKit/firewire/IOFWPHYPacketListener.h deleted file mode 100644 index ea2c6ff..0000000 --- a/i386/include/IOKit/firewire/IOFWPHYPacketListener.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2007 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOFWPHYPACKETLISTENER_H_ -#define _IOFWPHYPACKETLISTENER_H_ - -#include <libkern/c++/OSObject.h> - -class IOFireWireController; - -// Callback when phy packet is received -typedef void (*FWPHYPacketCallback)( void *refcon, UInt32 data1, UInt32 data2 ); - -/*! @class IOFWPHYPacketListener -*/ - -class IOFWPHYPacketListener : public OSObject -{ - OSDeclareDefaultStructors( IOFWPHYPacketListener ); - - friend class IOFireWireController; - -protected: - - IOFireWireController * fControl; - FWPHYPacketCallback fCallback; - void * fRefCon; - - static IOFWPHYPacketListener * createWithController( IOFireWireController * controller ); - - virtual bool initWithController( IOFireWireController * control ); - virtual void free( void ); - -public: - - virtual IOReturn activate( void ); - virtual void deactivate( void ); - - virtual void setCallback( FWPHYPacketCallback callback ); - virtual void setRefCon( void * refcon ); - virtual void * getRefCon( void ); - -protected: - virtual void processPHYPacket( UInt32 data1, UInt32 data2 ); - - OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 0 ); - OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 1 ); - OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 2 ); - OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 3 ); - OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 4 ); - OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 5 ); - OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 6 ); - OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 7 ); - OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 8 ); - OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 9 ); -}; - -#endif \ No newline at end of file diff --git a/i386/include/IOKit/firewire/IOFWPhysicalAddressSpace.h b/i386/include/IOKit/firewire/IOFWPhysicalAddressSpace.h deleted file mode 100644 index b1944f4..0000000 --- a/i386/include/IOKit/firewire/IOFWPhysicalAddressSpace.h +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOFWPHYSICALADDRESSSPACE_H -#define _IOKIT_IOFWPHYSICALADDRESSSPACE_H - -#include <IOKit/firewire/IOFWAddressSpace.h> -#include <IOKit/IODMACommand.h> - -/* - * Direct physical memory <-> FireWire address. - * Accesses to these addresses may be handled automatically by the - * hardware without notification. - * - * The 64 bit FireWire address of (32 bit) physical addr xxxx:xxxx is hostNode:0000:xxxx:xxxx - */ - -class IOFWPhysicalAddressSpace; - -struct FWSegment -{ - FWAddress address; - UInt32 length; -}; - -#pragma mark - - -/*! - @class IOFWPhysicalAddressSpaceAux -*/ - -class IOFWPhysicalAddressSpaceAux : public IOFWAddressSpaceAux -{ - OSDeclareDefaultStructors(IOFWPhysicalAddressSpaceAux) - - friend class IOFWAddressSpace; - friend class IOFWPhysicalAddressSpace; - -protected: - - /*! - @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - - struct ExpansionData { }; - - /*! - @var reserved - Reserved for future use. (Internal use only) - */ - - ExpansionData *reserved; - - IODMACommand * fDMACommand; - bool fDMACommandPrepared; - -public: - virtual bool init( IOFWAddressSpace * primary ); - virtual void free(); - - void setDMACommand( IODMACommand * dma_command ); - IODMACommand * getDMACommand( void ); - UInt64 getPhysicalSegment( UInt64 offset, UInt64 * length ); - - IOReturn prepare( void ); - IOReturn synchronize( IOOptionBits options ); - IOReturn complete( void ); - - bool isPrepared( void ); - - IOReturn getSegments( UInt64 * offset, FWSegment * fw_segments, UInt32 * num_segments ); - -private: - OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 0); - OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 1); - OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 2); - OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 3); - OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 4); - OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 5); - OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 6); - OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 7); - OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 8); - OSMetaClassDeclareReservedUnused(IOFWPhysicalAddressSpaceAux, 9); - -}; - -#pragma mark - - -/*! - @class IOFWPhysicalAddressSpace -*/ - -class IOFWPhysicalAddressSpace : public IOFWAddressSpace -{ - OSDeclareDefaultStructors(IOFWPhysicalAddressSpace) - - friend class IOFWPhysicalAddressSpaceAux; - -protected: - - IOMemoryDescriptor * fMem; // unused - vm_size_t fLen; // unused - - virtual void free(); - -public: - -/*! @function init - @abstract Initialize physical address space. - @param bus Points to IOFireWireBus object. - @result returns true if success, else false */ - virtual bool init( IOFireWireBus * bus ); - -/*! @function initWithDesc - @abstract Initialize physical address space with IOMemoryDescriptor. - @param bus Points to IOFireWireBus object. - @param mem Points to IOMemoryDescriptor. - @result returns true if success, else false */ - virtual bool initWithDesc(IOFireWireBus *bus, - IOMemoryDescriptor *mem); - -/*! @function doRead - @abstract A method for processing an address space read request - @param nodeID FireWire Read from nodeID. - @param speed at this 'speed'. - @param addr with FireWire address 'addr'. - @param len read 'len' bytes from nodeID. - @param buf points to a memory descriptor containing the packet data. - @param offset start from this 'offset' in 'buf'. - @param refcon Can be queried for extra info about the request. - @result UIn32 returns kFWResponseComplete on success */ - virtual UInt32 doRead(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, - IOMemoryDescriptor **buf, IOByteCount * offset, - IOFWRequestRefCon refcon); - -/*! @function doWrite - @abstract A method for processing an address space write request - @param nodeID FireWire Write to nodeID. - @param speed at this 'speed'. - @param addr with FireWire address 'addr'. - @param len write 'len' bytes to nodeID. - @param buf obtain bytes from location given by 'buf'. - @param reqrefcon Can be queried for extra info about the request. - @result UIn32 returns kFWResponseComplete on success */ - virtual UInt32 doWrite(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, - const void *buf, IOFWRequestRefCon refcon); - -/*! @function getMemoryDescriptor - @abstract Gets the memory descriptor, which is associated to this - PhysicalAddressSpace. - @param none. - @result returns the IOMemoryDescriptor */ - IOMemoryDescriptor * getMemoryDescriptor( void ); - -/*! @function setMemoryDescriptor - @abstract Sets the memory descriptor, which will be associated to this - PhysicalAddressSpace. - @param none. - @result returns the IOMemoryDescriptor */ - IOReturn setMemoryDescriptor( IOMemoryDescriptor * descriptor ); - -/*! @function getLength - @abstract Get the length of the memory backed by PhysicalAddressSpace. - @param none. - @result returns the length */ - UInt64 getLength( void ); - -/*! @function setDMACommand - @abstract Set the DMACommand for this PhysicalAddressSpace. - @param dma_command Points to IODMACommand object. - @result none */ - inline void setDMACommand( IODMACommand * dma_command ) - { ((IOFWPhysicalAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->setDMACommand( dma_command ); }; - -/*! @function getDMACommand - @abstract Get the DMACommand from this PhysicalAddressSpace. - @param none. - @result return previously assigned IODMACommand, null if not initialized */ - inline IODMACommand * getDMACommand( void ) - { return ((IOFWPhysicalAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->getDMACommand(); }; - -/*! @function initWithDMACommand - @abstract Initialize physical address space with IODMACommand. - @param bus Points to IOFireWireBus object. - @param command Points to IODMACommand. - @result returns true if success, else false */ - virtual bool initWithDMACommand( IOFireWireBus * control, IODMACommand * command ); - -/*! @function prepare - @abstract Prepare the IODMACommand used by this PhysicalAddressSpace. - @param none. - @result returns kIOReturnSuccess on success */ - inline IOReturn prepare( void ) - { return ((IOFWPhysicalAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->prepare(); }; - -/*! @function synchronize - @abstract synchronize the IODMACommand used by this PhysicalAddressSpace. - @param none. - @result returns kIOReturnSuccess on success */ - inline IOReturn synchronize( IOOptionBits options ) - { return ((IOFWPhysicalAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->synchronize( options ); }; - -/*! @function complete - @abstract complete the IODMACommand used by this PhysicalAddressSpace. - @param none. - @result returns kIOReturnSuccess on success */ - inline IOReturn complete( void ) - { return ((IOFWPhysicalAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->complete(); }; - -/*! @function isPrepared - @abstract Inspects whether the IODMACommand was prepared in this PhysicalAddressSpace. - @param none. - @result returns true if prepared, else false */ - inline bool isPrepared( void ) - { return ((IOFWPhysicalAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->isPrepared(); }; - -/*! @function getSegments - @abstract Returns the scatter gather list of memory segments from the IODMACommand - used in this PhysicalAddressSpace. - @param offset input/output parameter, defines the starting and ending offset in the memory - descriptor, relative to any offset passed to the prepare() method. - FWSegment Points to an array of memory segments. - num_segments Size of the FWSegment array. - @result returns kIOReturnSuccess on success */ - inline IOReturn getSegments( UInt64 * offset, FWSegment * fw_segments, UInt32 * num_segments ) - { return ((IOFWPhysicalAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->getSegments( offset, fw_segments, num_segments ); }; - -/*! @function checkMemoryInRange - @abstract Validates the IOMemoryDescriptor, which is used to initialize the PhysicalAddressSpace. - @param memory Points to a valid IOMemoryDescriptor. - @result returns kIOReturnSuccess on success */ - IOReturn checkMemoryInRange( IOMemoryDescriptor * memory ); - -protected: - - UInt64 getPhysicalSegment( UInt64 offset, UInt64 * length ) - { return ((IOFWPhysicalAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->getPhysicalSegment( offset, length); }; - - virtual IOFWAddressSpaceAux * createAuxiliary( void ); - -}; - -#endif diff --git a/i386/include/IOKit/firewire/IOFWPseudoAddressSpace.h b/i386/include/IOKit/firewire/IOFWPseudoAddressSpace.h deleted file mode 100644 index 02c2c30..0000000 --- a/i386/include/IOKit/firewire/IOFWPseudoAddressSpace.h +++ /dev/null @@ -1,370 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOFWPSEUDOADDRESSSPACE_H -#define _IOKIT_IOFWPSEUDOADDRESSSPACE_H - -#include <IOKit/firewire/IOFWAddressSpace.h> - -/* - * If installed, this callback is invoked for drivers which - * would like to coalesce incoming writes and do batch processing - * of incoming block write packets. - * This callback can be installed by calling setARxReqIntCompleteHandler - * method in IOFWPseudoAddressSpace object. - */ -typedef void (*IOFWARxReqIntCompleteHandler)( void * refcon ); - -/* - * Pseudo firewire addresses usually represent emulated registers of some kind. - * Accesses to these addresses will result in the owner being notified. - * - * Virtual addresses should not have zero as the top 16 bits of the 48 bit local address, - * since that may look like a physical address to hardware (eg. OHCI). - * if reader is NULL then reads will not be allowed. - * if writer is NULL then writes will not be allowed. - * if either is NULL then lock requests will not be allowed. - * refcon is passed back as the first argument of read and write callbacks. - */ - -class IOFWPseudoAddressSpace; - -#pragma mark - - -/*! - @class IOFWPseudoAddressSpaceAux -*/ - -class IOFWPseudoAddressSpaceAux : public IOFWAddressSpaceAux -{ - OSDeclareDefaultStructors(IOFWPseudoAddressSpaceAux) - - friend class IOFWAddressSpace; - friend class IOFWPseudoAddressSpace; - friend class IOFireWireController; - -protected: - - struct MemberVariables - { - IOFWARxReqIntCompleteHandler fARxReqIntCompleteHandler; - void * fARxReqIntCompleteHandlerRefcon; - }; - - MemberVariables * fMembers; - -public: - - virtual bool init( IOFWAddressSpace * primary ); - virtual void free(); - -protected: - - bool createMemberVariables( void ); - void destroyMemberVariables( void ); - - virtual void handleARxReqIntComplete(); - -public: - -/*! @function setARxReqIntCompleteHandler - @abstract Installs a callback to receive notification, when FWIM has completed - ARxReqInt processing and no incoming packets are left in the queue. - @param refcon Client's callback object. - @param handler Client callback to be invoked, at the end of interrupt processing. - @result none. */ - virtual void setARxReqIntCompleteHandler( void * refcon, IOFWARxReqIntCompleteHandler handler ); - - virtual bool intersects( IOFWAddressSpace * space ); - -private: - - OSMetaClassDeclareReservedUsed(IOFWPseudoAddressSpaceAux, 0); - OSMetaClassDeclareReservedUsed(IOFWPseudoAddressSpaceAux, 1); - OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpaceAux, 2); - OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpaceAux, 3); - OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpaceAux, 4); - OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpaceAux, 5); - OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpaceAux, 6); - OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpaceAux, 7); - OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpaceAux, 8); - OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpaceAux, 9); - -}; - -/*! - @class IOFWPseudoAddressSpace -*/ - -class IOFWPseudoAddressSpace : public IOFWAddressSpace -{ - OSDeclareDefaultStructors(IOFWPseudoAddressSpace) - - friend class IOFWPseudoAddressSpaceAux; - friend class IOFireWireController; - -protected: - - IOMemoryDescriptor* fDesc; - void * fRefCon; - FWReadCallback fReader; - FWWriteCallback fWriter; - FWAddress fBase; - UInt32 fLen; - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - static OSData * allocatedAddresses; // unused - - virtual void free(); - -public: - -/*! @function simpleReader - @abstract A method for processing an address space read request - @param refcon Client's callback object. - @param nodeID FireWire Read from nodeID. - @param speed at this 'speed'. - @param addr with FireWire address 'addr'. - @param len read 'len' bytes from nodeID. - @param buf points to a memory descriptor containing the packet data. - @param offset start from this 'offset' in 'buf'. - @param reqrefcon Can be queried for extra info about the request. - @result UIn32 returns kFWResponseComplete on success */ - static UInt32 simpleReader( - void* refcon, - UInt16 nodeID, - IOFWSpeed & speed, - FWAddress addr, - UInt32 len, - IOMemoryDescriptor** buf, - IOByteCount* offset, - IOFWRequestRefCon reqrefcon); - -/*! @function simpleWriter - @abstract A method for processing an address space write request - @param refcon Client's callback object. - @param nodeID FireWire Write to nodeID. - @param speed at this 'speed'. - @param addr with FireWire address 'addr'. - @param len write 'len' bytes to nodeID. - @param buf obtain bytes from location given by 'buf'. - @param reqrefcon Can be queried for extra info about the request. - @result UIn32 returns kFWResponseComplete on success */ - static UInt32 simpleWriter( - void* refcon, - UInt16 nodeID, - IOFWSpeed& speed, - FWAddress addr, - UInt32 len, - const void* buf, - IOFWRequestRefCon reqrefcon); -protected: - - // Get a unique address range - IOReturn allocateAddress( - FWAddress* addr, - UInt32 len); - // free address - void freeAddress( - FWAddress addr, - UInt32 len); - -public: - - static IOFWPseudoAddressSpace* readWrite( - FWAddress addr, - UInt32 len, - FWReadCallback reader, - FWWriteCallback writer, - void* refcon); - -/*! @function simpleRead - @abstract Create an address space object to handle read-only memory (eg. the local ROM) - handles everything itself - @param bus Points to IOFireWireBus object. - @param addr Points to starting address for the Pseudo Address Space. - @param len Length of the Pseudo Address Space. - @param data The virtual address of the first byte in the memory. - @result returns valid IOFWPseudoAddressSpace on success, null on failure */ - static IOFWPseudoAddressSpace* simpleRead( - IOFireWireBus* bus, - FWAddress* addr, - UInt32 len, - const void* data); - -/*! @function simpleReadFixed - @abstract Create an address space object to handle fixed read-only memory (eg. the local ROM) - handles everything itself - @param bus Points to IOFireWireBus object. - @param addr Points to starting address for the Pseudo Address Space. - @param len Length of the Pseudo Address Space. - @param data The virtual address of the first byte in the memory. - @result returns valid IOFWPseudoAddressSpace on success, null on failure */ - static IOFWPseudoAddressSpace* simpleReadFixed( - IOFireWireBus* bus, - FWAddress addr, - UInt32 len, - const void* data); - -/*! @function simpleRW - @abstract Create an address space object to handle r/w memory - handles everything itself - @param bus Points to IOFireWireBus object. - @param addr Points to starting address for the Pseudo Address Space. - @param len Length of the Pseudo Address Space. - @param data The virtual address of the first byte in the memory. - @result returns valid IOFWPseudoAddressSpace on success, null on failure */ - static IOFWPseudoAddressSpace* simpleRW( - IOFireWireBus* bus, - FWAddress* addr, - UInt32 len, - void * data); - -/*! @function simpleRW - @abstract Create an address space object to handle r/w memory - handles everything itself - @param bus Points to IOFireWireBus object. - @param addr Points to starting address for the Pseudo Address Space. - @param data The virtual address of the first byte in the memory. - @result returns valid IOFWPseudoAddressSpace on success, null on failure */ - static IOFWPseudoAddressSpace* simpleRW( - IOFireWireBus* bus, - FWAddress* addr, - IOMemoryDescriptor * data); - -/*! @function initAll - @abstract Initialize an address space object to handle r/w memory - @param bus Points to IOFireWireBus object. - @param addr Points to starting address for the Pseudo Address Space. - @param len Length of the Pseudo Address Space. - @param reader Callback handler for incoming Read. - @param writer Callback handler for incoming Write. - @param refcon Client's callback object. - @result returns true on success, false on failure */ - virtual bool initAll( - IOFireWireBus* bus, - FWAddress* addr, - UInt32 len, - FWReadCallback reader, - FWWriteCallback writer, - void* refcon); - -/*! @function initFixed - @abstract Initialize a fixed address space at top of kCSRRegisterSpaceBaseAddressHi - @param bus Points to IOFireWireBus object. - @param addr Points to starting address for the Pseudo Address Space. - @param reader Callback handler for incoming Read. - @param writer Callback handler for incoming Write. - @param refcon Client's callback object. - @result returns true on success, false on failure */ - virtual bool initFixed( - IOFireWireBus* bus, - FWAddress addr, - UInt32 len, - FWReadCallback reader, - FWWriteCallback writer, - void* refcon); - -/*! @function doRead - @abstract A method for processing an address space read request - @param nodeID FireWire Read from nodeID. - @param speed at this 'speed'. - @param addr with FireWire address 'addr'. - @param len read 'len' bytes from nodeID. - @param buf points to a memory descriptor containing the packet data. - @param offset start from this 'offset' in 'buf'. - @param reqrefcon Can be queried for extra info about the request. - @result UIn32 returns kFWResponseComplete on success */ - virtual UInt32 doRead( - UInt16 nodeID, - IOFWSpeed & speed, - FWAddress addr, - UInt32 len, - IOMemoryDescriptor ** buf, - IOByteCount * offset, - IOFWRequestRefCon reqrefcon); -/*! @function doWrite - @abstract A method for processing an address space write request - @param nodeID FireWire Write to nodeID. - @param speed at this 'speed'. - @param addr with FireWire address 'addr'. - @param len write 'len' bytes to nodeID. - @param buf obtain bytes from location given by 'buf'. - @param reqrefcon Can be queried for extra info about the request. - @result UIn32 returns kFWResponseComplete on success */ - virtual UInt32 doWrite( - UInt16 nodeID, - IOFWSpeed& speed, - FWAddress addr, - UInt32 len, - const void* buf, - IOFWRequestRefCon reqrefcon); - -/*! @function contains - @abstract returns number of bytes starting at addr in this space - @result 0 if it doesn't contain the address - */ - virtual UInt32 contains(FWAddress addr); - -/*! @function simpleRWFixed - @abstract Create a Read/Write fixed address space at top of kCSRRegisterSpaceBaseAddressHi. - @param control Points to IOFireWireBus object. - @param addr Points to starting address for the Pseudo Address Space. - @param len Length of the address range. - @param data The virtual address of the first byte in the memory. - @result returns valid IOFWPseudoAddressSpace on success, null on failure */ - static IOFWPseudoAddressSpace * simpleRWFixed( IOFireWireBus *control, FWAddress addr, UInt32 len, const void *data ); - -protected: - - virtual IOFWAddressSpaceAux * createAuxiliary( void ); - -protected: - inline void handleARxReqIntComplete( void ) - { ((IOFWPseudoAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->handleARxReqIntComplete(); } - -public: -/*! @function setARxReqIntCompleteHandler - @abstract Installs a callback to receive notification, when FWIM has completed - ARxReqInt processing and no incoming packets are left in the queue. - @param refcon Client's callback object. - @param handler Client callback to be invoked, at the end of interrupt processing. - @result none. */ - inline void setARxReqIntCompleteHandler( void * refcon, IOFWARxReqIntCompleteHandler handler ) - { ((IOFWPseudoAddressSpaceAux*)fIOFWAddressSpaceExpansion->fAuxiliary)->setARxReqIntCompleteHandler( refcon, handler ); } - -private: - - OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpace, 0); - OSMetaClassDeclareReservedUnused(IOFWPseudoAddressSpace, 1); - -}; - -#endif diff --git a/i386/include/IOKit/firewire/IOFWRegs.h b/i386/include/IOKit/firewire/IOFWRegs.h deleted file mode 100644 index 97c7078..0000000 --- a/i386/include/IOKit/firewire/IOFWRegs.h +++ /dev/null @@ -1,73 +0,0 @@ -/* -* Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. -* -* @APPLE_LICENSE_HEADER_START@ -* -* The contents of this file constitute Original Code as defined in and -* are subject to the Apple Public Source License Version 1.1 (the -* "License"). You may not use this file except in compliance with the -* License. Please obtain a copy of the License at -* http://www.apple.com/publicsource and read it before using this file. -* -* This Original Code and all software distributed under the License are -* distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER -* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, -* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the -* License for the specific language governing rights and limitations -* under the License. -* -* @APPLE_LICENSE_HEADER_END@ -*/ -/* - File: IOFWRegs.h - - Copyright: © 1996-1999 by Apple Computer, Inc., all rights reserved. - -*/ - -#ifndef __IOFWREGS_H__ -#define __IOFWREGS_H__ - -#include <IOKit/firewire/IOFireWireFamilyCommon.h> - -#ifndef NEW_ERROR_CODES - -// -// (!) The following error codes are obsolete... -// Please use the error codes defined in IOFireWireFamilyCommon.h -// - -enum { - inUseErr = -4160, // Item already in use - notFoundErr = -4161, // Item not found - timeoutErr = -4162, // Something timed out - busReconfiguredErr = -4163, // Bus was reconfigured - invalidIDTypeErr = -4166, // Given ID is of an invalid type for the requested operation. - alreadyRegisteredErr = -4168, // Item has already been registered. - disconnectedErr = -4169, // Target of request has been disconnected. - retryExceededErr = -4170, // Retry limit was exceeded. - addressRangeErr = -4171, // Address is not in range. - addressAlignmentErr = -4172, // Address is not of proper alignment. - - multipleTalkerErr = -4180, // Tried to install multiple talkers - channelActiveErr = -4181, // Operation not permitted when channel is active - noListenerOrTalkerErr = -4182, // Every isochronous channel must have one talker and at least - // one listener - noChannelsAvailableErr = -4183, // No supported isochronous channels are available - channelNotAvailableErr = -4184, // Required channel was not available. - invalidIsochPortIDErr = -4185, // An isochronous port ID is invalid. - invalidFWReferenceTypeErr = -4186, // Operation does not support type of given reference ID - separateBusErr = -4187, // Two or more entities are on two or more busses and cannot be associated with eachother. - badSelfIDsErr = -4188, // Received self IDs are bad. - -//zzz Do we own these next ID numbers? - cableVoltageTooLowErr = -4190, // Cable power below device's minimum voltage - cablePowerInsufficientErr = -4191 // Can't grant power request at this time -}; - - -#endif //NEW_ERROR_CODES - -#endif /* __IOFWREGS_H */ - diff --git a/i386/include/IOKit/firewire/IOFWSimpleContiguousPhysicalAddressSpace.h b/i386/include/IOKit/firewire/IOFWSimpleContiguousPhysicalAddressSpace.h deleted file mode 100644 index 606a9b2..0000000 --- a/i386/include/IOKit/firewire/IOFWSimpleContiguousPhysicalAddressSpace.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOFWSIMPLECONTIGUOUSPHYSICALADDRESSSPACE_H_ -#define _IOFWSIMPLECONTIGUOUSPHYSICALADDRESSSPACE_H_ - -#include <IOKit/firewire/IOFWSimplePhysicalAddressSpace.h> - -/*! @class IOFWSimpleContiguousPhysicalAddressSpace -*/ - -class IOFWSimpleContiguousPhysicalAddressSpace : public IOFWSimplePhysicalAddressSpace -{ - OSDeclareDefaultStructors( IOFWSimpleContiguousPhysicalAddressSpace ) - -private: - - void * fSimpleContigPhysSpaceMembers; - - IOReturn cachePhysicalAddress( void ); - -protected: - virtual bool createMemberVariables( void ); - virtual void destroyMemberVariables( void ); - -public: - - virtual bool init( IOFireWireBus * control, vm_size_t size, IODirection direction ); - virtual void free( void ); - - FWAddress getFWAddress( void ); - -private: - OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 0); - OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 1); - OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 2); - OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 3); - OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 4); - OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 5); - OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 6); - OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 7); - OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 8); - OSMetaClassDeclareReservedUnused(IOFWSimpleContiguousPhysicalAddressSpace, 9); - -}; - -#endif diff --git a/i386/include/IOKit/firewire/IOFWSimplePhysicalAddressSpace.h b/i386/include/IOKit/firewire/IOFWSimplePhysicalAddressSpace.h deleted file mode 100644 index 83a76a4..0000000 --- a/i386/include/IOKit/firewire/IOFWSimplePhysicalAddressSpace.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOFWSIMPLEPHYSICALADDRESSSPACE_H_ -#define _IOFWSIMPLEPHYSICALADDRESSSPACE_H_ - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOBufferMemoryDescriptor.h> -#include <IOKit/IODMACommand.h> -#include <IOKit/firewire/IOFWPhysicalAddressSpace.h> - -/*! @class IOFWSimplePhysicalAddressSpace -*/ - -class IOFWSimplePhysicalAddressSpace : public IOFWPhysicalAddressSpace -{ - OSDeclareDefaultStructors( IOFWSimplePhysicalAddressSpace ) - -private: - - void * fSimplePhysSpaceMembers; - - IOReturn allocateMemory( void ); - void deallocateMemory( void ); - -protected: - virtual bool createMemberVariables( void ); - virtual void destroyMemberVariables( void ); - -public: - - virtual bool init( IOFireWireBus * control, vm_size_t size, IODirection direction, bool contiguous = false ); - virtual void free( void ); - - IOVirtualAddress getVirtualAddress( void ); - -private: - OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 0); - OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 1); - OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 2); - OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 3); - OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 4); - OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 5); - OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 6); - OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 7); - OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 8); - OSMetaClassDeclareReservedUnused(IOFWSimplePhysicalAddressSpace, 9); - -}; - -#endif diff --git a/i386/include/IOKit/firewire/IOFWSyncer.h b/i386/include/IOKit/firewire/IOFWSyncer.h deleted file mode 100644 index 0fa497f..0000000 --- a/i386/include/IOKit/firewire/IOFWSyncer.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 1998-2007 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOFWSYNCER_H -#define _IOFWSYNCER_H - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOTypes.h> -#include <IOKit/IOLocks.h> - -class IOFWSyncer : public OSObject -{ - OSDeclareDefaultStructors(IOFWSyncer) - -private: - // The spin lock that is used to guard the 'threadMustStop' variable. - IOSimpleLock *guardLock; - volatile bool threadMustStop; - IOReturn fResult; - virtual void free(); - virtual void privateSignal(); - -public: - - static IOFWSyncer * create(bool twoRetains = true); - - virtual bool init(bool twoRetains); - virtual void reinit(); - virtual IOReturn wait(bool autoRelease = true); - virtual void signal(IOReturn res = kIOReturnSuccess, - bool autoRelease = true); -}; - -#endif /* !_IOFWSYNCER */ - diff --git a/i386/include/IOKit/firewire/IOFWUserObjectExporter.h b/i386/include/IOKit/firewire/IOFWUserObjectExporter.h deleted file mode 100644 index 5d12307..0000000 --- a/i386/include/IOKit/firewire/IOFWUserObjectExporter.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! @class IOFWUserObjectExporter - @discussion An IOFWUserObjectExporter is for internal use only. You should never subclass IOFWUserObjectExporter -*/ - - namespace IOFireWireLib - { - typedef UInt32 UserObjectHandle; - } - -#ifdef KERNEL - - class IOFWUserObjectExporter : public OSObject - { - OSDeclareDefaultStructors (IOFWUserObjectExporter ) - - public : - - typedef void (*CleanupFunction)( const OSObject * obj ); - typedef void (*CleanupFunctionWithExporter)( const OSObject * obj, IOFWUserObjectExporter * ); - - private : - - unsigned fCapacity; - unsigned fObjectCount; - const OSObject ** fObjects; - CleanupFunctionWithExporter * fCleanupFunctions; - IOLock * fLock; - OSObject * fOwner; - - public : - - static IOFWUserObjectExporter * createWithOwner( OSObject * owner ); - bool initWithOwner( OSObject * owner ); - - virtual bool init(); - - virtual void free (); - virtual bool serialize ( OSSerialize * s ) const; - - // me - IOReturn addObject ( OSObject * obj, CleanupFunction cleanup, IOFireWireLib::UserObjectHandle * outHandle ); - void removeObject ( IOFireWireLib::UserObjectHandle handle ); - - // the returned object is retained! This is for thread safety.. if someone else released - // the object from the pool after you got it, you be in for Trouble - // Release the returned value when you're done!! - const OSObject * lookupObject ( IOFireWireLib::UserObjectHandle handle ) const; - const OSObject * lookupObjectForType( IOFireWireLib::UserObjectHandle handle, const OSMetaClass * toType ) const; - void removeAllObjects (); - - void lock () const; - void unlock () const; - - OSObject * getOwner() const; - - const IOFireWireLib::UserObjectHandle lookupHandle ( OSObject * object ) const; - - // don't subclass, but just in case someone does... - - private: - - OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 0); - OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 1); - OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 2); - OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 3); - OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 4); - OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 5); - OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 6); - OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 7); - - }; - -#endif diff --git a/i386/include/IOKit/firewire/IOFWUtils.h b/i386/include/IOKit/firewire/IOFWUtils.h deleted file mode 100644 index 1a0ffc3..0000000 --- a/i386/include/IOKit/firewire/IOFWUtils.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * IOFWUtils.h - * IOFireWireFamily - * - * Created by Niels on Fri Aug 16 2002. - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - */ - -#import <IOKit/IOTypes.h> - -//////////////////////////////////////////////////////////////////////////////// -// -// Useful FireWire utility functions. -// - -#ifdef __cplusplus -extern "C" { -#endif - -UInt16 FWComputeCRC16(const UInt32 *pQuads, UInt32 numQuads); -UInt16 FWUpdateCRC16(UInt16 crc16, UInt32 quad); - -UInt32 AddFWCycleTimeToFWCycleTime( UInt32 cycleTime1, UInt32 cycleTime2 ); -UInt32 SubtractFWCycleTimeFromFWCycleTime( UInt32 cycleTime1, UInt32 cycleTime2); - -void IOFWGetAbsoluteTime( AbsoluteTime * result ); - -#ifdef __cplusplus -} -#endif - diff --git a/i386/include/IOKit/firewire/IOFireWireBus.h b/i386/include/IOKit/firewire/IOFireWireBus.h deleted file mode 100644 index 053bfe4..0000000 --- a/i386/include/IOKit/firewire/IOFireWireBus.h +++ /dev/null @@ -1,373 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_IOFIREWIREBUS_H -#define _IOKIT_IOFIREWIREBUS_H - -#include <IOKit/IOService.h> -#include <IOKit/firewire/IOFWIsochChannel.h> -#include <IOKit/firewire/IOFWAddressSpace.h> -#include <IOKit/firewire/IOFWCommand.h> -#include <IOKit/firewire/IOFireWireFamilyCommon.h> - -extern const OSSymbol *gFireWireROM; -extern const OSSymbol *gFireWireNodeID; -extern const OSSymbol *gFireWireSelfIDs; -extern const OSSymbol *gFireWireSpeed; -extern const OSSymbol *gFireWireUnit_Spec_ID; -extern const OSSymbol *gFireWireUnit_SW_Version; -extern const OSSymbol *gFireWireVendor_ID; -extern const OSSymbol *gFireWire_GUID; -extern const OSSymbol *gFireWireVendor_Name; -extern const OSSymbol *gFireWireProduct_Name; -extern const OSSymbol *gFireWireModel_ID; -extern const OSSymbol *gFireWireTDM; - -class IOFireWireDevice; -class IOLocalConfigDirectory; -class IOFWLocalIsochPort; -class IOFireWirePowerManager; -class IOFireWireBus; -class IOFWDCLPool; -class IOFWSimpleContiguousPhysicalAddressSpace; -class IOFWSimplePhysicalAddressSpace; -class IOFWUserObjectExporter; - -#pragma mark - - -/*! - @class IOFireWireBusAux -*/ - -class IOFireWireBusAux : public OSObject -{ - OSDeclareAbstractStructors(IOFireWireBusAux) - - friend class IOFireWireBus; - - protected: - - /*! - @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - - struct ExpansionData { }; - - /*! - @var reserved - Reserved for future use. (Internal use only) - */ - - ExpansionData * reserved; - - public : - - virtual IOFWDCLPool * createDCLPool ( unsigned capacity ) const = 0 ; - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 32); - virtual UInt8 getMaxRec( void ) = 0; - - virtual UInt64 getFireWirePhysicalAddressMask( void ) = 0; - virtual UInt32 getFireWirePhysicalAddressBits( void ) = 0; - virtual UInt64 getFireWirePhysicalBufferMask( void ) = 0; - virtual UInt32 getFireWirePhysicalBufferBits( void ) = 0; - - virtual IOFWSimpleContiguousPhysicalAddressSpace * createSimpleContiguousPhysicalAddressSpace( vm_size_t size, IODirection direction ) = 0; - virtual IOFWSimplePhysicalAddressSpace * createSimplePhysicalAddressSpace( vm_size_t size, IODirection direction ) = 0; - - virtual IOFWUserObjectExporter * getSessionRefExporter( void ) = 0; - - private: - OSMetaClassDeclareReservedUsed(IOFireWireBusAux, 0); - OSMetaClassDeclareReservedUsed(IOFireWireBusAux, 1); - OSMetaClassDeclareReservedUsed(IOFireWireBusAux, 2); - OSMetaClassDeclareReservedUsed(IOFireWireBusAux, 3); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 4); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 5); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 6); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 7); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 8); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 9); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 10); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 11); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 12); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 13); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 14); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 15); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 16); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 17); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 18); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 19); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 20); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 21); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 22); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 23); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 24); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 25); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 26); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 27); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 28); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 29); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 30); - OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 31); - -}; - -#pragma mark - - -/*! - @class IOFireWireBus - @abstract IOFireWireBus is a public class the provides access to - general FireWire functionality... -*/ - -class IOFireWireBus : public IOService -{ - OSDeclareAbstractStructors(IOFireWireBus) - -public: - - struct DCLTaskInfoAux - { - unsigned version ; - union // u - { - struct // v0 - { - IOMemoryMap * bufferMemoryMap ; // This field required to get physical addresses to program DMA. - // If NULL, we try to make the map ourselves. - // If you created a buffer memory descriptor - // for your program's buffers, just call map() on it - // and pass the returned object here... - } v0 ; - - struct // v1 - { - IOMemoryMap * bufferMemoryMap ; // same as 'bufferMemoryMap' from version 0, above. - - IOWorkLoop * workloop ; // A workloop on which to run callbacks for this port.. - // Can be NULL to use FireWire isochronous workloop... - // The workloop will be retained by the program object. - } v1 ; - - struct - { - IOMemoryMap * bufferMemoryMap ; // same as 'bufferMemoryMap' from version 0, above. - - IOWorkLoop * workloop ; // A workloop on which to run callbacks for this port.. - // Can be NULL to use FireWire isochronous workloop... - // The workloop will be retained by the program object. - IOFWIsochPortOptions options ; // extra options - } v2 ; - } u ; - } ; - - // this struct has been redefined for our next generation isochronous architecture, - // but is backwards compatible with the old definition.. This means we should - // be safe when an old-style driver is loaded.. - // To use DCLTaskInfo (see createLocalIsochPort) make sure all 'unused' fields are set to 0 or NULL - // and that auxInfo points to a valid DCLTaskInfoAux struct, defined above. - - struct DCLTaskInfo - { - task_t unused0 ; - vm_address_t unused1 ; - UInt32 unused2 ; - vm_address_t unused3 ; - UInt32 unused4 ; - void (*unused5)(void) ; - DCLTaskInfoAux * auxInfo ; // Refcon for user call - } ; - - static const IORegistryPlane * gIOFireWirePlane; - - IOFireWireBusAux * fAuxiliary; - - // Create an Isochronous Channel object - virtual IOFWIsochChannel *createIsochChannel( - bool doIRM, UInt32 bandwidth, IOFWSpeed prefSpeed, - IOFWIsochChannel::ForceStopNotificationProc stopProc=NULL, - void *stopRefCon=NULL) = 0; - - /*! @function createLocalIsochPort - @abstract Create a local isochronous port to run the given DCL program - @param talking Pass true to create a talker port; pass false to create a listener port. - @param opcodes A pointer to your DCL program (linked list of DCLCommand structs) - To use an IOFWDCL/IOFWDCLPool program, pass the DCLCommand returned by - IOFWDCLPool::getProgram(). - @param info (Optional) Pointer to DCLTaskInfo struct containing additional - configuration information. If you have an IOMemoryMap for your DCL program data buffers, - pass it here. You can also pass an IOWorkLoop if you want to use your own - workloop to handle callbacks for the created port object. - @param startEvent Specifies a bus condition on which the port should start receiving/sending packets - Must be kFWDCLImmediateEvent, kFWDCLCycleEvent, or kFWDCLSyBitsEvent. - Pass kFWDCLImmediateEvent to start without waiting when start() is called. Pass kFWDCLCycleEvent - to start() transmitting at a specified bus cycle time. Pass kFWDCLSyBitsEvent (receive only) - to start receiving packets once an isochronous packet with a specified sync field arrives. - @param startState Pass the value for the desired start condition, as specified by 'startEvent' - kFWDCLImmediateEvent: set to 0 - kFWDCLCycleEvent: the cycle timer value on which to start processing packets. For talker - ports, This value will be masked by 'startMask' and packet processing will be begin on the - next cycle whose lowest bits match the masked value. For listener ports, pass a 15-bit value - containg to the low order two bits of cycleSeconds and the 13-bit cycleCount on which to start - processing packets. - kFWDCLSyBitsEvent: The value of the sync field on which to start receive packets. The value will be masked - by 'startMask'. For DCLCommand based isoch ports, processing will begin on the first received packet - that has an isochronous header sync field matching 'startState'. For IOFWDCL/IOFWDCLPool based - ports, processing will pause on each IOFWDCL that has wait set to true until a packet that has - an isochronous header sync field matching 'startState' is received. - @result Returns an IOFWLocalIsochPort on success.*/ - virtual IOFWLocalIsochPort *createLocalIsochPort(bool talking, - DCLCommand *opcodes, DCLTaskInfo *info = 0, - UInt32 startEvent = 0, UInt32 startState = 0, UInt32 startMask = 0) = 0; - - virtual IOReturn getCycleTime(UInt32 &cycleTime) = 0; - virtual IOReturn getBusCycleTime(UInt32 &busTime, UInt32 &cycleTime) = 0; - - // Methods to manipulate the local Config ROM - virtual IOReturn AddUnitDirectory(IOLocalConfigDirectory *unitDir) = 0; - virtual IOReturn RemoveUnitDirectory(IOLocalConfigDirectory *unitDir) = 0; - - // Cause a bus reset - virtual IOReturn resetBus() = 0; - - // Convert a firewire nodeID into the IOFireWireDevice for it - virtual IOFireWireDevice * nodeIDtoDevice(UInt32 generation, UInt16 nodeID) = 0; - - // Execute specified function on workloop after specified delay - // Returned command is for delay, call it's cancel() function to cancel timeout. - virtual IOFWDelayCommand * createDelayedCmd(UInt32 uSecDelay, FWBusCallback func, void *refcon) = 0; - - virtual IOFWPhysicalAddressSpace *createPhysicalAddressSpace(IOMemoryDescriptor *mem) = 0; - virtual IOFWPseudoAddressSpace *createPseudoAddressSpace(FWAddress *addr, UInt32 len, - FWReadCallback reader, FWWriteCallback writer, void *refcon) = 0; - - - // Extract info about the async request - virtual bool isLockRequest(IOFWRequestRefCon refcon) = 0; - virtual bool isQuadRequest(IOFWRequestRefCon refcon) = 0; - virtual UInt32 getExtendedTCode(IOFWRequestRefCon refcon) = 0; - - // How big (as a power of two) can packets sent to/received from the node be? - virtual int maxPackLog ( bool forSend, UInt16 nodeAddress) const = 0; - - // How big (as a power of two) can packets sent from A to B be? - virtual int maxPackLog ( UInt16 nodeA, UInt16 nodeB) const = 0; - - // Force given node to be root (via root holdoff Phy packet) - virtual IOReturn makeRoot ( UInt32 generation, UInt16 nodeID) = 0; - - // Create address space at fixed address in initial register space - virtual IOFWPseudoAddressSpace * createInitialAddressSpace ( UInt32 addressLo, UInt32 len, - FWReadCallback reader, FWWriteCallback writer, void *refcon) = 0; - - // Get address space object for given address, if any - virtual IOFWAddressSpace * getAddressSpace(FWAddress address) = 0; - - // Extract info about the async request - was the request ack'ed complete already? - virtual bool isCompleteRequest(IOFWRequestRefCon refcon) = 0; - - virtual IOFWAsyncStreamCommand * createAsyncStreamCommand( UInt32 generation, - UInt32 channel, UInt32 sync, UInt32 tag, IOMemoryDescriptor *hostMem, - UInt32 size, int speed,FWAsyncStreamCallback completion=NULL, void *refcon=NULL) = 0; - virtual UInt32 hopCount(UInt16 nodeAAddress, UInt16 nodeBAddress ) = 0; - virtual UInt32 hopCount(UInt16 nodeAAddress ) = 0; - virtual IOFireWirePowerManager * getBusPowerManager( void ) = 0; - -protected: - - virtual IOFireWireBusAux * createAuxiliary( void ) = 0; - - public : - - inline IOFWDCLPool * createDCLPool ( UInt32 capacity = 0 ) { return fAuxiliary->createDCLPool ( capacity ) ; } - inline UInt8 getMaxRec( void ) { return fAuxiliary->getMaxRec(); } - - // get the physical addressing limitations for this controller - - // returns the physical mask for memory addressable by the bus and this controller's DMA engine - // intended for use with IOBufferMemoryDescriptor::inTaskWithPhysicalMask() - // all current hardware is 32 bit --- currently returns 0x00000000FFFFFFFF - // this API is intended for allocating physical buffers. - // it will not return more than 48 bits so that buffer addresses can be turned into FWAddresses - inline UInt64 getFireWirePhysicalAddressMask( void ) - { return fAuxiliary->getFireWirePhysicalAddressMask(); } - - // returns a count of the maximum addressing bits supported by the bus and this controller - // intended for use with IODMACommand::withSpecification() - // all current hardware is 32 bit --- currently returns 32 - // this API is intended for allocating physical buffers. - // it will not return more than 48 bits so that buffer addresses can be turned into FWAddresses - inline UInt32 getFireWirePhysicalAddressBits( void ) - { return fAuxiliary->getFireWirePhysicalAddressBits(); } - - // returns the physical mask for memory addressable by this controller's DMA engine - // intended for use with IOBufferMemoryDescriptor::inTaskWithPhysicalMask() - // all current hardware is 32 bit --- currently returns 0x00000000FFFFFFFF - // this API is to allocate isoch and other buffers that don't need to be addressable by the bus - // it may someday return as high 64 bits - inline UInt64 getFireWirePhysicalBufferMask( void ) - { return fAuxiliary->getFireWirePhysicalBufferMask(); } - - // returns a count of the maximum addressing bits supported by this controller - // intended for use with IODMACommand::withSpecification() - // all current hardware is 32 bit --- currently returns 32 - // this API is to allocate isoch and other buffers that don't need to be addressable by the bus - // it may someday return as high 64 bits - inline UInt32 getFireWirePhysicalBufferBits( void ) - { return fAuxiliary->getFireWirePhysicalBufferBits(); } - - inline IOFWSimpleContiguousPhysicalAddressSpace * createSimpleContiguousPhysicalAddressSpace( vm_size_t size, IODirection direction ) - { return fAuxiliary->createSimpleContiguousPhysicalAddressSpace( size, direction ); } - - inline IOFWSimplePhysicalAddressSpace * createSimplePhysicalAddressSpace( vm_size_t size, IODirection direction ) - { return fAuxiliary->createSimplePhysicalAddressSpace( size, direction ); } - - virtual IOFWAsyncStreamCommand * createAsyncStreamCommand( UInt32 generation, - UInt32 channel, UInt32 sync, UInt32 tag, IOMemoryDescriptor *hostMem, - UInt32 size, int speed,FWAsyncStreamCallback completion, void *refcon, bool failOnReset) = 0; - - inline IOFWUserObjectExporter * getSessionRefExporter( void ) - { return fAuxiliary->getSessionRefExporter(); } - - private: - - OSMetaClassDeclareReservedUsed(IOFireWireBus, 0); - OSMetaClassDeclareReservedUsed(IOFireWireBus, 1); - OSMetaClassDeclareReservedUsed(IOFireWireBus, 2); - OSMetaClassDeclareReservedUsed(IOFireWireBus, 3); - OSMetaClassDeclareReservedUsed(IOFireWireBus, 4); - OSMetaClassDeclareReservedUsed(IOFireWireBus, 5); - OSMetaClassDeclareReservedUsed(IOFireWireBus, 6); - OSMetaClassDeclareReservedUsed(IOFireWireBus, 7); - -}; - -#endif /* ! _IOKIT_IOFIREWIREBUS_H */ - diff --git a/i386/include/IOKit/firewire/IOFireWireController.h b/i386/include/IOKit/firewire/IOFireWireController.h deleted file mode 100644 index e2f3ae1..0000000 --- a/i386/include/IOKit/firewire/IOFireWireController.h +++ /dev/null @@ -1,1089 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - -#ifndef _IOKIT_IOFIREWIRECONTROLLER_H -#define _IOKIT_IOFIREWIRECONTROLLER_H - -#ifndef FIREWIREPRIVATE -#warning Please do not include this file. Include IOFireWireBus.h instead. -#endif - -#include <IOKit/IOEventSource.h> -#include <IOKit/firewire/IOFireWireBus.h> -#include <IOKit/firewire/IOFireWireFamilyCommon.h> -#include <IOKit/firewire/IOFireWireIRMAllocation.h> -#include <IOKit/firewire/IOFWPHYPacketListener.h> -#include <IOKit/firewire/IOFireWireMultiIsochReceive.h> - -class OSData; -class IOWorkLoop; -class IOEventSource; -class IOFWQEventSource; -class IOTimerEventSource; -class IOMemoryDescriptor; -class IOFireWireController; -class IOFWAddressSpace; -class IOFWPseudoAddressSpace; -class IOFireWireNub; -class IOFireWireDevice; -class IOFireWireDeviceAux; -class IOFireWireUnit; -class IODCLProgram; -class IOLocalConfigDirectory; -class IOFireWireLink; -class IOFireWireSBP2ORB; -class IOFireWireSBP2Login; -class IOFireWireROMCache; -class IOFireWireLocalNode; -class IOFWWorkLoop; -class IOFireWireIRM; -class IOFireWirePowerManager; -class IOFWSimplePhysicalAddressSpace; -class IOFWSimpleContiguousPhysicalAddressSpace; -class IOFWAsyncStreamReceiver; -class IOFWAsyncStreamListener; -class IOFWUserVectorCommand; -class IOFWAsyncPHYCommand; -class IOFWPHYPacketListener; -class IOFWUserPHYPacketListener; - -#if FIRELOGCORE -class IOFireLog; -class IOFireLogPublisher; -#endif - -const UInt32 kMaxWaitForValidSelfID = 20; // Still invalid SelfID after 20 retries - -// Phy packet defs. - -enum -{ - kFWPhyPacketID = FWBitRange (0, 1), - kFWPhyPacketIDPhase = FWBitRangePhase (0, 1), - - kFWPhyPacketPhyID = FWBitRange (2, 7), - kFWPhyPacketPhyIDPhase = FWBitRangePhase (2, 7) -}; - -enum -{ - kSelfIDPacketSize = 8, - kMaxSelfIDs = 4 // SelfID 0,1,3,8 -}; - -enum -{ - kFWConfigurationPacketID = 0, - kFWLinkOnPacketID = 1, - kFWSelfIDPacketID = 2 -}; - -enum -{ - kFWPhyConfigurationR = FW_BIT(8), - kFWPhyConfigurationT = FW_BIT(9), - kFWPhyConfigurationGapCnt = FWBitRange (10, 15), - kFWPhyConfigurationGapCntPhase = FWBitRangePhase (10, 15) -}; - -enum -{ - kFWSelfIDPortStatusChild = 3, - kFWSelfIDPortStatusParent = 2, - kFWSelfIDPortStatusNotConnected = 1, - kFWSelfIDPortStatusNotPresent = 0, - - kFWSelfIDNoPower = 0, - kFWSelfIDSelfPowered15W = 1, - kFWSelfIDSelfPowered30W = 2, - kFWSelfIDSelfPowered45W = 3, - kFWSelfIDBusPowered1W = 4, - kFWSelfIDBusPowered3W = 5, - kFWSelfIDBusPowered6W = 6, - kFWSelfIDBusPowered10W = 7, - - kFWSelfIDPhyID = kFWPhyPacketPhyID,//zzz do we need or want this? - kFWSelfIDPhyIDPhase = kFWPhyPacketPhyIDPhase, - kFWSelfIDM = FW_BIT(31), - - kFWSelfID0L = FW_BIT(9), - kFWSelfID0GapCnt = FWBitRange (10, 15), - kFWSelfID0GapCntPhase = FWBitRangePhase (10, 15), - kFWSelfID0SP = FWBitRange (16, 17), - kFWSelfID0SPPhase = FWBitRangePhase (16, 17), - kFWSelfID0Del = FWBitRange (18, 19), - kFWSelfID0DelPhase = FWBitRangePhase (18, 19), - kFWSelfID0C = FW_BIT(20), - kFWSelfID0Pwr = FWBitRange (21, 23), - kFWSelfID0PwrPhase = FWBitRangePhase (21, 23), - kFWSelfID0P0 = FWBitRange (24, 25), - kFWSelfID0P0Phase = FWBitRangePhase (24, 25), - kFWSelfID0P1 = FWBitRange (26, 27), - kFWSelfID0P1Phase = FWBitRangePhase (26, 27), - kFWSelfID0P2 = FWBitRange (28, 29), - kFWSelfID0P2Phase = FWBitRangePhase (28, 29), - kFWSelfID0I = FW_BIT(30), - - kFWSelfIDPacketType = FW_BIT(8), - kFWSelfIDNN = FWBitRange (9, 11), - kFWSelfIDNNPhase = FWBitRangePhase (9, 11), - kFWSelfIDNPa = FWBitRange (14, 15), - kFWSelfIDNPaPhase = FWBitRangePhase (14, 15), - kFWSelfIDNPb = FWBitRange (16, 17), - kFWSelfIDNPbPhase = FWBitRangePhase (16, 17), - kFWSelfIDNPc = FWBitRange (18, 19), - kFWSelfIDNPcPhase = FWBitRangePhase (18, 19), - kFWSelfIDNPd = FWBitRange (20, 21), - kFWSelfIDNPdPhase = FWBitRangePhase (20, 21), - kFWSelfIDNPe = FWBitRange (22, 23), - kFWSelfIDNPePhase = FWBitRangePhase (22, 23), - kFWSelfIDNPf = FWBitRange (24, 25), - kFWSelfIDNPfPhase = FWBitRangePhase (24, 25), - kFWSelfIDNPg = FWBitRange (26, 27), - kFWSelfIDNPgPhase = FWBitRangePhase (26, 27), - kFWSelfIDNPh = FWBitRange (28, 29), - kFWSelfIDNPhPhase = FWBitRangePhase (28, 29), - kFWSelfIDMore = FW_BIT(31) -}; - -// Primary packet defs. -enum -{ - kFWPacketTCode = FWBitRange (24, 27), - kFWPacketTCodePhase = FWBitRangePhase (24, 27) -}; - - -enum -{ - kFWAsynchSpd = FWBitRange (14, 15), - kFWAsynchSpdPhase = FWBitRangePhase (14, 15), - - kFWAsynchTLabel = FWBitRange (16, 21), - kFWAsynchTLabelPhase = FWBitRangePhase (16, 21), - kFWAsynchTTotal = ((0xffffffff & kFWAsynchTLabel) >> kFWAsynchTLabelPhase)+1, - kFWAsynchRt = FWBitRange (22, 23), - kFWAsynchRtPhase = FWBitRangePhase (22, 23), - kFWAsynchNew = 0, - kFWAsynchRetryA = 2, - kTIAsycnhRetryB = 3, - - kFWAsynchPriority = FWBitRange (28, 31), - kFWAsynchPriorityPhase = FWBitRangePhase (28, 31), - - kFWAsynchDestinationID = FWBitRange (0, 15), - kFWAsynchDestinationIDPhase = FWBitRangePhase (0, 15), - - kFWAsynchSourceID = FWBitRange (0, 15), - kFWAsynchSourceIDPhase = FWBitRangePhase (0, 15), - - kFWAsynchDestinationOffsetHigh = FWBitRange (16, 31), - kFWAsynchDestinationOffsetHighPhase = FWBitRangePhase (16, 31), - - kFWAsynchDestinationOffsetLow = FWBitRange (0, 31), - kFWAsynchDestinationOffsetLowPhase = FWBitRangePhase (0, 31), - - kFWAsynchDataLength = FWBitRange (0, 15), - kFWAsynchDataLengthPhase = FWBitRangePhase (0, 15), - - kFWAsynchExtendedTCode = FWBitRange (16, 31), - kFWAsynchExtendedTCodePhase = FWBitRangePhase (16, 31), - - kFWAsynchAckSent = FWBitRange (28, 31), - kFWAsynchAckSentPhase = FWBitRangePhase (28, 31), - - kFWAsynchRCode = FWBitRange (16, 19), - kFWAsynchRCodePhase = FWBitRangePhase (16, 19) -}; - -enum -{ - kFWTCodeWriteQuadlet = 0, - kFWTCodeWriteBlock = 1, - kFWTCodeWriteResponse = 2, - kFWTCodeReadQuadlet = 4, - kFWTCodeReadBlock = 5, - kFWTCodeReadQuadletResponse = 6, - kFWTCodeReadBlockResponse = 7, - kFWTCodeCycleStart = 8, - kFWTCodeLock = 9, - kFWTCodeIsochronousBlock = 10, - kFWTCodeLockResponse = 11, - kFWTCodePHYPacket = 14 -}; - -enum -{ - kFWExtendedTCodeMaskSwap = 1, - kFWExtendedTCodeCompareSwap = 2, - kFWExtendedTCodeFetchAdd = 3, - kFWExtendedTCodeLittleAdd = 4, - kFWExtendedTCodeBoundedAdd = 5, - kFWExtendedTCodeWrapAdd = 6, - kFWExtendedTCodeVendorDependent = 7 -}; - -// debug boot-arg constants -enum -{ - kFWDebugIgnoreNodeNone = 0xFFFFFFFF -}; - -struct AsyncPendingTrans { - IOFWAsyncCommand * fHandler; - IOFWCommand * fAltHandler; - int fTCode; - bool fInUse; -}; - -struct IOFWNodeScan { - IOFireWireController * fControl; - FWAddress fAddr; - UInt32 fBuf[5]; // Enough for bus info block - UInt32 * fSelfIDs; - int fNumSelfIDs; - int fROMSize; - int fRead; - IOFWReadQuadCommand * fCmd; - IOFWCompareAndSwapCommand * fLockCmd; - UInt32 generation; - UInt32 fIRMBitBucketOld; - UInt32 fIRMBitBucketNew; - bool fIRMisBad; - bool speedChecking; - bool fContenderNeedsChecking; - bool fIRMCheckingRead; - bool fIRMCheckingLock; - int fRetriesBumped; - bool fMustNotBeRoot; -}; - - -typedef struct IOFWDuplicateGUIDStruct IOFWDuplicateGUIDRec; -struct IOFWDuplicateGUIDStruct - { - IOFWDuplicateGUIDRec * fNextGUID; - CSRNodeUniqueID fGUID; - UInt32 fLastGenSeen; -}; - - -// IOFireWireDuplicateGUIDList -// -// A little class for keeping track of GUIDs which where we have observed 2 nodes with -// the same GUID - -class IOFireWireDuplicateGUIDList : public OSObject -{ - OSDeclareDefaultStructors(IOFireWireDuplicateGUIDList); - -private: - IOFWDuplicateGUIDRec * fFirstGUID; - -protected: - virtual void free(); - -public: - - static IOFireWireDuplicateGUIDList * create( void ); - - void addDuplicateGUID( CSRNodeUniqueID guid, UInt32 gen ); - void removeDuplicateGUID( CSRNodeUniqueID guid ); - - bool findDuplicateGUID( CSRNodeUniqueID guid, UInt32 gen ); - -}; - -#define kMaxPendingTransfers kFWAsynchTTotal - -class IOFireWireController; - -#pragma mark - - -/*! - @class IOFireWireControllerAux -*/ - -class IOFireWireControllerAux : public IOFireWireBusAux -{ - OSDeclareDefaultStructors(IOFireWireControllerAux) - - friend class IOFireWireController; - -protected: - - IOFireWireController * fPrimary; - - UInt8 fMaxRec; - - UInt8 fPadding; - UInt16 fPadding2; - - IOFWUserObjectExporter * fSessionRefExporter; - - /*! - @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - - struct ExpansionData { }; - - /*! - @var reserved - Reserved for future use. (Internal use only) - */ - - ExpansionData * reserved; - - virtual bool init ( - IOFireWireController * primary ); - virtual void free (); - virtual IOFWDCLPool * createDCLPool ( unsigned capacity ) const ; - virtual UInt8 getMaxRec( void ); - - virtual UInt64 getFireWirePhysicalAddressMask( void ); - virtual UInt32 getFireWirePhysicalAddressBits( void ); - virtual UInt64 getFireWirePhysicalBufferMask( void ); - virtual UInt32 getFireWirePhysicalBufferBits( void ); - - virtual IOFWSimpleContiguousPhysicalAddressSpace * createSimpleContiguousPhysicalAddressSpace( vm_size_t size, IODirection direction ); - virtual IOFWSimplePhysicalAddressSpace * createSimplePhysicalAddressSpace( vm_size_t size, IODirection direction ); - - virtual IOFWUserObjectExporter * getSessionRefExporter( void ); - -private: - OSMetaClassDeclareReservedUnused(IOFireWireControllerAux, 0); - OSMetaClassDeclareReservedUnused(IOFireWireControllerAux, 1); - OSMetaClassDeclareReservedUnused(IOFireWireControllerAux, 2); - OSMetaClassDeclareReservedUnused(IOFireWireControllerAux, 3); - OSMetaClassDeclareReservedUnused(IOFireWireControllerAux, 4); - OSMetaClassDeclareReservedUnused(IOFireWireControllerAux, 5); - OSMetaClassDeclareReservedUnused(IOFireWireControllerAux, 6); - OSMetaClassDeclareReservedUnused(IOFireWireControllerAux, 7); - -}; - - -#pragma mark - - -/*! @class IOFireWireController -*/ -class IOFireWireController : public IOFireWireBus -{ - OSDeclareAbstractStructors(IOFireWireController) - -protected: - enum busState { - kStarting = 0, - kAsleep, // Link off, zzzzzz - kWaitingBusReset, - kWaitingSelfIDs, // Bus has been reset, no selfIDs yet - kWaitingScan, // Got selfIDs, waiting a bit before hitting lame devices - kScanning, // Reading node ROMs - kWaitingPrune, // Read all ROMs, pausing before pruning missing devices - kRunning, // Normal happy state, - kWaitingBusResetStart // bus reset is desired, but not yet sent to the fwim - }; - - enum ResetState - { - kResetStateResetting, - kResetStateDisabled, - kResetStateArbitrated - }; - - enum - { - kDisablePhysicalAccess = (1 << 0) - }; - - struct timeoutQ: public IOFWCmdQ - { - IOTimerEventSource *fTimer; - virtual void headChanged(IOFWCommand *oldHead); - void busReset(); - }; - - struct pendingQ: public IOFWCmdQ - { - IOFWQEventSource *fSource; - virtual void headChanged(IOFWCommand *oldHead); - }; - - friend class IOFireWireLink; - friend class IOFireWireDevice; - friend class IOFireWireDeviceAux; - friend class IOFWAddressSpace; - friend class IOFWAddressSpaceAux; - friend class IOFWPseudoAddressSpace; - friend class IOFireWireSBP2ORB; - friend class IOFireWireSBP2Login; - friend class IOFWLocalIsochPort; - friend class IOFWCommand; - friend class IOFireWireUnit; - friend class IOFireWirePCRSpace; - friend class IOFireWireROMCache; - friend class IOFWAsyncStreamCommand; - friend class IOFireWireAVCLocalUnit; - friend class IOFireWireAVCUnit; - friend class IOFireWireAVCCommand; - friend class IOFireWirePowerManager; - friend class IOFWWriteQuadCommand; - friend class IOFWWriteCommand; - friend class IOFWCompareAndSwapCommand; - friend class IOFWAsyncCommand; - friend class IOFireWireAVCTargetSpace; - friend class AppleFWOHCI; - friend class IOFireWireNub; - friend class IOFWAsyncStreamListener; - friend class IOFireWireLocalNode; - friend class IOFireWireIRMAllocation; - friend class IOFWUserVectorCommand; - friend class IOFWAsyncPHYCommand; - friend class IOFWUserPHYPacketListener; - friend class IOFWAsyncStreamReceiver; - -#if FIRELOGCORE - friend class IOFireLog; -#endif - - IOFireWireLink * fFWIM; - IOFWWorkLoop * fWorkLoop; - IOTimerEventSource * fTimer; - OSSet * fLocalAddresses; // Collection of local adress spaces - OSIterator * fSpaceIterator; // Iterator over local addr spaces - - OSSet * fAllocatedChannels; // Need to be informed of bus resets - OSIterator * fAllocChannelIterator; // Iterator over channels - - OSSet * fIRMAllocations; // Need to be informed of bus resets - OSIterator * fIRMAllocationsIterator; // Iterator over channels - OSSet * fIRMAllocationsAllocated; // Need to be informed of bus resets - - // Bus management variables (although we aren't a FireWire Bus Manager...) - AbsoluteTime fResetTime; // Time of last reset - UInt32 fBusGeneration; // ID of current bus topology. - UInt16 fLocalNodeID; // ID of local node, ie. this computer - UInt16 fRootNodeID; // ID of root, ie. highest node id in use. - UInt16 fIRMNodeID; // ID of Isochronous resource manager, or kFWBadNodeID - bool fBusMgr; // true if at least one node is bus manager capable - IORegistryEntry * fNodes[kFWMaxNodesPerBus]; // FireWire nodes on this bus - UInt32 * fNodeIDs[kFWMaxNodesPerBus+1]; // Pointer to SelfID list for each node - // +1 so we know how many selfIDs the last node has - - UInt32 fGapCount; // What we think the gap count should be - //UInt8 fSpeedCodes[(kFWMaxNodesPerBus+1)*kFWMaxNodesPerBus]; - UInt8 fSpeedVector[((kFWMaxNodesPerBus+1)*kFWMaxNodesPerBus)/2]; - // Max speed between two nodes - busState fBusState; // Which state are we in? - int fNumROMReads; // Number of device ROMs we are still reading - // SelfIDs - int fNumSelfIDs; // Total number of SelfID packets - UInt32 fSelfIDs[kMaxSelfIDs*kFWMaxNodesPerBus]; - - // The local device's Config ROM - UInt32 fROMHeader[5]; // More or less fixed header and bus info block - IOLocalConfigDirectory * fRootDir; // Local Config ROM root directory. - - // log base 2 of maximum packet size the FWIM can send/receive - // Normally calculated from bus info block. - int fMaxSendLog; - int fMaxRecvLog; - - IOFWAddressSpace * fROMAddrSpace; - IOMemoryDescriptor * fBadReadResponse; // Send back easily identified bad data to out of range addrs. - - // Array for outstanding requests (up to 64) - AsyncPendingTrans fTrans[kMaxPendingTransfers]; - int fLastTrans; - - // queue for executing commands that may timeout - timeoutQ fTimeoutQ; - - // queue for commands that can't execute yet - pendingQ fPendingQ; - - // queue for async commands interrupted by bus reset - IOFWCmdQ fAfterResetHandledQ; - - // Command to change bus state after a delay. - IOFWDelayCommand * fDelayedStateChangeCmd; - bool fDelayedStateChangeCmdNeedAbort; - - UInt32 fDelayedPhyPacket; - bool fBusResetScheduled; - ResetState fBusResetState; - IOFWDelayCommand * fBusResetStateChangeCmd; - UInt32 fBusResetDisabledCount; - -#if FIRELOGCORE - IOFireLogPublisher * fFireLogPublisher; -#else - void * fFireLogPublisher; -#endif - - OSData * fAllocatedAddresses; - - UInt32 fDevicePruneDelay; - - IOFWPhysicalAccessMode fPhysicalAccessMode; - IOFWSecurityMode fSecurityMode; - IONotifier * fKeyswitchNotifier; - - IOFireWireIRM * fIRM; - IOFireWirePowerManager * fBusPowerManager; - - bool fGapCountMismatch; - - bool fUseHalfSizePackets; - bool fRequestedHalfSizePackets; - - IOFWNodeScan * fScans[kFWMaxNodesPerBus]; - IOFireWireDuplicateGUIDList * fGUIDDups; - - bool fDelegateCycleMaster; - bool fBadIRMsKnown; - - UInt32 fPreviousGap; - - UInt32 fOutOfTLabels; - UInt32 fOutOfTLabels10S; - UInt32 fOutOfTLabelsThreshold; - -#ifdef LEGACY_SHUTDOWN - IONotifier * fPowerEventNotifier; -#endif - - bool fStarted; - - UInt32 fIOCriticalSectionCount; - UInt32 fHubPort; - UInt32 fDebugIgnoreNode; - - OSSet * fLocalAsyncStreamReceivers; - OSIterator * fAsyncStreamReceiverIterator; - - bool fInstantiated; - - IOReturn fStartStatus; - UInt32 fWaitingForSelfID; - - UInt32 fForcedRootNodeID; - bool fNodeMustBeRootFlag; - bool fNodeMustNotBeRootFlag; - - UInt32 fForcedGapCount; - bool fForcedGapFlag; - - OSSet * fPHYPacketListeners; - OSIterator * fPHYPacketListenersIterator; - - bool fDSLimited; - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - static void clockTick(OSObject *, IOTimerEventSource *); - static void readROMGlue(void *refcon, IOReturn status, - IOFireWireNub *device, IOFWCommand *fwCmd); - static void delayedStateChange(void *refcon, IOReturn status, - IOFireWireBus *bus, IOFWBusCommand *fwCmd); - - virtual void processBusReset(); - virtual void processSelfIDs(UInt32 *IDs, int numIDs, UInt32 *ownIDs, int numOwnIDs); - virtual void processTimeout(IOTimerEventSource *src); - virtual void processRcvPacket( UInt32 *data, int numQuads, IOFWSpeed speed ); - virtual void processWriteRequest(UInt16 sourceID, UInt32 tlabel, - UInt32 *hdr, void *buf, int len, IOFWSpeed speed); - virtual void processLockRequest(UInt16 sourceID, UInt32 tlabel, - UInt32 *hdr, void *buf, int len, IOFWSpeed speed); - - // Process read from a local address, return rcode - virtual UInt32 doReadSpace(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, - IOMemoryDescriptor **buf, IOByteCount * offset, IODMACommand **dma_command, - IOFWRequestRefCon refcon); - - // Process write to a local address, return rcode - virtual UInt32 doWriteSpace(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, - const void *buf, IOFWRequestRefCon refcon); - - // Process lock to a local address, return rcode - UInt32 doLockSpace(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 inlen, - const UInt32 *newVal, UInt32 &outLen, UInt32 *oldVal, - UInt32 extType, IOFWRequestRefCon refcon); - - virtual void updatePlane(); - virtual void startBusScan(); - - // Called when all devices on bus have been examined - virtual void finishedBusScan(); - - virtual void buildTopology(bool doFWPlane); - - virtual void readDeviceROM(IOFWNodeScan *refCon, IOReturn status); - - virtual IOReturn UpdateROM(); - virtual IOReturn allocAddress(IOFWAddressSpace *space); - virtual void freeAddress(IOFWAddressSpace *space); - - IOFireWireBusAux * createAuxiliary( void ); - -public: - - // Initialization - virtual bool init(IOFireWireLink *fwim); - virtual void free(); - virtual bool start(IOService *provider); - virtual void stop( IOService * provider ); - virtual bool finalize( IOOptionBits options ); - virtual bool requestTerminate( IOService * provider, IOOptionBits options ); - - // Power management - virtual IOReturn setPowerState ( unsigned long powerStateOrdinal, IOService* whatDevice ); - - // Implement IOService::getWorkLoop - virtual IOWorkLoop *getWorkLoop() const; - - // Allocate struct for tracking a transaction - virtual AsyncPendingTrans *allocTrans(IOFWAsyncCommand *cmd=NULL); - virtual void freeTrans(AsyncPendingTrans *trans); - - // Really public methods - - virtual IOReturn getCycleTime(UInt32 &cycleTime); - virtual IOReturn getBusCycleTime(UInt32 &busTime, UInt32 &cycleTime); - - // Methods to manipulate the local Config ROM - virtual IOReturn AddUnitDirectory(IOLocalConfigDirectory *unitDir); - virtual IOReturn RemoveUnitDirectory(IOLocalConfigDirectory *unitDir); - - // Cause a bus reset - virtual IOReturn resetBus(); - - // Send async request packets - virtual IOReturn asyncRead( UInt32 generation, - UInt16 nodeID, - UInt16 addrHi, - UInt32 addrLo, - int speed, - int label, - int size, - IOFWAsyncCommand * cmd ); - - virtual IOReturn asyncWrite( UInt32 generation, - UInt16 nodeID, - UInt16 addrHi, - UInt32 addrLo, - int speed, - int label, - IOMemoryDescriptor * buf, - IOByteCount offset, - int size, - IOFWAsyncCommand * cmd ); - - /* DEPRECATED */ virtual IOReturn asyncWrite( UInt32 generation, - /* DEPRECATED */ UInt16 nodeID, - /* DEPRECATED */ UInt16 addrHi, - /* DEPRECATED */ UInt32 addrLo, - /* DEPRECATED */ int speed, - /* DEPRECATED */ int label, - /* DEPRECATED */ void * data, - /* DEPRECATED */ int size, - /* DEPRECATED */ IOFWAsyncCommand * cmd ); - - /* DEPRECATED */ virtual IOReturn asyncLock( UInt32 generation, - /* DEPRECATED */ UInt16 nodeID, - /* DEPRECATED */ UInt16 addrHi, - /* DEPRECATED */ UInt32 addrLo, - /* DEPRECATED */ int speed, - /* DEPRECATED */ int label, - /* DEPRECATED */ int type, - /* DEPRECATED */ void * data, - /* DEPRECATED */ int size, - /* DEPRECATED */ IOFWAsyncCommand * cmd); - - - // Send async read response packets - // useful for pseudo address spaces that require servicing outside the FireWire work loop. - virtual IOReturn asyncReadResponse( UInt32 generation, - UInt16 nodeID, - int speed, - IOMemoryDescriptor * buf, - IOByteCount offset, - int len, - IOFWRequestRefCon refcon ); - - virtual IOReturn asyncLockResponse( UInt32 generation, - UInt16 nodeID, - int speed, - IOMemoryDescriptor * buf, - IOByteCount offset, - int len, - IOFWRequestRefCon refcon ); - - // Try to fix whatever might have caused the other device to not respond - virtual IOReturn handleAsyncTimeout(IOFWAsyncCommand *cmd); - - // Convert a firewire nodeID into the IOFireWireDevice for it - virtual IOFireWireDevice * nodeIDtoDevice(UInt32 generation, UInt16 nodeID); - - // Add/remove a channel from the list informed of bus resets - virtual void addAllocatedChannel(IOFWIsochChannel *channel); - virtual void removeAllocatedChannel(IOFWIsochChannel *channel); - - // Add/remove a IRM allocation from the list informed of bus resets - virtual void addIRMAllocation(IOFireWireIRMAllocation *irmAllocation); - virtual void removeIRMAllocation(IOFireWireIRMAllocation *irmAllocation); - - // Create an Isochronous Channel object - // doIRM = true => allocate channel and bandwith in Isochronous Resource Manager - // packetSize packet size (in bytes), used to calculate bandwidth needed. - virtual IOFWIsochChannel *createIsochChannel( - bool doIRM, UInt32 packetSize, IOFWSpeed prefSpeed, - FWIsochChannelForceStopNotificationProc stopProc=NULL, - void *stopRefCon=NULL); - - // Create a local isochronous port to run the given DCL program - // if task is 0, the DCL program is for the kernel task, - // otherwise all DCL pointers are valid in the specified task. - // opcodes is also pointer valid in the specified task. - virtual IOFWLocalIsochPort *createLocalIsochPort(bool talking, - DCLCommand* opcodes, DCLTaskInfo *info = 0, - UInt32 startEvent = 0, UInt32 startState = 0, UInt32 startMask = 0); - - // Execute specified function on workloop after specified delay - // Returned command is for delay, call it's cancel() function to cancel timeout. - virtual IOFWDelayCommand * createDelayedCmd(UInt32 uSecDelay, FWBusCallback func, void *refcon); - - virtual IOFWPhysicalAddressSpace *createPhysicalAddressSpace(IOMemoryDescriptor *mem); - virtual IOFWPseudoAddressSpace *createPseudoAddressSpace(FWAddress *addr, UInt32 len, - FWReadCallback reader, FWWriteCallback writer, void *refcon); - - // Extract info about the async request - virtual bool isLockRequest(IOFWRequestRefCon refcon); - virtual bool isQuadRequest(IOFWRequestRefCon refcon); - virtual UInt32 getExtendedTCode(IOFWRequestRefCon refcon); - - // Inline accessors for protected member variables - IOFWCmdQ &getTimeoutQ(); - IOFWCmdQ &getPendingQ(); - IOFWCmdQ &getAfterResetHandledQ(); - IOFireWireLink * getLink() const; - - IOLocalConfigDirectory *getRootDir() const; - bool checkGeneration(UInt32 gen) const; - UInt32 getGeneration() const; - UInt16 getLocalNodeID() const; - IOReturn getIRMNodeID(UInt32 &generation, UInt16 &id); - - const AbsoluteTime * getResetTime() const; - - IOFWSpeed FWSpeed(UInt16 nodeAddress) const; - IOFWSpeed FWSpeed(UInt16 nodeA, UInt16 nodeB) const; - - // How big (as a power of two) can packets sent to/received from the node be? - virtual int maxPackLog(bool forSend, UInt16 nodeAddress) const; - - // How big (as a power of two) can packets sent from A to B be? - virtual int maxPackLog(UInt16 nodeA, UInt16 nodeB) const; - - // Force given node to be root (via root holdoff Phy packet) - virtual IOReturn makeRoot(UInt32 generation, UInt16 nodeID) ; - - virtual IOFWPseudoAddressSpace *createInitialAddressSpace(UInt32 addressLo, UInt32 len, - FWReadCallback reader, FWWriteCallback writer, void *refcon); - - virtual IOFWAddressSpace *getAddressSpace(FWAddress address); - - // Extract info about the async request - was the request ack'ed complete already? - virtual bool isCompleteRequest(IOFWRequestRefCon refcon); - - // Are we currently scanning the bus? - bool scanningBus() const; - -protected: - - void openGate(); - void closeGate(); - -protected: - virtual void doBusReset( void ); - static void resetStateChange( void *refcon, IOReturn status, - IOFireWireBus *bus, IOFWBusCommand *fwCmd); - -public: - virtual IOReturn disableSoftwareBusResets( void ); - virtual void enableSoftwareBusResets( void ); - - virtual IOFWAsyncStreamCommand * createAsyncStreamCommand( UInt32 generation, - UInt32 channel, UInt32 sync, UInt32 tag, IOMemoryDescriptor *hostMem, - UInt32 size, int speed,FWAsyncStreamCallback completion, void *refcon); - - virtual IOReturn asyncStreamWrite(UInt32 generation, - int speed, int tag, int sync, int channel, - IOMemoryDescriptor *buf, IOByteCount offset, - int size, IOFWAsyncStreamCommand *cmd); - -protected: - bool inGate(); - - virtual IOReturn allocatePseudoAddress(FWAddress *addr, UInt32 lenDummy); - virtual void freePseudoAddress(FWAddress addr, UInt32 lenDummy); - - virtual IORegistryEntry * createDummyRegistryEntry( IOFWNodeScan *scan ); - - static IOFireWireLocalNode * getLocalNode(IOFireWireController *control); - - virtual void setPhysicalAccessMode( IOFWPhysicalAccessMode mode ); - virtual IOFWPhysicalAccessMode getPhysicalAccessMode( void ); - virtual void physicalAccessProcessBusReset( void ); - virtual void setNodeIDPhysicalFilter( UInt16 nodeID, bool state ); - - virtual void initSecurity( void ); - virtual void freeSecurity( void ); - static bool serverKeyswitchCallback( void * target, void * refCon, IOService * service, IONotifier * notifier ); - virtual void setSecurityMode( IOFWSecurityMode mode ); - virtual IOFWSecurityMode getSecurityMode( void ); - - virtual IOReturn createTimeoutQ( void ); - virtual void destroyTimeoutQ( void ); - virtual IOReturn createPendingQ( void ); - virtual void destroyPendingQ( void ); - - virtual UInt32 countNodeIDChildren( UInt16 nodeID, int hub_port = 0, int * hubChildRemainder = NULL, bool * hubParentFlag = NULL ); - -public: - virtual UInt32 hopCount(UInt16 nodeAAddress, UInt16 nodeBAddress ); - virtual UInt32 hopCount(UInt16 nodeAAddress ); - - virtual IOFireWirePowerManager * getBusPowerManager( void ); - -protected: - virtual void handleARxReqIntComplete(); - - virtual IOReturn asyncLock( UInt32 generation, - UInt16 nodeID, - UInt16 addrHi, - UInt32 addrLo, - int speed, - int label, - int type, - IOMemoryDescriptor * buf, - IOByteCount offset, - int size, - IOFWAsyncCommand * cmd ); - - virtual IOReturn asyncWrite( UInt32 generation, - UInt16 nodeID, - UInt16 addrHi, - UInt32 addrLo, - int speed, - int label, - IOMemoryDescriptor * buf, - IOByteCount offset, - int size, - IOFWAsyncCommand * cmd, - IOFWWriteFlags flags ); - -protected: - bool delayedStateCommandInUse() const; - void enterBusResetDisabledState( ); - - virtual UInt32 getPortNumberFromIndex( UInt16 index ); - - virtual bool checkForDuplicateGUID(IOFWNodeScan *scan, CSRNodeUniqueID *currentGUIDs ); - virtual void updateDevice(IOFWNodeScan *scan ); - virtual bool AssignCycleMaster(); - -public: - - IOReturn clipMaxRec2K(Boolean clipMaxRec ); - void setNodeSpeed( UInt16 nodeAddress, IOFWSpeed speed ); - void useHalfSizePackets( void ); - void disablePhyPortOnSleepForNodeID( UInt32 nodeID ); - - IOReturn handleAsyncCompletion( IOFWCommand *cmd, IOReturn status ); - void processCycle64Int(); - -#ifdef LEGACY_SHUTDOWN - static IOReturn systemShutDownHandler( void * target, void * refCon, - UInt32 messageType, IOService * service, - void * messageArgument, vm_size_t argSize ); -#else - virtual void systemWillShutdown( IOOptionBits specifier ); -#endif - - IOReturn beginIOCriticalSection( void ); - void endIOCriticalSection( void ); - -protected: - IOReturn poweredStart( void ); - void setNodeSpeed( UInt16 nodeA, UInt16 nodeB, UInt8 speed ); - void setNodeSpeed( UInt16 nodeAddress, UInt8 speed ); - -public: - bool isPhysicalAccessEnabledForNodeID( UInt16 nodeID ); - - // Allocate IRM bandwidth if the specified generation is the current FireWire generation. - IOReturn allocateIRMBandwidthInGeneration(UInt32 bandwidthUnits, UInt32 generation) ; - - // Release IRM bandwidth if the specified generation is the current FireWire generation. - IOReturn releaseIRMBandwidthInGeneration(UInt32 bandwidthUnits, UInt32 generation) ; - - // Allocate IRM channel if the specified generation is the current FireWire generation. - IOReturn allocateIRMChannelInGeneration(UInt8 isochChannel, UInt32 generation) ; - - // Release IRM channel if the specified generation is the current FireWire generation. - IOReturn releaseIRMChannelInGeneration(UInt8 isochChannel, UInt32 generation) ; - - // Create an IOFireWireIRMAllocation object which can be used to allocate isoch resources that are automatically reallocated after bus-resets! - IOFireWireIRMAllocation *createIRMAllocation(Boolean releaseIRMResourcesOnFree = true, - IOFireWireIRMAllocation::AllocationLostNotificationProc allocationLostProc = NULL, - void *pLostNotificationProcRefCon = NULL); - - IOFWAsyncStreamListener *createAsyncStreamListener( UInt32 channel, FWAsyncStreamReceiveCallback proc, void *refcon ); - - void removeAsyncStreamListener( IOFWAsyncStreamListener *listener ); - - IOFWSpeed getBroadcastSpeed(){ return FWSpeed( fLocalNodeID ); }; - -private: - - IOFWAsyncStreamReceiver *allocAsyncStreamReceiver( UInt32 channel, FWAsyncStreamReceiveCallback proc, void *refcon ); - - IOFWAsyncStreamReceiver *getAsyncStreamReceiver( UInt32 channel ); - - void freeAllAsyncStreamReceiver(); - - void activateAsyncStreamReceivers(); - - void deactivateAsyncStreamReceivers(); - -protected: - IOService *findKeyswitchDevice( void ); - void suspendBus( void ); - -public: - virtual IOReturn asyncRead( UInt32 generation, - UInt16 nodeID, - UInt16 addrHi, - UInt32 addrLo, - int speed, - int label, - int size, - IOFWAsyncCommand * cmd, - IOFWReadFlags flags ); - - void checkProgress( void ); - - void terminateDevice( IOFireWireDevice * device ); - - void nodeMustBeRoot( UInt32 nodeID ); - - void nodeMustNotBeRoot( UInt32 nodeID ); - - void setGapCount( UInt32 gapCount ); - - IOReturn asyncPHYPacket( UInt32 generation, - UInt32 data, - UInt32 data2, - IOFWAsyncPHYCommand * cmd ); - - IOFWAsyncPHYCommand * createAsyncPHYCommand( UInt32 generation, - UInt32 data1, - UInt32 data2, - FWAsyncPHYCallback completion, - void * refcon, - bool failOnReset ); - -private: - AsyncPendingTrans * allocTrans( IOFWAsyncCommand * cmd, IOFWCommand * altcmd ); - -public: - - IOReturn activatePHYPacketListener( IOFWPHYPacketListener * listener ); - void deactivatePHYPacketListener( IOFWPHYPacketListener * listener ); - - IOFWPHYPacketListener * createPHYPacketListener( FWPHYPacketCallback proc, void * refcon ); - -private: - void processPHYPacket( UInt32 data1, UInt32 data2 ); - void enterLoggingMode( void ); - -public: - IOReturn getCycleTimeAndUpTime( UInt32 &cycleTime, UInt64 &uptime ); - -protected: - void removeAsyncStreamReceiver( IOFWAsyncStreamReceiver *receiver ); - -public: - - // Create a multi-isoch-receive listener - IOFireWireMultiIsochReceiveListener * createMultiIsochReceiveListener(UInt32 channel, - FWMultiIsochReceiveListenerCallback callback, - void *pCallbackRefCon, - FWMultiIsochReceiveListenerParams *pListenerParams = NULL); - - // Activate a multi-isoch-receive listener - IOReturn activateMultiIsochReceiveListener(IOFireWireMultiIsochReceiveListener *pListener); - - // Deactivate a multi-isoch-receive listener - IOReturn deactivateMultiIsochReceiveListener(IOFireWireMultiIsochReceiveListener *pListener); - - // Call for client to specify he is done with a multi-isoch receiver isoch packet - void clientDoneWithMultiIsochReceivePacket(IOFireWireMultiIsochReceivePacket *pPacket); - -public: - virtual IOFWAsyncStreamCommand * createAsyncStreamCommand( UInt32 generation, - UInt32 channel, UInt32 sync, UInt32 tag, IOMemoryDescriptor *hostMem, - UInt32 size, int speed,FWAsyncStreamCallback completion, void *refcon, bool failOnReset); - -private: - void addToIRMAllocationSet(IOFireWireIRMAllocation *anObject); - void removeFromIRMAllocationSet(IOFireWireIRMAllocation *anObject); - -protected: - OSMetaClassDeclareReservedUnused(IOFireWireController, 0); - OSMetaClassDeclareReservedUnused(IOFireWireController, 1); - OSMetaClassDeclareReservedUnused(IOFireWireController, 2); - OSMetaClassDeclareReservedUnused(IOFireWireController, 3); - OSMetaClassDeclareReservedUnused(IOFireWireController, 4); - OSMetaClassDeclareReservedUnused(IOFireWireController, 5); - OSMetaClassDeclareReservedUnused(IOFireWireController, 6); - OSMetaClassDeclareReservedUnused(IOFireWireController, 7); - OSMetaClassDeclareReservedUnused(IOFireWireController, 8); - -}; - -#endif /* ! _IOKIT_IOFIREWIRECONTROLLER_H */ diff --git a/i386/include/IOKit/firewire/IOFireWireDevice.h b/i386/include/IOKit/firewire/IOFireWireDevice.h deleted file mode 100644 index a68e5a2..0000000 --- a/i386/include/IOKit/firewire/IOFireWireDevice.h +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - /*! @header - This header contains the definition of the <code>IOFireWireDevice</code> and <code>IOFireWireDeviceAux</code> classes. - An <code>IOFireWireDevice</code> object represents a FireWire device in the I/O Registry. - It is strongly recommended that you write applications that access FireWire devices rather than in-kernel device drivers. - For more information on how to do this, see {@linkdoc //apple_ref/doc/uid/TP40000969 FireWire Device Interface Guide}. - @indexgroup FireWire - */ -#ifndef _IOKIT_IOFIREWIREDEVICE_H -#define _IOKIT_IOFIREWIREDEVICE_H - -#include <IOKit/firewire/IOFireWireNub.h> - -class IOFireWireROMCache; - -struct IOFWNodeScan; -struct RomScan; - -class IOFireWireDevice; - -#pragma mark - - -/*! @class IOFireWireDeviceAux - @discussion An IOFireWireDeviceAux is for internal use only. You should never subclass IOFireWireDeviceAux -*/ - -class IOFireWireDeviceAux : public IOFireWireNubAux -{ - OSDeclareDefaultStructors(IOFireWireDeviceAux) - - friend class IOFireWireDevice; - -protected: - - UInt32 fUnitCount; - IOFWSpeed fMaxSpeed; - OSSet * fOpenUnitSet; - AbsoluteTime fResumeTime; - - /*! - @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - - struct ExpansionData { }; - - /*! - @var reserved - Reserved for future use. (Internal use only) - */ - - ExpansionData * reserved; - - virtual bool init( IOFireWireDevice * primary ); - - virtual void free(); - - virtual bool isTerminated( void ); - - virtual void setTerminationState( TerminationState state ); - - void setMaxSpeed( IOFWSpeed speed ); - - void setUnitCount( UInt32 count ); - - UInt32 getUnitCount( void ); - - bool isPhysicalAccessEnabled( void ); - - virtual IOFWSimpleContiguousPhysicalAddressSpace * createSimpleContiguousPhysicalAddressSpace( vm_size_t size, IODirection direction ); - - virtual IOFWSimplePhysicalAddressSpace * createSimplePhysicalAddressSpace( vm_size_t size, IODirection direction ); - - OSSet * getOpenUnitSet() const; - - void latchResumeTime( void ); - - AbsoluteTime getResumeTime( void ); - -private: - OSMetaClassDeclareReservedUnused(IOFireWireDeviceAux, 0); - OSMetaClassDeclareReservedUnused(IOFireWireDeviceAux, 1); - OSMetaClassDeclareReservedUnused(IOFireWireDeviceAux, 2); - OSMetaClassDeclareReservedUnused(IOFireWireDeviceAux, 3); -}; - -#pragma mark - -/*! @class IOFireWireDevice - @abstract Represents a FireWire device. - @discussion The FireWire family tries to read the configuration ROM of each device on the FireWire bus. For each device that responds with - its bus information block, the FireWire family publishes an <code>IOFireWireDevice</code> object in the I/O Registry. An - <code>IOFireWireDevice</code> object keeps track of the device's node ID, copies config ROM properties into the object's property - list, and scans the config ROM for unit directories, publishing an <code>IOFireWireUnit</code> object for each unit directory it finds. -*/ - -class IOFireWireDevice : public IOFireWireNub -{ - OSDeclareDefaultStructors(IOFireWireDevice) - - friend class IOFireWireController; - friend class IOFireWireDeviceAux; - -protected: - - enum RegistrationState - { - kDeviceRegistered, - kDeviceNeedsRegisterService, - kDeviceNotRegistered - }; - - IOFireWireROMCache *fDeviceROM; - bool fOpenFromDevice; - UInt32 fOpenFromUnitCount; - UInt32 fROMGeneration; - IORecursiveLock *fROMLock; - RegistrationState fRegistrationState; - UInt32 fROMReadRetry; - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - static void readROMDirGlue(void *refcon, IOReturn status, - IOFireWireNub *device, IOFWCommand *fwCmd); - static void readROMThreadFunc(void *arg); - - static void terminateDevice(void *arg); - - void processROM(RomScan *romScan); - - virtual void free(); - -public: - virtual IOReturn message( UInt32 type, IOService * provider, void * argument ); - - virtual bool handleOpen( IOService * forClient, IOOptionBits options, void * arg ); - - virtual void handleClose( IOService * forClient, IOOptionBits options ); - - virtual bool handleIsOpen( const IOService * forClient ) const; - -protected: - virtual IOReturn cacheROM(OSData *rom, UInt32 offset, const UInt32 *&romBase); - - virtual const UInt32 * getROMBase(); - - virtual void setNodeROM(UInt32 generation, UInt16 localNodeID, const IOFWNodeScan *info); - -public: - virtual bool matchPropertyTable(OSDictionary * table); - - /*! @function init - @abstract Initializes the nub. - @param propTable Property table passed to the standard nub initialization. - @param scan Pointer to the node scan structure. - @result Returns <code>true</code> if initialization was successful; <code>false</code> otherwise. - */ - virtual bool init(OSDictionary * propTable, const IOFWNodeScan *scan); - - virtual bool attach(IOService * provider ); - - virtual bool finalize( IOOptionBits options ); - - /*! @function setNodeFlags - @abstract Sets the node's characteristics. - @param flags Refer to "node flags" in IOFireWireFamilyCommon.h. - */ - virtual void setNodeFlags( UInt32 flags ); - - /*! @function clearNodeFlags - @abstract Resets the node's characteristics. - @param flags Refer to "node flags" in IOFireWireFamilyCommon.h. - */ - virtual void clearNodeFlags( UInt32 flags ); - - /*! @function getNodeFlags - @abstract Retrieves the node's characteristics. - @param flags Refer to "node flags" in IOFireWireFamilyCommon.h. - @result UInt32 The flags set for a particular node. - */ - virtual UInt32 getNodeFlags( void ); - -protected: - virtual IOReturn configureNode( void ); - -public: - /*! @function createPhysicalAddressSpace - @abstract Creates local physical FireWire address spaces for the device to access. - @param mem Memory area allocated to back the physical access by Link hardware. - @result A valid <code>IOFWPhysicalAddressSpace</code> object on success; NULL on failure. - */ - virtual IOFWPhysicalAddressSpace *createPhysicalAddressSpace(IOMemoryDescriptor *mem); - - /*! @function createPseudoAddressSpace - @abstract Creates local pseudo FireWire address spaces for the device to access. - @param addr The FireWire address that is mapped to the pseudo address access. - @param len Size of the address space to allocate. - @param reader Read callback, when the device reads from this address space. - @param writer Write callback, when the device writes to this address space. - @param refcon Client's callback object returned during reader/writer callbacks. - @result A valid <code>IOFWPseudoAddressSpace</code> object on success; NULL on failure. - */ - virtual IOFWPseudoAddressSpace *createPseudoAddressSpace(FWAddress *addr, UInt32 len, - FWReadCallback reader, FWWriteCallback writer, void *refcon); - -protected: - virtual IOReturn readRootDirectory( IOConfigDirectory * directory, OSDictionary * propTable ); - - virtual IOReturn processRootDirectory( OSDictionary * propTable ); - - virtual IOReturn readUnitDirectories( IOConfigDirectory * directory, OSSet * unitInfo ); - - virtual IOReturn processUnitDirectories( OSSet * unitSet ); - - virtual void setRegistrationState( RegistrationState fRegistrationState ); - - virtual void preprocessDirectories( OSDictionary * rootPropTable, OSSet * unitSet ); - - virtual void configurePhysicalFilter( void ); - -protected: - virtual IOFireWireNubAux * createAuxiliary( void ); - -public: - inline bool isTerminated( void ) - { return ((IOFireWireDeviceAux*)fAuxiliary)->isTerminated(); } - - /*! @function setMaxSpeed - @abstract Sets the maximum speed for this node. - @param speed Maximum speed. Refer to "bus speed numbers" in IOFireWireFamilyCommon.h. - */ - inline void setMaxSpeed( IOFWSpeed speed ) - { ((IOFireWireDeviceAux*)fAuxiliary)->setMaxSpeed( speed ); } - -protected: - inline void setUnitCount( UInt32 count ) - { ((IOFireWireDeviceAux*)fAuxiliary)->setUnitCount( count ); } - - inline OSSet * getOpenUnitSet( void ) const - { return ((IOFireWireDeviceAux*)fAuxiliary)->getOpenUnitSet(); } - -public: - /*! @function getUnitCount - @abstract Returns number of units attached to this device. - @result UInt32 The number of units attached to this device. - */ - inline UInt32 getUnitCount( void ) - { return ((IOFireWireDeviceAux*)fAuxiliary)->getUnitCount(); } - -protected: - inline AbsoluteTime getResumeTime( void ) - { return ((IOFireWireDeviceAux*)fAuxiliary)->getResumeTime(); } - - inline void latchResumeTime( void ) - { ((IOFireWireDeviceAux*)fAuxiliary)->latchResumeTime(); } - -private: - OSMetaClassDeclareReservedUnused(IOFireWireDevice, 0); - OSMetaClassDeclareReservedUnused(IOFireWireDevice, 1); - -}; - -#endif /* ! _IOKIT_IOFIREWIREDEVICE_H */ diff --git a/i386/include/IOKit/firewire/IOFireWireFamilyCommon.h b/i386/include/IOKit/firewire/IOFireWireFamilyCommon.h deleted file mode 100644 index ceb426d..0000000 --- a/i386/include/IOKit/firewire/IOFireWireFamilyCommon.h +++ /dev/null @@ -1,1235 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * IOFireWireFamilyCommon.h - * IOFireWireUserClient/IOFireWireFamily - * - * Created by NWG on Fri Apr 28 2000. - * Copyright (c) 2000-2001 Apple Computer, Inc. All rights reserved. - * - */ -/* - $Log: IOFireWireFamilyCommon.h,v $ - Revision 1.79 2008/07/15 01:29:44 collin - <rdar://problem/5859733> & <rdar://problem/5843668> - - Revision 1.78 2008/05/08 02:33:22 collin - more K64 - - Revision 1.77 2008/04/24 00:01:39 collin - more K640 - - Revision 1.76 2007/12/05 04:52:08 collin - integrate chex workaround - - Revision 1.75 2007/08/31 20:29:06 collin - fixed 5437835 - - Revision 1.74 2007/04/24 21:40:23 arulchan - headerdoc changes - - Revision 1.73 2007/04/24 21:28:24 arulchan - changes for headerdoc - - Revision 1.72 2007/04/13 19:37:01 calderon - Integrated FireWireKPrintf implemented - - Revision 1.71 2007/03/14 18:41:43 collin - *** empty log message *** - - Revision 1.70 2007/02/28 23:10:13 ayanowit - Another IRMAllocation fix. - - Revision 1.69 2007/02/20 01:25:28 collin - *** empty log message *** - - Revision 1.68 2007/02/17 00:26:51 collin - *** empty log message *** - - Revision 1.67 2007/02/15 19:42:07 ayanowit - For 4369537, eliminated support for legacy DCL SendPacketWithHeader, since it didn't work anyway, and NuDCL does support it. - - Revision 1.66 2007/02/15 01:23:39 arulchan - changes in AssignCycleMaster - - Revision 1.65 2007/02/09 04:44:06 collin - *** empty log message *** - - Revision 1.64 2007/01/26 20:52:31 ayanowit - changes to user-space isoch stuff to support 64-bit apps. - - Revision 1.63 2007/01/16 01:41:02 gecko1 - 4159728 Add improved async lock based check for bad IRMs - - Revision 1.62 2007/01/15 23:29:05 arulchan - Fixed Skipped Packet Handler Notifications - - Revision 1.61 2007/01/12 22:15:14 arulchan - Added flag kIOFWEnableBeingRoot - - Revision 1.60 2007/01/10 22:14:44 calderon - Fixed 4046607 Propagate vendor/model from IIDC UnitDepedantInfoDir - Fixed some null termination shinanigans in getIndexValue(string) - - Revision 1.59 2007/01/08 18:47:19 ayanowit - More 64-bit changes for isoch. - - Revision 1.58 2006/07/07 20:18:25 calderon - 4227201: SpeedMap and HopCount table reductions. - - Revision 1.57 2006/04/03 21:29:48 collin - *** empty log message *** - - Revision 1.56 2006/02/09 00:21:51 niels - merge chardonnay branch to tot - - Revision 1.55.4.1 2005/08/06 01:31:31 collin - *** empty log message *** - - Revision 1.55 2005/03/12 03:27:51 collin - *** empty log message *** - - Revision 1.54 2005/01/12 06:34:53 collin - *** empty log message *** - - Revision 1.53 2004/05/04 22:52:19 niels - *** empty log message *** - - Revision 1.52 2004/03/26 01:42:53 gecko1 - Add code to disable any port directly connected to an iPod when we go to sleep. - - Revision 1.51 2004/03/05 00:33:59 calderon - Fixed 3570909 - FireWire - iokit_fw_errs should be defined in hex - All decimal #define errors in header changed to hex - - Revision 1.50 2003/11/07 21:01:18 niels - Revision 1.49 2003/10/21 01:16:41 collin - Revision 1.48 2003/10/17 00:25:24 collin - Revision 1.47 2003/10/15 02:19:45 collin - Revision 1.46 2003/07/22 10:49:47 niels - Revision 1.45 2003/07/21 06:52:59 niels - merge isoch to TOT - - Revision 1.44.4.5 2003/07/21 06:44:44 niels - Revision 1.44.4.4 2003/07/18 00:17:42 niels - Revision 1.44.4.3 2003/07/14 22:08:53 niels - Revision 1.44.4.2 2003/07/09 21:24:01 niels - Revision 1.44.4.1 2003/07/01 20:54:07 niels - isoch merge - - Revision 1.44 2003/03/17 01:05:22 collin - Revision 1.43 2003/03/07 01:26:06 collin - Revision 1.42 2003/02/19 22:33:17 niels - add skip cycle DCL - - Revision 1.41 2003/02/18 00:14:01 collin - Revision 1.40 2003/02/17 21:47:52 collin - Revision 1.39 2002/12/05 19:08:37 niels - remove trailing commas from enums in IOFireWireFamilyCommon.h - - Revision 1.38 2002/11/01 20:45:57 collin - add enhanced IRM with support for the BROADCAST_CHANNEL register - - Revision 1.37 2002/10/01 02:40:27 collin - security mode support - - Revision 1.36 2002/09/25 21:17:14 collin - fix headers again. - - Revision 1.35 2002/09/25 00:27:23 niels - flip your world upside-down - - Revision 1.34 2002/09/12 22:41:53 niels - add GetIRMNodeID() to user client - -*/ - -/*! @header IOFireWireFamilyCommon.h -This file contains useful definitions for working with FireWire -in the kernel and in user space -*/ - -#ifndef __IOFireWireFamilyCommon_H__ -#define __IOFireWireFamilyCommon_H__ - -#ifdef KERNEL -#ifndef __IOKIT_IOTYPES_H - #include <IOKit/IOTypes.h> -#endif -#else -#include <IOKit/IOKitLib.h> -#endif - -//#define LEGACY_SHUTDOWN - -#define FW_OLD_DCL_DEFS -#define FW_OLD_BIT_DEFS - -// ================================================================= -// bit ranges and fields -// ================================================================= -#pragma mark - -#pragma mark BITS - -// FireWire bit defs. - -#define BIT(x) ( 1 << (x) ) -#define FW_BIT(x) ( 1 << (31 - (x) ) ) - -#define FWBitRange(start, end) \ -( \ - ((((UInt32) 0xFFFFFFFF) << (start)) >> \ - ((start) + (31 - (end)))) << \ - (31 - (end)) \ -) - -#define FWBitRangePhase(start, end) \ - (31 - (end)) - -#define BitRange(start, end) \ -( \ - ((((UInt32) 0xFFFFFFFF) << (31 - (end))) >> \ - ((31 - (end)) + (start))) << \ - (start) \ -) - - -#define BitRangePhase(start, end) \ - (start) - -// ================================================================= -// FireWire messages & errors -// ================================================================= -#pragma mark - -#pragma mark MESSAGES AND ERRORS - -#define iokit_fw_err(return) (sys_iokit|sub_iokit_firewire|return) - -// e0008010 -> 0xe000801f Response codes from response packets - -// Base of Response error codes -#define kIOFireWireResponseBase iokit_fw_err(0x10) - -// e0008020 -- Bus reset during command execution (current bus generation does -// not match that specified in command.) -#define kIOFireWireBusReset (kIOFireWireResponseBase+kFWResponseBusResetError) - -// e0008001 -- Can't find requested entry in ROM -#define kIOConfigNoEntry iokit_fw_err(0x1) - -// e0008002 -- In pending queue waiting to execute -#define kIOFireWirePending iokit_fw_err(0x2) - -// e0008003 -- Last DCL callback of program (internal use) -#define kIOFireWireLastDCLToken iokit_fw_err(0x3) - -// e0008004 -#define kIOFireWireConfigROMInvalid iokit_fw_err(0x4) - -// e0008005 -#define kIOFireWireAlreadyRegistered iokit_fw_err(0x5) - -// e0008006 -#define kIOFireWireMultipleTalkers iokit_fw_err(0x6) - -// e0008007 -#define kIOFireWireChannelActive iokit_fw_err(0x7) - -// e0008008 -#define kIOFireWireNoListenerOrTalker iokit_fw_err(0x8) - -// e0008009 -#define kIOFireWireNoChannels iokit_fw_err(0x9) - -// e000800A -#define kIOFireWireChannelNotAvailable iokit_fw_err(0xA) - -// e000800B -#define kIOFireWireSeparateBus iokit_fw_err(0xB) - -// e000800C -#define kIOFireWireBadSelfIDs iokit_fw_err(0xC) - -// e000800D -#define kIOFireWireLowCableVoltage iokit_fw_err(0xD) - -// e000800E -#define kIOFireWireInsufficientPower iokit_fw_err(0xE) - -// e000800f -#define kIOFireWireOutOfTLabels iokit_fw_err(0xF) - -// NOTE: errors 16Ñ31 used for address space response codes.. (see above) - -// e0008101 -#define kIOFireWireBogusDCLProgram iokit_fw_err(0x101) - -// e0008102 -#define kIOFireWireTalkingAndListening iokit_fw_err(0x102) - -// e0008103 -#define kIOFireWireHardwareSlept iokit_fw_err(0x103) - -// e0008104 // let's resume here... - -// e0008104 -- In the middle of completing -#define kIOFireWireCompleting iokit_fw_err(0x104) - -// e0008105 -- Invalid Response Length -#define kIOFireWireInvalidResponseLength iokit_fw_err(0x105) - -// e0008106 -- Isoch Bandwidth Not Available -#define kIOFireWireIsochBandwidthNotAvailable iokit_fw_err(0x106) - - -// e00087d0 -#define kIOFWMessageServiceIsRequestingClose (UInt32)iokit_fw_err(0x7D0) -#define kIOFWMessagePowerStateChanged (UInt32)iokit_fw_err(0x7D1) -#define kIOFWMessageTopologyChanged (UInt32)iokit_fw_err(0x7D2) -// ================================================================= -// Pseudo address space response codes -// ================================================================= -#pragma mark - -#pragma mark PSEDUO ADDRESS SPACE RESPONSE CODES -enum -{ - kFWResponseComplete = 0, // OK! - kFWResponseConflictError = 4, // Resource conflict, may retry - kFWResponseDataError = 5, // Data not available - kFWResponseTypeError = 6, // Operation not supported - kFWResponseAddressError = 7, // Address not valid in target device - kFWResponseBusResetError = 16, // Pseudo response generated locally - kFWResponsePending = 17 // Pseudo response, real response sent later. -}; - -// -// Pseudo address space response codes -// -enum -{ - kFWAckTimeout = -1, // Pseudo ack generated locally - kFWAckComplete = 1, - kFWAckPending = 2, - kFWAckBusyX = 4, - kFWAckBusyA = 5, - kFWAckBusyB = 6, - kFWAckDataError = 13, - kFWAckTypeError = 14 -}; - -// ================================================================= -// FireWire bus speed numbers -// ================================================================= -#pragma mark - -#pragma mark BUS SPEED NUMBERS - -typedef enum -{ - kFWSpeed100MBit = 0, - kFWSpeed200MBit = 1, - kFWSpeed400MBit = 2, - kFWSpeed800MBit = 3, - kFWSpeedReserved = 3, // In all cases, 1394B Devices report this speed, - // each port of the PHY could be different - - kFWSpeedUnknownMask = 0x80, // If speed was reserved and we haven't probed it further - - kFWSpeedMaximum = 0x7FFFFFFF, - kFWSpeedInvalid = 0x80000000 -} IOFWSpeed; - -// ================================================================= -// FWAddress -// ================================================================= -#pragma mark - -#pragma mark FWADDRESS -// -// The venerable FWAddress structure. This is the standard -// struct to use for passing FireWire addresses. -// - -typedef struct FWAddressStruct -{ - UInt16 nodeID; // bus/node - UInt16 addressHi; // Top 16 bits of node address. - UInt32 addressLo; // Bottom 32 bits of node address - - // - // Useful C++ only constructors - // - #ifdef __cplusplus - FWAddressStruct(const FWAddressStruct & a): - nodeID(a.nodeID), addressHi(a.addressHi), addressLo(a.addressLo) {}; - FWAddressStruct(UInt16 h=0xdead, UInt32 l=0xcafebabe) : - nodeID(0), addressHi(h), addressLo(l) {}; - FWAddressStruct(UInt16 h, UInt32 l, UInt16 n) : - nodeID(n), addressHi(h), addressLo(l) {}; - #endif -} FWAddress, *FWAddressPtr ; - -// ================================================================= -// Config ROM -// ================================================================= -#pragma mark - -#pragma mark CONFIG ROM - -// -// CSR bit defs. -// - -#define CSR_BIT(x) FW_BIT(x) - -#define CSRBitRange(start, end) \ -( \ - ((((UInt32) 0xFFFFFFFF) << (start)) >> \ - ((start) + (31 - (end)))) << \ - (31 - (end)) \ -) - -#define CSRBitRangePhase(start, end) \ - (31 - end) - -// -// Key types. -// - -typedef enum -{ - kConfigImmediateKeyType = 0, - kConfigOffsetKeyType = 1, - kConfigLeafKeyType = 2, - kConfigDirectoryKeyType = 3, - kInvalidConfigROMEntryType = 0xff -} IOConfigKeyType; - -// -// Key values. -// - -enum -{ - kConfigTextualDescriptorKey = 0x01, - kConfigBusDependentInfoKey = 0x02, - kConfigModuleVendorIdKey = 0x03, - kConfigModuleHwVersionKey = 0x04, - kConfigModuleSpecIdKey = 0x05, - kConfigModuleSwVersionKey = 0x06, - kConfigModuleDependentInfoKey = 0x07, - kConfigNodeVendorIdKey = 0x08, - kConfigNodeHwVersionKey = 0x09, - kConfigNodeSpecIdKey = 0x0A, - kConfigNodeSwVersionKey = 0x0B, - kConfigNodeCapabilitiesKey = 0x0C, - kConfigNodeUniqueIdKey = 0x0D, - kConfigNodeUnitsExtentKey = 0x0E, - kConfigNodeMemoryExtentKey = 0x0F, - kConfigNodeDependentInfoKey = 0x10, - kConfigUnitDirectoryKey = 0x11, - kConfigUnitSpecIdKey = 0x12, - kConfigUnitSwVersionKey = 0x13, - kConfigUnitDependentInfoKey = 0x14, - kConfigUnitLocationKey = 0x15, - kConfigUnitPollMaskKey = 0x16, - kConfigModelIdKey = 0x17, - kConfigGenerationKey = 0x38, // Apple-specific - - kConfigRootDirectoryKey = 0xffff // Not a real key -}; - -enum -{ - kConfigSBP2LUN = 0x14, - kConfigSBP2Revision = 0x21, - kConfigSBP2MAO = 0x54 -}; - -// Core CSR registers. -enum -{ - kCSRStateUnitDepend = CSRBitRange(0, 15), - kCSRStateUnitDependPhase = CSRBitRangePhase(0, 15), - - kCSRStateBusDepend = CSRBitRange(16, 23), - kCSRStateBusDependPhase = CSRBitRangePhase(16, 23), - - kCSRStateLost = CSR_BIT(24), - kCSRStateDReq = CSR_BIT(25), - kCSRStateELog = CSR_BIT(27), - kCSRStateAtn = CSR_BIT(28), - kCSRStateOff = CSR_BIT(29), - - kCSRStateState = CSRBitRange(30, 31), - kCSRStateStatePhase = CSRBitRangePhase(30, 31), - kCSRStateStateRunning = 0, - kCSRStateStateInitializing = 1, - kCSRStateStateTesting = 2, - kCSRStateStateDead = 3 -}; - -// Config ROM entry bit locations. - -enum -{ - kConfigBusInfoBlockLength = CSRBitRange (0, 7), - kConfigBusInfoBlockLengthPhase = CSRBitRangePhase (0, 7), - - kConfigROMCRCLength = CSRBitRange (8, 15), - kConfigROMCRCLengthPhase = CSRBitRangePhase (8, 15), - - kConfigROMCRCValue = CSRBitRange (16, 31), - kConfigROMCRCValuePhase = CSRBitRangePhase (16, 31), - - kConfigEntryKeyType = CSRBitRange (0, 1), - kConfigEntryKeyTypePhase = CSRBitRangePhase (0, 1), - - kConfigEntryKeyValue = CSRBitRange (2, 7), - kConfigEntryKeyValuePhase = CSRBitRangePhase (2, 7), - - kConfigEntryValue = CSRBitRange (8, 31), - kConfigEntryValuePhase = CSRBitRangePhase (8, 31), - - kConfigLeafDirLength = CSRBitRange (0, 15), - kConfigLeafDirLengthPhase = CSRBitRangePhase (0, 15), - - kConfigLeafDirCRC = CSRBitRange (16, 31), - kConfigLeafDirCRCPhase = CSRBitRangePhase (16, 31) -}; - -// -// Key types. -// -typedef enum -{ - kCSRImmediateKeyType = 0, - kCSROffsetKeyType = 1, - kCSRLeafKeyType = 2, - kCSRDirectoryKeyType = 3, - kInvalidCSRROMEntryType = 0xff -} IOCSRKeyType; - -// CSR 64-bit fixed address defs. - -enum -{ - kCSRNodeID = CSRBitRange (0, 15), - kCSRNodeIDPhase = CSRBitRangePhase (0, 15), - - kCSRInitialMemorySpaceBaseAddressHi = 0x00000000, - kCSRInitialMemorySpaceBaseAddressLo = 0x00000000, - - kCSRPrivateSpaceBaseAddressHi = 0x0000FFFF, - kCSRPrivateSpaceBaseAddressLo = 0xE0000000, - - kCSRRegisterSpaceBaseAddressHi = 0x0000FFFF, - kCSRRegisterSpaceBaseAddressLo = 0xF0000000, - - kCSRCoreRegistersBaseAddress = kCSRRegisterSpaceBaseAddressLo, - kCSRStateClearAddress = kCSRCoreRegistersBaseAddress + 0x0000, - kCSRStateSetAddress = kCSRCoreRegistersBaseAddress + 0x0004, - kCSRNodeIDsAddress = kCSRCoreRegistersBaseAddress + 0x0008, - kCSRResetStartAddress = kCSRCoreRegistersBaseAddress + 0x000C, - kCSRIndirectAddressAddress = kCSRCoreRegistersBaseAddress + 0x0010, - kCSRIndirectDataAddress = kCSRCoreRegistersBaseAddress + 0x0014, - kCSRSplitTimeoutHiAddress = kCSRCoreRegistersBaseAddress + 0x0018, - kCSRSplitTimeoutLoAddress = kCSRCoreRegistersBaseAddress + 0x001C, - kCSRArgumentHiAddress = kCSRCoreRegistersBaseAddress + 0x0020, - kCSRArgumentLoAddress = kCSRCoreRegistersBaseAddress + 0x0024, - kCSRTestStartAddress = kCSRCoreRegistersBaseAddress + 0x0028, - kCSRTestStatusAddress = kCSRCoreRegistersBaseAddress + 0x002C, - kCSRUnitsBaseHiAddress = kCSRCoreRegistersBaseAddress + 0x0030, - kCSRUnitsBaseLoAddress = kCSRCoreRegistersBaseAddress + 0x0034, - kCSRUnitsBoundHiAddress = kCSRCoreRegistersBaseAddress + 0x0038, - kCSRUnitsBoundLoAddress = kCSRCoreRegistersBaseAddress + 0x003C, - kCSRMemoryBaseHiAddress = kCSRCoreRegistersBaseAddress + 0x0040, - kCSRMemoryBaseLoAddress = kCSRCoreRegistersBaseAddress + 0x0044, - kCSRMemoryBoundHiAddress = kCSRCoreRegistersBaseAddress + 0x0048, - kCSRMemoryBoundLoAddress = kCSRCoreRegistersBaseAddress + 0x004C, - kCSRInterruptTargetAddress = kCSRCoreRegistersBaseAddress + 0x0050, - kCSRInterruptMaskAddress = kCSRCoreRegistersBaseAddress + 0x0054, - kCSRClockValueHiAddress = kCSRCoreRegistersBaseAddress + 0x0058, - kCSRClockValueMidAddress = kCSRCoreRegistersBaseAddress + 0x005C, - kCSRClockTickPeriodMidAddress = kCSRCoreRegistersBaseAddress + 0x0060, - kCSRClockTickPeriodLoAddress = kCSRCoreRegistersBaseAddress + 0x0064, - kCSRClockStrobeArrivedHiAddress = kCSRCoreRegistersBaseAddress + 0x0068, - kCSRClockStrobeArrivedMidAddress = kCSRCoreRegistersBaseAddress + 0x006C, - kCSRClockInfo0Address = kCSRCoreRegistersBaseAddress + 0x0070, - kCSRClockInfo1Address = kCSRCoreRegistersBaseAddress + 0x0074, - kCSRClockInfo2Address = kCSRCoreRegistersBaseAddress + 0x0078, - kCSRClockInfo3Address = kCSRCoreRegistersBaseAddress + 0x007C, - kCSRMessageRequestAddress = kCSRCoreRegistersBaseAddress + 0x0080, - kCSRMessageResponseAddress = kCSRCoreRegistersBaseAddress + 0x00C0, - kCSRErrorLogBufferAddress = kCSRCoreRegistersBaseAddress + 0x0180, - - kCSRBusDependentRegistersBaseAddress = kCSRRegisterSpaceBaseAddressLo + 0x0200, - kCSRBusyTimeout = kCSRRegisterSpaceBaseAddressLo + 0x0210, - kCSRBusManagerID = kCSRRegisterSpaceBaseAddressLo + 0x021C, - kCSRBandwidthAvailable = kCSRRegisterSpaceBaseAddressLo + 0x0220, - kCSRChannelsAvailable31_0 = kCSRRegisterSpaceBaseAddressLo + 0x0224, - kCSRChannelsAvailable63_32 = kCSRRegisterSpaceBaseAddressLo + 0x0228, - kCSRBroadcastChannel = kCSRRegisterSpaceBaseAddressLo + 0x0234, - - kConfigROMBaseAddress = kCSRRegisterSpaceBaseAddressLo + 0x0400, - kConfigBIBHeaderAddress = kConfigROMBaseAddress, - kConfigBIBBusNameAddress = kConfigROMBaseAddress + 4, - - kPCRBaseAddress = kCSRRegisterSpaceBaseAddressLo + 0x900, - kFCPCommandAddress = kCSRRegisterSpaceBaseAddressLo + 0xb00, - kFCPResponseAddress = kCSRRegisterSpaceBaseAddressLo + 0xd00 -}; - -// from figure 10-7 of 1394a -#define kBroadcastChannelInitialValues 0x8000001f -#define kBroadcastChannelValidMask 0x40000000 - -// CSR defined 64 bit unique ID. - -typedef UInt64 CSRNodeUniqueID; - -// FireWire core CSR registers. - -enum -{ - kFWCSRStateGone = FW_BIT(16), - kFWCSRStateLinkOff = FW_BIT(22), - kFWCSRStateCMstr = FW_BIT(23) -}; - -// FireWire bus/nodeID address defs. - -enum -{ - kFWAddressBusID = FWBitRange (16, 25) << kCSRNodeIDPhase, - kFWAddressBusIDPhase = FWBitRangePhase (16, 25) + kCSRNodeIDPhase, - - kFWAddressNodeID = FWBitRange (26, 31) << kCSRNodeIDPhase, - kFWAddressNodeIDPhase = FWBitRangePhase (26, 31) + kCSRNodeIDPhase, - - kFWLocalBusID = 1023, - kFWBroadcastNodeID = 63, - kFWBadNodeID = 0xffff, - - kFWLocalBusAddress = kFWLocalBusID << kFWAddressBusIDPhase, - kFWBroadcastAddress = kFWBroadcastNodeID << kFWAddressNodeIDPhase -}; - -#define FWNodeBaseAddress(busID, nodeID) \ -( \ - (busID << kFWAddressBusIDPhase) | \ - (nodeID << kFWAddressNodeIDPhase) \ -) - -#define FWNodeRegisterSpaceBaseAddressHi(busID, nodeID) \ -( \ - FWNodeBaseAddress (busID, nodeID) | \ - kCSRRegisterSpaceBaseAddressHi \ -) - -// FireWire CSR bus info block defs. - -enum -{ - kFWBIBHeaderAddress = kConfigBIBHeaderAddress, - kFWBIBBusNameAddress = kConfigBIBBusNameAddress, - kFWBIBNodeCapabilitiesAddress = kConfigROMBaseAddress + 8, - kFWBIBNodeUniqueIDHiAddress = kConfigROMBaseAddress + 12, - kFWBIBNodeUniqueIDLoAddress = kConfigROMBaseAddress + 16, - - kFWBIBBusName = 0x31333934, //'1394' - - kFWBIBIrmc = FW_BIT(0), - kFWBIBCmc = FW_BIT(1), - kFWBIBIsc = FW_BIT(2), - kFWBIBBmc = FW_BIT(3), - kFWBIBCycClkAcc = FWBitRange (8, 15), - kFWBIBCycClkAccPhase = FWBitRangePhase (8, 15), - kFWBIBMaxRec = FWBitRange (16, 19), - kFWBIBMaxRecPhase = FWBitRangePhase (16, 19), - kFWBIBMaxROM = FWBitRange (20, 21), - kFWBIBMaxROMPhase = FWBitRangePhase (20, 21), - kFWBIBGeneration = FWBitRange (24, 27), - kFWBIBGenerationPhase = FWBitRangePhase (24, 27), - kFWBIBLinkSpeed = FWBitRange (29, 31), - kFWBIBLinkSpeedPhase = FWBitRangePhase (29, 31) -}; - -enum -{ - kConfigUnitSpecAppleA27 = 0x000a27, - kConfigUnitSpec1394TA1 = 0x00a02d, - - kConfigUnitSWVersMacintosh10 = 10, - kConfigUnitSWVersIIDC100 = 0x000100, - kConfigUnitSWVersIIDC101 = 0x000101, - kConfigUnitSWVersIIDC102 = 0x000102 -}; - - -// ================================================================= -// Isoch defines -// ================================================================= -#pragma mark - -#pragma mark ISOCH - -enum -{ - kFWIsochDataLength = FWBitRange (0, 15), - kFWIsochDataLengthPhase = FWBitRangePhase (0, 15), - - kFWIsochTag = FWBitRange (16, 17), - kFWIsochTagPhase = FWBitRangePhase (16, 17), - - kFWIsochChanNum = FWBitRange (18, 23), - kFWIsochChanNumPhase = FWBitRangePhase (18, 23), - - kFWIsochTCode = FWBitRange (24, 27), - kFWIsochTCodePhase = FWBitRangePhase (24, 27), - - kFWIsochSy = FWBitRange (28, 31), - kFWIsochSyPhase = FWBitRangePhase (28, 31) -}; - -#define CHAN_BIT(x) (((UInt64)1) << (63 - (x)) -#define CHAN_MASK(x) (~CHAN_BIT(X)) - -typedef enum -{ - kFWNeverMultiMode = 0, - kFWAllowMultiMode, - kFWSuggestMultiMode, - kFWAlwaysMultiMode, - - kFWDefaultIsochResourceFlags = kFWNeverMultiMode -} IOFWIsochResourceFlags ; - -enum -{ - kFWIsochChannelDefaultFlags = 0, - kFWIsochChannelDoNotResumeOnWake = BIT(1) -} ; - -typedef enum -{ - kFWIsochPortDefaultOptions = 0, - kFWIsochPortUseSeparateKernelThread = BIT(1), - kFWIsochEnableRobustness = BIT(2), - kFWIsochBigEndianUpdates = BIT(3), // private - kFWIsochRequireLastContext = BIT(4), // private -} IOFWIsochPortOptions ; - -// ================================================================= -// DCL opcode defs. -// ================================================================= -#pragma mark - -#pragma mark DCL OPCODES - -enum -{ - kFWDCLImmediateEvent = 0, - kFWDCLCycleEvent = 1, - kFWDCLSyBitsEvent = 2 -}; - -typedef enum -{ - kFWDCLInvalidNotification = 0 - , kFWDCLUpdateNotification = 1 - , kFWDCLModifyNotification = 2 - , kFWNuDCLModifyNotification = 3 - , kFWNuDCLModifyJumpNotification = 4 - , kFWNuDCLUpdateNotification = 5 -} IOFWDCLNotificationType ; - -enum -{ - kFWDCLOpDynamicFlag = BIT(16), - kFWDCLOpVendorDefinedFlag = BIT(17), - kFWDCLOpFlagMask = BitRange (16, 31), - kFWDCLOpFlagPhase = BitRangePhase (16, 31) -}; - -enum -{ - kDCLInvalidOp = 0, - kDCLSendPacketStartOp = 1, - //kDCLSendPacketWithHeaderStartOp = 2, // Deprecated legacy DCL opcode! Use NuDCL instead! - kDCLSendPacketOp = 3, - kDCLSendBufferOp = 4, // obsolete - do not use - kDCLReceivePacketStartOp = 5, - kDCLReceivePacketOp = 6, - kDCLReceiveBufferOp = 7, // obsolete - do not use - kDCLCallProcOp = 8, - kDCLLabelOp = 9, - kDCLJumpOp = 10, - kDCLSetTagSyncBitsOp = 11, - kDCLUpdateDCLListOp = 12, - kDCLTimeStampOp = 13, - kDCLPtrTimeStampOp = 14, - kDCLSkipCycleOp = 15, - - kDCLNuDCLLeaderOp = 20 // compilerData field contains NuDCLRef to start of NuDCL - // program. - // Should not need to use this directly. -}; - -#ifdef FW_OLD_DCL_DEFS - -//typedef struct DCLCommandStruct ; -//typedef void (DCLCallCommandProc)(DCLCommandStruct* command); - -#else - -//typedef struct DCLCommand ; -//typedef void (DCLCallCommandProc)(DCLCommand* command); - -#endif - -// ================================================================= -// DCL structs -// ================================================================= -#pragma mark - -#pragma mark DCL - -#ifdef __LP64__ -typedef void* DCLCallProcDataType; -#else -typedef UInt32 DCLCallProcDataType; -#endif - -#ifdef KERNEL - #ifdef __LP64__ - typedef void* DCLCompilerDataType; - #else - typedef UInt32 DCLCompilerDataType; - #endif -#else - typedef UInt32 DCLCompilerDataType; -#endif - -typedef struct DCLCommandStruct -{ - struct DCLCommandStruct * pNextDCLCommand; // Next DCL command. - DCLCompilerDataType compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - UInt32 operands[1]; // DCL operands (size varies) -} DCLCommand; - -typedef void (DCLCallCommandProc)(DCLCommand * command); - -typedef struct DCLTransferPacketStruct -{ - DCLCommand * pNextDCLCommand; // Next DCL command. - DCLCompilerDataType compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - void * buffer; // Packet buffer. - UInt32 size; // Buffer size. -} DCLTransferPacket ; - -typedef struct DCLTransferBufferStruct -{ - DCLCommand * pNextDCLCommand; // Next DCL command. - DCLCompilerDataType compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - void * buffer; // Buffer. - UInt32 size; // Buffer size. - UInt16 packetSize; // Size of packets to send. - UInt16 reserved; - UInt32 bufferOffset; // Current offset into buffer. -} DCLTransferBuffer ; - -typedef struct DCLCallProcStruct -{ - DCLCommand * pNextDCLCommand; // Next DCL command. - DCLCompilerDataType compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - DCLCallCommandProc * proc; // Procedure to call. - DCLCallProcDataType procData; // Data for use by called procedure. -} DCLCallProc; - -typedef struct DCLLabelStruct -{ - DCLCommand * pNextDCLCommand; // Next DCL command. - DCLCompilerDataType compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. -} DCLLabel; - -typedef struct DCLJumpStruct -{ - DCLCommand * pNextDCLCommand; // Next DCL command. - DCLCompilerDataType compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - DCLLabel * pJumpDCLLabel; // DCL label to jump to. -} DCLJump; - -typedef struct DCLSetTagSyncBitsStruct -{ - DCLCommand * pNextDCLCommand; // Next DCL command. - DCLCompilerDataType compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - UInt16 tagBits; // Tag bits for following packets. - UInt16 syncBits; // Sync bits for following packets. -} DCLSetTagSyncBits; - -typedef struct DCLUpdateDCLListStruct -{ - DCLCommand * pNextDCLCommand; // Next DCL command. - DCLCompilerDataType compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - DCLCommand ** dclCommandList; // List of DCL commands to update. - UInt32 numDCLCommands; // Number of DCL commands in list. -} DCLUpdateDCLList; - -typedef struct DCLTimeStampStruct -{ - DCLCommand * pNextDCLCommand; // Next DCL command. - DCLCompilerDataType compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - UInt32 timeStamp; // Time stamp. -} DCLTimeStamp; - -typedef struct DCLPtrTimeStampStruct -{ - DCLCommand * pNextDCLCommand; // Next DCL command. - DCLCompilerDataType compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - UInt32 * timeStampPtr; // Where to store the time stamp. -} DCLPtrTimeStamp ; - -typedef struct -{ - DCLCommand * pNextDCLCommand ; // unused - always NULL - DCLCompilerDataType compilerData; // Data for use by DCL compiler. - UInt32 opcode ; // must be kDCLNuDCLLeaderOp - void* program ; // NuDCL program here... -} DCLNuDCLLeader ; - -#ifdef FW_OLD_DCL_DEFS - -// should not use these... - -typedef DCLCommand* DCLCommandPtr ; -typedef DCLTransferBuffer* DCLTransferBufferPtr ; -typedef DCLTransferPacket* DCLTransferPacketPtr ; -typedef DCLCallProc* DCLCallProcPtr ; -typedef DCLLabel* DCLLabelPtr ; -typedef DCLJump* DCLJumpPtr ; -typedef DCLSetTagSyncBits* DCLSetTagSyncBitsPtr ; -typedef DCLUpdateDCLList* DCLUpdateDCLListPtr ; -typedef DCLTimeStamp* DCLTimeStampPtr ; -typedef DCLPtrTimeStamp* DCLPtrTimeStampPtr ; -typedef DCLCallCommandProc* DCLCallCommandProcPtr ; - -#endif - - -// ================================================================= -// User-Lib Export DCL structs - Thses structus are used to pass -// a user-created legacy DCL program down into kernel space. These -// structs allow support for both 32-bit and 64-bit user-space clients. -// These structs should only be used internally. They are not for -// clients to create DCL programs with. -// ================================================================= - -typedef struct UserExportDCLCommandStruct -{ - mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct - mach_vm_address_t pNextDCLCommand; // Next DCL command. - uint64_t compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - UInt32 operands[1]; // DCL operands (size varies) -} __attribute__ ((packed)) UserExportDCLCommand; - -typedef void (UserExportDCLCallCommandProc)(UserExportDCLCommand * command); - -typedef struct UserExportDCLTransferPacketStruct -{ - mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct - mach_vm_address_t pNextDCLCommand; // Next DCL command. - uint64_t compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - mach_vm_address_t buffer; // Packet buffer. - UInt32 size; // Buffer size. -} __attribute__ ((packed)) UserExportDCLTransferPacket ; - -typedef struct UserExportDCLTransferBufferStruct -{ - mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct - mach_vm_address_t pNextDCLCommand; // Next DCL command. - uint64_t compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - mach_vm_address_t buffer; // Buffer. - UInt32 size; // Buffer size. - UInt16 packetSize; // Size of packets to send. - UInt16 reserved; - UInt32 bufferOffset; // Current offset into buffer. -} __attribute__ ((packed)) UserExportDCLTransferBuffer ; - -typedef struct UserExportDCLCallProcStruct -{ - mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct - mach_vm_address_t pNextDCLCommand; // Next DCL command. - uint64_t compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - mach_vm_address_t proc; // Procedure to call. - uint64_t procData; // Data for use by called procedure. -} __attribute__ ((packed)) UserExportDCLCallProc; - -typedef struct UserExportDCLLabelStruct -{ - mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct - mach_vm_address_t pNextDCLCommand; // Next DCL command. - uint64_t compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. -} __attribute__ ((packed)) UserExportDCLLabel; - -typedef struct UserExportDCLJumpStruct -{ - mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct - mach_vm_address_t pNextDCLCommand; // Next DCL command. - uint64_t compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - mach_vm_address_t pJumpDCLLabel; // DCL label to jump to. -} __attribute__ ((packed)) UserExportDCLJump; - -typedef struct UserExportDCLSetTagSyncBitsStruct -{ - mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct - mach_vm_address_t pNextDCLCommand; // Next DCL command. - uint64_t compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - UInt16 tagBits; // Tag bits for following packets. - UInt16 syncBits; // Sync bits for following packets. -} __attribute__ ((packed)) UserExportDCLSetTagSyncBits; - -typedef struct UserExportDCLUpdateDCLListStruct -{ - mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct - mach_vm_address_t pNextDCLCommand; // Next DCL command. - uint64_t compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - mach_vm_address_t dclCommandList; // List of DCL commands to update. - UInt32 numDCLCommands; // Number of DCL commands in list. -} __attribute__ ((packed)) UserExportDCLUpdateDCLList; - -typedef struct UserExportDCLTimeStampStruct -{ - mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct - mach_vm_address_t pNextDCLCommand; // Next DCL command. - uint64_t compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - UInt32 timeStamp; // Time stamp. -} __attribute__ ((packed)) UserExportDCLTimeStamp; - -typedef struct UserExportDCLPtrTimeStampStruct -{ - mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct - mach_vm_address_t pNextDCLCommand; // Next DCL command. - uint64_t compilerData; // Data for use by DCL compiler. - UInt32 opcode; // DCL opcode. - mach_vm_address_t timeStampPtr; // Where to store the time stamp. -} __attribute__ ((packed)) UserExportDCLPtrTimeStamp ; - -typedef struct -{ - mach_vm_address_t pClientDCLStruct; // A pointer to the client's DCL struct - mach_vm_address_t pNextDCLCommand ; // unused - always NULL - uint64_t compilerData; // Data for use by DCL compiler. - UInt32 opcode ; // must be kDCLNuDCLLeaderOp - mach_vm_address_t program ; // NuDCL program here... -} __attribute__ ((packed)) UserExportDCLNuDCLLeader ; - - -// ================================================================= -// NuDCL -// ================================================================= -#pragma mark - -#pragma mark NUDCL - -typedef struct __NuDCL * NuDCLRef ; -typedef NuDCLRef NuDCLSendPacketRef ; -typedef NuDCLRef NuDCLSkipCycleRef ; -typedef NuDCLRef NuDCLReceivePacketRef ; - -typedef void (*NuDCLCallback)( void* refcon, NuDCLRef dcl ); - -typedef enum -{ - kNuDCLDynamic = BIT( 1 ), - kNuDCLUpdateBeforeCallback = BIT( 2 ) - -} NuDCLFlags ; - -// ================================================================= -// Miscellaneous -// ================================================================= -#pragma mark - -#pragma mark MISCELLANEOUS - -typedef void* FWClientCommandID ; - -typedef struct IOFireWireSessionRefOpaqueStuct* IOFireWireSessionRef ; - -// -// bus management constants. -// - -enum -{ - kFWBusManagerArbitrationTimeoutDuration = 625 // durationMillisecond -}; - -// -// bus characteristics. -// - -enum -{ - kFWMaxBusses = 1023, - kFWMaxNodesPerBus = 63, - kFWMaxNodeHops = 16 -}; - -/*! @enum NodeFlags - - @abstract Flags that specify characteristics of the FireWire device node. - - @constant kIOFWDisablePhysicalAccess Disable physical memory access - - @constant kIOFWDisableAllPhysicalAccess Disable all physical memory access - - @constant kIOFWEnableRetryOnAckD Enable retry on Ack D - - @constant kIOFWLimitAsyncPacketSize Limit async packet size - - @constant kIOFWDisablePhyOnSleep Disable Phy, when machine is in Sleep mode - - @constant kIOFWMustBeRoot Attempt to make this device root, There is no guarentee Mac OS will succeed in making the device - root. - - @constant kIOFWMustNotBeRoot Attempt to prevent this device from being root, There is no guarentee Mac OS will succeed in preventing the device - from being root. - - @constant kIOFWMustHaveGap63 Attempt to ensure the gap count is 63, when this device is on the bus. Gap 63 reduces bus performance significantly, - so this flag should be used only when absolutely necessary. There is no guarentee Mac OS will succeed in forcing - the gap count to 63. -*/ -enum -{ - kIOFWDisablePhysicalAccess = (1 << 0), - kIOFWDisableAllPhysicalAccess = (1 << 1), - kIOFWEnableRetryOnAckD = (1 << 2), - kIOFWLimitAsyncPacketSize = (1 << 3), - kIOFWDisablePhyOnSleep = (1 << 4), - kIOFWMustBeRoot = (1 << 5), - kIOFWMustNotBeRoot = (1 << 6), - kIOFWMustHaveGap63 = (1 << 7) -}; - -// -// write flags -// - -enum IOFWWriteFlags -{ - kIOFWWriteFlagsNone = 0x00000000, - kIOFWWriteFlagsDeferredNotify = 0x00000001, - kIOFWWriteFastRetryOnBusy = 0x00000002, - kIOFWWriteBlockRequest = 0x00000004, // force a block request -}; - -// -// read flags -// - -enum IOFWReadFlags -{ - kIOFWReadFlagsNone = 0x00000000, - kIOFWReadBlockRequest = 0x00000004, // force a block request - kIOFWReadPingTime = 0x00000008 // ping time -}; - -// -// security modes -// - -enum IOFWSecurityMode -{ - kIOFWSecurityModeNormal = 0, - kIOFWSecurityModeSecure = 1, - kIOFWSecurityModeSecurePermanent = 2 -}; - -// -// physical access settings -// - -enum IOFWPhysicalAccessMode -{ - kIOFWPhysicalAccessEnabled = 0, - kIOFWPhysicalAccessDisabled = 1, - kIOFWPhysicalAccessDisabledForGeneration = 2 -}; - -enum -{ - kIOFWSpecID_AAPL = 0xa27, - kIOFWSWVers_KPF = 0x40 -}; - -// old style bit defs -#ifdef FW_OLD_BIT_DEFS - - #define kBit0 BIT(0) - #define kBit1 BIT(1) - #define kBit2 BIT(2) - #define kBit3 BIT(3) - #define kBit4 BIT(4) - #define kBit5 BIT(5) - #define kBit6 BIT(6) - #define kBit7 BIT(7) - #define kBit8 BIT(8) - #define kBit9 BIT(9) - #define kBit10 BIT(10) - #define kBit11 BIT(11) - #define kBit12 BIT(12) - #define kBit13 BIT(13) - #define kBit14 BIT(14) - #define kBit15 BIT(15) - #define kBit16 BIT(16) - #define kBit17 BIT(17) - #define kBit18 BIT(18) - #define kBit19 BIT(19) - #define kBit20 BIT(20) - #define kBit21 BIT(21) - #define kBit22 BIT(22) - #define kBit23 BIT(23) - #define kBit24 BIT(24) - #define kBit25 BIT(25) - #define kBit26 BIT(26) - #define kBit27 BIT(27) - #define kBit28 BIT(28) - #define kBit29 BIT(29) - #define kBit30 BIT(30) - #define kBit31 BIT(31) - -#endif - -#endif //__IOFireWireFamilyCommon_H__ diff --git a/i386/include/IOKit/firewire/IOFireWireIRMAllocation.h b/i386/include/IOKit/firewire/IOFireWireIRMAllocation.h deleted file mode 100644 index c67986c..0000000 --- a/i386/include/IOKit/firewire/IOFireWireIRMAllocation.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOFIREWIREIRMALLOCATION_H -#define _IOKIT_IOFIREWIREIRMALLOCATION_H - -#include <libkern/c++/OSObject.h> - -class IOFireWireController; - -//#include <IOKit/firewire/IOFireWireController.h> -//#include <IOKit/firewire/IOFireWireFamilyCommon.h> - -/*! @class IOFireWireIRMAllocation -*/ - -class IOFireWireIRMAllocation : public OSObject -{ - friend class IOFireWireController; - - OSDeclareDefaultStructors(IOFireWireIRMAllocation) - -public: - - // Prototype for the callback if reallocation after bus-reset is unsuccessful. - typedef IOReturn (*AllocationLostNotificationProc)(void* refCon, class IOFireWireIRMAllocation* allocation); - - // Initialize the IRM allocation object. - virtual bool init( IOFireWireController * control, - Boolean releaseIRMResourcesOnFree = true, - AllocationLostNotificationProc allocationLostProc = NULL, - void *pLostProcRefCon = NULL); - - // Specify whether of not the IRM resources should automatically - // be released when freeing this allocation object. - virtual void setReleaseIRMResourcesOnFree(Boolean doRelease); - - // Use the IRMAllocation object to allocate isoch resources - virtual IOReturn allocateIsochResources(UInt8 isochChannel, UInt32 bandwidthUnits); - - // Free isoch resources previously allocated with a call to allocateIsochResources - virtual IOReturn deallocateIsochResources(void); - - // Returns true if isoch resources are currently allocated, and if true, the allocated channel, and amount of isoch bandwidth. - virtual Boolean areIsochResourcesAllocated(UInt8 *pAllocatedIsochChannel, UInt32 *pAllocatedBandwidthUnits); - - // Get the refcon - virtual void * GetRefCon(void); - virtual void SetRefCon(void* refCon); - - // Override the base-class release function for special processing - virtual void release() const; - -protected: - - /*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - // Free the allocation object (and release IRM resources if needed) - virtual void free( void ); - - // Controller will call this to notify about bus-reset complete. - virtual void handleBusReset(UInt32 generation); - - virtual void failedToRealloc(void); - virtual UInt32 getAllocationGeneration(void); - static void threadFunc( void * arg ); - -private: - - AllocationLostNotificationProc fAllocationLostProc; - void *fLostProcRefCon; - Boolean fReleaseIRMResourcesOnFree; - UInt8 fIsochChannel; - UInt32 fBandwidthUnits; - UInt32 fAllocationGeneration; - IORecursiveLock *fLock ; - IOFireWireController *fControl; - Boolean isAllocated; - - OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 0); - OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 1); - OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 2); - OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 3); - OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 4); - OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 5); - OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 6); - OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 7); -}; - -#endif // _IOKIT_IOFIREWIREIRMALLOCATION_H diff --git a/i386/include/IOKit/firewire/IOFireWireLocalNode.h b/i386/include/IOKit/firewire/IOFireWireLocalNode.h deleted file mode 100644 index 339fb9e..0000000 --- a/i386/include/IOKit/firewire/IOFireWireLocalNode.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * IOFireWireLocalNode.h - * IOFireWireFamily - * - * Created by Niels on Fri Aug 16 2002. - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - $Log: IOFireWireLocalNode.h,v $ - Revision 1.8 2009/03/26 22:45:17 calderon - <rdar://6728033> User client fails to terminate with unexpected consuequences - - Revision 1.7 2008/11/14 00:17:12 arulchan - fix for rdar://5939334 - - Revision 1.6 2005/02/18 22:56:53 gecko1 - 3958781 Q45C EVT: FireWire ASP reporter says port speed is 800 Mb/sec - - Revision 1.5 2003/02/20 02:00:12 collin - *** empty log message *** - - Revision 1.4 2003/02/17 21:47:53 collin - *** empty log message *** - - Revision 1.3 2002/10/18 23:29:44 collin - fix includes, fix cast which fails on new compiler - - Revision 1.2 2002/09/25 00:27:24 niels - flip your world upside-down - -*/ - -// public -#import <IOKit/firewire/IOFireWireNub.h> - -class IOFireWireLocalNode; - -#pragma mark - - -/*! - @class IOFireWireLocalNodeAux -*/ - -class IOFireWireLocalNodeAux : public IOFireWireNubAux -{ - OSDeclareDefaultStructors(IOFireWireLocalNodeAux) - - friend class IOFireWireLocalNode; - -protected: - - /*! - @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - - struct ExpansionData { }; - - /*! - @var reserved - Reserved for future use. (Internal use only) - */ - - ExpansionData * reserved; - - virtual bool init( IOFireWireLocalNode * primary ); - virtual void free(); - -private: - OSMetaClassDeclareReservedUnused(IOFireWireLocalNodeAux, 0); - OSMetaClassDeclareReservedUnused(IOFireWireLocalNodeAux, 1); - OSMetaClassDeclareReservedUnused(IOFireWireLocalNodeAux, 2); - OSMetaClassDeclareReservedUnused(IOFireWireLocalNodeAux, 3); - -}; - -#pragma mark - - -/*! @class IOFireWireLocalNode -*/ - -class IOFireWireLocalNode : public IOFireWireNub -{ - OSDeclareDefaultStructors(IOFireWireLocalNode) - - friend class IOFireWireLocalNodeAux; - - /*------------------Useful info about device (also available in the registry)--------*/ -protected: - - /*-----------Methods provided to FireWire device clients-------------*/ -public: - - // Set up properties affected by bus reset - virtual void setNodeProperties(UInt32 generation, UInt16 nodeID, UInt32 *selfIDs, int numIDs, IOFWSpeed maxSpeed ); - - /* - * Standard nub initialization - */ - virtual bool init(OSDictionary * propTable); - virtual bool attach(IOService * provider ); - - virtual void handleClose( IOService * forClient, - IOOptionBits options ) ; - virtual bool handleOpen( IOService * forClient, - IOOptionBits options, - void * arg ) ; - virtual bool handleIsOpen( const IOService * forClient ) const; - - /* - * Trick method to create protocol user clients - */ - virtual IOReturn setProperties( OSObject * properties ); - -protected: - - virtual IOFireWireNubAux * createAuxiliary( void ); - -public: - virtual IOReturn message( UInt32 type, IOService * provider, void * argument ); - virtual void free(); - -protected: - OSSet * fOpenClients; -}; diff --git a/i386/include/IOKit/firewire/IOFireWireMultiIsochReceive.h b/i386/include/IOKit/firewire/IOFireWireMultiIsochReceive.h deleted file mode 100644 index e003660..0000000 --- a/i386/include/IOKit/firewire/IOFireWireMultiIsochReceive.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2008 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOFIREWIREMULTIISOCHRECEIVE_H_ -#define _IOKIT_IOFIREWIREMULTIISOCHRECEIVE_H_ - -class IOFireWireMultiIsochReceiveListener; -class IOFireWireMultiIsochReceivePacket; -class IOFireWireController; - -typedef IOReturn (*FWMultiIsochReceiveListenerCallback)(void *refcon, IOFireWireMultiIsochReceivePacket *pPacket); - -// These are the parameters clients can set which help us to optimize the mult-isoch-receiver -// polling interval, and memory resources -typedef struct FWMultiIsochReceiveListenerParamsStruct - { - // How much latency, from when the packet arrives to when the client is notified, can the client tolerate. - UInt32 maxLatencyInFireWireCycles; - - // In bits per second, the expected bit-rate of the incoming stream - UInt32 expectedStreamBitRate; - - // How long does the client expect to hold onto packets objects before returning them back to the receiver - UInt32 clientPacketReturnLatencyInFireWireCycles; - }FWMultiIsochReceiveListenerParams; - -/*! @class IOFireWireMultiIsochReceiveListener -*/ - -class IOFireWireMultiIsochReceiveListener : public OSObject - { - friend class IOFireWireLink; - - protected: - OSDeclareDefaultStructors(IOFireWireMultiIsochReceiveListener) - bool init(IOFireWireController *fwController, - UInt32 receiveChannel, - FWMultiIsochReceiveListenerCallback callback, - void *pCallbackRefCon, - FWMultiIsochReceiveListenerParams *pListenerParams); - void free(); - public: - static IOFireWireMultiIsochReceiveListener *create(IOFireWireController *fwController, - UInt32 channel, - FWMultiIsochReceiveListenerCallback callback, - void *pCallbackRefCon, - FWMultiIsochReceiveListenerParams *pListenerParams); - - // Call this to activate the listener - IOReturn Activate(); - - // Call this to deactivate the listener - IOReturn Deactivate(); - - // Call this to modify the callback/refcon pointers. Only call this when not activated! - IOReturn SetCallback(FWMultiIsochReceiveListenerCallback callback, - void *pCallbackRefCon); - - // Accessors - inline UInt32 getReceiveChannel(void) {return fChannel;}; - inline FWMultiIsochReceiveListenerCallback getCallback(void){return fClientCallback;}; - inline void * getRefCon(void){return fClientCallbackRefCon;}; - inline bool getActivatedState(void) {return fActivated;}; - - protected: - IOFireWireController *fControl; - UInt32 fChannel; - FWMultiIsochReceiveListenerCallback fClientCallback; - void *fClientCallbackRefCon; - bool fActivated; - FWMultiIsochReceiveListenerParams *fListenerParams; - }; - -#define kMaxRangesPerMultiIsochReceivePacket 6 - -/*! @class IOFireWireMultiIsochReceivePacket -*/ - -class IOFireWireMultiIsochReceivePacket : public OSObject - { - OSDeclareDefaultStructors(IOFireWireMultiIsochReceivePacket) - bool init(IOFireWireController *fwController); - void free(); - public: - static IOFireWireMultiIsochReceivePacket *create(IOFireWireController *fwController); - - // The clients who are passed this packet by the - // multi-isoch receiver calling their callback - // MUST call clientDone() on this packet to - // return it back for reuse! - void clientDone(void); - - UInt32 isochChannel(void); - UInt32 packetReceiveTime(void); - - UInt32 isochPayloadSize(void); // The size of just the isoch payload, not including header/trailer quads. - inline UInt32 isochPacketSize(void) {return isochPayloadSize()+8; }; // The size of the packet, including header/trailer quads. - - // This returns a memory descriptor to the client. The client must call complete(), and release() on the - // memory descriptor when done. - IOMemoryDescriptor *createMemoryDescriptorForRanges(void); - - // These should be treated as read-only by clients, - // as should the data contained in these buffers! - IOAddressRange ranges[kMaxRangesPerMultiIsochReceivePacket] ; - UInt32 numRanges; - - // These should be treated private for clients! - // Messing with them will screw up the bookkeepping - // in the Multi-Isoch Receiver! - UInt32 numClientReferences; - void* elements[kMaxRangesPerMultiIsochReceivePacket]; - - protected: - IOFireWireController *fControl; - }; - -#endif \ No newline at end of file diff --git a/i386/include/IOKit/firewire/IOFireWireNub.h b/i386/include/IOKit/firewire/IOFireWireNub.h deleted file mode 100644 index 7df983b..0000000 --- a/i386/include/IOKit/firewire/IOFireWireNub.h +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * - * IOFireWireNub.h - * - * - * Note: IOFWCommand(s) are allocated by methods in this class. - * The remaining methods to setup and submit IOFWCommands are defined in - * IOFWCommand.h - */ -#ifndef _IOKIT_IOFIREWIRENUB_H -#define _IOKIT_IOFIREWIRENUB_H - -// public -#include <IOKit/IOService.h> -#include <IOKit/firewire/IOFWCommand.h> -#include <IOKit/firewire/IOFWAddressSpace.h> - -class IOFireWireController; -class IOFireWireBus; -class IOConfigDirectory; -class IOFireWireNub; -class IOFireWireDevice; -class IOFireWireUnit; -class IOFWSimplePhysicalAddressSpace; -class IOFWSimpleContiguousPhysicalAddressSpace; - -enum TerminationState -{ - kNotTerminated = 0, - kNeedsTermination, - kTerminated -}; - -#pragma mark - - -/*! - @class IOFireWireNubAux -*/ - -class IOFireWireNubAux : public OSObject -{ - OSDeclareDefaultStructors(IOFireWireNubAux) - - friend class IOFireWireNub; - -protected: - - IOFireWireNub * fPrimary; - TerminationState fTerminationState; - - /*! - @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - - struct ExpansionData { }; - - /*! - @var reserved - Reserved for future use. (Internal use only) - */ - - ExpansionData * reserved; - - virtual bool init( IOFireWireNub * primary ); - virtual void free(); - - virtual UInt32 hopCount( IOFireWireNub * nub ); - virtual UInt32 hopCount( void ); - - virtual TerminationState getTerminationState( void ); - virtual void setTerminationState( TerminationState state ); - - virtual bool isPhysicalAccessEnabled( void ); - - virtual IOFWSimpleContiguousPhysicalAddressSpace * createSimpleContiguousPhysicalAddressSpace( vm_size_t size, IODirection direction ); - - virtual IOFWSimplePhysicalAddressSpace * createSimplePhysicalAddressSpace( vm_size_t size, IODirection direction ); - -private: - OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 0); - OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 1); - OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 2); - OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 3); - OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 4); - OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 5); - OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 6); - OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 7); - OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 8); - OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 9); - OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 10); - OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 11); - OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 12); - OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 13); - OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 14); - OSMetaClassDeclareReservedUnused(IOFireWireNubAux, 15); - -}; - -#pragma mark - - -/*! @class IOFireWireNub -*/ -class IOFireWireNub : public IOService -{ - OSDeclareAbstractStructors(IOFireWireNub) - - friend class IOFireWireController; - friend class IOFireWireNubAux; - friend class IOFireWireDeviceAux; - friend class IOFireWireUnitAux; - friend class IOFireWireDevice; - friend class IOFireWireUnit; - -/*------------------Useful info about device (also available in the registry)--------*/ -protected: - int fDeviceSpeed; // Max supported by device - int fCommsSpeed; // Max speed this node can communicate with device - UInt16 fNodeID; // Current node ID (could change after bus reset!) - UInt16 fLocalNodeID; // ID of the local node (could change after bus reset!) - UInt32 fGeneration; // ID Of bus topology that fNodeID is valid for. - CSRNodeUniqueID fUniqueID; // Device's globally unique ID (never changes) - mach_timespec_t fAsyncTimeout; // Guesstimate of how long to wait for response - // from device when making async requests - // Different values for quad/block transfers? - // OS8 FW has 40/100 mSec. - - int fMaxReadPackLog; - int fMaxWritePackLog; - int fMaxReadROMPackLog; - - IOFireWireController *fControl; - IOConfigDirectory *fDirectory; - - UInt32 fNodeFlags; - - OSSet * fConfigDirectorySet; - - IOFireWireNubAux * fAuxiliary; - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - virtual void free(); - -/*------------------Methods provided to FireWire device clients-----------------------*/ -public: - - // Get nodeID and bus generation info - IOReturn getNodeIDGeneration(UInt32 &generation, UInt16 &nodeID, UInt16 &localID) const; - IOReturn getNodeIDGeneration(UInt32 &generation, UInt16 &nodeID) const; - - // How fast can this system talk to the node? - virtual IOFWSpeed FWSpeed() const; - - // How fast can this node talk to another node? - virtual IOFWSpeed FWSpeed(const IOFireWireNub *dst) const; - - // How big (as a power of two) can packets sent to/received from the node be? - virtual int maxPackLog(bool forSend) const; - - // How big (as a power of two) can packets sent to/received from a specified address in the node be? - virtual int maxPackLog(bool forSend, FWAddress address) const; - - // How big (as a power of two) can packets sent from this node to dst node/received from dst be? - virtual int maxPackLog(bool forSend, const IOFireWireNub *dst) const; - - // Set maximum packet size nub can handle - virtual void setMaxPackLog(bool forSend, bool forROM, int maxPackLog); - - /* - * Create various FireWire commands to send to the device - */ - virtual IOFWReadCommand *createReadCommand(FWAddress devAddress, IOMemoryDescriptor *hostMem, - FWDeviceCallback completion=NULL, void *refcon=NULL, - bool failOnReset=false); - virtual IOFWReadQuadCommand *createReadQuadCommand(FWAddress devAddress, UInt32 *quads, int numQuads, - FWDeviceCallback completion=NULL, void *refcon=NULL, - bool failOnReset=false); - - virtual IOFWWriteCommand *createWriteCommand(FWAddress devAddress, IOMemoryDescriptor *hostMem, - FWDeviceCallback completion=NULL, void *refcon=NULL, - bool failOnReset=false); - virtual IOFWWriteQuadCommand *createWriteQuadCommand(FWAddress devAddress, UInt32 *quads, int numQuads, - FWDeviceCallback completion=NULL, void *refcon=NULL, - bool failOnReset=false); - - // size is 1 for 32 bit compare, 2 for 64 bit. - virtual IOFWCompareAndSwapCommand *createCompareAndSwapCommand(FWAddress devAddress, - const UInt32 *cmpVal, const UInt32 *newVal, int size, - FWDeviceCallback completion=NULL, void *refcon=NULL, - bool failOnReset=false); - /* - * Create local FireWire address spaces for the device to access - */ - virtual IOFWPhysicalAddressSpace *createPhysicalAddressSpace(IOMemoryDescriptor *mem); - virtual IOFWPseudoAddressSpace *createPseudoAddressSpace(FWAddress *addr, UInt32 len, - FWReadCallback reader, FWWriteCallback writer, void *refcon); - - /* - * Get Config directory for nub - * Device nub directory is root directory, Unit nub directory is Unit directory. - * - * Depricated use getConfigDirectoryRef - * - */ - - virtual IOReturn getConfigDirectory(IOConfigDirectory *&dir); - - /* - * Get bus for nub - */ - IOFireWireBus * getBus() const; - - IOFireWireController * getController() const; - - const CSRNodeUniqueID &getUniqueID() const; - - /* - * Standard nub initialization - */ - virtual bool init(OSDictionary * propTable); - - virtual void setNodeFlags( UInt32 flags ); - virtual UInt32 getNodeFlags( void ); - virtual void clearNodeFlags( UInt32 flags ); - - virtual IOReturn setConfigDirectory( IOConfigDirectory *directory ); - - virtual IOReturn getConfigDirectoryRef( IOConfigDirectory *&dir ); - - inline UInt32 hopCount( IOFireWireNub * nub ) - { return fAuxiliary->hopCount( nub ); } - - inline UInt32 hopCount( void ) - { return fAuxiliary->hopCount(); } - - inline TerminationState getTerminationState( void ) - { return fAuxiliary->getTerminationState(); } - -protected: - inline void setTerminationState( TerminationState state ) - { fAuxiliary->setTerminationState( state ); } - - virtual IOFireWireNubAux * createAuxiliary( void ); - -public: - - inline bool isPhysicalAccessEnabled( void ) - { return fAuxiliary->isPhysicalAccessEnabled(); } - - inline IOFWSimpleContiguousPhysicalAddressSpace * createSimpleContiguousPhysicalAddressSpace( vm_size_t size, IODirection direction ) - { return fAuxiliary->createSimpleContiguousPhysicalAddressSpace( size, direction ); } - - inline IOFWSimplePhysicalAddressSpace * createSimplePhysicalAddressSpace( vm_size_t size, IODirection direction ) - { return fAuxiliary->createSimplePhysicalAddressSpace( size, direction ); } - -private: - OSMetaClassDeclareReservedUsed(IOFireWireNub, 0); - OSMetaClassDeclareReservedUsed(IOFireWireNub, 1); - OSMetaClassDeclareReservedUnused(IOFireWireNub, 2); - OSMetaClassDeclareReservedUnused(IOFireWireNub, 3); - -}; - -#endif /* ! _IOKIT_IOFIREWIRENUB_H */ diff --git a/i386/include/IOKit/firewire/IOFireWirePowerManager.h b/i386/include/IOKit/firewire/IOFireWirePowerManager.h deleted file mode 100644 index e0a141a..0000000 --- a/i386/include/IOKit/firewire/IOFireWirePowerManager.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOFIREWIREPOWERMANAGER_H -#define _IOKIT_IOFIREWIREPOWERMANAGER_H - -#include <IOKit/firewire/IOFireWireFamilyCommon.h> - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOReturn.h> - -class IOFireWireController; - -/*! @class IOFireWirePowerManager -*/ - -class IOFireWirePowerManager : public OSObject -{ - OSDeclareAbstractStructors(IOFireWirePowerManager); - -protected: - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - IOFireWireController * fControl; - - UInt32 fMaximumDeciwatts; - UInt32 fAllocatedDeciwatts; - -public: - static IOFireWirePowerManager * createWithController( IOFireWireController * controller ); - - virtual bool initWithController( IOFireWireController * controller ); - - virtual void setMaximumDeciwatts( UInt32 deciwatts ); - virtual IOReturn allocateDeciwatts( UInt32 deciwatts ); - virtual void deallocateDeciwatts( UInt32 deciwatts ); - -private: - OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 0); - OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 1); - OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 2); - OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 3); - OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 4); - OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 5); - OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 6); - OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 7); - OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 8); - OSMetaClassDeclareReservedUnused(IOFireWirePowerManager, 9); -}; - -#endif \ No newline at end of file diff --git a/i386/include/IOKit/firewire/IOFireWireUnit.h b/i386/include/IOKit/firewire/IOFireWireUnit.h deleted file mode 100644 index 6509b94..0000000 --- a/i386/include/IOKit/firewire/IOFireWireUnit.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * - * IOFireWireUnit.h - * - * - */ -#ifndef _IOKIT_IOFIREWIREUNIT_H -#define _IOKIT_IOFIREWIREUNIT_H - -// public -#include <IOKit/firewire/IOFireWireNub.h> - -class IOFireWireDevice; -class IOFireWireUnit; - -#pragma mark - - -/*! - @class IOFireWireUnitAux -*/ - -class IOFireWireUnitAux : public IOFireWireNubAux -{ - OSDeclareDefaultStructors(IOFireWireUnitAux) - - friend class IOFireWireUnit; - -protected: - - /*! - @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - - struct ExpansionData { }; - - /*! - @var reserved - Reserved for future use. (Internal use only) - */ - - ExpansionData * reserved; - - virtual bool init( IOFireWireUnit * primary ); - virtual void free(); - - virtual bool isPhysicalAccessEnabled( void ); - - virtual IOFWSimpleContiguousPhysicalAddressSpace * createSimpleContiguousPhysicalAddressSpace( vm_size_t size, IODirection direction ); - - virtual IOFWSimplePhysicalAddressSpace * createSimplePhysicalAddressSpace( vm_size_t size, IODirection direction ); - -private: - OSMetaClassDeclareReservedUnused(IOFireWireUnitAux, 0); - OSMetaClassDeclareReservedUnused(IOFireWireUnitAux, 1); - OSMetaClassDeclareReservedUnused(IOFireWireUnitAux, 2); - OSMetaClassDeclareReservedUnused(IOFireWireUnitAux, 3); - -}; - -#pragma mark - - -/*! @class IOFireWireUnit -*/ -class IOFireWireUnit : public IOFireWireNub -{ - OSDeclareDefaultStructors(IOFireWireUnit) - - friend class IOFireWireUnitAux; - friend class IOFireWireDevice; - -protected: - IOFireWireDevice *fDevice; // The device unit is part of - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - -/*------------------Methods provided to FireWire device clients-----------------------*/ -public: - - virtual bool init(OSDictionary *propTable, IOConfigDirectory *directory); - - /* - * Standard nub initialization - */ - virtual bool attach(IOService * provider ); - virtual void free(); - - /* - * Matching language support - * Match on the following properties of the unit: - * Vendor_ID - * GUID - * Unit_Spec_ID - * Unit_SW_Version - */ - virtual bool matchPropertyTable(OSDictionary * table); - - - virtual IOReturn message( UInt32 type, IOService * provider, void * argument ); - - // Override handleOpen() and handleClose() to pass on to device - virtual bool handleOpen( IOService * forClient, - IOOptionBits options, - void * arg ); - - virtual void handleClose( IOService * forClient, - IOOptionBits options ); - - virtual void setNodeFlags( UInt32 flags ); - virtual void clearNodeFlags( UInt32 flags ); - virtual UInt32 getNodeFlags( void ); - - virtual IOReturn setConfigDirectory( IOConfigDirectory *directory ); - - /* - * Create local FireWire address spaces for the device to access - */ - virtual IOFWPhysicalAddressSpace *createPhysicalAddressSpace(IOMemoryDescriptor *mem); - virtual IOFWPseudoAddressSpace *createPseudoAddressSpace(FWAddress *addr, UInt32 len, - FWReadCallback reader, FWWriteCallback writer, void *refcon); - -protected: - - virtual IOFireWireNubAux * createAuxiliary( void ); - -public: - void setMaxSpeed( IOFWSpeed speed ); - -protected: - void terminateUnit( void ); - static void terminateUnitThreadFunc( void * refcon ); - -private: - OSMetaClassDeclareReservedUnused(IOFireWireUnit, 0); - OSMetaClassDeclareReservedUnused(IOFireWireUnit, 1); - -}; - -#endif /* ! _IOKIT_IOFIREWIREDEVICE_H */ diff --git a/i386/include/IOKit/firewire/IOLocalConfigDirectory.h b/i386/include/IOKit/firewire/IOLocalConfigDirectory.h deleted file mode 100644 index 4be26df..0000000 --- a/i386/include/IOKit/firewire/IOLocalConfigDirectory.h +++ /dev/null @@ -1,110 +0,0 @@ -/* -* Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. -* -* @APPLE_LICENSE_HEADER_START@ -* -* The contents of this file constitute Original Code as defined in and -* are subject to the Apple Public Source License Version 1.1 (the -* "License"). You may not use this file except in compliance with the -* License. Please obtain a copy of the License at -* http://www.apple.com/publicsource and read it before using this file. -* -* This Original Code and all software distributed under the License are -* distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER -* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, -* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the -* License for the specific language governing rights and limitations -* under the License. -* -* @APPLE_LICENSE_HEADER_END@ -*/ - -#ifndef __IOLOCALCONFIGDIRECTORY_H__ -#define __IOLOCALCONFIGDIRECTORY_H__ - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOReturn.h> -#include <IOKit/firewire/IOFireWireFamilyCommon.h> -#include <IOKit/firewire/IOConfigDirectory.h> - -class OSArray; -class OSData; -class IOFireWireController; -class IOFWUserObjectExporter ; - -/*! @class IOLocalConfigDirectory -*/ -class IOLocalConfigDirectory : public IOConfigDirectory -{ - friend class IOFireWireController; - friend class IOFireWireUserClient ; - - OSDeclareDefaultStructors(IOLocalConfigDirectory); - -protected: - OSArray *fEntries; // Entries for this directory. - OSData *fROM; // Local ROM, if compiled. - UInt32 fHeader; // Num entries and CRC. - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - virtual bool init(); - virtual void free(); - - virtual const UInt32 *getBase(); - virtual IOConfigDirectory *getSubDir(int start, int type); - -public: - static IOLocalConfigDirectory *create(); - - /*! - @function update - makes sure that the ROM has at least the specified capacity, - and that the ROM is uptodate from its start to at least the - specified quadlet offset. - @result kIOReturnSuccess if the specified offset is now - accessable at romBase[offset]. - */ - virtual IOReturn update(UInt32 offset, const UInt32 *&romBase); - - virtual IOReturn compile(OSData *rom); - - // All flavours of addEntry eat a retain of the desc string - virtual IOReturn addEntry(int key, UInt32 value, OSString *desc = NULL); - virtual IOReturn addEntry(int key, IOLocalConfigDirectory *value, - OSString *desc = NULL); - virtual IOReturn addEntry(int key, OSData *value, OSString *desc = NULL); - virtual IOReturn addEntry(int key, FWAddress value, OSString *desc = NULL); - virtual IOReturn removeSubDir(IOLocalConfigDirectory *value); - const OSArray *getEntries() const; - - virtual IOReturn getIndexValue(int index, IOConfigDirectory *&value); - -protected: - - virtual const UInt32 * lockData( void ); - virtual void unlockData( void ); - virtual IOReturn updateROMCache( UInt32 offset, UInt32 length ); - virtual IOReturn checkROMState( void ); - - // call eats a retain count - virtual IOReturn addEntry(OSString *desc); - - IOReturn incrementGeneration( void ); - static void exporterCleanup( const OSObject * self, IOFWUserObjectExporter * exporter ) ; - -private: - OSMetaClassDeclareReservedUsed(IOLocalConfigDirectory, 0); - OSMetaClassDeclareReservedUnused(IOLocalConfigDirectory, 1); - OSMetaClassDeclareReservedUnused(IOLocalConfigDirectory, 2); -}; - -#endif /* __IOLOCALCONFIGDIRECTORY_H__ */ diff --git a/i386/include/IOKit/firewire/IORemoteConfigDirectory.h b/i386/include/IOKit/firewire/IORemoteConfigDirectory.h deleted file mode 100644 index 7ddbb7c..0000000 --- a/i386/include/IOKit/firewire/IORemoteConfigDirectory.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __IOREMOTECONFIGDIRECTORY_H__ -#define __IOREMOTECONFIGDIRECTORY_H__ - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOReturn.h> - -#include <IOKit/firewire/IOFireWireFamilyCommon.h> -#include <IOKit/firewire/IOConfigDirectory.h> - -#include "IOFireWireROMCache.h" - -class OSString; -class OSIterator; -class IOFireWireDevice; - -/*! @class IORemoteConfigDirectory -*/ -class IORemoteConfigDirectory : public IOConfigDirectory -{ - OSDeclareDefaultStructors(IORemoteConfigDirectory); - -protected: - IOFireWireROMCache *fROM; // Our cache of the ROM - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - virtual bool initWithOwnerOffset(IOFireWireROMCache *rom, - int start, int type); - virtual void free(); - - virtual const UInt32 *getBase(); - virtual IOConfigDirectory *getSubDir(int start, int type); - -public: - static IOConfigDirectory *withOwnerOffset(IOFireWireROMCache *rom, - int start, int type); - - - /*! - @function update - makes sure that the ROM has at least the specified capacity, - and that the ROM is uptodate from its start to at least the - specified quadlet offset. - @result kIOReturnSuccess if the specified offset is now - accessable at romBase[offset]. - */ - virtual IOReturn update(UInt32 offset, const UInt32 *&romBase); - -protected: - - virtual const UInt32 * lockData( void ); - virtual void unlockData( void ); - virtual IOReturn updateROMCache( UInt32 offset, UInt32 length ); - virtual IOReturn checkROMState( void ); - -private: - OSMetaClassDeclareReservedUnused(IORemoteConfigDirectory, 0); - OSMetaClassDeclareReservedUnused(IORemoteConfigDirectory, 1); - OSMetaClassDeclareReservedUnused(IORemoteConfigDirectory, 2); -}; - - -#endif /* __IOREMOTECONFIGDIRECTORY_H__ */ diff --git a/i386/include/IOKit/graphics/IOAccelClientConnect.h b/i386/include/IOKit/graphics/IOAccelClientConnect.h deleted file mode 100644 index 80ff711..0000000 --- a/i386/include/IOKit/graphics/IOAccelClientConnect.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOACCEL_CLIENT_CONNECT_H -#define _IOACCEL_CLIENT_CONNECT_H - - -/* -** The IOAccelerator service name -*/ -#define kIOAcceleratorClassName "IOAccelerator" - - -/* -** IOAccelerator public client types. Private client types start with -** kIOAccelNumClientTypes. -*/ -enum eIOAcceleratorClientTypes { - kIOAccelSurfaceClientType, - kIOAccelNumClientTypes -}; - - -#endif /* _IOACCEL_CLIENT_CONNECT_H */ - diff --git a/i386/include/IOKit/graphics/IOAccelSurfaceConnect.h b/i386/include/IOKit/graphics/IOAccelSurfaceConnect.h deleted file mode 100644 index b597370..0000000 --- a/i386/include/IOKit/graphics/IOAccelSurfaceConnect.h +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOACCEL_SURFACE_CONNECT_H -#define _IOACCEL_SURFACE_CONNECT_H - -#include <IOKit/graphics/IOAccelTypes.h> -#include <IOKit/graphics/IOAccelClientConnect.h> - -/* -** Surface visible region in device coordinates. -** -** num_rects: The number of rectangles in the rect array. If num_rects -** is zero the bounds rectangle is used for the visible rectangle. -** If num_rects is zero the surface must be completely contained -** by the device. -** -** bounds: The unclipped surface rectangle in device coords. Extends -** beyond the device bounds if the surface is not totally on -** the device. -** -** rect[]: An array of visible rectangles in device coords. If num_rects -** is non-zero only the region described by these rectangles is -** copied to the frame buffer during a flush operation. -*/ -typedef struct -{ - UInt32 num_rects; - IOAccelBounds bounds; - IOAccelBounds rect[0]; -} IOAccelDeviceRegion; - - -/* -** Determine the size of a region. -*/ -#define IOACCEL_SIZEOF_DEVICE_REGION(_rgn_) (sizeof(IOAccelDeviceRegion) + (_rgn_)->num_rects * sizeof(IOAccelBounds)) - - -/* -** Surface client public memory types. Private memory types start with -** kIOAccelNumSurfaceMemoryTypes. -*/ -enum eIOAccelSurfaceMemoryTypes { - kIOAccelNumSurfaceMemoryTypes -}; - - -/* -** Surface client public methods. Private methods start with -** kIOAccelNumSurfaceMethods. -*/ -enum eIOAccelSurfaceMethods { - kIOAccelSurfaceReadLockOptions, - kIOAccelSurfaceReadUnlockOptions, - kIOAccelSurfaceGetState, - kIOAccelSurfaceWriteLockOptions, - kIOAccelSurfaceWriteUnlockOptions, - kIOAccelSurfaceRead, - kIOAccelSurfaceSetShapeBacking, - - kIOAccelSurfaceSetIDMode, - kIOAccelSurfaceSetScale, - - kIOAccelSurfaceSetShape, - kIOAccelSurfaceFlush, - - kIOAccelSurfaceQueryLock, - - kIOAccelSurfaceReadLock, - kIOAccelSurfaceReadUnlock, - kIOAccelSurfaceWriteLock, - kIOAccelSurfaceWriteUnlock, - - kIOAccelSurfaceControl, - kIOAccelSurfaceSetShapeBackingAndLength, - - kIOAccelNumSurfaceMethods -}; - - -/* -** Option bits for IOAccelCreateSurface and the kIOAccelSurfaceSetIDMode method. -** The color depth field can take any value of the _CGSDepth enumeration. -*/ -typedef enum { - kIOAccelSurfaceModeColorDepth1555 = 0x00000003, - kIOAccelSurfaceModeColorDepth8888 = 0x00000004, -// kIOAccelSurfaceModeColorDepthRGB565 = 0x00000005, - kIOAccelSurfaceModeColorDepthYUV = 0x00000006, - kIOAccelSurfaceModeColorDepthYUV9 = 0x00000007, - kIOAccelSurfaceModeColorDepthYUV12 = 0x00000008, - kIOAccelSurfaceModeColorDepthYUV2 = 0x00000009, - kIOAccelSurfaceModeColorDepthBGRA32 = 0x0000000A, - -// kIOAccelSurfaceModeColorDepthRGBA64 = 0x0000000B, -// kIOAccelSurfaceModeColorDepthRGBAFloat64 = 0x0000000C, -// kIOAccelSurfaceModeColorDepthRGBAFloat128 = 0x0000000D, - -// kIOAccelSurfaceModeColorDepthYUV420 = 0x0000000E, - kIOAccelSurfaceModeColorDepth2101010 = 0x0000000F, - - kIOAccelSurfaceModeColorDepthBits = 0x0000000F, - - kIOAccelSurfaceModeStereoBit = 0x00000010, - kIOAccelSurfaceModeWindowedBit = 0x00000020, - - kIOAccelSurfaceModeBeamSync = 0x00008000 -} eIOAccelSurfaceModeBits; - - -/* -** Options bits for IOAccelSetSurfaceShape and the kIOAccelSurfaceSetShape method. -*/ -typedef enum { - kIOAccelSurfaceShapeNone = 0x00000000, - kIOAccelSurfaceShapeNonBlockingBit = 0x00000001, - kIOAccelSurfaceShapeNonSimpleBit = 0x00000002, - kIOAccelSurfaceShapeIdentityScaleBit = 0x00000004, - kIOAccelSurfaceShapeFrameSyncBit = 0x00000008, - kIOAccelSurfaceShapeBeamSyncBit = 0x00000010, - kIOAccelSurfaceShapeStaleBackingBit = 0x00000020, - kIOAccelSurfaceShapeAssemblyBit = 0x00000040, - kIOAccelSurfaceShapeWaitEnabledBit = 0x00000080, - - /* wrong name, use kIOAccelSurfaceShapeNonBlockingBit */ - kIOAccelSurfaceShapeBlockingBit = kIOAccelSurfaceShapeNonBlockingBit -} eIOAccelSurfaceShapeBits; - -/* -** Return bits for the kIOAccelSurfaceGetState method. -*/ -typedef enum { - kIOAccelSurfaceStateNone = 0x00000000, - kIOAccelSurfaceStateIdleBit = 0x00000001 -} eIOAccelSurfaceStateBits; - -/* -** Option bits for the kIOAccelSurfaceSetScale method. -*/ -typedef enum { - kIOAccelSurfaceBeamSyncSwaps = 0x00000001, - kIOAccelSurfaceFixedSource = 0x00000002, - - kIOAccelSurfaceFiltering = 0x000000f0, - kIOAccelSurfaceFilterDefault = 0x00000000, - kIOAccelSurfaceFilterNone = 0x00000010, - kIOAccelSurfaceFilterLinear = 0x00000020 - -} eIOAccelSurfaceScaleBits; - -/* -** Option bits for the kIOAccelSurfaceLock methods. -*/ -typedef enum { - kIOAccelSurfaceLockInBacking = 0, - kIOAccelSurfaceLockInAccel = 1, - kIOAccelSurfaceLockInDontCare = 2, - kIOAccelSurfaceLockInMask = 0x00000003 -} eIOAccelSurfaceLockBits; - -#endif /* _IOACCEL_SURFACE_CONNECT_H */ - diff --git a/i386/include/IOKit/graphics/IOAccelTypes.h b/i386/include/IOKit/graphics/IOAccelTypes.h deleted file mode 100644 index 09084c1..0000000 --- a/i386/include/IOKit/graphics/IOAccelTypes.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOACCEL_TYPES_H -#define _IOACCEL_TYPES_H - -#include <IOKit/IOTypes.h> -#include <IOKit/IOKitKeys.h> - -#define IOACCEL_TYPES_REV 12 - -#if !defined(OSTYPES_K64_REV) && !defined(MAC_OS_X_VERSION_10_6) -#define IOACCELTYPES_10_5 1 -#endif - -/* Integer rectangle in device coordinates */ -typedef struct -{ - SInt16 x; - SInt16 y; - SInt16 w; - SInt16 h; -} IOAccelBounds; - -typedef struct -{ - SInt16 w; - SInt16 h; -} IOAccelSize; - -/* Surface information */ - -enum { - kIOAccelVolatileSurface = 0x00000001, - kIOAccelKeycolorSurface = 0x00000002 -}; - -typedef struct -{ -#if IOACCELTYPES_10_5 - vm_address_t address[4]; -#else - mach_vm_address_t address[4]; -#endif /* IOACCELTYPES_10_5 */ - UInt32 rowBytes; - UInt32 width; - UInt32 height; - UInt32 pixelFormat; - IOOptionBits flags; - IOFixed colorTemperature[4]; - UInt32 typeDependent[4]; -} IOAccelSurfaceInformation; - -typedef struct -{ -#if IOACCELTYPES_10_5 - long x, y, w, h; - void *client_addr; - unsigned long client_row_bytes; -#else - SInt32 x, y, w, h; - mach_vm_address_t client_addr; - UInt32 client_row_bytes; -#endif /* IOACCELTYPES_10_5 */ -} IOAccelSurfaceReadData; - -typedef struct { - IOAccelBounds buffer; - IOAccelSize source; - UInt32 reserved[8]; -} IOAccelSurfaceScaling; - - -typedef SInt32 IOAccelID; - -enum { - kIOAccelPrivateID = 0x00000001 -}; - - -#endif /* _IOACCEL_TYPES_H */ - diff --git a/i386/include/IOKit/graphics/IOAccelerator.h b/i386/include/IOKit/graphics/IOAccelerator.h deleted file mode 100644 index 1c2119c..0000000 --- a/i386/include/IOKit/graphics/IOAccelerator.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IO_ACCELERATOR_H -#define _IO_ACCELERATOR_H - -#include <IOKit/IOService.h> -#include <IOKit/graphics/IOAccelTypes.h> - -class IOAccelerator : public IOService -{ - OSDeclareDefaultStructors(IOAccelerator) - -public: - static IOReturn createAccelID(IOOptionBits options, IOAccelID * identifier); - static IOReturn retainAccelID(IOOptionBits options, IOAccelID identifier); - static IOReturn releaseAccelID(IOOptionBits options, IOAccelID identifier); - -}; - - -#endif /* _IO_ACCELERATOR_H */ - diff --git a/i386/include/IOKit/graphics/IODisplay.h b/i386/include/IOKit/graphics/IODisplay.h deleted file mode 100644 index adcfc49..0000000 --- a/i386/include/IOKit/graphics/IODisplay.h +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IODISPLAY_H -#define _IOKIT_IODISPLAY_H - -#include <IOKit/IOService.h> -#include <IOKit/graphics/IOFramebuffer.h> - -extern const OSSymbol * gIODisplayParametersKey; -extern const OSSymbol * gIODisplayGUIDKey; - -extern const OSSymbol * gIODisplayValueKey; -extern const OSSymbol * gIODisplayMinValueKey; -extern const OSSymbol * gIODisplayMaxValueKey; - -extern const OSSymbol * gIODisplayContrastKey; -extern const OSSymbol * gIODisplayBrightnessKey; -extern const OSSymbol * gIODisplayHorizontalPositionKey; -extern const OSSymbol * gIODisplayHorizontalSizeKey; -extern const OSSymbol * gIODisplayVerticalPositionKey; -extern const OSSymbol * gIODisplayVerticalSizeKey; -extern const OSSymbol * gIODisplayTrapezoidKey; -extern const OSSymbol * gIODisplayPincushionKey; -extern const OSSymbol * gIODisplayParallelogramKey; -extern const OSSymbol * gIODisplayRotationKey; -extern const OSSymbol * gIODisplayOverscanKey; -extern const OSSymbol * gIODisplayVideoBestKey; - -extern const OSSymbol * gIODisplayParametersTheatreModeKey; -extern const OSSymbol * gIODisplayParametersTheatreModeWindowKey; - -extern const OSSymbol * gIODisplayMCCSVersionKey; -extern const OSSymbol * gIODisplayTechnologyTypeKey; -extern const OSSymbol * gIODisplayUsageTimeKey; -extern const OSSymbol * gIODisplayFirmwareLevelKey; - -extern const OSSymbol * gIODisplaySpeakerVolumeKey; -extern const OSSymbol * gIODisplaySpeakerSelectKey; -extern const OSSymbol * gIODisplayMicrophoneVolumeKey; -extern const OSSymbol * gIODisplayAmbientLightSensorKey; -extern const OSSymbol * gIODisplayAudioMuteAndScreenBlankKey; -extern const OSSymbol * gIODisplayAudioTrebleKey; -extern const OSSymbol * gIODisplayAudioBassKey; -extern const OSSymbol * gIODisplayAudioBalanceLRKey; -extern const OSSymbol * gIODisplayAudioProcessorModeKey; -extern const OSSymbol * gIODisplayPowerModeKey; -extern const OSSymbol * gIODisplayManufacturerSpecificKey; - -extern const OSSymbol * gIODisplayParametersCommitKey; -extern const OSSymbol * gIODisplayParametersDefaultKey; -extern const OSSymbol * gIODisplayParametersFlushKey; - -enum { - kIODisplayNumPowerStates = 4, - kIODisplayMaxPowerState = kIODisplayNumPowerStates - 1 -}; - -// these are the private instance variables for power management -struct DisplayPMVars -{ - UInt32 currentState; - // highest state number normally, lowest usable state in emergency - unsigned long maxState; - // true if the display has had power lowered due to user inactivity - bool displayIdle; -}; - -class IODisplayConnect : public IOService -{ - OSDeclareDefaultStructors(IODisplayConnect) - -private: - IOIndex connection; - -protected: -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of this class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * reserved; - -public: - virtual bool initWithConnection( IOIndex connection ); - virtual IOFramebuffer * getFramebuffer( void ); - virtual IOIndex getConnection( void ); - virtual IOReturn getAttributeForConnection( IOSelect selector, uintptr_t * value ); - virtual IOReturn setAttributeForConnection( IOSelect selector, uintptr_t value ); - virtual void joinPMtree ( IOService * driver ); -}; - -class IODisplay : public IOService -{ - OSDeclareAbstractStructors(IODisplay) - -public: - static void initialize( void ); - -protected: - // used to query the framebuffer controller - IODisplayConnect * fConnection; - class IODisplayParameterHandler * fParameterHandler; - void * __resv; - IONotifier * fNotifier; - - // pointer to protected instance variables for power management - struct DisplayPMVars * fDisplayPMVars; - - // reserved for future expansion - void * _IODisplay_reserved[32]; - -public: - virtual IOService * probe( IOService * provider, - SInt32 * score ); - - virtual bool start( IOService * provider ); - virtual void stop( IOService * provider ); - virtual void free(); - - virtual IODisplayConnect * getConnection( void ); - - virtual IOReturn getConnectFlagsForDisplayMode( - IODisplayModeID mode, UInt32 * flags ); - - virtual IOReturn getGammaTableByIndex( - UInt32 * channelCount, UInt32 * dataCount, - UInt32 * dataWidth, void ** data ); - - virtual IOReturn readFramebufferEDID( void ); - - // - virtual IOReturn framebufferEvent( IOFramebuffer * framebuffer, - IOIndex event, void * info ); - - // parameter setting - virtual IOReturn setProperties( OSObject * properties ); - virtual bool setForKey( OSDictionary * params, const OSSymbol * key, - SInt32 value, SInt32 min, SInt32 max ); - - static bool addParameter( OSDictionary * params, const OSSymbol * paramName, SInt32 min, SInt32 max ); - static bool setParameter( OSDictionary * params, const OSSymbol * paramName, SInt32 value ); - static OSDictionary * getIntegerRange( OSDictionary * params, const OSSymbol * sym, - SInt32 * value, SInt32 * min, SInt32 * max ); - - // low level set/get - virtual bool doIntegerSet( OSDictionary * params, - const OSSymbol * paramName, UInt32 value ); - virtual bool doDataSet( const OSSymbol * paramName, OSData * value ); - virtual bool doUpdate( void ); - - // power management methods - virtual IOReturn setPowerState( unsigned long, IOService * ); - virtual unsigned long maxCapabilityForDomainState( IOPMPowerFlags ); - virtual unsigned long initialPowerStateForDomainState( IOPMPowerFlags ); - virtual unsigned long powerStateForDomainState( IOPMPowerFlags ); - - // - virtual void initPowerManagement( IOService * provider); - virtual void dropOneLevel( void ); - virtual void makeDisplayUsable( void ); - -private: - OSMetaClassDeclareReservedUnused(IODisplay, 0); - OSMetaClassDeclareReservedUnused(IODisplay, 1); - OSMetaClassDeclareReservedUnused(IODisplay, 2); - OSMetaClassDeclareReservedUnused(IODisplay, 3); - OSMetaClassDeclareReservedUnused(IODisplay, 4); - OSMetaClassDeclareReservedUnused(IODisplay, 5); - OSMetaClassDeclareReservedUnused(IODisplay, 6); - OSMetaClassDeclareReservedUnused(IODisplay, 7); - OSMetaClassDeclareReservedUnused(IODisplay, 8); - OSMetaClassDeclareReservedUnused(IODisplay, 9); - OSMetaClassDeclareReservedUnused(IODisplay, 10); - OSMetaClassDeclareReservedUnused(IODisplay, 11); - OSMetaClassDeclareReservedUnused(IODisplay, 12); - OSMetaClassDeclareReservedUnused(IODisplay, 13); - OSMetaClassDeclareReservedUnused(IODisplay, 14); - OSMetaClassDeclareReservedUnused(IODisplay, 15); - OSMetaClassDeclareReservedUnused(IODisplay, 16); - OSMetaClassDeclareReservedUnused(IODisplay, 17); - OSMetaClassDeclareReservedUnused(IODisplay, 18); - OSMetaClassDeclareReservedUnused(IODisplay, 19); - -private: - static IOReturn _framebufferEvent( OSObject * self, void * ref, - IOFramebuffer *framebuffer, IOIndex event, void * info ); - - bool addParameterHandler( IODisplayParameterHandler * parameterHandler ); - bool removeParameterHandler( IODisplayParameterHandler * parameterHandler ); - static bool updateNumber( OSDictionary * params, const OSSymbol * key, SInt32 value ); -}; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -class IOBacklightDisplay : public IODisplay -{ - OSDeclareDefaultStructors(IOBacklightDisplay) - -protected: - // User preferred brightness level - SInt32 fCurrentUserBrightness; - SInt32 fCurrentBrightness; - UInt32 fCurrentPowerState; - SInt32 fMinBrightness; - SInt32 fMaxBrightness; - UInt16 fMaxBrightnessLevel[kIODisplayNumPowerStates]; - -public: - virtual IOService * probe( IOService *, SInt32 * ); - virtual void stop( IOService * provider ); - virtual IOReturn setPowerState( unsigned long, IOService * ); - virtual unsigned long maxCapabilityForDomainState( IOPMPowerFlags ); - virtual unsigned long initialPowerStateForDomainState( IOPMPowerFlags ); - virtual unsigned long powerStateForDomainState( IOPMPowerFlags ); - - // - virtual void initPowerManagement( IOService * ); - -public: - virtual bool doIntegerSet( OSDictionary * params, - const OSSymbol * paramName, UInt32 value ); - virtual bool doUpdate( void ); - virtual void makeDisplayUsable( void ); - virtual bool setBrightness( SInt32 value ); - -private: - void handlePMSettingCallback(const OSSymbol *, OSObject *, uintptr_t); - - OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 0); - OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 1); - OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 2); - OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 3); - OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 4); - OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 5); - OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 6); - OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 7); - OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 8); - OSMetaClassDeclareReservedUnused(IOBacklightDisplay, 9); -}; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -class IODisplayParameterHandler : public IOService -{ - OSDeclareDefaultStructors(IODisplayParameterHandler) - -public: - virtual bool setDisplay( IODisplay * display ) = 0; - virtual bool doIntegerSet( OSDictionary * params, - const OSSymbol * paramName, UInt32 value ) = 0; - virtual bool doDataSet( const OSSymbol * paramName, OSData * value ) = 0; - virtual bool doUpdate( void ) = 0; - -private: - OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 0); - OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 1); - OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 2); - OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 3); - OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 4); - OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 5); - OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 6); - OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 7); - OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 8); - OSMetaClassDeclareReservedUnused(IODisplayParameterHandler, 9); -}; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#endif /* ! _IOKIT_IODISPLAY_H */ - diff --git a/i386/include/IOKit/graphics/IOFramebuffer.h b/i386/include/IOKit/graphics/IOFramebuffer.h deleted file mode 100644 index 16a5ffd..0000000 --- a/i386/include/IOKit/graphics/IOFramebuffer.h +++ /dev/null @@ -1,827 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOFRAMEBUFFER_H -#define _IOKIT_IOFRAMEBUFFER_H - -#include <IOKit/IOService.h> -#include <IOKit/IOInterruptEventSource.h> -#include <IOKit/graphics/IOGraphicsDevice.h> -#include <IOKit/graphics/IOFramebufferShared.h> -#include <IOKit/IOLib.h> - -class IOFramebuffer; -class IOBufferMemoryDescriptor; - -typedef void (*CursorBlitProc)( - IOFramebuffer * inst, - void * shmem, - volatile unsigned char *vramPtr, - unsigned int cursStart, - unsigned int vramRow, - unsigned int cursRow, - int width, - int height ); - -typedef void (*CursorRemoveProc)( - IOFramebuffer * inst, - void * shmem, - volatile unsigned char *vramPtr, - unsigned int vramRow, - int width, - int height ); - - -typedef void * IOFBCursorRef; - -struct IOFBCursorControlCallouts { - IOReturn (*setCursorImage) (void * self, void * ref, - IOHardwareCursorDescriptor * description, IOFBCursorRef cursorImage); - IOReturn (*setCursorState) (void * self, void * ref, - SInt32 x, SInt32 y, bool visible); - UInt32 reserved[30]; -}; -typedef struct IOFBCursorControlCallouts IOFBCursorControlCallouts; - -struct IOFBCursorControlAttribute { - void * self; - void * ref; - const IOFBCursorControlCallouts * callouts; - UInt32 reserved[29]; -}; -typedef struct IOFBCursorControlAttribute IOFBCursorControlAttribute; - -// clock & data values -enum { - kIODDCLow = 0, - kIODDCHigh = 1, - kIODDCTristate = 2 -}; -// ddcBlockType constants -enum { - // EDID block type. - kIODDCBlockTypeEDID = 0 -}; - -// ddcFlags constants -enum { - // Force a new read of the EDID. - kIODDCForceRead = 0x00000001 -}; - -enum { - kDisabledInterruptState = 0, - kEnabledInterruptState = 1 -}; - -typedef void (*IOFBInterruptProc)( OSObject * target, void * ref ); - - -typedef IOReturn (*IOFramebufferNotificationHandler) - (OSObject * self, void * ref, - IOFramebuffer * framebuffer, IOIndex event, - void * info); - -// IOFramebufferNotificationHandler events -enum { - kIOFBNotifyDisplayModeWillChange = 1, - kIOFBNotifyDisplayModeDidChange = 2, - - kIOFBNotifyWillSleep = 3, - kIOFBNotifyDidWake = 4, - - kIOFBNotifyDidPowerOff = 5, - kIOFBNotifyWillPowerOn = 6, - - kIOFBNotifyDidSleep = kIOFBNotifyDidPowerOff, - kIOFBNotifyWillWake = kIOFBNotifyWillPowerOn, - - kIOFBNotifyWillPowerOff = 7, - kIOFBNotifyDidPowerOn = 8, - - kIOFBNotifyWillChangeSpeed = 9, - kIOFBNotifyDidChangeSpeed = 10, - - kIOFBNotifyClamshellChange = 20, - - kIOFBNotifyCaptureChange = 30, - - kIOFBNotifyOnlineChange = 40, - - kIOFBNotifyDisplayDimsChange = 50, - - kIOFBNotifyProbed = 60, -}; - -enum { - kFBDisplayUsablePowerState = 0x80000000, - kFBDisplayPowerStateMask = 0x0000ffff -}; - -#define kIOFBDependentIDKey "IOFBDependentID" -#define kIOFBDependentIndexKey "IOFBDependentIndex" - -struct StdFBShmem_t; -class IOFramebufferUserClient; - -/*! @class IOFramebuffer : public IOGraphicsDevice - @abstract The base class for graphics devices to be made available as part of the desktop. - @discussion The IOFramebuffer base class defines APIs used to publish a linear framebuffer device. Device driver writers should subclass this class to provide a X native driver. Mac OS X will also utilize 'ndrv' drivers via a subclass of IOFramebuffer IONDRVFramebuffer that does not require device driver writers to provide a X native driver. - - There are no in kernel clients of IOFramebuffer aside from rudimentary console and panic UI supported by the IOFramebuffer class. The IOFramebuffer class provides the IOUserClient implementation to allow the CoreGraphics server to provide the user accessible interface to all displays on a Mac OS X system, and this is further layered underneath application frameworks. Device driver writers should not need any knowledge of this part of the interfaces. Similarly the instance variables of IOFramebuffer are mostly used for cursor rendering which is handled by the IOFramebuffer class, and should be avoided by subclass implementors. Only IOFramebuffer methods with header documentation in this header are designed for subclasses to implement. - - IOFramebuffer provides simple dumb framebuffer operation - accceleration for 2D, 3D and video may be provided by a separate implementation of the IOAccelerator class. -*/ - -class IOFramebuffer : public IOGraphicsDevice -{ - friend class IOFramebufferUserClient; - friend class IOFramebufferSharedUserClient; - friend class IODisplay; - - OSDeclareDefaultStructors(IOFramebuffer) - -protected: -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of this class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * reserved; - -private: - -protected: - StdFBShmem_t * priv; - int shmemClientVersion; - IOBufferMemoryDescriptor * sharedCursor; - - union { - struct { - /* Mapping tables used in cursor drawing to 5-5-5 displays. */ - unsigned char * _bm34To35SampleTable; - unsigned char * _bm35To34SampleTable; - /* Mapping tables used in cursor drawing to 8-bit RGB displays. */ - unsigned int * _bm256To38SampleTable; - unsigned char * _bm38To256SampleTable; - } t; - UInt8 * tables[ 4 ]; - } colorConvert; - - /* cursor blitting vars */ - CursorBlitProc cursorBlitProc; - CursorRemoveProc cursorRemoveProc; - - IOGSize maxCursorSize; - void * _IOFramebuffer_reservedE[7]; - const char * thisName; - volatile unsigned char * cursorSave; - unsigned int white; - - IOGPoint nextCursorLoc; - int nextCursorFrame; - SInt32 connectChange; - semaphore_t vblSemaphore; - - /* memory ranges */ - volatile unsigned char * frameBuffer; - unsigned int totalWidth; - unsigned int rowBytes; - unsigned int bytesPerPixel; - - IOMemoryMap * vramMap; - IOByteCount vramMapOffset; - OSArray * userAccessRanges; - unsigned int suspended:1; - unsigned int captured:1; - unsigned int sleepConnectCheck:1; - unsigned int messaged:1; - unsigned int _IOFramebuffer_reservedC:28; - IOFramebuffer * nextDependent; - OSSet * fbNotifications; - - class IOFramebufferUserClient * serverConnect; - class IOFramebufferSharedUserClient * sharedConnect; - - unsigned int opened:1; - unsigned int dead:1; - unsigned int configPending:1; - unsigned int serverNotified:1; - unsigned int serverState:1; - unsigned int serverPendingAck:1; - unsigned int isUsable:1; - unsigned int mirrored:1; - unsigned int pendingPowerState:4; - unsigned int pendingPowerChange:1; - unsigned int pagingState:1; - unsigned int mirrorPrimary:1; - unsigned int mirrorSWCursor:1; - - bool clutValid; - bool currentMono; - bool needCursorService; - bool haveVBLService; - bool haveHWCursor; - bool hwCursorLoaded; - - void * serverMsg; - IOInterruptEventSource * deferredEvents; - - /* Reserved for future expansion. */ - int _IOFramebuffer_reserved[5]; - -private: - struct IOFramebufferPrivate * __private; - -public: -/*! @function doI2CRequest - @abstract Carry out an I2C request. - @discussion IOFramebuffer subclasses may optionally implement this method to perform I2C bus requests on one of the buses they support. Alternatively they may implement the setDDCClock(), setDDCData(), readDDCClock(), readDDCData() methods and respond from getAttributeForConnection() to the kConnectionSupportsLLDDCSense attribute with success, in which case IOFramebuffer::doI2CRequest() will carry out a software implementation of I2C using the low level routines and conforming to the timing constraints passed in the timing parameter. Subclasses may pass timing parameters tuned for the specific bus, otherwise VESA DDC defaults will apply. - @timing event Subclasses may pass timing parameters tuned for the specific bus, otherwise if NULL, VESA DDC defaults will apply. - @param request An IOI2CRequest structure. The request should be carried out synchronously if the completion routine is NULL, otherwise it may optionally be carried out asynchronously. The completion routine should be called if supplied. - @result an IOReturn code. If kIOReturnSuccces, the result of the transaction is returned in the requests result field. -*/ - virtual IOReturn doI2CRequest( UInt32 bus, struct IOI2CBusTiming * timing, struct IOI2CRequest * request ); - -private: - OSMetaClassDeclareReservedUsed(IOFramebuffer, 0); - - OSMetaClassDeclareReservedUnused(IOFramebuffer, 1); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 2); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 3); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 4); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 5); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 6); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 7); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 8); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 9); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 10); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 11); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 12); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 13); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 14); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 15); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 16); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 17); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 18); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 19); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 20); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 21); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 22); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 23); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 24); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 25); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 26); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 27); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 28); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 29); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 30); - OSMetaClassDeclareReservedUnused(IOFramebuffer, 31); - - -public: - static void initialize(); - - virtual bool requestTerminate( IOService * provider, IOOptionBits options ); - virtual IOService * probe( IOService * provider, SInt32 * score ); - virtual bool start( IOService * provider ); - virtual void stop( IOService * provider ); - virtual void free(); - virtual IOWorkLoop * getWorkLoop() const; - - IOWorkLoop * getGraphicsSystemWorkLoop() const; - IOWorkLoop * getControllerWorkLoop() const; - - virtual IOReturn requestProbe( IOOptionBits options ); - - virtual IOReturn powerStateWillChangeTo ( IOPMPowerFlags, unsigned long, IOService* ); - virtual IOReturn powerStateDidChangeTo ( IOPMPowerFlags, unsigned long, IOService* ); - virtual IOReturn setPowerState( unsigned long powerStateOrdinal, IOService * device); - virtual IOReturn setAggressiveness( unsigned long type, unsigned long newLevel ); - virtual IOReturn getAggressiveness( unsigned long type, unsigned long * currentLevel ); - virtual IOReturn newUserClient( task_t owningTask, - void * security_id, - UInt32 type, - IOUserClient ** handler ); - virtual IOReturn callPlatformFunction( const OSSymbol * functionName, - bool waitForFunction, - void *p1, void *p2, - void *p3, void *p4 ); - - virtual void hideCursor( void ); - virtual void showCursor( IOGPoint * cursorLoc, int frame ); - virtual void moveCursor( IOGPoint * cursorLoc, int frame ); - // virtual - void resetCursor( void ); - - virtual void getVBLTime( AbsoluteTime * time, AbsoluteTime * delta ); - - virtual void getBoundingRect ( IOGBounds ** bounds ); - - virtual IOReturn open( void ); - - virtual void close( void ); - - virtual bool isConsoleDevice( void ); - - virtual IOReturn setupForCurrentConfig( void ); - - virtual bool serializeInfo( OSSerialize * s ); - virtual bool setNumber( OSDictionary * dict, const char * key, - UInt32 number ); - - IONotifier * addFramebufferNotification( - IOFramebufferNotificationHandler handler, - OSObject * self, void * ref); - -/*! @function getApertureRange - @abstract Return reference to IODeviceMemory object representing memory range of framebuffer. - @discussion IOFramebuffer subclasses must implement this method to describe the memory used by the framebuffer in the current mode. The OS will map this memory range into user space for client access - the range should only include vram memory not hardware registers. - @param aperture The system will only access the aperture kIOFBSystemAperture. - @result an IODeviceMemory instance. A reference will be consumed by the caller for each call of this method - the implementatation should create a new instance of IODeviceMemory for each call, or return one instance with a retain for each call. -*/ - - virtual IODeviceMemory * getApertureRange( IOPixelAperture aperture ) = 0; - -/*! @function getVRAMRange - @abstract Return reference to IODeviceMemory object representing memory range of all the cards vram. - @discussion IOFramebuffer subclasses should implement this method to describe all the vram memory available on the card. The OS will map this memory range into user space for client access - the range should only include vram memory not hardware registers. - @result an IODeviceMemory instance. A reference will be consumed by the caller for each call of this method - the implementatation should create a new instance of IODeviceMemory for each call, or return one instance with a retain for each call. -*/ - - virtual IODeviceMemory * getVRAMRange( void ); - -protected: - -/*! @function handleEvent - @abstract Notify IOFramebuffer superclass code of events. - @discussion IOFramebuffer subclasses should call this IOFramebuffer method on certain power state changes. - @param event The event that has occurred:<br> - kIOFBNotifyWillPowerOff call before entering a state other than the maximum.<br> - kIOFBNotifyDidPowerOn call after entering the maximum power state.<br> - kIOFBNotifyWillPowerOff call before entering a state other than the maximum.<br> - kIOFBNotifyDidPowerOn call after entering a state other than the maximum.<br> - @param info None of the above events require additional info, pass zero. - @result an IOReturn code, safely ignored. -*/ - - IOReturn handleEvent( IOIndex event, void * info = 0 ); - - - IOReturn deliverFramebufferNotification( - IOIndex event, void * info = 0 ); - -#ifdef IOFRAMEBUFFER_PRIVATE -#include <IOKit/graphics/IOFramebufferPrivate.h> -#endif - -public: -/*! @function enableController - @abstract Perform first time setup of the framebuffer. - @discussion IOFramebuffer subclasses should perform their initialization of the hardware here. The IOService start() method is not called at a time appropriate for this initialization. - @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from using the device. -*/ - - virtual IOReturn enableController( void ); - -/*! @function getPixelFormats - @abstract List the pixel formats the framebuffer supports. - @discussion IOFramebuffer subclasses must implement this method to return an array of strings representing the possible pixel formats available in the framebuffer. - @result A const char * pointer. The string consists of a concatenation of each pixel format string separated by the NULL character. The commonly supported pixel formats for Mac OS X are defined as IO8BitIndexedPixels, IO16BitDirectPixels, IO32BitDirectPixels. -*/ - - virtual const char * getPixelFormats( void ) = 0; - -/*! @function getDisplayModeCount - @abstract Return the number of display modes the framebuffer supports. - @discussion IOFramebuffer subclasses must implement this method to return a count of the display modes available. This count should change unless a connection change is posted for the device indicated the framebuffer and/or display configuration has changed. - @result A count of the display modes available. -*/ - - virtual IOItemCount getDisplayModeCount( void ) = 0; - -/*! @function getDisplayModes - @abstract Return the number of display modes the framebuffer supports. - @discussion IOFramebuffer subclasses must implement this method to return an array of display mode IDs available for the framebuffer. The IDs are defined by the driver in the range 0x00000001 - 0x7fffffff, and should be constant for a given display mode. - @param allDisplayModes A caller allocated buffer with the size given by the result of getDisplayModeCount(). - @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from using the device. -*/ - - virtual IOReturn getDisplayModes( IODisplayModeID * allDisplayModes ) = 0; - -/*! @function getInformationForDisplayMode - @abstract Return information about a given display mode. - @discussion IOFramebuffer subclasses must implement this method to return information in the IODisplayModeInformation structure for the display mode with the passed ID. - @param displayMode A display mode ID previously returned by getDisplayModes(). - @param info Pointer to a structure of type IODisplayModeInformation to be filled out by the driver. IODisplayModeInformation is documented in IOGraphicsTypes.h. - @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from using the device. -*/ - - virtual IOReturn getInformationForDisplayMode( IODisplayModeID displayMode, - IODisplayModeInformation * info ) = 0; - -/*! @function getPixelFormatsForDisplayMode - @abstract Obsolete. - @discussion IOFramebuffer subclasses must implement this method to return zero. - @param displayMode Ignored. - @param depth Ignored. - @result Return zero. -*/ - - virtual UInt64 getPixelFormatsForDisplayMode( IODisplayModeID displayMode, - IOIndex depth ) = 0; - -/*! @function getPixelInformation - @abstract Return information about the framebuffer format for a given display mode and depth. - @discussion IOFramebuffer subclasses must implement this method to return information in the IOPixelInformation structure for the display mode with the passed ID, depth index and aperture. The aperture utilized by the system is always kIOFBSystemAperture. Drivers may define alternative apertures, being a view of the framebuffer in a different pixel format from the default. - @param displayMode A display mode ID previously returned by getDisplayModes(). - @param depth An index from zero to the value of the maxDepthIndex field from the IODisplayModeInformation structure (inclusive). - @param info Pointer to a structure of type IOPixelInformation to be filled out by the driver. IOPixelInformation is documented in IOGraphicsTypes.h. - @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from using the device. -*/ - - virtual IOReturn getPixelInformation( - IODisplayModeID displayMode, IOIndex depth, - IOPixelAperture aperture, IOPixelInformation * pixelInfo ) = 0; - -/*! @function getCurrentDisplayMode - @abstract Return the framebuffers current display mode and depth. - @discussion IOFramebuffer subclasses must implement this method to return the current mode and depth. - @param displayMode A display mode ID representing the current mode. - @param depth An index indicating the depth configuration of the framebuffer. The index should range from zero to the value of the maxDepthIndex field from the IODisplayModeInformation structure for the display mode. - @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from using the device. -*/ - - virtual IOReturn getCurrentDisplayMode( IODisplayModeID * displayMode, - IOIndex * depth ) = 0; - -/*! @function setCurrentDisplayMode - @abstract Set the framebuffers current display mode and depth. - @discussion IOFramebuffer subclasses should implement this method to set the current mode and depth. Other than at enableController() time, this is the only method that should change the framebuffer format and is synchronized with clients and attached accelerators to make sure access to the device is disallowed during the change. - @param displayMode A display mode ID representing the new mode. - @param depth An index indicating the new depth configuration of the framebuffer. The index should range from zero to the value of the maxDepthIndex field from the IODisplayModeInformation structure for the display mode. - @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from using the device. -*/ - - virtual IOReturn setDisplayMode( IODisplayModeID displayMode, - IOIndex depth ); - -/*! @function setApertureEnable - @abstract Enable an aperture on the framebuffer (usually unimplemented, no OS usage). - @discussion IOFramebuffer subclasses may implement this method to set enable a non standard aperture. The system does not call this method. - @param aperture A device specific aperture index. - @param enable Device specific mask of options. - @result an IOReturn code. -*/ - - virtual IOReturn setApertureEnable( IOPixelAperture aperture, - IOOptionBits enable ); - -/*! @function setStartupDisplayMode - @abstract Set the framebuffers display mode and depth to be used during boot and at startup. - @discussion IOFramebuffer subclasses should implement this method to set the mode and depth to be used during boot and at startup, to reduce needed mode changes during boot when the display connection type is the same. If possible this mode should also be used by the OpenFirmware driver for the card. - @param displayMode A display mode ID representing the new startup mode. - @param depth An index indicating the new startup depth configuration of the framebuffer. The index should range from zero to the value of the maxDepthIndex field from the IODisplayModeInformation structure for the display mode. - @result an IOReturn code. -*/ - - virtual IOReturn setStartupDisplayMode( IODisplayModeID displayMode, - IOIndex depth ); - -/*! @function getCurrentDisplayMode - @abstract Return the framebuffers display mode and depth to be used during boot and at startup. - @discussion IOFramebuffer subclasses should implement this method to return the current mode and depth. - @param displayMode A display mode ID representing the mode used during startup. - @param depth An index indicating the depth configuration of the framebuffer used during startup. The index should range from zero to the value of the maxDepthIndex field from the IODisplayModeInformation structure for the display mode. - @result an IOReturn code. -*/ - - virtual IOReturn getStartupDisplayMode( IODisplayModeID * displayMode, - IOIndex * depth ); - -/*! @function setCLUTWithEntries - @abstract Set the color lookup table to be used by the framebuffer in indexed modes. - @discussion IOFramebuffer subclasses may implement this method to allow a palette to be set for indexed display modes. It will not be called on framebuffers in direct display modes. - @param colors A pointer to an array of numEntries RGB color entries. - @param index The index of the first entry to set. - @param numEntries The number of entries in the table. - @param options Options controlling the operation. <br> - kSetCLUTByValue is set if the index field of each entry should be used to set the table sparsely, otherwise consecutive entries from the index parameter should be set.<br> - kSetCLUTImmediately is set if the CLUT set should not be synchronized with the vertical blank, otherwise it should.<br> - kSetCLUTWithLuminance is set if the CLUT should be set to a gray value equivalent in luminance to the passed color entry.<br> - @result an IOReturn code. -*/ - - virtual IOReturn setCLUTWithEntries( IOColorEntry * colors, UInt32 index, - UInt32 numEntries, IOOptionBits options ); - -/*! @function setGammaTable - @abstract Set the gamma table to be used by the framebuffer. - @discussion IOFramebuffer subclasses should implement this method to allow a gamma table to be set. - @param channelCount Defines the number of channels in the supplied data. OS X will pass three for separate R, G, B data, or one if the same data should apply to all channels. - @param dataCount The number of data entries per channel. - @param dataWidth The number of bits in each entry. 8 for Mac OS X 10.1 and earlier, 16 for later releases. - @param data The packed array of correction data. Data is passed for the R (or single) channel followed by the G & B channels. Each entry is one or two bytes (if dataWidth > 8). - @result an IOReturn code. -*/ - - virtual IOReturn setGammaTable( UInt32 channelCount, UInt32 dataCount, - UInt32 dataWidth, void * data ); - -/*! @function setAttribute - @abstract Generic method to set some attribute of the framebuffer device. - @discussion IOFramebuffer subclasses may implement this method to allow arbitrary attribute/value pairs to be set. - @param attribute Defines the attribute to be set. Some defined attributes are:<br> - kIOPowerAttribute The IOFramebuffer class implements most power management (IOService) methods. It calls the subclass to carry out the power management state change with this attribute. When carrying out power state changes, the subclass should call IOFramebuffer::handleEvent for certain changes - set that method for more information. - @param value The new value for the attribute. - @result an IOReturn code. -*/ - - virtual IOReturn setAttribute( IOSelect attribute, uintptr_t value ); - -/*! @function getAttribute - @abstract Generic method to retrieve some attribute of the framebuffer device. - @discussion IOFramebuffer subclasses may implement this method to allow arbitrary attribute/value pairs to be returned. - @param attribute Defines the attribute to be set. Some defined attributes are:<br> - kIOHardwareCursorAttribute If the device supports a hardware cursor and implements the setCursorImage() and setCursorState() calls it should return true for this attribute. - @param value Returns the value for the attribute. - @result an IOReturn code. -*/ - - virtual IOReturn getAttribute( IOSelect attribute, uintptr_t * value ); - -/*! @function getTimingInfoForDisplayMode - @abstract Returns a timing description for a display mode. - @discussion IOFramebuffer subclasses should implement this method to return timing information for a display mode. This allows the OS to enable display modes based on its knowledge of the connected display type. Two types of timing information are defined, by Apple defined constant, or by a detailed description of the timing parameters of the mode. - @param displayMode A display mode ID representing the mode to examine. - @param info The driver returns the information for the display mode in this structure.<br> - If the mode has an Apple defined constant, such as timingVESA_1024x768_75hz, it should be returned in the appleTimingID field. Otherwise the field should be set to timingInvalid.<br> - If the driver is able to supply detailed timing information, it should return it in the detailedInfo.v2 field of the structure, otherwise the driver should clear the kIODetailedTimingValid flag from the flags field.<br> - The IODetailedTimingInformationV2 structure is documented in IOGraphicsTypes.h - @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from using the device. -*/ - - virtual IOReturn getTimingInfoForDisplayMode( - IODisplayModeID displayMode, IOTimingInformation * info ); - -/*! @function validateDetailedTiming - @abstract Reports whether a detailed timing is able to be programmed with the device. - @discussion IOFramebuffer subclasses may implement programmable mode functionality where the OS is able to install modes described by a detailed timing into the driver. - @param description A pointer to a IODetailedTimingInformationV2 structure. The driver should examine this description and change any fields that it cannot implement to reflect its closest possible implementation. - @param descripSize sizeof(IODetailedTimingInformationV2) - @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from installing the programmable mode. -*/ - - virtual IOReturn validateDetailedTiming( - void * description, IOByteCount descripSize ); - -/*! @function setDetailedTimings - @abstract Installs an array of OS programmed detailed timings to be made available by the driver. - @discussion IOFramebuffer subclasses may implement programmable mode functionality where the OS is able to install modes described by a detailed timing into the driver. The driver needs to add these modes to its internal mode list if it provides this functionality. - @param array An OSArray of OSData objects. Each OSData contains one IODetailedTimingInformationV2 structure. All the data described by the array should be copied or retained by this call until the next invocation of this method. - @result an IOReturn code. A return other than kIOReturnSuccess will prevent the system from installing the programmable modes. -*/ - - virtual IOReturn setDetailedTimings( OSArray * array ); - -/*! @function getConnectionCount - @abstract Reports the number of display connections the device supports, driven from one framebuffer. - @discussion IOFramebuffer subclasses may implement functionality where a single framebuffer drives multiple displays. This is not recommended or fully supported and instead multihead cards should implement multiple instances of IOFramebuffer objects to provide full functionality. - @result A count of the number of display connections reported by the framebuffer. Current versions of OS X only support one connection completely. -*/ - - virtual IOItemCount getConnectionCount( void ); - - -/*! @function setAttributeForConnection - @abstract Generic method to set some attribute of the framebuffer device, specific to one display connection. - @discussion IOFramebuffer subclasses may implement this method to allow arbitrary attribute/value pairs to be set, specific to one display connection. - @param attribute Defines the attribute to be set. Some defined attributes are:<br> - kIOCapturedAttribute If the device supports hotplugging displays, it should disable the generation of hot plug interrupts when the attribute kIOCapturedAttribute is set to true. - @param value The new value for the attribute. - @result an IOReturn code. -*/ - - virtual IOReturn setAttributeForConnection( IOIndex connectIndex, - IOSelect attribute, uintptr_t value ); - -/*! @function getAttributeForConnection - @abstract Generic method to retrieve some attribute of the framebuffer device, specific to one display connection. - @discussion IOFramebuffer subclasses may implement this method to allow arbitrary attribute/value pairs to be returned, specific to one display connection. - @param attribute Defines the attribute to be returned. Some defined attributes are:<br> - kConnectionSupportsHLDDCSense If the framebuffer supports the DDC methods hasDDCConnect() and getDDCBlock() it should return success (and no value) for this attribute.<br> - kConnectionSupportsLLDDCSense If the framebuffer wishes to make use of IOFramebuffer::doI2CRequest software implementation of I2C it should implement the I2C methods setDDCClock(), setDDCData(), readDDCClock(), readDDCData(), and it should return success (and no value) for this attribute.<br> - @param value Returns the value for the attribute. - @result an IOReturn code. -*/ - - virtual IOReturn getAttributeForConnection( IOIndex connectIndex, - IOSelect attribute, uintptr_t * value ); - -/*! @function convertCursorImage - @abstract Utility method of IOFramebuffer to convert cursor image to a hardware cursor format. - @discussion IOFramebuffer subclasses may implement hardware cursor functionality, if so they should pass the cursor image given by the setCursorImage() method, with a description of their hardware cursor format, to this helper function to this routine to convert the image to one suitable for the hardware. - @param cursorImage Opaque cursor parameter from the setCursorImage() call. - @param description Describes the cursor format supported by the driver. - @param cursor Structure describing the drivers allocated buffer to receive the converted image. - @result a bool indicating the conversion was successful. -*/ - - virtual bool convertCursorImage( void * cursorImage, - IOHardwareCursorDescriptor * description, - IOHardwareCursorInfo * cursor ); - -/*! @function setCursorImage - @abstract Set a new image for the hardware cursor. - @discussion IOFramebuffer subclasses may implement hardware cursor functionality, if so they should implement this method to change the hardware cursor image. The image should be passed to the convertCursorImage() method with each type of cursor format the hardware supports until success, if all fail the hardware cursor should be hidden and kIOReturnUnsupported returned. - @param cursorImage Opaque cursor description. This should be passed to the convertCursorImage() method to convert to a format specific to the hardware. - @result An IOReturn code. -*/ - - virtual IOReturn setCursorImage( void * cursorImage ); - -/*! @function setCursorState - @abstract Set a new position and visibility for the hardware cursor. - @discussion IOFramebuffer subclasses may implement hardware cursor functionality, if so they should implement this method to change the position and visibility of the cursor. - @param x Left coordinate of the cursor image. A signed value, will be negative if the cursor's hot spot and position place it partly offscreen. - @param y Top coordinate of the cursor image. A signed value, will be negative if the cursor's hot spot and position place it partly offscreen. - @param visible Visible state of the cursor. - @result An IOReturn code. -*/ - - virtual IOReturn setCursorState( SInt32 x, SInt32 y, bool visible ); - -/*! @function flushCursor - @abstract Perform any needed cache flushing after software cursor rendering. - @discussion IOFramebuffer implements software cursor functionality when a hardware cursor is unavailable. Some hardware may need to flush a cache after the processor has finished lifting and dropping the software cursor. -*/ - - virtual void flushCursor( void ); - -/*! @function getAppleSense - @abstract Return display sense information for legacy Apple sensing. - @discussion Hardware that supports simple display sensing, or the classic 3 pin Apple sensing described in Designing Cards and Drivers, should implement this method to return sense information. - @param connectIndex Index of the display connection, from zero to the value of getConnectionCount(). - @param senseType Return zero to indicate legacy Apple sensing. - @param primary Return the value of the primary Apple sense code. - @param extended Return the value of the secondary Apple sense code. - @param displayType Return an Apple defined constant for the type of display sensed. For example, kVGAConnect, kNTSCConnect, kPALConnect etc. - @result An IOReturn code. -*/ - - virtual IOReturn getAppleSense( IOIndex connectIndex, - UInt32 * senseType, - UInt32 * primary, - UInt32 * extended, - UInt32 * displayType ); - -/*! @function connectFlags - @abstract Return display sense information for legacy Apple sensing. - @discussion Hardware that supports simple display sensing, or the classic 3 pin Apple sensing described in Designing Cards and Drivers, should implement this method to return mode flags relative to the sensed display. If this method is unimplemented, all modes have are given the flags kDisplayModeValidFlag | kDisplayModeSafeFlag. - @param connectIndex Index of the display connection, from zero to the value of getConnectionCount(). - @param displayMode A display mode ID. - @param flags Return the flags value for the given mode with the connected display. Flags are:<br> - kDisplayModeValidFlag - mode is considered valid for the connected display by the driver. - kDisplayModeSafeFlag - mode is considered safe (not requiring mode change confirmation) for the connected display by the driver. - kDisplayModeDefaultFlag - mode is considered default for the connected display by the driver. - @result An IOReturn code. -*/ - - virtual IOReturn connectFlags( IOIndex connectIndex, - IODisplayModeID displayMode, IOOptionBits * flags ); - - //// IOLowLevelDDCSense - -/*! @function setDDCClock - @abstract Sets the state of the I2C clock line on a bus. - @discussion Framebuffers making use of the IOFramebuffer::doI2CRequest() software implementation of I2C should implement this method to set the state of the I2C clock line on the given bus. Otherwise may be unimplemented. - @param bus Index of the bus. - @param value One of kIODDCLow, kIODDCHigh, kIODDCTristate. -*/ - - virtual void setDDCClock( IOIndex bus, UInt32 value ); - -/*! @function setDDCData - @abstract Sets the state of the I2C data line on a bus. - @discussion Framebuffers making use of the IOFramebuffer::doI2CRequest() software implementation of I2C should implement this method to set the state of the I2C data line on the given bus. Otherwise may be unimplemented. - @param bus Index of the bus. - @param value One of kIODDCLow, kIODDCHigh, kIODDCTristate. -*/ - virtual void setDDCData( IOIndex bus, UInt32 value ); - -/*! @function readDDCClock - @abstract Reads the input state of the I2C clock line on a bus. - @discussion Framebuffers making use of the IOFramebuffer::doI2CRequest() software implementation of I2C should implement this method to return the input state of the I2C clock line on the given bus. Otherwise may be unimplemented. - @param bus Index of the bus. - @result A boolean reflecting the current state of the clock line on the given bus. -*/ - virtual bool readDDCClock( IOIndex bus ); - -/*! @function readDDCData - @abstract Reads the input state of the I2C data line on a bus. - @discussion Framebuffers making use of the IOFramebuffer::doI2CRequest() software implementation of I2C should implement this method to return the input state of the I2C data line on the given bus. Otherwise may be unimplemented. - @param bus Index of the bus. - @result A boolean reflecting the current state of the data line on the given bus. -*/ - virtual bool readDDCData( IOIndex bus ); - - virtual IOReturn enableDDCRaster( bool enable ); - -/*! @function hasDDCConnect - @abstract Return display DDC connect state. - @discussion Hardware that supports DDC/EDID display sensing should implement this method to return true if a DDC display is detected. They should also return success for the connection attribute kConnectionSupportsHLDDCSense (from getAttributeForConnection()). - @param connectIndex Index of the display connection, from zero to the value of getConnectionCount(). - @result True if a DDC display is detected. -*/ - - virtual bool hasDDCConnect( IOIndex connectIndex ); - -/*! @function getDDCBlock - @abstract Return display EDID data. - @discussion Hardware that supports DDC/EDID display sensing should implement this method to return EDID data in 128 byte blocks. - @param connectIndex Index of the display connection, from zero to the value of getConnectionCount(). - @param blockNumber Block number, ranging from one to the number of blocks return by the display. - @param blockType kIODDCBlockTypeEDID will be passed. - @param options No options are currently defined. - @param data Caller allocated buffer to receive the blocks data. - @param length In/out parameter - callers allocated buffer size, driver returns actual size. - @result An IOReturn code. -*/ - - virtual IOReturn getDDCBlock( IOIndex connectIndex, UInt32 blockNumber, - IOSelect blockType, IOOptionBits options, - UInt8 * data, IOByteCount * length ); - -/*! @function registerForInterruptType - @abstract Set callbacks for driver to call on interrupt events. - @discussion The IOFramebuffer class will call its subclasses to set callbacks to be called on interrupt events generated by hardware events. Only two are currently in use - vertical blank interrupts and connection changed interrupts. - @param interruptType One of these constants:<br> - kIOFBVBLInterruptType Specifying a vertical blanking interrupt. - kIOFBConnectInterruptType Specify the display connection should be resensed. - @param proc C callback to be called by the driver when the specified event occurs. - @param target Target parameter for the callback proc. - @param ref Ref parameter for the callback proc. - @param interruptRef The subclass should return an opaque reference to the installed interrupt handler, for use with unregisterInterrupt() and setInterruptState(). - @result An IOReturn code. -*/ - - virtual IOReturn registerForInterruptType( IOSelect interruptType, - IOFBInterruptProc proc, OSObject * target, void * ref, - void ** interruptRef ); - -/*! @function unregisterInterrupt - @abstract Remove a callback previously installed by registerForInterruptType(). - @discussion Remove a callback previously installed by registerForInterruptType(). - @param interruptRef The interruptRef returned from the registerForInterruptType call that installed the interrupt. - @result An IOReturn code. -*/ - - virtual IOReturn unregisterInterrupt( void * interruptRef ); - -/*! @function unregisterInterrupt - @abstract Enable or disable a callback previously installed by registerForInterruptType(). - @discussion Enable or disable a callback previously installed by registerForInterruptType(). - @param state True or false to enable the callback. - @result An IOReturn code. -*/ - - virtual IOReturn setInterruptState( void * interruptRef, UInt32 state ); - - virtual IOReturn getNotificationSemaphore( IOSelect interruptType, - semaphore_t * semaphore ); - -/* non WL clients apis -*/ - IOReturn setAttributeExt( IOSelect attribute, uintptr_t value ); - - IOReturn getAttributeExt( IOSelect attribute, uintptr_t * value ); - - IOReturn setAttributeForConnectionExt( IOIndex connectIndex, - IOSelect attribute, uintptr_t value ); - - IOReturn getAttributeForConnectionExt( IOIndex connectIndex, - IOSelect attribute, uintptr_t * value ); -}; - -#endif /* ! _IOKIT_IOFRAMEBUFFER_H */ diff --git a/i386/include/IOKit/graphics/IOFramebufferShared.h b/i386/include/IOKit/graphics/IOFramebufferShared.h deleted file mode 100644 index 7f01ff3..0000000 --- a/i386/include/IOKit/graphics/IOFramebufferShared.h +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOFRAMEBUFFERSHARED_H -#define _IOKIT_IOFRAMEBUFFERSHARED_H - -#include <IOKit/hidsystem/IOHIDTypes.h> -#include <IOKit/graphics/IOGraphicsTypes.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/*! @header IOFramebufferShared -The IOFramebufferShared.h header contains definitions of objects and types shared between a kernel level IOFrameBuffer service and a non-kernel window server. In Mac OS X this structure is used by the CoreGraphics server and IOGraphics Family, and is not available to other clients. IOFramebuffer subclasses and IOFramebuffer clients within the kernel should also not rely on this structure definition and constants. It is public only for use on Darwin based window servers. Cursor and window server state data is exchanged by kernel and non-kernel tasks through a slice of shared memory containing a StdFBShmem_t structure.<br> -For a non-kernel task to get access to this slice of shared memory, a connection to an IOFramebuffer service must be made. A connection is made with the IOServiceOpen() function described in IOKitLib.h. A connection type of kIOFBServerConnectType or kIOFBSharedConnectType (for read-only access) should be specified. An io_connect_t handle is returned by IOServiceOpen(). This handle must be passed to IOFBCreateSharedCursor() to create the slice of shared memory. Then IOConnectMapMemory() may be called with a memory type of kIOFBCursorMemory to map the shared memory into the non-kernel task. -*/ - -#ifdef KERNEL -// CGS use optional -/*! @defined IOFB_ARBITRARY_SIZE_CURSOR - @discussion When IOFB_ARBITRARY_SIZE_CURSOR is not defined, the maximum cursor size is assumed to be CURSORWIDTH x CURSORHEIGHT and this header file will define a number of structures for storing cursor images accordingly. A non-kernel task may define IOFB_ARBITRARY_SIZE_CURSOR and use cursors up to the size specified when IOFBCreateSharedCursor() was called. In this case appropriate structures for storing cursor images must be defined elsewhere. In the kernel, IOFB_ARBITRARY_SIZE_CURSOR is always defined. -*/ -#define IOFB_ARBITRARY_SIZE_CURSOR -#define IOFB_ARBITRARY_FRAMES_CURSOR 1 -#endif - -#define IOFB_SUPPORTS_XOR_CURSOR -#define IOFB_SUPPORTS_HW_SHIELD -#define IOFB_SUPPORTS_ARBITRARY_FRAMES_CURSOR - -// -// Cursor and Window Server state data, occupying a slice of shared memory -// between the kernel and WindowServer. -// -/*! @enum CursorParameters - @constant kIOFBNumCursorFrames The number of cursor images stored in the StdFBShmem_t structure. - @constant kIOFBNumCursorFramesShift Used with waiting cursors. - @constant kIOFBMaxCursorDepth The maximum cursor pixel depth. -*/ -enum { -#if IOFB_ARBITRARY_FRAMES_CURSOR - kIOFBMainCursorIndex = 0, - kIOFBWaitCursorIndex = 1, - kIOFBNumCursorIndex = 4, -#else - kIOFBNumCursorFrames = 4, - kIOFBNumCursorFramesShift = 2, -#endif - kIOFBMaxCursorDepth = 32 -}; - -#ifndef IOFB_ARBITRARY_SIZE_CURSOR - -/*! @defined CURSORWIDTH - @discussion The maximum width of the cursor image in pixels. This is only defined if IOFB_ARBITRARY_SIZE_CURSOR is not defined. -*/ -#define CURSORWIDTH 16 /* width in pixels */ - -/*! @defined CURSORHEIGHT - @discussion The maximum height of the cursor image in pixels. This is only defined if IOFB_ARBITRARY_SIZE_CURSOR is not defined. -*/ -#define CURSORHEIGHT 16 /* height in pixels */ - -/*! @struct bm12Cursor - @abstract Cursor image for 1-bit cursor. - @discussion This structure stores 16 pixel x 16 pixel cursors to be used with 1-bit color depth. This structure is only defined if IOFB_ARBITRARY_SIZE_CURSOR is not defined. - @field image This array contains the cursor images. - @field mask This array contains the cursor mask. - @field save This array stores the pixel values of the region underneath the cursor in its last drawn position. -*/ -struct bm12Cursor { - unsigned int image[4][16]; - unsigned int mask[4][16]; - unsigned int save[16]; -}; - -/*! @struct bm18Cursor - @abstract Cursor image for 8-bit cursor. - @discussion This structure stores 16 pixel x 16 pixel cursors to be used with 8-bit color depth. This structure is only defined if IOFB_ARBITRARY_SIZE_CURSOR is not defined. - @field image This array contains cursor color values, which are converted to displayed colors through the color table. The array is two dimensional and its first index is the cursor frame and the second index is the cursor pixel. - @field mask This array contains the cursor alpha mask. The array is two dimensional with the same indexing as the image. If an alpha mask pixel is 0 and the corresponding image pixel is set to white for the display, then this cursor pixel will invert pixels on the display. - @field save This array stores the color values of the region underneath the cursor in its last drawn position. -*/ -struct bm18Cursor { - unsigned char image[4][256]; - unsigned char mask[4][256]; - unsigned char save[256]; -}; - -/*! @struct bm34Cursor - @abstract Cursor image for 15-bit cursor. - @discussion This structure stores 16 pixel x 16 pixel cursors to be used with 15-bit color depth. This structure is only defined if IOFB_ARBITRARY_SIZE_CURSOR is not defined. - @field image This array defines the cursor color values and transparency. The array is two dimensional and its first index is the cursor frame and the second index is the cursor pixel. A value of 0 means the pixel is transparent. Non-zero values are stored with the red, green, blue, and alpha values encoded with the following masks:<BR> - red mask = 0xF000<br> - blue mask 0x0F00<br> - green mask 0x00F0<br> - alpha mask = 0x000F<br> -Note, only 4 bits are allocated for each color component. - @field save This array stores the color values of the region underneath the cursor in its last drawn position. -*/ -struct bm34Cursor { - unsigned short image[4][256]; - unsigned short save[256]; -}; - -/*! @struct bm38Cursor - @abstract Cursor image for 24-bit cursor. - @discussion This structure stores 16 pixel x 16 pixel cursors to be used with 24-bit color depth. This structure is only defined if IOFB_ARBITRARY_SIZE_CURSOR is not defined. - @field image This array defines the cursor color values and transparency. The array is two dimensional and its first index is the cursor frame and the second index is the cursor pixel. The lower 24 bits of a pixel's value contain the RGB color, while the upper 8 bits contain the alpha value. - @field save This array stores the color values of the region underneath the cursor in its last drawn position. -*/ -struct bm38Cursor { - unsigned int image[4][256]; - unsigned int save[256]; -}; - -#endif /* IOFB_ARBITRARY_SIZE_CURSOR */ - -enum { - kIOFBCursorImageNew = 0x01, - kIOFBCursorHWCapable = 0x02 -}; -enum { - kIOFBHardwareCursorActive = 0x01, - kIOFBHardwareCursorInVRAM = 0x02 -}; - -/*! @struct StdFBShmem_t - @discussion This structure contains cursor and window server state data and occupies a slice of shared memory between the kernel and window server. Several elements of this structure are only used in software cursor mode. Unless otherwise indicated, the coordinates in this structure are given in display space. Display space is the coordinate space that encompasses all the screens. The positions of the screens within display space indicate their location relative to each other as the cursor moves between them. If there is only one screen, the screen coordinates and display space coordinates will be the same. - @field cursorSema Semaphore lock for write access to the shared data in this structure. - @field frame The current cursor frame index. - @field cursorShow The cursor is displayed when cursorShow is 0. - @field cursorObscured If this is true, the cursor has been obscured and cursorShow should not be 0. The cursor will be shown again the next time it is moved. - @field shieldFlag When this is set to true the cursor will not be displayed in the region specified by shieldRect. - @field shielded True if the cursor has been hidden because it entered the shielded region. - @field saveRect The region that is saved underneath the cursor in software cursor mode. - @field shieldRect The region that the cursor will not be displayed in if shieldFlag is true. - @field cursorLoc The location of the cursor hot spot. - @field cursorRect The region that the cursor image currently occupies in software cursor mode. - @field oldCursorRect The region that the cursor image occupied the last time the cursor was drawn in software cursor mode. - @field screenBounds The region that the current screen occupies. - @field version Contains kIOFBCurrentShmemVersion so that a user client can ensure it is using the same version of this structure as the kernel. - @field structSize Contains the size of this structure. - @field vblTime The time of the most recent vertical blanking. - @field vblDelta The interval between the two most recent vertical blankings. - @field vblCount A running count of vertical blank interrupts. - @field reservedC Reserved for future use. - @field hardwareCursorCapable True if the hardware is capable of using hardware cursor mode. - @field hardwareCursorActive True if currently using the hardware cursor mode. - @field reservedB Reserved for future use. - @field cursorSize This array contains the cursor sizes indexed by frame. - @field hotSpot This array contains the location of the cursor hot spots indexed by frame. The hot spots coordinates are given relative to the top left corner of the cursor image. - @field cursor A union of structures that define the cursor images. The structure used depends on the framebuffer's bit depth. These structures are defined above. -*/ - -struct StdFBShmem_t { - ev_lock_data_t cursorSema; - int frame; - char cursorShow; - char cursorObscured; - char shieldFlag; - char shielded; - IOGBounds saveRect; - IOGBounds shieldRect; - IOGPoint cursorLoc; - IOGBounds cursorRect; - IOGBounds oldCursorRect; - IOGBounds screenBounds; - int version; - int structSize; - AbsoluteTime vblTime; - AbsoluteTime vblDelta; - unsigned long long int vblCount; -#if IOFB_ARBITRARY_FRAMES_CURSOR - unsigned int reservedC[28]; -#else - unsigned int reservedC[27]; - unsigned char hardwareCursorFlags[kIOFBNumCursorFrames]; -#endif - unsigned char hardwareCursorCapable; - unsigned char hardwareCursorActive; - unsigned char hardwareCursorShields; - unsigned char reservedB[1]; -#if IOFB_ARBITRARY_FRAMES_CURSOR - IOGSize cursorSize[kIOFBNumCursorIndex]; - IOGPoint hotSpot[kIOFBNumCursorIndex]; -#else - IOGSize cursorSize[kIOFBNumCursorFrames]; - IOGPoint hotSpot[kIOFBNumCursorFrames]; -#endif -#ifndef IOFB_ARBITRARY_SIZE_CURSOR - union { - struct bm12Cursor bw; - struct bm18Cursor bw8; - struct bm34Cursor rgb; - struct bm38Cursor rgb24; - } cursor; -#else /* IOFB_ARBITRARY_SIZE_CURSOR */ - unsigned char cursor[0]; -#endif /* IOFB_ARBITRARY_SIZE_CURSOR */ -}; -#ifndef __cplusplus -typedef volatile struct StdFBShmem_t StdFBShmem_t; -#endif - - -/*! @enum FramebufferConstants - @constant kIOFBCurrentShmemVersion The current version of the slice of shared memory that contains the cursor and window server state data in the StdFBShmem_t structure. - @constant kIOFBCursorMemory The memory type for IOConnectMapMemory() to get a slice of shared memory that contains the StdFBShmem_t structure. -*/ -enum { - // version for IOFBCreateSharedCursor - kIOFBShmemVersionMask = 0x000000ff, - kIOFBTenPtOneShmemVersion = 2, - kIOFBTenPtTwoShmemVersion = 3, - kIOFBCurrentShmemVersion = 2, - - // number of frames in animating cursor (if > kIOFBTenPtTwoShmemVersion) - kIOFBShmemCursorNumFramesMask = 0x00ff0000, - kIOFBShmemCursorNumFramesShift = 16, - - // memory types for IOConnectMapMemory. - kIOFBCursorMemory = 100 -}; - -/*! @defined IOFRAMEBUFFER_CONFORMSTO - @discussion The class name of the framebuffer service. -*/ -#define IOFRAMEBUFFER_CONFORMSTO "IOFramebuffer" - -#ifdef __cplusplus -} -#endif - -#endif /* ! _IOKIT_IOFRAMEBUFFERSHARED_H */ diff --git a/i386/include/IOKit/graphics/IOGraphicsDevice.h b/i386/include/IOKit/graphics/IOGraphicsDevice.h deleted file mode 100644 index 8f51330..0000000 --- a/i386/include/IOKit/graphics/IOGraphicsDevice.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IOGRAPHICSDEVICE_H -#define _IOKIT_IOGRAPHICSDEVICE_H - -#include <IOKit/IOService.h> -#include <IOKit/graphics/IOGraphicsTypes.h> - - -class IOGraphicsDevice : public IOService -{ - OSDeclareAbstractStructors(IOGraphicsDevice) - -public: - - virtual void hideCursor( void ) = 0; - virtual void showCursor( IOGPoint * cursorLoc, int frame ) = 0; - virtual void moveCursor( IOGPoint * cursorLoc, int frame ) = 0; - - virtual void getVBLTime( AbsoluteTime * time, AbsoluteTime * delta ) = 0; - - virtual void getBoundingRect ( IOGBounds ** bounds ) = 0; -}; - -#endif /* ! _IOKIT_IOGRAPHICSDEVICE_H */ - diff --git a/i386/include/IOKit/graphics/IOGraphicsEngine.h b/i386/include/IOKit/graphics/IOGraphicsEngine.h deleted file mode 100644 index 4c79b41..0000000 --- a/i386/include/IOKit/graphics/IOGraphicsEngine.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - * 10 Mar 99 sdouglas created. - */ - - -struct IOGraphicsEngineContext { - IOSharedLockData contextLock; - IOOptionBits state; - void * owner; - UInt32 version; - IOByteCount structSize; - UInt32 reserved[ 8 ]; -}; -#ifndef __cplusplus -typedef volatile struct IOGraphicsEngineContext IOGraphicsEngineContext; -#endif - -enum { - // memory type for IOMapMemory - kIOGraphicsEngineContext = 100 -}; - -enum { - // version - kIOGraphicsEngineContextVersion = 1 -}; diff --git a/i386/include/IOKit/graphics/IOGraphicsInterfaceTypes.h b/i386/include/IOKit/graphics/IOGraphicsInterfaceTypes.h deleted file mode 100644 index 5b392a7..0000000 --- a/i386/include/IOKit/graphics/IOGraphicsInterfaceTypes.h +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Copyright (c) 1999-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOGRAPHICSINTERFACETYPES_H -#define _IOKIT_IOGRAPHICSINTERFACETYPES_H - -#include <IOKit/graphics/IOAccelSurfaceConnect.h> - -#define IO_FOUR_CHAR_CODE(x) (x) - -typedef UInt32 IOFourCharCode; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#define kCurrentGraphicsInterfaceVersion 1 -#define kCurrentGraphicsInterfaceRevision 2 - - -#ifdef IOGA_COMPAT -typedef SInt32 IOBlitCompletionToken; -#endif - -typedef UInt32 IOBlitType; -enum { - kIOBlitTypeVerbMask = 0x000000ff, - kIOBlitTypeRects = 0, - kIOBlitTypeCopyRects, - kIOBlitTypeLines, - kIOBlitTypeScanlines, - kIOBlitTypeCopyRegion, - - kIOBlitTypeMoveCursor, - kIOBlitTypeShowCursor, - kIOBlitTypeHideCursor, - - kIOBlitTypeMonoExpand = 0x00000100, - kIOBlitTypeColorSpaceConvert = 0x00000200, - kIOBlitTypeScale = 0x00000400, - - kIOBlitTypeSourceKeyColorModeMask = 0x00003000, - kIOBlitTypeDestKeyColorModeMask = 0x0000c000, - kIOBlitTypeSourceKeyColorEqual = 0x00001000, - kIOBlitTypeSourceKeyColorNotEqual = 0x00002000, - kIOBlitTypeDestKeyColorEqual = 0x00004000, - kIOBlitTypeDestKeyColorNotEqual = 0x00008000, - - kIOBlitTypeOperationMask = 0x0fff0000, - kIOBlitTypeOperationShift = 16, - kIOBlitTypeOperationTypeMask = 0x0f000000, - - kIOBlitTypeOperationType0 = 0x00000000, - kIOBlitCopyOperation = 0x00000000 | kIOBlitTypeOperationType0, - kIOBlitOrOperation = 0x00010000 | kIOBlitTypeOperationType0, - kIOBlitXorOperation = 0x00020000 | kIOBlitTypeOperationType0, - kIOBlitBlendOperation = 0x00030000 | kIOBlitTypeOperationType0, - kIOBlitHighlightOperation = 0x00040000 | kIOBlitTypeOperationType0 -}; - -typedef UInt32 IOBlitSourceType; -enum { - kIOBlitSourceDefault = 0x00000000, - kIOBlitSourceFramebuffer = 0x00001000, - kIOBlitSourceMemory = 0x00002000, - kIOBlitSourceOOLMemory = 0x00003000, - kIOBlitSourcePattern = 0x00004000, - kIOBlitSourceOOLPattern = 0x00005000, - kIOBlitSourceSolid = 0x00006000, - kIOBlitSourceCGSSurface = 0x00007000, - kIOBlitSourceIsSame = 0x80000000 -}; - -#ifdef IOGA_COMPAT -typedef IOBlitSourceType IOBlitSourceDestType; -enum { - kIOBlitDestFramebuffer = 0x00000001 -}; -#endif - -typedef struct IOBlitOperationStruct { - UInt32 color0; - UInt32 color1; - SInt32 offsetX; - SInt32 offsetY; - UInt32 sourceKeyColor; - UInt32 destKeyColor; - UInt32 specific[16]; -} IOBlitOperation; - -typedef struct IOBlitRectangleStruct { - SInt32 x; - SInt32 y; - SInt32 width; - SInt32 height; -} IOBlitRectangle; - -typedef struct IOBlitRectanglesStruct { - IOBlitOperation operation; - IOItemCount count; - IOBlitRectangle rects[1]; -} IOBlitRectangles; - -typedef struct IOBlitCopyRectangleStruct { - SInt32 sourceX; - SInt32 sourceY; - SInt32 x; - SInt32 y; - SInt32 width; - SInt32 height; -} IOBlitCopyRectangle; - -typedef struct IOBlitCopyRectanglesStruct { - IOBlitOperation operation; - IOItemCount count; - IOBlitCopyRectangle rects[1]; -} IOBlitCopyRectangles; - - -typedef struct IOBlitCopyRegionStruct { - IOBlitOperation operation; - SInt32 deltaX; - SInt32 deltaY; - IOAccelDeviceRegion * region; -} IOBlitCopyRegion; - - -typedef struct IOBlitVertexStruct { - SInt32 x; - SInt32 y; -} IOBlitVertex; - -typedef struct IOBlitVerticesStruct { - IOBlitOperation operation; - IOItemCount count; - IOBlitVertex vertices[2]; -} IOBlitVertices; - -typedef struct IOBlitScanlinesStruct { - IOBlitOperation operation; - IOItemCount count; - SInt32 y; - SInt32 height; - SInt32 x[2]; -} IOBlitScanlines; - - -typedef struct IOBlitCursorStruct { - IOBlitOperation operation; - IOBlitRectangle rect; -} IOBlitCursor; - -typedef struct _IOBlitMemory * IOBlitMemoryRef; - - -/* Quickdraw.h pixel formats*/ - -enum { - kIO1MonochromePixelFormat = 0x00000001, /* 1 bit indexed*/ - kIO2IndexedPixelFormat = 0x00000002, /* 2 bit indexed*/ - kIO4IndexedPixelFormat = 0x00000004, /* 4 bit indexed*/ - kIO8IndexedPixelFormat = 0x00000008, /* 8 bit indexed*/ - kIO16BE555PixelFormat = 0x00000010, /* 16 bit BE rgb 555 (Mac)*/ - kIO24RGBPixelFormat = 0x00000018, /* 24 bit rgb */ - kIO32ARGBPixelFormat = 0x00000020, /* 32 bit argb (Mac)*/ - kIO1IndexedGrayPixelFormat = 0x00000021, /* 1 bit indexed gray*/ - kIO2IndexedGrayPixelFormat = 0x00000022, /* 2 bit indexed gray*/ - kIO4IndexedGrayPixelFormat = 0x00000024, /* 4 bit indexed gray*/ - kIO8IndexedGrayPixelFormat = 0x00000028 /* 8 bit indexed gray*/ -}; - -enum { - kIO16LE555PixelFormat = IO_FOUR_CHAR_CODE('L555'), /* 16 bit LE rgb 555 (PC)*/ - kIO16LE5551PixelFormat = IO_FOUR_CHAR_CODE('5551'), /* 16 bit LE rgb 5551*/ - kIO16BE565PixelFormat = IO_FOUR_CHAR_CODE('B565'), /* 16 bit BE rgb 565*/ - kIO16LE565PixelFormat = IO_FOUR_CHAR_CODE('L565'), /* 16 bit LE rgb 565*/ - kIO24BGRPixelFormat = IO_FOUR_CHAR_CODE('24BG'), /* 24 bit bgr */ - kIO32BGRAPixelFormat = IO_FOUR_CHAR_CODE('BGRA'), /* 32 bit bgra (Matrox)*/ - kIO32ABGRPixelFormat = IO_FOUR_CHAR_CODE('ABGR'), /* 32 bit abgr */ - kIO32RGBAPixelFormat = IO_FOUR_CHAR_CODE('RGBA'), /* 32 bit rgba */ - kIOYUVSPixelFormat = IO_FOUR_CHAR_CODE('yuvs'), /* YUV 4:2:2 byte ordering 16-unsigned = 'YUY2'*/ - kIOYUVUPixelFormat = IO_FOUR_CHAR_CODE('yuvu'), /* YUV 4:2:2 byte ordering 16-signed*/ - kIOYVU9PixelFormat = IO_FOUR_CHAR_CODE('YVU9'), /* YVU9 Planar 9*/ - kIOYUV411PixelFormat = IO_FOUR_CHAR_CODE('Y411'), /* YUV 4:1:1 Interleaved 16*/ - kIOYVYU422PixelFormat = IO_FOUR_CHAR_CODE('YVYU'), /* YVYU 4:2:2 byte ordering 16*/ - kIOUYVY422PixelFormat = IO_FOUR_CHAR_CODE('UYVY'), /* UYVY 4:2:2 byte ordering 16*/ - kIOYUV211PixelFormat = IO_FOUR_CHAR_CODE('Y211'), /* YUV 2:1:1 Packed 8*/ - kIO2vuyPixelFormat = IO_FOUR_CHAR_CODE('2vuy') /* UYVY 4:2:2 byte ordering 16*/ -}; - -/* Non Quickdraw.h pixel formats*/ -enum { - kIO16LE4444PixelFormat = IO_FOUR_CHAR_CODE('L444'), /* 16 bit LE argb 4444*/ - kIO16BE4444PixelFormat = IO_FOUR_CHAR_CODE('B444'), /* 16 bit BE argb 4444*/ - kIO64BGRAPixelFormat = IO_FOUR_CHAR_CODE('B16I'), /* 64 bit bgra */ - kIO64RGBAFloatPixelFormat = IO_FOUR_CHAR_CODE('B16F'), /* 64 bit rgba */ - kIO128RGBAFloatPixelFormat = IO_FOUR_CHAR_CODE('B32F') /* 128 bit rgba float */ -}; - -enum { - kIOBlitMemoryRequiresHostFlush = 0x00000001 -}; - -typedef struct IOBlitSurfaceStruct { - union { - UInt8 * bytes; - IOBlitMemoryRef ref; - } memory; - IOFourCharCode pixelFormat; - IOBlitRectangle size; - UInt32 rowBytes; - UInt32 byteOffset; - UInt32 * palette; - IOOptionBits accessFlags; - IOBlitMemoryRef interfaceRef; - UInt32 more[14]; -} IOBlitSurface; - -typedef IOBlitSurface IOBlitMemory; - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -enum { - // options for Synchronize - kIOBlitSynchronizeWaitBeamExit = 0x00000001, - kIOBlitSynchronizeFlushHostWrites = 0x00000002 -}; - -enum { - // options for WaitComplete & Flush - kIOBlitWaitContext = 0x00000000, - kIOBlitWaitAll2D = 0x00000001, - kIOBlitWaitGlobal = 0x00000001, - kIOBlitWaitAll = 0x00000002, - kIOBlitWaitCheck = 0x00000080, - kIOBlitFlushWithSwap = 0x00010000 -}; - -enum { - // options for AllocateSurface - kIOBlitHasCGSSurface = 0x00000001, - kIOBlitFixedSource = 0x00000002, - kIOBlitBeamSyncSwaps = 0x00000004, - kIOBlitReferenceSource = 0x00000008 -}; - -enum { - // options for UnlockSurface - kIOBlitUnlockWithSwap = 0x80000000 -}; - -enum { - // options for SetDestination - kIOBlitFramebufferDestination = 0x00000000, - kIOBlitSurfaceDestination = 0x00000001 -}; - - - -enum { - // options for blit procs - kIOBlitBeamSync = 0x00000001, - kIOBlitBeamSyncAlways = 0x00000002, - kIOBlitBeamSyncSpin = 0x00000004, - - kIOBlitAllOptions = 0xffffffff -}; - -enum { - // capabilities - kIOBlitColorSpaceTypes = IO_FOUR_CHAR_CODE('cspc') -}; - - -// keys for IOAccelFindAccelerator() -#define kIOAccelTypesKey "IOAccelTypes" -#define kIOAccelIndexKey "IOAccelIndex" - -#define kIOAccelRevisionKey "IOAccelRevision" - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#endif /* !_IOKIT_IOGRAPHICSINTERFACETYPES_H */ diff --git a/i386/include/IOKit/graphics/IOGraphicsTypes.h b/i386/include/IOKit/graphics/IOGraphicsTypes.h deleted file mode 100644 index 00bc2a8..0000000 --- a/i386/include/IOKit/graphics/IOGraphicsTypes.h +++ /dev/null @@ -1,1260 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOGRAPHICSTYPES_H -#define _IOKIT_IOGRAPHICSTYPES_H - - -#include <IOKit/IOTypes.h> -#include <IOKit/IOKitKeys.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#define IOGRAPHICSTYPES_REV 24 - -typedef SInt32 IOIndex; -typedef UInt32 IOSelect; -typedef UInt32 IOFixed1616; -typedef UInt32 IODisplayVendorID; -typedef UInt32 IODisplayProductID; - -typedef SInt32 IODisplayModeID; -enum { - // This is the ID given to a programmable timing used at boot time - kIODisplayModeIDBootProgrammable = (IODisplayModeID)0xFFFFFFFB, - // Lowest (unsigned) DisplayModeID reserved by Apple - kIODisplayModeIDReservedBase = (IODisplayModeID)0x80000000 -}; - -enum { - kIOMaxPixelBits = 64 -}; -typedef char IOPixelEncoding[ kIOMaxPixelBits ]; - -// Common Apple pixel formats - -#define IO1BitIndexedPixels "P" -#define IO2BitIndexedPixels "PP" -#define IO4BitIndexedPixels "PPPP" -#define IO8BitIndexedPixels "PPPPPPPP" -#define IO16BitDirectPixels "-RRRRRGGGGGBBBBB" -#define IO32BitDirectPixels "--------RRRRRRRRGGGGGGGGBBBBBBBB" - -#define kIO30BitDirectPixels "--RRRRRRRRRRGGGGGGGGGGBBBBBBBBBB" -#define kIO64BitDirectPixels "-16R16G16B16" - -#define kIO16BitFloatPixels "-16FR16FG16FB16" -#define kIO32BitFloatPixels "-32FR32FG32FB32" - -// other possible pixel formats - -#define IOYUV422Pixels "Y4U2V2" -#define IO8BitOverlayPixels "O8" -// page flipping -#define IOPagedPixels "Page1" - -#define IO_SampleTypeAlpha 'A' -#define IO_SampleTypeSkip '-' - -// Info about a pixel format -enum { - kIOCLUTPixels = 0, - kIOFixedCLUTPixels = 1, - kIORGBDirectPixels = 2, - kIOMonoDirectPixels = 3, - kIOMonoInverseDirectPixels = 4, - kIORGBSignedDirectPixels = 5, - kIORGBSignedFloatingPointPixels = 6 -}; - -/*! - * @struct IOPixelInformation - * @abstract A structure defining the format of a framebuffer. - * @discussion This structure is used by IOFramebuffer to define the format of the pixels. - * @field bytesPerRow The number of bytes per row. - * @field bytesPerPlane Not used. - * @field bitsPerPixel The number of bits per pixel, including unused bits and alpha. - * @field pixelType One of kIOCLUTPixels (indexed pixels with changeable CLUT), kIORGBDirectPixels (direct pixels). - * @field componentCount One for indexed pixels, three for direct pixel formats. - * @field bitsPerComponent Number of bits per component in each pixel. - * @field componentMasks Mask of the bits valid for each component of the pixel - in R, G, B order for direct pixels. - * @field pixelFormat String description of the pixel format - IO32BitDirectPixels, IO16BitDirectPixels etc. - * @field flags None defined - set to zero. - * @field activeWidth Number of pixels visible per row. - * @field activeHeight Number of visible pixel rows. - * @field reserved Set to zero. - */ - -struct IOPixelInformation { - UInt32 bytesPerRow; - UInt32 bytesPerPlane; - UInt32 bitsPerPixel; - UInt32 pixelType; - UInt32 componentCount; - UInt32 bitsPerComponent; - UInt32 componentMasks[ 8 * 2 ]; - IOPixelEncoding pixelFormat; - UInt32 flags; - UInt32 activeWidth; - UInt32 activeHeight; - UInt32 reserved[ 2 ]; -}; -typedef struct IOPixelInformation IOPixelInformation; - -// ID for industry standard display timings -typedef UInt32 IOAppleTimingID; - -/*! - * @struct IODisplayModeInformation - * @abstract A structure defining the format of a framebuffer. - * @discussion This structure is used by IOFramebuffer to define the format of the pixels. - * @field nominalWidth Number of pixels visible per row. - * @field nominalHeight Number of visible pixel rows. - * @field refreshRate Refresh rate in fixed point 16.16. - * @field maxDepthIndex Highest depth index available in this display mode. - * @field flags Flags for the mode, including: <br> - * kDisplayModeInterlacedFlag mode is interlaced. <br> - * kDisplayModeSimulscanFlag mode is available on multiple display connections. <br> - * kDisplayModeNotPresetFlag mode is not a factory preset for the display (geometry may need correction). <br> - * kDisplayModeStretchedFlag mode is stretched/distorted to match the display aspect ratio. <br> - * @field reserved Set to zero. - */ - -struct IODisplayModeInformation { - UInt32 nominalWidth; - UInt32 nominalHeight; - IOFixed1616 refreshRate; - IOIndex maxDepthIndex; - UInt32 flags; - UInt32 reserved[ 4 ]; -}; -typedef struct IODisplayModeInformation IODisplayModeInformation; - -// flags -enum { - kDisplayModeSafetyFlags = 0x00000007, - - kDisplayModeAlwaysShowFlag = 0x00000008, - kDisplayModeNeverShowFlag = 0x00000080, - kDisplayModeNotResizeFlag = 0x00000010, - kDisplayModeRequiresPanFlag = 0x00000020, - - kDisplayModeInterlacedFlag = 0x00000040, - - kDisplayModeSimulscanFlag = 0x00000100, - kDisplayModeBuiltInFlag = 0x00000400, - kDisplayModeNotPresetFlag = 0x00000200, - kDisplayModeStretchedFlag = 0x00000800, - kDisplayModeNotGraphicsQualityFlag = 0x00001000, - kDisplayModeValidateAgainstDisplay = 0x00002000, - kDisplayModeTelevisionFlag = 0x00100000, - kDisplayModeValidForMirroringFlag = 0x00200000 -}; -enum { - kDisplayModeValidFlag = 0x00000001, - kDisplayModeSafeFlag = 0x00000002, - kDisplayModeDefaultFlag = 0x00000004 -}; - -#ifndef KERNEL -// Framebuffer info - obsolete - -struct IOFramebufferInformation { - IOPhysicalAddress baseAddress; - UInt32 activeWidth; - UInt32 activeHeight; - IOByteCount bytesPerRow; - IOByteCount bytesPerPlane; - UInt32 bitsPerPixel; - UInt32 pixelType; - UInt32 flags; - UInt32 reserved[ 4 ]; -}; -typedef struct IOFramebufferInformation IOFramebufferInformation; -#endif - -// flags -enum { - kFramebufferSupportsCopybackCache = 0x00010000, - kFramebufferSupportsWritethruCache = 0x00020000, - kFramebufferSupportsGammaCorrection = 0x00040000, - kFramebufferDisableAltivecAccess = 0x00080000 -}; - -// Aperture is an index into supported pixel formats for a mode & depth -typedef IOIndex IOPixelAperture; -enum { - kIOFBSystemAperture = 0 -}; - -//// CLUTs - -typedef UInt16 IOColorComponent; - -/*! - * @struct IOColorEntry - * @abstract A structure defining one entry of a color lookup table. - * @discussion This structure is used by IOFramebuffer to define an entry of a color lookup table. - * @field index Number of pixels visible per row. - * @field red Value of red component 0-65535. - * @field green Value of green component 0-65535. - * @field blue Value of blue component 0-65535. - */ - -struct IOColorEntry { - UInt16 index; - IOColorComponent red; - IOColorComponent green; - IOColorComponent blue; -}; -typedef struct IOColorEntry IOColorEntry; - -// options (masks) -enum { - kSetCLUTByValue = 0x00000001, // else at index - kSetCLUTImmediately = 0x00000002, // else at VBL - kSetCLUTWithLuminance = 0x00000004 // else RGB -}; - -//// Controller attributes - -enum { - kIOPowerStateAttribute = 'pwrs', - kIOPowerAttribute = 'powr', - kIODriverPowerAttribute = 'dpow', - kIOHardwareCursorAttribute = 'crsr', - - kIOMirrorAttribute = 'mirr', - kIOMirrorDefaultAttribute = 'mrdf', - - kIOCapturedAttribute = 'capd', - - kIOCursorControlAttribute = 'crsc', - - kIOSystemPowerAttribute = 'spwr', - kIOVRAMSaveAttribute = 'vrsv', - kIODeferCLUTSetAttribute = 'vclt', - - kIOClamshellStateAttribute = 'clam' -}; - -// values for kIOMirrorAttribute -enum { - kIOMirrorIsPrimary = 0x80000000, - kIOMirrorHWClipped = 0x40000000 -}; - -// values for kIOMirrorDefaultAttribute -enum { - kIOMirrorDefault = 0x00000001, - kIOMirrorForced = 0x00000002 -}; - -//// Display mode timing information - -struct IODetailedTimingInformationV1 { - // from EDID defn - UInt32 pixelClock; // Hertz - UInt32 horizontalActive; // pixels - UInt32 horizontalBlanking; // pixels - UInt32 horizontalBorder; // pixels - UInt32 horizontalSyncOffset; // pixels - UInt32 horizontalSyncWidth; // pixels - UInt32 verticalActive; // lines - UInt32 verticalBlanking; // lines - UInt32 verticalBorder; // lines - UInt32 verticalSyncOffset; // lines - UInt32 verticalSyncWidth; // lines -}; -typedef struct IODetailedTimingInformationV1 IODetailedTimingInformationV1; - -/*! - * @struct IODetailedTimingInformationV2 - * @abstract A structure defining the detailed timing information of a display mode. - * @discussion This structure is used by IOFramebuffer to define detailed timing information for a display mode. The VESA EDID document has more information. - * @field __reservedA Set to zero. - * @field horizontalScaledInset If the mode is scaled, sets the number of active pixels to remove the left and right edges in order to display an underscanned image. - * @field verticalScaledInset If the mode is scaled, sets the number of active lines to remove the top and bottom edges in order to display an underscanned image. - * @field scalerFlags If the mode is scaled, - * kIOScaleStretchToFit may be set to allow stretching. - * kIOScaleRotateFlags is mask which may have the value given by kIOScaleRotate90, kIOScaleRotate180, kIOScaleRotate270 to display a rotated framebuffer. - * @field horizontalScaled If the mode is scaled, sets the size of the image before scaling or rotation. - * @field verticalScaled If the mode is scaled, sets the size of the image before scaling or rotation. - * @field signalConfig - * kIOAnalogSetupExpected set if display expects a blank-to-black setup or pedestal. See VESA signal standards. <br> - * kIOInterlacedCEATiming set for a CEA style interlaced timing:<br> - * Field 1 vertical blanking = half specified vertical blanking lines. <br> - * Field 2 vertical blanking = (half vertical blanking lines) + 1 line. <br> - * Field 1 vertical offset = half specified vertical sync offset. <br> - * Field 2 vertical offset = (half specified vertical sync offset) + 0.5 lines. <br> - * @field signalLevels One of:<br> - * kIOAnalogSignalLevel_0700_0300 0.700 - 0.300 V p-p.<br> - * kIOAnalogSignalLevel_0714_0286 0.714 - 0.286 V p-p.<br> - * kIOAnalogSignalLevel_1000_0400 1.000 - 0.400 V p-p.<br> - * kIOAnalogSignalLevel_0700_0000 0.700 - 0.000 V p-p.<br> - * @field pixelClock Pixel clock frequency in Hz. - * @field minPixelClock Minimum pixel clock frequency in Hz, with error. - * @field maxPixelClock Maximum pixel clock frequency in Hz, with error. - * @field horizontalActive Pixel clocks per line. - * @field horizontalBlanking Blanking clocks per line. - * @field horizontalSyncOffset First clock of horizontal sync. - * @field horizontalSyncPulseWidth Width of horizontal sync. - * @field verticalActive Number of lines per frame. - * @field verticalBlanking Blanking lines per frame. - * @field verticalSyncOffset First line of vertical sync. - * @field verticalSyncPulseWidth Height of vertical sync. - * @field horizontalBorderLeft Number of pixels in left horizontal border. - * @field horizontalBorderRight Number of pixels in right horizontal border. - * @field verticalBorderTop Number of lines in top vertical border. - * @field verticalBorderBottom Number of lines in bottom vertical border. - * @field horizontalSyncConfig kIOSyncPositivePolarity for positive polarity horizontal sync (0 for negative). - * @field horizontalSyncLevel Zero. - * @field verticalSyncConfig kIOSyncPositivePolarity for positive polarity vertical sync (0 for negative). - * @field verticalSyncLevel Zero. - * @field numLinks number of links to be used by a dual link timing, if zero, assume one link. - * @field __reservedB Reserved set to zero. - */ - -struct IODetailedTimingInformationV2 { - - UInt32 __reservedA[3]; // Init to 0 - UInt32 horizontalScaledInset; // pixels - UInt32 verticalScaledInset; // lines - - UInt32 scalerFlags; - UInt32 horizontalScaled; - UInt32 verticalScaled; - - UInt32 signalConfig; - UInt32 signalLevels; - - UInt64 pixelClock; // Hz - - UInt64 minPixelClock; // Hz - With error what is slowest actual clock - UInt64 maxPixelClock; // Hz - With error what is fasted actual clock - - UInt32 horizontalActive; // pixels - UInt32 horizontalBlanking; // pixels - UInt32 horizontalSyncOffset; // pixels - UInt32 horizontalSyncPulseWidth; // pixels - - UInt32 verticalActive; // lines - UInt32 verticalBlanking; // lines - UInt32 verticalSyncOffset; // lines - UInt32 verticalSyncPulseWidth; // lines - - UInt32 horizontalBorderLeft; // pixels - UInt32 horizontalBorderRight; // pixels - UInt32 verticalBorderTop; // lines - UInt32 verticalBorderBottom; // lines - - UInt32 horizontalSyncConfig; - UInt32 horizontalSyncLevel; // Future use (init to 0) - UInt32 verticalSyncConfig; - UInt32 verticalSyncLevel; // Future use (init to 0) - UInt32 numLinks; - - UInt32 __reservedB[7]; // Init to 0 -}; -typedef struct IODetailedTimingInformationV2 IODetailedTimingInformationV2; -typedef struct IODetailedTimingInformationV2 IODetailedTimingInformation; - -struct IOTimingInformation { - IOAppleTimingID appleTimingID; // kIOTimingIDXXX const - UInt32 flags; - union { - IODetailedTimingInformationV1 v1; - IODetailedTimingInformationV2 v2; - } detailedInfo; -}; -typedef struct IOTimingInformation IOTimingInformation; - -enum { - // IOTimingInformation flags - kIODetailedTimingValid = 0x80000000, - kIOScalingInfoValid = 0x40000000 -}; - -enum { - // scalerFlags - kIOScaleStretchToFit = 0x00000001, - - kIOScaleRotateFlags = 0x000000f0, - - kIOScaleSwapAxes = 0x00000010, - kIOScaleInvertX = 0x00000020, - kIOScaleInvertY = 0x00000040, - - kIOScaleRotate0 = 0x00000000, - kIOScaleRotate90 = kIOScaleSwapAxes | kIOScaleInvertX, - kIOScaleRotate180 = kIOScaleInvertX | kIOScaleInvertY, - kIOScaleRotate270 = kIOScaleSwapAxes | kIOScaleInvertY -}; - - -#pragma pack(push, 4) -struct IOFBDisplayModeDescription { - IODisplayModeInformation info; - IOTimingInformation timingInfo; -}; -typedef struct IOFBDisplayModeDescription IOFBDisplayModeDescription; -#pragma pack(pop) - -/*! - * @struct IODisplayTimingRange - * @abstract A structure defining the limits and attributes of a display or framebuffer. - * @discussion This structure is used to define the limits for modes programmed as detailed timings by the OS. The VESA EDID is useful background information for many of these fields. A data property with this structure under the key kIOFBTimingRangeKey in a framebuffer will allow the OS to program detailed timings that fall within its range. - * @field __reservedA Set to zero. - * @field version Set to zero. - * @field __reservedB Set to zero. - * @field minPixelClock minimum pixel clock frequency in range, in Hz. - * @field minPixelClock maximum pixel clock frequency in range, in Hz. - * @field maxPixelError largest variation between specified and actual pixel clock frequency, in Hz. - * @field supportedSyncFlags mask of supported sync attributes. The following are defined:<br> - * kIORangeSupportsSeparateSyncs - digital separate syncs.<br> - * kIORangeSupportsSyncOnGreen - sync on green.<br> - * kIORangeSupportsCompositeSync - composite sync.<br> - * kIORangeSupportsVSyncSerration - vertical sync has serration and equalization pulses.<br> - * @field supportedSignalLevels mask of possible signal levels. The following are defined:<br> - * kIORangeSupportsSignal_0700_0300 0.700 - 0.300 V p-p.<br> - * kIORangeSupportsSignal_0714_0286 0.714 - 0.286 V p-p.<br> - * kIORangeSupportsSignal_1000_0400 1.000 - 0.400 V p-p.<br> - * kIORangeSupportsSignal_0700_0000 0.700 - 0.000 V p-p.<br> - * @field supportedSignalConfigs mask of possible signal configurations. The following are defined:<br> - * kIORangeSupportsInterlacedCEATiming Supports CEA style interlaced timing:<br> - * Field 1 vertical blanking = specified vertical blanking lines. <br> - * Field 2 vertical blanking = vertical blanking lines + 1 line. <br> - * Field 1 vertical offset = specified vertical sync offset. <br> - * Field 2 vertical offset = specified vertical sync offset + 0.5 lines. <br> - * kIORangeSupportsInterlacedCEATimingWithConfirm Supports CEA style interlaced timing, but require a confirm. - * @field minFrameRate minimum frame rate (vertical refresh frequency) in range, in Hz. - * @field maxFrameRate maximum frame rate (vertical refresh frequency) in range, in Hz. - * @field minLineRate minimum line rate (horizontal refresh frequency) in range, in Hz. - * @field maxLineRate maximum line rate (horizontal refresh frequency) in range, in Hz. - * @field maxHorizontalTotal maximum clocks in horizontal line (active + blanking). - * @field maxVerticalTotal maximum lines in vertical frame (active + blanking). - * @field __reservedD Set to zero. - * @field charSizeHorizontalActive horizontalActive must be a multiple of charSizeHorizontalActive. - * @field charSizeHorizontalBlanking horizontalBlanking must be a multiple of charSizeHorizontalBlanking. - * @field charSizeHorizontalSyncOffset horizontalSyncOffset must be a multiple of charSizeHorizontalSyncOffset. - * @field charSizeHorizontalSyncPulse horizontalSyncPulse must be a multiple of charSizeHorizontalSyncPulse. - * @field charSizeVerticalActive verticalActive must be a multiple of charSizeVerticalActive. - * @field charSizeVerticalBlanking verticalBlanking must be a multiple of charSizeVerticalBlanking. - * @field charSizeVerticalSyncOffset verticalSyncOffset must be a multiple of charSizeVerticalSyncOffset. - * @field charSizeVerticalSyncPulse verticalSyncPulse must be a multiple of charSizeVerticalSyncPulse. - * @field charSizeHorizontalBorderLeft horizontalBorderLeft must be a multiple of charSizeHorizontalBorderLeft. - * @field charSizeHorizontalBorderRight horizontalBorderRight must be a multiple of charSizeHorizontalBorderRight. - * @field charSizeVerticalBorderTop verticalBorderTop must be a multiple of charSizeVerticalBorderTop. - * @field charSizeVerticalBorderBottom verticalBorderBottom must be a multiple of charSizeVerticalBorderBottom. - * @field charSizeHorizontalTotal (horizontalActive + horizontalBlanking) must be a multiple of charSizeHorizontalTotal. - * @field charSizeVerticalTotal (verticalActive + verticalBlanking) must be a multiple of charSizeVerticalTotal. - * @field __reservedE Set to zero. - * @field minHorizontalActiveClocks minimum value of horizontalActive. - * @field maxHorizontalActiveClocks maximum value of horizontalActive. - * @field minHorizontalBlankingClocks minimum value of horizontalBlanking. - * @field maxHorizontalBlankingClocks maximum value of horizontalBlanking. - * @field minHorizontalSyncOffsetClocks minimum value of horizontalSyncOffset. - * @field maxHorizontalSyncOffsetClocks maximum value of horizontalSyncOffset. - * @field minHorizontalPulseWidthClocks minimum value of horizontalPulseWidth. - * @field maxHorizontalPulseWidthClocks maximum value of horizontalPulseWidth. - * @field minVerticalActiveClocks minimum value of verticalActive. - * @field maxVerticalActiveClocks maximum value of verticalActive. - * @field minVerticalBlankingClocks minimum value of verticalBlanking. - * @field maxVerticalBlankingClocks maximum value of verticalBlanking. - * @field minVerticalSyncOffsetClocks minimum value of verticalSyncOffset. - * @field maxVerticalSyncOffsetClocks maximum value of verticalSyncOffset. - * @field minVerticalPulseWidthClocks minimum value of verticalPulseWidth. - * @field maxVerticalPulseWidthClocks maximum value of verticalPulseWidth. - * @field minHorizontalBorderLeft minimum value of horizontalBorderLeft. - * @field maxHorizontalBorderLeft maximum value of horizontalBorderLeft. - * @field minHorizontalBorderRight minimum value of horizontalBorderRight. - * @field maxHorizontalBorderRight maximum value of horizontalBorderRight. - * @field minVerticalBorderTop minimum value of verticalBorderTop. - * @field maxVerticalBorderTop maximum value of verticalBorderTop. - * @field minVerticalBorderBottom minimum value of verticalBorderBottom. - * @field maxVerticalBorderBottom maximum value of verticalBorderBottom. - * @field maxNumLinks number of links supported, if zero, 1 link is assumed. - * @field minLink0PixelClock minimum pixel clock for link 0 (kHz). - * @field maxLink0PixelClock maximum pixel clock for link 0 (kHz). - * @field minLink1PixelClock minimum pixel clock for link 1 (kHz). - * @field maxLink1PixelClock maximum pixel clock for link 1 (kHz). - * @field __reservedF Set to zero. - */ - -struct IODisplayTimingRange -{ - UInt32 __reservedA[2]; // Init to 0 - UInt32 version; // Init to 0 - UInt32 __reservedB[5]; // Init to 0 - - UInt64 minPixelClock; // Min dot clock in Hz - UInt64 maxPixelClock; // Max dot clock in Hz - - UInt32 maxPixelError; // Max dot clock error - UInt32 supportedSyncFlags; - UInt32 supportedSignalLevels; - UInt32 supportedSignalConfigs; - - UInt32 minFrameRate; // Hz - UInt32 maxFrameRate; // Hz - UInt32 minLineRate; // Hz - UInt32 maxLineRate; // Hz - - UInt32 maxHorizontalTotal; // Clocks - Maximum total (active + blanking) - UInt32 maxVerticalTotal; // Clocks - Maximum total (active + blanking) - UInt32 __reservedD[2]; // Init to 0 - - UInt8 charSizeHorizontalActive; - UInt8 charSizeHorizontalBlanking; - UInt8 charSizeHorizontalSyncOffset; - UInt8 charSizeHorizontalSyncPulse; - - UInt8 charSizeVerticalActive; - UInt8 charSizeVerticalBlanking; - UInt8 charSizeVerticalSyncOffset; - UInt8 charSizeVerticalSyncPulse; - - UInt8 charSizeHorizontalBorderLeft; - UInt8 charSizeHorizontalBorderRight; - UInt8 charSizeVerticalBorderTop; - UInt8 charSizeVerticalBorderBottom; - - UInt8 charSizeHorizontalTotal; // Character size for active + blanking - UInt8 charSizeVerticalTotal; // Character size for active + blanking - UInt16 __reservedE; // Reserved (Init to 0) - - UInt32 minHorizontalActiveClocks; - UInt32 maxHorizontalActiveClocks; - UInt32 minHorizontalBlankingClocks; - UInt32 maxHorizontalBlankingClocks; - - UInt32 minHorizontalSyncOffsetClocks; - UInt32 maxHorizontalSyncOffsetClocks; - UInt32 minHorizontalPulseWidthClocks; - UInt32 maxHorizontalPulseWidthClocks; - - UInt32 minVerticalActiveClocks; - UInt32 maxVerticalActiveClocks; - UInt32 minVerticalBlankingClocks; - UInt32 maxVerticalBlankingClocks; - - UInt32 minVerticalSyncOffsetClocks; - UInt32 maxVerticalSyncOffsetClocks; - UInt32 minVerticalPulseWidthClocks; - UInt32 maxVerticalPulseWidthClocks; - - UInt32 minHorizontalBorderLeft; - UInt32 maxHorizontalBorderLeft; - UInt32 minHorizontalBorderRight; - UInt32 maxHorizontalBorderRight; - - UInt32 minVerticalBorderTop; - UInt32 maxVerticalBorderTop; - UInt32 minVerticalBorderBottom; - UInt32 maxVerticalBorderBottom; - UInt32 maxNumLinks; // number of links, if zero, assume link 1 - UInt32 minLink0PixelClock; // min pixel clock for link 0 (kHz) - UInt32 maxLink0PixelClock; // max pixel clock for link 0 (kHz) - UInt32 minLink1PixelClock; // min pixel clock for link 1 (kHz) - UInt32 maxLink1PixelClock; // max pixel clock for link 1 (kHz) - - UInt32 __reservedF[3]; // Init to 0 -}; -typedef struct IODisplayTimingRange IODisplayTimingRange; - -enum { - // supportedSignalLevels - kIORangeSupportsSignal_0700_0300 = 0x00000001, - kIORangeSupportsSignal_0714_0286 = 0x00000002, - kIORangeSupportsSignal_1000_0400 = 0x00000004, - kIORangeSupportsSignal_0700_0000 = 0x00000008 -}; -enum { - // supportedSyncFlags - kIORangeSupportsSeparateSyncs = 0x00000001, - kIORangeSupportsSyncOnGreen = 0x00000002, - kIORangeSupportsCompositeSync = 0x00000004, - kIORangeSupportsVSyncSerration = 0x00000008 -}; -enum { - // supportedSignalConfigs - kIORangeSupportsInterlacedCEATiming = 0x00000004, - kIORangeSupportsInterlacedCEATimingWithConfirm = 0x00000008 -}; - -enum { - // signalConfig - kIODigitalSignal = 0x00000001, - kIOAnalogSetupExpected = 0x00000002, - kIOInterlacedCEATiming = 0x00000004, - kIONTSCTiming = 0x00000008, - kIOPALTiming = 0x00000010 -}; - -enum { - // signalLevels for analog - kIOAnalogSignalLevel_0700_0300 = 0, - kIOAnalogSignalLevel_0714_0286 = 1, - kIOAnalogSignalLevel_1000_0400 = 2, - kIOAnalogSignalLevel_0700_0000 = 3 -}; - -enum { - // horizontalSyncConfig and verticalSyncConfig - kIOSyncPositivePolarity = 0x00000001 -}; - -/*! - * @struct IODisplayScalerInformation - * @abstract A structure defining the scaling capabilities of a framebuffer. - * @discussion This structure is used to define the limits for modes programmed as detailed timings by the OS. A data property with this structure under the key kIOFBScalerInfoKey in a framebuffer will allow the OS to program detailed timings that are scaled to a displays native resolution. - * @field __reservedA Set to zero. - * @field version Set to zero. - * @field __reservedB Set to zero. - * @field scalerFeatures Mask of scaling features. The following are defined:<br> - * kIOScaleStretchOnly If set the framebuffer can only provide stretched scaling with non-square pixels, without borders.<br> - * kIOScaleCanUpSamplePixels If set framebuffer can scale up from a smaller number of source pixels to a larger native timing (eg. 640x480 pixels on a 1600x1200 timing).<br> - * kIOScaleCanDownSamplePixels If set framebuffer can scale down from a larger number of source pixels to a smaller native timing (eg. 1600x1200 pixels on a 640x480 timing).<br> - * kIOScaleCanScaleInterlaced If set framebuffer can scale an interlaced detailed timing.<br> - * kIOScaleCanSupportInset If set framebuffer can support scaled modes with non-zero horizontalScaledInset, verticalScaledInset fields.<br> - * kIOScaleCanRotate If set framebuffer can support some of the flags in the kIOScaleRotateFlags mask.<br> - * kIOScaleCanBorderInsetOnly If set framebuffer can support scaled modes with non-zero horizontalScaledInset, verticalScaledInset fields, but requires the active pixels to be equal in size to the inset area, ie. can do insets with a border versus scaling an image.<br> - * @field maxHorizontalPixels Maximum number of horizontal source pixels (horizontalScaled).<br> - * @field maxVerticalPixels Maximum number of vertical source pixels (verticalScaled).<br> - * @field __reservedC Set to zero. - */ - -struct IODisplayScalerInformation { - UInt32 __reservedA[1]; // Init to 0 - UInt32 version; // Init to 0 - UInt32 __reservedB[2]; // Init to 0 - - IOOptionBits scalerFeatures; - UInt32 maxHorizontalPixels; - UInt32 maxVerticalPixels; - UInt32 __reservedC[5]; // Init to 0 -}; -typedef struct IODisplayScalerInformation IODisplayScalerInformation; - -enum { - /* scalerFeatures */ - kIOScaleStretchOnly = 0x00000001, - kIOScaleCanUpSamplePixels = 0x00000002, - kIOScaleCanDownSamplePixels = 0x00000004, - kIOScaleCanScaleInterlaced = 0x00000008, - kIOScaleCanSupportInset = 0x00000010, - kIOScaleCanRotate = 0x00000020, - kIOScaleCanBorderInsetOnly = 0x00000040 -}; - -//// Connections - -enum { - kOrConnections = 0xffffffe, - kAndConnections = 0xffffffd -}; - -enum { - kConnectionFlags = 'flgs', - kConnectionSyncEnable = 'sync', - kConnectionSyncFlags = 'sycf', - kConnectionSupportsAppleSense = 'asns', - kConnectionSupportsLLDDCSense = 'lddc', - kConnectionSupportsHLDDCSense = 'hddc', - kConnectionEnable = 'enab', - kConnectionCheckEnable = 'cena', - kConnectionProbe = 'prob', - kConnectionChanged = 'chng', - kConnectionPower = 'powr', - kConnectionPostWake = 'pwak', - kConnectionDisplayParameterCount = 'pcnt', - kConnectionDisplayParameters = 'parm', - kConnectionOverscan = 'oscn', - kConnectionVideoBest = 'vbst', - - kConnectionRedGammaScale = 'rgsc', - kConnectionGreenGammaScale = 'ggsc', - kConnectionBlueGammaScale = 'bgsc', - - kConnectionHandleDisplayPortEvent = 'dpir', - - kConnectionPanelTimingDisable = 'pnlt', - - kConnectionColorMode = 'cyuv', - kConnectionColorModesSupported = 'colr', - kConnectionColorDepthsSupported = ' bpc', - - kConnectionControllerDepthsSupported = '\0grd', - kConnectionControllerColorDepth = '\0dpd', - kConnectionControllerDitherControl = '\0gdc', - - kConnectionDisplayFlags = 'dflg', -}; - -// kConnectionFlags values -enum { - kIOConnectionBuiltIn = 0x00000800, - kIOConnectionStereoSync = 0x00008000 -}; - -// kConnectionSyncControl values -enum { - kIOHSyncDisable = 0x00000001, - kIOVSyncDisable = 0x00000002, - kIOCSyncDisable = 0x00000004, - kIONoSeparateSyncControl = 0x00000040, - kIOTriStateSyncs = 0x00000080, - kIOSyncOnBlue = 0x00000008, - kIOSyncOnGreen = 0x00000010, - kIOSyncOnRed = 0x00000020 -}; - -// kConnectionHandleDisplayPortEvent values -enum { - kIODPEventStart = 1, - kIODPEventIdle = 2, - - kIODPEventForceRetrain = 3, - - kIODPEventRemoteControlCommandPending = 256, - kIODPEventAutomatedTestRequest = 257, - kIODPEventContentProtection = 258, - kIODPEventMCCS = 259, - kIODPEventSinkSpecific = 260 -}; - -#define kIODisplayAttributesKey "IODisplayAttributes" - -#define kIODisplaySupportsUnderscanKey "IODisplaySupportsUnderscan" -#define kIODisplaySupportsBasicAudioKey "IODisplaySupportsBasicAudio" -#define kIODisplaySupportsYCbCr444Key "IODisplaySupportsYCbCr444" -#define kIODisplaySupportsYCbCr422Key "IODisplaySupportsYCbCr422" - -enum -{ - kIODisplayColorMode = kConnectionColorMode, -}; - -#if 0 -enum -{ - // kConnectionColorMode attribute - kIODisplayColorModeReserved = 0x00000000, - kIODisplayColorModeRGB = 0x00000001, - kIODisplayColorModeYCbCr422 = 0x00000010, - kIODisplayColorModeYCbCr444 = 0x00000100, - kIODisplayColorModeRGBLimited = 0x00001000, - kIODisplayColorModeAuto = 0x10000000, -}; -#endif - -enum -{ - // kConnectionColorDepthsSupported attribute - kIODisplayRGBColorComponentBitsUnknown = 0x00000000, - kIODisplayRGBColorComponentBits6 = 0x00000001, - kIODisplayRGBColorComponentBits8 = 0x00000002, - kIODisplayRGBColorComponentBits10 = 0x00000004, - kIODisplayRGBColorComponentBits12 = 0x00000008, - kIODisplayRGBColorComponentBits14 = 0x00000010, - kIODisplayRGBColorComponentBits16 = 0x00000020, - - kIODisplayYCbCr444ColorComponentBitsUnknown = 0x00000000, - kIODisplayYCbCr444ColorComponentBits6 = 0x00000100, - kIODisplayYCbCr444ColorComponentBits8 = 0x00000200, - kIODisplayYCbCr444ColorComponentBits10 = 0x00000400, - kIODisplayYCbCr444ColorComponentBits12 = 0x00000800, - kIODisplayYCbCr444ColorComponentBits14 = 0x00001000, - kIODisplayYCbCr444ColorComponentBits16 = 0x00002000, - - kIODisplayYCbCr422ColorComponentBitsUnknown = 0x00000000, - kIODisplayYCbCr422ColorComponentBits6 = 0x00010000, - kIODisplayYCbCr422ColorComponentBits8 = 0x00020000, - kIODisplayYCbCr422ColorComponentBits10 = 0x00040000, - kIODisplayYCbCr422ColorComponentBits12 = 0x00080000, - kIODisplayYCbCr422ColorComponentBits14 = 0x00100000, - kIODisplayYCbCr422ColorComponentBits16 = 0x00200000, -}; - -enum -{ - // kConnectionDitherControl attribute - kIODisplayDitherDisable = 0x00000000, - kIODisplayDitherSpatial = 0x00000001, - kIODisplayDitherTemporal = 0x00000002, - kIODisplayDitherFrameRateControl = 0x00000004, - kIODisplayDitherDefault = 0x00000080, - kIODisplayDitherAll = 0x000000FF, - kIODisplayDitherRGBShift = 0, - kIODisplayDitherYCbCr444Shift = 8, - kIODisplayDitherYCbCr422Shift = 16, -}; - -enum -{ - // kConnectionDisplayFlags attribute - kIODisplayNeedsCEAUnderscan = 0x00000001, -}; - - -#define IO_DISPLAY_CAN_FILL 0x00000040 -#define IO_DISPLAY_CAN_BLIT 0x00000020 - -#define IO_24BPP_TRANSFER_TABLE_SIZE 256 -#define IO_15BPP_TRANSFER_TABLE_SIZE 256 -#define IO_8BPP_TRANSFER_TABLE_SIZE 256 -#define IO_12BPP_TRANSFER_TABLE_SIZE 256 -#define IO_2BPP_TRANSFER_TABLE_SIZE 256 - -#define STDFB_BM256_TO_BM38_MAP_SIZE 256 -#define STDFB_BM38_TO_BM256_MAP_SIZE 256 -#define STDFB_BM38_TO_256_WITH_LOGICAL_SIZE \ - (STDFB_BM38_TO_BM256_MAP_SIZE + (256/sizeof(int))) - -#define STDFB_4BPS_TO_5BPS_MAP_SIZE 16 -#define STDFB_5BPS_TO_4BPS_MAP_SIZE 32 - -enum { - // connection types for IOServiceOpen - kIOFBServerConnectType = 0, - kIOFBSharedConnectType = 1 -}; - -enum { - // options for IOServiceRequestProbe() - kIOFBUserRequestProbe = 0x00000001 -}; - -struct IOGPoint { - SInt16 x; - SInt16 y; -}; -typedef struct IOGPoint IOGPoint; - -struct IOGSize { - SInt16 width; - SInt16 height; -}; -typedef struct IOGSize IOGSize; - -struct IOGBounds { - SInt16 minx; - SInt16 maxx; - SInt16 miny; - SInt16 maxy; -}; -typedef struct IOGBounds IOGBounds; - -#ifndef kIODescriptionKey - -#if !defined(__Point__) && !defined(BINTREE_H) && !defined(__MACTYPES__) -#define __Point__ -typedef IOGPoint Point; -#endif - -#if !defined(__Bounds__) && !defined(BINTREE_H) && !defined(__MACTYPES__) -#define __Bounds__ -typedef IOGBounds Bounds; -#endif - -#endif /* !kIODescriptionKey */ - -// cursor description - -enum { - kTransparentEncoding = 0, - kInvertingEncoding -}; - -enum { - kTransparentEncodingShift = (kTransparentEncoding << 1), - kTransparentEncodedPixel = (0x01 << kTransparentEncodingShift), - - kInvertingEncodingShift = (kInvertingEncoding << 1), - kInvertingEncodedPixel = (0x01 << kInvertingEncodingShift) -}; - -enum { - kHardwareCursorDescriptorMajorVersion = 0x0001, - kHardwareCursorDescriptorMinorVersion = 0x0000 -}; - -/*! - * @struct IOHardwareCursorDescriptor - * @abstract A structure defining the format of a hardware cursor. - * @discussion This structure is used by IOFramebuffer to define the format of a hardware cursor. - * @field majorVersion Set to kHardwareCursorDescriptorMajorVersion. - * @field minorVersion Set to kHardwareCursorDescriptorMinorVersion. - * @field height Maximum size of the cursor. - * @field width Maximum size of the cursor. - * @field bitDepth Number bits per pixel, or a QD/QT pixel type, for example kIO8IndexedPixelFormat, kIO32ARGBPixelFormat. - * @field maskBitDepth Unused. - * @field numColors Number of colors for indexed pixel types. - * @field colorEncodings An array pointer specifying the pixel values corresponding to the indices into the color table, for indexed pixel types. - * @field flags None defined, set to zero. - * @field supportedSpecialEncodings Mask of supported special pixel values, eg. kTransparentEncodedPixel, kInvertingEncodedPixel. - * @field specialEncodings Array of pixel values for each supported special encoding. - */ - -struct IOHardwareCursorDescriptor { - UInt16 majorVersion; - UInt16 minorVersion; - UInt32 height; - UInt32 width; - UInt32 bitDepth; // bits per pixel, or a QD/QT pixel type - UInt32 maskBitDepth; // unused - UInt32 numColors; // number of colors in the colorMap. ie. - UInt32 * colorEncodings; - UInt32 flags; - UInt32 supportedSpecialEncodings; - UInt32 specialEncodings[16]; -}; -typedef struct IOHardwareCursorDescriptor IOHardwareCursorDescriptor; - -enum { - kHardwareCursorInfoMajorVersion = 0x0001, - kHardwareCursorInfoMinorVersion = 0x0000 -}; - -/*! - * @struct IOHardwareCursorInfo - * @abstract A structure defining the converted data of a hardware cursor. - * @discussion This structure is used by IOFramebuffer to return the data of a hardware cursor by convertCursorImage() after conversion based on the IOHardwareCursorDescriptor passed to that routine. - * @field majorVersion Set to kHardwareCursorInfoMajorVersion. - * @field minorVersion Set to kHardwareCursorInfoMinorVersion. - * @field cursorHeight The actual size of the cursor is returned. - * @field cursorWidth The actual size of the cursor is returned. - * @field colorMap Pointer to array of IOColorEntry structures, with the number of elements set by the numColors field of the IOHardwareCursorDescriptor. Zero should be passed for direct pixel formats. - * @field hardwareCursorData Buffer to receive the converted cursor data. - * @field cursorHotSpotX Cursor's hotspot. - * @field cursorHotSpotY Cursor's hotspot. - * @field reserved Reserved, set to zero. - */ - -struct IOHardwareCursorInfo { - UInt16 majorVersion; - UInt16 minorVersion; - UInt32 cursorHeight; - UInt32 cursorWidth; - // nil or big enough for hardware's max colors - IOColorEntry * colorMap; - UInt8 * hardwareCursorData; - UInt16 cursorHotSpotX; - UInt16 cursorHotSpotY; - UInt32 reserved[5]; -}; -typedef struct IOHardwareCursorInfo IOHardwareCursorInfo; - -// interrupt types - -enum { - kIOFBVBLInterruptType = 'vbl ', - kIOFBHBLInterruptType = 'hbl ', - kIOFBFrameInterruptType = 'fram', - // Demand to check configuration (Hardware unchanged) - kIOFBConnectInterruptType = 'dci ', - // Demand to rebuild (Hardware has reinitialized on dependent change) - kIOFBChangedInterruptType = 'chng', - // Demand to remove framebuffer (Hardware not available on dependent change -- but must not buserror) - kIOFBOfflineInterruptType = 'remv', - // Notice that hardware is available (after being removed) - kIOFBOnlineInterruptType = 'add ', - // DisplayPort short pulse - kIOFBDisplayPortInterruptType = 'dpir', - // DisplayPort link event - kIOFBDisplayPortLinkChangeInterruptType = 'dplk', - // MCCS - kIOFBMCCSInterruptType = 'mccs' -}; - -// IOAppleTimingID's -enum { - kIOTimingIDInvalid = 0, /* Not a standard timing */ - kIOTimingIDApple_FixedRateLCD = 42, /* Lump all fixed-rate LCDs into one category.*/ - kIOTimingIDApple_512x384_60hz = 130, /* 512x384 (60 Hz) Rubik timing. */ - kIOTimingIDApple_560x384_60hz = 135, /* 560x384 (60 Hz) Rubik-560 timing. */ - kIOTimingIDApple_640x480_67hz = 140, /* 640x480 (67 Hz) HR timing. */ - kIOTimingIDApple_640x400_67hz = 145, /* 640x400 (67 Hz) HR-400 timing. */ - kIOTimingIDVESA_640x480_60hz = 150, /* 640x480 (60 Hz) VGA timing. */ - kIOTimingIDVESA_640x480_72hz = 152, /* 640x480 (72 Hz) VGA timing. */ - kIOTimingIDVESA_640x480_75hz = 154, /* 640x480 (75 Hz) VGA timing. */ - kIOTimingIDVESA_640x480_85hz = 158, /* 640x480 (85 Hz) VGA timing. */ - kIOTimingIDGTF_640x480_120hz = 159, /* 640x480 (120 Hz) VESA Generalized Timing Formula */ - kIOTimingIDApple_640x870_75hz = 160, /* 640x870 (75 Hz) FPD timing.*/ - kIOTimingIDApple_640x818_75hz = 165, /* 640x818 (75 Hz) FPD-818 timing.*/ - kIOTimingIDApple_832x624_75hz = 170, /* 832x624 (75 Hz) GoldFish timing.*/ - kIOTimingIDVESA_800x600_56hz = 180, /* 800x600 (56 Hz) SVGA timing. */ - kIOTimingIDVESA_800x600_60hz = 182, /* 800x600 (60 Hz) SVGA timing. */ - kIOTimingIDVESA_800x600_72hz = 184, /* 800x600 (72 Hz) SVGA timing. */ - kIOTimingIDVESA_800x600_75hz = 186, /* 800x600 (75 Hz) SVGA timing. */ - kIOTimingIDVESA_800x600_85hz = 188, /* 800x600 (85 Hz) SVGA timing. */ - kIOTimingIDVESA_1024x768_60hz = 190, /* 1024x768 (60 Hz) VESA 1K-60Hz timing. */ - kIOTimingIDVESA_1024x768_70hz = 200, /* 1024x768 (70 Hz) VESA 1K-70Hz timing. */ - kIOTimingIDVESA_1024x768_75hz = 204, /* 1024x768 (75 Hz) VESA 1K-75Hz timing (very similar to kIOTimingIDApple_1024x768_75hz). */ - kIOTimingIDVESA_1024x768_85hz = 208, /* 1024x768 (85 Hz) VESA timing. */ - kIOTimingIDApple_1024x768_75hz = 210, /* 1024x768 (75 Hz) Apple 19" RGB. */ - kIOTimingIDApple_1152x870_75hz = 220, /* 1152x870 (75 Hz) Apple 21" RGB. */ - kIOTimingIDAppleNTSC_ST = 230, /* 512x384 (60 Hz, interlaced, non-convolved). */ - kIOTimingIDAppleNTSC_FF = 232, /* 640x480 (60 Hz, interlaced, non-convolved). */ - kIOTimingIDAppleNTSC_STconv = 234, /* 512x384 (60 Hz, interlaced, convolved). */ - kIOTimingIDAppleNTSC_FFconv = 236, /* 640x480 (60 Hz, interlaced, convolved). */ - kIOTimingIDApplePAL_ST = 238, /* 640x480 (50 Hz, interlaced, non-convolved). */ - kIOTimingIDApplePAL_FF = 240, /* 768x576 (50 Hz, interlaced, non-convolved). */ - kIOTimingIDApplePAL_STconv = 242, /* 640x480 (50 Hz, interlaced, convolved). */ - kIOTimingIDApplePAL_FFconv = 244, /* 768x576 (50 Hz, interlaced, convolved). */ - kIOTimingIDVESA_1280x960_75hz = 250, /* 1280x960 (75 Hz) */ - kIOTimingIDVESA_1280x960_60hz = 252, /* 1280x960 (60 Hz) */ - kIOTimingIDVESA_1280x960_85hz = 254, /* 1280x960 (85 Hz) */ - kIOTimingIDVESA_1280x1024_60hz = 260, /* 1280x1024 (60 Hz) */ - kIOTimingIDVESA_1280x1024_75hz = 262, /* 1280x1024 (75 Hz) */ - kIOTimingIDVESA_1280x1024_85hz = 268, /* 1280x1024 (85 Hz) */ - kIOTimingIDVESA_1600x1200_60hz = 280, /* 1600x1200 (60 Hz) VESA timing. */ - kIOTimingIDVESA_1600x1200_65hz = 282, /* 1600x1200 (65 Hz) VESA timing. */ - kIOTimingIDVESA_1600x1200_70hz = 284, /* 1600x1200 (70 Hz) VESA timing. */ - kIOTimingIDVESA_1600x1200_75hz = 286, /* 1600x1200 (75 Hz) VESA timing (pixel clock is 189.2 Mhz dot clock). */ - kIOTimingIDVESA_1600x1200_80hz = 288, /* 1600x1200 (80 Hz) VESA timing (pixel clock is 216>? Mhz dot clock) - proposed only. */ - kIOTimingIDVESA_1600x1200_85hz = 289, /* 1600x1200 (85 Hz) VESA timing (pixel clock is 229.5 Mhz dot clock). */ - kIOTimingIDVESA_1792x1344_60hz = 296, /* 1792x1344 (60 Hz) VESA timing (204.75 Mhz dot clock). */ - kIOTimingIDVESA_1792x1344_75hz = 298, /* 1792x1344 (75 Hz) VESA timing (261.75 Mhz dot clock). */ - kIOTimingIDVESA_1856x1392_60hz = 300, /* 1856x1392 (60 Hz) VESA timing (218.25 Mhz dot clock). */ - kIOTimingIDVESA_1856x1392_75hz = 302, /* 1856x1392 (75 Hz) VESA timing (288 Mhz dot clock). */ - kIOTimingIDVESA_1920x1440_60hz = 304, /* 1920x1440 (60 Hz) VESA timing (234 Mhz dot clock). */ - kIOTimingIDVESA_1920x1440_75hz = 306, /* 1920x1440 (75 Hz) VESA timing (297 Mhz dot clock). */ - kIOTimingIDSMPTE240M_60hz = 400, /* 60Hz V, 33.75KHz H, interlaced timing, 16:9 aspect, typical resolution of 1920x1035. */ - kIOTimingIDFilmRate_48hz = 410, /* 48Hz V, 25.20KHz H, non-interlaced timing, typical resolution of 640x480. */ - kIOTimingIDSony_1600x1024_76hz = 500, /* 1600x1024 (76 Hz) Sony timing (pixel clock is 170.447 Mhz dot clock). */ - kIOTimingIDSony_1920x1080_60hz = 510, /* 1920x1080 (60 Hz) Sony timing (pixel clock is 159.84 Mhz dot clock). */ - kIOTimingIDSony_1920x1080_72hz = 520, /* 1920x1080 (72 Hz) Sony timing (pixel clock is 216.023 Mhz dot clock). */ - kIOTimingIDSony_1920x1200_76hz = 540, /* 1900x1200 (76 Hz) Sony timing (pixel clock is 243.20 Mhz dot clock). */ - kIOTimingIDApple_0x0_0hz_Offline = 550, /* Indicates that this timing will take the display off-line and remove it from the system. */ - kIOTimingIDVESA_848x480_60hz = 570, /* 848x480 (60 Hz) VESA timing. */ - kIOTimingIDVESA_1360x768_60hz = 590 /* 1360x768 (60 Hz) VESA timing. */ -}; - -// framebuffer property keys - -#define kIOFramebufferInfoKey "IOFramebufferInformation" - -#define kIOFBWidthKey "IOFBWidth" -#define kIOFBHeightKey "IOFBHeight" -#define kIOFBRefreshRateKey "IOFBRefreshRate" -#define kIOFBFlagsKey "IOFBFlags" -#define kIOFBBytesPerRowKey "IOFBBytesPerRow" -#define kIOFBBytesPerPlaneKey "IOFBBytesPerPlane" -#define kIOFBBitsPerPixelKey "IOFBBitsPerPixel" -#define kIOFBComponentCountKey "IOFBComponentCount" -#define kIOFBBitsPerComponentKey "IOFBBitsPerComponent" - -#define kIOFBDetailedTimingsKey "IOFBDetailedTimings" -#define kIOFBTimingRangeKey "IOFBTimingRange" -#define kIOFBScalerInfoKey "IOFBScalerInfo" -#define kIOFBCursorInfoKey "IOFBCursorInfo" - -#define kIOFBHostAccessFlagsKey "IOFBHostAccessFlags" - -#define kIOFBMemorySizeKey "IOFBMemorySize" - -#define kIOFBProbeOptionsKey "IOFBProbeOptions" - -#define kIOFBGammaWidthKey "IOFBGammaWidth" -#define kIOFBGammaCountKey "IOFBGammaCount" -#define kIOFBCLUTDeferKey "IOFBCLUTDefer" - -// exists on the hibernate progress display device -#ifndef kIOHibernatePreviewActiveKey -#define kIOHibernatePreviewActiveKey "IOHibernatePreviewActive" -// values for kIOHibernatePreviewActiveKey set by driver -enum { - kIOHibernatePreviewActive = 0x00000001, - kIOHibernatePreviewUpdates = 0x00000002 -}; -#endif - -// CFNumber/CFData -#define kIOFBAVSignalTypeKey "av-signal-type" -enum { - kIOFBAVSignalTypeUnknown = 0x00000000, - kIOFBAVSignalTypeVGA = 0x00000001, - kIOFBAVSignalTypeDVI = 0x00000002, - kIOFBAVSignalTypeHDMI = 0x00000008, - kIOFBAVSignalTypeDP = 0x00000010, -}; - -// diagnostic keys - -#define kIOFBConfigKey "IOFBConfig" -#define kIOFBModesKey "IOFBModes" -#define kIOFBModeIDKey "ID" -#define kIOFBModeDMKey "DM" -#define kIOFBModeTMKey "TM" -#define kIOFBModeAIDKey "AID" -#define kIOFBModeDFKey "DF" - -// display property keys - -#define kIODisplayEDIDKey "IODisplayEDID" -#define kIODisplayLocationKey "IODisplayLocation" // CFString -#define kIODisplayConnectFlagsKey "IODisplayConnectFlags" // CFNumber -#define kIODisplayHasBacklightKey "IODisplayHasBacklight" // CFBoolean -#define kIODisplayIsDigitalKey "IODisplayIsDigital" // CFBoolean -#define kDisplayBundleKey "DisplayBundle" - -#define kAppleDisplayTypeKey "AppleDisplayType" -#define kAppleSenseKey "AppleSense" - -#define kIODisplayMCCSVersionKey "IODisplayMCCSVersion" -#define kIODisplayTechnologyTypeKey "IODisplayTechnologyType" -#define kIODisplayUsageTimeKey "IODisplayUsageTime" -#define kIODisplayFirmwareLevelKey "IODisplayFirmwareLevel" - -enum { - kDisplayVendorIDUnknown = 'unkn', - kDisplayProductIDGeneric = 0x717 -}; - -#define kDisplayVendorID "DisplayVendorID" // CFNumber -#define kDisplayProductID "DisplayProductID" // CFNumber -#define kDisplaySerialNumber "DisplaySerialNumber" // CFNumber -#define kDisplaySerialString "DisplaySerialString" // CFString -#define kDisplayWeekOfManufacture "DisplayWeekManufacture" // CFNumber -#define kDisplayYearOfManufacture "DisplayYearManufacture" // CFNumber - -// CFDictionary of language-locale keys, name values -// eg. "en"="Color LCD", "en-GB"="Colour LCD" -#define kDisplayProductName "DisplayProductName" - -// all CFNumber or CFArray of CFNumber (floats) -#define kDisplayWhitePointX "DisplayWhitePointX" -#define kDisplayWhitePointY "DisplayWhitePointY" -#define kDisplayRedPointX "DisplayRedPointX" -#define kDisplayRedPointY "DisplayRedPointY" -#define kDisplayGreenPointX "DisplayGreenPointX" -#define kDisplayGreenPointY "DisplayGreenPointY" -#define kDisplayBluePointX "DisplayBluePointX" -#define kDisplayBluePointY "DisplayBluePointY" -#define kDisplayWhiteGamma "DisplayWhiteGamma" -#define kDisplayRedGamma "DisplayRedGamma" -#define kDisplayGreenGamma "DisplayGreenGamma" -#define kDisplayBlueGamma "DisplayBlueGamma" - -// Display gamma -#define kDisplayGammaChannels "DisplayGammaChannels" // CFNumber 1 or 3 channel count -#define kDisplayGammaEntryCount "DisplayGammaEntryCount" // CFNumber 1-based count of entries per channel -#define kDisplayGammaEntrySize "DisplayGammaEntrySize" // CFNumber size in bytes of each table entry -#define kDisplayGammaTable "DisplayGammaTable" // CFData - -// CFBoolean -#define kDisplayBrightnessAffectsGamma "DisplayBrightnessAffectsGamma" -#define kDisplayViewAngleAffectsGamma "DisplayViewAngleAffectsGamma" - -// CFData -#define kDisplayCSProfile "DisplayCSProfile" - -// CFNumber -#define kDisplayHorizontalImageSize "DisplayHorizontalImageSize" -#define kDisplayVerticalImageSize "DisplayVerticalImageSize" - -// Pixel description - -// CFBoolean -#define kDisplayFixedPixelFormat "DisplayFixedPixelFormat" - -enum { - kDisplaySubPixelLayoutUndefined = 0x00000000, - kDisplaySubPixelLayoutRGB = 0x00000001, - kDisplaySubPixelLayoutBGR = 0x00000002, - kDisplaySubPixelLayoutQuadGBL = 0x00000003, - kDisplaySubPixelLayoutQuadGBR = 0x00000004, - - kDisplaySubPixelConfigurationUndefined = 0x00000000, - kDisplaySubPixelConfigurationDelta = 0x00000001, - kDisplaySubPixelConfigurationStripe = 0x00000002, - kDisplaySubPixelConfigurationStripeOffset = 0x00000003, - kDisplaySubPixelConfigurationQuad = 0x00000004, - - kDisplaySubPixelShapeUndefined = 0x00000000, - kDisplaySubPixelShapeRound = 0x00000001, - kDisplaySubPixelShapeSquare = 0x00000002, - kDisplaySubPixelShapeRectangular = 0x00000003, - kDisplaySubPixelShapeOval = 0x00000004, - kDisplaySubPixelShapeElliptical = 0x00000005 -}; - -// CFNumbers -#define kDisplaySubPixelLayout "DisplaySubPixelLayout" -#define kDisplaySubPixelConfiguration "DisplaySubPixelConfiguration" -#define kDisplaySubPixelShape "DisplaySubPixelShape" - -#define kIODisplayOverrideMatchingKey "IODisplayOverrideMatching" - -// Display parameters - -#define kIODisplayParametersKey "IODisplayParameters" -#define kIODisplayGUIDKey "IODisplayGUID" - -#define kIODisplayValueKey "value" -#define kIODisplayMinValueKey "min" -#define kIODisplayMaxValueKey "max" - -#define kIODisplayBrightnessKey "brightness" -#define kIODisplayContrastKey "contrast" -#define kIODisplayHorizontalPositionKey "horizontal-position" -#define kIODisplayHorizontalSizeKey "horizontal-size" -#define kIODisplayVerticalPositionKey "vertical-position" -#define kIODisplayVerticalSizeKey "vertical-size" -#define kIODisplayTrapezoidKey "trapezoid" -#define kIODisplayPincushionKey "pincushion" -#define kIODisplayParallelogramKey "parallelogram" -#define kIODisplayRotationKey "rotation" -#define kIODisplayTheatreModeKey "theatre-mode" -#define kIODisplayTheatreModeWindowKey "theatre-mode-window" -#define kIODisplayOverscanKey "oscn" -#define kIODisplayVideoBestKey "vbst" - -#define kIODisplaySpeakerVolumeKey "speaker-volume" -#define kIODisplaySpeakerSelectKey "speaker-select" -#define kIODisplayMicrophoneVolumeKey "microphone-volume" -#define kIODisplayAmbientLightSensorKey "ambient-light-sensor" -#define kIODisplayAudioMuteAndScreenBlankKey "audio-mute-and-screen-blank" -#define kIODisplayAudioTrebleKey "audio-treble" -#define kIODisplayAudioBassKey "audio-bass" -#define kIODisplayAudioBalanceLRKey "audio-balance-LR" -#define kIODisplayAudioProcessorModeKey "audio-processor-mode" -#define kIODisplayPowerModeKey "power-mode" -#define kIODisplayManufacturerSpecificKey "manufacturer-specific" - - -#define kIODisplayRedGammaScaleKey "rgsc" -#define kIODisplayGreenGammaScaleKey "ggsc" -#define kIODisplayBlueGammaScaleKey "bgsc" - -#define kIODisplayParametersCommitKey "commit" -#define kIODisplayParametersDefaultKey "defaults" -#define kIODisplayParametersFlushKey "flush" - -#ifdef __cplusplus -} -#endif - -#endif /* ! _IOKIT_IOGRAPHICSTYPES_H */ diff --git a/i386/include/IOKit/hid/IOHIDDevice.h b/i386/include/IOKit/hid/IOHIDDevice.h deleted file mode 100644 index 29f0024..0000000 --- a/i386/include/IOKit/hid/IOHIDDevice.h +++ /dev/null @@ -1,706 +0,0 @@ -/* - * - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_HID_IOHIDDEVICE_H -#define _IOKIT_HID_IOHIDDEVICE_H - -#include <IOKit/IOService.h> -#include <IOKit/IOMessage.h> -#include <IOKit/IOBufferMemoryDescriptor.h> -#include <IOKit/hidsystem/IOHIDDescriptorParser.h> -#include <IOKit/hid/IOHIDKeys.h> - -class IOHIDSystem; -class IOHIDPointing; -class IOHIDKeyboard; -class IOHIDConsumer; -class IOHIDElementPrivate; -class IOHIDEventQueue; -class IOHIDInterface; -class IOHIDDeviceShim; -struct IOHIDReportHandler; - -/*! - @typedef IOHIDCompletionAction - @abstract Function called when set/get report completes - @param target The target specified in the IOHIDCompletion struct. - @param parameter The parameter specified in the IOHIDCompletion struct. - @param status Completion status -*/ -typedef void (*IOHIDCompletionAction)( - void * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining); - -/*! - @typedef IOHIDCompletion - @abstract Struct spefifying action to perform when set/get report completes. - @param target The target to pass to the action function. - @param action The function to call. - @param parameter The parameter to pass to the action function. -*/ -typedef struct IOHIDCompletion { - void * target; - IOHIDCompletionAction action; - void * parameter; -} IOHIDCompletion; - -/*! - @enum IOHIDReportOption - @abstract Option bits for IOHIDDevice::handleReport, - IOHIDDevice::getReport, and IOHIDDevice::setReport - @constant kIOHIDReportOptionNotInterrupt Tells method that the report - passed was not interrupt driven. -*/ -enum -{ - kIOHIDReportOptionNotInterrupt = 0x100 -}; - - -/*! @class IOHIDDevice : public IOService - @abstract IOHIDDevice defines a Human Interface Device (HID) object, - which will interact with the HID Manager by publishing static properties - in the registry, and also by reporting HID events through shared memory. - IOHIDDevice is an abstract class that must be subclassed to support a - specific type of HID devices, such as USB HID class devices. - <br> - Since most HID devices are expected to be USB devices, IOHIDDevice - uses the USB HID specification to define the format of the report - descriptor, and also reports that are used to communicate with the - hardware via some intervening transport layer. However, there is no - mandate that the transport layer must be restricted to USB. A subclass - may be created to support legacy ADB joysticks, and issue packets on - the ADB bus and translate those packets to USB reports, and vice versa. - IOHIDDevice does not care how those reports are generated or consumed - by the physical device, as long as the reports abide to the USB - specification. */ - -class IOHIDDevice : public IOService -{ - OSDeclareDefaultStructors( IOHIDDevice ) - - friend class IOHIDLibUserClient; - friend class IOHIDDeviceShim; - -private: - OSArray * _elementArray; - UInt32 _dataElementIndex; - IORecursiveLock * _elementLock; - IOHIDReportHandler * _reportHandlers; - IOBufferMemoryDescriptor * _elementValuesDescriptor; - bool _readyForInputReports; - UInt32 _reportCount; - UInt32 _maxInputReportSize; - UInt32 _maxOutputReportSize; - UInt32 _maxFeatureReportSize; - - struct ExpansionData { - OSSet * clientSet; - IOService * seizedClient; - AbsoluteTime eventDeadline; - IONotifier * publishNotify; - OSArray * inputInterruptElementArray; - bool performTickle; - IOHIDInterface * interfaceNub; - IOHIDElementPrivate * rollOverElement; - OSArray * hierarchElements; - }; - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * _reserved; - - // HID report descriptor parsing support. - - bool linkToParent( const OSArray * array, - UInt32 parentIndex, - UInt32 childIndex ); - - bool createCollectionElements( HIDPreparsedDataRef parseData, - OSArray * array, - UInt32 maxCount ); - - bool createValueElements( HIDPreparsedDataRef parseData, - OSArray * array, - UInt32 hidReportType, - IOHIDElementType elementType, - UInt32 maxCount ); - - bool createButtonElements( HIDPreparsedDataRef parseData, - OSArray * array, - UInt32 hidReportType, - IOHIDElementType elementType, - UInt32 maxCount ); - - bool createReportHandlerElements( HIDPreparsedDataRef parseData); - - OSArray * newDeviceUsagePairs(); - - bool getReportCountAndSizes( HIDPreparsedDataRef parseData ); - - bool setReportSize( UInt8 reportID, - IOHIDReportType reportType, - UInt32 bits ); - - IOReturn createElementHierarchy( HIDPreparsedDataRef parseData ); - - IOReturn parseReportDescriptor( IOMemoryDescriptor * report, - IOOptionBits options = 0 ); - - IOBufferMemoryDescriptor * createMemoryForElementValues(); - - - static bool _publishNotificationHandler( void * target, - void * ref, IOService * newService ); - -protected: - -/*! @function free - @abstract Free the IOHIDDevice object. - @discussion Release all resources that were previously allocated, - then call super::free() to propagate the call to our superclass. */ - - virtual void free(); - -/*! @function handleOpen - @abstract Handle a client open on the interface. - @discussion This method is called by IOService::open() with the - arbitration lock held, and must return true to accept the client open. - This method will in turn call handleClientOpen() to qualify the client - requesting the open. - @param client The client object that requested the open. - @param options Options passed to IOService::open(). - @param argument Argument passed to IOService::open(). - @result true to accept the client open, false otherwise. */ - - virtual bool handleOpen(IOService * client, - IOOptionBits options, - void * argument); - -/*! @function handleClose - @abstract Handle a client close on the interface. - @discussion This method is called by IOService::close() with the - arbitration lock held. This method will in turn call handleClientClose() - to notify interested subclasses about the client close. If this represents - the last close, then the interface will also close the controller before - this method returns. The controllerWillClose() method will be called before - closing the controller. Subclasses should not override this method. - @param client The client object that requested the close. - @param options Options passed to IOService::close(). */ - - virtual void handleClose(IOService * client, IOOptionBits options); - -/*! @function handleIsOpen - @abstract Query whether a client has an open on the interface. - @discussion This method is always called by IOService with the - arbitration lock held. Subclasses should not override this method. - @result true if the specified client, or any client if none (0) is - specified, presently has an open on this object. */ - - virtual bool handleIsOpen(const IOService * client) const; - -/*! @function handleStart - @abstract Prepare the hardware and driver to support I/O operations. - @discussion IOHIDDevice will call this method from start() before - any I/O operations are issued to the concrete subclass. Methods - such as newReportDescriptor() are only called after handleStart() - has returned true. A subclass that overrides this method should - begin its implementation by calling the version in super, and - then check the return value. - @param provider The provider argument passed to start(). - @result True on success, or false otherwise. Returning false will - cause start() to fail and return false. */ - - virtual bool handleStart( IOService * provider ); - -/*! @function handleStop - @abstract Quiesce the hardware and stop the driver. - @discussion IOHIDDevice will call this method from stop() to - signal that the hardware should be quiesced and the driver stopped. - A subclass that overrides this method should end its implementation - by calling the version in super. - @param provider The provider argument passed to stop(). */ - - virtual void handleStop( IOService * provider ); - -/*! @function newUserClient - @abstract Handle a request to create a connection for a non kernel - client. - @discussion Create a new IOUserClient, or a subclass of IOUserClient, - to service a connection to a non kernel client. This implementation - will simply call the implementation in IOService to handle the call. - @param owningTask The mach task requesting the connection. - @param security_id A token representing the access level for the task. - @param type A constant specifying the type of connection to be created. - @param properties A dictionary of additional properties for the connection. - @param handler The IOUserClient object returned. - @result The return from IOService::newUserClient() is returned. */ - - virtual IOReturn newUserClient( task_t owningTask, - void * security_id, - UInt32 type, - OSDictionary * properties, - IOUserClient ** handler ); - IOReturn newUserClientGated(task_t owningTask, - void * security_id, - OSDictionary * properties, - IOUserClient ** handler ); - -/*! @function publishProperties - @abstract Publish HID properties to the I/O Kit registry. - @discussion Called by the start() method to fetch and publish all - HID properties to the I/O Kit registry. These properties will allow - the HID Manager to identify all HID device(s) in the system, by - iterating through objects that are subclasses of IOHIDDevice, and - then fetch their published property values. The implementation in - IOHIDDevice will call methods to get each individual HID property, - and subclasses will not normally need to override this method. - @param provider The provider argument passed to start(). - @result True to indicate that all properties were discovered and - published to the registry, false otherwise. Returning false will - cause start() to fail and return false. */ - - virtual bool publishProperties( IOService * provider ); - -public: - -/*! @function init - @abstract Initialize an IOHIDDevice object. - @discussion Prime the IOHIDDevice object and prepare it to support - a probe() or a start() call. This implementation will simply call - super::init(). - @param A dictionary A property table associated with this IOHIDDevice - instance. - @result True on sucess, or false otherwise. */ - - virtual bool init( OSDictionary * dictionary = 0 ); - -/*! @function start - @abstract Start up the driver using the given provider. - @discussion IOHIDDevice will allocate resources, then call handleStart() - before fetching the report descriptor through newReportDescriptor(), and - publishing HID properties to the registry. Before returning true to - indicate success, registerService() is called to trigger client matching. - Subclasses are recommended to override handleStart(). - @param provider The provider that the driver was matched to, and selected - to run with. - @result True on success, or false otherwise. */ - - virtual bool start( IOService * provider ); - -/*! @function stop - @abstract Called by a provider (during its termination) before detaching - all its clients. - @discussion IOHIDDevice will call handleStop(), then release allocated - resources. Subclasses are recommended to override handleStop(). - @param provider The provider that the driver was started on. */ - - virtual void stop( IOService * provider ); - -/*! @function matchPropertyTable - @abstract Called by the provider during a match - @discussion Compare the properties in the supplied table to this - object's properties. - @param table The property table that this device will match against -*/ - - virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); - -/*! @function newTransportString - @abstract Returns a string object that describes the transport - layer used by the HID device. - @result A string object. The caller must decrement the retain count - on the object returned. */ - - virtual OSString * newTransportString() const; - -/*! @function newManufacturerString - @abstract Returns a string object that describes the manufacturer - of the HID device. - @result A string object. The caller must decrement the retain count - on the object returned. */ - - virtual OSString * newManufacturerString() const; - -/*! @function newProductString - @abstract Returns a string object that describes the product - of the HID device. - @result A string object. The caller must decrement the retain count - on the object returned. */ - - virtual OSString * newProductString() const; - -/*! @function newVendorIDNumber - @abstract Returns a number object that describes the vendor ID - of the HID device. - @result A number object. The caller must decrement the retain count - on the object returned. */ - - virtual OSNumber * newVendorIDNumber() const; - -/*! @function newProductIDNumber - @abstract Returns a number object that describes the product ID - of the HID device. - @result A number object. The caller must decrement the retain count - on the object returned. */ - - virtual OSNumber * newProductIDNumber() const; - -/*! @function newVersionNumber - @abstract Returns a number object that describes the version number - of the HID device. - @result A number object. The caller must decrement the retain count - on the object returned. */ - - virtual OSNumber * newVersionNumber() const; - -// *** THIS HAS BEEN DEPRECATED. PLEASE USE newSerialNumberString *** -/*! @function newSerialNumber - @abstract THIS HAS BEEN DEPRECATED. PLEASE USE newSerialNumberString. - @result A number object. The caller must decrement the retain count - on the object returned. */ - - virtual OSNumber * newSerialNumber() const; - -/*! @function newPrimaryUsageNumber - @abstract Returns a number object that describes the primary usage - of the HID device. - @result A number object. The caller must decrement the retain count - on the object returned. */ - - virtual OSNumber * newPrimaryUsageNumber() const; - -/*! @function newPrimaryUsagePageNumber - @abstract Returns a number object that describes the primary usage - page of the HID device. - @result A number object. The caller must decrement the retain count - on the object returned. */ - - virtual OSNumber * newPrimaryUsagePageNumber() const; - -/*! @function newReportDescriptor - @abstract Create and return a new memory descriptor that describes the - report descriptor for the HID device. - @discussion A subclass must override this pure virtual function, and - return a memory descriptor that describes the HID report descriptor as - defined by the USB Device Class Definition for Human Interface Devices - Version 1.1 specification. - @param descriptor Pointer to the memory descriptor returned. This - memory descriptor will be released by the caller. - @result kIOReturnSuccess on success, or an error return otherwise. */ - - virtual IOReturn newReportDescriptor( - IOMemoryDescriptor ** descriptor ) const = 0; - -/*! @function handleReport - @abstract Handle an asynchronous report received from the HID device. - @param report A memory descriptor that describes the report. - @param reportType The type of report. - @param options Options to specify the request. No options are - currently defined, and the default value is 0. - @result kIOReturnSuccess on success, or an error return otherwise. */ - - virtual IOReturn handleReport( - IOMemoryDescriptor * report, - IOHIDReportType reportType = kIOHIDReportTypeInput, - IOOptionBits options = 0 ); - -/*! @function getReport - @abstract Get a report from the HID device. - @discussion A completion parameter may be added in the future. - @param report A memory descriptor that describes the memory to store - the report read from the HID device. - @param reportType The report type. - @param options The lower 8 bits will represent the Report ID. The - other 24 bits are options to specify the request. - @result kIOReturnSuccess on success, or an error return otherwise. */ - - virtual IOReturn getReport( IOMemoryDescriptor * report, - IOHIDReportType reportType, - IOOptionBits options ); - -/*! @function setReport - @abstract Send a report to the HID device. - @discussion A completion parameter may be added in the future. - @param report A memory descriptor that describes the report to send - to the HID device. - @param reportType The report type. - @param options The lower 8 bits will represent the Report ID. The - other 24 bits are options to specify the request. - @result kIOReturnSuccess on success, or an error return otherwise. */ - - virtual IOReturn setReport( IOMemoryDescriptor * report, - IOHIDReportType reportType, - IOOptionBits options = 0 ); - -/*! @function getMemoryWithCurrentElementValues - @abstract Get a reference to a memory descriptor that describes the - memory block containing the current HID element values. - @discussion Each HID element that can contribute to an input, output, - or feature report, is assigned an area of memory from a common memory - block allocated by IOHIDDevice. Each element will use its assigned - memory area to store its current value, defined by an IOHIDElementValue - structure. The memory described by the memory descriptor may be mapped - to user space to allow the HID Manager to poll the current element - value without the cost of a user-kernel transition. Subclasses should - not override this method. - @result A reference to a memory descriptor that describes the current - element values, or 0 to indicate a resource shortage. */ - - virtual IOMemoryDescriptor * getMemoryWithCurrentElementValues() const; - -/*! @function registerElement - @abstract A registration function called by a HID element to register - itself, and also to obtain an unique cookie identifier - (unique per device, not unique system-wide). - @discussion An internal data type, an IOHIDElementPrivate, is created to - represent each HID element discovered by parsing the HID report - descriptor. Each element created will call this method to register - itself with its owner (IOHIDDevice), and also to obtain an element - cookie that is used by HID Manager to specify and identify the element. - Subclasses should not override this method. - @param element The element that is requesting registration with its - owner. - @param cookie Pointer to the returned cookie assigned to this element. - @result True on success, or false otherwise. */ - - virtual bool registerElement( IOHIDElementPrivate * element, - IOHIDElementCookie * cookie ); - -/*! @function startEventDelivery - @abstract Start delivering events from a HID element to the event - queue specified. - @discussion Clients of IOHIDDevice may create an IOHIDEventQueue, and - then call this method to register for delivery of events generated by - one or more HID elements to that event queue. Subclasses should not - override this method. - @param queue The event queue that is interested in receiving events - generated by the HID element specified. The retain count on the queue - will be incremented by one. - @param cookie The cookie for a HID element published by the HID device. - @param options Options to specify the request. No options are currently - defined, and the default value is zero. - @result kIOReturnSuccess on success, or kIOReturnBadArgument if the - queue or the cookie argument specified is invalid, or kIOReturnNoMemory - if a resource shortage was encountered. */ - - virtual IOReturn startEventDelivery( IOHIDEventQueue * queue, - IOHIDElementCookie cookie, - IOOptionBits options = 0 ); - -/*! @function stopEventDelivery - @abstract Stop delivering events from one or more HID elements to the - event queue specified. - @discussion Clients that called startEventDelivery() must eventually - call this method to stop event delivery to its queue from one or more - HID elements. - @param queue The event queue that no longer wishes to receive events - generated by the HID element specified. - @param cookie The cookie for a HID element published by the HID device. - The default value of zero indicates that the queue should be removed from - the event dispatch list of all HID elements published by the HID device. - Subclasses should not override this method. - @result kIOReturnSuccess if the queue was removed from the event dispatch - list for one or more HID elements, or kIOReturnBadArgument if the queue - or the cookie argument specified is invalid, or kIOReturnNotFound if the - queue was not found. */ - - virtual IOReturn stopEventDelivery( IOHIDEventQueue * queue, - IOHIDElementCookie cookie = 0 ); - -/*! @function checkEventDelivery - @abstract Check whether events from a HID element will be delivered to - the event queue specified. - @param queue The event queue. - @param cookie The cookie for a HID element published by the HID device. - @param isActive Pointer to the return value that is set to true if events - generated by the HID element will be delivered to the queue, or false - otherwise. This return value is set only if kIOReturnSuccess is - returned. - @result kIOReturnSuccess on success, or kIOReturnBadArgument if one or - more of the arguments provided are invalid. */ - - virtual IOReturn checkEventDelivery( IOHIDEventQueue * queue, - IOHIDElementCookie cookie, - bool * isActive ); - -/*! @function updateElementValues - @abstract Updates element values from a HID device via getReport. - @discussion A completion parameter may be added in the future. - @param cookies A list of element cookies who's values need to be - set on the device. - @param cookieCount The number of element cookies. - @result kIOReturnSuccess on success, or an error return otherwise. */ - OSMetaClassDeclareReservedUsed(IOHIDDevice, 0); - virtual IOReturn updateElementValues(IOHIDElementCookie * cookies, UInt32 cookieCount = 1); - -/*! @function postElementValues - @abstract Posts element values to a HID device via setReport. - @discussion A completion parameter may be added in the future. - @param cookies A list of element cookies who's values need to be - set on the device. - @param cookieCount The number of element cookies. - @result kIOReturnSuccess on success, or an error return otherwise. */ - OSMetaClassDeclareReservedUsed(IOHIDDevice, 1); - virtual IOReturn postElementValues(IOHIDElementCookie * cookies, UInt32 cookieCount = 1); - -/*! @function newSerialNumberString - @abstract Returns a string object that describes the serial number - of the HID device. - @result A number object. The caller must decrement the retain count - on the object returned. */ - OSMetaClassDeclareReservedUsed(IOHIDDevice, 2); - virtual OSString * newSerialNumberString() const; - -/*! @function newLocationIDNumber - @abstract Returns a number object that describes the location ID - of the HID device. - @result A number object. The caller must decrement the retain count - on the object returned. */ - OSMetaClassDeclareReservedUsed(IOHIDDevice, 3); - virtual OSNumber * newLocationIDNumber() const; - -/*! @function getReport - @abstract Get a report from the HID device. - @discussion A completion parameter may be added in the future. - @param report A memory descriptor that describes the memory to store - the report read from the HID device. - @param reportType The report type. - @param options The lower 8 bits will represent the Report ID. The - other 24 bits are options to specify the request. - @param completionTimeout Specifies an amount of time (in ms) after which - the command will be aborted if the entire command has not been completed. - @param completion Function to call when request completes. If omitted then - getReport() executes synchronously, blocking until the request is complete. - @result kIOReturnSuccess on success, or an error return otherwise. */ - - OSMetaClassDeclareReservedUsed(IOHIDDevice, 4); - virtual IOReturn getReport( IOMemoryDescriptor * report, - IOHIDReportType reportType, - IOOptionBits options, - UInt32 completionTimeout, - IOHIDCompletion * completion = 0); - -/*! @function setReport - @abstract Send a report to the HID device. - @discussion A completion parameter may be added in the future. - @param report A memory descriptor that describes the report to send - to the HID device. - @param reportType The report type. - @param options The lower 8 bits will represent the Report ID. The - other 24 bits are options to specify the request. - @param completionTimeout Specifies an amount of time (in ms) after which - the command will be aborted if the entire command has not been completed. - @param completion Function to call when request completes. If omitted then - setReport() executes synchronously, blocking until the request is complete. - @result kIOReturnSuccess on success, or an error return otherwise. */ - - OSMetaClassDeclareReservedUsed(IOHIDDevice, 5); - virtual IOReturn setReport( IOMemoryDescriptor * report, - IOHIDReportType reportType, - IOOptionBits options, - UInt32 completionTimeout, - IOHIDCompletion * completion = 0); - -/*! @function newVendorIDSourceNumber - @abstract Returns a number object that describes the vendor ID - source of the HID device. - @result A number object. The caller must decrement the retain count - on the object returned. */ - OSMetaClassDeclareReservedUsed(IOHIDDevice, 6); - virtual OSNumber * newVendorIDSourceNumber() const; - -/*! @function newCountryCodeNumber - @abstract Returns a number object that describes the country code - of the HID device. - @result A number object. The caller must decrement the retain count - on the object returned. */ - OSMetaClassDeclareReservedUsed(IOHIDDevice, 7); - virtual OSNumber * newCountryCodeNumber() const; - - -/*! @function handleReportWithTime - @abstract Handle an asynchronous report received from the HID device. - @param timeStamp The timestamp of report. - @param report A memory descriptor that describes the report. - @param reportType The type of report. Currently, only - kIOHIDReportTypeInput report type is handled. - @param options Options to specify the request. No options are - currently defined, and the default value is 0. - @result kIOReturnSuccess on success, or an error return otherwise. */ - - OSMetaClassDeclareReservedUsed(IOHIDDevice, 8); - virtual IOReturn handleReportWithTime( - AbsoluteTime timeStamp, - IOMemoryDescriptor * report, - IOHIDReportType reportType = kIOHIDReportTypeInput, - IOOptionBits options = 0); - -/*! @function newReportInterval - @abstract Returns a number object that describes the actual polling - interval of the HID device in microseconds. - @result A number object. The caller must decrement the retain count - on the object returned. */ - OSMetaClassDeclareReservedUsed(IOHIDDevice, 9); - virtual OSNumber * newReportIntervalNumber() const; - - OSMetaClassDeclareReservedUnused(IOHIDDevice, 10); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 11); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 12); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 13); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 14); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 15); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 16); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 17); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 18); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 19); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 20); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 21); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 22); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 23); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 24); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 25); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 26); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 27); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 28); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 29); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 30); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 31); - -#ifndef __ppc__ - OSMetaClassDeclareReservedUnused(IOHIDDevice, 32); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 33); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 34); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 35); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 36); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 37); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 38); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 39); - OSMetaClassDeclareReservedUnused(IOHIDDevice, 40); -#endif - -}; - -#endif /* !_IOKIT_HID_IOHIDDEVICE_H */ diff --git a/i386/include/IOKit/hid/IOHIDElement.h b/i386/include/IOKit/hid/IOHIDElement.h deleted file mode 100644 index f4fbb17..0000000 --- a/i386/include/IOKit/hid/IOHIDElement.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_HID_IOHIDELEMENT_H -#define _IOKIT_HID_IOHIDELEMENT_H - -#include <libkern/c++/OSArray.h> -#include <libkern/c++/OSData.h> -#include <IOKit/hid/IOHIDKeys.h> - -//=========================================================================== -// An object that describes a single HID element. - -class IOHIDElement: public OSObject -{ - OSDeclareAbstractStructors( IOHIDElement ) - - struct ExpansionData { - }; - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * _reserved; - - -public: - - virtual IOHIDElementCookie getCookie() = 0; - virtual IOHIDElement * getParentElement() = 0; - virtual OSArray * getChildElements() = 0; - virtual IOHIDElementType getType() = 0; - virtual IOHIDElementCollectionType getCollectionType() = 0; - virtual UInt32 getUsagePage() = 0; - virtual UInt32 getUsage() = 0; - virtual UInt32 getLogicalMin() = 0; - virtual UInt32 getLogicalMax() = 0; - virtual UInt32 getPhysicalMin() = 0; - virtual UInt32 getPhysicalMax() = 0; - virtual UInt32 getUnitExponent() = 0; - virtual UInt32 getUnit() = 0; - virtual UInt32 getReportSize() = 0; - virtual UInt32 getReportCount() = 0; - virtual UInt32 getReportID() = 0; - virtual UInt32 getFlags() = 0; - virtual AbsoluteTime getTimeStamp() = 0; - virtual UInt32 getValue() = 0; - virtual OSData * getDataValue() = 0; - virtual void setValue(UInt32 value) = 0; - virtual void setDataValue(OSData * value) = 0; - - OSMetaClassDeclareReservedUnused(IOHIDElement, 0); - OSMetaClassDeclareReservedUnused(IOHIDElement, 1); - OSMetaClassDeclareReservedUnused(IOHIDElement, 2); - OSMetaClassDeclareReservedUnused(IOHIDElement, 3); - OSMetaClassDeclareReservedUnused(IOHIDElement, 4); - OSMetaClassDeclareReservedUnused(IOHIDElement, 5); - OSMetaClassDeclareReservedUnused(IOHIDElement, 6); - OSMetaClassDeclareReservedUnused(IOHIDElement, 7); - OSMetaClassDeclareReservedUnused(IOHIDElement, 8); - OSMetaClassDeclareReservedUnused(IOHIDElement, 9); - OSMetaClassDeclareReservedUnused(IOHIDElement, 10); - OSMetaClassDeclareReservedUnused(IOHIDElement, 11); - OSMetaClassDeclareReservedUnused(IOHIDElement, 12); - OSMetaClassDeclareReservedUnused(IOHIDElement, 13); - OSMetaClassDeclareReservedUnused(IOHIDElement, 14); - OSMetaClassDeclareReservedUnused(IOHIDElement, 15); - OSMetaClassDeclareReservedUnused(IOHIDElement, 16); - OSMetaClassDeclareReservedUnused(IOHIDElement, 17); - OSMetaClassDeclareReservedUnused(IOHIDElement, 18); - OSMetaClassDeclareReservedUnused(IOHIDElement, 19); - OSMetaClassDeclareReservedUnused(IOHIDElement, 20); - OSMetaClassDeclareReservedUnused(IOHIDElement, 21); - OSMetaClassDeclareReservedUnused(IOHIDElement, 22); - OSMetaClassDeclareReservedUnused(IOHIDElement, 23); - OSMetaClassDeclareReservedUnused(IOHIDElement, 24); - OSMetaClassDeclareReservedUnused(IOHIDElement, 25); - OSMetaClassDeclareReservedUnused(IOHIDElement, 26); - OSMetaClassDeclareReservedUnused(IOHIDElement, 27); - OSMetaClassDeclareReservedUnused(IOHIDElement, 28); - OSMetaClassDeclareReservedUnused(IOHIDElement, 29); - OSMetaClassDeclareReservedUnused(IOHIDElement, 30); - OSMetaClassDeclareReservedUnused(IOHIDElement, 31); - -}; - -#endif /* !_IOKIT_HID_IOHIDELEMENT_H */ diff --git a/i386/include/IOKit/hid/IOHIDInterface.h b/i386/include/IOKit/hid/IOHIDInterface.h deleted file mode 100644 index 54b4230..0000000 --- a/i386/include/IOKit/hid/IOHIDInterface.h +++ /dev/null @@ -1,252 +0,0 @@ -/* - * - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_HID_IOHIDINTERFACE_H -#define _IOKIT_HID_IOHIDINTERFACE_H - -#include <IOKit/IOService.h> -#include <IOKit/hid/IOHIDKeys.h> - -class IOHIDDevice; - -/*! @class IOHIDInterface : public IOService - @abstract In kernel interface to a HID device. - @discussion -*/ - -class IOHIDInterface: public IOService -{ - OSDeclareDefaultStructors( IOHIDInterface ) - -public: - - /*! @typedef IOHIDInterface::InterruptReportAction - @abstract Callback to handle an asynchronous report received from - the HID device. - @discussion This callback is set when calling IOHIDInterface::open. - @param target Pointer to your data object. - @param timestamp Time when the report was delivered. - @param report A memory descriptor that describes the report. - @param reportType The type of report. - @param reportID The ID of the report. - @param refcon void * pointer to more data. - */ - typedef void (*InterruptReportAction)( - OSObject * target, - AbsoluteTime timestamp, - IOMemoryDescriptor * report, - IOHIDReportType type, - UInt32 reportID, - void * refcon); - - /*! - @typedef IOHIDInterface::CompletionAction - @discussion Function called when HID I/O completes. - @param target - @param refcon - @param status Completion status. - @param bufferSizeRemaining Bytes left to be transferred. - */ - - typedef void (*CompletionAction)( - OSObject * target, - void * refcon, - IOReturn status, - UInt32 bufferSizeRemaining); - -private: - IOHIDDevice * _owner; - OSArray * _elementArray; - InterruptReportAction _interruptAction; - void * _interruptRefCon; - OSObject * _interruptTarget; - OSString * _transportString; - OSString * _manufacturerString; - OSString * _productString; - OSString * _serialNumberString; - UInt32 _locationID; - UInt32 _vendorID; - UInt32 _vendorIDSource; - UInt32 _productID; - UInt32 _version; - UInt32 _countryCode; - IOByteCount _maxReportSize[kIOHIDReportTypeCount]; - - struct ExpansionData { - UInt32 reportInterval; - }; - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * _reserved; - -protected: - - /*! - @function free - @abstract Free the IOHIDInterface object. - @discussion Release all resources that were previously allocated, - then call super::free() to propagate the call to our superclass. - */ - - virtual void free(); - -public: - - static IOHIDInterface * withElements ( OSArray * elements ); - - /*! - @function init - @abstract Initialize an IOHIDInterface object. - @discussion Prime the IOHIDInterface object and prepare it to support - a probe() or a start() call. This implementation will simply call - super::init(). - @param A dictionary A property table associated with this IOHIDInterface - instance. - @result True on sucess, or false otherwise. - */ - - virtual bool init( OSDictionary * dictionary = 0 ); - - /*! - @function start - @abstract Start up the driver using the given provider. - @discussion IOHIDInterface will allocate resources. Before returning true - to indicate success, registerService() is called to trigger client matching. - @param provider The provider that the driver was matched to, and selected - to run with. - @result True on success, or false otherwise. - */ - - virtual bool start( IOService * provider ); - - /*! - @function matchPropertyTable - @abstract Called by the provider during a match - @discussion Compare the properties in the supplied table to this - object's properties. - @param table The property table that this device will match against - */ - - virtual bool matchPropertyTable( - OSDictionary * table, - SInt32 * score); - - virtual bool open ( - IOService * client, - IOOptionBits options, - InterruptReportAction action, - void * refCon); - - virtual void close( - IOService * client, - IOOptionBits options = 0 ); - - virtual OSString * getTransport (); - virtual UInt32 getLocationID (); - virtual UInt32 getVendorID (); - virtual UInt32 getVendorIDSource (); - virtual UInt32 getProductID (); - virtual UInt32 getVersion (); - virtual UInt32 getCountryCode (); - virtual OSString * getManufacturer (); - virtual OSString * getProduct (); - virtual OSString * getSerialNumber (); - virtual IOByteCount getMaxReportSize (IOHIDReportType type); - - virtual OSArray * createMatchingElements ( - OSDictionary * matching = 0, - IOOptionBits options = 0); - - virtual void handleReport ( - AbsoluteTime timeStamp, - IOMemoryDescriptor * report, - IOHIDReportType reportType, - UInt32 reportID, - IOOptionBits options = 0); - - virtual IOReturn setReport ( - IOMemoryDescriptor * report, - IOHIDReportType reportType, - UInt32 reportID = 0, - IOOptionBits options = 0); - - virtual IOReturn getReport ( - IOMemoryDescriptor * report, - IOHIDReportType reportType, - UInt32 reportID = 0, - IOOptionBits options = 0); - - virtual IOReturn setReport ( - IOMemoryDescriptor * report, - IOHIDReportType reportType, - UInt32 reportID = 0, - IOOptionBits options = 0, - UInt32 completionTimeout = 0, - CompletionAction * completion = 0); - - virtual IOReturn getReport ( - IOMemoryDescriptor * report, - IOHIDReportType reportType, - UInt32 reportID = 0, - IOOptionBits options = 0, - UInt32 completionTimeout = 0, - CompletionAction * completion = 0); - - OSMetaClassDeclareReservedUsed(IOHIDInterface, 0); - virtual UInt32 getReportInterval (); - - OSMetaClassDeclareReservedUnused(IOHIDInterface, 1); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 2); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 3); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 4); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 5); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 6); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 7); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 8); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 9); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 10); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 11); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 12); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 13); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 14); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 15); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 16); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 17); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 18); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 19); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 20); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 21); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 22); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 23); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 24); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 25); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 26); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 27); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 28); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 29); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 30); - OSMetaClassDeclareReservedUnused(IOHIDInterface, 31); -}; - -#endif /* !_IOKIT_HID_IOHIDINTERFACE_H */ diff --git a/i386/include/IOKit/hid/IOHIDKeys.h b/i386/include/IOKit/hid/IOHIDKeys.h deleted file mode 100644 index a4e3789..0000000 --- a/i386/include/IOKit/hid/IOHIDKeys.h +++ /dev/null @@ -1,349 +0,0 @@ -/* - * - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_HID_IOHIDKEYS_H_ -#define _IOKIT_HID_IOHIDKEYS_H_ - -#include <sys/cdefs.h> -#include <IOKit/hidsystem/IOHIDParameter.h> - -__BEGIN_DECLS - -/* The following keys are used to search the IORegistry for HID related services -*/ - -/* This is used to find HID Devices in the IORegistry */ -#define kIOHIDDeviceKey "IOHIDDevice" - -/*! - @defined HID Device Property Keys - @abstract Keys that represent properties of a paticular device. - @discussion Keys that represent properties of a paticular device. Can be added - to your matching dictionary when refining searches for HID devices. - <br><br> - <b>Please note:</b><br> - kIOHIDPrimaryUsageKey and kIOHIDPrimaryUsagePageKey are no longer - rich enough to describe a device's capabilities. Take, for example, a - device that describes both a keyboard and a mouse in the same descriptor. - The previous behavior was to only describe the keyboard behavior with the - primary usage and usage page. Needless to say, this would sometimes cause - a program interested in mice to skip this device when matching. - <br> - Thus we have added 3 - additional keys: - <ul> - <li>kIOHIDDeviceUsageKey</li> - <li>kIOHIDDeviceUsagePageKey</li> - <li>kIOHIDDeviceUsagePairsKey</li> - </ul> - kIOHIDDeviceUsagePairsKey is used to represent an array of dictionaries containing - key/value pairs referenced by kIOHIDDeviceUsageKey and kIOHIDDeviceUsagePageKey. - These usage pairs describe all application type collections (behaviors) defined - by the device. - <br><br> - An application intersted in only matching on one criteria would only add the - kIOHIDDeviceUsageKey and kIOHIDDeviceUsagePageKey keys to the matching dictionary. - If it is interested in a device that has multiple behaviors, the application would - instead add an array or dictionaries referenced by kIOHIDDeviceUsagePairsKey to his - matching dictionary. -*/ -#define kIOHIDTransportKey "Transport" -#define kIOHIDVendorIDKey "VendorID" -#define kIOHIDVendorIDSourceKey "VendorIDSource" -#define kIOHIDProductIDKey "ProductID" -#define kIOHIDVersionNumberKey "VersionNumber" -#define kIOHIDManufacturerKey "Manufacturer" -#define kIOHIDProductKey "Product" -#define kIOHIDSerialNumberKey "SerialNumber" -#define kIOHIDCountryCodeKey "CountryCode" -#define kIOHIDStandardTypeKey "StandardType" -#define kIOHIDLocationIDKey "LocationID" -#define kIOHIDDeviceUsageKey "DeviceUsage" -#define kIOHIDDeviceUsagePageKey "DeviceUsagePage" -#define kIOHIDDeviceUsagePairsKey "DeviceUsagePairs" -#define kIOHIDPrimaryUsageKey "PrimaryUsage" -#define kIOHIDPrimaryUsagePageKey "PrimaryUsagePage" -#define kIOHIDMaxInputReportSizeKey "MaxInputReportSize" -#define kIOHIDMaxOutputReportSizeKey "MaxOutputReportSize" -#define kIOHIDMaxFeatureReportSizeKey "MaxFeatureReportSize" -#define kIOHIDReportIntervalKey "ReportInterval" -#define kIOHIDReportDescriptorKey "ReportDescriptor" - -/*! - @define kIOHIDElementKey - @abstract Keys that represents an element property. - @discussion Property for a HID Device or element dictionary. - Elements can be heirarchical, so they can contain other elements. -*/ -#define kIOHIDElementKey "Elements" - -/*! - @defined HID Element Dictionary Keys - @abstract Keys that represent properties of a particular elements. - @discussion These keys can also be added to a matching dictionary - when searching for elements via copyMatchingElements. -*/ -#define kIOHIDElementCookieKey "ElementCookie" -#define kIOHIDElementTypeKey "Type" -#define kIOHIDElementCollectionTypeKey "CollectionType" -#define kIOHIDElementUsageKey "Usage" -#define kIOHIDElementUsagePageKey "UsagePage" -#define kIOHIDElementMinKey "Min" -#define kIOHIDElementMaxKey "Max" -#define kIOHIDElementScaledMinKey "ScaledMin" -#define kIOHIDElementScaledMaxKey "ScaledMax" -#define kIOHIDElementSizeKey "Size" -#define kIOHIDElementReportSizeKey "ReportSize" -#define kIOHIDElementReportCountKey "ReportCount" -#define kIOHIDElementReportIDKey "ReportID" -#define kIOHIDElementIsArrayKey "IsArray" -#define kIOHIDElementIsRelativeKey "IsRelative" -#define kIOHIDElementIsWrappingKey "IsWrapping" -#define kIOHIDElementIsNonLinearKey "IsNonLinear" -#define kIOHIDElementHasPreferredStateKey "HasPreferredState" -#define kIOHIDElementHasNullStateKey "HasNullState" -#define kIOHIDElementFlagsKey "Flags" -#define kIOHIDElementUnitKey "Unit" -#define kIOHIDElementUnitExponentKey "UnitExponent" -#define kIOHIDElementNameKey "Name" -#define kIOHIDElementValueLocationKey "ValueLocation" -#define kIOHIDElementDuplicateIndexKey "DuplicateIndex" -#define kIOHIDElementParentCollectionKey "ParentCollection" - -#ifndef __ppc__ - #define kIOHIDElementVendorSpecificKey "VendorSpecific" -#else - #define kIOHIDElementVendorSpecificKey "VendorSpecifc" -#endif - -/*! - @defined HID Element Match Keys - @abstract Keys used for matching particular elements. - @discussion These keys should only be used with a matching - dictionary when searching for elements via copyMatchingElements. -*/ -#define kIOHIDElementCookieMinKey "ElementCookieMin" -#define kIOHIDElementCookieMaxKey "ElementCookieMax" -#define kIOHIDElementUsageMinKey "UsageMin" -#define kIOHIDElementUsageMaxKey "UsageMax" - -/*! - @defined kIOHIDElementCalibrationMinKey - @abstract The minimum bounds for a calibrated value. -*/ -#define kIOHIDElementCalibrationMinKey "CalibrationMin" - -/*! - @defined kIOHIDElementCalibrationMaxKey - @abstract The maximum bounds for a calibrated value. -*/ -#define kIOHIDElementCalibrationMaxKey "CalibrationMax" - -/*! - @defined kIOHIDElementCalibrationSaturationMinKey - @abstract The mininum tolerance to be used when calibrating a logical element value. - @discussion The saturation property is used to allow for slight differences in the minimum and maximum value returned by an element. -*/ -#define kIOHIDElementCalibrationSaturationMinKey "CalibrationSaturationMin" - -/*! - @defined kIOHIDElementCalibrationSaturationMaxKey - @abstract The maximum tolerance to be used when calibrating a logical element value. - @discussion The saturation property is used to allow for slight differences in the minimum and maximum value returned by an element. -*/ -#define kIOHIDElementCalibrationSaturationMaxKey "CalibrationSaturationMax" - -/*! - @defined kIOHIDElementCalibrationDeadZoneMinKey - @abstract The minimum bounds near the midpoint of a logical value in which the value is ignored. - @discussion The dead zone property is used to allow for slight differences in the idle value returned by an element. -*/ -#define kIOHIDElementCalibrationDeadZoneMinKey "CalibrationDeadZoneMin" - -/*! - @defined kIOHIDElementCalibrationDeadZoneMinKey - @abstract The maximum bounds near the midpoint of a logical value in which the value is ignored. - @discussion The dead zone property is used to allow for slight differences in the idle value returned by an element. -*/ -#define kIOHIDElementCalibrationDeadZoneMaxKey "CalibrationDeadZoneMax" - -/*! - @defined kIOHIDElementCalibrationGranularityKey - @abstract The scale or level of detail returned in a calibrated element value. - @discussion Values are rounded off such that if granularity=0.1, values after calibration are 0, 0.1, 0.2, 0.3, etc. -*/ -#define kIOHIDElementCalibrationGranularityKey "CalibrationGranularity" - -/*! - @typedef IOHIDElementCookie - @abstract Abstract data type used as a unique identifier for an element. -*/ -#ifdef __LP64__ - typedef uint32_t IOHIDElementCookie; -#else - typedef void * IOHIDElementCookie; -#endif - -/*! - @typedef IOHIDElementType - @abstract Describes different types of HID elements. - @discussion Used by the IOHIDFamily to identify the type of - element processed. Represented by the key kIOHIDElementTypeKey in the - dictionary describing the element. - @constant kIOHIDElementTypeInput_Misc - Misc input data field or varying size. - @constant kIOHIDElementTypeInput_Button - One bit input data field. - @constant kIOHIDElementTypeInput_Axis - Input data field used to represent an axis. - @constant kIOHIDElementTypeInput_ScanCodes - Input data field used to represent a scan code or usage selector. - @constant kIOHIDElementTypeOutput - Used to represent an output data field in a report. - @constant kIOHIDElementTypeFeature - Describes input and output elements not intended for - consumption by the end user. - @constant kIOHIDElementTypeCollection - Element used to identify a relationship between two or more elements. -*/ -enum IOHIDElementType { - kIOHIDElementTypeInput_Misc = 1, - kIOHIDElementTypeInput_Button = 2, - kIOHIDElementTypeInput_Axis = 3, - kIOHIDElementTypeInput_ScanCodes = 4, - kIOHIDElementTypeOutput = 129, - kIOHIDElementTypeFeature = 257, - kIOHIDElementTypeCollection = 513 -}; -typedef enum IOHIDElementType IOHIDElementType; - -/*! - @typedef IOHIDElementCollectionType - @abstract Describes different types of HID collections. - @discussion Collections identify a relationship between two or more - elements. - @constant kIOHIDElementCollectionTypePhysical - Used for a set of data items that represent data points - collected at one geometric point. - @constant kIOHIDElementCollectionTypeApplication - Identifies item groups serving different purposes in a single device. - @constant kIOHIDElementCollectionTypeLogical - Used when a set of data items form a composite data structure. - @constant kIOHIDElementCollectionTypeReport - Wraps all the fields in a report. - @constant kIOHIDElementCollectionTypeNamedArray - Contains an array of selector usages. - @constant kIOHIDElementCollectionTypeUsageSwitch - Modifies the meaning of the usage it contains. - @constant kIOHIDElementCollectionTypeUsageModifier - Modifies the meaning of the usage attached to the encompassing collection. -*/ -enum IOHIDElementCollectionType{ - kIOHIDElementCollectionTypePhysical = 0x00, - kIOHIDElementCollectionTypeApplication, - kIOHIDElementCollectionTypeLogical, - kIOHIDElementCollectionTypeReport, - kIOHIDElementCollectionTypeNamedArray, - kIOHIDElementCollectionTypeUsageSwitch, - kIOHIDElementCollectionTypeUsageModifier -}; -typedef enum IOHIDElementCollectionType IOHIDElementCollectionType; - - -/*! - @typedef IOHIDReportType - @abstract Describes different type of HID reports. - @discussion Used by the IOHIDFamily to identify the type of - report being processed. - @constant kIOHIDReportTypeInput Input report. - @constant kIOHIDReportTypeOutput Output report. - @constant kIOHIDReportTypeFeature Feature report. -*/ -enum IOHIDReportType{ - kIOHIDReportTypeInput = 0, - kIOHIDReportTypeOutput, - kIOHIDReportTypeFeature, - kIOHIDReportTypeCount -}; -typedef enum IOHIDReportType IOHIDReportType; - -/*! - @typedef IOHIDOptionsType - @abstract Options for opening a device via IOHIDLib. - @constant kIOHIDOptionsTypeNone Default option. - @constant kIOHIDOptionsTypeSeizeDevice Used to open exclusive - communication with the device. This will prevent the system - and other clients from receiving events from the device. -*/ -enum { - kIOHIDOptionsTypeNone = 0x00, - kIOHIDOptionsTypeSeizeDevice = 0x01 -}; -typedef uint32_t IOHIDOptionsType; - - -/*! - @typedef IOHIDQueueOptionsType - @abstract Options for creating a queue via IOHIDLib. - @constant kIOHIDQueueOptionsTypeNone Default option. - @constant kIOHIDQueueOptionsTypeEnqueueAll Force the IOHIDQueue - to enqueue all events, relative or absolute, regardless of change. -*/ -enum { - kIOHIDQueueOptionsTypeNone = 0x00, - kIOHIDQueueOptionsTypeEnqueueAll = 0x01 -}; -typedef uint32_t IOHIDQueueOptionsType; - - -enum { - kIOHIDElementFlagsConstantMask = 0x0001, - kIOHIDElementFlagsVariableMask = 0x0002, - kIOHIDElementFlagsRelativeMask = 0x0004, - kIOHIDElementFlagsWrapMask = 0x0008, - kIOHIDElementFlagsNonLinearMask = 0x0010, - kIOHIDElementFlagsNoPreferredMask = 0x0020, - kIOHIDElementFlagsNullStateMask = 0x0040, - kIOHIDElementFlagsVolativeMask = 0x0080, - kIOHIDElementFlagsBufferedByteMask = 0x0100 -}; -typedef uint32_t IOHIDElementFlags; - -/*! - @typedef IOHIDStandardType - @abstract Type to define what industrial standard the device is referencing. - @constant kIOHIDStandardTypeANSI ANSI. - @constant kIOHIDStandardTypeISO ISO. - @constant kIOHIDStandardTypeJIS JIS. -*/ -enum { - kIOHIDStandardTypeANSI = 0, - kIOHIDStandardTypeISO = 1, - kIOHIDStandardTypeJIS = 2 -}; -typedef uint32_t IOHIDStandardType; - -__END_DECLS - -#endif /* !_IOKIT_HID_IOHIDKEYS_H_ */ diff --git a/i386/include/IOKit/hid/IOHIDUsageTables.h b/i386/include/IOKit/hid/IOHIDUsageTables.h deleted file mode 100644 index ff0fd88..0000000 --- a/i386/include/IOKit/hid/IOHIDUsageTables.h +++ /dev/null @@ -1,1665 +0,0 @@ -/* - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _IOHIDUSAGETABLES_H -#define _IOHIDUSAGETABLES_H - -/* ****************************************************************************************** - * HID Usage Tables - * - * The following constants are from the USB 'HID Usage Tables' specification, revision 1.1rc3 - * ****************************************************************************************** */ - - -/* Usage Pages */ -enum -{ - kHIDPage_Undefined = 0x00, - kHIDPage_GenericDesktop = 0x01, - kHIDPage_Simulation = 0x02, - kHIDPage_VR = 0x03, - kHIDPage_Sport = 0x04, - kHIDPage_Game = 0x05, - /* Reserved 0x06 */ - kHIDPage_KeyboardOrKeypad = 0x07, /* USB Device Class Definition for Human Interface Devices (HID). Note: the usage type for all key codes is Selector (Sel). */ - kHIDPage_LEDs = 0x08, - kHIDPage_Button = 0x09, - kHIDPage_Ordinal = 0x0A, - kHIDPage_Telephony = 0x0B, - kHIDPage_Consumer = 0x0C, - kHIDPage_Digitizer = 0x0D, - /* Reserved 0x0E */ - kHIDPage_PID = 0x0F, /* USB Physical Interface Device definitions for force feedback and related devices. */ - kHIDPage_Unicode = 0x10, - /* Reserved 0x11 - 0x13 */ - kHIDPage_AlphanumericDisplay = 0x14, - /* Reserved 0x15 - 0x7F */ - /* Monitor 0x80 - 0x83 USB Device Class Definition for Monitor Devices */ - /* Power 0x84 - 0x87 USB Device Class Definition for Power Devices */ - kHIDPage_PowerDevice = 0x84, /* Power Device Page */ - kHIDPage_BatterySystem = 0x85, /* Battery System Page */ - /* Reserved 0x88 - 0x8B */ - kHIDPage_BarCodeScanner = 0x8C, /* (Point of Sale) USB Device Class Definition for Bar Code Scanner Devices */ - kHIDPage_WeighingDevice = 0x8D, /* (Point of Sale) USB Device Class Definition for Weighing Devices */ - kHIDPage_Scale = 0x8D, /* (Point of Sale) USB Device Class Definition for Scale Devices */ - kHIDPage_MagneticStripeReader = 0x8E, - /* ReservedPointofSalepages 0x8F */ - kHIDPage_CameraControl = 0x90, /* USB Device Class Definition for Image Class Devices */ - kHIDPage_Arcade = 0x91, /* OAAF Definitions for arcade and coinop related Devices */ - /* Reserved 0x92 - 0xFEFF */ - /* VendorDefined 0xFF00 - 0xFFFF */ - kHIDPage_VendorDefinedStart = 0xFF00 -}; - -/* Undefined Usage for all usage pages */ -enum -{ - kHIDUsage_Undefined = 0x00 -}; - -/* GenericDesktop Page (0x01) */ -enum -{ - kHIDUsage_GD_Pointer = 0x01, /* Physical Collection */ - kHIDUsage_GD_Mouse = 0x02, /* Application Collection */ - /* 0x03 Reserved */ - kHIDUsage_GD_Joystick = 0x04, /* Application Collection */ - kHIDUsage_GD_GamePad = 0x05, /* Application Collection */ - kHIDUsage_GD_Keyboard = 0x06, /* Application Collection */ - kHIDUsage_GD_Keypad = 0x07, /* Application Collection */ - kHIDUsage_GD_MultiAxisController = 0x08, /* Application Collection */ - /* 0x09 - 0x2F Reserved */ - kHIDUsage_GD_X = 0x30, /* Dynamic Value */ - kHIDUsage_GD_Y = 0x31, /* Dynamic Value */ - kHIDUsage_GD_Z = 0x32, /* Dynamic Value */ - kHIDUsage_GD_Rx = 0x33, /* Dynamic Value */ - kHIDUsage_GD_Ry = 0x34, /* Dynamic Value */ - kHIDUsage_GD_Rz = 0x35, /* Dynamic Value */ - kHIDUsage_GD_Slider = 0x36, /* Dynamic Value */ - kHIDUsage_GD_Dial = 0x37, /* Dynamic Value */ - kHIDUsage_GD_Wheel = 0x38, /* Dynamic Value */ - kHIDUsage_GD_Hatswitch = 0x39, /* Dynamic Value */ - kHIDUsage_GD_CountedBuffer = 0x3A, /* Logical Collection */ - kHIDUsage_GD_ByteCount = 0x3B, /* Dynamic Value */ - kHIDUsage_GD_MotionWakeup = 0x3C, /* One-Shot Control */ - kHIDUsage_GD_Start = 0x3D, /* On/Off Control */ - kHIDUsage_GD_Select = 0x3E, /* On/Off Control */ - /* 0x3F Reserved */ - kHIDUsage_GD_Vx = 0x40, /* Dynamic Value */ - kHIDUsage_GD_Vy = 0x41, /* Dynamic Value */ - kHIDUsage_GD_Vz = 0x42, /* Dynamic Value */ - kHIDUsage_GD_Vbrx = 0x43, /* Dynamic Value */ - kHIDUsage_GD_Vbry = 0x44, /* Dynamic Value */ - kHIDUsage_GD_Vbrz = 0x45, /* Dynamic Value */ - kHIDUsage_GD_Vno = 0x46, /* Dynamic Value */ - /* 0x47 - 0x7F Reserved */ - kHIDUsage_GD_SystemControl = 0x80, /* Application Collection */ - kHIDUsage_GD_SystemPowerDown = 0x81, /* One-Shot Control */ - kHIDUsage_GD_SystemSleep = 0x82, /* One-Shot Control */ - kHIDUsage_GD_SystemWakeUp = 0x83, /* One-Shot Control */ - kHIDUsage_GD_SystemContextMenu = 0x84, /* One-Shot Control */ - kHIDUsage_GD_SystemMainMenu = 0x85, /* One-Shot Control */ - kHIDUsage_GD_SystemAppMenu = 0x86, /* One-Shot Control */ - kHIDUsage_GD_SystemMenuHelp = 0x87, /* One-Shot Control */ - kHIDUsage_GD_SystemMenuExit = 0x88, /* One-Shot Control */ - kHIDUsage_GD_SystemMenu = 0x89, /* Selector */ - kHIDUsage_GD_SystemMenuRight = 0x8A, /* Re-Trigger Control */ - kHIDUsage_GD_SystemMenuLeft = 0x8B, /* Re-Trigger Control */ - kHIDUsage_GD_SystemMenuUp = 0x8C, /* Re-Trigger Control */ - kHIDUsage_GD_SystemMenuDown = 0x8D, /* Re-Trigger Control */ - /* 0x8E - 0x8F Reserved */ - kHIDUsage_GD_DPadUp = 0x90, /* On/Off Control */ - kHIDUsage_GD_DPadDown = 0x91, /* On/Off Control */ - kHIDUsage_GD_DPadRight = 0x92, /* On/Off Control */ - kHIDUsage_GD_DPadLeft = 0x93, /* On/Off Control */ - /* 0x94 - 0xFFFF Reserved */ - kHIDUsage_GD_Reserved = 0xFFFF -}; - -/* Simulation Page (0x02) */ -/* This section provides detailed descriptions of the usages employed by simulation devices. */ -enum -{ - kHIDUsage_Sim_FlightSimulationDevice = 0x01, /* Application Collection */ - kHIDUsage_Sim_AutomobileSimulationDevice = 0x02, /* Application Collection */ - kHIDUsage_Sim_TankSimulationDevice = 0x03, /* Application Collection */ - kHIDUsage_Sim_SpaceshipSimulationDevice = 0x04, /* Application Collection */ - kHIDUsage_Sim_SubmarineSimulationDevice = 0x05, /* Application Collection */ - kHIDUsage_Sim_SailingSimulationDevice = 0x06, /* Application Collection */ - kHIDUsage_Sim_MotorcycleSimulationDevice = 0x07, /* Application Collection */ - kHIDUsage_Sim_SportsSimulationDevice = 0x08, /* Application Collection */ - kHIDUsage_Sim_AirplaneSimulationDevice = 0x09, /* Application Collection */ - kHIDUsage_Sim_HelicopterSimulationDevice = 0x0A, /* Application Collection */ - kHIDUsage_Sim_MagicCarpetSimulationDevice = 0x0B, /* Application Collection */ - kHIDUsage_Sim_BicycleSimulationDevice = 0x0C, /* Application Collection */ - /* 0x0D - 0x1F Reserved */ - kHIDUsage_Sim_FlightControlStick = 0x20, /* Application Collection */ - kHIDUsage_Sim_FlightStick = 0x21, /* Application Collection */ - kHIDUsage_Sim_CyclicControl = 0x22, /* Physical Collection */ - kHIDUsage_Sim_CyclicTrim = 0x23, /* Physical Collection */ - kHIDUsage_Sim_FlightYoke = 0x24, /* Application Collection */ - kHIDUsage_Sim_TrackControl = 0x25, /* Physical Collection */ - /* 0x26 - 0xAF Reserved */ - kHIDUsage_Sim_Aileron = 0xB0, /* Dynamic Value */ - kHIDUsage_Sim_AileronTrim = 0xB1, /* Dynamic Value */ - kHIDUsage_Sim_AntiTorqueControl = 0xB2, /* Dynamic Value */ - kHIDUsage_Sim_AutopilotEnable = 0xB3, /* On/Off Control */ - kHIDUsage_Sim_ChaffRelease = 0xB4, /* One-Shot Control */ - kHIDUsage_Sim_CollectiveControl = 0xB5, /* Dynamic Value */ - kHIDUsage_Sim_DiveBrake = 0xB6, /* Dynamic Value */ - kHIDUsage_Sim_ElectronicCountermeasures = 0xB7, /* On/Off Control */ - kHIDUsage_Sim_Elevator = 0xB8, /* Dynamic Value */ - kHIDUsage_Sim_ElevatorTrim = 0xB9, /* Dynamic Value */ - kHIDUsage_Sim_Rudder = 0xBA, /* Dynamic Value */ - kHIDUsage_Sim_Throttle = 0xBB, /* Dynamic Value */ - kHIDUsage_Sim_FlightCommunications = 0xBC, /* On/Off Control */ - kHIDUsage_Sim_FlareRelease = 0xBD, /* One-Shot Control */ - kHIDUsage_Sim_LandingGear = 0xBE, /* On/Off Control */ - kHIDUsage_Sim_ToeBrake = 0xBF, /* Dynamic Value */ - kHIDUsage_Sim_Trigger = 0xC0, /* Momentary Control */ - kHIDUsage_Sim_WeaponsArm = 0xC1, /* On/Off Control */ - kHIDUsage_Sim_Weapons = 0xC2, /* Selector */ - kHIDUsage_Sim_WingFlaps = 0xC3, /* Dynamic Value */ - kHIDUsage_Sim_Accelerator = 0xC4, /* Dynamic Value */ - kHIDUsage_Sim_Brake = 0xC5, /* Dynamic Value */ - kHIDUsage_Sim_Clutch = 0xC6, /* Dynamic Value */ - kHIDUsage_Sim_Shifter = 0xC7, /* Dynamic Value */ - kHIDUsage_Sim_Steering = 0xC8, /* Dynamic Value */ - kHIDUsage_Sim_TurretDirection = 0xC9, /* Dynamic Value */ - kHIDUsage_Sim_BarrelElevation = 0xCA, /* Dynamic Value */ - kHIDUsage_Sim_DivePlane = 0xCB, /* Dynamic Value */ - kHIDUsage_Sim_Ballast = 0xCC, /* Dynamic Value */ - kHIDUsage_Sim_BicycleCrank = 0xCD, /* Dynamic Value */ - kHIDUsage_Sim_HandleBars = 0xCE, /* Dynamic Value */ - kHIDUsage_Sim_FrontBrake = 0xCF, /* Dynamic Value */ - kHIDUsage_Sim_RearBrake = 0xD0, /* Dynamic Value */ - /* 0xD1 - 0xFFFF Reserved */ - kHIDUsage_Sim_Reserved = 0xFFFF -}; - -/* VR Page (0x03) */ -/* Virtual Reality controls depend on designators to identify the individual controls. Most of the following are */ -/* usages are applied to the collections of entities that comprise the actual device. */ -enum -{ - kHIDUsage_VR_Belt = 0x01, /* Application Collection */ - kHIDUsage_VR_BodySuit = 0x02, /* Application Collection */ - kHIDUsage_VR_Flexor = 0x03, /* Physical Collection */ - kHIDUsage_VR_Glove = 0x04, /* Application Collection */ - kHIDUsage_VR_HeadTracker = 0x05, /* Physical Collection */ - kHIDUsage_VR_HeadMountedDisplay = 0x06, /* Application Collection */ - kHIDUsage_VR_HandTracker = 0x07, /* Application Collection */ - kHIDUsage_VR_Oculometer = 0x08, /* Application Collection */ - kHIDUsage_VR_Vest = 0x09, /* Application Collection */ - kHIDUsage_VR_AnimatronicDevice = 0x0A, /* Application Collection */ - /* 0x0B - 0x1F Reserved */ - kHIDUsage_VR_StereoEnable = 0x20, /* On/Off Control */ - kHIDUsage_VR_DisplayEnable = 0x21, /* On/Off Control */ - /* 0x22 - 0xFFFF Reserved */ - kHIDUsage_VR_Reserved = 0xFFFF -}; - -/* Sport Page (0x04) */ -enum -{ - kHIDUsage_Sprt_BaseballBat = 0x01, /* Application Collection */ - kHIDUsage_Sprt_GolfClub = 0x02, /* Application Collection */ - kHIDUsage_Sprt_RowingMachine = 0x03, /* Application Collection */ - kHIDUsage_Sprt_Treadmill = 0x04, /* Application Collection */ - /* 0x05 - 0x2F Reserved */ - kHIDUsage_Sprt_Oar = 0x30, /* Dynamic Value */ - kHIDUsage_Sprt_Slope = 0x31, /* Dynamic Value */ - kHIDUsage_Sprt_Rate = 0x32, /* Dynamic Value */ - kHIDUsage_Sprt_StickSpeed = 0x33, /* Dynamic Value */ - kHIDUsage_Sprt_StickFaceAngle = 0x34, /* Dynamic Value */ - kHIDUsage_Sprt_StickHeelOrToe = 0x35, /* Dynamic Value */ - kHIDUsage_Sprt_StickFollowThrough = 0x36, /* Dynamic Value */ - kHIDUsage_Sprt_StickTempo = 0x37, /* Dynamic Value */ - kHIDUsage_Sprt_StickType = 0x38, /* Named Array */ - kHIDUsage_Sprt_StickHeight = 0x39, /* Dynamic Value */ - /* 0x3A - 0x4F Reserved */ - kHIDUsage_Sprt_Putter = 0x50, /* Selector */ - kHIDUsage_Sprt_1Iron = 0x51, /* Selector */ - kHIDUsage_Sprt_2Iron = 0x52, /* Selector */ - kHIDUsage_Sprt_3Iron = 0x53, /* Selector */ - kHIDUsage_Sprt_4Iron = 0x54, /* Selector */ - kHIDUsage_Sprt_5Iron = 0x55, /* Selector */ - kHIDUsage_Sprt_6Iron = 0x56, /* Selector */ - kHIDUsage_Sprt_7Iron = 0x57, /* Selector */ - kHIDUsage_Sprt_8Iron = 0x58, /* Selector */ - kHIDUsage_Sprt_9Iron = 0x59, /* Selector */ - kHIDUsage_Sprt_10Iron = 0x5A, /* Selector */ - kHIDUsage_Sprt_11Iron = 0x5B, /* Selector */ - kHIDUsage_Sprt_SandWedge = 0x5C, /* Selector */ - kHIDUsage_Sprt_LoftWedge = 0x5D, /* Selector */ - kHIDUsage_Sprt_PowerWedge = 0x5E, /* Selector */ - kHIDUsage_Sprt_1Wood = 0x5F, /* Selector */ - kHIDUsage_Sprt_3Wood = 0x60, /* Selector */ - kHIDUsage_Sprt_5Wood = 0x61, /* Selector */ - kHIDUsage_Sprt_7Wood = 0x62, /* Selector */ - kHIDUsage_Sprt_9Wood = 0x63, /* Selector */ - /* 0x64 - 0xFFFF Reserved */ - kHIDUsage_Sprt_Reserved = 0xFFFF -}; - -/* Game Page (0x05) */ -enum -{ - kHIDUsage_Game_3DGameController = 0x01, /* Application Collection */ - kHIDUsage_Game_PinballDevice = 0x02, /* Application Collection */ - kHIDUsage_Game_GunDevice = 0x03, /* Application Collection */ - /* 0x04 - 0x1F Reserved */ - kHIDUsage_Game_PointofView = 0x20, /* Physical Collection */ - kHIDUsage_Game_TurnRightOrLeft = 0x21, /* Dynamic Value */ - kHIDUsage_Game_PitchUpOrDown = 0x22, /* Dynamic Value */ - kHIDUsage_Game_RollRightOrLeft = 0x23, /* Dynamic Value */ - kHIDUsage_Game_MoveRightOrLeft = 0x24, /* Dynamic Value */ - kHIDUsage_Game_MoveForwardOrBackward = 0x25, /* Dynamic Value */ - kHIDUsage_Game_MoveUpOrDown = 0x26, /* Dynamic Value */ - kHIDUsage_Game_LeanRightOrLeft = 0x27, /* Dynamic Value */ - kHIDUsage_Game_LeanForwardOrBackward = 0x28, /* Dynamic Value */ - kHIDUsage_Game_HeightOfPOV = 0x29, /* Dynamic Value */ - kHIDUsage_Game_Flipper = 0x2A, /* Momentary Control */ - kHIDUsage_Game_SecondaryFlipper = 0x2B, /* Momentary Control */ - kHIDUsage_Game_Bump = 0x2C, /* Momentary Control */ - kHIDUsage_Game_NewGame = 0x2D, /* One-Shot Control */ - kHIDUsage_Game_ShootBall = 0x2E, /* One-Shot Control */ - kHIDUsage_Game_Player = 0x2F, /* One-Shot Control */ - kHIDUsage_Game_GunBolt = 0x30, /* On/Off Control */ - kHIDUsage_Game_GunClip = 0x31, /* On/Off Control */ - kHIDUsage_Game_Gun = 0x32, /* Selector */ - kHIDUsage_Game_GunSingleShot = 0x33, /* Selector */ - kHIDUsage_Game_GunBurst = 0x34, /* Selector */ - kHIDUsage_Game_GunAutomatic = 0x35, /* Selector */ - kHIDUsage_Game_GunSafety = 0x36, /* On/Off Control */ - kHIDUsage_Game_GamepadFireOrJump = 0x37, /* Logical Collection */ - kHIDUsage_Game_GamepadTrigger = 0x39, /* Logical Collection */ - /* 0x3A - 0xFFFF Reserved */ - kHIDUsage_Game_Reserved = 0xFFFF -}; - -/* KeyboardOrKeypad Page (0x07) */ -/* This section is the Usage Page for key codes to be used in implementing a USB keyboard. A Boot Keyboard (84-, 101- or 104-key) should at a minimum support all associated usage codes as indicated in the ÒBootÓ */ -/* column below. */ -/* The usage type of all key codes is Selectors (Sel), except for the modifier keys Keyboard Left Control (0x224) to Keyboard Right GUI (0x231) which are Dynamic Flags (DV). */ -/* Note: A general note on Usages and languages: Due to the variation of keyboards from language to language, it is not feasible to specify exact key mappings for every language. Where this list is not specific for a key function in a language, the closest equivalent key position should be used, so that a keyboard may be modified for a different language by simply printing different keycaps. One example is the Y key on a North American keyboard. In Germany this is typically Z. Rather than changing the keyboard firmware to put the Z Usage into that place in the descriptor list, the vendor should use the Y Usage on both the North American and German keyboards. This continues to be the existing practice in the industry, in order to minimize the number of changes to the electronics to accommodate otherlanguages. */ -enum -{ - kHIDUsage_KeyboardErrorRollOver = 0x01, /* ErrorRollOver */ - kHIDUsage_KeyboardPOSTFail = 0x02, /* POSTFail */ - kHIDUsage_KeyboardErrorUndefined = 0x03, /* ErrorUndefined */ - kHIDUsage_KeyboardA = 0x04, /* a or A */ - kHIDUsage_KeyboardB = 0x05, /* b or B */ - kHIDUsage_KeyboardC = 0x06, /* c or C */ - kHIDUsage_KeyboardD = 0x07, /* d or D */ - kHIDUsage_KeyboardE = 0x08, /* e or E */ - kHIDUsage_KeyboardF = 0x09, /* f or F */ - kHIDUsage_KeyboardG = 0x0A, /* g or G */ - kHIDUsage_KeyboardH = 0x0B, /* h or H */ - kHIDUsage_KeyboardI = 0x0C, /* i or I */ - kHIDUsage_KeyboardJ = 0x0D, /* j or J */ - kHIDUsage_KeyboardK = 0x0E, /* k or K */ - kHIDUsage_KeyboardL = 0x0F, /* l or L */ - kHIDUsage_KeyboardM = 0x10, /* m or M */ - kHIDUsage_KeyboardN = 0x11, /* n or N */ - kHIDUsage_KeyboardO = 0x12, /* o or O */ - kHIDUsage_KeyboardP = 0x13, /* p or P */ - kHIDUsage_KeyboardQ = 0x14, /* q or Q */ - kHIDUsage_KeyboardR = 0x15, /* r or R */ - kHIDUsage_KeyboardS = 0x16, /* s or S */ - kHIDUsage_KeyboardT = 0x17, /* t or T */ - kHIDUsage_KeyboardU = 0x18, /* u or U */ - kHIDUsage_KeyboardV = 0x19, /* v or V */ - kHIDUsage_KeyboardW = 0x1A, /* w or W */ - kHIDUsage_KeyboardX = 0x1B, /* x or X */ - kHIDUsage_KeyboardY = 0x1C, /* y or Y */ - kHIDUsage_KeyboardZ = 0x1D, /* z or Z */ - kHIDUsage_Keyboard1 = 0x1E, /* 1 or ! */ - kHIDUsage_Keyboard2 = 0x1F, /* 2 or @ */ - kHIDUsage_Keyboard3 = 0x20, /* 3 or # */ - kHIDUsage_Keyboard4 = 0x21, /* 4 or $ */ - kHIDUsage_Keyboard5 = 0x22, /* 5 or % */ - kHIDUsage_Keyboard6 = 0x23, /* 6 or ^ */ - kHIDUsage_Keyboard7 = 0x24, /* 7 or & */ - kHIDUsage_Keyboard8 = 0x25, /* 8 or * */ - kHIDUsage_Keyboard9 = 0x26, /* 9 or ( */ - kHIDUsage_Keyboard0 = 0x27, /* 0 or ) */ - kHIDUsage_KeyboardReturnOrEnter = 0x28, /* Return (Enter) */ - kHIDUsage_KeyboardEscape = 0x29, /* Escape */ - kHIDUsage_KeyboardDeleteOrBackspace = 0x2A, /* Delete (Backspace) */ - kHIDUsage_KeyboardTab = 0x2B, /* Tab */ - kHIDUsage_KeyboardSpacebar = 0x2C, /* Spacebar */ - kHIDUsage_KeyboardHyphen = 0x2D, /* - or _ */ - kHIDUsage_KeyboardEqualSign = 0x2E, /* = or + */ - kHIDUsage_KeyboardOpenBracket = 0x2F, /* [ or { */ - kHIDUsage_KeyboardCloseBracket = 0x30, /* ] or } */ - kHIDUsage_KeyboardBackslash = 0x31, /* \ or | */ - kHIDUsage_KeyboardNonUSPound = 0x32, /* Non-US # or _ */ - kHIDUsage_KeyboardSemicolon = 0x33, /* ; or : */ - kHIDUsage_KeyboardQuote = 0x34, /* ' or " */ - kHIDUsage_KeyboardGraveAccentAndTilde = 0x35, /* Grave Accent and Tilde */ - kHIDUsage_KeyboardComma = 0x36, /* , or < */ - kHIDUsage_KeyboardPeriod = 0x37, /* . or > */ - kHIDUsage_KeyboardSlash = 0x38, /* / or ? */ - kHIDUsage_KeyboardCapsLock = 0x39, /* Caps Lock */ - kHIDUsage_KeyboardF1 = 0x3A, /* F1 */ - kHIDUsage_KeyboardF2 = 0x3B, /* F2 */ - kHIDUsage_KeyboardF3 = 0x3C, /* F3 */ - kHIDUsage_KeyboardF4 = 0x3D, /* F4 */ - kHIDUsage_KeyboardF5 = 0x3E, /* F5 */ - kHIDUsage_KeyboardF6 = 0x3F, /* F6 */ - kHIDUsage_KeyboardF7 = 0x40, /* F7 */ - kHIDUsage_KeyboardF8 = 0x41, /* F8 */ - kHIDUsage_KeyboardF9 = 0x42, /* F9 */ - kHIDUsage_KeyboardF10 = 0x43, /* F10 */ - kHIDUsage_KeyboardF11 = 0x44, /* F11 */ - kHIDUsage_KeyboardF12 = 0x45, /* F12 */ - kHIDUsage_KeyboardPrintScreen = 0x46, /* Print Screen */ - kHIDUsage_KeyboardScrollLock = 0x47, /* Scroll Lock */ - kHIDUsage_KeyboardPause = 0x48, /* Pause */ - kHIDUsage_KeyboardInsert = 0x49, /* Insert */ - kHIDUsage_KeyboardHome = 0x4A, /* Home */ - kHIDUsage_KeyboardPageUp = 0x4B, /* Page Up */ - kHIDUsage_KeyboardDeleteForward = 0x4C, /* Delete Forward */ - kHIDUsage_KeyboardEnd = 0x4D, /* End */ - kHIDUsage_KeyboardPageDown = 0x4E, /* Page Down */ - kHIDUsage_KeyboardRightArrow = 0x4F, /* Right Arrow */ - kHIDUsage_KeyboardLeftArrow = 0x50, /* Left Arrow */ - kHIDUsage_KeyboardDownArrow = 0x51, /* Down Arrow */ - kHIDUsage_KeyboardUpArrow = 0x52, /* Up Arrow */ - kHIDUsage_KeypadNumLock = 0x53, /* Keypad NumLock or Clear */ - kHIDUsage_KeypadSlash = 0x54, /* Keypad / */ - kHIDUsage_KeypadAsterisk = 0x55, /* Keypad * */ - kHIDUsage_KeypadHyphen = 0x56, /* Keypad - */ - kHIDUsage_KeypadPlus = 0x57, /* Keypad + */ - kHIDUsage_KeypadEnter = 0x58, /* Keypad Enter */ - kHIDUsage_Keypad1 = 0x59, /* Keypad 1 or End */ - kHIDUsage_Keypad2 = 0x5A, /* Keypad 2 or Down Arrow */ - kHIDUsage_Keypad3 = 0x5B, /* Keypad 3 or Page Down */ - kHIDUsage_Keypad4 = 0x5C, /* Keypad 4 or Left Arrow */ - kHIDUsage_Keypad5 = 0x5D, /* Keypad 5 */ - kHIDUsage_Keypad6 = 0x5E, /* Keypad 6 or Right Arrow */ - kHIDUsage_Keypad7 = 0x5F, /* Keypad 7 or Home */ - kHIDUsage_Keypad8 = 0x60, /* Keypad 8 or Up Arrow */ - kHIDUsage_Keypad9 = 0x61, /* Keypad 9 or Page Up */ - kHIDUsage_Keypad0 = 0x62, /* Keypad 0 or Insert */ - kHIDUsage_KeypadPeriod = 0x63, /* Keypad . or Delete */ - kHIDUsage_KeyboardNonUSBackslash = 0x64, /* Non-US \ or | */ - kHIDUsage_KeyboardApplication = 0x65, /* Application */ - kHIDUsage_KeyboardPower = 0x66, /* Power */ - kHIDUsage_KeypadEqualSign = 0x67, /* Keypad = */ - kHIDUsage_KeyboardF13 = 0x68, /* F13 */ - kHIDUsage_KeyboardF14 = 0x69, /* F14 */ - kHIDUsage_KeyboardF15 = 0x6A, /* F15 */ - kHIDUsage_KeyboardF16 = 0x6B, /* F16 */ - kHIDUsage_KeyboardF17 = 0x6C, /* F17 */ - kHIDUsage_KeyboardF18 = 0x6D, /* F18 */ - kHIDUsage_KeyboardF19 = 0x6E, /* F19 */ - kHIDUsage_KeyboardF20 = 0x6F, /* F20 */ - kHIDUsage_KeyboardF21 = 0x70, /* F21 */ - kHIDUsage_KeyboardF22 = 0x71, /* F22 */ - kHIDUsage_KeyboardF23 = 0x72, /* F23 */ - kHIDUsage_KeyboardF24 = 0x73, /* F24 */ - kHIDUsage_KeyboardExecute = 0x74, /* Execute */ - kHIDUsage_KeyboardHelp = 0x75, /* Help */ - kHIDUsage_KeyboardMenu = 0x76, /* Menu */ - kHIDUsage_KeyboardSelect = 0x77, /* Select */ - kHIDUsage_KeyboardStop = 0x78, /* Stop */ - kHIDUsage_KeyboardAgain = 0x79, /* Again */ - kHIDUsage_KeyboardUndo = 0x7A, /* Undo */ - kHIDUsage_KeyboardCut = 0x7B, /* Cut */ - kHIDUsage_KeyboardCopy = 0x7C, /* Copy */ - kHIDUsage_KeyboardPaste = 0x7D, /* Paste */ - kHIDUsage_KeyboardFind = 0x7E, /* Find */ - kHIDUsage_KeyboardMute = 0x7F, /* Mute */ - kHIDUsage_KeyboardVolumeUp = 0x80, /* Volume Up */ - kHIDUsage_KeyboardVolumeDown = 0x81, /* Volume Down */ - kHIDUsage_KeyboardLockingCapsLock = 0x82, /* Locking Caps Lock */ - kHIDUsage_KeyboardLockingNumLock = 0x83, /* Locking Num Lock */ - kHIDUsage_KeyboardLockingScrollLock = 0x84, /* Locking Scroll Lock */ - kHIDUsage_KeypadComma = 0x85, /* Keypad Comma */ - kHIDUsage_KeypadEqualSignAS400 = 0x86, /* Keypad Equal Sign for AS/400 */ - kHIDUsage_KeyboardInternational1 = 0x87, /* International1 */ - kHIDUsage_KeyboardInternational2 = 0x88, /* International2 */ - kHIDUsage_KeyboardInternational3 = 0x89, /* International3 */ - kHIDUsage_KeyboardInternational4 = 0x8A, /* International4 */ - kHIDUsage_KeyboardInternational5 = 0x8B, /* International5 */ - kHIDUsage_KeyboardInternational6 = 0x8C, /* International6 */ - kHIDUsage_KeyboardInternational7 = 0x8D, /* International7 */ - kHIDUsage_KeyboardInternational8 = 0x8E, /* International8 */ - kHIDUsage_KeyboardInternational9 = 0x8F, /* International9 */ - kHIDUsage_KeyboardLANG1 = 0x90, /* LANG1 */ - kHIDUsage_KeyboardLANG2 = 0x91, /* LANG2 */ - kHIDUsage_KeyboardLANG3 = 0x92, /* LANG3 */ - kHIDUsage_KeyboardLANG4 = 0x93, /* LANG4 */ - kHIDUsage_KeyboardLANG5 = 0x94, /* LANG5 */ - kHIDUsage_KeyboardLANG6 = 0x95, /* LANG6 */ - kHIDUsage_KeyboardLANG7 = 0x96, /* LANG7 */ - kHIDUsage_KeyboardLANG8 = 0x97, /* LANG8 */ - kHIDUsage_KeyboardLANG9 = 0x98, /* LANG9 */ - kHIDUsage_KeyboardAlternateErase = 0x99, /* AlternateErase */ - kHIDUsage_KeyboardSysReqOrAttention = 0x9A, /* SysReq/Attention */ - kHIDUsage_KeyboardCancel = 0x9B, /* Cancel */ - kHIDUsage_KeyboardClear = 0x9C, /* Clear */ - kHIDUsage_KeyboardPrior = 0x9D, /* Prior */ - kHIDUsage_KeyboardReturn = 0x9E, /* Return */ - kHIDUsage_KeyboardSeparator = 0x9F, /* Separator */ - kHIDUsage_KeyboardOut = 0xA0, /* Out */ - kHIDUsage_KeyboardOper = 0xA1, /* Oper */ - kHIDUsage_KeyboardClearOrAgain = 0xA2, /* Clear/Again */ - kHIDUsage_KeyboardCrSelOrProps = 0xA3, /* CrSel/Props */ - kHIDUsage_KeyboardExSel = 0xA4, /* ExSel */ - /* 0xA5-0xDF Reserved */ - kHIDUsage_KeyboardLeftControl = 0xE0, /* Left Control */ - kHIDUsage_KeyboardLeftShift = 0xE1, /* Left Shift */ - kHIDUsage_KeyboardLeftAlt = 0xE2, /* Left Alt */ - kHIDUsage_KeyboardLeftGUI = 0xE3, /* Left GUI */ - kHIDUsage_KeyboardRightControl = 0xE4, /* Right Control */ - kHIDUsage_KeyboardRightShift = 0xE5, /* Right Shift */ - kHIDUsage_KeyboardRightAlt = 0xE6, /* Right Alt */ - kHIDUsage_KeyboardRightGUI = 0xE7, /* Right GUI */ - /* 0xE8-0xFFFF Reserved */ - kHIDUsage_Keyboard_Reserved = 0xFFFF -}; - -/* LEDs Page (0x08) */ -/* An LED or indicator is implemented as an On/Off Control (OOF) using the ÒSingle button toggleÓ mode, where a value of 1 will turn on the indicator, and a value of 0 will turn it off. The exceptions are described below. */ -enum -{ - kHIDUsage_LED_NumLock = 0x01, /* On/Off Control */ - kHIDUsage_LED_CapsLock = 0x02, /* On/Off Control */ - kHIDUsage_LED_ScrollLock = 0x03, /* On/Off Control */ - kHIDUsage_LED_Compose = 0x04, /* On/Off Control */ - kHIDUsage_LED_Kana = 0x05, /* On/Off Control */ - kHIDUsage_LED_Power = 0x06, /* On/Off Control */ - kHIDUsage_LED_Shift = 0x07, /* On/Off Control */ - kHIDUsage_LED_DoNotDisturb = 0x08, /* On/Off Control */ - kHIDUsage_LED_Mute = 0x09, /* On/Off Control */ - kHIDUsage_LED_ToneEnable = 0x0A, /* On/Off Control */ - kHIDUsage_LED_HighCutFilter = 0x0B, /* On/Off Control */ - kHIDUsage_LED_LowCutFilter = 0x0C, /* On/Off Control */ - kHIDUsage_LED_EqualizerEnable = 0x0D, /* On/Off Control */ - kHIDUsage_LED_SoundFieldOn = 0x0E, /* On/Off Control */ - kHIDUsage_LED_SurroundOn = 0x0F, /* On/Off Control */ - kHIDUsage_LED_Repeat = 0x10, /* On/Off Control */ - kHIDUsage_LED_Stereo = 0x11, /* On/Off Control */ - kHIDUsage_LED_SamplingRateDetect = 0x12, /* On/Off Control */ - kHIDUsage_LED_Spinning = 0x13, /* On/Off Control */ - kHIDUsage_LED_CAV = 0x14, /* On/Off Control */ - kHIDUsage_LED_CLV = 0x15, /* On/Off Control */ - kHIDUsage_LED_RecordingFormatDetect = 0x16, /* On/Off Control */ - kHIDUsage_LED_OffHook = 0x17, /* On/Off Control */ - kHIDUsage_LED_Ring = 0x18, /* On/Off Control */ - kHIDUsage_LED_MessageWaiting = 0x19, /* On/Off Control */ - kHIDUsage_LED_DataMode = 0x1A, /* On/Off Control */ - kHIDUsage_LED_BatteryOperation = 0x1B, /* On/Off Control */ - kHIDUsage_LED_BatteryOK = 0x1C, /* On/Off Control */ - kHIDUsage_LED_BatteryLow = 0x1D, /* On/Off Control */ - kHIDUsage_LED_Speaker = 0x1E, /* On/Off Control */ - kHIDUsage_LED_HeadSet = 0x1F, /* On/Off Control */ - kHIDUsage_LED_Hold = 0x20, /* On/Off Control */ - kHIDUsage_LED_Microphone = 0x21, /* On/Off Control */ - kHIDUsage_LED_Coverage = 0x22, /* On/Off Control */ - kHIDUsage_LED_NightMode = 0x23, /* On/Off Control */ - kHIDUsage_LED_SendCalls = 0x24, /* On/Off Control */ - kHIDUsage_LED_CallPickup = 0x25, /* On/Off Control */ - kHIDUsage_LED_Conference = 0x26, /* On/Off Control */ - kHIDUsage_LED_StandBy = 0x27, /* On/Off Control */ - kHIDUsage_LED_CameraOn = 0x28, /* On/Off Control */ - kHIDUsage_LED_CameraOff = 0x29, /* On/Off Control */ - kHIDUsage_LED_OnLine = 0x2A, /* On/Off Control */ - kHIDUsage_LED_OffLine = 0x2B, /* On/Off Control */ - kHIDUsage_LED_Busy = 0x2C, /* On/Off Control */ - kHIDUsage_LED_Ready = 0x2D, /* On/Off Control */ - kHIDUsage_LED_PaperOut = 0x2E, /* On/Off Control */ - kHIDUsage_LED_PaperJam = 0x2F, /* On/Off Control */ - kHIDUsage_LED_Remote = 0x30, /* On/Off Control */ - kHIDUsage_LED_Forward = 0x31, /* On/Off Control */ - kHIDUsage_LED_Reverse = 0x32, /* On/Off Control */ - kHIDUsage_LED_Stop = 0x33, /* On/Off Control */ - kHIDUsage_LED_Rewind = 0x34, /* On/Off Control */ - kHIDUsage_LED_FastForward = 0x35, /* On/Off Control */ - kHIDUsage_LED_Play = 0x36, /* On/Off Control */ - kHIDUsage_LED_Pause = 0x37, /* On/Off Control */ - kHIDUsage_LED_Record = 0x38, /* On/Off Control */ - kHIDUsage_LED_Error = 0x39, /* On/Off Control */ - kHIDUsage_LED_Usage = 0x3A, /* Selector */ - kHIDUsage_LED_UsageInUseIndicator = 0x3B, /* Usage Switch */ - kHIDUsage_LED_UsageMultiModeIndicator = 0x3C, /* Usage Modifier */ - kHIDUsage_LED_IndicatorOn = 0x3D, /* Selector */ - kHIDUsage_LED_IndicatorFlash = 0x3E, /* Selector */ - kHIDUsage_LED_IndicatorSlowBlink = 0x3F, /* Selector */ - kHIDUsage_LED_IndicatorFastBlink = 0x40, /* Selector */ - kHIDUsage_LED_IndicatorOff = 0x41, /* Selector */ - kHIDUsage_LED_FlashOnTime = 0x42, /* Dynamic Value */ - kHIDUsage_LED_SlowBlinkOnTime = 0x43, /* Dynamic Value */ - kHIDUsage_LED_SlowBlinkOffTime = 0x44, /* Dynamic Value */ - kHIDUsage_LED_FastBlinkOnTime = 0x45, /* Dynamic Value */ - kHIDUsage_LED_FastBlinkOffTime = 0x46, /* Dynamic Value */ - kHIDUsage_LED_UsageIndicatorColor = 0x47, /* Usage Modifier */ - kHIDUsage_LED_IndicatorRed = 0x48, /* Selector */ - kHIDUsage_LED_IndicatorGreen = 0x49, /* Selector */ - kHIDUsage_LED_IndicatorAmber = 0x4A, /* Selector */ - kHIDUsage_LED_GenericIndicator = 0x4B, /* On/Off Control */ - kHIDUsage_LED_SystemSuspend = 0x4C, /* On/Off Control */ - kHIDUsage_LED_ExternalPowerConnected = 0x4D, /* On/Off Control */ - /* 0x4E - 0xFFFF Reserved */ - kHIDUsage_LED_Reserved = 0xFFFF -}; - -/* Button Page (0x09) */ -/* The Button page is the first place an application should look for user selection controls. System graphical user interfaces typically employ a pointer and a set of hierarchical selectors to select, move and otherwise manipulate their environment. For these purposes the following assignment of significance can be applied to the Button usages: */ -/* ¥ Button 1, Primary Button. Used for object selecting, dragging, and double click activation. On MacOS, this is the only button. Microsoft operating systems call this a logical left button, because it */ -/* is not necessarily physically located on the left of the pointing device. */ -/* ¥ Button 2, Secondary Button. Used by newer graphical user interfaces to browse object properties. Exposed by systems to applications that typically assign application-specific functionality. */ -/* ¥ Button 3, Tertiary Button. Optional control. Exposed to applications, but seldom assigned functionality due to prevalence of two- and one-button devices. */ -/* ¥ Buttons 4 -55. As the button number increases, its significance as a selector decreases. */ -/* In many ways the assignment of button numbers is similar to the assignment of Effort in Physical descriptors. Button 1 would be used to define the button a finger rests on when the hand is in the Òat restÓ position, that is, virtually no effort is required by the user to activate the button. Button values increment as the finger has to stretch to reach a control. See Section 6.2.3, ÒPhysical Descriptors,Ó in the HID Specification for methods of further qualifying buttons. */ -enum -{ - kHIDUsage_Button_1 = 0x01, /* (primary/trigger) */ - kHIDUsage_Button_2 = 0x02, /* (secondary) */ - kHIDUsage_Button_3 = 0x03, /* (tertiary) */ - kHIDUsage_Button_4 = 0x04, /* 4th button */ - /* ... */ - kHIDUsage_Button_65535 = 0xFFFF -}; - -/* Ordinal Page (0x0A) */ -/* The Ordinal page allows multiple instances of a control or sets of controls to be declared without requiring individual enumeration in the native usage page. For example, it is not necessary to declare usages of Pointer 1, Pointer 2, and so forth on the Generic Desktop page. When parsed, the ordinal instance number is, in essence, concatenated to the usages attached to the encompassing collection to create Pointer 1, Pointer 2, and so forth. */ -/* For an example, see Section A.5, ÒMultiple Instances of a Control,Ó in Appendix A, ÒUsage Examples.Ó By convention, an Ordinal collection is placed inside the collection for which it is declaring multiple instances. */ -/* Instances do not have to be identical. */ -enum -{ - /* 0x00 Reserved */ - kHIDUsage_Ord_Instance1 = 0x01, /* Usage Modifier */ - kHIDUsage_Ord_Instance2 = 0x02, /* Usage Modifier */ - kHIDUsage_Ord_Instance3 = 0x03, /* Usage Modifier */ - kHIDUsage_Ord_Instance4 = 0x04, /* Usage Modifier */ - kHIDUsage_Ord_Instance65535 = 0xFFFF /* Usage Modifier */ -}; - -/* Telephony Page (0x0B) */ -/* This usage page defines the keytop and control usages for telephony devices. */ -/* Indicators on a phone are handled by wrapping them in LED: Usage In Use Indicator and LED: Usage Selected Indicator usages. For example, a message-indicator LED would be identified by a Telephony: Message usage declared as a Feature or Output in a LED: Usage In Use Indicator collection. */ -/* See Section 14, ÒConsumer Page (0x0C),Ó for audio volume and tone controls. */ -enum -{ - kHIDUsage_Tfon_Phone = 0x01, /* Application Collection */ - kHIDUsage_Tfon_AnsweringMachine = 0x02, /* Application Collection */ - kHIDUsage_Tfon_MessageControls = 0x03, /* Logical Collection */ - kHIDUsage_Tfon_Handset = 0x04, /* Logical Collection */ - kHIDUsage_Tfon_Headset = 0x05, /* Logical Collection */ - kHIDUsage_Tfon_TelephonyKeyPad = 0x06, /* Named Array */ - kHIDUsage_Tfon_ProgrammableButton = 0x07, /* Named Array */ - /* 0x08 - 0x1F Reserved */ - kHIDUsage_Tfon_HookSwitch = 0x20, /* On/Off Control */ - kHIDUsage_Tfon_Flash = 0x21, /* Momentary Control */ - kHIDUsage_Tfon_Feature = 0x22, /* One-Shot Control */ - kHIDUsage_Tfon_Hold = 0x23, /* On/Off Control */ - kHIDUsage_Tfon_Redial = 0x24, /* One-Shot Control */ - kHIDUsage_Tfon_Transfer = 0x25, /* One-Shot Control */ - kHIDUsage_Tfon_Drop = 0x26, /* One-Shot Control */ - kHIDUsage_Tfon_Park = 0x27, /* On/Off Control */ - kHIDUsage_Tfon_ForwardCalls = 0x28, /* On/Off Control */ - kHIDUsage_Tfon_AlternateFunction = 0x29, /* Momentary Control */ - kHIDUsage_Tfon_Line = 0x2A, /* One-Shot Control */ - kHIDUsage_Tfon_SpeakerPhone = 0x2B, /* On/Off Control */ - kHIDUsage_Tfon_Conference = 0x2C, /* On/Off Control */ - kHIDUsage_Tfon_RingEnable = 0x2D, /* On/Off Control */ - kHIDUsage_Tfon_Ring = 0x2E, /* Selector */ - kHIDUsage_Tfon_PhoneMute = 0x2F, /* On/Off Control */ - kHIDUsage_Tfon_CallerID = 0x30, /* Momentary Control */ - /* 0x31 - 0x4F Reserved */ - kHIDUsage_Tfon_SpeedDial = 0x50, /* One-Shot Control */ - kHIDUsage_Tfon_StoreNumber = 0x51, /* One-Shot Control */ - kHIDUsage_Tfon_RecallNumber = 0x52, /* One-Shot Control */ - kHIDUsage_Tfon_PhoneDirectory = 0x53, /* On/Off Control */ - /* 0x54 - 0x6F Reserved */ - kHIDUsage_Tfon_VoiceMail = 0x70, /* On/Off Control */ - kHIDUsage_Tfon_ScreenCalls = 0x71, /* On/Off Control */ - kHIDUsage_Tfon_DoNotDisturb = 0x72, /* On/Off Control */ - kHIDUsage_Tfon_Message = 0x73, /* One-Shot Control */ - kHIDUsage_Tfon_AnswerOnOrOff = 0x74, /* On/Off Control */ - /* 0x75 - 0x8F Reserved */ - kHIDUsage_Tfon_InsideDialTone = 0x90, /* Momentary Control */ - kHIDUsage_Tfon_OutsideDialTone = 0x91, /* Momentary Control */ - kHIDUsage_Tfon_InsideRingTone = 0x92, /* Momentary Control */ - kHIDUsage_Tfon_OutsideRingTone = 0x93, /* Momentary Control */ - kHIDUsage_Tfon_PriorityRingTone = 0x94, /* Momentary Control */ - kHIDUsage_Tfon_InsideRingback = 0x95, /* Momentary Control */ - kHIDUsage_Tfon_PriorityRingback = 0x96, /* Momentary Control */ - kHIDUsage_Tfon_LineBusyTone = 0x97, /* Momentary Control */ - kHIDUsage_Tfon_ReorderTone = 0x98, /* Momentary Control */ - kHIDUsage_Tfon_CallWaitingTone = 0x99, /* Momentary Control */ - kHIDUsage_Tfon_ConfirmationTone1 = 0x9A, /* Momentary Control */ - kHIDUsage_Tfon_ConfirmationTone2 = 0x9B, /* Momentary Control */ - kHIDUsage_Tfon_TonesOff = 0x9C, /* On/Off Control */ - kHIDUsage_Tfon_OutsideRingback = 0x9D, /* Momentary Control */ - /* 0x9E - 0xAF Reserved */ - kHIDUsage_Tfon_PhoneKey0 = 0xB0, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey1 = 0xB1, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey2 = 0xB2, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey3 = 0xB3, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey4 = 0xB4, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey5 = 0xB5, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey6 = 0xB6, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey7 = 0xB7, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey8 = 0xB8, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey9 = 0xB9, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKeyStar = 0xBA, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKeyPound = 0xBB, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKeyA = 0xBC, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKeyB = 0xBD, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKeyC = 0xBE, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKeyD = 0xBF, /* Selector/One-Shot Control */ - /* 0xC0 - 0xFFFF Reserved */ - kHIDUsage_TFon_Reserved = 0xFFFF -}; - -/* Consumer Page (0x0C) */ -/* All controls on the Consumer page are application-specific. That is, they affect a specific device, not the system as a whole. */ -enum -{ - kHIDUsage_Csmr_ConsumerControl = 0x01, /* Application Collection */ - kHIDUsage_Csmr_NumericKeyPad = 0x02, /* Named Array */ - kHIDUsage_Csmr_ProgrammableButtons = 0x03, /* Named Array */ - /* 0x03 - 0x1F Reserved */ - kHIDUsage_Csmr_Plus10 = 0x20, /* One-Shot Control */ - kHIDUsage_Csmr_Plus100 = 0x21, /* One-Shot Control */ - kHIDUsage_Csmr_AMOrPM = 0x22, /* One-Shot Control */ - /* 0x23 - 0x3F Reserved */ - kHIDUsage_Csmr_Power = 0x30, /* On/Off Control */ - kHIDUsage_Csmr_Reset = 0x31, /* One-Shot Control */ - kHIDUsage_Csmr_Sleep = 0x32, /* One-Shot Control */ - kHIDUsage_Csmr_SleepAfter = 0x33, /* One-Shot Control */ - kHIDUsage_Csmr_SleepMode = 0x34, /* Re-Trigger Control */ - kHIDUsage_Csmr_Illumination = 0x35, /* On/Off Control */ - kHIDUsage_Csmr_FunctionButtons = 0x36, /* Named Array */ - /* 0x37 - 0x3F Reserved */ - kHIDUsage_Csmr_Menu = 0x40, /* On/Off Control */ - kHIDUsage_Csmr_MenuPick = 0x41, /* One-Shot Control */ - kHIDUsage_Csmr_MenuUp = 0x42, /* One-Shot Control */ - kHIDUsage_Csmr_MenuDown = 0x43, /* One-Shot Control */ - kHIDUsage_Csmr_MenuLeft = 0x44, /* One-Shot Control */ - kHIDUsage_Csmr_MenuRight = 0x45, /* One-Shot Control */ - kHIDUsage_Csmr_MenuEscape = 0x46, /* One-Shot Control */ - kHIDUsage_Csmr_MenuValueIncrease = 0x47, /* One-Shot Control */ - kHIDUsage_Csmr_MenuValueDecrease = 0x48, /* One-Shot Control */ - /* 0x49 - 0x5F Reserved */ - kHIDUsage_Csmr_DataOnScreen = 0x60, /* On/Off Control */ - kHIDUsage_Csmr_ClosedCaption = 0x61, /* On/Off Control */ - kHIDUsage_Csmr_ClosedCaptionSelect = 0x62, /* Selector */ - kHIDUsage_Csmr_VCROrTV = 0x63, /* On/Off Control */ - kHIDUsage_Csmr_BroadcastMode = 0x64, /* One-Shot Control */ - kHIDUsage_Csmr_Snapshot = 0x65, /* One-Shot Control */ - kHIDUsage_Csmr_Still = 0x66, /* One-Shot Control */ - /* 0x67 - 0x7F Reserved */ - kHIDUsage_Csmr_Selection = 0x80, /* Named Array */ - kHIDUsage_Csmr_Assign = 0x81, /* Selector */ - kHIDUsage_Csmr_ModeStep = 0x82, /* One-Shot Control */ - kHIDUsage_Csmr_RecallLast = 0x83, /* One-Shot Control */ - kHIDUsage_Csmr_EnterChannel = 0x84, /* One-Shot Control */ - kHIDUsage_Csmr_OrderMovie = 0x85, /* One-Shot Control */ - kHIDUsage_Csmr_Channel = 0x86, /* Linear Control */ - kHIDUsage_Csmr_MediaSelection = 0x87, /* Selector */ - kHIDUsage_Csmr_MediaSelectComputer = 0x88, /* Selector */ - kHIDUsage_Csmr_MediaSelectTV = 0x89, /* Selector */ - kHIDUsage_Csmr_MediaSelectWWW = 0x8A, /* Selector */ - kHIDUsage_Csmr_MediaSelectDVD = 0x8B, /* Selector */ - kHIDUsage_Csmr_MediaSelectTelephone = 0x8C, /* Selector */ - kHIDUsage_Csmr_MediaSelectProgramGuide = 0x8D, /* Selector */ - kHIDUsage_Csmr_MediaSelectVideoPhone = 0x8E, /* Selector */ - kHIDUsage_Csmr_MediaSelectGames = 0x8F, /* Selector */ - kHIDUsage_Csmr_MediaSelectMessages = 0x90, /* Selector */ - kHIDUsage_Csmr_MediaSelectCD = 0x91, /* Selector */ - kHIDUsage_Csmr_MediaSelectVCR = 0x92, /* Selector */ - kHIDUsage_Csmr_MediaSelectTuner = 0x93, /* Selector */ - kHIDUsage_Csmr_Quit = 0x94, /* One-Shot Control */ - kHIDUsage_Csmr_Help = 0x95, /* On/Off Control */ - kHIDUsage_Csmr_MediaSelectTape = 0x96, /* Selector */ - kHIDUsage_Csmr_MediaSelectCable = 0x97, /* Selector */ - kHIDUsage_Csmr_MediaSelectSatellite = 0x98, /* Selector */ - kHIDUsage_Csmr_MediaSelectSecurity = 0x99, /* Selector */ - kHIDUsage_Csmr_MediaSelectHome = 0x9A, /* Selector */ - kHIDUsage_Csmr_MediaSelectCall = 0x9B, /* Selector */ - kHIDUsage_Csmr_ChannelIncrement = 0x9C, /* One-Shot Control */ - kHIDUsage_Csmr_ChannelDecrement = 0x9D, /* One-Shot Control */ - kHIDUsage_Csmr_Media = 0x9E, /* Selector */ - /* 0x9F Reserved */ - kHIDUsage_Csmr_VCRPlus = 0xA0, /* One-Shot Control */ - kHIDUsage_Csmr_Once = 0xA1, /* One-Shot Control */ - kHIDUsage_Csmr_Daily = 0xA2, /* One-Shot Control */ - kHIDUsage_Csmr_Weekly = 0xA3, /* One-Shot Control */ - kHIDUsage_Csmr_Monthly = 0xA4, /* One-Shot Control */ - /* 0xA5 - 0xAF Reserved */ - kHIDUsage_Csmr_Play = 0xB0, /* On/Off Control */ - kHIDUsage_Csmr_Pause = 0xB1, /* On/Off Control */ - kHIDUsage_Csmr_Record = 0xB2, /* On/Off Control */ - kHIDUsage_Csmr_FastForward = 0xB3, /* On/Off Control */ - kHIDUsage_Csmr_Rewind = 0xB4, /* On/Off Control */ - kHIDUsage_Csmr_ScanNextTrack = 0xB5, /* One-Shot Control */ - kHIDUsage_Csmr_ScanPreviousTrack = 0xB6, /* One-Shot Control */ - kHIDUsage_Csmr_Stop = 0xB7, /* One-Shot Control */ - kHIDUsage_Csmr_Eject = 0xB8, /* One-Shot Control */ - kHIDUsage_Csmr_RandomPlay = 0xB9, /* On/Off Control */ - kHIDUsage_Csmr_SelectDisc = 0xBA, /* Named Array */ - kHIDUsage_Csmr_EnterDisc = 0xBB, /* Momentary Control */ - kHIDUsage_Csmr_Repeat = 0xBC, /* One-Shot Control */ - kHIDUsage_Csmr_Tracking = 0xBD, /* Linear Control */ - kHIDUsage_Csmr_TrackNormal = 0xBE, /* One-Shot Control */ - kHIDUsage_Csmr_SlowTracking = 0xBF, /* Linear Control */ - kHIDUsage_Csmr_FrameForward = 0xC0, /* Re-Trigger Control */ - kHIDUsage_Csmr_FrameBack = 0xC1, /* Re-Trigger Control */ - kHIDUsage_Csmr_Mark = 0xC2, /* One-Shot Control */ - kHIDUsage_Csmr_ClearMark = 0xC3, /* One-Shot Control */ - kHIDUsage_Csmr_RepeatFromMark = 0xC4, /* On/Off Control */ - kHIDUsage_Csmr_ReturnToMark = 0xC5, /* One-Shot Control */ - kHIDUsage_Csmr_SearchMarkForward = 0xC6, /* One-Shot Control */ - kHIDUsage_Csmr_SearchMarkBackwards = 0xC7, /* One-Shot Control */ - kHIDUsage_Csmr_CounterReset = 0xC8, /* One-Shot Control */ - kHIDUsage_Csmr_ShowCounter = 0xC9, /* One-Shot Control */ - kHIDUsage_Csmr_TrackingIncrement = 0xCA, /* Re-Trigger Control */ - kHIDUsage_Csmr_TrackingDecrement = 0xCB, /* Re-Trigger Control */ - kHIDUsage_Csmr_StopOrEject = 0xCC, /* One-Shot Control */ - kHIDUsage_Csmr_PlayOrPause = 0xCD, /* One-Shot Control */ - kHIDUsage_Csmr_PlayOrSkip = 0xCE, /* One-Shot Control */ - /* 0xCF - 0xDF Reserved */ - kHIDUsage_Csmr_Volume = 0xE0, /* Linear Control */ - kHIDUsage_Csmr_Balance = 0xE1, /* Linear Control */ - kHIDUsage_Csmr_Mute = 0xE2, /* On/Off Control */ - kHIDUsage_Csmr_Bass = 0xE3, /* Linear Control */ - kHIDUsage_Csmr_Treble = 0xE4, /* Linear Control */ - kHIDUsage_Csmr_BassBoost = 0xE5, /* On/Off Control */ - kHIDUsage_Csmr_SurroundMode = 0xE6, /* One-Shot Control */ - kHIDUsage_Csmr_Loudness = 0xE7, /* On/Off Control */ - kHIDUsage_Csmr_MPX = 0xE8, /* On/Off Control */ - kHIDUsage_Csmr_VolumeIncrement = 0xE9, /* Re-Trigger Control */ - kHIDUsage_Csmr_VolumeDecrement = 0xEA, /* Re-Trigger Control */ - /* 0xEB - 0xEF Reserved */ - kHIDUsage_Csmr_Speed = 0xF0, /* Selector */ - kHIDUsage_Csmr_PlaybackSpeed = 0xF1, /* Named Array */ - kHIDUsage_Csmr_StandardPlay = 0xF2, /* Selector */ - kHIDUsage_Csmr_LongPlay = 0xF3, /* Selector */ - kHIDUsage_Csmr_ExtendedPlay = 0xF4, /* Selector */ - kHIDUsage_Csmr_Slow = 0xF5, /* One-Shot Control */ - /* 0xF6 - 0xFF Reserved */ - kHIDUsage_Csmr_FanEnable = 0x100, /* On/Off Control */ - kHIDUsage_Csmr_FanSpeed = 0x101, /* Linear Control */ - kHIDUsage_Csmr_LightEnable = 0x102, /* On/Off Control */ - kHIDUsage_Csmr_LightIlluminationLevel = 0x103, /* Linear Control */ - kHIDUsage_Csmr_ClimateControlEnable = 0x104, /* On/Off Control */ - kHIDUsage_Csmr_RoomTemperature = 0x105, /* Linear Control */ - kHIDUsage_Csmr_SecurityEnable = 0x106, /* On/Off Control */ - kHIDUsage_Csmr_FireAlarm = 0x107, /* One-Shot Control */ - kHIDUsage_Csmr_PoliceAlarm = 0x108, /* One-Shot Control */ - /* 0x109 - 0x14F Reserved */ - kHIDUsage_Csmr_BalanceRight = 0x150, /* Re-Trigger Control */ - kHIDUsage_Csmr_BalanceLeft = 0x151, /* Re-Trigger Control */ - kHIDUsage_Csmr_BassIncrement = 0x152, /* Re-Trigger Control */ - kHIDUsage_Csmr_BassDecrement = 0x153, /* Re-Trigger Control */ - kHIDUsage_Csmr_TrebleIncrement = 0x154, /* Re-Trigger Control */ - kHIDUsage_Csmr_TrebleDecrement = 0x155, /* Re-Trigger Control */ - /* 0x156 - 0x15F Reserved */ - kHIDUsage_Csmr_SpeakerSystem = 0x160, /* Logical Collection */ - kHIDUsage_Csmr_ChannelLeft = 0x161, /* Logical Collection */ - kHIDUsage_Csmr_ChannelRight = 0x162, /* Logical Collection */ - kHIDUsage_Csmr_ChannelCenter = 0x163, /* Logical Collection */ - kHIDUsage_Csmr_ChannelFront = 0x164, /* Logical Collection */ - kHIDUsage_Csmr_ChannelCenterFront = 0x165, /* Logical Collection */ - kHIDUsage_Csmr_ChannelSide = 0x166, /* Logical Collection */ - kHIDUsage_Csmr_ChannelSurround = 0x167, /* Logical Collection */ - kHIDUsage_Csmr_ChannelLowFrequencyEnhancement = 0x168, /* Logical Collection */ - kHIDUsage_Csmr_ChannelTop = 0x169, /* Logical Collection */ - kHIDUsage_Csmr_ChannelUnknown = 0x16A, /* Logical Collection */ - /* 0x16B - 0x16F Reserved */ - kHIDUsage_Csmr_SubChannel = 0x170, /* Linear Control */ - kHIDUsage_Csmr_SubChannelIncrement = 0x171, /* One-Shot Control */ - kHIDUsage_Csmr_SubChannelDecrement = 0x172, /* One-Shot Control */ - kHIDUsage_Csmr_AlternateAudioIncrement = 0x173, /* One-Shot Control */ - kHIDUsage_Csmr_AlternateAudioDecrement = 0x174, /* One-Shot Control */ - /* 0x175 - 0x17F Reserved */ - kHIDUsage_Csmr_ApplicationLaunchButtons = 0x180, /* Named Array */ - kHIDUsage_Csmr_ALLaunchButtonConfigurationTool = 0x181, /* Selector */ - kHIDUsage_Csmr_ALProgrammableButtonConfiguration = 0x182, /* Selector */ - kHIDUsage_Csmr_ALConsumerControlConfiguration = 0x183, /* Selector */ - kHIDUsage_Csmr_ALWordProcessor = 0x184, /* Selector */ - kHIDUsage_Csmr_ALTextEditor = 0x185, /* Selector */ - kHIDUsage_Csmr_ALSpreadsheet = 0x186, /* Selector */ - kHIDUsage_Csmr_ALGraphicsEditor = 0x187, /* Selector */ - kHIDUsage_Csmr_ALPresentationApp = 0x188, /* Selector */ - kHIDUsage_Csmr_ALDatabaseApp = 0x189, /* Selector */ - kHIDUsage_Csmr_ALEmailReader = 0x18A, /* Selector */ - kHIDUsage_Csmr_ALNewsreader = 0x18B, /* Selector */ - kHIDUsage_Csmr_ALVoicemail = 0x18C, /* Selector */ - kHIDUsage_Csmr_ALContactsOrAddressBook = 0x18D, /* Selector */ - kHIDUsage_Csmr_ALCalendarOrSchedule = 0x18E, /* Selector */ - kHIDUsage_Csmr_ALTaskOrProjectManager = 0x18F, /* Selector */ - kHIDUsage_Csmr_ALLogOrJournalOrTimecard = 0x190, /* Selector */ - kHIDUsage_Csmr_ALCheckbookOrFinance = 0x191, /* Selector */ - kHIDUsage_Csmr_ALCalculator = 0x192, /* Selector */ - kHIDUsage_Csmr_ALAOrVCaptureOrPlayback = 0x193, /* Selector */ - kHIDUsage_Csmr_ALLocalMachineBrowser = 0x194, /* Selector */ - kHIDUsage_Csmr_ALLANOrWANBrowser = 0x195, /* Selector */ - kHIDUsage_Csmr_ALInternetBrowser = 0x196, /* Selector */ - kHIDUsage_Csmr_ALRemoteNetworkingOrISPConnect = 0x197, /* Selector */ - kHIDUsage_Csmr_ALNetworkConference = 0x198, /* Selector */ - kHIDUsage_Csmr_ALNetworkChat = 0x199, /* Selector */ - kHIDUsage_Csmr_ALTelephonyOrDialer = 0x19A, /* Selector */ - kHIDUsage_Csmr_ALLogon = 0x19B, /* Selector */ - kHIDUsage_Csmr_ALLogoff = 0x19C, /* Selector */ - kHIDUsage_Csmr_ALLogonOrLogoff = 0x19D, /* Selector */ - kHIDUsage_Csmr_ALTerminalLockOrScreensaver = 0x19E, /* Selector */ - kHIDUsage_Csmr_ALControlPanel = 0x19F, /* Selector */ - kHIDUsage_Csmr_ALCommandLineProcessorOrRun = 0x1A0, /* Selector */ - kHIDUsage_Csmr_ALProcessOrTaskManager = 0x1A1, /* Selector */ - kHIDUsage_Csmr_AL = 0x1A2, /* Selector */ - kHIDUsage_Csmr_ALNextTaskOrApplication = 0x1A3, /* Selector */ - kHIDUsage_Csmr_ALPreviousTaskOrApplication = 0x1A4, /* Selector */ - kHIDUsage_Csmr_ALPreemptiveHaltTaskOrApplication = 0x1A5, /* Selector */ - kHIDUsage_Csmr_ALIntegratedHelpCenter = 0x1A6, /* Selector */ - kHIDUsage_Csmr_ALDocuments = 0x1A7, /* Selector */ - kHIDUsage_Csmr_ALThesaurus = 0x1A8, /* Selector */ - kHIDUsage_Csmr_ALDictionary = 0x1A9, /* Selector */ - kHIDUsage_Csmr_ALDesktop = 0x1AA, /* Selector */ - kHIDUsage_Csmr_ALSpellCheck = 0x1AB, /* Selector */ - kHIDUsage_Csmr_ALGrammerCheck = 0x1AC, /* Selector */ - kHIDUsage_Csmr_ALWirelessStatus = 0x1AD, /* Selector */ - kHIDUsage_Csmr_ALKeyboardLayout = 0x1AE, /* Selector */ - kHIDUsage_Csmr_ALVirusProtection = 0x1AF, /* Selector */ - kHIDUsage_Csmr_ALEncryption = 0x1B0, /* Selector */ - kHIDUsage_Csmr_ALScreenSaver = 0x1B1, /* Selector */ - kHIDUsage_Csmr_ALAlarms = 0x1B2, /* Selector */ - kHIDUsage_Csmr_ALClock = 0x1B3, /* Selector */ - kHIDUsage_Csmr_ALFileBrowser = 0x1B4, /* Selector */ - kHIDUsage_Csmr_ALPowerStatus = 0x1B5, /* Selector */ - /* 0x1A6 - 0x1FF Reserved */ - kHIDUsage_Csmr_GenericGUIApplicationControls = 0x200, /* Named Array */ - kHIDUsage_Csmr_ACNew = 0x201, /* Selector */ - kHIDUsage_Csmr_ACOpen = 0x202, /* Selector */ - kHIDUsage_Csmr_ACClose = 0x203, /* Selector */ - kHIDUsage_Csmr_ACExit = 0x204, /* Selector */ - kHIDUsage_Csmr_ACMaximize = 0x205, /* Selector */ - kHIDUsage_Csmr_ACMinimize = 0x206, /* Selector */ - kHIDUsage_Csmr_ACSave = 0x207, /* Selector */ - kHIDUsage_Csmr_ACPrint = 0x208, /* Selector */ - kHIDUsage_Csmr_ACProperties = 0x209, /* Selector */ - kHIDUsage_Csmr_ACUndo = 0x21A, /* Selector */ - kHIDUsage_Csmr_ACCopy = 0x21B, /* Selector */ - kHIDUsage_Csmr_ACCut = 0x21C, /* Selector */ - kHIDUsage_Csmr_ACPaste = 0x21D, /* Selector */ - kHIDUsage_Csmr_AC = 0x21E, /* Selector */ - kHIDUsage_Csmr_ACFind = 0x21F, /* Selector */ - kHIDUsage_Csmr_ACFindandReplace = 0x220, /* Selector */ - kHIDUsage_Csmr_ACSearch = 0x221, /* Selector */ - kHIDUsage_Csmr_ACGoTo = 0x222, /* Selector */ - kHIDUsage_Csmr_ACHome = 0x223, /* Selector */ - kHIDUsage_Csmr_ACBack = 0x224, /* Selector */ - kHIDUsage_Csmr_ACForward = 0x225, /* Selector */ - kHIDUsage_Csmr_ACStop = 0x226, /* Selector */ - kHIDUsage_Csmr_ACRefresh = 0x227, /* Selector */ - kHIDUsage_Csmr_ACPreviousLink = 0x228, /* Selector */ - kHIDUsage_Csmr_ACNextLink = 0x229, /* Selector */ - kHIDUsage_Csmr_ACBookmarks = 0x22A, /* Selector */ - kHIDUsage_Csmr_ACHistory = 0x22B, /* Selector */ - kHIDUsage_Csmr_ACSubscriptions = 0x22C, /* Selector */ - kHIDUsage_Csmr_ACZoomIn = 0x22D, /* Selector */ - kHIDUsage_Csmr_ACZoomOut = 0x22E, /* Selector */ - kHIDUsage_Csmr_ACZoom = 0x22F, /* Selector */ - kHIDUsage_Csmr_ACFullScreenView = 0x230, /* Selector */ - kHIDUsage_Csmr_ACNormalView = 0x231, /* Selector */ - kHIDUsage_Csmr_ACViewToggle = 0x232, /* Selector */ - kHIDUsage_Csmr_ACScrollUp = 0x233, /* Selector */ - kHIDUsage_Csmr_ACScrollDown = 0x234, /* Selector */ - kHIDUsage_Csmr_ACScroll = 0x235, /* Selector */ - kHIDUsage_Csmr_ACPanLeft = 0x236, /* Selector */ - kHIDUsage_Csmr_ACPanRight = 0x237, /* Selector */ - kHIDUsage_Csmr_ACPan = 0x238, /* Selector */ - kHIDUsage_Csmr_ACNewWindow = 0x239, /* Selector */ - kHIDUsage_Csmr_ACTileHorizontally = 0x23A, /* Selector */ - kHIDUsage_Csmr_ACTileVertically = 0x23B, /* Selector */ - kHIDUsage_Csmr_ACFormat = 0x23C, /* Selector */ - /* 0x23D - 0xFFFF Reserved */ - kHIDUsage_Csmr_Reserved = 0xFFFF -}; - -/* Physical Interface Device Page (0x0F) */ -/* This section provides detailed descriptions of the usages employed by Digitizer Devices. */ -enum -{ - kHIDUsage_PID_PhysicalInterfaceDevice = 0x01, /* CA - A collection of PID usages */ - /* 0x02 - 0x1F Reserved */ - kHIDUsage_PID_Normal = 0x20, /* DV - A force applied perpendicular to the surface of an object */ - kHIDUsage_PID_SetEffectReport = 0x21, /* XXX */ - kHIDUsage_PID_EffectBlockIndex = 0x22, /* XXX */ - kHIDUsage_PID_ParamBlockOffset = 0x23, /* XXX */ - kHIDUsage_PID_ROM_Flag = 0x24, /* XXX */ - kHIDUsage_PID_EffectType = 0x25, /* XXX */ - kHIDUsage_PID_ET_ConstantForce = 0x26, /* XXX */ - kHIDUsage_PID_ET_Ramp = 0x27, /* XXX */ - kHIDUsage_PID_ET_CustomForceData = 0x28, /* XXX */ - /* 0x29 - 0x2F Reserved */ - kHIDUsage_PID_ET_Square = 0x30, /* XXX */ - kHIDUsage_PID_ET_Sine = 0x31, /* XXX */ - kHIDUsage_PID_ET_Triangle = 0x32, /* XXX */ - kHIDUsage_PID_ET_SawtoothUp = 0x33, /* XXX */ - kHIDUsage_PID_ET_SawtoothDown = 0x34, /* XXX */ - /* 0x35 - 0x3F Reserved */ - kHIDUsage_PID_ET_Spring = 0x40, /* XXX */ - kHIDUsage_PID_ET_Damper = 0x41, /* XXX */ - kHIDUsage_PID_ET_Inertia = 0x42, /* XXX */ - kHIDUsage_PID_ET_Friction = 0x43, /* XXX */ - /* 0x44 - 0x4F Reserved */ - kHIDUsage_PID_Duration = 0x50, /* XXX */ - kHIDUsage_PID_SamplePeriod = 0x51, /* XXX */ - kHIDUsage_PID_Gain = 0x52, /* XXX */ - kHIDUsage_PID_TriggerButton = 0x53, /* XXX */ - kHIDUsage_PID_TriggerRepeatInterval = 0x54, /* XXX */ - kHIDUsage_PID_AxesEnable = 0x55, /* XXX */ - kHIDUsage_PID_DirectionEnable = 0x56, /* XXX */ - kHIDUsage_PID_Direction = 0x57, /* XXX */ - kHIDUsage_PID_TypeSpecificBlockOffset = 0x58, /* XXX */ - kHIDUsage_PID_BlockType = 0x59, /* XXX */ - kHIDUsage_PID_SetEnvelopeReport = 0x5A, /* XXX */ - kHIDUsage_PID_AttackLevel = 0x5B, /* XXX */ - kHIDUsage_PID_AttackTime = 0x5C, /* XXX */ - kHIDUsage_PID_FadeLevel = 0x5D, /* XXX */ - kHIDUsage_PID_FadeTime = 0x5E, /* XXX */ - kHIDUsage_PID_SetConditionReport = 0x5F, /* XXX */ - - kHIDUsage_PID_CP_Offset = 0x60, /* XXX */ - kHIDUsage_PID_PositiveCoefficient = 0x61, /* XXX */ - kHIDUsage_PID_NegativeCoefficient = 0x62, /* XXX */ - kHIDUsage_PID_PositiveSaturation = 0x63, /* XXX */ - kHIDUsage_PID_NegativeSaturation = 0x64, /* XXX */ - kHIDUsage_PID_DeadBand = 0x65, /* XXX */ - kHIDUsage_PID_DownloadForceSample = 0x66, /* XXX */ - kHIDUsage_PID_IsochCustomForceEnable = 0x67, /* XXX */ - kHIDUsage_PID_CustomForceDataReport = 0x68, /* XXX */ - kHIDUsage_PID_CustomForceData = 0x69, /* XXX */ - kHIDUsage_PID_CustomForceVendorDefinedData = 0x6A, /* XXX */ - kHIDUsage_PID_SetCustomForceReport = 0x6B, /* XXX */ - kHIDUsage_PID_CustomForceDataOffset = 0x6C, /* XXX */ - kHIDUsage_PID_SampleCount = 0x6D, /* XXX */ - kHIDUsage_PID_SetPeriodicReport = 0x6E, /* XXX */ - kHIDUsage_PID_Offset = 0x6F, /* XXX */ - - kHIDUsage_PID_Magnitude = 0x70, /* XXX */ - kHIDUsage_PID_Phase = 0x71, /* XXX */ - kHIDUsage_PID_Period = 0x72, /* XXX */ - kHIDUsage_PID_SetConstantForceReport = 0x73, /* XXX */ - kHIDUsage_PID_SetRampForceReport = 0x74, /* XXX */ - kHIDUsage_PID_RampStart = 0x75, /* XXX */ - kHIDUsage_PID_RampEnd = 0x76, /* XXX */ - kHIDUsage_PID_EffectOperationReport = 0x77, /* XXX */ - kHIDUsage_PID_EffectOperation = 0x78, /* XXX */ - kHIDUsage_PID_OpEffectStart = 0x79, /* XXX */ - kHIDUsage_PID_OpEffectStartSolo = 0x7A, /* XXX */ - kHIDUsage_PID_OpEffectStop = 0x7B, /* XXX */ - kHIDUsage_PID_LoopCount = 0x7C, /* XXX */ - kHIDUsage_PID_DeviceGainReport = 0x7D, /* XXX */ - kHIDUsage_PID_DeviceGain = 0x7E, /* XXX */ - kHIDUsage_PID_PoolReport = 0x7F, /* XXX */ - - kHIDUsage_PID_RAM_PoolSize = 0x80, /* XXX */ - kHIDUsage_PID_ROM_PoolSize = 0x81, /* XXX */ - kHIDUsage_PID_ROM_EffectBlockCount = 0x82, /* XXX */ - kHIDUsage_PID_SimultaneousEffectsMax = 0x83, /* XXX */ - kHIDUsage_PID_PoolAlignment = 0x84, /* XXX */ - kHIDUsage_PID_PoolMoveReport = 0x85, /* XXX */ - kHIDUsage_PID_MoveSource = 0x86, /* XXX */ - kHIDUsage_PID_MoveDestination = 0x87, /* XXX */ - kHIDUsage_PID_MoveLength = 0x88, /* XXX */ - kHIDUsage_PID_BlockLoadReport = 0x89, /* XXX */ - /* 0x8A Reserved */ - kHIDUsage_PID_BlockLoadStatus = 0x8B, /* XXX */ - kHIDUsage_PID_BlockLoadSuccess = 0x8C, /* XXX */ - kHIDUsage_PID_BlockLoadFull = 0x8D, /* XXX */ - kHIDUsage_PID_BlockLoadError = 0x8E, /* XXX */ - kHIDUsage_PID_BlockHandle = 0x8F, /* XXX */ - - kHIDUsage_PID_BlockFreeReport = 0x90, /* XXX */ - kHIDUsage_PID_TypeSpecificBlockHandle = 0x91, /* XXX */ - kHIDUsage_PID_StateReport = 0x92, /* XXX */ - /* 0x93 Reserved */ - kHIDUsage_PID_EffectPlaying = 0x94, /* XXX */ - kHIDUsage_PID_DeviceControlReport = 0x95, /* XXX */ - kHIDUsage_PID_DeviceControl = 0x96, /* XXX */ - kHIDUsage_PID_DC_EnableActuators = 0x97, /* XXX */ - kHIDUsage_PID_DC_DisableActuators = 0x98, /* XXX */ - kHIDUsage_PID_DC_StopAllEffects = 0x99, /* XXX */ - kHIDUsage_PID_DC_DeviceReset = 0x9A, /* XXX */ - kHIDUsage_PID_DC_DevicePause = 0x9B, /* XXX */ - kHIDUsage_PID_DC_DeviceContinue = 0x9C, /* XXX */ - /* 0x9d - 0x9E Reserved */ - kHIDUsage_PID_DevicePaused = 0x9F, /* XXX */ - - kHIDUsage_PID_ActuatorsEnabled = 0xA0, /* XXX */ - /* 0xA1 - 0xA3 Reserved */ - kHIDUsage_PID_SafetySwitch = 0xA4, /* XXX */ - kHIDUsage_PID_ActuatorOverrideSwitch = 0xA5, /* XXX */ - kHIDUsage_PID_ActuatorPower = 0xA6, /* XXX */ - kHIDUsage_PID_StartDelay = 0xA7, /* XXX */ - kHIDUsage_PID_ParameterBlockSize = 0xA8, /* XXX */ - kHIDUsage_PID_DeviceManagedPool = 0xA9, /* XXX */ - kHIDUsage_PID_SharedParameterBlocks = 0xAA, /* XXX */ - kHIDUsage_PID_CreateNewEffectReport = 0xAB, /* XXX */ - kHIDUsage_PID_RAM_PoolAvailable = 0xAC, /* XXX */ - /* 0xAD - 0xFFFF Reserved */ - kHIDUsage_PID_Reserved = 0xFFFF -}; - -/* Digitizer Page (0x0D) */ -/* This section provides detailed descriptions of the usages employed by Digitizer Devices. */ -enum -{ - kHIDUsage_Dig_Digitizer = 0x01, /* Application Collection */ - kHIDUsage_Dig_Pen = 0x02, /* Application Collection */ - kHIDUsage_Dig_LightPen = 0x03, /* Application Collection */ - kHIDUsage_Dig_TouchScreen = 0x04, /* Application Collection */ - kHIDUsage_Dig_TouchPad = 0x05, /* Application Collection */ - kHIDUsage_Dig_WhiteBoard = 0x06, /* Application Collection */ - kHIDUsage_Dig_CoordinateMeasuringMachine = 0x07, /* Application Collection */ - kHIDUsage_Dig_3DDigitizer = 0x08, /* Application Collection */ - kHIDUsage_Dig_StereoPlotter = 0x09, /* Application Collection */ - kHIDUsage_Dig_ArticulatedArm = 0x0A, /* Application Collection */ - kHIDUsage_Dig_Armature = 0x0B, /* Application Collection */ - kHIDUsage_Dig_MultiplePointDigitizer = 0x0C, /* Application Collection */ - kHIDUsage_Dig_FreeSpaceWand = 0x0D, /* Application Collection */ - /* 0x0E - 0x1F Reserved */ - kHIDUsage_Dig_Stylus = 0x20, /* Logical Collection */ - kHIDUsage_Dig_Puck = 0x21, /* Logical Collection */ - kHIDUsage_Dig_Finger = 0x22, /* Logical Collection */ - /* 0x23 - 0x2F Reserved */ - kHIDUsage_Dig_TipPressure = 0x30, /* Dynamic Value */ - kHIDUsage_Dig_BarrelPressure = 0x31, /* Dynamic Value */ - kHIDUsage_Dig_InRange = 0x32, /* Momentary Control */ - kHIDUsage_Dig_Touch = 0x33, /* Momentary Control */ - kHIDUsage_Dig_Untouch = 0x34, /* One-Shot Control */ - kHIDUsage_Dig_Tap = 0x35, /* One-Shot Control */ - kHIDUsage_Dig_Quality = 0x36, /* Dynamic Value */ - kHIDUsage_Dig_DataValid = 0x37, /* Momentary Control */ - kHIDUsage_Dig_TransducerIndex = 0x38, /* Dynamic Value */ - kHIDUsage_Dig_TabletFunctionKeys = 0x39, /* Logical Collection */ - kHIDUsage_Dig_ProgramChangeKeys = 0x3A, /* Logical Collection */ - kHIDUsage_Dig_BatteryStrength = 0x3B, /* Dynamic Value */ - kHIDUsage_Dig_Invert = 0x3C, /* Momentary Control */ - kHIDUsage_Dig_XTilt = 0x3D, /* Dynamic Value */ - kHIDUsage_Dig_YTilt = 0x3E, /* Dynamic Value */ - kHIDUsage_Dig_Azimuth = 0x3F, /* Dynamic Value */ - kHIDUsage_Dig_Altitude = 0x40, /* Dynamic Value */ - kHIDUsage_Dig_Twist = 0x41, /* Dynamic Value */ - kHIDUsage_Dig_TipSwitch = 0x42, /* Momentary Control */ - kHIDUsage_Dig_SecondaryTipSwitch = 0x43, /* Momentary Control */ - kHIDUsage_Dig_BarrelSwitch = 0x44, /* Momentary Control */ - kHIDUsage_Dig_Eraser = 0x45, /* Momentary Control */ - kHIDUsage_Dig_TabletPick = 0x46, /* Momentary Control */ - /* 0x47 - 0xFFFF Reserved */ - kHIDUsage_Dig_Reserved = 0xFFFF -}; - -/* AlphanumericDisplay Page (0x14) */ -/* The Alphanumeric Display page is intended for use by simple alphanumeric displays that are used on consumer devices. */ -enum -{ - kHIDUsage_AD_AlphanumericDisplay = 0x01, /* Application Collection */ - /* 0x02 - 0x1F Reserved */ - kHIDUsage_AD_DisplayAttributesReport = 0x20, /* Logical Collection */ - kHIDUsage_AD_ASCIICharacterSet = 0x21, /* Static Flag */ - kHIDUsage_AD_DataReadBack = 0x22, /* Static Flag */ - kHIDUsage_AD_FontReadBack = 0x23, /* Static Flag */ - kHIDUsage_AD_DisplayControlReport = 0x24, /* Logical Collection */ - kHIDUsage_AD_ClearDisplay = 0x25, /* Dynamic Flag */ - kHIDUsage_AD_DisplayEnable = 0x26, /* Dynamic Flag */ - kHIDUsage_AD_ScreenSaverDelay = 0x27, /* Static Value */ - kHIDUsage_AD_ScreenSaverEnable = 0x28, /* Dynamic Flag */ - kHIDUsage_AD_VerticalScroll = 0x29, /* Static Flag */ - kHIDUsage_AD_HorizontalScroll = 0x2A, /* Static Flag */ - kHIDUsage_AD_CharacterReport = 0x2B, /* Logical Collection */ - kHIDUsage_AD_DisplayData = 0x2C, /* Dynamic Value */ - kHIDUsage_AD_DisplayStatus = 0x2D, /* Logical Collection */ - kHIDUsage_AD_StatNotReady = 0x2E, /* Selector */ - kHIDUsage_AD_StatReady = 0x2F, /* Selector */ - kHIDUsage_AD_ErrNotaloadablecharacter = 0x30, /* Selector */ - kHIDUsage_AD_ErrFontdatacannotberead = 0x31, /* Selector */ - kHIDUsage_AD_CursorPositionReport = 0x32, /* Logical Collection */ - kHIDUsage_AD_Row = 0x33, /* Dynamic Value */ - kHIDUsage_AD_Column = 0x34, /* Dynamic Value */ - kHIDUsage_AD_Rows = 0x35, /* Static Value */ - kHIDUsage_AD_Columns = 0x36, /* Static Value */ - kHIDUsage_AD_CursorPixelPositioning = 0x37, /* Static Flag */ - kHIDUsage_AD_CursorMode = 0x38, /* Dynamic Flag */ - kHIDUsage_AD_CursorEnable = 0x39, /* Dynamic Flag */ - kHIDUsage_AD_CursorBlink = 0x3A, /* Dynamic Flag */ - kHIDUsage_AD_FontReport = 0x3B, /* Logical Collection */ - kHIDUsage_AD_FontData = 0x3C, /* Buffered Byte */ - kHIDUsage_AD_CharacterWidth = 0x3D, /* Static Value */ - kHIDUsage_AD_CharacterHeight = 0x3E, /* Static Value */ - kHIDUsage_AD_CharacterSpacingHorizontal = 0x3F, /* Static Value */ - kHIDUsage_AD_CharacterSpacingVertical = 0x40, /* Static Value */ - kHIDUsage_AD_UnicodeCharacterSet = 0x41, /* Static Flag */ - /* 0x42 - 0xFFFF Reserved */ - kHIDUsage_AD_Reserved = 0xFFFF -}; - -/* Power Device Page (0x84) */ -/* This section provides detailed descriptions of the usages employed by Power Devices. */ -enum -{ - - kHIDUsage_PD_Undefined = 0x00, /* Power Device Undefined Usage */ - kHIDUsage_PD_iName = 0x01, /* CL- Power Device Name Index */ - kHIDUsage_PD_PresentStatus = 0x02, /* CL- Power Device Present Status */ - kHIDUsage_PD_ChangedStatus = 0x03, /* CA- Power Device Changed Status */ - kHIDUsage_PD_UPS = 0x04, /* CA- Uninterruptible Power Supply */ - kHIDUsage_PD_PowerSupply = 0x05, /* CA- Power Supply */ - /* Reserved 0x06 - 0x0F */ - kHIDUsage_PD_BatterySystem = 0x10, /* CP- Battery System power module */ - kHIDUsage_PD_BatterySystemID = 0x11, /* SV IF- Battery System ID */ - kHIDUsage_PD_Battery = 0x12, /* CP- Battery */ - kHIDUsage_PD_BatteryID = 0x13, /* SV IF- Battery ID */ - kHIDUsage_PD_Charger = 0x14, /* CP- Charger */ - kHIDUsage_PD_ChargerID = 0x15, /* SV IF- Charger ID */ - kHIDUsage_PD_PowerConverter = 0x16, /* CP- Power Converter power module */ - kHIDUsage_PD_PowerConverterID = 0x17, /* SV IF- Power Converter ID */ - kHIDUsage_PD_OutletSystem = 0x18, /* CP- Outlet System power module */ - kHIDUsage_PD_OutletSystemID = 0x19, /* SV IF-Outlet System ID */ - kHIDUsage_PD_Input = 0x1A, /* CP- Power Device Input */ - kHIDUsage_PD_InputID = 0x1B, /* SV IF- Power Device Input ID */ - kHIDUsage_PD_Output = 0x1C, /* CP- Power Device Output */ - kHIDUsage_PD_OutputID = 0x1D, /* SV IF- Power Device Output ID */ - kHIDUsage_PD_Flow = 0x1E, /* CP- Power Device Flow */ - kHIDUsage_PD_FlowID = 0x1F, /* Item IF- Power Device Flow ID */ - kHIDUsage_PD_Outlet = 0x20, /* CP- Power Device Outlet */ - kHIDUsage_PD_OutletID = 0x21, /* SV IF- Power Device Outlet ID */ - kHIDUsage_PD_Gang = 0x22, /* CL/CP- Power Device Gang */ - kHIDUsage_PD_GangID = 0x23, /* SV IF- Power Device Gang ID */ - kHIDUsage_PD_PowerSummary = 0x24, /* CL/CP- Power Device Power Summary */ - kHIDUsage_PD_PowerSummaryID = 0x25, /* SV IF- Power Device Power Summary ID */ - /* Reserved 0x26 - 0x2F */ - kHIDUsage_PD_Voltage = 0x30, /* DV IF- Power Device Voltage */ - kHIDUsage_PD_Current = 0x31, /* DV IF- Power Device Current */ - kHIDUsage_PD_Frequency = 0x32, /* DV IF- Power Device Frequency */ - kHIDUsage_PD_ApparentPower = 0x33, /* DV IF- Power Device Apparent Power */ - kHIDUsage_PD_ActivePower = 0x34, /* DV IF- Power Device RMS Power */ - kHIDUsage_PD_PercentLoad = 0x35, /* DV IF- Power Device Percent Load */ - kHIDUsage_PD_Temperature = 0x36, /* DV IF- Power Device Temperature */ - kHIDUsage_PD_Humidity = 0x37, /* DV IF- Power Device Humidity */ - kHIDUsage_PD_BadCount = 0x38, /* DV IF- Power Device Bad Condition Count */ - /* Reserved 0x39 - 0x3F */ - kHIDUsage_PD_ConfigVoltage = 0x40, /* SV/DV F- Power Device Nominal Voltage */ - kHIDUsage_PD_ConfigCurrent = 0x41, /* SV/DV F- Power Device Nominal Current */ - kHIDUsage_PD_ConfigFrequency = 0x42, /* SV/DV F- Power Device Nominal Frequency */ - kHIDUsage_PD_ConfigApparentPower = 0x43, /* SV/DV F- Power Device Nominal Apparent Power */ - kHIDUsage_PD_ConfigActivePower = 0x44, /* SV/DV F- Power Device Nominal RMS Power */ - kHIDUsage_PD_ConfigPercentLoad = 0x45, /* SV/DV F- Power Device Nominal Percent Load */ - kHIDUsage_PD_ConfigTemperature = 0x46, /* SV/DV F- Power Device Nominal Temperature */ - kHIDUsage_PD_ConfigHumidity = 0x47, /* SV/DV F- Power Device Nominal Humidity */ - /* Reserved 0x48 - 0x4F */ - kHIDUsage_PD_SwitchOnControl = 0x50, /* DV F- Power Device Switch On Control */ - kHIDUsage_PD_SwitchOffControl = 0x51, /* DV F- Power Device Switch Off Control */ - kHIDUsage_PD_ToggleControl = 0x52, /* DV F- Power Device Toogle Sequence Control */ - kHIDUsage_PD_LowVoltageTransfer = 0x53, /* DV F- Power Device Min Transfer Voltage */ - kHIDUsage_PD_HighVoltageTransfer = 0x54, /* DV F- Power Device Max Transfer Voltage */ - kHIDUsage_PD_DelayBeforeReboot = 0x55, /* DV F- Power Device Delay Before Reboot */ - kHIDUsage_PD_DelayBeforeStartup = 0x56, /* DV F- Power Device Delay Before Startup */ - kHIDUsage_PD_DelayBeforeShutdown = 0x57, /* DV F- Power Device Delay Before Shutdown */ - kHIDUsage_PD_Test = 0x58, /* DV F- Power Device Test Request/Result */ - kHIDUsage_PD_ModuleReset = 0x59, /* DV F- Power Device Reset Request/Result */ - kHIDUsage_PD_AudibleAlarmControl = 0x5A, /* DV F- Power Device Audible Alarm Control */ - /* Reserved 0x5B - 0x5F */ - kHIDUsage_PD_Present = 0x60, /* DV IOF- Power Device Present */ - kHIDUsage_PD_Good = 0x61, /* DV IOF- Power Device Good */ - kHIDUsage_PD_InternalFailure = 0x62, /* DV IOF- Power Device Internal Failure */ - kHIDUsage_PD_VoltageOutOfRange = 0x63, /* DV IOF- Power Device Voltage Out Of Range */ - kHIDUsage_PD_FrequencyOutOfRange = 0x64, /* DV IOF- Power Device Frequency Out Of Range */ - kHIDUsage_PD_Overload = 0x65, /* DV IOF- Power Device Overload */ - kHIDUsage_PD_OverCharged = 0x66, /* DV IOF- Power Device Over Charged */ - kHIDUsage_PD_OverTemperature = 0x67, /* DV IOF- Power Device Over Temperature */ - kHIDUsage_PD_ShutdownRequested = 0x68, /* DV IOF- Power Device Shutdown Requested */ - kHIDUsage_PD_ShutdownImminent = 0x69, /* DV IOF- Power Device Shutdown Imminent */ - /* Reserved 0x6A */ - kHIDUsage_PD_SwitchOnOff = 0x6B, /* DV IOF- Power Device On/Off Switch Status */ - kHIDUsage_PD_Switchable = 0x6C, /* DV IOF- Power Device Switchable */ - kHIDUsage_PD_Used = 0x6D, /* DV IOF- Power Device Used */ - kHIDUsage_PD_Boost = 0x6E, /* DV IOF- Power Device Boosted */ - kHIDUsage_PD_Buck = 0x6F, /* DV IOF- Power Device Bucked */ - kHIDUsage_PD_Initialized = 0x70, /* DV IOF- Power Device Initialized */ - kHIDUsage_PD_Tested = 0x71, /* DV IOF- Power Device Tested */ - kHIDUsage_PD_AwaitingPower = 0x72, /* DV IOF- Power Device Awaiting Power */ - kHIDUsage_PD_CommunicationLost = 0x73, /* DV IOF- Power Device Communication Lost */ - /* Reserved 0x74 - 0xFC */ - kHIDUsage_PD_iManufacturer = 0xFD, /* SV F- Power Device Manufacturer String Index */ - kHIDUsage_PD_iProduct = 0xFE, /* SV F- Power Device Product String Index */ - kHIDUsage_PD_iserialNumber = 0xFF /* SV F- Power Device Serial Number String Index */ -}; - -/* Battery System Page (x85) */ -/* This section provides detailed descriptions of the usages employed by Battery Systems. */ -enum -{ - kHIDUsage_BS_Undefined = 0x00, /* Battery System Undefined */ - kHIDUsage_BS_SMBBatteryMode = 0x01, /* CL - SMB Mode */ - kHIDUsage_BS_SMBBatteryStatus = 0x02, /* CL - SMB Status */ - kHIDUsage_BS_SMBAlarmWarning = 0x03, /* CL - SMB Alarm Warning */ - kHIDUsage_BS_SMBChargerMode = 0x04, /* CL - SMB Charger Mode */ - kHIDUsage_BS_SMBChargerStatus = 0x05, /* CL - SMB Charger Status */ - kHIDUsage_BS_SMBChargerSpecInfo = 0x06, /* CL - SMB Charger Extended Status */ - kHIDUsage_BS_SMBSelectorState = 0x07, /* CL - SMB Selector State */ - kHIDUsage_BS_SMBSelectorPresets = 0x08, /* CL - SMB Selector Presets */ - kHIDUsage_BS_SMBSelectorInfo = 0x09, /* CL - SMB Selector Info */ - /* Reserved 0x0A - 0x0F */ - kHIDUsage_BS_OptionalMfgFunction1 = 0x10, /* DV F - Battery System Optional SMB Mfg Function 1 */ - kHIDUsage_BS_OptionalMfgFunction2 = 0x11, /* DV F - Battery System Optional SMB Mfg Function 2 */ - kHIDUsage_BS_OptionalMfgFunction3 = 0x12, /* DV F - Battery System Optional SMB Mfg Function 3 */ - kHIDUsage_BS_OptionalMfgFunction4 = 0x13, /* DV F - Battery System Optional SMB Mfg Function 4 */ - kHIDUsage_BS_OptionalMfgFunction5 = 0x14, /* DV F - Battery System Optional SMB Mfg Function 5 */ - kHIDUsage_BS_ConnectionToSMBus = 0x15, /* DF F - Battery System Connection To System Management Bus */ - kHIDUsage_BS_OutputConnection = 0x16, /* DF F - Battery System Output Connection Status */ - kHIDUsage_BS_ChargerConnection = 0x17, /* DF F - Battery System Charger Connection */ - kHIDUsage_BS_BatteryInsertion = 0x18, /* DF F - Battery System Battery Insertion */ - kHIDUsage_BS_Usenext = 0x19, /* DF F - Battery System Use Next */ - kHIDUsage_BS_OKToUse = 0x1A, /* DF F - Battery System OK To Use */ - kHIDUsage_BS_BatterySupported = 0x1B, /* DF F - Battery System Battery Supported */ - kHIDUsage_BS_SelectorRevision = 0x1C, /* DF F - Battery System Selector Revision */ - kHIDUsage_BS_ChargingIndicator = 0x1D, /* DF F - Battery System Charging Indicator */ - /* Reserved 0x1E - 0x27 */ - kHIDUsage_BS_ManufacturerAccess = 0x28, /* DV F - Battery System Manufacturer Access */ - kHIDUsage_BS_RemainingCapacityLimit = 0x29, /* DV F - Battery System Remaining Capacity Limit */ - kHIDUsage_BS_RemainingTimeLimit = 0x2A, /* DV F - Battery System Remaining Time Limit */ - kHIDUsage_BS_AtRate = 0x2B, /* DV F - Battery System At Rate... */ - kHIDUsage_BS_CapacityMode = 0x2C, /* DV F - Battery System Capacity Mode */ - kHIDUsage_BS_BroadcastToCharger = 0x2D, /* DV F - Battery System Broadcast To Charger */ - kHIDUsage_BS_PrimaryBattery = 0x2E, /* DV F - Battery System Primary Battery */ - kHIDUsage_BS_ChargeController = 0x2F, /* DV F - Battery System Charge Controller */ - /* Reserved 0x30 - 0x3F */ - kHIDUsage_BS_TerminateCharge = 0x40, /* DF IOF - Battery System Terminate Charge */ - kHIDUsage_BS_TerminateDischarge = 0x41, /* DF IOF - Battery System Terminate Discharge */ - kHIDUsage_BS_BelowRemainingCapacityLimit = 0x42, /* DF IOF - Battery System Below Remaining Capacity Limit */ - kHIDUsage_BS_RemainingTimeLimitExpired = 0x43, /* DF IOF - Battery System Remaining Time Limit Expired */ - kHIDUsage_BS_Charging = 0x44, /* DF IOF - Battery System Charging */ - kHIDUsage_BS_Discharging = 0x45, /* DV IOF - Battery System Discharging */ - kHIDUsage_BS_FullyCharged = 0x46, /* DF IOF - Battery System Fully Charged */ - kHIDUsage_BS_FullyDischarged = 0x47, /* DV IOF - Battery System Fully Discharged */ - kHIDUsage_BS_ConditioningFlag = 0x48, /* DV IOF - Battery System Conditioning Flag */ - kHIDUsage_BS_AtRateOK = 0x49, /* DV IOF - Battery System At Rate OK */ - kHIDUsage_BS_SMBErrorCode = 0x4A, /* DF IOF - Battery System SMB Error Code */ - kHIDUsage_BS_NeedReplacement = 0x4B, /* DF IOF - Battery System Need Replacement */ - /* Reserved 0x4C - 0x5F */ - kHIDUsage_BS_AtRateTimeToFull = 0x60, /* DV IF - Battery System At Rate Time To Full */ - kHIDUsage_BS_AtRateTimeToEmpty = 0x61, /* DV IF - Battery System At Rate Time To Empty */ - kHIDUsage_BS_AverageCurrent = 0x62, /* DV IF - Battery System Average Current */ - kHIDUsage_BS_Maxerror = 0x63, /* DV IF - Battery System Max Error */ - kHIDUsage_BS_RelativeStateOfCharge = 0x64, /* DV IF - Battery System Relative State Of Charge */ - kHIDUsage_BS_AbsoluteStateOfCharge = 0x65, /* DV IF - Battery System Absolute State Of Charge */ - kHIDUsage_BS_RemainingCapacity = 0x66, /* DV IF - Battery System Remaining Capacity */ - kHIDUsage_BS_FullChargeCapacity = 0x67, /* DV IF - Battery System Full Charge Capacity */ - kHIDUsage_BS_RunTimeToEmpty = 0x68, /* DV IF - Battery System Run Time To Empty */ - kHIDUsage_BS_AverageTimeToEmpty = 0x69, /* DV IF - Battery System Average Time To Empty */ - kHIDUsage_BS_AverageTimeToFull = 0x6A, /* DV IF - Battery System Average Time To Full */ - kHIDUsage_BS_CycleCount = 0x6B, /* DV IF - Battery System Cycle Count */ - /* Reserved 0x6C - 0x7F */ - kHIDUsage_BS_BattPackModelLevel = 0x80, /* SV F - Battery System Batt Pack Model Level */ - kHIDUsage_BS_InternalChargeController = 0x81, /* SF F - Battery System Internal Charge Controller */ - kHIDUsage_BS_PrimaryBatterySupport = 0x82, /* SF F - Battery System Primary Battery Support */ - kHIDUsage_BS_DesignCapacity = 0x83, /* SV F - Battery System Design Capacity */ - kHIDUsage_BS_SpecificationInfo = 0x84, /* SV F - Battery System Specification Info */ - kHIDUsage_BS_ManufacturerDate = 0x85, /* SV F - Battery System Manufacturer Date */ - kHIDUsage_BS_SerialNumber = 0x86, /* SV F - Battery System Serial Number */ - kHIDUsage_BS_iManufacturerName = 0x87, /* SV F - Battery System Manufacturer Name Index */ - kHIDUsage_BS_iDevicename = 0x88, /* SV F - Battery System Device Name Index */ - kHIDUsage_BS_iDeviceChemistry = 0x89, /* SV F - Battery System Device Chemistry Index */ - kHIDUsage_BS_ManufacturerData = 0x8A, /* SV F - Battery System Manufacturer Data */ - kHIDUsage_BS_Rechargable = 0x8B, /* SV F - Battery System Rechargable */ - kHIDUsage_BS_WarningCapacityLimit = 0x8C, /* SV F - Battery System Warning Capacity Limit */ - kHIDUsage_BS_CapacityGranularity1 = 0x8D, /* SV F - Battery System Capacity Granularity 1 */ - kHIDUsage_BS_CapacityGranularity2 = 0x8E, /* SV F - Battery System Capacity Granularity 2 */ - kHIDUsage_BS_iOEMInformation = 0x8F, /* SV F - Battery System OEM Information Index */ - /* Reserved 0x90 - 0xBF */ - kHIDUsage_BS_InhibitCharge = 0xC0, /* DF IOF - Battery System Inhibit Charge */ - kHIDUsage_BS_EnablePolling = 0xC1, /* DF IOF - Battery System Enable Polling */ - kHIDUsage_BS_ResetToZero = 0xC2, /* DF IOF - Battery System Reset To Zero */ - /* Reserved 0xC3 - 0xCF */ - kHIDUsage_BS_ACPresent = 0xD0, /* DF IOF - Battery System AC Present */ - kHIDUsage_BS_BatteryPresent = 0xD1, /* DF IOF - Battery System Battery Present */ - kHIDUsage_BS_PowerFail = 0xD2, /* DF IOF - Battery System Power Fail */ - kHIDUsage_BS_AlarmInhibited = 0xD3, /* DF IOF - Battery System Alarm Inhibited */ - kHIDUsage_BS_ThermistorUnderRange = 0xD4, /* DF IOF - Battery System Thermistor Under Range */ - kHIDUsage_BS_ThermistorHot = 0xD5, /* DF IOF - Battery System Thermistor Hot */ - kHIDUsage_BS_ThermistorCold = 0xD6, /* DF IOF - Battery System Thermistor Cold */ - kHIDUsage_BS_ThermistorOverRange = 0xD7, /* DF IOF - Battery System Thermistor Over Range */ - kHIDUsage_BS_VoltageOutOfRange = 0xD8, /* DF IOF - Battery System Voltage Out Of Range */ - kHIDUsage_BS_CurrentOutOfRange = 0xD9, /* DF IOF - Battery System Current Out Of Range */ - kHIDUsage_BS_CurrentNotRegulated = 0xDA, /* DF IOF - Battery System Current Not Regulated */ - kHIDUsage_BS_VoltageNotRegulated = 0xDB, /* DF IOF - Battery System Voltage Not Regulated */ - kHIDUsage_BS_MasterMode = 0xDC, /* DF IOF - Battery System Master Mode */ - /* Reserved 0xDD - 0xEF */ - kHIDUsage_BS_ChargerSelectorSupport = 0xF0, /* SF F- Battery System Charger Support Selector */ - kHIDUsage_BS_ChargerSpec = 0xF1, /* SF F- Battery System Charger Specification */ - kHIDUsage_BS_Level2 = 0xF2, /* SF F- Battery System Charger Level 2 */ - kHIDUsage_BS_Level3 = 0xF3 /* SF F- Battery System Charger Level 3 */ - /* Reserved 0xF2 - 0xFF */ -}; - -/* Bar Code Scanner Page (0x8C) */ -/* This section provides detailed descriptions of the usages employed by Bar Code Scanner Devices. */ -enum -{ - kHIDUsage_BCS_Undefined = 0x00, /* Bar Code Scanner Undefined Usage */ - kHIDUsage_BCS_BadgeReader = 0x01, /* CA - Bar Code Badge Reader */ - kHIDUsage_BCS_BarCodeScanner = 0x02, /* CA -Bar Code Scanner */ - kHIDUsage_BCS_DumbBarCodeScanner = 0x03, /* CA -Dumb Bar Code Scanner Usage */ - kHIDUsage_BCS_CordlessScannerBase = 0x04, /* CA -Cordless Base Usage */ - kHIDUsage_BCS_BarCodeScannerCradle = 0x05, /* CA -Bar Code Scanner Cradle Usage */ - /* Reserved 0x06 - 0x0F */ - kHIDUsage_BCS_AttributeReport = 0x10, /* CL - Attribute Report */ - kHIDUsage_BCS_SettingsReport = 0x11, /* CL - Settings Report */ - kHIDUsage_BCS_ScannedDataReport = 0x12, /* CL - Scanned Data Report */ - kHIDUsage_BCS_RawScannedDataReport = 0x13, /* CL - Raw Scanned Data Report */ - kHIDUsage_BCS_TriggerReport = 0x14, /* CL - Trigger Report */ - kHIDUsage_BCS_StatusReport = 0x15, /* CL - Status Report */ - kHIDUsage_BCS_UPC_EANControlReport = 0x16, /* CL - UPC/EAN Control Report */ - kHIDUsage_BCS_EAN2_3LabelControlReport = 0x17, /* CL - EAN 2/3 Label Control Report */ - kHIDUsage_BCS_Code39ControlReport = 0x18, /* CL - Code 39 Control Report */ - kHIDUsage_BCS_Interleaved2of5ControlReport = 0x19, /* CL - Interleaved 2 of 5 Control Report */ - kHIDUsage_BCS_Standard2of5ControlReport = 0x1A, /* CL - Standard 2 of 5 Control Report */ - kHIDUsage_BCS_MSIPlesseyControlReport = 0x1B, /* CL - MSI Plessey Control Report */ - kHIDUsage_BCS_CodabarControlReport = 0x1C, /* CL - Codabar Control Report */ - kHIDUsage_BCS_Code128ControlReport = 0x1D, /* CL - Code 128 Control Report */ - kHIDUsage_BCS_Misc1DControlReport = 0x1E, /* CL - Misc 1D Control Report */ - kHIDUsage_BCS_2DControlReport = 0x1F, /* CL - 2D Control Report */ - /* Reserved 0x20 - 0x2F */ - kHIDUsage_BCS_Aiming_PointerMide = 0x30, /* SF - Aiming Pointer Mode */ - kHIDUsage_BCS_BarCodePresentSensor = 0x31, /* SF - Bar Code Present Sensor */ - kHIDUsage_BCS_Class1ALaser = 0x32, /* SF - Class 1A Laser */ - kHIDUsage_BCS_Class2Laser = 0x33, /* SF - Class 2 Laser */ - kHIDUsage_BCS_HeaterPresent = 0x34, /* SF - Heater Present */ - kHIDUsage_BCS_ContactScanner = 0x35, /* SF - Contact Scanner */ - kHIDUsage_BCS_ElectronicArticleSurveillanceNotification = 0x36, /* SF - Electronic Article Surveillance Notification */ - kHIDUsage_BCS_ConstantElectronicArticleSurveillance = 0x37, /* SF - Constant Electronic Article Surveillance */ - kHIDUsage_BCS_ErrorIndication = 0x38, /* SF - Error Indication */ - kHIDUsage_BCS_FixedBeeper = 0x39, /* SF - Fixed Beeper */ - kHIDUsage_BCS_GoodDecodeIndication = 0x3A, /* SF - Good Decode Indication */ - kHIDUsage_BCS_HandsFreeScanning = 0x3B, /* SF - Hands Free Scanning */ - kHIDUsage_BCS_IntrinsicallySafe = 0x3C, /* SF - Intrinsically Safe */ - kHIDUsage_BCS_KlasseEinsLaser = 0x3D, /* SF - Klasse Eins Laser */ - kHIDUsage_BCS_LongRangeScanner = 0x3E, /* SF - Long Range Scanner */ - kHIDUsage_BCS_MirrorSpeedControl = 0x3F, /* SF - Mirror Speed Control */ - kHIDUsage_BCS_NotOnFileIndication = 0x40, /* SF - Not On File Indication */ - kHIDUsage_BCS_ProgrammableBeeper = 0x41, /* SF - Programmable Beeper */ - kHIDUsage_BCS_Triggerless = 0x42, /* SF - Triggerless */ - kHIDUsage_BCS_Wand = 0x43, /* SF - Wand */ - kHIDUsage_BCS_WaterResistant = 0x44, /* SF - Water Resistant */ - kHIDUsage_BCS_MultiRangeScanner = 0x45, /* SF - Multi-Range Scanner */ - kHIDUsage_BCS_ProximitySensor = 0x46, /* SF - Proximity Sensor */ - /* Reserved 0x47 - 0x4C */ - kHIDUsage_BCS_FragmentDecoding = 0x4D, /* DF - Fragment Decoding */ - kHIDUsage_BCS_ScannerReadConfidence = 0x4E, /* DV - Scanner Read Confidence */ - kHIDUsage_BCS_DataPrefix = 0x4F, /* NAry - Data Prefix */ - kHIDUsage_BCS_PrefixAIMI = 0x50, /* SEL - Prefix AIMI */ - kHIDUsage_BCS_PrefixNone = 0x51, /* SEL - Prefix None */ - kHIDUsage_BCS_PrefixProprietary = 0x52, /* SEL - Prefix Proprietary */ - /* Reserved 0x53 - 0x54 */ - kHIDUsage_BCS_ActiveTime = 0x55, /* DV - Active Time */ - kHIDUsage_BCS_AimingLaserPattern = 0x56, /* DF - Aiming Laser Pattern */ - kHIDUsage_BCS_BarCodePresent = 0x57, /* OOC - Bar Code Present */ - kHIDUsage_BCS_BeeperState = 0x58, /* OOC - Beeper State */ - kHIDUsage_BCS_LaserOnTime = 0x59, /* DV - Laser On Time */ - kHIDUsage_BCS_LaserState = 0x5A, /* OOC - Laser State */ - kHIDUsage_BCS_LockoutTime = 0x5B, /* DV - Lockout Time */ - kHIDUsage_BCS_MotorState = 0x5C, /* OOC - Motor State */ - kHIDUsage_BCS_MotorTimeout = 0x5D, /* DV - Motor Timeout */ - kHIDUsage_BCS_PowerOnResetScanner = 0x5E, /* DF - Power On Reset Scanner */ - kHIDUsage_BCS_PreventReadOfBarcodes = 0x5F, /* DF - Prevent Read of Barcodes */ - kHIDUsage_BCS_InitiateBarcodeRead = 0x60, /* DF - Initiate Barcode Read */ - kHIDUsage_BCS_TriggerState = 0x61, /* DF - Trigger State */ - kHIDUsage_BCS_TriggerMode = 0x62, /* NAry - Trigger Mode */ - kHIDUsage_BCS_TriggerModeBlinkingLaserOn = 0x63, /* SEL - Trigger Mode Blinking Laser On */ - kHIDUsage_BCS_TriggerModeContinuousLaserOn = 0x64, /* SEL - Trigger Mode Continuous Laser On */ - kHIDUsage_BCS_TriggerModeLaserOnWhilePulled = 0x65, /* SEL - Trigger Mode Laser on while Pulled */ - kHIDUsage_BCS_TriggerModeLaserStaysOnAfterTriggerRelease = 0x66, /* SEL - Trigger Mode Laser stays on after Trigger Release */ - /* Reserved 0x67 - 0x6C */ - kHIDUsage_BCS_CommitParametersToNVM = 0x6D, /* DF - Commit Parameters to NVM */ - kHIDUsage_BCS_ParameterScanning = 0x6E, /* DF - Parameter Scanning */ - kHIDUsage_BCS_ParametersChanged = 0x6F, /* OOC - Parameters Changed */ - kHIDUsage_BCS_SetParameterDefaultValues = 0x70, /* DF - Set parameter default values */ - /* Reserved 0x71 - 0x74 */ - kHIDUsage_BCS_ScannerInCradle = 0x75, /* OOC - Scanner In Cradle */ - kHIDUsage_BCS_ScannerInRange = 0x76, /* OOC - Scanner In Range */ - /* Reserved 0x77 - 0x79 */ - kHIDUsage_BCS_AimDuration = 0x7A, /* DV - Aim Duration */ - kHIDUsage_BCS_GoodReadLampDuration = 0x7B, /* DV - Good Read Lamp Duration */ - kHIDUsage_BCS_GoodReadLampIntensity = 0x7C, /* DV - Good Read Lamp Intensity */ - kHIDUsage_BCS_GoodReadLED = 0x7D, /* DF - Good Read LED */ - kHIDUsage_BCS_GoodReadToneFrequency = 0x7E, /* DV - Good Read Tone Frequency*/ - kHIDUsage_BCS_GoodReadToneLength = 0x7F, /* DV - Good Read Tone Length */ - kHIDUsage_BCS_GoodReadToneVolume = 0x80, /* DV - Good Read Tone Volume */ - /* Reserved 0x81 */ - kHIDUsage_BCS_NoReadMessage = 0x82, /* DF - No Read Message */ - kHIDUsage_BCS_NotOnFileVolume = 0x83, /* DV - Not on File Volume */ - kHIDUsage_BCS_PowerupBeep = 0x84, /* DF - Powerup Beep */ - kHIDUsage_BCS_SoundErrorBeep = 0x85, /* DF - Sound Error Beep */ - kHIDUsage_BCS_SoundGoodReadBeep = 0x86, /* DF - Sound Good Read Beep */ - kHIDUsage_BCS_SoundNotOnFileBeep = 0x87, /* DF - Sound Not On File Beep */ - kHIDUsage_BCS_GoodReadWhenToWrite = 0x88, /* NArry - Good Read When to Write */ - kHIDUsage_BCS_GRWTIAfterDecode = 0x89, /* SEL - GRWTI After Decode */ - kHIDUsage_BCS_GRWTIBeep_LampAfterTransmit = 0x8A, /* SEL - GRWTI Beep/Lamp after transmit */ - kHIDUsage_BCS_GRWTINoBeep_LampUseAtAll = 0x8B, /* SEL - GRWTI No Beep/Lamp at all */ - /* Reserved 0x8C - 0x90 */ - kHIDUsage_BCS_BooklandEAN = 0x91, /* DF - Bookland EAN */ - kHIDUsage_BCS_ConvertEAN8To13Type = 0x92, /* DF - Convert EAN 8 to 13 Type */ - kHIDUsage_BCS_ConvertUPCAToEAN_13 = 0x93, /* DF - Convert UPC A to EAN-13 */ - kHIDUsage_BCS_ConvertUPC_EToA = 0x94, /* DF - Convert UPC-E to A */ - kHIDUsage_BCS_EAN_13 = 0x95, /* DF - EAN-13 */ - kHIDUsage_BCS_EAN_8 = 0x96, /* DF - EAN_8 */ - kHIDUsage_BCS_EAN_99_128_Mandatory = 0x97, /* DF - EAN-99 128_Mandatory */ - kHIDUsage_BCS_EAN_99_P5_128_Optional = 0x98, /* DF - EAN-99 P5/128_Optional */ - /* Reserved 0x99 */ - kHIDUsage_BCS_UPC_EAN = 0x9A, /* DF - UPC/EAN */ - kHIDUsage_BCS_UPC_EANCouponCode = 0x9B, /* DF - UPC/EAN Coupon Code */ - kHIDUsage_BCS_UPC_EANPeriodicals = 0x9C, /* DV - UPC/EAN Periodicals */ - kHIDUsage_BCS_UPC_A = 0x9D, /* DF - UPC-A */ - kHIDUsage_BCS_UPC_AWith128Mandatory = 0x9E, /* DF - UPC-A with 128 Mandatory */ - kHIDUsage_BCS_UPC_AWith128Optical = 0x9F, /* DF - UPC-A with 128 Optical */ - kHIDUsage_BCS_UPC_AWithP5Optional = 0xA0, /* DF - UPC-A with P5 Optional */ - kHIDUsage_BCS_UPC_E = 0xA1, /* DF - UPC-E */ - kHIDUsage_BCS_UPC_E1 = 0xA2, /* DF - UPC-E1 */ - /* Reserved 0xA3 - 0xA8 */ - kHIDUsage_BCS_Periodical = 0xA9, /* NArry - Periodical */ - kHIDUsage_BCS_PeriodicalAutoDiscriminatePlus2 = 0xAA,/* SEL - Periodical Auto-Discriminate + 2 */ - kHIDUsage_BCS_PeriodicalOnlyDecodeWithPlus2 = 0xAB, /* SEL - Periodical Only Decode with + 2 */ - kHIDUsage_BCS_PeriodicalIgnorePlus2 = 0xAC, /* SEL - Periodical Ignore + 2 */ - kHIDUsage_BCS_PeriodicalAutoDiscriminatePlus5 = 0xAD,/* SEL - Periodical Auto-Discriminate + 5 */ - kHIDUsage_BCS_PeriodicalOnlyDecodeWithPlus5 = 0xAE, /* SEL - Periodical Only Decode with + 5 */ - kHIDUsage_BCS_PeriodicalIgnorePlus5 = 0xAF, /* SEL - Periodical Ignore + 5 */ - kHIDUsage_BCS_Check = 0xB0, /* NArry - Check */ - kHIDUsage_BCS_CheckDisablePrice = 0xB1, /* SEL - Check Disable Price */ - kHIDUsage_BCS_CheckEnable4DigitPrice = 0xB2, /* SEL - Check Enable 4 digit Price */ - kHIDUsage_BCS_CheckEnable5DigitPrice = 0xB3, /* SEL - Check Enable 5 digit Price */ - kHIDUsage_BCS_CheckEnableEuropean4DigitPrice = 0xB4,/* SEL - Check Enable European 4 digit Price */ - kHIDUsage_BCS_CheckEnableEuropean5DigitPrice = 0xB5,/* SEL - Check Enable European 5 digit Price */ - /* Reserved 0xB6 */ - kHIDUsage_BCS_EANTwoLabel = 0xB7, /* DF - EAN Two Label */ - kHIDUsage_BCS_EANThreeLabel = 0xB8, /* DF - EAN Thread Label */ - kHIDUsage_BCS_EAN8FlagDigit1 = 0xB9, /* DV - EAN 8 Flag Digit 1 */ - kHIDUsage_BCS_EAN8FlagDigit2 = 0xBA, /* DV - EAN 8 Flag Digit 2 */ - kHIDUsage_BCS_EAN8FlagDigit3 = 0xBB, /* DV - EAN 8 Flag Digit 3 */ - kHIDUsage_BCS_EAN13FlagDigit1 = 0xBC, /* DV - EAN 13 Flag Digit 1 */ - kHIDUsage_BCS_EAN13FlagDigit2 = 0xBD, /* DV - EAN 13 Flag Digit 2 */ - kHIDUsage_BCS_EAN13FlagDigit3 = 0xBE, /* DV - EAN 13 Flag Digit 3 */ - kHIDUsage_BCS_AddEAN2_3LabelDefinition = 0xBF, /* DF - Add EAN 2/3 Label Definition */ - kHIDUsage_BCS_ClearAllEAN2_3LabelDefinitions = 0xC0,/* DF - Clear all EAN 2/3 Label Definitions */ - /* Reserved 0xC1 - 0xC2 */ - kHIDUsage_BCS_Codabar = 0xC3, /* DF - Codabar */ - kHIDUsage_BCS_Code128 = 0xC4, /* DF - Code 128 */ - /* Reserved 0xC5 - 0xC6 */ - kHIDUsage_BCS_Code39 = 0xC7, /* DF - Code 39 */ - kHIDUsage_BCS_Code93 = 0xC8, /* DF - Code 93 */ - kHIDUsage_BCS_FullASCIIConversion = 0xC9, /* DF - Full ASCII Conversion */ - kHIDUsage_BCS_Interleaved2of5 = 0xCA, /* DF - Interleaved 2 of 5 */ - kHIDUsage_BCS_ItalianPharmacyCode = 0xCB, /* DF - Italian Pharmacy Code */ - kHIDUsage_BCS_MSI_Plessey = 0xCC, /* DF - MSI/Plessey */ - kHIDUsage_BCS_Standard2of5IATA = 0xCD, /* DF - Standard 2 of 5 IATA */ - kHIDUsage_BCS_Standard2of5 = 0xCE, /* DF - Standard 2 of 5 */ - /* Reserved 0xCF - 0xD2 */ - kHIDUsage_BCS_TransmitStart_Stop = 0xD3, /* DF - Transmit Start/Stop */ - kHIDUsage_BCS_TriOptic = 0xD4, /* DF - Tri-Optic */ - kHIDUsage_BCS_UCC_EAN_128 = 0xD5, /* DF - UCC/EAN-128 */ - kHIDUsage_BCS_CheckDigit = 0xD6, /* NArry - Check Digit */ - kHIDUsage_BCS_CheckDigitDisable = 0xD7, /* SEL - Check Digit Disable */ - kHIDUsage_BCS_CheckDigitEnableInterleaved2of5OPCC = 0xD8, /* SEL - Check Digit Enable Interleaved 2 of 5 OPCC */ - kHIDUsage_BCS_CheckDigitEnableInterleaved2of5USS = 0xD9, /* SEL - Check Digit Enable Interleaved 2 of 5 USS */ - kHIDUsage_BCS_CheckDigitEnableStandard2of5OPCC = 0xD8, /* SEL - Check Digit Enable Standard 2 of 5 OPCC */ - kHIDUsage_BCS_CheckDigitEnableStandard2of5USS = 0xD9, /* SEL - Check Digit Enable Standard 2 of 5 USS */ - kHIDUsage_BCS_CheckDigitEnableOneMSIPlessey = 0xDC, /* SEL - Check Digit Enable One MSI Plessey */ - kHIDUsage_BCS_CheckDigitEnableTwoMSIPlessey = 0xDD, /* SEL - Check Digit Enable Two MSI Plessey */ - kHIDUsage_BCS_CheckDigitCodabarEnable = 0xDE, /* SEL - Check Digit Codabar Enable */ - kHIDUsage_BCS_CheckDigitCode99Enable = 0xDF, /* SEL - Check Digit Code 99 Enable */ - /* Reserved 0xE0 - 0xEF */ - kHIDUsage_BCS_TransmitCheckDigit = 0xF0, /* NArry - Transmit Check Digit */ - kHIDUsage_BCS_DisableCheckDigitTransmit = 0xF1, /* SEL - Disable Check Digit Transmit */ - kHIDUsage_BCS_EnableCheckDigitTransmit = 0xF2, /* SEL - Enable Check Digit Transmit */ - /* Reserved 0xF3 - 0xFA */ - kHIDUsage_BCS_SymbologyIdentifier1 = 0xFB, /* DV - Symbology Identifier 1 */ - kHIDUsage_BCS_SymbologyIdentifier2 = 0xFC, /* DV - Symbology Identifier 2 */ - kHIDUsage_BCS_SymbologyIdentifier3 = 0xFD, /* DV - Symbology Identifier 3 */ - kHIDUsage_BCS_DecodedData = 0xFE, /* DV - Decoded Data */ - kHIDUsage_BCS_DecodeDataContinued = 0xFF, /* DF - Decode Data Continued */ - kHIDUsage_BCS_BarSpaceData = 0x100, /* DV - Bar Space Data */ - kHIDUsage_BCS_ScannerDataAccuracy = 0x101, /* DV - Scanner Data Accuracy */ - kHIDUsage_BCS_RawDataPolarity = 0x102, /* NArry - Raw Data Polarity */ - kHIDUsage_BCS_PolarityInvertedBarCode = 0x103, /* SEL - Polarity Inverted Bar Code */ - kHIDUsage_BCS_PolarityNormalBarCode = 0x103, /* SEL - Polarity Normal Bar Code */ - /* Reserved 0x105 */ - kHIDUsage_BCS_MinimumLengthToDecode = 0x106, /* DV - Minimum Length to Decode */ - kHIDUsage_BCS_MaximumLengthToDecode = 0x107, /* DV - Maximum Length to Decode */ - kHIDUsage_BCS_FirstDiscreteLengthToDecode = 0x108, /* DV - First Discrete Length to Decode */ - kHIDUsage_BCS_SecondDiscreteLengthToDecode = 0x109, /* DV - Second Discrete Length to Decode */ - kHIDUsage_BCS_DataLengthMethod = 0x10A, /* NArry - Data Length Method */ - kHIDUsage_BCS_DLMethodReadAny = 0x10B, /* DF - DL Method Read any */ - kHIDUsage_BCS_DLMethodCheckInRange = 0x10C, /* DF - DL Method Check in Range */ - kHIDUsage_BCS_DLMethodCheckForDiscrete = 0x10D, /* DF - DL Method Check for Discrete */ - /* Reserved 0x10E - 0x10F */ - kHIDUsage_BCS_AztecCode = 0x110, /* DF - Aztec Code */ - kHIDUsage_BCS_BC412 = 0x111, /* DF - BC412 */ - kHIDUsage_BCS_ChannelCode = 0x112, /* DF - Channel Code */ - kHIDUsage_BCS_Code16 = 0x113, /* DF - Code 16 */ - kHIDUsage_BCS_Code32 = 0x114, /* DF - Code 32 */ - kHIDUsage_BCS_Code49 = 0x115, /* DF - Code 49 */ - kHIDUsage_BCS_CodeOne = 0x116, /* DF - Code One */ - kHIDUsage_BCS_Colorcode = 0x117, /* DF - Colorcode */ - kHIDUsage_BCS_DataMatrix = 0x118, /* DF - Data Matrix */ - kHIDUsage_BCS_MaxiCode = 0x119, /* DF - MaxiCode */ - kHIDUsage_BCS_MicroPDF = 0x11A, /* DF - MicroPDF */ - kHIDUsage_BCS_PDF_417 = 0x11B, /* DF - PDF-417 */ - kHIDUsage_BCS_PosiCode = 0x11C, /* DF - PosiCode */ - kHIDUsage_BCS_QRCode = 0x11D, /* DF - QR Code */ - kHIDUsage_BCS_SuperCode = 0x11E, /* DF - SuperCode */ - kHIDUsage_BCS_UltraCode = 0x11F, /* DF - UltraCode */ - kHIDUsage_BCS_USB_5_SlugCode = 0x120, /* DF - USD-5 (Slug Code) */ - kHIDUsage_BCS_VeriCode = 0x121 /* DF - VeriCode */ - /* Reserved 0x122 - 0xFFFF */ -}; - -/* Weighing Devices Page (0x8D) */ -/* This section provides detailed descriptions of the usages employed by Weighing Devices. */ -enum -{ - kHIDUsage_WD_Undefined = 0x00, /* Weighing Device Undefined Usage */ - kHIDUsage_WD_WeighingDevice = 0x01, /* CA - Weighing Device */ - /* Reserved 0x02 - 0x1F */ - kHIDUsage_WD_ScaleScaleDevice = 0x20, /* CL - Scale Device */ - kHIDUsage_WD_ScaleScaleClassIMetricCL = 0x21, /* CL - Scale Class I Metric */ - kHIDUsage_WD_ScaleScaleClassIMetric = 0x22, /* SEL - Scale Class I Metric */ - kHIDUsage_WD_ScaleScaleClassIIMetric = 0x23, /* SEL - Scale Class II Metric */ - kHIDUsage_WD_ScaleScaleClassIIIMetric = 0x24, /* SEL - Scale Class III Metric */ - kHIDUsage_WD_ScaleScaleClassIIILMetric = 0x25, /* SEL - Scale Class IIIL Metric */ - kHIDUsage_WD_ScaleScaleClassIVMetric = 0x26, /* SEL - Scale Class IV Metric */ - kHIDUsage_WD_ScaleScaleClassIIIEnglish = 0x27, /* SEL - Scale Class III English */ - kHIDUsage_WD_ScaleScaleClassIIILEnglish = 0x28, /* SEL - Scale Class IIIL English */ - kHIDUsage_WD_ScaleScaleClassIVEnglish = 0x29, /* SEL - Scale Class IV English */ - kHIDUsage_WD_ScaleScaleClassGeneric = 0x2A, /* SEL - Scale Class Generic */ - /* Reserved 0x2B - 0x2F */ - kHIDUsage_WD_ScaleAtrributeReport = 0x30, /* CL - Scale Attribute Report */ - kHIDUsage_WD_ScaleControlReport = 0x31, /* CL - Scale Control Report */ - kHIDUsage_WD_ScaleDataReport = 0x32, /* CL - Scale Data Report */ - kHIDUsage_WD_ScaleStatusReport = 0x33, /* CL - Scale Status Report */ - kHIDUsage_WD_ScaleWeightLimitReport = 0x34, /* CL - Scale Weight Limit Report */ - kHIDUsage_WD_ScaleStatisticsReport = 0x35, /* CL - Scale Statistics Report */ - /* Reserved 0x36 - 0x3F */ - kHIDUsage_WD_DataWeight = 0x40, /* DV - Data Weight */ - kHIDUsage_WD_DataScaling = 0x41, /* DV - Data Scaling */ - /* Reserved 0x42 - 0x4F */ - kHIDUsage_WD_WeightUnit = 0x50, /* CL - Weight Unit */ - kHIDUsage_WD_WeightUnitMilligram = 0x51, /* SEL - Weight Unit Milligram */ - kHIDUsage_WD_WeightUnitGram = 0x52, /* SEL - Weight Unit Gram */ - kHIDUsage_WD_WeightUnitKilogram = 0x53, /* SEL - Weight Unit Kilogram */ - kHIDUsage_WD_WeightUnitCarats = 0x54, /* SEL - Weight Unit Carats */ - kHIDUsage_WD_WeightUnitTaels = 0x55, /* SEL - Weight Unit Taels */ - kHIDUsage_WD_WeightUnitGrains = 0x56, /* SEL - Weight Unit Grains */ - kHIDUsage_WD_WeightUnitPennyweights = 0x57, /* SEL - Weight Unit Pennyweights */ - kHIDUsage_WD_WeightUnitMetricTon = 0x58, /* SEL - Weight Unit Metric Ton */ - kHIDUsage_WD_WeightUnitAvoirTon = 0x59, /* SEL - Weight Unit Avoir Ton */ - kHIDUsage_WD_WeightUnitTroyOunce = 0x5A, /* SEL - Weight Unit Troy Ounce */ - kHIDUsage_WD_WeightUnitOunce = 0x5B, /* SEL - Weight Unit Ounce */ - kHIDUsage_WD_WeightUnitPound = 0x5C, /* SEL - Weight Unit Pound */ - /* Reserved 0x5D - 0x5F */ - kHIDUsage_WD_CalibrationCount = 0x60, /* DV - Calibration Count */ - kHIDUsage_WD_RezeroCount = 0x61, /* DV - Re-Zero Count*/ - /* Reserved 0x62 - 0x6F */ - kHIDUsage_WD_ScaleStatus = 0x70, /* CL - Scale Status */ - kHIDUsage_WD_ScaleStatusFault = 0x71, /* SEL - Scale Status Fault */ - kHIDUsage_WD_ScaleStatusStableAtZero = 0x72, /* SEL - Scale Status Stable at Center of Zero */ - kHIDUsage_WD_ScaleStatusInMotion = 0x73, /* SEL - Scale Status In Motion */ - kHIDUsage_WD_ScaleStatusWeightStable = 0x74, /* SEL - Scale Status Weight Stable */ - kHIDUsage_WD_ScaleStatusUnderZero = 0x75, /* SEL - Scale Status Under Zero */ - kHIDUsage_WD_ScaleStatusOverWeightLimit = 0x76, /* SEL - Scale Status Over Weight Limit */ - kHIDUsage_WD_ScaleStatusRequiresCalibration = 0x77, /* SEL - Scale Status Requires Calibration */ - kHIDUsage_WD_ScaleStatusRequiresRezeroing = 0x78, /* SEL - Scale Status Requires Re-zeroing */ - /* Reserved 0x79 - 0x7F */ - kHIDUsage_WD_ZeroScale = 0x80, /* OOC - Zero Scale */ - kHIDUsage_WD_EnforcedZeroReturn = 0x81 /* OOC - Enforced Zero Return */ - /* Reserved 0x82 - 0xFFFF */ - -}; - -/* Magnetic Stripe Reader Page (0x8E) */ -/* This section provides detailed descriptions of the usages employed by Magnetic Stripe Reader Devices. */ -enum -{ - kHIDUsage_MSR_Undefined = 0x00, /* MagStripe Undefined Usage */ - kHIDUsage_MSR_DeviceReadOnly = 0x01, /* CA - MSR Device Read-Only */ - /* Reserved 0x02 - 0x10 */ - kHIDUsage_MSR_Track1Length = 0x11, /* SF, DF, SEL - Track 1 Length */ - kHIDUsage_MSR_Track2Length = 0x12, /* SF, DF, SEL - Track 2 Length */ - kHIDUsage_MSR_Track3Length = 0x13, /* SF, DF, SEL - Track 3 Length */ - kHIDUsage_MSR_TrackJISLength = 0x14, /* SF, DF, SEL - Track JIS Length */ - /* Reserved 0x15 - 0x1F */ - kHIDUsage_MSR_TrackData = 0x20, /* SF, DF, SEL - Track Data */ - kHIDUsage_MSR_Track1Data = 0x21, /* SF, DF, SEL - Track 1 Data */ - kHIDUsage_MSR_Track2Data = 0x22, /* SF, DF, SEL - Track 2 Data */ - kHIDUsage_MSR_Track3Data = 0x23, /* SF, DF, SEL - Track 3 Data */ - kHIDUsage_MSR_TrackJISData = 0x24 /* SF, DF, SEL - Track JIS Data */ - /* Reserved 0x25 - 0xFFFF */ -}; - -#endif /* _IOHIDUSAGETABLES_H */ diff --git a/i386/include/IOKit/hidevent/IOHIDEventDriver.h b/i386/include/IOKit/hidevent/IOHIDEventDriver.h deleted file mode 100644 index 9eddb24..0000000 --- a/i386/include/IOKit/hidevent/IOHIDEventDriver.h +++ /dev/null @@ -1,171 +0,0 @@ -/* - * - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_HID_IOHIDEVENTDRIVER_H -#define _IOKIT_HID_IOHIDEVENTDRIVER_H - -#include <IOKit/IOService.h> -#include <IOKit/hidsystem/IOHIDTypes.h> -#include <IOKit/hid/IOHIDInterface.h> -#include <IOKit/hidevent/IOHIDEventService.h> - - -/*! @class IOHIDEventDriver : public IOHIDEventService - @abstract - @discussion -*/ -struct IOHIDReportHandler; - -class IOHIDEventDriver: public IOHIDEventService -{ - OSDeclareDefaultStructors( IOHIDEventDriver ) - -private: - IOHIDInterface * _interface; - IOHIDReportHandler * _reportHandlers; - - IOHIDElement * _ledElements[2]; - OSArray * _supportedElements; - - UInt32 _bootSupport; - bool _multipleReports; - bool _relativeButtonCollection; - UInt32 _cachedButtonState; - bool _cachedRangeState; - - struct ExpansionData { - }; - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * _reserved; - - bool findElements ( OSArray * elementArray, UInt32 bootProtocol ); - - bool storeReportElement ( IOHIDElement * element ); - - void handleBootPointingReport ( - IOMemoryDescriptor * report, - SInt32 * dX, - SInt32 * dY, - UInt32 * buttonState); - - static void _handleInterruptReport ( - OSObject * target, - AbsoluteTime timeStamp, - IOMemoryDescriptor * report, - IOHIDReportType reportType, - UInt32 reportID, - void * refcon); - -protected: - - virtual void free(); - - virtual OSArray * getReportElements(); - - virtual bool handleStart( IOService * provider ); - - virtual void handleStop( IOService * provider ); - - virtual void handleInterruptReport ( - AbsoluteTime timeStamp, - IOMemoryDescriptor * report, - IOHIDReportType reportType, - UInt32 reportID); - - virtual OSString * getTransport (); - - virtual UInt32 getLocationID (); - - virtual UInt32 getVendorID (); - - virtual UInt32 getVendorIDSource (); - - virtual UInt32 getProductID (); - - virtual UInt32 getVersion (); - - virtual UInt32 getCountryCode (); - - virtual OSString * getManufacturer (); - - virtual OSString * getProduct (); - - virtual OSString * getSerialNumber (); - - virtual void setElementValue ( - UInt32 usagePage, - UInt32 usage, - UInt32 value ); - - virtual UInt32 getElementValue ( - UInt32 usagePage, - UInt32 usage ); - -public: - - - virtual bool init( OSDictionary * dictionary = 0 ); - - virtual bool didTerminate( - IOService * provider, - IOOptionBits options, - bool * defer ); - - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 0); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 1); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 2); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 3); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 4); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 5); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 6); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 7); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 8); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 9); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 10); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 11); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 12); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 13); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 14); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 15); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 16); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 17); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 18); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 19); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 20); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 21); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 22); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 23); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 24); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 25); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 26); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 27); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 28); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 29); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 30); - OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 31); - -}; - -#endif /* !_IOKIT_HID_IOHIDEVENTDRIVER_H */ diff --git a/i386/include/IOKit/hidevent/IOHIDEventService.h b/i386/include/IOKit/hidevent/IOHIDEventService.h deleted file mode 100644 index bc82511..0000000 --- a/i386/include/IOKit/hidevent/IOHIDEventService.h +++ /dev/null @@ -1,394 +0,0 @@ -/* - * - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2009 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_HID_IOHIDEVENTSERVICE_H -#define _IOKIT_HID_IOHIDEVENTSERVICE_H - -#include <TargetConditionals.h> - -#include <IOKit/IOService.h> -#include <IOKit/IOWorkLoop.h> -#include <IOKit/IOTimerEventSource.h> -#include <IOKit/hidsystem/IOHIDTypes.h> -#include <IOKit/hid/IOHIDInterface.h> -#include <IOKit/hid/IOHIDElement.h> -#include <IOKit/hid/IOHIDKeys.h> - -#if TARGET_OS_EMBEDDED - #include <IOKit/hid/IOHIDEvent.h> -#endif - -enum -{ - kHIDDispatchOptionPointerNoAcceleration = 0x01, - kHIDDispatchOptionPointerAffixToScreen = 0x02, - kHIDDispatchOptionPointerAbsolutToRelative = 0x04 -}; - -enum -{ - kHIDDispatchOptionScrollNoAcceleration = 0x01, - kHIDDispatchOptionScrollMomentumContinue = 0x02, - kHIDDispatchOptionScrollMomentumStart = 0x04, - kHIDDispatchOptionScrollMomentumEnd = 0x08, - - kHIDDispatchOptionScrollMomentumAny = kHIDDispatchOptionScrollMomentumContinue | kHIDDispatchOptionScrollMomentumStart | kHIDDispatchOptionScrollMomentumEnd -}; - -enum -{ - kHIDDispatchOptionKeyboardNoRepeat = 0x01 -}; - -/*! @class IOHIDEventService : public IOService - @abstract - @discussion -*/ -class IOHIDPointing; -class IOHIDKeyboard; -class IOHIDConsumer; -struct TransducerData; - -class IOHIDEventService: public IOService -{ - OSDeclareAbstractStructors( IOHIDEventService ) - - friend class IOHIDPointing; - friend class IOHIDKeyboard; - friend class IOHIDConsumer; - friend class AppleEmbeddedKeyboard; - friend class IOHIDEventServiceUserClient; - -private: - IOHIDKeyboard * _keyboardNub; - IOHIDPointing * _pointingNub; - IOHIDConsumer * _consumerNub; - - IONotifier * _publishNotify; - IORecursiveLock * _nubLock; - - OSArray * _transducerDataArray; - - bool _readyForInputReports; - - - struct ExpansionData { - IOService * provider; - IOWorkLoop * workLoop; - UInt32 ejectDelayMS; - IOTimerEventSource * ejectTimerEventSource; - UInt32 ejectState; - IOOptionBits ejectOptions; - UInt32 capsDelayMS; - IOTimerEventSource * capsTimerEventSource; - UInt32 capsState; - IOOptionBits capsOptions; - OSArray * deviceUsagePairs; - -#if TARGET_OS_EMBEDDED - OSDictionary * clientDict; - UInt32 debuggerMask; - UInt32 startDebuggerMask; - IOTimerEventSource * debuggerTimerEventSource; - bool shouldSwapISO; -#endif - }; - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * _reserved; - - IOHIDPointing * newPointingShim ( - UInt32 buttonCount = 1, - IOFixed pointerResolution = (400 << 16), - IOFixed scrollResolution = 0, - IOOptionBits options = 0 ); - - IOHIDKeyboard * newKeyboardShim ( - UInt32 supportedModifiers = 0, - IOOptionBits options = 0 ); - - IOHIDConsumer * newConsumerShim ( IOOptionBits options = 0 ); - - void parseSupportedElements ( - OSArray * elementArray, - UInt32 bootProtocol ); - - void processTabletElement ( IOHIDElement * element ); - - void processTransducerData (); - - TransducerData * createTransducerData ( UInt32 tranducerID ); - - TransducerData * getTransducerData ( UInt32 tranducerID ); - - IOFixed determineResolution ( IOHIDElement * element ); - - static bool _publishMatchingNotificationHandler(void * target, void * ref, IOService * newService, IONotifier * notifier); - - void ejectTimerCallback(IOTimerEventSource *sender); - - void capsTimerCallback(IOTimerEventSource *sender); - -#if TARGET_OS_EMBEDDED - void debuggerTimerCallback(IOTimerEventSource *sender); -#endif - void calculateCapsLockDelay(); - - void calculateStandardType(); - -protected: - - virtual void free(); - -/*! @function handleOpen - @abstract Handle a client open on the interface. - @discussion This method is called by IOService::open() with the - arbitration lock held, and must return true to accept the client open. - This method will in turn call handleClientOpen() to qualify the client - requesting the open. - @param client The client object that requested the open. - @param options Options passed to IOService::open(). - @param argument Argument passed to IOService::open(). - @result true to accept the client open, false otherwise. */ - - virtual bool handleOpen(IOService * client, - IOOptionBits options, - void * argument); - -/*! @function handleClose - @abstract Handle a client close on the interface. - @discussion This method is called by IOService::close() with the - arbitration lock held. This method will in turn call handleClientClose() - to notify interested subclasses about the client close. If this represents - the last close, then the interface will also close the controller before - this method returns. The controllerWillClose() method will be called before - closing the controller. Subclasses should not override this method. - @param client The client object that requested the close. - @param options Options passed to IOService::close(). */ - - virtual void handleClose(IOService * client, IOOptionBits options); - -/*! @function handleIsOpen - @abstract Query whether a client has an open on the interface. - @discussion This method is always called by IOService with the - arbitration lock held. Subclasses should not override this method. - @result true if the specified client, or any client if none (0) is - specified, presently has an open on this object. */ - - virtual bool handleIsOpen(const IOService * client) const; - -/*! @function handleStart - @abstract Prepare the hardware and driver to support I/O operations. - @discussion IOHIDEventService will call this method from start() before - any I/O operations are issued to the concrete subclass. Methods - such as getReportElements() are only called after handleStart() - has returned true. A subclass that overrides this method should - begin its implementation by calling the version in super, and - then check the return value. - @param provider The provider argument passed to start(). - @result True on success, or false otherwise. Returning false will - cause start() to fail and return false. */ - - virtual bool handleStart( IOService * provider ); - -/*! @function handleStop - @abstract Quiesce the hardware and stop the driver. - @discussion IOHIDEventService will call this method from stop() to - signal that the hardware should be quiesced and the driver stopped. - A subclass that overrides this method should end its implementation - by calling the version in super. - @param provider The provider argument passed to stop(). */ - - virtual void handleStop( IOService * provider ); - - virtual OSString * getTransport (); - virtual UInt32 getLocationID (); - virtual UInt32 getVendorID (); - virtual UInt32 getVendorIDSource (); - virtual UInt32 getProductID (); - virtual UInt32 getVersion (); - virtual UInt32 getCountryCode (); - virtual OSString * getManufacturer (); - virtual OSString * getProduct (); - virtual OSString * getSerialNumber (); - - virtual OSArray * getReportElements(); - - virtual void setElementValue ( - UInt32 usagePage, - UInt32 usage, - UInt32 value ); - - virtual UInt32 getElementValue ( - UInt32 usagePage, - UInt32 usage ); - - virtual void dispatchKeyboardEvent( - AbsoluteTime timeStamp, - UInt32 usagePage, - UInt32 usage, - UInt32 value, - IOOptionBits options = 0 ); - - virtual void dispatchRelativePointerEvent( - AbsoluteTime timeStamp, - SInt32 dx, - SInt32 dy, - UInt32 buttonState, - IOOptionBits options = 0 ); - - virtual void dispatchAbsolutePointerEvent( - AbsoluteTime timeStamp, - SInt32 x, - SInt32 y, - IOGBounds * bounds, - UInt32 buttonState, - bool inRange, - SInt32 tipPressure, - SInt32 tipPressureMin, - SInt32 tipPressureMax, - IOOptionBits options = 0 ); - - virtual void dispatchScrollWheelEvent( - AbsoluteTime timeStamp, - SInt32 deltaAxis1, - SInt32 deltaAxis2, - SInt32 deltaAxis3, - IOOptionBits options = 0 ); - - virtual void dispatchTabletPointerEvent( - AbsoluteTime timeStamp, - UInt32 tranducerID, - SInt32 x, - SInt32 y, - SInt32 z, - IOGBounds * bounds, - UInt32 buttonState, - SInt32 tipPressure, - SInt32 tipPressureMin, - SInt32 tipPressureMax, - SInt32 barrelPressure, - SInt32 barrelPressureMin, - SInt32 barrelPressureMax, - SInt32 tiltX, - SInt32 tiltY, - UInt32 twist, - IOOptionBits options = 0 ); - - virtual void dispatchTabletProximityEvent( - AbsoluteTime timeStamp, - UInt32 tranducerID, - bool inRange, - bool invert, - UInt32 vendorTransducerUniqueID = 0, - UInt32 vendorTransducerSerialNumber = 0, - IOOptionBits options = 0 ); - -public: - bool readyForReports(); - - virtual bool init(OSDictionary * properties = 0); - - virtual bool start( IOService * provider ); - - virtual void stop( IOService * provider ); - - virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); - - virtual IOReturn setSystemProperties( OSDictionary * properties ); - - virtual IOReturn setProperties( OSObject * properties ); - -protected: - OSMetaClassDeclareReservedUsed(IOHIDEventService, 0); - virtual OSArray * getDeviceUsagePairs(); - - -#if TARGET_OS_EMBEDDED -public: - typedef void (*Action)(OSObject *target, OSObject * sender, void *context, OSObject *event, IOOptionBits options); - - OSMetaClassDeclareReservedUsed(IOHIDEventService, 1); - virtual bool open( - IOService * client, - IOOptionBits options, - void * context, - Action action); - -protected: - OSMetaClassDeclareReservedUsed(IOHIDEventService, 2); - virtual void dispatchEvent(IOHIDEvent * event, IOOptionBits options=0); - - OSMetaClassDeclareReservedUsed(IOHIDEventService, 3); - virtual UInt32 getPrimaryUsagePage(); - - OSMetaClassDeclareReservedUsed(IOHIDEventService, 4); - virtual UInt32 getPrimaryUsage(); - - OSMetaClassDeclareReservedUsed(IOHIDEventService, 5); - virtual UInt32 getReportInterval(); - -public: - OSMetaClassDeclareReservedUsed(IOHIDEventService, 6); - virtual IOHIDEvent * copyEvent( - IOHIDEventType type, - IOHIDEvent * matching = 0, - IOOptionBits options = 0); -#else - OSMetaClassDeclareReservedUnused(IOHIDEventService, 1); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 2); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 3); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 4); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 5); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 6); -#endif - OSMetaClassDeclareReservedUnused(IOHIDEventService, 7); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 8); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 9); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 10); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 11); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 12); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 13); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 14); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 15); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 16); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 17); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 18); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 19); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 20); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 21); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 22); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 23); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 24); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 25); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 26); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 27); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 28); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 29); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 30); - OSMetaClassDeclareReservedUnused(IOHIDEventService, 31); - -}; - -#endif /* !_IOKIT_HID_IOHIDEVENTSERVICE_H */ diff --git a/i386/include/IOKit/hidsystem/IOHIDDescriptorParser.h b/i386/include/IOKit/hidsystem/IOHIDDescriptorParser.h deleted file mode 100644 index 0a32647..0000000 --- a/i386/include/IOKit/hidsystem/IOHIDDescriptorParser.h +++ /dev/null @@ -1,939 +0,0 @@ -/* - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef __IOHIDDescriptorParser__ -#define __IOHIDDescriptorParser__ - -#include <TargetConditionals.h> -#include <IOKit/IOTypes.h> -#include <IOKit/hidsystem/IOHIDUsageTables.h> -#if !TARGET_OS_EMBEDDED - #include <IOKit/ndrvsupport/IOMacOSTypes.h> -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#if TARGET_OS_EMBEDDED -/* Types and enums required by these functions but not in IOTypes.h */ - -typedef UInt8 Byte; -typedef SInt8 SignedByte; -typedef unsigned long FourCharCode; -typedef FourCharCode OSType; -typedef UInt32 ByteCount; - -enum { - noErr = 0 -}; -#endif - -/* End missing types and enums */ - -enum -{ - kHIDSuccess = 0, - -/* HID assigned error numbers are -13949 .. -13900 */ - kHIDBaseError = -13950, - - kHIDNullStateErr, - kHIDBufferTooSmallErr, - kHIDValueOutOfRangeErr, - kHIDUsageNotFoundErr, - kHIDNotValueArrayErr, - kHIDInvalidPreparsedDataErr, - kHIDIncompatibleReportErr, - kHIDBadLogPhysValuesErr, - kHIDInvalidReportTypeErr, - kHIDInvalidReportLengthErr, - kHIDNullPointerErr, - kHIDBadParameterErr, - kHIDNotEnoughMemoryErr, - kHIDEndOfDescriptorErr, - kHIDUsagePageZeroErr, - kHIDBadLogicalMinimumErr, - kHIDBadLogicalMaximumErr, - kHIDInvertedLogicalRangeErr, - kHIDInvertedPhysicalRangeErr, - kHIDUnmatchedUsageRangeErr, - kHIDInvertedUsageRangeErr, - kHIDUnmatchedStringRangeErr, - kHIDUnmatchedDesignatorRangeErr, - kHIDReportSizeZeroErr, - kHIDReportCountZeroErr, - kHIDReportIDZeroErr, - kHIDInvalidRangePageErr, - - // - // HID device driver errors - // - - kHIDDeviceNotReady = -13910, // The device is still initializing, try again later - kHIDVersionIncompatibleErr, -}; - -// types of HID reports (input, output, feature) -enum -{ - kHIDInputReport = 1, - kHIDOutputReport, - kHIDFeatureReport, - kHIDUnknownReport = 255 -}; - -// flags passed to HIDOpenReportDescriptor -enum -{ - kHIDFlag_StrictErrorChecking = 0x00000001 -}; - -typedef UInt32 HIDReportType; -typedef UInt32 HIDUsage; - -typedef void *HIDPreparsedDataRef; - -/*! - @typedef HIDUsageAndPage - @abstract The HIDUsageAndPage data structure is used by HID clients when obtaining status of buttons to hold the usage page and usage of a button that is down. - @discussion Clients use the HIDUSageAndPage structure with the HIDGetButtonsEx function to obtain both the usage page and usage identifiers of each button that is down. - @field usage Specifies the usage identifier within the usage page specified by usagePage of a button that is down. - @field usagePage Specifies the usage page identifier of a button that is down. - */ -struct HIDUsageAndPage -{ - HIDUsage usage; - HIDUsage usagePage; -}; -typedef struct HIDUsageAndPage HIDUsageAndPage, *HIDUsageAndPagePtr; - -/*! - @typedef HIDCaps - @abstract The HIDCaps data structure is used by HID clients to hold the capabilities of a HID device. - @discussion This structure holds the parsed capabilities and data maximums returned for a device by the HIDGetCaps function. - @field usage Specifies the specific class of functionality that this device provides. This value is dependent and specific to the value provided in the usagePage field. For example, a keyboard could have a usagePage of kHIDUsagePage_Generic and a usage of kHIDUsage_Generic_Keyboard. - @field usagePage Specifies the usage page identifier for this top level collection. - @field inputReportByteLength Specifies the maximum length, in bytes, of an input report for this device, including the report ID which is unilaterally prepended to the device data. - @field outputReportByteLength Specifies the maximum length, in bytes, of an output report for this device, including the report ID which is unilaterally prepended to the device data. - @field featureReportByteLength Specifies the maximum length, in bytes, of a feature report for this device, including the report ID which is unilaterally prepended to the device data. - @field numberCollectionNodes Specifies the number of HIDCollectionNode structures that are returned for this top level collection by the HIDGetConnectionNodes function. - @field numberInputButtonCaps Specifies the number of input buttons. - @field numberInputValueCaps Specifies the number of input values. - @field numberOutputButtonCaps Specifies the number of output buttons. - @field numberOutputValueCaps Specifies the number of output values - @field numberFeatureButtonCaps Specifies the number of feature buttons. - @field numberFeatureValueCaps Specifies the number of feature values. - */ -struct HIDCaps -{ - HIDUsage usage; - HIDUsage usagePage; - ByteCount inputReportByteLength; - ByteCount outputReportByteLength; - ByteCount featureReportByteLength; - UInt32 numberCollectionNodes; - UInt32 numberInputButtonCaps; - UInt32 numberInputValueCaps; - UInt32 numberOutputButtonCaps; - UInt32 numberOutputValueCaps; - UInt32 numberFeatureButtonCaps; - UInt32 numberFeatureValueCaps; -}; -typedef struct HIDCaps HIDCaps, * HIDCapsPtr; - -struct HIDCapabilities { - HIDUsage usage; - HIDUsage usagePage; - ByteCount inputReportByteLength; - ByteCount outputReportByteLength; - ByteCount featureReportByteLength; - UInt32 numberCollectionNodes; - UInt32 numberInputButtonCaps; - UInt32 numberInputValueCaps; - UInt32 numberOutputButtonCaps; - UInt32 numberOutputValueCaps; - UInt32 numberFeatureButtonCaps; - UInt32 numberFeatureValueCaps; -}; -typedef struct HIDCapabilities HIDCapabilities, * HIDCapabilitiesPtr; - - -struct HIDCollectionNode -{ - HIDUsage collectionUsage; - HIDUsage collectionUsagePage; - UInt32 parent; - UInt32 numberOfChildren; - UInt32 nextSibling; - UInt32 firstChild; -}; -typedef struct HIDCollectionNode HIDCollectionNode, * HIDCollectionNodePtr; - -struct HIDButtonCaps -{ - HIDUsage usagePage; - UInt32 reportID; - UInt32 bitField; - UInt32 collection; - HIDUsage collectionUsage; - HIDUsage collectionUsagePage; - Boolean isRange; - Boolean isStringRange; - Boolean isDesignatorRange; - Boolean isAbsolute; - SInt32 startBit; // Added esb 9-29-99 - - union - { - struct - { - HIDUsage usageMin; - HIDUsage usageMax; - UInt32 stringMin; - UInt32 stringMax; - UInt32 designatorMin; - UInt32 designatorMax; - } range; - struct - { - HIDUsage usage; - HIDUsage reserved1; - UInt32 stringIndex; - UInt32 reserved2; - UInt32 designatorIndex; - UInt32 reserved3; - } notRange; - } u; -}; -typedef struct HIDButtonCaps HIDButtonCaps, * HIDButtonCapsPtr; - -struct HIDButtonCapabilities -{ - HIDUsage usagePage; - UInt32 reportID; - UInt32 bitField; - UInt32 collection; - HIDUsage collectionUsage; - HIDUsage collectionUsagePage; - Boolean isRange; - Boolean isStringRange; - Boolean isDesignatorRange; - Boolean isAbsolute; - - SInt32 unitExponent; // Added KH 1/25/01 - SInt32 units; // Added KH 1/25/01 -// UInt32 reserved; // Not added KH 1/25/01 - SInt32 startBit; // Added esb 9-29-99 - UInt32 pbVersion; // Added KH 1/25/01 - - union - { - struct - { - HIDUsage usageMin; - HIDUsage usageMax; - UInt32 stringMin; - UInt32 stringMax; - UInt32 designatorMin; - UInt32 designatorMax; - } range; - struct - { - HIDUsage usage; - HIDUsage reserved1; - UInt32 stringIndex; - UInt32 reserved2; - UInt32 designatorIndex; - UInt32 reserved3; - } notRange; - } u; -}; -typedef struct HIDButtonCapabilities HIDButtonCapabilities, * HIDButtonCapabilitiesPtr; - -struct HIDValueCaps -{ - HIDUsage usagePage; - UInt32 reportID; - UInt32 bitField; - UInt32 collection; - HIDUsage collectionUsage; - HIDUsage collectionUsagePage; - - Boolean isRange; - Boolean isStringRange; - Boolean isDesignatorRange; - Boolean isAbsolute; - - UInt32 startBit; // Added by esb 9-28-99 - UInt32 bitSize; - UInt32 reportCount; - - SInt32 logicalMin; - SInt32 logicalMax; - SInt32 physicalMin; - SInt32 physicalMax; - - union - { - struct - { - HIDUsage usageMin; - HIDUsage usageMax; - UInt32 stringMin; - UInt32 stringMax; - UInt32 designatorMin; - UInt32 designatorMax; - } range; - struct - { - HIDUsage usage; - HIDUsage reserved1; - UInt32 stringIndex; - UInt32 reserved2; - UInt32 designatorIndex; - UInt32 reserved3; - } notRange; - } u; -}; -typedef struct HIDValueCaps HIDValueCaps, * HIDValueCapsPtr; - -struct HIDValueCapabilities -{ - HIDUsage usagePage; - UInt32 reportID; - UInt32 bitField; - UInt32 collection; - HIDUsage collectionUsage; - HIDUsage collectionUsagePage; - - Boolean isRange; - Boolean isStringRange; - Boolean isDesignatorRange; - Boolean isAbsolute; - - UInt32 bitSize; - UInt32 reportCount; - - SInt32 logicalMin; - SInt32 logicalMax; - SInt32 physicalMin; - SInt32 physicalMax; - - SInt32 unitExponent; // Added KH 1/25/01 - SInt32 units; // Added KH 1/25/01 -// UInt32 reserved; // Not added KH 1/25/01 - SInt32 startBit; // Added esb 9-29-99 // Moved here KH 1/25/01 - UInt32 pbVersion; // Added KH 1/25/01 - - union - { - struct - { - HIDUsage usageMin; - HIDUsage usageMax; - UInt32 stringMin; - UInt32 stringMax; - UInt32 designatorMin; - UInt32 designatorMax; - } range; - struct - { - HIDUsage usage; - HIDUsage reserved1; - UInt32 stringIndex; - UInt32 reserved2; - UInt32 designatorIndex; - UInt32 reserved3; - } notRange; - } u; -}; -typedef struct HIDValueCapabilities HIDValueCapabilities, * HIDValueCapabilitiesPtr; - -/*! - @function HIDOpenReportDescriptor - @abstract The HIDOpenReportDescriptor function allocates the memory the parser needs to handle the given report descriptor, and then parses the report descriptor. - @discussion When the parsed information is no longer needed, clients should call the HIDCloseReportDescriptor function. - @param hidReportDescriptor Contains a pointer to the actual HID report descriptor from the USB device's firmware - @param descriptorLength The length of the HID report descriptor - @param preparsedDataRef Preparsed data reference to be used for subsequent function calls - @param flags Flags for this runction are kHIDFlag_StrictErrorChecking = 0x00000001 - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDOpenReportDescriptor (void * hidReportDescriptor, - ByteCount descriptorLength, - HIDPreparsedDataRef * preparsedDataRef, - UInt32 flags); - -/*! - @function HIDCloseReportDescriptor - @abstract Disposes of the memory the parser allocated for the HIDOpenReportDescriptor function. - @param hidReportDescriptor Contains a pointer to the actual HID report descriptor from the USB device's firmware - @param preparsedDataRef Preparsed data reference for the report that is returned by the HIDOpenReportDescriptor function. After making a call to the HIDCloseReportDescriptor function, the preparsedDataRef is invalid and should not be used. - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDCloseReportDescriptor (HIDPreparsedDataRef preparsedDataRef); - -/*! - @function HIDGetButtonCaps - @abstract Returns the button capabilities structures for a HID device based on the given preparsed data. - @param reportType Specifies the type of report for which to retrieve the scaled value. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport - @param buttonCaps Points to a caller-allocated buffer that will contain, on return, an array of HIDButtonCaps structures. The structures contain information for all buttons that meet the search criteria - @param buttonCapsSize Contains the size of the buttonCaps array passed in to the function and is set to the number of elements actually placed in the array after the call completes. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDGetButtonCaps (HIDReportType reportType, - HIDButtonCapsPtr buttonCaps, - UInt32 * buttonCapsSize, - HIDPreparsedDataRef preparsedDataRef); - -/*! - @function HIDGetButtonCapabilities - @abstract Returns the button capabilities structures for a HID device based on the given preparsed data. - @param reportType Specifies the type of report for which to retrieve the scaled value. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport - @param buttonCaps Points to a caller-allocated buffer that will contain, on return, an array of HIDButtonCapabilities structures. The structures contain information for all buttons that meet the search criteria - @param buttonCapsSize Contains the size of the buttonCaps array passed in to the function and is set to the number of elements actually placed in the array after the call completes. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDGetButtonCapabilities (HIDReportType reportType, - HIDButtonCapabilitiesPtr buttonCaps, - UInt32 * buttonCapsSize, - HIDPreparsedDataRef preparsedDataRef); - -/*! - @function HIDGetCaps - @abstract Returns the capabilities of a HID device based on the given preparsed data. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @param capabilities Points to a caller allocated buffer, that upon return contains the parsed capability information for this HID device. - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDGetCaps (HIDPreparsedDataRef preparsedDataRef, - HIDCapsPtr capabilities); - -/*! - @function HIDGetCapabilities - @abstract Returns the capabilities of a HID device based on the given preparsed data. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @param capabilities Points to a caller allocated buffer, that upon return contains the parsed capability information for this HID device. - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDGetCapabilities (HIDPreparsedDataRef preparsedDataRef, - HIDCapabilitiesPtr capabilities); - -/*! - @function HIDGetCollectionNodes - @abstract Returns an array of HIDCollectionNode structures that describe the relationships and layout of the link collections within this top level collection. - @discussion The length of the buffer required, in array elements, for an entire collection node array is found in the HIDCaps structure member numberCollectionNodes. You obtain the HIDCaps information by calling the HIDGetCaps function. For information on the relationships of link collections described by the data returned from this routine, see the descripton of the HIDCollectionNode structure. - @param collectionNodes Points to a caller-allocated array of HIDCollectionNode structures in which this routine returns an entry for each collection within the top level collection. A collection is a group of corresponding HID descriptors containing input, output, and feature items that have some common relationship to one another. For example, a pointer collection contains items for x and y position data, and button data. - @param collectionNodesSize On input, specifies the length in array elements of the buffer provided at collectionNodes. On output, this parameter is set to the number of entries in the collectionNodes array that were initialized. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDGetCollectionNodes (HIDCollectionNodePtr collectionNodes, - UInt32 * collectionNodesSize, - HIDPreparsedDataRef preparsedDataRef); - -/*! - @function HIDGetScaledUsageValue - @abstract The HIDGetScaledUsageValue function returns the capabilities for all buttons for a given top level collection. - @discussion Clients who which to obtain all capabilities for a usage that contains multiple data items for a single usage that corresponds to a HID byte array, must call the HIDGetUsageValueArray function. - @param reportType Specifies the type of report for which to retrieve the scaled value. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. - @param usagePage Specifies the usage page of the value to be retrieved. - @param collection Optionally specifies the link collection identifier of the value to be retrieved. - @param usage Specifies the usage of the scaled value to be retrieved. - @param usageValue Points to a variable, that on return from this routine holds the scaled value retrieved from the device report. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @param report Points to the caller-allocated buffer that contains the device report data - @param reportLength Specifies the length, in bytes, of the report data provided at report - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDGetScaledUsageValue (HIDReportType reportType, - HIDUsage usagePage, - UInt32 collection, - HIDUsage usage, - SInt32 * usageValue, - HIDPreparsedDataRef preparsedDataRef, - void * report, - ByteCount reportLength); - -/*! - @function HIDGetSpecificButtonCaps - @abstract Retrieves the capabilities for all buttons in a specific type of report that meet the search criteria. - @discussion The HIDGetSpecificButtonCaps function retrieves capability data for buttons that meet a given search criteria, as opposed to the HIDGetButtonCaps function which returns the capability data for all buttons on the device. Calling this routine specifying zero for usagePage, usage and collection is equivalent to calling the HIDGetButtonCaps function. - @param reportType Specifies the type of report for which to retrieve the button capabilities. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. - @param usagePage Specifies a usage page identifier to use as a search criteria. If this parameter is non-zero, then only buttons that specify this usage page will be retrieved. - @param collection Specifies a link collection identifier to use as a search criteria. If this parameter is non-zero, then only buttons that are part of the specified link collection are retrieved. - @param usage Specifies a usage identifier to use as a search criteria. If this parameter is non-zero, then only buttons that match the value specified are retrieved. - @param buttonCaps Points to a caller-allocated buffer that will contain, on return, an array of HIDButtonCaps structures. The structures contain information for all buttons that meet the search criteria. - @param buttonCapsLength On input, specifies the length, in array elements, of the buffer provided in the buttonCaps parameter. On output, this parameter is set to the actual number of elements that were returned by the function call, in the buffer provided in the buttonCaps parameter, if the routine completed without error. The correct length necessary to retrieve the button capabilities can be found in the capability data returned for the device by the HIDGetCaps function. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDGetSpecificButtonCaps (HIDReportType reportType, - HIDUsage usagePage, - UInt32 collection, - HIDUsage usage, - HIDButtonCapsPtr buttonCaps, - UInt32 * buttonCapsSize, - HIDPreparsedDataRef preparsedDataRef); - -/*! - @function HIDGetSpecificButtonCapabilities - @abstract Retrieves the capabilities for all buttons in a specific type of report that meet the search criteria. - @discussion The HIDGetSpecificButtonCapabilities function retrieves capability data for buttons that meet a given search criteria, as opposed to the HIDGetButtonCapabilities function which returns the capability data for all buttons on the device. Calling this routine specifying zero for usagePage, usage and collection is equivalent to calling the HIDGetButtonCapabilities function. - @param reportType Specifies the type of report for which to retrieve the button capabilities. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. - @param usagePage Specifies a usage page identifier to use as a search criteria. If this parameter is non-zero, then only buttons that specify this usage page will be retrieved. - @param collection Specifies a link collection identifier to use as a search criteria. If this parameter is non-zero, then only buttons that are part of the specified link collection are retrieved. - @param usage Specifies a usage identifier to use as a search criteria. If this parameter is non-zero, then only buttons that match the value specified are retrieved. - @param buttonCaps Points to a caller-allocated buffer that will contain, on return, an array of HIDButtonCapabilities structures. The structures contain information for all buttons that meet the search criteria. - @param buttonCapsLength On input, specifies the length, in array elements, of the buffer provided in the buttonCaps parameter. On output, this parameter is set to the actual number of elements that were returned by the function call, in the buffer provided in the buttonCaps parameter, if the routine completed without error. The correct length necessary to retrieve the button capabilities can be found in the capability data returned for the device by the HIDGetCaps function. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDGetSpecificButtonCapabilities (HIDReportType reportType, - HIDUsage usagePage, - UInt32 collection, - HIDUsage usage, - HIDButtonCapabilitiesPtr buttonCaps, - UInt32 * buttonCapsSize, - HIDPreparsedDataRef preparsedDataRef); - -/*! - @function HIDGetSpecificValueCaps - @abstract Retrieves the capabilities for all values in a specific type of report that meet the search criteria. - @discussion The HIDGetSpecificValueCaps function retrieves capability data for values that meet given search criteria, as opposed to the HIDGetValueCaps function, which returns the capability data for all values on the device. Calling this routine with a value of zero for usagePage, usage and collection parameters is equivalent to calling the HIDGetValueCaps function. - @param reportType Specifies the type of report for which to retrieve the value capabilities. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport or kHIDFeatureReport. - @param usagePage Specifies a usage page identifier to use as a search criteria. If this parameter is non-zero, then only values that specify this usage page will be retrieved. - @param collection Specifies a link collection identifier to use as a search criteria. If this parameter is non-zero, then only values that are part of this link collection will be retrieved. - @param usage Specifies a usage identifier to use as a search criteria. If this parameter is non-zero, then only values that specify this usage will be retrieved. - @param valueCaps Points to a caller-allocated buffer that will contain, on return, an array of HIDValueCaps structures that contain information for all values that meet the search criteria. - @param valueCapsSize Specifies the length on input, in array elements, of the buffer provided in the valueCaps parameter. On output, this parameter is set to the actual number of elements that were returned by this function call, in the buffer provided in the valueCaps parameter, if the routine completed without error. The correct length necessary to retrieve the value capabilities can be found in the capability data returned for the device from the HIDGetCaps function. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDGetSpecificValueCaps (HIDReportType reportType, - HIDUsage usagePage, - UInt32 collection, - HIDUsage usage, - HIDValueCapsPtr valueCaps, - UInt32 * valueCapsSize, - HIDPreparsedDataRef preparsedDataRef); - -/*! - @function HIDGetSpecificValueCapabilities - @abstract Retrieves the capabilities for all values in a specific type of report that meet the search criteria. - @discussion The HIDGetSpecificValueCapabilities function retrieves capability data for values that meet given search criteria, as opposed to the HIDGetValueCapabilities function, which returns the capability data for all values on the device. Calling this routine with a value of zero for usagePage, usage and collection parameters is equivalent to calling the HIDGetValueCapabilities function. - @param reportType Specifies the type of report for which to retrieve the value capabilities. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport or kHIDFeatureReport. - @param usagePage Specifies a usage page identifier to use as a search criteria. If this parameter is non-zero, then only values that specify this usage page will be retrieved. - @param collection Specifies a link collection identifier to use as a search criteria. If this parameter is non-zero, then only values that are part of this link collection will be retrieved. - @param usage Specifies a usage identifier to use as a search criteria. If this parameter is non-zero, then only values that specify this usage will be retrieved. - @param valueCaps Points to a caller-allocated buffer that will contain, on return, an array of HIDValueCapabilities structures that contain information for all values that meet the search criteria. - @param valueCapsSize Specifies the length on input, in array elements, of the buffer provided in the valueCaps parameter. On output, this parameter is set to the actual number of elements that were returned by this function call, in the buffer provided in the valueCaps parameter, if the routine completed without error. The correct length necessary to retrieve the value capabilities can be found in the capability data returned for the device from the HIDGetCaps function. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDGetSpecificValueCapabilities (HIDReportType reportType, - HIDUsage usagePage, - UInt32 collection, - HIDUsage usage, - HIDValueCapabilitiesPtr valueCaps, - UInt32 * valueCapsSize, - HIDPreparsedDataRef preparsedDataRef); - -/*! - @function HIDGetButtonsOnPage - @abstract Retrieves the button stat information for buttons on a specified usage page. - @param reportType Specifies the type of report, provided in the report parameter, from which to retrieve the buttons. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport or kHIDFeatureReport. - @param usagePage Specifies the usage page of the buttons for which to retrieve the current state. - @param collection Optionally specifies the link collection identifier used to retrieve only specific button states. If this value is non-zero, only the buttons that are part of the given collection are returned. - @param usageList On return, points to a caller-allocated buffer that contains the usages of all the buttons that are perssed and belong to the usage page specified in the usagePage parameter. - @param usageListSize Is the size, in array elements, of the buffer provided in the usageList parameter. On return, this parameter contains the number of button states that were set by this routine. If the error kHIDBufferTooSmallErr was returned, this parameter contains the number of array elements required to hold all button data requested. The maximum number of buttons that can ever be returned for a given type of report can be obtained by calling the HIDMaxUsageListLength function. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @param report Points to the caller-allocated buffer that contains the device report data - @param reportLength Specifies the size, in bytes, of the report data provided in the report parameter - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDGetButtonsOnPage (HIDReportType reportType, - HIDUsage usagePage, - UInt32 collection, - HIDUsage * usageList, - UInt32 * usageListSize, - HIDPreparsedDataRef preparsedDataRef, - void * report, - ByteCount reportLength); - -/*! - @function HIDGetButtons - @abstract The HIDGetButtons function takes a report from a HID device and gets the current state of the buttons in that report. - @param reportType Specifies the type of report, provided in the report parameter, from which to retrieve the buttons. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport or kHIDFeatureReport - @param collection Optionally specifies the link collection identifier used to retrieve only specific button states. If this value is non-zero, only the buttons that are part of the given collection are returned. - @param usageList On return, points to a caller-allocated buffer that contains the usages of all the buttons that are pressed. - @param usageListSize Is the size, in array elements, of the buffer provided in the usageList parameter. On return, this parameter contains the number of button states that were set by this routine. If the error kHIDBufferToSmallErr was returned, this parameter contains the number of array elements required to hold all button data requested. The maximum number of buttons that can ever be returned for a given type of report can be obtained by calling the HIDMaxUsageListLength function. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @param report Points to the caller-allocated buffer that contains the device report data. - @param reportLength Specifies the length, in bytes, of the report data provided in the report parameter. - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDGetButtons (HIDReportType reportType, - UInt32 collection, - HIDUsageAndPagePtr usageList, - UInt32 * usageListSize, - HIDPreparsedDataRef preparsedDataRef, - void * report, - ByteCount reportLength); - -extern -OSStatus -HIDGetNextButtonInfo (HIDReportType reportType, - HIDUsage usagePage, - HIDUsage usage, - UInt32 * collection, - UInt8 * reportID, - HIDPreparsedDataRef preparsedDataRef); - -extern -OSStatus -HIDGetNextUsageValueInfo (HIDReportType reportType, - HIDUsage usagePage, - HIDUsage usage, - UInt32 * collection, - UInt8 * reportID, - HIDPreparsedDataRef preparsedDataRef); - -extern -OSStatus -HIDGetReportLength (HIDReportType reportType, - UInt8 reportID, - ByteCount * reportLength, - HIDPreparsedDataRef preparsedDataRef); - -/*! - @function HIDGetUsageValue - @abstract The HIDGetUsageValue function returns a value from a device data report given a selected search criteria. - @discussion The HIDGetUsageValue function does not sign the value. To have the sign bit automatically applied, use the HIDGetScaledUsageValue function instead. For manually assigning the sign bit, the position of the sign bit can be found in the HIDValueCaps structure for this value. Clients who wish to obtain all data for a usage that contains multiple data items for a single usage, corresponding to a HID byte array, must call the HIDGetUsageValueArray function instead. - @param reportType Specifies the type of report, provided in report, from which to retrieve the value. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. - @param usagePage Specifies the usage page of the value to retrieve. - @param collection Optionally specifies the link collection identifier of the value to be retrieved. - @param usage Specifies the usage of the value to be retrieved. - @param usageValue Points to a variable, that on return from this routine holds the value retrieved from the device report. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @param report Points to the caller-allocated buffer that contains the device report data. - @param reportLength Specifies the size, in bytes, of the report data provided in the report parameter. - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDGetUsageValue (HIDReportType reportType, - HIDUsage usagePage, - UInt32 collection, - HIDUsage usage, - SInt32 * usageValue, - HIDPreparsedDataRef preparsedDataRef, - void * report, - ByteCount reportLength); - -/*! - @function HIDGetUsageValueArray - @abstract The HIDGetUsageValueArray function returns a value from a device data report given a selected search criteria. - @discussion When the HIDGetUsageValueArray function retrieves the data, it fills in the buffer in little-endian order beginning with the least significant bit of the data for this usage. The data is filled in without regard to byte alignment and is shifted such that the least significant bit is placed as the 1st bit of the given buffer. - @param reportType Specifies the type of report, provided in report, from which to retrieve the value. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. - @param usagePage Specifies the usage page of the data to be retrieved. - @param collection Optionally specifies the link collection identifier of the data to be retrieved. - @param usage Specifies the usage identifier of the value to be retrieved. - @param usageValueBuffer Points to a caller-allocated buffer that contains, on output, the data from the device. The correct length for this buffer can be found by multiplying the reportCount and bitSize fields of the HIDValueCaps structure for the value and rounding the resulting value up to the nearest byte. - @param usageValueBufferSize Specifies the size, in bytes, of the buffer in the usageValueBuffer parameter. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @param report Points to the caller-allocated buffer that contains the device report data. - @param reportLength Specifies the size, in bytes, of the report data provided in report. - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDGetUsageValueArray (HIDReportType reportType, - HIDUsage usagePage, - UInt32 collection, - HIDUsage usage, - Byte * usageValueBuffer, - ByteCount usageValueBufferSize, - HIDPreparsedDataRef preparsedDataRef, - void * report, - ByteCount reportLength); - -/*! - @function HIDGetValueCaps - @abstract The HIDGetValueCaps function retrieves the capabilities for all values for a specified top level collection. - @discussion The HIDGetValueCaps function retrieves the capability data for all values in a top level collection without regard for the usage, usage page or collection of the value. To retrieve value capabilities for a specific usage, usage page or collection, use the HIDGetSpecificValueCaps function. - @param reportType Specifies the type of report for which to retrieve the value capabilities. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. - @param valueCaps On return, points to a caller-allocated buffer that contains an array of HIDValueCaps structures containing information for all values in the top level collection. - @param valueCapsSize On input, specifies the size in array elements of the buffer provided in the valueCaps parameter. On output, this parameter is set to the actual number of elements that were returned in the buffer provided in the valueCaps parameter, if the function completed without error. The correct length necessary to retrieve the value capabilities can be found in the capability data returned for the device by the HIDGetCaps function. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDGetValueCaps (HIDReportType reportType, - HIDValueCapsPtr valueCaps, - UInt32 * valueCapsSize, - HIDPreparsedDataRef preparsedDataRef); - -/*! - @function HIDGetValueCapabilities - @abstract The HIDGetValueCapabilities function retrieves the capabilities for all values for a specified top level collection. - @discussion The HIDGetValueCapabilities function retrieves the capability data for all values in a top level collection without regard for the usage, usage page or collection of the value. To retrieve value capabilities for a specific usage, usage page or collection, use the HIDGetSpecificValueCapabilities function. - @param reportType Specifies the type of report for which to retrieve the value capabilities. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. - @param valueCaps On return, points to a caller-allocated buffer that contains an array of HIDValueCapabilities structures containing information for all values in the top level collection. - @param valueCapsSize On input, specifies the size in array elements of the buffer provided in the valueCaps parameter. On output, this parameter is set to the actual number of elements that were returned in the buffer provided in the valueCaps parameter, if the function completed without error. The correct length necessary to retrieve the value capabilities can be found in the capability data returned for the device by the HIDGetCapabilities function. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDGetValueCapabilities (HIDReportType reportType, - HIDValueCapabilitiesPtr valueCaps, - UInt32 * valueCapsSize, - HIDPreparsedDataRef preparsedDataRef); - -extern -OSStatus -HIDInitReport (HIDReportType reportType, - UInt8 reportID, - HIDPreparsedDataRef preparsedDataRef, - void * report, - ByteCount reportLength); - -/*! - @function HIDMaxUsageListLength - @abstract The HIDMaxUsageListLength function returns the maximum number of buttons that can be returned from a given report type for the top level collection. - @param reportType Specifies the type of report for which to get a maximum usage count. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. - @param usagePage Optionally specifies the usage page identifier to use as a search criteria. If this parameter is zero, the function returns the number of buttons for the entire top-level collection regardless of the actual value of the usage page. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -UInt32 -HIDMaxUsageListLength (HIDReportType reportType, - HIDUsage usagePage, - HIDPreparsedDataRef preparsedDataRef); - -/*! - @function HIDSetScaledUsageValue - @abstract The HIDSetScaledUsageValue function takes a signed physical (scaled) number and converts it to the logical, or device representation and inserts it in a given report. - @discussion The HIDSetScaledUsageValue function automatically handles the setting of the signed bit in the data to be sent to the device. - @param reportType Specifies the type of report. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. - @param usagePage Specifies the usage page identifier of the value to be set in the report. - @param collection Optionally specifies the link collection identifier to distinguish between values that have the same usage page and usage identifiers. If this parameter is zero, it will be ignored. - @param usage Specifies the usage identifier of the value to be set in the report. - @param usageValue Specifies the physical, or scaled, value to be set in the value for the given report. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @param report Points to the caller-allocated buffer that contains the device report data. - @param Specifies the length, in bytes of the report data specified in the report parameter. - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDSetScaledUsageValue (HIDReportType reportType, - HIDUsage usagePage, - UInt32 collection, - HIDUsage usage, - SInt32 usageValue, - HIDPreparsedDataRef preparsedDataRef, - void * report, - ByteCount reportLength); - -/*! - @function HIDSetButtons - @abstract The HIDSetButtons function takes a report from a HID device and returns the current state of the buttons in that report. - @param reportType Specifies the type of repor. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. - @param usagePage Specifies the usage page identifier of the value to be set in the report. - @param collection Optionally specifies the link collection identifier to distinguish between buttons. If this parameter is zero, it is ignored. - @param usageList Points to a caller-allocated buffer that contains an array of button data to be set in the report in the report parameter. - @param usageListSize Specifies the size, in array elements, of the buffer provided in the usageList parameter. If an error is returned by a call to this function, the usageListLength parameter contains the location in the array provided in the usageList parameter where the error was encountered. All array entries encountered prior to the error location were successfully set in the report provided in the report parameter. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @param report Points to the caller-allocated buffer that contains the device report data. - @param reportLength Specifies the size, in bytes, of the report data provided in the report parameter. - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDSetButtons (HIDReportType reportType, - HIDUsage usagePage, - UInt32 collection, - HIDUsage * usageList, - UInt32 * usageListSize, - HIDPreparsedDataRef preparsedDataRef, - void * report, - ByteCount reportLength); - -/*! - @function HIDSetUsageValue - @abstract The HIDSetUsageValue function sets a value in a give report. - @discussion The HIDSetUsageVlaue function does not automatically handle the sign bit. Clients must either manually set the sign bit, at the position provided in the HIDValueCaps structure for this value, or call the HIDSetScaledUsageValue function. - @param reportType Specifies the type of report. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. - @param usagePage Specifies the usage page identifier of the value to be set in the report. - @param collection Optionally specifies the link collection identifier to distinguish between values that have the same usage page and usage identifiers. If this parameter is zero, it is ignored. - @param usage Specifies the usage identifier of the value to be set in the report. - @param usageValue Specifies the data that is to be set in the value for the given report. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @param report Points to the caller-allocated buffer that contains the device report data. - @param reportLength Specifies the size, in bytes, of the report data provided in the report parameter. - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDSetUsageValue (HIDReportType reportType, - HIDUsage usagePage, - UInt32 collection, - HIDUsage usage, - SInt32 usageValue, - HIDPreparsedDataRef preparsedDataRef, - void * report, - ByteCount reportLength); - -/*! - @function HIDSetUsageValueArray - @abstract The HIDSetUsageValueArray function sets an array of values in a given report. - @discussion The HIDSetUsageValue function does not automatically handle the sign bit. Clients must either manually set the sign bit, at the position provided in the HIDValueCaps structure for this value, or call the HIDSetScaledUsageValue function. - @param reportType Specifies the type of report. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. - @param usagePage Specifies the usage page identifier of the value to be set in the report. - @param collection Optionally specifies the link collection identifier to distinguish between values that have the same usage page and usage identifiers. If this parameter is zero, it is ignored. - @param usage Specifies the usage identifier of the value to be set in the report. - @param usageValueBuffer Points to a caller-allocated buffer that contains, on output, the data from the device. The correct length for this buffer can be found by multiplying the reportCount and bitSize fields of the HIDValueCaps structure for this value and rounding the resulting value up to the nearest byte. - @param usageValueBufferLength Specifies the size, in bytes, of the buffer in the usageValueBuffer parameter. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @param report Points to the caller-allocated buffer that contains the device report data. - @param reportLength Specifies the size, in bytes, of the report data provided in the report parameter. - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDSetUsageValueArray (HIDReportType reportType, - HIDUsage usagePage, - UInt32 collection, - HIDUsage usage, - Byte * usageValueBuffer, - ByteCount usageValueBufferLength, - HIDPreparsedDataRef preparsedDataRef, - void * report, - ByteCount reportLength); - -/*! - @function HIDUsageListDifference - @abstract The HIDUsageListDifference function compares and provides the differences between two lists of buttons. - @param previousUsageList Points to the older button list to be used for comparison. - @param currentUsageList Points to the newer button list to be used for comparison. - @param breakUsageList On return, points to a caller-allocated buffer that contains the buttons set in the older list, specified in the previousUsageList parameter, but not set in the new list, specified in the currentUsageList parameter. - @param makeUsageList On return, points to a caller-allocated buffer that contains the buttons set in the new list, specified in the currentUsageList parameter, but not set in the old list, specified in the previousUsageList parameter. - @param usageListsLength Specifies the length, in array elements, of the buffers provided in the currentUsageList and previousUssageList parameters. - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDUsageListDifference (HIDUsage * previousUsageList, - HIDUsage * currentUsageList, - HIDUsage * breakUsageList, - HIDUsage * makeUsageList, - UInt32 usageListsSize); - -/*! - @function HIDSetButton - @abstract The HIDSetButton function takes a report from a HID device and sets the current state of the specified button in that report. - @param reportType Specifies the type of report. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport. - @param usagePage Specifies the usage page identifier of the value to be set in the report. - @param collection Optionally specifies the link collection identifier to distinguish between buttons. If this parameter is zero, it is ignored. - @param usage Points to a caller-allocated buffer that contains the button data to be set in the report in the report parameter. - @param preparsedDataRef Preparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function - @param report Points to the caller-allocated buffer that contains the device report data. - @param reportLength Specifies the size, in bytes, of the report data provided in the report parameter. - @result OSStatus Returns an error code if an error was encountered or noErr on success. - */ - -extern -OSStatus -HIDSetButton (HIDReportType reportType, - HIDUsage usagePage, - UInt32 collection, - HIDUsage usage, - HIDPreparsedDataRef preparsedDataRef, - void * report, - ByteCount reportLength); - - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/i386/include/IOKit/hidsystem/IOHIDParameter.h b/i386/include/IOKit/hidsystem/IOHIDParameter.h deleted file mode 100644 index f528d03..0000000 --- a/i386/include/IOKit/hidsystem/IOHIDParameter.h +++ /dev/null @@ -1,310 +0,0 @@ -/* - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. - * - * evsio.h - Get/Set parameter calls for Event Status Driver. - * - * CAUTION: Developers should stick to the API exported in - * <drivers/event_status_driver.h> to guarantee - * binary compatability of their applications in future - * releases. - * - * HISTORY - * 22 May 1992 Mike Paquette at NeXT - * Created. - */ -#ifndef _DEV_EVSIO_H -#define _DEV_EVSIO_H - -/* Public type definitions. */ -#include <IOKit/hidsystem/IOHIDTypes.h> -#include <IOKit/hidsystem/IOLLEvent.h> - -/* - * Identify this driver as one that uses the new driverkit and messaging API - */ -#ifndef _NeXT_MACH_EVENT_DRIVER_ -#define _NeXT_MACH_EVENT_DRIVER_ (1) -#endif /* !_NeXT_MACH_EVENT_DRIVER_ */ - -/* * */ - -#define kIOHIDKindKey "HIDKind" -#define kIOHIDInterfaceIDKey "HIDInterfaceID" -#define kIOHIDSubinterfaceIDKey "HIDSubinterfaceID" - -#define kIOHIDParametersKey "HIDParameters" - -#define kIOHIDVirtualHIDevice "HIDVirtualDevice" - -#define kIOHIDKeyRepeatKey "HIDKeyRepeat" -#define kIOHIDInitialKeyRepeatKey "HIDInitialKeyRepeat" -#define kIOHIDKeyMappingKey "HIDKeyMapping" -#define kIOHIDResetKeyboardKey "HIDResetKeyboard" - -#define kIOHIDKeyboardModifierMappingPairsKey "HIDKeyboardModifierMappingPairs" -#define kIOHIDKeyboardModifierMappingSrcKey "HIDKeyboardModifierMappingSrc" -#define kIOHIDKeyboardModifierMappingDstKey "HIDKeyboardModifierMappingDst" - -#define kIOHIDKeyboardCapsLockDoesLockKey "HIDKeyboardCapsLockDoesLock" -#define kIOHIDKeyboardSupportsF12EjectKey "HIDKeyboardSupportsF12Eject" -#define kIOHIDKeyboardSupportedModifiersKey "HIDKeyboardSupportedModifiers" - -#define kIOHIDPointerResolutionKey "HIDPointerResolution" -#define kIOHIDResetPointerKey "HIDResetPointer" -#define kIOHIDPointerConvertAbsoluteKey "HIDPointerConvertAbsolute" -#define kIOHIDPointerContactToMoveKey "HIDPointerContactToMove" -#define kIOHIDPointerPressureToClickKey "HIDPointerPressureToClick" -#define kIOHIDPointerButtonMode "HIDPointerButtonMode" -#define kIOHIDPointerButtonCountKey "HIDPointerButtonCount" - -#define kIOHIDPointerAccelerationKey "HIDPointerAcceleration" -#define kIOHIDPointerAccelerationSettingsKey "HIDPointerAccelerationSettings" -#define kIOHIDPointerAccelerationTypeKey "HIDPointerAccelerationType" -#define kIOHIDPointerAccelerationTableKey "HIDPointerAccelerationTable" - -#define kIOHIDScrollResetKey "HIDScrollReset" -#define kIOHIDScrollResolutionKey "HIDScrollResolution" -#define kIOHIDScrollReportRateKey "HIDScrollReportRate" -#define kIOHIDScrollAccelerationKey "HIDScrollAcceleration" -#define kIOHIDScrollAccelerationTypeKey "HIDScrollAccelerationType" -#define kIOHIDScrollAccelerationTableKey "HIDScrollAccelerationTable" - -#define kIOHIDScrollResolutionXKey "HIDScrollResolutionX" -#define kIOHIDScrollResolutionYKey "HIDScrollResolutionY" -#define kIOHIDScrollResolutionZKey "HIDScrollResolutionZ" - -#define kIOHIDScrollAccelerationTableXKey "HIDScrollAccelerationTableX" -#define kIOHIDScrollAccelerationTableYKey "HIDScrollAccelerationTableY" -#define kIOHIDScrollAccelerationTableZKey "HIDScrollAccelerationTableZ" - -#define kIOHIDScrollMouseButtonKey "HIDScrollMouseButton" - -#define kIOHIDScrollZoomModifierMaskKey "HIDScrollZoomModifierMask" - -#define kIOHIDTrackpadScrollAccelerationKey "HIDTrackpadScrollAcceleration" -#define kIOHIDMouseScrollAccelerationKey "HIDMouseScrollAcceleration" - -#define kIOHIDTrackpadAccelerationType "HIDTrackpadAcceleration" -#define kIOHIDMouseAccelerationType "HIDMouseAcceleration" - -#define kIOHIDClickTimeKey "HIDClickTime" -#define kIOHIDClickSpaceKey "HIDClickSpace" - -#define kIOHIDWaitCursorFrameIntervalKey "HIDWaitCursorFrameInterval" - -#define kIOHIDAutoDimThresholdKey "HIDAutoDimThreshold" -#define kIOHIDAutoDimStateKey "HIDAutoDimState" -#define kIOHIDAutoDimTimeKey "HIDAutoDimTime" -#define kIOHIDIdleTimeKey "HIDIdleTime" - -#define kIOHIDBrightnessKey "HIDBrightness" -#define kIOHIDAutoDimBrightnessKey "HIDAutoDimBrightness" - -#define kIOHIDFKeyModeKey "HIDFKeyMode" - -// if kIOHIDStickyKeysDisabledKey is 1, then all sticky keys functionality -// is completely turned off. Multiple shifts will have no effect. -#define kIOHIDStickyKeysDisabledKey "HIDStickyKeysDisabled" - -// if kIOHIDStickyKeysOnKey is 1 then a depressed modifier will stay down -// until a non-modifer key is pressed (or sticky keys is turned off) -#define kIOHIDStickyKeysOnKey "HIDStickyKeysOn" - -// if kIOHIDStickyKeysShiftTogglesKey is 1, then a sequence of five -// shift keys in sequence will toggle sticky keys on or off -#define kIOHIDStickyKeysShiftTogglesKey "HIDStickyKeysShiftToggles" - -// if kIOHIDMouseKeysOptionTogglesKey is 1, then a sequence of five -// option keys in sequence will toggle mouse keys on or off -#define kIOHIDMouseKeysOptionTogglesKey "HIDMouseKeysOptionToggles" - -// kIOHIDSlowKeysDelayKey represents the delay used for slow keys. -// if kIOHIDSlowKeysDelayKey is 0, then slow keys off -#define kIOHIDSlowKeysDelayKey "HIDSlowKeysDelay" - -#define kIOHIDF12EjectDelayKey "HIDF12EjectDelay" - -#define kIOHIDMouseKeysOnKey "HIDMouseKeysOn" - -#define kIOHIDUseKeyswitchKey "HIDUseKeyswitch" - -#define kIOHIDDisallowRemappingOfPrimaryClickKey "HIDDisallowRemappingOfPrimaryClick" -#define kIOHIDMouseKeysEnablesVirtualNumPadKey "HIDMouseKeysEnablesVirtualNumPad" - -#define kIOHIDResetLEDsKey "HIDResetLEDs" - - -#ifdef __ppc__ - // the following are misspelled keys present in the system - // they are being kept around, but will eventually be deprecated - #define kIOHIDSickyKeysDisabledKey kIOHIDStickyKeysDisabledKey - #define kIOHIDSickyKeysOnKey kIOHIDStickyKeysOnKey - #define kIOHIDSickyKeysShiftTogglesKey kIOHIDStickyKeysShiftTogglesKey -#endif - -// the following values are used in kIOHIDPointerButtonMode -typedef enum { - kIOHIDButtonMode_BothLeftClicks = 0, - kIOHIDButtonMode_ReverseLeftRightClicks = 1, - kIOHIDButtonMode_EnableRightClick = 2 -} IOHIDButtonModes; - -#ifdef _undef -#define EVS_PREFIX "Evs_" /* All EVS calls start with this string */ - -/* WaitCursor-related ioctls */ - -#define EVSIOSWT "Evs_SetWaitThreshold" -#define EVSIOSWT_SIZE EVS_PACKED_TIME_SIZE - -#define EVSIOSWS "Evs_SetWaitSustain" -#define EVSIOSWS_SIZE EVS_PACKED_TIME_SIZE - -#define EVSIOSWFI "Evs_SetWaitFrameInterval" -#define EVSIOSWFI_SIZE EVS_PACKED_TIME_SIZE - -#define EVSIOCWINFO "Evs_CurrentWaitCursorInfo" -#define EVSIOCWINFO_THRESH 0 -#define EVSIOCWINFO_SUSTAIN (EVSIOCWINFO_THRESH + EVS_PACKED_TIME_SIZE) -#define EVSIOCWINFO_FINTERVAL (EVSIOCWINFO_SUSTAIN + EVS_PACKED_TIME_SIZE) -#define EVSIOCWINFO_SIZE (EVSIOCWINFO_FINTERVAL + EVS_PACKED_TIME_SIZE) -#endif - -#define EVS_PACKED_TIME_SIZE (sizeof(UInt64) / sizeof( unsigned int)) - -/* Device control ioctls. Levels specified may be in the range 0 - 64. */ - -#define EVSIOSB kIOHIDBrightnessKey -#define EVSIOSB_SIZE 1 - -#define EVSIOSADB kIOHIDAutoDimBrightnessKey -#define EVSIOSADB_SIZE 1 - -#ifdef _undef -#define EVSIOSA "Evs_SetAttenuation" -#define EVIOSA_SIZE 1 - -#define EVSIO_DCTLINFO "Evs_DeviceControlInfo" -typedef enum { - EVSIO_DCTLINFO_BRIGHT, - EVSIO_DCTLINFO_ATTEN, - EVSIO_DCTLINFO_AUTODIMBRIGHT -} evsio_DCTLINFOIndices; -#define EVSIO_DCTLINFO_SIZE (EVSIO_DCTLINFO_AUTODIMBRIGHT + 1) -#endif - -/* - * Device status request - */ -#define EVSIOINFO NX_EVS_DEVICE_INFO - - -/* Keyboard-related ioctls - implemented within Event Sources */ - -#define EVSIOSKR kIOHIDKeyRepeatKey -#define EVSIOSKR_SIZE EVS_PACKED_TIME_SIZE - -#define EVSIOSIKR kIOHIDInitialKeyRepeatKey -#define EVSIOSIKR_SIZE EVS_PACKED_TIME_SIZE - -#define EVSIORKBD kIOHIDResetKeyboardKey -#define EVSIORKBD_SIZE 1 - -#define EVSIOCKR_SIZE EVS_PACKED_TIME_SIZE - -#define EVSIOCKML kIOHIDKeyMappingKey -#define EVSIOCKML_SIZE 1 - -/* The following two tokens are for use with the get/set character routines. */ -#define EVSIOSKM kIOHIDKeyMappingKey -#define EVSIOSKM_SIZE 4096 - -#define EVSIOCKM kIOHIDKeyMappingKey -#define EVSIOCKM_SIZE 4096 - -/* Mouse-related ioctls - implemented within Event Sources */ - -#define EVSIOSMS kIOHIDPointerAccelerationKey -#define EVSIOSMS_SIZE (1) - -#define EVSIOCMS kIOHIDPointerAccelerationKey -#define EVSIOCMS_SIZE (1) - -#ifdef _undef -#define EVSIOSMH "Evs_SetMouseHandedness" -#define EVSIOSMH_SIZE 1 // value from NXMouseButton enum - -#define EVSIOCMH "Evs_CurrentMouseHandedness" -#define EVSIOCMH_SIZE 1 -#endif - -/* Generic pointer device controls, implemented by the Event Driver. */ -#define EVSIOSCT kIOHIDClickTimeKey -#define EVSIOSCT_SIZE EVS_PACKED_TIME_SIZE - -#define EVSIOSCS kIOHIDClickSpaceKey -typedef enum { - EVSIOSCS_X, - EVSIOSCS_Y -} evsioEVSIOSCSIndices; -#define EVSIOSCS_SIZE (EVSIOSCS_Y + 1) - -#define EVSIOSADT kIOHIDAutoDimThresholdKey -#define EVSIOSADT_SIZE EVS_PACKED_TIME_SIZE - -#define EVSIOSADS kIOHIDAutoDimStateKey -#define EVSIOSADS_SIZE 1 - -#define EVSIORMS kIOHIDResetPointerKey -#define EVSIORMS_SIZE 1 - -#define EVSIOCCT kIOHIDClickTimeKey -#define EVSIOCCT_SIZE EVS_PACKED_TIME_SIZE - -#define EVSIOCADT kIOHIDAutoDimThresholdKey -#define EVSIOCADT_SIZE EVS_PACKED_TIME_SIZE - -#define EVSIOGDADT kIOHIDAutoDimTimeKey -#define EVSIOGDADT_SIZE EVS_PACKED_TIME_SIZE - -#define EVSIOIDLE kIOHIDIdleTimeKey -#define EVSIOIDLE_SIZE EVS_PACKED_TIME_SIZE - -#define EVSIOCCS kIOHIDClickSpaceKey -typedef enum { - EVSIOCCS_X, - EVSIOCCS_Y -} evsioEVSIOCCSIndices; -#define EVSIOCCS_SIZE (EVSIOCCS_Y + 1) - -#define EVSIOCADS kIOHIDAutoDimStateKey -#define EVSIOCADS_SIZE 1 - -enum { - // Selectors for IOHIDGetModifierLockState and IOHIDSetModifierLockState - kIOHIDCapsLockState = 0x00000001, - kIOHIDNumLockState = 0x00000002, -}; - -#endif /* !_DEV_EVSIO_H */ diff --git a/i386/include/IOKit/hidsystem/IOHIDShared.h b/i386/include/IOKit/hidsystem/IOHIDShared.h deleted file mode 100644 index e7c5e3a..0000000 --- a/i386/include/IOKit/hidsystem/IOHIDShared.h +++ /dev/null @@ -1,341 +0,0 @@ -/* - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/****************************************************************************** - - evio.h - Ioctl calls for the events driver - Leovitch 02Jan88 - - Copyright 1988 NeXT, Inc. - - CAUTION: Developers should stick to the API exported in - <drivers/event_status_driver.h> to guarantee - binary compatability of their applications in future - releases. - - Modified: - - 09Dec88 Leo Broken out from evsio.h - 24Aug89 Ted ANSI function prototyping. - 19Feb90 Ted Major revision for multiple driver support. - 26Feb90 Ted New evioScreen structure and EVIOST ioctl. - 12Mar90 Ted New ev_unregister_screen function, SCREENTOKEN constant. - 06May90 Ted Added AALastEventSent and AALastEventConsumed to EvVars. - 22May90 Trey More wait cursor vars in EvVars. - 13Jun90 Ted NXCursorData structure. - 18Jun90 Ted Default wait cursor constants. - 26Sep90 Ted Enhanced cursor system to support intelligent drivers. - 26Nov90 Ted Removed NXSaveCursor and NXCursorData structures - 28Nov90 Ted Remove EvVars, rolled into EventGlobals - 28Nov90 Ted Renamed EventGlobals -> EvGlobals, eventGlobals -> evg - 05May92 Mike Reworked for NRW driver architecture. - -******************************************************************************/ - -#ifndef _DEV_EVIO_H -#define _DEV_EVIO_H - -#include <sys/cdefs.h> - -__BEGIN_DECLS - -#if KERNEL -#include <IOKit/system.h> -#else /* !KERNEL */ -#include <mach/message.h> -#include <IOKit/IOKitLib.h> -#endif /* KERNEL */ - -#include <IOKit/IOReturn.h> -#include <IOKit/graphics/IOGraphicsTypes.h> -#include <IOKit/hidsystem/IOHIDTypes.h> -#include <IOKit/hidsystem/IOLLEvent.h> - -/* - * Identify this driver as one that uses the new driverkit and messaging API - */ -#ifndef _NeXT_MACH_EVENT_DRIVER_ -#define _NeXT_MACH_EVENT_DRIVER_ (1) -#endif /* _NeXT_MACH_EVENT_DRIVER_ */ - - -/* Pressure Constants */ -#define MINPRESSURE EV_MINPRESSURE -#define MAXPRESSURE EV_MAXPRESSURE - -#define LLEQSIZE 240 /* Entries in low-level event queue */ - -typedef struct _NXEQElStruct { - int next; /* Slot of lleq for next event */ - ev_lock_data_t sema; /* Is high-level code reading this event now? */ - NXEvent event; /* The event itself */ -} NXEQElement; - - -/****************************************************************************** - SHARED MEMORY OVERVIEW - - PERSPECTIVE - The ev driver and PostScript share at least one page of wired memory. - This memory contains the low-level event queue which ev deposits events - into and PostScript reads events from. Also, this memory contains other - important data such as wait cursor state and some general cursor state. - This memory is critical for speed. That is, we avoid having to make - system calls for common operations. - - SHARED MEMORY REGIONS - There are currently three "regions" or "zones" delineated within this - shared memory. The first zone is the EvOffsets structure. This structure - contains two offsets from the beginning of shared memory. The first offset - is to the second zone, EvGlobals. The second offset is to the third - zone, private shmem for drivers. - - INITIALIZATION OF SHARED MEMORY - When the WindowServer starts up, it finds all screens that will be active. - It then opens the ev driver and calls the EVIOSSCR ioctl repeatedly for - each screen in use. This lets the ev driver set up the evScreen array - and fill in each element. This ioctl also returns to PostScript a running - total shared memory size with which to allocate. PostScript then allocates - a region of memory this size and calls evmmap to "map in" this shared - region. Evmmap initializes and fills in the EvOffsets and EvGlobals. - Next the WindowServer calls each screen in turn to register itself with - the ev driver in the same sequence as presented to EVIOSSCR. Each screen - driver calls ev_register_screen() which among other things allocates a - part of the private shmem (of the third shared memory zone) for the driver. - - DEBUGGING NOTES - You can easily display and set this shared memory from kgdb, but usually - cannot do so from within PostScript. Gdb (or some weird interaction - between gdb and the os) chokes on this shmem. So if you read or write - this area of memory, copy-on-write will occur and you'll get a completely - new page for PostScript. This will render the shared memory scheme - useless and you will have to restart PostScript. It was my understanding - that before, we were able to "read" this area from PS, but not write to - it (the idea behind copy-on-WRITE). However, this seems to be broken - in 2.0. We think this is a kernel bug. -******************************************************************************/ - -typedef volatile struct _evOffsets { - int evGlobalsOffset; /* Offset to EvGlobals structure */ - int evShmemOffset; /* Offset to private shmem regions */ -} EvOffsets; - -/****************************************************************************** - EvGlobals - This structures defines the portion of the events driver data structure - that is exported to the PostScript server. It contains the event queue - which is in memory shared between the driver and the PostScript server. - All the variables necessary to read and process events from the queue are - contained here. -******************************************************************************/ - -#ifndef __ppc__ -typedef volatile struct _evGlobals { - ev_lock_data_t cursorSema; /* set to disable periodic code */ - int eNum; /* Unique id for mouse events */ - int buttons; /* State of the mouse buttons 1==down, 0==up */ - int eventFlags; /* The current value of event.flags */ - int VertRetraceClock; /* The current value of event.time */ - IOGPoint cursorLoc; /* The current location of the cursor */ - int frame; /* current cursor frame */ - IOGBounds workBounds; /* bounding box of all screens */ - IOGBounds mouseRect; /* Rect for mouse-exited events */ - int version; /* for run time checks */ - int structSize; /* for run time checks */ - int lastFrame; - unsigned int reservedA[31]; - - unsigned reserved:27; - unsigned wantPressure:1; /* pressure in current mouseRect? */ - unsigned wantPrecision:1; /* precise coordinates in current mouseRect? */ - unsigned dontWantCoalesce:1;/* coalesce within the current mouseRect? */ - unsigned dontCoalesce:1; /* actual flag which determines coalescing */ - unsigned mouseRectValid:1; /* If nonzero, post a mouse-exited - whenever mouse outside mouseRect. */ - int movedMask; /* This contains an event mask for the - three events MOUSEMOVED, - LMOUSEDRAGGED, and RMOUSEDRAGGED. - It says whether driver should - generate those events. */ - ev_lock_data_t waitCursorSema; /* protects wait cursor fields */ - int AALastEventSent; /* timestamp for wait cursor */ - int AALastEventConsumed; /* timestamp for wait cursor */ - int waitCursorUp; /* Is wait cursor up? */ - char ctxtTimedOut; /* Has wait cursor timer expired? */ - char waitCursorEnabled; /* Play wait cursor game (per ctxt)? */ - char globalWaitCursorEnabled; /* Play wait cursor game (global)? */ - int waitThreshold; /* time before wait cursor appears */ - - int LLEHead; /* The next event to be read */ - int LLETail; /* Where the next event will go */ - int LLELast; /* The last event entered */ - NXEQElement lleq[LLEQSIZE]; /* The event queue itself */ -} EvGlobals; - -#else - -typedef volatile struct _evGlobals { - ev_lock_data_t cursorSema; /* set to disable periodic code */ - int LLEHead; /* The next event to be read */ - int LLETail; /* Where the next event will go */ - int LLELast; /* The last event entered */ - int eNum; /* Unique id for mouse events */ - int buttons; /* State of the mouse buttons 1==down, 0==up */ - int eventFlags; /* The current value of event.flags */ - int VertRetraceClock; /* The current value of event.time */ - IOGPoint cursorLoc; /* The current location of the cursor */ - int frame; /* current cursor frame */ - IOGBounds workBounds; /* bounding box of all screens */ - IOGBounds mouseRect; /* Rect for mouse-exited events */ - int version; /* for run time checks */ - int structSize; /* for run time checks */ - int lastFrame; - unsigned int reservedA[31]; - - unsigned reserved:27; - unsigned wantPressure:1; /* pressure in current mouseRect? */ - unsigned wantPrecision:1; /* precise coordinates in current mouseRect? */ - unsigned dontWantCoalesce:1;/* coalesce within the current mouseRect? */ - unsigned dontCoalesce:1; /* actual flag which determines coalescing */ - unsigned mouseRectValid:1; /* If nonzero, post a mouse-exited - whenever mouse outside mouseRect. */ - int movedMask; /* This contains an event mask for the - three events MOUSEMOVED, - LMOUSEDRAGGED, and RMOUSEDRAGGED. - It says whether driver should - generate those events. */ - int AALastEventSent; /* timestamp for wait cursor */ - int AALastEventConsumed; /* timestamp for wait cursor */ - ev_lock_data_t waitCursorSema; /* protects wait cursor fields */ - int waitCursorUp; /* Is wait cursor up? */ - char ctxtTimedOut; /* Has wait cursor timer expired? */ - char waitCursorEnabled; /* Play wait cursor game (per ctxt)? */ - char globalWaitCursorEnabled; /* Play wait cursor game (global)? */ - int waitThreshold; /* time before wait cursor appears */ - NXEQElement lleq[LLEQSIZE]; /* The event queue itself */ -} EvGlobals; -#endif - -/* These evio structs are used in various calls supported by the ev driver. */ - -struct evioLLEvent { - int setCursor; - int type; - IOGPoint location; - NXEventData data; - int setFlags; - int flags; -}; - -typedef struct evioLLEvent _NXLLEvent; - -#ifdef mach3xxx - -/* - * On a keypress of a VOL UP or VOL DOWN key, we send a message to the - * sound server to notify it of the volume change. The message includes - * a flag to indicate which key was pressed, and the machine independant - * flag bits to indicate which modifier keys were pressed. - */ - -struct evioSpecialKeyMsg -{ - msg_header_t Head; - msg_type_t keyType; - int key; // special key number, from bsd/dev/ev_keymap.h - msg_type_t directionType; - int direction; // NX_KEYDOWN, NX_KEYUP from event.h - msg_type_t flagsType; - int flags; // device independant flags from event.h - msg_type_t levelType; - int level; // EV_AUDIO_MIN_VOLUME to EV_AUDIO_MAX_VOLUME -}; -#else -struct evioSpecialKeyMsg -{ - mach_msg_header_t Head; - int key; // special key number, from bsd/dev/ev_keymap.h - int direction; // NX_KEYDOWN, NX_KEYUP from event.h - int flags; // device independant flags from event.h - int level; // EV_AUDIO_MIN_VOLUME to EV_AUDIO_MAX_VOLUME -}; -#endif - -#define EV_SPECIAL_KEY_MSG_ID (('S'<<24) | ('k'<<16) | ('e'<<8) | ('y')) -typedef struct evioSpecialKeyMsg *evioSpecialKeyMsg_t; - -/* - * Volume ranges - */ -#define EV_AUDIO_MIN_VOLUME 0 -#define EV_AUDIO_MAX_VOLUME 64 - -#define kIOHIDSystemClass "IOHIDSystem" -#define kIOHIKeyboardClass "IOHIKeyboard" -#define kIOHIPointingClass "IOHIPointing" - -#define IOHIDSYSTEM_CONFORMSTO kIOHIDSystemClass - -enum { - kIOHIDCurrentShmemVersion = 3, - kIOHIDEventNotification = 0, -}; - -enum { - kIOHIDServerConnectType = 0, - kIOHIDParamConnectType = 1, - kIOHIDEventSystemConnectType = 3, -}; - -enum { - kIOHIDGlobalMemory = 0 -}; - -enum { - kIOHIDEventQueueTypeKernel = 0, - kIOHIDEventQueueTypeUser = 1 -}; - -#ifdef KERNEL -typedef UInt16 (*MasterVolumeUpdate)(void); -typedef bool (*MasterMuteUpdate)(void); - -typedef struct { - MasterVolumeUpdate incrementMasterVolume; - MasterVolumeUpdate decrementMasterVolume; - MasterMuteUpdate toggleMasterMute; -} MasterAudioFunctions; - -extern MasterAudioFunctions *masterAudioFunctions; -#endif - -#ifndef KERNEL -#ifndef _IOKIT_IOHIDLIB_H -#include <IOKit/hidsystem/IOHIDLib.h> -#endif -#endif /* !KERNEL */ - -__END_DECLS - - -#endif /* !_DEV_EVIO_H */ diff --git a/i386/include/IOKit/hidsystem/IOHIDSystem.h b/i386/include/IOKit/hidsystem/IOHIDSystem.h deleted file mode 100644 index 1a78a38..0000000 --- a/i386/include/IOKit/hidsystem/IOHIDSystem.h +++ /dev/null @@ -1,785 +0,0 @@ -/* - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2009 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. - * - * EventDriver.h - Exported Interface Event Driver object. - * - * The EventDriver is a pseudo-device driver. - * - * HISTORY - * 19 Mar 1992 Mike Paquette at NeXT - * Created. - * 4 Aug 1993 Erik Kay at NeXT - * API cleanup - */ - -#ifndef _IOHIDSYSTEM_H -#define _IOHIDSYSTEM_H - -#include <TargetConditionals.h> -#include <IOKit/IOTimerEventSource.h> -#include <IOKit/IOInterruptEventSource.h> -#include <IOKit/IOService.h> -#include <IOKit/IOMessage.h> -#include <IOKit/IOUserClient.h> -#include <IOKit/IOWorkLoop.h> -#include <IOKit/IOCommandGate.h> -#include <IOKit/IOBufferMemoryDescriptor.h> -#include <IOKit/pwr_mgt/IOPM.h> -#if TARGET_OS_EMBEDDED -class IOGraphicsDevice; -#else -#include <IOKit/graphics/IOGraphicsDevice.h> -#endif -#include <IOKit/hidsystem/IOHIDevice.h> -#include <IOKit/hidsystem/IOHIDShared.h> -#include <IOKit/hidsystem/IOHIDTypes.h> -#include <IOKit/hidsystem/IOLLEvent.h> -#include <IOKit/IODataQueue.h> -#include <IOKit/hidsystem/ev_keymap.h> /* For NX_NUM_SCANNED_SPECIALKEYS */ - - -// The following messages should be unique across the entire system -#ifndef sub_iokit_hidsystem -#define sub_iokit_hidsystem err_sub(14) -#endif - -#define kIOHIDSystem508MouseClickMessage iokit_family_msg(sub_iokit_hidsystem, 1) -#define kIOHIDSystemDeviceSeizeRequestMessage iokit_family_msg(sub_iokit_hidsystem, 2) -#define kIOHIDSystem508SpecialKeyDownMessage iokit_family_msg(sub_iokit_hidsystem, 3) - -class IOHIDKeyboardDevice; -class IOHIDPointingDevice; -class IOHIDEvent; - -class IOHIDSystem : public IOService -{ - OSDeclareDefaultStructors(IOHIDSystem); - - friend class IOHIDUserClient; - friend class IOHIDParamUserClient; - friend class IOHIDEventSystemUserClient; - -private: - IOWorkLoop * workLoop; - IOTimerEventSource * timerES; - IOTimerEventSource * vblES; - IOInterruptEventSource * eventConsumerES; - IOInterruptEventSource * keyboardEQES; - IOCommandGate * cmdGate; - IOUserClient * serverConnect; - IOUserClient * paramConnect; - IONotifier * eventPublishNotify; - IONotifier * eventTerminateNotify; - IONotifier * publishNotify; - IONotifier * terminateNotify; - - OSArray * ioHIDevices; - OSSet * touchEventPosters; - - // Ports on which we hold send rights - mach_port_t eventPort; // Send msg here when event queue - // goes non-empty - mach_port_t stackShotPort; - mach_port_t _specialKeyPort[NX_NUM_SCANNED_SPECIALKEYS]; // Special key msgs - void *eventMsg; // Msg to be sent to Window Server. - void *stackShotMsg; // Msg to be sent to Stack Shot. - - // Shared memory area information - IOBufferMemoryDescriptor * globalMemory; - uintptr_t shmem_addr; // kernel address of shared memory - vm_size_t shmem_size; // size of shared memory - - // Pointers to structures which occupy the shared memory area. - volatile void *evs; // Pointer to private driver shmem - volatile EvGlobals *evg; // Pointer to EvGlobals (shmem) - // Internal variables related to the shared memory area - int lleqSize; // # of entries in low-level queue - // FIXME: why is this ivar lleqSize an ivar? {Dan] - - // Screens list - vm_size_t evScreenSize; // Byte size of evScreen array - void *evScreen; // array of screens known to driver - volatile void *lastShmemPtr; // Pointer used to index thru shmem - // while assigning shared areas to - // drivers. - int screens; // running total of allocated screens - UInt32 cursorScreens; // bit mask of screens with cursor present - UInt32 cursorPinScreen;// a screen to pin against - IOGBounds cursorPin; // Range to which cursor is pinned - // while on this screen. - IOGBounds workSpace; // IOGBounds of full workspace. - // Event Status state - This includes things like event timestamps, - // time til screen dim, and related things manipulated through the - // Event Status API. - // - IOGPoint pointerLoc; // Current pointing device location - // The value leads evg->cursorLoc. - IOGPoint pointerDelta; // The cumulative pointer delta values since - // previous mouse move event was posted - - IOGPoint clickLoc; // location of last mouse click - IOGPoint clickSpaceThresh; // max mouse delta to be a doubleclick - int clickState; // Current click state - - bool evOpenCalled; // Has the driver been opened? - bool evInitialized; // Has the first-open-only initialization run? - bool evStateChanging; // Is the event system state changing. - bool eventsOpen; // Boolean: has evmmap been called yet? - bool cursorStarted; // periodic events running? - bool cursorEnabled; // cursor positioning ok? - bool cursorCoupled; // cursor positioning on pointer moves ok? - bool cursorPinned; // cursor positioning on pointer moves ok? - - short leftENum; // Unique ID for last left down event - short rightENum; // Unique ID for last right down event - - // The periodic event mechanism timestamps and state - // are recorded here. - AbsoluteTime thisPeriodicRun; - AbsoluteTime periodicEventDelta;// Time between periodic events - // todo: make infinite - AbsoluteTime clickTime; // Timestamps used to determine doubleclicks - AbsoluteTime clickTimeThresh; - - AbsoluteTime waitSustain; // Sustain time before removing cursor - AbsoluteTime waitSusTime; // Sustain counter - AbsoluteTime waitFrameRate; // Ticks per wait cursor frame - AbsoluteTime waitFrameTime; // Wait cursor frame timer - - AbsoluteTime lastRelativeEventTime; // Used to post mouse events once per frame - AbsoluteTime lastRelativeMoveTime; - AbsoluteTime lastEventTime; - AbsoluteTime lastUndimEvent; - SInt32 postDeltaX, accumDX; - SInt32 postDeltaY, accumDY; - - // Flags used in scheduling periodic event callbacks - bool needSetCursorPosition; - bool needToKickEventConsumer; - - IOService * displayManager; // points to display manager - IOPMPowerFlags displayState; - - IOService * rootDomain; - AbsoluteTime stateChangeDeadline; - - OSDictionary * savedParameters; // keep user settings - - const char * registryName; // cache our name - UInt32 maxWaitCursorFrame; // animation frames - UInt32 firstWaitCursorFrame; // - - int cachedEventFlags; - OSArray * cachedButtonStates; - - OSArray * systemInfo; - - IOHIDPointingDevice * _hidPointingDevice; - IOHIDKeyboardDevice * _hidKeyboardDevice; - - unsigned consumedKeyCode; - - OSObject * lastSender; - - UInt32 scrollZoomMask; - - bool setParamPropertiesInProgress; - - OSSet * dataQueueSet; - -private: - void vblEvent(void); - UInt8 getSubtypeForSender(OSObject * sender); - void updateMouseEventForSender(OSObject * sender, NXEventData * evData); - void updateMouseMoveEventForSender(OSObject * sender, NXEventData * evData); - void updateScrollEventForSender(OSObject * sender, NXEventData * evData); - static void _vblEvent(OSObject *self, IOTimerEventSource *sender); - - inline short getUniqueEventNum(); - - virtual IOReturn powerStateDidChangeTo( IOPMPowerFlags, unsigned long, IOService * ); - /* Resets */ - void _resetMouseParameters(); - - /* Initialize the shared memory area */ - void initShmem(bool clean); - /* Dispatch low level events through shared memory to the WindowServer */ - void postEvent(int what, - /* at */ IOGPoint * location, - /* atTime */ AbsoluteTime ts, - /* withData */ NXEventData * myData, - /* sender */ OSObject * sender = 0, - /* pid */ UInt32 extPID = 0, - /* processKEQ*/bool processKEQ = true); - /* Dispatch mechanisms for screen state changes */ - void evDispatch( - /* command */ EvCmd evcmd); - /* Dispatch mechanism for special key press */ - void evSpecialKeyMsg(unsigned key, - /* direction */ unsigned dir, - /* flags */ unsigned f, - /* level */ unsigned l); - /* Message the event consumer to process posted events */ - void kickEventConsumer(); - void sendStackShotMessage(); - - OSDictionary * createFilteredParamPropertiesForService(IOService * service, OSDictionary * dict); - - static void _periodicEvents(IOHIDSystem * self, - IOTimerEventSource *timer); - - static void doSpecialKeyMsg(IOHIDSystem * self, - struct evioSpecialKeyMsg *msg); - static void doKickEventConsumer(IOHIDSystem * self); - - static void doProcessKeyboardEQ(IOHIDSystem * self); - static void processKeyboardEQ(IOHIDSystem * self, AbsoluteTime * deadline = 0); - - static bool genericNotificationHandler( void * target, - void * ref, IOService * newService ); - - static bool handlePublishNotification( void * target, IOService * newService ); - - static bool handleTerminateNotification( void * target, IOService * service ); - - static void makeNumberParamProperty( OSDictionary * dict, const char * key, - unsigned long long number, unsigned int bits ); - - static void makeInt32ArrayParamProperty( OSDictionary * dict, const char * key, - UInt32 * array, unsigned int count ); - -/* - * HISTORICAL NOTE: - * The following methods were part of the IOHIDSystem(Input) category; - * the declarations have now been merged directly into this class. - * - * Exported Interface Event Driver object input services. - */ - -private: - // Schedule next periodic run based on current event system state. - void scheduleNextPeriodicEvent(); - // Message invoked to run periodic events. This method runs in the workloop. - void periodicEvents(IOTimerEventSource *timer); - // Start the cursor running. - bool startCursor(); - // Repin cursor location. - bool resetCursor(); - // Wait Cursor machinery. - void showWaitCursor(); - void hideWaitCursor(); - void animateWaitCursor(); - void changeCursor(int frame); - // Return screen number a point lies on. - int pointToScreen(IOGPoint * p); - - inline void showCursor(); - inline void hideCursor(); - inline void moveCursor(); - // Claim ownership of event sources. - void attachDefaultEventSources(); - // Give up ownership of event sources. - void detachEventSources(); - bool registerEventSource(IOService * source); - - // Set abs cursor position. - void setCursorPosition(IOGPoint * newLoc, bool external, OSObject * sender=0); - void _setButtonState(int buttons, - /* atTime */ AbsoluteTime ts, - OSObject * sender); - void _setCursorPosition(IOGPoint * newLoc, bool external, bool proximityChange = false, OSObject * sender=0); - - static bool _idleTimeSerializerCallback(void * target, void * ref, OSSerialize *s); - - void _postMouseMoveEvent(int what, - IOGPoint * location, - AbsoluteTime theClock, - OSObject * sender); - void createParameters( void ); - -/* END HISTORICAL NOTE */ - -public: - static IOHIDSystem * instance(); /* Return the current instance of the */ - /* EventDriver, or 0 if none. */ - static void scaleLocationToCurrentScreen(IOGPoint *location, IOGBounds *bounds); - - virtual bool init(OSDictionary * properties = 0); - virtual IOHIDSystem * probe(IOService * provider, - SInt32 * score); - virtual bool start(IOService * provider); - virtual IOReturn message(UInt32 type, IOService * provider, - void * argument); - virtual void free(); - virtual bool attach( IOService * provider ); - virtual void detach( IOService * provider ); - - virtual IOWorkLoop *getWorkLoop() const; - - virtual IOReturn evOpen(void); - virtual IOReturn evClose(void); - - virtual IOReturn setProperties( OSObject * properties ); - virtual IOReturn setParamProperties(OSDictionary * dict); - - /* Create the shared memory area */ - virtual IOReturn createShmem(void*,void*,void*,void*,void*,void*); - - /* register the IODataQueue for the new user events */ - virtual IOReturn registerEventQueue(IODataQueue * queue); - - /* Unregister the IODataQueue for the new user events */ - virtual IOReturn unregisterEventQueue(IODataQueue * queue); - - /* Set the port for event available notify msg */ - virtual void setEventPort(mach_port_t port); - /* Set the port for the special key keypress msg */ - virtual IOReturn setSpecialKeyPort( - /* keyFlavor */ int special_key, - /* keyPort */ mach_port_t key_port); - virtual mach_port_t specialKeyPort(int special_key); - - - virtual IOReturn newUserClient(task_t owningTask, - /* withToken */ void * security_id, - /* ofType */ UInt32 type, - /* withProps*/ OSDictionary * properties, - /* client */ IOUserClient ** handler); - -/* - * HISTORICAL NOTE: - * The following methods were part of the IOHIPointingEvents protocol; - * the declarations have now been merged directly into this class. - */ - -public: - /* Mouse event reporting */ - virtual void relativePointerEvent(int buttons, - /* deltaX */ int dx, - /* deltaY */ int dy, - /* atTime */ AbsoluteTime ts); - - /* Tablet event reporting */ - virtual void absolutePointerEvent(int buttons, - /* at */ IOGPoint * newLoc, - /* withBounds */ IOGBounds *bounds, - /* inProximity */ bool proximity, - /* withPressure */ int pressure, - /* withAngle */ int stylusAngle, - /* atTime */ AbsoluteTime ts); - - /* Mouse scroll wheel event reporting */ - virtual void scrollWheelEvent(short deltaAxis1, - short deltaAxis2, - short deltaAxis3, - AbsoluteTime ts); - - - virtual void tabletEvent(NXEventData *tabletData, - AbsoluteTime ts); - - virtual void proximityEvent(NXEventData *proximityData, - AbsoluteTime ts); - -/* - * HISTORICAL NOTE: - * The following methods were part of the IOHIKeyboardEvents protocol; - * the declarations have now been merged directly into this class. - */ - -public: - virtual void keyboardEvent(unsigned eventType, - /* flags */ unsigned flags, - /* keyCode */ unsigned key, - /* charCode */ unsigned charCode, - /* charSet */ unsigned charSet, - /* originalCharCode */ unsigned origCharCode, - /* originalCharSet */ unsigned origCharSet, - /* keyboardType */ unsigned keyboardType, - /* repeat */ bool repeat, - /* atTime */ AbsoluteTime ts); - - virtual void keyboardSpecialEvent( unsigned eventType, - /* flags */ unsigned flags, - /* keyCode */ unsigned key, - /* specialty */ unsigned flavor, - /* guid */ UInt64 guid, - /* repeat */ bool repeat, - /* atTime */ AbsoluteTime ts); - - virtual void updateEventFlags(unsigned flags); /* Does not generate events */ - - - - -private: - - /* - * statics for upstream callouts - */ - - void _scaleLocationToCurrentScreen(IOGPoint *location, IOGPoint *fraction, IOGBounds *bounds); // Should this one be public??? - - static void _relativePointerEvent(IOHIDSystem * self, - int buttons, - /* deltaX */ int dx, - /* deltaY */ int dy, - /* atTime */ AbsoluteTime ts, - OSObject * sender, - void * refcon); - - /* Tablet event reporting */ - static void _absolutePointerEvent(IOHIDSystem * self, - int buttons, - /* at */ IOGPoint * newLoc, - /* withBounds */ IOGBounds *bounds, - /* inProximity */ bool proximity, - /* withPressure */ int pressure, - /* withAngle */ int stylusAngle, - /* atTime */ AbsoluteTime ts, - OSObject * sender, - void * refcon); - - /* Mouse scroll wheel event reporting */ - static void _scrollWheelEvent( IOHIDSystem *self, - short deltaAxis1, - short deltaAxis2, - short deltaAxis3, - IOFixed fixedDelta1, - IOFixed fixedDelta2, - IOFixed fixedDelta3, - SInt32 pointDeltaAxis1, - SInt32 pointDeltaAxis2, - SInt32 pointDeltaAxis3, - UInt32 options, - AbsoluteTime ts, - OSObject * sender, - void * refcon); - - static void _tabletEvent( IOHIDSystem *self, - NXEventData *tabletData, - AbsoluteTime ts, - OSObject * sender, - void * refcon); - - static void _proximityEvent( IOHIDSystem *self, - NXEventData *proximityData, - AbsoluteTime ts, - OSObject * sender, - void * refcon); - - static void _keyboardEvent( IOHIDSystem * self, - unsigned eventType, - /* flags */ unsigned flags, - /* keyCode */ unsigned key, - /* charCode */ unsigned charCode, - /* charSet */ unsigned charSet, - /* originalCharCode */ unsigned origCharCode, - /* originalCharSet */ unsigned origCharSet, - /* keyboardType */ unsigned keyboardType, - /* repeat */ bool repeat, - /* atTime */ AbsoluteTime ts, - OSObject * sender, - void * refcon); - - static void _keyboardSpecialEvent(IOHIDSystem * self, - unsigned eventType, - /* flags */ unsigned flags, - /* keyCode */ unsigned key, - /* specialty */ unsigned flavor, - /* guid */ UInt64 guid, - /* repeat */ bool repeat, - /* atTime */ AbsoluteTime ts, - OSObject * sender, - void * refcon); - - static void _updateEventFlags( IOHIDSystem * self, - unsigned flags, - OSObject * sender, - void * refcon); /* Does not generate events */ - - -/* - * HISTORICAL NOTE: - * The following methods were part of the IOUserClient protocol; - * the declarations have now been merged directly into this class. - */ - -public: - - virtual IOReturn setEventsEnable(void*,void*,void*,void*,void*,void*); - virtual IOReturn setCursorEnable(void*,void*,void*,void*,void*,void*); - virtual IOReturn extPostEvent(void*,void*,void*,void*,void*,void*); - virtual IOReturn extSetMouseLocation(void*,void*,void*,void*,void*,void*); - virtual IOReturn extGetButtonEventNum(void*,void*,void*,void*,void*,void*); - IOReturn extSetBounds( IOGBounds * bounds ); - IOReturn extGetModifierLockState(void*,void*,void*,void*,void*,void*); - IOReturn extSetModifierLockState(void*,void*,void*,void*,void*,void*); - -/* - * HISTORICAL NOTE: - * The following methods were part of the IOScreenRegistration protocol; - * the declarations have now been merged directly into this class. - * - * Methods exported by the EventDriver for display systems. - * - * The screenRegister protocol is used by frame buffer drivers to register - * themselves with the Event Driver. These methods are called in response - * to an _IOGetParameterInIntArray() call with "IO_Framebuffer_Register" or - * "IO_Framebuffer_Unregister". - */ - -public: - virtual int registerScreen(IOGraphicsDevice * instance, - /* bounds */ IOGBounds * bp); -// /* shmem */ void ** addr, -// /* size */ int * size) - virtual void unregisterScreen(int index); - -/* - * HISTORICAL NOTE: - * The following methods were part of the IOWorkspaceBounds protocol; - * the declarations have now been merged directly into this class. - * - * Absolute position input devices and some specialized output devices - * may need to know the bounding rectangle for all attached displays. - * The following method returns a IOGBounds* for the workspace. Please note - * that the bounds are kept as signed values, and that on a multi-display - * system the minx and miny values may very well be negative. - */ - -public: - virtual IOGBounds * workspaceBounds(); - -/* END HISTORICAL NOTES */ - -private: -void relativePointerEvent( int buttons, - /* deltaX */ int dx, - /* deltaY */ int dy, - /* atTime */ AbsoluteTime ts, - /* senderID */ OSObject * sender); - - /* Tablet event reporting */ -void absolutePointerEvent( int buttons, - /* at */ IOGPoint * newLoc, - /* withBounds */ IOGBounds *bounds, - /* inProximity */ bool proximity, - /* withPressure */ int pressure, - /* withAngle */ int stylusAngle, - /* atTime */ AbsoluteTime ts, - /* senderID */ OSObject * sender); - - /* Mouse scroll wheel event reporting */ -void scrollWheelEvent( short deltaAxis1, - short deltaAxis2, - short deltaAxis3, - IOFixed fixedDelta1, - IOFixed fixedDelta2, - IOFixed fixedDelta3, - SInt32 pointDeltaAxis1, - SInt32 pointDeltaAxis2, - SInt32 pointDeltaAxis3, - UInt32 options, - AbsoluteTime ts, - OSObject * sender); - -void tabletEvent( NXEventData * tabletData, - AbsoluteTime ts, - OSObject * sender); - -void proximityEvent( NXEventData * proximityData, - AbsoluteTime ts, - OSObject * sender); - -void keyboardEvent(unsigned eventType, - /* flags */ unsigned flags, - /* keyCode */ unsigned key, - /* charCode */ unsigned charCode, - /* charSet */ unsigned charSet, - /* originalCharCode */ unsigned origCharCode, - /* originalCharSet */ unsigned origCharSet, - /* keyboardType */ unsigned keyboardType, - /* repeat */ bool repeat, - /* atTime */ AbsoluteTime ts, - /* sender */ OSObject * sender); - -void keyboardSpecialEvent( unsigned eventType, - /* flags */ unsigned flags, - /* keyCode */ unsigned key, - /* specialty */ unsigned flavor, - /* guid */ UInt64 guid, - /* repeat */ bool repeat, - /* atTime */ AbsoluteTime ts, - /* sender */ OSObject * sender); - -void updateEventFlags(unsigned flags, OSObject * sender); - -/* - * COMMAND GATE COMPATIBILITY: - * The following method is part of the work needed to make IOHIDSystem - * compatible with IOCommandGate. The use of IOCommandQueue has been - * deprecated, thus requiring this move. This should allow for less - * context switching as all actions formerly run on the I/O Workloop - * thread, will now be run on the caller thread. The static methods - * will be called from cmdGate->runAction and returns the appropriate - * non-static helper method. Arguments are stored in the void* array, - * args, and are passed through. Since we are returning in the static - * function, gcc3 should translate that to one instruction, thus - * minimizing cost. - */ - -static IOReturn doEvClose (IOHIDSystem *self); - IOReturn evCloseGated (void); - -static IOReturn doSetEventsEnablePre (IOHIDSystem *self, void *p1); - IOReturn setEventsEnablePreGated (void *p1); - -static IOReturn doSetEventsEnablePost (IOHIDSystem *self, void *p1); - IOReturn setEventsEnablePostGated (void *p1); - -static IOReturn doUnregisterScreen (IOHIDSystem *self, void * arg0); - void unregisterScreenGated (int index); - -static IOReturn doCreateShmem (IOHIDSystem *self, void * arg0); - IOReturn createShmemGated (void * p1); - -static IOReturn doRegisterEventQueue (IOHIDSystem *self, void * arg0); - IOReturn registerEventQueueGated (void * p1); - -static IOReturn doUnregisterEventQueue (IOHIDSystem *self, void * arg0); - IOReturn unregisterEventQueueGated (void * p1); - -static IOReturn doRelativePointerEvent (IOHIDSystem *self, void * args); - void relativePointerEventGated(int buttons, - int dx, - int dy, - AbsoluteTime ts, - OSObject * sender); - -static IOReturn doAbsolutePointerEvent (IOHIDSystem *self, void * args); - void absolutePointerEventGated (int buttons, - IOGPoint * newLoc, - IOGBounds *bounds, - bool proximity, - int pressure, - int stylusAngle, - AbsoluteTime ts, - OSObject * sender); - -static IOReturn doScrollWheelEvent(IOHIDSystem *self, void * args); - void scrollWheelEventGated (short deltaAxis1, - short deltaAxis2, - short deltaAxis3, - IOFixed fixedDelta1, - IOFixed fixedDelta2, - IOFixed fixedDelta3, - SInt32 pointDeltaAxis1, - SInt32 pointDeltaAxis2, - SInt32 pointDeltaAxis3, - UInt32 options, - AbsoluteTime ts, - OSObject * sender); - -static IOReturn doTabletEvent (IOHIDSystem *self, void * arg0, void * arg1, void * arg2); - void tabletEventGated ( NXEventData *tabletData, - AbsoluteTime ts, - OSObject * sender); - -static IOReturn doProximityEvent (IOHIDSystem *self, void * arg0, void * arg1, void * arg2); - void proximityEventGated ( NXEventData *proximityData, - AbsoluteTime ts, - OSObject * sender); - -static IOReturn doKeyboardEvent (IOHIDSystem *self, void * args); - void keyboardEventGated (unsigned eventType, - unsigned flags, - unsigned key, - unsigned charCode, - unsigned charSet, - unsigned origCharCode, - unsigned origCharSet, - unsigned keyboardType, - bool repeat, - AbsoluteTime ts, - OSObject * sender); - -static IOReturn doKeyboardSpecialEvent (IOHIDSystem *self, void * args); - void keyboardSpecialEventGated ( - unsigned eventType, - unsigned flags, - unsigned key, - unsigned flavor, - UInt64 guid, - bool repeat, - AbsoluteTime ts, - OSObject * sender); - -static IOReturn doUpdateEventFlags (IOHIDSystem *self, void * args); - void updateEventFlagsGated (unsigned flags, OSObject * sender); - -static IOReturn doNewUserClient (IOHIDSystem *self, void * args); - IOReturn newUserClientGated (task_t owningTask, - void * security_id, - UInt32 type, - OSDictionary * properties, - IOUserClient ** handler); - -static IOReturn doSetCursorEnable (IOHIDSystem *self, void * arg0); - IOReturn setCursorEnableGated (void * p1); - -static IOReturn doExtPostEvent(IOHIDSystem *self, void * arg0, void * arg1, void * arg2, void * arg3); - IOReturn extPostEventGated (void * p1, void * p2, void * p3); - -static IOReturn doExtSetMouseLocation (IOHIDSystem *self, void * args); - IOReturn extSetMouseLocationGated (void * args); - -static IOReturn doExtGetButtonEventNum (IOHIDSystem *self, void * arg0, void * arg1); - IOReturn extGetButtonEventNumGated (void * p1, void * p2); - -static IOReturn doSetParamPropertiesPre (IOHIDSystem *self, void * arg0, void * arg1); - IOReturn setParamPropertiesPreGated (OSDictionary * dict, OSIterator ** pOpenIter); - -static IOReturn doSetParamPropertiesPost (IOHIDSystem *self, void * arg0); - IOReturn setParamPropertiesPostGated (OSDictionary * dict); - -static IOReturn doExtGetToggleState (IOHIDSystem *self, void *p1, void *p2); -static IOReturn doExtSetToggleState (IOHIDSystem *self, void *p1, void *p2); - IOReturn getCapsLockState(unsigned int *state_O); - IOReturn setCapsLockState(unsigned int state_I); - IOReturn getNumLockState(unsigned int *state_O); - IOReturn setNumLockState(unsigned int state_I); - -/* END COMMAND GATE COMPATIBILITY */ - -public: - virtual void setStackShotPort(mach_port_t port); - - virtual UInt32 eventFlags(); - - virtual void dispatchEvent(IOHIDEvent *event, IOOptionBits options=0); - -}; - -#endif /* !_IOHIDSYSTEM_H */ diff --git a/i386/include/IOKit/hidsystem/IOHIDTypes.h b/i386/include/IOKit/hidsystem/IOHIDTypes.h deleted file mode 100644 index 786af07..0000000 --- a/i386/include/IOKit/hidsystem/IOHIDTypes.h +++ /dev/null @@ -1,171 +0,0 @@ -/* - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/****************************************************************************** - ev_types.h - Data types for the events status driver. - This file contains public API. - mpaque 11Oct91 - - Copyright 1991 NeXT Computer, Inc. - - Modified: - -******************************************************************************/ - -#ifndef _DEV_EV_TYPES_H -#define _DEV_EV_TYPES_H - -#include <mach/boolean.h> -#include <IOKit/IOSharedLock.h> -#include <IOKit/graphics/IOGraphicsTypes.h> - -/* Shared memory versions */ -#define EVENT_SYSTEM_VERSION 2 - -/* Maximum length of SetMouseScaling arrays */ -#define NX_MAXMOUSESCALINGS 20 - -typedef struct evsioKeymapping /* Match old struct names in kernel */ -{ - int size; - char *mapping; -} NXKeyMapping; - -typedef struct evsioMouseScaling /* Match old struct names in kernel */ -{ - int numScaleLevels; - short scaleThresholds[NX_MAXMOUSESCALINGS]; - short scaleFactors[NX_MAXMOUSESCALINGS]; -} NXMouseScaling; - -typedef enum { - NX_OneButton, - NX_LeftButton, - NX_RightButton -} NXMouseButton; - -/* - * NXEventSystemInfo() information structures. These are designed to - * allow for expansion. - * - * The current implementation of NXEventSystemInfo() uses an ioctl call. - * THIS WILL CHANGE. - */ - -/* - * Generic query max size and typedefs. - * - * The maximum size is selected to support anticipated future extensions - * of request flavors. Certain flavors planned for future releases may - * require roughtly 800 ints to represent. We allow a little extra, in - * case further growth is needed. - */ -typedef int *NXEventSystemInfoType; -#define NX_EVS_INFO_MAX (1024) /* Max array size */ -typedef int NXEventSystemInfoData[NX_EVS_INFO_MAX]; - -/* Event System Devices query */ -#define NX_EVS_DEVICE_MAX 16 - - /* Interface types */ -#define NX_EVS_DEVICE_INTERFACE_OTHER 0 -#define NX_EVS_DEVICE_INTERFACE_NeXT 1 // NeXT custom, in older sys -#define NX_EVS_DEVICE_INTERFACE_ADB 2 // NeXT/fruit keybds/mice -#define NX_EVS_DEVICE_INTERFACE_ACE 3 // For x86 PC keyboards -#define NX_EVS_DEVICE_INTERFACE_SERIAL_ACE 4 // For PC serial mice -#define NX_EVS_DEVICE_INTERFACE_BUS_ACE 5 // For PC bus mice -#define NX_EVS_DEVICE_INTERFACE_HIL 6 // For HIL hp keyboard -#define NX_EVS_DEVICE_INTERFACE_TYPE5 7 // For Sun Type5 keyboard - -/* - * Note! if any new interface types are added above, the following - * definition of the number of interfaces supported must reflect this. - * This is used in the libkeymap project (storemap.c module) which needs - * to be cognizant of the number of new devices coming online - * via support for heterogeneous architecture platforms. - * e.g., PCs, HP's HIL, Sun's Type5 keyboard,... - */ -#define NUM_SUPPORTED_INTERFACES (NX_EVS_DEVICE_INTERFACE_TYPE5 + 1) - // Other, NeXT, ADB, ACE,... - - /* Device types */ -#define NX_EVS_DEVICE_TYPE_OTHER 0 -#define NX_EVS_DEVICE_TYPE_KEYBOARD 1 -#define NX_EVS_DEVICE_TYPE_MOUSE 2 // Relative position devices -#define NX_EVS_DEVICE_TYPE_TABLET 3 // Absolute position devices - -typedef struct { - int interface; /* NeXT, ADB, other */ - int interface_addr; /* Device address on the interface */ - int dev_type; /* Keyboard, mouse, tablet, other */ - int id; /* manufacturer's device handler ID */ -} NXEventSystemDevice; - -typedef struct { - NXEventSystemDevice dev[NX_EVS_DEVICE_MAX]; -} NXEventSystemDeviceList; - -#define __OLD_NX_EVS_DEVICE_INFO 1 -#define NX_EVS_DEVICE_INFO "Evs_EventDeviceInfo" -#define NX_EVS_DEVICE_INFO_COUNT \ - (sizeof (NXEventSystemDeviceList) / sizeof (int)) - -/* - * Types used in evScreen protocol compliant operations. - */ - -typedef enum {EVNOP, EVHIDE, EVSHOW, EVMOVE, EVLEVEL} EvCmd; /* Cursor state */ - -#define EV_SCREEN_MIN_BRIGHTNESS 0 -#define EV_SCREEN_MAX_BRIGHTNESS 64 -/* Scale should lie between MIN_BRIGHTNESS and MAX_BRIGHTNESS */ -#define EV_SCALE_BRIGHTNESS( scale, datum ) \ - ((((UInt32)(datum))*((UInt32)scale)) >> 6) - -/* - * Definition of a tick, as a time in milliseconds. This controls how - * often the event system periodic jobs are run. All actual tick times - * are derived from the nanosecond timer. These values are typically used - * as part of computing mouse velocity for acceleration purposes. - */ -#define EV_TICK_TIME 16 /* 16 milliseconds */ -#define EV_TICKS_PER_SEC (1000/EV_TICK_TIME) /* ~ 62 Hz */ - -/* Mouse Button bits, as passed from an EventSrc to the Event Driver */ -#define EV_RB (0x01) -#define EV_LB (0x04) -#define EV_MOUSEBUTTONMASK (EV_LB | EV_RB) - -/* Tablet Pressure Constants, as passed from an EventSrc to the Event Driver */ -#define EV_MINPRESSURE 0 -#define EV_MAXPRESSURE 255 - -/* Cursor size in pixels */ -#define EV_CURSOR_WIDTH 16 -#define EV_CURSOR_HEIGHT 16 - - -#define kAppleOnboardGUID 0x0610000000000000ULL - -#endif /* !_DEV_EV_TYPES_H */ - diff --git a/i386/include/IOKit/hidsystem/IOHIDUsageTables.h b/i386/include/IOKit/hidsystem/IOHIDUsageTables.h deleted file mode 100644 index ff0fd88..0000000 --- a/i386/include/IOKit/hidsystem/IOHIDUsageTables.h +++ /dev/null @@ -1,1665 +0,0 @@ -/* - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _IOHIDUSAGETABLES_H -#define _IOHIDUSAGETABLES_H - -/* ****************************************************************************************** - * HID Usage Tables - * - * The following constants are from the USB 'HID Usage Tables' specification, revision 1.1rc3 - * ****************************************************************************************** */ - - -/* Usage Pages */ -enum -{ - kHIDPage_Undefined = 0x00, - kHIDPage_GenericDesktop = 0x01, - kHIDPage_Simulation = 0x02, - kHIDPage_VR = 0x03, - kHIDPage_Sport = 0x04, - kHIDPage_Game = 0x05, - /* Reserved 0x06 */ - kHIDPage_KeyboardOrKeypad = 0x07, /* USB Device Class Definition for Human Interface Devices (HID). Note: the usage type for all key codes is Selector (Sel). */ - kHIDPage_LEDs = 0x08, - kHIDPage_Button = 0x09, - kHIDPage_Ordinal = 0x0A, - kHIDPage_Telephony = 0x0B, - kHIDPage_Consumer = 0x0C, - kHIDPage_Digitizer = 0x0D, - /* Reserved 0x0E */ - kHIDPage_PID = 0x0F, /* USB Physical Interface Device definitions for force feedback and related devices. */ - kHIDPage_Unicode = 0x10, - /* Reserved 0x11 - 0x13 */ - kHIDPage_AlphanumericDisplay = 0x14, - /* Reserved 0x15 - 0x7F */ - /* Monitor 0x80 - 0x83 USB Device Class Definition for Monitor Devices */ - /* Power 0x84 - 0x87 USB Device Class Definition for Power Devices */ - kHIDPage_PowerDevice = 0x84, /* Power Device Page */ - kHIDPage_BatterySystem = 0x85, /* Battery System Page */ - /* Reserved 0x88 - 0x8B */ - kHIDPage_BarCodeScanner = 0x8C, /* (Point of Sale) USB Device Class Definition for Bar Code Scanner Devices */ - kHIDPage_WeighingDevice = 0x8D, /* (Point of Sale) USB Device Class Definition for Weighing Devices */ - kHIDPage_Scale = 0x8D, /* (Point of Sale) USB Device Class Definition for Scale Devices */ - kHIDPage_MagneticStripeReader = 0x8E, - /* ReservedPointofSalepages 0x8F */ - kHIDPage_CameraControl = 0x90, /* USB Device Class Definition for Image Class Devices */ - kHIDPage_Arcade = 0x91, /* OAAF Definitions for arcade and coinop related Devices */ - /* Reserved 0x92 - 0xFEFF */ - /* VendorDefined 0xFF00 - 0xFFFF */ - kHIDPage_VendorDefinedStart = 0xFF00 -}; - -/* Undefined Usage for all usage pages */ -enum -{ - kHIDUsage_Undefined = 0x00 -}; - -/* GenericDesktop Page (0x01) */ -enum -{ - kHIDUsage_GD_Pointer = 0x01, /* Physical Collection */ - kHIDUsage_GD_Mouse = 0x02, /* Application Collection */ - /* 0x03 Reserved */ - kHIDUsage_GD_Joystick = 0x04, /* Application Collection */ - kHIDUsage_GD_GamePad = 0x05, /* Application Collection */ - kHIDUsage_GD_Keyboard = 0x06, /* Application Collection */ - kHIDUsage_GD_Keypad = 0x07, /* Application Collection */ - kHIDUsage_GD_MultiAxisController = 0x08, /* Application Collection */ - /* 0x09 - 0x2F Reserved */ - kHIDUsage_GD_X = 0x30, /* Dynamic Value */ - kHIDUsage_GD_Y = 0x31, /* Dynamic Value */ - kHIDUsage_GD_Z = 0x32, /* Dynamic Value */ - kHIDUsage_GD_Rx = 0x33, /* Dynamic Value */ - kHIDUsage_GD_Ry = 0x34, /* Dynamic Value */ - kHIDUsage_GD_Rz = 0x35, /* Dynamic Value */ - kHIDUsage_GD_Slider = 0x36, /* Dynamic Value */ - kHIDUsage_GD_Dial = 0x37, /* Dynamic Value */ - kHIDUsage_GD_Wheel = 0x38, /* Dynamic Value */ - kHIDUsage_GD_Hatswitch = 0x39, /* Dynamic Value */ - kHIDUsage_GD_CountedBuffer = 0x3A, /* Logical Collection */ - kHIDUsage_GD_ByteCount = 0x3B, /* Dynamic Value */ - kHIDUsage_GD_MotionWakeup = 0x3C, /* One-Shot Control */ - kHIDUsage_GD_Start = 0x3D, /* On/Off Control */ - kHIDUsage_GD_Select = 0x3E, /* On/Off Control */ - /* 0x3F Reserved */ - kHIDUsage_GD_Vx = 0x40, /* Dynamic Value */ - kHIDUsage_GD_Vy = 0x41, /* Dynamic Value */ - kHIDUsage_GD_Vz = 0x42, /* Dynamic Value */ - kHIDUsage_GD_Vbrx = 0x43, /* Dynamic Value */ - kHIDUsage_GD_Vbry = 0x44, /* Dynamic Value */ - kHIDUsage_GD_Vbrz = 0x45, /* Dynamic Value */ - kHIDUsage_GD_Vno = 0x46, /* Dynamic Value */ - /* 0x47 - 0x7F Reserved */ - kHIDUsage_GD_SystemControl = 0x80, /* Application Collection */ - kHIDUsage_GD_SystemPowerDown = 0x81, /* One-Shot Control */ - kHIDUsage_GD_SystemSleep = 0x82, /* One-Shot Control */ - kHIDUsage_GD_SystemWakeUp = 0x83, /* One-Shot Control */ - kHIDUsage_GD_SystemContextMenu = 0x84, /* One-Shot Control */ - kHIDUsage_GD_SystemMainMenu = 0x85, /* One-Shot Control */ - kHIDUsage_GD_SystemAppMenu = 0x86, /* One-Shot Control */ - kHIDUsage_GD_SystemMenuHelp = 0x87, /* One-Shot Control */ - kHIDUsage_GD_SystemMenuExit = 0x88, /* One-Shot Control */ - kHIDUsage_GD_SystemMenu = 0x89, /* Selector */ - kHIDUsage_GD_SystemMenuRight = 0x8A, /* Re-Trigger Control */ - kHIDUsage_GD_SystemMenuLeft = 0x8B, /* Re-Trigger Control */ - kHIDUsage_GD_SystemMenuUp = 0x8C, /* Re-Trigger Control */ - kHIDUsage_GD_SystemMenuDown = 0x8D, /* Re-Trigger Control */ - /* 0x8E - 0x8F Reserved */ - kHIDUsage_GD_DPadUp = 0x90, /* On/Off Control */ - kHIDUsage_GD_DPadDown = 0x91, /* On/Off Control */ - kHIDUsage_GD_DPadRight = 0x92, /* On/Off Control */ - kHIDUsage_GD_DPadLeft = 0x93, /* On/Off Control */ - /* 0x94 - 0xFFFF Reserved */ - kHIDUsage_GD_Reserved = 0xFFFF -}; - -/* Simulation Page (0x02) */ -/* This section provides detailed descriptions of the usages employed by simulation devices. */ -enum -{ - kHIDUsage_Sim_FlightSimulationDevice = 0x01, /* Application Collection */ - kHIDUsage_Sim_AutomobileSimulationDevice = 0x02, /* Application Collection */ - kHIDUsage_Sim_TankSimulationDevice = 0x03, /* Application Collection */ - kHIDUsage_Sim_SpaceshipSimulationDevice = 0x04, /* Application Collection */ - kHIDUsage_Sim_SubmarineSimulationDevice = 0x05, /* Application Collection */ - kHIDUsage_Sim_SailingSimulationDevice = 0x06, /* Application Collection */ - kHIDUsage_Sim_MotorcycleSimulationDevice = 0x07, /* Application Collection */ - kHIDUsage_Sim_SportsSimulationDevice = 0x08, /* Application Collection */ - kHIDUsage_Sim_AirplaneSimulationDevice = 0x09, /* Application Collection */ - kHIDUsage_Sim_HelicopterSimulationDevice = 0x0A, /* Application Collection */ - kHIDUsage_Sim_MagicCarpetSimulationDevice = 0x0B, /* Application Collection */ - kHIDUsage_Sim_BicycleSimulationDevice = 0x0C, /* Application Collection */ - /* 0x0D - 0x1F Reserved */ - kHIDUsage_Sim_FlightControlStick = 0x20, /* Application Collection */ - kHIDUsage_Sim_FlightStick = 0x21, /* Application Collection */ - kHIDUsage_Sim_CyclicControl = 0x22, /* Physical Collection */ - kHIDUsage_Sim_CyclicTrim = 0x23, /* Physical Collection */ - kHIDUsage_Sim_FlightYoke = 0x24, /* Application Collection */ - kHIDUsage_Sim_TrackControl = 0x25, /* Physical Collection */ - /* 0x26 - 0xAF Reserved */ - kHIDUsage_Sim_Aileron = 0xB0, /* Dynamic Value */ - kHIDUsage_Sim_AileronTrim = 0xB1, /* Dynamic Value */ - kHIDUsage_Sim_AntiTorqueControl = 0xB2, /* Dynamic Value */ - kHIDUsage_Sim_AutopilotEnable = 0xB3, /* On/Off Control */ - kHIDUsage_Sim_ChaffRelease = 0xB4, /* One-Shot Control */ - kHIDUsage_Sim_CollectiveControl = 0xB5, /* Dynamic Value */ - kHIDUsage_Sim_DiveBrake = 0xB6, /* Dynamic Value */ - kHIDUsage_Sim_ElectronicCountermeasures = 0xB7, /* On/Off Control */ - kHIDUsage_Sim_Elevator = 0xB8, /* Dynamic Value */ - kHIDUsage_Sim_ElevatorTrim = 0xB9, /* Dynamic Value */ - kHIDUsage_Sim_Rudder = 0xBA, /* Dynamic Value */ - kHIDUsage_Sim_Throttle = 0xBB, /* Dynamic Value */ - kHIDUsage_Sim_FlightCommunications = 0xBC, /* On/Off Control */ - kHIDUsage_Sim_FlareRelease = 0xBD, /* One-Shot Control */ - kHIDUsage_Sim_LandingGear = 0xBE, /* On/Off Control */ - kHIDUsage_Sim_ToeBrake = 0xBF, /* Dynamic Value */ - kHIDUsage_Sim_Trigger = 0xC0, /* Momentary Control */ - kHIDUsage_Sim_WeaponsArm = 0xC1, /* On/Off Control */ - kHIDUsage_Sim_Weapons = 0xC2, /* Selector */ - kHIDUsage_Sim_WingFlaps = 0xC3, /* Dynamic Value */ - kHIDUsage_Sim_Accelerator = 0xC4, /* Dynamic Value */ - kHIDUsage_Sim_Brake = 0xC5, /* Dynamic Value */ - kHIDUsage_Sim_Clutch = 0xC6, /* Dynamic Value */ - kHIDUsage_Sim_Shifter = 0xC7, /* Dynamic Value */ - kHIDUsage_Sim_Steering = 0xC8, /* Dynamic Value */ - kHIDUsage_Sim_TurretDirection = 0xC9, /* Dynamic Value */ - kHIDUsage_Sim_BarrelElevation = 0xCA, /* Dynamic Value */ - kHIDUsage_Sim_DivePlane = 0xCB, /* Dynamic Value */ - kHIDUsage_Sim_Ballast = 0xCC, /* Dynamic Value */ - kHIDUsage_Sim_BicycleCrank = 0xCD, /* Dynamic Value */ - kHIDUsage_Sim_HandleBars = 0xCE, /* Dynamic Value */ - kHIDUsage_Sim_FrontBrake = 0xCF, /* Dynamic Value */ - kHIDUsage_Sim_RearBrake = 0xD0, /* Dynamic Value */ - /* 0xD1 - 0xFFFF Reserved */ - kHIDUsage_Sim_Reserved = 0xFFFF -}; - -/* VR Page (0x03) */ -/* Virtual Reality controls depend on designators to identify the individual controls. Most of the following are */ -/* usages are applied to the collections of entities that comprise the actual device. */ -enum -{ - kHIDUsage_VR_Belt = 0x01, /* Application Collection */ - kHIDUsage_VR_BodySuit = 0x02, /* Application Collection */ - kHIDUsage_VR_Flexor = 0x03, /* Physical Collection */ - kHIDUsage_VR_Glove = 0x04, /* Application Collection */ - kHIDUsage_VR_HeadTracker = 0x05, /* Physical Collection */ - kHIDUsage_VR_HeadMountedDisplay = 0x06, /* Application Collection */ - kHIDUsage_VR_HandTracker = 0x07, /* Application Collection */ - kHIDUsage_VR_Oculometer = 0x08, /* Application Collection */ - kHIDUsage_VR_Vest = 0x09, /* Application Collection */ - kHIDUsage_VR_AnimatronicDevice = 0x0A, /* Application Collection */ - /* 0x0B - 0x1F Reserved */ - kHIDUsage_VR_StereoEnable = 0x20, /* On/Off Control */ - kHIDUsage_VR_DisplayEnable = 0x21, /* On/Off Control */ - /* 0x22 - 0xFFFF Reserved */ - kHIDUsage_VR_Reserved = 0xFFFF -}; - -/* Sport Page (0x04) */ -enum -{ - kHIDUsage_Sprt_BaseballBat = 0x01, /* Application Collection */ - kHIDUsage_Sprt_GolfClub = 0x02, /* Application Collection */ - kHIDUsage_Sprt_RowingMachine = 0x03, /* Application Collection */ - kHIDUsage_Sprt_Treadmill = 0x04, /* Application Collection */ - /* 0x05 - 0x2F Reserved */ - kHIDUsage_Sprt_Oar = 0x30, /* Dynamic Value */ - kHIDUsage_Sprt_Slope = 0x31, /* Dynamic Value */ - kHIDUsage_Sprt_Rate = 0x32, /* Dynamic Value */ - kHIDUsage_Sprt_StickSpeed = 0x33, /* Dynamic Value */ - kHIDUsage_Sprt_StickFaceAngle = 0x34, /* Dynamic Value */ - kHIDUsage_Sprt_StickHeelOrToe = 0x35, /* Dynamic Value */ - kHIDUsage_Sprt_StickFollowThrough = 0x36, /* Dynamic Value */ - kHIDUsage_Sprt_StickTempo = 0x37, /* Dynamic Value */ - kHIDUsage_Sprt_StickType = 0x38, /* Named Array */ - kHIDUsage_Sprt_StickHeight = 0x39, /* Dynamic Value */ - /* 0x3A - 0x4F Reserved */ - kHIDUsage_Sprt_Putter = 0x50, /* Selector */ - kHIDUsage_Sprt_1Iron = 0x51, /* Selector */ - kHIDUsage_Sprt_2Iron = 0x52, /* Selector */ - kHIDUsage_Sprt_3Iron = 0x53, /* Selector */ - kHIDUsage_Sprt_4Iron = 0x54, /* Selector */ - kHIDUsage_Sprt_5Iron = 0x55, /* Selector */ - kHIDUsage_Sprt_6Iron = 0x56, /* Selector */ - kHIDUsage_Sprt_7Iron = 0x57, /* Selector */ - kHIDUsage_Sprt_8Iron = 0x58, /* Selector */ - kHIDUsage_Sprt_9Iron = 0x59, /* Selector */ - kHIDUsage_Sprt_10Iron = 0x5A, /* Selector */ - kHIDUsage_Sprt_11Iron = 0x5B, /* Selector */ - kHIDUsage_Sprt_SandWedge = 0x5C, /* Selector */ - kHIDUsage_Sprt_LoftWedge = 0x5D, /* Selector */ - kHIDUsage_Sprt_PowerWedge = 0x5E, /* Selector */ - kHIDUsage_Sprt_1Wood = 0x5F, /* Selector */ - kHIDUsage_Sprt_3Wood = 0x60, /* Selector */ - kHIDUsage_Sprt_5Wood = 0x61, /* Selector */ - kHIDUsage_Sprt_7Wood = 0x62, /* Selector */ - kHIDUsage_Sprt_9Wood = 0x63, /* Selector */ - /* 0x64 - 0xFFFF Reserved */ - kHIDUsage_Sprt_Reserved = 0xFFFF -}; - -/* Game Page (0x05) */ -enum -{ - kHIDUsage_Game_3DGameController = 0x01, /* Application Collection */ - kHIDUsage_Game_PinballDevice = 0x02, /* Application Collection */ - kHIDUsage_Game_GunDevice = 0x03, /* Application Collection */ - /* 0x04 - 0x1F Reserved */ - kHIDUsage_Game_PointofView = 0x20, /* Physical Collection */ - kHIDUsage_Game_TurnRightOrLeft = 0x21, /* Dynamic Value */ - kHIDUsage_Game_PitchUpOrDown = 0x22, /* Dynamic Value */ - kHIDUsage_Game_RollRightOrLeft = 0x23, /* Dynamic Value */ - kHIDUsage_Game_MoveRightOrLeft = 0x24, /* Dynamic Value */ - kHIDUsage_Game_MoveForwardOrBackward = 0x25, /* Dynamic Value */ - kHIDUsage_Game_MoveUpOrDown = 0x26, /* Dynamic Value */ - kHIDUsage_Game_LeanRightOrLeft = 0x27, /* Dynamic Value */ - kHIDUsage_Game_LeanForwardOrBackward = 0x28, /* Dynamic Value */ - kHIDUsage_Game_HeightOfPOV = 0x29, /* Dynamic Value */ - kHIDUsage_Game_Flipper = 0x2A, /* Momentary Control */ - kHIDUsage_Game_SecondaryFlipper = 0x2B, /* Momentary Control */ - kHIDUsage_Game_Bump = 0x2C, /* Momentary Control */ - kHIDUsage_Game_NewGame = 0x2D, /* One-Shot Control */ - kHIDUsage_Game_ShootBall = 0x2E, /* One-Shot Control */ - kHIDUsage_Game_Player = 0x2F, /* One-Shot Control */ - kHIDUsage_Game_GunBolt = 0x30, /* On/Off Control */ - kHIDUsage_Game_GunClip = 0x31, /* On/Off Control */ - kHIDUsage_Game_Gun = 0x32, /* Selector */ - kHIDUsage_Game_GunSingleShot = 0x33, /* Selector */ - kHIDUsage_Game_GunBurst = 0x34, /* Selector */ - kHIDUsage_Game_GunAutomatic = 0x35, /* Selector */ - kHIDUsage_Game_GunSafety = 0x36, /* On/Off Control */ - kHIDUsage_Game_GamepadFireOrJump = 0x37, /* Logical Collection */ - kHIDUsage_Game_GamepadTrigger = 0x39, /* Logical Collection */ - /* 0x3A - 0xFFFF Reserved */ - kHIDUsage_Game_Reserved = 0xFFFF -}; - -/* KeyboardOrKeypad Page (0x07) */ -/* This section is the Usage Page for key codes to be used in implementing a USB keyboard. A Boot Keyboard (84-, 101- or 104-key) should at a minimum support all associated usage codes as indicated in the ÒBootÓ */ -/* column below. */ -/* The usage type of all key codes is Selectors (Sel), except for the modifier keys Keyboard Left Control (0x224) to Keyboard Right GUI (0x231) which are Dynamic Flags (DV). */ -/* Note: A general note on Usages and languages: Due to the variation of keyboards from language to language, it is not feasible to specify exact key mappings for every language. Where this list is not specific for a key function in a language, the closest equivalent key position should be used, so that a keyboard may be modified for a different language by simply printing different keycaps. One example is the Y key on a North American keyboard. In Germany this is typically Z. Rather than changing the keyboard firmware to put the Z Usage into that place in the descriptor list, the vendor should use the Y Usage on both the North American and German keyboards. This continues to be the existing practice in the industry, in order to minimize the number of changes to the electronics to accommodate otherlanguages. */ -enum -{ - kHIDUsage_KeyboardErrorRollOver = 0x01, /* ErrorRollOver */ - kHIDUsage_KeyboardPOSTFail = 0x02, /* POSTFail */ - kHIDUsage_KeyboardErrorUndefined = 0x03, /* ErrorUndefined */ - kHIDUsage_KeyboardA = 0x04, /* a or A */ - kHIDUsage_KeyboardB = 0x05, /* b or B */ - kHIDUsage_KeyboardC = 0x06, /* c or C */ - kHIDUsage_KeyboardD = 0x07, /* d or D */ - kHIDUsage_KeyboardE = 0x08, /* e or E */ - kHIDUsage_KeyboardF = 0x09, /* f or F */ - kHIDUsage_KeyboardG = 0x0A, /* g or G */ - kHIDUsage_KeyboardH = 0x0B, /* h or H */ - kHIDUsage_KeyboardI = 0x0C, /* i or I */ - kHIDUsage_KeyboardJ = 0x0D, /* j or J */ - kHIDUsage_KeyboardK = 0x0E, /* k or K */ - kHIDUsage_KeyboardL = 0x0F, /* l or L */ - kHIDUsage_KeyboardM = 0x10, /* m or M */ - kHIDUsage_KeyboardN = 0x11, /* n or N */ - kHIDUsage_KeyboardO = 0x12, /* o or O */ - kHIDUsage_KeyboardP = 0x13, /* p or P */ - kHIDUsage_KeyboardQ = 0x14, /* q or Q */ - kHIDUsage_KeyboardR = 0x15, /* r or R */ - kHIDUsage_KeyboardS = 0x16, /* s or S */ - kHIDUsage_KeyboardT = 0x17, /* t or T */ - kHIDUsage_KeyboardU = 0x18, /* u or U */ - kHIDUsage_KeyboardV = 0x19, /* v or V */ - kHIDUsage_KeyboardW = 0x1A, /* w or W */ - kHIDUsage_KeyboardX = 0x1B, /* x or X */ - kHIDUsage_KeyboardY = 0x1C, /* y or Y */ - kHIDUsage_KeyboardZ = 0x1D, /* z or Z */ - kHIDUsage_Keyboard1 = 0x1E, /* 1 or ! */ - kHIDUsage_Keyboard2 = 0x1F, /* 2 or @ */ - kHIDUsage_Keyboard3 = 0x20, /* 3 or # */ - kHIDUsage_Keyboard4 = 0x21, /* 4 or $ */ - kHIDUsage_Keyboard5 = 0x22, /* 5 or % */ - kHIDUsage_Keyboard6 = 0x23, /* 6 or ^ */ - kHIDUsage_Keyboard7 = 0x24, /* 7 or & */ - kHIDUsage_Keyboard8 = 0x25, /* 8 or * */ - kHIDUsage_Keyboard9 = 0x26, /* 9 or ( */ - kHIDUsage_Keyboard0 = 0x27, /* 0 or ) */ - kHIDUsage_KeyboardReturnOrEnter = 0x28, /* Return (Enter) */ - kHIDUsage_KeyboardEscape = 0x29, /* Escape */ - kHIDUsage_KeyboardDeleteOrBackspace = 0x2A, /* Delete (Backspace) */ - kHIDUsage_KeyboardTab = 0x2B, /* Tab */ - kHIDUsage_KeyboardSpacebar = 0x2C, /* Spacebar */ - kHIDUsage_KeyboardHyphen = 0x2D, /* - or _ */ - kHIDUsage_KeyboardEqualSign = 0x2E, /* = or + */ - kHIDUsage_KeyboardOpenBracket = 0x2F, /* [ or { */ - kHIDUsage_KeyboardCloseBracket = 0x30, /* ] or } */ - kHIDUsage_KeyboardBackslash = 0x31, /* \ or | */ - kHIDUsage_KeyboardNonUSPound = 0x32, /* Non-US # or _ */ - kHIDUsage_KeyboardSemicolon = 0x33, /* ; or : */ - kHIDUsage_KeyboardQuote = 0x34, /* ' or " */ - kHIDUsage_KeyboardGraveAccentAndTilde = 0x35, /* Grave Accent and Tilde */ - kHIDUsage_KeyboardComma = 0x36, /* , or < */ - kHIDUsage_KeyboardPeriod = 0x37, /* . or > */ - kHIDUsage_KeyboardSlash = 0x38, /* / or ? */ - kHIDUsage_KeyboardCapsLock = 0x39, /* Caps Lock */ - kHIDUsage_KeyboardF1 = 0x3A, /* F1 */ - kHIDUsage_KeyboardF2 = 0x3B, /* F2 */ - kHIDUsage_KeyboardF3 = 0x3C, /* F3 */ - kHIDUsage_KeyboardF4 = 0x3D, /* F4 */ - kHIDUsage_KeyboardF5 = 0x3E, /* F5 */ - kHIDUsage_KeyboardF6 = 0x3F, /* F6 */ - kHIDUsage_KeyboardF7 = 0x40, /* F7 */ - kHIDUsage_KeyboardF8 = 0x41, /* F8 */ - kHIDUsage_KeyboardF9 = 0x42, /* F9 */ - kHIDUsage_KeyboardF10 = 0x43, /* F10 */ - kHIDUsage_KeyboardF11 = 0x44, /* F11 */ - kHIDUsage_KeyboardF12 = 0x45, /* F12 */ - kHIDUsage_KeyboardPrintScreen = 0x46, /* Print Screen */ - kHIDUsage_KeyboardScrollLock = 0x47, /* Scroll Lock */ - kHIDUsage_KeyboardPause = 0x48, /* Pause */ - kHIDUsage_KeyboardInsert = 0x49, /* Insert */ - kHIDUsage_KeyboardHome = 0x4A, /* Home */ - kHIDUsage_KeyboardPageUp = 0x4B, /* Page Up */ - kHIDUsage_KeyboardDeleteForward = 0x4C, /* Delete Forward */ - kHIDUsage_KeyboardEnd = 0x4D, /* End */ - kHIDUsage_KeyboardPageDown = 0x4E, /* Page Down */ - kHIDUsage_KeyboardRightArrow = 0x4F, /* Right Arrow */ - kHIDUsage_KeyboardLeftArrow = 0x50, /* Left Arrow */ - kHIDUsage_KeyboardDownArrow = 0x51, /* Down Arrow */ - kHIDUsage_KeyboardUpArrow = 0x52, /* Up Arrow */ - kHIDUsage_KeypadNumLock = 0x53, /* Keypad NumLock or Clear */ - kHIDUsage_KeypadSlash = 0x54, /* Keypad / */ - kHIDUsage_KeypadAsterisk = 0x55, /* Keypad * */ - kHIDUsage_KeypadHyphen = 0x56, /* Keypad - */ - kHIDUsage_KeypadPlus = 0x57, /* Keypad + */ - kHIDUsage_KeypadEnter = 0x58, /* Keypad Enter */ - kHIDUsage_Keypad1 = 0x59, /* Keypad 1 or End */ - kHIDUsage_Keypad2 = 0x5A, /* Keypad 2 or Down Arrow */ - kHIDUsage_Keypad3 = 0x5B, /* Keypad 3 or Page Down */ - kHIDUsage_Keypad4 = 0x5C, /* Keypad 4 or Left Arrow */ - kHIDUsage_Keypad5 = 0x5D, /* Keypad 5 */ - kHIDUsage_Keypad6 = 0x5E, /* Keypad 6 or Right Arrow */ - kHIDUsage_Keypad7 = 0x5F, /* Keypad 7 or Home */ - kHIDUsage_Keypad8 = 0x60, /* Keypad 8 or Up Arrow */ - kHIDUsage_Keypad9 = 0x61, /* Keypad 9 or Page Up */ - kHIDUsage_Keypad0 = 0x62, /* Keypad 0 or Insert */ - kHIDUsage_KeypadPeriod = 0x63, /* Keypad . or Delete */ - kHIDUsage_KeyboardNonUSBackslash = 0x64, /* Non-US \ or | */ - kHIDUsage_KeyboardApplication = 0x65, /* Application */ - kHIDUsage_KeyboardPower = 0x66, /* Power */ - kHIDUsage_KeypadEqualSign = 0x67, /* Keypad = */ - kHIDUsage_KeyboardF13 = 0x68, /* F13 */ - kHIDUsage_KeyboardF14 = 0x69, /* F14 */ - kHIDUsage_KeyboardF15 = 0x6A, /* F15 */ - kHIDUsage_KeyboardF16 = 0x6B, /* F16 */ - kHIDUsage_KeyboardF17 = 0x6C, /* F17 */ - kHIDUsage_KeyboardF18 = 0x6D, /* F18 */ - kHIDUsage_KeyboardF19 = 0x6E, /* F19 */ - kHIDUsage_KeyboardF20 = 0x6F, /* F20 */ - kHIDUsage_KeyboardF21 = 0x70, /* F21 */ - kHIDUsage_KeyboardF22 = 0x71, /* F22 */ - kHIDUsage_KeyboardF23 = 0x72, /* F23 */ - kHIDUsage_KeyboardF24 = 0x73, /* F24 */ - kHIDUsage_KeyboardExecute = 0x74, /* Execute */ - kHIDUsage_KeyboardHelp = 0x75, /* Help */ - kHIDUsage_KeyboardMenu = 0x76, /* Menu */ - kHIDUsage_KeyboardSelect = 0x77, /* Select */ - kHIDUsage_KeyboardStop = 0x78, /* Stop */ - kHIDUsage_KeyboardAgain = 0x79, /* Again */ - kHIDUsage_KeyboardUndo = 0x7A, /* Undo */ - kHIDUsage_KeyboardCut = 0x7B, /* Cut */ - kHIDUsage_KeyboardCopy = 0x7C, /* Copy */ - kHIDUsage_KeyboardPaste = 0x7D, /* Paste */ - kHIDUsage_KeyboardFind = 0x7E, /* Find */ - kHIDUsage_KeyboardMute = 0x7F, /* Mute */ - kHIDUsage_KeyboardVolumeUp = 0x80, /* Volume Up */ - kHIDUsage_KeyboardVolumeDown = 0x81, /* Volume Down */ - kHIDUsage_KeyboardLockingCapsLock = 0x82, /* Locking Caps Lock */ - kHIDUsage_KeyboardLockingNumLock = 0x83, /* Locking Num Lock */ - kHIDUsage_KeyboardLockingScrollLock = 0x84, /* Locking Scroll Lock */ - kHIDUsage_KeypadComma = 0x85, /* Keypad Comma */ - kHIDUsage_KeypadEqualSignAS400 = 0x86, /* Keypad Equal Sign for AS/400 */ - kHIDUsage_KeyboardInternational1 = 0x87, /* International1 */ - kHIDUsage_KeyboardInternational2 = 0x88, /* International2 */ - kHIDUsage_KeyboardInternational3 = 0x89, /* International3 */ - kHIDUsage_KeyboardInternational4 = 0x8A, /* International4 */ - kHIDUsage_KeyboardInternational5 = 0x8B, /* International5 */ - kHIDUsage_KeyboardInternational6 = 0x8C, /* International6 */ - kHIDUsage_KeyboardInternational7 = 0x8D, /* International7 */ - kHIDUsage_KeyboardInternational8 = 0x8E, /* International8 */ - kHIDUsage_KeyboardInternational9 = 0x8F, /* International9 */ - kHIDUsage_KeyboardLANG1 = 0x90, /* LANG1 */ - kHIDUsage_KeyboardLANG2 = 0x91, /* LANG2 */ - kHIDUsage_KeyboardLANG3 = 0x92, /* LANG3 */ - kHIDUsage_KeyboardLANG4 = 0x93, /* LANG4 */ - kHIDUsage_KeyboardLANG5 = 0x94, /* LANG5 */ - kHIDUsage_KeyboardLANG6 = 0x95, /* LANG6 */ - kHIDUsage_KeyboardLANG7 = 0x96, /* LANG7 */ - kHIDUsage_KeyboardLANG8 = 0x97, /* LANG8 */ - kHIDUsage_KeyboardLANG9 = 0x98, /* LANG9 */ - kHIDUsage_KeyboardAlternateErase = 0x99, /* AlternateErase */ - kHIDUsage_KeyboardSysReqOrAttention = 0x9A, /* SysReq/Attention */ - kHIDUsage_KeyboardCancel = 0x9B, /* Cancel */ - kHIDUsage_KeyboardClear = 0x9C, /* Clear */ - kHIDUsage_KeyboardPrior = 0x9D, /* Prior */ - kHIDUsage_KeyboardReturn = 0x9E, /* Return */ - kHIDUsage_KeyboardSeparator = 0x9F, /* Separator */ - kHIDUsage_KeyboardOut = 0xA0, /* Out */ - kHIDUsage_KeyboardOper = 0xA1, /* Oper */ - kHIDUsage_KeyboardClearOrAgain = 0xA2, /* Clear/Again */ - kHIDUsage_KeyboardCrSelOrProps = 0xA3, /* CrSel/Props */ - kHIDUsage_KeyboardExSel = 0xA4, /* ExSel */ - /* 0xA5-0xDF Reserved */ - kHIDUsage_KeyboardLeftControl = 0xE0, /* Left Control */ - kHIDUsage_KeyboardLeftShift = 0xE1, /* Left Shift */ - kHIDUsage_KeyboardLeftAlt = 0xE2, /* Left Alt */ - kHIDUsage_KeyboardLeftGUI = 0xE3, /* Left GUI */ - kHIDUsage_KeyboardRightControl = 0xE4, /* Right Control */ - kHIDUsage_KeyboardRightShift = 0xE5, /* Right Shift */ - kHIDUsage_KeyboardRightAlt = 0xE6, /* Right Alt */ - kHIDUsage_KeyboardRightGUI = 0xE7, /* Right GUI */ - /* 0xE8-0xFFFF Reserved */ - kHIDUsage_Keyboard_Reserved = 0xFFFF -}; - -/* LEDs Page (0x08) */ -/* An LED or indicator is implemented as an On/Off Control (OOF) using the ÒSingle button toggleÓ mode, where a value of 1 will turn on the indicator, and a value of 0 will turn it off. The exceptions are described below. */ -enum -{ - kHIDUsage_LED_NumLock = 0x01, /* On/Off Control */ - kHIDUsage_LED_CapsLock = 0x02, /* On/Off Control */ - kHIDUsage_LED_ScrollLock = 0x03, /* On/Off Control */ - kHIDUsage_LED_Compose = 0x04, /* On/Off Control */ - kHIDUsage_LED_Kana = 0x05, /* On/Off Control */ - kHIDUsage_LED_Power = 0x06, /* On/Off Control */ - kHIDUsage_LED_Shift = 0x07, /* On/Off Control */ - kHIDUsage_LED_DoNotDisturb = 0x08, /* On/Off Control */ - kHIDUsage_LED_Mute = 0x09, /* On/Off Control */ - kHIDUsage_LED_ToneEnable = 0x0A, /* On/Off Control */ - kHIDUsage_LED_HighCutFilter = 0x0B, /* On/Off Control */ - kHIDUsage_LED_LowCutFilter = 0x0C, /* On/Off Control */ - kHIDUsage_LED_EqualizerEnable = 0x0D, /* On/Off Control */ - kHIDUsage_LED_SoundFieldOn = 0x0E, /* On/Off Control */ - kHIDUsage_LED_SurroundOn = 0x0F, /* On/Off Control */ - kHIDUsage_LED_Repeat = 0x10, /* On/Off Control */ - kHIDUsage_LED_Stereo = 0x11, /* On/Off Control */ - kHIDUsage_LED_SamplingRateDetect = 0x12, /* On/Off Control */ - kHIDUsage_LED_Spinning = 0x13, /* On/Off Control */ - kHIDUsage_LED_CAV = 0x14, /* On/Off Control */ - kHIDUsage_LED_CLV = 0x15, /* On/Off Control */ - kHIDUsage_LED_RecordingFormatDetect = 0x16, /* On/Off Control */ - kHIDUsage_LED_OffHook = 0x17, /* On/Off Control */ - kHIDUsage_LED_Ring = 0x18, /* On/Off Control */ - kHIDUsage_LED_MessageWaiting = 0x19, /* On/Off Control */ - kHIDUsage_LED_DataMode = 0x1A, /* On/Off Control */ - kHIDUsage_LED_BatteryOperation = 0x1B, /* On/Off Control */ - kHIDUsage_LED_BatteryOK = 0x1C, /* On/Off Control */ - kHIDUsage_LED_BatteryLow = 0x1D, /* On/Off Control */ - kHIDUsage_LED_Speaker = 0x1E, /* On/Off Control */ - kHIDUsage_LED_HeadSet = 0x1F, /* On/Off Control */ - kHIDUsage_LED_Hold = 0x20, /* On/Off Control */ - kHIDUsage_LED_Microphone = 0x21, /* On/Off Control */ - kHIDUsage_LED_Coverage = 0x22, /* On/Off Control */ - kHIDUsage_LED_NightMode = 0x23, /* On/Off Control */ - kHIDUsage_LED_SendCalls = 0x24, /* On/Off Control */ - kHIDUsage_LED_CallPickup = 0x25, /* On/Off Control */ - kHIDUsage_LED_Conference = 0x26, /* On/Off Control */ - kHIDUsage_LED_StandBy = 0x27, /* On/Off Control */ - kHIDUsage_LED_CameraOn = 0x28, /* On/Off Control */ - kHIDUsage_LED_CameraOff = 0x29, /* On/Off Control */ - kHIDUsage_LED_OnLine = 0x2A, /* On/Off Control */ - kHIDUsage_LED_OffLine = 0x2B, /* On/Off Control */ - kHIDUsage_LED_Busy = 0x2C, /* On/Off Control */ - kHIDUsage_LED_Ready = 0x2D, /* On/Off Control */ - kHIDUsage_LED_PaperOut = 0x2E, /* On/Off Control */ - kHIDUsage_LED_PaperJam = 0x2F, /* On/Off Control */ - kHIDUsage_LED_Remote = 0x30, /* On/Off Control */ - kHIDUsage_LED_Forward = 0x31, /* On/Off Control */ - kHIDUsage_LED_Reverse = 0x32, /* On/Off Control */ - kHIDUsage_LED_Stop = 0x33, /* On/Off Control */ - kHIDUsage_LED_Rewind = 0x34, /* On/Off Control */ - kHIDUsage_LED_FastForward = 0x35, /* On/Off Control */ - kHIDUsage_LED_Play = 0x36, /* On/Off Control */ - kHIDUsage_LED_Pause = 0x37, /* On/Off Control */ - kHIDUsage_LED_Record = 0x38, /* On/Off Control */ - kHIDUsage_LED_Error = 0x39, /* On/Off Control */ - kHIDUsage_LED_Usage = 0x3A, /* Selector */ - kHIDUsage_LED_UsageInUseIndicator = 0x3B, /* Usage Switch */ - kHIDUsage_LED_UsageMultiModeIndicator = 0x3C, /* Usage Modifier */ - kHIDUsage_LED_IndicatorOn = 0x3D, /* Selector */ - kHIDUsage_LED_IndicatorFlash = 0x3E, /* Selector */ - kHIDUsage_LED_IndicatorSlowBlink = 0x3F, /* Selector */ - kHIDUsage_LED_IndicatorFastBlink = 0x40, /* Selector */ - kHIDUsage_LED_IndicatorOff = 0x41, /* Selector */ - kHIDUsage_LED_FlashOnTime = 0x42, /* Dynamic Value */ - kHIDUsage_LED_SlowBlinkOnTime = 0x43, /* Dynamic Value */ - kHIDUsage_LED_SlowBlinkOffTime = 0x44, /* Dynamic Value */ - kHIDUsage_LED_FastBlinkOnTime = 0x45, /* Dynamic Value */ - kHIDUsage_LED_FastBlinkOffTime = 0x46, /* Dynamic Value */ - kHIDUsage_LED_UsageIndicatorColor = 0x47, /* Usage Modifier */ - kHIDUsage_LED_IndicatorRed = 0x48, /* Selector */ - kHIDUsage_LED_IndicatorGreen = 0x49, /* Selector */ - kHIDUsage_LED_IndicatorAmber = 0x4A, /* Selector */ - kHIDUsage_LED_GenericIndicator = 0x4B, /* On/Off Control */ - kHIDUsage_LED_SystemSuspend = 0x4C, /* On/Off Control */ - kHIDUsage_LED_ExternalPowerConnected = 0x4D, /* On/Off Control */ - /* 0x4E - 0xFFFF Reserved */ - kHIDUsage_LED_Reserved = 0xFFFF -}; - -/* Button Page (0x09) */ -/* The Button page is the first place an application should look for user selection controls. System graphical user interfaces typically employ a pointer and a set of hierarchical selectors to select, move and otherwise manipulate their environment. For these purposes the following assignment of significance can be applied to the Button usages: */ -/* ¥ Button 1, Primary Button. Used for object selecting, dragging, and double click activation. On MacOS, this is the only button. Microsoft operating systems call this a logical left button, because it */ -/* is not necessarily physically located on the left of the pointing device. */ -/* ¥ Button 2, Secondary Button. Used by newer graphical user interfaces to browse object properties. Exposed by systems to applications that typically assign application-specific functionality. */ -/* ¥ Button 3, Tertiary Button. Optional control. Exposed to applications, but seldom assigned functionality due to prevalence of two- and one-button devices. */ -/* ¥ Buttons 4 -55. As the button number increases, its significance as a selector decreases. */ -/* In many ways the assignment of button numbers is similar to the assignment of Effort in Physical descriptors. Button 1 would be used to define the button a finger rests on when the hand is in the Òat restÓ position, that is, virtually no effort is required by the user to activate the button. Button values increment as the finger has to stretch to reach a control. See Section 6.2.3, ÒPhysical Descriptors,Ó in the HID Specification for methods of further qualifying buttons. */ -enum -{ - kHIDUsage_Button_1 = 0x01, /* (primary/trigger) */ - kHIDUsage_Button_2 = 0x02, /* (secondary) */ - kHIDUsage_Button_3 = 0x03, /* (tertiary) */ - kHIDUsage_Button_4 = 0x04, /* 4th button */ - /* ... */ - kHIDUsage_Button_65535 = 0xFFFF -}; - -/* Ordinal Page (0x0A) */ -/* The Ordinal page allows multiple instances of a control or sets of controls to be declared without requiring individual enumeration in the native usage page. For example, it is not necessary to declare usages of Pointer 1, Pointer 2, and so forth on the Generic Desktop page. When parsed, the ordinal instance number is, in essence, concatenated to the usages attached to the encompassing collection to create Pointer 1, Pointer 2, and so forth. */ -/* For an example, see Section A.5, ÒMultiple Instances of a Control,Ó in Appendix A, ÒUsage Examples.Ó By convention, an Ordinal collection is placed inside the collection for which it is declaring multiple instances. */ -/* Instances do not have to be identical. */ -enum -{ - /* 0x00 Reserved */ - kHIDUsage_Ord_Instance1 = 0x01, /* Usage Modifier */ - kHIDUsage_Ord_Instance2 = 0x02, /* Usage Modifier */ - kHIDUsage_Ord_Instance3 = 0x03, /* Usage Modifier */ - kHIDUsage_Ord_Instance4 = 0x04, /* Usage Modifier */ - kHIDUsage_Ord_Instance65535 = 0xFFFF /* Usage Modifier */ -}; - -/* Telephony Page (0x0B) */ -/* This usage page defines the keytop and control usages for telephony devices. */ -/* Indicators on a phone are handled by wrapping them in LED: Usage In Use Indicator and LED: Usage Selected Indicator usages. For example, a message-indicator LED would be identified by a Telephony: Message usage declared as a Feature or Output in a LED: Usage In Use Indicator collection. */ -/* See Section 14, ÒConsumer Page (0x0C),Ó for audio volume and tone controls. */ -enum -{ - kHIDUsage_Tfon_Phone = 0x01, /* Application Collection */ - kHIDUsage_Tfon_AnsweringMachine = 0x02, /* Application Collection */ - kHIDUsage_Tfon_MessageControls = 0x03, /* Logical Collection */ - kHIDUsage_Tfon_Handset = 0x04, /* Logical Collection */ - kHIDUsage_Tfon_Headset = 0x05, /* Logical Collection */ - kHIDUsage_Tfon_TelephonyKeyPad = 0x06, /* Named Array */ - kHIDUsage_Tfon_ProgrammableButton = 0x07, /* Named Array */ - /* 0x08 - 0x1F Reserved */ - kHIDUsage_Tfon_HookSwitch = 0x20, /* On/Off Control */ - kHIDUsage_Tfon_Flash = 0x21, /* Momentary Control */ - kHIDUsage_Tfon_Feature = 0x22, /* One-Shot Control */ - kHIDUsage_Tfon_Hold = 0x23, /* On/Off Control */ - kHIDUsage_Tfon_Redial = 0x24, /* One-Shot Control */ - kHIDUsage_Tfon_Transfer = 0x25, /* One-Shot Control */ - kHIDUsage_Tfon_Drop = 0x26, /* One-Shot Control */ - kHIDUsage_Tfon_Park = 0x27, /* On/Off Control */ - kHIDUsage_Tfon_ForwardCalls = 0x28, /* On/Off Control */ - kHIDUsage_Tfon_AlternateFunction = 0x29, /* Momentary Control */ - kHIDUsage_Tfon_Line = 0x2A, /* One-Shot Control */ - kHIDUsage_Tfon_SpeakerPhone = 0x2B, /* On/Off Control */ - kHIDUsage_Tfon_Conference = 0x2C, /* On/Off Control */ - kHIDUsage_Tfon_RingEnable = 0x2D, /* On/Off Control */ - kHIDUsage_Tfon_Ring = 0x2E, /* Selector */ - kHIDUsage_Tfon_PhoneMute = 0x2F, /* On/Off Control */ - kHIDUsage_Tfon_CallerID = 0x30, /* Momentary Control */ - /* 0x31 - 0x4F Reserved */ - kHIDUsage_Tfon_SpeedDial = 0x50, /* One-Shot Control */ - kHIDUsage_Tfon_StoreNumber = 0x51, /* One-Shot Control */ - kHIDUsage_Tfon_RecallNumber = 0x52, /* One-Shot Control */ - kHIDUsage_Tfon_PhoneDirectory = 0x53, /* On/Off Control */ - /* 0x54 - 0x6F Reserved */ - kHIDUsage_Tfon_VoiceMail = 0x70, /* On/Off Control */ - kHIDUsage_Tfon_ScreenCalls = 0x71, /* On/Off Control */ - kHIDUsage_Tfon_DoNotDisturb = 0x72, /* On/Off Control */ - kHIDUsage_Tfon_Message = 0x73, /* One-Shot Control */ - kHIDUsage_Tfon_AnswerOnOrOff = 0x74, /* On/Off Control */ - /* 0x75 - 0x8F Reserved */ - kHIDUsage_Tfon_InsideDialTone = 0x90, /* Momentary Control */ - kHIDUsage_Tfon_OutsideDialTone = 0x91, /* Momentary Control */ - kHIDUsage_Tfon_InsideRingTone = 0x92, /* Momentary Control */ - kHIDUsage_Tfon_OutsideRingTone = 0x93, /* Momentary Control */ - kHIDUsage_Tfon_PriorityRingTone = 0x94, /* Momentary Control */ - kHIDUsage_Tfon_InsideRingback = 0x95, /* Momentary Control */ - kHIDUsage_Tfon_PriorityRingback = 0x96, /* Momentary Control */ - kHIDUsage_Tfon_LineBusyTone = 0x97, /* Momentary Control */ - kHIDUsage_Tfon_ReorderTone = 0x98, /* Momentary Control */ - kHIDUsage_Tfon_CallWaitingTone = 0x99, /* Momentary Control */ - kHIDUsage_Tfon_ConfirmationTone1 = 0x9A, /* Momentary Control */ - kHIDUsage_Tfon_ConfirmationTone2 = 0x9B, /* Momentary Control */ - kHIDUsage_Tfon_TonesOff = 0x9C, /* On/Off Control */ - kHIDUsage_Tfon_OutsideRingback = 0x9D, /* Momentary Control */ - /* 0x9E - 0xAF Reserved */ - kHIDUsage_Tfon_PhoneKey0 = 0xB0, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey1 = 0xB1, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey2 = 0xB2, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey3 = 0xB3, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey4 = 0xB4, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey5 = 0xB5, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey6 = 0xB6, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey7 = 0xB7, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey8 = 0xB8, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKey9 = 0xB9, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKeyStar = 0xBA, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKeyPound = 0xBB, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKeyA = 0xBC, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKeyB = 0xBD, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKeyC = 0xBE, /* Selector/One-Shot Control */ - kHIDUsage_Tfon_PhoneKeyD = 0xBF, /* Selector/One-Shot Control */ - /* 0xC0 - 0xFFFF Reserved */ - kHIDUsage_TFon_Reserved = 0xFFFF -}; - -/* Consumer Page (0x0C) */ -/* All controls on the Consumer page are application-specific. That is, they affect a specific device, not the system as a whole. */ -enum -{ - kHIDUsage_Csmr_ConsumerControl = 0x01, /* Application Collection */ - kHIDUsage_Csmr_NumericKeyPad = 0x02, /* Named Array */ - kHIDUsage_Csmr_ProgrammableButtons = 0x03, /* Named Array */ - /* 0x03 - 0x1F Reserved */ - kHIDUsage_Csmr_Plus10 = 0x20, /* One-Shot Control */ - kHIDUsage_Csmr_Plus100 = 0x21, /* One-Shot Control */ - kHIDUsage_Csmr_AMOrPM = 0x22, /* One-Shot Control */ - /* 0x23 - 0x3F Reserved */ - kHIDUsage_Csmr_Power = 0x30, /* On/Off Control */ - kHIDUsage_Csmr_Reset = 0x31, /* One-Shot Control */ - kHIDUsage_Csmr_Sleep = 0x32, /* One-Shot Control */ - kHIDUsage_Csmr_SleepAfter = 0x33, /* One-Shot Control */ - kHIDUsage_Csmr_SleepMode = 0x34, /* Re-Trigger Control */ - kHIDUsage_Csmr_Illumination = 0x35, /* On/Off Control */ - kHIDUsage_Csmr_FunctionButtons = 0x36, /* Named Array */ - /* 0x37 - 0x3F Reserved */ - kHIDUsage_Csmr_Menu = 0x40, /* On/Off Control */ - kHIDUsage_Csmr_MenuPick = 0x41, /* One-Shot Control */ - kHIDUsage_Csmr_MenuUp = 0x42, /* One-Shot Control */ - kHIDUsage_Csmr_MenuDown = 0x43, /* One-Shot Control */ - kHIDUsage_Csmr_MenuLeft = 0x44, /* One-Shot Control */ - kHIDUsage_Csmr_MenuRight = 0x45, /* One-Shot Control */ - kHIDUsage_Csmr_MenuEscape = 0x46, /* One-Shot Control */ - kHIDUsage_Csmr_MenuValueIncrease = 0x47, /* One-Shot Control */ - kHIDUsage_Csmr_MenuValueDecrease = 0x48, /* One-Shot Control */ - /* 0x49 - 0x5F Reserved */ - kHIDUsage_Csmr_DataOnScreen = 0x60, /* On/Off Control */ - kHIDUsage_Csmr_ClosedCaption = 0x61, /* On/Off Control */ - kHIDUsage_Csmr_ClosedCaptionSelect = 0x62, /* Selector */ - kHIDUsage_Csmr_VCROrTV = 0x63, /* On/Off Control */ - kHIDUsage_Csmr_BroadcastMode = 0x64, /* One-Shot Control */ - kHIDUsage_Csmr_Snapshot = 0x65, /* One-Shot Control */ - kHIDUsage_Csmr_Still = 0x66, /* One-Shot Control */ - /* 0x67 - 0x7F Reserved */ - kHIDUsage_Csmr_Selection = 0x80, /* Named Array */ - kHIDUsage_Csmr_Assign = 0x81, /* Selector */ - kHIDUsage_Csmr_ModeStep = 0x82, /* One-Shot Control */ - kHIDUsage_Csmr_RecallLast = 0x83, /* One-Shot Control */ - kHIDUsage_Csmr_EnterChannel = 0x84, /* One-Shot Control */ - kHIDUsage_Csmr_OrderMovie = 0x85, /* One-Shot Control */ - kHIDUsage_Csmr_Channel = 0x86, /* Linear Control */ - kHIDUsage_Csmr_MediaSelection = 0x87, /* Selector */ - kHIDUsage_Csmr_MediaSelectComputer = 0x88, /* Selector */ - kHIDUsage_Csmr_MediaSelectTV = 0x89, /* Selector */ - kHIDUsage_Csmr_MediaSelectWWW = 0x8A, /* Selector */ - kHIDUsage_Csmr_MediaSelectDVD = 0x8B, /* Selector */ - kHIDUsage_Csmr_MediaSelectTelephone = 0x8C, /* Selector */ - kHIDUsage_Csmr_MediaSelectProgramGuide = 0x8D, /* Selector */ - kHIDUsage_Csmr_MediaSelectVideoPhone = 0x8E, /* Selector */ - kHIDUsage_Csmr_MediaSelectGames = 0x8F, /* Selector */ - kHIDUsage_Csmr_MediaSelectMessages = 0x90, /* Selector */ - kHIDUsage_Csmr_MediaSelectCD = 0x91, /* Selector */ - kHIDUsage_Csmr_MediaSelectVCR = 0x92, /* Selector */ - kHIDUsage_Csmr_MediaSelectTuner = 0x93, /* Selector */ - kHIDUsage_Csmr_Quit = 0x94, /* One-Shot Control */ - kHIDUsage_Csmr_Help = 0x95, /* On/Off Control */ - kHIDUsage_Csmr_MediaSelectTape = 0x96, /* Selector */ - kHIDUsage_Csmr_MediaSelectCable = 0x97, /* Selector */ - kHIDUsage_Csmr_MediaSelectSatellite = 0x98, /* Selector */ - kHIDUsage_Csmr_MediaSelectSecurity = 0x99, /* Selector */ - kHIDUsage_Csmr_MediaSelectHome = 0x9A, /* Selector */ - kHIDUsage_Csmr_MediaSelectCall = 0x9B, /* Selector */ - kHIDUsage_Csmr_ChannelIncrement = 0x9C, /* One-Shot Control */ - kHIDUsage_Csmr_ChannelDecrement = 0x9D, /* One-Shot Control */ - kHIDUsage_Csmr_Media = 0x9E, /* Selector */ - /* 0x9F Reserved */ - kHIDUsage_Csmr_VCRPlus = 0xA0, /* One-Shot Control */ - kHIDUsage_Csmr_Once = 0xA1, /* One-Shot Control */ - kHIDUsage_Csmr_Daily = 0xA2, /* One-Shot Control */ - kHIDUsage_Csmr_Weekly = 0xA3, /* One-Shot Control */ - kHIDUsage_Csmr_Monthly = 0xA4, /* One-Shot Control */ - /* 0xA5 - 0xAF Reserved */ - kHIDUsage_Csmr_Play = 0xB0, /* On/Off Control */ - kHIDUsage_Csmr_Pause = 0xB1, /* On/Off Control */ - kHIDUsage_Csmr_Record = 0xB2, /* On/Off Control */ - kHIDUsage_Csmr_FastForward = 0xB3, /* On/Off Control */ - kHIDUsage_Csmr_Rewind = 0xB4, /* On/Off Control */ - kHIDUsage_Csmr_ScanNextTrack = 0xB5, /* One-Shot Control */ - kHIDUsage_Csmr_ScanPreviousTrack = 0xB6, /* One-Shot Control */ - kHIDUsage_Csmr_Stop = 0xB7, /* One-Shot Control */ - kHIDUsage_Csmr_Eject = 0xB8, /* One-Shot Control */ - kHIDUsage_Csmr_RandomPlay = 0xB9, /* On/Off Control */ - kHIDUsage_Csmr_SelectDisc = 0xBA, /* Named Array */ - kHIDUsage_Csmr_EnterDisc = 0xBB, /* Momentary Control */ - kHIDUsage_Csmr_Repeat = 0xBC, /* One-Shot Control */ - kHIDUsage_Csmr_Tracking = 0xBD, /* Linear Control */ - kHIDUsage_Csmr_TrackNormal = 0xBE, /* One-Shot Control */ - kHIDUsage_Csmr_SlowTracking = 0xBF, /* Linear Control */ - kHIDUsage_Csmr_FrameForward = 0xC0, /* Re-Trigger Control */ - kHIDUsage_Csmr_FrameBack = 0xC1, /* Re-Trigger Control */ - kHIDUsage_Csmr_Mark = 0xC2, /* One-Shot Control */ - kHIDUsage_Csmr_ClearMark = 0xC3, /* One-Shot Control */ - kHIDUsage_Csmr_RepeatFromMark = 0xC4, /* On/Off Control */ - kHIDUsage_Csmr_ReturnToMark = 0xC5, /* One-Shot Control */ - kHIDUsage_Csmr_SearchMarkForward = 0xC6, /* One-Shot Control */ - kHIDUsage_Csmr_SearchMarkBackwards = 0xC7, /* One-Shot Control */ - kHIDUsage_Csmr_CounterReset = 0xC8, /* One-Shot Control */ - kHIDUsage_Csmr_ShowCounter = 0xC9, /* One-Shot Control */ - kHIDUsage_Csmr_TrackingIncrement = 0xCA, /* Re-Trigger Control */ - kHIDUsage_Csmr_TrackingDecrement = 0xCB, /* Re-Trigger Control */ - kHIDUsage_Csmr_StopOrEject = 0xCC, /* One-Shot Control */ - kHIDUsage_Csmr_PlayOrPause = 0xCD, /* One-Shot Control */ - kHIDUsage_Csmr_PlayOrSkip = 0xCE, /* One-Shot Control */ - /* 0xCF - 0xDF Reserved */ - kHIDUsage_Csmr_Volume = 0xE0, /* Linear Control */ - kHIDUsage_Csmr_Balance = 0xE1, /* Linear Control */ - kHIDUsage_Csmr_Mute = 0xE2, /* On/Off Control */ - kHIDUsage_Csmr_Bass = 0xE3, /* Linear Control */ - kHIDUsage_Csmr_Treble = 0xE4, /* Linear Control */ - kHIDUsage_Csmr_BassBoost = 0xE5, /* On/Off Control */ - kHIDUsage_Csmr_SurroundMode = 0xE6, /* One-Shot Control */ - kHIDUsage_Csmr_Loudness = 0xE7, /* On/Off Control */ - kHIDUsage_Csmr_MPX = 0xE8, /* On/Off Control */ - kHIDUsage_Csmr_VolumeIncrement = 0xE9, /* Re-Trigger Control */ - kHIDUsage_Csmr_VolumeDecrement = 0xEA, /* Re-Trigger Control */ - /* 0xEB - 0xEF Reserved */ - kHIDUsage_Csmr_Speed = 0xF0, /* Selector */ - kHIDUsage_Csmr_PlaybackSpeed = 0xF1, /* Named Array */ - kHIDUsage_Csmr_StandardPlay = 0xF2, /* Selector */ - kHIDUsage_Csmr_LongPlay = 0xF3, /* Selector */ - kHIDUsage_Csmr_ExtendedPlay = 0xF4, /* Selector */ - kHIDUsage_Csmr_Slow = 0xF5, /* One-Shot Control */ - /* 0xF6 - 0xFF Reserved */ - kHIDUsage_Csmr_FanEnable = 0x100, /* On/Off Control */ - kHIDUsage_Csmr_FanSpeed = 0x101, /* Linear Control */ - kHIDUsage_Csmr_LightEnable = 0x102, /* On/Off Control */ - kHIDUsage_Csmr_LightIlluminationLevel = 0x103, /* Linear Control */ - kHIDUsage_Csmr_ClimateControlEnable = 0x104, /* On/Off Control */ - kHIDUsage_Csmr_RoomTemperature = 0x105, /* Linear Control */ - kHIDUsage_Csmr_SecurityEnable = 0x106, /* On/Off Control */ - kHIDUsage_Csmr_FireAlarm = 0x107, /* One-Shot Control */ - kHIDUsage_Csmr_PoliceAlarm = 0x108, /* One-Shot Control */ - /* 0x109 - 0x14F Reserved */ - kHIDUsage_Csmr_BalanceRight = 0x150, /* Re-Trigger Control */ - kHIDUsage_Csmr_BalanceLeft = 0x151, /* Re-Trigger Control */ - kHIDUsage_Csmr_BassIncrement = 0x152, /* Re-Trigger Control */ - kHIDUsage_Csmr_BassDecrement = 0x153, /* Re-Trigger Control */ - kHIDUsage_Csmr_TrebleIncrement = 0x154, /* Re-Trigger Control */ - kHIDUsage_Csmr_TrebleDecrement = 0x155, /* Re-Trigger Control */ - /* 0x156 - 0x15F Reserved */ - kHIDUsage_Csmr_SpeakerSystem = 0x160, /* Logical Collection */ - kHIDUsage_Csmr_ChannelLeft = 0x161, /* Logical Collection */ - kHIDUsage_Csmr_ChannelRight = 0x162, /* Logical Collection */ - kHIDUsage_Csmr_ChannelCenter = 0x163, /* Logical Collection */ - kHIDUsage_Csmr_ChannelFront = 0x164, /* Logical Collection */ - kHIDUsage_Csmr_ChannelCenterFront = 0x165, /* Logical Collection */ - kHIDUsage_Csmr_ChannelSide = 0x166, /* Logical Collection */ - kHIDUsage_Csmr_ChannelSurround = 0x167, /* Logical Collection */ - kHIDUsage_Csmr_ChannelLowFrequencyEnhancement = 0x168, /* Logical Collection */ - kHIDUsage_Csmr_ChannelTop = 0x169, /* Logical Collection */ - kHIDUsage_Csmr_ChannelUnknown = 0x16A, /* Logical Collection */ - /* 0x16B - 0x16F Reserved */ - kHIDUsage_Csmr_SubChannel = 0x170, /* Linear Control */ - kHIDUsage_Csmr_SubChannelIncrement = 0x171, /* One-Shot Control */ - kHIDUsage_Csmr_SubChannelDecrement = 0x172, /* One-Shot Control */ - kHIDUsage_Csmr_AlternateAudioIncrement = 0x173, /* One-Shot Control */ - kHIDUsage_Csmr_AlternateAudioDecrement = 0x174, /* One-Shot Control */ - /* 0x175 - 0x17F Reserved */ - kHIDUsage_Csmr_ApplicationLaunchButtons = 0x180, /* Named Array */ - kHIDUsage_Csmr_ALLaunchButtonConfigurationTool = 0x181, /* Selector */ - kHIDUsage_Csmr_ALProgrammableButtonConfiguration = 0x182, /* Selector */ - kHIDUsage_Csmr_ALConsumerControlConfiguration = 0x183, /* Selector */ - kHIDUsage_Csmr_ALWordProcessor = 0x184, /* Selector */ - kHIDUsage_Csmr_ALTextEditor = 0x185, /* Selector */ - kHIDUsage_Csmr_ALSpreadsheet = 0x186, /* Selector */ - kHIDUsage_Csmr_ALGraphicsEditor = 0x187, /* Selector */ - kHIDUsage_Csmr_ALPresentationApp = 0x188, /* Selector */ - kHIDUsage_Csmr_ALDatabaseApp = 0x189, /* Selector */ - kHIDUsage_Csmr_ALEmailReader = 0x18A, /* Selector */ - kHIDUsage_Csmr_ALNewsreader = 0x18B, /* Selector */ - kHIDUsage_Csmr_ALVoicemail = 0x18C, /* Selector */ - kHIDUsage_Csmr_ALContactsOrAddressBook = 0x18D, /* Selector */ - kHIDUsage_Csmr_ALCalendarOrSchedule = 0x18E, /* Selector */ - kHIDUsage_Csmr_ALTaskOrProjectManager = 0x18F, /* Selector */ - kHIDUsage_Csmr_ALLogOrJournalOrTimecard = 0x190, /* Selector */ - kHIDUsage_Csmr_ALCheckbookOrFinance = 0x191, /* Selector */ - kHIDUsage_Csmr_ALCalculator = 0x192, /* Selector */ - kHIDUsage_Csmr_ALAOrVCaptureOrPlayback = 0x193, /* Selector */ - kHIDUsage_Csmr_ALLocalMachineBrowser = 0x194, /* Selector */ - kHIDUsage_Csmr_ALLANOrWANBrowser = 0x195, /* Selector */ - kHIDUsage_Csmr_ALInternetBrowser = 0x196, /* Selector */ - kHIDUsage_Csmr_ALRemoteNetworkingOrISPConnect = 0x197, /* Selector */ - kHIDUsage_Csmr_ALNetworkConference = 0x198, /* Selector */ - kHIDUsage_Csmr_ALNetworkChat = 0x199, /* Selector */ - kHIDUsage_Csmr_ALTelephonyOrDialer = 0x19A, /* Selector */ - kHIDUsage_Csmr_ALLogon = 0x19B, /* Selector */ - kHIDUsage_Csmr_ALLogoff = 0x19C, /* Selector */ - kHIDUsage_Csmr_ALLogonOrLogoff = 0x19D, /* Selector */ - kHIDUsage_Csmr_ALTerminalLockOrScreensaver = 0x19E, /* Selector */ - kHIDUsage_Csmr_ALControlPanel = 0x19F, /* Selector */ - kHIDUsage_Csmr_ALCommandLineProcessorOrRun = 0x1A0, /* Selector */ - kHIDUsage_Csmr_ALProcessOrTaskManager = 0x1A1, /* Selector */ - kHIDUsage_Csmr_AL = 0x1A2, /* Selector */ - kHIDUsage_Csmr_ALNextTaskOrApplication = 0x1A3, /* Selector */ - kHIDUsage_Csmr_ALPreviousTaskOrApplication = 0x1A4, /* Selector */ - kHIDUsage_Csmr_ALPreemptiveHaltTaskOrApplication = 0x1A5, /* Selector */ - kHIDUsage_Csmr_ALIntegratedHelpCenter = 0x1A6, /* Selector */ - kHIDUsage_Csmr_ALDocuments = 0x1A7, /* Selector */ - kHIDUsage_Csmr_ALThesaurus = 0x1A8, /* Selector */ - kHIDUsage_Csmr_ALDictionary = 0x1A9, /* Selector */ - kHIDUsage_Csmr_ALDesktop = 0x1AA, /* Selector */ - kHIDUsage_Csmr_ALSpellCheck = 0x1AB, /* Selector */ - kHIDUsage_Csmr_ALGrammerCheck = 0x1AC, /* Selector */ - kHIDUsage_Csmr_ALWirelessStatus = 0x1AD, /* Selector */ - kHIDUsage_Csmr_ALKeyboardLayout = 0x1AE, /* Selector */ - kHIDUsage_Csmr_ALVirusProtection = 0x1AF, /* Selector */ - kHIDUsage_Csmr_ALEncryption = 0x1B0, /* Selector */ - kHIDUsage_Csmr_ALScreenSaver = 0x1B1, /* Selector */ - kHIDUsage_Csmr_ALAlarms = 0x1B2, /* Selector */ - kHIDUsage_Csmr_ALClock = 0x1B3, /* Selector */ - kHIDUsage_Csmr_ALFileBrowser = 0x1B4, /* Selector */ - kHIDUsage_Csmr_ALPowerStatus = 0x1B5, /* Selector */ - /* 0x1A6 - 0x1FF Reserved */ - kHIDUsage_Csmr_GenericGUIApplicationControls = 0x200, /* Named Array */ - kHIDUsage_Csmr_ACNew = 0x201, /* Selector */ - kHIDUsage_Csmr_ACOpen = 0x202, /* Selector */ - kHIDUsage_Csmr_ACClose = 0x203, /* Selector */ - kHIDUsage_Csmr_ACExit = 0x204, /* Selector */ - kHIDUsage_Csmr_ACMaximize = 0x205, /* Selector */ - kHIDUsage_Csmr_ACMinimize = 0x206, /* Selector */ - kHIDUsage_Csmr_ACSave = 0x207, /* Selector */ - kHIDUsage_Csmr_ACPrint = 0x208, /* Selector */ - kHIDUsage_Csmr_ACProperties = 0x209, /* Selector */ - kHIDUsage_Csmr_ACUndo = 0x21A, /* Selector */ - kHIDUsage_Csmr_ACCopy = 0x21B, /* Selector */ - kHIDUsage_Csmr_ACCut = 0x21C, /* Selector */ - kHIDUsage_Csmr_ACPaste = 0x21D, /* Selector */ - kHIDUsage_Csmr_AC = 0x21E, /* Selector */ - kHIDUsage_Csmr_ACFind = 0x21F, /* Selector */ - kHIDUsage_Csmr_ACFindandReplace = 0x220, /* Selector */ - kHIDUsage_Csmr_ACSearch = 0x221, /* Selector */ - kHIDUsage_Csmr_ACGoTo = 0x222, /* Selector */ - kHIDUsage_Csmr_ACHome = 0x223, /* Selector */ - kHIDUsage_Csmr_ACBack = 0x224, /* Selector */ - kHIDUsage_Csmr_ACForward = 0x225, /* Selector */ - kHIDUsage_Csmr_ACStop = 0x226, /* Selector */ - kHIDUsage_Csmr_ACRefresh = 0x227, /* Selector */ - kHIDUsage_Csmr_ACPreviousLink = 0x228, /* Selector */ - kHIDUsage_Csmr_ACNextLink = 0x229, /* Selector */ - kHIDUsage_Csmr_ACBookmarks = 0x22A, /* Selector */ - kHIDUsage_Csmr_ACHistory = 0x22B, /* Selector */ - kHIDUsage_Csmr_ACSubscriptions = 0x22C, /* Selector */ - kHIDUsage_Csmr_ACZoomIn = 0x22D, /* Selector */ - kHIDUsage_Csmr_ACZoomOut = 0x22E, /* Selector */ - kHIDUsage_Csmr_ACZoom = 0x22F, /* Selector */ - kHIDUsage_Csmr_ACFullScreenView = 0x230, /* Selector */ - kHIDUsage_Csmr_ACNormalView = 0x231, /* Selector */ - kHIDUsage_Csmr_ACViewToggle = 0x232, /* Selector */ - kHIDUsage_Csmr_ACScrollUp = 0x233, /* Selector */ - kHIDUsage_Csmr_ACScrollDown = 0x234, /* Selector */ - kHIDUsage_Csmr_ACScroll = 0x235, /* Selector */ - kHIDUsage_Csmr_ACPanLeft = 0x236, /* Selector */ - kHIDUsage_Csmr_ACPanRight = 0x237, /* Selector */ - kHIDUsage_Csmr_ACPan = 0x238, /* Selector */ - kHIDUsage_Csmr_ACNewWindow = 0x239, /* Selector */ - kHIDUsage_Csmr_ACTileHorizontally = 0x23A, /* Selector */ - kHIDUsage_Csmr_ACTileVertically = 0x23B, /* Selector */ - kHIDUsage_Csmr_ACFormat = 0x23C, /* Selector */ - /* 0x23D - 0xFFFF Reserved */ - kHIDUsage_Csmr_Reserved = 0xFFFF -}; - -/* Physical Interface Device Page (0x0F) */ -/* This section provides detailed descriptions of the usages employed by Digitizer Devices. */ -enum -{ - kHIDUsage_PID_PhysicalInterfaceDevice = 0x01, /* CA - A collection of PID usages */ - /* 0x02 - 0x1F Reserved */ - kHIDUsage_PID_Normal = 0x20, /* DV - A force applied perpendicular to the surface of an object */ - kHIDUsage_PID_SetEffectReport = 0x21, /* XXX */ - kHIDUsage_PID_EffectBlockIndex = 0x22, /* XXX */ - kHIDUsage_PID_ParamBlockOffset = 0x23, /* XXX */ - kHIDUsage_PID_ROM_Flag = 0x24, /* XXX */ - kHIDUsage_PID_EffectType = 0x25, /* XXX */ - kHIDUsage_PID_ET_ConstantForce = 0x26, /* XXX */ - kHIDUsage_PID_ET_Ramp = 0x27, /* XXX */ - kHIDUsage_PID_ET_CustomForceData = 0x28, /* XXX */ - /* 0x29 - 0x2F Reserved */ - kHIDUsage_PID_ET_Square = 0x30, /* XXX */ - kHIDUsage_PID_ET_Sine = 0x31, /* XXX */ - kHIDUsage_PID_ET_Triangle = 0x32, /* XXX */ - kHIDUsage_PID_ET_SawtoothUp = 0x33, /* XXX */ - kHIDUsage_PID_ET_SawtoothDown = 0x34, /* XXX */ - /* 0x35 - 0x3F Reserved */ - kHIDUsage_PID_ET_Spring = 0x40, /* XXX */ - kHIDUsage_PID_ET_Damper = 0x41, /* XXX */ - kHIDUsage_PID_ET_Inertia = 0x42, /* XXX */ - kHIDUsage_PID_ET_Friction = 0x43, /* XXX */ - /* 0x44 - 0x4F Reserved */ - kHIDUsage_PID_Duration = 0x50, /* XXX */ - kHIDUsage_PID_SamplePeriod = 0x51, /* XXX */ - kHIDUsage_PID_Gain = 0x52, /* XXX */ - kHIDUsage_PID_TriggerButton = 0x53, /* XXX */ - kHIDUsage_PID_TriggerRepeatInterval = 0x54, /* XXX */ - kHIDUsage_PID_AxesEnable = 0x55, /* XXX */ - kHIDUsage_PID_DirectionEnable = 0x56, /* XXX */ - kHIDUsage_PID_Direction = 0x57, /* XXX */ - kHIDUsage_PID_TypeSpecificBlockOffset = 0x58, /* XXX */ - kHIDUsage_PID_BlockType = 0x59, /* XXX */ - kHIDUsage_PID_SetEnvelopeReport = 0x5A, /* XXX */ - kHIDUsage_PID_AttackLevel = 0x5B, /* XXX */ - kHIDUsage_PID_AttackTime = 0x5C, /* XXX */ - kHIDUsage_PID_FadeLevel = 0x5D, /* XXX */ - kHIDUsage_PID_FadeTime = 0x5E, /* XXX */ - kHIDUsage_PID_SetConditionReport = 0x5F, /* XXX */ - - kHIDUsage_PID_CP_Offset = 0x60, /* XXX */ - kHIDUsage_PID_PositiveCoefficient = 0x61, /* XXX */ - kHIDUsage_PID_NegativeCoefficient = 0x62, /* XXX */ - kHIDUsage_PID_PositiveSaturation = 0x63, /* XXX */ - kHIDUsage_PID_NegativeSaturation = 0x64, /* XXX */ - kHIDUsage_PID_DeadBand = 0x65, /* XXX */ - kHIDUsage_PID_DownloadForceSample = 0x66, /* XXX */ - kHIDUsage_PID_IsochCustomForceEnable = 0x67, /* XXX */ - kHIDUsage_PID_CustomForceDataReport = 0x68, /* XXX */ - kHIDUsage_PID_CustomForceData = 0x69, /* XXX */ - kHIDUsage_PID_CustomForceVendorDefinedData = 0x6A, /* XXX */ - kHIDUsage_PID_SetCustomForceReport = 0x6B, /* XXX */ - kHIDUsage_PID_CustomForceDataOffset = 0x6C, /* XXX */ - kHIDUsage_PID_SampleCount = 0x6D, /* XXX */ - kHIDUsage_PID_SetPeriodicReport = 0x6E, /* XXX */ - kHIDUsage_PID_Offset = 0x6F, /* XXX */ - - kHIDUsage_PID_Magnitude = 0x70, /* XXX */ - kHIDUsage_PID_Phase = 0x71, /* XXX */ - kHIDUsage_PID_Period = 0x72, /* XXX */ - kHIDUsage_PID_SetConstantForceReport = 0x73, /* XXX */ - kHIDUsage_PID_SetRampForceReport = 0x74, /* XXX */ - kHIDUsage_PID_RampStart = 0x75, /* XXX */ - kHIDUsage_PID_RampEnd = 0x76, /* XXX */ - kHIDUsage_PID_EffectOperationReport = 0x77, /* XXX */ - kHIDUsage_PID_EffectOperation = 0x78, /* XXX */ - kHIDUsage_PID_OpEffectStart = 0x79, /* XXX */ - kHIDUsage_PID_OpEffectStartSolo = 0x7A, /* XXX */ - kHIDUsage_PID_OpEffectStop = 0x7B, /* XXX */ - kHIDUsage_PID_LoopCount = 0x7C, /* XXX */ - kHIDUsage_PID_DeviceGainReport = 0x7D, /* XXX */ - kHIDUsage_PID_DeviceGain = 0x7E, /* XXX */ - kHIDUsage_PID_PoolReport = 0x7F, /* XXX */ - - kHIDUsage_PID_RAM_PoolSize = 0x80, /* XXX */ - kHIDUsage_PID_ROM_PoolSize = 0x81, /* XXX */ - kHIDUsage_PID_ROM_EffectBlockCount = 0x82, /* XXX */ - kHIDUsage_PID_SimultaneousEffectsMax = 0x83, /* XXX */ - kHIDUsage_PID_PoolAlignment = 0x84, /* XXX */ - kHIDUsage_PID_PoolMoveReport = 0x85, /* XXX */ - kHIDUsage_PID_MoveSource = 0x86, /* XXX */ - kHIDUsage_PID_MoveDestination = 0x87, /* XXX */ - kHIDUsage_PID_MoveLength = 0x88, /* XXX */ - kHIDUsage_PID_BlockLoadReport = 0x89, /* XXX */ - /* 0x8A Reserved */ - kHIDUsage_PID_BlockLoadStatus = 0x8B, /* XXX */ - kHIDUsage_PID_BlockLoadSuccess = 0x8C, /* XXX */ - kHIDUsage_PID_BlockLoadFull = 0x8D, /* XXX */ - kHIDUsage_PID_BlockLoadError = 0x8E, /* XXX */ - kHIDUsage_PID_BlockHandle = 0x8F, /* XXX */ - - kHIDUsage_PID_BlockFreeReport = 0x90, /* XXX */ - kHIDUsage_PID_TypeSpecificBlockHandle = 0x91, /* XXX */ - kHIDUsage_PID_StateReport = 0x92, /* XXX */ - /* 0x93 Reserved */ - kHIDUsage_PID_EffectPlaying = 0x94, /* XXX */ - kHIDUsage_PID_DeviceControlReport = 0x95, /* XXX */ - kHIDUsage_PID_DeviceControl = 0x96, /* XXX */ - kHIDUsage_PID_DC_EnableActuators = 0x97, /* XXX */ - kHIDUsage_PID_DC_DisableActuators = 0x98, /* XXX */ - kHIDUsage_PID_DC_StopAllEffects = 0x99, /* XXX */ - kHIDUsage_PID_DC_DeviceReset = 0x9A, /* XXX */ - kHIDUsage_PID_DC_DevicePause = 0x9B, /* XXX */ - kHIDUsage_PID_DC_DeviceContinue = 0x9C, /* XXX */ - /* 0x9d - 0x9E Reserved */ - kHIDUsage_PID_DevicePaused = 0x9F, /* XXX */ - - kHIDUsage_PID_ActuatorsEnabled = 0xA0, /* XXX */ - /* 0xA1 - 0xA3 Reserved */ - kHIDUsage_PID_SafetySwitch = 0xA4, /* XXX */ - kHIDUsage_PID_ActuatorOverrideSwitch = 0xA5, /* XXX */ - kHIDUsage_PID_ActuatorPower = 0xA6, /* XXX */ - kHIDUsage_PID_StartDelay = 0xA7, /* XXX */ - kHIDUsage_PID_ParameterBlockSize = 0xA8, /* XXX */ - kHIDUsage_PID_DeviceManagedPool = 0xA9, /* XXX */ - kHIDUsage_PID_SharedParameterBlocks = 0xAA, /* XXX */ - kHIDUsage_PID_CreateNewEffectReport = 0xAB, /* XXX */ - kHIDUsage_PID_RAM_PoolAvailable = 0xAC, /* XXX */ - /* 0xAD - 0xFFFF Reserved */ - kHIDUsage_PID_Reserved = 0xFFFF -}; - -/* Digitizer Page (0x0D) */ -/* This section provides detailed descriptions of the usages employed by Digitizer Devices. */ -enum -{ - kHIDUsage_Dig_Digitizer = 0x01, /* Application Collection */ - kHIDUsage_Dig_Pen = 0x02, /* Application Collection */ - kHIDUsage_Dig_LightPen = 0x03, /* Application Collection */ - kHIDUsage_Dig_TouchScreen = 0x04, /* Application Collection */ - kHIDUsage_Dig_TouchPad = 0x05, /* Application Collection */ - kHIDUsage_Dig_WhiteBoard = 0x06, /* Application Collection */ - kHIDUsage_Dig_CoordinateMeasuringMachine = 0x07, /* Application Collection */ - kHIDUsage_Dig_3DDigitizer = 0x08, /* Application Collection */ - kHIDUsage_Dig_StereoPlotter = 0x09, /* Application Collection */ - kHIDUsage_Dig_ArticulatedArm = 0x0A, /* Application Collection */ - kHIDUsage_Dig_Armature = 0x0B, /* Application Collection */ - kHIDUsage_Dig_MultiplePointDigitizer = 0x0C, /* Application Collection */ - kHIDUsage_Dig_FreeSpaceWand = 0x0D, /* Application Collection */ - /* 0x0E - 0x1F Reserved */ - kHIDUsage_Dig_Stylus = 0x20, /* Logical Collection */ - kHIDUsage_Dig_Puck = 0x21, /* Logical Collection */ - kHIDUsage_Dig_Finger = 0x22, /* Logical Collection */ - /* 0x23 - 0x2F Reserved */ - kHIDUsage_Dig_TipPressure = 0x30, /* Dynamic Value */ - kHIDUsage_Dig_BarrelPressure = 0x31, /* Dynamic Value */ - kHIDUsage_Dig_InRange = 0x32, /* Momentary Control */ - kHIDUsage_Dig_Touch = 0x33, /* Momentary Control */ - kHIDUsage_Dig_Untouch = 0x34, /* One-Shot Control */ - kHIDUsage_Dig_Tap = 0x35, /* One-Shot Control */ - kHIDUsage_Dig_Quality = 0x36, /* Dynamic Value */ - kHIDUsage_Dig_DataValid = 0x37, /* Momentary Control */ - kHIDUsage_Dig_TransducerIndex = 0x38, /* Dynamic Value */ - kHIDUsage_Dig_TabletFunctionKeys = 0x39, /* Logical Collection */ - kHIDUsage_Dig_ProgramChangeKeys = 0x3A, /* Logical Collection */ - kHIDUsage_Dig_BatteryStrength = 0x3B, /* Dynamic Value */ - kHIDUsage_Dig_Invert = 0x3C, /* Momentary Control */ - kHIDUsage_Dig_XTilt = 0x3D, /* Dynamic Value */ - kHIDUsage_Dig_YTilt = 0x3E, /* Dynamic Value */ - kHIDUsage_Dig_Azimuth = 0x3F, /* Dynamic Value */ - kHIDUsage_Dig_Altitude = 0x40, /* Dynamic Value */ - kHIDUsage_Dig_Twist = 0x41, /* Dynamic Value */ - kHIDUsage_Dig_TipSwitch = 0x42, /* Momentary Control */ - kHIDUsage_Dig_SecondaryTipSwitch = 0x43, /* Momentary Control */ - kHIDUsage_Dig_BarrelSwitch = 0x44, /* Momentary Control */ - kHIDUsage_Dig_Eraser = 0x45, /* Momentary Control */ - kHIDUsage_Dig_TabletPick = 0x46, /* Momentary Control */ - /* 0x47 - 0xFFFF Reserved */ - kHIDUsage_Dig_Reserved = 0xFFFF -}; - -/* AlphanumericDisplay Page (0x14) */ -/* The Alphanumeric Display page is intended for use by simple alphanumeric displays that are used on consumer devices. */ -enum -{ - kHIDUsage_AD_AlphanumericDisplay = 0x01, /* Application Collection */ - /* 0x02 - 0x1F Reserved */ - kHIDUsage_AD_DisplayAttributesReport = 0x20, /* Logical Collection */ - kHIDUsage_AD_ASCIICharacterSet = 0x21, /* Static Flag */ - kHIDUsage_AD_DataReadBack = 0x22, /* Static Flag */ - kHIDUsage_AD_FontReadBack = 0x23, /* Static Flag */ - kHIDUsage_AD_DisplayControlReport = 0x24, /* Logical Collection */ - kHIDUsage_AD_ClearDisplay = 0x25, /* Dynamic Flag */ - kHIDUsage_AD_DisplayEnable = 0x26, /* Dynamic Flag */ - kHIDUsage_AD_ScreenSaverDelay = 0x27, /* Static Value */ - kHIDUsage_AD_ScreenSaverEnable = 0x28, /* Dynamic Flag */ - kHIDUsage_AD_VerticalScroll = 0x29, /* Static Flag */ - kHIDUsage_AD_HorizontalScroll = 0x2A, /* Static Flag */ - kHIDUsage_AD_CharacterReport = 0x2B, /* Logical Collection */ - kHIDUsage_AD_DisplayData = 0x2C, /* Dynamic Value */ - kHIDUsage_AD_DisplayStatus = 0x2D, /* Logical Collection */ - kHIDUsage_AD_StatNotReady = 0x2E, /* Selector */ - kHIDUsage_AD_StatReady = 0x2F, /* Selector */ - kHIDUsage_AD_ErrNotaloadablecharacter = 0x30, /* Selector */ - kHIDUsage_AD_ErrFontdatacannotberead = 0x31, /* Selector */ - kHIDUsage_AD_CursorPositionReport = 0x32, /* Logical Collection */ - kHIDUsage_AD_Row = 0x33, /* Dynamic Value */ - kHIDUsage_AD_Column = 0x34, /* Dynamic Value */ - kHIDUsage_AD_Rows = 0x35, /* Static Value */ - kHIDUsage_AD_Columns = 0x36, /* Static Value */ - kHIDUsage_AD_CursorPixelPositioning = 0x37, /* Static Flag */ - kHIDUsage_AD_CursorMode = 0x38, /* Dynamic Flag */ - kHIDUsage_AD_CursorEnable = 0x39, /* Dynamic Flag */ - kHIDUsage_AD_CursorBlink = 0x3A, /* Dynamic Flag */ - kHIDUsage_AD_FontReport = 0x3B, /* Logical Collection */ - kHIDUsage_AD_FontData = 0x3C, /* Buffered Byte */ - kHIDUsage_AD_CharacterWidth = 0x3D, /* Static Value */ - kHIDUsage_AD_CharacterHeight = 0x3E, /* Static Value */ - kHIDUsage_AD_CharacterSpacingHorizontal = 0x3F, /* Static Value */ - kHIDUsage_AD_CharacterSpacingVertical = 0x40, /* Static Value */ - kHIDUsage_AD_UnicodeCharacterSet = 0x41, /* Static Flag */ - /* 0x42 - 0xFFFF Reserved */ - kHIDUsage_AD_Reserved = 0xFFFF -}; - -/* Power Device Page (0x84) */ -/* This section provides detailed descriptions of the usages employed by Power Devices. */ -enum -{ - - kHIDUsage_PD_Undefined = 0x00, /* Power Device Undefined Usage */ - kHIDUsage_PD_iName = 0x01, /* CL- Power Device Name Index */ - kHIDUsage_PD_PresentStatus = 0x02, /* CL- Power Device Present Status */ - kHIDUsage_PD_ChangedStatus = 0x03, /* CA- Power Device Changed Status */ - kHIDUsage_PD_UPS = 0x04, /* CA- Uninterruptible Power Supply */ - kHIDUsage_PD_PowerSupply = 0x05, /* CA- Power Supply */ - /* Reserved 0x06 - 0x0F */ - kHIDUsage_PD_BatterySystem = 0x10, /* CP- Battery System power module */ - kHIDUsage_PD_BatterySystemID = 0x11, /* SV IF- Battery System ID */ - kHIDUsage_PD_Battery = 0x12, /* CP- Battery */ - kHIDUsage_PD_BatteryID = 0x13, /* SV IF- Battery ID */ - kHIDUsage_PD_Charger = 0x14, /* CP- Charger */ - kHIDUsage_PD_ChargerID = 0x15, /* SV IF- Charger ID */ - kHIDUsage_PD_PowerConverter = 0x16, /* CP- Power Converter power module */ - kHIDUsage_PD_PowerConverterID = 0x17, /* SV IF- Power Converter ID */ - kHIDUsage_PD_OutletSystem = 0x18, /* CP- Outlet System power module */ - kHIDUsage_PD_OutletSystemID = 0x19, /* SV IF-Outlet System ID */ - kHIDUsage_PD_Input = 0x1A, /* CP- Power Device Input */ - kHIDUsage_PD_InputID = 0x1B, /* SV IF- Power Device Input ID */ - kHIDUsage_PD_Output = 0x1C, /* CP- Power Device Output */ - kHIDUsage_PD_OutputID = 0x1D, /* SV IF- Power Device Output ID */ - kHIDUsage_PD_Flow = 0x1E, /* CP- Power Device Flow */ - kHIDUsage_PD_FlowID = 0x1F, /* Item IF- Power Device Flow ID */ - kHIDUsage_PD_Outlet = 0x20, /* CP- Power Device Outlet */ - kHIDUsage_PD_OutletID = 0x21, /* SV IF- Power Device Outlet ID */ - kHIDUsage_PD_Gang = 0x22, /* CL/CP- Power Device Gang */ - kHIDUsage_PD_GangID = 0x23, /* SV IF- Power Device Gang ID */ - kHIDUsage_PD_PowerSummary = 0x24, /* CL/CP- Power Device Power Summary */ - kHIDUsage_PD_PowerSummaryID = 0x25, /* SV IF- Power Device Power Summary ID */ - /* Reserved 0x26 - 0x2F */ - kHIDUsage_PD_Voltage = 0x30, /* DV IF- Power Device Voltage */ - kHIDUsage_PD_Current = 0x31, /* DV IF- Power Device Current */ - kHIDUsage_PD_Frequency = 0x32, /* DV IF- Power Device Frequency */ - kHIDUsage_PD_ApparentPower = 0x33, /* DV IF- Power Device Apparent Power */ - kHIDUsage_PD_ActivePower = 0x34, /* DV IF- Power Device RMS Power */ - kHIDUsage_PD_PercentLoad = 0x35, /* DV IF- Power Device Percent Load */ - kHIDUsage_PD_Temperature = 0x36, /* DV IF- Power Device Temperature */ - kHIDUsage_PD_Humidity = 0x37, /* DV IF- Power Device Humidity */ - kHIDUsage_PD_BadCount = 0x38, /* DV IF- Power Device Bad Condition Count */ - /* Reserved 0x39 - 0x3F */ - kHIDUsage_PD_ConfigVoltage = 0x40, /* SV/DV F- Power Device Nominal Voltage */ - kHIDUsage_PD_ConfigCurrent = 0x41, /* SV/DV F- Power Device Nominal Current */ - kHIDUsage_PD_ConfigFrequency = 0x42, /* SV/DV F- Power Device Nominal Frequency */ - kHIDUsage_PD_ConfigApparentPower = 0x43, /* SV/DV F- Power Device Nominal Apparent Power */ - kHIDUsage_PD_ConfigActivePower = 0x44, /* SV/DV F- Power Device Nominal RMS Power */ - kHIDUsage_PD_ConfigPercentLoad = 0x45, /* SV/DV F- Power Device Nominal Percent Load */ - kHIDUsage_PD_ConfigTemperature = 0x46, /* SV/DV F- Power Device Nominal Temperature */ - kHIDUsage_PD_ConfigHumidity = 0x47, /* SV/DV F- Power Device Nominal Humidity */ - /* Reserved 0x48 - 0x4F */ - kHIDUsage_PD_SwitchOnControl = 0x50, /* DV F- Power Device Switch On Control */ - kHIDUsage_PD_SwitchOffControl = 0x51, /* DV F- Power Device Switch Off Control */ - kHIDUsage_PD_ToggleControl = 0x52, /* DV F- Power Device Toogle Sequence Control */ - kHIDUsage_PD_LowVoltageTransfer = 0x53, /* DV F- Power Device Min Transfer Voltage */ - kHIDUsage_PD_HighVoltageTransfer = 0x54, /* DV F- Power Device Max Transfer Voltage */ - kHIDUsage_PD_DelayBeforeReboot = 0x55, /* DV F- Power Device Delay Before Reboot */ - kHIDUsage_PD_DelayBeforeStartup = 0x56, /* DV F- Power Device Delay Before Startup */ - kHIDUsage_PD_DelayBeforeShutdown = 0x57, /* DV F- Power Device Delay Before Shutdown */ - kHIDUsage_PD_Test = 0x58, /* DV F- Power Device Test Request/Result */ - kHIDUsage_PD_ModuleReset = 0x59, /* DV F- Power Device Reset Request/Result */ - kHIDUsage_PD_AudibleAlarmControl = 0x5A, /* DV F- Power Device Audible Alarm Control */ - /* Reserved 0x5B - 0x5F */ - kHIDUsage_PD_Present = 0x60, /* DV IOF- Power Device Present */ - kHIDUsage_PD_Good = 0x61, /* DV IOF- Power Device Good */ - kHIDUsage_PD_InternalFailure = 0x62, /* DV IOF- Power Device Internal Failure */ - kHIDUsage_PD_VoltageOutOfRange = 0x63, /* DV IOF- Power Device Voltage Out Of Range */ - kHIDUsage_PD_FrequencyOutOfRange = 0x64, /* DV IOF- Power Device Frequency Out Of Range */ - kHIDUsage_PD_Overload = 0x65, /* DV IOF- Power Device Overload */ - kHIDUsage_PD_OverCharged = 0x66, /* DV IOF- Power Device Over Charged */ - kHIDUsage_PD_OverTemperature = 0x67, /* DV IOF- Power Device Over Temperature */ - kHIDUsage_PD_ShutdownRequested = 0x68, /* DV IOF- Power Device Shutdown Requested */ - kHIDUsage_PD_ShutdownImminent = 0x69, /* DV IOF- Power Device Shutdown Imminent */ - /* Reserved 0x6A */ - kHIDUsage_PD_SwitchOnOff = 0x6B, /* DV IOF- Power Device On/Off Switch Status */ - kHIDUsage_PD_Switchable = 0x6C, /* DV IOF- Power Device Switchable */ - kHIDUsage_PD_Used = 0x6D, /* DV IOF- Power Device Used */ - kHIDUsage_PD_Boost = 0x6E, /* DV IOF- Power Device Boosted */ - kHIDUsage_PD_Buck = 0x6F, /* DV IOF- Power Device Bucked */ - kHIDUsage_PD_Initialized = 0x70, /* DV IOF- Power Device Initialized */ - kHIDUsage_PD_Tested = 0x71, /* DV IOF- Power Device Tested */ - kHIDUsage_PD_AwaitingPower = 0x72, /* DV IOF- Power Device Awaiting Power */ - kHIDUsage_PD_CommunicationLost = 0x73, /* DV IOF- Power Device Communication Lost */ - /* Reserved 0x74 - 0xFC */ - kHIDUsage_PD_iManufacturer = 0xFD, /* SV F- Power Device Manufacturer String Index */ - kHIDUsage_PD_iProduct = 0xFE, /* SV F- Power Device Product String Index */ - kHIDUsage_PD_iserialNumber = 0xFF /* SV F- Power Device Serial Number String Index */ -}; - -/* Battery System Page (x85) */ -/* This section provides detailed descriptions of the usages employed by Battery Systems. */ -enum -{ - kHIDUsage_BS_Undefined = 0x00, /* Battery System Undefined */ - kHIDUsage_BS_SMBBatteryMode = 0x01, /* CL - SMB Mode */ - kHIDUsage_BS_SMBBatteryStatus = 0x02, /* CL - SMB Status */ - kHIDUsage_BS_SMBAlarmWarning = 0x03, /* CL - SMB Alarm Warning */ - kHIDUsage_BS_SMBChargerMode = 0x04, /* CL - SMB Charger Mode */ - kHIDUsage_BS_SMBChargerStatus = 0x05, /* CL - SMB Charger Status */ - kHIDUsage_BS_SMBChargerSpecInfo = 0x06, /* CL - SMB Charger Extended Status */ - kHIDUsage_BS_SMBSelectorState = 0x07, /* CL - SMB Selector State */ - kHIDUsage_BS_SMBSelectorPresets = 0x08, /* CL - SMB Selector Presets */ - kHIDUsage_BS_SMBSelectorInfo = 0x09, /* CL - SMB Selector Info */ - /* Reserved 0x0A - 0x0F */ - kHIDUsage_BS_OptionalMfgFunction1 = 0x10, /* DV F - Battery System Optional SMB Mfg Function 1 */ - kHIDUsage_BS_OptionalMfgFunction2 = 0x11, /* DV F - Battery System Optional SMB Mfg Function 2 */ - kHIDUsage_BS_OptionalMfgFunction3 = 0x12, /* DV F - Battery System Optional SMB Mfg Function 3 */ - kHIDUsage_BS_OptionalMfgFunction4 = 0x13, /* DV F - Battery System Optional SMB Mfg Function 4 */ - kHIDUsage_BS_OptionalMfgFunction5 = 0x14, /* DV F - Battery System Optional SMB Mfg Function 5 */ - kHIDUsage_BS_ConnectionToSMBus = 0x15, /* DF F - Battery System Connection To System Management Bus */ - kHIDUsage_BS_OutputConnection = 0x16, /* DF F - Battery System Output Connection Status */ - kHIDUsage_BS_ChargerConnection = 0x17, /* DF F - Battery System Charger Connection */ - kHIDUsage_BS_BatteryInsertion = 0x18, /* DF F - Battery System Battery Insertion */ - kHIDUsage_BS_Usenext = 0x19, /* DF F - Battery System Use Next */ - kHIDUsage_BS_OKToUse = 0x1A, /* DF F - Battery System OK To Use */ - kHIDUsage_BS_BatterySupported = 0x1B, /* DF F - Battery System Battery Supported */ - kHIDUsage_BS_SelectorRevision = 0x1C, /* DF F - Battery System Selector Revision */ - kHIDUsage_BS_ChargingIndicator = 0x1D, /* DF F - Battery System Charging Indicator */ - /* Reserved 0x1E - 0x27 */ - kHIDUsage_BS_ManufacturerAccess = 0x28, /* DV F - Battery System Manufacturer Access */ - kHIDUsage_BS_RemainingCapacityLimit = 0x29, /* DV F - Battery System Remaining Capacity Limit */ - kHIDUsage_BS_RemainingTimeLimit = 0x2A, /* DV F - Battery System Remaining Time Limit */ - kHIDUsage_BS_AtRate = 0x2B, /* DV F - Battery System At Rate... */ - kHIDUsage_BS_CapacityMode = 0x2C, /* DV F - Battery System Capacity Mode */ - kHIDUsage_BS_BroadcastToCharger = 0x2D, /* DV F - Battery System Broadcast To Charger */ - kHIDUsage_BS_PrimaryBattery = 0x2E, /* DV F - Battery System Primary Battery */ - kHIDUsage_BS_ChargeController = 0x2F, /* DV F - Battery System Charge Controller */ - /* Reserved 0x30 - 0x3F */ - kHIDUsage_BS_TerminateCharge = 0x40, /* DF IOF - Battery System Terminate Charge */ - kHIDUsage_BS_TerminateDischarge = 0x41, /* DF IOF - Battery System Terminate Discharge */ - kHIDUsage_BS_BelowRemainingCapacityLimit = 0x42, /* DF IOF - Battery System Below Remaining Capacity Limit */ - kHIDUsage_BS_RemainingTimeLimitExpired = 0x43, /* DF IOF - Battery System Remaining Time Limit Expired */ - kHIDUsage_BS_Charging = 0x44, /* DF IOF - Battery System Charging */ - kHIDUsage_BS_Discharging = 0x45, /* DV IOF - Battery System Discharging */ - kHIDUsage_BS_FullyCharged = 0x46, /* DF IOF - Battery System Fully Charged */ - kHIDUsage_BS_FullyDischarged = 0x47, /* DV IOF - Battery System Fully Discharged */ - kHIDUsage_BS_ConditioningFlag = 0x48, /* DV IOF - Battery System Conditioning Flag */ - kHIDUsage_BS_AtRateOK = 0x49, /* DV IOF - Battery System At Rate OK */ - kHIDUsage_BS_SMBErrorCode = 0x4A, /* DF IOF - Battery System SMB Error Code */ - kHIDUsage_BS_NeedReplacement = 0x4B, /* DF IOF - Battery System Need Replacement */ - /* Reserved 0x4C - 0x5F */ - kHIDUsage_BS_AtRateTimeToFull = 0x60, /* DV IF - Battery System At Rate Time To Full */ - kHIDUsage_BS_AtRateTimeToEmpty = 0x61, /* DV IF - Battery System At Rate Time To Empty */ - kHIDUsage_BS_AverageCurrent = 0x62, /* DV IF - Battery System Average Current */ - kHIDUsage_BS_Maxerror = 0x63, /* DV IF - Battery System Max Error */ - kHIDUsage_BS_RelativeStateOfCharge = 0x64, /* DV IF - Battery System Relative State Of Charge */ - kHIDUsage_BS_AbsoluteStateOfCharge = 0x65, /* DV IF - Battery System Absolute State Of Charge */ - kHIDUsage_BS_RemainingCapacity = 0x66, /* DV IF - Battery System Remaining Capacity */ - kHIDUsage_BS_FullChargeCapacity = 0x67, /* DV IF - Battery System Full Charge Capacity */ - kHIDUsage_BS_RunTimeToEmpty = 0x68, /* DV IF - Battery System Run Time To Empty */ - kHIDUsage_BS_AverageTimeToEmpty = 0x69, /* DV IF - Battery System Average Time To Empty */ - kHIDUsage_BS_AverageTimeToFull = 0x6A, /* DV IF - Battery System Average Time To Full */ - kHIDUsage_BS_CycleCount = 0x6B, /* DV IF - Battery System Cycle Count */ - /* Reserved 0x6C - 0x7F */ - kHIDUsage_BS_BattPackModelLevel = 0x80, /* SV F - Battery System Batt Pack Model Level */ - kHIDUsage_BS_InternalChargeController = 0x81, /* SF F - Battery System Internal Charge Controller */ - kHIDUsage_BS_PrimaryBatterySupport = 0x82, /* SF F - Battery System Primary Battery Support */ - kHIDUsage_BS_DesignCapacity = 0x83, /* SV F - Battery System Design Capacity */ - kHIDUsage_BS_SpecificationInfo = 0x84, /* SV F - Battery System Specification Info */ - kHIDUsage_BS_ManufacturerDate = 0x85, /* SV F - Battery System Manufacturer Date */ - kHIDUsage_BS_SerialNumber = 0x86, /* SV F - Battery System Serial Number */ - kHIDUsage_BS_iManufacturerName = 0x87, /* SV F - Battery System Manufacturer Name Index */ - kHIDUsage_BS_iDevicename = 0x88, /* SV F - Battery System Device Name Index */ - kHIDUsage_BS_iDeviceChemistry = 0x89, /* SV F - Battery System Device Chemistry Index */ - kHIDUsage_BS_ManufacturerData = 0x8A, /* SV F - Battery System Manufacturer Data */ - kHIDUsage_BS_Rechargable = 0x8B, /* SV F - Battery System Rechargable */ - kHIDUsage_BS_WarningCapacityLimit = 0x8C, /* SV F - Battery System Warning Capacity Limit */ - kHIDUsage_BS_CapacityGranularity1 = 0x8D, /* SV F - Battery System Capacity Granularity 1 */ - kHIDUsage_BS_CapacityGranularity2 = 0x8E, /* SV F - Battery System Capacity Granularity 2 */ - kHIDUsage_BS_iOEMInformation = 0x8F, /* SV F - Battery System OEM Information Index */ - /* Reserved 0x90 - 0xBF */ - kHIDUsage_BS_InhibitCharge = 0xC0, /* DF IOF - Battery System Inhibit Charge */ - kHIDUsage_BS_EnablePolling = 0xC1, /* DF IOF - Battery System Enable Polling */ - kHIDUsage_BS_ResetToZero = 0xC2, /* DF IOF - Battery System Reset To Zero */ - /* Reserved 0xC3 - 0xCF */ - kHIDUsage_BS_ACPresent = 0xD0, /* DF IOF - Battery System AC Present */ - kHIDUsage_BS_BatteryPresent = 0xD1, /* DF IOF - Battery System Battery Present */ - kHIDUsage_BS_PowerFail = 0xD2, /* DF IOF - Battery System Power Fail */ - kHIDUsage_BS_AlarmInhibited = 0xD3, /* DF IOF - Battery System Alarm Inhibited */ - kHIDUsage_BS_ThermistorUnderRange = 0xD4, /* DF IOF - Battery System Thermistor Under Range */ - kHIDUsage_BS_ThermistorHot = 0xD5, /* DF IOF - Battery System Thermistor Hot */ - kHIDUsage_BS_ThermistorCold = 0xD6, /* DF IOF - Battery System Thermistor Cold */ - kHIDUsage_BS_ThermistorOverRange = 0xD7, /* DF IOF - Battery System Thermistor Over Range */ - kHIDUsage_BS_VoltageOutOfRange = 0xD8, /* DF IOF - Battery System Voltage Out Of Range */ - kHIDUsage_BS_CurrentOutOfRange = 0xD9, /* DF IOF - Battery System Current Out Of Range */ - kHIDUsage_BS_CurrentNotRegulated = 0xDA, /* DF IOF - Battery System Current Not Regulated */ - kHIDUsage_BS_VoltageNotRegulated = 0xDB, /* DF IOF - Battery System Voltage Not Regulated */ - kHIDUsage_BS_MasterMode = 0xDC, /* DF IOF - Battery System Master Mode */ - /* Reserved 0xDD - 0xEF */ - kHIDUsage_BS_ChargerSelectorSupport = 0xF0, /* SF F- Battery System Charger Support Selector */ - kHIDUsage_BS_ChargerSpec = 0xF1, /* SF F- Battery System Charger Specification */ - kHIDUsage_BS_Level2 = 0xF2, /* SF F- Battery System Charger Level 2 */ - kHIDUsage_BS_Level3 = 0xF3 /* SF F- Battery System Charger Level 3 */ - /* Reserved 0xF2 - 0xFF */ -}; - -/* Bar Code Scanner Page (0x8C) */ -/* This section provides detailed descriptions of the usages employed by Bar Code Scanner Devices. */ -enum -{ - kHIDUsage_BCS_Undefined = 0x00, /* Bar Code Scanner Undefined Usage */ - kHIDUsage_BCS_BadgeReader = 0x01, /* CA - Bar Code Badge Reader */ - kHIDUsage_BCS_BarCodeScanner = 0x02, /* CA -Bar Code Scanner */ - kHIDUsage_BCS_DumbBarCodeScanner = 0x03, /* CA -Dumb Bar Code Scanner Usage */ - kHIDUsage_BCS_CordlessScannerBase = 0x04, /* CA -Cordless Base Usage */ - kHIDUsage_BCS_BarCodeScannerCradle = 0x05, /* CA -Bar Code Scanner Cradle Usage */ - /* Reserved 0x06 - 0x0F */ - kHIDUsage_BCS_AttributeReport = 0x10, /* CL - Attribute Report */ - kHIDUsage_BCS_SettingsReport = 0x11, /* CL - Settings Report */ - kHIDUsage_BCS_ScannedDataReport = 0x12, /* CL - Scanned Data Report */ - kHIDUsage_BCS_RawScannedDataReport = 0x13, /* CL - Raw Scanned Data Report */ - kHIDUsage_BCS_TriggerReport = 0x14, /* CL - Trigger Report */ - kHIDUsage_BCS_StatusReport = 0x15, /* CL - Status Report */ - kHIDUsage_BCS_UPC_EANControlReport = 0x16, /* CL - UPC/EAN Control Report */ - kHIDUsage_BCS_EAN2_3LabelControlReport = 0x17, /* CL - EAN 2/3 Label Control Report */ - kHIDUsage_BCS_Code39ControlReport = 0x18, /* CL - Code 39 Control Report */ - kHIDUsage_BCS_Interleaved2of5ControlReport = 0x19, /* CL - Interleaved 2 of 5 Control Report */ - kHIDUsage_BCS_Standard2of5ControlReport = 0x1A, /* CL - Standard 2 of 5 Control Report */ - kHIDUsage_BCS_MSIPlesseyControlReport = 0x1B, /* CL - MSI Plessey Control Report */ - kHIDUsage_BCS_CodabarControlReport = 0x1C, /* CL - Codabar Control Report */ - kHIDUsage_BCS_Code128ControlReport = 0x1D, /* CL - Code 128 Control Report */ - kHIDUsage_BCS_Misc1DControlReport = 0x1E, /* CL - Misc 1D Control Report */ - kHIDUsage_BCS_2DControlReport = 0x1F, /* CL - 2D Control Report */ - /* Reserved 0x20 - 0x2F */ - kHIDUsage_BCS_Aiming_PointerMide = 0x30, /* SF - Aiming Pointer Mode */ - kHIDUsage_BCS_BarCodePresentSensor = 0x31, /* SF - Bar Code Present Sensor */ - kHIDUsage_BCS_Class1ALaser = 0x32, /* SF - Class 1A Laser */ - kHIDUsage_BCS_Class2Laser = 0x33, /* SF - Class 2 Laser */ - kHIDUsage_BCS_HeaterPresent = 0x34, /* SF - Heater Present */ - kHIDUsage_BCS_ContactScanner = 0x35, /* SF - Contact Scanner */ - kHIDUsage_BCS_ElectronicArticleSurveillanceNotification = 0x36, /* SF - Electronic Article Surveillance Notification */ - kHIDUsage_BCS_ConstantElectronicArticleSurveillance = 0x37, /* SF - Constant Electronic Article Surveillance */ - kHIDUsage_BCS_ErrorIndication = 0x38, /* SF - Error Indication */ - kHIDUsage_BCS_FixedBeeper = 0x39, /* SF - Fixed Beeper */ - kHIDUsage_BCS_GoodDecodeIndication = 0x3A, /* SF - Good Decode Indication */ - kHIDUsage_BCS_HandsFreeScanning = 0x3B, /* SF - Hands Free Scanning */ - kHIDUsage_BCS_IntrinsicallySafe = 0x3C, /* SF - Intrinsically Safe */ - kHIDUsage_BCS_KlasseEinsLaser = 0x3D, /* SF - Klasse Eins Laser */ - kHIDUsage_BCS_LongRangeScanner = 0x3E, /* SF - Long Range Scanner */ - kHIDUsage_BCS_MirrorSpeedControl = 0x3F, /* SF - Mirror Speed Control */ - kHIDUsage_BCS_NotOnFileIndication = 0x40, /* SF - Not On File Indication */ - kHIDUsage_BCS_ProgrammableBeeper = 0x41, /* SF - Programmable Beeper */ - kHIDUsage_BCS_Triggerless = 0x42, /* SF - Triggerless */ - kHIDUsage_BCS_Wand = 0x43, /* SF - Wand */ - kHIDUsage_BCS_WaterResistant = 0x44, /* SF - Water Resistant */ - kHIDUsage_BCS_MultiRangeScanner = 0x45, /* SF - Multi-Range Scanner */ - kHIDUsage_BCS_ProximitySensor = 0x46, /* SF - Proximity Sensor */ - /* Reserved 0x47 - 0x4C */ - kHIDUsage_BCS_FragmentDecoding = 0x4D, /* DF - Fragment Decoding */ - kHIDUsage_BCS_ScannerReadConfidence = 0x4E, /* DV - Scanner Read Confidence */ - kHIDUsage_BCS_DataPrefix = 0x4F, /* NAry - Data Prefix */ - kHIDUsage_BCS_PrefixAIMI = 0x50, /* SEL - Prefix AIMI */ - kHIDUsage_BCS_PrefixNone = 0x51, /* SEL - Prefix None */ - kHIDUsage_BCS_PrefixProprietary = 0x52, /* SEL - Prefix Proprietary */ - /* Reserved 0x53 - 0x54 */ - kHIDUsage_BCS_ActiveTime = 0x55, /* DV - Active Time */ - kHIDUsage_BCS_AimingLaserPattern = 0x56, /* DF - Aiming Laser Pattern */ - kHIDUsage_BCS_BarCodePresent = 0x57, /* OOC - Bar Code Present */ - kHIDUsage_BCS_BeeperState = 0x58, /* OOC - Beeper State */ - kHIDUsage_BCS_LaserOnTime = 0x59, /* DV - Laser On Time */ - kHIDUsage_BCS_LaserState = 0x5A, /* OOC - Laser State */ - kHIDUsage_BCS_LockoutTime = 0x5B, /* DV - Lockout Time */ - kHIDUsage_BCS_MotorState = 0x5C, /* OOC - Motor State */ - kHIDUsage_BCS_MotorTimeout = 0x5D, /* DV - Motor Timeout */ - kHIDUsage_BCS_PowerOnResetScanner = 0x5E, /* DF - Power On Reset Scanner */ - kHIDUsage_BCS_PreventReadOfBarcodes = 0x5F, /* DF - Prevent Read of Barcodes */ - kHIDUsage_BCS_InitiateBarcodeRead = 0x60, /* DF - Initiate Barcode Read */ - kHIDUsage_BCS_TriggerState = 0x61, /* DF - Trigger State */ - kHIDUsage_BCS_TriggerMode = 0x62, /* NAry - Trigger Mode */ - kHIDUsage_BCS_TriggerModeBlinkingLaserOn = 0x63, /* SEL - Trigger Mode Blinking Laser On */ - kHIDUsage_BCS_TriggerModeContinuousLaserOn = 0x64, /* SEL - Trigger Mode Continuous Laser On */ - kHIDUsage_BCS_TriggerModeLaserOnWhilePulled = 0x65, /* SEL - Trigger Mode Laser on while Pulled */ - kHIDUsage_BCS_TriggerModeLaserStaysOnAfterTriggerRelease = 0x66, /* SEL - Trigger Mode Laser stays on after Trigger Release */ - /* Reserved 0x67 - 0x6C */ - kHIDUsage_BCS_CommitParametersToNVM = 0x6D, /* DF - Commit Parameters to NVM */ - kHIDUsage_BCS_ParameterScanning = 0x6E, /* DF - Parameter Scanning */ - kHIDUsage_BCS_ParametersChanged = 0x6F, /* OOC - Parameters Changed */ - kHIDUsage_BCS_SetParameterDefaultValues = 0x70, /* DF - Set parameter default values */ - /* Reserved 0x71 - 0x74 */ - kHIDUsage_BCS_ScannerInCradle = 0x75, /* OOC - Scanner In Cradle */ - kHIDUsage_BCS_ScannerInRange = 0x76, /* OOC - Scanner In Range */ - /* Reserved 0x77 - 0x79 */ - kHIDUsage_BCS_AimDuration = 0x7A, /* DV - Aim Duration */ - kHIDUsage_BCS_GoodReadLampDuration = 0x7B, /* DV - Good Read Lamp Duration */ - kHIDUsage_BCS_GoodReadLampIntensity = 0x7C, /* DV - Good Read Lamp Intensity */ - kHIDUsage_BCS_GoodReadLED = 0x7D, /* DF - Good Read LED */ - kHIDUsage_BCS_GoodReadToneFrequency = 0x7E, /* DV - Good Read Tone Frequency*/ - kHIDUsage_BCS_GoodReadToneLength = 0x7F, /* DV - Good Read Tone Length */ - kHIDUsage_BCS_GoodReadToneVolume = 0x80, /* DV - Good Read Tone Volume */ - /* Reserved 0x81 */ - kHIDUsage_BCS_NoReadMessage = 0x82, /* DF - No Read Message */ - kHIDUsage_BCS_NotOnFileVolume = 0x83, /* DV - Not on File Volume */ - kHIDUsage_BCS_PowerupBeep = 0x84, /* DF - Powerup Beep */ - kHIDUsage_BCS_SoundErrorBeep = 0x85, /* DF - Sound Error Beep */ - kHIDUsage_BCS_SoundGoodReadBeep = 0x86, /* DF - Sound Good Read Beep */ - kHIDUsage_BCS_SoundNotOnFileBeep = 0x87, /* DF - Sound Not On File Beep */ - kHIDUsage_BCS_GoodReadWhenToWrite = 0x88, /* NArry - Good Read When to Write */ - kHIDUsage_BCS_GRWTIAfterDecode = 0x89, /* SEL - GRWTI After Decode */ - kHIDUsage_BCS_GRWTIBeep_LampAfterTransmit = 0x8A, /* SEL - GRWTI Beep/Lamp after transmit */ - kHIDUsage_BCS_GRWTINoBeep_LampUseAtAll = 0x8B, /* SEL - GRWTI No Beep/Lamp at all */ - /* Reserved 0x8C - 0x90 */ - kHIDUsage_BCS_BooklandEAN = 0x91, /* DF - Bookland EAN */ - kHIDUsage_BCS_ConvertEAN8To13Type = 0x92, /* DF - Convert EAN 8 to 13 Type */ - kHIDUsage_BCS_ConvertUPCAToEAN_13 = 0x93, /* DF - Convert UPC A to EAN-13 */ - kHIDUsage_BCS_ConvertUPC_EToA = 0x94, /* DF - Convert UPC-E to A */ - kHIDUsage_BCS_EAN_13 = 0x95, /* DF - EAN-13 */ - kHIDUsage_BCS_EAN_8 = 0x96, /* DF - EAN_8 */ - kHIDUsage_BCS_EAN_99_128_Mandatory = 0x97, /* DF - EAN-99 128_Mandatory */ - kHIDUsage_BCS_EAN_99_P5_128_Optional = 0x98, /* DF - EAN-99 P5/128_Optional */ - /* Reserved 0x99 */ - kHIDUsage_BCS_UPC_EAN = 0x9A, /* DF - UPC/EAN */ - kHIDUsage_BCS_UPC_EANCouponCode = 0x9B, /* DF - UPC/EAN Coupon Code */ - kHIDUsage_BCS_UPC_EANPeriodicals = 0x9C, /* DV - UPC/EAN Periodicals */ - kHIDUsage_BCS_UPC_A = 0x9D, /* DF - UPC-A */ - kHIDUsage_BCS_UPC_AWith128Mandatory = 0x9E, /* DF - UPC-A with 128 Mandatory */ - kHIDUsage_BCS_UPC_AWith128Optical = 0x9F, /* DF - UPC-A with 128 Optical */ - kHIDUsage_BCS_UPC_AWithP5Optional = 0xA0, /* DF - UPC-A with P5 Optional */ - kHIDUsage_BCS_UPC_E = 0xA1, /* DF - UPC-E */ - kHIDUsage_BCS_UPC_E1 = 0xA2, /* DF - UPC-E1 */ - /* Reserved 0xA3 - 0xA8 */ - kHIDUsage_BCS_Periodical = 0xA9, /* NArry - Periodical */ - kHIDUsage_BCS_PeriodicalAutoDiscriminatePlus2 = 0xAA,/* SEL - Periodical Auto-Discriminate + 2 */ - kHIDUsage_BCS_PeriodicalOnlyDecodeWithPlus2 = 0xAB, /* SEL - Periodical Only Decode with + 2 */ - kHIDUsage_BCS_PeriodicalIgnorePlus2 = 0xAC, /* SEL - Periodical Ignore + 2 */ - kHIDUsage_BCS_PeriodicalAutoDiscriminatePlus5 = 0xAD,/* SEL - Periodical Auto-Discriminate + 5 */ - kHIDUsage_BCS_PeriodicalOnlyDecodeWithPlus5 = 0xAE, /* SEL - Periodical Only Decode with + 5 */ - kHIDUsage_BCS_PeriodicalIgnorePlus5 = 0xAF, /* SEL - Periodical Ignore + 5 */ - kHIDUsage_BCS_Check = 0xB0, /* NArry - Check */ - kHIDUsage_BCS_CheckDisablePrice = 0xB1, /* SEL - Check Disable Price */ - kHIDUsage_BCS_CheckEnable4DigitPrice = 0xB2, /* SEL - Check Enable 4 digit Price */ - kHIDUsage_BCS_CheckEnable5DigitPrice = 0xB3, /* SEL - Check Enable 5 digit Price */ - kHIDUsage_BCS_CheckEnableEuropean4DigitPrice = 0xB4,/* SEL - Check Enable European 4 digit Price */ - kHIDUsage_BCS_CheckEnableEuropean5DigitPrice = 0xB5,/* SEL - Check Enable European 5 digit Price */ - /* Reserved 0xB6 */ - kHIDUsage_BCS_EANTwoLabel = 0xB7, /* DF - EAN Two Label */ - kHIDUsage_BCS_EANThreeLabel = 0xB8, /* DF - EAN Thread Label */ - kHIDUsage_BCS_EAN8FlagDigit1 = 0xB9, /* DV - EAN 8 Flag Digit 1 */ - kHIDUsage_BCS_EAN8FlagDigit2 = 0xBA, /* DV - EAN 8 Flag Digit 2 */ - kHIDUsage_BCS_EAN8FlagDigit3 = 0xBB, /* DV - EAN 8 Flag Digit 3 */ - kHIDUsage_BCS_EAN13FlagDigit1 = 0xBC, /* DV - EAN 13 Flag Digit 1 */ - kHIDUsage_BCS_EAN13FlagDigit2 = 0xBD, /* DV - EAN 13 Flag Digit 2 */ - kHIDUsage_BCS_EAN13FlagDigit3 = 0xBE, /* DV - EAN 13 Flag Digit 3 */ - kHIDUsage_BCS_AddEAN2_3LabelDefinition = 0xBF, /* DF - Add EAN 2/3 Label Definition */ - kHIDUsage_BCS_ClearAllEAN2_3LabelDefinitions = 0xC0,/* DF - Clear all EAN 2/3 Label Definitions */ - /* Reserved 0xC1 - 0xC2 */ - kHIDUsage_BCS_Codabar = 0xC3, /* DF - Codabar */ - kHIDUsage_BCS_Code128 = 0xC4, /* DF - Code 128 */ - /* Reserved 0xC5 - 0xC6 */ - kHIDUsage_BCS_Code39 = 0xC7, /* DF - Code 39 */ - kHIDUsage_BCS_Code93 = 0xC8, /* DF - Code 93 */ - kHIDUsage_BCS_FullASCIIConversion = 0xC9, /* DF - Full ASCII Conversion */ - kHIDUsage_BCS_Interleaved2of5 = 0xCA, /* DF - Interleaved 2 of 5 */ - kHIDUsage_BCS_ItalianPharmacyCode = 0xCB, /* DF - Italian Pharmacy Code */ - kHIDUsage_BCS_MSI_Plessey = 0xCC, /* DF - MSI/Plessey */ - kHIDUsage_BCS_Standard2of5IATA = 0xCD, /* DF - Standard 2 of 5 IATA */ - kHIDUsage_BCS_Standard2of5 = 0xCE, /* DF - Standard 2 of 5 */ - /* Reserved 0xCF - 0xD2 */ - kHIDUsage_BCS_TransmitStart_Stop = 0xD3, /* DF - Transmit Start/Stop */ - kHIDUsage_BCS_TriOptic = 0xD4, /* DF - Tri-Optic */ - kHIDUsage_BCS_UCC_EAN_128 = 0xD5, /* DF - UCC/EAN-128 */ - kHIDUsage_BCS_CheckDigit = 0xD6, /* NArry - Check Digit */ - kHIDUsage_BCS_CheckDigitDisable = 0xD7, /* SEL - Check Digit Disable */ - kHIDUsage_BCS_CheckDigitEnableInterleaved2of5OPCC = 0xD8, /* SEL - Check Digit Enable Interleaved 2 of 5 OPCC */ - kHIDUsage_BCS_CheckDigitEnableInterleaved2of5USS = 0xD9, /* SEL - Check Digit Enable Interleaved 2 of 5 USS */ - kHIDUsage_BCS_CheckDigitEnableStandard2of5OPCC = 0xD8, /* SEL - Check Digit Enable Standard 2 of 5 OPCC */ - kHIDUsage_BCS_CheckDigitEnableStandard2of5USS = 0xD9, /* SEL - Check Digit Enable Standard 2 of 5 USS */ - kHIDUsage_BCS_CheckDigitEnableOneMSIPlessey = 0xDC, /* SEL - Check Digit Enable One MSI Plessey */ - kHIDUsage_BCS_CheckDigitEnableTwoMSIPlessey = 0xDD, /* SEL - Check Digit Enable Two MSI Plessey */ - kHIDUsage_BCS_CheckDigitCodabarEnable = 0xDE, /* SEL - Check Digit Codabar Enable */ - kHIDUsage_BCS_CheckDigitCode99Enable = 0xDF, /* SEL - Check Digit Code 99 Enable */ - /* Reserved 0xE0 - 0xEF */ - kHIDUsage_BCS_TransmitCheckDigit = 0xF0, /* NArry - Transmit Check Digit */ - kHIDUsage_BCS_DisableCheckDigitTransmit = 0xF1, /* SEL - Disable Check Digit Transmit */ - kHIDUsage_BCS_EnableCheckDigitTransmit = 0xF2, /* SEL - Enable Check Digit Transmit */ - /* Reserved 0xF3 - 0xFA */ - kHIDUsage_BCS_SymbologyIdentifier1 = 0xFB, /* DV - Symbology Identifier 1 */ - kHIDUsage_BCS_SymbologyIdentifier2 = 0xFC, /* DV - Symbology Identifier 2 */ - kHIDUsage_BCS_SymbologyIdentifier3 = 0xFD, /* DV - Symbology Identifier 3 */ - kHIDUsage_BCS_DecodedData = 0xFE, /* DV - Decoded Data */ - kHIDUsage_BCS_DecodeDataContinued = 0xFF, /* DF - Decode Data Continued */ - kHIDUsage_BCS_BarSpaceData = 0x100, /* DV - Bar Space Data */ - kHIDUsage_BCS_ScannerDataAccuracy = 0x101, /* DV - Scanner Data Accuracy */ - kHIDUsage_BCS_RawDataPolarity = 0x102, /* NArry - Raw Data Polarity */ - kHIDUsage_BCS_PolarityInvertedBarCode = 0x103, /* SEL - Polarity Inverted Bar Code */ - kHIDUsage_BCS_PolarityNormalBarCode = 0x103, /* SEL - Polarity Normal Bar Code */ - /* Reserved 0x105 */ - kHIDUsage_BCS_MinimumLengthToDecode = 0x106, /* DV - Minimum Length to Decode */ - kHIDUsage_BCS_MaximumLengthToDecode = 0x107, /* DV - Maximum Length to Decode */ - kHIDUsage_BCS_FirstDiscreteLengthToDecode = 0x108, /* DV - First Discrete Length to Decode */ - kHIDUsage_BCS_SecondDiscreteLengthToDecode = 0x109, /* DV - Second Discrete Length to Decode */ - kHIDUsage_BCS_DataLengthMethod = 0x10A, /* NArry - Data Length Method */ - kHIDUsage_BCS_DLMethodReadAny = 0x10B, /* DF - DL Method Read any */ - kHIDUsage_BCS_DLMethodCheckInRange = 0x10C, /* DF - DL Method Check in Range */ - kHIDUsage_BCS_DLMethodCheckForDiscrete = 0x10D, /* DF - DL Method Check for Discrete */ - /* Reserved 0x10E - 0x10F */ - kHIDUsage_BCS_AztecCode = 0x110, /* DF - Aztec Code */ - kHIDUsage_BCS_BC412 = 0x111, /* DF - BC412 */ - kHIDUsage_BCS_ChannelCode = 0x112, /* DF - Channel Code */ - kHIDUsage_BCS_Code16 = 0x113, /* DF - Code 16 */ - kHIDUsage_BCS_Code32 = 0x114, /* DF - Code 32 */ - kHIDUsage_BCS_Code49 = 0x115, /* DF - Code 49 */ - kHIDUsage_BCS_CodeOne = 0x116, /* DF - Code One */ - kHIDUsage_BCS_Colorcode = 0x117, /* DF - Colorcode */ - kHIDUsage_BCS_DataMatrix = 0x118, /* DF - Data Matrix */ - kHIDUsage_BCS_MaxiCode = 0x119, /* DF - MaxiCode */ - kHIDUsage_BCS_MicroPDF = 0x11A, /* DF - MicroPDF */ - kHIDUsage_BCS_PDF_417 = 0x11B, /* DF - PDF-417 */ - kHIDUsage_BCS_PosiCode = 0x11C, /* DF - PosiCode */ - kHIDUsage_BCS_QRCode = 0x11D, /* DF - QR Code */ - kHIDUsage_BCS_SuperCode = 0x11E, /* DF - SuperCode */ - kHIDUsage_BCS_UltraCode = 0x11F, /* DF - UltraCode */ - kHIDUsage_BCS_USB_5_SlugCode = 0x120, /* DF - USD-5 (Slug Code) */ - kHIDUsage_BCS_VeriCode = 0x121 /* DF - VeriCode */ - /* Reserved 0x122 - 0xFFFF */ -}; - -/* Weighing Devices Page (0x8D) */ -/* This section provides detailed descriptions of the usages employed by Weighing Devices. */ -enum -{ - kHIDUsage_WD_Undefined = 0x00, /* Weighing Device Undefined Usage */ - kHIDUsage_WD_WeighingDevice = 0x01, /* CA - Weighing Device */ - /* Reserved 0x02 - 0x1F */ - kHIDUsage_WD_ScaleScaleDevice = 0x20, /* CL - Scale Device */ - kHIDUsage_WD_ScaleScaleClassIMetricCL = 0x21, /* CL - Scale Class I Metric */ - kHIDUsage_WD_ScaleScaleClassIMetric = 0x22, /* SEL - Scale Class I Metric */ - kHIDUsage_WD_ScaleScaleClassIIMetric = 0x23, /* SEL - Scale Class II Metric */ - kHIDUsage_WD_ScaleScaleClassIIIMetric = 0x24, /* SEL - Scale Class III Metric */ - kHIDUsage_WD_ScaleScaleClassIIILMetric = 0x25, /* SEL - Scale Class IIIL Metric */ - kHIDUsage_WD_ScaleScaleClassIVMetric = 0x26, /* SEL - Scale Class IV Metric */ - kHIDUsage_WD_ScaleScaleClassIIIEnglish = 0x27, /* SEL - Scale Class III English */ - kHIDUsage_WD_ScaleScaleClassIIILEnglish = 0x28, /* SEL - Scale Class IIIL English */ - kHIDUsage_WD_ScaleScaleClassIVEnglish = 0x29, /* SEL - Scale Class IV English */ - kHIDUsage_WD_ScaleScaleClassGeneric = 0x2A, /* SEL - Scale Class Generic */ - /* Reserved 0x2B - 0x2F */ - kHIDUsage_WD_ScaleAtrributeReport = 0x30, /* CL - Scale Attribute Report */ - kHIDUsage_WD_ScaleControlReport = 0x31, /* CL - Scale Control Report */ - kHIDUsage_WD_ScaleDataReport = 0x32, /* CL - Scale Data Report */ - kHIDUsage_WD_ScaleStatusReport = 0x33, /* CL - Scale Status Report */ - kHIDUsage_WD_ScaleWeightLimitReport = 0x34, /* CL - Scale Weight Limit Report */ - kHIDUsage_WD_ScaleStatisticsReport = 0x35, /* CL - Scale Statistics Report */ - /* Reserved 0x36 - 0x3F */ - kHIDUsage_WD_DataWeight = 0x40, /* DV - Data Weight */ - kHIDUsage_WD_DataScaling = 0x41, /* DV - Data Scaling */ - /* Reserved 0x42 - 0x4F */ - kHIDUsage_WD_WeightUnit = 0x50, /* CL - Weight Unit */ - kHIDUsage_WD_WeightUnitMilligram = 0x51, /* SEL - Weight Unit Milligram */ - kHIDUsage_WD_WeightUnitGram = 0x52, /* SEL - Weight Unit Gram */ - kHIDUsage_WD_WeightUnitKilogram = 0x53, /* SEL - Weight Unit Kilogram */ - kHIDUsage_WD_WeightUnitCarats = 0x54, /* SEL - Weight Unit Carats */ - kHIDUsage_WD_WeightUnitTaels = 0x55, /* SEL - Weight Unit Taels */ - kHIDUsage_WD_WeightUnitGrains = 0x56, /* SEL - Weight Unit Grains */ - kHIDUsage_WD_WeightUnitPennyweights = 0x57, /* SEL - Weight Unit Pennyweights */ - kHIDUsage_WD_WeightUnitMetricTon = 0x58, /* SEL - Weight Unit Metric Ton */ - kHIDUsage_WD_WeightUnitAvoirTon = 0x59, /* SEL - Weight Unit Avoir Ton */ - kHIDUsage_WD_WeightUnitTroyOunce = 0x5A, /* SEL - Weight Unit Troy Ounce */ - kHIDUsage_WD_WeightUnitOunce = 0x5B, /* SEL - Weight Unit Ounce */ - kHIDUsage_WD_WeightUnitPound = 0x5C, /* SEL - Weight Unit Pound */ - /* Reserved 0x5D - 0x5F */ - kHIDUsage_WD_CalibrationCount = 0x60, /* DV - Calibration Count */ - kHIDUsage_WD_RezeroCount = 0x61, /* DV - Re-Zero Count*/ - /* Reserved 0x62 - 0x6F */ - kHIDUsage_WD_ScaleStatus = 0x70, /* CL - Scale Status */ - kHIDUsage_WD_ScaleStatusFault = 0x71, /* SEL - Scale Status Fault */ - kHIDUsage_WD_ScaleStatusStableAtZero = 0x72, /* SEL - Scale Status Stable at Center of Zero */ - kHIDUsage_WD_ScaleStatusInMotion = 0x73, /* SEL - Scale Status In Motion */ - kHIDUsage_WD_ScaleStatusWeightStable = 0x74, /* SEL - Scale Status Weight Stable */ - kHIDUsage_WD_ScaleStatusUnderZero = 0x75, /* SEL - Scale Status Under Zero */ - kHIDUsage_WD_ScaleStatusOverWeightLimit = 0x76, /* SEL - Scale Status Over Weight Limit */ - kHIDUsage_WD_ScaleStatusRequiresCalibration = 0x77, /* SEL - Scale Status Requires Calibration */ - kHIDUsage_WD_ScaleStatusRequiresRezeroing = 0x78, /* SEL - Scale Status Requires Re-zeroing */ - /* Reserved 0x79 - 0x7F */ - kHIDUsage_WD_ZeroScale = 0x80, /* OOC - Zero Scale */ - kHIDUsage_WD_EnforcedZeroReturn = 0x81 /* OOC - Enforced Zero Return */ - /* Reserved 0x82 - 0xFFFF */ - -}; - -/* Magnetic Stripe Reader Page (0x8E) */ -/* This section provides detailed descriptions of the usages employed by Magnetic Stripe Reader Devices. */ -enum -{ - kHIDUsage_MSR_Undefined = 0x00, /* MagStripe Undefined Usage */ - kHIDUsage_MSR_DeviceReadOnly = 0x01, /* CA - MSR Device Read-Only */ - /* Reserved 0x02 - 0x10 */ - kHIDUsage_MSR_Track1Length = 0x11, /* SF, DF, SEL - Track 1 Length */ - kHIDUsage_MSR_Track2Length = 0x12, /* SF, DF, SEL - Track 2 Length */ - kHIDUsage_MSR_Track3Length = 0x13, /* SF, DF, SEL - Track 3 Length */ - kHIDUsage_MSR_TrackJISLength = 0x14, /* SF, DF, SEL - Track JIS Length */ - /* Reserved 0x15 - 0x1F */ - kHIDUsage_MSR_TrackData = 0x20, /* SF, DF, SEL - Track Data */ - kHIDUsage_MSR_Track1Data = 0x21, /* SF, DF, SEL - Track 1 Data */ - kHIDUsage_MSR_Track2Data = 0x22, /* SF, DF, SEL - Track 2 Data */ - kHIDUsage_MSR_Track3Data = 0x23, /* SF, DF, SEL - Track 3 Data */ - kHIDUsage_MSR_TrackJISData = 0x24 /* SF, DF, SEL - Track JIS Data */ - /* Reserved 0x25 - 0xFFFF */ -}; - -#endif /* _IOHIDUSAGETABLES_H */ diff --git a/i386/include/IOKit/hidsystem/IOHIDevice.h b/i386/include/IOKit/hidsystem/IOHIDevice.h deleted file mode 100644 index bb705a8..0000000 --- a/i386/include/IOKit/hidsystem/IOHIDevice.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2009 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. - * - * IOHIDevice.h - Common Event Source object class. - * - * HISTORY - * 22 May 1992 Mike Paquette at NeXT - * Created. - * 4 Aug 1993 Erik Kay at NeXT - * API cleanup - * 5 Aug 1993 Erik Kay at NeXT - * added ivar space for future expansion - */ - -#ifndef _IOHIDEVICE_H -#define _IOHIDEVICE_H - -#include <IOKit/IOService.h> -#include <IOKit/IOLocks.h> - -typedef enum { - kHIUnknownDevice = 0, - kHIKeyboardDevice = 1, - kHIRelativePointingDevice = 2 -} IOHIDKind; - -class IOHIDevice : public IOService -{ - OSDeclareDefaultStructors(IOHIDevice); - -public: - virtual bool init(OSDictionary * properties = 0); - virtual void free(); - virtual bool start(IOService * provider); - virtual bool open( IOService * forClient, - IOOptionBits options = 0, - void * arg = 0 ); - - virtual UInt32 deviceType(); - virtual IOHIDKind hidKind(); - virtual UInt32 interfaceID(); - virtual bool updateProperties(void); - virtual IOReturn setProperties( OSObject * properties ); - virtual IOReturn setParamProperties(OSDictionary * dict); - virtual UInt64 getGUID(); - - static SInt32 GenerateKey(OSObject *object); -}; - -#endif /* !_IOHIDEVICE_H */ diff --git a/i386/include/IOKit/hidsystem/IOHIKeyboard.h b/i386/include/IOKit/hidsystem/IOHIKeyboard.h deleted file mode 100644 index f6db152..0000000 --- a/i386/include/IOKit/hidsystem/IOHIKeyboard.h +++ /dev/null @@ -1,268 +0,0 @@ -/* - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. - * - * EventSrcPCKeyboard.h - PC Keyboard EventSrc subclass definition - * - * HISTORY - * 28 Aug 1992 Joe Pasqua - * Created. - */ - -#ifndef _IOHIKEYBOARD_H -#define _IOHIKEYBOARD_H - -#include <IOKit/hidsystem/IOHIDevice.h> -#include <IOKit/hidsystem/IOHIKeyboardMapper.h> - -/* Start Action Definitions */ - -/* - * HISTORICAL NOTE: - * The following entry points were part of the IOHIKeyboardEvents - * protocol. - */ - -typedef void (*KeyboardEventAction)( OSObject * target, - /* eventFlags */ unsigned eventType, - /* flags */ unsigned flags, - /* keyCode */ unsigned key, - /* charCode */ unsigned charCode, - /* charSet */ unsigned charSet, - /* originalCharCode */ unsigned origCharCode, - /* originalCharSet */ unsigned origCharSet, - /* keyboardType */ unsigned keyboardType, - /* repeat */ bool repeat, - /* atTime */ AbsoluteTime ts); - -typedef void (*KeyboardSpecialEventAction)(OSObject * target, - /* eventType */ unsigned eventType, - /* flags */ unsigned flags, - /* keyCode */ unsigned key, - /* specialty */ unsigned flavor, - /* source id */ UInt64 guid, - /* repeat */ bool repeat, - /* atTime */ AbsoluteTime ts); - -typedef void (*UpdateEventFlagsAction)( OSObject * target, - /* flags */ unsigned flags); - -/* Event Callback Definitions */ - -typedef void (*KeyboardEventCallback)( - /* target */ OSObject * target, - /* eventFlags */ unsigned eventType, - /* flags */ unsigned flags, - /* keyCode */ unsigned key, - /* charCode */ unsigned charCode, - /* charSet */ unsigned charSet, - /* originalCharCode */ unsigned origCharCode, - /* originalCharSet */ unsigned origCharSet, - /* keyboardType */ unsigned keyboardType, - /* repeat */ bool repeat, - /* atTime */ AbsoluteTime ts, - /* sender */ OSObject * sender, - /* refcon */ void * refcon); - -typedef void (*KeyboardSpecialEventCallback)( - /* target */ OSObject * target, - /* eventType */ unsigned eventType, - /* flags */ unsigned flags, - /* keyCode */ unsigned key, - /* specialty */ unsigned flavor, - /* source id */ UInt64 guid, - /* repeat */ bool repeat, - /* atTime */ AbsoluteTime ts, - /* sender */ OSObject * sender, - /* refcon */ void * refcon); - -typedef void (*UpdateEventFlagsCallback)( - /* target */ OSObject * target, - /* flags */ unsigned flags, - /* sender */ OSObject * sender, - /* refcon */ void * refcon); - -/* End Action Definitions */ - - - -/* Default key repeat parameters */ -#define EV_DEFAULTINITIALREPEAT 500000000ULL // 1/2 sec in nanoseconds -#define EV_DEFAULTKEYREPEAT 83333333ULL // 1/12 sec in nanoseconds -#define EV_MINKEYREPEAT 16700000ULL // 1/60 sec - -class IOHIKeyboard : public IOHIDevice -{ - OSDeclareDefaultStructors(IOHIKeyboard); - - friend class IOHIDKeyboardDevice; - friend class IOHIDKeyboard; - friend class IOHIDConsumer; - -protected: - IOLock * _deviceLock; // Lock for all device access - IOHIKeyboardMapper * _keyMap; // KeyMap instance - - // The following fields describe the kind of keyboard - UInt32 _interfaceType; - UInt32 _deviceType; - - // The following fields describe the state of the keyboard - UInt32 * _keyState; // kbdBitVector - IOByteCount _keyStateSize; // kbdBitVector allocated size - unsigned _eventFlags; // Current eventFlags - bool _alphaLock; // true means alpha lock is on - bool _numLock; // true means num lock is on - bool _charKeyActive; // true means char gen. key active - - // The following fields are used in performing key repeats - bool _isRepeat; // true means we're generating repeat - unsigned _codeToRepeat; // What we are repeating - bool _calloutPending; // true means we've sched. a callout - AbsoluteTime _lastEventTime; // Time last event was dispatched - AbsoluteTime _downRepeatTime; // Time when we should next repeat - AbsoluteTime _keyRepeat; // Delay between key repeats - AbsoluteTime _initialKeyRepeat; // Delay before initial key repeat - UInt64 _guid; - - OSObject * _keyboardEventTarget; - KeyboardEventAction _keyboardEventAction; - OSObject * _keyboardSpecialEventTarget; - KeyboardSpecialEventAction _keyboardSpecialEventAction; - OSObject * _updateEventFlagsTarget; - UpdateEventFlagsAction _updateEventFlagsAction; - -protected: - virtual void dispatchKeyboardEvent(unsigned int keyCode, - /* direction */ bool goingDown, - /* timeStamp */ AbsoluteTime time); - -public: - virtual bool init(OSDictionary * properties = 0); - virtual bool start(IOService * provider); - virtual void stop(IOService * provider); - virtual void free(); - - virtual bool open(IOService * client, - IOOptionBits options, - KeyboardEventAction keAction, - KeyboardSpecialEventAction kseAction, - UpdateEventFlagsAction uefAction); - - bool open( IOService * client, - IOOptionBits options, - void *, - KeyboardEventCallback keCallback, - KeyboardSpecialEventCallback kseCallback, - UpdateEventFlagsCallback uefCallback); - - virtual void close(IOService * client, IOOptionBits ); - - virtual IOReturn message( UInt32 type, IOService * provider, - void * argument = 0 ); - - virtual IOHIDKind hidKind(); - virtual bool updateProperties( void ); - virtual IOReturn setParamProperties(OSDictionary * dict); - virtual IOReturn setProperties( OSObject * properties ); - - inline bool isRepeat() {return _isRepeat;} - -protected: // for subclasses to implement - virtual const unsigned char * defaultKeymapOfLength(UInt32 * length); - virtual void setAlphaLockFeedback(bool val); - virtual void setNumLockFeedback(bool val); - virtual UInt32 maxKeyCodes(); - - -private: - virtual bool resetKeyboard(); - virtual void scheduleAutoRepeat(); - static void _autoRepeat(void * arg, void *); - virtual void autoRepeat(); - virtual void setRepeat(unsigned eventType, unsigned keyCode); - void setRepeatMode(bool repeat); - static void _createKeyboardNub(thread_call_param_t param0, thread_call_param_t param1); - -/* - * HISTORICAL NOTE: - * The following methods were part of the KeyMapDelegate protocol; - * the declarations have now been merged directly into this class. - */ - -public: - virtual void keyboardEvent(unsigned eventType, - /* flags */ unsigned flags, - /* keyCode */ unsigned keyCode, - /* charCode */ unsigned charCode, - /* charSet */ unsigned charSet, - /* originalCharCode */ unsigned origCharCode, - /* originalCharSet */ unsigned origCharSet); - - virtual void keyboardSpecialEvent(unsigned eventType, - /* flags */ unsigned flags, - /* keyCode */ unsigned keyCode, - /* specialty */ unsigned flavor); - - virtual void updateEventFlags(unsigned flags); // Does not generate events - - virtual unsigned eventFlags(); // Global event flags - virtual unsigned deviceFlags(); // per-device event flags - virtual void setDeviceFlags(unsigned flags); // Set device event flags - virtual bool alphaLock(); // current alpha-lock state - virtual void setAlphaLock(bool val); // Set current alpha-lock state - virtual bool numLock(); - virtual void setNumLock(bool val); - virtual bool charKeyActive(); // Is a character gen. key down? - virtual void setCharKeyActive(bool val); // Note that a char gen key is down. - virtual bool doesKeyLock(unsigned key); //does key lock physically - virtual unsigned getLEDStatus(); //check hardware for LED status - -private: - static void _keyboardEvent( IOHIKeyboard * self, - unsigned eventType, - /* flags */ unsigned flags, - /* keyCode */ unsigned key, - /* charCode */ unsigned charCode, - /* charSet */ unsigned charSet, - /* originalCharCode */ unsigned origCharCode, - /* originalCharSet */ unsigned origCharSet, - /* keyboardType */ unsigned keyboardType, - /* repeat */ bool repeat, - /* atTime */ AbsoluteTime ts); - static void _keyboardSpecialEvent( - IOHIKeyboard * self, - unsigned eventType, - /* flags */ unsigned flags, - /* keyCode */ unsigned key, - /* specialty */ unsigned flavor, - /* guid */ UInt64 guid, - /* repeat */ bool repeat, - /* atTime */ AbsoluteTime ts); - - static void _updateEventFlags( IOHIKeyboard * self, - unsigned flags); /* Does not generate events */ - -}; - -#endif /* !_IOHIKEYBOARD_H */ diff --git a/i386/include/IOKit/hidsystem/IOHIKeyboardMapper.h b/i386/include/IOKit/hidsystem/IOHIKeyboardMapper.h deleted file mode 100644 index 374d25c..0000000 --- a/i386/include/IOKit/hidsystem/IOHIKeyboardMapper.h +++ /dev/null @@ -1,350 +0,0 @@ -/* - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _IOHIKEYBOARDMAPPER_H -#define _IOHIKEYBOARDMAPPER_H - -#include <IOKit/hidsystem/ev_keymap.h> -#include <IOKit/hidsystem/IOLLEvent.h> -#include <IOKit/IOTimerEventSource.h> -#include <IOKit/IOInterruptEventSource.h> - -class IOHIKeyboard; -class IOHIDSystem; - -/* - * Key ip/down state is tracked in a bit list. Bits are set - * for key-down, and cleared for key-up. The bit vector and macros - * for it's manipulation are defined here. - */ - -typedef UInt32 * kbdBitVector; - -#define EVK_BITS_PER_UNIT 32 -#define EVK_BITS_MASK 31 -#define EVK_BITS_SHIFT 5 // 1<<5 == 32, for cheap divide - -#define EVK_KEYDOWN(n, bits) \ - (bits)[((n)>>EVK_BITS_SHIFT)] |= (1 << ((n) & EVK_BITS_MASK)) - -#define EVK_KEYUP(n, bits) \ - (bits)[((n)>>EVK_BITS_SHIFT)] &= ~(1 << ((n) & EVK_BITS_MASK)) - -#define EVK_IS_KEYDOWN(n, bits) \ - (((bits)[((n)>>EVK_BITS_SHIFT)] & (1 << ((n) & EVK_BITS_MASK))) != 0) - -/* the maximum number of modifier keys sticky keys can hold at once */ -#define kMAX_MODIFIERS 5 - -/* the number of shift keys in a row that must be depressed to toggle state */ -#define kNUM_SHIFTS_TO_ACTIVATE 5 - -/* the number of milliseconds all the shifts must be pressed in - 30 seconds (30000 mS)*/ -#define kDEFAULT_SHIFTEXPIREINTERVAL 30000 - - -// sticky keys state flags -enum -{ - kState_Disabled_Flag = 0x0001, // disabled and will do nothing until this is changed - kState_ShiftActivates_Flag = 0x0002, // the 'on' gesture (5 shifts) will activate - kState_On = 0x0004, // currently on, will hold down modifiers when pressed - kState_On_ModifiersDown = 0x0008, // one or more modifiers being held down - - kState_Mask = 0x00FF, // mask for all states -}; - -typedef struct _stickyKeys_ToggleInfo -{ - // size of this allocation - IOByteCount size; - - // which modifier key we are tracking (using NX_WHICHMODMASK) - unsigned toggleModifier; - - // the number of times the modifier must be pressed to toggle - unsigned repetitionsToToggle; - - // how long the user has to press the modifier repetitionsToToggle times - // the default is 30 seconds - AbsoluteTime expireInterval; - - // the number of times the modifier used within the alloted time - unsigned currentCount; - - // the times that the last shift must occer for this one to be used - // this array will actually be of size repetitionsToToggle - AbsoluteTime deadlines[1]; -} StickyKeys_ToggleInfo; - -// Flags for each sticky key modifier -// This will allow for chording of keys -// and for key locking -enum -{ - kModifier_DidPerformModifiy = 0x01, - kModifier_DidKeyUp = 0x02, - kModifier_Locked = 0x04, -}; -typedef struct _stickyKeys_ModifierInfo -{ - UInt8 key; // Key code of the sticky modifier - UInt8 state; // The state of the sticky modifier - UInt8 leftModBit; // System Mod bit of the sticky modifier -} StickyKeys_ModifierInfo; - -class IOHIDKeyboardDevice; - -class IOHIKeyboardMapper : public OSObject -{ - OSDeclareDefaultStructors(IOHIKeyboardMapper); - -private: - IOHIKeyboard * _delegate; // KeyMap delegate - bool _mappingShouldBeFreed; // true if map can be IOFree'd - NXParsedKeyMapping _parsedMapping; // current system-wide keymap - IOHIDSystem * _hidSystem; // target of IOHIKeyboard (should be IOHIDSystem) - - // binary compatibility padding - struct ExpansionData { - - // This is for F12 eject - UInt16 f12Eject_State; - UInt32 eject_Delay_MS; - IOTimerEventSource *ejectTimerEventSource; - - // This is for sticky keys - kbdBitVector cached_KeyBits; - StickyKeys_ModifierInfo stickyKeys_StuckModifiers[kMAX_MODIFIERS]; - IOInterruptEventSource *stickyKeysMouseClickEventSource; - IOInterruptEventSource *stickyKeysSetFnStateEventSource; - // The following should really be statics, but placing here - // to match design by predecesor. - OSDictionary *offFnParamDict; - OSDictionary *onFnParamDict; - - // This is for SlowKeys - UInt16 slowKeys_State; - UInt32 slowKeys_Delay_MS; - IOTimerEventSource *slowKeysTimerEventSource; - - // stored for slowKeysPostProcess - UInt8 slowKeys_Aborted_Key; - UInt8 slowKeys_Current_Key; - - UInt32 specialKeyModifierFlags; - - bool supportsF12Eject; - - SInt32 modifierSwap_Modifiers[NX_NUMMODIFIERS]; - - unsigned char * cachedAlphaLockModDefs; - }; - ExpansionData * _reserved; // Reserved for future use. (Internal use only) - -public: - static IOHIKeyboardMapper * keyboardMapper( - IOHIKeyboard * delegate, - const UInt8 * mapping, - UInt32 mappingLength, - bool mappingShouldBeFreed ); - - virtual bool init(IOHIKeyboard * delegate, - const UInt8 * mapping, - UInt32 mappingLength, - bool mappingShouldBeFreed); - virtual void free(); - - virtual const UInt8 * mapping(); - virtual UInt32 mappingLength(); - virtual bool serialize(OSSerialize *s) const; - - virtual void translateKeyCode(UInt8 key, bool keyDown, kbdBitVector keyBits); - virtual UInt8 getParsedSpecialKey(UInt8 logical); //retrieve a key from _parsedMapping - - virtual void setKeyboardTarget (IOService * keyboardTarget); - - virtual bool updateProperties (void); - virtual IOReturn setParamProperties (OSDictionary * dict); - - // keyEventPostProcess is called while a lock is not held, so a recursive - // call back into HIKeyboard is possible - virtual void keyEventPostProcess (void); - -private: - static void makeNumberParamProperty( OSDictionary * dict, const char * key, - unsigned long long number, unsigned int bits ); - - - virtual bool parseKeyMapping(const UInt8 * mapping, - UInt32 mappingLength, - NXParsedKeyMapping * parsedMapping) const; - - virtual void calcModBit(int bit, kbdBitVector keyBits); - virtual void doModCalc(int key, kbdBitVector keyBits); - virtual void doCharGen(int keyCode, bool down); - - /* sticky keys functionality */ -private: - // original translateKeyCode - void rawTranslateKeyCode (UInt8 key, bool keyDown, kbdBitVector keyBits); - bool modifierSwapFilterKey(UInt8 * key); - - // the current state of stickyKeys - UInt32 _stickyKeys_State; - - // the number of modifiers being held down by stickyKeys - int _stickyKeys_NumModifiersDown; - - ////////////////////////////////////////////////////////////// - // THE FOLLOWING CLASS VARIABLE HAS BEEN DEPRECATED - // - // PLEASE USE _stickyKeys_StuckModifiers - // - UInt8 _stickyKeys_Modifiers[kMAX_MODIFIERS]; - ////////////////////////////////////////////////////////////// - - // contains the info needed to keep track of shift repetitions - StickyKeys_ToggleInfo * _stickyKeys_ShiftToggle; - - // contains the info needed to keep track of option repetitions - StickyKeys_ToggleInfo * _stickyKeys_OptionToggle; - - // dictionaries with cached on and off states, used to set params when state changes - bool _stateDirty; - OSDictionary * _onParamDict; - OSDictionary * _offParamDict; - - // init/free vars - bool stickyKeysinit (void); - void stickyKeysfree (void); - - // allocate/free a StickyKeys_ToggleInfo struct - static StickyKeys_ToggleInfo * stickyKeysAllocToggleInfo (unsigned maxCount); - static void stickyKeysFreeToggleInfo (StickyKeys_ToggleInfo * toggleInfo); - - // create on/off dicts as part of init - bool createParamDicts (void); - - // post special keyboard events thru the event system - void postKeyboardSpecialEvent (unsigned subtype, unsigned eventType=NX_SYSDEFINED); - - // check any modifier to see if it is pressed 5 times - // based on StickyKeys_ToggleInfo - bool stickyKeysModifierToggleCheck( - StickyKeys_ToggleInfo * toggleInfo, - UInt8 key, - bool keyDown, - kbdBitVector keyBits, - bool mouseClick = false); - - // non-modifier key pressed - void stickyKeysNonModifierKey (UInt8 key, bool keyDown, kbdBitVector keyBits, bool mouseClick = false); - - // modifier key pressed (shift, command, option, control) - bool stickyKeysModifierKey (UInt8 key, bool keyDown, kbdBitVector keyBits); - - // main entry point, called for all keys (returns true if key handled) - bool stickyKeysFilterKey (UInt8 key, bool keyDown, kbdBitVector keyBits, bool mouseClick = false); - - // called by interrupt event source to inform sticky keys of mouse down event - static void stickyKeysMouseUp(IOHIKeyboardMapper *owner, IOEventSource *sender); - - void stickyKeysCleanup(); - - // called by interrupt event source to restore prior fn state - static void stickyKeysSetFnState(IOHIKeyboardMapper *owner, IOEventSource *sender); - - /* F12 Eject Functionality */ -private: - - // Determining f12 eject key press - // Returns true if f12 held down for a predetermined period of time. - bool f12EjectFilterKey (UInt8 key, bool keyDown, kbdBitVector keyBits); - - // Timer function for eject - static void performF12Eject(IOHIKeyboardMapper *owner, IOTimerEventSource *sender); - - /* SlowKeys Functionality */ -private: - // Slow keys methods - bool slowKeysFilterKey (UInt8 key, bool keyDown, kbdBitVector keyBits); - - static void slowKeysPostProcess (IOHIKeyboardMapper *owner, IOTimerEventSource *sender); - - -public: - OSMetaClassDeclareReservedUsed(IOHIKeyboardMapper, 0); - virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); - - // binary compatibility padding - OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 1); - OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 2); - OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 3); - OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 4); - OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 5); - OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 6); - OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 7); - OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 8); - OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 9); - OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 10); - OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 11); - OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 12); - OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 13); - OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 14); - OSMetaClassDeclareReservedUnused(IOHIKeyboardMapper, 15); -}; - -#endif _IOHIKEYBOARDMAPPER_H - -/* - * HISTORICAL NOTE: - * The "delegate" object had to respond to the following protocol; - * this protocol has since been merged into the IOHIKeyboard class. - * - * @protocol KeyMapDelegate - * - * - keyboardEvent :(unsigned)eventType - * flags :(unsigned)flags - * keyCode :(unsigned)keyCode - * charCode:(unsigned)charCode - * charSet :(unsigned)charSet - * originalCharCode:(unsigned)origCharCode - * originalCharSet:(unsigned)origCharSet; - * - * - keyboardSpecialEvent:(unsigned)eventType - * flags :(unsigned)flags - * keyCode :(unsigned)keyCode - * specialty:(unsigned)flavor; - * - * - updateEventFlags:(unsigned)flags; // Does not generate events - * - * - (unsigned)eventFlags; // Global event flags - * - (unsigned)deviceFlags; // per-device event flags - * - setDeviceFlags:(unsigned)flags; // Set device event flags - * - (bool)alphaLock; // current alpha-lock state - * - setAlphaLock:(bool)val; // Set current alpha-lock state - * - (bool)charKeyActive; // Is a character gen. key down? - * - setCharKeyActive:(bool)val; // Note that a char gen key is down. - * - * @end - */ diff --git a/i386/include/IOKit/hidsystem/IOHIPointing.h b/i386/include/IOKit/hidsystem/IOHIPointing.h deleted file mode 100644 index 1df225a..0000000 --- a/i386/include/IOKit/hidsystem/IOHIPointing.h +++ /dev/null @@ -1,280 +0,0 @@ -/* - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2009 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _IOHIPOINTING_H -#define _IOHIPOINTING_H - -#include <IOKit/hidsystem/IOHIPointing.h> -#include <IOKit/hidsystem/IOHIDevice.h> -#include <IOKit/hidsystem/IOHIDTypes.h> - -/* Start Action Definitions */ - -/* - * HISTORICAL NOTE: - * The following entry points were part of the IOHIPointingEvents - * protocol. - */ -typedef void (*RelativePointerEventAction)(OSObject * target, - /* buttons */ int buttons, - /* deltaX */ int dx, - /* deltaY */ int dy, - /* atTime */ AbsoluteTime ts); - -typedef void (*AbsolutePointerEventAction)(OSObject * target, - /* buttons */ int buttons, - /* at */ IOGPoint * newLoc, - /* withBounds */ IOGBounds *bounds, - /* inProximity */ bool proximity, - /* withPressure */ int pressure, - /* withAngle */ int stylusAngle, - /* atTime */ AbsoluteTime ts); - -typedef void (*ScrollWheelEventAction)(OSObject * target, - short deltaAxis1, - short deltaAxis2, - short deltaAxis3, - AbsoluteTime ts); - -/* Event Callback Definitions */ - -typedef void (*RelativePointerEventCallback)( - /* target */ OSObject * target, - /* buttons */ int buttons, - /* deltaX */ int dx, - /* deltaY */ int dy, - /* atTime */ AbsoluteTime ts, - /* sender */ OSObject * sender, - /* refcon */ void * refcon); - -typedef void (*AbsolutePointerEventCallback)( - /* target */ OSObject * target, - /* buttons */ int buttons, - /* at */ IOGPoint * newLoc, - /* withBounds */ IOGBounds *bounds, - /* inProximity */ bool proximity, - /* withPressure */ int pressure, - /* withAngle */ int stylusAngle, - /* atTime */ AbsoluteTime ts, - /* sender */ OSObject * sender, - /* refcon */ void * refcon); - -typedef void (*ScrollWheelEventCallback)( - /* target */ OSObject * target, - /* delta1 */ short deltaAxis1, - /* delta2 */ short deltaAxis2, - /* delta3 */ short deltaAxis3, - /* fixedDelta1 */ IOFixed fixedDelta1, - /* fixedDelta2 */ IOFixed fixedDelta2, - /* fixedDelta3 */ IOFixed fixedDelta3, - /* pointDelta1 */ SInt32 pointDelta1, - /* pointDelta2 */ SInt32 pointDelta2, - /* pointDelta3 */ SInt32 pointDelta3, - /* reserved */ SInt32 options, - /* atTime */ AbsoluteTime ts, - /* sender */ OSObject * sender, - /* refcon */ void * refcon); - -/* End Action Definitions */ - -/* Default accel level parameters */ -#define EV_DEFAULTPOINTERACCELLEVEL 0x0000b000 -#define EV_DEFAULTSCROLLACCELLEVEL 0x00005000 - -class IOHIDPointingDevice; -struct ScrollAccelInfo; - -class IOHIPointing : public IOHIDevice -{ - OSDeclareDefaultStructors(IOHIPointing); - - friend class IOHITablet; - friend class IOHIDPointing; - -private: - IOLock * _deviceLock; // Lock for all device access - int _buttonMode; // The "handedness" of the pointer - IOFixed _acceleration; - bool _convertAbsoluteToRelative; - bool _contactToMove; - bool _hadContact; - IOGPoint _previousLocation; - UInt8 _pressureThresholdToClick; // A scale factor of 0 to 255 to determine how much pressure is necessary to generate a primary mouse click - a value of 255 means no click will be generated - void * _scaleSegments; - IOItemCount _scaleSegCount; - IOFixed _fractX; - IOFixed _fractY; - - OSObject * _relativePointerEventTarget; - RelativePointerEventAction _relativePointerEventAction; - OSObject * _absolutePointerEventTarget; - AbsolutePointerEventAction _absolutePointerEventAction; - OSObject * _scrollWheelEventTarget; - ScrollWheelEventAction _scrollWheelEventAction; - - struct ExpansionData { - UInt32 scrollType; - - ScrollAccelInfo * scrollWheelInfo; - ScrollAccelInfo * scrollPointerInfo; - - IOFixed scrollFixedDeltaAxis1; - IOFixed scrollFixedDeltaAxis2; - IOFixed scrollFixedDeltaAxis3; - SInt32 scrollPointDeltaAxis1; - SInt32 scrollPointDeltaAxis2; - SInt32 scrollPointDeltaAxis3; - UInt32 scrollButtonMask; - - // Added to post events to the HID Manager - IOHIDPointingDevice * hidPointingNub; - IOService * openClient; - - bool isSeized; - UInt32 accelerateMode; - - UInt32 scrollZoomMask; - bool lastScrollWasZoom; - bool scrollOff; - }; - - ExpansionData * _reserved; - - void setPointingMode(UInt32 accelerateMode); - UInt32 getPointingMode (); - void setScrollType(UInt32 scrollType); - UInt32 getScrollType(); - - void dispatchScrollWheelEventWithAccelInfo( - SInt32 deltaAxis1, - SInt32 deltaAxis2, - SInt32 deltaAxis3, - ScrollAccelInfo * info, - AbsoluteTime ts); - - -protected: - virtual void dispatchRelativePointerEvent(int dx, - int dy, - UInt32 buttonState, - AbsoluteTime ts); - - virtual void dispatchAbsolutePointerEvent(IOGPoint * newLoc, - IOGBounds * bounds, - UInt32 buttonState, - bool proximity, - int pressure, - int pressureMin, - int pressureMax, - int stylusAngle, - AbsoluteTime ts); - - virtual void dispatchScrollWheelEvent(short deltaAxis1, - short deltaAxis2, - short deltaAxis3, - AbsoluteTime ts); - -public: - virtual bool init(OSDictionary * properties = 0); - virtual bool start(IOService * provider); - virtual void free(); - - virtual bool open(IOService * client, - IOOptionBits options, - RelativePointerEventAction rpeAction, - AbsolutePointerEventAction apeAction, - ScrollWheelEventAction sweAction); - - bool open( IOService * client, - IOOptionBits options, - void *, - RelativePointerEventCallback rpeCallback, - AbsolutePointerEventCallback apeCallback, - ScrollWheelEventCallback sweCallback); - - virtual void close(IOService * client, IOOptionBits ); - virtual IOReturn message( UInt32 type, IOService * provider, - void * argument = 0 ); - - virtual IOHIDKind hidKind(); - virtual bool updateProperties( void ); - virtual IOReturn setParamProperties( OSDictionary * dict ); - virtual IOReturn powerStateWillChangeTo( IOPMPowerFlags powerFlags, - unsigned long newState, IOService * device); - virtual IOReturn powerStateDidChangeTo( IOPMPowerFlags powerFlags, - unsigned long newState, IOService * device); - -protected: // for subclasses to implement - virtual OSData * copyAccelerationTable(); - virtual IOItemCount buttonCount(); - virtual IOFixed resolution(); - - // RY: Adding method to copy scroll wheel accel table. - // Unfortunately, we don't have any padding, so this - // is going to be non-virtual. - /*virtual*/ OSData * copyScrollAccelerationTable(); - -private: - virtual bool resetPointer(); - virtual void scalePointer(int * dxp, int * dyp); - virtual void setupForAcceleration(IOFixed accl); - - // RY: Adding methods to support scroll wheel accel. - // Unfortunately, we don't have any padding, so these - // are going to be non-virtual. - /*virtual*/ bool resetScroll(); - /*virtual*/ void setupScrollForAcceleration(IOFixed accl); - - // RY: We have to make sure that subclasses that will - // take advantage of this have their defined resolution - // in their property table. - /*virtual*/ IOFixed scrollResolutionForType(SInt32 type=-1); - /*virtual*/ IOFixed scrollReportRate(); - /*virtual*/ OSData * copyScrollAccelerationTableForType(SInt32 type=-1); - -private: - static void _relativePointerEvent( IOHIPointing * self, - int buttons, - /* deltaX */ int dx, - /* deltaY */ int dy, - /* atTime */ AbsoluteTime ts); - - /* Tablet event reporting */ - static void _absolutePointerEvent(IOHIPointing * self, - int buttons, - /* at */ IOGPoint * newLoc, - /* withBounds */ IOGBounds *bounds, - /* inProximity */ bool proximity, - /* withPressure */ int pressure, - /* withAngle */ int stylusAngle, - /* atTime */ AbsoluteTime ts); - - /* Mouse scroll wheel event reporting */ - static void _scrollWheelEvent(IOHIPointing *self, - short deltaAxis1, - short deltaAxis2, - short deltaAxis3, - AbsoluteTime ts); - -}; - -#endif /* !_IOHIPOINTING_H */ diff --git a/i386/include/IOKit/hidsystem/IOLLEvent.h b/i386/include/IOKit/hidsystem/IOLLEvent.h deleted file mode 100644 index 53fd70c..0000000 --- a/i386/include/IOKit/hidsystem/IOLLEvent.h +++ /dev/null @@ -1,558 +0,0 @@ -/* - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2009 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/****************************************************************************** - event.h (PostScript side version) - - CONFIDENTIAL - Copyright (c) 1988 NeXT, Inc. as an unpublished work. - All Rights Reserved. - - Created Leo 01Mar88 - - Modified: - 04May88 Leo Final event types and record - 22Aug88 Leo Change short -> int for window, add reserved - 26May90 Ted Added NX_UNDIMMASK to correct triggering of UndoAutoDim - 12Dec91 Mike Brought into sync with dpsclient/event.h, and fixed - the #ifndef interlock with dpsclient/event.h that was - broken during the Great Header Revision. - - The PostScript version of this file differs from the - Window Kit version in that the coordinates here are - ints instead of floats. -******************************************************************************/ - -#ifndef _DEV_EVENT_H -#define _DEV_EVENT_H - -#include <libkern/OSTypes.h> -#include <IOKit/hidsystem/IOHIDTypes.h> - -#ifdef EVENT_H /* Interlock with dpsclient/event.h */ -#if !defined(_NXSIZE_) /* Work around patch for old event.h in Phase 3 projs*/ -#define _NXSIZE_ 1 /* NXCoord, NXPoint, NXSize decl seen */ -#define _NXSize_ NXSize -#endif /* _NXSIZE_ */ -#else /* EVENT_H */ /* Haven't seen dpsclient/event.h, so define away */ -#define EVENT_H - -#ifdef KERNEL -#else /* KERNEL */ - -#if !defined(_NXSIZE_) /* Work around patch for old event.h in Phase 3 projs*/ -#define _NXSIZE_ 1 /* NXCoord, NXPoint, NXSize decl seen */ -typedef float NXCoord; - -typedef struct _NXPoint { /* point */ - NXCoord x, y; -} NXPoint; - -typedef struct _NXSize { /* size */ - NXCoord width, height; -} NXSize; -#define _NXSize_ NXSize /* Correct usage in event_status_driver.h */ -#endif /* _NXSIZE_ */ - -#endif /* KERNEL */ - -/* Event types */ - -#define NX_NULLEVENT 0 /* internal use */ - -/* mouse events */ - -#define NX_LMOUSEDOWN 1 /* left mouse-down event */ -#define NX_LMOUSEUP 2 /* left mouse-up event */ -#define NX_RMOUSEDOWN 3 /* right mouse-down event */ -#define NX_RMOUSEUP 4 /* right mouse-up event */ -#define NX_MOUSEMOVED 5 /* mouse-moved event */ -#define NX_LMOUSEDRAGGED 6 /* left mouse-dragged event */ -#define NX_RMOUSEDRAGGED 7 /* right mouse-dragged event */ -#define NX_MOUSEENTERED 8 /* mouse-entered event */ -#define NX_MOUSEEXITED 9 /* mouse-exited event */ - -/* other mouse events - * - * event.data.mouse.buttonNumber should contain the - * button number (2-31) changing state. - */ -#define NX_OMOUSEDOWN 25 /* other mouse-down event */ -#define NX_OMOUSEUP 26 /* other mouse-up event */ -#define NX_OMOUSEDRAGGED 27 /* other mouse-dragged event */ - -/* keyboard events */ - -#define NX_KEYDOWN 10 /* key-down event */ -#define NX_KEYUP 11 /* key-up event */ -#define NX_FLAGSCHANGED 12 /* flags-changed event */ - -/* composite events */ - -#define NX_KITDEFINED 13 /* application-kit-defined event */ -#define NX_SYSDEFINED 14 /* system-defined event */ -#define NX_APPDEFINED 15 /* application-defined event */ -/* There are additional DPS client defined events past this point. */ - -/* Scroll wheel events */ - -#define NX_SCROLLWHEELMOVED 22 - -/* Zoom events */ -#define NX_ZOOM 28 - -/* tablet events */ - -#define NX_TABLETPOINTER 23 /* for non-mousing transducers */ -#define NX_TABLETPROXIMITY 24 /* for non-mousing transducers */ - -/* event range */ - -#define NX_FIRSTEVENT 0 -#define NX_LASTEVENT 28 -#define NX_NUMPROCS (NX_LASTEVENT-NX_FIRSTEVENT+1) - -/* Event masks */ -#define NX_NULLEVENTMASK (1 << NX_NULLEVENT) /* NULL event */ -#define NX_LMOUSEDOWNMASK (1 << NX_LMOUSEDOWN) /* left mouse-down */ -#define NX_LMOUSEUPMASK (1 << NX_LMOUSEUP) /* left mouse-up */ -#define NX_RMOUSEDOWNMASK (1 << NX_RMOUSEDOWN) /* right mouse-down */ -#define NX_RMOUSEUPMASK (1 << NX_RMOUSEUP) /* right mouse-up */ -#define NX_OMOUSEDOWNMASK (1 << NX_OMOUSEDOWN) /* other mouse-down */ -#define NX_OMOUSEUPMASK (1 << NX_OMOUSEUP) /* other mouse-up */ -#define NX_MOUSEMOVEDMASK (1 << NX_MOUSEMOVED) /* mouse-moved */ -#define NX_LMOUSEDRAGGEDMASK (1 << NX_LMOUSEDRAGGED) /* left-dragged */ -#define NX_RMOUSEDRAGGEDMASK (1 << NX_RMOUSEDRAGGED) /* right-dragged */ -#define NX_OMOUSEDRAGGEDMASK (1 << NX_OMOUSEDRAGGED) /* other-dragged */ -#define NX_MOUSEENTEREDMASK (1 << NX_MOUSEENTERED) /* mouse-entered */ -#define NX_MOUSEEXITEDMASK (1 << NX_MOUSEEXITED) /* mouse-exited */ -#define NX_KEYDOWNMASK (1 << NX_KEYDOWN) /* key-down */ -#define NX_KEYUPMASK (1 << NX_KEYUP) /* key-up */ -#define NX_FLAGSCHANGEDMASK (1 << NX_FLAGSCHANGED) /* flags-changed */ -#define NX_KITDEFINEDMASK (1 << NX_KITDEFINED) /* kit-defined */ -#define NX_SYSDEFINEDMASK (1 << NX_SYSDEFINED) /* system-defined */ -#define NX_APPDEFINEDMASK (1 << NX_APPDEFINED) /* app-defined */ -#define NX_SCROLLWHEELMOVEDMASK (1 << NX_SCROLLWHEELMOVED) /* scroll wheel moved */ -#define NX_ZOOMMASK (1 << NX_ZOOM) /* Zoom */ -#define NX_TABLETPOINTERMASK (1 << NX_TABLETPOINTER) /* tablet pointer moved */ -#define NX_TABLETPROXIMITYMASK (1 << NX_TABLETPROXIMITY) /* tablet pointer proximity */ - -#define EventCodeMask(type) (1 << (type)) -#define NX_ALLEVENTS -1 /* Check for all events */ - -/* sub types for mouse and move events */ - -#define NX_SUBTYPE_DEFAULT 0 -#define NX_SUBTYPE_TABLET_POINT 1 -#define NX_SUBTYPE_TABLET_PROXIMITY 2 -#define NX_SUBTYPE_MOUSE_TOUCH 3 - -/* sub types for system defined events */ - -#define NX_SUBTYPE_POWER_KEY 1 -#define NX_SUBTYPE_AUX_MOUSE_BUTTONS 7 - -/* - * NX_SUBTYPE_AUX_CONTROL_BUTTONS usage - * - * The incoming NXEvent for other mouse button down/up has event.type - * NX_SYSDEFINED and event.data.compound.subtype NX_SUBTYPE_AUX_MOUSE_BUTTONS. - * Within the event.data.compound.misc.L[0] contains bits for all the buttons - * that have changed state, and event.data.compound.misc.L[1] contains the - * current button state as a bitmask, with 1 representing down, and 0 - * representing up. Bit 0 is the left button, bit one is the right button, - * bit 2 is the center button and so forth. - */ -#define NX_SUBTYPE_AUX_CONTROL_BUTTONS 8 - -#define NX_SUBTYPE_EJECT_KEY 10 -#define NX_SUBTYPE_SLEEP_EVENT 11 -#define NX_SUBTYPE_RESTART_EVENT 12 -#define NX_SUBTYPE_SHUTDOWN_EVENT 13 - -#define NX_SUBTYPE_STICKYKEYS_ON 100 -#define NX_SUBTYPE_STICKYKEYS_OFF 101 -#define NX_SUBTYPE_STICKYKEYS_SHIFT 102 -#define NX_SUBTYPE_STICKYKEYS_CONTROL 103 -#define NX_SUBTYPE_STICKYKEYS_ALTERNATE 104 -#define NX_SUBTYPE_STICKYKEYS_COMMAND 105 -#define NX_SUBTYPE_STICKYKEYS_RELEASE 106 -#define NX_SUBTYPE_STICKYKEYS_TOGGLEMOUSEDRIVING 107 - -// New stickykeys key events -// These were created to send an event describing the -// different state of the modifiers -#define NX_SUBTYPE_STICKYKEYS_SHIFT_DOWN 110 -#define NX_SUBTYPE_STICKYKEYS_CONTROL_DOWN 111 -#define NX_SUBTYPE_STICKYKEYS_ALTERNATE_DOWN 112 -#define NX_SUBTYPE_STICKYKEYS_COMMAND_DOWN 113 -#define NX_SUBTYPE_STICKYKEYS_FN_DOWN 114 - -#define NX_SUBTYPE_STICKYKEYS_SHIFT_LOCK 120 -#define NX_SUBTYPE_STICKYKEYS_CONTROL_LOCK 121 -#define NX_SUBTYPE_STICKYKEYS_ALTERNATE_LOCK 122 -#define NX_SUBTYPE_STICKYKEYS_COMMAND_LOCK 123 -#define NX_SUBTYPE_STICKYKEYS_FN_LOCK 124 - -#define NX_SUBTYPE_STICKYKEYS_SHIFT_UP 130 -#define NX_SUBTYPE_STICKYKEYS_CONTROL_UP 131 -#define NX_SUBTYPE_STICKYKEYS_ALTERNATE_UP 132 -#define NX_SUBTYPE_STICKYKEYS_COMMAND_UP 133 -#define NX_SUBTYPE_STICKYKEYS_FN_UP 134 - - - -// SlowKeys -#define NX_SUBTYPE_SLOWKEYS_START 200 -#define NX_SUBTYPE_SLOWKEYS_ABORT 201 -#define NX_SUBTYPE_SLOWKEYS_END 202 - -// HID Parameter Property Modified -#define NX_SUBTYPE_HIDPARAMETER_MODIFIED 210 - -/* Masks for the bits in event.flags */ - -/* device-independent */ - -#define NX_ALPHASHIFTMASK 0x00010000 -#define NX_SHIFTMASK 0x00020000 -#define NX_CONTROLMASK 0x00040000 -#define NX_ALTERNATEMASK 0x00080000 -#define NX_COMMANDMASK 0x00100000 -#define NX_NUMERICPADMASK 0x00200000 -#define NX_HELPMASK 0x00400000 -#define NX_SECONDARYFNMASK 0x00800000 - -/* device-dependent (really?) */ - -#define NX_DEVICELCTLKEYMASK 0x00000001 -#define NX_DEVICELSHIFTKEYMASK 0x00000002 -#define NX_DEVICERSHIFTKEYMASK 0x00000004 -#define NX_DEVICELCMDKEYMASK 0x00000008 -#define NX_DEVICERCMDKEYMASK 0x00000010 -#define NX_DEVICELALTKEYMASK 0x00000020 -#define NX_DEVICERALTKEYMASK 0x00000040 -#define NX_DEVICERCTLKEYMASK 0x00002000 - -/* - * Additional reserved bits in event.flags - */ - -#define NX_STYLUSPROXIMITYMASK 0x00000080 /* deprecated */ -#define NX_NONCOALSESCEDMASK 0x00000100 - -/* click state values - * If you have the following events in close succession, the click - * field has the indicated value: - * - * Event Click Value Comments - * mouse-down 1 Not part of any click yet - * mouse-up 1 Aha! A click! - * mouse-down 2 Doing a double-click - * mouse-up 2 It's finished - * mouse-down 3 A triple - * mouse-up 3 - */ - -/* Values for the character set in event.data.key.charSet */ - -#define NX_ASCIISET 0 -#define NX_SYMBOLSET 1 -#define NX_DINGBATSSET 2 - -/* tablet button masks - * Mask bits for the tablet barrel buttons placed in tablet.buttons. - * The buttons field uses adopts the following convention: - * - * Bit Comments - * 0 Left Mouse Button ( kHIDUsage_Button_1 ) - * 1 Right Mouse Button ( kHIDUsage_Button_2 ) - * 2 Middle Mouse Button ( kHIDUsage_Button_3 ) - * 3 4th Mouse Button ( kHIDUsage_Button_4 ) - * ... - * 15 15th Mouse Button - * - * For your convenience, the following mask bits have been defined - * for tablet specific application: - */ - -#define NX_TABLET_BUTTON_PENTIPMASK 0x0001 -#define NX_TABLET_BUTTON_PENLOWERSIDEMASK 0x0002 -#define NX_TABLET_BUTTON_PENUPPERSIDEMASK 0x0004 - - -/* tablet capability masks - * Mask bits for the tablet capabilities field. Use these - * masks with the capabilities field of a proximity event to - * determine what fields in a Tablet Event are valid for this - * device. - */ -#define NX_TABLET_CAPABILITY_DEVICEIDMASK 0x0001 -#define NX_TABLET_CAPABILITY_ABSXMASK 0x0002 -#define NX_TABLET_CAPABILITY_ABSYMASK 0x0004 -#define NX_TABLET_CAPABILITY_VENDOR1MASK 0x0008 -#define NX_TABLET_CAPABILITY_VENDOR2MASK 0x0010 -#define NX_TABLET_CAPABILITY_VENDOR3MASK 0x0020 -#define NX_TABLET_CAPABILITY_BUTTONSMASK 0x0040 -#define NX_TABLET_CAPABILITY_TILTXMASK 0x0080 -#define NX_TABLET_CAPABILITY_TILTYMASK 0x0100 -#define NX_TABLET_CAPABILITY_ABSZMASK 0x0200 -#define NX_TABLET_CAPABILITY_PRESSUREMASK 0x0400 -#define NX_TABLET_CAPABILITY_TANGENTIALPRESSUREMASK 0x0800 -#define NX_TABLET_CAPABILITY_ORIENTINFOMASK 0x1000 -#define NX_TABLET_CAPABILITY_ROTATIONMASK 0x2000 - -/* proximity pointer types - * Value that describes the type of pointing device placed in - * proximity.pointerType. - */ - -#define NX_TABLET_POINTER_UNKNOWN 0 -#define NX_TABLET_POINTER_PEN 1 -#define NX_TABLET_POINTER_CURSOR 2 -#define NX_TABLET_POINTER_ERASER 3 - -/* TabletPointData type: defines the tablet data for points included - * in mouse events created by a tablet driver. - */ - -typedef struct _NXTabletPointData { - SInt32 x; /* absolute x coordinate in tablet space at full tablet resolution */ - SInt32 y; /* absolute y coordinate in tablet space at full tablet resolution */ - SInt32 z; /* absolute z coordinate in tablet space at full tablet resolution */ - UInt16 buttons; /* one bit per button - bit 0 is first button - 1 = closed */ - UInt16 pressure; /* scaled pressure value; MAX=(2^16)-1, MIN=0 */ - struct { /* tilt range is -((2^15)-1) to (2^15)-1 (-32767 to 32767) */ - SInt16 x; /* scaled tilt x value */ - SInt16 y; /* scaled tilt y value */ - } tilt; - UInt16 rotation; /* Fixed-point representation of device rotation in a 10.6 format */ - SInt16 tangentialPressure; /* tangential pressure on the device; same range as tilt */ - UInt16 deviceID; /* system-assigned unique device ID */ - SInt16 vendor1; /* vendor-defined signed 16-bit integer */ - SInt16 vendor2; /* vendor-defined signed 16-bit integer */ - SInt16 vendor3; /* vendor-defined signed 16-bit integer */ -} NXTabletPointData, *NXTabletPointDataPtr; - -/* TabletProximityData type: defines the tablet data for proximity - * events included in mouse events created by a tablet driver. - */ - -typedef struct _NXTabletProximityData { - UInt16 vendorID; /* vendor-defined ID - typically the USB vendor ID */ - UInt16 tabletID; /* vendor-defined tablet ID - typically the USB product ID */ - UInt16 pointerID; /* vendor-defined ID of the specific pointing device */ - UInt16 deviceID; /* system-assigned unique device ID */ - UInt16 systemTabletID; /* system-assigned unique tablet ID */ - UInt16 vendorPointerType; /* vendor-defined pointer type */ - UInt32 pointerSerialNumber; /* vendor-defined serial number */ - UInt64 uniqueID __attribute__ ((packed)); /* vendor-defined unique ID */ - UInt32 capabilityMask; /* capabilities mask of the device */ - UInt8 pointerType; /* type of pointing device */ - UInt8 enterProximity; /* non-zero = entering; zero = leaving */ - SInt16 reserved1; -} NXTabletProximityData, *NXTabletProximityDataPtr; - -/* EventData type: defines the data field of an event */ - -typedef union { - struct { /* For mouse-down and mouse-up events */ - UInt8 subx; /* sub-pixel position for x */ - UInt8 suby; /* sub-pixel position for y */ - SInt16 eventNum; /* unique identifier for this button */ - SInt32 click; /* click state of this event */ - UInt8 pressure; /* pressure value: 0=none, 255=full */ - UInt8 buttonNumber;/* button generating other button event (0-31) */ - UInt8 subType; - UInt8 reserved2; - SInt32 reserved3; - union { - NXTabletPointData point; /* tablet point data */ - NXTabletProximityData proximity; /* tablet proximity data */ - } tablet; - } mouse; - struct { - SInt32 dx; - SInt32 dy; - UInt8 subx; - UInt8 suby; - UInt8 subType; - UInt8 reserved1; - SInt32 reserved2; - union { - NXTabletPointData point; /* tablet point data */ - NXTabletProximityData proximity; /* tablet proximity data */ - } tablet; - } mouseMove; - struct { /* For key-down and key-up events */ - UInt16 origCharSet; /* unmodified character set code */ - SInt16 repeat; /* for key-down: nonzero if really a repeat */ - UInt16 charSet; /* character set code */ - UInt16 charCode; /* character code in that set */ - UInt16 keyCode; /* device-dependent key number */ - UInt16 origCharCode; /* unmodified character code */ - SInt32 reserved1; - UInt32 keyboardType; - SInt32 reserved2; - SInt32 reserved3; - SInt32 reserved4; - SInt32 reserved5[4]; - } key; - struct { /* For mouse-entered and mouse-exited events */ - SInt16 reserved; - SInt16 eventNum; /* unique identifier from mouse down event */ - SInt32 trackingNum; /* unique identifier from settrackingrect */ - SInt32 userData; /* uninterpreted integer from settrackingrect */ - SInt32 reserved1; - SInt32 reserved2; - SInt32 reserved3; - SInt32 reserved4; - SInt32 reserved5; - SInt32 reserved6[4]; - } tracking; - struct { - SInt16 deltaAxis1; - SInt16 deltaAxis2; - SInt16 deltaAxis3; - SInt16 reserved1; - SInt32 fixedDeltaAxis1; - SInt32 fixedDeltaAxis2; - SInt32 fixedDeltaAxis3; - SInt32 pointDeltaAxis1; - SInt32 pointDeltaAxis2; - SInt32 pointDeltaAxis3; - SInt32 reserved8[4]; - } scrollWheel, zoom; - struct { /* For window-changed, sys-defined, and app-defined events */ - SInt16 reserved; - SInt16 subType; /* event subtype for compound events */ - union { - float F[11]; /* for use in compound events */ - SInt32 L[11]; /* for use in compound events */ - SInt16 S[22]; /* for use in compound events */ - char C[44]; /* for use in compound events */ - } misc; - } compound; - struct { - SInt32 x; /* absolute x coordinate in tablet space at full tablet resolution */ - SInt32 y; /* absolute y coordinate in tablet space at full tablet resolution */ - SInt32 z; /* absolute z coordinate in tablet space at full tablet resolution */ - UInt16 buttons; /* one bit per button - bit 0 is first button - 1 = closed */ - UInt16 pressure; /* scaled pressure value; MAX=(2^16)-1, MIN=0 */ - struct { /* tilt range is -((2^15)-1) to (2^15)-1 (-32767 to 32767) */ - SInt16 x; /* scaled tilt x value */ - SInt16 y; /* scaled tilt y value */ - } tilt; - UInt16 rotation; /* Fixed-point representation of device rotation in a 10.6 format */ - SInt16 tangentialPressure; /* tangential pressure on the device; same range as tilt */ - UInt16 deviceID; /* system-assigned unique device ID */ - SInt16 vendor1; /* vendor-defined signed 16-bit integer */ - SInt16 vendor2; /* vendor-defined signed 16-bit integer */ - SInt16 vendor3; /* vendor-defined signed 16-bit integer */ - SInt32 reserved[4]; - } tablet; - struct { - UInt16 vendorID; /* vendor-defined ID - typically the USB vendor ID */ - UInt16 tabletID; /* vendor-defined tablet ID - typically the USB product ID */ - UInt16 pointerID; /* vendor-defined ID of the specific pointing device */ - UInt16 deviceID; /* system-assigned unique device ID */ - UInt16 systemTabletID; /* system-assigned unique tablet ID */ - UInt16 vendorPointerType; /* vendor-defined pointer type */ - UInt32 pointerSerialNumber; /* vendor-defined serial number */ - UInt64 uniqueID __attribute__ ((packed)); /* vendor-defined unique ID */ - UInt32 capabilityMask; /* capabilities mask of the device */ - UInt8 pointerType; /* type of pointing device */ - UInt8 enterProximity; /* non-zero = entering; zero = leaving */ - SInt16 reserved1; - SInt32 reserved2[4]; - } proximity; -} NXEventData; - -/* The current version number of the NXEventData structure. */ - -#define kNXEventDataVersion 2 - -/* Finally! The event record! */ -#ifndef __ppc__ -typedef struct _NXEvent { - SInt32 type; /* An event type from above */ - struct { - SInt32 x, y; /* Base coordinates in window, */ - } location; /* from bottom left */ - UInt64 time __attribute__ ((packed)); /* time since launch */ - SInt32 flags; /* key state flags */ - UInt32 window; /* window number of assigned window */ - UInt64 service_id __attribute__ ((packed)); /* service id */ - SInt32 ext_pid; /* external pid */ - NXEventData data; /* type-dependent data */ -} NXEvent, *NXEventPtr; - -#else - -typedef struct _NXEvent { - SInt32 type; /* An event type from above */ - struct { - SInt32 x, y; /* Base coordinates in window, */ - } location; /* from bottom left */ - UInt64 time __attribute__ ((packed)); /* time since launch */ - SInt32 flags; /* key state flags */ - UInt32 window; /* window number of assigned window */ - NXEventData data; /* type-dependent data */ - UInt64 service_id __attribute__ ((packed)); /* service id */ - SInt32 ext_pid; /* external pid */ -} NXEvent, *NXEventPtr; -#endif - -/* The current version number of the NXEvent structure. */ - -#define kNXEventVersion 2 - -/* How to pick window(s) for event (for PostEvent) */ -#define NX_NOWINDOW -1 -#define NX_BYTYPE 0 -#define NX_BROADCAST 1 -#define NX_TOPWINDOW 2 -#define NX_FIRSTWINDOW 3 -#define NX_MOUSEWINDOW 4 -#define NX_NEXTWINDOW 5 -#define NX_LASTLEFT 6 -#define NX_LASTRIGHT 7 -#define NX_LASTKEY 8 -#define NX_EXPLICIT 9 -#define NX_TRANSMIT 10 -#define NX_BYPSCONTEXT 11 - -#endif /* EVENT_H */ /* End of defs common with dpsclient/event.h */ - -/* Mask of events that cause screen to undim */ - -#define NX_UNDIMMASK (NX_KEYDOWNMASK | NX_KEYUPMASK | \ - NX_LMOUSEDOWNMASK | NX_LMOUSEUPMASK | \ - NX_RMOUSEDOWNMASK | NX_RMOUSEUPMASK | \ - NX_MOUSEMOVEDMASK | NX_FLAGSCHANGEDMASK | \ - NX_MOUSEENTEREDMASK | NX_MOUSEEXITEDMASK | \ - NX_LMOUSEDRAGGEDMASK | NX_RMOUSEDRAGGEDMASK | \ - NX_SCROLLWHEELMOVEDMASK | NX_TABLETPOINTERMASK | \ - NX_TABLETPROXIMITYMASK | NX_NULLEVENTMASK) - -#endif /* !_DEV_EVENT_H */ - diff --git a/i386/include/IOKit/hidsystem/ev_keymap.h b/i386/include/IOKit/hidsystem/ev_keymap.h deleted file mode 100644 index a94cf11..0000000 --- a/i386/include/IOKit/hidsystem/ev_keymap.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. - * - * ev_keymap.h - * Defines the structure used for parsing keymappings. These structures - * and definitions are used by event sources in the kernel and by - * applications and utilities which manipulate keymaps. - * - * HISTORY - * 02-Jun-1992 Mike Paquette at NeXT - * Created. - */ - -#ifndef _DEV_EV_KEYMAP_H -#define _DEV_EV_KEYMAP_H - -#define NX_NUMKEYCODES 256 /* Highest key code is 0xff. ADB used to use 0x80 for keydown state, but who the heck uses adb anymore. */ -#define NX_NUMSEQUENCES 128 /* Maximum possible number of sequences */ -#define NX_NUMMODIFIERS 16 /* Maximum number of modifier bits */ -#define NX_BYTE_CODES 0 /* If first short 0, all are bytes (else shorts) */ - -#define NX_WHICHMODMASK 0x0f /* bits out of keyBits for bucky bits */ -#define NX_MODMASK 0x10 /* Bit out of keyBits indicates modifier bit */ -#define NX_CHARGENMASK 0x20 /* bit out of keyBits for char gen */ -#define NX_SPECIALKEYMASK 0x40 /* bit out of keyBits for specialty key */ -#define NX_KEYSTATEMASK 0x80 /* OBSOLETE - DO NOT USE IN NEW DESIGNS */ - -/* - * Special keys currently known to and understood by the system. - * If new specialty keys are invented, extend this list as appropriate. - * The presence of these keys in a particular implementation is not - * guaranteed. - */ -#define NX_NOSPECIALKEY 0xFFFF -#define NX_KEYTYPE_SOUND_UP 0 -#define NX_KEYTYPE_SOUND_DOWN 1 -#define NX_KEYTYPE_BRIGHTNESS_UP 2 -#define NX_KEYTYPE_BRIGHTNESS_DOWN 3 -#define NX_KEYTYPE_CAPS_LOCK 4 -#define NX_KEYTYPE_HELP 5 -#define NX_POWER_KEY 6 -#define NX_KEYTYPE_MUTE 7 -#define NX_UP_ARROW_KEY 8 -#define NX_DOWN_ARROW_KEY 9 -#define NX_KEYTYPE_NUM_LOCK 10 - -#define NX_KEYTYPE_CONTRAST_UP 11 -#define NX_KEYTYPE_CONTRAST_DOWN 12 -#define NX_KEYTYPE_LAUNCH_PANEL 13 -#define NX_KEYTYPE_EJECT 14 -#define NX_KEYTYPE_VIDMIRROR 15 - -#define NX_KEYTYPE_PLAY 16 -#define NX_KEYTYPE_NEXT 17 -#define NX_KEYTYPE_PREVIOUS 18 -#define NX_KEYTYPE_FAST 19 -#define NX_KEYTYPE_REWIND 20 - -#define NX_KEYTYPE_ILLUMINATION_UP 21 -#define NX_KEYTYPE_ILLUMINATION_DOWN 22 -#define NX_KEYTYPE_ILLUMINATION_TOGGLE 23 - -#define NX_NUMSPECIALKEYS 24 /* Maximum number of special keys */ -#define NX_NUM_SCANNED_SPECIALKEYS 24 /* First 24 special keys are */ - /* actively scanned in kernel */ - -/* Mask of special keys that are posted as events */ - -#define NX_SPECIALKEY_POST_MASK \ - ((1 << NX_KEYTYPE_SOUND_UP) | (1 << NX_KEYTYPE_SOUND_DOWN) | \ - (1 << NX_POWER_KEY) | (1 << NX_KEYTYPE_MUTE) | \ - (1 << NX_KEYTYPE_BRIGHTNESS_UP) | (1 << NX_KEYTYPE_BRIGHTNESS_DOWN) | \ - (1 << NX_KEYTYPE_CONTRAST_UP) | (1 << NX_KEYTYPE_CONTRAST_UP) | \ - (1 << NX_KEYTYPE_LAUNCH_PANEL) | (1 << NX_KEYTYPE_EJECT) | \ - (1 << NX_KEYTYPE_VIDMIRROR) | (1 << NX_KEYTYPE_PLAY) | \ - (1 << NX_KEYTYPE_NEXT) | (1 << NX_KEYTYPE_PREVIOUS) | \ - (1 << NX_KEYTYPE_FAST) | (1 << NX_KEYTYPE_REWIND) | \ - (1 << NX_KEYTYPE_ILLUMINATION_UP) | \ - (1 << NX_KEYTYPE_ILLUMINATION_DOWN) | \ - (1 << NX_KEYTYPE_ILLUMINATION_TOGGLE) | 0) - -/* Modifier key indices into modDefs[] */ -#define NX_MODIFIERKEY_ALPHALOCK 0 -#define NX_MODIFIERKEY_SHIFT 1 -#define NX_MODIFIERKEY_CONTROL 2 -#define NX_MODIFIERKEY_ALTERNATE 3 -#define NX_MODIFIERKEY_COMMAND 4 -#define NX_MODIFIERKEY_NUMERICPAD 5 -#define NX_MODIFIERKEY_HELP 6 -#define NX_MODIFIERKEY_SECONDARYFN 7 -#define NX_MODIFIERKEY_NUMLOCK 8 - -/* support for right hand modifier */ -#define NX_MODIFIERKEY_RSHIFT 9 -#define NX_MODIFIERKEY_RCONTROL 10 -#define NX_MODIFIERKEY_RALTERNATE 11 -#define NX_MODIFIERKEY_RCOMMAND 12 - - -typedef struct _NXParsedKeyMapping_ { - /* If nonzero, all numbers are shorts; if zero, all numbers are bytes*/ - short shorts; - - /* - * For each keycode, low order bit says if the key - * generates characters. - * High order bit says if the key is assigned to a modifier bit. - * The second to low order bit gives the current state of the key. - */ - char keyBits[NX_NUMKEYCODES]; - - /* Bit number of highest numbered modifier bit */ - int maxMod; - - /* Pointers to where the list of keys for each modifiers bit begins, - * or NULL. - */ - unsigned char *modDefs[NX_NUMMODIFIERS]; - - /* Key code of highest key deinfed to generate characters */ - int numDefs; - - /* Pointer into the keyMapping where this key's definitions begin */ - unsigned char *keyDefs[NX_NUMKEYCODES]; - - /* number of sequence definitions */ - int numSeqs; - - /* pointers to sequences */ - unsigned char *seqDefs[NX_NUMSEQUENCES]; - - /* Special key definitions */ - int numSpecialKeys; - - /* Special key values, or 0xFFFF if none */ - unsigned short specialKeys[NX_NUMSPECIALKEYS]; - - /* Pointer to the original keymapping string */ - const unsigned char *mapping; - - /* Length of the original string */ - int mappingLen; -} NXParsedKeyMapping; - -#endif /* !_DEV_EV_KEYMAP_H */ diff --git a/i386/include/IOKit/i2c/IOI2CInterface.h b/i386/include/IOKit/i2c/IOI2CInterface.h deleted file mode 100644 index 70a38e2..0000000 --- a/i386/include/IOKit/i2c/IOI2CInterface.h +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOI2CINTERFACE_H -#define _IOKIT_IOI2CINTERFACE_H - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -typedef struct IOI2CRequest IOI2CRequest; -typedef struct IOI2CBuffer IOI2CBuffer; - -typedef void (*IOI2CRequestCompletion) (IOI2CRequest * request); - -// IOI2CRequest.sendTransactionType, IOI2CRequest.replyTransactionType -enum { - kIOI2CNoTransactionType = 0, - kIOI2CSimpleTransactionType = 1, - kIOI2CDDCciReplyTransactionType = 2, - kIOI2CCombinedTransactionType = 3, - kIOI2CDisplayPortNativeTransactionType = 4 -}; - -// IOI2CRequest.commFlags -enum { - kIOI2CUseSubAddressCommFlag = 0x00000002 -}; - -/*! - * @struct IOI2CRequest - * @abstract A structure defining an I2C bus transaction. - * @discussion This structure is used to request an I2C transaction consisting of a send (write) to and reply (read) from a device, either of which is optional, to be carried out atomically on an I2C bus. - * @field __reservedA Set to zero. - * @field result The result of the transaction. Common errors are kIOReturnNoDevice if there is no device responding at the given address, kIOReturnUnsupportedMode if the type of transaction is unsupported on the requested bus. - * @field completion A completion routine to be executed when the request completes. If NULL is passed, the request is synchronous, otherwise it may execute asynchronously. - * @field commFlags Flags that modify the I2C transaction type. The following flags are defined:<br> - * kIOI2CUseSubAddressCommFlag Transaction includes a subaddress.<br> - * @field minReplyDelay Minimum delay as absolute time between send and reply transactions. - * @field sendAddress I2C address to write. - * @field sendSubAddress I2C subaddress to write. - * @field __reservedB Set to zero. - * @field sendTransactionType The following types of transaction are defined for the send part of the request:<br> - * kIOI2CNoTransactionType No send transaction to perform. <br> - * kIOI2CSimpleTransactionType Simple I2C message. <br> - * kIOI2CCombinedTransactionType Combined format I2C R/~W transaction. <br> - * @field sendBuffer Pointer to the send buffer. - * @field sendBytes Number of bytes to send. Set to actual bytes sent on completion of the request. - * @field replyAddress I2C Address from which to read. - * @field replySubAddress I2C Address from which to read. - * @field __reservedC Set to zero. - * @field replyTransactionType The following types of transaction are defined for the reply part of the request:<br> - * kIOI2CNoTransactionType No reply transaction to perform. <br> - * kIOI2CSimpleTransactionType Simple I2C message. <br> - * kIOI2CDDCciReplyTransactionType DDC/ci message (with embedded length). See VESA DDC/ci specification. <br> - * kIOI2CCombinedTransactionType Combined format I2C R/~W transaction. <br> - * @field replyBuffer Pointer to the reply buffer. - * @field replyBytes Max bytes to reply (size of replyBuffer). Set to actual bytes received on completion of the request. - * @field __reservedD Set to zero. - */ - -#pragma pack(push, 4) -struct IOI2CRequest -{ - IOOptionBits sendTransactionType; - IOOptionBits replyTransactionType; - uint32_t sendAddress; - uint32_t replyAddress; - uint8_t sendSubAddress; - uint8_t replySubAddress; - uint8_t __reservedA[2]; - - uint64_t minReplyDelay; - - IOReturn result; - IOOptionBits commFlags; - -#if defined(__LP64__) - uint32_t __padA; -#else - vm_address_t sendBuffer; -#endif - uint32_t sendBytes; - - uint32_t __reservedB[2]; - -#if defined(__LP64__) - uint32_t __padB; -#else - vm_address_t replyBuffer; -#endif - uint32_t replyBytes; - - IOI2CRequestCompletion completion; -#if !defined(__LP64__) - uint32_t __padC[5]; -#else - vm_address_t sendBuffer; - vm_address_t replyBuffer; -#endif - - uint32_t __reservedC[10]; -#ifdef __ppc__ - uint32_t __reservedD; -#endif -}; -#pragma pack(pop) - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#define kIOI2CInterfaceClassName "IOI2CInterface" - -#define kIOI2CInterfaceIDKey "IOI2CInterfaceID" -#define kIOI2CBusTypeKey "IOI2CBusType" -#define kIOI2CTransactionTypesKey "IOI2CTransactionTypes" -#define kIOI2CSupportedCommFlagsKey "IOI2CSupportedCommFlags" - -#define kIOFBI2CInterfaceInfoKey "IOFBI2CInterfaceInfo" -#define kIOFBI2CInterfaceIDsKey "IOFBI2CInterfaceIDs" - -// kIOI2CBusTypeKey values -enum { - kIOI2CBusTypeI2C = 1, - kIOI2CBusTypeDisplayPort = 2 -}; - -/*! - * @struct IOI2CBusTiming - * @abstract A structure defining low level timing for an I2C bus. - * @discussion This structure is used to specify timeouts and pulse widths for an I2C bus implementation. - * @field bitTimeout Maximum time a slave can delay (by pulling the clock line low) a single bit response. - * @field byteTimeout Maximum time a slave can delay (by pulling the clock line low) the first bit of a byte response. - * @field acknowledgeTimeout Maximum time to wait for a slave to respond with an ACK after writing a byte. - * @field startTimeout Maximum time to wait for a slave to respond after a start signal. - * @field riseFallTime Time to wait after any change in output signal. - * @field __reservedA Set to zero. - */ - -struct IOI2CBusTiming -{ - AbsoluteTime bitTimeout; - AbsoluteTime byteTimeout; - AbsoluteTime acknowledgeTimeout; - AbsoluteTime startTimeout; - AbsoluteTime holdTime; - AbsoluteTime riseFallTime; - UInt32 __reservedA[8]; -}; -typedef struct IOI2CBusTiming IOI2CBusTiming; - -#ifndef KERNEL - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -// options for IOFBCopyI2CInterfaceForBus() -enum { - kIOI2CBusNumberMask = 0x000000ff -}; - - -/*! @function IOFBGetI2CInterfaceCount - @abstract Returns a count of I2C interfaces available associated with an IOFramebuffer instance. - @discussion Returns a count of I2C interfaces available associated with an IOFramebuffer instance. - @param framebuffer The io_service_t of an IOFramebuffer instance. CoreGraphics will provide this for a CGDisplay with the CGDisplayIOServicePort() call. - @param count Interface count is returned. - @result An IOReturn code. */ - -IOReturn IOFBGetI2CInterfaceCount( io_service_t framebuffer, IOItemCount * count ); - -/*! @function IOFBCopyI2CInterfaceForBus - @abstract Returns an instance of an I2C bus interface, associated with an IOFramebuffer instance / bus index pair. - @discussion Some graphics devices will allow access to an I2C bus routed through a display connector in order to control external devices on that bus. This function returns an instance of an I2C bus interface, associated with an IOFramebuffer instance / bus index pair. The number of I2C buses is available from the IOFBGetI2CInterfaceCount() call. The interface may be used with the IOI2CInterfaceOpen/Close/SendRequest() calls to carry out I2C transactions on that bus. Not all graphics devices support this functionality. - @param bus The zero based index of the bus on the requested framebuffer. - @param interface The interface instance is returned. The caller should release this instance with IOObjectRelease(). - @result An IOReturn code. */ - -IOReturn IOFBCopyI2CInterfaceForBus( io_service_t framebuffer, IOOptionBits bus, io_service_t * interface ); - -typedef struct IOI2CConnect * IOI2CConnectRef; /* struct IOI2CConnect is opaque */ - -IOReturn IOI2CCopyInterfaceForID( CFTypeRef identifier, io_service_t * interface ); - -/*! @function IOI2CInterfaceOpen - @abstract Opens an instance of an I2C bus interface, allowing I2C requests to be made. - @discussion An instance of an I2C bus interface, obtained by IOFBCopyI2CInterfaceForBus, is opened with this function allowing I2C requests to be made. - @param interface An I2C bus interface (see IOFBCopyI2CInterfaceForBus). The interface may be released after this call is made. - @param options Pass kNilOptions. - @param connect The opaque IOI2CConnectRef is returned, for use with IOI2CSendRequest() and IOI2CInterfaceClose(). - @result An IOReturn code. */ - -IOReturn IOI2CInterfaceOpen( io_service_t interface, IOOptionBits options, - IOI2CConnectRef * connect ); - -/*! @function IOI2CInterfaceClose - @abstract Closes an IOI2CConnectRef. - @discussion Frees the resources associated with an IOI2CConnectRef. - @param connect The opaque IOI2CConnectRef returned by IOI2CInterfaceOpen(). - @param options Pass kNilOptions. - @result An IOReturn code. */ - -IOReturn IOI2CInterfaceClose( IOI2CConnectRef connect, IOOptionBits options ); - -/*! @function IOI2CSendRequest - @abstract Carries out the I2C transaction specified by an IOI2CRequest structure. - @discussion Frees the resources associated with an IOI2CConnectRef. - @param connect The opaque IOI2CConnectRef returned by IOI2CInterfaceOpen(). - @param options Pass kNilOptions. - @param request Pass a pointer to a IOI2CRequest structure describing the request. If an asynchronous request (with a non-NULL completion routine) the request structure must be valid for the life of the request. - @result An IOReturn code reflecting only the result of starting the transaction. If the result of IOI2CSendRequest() is kIOReturnSuccess, the I2C transaction result is returned in the result field of the request structure. */ - -IOReturn IOI2CSendRequest( IOI2CConnectRef connect, IOOptionBits options, - IOI2CRequest * request ); - -#else - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/*! @class IOI2CInterface - @abstract The base class for an I2C bus interface. - @discussion The IOI2CInterface base class defines an I2C bus interface. Not useful for developers. */ - -class IOI2CInterface : public IOService -{ - OSDeclareDefaultStructors(IOI2CInterface) - -protected: - UInt64 fID; - -public: - IOReturn newUserClient( task_t owningTask, - void * security_id, - UInt32 type, - IOUserClient ** handler ); - - bool registerI2C( UInt64 id ); - - virtual IOReturn startIO( IOI2CRequest * request ) = 0; -}; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#endif /* KERNEL */ - -#endif /* ! _IOKIT_IOI2CINTERFACE_H */ - diff --git a/i386/include/IOKit/ndrvsupport/IOMacOSTypes.h b/i386/include/IOKit/ndrvsupport/IOMacOSTypes.h deleted file mode 100644 index 0a2aae7..0000000 --- a/i386/include/IOKit/ndrvsupport/IOMacOSTypes.h +++ /dev/null @@ -1,441 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1997 Apple Computer, Inc. - * - * - * HISTORY - * - * sdouglas 22 Oct 97 - first checked in. - * sdouglas 21 July 98 - start IOKit - */ - -/* - File: Types.h - - Contains: Basic Macintosh data types. - - Version: Technology: PowerSurge 1.0.2. - Package: Universal Interfaces 2.1.2 on ETO #20 - - Copyright: � 1984-1995 by Apple Computer, Inc. - All rights reserved. - - Bugs?: If you find a problem with this file, use the Apple Bug Reporter - stack. Include the file and version information (from above) - in the problem description and send to: - Internet: apple.bugs@applelink.apple.com - AppleLink: APPLE.BUGS - -*/ - -#ifndef _IOKIT_IOMACOSTYPES_H -#define _IOKIT_IOMACOSTYPES_H -#ifndef __MACTYPES__ - -#include <IOKit/IOTypes.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef __LP64__ -#pragma options align=mac68k -#endif - -#ifndef NULL -#if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C)) -#define NULL ((void *) 0) -#else -#define NULL 0 -#endif -#endif - -enum { - noErr = 0 -}; - -typedef uintptr_t KernelProcessID; -typedef uintptr_t AddressSpaceID; - -#if 0 -#ifndef __cplusplus -enum { false, true }; -#endif -#endif - -typedef unsigned char Byte; - -typedef signed char SignedByte; - -typedef UInt16 UniChar; - -typedef char *Ptr; - -typedef Ptr *Handle; - -typedef UInt32 Fixed; - -typedef Fixed *FixedPtr; - -typedef UInt32 Fract; - -typedef Fract *FractPtr; - -struct _extended80 { - short exp; - short man[4]; -}; -struct _extended96 { - short exp[2]; - short man[4]; -}; -typedef struct wide *WidePtr; - -typedef struct UnsignedWide *UnsignedWidePtr; - - -/* -enum { - false, - true -}; -#if !__option(bool) - #ifndef true - #define true 1 - #endif - #ifndef false - #define false 0 - #endif -#endif - -typedef unsigned char Boolean; -*/ - - -typedef short OSErr; - -typedef unsigned int FourCharCode; - -typedef FourCharCode OSType; - -typedef FourCharCode ResType; - -typedef OSType *OSTypePtr; - -typedef ResType *ResTypePtr; - -struct Rect { - short top; - short left; - short bottom; - short right; -}; -typedef struct Rect Rect; - -typedef Rect *RectPtr; - -// Quickdraw.i - -/* - kVariableLengthArray is used in array bounds to specify a variable length array. - It is ususally used in variable length structs when the last field is an array - of any size. Before ANSI C, we used zero as the bounds of variable length - array, but that is illegal in ANSI C. Example: - - struct FooList - { - short listLength; - Foo elements[kVariableLengthArray]; - }; -*/ - -enum { - kVariableLengthArray = 1 -}; - -/* Numeric version part of 'vers' resource */ -struct NumVersion { - UInt8 majorRev; /*1st part of version number in BCD*/ - UInt8 minorAndBugRev; /*2nd & 3rd part of version number share a byte*/ - UInt8 stage; /*stage code: dev, alpha, beta, final*/ - UInt8 nonRelRev; /*revision level of non-released version*/ -}; -typedef struct NumVersion NumVersion; - -typedef struct OpaqueRef *KernelID; - -typedef UInt8 *BytePtr; - -typedef IOByteCount ByteCount; - -typedef IOItemCount ItemCount; - -typedef void *LogicalAddress; - -#if !defined(__LP64__) -typedef void *PhysicalAddress; -#endif - -typedef UInt32 PBVersion; - -typedef SInt32 Duration; - -#define kInvalidID 0 - -enum { - kNilOptions = 0 -}; - - -typedef unsigned char Str31[32]; - - -/* -From: - File: DriverFamilyMatching.i <18> - Copyright: � 1995-1996 by Apple Computer, Inc., all rights reserved. -*/ - -//############################################## -// Well known properties in the Name Registry -//############################################## - -#define kPropertyName "name" -#define kPropertyCompatible "compatible" -#define kPropertyDriverPtr "driver-ptr" -#define kPropertyDriverDesc "driver-description" -#define kPropertyReg "reg" -#define kPropertyAAPLAddress "AAPL,address" -#define kPropertyMatching "matching" - - -//######################################################### -// Descriptor for Drivers and NDRVs -//######################################################### -/* Driver Typing Information Used to Match Drivers With Devices */ -struct DriverType { - Str31 nameInfoStr; /* Driver Name/Info String*/ - NumVersion version; /* Driver Version Number*/ -}; -typedef struct DriverType DriverType; -typedef DriverType * DriverTypePtr; - -/* OS Runtime Information Used to Setup and Maintain a Driver's Runtime Environment */ -typedef OptionBits RuntimeOptions; - - -enum { - kDriverIsLoadedUponDiscovery = 0x00000001, /* auto-load driver when discovered*/ - kDriverIsOpenedUponLoad = 0x00000002, /* auto-open driver when loaded*/ - kDriverIsUnderExpertControl = 0x00000004, /* I/O expert handles loads/opens*/ - kDriverIsConcurrent = 0x00000008, /* supports concurrent requests*/ - kDriverQueuesIOPB = 0x00000010, /* device manager doesn't queue IOPB*/ - kDriverIsLoadedAtBoot = 0x00000020, /* Driver is loaded at the boot time */ - kDriverIsForVirtualDevice = 0x00000040, /* Driver is for a virtual Device */ - kDriverSupportDMSuspendAndResume = 0x00000080 /* Driver supports Device Manager Suspend and Resume command */ -}; - -struct DriverOSRuntime { - RuntimeOptions driverRuntime; /* Options for OS Runtime*/ - Str31 driverName; /* Driver's name to the OS*/ - UInt32 driverDescReserved[8]; /* Reserved area*/ -}; -typedef struct DriverOSRuntime DriverOSRuntime; -typedef DriverOSRuntime * DriverOSRuntimePtr; - -/* OS Service Information Used To Declare What APIs a Driver Supports */ -typedef UInt32 ServiceCount; - -struct DriverServiceInfo { - OSType serviceCategory; /* Service Category Name*/ - OSType serviceType; /* Type within Category*/ - NumVersion serviceVersion; /* Version of service*/ -}; -typedef struct DriverServiceInfo DriverServiceInfo; -typedef DriverServiceInfo * DriverServiceInfoPtr; - -struct DriverOSService { - ServiceCount nServices; /* Number of Services Supported*/ - DriverServiceInfo service[1]; /* The List of Services (at least one)*/ -}; -typedef struct DriverOSService DriverOSService; -typedef DriverOSService * DriverOSServicePtr; - -/* Categories */ - -enum { - kServiceCategoryDisplay = 'disp', /* Display Manager*/ - kServiceCategoryOpenTransport = 'otan', /* Open Transport*/ - kServiceCategoryBlockStorage = 'blok', /* Block Storage*/ - kServiceCategoryNdrvDriver = 'ndrv', /* Generic Native Driver*/ - kServiceCategoryScsiSIM = 'scsi', /* SCSI */ - kServiceCategoryFileManager = 'file', /* File Manager */ - kServiceCategoryIDE = 'ide-', /* ide */ - kServiceCategoryADB = 'adb-', /* adb */ - kServiceCategoryPCI = 'pci-', /* pci bus */ - /* Nu Bus */ - kServiceCategoryDFM = 'dfm-', /* DFM */ - kServiceCategoryMotherBoard = 'mrbd', /* mother Board */ - kServiceCategoryKeyboard = 'kybd', /* Keyboard */ - kServiceCategoryPointing = 'poit', /* Pointing */ - kServiceCategoryRTC = 'rtc-', /* RTC */ - kServiceCategoryNVRAM = 'nram', /* NVRAM */ - kServiceCategorySound = 'sond', /* Sound (1/3/96 MCS) */ - kServiceCategoryPowerMgt = 'pgmt', /* Power Management */ - kServiceCategoryGeneric = 'genr' /* Generic Service Category to receive general Events */ -}; - -/* Ndrv ServiceCategory Types */ -enum { - kNdrvTypeIsGeneric = 'genr', /* generic*/ - kNdrvTypeIsVideo = 'vido', /* video*/ - kNdrvTypeIsBlockStorage = 'blok', /* block storage*/ - kNdrvTypeIsNetworking = 'netw', /* networking*/ - kNdrvTypeIsSerial = 'serl', /* serial*/ - kNdrvTypeIsParallel = 'parl', /* parallel */ - kNdrvTypeIsSound = 'sond', /* sound*/ - kNdrvTypeIsBusBridge = 'brdg' -}; - -typedef UInt32 DriverDescVersion; - -/* The Driver Description */ -enum { - kInitialDriverDescriptor = 0, - kVersionOneDriverDescriptor = 1 -}; - -enum { - kTheDescriptionSignature = 'mtej', - kDriverDescriptionSignature = 'pdes' -}; - - -struct DriverDescription { - OSType driverDescSignature; /* Signature field of this structure*/ - DriverDescVersion driverDescVersion; /* Version of this data structure*/ - DriverType driverType; /* Type of Driver*/ - DriverOSRuntime driverOSRuntimeInfo; /* OS Runtime Requirements of Driver*/ - DriverOSService driverServices; /* Apple Service API Membership*/ -}; -typedef struct DriverDescription DriverDescription; -typedef DriverDescription * DriverDescriptionPtr; - - -#ifndef __LP64__ -#pragma options align=reset -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __MACTYPES__ */ - -#ifndef __QUICKDRAW__ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef __LP64__ -#pragma options align=mac68k -#endif - -struct RGBColor { - unsigned short red; /*magnitude of red component*/ - unsigned short green; /*magnitude of green component*/ - unsigned short blue; /*magnitude of blue component*/ -}; -typedef struct RGBColor RGBColor; -typedef RGBColor *RGBColorPtr; -typedef RGBColorPtr *RGBColorHdl; - -struct ColorSpec { - short value; /*index or other value*/ - RGBColor rgb; /*true color*/ -}; - -typedef struct ColorSpec ColorSpec; -typedef ColorSpec *ColorSpecPtr; - -struct GammaTbl { - short gVersion; /*gamma version number*/ - short gType; /*gamma data type*/ - short gFormulaSize; /*Formula data size*/ - short gChanCnt; /*number of channels of data*/ - short gDataCnt; /*number of values/channel*/ - short gDataWidth; /*bits/corrected value (data packed to next larger byte size)*/ - short gFormulaData[1]; /*data for formulas followed by gamma values*/ -}; -typedef struct GammaTbl GammaTbl; -typedef GammaTbl *GammaTblPtr; - -struct RegEntryID -{ - void * opaque[4]; -}; -typedef struct RegEntryID RegEntryID; -typedef RegEntryID * RegEntryIDPtr; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -struct IONDRVControlParameters { - UInt8 __reservedA[0x1a]; - UInt16 code; - void * params; - UInt8 __reservedB[0x12]; -}; - -enum { - kIONDRVOpenCommand = 128 + 0, - kIONDRVCloseCommand = 128 + 1, - kIONDRVReadCommand = 128 + 2, - kIONDRVWriteCommand = 128 + 3, - kIONDRVControlCommand = 128 + 4, - kIONDRVStatusCommand = 128 + 5, - kIONDRVKillIOCommand = 128 + 6, - kIONDRVInitializeCommand = 128 + 7, /* init driver and device*/ - kIONDRVFinalizeCommand = 128 + 8, /* shutdown driver and device*/ - kIONDRVReplaceCommand = 128 + 9, /* replace an old driver*/ - kIONDRVSupersededCommand = 128 + 10 /* prepare to be replaced by a new driver*/ -}; -enum { - kIONDRVSynchronousIOCommandKind = 0x00000001, - kIONDRVAsynchronousIOCommandKind = 0x00000002, - kIONDRVImmediateIOCommandKind = 0x00000004 -}; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#ifndef __LP64__ -#pragma options align=reset -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __QUICKDRAW__ */ - -#endif /* _IOKIT_IOMACOSTYPES_H */ diff --git a/i386/include/IOKit/ndrvsupport/IOMacOSVideo.h b/i386/include/IOKit/ndrvsupport/IOMacOSVideo.h deleted file mode 100644 index 795072b..0000000 --- a/i386/include/IOKit/ndrvsupport/IOMacOSVideo.h +++ /dev/null @@ -1,1391 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - File: Video.h - - Contains: Video Driver Interfaces. - - Copyright: (c) 1986-2000 by Apple Computer, Inc., all rights reserved - - Bugs?: For bug reports, consult the following page on - the World Wide Web: - - http://developer.apple.com/bugreporter/ - -*/ -#ifndef __IOMACOSVIDEO__ -#define __IOMACOSVIDEO__ - -#define PRAGMA_STRUCT_ALIGN 1 -#define FOUR_CHAR_CODE(x) (x) -#include <IOKit/ndrvsupport/IOMacOSTypes.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef __LP64__ -#pragma options align=mac68k -#endif - -enum { - mBaseOffset = 1, /*Id of mBaseOffset.*/ - mRowBytes = 2, /*Video sResource parameter Id's */ - mBounds = 3, /*Video sResource parameter Id's */ - mVersion = 4, /*Video sResource parameter Id's */ - mHRes = 5, /*Video sResource parameter Id's */ - mVRes = 6, /*Video sResource parameter Id's */ - mPixelType = 7, /*Video sResource parameter Id's */ - mPixelSize = 8, /*Video sResource parameter Id's */ - mCmpCount = 9, /*Video sResource parameter Id's */ - mCmpSize = 10, /*Video sResource parameter Id's */ - mPlaneBytes = 11, /*Video sResource parameter Id's */ - mVertRefRate = 14, /*Video sResource parameter Id's */ - mVidParams = 1, /*Video parameter block id.*/ - mTable = 2, /*Offset to the table.*/ - mPageCnt = 3, /*Number of pages*/ - mDevType = 4, /*Device Type*/ - oneBitMode = 128, /*Id of OneBitMode Parameter list.*/ - twoBitMode = 129, /*Id of TwoBitMode Parameter list.*/ - fourBitMode = 130, /*Id of FourBitMode Parameter list.*/ - eightBitMode = 131 /*Id of EightBitMode Parameter list.*/ -}; - -enum { - sixteenBitMode = 132, /*Id of SixteenBitMode Parameter list.*/ - thirtyTwoBitMode = 133, /*Id of ThirtyTwoBitMode Parameter list.*/ - firstVidMode = 128, /*The new, better way to do the above. */ - secondVidMode = 129, /* QuickDraw only supports six video */ - thirdVidMode = 130, /* at this time. */ - fourthVidMode = 131, - fifthVidMode = 132, - sixthVidMode = 133, - spGammaDir = 64, - spVidNamesDir = 65 -}; - -typedef UInt32 AVIDType; -typedef AVIDType DisplayIDType; -typedef IODisplayModeID DisplayModeID; -typedef UInt16 DepthMode; -typedef UInt32 VideoDeviceType; -typedef UInt32 GammaTableID; - -/* csTimingFormat values in VDTimingInfo */ -/* look in the declaration rom for timing info */ -enum { - kDeclROMtables = FOUR_CHAR_CODE('decl'), - kDetailedTimingFormat = FOUR_CHAR_CODE('arba') /* Timing is a detailed timing*/ -}; - -/* Size of a block of EDID (Extended Display Identification Data) */ -enum { - kDDCBlockSize = 128 -}; - -/* ddcBlockType constants*/ -enum { - kDDCBlockTypeEDID = 0 /* EDID block type. */ -}; - -/* ddcFlags constants*/ -enum { - kDDCForceReadBit = 0, /* Force a new read of the EDID. */ - kDDCForceReadMask = (1 << kDDCForceReadBit) /* Mask for kddcForceReadBit. */ -}; - - -/* Timing mode constants for Display Manager MultiMode support - Corresponding .h equates are in Video.h - .a equates are in Video.a - .r equates are in DepVideoEqu.r - - The second enum is the old names (for compatibility). - The first enum is the new names. -*/ -enum { - timingInvalid = 0, /* Unknown timing... force user to confirm. */ - timingInvalid_SM_T24 = 8, /* Work around bug in SM Thunder24 card.*/ - timingApple_FixedRateLCD = 42, /* Lump all fixed-rate LCDs into one category.*/ - timingApple_512x384_60hz = 130, /* 512x384 (60 Hz) Rubik timing. */ - timingApple_560x384_60hz = 135, /* 560x384 (60 Hz) Rubik-560 timing. */ - timingApple_640x480_67hz = 140, /* 640x480 (67 Hz) HR timing. */ - timingApple_640x400_67hz = 145, /* 640x400 (67 Hz) HR-400 timing. */ - timingVESA_640x480_60hz = 150, /* 640x480 (60 Hz) VGA timing. */ - timingVESA_640x480_72hz = 152, /* 640x480 (72 Hz) VGA timing. */ - timingVESA_640x480_75hz = 154, /* 640x480 (75 Hz) VGA timing. */ - timingVESA_640x480_85hz = 158, /* 640x480 (85 Hz) VGA timing. */ - timingGTF_640x480_120hz = 159, /* 640x480 (120 Hz) VESA Generalized Timing Formula */ - timingApple_640x870_75hz = 160, /* 640x870 (75 Hz) FPD timing.*/ - timingApple_640x818_75hz = 165, /* 640x818 (75 Hz) FPD-818 timing.*/ - timingApple_832x624_75hz = 170, /* 832x624 (75 Hz) GoldFish timing.*/ - timingVESA_800x600_56hz = 180, /* 800x600 (56 Hz) SVGA timing. */ - timingVESA_800x600_60hz = 182, /* 800x600 (60 Hz) SVGA timing. */ - timingVESA_800x600_72hz = 184, /* 800x600 (72 Hz) SVGA timing. */ - timingVESA_800x600_75hz = 186, /* 800x600 (75 Hz) SVGA timing. */ - timingVESA_800x600_85hz = 188, /* 800x600 (85 Hz) SVGA timing. */ - timingVESA_1024x768_60hz = 190, /* 1024x768 (60 Hz) VESA 1K-60Hz timing. */ - timingVESA_1024x768_70hz = 200, /* 1024x768 (70 Hz) VESA 1K-70Hz timing. */ - timingVESA_1024x768_75hz = 204, /* 1024x768 (75 Hz) VESA 1K-75Hz timing (very similar to timingApple_1024x768_75hz). */ - timingVESA_1024x768_85hz = 208, /* 1024x768 (85 Hz) VESA timing. */ - timingApple_1024x768_75hz = 210, /* 1024x768 (75 Hz) Apple 19" RGB. */ - timingApple_1152x870_75hz = 220, /* 1152x870 (75 Hz) Apple 21" RGB. */ - timingAppleNTSC_ST = 230, /* 512x384 (60 Hz, interlaced, non-convolved). */ - timingAppleNTSC_FF = 232, /* 640x480 (60 Hz, interlaced, non-convolved). */ - timingAppleNTSC_STconv = 234, /* 512x384 (60 Hz, interlaced, convolved). */ - timingAppleNTSC_FFconv = 236, /* 640x480 (60 Hz, interlaced, convolved). */ - timingApplePAL_ST = 238, /* 640x480 (50 Hz, interlaced, non-convolved). */ - timingApplePAL_FF = 240, /* 768x576 (50 Hz, interlaced, non-convolved). */ - timingApplePAL_STconv = 242, /* 640x480 (50 Hz, interlaced, convolved). */ - timingApplePAL_FFconv = 244, /* 768x576 (50 Hz, interlaced, convolved). */ - timingVESA_1280x960_75hz = 250, /* 1280x960 (75 Hz) */ - timingVESA_1280x960_60hz = 252, /* 1280x960 (60 Hz) */ - timingVESA_1280x960_85hz = 254, /* 1280x960 (85 Hz) */ - timingVESA_1280x1024_60hz = 260, /* 1280x1024 (60 Hz) */ - timingVESA_1280x1024_75hz = 262, /* 1280x1024 (75 Hz) */ - timingVESA_1280x1024_85hz = 268, /* 1280x1024 (85 Hz) */ - timingVESA_1600x1200_60hz = 280, /* 1600x1200 (60 Hz) VESA timing. */ - timingVESA_1600x1200_65hz = 282, /* 1600x1200 (65 Hz) VESA timing. */ - timingVESA_1600x1200_70hz = 284, /* 1600x1200 (70 Hz) VESA timing. */ - timingVESA_1600x1200_75hz = 286, /* 1600x1200 (75 Hz) VESA timing (pixel clock is 189.2 Mhz dot clock). */ - timingVESA_1600x1200_80hz = 288, /* 1600x1200 (80 Hz) VESA timing (pixel clock is 216>? Mhz dot clock) - proposed only. */ - timingVESA_1600x1200_85hz = 289, /* 1600x1200 (85 Hz) VESA timing (pixel clock is 229.5 Mhz dot clock). */ - timingVESA_1792x1344_60hz = 296, /* 1792x1344 (60 Hz) VESA timing (204.75 Mhz dot clock). */ - timingVESA_1792x1344_75hz = 298, /* 1792x1344 (75 Hz) VESA timing (261.75 Mhz dot clock). */ - timingVESA_1856x1392_60hz = 300, /* 1856x1392 (60 Hz) VESA timing (218.25 Mhz dot clock). */ - timingVESA_1856x1392_75hz = 302, /* 1856x1392 (75 Hz) VESA timing (288 Mhz dot clock). */ - timingVESA_1920x1440_60hz = 304, /* 1920x1440 (60 Hz) VESA timing (234 Mhz dot clock). */ - timingVESA_1920x1440_75hz = 306, /* 1920x1440 (75 Hz) VESA timing (297 Mhz dot clock). */ - timingSMPTE240M_60hz = 400, /* 60Hz V, 33.75KHz H, interlaced timing, 16:9 aspect, typical resolution of 1920x1035. */ - timingFilmRate_48hz = 410, /* 48Hz V, 25.20KHz H, non-interlaced timing, typical resolution of 640x480. */ - timingSony_1600x1024_76hz = 500, /* 1600x1024 (76 Hz) Sony timing (pixel clock is 170.447 Mhz dot clock). */ - timingSony_1920x1080_60hz = 510, /* 1920x1080 (60 Hz) Sony timing (pixel clock is 159.84 Mhz dot clock). */ - timingSony_1920x1080_72hz = 520, /* 1920x1080 (72 Hz) Sony timing (pixel clock is 216.023 Mhz dot clock). */ - timingSony_1920x1200_76hz = 540, /* 1900x1200 (76 Hz) Sony timing (pixel clock is 243.20 Mhz dot clock). */ - timingApple_0x0_0hz_Offline = 550 /* Indicates that this timing will take the display off-line and remove it from the system. */ -}; - - -/* Deprecated timing names.*/ -enum { - timingApple12 = timingApple_512x384_60hz, - timingApple12x = timingApple_560x384_60hz, - timingApple13 = timingApple_640x480_67hz, - timingApple13x = timingApple_640x400_67hz, - timingAppleVGA = timingVESA_640x480_60hz, - timingApple15 = timingApple_640x870_75hz, - timingApple15x = timingApple_640x818_75hz, - timingApple16 = timingApple_832x624_75hz, - timingAppleSVGA = timingVESA_800x600_56hz, - timingApple1Ka = timingVESA_1024x768_60hz, - timingApple1Kb = timingVESA_1024x768_70hz, - timingApple19 = timingApple_1024x768_75hz, - timingApple21 = timingApple_1152x870_75hz, - timingSony_1900x1200_74hz = 530, /* 1900x1200 (74 Hz) Sony timing (pixel clock is 236.25 Mhz dot clock). */ - timingSony_1900x1200_76hz = timingSony_1920x1200_76hz /* 1900x1200 (76 Hz) Sony timing (pixel clock is 245.48 Mhz dot clock). */ -}; - -/* csConnectFlags values in VDDisplayConnectInfo */ -enum { - kAllModesValid = 0, /* All modes not trimmed by primary init are good close enough to try */ - kAllModesSafe = 1, /* All modes not trimmed by primary init are know to be safe */ - kReportsTagging = 2, /* Can detect tagged displays (to identify smart monitors) */ - kHasDirectConnection = 3, /* True implies that driver can talk directly to device (e.g. serial data link via sense lines) */ - kIsMonoDev = 4, /* Says whether there's an RGB (0) or Monochrome (1) connection. */ - kUncertainConnection = 5, /* There may not be a display (no sense lines?). */ - kTaggingInfoNonStandard = 6, /* Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes). */ - kReportsDDCConnection = 7, /* Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display). */ - kHasDDCConnection = 8, /* Card has ddc connect now. */ - kConnectionInactive = 9, /* Set when the connection is NOT currently active (generally used in a multiconnection environment). */ - kDependentConnection = 10, /* Set when some ascpect of THIS connection depends on another (will generally be set in a kModeSimulscan environment). */ - kBuiltInConnection = 11, /* Set when connection is KNOWN to be built-in (this is not the same as kHasDirectConnection). */ - kOverrideConnection = 12, /* Set when the reported connection is not the true one, but is one that has been forced through a SetConnection call */ - kFastCheckForDDC = 13, /* Set when all 3 are true: 1) sense codes indicate DDC display could be attached 2) attempted fast check 3) DDC failed */ - kReportsHotPlugging = 14, /* Detects and reports hot pluggging on connector (via VSL also implies DDC will be up to date w/o force read) */ - kStereoSyncConnection = 15 /* Connection supports stereo sync signalling */ -}; - - -/* csDisplayType values in VDDisplayConnectInfo */ -enum { - kUnknownConnect = 1, /* Not sure how we'll use this, but seems like a good idea. */ - kPanelConnect = 2, /* For use with fixed-in-place LCD panels. */ - kPanelTFTConnect = 2, /* Alias for kPanelConnect */ - kFixedModeCRTConnect = 3, /* For use with fixed-mode (i.e., very limited range) displays. */ - kMultiModeCRT1Connect = 4, /* 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe */ - kMultiModeCRT2Connect = 5, /* 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe */ - kMultiModeCRT3Connect = 6, /* 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain */ - kMultiModeCRT4Connect = 7, /* Expansion to large multi mode (not yet used) */ - kModelessConnect = 8, /* Expansion to modeless model (not yet used) */ - kFullPageConnect = 9, /* 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) */ - kVGAConnect = 10, /* 640x480 VGA default -- question everything else */ - kNTSCConnect = 11, /* NTSC ST (default), FF, STconv, FFconv */ - kPALConnect = 12, /* PAL ST (default), FF, STconv, FFconv */ - kHRConnect = 13, /* Straight-6 connect -- 640x480 and 640x400 (to get 8bpp in 256K case) (these two only) */ - kPanelFSTNConnect = 14, /* For use with fixed-in-place LCD FSTN (aka "Supertwist") panels */ - kMonoTwoPageConnect = 15, /* 1152x870 Apple color two-page display */ - kColorTwoPageConnect = 16, /* 1152x870 Apple B&W two-page display */ - kColor16Connect = 17, /* 832x624 Apple B&W two-page display */ - kColor19Connect = 18, /* 1024x768 Apple B&W two-page display */ - kGenericCRT = 19, /* Indicates nothing except that connection is CRT in nature. */ - kGenericLCD = 20, /* Indicates nothing except that connection is LCD in nature. */ - kDDCConnect = 21, /* DDC connection, always set kHasDDCConnection */ - kNoConnect = 22 /* No display is connected - load sensing or similar level of hardware detection is assumed (used by resident drivers that support hot plugging when nothing is currently connected) */ -}; - -/* csTimingFlags values in VDTimingInfoRec */ -enum { - kModeValid = 0, /* Says that this mode should NOT be trimmed. */ - kModeSafe = 1, /* This mode does not need confirmation */ - kModeDefault = 2, /* This is the default mode for this type of connection */ - kModeShowNow = 3, /* This mode should always be shown (even though it may require a confirm) */ - kModeNotResize = 4, /* This mode should not be used to resize the display (eg. mode selects a different connector on card) */ - kModeRequiresPan = 5, /* This mode has more pixels than are actually displayed */ - kModeInterlaced = 6, /* This mode is interlaced (single pixel lines look bad). */ - kModeShowNever = 7, /* This mode should not be shown in the user interface. */ - kModeSimulscan = 8, /* Indicates that more than one display connection can be driven from a single framebuffer controller. */ - kModeNotPreset = 9, /* Indicates that the timing is not a factory preset for the current display (geometry may need correction) */ - kModeBuiltIn = 10, /* Indicates that the display mode is for the built-in connect only (on multiconnect devices like the PB 3400) Only the driver is quieried */ - kModeStretched = 11, /* Indicates that the display mode will be stretched/distorted to match the display aspect ratio */ - kModeNotGraphicsQuality = 12, /* Indicates that the display mode is not the highest quality (eg. stretching artifacts). Intended as a hint */ - kModeValidateAgainstDisplay = 13 /* Indicates that this mode should be validated against the display EDID */ -}; - -/* csDepthFlags in VDVideoParametersInfoRec */ -enum { - kDepthDependent = 0, /* Says that this depth mode may cause dependent changes in other framebuffers (and . */ - kDepthDependentMask = (1 << kDepthDependent) /* mask for kDepthDependent */ -}; - -/* csResolutionFlags bit flags for VDResolutionInfoRec */ -enum { - kResolutionHasMultipleDepthSizes = 0 /* Says that this mode has different csHorizontalPixels, csVerticalLines at different depths (usually slightly larger at lower depths) */ -}; - - -enum { - /* Power Mode constants for VDPowerStateRec.powerState. Note the numeric order does not match the power state order */ - kAVPowerOff = 0, /* Power fully off*/ - kAVPowerStandby = 1, - kAVPowerSuspend = 2, - kAVPowerOn = 3, - kHardwareSleep = 128, - kHardwareWake = 129, - kHardwareWakeFromSuspend = 130, - kHardwareWakeToDoze = 131, - kHardwareWakeToDozeFromSuspend = 132, - kHardwarePark = 133, - kHardwareDrive = 134 -}; - -/* Reduced perf level, for GetPowerState, SetPowerState*/ -enum { - kPowerStateReducedPowerMask = 0x00000300, - kPowerStateFullPower = 0x00000000, - kPowerStateReducedPower1 = 0x00000100, - kPowerStateReducedPower2 = 0x00000200, - kPowerStateReducedPower3 = 0x00000300 -}; - -enum { - /* Power Mode masks and bits for VDPowerStateRec.powerFlags. */ - kPowerStateNeedsRefresh = 0, /* When leaving this power mode, a display will need refreshing */ - kPowerStateSleepAwareBit = 1, /* if gestaltPCCardDockingSelectorFix, Docking mgr checks this bit before checking kPowerStateSleepAllowedBit */ - kPowerStateSleepForbiddenBit = 2, /* if kPowerStateSleepAwareBit, Docking mgr checks this bit before sleeping */ - kPowerStateSleepCanPowerOffBit = 3, /* supports power down sleep (ie PCI power off)*/ - kPowerStateSleepNoDPMSBit = 4, /* Bug #2425210. Do not use DPMS with this display.*/ - kPowerStateSleepWaketoDozeBit = 5, /* Supports Wake to Doze */ - kPowerStateSleepWakeNeedsProbeBit = 6, /* Does not sense connection changes on wake */ - - kPowerStateNeedsRefreshMask = (1 << kPowerStateNeedsRefresh), - kPowerStateSleepAwareMask = (1 << kPowerStateSleepAwareBit), - kPowerStateSleepForbiddenMask = (1 << kPowerStateSleepForbiddenBit), - kPowerStateSleepCanPowerOffMask = (1 << kPowerStateSleepCanPowerOffBit), - kPowerStateSleepNoDPMSMask = (1 << kPowerStateSleepNoDPMSBit), - kPowerStateSleepWaketoDozeMask = (1 << kPowerStateSleepWaketoDozeBit), - kPowerStateSleepWakeNeedsProbeMask = (1 << kPowerStateSleepWakeNeedsProbeBit), - - kPowerStateSupportsReducedPower1Bit = 10, - kPowerStateSupportsReducedPower2Bit = 11, - kPowerStateSupportsReducedPower3Bit = 12, - kPowerStateSupportsReducedPower1BitMask = (1 << 10), - kPowerStateSupportsReducedPower2BitMask = (1 << 11), - kPowerStateSupportsReducedPower3BitMask = (1 << 12) -}; - - -enum { - /* Control Codes */ - cscReset = 0, - cscKillIO = 1, - cscSetMode = 2, - cscSetEntries = 3, - cscSetGamma = 4, - cscGrayPage = 5, - cscGrayScreen = 5, - cscSetGray = 6, - cscSetInterrupt = 7, - cscDirectSetEntries = 8, - cscSetDefaultMode = 9, - cscSwitchMode = 10, /* Takes a VDSwitchInfoPtr */ - cscSetSync = 11, /* Takes a VDSyncInfoPtr */ - cscSavePreferredConfiguration = 16, /* Takes a VDSwitchInfoPtr */ - cscSetHardwareCursor = 22, /* Takes a VDSetHardwareCursorPtr */ - cscDrawHardwareCursor = 23, /* Takes a VDDrawHardwareCursorPtr */ - cscSetConvolution = 24, /* Takes a VDConvolutionInfoPtr */ - cscSetPowerState = 25, /* Takes a VDPowerStatePtr */ - cscPrivateControlCall = 26, /* Takes a VDPrivateSelectorDataRec*/ - cscSetMultiConnect = 28, /* From a GDI point of view, this call should be implemented completely in the HAL and not at all in the core.*/ - cscSetClutBehavior = 29, /* Takes a VDClutBehavior */ - cscSetDetailedTiming = 31, /* Takes a VDDetailedTimingPtr */ - cscDoCommunication = 33, /* Takes a VDCommunicationPtr */ - cscProbeConnection = 34, /* Takes nil pointer */ - /* (may generate a kFBConnectInterruptServiceType service interrupt) */ - cscSetScaler = 36, /* Takes a VDScalerPtr */ - cscSetMirror = 37, /* Takes a VDMirrorPtr*/ - cscSetFeatureConfiguration = 38, /* Takes a VDConfigurationPtr*/ - cscUnusedCall = 127 /* This call used to expand the scrn resource. Its imbedded data contains more control info */ -}; - -enum { - /* Status Codes */ - cscGetMode = 2, - cscGetEntries = 3, - cscGetPageCnt = 4, - cscGetPages = 4, /* This is what C&D 2 calls it. */ - cscGetPageBase = 5, - cscGetBaseAddr = 5, /* This is what C&D 2 calls it. */ - cscGetGray = 6, - cscGetInterrupt = 7, - cscGetGamma = 8, - cscGetDefaultMode = 9, - cscGetCurMode = 10, /* Takes a VDSwitchInfoPtr */ - cscGetSync = 11, /* Takes a VDSyncInfoPtr */ - cscGetConnection = 12, /* Return information about the connection to the display */ - cscGetModeTiming = 13, /* Return timing info for a mode */ - cscGetModeBaseAddress = 14, /* Return base address information about a particular mode */ - cscGetScanProc = 15, /* QuickTime scan chasing routine */ - cscGetPreferredConfiguration = 16, /* Takes a VDSwitchInfoPtr */ - cscGetNextResolution = 17, /* Takes a VDResolutionInfoPtr */ - cscGetVideoParameters = 18, /* Takes a VDVideoParametersInfoPtr */ - cscGetGammaInfoList = 20, /* Takes a VDGetGammaListPtr */ - cscRetrieveGammaTable = 21, /* Takes a VDRetrieveGammaPtr */ - cscSupportsHardwareCursor = 22, /* Takes a VDSupportsHardwareCursorPtr */ - cscGetHardwareCursorDrawState = 23, /* Takes a VDHardwareCursorDrawStatePtr */ - cscGetConvolution = 24, /* Takes a VDConvolutionInfoPtr */ - cscGetPowerState = 25, /* Takes a VDPowerStatePtr */ - cscPrivateStatusCall = 26, /* Takes a VDPrivateSelectorDataRec*/ - cscGetDDCBlock = 27, /* Takes a VDDDCBlockRec */ - cscGetMultiConnect = 28, /* From a GDI point of view, this call should be implemented completely in the HAL and not at all in the core.*/ - cscGetClutBehavior = 29, /* Takes a VDClutBehavior */ - cscGetTimingRanges = 30, /* Takes a VDDisplayTimingRangePtr */ - cscGetDetailedTiming = 31, /* Takes a VDDetailedTimingPtr */ - cscGetCommunicationInfo = 32, /* Takes a VDCommunicationInfoPtr */ - cscGetScalerInfo = 35, /* Takes a VDScalerInfoPtr */ - cscGetScaler = 36, /* Takes a VDScalerPtr */ - cscGetMirror = 37, /* Takes a VDMirrorPtr*/ - cscGetFeatureConfiguration = 38, /* Takes a VDConfigurationPtr*/ - cscGetFeatureList = 39 -}; - -/* Bit definitions for the Get/Set Sync call*/ -enum { - kDisableHorizontalSyncBit = 0, - kDisableVerticalSyncBit = 1, - kDisableCompositeSyncBit = 2, - kEnableSyncOnBlue = 3, - kEnableSyncOnGreen = 4, - kEnableSyncOnRed = 5, - kNoSeparateSyncControlBit = 6, - kTriStateSyncBit = 7, - kHorizontalSyncMask = 0x01, - kVerticalSyncMask = 0x02, - kCompositeSyncMask = 0x04, - kDPMSSyncMask = 0x07, - kTriStateSyncMask = 0x80, - kSyncOnBlueMask = 0x08, - kSyncOnGreenMask = 0x10, - kSyncOnRedMask = 0x20, - kSyncOnMask = 0x38 -}; - -enum { - /* Power Mode constants for translating DPMS modes to Get/SetSync calls. */ - kDPMSSyncOn = 0, - kDPMSSyncStandby = 1, - kDPMSSyncSuspend = 2, - kDPMSSyncOff = 7 -}; - -/* Bit definitions for the Get/Set Convolution call*/ -enum { - kConvolved = 0, - kLiveVideoPassThru = 1, - kConvolvedMask = 0x01, - kLiveVideoPassThruMask = 0x02 -}; - - - -struct VPBlock { - UInt32 vpBaseOffset; /*Offset to page zero of video RAM (From minorBaseOS).*/ -#if __LP64__ - UInt32 vpRowBytes; /*Width of each row of video memory.*/ -#else - SInt16 vpRowBytes; /*Width of each row of video memory.*/ -#endif - Rect vpBounds; /*BoundsRect for the video display (gives dimensions).*/ - SInt16 vpVersion; /*PixelMap version number.*/ - SInt16 vpPackType; - UInt32 vpPackSize; - UInt32 vpHRes; /*Horizontal resolution of the device (pixels per inch).*/ - UInt32 vpVRes; /*Vertical resolution of the device (pixels per inch).*/ - SInt16 vpPixelType; /*Defines the pixel type.*/ - SInt16 vpPixelSize; /*Number of bits in pixel.*/ - SInt16 vpCmpCount; /*Number of components in pixel.*/ - SInt16 vpCmpSize; /*Number of bits per component*/ - UInt32 vpPlaneBytes; /*Offset from one plane to the next.*/ -}; -typedef struct VPBlock VPBlock; -typedef VPBlock * VPBlockPtr; - -struct VDEntryRecord { - Ptr csTable; /* pointer to color table entry=value, r,g,b:INTEGER*/ -}; -typedef struct VDEntryRecord VDEntryRecord; - -typedef VDEntryRecord * VDEntRecPtr; -/* Parm block for SetGray control call */ - -struct VDGrayRecord { - Boolean csMode; /*Same as GDDevType value (0=color, 1=mono)*/ - SInt8 filler; -}; -typedef struct VDGrayRecord VDGrayRecord; - -typedef VDGrayRecord * VDGrayPtr; -/* Parm block for SetInterrupt call */ - -struct VDFlagRecord { - SInt8 csMode; - SInt8 filler; -}; -typedef struct VDFlagRecord VDFlagRecord; - -typedef VDFlagRecord * VDFlagRecPtr; -/* Parm block for SetEntries control call */ - -struct VDSetEntryRecord { - ColorSpec * csTable; /*Pointer to an array of color specs*/ - SInt16 csStart; /*Which spec in array to start with, or -1*/ - SInt16 csCount; /*Number of color spec entries to set*/ -}; -typedef struct VDSetEntryRecord VDSetEntryRecord; - -typedef VDSetEntryRecord * VDSetEntryPtr; -/* Parm block for SetGamma control call */ - -struct VDGammaRecord { - Ptr csGTable; /*pointer to gamma table*/ -}; -typedef struct VDGammaRecord VDGammaRecord; - -typedef VDGammaRecord * VDGamRecPtr; - -struct VDSwitchInfoRec { - DepthMode csMode; /* mode depth*/ - DisplayModeID csData; /* functional sResource of mode*/ - UInt16 csPage; /* page to switch in*/ - Ptr csBaseAddr; /* base address of page (return value)*/ - uintptr_t csReserved; /* Reserved (set to 0) */ -}; -typedef struct VDSwitchInfoRec VDSwitchInfoRec; - -typedef VDSwitchInfoRec * VDSwitchInfoPtr; - -struct VDTimingInfoRec { - DisplayModeID csTimingMode; /* timing mode (a la InitGDevice) */ - uintptr_t csTimingReserved; /* reserved */ - UInt32 csTimingFormat; /* what format is the timing info */ - UInt32 csTimingData; /* data supplied by driver */ - UInt32 csTimingFlags; /* mode within device */ -}; -typedef struct VDTimingInfoRec VDTimingInfoRec; - -typedef VDTimingInfoRec * VDTimingInfoPtr; - -struct VDDisplayConnectInfoRec { - UInt16 csDisplayType; /* Type of display connected */ - UInt8 csConnectTaggedType; /* type of tagging */ - UInt8 csConnectTaggedData; /* tagging data */ - UInt32 csConnectFlags; /* tell us about the connection */ - uintptr_t csDisplayComponent; /* if the card has a direct connection to the display, it returns the display component here (FUTURE) */ - uintptr_t csConnectReserved; /* reserved */ -}; -typedef struct VDDisplayConnectInfoRec VDDisplayConnectInfoRec; - -typedef VDDisplayConnectInfoRec * VDDisplayConnectInfoPtr; - -struct VDMultiConnectInfoRec { - UInt32 csDisplayCountOrNumber; /* For GetMultiConnect, returns count n of 1..n connections; otherwise, indicates the ith connection.*/ - VDDisplayConnectInfoRec csConnectInfo; /* Standard VDDisplayConnectionInfo for connection i.*/ -}; -typedef struct VDMultiConnectInfoRec VDMultiConnectInfoRec; - -typedef VDMultiConnectInfoRec * VDMultiConnectInfoPtr; -/* RawSenseCode - This abstract data type is not exactly abstract. Rather, it is merely enumerated constants - for the possible raw sense code values when 'standard' sense code hardware is implemented. - - For 'standard' sense code hardware, the raw sense is obtained as follows: - o Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines - o Read the state of the monitor sense lines 2, 1, and 0. (2 is the MSB, 0 the LSB) - - IMPORTANT Note: - When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants - are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo' - -*/ -typedef UInt8 RawSenseCode; -enum { - kRSCZero = 0, - kRSCOne = 1, - kRSCTwo = 2, - kRSCThree = 3, - kRSCFour = 4, - kRSCFive = 5, - kRSCSix = 6, - kRSCSeven = 7 -}; - - -/* ExtendedSenseCode - This abstract data type is not exactly abstract. Rather, it is merely enumerated constants - for the values which are possible when the extended sense algorithm is applied to hardware - which implements 'standard' sense code hardware. - - For 'standard' sense code hardware, the extended sense code algorithm is as follows: - (Note: as described here, sense line 'A' corresponds to '2', 'B' to '1', and 'C' to '0') - o Drive sense line 'A' low and read the values of 'B' and 'C'. - o Drive sense line 'B' low and read the values of 'A' and 'C'. - o Drive sense line 'C' low and read the values of 'A' and 'B'. - - In this way, a six-bit number of the form BC/AC/AB is generated. - - IMPORTANT Note: - When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants - are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo' - -*/ -typedef UInt8 ExtendedSenseCode; -enum { - kESCZero21Inch = 0x00, /* 21" RGB */ - kESCOnePortraitMono = 0x14, /* Portrait Monochrome */ - kESCTwo12Inch = 0x21, /* 12" RGB */ - kESCThree21InchRadius = 0x31, /* 21" RGB (Radius) */ - kESCThree21InchMonoRadius = 0x34, /* 21" Monochrome (Radius) */ - kESCThree21InchMono = 0x35, /* 21" Monochrome */ - kESCFourNTSC = 0x0A, /* NTSC */ - kESCFivePortrait = 0x1E, /* Portrait RGB */ - kESCSixMSB1 = 0x03, /* MultiScan Band-1 (12" thru 1Six") */ - kESCSixMSB2 = 0x0B, /* MultiScan Band-2 (13" thru 19") */ - kESCSixMSB3 = 0x23, /* MultiScan Band-3 (13" thru 21") */ - kESCSixStandard = 0x2B, /* 13"/14" RGB or 12" Monochrome */ - kESCSevenPAL = 0x00, /* PAL */ - kESCSevenNTSC = 0x14, /* NTSC */ - kESCSevenVGA = 0x17, /* VGA */ - kESCSeven16Inch = 0x2D, /* 16" RGB (GoldFish) */ - kESCSevenPALAlternate = 0x30, /* PAL (Alternate) */ - kESCSeven19Inch = 0x3A, /* Third-Party 19" */ - kESCSevenDDC = 0x3E, /* DDC display */ - kESCSevenNoDisplay = 0x3F /* No display connected */ -}; - -/* DepthMode - This abstract data type is used to to reference RELATIVE pixel depths. - Its definition is largely derived from its past usage, analogous to 'xxxVidMode' - - Bits per pixel DOES NOT directly map to 'DepthMode' For example, on some - graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other - hardware, 'kDepthMode1' may represent 8BPP. - - DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc. - behave as expected. The values of the constants which comprise the set are such - that 'kDepthMode4 < kDepthMode6' behaves as expected. -*/ -enum { - kDepthMode1 = 128, - kDepthMode2 = 129, - kDepthMode3 = 130, - kDepthMode4 = 131, - kDepthMode5 = 132, - kDepthMode6 = 133 -}; - -enum { - kFirstDepthMode = 128, /* These constants are obsolete, and just included */ - kSecondDepthMode = 129, /* for clients that have converted to the above */ - kThirdDepthMode = 130, /* kDepthModeXXX constants. */ - kFourthDepthMode = 131, - kFifthDepthMode = 132, - kSixthDepthMode = 133 -}; - - - -struct VDPageInfo { - DepthMode csMode; /* mode within device*/ - DisplayModeID csData; /* data supplied by driver*/ - SInt16 csPage; /* page to switch in*/ - Ptr csBaseAddr; /* base address of page*/ -}; -typedef struct VDPageInfo VDPageInfo; - -typedef VDPageInfo * VDPgInfoPtr; - -struct VDSizeInfo { - SInt16 csHSize; /* desired/returned h size*/ - SInt16 csHPos; /* desired/returned h position*/ - SInt16 csVSize; /* desired/returned v size*/ - SInt16 csVPos; /* desired/returned v position*/ -}; -typedef struct VDSizeInfo VDSizeInfo; - -typedef VDSizeInfo * VDSzInfoPtr; - -struct VDSettings { - SInt16 csParamCnt; /* number of params*/ - SInt16 csBrightMax; /* max brightness*/ - SInt16 csBrightDef; /* default brightness*/ - SInt16 csBrightVal; /* current brightness*/ - SInt16 csCntrstMax; /* max contrast*/ - SInt16 csCntrstDef; /* default contrast*/ - SInt16 csCntrstVal; /* current contrast*/ - SInt16 csTintMax; /* max tint*/ - SInt16 csTintDef; /* default tint*/ - SInt16 csTintVal; /* current tint*/ - SInt16 csHueMax; /* max hue*/ - SInt16 csHueDef; /* default hue*/ - SInt16 csHueVal; /* current hue*/ - SInt16 csHorizDef; /* default horizontal*/ - SInt16 csHorizVal; /* current horizontal*/ - SInt16 csHorizMax; /* max horizontal*/ - SInt16 csVertDef; /* default vertical*/ - SInt16 csVertVal; /* current vertical*/ - SInt16 csVertMax; /* max vertical*/ -}; -typedef struct VDSettings VDSettings; -typedef VDSettings * VDSettingsPtr; - -struct VDDefMode { - UInt8 csID; - SInt8 filler; -}; -typedef struct VDDefMode VDDefMode; -typedef VDDefMode * VDDefModePtr; - -struct VDSyncInfoRec { - UInt8 csMode; - UInt8 csFlags; -}; -typedef struct VDSyncInfoRec VDSyncInfoRec; - -typedef VDSyncInfoRec * VDSyncInfoPtr; -/* - All displayModeID values from 0x80000000 to 0xFFFFFFFF and 0x00 - are reserved for Apple Computer. -*/ -/* Constants for the cscGetNextResolution call */ -enum { - kDisplayModeIDCurrent = 0x00, /* Reference the Current DisplayModeID */ - kDisplayModeIDInvalid = (IODisplayModeID)0xFFFFFFFF, /* A bogus DisplayModeID in all cases */ - kDisplayModeIDFindFirstResolution = (IODisplayModeID)0xFFFFFFFE, /* Used in cscGetNextResolution to reset iterator */ - kDisplayModeIDNoMoreResolutions = (IODisplayModeID)0xFFFFFFFD, /* Used in cscGetNextResolution to indicate End Of List */ - kDisplayModeIDFindFirstProgrammable = (IODisplayModeID)0xFFFFFFFC, /* Used in cscGetNextResolution to find unused programmable timing */ - kDisplayModeIDBootProgrammable = (IODisplayModeID)0xFFFFFFFB, /* This is the ID given at boot time by the OF driver to a programmable timing */ - kDisplayModeIDReservedBase = (IODisplayModeID)0x80000000 /* Lowest (unsigned) DisplayModeID reserved by Apple */ -}; - -/* Constants for the GetGammaInfoList call */ -enum { - kGammaTableIDFindFirst = (GammaTableID)0xFFFFFFFE, /* Get the first gamma table ID */ - kGammaTableIDNoMoreTables = (GammaTableID)0xFFFFFFFD, /* Used to indicate end of list */ - kGammaTableIDSpecific = 0x00 /* Return the info for the given table id */ -}; - -/* Constants for GetMultiConnect call*/ -enum { - kGetConnectionCount = 0xFFFFFFFF, /* Used to get the number of possible connections in a "multi-headed" framebuffer environment.*/ - kActivateConnection = (0 << kConnectionInactive), /* Used for activating a connection (csConnectFlags value).*/ - kDeactivateConnection = (1 << kConnectionInactive) /* Used for deactivating a connection (csConnectFlags value.)*/ -}; - -/* VDCommunicationRec.csBusID values*/ -enum { - kVideoDefaultBus = 0 -}; - - -/* VDCommunicationInfoRec.csBusType values*/ -enum { - kVideoBusTypeInvalid = 0, - kVideoBusTypeI2C = 1, - kVideoBusTypeDisplayPort = 2 -}; - - -/* VDCommunicationRec.csSendType and VDCommunicationRec.csReplyType values*/ -enum { - kVideoNoTransactionType = 0, /* No transaction*/ - kVideoNoTransactionTypeMask = (1 << kVideoNoTransactionType), - kVideoSimpleI2CType = 1, /* Simple I2C message*/ - kVideoSimpleI2CTypeMask = (1 << kVideoSimpleI2CType), - kVideoDDCciReplyType = 2, /* DDC/ci message (with imbedded length)*/ - kVideoDDCciReplyTypeMask = (1 << kVideoDDCciReplyType), - kVideoCombinedI2CType = 3, /* Combined format I2C R/~W transaction*/ - kVideoCombinedI2CTypeMask = (1 << kVideoCombinedI2CType), - kVideoDisplayPortNativeType = 4, /* DisplayPort Native */ - kVideoDisplayPortNativeTypeMask = (1 << kVideoDisplayPortNativeType) -}; - -// VDCommunicationRec.csCommFlags and VDCommunicationInfoRec.csSupportedCommFlags -enum { - kVideoReplyMicroSecDelayBit = 0, /* If bit set, the driver should delay csMinReplyDelay micro seconds between send and receive*/ - kVideoReplyMicroSecDelayMask = (1 << kVideoReplyMicroSecDelayBit), - kVideoUsageAddrSubAddrBit = 1, /* If bit set, the driver understands to use the lower 16 bits of the address field as two 8 bit values (address/subaddress) for the I2C transaction*/ - kVideoUsageAddrSubAddrMask = (1 << kVideoUsageAddrSubAddrBit) -}; - - -struct VDResolutionInfoRec { - DisplayModeID csPreviousDisplayModeID; /* ID of the previous resolution in a chain */ - DisplayModeID csDisplayModeID; /* ID of the next resolution */ - UInt32 csHorizontalPixels; /* # of pixels in a horizontal line at the max depth */ - UInt32 csVerticalLines; /* # of lines in a screen at the max depth */ - Fixed csRefreshRate; /* Vertical Refresh Rate in Hz */ - DepthMode csMaxDepthMode; /* 0x80-based number representing max bit depth */ - UInt32 csResolutionFlags; /* Reserved - flag bits */ - uintptr_t csReserved; /* Reserved */ -}; -typedef struct VDResolutionInfoRec VDResolutionInfoRec; - -typedef VDResolutionInfoRec * VDResolutionInfoPtr; - -struct VDVideoParametersInfoRec { - DisplayModeID csDisplayModeID; /* the ID of the resolution we want info on */ - DepthMode csDepthMode; /* The bit depth we want the info on (0x80 based) */ - VPBlockPtr csVPBlockPtr; /* Pointer to a video parameter block */ - UInt32 csPageCount; /* Number of pages supported by the resolution */ - VideoDeviceType csDeviceType; /* Device Type: Direct, Fixed or CLUT; */ - UInt32 csDepthFlags; /* Flags */ -}; -typedef struct VDVideoParametersInfoRec VDVideoParametersInfoRec; - -typedef VDVideoParametersInfoRec * VDVideoParametersInfoPtr; - -struct VDGammaInfoRec { - GammaTableID csLastGammaID; /* the ID of the previous gamma table */ - GammaTableID csNextGammaID; /* the ID of the next gamma table */ - Ptr csGammaPtr; /* Ptr to a gamma table data */ - uintptr_t csReserved; /* Reserved */ -}; -typedef struct VDGammaInfoRec VDGammaInfoRec; - -typedef VDGammaInfoRec * VDGammaInfoPtr; - -struct VDGetGammaListRec { - GammaTableID csPreviousGammaTableID; /* ID of the previous gamma table */ - GammaTableID csGammaTableID; /* ID of the gamma table following csPreviousDisplayModeID */ - UInt32 csGammaTableSize; /* Size of the gamma table in bytes */ - char * csGammaTableName; /* Gamma table name (c-string) */ -}; -typedef struct VDGetGammaListRec VDGetGammaListRec; - -typedef VDGetGammaListRec * VDGetGammaListPtr; - -struct VDRetrieveGammaRec { - GammaTableID csGammaTableID; /* ID of gamma table to retrieve */ - GammaTbl * csGammaTablePtr; /* Location to copy desired gamma to */ -}; -typedef struct VDRetrieveGammaRec VDRetrieveGammaRec; - -typedef VDRetrieveGammaRec * VDRetrieveGammaPtr; - -struct VDSetHardwareCursorRec { - void * csCursorRef; /* reference to cursor data */ - UInt32 csReserved1; /* reserved for future use */ - UInt32 csReserved2; /* should be ignored */ -}; -typedef struct VDSetHardwareCursorRec VDSetHardwareCursorRec; - -typedef VDSetHardwareCursorRec * VDSetHardwareCursorPtr; - -struct VDDrawHardwareCursorRec { - SInt32 csCursorX; /* x coordinate */ - SInt32 csCursorY; /* y coordinate */ - UInt32 csCursorVisible; /* true if cursor is must be visible */ - UInt32 csReserved1; /* reserved for future use */ - UInt32 csReserved2; /* should be ignored */ -}; -typedef struct VDDrawHardwareCursorRec VDDrawHardwareCursorRec; - -typedef VDDrawHardwareCursorRec * VDDrawHardwareCursorPtr; - -struct VDSupportsHardwareCursorRec { - UInt32 csSupportsHardwareCursor; - /* true if hardware cursor is supported */ - UInt32 csReserved1; /* reserved for future use */ - UInt32 csReserved2; /* must be zero */ -}; -typedef struct VDSupportsHardwareCursorRec VDSupportsHardwareCursorRec; - -typedef VDSupportsHardwareCursorRec * VDSupportsHardwareCursorPtr; - -struct VDHardwareCursorDrawStateRec { - SInt32 csCursorX; /* x coordinate */ - SInt32 csCursorY; /* y coordinate */ - UInt32 csCursorVisible; /* true if cursor is visible */ - UInt32 csCursorSet; /* true if cursor successfully set by last set control call */ - UInt32 csReserved1; /* reserved for future use */ - UInt32 csReserved2; /* must be zero */ -}; -typedef struct VDHardwareCursorDrawStateRec VDHardwareCursorDrawStateRec; - -typedef VDHardwareCursorDrawStateRec * VDHardwareCursorDrawStatePtr; - -struct VDConvolutionInfoRec { - DisplayModeID csDisplayModeID; /* the ID of the resolution we want info on */ - DepthMode csDepthMode; /* The bit depth we want the info on (0x80 based) */ - UInt32 csPage; - UInt32 csFlags; - UInt32 csReserved; -}; -typedef struct VDConvolutionInfoRec VDConvolutionInfoRec; - -typedef VDConvolutionInfoRec * VDConvolutionInfoPtr; - -struct VDPowerStateRec { - UInt32 powerState; - UInt32 powerFlags; - - uintptr_t powerReserved1; - uintptr_t powerReserved2; -}; -typedef struct VDPowerStateRec VDPowerStateRec; - -typedef VDPowerStateRec * VDPowerStatePtr; -/* - Private Data to video drivers. - - In versions of MacOS with multiple address spaces (System 8), the OS - must know the extent of parameters in order to move them between the caller - and driver. The old private-selector model for video drivers does not have - this information so: - - For post-7.x Systems private calls should be implemented using the cscPrivateCall -*/ - -struct VDPrivateSelectorDataRec { - LogicalAddress privateParameters; /* Caller's parameters*/ - ByteCount privateParametersSize; /* Size of data sent from caller to driver*/ - LogicalAddress privateResults; /* Caller's return area. Can be nil, or same as privateParameters.*/ - ByteCount privateResultsSize; /* Size of data driver returns to caller. Can be nil, or same as privateParametersSize.*/ -}; -typedef struct VDPrivateSelectorDataRec VDPrivateSelectorDataRec; - - -struct VDPrivateSelectorRec { - UInt32 reserved; /* Reserved (set to 0). */ - VDPrivateSelectorDataRec data[1]; -}; -typedef struct VDPrivateSelectorRec VDPrivateSelectorRec; - -struct VDDDCBlockRec { - UInt32 ddcBlockNumber; /* Input -- DDC EDID (Extended Display Identification Data) number (1-based) */ - ResType ddcBlockType; /* Input -- DDC block type (EDID/VDIF) */ - UInt32 ddcFlags; /* Input -- DDC Flags*/ - UInt32 ddcReserved; /* Reserved */ - Byte ddcBlockData[128]; /* Output -- DDC EDID/VDIF data (kDDCBlockSize) */ -}; -typedef struct VDDDCBlockRec VDDDCBlockRec; - -typedef VDDDCBlockRec * VDDDCBlockPtr; - -enum { - /* timingSyncConfiguration*/ - kSyncInterlaceMask = (1 << 7), - kSyncAnalogCompositeMask = 0, - kSyncAnalogCompositeSerrateMask = (1 << 2), - kSyncAnalogCompositeRGBSyncMask = (1 << 1), - kSyncAnalogBipolarMask = (1 << 3), - kSyncAnalogBipolarSerrateMask = (1 << 2), - kSyncAnalogBipolarSRGBSyncMask = (1 << 1), - kSyncDigitalCompositeMask = (1 << 4), - kSyncDigitalCompositeSerrateMask = (1 << 2), - kSyncDigitalCompositeMatchHSyncMask = (1 << 2), - kSyncDigitalSeperateMask = (1 << 4) + (1 << 3), - kSyncDigitalVSyncPositiveMask = (1 << 2), - kSyncDigitalHSyncPositiveMask = (1 << 1) -}; - - - - -struct VDDisplayTimingRangeRec { - UInt32 csRangeSize; /* Init to sizeof(VDDisplayTimingRangeRec) */ - UInt32 csRangeType; /* Init to 0 */ - UInt32 csRangeVersion; /* Init to 0 */ - UInt32 csRangeReserved; /* Init to 0 */ - - UInt32 csRangeBlockIndex; /* Requested block (first index is 0)*/ - UInt32 csRangeGroup; /* set to 0 */ - UInt32 csRangeBlockCount; /* # blocks */ - UInt32 csRangeFlags; /* dependent video */ - - UInt64 csMinPixelClock; /* Min dot clock in Hz */ - UInt64 csMaxPixelClock; /* Max dot clock in Hz */ - - UInt32 csMaxPixelError; /* Max dot clock error */ - UInt32 csTimingRangeSyncFlags; - UInt32 csTimingRangeSignalLevels; - UInt32 csTimingRangeSupportedSignalConfigs; - - UInt32 csMinFrameRate; /* Hz */ - UInt32 csMaxFrameRate; /* Hz */ - UInt32 csMinLineRate; /* Hz */ - UInt32 csMaxLineRate; /* Hz */ - - - UInt32 csMaxHorizontalTotal; /* Clocks - Maximum total (active + blanking) */ - UInt32 csMaxVerticalTotal; /* Clocks - Maximum total (active + blanking) */ - UInt32 csMaxTotalReserved1; /* Reserved */ - UInt32 csMaxTotalReserved2; /* Reserved */ - - - - /* Some cards require that some timing elements*/ - /* be multiples of a "character size" (often 8*/ - /* clocks). The "xxxxCharSize" fields document*/ - /* those requirements.*/ - - - UInt8 csCharSizeHorizontalActive; /* Character size */ - UInt8 csCharSizeHorizontalBlanking; /* Character size */ - UInt8 csCharSizeHorizontalSyncOffset; /* Character size */ - UInt8 csCharSizeHorizontalSyncPulse; /* Character size */ - - UInt8 csCharSizeVerticalActive; /* Character size */ - UInt8 csCharSizeVerticalBlanking; /* Character size */ - UInt8 csCharSizeVerticalSyncOffset; /* Character size */ - UInt8 csCharSizeVerticalSyncPulse; /* Character size */ - - UInt8 csCharSizeHorizontalBorderLeft; /* Character size */ - UInt8 csCharSizeHorizontalBorderRight; /* Character size */ - UInt8 csCharSizeVerticalBorderTop; /* Character size */ - UInt8 csCharSizeVerticalBorderBottom; /* Character size */ - - UInt8 csCharSizeHorizontalTotal; /* Character size for active + blanking */ - UInt8 csCharSizeVerticalTotal; /* Character size for active + blanking */ - UInt16 csCharSizeReserved1; /* Reserved (Init to 0) */ - - - UInt32 csMinHorizontalActiveClocks; - UInt32 csMaxHorizontalActiveClocks; - UInt32 csMinHorizontalBlankingClocks; - UInt32 csMaxHorizontalBlankingClocks; - - UInt32 csMinHorizontalSyncOffsetClocks; - UInt32 csMaxHorizontalSyncOffsetClocks; - UInt32 csMinHorizontalPulseWidthClocks; - UInt32 csMaxHorizontalPulseWidthClocks; - - UInt32 csMinVerticalActiveClocks; - UInt32 csMaxVerticalActiveClocks; - UInt32 csMinVerticalBlankingClocks; - UInt32 csMaxVerticalBlankingClocks; - - UInt32 csMinVerticalSyncOffsetClocks; - UInt32 csMaxVerticalSyncOffsetClocks; - UInt32 csMinVerticalPulseWidthClocks; - UInt32 csMaxVerticalPulseWidthClocks; - - - UInt32 csMinHorizontalBorderLeft; - UInt32 csMaxHorizontalBorderLeft; - UInt32 csMinHorizontalBorderRight; - UInt32 csMaxHorizontalBorderRight; - - UInt32 csMinVerticalBorderTop; - UInt32 csMaxVerticalBorderTop; - UInt32 csMinVerticalBorderBottom; - UInt32 csMaxVerticalBorderBottom; - - UInt32 csMaxNumLinks; /* number of links, if zero, assume link 1 */ - UInt32 csMinLink0PixelClock; /* min pixel clock for link 0 (kHz) */ - UInt32 csMaxLink0PixelClock; /* max pixel clock for link 0 (kHz) */ - UInt32 csMinLink1PixelClock; /* min pixel clock for link 1 (kHz) */ - UInt32 csMaxLink1PixelClock; /* max pixel clock for link 1 (kHz) */ - - UInt32 csReserved6; /* Reserved (Init to 0)*/ - UInt32 csReserved7; /* Reserved (Init to 0)*/ - UInt32 csReserved8; /* Reserved (Init to 0)*/ -}; -typedef struct VDDisplayTimingRangeRec VDDisplayTimingRangeRec; - -typedef VDDisplayTimingRangeRec * VDDisplayTimingRangePtr; - -enum { - /* csDisplayModeState*/ - kDMSModeReady = 0, /* Display Mode ID is configured and ready*/ - kDMSModeNotReady = 1, /* Display Mode ID is is being programmed*/ - kDMSModeFree = 2 /* Display Mode ID is not associated with a timing*/ -}; - - -/* Video driver Errors -10930 to -10959 */ -enum { - kTimingChangeRestrictedErr = -10930, - kVideoI2CReplyPendingErr = -10931, - kVideoI2CTransactionErr = -10932, - kVideoI2CBusyErr = -10933, - kVideoI2CTransactionTypeErr = -10934, - kVideoBufferSizeErr = -10935, - kVideoCannotMirrorErr = -10936 -}; - - -enum { - /* csTimingRangeSignalLevels*/ - kRangeSupportsSignal_0700_0300_Bit = 0, - kRangeSupportsSignal_0714_0286_Bit = 1, - kRangeSupportsSignal_1000_0400_Bit = 2, - kRangeSupportsSignal_0700_0000_Bit = 3, - kRangeSupportsSignal_0700_0300_Mask = (1 << kRangeSupportsSignal_0700_0300_Bit), - kRangeSupportsSignal_0714_0286_Mask = (1 << kRangeSupportsSignal_0714_0286_Bit), - kRangeSupportsSignal_1000_0400_Mask = (1 << kRangeSupportsSignal_1000_0400_Bit), - kRangeSupportsSignal_0700_0000_Mask = (1 << kRangeSupportsSignal_0700_0000_Bit) -}; - - -enum { - /* csSignalConfig*/ - kDigitalSignalBit = 0, /* Do not set. Mac OS does not currently support arbitrary digital timings*/ - kAnalogSetupExpectedBit = 1, /* Analog displays - display expects a blank-to-black setup or pedestal. See VESA signal standards.*/ - kInterlacedCEA861SyncModeBit = 2, - - kDigitalSignalMask = (1 << kDigitalSignalBit), - kAnalogSetupExpectedMask = (1 << kAnalogSetupExpectedBit), - kInterlacedCEA861SyncModeMask = (1 << kInterlacedCEA861SyncModeBit) -}; - - -enum { - /* csSignalLevels for analog*/ - kAnalogSignalLevel_0700_0300 = 0, - kAnalogSignalLevel_0714_0286 = 1, - kAnalogSignalLevel_1000_0400 = 2, - kAnalogSignalLevel_0700_0000 = 3 -}; - - -enum { - /* csTimingRangeSyncFlags*/ - kRangeSupportsSeperateSyncsBit = 0, - kRangeSupportsSyncOnGreenBit = 1, - kRangeSupportsCompositeSyncBit = 2, - kRangeSupportsVSyncSerrationBit = 3, - kRangeSupportsSeperateSyncsMask = (1 << kRangeSupportsSeperateSyncsBit), - kRangeSupportsSyncOnGreenMask = (1 << kRangeSupportsSyncOnGreenBit), - kRangeSupportsCompositeSyncMask = (1 << kRangeSupportsCompositeSyncBit), - kRangeSupportsVSyncSerrationMask = (1 << kRangeSupportsVSyncSerrationBit) -}; - - - -enum { - /* csHorizontalSyncConfig and csVerticalSyncConfig*/ - kSyncPositivePolarityBit = 0, /* Digital separate sync polarity for analog interfaces (0 => negative polarity)*/ - kSyncPositivePolarityMask = (1 << kSyncPositivePolarityBit) -}; - - - - -/* For timings with kDetailedTimingFormat.*/ - -struct VDDetailedTimingRec { - UInt32 csTimingSize; /* Init to sizeof(VDDetailedTimingRec)*/ - UInt32 csTimingType; /* Init to 0*/ - UInt32 csTimingVersion; /* Init to 0*/ - UInt32 csTimingReserved; /* Init to 0*/ - - DisplayModeID csDisplayModeID; /* Init to 0*/ - UInt32 csDisplayModeSeed; /* */ - UInt32 csDisplayModeState; /* Display Mode state*/ - UInt32 csDisplayModeAlias; /* Mode to use when programmed.*/ - - UInt32 csSignalConfig; - UInt32 csSignalLevels; - - UInt64 csPixelClock; /* Hz*/ - - UInt64 csMinPixelClock; /* Hz - With error what is slowest actual clock */ - UInt64 csMaxPixelClock; /* Hz - With error what is fasted actual clock */ - - - UInt32 csHorizontalActive; /* Pixels*/ - UInt32 csHorizontalBlanking; /* Pixels*/ - UInt32 csHorizontalSyncOffset; /* Pixels*/ - UInt32 csHorizontalSyncPulseWidth; /* Pixels*/ - - UInt32 csVerticalActive; /* Lines*/ - UInt32 csVerticalBlanking; /* Lines*/ - UInt32 csVerticalSyncOffset; /* Lines*/ - UInt32 csVerticalSyncPulseWidth; /* Lines*/ - - UInt32 csHorizontalBorderLeft; /* Pixels*/ - UInt32 csHorizontalBorderRight; /* Pixels*/ - UInt32 csVerticalBorderTop; /* Lines*/ - UInt32 csVerticalBorderBottom; /* Lines*/ - - UInt32 csHorizontalSyncConfig; - UInt32 csHorizontalSyncLevel; /* Future use (init to 0)*/ - UInt32 csVerticalSyncConfig; - UInt32 csVerticalSyncLevel; /* Future use (init to 0)*/ - - UInt32 csNumLinks; /* number of links, if 0 = assume link - 0 */ - - UInt32 csReserved2; /* Init to 0*/ - UInt32 csReserved3; /* Init to 0*/ - UInt32 csReserved4; /* Init to 0*/ - - UInt32 csReserved5; /* Init to 0*/ - UInt32 csReserved6; /* Init to 0*/ - UInt32 csReserved7; /* Init to 0*/ - UInt32 csReserved8; /* Init to 0*/ -}; -typedef struct VDDetailedTimingRec VDDetailedTimingRec; - -typedef VDDetailedTimingRec * VDDetailedTimingPtr; - -/* csScalerFeatures */ -enum { - kScaleStretchOnlyMask = (1<<0), /* True means the driver cannot add borders to avoid non-square pixels */ - kScaleCanUpSamplePixelsMask = (1<<1), /* True means timings with more active clocks than pixels (ie 640x480 pixels on a 1600x1200 timing) */ - kScaleCanDownSamplePixelsMask = (1<<2), /* True means timings with fewer active clocks than pixels (ie 1600x1200 pixels on a 640x480 timing) */ - kScaleCanScaleInterlacedMask = (1<<3), /* True means can scale an interlaced timing */ - kScaleCanSupportInsetMask = (1<<4), /* True means can scale a timing with insets */ - kScaleCanRotateMask = (1<<5), /* True means can rotate image */ - kScaleCanBorderInsetOnlyMask = (1<<6) /* True means can scale a timing with insets */ -}; - -/* csScalerFlags */ -enum { - kScaleStretchToFitMask = 0x00000001, /* True means the driver should avoid borders and allow non-square pixels */ - - kScaleRotateFlagsMask = 0x000000f0, - - kScaleSwapAxesMask = 0x00000010, - kScaleInvertXMask = 0x00000020, - kScaleInvertYMask = 0x00000040, - - kScaleRotate0Mask = 0x00000000, - kScaleRotate90Mask = kScaleSwapAxesMask | kScaleInvertXMask, - kScaleRotate180Mask = kScaleInvertXMask | kScaleInvertYMask, - kScaleRotate270Mask = kScaleSwapAxesMask | kScaleInvertYMask -}; - -typedef UInt32 VDClutBehavior; -typedef VDClutBehavior * VDClutBehaviorPtr; -enum { - kSetClutAtSetEntries = 0, /* SetEntries behavior is to update clut during SetEntries call*/ - kSetClutAtVBL = 1 /* SetEntries behavior is to upate clut at next vbl*/ -}; - - -struct VDCommunicationRec { - SInt32 csBusID; /* kVideoDefaultBus for single headed cards.*/ - UInt32 csCommFlags; /* Always zero*/ - UInt32 csMinReplyDelay; /* Minimum delay between send and reply transactions (units depend on csCommFlags)*/ - UInt32 csReserved2; /* Always zero*/ - - UInt32 csSendAddress; /* Usually I2C address (eg 0x6E)*/ - UInt32 csSendType; /* See kVideoSimpleI2CType etc.*/ - LogicalAddress csSendBuffer; /* Pointer to the send buffer*/ - ByteCount csSendSize; /* Number of bytes to send*/ - - UInt32 csReplyAddress; /* Address from which to read (eg 0x6F for kVideoDDCciReplyType I2C address)*/ - UInt32 csReplyType; /* See kVideoDDCciReplyType etc.*/ - LogicalAddress csReplyBuffer; /* Pointer to the reply buffer*/ - ByteCount csReplySize; /* Max bytes to reply (size of csReplyBuffer)*/ - - UInt32 csReserved3; - UInt32 csReserved4; - UInt32 csReserved5; /* Always zero*/ - UInt32 csReserved6; /* Always zero*/ -}; -typedef struct VDCommunicationRec VDCommunicationRec; - -typedef VDCommunicationRec * VDCommunicationPtr; - -struct VDCommunicationInfoRec { - SInt32 csBusID; /* kVideoDefaultBus for single headed cards. */ - UInt32 csBusType; /* See kVideoBusI2C etc.*/ - SInt32 csMinBus; /* Minimum bus (usually kVideoDefaultBus). Used to probe additional busses*/ - SInt32 csMaxBus; /* Max bus (usually kVideoDefaultBus). Used to probe additional busses*/ - - UInt32 csSupportedTypes; /* Bit field for first 32 supported transaction types. Eg. 0x07 => support for kVideoNoTransactionType, kVideoSimpleI2CType and kVideoDDCciReplyType.*/ - UInt32 csSupportedCommFlags; /* Return the flags csCommFlags understood by this driver. */ - UInt32 csReserved2; /* Always zero*/ - UInt32 csReserved3; /* Always zero*/ - - UInt32 csReserved4; /* Always zero*/ - UInt32 csReserved5; /* Always zero*/ - UInt32 csReserved6; /* Always zero*/ - UInt32 csReserved7; /* Always zero*/ -}; -typedef struct VDCommunicationInfoRec VDCommunicationInfoRec; - -typedef VDCommunicationInfoRec * VDCommunicationInfoPtr; - - -struct VDScalerRec { - UInt32 csScalerSize; /* Init to sizeof(VDScalerRec) */ - UInt32 csScalerVersion; /* Init to 0 */ - UInt32 csReserved1; /* Init to 0 */ - UInt32 csReserved2; /* Init to 0 */ - - DisplayModeID csDisplayModeID; /* Display Mode ID modified by this call. */ - UInt32 csDisplayModeSeed; /* */ - UInt32 csDisplayModeState; /* Display Mode state */ - UInt32 csReserved3; /* Init to 0 */ - - UInt32 csScalerFlags; /* Init to 0 */ - UInt32 csHorizontalPixels; /* Graphics system addressable pixels */ - UInt32 csVerticalPixels; /* Graphics system addressable lines */ - UInt32 csHorizontalInset; /* Border pixels for underscan */ - UInt32 csVerticalInset; /* Border lines for underscan */ - UInt32 csReserved6; /* Init to 0 */ - UInt32 csReserved7; /* Init to 0 */ - UInt32 csReserved8; /* Init to 0 */ -}; -typedef struct VDScalerRec VDScalerRec; -typedef VDScalerRec *VDScalerPtr; - -struct VDScalerInfoRec { - UInt32 csScalerInfoSize; /* Init to sizeof(VDScalerInfoRec) */ - UInt32 csScalerInfoVersion; /* Init to 0 */ - UInt32 csReserved1; /* Init to 0 */ - UInt32 csReserved2; /* Init to 0 */ - - UInt32 csScalerFeatures; /* Feature flags */ - UInt32 csMaxHorizontalPixels; /* limit to horizontal scaled pixels */ - UInt32 csMaxVerticalPixels; /* limit to vertical scaled pixels */ - UInt32 csReserved3; /* Init to 0 */ - - UInt32 csReserved4; /* Init to 0 */ - UInt32 csReserved5; /* Init to 0 */ - UInt32 csReserved6; /* Init to 0 */ - UInt32 csReserved7; /* Init to 0 */ -}; -typedef struct VDScalerInfoRec VDScalerInfoRec; -typedef VDScalerInfoRec *VDScalerInfoPtr; - -enum { - /* csMirrorFeatures*/ - kMirrorSameDepthOnlyMirrorMask = (1 << 0), /* Commonly true - Mirroring can only be done if the displays are the same bitdepth*/ - kMirrorSameSizeOnlyMirrorMask = (1 << 1), /* Commonly false - Mirroring can only be done if the displays are the same size*/ - kMirrorSameTimingOnlyMirrorMask = (1 << 2), /* Sometimes true - Mirroring can only be done if the displays are the same timing*/ - kMirrorCommonGammaMask = (1 << 3) /* Sometimes true - Only one gamma correction LUT.*/ -}; - -enum { - /* csMirrorSupportedFlags and csMirrorFlags*/ - kMirrorCanMirrorMask = (1 << 0), /* Set means we can HW mirrored right now (uses csMirrorEntryID)*/ - kMirrorAreMirroredMask = (1 << 1), /* Set means we are HW mirrored right now (uses csMirrorEntryID)*/ - kMirrorUnclippedMirrorMask = (1 << 2), /* Set means mirrored displays are not clipped to their intersection*/ - kMirrorHAlignCenterMirrorMask = (1 << 3), /* Set means mirrored displays can/should be centered horizontally*/ - kMirrorVAlignCenterMirrorMask = (1 << 4), /* Set means mirrored displays can/should be centered vertically*/ - kMirrorCanChangePixelFormatMask = (1 << 5), /* Set means mirrored the device should change the pixel format of mirrored displays to allow mirroring.*/ - kMirrorCanChangeTimingMask = (1 << 6), /* Set means mirrored the device should change the timing of mirrored displays to allow mirroring.*/ - kMirrorClippedMirrorMask = (1 << 7) /* Set means mirrored displays are clipped to their intersection (driver handles blacking and base address adjustment)*/ -}; - -struct VDMirrorRec { - UInt32 csMirrorSize; /* Init to sizeof(VDMirrorRec)*/ - UInt32 csMirrorVersion; /* Init to 0*/ - - RegEntryID csMirrorRequestID; /* Input RegEntryID to check for mirroring support and state*/ - RegEntryID csMirrorResultID; /* Output RegEntryID of the next mirrored device*/ - - UInt32 csMirrorFeatures; /* Output summary features of the driver*/ - UInt32 csMirrorSupportedFlags; /* Output configuration options supported by the driver*/ - UInt32 csMirrorFlags; /* Output configuration options active now*/ - UInt32 csReserved1; /* Init to 0*/ - - - UInt32 csReserved2; /* Init to 0*/ - UInt32 csReserved3; /* Init to 0*/ - UInt32 csReserved4; /* Init to 0*/ - UInt32 csReserved5; /* Init to 0*/ -}; -typedef struct VDMirrorRec VDMirrorRec; -typedef VDMirrorRec * VDMirrorPtr; - -struct VDConfigurationRec { - UInt32 csConfigFeature; /* input what feature to config - always input*/ - UInt32 csConfigSupport; /* output support value - always output*/ - uintptr_t csConfigValue; /* input/output feature value - input on Control(), output on Status()*/ - uintptr_t csReserved1; - uintptr_t csReserved2; -}; -typedef struct VDConfigurationRec VDConfigurationRec; -typedef VDConfigurationRec * VDConfigurationPtr; - -enum -{ - kDVIPowerSwitchFeature = (1 << 0), /* Used for csConfigFeature*/ - kDVIPowerSwitchSupportMask = (1 << 0), /* Read-only*/ - kDVIPowerSwitchActiveMask = (1 << 0), /* Read/write for csConfigValue*/ -}; - -struct VDConfigurationFeatureListRec -{ - OSType * csConfigFeatureList; - ItemCount csNumConfigFeatures; - uintptr_t csReserved1; - uintptr_t csReserved2; -}; -typedef struct VDConfigurationFeatureListRec VDConfigurationFeatureListRec; -typedef VDConfigurationFeatureListRec * VDConfigurationFeatureListRecPtr; - - -#ifndef __LP64__ -#pragma options align=reset -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __IOMACOSVIDEO__ */ - diff --git a/i386/include/IOKit/ndrvsupport/IONDRVFramebuffer.h b/i386/include/IOKit/ndrvsupport/IONDRVFramebuffer.h deleted file mode 100644 index ca65891..0000000 --- a/i386/include/IOKit/ndrvsupport/IONDRVFramebuffer.h +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1997-1998 Apple Computer, Inc. - * - * - * HISTORY - * - * sdouglas 22 Oct 97 - first checked in. - * sdouglas 24 Jul 98 - start IOKit. - * sdouglas 15 Dec 98 - cpp. - * - */ - -#ifndef _IOKIT_IONDRVFRAMEBUFFER_H -#define _IOKIT_IONDRVFRAMEBUFFER_H - -#include <IOKit/graphics/IOFramebuffer.h> -#include <IOKit/ndrvsupport/IOMacOSVideo.h> -#include <IOKit/ndrvsupport/IONDRVSupport.h> - -#define kIONDRVDisableKey "AAPL,disable-ndrv" - -class IONDRVFramebuffer : public IOFramebuffer -{ - OSDeclareDefaultStructors(IONDRVFramebuffer) - -protected: -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of this class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * reserved; - -protected: - - IOService * nub; - class IONDRV * ndrv; - - // current configuration - IODisplayModeID currentDisplayMode; - IOIndex currentDepth; - IOIndex currentPage; - UInt8 __reservedE; - - IOPhysicalAddress physicalFramebuffer; - IODeviceMemory * vramRange; - - UInt8 gammaWidth; - UInt8 __reservedD; - UInt8 lastGrayMode; - VDClutBehavior lastClutSetting; - UInt8 __reservedC; - - bool consoleDevice; - UInt32 powerState; - UInt32 ndrvState; - SInt32 ndrvEnter; - OSArray * detailedTimings; - UInt32 detailedTimingsSeed; - UInt32 * detailedTimingsCurrent; - - IODeviceMemory * vramMemory; - - VDResolutionInfoRec cachedVDResolution; - - struct _VSLService * vslServices; - - UInt32 accessFlags; - unsigned int shouldDoI2CPower:1; - unsigned int online:1; - unsigned int avJackState:1; - unsigned int grayMode:1; - unsigned int platformSleep:1; - unsigned int forceReadEDID:1; - unsigned int supportsProbe:1; - unsigned int __reservedB:25; - - IOService * device; - - UInt32 __reservedA[29]; - -private: - struct IONDRVFramebufferPrivate * __private; - -public: - virtual IOReturn doDriverIO( UInt32 commandID, void * contents, - UInt32 commandCode, UInt32 commandKind ); -private: - OSMetaClassDeclareReservedUsed(IONDRVFramebuffer, 0); - - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 1); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 2); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 3); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 4); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 5); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 6); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 7); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 8); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 9); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 10); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 11); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 12); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 13); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 14); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 15); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 16); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 17); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 18); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 19); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 20); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 21); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 22); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 23); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 24); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 25); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 26); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 27); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 28); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 29); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 30); - OSMetaClassDeclareReservedUnused(IONDRVFramebuffer, 31); - -private: - - void initForPM ( void ); - - virtual unsigned long maxCapabilityForDomainState( IOPMPowerFlags domainState ); - virtual unsigned long initialPowerStateForDomainState( IOPMPowerFlags domainState ); - virtual unsigned long powerStateForDomainState( IOPMPowerFlags domainState ); - - virtual IOReturn checkDriver( void ); - virtual UInt32 iterateAllModes( IODisplayModeID * displayModeIDs ); - virtual IOReturn getResInfoForMode( IODisplayModeID modeID, - IODisplayModeInformation * theInfo ); - virtual IOReturn getResInfoForArbMode( IODisplayModeID modeID, - IODisplayModeInformation * theInfo ); - IOReturn getResInfoForDetailed( IODisplayModeID modeID, - VDDetailedTimingRec * detailed, - IODisplayModeInformation * info ); - IOIndex mapDepthIndex( IODisplayModeID modeID, IOIndex depth, bool fromDepthMode ); - virtual IOReturn validateDisplayMode( - IODisplayModeID mode, IOOptionBits flags, - VDDetailedTimingRec ** detailed ); - virtual IOReturn setDetailedTiming( - IODisplayModeID mode, IOOptionBits options, - void * description, IOByteCount descripSize ); - virtual void getCurrentConfiguration( void ); - static const IOTVector * _undefinedSymbolHandler( void * self, - const char * libraryName, const char * symbolName ); - static bool _videoJackStateChangeHandler( void * target, void * ref, - IOService * newService, IONotifier * notifier ); - static void _avProbeAction( OSObject * p0, IOTimerEventSource * evtSrc ); - void displayI2CPower( bool enable ); - IOReturn ndrvSetPowerState( UInt32 newState ); - IOReturn ndrvUpdatePowerState( void ); - IOReturn ndrvSetDisplayPowerState( UInt32 newState ); - static IOReturn _probeAction( IONDRVFramebuffer * self, IOOptionBits options ); - bool searchOfflineMode( IODisplayModeID * offlineMode ); - IOReturn processConnectChange( uintptr_t * value ); - IOReturn setMirror( IONDRVFramebuffer * other ); - IOReturn setConnectionFlags( void ); - bool getOnlineState( void ); - IOReturn ndrvGetSetFeature( UInt32 feature, uintptr_t newValue, uintptr_t * currentValue ); - static IOReturn _doControl( IONDRVFramebuffer * self, UInt32 code, void * params ); - static IOReturn _doStatus( IONDRVFramebuffer * self, UInt32 code, void * params ); - static IOReturn extControl( OSObject * owner, void * code, void * params ); - static IOReturn extStatus( OSObject * owner, void * code, void * params ); - IOReturn createI2C( void ); - void setInfoProperties( void ); - -public: - virtual IOReturn doControl( UInt32 code, void * params ); - virtual IOReturn doStatus( UInt32 code, void * params ); - -public: - - virtual IOService * probe( IOService * provider, - SInt32 * score ); - - virtual bool start( IOService * provider ); - - virtual void stop( IOService * provider ); - - virtual void free( void ); - - virtual IOReturn setProperties( OSObject * properties ); - - virtual IOReturn requestProbe( IOOptionBits options ); - - virtual IOReturn enableController( void ); - - virtual IODeviceMemory * makeSubRange( IOPhysicalAddress start, - IOPhysicalLength length ); - virtual IODeviceMemory * getApertureRange( IOPixelAperture aperture ); - virtual IODeviceMemory * getVRAMRange( void ); - - virtual IODeviceMemory * findVRAM( void ); - - virtual bool isConsoleDevice( void ); - - virtual const IOTVector * undefinedSymbolHandler( const char * libraryName, - const char * symbolName ); - - virtual const char * getPixelFormats( void ); - - // Array of supported display modes - virtual IOItemCount getDisplayModeCount( void ); - virtual IOReturn getDisplayModes( IODisplayModeID * allDisplayModes ); - - // Info about a display mode - virtual IOReturn getInformationForDisplayMode( IODisplayModeID displayMode, - IODisplayModeInformation * info ); - - // Mask of pixel formats available in mode and depth - virtual UInt64 getPixelFormatsForDisplayMode( IODisplayModeID displayMode, - IOIndex depth ); - - virtual IOReturn getPixelInformation( - IODisplayModeID displayMode, IOIndex depth, - IOPixelAperture aperture, IOPixelInformation * pixelInfo ); - - // Framebuffer info - - // Current display mode and depth - virtual IOReturn getCurrentDisplayMode( IODisplayModeID * displayMode, - IOIndex * depth ); - - // Set display mode and depth - virtual IOReturn setDisplayMode( IODisplayModeID displayMode, - IOIndex depth ); - - // For pages - virtual IOReturn setApertureEnable( IOPixelAperture aperture, - IOOptionBits enable ); - - virtual IOReturn setStartupDisplayMode( IODisplayModeID displayMode, - IOIndex depth ); - virtual IOReturn getStartupDisplayMode( IODisplayModeID * displayMode, - IOIndex * depth ); - - //// CLUTs - - virtual IOReturn setCLUTWithEntries( IOColorEntry * colors, UInt32 index, - UInt32 numEntries, IOOptionBits options ); - - //// Gamma - - virtual IOReturn setGammaTable( UInt32 channelCount, UInt32 dataCount, - UInt32 dataWidth, void * data ); - - //// Display mode timing information - - virtual IOReturn getTimingInfoForDisplayMode( IODisplayModeID displayMode, - IOTimingInformation * info ); - - //// Detailed timing information - - virtual IOReturn validateDetailedTiming( - void * description, IOByteCount descripSize ); - - virtual IOReturn setDetailedTimings( OSArray * array ); - - //// Controller attributes - - virtual IOReturn setAttribute( IOSelect attribute, uintptr_t value ); - virtual IOReturn getAttribute( IOSelect attribute, uintptr_t * value ); - - //// Connections - - virtual IOItemCount getConnectionCount( void ); - - virtual IOReturn getAttributeForConnection( IOIndex connectIndex, - IOSelect attribute, uintptr_t * value ); - - virtual IOReturn setAttributeForConnection( IOIndex connectIndex, - IOSelect attribute, uintptr_t info ); - - // Apple sensing - - virtual IOReturn getAppleSense( IOIndex connectIndex, - UInt32 * senseType, - UInt32 * primary, - UInt32 * extended, - UInt32 * displayType ); - - virtual IOReturn connectFlags( IOIndex connectIndex, - IODisplayModeID displayMode, IOOptionBits * flags ); - - //// IOHighLevelDDCSense - - virtual bool hasDDCConnect( IOIndex connectIndex ); - virtual IOReturn getDDCBlock( IOIndex connectIndex, UInt32 blockNumber, - IOSelect blockType, IOOptionBits options, - UInt8 * data, IOByteCount * length ); - - //// Interrupts - - virtual IOReturn registerForInterruptType( IOSelect interruptType, - IOFBInterruptProc proc, OSObject * target, void * ref, - void ** interruptRef ); - virtual IOReturn unregisterInterrupt( void * interruptRef ); - virtual IOReturn setInterruptState( void * interruptRef, UInt32 state ); - - //// HW Cursors - - virtual IOReturn setCursorImage( void * cursorImage ); - virtual IOReturn setCursorState( SInt32 x, SInt32 y, bool visible ); - - //// I2C calls - - virtual IOReturn doI2CRequest( UInt32 bus, IOI2CBusTiming * timing, IOI2CRequest * request ); - - //// VSL calls - - static OSStatus VSLNewInterruptService( - void * entryID, - UInt32 serviceType, - _VSLService ** serviceID ); - static OSStatus VSLDisposeInterruptService( _VSLService * serviceID ); - static OSStatus VSLDoInterruptService( _VSLService * serviceID ); - static Boolean VSLPrepareCursorForHardwareCursor( - void * cursorRef, - IOHardwareCursorDescriptor * hwDesc, - IOHardwareCursorInfo * hwCursorInfo ); -}; - -#endif /* ! _IOKIT_IONDRVFRAMEBUFFER_H */ - - diff --git a/i386/include/IOKit/ndrvsupport/IONDRVLibraries.h b/i386/include/IOKit/ndrvsupport/IONDRVLibraries.h deleted file mode 100644 index ad4a26d..0000000 --- a/i386/include/IOKit/ndrvsupport/IONDRVLibraries.h +++ /dev/null @@ -1,696 +0,0 @@ - -#ifndef __IONDRVLIBRARIES__ -#define __IONDRVLIBRARIES__ - -#include <libkern/OSByteOrder.h> -#include <libkern/OSAtomic.h> -#include <IOKit/ndrvsupport/IOMacOSTypes.h> -#include <IOKit/graphics/IOGraphicsTypes.h> - - -#ifdef __cplusplus -extern "C" { -#endif - -/* NameRegistry error codes */ -enum { - nrLockedErr = -2536, - nrNotEnoughMemoryErr = -2537, - nrInvalidNodeErr = -2538, - nrNotFoundErr = -2539, - nrNotCreatedErr = -2540, - nrNameErr = -2541, - nrNotSlotDeviceErr = -2542, - nrDataTruncatedErr = -2543, - nrPowerErr = -2544, - nrPowerSwitchAbortErr = -2545, - nrTypeMismatchErr = -2546, - nrNotModifiedErr = -2547, - nrOverrunErr = -2548, - nrResultCodeBase = -2549, - nrPathNotFound = -2550, /* a path component lookup failed */ - nrPathBufferTooSmall = -2551, /* buffer for path is too small */ - nrInvalidEntryIterationOp = -2552, /* invalid entry iteration operation */ - nrPropertyAlreadyExists = -2553, /* property already exists */ - nrIterationDone = -2554, /* iteration operation is done */ - nrExitedIteratorScope = -2555, /* outer scope of iterator was exited */ - nrTransactionAborted = -2556, /* transaction was aborted */ - - gestaltUndefSelectorErr = -5551 /*undefined selector was passed to Gestalt*/ -}; - -enum { - kNVRAMProperty = 0x00000020, // matches NR -}; - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#ifndef _IOKIT_IOSERVICE_H -typedef struct IOService IOService; -#endif - -IOReturn _IONDRVLibrariesInitialize( IOService * provider ); -IOReturn _IONDRVLibrariesFinalize( IOService * provider ); - -#ifndef kAAPLRegEntryIDKey -#define kAAPLRegEntryIDKey "AAPL,RegEntryID" -#endif - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -UInt32 EndianSwap32Bit( UInt32 data ); - -UInt16 EndianSwap16Bit( UInt16 data ); - -void SynchronizeIO(void); - -OSErr ExpMgrConfigReadLong( - RegEntryIDPtr node, - LogicalAddress configAddr, - UInt32 * valuePtr); - -OSErr ExpMgrConfigWriteLong( - RegEntryIDPtr node, - LogicalAddress configAddr, - UInt32 value); - -OSErr ExpMgrConfigReadWord( - RegEntryIDPtr node, - LogicalAddress configAddr, - UInt16 * valuePtr); - -OSErr ExpMgrConfigWriteWord( - RegEntryIDPtr node, - LogicalAddress configAddr, - UInt16 value); - -OSErr ExpMgrConfigReadByte( - RegEntryIDPtr node, - LogicalAddress configAddr, - UInt8 * valuePtr); - -OSErr ExpMgrConfigWriteByte( - RegEntryIDPtr node, - LogicalAddress configAddr, - UInt8 value); - -OSErr ExpMgrIOReadLong( - RegEntryIDPtr node, - LogicalAddress ioAddr, - UInt32 * valuePtr); - -OSErr ExpMgrIOWriteLong( - RegEntryIDPtr node, - LogicalAddress ioAddr, - UInt32 value); - -OSErr ExpMgrIOReadWord( - RegEntryIDPtr node, - LogicalAddress ioAddr, - UInt16 * valuePtr); - -OSErr ExpMgrIOWriteWord( - RegEntryIDPtr node, - LogicalAddress ioAddr, - UInt16 value); - -OSErr ExpMgrIOReadByte( - RegEntryIDPtr node, - LogicalAddress ioAddr, - UInt8 * valuePtr); - -OSErr ExpMgrIOWriteByte( - RegEntryIDPtr node, - LogicalAddress ioAddr, - UInt8 value); - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/******************************************************************************* - * - * Foundation Types - * - */ -/* Value of a property */ -typedef void * RegPropertyValue; -/* Length of property value */ -typedef UInt32 RegPropertyValueSize; - -/*******************************************************************************/ - -/******************************************************************************* - * - * Root Entry Name Definitions (Applies to all Names in the RootNameSpace) - * - * + Names are a colon-separated list of name components. Name components - * may not themselves contain colons. - * + Names are presented as null-terminated ASCII character strings. - * + Names follow similar parsing rules to Apple file system absolute - * and relative paths. However the '::' parent directory syntax is - * not currently supported. - */ -/* Max length of Entry Name */ -enum { - kRegCStrMaxEntryNameLength = 47 -}; - -/* Entry Names are single byte ASCII */ -typedef char RegCStrEntryName; -typedef char * RegCStrEntryNamePtr; -/* length of RegCStrEntryNameBuf = kRegCStrMaxEntryNameLength+1*/ -typedef char RegCStrEntryNameBuf[48]; -typedef char RegCStrPathName; -typedef UInt32 RegPathNameSize; -enum { - kRegPathNameSeparator = ':', /* 0x3A */ - kRegEntryNameTerminator = 0x00, /* '\0' */ - kRegPathNameTerminator = 0x00 /* '\0' */ -}; - -/******************************************************************************* - * - * Property Name and ID Definitions - * (Applies to all Properties Regardless of NameSpace) - */ -enum { - kRegMaximumPropertyNameLength = 31, /* Max length of Property Name */ - kRegPropertyNameTerminator = 0x00 /* '\0' */ -}; - -typedef char RegPropertyNameBuf[32]; -typedef char RegPropertyName; -typedef char * RegPropertyNamePtr; -enum { - kRegMaxPropertyNameLength = kRegMaximumPropertyNameLength -}; - -/******************************************************************************* - * - * Iteration Operations - * - * These specify direction when traversing the name relationships - */ -typedef UInt32 RegIterationOp; -typedef RegIterationOp RegEntryIterationOp; -enum { - /* Absolute locations*/ - kRegIterRoot = 0x00000002, /* "Upward" Relationships */ - kRegIterParents = 0x00000003, /* include all parent(s) of entry */ - /* "Downward" Relationships*/ - kRegIterChildren = 0x00000004, /* include all children */ - kRegIterSubTrees = 0x00000005, /* include all sub trees of entry */ - kRegIterDescendants = 0x00000005, /* include all descendants of entry */ - /* "Horizontal" Relationships */ - kRegIterSibling = 0x00000006, /* include all siblings */ - /* Keep doing the same thing*/ - kRegIterContinue = 0x00000001 -}; - -/******************************************************************************* - * - * Name Entry and Property Modifiers - * - * - * - * Modifiers describe special characteristics of names - * and properties. Modifiers might be supported for - * some names and not others. - * - * Device Drivers should not rely on functionality - * specified as a modifier. - */ -typedef UInt32 RegModifiers; -typedef RegModifiers RegEntryModifiers; -typedef RegModifiers RegPropertyModifiers; -enum { - kRegNoModifiers = 0x00000000, /* no entry modifiers in place */ - kRegUniversalModifierMask = 0x0000FFFF, /* mods to all entries */ - kRegNameSpaceModifierMask = 0x00FF0000, /* mods to all entries within namespace */ - kRegModifierMask = (RegModifiers)0xFF000000 /* mods to just this entry */ -}; - -/* Universal Property Modifiers */ -enum { - kRegPropertyValueIsSavedToNVRAM = 0x00000020, /* property is non-volatile (saved in NVRAM) */ - kRegPropertyValueIsSavedToDisk = 0x00000040 /* property is non-volatile (saved on disk) */ -}; - -typedef size_t Size; - -#ifndef _IOKIT_IOREGISTRYENTRY_H -typedef struct IORegistryIterator IORegistryIterator; -typedef struct OSIterator OSIterator; -#endif /* _IOKIT_IOREGISTRYENTRY_H */ -typedef IORegistryIterator * RegEntryIter; -typedef OSIterator * RegPropertyIter; - -OSStatus RegistryEntryIDCopy( const RegEntryID * entryID, RegEntryID * to ); - -OSStatus RegistryEntryIDInit( RegEntryID * entryID ); - -Boolean RegistryEntryIDCompare( const RegEntryID * id1, const RegEntryID * id2); - -OSStatus RegistryPropertyGetSize( - const RegEntryID * entryID, - const RegPropertyName * propertyName, - RegPropertyValueSize * propertySize); - -OSStatus RegistryPropertyGet( - const RegEntryID * entryID, - const RegPropertyName * propertyName, - void * propertyValue, - RegPropertyValueSize * propertySize); - -OSStatus RegistryPropertyCreate( - const RegEntryID * entryID, - const RegPropertyName * propertyName, - const void * propertyValue, - RegPropertyValueSize propertySize); - -OSStatus RegistryPropertyDelete( - const RegEntryID * entryID, - const RegPropertyName * propertyName); - -OSStatus RegistryPropertySet( - const RegEntryID * entryID, - const RegPropertyName * propertyName, - const void * propertyValue, - RegPropertyValueSize propertySize); - -OSStatus RegistryPropertyGetMod( - const RegEntryID * entry, - const RegPropertyName * name, - RegPropertyModifiers * modifiers); - -OSStatus RegistryPropertySetMod( - const RegEntryID * entry, - const RegPropertyName * name, - RegPropertyModifiers modifiers); - -OSStatus RegistryPropertyIterateCreate( - const RegEntryID * entry, - RegPropertyIter * cookie); - -OSStatus RegistryPropertyIterateDispose( RegPropertyIter * cookie); - -OSStatus RegistryPropertyIterate( - RegPropertyIter * cookie, - RegPropertyName * foundProperty, - Boolean * done); - -OSStatus RegistryEntryIterateCreate( RegEntryIter * cookie); - -OSStatus RegistryEntryIterateDispose( RegEntryIter * cookie); - -OSStatus RegistryEntryIterateSet( RegEntryIter * cookie, - const RegEntryID * startEntryID); - -OSStatus RegistryEntryIterate( RegEntryIter * cookie, - RegEntryIterationOp relationship, - RegEntryID * foundEntry, - Boolean * done); - -OSStatus RegistryCStrEntryToName( const RegEntryID * entryID, - RegEntryID * parentEntry, - RegCStrEntryName * nameComponent, - Boolean * done ); - -OSStatus RegistryCStrEntryLookup( const RegEntryID * parentEntry, - const RegCStrPathName * path, - RegEntryID * newEntry); - -OSStatus RegistryCStrEntryCreate( const RegEntryID * parentEntry, - const RegCStrPathName * name, - RegEntryID * newEntry); - -OSStatus RegistryEntryDelete(const RegEntryID * entryID); - -OSStatus RegistryEntryIDDispose(RegEntryID * entryID); - -// - -OSStatus RegistryEntryCopy( - RegEntryID * parentEntryID, - RegEntryID * sourceDevice, - RegEntryID * destDevice); - -OSStatus RegistryEntrySearch( - RegEntryIter * cookie, - RegEntryIterationOp relationship, - RegEntryID * foundEntry, - Boolean * done, - const RegPropertyName * propertyName, - const void * propertyValue, - RegPropertyValueSize propertySize); - -OSStatus RegistryEntryToPathSize( - const RegEntryID * entryID, - RegPathNameSize * pathSize); - -OSStatus RegistryCStrEntryToPath( - const RegEntryID * entryID, - RegCStrPathName * pathName, - RegPathNameSize pathSize); - -OSStatus RegistryPropertyRename( - const RegEntryID * entry, - const RegPropertyName * oldName, - const RegPropertyName * newName); - -OSStatus RegistryEntryGetMod( - const RegEntryID * entry, - RegEntryModifiers * modifiers); - -OSStatus RegistryEntrySetMod( - const RegEntryID * entry, - RegEntryModifiers modifiers); - -OSStatus RegistryEntryMod( - RegEntryIter * cookie, - RegEntryIterationOp relationship, - RegEntryID * foundEntry, - Boolean * done, - RegEntryModifiers matchingModifiers); - -OSStatus RegistryEntryPropertyMod( - RegEntryIter * cookie, - RegEntryIterationOp relationship, - RegEntryID * foundEntry, - Boolean * done, - RegPropertyModifiers matchingModifiers); - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -void SynchronizeIO(void); - -Boolean CompareAndSwap( - UInt32 oldVvalue, - UInt32 newValue, - UInt32 * OldValueAdr); - -UInt32 CStrLen(const char * src); - -char * CStrCopy( char * dst, const char * src); - -SInt16 CStrCmp( - const char * s1, - const char * s2); - -char * CStrCat( - char * dst, - const char * src); -char * CStrNCopy( - char * dst, - const char * src, - UInt32 max); -SInt16 CStrNCmp( - const char * s1, - const char * s2, - UInt32 max); -char * CStrNCat( - char * dst, - const char * src, - UInt32 max); - -void BlockCopy( - const void * srcPtr, - void * destPtr, - Size byteCount); -void BlockMove( - const void * srcPtr, - void * destPtr, - Size byteCount); -void BlockMoveData( - const void * srcPtr, - void * destPtr, - Size byteCount); -void BlockMoveDataUncached( - const void * srcPtr, - void * destPtr, - Size byteCount); -void BlockMoveUncached( - const void * srcPtr, - void * destPtr, - Size byteCount); -void BlockZero( - const void * srcPtr, - Size byteCount); -void BlockZeroUncached( - const void * srcPtr, - Size byteCount); - -char * PStrCopy( char *to, const char *from ); - -void PStrToCStr( char *to, const char *from ); - -void CStrToPStr( char *to, const char *from ); - -LogicalAddress PoolAllocateResident(ByteCount byteSize, Boolean clear); - -OSStatus PoolDeallocate( LogicalAddress address ); - -UInt32 CurrentExecutionLevel(void); - -UnsignedWide UpTime( void ); - -UnsignedWide AddAbsoluteToAbsolute(UnsignedWide left, UnsignedWide right); - -UnsignedWide SubAbsoluteFromAbsolute(UnsignedWide left, UnsignedWide right); - -UnsignedWide DurationToAbsolute( Duration theDuration); - -UnsignedWide AddDurationToAbsolute( Duration duration, UnsignedWide absolute ); - -UnsignedWide NanosecondsToAbsolute ( UnsignedWide theNanoseconds); - -UnsignedWide AbsoluteToNanoseconds( UnsignedWide absolute ); - -Duration AbsoluteDeltaToDuration( UnsignedWide left, UnsignedWide right ); - -Duration AbsoluteToDuration( UnsignedWide result ); - -OSStatus DelayForHardware( UnsignedWide time ); - -OSStatus DelayUntil( UnsignedWide time ); - -OSStatus DelayFor( Duration theDuration ); - -void SysDebugStr( const char * from ); - -void SysDebug( void ); - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -enum { - paramErr = -50, /*error in user parameter list*/ - noHardwareErr = -200, /*Sound Manager Error Returns*/ - notEnoughHardwareErr = -201, /*Sound Manager Error Returns*/ - userCanceledErr = -128, - qErr = -1, /*queue element not found during deletion*/ - vTypErr = -2, /*invalid queue element*/ - corErr = -3, /*core routine number out of range*/ - unimpErr = -4, /*unimplemented core routine*/ - SlpTypeErr = -5, /*invalid queue element*/ - seNoDB = -8, /*no debugger installed to handle debugger command*/ - controlErr = -17, /*I/O System Errors*/ - statusErr = -18, /*I/O System Errors*/ - readErr = -19, /*I/O System Errors*/ - writErr = -20, /*I/O System Errors*/ - badUnitErr = -21, /*I/O System Errors*/ - unitEmptyErr = -22, /*I/O System Errors*/ - openErr = -23, /*I/O System Errors*/ - closErr = -24, /*I/O System Errors*/ - dRemovErr = -25, /*tried to remove an open driver*/ - dInstErr = -26, /*DrvrInstall couldn't find driver in resources*/ - - badCksmErr = -69, /*addr mark checksum didn't check*/ -}; -enum { - durationMicrosecond = -1, /* Microseconds are negative*/ - durationMillisecond = 1, /* Milliseconds are positive*/ - durationSecond = 1000, /* 1000 * durationMillisecond*/ - durationMinute = 60000, /* 60 * durationSecond,*/ - durationHour = 3600000, /* 60 * durationMinute,*/ - durationDay = 86400000, /* 24 * durationHour,*/ - durationNoWait = 0, /* don't block*/ - durationForever = 0x7FFFFFFF /* no time limit*/ -}; -#ifndef NULL - #if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C)) - /* Symantec C compilers (but not C++) want NULL and nil to be (void*)0 */ - #define NULL ((void *) 0) - #else - /* in case int is 16-bits, make sure NULL is 32-bits */ - #define NULL 0L - #endif -#endif - -#ifndef nil - #define nil NULL -#endif - -typedef ResType VSLGestaltType; - -enum { - clutType = 0, /*0 if lookup table*/ - fixedType = 1, /*1 if fixed table*/ - directType = 2, /*2 if direct values*/ - RGBDirect = 16 /* 16 & 32 bits/pixel pixelType value */ -}; -typedef UInt32 * UInt32Ptr; - -typedef struct IOHardwareCursorDescriptor HardwareCursorDescriptorRec; -typedef HardwareCursorDescriptorRec * HardwareCursorDescriptorPtr; -typedef struct IOHardwareCursorInfo HardwareCursorInfoRec; -typedef HardwareCursorInfoRec * HardwareCursorInfoPtr; - -typedef ResType InterruptServiceType; -typedef struct _VSLService * InterruptServiceIDType; -typedef InterruptServiceIDType * InterruptServiceIDPtr; - -enum { - kVBLInterruptServiceType = 'vbl ', - kHBLInterruptServiceType = 'hbl ', - kFrameInterruptServiceType = 'fram', - kConnectInterruptServiceType = 'dci ', /* Renamed -- Use kFBCheckInterruptServiceType*/ - kFBConnectInterruptServiceType = kConnectInterruptServiceType, /* Demand to check configuration (Hardware unchanged)*/ - kFBChangedInterruptServiceType = 'chng', /* Demand to rebuild (Hardware has reinitialized on dependent change)*/ - kFBOfflineInterruptServiceType = 'remv', /* Demand to remove framebuffer (Hardware not available on dependent change -- but must not buserror)*/ - kFBOnlineInterruptServiceType = 'add ' /* Notice that hardware is available (after being removed)*/ -}; - -enum { - kVSLClamshellStateGestaltType = 'clam', -}; - -OSStatus -VSLGestalt( VSLGestaltType selector, UInt32 * response ); - -OSStatus -VSLSetDisplayConfiguration(RegEntryID * entryID, - RegPropertyName * propertyName, - RegPropertyValue configData, - RegPropertyValueSize configDataSize); -OSErr -VSLNewInterruptService( - RegEntryID * serviceDevice, - InterruptServiceType serviceType, - InterruptServiceIDPtr serviceID); - -OSErr -VSLWaitOnInterruptService( - InterruptServiceIDType serviceID, - Duration timeout); - -OSErr -VSLDisposeInterruptService(InterruptServiceIDType serviceID); - -OSErr -VSLDoInterruptService(InterruptServiceIDType serviceID); - -Boolean -VSLPrepareCursorForHardwareCursor( - void * cursorRef, - IOHardwareCursorDescriptor * hardwareDescriptor, - IOHardwareCursorInfo * hwCursorInfo); - -typedef UnsignedWide Nanoseconds; -enum { - /* Version Release Stage Codes */ - developStage = 0x20, - alphaStage = 0x40, - betaStage = 0x60, - finalStage = 0x80 -}; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -typedef struct OpaqueIOCommandID* IOCommandID; - -typedef UInt32 IOCommandKind; -typedef UInt32 IOCommandCode; - -OSErr IOCommandIsComplete( IOCommandID commandID, OSErr result); - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#ifndef __IONDRV__ -typedef struct OpaqueInterruptSetID* InterruptSetID; -#else -typedef class IONDRVInterruptSet * InterruptSetID; -#endif /* __IONDRV__ */ - -typedef long InterruptMemberNumber; -struct InterruptSetMember { - InterruptSetID setID; - InterruptMemberNumber member; -}; -typedef struct InterruptSetMember InterruptSetMember; -enum { - kISTChipInterruptSource = 0, - kISTOutputDMAInterruptSource = 1, - kISTInputDMAInterruptSource = 2, - kISTPropertyMemberCount = 3 -}; - -typedef InterruptSetMember ISTProperty[3]; -#define kISTPropertyName "driver-ist" - -typedef long InterruptReturnValue; -enum { - kFirstMemberNumber = 1, - kIsrIsComplete = 0, - kIsrIsNotComplete = -1, - kMemberNumberParent = -2 -}; - -typedef Boolean InterruptSourceState; -enum { - kSourceWasEnabled = true, - kSourceWasDisabled = false -}; - -typedef InterruptMemberNumber (*InterruptHandler) (InterruptSetMember ISTmember, void *refCon, UInt32 theIntCount); -typedef void (*InterruptEnabler) (InterruptSetMember ISTmember, void *refCon); -typedef InterruptSourceState (*InterruptDisabler)(InterruptSetMember ISTmember, void *refCon); - -enum { - kReturnToParentWhenComplete = 0x00000001, - kReturnToParentWhenNotComplete = 0x00000002 -}; - -typedef OptionBits InterruptSetOptions; - - -OSStatus GetInterruptFunctions( - InterruptSetID setID, - InterruptMemberNumber member, - void ** refCon, - InterruptHandler * handlerFunction, - InterruptEnabler * enableFunction, - InterruptDisabler * disableFunction); - -OSStatus InstallInterruptFunctions( - InterruptSetID setID, - InterruptMemberNumber member, - void * refCon, - InterruptHandler handlerFunction, - InterruptEnabler enableFunction, - InterruptDisabler disableFunction); - -OSStatus CreateInterruptSet( - InterruptSetID parentSet, - InterruptMemberNumber parentMember, - InterruptMemberNumber setSize, - InterruptSetID * setID, - InterruptSetOptions options); - -OSStatus DeleteInterruptSet( InterruptSetID setID ); - - -#ifdef __cplusplus -} -#endif - -#endif /* __IONDRVLIBRARIES__ */ - diff --git a/i386/include/IOKit/ndrvsupport/IONDRVSupport.h b/i386/include/IOKit/ndrvsupport/IONDRVSupport.h deleted file mode 100644 index 2fdfcb6..0000000 --- a/i386/include/IOKit/ndrvsupport/IONDRVSupport.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __IONDRVSUPPORT__ -#define __IONDRVSUPPORT__ - -#include <libkern/OSTypes.h> - -#ifndef __LP64__ -#pragma options align=mac68k -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#define kIONDRVIgnoreKey "AAPL,iokit-ignore-ndrv" -#define kIONDRVForXKey "AAPL,iokit-ndrv" - -struct IOTVector { - void * pc; - UInt32 toc; -}; -typedef struct IOTVector IOTVector; - -struct IONDRVInterruptSetMember { - void * setID; - UInt32 member; -}; -typedef struct IONDRVInterruptSetMember IONDRVInterruptSetMember; - -typedef SInt32 (*IONDRVInterruptHandler)( IONDRVInterruptSetMember setMember, void *refCon, UInt32 theIntCount); -typedef void (*IONDRVInterruptEnabler)( IONDRVInterruptSetMember setMember, void *refCon); -typedef Boolean (*IONDRVInterruptDisabler)( IONDRVInterruptSetMember setMember, void *refCon); - -enum { - kIONDRVFirstMemberNumber = 1, - kIONDRVIsrIsComplete = 0, - kIONDRVIsrIsNotComplete = -1, - kIONDRVMemberNumberParent = -2 -}; - -enum { - kIONDRVReturnToParentWhenComplete = 0x00000001, - kIONDRVReturnToParentWhenNotComplete = 0x00000002 -}; - -enum { - kIONDRVISTChipInterruptSource = 0, - kIONDRVISTOutputDMAInterruptSource = 1, - kIONDRVISTInputDMAInterruptSource = 2, - kIONDRVISTPropertyMemberCount = 3 -}; - -#define kIONDRVISTPropertyName "driver-ist" - -IOReturn -IONDRVInstallInterruptFunctions(void * setID, - UInt32 member, - void * refCon, - IOTVector * handler, - IOTVector * enabler, - IOTVector * disabler ); - -typedef const IOTVector * (*IONDRVUndefinedSymbolHandler)( void * self, - const char * libraryName, const char * symbolName ); - -#ifndef __LP64__ -#pragma options align=reset -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __IONDRVSUPPORT__ */ diff --git a/i386/include/IOKit/network/IOBasicOutputQueue.h b/i386/include/IOKit/network/IOBasicOutputQueue.h deleted file mode 100644 index 3519805..0000000 --- a/i386/include/IOKit/network/IOBasicOutputQueue.h +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOBASICOUTPUTQUEUE_H -#define _IOBASICOUTPUTQUEUE_H - -#include <IOKit/IOLocks.h> -#include <IOKit/network/IOOutputQueue.h> -#include <IOKit/network/IOPacketQueue.h> // FIXME - remove - -struct IOMbufQueue; - -/*! @class IOBasicOutputQueue - @abstract A concrete implementation of an IOOutputQueue. - @discussion This object uses a spinlock to protect the packet queue from multiple producers. - A single producer is promoted to become a consumer when the queue is - not active. Otherwise, the producer will simply queue the packet and - return without blocking. - - The flow of packets from the queue to its target can be controlled - by calling methods such as start(), stop(), or service(). The target - is expected to call those methods from a single threaded context, - i.e. the work loop context in a network driver. In addition, the - target must also return a status for every packet delivered by the - consumer thread. This return value is the only mechanism that the - target can use to manage the queue when it is running on the - consumer thread. -*/ - -class IOBasicOutputQueue : public IOOutputQueue -{ - OSDeclareDefaultStructors( IOBasicOutputQueue ) - -private: - static IOReturn dispatchNetworkDataNotification(void * target, - void * param, - IONetworkData * data, - UInt32 type); - - void dequeue(); - -protected: - OSObject * _target; - IOOutputAction _action; - IOOutputQueueStats * _stats; - IONetworkData * _statsData; - IOSimpleLock * _spinlock; - IOMbufQueue * _inQueue; - IOMbufQueue * _queues[2]; - volatile bool _waitDequeueDone; - volatile UInt32 _state; - volatile UInt32 _serviceCount; - -/*! @function serviceThread - @abstract Provides an implementation for the serviceThread() method - defined in IOOutputQueue. - @discussion This method is called by the scheduled service thread when it - starts to run. The service thread is scheduled by service() - to restart a stalled queue when the kServiceAsync option is given. - @param param A parameter that was given to scheduleServiceThread(). - This parameter is not used. -*/ - - virtual void serviceThread(void * param); - -/*! @function output - @abstract Transfers all packets in the mbuf queue to the target. - @param queue A queue of output packets. - @param state Returns a state bit defined by IOBasicOutputQueue that - declares the new state of the queue following this method call. - A kStateStalled is returned if the queue should stall, otherwise 0 - is returned. -*/ - - virtual void output(IOMbufQueue * queue, UInt32 * state); - -/*! @function free - @abstract Frees the IOBasicOutputQueue object. - @discussion This function releases allocated resources, then call super::free(). -*/ - - virtual void free(); - -/*! @function handleNetworkDataAccess - @abstract Handles an external access to the IONetworkData object - returned by getStatisticsData(). - @param data The IONetworkData object being accessed. - @param type Description of the type of access being performed. - @param param An optional parameter for the handler. - @result Returns kIOReturnSuccess on success, or an error code otherwise. -*/ - - virtual IOReturn handleNetworkDataAccess(IONetworkData * data, - UInt32 type, - void * param); - -public: - -/*! @function init - @abstract Initializes an IOBasicOutputQueue object. - @param target The object that will handle packets removed from the - queue, which is usually a subclass of IONetworkController. - @param action The function that will handle packets removed from the - queue. - @param capacity The initial capacity of the output queue. - @result Returns true if initialized successfully, false otherwise. -*/ - - virtual bool init(OSObject * target, - IOOutputAction action, - UInt32 capacity = 0); - -/*! @function withTarget - @abstract Factory method that constructs and initializes an - IOBasicOutputQueue object. - @param target An IONetworkController object that will handle packets - removed from the queue. - @param capacity The initial capacity of the output queue. - @result Returns an IOBasicOutputQueue object on success, or 0 otherwise. -*/ - - static IOBasicOutputQueue * withTarget(IONetworkController * target, - UInt32 capacity = 0); - -/*! @function withTarget - @abstract Factory method that constructs and initializes an - IOBasicOutputQueue object. - @param target The object that will handle packets removed from the - queue. - @param action The function that will handle packets removed from the - queue. - @param capacity The initial capacity of the output queue. - @result Returns an IOBasicOutputQueue object on success, or 0 otherwise. -*/ - - static IOBasicOutputQueue * withTarget(OSObject * target, - IOOutputAction action, - UInt32 capacity = 0); - -/*! @function enqueue - @abstract Adds a packet, or a chain of packets, - to the queue. - @discussion This method is called by a client to add a packet, or a chain of packets, - to the queue. A packet is described by an mbuf chain, while a chain - of packets is constructed by linking multiple mbuf chains via the - m_nextpkt field. This method can be called by multiple client - threads. - @param m A single packet, or a chain of packets. - @param param A parameter provided by the caller. - @result Always returns 0. -*/ - - virtual UInt32 enqueue(mbuf_t m, void * param); - -/*! @function start - @abstract Starts up the packet flow between the queue and its target. - @discussion Called by the target to start the queue. This will allow - packets to be removed from the queue, and then delivered to the target. - @result Returns true if the queue was started successfully, false otherwise. */ - - virtual bool start(); - -/*! @function stop - @abstract Stops the packet flow between the queue and its target. - @discussion This method stops the queue and prevents it from sending packets to its - target. This call is synchronous and it may block. After this method - returns, the queue will no longer call the registered target/action, - even as new packets are added to the queue. The queue will continue to - absorb new packets until the size of the queue reaches its capacity. - The registered action must never call stop(), or a deadlock will occur. - @result Returns the previous running state of the queue, - true if the queue was running, false if the queue was already stopped. -*/ - - virtual bool stop(); - -/*! @enum ServiceAsync - @abstract The option bits recognized by service(). - @constant kServiceAsync Set this option to service the queue in - an asynchronous manner. The service() call will not block, but a - scheduling latency will be introduced before the queue is serviced. -*/ - - enum { - kServiceAsync = 0x1 - }; - -/*! @function service - @abstract Services a queue that was stalled by the target. - @discussion A target that stalls the queue must call service() when - it becomes ready to accept more packets. Calling this method when the - queue is not stalled is harmless. - @result Returns true if the queue was stalled and there were packets sitting in - the queue awaiting delivery, false otherwise. -*/ - - virtual bool service(IOOptionBits options = 0); - -/*! @function flush - @abstract Drops and frees all packets currently held by the queue. - @discussion To ensure that all packets are removed from the queue, - stop() should be called prior to flush(), to make sure there are - no packets in-flight and being delivered to the target. - @result Returns the number of packets that were dropped and freed. -*/ - - virtual UInt32 flush(); - -/*! @function setCapacity - @abstract Changes the number of packets that the queue can hold - before it begins to drop excess packets. - @param capacity The new desired capacity. - @result Returns true if the new capacity was accepted, false otherwise. -*/ - - virtual bool setCapacity(UInt32 capacity); - -/*! @function getCapacity - @abstract Gets the number of packets that the queue can hold. - @discussion The queue will begin to drop incoming packets when the - size of the queue reaches its capacity. - @result Returns the current queue capacity. -*/ - - virtual UInt32 getCapacity() const; - -/*! @function getSize - @abstract Gets the number of packets currently held in the queue. - @result Returns the size of the queue. -*/ - - virtual UInt32 getSize() const; - -/*! @function getDropCount - @abstract Gets the number of packets dropped by the queue. - @result Returns the number of packets dropped due to over-capacity, or by - external calls to the flush() method. -*/ - - virtual UInt32 getDropCount(); - -/*! @function getOutputCount - @abstract Gets the number of packets accepted by the target. - @result Returns the number of times that kIOOutputStatusAccepted is returned by - the target. -*/ - - virtual UInt32 getOutputCount(); - -/*! @function getRetryCount - @abstract Gets the number of instances when the target has refused to - accept the packet provided. - @result Returns the number of times that kIOOutputStatusRetry is returned by the - target. -*/ - - virtual UInt32 getRetryCount(); - -/*! @function getStallCount - @abstract Gets the number of instances when the target has stalled the - queue. - @result Returns the number of times that kIOOutputCommandStall is returned by the - target. -*/ - - virtual UInt32 getStallCount(); - -/*! @enum GetStateBits - @abstract The bits in the value returned by getState(). - @constant kStateRunning Set when the queue is running. Calling start() - and stop() will set or clear this bit. - @constant kStateStalled Set when the queue is stalled by the target. - @constant kStateActive Set when a consumer thread is actively removing - packets from the queue and passing them to the target. -*/ - - enum { - kStateRunning = 0x1, - kStateOutputStalled = 0x2, - kStateOutputActive = 0x4, - kStateOutputServiceMask = 0xff00 - }; - -/*! @function getState - @abstract Gets the state of the queue object. - @result Returns the current state of the queue object. -*/ - - virtual UInt32 getState() const; - -/*! @function getStatisticsData - @abstract Returns an IONetworkData object containing statistics counters - updated by the queue. - @result Returns an IONetworkData object. -*/ - - virtual IONetworkData * getStatisticsData() const; -}; - -#endif /* !_IOBASICOUTPUTQUEUE_H */ diff --git a/i386/include/IOKit/network/IOEthernetController.h b/i386/include/IOKit/network/IOEthernetController.h deleted file mode 100644 index c2f85e7..0000000 --- a/i386/include/IOKit/network/IOEthernetController.h +++ /dev/null @@ -1,502 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOETHERNETCONTROLLER_H -#define _IOETHERNETCONTROLLER_H - -#include <IOKit/network/IONetworkController.h> - -/*! @defined kIOEthernetControllerClass - @abstract kIOEthernetControllerClass is the name of the - IOEthernetController class. */ - -#define kIOEthernetControllerClass "IOEthernetController" - -/*! @defined kIOEthernetAddressSize - @abstract The number of bytes in an Ethernet hardware address. */ - -#define kIOEthernetAddressSize 6 - -/*! @defined kIOEthernetMaxPacketSize - @abstract The maximum size of an Ethernet packet, including - the FCS bytes. */ - -#define kIOEthernetMaxPacketSize 1518 - -/*! @defined kIOEthernetMinPacketSize - @abstract The minimum size of an Ethernet packet, including - the FCS bytes. */ - -#define kIOEthernetMinPacketSize 64 - -/*! @defined kIOEthernetCRCSize - @abstract The size in bytes of the 32-bit CRC value appended - to the end of each Ethernet frame. */ - -#define kIOEthernetCRCSize 4 - -/*! @defined kIOEthernetWakeOnLANFilterGroup - @abstract kIOEthernetWakeOnLANFilterGroup describes the name assigned - to the Ethernet Wake-On-LAN filter group. This group represents - wake filters that are supported by the controller. */ - -#define kIOEthernetWakeOnLANFilterGroup "IOEthernetWakeOnLANFilterGroup" - -/*! @defined kIOEthernetDisabledWakeOnLANFilterGroup - @abstract kIOEthernetDisabledWakeOnLANFilterGroup describes the name - assigned to the disabled Ethernet Wake-On-LAN filter group. This - group represents wake filters that are currently disabled. - Membership in this group is dynamic. */ - -#define kIOEthernetDisabledWakeOnLANFilterGroup \ - "IOEthernetDisabledWakeOnLANFilterGroup" - -/*! @enum WakeOnLANFilters. - @abstract All filters in the Wake-on-LAN filter group. - @discussion Each filter listed will respond to a network event that - will trigger a system wake-up. - @constant kIOEthernetWakeOnMagicPacket Reception of a Magic Packet. - @constant kIOEthernetWakeOnPacketAddressMatch Reception of a packet - which passes through any of the address filtering mechanisms based - on its destination Ethernet address. This may include unicast, - broadcast, or multicast addresses depending on the current state - and setting of the corresponding packet filters. */ - -enum { - kIOEthernetWakeOnMagicPacket = 0x00000001, - kIOEthernetWakeOnPacketAddressMatch = 0x00000002 -}; - -/* - * Kernel - */ -#if defined(KERNEL) && defined(__cplusplus) - -struct IOEthernetAddress { - UInt8 bytes[kIOEthernetAddressSize]; -}; - -/*! @const gIOEthernetWakeOnLANFilterGroup - @discussion gIOEthernetWakeOnLANFilterGroup is an OSSymbol object - that contains the name of the Ethernet Wake-on-LAN filter group - defined by kIOEthernetWakeOnLANFilterGroup. */ - -extern const OSSymbol * gIOEthernetWakeOnLANFilterGroup; - -/*! @const gIOEthernetDisabledWakeOnLANFilterGroup - @discussion gIOEthernetDisabledWakeOnLANFilterGroup is an OSSymbol object - that contains the name of the disabled Ethernet Wake-on-LAN filter group - defined by kIOEthernetDisabledWakeOnLANFilterGroup. */ - -extern const OSSymbol * gIOEthernetDisabledWakeOnLANFilterGroup; - -/*! @class IOEthernetController - @abstract Abstract superclass for Ethernet controllers. - @discussion Ethernet controller drivers should subclass IOEthernetController, and implement - or override the hardware specific methods to create an Ethernet driver. - An interface object (an IOEthernetInterface instance) must be - instantiated by the driver, through attachInterface(), to connect - the controller driver to the data link layer. -*/ - -class IOEthernetController : public IONetworkController -{ - OSDeclareAbstractStructors( IOEthernetController ) - -protected: - struct ExpansionData { }; - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * _reserved; - - -public: - -/*! @function initialize - @abstract IOEthernetController class initializer. - @discussion Creates global OSSymbol objects that are used as keys. */ - - static void initialize(); - -/*! @function init - @abstract Initializes an IOEthernetController object. - @param properties A dictionary object containing a property table - associated with this instance. - @result Returns true on success, false otherwise. -*/ - - virtual bool init(OSDictionary * properties); - -/*! @function getPacketFilters - @abstract Gets the set of packet filters supported by the Ethernet - controller in the given filter group. - @discussion The default implementation of the abstract method inherited - from IONetworkController. When the filter group specified is - gIONetworkFilterGroup, then this method will return a value formed by - a bitwise OR of kIOPacketFilterUnicast, kIOPacketFilterBroadcast, - kIOPacketFilterMulticast, kIOPacketFilterPromiscuous. Otherwise, the - return value will be set to zero (0). Subclasses must override this - method if their filtering capability differs from what is reported by - this default implementation. This method is called from the workloop - context, and the result is published to the I/O Kit Registry. - @param group The name of the filter group. - @param filters Pointer to the mask of supported filters returned by - this method. - @result Returns kIOReturnSuccess. Drivers that override this - method must return kIOReturnSuccess to indicate success, or an error - return code otherwise. -*/ - - virtual IOReturn getPacketFilters(const OSSymbol * group, - UInt32 * filters) const; - -/*! @function enablePacketFilter - @abstract Enables one of the supported packet filters from the - given filter group. - @discussion The default implementation of the abstract method inherited - from IONetworkController. This method will call setMulticastMode() or - setPromiscuousMode() when the multicast or the promiscuous filter is to be - enabled. Requests to disable the Unicast or Broadcast filters are handled - silently, without informing the subclass. Subclasses can override this - method to change this default behavior, or to extend it to handle - additional filter types or filter groups. This method call is synchronized - by the workloop's gate. - @param group The name of the filter group containing the filter to be - enabled. - @param aFilter The filter to enable. - @param enabledFilters All filters currently enabled by the client. - @param options Optional flags for the enable request. - @result Returns the value returned by setMulticastMode() or setPromiscuousMode() if - either of those two methods are called. Returns kIOReturnSuccess if the filter - specified is kIOPacketFilterUnicast or kIOPacketFilterBroadcast. - Returns kIOReturnUnsupported if the filter group specified is not - gIONetworkFilterGroup. -*/ - - virtual IOReturn enablePacketFilter(const OSSymbol * group, - UInt32 aFilter, - UInt32 enabledFilters, - IOOptionBits options = 0); - -/*! @function disablePacketFilter - @abstract Disables a packet filter that is currently enabled from the - given filter group. - @discussion The default implementation of the abstract method inherited - from IONetworkController. This method will call setMulticastMode() or - setPromiscuousMode() when the multicast or the promiscuous filter is to be - disabled. Requests to disable the Unicast or Broadcast filters are handled - silently, without informing the subclass. Subclasses can override this - method to change this default behavior, or to extend it to handle - additional filter types or filter groups. This method call is synchronized - by the workloop's gate. - @param group The name of the filter group containing the filter to be - disabled. - @param aFilter The filter to disable. - @param enabledFilters All filters currently enabled by the client. - @param options Optional flags for the disable request. - @result Returns the value returned by setMulticastMode() or setPromiscuousMode() if - either of those two methods are called. Returns kIOReturnSuccess if the filter - specified is kIOPacketFilterUnicast or kIOPacketFilterBroadcast. - Returns kIOReturnUnsupported if the filter group specified is not - gIONetworkFilterGroup. -*/ - - virtual IOReturn disablePacketFilter(const OSSymbol * group, - UInt32 aFilter, - UInt32 enabledFilters, - IOOptionBits options = 0); - -/*! @function getHardwareAddress - @abstract Gets the Ethernet controller's station address. - @discussion The default implementation of the abstract method inherited - from IONetworkController. This method will call the overloaded form - IOEthernetController::getHardwareAddress() that subclasses are expected - to override. - @param addr The buffer where the controller's hardware address should - be written. - @param inOutAddrBytes The size of the address buffer provided by the - client, and replaced by this method with the actual size of - the hardware address in bytes. - @result Returns kIOReturnSuccess on success, or an error otherwise. -*/ - - virtual IOReturn getHardwareAddress(void * addr, - UInt32 * inOutAddrBytes); - -/*! @function setHardwareAddress - @abstract Sets or changes the station address used by the Ethernet - controller. - @discussion The default implementation of the abstract method inherited - from IONetworkController. This method will call the overloaded form - IOEthernetController::setHardwareAddress() that subclasses are expected - to override. - @param addr The buffer containing the hardware address provided by - the client. - @param addrBytes The size of the address buffer provided by the - client in bytes. - @result Returns kIOReturnSuccess on success, or an error otherwise. -*/ - - virtual IOReturn setHardwareAddress(const void * addr, - UInt32 addrBytes); - -/*! @function getMaxPacketSize - @abstract Gets the maximum packet size supported by the Ethernet - controller, including the frame header and FCS. - @param maxSize Pointer to the return value. - @result Returns kIOReturnSuccess on success, or an error code otherwise. -*/ - - virtual IOReturn getMaxPacketSize(UInt32 * maxSize) const; - -/*! @function getMinPacketSize - @abstract Gets the minimum packet size supported by the Ethernet - controller, including the frame header and FCS. - @param minSize Pointer to the return value. - @result Returns kIOReturnSuccess on success, or an error code otherwise. -*/ - - virtual IOReturn getMinPacketSize(UInt32 * minSize) const; - -/*! @function getPacketFilters - @abstract Gets the set of packet filters supported by the Ethernet - controller in the network filter group. - @param filters Pointer to the return value containing a mask of - supported filters. - @result Returns kIOReturnSuccess. Drivers that override this - method must return kIOReturnSuccess to indicate success, or an error - return code otherwise. -*/ - - virtual IOReturn getPacketFilters(UInt32 * filters) const; - -/*! @function getHardwareAddress - @abstract Gets the Ethernet controller's permanent station address. - @discussion Ethernet drivers must implement this method, by reading the - address from hardware and writing it to the buffer provided. This method - is called from the workloop context. - @param addrP Pointer to an IOEthernetAddress where the hardware address - should be returned. - @result Returns kIOReturnSuccess on success, or an error return code otherwise. -*/ - - virtual IOReturn getHardwareAddress(IOEthernetAddress * addrP) = 0; - -/*! @function setHardwareAddress - @abstract Sets or changes the station address used by the Ethernet - controller. - @discussion This method is called in response to a client command to - change the station address used by the Ethernet controller. Implementation - of this method is optional. This method is called from the workloop context. - @param addrP Pointer to an IOEthernetAddress containing the new station - address. - @result The default implementation will always return kIOReturnUnsupported. - If overridden, drivers must return kIOReturnSuccess on success, or an error - return code otherwise. -*/ - - virtual IOReturn setHardwareAddress(const IOEthernetAddress * addrP); - -/*! @function setMulticastMode - @abstract Enables or disables multicast mode. - @discussion Called by enablePacketFilter() or disablePacketFilter() - when there is a change in the activation state of the multicast filter - identified by kIOPacketFilterMulticast. This method is called from the - workloop context. - @param active True to enable multicast mode, false to disable it. - @result Returns kIOReturnUnsupported. If overridden, drivers must return - kIOReturnSuccess on success, or an error return code otherwise. -*/ - - virtual IOReturn setMulticastMode(bool active); - -/*! @function setMulticastList - @abstract Sets the list of multicast addresses a multicast filter - should use to match against the destination address of an incoming frame. - @discussion This method sets the list of multicast addresses that the multicast filter - should use to match against the destination address of an incoming frame. - The frame should be accepted when a match occurs. Called when the multicast group membership of an interface - object is changed. Drivers that support kIOPacketFilterMulticast should - override this method and update the hardware multicast filter using the - list of Ethernet addresses provided. Perfect multicast filtering is - preferred if supported by the hardware, in order to reduce the number of - unwanted packets received. If the number of multicast addresses in the - list exceeds what the hardware is capable of supporting, or if perfect - filtering is not supported, then ideally the hardware should be programmed - to perform imperfect filtering, through some form of hash filtering - mechanism. Only as a last resort should the driver enable reception of - all multicast packets to satisfy this request. This method is called - from the workloop context, and only if the driver reports - kIOPacketFilterMulticast support in getPacketFilters(). - @param addrs An array of Ethernet addresses. This argument must be - ignored if the count argument is 0. - @param count The number of Ethernet addresses in the list. This value - will be zero when the list becomes empty. - @result Returns kIOReturnUnsupported. Drivers must return kIOReturnSuccess to - indicate success, or an error return code otherwise. -*/ - - virtual IOReturn setMulticastList(IOEthernetAddress * addrs, - UInt32 count); - -/*! @function setPromiscuousMode - @abstract Enables or disables promiscuous mode. - @discussion Called by enablePacketFilter() or disablePacketFilter() - when there is a change in the activation state of the promiscuous - filter identified by kIOPacketFilterPromiscuous. This method is - called from the workloop context. - @param active True to enable promiscuous mode, false to disable it. - @result Returns kIOReturnUnsupported. If overridden, drivers must return - kIOReturnSuccess on success, or an error return code otherwise. -*/ - - virtual IOReturn setPromiscuousMode(bool active); - -/*! @function setWakeOnMagicPacket - @abstract Enables or disables the wake on Magic Packet support. - @discussion Called by enablePacketFilter() or disablePacketFilter() - when there is a change in the activation state of the Wake-on-LAN - filter identified by kIOEthernetWakeOnMagicPacket. This method is - called from the workloop context. - @param active True to enable support for system wake on reception - of a Magic Packet, false to disable it. - @result Returns kIOReturnUnsupported. If overridden, drivers must return - kIOReturnSuccess on success, or an error return code otherwise. -*/ - - virtual IOReturn setWakeOnMagicPacket(bool active); - -protected: - -/*! @function createInterface - @abstract Creates an IOEthernetInterface object. - @discussion This method allocates and returns a new IOEthernetInterface instance. - A subclass of IONetworkController must implement this method and return - a matching interface object. The implementation in IOEthernetController - will return an IOEthernetInterface object. Subclasses of - IOEthernetController, such as Ethernet controller drivers, will have - little reason to override this implementation. - @result Returns a newly allocated and initialized IOEthernetInterface object. -*/ - - virtual IONetworkInterface * createInterface(); - -/*! @function free - @abstract Frees the IOEthernetController instance. - @discussion This method releases resources, and is - then followed by a call to super::free(). */ - - virtual void free(); - -/*! @function publishProperties - @abstract Publishes Ethernet controller properties and capabilities. - @discussion This method publishes Ethernet controller properties to the property - table. For instance, getHardwareAddress() is called to fetch the - hardware address, and the address is then published to the property - table. This method call is synchronized by the workloop's gate, - and must never be called directly by subclasses. - @result Returns true if all properties and capabilities were discovered, - and published successfully, false otherwise. Returning false will - prevent client objects from attaching to the Ethernet controller - since a property that a client relies upon may be missing. -*/ - - virtual bool publishProperties(); - - /*! @function getVlanTagDemand - @abstract Fetch the demand for hardware vlan tag stuffing - for the given packet before it is transmitted on the network. - @discussion A network controller that can insert 802.1Q vlan tags for output - packets must call this method to obtain vlan tag information that it must - insert into the given output packet. - @param packet A mbuf containing a packet that may require vlan tag stuffing. - @param vlanTag After calling, the low order 16 bits contain the 802.1Q priority and - vlan ID tag in host order. The hi-order 16 bits are currently unused and should be ignored. - @result true if vlanTag has been set and should be used. - false if no vlan tag stuffing is required for this packet. */ - - OSMetaClassDeclareReservedUsed( IOEthernetController, 0); - virtual bool getVlanTagDemand(mbuf_t m, UInt32 *vlanTag); - - /*! @function setVlanTag - @abstract Encode a received packet with the vlan tag result reported - by the hardware. - @discussion A network controller that can strip 802.1Q vlan tag information for a - received packet should call this method to encode the result on the - packet, before passing it up towards the protocol stacks. - @param packet A mbuf containing a packet that has had its 802.1q vlan tag stripped by - the hardware. - @param vlanTag A value in host order that contains the 802.1q vlan tag and priority - in the low order 16 bits. The hi order word is currently unused and should be set to 0. */ - - OSMetaClassDeclareReservedUsed( IOEthernetController, 1); - virtual void setVlanTag(mbuf_t m, UInt32 vlanTag); - - // Virtual function padding - OSMetaClassDeclareReservedUnused( IOEthernetController, 2); - OSMetaClassDeclareReservedUnused( IOEthernetController, 3); - OSMetaClassDeclareReservedUnused( IOEthernetController, 4); - OSMetaClassDeclareReservedUnused( IOEthernetController, 5); - OSMetaClassDeclareReservedUnused( IOEthernetController, 6); - OSMetaClassDeclareReservedUnused( IOEthernetController, 7); - OSMetaClassDeclareReservedUnused( IOEthernetController, 8); - OSMetaClassDeclareReservedUnused( IOEthernetController, 9); - OSMetaClassDeclareReservedUnused( IOEthernetController, 10); - OSMetaClassDeclareReservedUnused( IOEthernetController, 11); - OSMetaClassDeclareReservedUnused( IOEthernetController, 12); - OSMetaClassDeclareReservedUnused( IOEthernetController, 13); - OSMetaClassDeclareReservedUnused( IOEthernetController, 14); - OSMetaClassDeclareReservedUnused( IOEthernetController, 15); - OSMetaClassDeclareReservedUnused( IOEthernetController, 16); - OSMetaClassDeclareReservedUnused( IOEthernetController, 17); - OSMetaClassDeclareReservedUnused( IOEthernetController, 18); - OSMetaClassDeclareReservedUnused( IOEthernetController, 19); - OSMetaClassDeclareReservedUnused( IOEthernetController, 20); - OSMetaClassDeclareReservedUnused( IOEthernetController, 21); - OSMetaClassDeclareReservedUnused( IOEthernetController, 22); - OSMetaClassDeclareReservedUnused( IOEthernetController, 23); - OSMetaClassDeclareReservedUnused( IOEthernetController, 24); - OSMetaClassDeclareReservedUnused( IOEthernetController, 25); - OSMetaClassDeclareReservedUnused( IOEthernetController, 26); - OSMetaClassDeclareReservedUnused( IOEthernetController, 27); - OSMetaClassDeclareReservedUnused( IOEthernetController, 28); - OSMetaClassDeclareReservedUnused( IOEthernetController, 29); - OSMetaClassDeclareReservedUnused( IOEthernetController, 30); - OSMetaClassDeclareReservedUnused( IOEthernetController, 31); -}; - -/* - * FIXME: remove this. - */ -enum { - kIOEnetPromiscuousModeOff = false, - kIOEnetPromiscuousModeOn = true, - kIOEnetPromiscuousModeAll = true, - kIOEnetMulticastModeOff = false, - kIOEnetMulticastModeFilter = true -}; -typedef bool IOEnetPromiscuousMode; -typedef bool IOEnetMulticastMode; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* !_IOETHERNETCONTROLLER_H */ diff --git a/i386/include/IOKit/network/IOEthernetInterface.h b/i386/include/IOKit/network/IOEthernetInterface.h deleted file mode 100644 index 96c7d95..0000000 --- a/i386/include/IOKit/network/IOEthernetInterface.h +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOETHERNETINTERFACE_H -#define _IOETHERNETINTERFACE_H - -/*! @defined kIOEthernetInterfaceClass - @abstract The name of the - IOEthernetInterface class. -*/ - -#define kIOEthernetInterfaceClass "IOEthernetInterface" - -/*! @defined kIOActivePacketFilters - @abstract A property of IOEthernetInterface objects. - @discussion The kIOActivePacketFilters property has an OSDictionary value that describes the current - set of packet filters that have been successfully activated. Each - entry in the dictionary is a key/value pair consisting of the filter - group name, and an OSNumber describing the set of active filters for - that group. Entries in this dictionary will mirror those in - kIORequiredPacketFilters if the controller has reported success for - all filter change requests from the IOEthernetInterface object. -*/ - -#define kIOActivePacketFilters "IOActivePacketFilters" - -/*! @defined kIORequiredPacketFilters - @abstract A property of IOEthernetInterface objects. - @discussion The kIORequiredPacketFilters property has an OSDictionary value that describes the current - set of required packet filters. Each entry in the dictionary is a - key/value pair consisting of the filter group name, and an OSNumber - describing the set of required filters for that group. -*/ - -#define kIORequiredPacketFilters "IORequiredPacketFilters" - -/*! @defined kIOMulticastAddressList - @abstract A property of IOEthernetInterface objects. - @discussion The kIOMulticastAddressList property is an OSData object that describes the - list of multicast addresses that are being used by the - controller to match against the destination address of an - incoming frame. -*/ - -#define kIOMulticastAddressList "IOMulticastAddressList" -#define kIOMulticastFilterData kIOMulticastAddressList - -/* - * Kernel - */ -#if defined(KERNEL) && defined(__cplusplus) - -#include <IOKit/network/IONetworkInterface.h> -#include <IOKit/network/IOEthernetController.h> -#include <IOKit/network/IOEthernetStats.h> - -/*! @class IOEthernetInterface - @abstract The Ethernet interface object. - @discussion An Ethernet controller driver, - that is a subclass of IOEthernetController, will instantiate an object - of this class when the driver calls the attachInterface() method. - This interface object will then vend an Ethernet interface to DLIL, - and manage the connection between the controller driver and the upper - networking layers. Drivers will seldom need to subclass - IOEthernetInterface. -*/ - -class IOEthernetInterface : public IONetworkInterface -{ - OSDeclareDefaultStructors( IOEthernetInterface ) - -private: - thread_call_t _inputEventThreadCall; // inputEvent() thread call - UInt32 _mcAddrCount; // # of multicast addresses - bool _ctrEnabled; // Is controller enabled? - OSDictionary * _supportedFilters; // Controller's supported filters - OSDictionary * _requiredFilters; // The required filters - OSDictionary * _activeFilters; // Currently active filters - bool _controllerLostPower; // true if controller is unusable - - struct ExpansionData { - UInt32 altMTU; // track the physical mtu of controller - UInt32 publishedFeatureID; // id for published wake packet - uint32_t supportedWakeFilters; // bitmask of supported wake filters - OSNumber * disabledWakeFilters; // OSNumber of disabled wake filters - }; - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * _reserved; - - - IOReturn enableController(IONetworkController * ctr); - IOReturn setupMulticastFilter(IONetworkController * ctr); - - UInt32 getFilters(const OSDictionary * dict, - const OSSymbol * group); - - bool setFilters(OSDictionary * dict, - const OSSymbol * group, - UInt32 filters); - - IOReturn disableFilter(IONetworkController * ctr, - const OSSymbol * group, - UInt32 filter, - IOOptionBits options = 0); - - IOReturn enableFilter(IONetworkController * ctr, - const OSSymbol * group, - UInt32 filter, - IOOptionBits options = 0); - - int syncSIOCSIFFLAGS(IONetworkController * ctr); - int syncSIOCSIFADDR(IONetworkController * ctr); - int syncSIOCADDMULTI(IONetworkController * ctr); - int syncSIOCDELMULTI(IONetworkController * ctr); - int syncSIOCSIFMTU(IONetworkController * ctr, struct ifreq * ifr, bool); - int syncSIOCGIFDEVMTU(IONetworkController * ctr, struct ifreq * ifr); - int syncSIOCSIFLLADDR(IONetworkController * ctr, const char * lladdr, int len); - void _fixupVlanPacket(mbuf_t, u_int16_t, int); - void reportInterfaceWakeFlags(void); - - static void handleEthernetInputEvent(thread_call_param_t param0, thread_call_param_t param1); - static int performGatedCommand(void *, void *, void *, void *, void *); - static IOReturn enableFilter_Wrapper( - IOEthernetInterface *, IONetworkController *, const OSSymbol *, UInt32 , IOOptionBits); - -public: - -/*! @function init - @abstract Initializes an IOEthernetInterface instance. - @discussion Instance variables are initialized, and an arpcom - structure is allocated. - @param controller A network controller object that will service - the interface object being initialized. - @result Returns true on success, false otherwise. -*/ - - virtual bool init( IONetworkController * controller ); - -/*! @function getNamePrefix - @abstract Returns a string containing the prefix to use when - creating a BSD name for this interface. - @discussion The BSD name for each interface object is created by - concatenating a string returned by this method, with an unique - unit number assigned by IONetworkStack. - @result Returns a pointer to a constant C string "en". Therefore, Ethernet - interfaces will be registered with BSD as en0, en1, etc. -*/ - - virtual const char * getNamePrefix() const; - -/*! @function setProperties - @abstract Handles a request to set Ethernet interface properties from - kernel or non-kernel clients. - @discussion For non-kernel clients, the preferred - access mechanism is through a user client connection. - @param properties An OSDictionary containing a collection of - properties. - @result Returns kIOReturnUnsupported if the interface did not - recognize any of the properties provided. Otherwise, the return - code will be kIOReturnSuccess to indicate no errors, or an - IOReturn error code to indicate that an error occurred while - handling one of the properties. -*/ - - virtual IOReturn setProperties( OSObject * properties ); - -protected: - -/*! @function free - @abstract Frees the IOEthernetInterface instance. - @discussion The memory allocated for the arpcom structure is released, - followed by a call to super::free(). -*/ - - virtual void free(); - -/*! @function performCommand - @abstract Handles an ioctl command sent to the Ethernet interface. - @discussion This method handles socket ioctl commands sent to the Ethernet - interface from DLIL. Commands recognized and processed by this method are - SIOCSIFADDR, SIOCSIFFLAGS, SIOCADDMULTI, and SIOCDELMULTI. Other commands - are passed to the superclass. - @param controller The controller object. - @param cmd The ioctl command code. - @param arg0 Command argument 0. Generally a pointer to an ifnet structure - associated with the interface. - @param arg1 Command argument 1. - @result Returns a BSD return value defined in bsd/sys/errno.h. -*/ - - virtual SInt32 performCommand(IONetworkController * controller, - unsigned long cmd, - void * arg0, - void * arg1); - -/*! @function controllerDidOpen - @abstract A notification that the interface has opened the network - controller. - @discussion This method will be called by IONetworkInterface after a - network controller has accepted an open from this interface object. - IOEthernetInterface will first call the implementation in its - superclass, then inspect the controller through properties published - in the registry. This method is called with the arbitration lock held. - @param controller The controller object that was opened. - @result Returns true on success, false otherwise. Returning false will - cause the controller to be closed, and any pending client opens to be - rejected. -*/ - - virtual bool controllerDidOpen(IONetworkController * controller); - -/*! @function controllerWillClose - @abstract A notification that the interface will close the network - controller. - @discussion This method will simply call super to propagate the method - call. This method is called with the arbitration lock held. - @param controller The controller that is about to be closed. -*/ - - virtual void controllerWillClose(IONetworkController * controller); - - -/*! @function controllerWillChangePowerState - @abstract Handles a notification that the network controller - servicing this interface object is about to transition to a new power state. - @discussion If the controller is about to transition to an unusable state, - and it is currently enabled, then the disable() method on the controller is - called. - @param controller The network controller object. - @param flags Flags that describe the capability of the controller in the new - power state. - @param stateNumber An index to a state in the network controller's - power state array that the controller is switching to. - @param policyMaker A reference to the network controller's policy-maker, - and is also the originator of this notification. - @result Always returns kIOReturnSuccess. -*/ - - virtual IOReturn controllerWillChangePowerState( - IONetworkController * controller, - IOPMPowerFlags flags, - UInt32 stateNumber, - IOService * policyMaker); - -/*! @function controllerDidChangePowerState - @abstract Handles a notification that the network controller servicing - this interface object has transitioned to a new power state. - @discussion If the controller did transition to a usable state, and it was - previously disabled due to a previous power change, then it is re-enabled. - @param controller The network controller object. - @param flags Flags that describe the capability of the controller in the new - power state. - @param stateNumber An index to a state in the network controller's - power state array that the controller has switched to. - @param policyMaker A reference to the network controller's policy-maker, - and is also the originator of this notification. - @result Always returns kIOReturnSuccess. -*/ - - virtual IOReturn controllerDidChangePowerState( - IONetworkController * controller, - IOPMPowerFlags flags, - UInt32 stateNumber, - IOService * policyMaker); - -public: - /* Override IONetworkInterface::willTerminate() */ - - virtual bool willTerminate( IOService * provider, - IOOptionBits options ); - - /* Override IONetworkInterface::attachToDataLinkLayer() */ - - virtual IOReturn attachToDataLinkLayer( IOOptionBits options, - void * parameter ); - - /* Override IONetworkInterface::inputEvent() */ - - virtual bool inputEvent( UInt32 type, void * data ); - -protected: - virtual void feedPacketInputTap(mbuf_t); - virtual void feedPacketOutputTap(mbuf_t); - virtual bool initIfnetParams(struct ifnet_init_params *params); - -public: - // Virtual function padding - OSMetaClassDeclareReservedUnused( IOEthernetInterface, 0); - OSMetaClassDeclareReservedUnused( IOEthernetInterface, 1); - OSMetaClassDeclareReservedUnused( IOEthernetInterface, 2); - OSMetaClassDeclareReservedUnused( IOEthernetInterface, 3); - OSMetaClassDeclareReservedUnused( IOEthernetInterface, 4); - OSMetaClassDeclareReservedUnused( IOEthernetInterface, 5); - OSMetaClassDeclareReservedUnused( IOEthernetInterface, 6); - OSMetaClassDeclareReservedUnused( IOEthernetInterface, 7); - OSMetaClassDeclareReservedUnused( IOEthernetInterface, 8); - OSMetaClassDeclareReservedUnused( IOEthernetInterface, 9); - OSMetaClassDeclareReservedUnused( IOEthernetInterface, 10); - OSMetaClassDeclareReservedUnused( IOEthernetInterface, 11); - OSMetaClassDeclareReservedUnused( IOEthernetInterface, 12); - OSMetaClassDeclareReservedUnused( IOEthernetInterface, 13); - OSMetaClassDeclareReservedUnused( IOEthernetInterface, 14); - OSMetaClassDeclareReservedUnused( IOEthernetInterface, 15); -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* !_IOETHERNETINTERFACE_H */ diff --git a/i386/include/IOKit/network/IOEthernetStats.h b/i386/include/IOKit/network/IOEthernetStats.h deleted file mode 100644 index 6125c2d..0000000 --- a/i386/include/IOKit/network/IOEthernetStats.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * IOEthernetStats.h - Ethernet MIB statistics definitions. - * - * HISTORY - */ - -#ifndef _IOETHERNETSTATS_H -#define _IOETHERNETSTATS_H - -/*! @header IOEthernetStats.h - @discussion Ethernet statistics. */ - -//--------------------------------------------------------------------------- -// Ethernet-like statistics group. - -/*! @typedef IODot3StatsEntry - @discussion Ethernet MIB statistics structure. - @field alignmentErrors dot3StatsAlignmentErrors. - @field fcsErrors dot3StatsFCSErrors. - @field singleCollisionFrames dot3StatsSingleCollisionFrames. - @field multipleCollisionFrames dot3StatsMultipleCollisionFrames. - @field sqeTestErrors dot3StatsSQETestErrors. - @field deferredTransmissions dot3StatsDeferredTransmissions. - @field lateCollisions dot3StatsLateCollisions. - @field excessiveCollisions dot3StatsExcessiveCollisions. - @field internalMacTransmitErrors dot3StatsInternalMacTransmitErrors. - @field carrierSenseErrors dot3StatsCarrierSenseErrors. - @field frameTooLongs dot3StatsFrameTooLongs. - @field internalMacReceiveErrors dot3StatsInternalMacReceiveErrors. - @field etherChipSet dot3StatsEtherChipSet. - @field missedFrames dot3StatsMissedFrames (not in RFC1650). - */ - -typedef struct { - UInt32 alignmentErrors; - UInt32 fcsErrors; - UInt32 singleCollisionFrames; - UInt32 multipleCollisionFrames; - UInt32 sqeTestErrors; - UInt32 deferredTransmissions; - UInt32 lateCollisions; - UInt32 excessiveCollisions; - UInt32 internalMacTransmitErrors; - UInt32 carrierSenseErrors; - UInt32 frameTooLongs; - UInt32 internalMacReceiveErrors; - UInt32 etherChipSet; - UInt32 missedFrames; -} IODot3StatsEntry; - -//--------------------------------------------------------------------------- -// Ethernet-like collision statistics group (optional). - -/*! @typedef IODot3CollEntry - @discussion Collision statistics structure. - @field collFrequencies dot3StatsCollFrequencies. */ - -typedef struct { - UInt32 collFrequencies[16]; -} IODot3CollEntry; - -//--------------------------------------------------------------------------- -// Receiver extra statistics group (not defined by RFC 1650). - -/*! @typedef IODot3RxExtraEntry - @discussion Extra receiver statistics not defined by RFC1650. - @field overruns receiver overruns. - @field watchdogTimeouts watchdog timer expirations. - @field frameTooShorts runt frames. - @field collisionErrors frames damages by late collision. - @field phyErrors PHY receive errors. - @field timeouts receiver timeouts. - @field interrupts receiver interrupts. - @field resets receiver resets. - @field resourceErrors receiver resource shortages. - */ - -typedef struct { - UInt32 overruns; - UInt32 watchdogTimeouts; - UInt32 frameTooShorts; - UInt32 collisionErrors; - UInt32 phyErrors; - UInt32 timeouts; - UInt32 interrupts; - UInt32 resets; - UInt32 resourceErrors; - UInt32 reserved[4]; -} IODot3RxExtraEntry; - -//--------------------------------------------------------------------------- -// Transmitter extra statistics group (not defined by RFC 1650). - -/*! @typedef IODot3TxExtraEntry - @discussion Extra transmitter statistics not defined by RFC1650. - @field underruns transmit underruns. - @field jabbers jabber events. - @field phyErrors PHY transmit errors. - @field timeouts transmitter timeouts. - @field interrupts transmitter interrupts. - @field resets transmitter resets. - @field resourceErrors transmitter resource shortages. - */ - -typedef struct { - UInt32 underruns; - UInt32 jabbers; - UInt32 phyErrors; - UInt32 timeouts; - UInt32 interrupts; - UInt32 resets; - UInt32 resourceErrors; - UInt32 reserved[4]; -} IODot3TxExtraEntry; - -//--------------------------------------------------------------------------- -// Aggregate Ethernet statistics. - -/*! @typedef IOEthernetStats - @discussion Aggregate Ethernet statistics structure. - @field dot3StatsEntry IODot3StatsEntry statistics group. - @field dot3CollEntry IODot3CollEntry statistics group. - @field dot3RxExtraEntry IODot3RxExtraEntry statistics group. - @field dot3TxExtraEntry IODot3TxExtraEntry statistics group. - */ - -typedef struct { - IODot3StatsEntry dot3StatsEntry; - IODot3CollEntry dot3CollEntry; - IODot3RxExtraEntry dot3RxExtraEntry; - IODot3TxExtraEntry dot3TxExtraEntry; -} IOEthernetStats; - -/*! @defined kIOEthernetStatsKey - @discussion Defines the name of an IONetworkData that contains - an IOEthernetStats. */ - -#define kIOEthernetStatsKey "IOEthernetStatsKey" - -#endif /* !_IOETHERNETSTATS_H */ diff --git a/i386/include/IOKit/network/IOGatedOutputQueue.h b/i386/include/IOKit/network/IOGatedOutputQueue.h deleted file mode 100644 index 48e9f79..0000000 --- a/i386/include/IOKit/network/IOGatedOutputQueue.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOGATEDOUTPUTQUEUE_H -#define _IOGATEDOUTPUTQUEUE_H - -#include <IOKit/IOWorkLoop.h> -#include <IOKit/IOCommandGate.h> -#include <IOKit/IOInterruptEventSource.h> -#include <IOKit/network/IOBasicOutputQueue.h> - -/*! @class IOGatedOutputQueue - @abstract An extension of an IOBasicOutputQueue. - @discussion An IOCommandGate - object is created by this queue and added to a work loop as an - event source. All calls to the target by the consumer thread must - occur with the gate closed. Therefore, all calls to the target of - this type of queue will be serialized with any other thread that - runs on the same work loop context. This is useful for network - drivers that have a tight hardware coupling between the transmit - and receive engines, and a single-threaded hardware access model - is desirable. -*/ - -class IOGatedOutputQueue : public IOBasicOutputQueue -{ - OSDeclareDefaultStructors( IOGatedOutputQueue ) - -private: - static void gatedOutput(OSObject * owner, - IOGatedOutputQueue * self, - IOMbufQueue * queue, - UInt32 * state); - - static void restartDeferredOutput(OSObject * owner, - IOInterruptEventSource * sender, - int count); - -protected: - IOCommandGate * _gate; - IOInterruptEventSource * _interruptSrc; - -/*! @function output - @abstract Transfers all packets in the mbuf queue to the target. - @param queue A queue of output packets. - @param state Return a state bit defined by IOBasicOutputQueue that - declares the new state of the queue following this method call. - A kStateStalled is returned if the queue should stall, otherwise 0 - is returned. -*/ - - virtual void output(IOMbufQueue * queue, UInt32 * state); - -/*! @function free - @abstract Frees the IOGatedOutputQueue object. - @discussion Release allocated resources, then call super::free(). */ - - virtual void free(); - -/*! @function output - @abstract Overrides the method inherited from IOOutputQueue. - @result Returns true if a thread was successfully scheduled to service - the queue. -*/ - - virtual bool scheduleServiceThread(void * param); - -public: - -/*! @function init - @abstract Initializes an IOGatedOutputQueue object. - @param target The object that will handle packets removed from the - queue, and is usually a subclass of IONetworkController. - @param action The function that will handle packets removed from the - queue. - @param workloop A workloop object. An IOCommandGate object is created - and added to this workloop as an event source. - @param capacity The initial capacity of the output queue. - @result Returns true if initialized successfully, false otherwise. -*/ - - virtual bool init(OSObject * target, - IOOutputAction action, - IOWorkLoop * workloop, - UInt32 capacity = 0); - -/*! @function withTarget - @abstract Factory method that constructs and initializes an - IOGatedOutputQueue object. - @param target An IONetworkController object that will handle packets - removed from the queue. - @param workloop A workloop object. An IOCommandGate object is created - and added to this workloop as an event source. - @param capacity The initial capacity of the output queue. - @result Returns an IOGatedOutputQueue object on success, or 0 otherwise. -*/ - - static IOGatedOutputQueue * withTarget(IONetworkController * target, - IOWorkLoop * workloop, - UInt32 capacity = 0); - -/*! @function withTarget - @abstract Factory method that constructs and initializes an - IOGatedOutputQueue object. - @param target The object that will handle packets removed from the - queue. - @param action The function that will handle packets removed from the - queue. - @param workloop A workloop object. An IOCommandGate object is created - and added to this workloop as an event source. - @param capacity The initial capacity of the output queue. - @result Returns an IOGatedOutputQueue object on success, or 0 otherwise. -*/ - - static IOGatedOutputQueue * withTarget(OSObject * target, - IOOutputAction action, - IOWorkLoop * workloop, - UInt32 capacity = 0); -}; - -#endif /* !_IOGATEDOUTPUTQUEUE_H */ diff --git a/i386/include/IOKit/network/IOKernelDebugger.h b/i386/include/IOKit/network/IOKernelDebugger.h deleted file mode 100644 index 97fc905..0000000 --- a/i386/include/IOKit/network/IOKernelDebugger.h +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKERNELDEBUGGER_H -#define _IOKERNELDEBUGGER_H - -#include <IOKit/IOService.h> - -/*! @typedef IODebuggerRxHandler - @discussion Defines the receive handler that must be implemented - by the target to service KDP receive requests. This handler is called - by kdpReceiveDispatcher(). - @param target The target object. - @param buffer KDP receive buffer. The buffer allocated has room for - 1518 bytes. The receive handler must not overflow this buffer. - @param length The amount of data received and placed into the buffer. - Set to 0 if no frame was received during the poll interval. - @param timeout The amount of time to poll in milliseconds while waiting - for a frame to arrive. */ - -typedef void (*IODebuggerRxHandler)( IOService * target, - void * buffer, - UInt32 * length, - UInt32 timeout ); - -/*! @typedef IODebuggerTxHandler - @discussion Defines the transmit handler that must be implemented - by the target to service KDP transmit requests. This handler is called - by kdpTransmitDispatcher(). - @param target The target object. - @param buffer KDP transmit buffer. This buffer contains a KDP frame - to be sent on the network. - @param length The number of bytes in the transmit buffer. */ - -typedef void (*IODebuggerTxHandler)( IOService * target, - void * buffer, - UInt32 length ); - -/*! @typedef IODebuggerLockState - @discussion Defines flags returned by IOKernelDebugger::lock(). - @constant kIODebuggerLockTaken Set if the debugger lock was taken. */ - -typedef enum { - kIODebuggerLockTaken = 0x1 -} IODebuggerLockState; - -/*! @class IOKernelDebugger - @abstract Kernel debugger nub. - @discussion This object interfaces with the KDP - (kernel debugger protocol) module and dispatches KDP requests to its - target (provider). The target, designated as the debugger device, must - implement a pair of handler functions that are called to handle KDP - transmit and receive requests during a debugging session. Only a single - IOKernelDebugger in the system can be active at a given time. The - active IOKernelDebugger is the one that has an IOKDP object attached - as a client. - - The debugger device is usually a subclass of IOEthernetController. - However, any IOService can service an IOKernelDebugger client, - implement the two polled mode handlers, and transport the KDP - packets through a data channel. However, KDP assumes that the - debugger device is an Ethernet interface and therefore it will - always send, and expect to receive, an Ethernet frame. */ - -class IOKernelDebugger : public IOService -{ - OSDeclareDefaultStructors( IOKernelDebugger ) - -protected: - IOService * _target; // target (provider) - IODebuggerTxHandler _txHandler; // target's transmit handler. - IODebuggerRxHandler _rxHandler; // target's receive handler. - IOService * _client; // client that has opened us. - bool _pmDisabled; // true if disabled by PM. - - struct ExpansionData { - thread_call_t activationChangeThreadCall; - UInt32 stateVars[2]; - IONotifier * interfaceNotifier; - }; - - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * _reserved; - -/*! @function kdpReceiveDispatcher - @abstract The KDP receive dispatch function. - @discussion Field KDP receives requests, then dispatches the call to the - registered receiver handler. - @param buffer KDP receive buffer. The buffer allocated by KDP has room - for 1518 bytes. The receive handler must not overflow this buffer. - @param length The amount of data received and placed into the buffer. - Set to 0 if a frame was not received during the poll interval. - @param timeout The amount of time to poll in milliseconds while waiting - for a frame to arrive. -*/ - - static void kdpReceiveDispatcher(void * buffer, - UInt32 * length, - UInt32 timeout); - -/*! @function kdpTransmitDispatcher - @abstract The KDP transmit dispatch function. - @discussion Field KDP transmit requests, then dispatches the call to the - registered transmit handler. - @param buffer KDP transmit buffer. This buffer contains a KDP frame to - be sent on the network. - @param length The number of bytes in the transmit buffer. -*/ - - static void kdpTransmitDispatcher(void * buffer, UInt32 length); - -/*! @function free - @abstract Frees the IOKernelDebugger instance. */ - - virtual void free(); - -/*! @function nullTxHandler - @abstract Null transmit handler. - @discussion This function is registered as the transmit handler when an - IOKernelDebugger object surrenders its status as the active debugger nub. - Until another IOKernelDebugger object gets promoted, this function will - handle polled transmit requests from KDP. This function does nothing - useful. -*/ - - static void nullTxHandler( IOService * target, - void * buffer, - UInt32 length ); - -/*! @function nullRxHandler - @abstract Null receive handler. - @discussion This function is registered as the receive handler when an - IOKernelDebugger object surrenders its status as the active debugger nub. - Until another IOKernelDebugger object gets promoted, this function will - handle polled receive requests from KDP. This function does nothing - except to log a warning message. -*/ - - static void nullRxHandler( IOService * target, - void * buffer, - UInt32 * length, - UInt32 timeout ); - -/*! @function registerHandler - @abstract Registers the target and the handler functions. - @discussion This method is called by handleOpen() and handleClose() - to register or unregister the target and its handler functions. - @param target The target object. - @param txHandler The transmit handler function. The null handler is - registered if the argument is zero. - @param rxHandler The receive handler function. The null handler is - registered if the argument is zero. -*/ - - static void registerHandler( IOService * target, - IODebuggerTxHandler txHandler = 0, - IODebuggerRxHandler rxHandler = 0 ); - -/*! @function powerStateWillChangeTo - @abstract Handles notification that the network controller will change - power state. - @discussion If the controller is about to become unusable, then the - controller's handlers are unregistered, and the controller is disabled. - @param flags Describe the capability of the controller in the new power - state. - @param stateNumber The number of the state in the state array that the - controller is switching to. - @param policyMaker The policy maker that manages the controller's - power state. - @result Returns the constant 3000000, to indicate a maximum of 3 seconds for the - preparation to complete, and an acknowledgement delivered to the - policy maker. -*/ - - virtual IOReturn powerStateWillChangeTo( IOPMPowerFlags flags, - unsigned long stateNumber, - IOService * policyMaker ); - -/*! @function powerStateDidChangeTo - @abstract Handles notification that the network controller did change - power state. - @discussion If the controller became usable, then the controller is - re-enabled, and the controller's handlers are re-registered. - @param flags Description of the capability of the controller in the new power - state. - @param stateNumber The number of the state in the state array that the - controller is switching to. - @param policyMaker The policy maker that manages the controller's - power state. - @result Returns the constant 3000000, to indicate a maximum of 3 seconds for the - preparation to complete, and an acknowledgement delivered to the - policy maker. -*/ - - virtual IOReturn powerStateDidChangeTo( IOPMPowerFlags flags, - unsigned long stateNumber, - IOService * policyMaker ); - -/*! @function handleOpen - @abstract Handles a client open. - @discussion This method is called by IOService::open() to handle an - open from a client (IOKDP) with the arbitration lock held. - @param forClient The client (IOKDP) requesting the open. - @param options Options passed to the open() call. Not used. - @param arg A family defined argument passed to the open() call. Not used. - @result Returns true on success, false otherwise. -*/ - - virtual bool handleOpen( IOService * forClient, - IOOptionBits options, - void * arg ); - -/*! @function handleClose - @abstract Handles a client close. - @discussion This method is called by IOService::close() to handle a - close from a client with the arbitration lock held. - @param forClient The client (IOKDP) requesting the close. - @param options Options passed to the close() call. Not used. -*/ - - virtual void handleClose( IOService * forClient, - IOOptionBits options ); - -/*! @function handleIsOpen - @abstract Queries whether a client has an open on this object. - @discussion This method is called by IOService::isOpen() with the - arbitration lock held. - @result Returns true if the specified client, or any client if none (0) is - specified, presently has an open on this object. -*/ - - virtual bool handleIsOpen( const IOService * forClient ) const; - - static bool interfacePublished( void *target, void *param, IOService *service ); - -public: - -/*! @function lock - @abstract Takes the debugger lock conditionally. - @discussion This method takes the debugger lock if the object given matches the - target registered by registerHandler(). - @param target The target or provider of an IOKernelDebugger object. - @result Returns kIODebuggerLockTaken if the lock was taken, or 0 otherwise. -*/ - - static IODebuggerLockState lock( IOService * target ); - -/*! @function unlock - @abstract Releases the debugger lock. - @discussion This method releases the debugger lock if the kIODebuggerLockTaken flag is - set in the argument. -*/ - - static void unlock( IODebuggerLockState state ); - -/*! @function init - @abstract Initializes an IOKernelDebugger instance. - @param target The target object that implements the debugger handlers. - @param txHandler The target's transmit handler. A pointer to a 'C' function. - @param rxHandler The target's receive handler. A pointer to a 'C' function. - @result Returns true if the instance initialized successfully, false otherwise. -*/ - - virtual bool init( IOService * target, - IODebuggerTxHandler txHandler, - IODebuggerRxHandler rxHandler ); - -/*! @function debugger - @abstract Factory method that performs allocation and initialization - of an IOKernelDebugger object. - @param target The target object that implements the debugger handlers. - @param txHandler The target's transmit handler. A pointer to a 'C' function. - @param rxHandler The target's receive handler. A pointer to a 'C' function. - @result Returns an IOKernelDebugger instance on success, 0 otherwise. -*/ - - static IOKernelDebugger * debugger( IOService * target, - IODebuggerTxHandler txHandler, - IODebuggerRxHandler rxHandler ); - - /* - * Entry point for generic messages delivered from the provider. - */ - - virtual IOReturn message( UInt32 type, IOService * provider, void * arg ); - -/*! @function signalDebugger - @abstract Signal the kernel to enter the debugger when safe. -*/ - static void signalDebugger(void); - - // Virtual function padding - OSMetaClassDeclareReservedUnused( IOKernelDebugger, 0); - OSMetaClassDeclareReservedUnused( IOKernelDebugger, 1); - OSMetaClassDeclareReservedUnused( IOKernelDebugger, 2); - OSMetaClassDeclareReservedUnused( IOKernelDebugger, 3); -}; - -// Concise form of the lock()/unlock() static member functions. -// -#define IODebuggerLock IOKernelDebugger::lock -#define IODebuggerUnlock IOKernelDebugger::unlock - -#endif /* !_IOKERNELDEBUGGER_H */ diff --git a/i386/include/IOKit/network/IOMbufMemoryCursor.h b/i386/include/IOKit/network/IOMbufMemoryCursor.h deleted file mode 100644 index 4e40173..0000000 --- a/i386/include/IOKit/network/IOMbufMemoryCursor.h +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_NETWORK_IOMBUFMEMORYCURSOR_H -#define _IOKIT_NETWORK_IOMBUFMEMORYCURSOR_H - -#include <IOKit/IOMemoryCursor.h> - - -/*! @class IOMbufMemoryCursor - @abstract A mechanism to convert mbuf chains to physical addresses. - @discussion The IOMbufMemoryCursor defines the super class that all - specific mbuf cursors must inherit from, but a mbuf cursor can be created - without a specific formal subclass by just providing a segment function to - the initializers. This class performs the task of walking a given - mbuf chain and creating a physical scatter/gather list appropriate for - the target hardware. When necessary, this class may also coalesce - mbuf chains when the generated scatter/gather list exceeds the specified - hardware limit. However, this should be avoided since it exacts a - performance cost. - <br><br> - A driver is expected to create a mbuf cursor and configure it to match the - limitations of it's DMA hardware; for instance the mbuf cursor used by - an Ethernet controller driver may have a maximum physical segment size - of 1520, and allow for up to 6 physical segments. Thus it would create a - mbuf cursor with a maxSegmentSize of 1520 and a maxNumSegments of 6. - The driver may choose to supply an OutputSegmentFunc function to - format the output of each scatter/gather segment to match the - hardware descriptor format, or it may use a subclass of - IOMbufMemoryCursor to generate IOPhysicalSegment segments with - various byte orders. - <br><br> - A driver may also create more than one mbuf cursor, perhaps one - dedicated for the transmit thread, and the other for the receive thread. - This becomes a requirement when the driver is multi-threaded, since the - mbuf cursor maintains state and does not support reentrancy. */ - -class IOMbufMemoryCursor : public IOMemoryCursor -{ - OSDeclareDefaultStructors(IOMbufMemoryCursor) - -protected: - UInt32 maxNumSegments; - UInt32 coalesceCount; - UInt32 packetTooBigErrors; - - struct ExpansionData { }; - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - virtual bool initWithSpecification(OutputSegmentFunc outSeg, - UInt32 maxSegmentSize, - UInt32 maxTransferSize, - UInt32 align); - -public: -/*! @function initWithSpecification - @abstract Primary initializer for the IOMbufMemoryCursor class. - @param outSeg Function to call to output one physical segment. - @param maxSegmentSize Maximum allowable size for one segment. - @param maxNumSegments Maximum number of segments. - @result Returns true if the inherited classes and this instance initialized - successfully. -*/ - - virtual bool initWithSpecification(OutputSegmentFunc outSeg, - UInt32 maxSegmentSize, - UInt32 maxNumSegments); - -/*! @function genPhysicalSegments - @abstract Generates a physical scatter/gather list given a mbuf packet. - @discussion Generates a list of physical segments from the given mbuf. - @param packet The mbuf packet. - @param vector Void pointer to base of output physical scatter/gather list. - Always passed directly onto the OutputSegmentFunc without interpretation - by the cursor. - @param maxSegs Maximum number of segments that can be written to segments - array. - @param doCoalesce Set to true to perform coalescing when the required - number of segments exceeds the specified limit, otherwise abort and - return 0. - @result Returns the number of segments that were filled in, or - 0 if an error occurred. -*/ - - virtual UInt32 genPhysicalSegments(mbuf_t packet, void * vector, - UInt32 maxSegs, bool doCoalesce); - -/*! @function getAndResetCoalesceCount - @abstract Returns a count of the total number of mbuf chains coalesced - by genPhysicalSegments(). - @discussion This method returns a count of the total number of mbuf chains coalesced - by genPhysicalSegments(). The counter is then reset to 0. - @result Returns the coalesce count. -*/ - - UInt32 getAndResetCoalesceCount(); - - // Virtual function padding - OSMetaClassDeclareReservedUnused( IOMbufMemoryCursor, 0); - OSMetaClassDeclareReservedUnused( IOMbufMemoryCursor, 1); - OSMetaClassDeclareReservedUnused( IOMbufMemoryCursor, 2); - OSMetaClassDeclareReservedUnused( IOMbufMemoryCursor, 3); -}; - - -/*! @class IOMbufNaturalMemoryCursor - @abstract An IOMbufMemoryCursor subclass that outputs a vector of - IOPhysicalSegments in the natural byte orientation for the cpu. - @discussion The IOMbufNaturalMemoryCursor would be used when it is too - difficult to implement an OutputSegmentFunc that is more appropriate for - your hardware. This cursor just outputs an array of IOPhysicalSegments. -*/ - -class IOMbufNaturalMemoryCursor : public IOMbufMemoryCursor -{ - OSDeclareDefaultStructors(IOMbufNaturalMemoryCursor) - -public: - -/*! @function withSpecification - @abstract Factory function that creates and initializes an - IOMbufNaturalMemoryCursor in one operation. - @discussion See also IOMbufMemoryCursor::initWithSpecification. - @param maxSegmentSize Maximum allowable size for one segment. - @param maxNumSegments Maximum number of segments. - @result Returns a new mbuf cursor if successfully created and initialized, - 0 otherwise. -*/ - - static IOMbufNaturalMemoryCursor * withSpecification(UInt32 maxSegmentSize, - UInt32 maxNumSegments); - -/*! @function getPhysicalSegments - @abstract Generates a cpu natural physical scatter/gather list from a given - mbuf. - @param packet The mbuf packet. - @param vector Pointer to an array of IOPhysicalSegments for the output - physical scatter/gather list. - @param numVectorSegments Maximum number of IOPhysicalSegments accepted. - @result Returns the number of segments that were filled in, or - 0 if an error occurred. -*/ - - UInt32 getPhysicalSegments(mbuf_t packet, - struct IOPhysicalSegment * vector, - UInt32 numVectorSegments = 0); - -/*! @function getPhysicalSegmentsWithCoalesce - @abstract Generates a cpu natural physical scatter/gather list from a given - mbuf. - @discussion Generate a cpu natural physical scatter/gather list from a - given mbuf. Coalesce mbuf chain when the number of segments in the - scatter/gather list exceeds numVectorSegments. - @param packet The mbuf packet. - @param vector Pointer to an array of IOPhysicalSegments for the output - physical scatter/gather list. - @param numVectorSegments Maximum number of IOPhysicalSegments accepted. - @result Returns the number of segments that were filled in, or - 0 if an error occurred. -*/ - - UInt32 getPhysicalSegmentsWithCoalesce(mbuf_t packet, - struct IOPhysicalSegment * vector, - UInt32 numVectorSegments = 0); -}; - -//=========================================================================== -//=========================================================================== - -/*! @class IOMbufBigMemoryCursor - @abstract An IOMbufMemoryCursor subclass that outputs a vector of - IOPhysicalSegments in the big endian byte order. - @discussion The IOMbufBigMemoryCursor would be used when the DMA hardware - requires a big endian address and length pair. This cursor outputs an - array of IOPhysicalSegments that are encoded in big-endian format. -*/ - -class IOMbufBigMemoryCursor : public IOMbufMemoryCursor -{ - OSDeclareDefaultStructors(IOMbufBigMemoryCursor) - -public: - -/*! @function withSpecification - @abstract Factory function that creates and initializes an - IOMbufBigMemoryCursor in one operation. - @discussion See also IOMbufMemoryCursor::initWithSpecification. - @param maxSegmentSize Maximum allowable size for one segment. - @param maxNumSegments Maximum number of segments. - @result Returns a new mbuf cursor if successfully created and initialized, - 0 otherwise. -*/ - - static IOMbufBigMemoryCursor * withSpecification(UInt32 maxSegmentSize, - UInt32 maxNumSegments); - -/*! @function getPhysicalSegments - @abstract Generates a big endian physical scatter/gather list from a given - mbuf. - @param packet The mbuf packet. - @param vector Pointer to an array of IOPhysicalSegments for the output - physical scatter/gather list. - @param numVectorSegments Maximum number of IOPhysicalSegments accepted. - @result Returns the number of segments that were filled in, or - 0 if an error occurred. -*/ - - UInt32 getPhysicalSegments(mbuf_t packet, - struct IOPhysicalSegment * vector, - UInt32 numVectorSegments = 0); - -/*! @function getPhysicalSegmentsWithCoalesce - @abstract Generates a big endian physical scatter/gather list from a given - mbuf. - @discussion Generate a big endian physical scatter/gather list from a - given mbuf. Coalesce mbuf chain when the number of segments in the - scatter/gather list exceeds numVectorSegments. - @param packet The mbuf packet. - @param vector Pointer to an array of IOPhysicalSegments for the output - physical scatter/gather list. - @param numVectorSegments Maximum number of IOPhysicalSegments accepted. - @result Returns the number of segments that were filled in, or - 0 if an error occurred. -*/ - - UInt32 getPhysicalSegmentsWithCoalesce(mbuf_t packet, - struct IOPhysicalSegment * vector, - UInt32 numVectorSegments = 0); -}; - -//=========================================================================== -//=========================================================================== - -/*! @class IOMbufLittleMemoryCursor - @abstract An IOMbufMemoryCursor subclass that outputs a vector of - IOPhysicalSegments in the little endian byte order. - @discussion The IOMbufLittleMemoryCursor would be used when the DMA - hardware requires a little endian address and length pair. This cursor - outputs an array of IOPhysicalSegments that are encoded in little endian - format. -*/ - -class IOMbufLittleMemoryCursor : public IOMbufMemoryCursor -{ - OSDeclareDefaultStructors(IOMbufLittleMemoryCursor) - -public: - -/*! @function withSpecification - @abstract Factory function that creates and initializes an - IOMbufLittleMemoryCursor in one operation. - @discussion See also IOMbufMemoryCursor::initWithSpecification. - @param maxSegmentSize Maximum allowable size for one segment. - @param maxNumSegments Maximum number of segments. - @result Returns a new mbuf cursor if successfully created and initialized, - 0 otherwise. -*/ - - static IOMbufLittleMemoryCursor * withSpecification(UInt32 maxSegmentSize, - UInt32 maxNumSegments); - -/*! @function getPhysicalSegments - @abstract Generates a little endian physical scatter/gather list from a - given mbuf. - @param packet The mbuf packet. - @param vector Pointer to an array of IOPhysicalSegments for the output - physical scatter/gather list. - @param numVectorSegments Maximum number of IOPhysicalSegments accepted. - @result Returns the number of segments that were filled in, or - 0 if an error occurred. -*/ - - UInt32 getPhysicalSegments(mbuf_t packet, - struct IOPhysicalSegment * vector, - UInt32 numVectorSegments = 0); - -/*! @function getPhysicalSegmentsWithCoalesce - @abstract Generates a little endian physical scatter/gather list from a - given mbuf. - @discussion Generate a little endian physical scatter/gather list from a - given mbuf. Coalesce mbuf chain when the number of segments in the - scatter/gather list exceeds numVectorSegments. - @param packet The mbuf packet. - @param vector Pointer to an array of IOPhysicalSegments for the output - physical scatter/gather list. - @param numVectorSegments Maximum number of IOPhysicalSegments accepted. - @result Returns the number of segments that were filled in, or - 0 if an error occurred. -*/ - - UInt32 getPhysicalSegmentsWithCoalesce(mbuf_t packet, - struct IOPhysicalSegment * vector, - UInt32 numVectorSegments = 0); -}; - -#ifdef __ppc__ - -struct IODBDMADescriptor; - -//=========================================================================== -//=========================================================================== - -/*! @class IOMbufDBDMAMemoryCursor - @abstract An IOMbufMemoryCursor subclass that outputs a vector of - IODBDMADescriptors. -*/ - -class IOMbufDBDMAMemoryCursor : public IOMbufMemoryCursor -{ - OSDeclareDefaultStructors(IOMbufDBDMAMemoryCursor) - -public: - -/*! @function withSpecification - @abstract Factory function that creates and initializes an - IOMbufDBDMAMemoryCursor in one operation. - @discussion See also IOMbufMemoryCursor::initWithSpecification. - @param maxSegmentSize Maximum allowable size for one segment. - @param maxNumSegments Maximum number of segments. - @result Returns a new mbuf cursor if successfully created and initialized, - 0 otherwise. -*/ - - static IOMbufDBDMAMemoryCursor * withSpecification(UInt32 maxSegmentSize, - UInt32 maxNumSegments); - -/*! @function getPhysicalSegments - @abstract Generates a DBDMA descriptor list from a given mbuf. - @param packet The mbuf packet. - @param vector Pointer to an array of IODBDMADescriptor for the output list. - @param numVectorSegments Maximum number of IODBDMADescriptors accepted. - @result Returns the number of segments that were filled in, or - 0 if an error occurred. -*/ - - UInt32 getPhysicalSegments(mbuf_t packet, - struct IODBDMADescriptor *vector, - UInt32 numVectorSegments = 0); - -/*! @function getPhysicalSegmentsWithCoalesce - @abstract Generates a DBDMA descriptor list from a given mbuf. - @discussion Generate a DBDMA descriptor list from a given mbuf. - Coalesce mbuf chain when the number of elements in the list exceeds - numVectorSegments. - @param packet The mbuf packet. - @param vector Pointer to an array of IODBDMADescriptor for the output list. - @param numVectorSegments Maximum number of IODBDMADescriptors accepted. - @result Returns the number of segments that were filled in, or - 0 if an error occurred. -*/ - - UInt32 getPhysicalSegmentsWithCoalesce(mbuf_t packet, - struct IODBDMADescriptor * vector, - UInt32 numVectorSegments = 0); -}; - -#endif /* __ppc__ */ - -#endif /* !_IOKIT_NETWORK_IOMBUFMEMORYCURSOR_H */ - diff --git a/i386/include/IOKit/network/IONetworkController.h b/i386/include/IOKit/network/IONetworkController.h deleted file mode 100644 index 05b12d3..0000000 --- a/i386/include/IOKit/network/IONetworkController.h +++ /dev/null @@ -1,1452 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IONETWORKCONTROLLER_H -#define _IONETWORKCONTROLLER_H - -/*! @defined kIONetworkControllerClass - @abstract The name of the IONetworkController class. */ - -#define kIONetworkControllerClass "IONetworkController" - -/*! @defined kIOVendor - @abstract A property of IONetworkController objects. - @discussion The kIOVendor property is a property of IONetworkController objects. It has an OSString value that describes the vendor of the network controller. */ - -#define kIOVendor "IOVendor" - -/*! @defined kIOModel - @abstract A property of IONetworkController objects. - @discussion The kIOModel property is a property of IONetworkController objects. It has an OSString value that describes the model of the network controller. */ - -#define kIOModel "IOModel" - -/*! @defined kIORevision - @abstract A property of IONetworkController objects. - @discussion The kIORevision property is a property of IONetworkController objects. It has an OSString value that describes the revision level of the network controller. */ - -#define kIORevision "IORevision" - -/*! @defined kIOFeatures - @abstract A property of IONetworkController objects. - @discussion The kIOFeatures property is a property of IONetworkController objects. It has an OSNumber value that describes generic features defined by IONetworkController that are supported by the - network controller. */ - -#define kIOFeatures "IOFeatures" - -/*! @defined kIOMediumDictionary - @abstract A property of IONetworkController objects. - @discussion The kIOMediumDictionary property is a property of IONetworkController - objects. It has an OSDictionary value that is a container for the - collection of IONetworkMedium objects that represent the media - types supported by the network controller. - Each entry in the dictionary is a key/value pair consisting of - the medium name, and a dictionary value that contains the - properties for that medium entry. */ - -#define kIOMediumDictionary "IOMediumDictionary" - -/*! @defined kIODefaultMedium - @abstract A property of IONetworkController objects. - @discussion The kIODefaultMedium property is a property of IONetworkController - objects. It has an OSString value that describes the name of the - default medium. This definition may change or disappear in the - future. */ - -#define kIODefaultMedium "IODefaultMedium" - -/*! @defined kIOSelectedMedium - @abstract A property of IONetworkController objects. - @discussion The kIOSelectedMedium property is a property of IONetworkController - objects. It has an OSSymbol value that describes the name of the - current selected medium. This name can be used as a key into the - medium dictionary to gather additional information about the - selected medium. */ - -#define kIOSelectedMedium "IOSelectedMedium" - -/*! @defined kIOActiveMedium - @abstract A property of IONetworkController objects. - @discussion The kIOActiveMedium property is a property of IONetworkController - objects. It has an OSSymbol value that describes the name of the - active medium. This is the name of the medium where an active - link has been established. This name can be used as a key into - the medium dictionary to gather additional information about the - active medium. */ - -#define kIOActiveMedium "IOActiveMedium" - -/*! @defined kIOLinkSpeed - @abstract A property of IONetworkController objects. - @discussion The kIOLinkSpeed property is a property of IONetworkController - objects. It has an OSNumber value that describes the speed of the - link established over the active medium in bits per second. */ - -#define kIOLinkSpeed "IOLinkSpeed" - -/*! @defined kIOLinkStatus - @abstract A property of IONetworkController objects. - @discussion The kIOLinkStatus property is a property of IONetworkController - objects. It has an OSNumber value that describes the current network - link status. See IONetworkMedium for the definition of the link - status bits. */ - -#define kIOLinkStatus "IOLinkStatus" - -/*! @defined kIOLinkData - @abstract A property of IONetworkController objects. - @discussion The kIOLinkData property is a property of IONetworkController - objects. It has an OSData value that contains additional information - describing the active link that was established. - Its interpretation is not defined. */ - -#define kIOLinkData "IOLinkData" - -/*! @defined kIOPacketFilters - @abstract A property of IONetworkController objects. - @discussion The kIOPacketFilters property is a property of IONetworkController - objects. It has an OSDictionary value that describes the entire - set of packet filters supported by the controller. Each entry - in the dictionary is a key/value pair consisting of the filter - group name, and an OSNumber describing the set of supported - filters for that group. */ - -#define kIOPacketFilters "IOPacketFilters" - -/*! @defined kIOMACAddress - @abstract A property of IONetworkController objects. - @discussion The kIOMACAddress property is a property of IONetworkController - objects. It has an OSData value that describes the hardware - MAC (media access controller) address, or station address, - of the network controller. */ - -#define kIOMACAddress "IOMACAddress" - -/*! @defined kIOMaxPacketSize - @abstract A property of IONetworkController objects. - @discussion The kIOMaxPacketSize property is a property of IONetworkController - objects. It has an OSNumber value that describes the maximum - packet size supported by the controller. */ - -#define kIOMaxPacketSize "IOMaxPacketSize" - -/*! @defined kIOMinPacketSize - @abstract A property of IONetworkController objects. - @discussion The kIOMinPacketSize property is a property of IONetworkController - objects. It has an OSNumber value that describes the minimum - packet size supported by the controller. */ - -#define kIOMinPacketSize "IOMinPacketSize" - -/*! @defined kIONetworkFilterGroup - @abstract The name assigned to the standard network filter group. */ - -#define kIONetworkFilterGroup "IONetworkFilterGroup" - -/*! @enum StandardPacketFilters - @abstract All standard packet filters. - @discussion Each filter will allow the reception of certain class of packets - depending on its destination MAC address. - @constant kIOPacketFilterUnicast Reception of unicast packets. - @constant kIOPacketFilterBroadcast Reception of broadcast packets. - @constant kIOPacketFilterMulticast Reception of multicast packets - addressed to a set of multicast addresses. - @constant kIOPacketFilterMulticastAll Reception of all multicast - packets. - @constant kIOPacketFilterPromiscuous Reception of all packets. - @constant kIOPacketFilterPromiscuousAll Reception of all packets, - including bad packets. */ - -enum { - kIOPacketFilterUnicast = 0x1, - kIOPacketFilterBroadcast = 0x2, - kIOPacketFilterMulticast = 0x10, - kIOPacketFilterMulticastAll = 0x20, - kIOPacketFilterPromiscuous = 0x100, - kIOPacketFilterPromiscuousAll = 0x200 -}; - -/*! @enum NetworkFeatureFlags - @abstract Feature flags returned by the getFeatures() method. - @constant kIONetworkFeatureNoBSDWait Set this bit in the value - returned by getFeatures() to disable the automatic wait for - "IOBSD" resource by the IONetworkController::start() method. - @constant kIONetworkFeaturesHardwareVlan Set this bit in the value - returned by getFeatures() to indicate the controller supports hardware - stripping and stuffing of 802.1q vlan tags. If the controller supports - this feature it must enable it when initializing so that all received - packets delivered to higher layers have the tag stripped. The controller - should use setVlanTag() to provide the tag information out of band. - @constant kIONetworkFeaturesSoftwareVlan Set this bit in the value - returned by getFeatures() to indicate that the controller can support software - based vlan by transmitting and receiving packets 4 bytes longer that normal. - @constant kIONetworkFeatureMultiPages Set this bit if the driver is - capable of handling packets coming down from the network stack that - reside in virtually, but not in physically contiguous span of the - external mbuf clusters. In this case, the data area of a packet in - the external mbuf cluster might cross one or more physical pages that - are disjoint, depending on the interface MTU and the packet size. - Such a use of larger than system page size clusters by the network - stack is done for better system efficiency. Drivers that utilize the - IOMbufNaturalMemoryCursor with the getPhysicalSegmentsWithCoalesce - interfaces and enumerate the list of vectors should set this flag - for possible gain in performance during bulk data transfer. - @constant kIONetworkFeatureTSOIPv4 Set this bit to advertise support - for TCP/IPv4 segmentation offload. - @constant kIONetworkFeatureTSOIPv6 Set this bit to advertise support - for TCP/IPv6 segmentation offload. -*/ - -enum { - kIONetworkFeatureNoBSDWait = 0x01, - kIONetworkFeatureHardwareVlan = 0x02, - kIONetworkFeatureSoftwareVlan = 0x04, - kIONetworkFeatureMultiPages = 0x08, - kIONetworkFeatureTSOIPv4 = 0x10, - kIONetworkFeatureTSOIPv6 = 0x20 -}; - -/* - * Kernel - */ -#if defined(KERNEL) && defined(__cplusplus) - -#include <IOKit/IOService.h> -#include <IOKit/IOWorkLoop.h> -#include <IOKit/network/IONetworkInterface.h> -#include <IOKit/network/IOKernelDebugger.h> - -class IOCommandGate; -class IOOutputQueue; -class IONetworkMedium; - -/*! @typedef IOPacketBufferConstraints - @discussion Constraint parameters, specified by a driver, - for the data buffer in a packet mbuf. This is observed by - allocatePacket() to satisfy the stated requirements. - @field alignStart Starting address byte alignment. - @field alignLength Buffer length byte alignment. */ - -typedef struct { - UInt32 alignStart; - UInt32 alignLength; - UInt32 reserved[6]; -} IOPacketBufferConstraints; - -// Some frequently used alignment constants. -// -enum { - kIOPacketBufferAlign1 = 1, - kIOPacketBufferAlign2 = 2, - kIOPacketBufferAlign4 = 4, - kIOPacketBufferAlign8 = 8, - kIOPacketBufferAlign16 = 16, - kIOPacketBufferAlign32 = 32 -}; - -/*! @const gIONetworkFilterGroup - @discussion gIONetworkFilterGroup is an OSSymbol object that contains - the name of the standard network filter group as defined by - kIONetworkFilterGroup. */ - -extern const OSSymbol * gIONetworkFilterGroup; - -/*! @class IONetworkController - @abstract Implements the framework for a generic - network controller. - @discussion A subclass of IONetworkController must provide - additional functionality specific for a particular networking type. - In addition, the driver must implement (override) a basic set of - hardware dependent methods to create a working driver. - - IONetworkController attaches itself to the data link layer (DLIL) via - an IONetworkInterface object. A controller object without a companion - interface is not accessible to the networking system. The controller - interacts with DLIL by calling methods defined by the interface object. - And conversely, DLIL will issue commands and packets to the controller - through the interface object. - - IONetworkController will create an IOCommandGate and attach this - event source to an IOWorkLoop object. All commands sent from the - interface object are handled through the IOCommandGate object, - which will serialize access to the controller. Outbound packets sent - from the interface to the controller have no implicit serialization. - Drivers must implement an output function that is thread safe, or use - an IOOutputQueue object which will provide a serialization model. - - Note: IONetworkController internally uses some private messaging constants - in the sys_iokit | sub_iokit_networking range defined in - "IONetworkControllerPrivate.h". If you create a client for your controller - (for example an IOUserClient), and it overrides the IOService::message - method, your client may receive these messages. It should ignore these - messages and pass them to super::message() - */ - -class IONetworkController : public IOService -{ - OSDeclareAbstractStructors( IONetworkController ) - -private: - - IOWorkLoop * _workLoop; - IOCommandGate * _cmdGate; - IOOutputQueue * _outputQueue; - OSSet * _clientSet; - OSCollectionIterator * _clientSetIter; - OSObject * _cmdClient; - UInt32 _alignStart; - UInt32 _alignLength; - UInt32 _alignPadding; - bool _propertiesPublished; - IOLock * _mediumLock; - IODebuggerLockState _debugLockState; - SInt32 _debugLockCount; - OSNumber * _linkStatus; - OSNumber * _linkSpeed; - const OSData * _lastLinkData; - const OSSymbol * _lastActiveMediumName; - const OSSymbol * _lastCurrentMediumName; - mbuf_t _freeList; - - struct ExpansionData { }; - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * _reserved; - - - bool _broadcastEvent(UInt32 type, void * data = 0); - - static void debugRxHandler(IOService * handler, - void * buffer, - UInt32 * length, - UInt32 timeout); - - static void debugTxHandler(IOService * handler, - void * buffer, - UInt32 length); - - static IOReturn executeCommandAction(OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3); - - static IOReturn handleCommand(void * target, - void * param0, - void * param1, - void * param2, - void * param3); - -public: - -/*! @function init - @abstract Initializes the IONetworkController object. - @discussion Instance variables are initialized, then super::init() - is called. - @param properties A dictionary object containing a property table - associated with this instance. - @result Returns true on success, false otherwise. -*/ - - virtual bool init(OSDictionary * properties); - -/*! @function start - @abstract Starts the network controller. - @discussion After the controller driver has successfully matched - to a provider, this method is called to start the network controller. - IONetworkController will allocate resources and gather controller - properties in its implementation. No I/O will be performed until - the subclass tries to attach a client object. A driver must override - this method, and call super::start() at the beginning of its own - implementation. Then check the return value to make sure that its - superclass was started successfully before proceeding. Tasks that - are usually performed by a driver's start method are: resource - allocation, hardware initialization, allocation of IOEventSources - and attaching them to a workloop, publishing a medium dictionary, - and finally, attaching an interface object when it is ready to - handle client requests. - @param provider The provider that the controller was matched - (and attached) to. - @result Returns true on success, false otherwise. -*/ - - virtual bool start(IOService * provider); - -/*! @function stop - @abstract Stops the network controller. - @discussion The counterpart of start(). The controller has been - instructed to stop running. The stop() method should release - resources and undo actions performed by the start() method. - Subclasses must override this method and call super::stop() - at the end of its implementation. - @param provider The provider that the controller was matched - (and attached) to. */ - - virtual void stop(IOService * provider); - -/*! @typedef IONetworkController::Action - @discussion Definition of a C function that can be called - through executeCommand(). - @param target The first argument passed to action. - @param param0 Action parameter 0. - @param param1 Action parameter 1. - @param param2 Action parameter 2. - @param param3 Action parameter 3. */ - - typedef IOReturn (*Action)(void * target, void * param0, - void * param1, - void * param2, - void * param3); - -/*! @function executeCommand - @abstract Makes a C function call through the command gate. - @discussion This method makes a call to a C function that will be synchronized - with the workloop thread, and any other threads that are called - with the workloop's gate closed. - @param client The client requesting the action. This parameter is not - passed to the function. - @param action Pointer to a C function to be executed. - @param target The first parameter in the action callout. - @param param0 Action parameter 0. - @param param1 Action parameter 1. - @param param2 Action parameter 2. - @param param3 Action parameter 3. - @result Returns the value returned by the action. -*/ - - virtual IOReturn executeCommand(OSObject * client, - Action action, - void * target, - void * param0 = 0, - void * param1 = 0, - void * param2 = 0, - void * param3 = 0); - -/*! @function outputPacket - @abstract Transmits an output packet. - @discussion If an IOOutputQueue was created by createOutputQueue(), - then this method will be called by the output queue object. - Otherwise, an interface object will call this method directly when - it receives an output packet from the data link layer. - - There is no upper limit on the number of mbufs, hence the number of - memory fragments, in the mbuf chain provided. Drivers must be able to - handle cases when the mbuf count might exceed the limit supported by their - DMA engines, and perform coalescing to copy the various memory fragments - into a lesser number of fragments. This complexity can be hidden from - the driver when an IOMbufMemoryCursor is used, which is able to convert - an mbuf chain into a physical address scatter-gather list that will not - exceed a specified number of physically contiguous memory segments. - See IOMbufMemoryCursor. - - The implementation in IONetworkController performs no useful action - and will drop all packets. A driver must override this method and - process the output packet provided. The implementation in the driver - must not block, since this may cause the network stack to be reentered - from an unsafe point. - @param packet An mbuf chain containing the output packet to be sent on - the network. - @param param A parameter provided by the caller. - @result Returns a return code defined by the caller. -*/ - - virtual UInt32 outputPacket(mbuf_t, void * param); - -/*! @function getFeatures - @abstract Reports generic features supported by the controller and/or - the driver. - @result This method will always return 0. Subclasses may override - this method and return a bit mask of all supported features. */ - - virtual UInt32 getFeatures() const; - -/*! @function newVendorString - @result Returns a string describing the vendor of the network controller. - The caller is responsible for releasing the string object returned. */ - - virtual const OSString * newVendorString() const; - -/*! @function newModelString - @result Returns a string describing the model of the network controller. - The caller is responsible for releasing the string object returned. */ - - virtual const OSString * newModelString() const; - -/*! @function newRevisionString - @result Returns a string describing the hardware revision of the - network controller. The caller is responsible for releasing the - string object returned. */ - - virtual const OSString * newRevisionString() const; - -/*! @function getSelectedMedium - @abstract Gets the current selected medium. - @discussion If the driver has previously called setSelectedMedium() - to indicate its current media selection, then this method will return - that medium object. Otherwise, the driver's property table is - consulted and a default medium property is examined, and the - corresponding entry in the medium dictionary is returned. - @result Returns the current selected medium, the default medium, or 0. -*/ - - virtual const IONetworkMedium * getSelectedMedium() const; - const IONetworkMedium * getCurrentMedium() const; - -/*! @function getMediumDictionary - @abstract Returns the medium dictionary published by the driver. - @discussion Returns the medium dictionary published by the driver - through publishMediumDictionary(). Use copyMediumDictionary() to - create and get a copy of the medium dictionary. - @result Returns the published medium dictionary, or 0 if the driver has not - yet published a medium dictionary through publishMediumDictionary(). -*/ - - virtual const OSDictionary * getMediumDictionary() const; - -/*! @function copyMediumDictionary - @abstract Returns a copy of the medium dictionary published by the - driver. - @discussion The caller is responsible for releasing the dictionary - object returned. Use getMediumDictionary() to get a reference to the - published medium dictionary instead of creating a copy. - @result Returns a copy of the medium dictionary, or 0 if the driver has not - published a medium dictionary through publishMediumDictionary(). -*/ - - virtual OSDictionary * copyMediumDictionary() const; - -/*! @function getOutputHandler - @abstract Gets the address of the method designated to handle output - packets for the network controller. - @result Returns a pointer to the outputPacket() method. -*/ - - virtual IOOutputAction getOutputHandler() const; - -/*! @function doEnable - @abstract Makes a synchronized call to enable() through executeCommand(). - @discussion Do not use this method, it may be removed in the future. - See enable(). -*/ - - virtual IOReturn doEnable(IOService * client); - -/*! @function doDisable - @abstract Makes a synchronized call to disable() through executeCommand(). - @discussion Do not use this method, it may be removed in the future. - See disable(). -*/ - - virtual IOReturn doDisable(IOService * client); - -/*! @function getCommandGate - @abstract Gets the IOCommandGate object created by IONetworkController. - @discussion When IONetworkController is started, an IOCommandGate object - is instantiated and attached to the workloop returned by getWorkLoop(). - This IOCommandGate object is used internally to synchronize client - commands handled through executeCommand(). Subclasses that need an - IOCommandGate should try to reuse the object returned by this method, - rather than creating a new instance. See IOCommandGate documentation. - @result Returns the IOCommandGate object created by IONetworkController. -*/ - - virtual IOCommandGate * getCommandGate() const; - -/*! @function getHardwareAddress - @abstract Gets the network controller's permanent hardware/station - address. - @discussion This method call is synchronized by the workloop's gate. - @param addr The buffer where the controller's hardware address should - be stored. - @param inOutAddrBytes The size of the address buffer provided by the - client, and replaced by this method with the actual size of - the hardware address in bytes. - @result Returns kIOReturnSuccess on success, or an error otherwise. -*/ - - virtual IOReturn getHardwareAddress(void * addr, - UInt32 * inOutAddrBytes) = 0; - -/*! @function setHardwareAddress - @abstract Sets or changes the station address used by the network - controller. - @discussion This method call is synchronized by the workloop's gate. - @param buffer The buffer containing the hardware address provided by - the client. - @param addrBytes The size of the address buffer provided by the - client in bytes. - @result Returns kIOReturnSuccess on success, or an error otherwise. -*/ - - virtual IOReturn setHardwareAddress(const void * addr, - UInt32 addrBytes) = 0; - -/*! @function enable - @abstract Handles an enable request from a client. - @discussion This method handles an enable request from a client. A client will call - enable after it has opened the controller, and before it starts to use - the controller to send and to receive packets over the network. The - client object provided is typecasted using OSDynamicCast, and depending - on whether the client is an IOKernelDebugger or an IONetworkInterface, - then an overloaded enable method that takes a more specific argument - type is called. If the client matches neither type, then - kIOReturnBadArgument is returned. A driver has the option of overriding - this base enable method, or the overloaded form. This method call is - synchronized by the workloop's gate. - @param client The client object requesting the enable. - @result Returns the return value from the overloaded enable() method, or - kIOReturnBadArgument if the client type is unknown. -*/ - - virtual IOReturn enable(IOService * client); - -/*! @function disable - @abstract Handles a disable request from a client. - @discussion This method handles a disable request from a client. A client will call - disable if it has previously enabled the controller, and it no longer - needs to transport packets or perform I/O using the controller. - The client object is typecasted using OSDynamicCast, and depending on - whether the client is an IOKernelDebugger or an IONetworkInterface, - then an overloaded disable method that takes a more specific argument - type is called. If the client matches neither type, then - kIOReturnBadArgument is returned. A driver has the option of overriding - this base disable method, or the overloaded form. This method call is - synchronized by the workloop's gate. - @param client The client object requesting the disable. - @result Returns the return from the overloaded disable() method, or - kIOReturnBadArgument if the client type is unknown. -*/ - - virtual IOReturn disable(IOService * client); - -/*! @function setMaxPacketSize - @abstract A client request to change the maximum packet size. - @discussion This method call is synchronized by the workloop's gate. - @param maxSize The new maximum packet size. - @result Returns kIOReturnUnsupported. Drivers may override this method - and return either kIOReturnSuccess to indicate that the new size - was accepted and is in effect, or an error code to indicate failure. -*/ - - virtual IOReturn setMaxPacketSize(UInt32 maxSize); - -/*! @function getMaxPacketSize - @abstract Gets the maximum packet size supported by the controller. - @param maxSize Pointer to the return value. - @result Returns kIOReturnSuccess on success, or an error code otherwise. -*/ - - virtual IOReturn getMaxPacketSize(UInt32 * maxSize) const = 0; - -/*! @function getMinPacketSize - @abstract Gets the minimum packet size supported by the controller. - @param minSize Pointer to the return value. - @result Returns kIOReturnSuccess on success, or an error code otherwise. -*/ - - virtual IOReturn getMinPacketSize(UInt32 * minSize) const = 0; - -/*! @function selectMedium - @abstract A client request to change the medium selection. - @discussion This method is called when a client issues a command - for the controller to change its current medium selection. - The implementation must call setSelectedMedium() after the change - has occurred. This method call is synchronized by the workloop's - gate. - @param medium An entry from the published medium dictionary that - represents the selection chosen by the client. - @result Returns kIOReturnUnsupported. Drivers may override this method and - return kIOReturnSuccess if the selection was successful, - or an error code otherwise. -*/ - - virtual IOReturn selectMedium(const IONetworkMedium * medium); - -/*! @function selectMediumWithName - @abstract A client request to change the medium selection. - @discussion This method is called when a client issues a command - for the controller to change its current medium selection. - This implementation will look for an entry in the medium - dictionary published by the driver that is associated with the - key given. If a match is found, then selectMedium() is called to - perform the selection, otherwise an error is reported back to the - client. Subclasses should override selectMedium() and not this - method. This method call is synchronized by the workloop's gate. - @param mediumName An OSSymbol object that describes the name of the - new medium selected by the client. - @result Returns the return from selectMedium() if a matching entry was found - from the medium dictionary. Returns kIOReturnUnsupported if a medium - dictionary does not exist, or kIOReturnBadArgument if the name given - does not match any entry in the medium dictionary. -*/ - - virtual IOReturn selectMediumWithName(const OSSymbol * mediumName); - -/*! @function getPacketFilters - @abstract Gets the set of packet filters supported by the network - controller for the given filter group. - @discussion A subclass must implement this method and report the - set of filters that are supported for the given filter group. - This method call is synchronized by the workloop's gate. - @param group The name of the filter group. - @param filters Pointer to the mask of supported filters returned by - this method. - @result Returns kIOReturnSuccess on success, or an error to indicate a - failure to discover the set of supported filters. -*/ - - virtual IOReturn getPacketFilters(const OSSymbol * group, - UInt32 * filters) const = 0; - -/*! @function enablePacketFilter - @abstract Enables one of the supported packet filters from the - given filter group. - @discussion A client will call this method to enable a supported filter - from the filter group specified. If the client wishes to enable more - than one filter, it must call this method multiple times to enable the - desired set of filters. This method call is synchronized by the - workloop's gate. - @param group The name of the filter group containing the filter to be - enabled. - @param aFilter The filter to enable. - @param enabledFilters All filters currently enabled by the client. - @param options Optional flags for the enable request. - @result Returns kIOReturnSuccess on success, or an error otherwise. -*/ - - virtual IOReturn enablePacketFilter(const OSSymbol * group, - UInt32 aFilter, - UInt32 enabledFilters, - IOOptionBits options = 0) = 0; - -/*! @function disablePacketFilter - @abstract Disables a packet filter that is currently enabled from the - given filter group. - @discussion After a supported filter has been successfully enabled, - a client can call this method to disable that filter. This method call - is synchronized by the workloop's gate. - @param group The name of the filter group containing the filter to be - disabled. - @param aFilter The filter to disable. - @param enabledFilters All filters currently enabled by the client. - @param options Optional flags for the disable request. - @result Returns kIOReturnSuccess on success, or an error otherwise. -*/ - - virtual IOReturn disablePacketFilter(const OSSymbol * group, - UInt32 aFilter, - UInt32 enabledFilters, - IOOptionBits options = 0) = 0; - -/*! @function getOutputQueue - @abstract Gets the IOOutputQueue object created by createOutputQueue(). - @result Returns a reference to the output queue object created by - createOutputQueue(). -*/ - - virtual IOOutputQueue * getOutputQueue() const; - -/*! @function getPacketBufferConstraints - @abstract Gets the controller's packet buffer constraints. - @discussion Called by start() to obtain the constraints on the - memory buffer for each mbuf packet allocated through allocatePacket(). - Drivers can override this method to specify the buffer constraints - imposed by their bus master hardware. Note that outbound packets, - those that originate from the network stack, are not currently - subject to the constraints reported here. - @param constraints A pointer to an IOPacketBufferConstraints - structure that this method is expected to initialize. - See IOPacketBufferConstraints structure definition. -*/ - - virtual void getPacketBufferConstraints( - IOPacketBufferConstraints * constraints) const; - -/*! @function allocatePacket - @abstract Allocates a packet with a data buffer that is larger than - or equal to the size specified. - @discussion This method will always return a single mbuf unless the - size requested (plus the alignment padding) is greater than MCLBYTES. - The data buffer for the mbuf (or an mbuf chain) returned is aligned - according to the constraints reported by getPacketBufferConstraints(). - The length fields in each mbuf returned are set by this method, thus - allowing the mbuf to be passed directly to an IOMbufMemoryCursor object - in order to convert the mbuf to a physical address scatter-gather list. - @param size The minimum size of the data buffer for the mbuf - packet allocated. - @result Returns an mbuf packet, or 0 if allocation failed. -*/ - - virtual mbuf_t allocatePacket(UInt32 size); - -/*! @function copyPacket - @abstract Allocates a new packet, containing data copied from an - existing source packet. - @discussion The source packet is not modified by this method. - @param m The source packet. - @param size The number of bytes to copy. If set to 0, then the - entire data buffer from the source packet is copied. - @result Returns a new packet containing the same data as the source packet. -*/ - - virtual mbuf_t copyPacket(const mbuf_t m, UInt32 size = 0); - -/*! @function replacePacket - @abstract Allocates a new packet to replace an existing packet, the - existing packet is then returned. - @param mp A handle to the existing packet. - @param size If size is 0, then the new packet shall have the same buffer - size as the original packet that is being replaced. Otherwise, the new - packet shall have the buffer size specified by this value. - @result If packet allocation was successful, then a replacement will - take place and the original packet will be returned. Otherwise, 0 - is returned, and the original packet will be left untouched. -*/ - - virtual mbuf_t replacePacket(mbuf_t * mp, UInt32 size = 0); - -/*! @function replaceOrCopyPacket - @abstract A helper method that combines the functionality of - copyPacket() and replacePacket() to process a packet containing - a received frame. - @discussion This method will either make a copy or replace the existing - packet, whichever is more time efficient. Packets containing small frames - are copied, otherwise they are replaced. If replaced, then the existing - packet is returned, and a new packet with the same buffer size is created - to take its place. If copied, the existing packet is left intact, while a - copy is returned that will hold a copy of the data from the source packet. - @param mp A handle to the existing packet that may be replaced. - @param length The number of bytes received held in the packet. - Must be greater than zero. - @param replaced Pointer to a return value that is set to true to indicate - that the existing packet was replaced, or false to indicate that the - existing packet was not replaced, and a copy was created. - @result Returns a replacement or a copy of the existing packet, or 0 if packet - allocation failed. -*/ - - virtual mbuf_t replaceOrCopyPacket(mbuf_t * mp, - UInt32 length, - bool * replaced); - - enum { - kDelayFree = 0x01 - }; - -/*! @function freePacket - @abstract Releases the packet given back to the free pool. - @param m The packet to be freed. - @param options When kDelayFree option is set, then the packet - provided to this function will be queued on the free packet queue. - A subsequent call to releaseFreePackets() will release all queued - packets by making a single BSD function call. Without the kDelayFree - option, the packet provided will be released immediately. -*/ - - virtual void freePacket(mbuf_t, IOOptionBits options = 0); - -/*! @function releaseFreePackets - @abstract Releases all packets held in the free packet queue. - @discussion The free packet queue is not protected by a lock. This - function must be called in a single-threaded manner with respect to - all calls to freePacket() with the kDelayFree option set. - @result Returns the number of packets queued and released. -*/ - - virtual UInt32 releaseFreePackets(); - -/*! @enum TCP/IPChecksums - @abstract TCP/IP checksums that may be supported by the - hardware. - @constant kChecksumFamilyTCPIP A value that describes the collection - of TCP/IP checksums. - @constant kChecksumIP An IP header checksum. - @constant kChecksumTCP A TCP checksum that covers the TCP header and TCP - data. - @constant kChecksumUDP A UDP checksum that covers the UDP header and UDP - data. - @constant kChecksumTCPNoPseudoHeader A TCP checksum that covers the TCP - header and the TCP data, but the pseudo header is not included in the - checksum computation. A partial 16-bit checksum value must be provided - to allow the protocol stacks to calculate and verify the final checksum. - This type of checksum is not currently supported on the output path. - @constant kChecksumUDPNoPseudoHeader A UDP checksum that covers the UDP - header and the UDP data, but the pseudo header is not included in the - checksum computation. A partial 16-bit checksum value must be provided - to allow the protocol stacks to calculate and verify the final checksum. - This type of checksum is not currently supported on the output path. - @constant kChecksumTCPSum16 The hardware has a simple checksum engine - that can perform a TCP style ones complement sum of 16-bit words over - a certain range of bytes in a packet. The hardware does not have the - ability to scan for IP or TCP headers, and the driver must pass/get - additional parameter(s) to or from the protocol stack to coordinate - the checksumming effort. -*/ - - enum { - kChecksumFamilyTCPIP = 0x00000001, - kChecksumIP = 0x0001, - kChecksumTCP = 0x0002, - kChecksumUDP = 0x0004, - kChecksumTCPNoPseudoHeader = 0x0100, - kChecksumUDPNoPseudoHeader = 0x0200, - kChecksumTCPSum16 = 0x1000 - }; - -/*! @function getChecksumSupport - @abstract Gets checksums that are supported by the network controller for - the given checksum family. - @discussion A network controller that is capable of inserting and verifying - checksums on output and input packets, should override this method and - advertise its capability in order to assist or offload the software checksum - calculations performed by the protocol stacks. - @param checksumMask A pointer to the mask of supported checksums returned - by this method. - @param checksumFamily A value that specifies the checksum family. - @param isOutput Set to true to query the support for checksum insertion on - output packets, or false to query the support for checksum verification - on input packets. Controllers that have symmetric hardware checksum support - can return a fixed checksum mask value, and ignore this argument. - @result Default return is kIOReturnUnsupported. Controllers that override - this method must return kIOReturnSuccess. Any other return value will be - interpretated as a lack of checksum support, regardless of the value - returned through the first argument. -*/ - - virtual IOReturn getChecksumSupport( UInt32 * checksumMask, - UInt32 checksumFamily, - bool isOutput ); - -/*! @function setChecksumResult - @abstract Encodes a received packet with the checksum result reported - by the hardware. - @discussion A network controller that can verify the checksum(s) for a - received packet, should call this method to encode the result on the - packet, before passing it up towards the protocol stacks. - @param packet An mbuf containing a packet that has been checksummed by - the hardware. - @param checksumFamily A value that specifies the checksum family. - @param resultMask A mask of all checksums that were checked or computed. - Setting a bit implies that the driver is able to report the result of - the checksum computation, by asserting the validity of the checksum, - or by returning a partial checksum value. - @param validMask A mask of all checksums are were computed and verified - by the hardware as valid. Certain types of checksum performed by the - hardware are inheritely incomplete, and therefore should never be marked - as valid. A checksum cannot be marked valid unless it has also been - checked. - @param param0 Optional parameter 0, defaults to 0. - @param param1 Optional parameter 1, defaults to 0. - @result Returns true if the checksum family is valid and the packet has been - encoded with the checksum result provided, false otherwise. -*/ - - virtual bool setChecksumResult( mbuf_t packet, - UInt32 checksumFamily, - UInt32 resultMask, - UInt32 validMask, - UInt32 param0 = 0, - UInt32 param1 = 0 ); - -/*! @function getChecksumDemand - @abstract Fetches the demand for hardware checksum computation and insertion - for the given packet before it is transmitted on the network. - @discussion A network controller that can insert a checksum for output - packets must call this method to obtain the set of checksums that it must - compute, and insert into the appropriate fields in the given output packet. - @param packet An mbuf containing a packet that may be missing one or more - checksums in the specified checksum family. - @param checksumFamily A value that specifies the checksum family. - @param demandMask A mask of all checksums that the hardware must compute - and insert into the appropriate checksum fields in the packet. - @param param0 Optional parameter 0, defaults to 0. - @param param1 Optional parameter 1, defaults to 0. -*/ - - virtual void getChecksumDemand( const mbuf_t packet, - UInt32 checksumFamily, - UInt32 * demandMask, - void * param0 = 0, - void * param1 = 0 ); - -/*! @function publishMediumDictionary - @abstract Publishes a dictionary of IONetworkMedium objects to - advertise the media selection supported by the network controller. - @discussion Called by drivers to publish their medium dictionary. - Each entry in the dictionary is an IONetworkMedium object that - represents a single medium that is supported by the controller. - This method will make a copy of the dictionary provided, then add - the copy to the driver's property table. The dictionary provided - can be released by the caller upon returning from this method. - It is permissible to call this method multiple times, which may be - necessary if the hardware's media capability changes dynamically. - However, if the capability is static, which is often the case, - then a driver will typically call this method only once from - its start() method. - - Several methods depend on the presence of a medium dictionary. - They should be called after the medium dictionary has been - published. Those methods are: - setSelectedMedium() - getSelectedMedium() - getMediumDictionary() - copyMediumDictionary() - - @param mediumDict A dictionary of IONetworkMedium objects. - @result Returns true if the dictionary is valid, and was successfully - exported to the property table, false otherwise. -*/ - - virtual bool publishMediumDictionary(const OSDictionary * mediumDict); - -/*! @function setSelectedMedium - @abstract Designates an entry in the published medium dictionary as - the current selected medium. - @discussion After the driver has configured the hardware to select - one of its supported media types, it must call this method to inform - its parent about the change that has occurred. IONetworkController - will update a property in the registry to reflect the current selection. - @param medium A medium object representing the current selection. - @result Returns true if the property table update was successful, - false if the update failed, or if the medium provided does not match - any entry from the published medium dictionary. -*/ - - virtual bool setSelectedMedium(const IONetworkMedium * medium); - bool setCurrentMedium(const IONetworkMedium * medium); - -/*! @function setLinkStatus - @abstract Reports the link status and the active medium. - @discussion Drivers must call this method when a link change is - detected. IONetworkController will update the link status properties - in the registry, and generate an event to inform the upper layers - about the change. - @param status Link status bits. - See IONetworkMedium for the definition of the link status bits. - @param activeMedium An object in the published medium dictionary - that represents the active medium. This may not be the same as - the selected medium. Set this to 0 if the link is inactive. - @param speed Link speed in units of bits per second. If zero, then - the link speed is taken from the medium object provided. - @param data An OSData containing any additional link parameter that - the driver wishes to publish to the registry. - @result Returns true if all link properties were successfully updated, - false otherwise. -*/ - - virtual bool setLinkStatus( - UInt32 status, - const IONetworkMedium * activeMedium = 0, - UInt64 speed = 0, - OSData * data = 0); - -/*! @function systemWillShutdown - @abstract Handles system shutdown and restart notifications. - @discussion Overrides <code>IOService::systemWillShutdown</code> in order - to notify network clients that the power-managed controller should be disabled. - As a result, drivers can expect their <code>disable</code> method to be called - before system shutdown or restart. This implementation is synchronous and can - block before calling <code>IOService::systemWillShutdown</code> and return. - @param See <code>IOService::systemWillShutdown</code>. -*/ - - virtual void systemWillShutdown( IOOptionBits specifier ); - - /* Override IOService::setAggressiveness() */ - - virtual IOReturn setAggressiveness( - unsigned long type, unsigned long newLevel ); - -protected: - -/*! @function free - @abstract Frees the IONetworkController object. - @discussion Frees the IONetworkController object by releasing all - allocated resources, followed by a call to super::free(). -*/ - - virtual void free(); - -/*! @function registerWithPolicyMaker - @abstract Implemented by controller drivers to register with - the power management policy-maker. - @discussion Drivers that are able to power manage their hardware - should override this method and register with the policy-maker - provided by calling IOService::registerPowerDriver(). - IONetworkController will call this method before the initial - attempt is made to attach a client. - @param policyMaker The policy-maker chosen to manage power for - this network controller. - @result Returns kIOReturnSuccess on success, kIOReturnUnsupported if the - driver does not support power management, or an appropriate error - return code. The default return is kIOReturnUnsupported. */ - - virtual IOReturn registerWithPolicyMaker(IOService * policyMaker); - -/*! @function createWorkLoop - @abstract Method called by IONetworkController prior to the initial - getWorkLoop() call. - @discussion Before IONetworkController calls getWorkLoop() in its - start() method, it will call createWorkLoop() to make sure that a - subclass that wants to create a workloop, will do so before its - first use. - @result Returns true to indicate success, false otherwise. Returning false - will fail IONetworkController::start(). -*/ - - virtual bool createWorkLoop(); - -/*! @function prepare - @abstract Prepares the controller before an IOService is created and - attached as a client. - @discussion This method is called by attachInterface() or - attachDebuggerClient() to prepare the controller before the new client - object is attached. This method will call publishProperties() to publish - controller capabilities and properties that may be used by client objects. - However, publishProperties() will be called only once, even if prepare() - is called multiple times. This method call is synchronized by the - workloop's gate. - @result Returns kIOReturnSuccess on success, or an error code otherwise. - Returning an error will fail the client attach. -*/ - - virtual IOReturn prepare(); - -/*! @function publishProperties - @abstract Publishes controller properties and capabilities. - @discussion Called by IONetworkController to discover controller - properties, and publish them to the property table in the I/O Kit - Registry. This method is called once by prepare(). - @result Returns true if all properties were discovered and published - successfully, false otherwise. Returning false will prevent client - objects from attaching to the controller, since a property that - a client relies upon may be missing. */ - - virtual bool publishProperties(); - -/*! @function getCommandClient - @abstract Gets the command client object. - @discussion Methods called on the workloop context to service a - client request can call this method to get the client object that - initiated the command. - @result Returns the command client. If the caller is not running on the - workloop thread, or if the thread does not have the workloop's gate - closed, then 0 is returned. -*/ - - virtual OSObject * getCommandClient() const; - -/*! @function handleOpen - @abstract Handles a client open. - @discussion This method handles a client open on the controller object. IOService - calls this method with the arbitration lock held. Subclasses - should not override this method. - @param client The client that is attempting to open the controller. - @param options Not used. See IOService. - @param argument Not used. See IOService. - @result Returns true to accept the client open, false to refuse it. -*/ - - virtual bool handleOpen(IOService * client, - IOOptionBits options, - void * argument); - -/*! @function handleClose - @abstract Handles a client close. - @discussion This method handles a close from one of the client objects. IOService - calls this method with the arbitration lock held. Subclasses - should not override this method. - @param client The client that is closing the controller. - @param options Not used. See IOService. -*/ - - virtual void handleClose(IOService * client, IOOptionBits options); - -/*! @function handleIsOpen - @abstract Queries whether a client has an open on the controller. - @discussion This method is always called by IOService with the - arbitration lock held. Subclasses should not override this method. - @result Returns true if the specified client, or any client if none (0) is - specified, presently has an open on this object. -*/ - - virtual bool handleIsOpen(const IOService * client) const; - -/*! @function enable - @abstract A request from an interface client to enable the controller. - @discussion This method is called by an interface client to enable the controller. - Upon receiving this command, the controller driver must bring up the - hardware and become ready to transmit and receive packets. A driver - should also delay the allocation of most runtime resources until this - method is called in order to conserve system resources. This method call - is synchronized by the workloop's gate. - @param interface The interface client object that requested the enable. - @result Returns kIOReturnUnsupported. Drivers that override this method must - return kIOReturnSuccess on success, or an error code otherwise. -*/ - - virtual IOReturn enable(IONetworkInterface * interface); - -/*! @function disable - @abstract A request from an interface client to disable the controller. - @discussion This method is called by an interface client to disable the controller. - This method should stop the hardware and disable hardware interrupt - sources. Any resources allocated by enable() should also be deallocated. - This method call is synchronized by the workloop's gate. - @param interface The interface object that requested the disable. - @result kIOReturnUnsupported. Drivers that override this method must - return Returns kIOReturnSuccess on success, or an error code otherwise. -*/ - - virtual IOReturn disable(IONetworkInterface * interface); - -/*! @function attachInterface - @abstract Attaches a new interface client object. - @discussion This method creates a new interface object and attaches it to the - controller. The createInterface() method is called to perform - the interface allocation and initialization, followed by a call to - configureInterface() to configure it. Subclasses can override those - two methods to customize the interface client attached. Drivers will - usually call this method from start(), after they are ready to process - client requests. Since most drivers will have a single interface - client, this method will likely be called only once. - @param interface Upon success (return value is true), the - interface object will be written to the handle provided. - @param doRegister If true, then registerService() is called to register - the interface, which will trigger the matching process, and will ultimately - cause the interface to become registered with the data link layer. - Drivers that wish to delay the registration can set doRegister to false, - and call registerService() on the interface object when the controller - becomes ready. This allows the driver to attach an interface without - making its services available to the rest of the system. - @result Returns true on success, false otherwise. -*/ - - virtual bool attachInterface(IONetworkInterface ** interface, - bool doRegister = true); - -/*! @function detachInterface - @abstract Detaches an interface client object. - @discussion This method will verify that the object provided is indeed - an IONetworkInterface instance, and then call its terminate() method. - Note that an interface object will close and detach from its - controller after the data link layer has removed all references to - all data structures exposed by the interface. The interface object - should be released following this call. - @param interface An interface object to be detached and terminated. - @param sync If true, the interface is terminated synchronously. - This may cause this method to block for an indeterminate - amount of time. */ - - virtual void detachInterface(IONetworkInterface * interface, - bool sync = false); - -/*! @function createInterface - @abstract Creates a new network interface object. - @discussion This method is called by attachInterface() to perform - allocation and initialization of a new interface object. A subclass of - IONetworkController must implement this method and return a matching - interface object. For example, IOEthernetController's implementation - will return an IOEthernetInterface object when createInterface() is - called. - @result Returns a newly allocated and initialized interface object. -*/ - - virtual IONetworkInterface * createInterface() = 0; - -/*! @function configureInterface - @abstract Configures a newly created network interface object. - @discussion This method configures an interface object that was created by - createInterface(). Subclasses can override this method to customize - and examine the interface object that will be attached to the - controller as a client. - @param interface The interface object to be configured. - @result Returns true if the operation was successful, false otherwise - (this will cause attachInterface() to fail and return 0). -*/ - - virtual bool configureInterface(IONetworkInterface * interface); - -/*! @function createOutputQueue - @abstract Creates an IOOutputQueue to handle output packet queueing, - and also to resolve contention for the controller's transmitter from - multiple client threads. - @discussion This method is called by start() to create an IOOutputQueue object to - handle output packet queueing. The default implementation will always - return 0, hence no output queue will be created. A driver may override - this method and return a subclass of IOOutputQueue. IONetworkController - will keep a reference to the queue created, and will release this - object when IONetworkController is freed. Also see getOutputQueue(). - @result Returns a newly allocated and initialized IOOutputQueue object. -*/ - - virtual IOOutputQueue * createOutputQueue(); - -/*! @function enable - @abstract An enable request from an IOKernelDebugger client. - @discussion Drivers that provide debugging support may either override - this method and set up the hardware to support the polled-mode send and - receive methods, receivePacket() and sendPacket(), or override the base - enable() and disable() methods that take an IOService argument. - @param debugger The IOKernelDebugger client requesting the enable. - @result Returns kIOReturnSuccess. Drivers must return kIOReturnSuccess - on success, or an error otherwise. -*/ - - virtual IOReturn enable(IOKernelDebugger * debugger); - -/*! @function disable - @abstract A disable request from an IOKernelDebugger client. - @discussion Drivers that provide debugging support may either override - this method to disable support for the polled-mode send and receive - methods, or override the base enable() and disable() methods that - take an IOService argument. - @param debugger The IOKernelDebugger client requesting the disable. - @result Returns kIOReturnSuccess. Drivers must return kIOReturnSuccess - on success, or an error otherwise. -*/ - - virtual IOReturn disable(IOKernelDebugger * debugger); - -/*! @function attachDebuggerClient - @abstract Attaches a new IOKernelDebugger client object. - @discussion This method allocates an IOKernelDebugger object and attaches it as - a client. Having a debugger client implies that the controller - supports kernel debugging, and therefore must implement the two - polled-mode methods that are called by the debugger client. See - sendPacket() and receivePacket(). Only a single debugger client - should be attached to each controller. - @param debuggerP A handle that will return the new - IOKernelDebugger object created. - @result Returns true on success, false otherwise. -*/ - - virtual bool attachDebuggerClient(IOKernelDebugger ** debuggerP); - -/*! @function detachDebuggerClient - @abstract Detaches an IOKernelDebugger client object. - @discussion This method detaches and terminates the IOKernelDebugger client object - provided. A synchronous termination is issued, and this method will - return after the debugger client has been terminated. The debugger - client should be released following this call. - @param debugger The IOKernelDebugger object to be detached and - terminated. If the argument provided is NULL or is not an - IOKernelDebugger, this method will return immediately. -*/ - - virtual void detachDebuggerClient(IOKernelDebugger * debugger); - -/*! @function reserveDebuggerLock - @abstract Takes the global debugger lock. - @discussion This method should not be used. Instead, call the - lock() method provided by IOKernelDebugger. -*/ - - void reserveDebuggerLock(); - -/*! @function releaseDebuggerLock - @abstract Releases the global debugger lock. - @discussion This method should not be used. Instead, call the - unlock() method provided by IOKernelDebugger. -*/ - - void releaseDebuggerLock(); - -/*! @function receivePacket - @abstract Debugger polled-mode receive handler. - @discussion This method must be implemented by a driver that supports - kernel debugging. After a debugger client has been attached through - attachDebuggerClient(), this method will be called by the debugger - client to poll for an incoming packet when the kernel debugger is active. - This method may be called from the primary interrupt context, and the - implementation must avoid any memory allocation, and must never block. - The receivePacket() method in IONetworkController is used as a placeholder, - it performs no useful action, and should not be called. A driver that - attaches a debugger client must override this method. - @param pkt Address of a receive buffer where the received packet should - be stored. This buffer has room for 1518 bytes. - @param pktSize Address where the number of bytes received must be - recorded. Set this to zero if no packets were received during - the timeout interval. - @param timeout The maximum amount of time in milliseconds to poll for - a packet to arrive before this method must return. -*/ - - virtual void receivePacket(void * pkt, UInt32 * pktSize, UInt32 timeout); - -/*! @function sendPacket - @abstract Debugger polled-mode transmit handler. - @discussion This method must be implemented by a driver that supports - kernel debugging. After a debugger client has been attached through - attachDebuggerClient(), this method will be called by the debugger - to send an outbound packet only when the kernel debugger is active. - This method may be called from the primary interrupt context, and the - implementation must avoid any memory allocation, and must never block. - The sendPacket() method in IONetworkController is used as a placeholder, - it performs no useful action, and should not be called. A driver that - attaches a debugger client must override this method. - @param pkt Pointer to a transmit buffer containing the packet to be - sent on the network. - @param pktSize The size of the transmit buffer in bytes. -*/ - - virtual void sendPacket(void * pkt, UInt32 pktSize); - - // Virtual function padding - OSMetaClassDeclareReservedUnused( IONetworkController, 0); - OSMetaClassDeclareReservedUnused( IONetworkController, 1); - OSMetaClassDeclareReservedUnused( IONetworkController, 2); - OSMetaClassDeclareReservedUnused( IONetworkController, 3); - OSMetaClassDeclareReservedUnused( IONetworkController, 4); - OSMetaClassDeclareReservedUnused( IONetworkController, 5); - OSMetaClassDeclareReservedUnused( IONetworkController, 6); - OSMetaClassDeclareReservedUnused( IONetworkController, 7); - OSMetaClassDeclareReservedUnused( IONetworkController, 8); - OSMetaClassDeclareReservedUnused( IONetworkController, 9); - OSMetaClassDeclareReservedUnused( IONetworkController, 10); - OSMetaClassDeclareReservedUnused( IONetworkController, 11); - OSMetaClassDeclareReservedUnused( IONetworkController, 12); - OSMetaClassDeclareReservedUnused( IONetworkController, 13); - OSMetaClassDeclareReservedUnused( IONetworkController, 14); - OSMetaClassDeclareReservedUnused( IONetworkController, 15); - OSMetaClassDeclareReservedUnused( IONetworkController, 16); - OSMetaClassDeclareReservedUnused( IONetworkController, 17); - OSMetaClassDeclareReservedUnused( IONetworkController, 18); - OSMetaClassDeclareReservedUnused( IONetworkController, 19); - OSMetaClassDeclareReservedUnused( IONetworkController, 20); - OSMetaClassDeclareReservedUnused( IONetworkController, 21); - OSMetaClassDeclareReservedUnused( IONetworkController, 22); - OSMetaClassDeclareReservedUnused( IONetworkController, 23); - OSMetaClassDeclareReservedUnused( IONetworkController, 24); - OSMetaClassDeclareReservedUnused( IONetworkController, 25); - OSMetaClassDeclareReservedUnused( IONetworkController, 26); - OSMetaClassDeclareReservedUnused( IONetworkController, 27); - OSMetaClassDeclareReservedUnused( IONetworkController, 28); - OSMetaClassDeclareReservedUnused( IONetworkController, 29); - OSMetaClassDeclareReservedUnused( IONetworkController, 30); - OSMetaClassDeclareReservedUnused( IONetworkController, 31); -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* !_IONETWORKCONTROLLER_H */ - diff --git a/i386/include/IOKit/network/IONetworkData.h b/i386/include/IOKit/network/IONetworkData.h deleted file mode 100644 index c0d2de4..0000000 --- a/i386/include/IOKit/network/IONetworkData.h +++ /dev/null @@ -1,477 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IONETWORKDATA_H -#define _IONETWORKDATA_H - -#define IONetworkParameter IONetworkData // FIXME - -/*! @enum NetworkDataAccessTypes - @abstract Constants that describe access types. - @constant kIONetworkDataAccessTypeRead Read access. - @constant kIONetworkDataAccessTypeWrite Write access. - @constant kIONetworkDataAccessTypeReset Reset access. - @constant kIONetworkDataAccessTypeSerialize Serialization access. -*/ - -enum { - kIONetworkDataAccessTypeRead = 0x01, - kIONetworkDataAccessTypeWrite = 0x02, - kIONetworkDataAccessTypeReset = 0x04, - kIONetworkDataAccessTypeSerialize = 0x08, - kIONetworkDataAccessTypeMask = 0xff -}; - -/*! @define kIONetworkDataBasicAccessTypes - @discussion The default access types supported by an IONetworkData - object. Allow read() and serialize(). */ - -#define kIONetworkDataBasicAccessTypes \ - (kIONetworkDataAccessTypeRead | kIONetworkDataAccessTypeSerialize) - -/*! @enum NetworkDataBufferTypes - @abstract The types of data buffers that can be managed by an IONetworkData object. - @constant kIONetworkDataBufferTypeInternal An internal data buffer - allocated by the init() method. - @constant kIONetworkDataBufferTypeExternal An external (persistent) data - buffer. - @constant kIONetworkDataBufferTypeNone No data buffer. The only useful - action perfomed by an IONetworkData object with this buffer type - is to call the access notification handler. -*/ - -enum { - kIONetworkDataBufferTypeInternal = 0, - kIONetworkDataBufferTypeExternal, - kIONetworkDataBufferTypeNone -}; - -/*! @defined kIONetworkDataBytes - @abstract A property of IONetworkData objects. - @discussion The kIONetworkDataBytes property is an OSData that describes - the data buffer of an IONetworkData object. This property is present - only if kIONetworkDataAccessTypeSerialize access is supported. -*/ - -#define kIONetworkDataBytes "Data" - -/*! @defined kIONetworkDataAccessTypes - @abstract A property of IONetworkData objects. - @discussion The kIONetworkDataAccessTypes property is an OSNumber that - describes the supported access types of an IONetworkData object. -*/ - -#define kIONetworkDataAccessTypes "Access Types" - -/*! @defined kIONetworkDataSize - @abstract A property of IONetworkData objects. - @discussion The kIONetworkDataSize property is an OSNumber that - describes the size of the data buffer of an IONetworkData object. -*/ - -#define kIONetworkDataSize "Size" - -#ifdef KERNEL - -#include <libkern/c++/OSSymbol.h> -#include <libkern/c++/OSSerialize.h> - -/*! @class IONetworkData - @abstract An object that manages a fixed-size named buffer. - @discussion An IONetworkData object manages a fixed-size named buffer. - This object provides external access methods that can be used to - access the contents of the data buffer. In addition, serialization - is supported, and therefore this object can be added to a property - table to publish the data object. An unique name must be assigned to - the object during initialization. An OSSymbol key will be created - based on the assigned name, and this key can be used when the object - is added to a dictionary. - - The level of access granted to the access methods can be restricted, - by specifying a set of supported access types when the object is - initialized, or modified later by calling setAccessTypes(). By default, - each IONetworkData object created will support serialization, and will - also allow its data buffer to be read through the read() access method. - - An access notification handler, in the form of a 'C' function, can - be registered to receive a call each time the data buffer is accessed - through an access method. Arguments provided to the handler will identify - the data object and the type of access that triggered the notification. - The handler can therefore perform lazy update of the data buffer until - an interested party tries to read or serialize the data. The notification - handler can also take over the default action performed by the access - methods when the buffer type is set to kIONetworkDataBufferTypeNone. - This will prevent the access methods from accessing the data buffer, - and allow the handler to override the access protocol. - - This object is primarily used by IONetworkInterface to export interface - properties to user space. -*/ - - -class IONetworkData : public OSObject -{ - OSDeclareDefaultStructors( IONetworkData ) - -public: - -/*! @typedef Action - @abstract Defines a C function that may be called by an IONetworkData object - when one of its access methods is called. - @param target The target of the notification. - @param param A parameter that was provided when the notification - handler was registered. - @param data The IONetworkData object being accessed, and the - sender of the notification. - @param accessType A bit will be set indicating the type of access - which triggered the notification. - @param buffer Pointer to the accessor's buffer. Only valid for - read() and write() accesses. - @param bufferSize Pointer to the size of the accessor's buffer. - @param offset An offset from the start of the data buffer to begin - reading or writing. -*/ - - typedef IOReturn (*Action)(void * target, - void * param, - IONetworkData * data, - UInt32 accessType, - void * buffer, - UInt32 * bufferSize, - UInt32 offset); - -protected: - const OSSymbol * _key; // key associated with this object. - UInt32 _access; // supported access types. - void * _buffer; // Data buffer. - UInt32 _bufType; // buffer type - UInt32 _size; // data buffer size. - void * _tapTarget; // target for access notification. - Action _tapAction; // the function to call. - void * _tapParam; // arbitrary notification param. - - struct ExpansionData { }; - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * _reserved; - - -/*! @function free - @abstract Frees the IONetworkData object. -*/ - - virtual void free(); - -/*! @function writeBytes - @abstract Writes to the data buffer with data from a source buffer - provided by the caller. - @param srcBuffer Pointer to a source buffer provided by the caller. - @param srcBufferSize The size of the source buffer. - @param writeOffset A byte offset from the start of the data buffer - to begin writting. - @result Returns true if the operation was successful, false otherwise. -*/ - - virtual bool writeBytes(const void * srcBuffer, - UInt32 srcBufferSize, - UInt32 writeOffset = 0); - -/*! @function readBytes - @abstract Reads from the data buffer and copies the data to a destination - buffer provided by the caller. - @param dstBuffer Pointer to the destination buffer. - @param dstBufferSize Pointer to an integer containing the size of the - destination buffer. And is overwritten by this method with the actual - number of bytes copied to the destination buffer. - @param readOffset A byte offset from the start of the data buffer - to begin reading. - @result Returns true if the operation was successful, false otherwise. -*/ - - virtual bool readBytes(void * dstBuffer, - UInt32 * dstBufferSize, - UInt32 readOffset = 0) const; - -/*! @function clearBuffer - @abstract Clears the data buffer by filling it with zeroes. - @result Returns true if the operation was successful, false otherwise. -*/ - - virtual bool clearBuffer(); - -public: - -/*! @function withInternalBuffer - @abstract Factory method that constructs and initializes an - IONetworkData object with an internal data buffer. - @param name A name to assign to this object. - @param bufferSize The number of bytes to allocate for the internal data - buffer. - @param accessTypes The initial supported access types. - @param target The notification target. - @param action The notification action. - @param param A parameter to pass to the notification action. - @result Returns an IONetworkData object on success, or 0 otherwise. -*/ - - static IONetworkData * - withInternalBuffer(const char * name, - UInt32 bufferSize, - UInt32 accessTypes = - kIONetworkDataBasicAccessTypes, - void * target = 0, - Action action = 0, - void * param = 0); - -/*! @function withExternalBuffer - @abstract Factory method that constructs and initializes an - IONetworkData object with an external data buffer. - @param name A name to assign to this object. - @param bufferSize The size of the external data buffer. - @param externalBuffer Pointer to the external data buffer. - @param accessTypes The initial supported access types. - @param target The notification target. - @param action The notification action. - @param param A parameter to pass to the notification action. - @result Returns an IONetworkData object on success, or 0 otherwise. -*/ - - static IONetworkData * - withExternalBuffer(const char * name, - UInt32 bufferSize, - void * externalBuffer, - UInt32 accessTypes = - kIONetworkDataBasicAccessTypes, - void * target = 0, - Action action = 0, - void * param = 0); - -/*! @function withNoBuffer - @abstract Factory method that constructs and initializes an - IONetworkData object without a data buffer. - @discussion The notification handler - must intervene when the IONetworkData is accessed. - @param name A name to assign to this object. - @param bufferSize The size of the phantom data buffer. - @param accessTypes The initial supported access types. - @param target The notification target. - @param action The notification action. - @param param A parameter to pass to the notification action. - @result Returns an IONetworkData object on success, or 0 otherwise. -*/ - - static IONetworkData * withNoBuffer(const char * name, - UInt32 bufferSize, - UInt32 accessTypes, - void * target, - Action action, - void * param = 0); - -/*! @function init - @abstract Initializes an IONetworkData object. - @param name A name to assign to this object. - @param bufferType The type of buffer associated with this object. - @param bufferSize The size of the data buffer. - @param externalBuffer Pointer to an external data buffer. - @param accessTypes The initial supported access types. - Can be later modified by calling setAccessTypes(). - @param target The notification target. - @param action The notification action. - @param param A parameter to pass to the notification action. - @result Returns true if initialized successfully, false otherwise. -*/ - - virtual bool init(const char * name, - UInt32 bufferType, - UInt32 bufferSize, - void * externalBuffer = 0, - UInt32 accessTypes = - kIONetworkDataBasicAccessTypes, - void * target = 0, - Action action = 0, - void * param = 0); - -/*! @function setAccessTypes - @abstract Sets the types of access that are permitted on the data buffer. - @param types A mask of access types indicating the supported access - types. -*/ - - virtual void setAccessTypes(UInt32 types); - -/*! @function setNotificationTarget - @abstract Registers a C function to handle access notifications sent - from this object. - @discussion A notification is sent by an IONetworkData object to the - registered notification handler, when an access method is called to - modify the contents of the data buffer. - @param target The first parameter passed to the notification handler. - @param action A pointer to a C function that will handle the notification. - If 0, then notification is disabled. - @param param An optional parameter passed to the notification handler. -*/ - - virtual void setNotificationTarget(void * target, - Action action, - void * param = 0); - -/*! @function getBuffer - @abstract Gets a pointer to the data buffer. - @result Returns a pointer to the data buffer. Returns 0 if the buffer type is - kIONetworkDataBufferTypeNone. -*/ - - virtual const void * getBuffer() const; - -/*! @function getBufferType - @abstract Gets the type of data buffer managed by this object. - @result Returns a constant that describes the type of the data buffer. -*/ - - virtual UInt32 getBufferType() const; - -/*! @function getAccessTypes - @abstract Gets the types of data access supported by this object. - @result Returns a mask of supported access types. -*/ - - virtual UInt32 getAccessTypes() const; - -/*! @function getNotificationTarget - @abstract Gets the first parameter that will be passed to the access - notification handler. - @result Returns the first parameter that will be passed to the access notification - handler. -*/ - - virtual void * getNotificationTarget() const; - -/*! @function getNotificationAction - @abstract Gets the C function that was registered to handle access - notifications sent from this object. - @result Returns a pointer to a C function, or 0 if notification is disabled. -*/ - - virtual Action getNotificationAction() const; - -/*! @function getNotificationParameter - @abstract Gets the parameter that will be passed to the access - notification handler. - @result Returns the parameter that will be passed to the access notification - handler. -*/ - - virtual void * getNotificationParameter() const; - -/*! @function getKey - @abstract Gets a unique OSSymbol key associated with this object. - @discussion During initialization, IONetworkData will create an - OSSymbol key based on its assigned name. - @result Returns an OSSymbol key that was generated from the name assigned to - this object. -*/ - - virtual const OSSymbol * getKey() const; - -/*! @function getSize - @abstract Gets the size of the data buffer. - @result Returns the size of the data buffer managed by this object in bytes. -*/ - - virtual UInt32 getSize() const; - -/*! @function reset - @abstract An access method that resets the data buffer. - @discussion This method handles an external request to reset the data buffer. - If notification is enabled, then the notification handler is called - after the data buffer has been cleared. - @result Returns kIOReturnSuccess on success, - kIOReturnNotWritable if reset access is not permitted, - or an error from the notification handler. -*/ - - virtual IOReturn reset(); - -/*! @function read - @abstract An access method that reads from the data buffer. - @discussion This method handles an external request to read from the data buffer - and copy it to the destination buffer provided by the accessor. - If notification is enabled, then the notification handler is called - before the data buffer is copied to the destination buffer. The - notification handler may use this opportunity to intervene and - to update the contents of the data buffer. - @param dstBuffer Pointer to the destination buffer. - @param dstBufferSize Pointer to an integer containing the size of the - destination buffer. And is overwritten by this method to the actual number - of bytes copied to the destination buffer. - @param readOffset An offset from the start of the source data buffer to - begin reading. - @result Returns kIOReturnSuccess on success, - kIOReturnBadArgument if any of the arguments provided is invalid, - kIOReturnNotReadable if read access is not permitted, - or an error from the notification handler. -*/ - - virtual IOReturn read(void * dstBuffer, - UInt32 * dstBufferSize, - UInt32 readOffset = 0); - -/*! @function write - @abstract An access method that writes to the data buffer. - @discussion This method handles an external request to write to the data buffer - from a source buffer provided by the accessor. After checking that - the data object supports write accesses, the data buffer is updated - if it exists. Then the registered notification handler is called. - @param srcBuffer Pointer to the source buffer. - @param srcBufferSize The number of bytes to write to the data buffer. - @param writeOffset An offset from the start of the destination data buffer - to begin writing. - @result Returns kIOReturnSuccess on success, - kIOReturnBadArgument if any of the arguments provided is invalid, - kIOReturnNotWritable if write access is not permitted, - or an error from the notification handler. -*/ - - virtual IOReturn write(void * srcBuffer, - UInt32 srcBufferSize, - UInt32 writeOffset = 0); - -/*! @function serialize - @abstract Serializes the IONetworkData object. - @discussion If notification is enabled, then the notification - handler is called just before the data buffer is serialized. - @param s An OSSerialize object. - @result Returns true on success, false otherwise. -*/ - - virtual bool serialize(OSSerialize * s) const; - - // Virtual function padding - OSMetaClassDeclareReservedUnused( IONetworkData, 0); - OSMetaClassDeclareReservedUnused( IONetworkData, 1); - OSMetaClassDeclareReservedUnused( IONetworkData, 2); - OSMetaClassDeclareReservedUnused( IONetworkData, 3); -}; - -#endif /* KERNEL */ - -#endif /* !_IONETWORKDATA_H */ diff --git a/i386/include/IOKit/network/IONetworkInterface.h b/i386/include/IOKit/network/IONetworkInterface.h deleted file mode 100644 index af02364..0000000 --- a/i386/include/IOKit/network/IONetworkInterface.h +++ /dev/null @@ -1,1104 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IONETWORKINTERFACE_H -#define _IONETWORKINTERFACE_H - -/*! @defined kIONetworkInterfaceClass - @abstract The name of the IONetworkInterface class. -*/ - -#define kIONetworkInterfaceClass "IONetworkInterface" - -/*! @defined kIONetworkData - @abstract A property of IONetworkInterface - objects. - @discussion The kIONetworkData property has an OSDictionary value and is a container for the - set of IONetworkData objects managed by the interface. - Each entry in the dictionary is a key/value pair consisting of - the network data name, and an OSDictionary describing the - contents of the network data. -*/ - -#define kIONetworkData "IONetworkData" - -/*! @defined kIOInterfaceType - @abstract A property of IONetworkInterface objects. - @discussion The kIOInterfaceType property has an OSNumber value that specifies the type of - network interface that this interface represents. The type - constants are defined in bsd/net/if_types.h. -*/ - -#define kIOInterfaceType "IOInterfaceType" - -/*! @defined kIOMaxTransferUnit - @abstract A property of IONetworkInterface objects. - @discussion The kIOMaxTransferUnit property has an OSNumber value that specifies the maximum - transfer unit for the interface in bytes. -*/ - -#define kIOMaxTransferUnit "IOMaxTransferUnit" - -/*! @defined kIOMediaAddressLength - @abstract A property of IONetworkInterface objects. - @discussion The kIOMediaAddressLength property has an OSNumber value that specifies the size of the - media address in bytes. -*/ - -#define kIOMediaAddressLength "IOMediaAddressLength" - -/*! @defined kIOMediaHeaderLength - @abstract A property of IONetworkInterface objects. - @discussion The kIOMediaHeaderLength property has an OSNumber value that specifies the size of the - media header in bytes. -*/ - -#define kIOMediaHeaderLength "IOMediaHeaderLength" - -/*! @defined kIOInterfaceFlags - @abstract A property of IONetworkInterface objects. - @discussion The kIOInterfaceFlags property has an OSNumber value that specifies the current value - of the interface flags. The flag constants are defined in - bsd/net/if.h. -*/ - -#define kIOInterfaceFlags "IOInterfaceFlags" - -/*! @defined kIOInterfaceExtraFlags - @abstract A property of IONetworkInterface objects. - @discussion The kIOInterfaceExtraFlags property has an OSNumber value that specifies the current - value of the interface extra flags. The extra flag constants are - defined in bsd/net/if.h. -*/ - -#define kIOInterfaceExtraFlags "IOInterfaceExtraFlags" - -/*! @defined kIOInterfaceUnit - @abstract A property of IONetworkInterface objects. - @discussion The kIOInterfaceUnit property has an OSNumber value that describes the unit number - assigned to the interface object. -*/ - -#define kIOInterfaceUnit "IOInterfaceUnit" - -/*! @defined kIOInterfaceState - @abstract A property of IONetworkInterface objects. - @discussion The kIOInterfaceState property has an OSNumber value that describes the current state - of the interface object. This property is not exported to BSD via - the ifnet structure. -*/ - -#define kIOInterfaceState "IOInterfaceState" - -/*! @defined kIOInterfaceNamePrefix - @abstract A property of IONetworkInterface objects. - @discussion The kIOInterfaceNamePrefix property has an OSString value that describes the string - prefix for the BSD name assigned to the interface. -*/ - -#define kIOInterfaceNamePrefix "IOInterfaceNamePrefix" - -/*! @defined kIOPrimaryInterface - @abstract A property of IONetworkInterface objects. - @discussion The kIOInterfaceNamePrefix property has an OSBoolean value that describes whether the - interface is the primary or the built-in network interface. -*/ - -#define kIOPrimaryInterface "IOPrimaryInterface" - -/*! @defined kIOBuiltin - @abstract kIOBuiltin is a property of IONetworkInterface - objects. It has an OSBoolean value. - @discussion The kIOBuiltin property describes whether the - interface is built-in. -*/ - -#define kIOBuiltin "IOBuiltin" - -/*! @defined kIOLocation - @abstract kIOLocation is a property of IONetworkInterface - objects. It has an OSString value. - @discussion The kIOLocation property describes the physical - location of built-in interfaces. -*/ - -#define kIOLocation "IOLocation" - -/*! @enum InterfaceObjectStates - @discussion Constants used to encode the state of the interface object. - @constant kIONetworkInterfaceRegisteredState The interface object has - registered with the data link layer. - @constant kIONetworkInterfaceOpenedState One or more clients have an - open on the interface object. - @constant kIONetworkInterfaceDisabledState The interface is temporarily - unable to service its clients. This will occur when the network - controller that is servicing the interface has entered a low power - state that renders it unusable. -*/ - -enum { - kIONetworkInterfaceRegisteredState = 0x1, - kIONetworkInterfaceOpenedState = 0x2, - kIONetworkInterfaceDisabledState = 0x4 -}; - -/* - * Kernel - */ -#if defined(KERNEL) && defined(__cplusplus) - -#include <IOKit/IOService.h> -#include <IOKit/network/IONetworkData.h> -#include <IOKit/network/IONetworkStats.h> -#include <IOKit/network/IONetworkMedium.h> -#include <net/kpi_interface.h> - -class IONetworkController; -class IONetworkStack; -class IOCommandGate; - -/*! @typedef IOOutputAction - @discussion Prototype for an output packet handler that will process - all outbound packets sent to the interface from the data link layer. - An output handler is registered with the interface by calling - registerOutputHandler(). - @param m A packet mbuf. - @param param A parameter for the output request. */ - -typedef UInt32 (OSObject::*IOOutputAction)(mbuf_t, void * param); - -/*! @typedef BPF_FUNC - @discussion Prototype for the BPF tap handler. This will disappear - when the correct DLIL header file is included. */ - -typedef int (*BPF_FUNC)(struct ifnet *, struct mbuf *); - -// Network event types recognized by inputEvent(). -// -enum { - /* DLIL defined event, argument must be a pointer to a - kern_event_msg structure. */ - kIONetworkEventTypeDLIL = 0xff000001, - - /* Link up event, no argument */ - kIONetworkEventTypeLinkUp = 0xff000002, - - /* Link down event, no argument */ - kIONetworkEventTypeLinkDown = 0xff000003, - - /* Wake on LAN support changed, no argument */ - kIONetworkEventWakeOnLANSupportChanged = 0xff000004 -}; - -/*! @class IONetworkInterface - @abstract Abstract class that manages the connection between an IONetworkController and the data link interface layer. - @discussion An IONetworkInterface object manages the connection between - an IONetworkController and the data link interface layer (DLIL). - All interactions between the controller and DLIL must go through an - interface object. Any data structures that are required by DLIL for a - particular interface type shall be allocated and mantained by the - interface object. IONetworkInterface is an abstract class that must be - extended by a concrete subclass to specialize for a particular network - type. - - Although most drivers will allocate a single interface object, - it is possible for multiple interfaces to be attached to a single - controller. This controller driver will be responsible for arbitrating - access among its multiple interface clients. - - IONetworkInterface also maintains a dictionary of IONetworkData - objects containing statistics structures. Controller drivers can - ask for a particular data object by name and update the - statistics counters within directly. This dictionary is added to - the interface's property table and is visible outside of the kernel. -*/ - -class IONetworkInterface : public IOService -{ - OSDeclareAbstractStructors( IONetworkInterface ) - - friend class IONetworkStack; - -private: - IONetworkController * _controller; - ifnet_t _backingIfnet; - IORecursiveLock * _ifLock; - OSSet * _clientSet; - OSNumber * _stateBits; - bpf_packet_func _inputFilterFunc; - bpf_packet_func _outputFilterFunc; - OSObject * _outTarget; - IOOutputAction _outAction; - UInt32 _clientVar[4]; - OSDictionary * _dataDict; - mbuf_t _inputQHead; - mbuf_t _inputQTail; - UInt32 _inputQCount; - - struct ExpansionData { - int unit; - int type; - int mtu; - int flags; - int eflags; - int addrlen; - int hdrlen; - IONetworkStats driverStats; - IONetworkStats lastDriverStats; - struct ifnet_stat_increment_param inputDeltas; - IOLock *detachLock; - char *remote_NMI_pattern; - unsigned int remote_NMI_len; - }; - - ExpansionData * _reserved; - - void _syncFromBackingIfnet() const; - void _syncToBackingIfnet(); - - bool _syncNetworkDataDict(); - bool _setInterfaceProperty(UInt32 value, - UInt32 mask, - UInt32 bytes, - void * addr, - char * name); - - SInt32 syncSIOCSIFMEDIA(IONetworkController * ctlr, struct ifreq * ifr); - SInt32 syncSIOCGIFMEDIA(IONetworkController * ctlr, struct ifreq * ifr, unsigned long cmd); - SInt32 syncSIOCSIFMTU(IONetworkController * ctlr, struct ifreq * ifr); - - static int performGatedCommand(void *, void *, void *, void *, void *); - static errno_t ioctl_shim(ifnet_t ifp, unsigned long cmd, void * data); - static errno_t set_bpf_tap_shim(ifnet_t ifn, bpf_tap_mode mode, bpf_packet_func func); - static int output_shim(ifnet_t ifp, mbuf_t); - void DLIL_INPUT(mbuf_t m_head); - static void detach_shim(ifnet_t ifp); - static void powerChangeHandler(void *, void *, void *); - -public: - -/*! @function isPrimaryInterface - @abstract Queries whether the interface object provided represents - the "primary" network interface for the system. - @result Returns true if the interface provided is the primary inteface, - false otherwise. -*/ - - virtual bool isPrimaryInterface() const; - -/*! @function init - @abstract Initializes an IONetworkInterface object. - @discussion Initializes instance variables, and allocates resources. - @param controller A network controller object that will service - the interface object being initialized. - @result Returns true on success, false otherwise. -*/ - - virtual bool init( IONetworkController * controller ); - -/*! @function isRegistered - @abstract Returns true if the interface has been registered with - the data link layer. - @discussion Once registered, the interface will be assigned a - BSD name (such as en0), and a kIOBSDNameKey property is added to the - property table containing this name. Calling this method performs - the same function as checking for the kIONetworkInterfaceRegisteredState - bit in the value returned by getInterfaceState(). - @result Returns true if interface is registered. Returns false if the data link layer - has no references to this network interface, which implies that either the - interface has yet to attach to the data link layer, or the interface has - been detached. -*/ - - virtual bool isRegistered() const; - -/*! @function getInterfaceState - @abstract Reports the current state of the interface object by returning - the interface state flags. - @result Returns the interface state flags. -*/ - - virtual UInt32 getInterfaceState() const; - -/*! @function matchPropertyTable - @abstract Overrides the implementation in IOService to - implement family-specific matching. - @discussion When the gIOLocationMatchKey property is present in the - dictionary provided, then fail the match unless the kIOBSDNameKey property - is found. This is to prevent a premature match when hunting for a root - device for BSD. The presence of the kIOBSDNameKey property indicates that - the interface has registered with BSD, and is a valid candidate for - matching against the gIOLocationMatchKey property. If the - gIOLocationMatchKey property is absent, then this method will always - return true. - @param table The dictionary of properties to match against. - @param score Pointer to the current driver's probe score, not used. - @result Returns true for a positive match, false otherwise. -*/ - - virtual bool matchPropertyTable( OSDictionary * table, - SInt32 * score ); - -/*! @function getController - @abstract Returns the provider, an IONetworkController object, that - is servicing this interface object. - @discussion This is the same controller object that was supplied as - an argument to the init() method. - @result Returns the IONetworkController object that is providing service to - this interface object. -*/ - - virtual IONetworkController * getController() const; - -/*! @function inputPacket - @abstract Submits a single packet received from the network to the data link layer. - @discussion This method is called by the network controller to submit a single packet - received from the network to the data link layer. The packet received by this method may be added to an input - queue on the interface object, which the controller can use to postpone - the packet handoff to the upper layers, until all received packets have - been transferred to the input queue. A subsequent call to flushInputQueue(), - will transfer the entire contents of the queue to the data link layer, - by making a single call to dlil_input(). Other methods that can be used - to manage the input queue are flushInputQueue() and clearInputQueue(). - This input queue is not protected by a lock. Access to the queue by the - controller must be serialized, otherwise its use must be avoided. - @param m The mbuf containing the received packet. - @param length Specify the size of the received packet in the mbuf. - The mbuf length fields are updated with this value. If zero, - then the mbuf length fields are not updated. - @param options Options defined by inputPacket() that the caller - can use to specify this method call. - @param param A parameter provided by the caller. Not used by - IONetworkInterface. - @result Returns the number of packets that were submitted to the data link layer, - or 0 if the packet was queued. -*/ - - virtual UInt32 inputPacket(mbuf_t, - UInt32 length = 0, - IOOptionBits options = 0, - void * param = 0); - -/*! @enum InputOptionQueuePacket - @discussion The option bits that can be specified - in the options argument when calling inputPacket(). - @constant kInputOptionQueuePacket Keep the packet provided in the - input packet queue. No packets are sent to the data link layers, - and the caller's thread will not venture outside the interface - object. Calls to inputPacket() must be serialized. -*/ - - enum { - kInputOptionQueuePacket = 0x1 - }; - -/*! @function flushInputQueue - @abstract Sends all packets held in the input queue to the data - link layer. - @discussion Remove all packets from the input queue and - send them to the data link layer by calling dlil_input(). This - method should be used in connection with the inputPacket() method, - to flush the input queue after inputPacket() was used to queue up - some number of received packets. See inputPacket() and clearInputQueue(). - @result Returns the number of packets that were submitted to the data link layer. - May be zero if the queue was empty. -*/ - - virtual UInt32 flushInputQueue(); - -/*! @function clearInputQueue - @abstract Removes and discards all packets in the input queue. - @discussion This method removes all packets from the input queue and - releases them back to the free mbuf pool. Also see flushInputQueue(). - @result Returns the number of packets freed. -*/ - - virtual UInt32 clearInputQueue(); - -/*! @function inputEvent - @abstract Sends an event to the data link layer. - @discussion This method can be used by the network controller to - send an event to the data link layer. - @param type A constant describing the event type. - @param data Data associated with the event. - @result Returns true if the event was delivered, false if the event type - specified is invalid, or if the event delivery was unsuccesful. -*/ - - virtual bool inputEvent(UInt32 type, void * data); - -/*! @function registerOutputHandler - @abstract Registers a target/action to handle output packets. - @discussion The interface object will forward all output packets, - received from the data link layer, to the output handler registered - through this method. The default target and action are set by the init() - method to the controller, and the handler returned by the controller's - getOutputHandler() method. Once the interface becomes registered with - the data link layer, this method will return false and will reject any - further changes. - @param target Target object that implements the output handler. - @param action The function that will process output packets. - @result Returns true if the target/action provided was accepted, - false otherwise. -*/ - - virtual bool registerOutputHandler(OSObject * target, - IOOutputAction action); - -/*! @function getNamePrefix - @abstract Returns a string containing the prefix to use when - creating a BSD name for this interface. - @discussion The BSD name for each interface object is generated by - concatenating a string returned by this method, with an unique - unit number assigned by IONetworkStack. - A concrete subclass of IONetworkInterface must implement this method - and enforce a consistent name for all of its instances. - @result Returns a pointer to a constant C string. -*/ - - virtual const char * getNamePrefix() const = 0; - -/*! @function getInterfaceType - @abstract Gets the interface type. - @discussion This method returns the value in the if_type field in the ifnet structure. - @result Returns a constant defined in bsd/net/if_types.h header file - that describes the interface type. -*/ - - virtual UInt8 getInterfaceType() const; - -/*! @function getMaxTransferUnit - @abstract Gets the maximum transfer unit for this interface. - @discussion This method returns the value in the if_mtu field in the ifnet structure. - @result Returns the interface MTU size in bytes. -*/ - - virtual UInt32 getMaxTransferUnit() const; - -/*! @function getFlags - @abstract Gets the value of the interface flags. - @discussion This method returns the value in the if_flags field in the ifnet structure. - @result Returns the value of the interface flags. -*/ - - virtual UInt16 getFlags() const; - -/*! @function getExtraFlags - @abstract Gets the value of the interface extra flags. - @discussion This method returns the value in the if_eflags field in the ifnet structure. - @result Returns the value of the interface extra flags. -*/ - - virtual UInt32 getExtraFlags() const; - -/*! @function getMediaAddressLength - @abstract Gets the size of the media (MAC-layer) address. - @discussion This method returns the value in the if_addrlen field in the ifnet structure. - @result Returns the size of the media address in bytes. -*/ - - virtual UInt8 getMediaAddressLength() const; - -/*! @function getMediaHeaderLength - @abstract Gets the size of the media header. - @discussion This method returns the value in the if_hdrlen field in the ifnet structure. - @result Returns the size of the media header in bytes. -*/ - - virtual UInt8 getMediaHeaderLength() const; - -/*! @function getUnitNumber - @abstract Gets the unit number assigned to this interface object. - @discussion This method returns the value in the if_unit field in the ifnet structure. - @result Returns the assigned interface unit number. -*/ - - virtual UInt16 getUnitNumber() const; - -/*! @function addNetworkData - @abstract Adds an IONetworkData object to a dictionary managed by - the interface. - @param aData An IONetworkData object to be added to a dictionary - managed by the interface. This object is retained by the dictionary. - @result Returns true if the operation was successful, false otherwise. -*/ - - virtual bool addNetworkData(IONetworkData * aData); - -/*! @function removeNetworkData - @abstract Removes an entry from the IONetworkData dictionary - managed by the interface. - @discussion This method removes an entry from the IONetworkData dictionary - managed by the interface. The removed object is released. - @param aKey A unique OSSymbol identifying the IONetworkData object - to be removed from the dictionary. - @result Returns true if the operation was successful, false otherwise. -*/ - - virtual bool removeNetworkData(const OSSymbol * aKey); - -/*! @function removeNetworkData - @abstract Removes an entry from the IONetworkData dictionary - managed by the interface. - @discussion This method removes an entry from the IONetworkData dictionary - managed by the interface. The removed object is released. - @param aKey A unique string identifying the IONetworkData object - to be removed from the dictionary. - @result Returns true if the operation was successful, false otherwise. -*/ - - virtual bool removeNetworkData(const char * aKey); - -/*! @function getNetworkData - @abstract Gets an IONetworkData object from the interface that is - associated with the given key. - @param aKey The unique string identifying the IONetworkData object to be - returned to caller. - @result Returns a reference to the matching IONetworkData object, - or 0 if no match was found. -*/ - - virtual IONetworkData * getNetworkData(const char * aKey) const; - -/*! @function getNetworkData - @abstract Gets an IONetworkData object from the interface that is - associated with the given key. - @param aKey The unique OSSymbol identifying the IONetworkData object to be - returned to caller. - @result Returns a reference to the matching IONetworkData object, - or 0 if no match was found. -*/ - - virtual IONetworkData * getNetworkData(const OSSymbol * aKey) const; - -/*! @function setProperties - @abstract Handles a request to set network interface properties from - kernel or non-kernel clients. - @discussion For non-kernel clients, the preferred - access mechanism is through a user client connection. - @param properties An OSDictionary containing a collection of - properties. - @result Returns kIOReturnUnsupported if the interface did not - recognize any of the properties provided. Otherwise, the return - code will be kIOReturnSuccess to indicate no errors, or an - IOReturn error code to indicate that an error occurred while - handling one of the properties. -*/ - - virtual IOReturn setProperties( OSObject * properties ); - - // FIXME - Compatibility methods (to be removed) - IONetworkData * getParameter(const char * aKey) const; - bool setExtendedFlags(UInt32 flags, UInt32 clear = 0); - - virtual IOReturn message( UInt32 type, IOService * provider, void * argument ); - -/*! @function debuggerRegistered - @abstract Tells the IONetworkInterface that this interface will be used - by the debugger. -*/ - void debuggerRegistered(void); - -protected: - -/*! @function setInterfaceType - @abstract Sest the interface type. - @discussion Both the if_type field in the ifnet structure, and the - kIOInterfaceType property are updated with the value provided. - @param type A constant defined in bsd/net/if_types.h header file - that describes the interface type. - @result Returns true if the update was successful, false otherwise. -*/ - - virtual bool setInterfaceType(UInt8 type); - -/*! @function setMaxTransferUnit - @abstract Sets the maximum transfer unit for this interface. - @discussion Both the if_mtu field in the ifnet structure, and the - kIOMaxTransferUnit property are updated with the value provided. - @param mtu The interface MTU size in bytes. - @result Returns true if the update was successful, false otherwise. -*/ - - virtual bool setMaxTransferUnit(UInt32 mtu); - -/*! @function setFlags - @abstract Performs a read-modify-write operation on the current - interface flags value. - @discussion See bsd/net/if.h header file for the definition of the - flag constants. Both the if_flags field in the ifnet structure, and - the kIOInterfaceFlags property are updated with the value provided. - @param flags The bits that should be set. - @param clear The bits that should be cleared. If 0, then non - of the flags are cleared and the result is formed by OR'ing the - original flags value with the new flags. - @result Returns true if the update was successful, false otherwise. -*/ - - virtual bool setFlags(UInt16 flags, UInt16 clear = 0); - -/*! @function setExtraFlags - @abstract Performs a read-modify-write operation on the current - interface extra flags value. - @discussion See bsd/net/if.h header file for the definition of the - extra flag constants. Both the if_eflags field in the ifnet structure, - and the kIOInterfaceExtraFlags property are updated with the value - provided. - @param flags The bits that should be set. - @param flags The bits that should be set. - @param clear The bits that should be cleared. If 0, then non - of the flags are cleared and the result is formed by OR'ing the - original flags with the new flags. - @result Returns true if the update was successful, false otherwise. -*/ - - virtual bool setExtraFlags(UInt32 flags, UInt32 clear = 0); - -/*! @function setMediaAddressLength - @abstract Sets the size of the media (MAC-layer) address. - @discussion Both the if_addrlen field in the ifnet structure, and the - kIOMediaAddressLength property are updated with the value provided. - @param length The size of the media address in bytes. - @result Returns true if the update was successful, false otherwise. -*/ - - virtual bool setMediaAddressLength(UInt8 length); - -/*! @function setMediaHeaderLength - @abstract Sets the size of the media header. - @discussion Both the if_hdrlen field in the ifnet structure, and the - kIOMediaHeaderLength property are updated with the value provided. - @param length The size of the media header in bytes. - @result Returns true if the update was successful, false otherwise. -*/ - - virtual bool setMediaHeaderLength(UInt8 length); - -/*! @function setUnitNumber - @abstract Assigns a unique unit number to this interface. - @discussion This method is called by IONetworkStack before the - interface is registered with the data link layer, to assign a - unique unit number to the interface object. Both the if_unit field - in the ifnet structure, and the kIOInterfaceUnit property are updated - with the value provided. - @param unit The unit number assigned to this interface object. - @result Returns true if the update was successful, false otherwise. -*/ - - virtual bool setUnitNumber(UInt16 unit); - -/*! @function free - @abstract Frees the IONetworkInterface object. - @discussion Resource allocated by init() are released, and - clearInputQueue() is called to ensure that the input queue is empty. -*/ - - virtual void free(); - -/*! @function handleOpen - @abstract Handles a client open on the interface. - @discussion This method is called by IOService::open() with the - arbitration lock held, and must return true to accept the client open. - This method will in turn call handleClientOpen() to qualify the client - requesting the open. Since the controller is opened by the interface - in a lazy fashion, the interface may also perform an open on the - controller before this method returns. If the controller was opened, - then controllerDidOpen() is called to notify interested subclasses. - Subclasses should not override this method. - @param client The client object that requested the open. - @param options Options passed to IOService::open(). - @param argument Argument passed to IOService::open(). - @result Returns true to accept the client open, false otherwise. -*/ - - virtual bool handleOpen(IOService * client, - IOOptionBits options, - void * argument); - -/*! @function handleClose - @abstract Handles a client close on the interface. - @discussion This method is called by IOService::close() with the - arbitration lock held. This method will in turn call handleClientClose() - to notify interested subclasses about the client close. If this represents - the last close, then the interface will also close the controller before - this method returns. The controllerWillClose() method will be called before - closing the controller. Subclasses should not override this method. - @param client The client object that requested the close. - @param options Options passed to IOService::close(). -*/ - - virtual void handleClose(IOService * client, IOOptionBits options); - -/*! @function handleIsOpen - @abstract Queries whether a client has an open on the interface. - @discussion This method is always called by IOService with the - arbitration lock held. Subclasses should not override this method. - @result Returns true if the specified client, or any client if none (0) is - specified, presently has an open on this object. -*/ - - virtual bool handleIsOpen(const IOService * client) const; - -/*! @function lock - @abstract Takes the network interface lock. - @discussion This method takes the recursive lock that protects the interface - state. All updates to the interface state and to the ifnet structure - must be performed while holding this lock. This call must be balanced - by a subsequent call to unlock(). -*/ - - virtual void lock(); - -/*! @function unlock - @abstract Releases the network interface lock. - @discussion This method releases the recursive lock that protects the interface - state to balance a previous lock() call. -*/ - - virtual void unlock(); - -/*! @function controllerDidOpen - @abstract Sends a notification that the interface has opened the network - controller. - @discussion This method is called by handleOpen() to notify subclasses that the - controller has been opened. The open on the controller is done when - the interface receives the initial open request from a client. - Subclasses can override this method and inspect the controller before - allowing the client open. The implementation in the subclass must first - call the method in super and check the return value. This method is - called with our arbitration lock held, hence issuing I/O to the - controller must be avoided to eliminate the possibility of a - deadlock. - @param controller The controller that was opened. - @result Must return true in order for handleOpen() to accept - the client open. If the return is false, then the controller will be - closed and the client open will be refused. -*/ - - virtual bool controllerDidOpen(IONetworkController * controller); - -/*! @function controllerWillClose - @abstract Sends a notification that the interface will close the network - controller. - @discussion This method is called by handleClose() after receiving a close from the - last client, and just before the controller is closed. Subclasses - can override this method to perform any cleanup action before the - controller is closed. This method is called with our arbitration lock - held, hence issuing I/O to the controller must be avoided to eliminate - the possibility of a deadlock. - @param controller The controller that is about to be closed. -*/ - - virtual void controllerWillClose(IONetworkController * controller); - -/*! @function performCommand - @abstract Handles an ioctl command sent to the network interface. - @discussion This method handles socket ioctl commands sent to the - network interface from DLIL. - IONetworkInterface handles commands that are common for all network - interface types. A subclass of IONetworkInterface may override this - method to override the command handling in IONetworkInterface, or - to extend the command processing to handle additional commands, - and then call super for any commands not handled in the subclass. - The ioctl commands handled by IONetworkInterface are - SIOCGIFMTU (Get interface MTU size), - SIOCSIFMTU (Set interface MTU size), - SIOCSIFMEDIA (Set media), and - SIOCGIFMEDIA (Get media and link status). - @param controller The controller object. - @param cmd The ioctl command code. - @param arg0 Command argument 0. Generally a pointer to an ifnet structure - associated with the interface. - @param arg1 Command argument 1. - @result Returns a BSD return value defined in bsd/sys/errno.h. -*/ - - virtual SInt32 performCommand(IONetworkController * controller, - unsigned long cmd, - void * arg0, - void * arg1); - -public: - -/*! @function getIfnet - @abstract Gets the ifnet_t allocated by the interface object. - @discussion Reveal the interface's ifnet_t. The ifnet_t is managed - primarily by IONetworkInterface, however sub-classes or drivers - can use this method to get a reference to the ifnet_t object for - interface KPI calls. - @result Returns the ifnet_t object that is attached to the datalink layer. -*/ - - virtual ifnet_t getIfnet() const ; - -protected: - -/*! @function initIfnet - @abstract Initializes the ifnet structure given. - @discussion A concrete subclass must override this method and initialize - the ifnet structure given. The implementation in the subclass must call - super before it returns, to allow IONetworkInterface to complete the - initialization, and to insert the BSD shim functions implemented in - IONetworkInterface to the appropriate function pointer fields in the - ifnet structure. IONetworkInterface will call this method during its - init() method. Subclasses are encouraged to use the ifnet accessor - methods to update the ifnet structure when possible, since this will - ensure that properties in the registry will also be updated to reflect - any changes made. - @param ifp Pointer to an ifnet structure obtained earlier through - the getIfnet() method call. - @result Returns true on success, false otherwise. -*/ - - virtual bool initIfnet(struct ifnet * ifp); - -/*! @function handleClientOpen - @abstract Handles a client open on the interface. - @discussion This method is called by handleOpen() to handle an open from a client object. - Unlike handleOpen(), subclasses may override this method to catch an open - request from a client. This method is called with the arbitration lock held. - @param client The client object requesting the open. - @param options Options passed to IONetworkInterface::handleOpen(). - @param argument Argument passed to IONetworkInterface::handleOpen(). - @result Returns true to accept the client open, false to refuse it. -*/ - - virtual bool handleClientOpen(IOService * client, - IOOptionBits options, - void * argument); - -/*! @function handleClientClose - @abstract Handles a client close on the interface. - @discussion This method is called by handleClose() to handle a close from a client object. - Unlike handleClose(), subclasses may override this method to catch a close - reuqest from a client. This method is called with the arbitration lock held. - @param client The client object requesting the close. - @param options Options passed to IONetworkInterface::handleClose(). -*/ - - virtual void handleClientClose(IOService * client, - IOOptionBits options); - -/*! @function newUserClient - @abstract Creates a connection for a non kernel client. - @discussion This method creates a new IOUserClient to service a connection to a - non kernel client. - @param owningTask The mach task requesting the connection. - @param security_id A token representing the access level for the task. - @param type A constant specifying the type of connection to be created. - An IONetworkUserClient object is created if the type specified is - kIONetworkUserClientTypeID. - @param handler The IOUserClient object returned. - @result Returns kIOReturnSuccess if an IONetworkUserClient was created, - kIOReturnNoMemory for a memory allocation error, or - kIOReturnBadArgument if the type specified is unknown. -*/ - - virtual IOReturn newUserClient(task_t owningTask, - void * security_id, - UInt32 type, - IOUserClient ** handler); - -/*! @function setInterfaceState - @abstract Updates the interface object state flags. - @discussion The kIOInterfaceState property is updated with the value - provided. - @param flags The bits that should be set. - @param clear The bits that should be cleared. - @result Returns the resulting interface state flags following any changes - made by this method. -*/ - - virtual UInt32 setInterfaceState( UInt32 set, UInt32 clear = 0 ); - -/*! @function powerStateWillChangeTo - @abstract Handles a notification that the network controller servicing - this interface object is about to transition to a new power state. - @discussion This method will call the controllerWillChangePowerState() method - on the controller's work loop context to prepare for the power state change. - Subclasses should not override this method. - @param flags Flags that describe the capability of the controller in the new - power state. - @param stateNumber An index to a state in the network controller's - power state array that the controller is switching to. - @param policyMaker A reference to the network controller's policy-maker, - and is also the originator of this notification. - @result The return will always be IOPMAckImplied to indicate that the - preparation for the power change has already completed when this method - returns. -*/ - - virtual IOReturn powerStateWillChangeTo( IOPMPowerFlags flags, - unsigned long stateNumber, - IOService * policyMaker ); - -/*! @function powerStateDidChangeTo - @abstract Handles a notification that the network controller servicing - this interface object has transitioned to a new power state. - @discussion This method will call the controllerDidChangePowerState() method - on the controller's work loop context to prepare for the power state change. - Subclasses should not override this method. - @param flags Flags that describe the capability of the controller in the new - power state. - @param stateNumber An index to a state in the network controller's - power state array that the controller has switched to. - @param policyMaker A reference to the network controller's policy-maker, - and is also the originator of this notification. - @result The return will always be IOPMAckImplied to indicate that the - preparation for the power change has already completed when this method - returns. -*/ - - virtual IOReturn powerStateDidChangeTo( IOPMPowerFlags flags, - unsigned long stateNumber, - IOService * policyMaker ); - -/*! @function controllerWillChangePowerState - @abstract Handles a notification that the network controller servicing - this interface object is about to transition to a new power state. - @param controller The network controller object. - @param flags Flags that describe the capability of the controller in the new - power state. - @param stateNumber An index to a state in the network controller's - power state array that the controller is switching to. - @param policyMaker A reference to the network controller's policy-maker, - and is also the originator of this notification. - @result The return value is always kIOReturnSuccess. -*/ - - virtual IOReturn controllerWillChangePowerState( - IONetworkController * controller, - IOPMPowerFlags flags, - UInt32 stateNumber, - IOService * policyMaker); - -/*! @function controllerDidChangePowerState - @abstract Handles a notification that the network controller servicing - this interface object has transitioned to a new power state. - @param controller The network controller object. - @param flags Flags that describe the capability of the controller in the new - power state. - @param stateNumber An index to a state in the network controller's - power state array that the controller has switched to. - @param policyMaker A reference to the network controller's policy-maker, - and is also the originator of this notification. - @result The return value is always kIOReturnSuccess. -*/ - - virtual IOReturn controllerDidChangePowerState( - IONetworkController * controller, - IOPMPowerFlags flags, - UInt32 stateNumber, - IOService * policyMaker); - -public: - /* Override IOService::willTerminate() */ - - virtual bool willTerminate( IOService * provider, - IOOptionBits options ); - - /* Override IOService::serializeProperties() */ - - virtual bool serializeProperties( OSSerialize * s ) const; - -/*! @function attachToDataLinkLayer - @abstract Attaches the network interface to the BSD data link layer. - @discussion This function is called by the family to attach the network - interface managed by an IONetworkInterface to the BSD data link layer. - This call occurs after the interface initialization and setup, and the - assignment of an interface unit number. The family does not implicitly - close the gate on the network controller's work loop when calling this - function. Prior to the data link attachment, services provided by an - IONetworkInterface will be inaccessible to BSD networking, though the - object can be found in the I/O Kit Registry. Subclasses can override - this function to perform interface specific work. - @param options Options for the attach call. None are currently defined. - @param parameter Parameter for the attach call. Not currently used. - @result Returns kIOReturnSuccess on success. -*/ - - virtual IOReturn attachToDataLinkLayer( IOOptionBits options, - void * parameter ); - - OSMetaClassDeclareReservedUsed(IONetworkInterface, 0); - -/*! @function detachFromDataLinkLayer - @abstract Detaches the network interface from the BSD data link layer. - @discussion This function is called by the family to detach the network - interface managed by an IONetworkInterface from the BSD data link layer. - This call is made when the interface is terminated, before the last close. - The family does not implicitly close the gate on the network controller's - work loop when calling this function. Subclasses can override this function - to perform additional interface specific work. - @param options Options for the detach call. None are currently defined. - @param parameter Parameter for the detach call. Not currently used. -*/ - - virtual void detachFromDataLinkLayer( IOOptionBits options, - void * parameter ); - - OSMetaClassDeclareReservedUsed(IONetworkInterface, 1); - -protected: -/*! @function feedInputPacketTap - @abstract Feed received packets to the BPF - @discussion This function is called by the family for each inbound packet - to feed it to the BPF function. Interface classes can override if they - need to provide class specific functionality or modifications to the BPF tap. - @param mbuf Pointer to the packet. -*/ - virtual void feedPacketInputTap(mbuf_t); - - OSMetaClassDeclareReservedUsed( IONetworkInterface, 2); - -/*! @function feedOutputPacketTap - @abstract Feed sent packets to the BPF - @discussion This function is called by the family for each outbound packet - to feed it to the BPF function. Interface classes can override if they - need to provide class specific functionality or modifications to the BPF tap. - @param mbuf Pointer to the packet. -*/ - virtual void feedPacketOutputTap(mbuf_t); - - OSMetaClassDeclareReservedUsed( IONetworkInterface, 3); - - virtual bool initIfnetParams(struct ifnet_init_params *params); - OSMetaClassDeclareReservedUsed( IONetworkInterface, 4); - -public: - // Virtual function padding - OSMetaClassDeclareReservedUnused( IONetworkInterface, 5); - OSMetaClassDeclareReservedUnused( IONetworkInterface, 6); - OSMetaClassDeclareReservedUnused( IONetworkInterface, 7); - OSMetaClassDeclareReservedUnused( IONetworkInterface, 8); - OSMetaClassDeclareReservedUnused( IONetworkInterface, 9); - OSMetaClassDeclareReservedUnused( IONetworkInterface, 10); - OSMetaClassDeclareReservedUnused( IONetworkInterface, 11); - OSMetaClassDeclareReservedUnused( IONetworkInterface, 12); - OSMetaClassDeclareReservedUnused( IONetworkInterface, 13); - OSMetaClassDeclareReservedUnused( IONetworkInterface, 14); - OSMetaClassDeclareReservedUnused( IONetworkInterface, 15); -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* !_IONETWORKINTERFACE_H */ diff --git a/i386/include/IOKit/network/IONetworkMedium.h b/i386/include/IOKit/network/IONetworkMedium.h deleted file mode 100644 index 2a64f3d..0000000 --- a/i386/include/IOKit/network/IONetworkMedium.h +++ /dev/null @@ -1,426 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IONETWORKMEDIUM_H -#define _IONETWORKMEDIUM_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <net/if_media.h> - -/*! @typedef IOMediumType - @discussion A 32-bit value divided into fields which describes - a single medium type. */ - -typedef UInt32 IOMediumType; - -/*! @defined kIOMediumType - @abstract A property of IONetworkMedium objects. - @discussion The kIOMediumType property is an OSNumber object that describes the type of - medium that this object represents. -*/ - -#define kIOMediumType "Type" - -/*! @defined kIOMediumFlags - @abstract A property of IONetworkMedium objects. - @discussion The kIOMediumFlags property is an OSNumber object that describes a set of - attributes assigned to the medium. -*/ - -#define kIOMediumFlags "Flags" - -/*! @defined kIOMediumSpeed - @abstract A property of IONetworkMedium objects. - @discussion The kIOMediumSpeed property is an OSNumber object that describes the maximum link - speed supported by the medium in bits per second. -*/ - -#define kIOMediumSpeed "Speed" - -/*! @defined kIOMediumIndex - @abstract A property of IONetworkMedium objects. - @discussion The kIOMediumIndex property is an OSNumber object that describes an index assigned - by the owner of the medium object. Its interpretation is driver - specific. -*/ - -#define kIOMediumIndex "Index" - -//=========================================================================== -// Medium Type (IOMediumType). -// -// The medium type is encoded by a 32-bit value. The definitions of -// the fields and the encoding for each field is adapted from FreeBSD. -// -// Bits Definition -// ------------------- -// 4-0 medium subtype -// 7-5 network type -// 15-8 network specific options -// 19-16 reserved -// 27-20 common options -// 31-28 instance number - -// Ethernet. -// -enum { - kIOMediumEthernet = IFM_ETHER, - kIOMediumEthernetAuto = ( IFM_AUTO | IFM_ETHER ), - kIOMediumEthernetManual = ( IFM_MANUAL | IFM_ETHER ), - kIOMediumEthernetNone = ( IFM_NONE | IFM_ETHER ), - kIOMediumEthernet10BaseT = ( IFM_10_T | IFM_ETHER ), - kIOMediumEthernet10Base2 = ( IFM_10_2 | IFM_ETHER ), - kIOMediumEthernet10Base5 = ( IFM_10_5 | IFM_ETHER ), - kIOMediumEthernet100BaseTX = ( IFM_100_TX | IFM_ETHER ), - kIOMediumEthernet100BaseFX = ( IFM_100_FX | IFM_ETHER ), - kIOMediumEthernet100BaseT4 = ( IFM_100_T4 | IFM_ETHER ), - kIOMediumEthernet100BaseVG = ( IFM_100_VG | IFM_ETHER ), - kIOMediumEthernet100BaseT2 = ( IFM_100_T2 | IFM_ETHER ), - kIOMediumEthernet1000BaseSX = ( IFM_1000_SX | IFM_ETHER ), - kIOMediumEthernet10BaseSTP = ( IFM_10_STP | IFM_ETHER ), - kIOMediumEthernet10BaseFL = ( IFM_10_FL | IFM_ETHER ), - kIOMediumEthernet1000BaseLX = ( IFM_1000_LX | IFM_ETHER ), - kIOMediumEthernet1000BaseCX = ( IFM_1000_CX | IFM_ETHER ), - kIOMediumEthernet1000BaseTX = ( IFM_1000_T | IFM_ETHER ), //deprecated- use kIOMediumEthernet1000BaseT instead - kIOMediumEthernet1000BaseT = ( IFM_1000_T | IFM_ETHER ), - kIOMediumEthernetHomePNA1 = ( IFM_HPNA_1 | IFM_ETHER ), - kIOMediumEthernet10GBaseSR = ( IFM_10G_SR | IFM_ETHER ), - kIOMediumEthernet10GBaseLR = ( IFM_10G_LR | IFM_ETHER ), - kIOMediumEthernet10GBaseCX4 = ( IFM_10G_CX4 | IFM_ETHER ), - kIOMediumEthernet10GBaseT = ( IFM_10G_T | IFM_ETHER ) -}; - -// IEEE 802.11 Wireless. -// -enum { - kIOMediumIEEE80211 = IFM_IEEE80211, - kIOMediumIEEE80211Auto = ( IFM_AUTO | IFM_IEEE80211 ), - kIOMediumIEEE80211Manual = ( IFM_MANUAL | IFM_IEEE80211 ), - kIOMediumIEEE80211None = ( IFM_NONE | IFM_IEEE80211 ), - kIOMediumIEEE80211FH1 = ( IFM_IEEE80211_FH1 | IFM_IEEE80211 ), - kIOMediumIEEE80211FH2 = ( IFM_IEEE80211_FH2 | IFM_IEEE80211 ), - kIOMediumIEEE80211DS2 = ( IFM_IEEE80211_DS2 | IFM_IEEE80211 ), - kIOMediumIEEE80211DS5 = ( IFM_IEEE80211_DS5 | IFM_IEEE80211 ), - kIOMediumIEEE80211DS11 = ( IFM_IEEE80211_DS11 | IFM_IEEE80211 ), - kIOMediumIEEE80211DS1 = ( IFM_IEEE80211_DS1 | IFM_IEEE80211 ), - kIOMediumIEEE80211OptionAdhoc = IFM_IEEE80211_ADHOC -}; - -// Common options. -// -enum { - kIOMediumOptionFullDuplex = IFM_FDX, - kIOMediumOptionHalfDuplex = IFM_HDX, - kIOMediumOptionFlowControl = IFM_FLOW, - kIOMediumOptionFlag0 = IFM_FLAG0, - kIOMediumOptionFlag1 = IFM_FLAG1, - kIOMediumOptionFlag2 = IFM_FLAG2, - kIOMediumOptionLoopback = IFM_LOOP -}; - -// Medium type masks. -// -#define kIOMediumSubTypeMask IFM_TMASK -#define kIOMediumNetworkTypeMask IFM_NMASK -#define kIOMediumOptionsMask IFM_OMASK -#define kIOMediumCommonOptionsMask IFM_GMASK -#define kIOMediumInstanceShift IFM_ISHIFT -#define kIOMediumInstanceMask IFM_IMASK - -// Medium type field accessors. -// -#define IOMediumGetSubType(x) ((x) & kIOMediumSubTypeMask) -#define IOMediumGetNetworkType(x) ((x) & kIOMediumNetworkMask) -#define IOMediumGetInstance(x) (((x) & kIOMediumInstanceMask) >> \ - kIOMediumInstanceShift) - -//=========================================================================== -// Medium flags. - - -//=========================================================================== -// Link status bits. -// -enum { - kIONetworkLinkValid = IFM_AVALID, // link status is valid - kIONetworkLinkActive = IFM_ACTIVE // link is up/active. -}; - -#ifdef __cplusplus -} -#endif - -//=========================================================================== -// IONetworkMedium class. - -#ifdef KERNEL - -#include <libkern/c++/OSObject.h> -#include <libkern/c++/OSSymbol.h> - -/*! @class IONetworkMedium - @abstract An object that encapsulates information about a network - medium (i.e. 10Base-T, or 100Base-T Full Duplex). - @discussion The main purpose of - this object is for a network driver to advertise its media capability, - through a collection of IONetworkMedium objects stored in a dictionary - in its property table. IONetworkMedium supports serialization, and will - encode its properties in the form of a dictionary to the serialization - stream when instructed. This will allow a user-space application to - browse the set of media types supported by the controller. -*/ - -class IONetworkMedium : public OSObject -{ - OSDeclareDefaultStructors( IONetworkMedium ) - -protected: - IOMediumType _type; - UInt32 _flags; - UInt64 _speed; - UInt32 _index; - const OSSymbol * _name; - - struct ExpansionData { }; - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *_reserved; - - -/*! @function free - @abstract Frees the IONetworkMedium object. -*/ - - virtual void free(); - -public: - -/*! @function nameForType - @abstract Creates a name that describes a medium type. - @discussion Given a medium type, creates an OSymbol object that - describes the medium type. There is a 1-to-1 mapping between the - medium type, and the medium name created by this method. The caller - is responsible for releasing the OSSymbol object returned. - @param type A medium type. See IONetworkMedium.h for type encoding. - @result Returns an OSSymbol object is created based on the type provided. -*/ - - static const OSSymbol * nameForType(IOMediumType type); - -/*! @function addMedium - @abstract Adds an IONetworkMedium object to a dictionary. - @discussion A helper function to add an IONetworkMedium object to a - given dictionary. The name of the medium is used as the key for the - new dictionary entry. - @param dict An OSDictionary object where the medium object should be - added as a new entry. - @param medium The IONetworkMedium object to add to the dictionary. - @result Returns true on success, false otherwise. -*/ - - static bool addMedium(OSDictionary * dict, - const IONetworkMedium * medium); - -/*! @function removeMedium - @abstract Removes an IONetworkMedium object from a dictionary. - @discussion A helper function to remove an entry in a dictionary. - @param dict The OSDictionary object where the medium object should be - removed from. - @param medium The name of this medium object is used as the key. -*/ - - static void removeMedium(OSDictionary * dict, - const IONetworkMedium * medium); - -/*! @function getMediumWithType - @abstract Finds a medium object from a dictionary with a given type. - @discussion This method iterates through a dictionary and returns an IONetworkMedium - entry with the given type. An optional mask supplies the don't care bits. - @param dict The dictionary to look for a matching entry. - @param type Search for an entry with this type. - @param mask The don't care bits in IOMediumType. Defaults to 0, which - implies that a perfect match is desired. - @result Returns the first matching IONetworkMedium entry found, - or 0 if no match was found. -*/ - - static IONetworkMedium * getMediumWithType(const OSDictionary * dict, - IOMediumType type, - IOMediumType mask = 0); - -/*! @function getMediumWithIndex - @abstract Finds a medium object from a dictionary with a given index. - @discussion This method iterates through a dictionary and returns an IONetworkMedium - entry with the given index. An optional mask supplies the don't care bits. - @param dict The dictionary to look for a matching entry. - @param index Search for an entry with the given index. - @param mask The don't care bits in index. Defaults to 0, which - implies that a perfect match is desired. - @result Returns the first matching IONetworkMedium entry found, - or 0 if no match was found. -*/ - - static IONetworkMedium * getMediumWithIndex(const OSDictionary * dict, - UInt32 index, - UInt32 mask = 0); - -/*! @function init - @abstract Initializes an IONetworkMedium object. - @param type The medium type, this value is encoded with bits defined in - IONetworkMedium.h. - @param speed The maximum (or the only) link speed supported over this - medium in units of bits per second. - @param flags An optional flag for the medium object. - See IONetworkMedium.h for defined flags. - @param index An optional index number assigned by the owner. - Drivers can use this to store an index to a media table in - the driver, or it may map to a driver-defined media type. - @param name An optional name assigned to this medium object. If 0, - then a name will be created based on the medium type by - calling IONetworkMedium::nameForType(). Since the name of - the medium is used as a key when inserted into a dictionary, - the name chosen must be unique within the scope of the owner. - @result Returns true on success, false otherwise. -*/ - - virtual bool init(IOMediumType type, - UInt64 speed, - UInt32 flags = 0, - UInt32 index = 0, - const char * name = 0); - -/*! @function medium - @abstract Factory method that allocates and initializes an IONetworkMedium object. - @param type The medium type, this value is encoded with bits defined in - IONetworkMedium.h. - @param speed The maximum (or the only) link speed supported over this - medium in units of bits per second. - @param flags An optional flag for the medium object. - See IONetworkMedium.h for defined flags. - @param index An optional index number assigned by the owner. - Drivers can use this to store an index to a media table in - the driver, or it may map to a driver-defined media type. - @param name An optional name assigned to this medium object. If 0, - then a name will be created based on the medium type by - calling IONetworkMedium::nameForType(). Since the name of - the medium is used as a key when inserted into a dictionary, - the name chosen must be unique within the scope of the owner. - @result Returns an IONetworkMedium instance on success, or 0 otherwise. -*/ - - static IONetworkMedium * medium(IOMediumType type, - UInt64 speed, - UInt32 flags = 0, - UInt32 index = 0, - const char * name = 0); - -/*! @function getType - @result Returns the medium type assigned to this medium object. -*/ - - virtual IOMediumType getType() const; - -/*! @function getSpeed - @result Returns the maximum link speed supported by this medium. -*/ - - virtual UInt64 getSpeed() const; - -/*! @function getFlags - @result Returns the medium flags. -*/ - - virtual UInt32 getFlags() const; - -/*! @function getIndex - @result Returns the assigned medium index. -*/ - - virtual UInt32 getIndex() const; - -/*! @function getName - @result Returns the name assigned to this medium object. -*/ - - virtual const OSSymbol * getName() const; - -/*! @function getKey - @result Returns the key to use for this medium object. This key should be - used when this object is added to a dictionary. Same as getName(). -*/ - - virtual const OSSymbol * getKey() const; - -/*! @function isEqualTo - @abstract Tests for equality between two IONetworkMedium objects. - @discussion Two IONetworkMedium objects are considered equal if - they have similar properties assigned to them during initialization. - @param medium An IONetworkMedium to test against the IONetworkMedium - object being called. - @result Returns true if equal, false otherwise. -*/ - - virtual bool isEqualTo(const IONetworkMedium * medium) const; - -/*! @function isEqualTo - @abstract Tests for equality between a IONetworkMedium object and an - OSObject. - @discussion The OSObject is considered equal to the IONetworkMedium - object if the OSObject is an IONetworkMedium, and they have - similar properties assigned to them during initialization. - @param obj An OSObject to test against an IONetworkMedium object. - @result Returns true if equal, false otherwise. -*/ - - virtual bool isEqualTo(const OSMetaClassBase * obj) const; - -/*! @function serialize - @abstract Serializes the IONetworkMedium object. - @discussion A dictionary is created containing the properties - assigned to this medium object, and this dictionary is then - serialized using the OSSerialize object provided. - @param s An OSSerialize object. - @result Returns true on success, false otherwise. -*/ - - virtual bool serialize(OSSerialize * s) const; - - // Virtual function padding - OSMetaClassDeclareReservedUnused( IONetworkMedium, 0); - OSMetaClassDeclareReservedUnused( IONetworkMedium, 1); - OSMetaClassDeclareReservedUnused( IONetworkMedium, 2); - OSMetaClassDeclareReservedUnused( IONetworkMedium, 3); -}; - -// Translate getKey() to getName(). -// -inline const OSSymbol * IONetworkMedium::getKey() const -{ - return getName(); -} - -#endif /* KERNEL */ - -#endif /* !_IONETWORKMEDIUM_H */ diff --git a/i386/include/IOKit/network/IONetworkStats.h b/i386/include/IOKit/network/IONetworkStats.h deleted file mode 100644 index f6e6f9f..0000000 --- a/i386/include/IOKit/network/IONetworkStats.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IONETWORKSTATS_H -#define _IONETWORKSTATS_H - -/*! @header IONetworkStats.h - @discussion Generic network statistics. */ - -//------------------------------------------------------------------------ -// Generic network statistics. Common to all network interfaces. -// -// WARNING: This structure must match the statistics field in -// ifnet->if_data. This structure will overlay a portion of ifnet. - -/*! @typedef IONetworkStats - @discussion Generic network statistics structure. - @field inputPackets count input packets. - @field inputErrors count input errors. - @field outputPackets count output packets. - @field outputErrors count output errors. - @field collisions count collisions on CDMA networks. */ - -typedef struct { - UInt32 inputPackets; - UInt32 inputErrors; - UInt32 outputPackets; - UInt32 outputErrors; - UInt32 collisions; -} IONetworkStats; - -/*! @defined kIONetworkStatsKey - @discussion Defines the name of an IONetworkData that contains - an IONetworkStats. */ - -#define kIONetworkStatsKey "IONetworkStatsKey" - -//------------------------------------------------------------------------ -// Output queue statistics. - -/*! @typedef IOOutputQueueStats - @discussion Statistics recorded by IOOutputQueue objects. - @field capacity queue capacity. - @field size current size of the queue. - @field peakSize peak size of the queue. - @field dropCount number of packets dropped. - @field outputCount number of output packets. - @field retryCount number of retries. - @field stallCount number of queue stalls. */ - -typedef struct { - UInt32 capacity; - UInt32 size; - UInt32 peakSize; - UInt32 dropCount; - UInt32 outputCount; - UInt32 retryCount; - UInt32 stallCount; - UInt32 reserved[4]; -} IOOutputQueueStats; - -/*! @defined kIOOutputQueueStatsKey - @discussion Defines the name of an IONetworkData that contains - an IOOutputQueueStats. */ - -#define kIOOutputQueueStatsKey "IOOutputQueueStatsKey" - -#endif /* !_IONETWORKSTATS_H */ diff --git a/i386/include/IOKit/network/IOOutputQueue.h b/i386/include/IOKit/network/IOOutputQueue.h deleted file mode 100644 index cb40702..0000000 --- a/i386/include/IOKit/network/IOOutputQueue.h +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOOUTPUTQUEUE_H -#define _IOOUTPUTQUEUE_H - -#include <IOKit/network/IONetworkInterface.h> - -// Forward declarations. -// -struct mbuf; -class IONetworkData; - -// FIXME - We do not want the enqueue/dequeue macros defined in queue.h. -// -#undef enqueue(queue,elt) -#undef dequeue(queue) - -// FIXME - Belongs in IOBasicOutputQueue.h -// -/*! @enum OutputPacketStatus - @abstract The status of the packet sent to the target. - @constant kIOOutputStatusMask Define the status field in the return code. - @constant kIOOutputStatusAccept Packet was accepted by the target. - @constant kIOOutputStatusDropped Packet accepted, but was also dropped. - @constant kIOOutputStatusRetry Target ran out of resources, and is unable - to accept the packet. The ownership of the packet reverts back to the - queue. -*/ - -enum { - kIOOutputStatusMask = 0x00ff, - kIOOutputStatusAccepted = 0x0000, - kIOOutputStatusDropped = 0x0001, - kIOOutputStatusRetry = 0x0002 -}; - -/*! @enum OutputCommands - @abstract A command requested by the target. - @constant kIOOutputCommandMask Define the command field in the return code. - @constant kIOOutputCommandNone No command. - @constant kIOOutputCommandStall A command to stall the queue. -*/ - -enum { - kIOOutputCommandMask = 0xff00, - kIOOutputCommandNone = 0x0000, - kIOOutputCommandStall = 0x0100 -}; - -/*! @enum OutputHandlerReturnCodes - @abstract Common return codes returned by the target's output handler. - @constant kIOReturnOutputSuccess Packet was accepted. - @constant kIOReturnOutputDropped Packet was dropped. - @constant kIOReturnOutputStall Stall the queue and retry the same packet - when the queue is restarted. -*/ - -enum { - kIOReturnOutputSuccess = (kIOOutputStatusAccepted | kIOOutputCommandNone), - kIOReturnOutputDropped = (kIOOutputStatusDropped | kIOOutputCommandNone), - kIOReturnOutputStall = (kIOOutputStatusRetry | kIOOutputCommandStall) -}; - -/*! @class IOOutputQueue - @abstract A packet queue that supports multiple producers and a single - consumer. - @discussion Each producer, or a client thread, will deliver a chain of packets - to the queue. A single consumer will remove packets from the queue one at a - time and forward it to the registered target/action. This object may be used - by an IONetworkController on the output (transmit) side to handle the output - packet flow downstream from an IONetworkInterface, and then call the driver's - output function. IOOutputQueue is an abstract class that provides an interface - for its subclasses. Concrete subclasses will complete the implementation, and - specify the context that the target is called for packets removed from - the queue. -*/ - -class IOOutputQueue : public OSObject -{ - OSDeclareAbstractStructors( IOOutputQueue ) - -private: - - static void runServiceThread(thread_call_param_t, thread_call_param_t); - -protected: - - thread_call_t _callEntry; // callout entry structure. - - struct ExpansionData { }; - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *_reserved; - - -/*! @function init - @abstract Initializes an IOOutputQueue object. - @result Returns true if initialized successfully, false otherwise. -*/ - - virtual bool init(); - -/*! @function free - @abstract Frees the IOOutputQueue object. - @discussion Release allocated resources, then call super::free(). -*/ - - virtual void free(); - -/*! @function scheduleServiceThread - @abstract Schedules a service thread callout. - @discussion This method can be called by service() to schedule - a thread that will call serviceThread() when it starts running. - @param param A parameter to pass to the serviceThread() method. - @result Returns true if a thread callout was scheduled, false otherwise. -*/ - - virtual bool scheduleServiceThread(void * param); - -/*! @function cancelServiceThread - @abstract Cancels any pending service thread callout. - @result Returns true if a previously scheduled thread callout was canceled, - false otherwise. -*/ - - virtual bool cancelServiceThread(); - -/*! @function serviceThread - @abstract Method called by the scheduled service thread when it - starts to run. - @discussion Must be implemented by a subclass that calls - scheduleServiceThread(). The default implementation does nothing. - @param param A parameter that was given to scheduleServiceThread() - when the service thread was scheduled. -*/ - - virtual void serviceThread(void * param); - -public: - -/*! @function start - @abstract Starts up the queue. - @discussion This method is called by the target to start the queue. This will allow - packets to be removed from the queue, then delivered to the target. - @result Returns true if the queue was started successfully, false otherwise. -*/ - - virtual bool start() = 0; - -/*! @function stop - @abstract Stops the queue. - @discussion Stop the queue and prevent it from sending packets to its - target. - @result Returns the previous running state of the queue, - true if the queue was running, false if the queue was already stopped. -*/ - - virtual bool stop() = 0; - -/*! @function service - @abstract Services the queue. - @discussion Manage the queue after it has been started. - @param options Options for the service request. - @result Returns a return value to indicate the service result. -*/ - - virtual bool service(IOOptionBits options = 0) = 0; - -/*! @function flush - @abstract Drops and frees all packets currently held by the queue. - @result Returns the number of packets that were dropped and freed. -*/ - - virtual UInt32 flush() = 0; - -/*! @function setCapacity - @abstract Changes the number of packets that the queue can hold - before it begins to drop excess packets. - @param capacity The new desired capacity. - @result Returns true if the new capacity was accepted, false otherwise. -*/ - - virtual bool setCapacity(UInt32 capacity) = 0; - -/*! @function getCapacity - @abstract Gets the number of packets that the queue can hold. - @discussion The queue will begin to drop incoming packets when the - size of queue reaches its capacity. - @result Returns the current queue capacity. -*/ - - virtual UInt32 getCapacity() const = 0; - -/*! @function getSize - @abstract Gets the number of packets currently held in the queue. - @result Returns the size of the queue. -*/ - - virtual UInt32 getSize() const = 0; - -/*! @function enqueue - @abstract Adds a packet, or a chain of packets, to the queue. - @discussion This method is called by a client to add a packet, or a chain of packets, - to the queue. A packet is described by an mbuf chain, while a chain - of packets is constructed by linking multiple mbuf chains via the - m_nextpkt field. - @param m A single packet, or a chain of packets. - @param param A parameter provided by the caller. - @result Returns a return code. -*/ - - virtual UInt32 enqueue(mbuf_t m, void * param) = 0; - -/*! @function getOutputHandler - @abstract Returns the address of a function that is designated to handle - incoming packets sent to the queue object. - @result Returns the address of the enqueue() method. -*/ - - virtual IOOutputAction getOutputHandler() const; - -/*! @function getStatisticsData - @abstract Returns an IONetworkData object containing statistics counters - updated by the queue. - @result Returns an IONetworkData object. This implementation will always return - 0. -*/ - - virtual IONetworkData * getStatisticsData() const; - - // Virtual function padding - OSMetaClassDeclareReservedUnused( IOOutputQueue, 0); - OSMetaClassDeclareReservedUnused( IOOutputQueue, 1); - OSMetaClassDeclareReservedUnused( IOOutputQueue, 2); - OSMetaClassDeclareReservedUnused( IOOutputQueue, 3); - OSMetaClassDeclareReservedUnused( IOOutputQueue, 4); - OSMetaClassDeclareReservedUnused( IOOutputQueue, 5); - OSMetaClassDeclareReservedUnused( IOOutputQueue, 6); - OSMetaClassDeclareReservedUnused( IOOutputQueue, 7); - OSMetaClassDeclareReservedUnused( IOOutputQueue, 8); - OSMetaClassDeclareReservedUnused( IOOutputQueue, 9); - OSMetaClassDeclareReservedUnused( IOOutputQueue, 10); - OSMetaClassDeclareReservedUnused( IOOutputQueue, 11); - OSMetaClassDeclareReservedUnused( IOOutputQueue, 12); - OSMetaClassDeclareReservedUnused( IOOutputQueue, 13); - OSMetaClassDeclareReservedUnused( IOOutputQueue, 14); - OSMetaClassDeclareReservedUnused( IOOutputQueue, 15); -}; - -#endif /* !_IOOUTPUTQUEUE_H */ diff --git a/i386/include/IOKit/network/IOPacketQueue.h b/i386/include/IOKit/network/IOPacketQueue.h deleted file mode 100644 index 88d8c21..0000000 --- a/i386/include/IOKit/network/IOPacketQueue.h +++ /dev/null @@ -1,290 +0,0 @@ -/* - * Copyright (c) 1998-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOPACKETQUEUE_H -#define _IOPACKETQUEUE_H - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOLocks.h> -extern "C" { -#include <sys/kpi_mbuf.h> -} -// Forward declarations. -// -struct mbuf; -struct IOMbufQueue; - -// We do not want the enqueue/dequeue macros defined in queue.h. -// -// #warning queue.h should not be included -#undef enqueue(queue,elt) -#undef dequeue(queue) - -/*! @class IOPacketQueue - @abstract Implements a bounded FIFO queue of mbuf packets. - @discussion Packets are - removed from the head of the queue (dequeue), and new packets are added - to the tail of the queue (enqueue). A spinlock is used to synchronize - access to the queue between methods that have a "lock" prefix. -*/ - -class IOPacketQueue : public OSObject -{ - OSDeclareDefaultStructors( IOPacketQueue ) - -protected: - IOMbufQueue * _queue; // mbuf queue - IOSimpleLock * _lock; // spinlock for synchronized methods - - struct ExpansionData { }; - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *_reserved; - -/*! @function free - @abstract Frees the IOPacketQueue object. - @discussion All packets held by the queue are released back to the free - pool, resource are deallocated, then super::free() is called. -*/ - - virtual void free(); - -/*! @var IOPacketQueueDefaultCapacity - @abstract Describes the default capacity of the - queue object. - @discussion The capacity is only observed by the enqueue() method. - Therefore, it is possible for the size of the queue to exceed its - capacity when other methods, such as prepend(), are used to add packets - to the queue. -*/ - - static const UInt32 IOPacketQueueDefaultCapacity = 100; - -public: - -/*! @function withCapacity - @abstract Factory method that constructs and initializes an - IOPacketQueue object. - @param capacity The initial capacity of the queue object. Can be - later changed by calling the setCapacity() method. - @result Returns an IOPacketQueue instance on success, or 0 otherwise. -*/ - - static IOPacketQueue * withCapacity(UInt32 capacity = - IOPacketQueueDefaultCapacity); - -/*! @function initWithCapacity - @abstract Initializes an IOPacketQueue object. - @discussion This method initializes an IOPacketQueue object with the given capacity. - @param capacity The initial capacity of the queue. Can be later changed - by calling the setCapacity() method. - @result Returns true if initialized successfully, false otherwise. -*/ - - virtual bool initWithCapacity(UInt32 capacity = - IOPacketQueueDefaultCapacity); - -/*! @function getSize - @abstract Gets the size of the queue. - @result Returns the number of packets currently held by the queue. -*/ - - virtual UInt32 getSize() const; - -/*! @function setCapacity - @abstract Changes the capacity of the queue. - @param capacity The new capacity. - @result Returns true if the new capacity was accepted, false otherwise. -*/ - - virtual bool setCapacity(UInt32 capacity); - -/*! @function getCapacity - @abstract Gets the current capacity of the queue. - @result Returns the current queue capacity. -*/ - - virtual UInt32 getCapacity() const; - -/*! @function peek - @abstract Examines the packet at the head of the queue without - removing it from the queue. - @discussion A following call to peek() or dequeue() will return - the same packet. The caller must never modify the mbuf packet returned. - @result Returns the packet at the head of the queue. -*/ - - virtual const mbuf_t peek() const; - -/*! @function prepend - @abstract Adds a chain of packets to the head of the queue. - @param m A chain of packets to add to the head of the queue. -*/ - - virtual void prepend(mbuf_t m); - -/*! @function prepend - @abstract Removes all packets from the specified queue, and adds them - to the head of this queue. - @param queue The source IOPacketQueue object containing the packets to - be transferred. -*/ - - virtual void prepend(IOPacketQueue * queue); - -/*! @function lockPrepend - @abstract Adds a chain of packets to the head of a synchronized queue. - @discussion A spinlock is used to synchronize access to the queue. - @param m A chain of packets to add to the head of the queue. - @result Always returns true. -*/ - - virtual void lockPrepend(mbuf_t m); - -/*! @function enqueue - @abstract Adds a chain of packets to the tail of the queue. - @discussion Packets are not added if the size of the queue has reached - its capacity. - @param m A chain of packets to add to the tail of the queue. - @result Returns true on success, or false to indicate over-capacity and refusal - to accept the packet chain provided. -*/ - - virtual bool enqueue(mbuf_t m); - -/*! @function enqueue - @abstract Removes all packets from the specified queue, and adds them - to the tail of this queue. - @param queue The source IOPacketQueue object containing the packets to - be transferred. - @result Always returns true. -*/ - - virtual bool enqueue(IOPacketQueue * queue); - -/*! @function enqueueWithDrop - @abstract Adds a chain of packets to the tail of the queue. - @discussion Packets are - dropped if the size of the queue has reached its capacity. - @param m A chain of packets to add to the tail of the queue. - @result Returns the number of packets dropped and freed by the queue. -*/ - - virtual UInt32 enqueueWithDrop(mbuf_t m); - -/*! @function lockEnqueue - @abstract Adds a chain of packets to the tail of a synchronized queue. - @discussion Packets are not added if the size of the queue has reached - its capacity. A spinlock is used to synchronize access to the queue. - @param m A chain of packets to add to the tail of the queue. - @result Returns true on success, or false to indicate over-capacity and refusal - to accept the packet chain provided. -*/ - - virtual bool lockEnqueue(mbuf_t m); - -/*! @function lockEnqueueWithDrop - @abstract Adds a chain of packets to the tail of a synchronized queue. - @discussion Packets are dropped if the size of the queue has reached its capacity. A spinlock is used to synchronize access to the queue. - @param m A chain of packets to add to the tail of the queue. - @result Returns the number of packets dropped and freed by the queue. -*/ - - virtual UInt32 lockEnqueueWithDrop(mbuf_t m); - -/*! @function dequeue - @abstract Removes a single packet from the head of the queue. - @result Returns a packet removed from the head of the queue, or NULL if the - queue was empty. -*/ - - virtual mbuf_t dequeue(); - -/*! @function lockDequeue - @abstract Removes a single packet from the head of a synchronized queue. - @discussion A spinlock is used to synchronize access to the queue. - @result Returns a packet removed from the head of the queue, or NULL if the - queue was empty. -*/ - - virtual mbuf_t lockDequeue(); - -/*! @function dequeueAll - @abstract Removes all packets from the queue and returns the head of the - packet chain. - @discussion The size of the queue is cleared to zero. - @result Returns the head of a packet chain linking all packets that were held - in the queue, or NULL if the queue was empty. -*/ - - virtual mbuf_t dequeueAll(); - -/*! @function lockDequeueAll - @abstract Removes all packets from a synchronized queue and returns the - head of the packet chain. - @discussion The size of the queue is cleared to zero. A spinlock is used - to synchronize access to the queue. - @result Returns the head of a packet chain linking all packets that were held - in the queue, or NULL if the queue was empty. -*/ - - virtual mbuf_t lockDequeueAll(); - -/*! @function flush - @abstract Frees all packets currently held in the queue and releases them - back to the free mbuf pool. - @discussion The size of the queue is cleared to zero. - @result Returns the number of packets freed. -*/ - - virtual UInt32 flush(); - -/*! @function lockFlush - @abstract Frees all packets currently held in a synchronized queue and - releases them back to the free mbuf pool. - @discussion The size of the queue is cleared to zero. A spinlock is used - to synchronize access to the queue. - @result Returns the number of packets freed. -*/ - - virtual UInt32 lockFlush(); - - // Virtual Pad functions - OSMetaClassDeclareReservedUnused( IOPacketQueue, 0); - OSMetaClassDeclareReservedUnused( IOPacketQueue, 1); - OSMetaClassDeclareReservedUnused( IOPacketQueue, 2); - OSMetaClassDeclareReservedUnused( IOPacketQueue, 3); - OSMetaClassDeclareReservedUnused( IOPacketQueue, 4); - OSMetaClassDeclareReservedUnused( IOPacketQueue, 5); - OSMetaClassDeclareReservedUnused( IOPacketQueue, 6); - OSMetaClassDeclareReservedUnused( IOPacketQueue, 7); - OSMetaClassDeclareReservedUnused( IOPacketQueue, 8); - OSMetaClassDeclareReservedUnused( IOPacketQueue, 9); - OSMetaClassDeclareReservedUnused( IOPacketQueue, 10); - OSMetaClassDeclareReservedUnused( IOPacketQueue, 11); - OSMetaClassDeclareReservedUnused( IOPacketQueue, 12); - OSMetaClassDeclareReservedUnused( IOPacketQueue, 13); - OSMetaClassDeclareReservedUnused( IOPacketQueue, 14); - OSMetaClassDeclareReservedUnused( IOPacketQueue, 15); -}; - -#endif /* !_IOPACKETQUEUE_H */ diff --git a/i386/include/IOKit/nvram/IONVRAMController.h b/i386/include/IOKit/nvram/IONVRAMController.h deleted file mode 100644 index 307d666..0000000 --- a/i386/include/IOKit/nvram/IONVRAMController.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IONVRAMCONTROLLER_H -#define _IOKIT_IONVRAMCONTROLLER_H - -#include <IOKit/IOService.h> - -class IONVRAMController: public IOService -{ - OSDeclareAbstractStructors(IONVRAMController); - -public: - virtual bool start(IOService *provider); - - virtual void sync(void); - - virtual IOReturn read(IOByteCount offset, UInt8 *buffer, - IOByteCount length) = 0; - virtual IOReturn write(IOByteCount offset, UInt8 *buffer, - IOByteCount length) = 0; -}; - -#endif /* !_IOKIT_IONVRAMCONTROLLER_H */ diff --git a/i386/include/IOKit/pci/IOAGPDevice.h b/i386/include/IOKit/pci/IOAGPDevice.h deleted file mode 100644 index c3a7d90..0000000 --- a/i386/include/IOKit/pci/IOAGPDevice.h +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_IOAGPDEVICE_H -#define _IOKIT_IOAGPDEVICE_H - -#include <IOKit/IORangeAllocator.h> -#include <IOKit/pci/IOPCIDevice.h> - -/* Definitions of AGP config registers */ -enum { - kIOPCIConfigAGPStatusOffset = 4, - kIOPCIConfigAGPCommandOffset = 8 -}; - -/* Definitions of AGP Command & Status registers */ -enum { - kIOAGPRequestQueueMask = 0xff000000, - kIOAGPSideBandAddresssing = 0x00000200, - kIOAGPEnable = 0x00000100, - kIOAGP4GbAddressing = 0x00000020, - kIOAGPFastWrite = 0x00000010, - kIOAGP4xDataRate = 0x00000004, - kIOAGP2xDataRate = 0x00000002, - kIOAGP1xDataRate = 0x00000001 -}; - -enum { - kIOAGPGartInvalidate = 0x00000001 -}; - -// getAGPStatus() defines -enum { - kIOAGPDefaultStatus = 0 -}; -enum { - kIOAGPIdle = 0x00000001, - kIOAGPInvalidGARTEntry = 0x00000002, - kIOAGPAccessOutOfRange = 0x00000004 -}; - -#define kIOAGPBusFlagsKey "IOAGPFlags" -enum { - // the AGP target must be idle before invalidating its gart tlb - kIOAGPGartIdleInvalidate = 0x00000001, - - // the AGP target cannot handle operations that cross page boundaries - kIOAGPDisablePageSpans = 0x00000002, - - // the AGP target cannot handle master -> target AGP writes - kIOAGPDisableAGPWrites = 0x00000004, - - // the AGP target cannot handle target -> master PCI reads - kIOAGPDisablePCIReads = 0x00000008, - - // the AGP target cannot handle master -> target PCI writes - kIOAGPDisablePCIWrites = 0x00000010, - - // the AGP target cannot handle all unaligned transactions - kIOAGPDisableUnaligned = 0x00000020, - - kIOAGPDisableFeature6 = 0x00000040, - kIOAGPDisableFeature7 = 0x00000080, - kIOAGPDisableFeature8 = 0x00000100, - kIOAGPDisableFeature9 = 0x00000200 -}; - -// masterState -enum { - kIOAGPStateEnabled = 0x00000001, - kIOAGPStateEnablePending = 0x00010000 -}; - - -/*! @class IOAGPDevice - @abstract An IOService class representing an AGP master device. - @discussion The discovery of an AGP master device by the PCI bus family results in an instance of the IOAGPDevice being created and published. It provides services specific to AGP, in addition to the PCI services supplied by its superclass IOPCIDevice. -*/ - -class IOAGPDevice : public IOPCIDevice -{ - OSDeclareDefaultStructors(IOAGPDevice) - -protected: - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. -*/ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) -*/ - ExpansionData *reserved; - -public: - UInt32 masterState; - UInt8 masterAGPRegisters; - -/*! @function createAGPSpace - @abstract Allocates the AGP space, and enables AGP transactions on the master and slave. - @discussion This method should be called by the driver for the AGP master device to set the size of the space and enable AGP transactions. It will destroy any AGP space currently allocated. - @param options No options are currently defined, pass zero. - @param address The physical range allocated for the AGP space is passed back to the caller. - @param length An in/out parameter - the caller sets the devices maximum AGP addressing and the actual size created is passed back. - @result Returns an IOReturn code indicating success or failure. -*/ - - virtual IOReturn createAGPSpace( IOOptionBits options, - IOPhysicalAddress * address, - IOPhysicalLength * length ); - -/*! @function destroyAGPSpace - @abstract Destroys the AGP space, and disables AGP transactions on the master and slave. - @discussion This method should be called by the driver to shutdown AGP transactions and release resources. -*/ - - virtual IOReturn destroyAGPSpace( void ); - -/*! @function getAGPRangeAllocator - @abstract Accessor to obtain the AGP range allocator. - @discussion To allocate ranges in AGP space, obtain a range allocator for the space with this method. It is retained while the space is created (until destroyAGPSpace is called) and should not be released by the caller. - @result Returns a pointer to the range allocator for the AGP space. -*/ - - virtual IORangeAllocator * getAGPRangeAllocator( void ); - -/*! @function getAGPStatus - @abstract Returns the current state of the AGP bus. - @discussion Returns state bits for the AGP bus. Only one type of status is currently defined. - @param which Type of status - only kIOAGPDefaultStatus is currently valid. - @result Returns mask of status bits for the AGP bus. -*/ - - virtual IOOptionBits getAGPStatus( IOOptionBits which = kIOAGPDefaultStatus ); - -/*! @function commitAGPMemory - @abstract Makes memory addressable by AGP transactions. - @discussion Makes the memory described by the IOMemoryDescriptor object addressable by AGP by entering its pages into the GART array, given an offset into AGP space supplied by the caller (usually allocated by the AGP range allocator). It is the caller's responsibility to prepare non-kernel pageable memory before calling this method, with IOMemoryDescriptor::prepare. - @param memory A IOMemoryDescriptor object describing the memory to add to the GART. - @param agpOffset An offset into AGP space that the caller has allocated - usually allocated by the AGP range allocator. - @param options Pass kIOAGPGartInvalidate if the AGP target should invalidate any GART TLB. - @result Returns an IOReturn code indicating success or failure. -*/ - - virtual IOReturn commitAGPMemory( IOMemoryDescriptor * memory, - IOByteCount agpOffset, - IOOptionBits options = 0 ); - -/*! @function releaseAGPMemory - @abstract Releases memory addressable by AGP transactions. - @discussion Makes the memory described by the IOMemoryDescriptor object unaddressable by AGP by removing its pages from the GART array, given an offset into AGP space supplied by the caller (usually allocated by the AGP range allocator). It is the caller's responsibility to complete non-kernel pageable memory before calling this method, with IOMemoryDescriptor::complete. - @param memory A IOMemoryDescriptor object describing the memory to remove from the GART. - @param agpOffset An offset into AGP space that the caller has allocated - usually allocated by the AGP range allocator. - @param options Pass kIOAGPGartInvalidate if the AGP target should invalidate any GART TLB. - @result Returns an IOReturn code indicating success or failure. -*/ - - virtual IOReturn releaseAGPMemory( IOMemoryDescriptor * memory, - IOByteCount agpOffset, - IOOptionBits options = 0 ); - - virtual IOReturn resetAGP( IOOptionBits options = 0 ); - -/*! @function getAGPSpace - @abstract Returns the allocated AGP space. - @discussion This method can be called by the driver for the AGP master device to retrieve the physical address and size of the space created with createAGPSpace. - @param address The physical range allocated for the AGP space is passed back to the caller. Zero may be passed if the address is not needed by the caller. - @param length The size of the the AGP space created is passed back. Zero may be passed if the length is not needed by the caller. - @result Returns an IOReturn code indicating success or failure. -*/ - - virtual IOReturn getAGPSpace( IOPhysicalAddress * address, - IOPhysicalLength * length ); - - // Unused Padding - OSMetaClassDeclareReservedUnused(IOAGPDevice, 0); - OSMetaClassDeclareReservedUnused(IOAGPDevice, 1); - OSMetaClassDeclareReservedUnused(IOAGPDevice, 2); - OSMetaClassDeclareReservedUnused(IOAGPDevice, 3); - OSMetaClassDeclareReservedUnused(IOAGPDevice, 4); - OSMetaClassDeclareReservedUnused(IOAGPDevice, 5); - OSMetaClassDeclareReservedUnused(IOAGPDevice, 6); - OSMetaClassDeclareReservedUnused(IOAGPDevice, 7); - OSMetaClassDeclareReservedUnused(IOAGPDevice, 8); - OSMetaClassDeclareReservedUnused(IOAGPDevice, 9); - OSMetaClassDeclareReservedUnused(IOAGPDevice, 10); - OSMetaClassDeclareReservedUnused(IOAGPDevice, 11); - OSMetaClassDeclareReservedUnused(IOAGPDevice, 12); - OSMetaClassDeclareReservedUnused(IOAGPDevice, 13); - OSMetaClassDeclareReservedUnused(IOAGPDevice, 14); - OSMetaClassDeclareReservedUnused(IOAGPDevice, 15); - OSMetaClassDeclareReservedUnused(IOAGPDevice, 16); -}; - -#endif /* ! _IOKIT_IOAGPDEVICE_H */ diff --git a/i386/include/IOKit/pci/IOPCIBridge.h b/i386/include/IOKit/pci/IOPCIBridge.h deleted file mode 100644 index 2fac052..0000000 --- a/i386/include/IOKit/pci/IOPCIBridge.h +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_IOPCIBRIDGE_H -#define _IOKIT_IOPCIBRIDGE_H - -#include <IOKit/IOService.h> -#include <IOKit/IODeviceMemory.h> -#include <IOKit/IOFilterInterruptEventSource.h> -#include <IOKit/pci/IOAGPDevice.h> - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -typedef uint64_t IOPCIScalar; - -struct IOPCIRange -{ - IOPCIScalar start; - IOPCIScalar size; - IOPCIScalar alignment; - UInt32 type; - UInt32 flags; - struct IOPCIRange * next; - struct IOPCIRange * nextSubRange; - struct IOPCIRange * subRange; -}; - -enum { - kIOPCIResourceTypeMemory = 0, - kIOPCIResourceTypePrefetchMemory, - kIOPCIResourceTypeIO, - kIOPCIResourceTypeBusNumber, - kIOPCIResourceTypeCount -}; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/*! - @class IOPCIBridge - @abstract Base class for all PCI bridge drivers. -*/ -class IOPCIConfigurator; -class IOPCIDevice; - -class IOPCIBridge : public IOService -{ - friend class IOPCIDevice; - friend class IOPCIConfigurator; - - OSDeclareAbstractStructors(IOPCIBridge) - -private: - static void initialize(void); - IORegistryEntry * findMatching( OSIterator * in, IOPCIAddressSpace space ); - virtual bool isDTNub( IOPCIDevice * nub ); - bool checkProperties( IOPCIDevice * entry ); - - void removeDevice( IOPCIDevice * device, IOOptionBits options = 0 ); - IOReturn restoreMachineState( IOOptionBits options = 0); - IOReturn _restoreDeviceState( IOPCIDevice * device, IOOptionBits options ); - IOReturn resolveLegacyInterrupts( IOService * provider, IOPCIDevice * nub ); - IOReturn resolveMSIInterrupts ( IOService * provider, IOPCIDevice * nub ); - -protected: - static void nvLocation( IORegistryEntry * entry, - UInt8 * busNum, UInt8 * deviceNum, UInt8 * functionNum ); - static SInt32 compareAddressCell( UInt32 cellCount, UInt32 cleft[], UInt32 cright[] ); - void checkTerminateChildren(IOService * bridgeDevice, bool eject); - IOReturn setDeviceASPMBits(IOPCIDevice * device, IOOptionBits state); - - IORangeAllocator * bridgeMemoryRanges; - IORangeAllocator * bridgeIORanges; - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOPCIBridge in the future. -*/ - struct ExpansionData - { - friend class IOPCIConfigurator; - IORangeAllocator * cardBusMemoryRanges; - IOPCIRange * rangeLists[kIOPCIResourceTypeCount]; - }; - -/*! @var reserved - Reserved for future use. (Internal use only) -*/ - ExpansionData *reserved; - -protected: -public: - virtual void probeBus( IOService * provider, UInt8 busNum ); - - virtual UInt8 firstBusNum( void ); - virtual UInt8 lastBusNum( void ); - - virtual void spaceFromProperties( OSDictionary * propTable, - IOPCIAddressSpace * space ); - virtual OSDictionary * constructProperties( IOPCIAddressSpace space ); - - virtual IOPCIDevice * createNub( OSDictionary * from ); - - virtual bool initializeNub( IOPCIDevice * nub, OSDictionary * from ); - - virtual bool publishNub( IOPCIDevice * nub, UInt32 index ); - - virtual bool addBridgeMemoryRange( IOPhysicalAddress start, - IOPhysicalLength length, bool host ); - - virtual bool addBridgeIORange( IOByteCount start, IOByteCount length ); - - virtual bool constructRange( IOPCIAddressSpace * flags, - IOPhysicalAddress phys, IOPhysicalLength len, - OSArray * array ); - - virtual bool matchNubWithPropertyTable( IOService * nub, - OSDictionary * propertyTable, - SInt32 * score ); - - virtual bool compareNubName( const IOService * nub, OSString * name, - OSString ** matched = 0 ) const; - - virtual bool pciMatchNub( IOPCIDevice * nub, - OSDictionary * table, SInt32 * score); - - virtual bool matchKeys( IOPCIDevice * nub, const char * keys, - UInt32 defaultMask, UInt8 regNum ); - - virtual IOReturn getNubResources( IOService * nub ); - - virtual IOReturn getNubAddressing( IOPCIDevice * nub ); - - virtual IOReturn getDTNubAddressing( IOPCIDevice * nub ); - -public: - virtual void free( void ); - - virtual bool start( IOService * provider ); - - virtual void stop( IOService * provider ); - - virtual bool configure( IOService * provider ); - - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - virtual IODeviceMemory * ioDeviceMemory( void ) = 0; - - virtual UInt32 configRead32( IOPCIAddressSpace space, UInt8 offset ) = 0; - virtual void configWrite32( IOPCIAddressSpace space, - UInt8 offset, UInt32 data ) = 0; - virtual UInt16 configRead16( IOPCIAddressSpace space, UInt8 offset ) = 0; - virtual void configWrite16( IOPCIAddressSpace space, - UInt8 offset, UInt16 data ) = 0; - virtual UInt8 configRead8( IOPCIAddressSpace space, UInt8 offset ) = 0; - virtual void configWrite8( IOPCIAddressSpace space, - UInt8 offset, UInt8 data ) = 0; - - virtual IOPCIAddressSpace getBridgeSpace( void ) = 0; - - virtual UInt32 findPCICapability( IOPCIAddressSpace space, - UInt8 capabilityID, UInt8 * offset = 0 ); - - virtual IOReturn setDevicePowerState( IOPCIDevice * device, - unsigned long whatToDo ); - virtual IOReturn saveDeviceState( IOPCIDevice * device, - IOOptionBits options = 0 ); - virtual IOReturn restoreDeviceState( IOPCIDevice * device, - IOOptionBits options = 0 ); - - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - virtual IOReturn createAGPSpace( IOAGPDevice * master, - IOOptionBits options, - IOPhysicalAddress * address, - IOPhysicalLength * length ); - - virtual IOReturn destroyAGPSpace( IOAGPDevice * master ); - - virtual IORangeAllocator * getAGPRangeAllocator( IOAGPDevice * master ); - - virtual IOOptionBits getAGPStatus( IOAGPDevice * master, - IOOptionBits options = 0 ); - virtual IOReturn resetAGPDevice( IOAGPDevice * master, - IOOptionBits options = 0 ); - - virtual IOReturn getAGPSpace( IOAGPDevice * master, - IOPhysicalAddress * address, - IOPhysicalLength * length ); - - virtual IOReturn commitAGPMemory( IOAGPDevice * master, - IOMemoryDescriptor * memory, - IOByteCount agpOffset, - IOOptionBits options ); - - virtual IOReturn releaseAGPMemory( IOAGPDevice * master, - IOMemoryDescriptor * memory, - IOByteCount agpOffset, - IOOptionBits options ); - -protected: - OSMetaClassDeclareReservedUsed(IOPCIBridge, 0); - virtual bool addBridgePrefetchableMemoryRange( IOPhysicalAddress start, - IOPhysicalLength length, - bool host ); - - OSMetaClassDeclareReservedUsed(IOPCIBridge, 1); - virtual UInt32 extendedFindPCICapability( IOPCIAddressSpace space, - UInt32 capabilityID, IOByteCount * offset = 0 ); - - OSMetaClassDeclareReservedUsed(IOPCIBridge, 2); - virtual IOReturn setDeviceASPMState(IOPCIDevice * device, - IOService * client, IOOptionBits state); - - // Unused Padding - OSMetaClassDeclareReservedUnused(IOPCIBridge, 3); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 4); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 5); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 6); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 7); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 8); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 9); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 10); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 11); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 12); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 13); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 14); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 15); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 16); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 17); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 18); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 19); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 20); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 21); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 22); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 23); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 24); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 25); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 26); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 27); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 28); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 29); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 30); - OSMetaClassDeclareReservedUnused(IOPCIBridge, 31); - - - -}; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#define kIOPCIBridgeRegs (32) -/*! - @class IOPCI2PCIBridge - @abstract Base class for all PCI-to-PCI bridge drivers. -*/ - -class IOPCI2PCIBridge : public IOPCIBridge -{ - OSDeclareDefaultStructors(IOPCI2PCIBridge) - -private: - - IOPCIDevice * bridgeDevice; - UInt32 bridgeState[kIOPCIBridgeRegs]; - -protected: -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. - */ - struct ExpansionData - { - // /hotp - IOByteCount xpressCapability; - IOFilterInterruptEventSource * bridgeInterruptSource; - IOWorkLoop * workLoop; - uint32_t hotplugCount; - uint8_t presence; - uint8_t waitingLinkEnable; - uint8_t linkChangeOnly; - uint8_t interruptEnablePending; - uint8_t __reserved[4]; - // hotp/ - }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; -public: - - virtual UInt8 firstBusNum( void ); - virtual UInt8 lastBusNum( void ); - -public: - virtual void free(); - - virtual bool serializeProperties( OSSerialize * serialize ) const; - - virtual IOService * probe( IOService * provider, - SInt32 * score ); - - virtual bool start( IOService * provider ); - - virtual void stop( IOService * provider ); - - virtual bool configure( IOService * provider ); - - virtual void probeBus( IOService * provider, UInt8 busNum ); - - virtual IOReturn requestProbe( IOOptionBits options ); - - virtual void saveBridgeState( void ); - - virtual void restoreBridgeState( void ); - - IOReturn setPowerState( unsigned long powerState, - IOService * whatDevice ); - - virtual bool publishNub( IOPCIDevice * nub, UInt32 index ); - - virtual IODeviceMemory * ioDeviceMemory( void ); - - virtual IOPCIAddressSpace getBridgeSpace( void ); - - virtual UInt32 configRead32( IOPCIAddressSpace space, UInt8 offset ); - virtual void configWrite32( IOPCIAddressSpace space, - UInt8 offset, UInt32 data ); - virtual UInt16 configRead16( IOPCIAddressSpace space, UInt8 offset ); - virtual void configWrite16( IOPCIAddressSpace space, - UInt8 offset, UInt16 data ); - virtual UInt8 configRead8( IOPCIAddressSpace space, UInt8 offset ); - virtual void configWrite8( IOPCIAddressSpace space, - UInt8 offset, UInt8 data ); - - virtual IOReturn setDeviceASPMState(IOPCIDevice * device, - IOService * client, IOOptionBits state); - - // Unused Padding - OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 0); - OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 1); - OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 2); - OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 3); - OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 4); - OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 5); - OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 6); - OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 7); - OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge, 8); - -protected: - bool filterInterrupt( IOFilterInterruptEventSource * source); - - void handleInterrupt( IOInterruptEventSource * source, - int count ); - -}; - -#endif /* ! _IOKIT_IOPCIBRIDGE_H */ diff --git a/i386/include/IOKit/pci/IOPCIDevice.h b/i386/include/IOKit/pci/IOPCIDevice.h deleted file mode 100644 index d031a06..0000000 --- a/i386/include/IOKit/pci/IOPCIDevice.h +++ /dev/null @@ -1,673 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IOPCIDEVICE_H -#define _IOKIT_IOPCIDEVICE_H - -#include <IOKit/IOService.h> - -/* Definitions of PCI Config Registers */ -enum { - kIOPCIConfigVendorID = 0x00, - kIOPCIConfigDeviceID = 0x02, - kIOPCIConfigCommand = 0x04, - kIOPCIConfigStatus = 0x06, - kIOPCIConfigRevisionID = 0x08, - kIOPCIConfigClassCode = 0x09, - kIOPCIConfigCacheLineSize = 0x0C, - kIOPCIConfigLatencyTimer = 0x0D, - kIOPCIConfigHeaderType = 0x0E, - kIOPCIConfigBIST = 0x0F, - kIOPCIConfigBaseAddress0 = 0x10, - kIOPCIConfigBaseAddress1 = 0x14, - kIOPCIConfigBaseAddress2 = 0x18, - kIOPCIConfigBaseAddress3 = 0x1C, - kIOPCIConfigBaseAddress4 = 0x20, - kIOPCIConfigBaseAddress5 = 0x24, - kIOPCIConfigCardBusCISPtr = 0x28, - kIOPCIConfigSubSystemVendorID = 0x2C, - kIOPCIConfigSubSystemID = 0x2E, - kIOPCIConfigExpansionROMBase = 0x30, - kIOPCIConfigCapabilitiesPtr = 0x34, - kIOPCIConfigInterruptLine = 0x3C, - kIOPCIConfigInterruptPin = 0x3D, - kIOPCIConfigMinimumGrant = 0x3E, - kIOPCIConfigMaximumLatency = 0x3F -}; - -/* Definitions of Capabilities PCI Config Register */ -enum { - kIOPCICapabilityIDOffset = 0x00, - kIOPCINextCapabilityOffset = 0x01, - - kIOPCIPowerManagementCapability = 0x01, - kIOPCIAGPCapability = 0x02, - kIOPCIVitalProductDataCapability = 0x03, - kIOPCISlotIDCapability = 0x04, - kIOPCIMSICapability = 0x05, - kIOPCICPCIHotswapCapability = 0x06, - kIOPCIPCIXCapability = 0x07, - kIOPCILDTCapability = 0x08, - kIOPCIVendorSpecificCapability = 0x09, - kIOPCIDebugPortCapability = 0x0a, - kIOPCICPCIResourceControlCapability = 0x0b, - kIOPCIHotplugCapability = 0x0c, - kIOPCIAGP8Capability = 0x0e, - kIOPCISecureCapability = 0x0f, - kIOPCIPCIExpressCapability = 0x10, - kIOPCIMSIXCapability = 0x11, - - kIOPCIExpressErrorReportingCapability = -1UL, - kIOPCIExpressVirtualChannelCapability = -2UL, - kIOPCIExpressDeviceSerialNumberCapability = -3UL, - kIOPCIExpressPowerBudgetCapability = -4UL -}; - -/* Space definitions */ -enum { - kIOPCIConfigSpace = 0, - kIOPCIIOSpace = 1, - kIOPCI32BitMemorySpace = 2, - kIOPCI64BitMemorySpace = 3 -}; - -/* Command register definitions */ -enum { - kIOPCICommandIOSpace = 0x0001, - kIOPCICommandMemorySpace = 0x0002, - kIOPCICommandBusMaster = 0x0004, - kIOPCICommandSpecialCycles = 0x0008, - kIOPCICommandMemWrInvalidate = 0x0010, - kIOPCICommandPaletteSnoop = 0x0020, - kIOPCICommandParityError = 0x0040, - kIOPCICommandAddressStepping = 0x0080, - kIOPCICommandSERR = 0x0100, - kIOPCICommandFastBack2Back = 0x0200, - kIOPCICommandInterruptDisable = 0x0400 -}; - -/* Status register definitions */ -enum { - kIOPCIStatusCapabilities = 0x0010, - kIOPCIStatusPCI66 = 0x0020, - kIOPCIStatusUDF = 0x0040, - kIOPCIStatusFastBack2Back = 0x0080, - kIOPCIStatusDevSel0 = 0x0000, - kIOPCIStatusDevSel1 = 0x0200, - kIOPCIStatusDevSel2 = 0x0400, - kIOPCIStatusDevSel3 = 0x0600, - kIOPCIStatusTargetAbortCapable = 0x0800, - kIOPCIStatusTargetAbortActive = 0x1000, - kIOPCIStatusMasterAbortActive = 0x2000, - kIOPCIStatusSERRActive = 0x4000, - kIOPCIStatusParityErrActive = 0x8000 -}; - -// constants which are part of the PCI Bus Power Management Spec. -enum -{ - // capabilities bits in the 16 bit capabilities register - kPCIPMCPMESupportFromD3Cold = 0x8000, - kPCIPMCPMESupportFromD3Hot = 0x4000, - kPCIPMCPMESupportFromD2 = 0x2000, - kPCIPMCPMESupportFromD1 = 0x1000, - kPCIPMCPMESupportFromD0 = 0x0800, - kPCIPMCD2Support = 0x0400, - kPCIPMCD1Support = 0x0200, - - kPCIPMCD3Support = 0x0001 -}; - -enum -{ - // bits in the power management control/status register - kPCIPMCSPMEStatus = 0x8000, - kPCIPMCSPMEEnable = 0x0100, - kPCIPMCSPowerStateMask = 0x0003, - kPCIPMCSPowerStateD3 = 0x0003, - kPCIPMCSPowerStateD2 = 0x0002, - kPCIPMCSPowerStateD1 = 0x0001, - kPCIPMCSPowerStateD0 = 0x0000, - - kPCIPMCSDefaultEnableBits = (~(IOOptionBits)0) -}; - -union IOPCIAddressSpace { - UInt32 bits; - struct { -#if __BIG_ENDIAN__ - unsigned int reloc:1; - unsigned int prefetch:1; - unsigned int t:1; - unsigned int resv:3; - unsigned int space:2; - unsigned int busNum:8; - unsigned int deviceNum:5; - unsigned int functionNum:3; - unsigned int registerNum:8; -#elif __LITTLE_ENDIAN__ - unsigned int registerNum:8; - unsigned int functionNum:3; - unsigned int deviceNum:5; - unsigned int busNum:8; - unsigned int space:2; - unsigned int resv:3; - unsigned int t:1; - unsigned int prefetch:1; - unsigned int reloc:1; -#endif - } s; - struct { -#if __BIG_ENDIAN__ - unsigned int resv:4; - unsigned int registerNumExtended:4; - unsigned int busNum:8; - unsigned int deviceNum:5; - unsigned int functionNum:3; - unsigned int registerNum:8; -#elif __LITTLE_ENDIAN__ - unsigned int registerNum:8; - unsigned int functionNum:3; - unsigned int deviceNum:5; - unsigned int busNum:8; - unsigned int registerNumExtended:4; - unsigned int resv:4; -#endif - } es; -}; - -struct IOPCIPhysicalAddress { - IOPCIAddressSpace physHi; - UInt32 physMid; - UInt32 physLo; - UInt32 lengthHi; - UInt32 lengthLo; -}; - -// IOPCIDevice matching property names -#define kIOPCIMatchKey "IOPCIMatch" -#define kIOPCIPrimaryMatchKey "IOPCIPrimaryMatch" -#define kIOPCISecondaryMatchKey "IOPCISecondaryMatch" -#define kIOPCIClassMatchKey "IOPCIClassMatch" - -// property to control PCI default config space save on sleep -#define kIOPMPCIConfigSpaceVolatileKey "IOPMPCIConfigSpaceVolatile" - -// pci express link status -#define kIOPCIExpressLinkStatusKey "IOPCIExpressLinkStatus" -// pci express link capabilities -#define kIOPCIExpressLinkCapabilitiesKey "IOPCIExpressLinkCapabilities" - -#ifndef kIOPlatformDeviceASPMEnableKey -#define kIOPlatformDeviceASPMEnableKey "IOPlatformDeviceASPMEnable" -#endif - -#ifndef kIOPCIDeviceASPMSupportedKey -#define kIOPCIDeviceASPMSupportedKey "pci-aspm-supported" -#endif - -#define kIOPCIPMEOptionsKey "IOPCIPMEOptions" - - -enum { - kIOPCIDevicePowerStateCount = 3, - kIOPCIDeviceOffState = 0, - kIOPCIDeviceDozeState = 1, - kIOPCIDeviceOnState = 2, -}; - -enum -{ - // bits getInterruptType result - kIOInterruptTypePCIMessaged = 0x00010000 -}; - -class IOPCIBridge; -class IOPCI2PCIBridge; -class IOPCIMessagedInterruptController; - -/*! @class IOPCIDevice : public IOService - @abstract An IOService class representing a PCI device. - @discussion The discovery of a PCI device by the PCI bus family results in an instance of the IOPCIDevice being created and published. It provides services for looking up and mapping memory mapped hardware, and access to the PCI configuration and I/O spaces. - -<br><br>Matching Supported by IOPCIDevice<br><br> - -Two types of matching are available, OpenFirmware name matching and PCI register matching. Currently, only one of these two matching schemes can be used in the same property table. - -<br><br>OpenFirmware Name Matching<br><br> - -IOService performs matching based on the IONameMatch property (see IOService). IOPCIDevices created with OpenFirmware device tree entries will name match based on the standard OpenFirmware name matching properties. - -<br><br>PCI Register Matching<br><br> - -A PCI device driver can also match on the values of certain config space registers. - -In each case, several matching values can be specified, and an optional mask for the value of the config space register may follow the value, preceded by an '&' character. -<br> -<br> - kIOPCIMatchKey, "IOPCIMatch" -<br> -The kIOPCIMatchKey property matches the vendor and device ID (0x00) register, or the subsystem register (0x2c). -<br> -<br> - kIOPCIPrimaryMatchKey, "IOPCIPrimaryMatch" -<br> -The kIOPCIPrimaryMatchKey property matches the vendor and device ID (0x00) register. -<br> -<br> - kIOPCISecondaryMatchKey, "IOPCISecondaryMatch" -<br> -The kIOPCISecondaryMatchKey property matches the subsystem register (0x2c). -<br> -<br> - kIOPCIClassMatchKey, "IOPCIClassMatch" -<br> -The kIOPCIClassMatchKey property matches the class code register (0x08). The default mask for this register is 0xffffff00. -<br> -<br> -Examples: -<br> -<br> - <key>IOPCIMatch</key> <br> - <string>0x00261011</string> -<br> -Matches a device whose vendor ID is 0x1011, and device ID is 0x0026, including subsystem IDs. -<br> -<br> - <key>IOPCIMatch</key> <br> - <string>0x00789004&0x00ffffff 0x78009004&0x0xff00ffff</string> -<br> -Matches with any device with a vendor ID of 0x9004, and a device ID of 0xzz78 or 0x78zz, where 'z' is don't care. -<br> -<br> - <key>IOPCIClassMatch</key> <br> - <string>0x02000000&0xffff0000</string> -<br> -<br> -Matches a device whose class code is 0x0200zz, an ethernet device. - -*/ - -class IOPCIDevice : public IOService -{ - OSDeclareDefaultStructors(IOPCIDevice) - - friend class IOPCIBridge; - friend class IOPCI2PCIBridge; - friend class IOPCIMessagedInterruptController; - -protected: - IOPCIBridge * parent; - IOMemoryMap * ioMap; - OSObject * slotNameProperty; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - struct IOPCIDeviceExpansionData * reserved; - -public: - IOPCIAddressSpace space; - UInt32 * savedConfig; - -public: - /* IOService/IORegistryEntry methods */ - - virtual bool init( OSDictionary * propTable ); - virtual bool init( IORegistryEntry * from, - const IORegistryPlane * inPlane ); - virtual void free(); - virtual bool attach( IOService * provider ); - virtual void detach( IOService * provider ); - - virtual IOReturn newUserClient( task_t owningTask, void * securityID, - UInt32 type, OSDictionary * properties, - IOUserClient ** handler ); - - virtual IOReturn powerStateWillChangeTo (IOPMPowerFlags capabilities, - unsigned long stateNumber, - IOService* whatDevice); - virtual IOReturn setPowerState( unsigned long, IOService * ); - - virtual bool compareName( OSString * name, OSString ** matched = 0 ) const; - virtual bool matchPropertyTable( OSDictionary * table, - SInt32 * score ); - virtual IOService * matchLocation( IOService * client ); - virtual IOReturn getResources( void ); - virtual IOReturn setProperties(OSObject * properties); - virtual IOReturn callPlatformFunction(const OSSymbol * functionName, - bool waitForFunction, - void * p1, void * p2, - void * p3, void * p4); - virtual IOReturn callPlatformFunction(const char * functionName, - bool waitForFunction, - void * p1, void * p2, - void * p3, void * p4); - - /* Config space accessors */ - - virtual UInt32 configRead32( IOPCIAddressSpace space, UInt8 offset ); - virtual void configWrite32( IOPCIAddressSpace space, - UInt8 offset, UInt32 data ); - virtual UInt16 configRead16( IOPCIAddressSpace space, UInt8 offset ); - virtual void configWrite16( IOPCIAddressSpace space, - UInt8 offset, UInt16 data ); - virtual UInt8 configRead8( IOPCIAddressSpace space, UInt8 offset ); - virtual void configWrite8( IOPCIAddressSpace space, - UInt8 offset, UInt8 data ); - -/*! @function configRead32 - @abstract Reads a 32-bit value from the PCI device's configuration space. - @discussion This method reads a 32-bit configuration space register on the device and returns its value. - @param offset An 8-bit offset into configuration space, of which bits 0-1 are ignored. - @result An 32-bit value in host byte order (big endian on PPC). */ - - virtual UInt32 configRead32( UInt8 offset ); - -/*! @function configRead16 - @abstract Reads a 16-bit value from the PCI device's configuration space. - @discussion This method reads a 16-bit configuration space register on the device and returns its value. - @param offset An 8-bit offset into configuration space, of which bit 0 is ignored. - @result An 16-bit value in host byte order (big endian on PPC). */ - - virtual UInt16 configRead16( UInt8 offset ); - -/*! @function configRead8 - @abstract Reads a 8-bit value from the PCI device's configuration space. - @discussion This method reads a 8-bit configuration space register on the device and returns its value. - @param offset An 8-bit offset into configuration space. - @result An 8-bit value. */ - - virtual UInt8 configRead8( UInt8 offset ); - -/*! @function configWrite32 - @abstract Writes a 32-bit value to the PCI device's configuration space. - @discussion This method write a 32-bit value to a configuration space register on the device. - @param offset An 8-bit offset into configuration space, of which bits 0-1 are ignored. - @param data An 32-bit value to be written in host byte order (big endian on PPC). */ - - virtual void configWrite32( UInt8 offset, UInt32 data ); - -/*! @function configWrite16 - @abstract Writes a 16-bit value to the PCI device's configuration space. - @discussion This method write a 16-bit value to a configuration space register on the device. - @param offset An 8-bit offset into configuration space, of which bit 0 is ignored. - @param data An 16-bit value to be written in host byte order (big endian on PPC). */ - - virtual void configWrite16( UInt8 offset, UInt16 data ); - -/*! @function configWrite8 - @abstract Writes a 8-bit value to the PCI device's configuration space. - @discussion This method write a 8-bit value to a configuration space register on the device. - @param offset An 8-bit offset into configuration space. - @param data An 8-bit value to be written. */ - - virtual void configWrite8( UInt8 offset, UInt8 data ); - - virtual IOReturn saveDeviceState( IOOptionBits options = 0 ); - virtual IOReturn restoreDeviceState( IOOptionBits options = 0 ); - -/*! @function setConfigBits - @abstract Sets masked bits in a configuration space register. - @discussion This method sets masked bits in a configuration space register on the device by reading and writing the register. The value of the masked bits before the write is returned. - @param offset An 8-bit offset into configuration space, of which bits 0-1 are ignored. - @param mask An 32-bit mask indicating which bits in the value parameter are valid. - @param data An 32-bit value to be written in host byte order (big endian on PPC). - @result The value of the register masked with the mask before the write. */ - - virtual UInt32 setConfigBits( UInt8 offset, UInt32 mask, UInt32 value ); - -/*! @function setMemoryEnable - @abstract Sets the device's memory space response. - @discussion This method sets the memory space response bit in the device's command config space register to the passed value, and returns the previous state of the enable. - @param enable True or false to enable or disable the memory space response. - @result True if the memory space response was previously enabled, false otherwise. */ - - virtual bool setMemoryEnable( bool enable ); - -/*! @function setIOEnable - @abstract Sets the device's I/O space response. - @discussion This method sets the I/O space response bit in the device's command config space register to the passed value, and returns the previous state of the enable. The exclusive option allows only one exclusive device on the bus to be enabled concurrently, this should be only for temporary access. - @param enable True or false to enable or disable the I/O space response. - @param exclusive If true, only one setIOEnable with the exclusive flag set will be allowed at a time on the bus, this should be only for temporary access. - @result True if the I/O space response was previously enabled, false otherwise. */ - - virtual bool setIOEnable( bool enable, bool exclusive = false ); - -/*! @function setBusMasterEnable - @abstract Sets the device's bus master enable. - @discussion This method sets the bus master enable bit in the device's command config space register to the passed value, and returns the previous state of the enable. - @param enable True or false to enable or disable bus mastering. - @result True if bus mastering was previously enabled, false otherwise. */ - - virtual bool setBusMasterEnable( bool enable ); - -/*! @function findPCICapability - @abstract Search configuration space for a PCI capability register. - @discussion This method searches the device's config space for a PCI capability register matching the passed capability ID, if the device supports PCI capabilities. To search for PCI Express extended capabilities or for multiple capablities with the same ID, use the extendedFindPCICapability() method. - @param capabilityID An 8-bit PCI capability ID. - @param offset An optional pointer to return the offset into config space where the capability was found. - @result The 32-bit value of the capability register if one was found, zero otherwise. */ - - virtual UInt32 findPCICapability( UInt8 capabilityID, UInt8 * offset = 0 ); - -/*! @function getBusNumber - @abstract Accessor to return the PCI device's assigned bus number. - @discussion This method is an accessor to return the PCI device's assigned bus number. - @result The 8-bit value of device's PCI bus number. */ - - virtual UInt8 getBusNumber( void ); - -/*! @function getDeviceNumber - @abstract Accessor to return the PCI device's device number. - @discussion This method is an accessor to return the PCI device's device number. - @result The 5-bit value of device's device number. */ - - virtual UInt8 getDeviceNumber( void ); - -/*! @function getFunctionNumber - @abstract Accessor to return the PCI device's function number. - @discussion This method is an accessor to return the PCI device's function number. - @result The 3-bit value of device's function number. */ - - virtual UInt8 getFunctionNumber( void ); - - /* Device memory accessors */ - -/*! @function getDeviceMemoryWithRegister - @abstract Returns an instance of IODeviceMemory representing one of the device's memory mapped ranges. - @discussion This method will return a pointer to an instance of IODeviceMemory for the physical memory range that was assigned to the configuration space base address register passed in. It is analogous to IOService::getDeviceMemoryWithIndex. - @param reg The 8-bit configuration space register that is the base address register for the desired range. - @result A pointer to an instance of IODeviceMemory, or zero no such range was found. The IODeviceMemory is retained by the provider, so is valid while attached, or while any mappings to it exist. It should not be released by the caller. */ - - virtual IODeviceMemory * getDeviceMemoryWithRegister( UInt8 reg ); - -/*! @function mapDeviceMemoryWithRegister - @abstract Maps a physical range of the device. - @discussion This method will create a mapping for the IODeviceMemory for the physical memory range that was assigned to the configuration space base address register passed in, with IODeviceMemory::map(options). The mapping is represented by the returned instance of IOMemoryMap, which should not be released until the mapping is no longer required. This method is analogous to IOService::mapDeviceMemoryWithIndex. - @param reg The 8-bit configuration space register that is the base address register for the desired range. - @param options Options to be passed to the IOMemoryDescriptor::map() method. - @result An instance of IOMemoryMap, or zero if the index is beyond the count available. The mapping should be released only when access to it is no longer required. */ - - virtual IOMemoryMap * mapDeviceMemoryWithRegister( UInt8 reg, - IOOptionBits options = 0 ); - -/*! @function ioDeviceMemory - @abstract Accessor to the I/O space aperture for the bus. - @discussion This method will return a reference to the IODeviceMemory for the I/O aperture of the bus the device is on. - @result A pointer to an IODeviceMemory object for the I/O aperture. The IODeviceMemory is retained by the provider, so is valid while attached, or while any mappings to it exist. It should not be released by the caller. */ - - virtual IODeviceMemory * ioDeviceMemory( void ); - - /* I/O space accessors */ - -/*! @function ioWrite32 - @abstract Writes a 32-bit value to an I/O space aperture. - @discussion This method will write a 32-bit value to a 4 byte aligned offset in an I/O space aperture. If a map object is passed in, the value is written relative to it, otherwise to the value is written relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC. - @param offset An offset into a bus or device's I/O space aperture. - @param value The value to be written in host byte order (big endian on PPC). - @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space. */ - - virtual void ioWrite32( UInt16 offset, UInt32 value, - IOMemoryMap * map = 0 ); - -/*! @function ioWrite16 - @abstract Writes a 16-bit value to an I/O space aperture. - @discussion This method will write a 16-bit value to a 2 byte aligned offset in an I/O space aperture. If a map object is passed in, the value is written relative to it, otherwise to the value is written relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC. - @param offset An offset into a bus or device's I/O space aperture. - @param value The value to be written in host byte order (big endian on PPC). - @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space. */ - - virtual void ioWrite16( UInt16 offset, UInt16 value, - IOMemoryMap * map = 0 ); - -/*! @function ioWrite8 - @abstract Writes a 8-bit value to an I/O space aperture. - @discussion This method will write a 8-bit value to an offset in an I/O space aperture. If a map object is passed in, the value is written relative to it, otherwise to the value is written relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC. - @param offset An offset into a bus or device's I/O space aperture. - @param value The value to be written in host byte order (big endian on PPC). - @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space. */ - - virtual void ioWrite8( UInt16 offset, UInt8 value, - IOMemoryMap * map = 0 ); - -/*! @function ioRead32 - @abstract Reads a 32-bit value from an I/O space aperture. - @discussion This method will read a 32-bit value from a 4 byte aligned offset in an I/O space aperture. If a map object is passed in, the value is read relative to it, otherwise to the value is read relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC. - @param offset An offset into a bus or device's I/O space aperture. - @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space. - @result The value read in host byte order (big endian on PPC). */ - - virtual UInt32 ioRead32( UInt16 offset, IOMemoryMap * map = 0 ); - -/*! @function ioRead16 - @abstract Reads a 16-bit value from an I/O space aperture. - @discussion This method will read a 16-bit value from a 2 byte aligned offset in an I/O space aperture. If a map object is passed in, the value is read relative to it, otherwise to the value is read relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC. - @param offset An offset into a bus or device's I/O space aperture. - @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space. - @result The value read in host byte order (big endian on PPC). */ - - virtual UInt16 ioRead16( UInt16 offset, IOMemoryMap * map = 0 ); - -/*! @function ioRead8 - @abstract Reads a 8-bit value from an I/O space aperture. - @discussion This method will read a 8-bit value from an offset in an I/O space aperture. If a map object is passed in, the value is read relative to it, otherwise to the value is read relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC. - @param offset An offset into a bus or device's I/O space aperture. - @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space. - @result The value read. */ - - virtual UInt8 ioRead8( UInt16 offset, IOMemoryMap * map = 0 ); - - OSMetaClassDeclareReservedUsed(IOPCIDevice, 0); -/*! @function hasPCIPowerManagement - @abstract determine whether or not the device supports PCI Bus Power Management. - @discussion This method will look at the device's capabilties registers and determine whether or not the device supports the PCI BUS Power Management Specification. - @param state(optional) Check for support of a specific state (e.g. kPCIPMCPMESupportFromD3Cold). If state is not suuplied or is 0, then check for a property in the registry which tells which state the hardware expects the device to go to during sleep. - @result true if the specified state is supported */ - virtual bool hasPCIPowerManagement(IOOptionBits state = 0); - - OSMetaClassDeclareReservedUsed(IOPCIDevice, 1); -/*! @function enablePCIPowerManagement - @abstract enable PCI power management for sleep state - @discussion This method will enable PCI Bus Powermanagement when going to sleep mode. - @param state(optional) Enables PCI Power Management by placing the function in the given state (e.g. kPCIPMCSPowerStateD3). If state is not specified or is 0xffffffff, then the IOPCIDevice determines the desired state. If state is kPCIPMCSPowerStateD0 (0) then PCI Power Management is disabled. - @result kIOReturnSuccess if there were no errors */ - virtual IOReturn enablePCIPowerManagement(IOOptionBits state = 0xffffffff); - - OSMetaClassDeclareReservedUsed(IOPCIDevice, 2); -/*! @function extendedFindPCICapability - @abstract Search configuration space for a PCI capability register. - @discussion This method searches the device's config space for a PCI capability register matching the passed capability ID, if the device supports PCI capabilities. - @param capabilityID A PCI capability ID. PCI Express devices may support extended capabilities in config space starting at offset 0x100. To search this space, the ID passed should be the negated value of the PCI-SIG assigned ID for the extended capability. - @param offset An optional in/out parameter to return the offset into config space where the capability was found, and to set the start point of the next search. Initialize the offset to zero before the first call to extendedFindPCICapability() and subsequent calls will find all capabilty blocks that may exist on the device with the same ID. - @result The 32-bit value of the capability register if one was found, zero otherwise. */ - - virtual UInt32 extendedFindPCICapability( UInt32 capabilityID, IOByteCount * offset = 0 ); - - // Unused Padding - OSMetaClassDeclareReservedUnused(IOPCIDevice, 3); - OSMetaClassDeclareReservedUnused(IOPCIDevice, 4); - OSMetaClassDeclareReservedUnused(IOPCIDevice, 5); - OSMetaClassDeclareReservedUnused(IOPCIDevice, 6); - OSMetaClassDeclareReservedUnused(IOPCIDevice, 7); - OSMetaClassDeclareReservedUnused(IOPCIDevice, 8); - OSMetaClassDeclareReservedUnused(IOPCIDevice, 9); - OSMetaClassDeclareReservedUnused(IOPCIDevice, 10); - OSMetaClassDeclareReservedUnused(IOPCIDevice, 11); - OSMetaClassDeclareReservedUnused(IOPCIDevice, 12); - OSMetaClassDeclareReservedUnused(IOPCIDevice, 13); - OSMetaClassDeclareReservedUnused(IOPCIDevice, 14); - OSMetaClassDeclareReservedUnused(IOPCIDevice, 15); - -public: - -/*! @function extendedConfigRead32 - @abstract Reads a 32-bit value from the PCI device's configuration space. - @discussion This method reads a 32-bit configuration space register on the device and returns its value. - @param offset A byte offset into configuration space, of which bits 0-1 are ignored. - @result An 32-bit value in host byte order (big endian on PPC). */ - - UInt32 extendedConfigRead32( IOByteCount offset ); - -/*! @function extendedConfigRead16 - @abstract Reads a 16-bit value from the PCI device's configuration space. - @discussion This method reads a 16-bit configuration space register on the device and returns its value. - @param offset A byte offset into configuration space, of which bit 0 is ignored. - @result An 16-bit value in host byte order (big endian on PPC). */ - - UInt16 extendedConfigRead16( IOByteCount offset ); - -/*! @function extendedConfigRead8 - @abstract Reads a 8-bit value from the PCI device's configuration space. - @discussion This method reads a 8-bit configuration space register on the device and returns its value. - @param offset A byte offset into configuration space. - @result An 8-bit value. */ - - UInt8 extendedConfigRead8( IOByteCount offset ); - -/*! @function extendedConfigWrite32 - @abstract Writes a 32-bit value to the PCI device's configuration space. - @discussion This method writes a 32-bit value to a configuration space register on the device. - @param offset A byte offset into configuration space, of which bits 0-1 are ignored. - @param data An 32-bit value to be written in host byte order (big endian on PPC). */ - - void extendedConfigWrite32( IOByteCount offset, UInt32 data ); - -/*! @function extendedConfigWrite16 - @abstract Writes a 16-bit value to the PCI device's configuration space. - @discussion This method writes a 16-bit value to a configuration space register on the device. - @param offset A byte offset into configuration space, of which bit 0 is ignored. - @param data An 16-bit value to be written in host byte order (big endian on PPC). */ - - void extendedConfigWrite16( IOByteCount offset, UInt16 data ); - -/*! @function extendedConfigWrite8 - @abstract Writes a 8-bit value to the PCI device's configuration space. - @discussion This method writes a 8-bit value to a configuration space register on the device. - @param offset A byte offset into configuration space. - @param data An 8-bit value to be written. */ - - void extendedConfigWrite8( IOByteCount offset, UInt8 data ); -}; - -#endif /* ! _IOKIT_IOPCIDEVICE_H */ - diff --git a/i386/include/IOKit/platform/.svn/all-wcprops b/i386/include/IOKit/platform/.svn/all-wcprops deleted file mode 100644 index 895fe9d..0000000 --- a/i386/include/IOKit/platform/.svn/all-wcprops +++ /dev/null @@ -1,29 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 61 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/platform -END -AppleMacIO.h -K 25 -svn:wc:ra_dav:version-url -V 74 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/platform/AppleMacIO.h -END -AppleMacIODevice.h -K 25 -svn:wc:ra_dav:version-url -V 80 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/platform/AppleMacIODevice.h -END -ApplePlatformExpert.h -K 25 -svn:wc:ra_dav:version-url -V 83 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/platform/ApplePlatformExpert.h -END -AppleNMI.h -K 25 -svn:wc:ra_dav:version-url -V 72 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/platform/AppleNMI.h -END diff --git a/i386/include/IOKit/platform/.svn/entries b/i386/include/IOKit/platform/.svn/entries deleted file mode 100644 index 51b93d8..0000000 --- a/i386/include/IOKit/platform/.svn/entries +++ /dev/null @@ -1,164 +0,0 @@ -10 - -dir -2117 -http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/platform -http://forge.voodooprojects.org/svn/chameleon - - - -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - -b5af796a-00a8-11df-919b-ffff7a100b7d - -AppleMacIO.h -file - - - - -2012-10-03T17:50:20.000000Z -e9614e104fdb0969eeaab8f5878c15db -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -2553 - -AppleMacIODevice.h -file - - - - -2012-10-03T17:50:20.000000Z -da33d4bcb4363ccb7d832f9b7019b3c9 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -2153 - -ApplePlatformExpert.h -file - - - - -2012-10-03T17:50:20.000000Z -227f5a69a8d7c83855c4dff7a0bdd68f -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -2744 - -AppleNMI.h -file - - - - -2012-10-03T17:50:20.000000Z -65ddf2ae2939f64b26b164cf5301970c -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -2542 - diff --git a/i386/include/IOKit/platform/.svn/text-base/AppleMacIO.h.svn-base b/i386/include/IOKit/platform/.svn/text-base/AppleMacIO.h.svn-base deleted file mode 100644 index ae12eca..0000000 --- a/i386/include/IOKit/platform/.svn/text-base/AppleMacIO.h.svn-base +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_APPLEMACIO_H -#define _IOKIT_APPLEMACIO_H - -#include <IOKit/IOService.h> - -#include <IOKit/platform/AppleMacIODevice.h> - -class AppleMacIO : public IOService -{ - OSDeclareAbstractStructors(AppleMacIO); - - IOService * fNub; - IOMemoryMap * fMemory; - - struct ExpansionData { }; - ExpansionData *fReserved; - -protected: - virtual bool selfTest( void ); - -public: - virtual bool start( IOService * provider ); - - virtual IOService * createNub( IORegistryEntry * from ); - - virtual void processNub( IOService * nub ); - - virtual void publishBelow( IORegistryEntry * root ); - - virtual const char * deleteList( void ); - virtual const char * excludeList( void ); - - virtual bool compareNubName( const IOService * nub, OSString * name, - OSString ** matched = 0 ) const; - - virtual IOReturn getNubResources( IOService * nub ); - - OSMetaClassDeclareReservedUnused(AppleMacIO, 0); - OSMetaClassDeclareReservedUnused(AppleMacIO, 1); - OSMetaClassDeclareReservedUnused(AppleMacIO, 2); - OSMetaClassDeclareReservedUnused(AppleMacIO, 3); -}; - -#endif /* ! _IOKIT_APPLEMACIO_H */ diff --git a/i386/include/IOKit/platform/.svn/text-base/AppleMacIODevice.h.svn-base b/i386/include/IOKit/platform/.svn/text-base/AppleMacIODevice.h.svn-base deleted file mode 100644 index 8d033fd..0000000 --- a/i386/include/IOKit/platform/.svn/text-base/AppleMacIODevice.h.svn-base +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_APPLEMACIODEVICE_H -#define _IOKIT_APPLEMACIODEVICE_H - -#include <IOKit/IOService.h> - -class AppleMacIODevice : public IOService -{ - OSDeclareDefaultStructors(AppleMacIODevice); - -private: - struct ExpansionData { }; - ExpansionData *reserved; - -public: - virtual bool compareName( OSString * name, OSString ** matched = 0 ) const; - virtual IOService *matchLocation(IOService *client); - virtual IOReturn getResources( void ); - - OSMetaClassDeclareReservedUnused(AppleMacIODevice, 0); - OSMetaClassDeclareReservedUnused(AppleMacIODevice, 1); - OSMetaClassDeclareReservedUnused(AppleMacIODevice, 2); - OSMetaClassDeclareReservedUnused(AppleMacIODevice, 3); -}; - -#endif /* ! _IOKIT_APPLEMACIODEVICE_H */ diff --git a/i386/include/IOKit/platform/.svn/text-base/AppleNMI.h.svn-base b/i386/include/IOKit/platform/.svn/text-base/AppleNMI.h.svn-base deleted file mode 100644 index 14cd1ed..0000000 --- a/i386/include/IOKit/platform/.svn/text-base/AppleNMI.h.svn-base +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998-9 Apple Computer, Inc. All rights reserved. - * - * DRI: Josh de Cesare - * - */ - -#ifndef _IOKIT_APPLENMI_H -#define _IOKIT_APPLENMI_H - -#include <IOKit/IOService.h> -#include <IOKit/IOInterrupts.h> - -// NMI Interrupt Constants -enum -{ - kExtInt9_NMIIntSource = 0x800506E0, - kNMIIntLevelMask = 0x00004000, - kNMIIntMask = 0x00000080 -}; - - -class AppleNMI : public IOService -{ - OSDeclareDefaultStructors(AppleNMI); - -private: - bool enable_debugger; - bool mask_NMI; - - struct ExpansionData { }; - ExpansionData * reserved; // Reserved for future use - -public: - IOService *rootDomain; - virtual bool start(IOService *provider); - virtual IOReturn initNMI(IOInterruptController *parentController, OSData *parentSource); - virtual IOReturn handleInterrupt(void *refCon, IOService *nub, int source); - - // Power handling methods: - virtual IOReturn powerStateWillChangeTo(IOPMPowerFlags, unsigned long, IOService*); - - OSMetaClassDeclareReservedUnused(AppleNMI, 0); - OSMetaClassDeclareReservedUnused(AppleNMI, 1); - OSMetaClassDeclareReservedUnused(AppleNMI, 2); - OSMetaClassDeclareReservedUnused(AppleNMI, 3); -}; - -#endif /* ! _IOKIT_APPLENMI_H */ diff --git a/i386/include/IOKit/platform/.svn/text-base/ApplePlatformExpert.h.svn-base b/i386/include/IOKit/platform/.svn/text-base/ApplePlatformExpert.h.svn-base deleted file mode 100644 index 59728d2..0000000 --- a/i386/include/IOKit/platform/.svn/text-base/ApplePlatformExpert.h.svn-base +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_APPLEPLATFORM_H -#define _IOKIT_APPLEPLATFORM_H - -#include <IOKit/IOPlatformExpert.h> - -enum { - kBootROMTypeOldWorld = 0, - kBootROMTypeNewWorld -}; - -enum { - kChipSetTypePowerSurge = 0, - kChipSetTypePowerStar, - kChipSetTypeGossamer, - kChipSetTypePowerExpress, - kChipSetTypeCore99, - kChipSetTypeCore2001 -}; - -enum { - kMachineTypeUnknown = 0 -}; - -extern const OSSymbol *gGetDefaultBusSpeedsKey; - -class ApplePlatformExpert : public IODTPlatformExpert -{ - OSDeclareAbstractStructors(ApplePlatformExpert); - -private: - SInt32 _timeToGMT; - - struct ExpansionData { }; - ExpansionData *reserved; - -public: - virtual bool start( IOService * provider ); - virtual bool configure( IOService * provider ); - virtual const char * deleteList( void ); - virtual const char * excludeList( void ); - - virtual void registerNVRAMController( IONVRAMController * nvram ); - - virtual long getGMTTimeOfDay(void); - virtual void setGMTTimeOfDay(long secs); - - virtual bool getMachineName(char *name, int maxLength); - - OSMetaClassDeclareReservedUnused(ApplePlatformExpert, 0); - OSMetaClassDeclareReservedUnused(ApplePlatformExpert, 1); - OSMetaClassDeclareReservedUnused(ApplePlatformExpert, 2); - OSMetaClassDeclareReservedUnused(ApplePlatformExpert, 3); -}; - - -#endif /* ! _IOKIT_APPLEPLATFORM_H */ diff --git a/i386/include/IOKit/platform/AppleMacIO.h b/i386/include/IOKit/platform/AppleMacIO.h deleted file mode 100644 index ae12eca..0000000 --- a/i386/include/IOKit/platform/AppleMacIO.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_APPLEMACIO_H -#define _IOKIT_APPLEMACIO_H - -#include <IOKit/IOService.h> - -#include <IOKit/platform/AppleMacIODevice.h> - -class AppleMacIO : public IOService -{ - OSDeclareAbstractStructors(AppleMacIO); - - IOService * fNub; - IOMemoryMap * fMemory; - - struct ExpansionData { }; - ExpansionData *fReserved; - -protected: - virtual bool selfTest( void ); - -public: - virtual bool start( IOService * provider ); - - virtual IOService * createNub( IORegistryEntry * from ); - - virtual void processNub( IOService * nub ); - - virtual void publishBelow( IORegistryEntry * root ); - - virtual const char * deleteList( void ); - virtual const char * excludeList( void ); - - virtual bool compareNubName( const IOService * nub, OSString * name, - OSString ** matched = 0 ) const; - - virtual IOReturn getNubResources( IOService * nub ); - - OSMetaClassDeclareReservedUnused(AppleMacIO, 0); - OSMetaClassDeclareReservedUnused(AppleMacIO, 1); - OSMetaClassDeclareReservedUnused(AppleMacIO, 2); - OSMetaClassDeclareReservedUnused(AppleMacIO, 3); -}; - -#endif /* ! _IOKIT_APPLEMACIO_H */ diff --git a/i386/include/IOKit/platform/AppleMacIODevice.h b/i386/include/IOKit/platform/AppleMacIODevice.h deleted file mode 100644 index 8d033fd..0000000 --- a/i386/include/IOKit/platform/AppleMacIODevice.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_APPLEMACIODEVICE_H -#define _IOKIT_APPLEMACIODEVICE_H - -#include <IOKit/IOService.h> - -class AppleMacIODevice : public IOService -{ - OSDeclareDefaultStructors(AppleMacIODevice); - -private: - struct ExpansionData { }; - ExpansionData *reserved; - -public: - virtual bool compareName( OSString * name, OSString ** matched = 0 ) const; - virtual IOService *matchLocation(IOService *client); - virtual IOReturn getResources( void ); - - OSMetaClassDeclareReservedUnused(AppleMacIODevice, 0); - OSMetaClassDeclareReservedUnused(AppleMacIODevice, 1); - OSMetaClassDeclareReservedUnused(AppleMacIODevice, 2); - OSMetaClassDeclareReservedUnused(AppleMacIODevice, 3); -}; - -#endif /* ! _IOKIT_APPLEMACIODEVICE_H */ diff --git a/i386/include/IOKit/platform/AppleNMI.h b/i386/include/IOKit/platform/AppleNMI.h deleted file mode 100644 index 14cd1ed..0000000 --- a/i386/include/IOKit/platform/AppleNMI.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998-9 Apple Computer, Inc. All rights reserved. - * - * DRI: Josh de Cesare - * - */ - -#ifndef _IOKIT_APPLENMI_H -#define _IOKIT_APPLENMI_H - -#include <IOKit/IOService.h> -#include <IOKit/IOInterrupts.h> - -// NMI Interrupt Constants -enum -{ - kExtInt9_NMIIntSource = 0x800506E0, - kNMIIntLevelMask = 0x00004000, - kNMIIntMask = 0x00000080 -}; - - -class AppleNMI : public IOService -{ - OSDeclareDefaultStructors(AppleNMI); - -private: - bool enable_debugger; - bool mask_NMI; - - struct ExpansionData { }; - ExpansionData * reserved; // Reserved for future use - -public: - IOService *rootDomain; - virtual bool start(IOService *provider); - virtual IOReturn initNMI(IOInterruptController *parentController, OSData *parentSource); - virtual IOReturn handleInterrupt(void *refCon, IOService *nub, int source); - - // Power handling methods: - virtual IOReturn powerStateWillChangeTo(IOPMPowerFlags, unsigned long, IOService*); - - OSMetaClassDeclareReservedUnused(AppleNMI, 0); - OSMetaClassDeclareReservedUnused(AppleNMI, 1); - OSMetaClassDeclareReservedUnused(AppleNMI, 2); - OSMetaClassDeclareReservedUnused(AppleNMI, 3); -}; - -#endif /* ! _IOKIT_APPLENMI_H */ diff --git a/i386/include/IOKit/platform/ApplePlatformExpert.h b/i386/include/IOKit/platform/ApplePlatformExpert.h deleted file mode 100644 index 59728d2..0000000 --- a/i386/include/IOKit/platform/ApplePlatformExpert.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_APPLEPLATFORM_H -#define _IOKIT_APPLEPLATFORM_H - -#include <IOKit/IOPlatformExpert.h> - -enum { - kBootROMTypeOldWorld = 0, - kBootROMTypeNewWorld -}; - -enum { - kChipSetTypePowerSurge = 0, - kChipSetTypePowerStar, - kChipSetTypeGossamer, - kChipSetTypePowerExpress, - kChipSetTypeCore99, - kChipSetTypeCore2001 -}; - -enum { - kMachineTypeUnknown = 0 -}; - -extern const OSSymbol *gGetDefaultBusSpeedsKey; - -class ApplePlatformExpert : public IODTPlatformExpert -{ - OSDeclareAbstractStructors(ApplePlatformExpert); - -private: - SInt32 _timeToGMT; - - struct ExpansionData { }; - ExpansionData *reserved; - -public: - virtual bool start( IOService * provider ); - virtual bool configure( IOService * provider ); - virtual const char * deleteList( void ); - virtual const char * excludeList( void ); - - virtual void registerNVRAMController( IONVRAMController * nvram ); - - virtual long getGMTTimeOfDay(void); - virtual void setGMTTimeOfDay(long secs); - - virtual bool getMachineName(char *name, int maxLength); - - OSMetaClassDeclareReservedUnused(ApplePlatformExpert, 0); - OSMetaClassDeclareReservedUnused(ApplePlatformExpert, 1); - OSMetaClassDeclareReservedUnused(ApplePlatformExpert, 2); - OSMetaClassDeclareReservedUnused(ApplePlatformExpert, 3); -}; - - -#endif /* ! _IOKIT_APPLEPLATFORM_H */ diff --git a/i386/include/IOKit/power/.svn/all-wcprops b/i386/include/IOKit/power/.svn/all-wcprops deleted file mode 100644 index 3d3be10..0000000 --- a/i386/include/IOKit/power/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 58 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/power -END -IOPwrController.h -K 25 -svn:wc:ra_dav:version-url -V 76 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/power/IOPwrController.h -END diff --git a/i386/include/IOKit/power/.svn/entries b/i386/include/IOKit/power/.svn/entries deleted file mode 100644 index 3875525..0000000 --- a/i386/include/IOKit/power/.svn/entries +++ /dev/null @@ -1,62 +0,0 @@ -10 - -dir -2117 -http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/power -http://forge.voodooprojects.org/svn/chameleon - - - -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - -b5af796a-00a8-11df-919b-ffff7a100b7d - -IOPwrController.h -file - - - - -2012-10-03T17:50:20.000000Z -9c95987a30b51b9e00dd6f7400e645fb -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -1513 - diff --git a/i386/include/IOKit/power/.svn/text-base/IOPwrController.h.svn-base b/i386/include/IOKit/power/.svn/text-base/IOPwrController.h.svn-base deleted file mode 100644 index 709a0fb..0000000 --- a/i386/include/IOKit/power/.svn/text-base/IOPwrController.h.svn-base +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * 24 Nov 1998 suurballe Created. - */ - -#include <IOKit/IOService.h> - -class IOPwrController: public IOService -{ -OSDeclareAbstractStructors(IOPwrController) - -public: - -}; - diff --git a/i386/include/IOKit/power/IOPwrController.h b/i386/include/IOKit/power/IOPwrController.h deleted file mode 100644 index 709a0fb..0000000 --- a/i386/include/IOKit/power/IOPwrController.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * 24 Nov 1998 suurballe Created. - */ - -#include <IOKit/IOService.h> - -class IOPwrController: public IOService -{ -OSDeclareAbstractStructors(IOPwrController) - -public: - -}; - diff --git a/i386/include/IOKit/ppc/.svn/all-wcprops b/i386/include/IOKit/ppc/.svn/all-wcprops deleted file mode 100644 index 419eea0..0000000 --- a/i386/include/IOKit/ppc/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 56 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/ppc -END -IODBDMA.h -K 25 -svn:wc:ra_dav:version-url -V 66 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/ppc/IODBDMA.h -END diff --git a/i386/include/IOKit/ppc/.svn/entries b/i386/include/IOKit/ppc/.svn/entries deleted file mode 100644 index c49eb0a..0000000 --- a/i386/include/IOKit/ppc/.svn/entries +++ /dev/null @@ -1,62 +0,0 @@ -10 - -dir -2117 -http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/ppc -http://forge.voodooprojects.org/svn/chameleon - - - -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - -b5af796a-00a8-11df-919b-ffff7a100b7d - -IODBDMA.h -file - - - - -2012-10-03T17:50:20.000000Z -15a4a0c26bd1a9295d2de0f0544051f1 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -12529 - diff --git a/i386/include/IOKit/ppc/.svn/text-base/IODBDMA.h.svn-base b/i386/include/IOKit/ppc/.svn/text-base/IODBDMA.h.svn-base deleted file mode 100644 index afe1337..0000000 --- a/i386/include/IOKit/ppc/.svn/text-base/IODBDMA.h.svn-base +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1997 Apple Computer, Inc. - * - * - * HISTORY - * - * Simon Douglas 10 Nov 97 - * - first checked in, mostly from MacOS DBDMA.i, machdep/ppc/dbdma.h - * but use byte reverse ops. - */ - -#ifndef _IODBDMA_H_ -#define _IODBDMA_H_ - -#include <IOKit/IOTypes.h> -#include <libkern/OSByteOrder.h> - - -/* DBDMA definitions */ - -struct IODBDMAChannelRegisters { - volatile unsigned long channelControl; - volatile unsigned long channelStatus; - volatile unsigned long commandPtrHi; /* implementation optional*/ - volatile unsigned long commandPtrLo; - volatile unsigned long interruptSelect; /* implementation optional*/ - volatile unsigned long branchSelect; /* implementation optional*/ - volatile unsigned long waitSelect; /* implementation optional*/ - volatile unsigned long transferModes; /* implementation optional*/ - volatile unsigned long data2PtrHi; /* implementation optional*/ - volatile unsigned long data2PtrLo; /* implementation optional*/ - - volatile unsigned long reserved1; - volatile unsigned long addressHi; /* implementation optional*/ - volatile unsigned long reserved2[4]; - volatile unsigned long unimplemented[16]; - -/* This structure must remain fully padded to 256 bytes.*/ - volatile unsigned long undefined[32]; -}; -typedef struct IODBDMAChannelRegisters IODBDMAChannelRegisters; - -/* These constants define the DB-DMA channel control words and status flags.*/ - -enum { - kdbdmaRun = 0x00008000, - kdbdmaPause = 0x00004000, - kdbdmaFlush = 0x00002000, - kdbdmaWake = 0x00001000, - kdbdmaDead = 0x00000800, - kdbdmaActive = 0x00000400, - kdbdmaBt = 0x00000100, - kdbdmaS7 = 0x00000080, - kdbdmaS6 = 0x00000040, - kdbdmaS5 = 0x00000020, - kdbdmaS4 = 0x00000010, - kdbdmaS3 = 0x00000008, - kdbdmaS2 = 0x00000004, - kdbdmaS1 = 0x00000002, - kdbdmaS0 = 0x00000001 -}; - - -#define IOSetDBDMAChannelControlBits(mask) ( ((mask) | (mask) << 16) ) -#define IOClearDBDMAChannelControlBits(mask) ( (mask) << 16) - - -/* This structure defines the DB-DMA channel command descriptor.*/ - -/* - *** WARNING: Endian-ness issues must be considered when performing load/store! *** -*/ - -struct IODBDMADescriptor { - unsigned long operation; /* cmd || key || i || b || w || reqCount*/ - unsigned long address; - volatile unsigned long cmdDep; - volatile unsigned long result; /* xferStatus || resCount*/ -}; -typedef struct IODBDMADescriptor IODBDMADescriptor; - -/* These constants define the DB-DMA channel command operations and modifiers.*/ - - -enum { -/* Command.cmd operations*/ - kdbdmaOutputMore = 0, - kdbdmaOutputLast = 1, - kdbdmaInputMore = 2, - kdbdmaInputLast = 3, - kdbdmaStoreQuad = 4, - kdbdmaLoadQuad = 5, - kdbdmaNop = 6, - kdbdmaStop = 7 -}; - - -enum { -/* Command.key modifiers (choose one for INPUT, OUTPUT, LOAD, and STORE)*/ - kdbdmaKeyStream0 = 0, /* default modifier*/ - kdbdmaKeyStream1 = 1, - kdbdmaKeyStream2 = 2, - kdbdmaKeyStream3 = 3, - kdbdmaKeyRegs = 5, - kdbdmaKeySystem = 6, - kdbdmaKeyDevice = 7, - - kdbdmaIntNever = 0, /* default modifier*/ - kdbdmaIntIfTrue = 1, - kdbdmaIntIfFalse = 2, - kdbdmaIntAlways = 3, - - kdbdmaBranchNever = 0, /* default modifier*/ - kdbdmaBranchIfTrue = 1, - kdbdmaBranchIfFalse = 2, - kdbdmaBranchAlways = 3, - - kdbdmaWaitNever = 0, /* default modifier*/ - kdbdmaWaitIfTrue = 1, - kdbdmaWaitIfFalse = 2, - kdbdmaWaitAlways = 3, - - kdbdmaCommandMask = (long)0xFFFF0000, - kdbdmaReqCountMask = 0x0000FFFF -}; - - -/* These constants define the DB-DMA channel command results.*/ - -enum { - /* result masks*/ - kdbdmaStatusRun = kdbdmaRun << 16, - kdbdmaStatusPause = kdbdmaPause << 16, - kdbdmaStatusFlush = kdbdmaFlush << 16, - kdbdmaStatusWake = kdbdmaWake << 16, - kdbdmaStatusDead = kdbdmaDead << 16, - kdbdmaStatusActive = kdbdmaActive << 16, - kdbdmaStatusBt = kdbdmaBt << 16, - kdbdmaStatusS7 = kdbdmaS7 << 16, - kdbdmaStatusS6 = kdbdmaS6 << 16, - kdbdmaStatusS5 = kdbdmaS5 << 16, - kdbdmaStatusS4 = kdbdmaS4 << 16, - kdbdmaStatusS3 = kdbdmaS3 << 16, - kdbdmaStatusS2 = kdbdmaS2 << 16, - kdbdmaStatusS1 = kdbdmaS1 << 16, - kdbdmaStatusS0 = kdbdmaS0 << 16, - kdbdmaResCountMask = 0x0000FFFF, - kdbdmaXferStatusMask = 0xFFFF0000 -}; - - -/* These macros are are IODBDMAChannelRegisters accessor functions. */ - -#define IOSetDBDMAChannelRegister(registerSetPtr,field,value) \ -OSWriteSwapInt32(registerSetPtr,offsetof(IODBDMAChannelRegisters,field),value) - -#define IOGetDBDMAChannelRegister(registerSetPtr, field) \ -OSReadSwapInt32(registerSetPtr,offsetof(IODBDMAChannelRegisters, field)) - - -/* void IOSetDBDMAChannelControl (IODBDMAChannelRegisters *registerSetPtr, unsigned long ctlValue); */ - -#define IOSetDBDMAChannelControl(registerSetPtr,ctlValue) \ -do { \ - eieio(); \ - IOSetDBDMAChannelRegister(registerSetPtr,channelControl,ctlValue); \ - eieio(); \ -} while(0) - -/* unsigned long IOGetDBDMAChannelStatus (IODBDMAChannelRegisters *registerSetPtr); */ - -#define IOGetDBDMAChannelStatus(registerSetPtr) \ - IOGetDBDMAChannelRegister(registerSetPtr,channelStatus) - -/* unsigned long IOGetDBDMACommandPtr (IODBDMAChannelRegisters *registerSetPtr); */ - -#define IOGetDBDMACommandPtr(registerSetPtr) \ - IOGetDBDMAChannelRegister(registerSetPtr,commandPtrLo) - -/* void IOSetDBDMACommandPtr (IODBDMAChannelRegisters *registerSetPtr, unsigned long cclPtr); */ - -#define IOSetDBDMACommandPtr(registerSetPtr,cclPtr) \ -do { \ - IOSetDBDMAChannelRegister(registerSetPtr,commandPtrHi,0); \ - eieio(); \ - IOSetDBDMAChannelRegister(registerSetPtr,commandPtrLo,cclPtr); \ - eieio(); \ -} while(0) - - -/* unsigned long IOGetDBDMAInterruptSelect (IODBDMAChannelRegisters *registerSetPtr); */ - -#define IOGetDBDMAInterruptSelect(registerSetPtr) \ - IOGetDBDMAChannelRegister(registerSetPtr,interruptSelect) - -/* void IOSetDBDMAInterruptSelect (IODBDMAChannelRegisters *registerSetPtr, unsigned long intSelValue); */ - -#define IOSetDBDMAInterruptSelect(registerSetPtr,intSelValue) \ -do { \ - IOSetDBDMAChannelRegister(registerSetPtr,interruptSelect,intSelValue); \ - eieio(); \ -} while(0) - -/* unsigned long IOGetDBDMABranchSelect (IODBDMAChannelRegisters *registerSetPtr); */ - -#define IOGetDBDMABranchSelect(registerSetPtr) \ - IOGetDBDMAChannelRegister(registerSetPtr,branchSelect) - -/* void IOSetDBDMABranchSelect (IODBDMAChannelRegisters *registerSetPtr, unsigned long braSelValue); */ - -#define IOSetDBDMABranchSelect(registerSetPtr,braSelValue) \ -do { \ - IOSetDBDMAChannelRegister(registerSetPtr,branchSelect,braSelValue); \ - eieio(); \ -} while(0) - -/* unsigned long IOGetDBDMAWaitSelect (IODBDMAChannelRegisters *registerSetPtr); */ - -#define IOGetDBDMAWaitSelect(registerSetPtr) \ - IOGetDBDMAChannelRegister(registerSetPtr,waitSelect) - -/* void IOSetDBDMAWaitSelect (IODBDMAChannelRegisters *registerSetPtr, unsigned long waitSelValue); */ - -#define IOSetDBDMAWaitSelect(registerSetPtr,waitSelValue) \ -do { \ - IOSetDBDMAChannelRegister(registerSetPtr,waitSelect,waitSelValue); \ - eieio(); \ -} while(0) - - -/* These macros are IODBDMADescriptor accessor functions. */ - -#define IOSetDBDMADescriptor(descPtr,field,value) \ -OSWriteSwapInt32( descPtr, offsetof( IODBDMADescriptor, field), value) - -#define IOGetDBDMADescriptor(descPtr,field) \ -OSReadSwapInt32( descPtr, offsetof( IODBDMADescriptor, field)) - -#define IOMakeDBDMAOperation(cmd,key,interrupt,branch,wait,count) \ - ( ((cmd) << 28) | ((key) << 24) | ((interrupt) << 20) \ - | ((branch) << 18) | ( (wait) << 16) | (count) ) - -/* void IOMakeDBDMADescriptor (IODBDMADescriptor *descPtr, - unsigned long cmd, - unsigned long key, - unsigned long interrupt, - unsigned long branch, - unsigned long wait, - unsigned long count, - unsigned long addr); */ - -#define IOMakeDBDMADescriptor(descPtr,cmd,key,interrupt,branch,wait,count,addr)\ -do { \ - IOSetDBDMADescriptor(descPtr, address, addr); \ - IOSetDBDMADescriptor(descPtr, cmdDep, 0); \ - IOSetDBDMADescriptor(descPtr, result, 0); \ - eieio(); \ - IOSetDBDMADescriptor(descPtr, operation, \ - IOMakeDBDMAOperation(cmd,key,interrupt,branch,wait,count)); \ - eieio(); \ -} while(0) - -/* void IOMakeDBDMADescriptorDep (IODBDMADescriptor *descPtr, - unsigned long cmd, - unsigned long key, - unsigned long interrupt, - unsigned long branch, - unsigned long wait, - unsigned long count, - unsigned long addr, - unsigned long dep); */ - -#define IOMakeDBDMADescriptorDep(descPtr,cmd,key,interrupt,branch,wait,count,addr,dep) \ -do { \ - IOSetDBDMADescriptor(descPtr, address, addr); \ - IOSetDBDMADescriptor(descPtr, cmdDep, dep); \ - IOSetDBDMADescriptor(descPtr, result, 0); \ - eieio(); \ - IOSetDBDMADescriptor(descPtr, operation, \ - IOMakeDBDMAOperation(cmd, key, interrupt, branch, wait, count)); \ - eieio(); \ -} while(0) - -/* Field accessors - NOTE: unsynchronized */ - -/* unsigned long IOGetDBDMAOperation (IODBDMADescriptor *descPtr) */ - -#define IOGetCCOperation(descPtr) \ - IOGetDBDMADescriptor(descPtr,operation) - -/* void IOSetCCOperation (IODBDMADescriptor *descPtr, unsigned long operationValue) */ - -#define IOSetCCOperation(descPtr,operationValue) \ - IOSetDBDMADescriptor(descPtr,operation,operationValue) - -/* unsigned long IOGetCCAddress (IODBDMADescriptor *descPtr) */ - -#define IOGetCCAddress(descPtr) \ - IOGetDBDMADescriptor(descPtr,address) - -/* void IOSetCCAddress (IODBDMADescriptor *descPtr, unsigned long addressValue) */ - -#define IOSetCCAddress(descPtr,addressValue) \ - IOSetDBDMADescriptor(descPtr,address, addressValue) - -/* unsigned long IOGetCCCmdDep (IODBDMADescriptor *descPtr) */ - -#define IOGetCCCmdDep(descPtr) \ - IOGetDBDMADescriptor(descPtr,cmdDep) - -/* void IOSetCCCmdDep (IODBDMADescriptor *descPtr, unsigned long cmdDepValue) */ - -#define IOSetCCCmdDep(descPtr,cmdDepValue) \ - IOSetDBDMADescriptor(descPtr,cmdDep,cmdDepValue) - -/* unsigned long IOGetCCResult (IODBDMADescriptor *descPtr) */ - -#define IOGetCCResult(descPtr) \ - IOGetDBDMADescriptor(descPtr,result) - -/* void IOSetCCResult (IODBDMADescriptor *descPtr, unsigned long resultValue) */ - -#define IOSetCCResult(descPtr,resultValue) \ - IOSetDBDMADescriptor(descPtr,result,resultValue) - - -/* DBDMA routines */ - -extern void IODBDMAStart( volatile IODBDMAChannelRegisters *registerSetPtr, volatile IODBDMADescriptor *physicalDescPtr); -extern void IODBDMAStop( volatile IODBDMAChannelRegisters *registerSetPtr); -extern void IODBDMAFlush( volatile IODBDMAChannelRegisters *registerSetPtr); -extern void IODBDMAReset( volatile IODBDMAChannelRegisters *registerSetPtr); -extern void IODBDMAContinue( volatile IODBDMAChannelRegisters *registerSetPtr); -extern void IODBDMAPause( volatile IODBDMAChannelRegisters *registerSetPtr); - -extern IOReturn IOAllocatePhysicallyContiguousMemory( unsigned int size, unsigned int options, - IOVirtualAddress * logical, IOPhysicalAddress * physical ); -extern IOReturn IOFreePhysicallyContiguousMemory( IOVirtualAddress * logical, unsigned int size); - -#endif /* !defined(_IODBDMA_H_) */ diff --git a/i386/include/IOKit/ppc/IODBDMA.h b/i386/include/IOKit/ppc/IODBDMA.h deleted file mode 100644 index afe1337..0000000 --- a/i386/include/IOKit/ppc/IODBDMA.h +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1997 Apple Computer, Inc. - * - * - * HISTORY - * - * Simon Douglas 10 Nov 97 - * - first checked in, mostly from MacOS DBDMA.i, machdep/ppc/dbdma.h - * but use byte reverse ops. - */ - -#ifndef _IODBDMA_H_ -#define _IODBDMA_H_ - -#include <IOKit/IOTypes.h> -#include <libkern/OSByteOrder.h> - - -/* DBDMA definitions */ - -struct IODBDMAChannelRegisters { - volatile unsigned long channelControl; - volatile unsigned long channelStatus; - volatile unsigned long commandPtrHi; /* implementation optional*/ - volatile unsigned long commandPtrLo; - volatile unsigned long interruptSelect; /* implementation optional*/ - volatile unsigned long branchSelect; /* implementation optional*/ - volatile unsigned long waitSelect; /* implementation optional*/ - volatile unsigned long transferModes; /* implementation optional*/ - volatile unsigned long data2PtrHi; /* implementation optional*/ - volatile unsigned long data2PtrLo; /* implementation optional*/ - - volatile unsigned long reserved1; - volatile unsigned long addressHi; /* implementation optional*/ - volatile unsigned long reserved2[4]; - volatile unsigned long unimplemented[16]; - -/* This structure must remain fully padded to 256 bytes.*/ - volatile unsigned long undefined[32]; -}; -typedef struct IODBDMAChannelRegisters IODBDMAChannelRegisters; - -/* These constants define the DB-DMA channel control words and status flags.*/ - -enum { - kdbdmaRun = 0x00008000, - kdbdmaPause = 0x00004000, - kdbdmaFlush = 0x00002000, - kdbdmaWake = 0x00001000, - kdbdmaDead = 0x00000800, - kdbdmaActive = 0x00000400, - kdbdmaBt = 0x00000100, - kdbdmaS7 = 0x00000080, - kdbdmaS6 = 0x00000040, - kdbdmaS5 = 0x00000020, - kdbdmaS4 = 0x00000010, - kdbdmaS3 = 0x00000008, - kdbdmaS2 = 0x00000004, - kdbdmaS1 = 0x00000002, - kdbdmaS0 = 0x00000001 -}; - - -#define IOSetDBDMAChannelControlBits(mask) ( ((mask) | (mask) << 16) ) -#define IOClearDBDMAChannelControlBits(mask) ( (mask) << 16) - - -/* This structure defines the DB-DMA channel command descriptor.*/ - -/* - *** WARNING: Endian-ness issues must be considered when performing load/store! *** -*/ - -struct IODBDMADescriptor { - unsigned long operation; /* cmd || key || i || b || w || reqCount*/ - unsigned long address; - volatile unsigned long cmdDep; - volatile unsigned long result; /* xferStatus || resCount*/ -}; -typedef struct IODBDMADescriptor IODBDMADescriptor; - -/* These constants define the DB-DMA channel command operations and modifiers.*/ - - -enum { -/* Command.cmd operations*/ - kdbdmaOutputMore = 0, - kdbdmaOutputLast = 1, - kdbdmaInputMore = 2, - kdbdmaInputLast = 3, - kdbdmaStoreQuad = 4, - kdbdmaLoadQuad = 5, - kdbdmaNop = 6, - kdbdmaStop = 7 -}; - - -enum { -/* Command.key modifiers (choose one for INPUT, OUTPUT, LOAD, and STORE)*/ - kdbdmaKeyStream0 = 0, /* default modifier*/ - kdbdmaKeyStream1 = 1, - kdbdmaKeyStream2 = 2, - kdbdmaKeyStream3 = 3, - kdbdmaKeyRegs = 5, - kdbdmaKeySystem = 6, - kdbdmaKeyDevice = 7, - - kdbdmaIntNever = 0, /* default modifier*/ - kdbdmaIntIfTrue = 1, - kdbdmaIntIfFalse = 2, - kdbdmaIntAlways = 3, - - kdbdmaBranchNever = 0, /* default modifier*/ - kdbdmaBranchIfTrue = 1, - kdbdmaBranchIfFalse = 2, - kdbdmaBranchAlways = 3, - - kdbdmaWaitNever = 0, /* default modifier*/ - kdbdmaWaitIfTrue = 1, - kdbdmaWaitIfFalse = 2, - kdbdmaWaitAlways = 3, - - kdbdmaCommandMask = (long)0xFFFF0000, - kdbdmaReqCountMask = 0x0000FFFF -}; - - -/* These constants define the DB-DMA channel command results.*/ - -enum { - /* result masks*/ - kdbdmaStatusRun = kdbdmaRun << 16, - kdbdmaStatusPause = kdbdmaPause << 16, - kdbdmaStatusFlush = kdbdmaFlush << 16, - kdbdmaStatusWake = kdbdmaWake << 16, - kdbdmaStatusDead = kdbdmaDead << 16, - kdbdmaStatusActive = kdbdmaActive << 16, - kdbdmaStatusBt = kdbdmaBt << 16, - kdbdmaStatusS7 = kdbdmaS7 << 16, - kdbdmaStatusS6 = kdbdmaS6 << 16, - kdbdmaStatusS5 = kdbdmaS5 << 16, - kdbdmaStatusS4 = kdbdmaS4 << 16, - kdbdmaStatusS3 = kdbdmaS3 << 16, - kdbdmaStatusS2 = kdbdmaS2 << 16, - kdbdmaStatusS1 = kdbdmaS1 << 16, - kdbdmaStatusS0 = kdbdmaS0 << 16, - kdbdmaResCountMask = 0x0000FFFF, - kdbdmaXferStatusMask = 0xFFFF0000 -}; - - -/* These macros are are IODBDMAChannelRegisters accessor functions. */ - -#define IOSetDBDMAChannelRegister(registerSetPtr,field,value) \ -OSWriteSwapInt32(registerSetPtr,offsetof(IODBDMAChannelRegisters,field),value) - -#define IOGetDBDMAChannelRegister(registerSetPtr, field) \ -OSReadSwapInt32(registerSetPtr,offsetof(IODBDMAChannelRegisters, field)) - - -/* void IOSetDBDMAChannelControl (IODBDMAChannelRegisters *registerSetPtr, unsigned long ctlValue); */ - -#define IOSetDBDMAChannelControl(registerSetPtr,ctlValue) \ -do { \ - eieio(); \ - IOSetDBDMAChannelRegister(registerSetPtr,channelControl,ctlValue); \ - eieio(); \ -} while(0) - -/* unsigned long IOGetDBDMAChannelStatus (IODBDMAChannelRegisters *registerSetPtr); */ - -#define IOGetDBDMAChannelStatus(registerSetPtr) \ - IOGetDBDMAChannelRegister(registerSetPtr,channelStatus) - -/* unsigned long IOGetDBDMACommandPtr (IODBDMAChannelRegisters *registerSetPtr); */ - -#define IOGetDBDMACommandPtr(registerSetPtr) \ - IOGetDBDMAChannelRegister(registerSetPtr,commandPtrLo) - -/* void IOSetDBDMACommandPtr (IODBDMAChannelRegisters *registerSetPtr, unsigned long cclPtr); */ - -#define IOSetDBDMACommandPtr(registerSetPtr,cclPtr) \ -do { \ - IOSetDBDMAChannelRegister(registerSetPtr,commandPtrHi,0); \ - eieio(); \ - IOSetDBDMAChannelRegister(registerSetPtr,commandPtrLo,cclPtr); \ - eieio(); \ -} while(0) - - -/* unsigned long IOGetDBDMAInterruptSelect (IODBDMAChannelRegisters *registerSetPtr); */ - -#define IOGetDBDMAInterruptSelect(registerSetPtr) \ - IOGetDBDMAChannelRegister(registerSetPtr,interruptSelect) - -/* void IOSetDBDMAInterruptSelect (IODBDMAChannelRegisters *registerSetPtr, unsigned long intSelValue); */ - -#define IOSetDBDMAInterruptSelect(registerSetPtr,intSelValue) \ -do { \ - IOSetDBDMAChannelRegister(registerSetPtr,interruptSelect,intSelValue); \ - eieio(); \ -} while(0) - -/* unsigned long IOGetDBDMABranchSelect (IODBDMAChannelRegisters *registerSetPtr); */ - -#define IOGetDBDMABranchSelect(registerSetPtr) \ - IOGetDBDMAChannelRegister(registerSetPtr,branchSelect) - -/* void IOSetDBDMABranchSelect (IODBDMAChannelRegisters *registerSetPtr, unsigned long braSelValue); */ - -#define IOSetDBDMABranchSelect(registerSetPtr,braSelValue) \ -do { \ - IOSetDBDMAChannelRegister(registerSetPtr,branchSelect,braSelValue); \ - eieio(); \ -} while(0) - -/* unsigned long IOGetDBDMAWaitSelect (IODBDMAChannelRegisters *registerSetPtr); */ - -#define IOGetDBDMAWaitSelect(registerSetPtr) \ - IOGetDBDMAChannelRegister(registerSetPtr,waitSelect) - -/* void IOSetDBDMAWaitSelect (IODBDMAChannelRegisters *registerSetPtr, unsigned long waitSelValue); */ - -#define IOSetDBDMAWaitSelect(registerSetPtr,waitSelValue) \ -do { \ - IOSetDBDMAChannelRegister(registerSetPtr,waitSelect,waitSelValue); \ - eieio(); \ -} while(0) - - -/* These macros are IODBDMADescriptor accessor functions. */ - -#define IOSetDBDMADescriptor(descPtr,field,value) \ -OSWriteSwapInt32( descPtr, offsetof( IODBDMADescriptor, field), value) - -#define IOGetDBDMADescriptor(descPtr,field) \ -OSReadSwapInt32( descPtr, offsetof( IODBDMADescriptor, field)) - -#define IOMakeDBDMAOperation(cmd,key,interrupt,branch,wait,count) \ - ( ((cmd) << 28) | ((key) << 24) | ((interrupt) << 20) \ - | ((branch) << 18) | ( (wait) << 16) | (count) ) - -/* void IOMakeDBDMADescriptor (IODBDMADescriptor *descPtr, - unsigned long cmd, - unsigned long key, - unsigned long interrupt, - unsigned long branch, - unsigned long wait, - unsigned long count, - unsigned long addr); */ - -#define IOMakeDBDMADescriptor(descPtr,cmd,key,interrupt,branch,wait,count,addr)\ -do { \ - IOSetDBDMADescriptor(descPtr, address, addr); \ - IOSetDBDMADescriptor(descPtr, cmdDep, 0); \ - IOSetDBDMADescriptor(descPtr, result, 0); \ - eieio(); \ - IOSetDBDMADescriptor(descPtr, operation, \ - IOMakeDBDMAOperation(cmd,key,interrupt,branch,wait,count)); \ - eieio(); \ -} while(0) - -/* void IOMakeDBDMADescriptorDep (IODBDMADescriptor *descPtr, - unsigned long cmd, - unsigned long key, - unsigned long interrupt, - unsigned long branch, - unsigned long wait, - unsigned long count, - unsigned long addr, - unsigned long dep); */ - -#define IOMakeDBDMADescriptorDep(descPtr,cmd,key,interrupt,branch,wait,count,addr,dep) \ -do { \ - IOSetDBDMADescriptor(descPtr, address, addr); \ - IOSetDBDMADescriptor(descPtr, cmdDep, dep); \ - IOSetDBDMADescriptor(descPtr, result, 0); \ - eieio(); \ - IOSetDBDMADescriptor(descPtr, operation, \ - IOMakeDBDMAOperation(cmd, key, interrupt, branch, wait, count)); \ - eieio(); \ -} while(0) - -/* Field accessors - NOTE: unsynchronized */ - -/* unsigned long IOGetDBDMAOperation (IODBDMADescriptor *descPtr) */ - -#define IOGetCCOperation(descPtr) \ - IOGetDBDMADescriptor(descPtr,operation) - -/* void IOSetCCOperation (IODBDMADescriptor *descPtr, unsigned long operationValue) */ - -#define IOSetCCOperation(descPtr,operationValue) \ - IOSetDBDMADescriptor(descPtr,operation,operationValue) - -/* unsigned long IOGetCCAddress (IODBDMADescriptor *descPtr) */ - -#define IOGetCCAddress(descPtr) \ - IOGetDBDMADescriptor(descPtr,address) - -/* void IOSetCCAddress (IODBDMADescriptor *descPtr, unsigned long addressValue) */ - -#define IOSetCCAddress(descPtr,addressValue) \ - IOSetDBDMADescriptor(descPtr,address, addressValue) - -/* unsigned long IOGetCCCmdDep (IODBDMADescriptor *descPtr) */ - -#define IOGetCCCmdDep(descPtr) \ - IOGetDBDMADescriptor(descPtr,cmdDep) - -/* void IOSetCCCmdDep (IODBDMADescriptor *descPtr, unsigned long cmdDepValue) */ - -#define IOSetCCCmdDep(descPtr,cmdDepValue) \ - IOSetDBDMADescriptor(descPtr,cmdDep,cmdDepValue) - -/* unsigned long IOGetCCResult (IODBDMADescriptor *descPtr) */ - -#define IOGetCCResult(descPtr) \ - IOGetDBDMADescriptor(descPtr,result) - -/* void IOSetCCResult (IODBDMADescriptor *descPtr, unsigned long resultValue) */ - -#define IOSetCCResult(descPtr,resultValue) \ - IOSetDBDMADescriptor(descPtr,result,resultValue) - - -/* DBDMA routines */ - -extern void IODBDMAStart( volatile IODBDMAChannelRegisters *registerSetPtr, volatile IODBDMADescriptor *physicalDescPtr); -extern void IODBDMAStop( volatile IODBDMAChannelRegisters *registerSetPtr); -extern void IODBDMAFlush( volatile IODBDMAChannelRegisters *registerSetPtr); -extern void IODBDMAReset( volatile IODBDMAChannelRegisters *registerSetPtr); -extern void IODBDMAContinue( volatile IODBDMAChannelRegisters *registerSetPtr); -extern void IODBDMAPause( volatile IODBDMAChannelRegisters *registerSetPtr); - -extern IOReturn IOAllocatePhysicallyContiguousMemory( unsigned int size, unsigned int options, - IOVirtualAddress * logical, IOPhysicalAddress * physical ); -extern IOReturn IOFreePhysicallyContiguousMemory( IOVirtualAddress * logical, unsigned int size); - -#endif /* !defined(_IODBDMA_H_) */ diff --git a/i386/include/IOKit/pwr_mgt/.svn/all-wcprops b/i386/include/IOKit/pwr_mgt/.svn/all-wcprops deleted file mode 100644 index 3ea4d10..0000000 --- a/i386/include/IOKit/pwr_mgt/.svn/all-wcprops +++ /dev/null @@ -1,59 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 60 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt -END -RootDomain.h -K 25 -svn:wc:ra_dav:version-url -V 73 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/RootDomain.h -END -IOPMLibDefs.h -K 25 -svn:wc:ra_dav:version-url -V 74 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/IOPMLibDefs.h -END -IOPMPowerSourceList.h -K 25 -svn:wc:ra_dav:version-url -V 82 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/IOPMPowerSourceList.h -END -IOPMPrivate.h -K 25 -svn:wc:ra_dav:version-url -V 74 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/IOPMPrivate.h -END -IOPMPowerSource.h -K 25 -svn:wc:ra_dav:version-url -V 78 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/IOPMPowerSource.h -END -IOPMpowerState.h -K 25 -svn:wc:ra_dav:version-url -V 77 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/IOPMpowerState.h -END -IOPM.h -K 25 -svn:wc:ra_dav:version-url -V 67 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/IOPM.h -END -IOPowerConnection.h -K 25 -svn:wc:ra_dav:version-url -V 80 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/IOPowerConnection.h -END -IOPMDeprecated.h -K 25 -svn:wc:ra_dav:version-url -V 77 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/pwr_mgt/IOPMDeprecated.h -END diff --git a/i386/include/IOKit/pwr_mgt/.svn/entries b/i386/include/IOKit/pwr_mgt/.svn/entries deleted file mode 100644 index decf7eb..0000000 --- a/i386/include/IOKit/pwr_mgt/.svn/entries +++ /dev/null @@ -1,334 +0,0 @@ -10 - -dir -2117 -http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/pwr_mgt -http://forge.voodooprojects.org/svn/chameleon - - - -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - -b5af796a-00a8-11df-919b-ffff7a100b7d - -RootDomain.h -file - - - - -2012-10-03T17:50:20.000000Z -bdf4cb75458bc85f1bbb7f9d25e0b25b -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -10815 - -IOPMLibDefs.h -file - - - - -2012-10-03T17:50:20.000000Z -2f6d1ceef422ff8f504e009c9554720b -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -1762 - -IOPMPowerSourceList.h -file - - - - -2012-10-03T17:50:20.000000Z -ba4d08c61820252a5ed6241fd8b3c13a -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -2024 - -IOPMPrivate.h -file - - - - -2012-10-03T17:50:20.000000Z -875e737556ada49d86b951e79209bc3a -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -11099 - -IOPMPowerSource.h -file - - - - -2012-10-03T17:50:20.000000Z -8ec726b34101aecbd930216a9d944510 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -9439 - -IOPMpowerState.h -file - - - - -2012-10-03T17:50:20.000000Z -eb4e9833e8dc27f552ed3fa7704a0b8d -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -3760 - -IOPM.h -file - - - - -2012-10-03T17:50:20.000000Z -6e0b70a4a16a7c280dcfbe0c99e1c06c -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -27180 - -IOPowerConnection.h -file - - - - -2012-10-03T17:50:20.000000Z -05e49f8d6c51a982ce29d3e16cb0c161 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -6011 - -IOPMDeprecated.h -file - - - - -2012-10-03T17:50:20.000000Z -ebebd77a291987f315e9719e9f1f53e9 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -9112 - diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPM.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPM.h.svn-base deleted file mode 100644 index 7d78225..0000000 --- a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPM.h.svn-base +++ /dev/null @@ -1,654 +0,0 @@ -/* - * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _IOKIT_IOPM_H -#define _IOKIT_IOPM_H - -#include <IOKit/IOTypes.h> -#include <IOKit/IOMessage.h> -#include <IOKit/IOReturn.h> - -#ifdef __ppc__ -#include <IOKit/pwr_mgt/IOPMDeprecated.h> -#endif - -/*! @header IOPM.h - @abstract Defines power management constants and keys used by both in-kernel and user space power management. - @discussion IOPM.h defines a range of power management constants used in several in-kernel and user space APIs. Most significantly, the IOPMPowerFlags used to specify the fields of an IOPMPowerState struct are defined here. - - Most of the constants defined in IOPM.h are deprecated or for Apple internal use only, and are not elaborated on in headerdoc. -*/ - -enum { - kIOPMMaxPowerStates = 10, - IOPMMaxPowerStates = kIOPMMaxPowerStates -}; - -/*! @enum IOPMPowerFlags - @abstract Bits are used in defining capabilityFlags, inputPowerRequirements, and outputPowerCharacter in the IOPMPowerState structure. - @discussion These bits may be bitwise-OR'd together in the IOPMPowerState capabilityFlags field, the outputPowerCharacter field, and/or the inputPowerRequirement field. - - The comments clearly mark whether each flag should be used in the capabilityFlags field, outputPowerCharacter field, and inputPowerRequirement field, or all three. - - The value of capabilityFlags, inputPowerRequirement or outputPowerCharacter may be 0. Most drivers implement their 'OFF' state, used when asleep, by defininf each of the 3 fields as 0. - - The bits listed below are only the most common bits used to define a device's power states. Your device's IO family may require that your device specify other input or output power flags to interact properly. Consult family-specific documentation to determine if your IOPower plane parents or children require other power flags; they probably don't. - - @constant kIOPMPowerOn Indicates the device is on, requires power, and provides power. Useful as a: Capability, InputPowerRequirement, OutputPowerCharacter - - @constant kIOPMDeviceUsable Indicates the device is usable in this state. Useful only as a Capability - - @constant kIOPMLowPower - Indicates device is in a low power state. May be bitwis-OR'd together - with kIOPMDeviceUsable flag, to indicate the device is still usable. - - A device with a capability of kIOPMLowPower may: - Require either 0 or kIOPMPowerOn from its power parent - Offer either kIOPMLowPower, kIOPMPowerOn, or 0 (no power at all) - to its power plane children. - - Useful only as a Capability, although USB drivers should consult USB family documentation for other valid circumstances to use the kIOPMLowPower bit. - - @constant kIOPMPreventIdleSleep - In the capability field of a power state, disallows idle system sleep while the device is in that state. - - For example, displays and disks set this capability for their ON power state; since the system may not idle sleep while the display (and thus keyboard or mouse) or the disk is active. - - Useful only as a Capability. - - @constant kIOPMSleepCapability - Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. - - @constant kIOPMRestartCapability - Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. - - @constant kIOPMSleep - Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. - - @constant kIOPMRestart - Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. -*/ -typedef unsigned long IOPMPowerFlags; -enum { - kIOPMPowerOn = 0x00000002, - kIOPMDeviceUsable = 0x00008000, - kIOPMLowPower = 0x00010000, - kIOPMPreventIdleSleep = 0x00000040, - kIOPMSleepCapability = 0x00000004, - kIOPMRestartCapability = 0x00000080, - kIOPMSleep = 0x00000001, - kIOPMRestart = 0x00000080 -}; - -/* - * Private IOPMPowerFlags - * - * For Apple use only - * Not for use with non-Apple drivers - * Their behavior is undefined - */ -enum { - kIOPMClockNormal = 0x0004, - kIOPMClockRunning = 0x0008, - kIOPMPreventSystemSleep = 0x0010, - kIOPMDoze = 0x0400, - kIOPMChildClamp = 0x0080, - kIOPMChildClamp2 = 0x0200, - kIOPMNotPowerManaged = 0x0800 -}; - - -/* - * Deprecated IOPMPowerFlags - * Their behavior is undefined when used in IOPMPowerState - * Capability, InputPowerRequirement, or OutputPowerCharacter fields. - */ -enum { - kIOPMMaxPerformance = 0x4000, - kIOPMPassThrough = 0x0100, - kIOPMAuxPowerOn = 0x0020, - kIOPMNotAttainable = 0x0001, - kIOPMContextRetained = 0x2000, - kIOPMConfigRetained = 0x1000, - kIOPMStaticPowerValid = 0x0800, - kIOPMSoftSleep = 0x0400, - kIOPMCapabilitiesMask = kIOPMPowerOn | kIOPMDeviceUsable | - kIOPMMaxPerformance | kIOPMContextRetained | - kIOPMConfigRetained | kIOPMSleepCapability | - kIOPMRestartCapability -}; - -/* - * Support for old names of IOPMPowerFlag constants - */ -enum { - IOPMNotAttainable = kIOPMNotAttainable, - IOPMPowerOn = kIOPMPowerOn, - IOPMClockNormal = kIOPMClockNormal, - IOPMClockRunning = kIOPMClockRunning, - IOPMAuxPowerOn = kIOPMAuxPowerOn, - IOPMDeviceUsable = kIOPMDeviceUsable, - IOPMMaxPerformance = kIOPMMaxPerformance, - IOPMContextRetained = kIOPMContextRetained, - IOPMConfigRetained = kIOPMConfigRetained, - IOPMNotPowerManaged = kIOPMNotPowerManaged, - IOPMSoftSleep = kIOPMSoftSleep -}; - - -enum { - kIOPMNextHigherState = 1, - kIOPMHighestState = 2, - kIOPMNextLowerState = 3, - kIOPMLowestState = 4 -}; - -enum { - IOPMNextHigherState = kIOPMNextHigherState, - IOPMHighestState = kIOPMHighestState, - IOPMNextLowerState = kIOPMNextLowerState, - IOPMLowestState = kIOPMLowestState -}; - -// Internal commands used by power managment command queue -enum { - kIOPMBroadcastAggressiveness = 1, - kIOPMUnidleDevice -}; - -// Power consumption unknown value -enum { - kIOPMUnknown = 0xFFFF -}; - -/******************************************************************************* - * - * Root Domain property keys of interest - * - ******************************************************************************/ - -/* AppleClamshellState - * reflects the state of the clamshell (lid) on a portable. - * It has a boolean value. - * true == clamshell is closed - * false == clamshell is open - * not present == no clamshell on this hardware - */ -#define kAppleClamshellStateKey "AppleClamshellState" - -/* AppleClamshellCausesSleep - * reflects the clamshell close behavior on a portable. - * It has a boolean value. - * true == system will sleep when clamshell is closed - * false == system will not sleep on clamshell close - * (typically external display mode) - * not present == no clamshell on this hardware - */ -#define kAppleClamshellCausesSleepKey "AppleClamshellCausesSleep" - -/* kIOPMSleepWakeUUIDKey - * Key refers to a CFStringRef that will uniquely identify - * a sleep/wake cycle for logging & tracking. - * The key becomes valid at the beginning of a sleep cycle - before we - * initiate any sleep/wake notifications. - * The key becomes invalid at the completion of a system wakeup. The - * property will not be present in the IOPMrootDomain's registry entry - * when it is invalid. - * - * See IOPMrootDomain notification kIOPMMessageSleepWakeUUIDChange - */ - #define kIOPMSleepWakeUUIDKey "SleepWakeUUID" - -/******************************************************************************* - * - * Root Domain general interest messages - * - * Available by registering for interest type 'gIOGeneralInterest' - * on IOPMrootDomain. - * - ******************************************************************************/ - -/* kIOPMMessageClamshellStateChange - * Delivered as a general interest notification on the IOPMrootDomain - * IOPMrootDomain sends this message when state of either AppleClamshellState - * or AppleClamshellCausesSleep changes. If this clamshell change results in - * a sleep, the sleep will initiate soon AFTER delivery of this message. - * The state of both variables is encoded in a bitfield argument sent with - * the message. Check bits 0 and 1 using kClamshellStateBit & kClamshellSleepBit - */ -enum { - kClamshellStateBit = (1 << 0), - kClamshellSleepBit = (1 << 1) -}; - -#define kIOPMMessageClamshellStateChange \ - iokit_family_msg(sub_iokit_powermanagement, 0x100) - -/* kIOPMMessageFeatureChange - * Delivered when the set of supported features ("Supported Features" dictionary - * under IOPMrootDomain registry) changes in some way. Typically addition or - * removal of a supported feature. - * RootDomain passes no argument with this message. - */ -#define kIOPMMessageFeatureChange \ - iokit_family_msg(sub_iokit_powermanagement, 0x110) - -/* kIOPMMessageInflowDisableCancelled - * The battery has drained completely to its "Fully Discharged" state. - * If a user process has disabled battery inflow for battery - * calibration, we forcibly re-enable Inflow at this point. - * If inflow HAS been forcibly re-enabled, bit 0 - * (kInflowForciblyEnabledBit) will be set. - */ -enum { - kInflowForciblyEnabledBit = (1 << 0) -}; - -/* kIOPMMessageInternalBatteryFullyDischarged - * The battery has drained completely to its "Fully Discharged" state. - */ -#define kIOPMMessageInternalBatteryFullyDischarged \ - iokit_family_msg(sub_iokit_powermanagement, 0x120) - -/* kIOPMMessageSystemPowerEventOccurred - * Some major system thermal property has changed, and interested clients may - * modify their behavior. - */ -#define kIOPMMessageSystemPowerEventOccurred \ - iokit_family_msg(sub_iokit_powermanagement, 0x130) - -/* kIOPMMessageSleepWakeUUIDChange - * Either a new SleepWakeUUID has been specified at the beginning of a sleep, - * or we're removing the existing property upon completion of a wakeup. - */ -#define kIOPMMessageSleepWakeUUIDChange \ - iokit_family_msg(sub_iokit_powermanagement, 0x140) - -/* kIOPMMessageSleepWakeUUIDSet - * Argument accompanying the kIOPMMessageSleepWakeUUIDChange notification when - * a new UUID has been specified. - */ -#define kIOPMMessageSleepWakeUUIDSet ((void *)1) - -/* kIOPMMessageSleepWakeUUIDCleared - * Argument accompanying the kIOPMMessageSleepWakeUUIDChange notification when - * the current UUID has been removed. - */ -#define kIOPMMessageSleepWakeUUIDCleared ((void *)0) - -/******************************************************************************* - * - * Power commands issued to root domain - * Use with IOPMrootDomain::receivePowerNotification() - * - * These commands are issued from system drivers only: - * ApplePMU, AppleSMU, IOGraphics, AppleACPIFamily - * - ******************************************************************************/ -enum { - kIOPMSleepNow = (1<<0), // put machine to sleep now - kIOPMAllowSleep = (1<<1), // allow idle sleep - kIOPMPreventSleep = (1<<2), // do not allow idle sleep - kIOPMPowerButton = (1<<3), // power button was pressed - kIOPMClamshellClosed = (1<<4), // clamshell was closed - kIOPMPowerEmergency = (1<<5), // battery dangerously low - kIOPMDisableClamshell = (1<<6), // do not sleep on clamshell closure - kIOPMEnableClamshell = (1<<7), // sleep on clamshell closure - kIOPMProcessorSpeedChange = (1<<8), // change the processor speed - kIOPMOverTemp = (1<<9), // system dangerously hot - kIOPMClamshellOpened = (1<<10) // clamshell was opened -}; - - -/******************************************************************************* - * - * Power Management Return Codes - * - ******************************************************************************/ -enum { - kIOPMNoErr = 0, - - // Returned by driver's setPowerState(), powerStateWillChangeTo(), - // powerStateDidChangeTo(), or acknowledgeSetPowerState() to - // implicitly acknowledge power change upon function return. - kIOPMAckImplied = 0, - - // Deprecated - kIOPMWillAckLater = 1, - - // Returned by requestPowerDomainState() to indicate - // unrecognized specification parameter. - kIOPMBadSpecification = 4, - - // Returned by requestPowerDomainState() to indicate - // no power state matches search specification. - kIOPMNoSuchState = 5, - - // Deprecated - kIOPMCannotRaisePower = 6, - - // Deprecated - kIOPMParameterError = 7, - - // Returned when power management state is accessed - // before driver has called PMinit(). - kIOPMNotYetInitialized = 8, - - // And the old constants; deprecated - IOPMNoErr = kIOPMNoErr, - IOPMAckImplied = kIOPMAckImplied, - IOPMWillAckLater = kIOPMWillAckLater, - IOPMBadSpecification = kIOPMBadSpecification, - IOPMNoSuchState = kIOPMNoSuchState, - IOPMCannotRaisePower = kIOPMCannotRaisePower, - IOPMParameterError = kIOPMParameterError, - IOPMNotYetInitialized = kIOPMNotYetInitialized -}; - - -// IOPMPowerSource class descriptive strings -// Power Source state is published as properties to the IORegistry under these -// keys. -#define kIOPMPSExternalConnectedKey "ExternalConnected" -#define kIOPMPSExternalChargeCapableKey "ExternalChargeCapable" -#define kIOPMPSBatteryInstalledKey "BatteryInstalled" -#define kIOPMPSIsChargingKey "IsCharging" -#define kIOPMFullyChargedKey "FullyCharged" -#define kIOPMPSAtWarnLevelKey "AtWarnLevel" -#define kIOPMPSAtCriticalLevelKey "AtCriticalLevel" -#define kIOPMPSCurrentCapacityKey "CurrentCapacity" -#define kIOPMPSMaxCapacityKey "MaxCapacity" -#define kIOPMPSDesignCapacityKey "DesignCapacity" -#define kIOPMPSTimeRemainingKey "TimeRemaining" -#define kIOPMPSAmperageKey "Amperage" -#define kIOPMPSVoltageKey "Voltage" -#define kIOPMPSCycleCountKey "CycleCount" -#define kIOPMPSMaxErrKey "MaxErr" -#define kIOPMPSAdapterInfoKey "AdapterInfo" -#define kIOPMPSLocationKey "Location" -#define kIOPMPSErrorConditionKey "ErrorCondition" -#define kIOPMPSManufacturerKey "Manufacturer" -#define kIOPMPSManufactureDateKey "ManufactureDate" -#define kIOPMPSModelKey "Model" -#define kIOPMPSSerialKey "Serial" -#define kIOPMDeviceNameKey "DeviceName" -#define kIOPMPSLegacyBatteryInfoKey "LegacyBatteryInfo" -#define kIOPMPSBatteryHealthKey "BatteryHealth" -#define kIOPMPSHealthConfidenceKey "HealthConfidence" -#define kIOPMPSCapacityEstimatedKey "CapacityEstimated" -#define kIOPMPSBatteryChargeStatusKey "ChargeStatus" -#define kIOPMPSBatteryTemperatureKey "Temperature" - -// kIOPMPSBatteryChargeStatusKey may have one of the following values, or may have -// no value. If kIOPMBatteryChargeStatusKey has a NULL value (or no value) associated with it -// then charge is proceeding normally. If one of these battery charge status reasons is listed, -// then the charge may have been interrupted. -#define kIOPMBatteryChargeStatusTooHot "HighTemperature" -#define kIOPMBatteryChargeStatusTooCold "LowTemperature" -#define kIOPMBatteryChargeStatusGradient "BatteryTemperatureGradient" - -// Definitions for battery location, in case of multiple batteries. -// A location of 0 is unspecified -// Location is undefined for single battery systems -enum { - kIOPMPSLocationLeft = 1001, - kIOPMPSLocationRight = 1002 -}; - -// Battery quality health types, specified by BatteryHealth and HealthConfidence -// properties in an IOPMPowerSource battery kext. -enum { - kIOPMUndefinedValue = 0, - kIOPMPoorValue = 1, - kIOPMFairValue = 2, - kIOPMGoodValue = 3 -}; - -// Battery's time remaining estimate is invalid this long (seconds) after a wake -#define kIOPMPSInvalidWakeSecondsKey "BatteryInvalidWakeSeconds" - -// Battery must wait this long (seconds) after being completely charged before -// the battery is settled. -#define kIOPMPSPostChargeWaitSecondsKey "PostChargeWaitSeconds" - -// Battery must wait this long (seconds) after being completely discharged -// before the battery is settled. -#define kIOPMPSPostDishargeWaitSecondsKey "PostDischargeWaitSeconds" - - -/* CPU Power Management status keys - * Pass as arguments to IOPMrootDomain::systemPowerEventOccurred - * Or as arguments to IOPMSystemPowerEventOccurred() - * Or to decode the dictionary obtained from IOPMCopyCPUPowerStatus() - * These keys reflect restrictions placed on the CPU by the system - * to bring the CPU's power consumption within allowable thermal and - * power constraints. - */ - - -/* kIOPMGraphicsPowerLimitsKey - * The key representing the dictionary of graphics power limits. - * The dictionary contains the other kIOPMCPUPower keys & their associated - * values (e.g. Speed limit, Processor Count, and Schedule limits). - */ -#define kIOPMGraphicsPowerLimitsKey "Graphics_Power_Limits" - -/* kIOPMGraphicsPowerLimitPerformanceKey - * The key representing the percent of overall performance made available - * by the graphics chip as a percentage (integer 0 - 100). - */ -#define kIOPMGraphicsPowerLimitPerformanceKey "Graphics_Power_Performance" - - - -/* kIOPMCPUPowerLimitsKey - * The key representing the dictionary of CPU Power Limits. - * The dictionary contains the other kIOPMCPUPower keys & their associated - * values (e.g. Speed limit, Processor Count, and Schedule limits). - */ -#define kIOPMCPUPowerLimitsKey "CPU_Power_Limits" - -/* kIOPMCPUPowerLimitProcessorSpeedKey defines the speed & voltage limits placed - * on the CPU. - * Represented as a percentage (0-100) of maximum CPU speed. - */ -#define kIOPMCPUPowerLimitProcessorSpeedKey "CPU_Speed_Limit" - -/* kIOPMCPUPowerLimitProcessorCountKey reflects how many, if any, CPUs have been - * taken offline. Represented as an integer number of CPUs (0 - Max CPUs). - */ -#define kIOPMCPUPowerLimitProcessorCountKey "CPU_Available_CPUs" - -/* kIOPMCPUPowerLimitSchedulerTimeKey represents the percentage (0-100) of CPU time - * available. 100% at normal operation. The OS may limit this time for a percentage - * less than 100%. - */ -#define kIOPMCPUPowerLimitSchedulerTimeKey "CPU_Scheduler_Limit" - - -/* Thermal Level Warning Key - * Indicates the thermal constraints placed on the system. This value may - * cause clients to action to consume fewer system resources. - * The value associated with this warning is defined by the platform. - */ -#define kIOPMThermalLevelWarningKey "Thermal_Level_Warning" - -/* Thermal Warning Level values - * kIOPMThermalWarningLevelNormal - under normal operating conditions - * kIOPMThermalWarningLevelDanger - thermal pressure may cause system slowdown - * kIOPMThermalWarningLevelCrisis - thermal conditions may cause imminent shutdown - * - * The platform may define additional thermal levels if necessary. - */ -enum { - kIOPMThermalWarningLevelNormal = 0, - kIOPMThermalWarningLevelDanger = 5, - kIOPMThermalWarningLevelCrisis = 10 -}; - - -// PM Settings Controller setting types -// Settings types used primarily with: -// IOPMrootDomain::registerPMSettingController -// The values are identical to the similarly named keys for use in user space -// PM settings work. Those keys are defined in IOPMLibPrivate.h. -#define kIOPMSettingWakeOnRingKey "Wake On Modem Ring" -#define kIOPMSettingRestartOnPowerLossKey "Automatic Restart On Power Loss" -#define kIOPMSettingWakeOnACChangeKey "Wake On AC Change" -#define kIOPMSettingSleepOnPowerButtonKey "Sleep On Power Button" -#define kIOPMSettingWakeOnClamshellKey "Wake On Clamshell Open" -#define kIOPMSettingReduceBrightnessKey "ReduceBrightness" -#define kIOPMSettingDisplaySleepUsesDimKey "Display Sleep Uses Dim" -#define kIOPMSettingTimeZoneOffsetKey "TimeZoneOffsetSeconds" -#define kIOPMSettingMobileMotionModuleKey "MobileMotionModule" -#define kIOPMSettingGraphicsSwitchKey "GPUSwitch" - -// Setting controlling drivers can register to receive scheduled wake data -// Either in "CF seconds" type, or structured calendar data in a formatted -// IOPMCalendarStruct defined below. -#define kIOPMSettingAutoWakeSecondsKey "wake" -#define kIOPMSettingAutoWakeCalendarKey "WakeByCalendarDate" -#define kIOPMSettingAutoPowerSecondsKey "poweron" -#define kIOPMSettingAutoPowerCalendarKey "PowerByCalendarDate" - -// Debug seconds auto wake -// Used by sleep cycling debug tools -#define kIOPMSettingDebugWakeRelativeKey "WakeRelativeToSleep" -#define kIOPMSettingDebugPowerRelativeKey "PowerRelativeToShutdown" - -// Maintenance wake calendar. -#define kIOPMSettingMaintenanceWakeCalendarKey "MaintenanceWakeCalendarDate" - -struct IOPMCalendarStruct { - UInt32 year; - UInt8 month; - UInt8 day; - UInt8 hour; - UInt8 minute; - UInt8 second; -}; -typedef struct IOPMCalendarStruct IOPMCalendarStruct; - -// SetAggressiveness types -enum { - kPMGeneralAggressiveness = 0, - kPMMinutesToDim, - kPMMinutesToSpinDown, - kPMMinutesToSleep, - kPMEthernetWakeOnLANSettings, - kPMSetProcessorSpeed, - kPMPowerSource, - kPMMotionSensor, - kPMLastAggressivenessType -}; -#define kMaxType (kPMLastAggressivenessType-1) - -// SetAggressiveness values for the kPMPowerSource aggressiveness type -enum { - kIOPMInternalPower = 1, - kIOPMExternalPower -}; - -#define kIOREMSleepEnabledKey "REMSleepEnabled" - -// Strings for deciphering the dictionary returned from IOPMCopyBatteryInfo -#define kIOBatteryInfoKey "IOBatteryInfo" -#define kIOBatteryCurrentChargeKey "Current" -#define kIOBatteryCapacityKey "Capacity" -#define kIOBatteryFlagsKey "Flags" -#define kIOBatteryVoltageKey "Voltage" -#define kIOBatteryAmperageKey "Amperage" -#define kIOBatteryCycleCountKey "Cycle Count" - -enum { - kIOBatteryInstalled = (1 << 2), - kIOBatteryCharge = (1 << 1), - kIOBatteryChargerConnect = (1 << 0) -}; - - -// Private power management message indicating battery data has changed -// Indicates new data resides in the IORegistry -#define kIOPMMessageBatteryStatusHasChanged iokit_family_msg(sub_iokit_pmu, 0x100) - -// Apple private Legacy messages for re-routing AutoWake and AutoPower messages to the PMU -// through newer user space IOPMSchedulePowerEvent API -#define kIOPMUMessageLegacyAutoWake iokit_family_msg(sub_iokit_pmu, 0x200) -#define kIOPMUMessageLegacyAutoPower iokit_family_msg(sub_iokit_pmu, 0x210) - -// For use with IOPMPowerSource bFlags -#define IOPM_POWER_SOURCE_REV 2 -enum { - kIOPMACInstalled = kIOBatteryChargerConnect, - kIOPMBatteryCharging = kIOBatteryCharge, - kIOPMBatteryInstalled = kIOBatteryInstalled, - kIOPMUPSInstalled = (1<<3), - kIOPMBatteryAtWarn = (1<<4), - kIOPMBatteryDepleted = (1<<5), - kIOPMACnoChargeCapability = (1<<6), // AC adapter cannot charge battery - kIOPMRawLowBattery = (1<<7), // used only by Platform Expert - kIOPMForceLowSpeed = (1<<8), // set by Platfm Expert, chk'd by Pwr Plugin - kIOPMClosedClamshell = (1<<9), // set by PMU - reflects state of the clamshell - kIOPMClamshellStateOnWake = (1<<10) // used only by Platform Expert -}; - - -// ********************************************** -// Internal power management data structures -// ********************************************** - -#if KERNEL && __cplusplus -class IOService; - -enum { - kIOPowerEmergencyLevel = 1000 -}; - -enum { - kIOPMSubclassPolicy, - kIOPMSuperclassPolicy1 -}; - -struct stateChangeNote{ - IOPMPowerFlags stateFlags; - unsigned long stateNum; - void * powerRef; -}; -typedef struct stateChangeNote stateChangeNote; - -struct IOPowerStateChangeNotification { - void * powerRef; - unsigned long returnValue; - unsigned long stateNumber; - IOPMPowerFlags stateFlags; -}; -typedef struct IOPowerStateChangeNotification IOPowerStateChangeNotification; -typedef IOPowerStateChangeNotification sleepWakeNote; -#endif /* KERNEL && __cplusplus */ - -#endif /* ! _IOKIT_IOPM_H */ - diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMDeprecated.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMDeprecated.h.svn-base deleted file mode 100644 index 3bee01a..0000000 --- a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMDeprecated.h.svn-base +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOPMDeprecated_h_ -#define _IOPMDeprecated_h_ - -#ifdef __ppc__ - -// Power events -enum { - kClamshellClosedEventMask = (1<<0), // User closed lid - kDockingBarEventMask = (1<<1), // OBSOLETE - kACPlugEventMask = (1<<2), // User plugged or unplugged adapter - kFrontPanelButtonEventMask = (1<<3), // User hit the front panel button - kBatteryStatusEventMask = (1<<4) // Battery status has changed -}; - -// PUBLIC power management features -// NOTE: this is a direct port from classic, some of these bits -// are obsolete but are included for completeness -enum { - kPMHasWakeupTimerMask = (1<<0), // 1=wake timer is supported - kPMHasSharedModemPortMask = (1<<1), // Not used - kPMHasProcessorCyclingMask = (1<<2), // 1=processor cycling supported - kPMMustProcessorCycleMask = (1<<3), // Not used - kPMHasReducedSpeedMask = (1<<4), // 1=supports reduced processor speed - kPMDynamicSpeedChangeMask = (1<<5), // 1=supports changing processor speed on the fly - kPMHasSCSIDiskModeMask = (1<<6), // 1=supports using machine as SCSI drive - kPMCanGetBatteryTimeMask = (1<<7), // 1=battery time can be calculated - kPMCanWakeupOnRingMask = (1<<8), // 1=machine can wake on modem ring - kPMHasDimmingSupportMask = (1<<9), // 1=has monitor dimming support - kPMHasStartupTimerMask = (1<<10), // 1=can program startup timer - kPMHasChargeNotificationMask = (1<<11), // 1=client can determine charger status/get notifications - kPMHasDimSuspendSupportMask = (1<<12), // 1=can dim diplay to DPMS ('off') state - kPMHasWakeOnNetActivityMask = (1<<13), // 1=supports waking upon receipt of net packet - kPMHasWakeOnLidMask = (1<<14), // 1=can wake upon lid/case opening - kPMCanPowerOffPCIBusMask = (1<<15), // 1=can remove power from PCI bus on sleep - kPMHasDeepSleepMask = (1<<16), // 1=supports deep (hibernation) sleep - kPMHasSleepMask = (1<<17), // 1=machine support low power sleep (ala powerbooks) - kPMSupportsServerModeAPIMask = (1<<18), // 1=supports reboot on AC resume for unexpected power loss - kPMHasUPSIntegrationMask = (1<<19) // 1=supports incorporating UPS devices into power source calcs -}; - -// PRIVATE power management features -// NOTE: this is a direct port from classic, some of these bits -// are obsolete but are included for completeness. -enum { - kPMHasExtdBattInfoMask = (1<<0), // Not used - kPMHasBatteryIDMask = (1<<1), // Not used - kPMCanSwitchPowerMask = (1<<2), // Not used - kPMHasCelsiusCyclingMask = (1<<3), // Not used - kPMHasBatteryPredictionMask = (1<<4), // Not used - kPMHasPowerLevelsMask = (1<<5), // Not used - kPMHasSleepCPUSpeedMask = (1<<6), // Not used - kPMHasBtnIntHandlersMask = (1<<7), // 1=supports individual button interrupt handlers - kPMHasSCSITermPowerMask = (1<<8), // 1=supports SCSI termination power switch - kPMHasADBButtonHandlersMask = (1<<9), // 1=supports button handlers via ADB - kPMHasICTControlMask = (1<<10), // 1=supports ICT control - kPMHasLegacyDesktopSleepMask = (1<<11), // 1=supports 'doze' style sleep - kPMHasDeepIdleMask = (1<<12), // 1=supports Idle2 in hardware - kPMOpenLidPreventsSleepMask = (1<<13), // 1=open case prevent machine from sleeping - kPMClosedLidCausesSleepMask = (1<<14), // 1=case closed (clamshell closed) causes sleep - kPMHasFanControlMask = (1<<15), // 1=machine has software-programmable fan/thermostat controls - kPMHasThermalControlMask = (1<<16), // 1=machine supports thermal monitoring - kPMHasVStepSpeedChangeMask = (1<<17), // 1=machine supports processor voltage/clock change - kPMEnvironEventsPolledMask = (1<<18) // 1=machine doesn't generate pmu env ints, we must poll instead -}; - -// DEFAULT public and private features for machines whose device tree -// does NOT contain this information (pre-Core99). - -// For Cuda-based Desktops - -#define kStdDesktopPMFeatures kPMHasWakeupTimerMask |\ - kPMHasProcessorCyclingMask |\ - kPMHasDimmingSupportMask |\ - kPMHasStartupTimerMask |\ - kPMSupportsServerModeAPIMask |\ - kPMHasUPSIntegrationMask - -#define kStdDesktopPrivPMFeatures kPMHasExtdBattInfoMask |\ - kPMHasICTControlMask |\ - kPMHasLegacyDesktopSleepMask - -#define kStdDesktopNumBatteries 0 - -// For Wallstreet (PowerBook G3 Series 1998) - -#define kWallstreetPMFeatures kPMHasWakeupTimerMask |\ - kPMHasProcessorCyclingMask |\ - kPMHasReducedSpeedMask |\ - kPMDynamicSpeedChangeMask |\ - kPMHasSCSIDiskModeMask |\ - kPMCanGetBatteryTimeMask |\ - kPMHasDimmingSupportMask |\ - kPMHasChargeNotificationMask |\ - kPMHasDimSuspendSupportMask |\ - kPMHasSleepMask - -#define kWallstreetPrivPMFeatures kPMHasExtdBattInfoMask |\ - kPMHasBatteryIDMask |\ - kPMCanSwitchPowerMask |\ - kPMHasADBButtonHandlersMask |\ - kPMHasSCSITermPowerMask |\ - kPMHasICTControlMask |\ - kPMClosedLidCausesSleepMask |\ - kPMEnvironEventsPolledMask - -#define kStdPowerBookPMFeatures kWallstreetPMFeatures -#define kStdPowerBookPrivPMFeatures kWallstreetPrivPMFeatures - -#define kStdPowerBookNumBatteries 2 - -// For 101 (PowerBook G3 Series 1999) - -#define k101PMFeatures kPMHasWakeupTimerMask |\ - kPMHasProcessorCyclingMask |\ - kPMHasReducedSpeedMask |\ - kPMDynamicSpeedChangeMask |\ - kPMHasSCSIDiskModeMask |\ - kPMCanGetBatteryTimeMask |\ - kPMHasDimmingSupportMask |\ - kPMHasChargeNotificationMask |\ - kPMHasDimSuspendSupportMask |\ - kPMHasSleepMask |\ - kPMHasUPSIntegrationMask - -#define k101PrivPMFeatures kPMHasExtdBattInfoMask |\ - kPMHasBatteryIDMask |\ - kPMCanSwitchPowerMask |\ - kPMHasADBButtonHandlersMask |\ - kPMHasSCSITermPowerMask |\ - kPMHasICTControlMask |\ - kPMClosedLidCausesSleepMask |\ - kPMEnvironEventsPolledMask - - -// These flags are deprecated. Use the version with the kIOPM prefix in IOPM.h -enum { - kACInstalled = (1<<0), - kBatteryCharging = (1<<1), - kBatteryInstalled = (1<<2), - kUPSInstalled = (1<<3), - kBatteryAtWarn = (1<<4), - kBatteryDepleted = (1<<5), - kACnoChargeCapability = (1<<6), // AC adapter cannot charge battery - kRawLowBattery = (1<<7), // used only by Platform Expert - kForceLowSpeed = (1<<8) // set by Platfm Expert, chk'd by Pwr Plugin}; -}; - -#endif /* __ppc32 */ -#endif /* _IOPMDeprecated_h_ */ diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMLibDefs.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMLibDefs.h.svn-base deleted file mode 100644 index ff25bf3..0000000 --- a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMLibDefs.h.svn-base +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - - -#define kPMSetAggressiveness 0 -#define kPMGetAggressiveness 1 -#define kPMSleepSystem 2 -#define kPMAllowPowerChange 3 -#define kPMCancelPowerChange 4 -#define kPMShutdownSystem 5 -#define kPMRestartSystem 6 -#define kPMSleepSystemOptions 7 -#define kPMSetMaintenanceWakeCalendar 8 - -#define kNumPMMethods 9 diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPowerSource.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPowerSource.h.svn-base deleted file mode 100644 index ed68918..0000000 --- a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPowerSource.h.svn-base +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOPMPowerSource_h_ -#define _IOPMPowerSource_h_ - -#include <libkern/c++/OSObject.h> -#include <IOKit/pwr_mgt/IOPM.h> -#include <IOKit/IOTypes.h> -#include <IOKit/IOReturn.h> -#include <IOKit/IOService.h> - -enum { - kSecondsPerHour = 3600, - kTenMinutesInSeconds = 600 -}; - -/* class IOPMPowerSource - * - * See IOKit/pwr_mgt/IOPM.h for power source keys relevant to this class. These - * report-type keys are required for calls to IOPMPowerSource::setReportables(), - * and they define the IORegistry interface through which data is passed back - * up to the rest of the system. - * - * A subclassing driver that doesn't want to do anything fancy should: - * 1. Subclass IOPMPowerSource - * 3. Install its own battery change notifications or polling routine that can - * converse with actual battery hardware. - * 4. When battery state changes, change the relevant member variables - * through setCurrentCapacity() style accessors. - * 5. Call updateStatus() on itself when all such settings have been updated. - * - * The subclass driver should also initially populate its settings and call - * updateStatus() on launch. - * - * - * Settings - * - * ExternalConnected - * Type: bool - * IORegistry Key: kIOPMPSExternalConnectedKey - * True if computer is drawing external power - * - * ExternalChargeCapable - * Type: bool - * IORegistry Key: kIOPMPSExternalChargeCapableKey - * True if external power is capable of charging internal battery - * - * BatteryInstalled - * Type: bool - * IORegistry Key: kIOPMPSBatteryInstalledKey - * True if a battery is present; false if removed - * - * IsCharging - * Type: bool - * IORegistry Key: kIOPMPSIsChargingKey - * True if battery is charging itself from external power - * - * AtWarnLevel - * Type: bool - * IORegistry Key: kIOPMPSAtWarnLevelKey - * True if draining battery capacity and past warn level - * - * AtCriticalLevel - * Type: bool - * IORegistry Key: kIOPMPSAtCriticalLevelKey - * True if draining battery capacity and past critical level - * - * CurrentCapacity - * MaxCapacity - * Type: unsigned int - * IORegistry Key: kIOPMPSCurrentCapacityKey, kIOPMPSMaxCapacityKey - * Capacity measured in mAh - * - * TimeRemaining - * Type: int - * IORegistry Key: kIOPMPSTimeRemainingKey - * Time remaining measured in minutes - * - * Amperage - * Type: int - * IORegistry Key: kIOPMPSAmperageKey - * Current is measured in mA - * - * Voltage - * Type: unsigned int - * IORegistry Key: kIOPMPSVoltageKey - * Voltage measured in mV - * - * CycleCount - * Type: unsigned int - * IORegistry Key: kIOPMPSCycleCountKey - * Number of charge/discharge cycles - * - * AdapterInfo - * Type: int - * IORegistry Key: kIOPMPSAdapterInfoKey - * Power adapter information - * - * Location - * Type: int - * IORegistry Key: kIOPMPSLocationKey - * Clue about battery's location in machine - Left vs. Right - * - * ErrorCondition - * Type: OSSymbol - * IORegistry Key: kIOPMPSErrorConditionKey - * String describing error state of battery - * - * Manufacturer - * Type: OSSymbol - * IORegistry Key: kIOPMPSManufacturerKey - * String describing battery manufacturer - * - * Manufactured Date - * Type: unsigned 16-bit bitfield - * IORegistry Key: kIOPMPSManufactureDateKey - * Date is published in a bitfield per the Smart Battery Data spec rev 1.1 - * in section 5.1.26 - * Bits 0...4 => day (value 1-31; 5 bits) - * Bits 5...8 => month (value 1-12; 4 bits) - * Bits 9...15 => years since 1980 (value 0-127; 7 bits) - * - * Model - * Type: OSSymbol - * IORegistry Key: kIOPMPSModelKey - * String describing model number - * - * Serial - * Type: OSSymbol - * IORegistry Key: kIOPMPSSerialKey - * String describing serial number or unique info - * The serial number published hear bears no correspondence to the Apple serial - * number printed on each battery. This is a manufacturer serial number with - * no correlation to the printed serial number. - * - * LegacyIOBatteryInfo - * Type: OSDictionary - * IORegistry Key: kIOPMPSLegacyBatteryInfoKey - * Dictionary conforming to the OS X 10.0-10.4 - */ - -class IOPMPowerSource : public IOService -{ - OSDeclareDefaultStructors(IOPMPowerSource) - - friend class IOPMPowerSourceList; - - protected: - -/* bool settingsChangedSinceLastUpdate - * Used by subclasses to determine if any settings have been modified via the - * accessors below since last call to update(). true is settings have changed; - * false otherwise. - */ - bool settingsChangedSinceUpdate; - -/* OSDictionary properties - * Stores power source state - */ - OSDictionary *properties; - - const OSSymbol *externalConnectedKey; - const OSSymbol *externalChargeCapableKey; - const OSSymbol *batteryInstalledKey; - const OSSymbol *chargingKey; - const OSSymbol *warnLevelKey; - const OSSymbol *criticalLevelKey; - const OSSymbol *currentCapacityKey; - const OSSymbol *maxCapacityKey; - const OSSymbol *timeRemainingKey; - const OSSymbol *amperageKey; - const OSSymbol *voltageKey; - const OSSymbol *cycleCountKey; - const OSSymbol *adapterInfoKey; - const OSSymbol *locationKey; - const OSSymbol *errorConditionKey; - const OSSymbol *manufacturerKey; - const OSSymbol *modelKey; - const OSSymbol *serialKey; - const OSSymbol *batteryInfoKey; - - // Tracking for IOPMPowerSourceList - IOPMPowerSource *nextInList; - - public: - -/*! @function powerSource - @abstract Creates a new IOPMPowerSource nub. Must be attached to IORegistry, - and registered by provider. -*/ - static IOPMPowerSource *powerSource(void); - - virtual bool init(void); - - virtual void free(void); - -/*! @function updateStatus - @abstract Must be called by physical battery controller when battery state - has changed significantly. - @discussion The system will not poll this object for battery updates. Rather \ - the battery's controller must call updateStatus() every time state changes \ - and the settings will be relayed to higher levels of power management. \ - The subclassing driver should override this only if the driver needs to add \ - new settings to the base class. -*/ - virtual void updateStatus(void); - -/* Public accessors for battery state - */ - bool externalConnected(void); - bool externalChargeCapable(void); - bool batteryInstalled(void); - bool isCharging(void); - bool atWarnLevel(void); - bool atCriticalLevel(void); - - unsigned int currentCapacity(void); - unsigned int maxCapacity(void); - unsigned int capacityPercentRemaining(void); - int timeRemaining(void); - int amperage(void); - unsigned int voltage(void); - unsigned int cycleCount(void); - int adapterInfo(void); - int location(void); - - OSSymbol *errorCondition(void); - OSSymbol *manufacturer(void); - OSSymbol *model(void); - OSSymbol *serial(void); - OSDictionary *legacyIOBatteryInfo(void); - - OSObject *getPSProperty(const OSSymbol *); - -protected: - -/* Protected "setter" methods for subclasses - * Subclasses should use these setters to modify all battery properties. - * - * Subclasses must follow all property changes with a call to updateStatus() - * to flush settings changes to upper level battery API clients. - * - */ - void setExternalConnected(bool); - void setExternalChargeCapable(bool); - void setBatteryInstalled(bool); - void setIsCharging(bool); - void setAtWarnLevel(bool); - void setAtCriticalLevel(bool); - - void setCurrentCapacity(unsigned int); - void setMaxCapacity(unsigned int); - void setTimeRemaining(int); - void setAmperage(int); - void setVoltage(unsigned int); - void setCycleCount(unsigned int); - void setAdapterInfo(int); - void setLocation(int); - - void setErrorCondition(OSSymbol *); - void setManufacturer(OSSymbol *); - void setModel(OSSymbol *); - void setSerial(OSSymbol *); - void setLegacyIOBatteryInfo(OSDictionary *); - -/* All of these methods funnel through the generic accessor method - setPSProperty. Caller can pass in any arbitrary OSSymbol key, and - that value will be stored in the PM settings dictionary, and relayed - onto the IORegistry at update time. - */ - void setPSProperty(const OSSymbol *, OSObject *); -}; - -#endif diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPowerSourceList.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPowerSourceList.h.svn-base deleted file mode 100644 index cb1c8ea..0000000 --- a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPowerSourceList.h.svn-base +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#include <libkern/c++/OSObject.h> -#include <IOKit/IOReturn.h> - -class IOPMPowerSource; - -class IOPMPowerSourceList : public OSObject -{ - OSDeclareDefaultStructors(IOPMPowerSourceList) - private: - // pointer to first power source in list - IOPMPowerSource *firstItem; - - // how many power sources are in the list - unsigned long length; - - public: - void initialize(void); - void free(void); - - unsigned long numberOfItems(void); - IOReturn addToList(IOPMPowerSource *newPowerSource); - IOReturn removeFromList(IOPMPowerSource *theItem); - - IOPMPowerSource *firstInList(void); - IOPMPowerSource *nextInList(IOPMPowerSource *currentItem); -}; - diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPrivate.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPrivate.h.svn-base deleted file mode 100644 index bf50d78..0000000 --- a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMPrivate.h.svn-base +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _IOKIT_IOPMPRIVATE_H -#define _IOKIT_IOPMPRIVATE_H - -#include <IOKit/pwr_mgt/IOPM.h> - -/*****************************************************************************/ - -// Private power commands issued to root domain -// bits 0-7 in IOPM.h - -enum { - kIOPMSetValue = (1<<16), - // don't sleep on clamshell closure on a portable with AC connected - kIOPMSetDesktopMode = (1<<17), - // set state of AC adaptor connected - kIOPMSetACAdaptorConnected = (1<<18) -}; - -/*****************************************************************************/ -/*****************************************************************************/ - -/* - * PM notification types - */ - -/* @constant kIOPMStateConsoleUserShutdown - * @abstract Notification of GUI shutdown state available to kexts. - * @discussion This type can be passed as arguments to registerPMSettingController() - * to receive callbacks. - */ -#define kIOPMStateConsoleShutdown "ConsoleShutdown" - -/* @enum ShutdownValues - * @abstract Potential values shared with key kIOPMStateConsoleUserShutdown - */ -enum { -/* @constant kIOPMStateConsoleShutdownNone - * @abstract System shutdown (or restart) hasn't started; system is ON. - * @discussion Next state: 2 - */ - kIOPMStateConsoleShutdownNone = 1, -/* @constant kIOPMStateConsoleShutdownPossible - * @abstract User has been presented with the option to shutdown or restart. Shutdown may be cancelled. - * @discussion Next state may be: 1, 4 - */ - kIOPMStateConsoleShutdownPossible = 2, -/* @constant kIOPMStateConsoleShutdownUnderway - * @abstract Shutdown or restart is proceeding. It may still be cancelled. - * @discussion Next state may be: 1, 4. This state is currently unused. - */ - kIOPMStateConsoleShutdownUnderway = 3, -/* @constant kIOPMStateConsoleShutdownCertain - * @abstract Shutdown is in progress and irrevocable. - * @discussion State remains 4 until power is removed from CPU. - */ - kIOPMStateConsoleShutdownCertain = 4 -}; - -/*****************************************************************************/ -/*****************************************************************************/ - -/* PM Statistics - event indices - * These are arguments to IOPMrootDomain::pmStatsRecordEvent(). - */ -enum { - kIOPMStatsHibernateImageWrite = 1, - kIOPMStatsHibernateImageRead, - kIOPMStatsDriversNotify, - kIOPMStatsApplicationNotify, - kIOPMStatsLateDriverAcknowledge, - kIOPMStatsLateAppAcknowledge, - - // To designate if you're specifying the start or stop end of - // each of the above events, do a bitwise OR of the appropriate - // Start/Stop flag and pass the result to IOPMrootDomain to record - // the event. - kIOPMStatsEventStartFlag = (1 << 24), - kIOPMStatsEventStopFlag = (1 << 25) -}; - -// Keys for IOPMrootDomain registry properties -#define kIOPMSleepStatisticsKey "SleepStatistics" -#define kIOPMSleepStatisticsAppsKey "AppStatistics" - -// Application response statistics -#define kIOPMStatsNameKey "Name" -#define kIOPMStatsPIDKey "Pid" -#define kIOPMStatsTimeMSKey "TimeMS" -#define kIOPMStatsApplicationResponseTypeKey "ResponseType" -#define kIOPMStatsMessageTypeKey "MessageType" - -// PM Statistics: potential values for the key kIOPMStatsApplicationResponseTypeKey -// entry in the application results array. -#define kIOPMStatsResponseTimedOut "ResponseTimedOut" -#define kIOPMStatsResponseCancel "ResponseCancel" -#define kIOPMStatsResponseSlow "ResponseSlow" - -typedef struct { - struct bounds{ - uint64_t start; - uint64_t stop; - }; - - struct bounds hibWrite; - struct bounds hibRead; -// bounds driverNotifySleep; -// bounds driverNotifyWake; -// bounds appNotifySleep; -// bounds appNotifyWake; -// OSDictionary *tardyApps; -// OSDictionary *tardyDrivers; -} PMStatsStruct; - -/*****************************************************************************/ - -/* PM RootDomain tracePoints - * - * In the sleep/wake process, we expect the sleep trace points to proceed - * in increasing order. Once sleep begins with code kIOPMTracePointSleepStarted = 0x11, - * we expect sleep to continue in a monotonically increasing order of tracepoints - * to kIOPMTracePointSystemLoginwindowPhase = 0x30. After trace point SystemLoginWindowPhase, - * the system will return to kIOPMTracePointSystemUp = 0x00. - * - * If the trace point decreases (instead of increasing) before reaching kIOPMTracePointSystemUp, - * that indicates that the sleep process was cancelled. The cancel reason shall be indicated - * in the cancel tracepoint. (TBD) - */ - -enum { -/* When kTracePointSystemUp is the latest tracePoint, - the system is awake. It is not asleep, sleeping, or waking. - - * Phase begins: At boot, at completion of wake from sleep, - immediately following kIOPMTracePointSystemLoginwindowPhase. - * Phase ends: When a sleep attempt is initiated. - */ - kIOPMTracePointSystemUp = 0, - -/* When kIOPMTracePointSleepStarted we have just initiated sleep. - - Note: The state prior to kIOPMTracePointSleepStarted may be only one of: - * kIOPMTracePointSystemUp - * kIOPMTracePointSystemLoginwindowPhase or - - * Phase begins: At initiation of system sleep (idle or forced). - * Phase ends: As we start to notify applications of system sleep. - */ - kIOPMTracePointSleepStarted = 0x11, - -/* When kTracePointSystemSleepAppsPhase is the latest tracePoint, - a system sleep has been irrevocably inititated and PM waits - for responses from notified applications. - - * Phase begins: Begin to asynchronously fire kIOMessageSystemWillSleep notifications, - * and in the case of an idle sleep kIOMessageCanSystemSleep as well. - * Phase ends: When we have received all user & interested kernel acknowledgements. - */ - kIOPMTracePointSystemSleepAppsPhase = 0x12, - - -/* When kIOPMTracePointSystemHibernatePhase is the latest tracePoint, - PM is writing the hiernate image to disk. - */ - kIOPMTracePointSystemHibernatePhase = 0x13, - -/* When kTracePointSystemSleepDriversPhase is the latest tracePoint, - PM is iterating the driver tree powering off devices individually. - - * Phase begins: When IOPMrootDomain has received all of its power acknowledgements and begins - * executing IOService::powerDomainWillChangeTo() - * Phase ends: When IOPMrootDomain::powerChangeDone begins executing CPU shutoff code. - */ - kIOPMTracePointSystemSleepDriversPhase = 0x14, - -/* When kTracePointSystemSleepPlatformPhase is the latest tracePoint, - all apps and drivers have notified of sleep. Plotfarm is powering - off CPU; or system is asleep; or low level wakeup is underway. - - Note: If a system is asleep and then loses power, and it does not have a hibernate - image to restore from (e.g. hibernatemode = 0), then OS X may interpret this power - loss as a system crash in the kTracePointSystemSleepPlatformPhase, since the - power loss resembles a hang or crash, and the power being removed by the user. - - * Phase begins: IOPMrootDomain has already shut off drivers, and is now powering off CPU. - * Phase ends: Immediately after CPU's are powered back on during wakeup. - */ - kIOPMTracePointSystemSleepPlatformPhase = 0x15, - -/* When kTracePointSystemWakeDriversPhase is the latest tracePoint, - System CPU is powered, PM is notifying drivers of system wake. - - * Phase begins: CPU's have successfully powered up and OS is executing. - * Phase ends: All drivers have handled power events & acknowledged completion. - IOPMrootDomain is about to deliver kIOMessageSystemHasPoweredOn. - */ - kIOPMTracePointSystemWakeDriversPhase = 0x21, - -/* When kTracePointSystemWakeAppsPhase is the latest tracePoint, - System CPU is powered, PM has powered on each driver. - - * Phase begins: IOPMrootDomain::tellChangeUp before sending asynchronous - kIOMessageSystemHasPoweredOn notifications - * Phase ends: IOPMrootDomain::tellChangeUp after sending asynchronous notifications - */ - kIOPMTracePointSystemWakeAppsPhase = 0x22, - -/* kIOPMTracePointSystemLoginwindowPhase - This phase represents a several minute window after the system has powered on. - Higher levels of system diagnostics are in a heightened state of alert in this phase, - in case any user errors occurred that we could not detect in software. - - This several minute window - - * Phase begins: After IOPMrootDomain sends kIOMessageSystemHasPoweredOn message. - * Phase ends: When loginwindow calls IOPMSleepWakeSetUUID(NULL) the system shall - be considered awake and usable. The next phase shall be kIOPMTracePointSystemUp. - */ - kIOPMTracePointSystemLoginwindowPhase = 0x30 -}; - -/*****************************************************************************/ - -/* -Ê* kIOPMLoginWindowSecurityDebugKey - identifies PM debug data specific to LoginWindow - * for use with IOPMrootDomain. -Ê*/ -#define kIOPMLoginWindowSecurityDebugKey "LoginWindowSecurity" - -// For PM internal use only - key to locate sleep failure results within SCDynamicStore. -#define kIOPMDynamicStoreSleepFailureKey "SleepFailure" - -/*****************************************************************************/ - -// For IOPMLibPrivate.h -#define kIOPMSleepWakeFailureKey "PMFailurePhase" -#define kIOPMSleepWakeFailureCodeKey "PMStatusCode" -#define kIOPMSleepWakeFailureLoginKey "LWFailurePhase" -#define kIOPMSleepWakeFailureUUIDKey "UUID" -#define kIOPMSleepWakeFailureDateKey "Date" - -#endif /* ! _IOKIT_IOPMPRIVATE_H */ - diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMpowerState.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMpowerState.h.svn-base deleted file mode 100644 index f7f4c8a..0000000 --- a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPMpowerState.h.svn-base +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#include <IOKit/pwr_mgt/IOPM.h> - -/*! @header IOPMpowerState.h - @abstract Defines the struct IOPMPowerState that power managed drivers should use to describe their power states. -*/ - -/*! @struct IOPMPowerState - @abstract Describes a device's power state. - @discussion To take part in system power management, drivers should define an array of 2 or more power states and pass it to kernel power management through IOService::registerPowerDriver. - @field version Defines version number of this struct. Just use the value "1" when defining an IOPMPowerState. - @field capabilityFlags Describes the capability of the device in this state. - @field outputPowerCharacter Describes the power provided in this state. - @field inputPowerRequirement Describes the input power required in this state. - @field staticPower Describes average consumption in milliwatts. Unused; drivers may specify 0. - @field unbudgetedPower Describes additional consumption from separate power supply (milliWatts). Unused; drivers may specify 0. - @field powerToAttain Describes dditional power to attain this state from next lower state (in milliWatts). Unused; drivers may specify 0. - @field timeToAttain Describes time required to enter this state from next lower state (in microseconds). Unused; drivers may specify 0. - @field settleUpTime Describes settle time required after entering this state from next lower state (microseconds). Unused; drivers may specify 0. - @field timeToLower Describes time required to enter next lower state from this one (microseconds). Unused; drivers may specify 0. - @field settleDownTime Settle time required after entering next lower state from this state (microseconds). Unused; drivers may specify 0. - @field powerDomainBudget Describes power in milliWatts a domain in this state can deliver to its children. Unused; drivers may specify 0. -} -*/ - -struct IOPMPowerState -{ - unsigned long version; - IOPMPowerFlags capabilityFlags; - IOPMPowerFlags outputPowerCharacter; - IOPMPowerFlags inputPowerRequirement; - unsigned long staticPower; - unsigned long unbudgetedPower; - unsigned long powerToAttain; - unsigned long timeToAttain; - unsigned long settleUpTime; - unsigned long timeToLower; - unsigned long settleDownTime; - unsigned long powerDomainBudget; -}; - -typedef struct IOPMPowerState IOPMPowerState; - -enum { - kIOPMPowerStateVersion1 = 1 -}; diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPowerConnection.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPowerConnection.h.svn-base deleted file mode 100644 index 179035b..0000000 --- a/i386/include/IOKit/pwr_mgt/.svn/text-base/IOPowerConnection.h.svn-base +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_IOPOWERCONNECTION_H -#define _IOKIT_IOPOWERCONNECTION_H - -#include <IOKit/IOService.h> -#include <IOKit/pwr_mgt/IOPM.h> - -class IOPowerConnection : public IOService -{ - OSDeclareDefaultStructors(IOPowerConnection) - -protected: - /*! @field parentKnowsState true: parent knows state of its domain - used by child */ - bool stateKnown; - /*! @field currentPowerFlags power flags which describe the current state of the power domain - used by child */ - IOPMPowerFlags currentPowerFlags; - /*! @field desiredDomainState state number which corresponds to the child's desire - used by parent */ - unsigned long desiredDomainState; - - /*! @field requestFlag set to true when desiredDomainState is set */ - bool requestFlag; - - /*! @field preventIdleSleepFlag true if child has this bit set in its desired state - used by parent */ - unsigned long preventIdleSleepFlag; - - /*! @field preventSystemSleepFlag true if child has this bit set in its desired state - used by parent */ - unsigned long preventSystemSleepFlag; - - /*! @field awaitingAck true if child has not yet acked our notification - used by parent */ - bool awaitingAck; - - /*! @field readyFlag true if the child has been added as a power child - used by parent */ - bool readyFlag; - -public: - /*! @function setParentKnowsState - @abstract Sets the stateKnown variable. - @discussion Called by the parent when the object is created and called by the child when it discovers that the parent now knows its state. */ - void setParentKnowsState (bool ); - - /*! @function setParentCurrentPowerFlags - @abstract Sets the currentPowerFlags variable. - @discussion Called by the parent when the object is created and called by the child when it discovers that the parent state is changing. */ - void setParentCurrentPowerFlags (IOPMPowerFlags ); - - /*! @function parentKnowsState - @abstract Returns the stateKnown variable. */ - bool parentKnowsState (void ); - - /*! @function parentCurrentPowerFlags - @abstract Returns the currentPowerFlags variable. */ - IOPMPowerFlags parentCurrentPowerFlags (void ); - - /*! @function setDesiredDomainState - @abstract Sets the desiredDomainState variable. - @discussion Called by the parent. */ - void setDesiredDomainState (unsigned long ); - - /*! @function getDesiredDomainState - @abstract Returns the desiredDomainState variable. - @discussion Called by the parent. */ - unsigned long getDesiredDomainState ( void ); - - /*! @function setChildHasRequestedPower - @abstract Set the flag that says that the child has called requestPowerDomainState. - @discussion Called by the parent. */ - void setChildHasRequestedPower ( void ); - - - /*! @function childHasRequestedPower - @abstract Return the flag that says whether the child has called requestPowerDomainState. - @discussion Called by the PCI Aux Power Supply Driver to see if a device driver - is power managed. */ - bool childHasRequestedPower ( void ); - - /*! @function setPreventIdleSleepFlag - @abstract Sets the preventIdleSleepFlag variable. - @discussion Called by the parent. */ - void setPreventIdleSleepFlag (unsigned long ); - - /*! @function getPreventIdleSleepFlag - @abstract Returns the preventIdleSleepFlag variable. - @discussion Called by the parent. */ - bool getPreventIdleSleepFlag ( void ); - - /*! @function setPreventSystemSleepFlag - @abstract Sets the preventSystemSleepFlag variable. - @discussion Called by the parent. */ - void setPreventSystemSleepFlag (unsigned long ); - - /*! @function getPreventSystemSleepFlag - @abstract Returns the preventSystemSleepFlag variable. - @discussion Called by the parent. */ - bool getPreventSystemSleepFlag ( void ); - - /*! @function setAwaitingAck - @abstract Sets the awaitingAck variable. - @discussion Called by the parent. */ - void setAwaitingAck ( bool ); - - /*! @function getAwaitingAck - @abstract Returns the awaitingAck variable. - @discussion Called by the parent. */ - bool getAwaitingAck ( void ); - - /*! @function setReadyFlag - @abstract Sets the readyFlag variable. - @discussion Called by the parent. */ - void setReadyFlag( bool flag ); - - /*! @function getReadyFlag - @abstract Returns the readyFlag variable. - @discussion Called by the parent. */ - bool getReadyFlag( void ) const; -}; - -#endif /* ! _IOKIT_IOPOWERCONNECTION_H */ - diff --git a/i386/include/IOKit/pwr_mgt/.svn/text-base/RootDomain.h.svn-base b/i386/include/IOKit/pwr_mgt/.svn/text-base/RootDomain.h.svn-base deleted file mode 100644 index 6f4ebee..0000000 --- a/i386/include/IOKit/pwr_mgt/.svn/text-base/RootDomain.h.svn-base +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _IOKIT_ROOTDOMAIN_H -#define _IOKIT_ROOTDOMAIN_H - -#include <IOKit/IOService.h> -#include <IOKit/pwr_mgt/IOPM.h> -#include "IOKit/pwr_mgt/IOPMPrivate.h" - - -class IOPMPowerStateQueue; -class RootDomainUserClient; -class PMTraceWorker; - -/* - * Flags for get/setSleepSupported() - */ -enum { - kRootDomainSleepNotSupported = 0x00000000, - kRootDomainSleepSupported = 0x00000001, - kFrameBufferDeepSleepSupported = 0x00000002, - kPCICantSleep = 0x00000004 -}; - -/* - *IOPMrootDomain registry property keys - */ -#define kRootDomainSupportedFeatures "Supported Features" -#define kRootDomainSleepReasonKey "Last Sleep Reason" -#define kRootDomainSleepOptionsKey "Last Sleep Options" -#define kIOPMRootDomainWakeReasonKey "Wake Reason" -#define kIOPMRootDomainWakeTypeKey "Wake Type" -#define kIOPMRootDomainPowerStatusKey "Power Status" - -/* - * Possible sleep reasons found under kRootDomainSleepReasonsKey - */ -#define kIOPMClamshellSleepKey "Clamshell Sleep" -#define kIOPMPowerButtonSleepKey "Power Button Sleep" -#define kIOPMSoftwareSleepKey "Software Sleep" -#define kIOPMOSSwitchHibernationKey "OS Switch Sleep" -#define kIOPMIdleSleepKey "Idle Sleep" -#define kIOPMLowPowerSleepKey "Low Power Sleep" -#define kIOPMThermalEmergencySleepKey "Thermal Emergency Sleep" -#define kIOPMMaintenanceSleepKey "Maintenance Sleep" - -/* - * String constants for communication with PM CPU - */ -#define kIOPMRootDomainLidCloseCString "LidClose" -#define kIOPMRootDomainBatPowerCString "BatPower" - -/* - * Supported Feature bitfields for IOPMrootDomain::publishFeature() - */ -enum { - kIOPMSupportedOnAC = (1<<0), - kIOPMSupportedOnBatt = (1<<1), - kIOPMSupportedOnUPS = (1<<2) -}; - -typedef IOReturn (*IOPMSettingControllerCallback) - (OSObject *target, const OSSymbol *type, - OSObject *val, uintptr_t refcon); - -__BEGIN_DECLS -IONotifier * registerSleepWakeInterest( - IOServiceInterestHandler, void *, void * = 0); - -IONotifier * registerPrioritySleepWakeInterest( - IOServiceInterestHandler handler, - void * self, void * ref = 0); - -IOReturn acknowledgeSleepWakeNotification(void * ); - -IOReturn vetoSleepWakeNotification(void * PMrefcon); -__END_DECLS - -#define IOPM_ROOTDOMAIN_REV 2 - -class IOPMrootDomain: public IOService -{ - OSDeclareFinalStructors(IOPMrootDomain) - -public: - static IOPMrootDomain * construct( void ); - - virtual bool start( IOService * provider ); - virtual IOReturn setAggressiveness( unsigned long, unsigned long ); - virtual IOReturn getAggressiveness( unsigned long, unsigned long * ); - - virtual IOReturn sleepSystem( void ); - IOReturn sleepSystemOptions( OSDictionary *options ); - - virtual IOReturn setProperties( OSObject * ); - -/*! @function systemPowerEventOccurred - @abstract Other drivers may inform IOPMrootDomain of system PM events - @discussion systemPowerEventOccurred is a richer alternative to receivePowerNotification() - Only Apple-owned kexts should have reason to call systemPowerEventOccurred. - @param event An OSSymbol describing the type of power event. - @param value A 32-bit integer value associated with the event. - @param shouldUpdate indicates whether the root domain should send a notification - to interested parties. Pass false if you're calling systemPowerEventOccurred - several times in succession; and pass true only on the last invocatino. - @result kIOReturnSuccess on success */ - - IOReturn systemPowerEventOccurred( - const OSSymbol *event, - uint32_t intValue ); - - IOReturn systemPowerEventOccurred( - const OSSymbol *event, - OSObject *value ); - - virtual IOReturn receivePowerNotification( UInt32 msg ); - - virtual void setSleepSupported( IOOptionBits flags ); - - virtual IOOptionBits getSleepSupported( void ); - - void wakeFromDoze( void ); - - // KEXT driver announces support of power management feature - - void publishFeature( const char *feature ); - - // KEXT driver announces support of power management feature - // And specifies power sources with kIOPMSupportedOn{AC/Batt/UPS} bitfield. - // Returns a unique uint32_t identifier for later removing support for this - // feature. - // NULL is acceptable for uniqueFeatureID for kexts without plans to unload. - - void publishFeature( const char *feature, - uint32_t supportedWhere, - uint32_t *uniqueFeatureID); - - // KEXT driver announces removal of a previously published power management - // feature. Pass 'uniqueFeatureID' returned from publishFeature() - - IOReturn removePublishedFeature( uint32_t removeFeatureID ); - -/*! @function copyPMSetting - @abstract Copy the current value for a PM setting. Returns an OSNumber or - OSData depending on the setting. - @param whichSetting Name of the desired setting. - @result OSObject value if valid, NULL otherwise. */ - - OSObject * copyPMSetting( OSSymbol *whichSetting ); - -/*! @function registerPMSettingController - @abstract Register for callbacks on changes to certain PM settings. - @param settings NULL terminated array of C strings, each string for a PM - setting that the caller is interested in and wants to get callbacks for. - @param callout C function ptr or member function cast as such. - @param target The target of the callback, usually 'this' - @param refcon Will be passed to caller in callback; for caller's use. - @param handle Caller should keep the OSObject * returned here. If non-NULL, - handle will have a retain count of 1 on return. To deregister, pass to - unregisterPMSettingController() - @result kIOReturnSuccess on success. */ - - IOReturn registerPMSettingController( - const OSSymbol *settings[], - IOPMSettingControllerCallback callout, - OSObject *target, - uintptr_t refcon, - OSObject **handle); // out param - -/*! @function registerPMSettingController - @abstract Register for callbacks on changes to certain PM settings. - @param settings NULL terminated array of C strings, each string for a PM - setting that the caller is interested in and wants to get callbacks for. - @param supportedPowerSources bitfield indicating which power sources these - settings are supported for (kIOPMSupportedOnAC, etc.) - @param callout C function ptr or member function cast as such. - @param target The target of the callback, usually 'this' - @param refcon Will be passed to caller in callback; for caller's use. - @param handle Caller should keep the OSObject * returned here. If non-NULL, - handle will have a retain count of 1 on return. To deregister, pass to - unregisterPMSettingController() - @result kIOReturnSuccess on success. */ - - IOReturn registerPMSettingController( - const OSSymbol *settings[], - uint32_t supportedPowerSources, - IOPMSettingControllerCallback callout, - OSObject *target, - uintptr_t refcon, - OSObject **handle); // out param - - virtual IONotifier * registerInterest( - const OSSymbol * typeOfInterest, - IOServiceInterestHandler handler, - void * target, void * ref = 0 ); - - void pmStatsRecordEvent( - int eventIndex, - AbsoluteTime timestamp); - - void pmStatsRecordApplicationResponse( - const OSSymbol *response, - const char *name, - int messageType, - uint32_t delay_ms, - int app_pid); - - virtual IOReturn callPlatformFunction( - const OSSymbol *functionName, - bool waitForFunction, - void *param1, void *param2, - void *param3, void *param4 ); - -private: - virtual IOReturn changePowerStateTo( unsigned long ordinal ); - virtual IOReturn changePowerStateToPriv( unsigned long ordinal ); - virtual IOReturn requestPowerDomainState( IOPMPowerFlags, IOPowerConnection *, unsigned long ); - virtual void powerChangeDone( unsigned long ); - virtual bool tellChangeDown( unsigned long ); - virtual bool askChangeDown( unsigned long ); - virtual void tellChangeUp( unsigned long ); - virtual void tellNoChangeDown( unsigned long ); -}; - - -#endif /* _IOKIT_ROOTDOMAIN_H */ diff --git a/i386/include/IOKit/pwr_mgt/IOPM.h b/i386/include/IOKit/pwr_mgt/IOPM.h deleted file mode 100644 index 7d78225..0000000 --- a/i386/include/IOKit/pwr_mgt/IOPM.h +++ /dev/null @@ -1,654 +0,0 @@ -/* - * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _IOKIT_IOPM_H -#define _IOKIT_IOPM_H - -#include <IOKit/IOTypes.h> -#include <IOKit/IOMessage.h> -#include <IOKit/IOReturn.h> - -#ifdef __ppc__ -#include <IOKit/pwr_mgt/IOPMDeprecated.h> -#endif - -/*! @header IOPM.h - @abstract Defines power management constants and keys used by both in-kernel and user space power management. - @discussion IOPM.h defines a range of power management constants used in several in-kernel and user space APIs. Most significantly, the IOPMPowerFlags used to specify the fields of an IOPMPowerState struct are defined here. - - Most of the constants defined in IOPM.h are deprecated or for Apple internal use only, and are not elaborated on in headerdoc. -*/ - -enum { - kIOPMMaxPowerStates = 10, - IOPMMaxPowerStates = kIOPMMaxPowerStates -}; - -/*! @enum IOPMPowerFlags - @abstract Bits are used in defining capabilityFlags, inputPowerRequirements, and outputPowerCharacter in the IOPMPowerState structure. - @discussion These bits may be bitwise-OR'd together in the IOPMPowerState capabilityFlags field, the outputPowerCharacter field, and/or the inputPowerRequirement field. - - The comments clearly mark whether each flag should be used in the capabilityFlags field, outputPowerCharacter field, and inputPowerRequirement field, or all three. - - The value of capabilityFlags, inputPowerRequirement or outputPowerCharacter may be 0. Most drivers implement their 'OFF' state, used when asleep, by defininf each of the 3 fields as 0. - - The bits listed below are only the most common bits used to define a device's power states. Your device's IO family may require that your device specify other input or output power flags to interact properly. Consult family-specific documentation to determine if your IOPower plane parents or children require other power flags; they probably don't. - - @constant kIOPMPowerOn Indicates the device is on, requires power, and provides power. Useful as a: Capability, InputPowerRequirement, OutputPowerCharacter - - @constant kIOPMDeviceUsable Indicates the device is usable in this state. Useful only as a Capability - - @constant kIOPMLowPower - Indicates device is in a low power state. May be bitwis-OR'd together - with kIOPMDeviceUsable flag, to indicate the device is still usable. - - A device with a capability of kIOPMLowPower may: - Require either 0 or kIOPMPowerOn from its power parent - Offer either kIOPMLowPower, kIOPMPowerOn, or 0 (no power at all) - to its power plane children. - - Useful only as a Capability, although USB drivers should consult USB family documentation for other valid circumstances to use the kIOPMLowPower bit. - - @constant kIOPMPreventIdleSleep - In the capability field of a power state, disallows idle system sleep while the device is in that state. - - For example, displays and disks set this capability for their ON power state; since the system may not idle sleep while the display (and thus keyboard or mouse) or the disk is active. - - Useful only as a Capability. - - @constant kIOPMSleepCapability - Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. - - @constant kIOPMRestartCapability - Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. - - @constant kIOPMSleep - Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. - - @constant kIOPMRestart - Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. -*/ -typedef unsigned long IOPMPowerFlags; -enum { - kIOPMPowerOn = 0x00000002, - kIOPMDeviceUsable = 0x00008000, - kIOPMLowPower = 0x00010000, - kIOPMPreventIdleSleep = 0x00000040, - kIOPMSleepCapability = 0x00000004, - kIOPMRestartCapability = 0x00000080, - kIOPMSleep = 0x00000001, - kIOPMRestart = 0x00000080 -}; - -/* - * Private IOPMPowerFlags - * - * For Apple use only - * Not for use with non-Apple drivers - * Their behavior is undefined - */ -enum { - kIOPMClockNormal = 0x0004, - kIOPMClockRunning = 0x0008, - kIOPMPreventSystemSleep = 0x0010, - kIOPMDoze = 0x0400, - kIOPMChildClamp = 0x0080, - kIOPMChildClamp2 = 0x0200, - kIOPMNotPowerManaged = 0x0800 -}; - - -/* - * Deprecated IOPMPowerFlags - * Their behavior is undefined when used in IOPMPowerState - * Capability, InputPowerRequirement, or OutputPowerCharacter fields. - */ -enum { - kIOPMMaxPerformance = 0x4000, - kIOPMPassThrough = 0x0100, - kIOPMAuxPowerOn = 0x0020, - kIOPMNotAttainable = 0x0001, - kIOPMContextRetained = 0x2000, - kIOPMConfigRetained = 0x1000, - kIOPMStaticPowerValid = 0x0800, - kIOPMSoftSleep = 0x0400, - kIOPMCapabilitiesMask = kIOPMPowerOn | kIOPMDeviceUsable | - kIOPMMaxPerformance | kIOPMContextRetained | - kIOPMConfigRetained | kIOPMSleepCapability | - kIOPMRestartCapability -}; - -/* - * Support for old names of IOPMPowerFlag constants - */ -enum { - IOPMNotAttainable = kIOPMNotAttainable, - IOPMPowerOn = kIOPMPowerOn, - IOPMClockNormal = kIOPMClockNormal, - IOPMClockRunning = kIOPMClockRunning, - IOPMAuxPowerOn = kIOPMAuxPowerOn, - IOPMDeviceUsable = kIOPMDeviceUsable, - IOPMMaxPerformance = kIOPMMaxPerformance, - IOPMContextRetained = kIOPMContextRetained, - IOPMConfigRetained = kIOPMConfigRetained, - IOPMNotPowerManaged = kIOPMNotPowerManaged, - IOPMSoftSleep = kIOPMSoftSleep -}; - - -enum { - kIOPMNextHigherState = 1, - kIOPMHighestState = 2, - kIOPMNextLowerState = 3, - kIOPMLowestState = 4 -}; - -enum { - IOPMNextHigherState = kIOPMNextHigherState, - IOPMHighestState = kIOPMHighestState, - IOPMNextLowerState = kIOPMNextLowerState, - IOPMLowestState = kIOPMLowestState -}; - -// Internal commands used by power managment command queue -enum { - kIOPMBroadcastAggressiveness = 1, - kIOPMUnidleDevice -}; - -// Power consumption unknown value -enum { - kIOPMUnknown = 0xFFFF -}; - -/******************************************************************************* - * - * Root Domain property keys of interest - * - ******************************************************************************/ - -/* AppleClamshellState - * reflects the state of the clamshell (lid) on a portable. - * It has a boolean value. - * true == clamshell is closed - * false == clamshell is open - * not present == no clamshell on this hardware - */ -#define kAppleClamshellStateKey "AppleClamshellState" - -/* AppleClamshellCausesSleep - * reflects the clamshell close behavior on a portable. - * It has a boolean value. - * true == system will sleep when clamshell is closed - * false == system will not sleep on clamshell close - * (typically external display mode) - * not present == no clamshell on this hardware - */ -#define kAppleClamshellCausesSleepKey "AppleClamshellCausesSleep" - -/* kIOPMSleepWakeUUIDKey - * Key refers to a CFStringRef that will uniquely identify - * a sleep/wake cycle for logging & tracking. - * The key becomes valid at the beginning of a sleep cycle - before we - * initiate any sleep/wake notifications. - * The key becomes invalid at the completion of a system wakeup. The - * property will not be present in the IOPMrootDomain's registry entry - * when it is invalid. - * - * See IOPMrootDomain notification kIOPMMessageSleepWakeUUIDChange - */ - #define kIOPMSleepWakeUUIDKey "SleepWakeUUID" - -/******************************************************************************* - * - * Root Domain general interest messages - * - * Available by registering for interest type 'gIOGeneralInterest' - * on IOPMrootDomain. - * - ******************************************************************************/ - -/* kIOPMMessageClamshellStateChange - * Delivered as a general interest notification on the IOPMrootDomain - * IOPMrootDomain sends this message when state of either AppleClamshellState - * or AppleClamshellCausesSleep changes. If this clamshell change results in - * a sleep, the sleep will initiate soon AFTER delivery of this message. - * The state of both variables is encoded in a bitfield argument sent with - * the message. Check bits 0 and 1 using kClamshellStateBit & kClamshellSleepBit - */ -enum { - kClamshellStateBit = (1 << 0), - kClamshellSleepBit = (1 << 1) -}; - -#define kIOPMMessageClamshellStateChange \ - iokit_family_msg(sub_iokit_powermanagement, 0x100) - -/* kIOPMMessageFeatureChange - * Delivered when the set of supported features ("Supported Features" dictionary - * under IOPMrootDomain registry) changes in some way. Typically addition or - * removal of a supported feature. - * RootDomain passes no argument with this message. - */ -#define kIOPMMessageFeatureChange \ - iokit_family_msg(sub_iokit_powermanagement, 0x110) - -/* kIOPMMessageInflowDisableCancelled - * The battery has drained completely to its "Fully Discharged" state. - * If a user process has disabled battery inflow for battery - * calibration, we forcibly re-enable Inflow at this point. - * If inflow HAS been forcibly re-enabled, bit 0 - * (kInflowForciblyEnabledBit) will be set. - */ -enum { - kInflowForciblyEnabledBit = (1 << 0) -}; - -/* kIOPMMessageInternalBatteryFullyDischarged - * The battery has drained completely to its "Fully Discharged" state. - */ -#define kIOPMMessageInternalBatteryFullyDischarged \ - iokit_family_msg(sub_iokit_powermanagement, 0x120) - -/* kIOPMMessageSystemPowerEventOccurred - * Some major system thermal property has changed, and interested clients may - * modify their behavior. - */ -#define kIOPMMessageSystemPowerEventOccurred \ - iokit_family_msg(sub_iokit_powermanagement, 0x130) - -/* kIOPMMessageSleepWakeUUIDChange - * Either a new SleepWakeUUID has been specified at the beginning of a sleep, - * or we're removing the existing property upon completion of a wakeup. - */ -#define kIOPMMessageSleepWakeUUIDChange \ - iokit_family_msg(sub_iokit_powermanagement, 0x140) - -/* kIOPMMessageSleepWakeUUIDSet - * Argument accompanying the kIOPMMessageSleepWakeUUIDChange notification when - * a new UUID has been specified. - */ -#define kIOPMMessageSleepWakeUUIDSet ((void *)1) - -/* kIOPMMessageSleepWakeUUIDCleared - * Argument accompanying the kIOPMMessageSleepWakeUUIDChange notification when - * the current UUID has been removed. - */ -#define kIOPMMessageSleepWakeUUIDCleared ((void *)0) - -/******************************************************************************* - * - * Power commands issued to root domain - * Use with IOPMrootDomain::receivePowerNotification() - * - * These commands are issued from system drivers only: - * ApplePMU, AppleSMU, IOGraphics, AppleACPIFamily - * - ******************************************************************************/ -enum { - kIOPMSleepNow = (1<<0), // put machine to sleep now - kIOPMAllowSleep = (1<<1), // allow idle sleep - kIOPMPreventSleep = (1<<2), // do not allow idle sleep - kIOPMPowerButton = (1<<3), // power button was pressed - kIOPMClamshellClosed = (1<<4), // clamshell was closed - kIOPMPowerEmergency = (1<<5), // battery dangerously low - kIOPMDisableClamshell = (1<<6), // do not sleep on clamshell closure - kIOPMEnableClamshell = (1<<7), // sleep on clamshell closure - kIOPMProcessorSpeedChange = (1<<8), // change the processor speed - kIOPMOverTemp = (1<<9), // system dangerously hot - kIOPMClamshellOpened = (1<<10) // clamshell was opened -}; - - -/******************************************************************************* - * - * Power Management Return Codes - * - ******************************************************************************/ -enum { - kIOPMNoErr = 0, - - // Returned by driver's setPowerState(), powerStateWillChangeTo(), - // powerStateDidChangeTo(), or acknowledgeSetPowerState() to - // implicitly acknowledge power change upon function return. - kIOPMAckImplied = 0, - - // Deprecated - kIOPMWillAckLater = 1, - - // Returned by requestPowerDomainState() to indicate - // unrecognized specification parameter. - kIOPMBadSpecification = 4, - - // Returned by requestPowerDomainState() to indicate - // no power state matches search specification. - kIOPMNoSuchState = 5, - - // Deprecated - kIOPMCannotRaisePower = 6, - - // Deprecated - kIOPMParameterError = 7, - - // Returned when power management state is accessed - // before driver has called PMinit(). - kIOPMNotYetInitialized = 8, - - // And the old constants; deprecated - IOPMNoErr = kIOPMNoErr, - IOPMAckImplied = kIOPMAckImplied, - IOPMWillAckLater = kIOPMWillAckLater, - IOPMBadSpecification = kIOPMBadSpecification, - IOPMNoSuchState = kIOPMNoSuchState, - IOPMCannotRaisePower = kIOPMCannotRaisePower, - IOPMParameterError = kIOPMParameterError, - IOPMNotYetInitialized = kIOPMNotYetInitialized -}; - - -// IOPMPowerSource class descriptive strings -// Power Source state is published as properties to the IORegistry under these -// keys. -#define kIOPMPSExternalConnectedKey "ExternalConnected" -#define kIOPMPSExternalChargeCapableKey "ExternalChargeCapable" -#define kIOPMPSBatteryInstalledKey "BatteryInstalled" -#define kIOPMPSIsChargingKey "IsCharging" -#define kIOPMFullyChargedKey "FullyCharged" -#define kIOPMPSAtWarnLevelKey "AtWarnLevel" -#define kIOPMPSAtCriticalLevelKey "AtCriticalLevel" -#define kIOPMPSCurrentCapacityKey "CurrentCapacity" -#define kIOPMPSMaxCapacityKey "MaxCapacity" -#define kIOPMPSDesignCapacityKey "DesignCapacity" -#define kIOPMPSTimeRemainingKey "TimeRemaining" -#define kIOPMPSAmperageKey "Amperage" -#define kIOPMPSVoltageKey "Voltage" -#define kIOPMPSCycleCountKey "CycleCount" -#define kIOPMPSMaxErrKey "MaxErr" -#define kIOPMPSAdapterInfoKey "AdapterInfo" -#define kIOPMPSLocationKey "Location" -#define kIOPMPSErrorConditionKey "ErrorCondition" -#define kIOPMPSManufacturerKey "Manufacturer" -#define kIOPMPSManufactureDateKey "ManufactureDate" -#define kIOPMPSModelKey "Model" -#define kIOPMPSSerialKey "Serial" -#define kIOPMDeviceNameKey "DeviceName" -#define kIOPMPSLegacyBatteryInfoKey "LegacyBatteryInfo" -#define kIOPMPSBatteryHealthKey "BatteryHealth" -#define kIOPMPSHealthConfidenceKey "HealthConfidence" -#define kIOPMPSCapacityEstimatedKey "CapacityEstimated" -#define kIOPMPSBatteryChargeStatusKey "ChargeStatus" -#define kIOPMPSBatteryTemperatureKey "Temperature" - -// kIOPMPSBatteryChargeStatusKey may have one of the following values, or may have -// no value. If kIOPMBatteryChargeStatusKey has a NULL value (or no value) associated with it -// then charge is proceeding normally. If one of these battery charge status reasons is listed, -// then the charge may have been interrupted. -#define kIOPMBatteryChargeStatusTooHot "HighTemperature" -#define kIOPMBatteryChargeStatusTooCold "LowTemperature" -#define kIOPMBatteryChargeStatusGradient "BatteryTemperatureGradient" - -// Definitions for battery location, in case of multiple batteries. -// A location of 0 is unspecified -// Location is undefined for single battery systems -enum { - kIOPMPSLocationLeft = 1001, - kIOPMPSLocationRight = 1002 -}; - -// Battery quality health types, specified by BatteryHealth and HealthConfidence -// properties in an IOPMPowerSource battery kext. -enum { - kIOPMUndefinedValue = 0, - kIOPMPoorValue = 1, - kIOPMFairValue = 2, - kIOPMGoodValue = 3 -}; - -// Battery's time remaining estimate is invalid this long (seconds) after a wake -#define kIOPMPSInvalidWakeSecondsKey "BatteryInvalidWakeSeconds" - -// Battery must wait this long (seconds) after being completely charged before -// the battery is settled. -#define kIOPMPSPostChargeWaitSecondsKey "PostChargeWaitSeconds" - -// Battery must wait this long (seconds) after being completely discharged -// before the battery is settled. -#define kIOPMPSPostDishargeWaitSecondsKey "PostDischargeWaitSeconds" - - -/* CPU Power Management status keys - * Pass as arguments to IOPMrootDomain::systemPowerEventOccurred - * Or as arguments to IOPMSystemPowerEventOccurred() - * Or to decode the dictionary obtained from IOPMCopyCPUPowerStatus() - * These keys reflect restrictions placed on the CPU by the system - * to bring the CPU's power consumption within allowable thermal and - * power constraints. - */ - - -/* kIOPMGraphicsPowerLimitsKey - * The key representing the dictionary of graphics power limits. - * The dictionary contains the other kIOPMCPUPower keys & their associated - * values (e.g. Speed limit, Processor Count, and Schedule limits). - */ -#define kIOPMGraphicsPowerLimitsKey "Graphics_Power_Limits" - -/* kIOPMGraphicsPowerLimitPerformanceKey - * The key representing the percent of overall performance made available - * by the graphics chip as a percentage (integer 0 - 100). - */ -#define kIOPMGraphicsPowerLimitPerformanceKey "Graphics_Power_Performance" - - - -/* kIOPMCPUPowerLimitsKey - * The key representing the dictionary of CPU Power Limits. - * The dictionary contains the other kIOPMCPUPower keys & their associated - * values (e.g. Speed limit, Processor Count, and Schedule limits). - */ -#define kIOPMCPUPowerLimitsKey "CPU_Power_Limits" - -/* kIOPMCPUPowerLimitProcessorSpeedKey defines the speed & voltage limits placed - * on the CPU. - * Represented as a percentage (0-100) of maximum CPU speed. - */ -#define kIOPMCPUPowerLimitProcessorSpeedKey "CPU_Speed_Limit" - -/* kIOPMCPUPowerLimitProcessorCountKey reflects how many, if any, CPUs have been - * taken offline. Represented as an integer number of CPUs (0 - Max CPUs). - */ -#define kIOPMCPUPowerLimitProcessorCountKey "CPU_Available_CPUs" - -/* kIOPMCPUPowerLimitSchedulerTimeKey represents the percentage (0-100) of CPU time - * available. 100% at normal operation. The OS may limit this time for a percentage - * less than 100%. - */ -#define kIOPMCPUPowerLimitSchedulerTimeKey "CPU_Scheduler_Limit" - - -/* Thermal Level Warning Key - * Indicates the thermal constraints placed on the system. This value may - * cause clients to action to consume fewer system resources. - * The value associated with this warning is defined by the platform. - */ -#define kIOPMThermalLevelWarningKey "Thermal_Level_Warning" - -/* Thermal Warning Level values - * kIOPMThermalWarningLevelNormal - under normal operating conditions - * kIOPMThermalWarningLevelDanger - thermal pressure may cause system slowdown - * kIOPMThermalWarningLevelCrisis - thermal conditions may cause imminent shutdown - * - * The platform may define additional thermal levels if necessary. - */ -enum { - kIOPMThermalWarningLevelNormal = 0, - kIOPMThermalWarningLevelDanger = 5, - kIOPMThermalWarningLevelCrisis = 10 -}; - - -// PM Settings Controller setting types -// Settings types used primarily with: -// IOPMrootDomain::registerPMSettingController -// The values are identical to the similarly named keys for use in user space -// PM settings work. Those keys are defined in IOPMLibPrivate.h. -#define kIOPMSettingWakeOnRingKey "Wake On Modem Ring" -#define kIOPMSettingRestartOnPowerLossKey "Automatic Restart On Power Loss" -#define kIOPMSettingWakeOnACChangeKey "Wake On AC Change" -#define kIOPMSettingSleepOnPowerButtonKey "Sleep On Power Button" -#define kIOPMSettingWakeOnClamshellKey "Wake On Clamshell Open" -#define kIOPMSettingReduceBrightnessKey "ReduceBrightness" -#define kIOPMSettingDisplaySleepUsesDimKey "Display Sleep Uses Dim" -#define kIOPMSettingTimeZoneOffsetKey "TimeZoneOffsetSeconds" -#define kIOPMSettingMobileMotionModuleKey "MobileMotionModule" -#define kIOPMSettingGraphicsSwitchKey "GPUSwitch" - -// Setting controlling drivers can register to receive scheduled wake data -// Either in "CF seconds" type, or structured calendar data in a formatted -// IOPMCalendarStruct defined below. -#define kIOPMSettingAutoWakeSecondsKey "wake" -#define kIOPMSettingAutoWakeCalendarKey "WakeByCalendarDate" -#define kIOPMSettingAutoPowerSecondsKey "poweron" -#define kIOPMSettingAutoPowerCalendarKey "PowerByCalendarDate" - -// Debug seconds auto wake -// Used by sleep cycling debug tools -#define kIOPMSettingDebugWakeRelativeKey "WakeRelativeToSleep" -#define kIOPMSettingDebugPowerRelativeKey "PowerRelativeToShutdown" - -// Maintenance wake calendar. -#define kIOPMSettingMaintenanceWakeCalendarKey "MaintenanceWakeCalendarDate" - -struct IOPMCalendarStruct { - UInt32 year; - UInt8 month; - UInt8 day; - UInt8 hour; - UInt8 minute; - UInt8 second; -}; -typedef struct IOPMCalendarStruct IOPMCalendarStruct; - -// SetAggressiveness types -enum { - kPMGeneralAggressiveness = 0, - kPMMinutesToDim, - kPMMinutesToSpinDown, - kPMMinutesToSleep, - kPMEthernetWakeOnLANSettings, - kPMSetProcessorSpeed, - kPMPowerSource, - kPMMotionSensor, - kPMLastAggressivenessType -}; -#define kMaxType (kPMLastAggressivenessType-1) - -// SetAggressiveness values for the kPMPowerSource aggressiveness type -enum { - kIOPMInternalPower = 1, - kIOPMExternalPower -}; - -#define kIOREMSleepEnabledKey "REMSleepEnabled" - -// Strings for deciphering the dictionary returned from IOPMCopyBatteryInfo -#define kIOBatteryInfoKey "IOBatteryInfo" -#define kIOBatteryCurrentChargeKey "Current" -#define kIOBatteryCapacityKey "Capacity" -#define kIOBatteryFlagsKey "Flags" -#define kIOBatteryVoltageKey "Voltage" -#define kIOBatteryAmperageKey "Amperage" -#define kIOBatteryCycleCountKey "Cycle Count" - -enum { - kIOBatteryInstalled = (1 << 2), - kIOBatteryCharge = (1 << 1), - kIOBatteryChargerConnect = (1 << 0) -}; - - -// Private power management message indicating battery data has changed -// Indicates new data resides in the IORegistry -#define kIOPMMessageBatteryStatusHasChanged iokit_family_msg(sub_iokit_pmu, 0x100) - -// Apple private Legacy messages for re-routing AutoWake and AutoPower messages to the PMU -// through newer user space IOPMSchedulePowerEvent API -#define kIOPMUMessageLegacyAutoWake iokit_family_msg(sub_iokit_pmu, 0x200) -#define kIOPMUMessageLegacyAutoPower iokit_family_msg(sub_iokit_pmu, 0x210) - -// For use with IOPMPowerSource bFlags -#define IOPM_POWER_SOURCE_REV 2 -enum { - kIOPMACInstalled = kIOBatteryChargerConnect, - kIOPMBatteryCharging = kIOBatteryCharge, - kIOPMBatteryInstalled = kIOBatteryInstalled, - kIOPMUPSInstalled = (1<<3), - kIOPMBatteryAtWarn = (1<<4), - kIOPMBatteryDepleted = (1<<5), - kIOPMACnoChargeCapability = (1<<6), // AC adapter cannot charge battery - kIOPMRawLowBattery = (1<<7), // used only by Platform Expert - kIOPMForceLowSpeed = (1<<8), // set by Platfm Expert, chk'd by Pwr Plugin - kIOPMClosedClamshell = (1<<9), // set by PMU - reflects state of the clamshell - kIOPMClamshellStateOnWake = (1<<10) // used only by Platform Expert -}; - - -// ********************************************** -// Internal power management data structures -// ********************************************** - -#if KERNEL && __cplusplus -class IOService; - -enum { - kIOPowerEmergencyLevel = 1000 -}; - -enum { - kIOPMSubclassPolicy, - kIOPMSuperclassPolicy1 -}; - -struct stateChangeNote{ - IOPMPowerFlags stateFlags; - unsigned long stateNum; - void * powerRef; -}; -typedef struct stateChangeNote stateChangeNote; - -struct IOPowerStateChangeNotification { - void * powerRef; - unsigned long returnValue; - unsigned long stateNumber; - IOPMPowerFlags stateFlags; -}; -typedef struct IOPowerStateChangeNotification IOPowerStateChangeNotification; -typedef IOPowerStateChangeNotification sleepWakeNote; -#endif /* KERNEL && __cplusplus */ - -#endif /* ! _IOKIT_IOPM_H */ - diff --git a/i386/include/IOKit/pwr_mgt/IOPMDeprecated.h b/i386/include/IOKit/pwr_mgt/IOPMDeprecated.h deleted file mode 100644 index 3bee01a..0000000 --- a/i386/include/IOKit/pwr_mgt/IOPMDeprecated.h +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOPMDeprecated_h_ -#define _IOPMDeprecated_h_ - -#ifdef __ppc__ - -// Power events -enum { - kClamshellClosedEventMask = (1<<0), // User closed lid - kDockingBarEventMask = (1<<1), // OBSOLETE - kACPlugEventMask = (1<<2), // User plugged or unplugged adapter - kFrontPanelButtonEventMask = (1<<3), // User hit the front panel button - kBatteryStatusEventMask = (1<<4) // Battery status has changed -}; - -// PUBLIC power management features -// NOTE: this is a direct port from classic, some of these bits -// are obsolete but are included for completeness -enum { - kPMHasWakeupTimerMask = (1<<0), // 1=wake timer is supported - kPMHasSharedModemPortMask = (1<<1), // Not used - kPMHasProcessorCyclingMask = (1<<2), // 1=processor cycling supported - kPMMustProcessorCycleMask = (1<<3), // Not used - kPMHasReducedSpeedMask = (1<<4), // 1=supports reduced processor speed - kPMDynamicSpeedChangeMask = (1<<5), // 1=supports changing processor speed on the fly - kPMHasSCSIDiskModeMask = (1<<6), // 1=supports using machine as SCSI drive - kPMCanGetBatteryTimeMask = (1<<7), // 1=battery time can be calculated - kPMCanWakeupOnRingMask = (1<<8), // 1=machine can wake on modem ring - kPMHasDimmingSupportMask = (1<<9), // 1=has monitor dimming support - kPMHasStartupTimerMask = (1<<10), // 1=can program startup timer - kPMHasChargeNotificationMask = (1<<11), // 1=client can determine charger status/get notifications - kPMHasDimSuspendSupportMask = (1<<12), // 1=can dim diplay to DPMS ('off') state - kPMHasWakeOnNetActivityMask = (1<<13), // 1=supports waking upon receipt of net packet - kPMHasWakeOnLidMask = (1<<14), // 1=can wake upon lid/case opening - kPMCanPowerOffPCIBusMask = (1<<15), // 1=can remove power from PCI bus on sleep - kPMHasDeepSleepMask = (1<<16), // 1=supports deep (hibernation) sleep - kPMHasSleepMask = (1<<17), // 1=machine support low power sleep (ala powerbooks) - kPMSupportsServerModeAPIMask = (1<<18), // 1=supports reboot on AC resume for unexpected power loss - kPMHasUPSIntegrationMask = (1<<19) // 1=supports incorporating UPS devices into power source calcs -}; - -// PRIVATE power management features -// NOTE: this is a direct port from classic, some of these bits -// are obsolete but are included for completeness. -enum { - kPMHasExtdBattInfoMask = (1<<0), // Not used - kPMHasBatteryIDMask = (1<<1), // Not used - kPMCanSwitchPowerMask = (1<<2), // Not used - kPMHasCelsiusCyclingMask = (1<<3), // Not used - kPMHasBatteryPredictionMask = (1<<4), // Not used - kPMHasPowerLevelsMask = (1<<5), // Not used - kPMHasSleepCPUSpeedMask = (1<<6), // Not used - kPMHasBtnIntHandlersMask = (1<<7), // 1=supports individual button interrupt handlers - kPMHasSCSITermPowerMask = (1<<8), // 1=supports SCSI termination power switch - kPMHasADBButtonHandlersMask = (1<<9), // 1=supports button handlers via ADB - kPMHasICTControlMask = (1<<10), // 1=supports ICT control - kPMHasLegacyDesktopSleepMask = (1<<11), // 1=supports 'doze' style sleep - kPMHasDeepIdleMask = (1<<12), // 1=supports Idle2 in hardware - kPMOpenLidPreventsSleepMask = (1<<13), // 1=open case prevent machine from sleeping - kPMClosedLidCausesSleepMask = (1<<14), // 1=case closed (clamshell closed) causes sleep - kPMHasFanControlMask = (1<<15), // 1=machine has software-programmable fan/thermostat controls - kPMHasThermalControlMask = (1<<16), // 1=machine supports thermal monitoring - kPMHasVStepSpeedChangeMask = (1<<17), // 1=machine supports processor voltage/clock change - kPMEnvironEventsPolledMask = (1<<18) // 1=machine doesn't generate pmu env ints, we must poll instead -}; - -// DEFAULT public and private features for machines whose device tree -// does NOT contain this information (pre-Core99). - -// For Cuda-based Desktops - -#define kStdDesktopPMFeatures kPMHasWakeupTimerMask |\ - kPMHasProcessorCyclingMask |\ - kPMHasDimmingSupportMask |\ - kPMHasStartupTimerMask |\ - kPMSupportsServerModeAPIMask |\ - kPMHasUPSIntegrationMask - -#define kStdDesktopPrivPMFeatures kPMHasExtdBattInfoMask |\ - kPMHasICTControlMask |\ - kPMHasLegacyDesktopSleepMask - -#define kStdDesktopNumBatteries 0 - -// For Wallstreet (PowerBook G3 Series 1998) - -#define kWallstreetPMFeatures kPMHasWakeupTimerMask |\ - kPMHasProcessorCyclingMask |\ - kPMHasReducedSpeedMask |\ - kPMDynamicSpeedChangeMask |\ - kPMHasSCSIDiskModeMask |\ - kPMCanGetBatteryTimeMask |\ - kPMHasDimmingSupportMask |\ - kPMHasChargeNotificationMask |\ - kPMHasDimSuspendSupportMask |\ - kPMHasSleepMask - -#define kWallstreetPrivPMFeatures kPMHasExtdBattInfoMask |\ - kPMHasBatteryIDMask |\ - kPMCanSwitchPowerMask |\ - kPMHasADBButtonHandlersMask |\ - kPMHasSCSITermPowerMask |\ - kPMHasICTControlMask |\ - kPMClosedLidCausesSleepMask |\ - kPMEnvironEventsPolledMask - -#define kStdPowerBookPMFeatures kWallstreetPMFeatures -#define kStdPowerBookPrivPMFeatures kWallstreetPrivPMFeatures - -#define kStdPowerBookNumBatteries 2 - -// For 101 (PowerBook G3 Series 1999) - -#define k101PMFeatures kPMHasWakeupTimerMask |\ - kPMHasProcessorCyclingMask |\ - kPMHasReducedSpeedMask |\ - kPMDynamicSpeedChangeMask |\ - kPMHasSCSIDiskModeMask |\ - kPMCanGetBatteryTimeMask |\ - kPMHasDimmingSupportMask |\ - kPMHasChargeNotificationMask |\ - kPMHasDimSuspendSupportMask |\ - kPMHasSleepMask |\ - kPMHasUPSIntegrationMask - -#define k101PrivPMFeatures kPMHasExtdBattInfoMask |\ - kPMHasBatteryIDMask |\ - kPMCanSwitchPowerMask |\ - kPMHasADBButtonHandlersMask |\ - kPMHasSCSITermPowerMask |\ - kPMHasICTControlMask |\ - kPMClosedLidCausesSleepMask |\ - kPMEnvironEventsPolledMask - - -// These flags are deprecated. Use the version with the kIOPM prefix in IOPM.h -enum { - kACInstalled = (1<<0), - kBatteryCharging = (1<<1), - kBatteryInstalled = (1<<2), - kUPSInstalled = (1<<3), - kBatteryAtWarn = (1<<4), - kBatteryDepleted = (1<<5), - kACnoChargeCapability = (1<<6), // AC adapter cannot charge battery - kRawLowBattery = (1<<7), // used only by Platform Expert - kForceLowSpeed = (1<<8) // set by Platfm Expert, chk'd by Pwr Plugin}; -}; - -#endif /* __ppc32 */ -#endif /* _IOPMDeprecated_h_ */ diff --git a/i386/include/IOKit/pwr_mgt/IOPMLibDefs.h b/i386/include/IOKit/pwr_mgt/IOPMLibDefs.h deleted file mode 100644 index ff25bf3..0000000 --- a/i386/include/IOKit/pwr_mgt/IOPMLibDefs.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - - -#define kPMSetAggressiveness 0 -#define kPMGetAggressiveness 1 -#define kPMSleepSystem 2 -#define kPMAllowPowerChange 3 -#define kPMCancelPowerChange 4 -#define kPMShutdownSystem 5 -#define kPMRestartSystem 6 -#define kPMSleepSystemOptions 7 -#define kPMSetMaintenanceWakeCalendar 8 - -#define kNumPMMethods 9 diff --git a/i386/include/IOKit/pwr_mgt/IOPMPowerSource.h b/i386/include/IOKit/pwr_mgt/IOPMPowerSource.h deleted file mode 100644 index ed68918..0000000 --- a/i386/include/IOKit/pwr_mgt/IOPMPowerSource.h +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOPMPowerSource_h_ -#define _IOPMPowerSource_h_ - -#include <libkern/c++/OSObject.h> -#include <IOKit/pwr_mgt/IOPM.h> -#include <IOKit/IOTypes.h> -#include <IOKit/IOReturn.h> -#include <IOKit/IOService.h> - -enum { - kSecondsPerHour = 3600, - kTenMinutesInSeconds = 600 -}; - -/* class IOPMPowerSource - * - * See IOKit/pwr_mgt/IOPM.h for power source keys relevant to this class. These - * report-type keys are required for calls to IOPMPowerSource::setReportables(), - * and they define the IORegistry interface through which data is passed back - * up to the rest of the system. - * - * A subclassing driver that doesn't want to do anything fancy should: - * 1. Subclass IOPMPowerSource - * 3. Install its own battery change notifications or polling routine that can - * converse with actual battery hardware. - * 4. When battery state changes, change the relevant member variables - * through setCurrentCapacity() style accessors. - * 5. Call updateStatus() on itself when all such settings have been updated. - * - * The subclass driver should also initially populate its settings and call - * updateStatus() on launch. - * - * - * Settings - * - * ExternalConnected - * Type: bool - * IORegistry Key: kIOPMPSExternalConnectedKey - * True if computer is drawing external power - * - * ExternalChargeCapable - * Type: bool - * IORegistry Key: kIOPMPSExternalChargeCapableKey - * True if external power is capable of charging internal battery - * - * BatteryInstalled - * Type: bool - * IORegistry Key: kIOPMPSBatteryInstalledKey - * True if a battery is present; false if removed - * - * IsCharging - * Type: bool - * IORegistry Key: kIOPMPSIsChargingKey - * True if battery is charging itself from external power - * - * AtWarnLevel - * Type: bool - * IORegistry Key: kIOPMPSAtWarnLevelKey - * True if draining battery capacity and past warn level - * - * AtCriticalLevel - * Type: bool - * IORegistry Key: kIOPMPSAtCriticalLevelKey - * True if draining battery capacity and past critical level - * - * CurrentCapacity - * MaxCapacity - * Type: unsigned int - * IORegistry Key: kIOPMPSCurrentCapacityKey, kIOPMPSMaxCapacityKey - * Capacity measured in mAh - * - * TimeRemaining - * Type: int - * IORegistry Key: kIOPMPSTimeRemainingKey - * Time remaining measured in minutes - * - * Amperage - * Type: int - * IORegistry Key: kIOPMPSAmperageKey - * Current is measured in mA - * - * Voltage - * Type: unsigned int - * IORegistry Key: kIOPMPSVoltageKey - * Voltage measured in mV - * - * CycleCount - * Type: unsigned int - * IORegistry Key: kIOPMPSCycleCountKey - * Number of charge/discharge cycles - * - * AdapterInfo - * Type: int - * IORegistry Key: kIOPMPSAdapterInfoKey - * Power adapter information - * - * Location - * Type: int - * IORegistry Key: kIOPMPSLocationKey - * Clue about battery's location in machine - Left vs. Right - * - * ErrorCondition - * Type: OSSymbol - * IORegistry Key: kIOPMPSErrorConditionKey - * String describing error state of battery - * - * Manufacturer - * Type: OSSymbol - * IORegistry Key: kIOPMPSManufacturerKey - * String describing battery manufacturer - * - * Manufactured Date - * Type: unsigned 16-bit bitfield - * IORegistry Key: kIOPMPSManufactureDateKey - * Date is published in a bitfield per the Smart Battery Data spec rev 1.1 - * in section 5.1.26 - * Bits 0...4 => day (value 1-31; 5 bits) - * Bits 5...8 => month (value 1-12; 4 bits) - * Bits 9...15 => years since 1980 (value 0-127; 7 bits) - * - * Model - * Type: OSSymbol - * IORegistry Key: kIOPMPSModelKey - * String describing model number - * - * Serial - * Type: OSSymbol - * IORegistry Key: kIOPMPSSerialKey - * String describing serial number or unique info - * The serial number published hear bears no correspondence to the Apple serial - * number printed on each battery. This is a manufacturer serial number with - * no correlation to the printed serial number. - * - * LegacyIOBatteryInfo - * Type: OSDictionary - * IORegistry Key: kIOPMPSLegacyBatteryInfoKey - * Dictionary conforming to the OS X 10.0-10.4 - */ - -class IOPMPowerSource : public IOService -{ - OSDeclareDefaultStructors(IOPMPowerSource) - - friend class IOPMPowerSourceList; - - protected: - -/* bool settingsChangedSinceLastUpdate - * Used by subclasses to determine if any settings have been modified via the - * accessors below since last call to update(). true is settings have changed; - * false otherwise. - */ - bool settingsChangedSinceUpdate; - -/* OSDictionary properties - * Stores power source state - */ - OSDictionary *properties; - - const OSSymbol *externalConnectedKey; - const OSSymbol *externalChargeCapableKey; - const OSSymbol *batteryInstalledKey; - const OSSymbol *chargingKey; - const OSSymbol *warnLevelKey; - const OSSymbol *criticalLevelKey; - const OSSymbol *currentCapacityKey; - const OSSymbol *maxCapacityKey; - const OSSymbol *timeRemainingKey; - const OSSymbol *amperageKey; - const OSSymbol *voltageKey; - const OSSymbol *cycleCountKey; - const OSSymbol *adapterInfoKey; - const OSSymbol *locationKey; - const OSSymbol *errorConditionKey; - const OSSymbol *manufacturerKey; - const OSSymbol *modelKey; - const OSSymbol *serialKey; - const OSSymbol *batteryInfoKey; - - // Tracking for IOPMPowerSourceList - IOPMPowerSource *nextInList; - - public: - -/*! @function powerSource - @abstract Creates a new IOPMPowerSource nub. Must be attached to IORegistry, - and registered by provider. -*/ - static IOPMPowerSource *powerSource(void); - - virtual bool init(void); - - virtual void free(void); - -/*! @function updateStatus - @abstract Must be called by physical battery controller when battery state - has changed significantly. - @discussion The system will not poll this object for battery updates. Rather \ - the battery's controller must call updateStatus() every time state changes \ - and the settings will be relayed to higher levels of power management. \ - The subclassing driver should override this only if the driver needs to add \ - new settings to the base class. -*/ - virtual void updateStatus(void); - -/* Public accessors for battery state - */ - bool externalConnected(void); - bool externalChargeCapable(void); - bool batteryInstalled(void); - bool isCharging(void); - bool atWarnLevel(void); - bool atCriticalLevel(void); - - unsigned int currentCapacity(void); - unsigned int maxCapacity(void); - unsigned int capacityPercentRemaining(void); - int timeRemaining(void); - int amperage(void); - unsigned int voltage(void); - unsigned int cycleCount(void); - int adapterInfo(void); - int location(void); - - OSSymbol *errorCondition(void); - OSSymbol *manufacturer(void); - OSSymbol *model(void); - OSSymbol *serial(void); - OSDictionary *legacyIOBatteryInfo(void); - - OSObject *getPSProperty(const OSSymbol *); - -protected: - -/* Protected "setter" methods for subclasses - * Subclasses should use these setters to modify all battery properties. - * - * Subclasses must follow all property changes with a call to updateStatus() - * to flush settings changes to upper level battery API clients. - * - */ - void setExternalConnected(bool); - void setExternalChargeCapable(bool); - void setBatteryInstalled(bool); - void setIsCharging(bool); - void setAtWarnLevel(bool); - void setAtCriticalLevel(bool); - - void setCurrentCapacity(unsigned int); - void setMaxCapacity(unsigned int); - void setTimeRemaining(int); - void setAmperage(int); - void setVoltage(unsigned int); - void setCycleCount(unsigned int); - void setAdapterInfo(int); - void setLocation(int); - - void setErrorCondition(OSSymbol *); - void setManufacturer(OSSymbol *); - void setModel(OSSymbol *); - void setSerial(OSSymbol *); - void setLegacyIOBatteryInfo(OSDictionary *); - -/* All of these methods funnel through the generic accessor method - setPSProperty. Caller can pass in any arbitrary OSSymbol key, and - that value will be stored in the PM settings dictionary, and relayed - onto the IORegistry at update time. - */ - void setPSProperty(const OSSymbol *, OSObject *); -}; - -#endif diff --git a/i386/include/IOKit/pwr_mgt/IOPMPowerSourceList.h b/i386/include/IOKit/pwr_mgt/IOPMPowerSourceList.h deleted file mode 100644 index cb1c8ea..0000000 --- a/i386/include/IOKit/pwr_mgt/IOPMPowerSourceList.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#include <libkern/c++/OSObject.h> -#include <IOKit/IOReturn.h> - -class IOPMPowerSource; - -class IOPMPowerSourceList : public OSObject -{ - OSDeclareDefaultStructors(IOPMPowerSourceList) - private: - // pointer to first power source in list - IOPMPowerSource *firstItem; - - // how many power sources are in the list - unsigned long length; - - public: - void initialize(void); - void free(void); - - unsigned long numberOfItems(void); - IOReturn addToList(IOPMPowerSource *newPowerSource); - IOReturn removeFromList(IOPMPowerSource *theItem); - - IOPMPowerSource *firstInList(void); - IOPMPowerSource *nextInList(IOPMPowerSource *currentItem); -}; - diff --git a/i386/include/IOKit/pwr_mgt/IOPMPrivate.h b/i386/include/IOKit/pwr_mgt/IOPMPrivate.h deleted file mode 100644 index bf50d78..0000000 --- a/i386/include/IOKit/pwr_mgt/IOPMPrivate.h +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _IOKIT_IOPMPRIVATE_H -#define _IOKIT_IOPMPRIVATE_H - -#include <IOKit/pwr_mgt/IOPM.h> - -/*****************************************************************************/ - -// Private power commands issued to root domain -// bits 0-7 in IOPM.h - -enum { - kIOPMSetValue = (1<<16), - // don't sleep on clamshell closure on a portable with AC connected - kIOPMSetDesktopMode = (1<<17), - // set state of AC adaptor connected - kIOPMSetACAdaptorConnected = (1<<18) -}; - -/*****************************************************************************/ -/*****************************************************************************/ - -/* - * PM notification types - */ - -/* @constant kIOPMStateConsoleUserShutdown - * @abstract Notification of GUI shutdown state available to kexts. - * @discussion This type can be passed as arguments to registerPMSettingController() - * to receive callbacks. - */ -#define kIOPMStateConsoleShutdown "ConsoleShutdown" - -/* @enum ShutdownValues - * @abstract Potential values shared with key kIOPMStateConsoleUserShutdown - */ -enum { -/* @constant kIOPMStateConsoleShutdownNone - * @abstract System shutdown (or restart) hasn't started; system is ON. - * @discussion Next state: 2 - */ - kIOPMStateConsoleShutdownNone = 1, -/* @constant kIOPMStateConsoleShutdownPossible - * @abstract User has been presented with the option to shutdown or restart. Shutdown may be cancelled. - * @discussion Next state may be: 1, 4 - */ - kIOPMStateConsoleShutdownPossible = 2, -/* @constant kIOPMStateConsoleShutdownUnderway - * @abstract Shutdown or restart is proceeding. It may still be cancelled. - * @discussion Next state may be: 1, 4. This state is currently unused. - */ - kIOPMStateConsoleShutdownUnderway = 3, -/* @constant kIOPMStateConsoleShutdownCertain - * @abstract Shutdown is in progress and irrevocable. - * @discussion State remains 4 until power is removed from CPU. - */ - kIOPMStateConsoleShutdownCertain = 4 -}; - -/*****************************************************************************/ -/*****************************************************************************/ - -/* PM Statistics - event indices - * These are arguments to IOPMrootDomain::pmStatsRecordEvent(). - */ -enum { - kIOPMStatsHibernateImageWrite = 1, - kIOPMStatsHibernateImageRead, - kIOPMStatsDriversNotify, - kIOPMStatsApplicationNotify, - kIOPMStatsLateDriverAcknowledge, - kIOPMStatsLateAppAcknowledge, - - // To designate if you're specifying the start or stop end of - // each of the above events, do a bitwise OR of the appropriate - // Start/Stop flag and pass the result to IOPMrootDomain to record - // the event. - kIOPMStatsEventStartFlag = (1 << 24), - kIOPMStatsEventStopFlag = (1 << 25) -}; - -// Keys for IOPMrootDomain registry properties -#define kIOPMSleepStatisticsKey "SleepStatistics" -#define kIOPMSleepStatisticsAppsKey "AppStatistics" - -// Application response statistics -#define kIOPMStatsNameKey "Name" -#define kIOPMStatsPIDKey "Pid" -#define kIOPMStatsTimeMSKey "TimeMS" -#define kIOPMStatsApplicationResponseTypeKey "ResponseType" -#define kIOPMStatsMessageTypeKey "MessageType" - -// PM Statistics: potential values for the key kIOPMStatsApplicationResponseTypeKey -// entry in the application results array. -#define kIOPMStatsResponseTimedOut "ResponseTimedOut" -#define kIOPMStatsResponseCancel "ResponseCancel" -#define kIOPMStatsResponseSlow "ResponseSlow" - -typedef struct { - struct bounds{ - uint64_t start; - uint64_t stop; - }; - - struct bounds hibWrite; - struct bounds hibRead; -// bounds driverNotifySleep; -// bounds driverNotifyWake; -// bounds appNotifySleep; -// bounds appNotifyWake; -// OSDictionary *tardyApps; -// OSDictionary *tardyDrivers; -} PMStatsStruct; - -/*****************************************************************************/ - -/* PM RootDomain tracePoints - * - * In the sleep/wake process, we expect the sleep trace points to proceed - * in increasing order. Once sleep begins with code kIOPMTracePointSleepStarted = 0x11, - * we expect sleep to continue in a monotonically increasing order of tracepoints - * to kIOPMTracePointSystemLoginwindowPhase = 0x30. After trace point SystemLoginWindowPhase, - * the system will return to kIOPMTracePointSystemUp = 0x00. - * - * If the trace point decreases (instead of increasing) before reaching kIOPMTracePointSystemUp, - * that indicates that the sleep process was cancelled. The cancel reason shall be indicated - * in the cancel tracepoint. (TBD) - */ - -enum { -/* When kTracePointSystemUp is the latest tracePoint, - the system is awake. It is not asleep, sleeping, or waking. - - * Phase begins: At boot, at completion of wake from sleep, - immediately following kIOPMTracePointSystemLoginwindowPhase. - * Phase ends: When a sleep attempt is initiated. - */ - kIOPMTracePointSystemUp = 0, - -/* When kIOPMTracePointSleepStarted we have just initiated sleep. - - Note: The state prior to kIOPMTracePointSleepStarted may be only one of: - * kIOPMTracePointSystemUp - * kIOPMTracePointSystemLoginwindowPhase or - - * Phase begins: At initiation of system sleep (idle or forced). - * Phase ends: As we start to notify applications of system sleep. - */ - kIOPMTracePointSleepStarted = 0x11, - -/* When kTracePointSystemSleepAppsPhase is the latest tracePoint, - a system sleep has been irrevocably inititated and PM waits - for responses from notified applications. - - * Phase begins: Begin to asynchronously fire kIOMessageSystemWillSleep notifications, - * and in the case of an idle sleep kIOMessageCanSystemSleep as well. - * Phase ends: When we have received all user & interested kernel acknowledgements. - */ - kIOPMTracePointSystemSleepAppsPhase = 0x12, - - -/* When kIOPMTracePointSystemHibernatePhase is the latest tracePoint, - PM is writing the hiernate image to disk. - */ - kIOPMTracePointSystemHibernatePhase = 0x13, - -/* When kTracePointSystemSleepDriversPhase is the latest tracePoint, - PM is iterating the driver tree powering off devices individually. - - * Phase begins: When IOPMrootDomain has received all of its power acknowledgements and begins - * executing IOService::powerDomainWillChangeTo() - * Phase ends: When IOPMrootDomain::powerChangeDone begins executing CPU shutoff code. - */ - kIOPMTracePointSystemSleepDriversPhase = 0x14, - -/* When kTracePointSystemSleepPlatformPhase is the latest tracePoint, - all apps and drivers have notified of sleep. Plotfarm is powering - off CPU; or system is asleep; or low level wakeup is underway. - - Note: If a system is asleep and then loses power, and it does not have a hibernate - image to restore from (e.g. hibernatemode = 0), then OS X may interpret this power - loss as a system crash in the kTracePointSystemSleepPlatformPhase, since the - power loss resembles a hang or crash, and the power being removed by the user. - - * Phase begins: IOPMrootDomain has already shut off drivers, and is now powering off CPU. - * Phase ends: Immediately after CPU's are powered back on during wakeup. - */ - kIOPMTracePointSystemSleepPlatformPhase = 0x15, - -/* When kTracePointSystemWakeDriversPhase is the latest tracePoint, - System CPU is powered, PM is notifying drivers of system wake. - - * Phase begins: CPU's have successfully powered up and OS is executing. - * Phase ends: All drivers have handled power events & acknowledged completion. - IOPMrootDomain is about to deliver kIOMessageSystemHasPoweredOn. - */ - kIOPMTracePointSystemWakeDriversPhase = 0x21, - -/* When kTracePointSystemWakeAppsPhase is the latest tracePoint, - System CPU is powered, PM has powered on each driver. - - * Phase begins: IOPMrootDomain::tellChangeUp before sending asynchronous - kIOMessageSystemHasPoweredOn notifications - * Phase ends: IOPMrootDomain::tellChangeUp after sending asynchronous notifications - */ - kIOPMTracePointSystemWakeAppsPhase = 0x22, - -/* kIOPMTracePointSystemLoginwindowPhase - This phase represents a several minute window after the system has powered on. - Higher levels of system diagnostics are in a heightened state of alert in this phase, - in case any user errors occurred that we could not detect in software. - - This several minute window - - * Phase begins: After IOPMrootDomain sends kIOMessageSystemHasPoweredOn message. - * Phase ends: When loginwindow calls IOPMSleepWakeSetUUID(NULL) the system shall - be considered awake and usable. The next phase shall be kIOPMTracePointSystemUp. - */ - kIOPMTracePointSystemLoginwindowPhase = 0x30 -}; - -/*****************************************************************************/ - -/* -Ê* kIOPMLoginWindowSecurityDebugKey - identifies PM debug data specific to LoginWindow - * for use with IOPMrootDomain. -Ê*/ -#define kIOPMLoginWindowSecurityDebugKey "LoginWindowSecurity" - -// For PM internal use only - key to locate sleep failure results within SCDynamicStore. -#define kIOPMDynamicStoreSleepFailureKey "SleepFailure" - -/*****************************************************************************/ - -// For IOPMLibPrivate.h -#define kIOPMSleepWakeFailureKey "PMFailurePhase" -#define kIOPMSleepWakeFailureCodeKey "PMStatusCode" -#define kIOPMSleepWakeFailureLoginKey "LWFailurePhase" -#define kIOPMSleepWakeFailureUUIDKey "UUID" -#define kIOPMSleepWakeFailureDateKey "Date" - -#endif /* ! _IOKIT_IOPMPRIVATE_H */ - diff --git a/i386/include/IOKit/pwr_mgt/IOPMpowerState.h b/i386/include/IOKit/pwr_mgt/IOPMpowerState.h deleted file mode 100644 index f7f4c8a..0000000 --- a/i386/include/IOKit/pwr_mgt/IOPMpowerState.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#include <IOKit/pwr_mgt/IOPM.h> - -/*! @header IOPMpowerState.h - @abstract Defines the struct IOPMPowerState that power managed drivers should use to describe their power states. -*/ - -/*! @struct IOPMPowerState - @abstract Describes a device's power state. - @discussion To take part in system power management, drivers should define an array of 2 or more power states and pass it to kernel power management through IOService::registerPowerDriver. - @field version Defines version number of this struct. Just use the value "1" when defining an IOPMPowerState. - @field capabilityFlags Describes the capability of the device in this state. - @field outputPowerCharacter Describes the power provided in this state. - @field inputPowerRequirement Describes the input power required in this state. - @field staticPower Describes average consumption in milliwatts. Unused; drivers may specify 0. - @field unbudgetedPower Describes additional consumption from separate power supply (milliWatts). Unused; drivers may specify 0. - @field powerToAttain Describes dditional power to attain this state from next lower state (in milliWatts). Unused; drivers may specify 0. - @field timeToAttain Describes time required to enter this state from next lower state (in microseconds). Unused; drivers may specify 0. - @field settleUpTime Describes settle time required after entering this state from next lower state (microseconds). Unused; drivers may specify 0. - @field timeToLower Describes time required to enter next lower state from this one (microseconds). Unused; drivers may specify 0. - @field settleDownTime Settle time required after entering next lower state from this state (microseconds). Unused; drivers may specify 0. - @field powerDomainBudget Describes power in milliWatts a domain in this state can deliver to its children. Unused; drivers may specify 0. -} -*/ - -struct IOPMPowerState -{ - unsigned long version; - IOPMPowerFlags capabilityFlags; - IOPMPowerFlags outputPowerCharacter; - IOPMPowerFlags inputPowerRequirement; - unsigned long staticPower; - unsigned long unbudgetedPower; - unsigned long powerToAttain; - unsigned long timeToAttain; - unsigned long settleUpTime; - unsigned long timeToLower; - unsigned long settleDownTime; - unsigned long powerDomainBudget; -}; - -typedef struct IOPMPowerState IOPMPowerState; - -enum { - kIOPMPowerStateVersion1 = 1 -}; diff --git a/i386/include/IOKit/pwr_mgt/IOPowerConnection.h b/i386/include/IOKit/pwr_mgt/IOPowerConnection.h deleted file mode 100644 index 179035b..0000000 --- a/i386/include/IOKit/pwr_mgt/IOPowerConnection.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_IOPOWERCONNECTION_H -#define _IOKIT_IOPOWERCONNECTION_H - -#include <IOKit/IOService.h> -#include <IOKit/pwr_mgt/IOPM.h> - -class IOPowerConnection : public IOService -{ - OSDeclareDefaultStructors(IOPowerConnection) - -protected: - /*! @field parentKnowsState true: parent knows state of its domain - used by child */ - bool stateKnown; - /*! @field currentPowerFlags power flags which describe the current state of the power domain - used by child */ - IOPMPowerFlags currentPowerFlags; - /*! @field desiredDomainState state number which corresponds to the child's desire - used by parent */ - unsigned long desiredDomainState; - - /*! @field requestFlag set to true when desiredDomainState is set */ - bool requestFlag; - - /*! @field preventIdleSleepFlag true if child has this bit set in its desired state - used by parent */ - unsigned long preventIdleSleepFlag; - - /*! @field preventSystemSleepFlag true if child has this bit set in its desired state - used by parent */ - unsigned long preventSystemSleepFlag; - - /*! @field awaitingAck true if child has not yet acked our notification - used by parent */ - bool awaitingAck; - - /*! @field readyFlag true if the child has been added as a power child - used by parent */ - bool readyFlag; - -public: - /*! @function setParentKnowsState - @abstract Sets the stateKnown variable. - @discussion Called by the parent when the object is created and called by the child when it discovers that the parent now knows its state. */ - void setParentKnowsState (bool ); - - /*! @function setParentCurrentPowerFlags - @abstract Sets the currentPowerFlags variable. - @discussion Called by the parent when the object is created and called by the child when it discovers that the parent state is changing. */ - void setParentCurrentPowerFlags (IOPMPowerFlags ); - - /*! @function parentKnowsState - @abstract Returns the stateKnown variable. */ - bool parentKnowsState (void ); - - /*! @function parentCurrentPowerFlags - @abstract Returns the currentPowerFlags variable. */ - IOPMPowerFlags parentCurrentPowerFlags (void ); - - /*! @function setDesiredDomainState - @abstract Sets the desiredDomainState variable. - @discussion Called by the parent. */ - void setDesiredDomainState (unsigned long ); - - /*! @function getDesiredDomainState - @abstract Returns the desiredDomainState variable. - @discussion Called by the parent. */ - unsigned long getDesiredDomainState ( void ); - - /*! @function setChildHasRequestedPower - @abstract Set the flag that says that the child has called requestPowerDomainState. - @discussion Called by the parent. */ - void setChildHasRequestedPower ( void ); - - - /*! @function childHasRequestedPower - @abstract Return the flag that says whether the child has called requestPowerDomainState. - @discussion Called by the PCI Aux Power Supply Driver to see if a device driver - is power managed. */ - bool childHasRequestedPower ( void ); - - /*! @function setPreventIdleSleepFlag - @abstract Sets the preventIdleSleepFlag variable. - @discussion Called by the parent. */ - void setPreventIdleSleepFlag (unsigned long ); - - /*! @function getPreventIdleSleepFlag - @abstract Returns the preventIdleSleepFlag variable. - @discussion Called by the parent. */ - bool getPreventIdleSleepFlag ( void ); - - /*! @function setPreventSystemSleepFlag - @abstract Sets the preventSystemSleepFlag variable. - @discussion Called by the parent. */ - void setPreventSystemSleepFlag (unsigned long ); - - /*! @function getPreventSystemSleepFlag - @abstract Returns the preventSystemSleepFlag variable. - @discussion Called by the parent. */ - bool getPreventSystemSleepFlag ( void ); - - /*! @function setAwaitingAck - @abstract Sets the awaitingAck variable. - @discussion Called by the parent. */ - void setAwaitingAck ( bool ); - - /*! @function getAwaitingAck - @abstract Returns the awaitingAck variable. - @discussion Called by the parent. */ - bool getAwaitingAck ( void ); - - /*! @function setReadyFlag - @abstract Sets the readyFlag variable. - @discussion Called by the parent. */ - void setReadyFlag( bool flag ); - - /*! @function getReadyFlag - @abstract Returns the readyFlag variable. - @discussion Called by the parent. */ - bool getReadyFlag( void ) const; -}; - -#endif /* ! _IOKIT_IOPOWERCONNECTION_H */ - diff --git a/i386/include/IOKit/pwr_mgt/RootDomain.h b/i386/include/IOKit/pwr_mgt/RootDomain.h deleted file mode 100644 index 6f4ebee..0000000 --- a/i386/include/IOKit/pwr_mgt/RootDomain.h +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _IOKIT_ROOTDOMAIN_H -#define _IOKIT_ROOTDOMAIN_H - -#include <IOKit/IOService.h> -#include <IOKit/pwr_mgt/IOPM.h> -#include "IOKit/pwr_mgt/IOPMPrivate.h" - - -class IOPMPowerStateQueue; -class RootDomainUserClient; -class PMTraceWorker; - -/* - * Flags for get/setSleepSupported() - */ -enum { - kRootDomainSleepNotSupported = 0x00000000, - kRootDomainSleepSupported = 0x00000001, - kFrameBufferDeepSleepSupported = 0x00000002, - kPCICantSleep = 0x00000004 -}; - -/* - *IOPMrootDomain registry property keys - */ -#define kRootDomainSupportedFeatures "Supported Features" -#define kRootDomainSleepReasonKey "Last Sleep Reason" -#define kRootDomainSleepOptionsKey "Last Sleep Options" -#define kIOPMRootDomainWakeReasonKey "Wake Reason" -#define kIOPMRootDomainWakeTypeKey "Wake Type" -#define kIOPMRootDomainPowerStatusKey "Power Status" - -/* - * Possible sleep reasons found under kRootDomainSleepReasonsKey - */ -#define kIOPMClamshellSleepKey "Clamshell Sleep" -#define kIOPMPowerButtonSleepKey "Power Button Sleep" -#define kIOPMSoftwareSleepKey "Software Sleep" -#define kIOPMOSSwitchHibernationKey "OS Switch Sleep" -#define kIOPMIdleSleepKey "Idle Sleep" -#define kIOPMLowPowerSleepKey "Low Power Sleep" -#define kIOPMThermalEmergencySleepKey "Thermal Emergency Sleep" -#define kIOPMMaintenanceSleepKey "Maintenance Sleep" - -/* - * String constants for communication with PM CPU - */ -#define kIOPMRootDomainLidCloseCString "LidClose" -#define kIOPMRootDomainBatPowerCString "BatPower" - -/* - * Supported Feature bitfields for IOPMrootDomain::publishFeature() - */ -enum { - kIOPMSupportedOnAC = (1<<0), - kIOPMSupportedOnBatt = (1<<1), - kIOPMSupportedOnUPS = (1<<2) -}; - -typedef IOReturn (*IOPMSettingControllerCallback) - (OSObject *target, const OSSymbol *type, - OSObject *val, uintptr_t refcon); - -__BEGIN_DECLS -IONotifier * registerSleepWakeInterest( - IOServiceInterestHandler, void *, void * = 0); - -IONotifier * registerPrioritySleepWakeInterest( - IOServiceInterestHandler handler, - void * self, void * ref = 0); - -IOReturn acknowledgeSleepWakeNotification(void * ); - -IOReturn vetoSleepWakeNotification(void * PMrefcon); -__END_DECLS - -#define IOPM_ROOTDOMAIN_REV 2 - -class IOPMrootDomain: public IOService -{ - OSDeclareFinalStructors(IOPMrootDomain) - -public: - static IOPMrootDomain * construct( void ); - - virtual bool start( IOService * provider ); - virtual IOReturn setAggressiveness( unsigned long, unsigned long ); - virtual IOReturn getAggressiveness( unsigned long, unsigned long * ); - - virtual IOReturn sleepSystem( void ); - IOReturn sleepSystemOptions( OSDictionary *options ); - - virtual IOReturn setProperties( OSObject * ); - -/*! @function systemPowerEventOccurred - @abstract Other drivers may inform IOPMrootDomain of system PM events - @discussion systemPowerEventOccurred is a richer alternative to receivePowerNotification() - Only Apple-owned kexts should have reason to call systemPowerEventOccurred. - @param event An OSSymbol describing the type of power event. - @param value A 32-bit integer value associated with the event. - @param shouldUpdate indicates whether the root domain should send a notification - to interested parties. Pass false if you're calling systemPowerEventOccurred - several times in succession; and pass true only on the last invocatino. - @result kIOReturnSuccess on success */ - - IOReturn systemPowerEventOccurred( - const OSSymbol *event, - uint32_t intValue ); - - IOReturn systemPowerEventOccurred( - const OSSymbol *event, - OSObject *value ); - - virtual IOReturn receivePowerNotification( UInt32 msg ); - - virtual void setSleepSupported( IOOptionBits flags ); - - virtual IOOptionBits getSleepSupported( void ); - - void wakeFromDoze( void ); - - // KEXT driver announces support of power management feature - - void publishFeature( const char *feature ); - - // KEXT driver announces support of power management feature - // And specifies power sources with kIOPMSupportedOn{AC/Batt/UPS} bitfield. - // Returns a unique uint32_t identifier for later removing support for this - // feature. - // NULL is acceptable for uniqueFeatureID for kexts without plans to unload. - - void publishFeature( const char *feature, - uint32_t supportedWhere, - uint32_t *uniqueFeatureID); - - // KEXT driver announces removal of a previously published power management - // feature. Pass 'uniqueFeatureID' returned from publishFeature() - - IOReturn removePublishedFeature( uint32_t removeFeatureID ); - -/*! @function copyPMSetting - @abstract Copy the current value for a PM setting. Returns an OSNumber or - OSData depending on the setting. - @param whichSetting Name of the desired setting. - @result OSObject value if valid, NULL otherwise. */ - - OSObject * copyPMSetting( OSSymbol *whichSetting ); - -/*! @function registerPMSettingController - @abstract Register for callbacks on changes to certain PM settings. - @param settings NULL terminated array of C strings, each string for a PM - setting that the caller is interested in and wants to get callbacks for. - @param callout C function ptr or member function cast as such. - @param target The target of the callback, usually 'this' - @param refcon Will be passed to caller in callback; for caller's use. - @param handle Caller should keep the OSObject * returned here. If non-NULL, - handle will have a retain count of 1 on return. To deregister, pass to - unregisterPMSettingController() - @result kIOReturnSuccess on success. */ - - IOReturn registerPMSettingController( - const OSSymbol *settings[], - IOPMSettingControllerCallback callout, - OSObject *target, - uintptr_t refcon, - OSObject **handle); // out param - -/*! @function registerPMSettingController - @abstract Register for callbacks on changes to certain PM settings. - @param settings NULL terminated array of C strings, each string for a PM - setting that the caller is interested in and wants to get callbacks for. - @param supportedPowerSources bitfield indicating which power sources these - settings are supported for (kIOPMSupportedOnAC, etc.) - @param callout C function ptr or member function cast as such. - @param target The target of the callback, usually 'this' - @param refcon Will be passed to caller in callback; for caller's use. - @param handle Caller should keep the OSObject * returned here. If non-NULL, - handle will have a retain count of 1 on return. To deregister, pass to - unregisterPMSettingController() - @result kIOReturnSuccess on success. */ - - IOReturn registerPMSettingController( - const OSSymbol *settings[], - uint32_t supportedPowerSources, - IOPMSettingControllerCallback callout, - OSObject *target, - uintptr_t refcon, - OSObject **handle); // out param - - virtual IONotifier * registerInterest( - const OSSymbol * typeOfInterest, - IOServiceInterestHandler handler, - void * target, void * ref = 0 ); - - void pmStatsRecordEvent( - int eventIndex, - AbsoluteTime timestamp); - - void pmStatsRecordApplicationResponse( - const OSSymbol *response, - const char *name, - int messageType, - uint32_t delay_ms, - int app_pid); - - virtual IOReturn callPlatformFunction( - const OSSymbol *functionName, - bool waitForFunction, - void *param1, void *param2, - void *param3, void *param4 ); - -private: - virtual IOReturn changePowerStateTo( unsigned long ordinal ); - virtual IOReturn changePowerStateToPriv( unsigned long ordinal ); - virtual IOReturn requestPowerDomainState( IOPMPowerFlags, IOPowerConnection *, unsigned long ); - virtual void powerChangeDone( unsigned long ); - virtual bool tellChangeDown( unsigned long ); - virtual bool askChangeDown( unsigned long ); - virtual void tellChangeUp( unsigned long ); - virtual void tellNoChangeDown( unsigned long ); -}; - - -#endif /* _IOKIT_ROOTDOMAIN_H */ diff --git a/i386/include/IOKit/rtc/.svn/all-wcprops b/i386/include/IOKit/rtc/.svn/all-wcprops deleted file mode 100644 index b3140e1..0000000 --- a/i386/include/IOKit/rtc/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 56 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/rtc -END -IORTCController.h -K 25 -svn:wc:ra_dav:version-url -V 74 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/rtc/IORTCController.h -END diff --git a/i386/include/IOKit/rtc/.svn/entries b/i386/include/IOKit/rtc/.svn/entries deleted file mode 100644 index 73fa41a..0000000 --- a/i386/include/IOKit/rtc/.svn/entries +++ /dev/null @@ -1,62 +0,0 @@ -10 - -dir -2117 -http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/rtc -http://forge.voodooprojects.org/svn/chameleon - - - -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - -b5af796a-00a8-11df-919b-ffff7a100b7d - -IORTCController.h -file - - - - -2012-10-03T17:50:20.000000Z -44a0b2efb5c45175a1ba6782cedb471c -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -1708 - diff --git a/i386/include/IOKit/rtc/.svn/text-base/IORTCController.h.svn-base b/i386/include/IOKit/rtc/.svn/text-base/IORTCController.h.svn-base deleted file mode 100644 index eaf681d..0000000 --- a/i386/include/IOKit/rtc/.svn/text-base/IORTCController.h.svn-base +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * 24 Nov 1998 suurballe Created. - */ - -#include <IOKit/IOService.h> - -typedef void (*RTC_tick_handler)( IOService * ); - - -class IORTCController: public IOService -{ -OSDeclareAbstractStructors(IORTCController) - -public: - -virtual IOReturn getRealTimeClock ( UInt8 * currentTime, IOByteCount * length ) = 0; -virtual IOReturn setRealTimeClock ( UInt8 * newTime ) = 0; -}; - diff --git a/i386/include/IOKit/rtc/IORTCController.h b/i386/include/IOKit/rtc/IORTCController.h deleted file mode 100644 index eaf681d..0000000 --- a/i386/include/IOKit/rtc/IORTCController.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * 24 Nov 1998 suurballe Created. - */ - -#include <IOKit/IOService.h> - -typedef void (*RTC_tick_handler)( IOService * ); - - -class IORTCController: public IOService -{ -OSDeclareAbstractStructors(IORTCController) - -public: - -virtual IOReturn getRealTimeClock ( UInt8 * currentTime, IOByteCount * length ) = 0; -virtual IOReturn setRealTimeClock ( UInt8 * newTime ) = 0; -}; - diff --git a/i386/include/IOKit/sbp2/.svn/all-wcprops b/i386/include/IOKit/sbp2/.svn/all-wcprops deleted file mode 100644 index 8860e60..0000000 --- a/i386/include/IOKit/sbp2/.svn/all-wcprops +++ /dev/null @@ -1,59 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 57 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2 -END -IOFireWireSBP2UserClient.h -K 25 -svn:wc:ra_dav:version-url -V 84 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSBP2UserClient.h -END -IOFireWireSBP2LUN.h -K 25 -svn:wc:ra_dav:version-url -V 77 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSBP2LUN.h -END -IOFireWireSBP2ManagementORB.h -K 25 -svn:wc:ra_dav:version-url -V 87 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSBP2ManagementORB.h -END -IOFireWireSerialBusProtocolTransport.h -K 25 -svn:wc:ra_dav:version-url -V 96 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSerialBusProtocolTransport.h -END -IOFireWireSBP2LSIWorkaroundDescriptor.h -K 25 -svn:wc:ra_dav:version-url -V 97 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSBP2LSIWorkaroundDescriptor.h -END -IOFireWireSBP2ORB.h -K 25 -svn:wc:ra_dav:version-url -V 77 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSBP2ORB.h -END -IOFireWireSBP2Target.h -K 25 -svn:wc:ra_dav:version-url -V 80 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSBP2Target.h -END -IOFireWireSBP2UserClientCommon.h -K 25 -svn:wc:ra_dav:version-url -V 90 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSBP2UserClientCommon.h -END -IOFireWireSBP2Login.h -K 25 -svn:wc:ra_dav:version-url -V 79 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/sbp2/IOFireWireSBP2Login.h -END diff --git a/i386/include/IOKit/sbp2/.svn/entries b/i386/include/IOKit/sbp2/.svn/entries deleted file mode 100644 index 57b7f83..0000000 --- a/i386/include/IOKit/sbp2/.svn/entries +++ /dev/null @@ -1,334 +0,0 @@ -10 - -dir -2117 -http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/sbp2 -http://forge.voodooprojects.org/svn/chameleon - - - -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - -b5af796a-00a8-11df-919b-ffff7a100b7d - -IOFireWireSBP2UserClient.h -file - - - - -2012-10-03T17:50:20.000000Z -abe67641efef3cf326ce18b1de817d57 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -8267 - -IOFireWireSBP2LUN.h -file - - - - -2012-10-03T17:50:20.000000Z -8fab521ac7af386c7d2772a0f69444b3 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -10404 - -IOFireWireSBP2ManagementORB.h -file - - - - -2012-10-03T17:50:20.000000Z -df7f1948a7790ed3d08f53f0426095f2 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -11075 - -IOFireWireSerialBusProtocolTransport.h -file - - - - -2012-10-03T17:50:20.000000Z -6e7bdeac9a9690b47e47421abda8d3c1 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -14111 - -IOFireWireSBP2LSIWorkaroundDescriptor.h -file - - - - -2012-10-03T17:50:20.000000Z -8c4d66f15c56537e975892bec0dd721b -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -12217 - -IOFireWireSBP2ORB.h -file - - - - -2012-10-03T17:50:20.000000Z -387c5f66e2949189fc62b07fc183c7c3 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -21217 - -IOFireWireSBP2Target.h -file - - - - -2012-10-03T17:50:20.000000Z -e7cdf79c998d9b81359b7c6adc3b1881 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -7550 - -IOFireWireSBP2UserClientCommon.h -file - - - - -2012-10-03T17:50:20.000000Z -96d96ad9f1106c7237f0485867e3f509 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -4524 - -IOFireWireSBP2Login.h -file - - - - -2012-10-03T17:50:20.000000Z -b78759007f3ff7e9e66d595d31ac6cf8 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -41499 - diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2LSIWorkaroundDescriptor.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2LSIWorkaroundDescriptor.h.svn-base deleted file mode 100644 index 178ef00..0000000 --- a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2LSIWorkaroundDescriptor.h.svn-base +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#if __ppc__ - -/*! - @header IOFireWireSBP2LSIWorkaroundDescriptor - Contains the class definition for IOFireWireSBP2LSIWorkaroundDescriptor. -*/ - -#ifndef _IOKIT_IOFIREWIRESBP2LSIWORKAROUNDDESCRIPTOR_H -#define _IOKIT_IOFIREWIRESBP2LSIWORKAROUNDDESCRIPTOR_H - -#include <IOKit/IOMemoryDescriptor.h> - -class IOFireWireSBP2LSIRange; - -/*! - @class IOFireWireSBP2LSIWorkaroundDescriptor - @abstract This is a subclass of IOGeneralMemoryDescriptor. It is designed to work around - a hardware problem in a common SBP2 target. It takes a memory descriptor as - an argument. It retains this descriptor and returns a new one with resegmented - physical segments and potentially some "unfixable" segments double buffered. - - If the transfer will cause data to be sent from the Mac, syncBuffersForOutput - must be called before the transfer. - - If the transfer will cause data to be recieve by the Mac, syncBuffersForInput - must be called after the transfer. - - This class calculates the new segmentation only once when it is created. - Any changes to the structure of the original memory descriptor will render - this one useless. It must be released and a new IOFireWireSBP2LSIWorkaroundDescriptor - can be created. - - LSI Bridge Workaround Algorithm Details - - Goals: - 1. Avoid LSI Logic "< 16 byte" bug - prevent any data packet smaller than 16 bytes - 2. Minimize double-buffering - 3. Support non-multiple-of-512-byte devices, e.g. CD Audio - - Solution: - Write a page table such that the bridge will nor use packets smaller than 16 bytes. - In other words, rearrange the memory descriptor to avoid the bug, and do it such - that the SBP-2 layer will not break up a segment (du ro the 64k-1 limit) and - re-introduces the problem - - SBP-2 defines the kFWSBP2MaxPageClusterSize constant. We simply make sure - none of our segments are larger than this size and SBP-2 will not break them - up when it writes the SBP-2 page table. - - Notes: - - Some double buffering is unavoidable. Discontiguous pages may yield page - fragments at the start or end of the buffer (or both, with non-512x buffers). - solution uses less than 33 bytes of double-buffer per segment in original - memory descriptor. - - If driver must break up IO to meet ATA limit of 255 (250?) blocks, assume - the driver does this at a higher level (before applying workaround). - - It is expected that the original memory descriptor has been prepared (wired) -*/ - -class IOFireWireSBP2LSIWorkaroundDescriptor : public IOGeneralMemoryDescriptor -{ - OSDeclareDefaultStructors(IOFireWireSBP2LSIWorkaroundDescriptor) - - friend class IOFireWireSBP2LSIRange; - -protected: - - // reserved for future use - struct ExpansionData { }; - ExpansionData *reserved; - - bool fFixedCapacity; // for both allocators - - ////////////////////////////////////// - // for range allocator - - OSArray * fPermanentRanges; - UInt32 fAllocatedRangesCount; - - virtual IOReturn rangeAllocatorInitialize( UInt32 rangeCount ); - virtual void rangeAllocatorDeallocateAllRanges( void ); - virtual IOFireWireSBP2LSIRange * rangeAllocatorNewRange( void ); - virtual void rangeAllocatorFree( void ); - - ////////////////////////////////////// - // for buffer allocator - - OSArray * fBufferDescriptors; - UInt32 fPermanentPages; - IOByteCount fAllocatedBytesCount; - - virtual IOReturn bufferAllocatorInitialize( IOByteCount requestedBufferSize ); - virtual void bufferAllocatorDeallocateAllBuffers( void ); - virtual void * bufferAllocatorNewBuffer( IOPhysicalAddress * address ); - virtual void bufferAllocatorFree( void ); - - ////////////////////////////////////// - // for range table allocator - - IOPhysicalRange * fRangeTable; - IOByteCount fRangeTableSize; - - virtual IOReturn rangeTableAllocatorInitialize( UInt32 requestedBufferSize ); - virtual IOPhysicalRange * rangeTableAllocatorNewTable( UInt32 entries ); - virtual void rangeTableAllocatorFree( void ); - - ////////////////////////////////////// - // for workaround - - IOMemoryDescriptor * fOriginalDesc; - OSArray * fRanges; - IOByteCount fOffset; - IOByteCount fLength; - IODirection fDirection; - - - virtual bool initWithCapacity - ( UInt32 permanentRanges, IOByteCount permanentBufferSpace, bool fixedCapacity ); - - virtual void free(); - - virtual IOReturn resetToInitialCapacity( void ); - virtual IOReturn initializeRangesArray( void ); - virtual IOReturn recalculateSmallSegments( void ); - virtual IOReturn splitLargeSegments( void ); - virtual IOReturn resegmentOddLengthSegments( void ); - virtual IOReturn initializeBuffers( void ); - - virtual bool initWithAddress( void * address, /* not supported */ - IOByteCount withLength, - IODirection withDirection ); - - virtual bool initWithAddress( vm_address_t address, /* not supported */ - IOByteCount withLength, - IODirection withDirection, - task_t withTask ); - - virtual bool initWithPhysicalAddress( - IOPhysicalAddress address, /* not supported */ - IOByteCount withLength, - IODirection withDirection ); - - virtual bool initWithPhysicalRanges( - IOPhysicalRange * ranges, /* not supported */ - UInt32 withCount, - IODirection withDirection, - bool asReference = false ); - - virtual bool initWithRanges( IOVirtualRange * ranges, /* not supported */ - UInt32 withCount, - IODirection withDirection, - task_t withTask, - bool asReference = false ); - -public: - - // static factory methods and intializers - - // - // create a new instance - // - - - /*! - @function withDescriptor - @abstract Creates a new IOFireWireSBP2LSIWorkaroundDescriptor. - @discussion Create a IOFireWireSBP2LSIWorkaroundDescriptor with no permanent capacity then - inits it the given descriptor. This is basicly a short cut for calling - withCapacity( 0, 0, false) and the initWithDescriptor() - @param desc Original memory descriptor. - @param offset Offset of data to "fix" in bytes from beginning of descriptor. - @param len Length of data in bytes to "fix" - @param direction IODirection of data transfer. - @result Returns a new IOFireWireSBP2LSIWorkaroundDescriptor if successful. - */ - - static IOFireWireSBP2LSIWorkaroundDescriptor * withDescriptor - ( IOMemoryDescriptor * desc, IOByteCount offset = 0, - IOByteCount len = 0, IODirection direction = kIODirectionOutIn ); - - // initialize with descriptor - - /*! - @function initWithDescriptor - @abstract Initialize an IOFireWireSBP2LSIWorkaroundDescriptor with the given descriptor. - @discussion Initialize the workaround descriptor with the given descriptor. - @param desc Original memory descriptor. - @param offset Offset of data to "fix" in bytes from beginning of descriptor. - @param len Length of data in bytes to "fix" - @param direction IODirection of data transfer. - @result Returns true if the initialization was successful. - */ - - virtual bool initWithDescriptor( IOMemoryDescriptor * desc, IOByteCount offset = 0, - IOByteCount len = 0, IODirection direction = kIODirectionOutIn ); - - - /////////////////////////////////// - - - /*! - @function withCapacity - @abstract Create a new descriptor with possibly a permanent capacity. - @discussion Create and IOFireWireSBP2LSIWorkaroundDescriptor with a permanent fixed capacity. - You should call initWithDescriptor afterward. permanentRanges is number of ranges to keep - permanently allocated for use by the algorithm. If fixedCapacity is false additional ranges - may be allocated and deallocated dyanmicly if needed. The algorithm may require more or less - ranges than either the original descriptor or the final fixed may decriptor contain. - permanentBufferSpace is the number of bytes of permanent buffer to keep arround. If fixedCapacity - is false additional buffer space may be allocated and deallocated dynamically. permanentBufferSpace - should generally be set to 32 * maximum number of ranges. fixedCapacity is a flag indicating - whether dynamic allocations are allowed. When making decisions about the maximum amount of - buffer space to keep around, it should be noted tha the maximum number of ranges maybe different - from permanentRanges if fixedCapcity is false. - @param permanentRanges Count of permanent ranges. - @param permanentBufferSpace Byte count of permanent buffers. - @param fixedCapacity bool indicating if dynamic allocations can be made. - @result Returns true if the initialization was successful. - */ - - static IOFireWireSBP2LSIWorkaroundDescriptor * withCapacity - ( UInt32 permanentRanges, IOByteCount permanentBufferSpace, bool fixedCapacity ); - - - /////////////////////////////////// - - // - // manipulate buffers for IO - // - - /*! - @function syncBuffersForOutput - @abstract Synchronize the buffers for output. - @discussion Since double buffering may be invovled in the workaround. The driver needs to - indicate when these buffers should be syncronized with the original descriptor. For data - that will be output syncBuffersForOutput should be called before submiting the ORB. - @result Returns kIOReturnSuccess if sync was successful. - */ - - virtual IOReturn syncBuffersForOutput( void ); // call before output - - /*! - @function syncBuffersForInput - @abstract Synchronize the buffers for input. - @discussion Since double buffering may be invovled in the workaround. The driver needs to - indicate when these buffers should be syncronized with the original descriptor. For data - that will be input syncBuffersForOutput should be called after receiving completion status - for the ORB. - @result Returns kIOReturnSuccess if sync was successful. - */ - - virtual IOReturn syncBuffersForInput( void ); // call after input - -private: - - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 0); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 1); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 2); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 3); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 4); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 5); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 6); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 7); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 8); - -}; - -#endif - -#endif diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2LUN.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2LUN.h.svn-base deleted file mode 100644 index e6c97de..0000000 --- a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2LUN.h.svn-base +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - @header IOFireWireSBP2LUN - Contains the class definition for IOFireWireSBP2LUN. -*/ - -#ifndef _IOKIT_IOFIREWIRESBP2LUN_H -#define _IOKIT_IOFIREWIRESBP2LUN_H - -#include <IOKit/IOService.h> -#include <IOKit/IOCommandGate.h> - -#include <IOKit/firewire/IOFireWireUnit.h> - -#include <IOKit/sbp2/IOFireWireSBP2Login.h> -#include <IOKit/sbp2/IOFireWireSBP2ManagementORB.h> - -class IOFireWireSBP2Target; - -/*! - @class IOFireWireSBP2LUN - @abstract Provider for most drivers. - @discussion IOFireWireSBP2LUN objects are created by IOFireWireSBP2Target objects. Each target may have zero or more IOFireWireSBP2LUN children. The LUN object serves as the matching nub for most drivers and therefore will be the provider for most drivers. It supplies the methods that control the operation of the LUN as a whole. Methods that control the behavior and execution of an SBP2 login session are supplied in a separate IOFireWireSBP2Login object. The LUN can be used to create one of these login objects. - The LUN can also create IOFireWireSBP2ManagementORBs for configuring and appending non-login related management functions. Login related management functions (ie. Login, Logout, Reconnect) are supplied by the IOFireWireSBP2Login. - Finally the LUN can supply a reference to the IOFireWireUnit. This can be useful if a driver wishes to access the standard FireWire APIs. -*/ - -class IOFireWireSBP2LUN : public IOService -{ - OSDeclareDefaultStructors( IOFireWireSBP2LUN ); - - friend class IOFireWireSBP2ManagementORB; - friend class IOFireWireSBP2Login; - friend class IOFireWireSBP2UserClient; - -protected: - - // reserved for future use - struct ExpansionData { }; - ExpansionData *reserved; - - //////////////////////////////////////////// - // methods called by friend classes - - // IOFireWireSBP2Login methods - virtual void removeLogin( IOFireWireSBP2Login * login ); - virtual IOFireWireSBP2Target * getTarget( void ); - - // IOFireWireSBP2ManagementORB methods - virtual void clearAllTasksInSet( void ); // assumes caller is on workloop - virtual void removeManagementORB( IOFireWireSBP2ManagementORB * orb ); - - // IOFireWireSBP2UserClient methods - virtual void flushAllManagementORBs( void ); - -public: - - //////////////////////////////////////////// - // IOService overrides - - /*! @function attach - @abstract Attaches an IOService client to a provider in the registry. - @discussion See IOService for discussion. - @param provider The IOService object which will serve as this objects provider. - @result false if the provider is inactive or on a resource failure, otherwise true. - */ - - virtual bool attach( IOService *provider ); - - /*! @function handleOpen - @abstract Overrideable method to control the open / close behaviour of an IOService. - @discussion See IOService for discussion. - @param forClient Designates the client of the provider requesting the open. - @param options Options for the open, may be interpreted by the implementor of handleOpen. - @result Return true if the open was successful, false otherwise. */ - - virtual bool handleOpen( IOService * forClient, - IOOptionBits options, - void * arg ); - /*! - @function handleClose - @abstract Overrideable method to control the open / close behaviour of an IOService. - @discussion See IOService for discussion. - @param forClient Designates the client of the provider requesting the close. - @param options Options for the close, may be interpreted by the implementor of handleOpen. - */ - - virtual void handleClose( IOService * forClient, - IOOptionBits options ); - - /*! - @function matchPropertyTable - @abstract Implements SBP2 specific matching. - @discussion See IOService for discussion. - @param table The dictionary of properties to be matched against. - @result Returns false if the family considers the matching dictionary does not match in properties it understands, true otherwise. - */ - - virtual bool matchPropertyTable(OSDictionary * table); - -protected: - - //////////////////////////////////////////// - // private fields - - IOFireWireSBP2Target * fProviderTarget; - UInt32 fLUNumber; - OSSet * fLoginSet; - OSIterator * fLoginSetIterator; - IOCommandGate * fGate; - OSSet * fORBSet; - OSIterator * fORBSetIterator; - OSObject * fDiagnostics; - - //////////////////////////////////////////// - // private methods - - // IOService methods - virtual void free( void ); - virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); - - // create management orb internals - static IOReturn staticCreateManagementORBAction( OSObject *self, - void * refCon, - void * completion, - void * orb, - void * ); - virtual IOReturn createManagementORBAction( void * refCon, - FWSBP2ManagementCallback completion, - IOFireWireSBP2ManagementORB ** orb ); - - // remove management orb internals - static IOReturn staticRemoveManagementORBAction( OSObject * self, void * orb, - void *, void *, void * ); - virtual IOReturn removeManagementORBAction( IOFireWireSBP2ManagementORB * orb ); - - // flush all management orb internals - static IOReturn staticExecuteFlushAllMgmtORBs( OSObject * self, void *, - void *, void *, void * ); - virtual IOReturn executeFlushAllMgmtORBs( void ); - - // IOFireWireSBP2ManagementORB friend class wrappers - virtual bool initMgmtORBWithLUN( IOFireWireSBP2ManagementORB * orb, IOFireWireSBP2LUN * lun, - void * refCon, - FWSBP2ManagementCallback completion ); - - // IOFireWireSBP2Login friend class wrappers - virtual bool initLoginWithLUN( IOFireWireSBP2Login * login, IOFireWireSBP2LUN * lun ); - virtual void suspendedNotify( void ); - virtual void resumeNotify( void ); - -private: - - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 0); - -public: - - //////////////////////////////////////////// - // client methods - - // getters - - /*! - @function getFireWireUnit - @abstract Returns an IOFireWireUnit object. - @discussion An IOFireWireUnit is the provider of an IOFireWireSBP2Target. In order to - use the base FireWire services you will need a reference to the unit. This method - returns that reference. - @result Returns a pointer to an IOFireWireUnit. - */ - - virtual IOFireWireUnit * getFireWireUnit( void ); - - /*! - @function getLUNumber - @abstract Returns the LUNs number. - @discussion Each LUN has a number to uniquely identify it on a device. This method returns - this value in a UInt32. - @result Returns a UInt32 containing the Logical Unit Number. - */ - - virtual UInt32 getLUNumber( void ); - - // factory methods - - /*! - @function createLogin - @abstract Creates a new IOFireWireSBP2Login object. - @discussion Creates a new IOFireWireSBP2Login object for the LUN. Login objects supply most - of the SBP2 APIs related to login maintenance and Normal Command ORB execution. - @result Returns a pointer to a new IOFireWireSBP2Login. - */ - - virtual IOFireWireSBP2Login *createLogin( void ); - - /*! - @function createManagementORB - @abstract Creates a new IOFireWireSBP2ManagementORB object. - @discussion Creates a new IOFireWireSBP2ManagementORB object. Management objects let you - execute commands like QueryLogins, LogicalUnitReset, and AbortTask. These commands are - configured after they are created here. When they are done executing (after a call to submit) - the supplied completion routine will be called with the supplied refcon. Usually this refCon - is the "this" pointer of completion method's object. - @param refCon The refcon passed to the completion routine. - @param completion The completion routine. Called when the ORB finishes execution. - @result Returns a pointer to a new IOFireWireSBP2Login. - */ - - virtual IOFireWireSBP2ManagementORB * createManagementORB( void * refCon, FWSBP2ManagementCallback completion ); - -protected: - - static IOReturn staticCreateLogin( OSObject *self, void * login, void *, void *, void * ); - virtual IOReturn createLoginAction( IOFireWireSBP2Login ** login ); - - static IOReturn staticRemoveLoginAction( OSObject *self, void * login, void *, void *, void * ); - virtual IOReturn removeLoginAction( IOFireWireSBP2Login * login ); - -public: - - /*! - @function getDiagnostics - @abstract Debug-only method. - @discussion Returns a reference to the internal diagnostics object when the services are built - in debug mode. Should be a no-op in release builds. - @result Returns a pointer to the diagnostics object (if any). - */ - - virtual OSObject * getDiagnostics( void ); - - virtual bool finalize( IOOptionBits options ); - -protected: - - void terminateNotify( void ); - -private: - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 1); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 2); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 3); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 4); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 5); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 6); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 7); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 8); - -}; - -#endif \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2Login.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2Login.h.svn-base deleted file mode 100644 index 42a838c..0000000 --- a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2Login.h.svn-base +++ /dev/null @@ -1,1078 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - @header IOFireWireSBP2Login - Contains the class definition for IOFireWireSBP2Login. -*/ - -#ifndef _IOKIT_IOFIREWIRESBP2LOGIN_H -#define _IOKIT_IOFIREWIRESBP2LOGIN_H - -#include <IOKit/IOCommandGate.h> - -#include <IOKit/firewire/IOFireWireUnit.h> - -#include <IOKit/sbp2/IOFireWireSBP2ORB.h> -#include <IOKit/sbp2/IOFireWireSBP2Target.h> - -// login option flags -enum -{ - kFWSBP2DontSynchronizeMgmtAgent = (1 << 0), - kFWSBP2ExclusiveLogin = (1 << 5) -}; - -// notification events -enum -{ - kFWSBP2NormalCommandStatus = 6, - kFWSBP2NormalCommandTimeout = 7, - kFWSBP2UnsolicitedStatus = 8, - kFWSBP2NormalCommandReset = 9 -}; - -#define kIOMessageFWSBP2ReconnectComplete iokit_fw_err(0x3E8) -#define kIOMessageFWSBP2ReconnectFailed iokit_fw_err(0x3E9) - -/*! - @typedef FWSBP2LoginResponse - @param length Length of login response. - @param loginID Unique id representing this login. - @param commandBlockAgentAddressHi High 32 bits of command block agent address. - @param commandBlockAgentAddressLo Low 32 bits of command block agent address. - @param reserved Reserved. - @param reconnectHold Reconnect timeout encoded as 2^reconnectHold seconds. -*/ - -typedef struct -{ - UInt16 length; - UInt16 loginID; - UInt32 commandBlockAgentAddressHi; - UInt32 commandBlockAgentAddressLo; - UInt16 reserved; - UInt16 reconnectHold; -} FWSBP2LoginResponse, *FWSBP2LoginResponsePtr; - -/*! - @typedef FWSBP2StatusBlock - @param details Src, Resp, D, Len fields of status block format - @param sbpStatus SBP2 specific status - @param orbOffsetHi High 32 bits of address of orb status is for. - @param orbOffsetLo Low 32 bits of address of orb status is for. - @param status[6] Up to 48 bytes of additional data. Length is determined by len field. -*/ - -typedef struct -{ - UInt8 details; - UInt8 sbpStatus; - UInt16 orbOffsetHi; - UInt32 orbOffsetLo; - UInt32 status[6]; -} FWSBP2StatusBlock; - -class IOFireWireSBP2LUN; -class IOFireWireSBP2Login; - -// struct sent to login complete handler - -/*! - @typedef FWSBP2LoginCompleteParams - @param login Pointer to IOFireWireSBP2Login object. - @param generation FireWire generation value. - @param status Status of login attempt. - @param loginResponse Pointer to login response struct. - @param statusBlock Pointer to status block buffer. - @param statusBlockLength Length of entire status block. -*/ - -typedef struct -{ - IOFireWireSBP2Login * login; // login object this param is sent from - UInt32 generation; // generation this login was attempted in - - IOReturn status; // status of login attempt - - FWSBP2LoginResponsePtr loginResponse; // pointer to loginResponse buffer - FWSBP2StatusBlock * statusBlock; // pointer to statusBlock buffer - UInt32 statusBlockLength; // size of statusBlock buffer - -} FWSBP2LoginCompleteParams, *FWSBP2LoginCompleteParamsPtr; - -// struct sent to logout complete handler - -/*! - @typedef FWSBP2LogoutCompleteParams - @param login Pointer to IOFireWireSBP2Login object. - @param generation FireWire generation value. - @param status Status of login attempt. - @param statusBlock Pointer to status block buffer. - @param statusBlockLength Length of entire status block. -*/ - -typedef struct -{ - IOFireWireSBP2Login * login; // login object this param is sent from - UInt32 generation; // generation this login was attempted in - - IOReturn status; // status of login attempt - - FWSBP2StatusBlock * statusBlock; // pointer to statusBlock buffer - UInt32 statusBlockLength; // size of statusBlock buffer - -} FWSBP2LogoutCompleteParams, *FWSBP2LogoutCompleteParamsPtr; - -// struct sent with reconnect notification - -/*! - @typedef FWSBP2LogoutCompleteParams - @param login Pointer to IOFireWireSBP2Login object. - @param generation FireWire generation value. - @param status Status of login attempt. - @param reconnectStatusBlock Pointer to status block buffer. - @param reconnectStatusBlockLength Length of entire status block. -*/ - -typedef struct -{ - IOFireWireSBP2Login * login; // login object this param is sent from - UInt32 generation; // generation this login was attempted in - - IOReturn status; // status of reconnect attempt - - void * reconnectStatusBlock; // pointer to statusBlock buffer - UInt32 reconnectStatusBlockLength; // size of statusBlock buffer -} FWSBP2ReconnectParams, *FWSBP2ReconnectParamsPtr; - -// Callback when login and logout commands complete asynchronously - -/*! - @typedef FWSBP2LoginCallback - @param refCon Reference constant supplied when the notification was registered. - @param params Structure containing additional information about the status of the login. -*/ - -typedef void (*FWSBP2LoginCallback)(void * refCon, FWSBP2LoginCompleteParamsPtr params); - -/*! - @typedef FWSBP2LogoutCallback - @param refCon Reference constant supplied when the notification was registered. - @param params Structure containing additional information about the status of the logout. -*/ - -typedef void (*FWSBP2LogoutCallback)(void * refCon, FWSBP2LogoutCompleteParamsPtr params); - -/*! - @typedef FWSBP2StatusCallback - @param refCon Reference constant supplied when the notification was registered. - @param status Indicates success or failure of operation. -*/ - -typedef void (*FWSBP2StatusCallback)(void * refCon, IOReturn status); - -/*! - @typedef FWSBP2FetchAgentWriteCallback - @param refCon Reference constant supplied when the notification was registered. - @param status Indicates success or failure of operation. - @param orb Indicates current last orb in chain. -*/ - -typedef void (*FWSBP2FetchAgentWriteCallback)(void * refCon, IOReturn status, IOFireWireSBP2ORB * orb); - -/*! - @typedef FWSBP2NotifyParams - @param notificationEvent Type of event we are being notified of. - @param message buffer containing message. - @param length length of message field. - @param generation FireWire generation value. -*/ - -typedef struct -{ - void * commandObject; - UInt32 notificationEvent; - const void * message; - UInt32 length; - UInt32 generation; -} FWSBP2NotifyParams, *FWSBP2NotifyParamsPtr; - - -/*! - @typedef FWSBP2NotifyCallback - @param refCon Reference constant supplied when the notification was registered. - @param params FWSBP2NotifyParams containing notification information. -*/ - -typedef void (*FWSBP2NotifyCallback)(void * refCon, FWSBP2NotifyParamsPtr params); - -/*! - @class IOFireWireSBP2Login - @abstract Supplies the login maintenance and Normal Command ORB execution portions of the API. - @discussion Supplies APIs for login maintenance and command execution. Drivers can use this - object to create IOFireWireSBP2ORB objects and execute them. Solicited and unsolicited status - callback routines can be registered and the SBP2 services will notify the driver when the - appropriate status arrives. - This class also handles login maintenance. Supplies APIs for logging in and logging out and - attempts to reconnect to the LUN after bus resets. The base FireWire services deliver bus - reset notification via the IOKit message routine. The SBP2 services build on this behavior - and deliver reconnectFailed and reconnectComplete through the message routine as well. -*/ - -class IOFireWireSBP2Login : public OSObject -{ - OSDeclareDefaultStructors( IOFireWireSBP2Login ) - - friend class IOFireWireSBP2ORB; - friend class IOFireWireSBP2LUN; - friend class IOFireWireSBP2UserClient; - -protected: - - // command selectors - enum - { - kLoginCommandIdle = 0, - kLoginCommandDoLogin = 1, - kLoginCommandDoLogout = 2, - kLoginAddORB = 3, - kLoginRemoveORB = 4, - kLoginFetchAgentReset = 5 - }; - - // internal login states - enum - { - kLoginStateIdle = 0, - kLoginStateLoggingIn = 1, - kLoginStateConnected = 2, - kLoginStateReconnect = 3, - kLoginStateLoggingOut = 4, - kLoginStateTerminated = 5 - }; - - // rom keys - enum - { - kUnitCharacteristicsKey = 0x3A, - kManagementAgentOffsetKey = 0x54 - }; - - // sbp2 defs - enum - { - kFWSBP2RequestComplete = 0, - kFWSBP2TransportFailure = 1, - kFWSBP2IllegalRequest = 2, - kFWSBP2VendorDependent = 3 - }; - - enum - { - kFWSBP2NoSense = 0, - kFWSBP2RequestTypeNotSupported = 1, - kFWSBP2SpeedNotSupported = 2, - kFWSBP2PageSizeNotSupported = 3, - kFWSBP2AccessDenied = 4, - kFWSBP2LogicalUnitNotSupported = 5, - kFWSBP2MaxPayloadTooSmall = 6, - kFWSBP2FunctionRejected = 9, - kFWSBP2LoginIDNotRecognized = 10, - kFWSBP2DummyORBCompleted = 11, - kFWSBP2RequestAborted = 12, - kFWSBP2UnspecifiedError = 0xFF - }; - - typedef struct - { - UInt32 password[2]; - UInt32 loginResponseAddressHi; - UInt32 loginResponseAddressLo; - UInt16 options; - UInt16 lun; - UInt16 passwordLength; - UInt16 loginResponseLength; - UInt32 statusFIFOAddressHi; - UInt32 statusFIFOAddressLo; - } FWSBP2LoginORB; - - typedef struct - { - UInt32 reserved1[4]; - UInt16 options; - UInt16 loginID; - UInt32 reserved2; - UInt32 statusFIFOAddressHi; - UInt32 statusFIFOAddressLo; - } FWSBP2ReconnectORB; - - typedef struct - { - UInt32 reserved1[4]; - UInt16 options; - UInt16 loginID; - UInt32 reserved2; - UInt32 statusFIFOAddressHi; - UInt32 statusFIFOAddressLo; - } FWSBP2LogoutORB; - -protected: - - /////////////////////////////////////////////////////////////////// - // private interface methods - - // IOFireWireSBP2LUN methods - virtual void clearAllTasksInSet( void ); - virtual bool initWithLUN( IOFireWireSBP2LUN * lun ); - virtual void suspendedNotify( void ); - virtual void resumeNotify( void ); - - // IOFireWireSBP2ORB methods - virtual IOFireWireUnit * getFireWireUnit( void ); - virtual IOFireWireSBP2LUN * getFireWireLUN( void ); - virtual bool isFetchAgentWriteInProgress( void ); - virtual bool isConnected( void ); - virtual IOReturn removeORB( IOFireWireSBP2ORB * orb ); - virtual IOReturn appendORBImmediate( IOFireWireSBP2ORB * orb ); - virtual IOReturn appendORB( IOFireWireSBP2ORB * orb ); - virtual void sendTimeoutNotification( IOFireWireSBP2ORB * orb ); - -protected: - - // reserved for future use - struct ExpansionData { }; - ExpansionData *reserved; - - IOFireWireSBP2LUN * fLUN; - IOFireWireUnit * fUnit; - IOFireWireController * fControl; - IOCommandGate * fGate; - - FWSBP2LoginCallback fLoginCompletionCallback; - void * fLoginCompletionRefCon; - - FWSBP2LogoutCallback fLogoutCompletionCallback; - void * fLogoutCompletionRefCon; - - FWSBP2NotifyCallback fStatusNotifyCallback; - void * fStatusNotifyRefCon; - - FWSBP2NotifyCallback fUnsolicitedStatusNotifyCallback; - void * fUnsolicitedStatusNotifyRefCon; - - UInt32 fLoginFlags; - UInt32 fReconnectTime; - - UInt32 fLoginState; - UInt32 fManagementOffset; - UInt32 fManagementTimeout; - UInt32 fMaxORBSize; - UInt32 fMaxCommandBlockSize; - UInt16 fLoginNodeID; - UInt32 fLoginGeneration; - UInt32 fLoginID; - UInt32 fReconnectHold; - UInt32 fMaxPayloadSize; - void * fRefCon; - - // resources - - FWSBP2LoginORB fLoginORB; - IOFWAddressSpace * fLoginORBAddressSpace; - FWAddress fLoginORBAddress; - - FWSBP2LoginResponse fLoginResponse; - IOFWAddressSpace * fLoginResponseAddressSpace; - FWAddress fLoginResponseAddress; - - FWSBP2ReconnectORB fReconnectORB; - IOFWAddressSpace * fReconnectORBAddressSpace; - FWAddress fReconnectORBAddress; - - FWSBP2StatusBlock fStatusBlock; - IOFWAddressSpace * fStatusBlockAddressSpace; - FWAddress fStatusBlockAddress; - - FWSBP2StatusBlock fReconnectStatusBlock; - IOFWAddressSpace * fReconnectStatusBlockAddressSpace; - FWAddress fReconnectStatusBlockAddress; - - FWSBP2LogoutORB fLogoutORB; - IOFWAddressSpace * fLogoutORBAddressSpace; - FWAddress fLogoutORBAddress; - bool fLogoutPending; - - IOFWWriteCommand * fLoginWriteCommand; - IOMemoryDescriptor * fLoginWriteCommandMemory; - bool fLoginWriteInProgress; - - IOFWWriteCommand * fReconnectWriteCommand; - IOMemoryDescriptor * fReconnectWriteCommandMemory; - bool fReconnectWriteInProgress; - bool fReconnectWriteInterrupted; - - IOFWWriteCommand * fLogoutWriteCommand; - IOMemoryDescriptor * fLogoutWriteCommandMemory; - bool fLogoutWriteInProgress; - - IOFWCommand * fLoginTimeoutCommand; - bool fLoginTimeoutTimerSet; - - IOFWDelayCommand * fReconnectTimeoutCommand; - bool fReconnectTimeoutTimerSet; - - IOFWCommand * fLogoutTimeoutCommand; - bool fLogoutTimeoutTimerSet; - - FWAddress fFetchAgentAddress; - IOMemoryDescriptor * fFetchAgentWriteCommandMemory; - FWAddress fLastORBAddress; - IOFireWireSBP2ORB * fLastORB; - IOFWWriteCommand * fFetchAgentWriteCommand; - bool fFetchAgentWriteCommandInUse; - FWSBP2FetchAgentWriteCallback fFetchAgentWriteCompletion; - void * fFetchAgentWriteRefCon; - IOFireWireSBP2ORB * fORBToWrite; - - OSSet * fORBSet; - OSIterator * fORBSetIterator; - - void * fPasswordBuf; - UInt32 fPasswordLen; - IOFWAddressSpace * fPasswordAddressSpace; - FWAddress fPasswordAddress; - IOMemoryDescriptor * fPasswordDescriptor; - - bool fSuspended; - - UInt32 fLoginRetryDelay; - UInt32 fLoginRetryCount; - UInt32 fLoginRetryMax; - IOFWDelayCommand * fLoginRetryTimeoutCommand; - bool fLoginRetryTimeoutTimerSet; - IOFireWireSBP2Target * fTarget; - - bool fUnsolicitedStatusEnableRequested; - - IOFWDelayCommand * fReconnectRetryTimeoutCommand; - bool fReconnectRetryTimeoutTimerSet; - - int fCriticalSectionCount; - - // init / destroy - virtual IOReturn getUnitInformation( void ); - virtual IOReturn allocateResources( void ); - virtual void free( void ); - - // orb add / remove - virtual IOReturn addORB( IOFireWireSBP2ORB * orb ); - static IOReturn staticExecuteAddORB( OSObject *self, void * orb, void *, void *, void * ); - virtual IOReturn executeAddORB( IOFireWireSBP2ORB * orb ); - - static IOReturn staticExecuteRemoveORB( OSObject *self, void * orb, void *, void *, void * ); - virtual IOReturn executeRemoveORB( IOFireWireSBP2ORB * orb ); - - // - // login - // - - static IOReturn staticExecuteLogin( OSObject *self, void *, void *, void *, void * ); - virtual IOReturn executeLogin( void ); - virtual void abortLogin( void ); - - // login write complete handler - static void loginWriteCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - virtual void loginWriteComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - - // login timeout handler - static void loginTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - virtual void loginTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - - // status block write handler - static UInt32 statusBlockWriteStatic(void *refcon, UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, - const void *buf, IOFWRequestRefCon lockRead); - virtual UInt32 statusBlockWrite( UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, const void *buf, IOFWRequestRefCon lockRead); - virtual void completeLogin( IOReturn state, const void *buf = NULL, UInt32 len = 0, void * buf2 = NULL ); - - // - // reconnect - // - - virtual void doReconnect( void ); - virtual void restartReconnect( void ); - virtual void startReconnectTimer( void ); - - // reconnect write complete handler - static void reconnectWriteCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - virtual void reconnectWriteComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - - // reconnect timeout handler - static void reconnectTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - virtual void reconnectTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - - // reconnect status block - static UInt32 reconnectStatusBlockWriteStatic(void *refcon, UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, - UInt32 len, const void *buf, IOFWRequestRefCon lockRead); - virtual UInt32 reconnectStatusBlockWrite( UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, - const void *buf, IOFWRequestRefCon lockRead); - - virtual void sendReconnectNotification( UInt32 event ); - virtual void sendReconnectNotificationWithStatusBlock( UInt32 event ); - - // - // logout - // - - static IOReturn staticExecuteLogout( OSObject *self, void *, void *, void *, void * ); - virtual IOReturn executeLogout( void ); - - // logout write complete handler - static void logoutWriteCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - virtual void logoutWriteComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - - // logout timeout handler - static void logoutTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - virtual void logoutTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - - virtual void completeLogout( IOReturn state, const void *buf = NULL, UInt32 len = 0); - - // fetch agent write complete handler - static void fetchAgentWriteCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - virtual void fetchAgentWriteComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - - // - // fetch agent - // - - bool fFetchAgentResetInProgress; - UInt32 fFetchAgentResetBuffer; - FWAddress fFetchAgentResetAddress; - IOFWWriteQuadCommand * fFetchAgentResetCommand; - void * fFetchAgentResetRefCon; - FWSBP2StatusCallback fFetchAgentResetCompletion; - - static IOReturn staticExecuteFetchAgentReset( OSObject *self, void *, void *, void *, void * ); - virtual IOReturn executeFetchAgentReset( void ); - static void fetchAgentResetCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - virtual void fetchAgentResetComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - - // - // doorbell - // - - bool fDoorbellInProgress; - bool fDoorbellRingAgain; - UInt32 fDoorbellBuffer; - FWAddress fDoorbellAddress; - IOFWWriteQuadCommand * fDoorbellCommand; - - static IOReturn staticExecuteDoorbell( OSObject *self, void *, void *, void *, void * ); - virtual IOReturn executeDoorbell( void ); - static void doorbellCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - virtual void doorbellComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - - // - // enable unsolicited satus - // - - bool fUnsolicitedStatusEnableInProgress; - UInt32 fUnsolicitedStatusEnableBuffer; - FWAddress fUnsolicitedStatusEnableAddress; - IOFWWriteQuadCommand * fUnsolicitedStatusEnableCommand; - - static IOReturn staticExecuteUnsolicitedStatusEnable( OSObject *self, void *, void *, void *, void * ); - virtual IOReturn executeUnsolicitedStatusEnable( void ); - static void unsolicitedStatusEnableCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - virtual void unsolicitedStatusEnableComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - - // - // busy timeout stuff - // - - bool fSetBusyTimeoutInProgress; - UInt32 fSetBusyTimeoutBuffer; - FWAddress fSetBusyTimeoutAddress; - IOFWWriteQuadCommand * fSetBusyTimeoutCommand; - - bool fInCriticalSection; - - UInt16 fLocalNodeID; - bool fFastStartSupported; - UInt32 fFastStartOffset; - UInt32 fFastStartMaxPayload; - - UInt32 fUserLoginGeneration; - bool fUserLoginGenerationSet; - - IOFWDelayCommand * fFetchAgentRetryTimerCommand; - bool fFetchAgentRetryTimerSet; - - virtual IOReturn executeSetBusyTimeout( void ); - static void setBusyTimeoutCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - virtual void setBusyTimeoutComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - -private: - // IOFireWireSBP2ORB friend class wrappers - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 0); - -protected: - virtual bool initORBWithLogin( IOFireWireSBP2ORB * orb, IOFireWireSBP2Login * login ); - virtual void setNextORBAddress( IOFireWireSBP2ORB * orb, FWAddress address ); - virtual void fetchAgentWriteComplete( IOFireWireSBP2ORB * orb, IOReturn status ); - virtual bool isORBTimerSet( IOFireWireSBP2ORB * orb ); - virtual void cancelORBTimer( IOFireWireSBP2ORB * orb ); - - // IOFireWireSBP2LUN friend class wrappers - virtual void removeLogin( void ); - virtual IOFireWireSBP2Target * getTarget( void ); - - UInt32 fARDMAMax; - bool fPhysicalAccessEnabled; - - bool fLoginStatusReceived; - FWSBP2StatusBlock fLoginStatusBlock; - UInt32 fLoginStatusBlockLen; - -private: - - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 1); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 2); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 3); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 4); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 5); - -public: - - ////////////////////////////// - - /*! - @function createORB - @abstract Creates a new IOFireWireSBP2ORB for this login. - @discussion Create a new IOFireWireSBP2ORB for this login. It can be configured - with it's accessors and executed with submitORB below. - @result Returns a pointer to the new ORB object. - */ - - virtual IOFireWireSBP2ORB * createORB( void ); - - /*! - @function submitORB - @abstract Submits the given orb - @discussion Starts execution of the given ORB. If the ORB is an immediate ORB it's - addresss is written to the fetch agent. If it is a non immediate orb its address - is appended to the last orb of the currently processing chain. The doorbell is not - rung automatically it must be run manually with the ringDoorbell command described below. - @param orb The orb to be executed. - @result Returns kIOReturnSuccess if the ORB has been started successfully. - */ - - virtual IOReturn submitORB( IOFireWireSBP2ORB * orb ); - - // set callbacks - - /*! - @function setStatusNotifyProc - @abstract Sets the callback to be called on normal command status. - @discussion The supplied callback is called when normal command status is recieved, when - a normal command times out, or when a normal command is aborted. - "notificationEvent" in the callback's params will indicate what happened. - It will be set to one of the following values: kFWSBP2NormalCommandReset, kFWSBP2NormalCommandStatus, - or kFWSBP2NormalCommandTimeout. If the event type is kFWSBP2NormalCommandTimeout and "len" is - non-zero then "message" contains the data written to the status block. - @param refCon refCon passed to callback. - @param callback address of callback method of type FWSBP2NotifyCallback. - */ - - virtual void setStatusNotifyProc( void * refCon, FWSBP2NotifyCallback callback ); - - /*! - @function getStatusNotifyProc - @abstract Returns the callback to be called on normal command status. - @discussion Returns the refCon and callback address of the status notify callback. - @param refCon output parameter returning the refCon to be passed to the callback. - @param callback output parameter returning the address of the callback. - */ - - virtual void getStatusNotifyProc( void ** refCon, FWSBP2NotifyCallback * callback ); - - /*! - @function setUnsolicitedStatusNotifyProc - @abstract Sets the callback to be called on normal command status. - @discussion The supplied callback is called when unsolicited status is recieved. - "notificationEvent" in the callback's params will indicate what happened. In this - case it will be set to kFWSBP2UnsolicitedStatus. If "len" is - non-zero then "message" contains the data written to the status block. Note: any buffers - returned by callbacks are only valid for the duration of the login and should not have - their contents modified. - @param refCon refCon passed to callback. - @param callback address of callback method of type FWSBP2NotifyCallback. - */ - - virtual void setUnsolicitedStatusNotifyProc( void * refCon, FWSBP2NotifyCallback callback ); - - /*! - @function getUnsolicitedStatusNotifyProc - @abstract Returns the callback to be called on unsolicited status. - @discussion Returns the refCon and callback address of the unsolicited status notify callback. - @param refCon output parameter returning the refCon to be passed to the callback. - @param callback output parameter returning the address of the callback. - */ - - virtual void getUnsolicitedStatusNotifyProc( void ** refCon, FWSBP2NotifyCallback * callback ); - - // command handling - - /*! - @function setLoginCompletion - @abstract Sets the callback to be called when a login attempt is complete. - @discussion The supplied callback is called when a login attempt has completed. "status" in the - callback's params should be checked to determine the success or failure of the login attempt. - If "statusBlock" is non-null then login status was written and it has been supplied here. If - the login attempt was successful then the login response will be supplied in the "loginResponse" - buffer. Note: all buffers supplied to callbacks are only valid for the duration of the callback. - Also, you are not to modify the contents of any supplied buffer. - @param refCon refCon passed to callback. - @param callback address of callback method of type FWSBP2LoginCallback. - */ - - virtual void setLoginCompletion( void * refCon, FWSBP2LoginCallback completion ); - - /*! - @function submitLogin - @abstract Attempts to login to the LUN. - @discussion This call begins the login process. The login object should be configured prior - to this call. If kIOReturnSuccess is returned from this call then the loginCompletion routine - will be called when the login completes (successfully or unsuccesfully). - @result Returns kIOReturnSuccess login has successlly begun. - */ - - virtual IOReturn submitLogin( void ); - - /*! - @function submitLogout - @abstract Attempts to logout of the LUN. - @discussion This call begins the logout process. If kIOReturnSuccess is returned from this call then - the logoutCompletion routine will be called when the logout completes (successfully or unsuccesfully). - @result Returns kIOReturnSuccess if logout has successfully begun. - */ - - virtual IOReturn submitLogout( void ); - - /*! - @function setLogoutCompletion - @abstract Sets the callback to be called when a logout attempt is complete. - @discussion The supplied callback is called when a logout attempt has completed. "status" in the - callback's params should be checked to determine the success or failure of the logout attempt. - If "statusBlock" is non-null then logout status was written and it has been supplied here. - Note: all buffers supplied to callbacks are only valid for the duration of the callback. - Also, you are not to modify the contents of any supplied buffer. - @param refCon refCon passed to callback. - @param callback address of callback method of type FWSBP2LogoutCallback. - */ - - virtual void setLogoutCompletion( void * refCon, FWSBP2LogoutCallback completion ); - - /*! - @function setFetchAgentWriteCompletion - @abstract Sets the callback to be called when the fetch agent write completes. - @discussion When an immediate orb is executed with submitORB, it's address is written to a - specific address on the device. This address is called the fetch agent. The device the - reads that orb from the Mac's memory and executes it. With this call you can register to - be called back when this write to the fetch agent completes. The SBP2 services guarantee - that the fetch agent write will be complete before status is reported for an ORB, so for - most drivers this notification is not required. - @param refCon refCon passed to callback. - @param callback address of callback method of type FWSBP2FetchAgentWriteCallback. - */ - - virtual void setFetchAgentWriteCompletion( void * refCon, FWSBP2FetchAgentWriteCallback completion ); - - /*! - @function setFetchAgentResetCompletion - @abstract Sets the callback to be called when a fetch agent reset completes. - @discussion The fetch agent state machine on the device can be reset by a write to a specific - register. The SBP2 services offer a utility method to reset the fetch agent. You can register - a callback routine here to be notified when this rest write completes. - @param refCon refCon passed to callback. - @param callback address of callback method of type FWSBP2FetchAgentWriteCallback. - */ - - virtual void setFetchAgentResetCompletion( void * refCon, FWSBP2StatusCallback completion ); - - /*! - @function submitFetchAgentReset - @abstract Resets the LUN's fetch agent. - @discussion The fetch agent state machine on the device can be reset by a write to a specific - register. This reset can be intiated by a call to this method. Notification of the completion - of this write can be had by registering a callback with the setFetchAgentResetCompletion method. - @result Returns kIOReturnSuccess if the reset started successfully. - */ - - virtual IOReturn submitFetchAgentReset( void ); - - /*! - @function ringDoorbell - @abstract Rings the doorbell on the LUN. - @discussion Non-immediate appends to the ORB chain may require the fetch agent state machine - to be notified of the new ORB's presence. This is accomplished by writing to the so called - doorbell register. This method begins one of those writes. - @result Returns kIOReturnSuccess if the ring started successfully. - */ - - virtual IOReturn ringDoorbell( void ); - - /*! - @function enableUnsolicitedStatus - @abstract Enables unsolicited status. - @discussion After unsolicited is sent the device will not send any additional unsolicited status - until a specific register is written. This serves as a sort of flow-control for unsolicited status. - After unsolicited status is recieved and processed drivers will want to reenable the delivery - of unsolicted status by a call to this method. - @result Returns kIOReturnSuccess if the status enable write started successfully. - */ - - virtual IOReturn enableUnsolicitedStatus( void ); - - // accessors - - /*! - @function getMaxCommandBlockSize - @abstract Returns the maximum command block size. - @discussion The device publishes an upper limit on the size of command block that it can - accept. That value can be accessed via this method. - @result Returns a UInt32 containing the maximum command block size. - */ - - virtual UInt32 getMaxCommandBlockSize( void ); - - /*! - @function getLoginID - @abstract Returns the current login ID. - @discussion When we successfully login to a device. The device gives us a unique login id. - This is used internally for reconnecting to the device after bus resets and for certain other - management ORBs. Most drivers are probably not interested in this value. - @result Returns a UInt32 containing the current login ID. - */ - - virtual UInt32 getLoginID( void ); - - /*! - @function setLoginFlags - @abstract Sets login configuration flags. - @discussion Configures the login behavior according to the provided flags. Currently two - flags are defined for this API. kFWSBP2ExclusiveLogin sets the exclusive login bit in the - login ORB. kFWSBP2DontSynchronizeMgmtAgent allows simultaneous logins or reconnects to LUNs - with a common management agent (ie LUNs in the same unit directory). - @param loginFlags the login configuration flags. - */ - - virtual void setLoginFlags( UInt32 loginFlags ); - - /*! - @function getLoginFlags - @abstract Returns the currently set login flags. - @discussion Returns the current state of the login flags. Currently there is only one - flag defined for this API. kFWSBP2ExclusiveLogin indicates that the exclusive login bit - should be set in the login ORB. - @result Returns a UInt32 containing the currently set login flags. - */ - - virtual UInt32 getLoginFlags( void ); - - /*! - @function setReconnectTime - @abstract Sets the desired reconnect duration. - @discussion The target and initiator arbitrate the duration of the reconnect timeout. Here - the initiator specifies its desired timeout time in 2^reconnectTime seconds. After a - successful login the device returns the actual timeout value it wishes to use. This value - may be less than the reconnect timeout that the intiator specified if this is all that the - device can support. - @param reconnectTime The desired reconnect timeout encoded as 2^reconnectTime seconds. - */ - - virtual void setReconnectTime( UInt32 reconnectTime ); - - /*! - @function getReconnectTime - @abstract Returns the currently set reconnect time. - @discussion Returns the currently desired initiator reconnect time encoded as 2^time seconds. - @result Returns a UInt32 containing the currently set reconnect time. - */ - - virtual UInt32 getReconnectTime( void ); - - /*! - @function setMaxPayloadSize - @abstract Sets the maximum data transfer length for a normal command ORB. - @discussion Sets the maximum data transfer length for a normal command ORB. This value is - the maximum for all ORBs sent to this LUN. This can be trimmed further on an ORB by ORB basis, - by a similar call in the IOFireWireSBP2ORB itself. - @param reconnectTime The desired maximum payload size in bytes. - */ - - virtual void setMaxPayloadSize( UInt32 maxPayloadSize ); - - /*! - @function getMaxPayloadSize - @abstract Returns the currently set maximum payload size. - @discussion Returns the currently global maximum payload size in bytes. - @result Returns a UInt32 containing the currently set maximum payload size. - */ - - virtual UInt32 getMaxPayloadSize( void ); - - /*! - @function setPassword - @abstract Sets the login password. - @discussion Sets the login password using a buffer and a length. An alternate version exists - that accepts an IOMemoryDescriptor. If the password length is 8 or less the password is copied - directly into the login orb. If the length is greater than 8 the buffer is referenced by address - in the login ORB. In this case the buffer is not copied and should remain allocated for the - duration of the login attempt. - @param buf a pointer to the password buffer. - @param len the length in bytes of the password buffer. - @result Returns kIOReturnSuccess on success. - */ - - virtual IOReturn setPassword( void * buf, UInt32 len ); - - /*! - @function setPassword - @abstract Sets the login password. - @discussion Sets the login password using an IOMemoryDescriptor. An alternate version exists - that accepts a buffer and a length. If the password length is 8 or less the password is copied - directly into the login orb. If the length is greater than 8 the buffer is referenced by address - in the login ORB. - @param memory an IOMemoryDescriptor referencing the password. - @result Returns kIOReturnSuccess on success. - */ - - virtual IOReturn setPassword( IOMemoryDescriptor * memory ); - - - /*! - @function setRefCon - @abstract Sets the login refCon. - @discussion Sets a user defined value on the login that can be retrieved later with the - method getRefCon. - @param refCon a user defined value. - */ - - virtual void setRefCon( void * refCon ); - - /*! - @function getRefCon - @abstract Returns the refCon set with setRefCon. - @discussion Returns the user defined value previously stored in the login with setRefCon. - @result Returns the previously stored user defined value. - */ - - virtual void * getRefCon( void ); - - /*! - @function setBusyTimeoutRegisterValue - @abstract Sets the value to be written to the BUSY_TIMEOUT register. - @discussion 1394-1995 defines a register known as the BUSY_TIMEOUT register. This register - controls the busy retry behavior of your device. The initial value for this register is - 0x00000000. Which means busied transactions will not be retried. Since most devices want - their transactions retired on busy acks, the SBP2 service automatically updates the - BUSY_TIMEOUT register with the value specified here whenever necessary. Most drivers should - set this value to 0x0000000f. - @param timeout desired value of the BUSY_TIMEOUT register. - */ - - virtual void setBusyTimeoutRegisterValue( UInt32 timeout ); - -protected: - - virtual void startORBTimer( IOFireWireSBP2ORB * orb ); - virtual void prepareORBForExecution( IOFireWireSBP2ORB * orb ); - - static IOReturn staticExecuteORB( OSObject *self, void * orb, void *, void *, void * ); - virtual IOReturn executeORB( IOFireWireSBP2ORB * orb ); - -public: - - /*! - @function release - @abstract Primary implementation of the release mechanism. - @discussion See OSObject.h for more information. When retainCount == when then call free(). - */ - - virtual void release() const; - - /*! - @function setLoginRetryCountAndDelayTime - @abstract Sets login retry behavior. - @discussion Sets login retry behavior. - @param retryCount number of times to retry logins - @param uSecs delay time in microseconds between login retries - */ - - virtual void setLoginRetryCountAndDelayTime( UInt32 retryCount, UInt32 uSecs ); - -protected: - virtual IOReturn initialExecuteLogin( void ); - virtual void startLoginRetryTimer( void ); - virtual void stopLoginRetryTimer( void ); - static void loginRetryTimeoutStatic( void *refcon, IOReturn status, - IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - virtual void loginRetryTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd); - - virtual void startReconnectRetryTimer( void ); - virtual void stopReconnectRetryTimer( void ); - static void reconnectRetryTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - virtual void reconnectRetryTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - - virtual bool isORBAppended( IOFireWireSBP2ORB * orb ); - virtual void setORBIsAppended( IOFireWireSBP2ORB * orb, bool state ); - -public: - virtual void setAddressLoForLoginORBAndResponse( UInt32 addressLoORB, UInt32 addresLoResponse ); - - virtual void setLoginGeneration( UInt32 generation ); - virtual void clearLoginGeneration( void ); - -protected: - void startFetchAgentRetryTimer( UInt32 duration ); - void stopFetchAgentRetryTimer( void ); - static void fetchAgentRetryTimerStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - void fetchAgentRetryTimer( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - - void terminateNotify( void ); - void processLoginWrite( void ); - -public: - - bool isPhysicalAccessEnabled( void ); - UInt32 getARDMMax( void ); - -private: - - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 6); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 7); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 8); - - }; - -#endif diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2ManagementORB.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2ManagementORB.h.svn-base deleted file mode 100644 index 9455383..0000000 --- a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2ManagementORB.h.svn-base +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - @header IOFireWireSBP2ManagementORB - Contains the class definition for IOFireWireSBP2ManagementORB. -*/ - -#ifndef _IOKIT_IOFIREWIRESBP2MANAGEMENTORB_H -#define _IOKIT_IOFIREWIRESBP2MANAGEMENTORB_H - -#include <IOKit/firewire/IOFWCommand.h> -#include <IOKit/firewire/IOFireWireUnit.h> - -#include <IOKit/IOUserClient.h> - -class IOFireWireSBP2LUN; -class IOFireWireSBP2ManagementORB; -class IOFireWireSBP2ORB; - -enum -{ - kFWSBP2QueryLogins = 1, - kFWSBP2AbortTask = 0xb, - kFWSBP2AbortTaskSet = 0xc, - kFWSBP2LogicalUnitReset = 0xe, - kFWSBP2TargetReset = 0xf -}; - -// Callback when management command completes asynchronously - -/*! - @typedef FWSBP2ManagementCallback - @param refCon Reference constant supplied when the notification was registered. - @param status Indicates success or failure of operation. - @param orb Indicates current orb status is for. -*/ - -typedef void (*FWSBP2ManagementCallback)(void * refCon, IOReturn status, IOFireWireSBP2ManagementORB * orb); - -/*! - @class IOFireWireSBP2ManagementORB - @abstract Supplies non login related management ORBs. Management ORBs can be executed independent - of a login, if necessary. Management ORBs are created using the IOFireWireSBP2LUN interface. -*/ - -class IOFireWireSBP2ManagementORB : public IOFWCommand -{ - OSDeclareDefaultStructors( IOFireWireSBP2ManagementORB ) - - friend class IOFireWireSBP2LUN; - friend class IOFireWireSBP2UserClient; - -protected: - - //////////////////////////////////////// - // rom keys - - enum - { - kUnitCharacteristicsKey = 0x3A, - kManagementAgentOffsetKey = 0x54 - }; - - //////////////////////////////////////// - // structs - - typedef struct - { - UInt32 orbOffsetHi; - UInt32 orbOffsetLo; - UInt32 reserved1[2]; - UInt16 options; - UInt16 loginID; - UInt32 reserved2; - UInt32 statusFIFOAddressHi; - UInt32 statusFIFOAddressLo; - } FWSBP2TaskManagementORB; - - typedef struct - { - UInt32 reserved1[2]; - UInt32 queryResponseAddressHi; - UInt32 queryResponseAddressLo; - UInt16 options; - UInt16 lun; - UInt16 reserved2; - UInt16 queryResponseLength; - UInt32 statusFIFOAddressHi; - UInt32 statusFIFOAddressLo; - } FWSBP2QueryLoginsORB; - - typedef struct - { - UInt8 details; - UInt8 sbpStatus; - UInt16 orbOffsetHi; - UInt32 orbOffsetLo; - UInt32 status[6]; - } FWSBP2StatusBlock; - -protected: - - //////////////////////////////////////// - // friend methods - - // IOFireWireSBP2LUN methods - virtual bool initWithLUN( IOFireWireSBP2LUN * lun, - void * refCon, - FWSBP2ManagementCallback completion ); - - // IOFireWireSBP2UserClient methods - virtual void setAsyncCallbackReference( void * asyncRef ); - virtual void getAsyncCallbackReference( void * asyncRef ); - -protected: - - // reserved for future use - struct ExpansionData - { - bool fInCriticalSection; - }; - ExpansionData * fExpansionData; - - IOFireWireSBP2LUN * fLUN; - IOFireWireUnit * fUnit; - - UInt32 fManagementOffset; - UInt32 fManagementTimeout; - UInt32 fFunction; - OSObject * fManageeCommand; - - // our orb - FWSBP2TaskManagementORB fManagementORB; - IOFWAddressSpace * fManagementORBAddressSpace; - FWAddress fManagementORBAddress; - - // command to write management agent - IOFWWriteCommand * fWriteCommand; - IOMemoryDescriptor * fWriteCommandMemory; - - // timeout - IOFWCommand * fTimeoutCommand; - bool fTimeoutTimerSet; - - // status block - FWSBP2StatusBlock fStatusBlock; - IOFWAddressSpace * fStatusBlockAddressSpace; - FWAddress fStatusBlockAddress; - - // response buffer - void * fResponseBuf; - UInt32 fResponseLen; - IOFWAddressSpace * fResponseAddressSpace; - FWAddress fResponseAddress; - - // competion routine - FWSBP2ManagementCallback fCompletionCallback; - void * fCompletionRefCon; - - // for user client - OSAsyncReference64 fCallbackAsyncRef; - - IOMemoryMap * fResponseMap; - - bool fCompleting; - - //////////////////////////////////////// - - // init / destroy - virtual IOReturn getUnitInformation( void ); - virtual IOReturn allocateResources( void ); - virtual void free( void ); - - // command execution - virtual IOReturn execute( void ); - virtual IOReturn complete( IOReturn state ); - - // write complete handler - static void writeCompleteStatic( void *refcon, - IOReturn status, - IOFireWireNub *device, - IOFWCommand *fwCmd ); - virtual void writeComplete( IOReturn status, - IOFireWireNub *device, - IOFWCommand *fwCmd ); - - // timeout handler - static void handleTimeoutStatic( void *refcon, - IOReturn status, - IOFireWireBus *bus, - IOFWBusCommand *fwCmd ); - virtual void handleTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - - // status block write handler - static UInt32 statusBlockWriteStatic( void *refcon, - UInt16 nodeID, - IOFWSpeed &speed, - FWAddress addr, - UInt32 len, - const void *buf, - IOFWRequestRefCon lockRead ); - virtual UInt32 statusBlockWrite( UInt16 nodeID, - FWAddress addr, - UInt32 len, - const void *buf, - IOFWRequestRefCon lockRead ); - - // IOFireWireSBP2LUN friend class wrappers - virtual void clearAllTasksInSet( void ); - virtual void removeManagementORB( IOFireWireSBP2ManagementORB * orb ); - -public: - - //////////////////////////////////////// - // client methods - - /*! - @function setCommandFunction - @abstract Sets the function of the management ORB. - @discussion Sets the the function of the management ORB. Legal values are kFWSBP2QueryLogins, - kFWSBP2AbortTask, kFWSBP2AbortTaskSet, kFWSBP2LogicalUnitReset, and kFWSBP2TargetReset. - @param function a value indicating the desired management function. - @result Returns kIOReturnSuccess if function was a legal function. - */ - - virtual IOReturn setCommandFunction( UInt32 function ); - - /*! - @function getCommandFunction - @abstract Returns the current function of the management ORB. - @discussion Returns the function of the management ORB. This is the same value that was - set with setCommandFunction. - @result Returns the function of the management ORB. - */ - - virtual UInt32 getCommandFunction( void ); - - /*! - @function setManageeCommand - @abstract Sets the command to be managed by the management ORB. - @discussion All management functions except kFWSBP2QueryLogins require a reference to an ORB of - some sort. kFWSBP2AbortTaskSet, kFWSBP2LogicalUnitReset, and kFWSBP2TargetReset require a - reference to the login ORB. kFWSBP2AbortTask requires a reference to the ORB to be aborted. - This method allows you to set the ORB to be managed. - @param command a reference to an IOFireWireSBP2Login or an IOFireWireSBP2ORB. - */ - - virtual void setManageeCommand( OSObject * command ); - - /*! - @function getCommandFunction - @abstract Returns the current managee command of the management ORB. - @discussion Returns the current managee command of the management ORB. This is the same value that was - set with setManageeCommand. - @result Returns the current managee command of the management ORB. - */ - - virtual OSObject* getManageeCommand( void ); - - /*! - @function setResponseBuffer - @abstract Sets the response buffer for the management ORB. - @discussion Sets the response buffer for the management ORB. kFWSBP2QueryLogins returns - a response to its query and needs to write it somewhere. This routine allows you to - specify the location. - @param desc memory descriptor for buffer. - @result Returns kIOReturnSuccess on a success. - */ - - virtual IOReturn setResponseBuffer( IOMemoryDescriptor * desc ); - - /*! - @function setResponseBuffer - @abstract Sets the response buffer for the management ORB. - @discussion Sets the response buffer for the management ORB. kFWSBP2QueryLogins returns - a response to its query and needs to write it somewhere. This routine allows you to - specify the location. - @param buf backing store for buffer - @param len length of buffer. - @result Returns kIOReturnSuccess on a success. - */ - - virtual IOReturn setResponseBuffer( void * buf, UInt32 len ); - - /*! - @function getResponseBuffer - @abstract Returns the response buffer for the management ORB. - @discussion Returns the response buffer set in setResponseBuffer above - @param desc memory descriptor for buffer. - @param buf output parameter for backing store for buffer - @param len output parameter for length of buffer. - */ - - virtual void getResponseBuffer( void ** buf, UInt32 * len ); - - /*! - @function release - @abstract Primary implementation of the release mechanism. - @discussion See OSObject.h for more information. - @param when When retainCount == when then call free(). - */ - - virtual void release() const; - -protected: - - virtual void setORBToDummy( IOFireWireSBP2ORB * orb ); - - virtual void suspendedNotify(); - -private: - - OSMetaClassDeclareReservedUsed(IOFireWireSBP2ManagementORB, 0); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 1); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 2); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 3); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 4); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 5); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 6); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 7); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 8); - -}; - -#endif \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2ORB.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2ORB.h.svn-base deleted file mode 100644 index 5c11593..0000000 --- a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2ORB.h.svn-base +++ /dev/null @@ -1,547 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - @header IOFireWireSBP2ORB - Contains the class definition for IOFireWireSBP2ORB. -*/ - -#ifndef _IOKIT_IOFIREWIRESBP2ORB_H -#define _IOKIT_IOFIREWIRESBP2ORB_H - -#include <IOKit/firewire/IOFireWireUnit.h> - -#include <IOKit/IOBufferMemoryDescriptor.h> -#include <IOKit/IOUserClient.h> -#include <IOKit/IODMACommand.h> - -enum -{ - kFWSBP2ConstraintForceDoubleBuffer = (1 << 0) -}; - -// login option flags -enum -{ - kFWSBP2CommandCompleteNotify = (1 << 0), - kFWSBP2CommandTransferDataFromTarget = (1 << 1), - kFWSBP2CommandImmediate = (1 << 2), - - kFWSBP2CommandNormalORB = (1 << 5), - kFWSBP2CommandReservedORB = (1 << 6), - kFWSBP2CommandVendorORB = (1 << 7), - kFWSBP2CommandDummyORB = (1 << 8), - kFWSBP2CommandCheckGeneration = (1 << 9), - - kFWSBP2CommandFixedSize = (1 << 10), - kFWSBP2CommandVirtualORBs = (1 << 11) // handy for debugging -}; - -enum -{ - kFWSBP2MaxPageClusterSize = 0xf000 -}; - -class IOFireWireSBP2ORB; -class IOFireWireSBP2LUN; -class IOFireWireSBP2Login; - -/*! - @class IOFireWireSBP2ORB - @abstract Represents an SBP2 normal command ORB. Supplies the APIs for configuring normal - command ORBs. This includes setting the command block and writing the page tables for I/O. - The ORBs are executed using the submitORB method in IOFireWireSBP2Login. -*/ - -class IOFireWireSBP2ORB : public IOCommand -{ - OSDeclareDefaultStructors( IOFireWireSBP2ORB ) - - friend class IOFireWireSBP2Login; - friend class IOFireWireSBP2ManagementORB; - -protected: - - typedef struct - { - UInt32 nextORBAddressHi; - UInt32 nextORBAddressLo; - UInt32 dataDescriptorHi; - UInt32 dataDescriptorLo; - UInt16 options; - UInt16 dataSize; - UInt32 commandBlock[1]; // will be variable sized - } FWSBP2ORB; - - typedef struct - { - UInt16 segmentLength; - UInt16 segmentBaseAddressHi; - UInt32 segmentBaseAddressLo; - } FWSBP2PTE; - -private: - - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 0); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 1); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 2); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 3); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 4); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 5); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 6); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 7); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 8); - -protected: - - virtual void deallocateBufferAddressSpace( void ); - virtual IOReturn allocateTimer( void ); - virtual void deallocateTimer( void ); - - /*! - @function deallocatePageTable - @abstract Frees up memory allocated for the page table. - @discussion Frees all memory associated with the page table. Undoes what allocatePageTable does. - Calling allocatePageTable again will automatically deallocate the existing page table before - allocating a new one, so this method is not used in most cases. - */ - - virtual void deallocatePageTable( void ); - -protected: - - // IOFireWireSBP2Login methods - virtual bool initWithLogin( IOFireWireSBP2Login * login ); - virtual void setNextORBAddress( FWAddress address ); - -public: - - /*! - @function allocatePageTable - @abstract Allocates memory for the page table. - @discussion Page table allocation is handle automatically by the ORB, except if the - kFWSBP2CommandFixedSize flags is set. In this case we will fail to write a page table if we - need more page table space than we have already. This method is exposed so these drivers - can preallocate as much page table as they need. This is useful if your driver is part of - the paging path and cannot allow allocations to occur. - @param entryCount number of entries of page table to be allocated. - */ - - virtual IOReturn allocatePageTable( UInt32 entryCount ); - -protected: - - virtual bool isTimerSet( void ); - virtual void cancelTimer( void ); - -protected: - - // reserved for future use - struct ExpansionData { }; - ExpansionData *reserved; - - IOFireWireSBP2Login * fLogin; - IOFireWireSBP2LUN * fLUN; - IOFireWireUnit * fUnit; - IOFireWireController * fControl; - IODMACommand * fDMACommand; - void * fUnused2; - - UInt32 fCommandFlags; - UInt32 fMaxPayloadSize; - UInt32 fTimeoutDuration; - UInt32 fGeneration; - UInt64 fRefCon; - - // - // orb - // - - IOMemoryDescriptor * fORBDescriptor; - FWSBP2ORB * fORBBuffer; - - FWAddress fORBPseudoAddress; - IOFWAddressSpace * fORBPseudoAddressSpace; - - IOFWAddressSpace * fORBPhysicalAddressSpace; - FWAddress fORBPhysicalAddress; - - // - // page table - // - - UInt32 fPageTableSize; - IOBufferMemoryDescriptor * fPageTableDescriptor; - - IOFWAddressSpace * fPageTablePhysicalAddressSpace; - FWAddress fPageTablePhysicalAddress; - UInt32 fPageTablePhysicalLength; - - IOFWAddressSpace * fPageTablePseudoAddressSpace; - FWAddress fPageTablePseudoAddress; - - // - // buffers - // - - IOFWAddressSpace * fBufferAddressSpace; - bool fBufferAddressSpaceAllocated; - IOMemoryDescriptor * fBufferDescriptor; - - // - // timer - // - - IOFWDelayCommand * fTimeoutCommand; - bool fTimeoutTimerSet; - - bool fInProgress; - bool fIsAppended; - - UInt32 fFetchAgentWriteRetries; - UInt32 fPTECount; - UInt32 fFetchAgentWriteRetryInterval; - - UInt32 fConstraintOptions; - - virtual IOReturn allocateResources( void ); - virtual void free( void ); - - // orb timeout handler - static void orbTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - virtual void orbTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - - // login friend class wrappers - virtual IOFireWireUnit * getFireWireUnit( void ); - virtual IOFireWireSBP2LUN * getFireWireLUN( void ); - virtual void deallocateORB( void ); - virtual IOReturn allocateORB( UInt32 orbSize ); - virtual IOReturn removeORB( IOFireWireSBP2ORB * orb ); - virtual void prepareORBForExecution( void ); - virtual void startTimer( void ); - virtual void sendTimeoutNotification( IOFireWireSBP2ORB * orb ); - -public: - - /*! - @function release - @abstract Primary implementation of the release mechanism. - @discussion See OSObject.h for more information. - @param when When retainCount == when then call free(). - */ - - virtual void release() const; - - /*! - @function getLogin - @abstract Gets the login associated with this ORB. - @discussion Returns the IOFireWireSBP2Login object associated with this ORB. - @result Returns a pointer to an IOFireWireSBP2Login. - */ - - virtual IOFireWireSBP2Login * getLogin( void ); - - /*! - @function setCommandBuffersAsRanges - @abstract Creates a page table from a list of ranges. - @discussion Creates a page table with the given parameters. Any addresses mapped by this method - must remain valid until setCommandBuffers is called again or releaseCommandBuffers is called. - The SBP2 services do not release references to the command buffers just because the command - has completed. - @param ranges An array of ranges representing the data to be transfered. - @param withCount The number of ranges in the ranges array. - @param withDirection An IODirection indicating the direction of data transfer. - @param withTask The task that these adressses reside in. - @param offset Offset in bytes into data to begin writing table at. - @param length Number of bytes of data to map from offset. - @result Returns KIOReturnSuccess if the page table was written successfully. - */ - - virtual IOReturn setCommandBuffersAsRanges( IOVirtualRange * ranges, - UInt32 withCount, - IODirection withDirection, - task_t withTask, - UInt32 offset = 0, - UInt32 length = 0 ); - /*! - @function setCommandBuffersAsRanges - @abstract Creates a page table from a list of ranges. - @discussion Creates a page table with the given parameters. Any addresses mapped by this method - must remain valid until setCommandBuffers is called again or releaseCommandBuffers is called. - The SBP2 services do not release references to the command buffers just because the command - has completed. - @param memoryDescriptor IOMemoryDescriptor describe ranges to be written to a page table. - @param offset Offset in bytes into data to begin writing table at. - @param length Number of bytes of data to map from offset. - @result Returns KIOReturnSuccess if the page table was written successfully. - */ - - virtual IOReturn setCommandBuffers( IOMemoryDescriptor * memoryDescriptor, UInt32 offset = 0, - UInt32 length = 0 ); - - - /*! - @function releaseCommandBuffers - @abstract Releases SBP2's reference to the command buffers. - @discussion When you create a page table with one of the variants of setCommandBuffers. - SBP2 holds on to a reference to the buffers until this method is called. This means that - if a command completed and you manipulated the memory descriptor or released the buffers - without calling this method you could leave FW in an inconsistent state. - @result Returns KIOReturnSuccess if the page table was cleared successfully. - */ - - virtual IOReturn releaseCommandBuffers( void ); - - /*! - @function setCommandBlock - @abstract Sets the command block portion of the ORB. - @discussion Copys the data provided in the buffer to the command block portion of the ORB. - @param buffer Pointer to buffer to copy command block from. - @param length Number of bytes of data to copy. - @result Returns KIOReturnSuccess if the command block was updated successfully. - */ - - virtual IOReturn setCommandBlock( void * buffer, UInt32 length ); - - /*! - @function setCommandBlock - @abstract Sets the command block portion of the ORB. - @discussion Copys the data provided in the buffer to the command block portion of the ORB. - @param memory IOMemoryDescriptor representing the command block buffer. - @result Returns KIOReturnSuccess if the command block was updated successfully. - */ - - virtual IOReturn setCommandBlock( IOMemoryDescriptor * memory ); - - /*! - @function getCommandBufferDescriptor - @abstract Returns the memory descriptor representing the command buffer. - @discussion Returns the IOMemoryDescriptor for the data mapped by setCommandBuffer variants. - Works for setCommandBuffersAsRanges too. - @result Returns memory descriptor representing mapped data buffers. - */ - - virtual IOMemoryDescriptor * getCommandBufferDescriptor( void ); - - // accessors - - /*! - @function setCommandFlags - @abstract Sets configuration flags for the ORB. - @discussion Sets the configuration flags for the ORB. These can be any of the following: - <p>kFWSBP2CommandCompleteNotify - Set the notify bit as specified in SBP2 standard. Set to receive completion/timeout notification on this ORB. You almost always want to set this.</p> - <p>kFWSBP2CommandTransferDataFromTarget - Transfer direction as specified in SBP2 standard. Set if data is to be written by the device into the host's memory.</p> - <p>kFWSBP2CommandImmediate - Immediate Append. ORB address will be written to fetch agent and not chained. It is only legal to have one immediate ORB in progress at a time.</p> - <p>kFWSBP2CommandNormalORB - ORB format 0 - Format specified by SBP2 standard. Set this for most ORBs.</p> - <p>kFWSBP2CommandReservedORB - ORB format 1 - Format reserved by SBP2 standard for future standardization.</p> - <p>kFWSBP2CommandVendorORB - ORB format 2 - Format specified by SBP2 standard for vendor dependent ORBs.</p> - <p>kFWSBP2CommandDummyORB - ORB format 3 - Format specified by SBP2 standard for dummy ORBs.</p> - <p>kFWSBP2CommandCheckGeneration - If set upon submitORB, the ORB will only be appended if generation set with setCommandGeneration() matches the current generation. Pretty much all SBP2 drivers need sophisticated logic to track login state, so this is generally not used. </p> - <p>kFWSBP2CommandFixedSize - Do not allocate more memory for page table if needed. If there is not enough space in the currently allocated page table, the setCommandBuffers call will fail. This is important to set if your device is the backing store, as we don't want to cause memory allocations on the paging path. </p> - <p>kFWSBP2CommandVirtualORBs - Normally ORBs are backed by physical address spaces. Setting this flag makes this ORB backed by a pseudo address space. This can make ORBs easier to see in a bus trace. Virtual ORBs will have an address in the form of ffcX.XXXX.0000.0000. Pseudo address space backed ORBs are slower, so you won't want to set for deployment builds.</p> - @param flags The flags to be set. - */ - - virtual void setCommandFlags( UInt32 flags ); - - /*! - @function getCommandFlags - @abstract Sets configuration flags for the ORB. - @discussion Returns the current configuration flags set on this ORB. - @result Return The current ORB flags. - */ - - virtual UInt32 getCommandFlags( void ); - - /*! - @function setMaxPayloadSize - @abstract Sets max payload size for the ORB. - @discussion This sets the maximum payload size for this ORB only. This size is clipped by - the global max payload size set in the login object. - @param maxPayloadSize The maximum payload size in bytes. - */ - - virtual void setMaxPayloadSize( UInt32 maxPayloadSize ); - - /*! - @function getMaxPayloadSize - @abstract Gets max payload size for the ORB. - @discussion This gets the maximum payload size for this ORB only. - @result Returns the maximum payload size in bytes. - */ - - virtual UInt32 getMaxPayloadSize( void ); - - /*! - @function setCommandTimeout - @abstract Sets the timeout of the ORB. - @discussion This sets the timeout for the ORB in milliseconds. Note that ORBs without timeouts - can be "lost." You will obviously not recieve timeout notification for timeouts of zero. But - perhaps less obviously you will not recieve orb reset notification, which is really a sort of - accelerated timeout notification for bus reset situations. - @param timeout The timeout duration in milliseconds. - */ - - virtual void setCommandTimeout( UInt32 timeout ); - - /*! - @function getCommandTimeout - @abstract Gets the timeout of the ORB. - @discussion This method gets the timeout for this ORB in milliseconds. - @result Returns the timeout for the orb in milliseconds. - */ - - virtual UInt32 getCommandTimeout( void ); - - - /*! - @function setCommandGeneration - @abstract Sets the command generation. - @discussion This sets the bus generation this ORB should be appended in. It is only meaningful - when combined with the kFWSBP2CommandCheckGeneration flags above. - @param gen The bus generation for command execution. - */ - - virtual void setCommandGeneration( UInt32 gen ); - - /*! - @function getCommandGeneration - @abstract Gets the command generation. - @discussion This gets the bus generation this ORB should be appended in. - @result Returns the bus generation for command execution. - */ - - virtual UInt32 getCommandGeneration( void ); - - /*! - @function setRefCon - @abstract Sets the ORB refCon. - @discussion Sets a user defined value on the ORB that can be retrieved later with the - method getRefCon. - @param refCon a user defined value. - */ - - virtual void setRefCon( void * refCon ); - - /*! - @function getRefCon - @abstract Returns the refCon set with setRefCon. - @discussion Returns the user defined value previously stored in the ORB with setRefCon. - @result Returns the previously stored user defined value. - */ - - virtual void * getRefCon( void ); - -protected: - - virtual void setToDummy( void ); - -public: - /*! - @function getORBAddress - @abstract Returns the FireWire address of this ORB. - @discussion Returns the FireWire bus address of this ORB. This is not the same as the Macintosh - address for the IOFireWireSBP2ORB. - @result Returns the FireWire address of this ORB. - */ - - virtual void getORBAddress( FWAddress * address ); - -protected: - - virtual bool isAppended( void ); - virtual void setIsAppended( bool state ); - virtual UInt32 getFetchAgentWriteRetries( void ); - virtual void setFetchAgentWriteRetries( UInt32 retries ); - - virtual void prepareFastStartPacket( IOBufferMemoryDescriptor * descriptor ); - - UInt32 getFetchAgentWriteRetryInterval( void ); - void setFetchAgentWriteRetryInterval( UInt32 interval ); - - IOReturn completeBufferAddressSpace( void ); - IOReturn prepareBufferAddressSpace( IOMemoryDescriptor * memoryDescriptor ); - -public: - - /*! - @function setBufferConstraints - @abstract Configures page table generation parameters - @discussion Sets the maximums size of any page table segment and the required alignemnt. Double buffering - may be used to satisfy these constraints. The only supported option is kFWSBP2ConstraintForceDoubleBuffer which - forces a page aligned double buffering of the entire descriptor. - @result May return an error if there is a problem allocating the underlying resources or if buffers are currently attached. - */ - - IOReturn setBufferConstraints( UInt64 maxSegmentSize, UInt32 alignment, UInt32 options = 0); - - - /*! - @function setCommandBuffersAsRanges64 - @abstract Creates a page table from a list of 64 bit ranges. - @discussion Creates a page table with the given parameters. Any addresses mapped by this method - must remain valid until setCommandBuffers is called again or releaseCommandBuffers is called. - The SBP2 services do not release references to the command buffers just because the command - has completed. This is a 64 bit compatible version of setCommandBuffersAsRanges. - @param ranges An array of ranges representing the data to be transfered. - @param withCount The number of ranges in the ranges array. - @param withDirection An IODirection indicating the direction of data transfer. - @param withTask The task that these adressses reside in. - @param offset Offset in bytes into data to begin writing table at. - @param length Number of bytes of data to map from offset. - @result Returns KIOReturnSuccess if the page table was written successfully. - */ - - IOReturn setCommandBuffersAsRanges64( IOAddressRange * ranges, - uint64_t withCount, - IODirection withDirection, - task_t withTask, - uint64_t offset = 0, - uint64_t length = 0); - - /*! - @function setRefCon64 - @abstract Sets the ORB refCon as a 64 bit value. - @discussion Sets a user defined value on the ORB that can be retrieved later with the - method getRefCon. - @param refCon a user defined value. - */ - - virtual void setRefCon64( UInt64 refCon ); - - /*! - @function getRefCon64 - @abstract Returns the 64 bit refCon set with setRefCon64. - @discussion Returns the user defined value previously stored in the ORB with setRefCon. - @result Returns the previously stored user defined value. - */ - - virtual UInt64 getRefCon64( void ); - -protected: - - UInt32 calculateTransferSizeLog( bool * clipping ); - - -}; - -#endif diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2Target.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2Target.h.svn-base deleted file mode 100644 index 4288ce9..0000000 --- a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2Target.h.svn-base +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - @header IOFireWireSBP2Target - Contains the class definition for IOFireWireSBP2Target. -*/ - -#ifndef _IOKIT_IOFIREWIRESBP2TARGET_H -#define _IOKIT_IOFIREWIRESBP2TARGET_H - -#include <IOKit/firewire/IOFireWireUnit.h> -#include <IOKit/IOService.h> - -enum -{ - kIOFWSBP2FailsOnAckBusy = (1 << 0), - kIOFWSBP2FailsOnBusResetsDuringIO = (1 << 1), - kIOFWSBP2DontUsePTPacketLimit = (1 << 2) -}; - -/*! - @class IOFireWireSBP2Target - @abstract Serves as bridge between IOFireWireUnit and IOFireWireLUN. - @discussion Matches against IOFireWireUnits supporting the SBP2 protocol. Creates IOFireWireSBP2LUN nubs for matching. Most drivers will match against an IOFireWireSBP2LUN, but matching against an IOFireWireSBP2Target is also supported. This can be useful in cases where a single driver wishes to - control all LUNs on a device. Support for this technique is minimal, however, and the driver will be - required to discover it's LUNs through the registry. -*/ - -class IOFireWireSBP2Target : public IOService -{ - OSDeclareDefaultStructors(IOFireWireSBP2Target); - -protected: - - ///////////////////////////////////////// - // rom keys - - enum - { - kCmdSpecIDKey = 0x38, - kCmdSetKey = 0x39, - kSoftwareRevKey = 0x3b, - kFirmwareRevKey = 0x3c, - kLUNKey = 0x14, - kLUNDirectoryKey = 0xd4, - kManagementAgentOffsetKey = 0x54, - kUnitCharacteristicsKey = 0x3A, - kRevisionKey = 0x21, - kFastStartKey = 0x3E - }; - - typedef struct - { - UInt32 cmdSpecID; - UInt32 cmdSet; - UInt32 vendorID; - UInt32 softwareRev; - UInt32 firmwareRev; - UInt32 lun; - UInt32 devType; - UInt32 unitCharacteristics; - UInt32 managementOffset; - UInt32 revision; - bool fastStartSupported; - UInt32 fastStart; - } LUNInfo; - - // reserved for future use - struct ExpansionData - { - bool fStarted; - OSArray * fPendingMgtAgentCommands ; - UInt32 fNumberPendingMgtAgentOrbs; - UInt32 fNumLUNs; - }; - ExpansionData * fExpansionData; - - ///////////////////////////////////////// - // private fields - - bool fOpenFromTarget; - UInt32 fOpenFromLUNCount; - IOFireWireUnit * fProviderUnit; - UInt32 fFlags; - - IOFireWireController * fControl; - - UInt32 fIOCriticalSectionCount; - - ///////////////////////////////////////// - // private internals - - virtual void free( void ); - virtual IOReturn message( UInt32 type, - IOService * provider, - void * argument = 0); - - virtual void scanForLUNs( void ); - IOReturn createLUN( LUNInfo * info ); - -public: - - ///////////////////////////////////////// - // public methods - - /*! @function handleOpen - @abstract Overrideable method to control the open / close behaviour of an IOService. - @discussion See IOService for discussion. - @param forClient Designates the client of the provider requesting the open. - @param options Options for the open, may be interpreted by the implementor of handleOpen. - @result Return true if the open was successful, false otherwise. */ - - virtual bool handleOpen( IOService * forClient, IOOptionBits options, void * arg ); - - /*! - @function handleClose - @abstract Overrideable method to control the open / close behaviour of an IOService. - @discussion See IOService for discussion. - @param forClient Designates the client of the provider requesting the close. - @param options Options for the close, may be interpreted by the implementor of handleOpen. - */ - - virtual void handleClose( IOService * forClient, IOOptionBits options ); - - /*! - @function handleIsOpen - @abstract Overrideable method to control the open / close behaviour of an IOService. - @discussion See IOService for discussion. - @param forClient If non-zero, isOpen returns the open state for that client. If zero is passed, isOpen returns the open state for all clients. - @result Returns true if the specific, or any, client has the IOService open. - */ - - virtual bool handleIsOpen( const IOService * forClient ) const; - - /*! - @function start - @abstract During an IOService instantiation, the start method is called when the IOService has been selected to run on the provider. - @discussion See IOService for discussion. - @result Return true if the start was successful, false otherwise (which will cause the instance to be detached and usually freed). - */ - - virtual bool start( IOService *provider ); - - /*! - @function stop - @abstract During an IOService termination, the stop method is called in its clients before they are detached & it is destroyed. - @discussion See IOService for discussion. - */ - - virtual void stop( IOService *provider ); - - /*! - @function getFireWireUnit - @abstract Returns an IOFireWireUnit object. - @discussion An IOFireWireUnit is the provider of an IOFireWireSBP2Target. In order to use the base FireWire services - you will need a reference to the unit. This method returns that reference. - @result Returns a pointer to an IOFireWireUnit. - */ - - virtual IOFireWireUnit * getFireWireUnit( void ); - - /*! - @function matchPropertyTable - @abstract Implements SBP2 specific matching. - @discussion See IOService for discussion. - @param table The dictionary of properties to be matched against. - @result Returns false if the family considers the matching dictionary does not match in properties it understands, true otherwise. - */ - - virtual bool matchPropertyTable( OSDictionary * table ); - - virtual void setTargetFlags( UInt32 flags ); - virtual UInt32 getTargetFlags( void ); - -protected: - virtual void configurePhysicalFilter( void ); - -public: - virtual void clearTargetFlags( UInt32 flags ); - virtual IOReturn beginIOCriticalSection( void ); - virtual void endIOCriticalSection( void ); - - virtual bool finalize( IOOptionBits options ); - - IOReturn synchMgmtAgentAccess( IOFWCommand * mgmtOrbCommand ); - void completeMgmtAgentAccess( ); - void clearMgmtAgentAccess( ); - void cancelMgmtAgentAccess( IOFWCommand * mgmtOrbCommand ); - -protected: - - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 0); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 1); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 2); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 3); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 4); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 5); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 6); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 7); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 8); - -}; - -#endif diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2UserClient.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2UserClient.h.svn-base deleted file mode 100644 index 939dbf0..0000000 --- a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2UserClient.h.svn-base +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOFIREWIRESBP2USERCLIENT_H -#define _IOKIT_IOFIREWIRESBP2USERCLIENT_H - -#include <IOKit/IOUserClient.h> - -#define FIREWIREPRIVATE -#include <IOKit/firewire/IOFireWireController.h> -#undef FIREWIREPRIVATE - -#include <IOKit/firewire/IOFWUserObjectExporter.h> - -#include <IOKit/sbp2/IOFireWireSBP2UserClientCommon.h> -#include <IOKit/sbp2/IOFireWireSBP2LUN.h> - -class IOFireWireSBP2UserClient : public IOUserClient -{ - OSDeclareDefaultStructors(IOFireWireSBP2UserClient) - -protected: - - bool fOpened; - bool fStarted; - IOFireWireSBP2Login * fLogin; - task_t fTask; - - IOFireWireSBP2LUN * fProviderLUN; - OSAsyncReference64 fMessageCallbackAsyncRef; - OSAsyncReference64 fLoginCallbackAsyncRef; - OSAsyncReference64 fLogoutCallbackAsyncRef; - OSAsyncReference64 fUnsolicitedStatusNotifyAsyncRef; - OSAsyncReference64 fStatusNotifyAsyncRef; - OSAsyncReference64 fFetchAgentResetAsyncRef; - OSAsyncReference64 fFetchAgentWriteAsyncRef; - - IOFWUserObjectExporter * fExporter; - - IOFireWireLib::UserObjectHandle fSessionRef; - - virtual IOReturn externalMethod( uint32_t selector, - IOExternalMethodArguments * args, - IOExternalMethodDispatch * dispatch, - OSObject * target, - void * reference ); -public: - - virtual bool initWithTask( task_t owningTask, void * securityToken, UInt32 type, OSDictionary * properties ); - virtual void free (); - - virtual bool start( IOService * provider ); - - virtual IOReturn clientClose( void ); - virtual IOReturn clientDied( void ); - - // IOFireWireSBP2ManagementORB friend class wrappers - virtual void flushAllManagementORBs( void ); - - ///////////////////////////////////////////////// - // IOFireWireSBP2LUN - - IOReturn open( IOExternalMethodArguments * arguments ); - IOReturn openWithSessionRef( IOExternalMethodArguments * arguments ); - IOReturn getSessionRef( IOExternalMethodArguments * arguments ); - IOReturn close( IOExternalMethodArguments * arguments ); - - // callbacks - IOReturn setMessageCallback( IOExternalMethodArguments * arguments ); - virtual IOReturn message( UInt32 type, IOService * provider, void * arg ); - - ///////////////////////////////////////////////// - // IOFireWireSBP2Login - - IOReturn setLoginCallback( IOExternalMethodArguments * arguments ); - IOReturn setLogoutCallback( IOExternalMethodArguments * arguments ); - IOReturn setUnsolicitedStatusNotify( IOExternalMethodArguments * arguments ); - IOReturn setStatusNotify( IOExternalMethodArguments * arguments ); - IOReturn createLogin( IOExternalMethodArguments * arguments ); - IOReturn releaseLogin( IOExternalMethodArguments * arguments ); - IOReturn submitLogin( IOExternalMethodArguments * arguments ); - IOReturn submitLogout( IOExternalMethodArguments * arguments ); - IOReturn setLoginFlags( IOExternalMethodArguments * arguments ); - IOReturn getMaxCommandBlockSize( IOExternalMethodArguments * arguments ); - IOReturn getLoginID( IOExternalMethodArguments * arguments ); - IOReturn setReconnectTime( IOExternalMethodArguments * arguments ); - IOReturn setMaxPayloadSize( IOExternalMethodArguments * arguments ); - - IOReturn submitFetchAgentReset( IOExternalMethodArguments * arguments ); - IOReturn setFetchAgentWriteCompletion( IOExternalMethodArguments * arguments ); - IOReturn ringDoorbell( IOExternalMethodArguments * arguments ); - IOReturn enableUnsolicitedStatus( IOExternalMethodArguments * arguments ); - IOReturn setBusyTimeoutRegisterValue( IOExternalMethodArguments * arguments ); - IOReturn setPassword( IOExternalMethodArguments * arguments ); - - // callbacks - - static void staticLoginCallback( void * refCon, FWSBP2LoginCompleteParamsPtr params ); - virtual void loginCallback( FWSBP2LoginCompleteParamsPtr params ); - - static void staticLogoutCallback( void * refCon, FWSBP2LogoutCompleteParamsPtr params ); - virtual void logoutCallback( FWSBP2LogoutCompleteParamsPtr params ); - - static void staticStatusNotify( void * refCon, FWSBP2NotifyParams * params ); - virtual void statusNotify( FWSBP2NotifyParams * params ); - - static void staticUnsolicitedNotify( void * refCon, FWSBP2NotifyParams * params ); - virtual void unsolicitedNotify( FWSBP2NotifyParams * params ); - - static void staticFetchAgentWriteComplete( void * refCon, IOReturn status, IOFireWireSBP2ORB * orb ); - virtual void fetchAgentWriteComplete( IOReturn status, IOFireWireSBP2ORB * orb ); - - static void staticFetchAgentResetComplete( void * refCon, IOReturn status ); - virtual void fetchAgentResetComplete( IOReturn status ); - - ///////////////////////////////////////////////// - // IOFireWireSBP2ORB - - IOReturn createORB( IOExternalMethodArguments * arguments ); - IOReturn releaseORB( IOExternalMethodArguments * arguments ); - IOReturn submitORB( IOExternalMethodArguments * arguments ); - IOReturn setCommandFlags( IOExternalMethodArguments * arguments ); - IOReturn setORBRefCon( IOExternalMethodArguments * arguments ); - IOReturn setMaxORBPayloadSize( IOExternalMethodArguments * arguments ); - IOReturn setCommandTimeout( IOExternalMethodArguments * arguments ); - IOReturn setCommandGeneration( IOExternalMethodArguments * arguments ); - IOReturn setToDummy( IOExternalMethodArguments * arguments ); - IOReturn setCommandBuffersAsRanges( IOExternalMethodArguments * arguments ); - IOReturn releaseCommandBuffers( IOExternalMethodArguments * arguments ); - IOReturn setCommandBlock( IOExternalMethodArguments * arguments ); - - // LSI workaround - IOReturn LSIWorkaroundSetCommandBuffersAsRanges( IOExternalMethodArguments * arguments ); - IOReturn LSIWorkaroundSyncBuffersForOutput( IOExternalMethodArguments * arguments ); - IOReturn LSIWorkaroundSyncBuffersForInput( IOExternalMethodArguments * arguments ); - - ///////////////////////////////////////////////// - // IOFireWireSBP2MgmtORB - - IOReturn createMgmtORB( IOExternalMethodArguments * arguments ); - IOReturn releaseMgmtORB( IOExternalMethodArguments * arguments ); - IOReturn setMgmtORBCallback( IOExternalMethodArguments * arguments ); - IOReturn submitMgmtORB( IOExternalMethodArguments * arguments ); - IOReturn setMgmtORBCommandFunction( IOExternalMethodArguments * arguments ); - IOReturn setMgmtORBManageeORB( IOExternalMethodArguments * arguments ); - IOReturn setMgmtORBManageeLogin( IOExternalMethodArguments * arguments ); - IOReturn setMgmtORBResponseBuffer( IOExternalMethodArguments * arguments ); - - // callbacks - static void staticMgmtORBCallback( void * refCon, IOReturn status, IOFireWireSBP2ManagementORB * orb ); - virtual void mgmtORBCallback( IOReturn status, IOFireWireSBP2ManagementORB * orb ); - - // IOFireWireSBP2MgmtORB friend class wrappers - virtual void setMgmtORBAsyncCallbackReference( IOFireWireSBP2ManagementORB * orb, void * asyncRef ); - virtual void getMgmtORBAsyncCallbackReference( IOFireWireSBP2ManagementORB * orb, void * asyncRef ); - - uint32_t checkScalarInputCount; - uint32_t checkStructureInputSize; - uint32_t checkScalarOutputCount; - uint32_t checkStructureOutputSize; - - IOReturn checkArguments( IOExternalMethodArguments * args, uint32_t scalarInCount, uint32_t structInCount, - uint32_t scalarOutCount, uint32_t structOutCount ); - -}; - -#endif \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2UserClientCommon.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2UserClientCommon.h.svn-base deleted file mode 100644 index cb114ba..0000000 --- a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSBP2UserClientCommon.h.svn-base +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOFIREWIRESBP2USERCLIENTCOMMON_H_ -#define _IOKIT_IOFIREWIRESBP2USERCLIENTCOMMON_H_ - -#define kIOFireWireSBP2LibConnection 12 - -enum IOFWSBP2UserClientCommandCodes { - kIOFWSBP2UserClientOpen, // kIOUCScalarIScalarO 0,0 - kIOFWSBP2UserClientClose, // kIOUCScalarIScalarO 0,0 - kIOFWSBP2UserClientCreateLogin, // kIOUCScalarIScalarO 0,1 - kIOFWSBP2UserClientReleaseLogin, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSubmitLogin, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSubmitLogout, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSetLoginFlags, // kIOUCScalarIScalarO 2,0 - kIOFWSBP2UserClientGetMaxCommandBlockSize, // kIOUCScalarIScalarO 1,1 - kIOFWSBP2UserClientGetLoginID, // kIOUCScalarIScalarO 1,1 - kIOFWSBP2UserClientSetReconnectTime, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSetMaxPayloadSize, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientCreateORB, // kIOUCScalarIScalarO 0,1 - kIOFWSBP2UserClientReleaseORB, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSubmitORB, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSetCommandFlags, // kIOUCScalarIScalarO 2,0 - kIOFWSBP2UserClientSetMaxORBPayloadSize, // kIOUCScalarIScalarO 2,0 - kIOFWSBP2UserClientSetCommandTimeout, // kIOUCScalarIScalarO 2,0 - kIOFWSBP2UserClientSetCommandGeneration, // kIOUCScalarIScalarO 2,0 - kIOFWSBP2UserClientSetToDummy, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSetCommandBuffersAsRanges, // kIOUCScalarIScalarO 6,0 - kIOFWSBP2UserClientReleaseCommandBuffers, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSetCommandBlock, // kIOUCScalarIScalarO 3,0 - kIOFWSBP2UserClientCreateMgmtORB, // kIOUCScalarIScalarO 0,1 - kIOFWSBP2UserClientReleaseMgmtORB, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSubmitMgmtORB, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientMgmtORBSetCommandFunction, // kIOUCScalarIScalarO 2,0 - kIOFWSBP2UserClientMgmtORBSetManageeORB, // kIOUCScalarIScalarO 2,0 - kIOFWSBP2UserClientMgmtORBSetManageeLogin, // kIOUCScalarIScalarO 2,0 - kIOFWSBP2UserClientMgmtORBSetResponseBuffer, // kIOUCScalarIScalarO 3,0 - kIOFWSBP2UserClientLSIWorkaroundSetCommandBuffersAsRanges, // kIOUCScalarIScalarO 6,0 - kIOFWSBP2UserClientMgmtORBLSIWorkaroundSyncBuffersForOutput, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientMgmtORBLSIWorkaroundSyncBuffersForInput, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientOpenWithSessionRef, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientGetSessionRef, // kIOUCScalarIScalarO 0,1 - kIOFWSBP2UserClientRingDoorbell, // kIOUCScalarIScalarO 1, 0 - kIOFWSBP2UserClientEnableUnsolicitedStatus, // kIOUCScalarIScalarO 1, 0 - kIOFWSBP2UserClientSetBusyTimeoutRegisterValue, // kIOUCScalarIScalarO 2, 0 - kIOFWSBP2UserClientSetORBRefCon, // kIOUCScalarIScalarO 2, 0 - kIOFWSBP2UserClientSetPassword, // kIOUCScalarIScalarO 3, 0 - kIOFWSBP2UserClientSetMessageCallback, // kIOUCScalarIScalarO 2, 0 - kIOFWSBP2UserClientSetLoginCallback, // kIOUCScalarIScalarO 2, 0 - kIOFWSBP2UserClientSetLogoutCallback, // kIOUCScalarIScalarO 2, 0 - kIOFWSBP2UserClientSetUnsolicitedStatusNotify, // kIOUCScalarIScalarO 2, 0 - kIOFWSBP2UserClientSetStatusNotify, // kIOUCScalarIScalarO 2, 0 - kIOFWSBP2UserClientSetMgmtORBCallback, // kIOUCScalarIScalarO 3, 0 - kIOFWSBP2UserClientSubmitFetchAgentReset, // kIOUCScalarIScalarO 3, 0 - kIOFWSBP2UserClientSetFetchAgentWriteCompletion, // kIOUCScalarIScalaO 2, 0 - kIOFWSBP2UserClientNumCommands -}; - -#endif \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSerialBusProtocolTransport.h.svn-base b/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSerialBusProtocolTransport.h.svn-base deleted file mode 100644 index 53e6195..0000000 --- a/i386/include/IOKit/sbp2/.svn/text-base/IOFireWireSerialBusProtocolTransport.h.svn-base +++ /dev/null @@ -1,449 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -/*! - @header IOFireWireSerialBusProtocolTransport - Contains the class definition for IOFireWireSerialBusProtocolTransport. -*/ - - -#ifndef _IOKIT_IO_FIREWIRE_SERIAL_BUS_PROTOCOL_TRANSPORT_H_ -#define _IOKIT_IO_FIREWIRE_SERIAL_BUS_PROTOCOL_TRANSPORT_H_ - - -#include <IOKit/IOBufferMemoryDescriptor.h> -#include <IOKit/IOLib.h> -#include <IOKit/IOMessage.h> -#include <IOKit/IOService.h> -#include <IOKit/IOCommandPool.h> -#include <IOKit/firewire/IOFireWireUnit.h> -#include <IOKit/sbp2/IOFireWireSBP2LUN.h> - -#include <IOKit/scsi/IOSCSIProtocolServices.h> - -/*! - @class IOFireWireSerialBusProtocolTransport - @abstract SCSI Protocol Driver Family for FireWire SBP2 Devices. - @discussion IOFireWireSerialBusProtocolTransport contains all the bus specific support for FireWire - SBP2 compliant devices. To add vendor specific features or workarounds you will sub-class the appropriate - methods of this family. -*/ - -class IOFireWireSerialBusProtocolTransport : public IOSCSIProtocolServices -{ - - OSDeclareDefaultStructors ( IOFireWireSerialBusProtocolTransport ) - -private: - - IOFireWireUnit * fUnit; - IOFireWireSBP2LUN * fSBPTarget; - IOFireWireSBP2Login * fLogin; - IOFireWireSBP2ORB * fORB; - IOFireWireSBP2ManagementORB * fLUNResetORB; - - // /!\ WARNING! NOT USED left behind for legacy binary reasons - IOSimpleLock * fQueueLock; - - UInt32 fLoginRetryCount; - bool fDeferRegisterService; - bool fNeedLogin; - - // /!\ WARNING! NOT USED left behind for legacy binary reasons - bool fPhysicallyConnected; - - static void - StatusNotifyStatic ( void * refCon, FWSBP2NotifyParamsPtr params ); - - static void - UnsolicitedStatusNotifyStatic ( void * refCon, - FWSBP2NotifyParamsPtr params ); - - static void - LunResetCompleteStatic ( void * refCon, - IOReturn status, - IOFireWireSBP2ManagementORB * orb ); - - static void - FetchAgentResetCompleteStatic ( void * refcon, - IOReturn status ); - - static IOReturn - ConnectToDeviceStatic ( OSObject * refCon, void *, void *, void *, void * ); - - virtual void - FetchAgentResetComplete ( IOReturn status ); - - static void LoginCompletionStatic ( void * refCon, FWSBP2LoginCompleteParams * params ); - - static void - LogoutCompletionStatic ( void * refCon, FWSBP2LogoutCompleteParams * params ); - - /*! - @function CoalesceSenseData - @abstract CoalesceSenseData convert a SBP-2 status block into a SPC-2 sense block. - @discussion CoalesceSenseData pulls the appropriate bits out of the SBP2 sense block - as defined in SBP-2 Annex B section B.2 and dynamically builds a sense data block as - defined in SPC-2 section 7.23.2. - */ - - SCSITaskStatus - CoalesceSenseData ( FWSBP2StatusBlock * sourceData, - UInt8 quadletCount, - SCSI_Sense_Data * targetData ); - - virtual void ConnectToDevice ( void ); - - virtual void DisconnectFromDevice ( void ); - - virtual bool IsDeviceCPUInDiskMode ( void ); - -protected: - - /*! - @function AllocateResources - @abstract Allocate Resources. - @discussion Called from start method to allocate needed resources. - */ - - virtual IOReturn AllocateResources ( void ); - - /*! - @function DeallocateResources - @abstract Deallocate Resources. - @discussion Called from cleanUp method to deallocate resources. - */ - - virtual void DeallocateResources ( void ); - - enum SBP2LoginState - { - kFirstTimeLoggingInState, - kLogginSucceededState, - kLogginFailedState - }; - - /*! - @typedef SBP2ClientOrbData - @param orb IOFireWireSBP2ORB for request. - @param scsiTask SCSITaskIdentifier of request. - @param serviceResponse SCSIServiceResponse of request. - @param taskStatus SCSITaskStatus of request. - @discussion This structure is stuffed into the refcon so we can associate which - IOFireWireSBP2ORB and SCSITaskIdentifier is completing. - */ - - typedef struct { - IOFireWireSBP2ORB * orb; - SCSITaskIdentifier scsiTask; - SCSIServiceResponse serviceResponse; - SCSITaskStatus taskStatus; - IOBufferMemoryDescriptor * quadletAlignedBuffer; - } SBP2ClientOrbData; - - static const UInt32 kDefaultBusyTimeoutValue = 0x0000000F; - static const UInt64 kMaxFireWireLUN = 0xFFFF; - static const UInt32 kMaxFireWirePayload = 4096; - static const UInt32 kMaxLoginRetryCount = 8; - static const UInt32 kMaxReconnectCount = 128; - static const UInt32 kCSRModelInfoKey = 0x17; - - UInt32 fReconnectCount; - bool fLoggedIn; - - // binary compatibility instance variable expansion - struct ExpansionData - { - IOCommandPool * fCommandPool; - IOCommandPool * fSubmitQueue; - SBP2LoginState fLoginState; - bool fLUNResetPathFlag; - int fLUNResetCount; - bool fAlwaysSetSenseData; - bool fAutonomousSpinDownWorkAround; - }; - - ExpansionData * reserved; - - bool fObjectIsOpen; - - /*! - @function CommandORBAccessor - @abstract accessor function for fORB. - @discussion xxx. - */ - - IOFireWireSBP2ORB * CommandORBAccessor ( void ); - - /*! - @function SBP2LoginAccessor - @abstract accessor function for fLogin. - @discussion xxx. - */ - - IOFireWireSBP2Login * SBP2LoginAccessor ( void ); - - virtual IOReturn - message ( UInt32 type, IOService * provider, void * argument = 0 ); - - /*! - @function SendSCSICommand - @abstract Prepare and send a SCSI command to the device. - @discussion The incoming SCSITaskIdentifier gets turned into a IOFireWireSBP2ORB - and is submitted to the SBP2 layer. See IOSCSIProtocolServices.h for more details - regarding SendSCSICommand. Also see IOFireWireSBP2Lib.h for details regarding the - IOFireWireSBP2ORB structure and the submitORB method. - @result If the command was sent to the device and is pending completion, the - subclass should return true and return back the kSCSIServiceResponse_Request_In_Process response. - If the command completes immediately with an error, the subclass will return true - and return back the appropriate status. If the subclass is currently processing all the - commands it can, the subclass will return false and the command will be resent next time - CommandCompleted is called. - */ - - virtual bool - SendSCSICommand ( SCSITaskIdentifier request, - SCSIServiceResponse * serviceResponse, - SCSITaskStatus * taskStatus ); - - /*! - @function SetCommandBuffers - @abstract Method to set orb's buffers. - @discussion This method was added so that subclasses can override and massage buffers as - needed. The default simply calls setCommandBuffers. See IOFireWireSBP2Lib.h for details - regarding the setCommandBuffers method. - @result xxx. - */ - - virtual IOReturn - SetCommandBuffers ( IOFireWireSBP2ORB * orb, SCSITaskIdentifier request ); - - /*! - @function CompleteSCSITask - @abstract This qualifies and sets appropriate data then calls CommandCompleted. - @discussion See IOSCSIProtocolServices.h for more details - regarding CommandCompleted. - */ - - virtual void - CompleteSCSITask ( IOFireWireSBP2ORB * orb ); - - /*! - @function AbortSCSICommand - @abstract This method is intended to abort an in progress SCSI Task. - @discussion Currently not implemented in super class. This is a stub method for adding - the abort command in the near future. - @result See SCSITask.h for SCSIServiceResponse codes. - */ - - virtual SCSIServiceResponse - AbortSCSICommand ( SCSITaskIdentifier request ); - - /*! - @function StatusNotify - @abstract This is our handler for status. - @discussion See IOFireWireSBP2Lib.h for details regarding the FWSBP2NotifyParams - structure that is passed in to the completion.. - */ - - virtual void - StatusNotify ( FWSBP2NotifyParams * params ); - - /*! - @function SetValidAutoSenseData - @abstract Set the auto sense data that was returned for a given SCSI Task. - @discussion SetValidAutoSenseData is called to qualify sense data that is copied to the - client via the SetAutoSenseData method. See IOSCSIProtocolServices.h for more details - regarding SetAutoSenseData. - */ - - void - SetValidAutoSenseData ( SBP2ClientOrbData * clientData, - FWSBP2StatusBlock * statusBlock, - SCSI_Sense_Data * targetData ); - - /*! - @function UnsolicitedStatusNotify - @abstract This is our handler for unsolicited status. - @discussion After we have parsed and handled the unsolicited status we call - enableUnsolicitedStatus. See IOFireWireSBP2Lib.h for details regarding the - enableUnsolicitedStatus method. - */ - - virtual void - UnsolicitedStatusNotify ( FWSBP2NotifyParamsPtr params ); - - /*! - @function LoginCompletion - @abstract Completion routine for login complete. - @discussion See IOFireWireSBP2Lib.h for details regarding the FWSBP2LogoutCompleteParams - structure that is passed in to the completion. - */ - - virtual void - LoginCompletion ( FWSBP2LoginCompleteParams * params ); - - /*! - @function LogoutCompletion - @abstract Completion routine for logout complete. - @discussion See IOFireWireSBP2Lib.h for details regarding the FWSBP2LogoutCompleteParams - structure that is passed in to the completion. - */ - - virtual void - LogoutCompletion ( FWSBP2LogoutCompleteParams * params ); - - /*! - @function IsProtocolServiceSupported - @abstract Determine is specified feature is supported by the protocol layer. - @discussion If the service has a value that must be returned, it will be returned in the - serviceValue output parameter. See IOSCSIProtocolServices.h for more details regarding - IsProtocolServiceSupported. - @result Will return true if the specified feature is supported by the protocol layer. - */ - - virtual bool - IsProtocolServiceSupported ( SCSIProtocolFeature feature, void * serviceValue ); - - /*! - @function HandleProtocolServiceFeature - @abstract Handle specified feature supported by the protocol layer. - @discussion See IOSCSIProtocolServices.h for more details regarding HandleProtocolServiceFeature. - @result Will return true if the specified feature is supported by the protocol layer. - */ - - virtual bool - HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void * serviceValue ); - - /*! - @function LunResetComplete - @abstract Callback to submit Fetch Agent Reset. - @discussion See IOFireWireSBP2Lib.h for details regarding the submitFetchAgentReset - method. - */ - - virtual void - LunResetComplete ( IOReturn status, IOFireWireSBP2ManagementORB * orb ); - -public: - - /*! - @function init - @abstract See IOService for discussion. - @discussion Setup and prime class into known state. - */ - - bool init ( OSDictionary * propTable ); - - /*! - @function start - @discussion See IOService for discussion. - @result Return true if the start was successful, false otherwise ( which will - cause the instance to be detached and usually freed ). - */ - - virtual bool start ( IOService * provider ); - - /*! - @function cleanUp - @abstract cleanUp is called to tear down IOFireWireSerialBusProtocolTransport. - @discussion cleanUp is called when we receive a kIOFWMessageServiceIsRequestingClose - message or if we fail our initialization. - */ - - virtual void cleanUp ( void ); - - /*! - @function finalize - @abstract See IOService for discussion. - @result Returns true. - */ - - virtual bool finalize ( IOOptionBits options ); - - /*! - @function free - @discussion See IOService for discussion. - @result none. - */ - - virtual void free ( void ); - -protected: - - virtual IOReturn login ( void ); - OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 1 ); - - virtual IOReturn submitLogin ( void ); - OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 2 ); - - virtual void loginLost ( void ); - OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 3 ); - - void loginSuspended ( void ); - OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 4 ); - - virtual void loginResumed ( void ); - OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 5 ); - - static IOReturn CriticalOrbSubmissionStatic ( - OSObject * refCon, - void * val1, - void * val2, - void * val3, - void * val4 ); - - /*! - @function CriticalOrbSubmission - @abstract xxx. - @discussion xxx. - @result none. - */ - - void - CriticalOrbSubmission ( - IOFireWireSBP2ORB * orb, - SCSITaskIdentifier request ); - - virtual void submitOrbFromQueue ( void ); - OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 6 ); - -private: - - // binary compatibility reserved method space - - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 7 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 8 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 9 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 10 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 11 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 12 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 13 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 14 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 15 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 16 ); - -}; - -#endif /* _IOKIT_IO_FIREWIRE_SERIAL_BUS_PROTOCOL_TRANSPORT_H_ */ \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/IOFireWireSBP2LSIWorkaroundDescriptor.h b/i386/include/IOKit/sbp2/IOFireWireSBP2LSIWorkaroundDescriptor.h deleted file mode 100644 index 178ef00..0000000 --- a/i386/include/IOKit/sbp2/IOFireWireSBP2LSIWorkaroundDescriptor.h +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#if __ppc__ - -/*! - @header IOFireWireSBP2LSIWorkaroundDescriptor - Contains the class definition for IOFireWireSBP2LSIWorkaroundDescriptor. -*/ - -#ifndef _IOKIT_IOFIREWIRESBP2LSIWORKAROUNDDESCRIPTOR_H -#define _IOKIT_IOFIREWIRESBP2LSIWORKAROUNDDESCRIPTOR_H - -#include <IOKit/IOMemoryDescriptor.h> - -class IOFireWireSBP2LSIRange; - -/*! - @class IOFireWireSBP2LSIWorkaroundDescriptor - @abstract This is a subclass of IOGeneralMemoryDescriptor. It is designed to work around - a hardware problem in a common SBP2 target. It takes a memory descriptor as - an argument. It retains this descriptor and returns a new one with resegmented - physical segments and potentially some "unfixable" segments double buffered. - - If the transfer will cause data to be sent from the Mac, syncBuffersForOutput - must be called before the transfer. - - If the transfer will cause data to be recieve by the Mac, syncBuffersForInput - must be called after the transfer. - - This class calculates the new segmentation only once when it is created. - Any changes to the structure of the original memory descriptor will render - this one useless. It must be released and a new IOFireWireSBP2LSIWorkaroundDescriptor - can be created. - - LSI Bridge Workaround Algorithm Details - - Goals: - 1. Avoid LSI Logic "< 16 byte" bug - prevent any data packet smaller than 16 bytes - 2. Minimize double-buffering - 3. Support non-multiple-of-512-byte devices, e.g. CD Audio - - Solution: - Write a page table such that the bridge will nor use packets smaller than 16 bytes. - In other words, rearrange the memory descriptor to avoid the bug, and do it such - that the SBP-2 layer will not break up a segment (du ro the 64k-1 limit) and - re-introduces the problem - - SBP-2 defines the kFWSBP2MaxPageClusterSize constant. We simply make sure - none of our segments are larger than this size and SBP-2 will not break them - up when it writes the SBP-2 page table. - - Notes: - - Some double buffering is unavoidable. Discontiguous pages may yield page - fragments at the start or end of the buffer (or both, with non-512x buffers). - solution uses less than 33 bytes of double-buffer per segment in original - memory descriptor. - - If driver must break up IO to meet ATA limit of 255 (250?) blocks, assume - the driver does this at a higher level (before applying workaround). - - It is expected that the original memory descriptor has been prepared (wired) -*/ - -class IOFireWireSBP2LSIWorkaroundDescriptor : public IOGeneralMemoryDescriptor -{ - OSDeclareDefaultStructors(IOFireWireSBP2LSIWorkaroundDescriptor) - - friend class IOFireWireSBP2LSIRange; - -protected: - - // reserved for future use - struct ExpansionData { }; - ExpansionData *reserved; - - bool fFixedCapacity; // for both allocators - - ////////////////////////////////////// - // for range allocator - - OSArray * fPermanentRanges; - UInt32 fAllocatedRangesCount; - - virtual IOReturn rangeAllocatorInitialize( UInt32 rangeCount ); - virtual void rangeAllocatorDeallocateAllRanges( void ); - virtual IOFireWireSBP2LSIRange * rangeAllocatorNewRange( void ); - virtual void rangeAllocatorFree( void ); - - ////////////////////////////////////// - // for buffer allocator - - OSArray * fBufferDescriptors; - UInt32 fPermanentPages; - IOByteCount fAllocatedBytesCount; - - virtual IOReturn bufferAllocatorInitialize( IOByteCount requestedBufferSize ); - virtual void bufferAllocatorDeallocateAllBuffers( void ); - virtual void * bufferAllocatorNewBuffer( IOPhysicalAddress * address ); - virtual void bufferAllocatorFree( void ); - - ////////////////////////////////////// - // for range table allocator - - IOPhysicalRange * fRangeTable; - IOByteCount fRangeTableSize; - - virtual IOReturn rangeTableAllocatorInitialize( UInt32 requestedBufferSize ); - virtual IOPhysicalRange * rangeTableAllocatorNewTable( UInt32 entries ); - virtual void rangeTableAllocatorFree( void ); - - ////////////////////////////////////// - // for workaround - - IOMemoryDescriptor * fOriginalDesc; - OSArray * fRanges; - IOByteCount fOffset; - IOByteCount fLength; - IODirection fDirection; - - - virtual bool initWithCapacity - ( UInt32 permanentRanges, IOByteCount permanentBufferSpace, bool fixedCapacity ); - - virtual void free(); - - virtual IOReturn resetToInitialCapacity( void ); - virtual IOReturn initializeRangesArray( void ); - virtual IOReturn recalculateSmallSegments( void ); - virtual IOReturn splitLargeSegments( void ); - virtual IOReturn resegmentOddLengthSegments( void ); - virtual IOReturn initializeBuffers( void ); - - virtual bool initWithAddress( void * address, /* not supported */ - IOByteCount withLength, - IODirection withDirection ); - - virtual bool initWithAddress( vm_address_t address, /* not supported */ - IOByteCount withLength, - IODirection withDirection, - task_t withTask ); - - virtual bool initWithPhysicalAddress( - IOPhysicalAddress address, /* not supported */ - IOByteCount withLength, - IODirection withDirection ); - - virtual bool initWithPhysicalRanges( - IOPhysicalRange * ranges, /* not supported */ - UInt32 withCount, - IODirection withDirection, - bool asReference = false ); - - virtual bool initWithRanges( IOVirtualRange * ranges, /* not supported */ - UInt32 withCount, - IODirection withDirection, - task_t withTask, - bool asReference = false ); - -public: - - // static factory methods and intializers - - // - // create a new instance - // - - - /*! - @function withDescriptor - @abstract Creates a new IOFireWireSBP2LSIWorkaroundDescriptor. - @discussion Create a IOFireWireSBP2LSIWorkaroundDescriptor with no permanent capacity then - inits it the given descriptor. This is basicly a short cut for calling - withCapacity( 0, 0, false) and the initWithDescriptor() - @param desc Original memory descriptor. - @param offset Offset of data to "fix" in bytes from beginning of descriptor. - @param len Length of data in bytes to "fix" - @param direction IODirection of data transfer. - @result Returns a new IOFireWireSBP2LSIWorkaroundDescriptor if successful. - */ - - static IOFireWireSBP2LSIWorkaroundDescriptor * withDescriptor - ( IOMemoryDescriptor * desc, IOByteCount offset = 0, - IOByteCount len = 0, IODirection direction = kIODirectionOutIn ); - - // initialize with descriptor - - /*! - @function initWithDescriptor - @abstract Initialize an IOFireWireSBP2LSIWorkaroundDescriptor with the given descriptor. - @discussion Initialize the workaround descriptor with the given descriptor. - @param desc Original memory descriptor. - @param offset Offset of data to "fix" in bytes from beginning of descriptor. - @param len Length of data in bytes to "fix" - @param direction IODirection of data transfer. - @result Returns true if the initialization was successful. - */ - - virtual bool initWithDescriptor( IOMemoryDescriptor * desc, IOByteCount offset = 0, - IOByteCount len = 0, IODirection direction = kIODirectionOutIn ); - - - /////////////////////////////////// - - - /*! - @function withCapacity - @abstract Create a new descriptor with possibly a permanent capacity. - @discussion Create and IOFireWireSBP2LSIWorkaroundDescriptor with a permanent fixed capacity. - You should call initWithDescriptor afterward. permanentRanges is number of ranges to keep - permanently allocated for use by the algorithm. If fixedCapacity is false additional ranges - may be allocated and deallocated dyanmicly if needed. The algorithm may require more or less - ranges than either the original descriptor or the final fixed may decriptor contain. - permanentBufferSpace is the number of bytes of permanent buffer to keep arround. If fixedCapacity - is false additional buffer space may be allocated and deallocated dynamically. permanentBufferSpace - should generally be set to 32 * maximum number of ranges. fixedCapacity is a flag indicating - whether dynamic allocations are allowed. When making decisions about the maximum amount of - buffer space to keep around, it should be noted tha the maximum number of ranges maybe different - from permanentRanges if fixedCapcity is false. - @param permanentRanges Count of permanent ranges. - @param permanentBufferSpace Byte count of permanent buffers. - @param fixedCapacity bool indicating if dynamic allocations can be made. - @result Returns true if the initialization was successful. - */ - - static IOFireWireSBP2LSIWorkaroundDescriptor * withCapacity - ( UInt32 permanentRanges, IOByteCount permanentBufferSpace, bool fixedCapacity ); - - - /////////////////////////////////// - - // - // manipulate buffers for IO - // - - /*! - @function syncBuffersForOutput - @abstract Synchronize the buffers for output. - @discussion Since double buffering may be invovled in the workaround. The driver needs to - indicate when these buffers should be syncronized with the original descriptor. For data - that will be output syncBuffersForOutput should be called before submiting the ORB. - @result Returns kIOReturnSuccess if sync was successful. - */ - - virtual IOReturn syncBuffersForOutput( void ); // call before output - - /*! - @function syncBuffersForInput - @abstract Synchronize the buffers for input. - @discussion Since double buffering may be invovled in the workaround. The driver needs to - indicate when these buffers should be syncronized with the original descriptor. For data - that will be input syncBuffersForOutput should be called after receiving completion status - for the ORB. - @result Returns kIOReturnSuccess if sync was successful. - */ - - virtual IOReturn syncBuffersForInput( void ); // call after input - -private: - - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 0); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 1); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 2); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 3); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 4); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 5); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 6); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 7); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LSIWorkaroundDescriptor, 8); - -}; - -#endif - -#endif diff --git a/i386/include/IOKit/sbp2/IOFireWireSBP2LUN.h b/i386/include/IOKit/sbp2/IOFireWireSBP2LUN.h deleted file mode 100644 index e6c97de..0000000 --- a/i386/include/IOKit/sbp2/IOFireWireSBP2LUN.h +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - @header IOFireWireSBP2LUN - Contains the class definition for IOFireWireSBP2LUN. -*/ - -#ifndef _IOKIT_IOFIREWIRESBP2LUN_H -#define _IOKIT_IOFIREWIRESBP2LUN_H - -#include <IOKit/IOService.h> -#include <IOKit/IOCommandGate.h> - -#include <IOKit/firewire/IOFireWireUnit.h> - -#include <IOKit/sbp2/IOFireWireSBP2Login.h> -#include <IOKit/sbp2/IOFireWireSBP2ManagementORB.h> - -class IOFireWireSBP2Target; - -/*! - @class IOFireWireSBP2LUN - @abstract Provider for most drivers. - @discussion IOFireWireSBP2LUN objects are created by IOFireWireSBP2Target objects. Each target may have zero or more IOFireWireSBP2LUN children. The LUN object serves as the matching nub for most drivers and therefore will be the provider for most drivers. It supplies the methods that control the operation of the LUN as a whole. Methods that control the behavior and execution of an SBP2 login session are supplied in a separate IOFireWireSBP2Login object. The LUN can be used to create one of these login objects. - The LUN can also create IOFireWireSBP2ManagementORBs for configuring and appending non-login related management functions. Login related management functions (ie. Login, Logout, Reconnect) are supplied by the IOFireWireSBP2Login. - Finally the LUN can supply a reference to the IOFireWireUnit. This can be useful if a driver wishes to access the standard FireWire APIs. -*/ - -class IOFireWireSBP2LUN : public IOService -{ - OSDeclareDefaultStructors( IOFireWireSBP2LUN ); - - friend class IOFireWireSBP2ManagementORB; - friend class IOFireWireSBP2Login; - friend class IOFireWireSBP2UserClient; - -protected: - - // reserved for future use - struct ExpansionData { }; - ExpansionData *reserved; - - //////////////////////////////////////////// - // methods called by friend classes - - // IOFireWireSBP2Login methods - virtual void removeLogin( IOFireWireSBP2Login * login ); - virtual IOFireWireSBP2Target * getTarget( void ); - - // IOFireWireSBP2ManagementORB methods - virtual void clearAllTasksInSet( void ); // assumes caller is on workloop - virtual void removeManagementORB( IOFireWireSBP2ManagementORB * orb ); - - // IOFireWireSBP2UserClient methods - virtual void flushAllManagementORBs( void ); - -public: - - //////////////////////////////////////////// - // IOService overrides - - /*! @function attach - @abstract Attaches an IOService client to a provider in the registry. - @discussion See IOService for discussion. - @param provider The IOService object which will serve as this objects provider. - @result false if the provider is inactive or on a resource failure, otherwise true. - */ - - virtual bool attach( IOService *provider ); - - /*! @function handleOpen - @abstract Overrideable method to control the open / close behaviour of an IOService. - @discussion See IOService for discussion. - @param forClient Designates the client of the provider requesting the open. - @param options Options for the open, may be interpreted by the implementor of handleOpen. - @result Return true if the open was successful, false otherwise. */ - - virtual bool handleOpen( IOService * forClient, - IOOptionBits options, - void * arg ); - /*! - @function handleClose - @abstract Overrideable method to control the open / close behaviour of an IOService. - @discussion See IOService for discussion. - @param forClient Designates the client of the provider requesting the close. - @param options Options for the close, may be interpreted by the implementor of handleOpen. - */ - - virtual void handleClose( IOService * forClient, - IOOptionBits options ); - - /*! - @function matchPropertyTable - @abstract Implements SBP2 specific matching. - @discussion See IOService for discussion. - @param table The dictionary of properties to be matched against. - @result Returns false if the family considers the matching dictionary does not match in properties it understands, true otherwise. - */ - - virtual bool matchPropertyTable(OSDictionary * table); - -protected: - - //////////////////////////////////////////// - // private fields - - IOFireWireSBP2Target * fProviderTarget; - UInt32 fLUNumber; - OSSet * fLoginSet; - OSIterator * fLoginSetIterator; - IOCommandGate * fGate; - OSSet * fORBSet; - OSIterator * fORBSetIterator; - OSObject * fDiagnostics; - - //////////////////////////////////////////// - // private methods - - // IOService methods - virtual void free( void ); - virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); - - // create management orb internals - static IOReturn staticCreateManagementORBAction( OSObject *self, - void * refCon, - void * completion, - void * orb, - void * ); - virtual IOReturn createManagementORBAction( void * refCon, - FWSBP2ManagementCallback completion, - IOFireWireSBP2ManagementORB ** orb ); - - // remove management orb internals - static IOReturn staticRemoveManagementORBAction( OSObject * self, void * orb, - void *, void *, void * ); - virtual IOReturn removeManagementORBAction( IOFireWireSBP2ManagementORB * orb ); - - // flush all management orb internals - static IOReturn staticExecuteFlushAllMgmtORBs( OSObject * self, void *, - void *, void *, void * ); - virtual IOReturn executeFlushAllMgmtORBs( void ); - - // IOFireWireSBP2ManagementORB friend class wrappers - virtual bool initMgmtORBWithLUN( IOFireWireSBP2ManagementORB * orb, IOFireWireSBP2LUN * lun, - void * refCon, - FWSBP2ManagementCallback completion ); - - // IOFireWireSBP2Login friend class wrappers - virtual bool initLoginWithLUN( IOFireWireSBP2Login * login, IOFireWireSBP2LUN * lun ); - virtual void suspendedNotify( void ); - virtual void resumeNotify( void ); - -private: - - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 0); - -public: - - //////////////////////////////////////////// - // client methods - - // getters - - /*! - @function getFireWireUnit - @abstract Returns an IOFireWireUnit object. - @discussion An IOFireWireUnit is the provider of an IOFireWireSBP2Target. In order to - use the base FireWire services you will need a reference to the unit. This method - returns that reference. - @result Returns a pointer to an IOFireWireUnit. - */ - - virtual IOFireWireUnit * getFireWireUnit( void ); - - /*! - @function getLUNumber - @abstract Returns the LUNs number. - @discussion Each LUN has a number to uniquely identify it on a device. This method returns - this value in a UInt32. - @result Returns a UInt32 containing the Logical Unit Number. - */ - - virtual UInt32 getLUNumber( void ); - - // factory methods - - /*! - @function createLogin - @abstract Creates a new IOFireWireSBP2Login object. - @discussion Creates a new IOFireWireSBP2Login object for the LUN. Login objects supply most - of the SBP2 APIs related to login maintenance and Normal Command ORB execution. - @result Returns a pointer to a new IOFireWireSBP2Login. - */ - - virtual IOFireWireSBP2Login *createLogin( void ); - - /*! - @function createManagementORB - @abstract Creates a new IOFireWireSBP2ManagementORB object. - @discussion Creates a new IOFireWireSBP2ManagementORB object. Management objects let you - execute commands like QueryLogins, LogicalUnitReset, and AbortTask. These commands are - configured after they are created here. When they are done executing (after a call to submit) - the supplied completion routine will be called with the supplied refcon. Usually this refCon - is the "this" pointer of completion method's object. - @param refCon The refcon passed to the completion routine. - @param completion The completion routine. Called when the ORB finishes execution. - @result Returns a pointer to a new IOFireWireSBP2Login. - */ - - virtual IOFireWireSBP2ManagementORB * createManagementORB( void * refCon, FWSBP2ManagementCallback completion ); - -protected: - - static IOReturn staticCreateLogin( OSObject *self, void * login, void *, void *, void * ); - virtual IOReturn createLoginAction( IOFireWireSBP2Login ** login ); - - static IOReturn staticRemoveLoginAction( OSObject *self, void * login, void *, void *, void * ); - virtual IOReturn removeLoginAction( IOFireWireSBP2Login * login ); - -public: - - /*! - @function getDiagnostics - @abstract Debug-only method. - @discussion Returns a reference to the internal diagnostics object when the services are built - in debug mode. Should be a no-op in release builds. - @result Returns a pointer to the diagnostics object (if any). - */ - - virtual OSObject * getDiagnostics( void ); - - virtual bool finalize( IOOptionBits options ); - -protected: - - void terminateNotify( void ); - -private: - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 1); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 2); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 3); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 4); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 5); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 6); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 7); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2LUN, 8); - -}; - -#endif \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/IOFireWireSBP2Login.h b/i386/include/IOKit/sbp2/IOFireWireSBP2Login.h deleted file mode 100644 index 42a838c..0000000 --- a/i386/include/IOKit/sbp2/IOFireWireSBP2Login.h +++ /dev/null @@ -1,1078 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - @header IOFireWireSBP2Login - Contains the class definition for IOFireWireSBP2Login. -*/ - -#ifndef _IOKIT_IOFIREWIRESBP2LOGIN_H -#define _IOKIT_IOFIREWIRESBP2LOGIN_H - -#include <IOKit/IOCommandGate.h> - -#include <IOKit/firewire/IOFireWireUnit.h> - -#include <IOKit/sbp2/IOFireWireSBP2ORB.h> -#include <IOKit/sbp2/IOFireWireSBP2Target.h> - -// login option flags -enum -{ - kFWSBP2DontSynchronizeMgmtAgent = (1 << 0), - kFWSBP2ExclusiveLogin = (1 << 5) -}; - -// notification events -enum -{ - kFWSBP2NormalCommandStatus = 6, - kFWSBP2NormalCommandTimeout = 7, - kFWSBP2UnsolicitedStatus = 8, - kFWSBP2NormalCommandReset = 9 -}; - -#define kIOMessageFWSBP2ReconnectComplete iokit_fw_err(0x3E8) -#define kIOMessageFWSBP2ReconnectFailed iokit_fw_err(0x3E9) - -/*! - @typedef FWSBP2LoginResponse - @param length Length of login response. - @param loginID Unique id representing this login. - @param commandBlockAgentAddressHi High 32 bits of command block agent address. - @param commandBlockAgentAddressLo Low 32 bits of command block agent address. - @param reserved Reserved. - @param reconnectHold Reconnect timeout encoded as 2^reconnectHold seconds. -*/ - -typedef struct -{ - UInt16 length; - UInt16 loginID; - UInt32 commandBlockAgentAddressHi; - UInt32 commandBlockAgentAddressLo; - UInt16 reserved; - UInt16 reconnectHold; -} FWSBP2LoginResponse, *FWSBP2LoginResponsePtr; - -/*! - @typedef FWSBP2StatusBlock - @param details Src, Resp, D, Len fields of status block format - @param sbpStatus SBP2 specific status - @param orbOffsetHi High 32 bits of address of orb status is for. - @param orbOffsetLo Low 32 bits of address of orb status is for. - @param status[6] Up to 48 bytes of additional data. Length is determined by len field. -*/ - -typedef struct -{ - UInt8 details; - UInt8 sbpStatus; - UInt16 orbOffsetHi; - UInt32 orbOffsetLo; - UInt32 status[6]; -} FWSBP2StatusBlock; - -class IOFireWireSBP2LUN; -class IOFireWireSBP2Login; - -// struct sent to login complete handler - -/*! - @typedef FWSBP2LoginCompleteParams - @param login Pointer to IOFireWireSBP2Login object. - @param generation FireWire generation value. - @param status Status of login attempt. - @param loginResponse Pointer to login response struct. - @param statusBlock Pointer to status block buffer. - @param statusBlockLength Length of entire status block. -*/ - -typedef struct -{ - IOFireWireSBP2Login * login; // login object this param is sent from - UInt32 generation; // generation this login was attempted in - - IOReturn status; // status of login attempt - - FWSBP2LoginResponsePtr loginResponse; // pointer to loginResponse buffer - FWSBP2StatusBlock * statusBlock; // pointer to statusBlock buffer - UInt32 statusBlockLength; // size of statusBlock buffer - -} FWSBP2LoginCompleteParams, *FWSBP2LoginCompleteParamsPtr; - -// struct sent to logout complete handler - -/*! - @typedef FWSBP2LogoutCompleteParams - @param login Pointer to IOFireWireSBP2Login object. - @param generation FireWire generation value. - @param status Status of login attempt. - @param statusBlock Pointer to status block buffer. - @param statusBlockLength Length of entire status block. -*/ - -typedef struct -{ - IOFireWireSBP2Login * login; // login object this param is sent from - UInt32 generation; // generation this login was attempted in - - IOReturn status; // status of login attempt - - FWSBP2StatusBlock * statusBlock; // pointer to statusBlock buffer - UInt32 statusBlockLength; // size of statusBlock buffer - -} FWSBP2LogoutCompleteParams, *FWSBP2LogoutCompleteParamsPtr; - -// struct sent with reconnect notification - -/*! - @typedef FWSBP2LogoutCompleteParams - @param login Pointer to IOFireWireSBP2Login object. - @param generation FireWire generation value. - @param status Status of login attempt. - @param reconnectStatusBlock Pointer to status block buffer. - @param reconnectStatusBlockLength Length of entire status block. -*/ - -typedef struct -{ - IOFireWireSBP2Login * login; // login object this param is sent from - UInt32 generation; // generation this login was attempted in - - IOReturn status; // status of reconnect attempt - - void * reconnectStatusBlock; // pointer to statusBlock buffer - UInt32 reconnectStatusBlockLength; // size of statusBlock buffer -} FWSBP2ReconnectParams, *FWSBP2ReconnectParamsPtr; - -// Callback when login and logout commands complete asynchronously - -/*! - @typedef FWSBP2LoginCallback - @param refCon Reference constant supplied when the notification was registered. - @param params Structure containing additional information about the status of the login. -*/ - -typedef void (*FWSBP2LoginCallback)(void * refCon, FWSBP2LoginCompleteParamsPtr params); - -/*! - @typedef FWSBP2LogoutCallback - @param refCon Reference constant supplied when the notification was registered. - @param params Structure containing additional information about the status of the logout. -*/ - -typedef void (*FWSBP2LogoutCallback)(void * refCon, FWSBP2LogoutCompleteParamsPtr params); - -/*! - @typedef FWSBP2StatusCallback - @param refCon Reference constant supplied when the notification was registered. - @param status Indicates success or failure of operation. -*/ - -typedef void (*FWSBP2StatusCallback)(void * refCon, IOReturn status); - -/*! - @typedef FWSBP2FetchAgentWriteCallback - @param refCon Reference constant supplied when the notification was registered. - @param status Indicates success or failure of operation. - @param orb Indicates current last orb in chain. -*/ - -typedef void (*FWSBP2FetchAgentWriteCallback)(void * refCon, IOReturn status, IOFireWireSBP2ORB * orb); - -/*! - @typedef FWSBP2NotifyParams - @param notificationEvent Type of event we are being notified of. - @param message buffer containing message. - @param length length of message field. - @param generation FireWire generation value. -*/ - -typedef struct -{ - void * commandObject; - UInt32 notificationEvent; - const void * message; - UInt32 length; - UInt32 generation; -} FWSBP2NotifyParams, *FWSBP2NotifyParamsPtr; - - -/*! - @typedef FWSBP2NotifyCallback - @param refCon Reference constant supplied when the notification was registered. - @param params FWSBP2NotifyParams containing notification information. -*/ - -typedef void (*FWSBP2NotifyCallback)(void * refCon, FWSBP2NotifyParamsPtr params); - -/*! - @class IOFireWireSBP2Login - @abstract Supplies the login maintenance and Normal Command ORB execution portions of the API. - @discussion Supplies APIs for login maintenance and command execution. Drivers can use this - object to create IOFireWireSBP2ORB objects and execute them. Solicited and unsolicited status - callback routines can be registered and the SBP2 services will notify the driver when the - appropriate status arrives. - This class also handles login maintenance. Supplies APIs for logging in and logging out and - attempts to reconnect to the LUN after bus resets. The base FireWire services deliver bus - reset notification via the IOKit message routine. The SBP2 services build on this behavior - and deliver reconnectFailed and reconnectComplete through the message routine as well. -*/ - -class IOFireWireSBP2Login : public OSObject -{ - OSDeclareDefaultStructors( IOFireWireSBP2Login ) - - friend class IOFireWireSBP2ORB; - friend class IOFireWireSBP2LUN; - friend class IOFireWireSBP2UserClient; - -protected: - - // command selectors - enum - { - kLoginCommandIdle = 0, - kLoginCommandDoLogin = 1, - kLoginCommandDoLogout = 2, - kLoginAddORB = 3, - kLoginRemoveORB = 4, - kLoginFetchAgentReset = 5 - }; - - // internal login states - enum - { - kLoginStateIdle = 0, - kLoginStateLoggingIn = 1, - kLoginStateConnected = 2, - kLoginStateReconnect = 3, - kLoginStateLoggingOut = 4, - kLoginStateTerminated = 5 - }; - - // rom keys - enum - { - kUnitCharacteristicsKey = 0x3A, - kManagementAgentOffsetKey = 0x54 - }; - - // sbp2 defs - enum - { - kFWSBP2RequestComplete = 0, - kFWSBP2TransportFailure = 1, - kFWSBP2IllegalRequest = 2, - kFWSBP2VendorDependent = 3 - }; - - enum - { - kFWSBP2NoSense = 0, - kFWSBP2RequestTypeNotSupported = 1, - kFWSBP2SpeedNotSupported = 2, - kFWSBP2PageSizeNotSupported = 3, - kFWSBP2AccessDenied = 4, - kFWSBP2LogicalUnitNotSupported = 5, - kFWSBP2MaxPayloadTooSmall = 6, - kFWSBP2FunctionRejected = 9, - kFWSBP2LoginIDNotRecognized = 10, - kFWSBP2DummyORBCompleted = 11, - kFWSBP2RequestAborted = 12, - kFWSBP2UnspecifiedError = 0xFF - }; - - typedef struct - { - UInt32 password[2]; - UInt32 loginResponseAddressHi; - UInt32 loginResponseAddressLo; - UInt16 options; - UInt16 lun; - UInt16 passwordLength; - UInt16 loginResponseLength; - UInt32 statusFIFOAddressHi; - UInt32 statusFIFOAddressLo; - } FWSBP2LoginORB; - - typedef struct - { - UInt32 reserved1[4]; - UInt16 options; - UInt16 loginID; - UInt32 reserved2; - UInt32 statusFIFOAddressHi; - UInt32 statusFIFOAddressLo; - } FWSBP2ReconnectORB; - - typedef struct - { - UInt32 reserved1[4]; - UInt16 options; - UInt16 loginID; - UInt32 reserved2; - UInt32 statusFIFOAddressHi; - UInt32 statusFIFOAddressLo; - } FWSBP2LogoutORB; - -protected: - - /////////////////////////////////////////////////////////////////// - // private interface methods - - // IOFireWireSBP2LUN methods - virtual void clearAllTasksInSet( void ); - virtual bool initWithLUN( IOFireWireSBP2LUN * lun ); - virtual void suspendedNotify( void ); - virtual void resumeNotify( void ); - - // IOFireWireSBP2ORB methods - virtual IOFireWireUnit * getFireWireUnit( void ); - virtual IOFireWireSBP2LUN * getFireWireLUN( void ); - virtual bool isFetchAgentWriteInProgress( void ); - virtual bool isConnected( void ); - virtual IOReturn removeORB( IOFireWireSBP2ORB * orb ); - virtual IOReturn appendORBImmediate( IOFireWireSBP2ORB * orb ); - virtual IOReturn appendORB( IOFireWireSBP2ORB * orb ); - virtual void sendTimeoutNotification( IOFireWireSBP2ORB * orb ); - -protected: - - // reserved for future use - struct ExpansionData { }; - ExpansionData *reserved; - - IOFireWireSBP2LUN * fLUN; - IOFireWireUnit * fUnit; - IOFireWireController * fControl; - IOCommandGate * fGate; - - FWSBP2LoginCallback fLoginCompletionCallback; - void * fLoginCompletionRefCon; - - FWSBP2LogoutCallback fLogoutCompletionCallback; - void * fLogoutCompletionRefCon; - - FWSBP2NotifyCallback fStatusNotifyCallback; - void * fStatusNotifyRefCon; - - FWSBP2NotifyCallback fUnsolicitedStatusNotifyCallback; - void * fUnsolicitedStatusNotifyRefCon; - - UInt32 fLoginFlags; - UInt32 fReconnectTime; - - UInt32 fLoginState; - UInt32 fManagementOffset; - UInt32 fManagementTimeout; - UInt32 fMaxORBSize; - UInt32 fMaxCommandBlockSize; - UInt16 fLoginNodeID; - UInt32 fLoginGeneration; - UInt32 fLoginID; - UInt32 fReconnectHold; - UInt32 fMaxPayloadSize; - void * fRefCon; - - // resources - - FWSBP2LoginORB fLoginORB; - IOFWAddressSpace * fLoginORBAddressSpace; - FWAddress fLoginORBAddress; - - FWSBP2LoginResponse fLoginResponse; - IOFWAddressSpace * fLoginResponseAddressSpace; - FWAddress fLoginResponseAddress; - - FWSBP2ReconnectORB fReconnectORB; - IOFWAddressSpace * fReconnectORBAddressSpace; - FWAddress fReconnectORBAddress; - - FWSBP2StatusBlock fStatusBlock; - IOFWAddressSpace * fStatusBlockAddressSpace; - FWAddress fStatusBlockAddress; - - FWSBP2StatusBlock fReconnectStatusBlock; - IOFWAddressSpace * fReconnectStatusBlockAddressSpace; - FWAddress fReconnectStatusBlockAddress; - - FWSBP2LogoutORB fLogoutORB; - IOFWAddressSpace * fLogoutORBAddressSpace; - FWAddress fLogoutORBAddress; - bool fLogoutPending; - - IOFWWriteCommand * fLoginWriteCommand; - IOMemoryDescriptor * fLoginWriteCommandMemory; - bool fLoginWriteInProgress; - - IOFWWriteCommand * fReconnectWriteCommand; - IOMemoryDescriptor * fReconnectWriteCommandMemory; - bool fReconnectWriteInProgress; - bool fReconnectWriteInterrupted; - - IOFWWriteCommand * fLogoutWriteCommand; - IOMemoryDescriptor * fLogoutWriteCommandMemory; - bool fLogoutWriteInProgress; - - IOFWCommand * fLoginTimeoutCommand; - bool fLoginTimeoutTimerSet; - - IOFWDelayCommand * fReconnectTimeoutCommand; - bool fReconnectTimeoutTimerSet; - - IOFWCommand * fLogoutTimeoutCommand; - bool fLogoutTimeoutTimerSet; - - FWAddress fFetchAgentAddress; - IOMemoryDescriptor * fFetchAgentWriteCommandMemory; - FWAddress fLastORBAddress; - IOFireWireSBP2ORB * fLastORB; - IOFWWriteCommand * fFetchAgentWriteCommand; - bool fFetchAgentWriteCommandInUse; - FWSBP2FetchAgentWriteCallback fFetchAgentWriteCompletion; - void * fFetchAgentWriteRefCon; - IOFireWireSBP2ORB * fORBToWrite; - - OSSet * fORBSet; - OSIterator * fORBSetIterator; - - void * fPasswordBuf; - UInt32 fPasswordLen; - IOFWAddressSpace * fPasswordAddressSpace; - FWAddress fPasswordAddress; - IOMemoryDescriptor * fPasswordDescriptor; - - bool fSuspended; - - UInt32 fLoginRetryDelay; - UInt32 fLoginRetryCount; - UInt32 fLoginRetryMax; - IOFWDelayCommand * fLoginRetryTimeoutCommand; - bool fLoginRetryTimeoutTimerSet; - IOFireWireSBP2Target * fTarget; - - bool fUnsolicitedStatusEnableRequested; - - IOFWDelayCommand * fReconnectRetryTimeoutCommand; - bool fReconnectRetryTimeoutTimerSet; - - int fCriticalSectionCount; - - // init / destroy - virtual IOReturn getUnitInformation( void ); - virtual IOReturn allocateResources( void ); - virtual void free( void ); - - // orb add / remove - virtual IOReturn addORB( IOFireWireSBP2ORB * orb ); - static IOReturn staticExecuteAddORB( OSObject *self, void * orb, void *, void *, void * ); - virtual IOReturn executeAddORB( IOFireWireSBP2ORB * orb ); - - static IOReturn staticExecuteRemoveORB( OSObject *self, void * orb, void *, void *, void * ); - virtual IOReturn executeRemoveORB( IOFireWireSBP2ORB * orb ); - - // - // login - // - - static IOReturn staticExecuteLogin( OSObject *self, void *, void *, void *, void * ); - virtual IOReturn executeLogin( void ); - virtual void abortLogin( void ); - - // login write complete handler - static void loginWriteCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - virtual void loginWriteComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - - // login timeout handler - static void loginTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - virtual void loginTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - - // status block write handler - static UInt32 statusBlockWriteStatic(void *refcon, UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, - const void *buf, IOFWRequestRefCon lockRead); - virtual UInt32 statusBlockWrite( UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, const void *buf, IOFWRequestRefCon lockRead); - virtual void completeLogin( IOReturn state, const void *buf = NULL, UInt32 len = 0, void * buf2 = NULL ); - - // - // reconnect - // - - virtual void doReconnect( void ); - virtual void restartReconnect( void ); - virtual void startReconnectTimer( void ); - - // reconnect write complete handler - static void reconnectWriteCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - virtual void reconnectWriteComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - - // reconnect timeout handler - static void reconnectTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - virtual void reconnectTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - - // reconnect status block - static UInt32 reconnectStatusBlockWriteStatic(void *refcon, UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, - UInt32 len, const void *buf, IOFWRequestRefCon lockRead); - virtual UInt32 reconnectStatusBlockWrite( UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, - const void *buf, IOFWRequestRefCon lockRead); - - virtual void sendReconnectNotification( UInt32 event ); - virtual void sendReconnectNotificationWithStatusBlock( UInt32 event ); - - // - // logout - // - - static IOReturn staticExecuteLogout( OSObject *self, void *, void *, void *, void * ); - virtual IOReturn executeLogout( void ); - - // logout write complete handler - static void logoutWriteCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - virtual void logoutWriteComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - - // logout timeout handler - static void logoutTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - virtual void logoutTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - - virtual void completeLogout( IOReturn state, const void *buf = NULL, UInt32 len = 0); - - // fetch agent write complete handler - static void fetchAgentWriteCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - virtual void fetchAgentWriteComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - - // - // fetch agent - // - - bool fFetchAgentResetInProgress; - UInt32 fFetchAgentResetBuffer; - FWAddress fFetchAgentResetAddress; - IOFWWriteQuadCommand * fFetchAgentResetCommand; - void * fFetchAgentResetRefCon; - FWSBP2StatusCallback fFetchAgentResetCompletion; - - static IOReturn staticExecuteFetchAgentReset( OSObject *self, void *, void *, void *, void * ); - virtual IOReturn executeFetchAgentReset( void ); - static void fetchAgentResetCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - virtual void fetchAgentResetComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - - // - // doorbell - // - - bool fDoorbellInProgress; - bool fDoorbellRingAgain; - UInt32 fDoorbellBuffer; - FWAddress fDoorbellAddress; - IOFWWriteQuadCommand * fDoorbellCommand; - - static IOReturn staticExecuteDoorbell( OSObject *self, void *, void *, void *, void * ); - virtual IOReturn executeDoorbell( void ); - static void doorbellCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - virtual void doorbellComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - - // - // enable unsolicited satus - // - - bool fUnsolicitedStatusEnableInProgress; - UInt32 fUnsolicitedStatusEnableBuffer; - FWAddress fUnsolicitedStatusEnableAddress; - IOFWWriteQuadCommand * fUnsolicitedStatusEnableCommand; - - static IOReturn staticExecuteUnsolicitedStatusEnable( OSObject *self, void *, void *, void *, void * ); - virtual IOReturn executeUnsolicitedStatusEnable( void ); - static void unsolicitedStatusEnableCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - virtual void unsolicitedStatusEnableComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - - // - // busy timeout stuff - // - - bool fSetBusyTimeoutInProgress; - UInt32 fSetBusyTimeoutBuffer; - FWAddress fSetBusyTimeoutAddress; - IOFWWriteQuadCommand * fSetBusyTimeoutCommand; - - bool fInCriticalSection; - - UInt16 fLocalNodeID; - bool fFastStartSupported; - UInt32 fFastStartOffset; - UInt32 fFastStartMaxPayload; - - UInt32 fUserLoginGeneration; - bool fUserLoginGenerationSet; - - IOFWDelayCommand * fFetchAgentRetryTimerCommand; - bool fFetchAgentRetryTimerSet; - - virtual IOReturn executeSetBusyTimeout( void ); - static void setBusyTimeoutCompleteStatic( void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - virtual void setBusyTimeoutComplete( IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd ); - -private: - // IOFireWireSBP2ORB friend class wrappers - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 0); - -protected: - virtual bool initORBWithLogin( IOFireWireSBP2ORB * orb, IOFireWireSBP2Login * login ); - virtual void setNextORBAddress( IOFireWireSBP2ORB * orb, FWAddress address ); - virtual void fetchAgentWriteComplete( IOFireWireSBP2ORB * orb, IOReturn status ); - virtual bool isORBTimerSet( IOFireWireSBP2ORB * orb ); - virtual void cancelORBTimer( IOFireWireSBP2ORB * orb ); - - // IOFireWireSBP2LUN friend class wrappers - virtual void removeLogin( void ); - virtual IOFireWireSBP2Target * getTarget( void ); - - UInt32 fARDMAMax; - bool fPhysicalAccessEnabled; - - bool fLoginStatusReceived; - FWSBP2StatusBlock fLoginStatusBlock; - UInt32 fLoginStatusBlockLen; - -private: - - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 1); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 2); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 3); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 4); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 5); - -public: - - ////////////////////////////// - - /*! - @function createORB - @abstract Creates a new IOFireWireSBP2ORB for this login. - @discussion Create a new IOFireWireSBP2ORB for this login. It can be configured - with it's accessors and executed with submitORB below. - @result Returns a pointer to the new ORB object. - */ - - virtual IOFireWireSBP2ORB * createORB( void ); - - /*! - @function submitORB - @abstract Submits the given orb - @discussion Starts execution of the given ORB. If the ORB is an immediate ORB it's - addresss is written to the fetch agent. If it is a non immediate orb its address - is appended to the last orb of the currently processing chain. The doorbell is not - rung automatically it must be run manually with the ringDoorbell command described below. - @param orb The orb to be executed. - @result Returns kIOReturnSuccess if the ORB has been started successfully. - */ - - virtual IOReturn submitORB( IOFireWireSBP2ORB * orb ); - - // set callbacks - - /*! - @function setStatusNotifyProc - @abstract Sets the callback to be called on normal command status. - @discussion The supplied callback is called when normal command status is recieved, when - a normal command times out, or when a normal command is aborted. - "notificationEvent" in the callback's params will indicate what happened. - It will be set to one of the following values: kFWSBP2NormalCommandReset, kFWSBP2NormalCommandStatus, - or kFWSBP2NormalCommandTimeout. If the event type is kFWSBP2NormalCommandTimeout and "len" is - non-zero then "message" contains the data written to the status block. - @param refCon refCon passed to callback. - @param callback address of callback method of type FWSBP2NotifyCallback. - */ - - virtual void setStatusNotifyProc( void * refCon, FWSBP2NotifyCallback callback ); - - /*! - @function getStatusNotifyProc - @abstract Returns the callback to be called on normal command status. - @discussion Returns the refCon and callback address of the status notify callback. - @param refCon output parameter returning the refCon to be passed to the callback. - @param callback output parameter returning the address of the callback. - */ - - virtual void getStatusNotifyProc( void ** refCon, FWSBP2NotifyCallback * callback ); - - /*! - @function setUnsolicitedStatusNotifyProc - @abstract Sets the callback to be called on normal command status. - @discussion The supplied callback is called when unsolicited status is recieved. - "notificationEvent" in the callback's params will indicate what happened. In this - case it will be set to kFWSBP2UnsolicitedStatus. If "len" is - non-zero then "message" contains the data written to the status block. Note: any buffers - returned by callbacks are only valid for the duration of the login and should not have - their contents modified. - @param refCon refCon passed to callback. - @param callback address of callback method of type FWSBP2NotifyCallback. - */ - - virtual void setUnsolicitedStatusNotifyProc( void * refCon, FWSBP2NotifyCallback callback ); - - /*! - @function getUnsolicitedStatusNotifyProc - @abstract Returns the callback to be called on unsolicited status. - @discussion Returns the refCon and callback address of the unsolicited status notify callback. - @param refCon output parameter returning the refCon to be passed to the callback. - @param callback output parameter returning the address of the callback. - */ - - virtual void getUnsolicitedStatusNotifyProc( void ** refCon, FWSBP2NotifyCallback * callback ); - - // command handling - - /*! - @function setLoginCompletion - @abstract Sets the callback to be called when a login attempt is complete. - @discussion The supplied callback is called when a login attempt has completed. "status" in the - callback's params should be checked to determine the success or failure of the login attempt. - If "statusBlock" is non-null then login status was written and it has been supplied here. If - the login attempt was successful then the login response will be supplied in the "loginResponse" - buffer. Note: all buffers supplied to callbacks are only valid for the duration of the callback. - Also, you are not to modify the contents of any supplied buffer. - @param refCon refCon passed to callback. - @param callback address of callback method of type FWSBP2LoginCallback. - */ - - virtual void setLoginCompletion( void * refCon, FWSBP2LoginCallback completion ); - - /*! - @function submitLogin - @abstract Attempts to login to the LUN. - @discussion This call begins the login process. The login object should be configured prior - to this call. If kIOReturnSuccess is returned from this call then the loginCompletion routine - will be called when the login completes (successfully or unsuccesfully). - @result Returns kIOReturnSuccess login has successlly begun. - */ - - virtual IOReturn submitLogin( void ); - - /*! - @function submitLogout - @abstract Attempts to logout of the LUN. - @discussion This call begins the logout process. If kIOReturnSuccess is returned from this call then - the logoutCompletion routine will be called when the logout completes (successfully or unsuccesfully). - @result Returns kIOReturnSuccess if logout has successfully begun. - */ - - virtual IOReturn submitLogout( void ); - - /*! - @function setLogoutCompletion - @abstract Sets the callback to be called when a logout attempt is complete. - @discussion The supplied callback is called when a logout attempt has completed. "status" in the - callback's params should be checked to determine the success or failure of the logout attempt. - If "statusBlock" is non-null then logout status was written and it has been supplied here. - Note: all buffers supplied to callbacks are only valid for the duration of the callback. - Also, you are not to modify the contents of any supplied buffer. - @param refCon refCon passed to callback. - @param callback address of callback method of type FWSBP2LogoutCallback. - */ - - virtual void setLogoutCompletion( void * refCon, FWSBP2LogoutCallback completion ); - - /*! - @function setFetchAgentWriteCompletion - @abstract Sets the callback to be called when the fetch agent write completes. - @discussion When an immediate orb is executed with submitORB, it's address is written to a - specific address on the device. This address is called the fetch agent. The device the - reads that orb from the Mac's memory and executes it. With this call you can register to - be called back when this write to the fetch agent completes. The SBP2 services guarantee - that the fetch agent write will be complete before status is reported for an ORB, so for - most drivers this notification is not required. - @param refCon refCon passed to callback. - @param callback address of callback method of type FWSBP2FetchAgentWriteCallback. - */ - - virtual void setFetchAgentWriteCompletion( void * refCon, FWSBP2FetchAgentWriteCallback completion ); - - /*! - @function setFetchAgentResetCompletion - @abstract Sets the callback to be called when a fetch agent reset completes. - @discussion The fetch agent state machine on the device can be reset by a write to a specific - register. The SBP2 services offer a utility method to reset the fetch agent. You can register - a callback routine here to be notified when this rest write completes. - @param refCon refCon passed to callback. - @param callback address of callback method of type FWSBP2FetchAgentWriteCallback. - */ - - virtual void setFetchAgentResetCompletion( void * refCon, FWSBP2StatusCallback completion ); - - /*! - @function submitFetchAgentReset - @abstract Resets the LUN's fetch agent. - @discussion The fetch agent state machine on the device can be reset by a write to a specific - register. This reset can be intiated by a call to this method. Notification of the completion - of this write can be had by registering a callback with the setFetchAgentResetCompletion method. - @result Returns kIOReturnSuccess if the reset started successfully. - */ - - virtual IOReturn submitFetchAgentReset( void ); - - /*! - @function ringDoorbell - @abstract Rings the doorbell on the LUN. - @discussion Non-immediate appends to the ORB chain may require the fetch agent state machine - to be notified of the new ORB's presence. This is accomplished by writing to the so called - doorbell register. This method begins one of those writes. - @result Returns kIOReturnSuccess if the ring started successfully. - */ - - virtual IOReturn ringDoorbell( void ); - - /*! - @function enableUnsolicitedStatus - @abstract Enables unsolicited status. - @discussion After unsolicited is sent the device will not send any additional unsolicited status - until a specific register is written. This serves as a sort of flow-control for unsolicited status. - After unsolicited status is recieved and processed drivers will want to reenable the delivery - of unsolicted status by a call to this method. - @result Returns kIOReturnSuccess if the status enable write started successfully. - */ - - virtual IOReturn enableUnsolicitedStatus( void ); - - // accessors - - /*! - @function getMaxCommandBlockSize - @abstract Returns the maximum command block size. - @discussion The device publishes an upper limit on the size of command block that it can - accept. That value can be accessed via this method. - @result Returns a UInt32 containing the maximum command block size. - */ - - virtual UInt32 getMaxCommandBlockSize( void ); - - /*! - @function getLoginID - @abstract Returns the current login ID. - @discussion When we successfully login to a device. The device gives us a unique login id. - This is used internally for reconnecting to the device after bus resets and for certain other - management ORBs. Most drivers are probably not interested in this value. - @result Returns a UInt32 containing the current login ID. - */ - - virtual UInt32 getLoginID( void ); - - /*! - @function setLoginFlags - @abstract Sets login configuration flags. - @discussion Configures the login behavior according to the provided flags. Currently two - flags are defined for this API. kFWSBP2ExclusiveLogin sets the exclusive login bit in the - login ORB. kFWSBP2DontSynchronizeMgmtAgent allows simultaneous logins or reconnects to LUNs - with a common management agent (ie LUNs in the same unit directory). - @param loginFlags the login configuration flags. - */ - - virtual void setLoginFlags( UInt32 loginFlags ); - - /*! - @function getLoginFlags - @abstract Returns the currently set login flags. - @discussion Returns the current state of the login flags. Currently there is only one - flag defined for this API. kFWSBP2ExclusiveLogin indicates that the exclusive login bit - should be set in the login ORB. - @result Returns a UInt32 containing the currently set login flags. - */ - - virtual UInt32 getLoginFlags( void ); - - /*! - @function setReconnectTime - @abstract Sets the desired reconnect duration. - @discussion The target and initiator arbitrate the duration of the reconnect timeout. Here - the initiator specifies its desired timeout time in 2^reconnectTime seconds. After a - successful login the device returns the actual timeout value it wishes to use. This value - may be less than the reconnect timeout that the intiator specified if this is all that the - device can support. - @param reconnectTime The desired reconnect timeout encoded as 2^reconnectTime seconds. - */ - - virtual void setReconnectTime( UInt32 reconnectTime ); - - /*! - @function getReconnectTime - @abstract Returns the currently set reconnect time. - @discussion Returns the currently desired initiator reconnect time encoded as 2^time seconds. - @result Returns a UInt32 containing the currently set reconnect time. - */ - - virtual UInt32 getReconnectTime( void ); - - /*! - @function setMaxPayloadSize - @abstract Sets the maximum data transfer length for a normal command ORB. - @discussion Sets the maximum data transfer length for a normal command ORB. This value is - the maximum for all ORBs sent to this LUN. This can be trimmed further on an ORB by ORB basis, - by a similar call in the IOFireWireSBP2ORB itself. - @param reconnectTime The desired maximum payload size in bytes. - */ - - virtual void setMaxPayloadSize( UInt32 maxPayloadSize ); - - /*! - @function getMaxPayloadSize - @abstract Returns the currently set maximum payload size. - @discussion Returns the currently global maximum payload size in bytes. - @result Returns a UInt32 containing the currently set maximum payload size. - */ - - virtual UInt32 getMaxPayloadSize( void ); - - /*! - @function setPassword - @abstract Sets the login password. - @discussion Sets the login password using a buffer and a length. An alternate version exists - that accepts an IOMemoryDescriptor. If the password length is 8 or less the password is copied - directly into the login orb. If the length is greater than 8 the buffer is referenced by address - in the login ORB. In this case the buffer is not copied and should remain allocated for the - duration of the login attempt. - @param buf a pointer to the password buffer. - @param len the length in bytes of the password buffer. - @result Returns kIOReturnSuccess on success. - */ - - virtual IOReturn setPassword( void * buf, UInt32 len ); - - /*! - @function setPassword - @abstract Sets the login password. - @discussion Sets the login password using an IOMemoryDescriptor. An alternate version exists - that accepts a buffer and a length. If the password length is 8 or less the password is copied - directly into the login orb. If the length is greater than 8 the buffer is referenced by address - in the login ORB. - @param memory an IOMemoryDescriptor referencing the password. - @result Returns kIOReturnSuccess on success. - */ - - virtual IOReturn setPassword( IOMemoryDescriptor * memory ); - - - /*! - @function setRefCon - @abstract Sets the login refCon. - @discussion Sets a user defined value on the login that can be retrieved later with the - method getRefCon. - @param refCon a user defined value. - */ - - virtual void setRefCon( void * refCon ); - - /*! - @function getRefCon - @abstract Returns the refCon set with setRefCon. - @discussion Returns the user defined value previously stored in the login with setRefCon. - @result Returns the previously stored user defined value. - */ - - virtual void * getRefCon( void ); - - /*! - @function setBusyTimeoutRegisterValue - @abstract Sets the value to be written to the BUSY_TIMEOUT register. - @discussion 1394-1995 defines a register known as the BUSY_TIMEOUT register. This register - controls the busy retry behavior of your device. The initial value for this register is - 0x00000000. Which means busied transactions will not be retried. Since most devices want - their transactions retired on busy acks, the SBP2 service automatically updates the - BUSY_TIMEOUT register with the value specified here whenever necessary. Most drivers should - set this value to 0x0000000f. - @param timeout desired value of the BUSY_TIMEOUT register. - */ - - virtual void setBusyTimeoutRegisterValue( UInt32 timeout ); - -protected: - - virtual void startORBTimer( IOFireWireSBP2ORB * orb ); - virtual void prepareORBForExecution( IOFireWireSBP2ORB * orb ); - - static IOReturn staticExecuteORB( OSObject *self, void * orb, void *, void *, void * ); - virtual IOReturn executeORB( IOFireWireSBP2ORB * orb ); - -public: - - /*! - @function release - @abstract Primary implementation of the release mechanism. - @discussion See OSObject.h for more information. When retainCount == when then call free(). - */ - - virtual void release() const; - - /*! - @function setLoginRetryCountAndDelayTime - @abstract Sets login retry behavior. - @discussion Sets login retry behavior. - @param retryCount number of times to retry logins - @param uSecs delay time in microseconds between login retries - */ - - virtual void setLoginRetryCountAndDelayTime( UInt32 retryCount, UInt32 uSecs ); - -protected: - virtual IOReturn initialExecuteLogin( void ); - virtual void startLoginRetryTimer( void ); - virtual void stopLoginRetryTimer( void ); - static void loginRetryTimeoutStatic( void *refcon, IOReturn status, - IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - virtual void loginRetryTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd); - - virtual void startReconnectRetryTimer( void ); - virtual void stopReconnectRetryTimer( void ); - static void reconnectRetryTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - virtual void reconnectRetryTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - - virtual bool isORBAppended( IOFireWireSBP2ORB * orb ); - virtual void setORBIsAppended( IOFireWireSBP2ORB * orb, bool state ); - -public: - virtual void setAddressLoForLoginORBAndResponse( UInt32 addressLoORB, UInt32 addresLoResponse ); - - virtual void setLoginGeneration( UInt32 generation ); - virtual void clearLoginGeneration( void ); - -protected: - void startFetchAgentRetryTimer( UInt32 duration ); - void stopFetchAgentRetryTimer( void ); - static void fetchAgentRetryTimerStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - void fetchAgentRetryTimer( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - - void terminateNotify( void ); - void processLoginWrite( void ); - -public: - - bool isPhysicalAccessEnabled( void ); - UInt32 getARDMMax( void ); - -private: - - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 6); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 7); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Login, 8); - - }; - -#endif diff --git a/i386/include/IOKit/sbp2/IOFireWireSBP2ManagementORB.h b/i386/include/IOKit/sbp2/IOFireWireSBP2ManagementORB.h deleted file mode 100644 index 9455383..0000000 --- a/i386/include/IOKit/sbp2/IOFireWireSBP2ManagementORB.h +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - @header IOFireWireSBP2ManagementORB - Contains the class definition for IOFireWireSBP2ManagementORB. -*/ - -#ifndef _IOKIT_IOFIREWIRESBP2MANAGEMENTORB_H -#define _IOKIT_IOFIREWIRESBP2MANAGEMENTORB_H - -#include <IOKit/firewire/IOFWCommand.h> -#include <IOKit/firewire/IOFireWireUnit.h> - -#include <IOKit/IOUserClient.h> - -class IOFireWireSBP2LUN; -class IOFireWireSBP2ManagementORB; -class IOFireWireSBP2ORB; - -enum -{ - kFWSBP2QueryLogins = 1, - kFWSBP2AbortTask = 0xb, - kFWSBP2AbortTaskSet = 0xc, - kFWSBP2LogicalUnitReset = 0xe, - kFWSBP2TargetReset = 0xf -}; - -// Callback when management command completes asynchronously - -/*! - @typedef FWSBP2ManagementCallback - @param refCon Reference constant supplied when the notification was registered. - @param status Indicates success or failure of operation. - @param orb Indicates current orb status is for. -*/ - -typedef void (*FWSBP2ManagementCallback)(void * refCon, IOReturn status, IOFireWireSBP2ManagementORB * orb); - -/*! - @class IOFireWireSBP2ManagementORB - @abstract Supplies non login related management ORBs. Management ORBs can be executed independent - of a login, if necessary. Management ORBs are created using the IOFireWireSBP2LUN interface. -*/ - -class IOFireWireSBP2ManagementORB : public IOFWCommand -{ - OSDeclareDefaultStructors( IOFireWireSBP2ManagementORB ) - - friend class IOFireWireSBP2LUN; - friend class IOFireWireSBP2UserClient; - -protected: - - //////////////////////////////////////// - // rom keys - - enum - { - kUnitCharacteristicsKey = 0x3A, - kManagementAgentOffsetKey = 0x54 - }; - - //////////////////////////////////////// - // structs - - typedef struct - { - UInt32 orbOffsetHi; - UInt32 orbOffsetLo; - UInt32 reserved1[2]; - UInt16 options; - UInt16 loginID; - UInt32 reserved2; - UInt32 statusFIFOAddressHi; - UInt32 statusFIFOAddressLo; - } FWSBP2TaskManagementORB; - - typedef struct - { - UInt32 reserved1[2]; - UInt32 queryResponseAddressHi; - UInt32 queryResponseAddressLo; - UInt16 options; - UInt16 lun; - UInt16 reserved2; - UInt16 queryResponseLength; - UInt32 statusFIFOAddressHi; - UInt32 statusFIFOAddressLo; - } FWSBP2QueryLoginsORB; - - typedef struct - { - UInt8 details; - UInt8 sbpStatus; - UInt16 orbOffsetHi; - UInt32 orbOffsetLo; - UInt32 status[6]; - } FWSBP2StatusBlock; - -protected: - - //////////////////////////////////////// - // friend methods - - // IOFireWireSBP2LUN methods - virtual bool initWithLUN( IOFireWireSBP2LUN * lun, - void * refCon, - FWSBP2ManagementCallback completion ); - - // IOFireWireSBP2UserClient methods - virtual void setAsyncCallbackReference( void * asyncRef ); - virtual void getAsyncCallbackReference( void * asyncRef ); - -protected: - - // reserved for future use - struct ExpansionData - { - bool fInCriticalSection; - }; - ExpansionData * fExpansionData; - - IOFireWireSBP2LUN * fLUN; - IOFireWireUnit * fUnit; - - UInt32 fManagementOffset; - UInt32 fManagementTimeout; - UInt32 fFunction; - OSObject * fManageeCommand; - - // our orb - FWSBP2TaskManagementORB fManagementORB; - IOFWAddressSpace * fManagementORBAddressSpace; - FWAddress fManagementORBAddress; - - // command to write management agent - IOFWWriteCommand * fWriteCommand; - IOMemoryDescriptor * fWriteCommandMemory; - - // timeout - IOFWCommand * fTimeoutCommand; - bool fTimeoutTimerSet; - - // status block - FWSBP2StatusBlock fStatusBlock; - IOFWAddressSpace * fStatusBlockAddressSpace; - FWAddress fStatusBlockAddress; - - // response buffer - void * fResponseBuf; - UInt32 fResponseLen; - IOFWAddressSpace * fResponseAddressSpace; - FWAddress fResponseAddress; - - // competion routine - FWSBP2ManagementCallback fCompletionCallback; - void * fCompletionRefCon; - - // for user client - OSAsyncReference64 fCallbackAsyncRef; - - IOMemoryMap * fResponseMap; - - bool fCompleting; - - //////////////////////////////////////// - - // init / destroy - virtual IOReturn getUnitInformation( void ); - virtual IOReturn allocateResources( void ); - virtual void free( void ); - - // command execution - virtual IOReturn execute( void ); - virtual IOReturn complete( IOReturn state ); - - // write complete handler - static void writeCompleteStatic( void *refcon, - IOReturn status, - IOFireWireNub *device, - IOFWCommand *fwCmd ); - virtual void writeComplete( IOReturn status, - IOFireWireNub *device, - IOFWCommand *fwCmd ); - - // timeout handler - static void handleTimeoutStatic( void *refcon, - IOReturn status, - IOFireWireBus *bus, - IOFWBusCommand *fwCmd ); - virtual void handleTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - - // status block write handler - static UInt32 statusBlockWriteStatic( void *refcon, - UInt16 nodeID, - IOFWSpeed &speed, - FWAddress addr, - UInt32 len, - const void *buf, - IOFWRequestRefCon lockRead ); - virtual UInt32 statusBlockWrite( UInt16 nodeID, - FWAddress addr, - UInt32 len, - const void *buf, - IOFWRequestRefCon lockRead ); - - // IOFireWireSBP2LUN friend class wrappers - virtual void clearAllTasksInSet( void ); - virtual void removeManagementORB( IOFireWireSBP2ManagementORB * orb ); - -public: - - //////////////////////////////////////// - // client methods - - /*! - @function setCommandFunction - @abstract Sets the function of the management ORB. - @discussion Sets the the function of the management ORB. Legal values are kFWSBP2QueryLogins, - kFWSBP2AbortTask, kFWSBP2AbortTaskSet, kFWSBP2LogicalUnitReset, and kFWSBP2TargetReset. - @param function a value indicating the desired management function. - @result Returns kIOReturnSuccess if function was a legal function. - */ - - virtual IOReturn setCommandFunction( UInt32 function ); - - /*! - @function getCommandFunction - @abstract Returns the current function of the management ORB. - @discussion Returns the function of the management ORB. This is the same value that was - set with setCommandFunction. - @result Returns the function of the management ORB. - */ - - virtual UInt32 getCommandFunction( void ); - - /*! - @function setManageeCommand - @abstract Sets the command to be managed by the management ORB. - @discussion All management functions except kFWSBP2QueryLogins require a reference to an ORB of - some sort. kFWSBP2AbortTaskSet, kFWSBP2LogicalUnitReset, and kFWSBP2TargetReset require a - reference to the login ORB. kFWSBP2AbortTask requires a reference to the ORB to be aborted. - This method allows you to set the ORB to be managed. - @param command a reference to an IOFireWireSBP2Login or an IOFireWireSBP2ORB. - */ - - virtual void setManageeCommand( OSObject * command ); - - /*! - @function getCommandFunction - @abstract Returns the current managee command of the management ORB. - @discussion Returns the current managee command of the management ORB. This is the same value that was - set with setManageeCommand. - @result Returns the current managee command of the management ORB. - */ - - virtual OSObject* getManageeCommand( void ); - - /*! - @function setResponseBuffer - @abstract Sets the response buffer for the management ORB. - @discussion Sets the response buffer for the management ORB. kFWSBP2QueryLogins returns - a response to its query and needs to write it somewhere. This routine allows you to - specify the location. - @param desc memory descriptor for buffer. - @result Returns kIOReturnSuccess on a success. - */ - - virtual IOReturn setResponseBuffer( IOMemoryDescriptor * desc ); - - /*! - @function setResponseBuffer - @abstract Sets the response buffer for the management ORB. - @discussion Sets the response buffer for the management ORB. kFWSBP2QueryLogins returns - a response to its query and needs to write it somewhere. This routine allows you to - specify the location. - @param buf backing store for buffer - @param len length of buffer. - @result Returns kIOReturnSuccess on a success. - */ - - virtual IOReturn setResponseBuffer( void * buf, UInt32 len ); - - /*! - @function getResponseBuffer - @abstract Returns the response buffer for the management ORB. - @discussion Returns the response buffer set in setResponseBuffer above - @param desc memory descriptor for buffer. - @param buf output parameter for backing store for buffer - @param len output parameter for length of buffer. - */ - - virtual void getResponseBuffer( void ** buf, UInt32 * len ); - - /*! - @function release - @abstract Primary implementation of the release mechanism. - @discussion See OSObject.h for more information. - @param when When retainCount == when then call free(). - */ - - virtual void release() const; - -protected: - - virtual void setORBToDummy( IOFireWireSBP2ORB * orb ); - - virtual void suspendedNotify(); - -private: - - OSMetaClassDeclareReservedUsed(IOFireWireSBP2ManagementORB, 0); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 1); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 2); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 3); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 4); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 5); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 6); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 7); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ManagementORB, 8); - -}; - -#endif \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/IOFireWireSBP2ORB.h b/i386/include/IOKit/sbp2/IOFireWireSBP2ORB.h deleted file mode 100644 index 5c11593..0000000 --- a/i386/include/IOKit/sbp2/IOFireWireSBP2ORB.h +++ /dev/null @@ -1,547 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - @header IOFireWireSBP2ORB - Contains the class definition for IOFireWireSBP2ORB. -*/ - -#ifndef _IOKIT_IOFIREWIRESBP2ORB_H -#define _IOKIT_IOFIREWIRESBP2ORB_H - -#include <IOKit/firewire/IOFireWireUnit.h> - -#include <IOKit/IOBufferMemoryDescriptor.h> -#include <IOKit/IOUserClient.h> -#include <IOKit/IODMACommand.h> - -enum -{ - kFWSBP2ConstraintForceDoubleBuffer = (1 << 0) -}; - -// login option flags -enum -{ - kFWSBP2CommandCompleteNotify = (1 << 0), - kFWSBP2CommandTransferDataFromTarget = (1 << 1), - kFWSBP2CommandImmediate = (1 << 2), - - kFWSBP2CommandNormalORB = (1 << 5), - kFWSBP2CommandReservedORB = (1 << 6), - kFWSBP2CommandVendorORB = (1 << 7), - kFWSBP2CommandDummyORB = (1 << 8), - kFWSBP2CommandCheckGeneration = (1 << 9), - - kFWSBP2CommandFixedSize = (1 << 10), - kFWSBP2CommandVirtualORBs = (1 << 11) // handy for debugging -}; - -enum -{ - kFWSBP2MaxPageClusterSize = 0xf000 -}; - -class IOFireWireSBP2ORB; -class IOFireWireSBP2LUN; -class IOFireWireSBP2Login; - -/*! - @class IOFireWireSBP2ORB - @abstract Represents an SBP2 normal command ORB. Supplies the APIs for configuring normal - command ORBs. This includes setting the command block and writing the page tables for I/O. - The ORBs are executed using the submitORB method in IOFireWireSBP2Login. -*/ - -class IOFireWireSBP2ORB : public IOCommand -{ - OSDeclareDefaultStructors( IOFireWireSBP2ORB ) - - friend class IOFireWireSBP2Login; - friend class IOFireWireSBP2ManagementORB; - -protected: - - typedef struct - { - UInt32 nextORBAddressHi; - UInt32 nextORBAddressLo; - UInt32 dataDescriptorHi; - UInt32 dataDescriptorLo; - UInt16 options; - UInt16 dataSize; - UInt32 commandBlock[1]; // will be variable sized - } FWSBP2ORB; - - typedef struct - { - UInt16 segmentLength; - UInt16 segmentBaseAddressHi; - UInt32 segmentBaseAddressLo; - } FWSBP2PTE; - -private: - - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 0); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 1); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 2); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 3); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 4); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 5); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 6); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 7); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2ORB, 8); - -protected: - - virtual void deallocateBufferAddressSpace( void ); - virtual IOReturn allocateTimer( void ); - virtual void deallocateTimer( void ); - - /*! - @function deallocatePageTable - @abstract Frees up memory allocated for the page table. - @discussion Frees all memory associated with the page table. Undoes what allocatePageTable does. - Calling allocatePageTable again will automatically deallocate the existing page table before - allocating a new one, so this method is not used in most cases. - */ - - virtual void deallocatePageTable( void ); - -protected: - - // IOFireWireSBP2Login methods - virtual bool initWithLogin( IOFireWireSBP2Login * login ); - virtual void setNextORBAddress( FWAddress address ); - -public: - - /*! - @function allocatePageTable - @abstract Allocates memory for the page table. - @discussion Page table allocation is handle automatically by the ORB, except if the - kFWSBP2CommandFixedSize flags is set. In this case we will fail to write a page table if we - need more page table space than we have already. This method is exposed so these drivers - can preallocate as much page table as they need. This is useful if your driver is part of - the paging path and cannot allow allocations to occur. - @param entryCount number of entries of page table to be allocated. - */ - - virtual IOReturn allocatePageTable( UInt32 entryCount ); - -protected: - - virtual bool isTimerSet( void ); - virtual void cancelTimer( void ); - -protected: - - // reserved for future use - struct ExpansionData { }; - ExpansionData *reserved; - - IOFireWireSBP2Login * fLogin; - IOFireWireSBP2LUN * fLUN; - IOFireWireUnit * fUnit; - IOFireWireController * fControl; - IODMACommand * fDMACommand; - void * fUnused2; - - UInt32 fCommandFlags; - UInt32 fMaxPayloadSize; - UInt32 fTimeoutDuration; - UInt32 fGeneration; - UInt64 fRefCon; - - // - // orb - // - - IOMemoryDescriptor * fORBDescriptor; - FWSBP2ORB * fORBBuffer; - - FWAddress fORBPseudoAddress; - IOFWAddressSpace * fORBPseudoAddressSpace; - - IOFWAddressSpace * fORBPhysicalAddressSpace; - FWAddress fORBPhysicalAddress; - - // - // page table - // - - UInt32 fPageTableSize; - IOBufferMemoryDescriptor * fPageTableDescriptor; - - IOFWAddressSpace * fPageTablePhysicalAddressSpace; - FWAddress fPageTablePhysicalAddress; - UInt32 fPageTablePhysicalLength; - - IOFWAddressSpace * fPageTablePseudoAddressSpace; - FWAddress fPageTablePseudoAddress; - - // - // buffers - // - - IOFWAddressSpace * fBufferAddressSpace; - bool fBufferAddressSpaceAllocated; - IOMemoryDescriptor * fBufferDescriptor; - - // - // timer - // - - IOFWDelayCommand * fTimeoutCommand; - bool fTimeoutTimerSet; - - bool fInProgress; - bool fIsAppended; - - UInt32 fFetchAgentWriteRetries; - UInt32 fPTECount; - UInt32 fFetchAgentWriteRetryInterval; - - UInt32 fConstraintOptions; - - virtual IOReturn allocateResources( void ); - virtual void free( void ); - - // orb timeout handler - static void orbTimeoutStatic( void *refcon, IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - virtual void orbTimeout( IOReturn status, IOFireWireBus *bus, IOFWBusCommand *fwCmd ); - - // login friend class wrappers - virtual IOFireWireUnit * getFireWireUnit( void ); - virtual IOFireWireSBP2LUN * getFireWireLUN( void ); - virtual void deallocateORB( void ); - virtual IOReturn allocateORB( UInt32 orbSize ); - virtual IOReturn removeORB( IOFireWireSBP2ORB * orb ); - virtual void prepareORBForExecution( void ); - virtual void startTimer( void ); - virtual void sendTimeoutNotification( IOFireWireSBP2ORB * orb ); - -public: - - /*! - @function release - @abstract Primary implementation of the release mechanism. - @discussion See OSObject.h for more information. - @param when When retainCount == when then call free(). - */ - - virtual void release() const; - - /*! - @function getLogin - @abstract Gets the login associated with this ORB. - @discussion Returns the IOFireWireSBP2Login object associated with this ORB. - @result Returns a pointer to an IOFireWireSBP2Login. - */ - - virtual IOFireWireSBP2Login * getLogin( void ); - - /*! - @function setCommandBuffersAsRanges - @abstract Creates a page table from a list of ranges. - @discussion Creates a page table with the given parameters. Any addresses mapped by this method - must remain valid until setCommandBuffers is called again or releaseCommandBuffers is called. - The SBP2 services do not release references to the command buffers just because the command - has completed. - @param ranges An array of ranges representing the data to be transfered. - @param withCount The number of ranges in the ranges array. - @param withDirection An IODirection indicating the direction of data transfer. - @param withTask The task that these adressses reside in. - @param offset Offset in bytes into data to begin writing table at. - @param length Number of bytes of data to map from offset. - @result Returns KIOReturnSuccess if the page table was written successfully. - */ - - virtual IOReturn setCommandBuffersAsRanges( IOVirtualRange * ranges, - UInt32 withCount, - IODirection withDirection, - task_t withTask, - UInt32 offset = 0, - UInt32 length = 0 ); - /*! - @function setCommandBuffersAsRanges - @abstract Creates a page table from a list of ranges. - @discussion Creates a page table with the given parameters. Any addresses mapped by this method - must remain valid until setCommandBuffers is called again or releaseCommandBuffers is called. - The SBP2 services do not release references to the command buffers just because the command - has completed. - @param memoryDescriptor IOMemoryDescriptor describe ranges to be written to a page table. - @param offset Offset in bytes into data to begin writing table at. - @param length Number of bytes of data to map from offset. - @result Returns KIOReturnSuccess if the page table was written successfully. - */ - - virtual IOReturn setCommandBuffers( IOMemoryDescriptor * memoryDescriptor, UInt32 offset = 0, - UInt32 length = 0 ); - - - /*! - @function releaseCommandBuffers - @abstract Releases SBP2's reference to the command buffers. - @discussion When you create a page table with one of the variants of setCommandBuffers. - SBP2 holds on to a reference to the buffers until this method is called. This means that - if a command completed and you manipulated the memory descriptor or released the buffers - without calling this method you could leave FW in an inconsistent state. - @result Returns KIOReturnSuccess if the page table was cleared successfully. - */ - - virtual IOReturn releaseCommandBuffers( void ); - - /*! - @function setCommandBlock - @abstract Sets the command block portion of the ORB. - @discussion Copys the data provided in the buffer to the command block portion of the ORB. - @param buffer Pointer to buffer to copy command block from. - @param length Number of bytes of data to copy. - @result Returns KIOReturnSuccess if the command block was updated successfully. - */ - - virtual IOReturn setCommandBlock( void * buffer, UInt32 length ); - - /*! - @function setCommandBlock - @abstract Sets the command block portion of the ORB. - @discussion Copys the data provided in the buffer to the command block portion of the ORB. - @param memory IOMemoryDescriptor representing the command block buffer. - @result Returns KIOReturnSuccess if the command block was updated successfully. - */ - - virtual IOReturn setCommandBlock( IOMemoryDescriptor * memory ); - - /*! - @function getCommandBufferDescriptor - @abstract Returns the memory descriptor representing the command buffer. - @discussion Returns the IOMemoryDescriptor for the data mapped by setCommandBuffer variants. - Works for setCommandBuffersAsRanges too. - @result Returns memory descriptor representing mapped data buffers. - */ - - virtual IOMemoryDescriptor * getCommandBufferDescriptor( void ); - - // accessors - - /*! - @function setCommandFlags - @abstract Sets configuration flags for the ORB. - @discussion Sets the configuration flags for the ORB. These can be any of the following: - <p>kFWSBP2CommandCompleteNotify - Set the notify bit as specified in SBP2 standard. Set to receive completion/timeout notification on this ORB. You almost always want to set this.</p> - <p>kFWSBP2CommandTransferDataFromTarget - Transfer direction as specified in SBP2 standard. Set if data is to be written by the device into the host's memory.</p> - <p>kFWSBP2CommandImmediate - Immediate Append. ORB address will be written to fetch agent and not chained. It is only legal to have one immediate ORB in progress at a time.</p> - <p>kFWSBP2CommandNormalORB - ORB format 0 - Format specified by SBP2 standard. Set this for most ORBs.</p> - <p>kFWSBP2CommandReservedORB - ORB format 1 - Format reserved by SBP2 standard for future standardization.</p> - <p>kFWSBP2CommandVendorORB - ORB format 2 - Format specified by SBP2 standard for vendor dependent ORBs.</p> - <p>kFWSBP2CommandDummyORB - ORB format 3 - Format specified by SBP2 standard for dummy ORBs.</p> - <p>kFWSBP2CommandCheckGeneration - If set upon submitORB, the ORB will only be appended if generation set with setCommandGeneration() matches the current generation. Pretty much all SBP2 drivers need sophisticated logic to track login state, so this is generally not used. </p> - <p>kFWSBP2CommandFixedSize - Do not allocate more memory for page table if needed. If there is not enough space in the currently allocated page table, the setCommandBuffers call will fail. This is important to set if your device is the backing store, as we don't want to cause memory allocations on the paging path. </p> - <p>kFWSBP2CommandVirtualORBs - Normally ORBs are backed by physical address spaces. Setting this flag makes this ORB backed by a pseudo address space. This can make ORBs easier to see in a bus trace. Virtual ORBs will have an address in the form of ffcX.XXXX.0000.0000. Pseudo address space backed ORBs are slower, so you won't want to set for deployment builds.</p> - @param flags The flags to be set. - */ - - virtual void setCommandFlags( UInt32 flags ); - - /*! - @function getCommandFlags - @abstract Sets configuration flags for the ORB. - @discussion Returns the current configuration flags set on this ORB. - @result Return The current ORB flags. - */ - - virtual UInt32 getCommandFlags( void ); - - /*! - @function setMaxPayloadSize - @abstract Sets max payload size for the ORB. - @discussion This sets the maximum payload size for this ORB only. This size is clipped by - the global max payload size set in the login object. - @param maxPayloadSize The maximum payload size in bytes. - */ - - virtual void setMaxPayloadSize( UInt32 maxPayloadSize ); - - /*! - @function getMaxPayloadSize - @abstract Gets max payload size for the ORB. - @discussion This gets the maximum payload size for this ORB only. - @result Returns the maximum payload size in bytes. - */ - - virtual UInt32 getMaxPayloadSize( void ); - - /*! - @function setCommandTimeout - @abstract Sets the timeout of the ORB. - @discussion This sets the timeout for the ORB in milliseconds. Note that ORBs without timeouts - can be "lost." You will obviously not recieve timeout notification for timeouts of zero. But - perhaps less obviously you will not recieve orb reset notification, which is really a sort of - accelerated timeout notification for bus reset situations. - @param timeout The timeout duration in milliseconds. - */ - - virtual void setCommandTimeout( UInt32 timeout ); - - /*! - @function getCommandTimeout - @abstract Gets the timeout of the ORB. - @discussion This method gets the timeout for this ORB in milliseconds. - @result Returns the timeout for the orb in milliseconds. - */ - - virtual UInt32 getCommandTimeout( void ); - - - /*! - @function setCommandGeneration - @abstract Sets the command generation. - @discussion This sets the bus generation this ORB should be appended in. It is only meaningful - when combined with the kFWSBP2CommandCheckGeneration flags above. - @param gen The bus generation for command execution. - */ - - virtual void setCommandGeneration( UInt32 gen ); - - /*! - @function getCommandGeneration - @abstract Gets the command generation. - @discussion This gets the bus generation this ORB should be appended in. - @result Returns the bus generation for command execution. - */ - - virtual UInt32 getCommandGeneration( void ); - - /*! - @function setRefCon - @abstract Sets the ORB refCon. - @discussion Sets a user defined value on the ORB that can be retrieved later with the - method getRefCon. - @param refCon a user defined value. - */ - - virtual void setRefCon( void * refCon ); - - /*! - @function getRefCon - @abstract Returns the refCon set with setRefCon. - @discussion Returns the user defined value previously stored in the ORB with setRefCon. - @result Returns the previously stored user defined value. - */ - - virtual void * getRefCon( void ); - -protected: - - virtual void setToDummy( void ); - -public: - /*! - @function getORBAddress - @abstract Returns the FireWire address of this ORB. - @discussion Returns the FireWire bus address of this ORB. This is not the same as the Macintosh - address for the IOFireWireSBP2ORB. - @result Returns the FireWire address of this ORB. - */ - - virtual void getORBAddress( FWAddress * address ); - -protected: - - virtual bool isAppended( void ); - virtual void setIsAppended( bool state ); - virtual UInt32 getFetchAgentWriteRetries( void ); - virtual void setFetchAgentWriteRetries( UInt32 retries ); - - virtual void prepareFastStartPacket( IOBufferMemoryDescriptor * descriptor ); - - UInt32 getFetchAgentWriteRetryInterval( void ); - void setFetchAgentWriteRetryInterval( UInt32 interval ); - - IOReturn completeBufferAddressSpace( void ); - IOReturn prepareBufferAddressSpace( IOMemoryDescriptor * memoryDescriptor ); - -public: - - /*! - @function setBufferConstraints - @abstract Configures page table generation parameters - @discussion Sets the maximums size of any page table segment and the required alignemnt. Double buffering - may be used to satisfy these constraints. The only supported option is kFWSBP2ConstraintForceDoubleBuffer which - forces a page aligned double buffering of the entire descriptor. - @result May return an error if there is a problem allocating the underlying resources or if buffers are currently attached. - */ - - IOReturn setBufferConstraints( UInt64 maxSegmentSize, UInt32 alignment, UInt32 options = 0); - - - /*! - @function setCommandBuffersAsRanges64 - @abstract Creates a page table from a list of 64 bit ranges. - @discussion Creates a page table with the given parameters. Any addresses mapped by this method - must remain valid until setCommandBuffers is called again or releaseCommandBuffers is called. - The SBP2 services do not release references to the command buffers just because the command - has completed. This is a 64 bit compatible version of setCommandBuffersAsRanges. - @param ranges An array of ranges representing the data to be transfered. - @param withCount The number of ranges in the ranges array. - @param withDirection An IODirection indicating the direction of data transfer. - @param withTask The task that these adressses reside in. - @param offset Offset in bytes into data to begin writing table at. - @param length Number of bytes of data to map from offset. - @result Returns KIOReturnSuccess if the page table was written successfully. - */ - - IOReturn setCommandBuffersAsRanges64( IOAddressRange * ranges, - uint64_t withCount, - IODirection withDirection, - task_t withTask, - uint64_t offset = 0, - uint64_t length = 0); - - /*! - @function setRefCon64 - @abstract Sets the ORB refCon as a 64 bit value. - @discussion Sets a user defined value on the ORB that can be retrieved later with the - method getRefCon. - @param refCon a user defined value. - */ - - virtual void setRefCon64( UInt64 refCon ); - - /*! - @function getRefCon64 - @abstract Returns the 64 bit refCon set with setRefCon64. - @discussion Returns the user defined value previously stored in the ORB with setRefCon. - @result Returns the previously stored user defined value. - */ - - virtual UInt64 getRefCon64( void ); - -protected: - - UInt32 calculateTransferSizeLog( bool * clipping ); - - -}; - -#endif diff --git a/i386/include/IOKit/sbp2/IOFireWireSBP2Target.h b/i386/include/IOKit/sbp2/IOFireWireSBP2Target.h deleted file mode 100644 index 4288ce9..0000000 --- a/i386/include/IOKit/sbp2/IOFireWireSBP2Target.h +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - @header IOFireWireSBP2Target - Contains the class definition for IOFireWireSBP2Target. -*/ - -#ifndef _IOKIT_IOFIREWIRESBP2TARGET_H -#define _IOKIT_IOFIREWIRESBP2TARGET_H - -#include <IOKit/firewire/IOFireWireUnit.h> -#include <IOKit/IOService.h> - -enum -{ - kIOFWSBP2FailsOnAckBusy = (1 << 0), - kIOFWSBP2FailsOnBusResetsDuringIO = (1 << 1), - kIOFWSBP2DontUsePTPacketLimit = (1 << 2) -}; - -/*! - @class IOFireWireSBP2Target - @abstract Serves as bridge between IOFireWireUnit and IOFireWireLUN. - @discussion Matches against IOFireWireUnits supporting the SBP2 protocol. Creates IOFireWireSBP2LUN nubs for matching. Most drivers will match against an IOFireWireSBP2LUN, but matching against an IOFireWireSBP2Target is also supported. This can be useful in cases where a single driver wishes to - control all LUNs on a device. Support for this technique is minimal, however, and the driver will be - required to discover it's LUNs through the registry. -*/ - -class IOFireWireSBP2Target : public IOService -{ - OSDeclareDefaultStructors(IOFireWireSBP2Target); - -protected: - - ///////////////////////////////////////// - // rom keys - - enum - { - kCmdSpecIDKey = 0x38, - kCmdSetKey = 0x39, - kSoftwareRevKey = 0x3b, - kFirmwareRevKey = 0x3c, - kLUNKey = 0x14, - kLUNDirectoryKey = 0xd4, - kManagementAgentOffsetKey = 0x54, - kUnitCharacteristicsKey = 0x3A, - kRevisionKey = 0x21, - kFastStartKey = 0x3E - }; - - typedef struct - { - UInt32 cmdSpecID; - UInt32 cmdSet; - UInt32 vendorID; - UInt32 softwareRev; - UInt32 firmwareRev; - UInt32 lun; - UInt32 devType; - UInt32 unitCharacteristics; - UInt32 managementOffset; - UInt32 revision; - bool fastStartSupported; - UInt32 fastStart; - } LUNInfo; - - // reserved for future use - struct ExpansionData - { - bool fStarted; - OSArray * fPendingMgtAgentCommands ; - UInt32 fNumberPendingMgtAgentOrbs; - UInt32 fNumLUNs; - }; - ExpansionData * fExpansionData; - - ///////////////////////////////////////// - // private fields - - bool fOpenFromTarget; - UInt32 fOpenFromLUNCount; - IOFireWireUnit * fProviderUnit; - UInt32 fFlags; - - IOFireWireController * fControl; - - UInt32 fIOCriticalSectionCount; - - ///////////////////////////////////////// - // private internals - - virtual void free( void ); - virtual IOReturn message( UInt32 type, - IOService * provider, - void * argument = 0); - - virtual void scanForLUNs( void ); - IOReturn createLUN( LUNInfo * info ); - -public: - - ///////////////////////////////////////// - // public methods - - /*! @function handleOpen - @abstract Overrideable method to control the open / close behaviour of an IOService. - @discussion See IOService for discussion. - @param forClient Designates the client of the provider requesting the open. - @param options Options for the open, may be interpreted by the implementor of handleOpen. - @result Return true if the open was successful, false otherwise. */ - - virtual bool handleOpen( IOService * forClient, IOOptionBits options, void * arg ); - - /*! - @function handleClose - @abstract Overrideable method to control the open / close behaviour of an IOService. - @discussion See IOService for discussion. - @param forClient Designates the client of the provider requesting the close. - @param options Options for the close, may be interpreted by the implementor of handleOpen. - */ - - virtual void handleClose( IOService * forClient, IOOptionBits options ); - - /*! - @function handleIsOpen - @abstract Overrideable method to control the open / close behaviour of an IOService. - @discussion See IOService for discussion. - @param forClient If non-zero, isOpen returns the open state for that client. If zero is passed, isOpen returns the open state for all clients. - @result Returns true if the specific, or any, client has the IOService open. - */ - - virtual bool handleIsOpen( const IOService * forClient ) const; - - /*! - @function start - @abstract During an IOService instantiation, the start method is called when the IOService has been selected to run on the provider. - @discussion See IOService for discussion. - @result Return true if the start was successful, false otherwise (which will cause the instance to be detached and usually freed). - */ - - virtual bool start( IOService *provider ); - - /*! - @function stop - @abstract During an IOService termination, the stop method is called in its clients before they are detached & it is destroyed. - @discussion See IOService for discussion. - */ - - virtual void stop( IOService *provider ); - - /*! - @function getFireWireUnit - @abstract Returns an IOFireWireUnit object. - @discussion An IOFireWireUnit is the provider of an IOFireWireSBP2Target. In order to use the base FireWire services - you will need a reference to the unit. This method returns that reference. - @result Returns a pointer to an IOFireWireUnit. - */ - - virtual IOFireWireUnit * getFireWireUnit( void ); - - /*! - @function matchPropertyTable - @abstract Implements SBP2 specific matching. - @discussion See IOService for discussion. - @param table The dictionary of properties to be matched against. - @result Returns false if the family considers the matching dictionary does not match in properties it understands, true otherwise. - */ - - virtual bool matchPropertyTable( OSDictionary * table ); - - virtual void setTargetFlags( UInt32 flags ); - virtual UInt32 getTargetFlags( void ); - -protected: - virtual void configurePhysicalFilter( void ); - -public: - virtual void clearTargetFlags( UInt32 flags ); - virtual IOReturn beginIOCriticalSection( void ); - virtual void endIOCriticalSection( void ); - - virtual bool finalize( IOOptionBits options ); - - IOReturn synchMgmtAgentAccess( IOFWCommand * mgmtOrbCommand ); - void completeMgmtAgentAccess( ); - void clearMgmtAgentAccess( ); - void cancelMgmtAgentAccess( IOFWCommand * mgmtOrbCommand ); - -protected: - - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 0); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 1); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 2); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 3); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 4); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 5); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 6); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 7); - OSMetaClassDeclareReservedUnused(IOFireWireSBP2Target, 8); - -}; - -#endif diff --git a/i386/include/IOKit/sbp2/IOFireWireSBP2UserClient.h b/i386/include/IOKit/sbp2/IOFireWireSBP2UserClient.h deleted file mode 100644 index 939dbf0..0000000 --- a/i386/include/IOKit/sbp2/IOFireWireSBP2UserClient.h +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOFIREWIRESBP2USERCLIENT_H -#define _IOKIT_IOFIREWIRESBP2USERCLIENT_H - -#include <IOKit/IOUserClient.h> - -#define FIREWIREPRIVATE -#include <IOKit/firewire/IOFireWireController.h> -#undef FIREWIREPRIVATE - -#include <IOKit/firewire/IOFWUserObjectExporter.h> - -#include <IOKit/sbp2/IOFireWireSBP2UserClientCommon.h> -#include <IOKit/sbp2/IOFireWireSBP2LUN.h> - -class IOFireWireSBP2UserClient : public IOUserClient -{ - OSDeclareDefaultStructors(IOFireWireSBP2UserClient) - -protected: - - bool fOpened; - bool fStarted; - IOFireWireSBP2Login * fLogin; - task_t fTask; - - IOFireWireSBP2LUN * fProviderLUN; - OSAsyncReference64 fMessageCallbackAsyncRef; - OSAsyncReference64 fLoginCallbackAsyncRef; - OSAsyncReference64 fLogoutCallbackAsyncRef; - OSAsyncReference64 fUnsolicitedStatusNotifyAsyncRef; - OSAsyncReference64 fStatusNotifyAsyncRef; - OSAsyncReference64 fFetchAgentResetAsyncRef; - OSAsyncReference64 fFetchAgentWriteAsyncRef; - - IOFWUserObjectExporter * fExporter; - - IOFireWireLib::UserObjectHandle fSessionRef; - - virtual IOReturn externalMethod( uint32_t selector, - IOExternalMethodArguments * args, - IOExternalMethodDispatch * dispatch, - OSObject * target, - void * reference ); -public: - - virtual bool initWithTask( task_t owningTask, void * securityToken, UInt32 type, OSDictionary * properties ); - virtual void free (); - - virtual bool start( IOService * provider ); - - virtual IOReturn clientClose( void ); - virtual IOReturn clientDied( void ); - - // IOFireWireSBP2ManagementORB friend class wrappers - virtual void flushAllManagementORBs( void ); - - ///////////////////////////////////////////////// - // IOFireWireSBP2LUN - - IOReturn open( IOExternalMethodArguments * arguments ); - IOReturn openWithSessionRef( IOExternalMethodArguments * arguments ); - IOReturn getSessionRef( IOExternalMethodArguments * arguments ); - IOReturn close( IOExternalMethodArguments * arguments ); - - // callbacks - IOReturn setMessageCallback( IOExternalMethodArguments * arguments ); - virtual IOReturn message( UInt32 type, IOService * provider, void * arg ); - - ///////////////////////////////////////////////// - // IOFireWireSBP2Login - - IOReturn setLoginCallback( IOExternalMethodArguments * arguments ); - IOReturn setLogoutCallback( IOExternalMethodArguments * arguments ); - IOReturn setUnsolicitedStatusNotify( IOExternalMethodArguments * arguments ); - IOReturn setStatusNotify( IOExternalMethodArguments * arguments ); - IOReturn createLogin( IOExternalMethodArguments * arguments ); - IOReturn releaseLogin( IOExternalMethodArguments * arguments ); - IOReturn submitLogin( IOExternalMethodArguments * arguments ); - IOReturn submitLogout( IOExternalMethodArguments * arguments ); - IOReturn setLoginFlags( IOExternalMethodArguments * arguments ); - IOReturn getMaxCommandBlockSize( IOExternalMethodArguments * arguments ); - IOReturn getLoginID( IOExternalMethodArguments * arguments ); - IOReturn setReconnectTime( IOExternalMethodArguments * arguments ); - IOReturn setMaxPayloadSize( IOExternalMethodArguments * arguments ); - - IOReturn submitFetchAgentReset( IOExternalMethodArguments * arguments ); - IOReturn setFetchAgentWriteCompletion( IOExternalMethodArguments * arguments ); - IOReturn ringDoorbell( IOExternalMethodArguments * arguments ); - IOReturn enableUnsolicitedStatus( IOExternalMethodArguments * arguments ); - IOReturn setBusyTimeoutRegisterValue( IOExternalMethodArguments * arguments ); - IOReturn setPassword( IOExternalMethodArguments * arguments ); - - // callbacks - - static void staticLoginCallback( void * refCon, FWSBP2LoginCompleteParamsPtr params ); - virtual void loginCallback( FWSBP2LoginCompleteParamsPtr params ); - - static void staticLogoutCallback( void * refCon, FWSBP2LogoutCompleteParamsPtr params ); - virtual void logoutCallback( FWSBP2LogoutCompleteParamsPtr params ); - - static void staticStatusNotify( void * refCon, FWSBP2NotifyParams * params ); - virtual void statusNotify( FWSBP2NotifyParams * params ); - - static void staticUnsolicitedNotify( void * refCon, FWSBP2NotifyParams * params ); - virtual void unsolicitedNotify( FWSBP2NotifyParams * params ); - - static void staticFetchAgentWriteComplete( void * refCon, IOReturn status, IOFireWireSBP2ORB * orb ); - virtual void fetchAgentWriteComplete( IOReturn status, IOFireWireSBP2ORB * orb ); - - static void staticFetchAgentResetComplete( void * refCon, IOReturn status ); - virtual void fetchAgentResetComplete( IOReturn status ); - - ///////////////////////////////////////////////// - // IOFireWireSBP2ORB - - IOReturn createORB( IOExternalMethodArguments * arguments ); - IOReturn releaseORB( IOExternalMethodArguments * arguments ); - IOReturn submitORB( IOExternalMethodArguments * arguments ); - IOReturn setCommandFlags( IOExternalMethodArguments * arguments ); - IOReturn setORBRefCon( IOExternalMethodArguments * arguments ); - IOReturn setMaxORBPayloadSize( IOExternalMethodArguments * arguments ); - IOReturn setCommandTimeout( IOExternalMethodArguments * arguments ); - IOReturn setCommandGeneration( IOExternalMethodArguments * arguments ); - IOReturn setToDummy( IOExternalMethodArguments * arguments ); - IOReturn setCommandBuffersAsRanges( IOExternalMethodArguments * arguments ); - IOReturn releaseCommandBuffers( IOExternalMethodArguments * arguments ); - IOReturn setCommandBlock( IOExternalMethodArguments * arguments ); - - // LSI workaround - IOReturn LSIWorkaroundSetCommandBuffersAsRanges( IOExternalMethodArguments * arguments ); - IOReturn LSIWorkaroundSyncBuffersForOutput( IOExternalMethodArguments * arguments ); - IOReturn LSIWorkaroundSyncBuffersForInput( IOExternalMethodArguments * arguments ); - - ///////////////////////////////////////////////// - // IOFireWireSBP2MgmtORB - - IOReturn createMgmtORB( IOExternalMethodArguments * arguments ); - IOReturn releaseMgmtORB( IOExternalMethodArguments * arguments ); - IOReturn setMgmtORBCallback( IOExternalMethodArguments * arguments ); - IOReturn submitMgmtORB( IOExternalMethodArguments * arguments ); - IOReturn setMgmtORBCommandFunction( IOExternalMethodArguments * arguments ); - IOReturn setMgmtORBManageeORB( IOExternalMethodArguments * arguments ); - IOReturn setMgmtORBManageeLogin( IOExternalMethodArguments * arguments ); - IOReturn setMgmtORBResponseBuffer( IOExternalMethodArguments * arguments ); - - // callbacks - static void staticMgmtORBCallback( void * refCon, IOReturn status, IOFireWireSBP2ManagementORB * orb ); - virtual void mgmtORBCallback( IOReturn status, IOFireWireSBP2ManagementORB * orb ); - - // IOFireWireSBP2MgmtORB friend class wrappers - virtual void setMgmtORBAsyncCallbackReference( IOFireWireSBP2ManagementORB * orb, void * asyncRef ); - virtual void getMgmtORBAsyncCallbackReference( IOFireWireSBP2ManagementORB * orb, void * asyncRef ); - - uint32_t checkScalarInputCount; - uint32_t checkStructureInputSize; - uint32_t checkScalarOutputCount; - uint32_t checkStructureOutputSize; - - IOReturn checkArguments( IOExternalMethodArguments * args, uint32_t scalarInCount, uint32_t structInCount, - uint32_t scalarOutCount, uint32_t structOutCount ); - -}; - -#endif \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/IOFireWireSBP2UserClientCommon.h b/i386/include/IOKit/sbp2/IOFireWireSBP2UserClientCommon.h deleted file mode 100644 index cb114ba..0000000 --- a/i386/include/IOKit/sbp2/IOFireWireSBP2UserClientCommon.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOFIREWIRESBP2USERCLIENTCOMMON_H_ -#define _IOKIT_IOFIREWIRESBP2USERCLIENTCOMMON_H_ - -#define kIOFireWireSBP2LibConnection 12 - -enum IOFWSBP2UserClientCommandCodes { - kIOFWSBP2UserClientOpen, // kIOUCScalarIScalarO 0,0 - kIOFWSBP2UserClientClose, // kIOUCScalarIScalarO 0,0 - kIOFWSBP2UserClientCreateLogin, // kIOUCScalarIScalarO 0,1 - kIOFWSBP2UserClientReleaseLogin, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSubmitLogin, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSubmitLogout, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSetLoginFlags, // kIOUCScalarIScalarO 2,0 - kIOFWSBP2UserClientGetMaxCommandBlockSize, // kIOUCScalarIScalarO 1,1 - kIOFWSBP2UserClientGetLoginID, // kIOUCScalarIScalarO 1,1 - kIOFWSBP2UserClientSetReconnectTime, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSetMaxPayloadSize, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientCreateORB, // kIOUCScalarIScalarO 0,1 - kIOFWSBP2UserClientReleaseORB, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSubmitORB, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSetCommandFlags, // kIOUCScalarIScalarO 2,0 - kIOFWSBP2UserClientSetMaxORBPayloadSize, // kIOUCScalarIScalarO 2,0 - kIOFWSBP2UserClientSetCommandTimeout, // kIOUCScalarIScalarO 2,0 - kIOFWSBP2UserClientSetCommandGeneration, // kIOUCScalarIScalarO 2,0 - kIOFWSBP2UserClientSetToDummy, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSetCommandBuffersAsRanges, // kIOUCScalarIScalarO 6,0 - kIOFWSBP2UserClientReleaseCommandBuffers, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSetCommandBlock, // kIOUCScalarIScalarO 3,0 - kIOFWSBP2UserClientCreateMgmtORB, // kIOUCScalarIScalarO 0,1 - kIOFWSBP2UserClientReleaseMgmtORB, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientSubmitMgmtORB, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientMgmtORBSetCommandFunction, // kIOUCScalarIScalarO 2,0 - kIOFWSBP2UserClientMgmtORBSetManageeORB, // kIOUCScalarIScalarO 2,0 - kIOFWSBP2UserClientMgmtORBSetManageeLogin, // kIOUCScalarIScalarO 2,0 - kIOFWSBP2UserClientMgmtORBSetResponseBuffer, // kIOUCScalarIScalarO 3,0 - kIOFWSBP2UserClientLSIWorkaroundSetCommandBuffersAsRanges, // kIOUCScalarIScalarO 6,0 - kIOFWSBP2UserClientMgmtORBLSIWorkaroundSyncBuffersForOutput, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientMgmtORBLSIWorkaroundSyncBuffersForInput, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientOpenWithSessionRef, // kIOUCScalarIScalarO 1,0 - kIOFWSBP2UserClientGetSessionRef, // kIOUCScalarIScalarO 0,1 - kIOFWSBP2UserClientRingDoorbell, // kIOUCScalarIScalarO 1, 0 - kIOFWSBP2UserClientEnableUnsolicitedStatus, // kIOUCScalarIScalarO 1, 0 - kIOFWSBP2UserClientSetBusyTimeoutRegisterValue, // kIOUCScalarIScalarO 2, 0 - kIOFWSBP2UserClientSetORBRefCon, // kIOUCScalarIScalarO 2, 0 - kIOFWSBP2UserClientSetPassword, // kIOUCScalarIScalarO 3, 0 - kIOFWSBP2UserClientSetMessageCallback, // kIOUCScalarIScalarO 2, 0 - kIOFWSBP2UserClientSetLoginCallback, // kIOUCScalarIScalarO 2, 0 - kIOFWSBP2UserClientSetLogoutCallback, // kIOUCScalarIScalarO 2, 0 - kIOFWSBP2UserClientSetUnsolicitedStatusNotify, // kIOUCScalarIScalarO 2, 0 - kIOFWSBP2UserClientSetStatusNotify, // kIOUCScalarIScalarO 2, 0 - kIOFWSBP2UserClientSetMgmtORBCallback, // kIOUCScalarIScalarO 3, 0 - kIOFWSBP2UserClientSubmitFetchAgentReset, // kIOUCScalarIScalarO 3, 0 - kIOFWSBP2UserClientSetFetchAgentWriteCompletion, // kIOUCScalarIScalaO 2, 0 - kIOFWSBP2UserClientNumCommands -}; - -#endif \ No newline at end of file diff --git a/i386/include/IOKit/sbp2/IOFireWireSerialBusProtocolTransport.h b/i386/include/IOKit/sbp2/IOFireWireSerialBusProtocolTransport.h deleted file mode 100644 index 53e6195..0000000 --- a/i386/include/IOKit/sbp2/IOFireWireSerialBusProtocolTransport.h +++ /dev/null @@ -1,449 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -/*! - @header IOFireWireSerialBusProtocolTransport - Contains the class definition for IOFireWireSerialBusProtocolTransport. -*/ - - -#ifndef _IOKIT_IO_FIREWIRE_SERIAL_BUS_PROTOCOL_TRANSPORT_H_ -#define _IOKIT_IO_FIREWIRE_SERIAL_BUS_PROTOCOL_TRANSPORT_H_ - - -#include <IOKit/IOBufferMemoryDescriptor.h> -#include <IOKit/IOLib.h> -#include <IOKit/IOMessage.h> -#include <IOKit/IOService.h> -#include <IOKit/IOCommandPool.h> -#include <IOKit/firewire/IOFireWireUnit.h> -#include <IOKit/sbp2/IOFireWireSBP2LUN.h> - -#include <IOKit/scsi/IOSCSIProtocolServices.h> - -/*! - @class IOFireWireSerialBusProtocolTransport - @abstract SCSI Protocol Driver Family for FireWire SBP2 Devices. - @discussion IOFireWireSerialBusProtocolTransport contains all the bus specific support for FireWire - SBP2 compliant devices. To add vendor specific features or workarounds you will sub-class the appropriate - methods of this family. -*/ - -class IOFireWireSerialBusProtocolTransport : public IOSCSIProtocolServices -{ - - OSDeclareDefaultStructors ( IOFireWireSerialBusProtocolTransport ) - -private: - - IOFireWireUnit * fUnit; - IOFireWireSBP2LUN * fSBPTarget; - IOFireWireSBP2Login * fLogin; - IOFireWireSBP2ORB * fORB; - IOFireWireSBP2ManagementORB * fLUNResetORB; - - // /!\ WARNING! NOT USED left behind for legacy binary reasons - IOSimpleLock * fQueueLock; - - UInt32 fLoginRetryCount; - bool fDeferRegisterService; - bool fNeedLogin; - - // /!\ WARNING! NOT USED left behind for legacy binary reasons - bool fPhysicallyConnected; - - static void - StatusNotifyStatic ( void * refCon, FWSBP2NotifyParamsPtr params ); - - static void - UnsolicitedStatusNotifyStatic ( void * refCon, - FWSBP2NotifyParamsPtr params ); - - static void - LunResetCompleteStatic ( void * refCon, - IOReturn status, - IOFireWireSBP2ManagementORB * orb ); - - static void - FetchAgentResetCompleteStatic ( void * refcon, - IOReturn status ); - - static IOReturn - ConnectToDeviceStatic ( OSObject * refCon, void *, void *, void *, void * ); - - virtual void - FetchAgentResetComplete ( IOReturn status ); - - static void LoginCompletionStatic ( void * refCon, FWSBP2LoginCompleteParams * params ); - - static void - LogoutCompletionStatic ( void * refCon, FWSBP2LogoutCompleteParams * params ); - - /*! - @function CoalesceSenseData - @abstract CoalesceSenseData convert a SBP-2 status block into a SPC-2 sense block. - @discussion CoalesceSenseData pulls the appropriate bits out of the SBP2 sense block - as defined in SBP-2 Annex B section B.2 and dynamically builds a sense data block as - defined in SPC-2 section 7.23.2. - */ - - SCSITaskStatus - CoalesceSenseData ( FWSBP2StatusBlock * sourceData, - UInt8 quadletCount, - SCSI_Sense_Data * targetData ); - - virtual void ConnectToDevice ( void ); - - virtual void DisconnectFromDevice ( void ); - - virtual bool IsDeviceCPUInDiskMode ( void ); - -protected: - - /*! - @function AllocateResources - @abstract Allocate Resources. - @discussion Called from start method to allocate needed resources. - */ - - virtual IOReturn AllocateResources ( void ); - - /*! - @function DeallocateResources - @abstract Deallocate Resources. - @discussion Called from cleanUp method to deallocate resources. - */ - - virtual void DeallocateResources ( void ); - - enum SBP2LoginState - { - kFirstTimeLoggingInState, - kLogginSucceededState, - kLogginFailedState - }; - - /*! - @typedef SBP2ClientOrbData - @param orb IOFireWireSBP2ORB for request. - @param scsiTask SCSITaskIdentifier of request. - @param serviceResponse SCSIServiceResponse of request. - @param taskStatus SCSITaskStatus of request. - @discussion This structure is stuffed into the refcon so we can associate which - IOFireWireSBP2ORB and SCSITaskIdentifier is completing. - */ - - typedef struct { - IOFireWireSBP2ORB * orb; - SCSITaskIdentifier scsiTask; - SCSIServiceResponse serviceResponse; - SCSITaskStatus taskStatus; - IOBufferMemoryDescriptor * quadletAlignedBuffer; - } SBP2ClientOrbData; - - static const UInt32 kDefaultBusyTimeoutValue = 0x0000000F; - static const UInt64 kMaxFireWireLUN = 0xFFFF; - static const UInt32 kMaxFireWirePayload = 4096; - static const UInt32 kMaxLoginRetryCount = 8; - static const UInt32 kMaxReconnectCount = 128; - static const UInt32 kCSRModelInfoKey = 0x17; - - UInt32 fReconnectCount; - bool fLoggedIn; - - // binary compatibility instance variable expansion - struct ExpansionData - { - IOCommandPool * fCommandPool; - IOCommandPool * fSubmitQueue; - SBP2LoginState fLoginState; - bool fLUNResetPathFlag; - int fLUNResetCount; - bool fAlwaysSetSenseData; - bool fAutonomousSpinDownWorkAround; - }; - - ExpansionData * reserved; - - bool fObjectIsOpen; - - /*! - @function CommandORBAccessor - @abstract accessor function for fORB. - @discussion xxx. - */ - - IOFireWireSBP2ORB * CommandORBAccessor ( void ); - - /*! - @function SBP2LoginAccessor - @abstract accessor function for fLogin. - @discussion xxx. - */ - - IOFireWireSBP2Login * SBP2LoginAccessor ( void ); - - virtual IOReturn - message ( UInt32 type, IOService * provider, void * argument = 0 ); - - /*! - @function SendSCSICommand - @abstract Prepare and send a SCSI command to the device. - @discussion The incoming SCSITaskIdentifier gets turned into a IOFireWireSBP2ORB - and is submitted to the SBP2 layer. See IOSCSIProtocolServices.h for more details - regarding SendSCSICommand. Also see IOFireWireSBP2Lib.h for details regarding the - IOFireWireSBP2ORB structure and the submitORB method. - @result If the command was sent to the device and is pending completion, the - subclass should return true and return back the kSCSIServiceResponse_Request_In_Process response. - If the command completes immediately with an error, the subclass will return true - and return back the appropriate status. If the subclass is currently processing all the - commands it can, the subclass will return false and the command will be resent next time - CommandCompleted is called. - */ - - virtual bool - SendSCSICommand ( SCSITaskIdentifier request, - SCSIServiceResponse * serviceResponse, - SCSITaskStatus * taskStatus ); - - /*! - @function SetCommandBuffers - @abstract Method to set orb's buffers. - @discussion This method was added so that subclasses can override and massage buffers as - needed. The default simply calls setCommandBuffers. See IOFireWireSBP2Lib.h for details - regarding the setCommandBuffers method. - @result xxx. - */ - - virtual IOReturn - SetCommandBuffers ( IOFireWireSBP2ORB * orb, SCSITaskIdentifier request ); - - /*! - @function CompleteSCSITask - @abstract This qualifies and sets appropriate data then calls CommandCompleted. - @discussion See IOSCSIProtocolServices.h for more details - regarding CommandCompleted. - */ - - virtual void - CompleteSCSITask ( IOFireWireSBP2ORB * orb ); - - /*! - @function AbortSCSICommand - @abstract This method is intended to abort an in progress SCSI Task. - @discussion Currently not implemented in super class. This is a stub method for adding - the abort command in the near future. - @result See SCSITask.h for SCSIServiceResponse codes. - */ - - virtual SCSIServiceResponse - AbortSCSICommand ( SCSITaskIdentifier request ); - - /*! - @function StatusNotify - @abstract This is our handler for status. - @discussion See IOFireWireSBP2Lib.h for details regarding the FWSBP2NotifyParams - structure that is passed in to the completion.. - */ - - virtual void - StatusNotify ( FWSBP2NotifyParams * params ); - - /*! - @function SetValidAutoSenseData - @abstract Set the auto sense data that was returned for a given SCSI Task. - @discussion SetValidAutoSenseData is called to qualify sense data that is copied to the - client via the SetAutoSenseData method. See IOSCSIProtocolServices.h for more details - regarding SetAutoSenseData. - */ - - void - SetValidAutoSenseData ( SBP2ClientOrbData * clientData, - FWSBP2StatusBlock * statusBlock, - SCSI_Sense_Data * targetData ); - - /*! - @function UnsolicitedStatusNotify - @abstract This is our handler for unsolicited status. - @discussion After we have parsed and handled the unsolicited status we call - enableUnsolicitedStatus. See IOFireWireSBP2Lib.h for details regarding the - enableUnsolicitedStatus method. - */ - - virtual void - UnsolicitedStatusNotify ( FWSBP2NotifyParamsPtr params ); - - /*! - @function LoginCompletion - @abstract Completion routine for login complete. - @discussion See IOFireWireSBP2Lib.h for details regarding the FWSBP2LogoutCompleteParams - structure that is passed in to the completion. - */ - - virtual void - LoginCompletion ( FWSBP2LoginCompleteParams * params ); - - /*! - @function LogoutCompletion - @abstract Completion routine for logout complete. - @discussion See IOFireWireSBP2Lib.h for details regarding the FWSBP2LogoutCompleteParams - structure that is passed in to the completion. - */ - - virtual void - LogoutCompletion ( FWSBP2LogoutCompleteParams * params ); - - /*! - @function IsProtocolServiceSupported - @abstract Determine is specified feature is supported by the protocol layer. - @discussion If the service has a value that must be returned, it will be returned in the - serviceValue output parameter. See IOSCSIProtocolServices.h for more details regarding - IsProtocolServiceSupported. - @result Will return true if the specified feature is supported by the protocol layer. - */ - - virtual bool - IsProtocolServiceSupported ( SCSIProtocolFeature feature, void * serviceValue ); - - /*! - @function HandleProtocolServiceFeature - @abstract Handle specified feature supported by the protocol layer. - @discussion See IOSCSIProtocolServices.h for more details regarding HandleProtocolServiceFeature. - @result Will return true if the specified feature is supported by the protocol layer. - */ - - virtual bool - HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void * serviceValue ); - - /*! - @function LunResetComplete - @abstract Callback to submit Fetch Agent Reset. - @discussion See IOFireWireSBP2Lib.h for details regarding the submitFetchAgentReset - method. - */ - - virtual void - LunResetComplete ( IOReturn status, IOFireWireSBP2ManagementORB * orb ); - -public: - - /*! - @function init - @abstract See IOService for discussion. - @discussion Setup and prime class into known state. - */ - - bool init ( OSDictionary * propTable ); - - /*! - @function start - @discussion See IOService for discussion. - @result Return true if the start was successful, false otherwise ( which will - cause the instance to be detached and usually freed ). - */ - - virtual bool start ( IOService * provider ); - - /*! - @function cleanUp - @abstract cleanUp is called to tear down IOFireWireSerialBusProtocolTransport. - @discussion cleanUp is called when we receive a kIOFWMessageServiceIsRequestingClose - message or if we fail our initialization. - */ - - virtual void cleanUp ( void ); - - /*! - @function finalize - @abstract See IOService for discussion. - @result Returns true. - */ - - virtual bool finalize ( IOOptionBits options ); - - /*! - @function free - @discussion See IOService for discussion. - @result none. - */ - - virtual void free ( void ); - -protected: - - virtual IOReturn login ( void ); - OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 1 ); - - virtual IOReturn submitLogin ( void ); - OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 2 ); - - virtual void loginLost ( void ); - OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 3 ); - - void loginSuspended ( void ); - OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 4 ); - - virtual void loginResumed ( void ); - OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 5 ); - - static IOReturn CriticalOrbSubmissionStatic ( - OSObject * refCon, - void * val1, - void * val2, - void * val3, - void * val4 ); - - /*! - @function CriticalOrbSubmission - @abstract xxx. - @discussion xxx. - @result none. - */ - - void - CriticalOrbSubmission ( - IOFireWireSBP2ORB * orb, - SCSITaskIdentifier request ); - - virtual void submitOrbFromQueue ( void ); - OSMetaClassDeclareReservedUsed ( IOFireWireSerialBusProtocolTransport, 6 ); - -private: - - // binary compatibility reserved method space - - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 7 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 8 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 9 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 10 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 11 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 12 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 13 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 14 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 15 ); - OSMetaClassDeclareReservedUnused ( IOFireWireSerialBusProtocolTransport, 16 ); - -}; - -#endif /* _IOKIT_IO_FIREWIRE_SERIAL_BUS_PROTOCOL_TRANSPORT_H_ */ \ No newline at end of file diff --git a/i386/include/IOKit/scsi/.svn/all-wcprops b/i386/include/IOKit/scsi/.svn/all-wcprops deleted file mode 100644 index 5e074ca..0000000 --- a/i386/include/IOKit/scsi/.svn/all-wcprops +++ /dev/null @@ -1,155 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 57 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi -END -IOSCSIPeripheralDeviceNub.h -K 25 -svn:wc:ra_dav:version-url -V 85 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceNub.h -END -IOSCSIProtocolInterface.h -K 25 -svn:wc:ra_dav:version-url -V 83 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIProtocolInterface.h -END -IOSCSIPeripheralDeviceType05.h -K 25 -svn:wc:ra_dav:version-url -V 88 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType05.h -END -SCSICommandDefinitions.h -K 25 -svn:wc:ra_dav:version-url -V 82 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSICommandDefinitions.h -END -IOSCSIPeripheralDeviceType07.h -K 25 -svn:wc:ra_dav:version-url -V 88 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType07.h -END -IOSCSIPrimaryCommandsDevice.h -K 25 -svn:wc:ra_dav:version-url -V 87 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIPrimaryCommandsDevice.h -END -SCSICmds_REPORT_LUNS_Definitions.h -K 25 -svn:wc:ra_dav:version-url -V 92 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSICmds_REPORT_LUNS_Definitions.h -END -SCSICommandOperationCodes.h -K 25 -svn:wc:ra_dav:version-url -V 85 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSICommandOperationCodes.h -END -IOSCSIReducedBlockCommandsDevice.h -K 25 -svn:wc:ra_dav:version-url -V 92 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIReducedBlockCommandsDevice.h -END -IOSCSIMultimediaCommandsDevice.h -K 25 -svn:wc:ra_dav:version-url -V 90 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIMultimediaCommandsDevice.h -END -IOSCSIBlockCommandsDevice.h -K 25 -svn:wc:ra_dav:version-url -V 85 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIBlockCommandsDevice.h -END -SCSIPort.h -K 25 -svn:wc:ra_dav:version-url -V 68 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSIPort.h -END -SCSICmds_MODE_Definitions.h -K 25 -svn:wc:ra_dav:version-url -V 85 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSICmds_MODE_Definitions.h -END -IODVDServices.h -K 25 -svn:wc:ra_dav:version-url -V 73 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IODVDServices.h -END -SCSICmds_READ_CAPACITY_Definitions.h -K 25 -svn:wc:ra_dav:version-url -V 94 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSICmds_READ_CAPACITY_Definitions.h -END -IOBlockStorageServices.h -K 25 -svn:wc:ra_dav:version-url -V 82 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOBlockStorageServices.h -END -IOSCSIPeripheralDeviceType0E.h -K 25 -svn:wc:ra_dav:version-url -V 88 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType0E.h -END -SCSICmds_REQUEST_SENSE_Defs.h -K 25 -svn:wc:ra_dav:version-url -V 87 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h -END -IOSCSIProtocolServices.h -K 25 -svn:wc:ra_dav:version-url -V 82 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIProtocolServices.h -END -IOBDServices.h -K 25 -svn:wc:ra_dav:version-url -V 72 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOBDServices.h -END -IOReducedBlockServices.h -K 25 -svn:wc:ra_dav:version-url -V 82 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOReducedBlockServices.h -END -SCSICmds_INQUIRY_Definitions.h -K 25 -svn:wc:ra_dav:version-url -V 88 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSICmds_INQUIRY_Definitions.h -END -SCSITask.h -K 25 -svn:wc:ra_dav:version-url -V 68 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/SCSITask.h -END -IOCompactDiscServices.h -K 25 -svn:wc:ra_dav:version-url -V 81 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOCompactDiscServices.h -END -IOSCSIPeripheralDeviceType00.h -K 25 -svn:wc:ra_dav:version-url -V 88 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType00.h -END diff --git a/i386/include/IOKit/scsi/.svn/entries b/i386/include/IOKit/scsi/.svn/entries deleted file mode 100644 index ff8f8bc..0000000 --- a/i386/include/IOKit/scsi/.svn/entries +++ /dev/null @@ -1,881 +0,0 @@ -10 - -dir -2117 -http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/scsi -http://forge.voodooprojects.org/svn/chameleon - - - -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - -b5af796a-00a8-11df-919b-ffff7a100b7d - -IOSCSIPeripheralDeviceNub.h -file - - - - -2012-10-03T17:50:21.000000Z -41004b82709f5c563fa2c10264853dd1 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -8628 - -IOSCSIProtocolInterface.h -file - - - - -2012-10-03T17:50:21.000000Z -3dc4c00e753dcf3fd49d0cfdac02faef -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -35912 - -IOSCSIPeripheralDeviceType05.h -file - - - - -2012-10-03T17:50:21.000000Z -7943859208badb3751dbf4ffea748f66 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -2852 - -SCSICommandDefinitions.h -file - - - - -2012-10-03T17:50:21.000000Z -6d33c5041ea6862346397f9e30a91dbd -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -12845 - -IOSCSIPeripheralDeviceType07.h -file - - - - -2012-10-03T17:50:21.000000Z -0e53abdb3759ef029098176c7b372012 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -2792 - -IOSCSIPrimaryCommandsDevice.h -file - - - - -2012-10-03T17:50:21.000000Z -fbc3c7570862069f2faeb236d5b2ff80 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -28729 - -SCSICmds_REPORT_LUNS_Definitions.h -file - - - - -2012-10-03T17:50:21.000000Z -cbb458517cee16286d9b71b82ff8ca70 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -4122 - -SCSICommandOperationCodes.h -file - - - - -2012-10-03T17:50:21.000000Z -f9c55b591e06c0fc73a8f0c46850d142 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -51055 - -IOSCSIReducedBlockCommandsDevice.h -file - - - - -2012-10-03T17:50:21.000000Z -7e8c5ee237fa3d53e59c8742aa21ec29 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -15569 - -spi -dir - -IOSCSIMultimediaCommandsDevice.h -file - - - - -2012-10-03T17:50:21.000000Z -c4523e2a816d92b1a21bab51e554f3c3 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -37497 - -IOSCSIBlockCommandsDevice.h -file - - - - -2012-10-03T17:50:21.000000Z -9524329c076b5320b814e3c7e4c8af9a -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -38443 - -SCSIPort.h -file - - - - -2012-10-03T17:50:21.000000Z -3023213196d2d300e6427aed35b87293 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -2037 - -SCSICmds_MODE_Definitions.h -file - - - - -2012-10-03T17:50:21.000000Z -6bba8330f0f798e8a696d1b9aa84dcfc -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -14817 - -IODVDServices.h -file - - - - -2012-10-03T17:50:21.000000Z -81e92ebecd5deed264767c5a704c1f31 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -8553 - -IOBlockStorageServices.h -file - - - - -2012-10-03T17:50:21.000000Z -f8ceba9851285be5ab564838e387d3b2 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -5384 - -SCSICmds_READ_CAPACITY_Definitions.h -file - - - - -2012-10-03T17:50:21.000000Z -b023866fc55360a68903eeb70772e116 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -3642 - -IOSCSIPeripheralDeviceType0E.h -file - - - - -2012-10-03T17:50:21.000000Z -b6fa75f60eb13eeb00333a44a40eddff -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -2909 - -SCSICmds_REQUEST_SENSE_Defs.h -file - - - - -2012-10-03T17:50:21.000000Z -2195af654461960fd9c521835ae05059 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -7152 - -IOSCSIProtocolServices.h -file - - - - -2012-10-03T17:50:21.000000Z -8a1ac65d04de801e378c58362ff162bc -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -15109 - -IOBDServices.h -file - - - - -2012-10-03T17:50:21.000000Z -75fa500daf479f56138fa835c1f7647e -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -8045 - -IOReducedBlockServices.h -file - - - - -2012-10-03T17:50:21.000000Z -3dc85f77ebd728e36274c154c0640593 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -5077 - -SCSICmds_INQUIRY_Definitions.h -file - - - - -2012-10-03T17:50:21.000000Z -ca84e5d42cea279808d672eb093d3594 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -29732 - -SCSITask.h -file - - - - -2012-10-03T17:50:21.000000Z -b9a85db4a5adf25cab94ad27fdb533b5 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -14455 - -IOCompactDiscServices.h -file - - - - -2012-10-03T17:50:21.000000Z -c61102d918a2bc4d6211ecc704a97c55 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -7947 - -IOSCSIPeripheralDeviceType00.h -file - - - - -2012-10-03T17:50:21.000000Z -81de59f70dd7471492d42f58c176a6f0 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -3475 - diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOBDServices.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOBDServices.h.svn-base deleted file mode 100644 index 70482d7..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/IOBDServices.h.svn-base +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright (c) 2006-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_BD_SERVICES_H_ -#define _IOKIT_IO_BD_SERVICES_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// IOKit includes -#include <IOKit/IOTypes.h> - -// Generic IOKit storage related headers -#include <IOKit/storage/IOBDTypes.h> -#include <IOKit/storage/IOBDBlockStorageDevice.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIPeripheralDeviceType05.h> - -class IOMemoryDescriptor; - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOBDServices : public IOBDBlockStorageDevice -{ - - OSDeclareDefaultStructors ( IOBDServices ) - -protected: - - OSSet * fClients; - IOSCSIPeripheralDeviceType05 * fProvider; - - virtual void free ( void ); - - // Reserve space for future expansion. - struct IOBDServicesExpansionData { }; - IOBDServicesExpansionData * fIOBDServicesReserved; - -public: - - static void AsyncReadWriteComplete ( void * clientData, - IOReturn status, - UInt64 actualByteCount ); - - // Deprecated - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageAttributes * attributes, - IOStorageCompletion * completion ); - - virtual IOReturn doEjectMedia ( void ); - - virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); - - virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - - virtual IOReturn doLockUnlockMedia ( bool doLock ); - - virtual IOReturn doSynchronizeCache ( void ); - - virtual IOReturn getWriteCacheState ( bool * enabled ); - - virtual IOReturn setWriteCacheState ( bool enabled ); - - virtual char * getVendorString ( void ); - - virtual char * getProductString ( void ); - - virtual char * getRevisionString ( void ); - - virtual char * getAdditionalDeviceInfoString ( void ); - - virtual IOReturn reportBlockSize ( UInt64 * blockSize ); - - virtual IOReturn reportEjectability ( bool * isEjectable ); - - virtual IOReturn reportLockability ( bool * isLockable ); - - virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); - - virtual IOReturn reportPollRequirements ( bool * pollIsRequired, - bool * pollIsExpensive ); - - virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); - - virtual IOReturn reportRemovability ( bool * isRemovable ); - - virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); - - /* CD Specific */ - virtual IOReturn doAsyncReadCD ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageCompletion completion ); - - virtual IOReturn readISRC ( UInt8 track, CDISRC isrc ); - - virtual IOReturn readMCN ( CDMCN mcn); - - virtual IOReturn readTOC ( IOMemoryDescriptor * buffer ); - - virtual IOReturn audioPause ( bool pause ); - - virtual IOReturn audioPlay ( CDMSF timeStart, CDMSF timeStop ); - - virtual IOReturn audioScan ( CDMSF timeStart, bool reverse ); - - virtual IOReturn audioStop ( void ); - - virtual IOReturn getAudioStatus ( CDAudioStatus * status ); - - virtual IOReturn getAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume ); - - virtual IOReturn setAudioVolume ( UInt8 leftVolume, UInt8 rightVolume ); - - virtual IOReturn getSpeed ( UInt16 * kilobytesPerSecond ); - - virtual IOReturn setSpeed ( UInt16 kilobytesPerSecond ); - - /* DVD Specific */ - virtual UInt32 getMediaType ( void ); - - virtual IOReturn reportKey ( IOMemoryDescriptor * buffer, - const DVDKeyClass keyClass, - const UInt32 lba, - const UInt8 agid, - const DVDKeyFormat keyFormat ); - - virtual IOReturn sendKey ( IOMemoryDescriptor * buffer, - const DVDKeyClass keyClass, - const UInt8 agid, - const DVDKeyFormat keyFormat ); - - virtual IOReturn readDVDStructure ( IOMemoryDescriptor * buffer, - const UInt8 structureFormat, - const UInt32 logicalBlockAddress, - const UInt8 layer, - const UInt8 agid ); - - /* BD Specific */ - virtual IOReturn readDiscStructure ( IOMemoryDescriptor * buffer, - UInt8 structureFormat, - UInt32 logicalBlockAddress, - UInt8 layer, - UInt8 agid, - UInt8 mediaType ); - - /* 10.6.0 */ - virtual IOReturn requestIdle ( void ); - - /* System Specific */ - virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); - virtual IOReturn setProperties ( OSObject * properties ); - - /* User Client Specific */ - virtual bool start ( IOService * provider ); - virtual bool open ( IOService * client, IOOptionBits options, IOStorageAccess access ); - - virtual bool handleOpen ( IOService * client, IOOptionBits options, void * access ); - virtual void handleClose ( IOService * client, IOOptionBits options ); - virtual bool handleIsOpen ( const IOService * client ) const; - - /* Added with 10.1.3 */ - virtual IOReturn readTOC ( IOMemoryDescriptor * buffer, - CDTOCFormat format, - UInt8 msf, - UInt8 trackSessionNumber, - UInt16 * actualByteCount ); - - /* Added with 10.1.3 */ - virtual IOReturn readDiscInfo ( IOMemoryDescriptor * buffer, - UInt16 * actualByteCount ); - - /* Added with 10.1.3 */ - virtual IOReturn readTrackInfo ( IOMemoryDescriptor * buffer, - UInt32 address, - CDTrackInfoAddressType addressType, - UInt16 * actualByteCount ); - - /* Added with 10.5 */ - virtual IOReturn splitTrack ( UInt32 address ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOBDServices, 1 ); - OSMetaClassDeclareReservedUnused ( IOBDServices, 2 ); - OSMetaClassDeclareReservedUnused ( IOBDServices, 3 ); - OSMetaClassDeclareReservedUnused ( IOBDServices, 4 ); - OSMetaClassDeclareReservedUnused ( IOBDServices, 5 ); - OSMetaClassDeclareReservedUnused ( IOBDServices, 6 ); - OSMetaClassDeclareReservedUnused ( IOBDServices, 7 ); - OSMetaClassDeclareReservedUnused ( IOBDServices, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_BD_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOBlockStorageServices.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOBlockStorageServices.h.svn-base deleted file mode 100644 index d62a02b..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/IOBlockStorageServices.h.svn-base +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_BLOCK_STORAGE_SERVICES_H_ -#define _IOKIT_IO_BLOCK_STORAGE_SERVICES_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// IOKit includes -#include <IOKit/IOTypes.h> - -// Generic IOKit storage related headers -#include <IOKit/storage/IOBlockStorageDevice.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIBlockCommandsDevice.h> - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOBlockStorageServices : public IOBlockStorageDevice -{ - - OSDeclareDefaultStructors ( IOBlockStorageServices ) - -private: - - bool fMediaChanged; /* DEPRECATED */ - bool fMediaPresent; - -protected: - - IOSCSIBlockCommandsDevice * fProvider; - - UInt64 fMaxReadBlocks; - UInt64 fMaxWriteBlocks; - - virtual bool attach ( IOService * provider ); - virtual void detach ( IOService * provider ); - virtual IOReturn newUserClient ( - task_t owningTask, - void * securityID, - UInt32 type, - OSDictionary * properties, - IOUserClient ** handler ); - - // Reserve space for future expansion. - struct IOBlockStorageServicesExpansionData { }; - IOBlockStorageServicesExpansionData * fIOBlockStorageServicesReserved; - -public: - - virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); - - static void AsyncReadWriteComplete ( void * clientData, - IOReturn status, - UInt64 actualByteCount ); - - // Deprecated - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageAttributes * attributes, - IOStorageCompletion * completion ); - - virtual IOReturn doEjectMedia ( void ); - - virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); - - virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - - virtual IOReturn doLockUnlockMedia ( bool doLock ); - - virtual IOReturn doSynchronizeCache ( void ); - - virtual char * getVendorString ( void ); - - virtual char * getProductString ( void ); - - virtual char * getRevisionString ( void ); - - virtual char * getAdditionalDeviceInfoString ( void ); - - virtual IOReturn reportBlockSize ( UInt64 * blockSize ); - - virtual IOReturn reportEjectability ( bool * isEjectable ); - - virtual IOReturn reportLockability ( bool * isLockable ); - - virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); - - virtual IOReturn reportPollRequirements ( bool * pollIsRequired, - bool * pollIsExpensive ); - - virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); - - virtual IOReturn reportRemovability ( bool * isRemovable ); - - virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); - - virtual IOReturn getWriteCacheState ( bool * enabled ); - - virtual IOReturn setWriteCacheState ( bool enabled ); - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 1 ); - OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 2 ); - OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 3 ); - OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 4 ); - OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 5 ); - OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 6 ); - OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 7 ); - OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_BLOCK_STORAGE_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOCompactDiscServices.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOCompactDiscServices.h.svn-base deleted file mode 100644 index a9d4a31..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/IOCompactDiscServices.h.svn-base +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_COMPACT_DISC_SERVICES_H_ -#define _IOKIT_IO_COMPACT_DISC_SERVICES_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// IOKit includes -#include <IOKit/IOTypes.h> - -// Generic IOKit storage related headers -#include <IOKit/storage/IOCDTypes.h> -#include <IOKit/storage/IOCDBlockStorageDevice.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIPeripheralDeviceType05.h> - -class IOMemoryDescriptor; - -// Use this switch to turn off the data cache. -#define _USE_DATA_CACHING_ 1 - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOCompactDiscServices : public IOCDBlockStorageDevice -{ - - OSDeclareDefaultStructors ( IOCompactDiscServices ) - -#if (_USE_DATA_CACHING_) - // Data Cache members - bool fUseDataCache; // Indicates if cache should be used. This - // will be set to false if all the necessary support - // for the data cache could not be allocated or - // initialized. - UInt8 * fDataCacheStorage; // Storage space for the cache - UInt32 fDataCacheStartBlock; // Starting block of the data in the cache. - UInt32 fDataCacheBlockCount; // Number of contiguous blocks in the cache - // starting with fDataCacheStartBlock. A value of - // zero in this member indicates that all data - // in the cache is invalid. - - IOSimpleLock * fDataCacheLock; // This is the lock for preventing multiple access - // while manipulating the data cache. -#endif - -protected: - - OSSet * fClients; - IOSCSIPeripheralDeviceType05 * fProvider; - - virtual void free ( void ); - - // Reserve space for future expansion. - struct IOCompactDiscServicesExpansionData { }; - IOCompactDiscServicesExpansionData * fIOCompactDiscServicesReserved; - -public: - - static void AsyncReadWriteComplete ( void * clientData, - IOReturn status, - UInt64 actualByteCount ); - - // Deprecated - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageAttributes * attributes, - IOStorageCompletion * completion ); - - virtual IOReturn doEjectMedia ( void ); - - virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); - - virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - - virtual IOReturn doLockUnlockMedia ( bool doLock ); - - virtual IOReturn doSynchronizeCache ( void ); - - virtual IOReturn getWriteCacheState ( bool * enabled ); - - virtual IOReturn setWriteCacheState ( bool enabled ); - - virtual char * getVendorString ( void ); - - virtual char * getProductString ( void ); - - virtual char * getRevisionString ( void ); - - virtual char * getAdditionalDeviceInfoString ( void ); - - virtual IOReturn reportBlockSize ( UInt64 * blockSize ); - - virtual IOReturn reportEjectability ( bool * isEjectable ); - - virtual IOReturn reportLockability ( bool * isLockable ); - - virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); - - virtual IOReturn reportPollRequirements ( bool * pollIsRequired, - bool * pollIsExpensive ); - - virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); - - virtual IOReturn reportRemovability ( bool * isRemovable ); - - virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); - - /* CD Specific */ - virtual IOReturn doAsyncReadCD ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageCompletion completion ); - - virtual IOReturn readISRC ( UInt8 track, CDISRC isrc ); - - virtual IOReturn readMCN ( CDMCN mcn); - - virtual IOReturn readTOC ( IOMemoryDescriptor * buffer ); - - virtual IOReturn audioPause ( bool pause ); - - virtual IOReturn audioPlay ( CDMSF timeStart, CDMSF timeStop ); - - virtual IOReturn audioScan ( CDMSF timeStart, bool reverse ); - - virtual IOReturn audioStop ( void ); - - virtual IOReturn getAudioStatus ( CDAudioStatus * status ); - - virtual IOReturn getAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume ); - - virtual IOReturn setAudioVolume ( UInt8 leftVolume, UInt8 rightVolume ); - - virtual UInt32 getMediaType ( void ); - - virtual IOReturn getSpeed ( UInt16 * kilobytesPerSecond ); - - virtual IOReturn setSpeed ( UInt16 kilobytesPerSecond ); - - /* System Specific */ - virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); - virtual IOReturn setProperties ( OSObject * properties ); - - /* User Client Specific */ - virtual bool start ( IOService * provider ); - virtual bool open ( IOService * client, IOOptionBits options, IOStorageAccess access ); - - virtual bool handleOpen ( IOService * client, IOOptionBits options, void * access ); - virtual void handleClose ( IOService * client, IOOptionBits options ); - virtual bool handleIsOpen ( const IOService * client ) const; - - /* Added with 10.1.3 */ - virtual IOReturn readTOC ( IOMemoryDescriptor * buffer, - CDTOCFormat format, - UInt8 msf, - UInt8 trackSessionNumber, - UInt16 * actualByteCount ); - - /* Added with 10.1.3 */ - virtual IOReturn readDiscInfo ( IOMemoryDescriptor * buffer, - UInt16 * actualByteCount ); - - /* Added with 10.1.3 */ - virtual IOReturn readTrackInfo ( IOMemoryDescriptor * buffer, - UInt32 address, - CDTrackInfoAddressType addressType, - UInt16 * actualByteCount ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 1 ); - OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 2 ); - OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 3 ); - OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 4 ); - OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 5 ); - OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 6 ); - OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 7 ); - OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_COMPACT_DISC_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IODVDServices.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IODVDServices.h.svn-base deleted file mode 100644 index 8dccb17..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/IODVDServices.h.svn-base +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_DVD_SERVICES_H_ -#define _IOKIT_IO_DVD_SERVICES_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// IOKit includes -#include <IOKit/IOTypes.h> - -// Generic IOKit storage related headers -#include <IOKit/storage/IODVDTypes.h> -#include <IOKit/storage/IODVDBlockStorageDevice.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIPeripheralDeviceType05.h> - -class IOMemoryDescriptor; - -// Use this switch to turn off the data cache. -#define _DVD_USE_DATA_CACHING_ 1 - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IODVDServices : public IODVDBlockStorageDevice -{ - - OSDeclareDefaultStructors ( IODVDServices ) - -#if (_DVD_USE_DATA_CACHING_) - // Data Cache members - bool fUseDataCache; // Indicates if cache should be used. This - // will be set to false if all the necessary support - // for the data cache could not be allocated or - // initialized. - UInt8 * fDataCacheStorage; // Storage space for the cache - UInt32 fDataCacheStartBlock; // Starting block of the data in the cache. - UInt32 fDataCacheBlockCount; // Number of contiguous blocks in the cache - // starting with fDataCacheStartBlock. A value of - // zero in this member indicates that all data - // in the cache is invalid. - - IOSimpleLock * fDataCacheLock; // This is the lock for preventing multiple access - // while manipulating the data cache. -#endif - -protected: - - OSSet * fClients; - IOSCSIPeripheralDeviceType05 * fProvider; - - virtual void free ( void ); - - // Reserve space for future expansion. - struct IODVDServicesExpansionData { }; - IODVDServicesExpansionData * fIODVDServicesReserved; - -public: - - static void AsyncReadWriteComplete ( void * clientData, - IOReturn status, - UInt64 actualByteCount ); - - // Deprecated - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageAttributes * attributes, - IOStorageCompletion * completion ); - - virtual IOReturn doEjectMedia ( void ); - - virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); - - virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - - virtual IOReturn doLockUnlockMedia ( bool doLock ); - - virtual IOReturn doSynchronizeCache ( void ); - - virtual IOReturn getWriteCacheState ( bool * enabled ); - - virtual IOReturn setWriteCacheState ( bool enabled ); - - virtual char * getVendorString ( void ); - - virtual char * getProductString ( void ); - - virtual char * getRevisionString ( void ); - - virtual char * getAdditionalDeviceInfoString ( void ); - - virtual IOReturn reportBlockSize ( UInt64 * blockSize ); - - virtual IOReturn reportEjectability ( bool * isEjectable ); - - virtual IOReturn reportLockability ( bool * isLockable ); - - virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); - - virtual IOReturn reportPollRequirements ( bool * pollIsRequired, - bool * pollIsExpensive ); - - virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); - - virtual IOReturn reportRemovability ( bool * isRemovable ); - - virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); - - /* CD Specific */ - virtual IOReturn doAsyncReadCD ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageCompletion completion ); - - virtual IOReturn readISRC ( UInt8 track, CDISRC isrc ); - - virtual IOReturn readMCN ( CDMCN mcn); - - virtual IOReturn readTOC ( IOMemoryDescriptor * buffer ); - - virtual IOReturn audioPause ( bool pause ); - - virtual IOReturn audioPlay ( CDMSF timeStart, CDMSF timeStop ); - - virtual IOReturn audioScan ( CDMSF timeStart, bool reverse ); - - virtual IOReturn audioStop ( void ); - - virtual IOReturn getAudioStatus ( CDAudioStatus * status ); - - virtual IOReturn getAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume ); - - virtual IOReturn setAudioVolume ( UInt8 leftVolume, UInt8 rightVolume ); - - virtual IOReturn getSpeed ( UInt16 * kilobytesPerSecond ); - - virtual IOReturn setSpeed ( UInt16 kilobytesPerSecond ); - - /* DVD Specific */ - virtual UInt32 getMediaType ( void ); - - virtual IOReturn reportKey ( IOMemoryDescriptor * buffer, - const DVDKeyClass keyClass, - const UInt32 lba, - const UInt8 agid, - const DVDKeyFormat keyFormat ); - - virtual IOReturn sendKey ( IOMemoryDescriptor * buffer, - const DVDKeyClass keyClass, - const UInt8 agid, - const DVDKeyFormat keyFormat ); - - virtual IOReturn readDVDStructure ( IOMemoryDescriptor * buffer, - const UInt8 structureFormat, - const UInt32 logicalBlockAddress, - const UInt8 layer, - const UInt8 agid ); - - /* 10.6.0 */ - virtual IOReturn requestIdle ( void ); - - /* System Specific */ - virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); - virtual IOReturn setProperties ( OSObject * properties ); - - /* User Client Specific */ - virtual bool start ( IOService * provider ); - virtual bool open ( IOService * client, IOOptionBits options, IOStorageAccess access ); - - virtual bool handleOpen ( IOService * client, IOOptionBits options, void * access ); - virtual void handleClose ( IOService * client, IOOptionBits options ); - virtual bool handleIsOpen ( const IOService * client ) const; - - /* Added with 10.1.3 */ - virtual IOReturn readTOC ( IOMemoryDescriptor * buffer, - CDTOCFormat format, - UInt8 msf, - UInt8 trackSessionNumber, - UInt16 * actualByteCount ); - - /* Added with 10.1.3 */ - virtual IOReturn readDiscInfo ( IOMemoryDescriptor * buffer, - UInt16 * actualByteCount ); - - /* Added with 10.1.3 */ - virtual IOReturn readTrackInfo ( IOMemoryDescriptor * buffer, - UInt32 address, - CDTrackInfoAddressType addressType, - UInt16 * actualByteCount ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IODVDServices, 1 ); - OSMetaClassDeclareReservedUnused ( IODVDServices, 2 ); - OSMetaClassDeclareReservedUnused ( IODVDServices, 3 ); - OSMetaClassDeclareReservedUnused ( IODVDServices, 4 ); - OSMetaClassDeclareReservedUnused ( IODVDServices, 5 ); - OSMetaClassDeclareReservedUnused ( IODVDServices, 6 ); - OSMetaClassDeclareReservedUnused ( IODVDServices, 7 ); - OSMetaClassDeclareReservedUnused ( IODVDServices, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_DVD_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOReducedBlockServices.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOReducedBlockServices.h.svn-base deleted file mode 100644 index 87ad8ed..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/IOReducedBlockServices.h.svn-base +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_REDUCED_BLOCK_SERVICES_H_ -#define _IOKIT_IO_REDUCED_BLOCK_SERVICES_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// Generic IOKit related headers -#include <IOKit/IOTypes.h> - -// Generic IOKit storage related headers -#include <IOKit/storage/IOBlockStorageDevice.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIPeripheralDeviceType0E.h> - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOReducedBlockServices : public IOBlockStorageDevice -{ - - OSDeclareDefaultStructors ( IOReducedBlockServices ) - - -protected: - // Reserve space for future expansion. - struct IOReducedBlockServicesExpansionData { }; - IOReducedBlockServicesExpansionData * fIOReducedBlockServicesReserved; - - IOSCSIPeripheralDeviceType0E * fProvider; - - virtual bool attach ( IOService * provider ); - virtual void detach ( IOService * provider ); - - -public: - - virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); - - static void AsyncReadWriteComplete ( void * clientData, - IOReturn status, - UInt64 actualByteCount ); - - // Deprecated - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageAttributes * attributes, - IOStorageCompletion * completion ); - - virtual IOReturn doEjectMedia ( void ); - - virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); - - virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - - virtual IOReturn doLockUnlockMedia ( bool doLock ); - - virtual IOReturn doSynchronizeCache ( void ); - - virtual IOReturn getWriteCacheState ( bool * enabled ); - - virtual IOReturn setWriteCacheState ( bool enabled ); - - virtual char * getVendorString ( void ); - - virtual char * getProductString ( void ); - - virtual char * getRevisionString ( void ); - - virtual char * getAdditionalDeviceInfoString ( void ); - - virtual IOReturn reportBlockSize ( UInt64 * blockSize ); - - virtual IOReturn reportEjectability ( bool * isEjectable ); - - virtual IOReturn reportLockability ( bool * isLockable ); - - virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); - - virtual IOReturn reportPollRequirements ( bool * pollIsRequired, - bool * pollIsExpensive ); - - virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); - - virtual IOReturn reportRemovability ( bool * isRemovable ); - - virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 1 ); - OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 2 ); - OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 3 ); - OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 4 ); - OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 5 ); - OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 6 ); - OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 7 ); - OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_REDUCED_BLOCK_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIBlockCommandsDevice.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIBlockCommandsDevice.h.svn-base deleted file mode 100644 index 2cb4a6d..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIBlockCommandsDevice.h.svn-base +++ /dev/null @@ -1,1146 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_SCSI_BLOCK_COMMANDS_DEVICE_H_ -#define _IOKIT_IO_SCSI_BLOCK_COMMANDS_DEVICE_H_ - -#if defined(KERNEL) && defined(__cplusplus) - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - -// SBC power states as defined in T10:996D SCSI Block Commands - 3 (SBC-3) -// Revision 8c, November 13, 1997, pages 10-11. -enum -{ - kSBCPowerStateSystemSleep = 0, - kSBCPowerStateSleep = 1, - kSBCPowerStateStandby = 2, - kSBCPowerStateIdle = 3, - kSBCPowerStateActive = 4, - kSBCNumPowerStates = 5 -}; - -enum -{ - kMediaStateUnlocked = 0, - kMediaStateLocked = 1 -}; - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// General IOKit headers -#include <IOKit/IOLib.h> -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IOService.h> -#include <IOKit/IOUserClient.h> - -// Generic IOKit storage related headers -#include <IOKit/storage/IOStorage.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIPrimaryCommandsDevice.h> - - -// Forward declaration for the SCSIBlockCommands that is used internally by the -// IOSCSIBlockCommandsDevice class. -class SCSIBlockCommands; - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIBlockCommandsDevice : public IOSCSIPrimaryCommandsDevice -{ - - OSDeclareAbstractStructors ( IOSCSIBlockCommandsDevice ) - -private: - - -#ifndef __LP64__ - - SCSIBlockCommands * fSCSIBlockCommandObject; - SCSIBlockCommands * GetSCSIBlockCommandObject ( void ); - -#endif /* !__LP64__ */ - - IOReturn GetWriteCacheState ( IOMemoryDescriptor * buffer, - UInt8 modePageControlValue ); - - static void AsyncReadWriteComplete ( SCSITaskIdentifier completedTask ); - -protected: - - // Reserve space for future expansion. - struct IOSCSIBlockCommandsDeviceExpansionData - { - IONotifier * fPowerDownNotifier; - bool fWriteCacheEnabled; - bool fDeviceIsShared; - UInt64 fMediumBlockCount64; - bool fDeviceHasSATTranslation; - bool fProtocolSpecificPowerControl; - bool fRequiresEjectWithStartStopUnit; - }; - IOSCSIBlockCommandsDeviceExpansionData * fIOSCSIBlockCommandsDeviceReserved; - - #define fPowerDownNotifier fIOSCSIBlockCommandsDeviceReserved->fPowerDownNotifier - #define fWriteCacheEnabled fIOSCSIBlockCommandsDeviceReserved->fWriteCacheEnabled - - // The fDeviceIsShared is used to indicate whether this device exists on a Physical - // Interconnect that allows multiple initiators to access it. This is used mainly - // by the power management code to not send power state related START_STOP_UNIT - // commands to the device. - // The fDeviceIsShared value is also used to prevent power state commands from being - // sent to manual eject device since these devices behave better when allowed to - // manage their own power. - #define fDeviceIsShared fIOSCSIBlockCommandsDeviceReserved->fDeviceIsShared - - // The fMediumBlockCount64 provides support for 64 bit LBAs and - // replaces fMediumBlockCount which only supports 32 bits. - // This value should not be directly accessed and instead the member routine - // ReportMediumTotalBlockCount() should be used to retrieve it and the member routine - // SetMediumCharacteristics() should be used to set it. - #define fMediumBlockCount64 fIOSCSIBlockCommandsDeviceReserved->fMediumBlockCount64 - - #define fDeviceHasSATTranslation fIOSCSIBlockCommandsDeviceReserved->fDeviceHasSATTranslation - - // Device support protocol specific power off - #define fProtocolSpecificPowerControl fIOSCSIBlockCommandsDeviceReserved->fProtocolSpecificPowerControl - - // Device requires START_STOP_UNIT for ejects, regardless if PREVENT_ALLOW_MEIDUMREMOVAL - // failed. - #define fRequiresEjectWithStartStopUnit fIOSCSIBlockCommandsDeviceReserved->fRequiresEjectWithStartStopUnit - -private: - /* OBSOLETE. Use IOSCSIPrimaryCommandsDevice::Get/SetANSIVersion */ - UInt8 fANSIVersion; - -protected: - // ---- Device Characteristics ---- - bool fMediaIsRemovable; - - // ---- Medium Characteristics ---- - bool fMediumPresent; - -private: - // The byte count of each physical block on the medium. - // This value should not be directly accessed and instead the member routine - // ReportMediumBlockSize() should be used to retrieve it and the member routine - // SetMediumCharacteristics() should be used to set it. - UInt32 fMediumBlockSize; - - // The total number of blocks of fMediumBlockSize on the medium. - // OBSOLETE. Use fMediumBlockCount64 instead which allows for support of - // devices that have 33 through 64 bit LBA values. - UInt32 fMediumBlockCount; - -protected: - // Whether the installed medium is protected from writes - bool fMediumIsWriteProtected; - - // Whether user removal of medium has been prevented - bool fMediumRemovalPrevented; - - // Indicates whether this is a known manual eject device - bool fKnownManualEject; - - // Polling thread variables - thread_call_t fPollingThread; - UInt32 fPollingMode; - enum - { - kPollingMode_Suspended = 0, - kPollingMode_NewMedia = 1, - kPollingMode_MediaRemoval = 2 - }; - - // ---- Methods for controlling the current state of device support ---- - virtual bool InitializeDeviceSupport ( void ); - virtual void StartDeviceSupport ( void ); - virtual void SuspendDeviceSupport ( void ); - virtual void ResumeDeviceSupport ( void ); - virtual void StopDeviceSupport ( void ); - virtual void TerminateDeviceSupport ( void ); - - virtual void free ( void ); - -#ifndef __LP64__ - - // This method will retrieve the SCSI Primary Command Set object for - // the class. For subclasses, this will be overridden using a - // dynamic cast on the subclasses base command set object. - virtual SCSIPrimaryCommands * GetSCSIPrimaryCommandObject ( void ); - - virtual bool CreateCommandSetObjects ( void ); - virtual void FreeCommandSetObjects ( void ); - -#endif /* !__LP64__ */ - - virtual bool ClearNotReadyStatus ( void ); - virtual void CreateStorageServiceNub ( void ); - virtual bool DetermineDeviceCharacteristics ( void ); - - // ---- Methods used for controlling the polling thread ---- - virtual void ProcessPoll ( void ); - virtual void EnablePolling ( void ); - virtual void DisablePolling ( void ); - - // Main and support methods for polling for new Media - virtual void PollForNewMedia ( void ); - virtual bool DetermineMediaPresence ( void ); - virtual bool PreventMediumRemoval ( void ); - virtual bool DetermineMediumCapacity ( - UInt64 * blockSize, - UInt64 * blockCount ); - virtual bool DetermineMediumWriteProtectState ( void ); - - // Main and support methods for polling for Media removal - virtual void PollForMediaRemoval ( void ); - - // ---- Methods used for handling medium characteristics ---- - - // OBSOLETE - Use the version compatible with 64 bit LBAs instead. - virtual void SetMediumCharacteristics ( - UInt32 blockSize, - UInt32 blockCount ); - - void SetMediumCharacteristics ( - UInt64 blockSize, - UInt64 blockCount ); - - virtual void ResetMediumCharacteristics ( void ); - - virtual IOReturn IssueRead ( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueRead ( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - void * clientData ); - - virtual IOReturn IssueWrite ( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueWrite ( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - void * clientData ); - - // ----- Power Management Support ------ - - // We override this method to set our power states and register ourselves - // as a power policy maker. - virtual void InitializePowerManagement ( IOService * provider ); - - // We override this method so that when we register for power management, - // we go to our active power state (which the drive is definitely in - // at startup time). - virtual UInt32 GetInitialPowerState ( void ); - - // We override this method in order to provide the number of transitions - // from Fully active to Sleep state so that the idle timer can be adjusted - // to the appropriate time period based on the disk spindown time set in - // the Energy Saver prefs panel. - virtual UInt32 GetNumberOfPowerStateTransitions ( void ); - - // The TicklePowerManager method is called to tell the power manager that - // the device needs to be in a certain power state to handle requests. - virtual void TicklePowerManager ( void ); - - // The HandlePowerChange method is the state machine for power management. - // It is guaranteed to be on its own thread of execution (different from - // the power manager thread AND the workloop thread. This routine can - // send sync or async calls to the drive without worrying about threading - // issues. - virtual void HandlePowerChange ( void ); - - // The HandleCheckPowerState (void) method is on the serialized side of the - // command gate and can change member variables safely without - // multi-threading issues. It's main purpose is to call the superclass' - // HandleCheckPowerState ( UInt32 maxPowerState ) with the max power state - // the class registered with. - virtual void HandleCheckPowerState ( void ); - - // The VerifyMediumPresence method is called to see if the medium which we - // anticipated being there is still there. - virtual bool VerifyMediumPresence ( void ); - -public: - - static void sProcessPoll ( void * pdtDriver, void * refCon ); - - // ---- Methods for controlling the device ---- - virtual IOReturn SyncReadWrite ( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - UInt64 blockSize ); - - virtual IOReturn AsyncReadWrite ( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - UInt64 blockSize, - void * clientData ); - - IOReturn GetWriteCacheState ( bool * enabled ); - IOReturn SetWriteCacheState ( bool enabled ); - void DetermineMediumGeometry ( void ); - - // ---- Methods for controlling medium state ---- - virtual IOReturn EjectTheMedium ( void ); - virtual IOReturn LockUnlockMedium ( bool doLock ); - virtual IOReturn SynchronizeCache ( void ); - - // ---- Methods for controlling media format ---- - virtual IOReturn FormatMedium ( - UInt64 blockCount, - UInt64 blockSize ); - virtual UInt32 GetFormatCapacities ( - UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - - // ---- Query methods to report device characteristics ---- - - // Report the maximum number of blocks that the device can handle per - // read or write. A value of 0 (zero) indicates there is no limit aside - // from the size of the method's return parameter. - virtual UInt64 ReportDeviceMaxBlocksReadTransfer ( void ); - virtual UInt64 ReportDeviceMaxBlocksWriteTransfer ( void ); - - // Report whether the device supports removal of the media. - virtual bool ReportDeviceMediaRemovability ( void ); - - // ---- Query methods to report installed medium characteristics ---- - virtual UInt64 ReportMediumBlockSize ( void ); - virtual UInt64 ReportMediumTotalBlockCount ( void ); - virtual bool ReportMediumWriteProtection ( void ); - - -protected: - - -#ifndef __LP64__ - - // Command methods to access all commands available to SBC based devices. - virtual bool ERASE_10 ( - SCSITaskIdentifier request, - SCSICmdField1Bit ERA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool ERASE_12 ( - SCSITaskIdentifier request, - SCSICmdField1Bit ERA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool FORMAT_UNIT ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - IOByteCount defectListSize, - SCSICmdField1Bit FMTDATA, - SCSICmdField1Bit CMPLST, - SCSICmdField3Bit DEFECT_LIST_FORMAT, - SCSICmdField1Byte VENDOR_SPECIFIC, - SCSICmdField2Byte INTERLEAVE, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 Section 5.41 - bool FORMAT_UNIT ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - IOByteCount defectListSize, - SCSICmdField1Bit FMTPINFO, - SCSICmdField1Bit RTO_REQ, - SCSICmdField1Bit LONGLIST, - SCSICmdField1Bit FMTDATA, - SCSICmdField1Bit CMPLST, - SCSICmdField3Bit DEFECT_LIST_FORMAT, - SCSICmdField1Byte VENDOR_SPECIFIC, - SCSICmdField1Byte CONTROL ); - - virtual bool LOCK_UNLOCK_CACHE ( - SCSITaskIdentifier request, - SCSICmdField1Bit LOCK, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte NUMBER_OF_BLOCKS, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.5 - bool LOCK_UNLOCK_CACHE ( - SCSITaskIdentifier request, - SCSICmdField1Bit LOCK, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte NUMBER_OF_BLOCKS, - SCSICmdField1Byte CONTROL ); - - bool LOCK_UNLOCK_CACHE_16 ( - SCSITaskIdentifier request, - SCSICmdField1Bit LOCK, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte NUMBER_OF_BLOCKS, - SCSICmdField1Byte CONTROL ); - - virtual bool MEDIUM_SCAN ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit WBS, - SCSICmdField1Bit ASA, - SCSICmdField1Bit PSD, - SCSICmdField1Bit PRA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool PREFETCH ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.7 - bool PREFETCH ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - bool PREFETCH_16 ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - - virtual bool READ_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField21Bit LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - -#endif /* __LP64__ */ - - virtual bool READ_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.10 - bool READ_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit RDPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit FUA_NV, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool READ_12 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.11 - bool READ_12 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit RDPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit FUA_NV, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - - bool READ_16 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit RDPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit FUA_NV, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - - virtual bool READ_CAPACITY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Bit PMI, - SCSICmdField1Byte CONTROL ); - - bool READ_CAPACITY_16 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte ALLOCATION_LENGTH, - SCSICmdField1Bit PMI, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - virtual bool READ_DEFECT_DATA_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PLIST, - SCSICmdField1Bit GLIST, - SCSICmdField3Bit DEFECT_LIST_FORMAT, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool READ_DEFECT_DATA_12 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PLIST, - SCSICmdField1Bit GLIST, - SCSICmdField3Bit DEFECT_LIST_FORMAT, - SCSICmdField4Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool READ_GENERATION ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool READ_LONG ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit CORRCT, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte BYTE_TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - bool READ_LONG_16 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte BYTE_TRANSFER_LENGTH, - SCSICmdField1Bit CORRCT, - SCSICmdField1Byte CONTROL ); - - virtual bool READ_UPDATED_BLOCK_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Bit LATEST, - SCSICmdField15Bit GENERATION_ADDRESS, - SCSICmdField1Byte CONTROL ); - - virtual bool REASSIGN_BLOCKS ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.20 - bool REASSIGN_BLOCKS ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit LONGLBA, - SCSICmdField1Bit LONGLIST, - SCSICmdField1Byte CONTROL ); - - virtual bool REBUILD ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit INTDATA, - SCSICmdField2Bit PORT_CONTROL, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte REBUILD_LENGTH, - SCSICmdField4Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool REGENERATE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit INTDATA, - SCSICmdField2Bit PORT_CONTROL, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte REBUILD_LENGTH, - SCSICmdField4Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool REZERO_UNIT ( - SCSITaskIdentifier request, - SCSICmdField1Byte CONTROL ); - - virtual bool SEARCH_DATA_EQUAL_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit INVERT, - SCSICmdField1Bit SPNDAT, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte NUMBER_OF_BLOCKS_TO_SEARCH, - SCSICmdField1Byte CONTROL ); - - virtual bool SEARCH_DATA_HIGH_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit INVERT, - SCSICmdField1Bit SPNDAT, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte NUMBER_OF_BLOCKS_TO_SEARCH, - SCSICmdField1Byte CONTROL ); - - virtual bool SEARCH_DATA_LOW_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit INVERT, - SCSICmdField1Bit SPNDAT, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte NUMBER_OF_BLOCKS_TO_SEARCH, - SCSICmdField1Byte CONTROL ); - - virtual bool SEEK_6 ( - SCSITaskIdentifier request, - SCSICmdField21Bit LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Byte CONTROL ); - - virtual bool SEEK_10 ( - SCSITaskIdentifier request, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Byte CONTROL ); - - virtual bool SET_LIMITS_10 ( - SCSITaskIdentifier request, - SCSICmdField1Bit RDINH, - SCSICmdField1Bit WRINH, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte NUMBER_OF_BLOCKS, - SCSICmdField1Byte CONTROL ); - - virtual bool SET_LIMITS_12 ( - SCSITaskIdentifier request, - SCSICmdField1Bit RDINH, - SCSICmdField1Bit WRINH, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte NUMBER_OF_BLOCKS, - SCSICmdField1Byte CONTROL ); - -#endif /* __LP64__ */ - - virtual bool START_STOP_UNIT ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField4Bit POWER_CONDITIONS, - SCSICmdField1Bit LOEJ, - SCSICmdField1Bit START, - SCSICmdField1Byte CONTROL ); - - virtual bool SYNCHRONIZE_CACHE ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte NUMBER_OF_BLOCKS, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.22 - bool SYNCHRONIZE_CACHE ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField1Bit SYNC_NV, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte NUMBER_OF_BLOCKS, - SCSICmdField1Byte CONTROL ); - - bool SYNCRONIZE_CACHE_16 ( - SCSITaskIdentifier request, - SCSICmdField1Bit SYNC_NV, - SCSICmdField1Bit IMMED, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte NUMBER_OF_BLOCKS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - virtual bool UPDATE_BLOCK ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Byte CONTROL ); - - virtual bool VERIFY_10 ( - SCSITaskIdentifier request, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BLKVFY, - SCSICmdField1Bit BYTCHK, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte VERIFICATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.24 - bool VERIFY_10 ( - SCSITaskIdentifier request, - SCSICmdField3Bit VRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYTCHK, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte VERIFICATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool VERIFY_12 ( - SCSITaskIdentifier request, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BLKVFY, - SCSICmdField1Bit BYTCHK, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte VERIFICATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.25 - bool VERIFY_12 ( - SCSITaskIdentifier request, - SCSICmdField3Bit VRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYTCHK, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField4Byte VERIFICATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - bool VERIFY_16 ( - SCSITaskIdentifier request, - SCSICmdField3Bit VRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYTCHK, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte VERIFICATION_LENGTH, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - - virtual bool WRITE_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField2Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - -#endif /* __LP64__ */ - - virtual bool WRITE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit EBP, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.29 - bool WRITE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit FUA_NV, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool WRITE_12 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit EBP, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.30 - bool WRITE_12 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit FUA_NV, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - bool WRITE_16 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit FUA_NV, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - virtual bool WRITE_AND_VERIFY_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit EBP, - SCSICmdField1Bit BYTCHK, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.33 - bool WRITE_AND_VERIFY_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYTCHK, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool WRITE_AND_VERIFY_12 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit EBP, - SCSICmdField1Bit BYTCHK, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.34 - bool WRITE_AND_VERIFY_12 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYTCHK, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - - bool WRITE_AND_VERIFY_16 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYTCHK, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - - - virtual bool WRITE_LONG ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - bool WRITE_LONG_16 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Bit CORRCT, - SCSICmdField1Byte CONTROL ); - - virtual bool WRITE_SAME ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PBDATA, - SCSICmdField1Bit LBDATA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.39 - bool WRITE_SAME ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit PBDATA, - SCSICmdField1Bit LBDATA, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - bool WRITE_SAME_16 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit PBDATA, - SCSICmdField1Bit LBDATA, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - - virtual bool XDREAD ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.42 - bool XDREAD ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit XORPINFO, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool XDWRITE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit DISABLE_WRITE, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.43 - bool XDWRITE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit DISABLE_WRITE, - SCSICmdField1Bit FUA_NV, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool XDWRITE_EXTENDED ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit TABLE_ADDRESS, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit DISABLE_WRITE, - SCSICmdField2Bit PORT_CONTROL, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte SECONDARY_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField1Byte SECONDARY_ADDRESS, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.46 - bool XDWRITEREAD_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit DISABLE_WRITE, - SCSICmdField1Bit FUA_NV, - SCSICmdField1Bit XORPINFO, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool XPWRITE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.48 - bool XPWRITE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit FUA_NV, - SCSICmdField1Bit XORPINFO, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - -#endif /* __LP64__ */ - - - /* Added with 10.2 */ - OSMetaClassDeclareReservedUsed ( IOSCSIBlockCommandsDevice, 1 ); - -public: - - virtual IOReturn PowerDownHandler ( void * refCon, - UInt32 messageType, - IOService * provider, - void * messageArgument, - vm_size_t argSize ); - - - /* Added with 10.2 */ - OSMetaClassDeclareReservedUsed ( IOSCSIBlockCommandsDevice, 2 ); - -protected: - - virtual void SetMediumIcon ( void ); - - - /* Added with 10.3.3 */ - OSMetaClassDeclareReservedUsed ( IOSCSIBlockCommandsDevice, 3 ); - -protected: - - virtual void AsyncReadWriteCompletion ( SCSITaskIdentifier completedTask ); - - - /* Added with 10.6.0 */ - OSMetaClassDeclareReservedUsed ( IOSCSIBlockCommandsDevice, 4 ); - -public: - - virtual IOReturn AsyncReadWrite ( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - UInt64 blockSize, - IOStorageAttributes * attributes, - void * clientData ); - - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 8 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 9 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 10 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 11 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 12 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 16 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_BLOCK_COMMANDS_DEVICE_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIMultimediaCommandsDevice.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIMultimediaCommandsDevice.h.svn-base deleted file mode 100644 index f812a39..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIMultimediaCommandsDevice.h.svn-base +++ /dev/null @@ -1,1057 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_SCSI_MULTIMEDIA_COMMANDS_DEVICE_H_ -#define _IOKIT_IO_SCSI_MULTIMEDIA_COMMANDS_DEVICE_H_ - -#if KERNEL -#include <IOKit/IOTypes.h> -#else -#include <CoreFoundation/CoreFoundation.h> -#endif - -#include <IOKit/storage/IOStorageDeviceCharacteristics.h> - - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - - -// Message constants -#define kIOMessageTrayStateChange 0x69000035 -#define kIOMessageTrayStateHasChanged kIOMessageTrayStateChange // DEPRECATED, use kIOMessageTrayStateChange instead - -// Message values for kIOMessageTrayStateChange -enum -{ - kMessageTrayStateChangeRequestAccepted = 0, - kMessageTrayStateChangeRequestRejected = 1 -}; - -#define kIOMessageMediaAccessChange 0x69000036 - -// Message values for kIOMessageMediaAccessChange -enum -{ - kMessageDeterminingMediaPresence = 0, - kMessageFoundMedia = 1, - kMessageMediaTypeDetermined = 2 -}; - -// IOKit property keys and constants -#define kIOPropertySupportedCDFeatures kIOPropertySupportedCDFeaturesKey -#define kIOPropertySupportedDVDFeatures kIOPropertySupportedDVDFeaturesKey -#define kIOPropertySupportedBDFeatures kIOPropertySupportedBDFeaturesKey -#define kIOPropertyLowPowerPolling "Low Power Polling" - -typedef UInt32 CDFeatures; -enum -{ - kCDFeaturesAnalogAudioBit = 0, // Analog Audio playback - kCDFeaturesReadStructuresBit = 1, // CD-ROM - kCDFeaturesWriteOnceBit = 2, // CD-R - kCDFeaturesReWriteableBit = 3, // CD-R/W - kCDFeaturesCDDAStreamAccurateBit = 4, // CD-DA stream accurate - kCDFeaturesPacketWriteBit = 5, // Packet Writing - kCDFeaturesTAOWriteBit = 6, // CD Track At Once - kCDFeaturesSAOWriteBit = 7, // CD Mastering - Session At Once - kCDFeaturesRawWriteBit = 8, // CD Mastering - Raw - kCDFeaturesTestWriteBit = 9, // CD Mastering/TAO - Test Write - kCDFeaturesBUFWriteBit = 10 // CD Mastering/TAO - Buffer Underrun Free -}; - -enum -{ - kCDFeaturesAnalogAudioMask = (1 << kCDFeaturesAnalogAudioBit), - kCDFeaturesReadStructuresMask = (1 << kCDFeaturesReadStructuresBit), - kCDFeaturesWriteOnceMask = (1 << kCDFeaturesWriteOnceBit), - kCDFeaturesReWriteableMask = (1 << kCDFeaturesReWriteableBit), - kCDFeaturesCDDAStreamAccurateMask = (1 << kCDFeaturesCDDAStreamAccurateBit), - kCDFeaturesPacketWriteMask = (1 << kCDFeaturesPacketWriteBit), - kCDFeaturesTAOWriteMask = (1 << kCDFeaturesTAOWriteBit), - kCDFeaturesSAOWriteMask = (1 << kCDFeaturesSAOWriteBit), - kCDFeaturesRawWriteMask = (1 << kCDFeaturesRawWriteBit), - kCDFeaturesTestWriteMask = (1 << kCDFeaturesTestWriteBit), - kCDFeaturesBUFWriteMask = (1 << kCDFeaturesBUFWriteBit) -}; - -typedef UInt32 DVDFeatures; -enum -{ - kDVDFeaturesCSSBit = 0, // DVD-CSS - kDVDFeaturesReadStructuresBit = 1, // DVD-ROM - kDVDFeaturesWriteOnceBit = 2, // DVD-R - kDVDFeaturesRandomWriteableBit = 3, // DVD-RAM - kDVDFeaturesReWriteableBit = 4, // DVD-RW - kDVDFeaturesTestWriteBit = 5, // DVD-R Write - Test Write - kDVDFeaturesBUFWriteBit = 6, // DVD-R Write - Buffer Underrun Free - kDVDFeaturesPlusRBit = 7, // DVD+R - kDVDFeaturesPlusRWBit = 8, // DVD+RW (implies backgound format support) - kDVDFeaturesHDReadBit = 9, // HD DVD-ROM - kDVDFeaturesHDRBit = 10, // HD DVD-R - kDVDFeaturesHDRAMBit = 11, // HD DVD-RAM - kDVDFeaturesHDRWBit = 12 // HD DVD-RW -}; - -enum -{ - kDVDFeaturesCSSMask = (1 << kDVDFeaturesCSSBit), - kDVDFeaturesReadStructuresMask = (1 << kDVDFeaturesReadStructuresBit), - kDVDFeaturesWriteOnceMask = (1 << kDVDFeaturesWriteOnceBit), - kDVDFeaturesRandomWriteableMask = (1 << kDVDFeaturesRandomWriteableBit), - kDVDFeaturesReWriteableMask = (1 << kDVDFeaturesReWriteableBit), - kDVDFeaturesTestWriteMask = (1 << kDVDFeaturesTestWriteBit), - kDVDFeaturesBUFWriteMask = (1 << kDVDFeaturesBUFWriteBit), - kDVDFeaturesPlusRMask = (1 << kDVDFeaturesPlusRBit), - kDVDFeaturesPlusRWMask = (1 << kDVDFeaturesPlusRWBit), - kDVDFeaturesHDReadMask = (1 << kDVDFeaturesHDReadBit), - kDVDFeaturesHDRMask = (1 << kDVDFeaturesHDRBit), - kDVDFeaturesHDRAMMask = (1 << kDVDFeaturesHDRAMBit), - kDVDFeaturesHDRWMask = (1 << kDVDFeaturesHDRWBit) -}; - -typedef UInt32 BDFeatures; -enum -{ - kBDFeaturesReadBit = 0, // BD-ROM - kBDFeaturesWriteBit = 1 // BD-R / BD-RE -}; - -enum -{ - kBDFeaturesReadMask = (1 << kBDFeaturesReadBit), - kBDFeaturesWriteMask = (1 << kBDFeaturesWriteBit) -}; - -enum -{ - kDiscStatusEmpty = 0, - kDiscStatusIncomplete = 1, - kDiscStatusComplete = 2, - kDiscStatusOther = 3, - kDiscStatusMask = 0x03, - kDiscStatusErasableMask = 0x10 -}; - - -#if defined(KERNEL) && defined(__cplusplus) - -// MMC power states as defined in T10:1228D SCSI Multimedia Commands - 2 (MMC-2) -// Revision 11a, August 30, 1999, page 312 (Annex F). -enum -{ - kMMCPowerStateSystemSleep = 0, - kMMCPowerStateSleep = 1, - kMMCPowerStateStandby = 2, - kMMCPowerStateIdle = 3, - kMMCPowerStateActive = 4, - kMMCNumPowerStates = 5 -}; - -enum -{ - kMediaStateUnlocked = 0, - kMediaStateLocked = 1 -}; - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// General IOKit headers -#include <IOKit/IOLib.h> -#include <IOKit/IOMemoryDescriptor.h> - -// Generic IOKit storage related headers -#include <IOKit/storage/IOStorage.h> -#include <IOKit/storage/IOCDTypes.h> -#include <IOKit/storage/IODVDTypes.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIPrimaryCommandsDevice.h> - -// Forward definitions for internal use only classes -class SCSIMultimediaCommands; -class SCSIBlockCommands; - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIMultimediaCommandsDevice : public IOSCSIPrimaryCommandsDevice -{ - - OSDeclareAbstractStructors ( IOSCSIMultimediaCommandsDevice ) - -private: - -#ifndef __LP64__ - - SCSIMultimediaCommands * fSCSIMultimediaCommandObject; - SCSIMultimediaCommands * GetSCSIMultimediaCommandObject ( void ); - - SCSIBlockCommands * fSCSIBlockCommandObject; /* OBSOLETE */ - SCSIBlockCommands * GetSCSIBlockCommandObject ( void ); /* OBSOLETE */ - -#endif /* !__LP64__ */ - - static void AsyncReadWriteComplete ( SCSITaskIdentifier completedTask ); - -protected: - - // Reserve space for future expansion. - struct IOSCSIMultimediaCommandsDeviceExpansionData - { - IONotifier * fPowerDownNotifier; - bool fDeviceSupportsPowerOff; - BDFeatures fSupportedBDFeatures; - bool fDeviceSupportsAsyncNotification; - bool fDeviceSupportsFastSpindown; - UInt8 fCDLoadingMechanism; - }; - IOSCSIMultimediaCommandsDeviceExpansionData * fIOSCSIMultimediaCommandsDeviceReserved; - - #define fPowerDownNotifier fIOSCSIMultimediaCommandsDeviceReserved->fPowerDownNotifier - #define fDeviceSupportsPowerOff fIOSCSIMultimediaCommandsDeviceReserved->fDeviceSupportsPowerOff - #define fSupportedBDFeatures fIOSCSIMultimediaCommandsDeviceReserved->fSupportedBDFeatures - #define fDeviceSupportsAsyncNotification fIOSCSIMultimediaCommandsDeviceReserved->fDeviceSupportsAsyncNotification - #define fDeviceSupportsFastSpindown fIOSCSIMultimediaCommandsDeviceReserved->fDeviceSupportsFastSpindown - #define fCDLoadingMechanism fIOSCSIMultimediaCommandsDeviceReserved->fCDLoadingMechanism - -#ifndef __LP64__ - - // This method will retreive the SCSI Primary Command Set object for - // the class. For subclasses, this will be overridden using a - // dynamic cast on the subclasses base command set object. - virtual SCSIPrimaryCommands * GetSCSIPrimaryCommandObject ( void ); - -#endif /* !__LP64__ */ - - CDFeatures fSupportedCDFeatures; - DVDFeatures fSupportedDVDFeatures; - - UInt16 fCurrentDiscSpeed; - bool fMediaChanged; - bool fMediaPresent; - - // The byte count of each physical block on the media. - UInt32 fMediaBlockSize; - - // The total number of blocks of fMediaBlockSize on the media. - UInt32 fMediaBlockCount; - - // Flags used to indicate device feature - bool fMediaIsRemovable; - bool fMediaIsWriteProtected; - UInt32 fMediaType; - - thread_call_t fPollingThread; - bool fDeviceSupportsLowPowerPolling; - bool fLowPowerPollingEnabled; - UInt32 fPollingMode; - - enum - { - kPollingMode_Suspended = 0, - kPollingMode_NewMedia = 1, - kPollingMode_MediaRemoval = 2 - }; - - virtual IOReturn setProperties ( OSObject * properties ); - - virtual void CreateStorageServiceNub ( void ); - virtual bool DetermineDeviceCharacteristics ( void ); - virtual IOReturn DetermineIfMediaIsRemovable ( void ); - virtual IOReturn DetermineDeviceFeatures ( void ); - virtual void DetermineMediaType ( void ); - virtual bool CheckForDVDMediaType ( void ); - virtual bool CheckForCDMediaType ( void ); - virtual void PollForMedia ( void ); - virtual void EnablePolling ( void ); - virtual void DisablePolling ( void ); - virtual void CheckWriteProtection ( void ); - virtual bool ClearNotReadyStatus ( void ); - - virtual IOReturn GetDeviceConfiguration ( void ); - virtual IOReturn GetDeviceConfigurationSize ( UInt32 * size ); - virtual IOReturn ParseFeatureList ( UInt32 numProfiles, UInt8 * firstFeaturePtr ); - - virtual IOReturn GetMechanicalCapabilities ( void ); - virtual IOReturn GetMechanicalCapabilitiesSize ( UInt32 * size ); - virtual IOReturn ParseMechanicalCapabilities ( UInt8 * mechanicalCapabilitiesPtr ); - - virtual IOReturn CheckForLowPowerPollingSupport ( void ); - virtual IOReturn GetCurrentPowerStateOfDrive ( UInt32 * powerState ); - - virtual IOReturn IssueRead ( IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueRead ( IOMemoryDescriptor * buffer, - void * clientData, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueWrite ( IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueWrite ( IOMemoryDescriptor * buffer, - void * clientData, - UInt64 startBlock, - UInt64 blockCount ); - - virtual void SetMediaCharacteristics ( UInt32 blockSize, UInt32 blockCount ); - virtual void ResetMediaCharacteristics ( void ); - - UInt8 ConvertBCDToHex ( UInt8 binaryCodedDigit ); - - // ------ User Client Support ------ - - virtual IOReturn HandleSetUserClientExclusivityState ( IOService * userClient, bool state ); - - // ----- Power Management Support ------ - - // We override this method to set our power states and register ourselves - // as a power policy maker. - virtual void InitializePowerManagement ( IOService * provider ); - - // We override this method so that when we register for power management, - // we go to our active power state (which the drive is definitely in - // at startup time). - virtual UInt32 GetInitialPowerState ( void ); - - // We override this method in order to provide the number of transitions - // from Fully active to Sleep state so that the idle timer can be adjusted - // to the appropriate time period based on the disk spindown time set in - // the Energy Saver prefs panel. - virtual UInt32 GetNumberOfPowerStateTransitions ( void ); - - // The TicklePowerManager method is called to tell the power manager that the - // device needs to be in a certain power state to handle requests. - virtual void TicklePowerManager ( void ); - - // The HandlePowerChange method is the state machine for power management. - // It is guaranteed to be on its own thread of execution (different from - // the power manager thread AND the workloop thread. This routine can - // send sync or async calls to the drive without worrying about threading - // issues. - virtual void HandlePowerChange ( void ); - - // The HandleCheckPowerState (void) method is on the serialized side of the command - // gate and can change member variables safely without multi-threading issues. - // It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) - // with the max power state the class registered with. - virtual void HandleCheckPowerState ( void ); - - // The CheckMediaPresence method is called to see if the media which we - // anticipated being there is still there. - virtual bool CheckMediaPresence ( void ); - - virtual bool InitializeDeviceSupport ( void ); - virtual void StartDeviceSupport ( void ); - virtual void SuspendDeviceSupport ( void ); - virtual void ResumeDeviceSupport ( void ); - virtual void StopDeviceSupport ( void ); - virtual void TerminateDeviceSupport ( void ); - - virtual void free ( void ); - -#ifndef __LP64__ - - virtual bool CreateCommandSetObjects ( void ); - virtual void FreeCommandSetObjects ( void ); - -#endif /* !__LP64__ */ - - virtual IOReturn VerifyDeviceState ( void ); - - -public: - - virtual IOReturn setAggressiveness ( unsigned long type, unsigned long minutes ); - - virtual IOReturn SyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn AsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - void * clientData ); - - virtual IOReturn EjectTheMedia ( void ); - virtual IOReturn GetTrayState ( UInt8 * trayState ); - virtual IOReturn SetTrayState ( UInt8 trayState ); - virtual IOReturn FormatMedia ( UInt64 byteCapacity ); - virtual UInt32 GetFormatCapacities ( UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - virtual IOReturn LockUnlockMedia ( bool doLock ); - virtual IOReturn SynchronizeCache ( void ); - virtual IOReturn ReportBlockSize ( UInt64 * blockSize ); - virtual IOReturn ReportEjectability ( bool * isEjectable ); - virtual IOReturn ReportLockability ( bool * isLockable ); - virtual IOReturn ReportPollRequirements ( bool * pollIsRequired, - bool * pollIsExpensive ); - virtual IOReturn ReportMaxReadTransfer ( UInt64 blockSize, - UInt64 * max ); - virtual IOReturn ReportMaxValidBlock ( UInt64 * maxBlock ); - virtual IOReturn ReportMaxWriteTransfer ( UInt64 blockSize, - UInt64 * max ); - virtual IOReturn ReportMediaState ( bool * mediaPresent, - bool * changed ); - virtual IOReturn ReportRemovability ( bool * isRemovable ); - virtual IOReturn ReportWriteProtection ( bool * isWriteProtected ); - - static void sPollForMedia ( void * pdtDriver, void * refCon ); - - /* CD Specific */ - virtual IOReturn SetMediaAccessSpeed ( UInt16 kilobytesPerSecond ); - - virtual IOReturn GetMediaAccessSpeed ( UInt16 * kilobytesPerSecond ); - - virtual IOReturn AsyncReadCD ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - CDSectorArea sectorArea, - CDSectorType sectorType, - void * clientData ); - - virtual IOReturn ReadISRC ( UInt8 track, CDISRC isrc ); - - virtual IOReturn ReadMCN ( CDMCN mcn); - - virtual IOReturn ReadTOC ( IOMemoryDescriptor * buffer ); - -#ifndef __LP64__ - - virtual IOReturn AudioPause ( bool pause ); - - virtual IOReturn AudioPlay ( CDMSF timeStart, CDMSF timeStop ); - - virtual IOReturn AudioScan ( CDMSF timeStart, bool reverse ); - - virtual IOReturn AudioStop ( void ); - - virtual IOReturn GetAudioStatus ( CDAudioStatus * status ); - - virtual IOReturn GetAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume ); - - virtual IOReturn SetAudioVolume ( UInt8 leftVolume, UInt8 rightVolume ); - -#endif /* !__LP64__ */ - - /* DVD Specific */ - virtual UInt32 GetMediaType ( void ); - - virtual IOReturn ReportKey ( IOMemoryDescriptor * buffer, - const DVDKeyClass keyClass, - const UInt32 lba, - const UInt8 agid, - const DVDKeyFormat keyFormat ); - - virtual IOReturn SendKey ( IOMemoryDescriptor * buffer, - const DVDKeyClass keyClass, - const UInt8 agid, - const DVDKeyFormat keyFormat ); - - virtual IOReturn ReadDVDStructure ( IOMemoryDescriptor * buffer, - const UInt32 length, - const UInt8 structureFormat, - const UInt32 logicalBlockAddress, - const UInt8 layer, - const UInt8 agid ); - - // The block size decoding for Read CD and Read CD MSF as defined in table 255 - bool GetBlockSize ( - UInt32 * requestedByteCount, - SCSICmdField3Bit EXPECTED_SECTOR_TYPE, - SCSICmdField1Bit SYNC, - SCSICmdField2Bit HEADER_CODES, - SCSICmdField1Bit USER_DATA, - SCSICmdField1Bit EDC_ECC, - SCSICmdField2Bit ERROR_FIELD, - SCSICmdField3Bit SUBCHANNEL_SELECTION_BITS ); - - SCSICmdField4Byte ConvertMSFToLBA ( SCSICmdField3Byte MSF ); - -#ifndef __LP64__ - - // Command methods to access all commands available to MMC based devices. - // The BLANK command as defined in section 6.1.1 - virtual bool BLANK ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField3Bit BLANKING_TYPE, - SCSICmdField4Byte START_ADDRESS_TRACK_NUMBER, - SCSICmdField1Byte CONTROL ); - - // The CLOSE TRACK/SESSION command as defined in section 6.1.2 - virtual bool CLOSE_TRACK_SESSION ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField1Bit SESSION, - SCSICmdField1Bit TRACK, - SCSICmdField2Byte TRACK_NUMBER, - SCSICmdField1Byte CONTROL ); - - // The FORMAT UNIT command as defined in section 6.1.3 - virtual bool FORMAT_UNIT ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - IOByteCount parameterListSize, - SCSICmdField1Bit FMT_DATA, - SCSICmdField1Bit CMP_LIST, - SCSICmdField3Bit FORMAT_CODE, - SCSICmdField2Byte INTERLEAVE_VALUE, - SCSICmdField1Byte CONTROL ); - -#endif /* !__LP64__ */ - - - // The GET CONFIGURATION command as defined in section 6.1.4 - virtual bool GET_CONFIGURATION ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Bit RT, - SCSICmdField2Byte STARTING_FEATURE_NUMBER, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The GET EVENT/STATUS NOTIFICATION command as defined in section 6.1.5 - virtual bool GET_EVENT_STATUS_NOTIFICATION ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit IMMED, - SCSICmdField1Byte NOTIFICATION_CLASS_REQUEST, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The GET PERFORMANCE command as defined in section 6.1.6 - virtual bool GET_PERFORMANCE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Bit TOLERANCE, - SCSICmdField1Bit WRITE, - SCSICmdField2Bit EXCEPT, - SCSICmdField4Byte STARTING_LBA, - SCSICmdField2Byte MAXIMUM_NUMBER_OF_DESCRIPTORS, - SCSICmdField1Byte CONTROL ); - - // The LOAD/UNLOAD MEDIUM command as defined in section 6.1.7 - virtual bool LOAD_UNLOAD_MEDIUM ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField1Bit LO_UNLO, - SCSICmdField1Bit START, - SCSICmdField1Byte SLOT, - SCSICmdField1Byte CONTROL ); - - // The MECHANISM STATUS command as defined in section 6.1.8 - virtual bool MECHANISM_STATUS ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - // The PAUSE/RESUME command as defined in section 6.1.9 - virtual bool PAUSE_RESUME ( - SCSITaskIdentifier request, - SCSICmdField1Bit RESUME, - SCSICmdField1Byte CONTROL ); - - // The PLAY AUDIO (10) command as defined in section 6.1.10 - virtual bool PLAY_AUDIO_10 ( - SCSITaskIdentifier request, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte STARTING_LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte PLAY_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The PLAY AUDIO (12) command as defined in section 6.1.11 - virtual bool PLAY_AUDIO_12 ( - SCSITaskIdentifier request, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte STARTING_LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte PLAY_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The PLAY AUDIO MSF command as defined in section 6.1.12 - virtual bool PLAY_AUDIO_MSF ( - SCSITaskIdentifier request, - SCSICmdField3Byte STARTING_MSF, - SCSICmdField3Byte ENDING_MSF, - SCSICmdField1Byte CONTROL ); - - /*********************** LEGACY COMMAND SUPPORT ***********************/ - // The PLAY CD command as defined in section 6.1.13 - virtual bool PLAY_CD ( - SCSITaskIdentifier request, - SCSICmdField3Bit EXPECTED_SECTOR_TYPE, - SCSICmdField1Bit CMSF, - SCSICmdField4Byte STARTING_LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte PLAY_LENGTH_IN_BLOCKS, - SCSICmdField1Bit SPEED, - SCSICmdField1Bit PORT2, - SCSICmdField1Bit PORT1, - SCSICmdField1Bit COMPOSITE, - SCSICmdField1Bit AUDIO, - SCSICmdField1Byte CONTROL ); - /*********************** END LEGACY COMMAND SUPPORT *******************/ - -#endif /* !__LP64__ */ - - virtual bool READ_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor *dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - /*********************** LEGACY COMMAND SUPPORT ***********************/ - // The READ BUFFER CAPACITY command as defined in section 6.1.14 - virtual bool READ_BUFFER_CAPACITY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - /*********************** END LEGACY COMMAND SUPPORT *******************/ - -#endif /* !__LP64__ */ - - // The READ CD command as defined in section 6.1.15 - virtual bool READ_CD ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Bit EXPECTED_SECTOR_TYPE, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte STARTING_LOGICAL_BLOCK_ADDRESS, - SCSICmdField3Byte TRANSFER_LENGTH, - SCSICmdField1Bit SYNC, - SCSICmdField2Bit HEADER_CODES, - SCSICmdField1Bit USER_DATA, - SCSICmdField1Bit EDC_ECC, - SCSICmdField2Bit ERROR_FIELD, - SCSICmdField3Bit SUBCHANNEL_SELECTION_BITS, - SCSICmdField1Byte CONTROL ); - - // The READ CD MSF command as defined in section 6.1.16 - virtual bool READ_CD_MSF ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Bit EXPECTED_SECTOR_TYPE, - SCSICmdField3Byte STARTING_MSF, - SCSICmdField3Byte ENDING_MSF, - SCSICmdField1Bit SYNC, - SCSICmdField2Bit HEADER_CODES, - SCSICmdField1Bit USER_DATA, - SCSICmdField1Bit EDC_ECC, - SCSICmdField2Bit ERROR_FIELD, - SCSICmdField3Bit SUBCHANNEL_SELECTION_BITS, - SCSICmdField1Byte CONTROL ); - - // The READ CAPACITY command as defined in section 6.1.17 - virtual bool READ_CAPACITY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Bit PMI, - SCSICmdField1Byte CONTROL ); - - // The READ DISC INFORMATION command as defined in section 6.1.18 - virtual bool READ_DISC_INFORMATION ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The READ DVD STRUCTURE command as defined in section 6.1.19 - virtual bool READ_DVD_STRUCTURE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Byte ADDRESS, - SCSICmdField1Byte LAYER_NUMBER, - SCSICmdField1Byte FORMAT, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField2Bit AGID, - SCSICmdField1Byte CONTROL ); - - // The READ FORMAT CAPACITIES command as defined in section 6.1.20 - virtual bool READ_FORMAT_CAPACITIES ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - /*********************** LEGACY COMMAND SUPPORT ***********************/ - // The READ HEADER command as defined in section 6.1.21 - virtual bool READ_HEADER ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit MSF, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - /*********************** END LEGACY COMMAND SUPPORT ***********************/ - - /*********************** LEGACY COMMAND SUPPORT ***********************/ - // The READ MASTER CUE command as defined in section 6.1.22 - virtual bool READ_MASTER_CUE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Byte SHEET_NUMBER, - SCSICmdField3Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - /*********************** END LEGACY COMMAND SUPPORT ***********************/ - -#endif /* !__LP64__ */ - - // The READ SUB-CHANNEL command as defined in section 6.1.23 - virtual bool READ_SUB_CHANNEL ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit MSF, - SCSICmdField1Bit SUBQ, - SCSICmdField1Byte SUB_CHANNEL_PARAMETER_LIST, - SCSICmdField1Byte TRACK_NUMBER, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The READ TOC/PMA/ATIP command as defined in section 6.1.24/25 - virtual bool READ_TOC_PMA_ATIP ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit MSF, - SCSICmdField4Bit FORMAT, - SCSICmdField1Byte TRACK_SESSION_NUMBER, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The READ TRACK INFORMATION command as defined in section 6.1.26 - virtual bool READ_TRACK_INFORMATION ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Bit ADDRESS_NUMBER_TYPE, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS_TRACK_SESSION_NUMBER, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - /*********************** LEGACY COMMAND SUPPORT ***********************/ - // The REPAIR TRACK command as defined in section 6.1.27 - virtual bool REPAIR_TRACK ( - SCSITaskIdentifier request, - SCSICmdField2Byte TRACK_NUMBER, - SCSICmdField1Byte CONTROL ); - /*********************** END LEGACY COMMAND SUPPORT ***********************/ - - // The REPORT KEY command as defined in section 6.1.28 - virtual bool REPORT_KEY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField2Bit AGID, - SCSICmdField6Bit KEY_FORMAT, - SCSICmdField1Byte CONTROL ); - - // The RESERVE TRACK command as defined in section 6.1.29 - virtual bool RESERVE_TRACK ( - SCSITaskIdentifier request, - SCSICmdField4Byte RESERVATION_SIZE, - SCSICmdField1Byte CONTROL ); - - // The SCAN command as defined in section 6.1.30 - virtual bool SCAN ( - SCSITaskIdentifier request, - SCSICmdField1Bit DIRECT, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte SCAN_STARTING_ADDRESS_FIELD, - SCSICmdField2Bit TYPE, - SCSICmdField1Byte CONTROL ); - - // The SEND CUE SHEET command as defined in section 6.1.31 - virtual bool SEND_CUE_SHEET ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Byte CUE_SHEET_SIZE, - SCSICmdField1Byte CONTROL ); - - // The SEND DVD STRUCTURE command as defined in section 6.1.32 - virtual bool SEND_DVD_STRUCTURE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Byte FORMAT, - SCSICmdField2Byte STRUCTURE_DATA_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The SEND EVENT command as defined in section 6.1.33 - virtual bool SEND_EVENT ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit IMMED, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The SEND KEY command as defined in section 6.1.34 - virtual bool SEND_KEY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField2Bit AGID, - SCSICmdField6Bit KEY_FORMAT, - SCSICmdField1Byte CONTROL ); - - // The SEND OPC INFORMATION command as defined in section 6.1.35 - virtual bool SEND_OPC_INFORMATION ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DO_OPC, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); -#endif /* !__LP64__ */ - - /*********************** LEGACY COMMAND SUPPORT ***********************/ - // The SET CD SPEED command as defined in section 6.1.36 - virtual bool SET_CD_SPEED ( - SCSITaskIdentifier request, - SCSICmdField2Byte LOGICAL_UNIT_READ_SPEED, - SCSICmdField2Byte LOGICAL_UNIT_WRITE_SPEED, - SCSICmdField1Byte CONTROL ); - /*********************** END LEGACY COMMAND SUPPORT ***********************/ - - // The SET READ AHEAD command as defined in section 6.1.37 - virtual bool SET_READ_AHEAD ( - SCSITaskIdentifier request, - SCSICmdField4Byte TRIGGER_LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte READ_AHEAD_LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Byte CONTROL ); - - // The SET STREAMING command as defined in section 6.1.38 - virtual bool SET_STREAMING ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool START_STOP_UNIT ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField4Bit POWER_CONDITIONS, - SCSICmdField1Bit LOEJ, - SCSICmdField1Bit START, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - // The STOP PLAY/SCAN command as defined in section 6.1.39 - virtual bool STOP_PLAY_SCAN ( - SCSITaskIdentifier request, - SCSICmdField1Byte CONTROL ); - -#endif /* !__LP64__ */ - - // The SYNCHRONIZE CACHE command as defined in section 6.1.40 - virtual bool SYNCHRONIZE_CACHE ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte NUMBER_OF_BLOCKS, - SCSICmdField1Byte CONTROL ); - - // The WRITE (10) command as defined in section 6.1.41 - virtual bool WRITE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The WRITE AND VERIFY (10) command as defined in section 6.1.42 - virtual bool WRITE_AND_VERIFY_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYT_CHK, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - /* Added with 10.1.3 */ - OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 1 ); - - virtual IOReturn ReadTOC ( IOMemoryDescriptor * buffer, - CDTOCFormat format, - UInt8 msf, - UInt32 trackSessionNumber, - UInt16 * actualByteCount ); - - /* Added with 10.1.3 */ - OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 2 ); - - virtual IOReturn ReadDiscInfo ( IOMemoryDescriptor * buffer, - UInt16 * actualByteCount ); - - /* Added with 10.1.3 */ - OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 3 ); - - virtual IOReturn ReadTrackInfo ( IOMemoryDescriptor * buffer, - UInt32 address, - CDTrackInfoAddressType addressType, - UInt16 * actualByteCount ); - - /* Added with 10.2 */ - OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 4 ); - - virtual IOReturn PowerDownHandler ( void * refCon, - UInt32 messageType, - IOService * provider, - void * messageArgument, - vm_size_t argSize ); - - /* Added with 10.3.3 */ - OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 5 ); - - -protected: - - - virtual void AsyncReadWriteCompletion ( SCSITaskIdentifier completedTask ); - - -public: - - - /* Added with 10.5 */ - OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 6 ); - - virtual IOReturn ReadDiscStructure ( IOMemoryDescriptor * buffer, - const UInt32 length, - const UInt8 structureFormat, - const UInt32 logicalBlockAddress, - const UInt8 layer, - const UInt8 agid, - const UInt8 mediaType ); - - - bool CheckForBDMediaType ( void ); - - - bool READ_DISC_STRUCTURE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Bit MEDIA_TYPE, - SCSICmdField4Byte ADDRESS, - SCSICmdField1Byte LAYER_NUMBER, - SCSICmdField1Byte FORMAT, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField2Bit AGID, - SCSICmdField1Byte CONTROL ); - - - OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 7 ); - - virtual IOReturn ReserveTrack ( UInt8 reservationType, - UInt8 reservationFormat, - UInt64 ReservationParameter ); - - - bool RESERVE_TRACK_V2 ( SCSITaskIdentifier request, - SCSICmdField1Bit RMZ, - SCSICmdField1Bit ARSV, - SCSICmdField7Byte RESERVATION_PARAMETER, - SCSICmdField1Byte CONTROL ); - - - bool REPORT_KEY_V2 ( SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Byte KEY_CLASS, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField2Bit AGID, - SCSICmdField6Bit KEY_FORMAT, - SCSICmdField1Byte CONTROL ); - - - bool SEND_KEY_V2 ( SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Byte KEY_CLASS, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField2Bit AGID, - SCSICmdField6Bit KEY_FORMAT, - SCSICmdField1Byte CONTROL ); - - -protected: - - - void SetPollingMode ( UInt32 newPollingMode ); - - -public: - - - /* 10.6.0 */ - - IOReturn RequestIdle ( void ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 8 ); - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 9 ); - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 10 ); - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 11 ); - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 12 ); - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 16 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_MULTIMEDIA_COMMANDS_DEVICE_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceNub.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceNub.h.svn-base deleted file mode 100644 index f88a1e9..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceNub.h.svn-base +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_NUB_H_ -#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_NUB_H_ - - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - -// Probe score values -enum -{ - kPeripheralDeviceTypeNoMatch = 0, - kDefaultProbeRanking = 5000, - kFirstOrderRanking = 10000, - kSecondOrderRanking = 15000, - kThirdOrderRanking = 20000 -}; - - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// General IOKit headers -#include <IOKit/IOLib.h> -#include <IOKit/IOService.h> -#include <IOKit/IOSyncer.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIProtocolServices.h> - - -// Forward definitions for internal use only classes. -class SCSIPrimaryCommands; - -//----------------------------------------------------------------------------- -// Class Declarations -//----------------------------------------------------------------------------- - -class IOSCSIPeripheralDeviceNub : public IOSCSIProtocolServices -{ - - OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceNub ) - -private: - - static bool sCompareIOProperty ( - IOService * object, - OSDictionary * table, - char * propertyKeyName, - bool * matches ); - - static void TaskCallback ( SCSITaskIdentifier completedTask ); - void TaskCompletion ( SCSITaskIdentifier completedTask ); - - static IOReturn sWaitForTask ( void * object, SCSITask * request ); - IOReturn GatedWaitForTask ( SCSITask * request ); - -protected: - - SCSIServiceResponse SendTask ( SCSITask * request ); - - bool InterrogateDevice ( void ); - - // Reserve space for future expansion. - struct IOSCSIPeripheralDeviceNubExpansionData { }; - IOSCSIPeripheralDeviceNubExpansionData * fIOSCSIPeripheralDeviceNubReserved; - - IOSCSIProtocolInterface * fProvider; -#ifndef __LP64__ - SCSIPrimaryCommands * fSCSIPrimaryCommandObject; -#endif - UInt8 fDefaultInquiryCount; - - virtual bool SendSCSICommand ( SCSITaskIdentifier request, - SCSIServiceResponse * serviceResponse, - SCSITaskStatus * taskStatus ); - - virtual SCSIServiceResponse AbortSCSICommand ( SCSITaskIdentifier request ); - - // The IsProtocolServiceSupported will return true if the specified - // feature is supported by the protocol layer. If the service has a value that must be - // returned, it will be returned in the serviceValue output parameter. - virtual bool IsProtocolServiceSupported ( SCSIProtocolFeature feature, void * serviceValue ); - - virtual bool HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void * serviceValue ); - - // We override this method in order to NOT do power management - virtual void InitializePowerManagement ( IOService * provider ); - -public: - - bool init ( OSDictionary * propTable ); - virtual bool start ( IOService * provider ); - virtual void free ( void ); - - virtual IOReturn message ( UInt32 type, IOService * nub, void * arg ); - - virtual bool matchPropertyTable ( OSDictionary * table, - SInt32 * score ); - - // The ExecuteCommand method will take a SCSITask object and transport - // it across the physical wires to the device - virtual void ExecuteCommand ( SCSITaskIdentifier request ); - - // The Task Management function to allow the SCSI Application Layer client to request - // that a specific task be aborted. - virtual SCSIServiceResponse AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ); - - // The Task Management function to allow the SCSI Application Layer client to request - // that a all tasks curerntly in the task set be aborted. - virtual SCSIServiceResponse AbortTaskSet ( UInt8 theLogicalUnit ); - - virtual SCSIServiceResponse ClearACA ( UInt8 theLogicalUnit ); - - virtual SCSIServiceResponse ClearTaskSet ( UInt8 theLogicalUnit ); - - virtual SCSIServiceResponse LogicalUnitReset ( UInt8 theLogicalUnit ); - - virtual SCSIServiceResponse TargetReset ( void ); - - // ************* Obsoleted Member Routine **************** - // The AbortCommand method is replaced by the AbortTask Management function and - // should no longer be called. - virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier abortTask ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 1 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 2 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 3 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 8 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 9 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 10 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 11 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 12 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 16 ); - -}; - - - -class IOSCSILogicalUnitNub : public IOSCSIPeripheralDeviceNub -{ - - OSDeclareDefaultStructors ( IOSCSILogicalUnitNub ) - -private: - - UInt8 fLogicalUnitNumber; - -protected: - - // Reserve space for future expansion. - struct IOSCSILogicalUnitNubExpansionData { }; - IOSCSILogicalUnitNubExpansionData * fIOSCSILogicalUnitNubReserved; - -public: - - virtual bool start ( IOService * provider ); - - virtual void SetLogicalUnitNumber ( UInt8 newLUN ); - - UInt8 GetLogicalUnitNumber ( void ); - - // The ExecuteCommand method will take a SCSITask object and transport - // it across the physical wires to the device - virtual void ExecuteCommand ( SCSITaskIdentifier request ); - - // The AbortCommand method will abort the indicated SCSI Task object, - // if it is possible and the SCSI Task has not already completed. - virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier abortTask ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 1 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 2 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 3 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 8 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 9 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 10 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 11 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 12 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 16 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_NUB_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType00.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType00.h.svn-base deleted file mode 100644 index 34fdb18..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType00.h.svn-base +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_OO_H_ -#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_OO_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIBlockCommandsDevice.h> - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIPeripheralDeviceType00 : public IOSCSIBlockCommandsDevice -{ - - OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceType00 ) - -protected: - - // Reserve space for future expansion. - struct IOSCSIPeripheralDeviceType00ExpansionData - { - OSSet * fClients; - }; - IOSCSIPeripheralDeviceType00ExpansionData * fIOSCSIPeripheralDeviceType00Reserved; - -public: - - bool init ( OSDictionary * propTable ); - virtual bool start ( IOService * provider ); - virtual void free ( void ); - - virtual bool handleOpen ( - IOService * client, - IOOptionBits options, - void * access ); - - virtual void handleClose ( - IOService * client, - IOOptionBits options ); - - virtual bool handleIsOpen ( const IOService * client ) const; - - virtual IOReturn newUserClient ( - task_t owningTask, - void * securityID, - UInt32 type, - OSDictionary * properties, - IOUserClient ** handler ); - virtual void CreateStorageServiceNub ( void ); - - virtual char * GetVendorString ( void ); - virtual char * GetProductString ( void ); - virtual char * GetRevisionString ( void ); - - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 1 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 2 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 3 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_OO_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType05.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType05.h.svn-base deleted file mode 100644 index 22066f0..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType05.h.svn-base +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_05_H_ -#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_05_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIPeripheralDeviceType05 : public IOSCSIMultimediaCommandsDevice -{ - - OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceType05 ) - -protected: - - // Reserve space for future expansion. - struct IOSCSIPeripheralDeviceType05ExpansionData { }; - IOSCSIPeripheralDeviceType05ExpansionData * fIOSCSIPeripheralDeviceType05Reserved; - -public: - - bool init ( OSDictionary * propTable ); - virtual bool start ( IOService * provider ); - virtual void stop ( IOService * provider ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 1 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 2 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 3 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_05_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType07.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType07.h.svn-base deleted file mode 100644 index 661136d..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType07.h.svn-base +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_07_H_ -#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_07_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIBlockCommandsDevice.h> - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIPeripheralDeviceType07 : public IOSCSIBlockCommandsDevice -{ - - OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceType07 ) - -protected: - - // Reserve space for future expansion. - struct IOSCSIPeripheralDeviceType07ExpansionData { }; - IOSCSIPeripheralDeviceType07ExpansionData * fIOSCSIPeripheralDeviceType07Reserved; - -public: - - bool init ( OSDictionary * propTable ); - virtual bool start ( IOService * provider ); - virtual void stop ( IOService * provider ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 1 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 2 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 3 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_07_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType0E.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType0E.h.svn-base deleted file mode 100644 index cc9ec06..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPeripheralDeviceType0E.h.svn-base +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_0E_H_ -#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_0E_H_ - -#if defined(KERNEL) && defined(__cplusplus) - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// General IOKit headers -#include <IOKit/IOLib.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIReducedBlockCommandsDevice.h> - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIPeripheralDeviceType0E : public IOSCSIReducedBlockCommandsDevice -{ - - OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceType0E ) - -protected: - - // Reserve space for future expansion. - struct IOSCSIPeripheralDeviceType0EExpansionData { }; - IOSCSIPeripheralDeviceType0EExpansionData * fIOSCSIPeripheralDeviceType0EReserved; - -public: - - bool init ( OSDictionary * propTable ); - virtual bool start ( IOService * provider ); - virtual void stop ( IOService * provider ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 1 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 2 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 3 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_0E_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPrimaryCommandsDevice.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPrimaryCommandsDevice.h.svn-base deleted file mode 100644 index ba0f1a0..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIPrimaryCommandsDevice.h.svn-base +++ /dev/null @@ -1,805 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_SCSI_PRIMARY_COMMANDS_DEVICE_H_ -#define _IOKIT_IO_SCSI_PRIMARY_COMMANDS_DEVICE_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// General IOKit headers -#include <IOKit/IOLib.h> -#include <IOKit/IOService.h> -#include <IOKit/IOReturn.h> -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IOSyncer.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/SCSICommandDefinitions.h> -#include <IOKit/scsi/SCSICmds_INQUIRY_Definitions.h> -#include <IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h> -#include <IOKit/scsi/IOSCSIProtocolInterface.h> - - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - -// Notification messages -enum -{ - kSCSIServicesNotification_Suspend = 0x69000080, - kSCSIServicesNotification_Resume = 0x69000090 -}; - - -// Timeout values -enum -{ - kOneSecondTimeoutInMS = 1000, - kTenSecondTimeoutInMS = 10 * kOneSecondTimeoutInMS, - kThirtySecondTimeoutInMS = 30 * kOneSecondTimeoutInMS, - kFortyFiveSecondTimeoutInMS = 45 * kOneSecondTimeoutInMS -}; - -// Mode page values for page control field -enum -{ - kModePageControlCurrentValues = 0x00, - kModePageControlChangeableValues = 0x01, - kModePageControlDefaultValues = 0x02, - kModePageControlSavedValues = 0x03 -}; - -// The command should be tried 5 times. The original attempt -// plus 4 retries. -#define kDefaultRetryCount 4 - -// Forward declarations for internal use only classes -class SCSIPrimaryCommands; - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIPrimaryCommandsDevice : public IOSCSIProtocolInterface -{ - - OSDeclareAbstractStructors ( IOSCSIPrimaryCommandsDevice ) - -private: - -#ifndef __LP64__ - SCSIPrimaryCommands * fSCSIPrimaryCommandObject; -#endif - - IOSCSIProtocolInterface * fProtocolDriver; - - // The fProtocolAccessEnabled member variable indicates whether - // requests coming from the client can be sent to the device. - // This will be set to true after the Protocol Service driver is successfully - // opened and before the call to InitializeDeviceSupport and set to false before - // TerminateDeviceSupport is called. - bool fProtocolAccessEnabled; - - // The fDeviceAccessEnabled member variable indicates whether - // requests coming from the client can be sent to the device. - // This will be set to true after InitializeDeviceSupport is called and - // set to false before StopDeviceSupport is called. - bool fDeviceAccessEnabled; - bool fDeviceAccessSuspended; - - static bool ServerKeyswitchCallback ( void * target, - void * refCon, - IOService * newService ); - - static void TaskCallback ( SCSITaskIdentifier completedTask ); - void TaskCompletion ( SCSITaskIdentifier completedTask ); - - static IOReturn sWaitForTask ( void * object, SCSITaskIdentifier request ); - IOReturn GatedWaitForTask ( SCSITaskIdentifier request ); - -protected: - - // Reserve space for future expansion. - struct IOSCSIPrimaryCommandsDeviceExpansionData - { - IONotifier * fKeySwitchNotifier; - UInt8 fANSIVersion; - UInt32 fReadTimeoutDuration; - UInt32 fWriteTimeoutDuration; - bool fCMDQUE; - SCSITaggedTaskIdentifier fTaskID; - IOSimpleLock * fTaskIDLock; - UInt32 fRetryCount; - }; - IOSCSIPrimaryCommandsDeviceExpansionData * fIOSCSIPrimaryCommandsDeviceReserved; - - #define fReadTimeoutDuration fIOSCSIPrimaryCommandsDeviceReserved->fReadTimeoutDuration - #define fWriteTimeoutDuration fIOSCSIPrimaryCommandsDeviceReserved->fWriteTimeoutDuration - #define fRetryCount fIOSCSIPrimaryCommandsDeviceReserved->fRetryCount - - - UInt8 fDefaultInquiryCount; - OSDictionary * fDeviceCharacteristicsDictionary; - UInt32 fNumCommandsOutstanding; - - virtual void free ( void ); - void SetANSIVersion ( UInt8 ); - void SetCMDQUE ( bool value ); - IOReturn GetModeSense ( - IOMemoryDescriptor * dataBuffer, - SCSICmdField6Bit PAGE_CODE, - SCSICmdField2Byte ALLOCATION_LENGTH, - bool * use10ByteModeSense ); - bool RetrieveINQUIRYData ( - UInt8 EVPD, - UInt8 inquiryPage, - UInt8 * inquiryBuffer, - UInt16 * dataSize ); - - // This flag is set if the device responds to a MODE_SENSE_10 command - // with the page code set to 0x1A (Power Conditions Mode Page) - bool fDeviceSupportsPowerConditions; - - // This method will retreive the SCSI Primary Command Set object for - // the class. For subclasses, this will be overridden using a - // dynamic cast on the base command set object of the subclass. - -#ifndef __LP64__ - - // ------ DEPRECATED API ---------- - // This should no longer be called by subclasses as the command builder - // objects will be removed in a later release. - virtual SCSIPrimaryCommands * GetSCSIPrimaryCommandObject ( void ); - - // This method is called by the start method to create all the command - // objects needed by the class. For subclasses, this will be overridden - // to create its needed command set objects. - virtual bool CreateCommandSetObjects ( void ); - - // This method is called by the free method to free all the command - // objects needed by the class. For subclasses, this will be overridden - // to free its needed command set objects. - virtual void FreeCommandSetObjects ( void ); - -#endif - - - // This method is called by the start method to obtain information from - // the device with regards to whether it supports the power conditions mode page. - virtual void CheckPowerConditionsModePage ( void ); - - // This will return back the Protocol driver that is used to - // send service requests to the device. - virtual IOSCSIProtocolInterface * GetProtocolDriver ( void ); - - // This will get a new SCSITask for the caller - virtual SCSITaskIdentifier GetSCSITask ( void ); - - // This will release a SCSITask (eventually return it to a pool) - virtual void ReleaseSCSITask ( SCSITaskIdentifier request ); - - // This will return a unique value for the tagged task identifier - SCSITaggedTaskIdentifier GetUniqueTagID ( void ); - - // Call for executing the command synchronously - SCSIServiceResponse SendCommand ( - SCSITaskIdentifier request, - UInt32 timeoutDuration ); - - // Call for executing the command asycnchronously - void SendCommand ( - SCSITaskIdentifier request, - UInt32 timeoutDuration, - SCSITaskCompletion taskCompletion ); - - - virtual bool InitializeDeviceSupport ( void ) = 0; - virtual void StartDeviceSupport ( void ) = 0; - virtual void SuspendDeviceSupport ( void ) = 0; - virtual void ResumeDeviceSupport ( void ) = 0; - virtual void StopDeviceSupport ( void ) = 0; - virtual void TerminateDeviceSupport ( void ) = 0; - virtual UInt32 GetNumberOfPowerStateTransitions ( void ) = 0; - - virtual IOReturn VerifyDeviceState ( void ); - // Called to clear any power-on/reset status in the drive - virtual bool ClearPowerOnReset ( void ); - virtual bool ClearNotReadyStatus ( void ) = 0; - - bool IsProtocolAccessEnabled ( void ); - bool IsDeviceAccessEnabled ( void ); - bool IsDeviceAccessSuspended ( void ); - - // Accessors for saving and retrieving data from an SCSITask object. - bool ResetForNewTask( - SCSITaskIdentifier request ); - bool SetTaskAttribute ( - SCSITaskIdentifier request, - SCSITaskAttribute newAttribute ); - SCSITaskAttribute GetTaskAttribute ( - SCSITaskIdentifier request ); - bool SetTaggedTaskIdentifier ( - SCSITaskIdentifier request, - SCSITaggedTaskIdentifier taggedTaskIdentifier ); - SCSITaggedTaskIdentifier GetTaggedTaskIdentifier ( - SCSITaskIdentifier request ); - bool SetTaskState ( - SCSITaskIdentifier request, - SCSITaskState newTaskState ); - SCSITaskState GetTaskState ( - SCSITaskIdentifier request ); - bool SetTaskStatus ( - SCSITaskIdentifier request, - SCSITaskStatus newStatus ); - SCSITaskStatus GetTaskStatus ( - SCSITaskIdentifier request ); - bool SetCommandDescriptorBlock ( - SCSITaskIdentifier request, - UInt8 cdbByte0, - UInt8 cdbByte1, - UInt8 cdbByte2, - UInt8 cdbByte3, - UInt8 cdbByte4, - UInt8 cdbByte5 ); - - // Populate the 10 Byte Command Descriptor Block - bool SetCommandDescriptorBlock ( - SCSITaskIdentifier request, - UInt8 cdbByte0, - UInt8 cdbByte1, - UInt8 cdbByte2, - UInt8 cdbByte3, - UInt8 cdbByte4, - UInt8 cdbByte5, - UInt8 cdbByte6, - UInt8 cdbByte7, - UInt8 cdbByte8, - UInt8 cdbByte9 ); - - // Populate the 12 Byte Command Descriptor Block - bool SetCommandDescriptorBlock ( - SCSITaskIdentifier request, - UInt8 cdbByte0, - UInt8 cdbByte1, - UInt8 cdbByte2, - UInt8 cdbByte3, - UInt8 cdbByte4, - UInt8 cdbByte5, - UInt8 cdbByte6, - UInt8 cdbByte7, - UInt8 cdbByte8, - UInt8 cdbByte9, - UInt8 cdbByte10, - UInt8 cdbByte11 ); - - // Populate the 16 Byte Command Descriptor Block - bool SetCommandDescriptorBlock ( - SCSITaskIdentifier request, - UInt8 cdbByte0, - UInt8 cdbByte1, - UInt8 cdbByte2, - UInt8 cdbByte3, - UInt8 cdbByte4, - UInt8 cdbByte5, - UInt8 cdbByte6, - UInt8 cdbByte7, - UInt8 cdbByte8, - UInt8 cdbByte9, - UInt8 cdbByte10, - UInt8 cdbByte11, - UInt8 cdbByte12, - UInt8 cdbByte13, - UInt8 cdbByte14, - UInt8 cdbByte15 ); - - bool SetDataTransferDirection ( - SCSITaskIdentifier request, - UInt8 newDirection ); - UInt8 GetDataTransferDirection ( - SCSITaskIdentifier request ); - bool SetRequestedDataTransferCount ( - SCSITaskIdentifier request, - UInt64 newRequestedCount ); - UInt64 GetRequestedDataTransferCount ( - SCSITaskIdentifier request ); - bool SetRealizedDataTransferCount ( - SCSITaskIdentifier request, - UInt64 newRealizedDataCount ); - UInt64 GetRealizedDataTransferCount ( - SCSITaskIdentifier request ); - bool SetDataBuffer ( - SCSITaskIdentifier request, - IOMemoryDescriptor * newBuffer ); - IOMemoryDescriptor * GetDataBuffer ( - SCSITaskIdentifier request ); - bool SetTimeoutDuration ( - SCSITaskIdentifier request, - UInt32 newTimeout ); - UInt32 GetTimeoutDuration ( - SCSITaskIdentifier request ); - bool SetTaskCompletionCallback ( - SCSITaskIdentifier request, - SCSITaskCompletion newCallback ); - void TaskCompletedNotification ( - SCSITaskIdentifier request ); - - bool SetServiceResponse ( - SCSITaskIdentifier request, - SCSIServiceResponse serviceResponse ); - SCSIServiceResponse GetServiceResponse ( - SCSITaskIdentifier request ); - bool SetAutosenseCommand ( - SCSITaskIdentifier request, - UInt8 cdbByte0, - UInt8 cdbByte1, - UInt8 cdbByte2, - UInt8 cdbByte3, - UInt8 cdbByte4, - UInt8 cdbByte5 ); - bool GetAutoSenseData ( - SCSITaskIdentifier request, - SCSI_Sense_Data * senseData ); // DEPRECATED, use below function instead - bool GetAutoSenseData ( - SCSITaskIdentifier request, - SCSI_Sense_Data * senseData, - UInt8 senseDataSize ); - UInt8 GetAutoSenseDataSize ( - SCSITaskIdentifier request ); - - bool SetApplicationLayerReference ( - SCSITaskIdentifier request, - void * newReferenceValue ); - void * GetApplicationLayerReference ( - SCSITaskIdentifier request ); - - void IncrementOutstandingCommandsCount ( void ); - static void sIncrementOutstandingCommandsCount ( - IOSCSIPrimaryCommandsDevice * self ); - virtual void HandleIncrementOutstandingCommandsCount ( void ); - - - // This static member routine provides a mechanism for retrieving a pointer to - // the object that is claimed as the owner of the specified SCSITask. - static OSObject * sGetOwnerForTask ( SCSITaskIdentifier request ); - -public: - - bool init ( OSDictionary * propTable ); - virtual bool start ( IOService * provider ); - virtual void stop ( IOService * provider ); - virtual IOReturn message ( UInt32 type, IOService * nub, void * arg ); - - // The setAgressiveness method is called by the power manager - // to notify us of certain power management settings. We override - // this method in order to catch the kPMMinutesToSpinDown message - // in order to set our idle timer. - virtual IOReturn setAggressiveness ( unsigned long type, unsigned long minutes ); - - // Methods for getting device information strings - virtual char * GetVendorString ( void ); - virtual char * GetProductString ( void ); - virtual char * GetRevisionString ( void ); - OSDictionary * GetProtocolCharacteristicsDictionary ( void ); - OSDictionary * GetDeviceCharacteristicsDictionary ( void ); - UInt8 GetANSIVersion ( void ); - bool GetCMDQUE ( void ); - OSString * MapINQUIRYDataToIconFile ( void ); - UInt32 GetRetryCount ( void ); - - // -- SCSI Protocol Interface Methods -- - // The ExecuteCommand method will take a SCSI Task and transport - // it across the physical wire(s) to the device - virtual void ExecuteCommand ( SCSITaskIdentifier request ); - - // The Task Management function to allow the SCSI Application Layer client to request - // that a specific task be aborted. - SCSIServiceResponse AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ); - - // The Task Management function to allow the SCSI Application Layer client to request - // that a all tasks curerntly in the task set be aborted. - SCSIServiceResponse AbortTaskSet ( UInt8 theLogicalUnit ); - - SCSIServiceResponse ClearACA ( UInt8 theLogicalUnit ); - - SCSIServiceResponse ClearTaskSet ( UInt8 theLogicalUnit ); - - SCSIServiceResponse LogicalUnitReset ( UInt8 theLogicalUnit ); - - SCSIServiceResponse TargetReset ( void ); - - // The AbortCommand method will abort the indicated SCSI Task, - // if it is possible and the task has not already completed. - virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier request ); - - // The IsProtocolServiceSupported will return true if the specified - // feature is supported by the protocol layer. If the service has a value that must be - // returned, it will be returned in the serviceValue output parameter. - virtual bool IsProtocolServiceSupported ( - SCSIProtocolFeature feature, - void * serviceValue ); - - // The HandleProtocolServiceFeature will return true if the specified feature could - // be handled properly by the protocol layer. - virtual bool HandleProtocolServiceFeature ( - SCSIProtocolFeature feature, - void * serviceValue ); - - // Utility methods for use by all peripheral device objects. - - // isParameterValid are used to validate that the parameter passed into - // the command methods are of the correct value. - - // Validate Parameter used for 1 bit to 1 byte paramaters - bool IsParameterValid ( - SCSICmdField1Byte param, - SCSICmdField1Byte mask ); - - // Validate Parameter used for 9 bit to 2 byte paramaters - bool IsParameterValid ( - SCSICmdField2Byte param, - SCSICmdField2Byte mask ); - - // Validate Parameter used for 17 bit to 4 byte paramaters - bool IsParameterValid ( - SCSICmdField4Byte param, - SCSICmdField4Byte mask ); - - // Validate Parameter used for 33 bit to 8 byte paramaters - bool IsParameterValid ( - SCSICmdField8Byte param, - SCSICmdField8Byte mask ); - - - bool IsMemoryDescriptorValid ( - IOMemoryDescriptor * dataBuffer ); - - bool IsMemoryDescriptorValid ( - IOMemoryDescriptor * dataBuffer, - UInt64 requiredSize ); - -#ifndef __LP64__ - - // SCSI Primary command implementations - virtual bool CHANGE_DEFINITION ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit SAVE, - SCSICmdField7Bit DEFINITION_PARAMETER, - SCSICmdField1Byte PARAMETER_DATA_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool COMPARE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PAD, - SCSICmdField3Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool COPY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PAD, - SCSICmdField3Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool COPY_AND_VERIFY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit BYTCHK, - SCSICmdField1Bit PAD, - SCSICmdField3Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool EXTENDED_COPY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - -#endif /* !__LP64__ */ - - virtual bool INQUIRY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit CMDDT, - SCSICmdField1Bit EVPD, - SCSICmdField1Byte PAGE_OR_OPERATION_CODE, - SCSICmdField1Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool LOG_SELECT ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PCR, - SCSICmdField1Bit SP, - SCSICmdField2Bit PC, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool LOG_SENSE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PPC, - SCSICmdField1Bit SP, - SCSICmdField2Bit PC, - SCSICmdField6Bit PAGE_CODE, - SCSICmdField2Byte PARAMETER_POINTER, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool MODE_SELECT_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PF, - SCSICmdField1Bit SP, - SCSICmdField1Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool MODE_SELECT_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PF, - SCSICmdField1Bit SP, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool MODE_SENSE_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DBD, - SCSICmdField2Bit PC, - SCSICmdField6Bit PAGE_CODE, - SCSICmdField1Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool MODE_SENSE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit LLBAA, - SCSICmdField1Bit DBD, - SCSICmdField2Bit PC, - SCSICmdField6Bit PAGE_CODE, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool PERSISTENT_RESERVE_IN ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField5Bit SERVICE_ACTION, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool PERSISTENT_RESERVE_OUT ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField5Bit SERVICE_ACTION, - SCSICmdField4Bit SCOPE, - SCSICmdField4Bit TYPE, - SCSICmdField1Byte CONTROL ); - - virtual bool PREVENT_ALLOW_MEDIUM_REMOVAL ( - SCSITaskIdentifier request, - SCSICmdField2Bit PREVENT, - SCSICmdField1Byte CONTROL ); - - virtual bool READ_BUFFER ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Bit MODE, - SCSICmdField1Byte BUFFER_ID, - SCSICmdField3Byte BUFFER_OFFSET, - SCSICmdField3Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool RECEIVE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool RECEIVE_DIAGNOSTICS_RESULTS ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PCV, - SCSICmdField1Byte PAGE_CODE, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool RELEASE_6 ( - SCSITaskIdentifier request, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - virtual bool RELEASE_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit EXTENT, - SCSICmdField1Byte RESERVATION_IDENTIFICATION, - SCSICmdField1Byte CONTROL ); - -#endif /* !__LP64__ */ - - virtual bool RELEASE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit THRDPTY, - SCSICmdField1Bit LONGID, - SCSICmdField1Byte THIRD_PARTY_DEVICE_ID, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - virtual bool RELEASE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit THRDPTY, - SCSICmdField1Bit LONGID, - SCSICmdField1Bit EXTENT, - SCSICmdField1Byte RESERVATION_IDENTIFICATION, - SCSICmdField1Byte THIRD_PARTY_DEVICE_ID, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - -#endif /* !__LP64__ */ - - virtual bool REPORT_DEVICE_IDENTIFIER ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool REPORT_LUNS ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool REQUEST_SENSE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool RESERVE_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - virtual bool RESERVE_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit EXTENT, - SCSICmdField1Byte RESERVATION_IDENTIFICATION, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - -#endif /* !__LP64__ */ - - virtual bool RESERVE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit THRDPTY, - SCSICmdField1Bit LONGID, - SCSICmdField1Byte THIRD_PARTY_DEVICE_ID, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - virtual bool RESERVE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit THRDPTY, - SCSICmdField1Bit LONGID, - SCSICmdField1Bit EXTENT, - SCSICmdField1Byte RESERVATION_IDENTIFICATION, - SCSICmdField1Byte THIRD_PARTY_DEVICE_ID, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - -#endif /* !__LP64__ */ - - virtual bool SEND ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit AER, - SCSICmdField3Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool SEND_DIAGNOSTICS ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Bit SELF_TEST_CODE, - SCSICmdField1Bit PF, - SCSICmdField1Bit SELF_TEST, - SCSICmdField1Bit DEVOFFL, - SCSICmdField1Bit UNITOFFL, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool SET_DEVICE_IDENTIFIER ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField5Bit SERVICE_ACTION, - SCSICmdField4Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool TEST_UNIT_READY ( - SCSITaskIdentifier request, - SCSICmdField1Byte CONTROL ); - - virtual bool WRITE_BUFFER ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Bit MODE, - SCSICmdField1Byte BUFFER_ID, - SCSICmdField3Byte BUFFER_OFFSET, - SCSICmdField3Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The SPC-3 INQUIRY command as defined in section 6.4.1 of SPC-3. - bool INQUIRY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit EVPD, - SCSICmdField1Byte PAGE_CODE, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 1 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 2 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 3 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 8 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 9 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 10 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 11 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 12 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 16 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_PRIMARY_COMMANDS_DEVICE_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIProtocolInterface.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIProtocolInterface.h.svn-base deleted file mode 100644 index bb74ce4..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIProtocolInterface.h.svn-base +++ /dev/null @@ -1,854 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IO_SCSI_PROTOCOL_INTERFACE_H_ -#define _IOKIT_IO_SCSI_PROTOCOL_INTERFACE_H_ - - -/*! @header SCSI Protocol Interface - @discussion - This file contains definitions for the IOSCSIProtocolInterface class, - SCSI Protocol Features used by this interface, and additional constants - used by this interface. -*/ - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -#include <IOKit/storage/IOStorageDeviceCharacteristics.h> - - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - -/* -SCSI Device Characteristics - Defined between SCSI Application Layer and - SCSI Protocol Layer only. -*/ - -/*! -@constant kIOPropertySCSIDeviceCharacteristicsKey -@discussion -This key is used to define SCSI Device Characteristics for a particular device. -It is the key for the dictionary containing the keys of characteristics. These keys -are only defined between the SCSI Protocol Layer and the SCSI Applicaiton Layer. Some -properties may be copied from this dictionary to the more generic Device Characteristics -or Protocol Characteristics dictionaries. -*/ -#define kIOPropertySCSIDeviceCharacteristicsKey "SCSI Device Characteristics" - -/*! -@constant kIOPropertySCSIInquiryLengthKey -@discussion -This key is used to define a default INQUIRY length to issue to the device. The -value is a UInt32 corresponding to the number of bytes to request in the INQUIRY -command. -*/ -#define kIOPropertySCSIInquiryLengthKey "Inquiry Length" - -/*! -@constant kIOPropertySCSIManualEjectKey -@discussion -This key is used to indicate that the device is known to be a manual ejectable media -device. This property overrides all of the driver checks for determining this capability. -This property is a string, although if it exists it should always be true. -*/ -#define kIOPropertySCSIManualEjectKey "Manual Eject" - -/*! -@constant kIOPropertyReadTimeOutDurationKey -@discussion -This key is used to define the Read Time Out for a particular device. -This property overrides all of the protocol defaults. -This property is a value, in milliseconds. -*/ -#define kIOPropertyReadTimeOutDurationKey "Read Time Out Duration" - -/*! -@constant kIOPropertyWriteTimeOutDurationKey -@discussion -This key is used to define the Write Time Out for a particular device. -This property overrides all of the protocol defaults. -This property is a value, in milliseconds. -*/ -#define kIOPropertyWriteTimeOutDurationKey "Write Time Out Duration" - -/*! -@constant kIOPropertyRetryCountKey -@discussion -This key is used to define the number of Read/Write retries for a particular device. -This property overrides all of the protocol defaults. -The value is a UInt32 corresponding to the number of retries. -*/ -#define kIOPropertyRetryCountKey "Retry Count" - -/*! - @constant kIOPropertyAutonomousSpinDownKey - @discussion - This key is used to indicate that the device is known to have its own internal logic - for idle disk spin down. This key is used to mark device which respon poorly to our - efforts to manually spin down or spin up the device when it is already in the desired - state. - */ -#define kIOPropertyAutonomousSpinDownKey "Autonomous Spin Down" - -/*! - @constant kIOPropertyEjectRequireStartStopUnitKey - @discussion - This key is used to indicate that while the device may have failed PREVENT_ALLOW_MEDIUM - REMOVAL it still requires a START_STOP_UNIT to eject/unload media. - */ -#define kIOPropertyEjectRequireStartStopUnitKey "Eject Requires START_STOP_UNIT" - -#if defined(KERNEL) && defined(__cplusplus) - - -/*! -@constant kCFBundleIdentifierKey -@discussion -Property key for CFBundleIdentifier. -*/ -#define kCFBundleIdentifierKey "CFBundleIdentifier" - -/*! -@constant kIOSCSIArchitectureBundleIdentifierKey -@discussion -IOSCSIArchitectureModelFamily's CFBundle identifier. -*/ -#define kIOSCSIArchitectureBundleIdentifierKey "com.apple.iokit.IOSCSIArchitectureModelFamily" - - -// General kernel headers -#include <kern/thread.h> - -// General IOKit headers -#include <IOKit/IOLib.h> -#include <IOKit/IOService.h> -#include <IOKit/IOCommandGate.h> -#include <IOKit/IOWorkLoop.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/SCSITask.h> - - -/*! -@enum SCSI Protocol Interface Device Notification values -@discussion -Message values for SCSI Protocol Interface Device Notifications. -@constant kSCSIProtocolNotification_DeviceRemoved -Private message sent between a SCSI protocol service provider and -SCSI application layer driver to indicate device removal. -@constant kSCSIProtocolNotification_VerifyDeviceState -Private message sent between a SCSI protocol service provider and -SCSI application layer driver to indicate device state may have -changed and the device state should be re-verified by the SCSI -Application Layer driver. An example would be a bus reset which clears -the tray locking state of an ATAPI device. -@constant kSCSIServicesNotification_ExclusivityChanged -Message sent when a change in exclusivity state occurs. Usually in -response to acquiring/releasing exclusive access to a device via a user client. -*/ -enum -{ - kSCSIProtocolNotification_DeviceRemoved = 0x69000010, - kSCSIProtocolNotification_VerifyDeviceState = 0x69000020, - kSCSIServicesNotification_ExclusivityChanged = 0x69000030 -}; - - -/*! -@typedef SCSIProtocolFeature -@discussion -Typedef for SCSIProtocolFeature, a 32-bit quantity. -*/ -typedef UInt32 SCSIProtocolFeature; - -/*! -@enum SCSI Protocol Features -@discussion -The list of SCSI Protocol Features currently supported. -*/ -enum -{ - - /*! - @constant kSCSIProtocolFeature_ACA Not yet used. - */ - kSCSIProtocolFeature_ACA = 1, - - /*! - @constant kSCSIProtocolFeature_CPUInDiskMode Used to determine - if the SCSI Protocol Services Driver supports a CPU which is in - target disk mode. - */ - kSCSIProtocolFeature_CPUInDiskMode = 2, - - /*! - @constant kSCSIProtocolFeature_ProtocolSpecificPolling Used - to determine if the SCSI Protocol Services Driver supports - protocol specific polling for media. This is used for low-power - polling specifically for ATAPI devices on ATA buses - */ - kSCSIProtocolFeature_ProtocolSpecificPolling = 3, - - /*! - @constant kSCSIProtocolFeature_ProtocolSpecificSleepCommand Used - to determine if the SCSI Protocol Services Driver supports - protocol specific sleep commands to a drive. This is used for - sleeping drives specifically ATAPI devices on ATA buses. - */ - kSCSIProtocolFeature_ProtocolSpecificSleepCommand = 4, - - /*! - @constant kSCSIProtocolFeature_GetMaximumLogicalUnitNumber If - the SCSI Protocol Services Driver supports logical units, it will - report the maximum addressable ID that it supports in the UInt32 pointer - that is passed in as the serviceValue. If only one unit is supported, - the driver should return false for this query. - */ - kSCSIProtocolFeature_GetMaximumLogicalUnitNumber = 5, - - /*! - @constant kSCSIProtocolFeature_MaximumReadBlockTransferCount If - the SCSI Protocol Services Driver has a maximum number of - blocks that can be transfered in a read request, it will return - true to this query and return the block count in the UInt32 pointer - that is passed in as the serviceValue. - */ - kSCSIProtocolFeature_MaximumReadBlockTransferCount = 6, - - /*! - @constant kSCSIProtocolFeature_MaximumWriteBlockTransferCount If - the SCSI Protocol Services Driver has a maximum number of - blocks that can be transferred in a write request, it will return - true to this query and return the block count in the UInt32 pointer - that is passed in as the serviceValue. - */ - kSCSIProtocolFeature_MaximumWriteBlockTransferCount = 7, - - /*! - @constant kSCSIProtocolFeature_MaximumReadTransferByteCount If - the SCSI Protocol Services Driver has a maximum byte count - that can be transferred in a read request, it will return - true to this query and return the byte count in the UInt64 pointer - that is passed in as the serviceValue. - */ - kSCSIProtocolFeature_MaximumReadTransferByteCount = 8, - - /*! - @constant kSCSIProtocolFeature_MaximumWriteTransferByteCount If - the SCSI Protocol Services Driver has a maximum byte count - that can be transferred in a write request, it will return - true to this query and return the byte count in the UInt64 pointer - that is passed in as the serviceValue. - */ - kSCSIProtocolFeature_MaximumWriteTransferByteCount = 9, - - /*! - @constant kSCSIProtocolFeature_SubmitDefaultInquiryData If - the SCSI Protocol Services Driver needs any extra information to - make any negotiation settings from the standard INQUIRY data, this - will be called to set that appropriately. The serviceValue will - point to a SCSICmd_INQUIRY_StandardData buffer. The size - of the buffer depends on the SCSI Device Characteristics - dictionary for the device or bus. If there is no - kIOPropertySCSIInquiryLengthKey value set in the dictionary - or if it doesn't exist, then the size of the data will be - the size of the full amount of Inquiry retrieved from the device. - */ - kSCSIProtocolFeature_SubmitDefaultInquiryData = 10, - - /*! - @constant kSCSIProtocolFeature_ProtocolAlwaysReportsAutosenseData If - the SCSI Protocol Services Driver always reports available - autosense data when a kSCSITaskStatus_CHECK_CONDITION is set, - then the protocol layer should return true. E.g. FireWire - transport drivers should respond true to this. - */ - kSCSIProtocolFeature_ProtocolAlwaysReportsAutosenseData = 11, - - /*! - @constant kSCSIProtocolFeature_ProtocolSpecificPowerOff If - the SCSI Protocol Services Driver supports removing the power - to the drive, then the protocol layer should return true. This is - used for aggressive power management, specifically for ATAPI - devices on ATA buses. - */ - kSCSIProtocolFeature_ProtocolSpecificPowerOff = 12, - - /*! - @constant kSCSIProtocolFeature_ProtocolSpecificPowerControl - Used to determine if the SCSI Protocol Services Driver supports - switching the power to the drive on and off. This is used for aggressive - power management, specifically for SATAPI devices on AHCI buses. - */ - kSCSIProtocolFeature_ProtocolSpecificPowerControl = 13, - - /*! - @constant kSCSIProtocolFeature_ProtocolSpecificAsyncNotification - Used to determine if the SCSI Protocol Services Driver supports - asynchronous notifications from the drive. This is used to prevent - polling for media, specifically for SATAPI devices on AHCI buses. - */ - kSCSIProtocolFeature_ProtocolSpecificAsyncNotification = 14 - -}; - - -/*! -@typedef SCSIProtocolPowerState -@discussion -Typedef for SCSIProtocolPowerState, a 32-bit quantity. -*/ -typedef UInt32 SCSIProtocolPowerState; - -/*! -@enum SCSI Protocol Power States -@discussion -The list of SCSI Protocol Power States. -*/ -enum -{ - /*! - @constant kSCSIProtocolPowerStateOff - Off power state. - */ - kSCSIProtocolPowerStateOff = 0, - - /*! - @constant kSCSIProtocolPowerStateOn - On power state. - */ - kSCSIProtocolPowerStateOn = 1 -}; - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -/*! -@class IOSCSIProtocolInterface -@superclass IOService -@discussion -This class defines the public SCSI Protocol Layer API for any class that -provides Protocol services or needs to provide the Protocol Service API -for passing service requests to a Protocol Service driver. -*/ -class IOSCSIProtocolInterface : public IOService -{ - - OSDeclareAbstractStructors ( IOSCSIProtocolInterface ) - -public: - - /*! - @function start - @abstract During an IOService object's instantiation, starts the IOService object that has been selected to run on the provider. - @discussion See IOService.h for details. - @result <code>true</code> if the start was successful; <code>false</code> otherwise (which will cause the instance to be detached and usually freed). - */ - virtual bool start ( IOService * provider ); - - /*! - @function free - @abstract Called to release all resources held by the object. - @discussion Release all resources held by the object, then call super::free(). - */ - virtual void free ( void ); - - /*! - @function willTerminate - @abstract Passes a termination up the stack. - @discussion Notification that a provider has been terminated, sent before recursing up the stack, in root-to-leaf order. - @param provider The terminated provider of this object. - @param options Options originally passed to terminate(). - @result <code>true</code>. - */ - virtual bool willTerminate ( IOService * provider, IOOptionBits options ); - - /*! - @function GetUserClientExclusivityState - @abstract Gets the current exclusivity state of the user client. - @discussion The GetUserClientExclusivityState() method is called by the SCSITaskUserClient - to determine if any user client is holding exclusive access at the current time. This is simply - a preflight check and a return value of <code>false</code> does not guarantee that a subsequent - call to SetUserClientExclusivityState() will return successfully. - @result <code>true</code> if a user client is in exclusive control of the device, <code>false</code> otherwise. - */ - virtual bool GetUserClientExclusivityState ( void ); - - /*! - @function SetUserClientExclusivityState - @abstract Sets the current exclusivity state of the user client. - @discussion The SetUserClientExclusivityState() method is called by the SCSITaskUserClient - to set the exclusive access mode. - @param userClient The instance of SCSITaskUserClient for which to change exclusivity state. - @param state Exclusivity state. <code>true</code> means exclusive access is desired, <code>false</code> - means exclusive access is being released. - @result A valid IOReturn code indicating success or the type of failure. - */ - virtual IOReturn SetUserClientExclusivityState ( IOService * userClient, bool state ); - - - /*! - @function initialPowerStateForDomainState - @abstract Determines which power state a device is in, given the current power domain state. - @discussion Power management calls this method once, when the driver is initializing power management. - Subclasses should not need to override this method. - @param flags Flags that describe the character of "domain power"; they represent the <code>outputPowerCharacter</code> field of a state in the power domain's power state array. - @result A state number. - */ - virtual unsigned long initialPowerStateForDomainState ( IOPMPowerFlags flags ); - - /*! - @function setPowerState - @abstract Requests a power managed driver to change the power state of its device. - @discussion Requests a power managed driver to change the power state of its device. Most subclasses - of IOSCSIProtocolInterface have class-specific mechanisms and should not override this routine. - See IOSCSIProtocolServices.h, IOSCSIBlockCommandsDevice.h, IOSCSIReducedBlockCommandsDevice.h, and - IOSCSIMultimediaCommandsDevice.h for more information about power management changes. - Subclasses should not need to override this method. - @param powerStateOrdinal The number in the power state array to which the drive is being instructed to change. - @param whichDevice A pointer to the power management object which registered to manage power for this device. - The whichDevice field is not pertinent to us since the driver is both the "policy maker" for the device, - and the "policy implementor" for the device. - @result See IOService.h for details. - */ - virtual IOReturn setPowerState ( unsigned long powerStateOrdinal, IOService * whichDevice ); - - /*! - @function IsPowerManagementIntialized - @abstract Called to determine if power management is initialized. - @discussion Called to determine if power management is initialized. - Subclasses should not need to override this method. - @result <code>true</code> if power management has been initialized, <code>false</code> otherwise. - */ - virtual bool IsPowerManagementIntialized ( void ); - - /*! - @function CheckPowerState - @abstract Called by clients to ensure device is in correct power state before issuing I/O. - @discussion Called by clients to ensure device is in correct power state before issuing I/O. - If the device is not ready to handle such requests, it gives the driver a chance to block the - thread until the device is ready. Subclasses should not need to override this method. - */ - virtual void CheckPowerState ( void ); - - /*! - @function ExecuteCommand - @abstract Called to send a SCSITask and transport it across the physical wire(s) to the device. - @discussion Called to send a SCSITask and transport it across the physical wire(s) to the device. - Subclasses internal to IOSCSIArchitectureModelFamily will need to override this method. Third - party subclasses should not need to override this method. - @param request A valid SCSITaskIdentifier representing the task to transport across the wire(s). - */ - virtual void ExecuteCommand ( SCSITaskIdentifier request ) = 0; - - /*! - @function AbortCommand - @abstract Obsolete. Do not use this method. - @discussion Obsolete. Do not use this method. - */ - virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier request ) = 0; - - /*! - @function IsProtocolServiceSupported - @abstract This method is called to query for support of a protocol specific service feature. - @discussion This method is called to query for support of a protocol specific service feature. - Subclasses of IOSCSIProtocolServices should override this method. - @param feature A valid SCSIProtocolFeature. See enums for SCSIProtocolFeature. - @param serviceValue A pointer to a structure/value that is used in conjunction with the feature - requested. See enums for SCSIProtocolFeature. NB: This parameter may be NULL for certain - feature requests. - @result <code>true</code> if the feature is supported, <code>false</code> otherwise. - */ - virtual bool IsProtocolServiceSupported ( - SCSIProtocolFeature feature, - void * serviceValue ) = 0; - - /*! - @function HandleProtocolServiceFeature - @abstract This method is called to enact support of a protocol specific service feature. - @discussion This method is called to enact support of a protocol specific service feature. - Subclasses of IOSCSIProtocolServices should override this method. - @param feature A valid SCSIProtocolFeature. See enums for SCSIProtocolFeature. - @param serviceValue A pointer to a structure/value that is used in conjunction with the feature - requested. See enums for SCSIProtocolFeature. NB: This parameter may be NULL for certain - feature requests. - @result <code>true</code> if the service feature request succeeded, <code>false</code> otherwise. - */ - virtual bool HandleProtocolServiceFeature ( - SCSIProtocolFeature feature, - void * serviceValue ) = 0; - -protected: - - // Reserve space for future expansion. - struct IOSCSIProtocolInterfaceExpansionData - { - IOWorkLoop * fWorkLoop; - }; - IOSCSIProtocolInterfaceExpansionData * fIOSCSIProtocolInterfaceReserved; - - // ------ Power Management Support ------ - - thread_call_t fPowerManagementThread; - IOCommandGate * fCommandGate; - UInt32 fCurrentPowerState; - UInt32 fProposedPowerState; - bool fPowerTransitionInProgress; - bool fPowerAckInProgress; - bool fPowerManagementInitialized; - - /*! - @function GetCommandGate - @abstract Accessor method to obtain the IOCommandGate. - @discussion Accessor method to obtain the IOCommandGate. - @result The IOCommandGate for this instance. May return NULL. - */ - IOCommandGate * GetCommandGate ( void ); - - /*! - @function InitializePowerManagement - @abstract This method is called to initialize power management. - @discussion This method is called to initialize power management. It will call PMinit(), joinPMTree(), - setIdleTimerPeriod(), and makeUsable(). This method does not call registerPowerDriver(). - Subclasses may override this method to change the behavior (such as the number of power states). - @param provider The power management provider (i.e. the provider to attach to in the PowerManagement - tree). This may be a device that is not in the PM Tree itself, in which case, the IOService plane - is traversed towards the root node in an effort to find a node in the PM Tree. - */ - virtual void InitializePowerManagement ( IOService * provider ); - - /*! - @function GetInitialPowerState - @abstract This method is called to obtain the initial power state of the device (usually the highest). - @discussion This method is called to obtain the initial power state of the device (usually the highest). - Subclasses must override this method. - @result A power state ordinal. - */ - virtual UInt32 GetInitialPowerState ( void ) = 0; - - /*! - @function finalize - @abstract Finalizes the destruction of an IOService object. - @discussion See IOService.h - Subclasses may override this method, but should call super::finalize(). - @result <code>true</code>. - */ - virtual bool finalize ( IOOptionBits options ); - - /*! - @function sHandleSetPowerState - @abstract The sHandleSetPowerState method is a static function used as C->C++ glue - for going behind the command gate. - @discussion The sHandleSetPowerState method is a static function used as C->C++ glue - for going behind the command gate. - @param self The 'this' pointer for the class. - @param powerStateOrdinal The power state to which device shall be changed. - @result A valid IOReturn code indicating success or failure. - */ - static IOReturn sHandleSetPowerState ( IOSCSIProtocolInterface * self, UInt32 powerStateOrdinal ); - - /*! - @function sGetPowerTransistionInProgress - @abstract The sGetPowerTransistionInProgress method is a static function used as C->C++ glue - for going behind the command gate. - @discussion The sGetPowerTransistionInProgress method is a static function used as C->C++ glue - for going behind the command gate. - @param self The 'this' pointer for the class. - @result <code>true</code> if a power state is in progress, otherwise <code>false</code>. - */ - static bool sGetPowerTransistionInProgress ( IOSCSIProtocolInterface * self ); - - /*! - @function HandleSetPowerState - @abstract The HandleSetPowerState method is called by the glue code and is on the - serialized side of the command gate. - @discussion The HandleSetPowerState method is called by the glue code and is on the - serialized side of the command gate. This allows us to touch any member - variables as necessary without any multi-threading issues. - Subclasses may override this method to change behavior. Third party subclasses - should not need to override this method, but may. - @param powerStateOrdinal The power state to which device shall be changed. - */ - virtual void HandleSetPowerState ( UInt32 powerStateOrdinal ); - - /*! - @function sPowerManagement - @abstract The sPowerManagement method is a static C-function which is called using - mach's thread_call API. It guarantees us a thread of execution which is - different than the power management thread and the workloop thread on which - we can issue commands to the device synchronously or asynchronously without - worrying about deadlocks. It calls through to HandlePowerChange, which is - a state machine used to direct power management. - @discussion The sPowerManagement method is a static C-function which is called using - mach's thread_call API. It guarantees us a thread of execution which is - different than the power management thread and the workloop thread on which - we can issue commands to the device synchronously or asynchronously without - worrying about deadlocks. It calls through to HandlePowerChange, which is - a state machine used to direct power management. - @param whichDevice The 'this' pointer. - */ - static void sPowerManagement ( thread_call_param_t whichDevice ); - - /*! - @function HandlePowerChange - @abstract The HandlePowerChange method is pure virtual and is left to each protocol or - application layer driver to implement. It is guaranteed to be called on its - own thread of execution and can make synchronous or asynchronous calls. - @discussion The HandlePowerChange method is pure virtual and is left to each protocol or - application layer driver to implement. It is guaranteed to be called on its - own thread of execution and can make synchronous or asynchronous calls. - Subclasses must override this method. Third party subclasses shouldn't need to override - this method but can to alter the default behavior. - */ - virtual void HandlePowerChange ( void ) = 0; - - /*! - @function sHandleCheckPowerState - @abstract The sHandleCheckPowerState method is a static function used as C->C++ glue - for going behind the command gate. - @discussion The sHandleCheckPowerState method is a static function used as C->C++ glue - for going behind the command gate. - @param self The 'this' pointer for the class. - */ - static void sHandleCheckPowerState ( IOSCSIProtocolInterface * self ); - - /*! - @function HandleCheckPowerState(void) - @abstract The HandleCheckPowerState (void) method is on the serialized side of the command - gate and can change member variables safely without multi-threading issues. - It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) - with the max power state the class registered with. - @discussion The HandleCheckPowerState (void) method is on the serialized side of the command - gate and can change member variables safely without multi-threading issues. - It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) - with the max power state the class registered with. - Subclasses must override this method. Third party subclasses shouldn't need to override - this method but can to alter the default behavior. - */ - virtual void HandleCheckPowerState ( void ) = 0; - - /*! - @function HandleCheckPowerState(UInt32 maxPowerState) - @abstract The HandleCheckPowerState(UInt32 maxPowerState) method is called by - the subclasses and is passed the maxPowerState number given to the power - manager at initialization time. This guarantees the threads block until that - power state has been achieved. - @discussion The HandleCheckPowerState(UInt32 maxPowerState) method is called by - the subclasses and is passed the maxPowerState number given to the power - manager at initialization time. This guarantees the threads block until that - power state has been achieved. - @param maxPowerState The maximum power state in the power state array. - */ - void HandleCheckPowerState ( UInt32 maxPowerState ); - - /*! - @function TicklePowerManager(void) - @abstract The TicklePowerManager(void) method is called by CheckPowerState and - sends an activity tickle to the power manager so that the idle timer is - reset. - @discussion The TicklePowerManager(void) method is called by CheckPowerState and - sends an activity tickle to the power manager so that the idle timer is - reset. - Subclasses must override this method. Third party subclasses shouldn't need to override - this method but can to alter the default behavior. - */ - virtual void TicklePowerManager ( void ) = 0; - - /*! - @function TicklePowerManager(UInt32 maxPowerState) - @abstract The TicklePowerManager(UInt32 maxPowerState) method is a convenience - function which can be called by subclasses in TicklePowerManager (void) - in order to tell the power manager to reset idle timer or bring the device - into the requested state. It returns whatever is returned by activityTickle - (true if device is in the requested state, false if it is not). - @discussion The TicklePowerManager(UInt32 maxPowerState) method is a convenience - function which can be called by subclasses in TicklePowerManager(void) - in order to tell the power manager to reset idle timer or bring the device - into the requested state. It returns whatever is returned by activityTickle - (true if device is in the requested state, false if it is not). - @param maxPowerState The maximum power state in the power state array. - @result The result of the call to activityTickle(). See IOService.h for details. - */ - bool TicklePowerManager ( UInt32 maxPowerState ); - - // ------ User Client Support ------ - - bool fUserClientExclusiveControlled; - IOService * fUserClient; - - /*! - @function sGetUserClientExclusivityState - @abstract The sGetUserClientExclusivityState method is a static function used as C->C++ glue - for going behind the command gate. - @discussion The sGetUserClientExclusivityState method is a static function used as C->C++ glue - for going behind the command gate. - @param self The 'this' pointer for the class. - @param state A pointer to a bool in which the state should be set. - */ - static void sGetUserClientExclusivityState ( IOSCSIProtocolInterface * self, bool * state ); - - /*! - @function sSetUserClientExclusivityState - @abstract The sSetUserClientExclusivityState method is a static function used as C->C++ glue - for going behind the command gate. - @discussion The sSetUserClientExclusivityState method is a static function used as C->C++ glue - for going behind the command gate. - @param self The 'this' pointer for the class. - @param result A pointer to an IOReturn for the resulting status. - @param userClient The instance of SCSITaskUserClient for which to change exclusivity state. - @param state A bool indicating the desired state to set. - */ - static void sSetUserClientExclusivityState ( IOSCSIProtocolInterface * self, IOReturn * result, IOService * userClient, bool state ); - - /*! - @function HandleGetUserClientExclusivityState - @abstract Gets the current exclusivity state of the user client. - @discussion The HandleGetUserClientExclusivityState() method is called on the serialized side - of the command gate to determine if any user client is holding exclusive access at the current - time. See discussion for GetUserClientExclusivityState(). - Subclasses may override this method to alter default behavior. Third party subclasses should - not need to override this method. - @result <code>true</code> if a user client is in exclusive control of the device, <code>false</code> otherwise. - */ - virtual bool HandleGetUserClientExclusivityState ( void ); - - /*! - @function HandleSetUserClientExclusivityState - @abstract Sets the current exclusivity state of the user client. - @discussion The HandleSetUserClientExclusivityState() method is called on the serialized side - of the command gate to set the exclusive access mode. - @param userClient The instance of SCSITaskUserClient for which to change exclusivity state. - @param state Exclusivity state. <code>true</code> means exclusive access is desired, <code>false</code> - means exclusive access is being released. - @result A valid IOReturn code indicating success or the type of failure. - */ - virtual IOReturn HandleSetUserClientExclusivityState ( IOService * userClient, bool state ); - -public: - - // ------- SCSI Architecture Model Task Management Functions ------ - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 1 ); - /*! - @function AbortTask - @abstract Aborts a task based on the Logical Unit and tagged task identifier. - @discussion Aborts a task based on the Logical Unit and tagged task identifier. - Subclasses must override this method. Third party subclasses should not need to override - this method. - @param theLogicalUnit This value should be zero unless the device driver is - more complex and managing multiple Logical Units. - @param theTag A valid SCSITaggedTaskIdentifier representing an outstanding SCSITask. - @result A valid SCSIServiceResponse code. - */ - virtual SCSIServiceResponse AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ) = 0; - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 2 ); - /*! - @function AbortTaskSet - @abstract Aborts a task set based on the Logical Unit. - @discussion Aborts a task set based on the Logical Unit. - Subclasses must override this method. Third party subclasses should not need to override - this method. - @param theLogicalUnit This value should be zero unless the device driver is - more complex and managing multiple Logical Units. - @result A valid SCSIServiceResponse code. - */ - virtual SCSIServiceResponse AbortTaskSet ( UInt8 theLogicalUnit ) = 0; - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 3 ); - /*! - @function ClearACA - @abstract Clears an Auto-Contingent Allegiance (ACA) for the specified Logical Unit. - @discussion Clears an Auto-Contingent Allegiance (ACA) for the specified Logical Unit. - Subclasses must override this method. Third party subclasses should not need to override - this method. - @param theLogicalUnit This value should be zero unless the device driver is - more complex and managing multiple Logical Units. - @result A valid SCSIServiceResponse code. - */ - virtual SCSIServiceResponse ClearACA ( UInt8 theLogicalUnit ) = 0; - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 4 ); - /*! - @function ClearTaskSet - @abstract Clears a task set for the specified Logical Unit. - @discussion Clears a task set for the specified Logical Unit. - Subclasses must override this method. Third party subclasses should not need to override - this method. - @param theLogicalUnit This value should be zero unless the device driver is - more complex and managing multiple Logical Units. - @result A valid SCSIServiceResponse code. - */ - virtual SCSIServiceResponse ClearTaskSet ( UInt8 theLogicalUnit ) = 0; - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 5 ); - /*! - @function LogicalUnitReset - @abstract Resets the specified Logical Unit. - @discussion Resets the specified Logical Unit. - Subclasses must override this method. Third party subclasses should not need to override - this method. - @param theLogicalUnit This value should be zero unless the device driver is - more complex and managing multiple Logical Units. - @result A valid SCSIServiceResponse code. - */ - virtual SCSIServiceResponse LogicalUnitReset ( UInt8 theLogicalUnit ) = 0; - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 6 ); - - /*! - @function TargetReset - @abstract Resets the target device. - @discussion Resets the target device. - Subclasses must override this method. Third party subclasses should not need to override - this method. - @result A valid SCSIServiceResponse code. - */ - virtual SCSIServiceResponse TargetReset ( void ) = 0; - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 8 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 9 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 10 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 11 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 12 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 16 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_PROTOCOL_INTERFACE_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIProtocolServices.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIProtocolServices.h.svn-base deleted file mode 100644 index 6b9df79..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIProtocolServices.h.svn-base +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_SCSI_PROTOCOL_SERVICES_H_ -#define _IOKIT_IO_SCSI_PROTOCOL_SERVICES_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// Mach includes -#include <kern/queue.h> - -// General IOKit headers -#include <IOKit/IOLib.h> -#include <IOKit/IOCommandGate.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/SCSITask.h> -#include <IOKit/scsi/IOSCSIProtocolInterface.h> -#include <IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h> - - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - -// Power Management values -enum -{ - kSCSIProtocolLayerPowerStateOff = 0, - kSCSIProtocolLayerPowerStateOn = 1, - kSCSIProtocolLayerNumDefaultStates = 2 -}; - -// Forward definitions of internal use only classes -class SCSITask; - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIProtocolServices : public IOSCSIProtocolInterface -{ - - OSDeclareAbstractStructors ( IOSCSIProtocolServices ) - -private: - - // The head pointer for the queue of waiting SCSI Tasks. - SCSITask * fSCSITaskQueueHead; /* OBSOLETE */ - - // This is the lock for preventing multiple access while - // manipulating the SCSI Task queue. - IOSimpleLock * fQueueLock; - - // The internal flag to indicate whether service requests should be - // executed or immediately errored, such as when a device is removed. - bool fAllowServiceRequests; - -protected: - - // Reserve space for future expansion. - struct IOSCSIProtocolServicesExpansionData - { - // For internal use only. Do not use. - UInt32 fSemaphore; - bool fRequiresAutosenseDescriptor; - SCSITaskCompletion fCompletionRoutine; - queue_head_t fTaskQueueHead; - queue_head_t fAutoSenseQueueHead; - }; - IOSCSIProtocolServicesExpansionData * fIOSCSIProtocolServicesReserved; - - // ---- Protocol transport methods overridden by each subclass ---- - - // Send a SCSI Command to the device. If the command was sent to the - // device and is pending completion, the subclass should return true and - // return back the kSCSIServiceResponse_Request_In_Process response. - // If the command completes immediately with an error, the subclass will - // return true and return back the appropriate status. - // if the subclass is currently processing all the commands it can, the - // subclass will return false and the command will be resent next time - // CommandCompleted is called. - virtual bool SendSCSICommand ( SCSITaskIdentifier request, - SCSIServiceResponse * serviceResponse, - SCSITaskStatus * taskStatus ) = 0; - - virtual SCSIServiceResponse AbortSCSICommand ( SCSITaskIdentifier request ) = 0; - - // ---- Command completion notification method --------- - // Subclasses will call this inherited method when the command - // executed by SendSCSICommand has completed. - // The subclasses will return a service response that is derived - // from protocol specific status information and as specified in - // the specification for that protocol. - // If the service response is kSCSIServiceResponse_TASK_COMPLETE, - // the subclass will also return a SCSI status value. - void CommandCompleted ( SCSITaskIdentifier request, - SCSIServiceResponse serviceResponse, - SCSITaskStatus taskStatus ); - - // ---- Utility methods for accessing SCSITask attributes ---- - // Method for retreiving the attribute for a task. - SCSITaskAttribute GetTaskAttribute ( SCSITaskIdentifier request ); - - bool SetTaskState ( SCSITaskIdentifier request, - SCSITaskState newTaskState ); - SCSITaskState GetTaskState ( SCSITaskIdentifier request ); - - UInt8 GetLogicalUnitNumber ( SCSITaskIdentifier request ); - - // Method to determine the size of the command descriptor block. - UInt8 GetCommandDescriptorBlockSize ( SCSITaskIdentifier request ); - - // This will always return the define max CDB size. If the Protocol Layer - // driver only supports a smaller size CDB, it will have to create a local - // SCSICommandDescriptorBlock variable to get the CDB data and then - // transfer the needed bytes from there. - bool GetCommandDescriptorBlock ( SCSITaskIdentifier request, - SCSICommandDescriptorBlock * cdbData ); - - // Get the transfer direction for the request. - UInt8 GetDataTransferDirection ( SCSITaskIdentifier request ); - - UInt64 GetRequestedDataTransferCount ( SCSITaskIdentifier request ); - - bool SetRealizedDataTransferCount ( SCSITaskIdentifier request, - UInt64 newRealizedDataCount ); - - UInt64 GetRealizedDataTransferCount ( SCSITaskIdentifier request ); - - IOMemoryDescriptor * GetDataBuffer ( SCSITaskIdentifier request ); - - UInt64 GetDataBufferOffset ( SCSITaskIdentifier request ); - - UInt32 GetTimeoutDuration ( SCSITaskIdentifier request ); - - UInt64 GetAutosenseRequestedDataTransferCount ( SCSITaskIdentifier request ); - - // Set the auto sense data that was returned for the SCSI Task. - // A return value of true indicates that the data was copied to the member - // sense data structure, false indicates that the data could not be copied. - bool SetAutoSenseData ( SCSITaskIdentifier request, - SCSI_Sense_Data * senseData ); // DEPRECATED, use the one on the line below. - - bool SetAutoSenseData ( SCSITaskIdentifier request, - SCSI_Sense_Data * senseData, - UInt8 senseDataSize ); - - void EnsureAutosenseDescriptorExists ( SCSITaskIdentifier request ); - - bool SetProtocolLayerReference ( - SCSITaskIdentifier request, - void * newReferenceValue ); - void * GetProtocolLayerReference ( SCSITaskIdentifier request ); - - - bool SetTaskExecutionMode ( - SCSITaskIdentifier request, - SCSITaskMode newTaskMode ); - SCSITaskMode GetTaskExecutionMode ( SCSITaskIdentifier request ); - - // ---- Method calls for messaging device connectedness ---- - void SendNotification_DeviceRemoved ( void ); - - void SendNotification_VerifyDeviceState ( void ); - - // -- SCSI Task Queue Management Methods -- - // Following are the commands used to manipulate the queue of pending SCSI Tasks. - - // Add the SCSI Task to the queue. The Task's Attribute determines where in - // the queue the Task is placed. - void AddSCSITaskToQueue ( SCSITaskIdentifier request ); - - // Add the SCSI Task to the head of the queue. This is used when the task - // has been removed from the head of the queue, but the subclass indicates - // that it can not yet process this task. - void AddSCSITaskToHeadOfQueue ( SCSITask * request ); - - // Remove the next SCSI Task for the queue and return it. - SCSITask * RetrieveNextSCSITaskFromQueue ( void ); - - // Check to see if the SCSI Task resides in the queue and abort it if it does. - bool AbortSCSITaskFromQueue ( SCSITask * request ); - - // Methods for sending and completing SCSI tasks - void SendSCSITasksFromQueue ( void ); - - void RejectSCSITasksCurrentlyQueued ( void ); - - void ProcessCompletedTask ( SCSITaskIdentifier request, - SCSIServiceResponse serviceResponse, - SCSITaskStatus taskStatus ); - void RejectTask ( SCSITaskIdentifier request ); - - // ------ Power Management Support ------ - - // The InitializePowerManagement method is called to initialize power management. - // In the protocol services layer, this method calls the protocol interface layer - // to initialize power management state variables and then registers the protocol - // layer driver with the power manager with two(2) states, ON and OFF. - virtual void InitializePowerManagement ( IOService * provider ); - - // The GetInitialPowerState method is called once, right after InitializePowerManagement() - // in order to determine what state the device is initially in at startup time (usually - // the highest power mode). - virtual UInt32 GetInitialPowerState ( void ); - - // The HandlePowerChange method is pure virtual and is left to each protocol or - // application layer driver to implement. It is guaranteed to be called on its - // own thread of execution and can make synchronous or asynchronous calls. - virtual void HandlePowerChange ( void ); - - // The HandleCheckPowerState (void) method is on the serialized side of the command - // gate and can change member variables safely without multi-threading issues. - // It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) - // with the max power state the class registered with. - virtual void HandleCheckPowerState ( void ); - - // The TicklePowerManager ( void ) method is called by CheckPowerState and - // sends an activity tickle to the power manager so that the idle timer is - // reset. - virtual void TicklePowerManager ( void ); - - // The HandlePowerOff method is called to do any bus specific activity - // necessary before shutting down and going to sleep. - virtual IOReturn HandlePowerOff ( void ); - - // The HandlePowerOn method is called to do any bus specific activity - // necessary to recover from power-on/wake from sleep (e.g. bus reset on ATAPI) - virtual IOReturn HandlePowerOn ( void ); - -public: - - virtual bool start ( IOService * provider ); - virtual void free ( void ); - - void RegisterSCSITaskCompletionRoutine ( SCSITaskCompletion completion ); - - // ------- SCSI Architecture Model Task Management Functions ------ - // The ExecuteCommand method will take a SCSI Task and transport - // it across the physical wire(s) to the device - void ExecuteCommand ( SCSITaskIdentifier request ); - - // The Task Management function to allow the SCSI Application Layer client to request - // that a specific task be aborted. - SCSIServiceResponse AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ); - - // The Task Management function to allow the SCSI Application Layer client to request - // that a all tasks curerntly in the task set be aborted. - SCSIServiceResponse AbortTaskSet ( UInt8 theLogicalUnit ); - - SCSIServiceResponse ClearACA ( UInt8 theLogicalUnit ); - - SCSIServiceResponse ClearTaskSet ( UInt8 theLogicalUnit ); - - SCSIServiceResponse LogicalUnitReset ( UInt8 theLogicalUnit ); - - SCSIServiceResponse TargetReset ( void ); - - // ************* Obsoleted Member Routine **************** - // The AbortCommand method is replaced by the AbortTask Management function and - // should no longer be called. - virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier request ); - - - // ---- Method used for determining protocol or physical interconnect characteristics. ---- - // The IsProtocolServiceSupported will return true if the specified - // feature is supported by the protocol layer. If the service has a value that must be - // returned, it will be returned in the serviceValue output parameter. - virtual bool IsProtocolServiceSupported ( SCSIProtocolFeature feature, void * serviceValue ) = 0; - - // The HandleProtocolServiceFeature instructs the Protocol Services driver to perform the necessary - // tasks for the indicated feature. - virtual bool HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void * serviceValue ) = 0; - -protected: - - // ----- Protocol Services Driver request handlers for Task Management functions ----- - // These should be abstract so that every Protocol Services Driver would have to - // override them, but since they are new member routines, this class will provide - // a default implementation. - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 1 ); - virtual SCSIServiceResponse HandleAbortTask ( - UInt8 theLogicalUnit, - SCSITaggedTaskIdentifier theTag ); - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 2 ); - virtual SCSIServiceResponse HandleAbortTaskSet ( - UInt8 theLogicalUnit ); - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 3 ); - virtual SCSIServiceResponse HandleClearACA ( - UInt8 theLogicalUnit ); - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 4 ); - virtual SCSIServiceResponse HandleClearTaskSet ( - UInt8 theLogicalUnit ); - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 5 ); - virtual SCSIServiceResponse HandleLogicalUnitReset ( - UInt8 theLogicalUnit ); - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 6 ); - // The HandleTargetReset member routine requests that the Protocol Services Driver - // perform the necessary steps detailed in the specification that defines the - // protocol the driver represents for the TargetReset management function. - virtual SCSIServiceResponse HandleTargetReset ( void ); - - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 7 ); - // The CreateSCSITargetDevice member routine will create the appropriate object - // to represent the Target portion of a SCSI Device. This object is responsible - // for managing the Target functions of the SCSI Device including the Task Manager and - // Logical Units. - // If the SCSITargetDevice object was successfully created, a true value will be - // returned, otherwisw, this will return false. - virtual bool CreateSCSITargetDevice ( void ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 8 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 9 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 10 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 11 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 12 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 16 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_PROTOCOL_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIReducedBlockCommandsDevice.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/IOSCSIReducedBlockCommandsDevice.h.svn-base deleted file mode 100644 index 955fd6e..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/IOSCSIReducedBlockCommandsDevice.h.svn-base +++ /dev/null @@ -1,438 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_SCSI_REDUCED_BLOCK_COMMANDS_DEVICE_H_ -#define _IOKIT_IO_SCSI_REDUCED_BLOCK_COMMANDS_DEVICE_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// General IOKit headers -#include <IOKit/IOLib.h> -#include <IOKit/IOMemoryDescriptor.h> - -// Generic IOKit storage related headers -#include <IOKit/storage/IOStorage.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIPrimaryCommandsDevice.h> - - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - - -// RBC power states as defined in T10:1240D SCSI Reduced Block Commands (RBC) -// Revision 10a, August 18, 1999, page 13. -enum -{ - kRBCPowerStateSystemSleep = 0, - kRBCPowerStateSleep = 1, - kRBCPowerStateStandby = 2, - kRBCPowerStateIdle = 3, - kRBCPowerStateActive = 4, - kRBCNumPowerStates = 5 -}; - -enum -{ - kMediaStateUnlocked = 0, - kMediaStateLocked = 1 -}; - -#define kCapacityDataBufferSize 8 - -// Forward declaration for the SCSIReducedBlockCommands that is used internally by the -// IOSCSIReducedBlockCommandsDevice class. -class SCSIReducedBlockCommands; - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIReducedBlockCommandsDevice : public IOSCSIPrimaryCommandsDevice -{ - - OSDeclareAbstractStructors ( IOSCSIReducedBlockCommandsDevice ); - -private: - -#ifndef __LP64__ - - SCSIReducedBlockCommands * fSCSIReducedBlockCommandObject; - SCSIReducedBlockCommands * GetSCSIReducedBlockCommandObject ( void ); - -#endif /* !__LP64__ */ - - static void AsyncReadWriteComplete ( SCSITaskIdentifier completedTask ); - -protected: - - // Reserve space for future expansion. - struct IOSCSIReducedBlockCommandsDeviceExpansionData - { - IONotifier * fPowerDownNotifier; - bool fMediumRemovalPrevented; - bool fKnownManualEject; - UInt32 fPollingMode; - bool fProtocolSpecificPowerControl; - }; - IOSCSIReducedBlockCommandsDeviceExpansionData * fIOSCSIReducedBlockCommandsDeviceReserved; - - #define fPowerDownNotifier fIOSCSIReducedBlockCommandsDeviceReserved->fPowerDownNotifier - #define fMediumRemovalPrevented fIOSCSIReducedBlockCommandsDeviceReserved->fMediumRemovalPrevented - #define fKnownManualEject fIOSCSIReducedBlockCommandsDeviceReserved->fKnownManualEject - #define fPollingMode fIOSCSIReducedBlockCommandsDeviceReserved->fPollingMode - #define fProtocolSpecificPowerControl fIOSCSIReducedBlockCommandsDeviceReserved->fProtocolSpecificPowerControl - - bool fMediaChanged; - bool fMediaPresent; - - // The byte count of each physical block on the media. - UInt32 fMediaBlockSize; - - // The total number of blocks of mediaBlockSize on the media. - UInt32 fMediaBlockCount; - - // Flags used to indicate device feature - bool fMediaIsRemovable; - bool fMediaIsWriteProtected; - - thread_call_t fPollingThread; - - enum - { - kPollingMode_Suspended = 0, - kPollingMode_NewMedia = 1, - kPollingMode_MediaRemoval = 2 - }; - - virtual void CreateStorageServiceNub ( void ); - virtual bool DetermineDeviceCharacteristics ( void ); - virtual void PollForMedia ( void ); - virtual void EnablePolling ( void ); - virtual void DisablePolling ( void ); - virtual void CheckWriteProtection ( void ); - virtual void SetMediaCharacteristics ( UInt32 blockSize, UInt32 blockCount ); - virtual void ResetMediaCharacteristics ( void ); - virtual bool ClearNotReadyStatus ( void ); - - virtual IOReturn IssueRead ( IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueWrite ( IOMemoryDescriptor* buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueRead ( IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - void * clientData ); - - virtual IOReturn IssueWrite ( IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - void * clientData ); - -#ifndef __LP64__ - - // This method will retreive the SCSI Primary Command Set object for - // the class. For subclasses, this will be overridden using a - // dynamic cast on the subclasses base command set object. - virtual SCSIPrimaryCommands * GetSCSIPrimaryCommandObject ( void ); - -#endif /* !__LP64__ */ - - // ----- Power Management Support ------ - - // We override this method to set our power states and register ourselves - // as a power policy maker. - virtual void InitializePowerManagement ( IOService * provider ); - - // We override this method so that when we register for power management, - // we go to our active power state (which the drive is definitely in - // at startup time). - virtual UInt32 GetInitialPowerState ( void ); - - // We override this method in order to provide the number of transitions - // from Fully active to Sleep state so that the idle timer can be adjusted - // to the appropriate time period based on the disk spindown time set in - // the Energy Saver prefs panel. - virtual UInt32 GetNumberOfPowerStateTransitions ( void ); - - // The TicklePowerManager method is called to tell the power manager that the - // device needs to be in a certain power state to handle requests. - virtual void TicklePowerManager ( void ); - - // The HandlePowerChange method is the state machine for power management. - // It is guaranteed to be on its own thread of execution (different from - // the power manager thread AND the workloop thread. This routine can - // send sync or async calls to the drive without worrying about threading - // issues. - virtual void HandlePowerChange ( void ); - - // The HandleCheckPowerState (void) method is on the serialized side of the command - // gate and can change member variables safely without multi-threading issues. - // It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) - // with the max power state the class registered with. - virtual void HandleCheckPowerState ( void ); - - // The CheckMediaPresence method is called to see if the media which we - // anticipated being there is still there. - virtual bool CheckMediaPresence ( void ); - - virtual bool InitializeDeviceSupport ( void ); - virtual void StartDeviceSupport ( void ); - virtual void SuspendDeviceSupport ( void ); - virtual void ResumeDeviceSupport ( void ); - virtual void StopDeviceSupport ( void ); - virtual void TerminateDeviceSupport ( void ); - - virtual void free ( void ); - -#ifndef __LP64__ - - virtual bool CreateCommandSetObjects ( void ); - virtual void FreeCommandSetObjects ( void ); - -#endif /* !__LP64__ */ - -public: - - virtual IOReturn SyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn AsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - void * clientData ); - - - virtual IOReturn EjectTheMedia ( void ); - virtual IOReturn FormatMedia ( UInt64 byteCapacity ); - virtual UInt32 GetFormatCapacities ( UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - virtual IOReturn LockUnlockMedia ( bool doLock ); - virtual IOReturn SynchronizeCache ( void ); - virtual IOReturn ReportBlockSize ( UInt64 * blockSize ); - virtual IOReturn ReportEjectability ( bool * isEjectable ); - virtual IOReturn ReportLockability ( bool * isLockable ); - virtual IOReturn ReportPollRequirements ( bool * pollIsRequired, - bool * pollIsExpensive ); - virtual IOReturn ReportMaxReadTransfer ( UInt64 blockSize, - UInt64 * max ); - virtual IOReturn ReportMaxValidBlock ( UInt64 * maxBlock ); - virtual IOReturn ReportMaxWriteTransfer ( UInt64 blockSize, - UInt64 * max ); - virtual IOReturn ReportMediaState ( bool * mediaPresent, - bool * changed ); - virtual IOReturn ReportRemovability ( bool * isRemovable ); - virtual IOReturn ReportWriteProtection ( bool * isWriteProtected ); - - static void sPollForMedia ( void * pdtDriver, void * refCon ); - - -protected: - - - // The FORMAT_UNIT command as defined in section 5.1 - virtual bool FORMAT_UNIT ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField1Bit PROGRESS, - SCSICmdField1Bit PERCENT_TIME, - SCSICmdField1Bit INCREMENT ); - - // The INQUIRY command as defined in SPC-2 w/o CONTROL byte - virtual bool INQUIRY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit CMDDT, - SCSICmdField1Bit EVPD, - SCSICmdField1Byte PAGE_OR_OPERATION_CODE, - SCSICmdField1Byte ALLOCATION_LENGTH ); - - // The MODE_SELECT(6) command as defined in SPC-2 w/o CONTROL byte - virtual bool MODE_SELECT_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PF, - SCSICmdField1Bit SP, - SCSICmdField1Byte PARAMETER_LIST_LENGTH ); - - // The MODE_SENSE(6) command as defined in SPC-2 w/o CONTROL byte - virtual bool MODE_SENSE_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DBD, - SCSICmdField2Bit PC, - SCSICmdField6Bit PAGE_CODE, - SCSICmdField1Byte ALLOCATION_LENGTH ); - - // The PERSISTENT_RESERVE_IN command as defined in SPC-2 w/o CONTROL byte - virtual bool PERSISTENT_RESERVE_IN ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField5Bit SERVICE_ACTION, - SCSICmdField2Byte ALLOCATION_LENGTH ); - - // The PERSISTENT_RESERVE_OUT command as defined in SPC-2 w/o CONTROL byte - virtual bool PERSISTENT_RESERVE_OUT ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField5Bit SERVICE_ACTION, - SCSICmdField4Bit SCOPE, - SCSICmdField4Bit TYPE ); - - // The PREVENT_ALLOW_MEDIUM_REMOVAL command as defined in SPC-2 w/o CONTROL byte - virtual bool PREVENT_ALLOW_MEDIUM_REMOVAL ( - SCSITaskIdentifier request, - SCSICmdField2Bit PREVENT ); - - // The READ_10 command as defined in section 5.2 - virtual bool READ_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH ); - - // The READ_CAPACITY command as defined in section 5.3 - virtual bool READ_CAPACITY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer ); - - // The RELEASE(6) command as defined in SPC-2 w/o CONTROL byte - virtual bool RELEASE_6 ( - SCSITaskIdentifier request ); - - // The REQUEST_SENSE command as defined in SPC-2 w/o CONTROL byte - virtual bool REQUEST_SENSE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Byte ALLOCATION_LENGTH ); - - // The RESERVE(6) command as defined in SPC-2 w/o CONTROL byte - virtual bool RESERVE_6 ( - SCSITaskIdentifier request ); - - // The START_STOP_UNIT command as defined in section 5.4 - virtual bool START_STOP_UNIT ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField4Bit POWER_CONDITIONS, - SCSICmdField1Bit LEOJ, - SCSICmdField1Bit START ); - - // The SYNCRONIZE_CACHE command as defined in section 5.5 - virtual bool SYNCHRONIZE_CACHE ( - SCSITaskIdentifier request ); - - // The TEST_UNIT_READY command as defined in SPC-2 w/o CONTROL byte - virtual bool TEST_UNIT_READY ( - SCSITaskIdentifier request ); - - // The VERIFY command as defined in section 5.7 - virtual bool VERIFY ( - SCSITaskIdentifier request, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte VERIFICATION_LENGTH ); - - // The WRITE_10 command as defined in section 5.6 - virtual bool WRITE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit FUA, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH ); - - // The WRITE_BUFFER command as defined in SPC-2 w/o CONTROL byte - virtual bool WRITE_BUFFER ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Bit MODE, - SCSICmdField1Byte BUFFER_ID, - SCSICmdField3Byte BUFFER_OFFSET, - SCSICmdField3Byte PARAMETER_LIST_LENGTH ); - - - - /* Added with 10.2 */ - OSMetaClassDeclareReservedUsed ( IOSCSIReducedBlockCommandsDevice, 1 ); - -public: - - virtual IOReturn PowerDownHandler ( void * refCon, - UInt32 messageType, - IOService * provider, - void * messageArgument, - vm_size_t argSize ); - - - /* Added with 10.2 */ - OSMetaClassDeclareReservedUsed ( IOSCSIReducedBlockCommandsDevice, 2 ); - -protected: - - virtual void SetMediaIcon ( void ); - - - /* Added with 10.3.3 */ - OSMetaClassDeclareReservedUsed ( IOSCSIReducedBlockCommandsDevice, 3 ); - -protected: - - virtual void AsyncReadWriteCompletion ( SCSITaskIdentifier completedTask ); - - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 8 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 9 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 10 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 11 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 12 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 16 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_REDUCED_BLOCK_COMMANDS_DEVICE_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_INQUIRY_Definitions.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_INQUIRY_Definitions.h.svn-base deleted file mode 100644 index 55a6a4c..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_INQUIRY_Definitions.h.svn-base +++ /dev/null @@ -1,923 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_SCSI_CMDS_INQUIRY_H_ -#define _IOKIT_SCSI_CMDS_INQUIRY_H_ - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -#if KERNEL -#include <IOKit/IOTypes.h> -#else -#include <CoreFoundation/CoreFoundation.h> -#endif - - -/*! @header SCSI Inquiry Definitions - @discussion - This file contains all definitions for the data returned from - the INQUIRY (0x12) command. -*/ - - -/*! - * @enum Payload sizes - * @discussion - * Definitions for sizes related to the INQUIRY data. - * @constant kINQUIRY_StandardDataHeaderSize - * INQUIRY data header size. - * @constant kINQUIRY_MaximumDataSize - * Maximum size for INQUIRY data. -*/ -enum -{ - kINQUIRY_StandardDataHeaderSize = 5, - kINQUIRY_MaximumDataSize = 255 -}; - - -/*! -@enum INQUIRY field sizes -@discussion -Sizes for some of the inquiry data fields. -@constant kINQUIRY_VENDOR_IDENTIFICATION_Length -Size of VENDOR_IDENTIFICATION field. -@constant kINQUIRY_PRODUCT_IDENTIFICATION_Length -Size of PRODUCT_IDENTIFICATION field. -@constant kINQUIRY_PRODUCT_REVISION_LEVEL_Length -Size of PRODUCT_REVISION_LEVEL field. -*/ -enum -{ - kINQUIRY_VENDOR_IDENTIFICATION_Length = 8, - kINQUIRY_PRODUCT_IDENTIFICATION_Length = 16, - kINQUIRY_PRODUCT_REVISION_LEVEL_Length = 4 -}; - - -/*! -@struct SCSICmd_INQUIRY_StandardData -@discussion -This structure defines the format of the required standard data that is -returned for the INQUIRY command. This is the data that is required to -be returned from all devices. -*/ -typedef struct SCSICmd_INQUIRY_StandardData -{ - UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. - UInt8 RMB; // 7 = removable - UInt8 VERSION; // 7/6 = ISO/IEC, 5-3 = ECMA, 2-0 = ANSI. - UInt8 RESPONSE_DATA_FORMAT; // 7 = AERC, 6 = Obsolete, 5 = NormACA, 4 = HiSup 3-0 = Response data format. (SPC-3 obsoletes AERC) - // If ANSI Version = 0, this is ATAPI and bits 7-4 = ATAPI version. - UInt8 ADDITIONAL_LENGTH; // Number of additional bytes available in inquiry data - UInt8 SCCSReserved; // SCC-2 device flag and reserved fields (SPC-3 adds PROTECT 3PC TPGS, and ACC) - UInt8 flags1; // First byte of support flags (See SPC-3 section 6.4.2) - UInt8 flags2; // Second byte of support flags (Byte 7) (See SPC-3 section 6.4.2) - char VENDOR_IDENTIFICATION[kINQUIRY_VENDOR_IDENTIFICATION_Length]; - char PRODUCT_IDENTIFICATION[kINQUIRY_PRODUCT_IDENTIFICATION_Length]; - char PRODUCT_REVISION_LEVEL[kINQUIRY_PRODUCT_REVISION_LEVEL_Length]; -} SCSICmd_INQUIRY_StandardData; -typedef SCSICmd_INQUIRY_StandardData * SCSICmd_INQUIRY_StandardDataPtr; - - -/*! -@struct SCSICmd_INQUIRY_StandardDataAll -@discussion -This structure defines the all of the fields that can be returned in -repsonse to the INQUIRy request for the standard data. There is no -requirement as to how much of the additional data must be returned by a device. -*/ -typedef struct SCSICmd_INQUIRY_StandardDataAll -{ - UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. - UInt8 RMB; // 7 = removable - UInt8 VERSION; // 7/6 = ISO/IEC, 5-3 = ECMA, 2-0 = ANSI. - UInt8 RESPONSE_DATA_FORMAT; // 7 = AERC, 6 = Obsolete, 5 = NormACA, 4 = HiSup 3-0 = Response data format. - // If ANSI Version = 0, this is ATAPI and bits 7-4 = ATAPI version. - UInt8 ADDITIONAL_LENGTH; // Number of additional bytes available in inquiry data - UInt8 SCCSReserved; // SCC-2 device flag and reserved fields - UInt8 flags1; // First byte of support flags (Byte 6) - UInt8 flags2; // Second byte of support flags (Byte 7) - char VENDOR_IDENTIFICATION[kINQUIRY_VENDOR_IDENTIFICATION_Length]; - char PRODUCT_IDENTIFICATION[kINQUIRY_PRODUCT_IDENTIFICATION_Length]; - char PRODUCT_REVISION_LEVEL[kINQUIRY_PRODUCT_REVISION_LEVEL_Length]; - - // Following is the optional data that may be returned by a device. - UInt8 VendorSpecific1[20]; - UInt8 flags3; // Third byte of support flags, mainly SPI-3 (Byte 56) - UInt8 Reserved1; - UInt16 VERSION_DESCRIPTOR[8]; - UInt8 Reserved2[22]; - UInt8 VendorSpecific2[160]; -} SCSICmd_INQUIRY_StandardDataAll; - - -/*! -@enum Peripheral Qualifier -@discussion -Inquiry Peripheral Qualifier definitions -@constant kINQUIRY_PERIPHERAL_QUALIFIER_Connected -Peripheral Device is connected. -@constant kINQUIRY_PERIPHERAL_QUALIFIER_SupportedButNotConnected -Peripheral Device is supported, but not connected. -@constant kINQUIRY_PERIPHERAL_QUALIFIER_NotSupported -Peripheral Device is not supported. -@constant kINQUIRY_PERIPHERAL_QUALIFIER_Mask -Mask to use for PERIPHERAL_DEVICE_TYPE field. -*/ -enum -{ - kINQUIRY_PERIPHERAL_QUALIFIER_Connected = 0x00, - kINQUIRY_PERIPHERAL_QUALIFIER_SupportedButNotConnected = 0x20, - kINQUIRY_PERIPHERAL_QUALIFIER_NotSupported = 0x60, - kINQUIRY_PERIPHERAL_QUALIFIER_Mask = 0xE0 -}; - - -/*! -@enum Peripheral Device types -@discussion -Inquiry Peripheral Device type definitions -@constant kINQUIRY_PERIPHERAL_TYPE_DirectAccessSBCDevice -SBC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_SequentialAccessSSCDevice -Sequential Access (Tape) SSC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_PrinterSSCDevice -SSC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_ProcessorSPCDevice -SPC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_WriteOnceSBCDevice -SBC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_CDROM_MMCDevice -MMC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_ScannerSCSI2Device -SCSI2 Device. -@constant kINQUIRY_PERIPHERAL_TYPE_OpticalMemorySBCDevice -SBC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_MediumChangerSMCDevice -SMC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_CommunicationsSSCDevice -Comms SSC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_StorageArrayControllerSCC2Device -SCC2 Device. -@constant kINQUIRY_PERIPHERAL_TYPE_EnclosureServicesSESDevice -SES Device. -@constant kINQUIRY_PERIPHERAL_TYPE_SimplifiedDirectAccessRBCDevice -RBC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_OpticalCardReaderOCRWDevice -OCRW Device. -@constant kINQUIRY_PERIPHERAL_TYPE_ObjectBasedStorageDevice -OSD device. -@constant kINQUIRY_PERIPHERAL_TYPE_AutomationDriveInterface -Automation Drive Interface device. -@constant kINQUIRY_PERIPHERAL_TYPE_WellKnownLogicalUnit -Well known logical unit. -@constant kINQUIRY_PERIPHERAL_TYPE_UnknownOrNoDeviceType -Unknown or no device. -@constant kINQUIRY_PERIPHERAL_TYPE_Mask -Mask to use for PERIPHERAL_DEVICE_TYPE field. -*/ -enum -{ - kINQUIRY_PERIPHERAL_TYPE_DirectAccessSBCDevice = 0x00, - kINQUIRY_PERIPHERAL_TYPE_SequentialAccessSSCDevice = 0x01, - kINQUIRY_PERIPHERAL_TYPE_PrinterSSCDevice = 0x02, - kINQUIRY_PERIPHERAL_TYPE_ProcessorSPCDevice = 0x03, - kINQUIRY_PERIPHERAL_TYPE_WriteOnceSBCDevice = 0x04, - kINQUIRY_PERIPHERAL_TYPE_CDROM_MMCDevice = 0x05, - kINQUIRY_PERIPHERAL_TYPE_ScannerSCSI2Device = 0x06, - kINQUIRY_PERIPHERAL_TYPE_OpticalMemorySBCDevice = 0x07, - kINQUIRY_PERIPHERAL_TYPE_MediumChangerSMCDevice = 0x08, - kINQUIRY_PERIPHERAL_TYPE_CommunicationsSSCDevice = 0x09, - /* 0x0A - 0x0B ASC IT8 Graphic Arts Prepress Devices */ - kINQUIRY_PERIPHERAL_TYPE_StorageArrayControllerSCC2Device = 0x0C, - kINQUIRY_PERIPHERAL_TYPE_EnclosureServicesSESDevice = 0x0D, - kINQUIRY_PERIPHERAL_TYPE_SimplifiedDirectAccessRBCDevice = 0x0E, - kINQUIRY_PERIPHERAL_TYPE_OpticalCardReaderOCRWDevice = 0x0F, - /* 0x10 - 0x1E Reserved Device Types */ - kINQUIRY_PERIPHERAL_TYPE_ObjectBasedStorageDevice = 0x11, - kINQUIRY_PERIPHERAL_TYPE_AutomationDriveInterface = 0x12, - kINQUIRY_PERIPHERAL_TYPE_WellKnownLogicalUnit = 0x1E, - kINQUIRY_PERIPHERAL_TYPE_UnknownOrNoDeviceType = 0x1F, - - - kINQUIRY_PERIPHERAL_TYPE_Mask = 0x1F -}; - - -/*! -@enum Removable Bit field definitions -@discussion -Inquiry Removable Bit field definitions -@constant kINQUIRY_PERIPHERAL_RMB_MediumFixed -Medium type is fixed disk. -@constant kINQUIRY_PERIPHERAL_RMB_MediumRemovable -Medium type is removable disk. -@constant kINQUIRY_PERIPHERAL_RMB_BitMask -Mask to use for RMB field. -*/ -enum -{ - kINQUIRY_PERIPHERAL_RMB_MediumFixed = 0x00, - kINQUIRY_PERIPHERAL_RMB_MediumRemovable = 0x80, - kINQUIRY_PERIPHERAL_RMB_BitMask = 0x80 -}; - - -/*! -@enum Version field definitions -@discussion -Definitions for bits/masks in the INQUIRY Version field. -@constant kINQUIRY_ISO_IEC_VERSION_Mask -Mask for valid bits for ISO/IEC Version. -@constant kINQUIRY_ECMA_VERSION_Mask -Mask for valid bits for ECMA Version. -@constant kINQUIRY_ANSI_VERSION_NoClaimedConformance -No ANSI conformance claimed by the device server. -@constant kINQUIRY_ANSI_VERSION_SCSI_1_Compliant -SCSI-1 conformance claimed by the device server. -@constant kINQUIRY_ANSI_VERSION_SCSI_2_Compliant -SCSI-2 conformance claimed by the device server. -@constant kINQUIRY_ANSI_VERSION_SCSI_SPC_Compliant -SPC conformance claimed by the device server. -@constant kINQUIRY_ANSI_VERSION_SCSI_SPC_2_Compliant -SPC-2 conformance claimed by the device server. -@constant kINQUIRY_ANSI_VERSION_SCSI_SPC_3_Compliant -SPC-3 conformance claimed by the device server. -@constant kINQUIRY_ANSI_VERSION_Mask -Mask for valid bits for ANSI Version. -*/ -enum -{ - kINQUIRY_ISO_IEC_VERSION_Mask = 0xC0, - - kINQUIRY_ECMA_VERSION_Mask = 0x38, - - kINQUIRY_ANSI_VERSION_NoClaimedConformance = 0x00, - kINQUIRY_ANSI_VERSION_SCSI_1_Compliant = 0x01, - kINQUIRY_ANSI_VERSION_SCSI_2_Compliant = 0x02, - kINQUIRY_ANSI_VERSION_SCSI_SPC_Compliant = 0x03, - kINQUIRY_ANSI_VERSION_SCSI_SPC_2_Compliant = 0x04, - kINQUIRY_ANSI_VERSION_SCSI_SPC_3_Compliant = 0x05, - kINQUIRY_ANSI_VERSION_Mask = 0x07 -}; - - -/*! -@enum Response Data Format field definitions -@discussion -Definitions for bits/masks in the INQUIRY RESPONSE_DATA_FORMAT field. -@constant kINQUIRY_Byte3_HISUP_Bit -HISUP bit definition. -@constant kINQUIRY_Byte3_NORMACA_Bit -NORMACA bit definition. -@constant kINQUIRY_Byte3_AERC_Bit -AERC bit definition. -@constant kINQUIRY_RESPONSE_DATA_FORMAT_Mask -Mask for valid bits for RESPONSE_DATA_FORMAT. -@constant kINQUIRY_Byte3_HISUP_Mask -Mask to use to test the HISUP bit. -@constant kINQUIRY_Byte3_NORMACA_Mask -Mask to use to test the NORMACA bit. -@constant kINQUIRY_Byte3_AERC_Mask -Mask to use to test the AERC bit. -*/ -enum -{ - // Bit definitions - // Bits 0-3: RESPONSE DATA FORMAT - kINQUIRY_Byte3_HISUP_Bit = 4, - kINQUIRY_Byte3_NORMACA_Bit = 5, - // Bit 6 is Obsolete - kINQUIRY_Byte3_AERC_Bit = 7, - - // Masks - kINQUIRY_RESPONSE_DATA_FORMAT_Mask = 0x0F, // Bits 0-3 - kINQUIRY_Byte3_HISUP_Mask = (1 << kINQUIRY_Byte3_HISUP_Bit), - kINQUIRY_Byte3_NORMACA_Mask = (1 << kINQUIRY_Byte3_NORMACA_Bit), - // Bit 6 is Obsolete - kINQUIRY_Byte3_AERC_Mask = (1 << kINQUIRY_Byte3_AERC_Bit) -}; - - -/*! -@enum SCCS field definitions -@discussion -Definitions for bits/masks in the INQUIRY SCCSReserved field. -@constant kINQUIRY_Byte5_SCCS_Bit -SCCS bit definition. -@constant kINQUIRY_Byte5_ACC_Bit -ACC bit definition. -@constant kINQUIRY_Byte5_3PC_Bit -3PC bit definition. -@constant kINQUIRY_Byte5_PROTECT_Bit -PROTECT bit definition. -@constant kINQUIRY_Byte5_SCCS_Mask -Mask to use to test the SCCS bit. -@constant kINQUIRY_Byte5_ACC_Mask -Mask to use to test the ACC bit. -@constant kINQUIRY_Byte5_TPGS_Mask -Mask to use for the TPGS bits. -@constant kINQUIRY_Byte5_3PC_Mask -Mask to use to test the 3PC bit. -@constant kINQUIRY_Byte5_PROTECT_Mask -Mask to use to test the PROTECT bit. -*/ -enum -{ - // Bit definitions - kINQUIRY_Byte5_SCCS_Bit = 7, - kINQUIRY_Byte5_ACC_Bit = 6, - // Bits 4-5: TPGS - kINQUIRY_Byte5_3PC_Bit = 3, - // Bits 1-2: Reserved - kINQUIRY_Byte5_PROTECT_Bit = 0, - - // Masks - kINQUIRY_Byte5_SCCS_Mask = (1 << kINQUIRY_Byte5_SCCS_Bit), - kINQUIRY_Byte5_ACC_Mask = (1 << kINQUIRY_Byte5_ACC_Bit), - kINQUIRY_Byte5_TPGS_Mask = 0x18, - kINQUIRY_Byte5_3PC_Mask = (1 << kINQUIRY_Byte5_3PC_Bit), - // Bits 1-2: Reserved - kINQUIRY_Byte5_PROTECT_Mask = (1 << kINQUIRY_Byte5_PROTECT_Bit) -}; - - -/*! -@enum flags1 field definitions -@discussion -Definitions for bits/masks in the INQUIRY flags1 field. -@constant kINQUIRY_Byte6_ADDR16_Bit -ADDR16 bit definition. -@constant kINQUIRY_Byte6_MCHNGR_Bit -MCHNGR bit definition. -@constant kINQUIRY_Byte6_MULTIP_Bit -MULTIP bit definition. -@constant kINQUIRY_Byte6_VS_Bit -VS bit definition. -@constant kINQUIRY_Byte6_ENCSERV_Bit -ENCSERV bit definition. -@constant kINQUIRY_Byte6_BQUE_Bit -BQUE bit definition. -@constant kINQUIRY_Byte6_ADDR16_Mask -Mask to use to test the ADDR16 bit. -@constant kINQUIRY_Byte6_MCHNGR_Mask -Mask to use to test the MCHNGR bit. -@constant kINQUIRY_Byte6_MULTIP_Mask -Mask to use to test the MULTIP bit. -@constant kINQUIRY_Byte6_VS_Mask -Mask to use to test the VS bit. -@constant kINQUIRY_Byte6_ENCSERV_Mask -Mask to use to test the ENCSERV bit. -@constant kINQUIRY_Byte6_BQUE_Mask -Mask to use to test the BQUE bit. -*/ -enum -{ - // Byte offset - kINQUIRY_Byte6_Offset = 6, - - // Bit definitions - kINQUIRY_Byte6_ADDR16_Bit = 0, // SPI Specific - // Bit 1 is Obsolete - // Bit 2 is Obsolete - kINQUIRY_Byte6_MCHNGR_Bit = 3, - kINQUIRY_Byte6_MULTIP_Bit = 4, - kINQUIRY_Byte6_VS_Bit = 5, - kINQUIRY_Byte6_ENCSERV_Bit = 6, - kINQUIRY_Byte6_BQUE_Bit = 7, - - // Masks - kINQUIRY_Byte6_ADDR16_Mask = (1 << kINQUIRY_Byte6_ADDR16_Bit), // SPI Specific - // Bit 1 is Obsolete - // Bit 2 is Obsolete - kINQUIRY_Byte6_MCHNGR_Mask = (1 << kINQUIRY_Byte6_MCHNGR_Bit), - kINQUIRY_Byte6_MULTIP_Mask = (1 << kINQUIRY_Byte6_MULTIP_Bit), - kINQUIRY_Byte6_VS_Mask = (1 << kINQUIRY_Byte6_VS_Bit), - kINQUIRY_Byte6_ENCSERV_Mask = (1 << kINQUIRY_Byte6_ENCSERV_Bit), - kINQUIRY_Byte6_BQUE_Mask = (1 << kINQUIRY_Byte6_BQUE_Bit) -}; - - -/*! -@enum flags2 field definitions -@discussion -Definitions for bits/masks in the INQUIRY flags2 field. -@constant kINQUIRY_Byte7_VS_Bit -VS bit definition. -@constant kINQUIRY_Byte7_CMDQUE_Bit -CMDQUE bit definition. -@constant kINQUIRY_Byte7_TRANDIS_Bit -TRANDIS bit definition. -@constant kINQUIRY_Byte7_LINKED_Bit -LINKED bit definition. -@constant kINQUIRY_Byte7_SYNC_Bit -SYNC bit definition. -@constant kINQUIRY_Byte7_WBUS16_Bit -WBUS16 bit definition. -@constant kINQUIRY_Byte7_RELADR_Bit -RELADR bit definition. -@constant kINQUIRY_Byte7_VS_Mask -Mask to use to test the VS bit. -@constant kINQUIRY_Byte7_CMDQUE_Mask -Mask to use to test the CMDQUE bit. -@constant kINQUIRY_Byte7_TRANDIS_Mask -Mask to use to test the TRANDIS bit. -@constant kINQUIRY_Byte7_LINKED_Mask -Mask to use to test the LINKED bit. -@constant kINQUIRY_Byte7_SYNC_Mask -Mask to use to test the SYNC bit. -@constant kINQUIRY_Byte7_WBUS16_Mask -Mask to use to test the WBUS16 bit. -@constant kINQUIRY_Byte7_RELADR_Mask -Mask to use to test the RELADR bit. -*/ -enum -{ - // Byte offset - kINQUIRY_Byte7_Offset = 7, - - // Bit definitions - kINQUIRY_Byte7_VS_Bit = 0, - kINQUIRY_Byte7_CMDQUE_Bit = 1, - kINQUIRY_Byte7_TRANDIS_Bit = 2, // SPI Specific - kINQUIRY_Byte7_LINKED_Bit = 3, - kINQUIRY_Byte7_SYNC_Bit = 4, // SPI Specific - kINQUIRY_Byte7_WBUS16_Bit = 5, // SPI Specific - // Bit 6 is Obsolete - kINQUIRY_Byte7_RELADR_Bit = 7, - - // Masks - kINQUIRY_Byte7_VS_Mask = (1 << kINQUIRY_Byte7_VS_Bit), - kINQUIRY_Byte7_CMDQUE_Mask = (1 << kINQUIRY_Byte7_CMDQUE_Bit), - kINQUIRY_Byte7_TRANDIS_Mask = (1 << kINQUIRY_Byte7_TRANDIS_Bit),// SPI Specific - kINQUIRY_Byte7_LINKED_Mask = (1 << kINQUIRY_Byte7_LINKED_Bit), - kINQUIRY_Byte7_SYNC_Mask = (1 << kINQUIRY_Byte7_SYNC_Bit), // SPI Specific - kINQUIRY_Byte7_WBUS16_Mask = (1 << kINQUIRY_Byte7_WBUS16_Bit), // SPI Specific - // Bit 6 is Obsolete - kINQUIRY_Byte7_RELADR_Mask = (1 << kINQUIRY_Byte7_RELADR_Bit) -}; - - -/*! -@enum Byte 56 features field definitions -@discussion -Definitions for bits/masks in the INQUIRY Byte 56 field. -Inquiry Byte 56 features (for devices that report an ANSI VERSION of -kINQUIRY_ANSI_VERSION_SCSI_SPC_Compliant or later). -These are SPI-3 Specific. -@constant kINQUIRY_Byte56_IUS_Bit -IUS bit definition. -@constant kINQUIRY_Byte56_QAS_Bit -QAS bit definition. -@constant kINQUIRY_Byte56_IUS_Mask -Mask to use to test the IUS bit. -@constant kINQUIRY_Byte56_QAS_Mask -Mask to use to test the QAS bit. -@constant kINQUIRY_Byte56_CLOCKING_Mask -Mask to use to test CLOCKING bits. -@constant kINQUIRY_Byte56_CLOCKING_ONLY_ST -Single-transition clocking only. -@constant kINQUIRY_Byte56_CLOCKING_ONLY_DT -Double-transition clocking only. -@constant kINQUIRY_Byte56_CLOCKING_ST_AND_DT -Single-transition and double-transition clocking. -*/ -enum -{ - // Byte offset - kINQUIRY_Byte56_Offset = 56, - - // Bit definitions - kINQUIRY_Byte56_IUS_Bit = 0, - kINQUIRY_Byte56_QAS_Bit = 1, - // Bits 2 and 3 are the CLOCKING bits - // All other bits are reserved - - kINQUIRY_Byte56_IUS_Mask = (1 << kINQUIRY_Byte56_IUS_Bit), - kINQUIRY_Byte56_QAS_Mask = (1 << kINQUIRY_Byte56_QAS_Bit), - kINQUIRY_Byte56_CLOCKING_Mask = 0x0C, - - // Definitions for the CLOCKING bits - kINQUIRY_Byte56_CLOCKING_ONLY_ST = 0x00, - kINQUIRY_Byte56_CLOCKING_ONLY_DT = 0x04, - // kINQUIRY_Byte56_CLOCKING_RESERVED = 0x08, - kINQUIRY_Byte56_CLOCKING_ST_AND_DT = 0x0C -}; - - -/*! -@define kINQUIRY_VERSION_DESCRIPTOR_MaxCount -Maximum number of INQUIRY version descriptors supported. -*/ -#define kINQUIRY_VERSION_DESCRIPTOR_MaxCount 8 - - -/*! -@enum kINQUIRY_VERSION_DESCRIPTOR_SAT -SAT specification version descriptor. -*/ -enum -{ - kINQUIRY_VERSION_DESCRIPTOR_SAT = 0x1EA0 -}; - - -/* -IORegistry property names for information derived from the Inquiry data. -The Peripheral Device Type is the only property that the -generic Logical Unit Drivers will use to match. These properties are -listed in order of matching priority. First is the Peripheral Device Type. -Second is the Vendor Identification. Third is the Product Identification. -Last is the Product Revision Level. To match a particular product, you would -specify the Peripheral Device Type, Vendor Identification, and Product -Identification. To restrict the match to a particular firmware revision, you -would add the Product Revision Level. To not match on a particular product, -but on a particular vendor's products, you would only include the -Peripheral Device Type and the Vendor Identification. -*/ - -/*! -@define kIOPropertySCSIPeripheralDeviceType -SCSI Peripheral Device Type as reported in the INQUIRY data. -*/ -#define kIOPropertySCSIPeripheralDeviceType "Peripheral Device Type" - -/*! -@define kIOPropertySCSIPeripheralDeviceTypeSize -Size of the kIOPropertySCSIPeripheralDeviceType key. -*/ -#define kIOPropertySCSIPeripheralDeviceTypeSize 8 - -/* These properties are listed in order of matching priority */ - -/*! -@define kIOPropertySCSIVendorIdentification -Vendor ID as reported in the INQUIRY data. Additional space characters (0x20) -are truncated. -*/ -#define kIOPropertySCSIVendorIdentification "Vendor Identification" - -/*! -@define kIOPropertySCSIProductIdentification -Product ID as reported in the INQUIRY data. Additional space characters (0x20) -are truncated. -*/ -#define kIOPropertySCSIProductIdentification "Product Identification" - -/*! -@define kIOPropertySCSIProductRevisionLevel -Product Revision Level as reported in the INQUIRY data. -*/ -#define kIOPropertySCSIProductRevisionLevel "Product Revision Level" - - -/*! -@enum INQUIRY Page Codes -@discussion INQUIRY Page Codes to be used when EVPD is set in the -INQUIRY command. -@constant kINQUIRY_Page00_PageCode -Page Code 00h. -@constant kINQUIRY_Page80_PageCode -Page Code 80h. -@constant kINQUIRY_Page83_PageCode -Page Code 83h. -@constant kINQUIRY_Page89_PageCode -Page Code 89h. -*/ -enum -{ - kINQUIRY_Page00_PageCode = 0x00, - kINQUIRY_Page80_PageCode = 0x80, - kINQUIRY_Page83_PageCode = 0x83, - kINQUIRY_Page89_PageCode = 0x89 -}; - - -/*! -@struct SCSICmd_INQUIRY_Page00_Header -@discussion INQUIRY Page 00h Header. -*/ -typedef struct SCSICmd_INQUIRY_Page00_Header -{ - UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. - UInt8 PAGE_CODE; // Must be equal to 00h - UInt8 RESERVED; // reserved field - UInt8 PAGE_LENGTH; // n-3 bytes -} SCSICmd_INQUIRY_Page00_Header; - - -/*! -@struct SCSICmd_INQUIRY_Page80_Header -@discussion INQUIRY Page 80h Header. -*/ -typedef struct SCSICmd_INQUIRY_Page80_Header -{ - UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. - UInt8 PAGE_CODE; // Must be equal to 80h - UInt8 RESERVED; // reserved field - UInt8 PAGE_LENGTH; // n-3 bytes - UInt8 PRODUCT_SERIAL_NUMBER; // 4-n -} SCSICmd_INQUIRY_Page80_Header; - - -/*! -@define kIOPropertySCSIINQUIRYUnitSerialNumber -Key that describes the INQUIRY Unit Serial Number in the IORegistry. -*/ -#define kIOPropertySCSIINQUIRYUnitSerialNumber "INQUIRY Unit Serial Number" - - -/*! -@struct SCSICmd_INQUIRY_Page83_Header -@discussion INQUIRY Page 83h Header. -*/ -typedef struct SCSICmd_INQUIRY_Page83_Header -{ - UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. - UInt8 PAGE_CODE; // Must be equal to 83h - UInt8 RESERVED; // reserved field - UInt8 PAGE_LENGTH; // n-3 bytes -} SCSICmd_INQUIRY_Page83_Header; - - -/*! -@struct SCSICmd_INQUIRY_Page83_Header_SPC_16 -@discussion INQUIRY Page 83h Header used with the 16 byte INQUIRY command. -*/ -typedef struct SCSICmd_INQUIRY_Page83_Header_SPC_16 -{ - UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. - UInt8 PAGE_CODE; // Must be equal to 83h - UInt16 PAGE_LENGTH; // n-3 bytes -} SCSICmd_INQUIRY_Page83_Header_SPC_16; - - -/*! -@struct SCSICmd_INQUIRY_Page83_Identification_Descriptor -@discussion INQUIRY Page 83h Identification Descriptor. -*/ -typedef struct SCSICmd_INQUIRY_Page83_Identification_Descriptor -{ - UInt8 CODE_SET; // 7-4 = Protocol Identifier. 3-0 = Code Set - UInt8 IDENTIFIER_TYPE; // 7 = PIV 5-4 = ASSOCIATION 3-0 = Identifier - UInt8 RESERVED; - UInt8 IDENTIFIER_LENGTH; - UInt8 IDENTIFIER; -} SCSICmd_INQUIRY_Page83_Identification_Descriptor; - - -/*! -@enum INQUIRY Page 83h Code Set -@discussion -Definitions for the Code Set field. -@constant kINQUIRY_Page83_CodeSetBinaryData -The identifier contains binary data. -@constant kINQUIRY_Page83_CodeSetASCIIData -The identifier contains ASCII data. -@constant kINQUIRY_Page83_CodeSetUTF8Data -The identifier contains UTF-8 data. -*/ -enum -{ - kINQUIRY_Page83_CodeSetReserved = 0x0, - kINQUIRY_Page83_CodeSetBinaryData = 0x1, - kINQUIRY_Page83_CodeSetASCIIData = 0x2, - kINQUIRY_Page83_CodeSetUTF8Data = 0x3, - // 0x4 - 0xF reserved - kINQUIRY_Page83_CodeSetMask = 0xF -}; - - -/*! -@enum INQUIRY Page 83h Association -@discussion -Definitions for the Association field. -@constant kINQUIRY_Page83_AssociationLogicalUnit -Association of the identifier is with the logical unit. -@constant kINQUIRY_Page83_AssociationDevice -Association of the identifier is with the device (same as logical unit in SPC-2). -@constant kINQUIRY_Page83_AssociationTargetPort -Association of the identifier is with the target port. -@constant kINQUIRY_Page83_AssociationTargetDevice -Association of the identifier is with the target device (i.e. all ports). -@constant kINQUIRY_Page83_AssociationMask -Mask to use to determine association. -*/ -enum -{ - // SPC-3 - Association is changed to be specific to - // Logical Units - kINQUIRY_Page83_AssociationLogicalUnit = 0x00, - - // Backwards compatibility for SPC-2 - kINQUIRY_Page83_AssociationDevice = kINQUIRY_Page83_AssociationLogicalUnit, - - // Association is related to a Target Port - kINQUIRY_Page83_AssociationTargetPort = 0x10, - - // SPC-3 - Added as specific association to - // a Target device. - kINQUIRY_Page83_AssociationTargetDevice = 0x20, - - kINQUIRY_Page83_AssociationMask = 0x30 -}; - - -/*! -@enum INQUIRY Page 83h Identifier Type -@discussion -Definitions for the Identifier Type field. -@constant kINQUIRY_Page83_IdentifierTypeUndefined -Undefined Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeVendorID -Vendor Specific Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeIEEE_EUI64 -EUI-64 Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeNAAIdentifier -NAA Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeRelativePortIdentifier -Relative Target Port Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeTargetPortGroup -Target Port Group Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeLogicalUnitGroup -Logical Unit Group Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeMD5LogicalUnitIdentifier -MD5 Logical Unit Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeSCSINameString -SCSI Name String Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeMask -Mask to use to determine association. -@constant kINQUIRY_Page83_ProtocolIdentifierValidBit -PIV Bit definition. -@constant kINQUIRY_Page83_ProtocolIdentifierValidMask -Mask to use to determine if PIV is set. -*/ -enum -{ - kINQUIRY_Page83_IdentifierTypeUndefined = 0, - kINQUIRY_Page83_IdentifierTypeVendorID = 1, - kINQUIRY_Page83_IdentifierTypeIEEE_EUI64 = 2, - kINQUIRY_Page83_IdentifierTypeNAAIdentifier = 3, - kINQUIRY_Page83_IdentifierTypeRelativePortIdentifier = 4, - kINQUIRY_Page83_IdentifierTypeTargetPortGroup = 5, - kINQUIRY_Page83_IdentifierTypeLogicalUnitGroup = 6, - kINQUIRY_Page83_IdentifierTypeMD5LogicalUnitIdentifier = 7, - kINQUIRY_Page83_IdentifierTypeSCSINameString = 8, - // 0x9 - 0xF Reserved - - kINQUIRY_Page83_IdentifierTypeMask = 0xF, - - kINQUIRY_Page83_ProtocolIdentifierValidBit = 7, - kINQUIRY_Page83_ProtocolIdentifierValidMask = (1 << kINQUIRY_Page83_ProtocolIdentifierValidBit) - -}; - -// Backwards compatibility -#define kINQUIRY_Page83_IdentifierTypeFCNameIdentifier kINQUIRY_Page83_IdentifierTypeNAAIdentifier - - -/*! -@enum Protocol Identifier values -@discussion -Definitions for the protocol identifier values. -@constant kSCSIProtocolIdentifier_FibreChannel -FibreChannel Protocol Identifier. -@constant kSCSIProtocolIdentifier_ParallelSCSI -Parallel SCSI Protocol Identifier. -@constant kSCSIProtocolIdentifier_SSA -SSA Protocol Identifier. -@constant kSCSIProtocolIdentifier_FireWire -FireWire (IEEE-1394) Protocol Identifier. -@constant kSCSIProtocolIdentifier_RDMA -RDMA Protocol Identifier. -@constant kSCSIProtocolIdentifier_iSCSI -iSCSI Protocol Identifier. -@constant kSCSIProtocolIdentifier_SAS -SAS Protocol Identifier. -@constant kSCSIProtocolIdentifier_ADT -ADT Protocol Identifier. -@constant kSCSIProtocolIdentifier_ATAPI -ATAPI Protocol Identifier. -@constant kSCSIProtocolIdentifier_None -No Protocol Identifier. -*/ -enum -{ - kSCSIProtocolIdentifier_FibreChannel = 0, - kSCSIProtocolIdentifier_ParallelSCSI = 1, - kSCSIProtocolIdentifier_SSA = 2, - kSCSIProtocolIdentifier_FireWire = 3, - kSCSIProtocolIdentifier_RDMA = 4, - kSCSIProtocolIdentifier_iSCSI = 5, - kSCSIProtocolIdentifier_SAS = 6, - kSCSIProtocolIdentifier_ADT = 7, - kSCSIProtocolIdentifier_ATAPI = 8, - // 0x9-0xE Reserved - kSCSIProtocolIdentifier_None = 0xF -}; - - -/*! -@define kIOPropertySCSIINQUIRYDeviceIdentification -Device Identification key. -*/ -#define kIOPropertySCSIINQUIRYDeviceIdentification "INQUIRY Device Identification" - - -/*! -@define kIOPropertySCSIINQUIRYDeviceIdCodeSet -Code Set type key. -*/ -#define kIOPropertySCSIINQUIRYDeviceIdCodeSet "Code Set" - - -/*! -@define kIOPropertySCSIINQUIRYDeviceIdType -Identifier Type key. -*/ -#define kIOPropertySCSIINQUIRYDeviceIdType "Identifier Type" - - -/*! -@define kIOPropertySCSIINQUIRYDeviceIdAssociation -Association key. -*/ -#define kIOPropertySCSIINQUIRYDeviceIdAssociation "Association" - - -/*! -@define kIOPropertySCSIINQUIRYDeviceIdentifier -Identifier key (data or string). -*/ -#define kIOPropertySCSIINQUIRYDeviceIdentifier "Identifier" - - -/*! -@struct SCSICmd_INQUIRY_Page89_Data -@discussion INQUIRY Page 89h data as defined in the SAT 1.0 -specification. This section contians all structures and -definitions used by the INQUIRY command in response to a request -for page 89h - ATA information VPD Page. -*/ -typedef struct SCSICmd_INQUIRY_Page89_Data -{ - UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. - UInt8 PAGE_CODE; // Must be equal to 89h - UInt16 PAGE_LENGTH; // Must be equal to 238h - UInt32 Reserved; - UInt8 SAT_VENDOR_IDENTIFICATION[kINQUIRY_VENDOR_IDENTIFICATION_Length]; - UInt8 SAT_PRODUCT_IDENTIFICATION[kINQUIRY_PRODUCT_IDENTIFICATION_Length]; - UInt8 SAT_PRODUCT_REVISION_LEVEL[kINQUIRY_PRODUCT_REVISION_LEVEL_Length]; - UInt8 ATA_DEVICE_SIGNATURE[20]; - UInt8 COMMAND_CODE; - UInt8 Reserved2[3]; - UInt8 IDENTIFY_DATA[512]; -} SCSICmd_INQUIRY_Page89_Data; - - -/*! -@define kIOPropertySATVendorIdentification -Vendor Identification of the SATL. -*/ -#define kIOPropertySATVendorIdentification "SAT Vendor Identification" - - -/*! -@define kIOPropertySATProductIdentification -Product Identification of the SATL. -*/ -#define kIOPropertySATProductIdentification "SAT Product Identification" - - -/*! -@define kIOPropertySATProductRevisonLevel -Product Revision Level of the SATL. -*/ -#define kIOPropertySATProductRevisonLevel "SAT Product Revision Level" - - -#endif /* _IOKIT_SCSI_CMDS_INQUIRY_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_MODE_Definitions.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_MODE_Definitions.h.svn-base deleted file mode 100644 index 8d9c250..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_MODE_Definitions.h.svn-base +++ /dev/null @@ -1,559 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_SCSI_CMDS_MODE_DEFINITIONS_H_ -#define _IOKIT_SCSI_CMDS_MODE_DEFINITIONS_H_ - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -#if KERNEL -#include <IOKit/IOTypes.h> -#else -#include <CoreFoundation/CoreFoundation.h> -#endif - - -/*! @header SCSI Request Sense Definitions - @discussion - This file contains all definitions for the data returned from - the MODE_SENSE_6 and MODE_SENSE_10 commands. -*/ - -#pragma pack(1) - -/*! -@struct SPCModeParameterHeader6 -@discussion -Mode Parameter Header for the MODE_SENSE_6 command. -*/ -typedef struct SPCModeParameterHeader6 -{ - UInt8 MODE_DATA_LENGTH; - UInt8 MEDIUM_TYPE; - UInt8 DEVICE_SPECIFIC_PARAMETER; - UInt8 BLOCK_DESCRIPTOR_LENGTH; -} SPCModeParameterHeader6; - - -/*! -@struct SPCModeParameterHeader10 -@discussion -Mode Parameter Header for the MODE_SENSE_10 command. -*/ -typedef struct SPCModeParameterHeader10 -{ - UInt16 MODE_DATA_LENGTH; - UInt8 MEDIUM_TYPE; - UInt8 DEVICE_SPECIFIC_PARAMETER; - UInt8 LONGLBA; - UInt8 RESERVED; - UInt16 BLOCK_DESCRIPTOR_LENGTH; -} SPCModeParameterHeader10; - - -/*! -@enum Long LBA Bitfield definitions -@discussion -Long LBA Bitfield definitions for Mode Parameter Header -for MODE_SENSE_10 command. -@constant kModeSenseParameterHeader10_LongLBABit -Bit to indicate Long LBA block descriptors follow. -@constant kModeSenseParameterHeader10_LongLBAMask -Mask to test for kModeSenseParameterHeader10_LongLBABit. -*/ -enum -{ - kModeSenseParameterHeader10_LongLBABit = 0, - kModeSenseParameterHeader10_LongLBAMask = (1 << kModeSenseParameterHeader10_LongLBABit), -}; - - -/*! -@enum Device Specific Parameter Bitfield definitions -@discussion -SBC definitions for Device Specific Parameter in the -Mode Sense Header Block. -@constant kModeSenseSBCDeviceSpecific_DPOFUABit -Bit to indicate DPO and FUA bits are accepted by the device server. -@constant kModeSenseSBCDeviceSpecific_WriteProtectBit -Bit to indicate medium is write protected. -@constant kModeSenseSBCDeviceSpecific_DPOFUAMask -Mask to test for kModeSenseSBCDeviceSpecific_DPOFUABit. -@constant kModeSenseSBCDeviceSpecific_WriteProtectMask -Mask to test for kModeSenseSBCDeviceSpecific_WriteProtectBit. -*/ -enum -{ - kModeSenseSBCDeviceSpecific_DPOFUABit = 4, - kModeSenseSBCDeviceSpecific_WriteProtectBit = 7, - kModeSenseSBCDeviceSpecific_DPOFUAMask = (1 << kModeSenseSBCDeviceSpecific_DPOFUABit), - kModeSenseSBCDeviceSpecific_WriteProtectMask = (1 << kModeSenseSBCDeviceSpecific_WriteProtectBit) -}; - - -/*! -@struct ModeParameterBlockDescriptor -@discussion -General mode parameter block descriptor. -*/ -typedef struct ModeParameterBlockDescriptor -{ - UInt8 DENSITY_CODE; - UInt8 NUMBER_OF_BLOCKS[3]; - UInt8 RESERVED; - UInt8 BLOCK_LENGTH[3]; -} ModeParameterBlockDescriptor; - - -/*! -@struct DASDModeParameterBlockDescriptor -@discussion -Direct Access Storage Device mode parameter block descriptor. -*/ -typedef struct DASDModeParameterBlockDescriptor -{ - UInt32 NUMBER_OF_BLOCKS; - UInt8 DENSITY_CODE; - UInt8 BLOCK_LENGTH[3]; -} DASDModeParameterBlockDescriptor; - - -/*! -@struct LongLBAModeParameterBlockDescriptor -@discussion -Long LBA mode parameter block descriptor. -*/ -typedef struct LongLBAModeParameterBlockDescriptor -{ - UInt64 NUMBER_OF_BLOCKS; - UInt8 DENSITY_CODE; - UInt8 RESERVED[3]; - UInt32 BLOCK_LENGTH; -} LongLBAModeParameterBlockDescriptor; - - -/*! -@struct ModePageFormatHeader -@discussion -Mode Page format header. -*/ -typedef struct ModePageFormatHeader -{ - UInt8 PS_PAGE_CODE; - UInt8 PAGE_LENGTH; -} ModePageFormatHeader; - - -/*! -@enum Mode Page Format bit definitions -@discussion -Mode Page Format bit definitions. -@constant kModePageFormat_PS_Bit -Bit to indicate Parameters Saveable. -@constant kModePageFormat_PAGE_CODE_Mask -Mask to obtain the PAGE_CODE from the PS_PAGE_CODE field. -@constant kModePageFormat_PS_Mask -Mask to test for kModePageFormat_PS_Bit. -*/ -enum -{ - kModePageFormat_PS_Bit = 7, - - kModePageFormat_PAGE_CODE_Mask = 0x3F, - kModePageFormat_PS_Mask = (1 << kModePageFormat_PS_Bit) -}; - - -#if 0 -#pragma mark - -#pragma mark SPC Mode Pages -#pragma mark - -#endif - - -/*! -@enum SPC Mode Pages -@discussion -SPC Mode Page definitions. -@constant kSPCModePagePowerConditionCode -Power Conditions Mode Page value. -@constant kSPCModePageAllPagesCode -All Mode Pages value. -*/ -enum -{ - kSPCModePagePowerConditionCode = 0x1A, - kSPCModePageAllPagesCode = 0x3F -}; - -/*! -@struct SPCModePagePowerCondition -@discussion -Power Conditions Mode Page (PAGE CODE 0x1A) format. -*/ -typedef struct SPCModePagePowerCondition -{ - ModePageFormatHeader header; - UInt8 RESERVED; - UInt8 IDLE_STANDBY; - UInt32 IDLE_CONDITION_TIMER; - UInt32 STANDBY_CONDITION_TIMER; -} SPCModePagePowerCondition; - - -#if 0 -#pragma mark - -#pragma mark 0x00 SBC Direct Access Mode Pages -#pragma mark - -#endif - - -/*! -@enum SBC Mode Pages -@discussion -SBC Mode Page definitions. -@constant kSBCModePageFormatDeviceCode -Format Device Mode Page value. -@constant kSBCModePageRigidDiskGeometryCode -Rigid Disk Geometry Page value. -@constant kSBCModePageFlexibleDiskCode -Flexible Disk Page value. -@constant kSBCModePageCachingCode -Caching Page value. -*/ -enum -{ - kSBCModePageFormatDeviceCode = 0x03, - kSBCModePageRigidDiskGeometryCode = 0x04, - kSBCModePageFlexibleDiskCode = 0x05, - kSBCModePageCachingCode = 0x08 -}; - - -/*! -@struct SBCModePageFormatDevice -@discussion -Format Device Mode Page (PAGE CODE 0x03) format. -*/ -typedef struct SBCModePageFormatDevice -{ - ModePageFormatHeader header; - UInt16 TRACKS_PER_ZONE; - UInt16 ALTERNATE_SECTORS_PER_ZONE; - UInt16 ALTERNATE_TRACKS_PER_ZONE; - UInt16 ALTERNATE_TRACKS_PER_LOGICAL_UNIT; - UInt16 SECTORS_PER_TRACK; - UInt16 DATA_BYTES_PER_PHYSICAL_SECTOR; - UInt16 INTERLEAVE; - UInt16 TRACK_SKEW_FACTOR; - UInt16 CYLINDER_SKEW_FACTOR; - UInt8 SSEC_HSEC_RMB_SURF; - UInt8 RESERVED[3]; -} SBCModePageFormatDevice; - - -/*! -@struct SBCModePageRigidDiskGeometry -@discussion -Rigid Disk Geometry Mode Page (PAGE CODE 0x04) format. -*/ -typedef struct SBCModePageRigidDiskGeometry -{ - ModePageFormatHeader header; - UInt8 NUMBER_OF_CYLINDERS[3]; - UInt8 NUMBER_OF_HEADS; - UInt8 STARTING_CYLINDER_WRITE_PRECOMPENSATION[3]; - UInt8 STARTING_CYLINDER_REDUCED_WRITE_CURRENT[3]; - UInt16 DEVICE_STEP_RATE; - UInt8 LANDING_ZONE_CYLINDER[3]; - UInt8 RPL; - UInt8 ROTATIONAL_OFFSET; - UInt8 RESERVED; - UInt16 MEDIUM_ROTATION_RATE; - UInt8 RESERVED1[2]; -} SBCModePageRigidDiskGeometry; - - -/*! -@enum Rigid Disk Geometry bitfields -@discussion -Bit field masks for Rigid Disk Geometry structure fields. -@constant kSBCModePageRigidDiskGeometry_RPL_Mask -Mask for use with the RPL field. -*/ -enum -{ - kSBCModePageRigidDiskGeometry_RPL_Mask = 0x03 -}; - - -/*! -@struct SBCModePageFlexibleDisk -@discussion -Flexible Disk Mode Page (PAGE CODE 0x05) format. -*/ -typedef struct SBCModePageFlexibleDisk -{ - ModePageFormatHeader header; - UInt16 TRANSFER_RATE; - UInt8 NUMBER_OF_HEADS; - UInt8 SECTORS_PER_TRACK; - UInt16 DATA_BYTES_PER_SECTOR; - UInt16 NUMBER_OF_CYLINDERS; - UInt16 STARTING_CYLINDER_WRITE_PRECOMPENSATION; - UInt16 STARTING_CYLINDER_REDUCED_WRITE_CURRENT; - UInt16 DEVICE_STEP_RATE; - UInt8 DEVICE_STEP_PULSE_WIDTH; - UInt16 HEAD_SETTLE_DELAY; - UInt8 MOTOR_ON_DELAY; - UInt8 MOTOR_OFF_DELAY; - UInt8 TRDY_SSN_MO; - UInt8 SPC; - UInt8 WRITE_COMPENSATION; - UInt8 HEAD_LOAD_DELAY; - UInt8 HEAD_UNLOAD_DELAY; - UInt8 PIN_34_PIN_2; - UInt8 PIN_4_PIN_1; - UInt16 MEDIUM_ROTATION_RATE; - UInt8 RESERVED[2]; -} SBCModePageFlexibleDisk; - - -/*! -@enum TRDY_SSN_MO bitfields -@discussion -Bit field definitions and masks for Flexible Disk TRDY_SSN_MO field. -@constant kSBCModePageFlexibleDisk_MO_Bit -MO Bit definition. -@constant kSBCModePageFlexibleDisk_SSN_Bit -SSN Bit definition. -@constant kSBCModePageFlexibleDisk_TRDY_Bit -TRDY Bit definition. -@constant kSBCModePageFlexibleDisk_MO_Mask -Mask for use with TRDY_SSN_MO field. -@constant kSBCModePageFlexibleDisk_SSN_Mask -Mask for use with TRDY_SSN_MO field. -@constant kSBCModePageFlexibleDisk_TRDY_Mask -Mask for use with TRDY_SSN_MO field. -*/ -enum -{ - // Bits 0:4 Reserved - kSBCModePageFlexibleDisk_MO_Bit = 5, - kSBCModePageFlexibleDisk_SSN_Bit = 6, - kSBCModePageFlexibleDisk_TRDY_Bit = 7, - - kSBCModePageFlexibleDisk_MO_Mask = (1 << kSBCModePageFlexibleDisk_MO_Bit), - kSBCModePageFlexibleDisk_SSN_Mask = (1 << kSBCModePageFlexibleDisk_SSN_Bit), - kSBCModePageFlexibleDisk_TRDY_Mask = (1 << kSBCModePageFlexibleDisk_TRDY_Bit) -}; - - -/*! -@enum SPC bitfields -@discussion -Bit field definitions and masks for Flexible Disk SPC field. -@constant kSBCModePageFlexibleDisk_SPC_Mask -Mask for use with SPC field. -*/ -enum -{ - kSBCModePageFlexibleDisk_SPC_Mask = 0x0F -}; - - -/*! -@enum PIN_34_PIN_2 bitfields -@discussion -Bit field definitions and masks for Flexible Disk PIN_34_PIN_2 field. -@constant kSBCModePageFlexibleDisk_PIN_2_Mask -Mask for use with PIN_34_PIN_2 field. -@constant kSBCModePageFlexibleDisk_PIN_34_Mask -Mask for use with PIN_34_PIN_2 field. -*/ -enum -{ - kSBCModePageFlexibleDisk_PIN_2_Mask = 0x0F, - kSBCModePageFlexibleDisk_PIN_34_Mask = 0xF0 -}; - - -/*! -@enum PIN_4_PIN_1 bitfields -@discussion -Bit field definitions and masks for Flexible Disk PIN_4_PIN_1 field. -@constant kSBCModePageFlexibleDisk_PIN_1_Mask -Mask for use with PIN_4_PIN_1 field. -@constant kSBCModePageFlexibleDisk_PIN_4_Mask -Mask for use with PIN_4_PIN_1 field. -*/ -enum -{ - kSBCModePageFlexibleDisk_PIN_1_Mask = 0x0F, - kSBCModePageFlexibleDisk_PIN_4_Mask = 0xF0 -}; - - -/*! -@struct SBCModePageCaching -@discussion -Caching Mode Page (PAGE CODE 0x08) format. -*/ -typedef struct SBCModePageCaching -{ - ModePageFormatHeader header; - UInt8 flags; - UInt8 DEMAND_READ_WRITE_RETENTION_PRIORITY; - UInt16 DISABLE_PREFETCH_TRANSFER_LENGTH; - UInt16 MINIMUM_PREFETCH; - UInt16 MAXIMUM_PREFETCH; - UInt16 MAXIMUM_PREFETCH_CEILING; - UInt8 flags2; - UInt8 NUMBER_OF_CACHE_SEGMENTS; - UInt16 CACHE_SEGMENT_SIZE; - UInt8 RESERVED; - UInt8 NON_CACHE_SEGMENT_SIZE[3]; -} SBCModePageCaching; - - -/*! -@enum Caching flags bitfields -@discussion -Bit field definitions and masks for Caching flags field. -@constant kSBCModePageCaching_RCD_Bit -RCD Bit definition. -@constant kSBCModePageCaching_MF_Bit -MF Bit definition. -@constant kSBCModePageCaching_WCE_Bit -WCE Bit definition. -@constant kSBCModePageCaching_SIZE_Bit -SIZE Bit definition. -@constant kSBCModePageCaching_DISC_Bit -DISC Bit definition. -@constant kSBCModePageCaching_CAP_Bit -CAP Bit definition. -@constant kSBCModePageCaching_ABPF_Bit -ABPF Bit definition. -@constant kSBCModePageCaching_IC_Bit -IC Bit definition. -@constant kSBCModePageCaching_RCD_Mask -Mask for use with flags field. -@constant kSBCModePageCaching_MF_Mask -Mask for use with flags field. -@constant kSBCModePageCaching_WCE_Mask -Mask for use with flags field. -@constant kSBCModePageCaching_SIZE_Mask -Mask for use with flags field. -@constant kSBCModePageCaching_DISC_Mask -Mask for use with flags field. -@constant kSBCModePageCaching_CAP_Mask -Mask for use with flags field. -@constant kSBCModePageCaching_ABPF_Mask -Mask for use with flags field. -@constant kSBCModePageCaching_IC_Mask -Mask for use with flags field. -*/ -enum -{ - kSBCModePageCaching_RCD_Bit = 0, - kSBCModePageCaching_MF_Bit = 1, - kSBCModePageCaching_WCE_Bit = 2, - kSBCModePageCaching_SIZE_Bit = 3, - kSBCModePageCaching_DISC_Bit = 4, - kSBCModePageCaching_CAP_Bit = 5, - kSBCModePageCaching_ABPF_Bit = 6, - kSBCModePageCaching_IC_Bit = 7, - - kSBCModePageCaching_RCD_Mask = (1 << kSBCModePageCaching_RCD_Bit), - kSBCModePageCaching_MF_Mask = (1 << kSBCModePageCaching_MF_Bit), - kSBCModePageCaching_WCE_Mask = (1 << kSBCModePageCaching_WCE_Bit), - kSBCModePageCaching_SIZE_Mask = (1 << kSBCModePageCaching_SIZE_Bit), - kSBCModePageCaching_DISC_Mask = (1 << kSBCModePageCaching_DISC_Bit), - kSBCModePageCaching_CAP_Mask = (1 << kSBCModePageCaching_CAP_Bit), - kSBCModePageCaching_ABPF_Mask = (1 << kSBCModePageCaching_ABPF_Bit), - kSBCModePageCaching_IC_Mask = (1 << kSBCModePageCaching_IC_Bit) -}; - - -/*! -@enum Demand Read/Write Retention masks -@discussion -Demand Read/Write Retention masks. -@constant kSBCModePageCaching_DEMAND_WRITE_Mask -Mask for the DEMAND_READ_WRITE_RETENTION_PRIORITY field. -@constant kSBCModePageCaching_DEMAND_READ_Mask -Mask for the DEMAND_READ_WRITE_RETENTION_PRIORITY field. -*/ -enum -{ - kSBCModePageCaching_DEMAND_WRITE_Mask = 0x00FF, - kSBCModePageCaching_DEMAND_READ_Mask = 0xFF00 -}; - -/*! -@enum Caching flags2 bitfields -@discussion -Bit field definitions and masks for Caching flags2 field. -@constant kSBCModePageCaching_VS1_Bit -VS1 Bit definition. -@constant kSBCModePageCaching_VS2_Bit -VS2 Bit definition. -@constant kSBCModePageCaching_DRA_Bit -DRA Bit definition. -@constant kSBCModePageCaching_LBCSS_Bit -LBCSS Bit definition. -@constant kSBCModePageCaching_FSW_Bit -FSW Bit definition. -@constant kSBCModePageCaching_VS1_Mask -Mask for use with flags2 field. -@constant kSBCModePageCaching_VS2_Mask -Mask for use with flags2 field. -@constant kSBCModePageCaching_DRA_Mask -Mask for use with flags2 field. -@constant kSBCModePageCaching_LBCSS_Mask -Mask for use with flags2 field. -@constant kSBCModePageCaching_FSW_Mask -Mask for use with flags2 field. -*/ -enum -{ - // Bits 0:2 Reserved - kSBCModePageCaching_VS1_Bit = 3, - kSBCModePageCaching_VS2_Bit = 4, - kSBCModePageCaching_DRA_Bit = 5, - kSBCModePageCaching_LBCSS_Bit = 6, - kSBCModePageCaching_FSW_Bit = 7, - - kSBCModePageCaching_VS1_Mask = (1 << kSBCModePageCaching_VS1_Bit), - kSBCModePageCaching_VS2_Mask = (1 << kSBCModePageCaching_VS2_Bit), - kSBCModePageCaching_DRA_Mask = (1 << kSBCModePageCaching_DRA_Bit), - kSBCModePageCaching_LBCSS_Mask = (1 << kSBCModePageCaching_LBCSS_Bit), - kSBCModePageCaching_FSW_Mask = (1 << kSBCModePageCaching_FSW_Bit) -}; - -#pragma options align=reset - -#endif /* _IOKIT_SCSI_CMDS_MODE_DEFINITIONS_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_READ_CAPACITY_Definitions.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_READ_CAPACITY_Definitions.h.svn-base deleted file mode 100644 index 59abde3..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_READ_CAPACITY_Definitions.h.svn-base +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_SCSI_CMDS_READ_CAPACITY_H_ -#define _IOKIT_SCSI_CMDS_READ_CAPACITY_H_ - - -#if KERNEL -#include <IOKit/IOTypes.h> -#else -#include <CoreFoundation/CoreFoundation.h> -#endif - - -/*! @header SCSI Request Sense Definitions - @discussion - This file contains all definitions for the data returned from - the READ CAPACITY 10 (0x25) and READ CAPACITY 16 (0x9E) commands. -*/ - -/*! -@enum READ CAPACITY Payload Sizes -@discussion -Sizes of the payload for the READ CAPACITY 10 and -READ CAPACITY 16 commands. -@constant kREPORT_CAPACITY_DataSize -Data size for a READ_CAPACITY command. -@constant kREPORT_CAPACITY_16_DataSize -Data size for a READ_CAPACITY_16 command. -*/ -enum -{ - kREPORT_CAPACITY_DataSize = 8, - kREPORT_CAPACITY_16_DataSize = 32 -}; - - -/*! -@constant kREPORT_CAPACITY_MaximumLBA -@discussion -Maximum LBA supported via READ CAPACITY 10 command. -*/ -#define kREPORT_CAPACITY_MaximumLBA 0xFFFFFFFFUL - - -/*! -@constant kREPORT_CAPACITY_16_MaximumLBA -@discussion -Maximum LBA supported via READ CAPACITY 16 command. -*/ -#define kREPORT_CAPACITY_16_MaximumLBA 0xFFFFFFFFFFFFFFFFULL - - -/*! -@struct SCSI_Capacity_Data -@discussion -Capacity return structure for READ CAPACITY 10 command. -*/ -typedef struct SCSI_Capacity_Data -{ - UInt32 RETURNED_LOGICAL_BLOCK_ADDRESS; - UInt32 BLOCK_LENGTH_IN_BYTES; -} SCSI_Capacity_Data; - - -/*! -@struct SCSI_Capacity_Data_Long -@discussion -Capacity return structure for READ CAPACITY 16 command. -*/ -typedef struct SCSI_Capacity_Data_Long -{ - UInt64 RETURNED_LOGICAL_BLOCK_ADDRESS; - UInt32 BLOCK_LENGTH_IN_BYTES; - UInt8 RTO_EN_PROT_EN; - UInt8 Reserved[19]; -} SCSI_Capacity_Data_Long; - - -/*! -@enum RTO_EN definitions -@discussion -Values for the REFERENCE TAG OWN (RTO_EN) bit in the -READ CAPACITY Long Data structure. -@constant kREAD_CAPACITY_RTO_Enabled -Reference Tag Own enabled. -@constant kREAD_CAPACITY_RTO_Disabled -Reference Tag Own disabled. -@constant kREAD_CAPACITY_RTO_Mask -Mask to use when checking the RTO_EN_PROT_EN field. -*/ -enum -{ - kREAD_CAPACITY_RTO_Enabled = 0x02, - kREAD_CAPACITY_RTO_Disabled = 0x00, - kREAD_CAPACITY_RTO_Mask = 0x02 -}; - - -/*! -@enum PROTECTION INFORMATION definitions -@discussion -Values for the PROTECTION INFORMATION (PROT_EN) bit in the -READ CAPACITY Long Data structure. -@constant kREAD_CAPACITY_PROT_Enabled -Protection Information enabled. -@constant kREAD_CAPACITY_PROT_Disabled -Protection Information disabled. -@constant kREAD_CAPACITY_PROT_Mask -Mask to use when checking the RTO_EN_PROT_EN field. -*/ - -enum -{ - kREAD_CAPACITY_PROT_Enabled = 0x01, - kREAD_CAPACITY_PROT_Disabled = 0x00, - kREAD_CAPACITY_PROT_Mask = 0x01 -}; - - -#endif /* _IOKIT_SCSI_CMDS_READ_CAPACITY_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_REPORT_LUNS_Definitions.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_REPORT_LUNS_Definitions.h.svn-base deleted file mode 100644 index 6616e84..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_REPORT_LUNS_Definitions.h.svn-base +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) 2004-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_SCSI_CMDS_REPORT_LUNS_DEFINITIONS_H_ -#define _IOKIT_SCSI_CMDS_REPORT_LUNS_DEFINITIONS_H_ - - -#if KERNEL -#include <IOKit/IOTypes.h> -#else -#include <CoreFoundation/CoreFoundation.h> -#endif - - -/*! @header SCSI Request Sense Definitions - @discussion - This file contains all definitions for the data returned from - the REPORT_LUNS (0xA0) command. -*/ - - -/*! -@struct SCSICmd_REPORT_LUNS_LUN_ENTRY -@discussion -This structure represents a single LUN entry in a LUN list -returned via the REPORT_LUNS command. -*/ -typedef struct SCSICmd_REPORT_LUNS_LUN_ENTRY -{ - UInt16 FIRST_LEVEL_ADDRESSING; - UInt16 SECOND_LEVEL_ADDRESSING; - UInt16 THIRD_LEVEL_ADDRESSING; - UInt16 FOURTH_LEVEL_ADDRESSING; -} SCSICmd_REPORT_LUNS_LUN_ENTRY; - - -/*! -@constant kREPORT_LUNS_HeaderSize -@discussion -Size of the REPORT_LUNS header as defined in the SPC-3 specification. -*/ -#define kREPORT_LUNS_HeaderSize 8 - -/*! -@enum REPORT_LUNS addressing methods. -@discussion -REPORT_LUNS addressing methods described in -SAM-2 documents. -@constant kREPORT_LUNS_ADDRESS_METHOD_PERIPHERAL_DEVICE -Peripheral Device Addressing Method. -@constant kREPORT_LUNS_ADDRESS_DEVICE_TYPE_SPECIFIC -Device Type Specific Addressing Method. -@constant kREPORT_LUNS_ADDRESS_METHOD_LOGICAL_UNIT -Logical Unit Specific Addressing Method. -@constant kREPORT_LUNS_ADDRESS_METHOD_OFFSET -Offset to the address method data. -*/ -enum -{ - kREPORT_LUNS_ADDRESS_METHOD_PERIPHERAL_DEVICE = 0, - kREPORT_LUNS_ADDRESS_DEVICE_TYPE_SPECIFIC = 1, - kREPORT_LUNS_ADDRESS_METHOD_LOGICAL_UNIT = 2, - // Reserved [3] - kREPORT_LUNS_ADDRESS_METHOD_OFFSET = 14 -}; - - -/*! -@struct REPORT_LUNS_LOGICAL_UNIT_ADDRESSING -@discussion -This structure represents a LUN Addressing scheme. -*/ -typedef struct REPORT_LUNS_LOGICAL_UNIT_ADDRESSING -{ -#ifdef __LITTLE_ENDIAN__ - UInt16 LUN : 5; - UInt16 BUS_NUMBER : 3; - UInt16 TARGET : 6; - UInt16 reserved2 : 1; - UInt16 reserved : 1; -#else /* !__LITTLE_ENDIAN__ */ - UInt16 reserved : 1; - UInt16 reserved2 : 1; - UInt16 TARGET : 6; - UInt16 BUS_NUMBER : 3; - UInt16 LUN : 5; -#endif /* !__LITTLE_ENDIAN__ */ -} REPORT_LUNS_LOGICAL_UNIT_ADDRESSING; - - -/*! -@struct REPORT_LUNS_PERIPHERAL_DEVICE_ADDRESSING -@discussion -This structure represents a Peripheral Device Addressing scheme. -*/ -typedef struct REPORT_LUNS_PERIPHERAL_DEVICE_ADDRESSING -{ -#ifdef __LITTLE_ENDIAN__ - UInt16 TARGET_LUN : 8; - UInt16 BUS_IDENTIFIER : 6; - UInt16 reserved2 : 1; - UInt16 reserved : 1; -#else /* !__LITTLE_ENDIAN__ */ - UInt16 reserved : 1; - UInt16 reserved2 : 1; - UInt16 BUS_IDENTIFIER : 6; - UInt16 TARGET_LUN : 8; -#endif /* !__LITTLE_ENDIAN__ */ -} REPORT_LUNS_PERIPHERAL_DEVICE_ADDRESSING; - - -/*! -@struct SCSICmd_REPORT_LUNS_Header -@discussion -This structure defines the format of the data that is returned for -the REPORT_LUNS command. -*/ -typedef struct SCSICmd_REPORT_LUNS_Header -{ - UInt32 LUN_LIST_LENGTH; // LUN list length in bytes. - UInt32 RESERVED; - SCSICmd_REPORT_LUNS_LUN_ENTRY LUN[1]; // Variable length list. Must have at least LUN 0 if -} SCSICmd_REPORT_LUNS_Header; // Target supports REPORT_LUNS command. - - -#endif /* _IOKIT_SCSI_CMDS_REPORT_LUNS_DEFINITIONS_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_REQUEST_SENSE_Defs.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_REQUEST_SENSE_Defs.h.svn-base deleted file mode 100644 index 8cfabb0..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/SCSICmds_REQUEST_SENSE_Defs.h.svn-base +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_SCSI_CMDS_REQUEST_SENSE_H_ -#define _IOKIT_SCSI_CMDS_REQUEST_SENSE_H_ - - -#if KERNEL -#include <IOKit/IOTypes.h> -#else -#include <CoreFoundation/CoreFoundation.h> -#endif - - -/*! @header SCSI Request Sense Definitions - @discussion - This file contains all definitions for the data returned from - the REQUEST SENSE (0x03) command and from auto sense on protocols - that support it. -*/ - - -/*! -@enum kSenseDefaultSize -@discussion -The default size for SCSI Request Sense data. -*/ -enum -{ - kSenseDefaultSize = 18 -}; - - -/*! -@struct SCSI_Sense_Data -@discussion -The basic SCSI Request Sense data structure. -*/ -typedef struct SCSI_Sense_Data -{ - UInt8 VALID_RESPONSE_CODE; // 7 = Valid. 6-0 = Response Code. - UInt8 SEGMENT_NUMBER; // Segment number - UInt8 SENSE_KEY; // 7 = FILEMARK, 6 = EOM, 5 = ILI, 3-0 = SENSE KEY. - UInt8 INFORMATION_1; // INFORMATION. - UInt8 INFORMATION_2; // INFORMATION. - UInt8 INFORMATION_3; // INFORMATION. - UInt8 INFORMATION_4; // INFORMATION. - UInt8 ADDITIONAL_SENSE_LENGTH; // Number of additional bytes available in sense data - UInt8 COMMAND_SPECIFIC_INFORMATION_1; // Command Specific Information - UInt8 COMMAND_SPECIFIC_INFORMATION_2; // Command Specific Information - UInt8 COMMAND_SPECIFIC_INFORMATION_3; // Command Specific Information - UInt8 COMMAND_SPECIFIC_INFORMATION_4; // Command Specific Information - UInt8 ADDITIONAL_SENSE_CODE; // Additional Sense Code - UInt8 ADDITIONAL_SENSE_CODE_QUALIFIER; // Additional Sense Code Qualifier - UInt8 FIELD_REPLACEABLE_UNIT_CODE; // Field Replaceable Unit Code - UInt8 SKSV_SENSE_KEY_SPECIFIC_MSB; // 7 = Sense Key Specific Valid bit, 6-0 Sense Key Specific MSB - UInt8 SENSE_KEY_SPECIFIC_MID; // Sense Key Specific Middle - UInt8 SENSE_KEY_SPECIFIC_LSB; // Sense Key Specific LSB -} SCSI_Sense_Data; - - -/*! -@enum Sense Valid -@discussion -Masks to use to determine if sense data is valid or not. -@constant kSENSE_DATA_VALID -Sense data is valid. -@constant kSENSE_NOT_DATA_VALID -Sense data is not valid. -@constant kSENSE_DATA_VALID_Mask -Validity mask to use when checking the VALID_RESPONSE_CODE field. -*/ -enum -{ - kSENSE_DATA_VALID = 0x80, - kSENSE_NOT_DATA_VALID = 0x00, - kSENSE_DATA_VALID_Mask = 0x80 -}; - - -/*! -@enum Sense Response Codes -@discussion -Masks and values to determine the Response Code. -@constant kSENSE_RESPONSE_CODE_Current_Errors -Response code indicating current errors are reported. -@constant kSENSE_RESPONSE_CODE_Deferred_Errors -Response code indicating deferred errors are reported. -@constant kSENSE_RESPONSE_CODE_Mask -Mask to use when checking the VALID_RESPONSE_CODE field. -*/ -enum -{ - kSENSE_RESPONSE_CODE_Current_Errors = 0x70, - kSENSE_RESPONSE_CODE_Deferred_Errors = 0x71, - kSENSE_RESPONSE_CODE_Mask = 0x7F -}; - - -/*! -@enum FILEMARK bit field definitions -@discussion -Masks and values to determine the FileMark bit field. -@constant kSENSE_FILEMARK_Set -Filemark bit is set. -@constant kSENSE_FILEMARK_Not_Set -Filemark bit is not set. -@constant kSENSE_FILEMARK_Mask -Mask to use when checking the SENSE_KEY field for the FILEMARK bit. -*/ -enum -{ - kSENSE_FILEMARK_Set = 0x80, - kSENSE_FILEMARK_Not_Set = 0x00, - kSENSE_FILEMARK_Mask = 0x80 -}; - - -/*! -@enum EOM bit field definitions -@discussion -Masks and values to determine the End Of Medium bit field. -@constant kSENSE_EOM_Set -End Of Medium bit is set. -@constant kSENSE_EOM_Not_Set -End Of Medium bit is not set. -@constant kSENSE_EOM_Mask -Mask to use when checking the SENSE_KEY field for the EOM bit. -*/ -enum -{ - kSENSE_EOM_Set = 0x40, - kSENSE_EOM_Not_Set = 0x00, - kSENSE_EOM_Mask = 0x40 -}; - - -/*! -@enum ILI bit field definitions -@discussion -Masks and values to determine the Incorrect Length Indicator bit field. -@constant kSENSE_ILI_Set -Incorrect Length Indicator bit is set. -@constant kSENSE_ILI_Not_Set -Incorrect Length Indicator bit is not set. -@constant kSENSE_ILI_Mask -Mask to use when checking the SENSE_KEY field for the ILI bit. -*/ -enum -{ - kSENSE_ILI_Set = 0x20, - kSENSE_ILI_Not_Set = 0x00, - kSENSE_ILI_Mask = 0x20 -}; - - -/*! -@enum Sense Key definitions -@discussion -Masks and values to determine the SENSE_KEY. -@constant kSENSE_KEY_NO_SENSE -No sense data is present. -@constant kSENSE_KEY_RECOVERED_ERROR -A recovered error has occurred. -@constant kSENSE_KEY_NOT_READY -Device server is not ready. -@constant kSENSE_KEY_MEDIUM_ERROR -Device server detected a medium error. -@constant kSENSE_KEY_HARDWARE_ERROR -Device server detected a hardware error. -@constant kSENSE_KEY_ILLEGAL_REQUEST -Device server detected an illegal request. -@constant kSENSE_KEY_UNIT_ATTENTION -Device server indicates a unit attention condition. -@constant kSENSE_KEY_DATA_PROTECT -Device server indicates a data protect condition. -@constant kSENSE_KEY_BLANK_CHECK -Device server indicates a blank check condition. -@constant kSENSE_KEY_VENDOR_SPECIFIC -Device server indicates a vendor specific condition. -@constant kSENSE_KEY_COPY_ABORTED -Device server indicates a copy aborted condition. -@constant kSENSE_KEY_ABORTED_COMMAND -Device server indicates an aborted command condition. -@constant kSENSE_KEY_VOLUME_OVERFLOW -Device server indicates a volume overflow condition. -@constant kSENSE_KEY_MISCOMPARE -Device server indicates a miscompare condition. -@constant kSENSE_KEY_Mask -Mask to use when checking the SENSE_KEY field for the SENSE_KEY value. -*/ -enum -{ - kSENSE_KEY_NO_SENSE = 0x00, - kSENSE_KEY_RECOVERED_ERROR = 0x01, - kSENSE_KEY_NOT_READY = 0x02, - kSENSE_KEY_MEDIUM_ERROR = 0x03, - kSENSE_KEY_HARDWARE_ERROR = 0x04, - kSENSE_KEY_ILLEGAL_REQUEST = 0x05, - kSENSE_KEY_UNIT_ATTENTION = 0x06, - kSENSE_KEY_DATA_PROTECT = 0x07, - kSENSE_KEY_BLANK_CHECK = 0x08, - kSENSE_KEY_VENDOR_SPECIFIC = 0x09, - kSENSE_KEY_COPY_ABORTED = 0x0A, - kSENSE_KEY_ABORTED_COMMAND = 0x0B, - /* SENSE KEY 0x0C is obsoleted */ - kSENSE_KEY_VOLUME_OVERFLOW = 0x0D, - kSENSE_KEY_MISCOMPARE = 0x0E, - /* SENSE KEY 0x0F is reserved */ - kSENSE_KEY_Mask = 0x0F -}; - - -#endif /* _IOKIT_SCSI_CMDS_REQUEST_SENSE_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSICommandDefinitions.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSICommandDefinitions.h.svn-base deleted file mode 100644 index d33aed6..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/SCSICommandDefinitions.h.svn-base +++ /dev/null @@ -1,479 +0,0 @@ -/* - * Copyright (c) 2001-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_SCSI_COMMAND_DEFINITIONS_H_ -#define _IOKIT_SCSI_COMMAND_DEFINITIONS_H_ - - -#if KERNEL -#include <IOKit/IOTypes.h> -#else -#include <CoreFoundation/CoreFoundation.h> -#endif - - -/*! @header SCSICommandDefinitions - @discussion - This file contains all the definitions for types and constants that are - used by the command set classes for building CDBs. The field type - definitions are used for the parameters passed to a method that builds and - sends any SCSI defined command to clearly identify the type of value - expected for a parameter. - - The command methods will then use the appropriate mask to verify that the - value passed into a parameter is of the specified type. - - Currently only types and masks are defined for 8 bytes and smaller fields. - If a command is defined that uses a larger field, these should be expanded - to include those sizes. -*/ - -#pragma mark Field Type Definitions -/* These are the type definitions used for the parameters of methods that - * build and send Command Descriptor Blocks. - */ - -/* 1 Byte or smaller fields. */ - -/*! @typedef SCSICmdField1Bit */ -typedef UInt8 SCSICmdField1Bit; - -/*! @typedef SCSICmdField2Bit */ -typedef UInt8 SCSICmdField2Bit; - -/*! @typedef SCSICmdField3Bit */ -typedef UInt8 SCSICmdField3Bit; - -/*! @typedef SCSICmdField4Bit */ -typedef UInt8 SCSICmdField4Bit; - -/*! @typedef SCSICmdField5Bit */ -typedef UInt8 SCSICmdField5Bit; - -/*! @typedef SCSICmdField6Bit */ -typedef UInt8 SCSICmdField6Bit; - -/*! @typedef SCSICmdField7Bit */ -typedef UInt8 SCSICmdField7Bit; - -/*! @typedef SCSICmdField1Byte */ -typedef UInt8 SCSICmdField1Byte; - -/* 2 Bytes or smaller fields. */ - -/*! @typedef SCSICmdField9Bit */ -typedef UInt16 SCSICmdField9Bit; - -/*! @typedef SCSICmdField10Bit */ -typedef UInt16 SCSICmdField10Bit; - -/*! @typedef SCSICmdField11Bit */ -typedef UInt16 SCSICmdField11Bit; - -/*! @typedef SCSICmdField12Bit */ -typedef UInt16 SCSICmdField12Bit; - -/*! @typedef SCSICmdField13Bit */ -typedef UInt16 SCSICmdField13Bit; - -/*! @typedef SCSICmdField14Bit */ -typedef UInt16 SCSICmdField14Bit; - -/*! @typedef SCSICmdField15Bit */ -typedef UInt16 SCSICmdField15Bit; - -/*! @typedef SCSICmdField2Byte */ -typedef UInt16 SCSICmdField2Byte; - -/* 3 Bytes or smaller fields. */ - -/*! @typedef SCSICmdField17Bit */ -typedef UInt32 SCSICmdField17Bit; - -/*! @typedef SCSICmdField18Bit */ -typedef UInt32 SCSICmdField18Bit; - -/*! @typedef SCSICmdField19Bit */ -typedef UInt32 SCSICmdField19Bit; - -/*! @typedef SCSICmdField20Bit */ -typedef UInt32 SCSICmdField20Bit; - -/*! @typedef SCSICmdField21Bit */ -typedef UInt32 SCSICmdField21Bit; - -/*! @typedef SCSICmdField22Bit */ -typedef UInt32 SCSICmdField22Bit; - -/*! @typedef SCSICmdField23Bit */ -typedef UInt32 SCSICmdField23Bit; - -/*! @typedef SCSICmdField3Byte */ -typedef UInt32 SCSICmdField3Byte; - -/* 4 Bytes or smaller fields. */ - -/*! @typedef SCSICmdField25Bit */ -typedef UInt32 SCSICmdField25Bit; - -/*! @typedef SCSICmdField26Bit */ -typedef UInt32 SCSICmdField26Bit; - -/*! @typedef SCSICmdField27Bit */ -typedef UInt32 SCSICmdField27Bit; - -/*! @typedef SCSICmdField28Bit */ -typedef UInt32 SCSICmdField28Bit; - -/*! @typedef SCSICmdField29Bit */ -typedef UInt32 SCSICmdField29Bit; - -/*! @typedef SCSICmdField30Bit */ -typedef UInt32 SCSICmdField30Bit; - -/*! @typedef SCSICmdField31Bit */ -typedef UInt32 SCSICmdField31Bit; - -/*! @typedef SCSICmdField4Byte */ -typedef UInt32 SCSICmdField4Byte; - -/* 5 Bytes or smaller fields. */ - -/*! @typedef SCSICmdField33Bit */ -typedef UInt64 SCSICmdField33Bit; - -/*! @typedef SCSICmdField34Bit */ -typedef UInt64 SCSICmdField34Bit; - -/*! @typedef SCSICmdField35Bit */ -typedef UInt64 SCSICmdField35Bit; - -/*! @typedef SCSICmdField36Bit */ -typedef UInt64 SCSICmdField36Bit; - -/*! @typedef SCSICmdField37Bit */ -typedef UInt64 SCSICmdField37Bit; - -/*! @typedef SCSICmdField38Bit */ -typedef UInt64 SCSICmdField38Bit; - -/*! @typedef SCSICmdField39Bit */ -typedef UInt64 SCSICmdField39Bit; - -/*! @typedef SCSICmdField5Byte */ -typedef UInt64 SCSICmdField5Byte; - -/* 6 Bytes or smaller fields. */ - -/*! @typedef SCSICmdField41Bit */ -typedef UInt64 SCSICmdField41Bit; - -/*! @typedef SCSICmdField42Bit */ -typedef UInt64 SCSICmdField42Bit; - -/*! @typedef SCSICmdField43Bit */ -typedef UInt64 SCSICmdField43Bit; - -/*! @typedef SCSICmdField44Bit */ -typedef UInt64 SCSICmdField44Bit; - -/*! @typedef SCSICmdField45Bit */ -typedef UInt64 SCSICmdField45Bit; - -/*! @typedef SCSICmdField46Bit */ -typedef UInt64 SCSICmdField46Bit; - -/*! @typedef SCSICmdField47Bit */ -typedef UInt64 SCSICmdField47Bit; - -/*! @typedef SCSICmdField6Byte */ -typedef UInt64 SCSICmdField6Byte; - -/* 7 Bytes or smaller fields. */ - -/*! @typedef SCSICmdField49Bit */ -typedef UInt64 SCSICmdField49Bit; - -/*! @typedef SCSICmdField50Bit */ -typedef UInt64 SCSICmdField50Bit; - -/*! @typedef SCSICmdField51Bit */ -typedef UInt64 SCSICmdField51Bit; - -/*! @typedef SCSICmdField52Bit */ -typedef UInt64 SCSICmdField52Bit; - -/*! @typedef SCSICmdField53Bit */ -typedef UInt64 SCSICmdField53Bit; - -/*! @typedef SCSICmdField54Bit */ -typedef UInt64 SCSICmdField54Bit; - -/*! @typedef SCSICmdField55Bit */ -typedef UInt64 SCSICmdField55Bit; - -/*! @typedef SCSICmdField7Byte */ -typedef UInt64 SCSICmdField7Byte; - -/* 8 Bytes or smaller fields. */ - -/*! @typedef SCSICmdField57Bit */ -typedef UInt64 SCSICmdField57Bit; - -/*! @typedef SCSICmdField58Bit */ -typedef UInt64 SCSICmdField58Bit; - -/*! @typedef SCSICmdField59Bit */ -typedef UInt64 SCSICmdField59Bit; - -/*! @typedef SCSICmdField60Bit */ -typedef UInt64 SCSICmdField60Bit; - -/*! @typedef SCSICmdField61Bit */ -typedef UInt64 SCSICmdField61Bit; - -/*! @typedef SCSICmdField62Bit */ -typedef UInt64 SCSICmdField62Bit; - -/*! @typedef SCSICmdField63Bit */ -typedef UInt64 SCSICmdField63Bit; - -/*! @typedef SCSICmdField8Byte */ -typedef UInt64 SCSICmdField8Byte; - - -#pragma mark Field Mask Definitions -/* These are masks that are used to verify that the values passed into the - * parameters for the fields are not larger than the field size. - * - * NB: These have changed from enums to #define since enums greater than - * 32 bits in size are not well-defined in C99. - */ - -/* 1 Byte or smaller fields. */ - -/*! @constant kSCSICmdFieldMask1Bit */ -#define kSCSICmdFieldMask1Bit 0x01 - -/*! @constant kSCSICmdFieldMask2Bit */ -#define kSCSICmdFieldMask2Bit 0x03 - -/*! @constant kSCSICmdFieldMask3Bit */ -#define kSCSICmdFieldMask3Bit 0x07 - -/*! @constant kSCSICmdFieldMask4Bit */ -#define kSCSICmdFieldMask4Bit 0x0F - -/*! @constant kSCSICmdFieldMask5Bit */ -#define kSCSICmdFieldMask5Bit 0x1F - -/*! @constant kSCSICmdFieldMask6Bit */ -#define kSCSICmdFieldMask6Bit 0x3F - -/*! @constant kSCSICmdFieldMask7Bit */ -#define kSCSICmdFieldMask7Bit 0x7F - -#define kSCSICmdFieldMask1Byte 0xFF - -/* 2 Bytes or smaller fields. */ - -/*! @constant kSCSICmdFieldMask9Bit */ -#define kSCSICmdFieldMask9Bit 0x01FF - -/*! @constant kSCSICmdFieldMask10Bit */ -#define kSCSICmdFieldMask10Bit 0x03FF - -/*! @constant kSCSICmdFieldMask11Bit */ -#define kSCSICmdFieldMask11Bit 0x07FF - -/*! @constant kSCSICmdFieldMask12Bit */ -#define kSCSICmdFieldMask12Bit 0x0FFF - -/*! @constant kSCSICmdFieldMask13Bit */ -#define kSCSICmdFieldMask13Bit 0x1FFF - -/*! @constant kSCSICmdFieldMask14Bit */ -#define kSCSICmdFieldMask14Bit 0x3FFF - -/*! @constant kSCSICmdFieldMask15Bit */ -#define kSCSICmdFieldMask15Bit 0x7FFF - -/*! @constant kSCSICmdFieldMask2Byte */ -#define kSCSICmdFieldMask2Byte 0xFFFF - -/* 3 Bytes or smaller fields. */ - -/*! @constant kSCSICmdFieldMask17Bit */ -#define kSCSICmdFieldMask17Bit 0x01FFFF - -/*! @constant kSCSICmdFieldMask18Bit */ -#define kSCSICmdFieldMask18Bit 0x03FFFF - -/*! @constant kSCSICmdFieldMask19Bit */ -#define kSCSICmdFieldMask19Bit 0x07FFFF - -/*! @constant kSCSICmdFieldMask20Bit */ -#define kSCSICmdFieldMask20Bit 0x0FFFFF - -/*! @constant kSCSICmdFieldMask21Bit */ -#define kSCSICmdFieldMask21Bit 0x1FFFFF - -/*! @constant kSCSICmdFieldMask22Bit */ -#define kSCSICmdFieldMask22Bit 0x3FFFFF - -/*! @constant kSCSICmdFieldMask23Bit */ -#define kSCSICmdFieldMask23Bit 0x7FFFFF - -/*! @constant kSCSICmdFieldMask3Byte */ -#define kSCSICmdFieldMask3Byte 0xFFFFFF - -/* 4 Bytes or smaller fields. */ -/*! @constant kSCSICmdFieldMask25Bit */ -#define kSCSICmdFieldMask25Bit 0x01FFFFFFUL - -/*! @constant kSCSICmdFieldMask26Bit */ -#define kSCSICmdFieldMask26Bit 0x03FFFFFFUL - -/*! @constant kSCSICmdFieldMask27Bit */ -#define kSCSICmdFieldMask27Bit 0x07FFFFFFUL - -/*! @constant kSCSICmdFieldMask28Bit */ -#define kSCSICmdFieldMask28Bit 0x0FFFFFFFUL - -/*! @constant kSCSICmdFieldMask29Bit */ -#define kSCSICmdFieldMask29Bit 0x1FFFFFFFUL - -/*! @constant kSCSICmdFieldMask30Bit */ -#define kSCSICmdFieldMask30Bit 0x3FFFFFFFUL - -/*! @constant kSCSICmdFieldMask31Bit */ -#define kSCSICmdFieldMask31Bit 0x7FFFFFFFUL - -/*! @constant kSCSICmdFieldMask4Byte */ -#define kSCSICmdFieldMask4Byte 0xFFFFFFFFUL - -/* 5 Bytes or smaller fields. */ - -/*! @constant kSCSICmdFieldMask33Bit */ -#define kSCSICmdFieldMask33Bit 0x01FFFFFFFFULL - -/*! @constant kSCSICmdFieldMask34Bit */ -#define kSCSICmdFieldMask34Bit 0x03FFFFFFFFULL - -/*! @constant kSCSICmdFieldMask35Bit */ -#define kSCSICmdFieldMask35Bit 0x07FFFFFFFFULL - -/*! @constant kSCSICmdFieldMask36Bit */ -#define kSCSICmdFieldMask36Bit 0x0FFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask37Bit */ -#define kSCSICmdFieldMask37Bit 0x1FFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask38Bit */ -#define kSCSICmdFieldMask38Bit 0x3FFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask39Bit */ -#define kSCSICmdFieldMask39Bit 0x7FFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask5Byte */ -#define kSCSICmdFieldMask5Byte 0xFFFFFFFFFFULL - -/* 6 Bytes or smaller fields. */ - -/*! @constant kSCSICmdFieldMask41Bit */ -#define kSCSICmdFieldMask41Bit 0x01FFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask42Bit */ -#define kSCSICmdFieldMask42Bit 0x03FFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask43Bit */ -#define kSCSICmdFieldMask43Bit 0x07FFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask44Bit */ -#define kSCSICmdFieldMask44Bit 0x0FFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask45Bit */ -#define kSCSICmdFieldMask45Bit 0x1FFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask46Bit */ -#define kSCSICmdFieldMask46Bit 0x3FFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask47Bit */ -#define kSCSICmdFieldMask47Bit 0x7FFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask6Byte */ -#define kSCSICmdFieldMask6Byte 0xFFFFFFFFFFFFULL - -/* 7 Bytes or smaller fields. */ - -/*! @constant kSCSICmdFieldMask49Bit */ -#define kSCSICmdFieldMask49Bit 0x01FFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask50Bit */ -#define kSCSICmdFieldMask50Bit 0x03FFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask51Bit */ -#define kSCSICmdFieldMask51Bit 0x07FFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask52Bit */ -#define kSCSICmdFieldMask52Bit 0x0FFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask53Bit */ -#define kSCSICmdFieldMask53Bit 0x1FFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask54Bit */ -#define kSCSICmdFieldMask54Bit 0x3FFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask55Bit */ -#define kSCSICmdFieldMask55Bit 0x7FFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask7Byte */ -#define kSCSICmdFieldMask7Byte 0xFFFFFFFFFFFFFFULL - -/* 8 Bytes or smaller fields. */ - -/*! @constant kSCSICmdFieldMask57Bit */ -#define kSCSICmdFieldMask57Bit 0x01FFFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask58Bit */ -#define kSCSICmdFieldMask58Bit 0x03FFFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask59Bit */ -#define kSCSICmdFieldMask59Bit 0x07FFFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask60Bit */ -#define kSCSICmdFieldMask60Bit 0x0FFFFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask61Bit */ -#define kSCSICmdFieldMask61Bit 0x1FFFFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask62Bit */ -#define kSCSICmdFieldMask62Bit 0x3FFFFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask63Bit */ -#define kSCSICmdFieldMask63Bit 0x7FFFFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask8Byte */ -#define kSCSICmdFieldMask8Byte 0xFFFFFFFFFFFFFFFFULL - -#endif /* _IOKIT_SCSI_COMMAND_DEFINITIONS_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSICommandOperationCodes.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSICommandOperationCodes.h.svn-base deleted file mode 100644 index 21d9d1e..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/SCSICommandOperationCodes.h.svn-base +++ /dev/null @@ -1,941 +0,0 @@ -/* - * Copyright (c) 2001-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _SCSI_COMMAND_OPERATION_CODES_H_ -#define _SCSI_COMMAND_OPERATION_CODES_H_ - -#pragma mark About this file -/* This file contains the operation code definitions for all commands defined - * by the SCSI specifications. The commands are listed in three formats: - * 1) All commands are listed in alphabetical order. This list is the live - * enumeration for all of the command constants. - * 2) The commands are listed in ascending numerical order. - * 3) The commands are grouped by Peripheral Device Type. - * - * In the command listings by Peripheral Device Type, there will be a comment - * following each command. This comment indentifies the section of the related - * specification where the commands is defined and the requirement type of the - * command, Mandatory or Optional. - * If a specification redefines an optional command from SPC as mandatory, - * the command will be relisted in the Peripheral Device Type command list with - * the mandatory tag next to it. - * All commands that are listed in SPC as Device Type Specifc will be relisted - * as a comment in all specifications lists that support that command with the - * appropriate Mandatory or Optional tag for that specification. - * - * The section number and the requirement type of the command are based on the - * version of the specification listed in the header comment for the Peripheral - * Device Type. This data is provided for informational purposes only. The - * specification document and version that the device adheres to as indicated - * by the data returned in response to the INQUIRY command should be used as - * the authorative source for supported and required behavior of the device. - * - * The SPC set is listed before all other Peripheral Device Type commands as - * this is the base document from which all of the other documents are derived. - * - * The Peripheral Device Types and associated command sets as defined by SPC-2, - * section 7.4.1 are as follows: - * Peripheral Device Type Associated Command Specification - * ------------------------------------ ----------------------------------- - * 0x00 Direct Access Device SBC - SCSI-3 Block Commands - * 0x01 Sequential Access Device SSC - SCSI-3 Stream Commands - * 0x02 Printer Device SSC - SCSI-3 Stream Commands - * 0x03 Processor Device SPC - SCSI Primary Commands-2 - * 0x04 Write Once Device SBC - SCSI-3 Block Commands - * 0x05 CD-ROM Device MMC - SCSI Multimedia Commands-2 - * 0x06 Scanner Device SGC - SCSI-3 Graphics Commands - * 0x07 Optical Memory Device SBC - SCSI-3 Block Commands - * 0x08 Medium Changer Device SMC - SCSI-3 Medium Changer Cmds - * 0x09 Communications Device SSC - SCSI-3 Stream Commands - * 0x0A - 0x0B Graphic Arts Prepress Dev ASC IT8 - * 0x0C Storage Array Controller Device SCC-2 - SCSI Controller Commands-2 - * 0x0D Enclosure Services SES - SCSI-3 Enclosure Services - * 0x0E Simplified Direct Access Device RBC - SCSI Reduced Block Commands - * 0x0F Optical Card Reader/Writer Device OCRW - SCSI Specification for - * Optical Card Reader/Writer - * 0x10 Reserved No command specification - * 0x11 Object-Based Storage Device OSD - SCSI Object Based Storage - * Device Commands - * 0x12 - 0x14 Reserved No command specification - * 0x15 Multimedia Media Access Engine RMC - Reduced Multimedia Commands - * 0x16 - 0x1E Reserved No command specification - * 0x1F Unknown or No Device No command specification - */ - -#pragma mark - -#pragma mark Command Definitions by Name -/* All SCSI Commands listed in alphabetical order. These are the live - * definitions of the commands. All other command lists are informative. - */ -enum -{ - kSCSICmd_ACCESS_CONTROL_IN = 0x86, - kSCSICmd_ACCESS_CONTROL_OUT = 0x87, - kSCSICmd_BLANK = 0xA1, - kSCSICmd_CHANGE_DEFINITION = 0x40, - kSCSICmd_CLOSE_TRACK_SESSION = 0x5B, - kSCSICmd_COMPARE = 0x39, - kSCSICmd_COPY = 0x18, - kSCSICmd_COPY_AND_VERIFY = 0x3A, - kSCSICmd_ERASE_10 = 0x2C, - kSCSICmd_ERASE_12 = 0xAC, - kSCSICmd_EXTENDED_COPY = 0x83, - kSCSICmd_FORMAT_UNIT = 0x04, - kSCSICmd_GET_CONFIGURATION = 0x46, - kSCSICmd_GET_EVENT_STATUS_NOTIFICATION = 0x4A, - kSCSICmd_GET_PERFORMANCE = 0xAC, - kSCSICmd_INQUIRY = 0x12, - kSCSICmd_LOAD_UNLOAD_MEDIUM = 0xA6, - kSCSICmd_LOCK_UNLOCK_CACHE = 0x36, - kSCSICmd_LOCK_UNLOCK_CACHE_16 = 0x92, - kSCSICmd_LOG_SELECT = 0x4C, - kSCSICmd_LOG_SENSE = 0x4D, - kSCSICmd_MAINTENANCE_IN = 0xA3, - kSCSICmd_MAINTENANCE_OUT = 0xA4, - kSCSICmd_MECHANISM_STATUS = 0xBD, - kSCSICmd_MEDIUM_SCAN = 0x38, - kSCSICmd_MODE_SELECT_6 = 0x15, - kSCSICmd_MODE_SELECT_10 = 0x55, - kSCSICmd_MODE_SENSE_6 = 0x1A, - kSCSICmd_MODE_SENSE_10 = 0x5A, - kSCSICmd_MOVE_MEDIUM_ATTACHED = 0xA7, - kSCSICmd_PAUSE_RESUME = 0x4B, - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, - kSCSICmd_PLAY_AUDIO_10 = 0x45, - kSCSICmd_PLAY_AUDIO_12 = 0xA5, - kSCSICmd_PLAY_AUDIO_MSF = 0x47, - kSCSICmd_PLAY_AUDIO_TRACK_INDEX = 0x48, - kSCSICmd_PLAY_CD = 0xBC, - kSCSICmd_PLAY_RELATIVE_10 = 0x49, - kSCSICmd_PLAY_RELATIVE_12 = 0xA9, - kSCSICmd_PREFETCH = 0x34, - kSCSICmd_PREFETCH_16 = 0x90, - kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, - kSCSICmd_READ_6 = 0x08, - kSCSICmd_READ_10 = 0x28, - kSCSICmd_READ_12 = 0xA8, - kSCSICmd_READ_16 = 0x88, - kSCSICmd_READ_ATTRIBUTE = 0x8C, - kSCSICmd_READ_BUFFER = 0x3C, - kSCSICmd_READ_BUFFER_CAPACITY = 0x5C, - kSCSICmd_READ_CAPACITY = 0x25, - kSCSICmd_READ_CD = 0xBE, - kSCSICmd_READ_CD_MSF = 0xB9, - kSCSICmd_READ_DEFECT_DATA_10 = 0x37, - kSCSICmd_READ_DEFECT_DATA_12 = 0xB7, - kSCSICmd_READ_DISC_INFORMATION = 0x51, - kSCSICmd_READ_DVD_STRUCTURE = 0xAD, - kSCSICmd_READ_DISC_STRUCTURE = 0xAD, - kSCSICmd_READ_ELEMENT_STATUS_ATTACHED = 0xB4, - kSCSICmd_READ_FORMAT_CAPACITIES = 0x23, - kSCSICmd_READ_GENERATION = 0x29, - kSCSICmd_READ_HEADER = 0x44, - kSCSICmd_READ_LONG = 0x3E, - kSCSICmd_READ_MASTER_CUE = 0x59, - kSCSICmd_READ_SUB_CHANNEL = 0x42, - kSCSICmd_READ_TOC_PMA_ATIP = 0x43, - kSCSICmd_READ_TRACK_INFORMATION = 0x52, - kSCSICmd_READ_UPDATED_BLOCK_10 = 0x2D, - kSCSICmd_REASSIGN_BLOCKS = 0x07, - kSCSICmd_REBUILD = 0x81, - kSCSICmd_RECEIVE = 0x08, - kSCSICmd_RECEIVE_COPY_RESULTS = 0x84, - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, - kSCSICmd_REDUNDANCY_GROUP_IN = 0xBA, - kSCSICmd_REDUNDANCY_GROUP_OUT = 0xBB, - kSCSICmd_REGENERATE = 0x82, - kSCSICmd_RELEASE_6 = 0x17, - kSCSICmd_RELEASE_10 = 0x57, - kSCSICmd_REPAIR_TRACK = 0x58, - kSCSICmd_REPORT_DEVICE_IDENTIFIER = 0xA3, - kSCSICmd_REPORT_KEY = 0xA4, - kSCSICmd_REPORT_LUNS = 0xA0, - kSCSICmd_REQUEST_SENSE = 0x03, - kSCSICmd_RESERVE_6 = 0x16, - kSCSICmd_RESERVE_10 = 0x56, - kSCSICmd_RESERVE_TRACK = 0x53, - kSCSICmd_REZERO_UNIT = 0x01, - kSCSICmd_SCAN_MMC = 0xBA, - kSCSICmd_SEARCH_DATA_EQUAL_10 = 0x31, - kSCSICmd_SEARCH_DATA_EQUAL_12 = 0xB1, - kSCSICmd_SEARCH_DATA_HIGH_10 = 0x30, - kSCSICmd_SEARCH_DATA_HIGH_12 = 0xB0, - kSCSICmd_SEARCH_DATA_LOW_10 = 0x32, - kSCSICmd_SEARCH_DATA_LOW_12 = 0xB2, - kSCSICmd_SEEK_6 = 0x0B, - kSCSICmd_SEEK_10 = 0x2B, - kSCSICmd_SEND = 0x0A, - kSCSICmd_SEND_CUE_SHEET = 0x5D, - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, - kSCSICmd_SEND_DVD_STRUCTURE = 0xBF, - kSCSICmd_SEND_EVENT = 0xA2, - kSCSICmd_SEND_KEY = 0xA3, - kSCSICmd_SEND_OPC_INFORMATION = 0x54, - kSCSICmd_SERVICE_ACTION_IN = 0x9E, - kSCSICmd_SERVICE_ACTION_OUT = 0x9F, - kSCSICmd_SET_CD_SPEED = 0xBB, - kSCSICmd_SET_DEVICE_IDENTIFIER = 0xA4, - kSCSICmd_SET_LIMITS_10 = 0x33, - kSCSICmd_SET_LIMITS_12 = 0xB3, - kSCSICmd_SET_READ_AHEAD = 0xA7, - kSCSICmd_SET_STREAMING = 0xB6, - kSCSICmd_SPARE_IN = 0xBC, - kSCSICmd_SPARE_OUT = 0xBD, - kSCSICmd_START_STOP_UNIT = 0x1B, - kSCSICmd_STOP_PLAY_SCAN = 0x4E, - kSCSICmd_SYNCHRONIZE_CACHE = 0x35, - kSCSICmd_SYNCHRONIZE_CACHE_16 = 0x91, - kSCSICmd_TEST_UNIT_READY = 0x00, - kSCSICmd_UPDATE_BLOCK = 0x3D, - kSCSICmd_VERIFY_10 = 0x2F, - kSCSICmd_VERIFY_12 = 0xAF, - kSCSICmd_VERIFY_16 = 0x8F, - kSCSICmd_VOLUME_SET_IN = 0xBE, - kSCSICmd_VOLUME_SET_OUT = 0xBF, - kSCSICmd_WRITE_6 = 0x0A, - kSCSICmd_WRITE_10 = 0x2A, - kSCSICmd_WRITE_12 = 0xAA, - kSCSICmd_WRITE_16 = 0x8A, - kSCSICmd_WRITE_AND_VERIFY_10 = 0x2E, - kSCSICmd_WRITE_AND_VERIFY_12 = 0xAE, - kSCSICmd_WRITE_AND_VERIFY_16 = 0x8E, - kSCSICmd_WRITE_ATTRIBUTE = 0x8D, - kSCSICmd_WRITE_BUFFER = 0x3B, - kSCSICmd_WRITE_LONG = 0x3F, - kSCSICmd_WRITE_SAME = 0x41, - kSCSICmd_WRITE_SAME_16 = 0x93, - kSCSICmd_XDREAD = 0x52, - kSCSICmd_XDWRITE = 0x50, - kSCSICmd_XDWRITE_EXTENDED = 0x80, - kSCSICmd_XDWRITEREAD_10 = 0x53, - kSCSICmd_XPWRITE = 0x51, - - kSCSICmdVariableLengthCDB = 0x7F -}; - -/* Service Action Definitions for the Variable Length CDB (7Fh) command */ -enum -{ - kSCSIServiceAction_READ_32 = 0x0009, - kSCSIServiceAction_VERIFY_32 = 0x000A, - kSCSIServiceAction_WRITE_32 = 0x000B, - kSCSIServiceAction_WRITE_AND_VERIFY_32 = 0x000C, - kSCSIServiceAction_WRITE_SAME_32 = 0x000D, - kSCSIServiceAction_XDREAD_32 = 0x0003, - kSCSIServiceAction_XDWRITE_32 = 0x0004, - kSCSIServiceAction_XDWRITEREAD_32 = 0x0007, - kSCSIServiceAction_XPWRITE_32 = 0x0006 -}; - -/* Service Action Definitions for the MAINTENANCE IN (A3h) command */ -enum -{ - kSCSIServiceAction_REPORT_ALIASES = 0x0B, - kSCSIServiceAction_REPORT_DEVICE_IDENTIFIER = 0x05, - kSCSIServiceAction_REPORT_PRIORITY = 0x0E, - kSCSIServiceAction_REPORT_SUPPORTED_OPERATION_CODES = 0x0C, - kSCSIServiceAction_REPORT_SUPPORTED_TASK_MANAGEMENT_FUNCTIONS = 0x0D, - kSCSIServiceAction_REPORT_TARGET_PORT_GROUPS = 0x0A -}; - -/* Service Action Definitions for the MAINTENANCE OUT (A4h) command */ -enum -{ - kSCSIServiceAction_CHANGE_ALIASES = 0x0B, - kSCSIServiceAction_SET_DEVICE_IDENTIFIER = 0x06, - kSCSIServiceAction_SET_PRIORITY = 0x0E, - kSCSIServiceAction_SET_TARGET_PORT_GROUPS = 0x0A -}; - -/* Service Action Definitions for the SERVICE ACTION IN (9Eh) command */ -enum -{ - kSCSIServiceAction_READ_CAPACITY_16 = 0x10, - kSCSIServiceAction_READ_LONG_16 = 0x11 -}; - -/* Service Action Definitions for the SERVICE ACTION OUT (9Fh) command */ -enum -{ - kSCSIServiceAction_WRITE_LONG_16 = 0x11 -}; - -#pragma mark - -#pragma mark Command Definitions by Number -#if 0 -enum -{ -}; -#endif - - -#pragma mark - -#pragma mark All Types SPC Commands -/* Commands defined by the T10:1236-D SCSI Primary Commands-2 (SPC-2) - * command specification. The definitions and section numbers are based on - * section 7 of the revision 18, 21 May 2000 version of the specification. - * - * These commands are defined for all devices. - */ -#if 0 -enum -{ - kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ - kSCSICmd_COMPARE = 0x39, /* Sec. 7.2: Optional */ - kSCSICmd_COPY = 0x18, /* Sec. 7.3: Optional */ - kSCSICmd_COPY_AND_VERIFY = 0x3A, /* Sec. 7.4: Optional */ - kSCSICmd_EXTENDED_COPY = 0x83, /* Sec. 7.5: Optional */ - kSCSICmd_INQUIRY = 0x12, /* Sec. 7.6: Mandatory */ - kSCSICmd_LOG_SELECT = 0x4C, /* Sec. 7.7: Optional */ - kSCSICmd_LOG_SENSE = 0x4D, /* Sec. 7.8: Optional */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* Sec. 7.9: Device Type - * Specific */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* Sec. 7.10: Device Type - * Specific */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* Sec. 7.11: Device Type - * Specific */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* Sec. 7.12: Device Type - * Specific */ - kSCSICmd_MOVE_MEDIUM_ATTACHED = 0xA7, /* Defined in SMC */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Sec. 7.13: Device Type - * Specific */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Sec. 7.14: Device Type - * Specific */ - kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* Sec. 7.15: Device Type - * Specific */ - kSCSICmd_READ_BUFFER = 0x3C, /* Sec. 7.16: Optional */ - kSCSICmd_READ_ELEMENT_STATUS_ATTACHED = 0xB4, /* Defined in SMC */ - kSCSICmd_RECEIVE_COPY_RESULTS = 0x84, /* Sec. 7.17: Optional */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* Sec. 7.18: Optional */ - kSCSICmd_RELEASE_10 = 0x57, /* Sec. 7.19: Device Type - * Specific */ - kSCSICmd_RELEASE_6 = 0x17, /* Sec. 7.20: Device Type - * Specific */ - kSCSICmd_REPORT_DEVICE_IDENTIFIER = 0xA3, /* Sec. 7.21: Optional */ - kSCSICmd_REPORT_LUNS = 0xA0, /* Sec. 7.22: Mandatory for - * LUN Supporting devices*/ - kSCSICmd_REQUEST_SENSE = 0x03, /* Sec. 7.23: Device Type - * Specific */ - kSCSICmd_RESERVE_10 = 0x56, /* Sec. 7.24: Device Type - * Specific */ - kSCSICmd_RESERVE_6 = 0x16, /* Sec. 7.25: Device Type - * Specific */ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* Sec. 7.26: Optional */ - kSCSICmd_SET_DEVICE_IDENTIFIER = 0xA4, /* Sec. 7.27: Optional */ - kSCSICmd_TEST_UNIT_READY = 0x00, /* Sec. 7.28: Mandatory */ - kSCSICmd_WRITE_BUFFER = 0x3B /* Sec. 7.29: Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x00 SBC Direct Access Commands -/* Commands defined by the T10:990-D SCSI-3 Block Commands (SBC) command - * specification. The definitions and section numbers are based on section 6.1 - * of the revision 8c, 13 November 1997 version of the specification. - */ -#if 0 -enum -{ - kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ - kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ - kSCSICmd_COPY = 0x18, /* SPC: Optional */ - kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional*/ - kSCSICmd_FORMAT_UNIT = 0x04, /* Sec. 6.1.1: Mandatory */ - kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ - kSCSICmd_LOCK_UNLOCK_CACHE = 0x36, /* Sec. 6.1.2: Optional */ - kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ - kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Optional */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Optional */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ - kSCSICmd_MOVE_MEDIUM_ATTACHED = 0xA7, /* SMC: Optional */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* SPC: Optional */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* SPC: Optional */ - kSCSICmd_PREFETCH = 0x34, /* Sec. 6.1.3: Optional */ - kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* SPC: Optional */ - kSCSICmd_READ_6 = 0x08, /* Sec. 6.1.4: Mandatory */ - kSCSICmd_READ_10 = 0x28, /* Sec. 6.1.5: Mandatory */ - kSCSICmd_READ_12 = 0xA8, /* Sec. 6.2.4: Optional */ - kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ - kSCSICmd_READ_CAPACITY = 0x25, /* Sec. 6.1.6: Mandatory */ - kSCSICmd_READ_DEFECT_DATA_10 = 0x37, /* Sec. 6.1.7: Optional */ - kSCSICmd_READ_DEFECT_DATA_12 = 0xB7, /* Sec. 6.2.5: Optional */ - kSCSICmd_READ_ELEMENT_STATUS_ATTACHED = 0xB4, /* SMC: Optional */ - kSCSICmd_READ_GENERATION = 0x29, /* Sec. 6.2.6: Optional */ - kSCSICmd_READ_LONG = 0x3E, /* Sec. 6.1.8: Optional */ - kSCSICmd_READ_UPDATED_BLOCK_10 = 0x2D, /* Sec. 6.2.7: Optional */ - kSCSICmd_REASSIGN_BLOCKS = 0x07, /* Sec. 6.1.9: Optional */ - kSCSICmd_REBUILD = 0x81, /* Sec. 6.1.10: Optional */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ - kSCSICmd_REGENERATE = 0x82, /* Sec. 6.1.11: Optional */ - kSCSICmd_RELEASE_6 = 0x17, /* SPC: Optional */ - kSCSICmd_RELEASE_10 = 0x57, /* SPC: Mandatory */ - kSCSICmd_REPORT_LUNS = 0xA0, /* SPC: Optional */ - kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ - kSCSICmd_RESERVE_6 = 0x16, /* SPC: Optional */ - kSCSICmd_RESERVE_10 = 0x56, /* SPC: Mandatory */ - kSCSICmd_REZERO_UNIT = 0x01, /* Obsolete */ - kSCSICmd_SEARCH_DATA_EQUAL_10 = 0x31, /* Obsolete */ - kSCSICmd_SEARCH_DATA_HIGH_10 = 0x30, /* Obsolete */ - kSCSICmd_SEARCH_DATA_LOW_10 = 0x32, /* Obsolete */ - kSCSICmd_SEEK_6 = 0x0B, /* Obsolete */ - kSCSICmd_SEEK_10 = 0x2B, /* Sec. 6.1.12: Optional */ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ - kSCSICmd_SET_LIMITS_10 = 0x33, /* Sec. 6.1.13: Optional */ - kSCSICmd_SET_LIMITS_12 = 0xB3, /* Sec. 6.2.8: Optional */ - kSCSICmd_START_STOP_UNIT = 0x1B, /* Sec. 6.1.14: Optional */ - kSCSICmd_SYNCHRONIZE_CACHE = 0x35, /* Sec. 6.1.15: Optional */ - kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ - kSCSICmd_UPDATE_BLOCK = 0x3D, /* Sec. 6.2.9: Optional */ - kSCSICmd_VERIFY_10 = 0x2F, /* Sec. 6.1.16: Optional */ - kSCSICmd_WRITE_6 = 0x0A, /* Sec. 6.1.17: Optional */ - kSCSICmd_WRITE_10 = 0x2A, /* Sec. 6.1.18: Optional */ - kSCSICmd_WRITE_12 = 0xAA, /* Sec. 6.2.13: Optional */ - kSCSICmd_WRITE_AND_VERIFY_10 = 0x2E, /* Sec. 6.1.19: Optional */ - kSCSICmd_WRITE_AND_VERIFY_12 = 0xAE, /* Sec. 6.2.15: Optional */ - kSCSICmd_WRITE_BUFFER = 0x3B, /* SPC: Optional */ - kSCSICmd_WRITE_LONG = 0x3F, /* Sec. 6.1.20: Optional */ - kSCSICmd_WRITE_SAME = 0x41, /* Sec. 6.1.21: Optional */ - kSCSICmd_XDREAD = 0x52, /* Sec. 6.1.22: Optional */ - kSCSICmd_XDWRITE = 0x50, /* Sec. 6.1.23: Optional */ - kSCSICmd_XDWRITE_EXTENDED = 0x80, /* Sec. 6.1.24: Optional */ - kSCSICmd_XPWRITE = 0x51 /* Sec. 6.1.25: Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x01 SSC Sequential Access Commands -/* Commands defined by the T10:997-D SCSI-3 Stream Commands (SSC) command - * specification. The definitions and section numbers are based on section 5 - * of the revision 22, January 1, 2000 version of the specification. - */ -#if 0 -enum -{ - kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ - kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ - kSCSICmd_COPY = 0x18, /* SPC: Optional */ - kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional */ - kSCSICmd_ERASE = 0x19, /* Sec. 5.3.1: Mandatory */ - kSCSICmd_FORMAT_MEDIUM = 0x04, /* Sec. 5.3.2: Optional */ - kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ - kSCSICmd_LOAD_UNLOAD = 0x1B, /* Sec. 5.3.3: Optional */ - kSCSICmd_LOCATE = 0x2B, /* Sec. 5.3.4: Optional */ - kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ - kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Mandatory */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Mandatory */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ - kSCSICmd_MOVE_MEDIUM = 0xA5, /* SMC: Optional */ - kSCSICmd_MOVE_MEDIUM_ATTACHED = 0xA7, /* SMC: Optional */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* SPC: Optional */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* SPC: Optional */ - kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* SPC: Optional */ - kSCSICmd_READ_6 = 0x08, /* Sec. 5.3.5: Mandatory */ - kSCSICmd_READ_BLOCK_LIMITS = 0x05, /* Sec. 5.3.6: Mandatory */ - kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ - kSCSICmd_READ_ELEMENT_STATUS = 0xB8, /* SMC: Optional */ - kSCSICmd_READ_ELEMENT_STATUS_ATTACHED = 0xB4, /* SMC: Optional */ - kSCSICmd_READ_POSITION = 0x34, /* Sec. 5.3.7: Mandatory */ - kSCSICmd_READ_REVERSE = 0x0F, /* Sec. 5.3.8: Optional */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ - kSCSICmd_RECOVER_BUFFERED_DATA = 0x14, /* Sec. 5.3.9: Optional */ - kSCSICmd_RELEASE_6 = 0x17, /* SPC: Mandatory */ - kSCSICmd_RELEASE_10 = 0x57, /* SPC: Mandatory */ - kSCSICmd_REPORT_DENSITY_SUPPORT = 0x44, /* Sec. 5.3.10: Mandatory*/ - kSCSICmd_REPORT_LUNS = 0xA0, /* SPC: Mandatory */ - kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ - kSCSICmd_RESERVE_6 = 0x16, /* SPC: Mandatory */ - kSCSICmd_RESERVE_10 = 0x56, /* SPC: Mandatory */ - kSCSICmd_REWIND = 0x01, /* Sec. 5.3.11: Mandatory*/ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ - kSCSICmd_SPACE = 0x11, /* Sec. 5.3.12: Mandatory*/ - kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ - kSCSICmd_VERIFY_6 = 0x13, /* Sec. 5.3.13: Optional */ - kSCSICmd_WRITE_6 = 0x0A, /* Sec. 5.3.14: Mandatory*/ - kSCSICmd_WRITE_BUFFER = 0x3B, /* SPC: Optional */ - kSCSICmd_WRITE_FILEMARKS = 0x10 /* Sec. 5.3.15: Mandatory*/ -}; -#endif - -#pragma mark - -#pragma mark 0x02 SSC Printer Commands -/* Commands defined by the T10:997-D SCSI-3 Stream Commands (SSC) command - * specification. The definitions and section numbers are based on section 6 - * of the revision 22, January 1, 2000 version of the specification. - */ -#if 0 -enum -{ - kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ - kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ - kSCSICmd_COPY = 0x18, /* SPC: Optional */ - kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional */ - kSCSICmd_FORMAT = 0x04, /* Sec. 6.2.1: Optional */ - kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ - kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ - kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Mandatory */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Mandatory */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* SPC: Optional */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* SPC: Optional */ - kSCSICmd_PRINT = 0x0A, /* Sec. 6.2.2: Mandatory */ - kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ - kSCSICmd_RECOVER_BUFFERED_DATA = 0x14, /* Sec. 6.2.3: Optional */ - kSCSICmd_RELEASE_6 = 0x17, /* SPC: Mandatory */ - kSCSICmd_RELEASE_10 = 0x57, /* SPC: Mandatory */ - kSCSICmd_REPORT_LUNS = 0xA0, /* SPC: Mandatory */ - kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ - kSCSICmd_RESERVE_6 = 0x16, /* SPC: Mandatory */ - kSCSICmd_RESERVE_10 = 0x56, /* SPC: Mandatory */ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ - kSCSICmd_SLEW_AND_PRINT = 0x0B, /* Sec. 6.2.4: Optional */ - kSCSICmd_STOP_PRINT = 0x1B, /* Sec. 6.2.5: Optional */ - kSCSICmd_SYNCHRONIZE_BUFFER = 0x10, /* Sec. 6.2.6: Optional */ - kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ - kSCSICmd_WRITE_BUFFER = 0x3B /* SPC: Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x03 SPC Processor Commands -/* Commands defined by the T10:1236-D SCSI Primary Commands-2 (SPC-2) - * command specification. The definitions and section numbers are based on - * section 9 of the revision 18, 21 May 2000 version of the specification. - */ -#if 0 -enum -{ - kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ - kSCSICmd_COMPARE = 0x39, /* Sec. 7.2: Optional */ - kSCSICmd_COPY = 0x18, /* Sec. 7.3: Optional */ - kSCSICmd_COPY_AND_VERIFY = 0x3A, /* Sec. 7.4: Optional */ - kSCSICmd_EXTENDED_COPY = 0x83, /* Sec. 7.5: Optional */ - kSCSICmd_INQUIRY = 0x12, /* Sec. 7.6: Mandatory */ - kSCSICmd_LOG_SELECT = 0x4C, /* Sec. 7.7: Optional */ - kSCSICmd_LOG_SENSE = 0x4D, /* Sec. 7.8: Optional */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Sec. 7.13: Optional */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Sec. 7.14: Optional */ - kSCSICmd_READ_BUFFER = 0x3C, /* Sec. 7.16: Optional */ - kSCSICmd_RECEIVE = 0x08, /* Sec. 9.2: Optional */ - kSCSICmd_RECEIVE_COPY_RESULTS = 0x84, /* Sec. 7.17: Optional */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* Sec. 7.18: Optional */ - kSCSICmd_RELEASE_10 = 0x57, /* Sec. 7.19: Optional */ - kSCSICmd_RELEASE_6 = 0x17, /* Sec. 7.20: Optional */ - kSCSICmd_REPORT_LUNS = 0xA0, /* Sec. 7.22: Optional */ - kSCSICmd_REQUEST_SENSE = 0x03, /* Sec. 7.23: Mandatory */ - kSCSICmd_RESERVE_10 = 0x56, /* Sec. 7.24: Optional */ - kSCSICmd_RESERVE_6 = 0x16, /* Sec. 7.25: Optional */ - kSCSICmd_SEND = 0x0A, /* Sec. 9.3: Optional */ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* Sec. 7.26: Mandatory */ - kSCSICmd_TEST_UNIT_READY = 0x00, /* Sec. 7.27: Mandatory */ - kSCSICmd_WRITE_BUFFER = 0x3B /* Sec. 7.29: Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x04 SBC Write Once Commands -/* Commands defined by the T10:990-D SCSI-3 Block Commands (SBC) command - * specification. The definitions and section numbers are based on section 6.3 - * of the revision 8c, 13 November 1997 version of the specification. - */ -#if 0 -enum -{ - kSCSICmd_CHANGE_DEFINITION = 0x40, /* SPC: Optional */ - kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ - kSCSICmd_COPY = 0x18, /* SPC: Optional */ - kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional*/ - kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ - kSCSICmd_LOCK_UNLOCK_CACHE = 0x36, /* Sec. 6.1.2: Optional */ - kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ - kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ - kSCSICmd_MEDIUM_SCAN = 0x38, /* Sec. 6.2.3: Optional */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Optional */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Optional */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ - kSCSICmd_MOVE_MEDIUM = 0xA5, /* SMC: Optional */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* SPC: Optional */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* SPC: Optional */ - kSCSICmd_PREFETCH = 0x34, /* Sec. 6.1.3: Optional */ - kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* SPC: Optional */ - kSCSICmd_READ_6 = 0x08, /* Sec. 6.1.4: Optional */ - kSCSICmd_READ_10 = 0x28, /* Sec. 6.1.5: Mandatory */ - kSCSICmd_READ_12 = 0xA8, /* Sec. 6.2.4: Optional */ - kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ - kSCSICmd_READ_CAPACITY = 0x25, /* Sec. 6.1.6: Mandatory */ - kSCSICmd_READ_ELEMENT_STATUS = 0xB8, /* SMC: Optional */ - kSCSICmd_READ_LONG = 0x3E, /* Sec. 6.1.8: Optional */ - kSCSICmd_REASSIGN_BLOCKS = 0x07, /* Sec. 6.1.9: Optional */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ - kSCSICmd_RELEASE_6 = 0x17, /* SPC: Optional */ - kSCSICmd_RELEASE_10 = 0x57, /* SPC: Mandatory */ - kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ - kSCSICmd_RESERVE_6 = 0x16, /* SPC: Optional */ - kSCSICmd_RESERVE_10 = 0x56, /* SPC: Mandatory */ - kSCSICmd_REZERO_UNIT = 0x01, /* Obsolete */ - kSCSICmd_SEARCH_DATA_EQUAL_10 = 0x31, /* Obsolete */ - kSCSICmd_SEARCH_DATA_EQUAL_12 = 0xB1, /* Obsolete */ - kSCSICmd_SEARCH_DATA_HIGH_10 = 0x30, /* Obsolete */ - kSCSICmd_SEARCH_DATA_HIGH_12 = 0xB0, /* Obsolete */ - kSCSICmd_SEARCH_DATA_LOW_10 = 0x32, /* Obsolete */ - kSCSICmd_SEARCH_DATA_LOW_12 = 0xB2, /* Obsolete */ - kSCSICmd_SEEK_6 = 0x0B, /* Obsolete */ - kSCSICmd_SEEK_10 = 0x2B, /* Sec. 6.1.12: Optional */ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ - kSCSICmd_SET_LIMITS_10 = 0x33, /* Sec. 6.1.13: Optional */ - kSCSICmd_SET_LIMITS_12 = 0xB3, /* Sec. 6.2.8: Optional */ - kSCSICmd_START_STOP_UNIT = 0x1B, /* Sec. 6.1.14: Optional */ - kSCSICmd_SYNCHRONIZE_CACHE = 0x35, /* Sec. 6.1.15: Optional */ - kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ - kSCSICmd_VERIFY_10 = 0x2F, /* Sec. 6.2.10: Optional */ - kSCSICmd_VERIFY_12 = 0xAF, /* Sec. 6.2.11: Optional */ - kSCSICmd_WRITE_6 = 0x0A, /* Sec. 6.1.17: Optional */ - kSCSICmd_WRITE_10 = 0x2A, /* Sec. 6.2.10: Mandatory*/ - kSCSICmd_WRITE_12 = 0xAA, /* Sec. 6.2.13: Optional */ - kSCSICmd_WRITE_AND_VERIFY_10 = 0x2E, /* Sec. 6.2.14: Optional */ - kSCSICmd_WRITE_AND_VERIFY_12 = 0xAE, /* Sec. 6.2.15: Optional */ - kSCSICmd_WRITE_BUFFER = 0x3B, /* SPC: Optional */ - kSCSICmd_WRITE_LONG = 0x3F /* Sec. 6.1.20: Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x05 MMC CD-ROM Commands -/* Commands defined by the T10:1363-D SCSI Multimedia Commands-3 (MMC-3) - * specification. The definitions and section numbers are based on section 6.1 - * of the revision 01, March 03, 2000 version of the specification. - * - * NOTE: The comments following each command may not be accurate. These are - * not from the MMC-3 specification, but have been derived from the SCSI-2 and - * original MMC specifications. Unlike the other SCSI command specifications, - * MMC-2 and MMC-3 do not provide a command requirement type and therefore does - * not relist the SPC commands with these requirements as they apply to MMC - * devices. The MMC-2 and MMC-3 specifications also refer back to the SBC - * specification which seems invalid since MMC devices do not represent a - * Peripheral Device Type defined by SBC. It is assumed that the SBC - * references refer to the Peripheral Device Type 0x00 - Direct Access Commands - * definitions from that specification. - */ -#if 0 -enum -{ - kSCSICmd_BLANK = 0xA1, /* Sec. 6.1.1: */ - kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ - kSCSICmd_CLOSE_TRACK_SESSION = 0x5B, /* Sec. 6.1.2: */ - kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ - kSCSICmd_COPY = 0x18, /* SPC: Optional */ - kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional */ - kSCSICmd_ERASE = 0x2C, /* SBC: */ - kSCSICmd_FORMAT_UNIT = 0x04, /* Sec. 6.1.3: */ - kSCSICmd_GET_CONFIGURATION = 0x46, /* Sec. 6.1.4: */ - kSCSICmd_GET_EVENT_STATUS_NOTIFICATION = 0x4A, /* Sec. 6.1.5: */ - kSCSICmd_GET_PERFORMANCE = 0xAC, /* Sec. 6.1.6: */ - kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ - kSCSICmd_LOAD_UNLOAD_MEDIUM = 0xA6, /* Sec. 6.1.7: */ - kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ - kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ - kSCSICmd_MECHANISM_STATUS = 0xBD, /* Sec. 6.1.8: */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Mandatory */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Mandatory */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Mandatory */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Mandatory */ - kSCSICmd_PAUSE_RESUME = 0x4B, /* Sec. 6.1.9: */ - kSCSICmd_PLAY_AUDIO_10 = 0x45, /* Sec. 6.1.10: */ - kSCSICmd_PLAY_AUDIO_12 = 0xA5, /* Sec. 6.1.11: */ - kSCSICmd_PLAY_AUDIO_MSF = 0x47, /* Sec. 6.1.12: */ - kSCSICmd_PLAY_AUDIO_TRACK_INDEX = 0x48, /* Obsolete */ - kSCSICmd_PLAY_CD = 0xBC, /* Sec. 6.1.13: */ - kSCSICmd_PLAY_RELATIVE_10 = 0x49, /* Obsolete */ - kSCSICmd_PLAY_RELATIVE_12 = 0xA9, /* Obsolete */ - kSCSICmd_PREFETCH = 0x34, /* Optional */ - kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* Optional */ - kSCSICmd_READ_6 = 0x08, /* Optional */ - kSCSICmd_READ_10 = 0x28, /* Mandatory */ - kSCSICmd_READ_12 = 0xA8, /* Optional */ - kSCSICmd_READ_BUFFER = 0x3C, /* Optional */ - kSCSICmd_READ_BUFFER_CAPACITY = 0x5C, /* Sec. 6.1.15: */ - kSCSICmd_READ_CD = 0xBE, /* Sec. 6.1.16: */ - kSCSICmd_READ_CD_MSF = 0xB9, /* Sec. 6.1.17: */ - kSCSICmd_READ_CAPACITY = 0x25, /* Sec. 6.1.18: */ - kSCSICmd_READ_DISC_INFORMATION = 0x51, /* Sec. 6.1.19: */ - kSCSICmd_READ_DVD_STRUCTURE = 0xAD, /* Sec. 6.1.20: */ - kSCSICmd_READ_DISC_STRUCTURE = 0xAD, /* Sec. 6.1.20: */ - kSCSICmd_READ_FORMAT_CAPACITIES = 0x23, /* Sec. 6.1.21: */ - kSCSICmd_READ_HEADER = 0x44, /* Sec. 6.1.22: */ - kSCSICmd_READ_LONG = 0x3E, /* Optional */ - kSCSICmd_READ_MASTER_CUE = 0x59, /* Sec. 6.1.23: */ - kSCSICmd_READ_SUB_CHANNEL = 0x42, /* Sec. 6.1.24: */ - kSCSICmd_READ_TOC_PMA_ATIP = 0x43, /* Sec. 6.1.25: */ - kSCSICmd_READ_TRACK_INFORMATION = 0x52, /* Sec. 6.1.27: */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* Optional */ - kSCSICmd_RELEASE_6 = 0x17, /* Mandatory */ - kSCSICmd_RELEASE_10 = 0x57, /* Optional */ - kSCSICmd_REPAIR_TRACK = 0x58, /* Sec. 6.1.28: */ - kSCSICmd_REPORT_KEY = 0xA4, /* Sec. 6.1.29: */ - kSCSICmd_REQUEST_SENSE = 0x03, /* Mandatory */ - kSCSICmd_RESERVE_6 = 0x16, /* Mandatory */ - kSCSICmd_RESERVE_10 = 0x56, /* Optional */ - kSCSICmd_RESERVE_TRACK = 0x53, /* Sec. 6.1.30: */ - kSCSICmd_SCAN_MMC = 0xBA, /* Sec. 6.1.31: */ - kSCSICmd_SEARCH_DATA_EQUAL_10 = 0x31, /* Obsolete */ - kSCSICmd_SEARCH_DATA_EQUAL_12 = 0xB1, /* Obsolete */ - kSCSICmd_SEARCH_DATA_HIGH_10 = 0x30, /* Obsolete */ - kSCSICmd_SEARCH_DATA_HIGH_12 = 0xB0, /* Obsolete */ - kSCSICmd_SEARCH_DATA_LOW_10 = 0x32, /* Obsolete */ - kSCSICmd_SEARCH_DATA_LOW_12 = 0xB2, /* Obsolete */ - kSCSICmd_SEEK_6 = 0x0B, /* Obsolete */ - kSCSICmd_SEEK_10 = 0x2B, /* SBC: */ - kSCSICmd_SEND_CUE_SHEET = 0x5D, /* Sec. 6.1.32: */ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* Mandatory */ - kSCSICmd_SEND_DVD_STRUCTURE = 0xBF, /* Sec. 6.1.33: */ - kSCSICmd_SEND_EVENT = 0xA2, /* Sec. 6.1.34: */ - kSCSICmd_SEND_KEY = 0xA3, /* Sec. 6.1.35: */ - kSCSICmd_SEND_OPC_INFORMATION = 0x54, /* Sec. 6.1.36: */ - kSCSICmd_SET_CD_SPEED = 0xBB, /* Sec. 6.1.37: */ - kSCSICmd_SET_LIMITS_10 = 0x33, /* Optional */ - kSCSICmd_SET_LIMITS_12 = 0xB3, /* Optional */ - kSCSICmd_SET_READ_AHEAD = 0xA7, /* Sec. 6.1.38: */ - kSCSICmd_SET_STREAMING = 0xB6, /* Sec. 6.1.39: */ - kSCSICmd_START_STOP_UNIT = 0x1B, /* Optional */ - kSCSICmd_STOP_PLAY_SCAN = 0x4E, /* Sec. 6.1.40: */ - kSCSICmd_SYNCHRONIZE_CACHE = 0x35, /* Sec. 6.1.41: */ - kSCSICmd_TEST_UNIT_READY = 0x00, /* Mandatory */ - kSCSICmd_VERIFY_10 = 0x2F, /* Optional */ - kSCSICmd_VERIFY_12 = 0xAF, /* Optional */ - kSCSICmd_WRITE_10 = 0x2A, /* Sec. 6.1.42: */ - kSCSICmd_WRITE_12 = 0xAA, /* Sec. 6.1.43: */ - kSCSICmd_WRITE_AND_VERIFY_10 = 0x2E, /* Sec. 6.1.44: */ - kSCSICmd_WRITE_BUFFER = 0x3B /* Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x06 SGC Scanner Commands -/* Commands defined by the T10:998-D SCSI-3 Graphics Commands (SGC) - * specification. The definitions and section numbers are based on section 6 - * of the revision 0, April 1995 version of the specification. - */ -#if 0 -enum -{ - kSCSICmd_CHANGE_DEFINITION = 0x40, /* SPC: Optional */ - kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ - kSCSICmd_COPY = 0x18, /* SPC: Optional */ - kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional */ - kSCSICmd_GET_DATA_BUFFER_STATUS = 0x34, /* Sec. 6.1.1: Optional */ - kSCSICmd_GET_WINDOW = 0x25, /* Sec. 6.1.2: Optional */ - kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ - kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ - kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Optional */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Optional */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ - kSCSICmd_OBJECT_POSITION = 0x31, /* Sec. 6.1.3: Optional */ - kSCSICmd_PORT_STATUS = 0x11, /* SPC (??): Mandatory - * for dual port devices */ - kSCSICmd_READ = 0x28, /* Sec. 6.1.4: Mandatory */ - kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ - kSCSICmd_RELEASE_6 = 0x17, /* SPC: Mandatory */ - kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ - kSCSICmd_RESERVE_6 = 0x16, /* SPC: Mandatory */ - kSCSICmd_SCAN = 0x1B, /* Sec. 6.1.5: Optional */ - kSCSICmd_SEND = 0x1B, /* Sec. 6.1.6: Optional */ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ - kSCSICmd_SET_WINDOW = 0x24, /* Sec. 6.1.7: Mandatory */ - kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ - kSCSICmd_WRITE_BUFFER = 0x3B /* SPC: Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x07 SBC Optical Media Commands -/* Commands defined by the T10:990-D SCSI-3 Block Commands (SBC) - * (revision 8c, 13 November 1998) command specification. - */ - -#pragma mark - -#pragma mark 0x08 SMC Medium Changer Commands -/* Commands defined by the T10:1228-D SCSI-3 Medium Changer Commands-2 (SMC-2) - * (revision 0, March 16, 2000) command specification. - */ -#if 0 -enum -{ - /* Commands For Independent Medium Changers */ - kSCSICmd_EXCHANGE_MEDIUM = 0xA6, /* Optional */ - kSCSICmd_INITIALIZE_ELEMENT_STATUS = 0x07, /* Optional */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* Optional */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* Optional */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* Optional */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* Optional */ - kSCSICmd_MOVE_MEDIUM = 0xA5, /* Mandatory */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Optional */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Optional */ - kSCSICmd_POSITION_TO_ELEMENT = 0x2B, /* Optional */ - kSCSICmd_READ_ELEMENT_STATUS = 0xB8, /* Mandatory */ - kSCSICmd_RELEASE_ELEMENT_6 = 0x16, /* Optional */ - kSCSICmd_RELEASE_ELEMENT_10 = 0x56, /* Optional */ - kSCSICmd_REQUEST_VOLUME_ELEMENT_ADDRESS = 0xB5, /* Optional */ - kSCSICmd_REQUEST_SENSE = 0x03, /* Mandatory */ - kSCSICmd_RESERVE_ELEMENT_6 = 0x16, /* Optional */ - kSCSICmd_RESERVE_ELEMENT_10 = 0x56 /* Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x09 SSC Communications Commands -/* Commands defined by the T10:997-D SCSI-3 Stream Commands (SSC) - * (revision 22, January 1, 2000) command specification. - */ - -#pragma mark - -#pragma mark 0x0A ASC IT8 Prepress Commands -#pragma mark 0x0B ASC IT8 Prepress Commands -/* Commands defined by the ASC IT8 <title goes here> specification - * (revision xx, month day, year) command specification. - */ -#if 0 -enum -{ -}; -#endif - -#pragma mark - -#pragma mark 0x0C SCC Array Controller Commands -/* Commands defined by the ANSI NCITS.318-199x SCSI Controller - * Commands (SCC-2) ratified command specification. - */ -#if 0 -enum -{ - kSCSICmd_MAINTENANCE_IN = 0xA3, /* Mandatory */ - kSCSICmd_MAINTENANCE_OUT = 0xA4, /* Optional */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* Optional */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* Optional */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* Optional */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* Optional */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Optional */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Optional */ - kSCSICmd_PORT_STATUS = 0x1F, /* Optional */ - kSCSICmd_REDUNDANCY_GROUP_IN = 0xBA, /* Mandatory */ - kSCSICmd_REDUNDANCY_GROUP_OUT = 0xBB, /* Optional */ - kSCSICmd_RELEASE_6 = 0x17, /* Optional */ - kSCSICmd_RELEASE_10 = 0x57, /* Optional */ - kSCSICmd_REPORT_LUNS = 0xA0, /* Mandatory */ - kSCSICmd_REQUEST_SENSE = 0x03, /* Mandatory */ - kSCSICmd_RESERVE_6 = 0x16, /* Optional */ - kSCSICmd_RESERVE_10 = 0x56, /* Optional*/ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* Optional */ - kSCSICmd_SPARE_IN = 0xBC, /* Mandatory */ - kSCSICmd_SPARE_OUT = 0xBD /* Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x0D SES Enclosure Services Commands -/* Commands defined by the T10:1212-D SCSI-3 Enclosure Services (SES) - * (revision 8b, February 11, 1998) command specification. - */ -#if 0 -enum -{ - kSCSICmd_MODE_SELECT_6 = 0x15, /* Optional */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* Optional */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* Optional */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* Optional */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Optional */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Optional */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x17, /* Mandatory */ - kSCSICmd_RELEASE_6 = 0x17, /* Optional */ - kSCSICmd_RELEASE_10 = 0x57, /* Optional */ - kSCSICmd_REQUEST_SENSE = 0x03, /* Mandatory */ - kSCSICmd_RESERVE_6 = 0x16, /* Optional */ - kSCSICmd_RESERVE_10 = 0x56, /* Optional */ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D /* Mandatory */ -}; -#endif - -#pragma mark - -#pragma mark 0x0E RBC Reduced Block Commands -/* Commands defined by the T10:1240-D Reduced Block Commands (RBC) - * (revision 10a, August 18, 1999) command specification. - */ -#if 0 -enum -{ - kSCSICmd_FORMAT_UNIT = 0x04, /* Optional */ - kSCSICmd_READ_10 = 0x28, /* Mandatory */ - kSCSICmd_READ_CAPACITY = 0x25, /* Mandatory */ - kSCSICmd_START_STOP_UNIT = 0x1B, /* Mandatory */ - kSCSICmd_SYNCHRONIZE_CACHE = 0x35, /* Optional */ - kSCSICmd_VERIFY_10 = 0x2F, /* Mandatory */ - kSCSICmd_WRITE_10 = 0x2A, /* Mandatory */ - kSCSICmd_WRITE_BUFFER = 0x3B /* Mandatory for fixed media - * Optional for removable */ -}; -#endif - -#pragma mark - -#pragma mark 0x0F OCRW Optical Card Commands -/* Commands defined by the ISO/IEC 14776-381 SCSI Specification for - * Optical Card Reader/Writer (OCRW) ratified command specification. - */ -#if 0 -enum -{ -}; -#endif - -#pragma mark - -#pragma mark 0x11 OSD Object-based Storage Commands -/* Commands defined by the T10:1355-D Object-based Storage Commands (OSD) - * (revision 1, 18 May 2000) command specification. - */ -#if 0 -enum -{ -}; -#endif - -#pragma mark - -#pragma mark 0x15 RMC Simplified Multimedia Commands -/* Commands defined by the T10:1364-D Reduced Multimedia Commands (RMC) - * (revision 1, November 11, 1999) command specification. - */ -#if 0 -enum -{ -}; -#endif - -#endif /* _SCSI_COMMAND_OPERATION_CODES_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSIPort.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSIPort.h.svn-base deleted file mode 100644 index 8eefbeb..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/SCSIPort.h.svn-base +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2004-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_SCSI_PORTS_H_ -#define _IOKIT_SCSI_PORTS_H_ - - -/*! @header SCSIPort - @discussion - This file contains all the definitions for SCSIPort notifications and status. -*/ - - -/*! -@enum kSCSIPort_NotificationStatusChange -@discussion -Message definition to be used with the messageClients -call to inform of a change in port status. -*/ -enum -{ - kSCSIPort_NotificationStatusChange = 0x68000001 -}; - - -/*! @typedef SCSIPortStatus - @abstract 32-bit number to represent a SCSIPortStatus. - @discussion Type for SCSIPortStatus. -*/ - -typedef UInt32 SCSIPortStatus; - -/*! @enum SCSI Port Status Values - @discussion Definitions for the possible port status values -*/ -enum -{ - /*! - @constant kSCSIPort_StatusOnline - The port is online. - */ - kSCSIPort_StatusOnline = 0, - - /*! - @constant kSCSIPort_StatusOffline - The port is offline (e.g. unplugged cable). - */ - kSCSIPort_StatusOffline = 1, - - /*! - @constant kSCSIPort_StatusFailure - Driver has detected unrecoverable port failure (e.g. hardware port failure) - */ - kSCSIPort_StatusFailure = 2 -}; - -#endif /* _IOKIT_SCSI_PORTS_H_ */ diff --git a/i386/include/IOKit/scsi/.svn/text-base/SCSITask.h.svn-base b/i386/include/IOKit/scsi/.svn/text-base/SCSITask.h.svn-base deleted file mode 100644 index 154c187..0000000 --- a/i386/include/IOKit/scsi/.svn/text-base/SCSITask.h.svn-base +++ /dev/null @@ -1,456 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_SCSI_TASK_H_ -#define _IOKIT_SCSI_TASK_H_ - - -#if KERNEL -#include <IOKit/IOTypes.h> -#else -#include <CoreFoundation/CoreFoundation.h> -#endif - - -/*! @header SCSITask -SCSITask typedefs and constants used inside the kernel and user space. - -Note that the SCSITaskIdentifier is an opaque object and that directly -casting the SCSITaskIdentifier to any other type is discouraged. The SCSITask -implementation changes when necessary to accomodate architectural changes, -performance improvements, and bug fixes. - -Device and protocol layer drivers that need to access information -contained in a SCSITask should use the appropriate accessor methods in -IOSCSIPrimaryCommandsDevice.h or IOSCSIProtocolServices.h -*/ - - -/*! @typedef SCSIDeviceIdentifier - @abstract 64-bit number to represent a SCSI Device. - @discussion If the identifier can either be that of an initiator or a target, - SCSIDeviceIdentifier should be used. -*/ - -typedef UInt64 SCSIDeviceIdentifier; - -/*! @typedef SCSITargetIdentifier - @abstract 64-bit number to represent a SCSI Target Device. - @discussion If the identifier is for a target only and not an initiator, then - SCSITargetIdentifier should be used. -*/ - -typedef SCSIDeviceIdentifier SCSITargetIdentifier; - -/*! @typedef SCSIInitiatorIdentifier - @abstract 64-bit number to represent a SCSI Initiator Device. - @discussion If the identifier is for an initiator only and not a target, then - SCSIInitiatorIdentifier should be used. -*/ - -typedef SCSIDeviceIdentifier SCSIInitiatorIdentifier; - -/*! @typedef SCSILogicalUnitNumber - @abstract 64-bit number to represent a logical unit. - @discussion 64-bit number to represent a logical unit. -*/ - -typedef UInt64 SCSILogicalUnitNumber; - -/*! @typedef SCSITaggedTaskIdentifier - @abstract 64-bit number to represent a unique task identifier. - @discussion The Tagged Task Identifier is used when a Task has a Task Attribute other - than SIMPLE. The SCSI Application Layer client that controls the Logical - Unit for which a Task is intended is required to guarantee that the Task - Tag Identifier is unique. Zero cannot be used a a Tag value as this is used - to when a Tagged Task Identifier value is needed for a Task with a SIMPLE - attribute. -*/ - -typedef UInt64 SCSITaggedTaskIdentifier; - -/*! - @enum Untagged Task Identifier - @discussion The Untagged Task Identifier is used to indicate no unique tag - is associated with the Task. - @constant kSCSIUntaggedTaskIdentifier This value means the task is untagged. - */ - -enum -{ - kSCSIUntaggedTaskIdentifier = 0 -}; - -/*! - @typedef SCSITaskAttribute - @abstract Attributes for task delivery. - @discussion The Task Attribute defines how this task should be managed - when determing order for queueing and submission to the - appropriate device server. The Task Attribute is set by the SCSI - Application Layer and cannot be modified by the SCSI Protocol Layer. - @constant kSCSITask_SIMPLE The task has a simple attribute. - @constant kSCSITask_ORDERED The task has an ordered attribute. - @constant kSCSITask_HEAD_OF_QUEUE The task has a head-of-queue attribute. - @constant kSCSITask_ACA The task has an auto-contingent-allegiance attribute. - */ - -typedef enum SCSITaskAttribute -{ - kSCSITask_SIMPLE = 0, - kSCSITask_ORDERED = 1, - kSCSITask_HEAD_OF_QUEUE = 2, - kSCSITask_ACA = 3 -} SCSITaskAttribute; - -/*! - @typedef SCSITaskState - @abstract Attributes for task state. - @discussion The Task State represents the current state of the task. - The state is set to NEW_TASK when the task is created. The SCSI Protocol - Layer will then adjust the state as the task is queued and during - execution. The SCSI Application Layer can examine the state to monitor - the progress of a task. The Task State can only be modified by the SCSI - Protocol Layer. The SCSI Application Layer can only read the state. - @constant kSCSITaskState_NEW_TASK The task state is new task. - @constant kSCSITaskState_ENABLED The task is enabled and queued. - @constant kSCSITaskState_BLOCKED The task is blocked. - @constant kSCSITaskState_DORMANT The task is dormant. - @constant kSCSITaskState_ENDED The task is complete. - */ - -typedef enum SCSITaskState -{ - kSCSITaskState_NEW_TASK = 0, - kSCSITaskState_ENABLED = 1, - kSCSITaskState_BLOCKED = 2, - kSCSITaskState_DORMANT = 3, - kSCSITaskState_ENDED = 4 -} SCSITaskState; - - -/*! - @typedef SCSIServiceResponse - @abstract Attributes for task service response. - @discussion The Service Response represents the execution status of - a service request made to a Protocol Services Driver. The Service - Response can only be modified by the SCSI Protocol Layer. The SCSI - Application Layer can only read the state. - */ - -typedef enum SCSIServiceResponse -{ - /*! - @constant kSCSIServiceResponse_Request_In_Process - Not defined in SAM specification, but is a service response used - for asynchronous commands that are not yet completed. - */ - kSCSIServiceResponse_Request_In_Process = 0, - - /*! - @constant kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE - The service request failed because of a delivery or target failure. - */ - kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE = 1, - - /*! - @constant kSCSIServiceResponse_TASK_COMPLETE - The task completed. - */ - kSCSIServiceResponse_TASK_COMPLETE = 2, - - /*! - @constant kSCSIServiceResponse_LINK_COMMAND_COMPLETE - The linked command completed. - */ - kSCSIServiceResponse_LINK_COMMAND_COMPLETE = 3, - - /*! - @constant kSCSIServiceResponse_FUNCTION_COMPLETE - The task management function completed. - */ - kSCSIServiceResponse_FUNCTION_COMPLETE = 4, - - /*! - @constant kSCSIServiceResponse_FUNCTION_REJECTED - The task management function was rejected. - */ - kSCSIServiceResponse_FUNCTION_REJECTED = 5 -} SCSIServiceResponse; - -/*! - @typedef SCSITaskStatus - @abstract Attributes for task status. - @discussion The Task Status represents the completion status - of the task which provides the SCSI Application Layer with - additional information about how to procede in handling a - completed task. - - The SCSI Architecture Model specification only defines task - status values for when a task completes with a service response - of either TASK_COMPLETED or LINK_COMMAND_COMPLETE. - - Since additional information will aid in error recovery when - a task fails to be completed by a device due to a service - response of kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE, - additional values have been defined that can be returned by the - SCSI Protocol Layer to inform the SCSI Application Layer of the - cause of the delivery failure. - - The Task Status can only be modified by the SCSI Protocol Layer. - The SCSI Application Layer can only read the status -*/ -typedef enum SCSITaskStatus -{ - - /*! - @constant kSCSITaskStatus_GOOD - The task completed with a status of GOOD. - */ - - kSCSITaskStatus_GOOD = 0x00, - - /*! - @constant kSCSITaskStatus_CHECK_CONDITION - The task completed with a status of CHECK_CONDITION. Additional - information about the condition should be available in the sense data. - */ - - kSCSITaskStatus_CHECK_CONDITION = 0x02, - - /*! - @constant kSCSITaskStatus_CONDITION_MET - The task completed with a status of CONDITION_MET. - */ - - kSCSITaskStatus_CONDITION_MET = 0x04, - - /*! - @constant kSCSITaskStatus_BUSY - The task completed with a status of BUSY. The device server might need - time to process a request and a delay may be required. - */ - kSCSITaskStatus_BUSY = 0x08, - - /*! - @constant kSCSITaskStatus_INTERMEDIATE - The task completed with a status of INTERMEDIATE. - */ - kSCSITaskStatus_INTERMEDIATE = 0x10, - - /*! - @constant kSCSITaskStatus_INTERMEDIATE_CONDITION_MET - The task completed with a status of INTERMEDIATE_CONDITION_MET. - */ - kSCSITaskStatus_INTERMEDIATE_CONDITION_MET = 0x14, - - /*! - @constant kSCSITaskStatus_RESERVATION_CONFLICT - The task completed with a status of RESERVATION_CONFLICT. - */ - kSCSITaskStatus_RESERVATION_CONFLICT = 0x18, - - /*! - @constant kSCSITaskStatus_TASK_SET_FULL - The task completed with a status of TASK_SET_FULL. The device server - may need to complete a task before the initiator sends another. - */ - kSCSITaskStatus_TASK_SET_FULL = 0x28, - - /*! - @constant kSCSITaskStatus_ACA_ACTIVE - The task completed with a status of ACA_ACTIVE. The device server may - need the initiator to clear the Auto-Contingent Allegiance condition - before it will respond to new commands. - */ - kSCSITaskStatus_ACA_ACTIVE = 0x30, - - /*! - @constant kSCSITaskStatus_TaskTimeoutOccurred - If a task is aborted by the SCSI Protocol Layer due to it exceeding - the timeout value specified by the task, the task status shall be - set to kSCSITaskStatus_TaskTimeoutOccurred. - */ - - kSCSITaskStatus_TaskTimeoutOccurred = 0x01, - - /*! - @constant kSCSITaskStatus_ProtocolTimeoutOccurred - If a task is aborted by the SCSI Protocol Layer due to it exceeding a - timeout value specified by the support for the protocol or a related - specification, the task status shall be set to - kSCSITaskStatus_ProtocolTimeoutOccurred. - */ - - kSCSITaskStatus_ProtocolTimeoutOccurred = 0x02, - - /*! - @constant kSCSITaskStatus_DeviceNotResponding - If a task is unable to be delivered due to a failure of the device not - accepting the task or the device acknowledging the attempt to send it the - device the task status shall be set to kSCSITaskStatus_DeviceNotResponding. - This will allow the SCSI Application driver to perform the necessary steps - to try to recover the device. This shall only be reported after the SCSI - Protocol Layer driver has attempted all protocol specific attempts to recover - the device. - */ - - kSCSITaskStatus_DeviceNotResponding = 0x03, - - /*! - @constant kSCSITaskStatus_DeviceNotPresent - If the task is unable to be delivered because the device has been - detached, the task status shall be set to kSCSITaskStatus_DeviceNotPresent. - This will allow the SCSI Application Layer to halt the sending of tasks - to the device and, if supported, perform any device failover or system - cleanup. - */ - kSCSITaskStatus_DeviceNotPresent = 0x04, - - /*! - @constant kSCSITaskStatus_DeliveryFailure - If the task is unable to be - delivered to the device due to a failure in the SCSI Protocol Layer, - such as a bus reset or communications error, but the device is is - known to be functioning properly, the task status shall be set to - kSCSITaskStatus_DeliveryFailure. This can also be reported if the - task could not be delivered due to a protocol error that has since - been corrected. - */ - kSCSITaskStatus_DeliveryFailure = 0x05, - - /*! - @constant kSCSITaskStatus_No_Status - This status is not defined by - the SCSI specifications, but is here to provide a status that can - be returned in cases where there is not status available from the - device or protocol, for example, when the service response is - neither TASK_COMPLETED nor LINK_COMMAND_COMPLETE or when the - service response is SERVICE_DELIVERY_OR_TARGET_FAILURE and the - reason for failure could not be determined. - */ - kSCSITaskStatus_No_Status = 0xFF -} SCSITaskStatus; - -/*! - @enum Command Descriptor Block Size - @discussion Command Descriptor Block Size constants. -*/ -enum -{ - /*! - @constant kSCSICDBSize_Maximum This is the largest size a Command Descriptor - Block can be as specified in SPC-2. - */ - kSCSICDBSize_Maximum = 16, - - /*! - @constant kSCSICDBSize_6Byte Use this for a 6-byte CDB. - */ - kSCSICDBSize_6Byte = 6, - - /*! - @constant kSCSICDBSize_10Byte Use this for a 10-byte CDB. - */ - kSCSICDBSize_10Byte = 10, - - /*! - @constant kSCSICDBSize_12Byte Use this for a 12-byte CDB. - */ - kSCSICDBSize_12Byte = 12, - - /*! - @constant kSCSICDBSize_16Byte Use this for a 16-byte CDB. - */ - kSCSICDBSize_16Byte = 16 -}; - -typedef UInt8 SCSICommandDescriptorBlock[kSCSICDBSize_Maximum]; - -/*! - @enum Data Transfer Direction - @discussion DataTransferDirection constants. -*/ -enum -{ - /*! - @constant kSCSIDataTransfer_NoDataTransfer Use this for tasks - that transfer no data. - */ - kSCSIDataTransfer_NoDataTransfer = 0x00, - - /*! - @constant kSCSIDataTransfer_FromInitiatorToTarget Use this for tasks that transfer - data from the initiator to the target. - */ - kSCSIDataTransfer_FromInitiatorToTarget = 0x01, - - /*! - @constant kSCSIDataTransfer_FromTargetToInitiator Use this for tasks that transfer - data from the target to the initiator. - */ - kSCSIDataTransfer_FromTargetToInitiator = 0x02 -}; - - -#if defined(KERNEL) && defined(__cplusplus) - -/* Libkern includes */ -#include <libkern/c++/OSObject.h> - - -/*! - @enum SCSITaskMode - @discussion The SCSI Task mode is used by the SCSI - Protocol Layer to indicate what mode the task is executing. -*/ -typedef enum SCSITaskMode -{ - kSCSITaskMode_CommandExecution = 1, - kSCSITaskMode_Autosense = 2 -} SCSITaskMode; - -/*! - @typedef SCSITaskIdentifier - @discussion This is an opaque object that represents a task. - This is used so that drivers for both the SCSI Protocol Layer - and the SCSI Application Layer cannot modify the SCSITask object - directly but must instead use the inherited methods to do so. This - allows the implementation of SCSITask to change without directly - impacting device and protocol layer drivers. In addition, it - prevents changing of properties that are not allowed to be - changed by a given layer. -*/ -typedef OSObject * SCSITaskIdentifier; - - -/*! - @typedef SCSITaskCompletion - @discussion This is the typedef for completion routines that - work with SCSITaskIdentifiers. -*/ -typedef void ( *SCSITaskCompletion )( SCSITaskIdentifier completedTask ); - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_SCSI_TASK_H_ */ diff --git a/i386/include/IOKit/scsi/IOBDServices.h b/i386/include/IOKit/scsi/IOBDServices.h deleted file mode 100644 index 70482d7..0000000 --- a/i386/include/IOKit/scsi/IOBDServices.h +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright (c) 2006-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_BD_SERVICES_H_ -#define _IOKIT_IO_BD_SERVICES_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// IOKit includes -#include <IOKit/IOTypes.h> - -// Generic IOKit storage related headers -#include <IOKit/storage/IOBDTypes.h> -#include <IOKit/storage/IOBDBlockStorageDevice.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIPeripheralDeviceType05.h> - -class IOMemoryDescriptor; - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOBDServices : public IOBDBlockStorageDevice -{ - - OSDeclareDefaultStructors ( IOBDServices ) - -protected: - - OSSet * fClients; - IOSCSIPeripheralDeviceType05 * fProvider; - - virtual void free ( void ); - - // Reserve space for future expansion. - struct IOBDServicesExpansionData { }; - IOBDServicesExpansionData * fIOBDServicesReserved; - -public: - - static void AsyncReadWriteComplete ( void * clientData, - IOReturn status, - UInt64 actualByteCount ); - - // Deprecated - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageAttributes * attributes, - IOStorageCompletion * completion ); - - virtual IOReturn doEjectMedia ( void ); - - virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); - - virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - - virtual IOReturn doLockUnlockMedia ( bool doLock ); - - virtual IOReturn doSynchronizeCache ( void ); - - virtual IOReturn getWriteCacheState ( bool * enabled ); - - virtual IOReturn setWriteCacheState ( bool enabled ); - - virtual char * getVendorString ( void ); - - virtual char * getProductString ( void ); - - virtual char * getRevisionString ( void ); - - virtual char * getAdditionalDeviceInfoString ( void ); - - virtual IOReturn reportBlockSize ( UInt64 * blockSize ); - - virtual IOReturn reportEjectability ( bool * isEjectable ); - - virtual IOReturn reportLockability ( bool * isLockable ); - - virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); - - virtual IOReturn reportPollRequirements ( bool * pollIsRequired, - bool * pollIsExpensive ); - - virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); - - virtual IOReturn reportRemovability ( bool * isRemovable ); - - virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); - - /* CD Specific */ - virtual IOReturn doAsyncReadCD ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageCompletion completion ); - - virtual IOReturn readISRC ( UInt8 track, CDISRC isrc ); - - virtual IOReturn readMCN ( CDMCN mcn); - - virtual IOReturn readTOC ( IOMemoryDescriptor * buffer ); - - virtual IOReturn audioPause ( bool pause ); - - virtual IOReturn audioPlay ( CDMSF timeStart, CDMSF timeStop ); - - virtual IOReturn audioScan ( CDMSF timeStart, bool reverse ); - - virtual IOReturn audioStop ( void ); - - virtual IOReturn getAudioStatus ( CDAudioStatus * status ); - - virtual IOReturn getAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume ); - - virtual IOReturn setAudioVolume ( UInt8 leftVolume, UInt8 rightVolume ); - - virtual IOReturn getSpeed ( UInt16 * kilobytesPerSecond ); - - virtual IOReturn setSpeed ( UInt16 kilobytesPerSecond ); - - /* DVD Specific */ - virtual UInt32 getMediaType ( void ); - - virtual IOReturn reportKey ( IOMemoryDescriptor * buffer, - const DVDKeyClass keyClass, - const UInt32 lba, - const UInt8 agid, - const DVDKeyFormat keyFormat ); - - virtual IOReturn sendKey ( IOMemoryDescriptor * buffer, - const DVDKeyClass keyClass, - const UInt8 agid, - const DVDKeyFormat keyFormat ); - - virtual IOReturn readDVDStructure ( IOMemoryDescriptor * buffer, - const UInt8 structureFormat, - const UInt32 logicalBlockAddress, - const UInt8 layer, - const UInt8 agid ); - - /* BD Specific */ - virtual IOReturn readDiscStructure ( IOMemoryDescriptor * buffer, - UInt8 structureFormat, - UInt32 logicalBlockAddress, - UInt8 layer, - UInt8 agid, - UInt8 mediaType ); - - /* 10.6.0 */ - virtual IOReturn requestIdle ( void ); - - /* System Specific */ - virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); - virtual IOReturn setProperties ( OSObject * properties ); - - /* User Client Specific */ - virtual bool start ( IOService * provider ); - virtual bool open ( IOService * client, IOOptionBits options, IOStorageAccess access ); - - virtual bool handleOpen ( IOService * client, IOOptionBits options, void * access ); - virtual void handleClose ( IOService * client, IOOptionBits options ); - virtual bool handleIsOpen ( const IOService * client ) const; - - /* Added with 10.1.3 */ - virtual IOReturn readTOC ( IOMemoryDescriptor * buffer, - CDTOCFormat format, - UInt8 msf, - UInt8 trackSessionNumber, - UInt16 * actualByteCount ); - - /* Added with 10.1.3 */ - virtual IOReturn readDiscInfo ( IOMemoryDescriptor * buffer, - UInt16 * actualByteCount ); - - /* Added with 10.1.3 */ - virtual IOReturn readTrackInfo ( IOMemoryDescriptor * buffer, - UInt32 address, - CDTrackInfoAddressType addressType, - UInt16 * actualByteCount ); - - /* Added with 10.5 */ - virtual IOReturn splitTrack ( UInt32 address ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOBDServices, 1 ); - OSMetaClassDeclareReservedUnused ( IOBDServices, 2 ); - OSMetaClassDeclareReservedUnused ( IOBDServices, 3 ); - OSMetaClassDeclareReservedUnused ( IOBDServices, 4 ); - OSMetaClassDeclareReservedUnused ( IOBDServices, 5 ); - OSMetaClassDeclareReservedUnused ( IOBDServices, 6 ); - OSMetaClassDeclareReservedUnused ( IOBDServices, 7 ); - OSMetaClassDeclareReservedUnused ( IOBDServices, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_BD_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/IOBlockStorageServices.h b/i386/include/IOKit/scsi/IOBlockStorageServices.h deleted file mode 100644 index d62a02b..0000000 --- a/i386/include/IOKit/scsi/IOBlockStorageServices.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_BLOCK_STORAGE_SERVICES_H_ -#define _IOKIT_IO_BLOCK_STORAGE_SERVICES_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// IOKit includes -#include <IOKit/IOTypes.h> - -// Generic IOKit storage related headers -#include <IOKit/storage/IOBlockStorageDevice.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIBlockCommandsDevice.h> - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOBlockStorageServices : public IOBlockStorageDevice -{ - - OSDeclareDefaultStructors ( IOBlockStorageServices ) - -private: - - bool fMediaChanged; /* DEPRECATED */ - bool fMediaPresent; - -protected: - - IOSCSIBlockCommandsDevice * fProvider; - - UInt64 fMaxReadBlocks; - UInt64 fMaxWriteBlocks; - - virtual bool attach ( IOService * provider ); - virtual void detach ( IOService * provider ); - virtual IOReturn newUserClient ( - task_t owningTask, - void * securityID, - UInt32 type, - OSDictionary * properties, - IOUserClient ** handler ); - - // Reserve space for future expansion. - struct IOBlockStorageServicesExpansionData { }; - IOBlockStorageServicesExpansionData * fIOBlockStorageServicesReserved; - -public: - - virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); - - static void AsyncReadWriteComplete ( void * clientData, - IOReturn status, - UInt64 actualByteCount ); - - // Deprecated - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageAttributes * attributes, - IOStorageCompletion * completion ); - - virtual IOReturn doEjectMedia ( void ); - - virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); - - virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - - virtual IOReturn doLockUnlockMedia ( bool doLock ); - - virtual IOReturn doSynchronizeCache ( void ); - - virtual char * getVendorString ( void ); - - virtual char * getProductString ( void ); - - virtual char * getRevisionString ( void ); - - virtual char * getAdditionalDeviceInfoString ( void ); - - virtual IOReturn reportBlockSize ( UInt64 * blockSize ); - - virtual IOReturn reportEjectability ( bool * isEjectable ); - - virtual IOReturn reportLockability ( bool * isLockable ); - - virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); - - virtual IOReturn reportPollRequirements ( bool * pollIsRequired, - bool * pollIsExpensive ); - - virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); - - virtual IOReturn reportRemovability ( bool * isRemovable ); - - virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); - - virtual IOReturn getWriteCacheState ( bool * enabled ); - - virtual IOReturn setWriteCacheState ( bool enabled ); - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 1 ); - OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 2 ); - OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 3 ); - OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 4 ); - OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 5 ); - OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 6 ); - OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 7 ); - OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_BLOCK_STORAGE_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/IOCompactDiscServices.h b/i386/include/IOKit/scsi/IOCompactDiscServices.h deleted file mode 100644 index a9d4a31..0000000 --- a/i386/include/IOKit/scsi/IOCompactDiscServices.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_COMPACT_DISC_SERVICES_H_ -#define _IOKIT_IO_COMPACT_DISC_SERVICES_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// IOKit includes -#include <IOKit/IOTypes.h> - -// Generic IOKit storage related headers -#include <IOKit/storage/IOCDTypes.h> -#include <IOKit/storage/IOCDBlockStorageDevice.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIPeripheralDeviceType05.h> - -class IOMemoryDescriptor; - -// Use this switch to turn off the data cache. -#define _USE_DATA_CACHING_ 1 - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOCompactDiscServices : public IOCDBlockStorageDevice -{ - - OSDeclareDefaultStructors ( IOCompactDiscServices ) - -#if (_USE_DATA_CACHING_) - // Data Cache members - bool fUseDataCache; // Indicates if cache should be used. This - // will be set to false if all the necessary support - // for the data cache could not be allocated or - // initialized. - UInt8 * fDataCacheStorage; // Storage space for the cache - UInt32 fDataCacheStartBlock; // Starting block of the data in the cache. - UInt32 fDataCacheBlockCount; // Number of contiguous blocks in the cache - // starting with fDataCacheStartBlock. A value of - // zero in this member indicates that all data - // in the cache is invalid. - - IOSimpleLock * fDataCacheLock; // This is the lock for preventing multiple access - // while manipulating the data cache. -#endif - -protected: - - OSSet * fClients; - IOSCSIPeripheralDeviceType05 * fProvider; - - virtual void free ( void ); - - // Reserve space for future expansion. - struct IOCompactDiscServicesExpansionData { }; - IOCompactDiscServicesExpansionData * fIOCompactDiscServicesReserved; - -public: - - static void AsyncReadWriteComplete ( void * clientData, - IOReturn status, - UInt64 actualByteCount ); - - // Deprecated - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageAttributes * attributes, - IOStorageCompletion * completion ); - - virtual IOReturn doEjectMedia ( void ); - - virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); - - virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - - virtual IOReturn doLockUnlockMedia ( bool doLock ); - - virtual IOReturn doSynchronizeCache ( void ); - - virtual IOReturn getWriteCacheState ( bool * enabled ); - - virtual IOReturn setWriteCacheState ( bool enabled ); - - virtual char * getVendorString ( void ); - - virtual char * getProductString ( void ); - - virtual char * getRevisionString ( void ); - - virtual char * getAdditionalDeviceInfoString ( void ); - - virtual IOReturn reportBlockSize ( UInt64 * blockSize ); - - virtual IOReturn reportEjectability ( bool * isEjectable ); - - virtual IOReturn reportLockability ( bool * isLockable ); - - virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); - - virtual IOReturn reportPollRequirements ( bool * pollIsRequired, - bool * pollIsExpensive ); - - virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); - - virtual IOReturn reportRemovability ( bool * isRemovable ); - - virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); - - /* CD Specific */ - virtual IOReturn doAsyncReadCD ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageCompletion completion ); - - virtual IOReturn readISRC ( UInt8 track, CDISRC isrc ); - - virtual IOReturn readMCN ( CDMCN mcn); - - virtual IOReturn readTOC ( IOMemoryDescriptor * buffer ); - - virtual IOReturn audioPause ( bool pause ); - - virtual IOReturn audioPlay ( CDMSF timeStart, CDMSF timeStop ); - - virtual IOReturn audioScan ( CDMSF timeStart, bool reverse ); - - virtual IOReturn audioStop ( void ); - - virtual IOReturn getAudioStatus ( CDAudioStatus * status ); - - virtual IOReturn getAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume ); - - virtual IOReturn setAudioVolume ( UInt8 leftVolume, UInt8 rightVolume ); - - virtual UInt32 getMediaType ( void ); - - virtual IOReturn getSpeed ( UInt16 * kilobytesPerSecond ); - - virtual IOReturn setSpeed ( UInt16 kilobytesPerSecond ); - - /* System Specific */ - virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); - virtual IOReturn setProperties ( OSObject * properties ); - - /* User Client Specific */ - virtual bool start ( IOService * provider ); - virtual bool open ( IOService * client, IOOptionBits options, IOStorageAccess access ); - - virtual bool handleOpen ( IOService * client, IOOptionBits options, void * access ); - virtual void handleClose ( IOService * client, IOOptionBits options ); - virtual bool handleIsOpen ( const IOService * client ) const; - - /* Added with 10.1.3 */ - virtual IOReturn readTOC ( IOMemoryDescriptor * buffer, - CDTOCFormat format, - UInt8 msf, - UInt8 trackSessionNumber, - UInt16 * actualByteCount ); - - /* Added with 10.1.3 */ - virtual IOReturn readDiscInfo ( IOMemoryDescriptor * buffer, - UInt16 * actualByteCount ); - - /* Added with 10.1.3 */ - virtual IOReturn readTrackInfo ( IOMemoryDescriptor * buffer, - UInt32 address, - CDTrackInfoAddressType addressType, - UInt16 * actualByteCount ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 1 ); - OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 2 ); - OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 3 ); - OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 4 ); - OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 5 ); - OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 6 ); - OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 7 ); - OSMetaClassDeclareReservedUnused ( IOCompactDiscServices, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_COMPACT_DISC_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/IODVDServices.h b/i386/include/IOKit/scsi/IODVDServices.h deleted file mode 100644 index 8dccb17..0000000 --- a/i386/include/IOKit/scsi/IODVDServices.h +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_DVD_SERVICES_H_ -#define _IOKIT_IO_DVD_SERVICES_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// IOKit includes -#include <IOKit/IOTypes.h> - -// Generic IOKit storage related headers -#include <IOKit/storage/IODVDTypes.h> -#include <IOKit/storage/IODVDBlockStorageDevice.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIPeripheralDeviceType05.h> - -class IOMemoryDescriptor; - -// Use this switch to turn off the data cache. -#define _DVD_USE_DATA_CACHING_ 1 - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IODVDServices : public IODVDBlockStorageDevice -{ - - OSDeclareDefaultStructors ( IODVDServices ) - -#if (_DVD_USE_DATA_CACHING_) - // Data Cache members - bool fUseDataCache; // Indicates if cache should be used. This - // will be set to false if all the necessary support - // for the data cache could not be allocated or - // initialized. - UInt8 * fDataCacheStorage; // Storage space for the cache - UInt32 fDataCacheStartBlock; // Starting block of the data in the cache. - UInt32 fDataCacheBlockCount; // Number of contiguous blocks in the cache - // starting with fDataCacheStartBlock. A value of - // zero in this member indicates that all data - // in the cache is invalid. - - IOSimpleLock * fDataCacheLock; // This is the lock for preventing multiple access - // while manipulating the data cache. -#endif - -protected: - - OSSet * fClients; - IOSCSIPeripheralDeviceType05 * fProvider; - - virtual void free ( void ); - - // Reserve space for future expansion. - struct IODVDServicesExpansionData { }; - IODVDServicesExpansionData * fIODVDServicesReserved; - -public: - - static void AsyncReadWriteComplete ( void * clientData, - IOReturn status, - UInt64 actualByteCount ); - - // Deprecated - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageAttributes * attributes, - IOStorageCompletion * completion ); - - virtual IOReturn doEjectMedia ( void ); - - virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); - - virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - - virtual IOReturn doLockUnlockMedia ( bool doLock ); - - virtual IOReturn doSynchronizeCache ( void ); - - virtual IOReturn getWriteCacheState ( bool * enabled ); - - virtual IOReturn setWriteCacheState ( bool enabled ); - - virtual char * getVendorString ( void ); - - virtual char * getProductString ( void ); - - virtual char * getRevisionString ( void ); - - virtual char * getAdditionalDeviceInfoString ( void ); - - virtual IOReturn reportBlockSize ( UInt64 * blockSize ); - - virtual IOReturn reportEjectability ( bool * isEjectable ); - - virtual IOReturn reportLockability ( bool * isLockable ); - - virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); - - virtual IOReturn reportPollRequirements ( bool * pollIsRequired, - bool * pollIsExpensive ); - - virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); - - virtual IOReturn reportRemovability ( bool * isRemovable ); - - virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); - - /* CD Specific */ - virtual IOReturn doAsyncReadCD ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageCompletion completion ); - - virtual IOReturn readISRC ( UInt8 track, CDISRC isrc ); - - virtual IOReturn readMCN ( CDMCN mcn); - - virtual IOReturn readTOC ( IOMemoryDescriptor * buffer ); - - virtual IOReturn audioPause ( bool pause ); - - virtual IOReturn audioPlay ( CDMSF timeStart, CDMSF timeStop ); - - virtual IOReturn audioScan ( CDMSF timeStart, bool reverse ); - - virtual IOReturn audioStop ( void ); - - virtual IOReturn getAudioStatus ( CDAudioStatus * status ); - - virtual IOReturn getAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume ); - - virtual IOReturn setAudioVolume ( UInt8 leftVolume, UInt8 rightVolume ); - - virtual IOReturn getSpeed ( UInt16 * kilobytesPerSecond ); - - virtual IOReturn setSpeed ( UInt16 kilobytesPerSecond ); - - /* DVD Specific */ - virtual UInt32 getMediaType ( void ); - - virtual IOReturn reportKey ( IOMemoryDescriptor * buffer, - const DVDKeyClass keyClass, - const UInt32 lba, - const UInt8 agid, - const DVDKeyFormat keyFormat ); - - virtual IOReturn sendKey ( IOMemoryDescriptor * buffer, - const DVDKeyClass keyClass, - const UInt8 agid, - const DVDKeyFormat keyFormat ); - - virtual IOReturn readDVDStructure ( IOMemoryDescriptor * buffer, - const UInt8 structureFormat, - const UInt32 logicalBlockAddress, - const UInt8 layer, - const UInt8 agid ); - - /* 10.6.0 */ - virtual IOReturn requestIdle ( void ); - - /* System Specific */ - virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); - virtual IOReturn setProperties ( OSObject * properties ); - - /* User Client Specific */ - virtual bool start ( IOService * provider ); - virtual bool open ( IOService * client, IOOptionBits options, IOStorageAccess access ); - - virtual bool handleOpen ( IOService * client, IOOptionBits options, void * access ); - virtual void handleClose ( IOService * client, IOOptionBits options ); - virtual bool handleIsOpen ( const IOService * client ) const; - - /* Added with 10.1.3 */ - virtual IOReturn readTOC ( IOMemoryDescriptor * buffer, - CDTOCFormat format, - UInt8 msf, - UInt8 trackSessionNumber, - UInt16 * actualByteCount ); - - /* Added with 10.1.3 */ - virtual IOReturn readDiscInfo ( IOMemoryDescriptor * buffer, - UInt16 * actualByteCount ); - - /* Added with 10.1.3 */ - virtual IOReturn readTrackInfo ( IOMemoryDescriptor * buffer, - UInt32 address, - CDTrackInfoAddressType addressType, - UInt16 * actualByteCount ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IODVDServices, 1 ); - OSMetaClassDeclareReservedUnused ( IODVDServices, 2 ); - OSMetaClassDeclareReservedUnused ( IODVDServices, 3 ); - OSMetaClassDeclareReservedUnused ( IODVDServices, 4 ); - OSMetaClassDeclareReservedUnused ( IODVDServices, 5 ); - OSMetaClassDeclareReservedUnused ( IODVDServices, 6 ); - OSMetaClassDeclareReservedUnused ( IODVDServices, 7 ); - OSMetaClassDeclareReservedUnused ( IODVDServices, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_DVD_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/IOReducedBlockServices.h b/i386/include/IOKit/scsi/IOReducedBlockServices.h deleted file mode 100644 index 87ad8ed..0000000 --- a/i386/include/IOKit/scsi/IOReducedBlockServices.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_REDUCED_BLOCK_SERVICES_H_ -#define _IOKIT_IO_REDUCED_BLOCK_SERVICES_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// Generic IOKit related headers -#include <IOKit/IOTypes.h> - -// Generic IOKit storage related headers -#include <IOKit/storage/IOBlockStorageDevice.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIPeripheralDeviceType0E.h> - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOReducedBlockServices : public IOBlockStorageDevice -{ - - OSDeclareDefaultStructors ( IOReducedBlockServices ) - - -protected: - // Reserve space for future expansion. - struct IOReducedBlockServicesExpansionData { }; - IOReducedBlockServicesExpansionData * fIOReducedBlockServicesReserved; - - IOSCSIPeripheralDeviceType0E * fProvider; - - virtual bool attach ( IOService * provider ); - virtual void detach ( IOService * provider ); - - -public: - - virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); - - static void AsyncReadWriteComplete ( void * clientData, - IOReturn status, - UInt64 actualByteCount ); - - // Deprecated - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageAttributes * attributes, - IOStorageCompletion * completion ); - - virtual IOReturn doEjectMedia ( void ); - - virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); - - virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - - virtual IOReturn doLockUnlockMedia ( bool doLock ); - - virtual IOReturn doSynchronizeCache ( void ); - - virtual IOReturn getWriteCacheState ( bool * enabled ); - - virtual IOReturn setWriteCacheState ( bool enabled ); - - virtual char * getVendorString ( void ); - - virtual char * getProductString ( void ); - - virtual char * getRevisionString ( void ); - - virtual char * getAdditionalDeviceInfoString ( void ); - - virtual IOReturn reportBlockSize ( UInt64 * blockSize ); - - virtual IOReturn reportEjectability ( bool * isEjectable ); - - virtual IOReturn reportLockability ( bool * isLockable ); - - virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); - - virtual IOReturn reportPollRequirements ( bool * pollIsRequired, - bool * pollIsExpensive ); - - virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); - - virtual IOReturn reportRemovability ( bool * isRemovable ); - - virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 1 ); - OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 2 ); - OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 3 ); - OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 4 ); - OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 5 ); - OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 6 ); - OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 7 ); - OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_REDUCED_BLOCK_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIBlockCommandsDevice.h b/i386/include/IOKit/scsi/IOSCSIBlockCommandsDevice.h deleted file mode 100644 index 2cb4a6d..0000000 --- a/i386/include/IOKit/scsi/IOSCSIBlockCommandsDevice.h +++ /dev/null @@ -1,1146 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_SCSI_BLOCK_COMMANDS_DEVICE_H_ -#define _IOKIT_IO_SCSI_BLOCK_COMMANDS_DEVICE_H_ - -#if defined(KERNEL) && defined(__cplusplus) - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - -// SBC power states as defined in T10:996D SCSI Block Commands - 3 (SBC-3) -// Revision 8c, November 13, 1997, pages 10-11. -enum -{ - kSBCPowerStateSystemSleep = 0, - kSBCPowerStateSleep = 1, - kSBCPowerStateStandby = 2, - kSBCPowerStateIdle = 3, - kSBCPowerStateActive = 4, - kSBCNumPowerStates = 5 -}; - -enum -{ - kMediaStateUnlocked = 0, - kMediaStateLocked = 1 -}; - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// General IOKit headers -#include <IOKit/IOLib.h> -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IOService.h> -#include <IOKit/IOUserClient.h> - -// Generic IOKit storage related headers -#include <IOKit/storage/IOStorage.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIPrimaryCommandsDevice.h> - - -// Forward declaration for the SCSIBlockCommands that is used internally by the -// IOSCSIBlockCommandsDevice class. -class SCSIBlockCommands; - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIBlockCommandsDevice : public IOSCSIPrimaryCommandsDevice -{ - - OSDeclareAbstractStructors ( IOSCSIBlockCommandsDevice ) - -private: - - -#ifndef __LP64__ - - SCSIBlockCommands * fSCSIBlockCommandObject; - SCSIBlockCommands * GetSCSIBlockCommandObject ( void ); - -#endif /* !__LP64__ */ - - IOReturn GetWriteCacheState ( IOMemoryDescriptor * buffer, - UInt8 modePageControlValue ); - - static void AsyncReadWriteComplete ( SCSITaskIdentifier completedTask ); - -protected: - - // Reserve space for future expansion. - struct IOSCSIBlockCommandsDeviceExpansionData - { - IONotifier * fPowerDownNotifier; - bool fWriteCacheEnabled; - bool fDeviceIsShared; - UInt64 fMediumBlockCount64; - bool fDeviceHasSATTranslation; - bool fProtocolSpecificPowerControl; - bool fRequiresEjectWithStartStopUnit; - }; - IOSCSIBlockCommandsDeviceExpansionData * fIOSCSIBlockCommandsDeviceReserved; - - #define fPowerDownNotifier fIOSCSIBlockCommandsDeviceReserved->fPowerDownNotifier - #define fWriteCacheEnabled fIOSCSIBlockCommandsDeviceReserved->fWriteCacheEnabled - - // The fDeviceIsShared is used to indicate whether this device exists on a Physical - // Interconnect that allows multiple initiators to access it. This is used mainly - // by the power management code to not send power state related START_STOP_UNIT - // commands to the device. - // The fDeviceIsShared value is also used to prevent power state commands from being - // sent to manual eject device since these devices behave better when allowed to - // manage their own power. - #define fDeviceIsShared fIOSCSIBlockCommandsDeviceReserved->fDeviceIsShared - - // The fMediumBlockCount64 provides support for 64 bit LBAs and - // replaces fMediumBlockCount which only supports 32 bits. - // This value should not be directly accessed and instead the member routine - // ReportMediumTotalBlockCount() should be used to retrieve it and the member routine - // SetMediumCharacteristics() should be used to set it. - #define fMediumBlockCount64 fIOSCSIBlockCommandsDeviceReserved->fMediumBlockCount64 - - #define fDeviceHasSATTranslation fIOSCSIBlockCommandsDeviceReserved->fDeviceHasSATTranslation - - // Device support protocol specific power off - #define fProtocolSpecificPowerControl fIOSCSIBlockCommandsDeviceReserved->fProtocolSpecificPowerControl - - // Device requires START_STOP_UNIT for ejects, regardless if PREVENT_ALLOW_MEIDUMREMOVAL - // failed. - #define fRequiresEjectWithStartStopUnit fIOSCSIBlockCommandsDeviceReserved->fRequiresEjectWithStartStopUnit - -private: - /* OBSOLETE. Use IOSCSIPrimaryCommandsDevice::Get/SetANSIVersion */ - UInt8 fANSIVersion; - -protected: - // ---- Device Characteristics ---- - bool fMediaIsRemovable; - - // ---- Medium Characteristics ---- - bool fMediumPresent; - -private: - // The byte count of each physical block on the medium. - // This value should not be directly accessed and instead the member routine - // ReportMediumBlockSize() should be used to retrieve it and the member routine - // SetMediumCharacteristics() should be used to set it. - UInt32 fMediumBlockSize; - - // The total number of blocks of fMediumBlockSize on the medium. - // OBSOLETE. Use fMediumBlockCount64 instead which allows for support of - // devices that have 33 through 64 bit LBA values. - UInt32 fMediumBlockCount; - -protected: - // Whether the installed medium is protected from writes - bool fMediumIsWriteProtected; - - // Whether user removal of medium has been prevented - bool fMediumRemovalPrevented; - - // Indicates whether this is a known manual eject device - bool fKnownManualEject; - - // Polling thread variables - thread_call_t fPollingThread; - UInt32 fPollingMode; - enum - { - kPollingMode_Suspended = 0, - kPollingMode_NewMedia = 1, - kPollingMode_MediaRemoval = 2 - }; - - // ---- Methods for controlling the current state of device support ---- - virtual bool InitializeDeviceSupport ( void ); - virtual void StartDeviceSupport ( void ); - virtual void SuspendDeviceSupport ( void ); - virtual void ResumeDeviceSupport ( void ); - virtual void StopDeviceSupport ( void ); - virtual void TerminateDeviceSupport ( void ); - - virtual void free ( void ); - -#ifndef __LP64__ - - // This method will retrieve the SCSI Primary Command Set object for - // the class. For subclasses, this will be overridden using a - // dynamic cast on the subclasses base command set object. - virtual SCSIPrimaryCommands * GetSCSIPrimaryCommandObject ( void ); - - virtual bool CreateCommandSetObjects ( void ); - virtual void FreeCommandSetObjects ( void ); - -#endif /* !__LP64__ */ - - virtual bool ClearNotReadyStatus ( void ); - virtual void CreateStorageServiceNub ( void ); - virtual bool DetermineDeviceCharacteristics ( void ); - - // ---- Methods used for controlling the polling thread ---- - virtual void ProcessPoll ( void ); - virtual void EnablePolling ( void ); - virtual void DisablePolling ( void ); - - // Main and support methods for polling for new Media - virtual void PollForNewMedia ( void ); - virtual bool DetermineMediaPresence ( void ); - virtual bool PreventMediumRemoval ( void ); - virtual bool DetermineMediumCapacity ( - UInt64 * blockSize, - UInt64 * blockCount ); - virtual bool DetermineMediumWriteProtectState ( void ); - - // Main and support methods for polling for Media removal - virtual void PollForMediaRemoval ( void ); - - // ---- Methods used for handling medium characteristics ---- - - // OBSOLETE - Use the version compatible with 64 bit LBAs instead. - virtual void SetMediumCharacteristics ( - UInt32 blockSize, - UInt32 blockCount ); - - void SetMediumCharacteristics ( - UInt64 blockSize, - UInt64 blockCount ); - - virtual void ResetMediumCharacteristics ( void ); - - virtual IOReturn IssueRead ( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueRead ( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - void * clientData ); - - virtual IOReturn IssueWrite ( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueWrite ( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - void * clientData ); - - // ----- Power Management Support ------ - - // We override this method to set our power states and register ourselves - // as a power policy maker. - virtual void InitializePowerManagement ( IOService * provider ); - - // We override this method so that when we register for power management, - // we go to our active power state (which the drive is definitely in - // at startup time). - virtual UInt32 GetInitialPowerState ( void ); - - // We override this method in order to provide the number of transitions - // from Fully active to Sleep state so that the idle timer can be adjusted - // to the appropriate time period based on the disk spindown time set in - // the Energy Saver prefs panel. - virtual UInt32 GetNumberOfPowerStateTransitions ( void ); - - // The TicklePowerManager method is called to tell the power manager that - // the device needs to be in a certain power state to handle requests. - virtual void TicklePowerManager ( void ); - - // The HandlePowerChange method is the state machine for power management. - // It is guaranteed to be on its own thread of execution (different from - // the power manager thread AND the workloop thread. This routine can - // send sync or async calls to the drive without worrying about threading - // issues. - virtual void HandlePowerChange ( void ); - - // The HandleCheckPowerState (void) method is on the serialized side of the - // command gate and can change member variables safely without - // multi-threading issues. It's main purpose is to call the superclass' - // HandleCheckPowerState ( UInt32 maxPowerState ) with the max power state - // the class registered with. - virtual void HandleCheckPowerState ( void ); - - // The VerifyMediumPresence method is called to see if the medium which we - // anticipated being there is still there. - virtual bool VerifyMediumPresence ( void ); - -public: - - static void sProcessPoll ( void * pdtDriver, void * refCon ); - - // ---- Methods for controlling the device ---- - virtual IOReturn SyncReadWrite ( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - UInt64 blockSize ); - - virtual IOReturn AsyncReadWrite ( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - UInt64 blockSize, - void * clientData ); - - IOReturn GetWriteCacheState ( bool * enabled ); - IOReturn SetWriteCacheState ( bool enabled ); - void DetermineMediumGeometry ( void ); - - // ---- Methods for controlling medium state ---- - virtual IOReturn EjectTheMedium ( void ); - virtual IOReturn LockUnlockMedium ( bool doLock ); - virtual IOReturn SynchronizeCache ( void ); - - // ---- Methods for controlling media format ---- - virtual IOReturn FormatMedium ( - UInt64 blockCount, - UInt64 blockSize ); - virtual UInt32 GetFormatCapacities ( - UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - - // ---- Query methods to report device characteristics ---- - - // Report the maximum number of blocks that the device can handle per - // read or write. A value of 0 (zero) indicates there is no limit aside - // from the size of the method's return parameter. - virtual UInt64 ReportDeviceMaxBlocksReadTransfer ( void ); - virtual UInt64 ReportDeviceMaxBlocksWriteTransfer ( void ); - - // Report whether the device supports removal of the media. - virtual bool ReportDeviceMediaRemovability ( void ); - - // ---- Query methods to report installed medium characteristics ---- - virtual UInt64 ReportMediumBlockSize ( void ); - virtual UInt64 ReportMediumTotalBlockCount ( void ); - virtual bool ReportMediumWriteProtection ( void ); - - -protected: - - -#ifndef __LP64__ - - // Command methods to access all commands available to SBC based devices. - virtual bool ERASE_10 ( - SCSITaskIdentifier request, - SCSICmdField1Bit ERA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool ERASE_12 ( - SCSITaskIdentifier request, - SCSICmdField1Bit ERA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool FORMAT_UNIT ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - IOByteCount defectListSize, - SCSICmdField1Bit FMTDATA, - SCSICmdField1Bit CMPLST, - SCSICmdField3Bit DEFECT_LIST_FORMAT, - SCSICmdField1Byte VENDOR_SPECIFIC, - SCSICmdField2Byte INTERLEAVE, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 Section 5.41 - bool FORMAT_UNIT ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - IOByteCount defectListSize, - SCSICmdField1Bit FMTPINFO, - SCSICmdField1Bit RTO_REQ, - SCSICmdField1Bit LONGLIST, - SCSICmdField1Bit FMTDATA, - SCSICmdField1Bit CMPLST, - SCSICmdField3Bit DEFECT_LIST_FORMAT, - SCSICmdField1Byte VENDOR_SPECIFIC, - SCSICmdField1Byte CONTROL ); - - virtual bool LOCK_UNLOCK_CACHE ( - SCSITaskIdentifier request, - SCSICmdField1Bit LOCK, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte NUMBER_OF_BLOCKS, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.5 - bool LOCK_UNLOCK_CACHE ( - SCSITaskIdentifier request, - SCSICmdField1Bit LOCK, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte NUMBER_OF_BLOCKS, - SCSICmdField1Byte CONTROL ); - - bool LOCK_UNLOCK_CACHE_16 ( - SCSITaskIdentifier request, - SCSICmdField1Bit LOCK, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte NUMBER_OF_BLOCKS, - SCSICmdField1Byte CONTROL ); - - virtual bool MEDIUM_SCAN ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit WBS, - SCSICmdField1Bit ASA, - SCSICmdField1Bit PSD, - SCSICmdField1Bit PRA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool PREFETCH ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.7 - bool PREFETCH ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - bool PREFETCH_16 ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - - virtual bool READ_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField21Bit LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - -#endif /* __LP64__ */ - - virtual bool READ_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.10 - bool READ_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit RDPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit FUA_NV, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool READ_12 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.11 - bool READ_12 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit RDPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit FUA_NV, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - - bool READ_16 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit RDPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit FUA_NV, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - - virtual bool READ_CAPACITY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Bit PMI, - SCSICmdField1Byte CONTROL ); - - bool READ_CAPACITY_16 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte ALLOCATION_LENGTH, - SCSICmdField1Bit PMI, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - virtual bool READ_DEFECT_DATA_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PLIST, - SCSICmdField1Bit GLIST, - SCSICmdField3Bit DEFECT_LIST_FORMAT, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool READ_DEFECT_DATA_12 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PLIST, - SCSICmdField1Bit GLIST, - SCSICmdField3Bit DEFECT_LIST_FORMAT, - SCSICmdField4Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool READ_GENERATION ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool READ_LONG ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit CORRCT, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte BYTE_TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - bool READ_LONG_16 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte BYTE_TRANSFER_LENGTH, - SCSICmdField1Bit CORRCT, - SCSICmdField1Byte CONTROL ); - - virtual bool READ_UPDATED_BLOCK_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Bit LATEST, - SCSICmdField15Bit GENERATION_ADDRESS, - SCSICmdField1Byte CONTROL ); - - virtual bool REASSIGN_BLOCKS ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.20 - bool REASSIGN_BLOCKS ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit LONGLBA, - SCSICmdField1Bit LONGLIST, - SCSICmdField1Byte CONTROL ); - - virtual bool REBUILD ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit INTDATA, - SCSICmdField2Bit PORT_CONTROL, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte REBUILD_LENGTH, - SCSICmdField4Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool REGENERATE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit INTDATA, - SCSICmdField2Bit PORT_CONTROL, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte REBUILD_LENGTH, - SCSICmdField4Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool REZERO_UNIT ( - SCSITaskIdentifier request, - SCSICmdField1Byte CONTROL ); - - virtual bool SEARCH_DATA_EQUAL_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit INVERT, - SCSICmdField1Bit SPNDAT, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte NUMBER_OF_BLOCKS_TO_SEARCH, - SCSICmdField1Byte CONTROL ); - - virtual bool SEARCH_DATA_HIGH_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit INVERT, - SCSICmdField1Bit SPNDAT, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte NUMBER_OF_BLOCKS_TO_SEARCH, - SCSICmdField1Byte CONTROL ); - - virtual bool SEARCH_DATA_LOW_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit INVERT, - SCSICmdField1Bit SPNDAT, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte NUMBER_OF_BLOCKS_TO_SEARCH, - SCSICmdField1Byte CONTROL ); - - virtual bool SEEK_6 ( - SCSITaskIdentifier request, - SCSICmdField21Bit LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Byte CONTROL ); - - virtual bool SEEK_10 ( - SCSITaskIdentifier request, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Byte CONTROL ); - - virtual bool SET_LIMITS_10 ( - SCSITaskIdentifier request, - SCSICmdField1Bit RDINH, - SCSICmdField1Bit WRINH, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte NUMBER_OF_BLOCKS, - SCSICmdField1Byte CONTROL ); - - virtual bool SET_LIMITS_12 ( - SCSITaskIdentifier request, - SCSICmdField1Bit RDINH, - SCSICmdField1Bit WRINH, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte NUMBER_OF_BLOCKS, - SCSICmdField1Byte CONTROL ); - -#endif /* __LP64__ */ - - virtual bool START_STOP_UNIT ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField4Bit POWER_CONDITIONS, - SCSICmdField1Bit LOEJ, - SCSICmdField1Bit START, - SCSICmdField1Byte CONTROL ); - - virtual bool SYNCHRONIZE_CACHE ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte NUMBER_OF_BLOCKS, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.22 - bool SYNCHRONIZE_CACHE ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField1Bit SYNC_NV, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte NUMBER_OF_BLOCKS, - SCSICmdField1Byte CONTROL ); - - bool SYNCRONIZE_CACHE_16 ( - SCSITaskIdentifier request, - SCSICmdField1Bit SYNC_NV, - SCSICmdField1Bit IMMED, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte NUMBER_OF_BLOCKS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - virtual bool UPDATE_BLOCK ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Byte CONTROL ); - - virtual bool VERIFY_10 ( - SCSITaskIdentifier request, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BLKVFY, - SCSICmdField1Bit BYTCHK, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte VERIFICATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.24 - bool VERIFY_10 ( - SCSITaskIdentifier request, - SCSICmdField3Bit VRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYTCHK, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte VERIFICATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool VERIFY_12 ( - SCSITaskIdentifier request, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BLKVFY, - SCSICmdField1Bit BYTCHK, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte VERIFICATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.25 - bool VERIFY_12 ( - SCSITaskIdentifier request, - SCSICmdField3Bit VRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYTCHK, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField4Byte VERIFICATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - bool VERIFY_16 ( - SCSITaskIdentifier request, - SCSICmdField3Bit VRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYTCHK, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte VERIFICATION_LENGTH, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - - virtual bool WRITE_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField2Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - -#endif /* __LP64__ */ - - virtual bool WRITE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit EBP, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.29 - bool WRITE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit FUA_NV, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool WRITE_12 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit EBP, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.30 - bool WRITE_12 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit FUA_NV, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - bool WRITE_16 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit FUA_NV, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - virtual bool WRITE_AND_VERIFY_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit EBP, - SCSICmdField1Bit BYTCHK, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.33 - bool WRITE_AND_VERIFY_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYTCHK, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool WRITE_AND_VERIFY_12 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit EBP, - SCSICmdField1Bit BYTCHK, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.34 - bool WRITE_AND_VERIFY_12 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYTCHK, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - - bool WRITE_AND_VERIFY_16 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYTCHK, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - - - virtual bool WRITE_LONG ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - bool WRITE_LONG_16 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Bit CORRCT, - SCSICmdField1Byte CONTROL ); - - virtual bool WRITE_SAME ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PBDATA, - SCSICmdField1Bit LBDATA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.39 - bool WRITE_SAME ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit PBDATA, - SCSICmdField1Bit LBDATA, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - bool WRITE_SAME_16 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit PBDATA, - SCSICmdField1Bit LBDATA, - SCSICmdField8Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField1Byte CONTROL ); - - virtual bool XDREAD ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.42 - bool XDREAD ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit XORPINFO, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool XDWRITE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit DISABLE_WRITE, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.43 - bool XDWRITE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit DISABLE_WRITE, - SCSICmdField1Bit FUA_NV, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool XDWRITE_EXTENDED ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit TABLE_ADDRESS, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit DISABLE_WRITE, - SCSICmdField2Bit PORT_CONTROL, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte SECONDARY_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField1Byte SECONDARY_ADDRESS, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.46 - bool XDWRITEREAD_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Bit WRPROTECT, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit DISABLE_WRITE, - SCSICmdField1Bit FUA_NV, - SCSICmdField1Bit XORPINFO, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool XPWRITE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // Defined in SBC-2 section 5.48 - bool XPWRITE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit FUA_NV, - SCSICmdField1Bit XORPINFO, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField5Bit GROUP_NUMBER, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - -#endif /* __LP64__ */ - - - /* Added with 10.2 */ - OSMetaClassDeclareReservedUsed ( IOSCSIBlockCommandsDevice, 1 ); - -public: - - virtual IOReturn PowerDownHandler ( void * refCon, - UInt32 messageType, - IOService * provider, - void * messageArgument, - vm_size_t argSize ); - - - /* Added with 10.2 */ - OSMetaClassDeclareReservedUsed ( IOSCSIBlockCommandsDevice, 2 ); - -protected: - - virtual void SetMediumIcon ( void ); - - - /* Added with 10.3.3 */ - OSMetaClassDeclareReservedUsed ( IOSCSIBlockCommandsDevice, 3 ); - -protected: - - virtual void AsyncReadWriteCompletion ( SCSITaskIdentifier completedTask ); - - - /* Added with 10.6.0 */ - OSMetaClassDeclareReservedUsed ( IOSCSIBlockCommandsDevice, 4 ); - -public: - - virtual IOReturn AsyncReadWrite ( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - UInt64 blockSize, - IOStorageAttributes * attributes, - void * clientData ); - - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 8 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 9 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 10 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 11 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 12 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSIBlockCommandsDevice, 16 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_BLOCK_COMMANDS_DEVICE_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIMultimediaCommandsDevice.h b/i386/include/IOKit/scsi/IOSCSIMultimediaCommandsDevice.h deleted file mode 100644 index f812a39..0000000 --- a/i386/include/IOKit/scsi/IOSCSIMultimediaCommandsDevice.h +++ /dev/null @@ -1,1057 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_SCSI_MULTIMEDIA_COMMANDS_DEVICE_H_ -#define _IOKIT_IO_SCSI_MULTIMEDIA_COMMANDS_DEVICE_H_ - -#if KERNEL -#include <IOKit/IOTypes.h> -#else -#include <CoreFoundation/CoreFoundation.h> -#endif - -#include <IOKit/storage/IOStorageDeviceCharacteristics.h> - - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - - -// Message constants -#define kIOMessageTrayStateChange 0x69000035 -#define kIOMessageTrayStateHasChanged kIOMessageTrayStateChange // DEPRECATED, use kIOMessageTrayStateChange instead - -// Message values for kIOMessageTrayStateChange -enum -{ - kMessageTrayStateChangeRequestAccepted = 0, - kMessageTrayStateChangeRequestRejected = 1 -}; - -#define kIOMessageMediaAccessChange 0x69000036 - -// Message values for kIOMessageMediaAccessChange -enum -{ - kMessageDeterminingMediaPresence = 0, - kMessageFoundMedia = 1, - kMessageMediaTypeDetermined = 2 -}; - -// IOKit property keys and constants -#define kIOPropertySupportedCDFeatures kIOPropertySupportedCDFeaturesKey -#define kIOPropertySupportedDVDFeatures kIOPropertySupportedDVDFeaturesKey -#define kIOPropertySupportedBDFeatures kIOPropertySupportedBDFeaturesKey -#define kIOPropertyLowPowerPolling "Low Power Polling" - -typedef UInt32 CDFeatures; -enum -{ - kCDFeaturesAnalogAudioBit = 0, // Analog Audio playback - kCDFeaturesReadStructuresBit = 1, // CD-ROM - kCDFeaturesWriteOnceBit = 2, // CD-R - kCDFeaturesReWriteableBit = 3, // CD-R/W - kCDFeaturesCDDAStreamAccurateBit = 4, // CD-DA stream accurate - kCDFeaturesPacketWriteBit = 5, // Packet Writing - kCDFeaturesTAOWriteBit = 6, // CD Track At Once - kCDFeaturesSAOWriteBit = 7, // CD Mastering - Session At Once - kCDFeaturesRawWriteBit = 8, // CD Mastering - Raw - kCDFeaturesTestWriteBit = 9, // CD Mastering/TAO - Test Write - kCDFeaturesBUFWriteBit = 10 // CD Mastering/TAO - Buffer Underrun Free -}; - -enum -{ - kCDFeaturesAnalogAudioMask = (1 << kCDFeaturesAnalogAudioBit), - kCDFeaturesReadStructuresMask = (1 << kCDFeaturesReadStructuresBit), - kCDFeaturesWriteOnceMask = (1 << kCDFeaturesWriteOnceBit), - kCDFeaturesReWriteableMask = (1 << kCDFeaturesReWriteableBit), - kCDFeaturesCDDAStreamAccurateMask = (1 << kCDFeaturesCDDAStreamAccurateBit), - kCDFeaturesPacketWriteMask = (1 << kCDFeaturesPacketWriteBit), - kCDFeaturesTAOWriteMask = (1 << kCDFeaturesTAOWriteBit), - kCDFeaturesSAOWriteMask = (1 << kCDFeaturesSAOWriteBit), - kCDFeaturesRawWriteMask = (1 << kCDFeaturesRawWriteBit), - kCDFeaturesTestWriteMask = (1 << kCDFeaturesTestWriteBit), - kCDFeaturesBUFWriteMask = (1 << kCDFeaturesBUFWriteBit) -}; - -typedef UInt32 DVDFeatures; -enum -{ - kDVDFeaturesCSSBit = 0, // DVD-CSS - kDVDFeaturesReadStructuresBit = 1, // DVD-ROM - kDVDFeaturesWriteOnceBit = 2, // DVD-R - kDVDFeaturesRandomWriteableBit = 3, // DVD-RAM - kDVDFeaturesReWriteableBit = 4, // DVD-RW - kDVDFeaturesTestWriteBit = 5, // DVD-R Write - Test Write - kDVDFeaturesBUFWriteBit = 6, // DVD-R Write - Buffer Underrun Free - kDVDFeaturesPlusRBit = 7, // DVD+R - kDVDFeaturesPlusRWBit = 8, // DVD+RW (implies backgound format support) - kDVDFeaturesHDReadBit = 9, // HD DVD-ROM - kDVDFeaturesHDRBit = 10, // HD DVD-R - kDVDFeaturesHDRAMBit = 11, // HD DVD-RAM - kDVDFeaturesHDRWBit = 12 // HD DVD-RW -}; - -enum -{ - kDVDFeaturesCSSMask = (1 << kDVDFeaturesCSSBit), - kDVDFeaturesReadStructuresMask = (1 << kDVDFeaturesReadStructuresBit), - kDVDFeaturesWriteOnceMask = (1 << kDVDFeaturesWriteOnceBit), - kDVDFeaturesRandomWriteableMask = (1 << kDVDFeaturesRandomWriteableBit), - kDVDFeaturesReWriteableMask = (1 << kDVDFeaturesReWriteableBit), - kDVDFeaturesTestWriteMask = (1 << kDVDFeaturesTestWriteBit), - kDVDFeaturesBUFWriteMask = (1 << kDVDFeaturesBUFWriteBit), - kDVDFeaturesPlusRMask = (1 << kDVDFeaturesPlusRBit), - kDVDFeaturesPlusRWMask = (1 << kDVDFeaturesPlusRWBit), - kDVDFeaturesHDReadMask = (1 << kDVDFeaturesHDReadBit), - kDVDFeaturesHDRMask = (1 << kDVDFeaturesHDRBit), - kDVDFeaturesHDRAMMask = (1 << kDVDFeaturesHDRAMBit), - kDVDFeaturesHDRWMask = (1 << kDVDFeaturesHDRWBit) -}; - -typedef UInt32 BDFeatures; -enum -{ - kBDFeaturesReadBit = 0, // BD-ROM - kBDFeaturesWriteBit = 1 // BD-R / BD-RE -}; - -enum -{ - kBDFeaturesReadMask = (1 << kBDFeaturesReadBit), - kBDFeaturesWriteMask = (1 << kBDFeaturesWriteBit) -}; - -enum -{ - kDiscStatusEmpty = 0, - kDiscStatusIncomplete = 1, - kDiscStatusComplete = 2, - kDiscStatusOther = 3, - kDiscStatusMask = 0x03, - kDiscStatusErasableMask = 0x10 -}; - - -#if defined(KERNEL) && defined(__cplusplus) - -// MMC power states as defined in T10:1228D SCSI Multimedia Commands - 2 (MMC-2) -// Revision 11a, August 30, 1999, page 312 (Annex F). -enum -{ - kMMCPowerStateSystemSleep = 0, - kMMCPowerStateSleep = 1, - kMMCPowerStateStandby = 2, - kMMCPowerStateIdle = 3, - kMMCPowerStateActive = 4, - kMMCNumPowerStates = 5 -}; - -enum -{ - kMediaStateUnlocked = 0, - kMediaStateLocked = 1 -}; - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// General IOKit headers -#include <IOKit/IOLib.h> -#include <IOKit/IOMemoryDescriptor.h> - -// Generic IOKit storage related headers -#include <IOKit/storage/IOStorage.h> -#include <IOKit/storage/IOCDTypes.h> -#include <IOKit/storage/IODVDTypes.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIPrimaryCommandsDevice.h> - -// Forward definitions for internal use only classes -class SCSIMultimediaCommands; -class SCSIBlockCommands; - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIMultimediaCommandsDevice : public IOSCSIPrimaryCommandsDevice -{ - - OSDeclareAbstractStructors ( IOSCSIMultimediaCommandsDevice ) - -private: - -#ifndef __LP64__ - - SCSIMultimediaCommands * fSCSIMultimediaCommandObject; - SCSIMultimediaCommands * GetSCSIMultimediaCommandObject ( void ); - - SCSIBlockCommands * fSCSIBlockCommandObject; /* OBSOLETE */ - SCSIBlockCommands * GetSCSIBlockCommandObject ( void ); /* OBSOLETE */ - -#endif /* !__LP64__ */ - - static void AsyncReadWriteComplete ( SCSITaskIdentifier completedTask ); - -protected: - - // Reserve space for future expansion. - struct IOSCSIMultimediaCommandsDeviceExpansionData - { - IONotifier * fPowerDownNotifier; - bool fDeviceSupportsPowerOff; - BDFeatures fSupportedBDFeatures; - bool fDeviceSupportsAsyncNotification; - bool fDeviceSupportsFastSpindown; - UInt8 fCDLoadingMechanism; - }; - IOSCSIMultimediaCommandsDeviceExpansionData * fIOSCSIMultimediaCommandsDeviceReserved; - - #define fPowerDownNotifier fIOSCSIMultimediaCommandsDeviceReserved->fPowerDownNotifier - #define fDeviceSupportsPowerOff fIOSCSIMultimediaCommandsDeviceReserved->fDeviceSupportsPowerOff - #define fSupportedBDFeatures fIOSCSIMultimediaCommandsDeviceReserved->fSupportedBDFeatures - #define fDeviceSupportsAsyncNotification fIOSCSIMultimediaCommandsDeviceReserved->fDeviceSupportsAsyncNotification - #define fDeviceSupportsFastSpindown fIOSCSIMultimediaCommandsDeviceReserved->fDeviceSupportsFastSpindown - #define fCDLoadingMechanism fIOSCSIMultimediaCommandsDeviceReserved->fCDLoadingMechanism - -#ifndef __LP64__ - - // This method will retreive the SCSI Primary Command Set object for - // the class. For subclasses, this will be overridden using a - // dynamic cast on the subclasses base command set object. - virtual SCSIPrimaryCommands * GetSCSIPrimaryCommandObject ( void ); - -#endif /* !__LP64__ */ - - CDFeatures fSupportedCDFeatures; - DVDFeatures fSupportedDVDFeatures; - - UInt16 fCurrentDiscSpeed; - bool fMediaChanged; - bool fMediaPresent; - - // The byte count of each physical block on the media. - UInt32 fMediaBlockSize; - - // The total number of blocks of fMediaBlockSize on the media. - UInt32 fMediaBlockCount; - - // Flags used to indicate device feature - bool fMediaIsRemovable; - bool fMediaIsWriteProtected; - UInt32 fMediaType; - - thread_call_t fPollingThread; - bool fDeviceSupportsLowPowerPolling; - bool fLowPowerPollingEnabled; - UInt32 fPollingMode; - - enum - { - kPollingMode_Suspended = 0, - kPollingMode_NewMedia = 1, - kPollingMode_MediaRemoval = 2 - }; - - virtual IOReturn setProperties ( OSObject * properties ); - - virtual void CreateStorageServiceNub ( void ); - virtual bool DetermineDeviceCharacteristics ( void ); - virtual IOReturn DetermineIfMediaIsRemovable ( void ); - virtual IOReturn DetermineDeviceFeatures ( void ); - virtual void DetermineMediaType ( void ); - virtual bool CheckForDVDMediaType ( void ); - virtual bool CheckForCDMediaType ( void ); - virtual void PollForMedia ( void ); - virtual void EnablePolling ( void ); - virtual void DisablePolling ( void ); - virtual void CheckWriteProtection ( void ); - virtual bool ClearNotReadyStatus ( void ); - - virtual IOReturn GetDeviceConfiguration ( void ); - virtual IOReturn GetDeviceConfigurationSize ( UInt32 * size ); - virtual IOReturn ParseFeatureList ( UInt32 numProfiles, UInt8 * firstFeaturePtr ); - - virtual IOReturn GetMechanicalCapabilities ( void ); - virtual IOReturn GetMechanicalCapabilitiesSize ( UInt32 * size ); - virtual IOReturn ParseMechanicalCapabilities ( UInt8 * mechanicalCapabilitiesPtr ); - - virtual IOReturn CheckForLowPowerPollingSupport ( void ); - virtual IOReturn GetCurrentPowerStateOfDrive ( UInt32 * powerState ); - - virtual IOReturn IssueRead ( IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueRead ( IOMemoryDescriptor * buffer, - void * clientData, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueWrite ( IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueWrite ( IOMemoryDescriptor * buffer, - void * clientData, - UInt64 startBlock, - UInt64 blockCount ); - - virtual void SetMediaCharacteristics ( UInt32 blockSize, UInt32 blockCount ); - virtual void ResetMediaCharacteristics ( void ); - - UInt8 ConvertBCDToHex ( UInt8 binaryCodedDigit ); - - // ------ User Client Support ------ - - virtual IOReturn HandleSetUserClientExclusivityState ( IOService * userClient, bool state ); - - // ----- Power Management Support ------ - - // We override this method to set our power states and register ourselves - // as a power policy maker. - virtual void InitializePowerManagement ( IOService * provider ); - - // We override this method so that when we register for power management, - // we go to our active power state (which the drive is definitely in - // at startup time). - virtual UInt32 GetInitialPowerState ( void ); - - // We override this method in order to provide the number of transitions - // from Fully active to Sleep state so that the idle timer can be adjusted - // to the appropriate time period based on the disk spindown time set in - // the Energy Saver prefs panel. - virtual UInt32 GetNumberOfPowerStateTransitions ( void ); - - // The TicklePowerManager method is called to tell the power manager that the - // device needs to be in a certain power state to handle requests. - virtual void TicklePowerManager ( void ); - - // The HandlePowerChange method is the state machine for power management. - // It is guaranteed to be on its own thread of execution (different from - // the power manager thread AND the workloop thread. This routine can - // send sync or async calls to the drive without worrying about threading - // issues. - virtual void HandlePowerChange ( void ); - - // The HandleCheckPowerState (void) method is on the serialized side of the command - // gate and can change member variables safely without multi-threading issues. - // It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) - // with the max power state the class registered with. - virtual void HandleCheckPowerState ( void ); - - // The CheckMediaPresence method is called to see if the media which we - // anticipated being there is still there. - virtual bool CheckMediaPresence ( void ); - - virtual bool InitializeDeviceSupport ( void ); - virtual void StartDeviceSupport ( void ); - virtual void SuspendDeviceSupport ( void ); - virtual void ResumeDeviceSupport ( void ); - virtual void StopDeviceSupport ( void ); - virtual void TerminateDeviceSupport ( void ); - - virtual void free ( void ); - -#ifndef __LP64__ - - virtual bool CreateCommandSetObjects ( void ); - virtual void FreeCommandSetObjects ( void ); - -#endif /* !__LP64__ */ - - virtual IOReturn VerifyDeviceState ( void ); - - -public: - - virtual IOReturn setAggressiveness ( unsigned long type, unsigned long minutes ); - - virtual IOReturn SyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn AsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - void * clientData ); - - virtual IOReturn EjectTheMedia ( void ); - virtual IOReturn GetTrayState ( UInt8 * trayState ); - virtual IOReturn SetTrayState ( UInt8 trayState ); - virtual IOReturn FormatMedia ( UInt64 byteCapacity ); - virtual UInt32 GetFormatCapacities ( UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - virtual IOReturn LockUnlockMedia ( bool doLock ); - virtual IOReturn SynchronizeCache ( void ); - virtual IOReturn ReportBlockSize ( UInt64 * blockSize ); - virtual IOReturn ReportEjectability ( bool * isEjectable ); - virtual IOReturn ReportLockability ( bool * isLockable ); - virtual IOReturn ReportPollRequirements ( bool * pollIsRequired, - bool * pollIsExpensive ); - virtual IOReturn ReportMaxReadTransfer ( UInt64 blockSize, - UInt64 * max ); - virtual IOReturn ReportMaxValidBlock ( UInt64 * maxBlock ); - virtual IOReturn ReportMaxWriteTransfer ( UInt64 blockSize, - UInt64 * max ); - virtual IOReturn ReportMediaState ( bool * mediaPresent, - bool * changed ); - virtual IOReturn ReportRemovability ( bool * isRemovable ); - virtual IOReturn ReportWriteProtection ( bool * isWriteProtected ); - - static void sPollForMedia ( void * pdtDriver, void * refCon ); - - /* CD Specific */ - virtual IOReturn SetMediaAccessSpeed ( UInt16 kilobytesPerSecond ); - - virtual IOReturn GetMediaAccessSpeed ( UInt16 * kilobytesPerSecond ); - - virtual IOReturn AsyncReadCD ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - CDSectorArea sectorArea, - CDSectorType sectorType, - void * clientData ); - - virtual IOReturn ReadISRC ( UInt8 track, CDISRC isrc ); - - virtual IOReturn ReadMCN ( CDMCN mcn); - - virtual IOReturn ReadTOC ( IOMemoryDescriptor * buffer ); - -#ifndef __LP64__ - - virtual IOReturn AudioPause ( bool pause ); - - virtual IOReturn AudioPlay ( CDMSF timeStart, CDMSF timeStop ); - - virtual IOReturn AudioScan ( CDMSF timeStart, bool reverse ); - - virtual IOReturn AudioStop ( void ); - - virtual IOReturn GetAudioStatus ( CDAudioStatus * status ); - - virtual IOReturn GetAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume ); - - virtual IOReturn SetAudioVolume ( UInt8 leftVolume, UInt8 rightVolume ); - -#endif /* !__LP64__ */ - - /* DVD Specific */ - virtual UInt32 GetMediaType ( void ); - - virtual IOReturn ReportKey ( IOMemoryDescriptor * buffer, - const DVDKeyClass keyClass, - const UInt32 lba, - const UInt8 agid, - const DVDKeyFormat keyFormat ); - - virtual IOReturn SendKey ( IOMemoryDescriptor * buffer, - const DVDKeyClass keyClass, - const UInt8 agid, - const DVDKeyFormat keyFormat ); - - virtual IOReturn ReadDVDStructure ( IOMemoryDescriptor * buffer, - const UInt32 length, - const UInt8 structureFormat, - const UInt32 logicalBlockAddress, - const UInt8 layer, - const UInt8 agid ); - - // The block size decoding for Read CD and Read CD MSF as defined in table 255 - bool GetBlockSize ( - UInt32 * requestedByteCount, - SCSICmdField3Bit EXPECTED_SECTOR_TYPE, - SCSICmdField1Bit SYNC, - SCSICmdField2Bit HEADER_CODES, - SCSICmdField1Bit USER_DATA, - SCSICmdField1Bit EDC_ECC, - SCSICmdField2Bit ERROR_FIELD, - SCSICmdField3Bit SUBCHANNEL_SELECTION_BITS ); - - SCSICmdField4Byte ConvertMSFToLBA ( SCSICmdField3Byte MSF ); - -#ifndef __LP64__ - - // Command methods to access all commands available to MMC based devices. - // The BLANK command as defined in section 6.1.1 - virtual bool BLANK ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField3Bit BLANKING_TYPE, - SCSICmdField4Byte START_ADDRESS_TRACK_NUMBER, - SCSICmdField1Byte CONTROL ); - - // The CLOSE TRACK/SESSION command as defined in section 6.1.2 - virtual bool CLOSE_TRACK_SESSION ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField1Bit SESSION, - SCSICmdField1Bit TRACK, - SCSICmdField2Byte TRACK_NUMBER, - SCSICmdField1Byte CONTROL ); - - // The FORMAT UNIT command as defined in section 6.1.3 - virtual bool FORMAT_UNIT ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - IOByteCount parameterListSize, - SCSICmdField1Bit FMT_DATA, - SCSICmdField1Bit CMP_LIST, - SCSICmdField3Bit FORMAT_CODE, - SCSICmdField2Byte INTERLEAVE_VALUE, - SCSICmdField1Byte CONTROL ); - -#endif /* !__LP64__ */ - - - // The GET CONFIGURATION command as defined in section 6.1.4 - virtual bool GET_CONFIGURATION ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Bit RT, - SCSICmdField2Byte STARTING_FEATURE_NUMBER, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The GET EVENT/STATUS NOTIFICATION command as defined in section 6.1.5 - virtual bool GET_EVENT_STATUS_NOTIFICATION ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit IMMED, - SCSICmdField1Byte NOTIFICATION_CLASS_REQUEST, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The GET PERFORMANCE command as defined in section 6.1.6 - virtual bool GET_PERFORMANCE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Bit TOLERANCE, - SCSICmdField1Bit WRITE, - SCSICmdField2Bit EXCEPT, - SCSICmdField4Byte STARTING_LBA, - SCSICmdField2Byte MAXIMUM_NUMBER_OF_DESCRIPTORS, - SCSICmdField1Byte CONTROL ); - - // The LOAD/UNLOAD MEDIUM command as defined in section 6.1.7 - virtual bool LOAD_UNLOAD_MEDIUM ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField1Bit LO_UNLO, - SCSICmdField1Bit START, - SCSICmdField1Byte SLOT, - SCSICmdField1Byte CONTROL ); - - // The MECHANISM STATUS command as defined in section 6.1.8 - virtual bool MECHANISM_STATUS ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - // The PAUSE/RESUME command as defined in section 6.1.9 - virtual bool PAUSE_RESUME ( - SCSITaskIdentifier request, - SCSICmdField1Bit RESUME, - SCSICmdField1Byte CONTROL ); - - // The PLAY AUDIO (10) command as defined in section 6.1.10 - virtual bool PLAY_AUDIO_10 ( - SCSITaskIdentifier request, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte STARTING_LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte PLAY_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The PLAY AUDIO (12) command as defined in section 6.1.11 - virtual bool PLAY_AUDIO_12 ( - SCSITaskIdentifier request, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte STARTING_LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte PLAY_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The PLAY AUDIO MSF command as defined in section 6.1.12 - virtual bool PLAY_AUDIO_MSF ( - SCSITaskIdentifier request, - SCSICmdField3Byte STARTING_MSF, - SCSICmdField3Byte ENDING_MSF, - SCSICmdField1Byte CONTROL ); - - /*********************** LEGACY COMMAND SUPPORT ***********************/ - // The PLAY CD command as defined in section 6.1.13 - virtual bool PLAY_CD ( - SCSITaskIdentifier request, - SCSICmdField3Bit EXPECTED_SECTOR_TYPE, - SCSICmdField1Bit CMSF, - SCSICmdField4Byte STARTING_LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte PLAY_LENGTH_IN_BLOCKS, - SCSICmdField1Bit SPEED, - SCSICmdField1Bit PORT2, - SCSICmdField1Bit PORT1, - SCSICmdField1Bit COMPOSITE, - SCSICmdField1Bit AUDIO, - SCSICmdField1Byte CONTROL ); - /*********************** END LEGACY COMMAND SUPPORT *******************/ - -#endif /* !__LP64__ */ - - virtual bool READ_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor *dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - /*********************** LEGACY COMMAND SUPPORT ***********************/ - // The READ BUFFER CAPACITY command as defined in section 6.1.14 - virtual bool READ_BUFFER_CAPACITY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - /*********************** END LEGACY COMMAND SUPPORT *******************/ - -#endif /* !__LP64__ */ - - // The READ CD command as defined in section 6.1.15 - virtual bool READ_CD ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Bit EXPECTED_SECTOR_TYPE, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte STARTING_LOGICAL_BLOCK_ADDRESS, - SCSICmdField3Byte TRANSFER_LENGTH, - SCSICmdField1Bit SYNC, - SCSICmdField2Bit HEADER_CODES, - SCSICmdField1Bit USER_DATA, - SCSICmdField1Bit EDC_ECC, - SCSICmdField2Bit ERROR_FIELD, - SCSICmdField3Bit SUBCHANNEL_SELECTION_BITS, - SCSICmdField1Byte CONTROL ); - - // The READ CD MSF command as defined in section 6.1.16 - virtual bool READ_CD_MSF ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Bit EXPECTED_SECTOR_TYPE, - SCSICmdField3Byte STARTING_MSF, - SCSICmdField3Byte ENDING_MSF, - SCSICmdField1Bit SYNC, - SCSICmdField2Bit HEADER_CODES, - SCSICmdField1Bit USER_DATA, - SCSICmdField1Bit EDC_ECC, - SCSICmdField2Bit ERROR_FIELD, - SCSICmdField3Bit SUBCHANNEL_SELECTION_BITS, - SCSICmdField1Byte CONTROL ); - - // The READ CAPACITY command as defined in section 6.1.17 - virtual bool READ_CAPACITY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Bit PMI, - SCSICmdField1Byte CONTROL ); - - // The READ DISC INFORMATION command as defined in section 6.1.18 - virtual bool READ_DISC_INFORMATION ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The READ DVD STRUCTURE command as defined in section 6.1.19 - virtual bool READ_DVD_STRUCTURE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Byte ADDRESS, - SCSICmdField1Byte LAYER_NUMBER, - SCSICmdField1Byte FORMAT, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField2Bit AGID, - SCSICmdField1Byte CONTROL ); - - // The READ FORMAT CAPACITIES command as defined in section 6.1.20 - virtual bool READ_FORMAT_CAPACITIES ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - /*********************** LEGACY COMMAND SUPPORT ***********************/ - // The READ HEADER command as defined in section 6.1.21 - virtual bool READ_HEADER ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit MSF, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - /*********************** END LEGACY COMMAND SUPPORT ***********************/ - - /*********************** LEGACY COMMAND SUPPORT ***********************/ - // The READ MASTER CUE command as defined in section 6.1.22 - virtual bool READ_MASTER_CUE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Byte SHEET_NUMBER, - SCSICmdField3Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - /*********************** END LEGACY COMMAND SUPPORT ***********************/ - -#endif /* !__LP64__ */ - - // The READ SUB-CHANNEL command as defined in section 6.1.23 - virtual bool READ_SUB_CHANNEL ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit MSF, - SCSICmdField1Bit SUBQ, - SCSICmdField1Byte SUB_CHANNEL_PARAMETER_LIST, - SCSICmdField1Byte TRACK_NUMBER, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The READ TOC/PMA/ATIP command as defined in section 6.1.24/25 - virtual bool READ_TOC_PMA_ATIP ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit MSF, - SCSICmdField4Bit FORMAT, - SCSICmdField1Byte TRACK_SESSION_NUMBER, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The READ TRACK INFORMATION command as defined in section 6.1.26 - virtual bool READ_TRACK_INFORMATION ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Bit ADDRESS_NUMBER_TYPE, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS_TRACK_SESSION_NUMBER, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - /*********************** LEGACY COMMAND SUPPORT ***********************/ - // The REPAIR TRACK command as defined in section 6.1.27 - virtual bool REPAIR_TRACK ( - SCSITaskIdentifier request, - SCSICmdField2Byte TRACK_NUMBER, - SCSICmdField1Byte CONTROL ); - /*********************** END LEGACY COMMAND SUPPORT ***********************/ - - // The REPORT KEY command as defined in section 6.1.28 - virtual bool REPORT_KEY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField2Bit AGID, - SCSICmdField6Bit KEY_FORMAT, - SCSICmdField1Byte CONTROL ); - - // The RESERVE TRACK command as defined in section 6.1.29 - virtual bool RESERVE_TRACK ( - SCSITaskIdentifier request, - SCSICmdField4Byte RESERVATION_SIZE, - SCSICmdField1Byte CONTROL ); - - // The SCAN command as defined in section 6.1.30 - virtual bool SCAN ( - SCSITaskIdentifier request, - SCSICmdField1Bit DIRECT, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte SCAN_STARTING_ADDRESS_FIELD, - SCSICmdField2Bit TYPE, - SCSICmdField1Byte CONTROL ); - - // The SEND CUE SHEET command as defined in section 6.1.31 - virtual bool SEND_CUE_SHEET ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Byte CUE_SHEET_SIZE, - SCSICmdField1Byte CONTROL ); - - // The SEND DVD STRUCTURE command as defined in section 6.1.32 - virtual bool SEND_DVD_STRUCTURE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Byte FORMAT, - SCSICmdField2Byte STRUCTURE_DATA_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The SEND EVENT command as defined in section 6.1.33 - virtual bool SEND_EVENT ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit IMMED, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The SEND KEY command as defined in section 6.1.34 - virtual bool SEND_KEY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField2Bit AGID, - SCSICmdField6Bit KEY_FORMAT, - SCSICmdField1Byte CONTROL ); - - // The SEND OPC INFORMATION command as defined in section 6.1.35 - virtual bool SEND_OPC_INFORMATION ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DO_OPC, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); -#endif /* !__LP64__ */ - - /*********************** LEGACY COMMAND SUPPORT ***********************/ - // The SET CD SPEED command as defined in section 6.1.36 - virtual bool SET_CD_SPEED ( - SCSITaskIdentifier request, - SCSICmdField2Byte LOGICAL_UNIT_READ_SPEED, - SCSICmdField2Byte LOGICAL_UNIT_WRITE_SPEED, - SCSICmdField1Byte CONTROL ); - /*********************** END LEGACY COMMAND SUPPORT ***********************/ - - // The SET READ AHEAD command as defined in section 6.1.37 - virtual bool SET_READ_AHEAD ( - SCSITaskIdentifier request, - SCSICmdField4Byte TRIGGER_LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte READ_AHEAD_LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Byte CONTROL ); - - // The SET STREAMING command as defined in section 6.1.38 - virtual bool SET_STREAMING ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool START_STOP_UNIT ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField4Bit POWER_CONDITIONS, - SCSICmdField1Bit LOEJ, - SCSICmdField1Bit START, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - // The STOP PLAY/SCAN command as defined in section 6.1.39 - virtual bool STOP_PLAY_SCAN ( - SCSITaskIdentifier request, - SCSICmdField1Byte CONTROL ); - -#endif /* !__LP64__ */ - - // The SYNCHRONIZE CACHE command as defined in section 6.1.40 - virtual bool SYNCHRONIZE_CACHE ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte NUMBER_OF_BLOCKS, - SCSICmdField1Byte CONTROL ); - - // The WRITE (10) command as defined in section 6.1.41 - virtual bool WRITE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The WRITE AND VERIFY (10) command as defined in section 6.1.42 - virtual bool WRITE_AND_VERIFY_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYT_CHK, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - /* Added with 10.1.3 */ - OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 1 ); - - virtual IOReturn ReadTOC ( IOMemoryDescriptor * buffer, - CDTOCFormat format, - UInt8 msf, - UInt32 trackSessionNumber, - UInt16 * actualByteCount ); - - /* Added with 10.1.3 */ - OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 2 ); - - virtual IOReturn ReadDiscInfo ( IOMemoryDescriptor * buffer, - UInt16 * actualByteCount ); - - /* Added with 10.1.3 */ - OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 3 ); - - virtual IOReturn ReadTrackInfo ( IOMemoryDescriptor * buffer, - UInt32 address, - CDTrackInfoAddressType addressType, - UInt16 * actualByteCount ); - - /* Added with 10.2 */ - OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 4 ); - - virtual IOReturn PowerDownHandler ( void * refCon, - UInt32 messageType, - IOService * provider, - void * messageArgument, - vm_size_t argSize ); - - /* Added with 10.3.3 */ - OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 5 ); - - -protected: - - - virtual void AsyncReadWriteCompletion ( SCSITaskIdentifier completedTask ); - - -public: - - - /* Added with 10.5 */ - OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 6 ); - - virtual IOReturn ReadDiscStructure ( IOMemoryDescriptor * buffer, - const UInt32 length, - const UInt8 structureFormat, - const UInt32 logicalBlockAddress, - const UInt8 layer, - const UInt8 agid, - const UInt8 mediaType ); - - - bool CheckForBDMediaType ( void ); - - - bool READ_DISC_STRUCTURE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Bit MEDIA_TYPE, - SCSICmdField4Byte ADDRESS, - SCSICmdField1Byte LAYER_NUMBER, - SCSICmdField1Byte FORMAT, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField2Bit AGID, - SCSICmdField1Byte CONTROL ); - - - OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 7 ); - - virtual IOReturn ReserveTrack ( UInt8 reservationType, - UInt8 reservationFormat, - UInt64 ReservationParameter ); - - - bool RESERVE_TRACK_V2 ( SCSITaskIdentifier request, - SCSICmdField1Bit RMZ, - SCSICmdField1Bit ARSV, - SCSICmdField7Byte RESERVATION_PARAMETER, - SCSICmdField1Byte CONTROL ); - - - bool REPORT_KEY_V2 ( SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Byte KEY_CLASS, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField2Bit AGID, - SCSICmdField6Bit KEY_FORMAT, - SCSICmdField1Byte CONTROL ); - - - bool SEND_KEY_V2 ( SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Byte KEY_CLASS, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField2Bit AGID, - SCSICmdField6Bit KEY_FORMAT, - SCSICmdField1Byte CONTROL ); - - -protected: - - - void SetPollingMode ( UInt32 newPollingMode ); - - -public: - - - /* 10.6.0 */ - - IOReturn RequestIdle ( void ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 8 ); - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 9 ); - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 10 ); - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 11 ); - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 12 ); - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 16 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_MULTIMEDIA_COMMANDS_DEVICE_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceNub.h b/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceNub.h deleted file mode 100644 index f88a1e9..0000000 --- a/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceNub.h +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_NUB_H_ -#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_NUB_H_ - - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - -// Probe score values -enum -{ - kPeripheralDeviceTypeNoMatch = 0, - kDefaultProbeRanking = 5000, - kFirstOrderRanking = 10000, - kSecondOrderRanking = 15000, - kThirdOrderRanking = 20000 -}; - - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// General IOKit headers -#include <IOKit/IOLib.h> -#include <IOKit/IOService.h> -#include <IOKit/IOSyncer.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIProtocolServices.h> - - -// Forward definitions for internal use only classes. -class SCSIPrimaryCommands; - -//----------------------------------------------------------------------------- -// Class Declarations -//----------------------------------------------------------------------------- - -class IOSCSIPeripheralDeviceNub : public IOSCSIProtocolServices -{ - - OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceNub ) - -private: - - static bool sCompareIOProperty ( - IOService * object, - OSDictionary * table, - char * propertyKeyName, - bool * matches ); - - static void TaskCallback ( SCSITaskIdentifier completedTask ); - void TaskCompletion ( SCSITaskIdentifier completedTask ); - - static IOReturn sWaitForTask ( void * object, SCSITask * request ); - IOReturn GatedWaitForTask ( SCSITask * request ); - -protected: - - SCSIServiceResponse SendTask ( SCSITask * request ); - - bool InterrogateDevice ( void ); - - // Reserve space for future expansion. - struct IOSCSIPeripheralDeviceNubExpansionData { }; - IOSCSIPeripheralDeviceNubExpansionData * fIOSCSIPeripheralDeviceNubReserved; - - IOSCSIProtocolInterface * fProvider; -#ifndef __LP64__ - SCSIPrimaryCommands * fSCSIPrimaryCommandObject; -#endif - UInt8 fDefaultInquiryCount; - - virtual bool SendSCSICommand ( SCSITaskIdentifier request, - SCSIServiceResponse * serviceResponse, - SCSITaskStatus * taskStatus ); - - virtual SCSIServiceResponse AbortSCSICommand ( SCSITaskIdentifier request ); - - // The IsProtocolServiceSupported will return true if the specified - // feature is supported by the protocol layer. If the service has a value that must be - // returned, it will be returned in the serviceValue output parameter. - virtual bool IsProtocolServiceSupported ( SCSIProtocolFeature feature, void * serviceValue ); - - virtual bool HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void * serviceValue ); - - // We override this method in order to NOT do power management - virtual void InitializePowerManagement ( IOService * provider ); - -public: - - bool init ( OSDictionary * propTable ); - virtual bool start ( IOService * provider ); - virtual void free ( void ); - - virtual IOReturn message ( UInt32 type, IOService * nub, void * arg ); - - virtual bool matchPropertyTable ( OSDictionary * table, - SInt32 * score ); - - // The ExecuteCommand method will take a SCSITask object and transport - // it across the physical wires to the device - virtual void ExecuteCommand ( SCSITaskIdentifier request ); - - // The Task Management function to allow the SCSI Application Layer client to request - // that a specific task be aborted. - virtual SCSIServiceResponse AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ); - - // The Task Management function to allow the SCSI Application Layer client to request - // that a all tasks curerntly in the task set be aborted. - virtual SCSIServiceResponse AbortTaskSet ( UInt8 theLogicalUnit ); - - virtual SCSIServiceResponse ClearACA ( UInt8 theLogicalUnit ); - - virtual SCSIServiceResponse ClearTaskSet ( UInt8 theLogicalUnit ); - - virtual SCSIServiceResponse LogicalUnitReset ( UInt8 theLogicalUnit ); - - virtual SCSIServiceResponse TargetReset ( void ); - - // ************* Obsoleted Member Routine **************** - // The AbortCommand method is replaced by the AbortTask Management function and - // should no longer be called. - virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier abortTask ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 1 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 2 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 3 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 8 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 9 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 10 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 11 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 12 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceNub, 16 ); - -}; - - - -class IOSCSILogicalUnitNub : public IOSCSIPeripheralDeviceNub -{ - - OSDeclareDefaultStructors ( IOSCSILogicalUnitNub ) - -private: - - UInt8 fLogicalUnitNumber; - -protected: - - // Reserve space for future expansion. - struct IOSCSILogicalUnitNubExpansionData { }; - IOSCSILogicalUnitNubExpansionData * fIOSCSILogicalUnitNubReserved; - -public: - - virtual bool start ( IOService * provider ); - - virtual void SetLogicalUnitNumber ( UInt8 newLUN ); - - UInt8 GetLogicalUnitNumber ( void ); - - // The ExecuteCommand method will take a SCSITask object and transport - // it across the physical wires to the device - virtual void ExecuteCommand ( SCSITaskIdentifier request ); - - // The AbortCommand method will abort the indicated SCSI Task object, - // if it is possible and the SCSI Task has not already completed. - virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier abortTask ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 1 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 2 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 3 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 8 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 9 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 10 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 11 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 12 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSILogicalUnitNub, 16 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_NUB_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType00.h b/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType00.h deleted file mode 100644 index 34fdb18..0000000 --- a/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType00.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_OO_H_ -#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_OO_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIBlockCommandsDevice.h> - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIPeripheralDeviceType00 : public IOSCSIBlockCommandsDevice -{ - - OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceType00 ) - -protected: - - // Reserve space for future expansion. - struct IOSCSIPeripheralDeviceType00ExpansionData - { - OSSet * fClients; - }; - IOSCSIPeripheralDeviceType00ExpansionData * fIOSCSIPeripheralDeviceType00Reserved; - -public: - - bool init ( OSDictionary * propTable ); - virtual bool start ( IOService * provider ); - virtual void free ( void ); - - virtual bool handleOpen ( - IOService * client, - IOOptionBits options, - void * access ); - - virtual void handleClose ( - IOService * client, - IOOptionBits options ); - - virtual bool handleIsOpen ( const IOService * client ) const; - - virtual IOReturn newUserClient ( - task_t owningTask, - void * securityID, - UInt32 type, - OSDictionary * properties, - IOUserClient ** handler ); - virtual void CreateStorageServiceNub ( void ); - - virtual char * GetVendorString ( void ); - virtual char * GetProductString ( void ); - virtual char * GetRevisionString ( void ); - - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 1 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 2 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 3 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType00, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_OO_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType05.h b/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType05.h deleted file mode 100644 index 22066f0..0000000 --- a/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType05.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_05_H_ -#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_05_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIPeripheralDeviceType05 : public IOSCSIMultimediaCommandsDevice -{ - - OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceType05 ) - -protected: - - // Reserve space for future expansion. - struct IOSCSIPeripheralDeviceType05ExpansionData { }; - IOSCSIPeripheralDeviceType05ExpansionData * fIOSCSIPeripheralDeviceType05Reserved; - -public: - - bool init ( OSDictionary * propTable ); - virtual bool start ( IOService * provider ); - virtual void stop ( IOService * provider ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 1 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 2 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 3 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType05, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_05_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType07.h b/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType07.h deleted file mode 100644 index 661136d..0000000 --- a/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType07.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_07_H_ -#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_07_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIBlockCommandsDevice.h> - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIPeripheralDeviceType07 : public IOSCSIBlockCommandsDevice -{ - - OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceType07 ) - -protected: - - // Reserve space for future expansion. - struct IOSCSIPeripheralDeviceType07ExpansionData { }; - IOSCSIPeripheralDeviceType07ExpansionData * fIOSCSIPeripheralDeviceType07Reserved; - -public: - - bool init ( OSDictionary * propTable ); - virtual bool start ( IOService * provider ); - virtual void stop ( IOService * provider ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 1 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 2 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 3 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType07, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_07_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType0E.h b/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType0E.h deleted file mode 100644 index cc9ec06..0000000 --- a/i386/include/IOKit/scsi/IOSCSIPeripheralDeviceType0E.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_0E_H_ -#define _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_0E_H_ - -#if defined(KERNEL) && defined(__cplusplus) - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// General IOKit headers -#include <IOKit/IOLib.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIReducedBlockCommandsDevice.h> - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIPeripheralDeviceType0E : public IOSCSIReducedBlockCommandsDevice -{ - - OSDeclareDefaultStructors ( IOSCSIPeripheralDeviceType0E ) - -protected: - - // Reserve space for future expansion. - struct IOSCSIPeripheralDeviceType0EExpansionData { }; - IOSCSIPeripheralDeviceType0EExpansionData * fIOSCSIPeripheralDeviceType0EReserved; - -public: - - bool init ( OSDictionary * propTable ); - virtual bool start ( IOService * provider ); - virtual void stop ( IOService * provider ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 1 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 2 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 3 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPeripheralDeviceType0E, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_PERIPHERAL_DEVICE_TYPE_0E_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIPrimaryCommandsDevice.h b/i386/include/IOKit/scsi/IOSCSIPrimaryCommandsDevice.h deleted file mode 100644 index ba0f1a0..0000000 --- a/i386/include/IOKit/scsi/IOSCSIPrimaryCommandsDevice.h +++ /dev/null @@ -1,805 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_SCSI_PRIMARY_COMMANDS_DEVICE_H_ -#define _IOKIT_IO_SCSI_PRIMARY_COMMANDS_DEVICE_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// General IOKit headers -#include <IOKit/IOLib.h> -#include <IOKit/IOService.h> -#include <IOKit/IOReturn.h> -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IOSyncer.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/SCSICommandDefinitions.h> -#include <IOKit/scsi/SCSICmds_INQUIRY_Definitions.h> -#include <IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h> -#include <IOKit/scsi/IOSCSIProtocolInterface.h> - - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - -// Notification messages -enum -{ - kSCSIServicesNotification_Suspend = 0x69000080, - kSCSIServicesNotification_Resume = 0x69000090 -}; - - -// Timeout values -enum -{ - kOneSecondTimeoutInMS = 1000, - kTenSecondTimeoutInMS = 10 * kOneSecondTimeoutInMS, - kThirtySecondTimeoutInMS = 30 * kOneSecondTimeoutInMS, - kFortyFiveSecondTimeoutInMS = 45 * kOneSecondTimeoutInMS -}; - -// Mode page values for page control field -enum -{ - kModePageControlCurrentValues = 0x00, - kModePageControlChangeableValues = 0x01, - kModePageControlDefaultValues = 0x02, - kModePageControlSavedValues = 0x03 -}; - -// The command should be tried 5 times. The original attempt -// plus 4 retries. -#define kDefaultRetryCount 4 - -// Forward declarations for internal use only classes -class SCSIPrimaryCommands; - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIPrimaryCommandsDevice : public IOSCSIProtocolInterface -{ - - OSDeclareAbstractStructors ( IOSCSIPrimaryCommandsDevice ) - -private: - -#ifndef __LP64__ - SCSIPrimaryCommands * fSCSIPrimaryCommandObject; -#endif - - IOSCSIProtocolInterface * fProtocolDriver; - - // The fProtocolAccessEnabled member variable indicates whether - // requests coming from the client can be sent to the device. - // This will be set to true after the Protocol Service driver is successfully - // opened and before the call to InitializeDeviceSupport and set to false before - // TerminateDeviceSupport is called. - bool fProtocolAccessEnabled; - - // The fDeviceAccessEnabled member variable indicates whether - // requests coming from the client can be sent to the device. - // This will be set to true after InitializeDeviceSupport is called and - // set to false before StopDeviceSupport is called. - bool fDeviceAccessEnabled; - bool fDeviceAccessSuspended; - - static bool ServerKeyswitchCallback ( void * target, - void * refCon, - IOService * newService ); - - static void TaskCallback ( SCSITaskIdentifier completedTask ); - void TaskCompletion ( SCSITaskIdentifier completedTask ); - - static IOReturn sWaitForTask ( void * object, SCSITaskIdentifier request ); - IOReturn GatedWaitForTask ( SCSITaskIdentifier request ); - -protected: - - // Reserve space for future expansion. - struct IOSCSIPrimaryCommandsDeviceExpansionData - { - IONotifier * fKeySwitchNotifier; - UInt8 fANSIVersion; - UInt32 fReadTimeoutDuration; - UInt32 fWriteTimeoutDuration; - bool fCMDQUE; - SCSITaggedTaskIdentifier fTaskID; - IOSimpleLock * fTaskIDLock; - UInt32 fRetryCount; - }; - IOSCSIPrimaryCommandsDeviceExpansionData * fIOSCSIPrimaryCommandsDeviceReserved; - - #define fReadTimeoutDuration fIOSCSIPrimaryCommandsDeviceReserved->fReadTimeoutDuration - #define fWriteTimeoutDuration fIOSCSIPrimaryCommandsDeviceReserved->fWriteTimeoutDuration - #define fRetryCount fIOSCSIPrimaryCommandsDeviceReserved->fRetryCount - - - UInt8 fDefaultInquiryCount; - OSDictionary * fDeviceCharacteristicsDictionary; - UInt32 fNumCommandsOutstanding; - - virtual void free ( void ); - void SetANSIVersion ( UInt8 ); - void SetCMDQUE ( bool value ); - IOReturn GetModeSense ( - IOMemoryDescriptor * dataBuffer, - SCSICmdField6Bit PAGE_CODE, - SCSICmdField2Byte ALLOCATION_LENGTH, - bool * use10ByteModeSense ); - bool RetrieveINQUIRYData ( - UInt8 EVPD, - UInt8 inquiryPage, - UInt8 * inquiryBuffer, - UInt16 * dataSize ); - - // This flag is set if the device responds to a MODE_SENSE_10 command - // with the page code set to 0x1A (Power Conditions Mode Page) - bool fDeviceSupportsPowerConditions; - - // This method will retreive the SCSI Primary Command Set object for - // the class. For subclasses, this will be overridden using a - // dynamic cast on the base command set object of the subclass. - -#ifndef __LP64__ - - // ------ DEPRECATED API ---------- - // This should no longer be called by subclasses as the command builder - // objects will be removed in a later release. - virtual SCSIPrimaryCommands * GetSCSIPrimaryCommandObject ( void ); - - // This method is called by the start method to create all the command - // objects needed by the class. For subclasses, this will be overridden - // to create its needed command set objects. - virtual bool CreateCommandSetObjects ( void ); - - // This method is called by the free method to free all the command - // objects needed by the class. For subclasses, this will be overridden - // to free its needed command set objects. - virtual void FreeCommandSetObjects ( void ); - -#endif - - - // This method is called by the start method to obtain information from - // the device with regards to whether it supports the power conditions mode page. - virtual void CheckPowerConditionsModePage ( void ); - - // This will return back the Protocol driver that is used to - // send service requests to the device. - virtual IOSCSIProtocolInterface * GetProtocolDriver ( void ); - - // This will get a new SCSITask for the caller - virtual SCSITaskIdentifier GetSCSITask ( void ); - - // This will release a SCSITask (eventually return it to a pool) - virtual void ReleaseSCSITask ( SCSITaskIdentifier request ); - - // This will return a unique value for the tagged task identifier - SCSITaggedTaskIdentifier GetUniqueTagID ( void ); - - // Call for executing the command synchronously - SCSIServiceResponse SendCommand ( - SCSITaskIdentifier request, - UInt32 timeoutDuration ); - - // Call for executing the command asycnchronously - void SendCommand ( - SCSITaskIdentifier request, - UInt32 timeoutDuration, - SCSITaskCompletion taskCompletion ); - - - virtual bool InitializeDeviceSupport ( void ) = 0; - virtual void StartDeviceSupport ( void ) = 0; - virtual void SuspendDeviceSupport ( void ) = 0; - virtual void ResumeDeviceSupport ( void ) = 0; - virtual void StopDeviceSupport ( void ) = 0; - virtual void TerminateDeviceSupport ( void ) = 0; - virtual UInt32 GetNumberOfPowerStateTransitions ( void ) = 0; - - virtual IOReturn VerifyDeviceState ( void ); - // Called to clear any power-on/reset status in the drive - virtual bool ClearPowerOnReset ( void ); - virtual bool ClearNotReadyStatus ( void ) = 0; - - bool IsProtocolAccessEnabled ( void ); - bool IsDeviceAccessEnabled ( void ); - bool IsDeviceAccessSuspended ( void ); - - // Accessors for saving and retrieving data from an SCSITask object. - bool ResetForNewTask( - SCSITaskIdentifier request ); - bool SetTaskAttribute ( - SCSITaskIdentifier request, - SCSITaskAttribute newAttribute ); - SCSITaskAttribute GetTaskAttribute ( - SCSITaskIdentifier request ); - bool SetTaggedTaskIdentifier ( - SCSITaskIdentifier request, - SCSITaggedTaskIdentifier taggedTaskIdentifier ); - SCSITaggedTaskIdentifier GetTaggedTaskIdentifier ( - SCSITaskIdentifier request ); - bool SetTaskState ( - SCSITaskIdentifier request, - SCSITaskState newTaskState ); - SCSITaskState GetTaskState ( - SCSITaskIdentifier request ); - bool SetTaskStatus ( - SCSITaskIdentifier request, - SCSITaskStatus newStatus ); - SCSITaskStatus GetTaskStatus ( - SCSITaskIdentifier request ); - bool SetCommandDescriptorBlock ( - SCSITaskIdentifier request, - UInt8 cdbByte0, - UInt8 cdbByte1, - UInt8 cdbByte2, - UInt8 cdbByte3, - UInt8 cdbByte4, - UInt8 cdbByte5 ); - - // Populate the 10 Byte Command Descriptor Block - bool SetCommandDescriptorBlock ( - SCSITaskIdentifier request, - UInt8 cdbByte0, - UInt8 cdbByte1, - UInt8 cdbByte2, - UInt8 cdbByte3, - UInt8 cdbByte4, - UInt8 cdbByte5, - UInt8 cdbByte6, - UInt8 cdbByte7, - UInt8 cdbByte8, - UInt8 cdbByte9 ); - - // Populate the 12 Byte Command Descriptor Block - bool SetCommandDescriptorBlock ( - SCSITaskIdentifier request, - UInt8 cdbByte0, - UInt8 cdbByte1, - UInt8 cdbByte2, - UInt8 cdbByte3, - UInt8 cdbByte4, - UInt8 cdbByte5, - UInt8 cdbByte6, - UInt8 cdbByte7, - UInt8 cdbByte8, - UInt8 cdbByte9, - UInt8 cdbByte10, - UInt8 cdbByte11 ); - - // Populate the 16 Byte Command Descriptor Block - bool SetCommandDescriptorBlock ( - SCSITaskIdentifier request, - UInt8 cdbByte0, - UInt8 cdbByte1, - UInt8 cdbByte2, - UInt8 cdbByte3, - UInt8 cdbByte4, - UInt8 cdbByte5, - UInt8 cdbByte6, - UInt8 cdbByte7, - UInt8 cdbByte8, - UInt8 cdbByte9, - UInt8 cdbByte10, - UInt8 cdbByte11, - UInt8 cdbByte12, - UInt8 cdbByte13, - UInt8 cdbByte14, - UInt8 cdbByte15 ); - - bool SetDataTransferDirection ( - SCSITaskIdentifier request, - UInt8 newDirection ); - UInt8 GetDataTransferDirection ( - SCSITaskIdentifier request ); - bool SetRequestedDataTransferCount ( - SCSITaskIdentifier request, - UInt64 newRequestedCount ); - UInt64 GetRequestedDataTransferCount ( - SCSITaskIdentifier request ); - bool SetRealizedDataTransferCount ( - SCSITaskIdentifier request, - UInt64 newRealizedDataCount ); - UInt64 GetRealizedDataTransferCount ( - SCSITaskIdentifier request ); - bool SetDataBuffer ( - SCSITaskIdentifier request, - IOMemoryDescriptor * newBuffer ); - IOMemoryDescriptor * GetDataBuffer ( - SCSITaskIdentifier request ); - bool SetTimeoutDuration ( - SCSITaskIdentifier request, - UInt32 newTimeout ); - UInt32 GetTimeoutDuration ( - SCSITaskIdentifier request ); - bool SetTaskCompletionCallback ( - SCSITaskIdentifier request, - SCSITaskCompletion newCallback ); - void TaskCompletedNotification ( - SCSITaskIdentifier request ); - - bool SetServiceResponse ( - SCSITaskIdentifier request, - SCSIServiceResponse serviceResponse ); - SCSIServiceResponse GetServiceResponse ( - SCSITaskIdentifier request ); - bool SetAutosenseCommand ( - SCSITaskIdentifier request, - UInt8 cdbByte0, - UInt8 cdbByte1, - UInt8 cdbByte2, - UInt8 cdbByte3, - UInt8 cdbByte4, - UInt8 cdbByte5 ); - bool GetAutoSenseData ( - SCSITaskIdentifier request, - SCSI_Sense_Data * senseData ); // DEPRECATED, use below function instead - bool GetAutoSenseData ( - SCSITaskIdentifier request, - SCSI_Sense_Data * senseData, - UInt8 senseDataSize ); - UInt8 GetAutoSenseDataSize ( - SCSITaskIdentifier request ); - - bool SetApplicationLayerReference ( - SCSITaskIdentifier request, - void * newReferenceValue ); - void * GetApplicationLayerReference ( - SCSITaskIdentifier request ); - - void IncrementOutstandingCommandsCount ( void ); - static void sIncrementOutstandingCommandsCount ( - IOSCSIPrimaryCommandsDevice * self ); - virtual void HandleIncrementOutstandingCommandsCount ( void ); - - - // This static member routine provides a mechanism for retrieving a pointer to - // the object that is claimed as the owner of the specified SCSITask. - static OSObject * sGetOwnerForTask ( SCSITaskIdentifier request ); - -public: - - bool init ( OSDictionary * propTable ); - virtual bool start ( IOService * provider ); - virtual void stop ( IOService * provider ); - virtual IOReturn message ( UInt32 type, IOService * nub, void * arg ); - - // The setAgressiveness method is called by the power manager - // to notify us of certain power management settings. We override - // this method in order to catch the kPMMinutesToSpinDown message - // in order to set our idle timer. - virtual IOReturn setAggressiveness ( unsigned long type, unsigned long minutes ); - - // Methods for getting device information strings - virtual char * GetVendorString ( void ); - virtual char * GetProductString ( void ); - virtual char * GetRevisionString ( void ); - OSDictionary * GetProtocolCharacteristicsDictionary ( void ); - OSDictionary * GetDeviceCharacteristicsDictionary ( void ); - UInt8 GetANSIVersion ( void ); - bool GetCMDQUE ( void ); - OSString * MapINQUIRYDataToIconFile ( void ); - UInt32 GetRetryCount ( void ); - - // -- SCSI Protocol Interface Methods -- - // The ExecuteCommand method will take a SCSI Task and transport - // it across the physical wire(s) to the device - virtual void ExecuteCommand ( SCSITaskIdentifier request ); - - // The Task Management function to allow the SCSI Application Layer client to request - // that a specific task be aborted. - SCSIServiceResponse AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ); - - // The Task Management function to allow the SCSI Application Layer client to request - // that a all tasks curerntly in the task set be aborted. - SCSIServiceResponse AbortTaskSet ( UInt8 theLogicalUnit ); - - SCSIServiceResponse ClearACA ( UInt8 theLogicalUnit ); - - SCSIServiceResponse ClearTaskSet ( UInt8 theLogicalUnit ); - - SCSIServiceResponse LogicalUnitReset ( UInt8 theLogicalUnit ); - - SCSIServiceResponse TargetReset ( void ); - - // The AbortCommand method will abort the indicated SCSI Task, - // if it is possible and the task has not already completed. - virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier request ); - - // The IsProtocolServiceSupported will return true if the specified - // feature is supported by the protocol layer. If the service has a value that must be - // returned, it will be returned in the serviceValue output parameter. - virtual bool IsProtocolServiceSupported ( - SCSIProtocolFeature feature, - void * serviceValue ); - - // The HandleProtocolServiceFeature will return true if the specified feature could - // be handled properly by the protocol layer. - virtual bool HandleProtocolServiceFeature ( - SCSIProtocolFeature feature, - void * serviceValue ); - - // Utility methods for use by all peripheral device objects. - - // isParameterValid are used to validate that the parameter passed into - // the command methods are of the correct value. - - // Validate Parameter used for 1 bit to 1 byte paramaters - bool IsParameterValid ( - SCSICmdField1Byte param, - SCSICmdField1Byte mask ); - - // Validate Parameter used for 9 bit to 2 byte paramaters - bool IsParameterValid ( - SCSICmdField2Byte param, - SCSICmdField2Byte mask ); - - // Validate Parameter used for 17 bit to 4 byte paramaters - bool IsParameterValid ( - SCSICmdField4Byte param, - SCSICmdField4Byte mask ); - - // Validate Parameter used for 33 bit to 8 byte paramaters - bool IsParameterValid ( - SCSICmdField8Byte param, - SCSICmdField8Byte mask ); - - - bool IsMemoryDescriptorValid ( - IOMemoryDescriptor * dataBuffer ); - - bool IsMemoryDescriptorValid ( - IOMemoryDescriptor * dataBuffer, - UInt64 requiredSize ); - -#ifndef __LP64__ - - // SCSI Primary command implementations - virtual bool CHANGE_DEFINITION ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit SAVE, - SCSICmdField7Bit DEFINITION_PARAMETER, - SCSICmdField1Byte PARAMETER_DATA_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool COMPARE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PAD, - SCSICmdField3Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool COPY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PAD, - SCSICmdField3Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool COPY_AND_VERIFY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit BYTCHK, - SCSICmdField1Bit PAD, - SCSICmdField3Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool EXTENDED_COPY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - -#endif /* !__LP64__ */ - - virtual bool INQUIRY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit CMDDT, - SCSICmdField1Bit EVPD, - SCSICmdField1Byte PAGE_OR_OPERATION_CODE, - SCSICmdField1Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool LOG_SELECT ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PCR, - SCSICmdField1Bit SP, - SCSICmdField2Bit PC, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool LOG_SENSE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PPC, - SCSICmdField1Bit SP, - SCSICmdField2Bit PC, - SCSICmdField6Bit PAGE_CODE, - SCSICmdField2Byte PARAMETER_POINTER, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool MODE_SELECT_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PF, - SCSICmdField1Bit SP, - SCSICmdField1Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool MODE_SELECT_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PF, - SCSICmdField1Bit SP, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool MODE_SENSE_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DBD, - SCSICmdField2Bit PC, - SCSICmdField6Bit PAGE_CODE, - SCSICmdField1Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool MODE_SENSE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit LLBAA, - SCSICmdField1Bit DBD, - SCSICmdField2Bit PC, - SCSICmdField6Bit PAGE_CODE, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool PERSISTENT_RESERVE_IN ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField5Bit SERVICE_ACTION, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool PERSISTENT_RESERVE_OUT ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField5Bit SERVICE_ACTION, - SCSICmdField4Bit SCOPE, - SCSICmdField4Bit TYPE, - SCSICmdField1Byte CONTROL ); - - virtual bool PREVENT_ALLOW_MEDIUM_REMOVAL ( - SCSITaskIdentifier request, - SCSICmdField2Bit PREVENT, - SCSICmdField1Byte CONTROL ); - - virtual bool READ_BUFFER ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Bit MODE, - SCSICmdField1Byte BUFFER_ID, - SCSICmdField3Byte BUFFER_OFFSET, - SCSICmdField3Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool RECEIVE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool RECEIVE_DIAGNOSTICS_RESULTS ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PCV, - SCSICmdField1Byte PAGE_CODE, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool RELEASE_6 ( - SCSITaskIdentifier request, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - virtual bool RELEASE_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit EXTENT, - SCSICmdField1Byte RESERVATION_IDENTIFICATION, - SCSICmdField1Byte CONTROL ); - -#endif /* !__LP64__ */ - - virtual bool RELEASE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit THRDPTY, - SCSICmdField1Bit LONGID, - SCSICmdField1Byte THIRD_PARTY_DEVICE_ID, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - virtual bool RELEASE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit THRDPTY, - SCSICmdField1Bit LONGID, - SCSICmdField1Bit EXTENT, - SCSICmdField1Byte RESERVATION_IDENTIFICATION, - SCSICmdField1Byte THIRD_PARTY_DEVICE_ID, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - -#endif /* !__LP64__ */ - - virtual bool REPORT_DEVICE_IDENTIFIER ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool REPORT_LUNS ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool REQUEST_SENSE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool RESERVE_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - virtual bool RESERVE_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit EXTENT, - SCSICmdField1Byte RESERVATION_IDENTIFICATION, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - -#endif /* !__LP64__ */ - - virtual bool RESERVE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit THRDPTY, - SCSICmdField1Bit LONGID, - SCSICmdField1Byte THIRD_PARTY_DEVICE_ID, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - -#ifndef __LP64__ - - virtual bool RESERVE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit THRDPTY, - SCSICmdField1Bit LONGID, - SCSICmdField1Bit EXTENT, - SCSICmdField1Byte RESERVATION_IDENTIFICATION, - SCSICmdField1Byte THIRD_PARTY_DEVICE_ID, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - -#endif /* !__LP64__ */ - - virtual bool SEND ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit AER, - SCSICmdField3Byte TRANSFER_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool SEND_DIAGNOSTICS ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField3Bit SELF_TEST_CODE, - SCSICmdField1Bit PF, - SCSICmdField1Bit SELF_TEST, - SCSICmdField1Bit DEVOFFL, - SCSICmdField1Bit UNITOFFL, - SCSICmdField2Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool SET_DEVICE_IDENTIFIER ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField5Bit SERVICE_ACTION, - SCSICmdField4Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - virtual bool TEST_UNIT_READY ( - SCSITaskIdentifier request, - SCSICmdField1Byte CONTROL ); - - virtual bool WRITE_BUFFER ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Bit MODE, - SCSICmdField1Byte BUFFER_ID, - SCSICmdField3Byte BUFFER_OFFSET, - SCSICmdField3Byte PARAMETER_LIST_LENGTH, - SCSICmdField1Byte CONTROL ); - - // The SPC-3 INQUIRY command as defined in section 6.4.1 of SPC-3. - bool INQUIRY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit EVPD, - SCSICmdField1Byte PAGE_CODE, - SCSICmdField2Byte ALLOCATION_LENGTH, - SCSICmdField1Byte CONTROL ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 1 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 2 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 3 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 8 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 9 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 10 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 11 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 12 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSIPrimaryCommandsDevice, 16 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_PRIMARY_COMMANDS_DEVICE_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIProtocolInterface.h b/i386/include/IOKit/scsi/IOSCSIProtocolInterface.h deleted file mode 100644 index bb74ce4..0000000 --- a/i386/include/IOKit/scsi/IOSCSIProtocolInterface.h +++ /dev/null @@ -1,854 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IO_SCSI_PROTOCOL_INTERFACE_H_ -#define _IOKIT_IO_SCSI_PROTOCOL_INTERFACE_H_ - - -/*! @header SCSI Protocol Interface - @discussion - This file contains definitions for the IOSCSIProtocolInterface class, - SCSI Protocol Features used by this interface, and additional constants - used by this interface. -*/ - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -#include <IOKit/storage/IOStorageDeviceCharacteristics.h> - - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - -/* -SCSI Device Characteristics - Defined between SCSI Application Layer and - SCSI Protocol Layer only. -*/ - -/*! -@constant kIOPropertySCSIDeviceCharacteristicsKey -@discussion -This key is used to define SCSI Device Characteristics for a particular device. -It is the key for the dictionary containing the keys of characteristics. These keys -are only defined between the SCSI Protocol Layer and the SCSI Applicaiton Layer. Some -properties may be copied from this dictionary to the more generic Device Characteristics -or Protocol Characteristics dictionaries. -*/ -#define kIOPropertySCSIDeviceCharacteristicsKey "SCSI Device Characteristics" - -/*! -@constant kIOPropertySCSIInquiryLengthKey -@discussion -This key is used to define a default INQUIRY length to issue to the device. The -value is a UInt32 corresponding to the number of bytes to request in the INQUIRY -command. -*/ -#define kIOPropertySCSIInquiryLengthKey "Inquiry Length" - -/*! -@constant kIOPropertySCSIManualEjectKey -@discussion -This key is used to indicate that the device is known to be a manual ejectable media -device. This property overrides all of the driver checks for determining this capability. -This property is a string, although if it exists it should always be true. -*/ -#define kIOPropertySCSIManualEjectKey "Manual Eject" - -/*! -@constant kIOPropertyReadTimeOutDurationKey -@discussion -This key is used to define the Read Time Out for a particular device. -This property overrides all of the protocol defaults. -This property is a value, in milliseconds. -*/ -#define kIOPropertyReadTimeOutDurationKey "Read Time Out Duration" - -/*! -@constant kIOPropertyWriteTimeOutDurationKey -@discussion -This key is used to define the Write Time Out for a particular device. -This property overrides all of the protocol defaults. -This property is a value, in milliseconds. -*/ -#define kIOPropertyWriteTimeOutDurationKey "Write Time Out Duration" - -/*! -@constant kIOPropertyRetryCountKey -@discussion -This key is used to define the number of Read/Write retries for a particular device. -This property overrides all of the protocol defaults. -The value is a UInt32 corresponding to the number of retries. -*/ -#define kIOPropertyRetryCountKey "Retry Count" - -/*! - @constant kIOPropertyAutonomousSpinDownKey - @discussion - This key is used to indicate that the device is known to have its own internal logic - for idle disk spin down. This key is used to mark device which respon poorly to our - efforts to manually spin down or spin up the device when it is already in the desired - state. - */ -#define kIOPropertyAutonomousSpinDownKey "Autonomous Spin Down" - -/*! - @constant kIOPropertyEjectRequireStartStopUnitKey - @discussion - This key is used to indicate that while the device may have failed PREVENT_ALLOW_MEDIUM - REMOVAL it still requires a START_STOP_UNIT to eject/unload media. - */ -#define kIOPropertyEjectRequireStartStopUnitKey "Eject Requires START_STOP_UNIT" - -#if defined(KERNEL) && defined(__cplusplus) - - -/*! -@constant kCFBundleIdentifierKey -@discussion -Property key for CFBundleIdentifier. -*/ -#define kCFBundleIdentifierKey "CFBundleIdentifier" - -/*! -@constant kIOSCSIArchitectureBundleIdentifierKey -@discussion -IOSCSIArchitectureModelFamily's CFBundle identifier. -*/ -#define kIOSCSIArchitectureBundleIdentifierKey "com.apple.iokit.IOSCSIArchitectureModelFamily" - - -// General kernel headers -#include <kern/thread.h> - -// General IOKit headers -#include <IOKit/IOLib.h> -#include <IOKit/IOService.h> -#include <IOKit/IOCommandGate.h> -#include <IOKit/IOWorkLoop.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/SCSITask.h> - - -/*! -@enum SCSI Protocol Interface Device Notification values -@discussion -Message values for SCSI Protocol Interface Device Notifications. -@constant kSCSIProtocolNotification_DeviceRemoved -Private message sent between a SCSI protocol service provider and -SCSI application layer driver to indicate device removal. -@constant kSCSIProtocolNotification_VerifyDeviceState -Private message sent between a SCSI protocol service provider and -SCSI application layer driver to indicate device state may have -changed and the device state should be re-verified by the SCSI -Application Layer driver. An example would be a bus reset which clears -the tray locking state of an ATAPI device. -@constant kSCSIServicesNotification_ExclusivityChanged -Message sent when a change in exclusivity state occurs. Usually in -response to acquiring/releasing exclusive access to a device via a user client. -*/ -enum -{ - kSCSIProtocolNotification_DeviceRemoved = 0x69000010, - kSCSIProtocolNotification_VerifyDeviceState = 0x69000020, - kSCSIServicesNotification_ExclusivityChanged = 0x69000030 -}; - - -/*! -@typedef SCSIProtocolFeature -@discussion -Typedef for SCSIProtocolFeature, a 32-bit quantity. -*/ -typedef UInt32 SCSIProtocolFeature; - -/*! -@enum SCSI Protocol Features -@discussion -The list of SCSI Protocol Features currently supported. -*/ -enum -{ - - /*! - @constant kSCSIProtocolFeature_ACA Not yet used. - */ - kSCSIProtocolFeature_ACA = 1, - - /*! - @constant kSCSIProtocolFeature_CPUInDiskMode Used to determine - if the SCSI Protocol Services Driver supports a CPU which is in - target disk mode. - */ - kSCSIProtocolFeature_CPUInDiskMode = 2, - - /*! - @constant kSCSIProtocolFeature_ProtocolSpecificPolling Used - to determine if the SCSI Protocol Services Driver supports - protocol specific polling for media. This is used for low-power - polling specifically for ATAPI devices on ATA buses - */ - kSCSIProtocolFeature_ProtocolSpecificPolling = 3, - - /*! - @constant kSCSIProtocolFeature_ProtocolSpecificSleepCommand Used - to determine if the SCSI Protocol Services Driver supports - protocol specific sleep commands to a drive. This is used for - sleeping drives specifically ATAPI devices on ATA buses. - */ - kSCSIProtocolFeature_ProtocolSpecificSleepCommand = 4, - - /*! - @constant kSCSIProtocolFeature_GetMaximumLogicalUnitNumber If - the SCSI Protocol Services Driver supports logical units, it will - report the maximum addressable ID that it supports in the UInt32 pointer - that is passed in as the serviceValue. If only one unit is supported, - the driver should return false for this query. - */ - kSCSIProtocolFeature_GetMaximumLogicalUnitNumber = 5, - - /*! - @constant kSCSIProtocolFeature_MaximumReadBlockTransferCount If - the SCSI Protocol Services Driver has a maximum number of - blocks that can be transfered in a read request, it will return - true to this query and return the block count in the UInt32 pointer - that is passed in as the serviceValue. - */ - kSCSIProtocolFeature_MaximumReadBlockTransferCount = 6, - - /*! - @constant kSCSIProtocolFeature_MaximumWriteBlockTransferCount If - the SCSI Protocol Services Driver has a maximum number of - blocks that can be transferred in a write request, it will return - true to this query and return the block count in the UInt32 pointer - that is passed in as the serviceValue. - */ - kSCSIProtocolFeature_MaximumWriteBlockTransferCount = 7, - - /*! - @constant kSCSIProtocolFeature_MaximumReadTransferByteCount If - the SCSI Protocol Services Driver has a maximum byte count - that can be transferred in a read request, it will return - true to this query and return the byte count in the UInt64 pointer - that is passed in as the serviceValue. - */ - kSCSIProtocolFeature_MaximumReadTransferByteCount = 8, - - /*! - @constant kSCSIProtocolFeature_MaximumWriteTransferByteCount If - the SCSI Protocol Services Driver has a maximum byte count - that can be transferred in a write request, it will return - true to this query and return the byte count in the UInt64 pointer - that is passed in as the serviceValue. - */ - kSCSIProtocolFeature_MaximumWriteTransferByteCount = 9, - - /*! - @constant kSCSIProtocolFeature_SubmitDefaultInquiryData If - the SCSI Protocol Services Driver needs any extra information to - make any negotiation settings from the standard INQUIRY data, this - will be called to set that appropriately. The serviceValue will - point to a SCSICmd_INQUIRY_StandardData buffer. The size - of the buffer depends on the SCSI Device Characteristics - dictionary for the device or bus. If there is no - kIOPropertySCSIInquiryLengthKey value set in the dictionary - or if it doesn't exist, then the size of the data will be - the size of the full amount of Inquiry retrieved from the device. - */ - kSCSIProtocolFeature_SubmitDefaultInquiryData = 10, - - /*! - @constant kSCSIProtocolFeature_ProtocolAlwaysReportsAutosenseData If - the SCSI Protocol Services Driver always reports available - autosense data when a kSCSITaskStatus_CHECK_CONDITION is set, - then the protocol layer should return true. E.g. FireWire - transport drivers should respond true to this. - */ - kSCSIProtocolFeature_ProtocolAlwaysReportsAutosenseData = 11, - - /*! - @constant kSCSIProtocolFeature_ProtocolSpecificPowerOff If - the SCSI Protocol Services Driver supports removing the power - to the drive, then the protocol layer should return true. This is - used for aggressive power management, specifically for ATAPI - devices on ATA buses. - */ - kSCSIProtocolFeature_ProtocolSpecificPowerOff = 12, - - /*! - @constant kSCSIProtocolFeature_ProtocolSpecificPowerControl - Used to determine if the SCSI Protocol Services Driver supports - switching the power to the drive on and off. This is used for aggressive - power management, specifically for SATAPI devices on AHCI buses. - */ - kSCSIProtocolFeature_ProtocolSpecificPowerControl = 13, - - /*! - @constant kSCSIProtocolFeature_ProtocolSpecificAsyncNotification - Used to determine if the SCSI Protocol Services Driver supports - asynchronous notifications from the drive. This is used to prevent - polling for media, specifically for SATAPI devices on AHCI buses. - */ - kSCSIProtocolFeature_ProtocolSpecificAsyncNotification = 14 - -}; - - -/*! -@typedef SCSIProtocolPowerState -@discussion -Typedef for SCSIProtocolPowerState, a 32-bit quantity. -*/ -typedef UInt32 SCSIProtocolPowerState; - -/*! -@enum SCSI Protocol Power States -@discussion -The list of SCSI Protocol Power States. -*/ -enum -{ - /*! - @constant kSCSIProtocolPowerStateOff - Off power state. - */ - kSCSIProtocolPowerStateOff = 0, - - /*! - @constant kSCSIProtocolPowerStateOn - On power state. - */ - kSCSIProtocolPowerStateOn = 1 -}; - - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -/*! -@class IOSCSIProtocolInterface -@superclass IOService -@discussion -This class defines the public SCSI Protocol Layer API for any class that -provides Protocol services or needs to provide the Protocol Service API -for passing service requests to a Protocol Service driver. -*/ -class IOSCSIProtocolInterface : public IOService -{ - - OSDeclareAbstractStructors ( IOSCSIProtocolInterface ) - -public: - - /*! - @function start - @abstract During an IOService object's instantiation, starts the IOService object that has been selected to run on the provider. - @discussion See IOService.h for details. - @result <code>true</code> if the start was successful; <code>false</code> otherwise (which will cause the instance to be detached and usually freed). - */ - virtual bool start ( IOService * provider ); - - /*! - @function free - @abstract Called to release all resources held by the object. - @discussion Release all resources held by the object, then call super::free(). - */ - virtual void free ( void ); - - /*! - @function willTerminate - @abstract Passes a termination up the stack. - @discussion Notification that a provider has been terminated, sent before recursing up the stack, in root-to-leaf order. - @param provider The terminated provider of this object. - @param options Options originally passed to terminate(). - @result <code>true</code>. - */ - virtual bool willTerminate ( IOService * provider, IOOptionBits options ); - - /*! - @function GetUserClientExclusivityState - @abstract Gets the current exclusivity state of the user client. - @discussion The GetUserClientExclusivityState() method is called by the SCSITaskUserClient - to determine if any user client is holding exclusive access at the current time. This is simply - a preflight check and a return value of <code>false</code> does not guarantee that a subsequent - call to SetUserClientExclusivityState() will return successfully. - @result <code>true</code> if a user client is in exclusive control of the device, <code>false</code> otherwise. - */ - virtual bool GetUserClientExclusivityState ( void ); - - /*! - @function SetUserClientExclusivityState - @abstract Sets the current exclusivity state of the user client. - @discussion The SetUserClientExclusivityState() method is called by the SCSITaskUserClient - to set the exclusive access mode. - @param userClient The instance of SCSITaskUserClient for which to change exclusivity state. - @param state Exclusivity state. <code>true</code> means exclusive access is desired, <code>false</code> - means exclusive access is being released. - @result A valid IOReturn code indicating success or the type of failure. - */ - virtual IOReturn SetUserClientExclusivityState ( IOService * userClient, bool state ); - - - /*! - @function initialPowerStateForDomainState - @abstract Determines which power state a device is in, given the current power domain state. - @discussion Power management calls this method once, when the driver is initializing power management. - Subclasses should not need to override this method. - @param flags Flags that describe the character of "domain power"; they represent the <code>outputPowerCharacter</code> field of a state in the power domain's power state array. - @result A state number. - */ - virtual unsigned long initialPowerStateForDomainState ( IOPMPowerFlags flags ); - - /*! - @function setPowerState - @abstract Requests a power managed driver to change the power state of its device. - @discussion Requests a power managed driver to change the power state of its device. Most subclasses - of IOSCSIProtocolInterface have class-specific mechanisms and should not override this routine. - See IOSCSIProtocolServices.h, IOSCSIBlockCommandsDevice.h, IOSCSIReducedBlockCommandsDevice.h, and - IOSCSIMultimediaCommandsDevice.h for more information about power management changes. - Subclasses should not need to override this method. - @param powerStateOrdinal The number in the power state array to which the drive is being instructed to change. - @param whichDevice A pointer to the power management object which registered to manage power for this device. - The whichDevice field is not pertinent to us since the driver is both the "policy maker" for the device, - and the "policy implementor" for the device. - @result See IOService.h for details. - */ - virtual IOReturn setPowerState ( unsigned long powerStateOrdinal, IOService * whichDevice ); - - /*! - @function IsPowerManagementIntialized - @abstract Called to determine if power management is initialized. - @discussion Called to determine if power management is initialized. - Subclasses should not need to override this method. - @result <code>true</code> if power management has been initialized, <code>false</code> otherwise. - */ - virtual bool IsPowerManagementIntialized ( void ); - - /*! - @function CheckPowerState - @abstract Called by clients to ensure device is in correct power state before issuing I/O. - @discussion Called by clients to ensure device is in correct power state before issuing I/O. - If the device is not ready to handle such requests, it gives the driver a chance to block the - thread until the device is ready. Subclasses should not need to override this method. - */ - virtual void CheckPowerState ( void ); - - /*! - @function ExecuteCommand - @abstract Called to send a SCSITask and transport it across the physical wire(s) to the device. - @discussion Called to send a SCSITask and transport it across the physical wire(s) to the device. - Subclasses internal to IOSCSIArchitectureModelFamily will need to override this method. Third - party subclasses should not need to override this method. - @param request A valid SCSITaskIdentifier representing the task to transport across the wire(s). - */ - virtual void ExecuteCommand ( SCSITaskIdentifier request ) = 0; - - /*! - @function AbortCommand - @abstract Obsolete. Do not use this method. - @discussion Obsolete. Do not use this method. - */ - virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier request ) = 0; - - /*! - @function IsProtocolServiceSupported - @abstract This method is called to query for support of a protocol specific service feature. - @discussion This method is called to query for support of a protocol specific service feature. - Subclasses of IOSCSIProtocolServices should override this method. - @param feature A valid SCSIProtocolFeature. See enums for SCSIProtocolFeature. - @param serviceValue A pointer to a structure/value that is used in conjunction with the feature - requested. See enums for SCSIProtocolFeature. NB: This parameter may be NULL for certain - feature requests. - @result <code>true</code> if the feature is supported, <code>false</code> otherwise. - */ - virtual bool IsProtocolServiceSupported ( - SCSIProtocolFeature feature, - void * serviceValue ) = 0; - - /*! - @function HandleProtocolServiceFeature - @abstract This method is called to enact support of a protocol specific service feature. - @discussion This method is called to enact support of a protocol specific service feature. - Subclasses of IOSCSIProtocolServices should override this method. - @param feature A valid SCSIProtocolFeature. See enums for SCSIProtocolFeature. - @param serviceValue A pointer to a structure/value that is used in conjunction with the feature - requested. See enums for SCSIProtocolFeature. NB: This parameter may be NULL for certain - feature requests. - @result <code>true</code> if the service feature request succeeded, <code>false</code> otherwise. - */ - virtual bool HandleProtocolServiceFeature ( - SCSIProtocolFeature feature, - void * serviceValue ) = 0; - -protected: - - // Reserve space for future expansion. - struct IOSCSIProtocolInterfaceExpansionData - { - IOWorkLoop * fWorkLoop; - }; - IOSCSIProtocolInterfaceExpansionData * fIOSCSIProtocolInterfaceReserved; - - // ------ Power Management Support ------ - - thread_call_t fPowerManagementThread; - IOCommandGate * fCommandGate; - UInt32 fCurrentPowerState; - UInt32 fProposedPowerState; - bool fPowerTransitionInProgress; - bool fPowerAckInProgress; - bool fPowerManagementInitialized; - - /*! - @function GetCommandGate - @abstract Accessor method to obtain the IOCommandGate. - @discussion Accessor method to obtain the IOCommandGate. - @result The IOCommandGate for this instance. May return NULL. - */ - IOCommandGate * GetCommandGate ( void ); - - /*! - @function InitializePowerManagement - @abstract This method is called to initialize power management. - @discussion This method is called to initialize power management. It will call PMinit(), joinPMTree(), - setIdleTimerPeriod(), and makeUsable(). This method does not call registerPowerDriver(). - Subclasses may override this method to change the behavior (such as the number of power states). - @param provider The power management provider (i.e. the provider to attach to in the PowerManagement - tree). This may be a device that is not in the PM Tree itself, in which case, the IOService plane - is traversed towards the root node in an effort to find a node in the PM Tree. - */ - virtual void InitializePowerManagement ( IOService * provider ); - - /*! - @function GetInitialPowerState - @abstract This method is called to obtain the initial power state of the device (usually the highest). - @discussion This method is called to obtain the initial power state of the device (usually the highest). - Subclasses must override this method. - @result A power state ordinal. - */ - virtual UInt32 GetInitialPowerState ( void ) = 0; - - /*! - @function finalize - @abstract Finalizes the destruction of an IOService object. - @discussion See IOService.h - Subclasses may override this method, but should call super::finalize(). - @result <code>true</code>. - */ - virtual bool finalize ( IOOptionBits options ); - - /*! - @function sHandleSetPowerState - @abstract The sHandleSetPowerState method is a static function used as C->C++ glue - for going behind the command gate. - @discussion The sHandleSetPowerState method is a static function used as C->C++ glue - for going behind the command gate. - @param self The 'this' pointer for the class. - @param powerStateOrdinal The power state to which device shall be changed. - @result A valid IOReturn code indicating success or failure. - */ - static IOReturn sHandleSetPowerState ( IOSCSIProtocolInterface * self, UInt32 powerStateOrdinal ); - - /*! - @function sGetPowerTransistionInProgress - @abstract The sGetPowerTransistionInProgress method is a static function used as C->C++ glue - for going behind the command gate. - @discussion The sGetPowerTransistionInProgress method is a static function used as C->C++ glue - for going behind the command gate. - @param self The 'this' pointer for the class. - @result <code>true</code> if a power state is in progress, otherwise <code>false</code>. - */ - static bool sGetPowerTransistionInProgress ( IOSCSIProtocolInterface * self ); - - /*! - @function HandleSetPowerState - @abstract The HandleSetPowerState method is called by the glue code and is on the - serialized side of the command gate. - @discussion The HandleSetPowerState method is called by the glue code and is on the - serialized side of the command gate. This allows us to touch any member - variables as necessary without any multi-threading issues. - Subclasses may override this method to change behavior. Third party subclasses - should not need to override this method, but may. - @param powerStateOrdinal The power state to which device shall be changed. - */ - virtual void HandleSetPowerState ( UInt32 powerStateOrdinal ); - - /*! - @function sPowerManagement - @abstract The sPowerManagement method is a static C-function which is called using - mach's thread_call API. It guarantees us a thread of execution which is - different than the power management thread and the workloop thread on which - we can issue commands to the device synchronously or asynchronously without - worrying about deadlocks. It calls through to HandlePowerChange, which is - a state machine used to direct power management. - @discussion The sPowerManagement method is a static C-function which is called using - mach's thread_call API. It guarantees us a thread of execution which is - different than the power management thread and the workloop thread on which - we can issue commands to the device synchronously or asynchronously without - worrying about deadlocks. It calls through to HandlePowerChange, which is - a state machine used to direct power management. - @param whichDevice The 'this' pointer. - */ - static void sPowerManagement ( thread_call_param_t whichDevice ); - - /*! - @function HandlePowerChange - @abstract The HandlePowerChange method is pure virtual and is left to each protocol or - application layer driver to implement. It is guaranteed to be called on its - own thread of execution and can make synchronous or asynchronous calls. - @discussion The HandlePowerChange method is pure virtual and is left to each protocol or - application layer driver to implement. It is guaranteed to be called on its - own thread of execution and can make synchronous or asynchronous calls. - Subclasses must override this method. Third party subclasses shouldn't need to override - this method but can to alter the default behavior. - */ - virtual void HandlePowerChange ( void ) = 0; - - /*! - @function sHandleCheckPowerState - @abstract The sHandleCheckPowerState method is a static function used as C->C++ glue - for going behind the command gate. - @discussion The sHandleCheckPowerState method is a static function used as C->C++ glue - for going behind the command gate. - @param self The 'this' pointer for the class. - */ - static void sHandleCheckPowerState ( IOSCSIProtocolInterface * self ); - - /*! - @function HandleCheckPowerState(void) - @abstract The HandleCheckPowerState (void) method is on the serialized side of the command - gate and can change member variables safely without multi-threading issues. - It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) - with the max power state the class registered with. - @discussion The HandleCheckPowerState (void) method is on the serialized side of the command - gate and can change member variables safely without multi-threading issues. - It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) - with the max power state the class registered with. - Subclasses must override this method. Third party subclasses shouldn't need to override - this method but can to alter the default behavior. - */ - virtual void HandleCheckPowerState ( void ) = 0; - - /*! - @function HandleCheckPowerState(UInt32 maxPowerState) - @abstract The HandleCheckPowerState(UInt32 maxPowerState) method is called by - the subclasses and is passed the maxPowerState number given to the power - manager at initialization time. This guarantees the threads block until that - power state has been achieved. - @discussion The HandleCheckPowerState(UInt32 maxPowerState) method is called by - the subclasses and is passed the maxPowerState number given to the power - manager at initialization time. This guarantees the threads block until that - power state has been achieved. - @param maxPowerState The maximum power state in the power state array. - */ - void HandleCheckPowerState ( UInt32 maxPowerState ); - - /*! - @function TicklePowerManager(void) - @abstract The TicklePowerManager(void) method is called by CheckPowerState and - sends an activity tickle to the power manager so that the idle timer is - reset. - @discussion The TicklePowerManager(void) method is called by CheckPowerState and - sends an activity tickle to the power manager so that the idle timer is - reset. - Subclasses must override this method. Third party subclasses shouldn't need to override - this method but can to alter the default behavior. - */ - virtual void TicklePowerManager ( void ) = 0; - - /*! - @function TicklePowerManager(UInt32 maxPowerState) - @abstract The TicklePowerManager(UInt32 maxPowerState) method is a convenience - function which can be called by subclasses in TicklePowerManager (void) - in order to tell the power manager to reset idle timer or bring the device - into the requested state. It returns whatever is returned by activityTickle - (true if device is in the requested state, false if it is not). - @discussion The TicklePowerManager(UInt32 maxPowerState) method is a convenience - function which can be called by subclasses in TicklePowerManager(void) - in order to tell the power manager to reset idle timer or bring the device - into the requested state. It returns whatever is returned by activityTickle - (true if device is in the requested state, false if it is not). - @param maxPowerState The maximum power state in the power state array. - @result The result of the call to activityTickle(). See IOService.h for details. - */ - bool TicklePowerManager ( UInt32 maxPowerState ); - - // ------ User Client Support ------ - - bool fUserClientExclusiveControlled; - IOService * fUserClient; - - /*! - @function sGetUserClientExclusivityState - @abstract The sGetUserClientExclusivityState method is a static function used as C->C++ glue - for going behind the command gate. - @discussion The sGetUserClientExclusivityState method is a static function used as C->C++ glue - for going behind the command gate. - @param self The 'this' pointer for the class. - @param state A pointer to a bool in which the state should be set. - */ - static void sGetUserClientExclusivityState ( IOSCSIProtocolInterface * self, bool * state ); - - /*! - @function sSetUserClientExclusivityState - @abstract The sSetUserClientExclusivityState method is a static function used as C->C++ glue - for going behind the command gate. - @discussion The sSetUserClientExclusivityState method is a static function used as C->C++ glue - for going behind the command gate. - @param self The 'this' pointer for the class. - @param result A pointer to an IOReturn for the resulting status. - @param userClient The instance of SCSITaskUserClient for which to change exclusivity state. - @param state A bool indicating the desired state to set. - */ - static void sSetUserClientExclusivityState ( IOSCSIProtocolInterface * self, IOReturn * result, IOService * userClient, bool state ); - - /*! - @function HandleGetUserClientExclusivityState - @abstract Gets the current exclusivity state of the user client. - @discussion The HandleGetUserClientExclusivityState() method is called on the serialized side - of the command gate to determine if any user client is holding exclusive access at the current - time. See discussion for GetUserClientExclusivityState(). - Subclasses may override this method to alter default behavior. Third party subclasses should - not need to override this method. - @result <code>true</code> if a user client is in exclusive control of the device, <code>false</code> otherwise. - */ - virtual bool HandleGetUserClientExclusivityState ( void ); - - /*! - @function HandleSetUserClientExclusivityState - @abstract Sets the current exclusivity state of the user client. - @discussion The HandleSetUserClientExclusivityState() method is called on the serialized side - of the command gate to set the exclusive access mode. - @param userClient The instance of SCSITaskUserClient for which to change exclusivity state. - @param state Exclusivity state. <code>true</code> means exclusive access is desired, <code>false</code> - means exclusive access is being released. - @result A valid IOReturn code indicating success or the type of failure. - */ - virtual IOReturn HandleSetUserClientExclusivityState ( IOService * userClient, bool state ); - -public: - - // ------- SCSI Architecture Model Task Management Functions ------ - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 1 ); - /*! - @function AbortTask - @abstract Aborts a task based on the Logical Unit and tagged task identifier. - @discussion Aborts a task based on the Logical Unit and tagged task identifier. - Subclasses must override this method. Third party subclasses should not need to override - this method. - @param theLogicalUnit This value should be zero unless the device driver is - more complex and managing multiple Logical Units. - @param theTag A valid SCSITaggedTaskIdentifier representing an outstanding SCSITask. - @result A valid SCSIServiceResponse code. - */ - virtual SCSIServiceResponse AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ) = 0; - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 2 ); - /*! - @function AbortTaskSet - @abstract Aborts a task set based on the Logical Unit. - @discussion Aborts a task set based on the Logical Unit. - Subclasses must override this method. Third party subclasses should not need to override - this method. - @param theLogicalUnit This value should be zero unless the device driver is - more complex and managing multiple Logical Units. - @result A valid SCSIServiceResponse code. - */ - virtual SCSIServiceResponse AbortTaskSet ( UInt8 theLogicalUnit ) = 0; - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 3 ); - /*! - @function ClearACA - @abstract Clears an Auto-Contingent Allegiance (ACA) for the specified Logical Unit. - @discussion Clears an Auto-Contingent Allegiance (ACA) for the specified Logical Unit. - Subclasses must override this method. Third party subclasses should not need to override - this method. - @param theLogicalUnit This value should be zero unless the device driver is - more complex and managing multiple Logical Units. - @result A valid SCSIServiceResponse code. - */ - virtual SCSIServiceResponse ClearACA ( UInt8 theLogicalUnit ) = 0; - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 4 ); - /*! - @function ClearTaskSet - @abstract Clears a task set for the specified Logical Unit. - @discussion Clears a task set for the specified Logical Unit. - Subclasses must override this method. Third party subclasses should not need to override - this method. - @param theLogicalUnit This value should be zero unless the device driver is - more complex and managing multiple Logical Units. - @result A valid SCSIServiceResponse code. - */ - virtual SCSIServiceResponse ClearTaskSet ( UInt8 theLogicalUnit ) = 0; - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 5 ); - /*! - @function LogicalUnitReset - @abstract Resets the specified Logical Unit. - @discussion Resets the specified Logical Unit. - Subclasses must override this method. Third party subclasses should not need to override - this method. - @param theLogicalUnit This value should be zero unless the device driver is - more complex and managing multiple Logical Units. - @result A valid SCSIServiceResponse code. - */ - virtual SCSIServiceResponse LogicalUnitReset ( UInt8 theLogicalUnit ) = 0; - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 6 ); - - /*! - @function TargetReset - @abstract Resets the target device. - @discussion Resets the target device. - Subclasses must override this method. Third party subclasses should not need to override - this method. - @result A valid SCSIServiceResponse code. - */ - virtual SCSIServiceResponse TargetReset ( void ) = 0; - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 8 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 9 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 10 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 11 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 12 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 16 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_PROTOCOL_INTERFACE_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIProtocolServices.h b/i386/include/IOKit/scsi/IOSCSIProtocolServices.h deleted file mode 100644 index 6b9df79..0000000 --- a/i386/include/IOKit/scsi/IOSCSIProtocolServices.h +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_SCSI_PROTOCOL_SERVICES_H_ -#define _IOKIT_IO_SCSI_PROTOCOL_SERVICES_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// Mach includes -#include <kern/queue.h> - -// General IOKit headers -#include <IOKit/IOLib.h> -#include <IOKit/IOCommandGate.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/SCSITask.h> -#include <IOKit/scsi/IOSCSIProtocolInterface.h> -#include <IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h> - - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - -// Power Management values -enum -{ - kSCSIProtocolLayerPowerStateOff = 0, - kSCSIProtocolLayerPowerStateOn = 1, - kSCSIProtocolLayerNumDefaultStates = 2 -}; - -// Forward definitions of internal use only classes -class SCSITask; - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIProtocolServices : public IOSCSIProtocolInterface -{ - - OSDeclareAbstractStructors ( IOSCSIProtocolServices ) - -private: - - // The head pointer for the queue of waiting SCSI Tasks. - SCSITask * fSCSITaskQueueHead; /* OBSOLETE */ - - // This is the lock for preventing multiple access while - // manipulating the SCSI Task queue. - IOSimpleLock * fQueueLock; - - // The internal flag to indicate whether service requests should be - // executed or immediately errored, such as when a device is removed. - bool fAllowServiceRequests; - -protected: - - // Reserve space for future expansion. - struct IOSCSIProtocolServicesExpansionData - { - // For internal use only. Do not use. - UInt32 fSemaphore; - bool fRequiresAutosenseDescriptor; - SCSITaskCompletion fCompletionRoutine; - queue_head_t fTaskQueueHead; - queue_head_t fAutoSenseQueueHead; - }; - IOSCSIProtocolServicesExpansionData * fIOSCSIProtocolServicesReserved; - - // ---- Protocol transport methods overridden by each subclass ---- - - // Send a SCSI Command to the device. If the command was sent to the - // device and is pending completion, the subclass should return true and - // return back the kSCSIServiceResponse_Request_In_Process response. - // If the command completes immediately with an error, the subclass will - // return true and return back the appropriate status. - // if the subclass is currently processing all the commands it can, the - // subclass will return false and the command will be resent next time - // CommandCompleted is called. - virtual bool SendSCSICommand ( SCSITaskIdentifier request, - SCSIServiceResponse * serviceResponse, - SCSITaskStatus * taskStatus ) = 0; - - virtual SCSIServiceResponse AbortSCSICommand ( SCSITaskIdentifier request ) = 0; - - // ---- Command completion notification method --------- - // Subclasses will call this inherited method when the command - // executed by SendSCSICommand has completed. - // The subclasses will return a service response that is derived - // from protocol specific status information and as specified in - // the specification for that protocol. - // If the service response is kSCSIServiceResponse_TASK_COMPLETE, - // the subclass will also return a SCSI status value. - void CommandCompleted ( SCSITaskIdentifier request, - SCSIServiceResponse serviceResponse, - SCSITaskStatus taskStatus ); - - // ---- Utility methods for accessing SCSITask attributes ---- - // Method for retreiving the attribute for a task. - SCSITaskAttribute GetTaskAttribute ( SCSITaskIdentifier request ); - - bool SetTaskState ( SCSITaskIdentifier request, - SCSITaskState newTaskState ); - SCSITaskState GetTaskState ( SCSITaskIdentifier request ); - - UInt8 GetLogicalUnitNumber ( SCSITaskIdentifier request ); - - // Method to determine the size of the command descriptor block. - UInt8 GetCommandDescriptorBlockSize ( SCSITaskIdentifier request ); - - // This will always return the define max CDB size. If the Protocol Layer - // driver only supports a smaller size CDB, it will have to create a local - // SCSICommandDescriptorBlock variable to get the CDB data and then - // transfer the needed bytes from there. - bool GetCommandDescriptorBlock ( SCSITaskIdentifier request, - SCSICommandDescriptorBlock * cdbData ); - - // Get the transfer direction for the request. - UInt8 GetDataTransferDirection ( SCSITaskIdentifier request ); - - UInt64 GetRequestedDataTransferCount ( SCSITaskIdentifier request ); - - bool SetRealizedDataTransferCount ( SCSITaskIdentifier request, - UInt64 newRealizedDataCount ); - - UInt64 GetRealizedDataTransferCount ( SCSITaskIdentifier request ); - - IOMemoryDescriptor * GetDataBuffer ( SCSITaskIdentifier request ); - - UInt64 GetDataBufferOffset ( SCSITaskIdentifier request ); - - UInt32 GetTimeoutDuration ( SCSITaskIdentifier request ); - - UInt64 GetAutosenseRequestedDataTransferCount ( SCSITaskIdentifier request ); - - // Set the auto sense data that was returned for the SCSI Task. - // A return value of true indicates that the data was copied to the member - // sense data structure, false indicates that the data could not be copied. - bool SetAutoSenseData ( SCSITaskIdentifier request, - SCSI_Sense_Data * senseData ); // DEPRECATED, use the one on the line below. - - bool SetAutoSenseData ( SCSITaskIdentifier request, - SCSI_Sense_Data * senseData, - UInt8 senseDataSize ); - - void EnsureAutosenseDescriptorExists ( SCSITaskIdentifier request ); - - bool SetProtocolLayerReference ( - SCSITaskIdentifier request, - void * newReferenceValue ); - void * GetProtocolLayerReference ( SCSITaskIdentifier request ); - - - bool SetTaskExecutionMode ( - SCSITaskIdentifier request, - SCSITaskMode newTaskMode ); - SCSITaskMode GetTaskExecutionMode ( SCSITaskIdentifier request ); - - // ---- Method calls for messaging device connectedness ---- - void SendNotification_DeviceRemoved ( void ); - - void SendNotification_VerifyDeviceState ( void ); - - // -- SCSI Task Queue Management Methods -- - // Following are the commands used to manipulate the queue of pending SCSI Tasks. - - // Add the SCSI Task to the queue. The Task's Attribute determines where in - // the queue the Task is placed. - void AddSCSITaskToQueue ( SCSITaskIdentifier request ); - - // Add the SCSI Task to the head of the queue. This is used when the task - // has been removed from the head of the queue, but the subclass indicates - // that it can not yet process this task. - void AddSCSITaskToHeadOfQueue ( SCSITask * request ); - - // Remove the next SCSI Task for the queue and return it. - SCSITask * RetrieveNextSCSITaskFromQueue ( void ); - - // Check to see if the SCSI Task resides in the queue and abort it if it does. - bool AbortSCSITaskFromQueue ( SCSITask * request ); - - // Methods for sending and completing SCSI tasks - void SendSCSITasksFromQueue ( void ); - - void RejectSCSITasksCurrentlyQueued ( void ); - - void ProcessCompletedTask ( SCSITaskIdentifier request, - SCSIServiceResponse serviceResponse, - SCSITaskStatus taskStatus ); - void RejectTask ( SCSITaskIdentifier request ); - - // ------ Power Management Support ------ - - // The InitializePowerManagement method is called to initialize power management. - // In the protocol services layer, this method calls the protocol interface layer - // to initialize power management state variables and then registers the protocol - // layer driver with the power manager with two(2) states, ON and OFF. - virtual void InitializePowerManagement ( IOService * provider ); - - // The GetInitialPowerState method is called once, right after InitializePowerManagement() - // in order to determine what state the device is initially in at startup time (usually - // the highest power mode). - virtual UInt32 GetInitialPowerState ( void ); - - // The HandlePowerChange method is pure virtual and is left to each protocol or - // application layer driver to implement. It is guaranteed to be called on its - // own thread of execution and can make synchronous or asynchronous calls. - virtual void HandlePowerChange ( void ); - - // The HandleCheckPowerState (void) method is on the serialized side of the command - // gate and can change member variables safely without multi-threading issues. - // It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) - // with the max power state the class registered with. - virtual void HandleCheckPowerState ( void ); - - // The TicklePowerManager ( void ) method is called by CheckPowerState and - // sends an activity tickle to the power manager so that the idle timer is - // reset. - virtual void TicklePowerManager ( void ); - - // The HandlePowerOff method is called to do any bus specific activity - // necessary before shutting down and going to sleep. - virtual IOReturn HandlePowerOff ( void ); - - // The HandlePowerOn method is called to do any bus specific activity - // necessary to recover from power-on/wake from sleep (e.g. bus reset on ATAPI) - virtual IOReturn HandlePowerOn ( void ); - -public: - - virtual bool start ( IOService * provider ); - virtual void free ( void ); - - void RegisterSCSITaskCompletionRoutine ( SCSITaskCompletion completion ); - - // ------- SCSI Architecture Model Task Management Functions ------ - // The ExecuteCommand method will take a SCSI Task and transport - // it across the physical wire(s) to the device - void ExecuteCommand ( SCSITaskIdentifier request ); - - // The Task Management function to allow the SCSI Application Layer client to request - // that a specific task be aborted. - SCSIServiceResponse AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ); - - // The Task Management function to allow the SCSI Application Layer client to request - // that a all tasks curerntly in the task set be aborted. - SCSIServiceResponse AbortTaskSet ( UInt8 theLogicalUnit ); - - SCSIServiceResponse ClearACA ( UInt8 theLogicalUnit ); - - SCSIServiceResponse ClearTaskSet ( UInt8 theLogicalUnit ); - - SCSIServiceResponse LogicalUnitReset ( UInt8 theLogicalUnit ); - - SCSIServiceResponse TargetReset ( void ); - - // ************* Obsoleted Member Routine **************** - // The AbortCommand method is replaced by the AbortTask Management function and - // should no longer be called. - virtual SCSIServiceResponse AbortCommand ( SCSITaskIdentifier request ); - - - // ---- Method used for determining protocol or physical interconnect characteristics. ---- - // The IsProtocolServiceSupported will return true if the specified - // feature is supported by the protocol layer. If the service has a value that must be - // returned, it will be returned in the serviceValue output parameter. - virtual bool IsProtocolServiceSupported ( SCSIProtocolFeature feature, void * serviceValue ) = 0; - - // The HandleProtocolServiceFeature instructs the Protocol Services driver to perform the necessary - // tasks for the indicated feature. - virtual bool HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void * serviceValue ) = 0; - -protected: - - // ----- Protocol Services Driver request handlers for Task Management functions ----- - // These should be abstract so that every Protocol Services Driver would have to - // override them, but since they are new member routines, this class will provide - // a default implementation. - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 1 ); - virtual SCSIServiceResponse HandleAbortTask ( - UInt8 theLogicalUnit, - SCSITaggedTaskIdentifier theTag ); - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 2 ); - virtual SCSIServiceResponse HandleAbortTaskSet ( - UInt8 theLogicalUnit ); - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 3 ); - virtual SCSIServiceResponse HandleClearACA ( - UInt8 theLogicalUnit ); - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 4 ); - virtual SCSIServiceResponse HandleClearTaskSet ( - UInt8 theLogicalUnit ); - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 5 ); - virtual SCSIServiceResponse HandleLogicalUnitReset ( - UInt8 theLogicalUnit ); - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 6 ); - // The HandleTargetReset member routine requests that the Protocol Services Driver - // perform the necessary steps detailed in the specification that defines the - // protocol the driver represents for the TargetReset management function. - virtual SCSIServiceResponse HandleTargetReset ( void ); - - - OSMetaClassDeclareReservedUsed ( IOSCSIProtocolServices, 7 ); - // The CreateSCSITargetDevice member routine will create the appropriate object - // to represent the Target portion of a SCSI Device. This object is responsible - // for managing the Target functions of the SCSI Device including the Task Manager and - // Logical Units. - // If the SCSITargetDevice object was successfully created, a true value will be - // returned, otherwisw, this will return false. - virtual bool CreateSCSITargetDevice ( void ); - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 8 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 9 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 10 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 11 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 12 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSIProtocolServices, 16 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_PROTOCOL_SERVICES_H_ */ diff --git a/i386/include/IOKit/scsi/IOSCSIReducedBlockCommandsDevice.h b/i386/include/IOKit/scsi/IOSCSIReducedBlockCommandsDevice.h deleted file mode 100644 index 955fd6e..0000000 --- a/i386/include/IOKit/scsi/IOSCSIReducedBlockCommandsDevice.h +++ /dev/null @@ -1,438 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_SCSI_REDUCED_BLOCK_COMMANDS_DEVICE_H_ -#define _IOKIT_IO_SCSI_REDUCED_BLOCK_COMMANDS_DEVICE_H_ - -#if defined(KERNEL) && defined(__cplusplus) - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// General IOKit headers -#include <IOKit/IOLib.h> -#include <IOKit/IOMemoryDescriptor.h> - -// Generic IOKit storage related headers -#include <IOKit/storage/IOStorage.h> - -// SCSI Architecture Model Family includes -#include <IOKit/scsi/IOSCSIPrimaryCommandsDevice.h> - - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - - -// RBC power states as defined in T10:1240D SCSI Reduced Block Commands (RBC) -// Revision 10a, August 18, 1999, page 13. -enum -{ - kRBCPowerStateSystemSleep = 0, - kRBCPowerStateSleep = 1, - kRBCPowerStateStandby = 2, - kRBCPowerStateIdle = 3, - kRBCPowerStateActive = 4, - kRBCNumPowerStates = 5 -}; - -enum -{ - kMediaStateUnlocked = 0, - kMediaStateLocked = 1 -}; - -#define kCapacityDataBufferSize 8 - -// Forward declaration for the SCSIReducedBlockCommands that is used internally by the -// IOSCSIReducedBlockCommandsDevice class. -class SCSIReducedBlockCommands; - -//----------------------------------------------------------------------------- -// Class Declaration -//----------------------------------------------------------------------------- - -class IOSCSIReducedBlockCommandsDevice : public IOSCSIPrimaryCommandsDevice -{ - - OSDeclareAbstractStructors ( IOSCSIReducedBlockCommandsDevice ); - -private: - -#ifndef __LP64__ - - SCSIReducedBlockCommands * fSCSIReducedBlockCommandObject; - SCSIReducedBlockCommands * GetSCSIReducedBlockCommandObject ( void ); - -#endif /* !__LP64__ */ - - static void AsyncReadWriteComplete ( SCSITaskIdentifier completedTask ); - -protected: - - // Reserve space for future expansion. - struct IOSCSIReducedBlockCommandsDeviceExpansionData - { - IONotifier * fPowerDownNotifier; - bool fMediumRemovalPrevented; - bool fKnownManualEject; - UInt32 fPollingMode; - bool fProtocolSpecificPowerControl; - }; - IOSCSIReducedBlockCommandsDeviceExpansionData * fIOSCSIReducedBlockCommandsDeviceReserved; - - #define fPowerDownNotifier fIOSCSIReducedBlockCommandsDeviceReserved->fPowerDownNotifier - #define fMediumRemovalPrevented fIOSCSIReducedBlockCommandsDeviceReserved->fMediumRemovalPrevented - #define fKnownManualEject fIOSCSIReducedBlockCommandsDeviceReserved->fKnownManualEject - #define fPollingMode fIOSCSIReducedBlockCommandsDeviceReserved->fPollingMode - #define fProtocolSpecificPowerControl fIOSCSIReducedBlockCommandsDeviceReserved->fProtocolSpecificPowerControl - - bool fMediaChanged; - bool fMediaPresent; - - // The byte count of each physical block on the media. - UInt32 fMediaBlockSize; - - // The total number of blocks of mediaBlockSize on the media. - UInt32 fMediaBlockCount; - - // Flags used to indicate device feature - bool fMediaIsRemovable; - bool fMediaIsWriteProtected; - - thread_call_t fPollingThread; - - enum - { - kPollingMode_Suspended = 0, - kPollingMode_NewMedia = 1, - kPollingMode_MediaRemoval = 2 - }; - - virtual void CreateStorageServiceNub ( void ); - virtual bool DetermineDeviceCharacteristics ( void ); - virtual void PollForMedia ( void ); - virtual void EnablePolling ( void ); - virtual void DisablePolling ( void ); - virtual void CheckWriteProtection ( void ); - virtual void SetMediaCharacteristics ( UInt32 blockSize, UInt32 blockCount ); - virtual void ResetMediaCharacteristics ( void ); - virtual bool ClearNotReadyStatus ( void ); - - virtual IOReturn IssueRead ( IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueWrite ( IOMemoryDescriptor* buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueRead ( IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - void * clientData ); - - virtual IOReturn IssueWrite ( IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - void * clientData ); - -#ifndef __LP64__ - - // This method will retreive the SCSI Primary Command Set object for - // the class. For subclasses, this will be overridden using a - // dynamic cast on the subclasses base command set object. - virtual SCSIPrimaryCommands * GetSCSIPrimaryCommandObject ( void ); - -#endif /* !__LP64__ */ - - // ----- Power Management Support ------ - - // We override this method to set our power states and register ourselves - // as a power policy maker. - virtual void InitializePowerManagement ( IOService * provider ); - - // We override this method so that when we register for power management, - // we go to our active power state (which the drive is definitely in - // at startup time). - virtual UInt32 GetInitialPowerState ( void ); - - // We override this method in order to provide the number of transitions - // from Fully active to Sleep state so that the idle timer can be adjusted - // to the appropriate time period based on the disk spindown time set in - // the Energy Saver prefs panel. - virtual UInt32 GetNumberOfPowerStateTransitions ( void ); - - // The TicklePowerManager method is called to tell the power manager that the - // device needs to be in a certain power state to handle requests. - virtual void TicklePowerManager ( void ); - - // The HandlePowerChange method is the state machine for power management. - // It is guaranteed to be on its own thread of execution (different from - // the power manager thread AND the workloop thread. This routine can - // send sync or async calls to the drive without worrying about threading - // issues. - virtual void HandlePowerChange ( void ); - - // The HandleCheckPowerState (void) method is on the serialized side of the command - // gate and can change member variables safely without multi-threading issues. - // It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState ) - // with the max power state the class registered with. - virtual void HandleCheckPowerState ( void ); - - // The CheckMediaPresence method is called to see if the media which we - // anticipated being there is still there. - virtual bool CheckMediaPresence ( void ); - - virtual bool InitializeDeviceSupport ( void ); - virtual void StartDeviceSupport ( void ); - virtual void SuspendDeviceSupport ( void ); - virtual void ResumeDeviceSupport ( void ); - virtual void StopDeviceSupport ( void ); - virtual void TerminateDeviceSupport ( void ); - - virtual void free ( void ); - -#ifndef __LP64__ - - virtual bool CreateCommandSetObjects ( void ); - virtual void FreeCommandSetObjects ( void ); - -#endif /* !__LP64__ */ - -public: - - virtual IOReturn SyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn AsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - void * clientData ); - - - virtual IOReturn EjectTheMedia ( void ); - virtual IOReturn FormatMedia ( UInt64 byteCapacity ); - virtual UInt32 GetFormatCapacities ( UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - virtual IOReturn LockUnlockMedia ( bool doLock ); - virtual IOReturn SynchronizeCache ( void ); - virtual IOReturn ReportBlockSize ( UInt64 * blockSize ); - virtual IOReturn ReportEjectability ( bool * isEjectable ); - virtual IOReturn ReportLockability ( bool * isLockable ); - virtual IOReturn ReportPollRequirements ( bool * pollIsRequired, - bool * pollIsExpensive ); - virtual IOReturn ReportMaxReadTransfer ( UInt64 blockSize, - UInt64 * max ); - virtual IOReturn ReportMaxValidBlock ( UInt64 * maxBlock ); - virtual IOReturn ReportMaxWriteTransfer ( UInt64 blockSize, - UInt64 * max ); - virtual IOReturn ReportMediaState ( bool * mediaPresent, - bool * changed ); - virtual IOReturn ReportRemovability ( bool * isRemovable ); - virtual IOReturn ReportWriteProtection ( bool * isWriteProtected ); - - static void sPollForMedia ( void * pdtDriver, void * refCon ); - - -protected: - - - // The FORMAT_UNIT command as defined in section 5.1 - virtual bool FORMAT_UNIT ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField1Bit PROGRESS, - SCSICmdField1Bit PERCENT_TIME, - SCSICmdField1Bit INCREMENT ); - - // The INQUIRY command as defined in SPC-2 w/o CONTROL byte - virtual bool INQUIRY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit CMDDT, - SCSICmdField1Bit EVPD, - SCSICmdField1Byte PAGE_OR_OPERATION_CODE, - SCSICmdField1Byte ALLOCATION_LENGTH ); - - // The MODE_SELECT(6) command as defined in SPC-2 w/o CONTROL byte - virtual bool MODE_SELECT_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit PF, - SCSICmdField1Bit SP, - SCSICmdField1Byte PARAMETER_LIST_LENGTH ); - - // The MODE_SENSE(6) command as defined in SPC-2 w/o CONTROL byte - virtual bool MODE_SENSE_6 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit DBD, - SCSICmdField2Bit PC, - SCSICmdField6Bit PAGE_CODE, - SCSICmdField1Byte ALLOCATION_LENGTH ); - - // The PERSISTENT_RESERVE_IN command as defined in SPC-2 w/o CONTROL byte - virtual bool PERSISTENT_RESERVE_IN ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField5Bit SERVICE_ACTION, - SCSICmdField2Byte ALLOCATION_LENGTH ); - - // The PERSISTENT_RESERVE_OUT command as defined in SPC-2 w/o CONTROL byte - virtual bool PERSISTENT_RESERVE_OUT ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField5Bit SERVICE_ACTION, - SCSICmdField4Bit SCOPE, - SCSICmdField4Bit TYPE ); - - // The PREVENT_ALLOW_MEDIUM_REMOVAL command as defined in SPC-2 w/o CONTROL byte - virtual bool PREVENT_ALLOW_MEDIUM_REMOVAL ( - SCSITaskIdentifier request, - SCSICmdField2Bit PREVENT ); - - // The READ_10 command as defined in section 5.2 - virtual bool READ_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH ); - - // The READ_CAPACITY command as defined in section 5.3 - virtual bool READ_CAPACITY ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer ); - - // The RELEASE(6) command as defined in SPC-2 w/o CONTROL byte - virtual bool RELEASE_6 ( - SCSITaskIdentifier request ); - - // The REQUEST_SENSE command as defined in SPC-2 w/o CONTROL byte - virtual bool REQUEST_SENSE ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Byte ALLOCATION_LENGTH ); - - // The RESERVE(6) command as defined in SPC-2 w/o CONTROL byte - virtual bool RESERVE_6 ( - SCSITaskIdentifier request ); - - // The START_STOP_UNIT command as defined in section 5.4 - virtual bool START_STOP_UNIT ( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField4Bit POWER_CONDITIONS, - SCSICmdField1Bit LEOJ, - SCSICmdField1Bit START ); - - // The SYNCRONIZE_CACHE command as defined in section 5.5 - virtual bool SYNCHRONIZE_CACHE ( - SCSITaskIdentifier request ); - - // The TEST_UNIT_READY command as defined in SPC-2 w/o CONTROL byte - virtual bool TEST_UNIT_READY ( - SCSITaskIdentifier request ); - - // The VERIFY command as defined in section 5.7 - virtual bool VERIFY ( - SCSITaskIdentifier request, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte VERIFICATION_LENGTH ); - - // The WRITE_10 command as defined in section 5.6 - virtual bool WRITE_10 ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit FUA, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH ); - - // The WRITE_BUFFER command as defined in SPC-2 w/o CONTROL byte - virtual bool WRITE_BUFFER ( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField4Bit MODE, - SCSICmdField1Byte BUFFER_ID, - SCSICmdField3Byte BUFFER_OFFSET, - SCSICmdField3Byte PARAMETER_LIST_LENGTH ); - - - - /* Added with 10.2 */ - OSMetaClassDeclareReservedUsed ( IOSCSIReducedBlockCommandsDevice, 1 ); - -public: - - virtual IOReturn PowerDownHandler ( void * refCon, - UInt32 messageType, - IOService * provider, - void * messageArgument, - vm_size_t argSize ); - - - /* Added with 10.2 */ - OSMetaClassDeclareReservedUsed ( IOSCSIReducedBlockCommandsDevice, 2 ); - -protected: - - virtual void SetMediaIcon ( void ); - - - /* Added with 10.3.3 */ - OSMetaClassDeclareReservedUsed ( IOSCSIReducedBlockCommandsDevice, 3 ); - -protected: - - virtual void AsyncReadWriteCompletion ( SCSITaskIdentifier completedTask ); - - -private: - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 8 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 9 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 10 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 11 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 12 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSIReducedBlockCommandsDevice, 16 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_SCSI_REDUCED_BLOCK_COMMANDS_DEVICE_H_ */ diff --git a/i386/include/IOKit/scsi/SCSICmds_INQUIRY_Definitions.h b/i386/include/IOKit/scsi/SCSICmds_INQUIRY_Definitions.h deleted file mode 100644 index 55a6a4c..0000000 --- a/i386/include/IOKit/scsi/SCSICmds_INQUIRY_Definitions.h +++ /dev/null @@ -1,923 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_SCSI_CMDS_INQUIRY_H_ -#define _IOKIT_SCSI_CMDS_INQUIRY_H_ - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -#if KERNEL -#include <IOKit/IOTypes.h> -#else -#include <CoreFoundation/CoreFoundation.h> -#endif - - -/*! @header SCSI Inquiry Definitions - @discussion - This file contains all definitions for the data returned from - the INQUIRY (0x12) command. -*/ - - -/*! - * @enum Payload sizes - * @discussion - * Definitions for sizes related to the INQUIRY data. - * @constant kINQUIRY_StandardDataHeaderSize - * INQUIRY data header size. - * @constant kINQUIRY_MaximumDataSize - * Maximum size for INQUIRY data. -*/ -enum -{ - kINQUIRY_StandardDataHeaderSize = 5, - kINQUIRY_MaximumDataSize = 255 -}; - - -/*! -@enum INQUIRY field sizes -@discussion -Sizes for some of the inquiry data fields. -@constant kINQUIRY_VENDOR_IDENTIFICATION_Length -Size of VENDOR_IDENTIFICATION field. -@constant kINQUIRY_PRODUCT_IDENTIFICATION_Length -Size of PRODUCT_IDENTIFICATION field. -@constant kINQUIRY_PRODUCT_REVISION_LEVEL_Length -Size of PRODUCT_REVISION_LEVEL field. -*/ -enum -{ - kINQUIRY_VENDOR_IDENTIFICATION_Length = 8, - kINQUIRY_PRODUCT_IDENTIFICATION_Length = 16, - kINQUIRY_PRODUCT_REVISION_LEVEL_Length = 4 -}; - - -/*! -@struct SCSICmd_INQUIRY_StandardData -@discussion -This structure defines the format of the required standard data that is -returned for the INQUIRY command. This is the data that is required to -be returned from all devices. -*/ -typedef struct SCSICmd_INQUIRY_StandardData -{ - UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. - UInt8 RMB; // 7 = removable - UInt8 VERSION; // 7/6 = ISO/IEC, 5-3 = ECMA, 2-0 = ANSI. - UInt8 RESPONSE_DATA_FORMAT; // 7 = AERC, 6 = Obsolete, 5 = NormACA, 4 = HiSup 3-0 = Response data format. (SPC-3 obsoletes AERC) - // If ANSI Version = 0, this is ATAPI and bits 7-4 = ATAPI version. - UInt8 ADDITIONAL_LENGTH; // Number of additional bytes available in inquiry data - UInt8 SCCSReserved; // SCC-2 device flag and reserved fields (SPC-3 adds PROTECT 3PC TPGS, and ACC) - UInt8 flags1; // First byte of support flags (See SPC-3 section 6.4.2) - UInt8 flags2; // Second byte of support flags (Byte 7) (See SPC-3 section 6.4.2) - char VENDOR_IDENTIFICATION[kINQUIRY_VENDOR_IDENTIFICATION_Length]; - char PRODUCT_IDENTIFICATION[kINQUIRY_PRODUCT_IDENTIFICATION_Length]; - char PRODUCT_REVISION_LEVEL[kINQUIRY_PRODUCT_REVISION_LEVEL_Length]; -} SCSICmd_INQUIRY_StandardData; -typedef SCSICmd_INQUIRY_StandardData * SCSICmd_INQUIRY_StandardDataPtr; - - -/*! -@struct SCSICmd_INQUIRY_StandardDataAll -@discussion -This structure defines the all of the fields that can be returned in -repsonse to the INQUIRy request for the standard data. There is no -requirement as to how much of the additional data must be returned by a device. -*/ -typedef struct SCSICmd_INQUIRY_StandardDataAll -{ - UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. - UInt8 RMB; // 7 = removable - UInt8 VERSION; // 7/6 = ISO/IEC, 5-3 = ECMA, 2-0 = ANSI. - UInt8 RESPONSE_DATA_FORMAT; // 7 = AERC, 6 = Obsolete, 5 = NormACA, 4 = HiSup 3-0 = Response data format. - // If ANSI Version = 0, this is ATAPI and bits 7-4 = ATAPI version. - UInt8 ADDITIONAL_LENGTH; // Number of additional bytes available in inquiry data - UInt8 SCCSReserved; // SCC-2 device flag and reserved fields - UInt8 flags1; // First byte of support flags (Byte 6) - UInt8 flags2; // Second byte of support flags (Byte 7) - char VENDOR_IDENTIFICATION[kINQUIRY_VENDOR_IDENTIFICATION_Length]; - char PRODUCT_IDENTIFICATION[kINQUIRY_PRODUCT_IDENTIFICATION_Length]; - char PRODUCT_REVISION_LEVEL[kINQUIRY_PRODUCT_REVISION_LEVEL_Length]; - - // Following is the optional data that may be returned by a device. - UInt8 VendorSpecific1[20]; - UInt8 flags3; // Third byte of support flags, mainly SPI-3 (Byte 56) - UInt8 Reserved1; - UInt16 VERSION_DESCRIPTOR[8]; - UInt8 Reserved2[22]; - UInt8 VendorSpecific2[160]; -} SCSICmd_INQUIRY_StandardDataAll; - - -/*! -@enum Peripheral Qualifier -@discussion -Inquiry Peripheral Qualifier definitions -@constant kINQUIRY_PERIPHERAL_QUALIFIER_Connected -Peripheral Device is connected. -@constant kINQUIRY_PERIPHERAL_QUALIFIER_SupportedButNotConnected -Peripheral Device is supported, but not connected. -@constant kINQUIRY_PERIPHERAL_QUALIFIER_NotSupported -Peripheral Device is not supported. -@constant kINQUIRY_PERIPHERAL_QUALIFIER_Mask -Mask to use for PERIPHERAL_DEVICE_TYPE field. -*/ -enum -{ - kINQUIRY_PERIPHERAL_QUALIFIER_Connected = 0x00, - kINQUIRY_PERIPHERAL_QUALIFIER_SupportedButNotConnected = 0x20, - kINQUIRY_PERIPHERAL_QUALIFIER_NotSupported = 0x60, - kINQUIRY_PERIPHERAL_QUALIFIER_Mask = 0xE0 -}; - - -/*! -@enum Peripheral Device types -@discussion -Inquiry Peripheral Device type definitions -@constant kINQUIRY_PERIPHERAL_TYPE_DirectAccessSBCDevice -SBC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_SequentialAccessSSCDevice -Sequential Access (Tape) SSC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_PrinterSSCDevice -SSC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_ProcessorSPCDevice -SPC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_WriteOnceSBCDevice -SBC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_CDROM_MMCDevice -MMC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_ScannerSCSI2Device -SCSI2 Device. -@constant kINQUIRY_PERIPHERAL_TYPE_OpticalMemorySBCDevice -SBC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_MediumChangerSMCDevice -SMC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_CommunicationsSSCDevice -Comms SSC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_StorageArrayControllerSCC2Device -SCC2 Device. -@constant kINQUIRY_PERIPHERAL_TYPE_EnclosureServicesSESDevice -SES Device. -@constant kINQUIRY_PERIPHERAL_TYPE_SimplifiedDirectAccessRBCDevice -RBC Device. -@constant kINQUIRY_PERIPHERAL_TYPE_OpticalCardReaderOCRWDevice -OCRW Device. -@constant kINQUIRY_PERIPHERAL_TYPE_ObjectBasedStorageDevice -OSD device. -@constant kINQUIRY_PERIPHERAL_TYPE_AutomationDriveInterface -Automation Drive Interface device. -@constant kINQUIRY_PERIPHERAL_TYPE_WellKnownLogicalUnit -Well known logical unit. -@constant kINQUIRY_PERIPHERAL_TYPE_UnknownOrNoDeviceType -Unknown or no device. -@constant kINQUIRY_PERIPHERAL_TYPE_Mask -Mask to use for PERIPHERAL_DEVICE_TYPE field. -*/ -enum -{ - kINQUIRY_PERIPHERAL_TYPE_DirectAccessSBCDevice = 0x00, - kINQUIRY_PERIPHERAL_TYPE_SequentialAccessSSCDevice = 0x01, - kINQUIRY_PERIPHERAL_TYPE_PrinterSSCDevice = 0x02, - kINQUIRY_PERIPHERAL_TYPE_ProcessorSPCDevice = 0x03, - kINQUIRY_PERIPHERAL_TYPE_WriteOnceSBCDevice = 0x04, - kINQUIRY_PERIPHERAL_TYPE_CDROM_MMCDevice = 0x05, - kINQUIRY_PERIPHERAL_TYPE_ScannerSCSI2Device = 0x06, - kINQUIRY_PERIPHERAL_TYPE_OpticalMemorySBCDevice = 0x07, - kINQUIRY_PERIPHERAL_TYPE_MediumChangerSMCDevice = 0x08, - kINQUIRY_PERIPHERAL_TYPE_CommunicationsSSCDevice = 0x09, - /* 0x0A - 0x0B ASC IT8 Graphic Arts Prepress Devices */ - kINQUIRY_PERIPHERAL_TYPE_StorageArrayControllerSCC2Device = 0x0C, - kINQUIRY_PERIPHERAL_TYPE_EnclosureServicesSESDevice = 0x0D, - kINQUIRY_PERIPHERAL_TYPE_SimplifiedDirectAccessRBCDevice = 0x0E, - kINQUIRY_PERIPHERAL_TYPE_OpticalCardReaderOCRWDevice = 0x0F, - /* 0x10 - 0x1E Reserved Device Types */ - kINQUIRY_PERIPHERAL_TYPE_ObjectBasedStorageDevice = 0x11, - kINQUIRY_PERIPHERAL_TYPE_AutomationDriveInterface = 0x12, - kINQUIRY_PERIPHERAL_TYPE_WellKnownLogicalUnit = 0x1E, - kINQUIRY_PERIPHERAL_TYPE_UnknownOrNoDeviceType = 0x1F, - - - kINQUIRY_PERIPHERAL_TYPE_Mask = 0x1F -}; - - -/*! -@enum Removable Bit field definitions -@discussion -Inquiry Removable Bit field definitions -@constant kINQUIRY_PERIPHERAL_RMB_MediumFixed -Medium type is fixed disk. -@constant kINQUIRY_PERIPHERAL_RMB_MediumRemovable -Medium type is removable disk. -@constant kINQUIRY_PERIPHERAL_RMB_BitMask -Mask to use for RMB field. -*/ -enum -{ - kINQUIRY_PERIPHERAL_RMB_MediumFixed = 0x00, - kINQUIRY_PERIPHERAL_RMB_MediumRemovable = 0x80, - kINQUIRY_PERIPHERAL_RMB_BitMask = 0x80 -}; - - -/*! -@enum Version field definitions -@discussion -Definitions for bits/masks in the INQUIRY Version field. -@constant kINQUIRY_ISO_IEC_VERSION_Mask -Mask for valid bits for ISO/IEC Version. -@constant kINQUIRY_ECMA_VERSION_Mask -Mask for valid bits for ECMA Version. -@constant kINQUIRY_ANSI_VERSION_NoClaimedConformance -No ANSI conformance claimed by the device server. -@constant kINQUIRY_ANSI_VERSION_SCSI_1_Compliant -SCSI-1 conformance claimed by the device server. -@constant kINQUIRY_ANSI_VERSION_SCSI_2_Compliant -SCSI-2 conformance claimed by the device server. -@constant kINQUIRY_ANSI_VERSION_SCSI_SPC_Compliant -SPC conformance claimed by the device server. -@constant kINQUIRY_ANSI_VERSION_SCSI_SPC_2_Compliant -SPC-2 conformance claimed by the device server. -@constant kINQUIRY_ANSI_VERSION_SCSI_SPC_3_Compliant -SPC-3 conformance claimed by the device server. -@constant kINQUIRY_ANSI_VERSION_Mask -Mask for valid bits for ANSI Version. -*/ -enum -{ - kINQUIRY_ISO_IEC_VERSION_Mask = 0xC0, - - kINQUIRY_ECMA_VERSION_Mask = 0x38, - - kINQUIRY_ANSI_VERSION_NoClaimedConformance = 0x00, - kINQUIRY_ANSI_VERSION_SCSI_1_Compliant = 0x01, - kINQUIRY_ANSI_VERSION_SCSI_2_Compliant = 0x02, - kINQUIRY_ANSI_VERSION_SCSI_SPC_Compliant = 0x03, - kINQUIRY_ANSI_VERSION_SCSI_SPC_2_Compliant = 0x04, - kINQUIRY_ANSI_VERSION_SCSI_SPC_3_Compliant = 0x05, - kINQUIRY_ANSI_VERSION_Mask = 0x07 -}; - - -/*! -@enum Response Data Format field definitions -@discussion -Definitions for bits/masks in the INQUIRY RESPONSE_DATA_FORMAT field. -@constant kINQUIRY_Byte3_HISUP_Bit -HISUP bit definition. -@constant kINQUIRY_Byte3_NORMACA_Bit -NORMACA bit definition. -@constant kINQUIRY_Byte3_AERC_Bit -AERC bit definition. -@constant kINQUIRY_RESPONSE_DATA_FORMAT_Mask -Mask for valid bits for RESPONSE_DATA_FORMAT. -@constant kINQUIRY_Byte3_HISUP_Mask -Mask to use to test the HISUP bit. -@constant kINQUIRY_Byte3_NORMACA_Mask -Mask to use to test the NORMACA bit. -@constant kINQUIRY_Byte3_AERC_Mask -Mask to use to test the AERC bit. -*/ -enum -{ - // Bit definitions - // Bits 0-3: RESPONSE DATA FORMAT - kINQUIRY_Byte3_HISUP_Bit = 4, - kINQUIRY_Byte3_NORMACA_Bit = 5, - // Bit 6 is Obsolete - kINQUIRY_Byte3_AERC_Bit = 7, - - // Masks - kINQUIRY_RESPONSE_DATA_FORMAT_Mask = 0x0F, // Bits 0-3 - kINQUIRY_Byte3_HISUP_Mask = (1 << kINQUIRY_Byte3_HISUP_Bit), - kINQUIRY_Byte3_NORMACA_Mask = (1 << kINQUIRY_Byte3_NORMACA_Bit), - // Bit 6 is Obsolete - kINQUIRY_Byte3_AERC_Mask = (1 << kINQUIRY_Byte3_AERC_Bit) -}; - - -/*! -@enum SCCS field definitions -@discussion -Definitions for bits/masks in the INQUIRY SCCSReserved field. -@constant kINQUIRY_Byte5_SCCS_Bit -SCCS bit definition. -@constant kINQUIRY_Byte5_ACC_Bit -ACC bit definition. -@constant kINQUIRY_Byte5_3PC_Bit -3PC bit definition. -@constant kINQUIRY_Byte5_PROTECT_Bit -PROTECT bit definition. -@constant kINQUIRY_Byte5_SCCS_Mask -Mask to use to test the SCCS bit. -@constant kINQUIRY_Byte5_ACC_Mask -Mask to use to test the ACC bit. -@constant kINQUIRY_Byte5_TPGS_Mask -Mask to use for the TPGS bits. -@constant kINQUIRY_Byte5_3PC_Mask -Mask to use to test the 3PC bit. -@constant kINQUIRY_Byte5_PROTECT_Mask -Mask to use to test the PROTECT bit. -*/ -enum -{ - // Bit definitions - kINQUIRY_Byte5_SCCS_Bit = 7, - kINQUIRY_Byte5_ACC_Bit = 6, - // Bits 4-5: TPGS - kINQUIRY_Byte5_3PC_Bit = 3, - // Bits 1-2: Reserved - kINQUIRY_Byte5_PROTECT_Bit = 0, - - // Masks - kINQUIRY_Byte5_SCCS_Mask = (1 << kINQUIRY_Byte5_SCCS_Bit), - kINQUIRY_Byte5_ACC_Mask = (1 << kINQUIRY_Byte5_ACC_Bit), - kINQUIRY_Byte5_TPGS_Mask = 0x18, - kINQUIRY_Byte5_3PC_Mask = (1 << kINQUIRY_Byte5_3PC_Bit), - // Bits 1-2: Reserved - kINQUIRY_Byte5_PROTECT_Mask = (1 << kINQUIRY_Byte5_PROTECT_Bit) -}; - - -/*! -@enum flags1 field definitions -@discussion -Definitions for bits/masks in the INQUIRY flags1 field. -@constant kINQUIRY_Byte6_ADDR16_Bit -ADDR16 bit definition. -@constant kINQUIRY_Byte6_MCHNGR_Bit -MCHNGR bit definition. -@constant kINQUIRY_Byte6_MULTIP_Bit -MULTIP bit definition. -@constant kINQUIRY_Byte6_VS_Bit -VS bit definition. -@constant kINQUIRY_Byte6_ENCSERV_Bit -ENCSERV bit definition. -@constant kINQUIRY_Byte6_BQUE_Bit -BQUE bit definition. -@constant kINQUIRY_Byte6_ADDR16_Mask -Mask to use to test the ADDR16 bit. -@constant kINQUIRY_Byte6_MCHNGR_Mask -Mask to use to test the MCHNGR bit. -@constant kINQUIRY_Byte6_MULTIP_Mask -Mask to use to test the MULTIP bit. -@constant kINQUIRY_Byte6_VS_Mask -Mask to use to test the VS bit. -@constant kINQUIRY_Byte6_ENCSERV_Mask -Mask to use to test the ENCSERV bit. -@constant kINQUIRY_Byte6_BQUE_Mask -Mask to use to test the BQUE bit. -*/ -enum -{ - // Byte offset - kINQUIRY_Byte6_Offset = 6, - - // Bit definitions - kINQUIRY_Byte6_ADDR16_Bit = 0, // SPI Specific - // Bit 1 is Obsolete - // Bit 2 is Obsolete - kINQUIRY_Byte6_MCHNGR_Bit = 3, - kINQUIRY_Byte6_MULTIP_Bit = 4, - kINQUIRY_Byte6_VS_Bit = 5, - kINQUIRY_Byte6_ENCSERV_Bit = 6, - kINQUIRY_Byte6_BQUE_Bit = 7, - - // Masks - kINQUIRY_Byte6_ADDR16_Mask = (1 << kINQUIRY_Byte6_ADDR16_Bit), // SPI Specific - // Bit 1 is Obsolete - // Bit 2 is Obsolete - kINQUIRY_Byte6_MCHNGR_Mask = (1 << kINQUIRY_Byte6_MCHNGR_Bit), - kINQUIRY_Byte6_MULTIP_Mask = (1 << kINQUIRY_Byte6_MULTIP_Bit), - kINQUIRY_Byte6_VS_Mask = (1 << kINQUIRY_Byte6_VS_Bit), - kINQUIRY_Byte6_ENCSERV_Mask = (1 << kINQUIRY_Byte6_ENCSERV_Bit), - kINQUIRY_Byte6_BQUE_Mask = (1 << kINQUIRY_Byte6_BQUE_Bit) -}; - - -/*! -@enum flags2 field definitions -@discussion -Definitions for bits/masks in the INQUIRY flags2 field. -@constant kINQUIRY_Byte7_VS_Bit -VS bit definition. -@constant kINQUIRY_Byte7_CMDQUE_Bit -CMDQUE bit definition. -@constant kINQUIRY_Byte7_TRANDIS_Bit -TRANDIS bit definition. -@constant kINQUIRY_Byte7_LINKED_Bit -LINKED bit definition. -@constant kINQUIRY_Byte7_SYNC_Bit -SYNC bit definition. -@constant kINQUIRY_Byte7_WBUS16_Bit -WBUS16 bit definition. -@constant kINQUIRY_Byte7_RELADR_Bit -RELADR bit definition. -@constant kINQUIRY_Byte7_VS_Mask -Mask to use to test the VS bit. -@constant kINQUIRY_Byte7_CMDQUE_Mask -Mask to use to test the CMDQUE bit. -@constant kINQUIRY_Byte7_TRANDIS_Mask -Mask to use to test the TRANDIS bit. -@constant kINQUIRY_Byte7_LINKED_Mask -Mask to use to test the LINKED bit. -@constant kINQUIRY_Byte7_SYNC_Mask -Mask to use to test the SYNC bit. -@constant kINQUIRY_Byte7_WBUS16_Mask -Mask to use to test the WBUS16 bit. -@constant kINQUIRY_Byte7_RELADR_Mask -Mask to use to test the RELADR bit. -*/ -enum -{ - // Byte offset - kINQUIRY_Byte7_Offset = 7, - - // Bit definitions - kINQUIRY_Byte7_VS_Bit = 0, - kINQUIRY_Byte7_CMDQUE_Bit = 1, - kINQUIRY_Byte7_TRANDIS_Bit = 2, // SPI Specific - kINQUIRY_Byte7_LINKED_Bit = 3, - kINQUIRY_Byte7_SYNC_Bit = 4, // SPI Specific - kINQUIRY_Byte7_WBUS16_Bit = 5, // SPI Specific - // Bit 6 is Obsolete - kINQUIRY_Byte7_RELADR_Bit = 7, - - // Masks - kINQUIRY_Byte7_VS_Mask = (1 << kINQUIRY_Byte7_VS_Bit), - kINQUIRY_Byte7_CMDQUE_Mask = (1 << kINQUIRY_Byte7_CMDQUE_Bit), - kINQUIRY_Byte7_TRANDIS_Mask = (1 << kINQUIRY_Byte7_TRANDIS_Bit),// SPI Specific - kINQUIRY_Byte7_LINKED_Mask = (1 << kINQUIRY_Byte7_LINKED_Bit), - kINQUIRY_Byte7_SYNC_Mask = (1 << kINQUIRY_Byte7_SYNC_Bit), // SPI Specific - kINQUIRY_Byte7_WBUS16_Mask = (1 << kINQUIRY_Byte7_WBUS16_Bit), // SPI Specific - // Bit 6 is Obsolete - kINQUIRY_Byte7_RELADR_Mask = (1 << kINQUIRY_Byte7_RELADR_Bit) -}; - - -/*! -@enum Byte 56 features field definitions -@discussion -Definitions for bits/masks in the INQUIRY Byte 56 field. -Inquiry Byte 56 features (for devices that report an ANSI VERSION of -kINQUIRY_ANSI_VERSION_SCSI_SPC_Compliant or later). -These are SPI-3 Specific. -@constant kINQUIRY_Byte56_IUS_Bit -IUS bit definition. -@constant kINQUIRY_Byte56_QAS_Bit -QAS bit definition. -@constant kINQUIRY_Byte56_IUS_Mask -Mask to use to test the IUS bit. -@constant kINQUIRY_Byte56_QAS_Mask -Mask to use to test the QAS bit. -@constant kINQUIRY_Byte56_CLOCKING_Mask -Mask to use to test CLOCKING bits. -@constant kINQUIRY_Byte56_CLOCKING_ONLY_ST -Single-transition clocking only. -@constant kINQUIRY_Byte56_CLOCKING_ONLY_DT -Double-transition clocking only. -@constant kINQUIRY_Byte56_CLOCKING_ST_AND_DT -Single-transition and double-transition clocking. -*/ -enum -{ - // Byte offset - kINQUIRY_Byte56_Offset = 56, - - // Bit definitions - kINQUIRY_Byte56_IUS_Bit = 0, - kINQUIRY_Byte56_QAS_Bit = 1, - // Bits 2 and 3 are the CLOCKING bits - // All other bits are reserved - - kINQUIRY_Byte56_IUS_Mask = (1 << kINQUIRY_Byte56_IUS_Bit), - kINQUIRY_Byte56_QAS_Mask = (1 << kINQUIRY_Byte56_QAS_Bit), - kINQUIRY_Byte56_CLOCKING_Mask = 0x0C, - - // Definitions for the CLOCKING bits - kINQUIRY_Byte56_CLOCKING_ONLY_ST = 0x00, - kINQUIRY_Byte56_CLOCKING_ONLY_DT = 0x04, - // kINQUIRY_Byte56_CLOCKING_RESERVED = 0x08, - kINQUIRY_Byte56_CLOCKING_ST_AND_DT = 0x0C -}; - - -/*! -@define kINQUIRY_VERSION_DESCRIPTOR_MaxCount -Maximum number of INQUIRY version descriptors supported. -*/ -#define kINQUIRY_VERSION_DESCRIPTOR_MaxCount 8 - - -/*! -@enum kINQUIRY_VERSION_DESCRIPTOR_SAT -SAT specification version descriptor. -*/ -enum -{ - kINQUIRY_VERSION_DESCRIPTOR_SAT = 0x1EA0 -}; - - -/* -IORegistry property names for information derived from the Inquiry data. -The Peripheral Device Type is the only property that the -generic Logical Unit Drivers will use to match. These properties are -listed in order of matching priority. First is the Peripheral Device Type. -Second is the Vendor Identification. Third is the Product Identification. -Last is the Product Revision Level. To match a particular product, you would -specify the Peripheral Device Type, Vendor Identification, and Product -Identification. To restrict the match to a particular firmware revision, you -would add the Product Revision Level. To not match on a particular product, -but on a particular vendor's products, you would only include the -Peripheral Device Type and the Vendor Identification. -*/ - -/*! -@define kIOPropertySCSIPeripheralDeviceType -SCSI Peripheral Device Type as reported in the INQUIRY data. -*/ -#define kIOPropertySCSIPeripheralDeviceType "Peripheral Device Type" - -/*! -@define kIOPropertySCSIPeripheralDeviceTypeSize -Size of the kIOPropertySCSIPeripheralDeviceType key. -*/ -#define kIOPropertySCSIPeripheralDeviceTypeSize 8 - -/* These properties are listed in order of matching priority */ - -/*! -@define kIOPropertySCSIVendorIdentification -Vendor ID as reported in the INQUIRY data. Additional space characters (0x20) -are truncated. -*/ -#define kIOPropertySCSIVendorIdentification "Vendor Identification" - -/*! -@define kIOPropertySCSIProductIdentification -Product ID as reported in the INQUIRY data. Additional space characters (0x20) -are truncated. -*/ -#define kIOPropertySCSIProductIdentification "Product Identification" - -/*! -@define kIOPropertySCSIProductRevisionLevel -Product Revision Level as reported in the INQUIRY data. -*/ -#define kIOPropertySCSIProductRevisionLevel "Product Revision Level" - - -/*! -@enum INQUIRY Page Codes -@discussion INQUIRY Page Codes to be used when EVPD is set in the -INQUIRY command. -@constant kINQUIRY_Page00_PageCode -Page Code 00h. -@constant kINQUIRY_Page80_PageCode -Page Code 80h. -@constant kINQUIRY_Page83_PageCode -Page Code 83h. -@constant kINQUIRY_Page89_PageCode -Page Code 89h. -*/ -enum -{ - kINQUIRY_Page00_PageCode = 0x00, - kINQUIRY_Page80_PageCode = 0x80, - kINQUIRY_Page83_PageCode = 0x83, - kINQUIRY_Page89_PageCode = 0x89 -}; - - -/*! -@struct SCSICmd_INQUIRY_Page00_Header -@discussion INQUIRY Page 00h Header. -*/ -typedef struct SCSICmd_INQUIRY_Page00_Header -{ - UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. - UInt8 PAGE_CODE; // Must be equal to 00h - UInt8 RESERVED; // reserved field - UInt8 PAGE_LENGTH; // n-3 bytes -} SCSICmd_INQUIRY_Page00_Header; - - -/*! -@struct SCSICmd_INQUIRY_Page80_Header -@discussion INQUIRY Page 80h Header. -*/ -typedef struct SCSICmd_INQUIRY_Page80_Header -{ - UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. - UInt8 PAGE_CODE; // Must be equal to 80h - UInt8 RESERVED; // reserved field - UInt8 PAGE_LENGTH; // n-3 bytes - UInt8 PRODUCT_SERIAL_NUMBER; // 4-n -} SCSICmd_INQUIRY_Page80_Header; - - -/*! -@define kIOPropertySCSIINQUIRYUnitSerialNumber -Key that describes the INQUIRY Unit Serial Number in the IORegistry. -*/ -#define kIOPropertySCSIINQUIRYUnitSerialNumber "INQUIRY Unit Serial Number" - - -/*! -@struct SCSICmd_INQUIRY_Page83_Header -@discussion INQUIRY Page 83h Header. -*/ -typedef struct SCSICmd_INQUIRY_Page83_Header -{ - UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. - UInt8 PAGE_CODE; // Must be equal to 83h - UInt8 RESERVED; // reserved field - UInt8 PAGE_LENGTH; // n-3 bytes -} SCSICmd_INQUIRY_Page83_Header; - - -/*! -@struct SCSICmd_INQUIRY_Page83_Header_SPC_16 -@discussion INQUIRY Page 83h Header used with the 16 byte INQUIRY command. -*/ -typedef struct SCSICmd_INQUIRY_Page83_Header_SPC_16 -{ - UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. - UInt8 PAGE_CODE; // Must be equal to 83h - UInt16 PAGE_LENGTH; // n-3 bytes -} SCSICmd_INQUIRY_Page83_Header_SPC_16; - - -/*! -@struct SCSICmd_INQUIRY_Page83_Identification_Descriptor -@discussion INQUIRY Page 83h Identification Descriptor. -*/ -typedef struct SCSICmd_INQUIRY_Page83_Identification_Descriptor -{ - UInt8 CODE_SET; // 7-4 = Protocol Identifier. 3-0 = Code Set - UInt8 IDENTIFIER_TYPE; // 7 = PIV 5-4 = ASSOCIATION 3-0 = Identifier - UInt8 RESERVED; - UInt8 IDENTIFIER_LENGTH; - UInt8 IDENTIFIER; -} SCSICmd_INQUIRY_Page83_Identification_Descriptor; - - -/*! -@enum INQUIRY Page 83h Code Set -@discussion -Definitions for the Code Set field. -@constant kINQUIRY_Page83_CodeSetBinaryData -The identifier contains binary data. -@constant kINQUIRY_Page83_CodeSetASCIIData -The identifier contains ASCII data. -@constant kINQUIRY_Page83_CodeSetUTF8Data -The identifier contains UTF-8 data. -*/ -enum -{ - kINQUIRY_Page83_CodeSetReserved = 0x0, - kINQUIRY_Page83_CodeSetBinaryData = 0x1, - kINQUIRY_Page83_CodeSetASCIIData = 0x2, - kINQUIRY_Page83_CodeSetUTF8Data = 0x3, - // 0x4 - 0xF reserved - kINQUIRY_Page83_CodeSetMask = 0xF -}; - - -/*! -@enum INQUIRY Page 83h Association -@discussion -Definitions for the Association field. -@constant kINQUIRY_Page83_AssociationLogicalUnit -Association of the identifier is with the logical unit. -@constant kINQUIRY_Page83_AssociationDevice -Association of the identifier is with the device (same as logical unit in SPC-2). -@constant kINQUIRY_Page83_AssociationTargetPort -Association of the identifier is with the target port. -@constant kINQUIRY_Page83_AssociationTargetDevice -Association of the identifier is with the target device (i.e. all ports). -@constant kINQUIRY_Page83_AssociationMask -Mask to use to determine association. -*/ -enum -{ - // SPC-3 - Association is changed to be specific to - // Logical Units - kINQUIRY_Page83_AssociationLogicalUnit = 0x00, - - // Backwards compatibility for SPC-2 - kINQUIRY_Page83_AssociationDevice = kINQUIRY_Page83_AssociationLogicalUnit, - - // Association is related to a Target Port - kINQUIRY_Page83_AssociationTargetPort = 0x10, - - // SPC-3 - Added as specific association to - // a Target device. - kINQUIRY_Page83_AssociationTargetDevice = 0x20, - - kINQUIRY_Page83_AssociationMask = 0x30 -}; - - -/*! -@enum INQUIRY Page 83h Identifier Type -@discussion -Definitions for the Identifier Type field. -@constant kINQUIRY_Page83_IdentifierTypeUndefined -Undefined Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeVendorID -Vendor Specific Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeIEEE_EUI64 -EUI-64 Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeNAAIdentifier -NAA Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeRelativePortIdentifier -Relative Target Port Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeTargetPortGroup -Target Port Group Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeLogicalUnitGroup -Logical Unit Group Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeMD5LogicalUnitIdentifier -MD5 Logical Unit Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeSCSINameString -SCSI Name String Identifier Type. -@constant kINQUIRY_Page83_IdentifierTypeMask -Mask to use to determine association. -@constant kINQUIRY_Page83_ProtocolIdentifierValidBit -PIV Bit definition. -@constant kINQUIRY_Page83_ProtocolIdentifierValidMask -Mask to use to determine if PIV is set. -*/ -enum -{ - kINQUIRY_Page83_IdentifierTypeUndefined = 0, - kINQUIRY_Page83_IdentifierTypeVendorID = 1, - kINQUIRY_Page83_IdentifierTypeIEEE_EUI64 = 2, - kINQUIRY_Page83_IdentifierTypeNAAIdentifier = 3, - kINQUIRY_Page83_IdentifierTypeRelativePortIdentifier = 4, - kINQUIRY_Page83_IdentifierTypeTargetPortGroup = 5, - kINQUIRY_Page83_IdentifierTypeLogicalUnitGroup = 6, - kINQUIRY_Page83_IdentifierTypeMD5LogicalUnitIdentifier = 7, - kINQUIRY_Page83_IdentifierTypeSCSINameString = 8, - // 0x9 - 0xF Reserved - - kINQUIRY_Page83_IdentifierTypeMask = 0xF, - - kINQUIRY_Page83_ProtocolIdentifierValidBit = 7, - kINQUIRY_Page83_ProtocolIdentifierValidMask = (1 << kINQUIRY_Page83_ProtocolIdentifierValidBit) - -}; - -// Backwards compatibility -#define kINQUIRY_Page83_IdentifierTypeFCNameIdentifier kINQUIRY_Page83_IdentifierTypeNAAIdentifier - - -/*! -@enum Protocol Identifier values -@discussion -Definitions for the protocol identifier values. -@constant kSCSIProtocolIdentifier_FibreChannel -FibreChannel Protocol Identifier. -@constant kSCSIProtocolIdentifier_ParallelSCSI -Parallel SCSI Protocol Identifier. -@constant kSCSIProtocolIdentifier_SSA -SSA Protocol Identifier. -@constant kSCSIProtocolIdentifier_FireWire -FireWire (IEEE-1394) Protocol Identifier. -@constant kSCSIProtocolIdentifier_RDMA -RDMA Protocol Identifier. -@constant kSCSIProtocolIdentifier_iSCSI -iSCSI Protocol Identifier. -@constant kSCSIProtocolIdentifier_SAS -SAS Protocol Identifier. -@constant kSCSIProtocolIdentifier_ADT -ADT Protocol Identifier. -@constant kSCSIProtocolIdentifier_ATAPI -ATAPI Protocol Identifier. -@constant kSCSIProtocolIdentifier_None -No Protocol Identifier. -*/ -enum -{ - kSCSIProtocolIdentifier_FibreChannel = 0, - kSCSIProtocolIdentifier_ParallelSCSI = 1, - kSCSIProtocolIdentifier_SSA = 2, - kSCSIProtocolIdentifier_FireWire = 3, - kSCSIProtocolIdentifier_RDMA = 4, - kSCSIProtocolIdentifier_iSCSI = 5, - kSCSIProtocolIdentifier_SAS = 6, - kSCSIProtocolIdentifier_ADT = 7, - kSCSIProtocolIdentifier_ATAPI = 8, - // 0x9-0xE Reserved - kSCSIProtocolIdentifier_None = 0xF -}; - - -/*! -@define kIOPropertySCSIINQUIRYDeviceIdentification -Device Identification key. -*/ -#define kIOPropertySCSIINQUIRYDeviceIdentification "INQUIRY Device Identification" - - -/*! -@define kIOPropertySCSIINQUIRYDeviceIdCodeSet -Code Set type key. -*/ -#define kIOPropertySCSIINQUIRYDeviceIdCodeSet "Code Set" - - -/*! -@define kIOPropertySCSIINQUIRYDeviceIdType -Identifier Type key. -*/ -#define kIOPropertySCSIINQUIRYDeviceIdType "Identifier Type" - - -/*! -@define kIOPropertySCSIINQUIRYDeviceIdAssociation -Association key. -*/ -#define kIOPropertySCSIINQUIRYDeviceIdAssociation "Association" - - -/*! -@define kIOPropertySCSIINQUIRYDeviceIdentifier -Identifier key (data or string). -*/ -#define kIOPropertySCSIINQUIRYDeviceIdentifier "Identifier" - - -/*! -@struct SCSICmd_INQUIRY_Page89_Data -@discussion INQUIRY Page 89h data as defined in the SAT 1.0 -specification. This section contians all structures and -definitions used by the INQUIRY command in response to a request -for page 89h - ATA information VPD Page. -*/ -typedef struct SCSICmd_INQUIRY_Page89_Data -{ - UInt8 PERIPHERAL_DEVICE_TYPE; // 7-5 = Qualifier. 4-0 = Device type. - UInt8 PAGE_CODE; // Must be equal to 89h - UInt16 PAGE_LENGTH; // Must be equal to 238h - UInt32 Reserved; - UInt8 SAT_VENDOR_IDENTIFICATION[kINQUIRY_VENDOR_IDENTIFICATION_Length]; - UInt8 SAT_PRODUCT_IDENTIFICATION[kINQUIRY_PRODUCT_IDENTIFICATION_Length]; - UInt8 SAT_PRODUCT_REVISION_LEVEL[kINQUIRY_PRODUCT_REVISION_LEVEL_Length]; - UInt8 ATA_DEVICE_SIGNATURE[20]; - UInt8 COMMAND_CODE; - UInt8 Reserved2[3]; - UInt8 IDENTIFY_DATA[512]; -} SCSICmd_INQUIRY_Page89_Data; - - -/*! -@define kIOPropertySATVendorIdentification -Vendor Identification of the SATL. -*/ -#define kIOPropertySATVendorIdentification "SAT Vendor Identification" - - -/*! -@define kIOPropertySATProductIdentification -Product Identification of the SATL. -*/ -#define kIOPropertySATProductIdentification "SAT Product Identification" - - -/*! -@define kIOPropertySATProductRevisonLevel -Product Revision Level of the SATL. -*/ -#define kIOPropertySATProductRevisonLevel "SAT Product Revision Level" - - -#endif /* _IOKIT_SCSI_CMDS_INQUIRY_H_ */ diff --git a/i386/include/IOKit/scsi/SCSICmds_MODE_Definitions.h b/i386/include/IOKit/scsi/SCSICmds_MODE_Definitions.h deleted file mode 100644 index 8d9c250..0000000 --- a/i386/include/IOKit/scsi/SCSICmds_MODE_Definitions.h +++ /dev/null @@ -1,559 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_SCSI_CMDS_MODE_DEFINITIONS_H_ -#define _IOKIT_SCSI_CMDS_MODE_DEFINITIONS_H_ - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -#if KERNEL -#include <IOKit/IOTypes.h> -#else -#include <CoreFoundation/CoreFoundation.h> -#endif - - -/*! @header SCSI Request Sense Definitions - @discussion - This file contains all definitions for the data returned from - the MODE_SENSE_6 and MODE_SENSE_10 commands. -*/ - -#pragma pack(1) - -/*! -@struct SPCModeParameterHeader6 -@discussion -Mode Parameter Header for the MODE_SENSE_6 command. -*/ -typedef struct SPCModeParameterHeader6 -{ - UInt8 MODE_DATA_LENGTH; - UInt8 MEDIUM_TYPE; - UInt8 DEVICE_SPECIFIC_PARAMETER; - UInt8 BLOCK_DESCRIPTOR_LENGTH; -} SPCModeParameterHeader6; - - -/*! -@struct SPCModeParameterHeader10 -@discussion -Mode Parameter Header for the MODE_SENSE_10 command. -*/ -typedef struct SPCModeParameterHeader10 -{ - UInt16 MODE_DATA_LENGTH; - UInt8 MEDIUM_TYPE; - UInt8 DEVICE_SPECIFIC_PARAMETER; - UInt8 LONGLBA; - UInt8 RESERVED; - UInt16 BLOCK_DESCRIPTOR_LENGTH; -} SPCModeParameterHeader10; - - -/*! -@enum Long LBA Bitfield definitions -@discussion -Long LBA Bitfield definitions for Mode Parameter Header -for MODE_SENSE_10 command. -@constant kModeSenseParameterHeader10_LongLBABit -Bit to indicate Long LBA block descriptors follow. -@constant kModeSenseParameterHeader10_LongLBAMask -Mask to test for kModeSenseParameterHeader10_LongLBABit. -*/ -enum -{ - kModeSenseParameterHeader10_LongLBABit = 0, - kModeSenseParameterHeader10_LongLBAMask = (1 << kModeSenseParameterHeader10_LongLBABit), -}; - - -/*! -@enum Device Specific Parameter Bitfield definitions -@discussion -SBC definitions for Device Specific Parameter in the -Mode Sense Header Block. -@constant kModeSenseSBCDeviceSpecific_DPOFUABit -Bit to indicate DPO and FUA bits are accepted by the device server. -@constant kModeSenseSBCDeviceSpecific_WriteProtectBit -Bit to indicate medium is write protected. -@constant kModeSenseSBCDeviceSpecific_DPOFUAMask -Mask to test for kModeSenseSBCDeviceSpecific_DPOFUABit. -@constant kModeSenseSBCDeviceSpecific_WriteProtectMask -Mask to test for kModeSenseSBCDeviceSpecific_WriteProtectBit. -*/ -enum -{ - kModeSenseSBCDeviceSpecific_DPOFUABit = 4, - kModeSenseSBCDeviceSpecific_WriteProtectBit = 7, - kModeSenseSBCDeviceSpecific_DPOFUAMask = (1 << kModeSenseSBCDeviceSpecific_DPOFUABit), - kModeSenseSBCDeviceSpecific_WriteProtectMask = (1 << kModeSenseSBCDeviceSpecific_WriteProtectBit) -}; - - -/*! -@struct ModeParameterBlockDescriptor -@discussion -General mode parameter block descriptor. -*/ -typedef struct ModeParameterBlockDescriptor -{ - UInt8 DENSITY_CODE; - UInt8 NUMBER_OF_BLOCKS[3]; - UInt8 RESERVED; - UInt8 BLOCK_LENGTH[3]; -} ModeParameterBlockDescriptor; - - -/*! -@struct DASDModeParameterBlockDescriptor -@discussion -Direct Access Storage Device mode parameter block descriptor. -*/ -typedef struct DASDModeParameterBlockDescriptor -{ - UInt32 NUMBER_OF_BLOCKS; - UInt8 DENSITY_CODE; - UInt8 BLOCK_LENGTH[3]; -} DASDModeParameterBlockDescriptor; - - -/*! -@struct LongLBAModeParameterBlockDescriptor -@discussion -Long LBA mode parameter block descriptor. -*/ -typedef struct LongLBAModeParameterBlockDescriptor -{ - UInt64 NUMBER_OF_BLOCKS; - UInt8 DENSITY_CODE; - UInt8 RESERVED[3]; - UInt32 BLOCK_LENGTH; -} LongLBAModeParameterBlockDescriptor; - - -/*! -@struct ModePageFormatHeader -@discussion -Mode Page format header. -*/ -typedef struct ModePageFormatHeader -{ - UInt8 PS_PAGE_CODE; - UInt8 PAGE_LENGTH; -} ModePageFormatHeader; - - -/*! -@enum Mode Page Format bit definitions -@discussion -Mode Page Format bit definitions. -@constant kModePageFormat_PS_Bit -Bit to indicate Parameters Saveable. -@constant kModePageFormat_PAGE_CODE_Mask -Mask to obtain the PAGE_CODE from the PS_PAGE_CODE field. -@constant kModePageFormat_PS_Mask -Mask to test for kModePageFormat_PS_Bit. -*/ -enum -{ - kModePageFormat_PS_Bit = 7, - - kModePageFormat_PAGE_CODE_Mask = 0x3F, - kModePageFormat_PS_Mask = (1 << kModePageFormat_PS_Bit) -}; - - -#if 0 -#pragma mark - -#pragma mark SPC Mode Pages -#pragma mark - -#endif - - -/*! -@enum SPC Mode Pages -@discussion -SPC Mode Page definitions. -@constant kSPCModePagePowerConditionCode -Power Conditions Mode Page value. -@constant kSPCModePageAllPagesCode -All Mode Pages value. -*/ -enum -{ - kSPCModePagePowerConditionCode = 0x1A, - kSPCModePageAllPagesCode = 0x3F -}; - -/*! -@struct SPCModePagePowerCondition -@discussion -Power Conditions Mode Page (PAGE CODE 0x1A) format. -*/ -typedef struct SPCModePagePowerCondition -{ - ModePageFormatHeader header; - UInt8 RESERVED; - UInt8 IDLE_STANDBY; - UInt32 IDLE_CONDITION_TIMER; - UInt32 STANDBY_CONDITION_TIMER; -} SPCModePagePowerCondition; - - -#if 0 -#pragma mark - -#pragma mark 0x00 SBC Direct Access Mode Pages -#pragma mark - -#endif - - -/*! -@enum SBC Mode Pages -@discussion -SBC Mode Page definitions. -@constant kSBCModePageFormatDeviceCode -Format Device Mode Page value. -@constant kSBCModePageRigidDiskGeometryCode -Rigid Disk Geometry Page value. -@constant kSBCModePageFlexibleDiskCode -Flexible Disk Page value. -@constant kSBCModePageCachingCode -Caching Page value. -*/ -enum -{ - kSBCModePageFormatDeviceCode = 0x03, - kSBCModePageRigidDiskGeometryCode = 0x04, - kSBCModePageFlexibleDiskCode = 0x05, - kSBCModePageCachingCode = 0x08 -}; - - -/*! -@struct SBCModePageFormatDevice -@discussion -Format Device Mode Page (PAGE CODE 0x03) format. -*/ -typedef struct SBCModePageFormatDevice -{ - ModePageFormatHeader header; - UInt16 TRACKS_PER_ZONE; - UInt16 ALTERNATE_SECTORS_PER_ZONE; - UInt16 ALTERNATE_TRACKS_PER_ZONE; - UInt16 ALTERNATE_TRACKS_PER_LOGICAL_UNIT; - UInt16 SECTORS_PER_TRACK; - UInt16 DATA_BYTES_PER_PHYSICAL_SECTOR; - UInt16 INTERLEAVE; - UInt16 TRACK_SKEW_FACTOR; - UInt16 CYLINDER_SKEW_FACTOR; - UInt8 SSEC_HSEC_RMB_SURF; - UInt8 RESERVED[3]; -} SBCModePageFormatDevice; - - -/*! -@struct SBCModePageRigidDiskGeometry -@discussion -Rigid Disk Geometry Mode Page (PAGE CODE 0x04) format. -*/ -typedef struct SBCModePageRigidDiskGeometry -{ - ModePageFormatHeader header; - UInt8 NUMBER_OF_CYLINDERS[3]; - UInt8 NUMBER_OF_HEADS; - UInt8 STARTING_CYLINDER_WRITE_PRECOMPENSATION[3]; - UInt8 STARTING_CYLINDER_REDUCED_WRITE_CURRENT[3]; - UInt16 DEVICE_STEP_RATE; - UInt8 LANDING_ZONE_CYLINDER[3]; - UInt8 RPL; - UInt8 ROTATIONAL_OFFSET; - UInt8 RESERVED; - UInt16 MEDIUM_ROTATION_RATE; - UInt8 RESERVED1[2]; -} SBCModePageRigidDiskGeometry; - - -/*! -@enum Rigid Disk Geometry bitfields -@discussion -Bit field masks for Rigid Disk Geometry structure fields. -@constant kSBCModePageRigidDiskGeometry_RPL_Mask -Mask for use with the RPL field. -*/ -enum -{ - kSBCModePageRigidDiskGeometry_RPL_Mask = 0x03 -}; - - -/*! -@struct SBCModePageFlexibleDisk -@discussion -Flexible Disk Mode Page (PAGE CODE 0x05) format. -*/ -typedef struct SBCModePageFlexibleDisk -{ - ModePageFormatHeader header; - UInt16 TRANSFER_RATE; - UInt8 NUMBER_OF_HEADS; - UInt8 SECTORS_PER_TRACK; - UInt16 DATA_BYTES_PER_SECTOR; - UInt16 NUMBER_OF_CYLINDERS; - UInt16 STARTING_CYLINDER_WRITE_PRECOMPENSATION; - UInt16 STARTING_CYLINDER_REDUCED_WRITE_CURRENT; - UInt16 DEVICE_STEP_RATE; - UInt8 DEVICE_STEP_PULSE_WIDTH; - UInt16 HEAD_SETTLE_DELAY; - UInt8 MOTOR_ON_DELAY; - UInt8 MOTOR_OFF_DELAY; - UInt8 TRDY_SSN_MO; - UInt8 SPC; - UInt8 WRITE_COMPENSATION; - UInt8 HEAD_LOAD_DELAY; - UInt8 HEAD_UNLOAD_DELAY; - UInt8 PIN_34_PIN_2; - UInt8 PIN_4_PIN_1; - UInt16 MEDIUM_ROTATION_RATE; - UInt8 RESERVED[2]; -} SBCModePageFlexibleDisk; - - -/*! -@enum TRDY_SSN_MO bitfields -@discussion -Bit field definitions and masks for Flexible Disk TRDY_SSN_MO field. -@constant kSBCModePageFlexibleDisk_MO_Bit -MO Bit definition. -@constant kSBCModePageFlexibleDisk_SSN_Bit -SSN Bit definition. -@constant kSBCModePageFlexibleDisk_TRDY_Bit -TRDY Bit definition. -@constant kSBCModePageFlexibleDisk_MO_Mask -Mask for use with TRDY_SSN_MO field. -@constant kSBCModePageFlexibleDisk_SSN_Mask -Mask for use with TRDY_SSN_MO field. -@constant kSBCModePageFlexibleDisk_TRDY_Mask -Mask for use with TRDY_SSN_MO field. -*/ -enum -{ - // Bits 0:4 Reserved - kSBCModePageFlexibleDisk_MO_Bit = 5, - kSBCModePageFlexibleDisk_SSN_Bit = 6, - kSBCModePageFlexibleDisk_TRDY_Bit = 7, - - kSBCModePageFlexibleDisk_MO_Mask = (1 << kSBCModePageFlexibleDisk_MO_Bit), - kSBCModePageFlexibleDisk_SSN_Mask = (1 << kSBCModePageFlexibleDisk_SSN_Bit), - kSBCModePageFlexibleDisk_TRDY_Mask = (1 << kSBCModePageFlexibleDisk_TRDY_Bit) -}; - - -/*! -@enum SPC bitfields -@discussion -Bit field definitions and masks for Flexible Disk SPC field. -@constant kSBCModePageFlexibleDisk_SPC_Mask -Mask for use with SPC field. -*/ -enum -{ - kSBCModePageFlexibleDisk_SPC_Mask = 0x0F -}; - - -/*! -@enum PIN_34_PIN_2 bitfields -@discussion -Bit field definitions and masks for Flexible Disk PIN_34_PIN_2 field. -@constant kSBCModePageFlexibleDisk_PIN_2_Mask -Mask for use with PIN_34_PIN_2 field. -@constant kSBCModePageFlexibleDisk_PIN_34_Mask -Mask for use with PIN_34_PIN_2 field. -*/ -enum -{ - kSBCModePageFlexibleDisk_PIN_2_Mask = 0x0F, - kSBCModePageFlexibleDisk_PIN_34_Mask = 0xF0 -}; - - -/*! -@enum PIN_4_PIN_1 bitfields -@discussion -Bit field definitions and masks for Flexible Disk PIN_4_PIN_1 field. -@constant kSBCModePageFlexibleDisk_PIN_1_Mask -Mask for use with PIN_4_PIN_1 field. -@constant kSBCModePageFlexibleDisk_PIN_4_Mask -Mask for use with PIN_4_PIN_1 field. -*/ -enum -{ - kSBCModePageFlexibleDisk_PIN_1_Mask = 0x0F, - kSBCModePageFlexibleDisk_PIN_4_Mask = 0xF0 -}; - - -/*! -@struct SBCModePageCaching -@discussion -Caching Mode Page (PAGE CODE 0x08) format. -*/ -typedef struct SBCModePageCaching -{ - ModePageFormatHeader header; - UInt8 flags; - UInt8 DEMAND_READ_WRITE_RETENTION_PRIORITY; - UInt16 DISABLE_PREFETCH_TRANSFER_LENGTH; - UInt16 MINIMUM_PREFETCH; - UInt16 MAXIMUM_PREFETCH; - UInt16 MAXIMUM_PREFETCH_CEILING; - UInt8 flags2; - UInt8 NUMBER_OF_CACHE_SEGMENTS; - UInt16 CACHE_SEGMENT_SIZE; - UInt8 RESERVED; - UInt8 NON_CACHE_SEGMENT_SIZE[3]; -} SBCModePageCaching; - - -/*! -@enum Caching flags bitfields -@discussion -Bit field definitions and masks for Caching flags field. -@constant kSBCModePageCaching_RCD_Bit -RCD Bit definition. -@constant kSBCModePageCaching_MF_Bit -MF Bit definition. -@constant kSBCModePageCaching_WCE_Bit -WCE Bit definition. -@constant kSBCModePageCaching_SIZE_Bit -SIZE Bit definition. -@constant kSBCModePageCaching_DISC_Bit -DISC Bit definition. -@constant kSBCModePageCaching_CAP_Bit -CAP Bit definition. -@constant kSBCModePageCaching_ABPF_Bit -ABPF Bit definition. -@constant kSBCModePageCaching_IC_Bit -IC Bit definition. -@constant kSBCModePageCaching_RCD_Mask -Mask for use with flags field. -@constant kSBCModePageCaching_MF_Mask -Mask for use with flags field. -@constant kSBCModePageCaching_WCE_Mask -Mask for use with flags field. -@constant kSBCModePageCaching_SIZE_Mask -Mask for use with flags field. -@constant kSBCModePageCaching_DISC_Mask -Mask for use with flags field. -@constant kSBCModePageCaching_CAP_Mask -Mask for use with flags field. -@constant kSBCModePageCaching_ABPF_Mask -Mask for use with flags field. -@constant kSBCModePageCaching_IC_Mask -Mask for use with flags field. -*/ -enum -{ - kSBCModePageCaching_RCD_Bit = 0, - kSBCModePageCaching_MF_Bit = 1, - kSBCModePageCaching_WCE_Bit = 2, - kSBCModePageCaching_SIZE_Bit = 3, - kSBCModePageCaching_DISC_Bit = 4, - kSBCModePageCaching_CAP_Bit = 5, - kSBCModePageCaching_ABPF_Bit = 6, - kSBCModePageCaching_IC_Bit = 7, - - kSBCModePageCaching_RCD_Mask = (1 << kSBCModePageCaching_RCD_Bit), - kSBCModePageCaching_MF_Mask = (1 << kSBCModePageCaching_MF_Bit), - kSBCModePageCaching_WCE_Mask = (1 << kSBCModePageCaching_WCE_Bit), - kSBCModePageCaching_SIZE_Mask = (1 << kSBCModePageCaching_SIZE_Bit), - kSBCModePageCaching_DISC_Mask = (1 << kSBCModePageCaching_DISC_Bit), - kSBCModePageCaching_CAP_Mask = (1 << kSBCModePageCaching_CAP_Bit), - kSBCModePageCaching_ABPF_Mask = (1 << kSBCModePageCaching_ABPF_Bit), - kSBCModePageCaching_IC_Mask = (1 << kSBCModePageCaching_IC_Bit) -}; - - -/*! -@enum Demand Read/Write Retention masks -@discussion -Demand Read/Write Retention masks. -@constant kSBCModePageCaching_DEMAND_WRITE_Mask -Mask for the DEMAND_READ_WRITE_RETENTION_PRIORITY field. -@constant kSBCModePageCaching_DEMAND_READ_Mask -Mask for the DEMAND_READ_WRITE_RETENTION_PRIORITY field. -*/ -enum -{ - kSBCModePageCaching_DEMAND_WRITE_Mask = 0x00FF, - kSBCModePageCaching_DEMAND_READ_Mask = 0xFF00 -}; - -/*! -@enum Caching flags2 bitfields -@discussion -Bit field definitions and masks for Caching flags2 field. -@constant kSBCModePageCaching_VS1_Bit -VS1 Bit definition. -@constant kSBCModePageCaching_VS2_Bit -VS2 Bit definition. -@constant kSBCModePageCaching_DRA_Bit -DRA Bit definition. -@constant kSBCModePageCaching_LBCSS_Bit -LBCSS Bit definition. -@constant kSBCModePageCaching_FSW_Bit -FSW Bit definition. -@constant kSBCModePageCaching_VS1_Mask -Mask for use with flags2 field. -@constant kSBCModePageCaching_VS2_Mask -Mask for use with flags2 field. -@constant kSBCModePageCaching_DRA_Mask -Mask for use with flags2 field. -@constant kSBCModePageCaching_LBCSS_Mask -Mask for use with flags2 field. -@constant kSBCModePageCaching_FSW_Mask -Mask for use with flags2 field. -*/ -enum -{ - // Bits 0:2 Reserved - kSBCModePageCaching_VS1_Bit = 3, - kSBCModePageCaching_VS2_Bit = 4, - kSBCModePageCaching_DRA_Bit = 5, - kSBCModePageCaching_LBCSS_Bit = 6, - kSBCModePageCaching_FSW_Bit = 7, - - kSBCModePageCaching_VS1_Mask = (1 << kSBCModePageCaching_VS1_Bit), - kSBCModePageCaching_VS2_Mask = (1 << kSBCModePageCaching_VS2_Bit), - kSBCModePageCaching_DRA_Mask = (1 << kSBCModePageCaching_DRA_Bit), - kSBCModePageCaching_LBCSS_Mask = (1 << kSBCModePageCaching_LBCSS_Bit), - kSBCModePageCaching_FSW_Mask = (1 << kSBCModePageCaching_FSW_Bit) -}; - -#pragma options align=reset - -#endif /* _IOKIT_SCSI_CMDS_MODE_DEFINITIONS_H_ */ diff --git a/i386/include/IOKit/scsi/SCSICmds_READ_CAPACITY_Definitions.h b/i386/include/IOKit/scsi/SCSICmds_READ_CAPACITY_Definitions.h deleted file mode 100644 index 59abde3..0000000 --- a/i386/include/IOKit/scsi/SCSICmds_READ_CAPACITY_Definitions.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_SCSI_CMDS_READ_CAPACITY_H_ -#define _IOKIT_SCSI_CMDS_READ_CAPACITY_H_ - - -#if KERNEL -#include <IOKit/IOTypes.h> -#else -#include <CoreFoundation/CoreFoundation.h> -#endif - - -/*! @header SCSI Request Sense Definitions - @discussion - This file contains all definitions for the data returned from - the READ CAPACITY 10 (0x25) and READ CAPACITY 16 (0x9E) commands. -*/ - -/*! -@enum READ CAPACITY Payload Sizes -@discussion -Sizes of the payload for the READ CAPACITY 10 and -READ CAPACITY 16 commands. -@constant kREPORT_CAPACITY_DataSize -Data size for a READ_CAPACITY command. -@constant kREPORT_CAPACITY_16_DataSize -Data size for a READ_CAPACITY_16 command. -*/ -enum -{ - kREPORT_CAPACITY_DataSize = 8, - kREPORT_CAPACITY_16_DataSize = 32 -}; - - -/*! -@constant kREPORT_CAPACITY_MaximumLBA -@discussion -Maximum LBA supported via READ CAPACITY 10 command. -*/ -#define kREPORT_CAPACITY_MaximumLBA 0xFFFFFFFFUL - - -/*! -@constant kREPORT_CAPACITY_16_MaximumLBA -@discussion -Maximum LBA supported via READ CAPACITY 16 command. -*/ -#define kREPORT_CAPACITY_16_MaximumLBA 0xFFFFFFFFFFFFFFFFULL - - -/*! -@struct SCSI_Capacity_Data -@discussion -Capacity return structure for READ CAPACITY 10 command. -*/ -typedef struct SCSI_Capacity_Data -{ - UInt32 RETURNED_LOGICAL_BLOCK_ADDRESS; - UInt32 BLOCK_LENGTH_IN_BYTES; -} SCSI_Capacity_Data; - - -/*! -@struct SCSI_Capacity_Data_Long -@discussion -Capacity return structure for READ CAPACITY 16 command. -*/ -typedef struct SCSI_Capacity_Data_Long -{ - UInt64 RETURNED_LOGICAL_BLOCK_ADDRESS; - UInt32 BLOCK_LENGTH_IN_BYTES; - UInt8 RTO_EN_PROT_EN; - UInt8 Reserved[19]; -} SCSI_Capacity_Data_Long; - - -/*! -@enum RTO_EN definitions -@discussion -Values for the REFERENCE TAG OWN (RTO_EN) bit in the -READ CAPACITY Long Data structure. -@constant kREAD_CAPACITY_RTO_Enabled -Reference Tag Own enabled. -@constant kREAD_CAPACITY_RTO_Disabled -Reference Tag Own disabled. -@constant kREAD_CAPACITY_RTO_Mask -Mask to use when checking the RTO_EN_PROT_EN field. -*/ -enum -{ - kREAD_CAPACITY_RTO_Enabled = 0x02, - kREAD_CAPACITY_RTO_Disabled = 0x00, - kREAD_CAPACITY_RTO_Mask = 0x02 -}; - - -/*! -@enum PROTECTION INFORMATION definitions -@discussion -Values for the PROTECTION INFORMATION (PROT_EN) bit in the -READ CAPACITY Long Data structure. -@constant kREAD_CAPACITY_PROT_Enabled -Protection Information enabled. -@constant kREAD_CAPACITY_PROT_Disabled -Protection Information disabled. -@constant kREAD_CAPACITY_PROT_Mask -Mask to use when checking the RTO_EN_PROT_EN field. -*/ - -enum -{ - kREAD_CAPACITY_PROT_Enabled = 0x01, - kREAD_CAPACITY_PROT_Disabled = 0x00, - kREAD_CAPACITY_PROT_Mask = 0x01 -}; - - -#endif /* _IOKIT_SCSI_CMDS_READ_CAPACITY_H_ */ diff --git a/i386/include/IOKit/scsi/SCSICmds_REPORT_LUNS_Definitions.h b/i386/include/IOKit/scsi/SCSICmds_REPORT_LUNS_Definitions.h deleted file mode 100644 index 6616e84..0000000 --- a/i386/include/IOKit/scsi/SCSICmds_REPORT_LUNS_Definitions.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) 2004-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_SCSI_CMDS_REPORT_LUNS_DEFINITIONS_H_ -#define _IOKIT_SCSI_CMDS_REPORT_LUNS_DEFINITIONS_H_ - - -#if KERNEL -#include <IOKit/IOTypes.h> -#else -#include <CoreFoundation/CoreFoundation.h> -#endif - - -/*! @header SCSI Request Sense Definitions - @discussion - This file contains all definitions for the data returned from - the REPORT_LUNS (0xA0) command. -*/ - - -/*! -@struct SCSICmd_REPORT_LUNS_LUN_ENTRY -@discussion -This structure represents a single LUN entry in a LUN list -returned via the REPORT_LUNS command. -*/ -typedef struct SCSICmd_REPORT_LUNS_LUN_ENTRY -{ - UInt16 FIRST_LEVEL_ADDRESSING; - UInt16 SECOND_LEVEL_ADDRESSING; - UInt16 THIRD_LEVEL_ADDRESSING; - UInt16 FOURTH_LEVEL_ADDRESSING; -} SCSICmd_REPORT_LUNS_LUN_ENTRY; - - -/*! -@constant kREPORT_LUNS_HeaderSize -@discussion -Size of the REPORT_LUNS header as defined in the SPC-3 specification. -*/ -#define kREPORT_LUNS_HeaderSize 8 - -/*! -@enum REPORT_LUNS addressing methods. -@discussion -REPORT_LUNS addressing methods described in -SAM-2 documents. -@constant kREPORT_LUNS_ADDRESS_METHOD_PERIPHERAL_DEVICE -Peripheral Device Addressing Method. -@constant kREPORT_LUNS_ADDRESS_DEVICE_TYPE_SPECIFIC -Device Type Specific Addressing Method. -@constant kREPORT_LUNS_ADDRESS_METHOD_LOGICAL_UNIT -Logical Unit Specific Addressing Method. -@constant kREPORT_LUNS_ADDRESS_METHOD_OFFSET -Offset to the address method data. -*/ -enum -{ - kREPORT_LUNS_ADDRESS_METHOD_PERIPHERAL_DEVICE = 0, - kREPORT_LUNS_ADDRESS_DEVICE_TYPE_SPECIFIC = 1, - kREPORT_LUNS_ADDRESS_METHOD_LOGICAL_UNIT = 2, - // Reserved [3] - kREPORT_LUNS_ADDRESS_METHOD_OFFSET = 14 -}; - - -/*! -@struct REPORT_LUNS_LOGICAL_UNIT_ADDRESSING -@discussion -This structure represents a LUN Addressing scheme. -*/ -typedef struct REPORT_LUNS_LOGICAL_UNIT_ADDRESSING -{ -#ifdef __LITTLE_ENDIAN__ - UInt16 LUN : 5; - UInt16 BUS_NUMBER : 3; - UInt16 TARGET : 6; - UInt16 reserved2 : 1; - UInt16 reserved : 1; -#else /* !__LITTLE_ENDIAN__ */ - UInt16 reserved : 1; - UInt16 reserved2 : 1; - UInt16 TARGET : 6; - UInt16 BUS_NUMBER : 3; - UInt16 LUN : 5; -#endif /* !__LITTLE_ENDIAN__ */ -} REPORT_LUNS_LOGICAL_UNIT_ADDRESSING; - - -/*! -@struct REPORT_LUNS_PERIPHERAL_DEVICE_ADDRESSING -@discussion -This structure represents a Peripheral Device Addressing scheme. -*/ -typedef struct REPORT_LUNS_PERIPHERAL_DEVICE_ADDRESSING -{ -#ifdef __LITTLE_ENDIAN__ - UInt16 TARGET_LUN : 8; - UInt16 BUS_IDENTIFIER : 6; - UInt16 reserved2 : 1; - UInt16 reserved : 1; -#else /* !__LITTLE_ENDIAN__ */ - UInt16 reserved : 1; - UInt16 reserved2 : 1; - UInt16 BUS_IDENTIFIER : 6; - UInt16 TARGET_LUN : 8; -#endif /* !__LITTLE_ENDIAN__ */ -} REPORT_LUNS_PERIPHERAL_DEVICE_ADDRESSING; - - -/*! -@struct SCSICmd_REPORT_LUNS_Header -@discussion -This structure defines the format of the data that is returned for -the REPORT_LUNS command. -*/ -typedef struct SCSICmd_REPORT_LUNS_Header -{ - UInt32 LUN_LIST_LENGTH; // LUN list length in bytes. - UInt32 RESERVED; - SCSICmd_REPORT_LUNS_LUN_ENTRY LUN[1]; // Variable length list. Must have at least LUN 0 if -} SCSICmd_REPORT_LUNS_Header; // Target supports REPORT_LUNS command. - - -#endif /* _IOKIT_SCSI_CMDS_REPORT_LUNS_DEFINITIONS_H_ */ diff --git a/i386/include/IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h b/i386/include/IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h deleted file mode 100644 index 8cfabb0..0000000 --- a/i386/include/IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_SCSI_CMDS_REQUEST_SENSE_H_ -#define _IOKIT_SCSI_CMDS_REQUEST_SENSE_H_ - - -#if KERNEL -#include <IOKit/IOTypes.h> -#else -#include <CoreFoundation/CoreFoundation.h> -#endif - - -/*! @header SCSI Request Sense Definitions - @discussion - This file contains all definitions for the data returned from - the REQUEST SENSE (0x03) command and from auto sense on protocols - that support it. -*/ - - -/*! -@enum kSenseDefaultSize -@discussion -The default size for SCSI Request Sense data. -*/ -enum -{ - kSenseDefaultSize = 18 -}; - - -/*! -@struct SCSI_Sense_Data -@discussion -The basic SCSI Request Sense data structure. -*/ -typedef struct SCSI_Sense_Data -{ - UInt8 VALID_RESPONSE_CODE; // 7 = Valid. 6-0 = Response Code. - UInt8 SEGMENT_NUMBER; // Segment number - UInt8 SENSE_KEY; // 7 = FILEMARK, 6 = EOM, 5 = ILI, 3-0 = SENSE KEY. - UInt8 INFORMATION_1; // INFORMATION. - UInt8 INFORMATION_2; // INFORMATION. - UInt8 INFORMATION_3; // INFORMATION. - UInt8 INFORMATION_4; // INFORMATION. - UInt8 ADDITIONAL_SENSE_LENGTH; // Number of additional bytes available in sense data - UInt8 COMMAND_SPECIFIC_INFORMATION_1; // Command Specific Information - UInt8 COMMAND_SPECIFIC_INFORMATION_2; // Command Specific Information - UInt8 COMMAND_SPECIFIC_INFORMATION_3; // Command Specific Information - UInt8 COMMAND_SPECIFIC_INFORMATION_4; // Command Specific Information - UInt8 ADDITIONAL_SENSE_CODE; // Additional Sense Code - UInt8 ADDITIONAL_SENSE_CODE_QUALIFIER; // Additional Sense Code Qualifier - UInt8 FIELD_REPLACEABLE_UNIT_CODE; // Field Replaceable Unit Code - UInt8 SKSV_SENSE_KEY_SPECIFIC_MSB; // 7 = Sense Key Specific Valid bit, 6-0 Sense Key Specific MSB - UInt8 SENSE_KEY_SPECIFIC_MID; // Sense Key Specific Middle - UInt8 SENSE_KEY_SPECIFIC_LSB; // Sense Key Specific LSB -} SCSI_Sense_Data; - - -/*! -@enum Sense Valid -@discussion -Masks to use to determine if sense data is valid or not. -@constant kSENSE_DATA_VALID -Sense data is valid. -@constant kSENSE_NOT_DATA_VALID -Sense data is not valid. -@constant kSENSE_DATA_VALID_Mask -Validity mask to use when checking the VALID_RESPONSE_CODE field. -*/ -enum -{ - kSENSE_DATA_VALID = 0x80, - kSENSE_NOT_DATA_VALID = 0x00, - kSENSE_DATA_VALID_Mask = 0x80 -}; - - -/*! -@enum Sense Response Codes -@discussion -Masks and values to determine the Response Code. -@constant kSENSE_RESPONSE_CODE_Current_Errors -Response code indicating current errors are reported. -@constant kSENSE_RESPONSE_CODE_Deferred_Errors -Response code indicating deferred errors are reported. -@constant kSENSE_RESPONSE_CODE_Mask -Mask to use when checking the VALID_RESPONSE_CODE field. -*/ -enum -{ - kSENSE_RESPONSE_CODE_Current_Errors = 0x70, - kSENSE_RESPONSE_CODE_Deferred_Errors = 0x71, - kSENSE_RESPONSE_CODE_Mask = 0x7F -}; - - -/*! -@enum FILEMARK bit field definitions -@discussion -Masks and values to determine the FileMark bit field. -@constant kSENSE_FILEMARK_Set -Filemark bit is set. -@constant kSENSE_FILEMARK_Not_Set -Filemark bit is not set. -@constant kSENSE_FILEMARK_Mask -Mask to use when checking the SENSE_KEY field for the FILEMARK bit. -*/ -enum -{ - kSENSE_FILEMARK_Set = 0x80, - kSENSE_FILEMARK_Not_Set = 0x00, - kSENSE_FILEMARK_Mask = 0x80 -}; - - -/*! -@enum EOM bit field definitions -@discussion -Masks and values to determine the End Of Medium bit field. -@constant kSENSE_EOM_Set -End Of Medium bit is set. -@constant kSENSE_EOM_Not_Set -End Of Medium bit is not set. -@constant kSENSE_EOM_Mask -Mask to use when checking the SENSE_KEY field for the EOM bit. -*/ -enum -{ - kSENSE_EOM_Set = 0x40, - kSENSE_EOM_Not_Set = 0x00, - kSENSE_EOM_Mask = 0x40 -}; - - -/*! -@enum ILI bit field definitions -@discussion -Masks and values to determine the Incorrect Length Indicator bit field. -@constant kSENSE_ILI_Set -Incorrect Length Indicator bit is set. -@constant kSENSE_ILI_Not_Set -Incorrect Length Indicator bit is not set. -@constant kSENSE_ILI_Mask -Mask to use when checking the SENSE_KEY field for the ILI bit. -*/ -enum -{ - kSENSE_ILI_Set = 0x20, - kSENSE_ILI_Not_Set = 0x00, - kSENSE_ILI_Mask = 0x20 -}; - - -/*! -@enum Sense Key definitions -@discussion -Masks and values to determine the SENSE_KEY. -@constant kSENSE_KEY_NO_SENSE -No sense data is present. -@constant kSENSE_KEY_RECOVERED_ERROR -A recovered error has occurred. -@constant kSENSE_KEY_NOT_READY -Device server is not ready. -@constant kSENSE_KEY_MEDIUM_ERROR -Device server detected a medium error. -@constant kSENSE_KEY_HARDWARE_ERROR -Device server detected a hardware error. -@constant kSENSE_KEY_ILLEGAL_REQUEST -Device server detected an illegal request. -@constant kSENSE_KEY_UNIT_ATTENTION -Device server indicates a unit attention condition. -@constant kSENSE_KEY_DATA_PROTECT -Device server indicates a data protect condition. -@constant kSENSE_KEY_BLANK_CHECK -Device server indicates a blank check condition. -@constant kSENSE_KEY_VENDOR_SPECIFIC -Device server indicates a vendor specific condition. -@constant kSENSE_KEY_COPY_ABORTED -Device server indicates a copy aborted condition. -@constant kSENSE_KEY_ABORTED_COMMAND -Device server indicates an aborted command condition. -@constant kSENSE_KEY_VOLUME_OVERFLOW -Device server indicates a volume overflow condition. -@constant kSENSE_KEY_MISCOMPARE -Device server indicates a miscompare condition. -@constant kSENSE_KEY_Mask -Mask to use when checking the SENSE_KEY field for the SENSE_KEY value. -*/ -enum -{ - kSENSE_KEY_NO_SENSE = 0x00, - kSENSE_KEY_RECOVERED_ERROR = 0x01, - kSENSE_KEY_NOT_READY = 0x02, - kSENSE_KEY_MEDIUM_ERROR = 0x03, - kSENSE_KEY_HARDWARE_ERROR = 0x04, - kSENSE_KEY_ILLEGAL_REQUEST = 0x05, - kSENSE_KEY_UNIT_ATTENTION = 0x06, - kSENSE_KEY_DATA_PROTECT = 0x07, - kSENSE_KEY_BLANK_CHECK = 0x08, - kSENSE_KEY_VENDOR_SPECIFIC = 0x09, - kSENSE_KEY_COPY_ABORTED = 0x0A, - kSENSE_KEY_ABORTED_COMMAND = 0x0B, - /* SENSE KEY 0x0C is obsoleted */ - kSENSE_KEY_VOLUME_OVERFLOW = 0x0D, - kSENSE_KEY_MISCOMPARE = 0x0E, - /* SENSE KEY 0x0F is reserved */ - kSENSE_KEY_Mask = 0x0F -}; - - -#endif /* _IOKIT_SCSI_CMDS_REQUEST_SENSE_H_ */ diff --git a/i386/include/IOKit/scsi/SCSICommandDefinitions.h b/i386/include/IOKit/scsi/SCSICommandDefinitions.h deleted file mode 100644 index d33aed6..0000000 --- a/i386/include/IOKit/scsi/SCSICommandDefinitions.h +++ /dev/null @@ -1,479 +0,0 @@ -/* - * Copyright (c) 2001-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_SCSI_COMMAND_DEFINITIONS_H_ -#define _IOKIT_SCSI_COMMAND_DEFINITIONS_H_ - - -#if KERNEL -#include <IOKit/IOTypes.h> -#else -#include <CoreFoundation/CoreFoundation.h> -#endif - - -/*! @header SCSICommandDefinitions - @discussion - This file contains all the definitions for types and constants that are - used by the command set classes for building CDBs. The field type - definitions are used for the parameters passed to a method that builds and - sends any SCSI defined command to clearly identify the type of value - expected for a parameter. - - The command methods will then use the appropriate mask to verify that the - value passed into a parameter is of the specified type. - - Currently only types and masks are defined for 8 bytes and smaller fields. - If a command is defined that uses a larger field, these should be expanded - to include those sizes. -*/ - -#pragma mark Field Type Definitions -/* These are the type definitions used for the parameters of methods that - * build and send Command Descriptor Blocks. - */ - -/* 1 Byte or smaller fields. */ - -/*! @typedef SCSICmdField1Bit */ -typedef UInt8 SCSICmdField1Bit; - -/*! @typedef SCSICmdField2Bit */ -typedef UInt8 SCSICmdField2Bit; - -/*! @typedef SCSICmdField3Bit */ -typedef UInt8 SCSICmdField3Bit; - -/*! @typedef SCSICmdField4Bit */ -typedef UInt8 SCSICmdField4Bit; - -/*! @typedef SCSICmdField5Bit */ -typedef UInt8 SCSICmdField5Bit; - -/*! @typedef SCSICmdField6Bit */ -typedef UInt8 SCSICmdField6Bit; - -/*! @typedef SCSICmdField7Bit */ -typedef UInt8 SCSICmdField7Bit; - -/*! @typedef SCSICmdField1Byte */ -typedef UInt8 SCSICmdField1Byte; - -/* 2 Bytes or smaller fields. */ - -/*! @typedef SCSICmdField9Bit */ -typedef UInt16 SCSICmdField9Bit; - -/*! @typedef SCSICmdField10Bit */ -typedef UInt16 SCSICmdField10Bit; - -/*! @typedef SCSICmdField11Bit */ -typedef UInt16 SCSICmdField11Bit; - -/*! @typedef SCSICmdField12Bit */ -typedef UInt16 SCSICmdField12Bit; - -/*! @typedef SCSICmdField13Bit */ -typedef UInt16 SCSICmdField13Bit; - -/*! @typedef SCSICmdField14Bit */ -typedef UInt16 SCSICmdField14Bit; - -/*! @typedef SCSICmdField15Bit */ -typedef UInt16 SCSICmdField15Bit; - -/*! @typedef SCSICmdField2Byte */ -typedef UInt16 SCSICmdField2Byte; - -/* 3 Bytes or smaller fields. */ - -/*! @typedef SCSICmdField17Bit */ -typedef UInt32 SCSICmdField17Bit; - -/*! @typedef SCSICmdField18Bit */ -typedef UInt32 SCSICmdField18Bit; - -/*! @typedef SCSICmdField19Bit */ -typedef UInt32 SCSICmdField19Bit; - -/*! @typedef SCSICmdField20Bit */ -typedef UInt32 SCSICmdField20Bit; - -/*! @typedef SCSICmdField21Bit */ -typedef UInt32 SCSICmdField21Bit; - -/*! @typedef SCSICmdField22Bit */ -typedef UInt32 SCSICmdField22Bit; - -/*! @typedef SCSICmdField23Bit */ -typedef UInt32 SCSICmdField23Bit; - -/*! @typedef SCSICmdField3Byte */ -typedef UInt32 SCSICmdField3Byte; - -/* 4 Bytes or smaller fields. */ - -/*! @typedef SCSICmdField25Bit */ -typedef UInt32 SCSICmdField25Bit; - -/*! @typedef SCSICmdField26Bit */ -typedef UInt32 SCSICmdField26Bit; - -/*! @typedef SCSICmdField27Bit */ -typedef UInt32 SCSICmdField27Bit; - -/*! @typedef SCSICmdField28Bit */ -typedef UInt32 SCSICmdField28Bit; - -/*! @typedef SCSICmdField29Bit */ -typedef UInt32 SCSICmdField29Bit; - -/*! @typedef SCSICmdField30Bit */ -typedef UInt32 SCSICmdField30Bit; - -/*! @typedef SCSICmdField31Bit */ -typedef UInt32 SCSICmdField31Bit; - -/*! @typedef SCSICmdField4Byte */ -typedef UInt32 SCSICmdField4Byte; - -/* 5 Bytes or smaller fields. */ - -/*! @typedef SCSICmdField33Bit */ -typedef UInt64 SCSICmdField33Bit; - -/*! @typedef SCSICmdField34Bit */ -typedef UInt64 SCSICmdField34Bit; - -/*! @typedef SCSICmdField35Bit */ -typedef UInt64 SCSICmdField35Bit; - -/*! @typedef SCSICmdField36Bit */ -typedef UInt64 SCSICmdField36Bit; - -/*! @typedef SCSICmdField37Bit */ -typedef UInt64 SCSICmdField37Bit; - -/*! @typedef SCSICmdField38Bit */ -typedef UInt64 SCSICmdField38Bit; - -/*! @typedef SCSICmdField39Bit */ -typedef UInt64 SCSICmdField39Bit; - -/*! @typedef SCSICmdField5Byte */ -typedef UInt64 SCSICmdField5Byte; - -/* 6 Bytes or smaller fields. */ - -/*! @typedef SCSICmdField41Bit */ -typedef UInt64 SCSICmdField41Bit; - -/*! @typedef SCSICmdField42Bit */ -typedef UInt64 SCSICmdField42Bit; - -/*! @typedef SCSICmdField43Bit */ -typedef UInt64 SCSICmdField43Bit; - -/*! @typedef SCSICmdField44Bit */ -typedef UInt64 SCSICmdField44Bit; - -/*! @typedef SCSICmdField45Bit */ -typedef UInt64 SCSICmdField45Bit; - -/*! @typedef SCSICmdField46Bit */ -typedef UInt64 SCSICmdField46Bit; - -/*! @typedef SCSICmdField47Bit */ -typedef UInt64 SCSICmdField47Bit; - -/*! @typedef SCSICmdField6Byte */ -typedef UInt64 SCSICmdField6Byte; - -/* 7 Bytes or smaller fields. */ - -/*! @typedef SCSICmdField49Bit */ -typedef UInt64 SCSICmdField49Bit; - -/*! @typedef SCSICmdField50Bit */ -typedef UInt64 SCSICmdField50Bit; - -/*! @typedef SCSICmdField51Bit */ -typedef UInt64 SCSICmdField51Bit; - -/*! @typedef SCSICmdField52Bit */ -typedef UInt64 SCSICmdField52Bit; - -/*! @typedef SCSICmdField53Bit */ -typedef UInt64 SCSICmdField53Bit; - -/*! @typedef SCSICmdField54Bit */ -typedef UInt64 SCSICmdField54Bit; - -/*! @typedef SCSICmdField55Bit */ -typedef UInt64 SCSICmdField55Bit; - -/*! @typedef SCSICmdField7Byte */ -typedef UInt64 SCSICmdField7Byte; - -/* 8 Bytes or smaller fields. */ - -/*! @typedef SCSICmdField57Bit */ -typedef UInt64 SCSICmdField57Bit; - -/*! @typedef SCSICmdField58Bit */ -typedef UInt64 SCSICmdField58Bit; - -/*! @typedef SCSICmdField59Bit */ -typedef UInt64 SCSICmdField59Bit; - -/*! @typedef SCSICmdField60Bit */ -typedef UInt64 SCSICmdField60Bit; - -/*! @typedef SCSICmdField61Bit */ -typedef UInt64 SCSICmdField61Bit; - -/*! @typedef SCSICmdField62Bit */ -typedef UInt64 SCSICmdField62Bit; - -/*! @typedef SCSICmdField63Bit */ -typedef UInt64 SCSICmdField63Bit; - -/*! @typedef SCSICmdField8Byte */ -typedef UInt64 SCSICmdField8Byte; - - -#pragma mark Field Mask Definitions -/* These are masks that are used to verify that the values passed into the - * parameters for the fields are not larger than the field size. - * - * NB: These have changed from enums to #define since enums greater than - * 32 bits in size are not well-defined in C99. - */ - -/* 1 Byte or smaller fields. */ - -/*! @constant kSCSICmdFieldMask1Bit */ -#define kSCSICmdFieldMask1Bit 0x01 - -/*! @constant kSCSICmdFieldMask2Bit */ -#define kSCSICmdFieldMask2Bit 0x03 - -/*! @constant kSCSICmdFieldMask3Bit */ -#define kSCSICmdFieldMask3Bit 0x07 - -/*! @constant kSCSICmdFieldMask4Bit */ -#define kSCSICmdFieldMask4Bit 0x0F - -/*! @constant kSCSICmdFieldMask5Bit */ -#define kSCSICmdFieldMask5Bit 0x1F - -/*! @constant kSCSICmdFieldMask6Bit */ -#define kSCSICmdFieldMask6Bit 0x3F - -/*! @constant kSCSICmdFieldMask7Bit */ -#define kSCSICmdFieldMask7Bit 0x7F - -#define kSCSICmdFieldMask1Byte 0xFF - -/* 2 Bytes or smaller fields. */ - -/*! @constant kSCSICmdFieldMask9Bit */ -#define kSCSICmdFieldMask9Bit 0x01FF - -/*! @constant kSCSICmdFieldMask10Bit */ -#define kSCSICmdFieldMask10Bit 0x03FF - -/*! @constant kSCSICmdFieldMask11Bit */ -#define kSCSICmdFieldMask11Bit 0x07FF - -/*! @constant kSCSICmdFieldMask12Bit */ -#define kSCSICmdFieldMask12Bit 0x0FFF - -/*! @constant kSCSICmdFieldMask13Bit */ -#define kSCSICmdFieldMask13Bit 0x1FFF - -/*! @constant kSCSICmdFieldMask14Bit */ -#define kSCSICmdFieldMask14Bit 0x3FFF - -/*! @constant kSCSICmdFieldMask15Bit */ -#define kSCSICmdFieldMask15Bit 0x7FFF - -/*! @constant kSCSICmdFieldMask2Byte */ -#define kSCSICmdFieldMask2Byte 0xFFFF - -/* 3 Bytes or smaller fields. */ - -/*! @constant kSCSICmdFieldMask17Bit */ -#define kSCSICmdFieldMask17Bit 0x01FFFF - -/*! @constant kSCSICmdFieldMask18Bit */ -#define kSCSICmdFieldMask18Bit 0x03FFFF - -/*! @constant kSCSICmdFieldMask19Bit */ -#define kSCSICmdFieldMask19Bit 0x07FFFF - -/*! @constant kSCSICmdFieldMask20Bit */ -#define kSCSICmdFieldMask20Bit 0x0FFFFF - -/*! @constant kSCSICmdFieldMask21Bit */ -#define kSCSICmdFieldMask21Bit 0x1FFFFF - -/*! @constant kSCSICmdFieldMask22Bit */ -#define kSCSICmdFieldMask22Bit 0x3FFFFF - -/*! @constant kSCSICmdFieldMask23Bit */ -#define kSCSICmdFieldMask23Bit 0x7FFFFF - -/*! @constant kSCSICmdFieldMask3Byte */ -#define kSCSICmdFieldMask3Byte 0xFFFFFF - -/* 4 Bytes or smaller fields. */ -/*! @constant kSCSICmdFieldMask25Bit */ -#define kSCSICmdFieldMask25Bit 0x01FFFFFFUL - -/*! @constant kSCSICmdFieldMask26Bit */ -#define kSCSICmdFieldMask26Bit 0x03FFFFFFUL - -/*! @constant kSCSICmdFieldMask27Bit */ -#define kSCSICmdFieldMask27Bit 0x07FFFFFFUL - -/*! @constant kSCSICmdFieldMask28Bit */ -#define kSCSICmdFieldMask28Bit 0x0FFFFFFFUL - -/*! @constant kSCSICmdFieldMask29Bit */ -#define kSCSICmdFieldMask29Bit 0x1FFFFFFFUL - -/*! @constant kSCSICmdFieldMask30Bit */ -#define kSCSICmdFieldMask30Bit 0x3FFFFFFFUL - -/*! @constant kSCSICmdFieldMask31Bit */ -#define kSCSICmdFieldMask31Bit 0x7FFFFFFFUL - -/*! @constant kSCSICmdFieldMask4Byte */ -#define kSCSICmdFieldMask4Byte 0xFFFFFFFFUL - -/* 5 Bytes or smaller fields. */ - -/*! @constant kSCSICmdFieldMask33Bit */ -#define kSCSICmdFieldMask33Bit 0x01FFFFFFFFULL - -/*! @constant kSCSICmdFieldMask34Bit */ -#define kSCSICmdFieldMask34Bit 0x03FFFFFFFFULL - -/*! @constant kSCSICmdFieldMask35Bit */ -#define kSCSICmdFieldMask35Bit 0x07FFFFFFFFULL - -/*! @constant kSCSICmdFieldMask36Bit */ -#define kSCSICmdFieldMask36Bit 0x0FFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask37Bit */ -#define kSCSICmdFieldMask37Bit 0x1FFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask38Bit */ -#define kSCSICmdFieldMask38Bit 0x3FFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask39Bit */ -#define kSCSICmdFieldMask39Bit 0x7FFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask5Byte */ -#define kSCSICmdFieldMask5Byte 0xFFFFFFFFFFULL - -/* 6 Bytes or smaller fields. */ - -/*! @constant kSCSICmdFieldMask41Bit */ -#define kSCSICmdFieldMask41Bit 0x01FFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask42Bit */ -#define kSCSICmdFieldMask42Bit 0x03FFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask43Bit */ -#define kSCSICmdFieldMask43Bit 0x07FFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask44Bit */ -#define kSCSICmdFieldMask44Bit 0x0FFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask45Bit */ -#define kSCSICmdFieldMask45Bit 0x1FFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask46Bit */ -#define kSCSICmdFieldMask46Bit 0x3FFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask47Bit */ -#define kSCSICmdFieldMask47Bit 0x7FFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask6Byte */ -#define kSCSICmdFieldMask6Byte 0xFFFFFFFFFFFFULL - -/* 7 Bytes or smaller fields. */ - -/*! @constant kSCSICmdFieldMask49Bit */ -#define kSCSICmdFieldMask49Bit 0x01FFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask50Bit */ -#define kSCSICmdFieldMask50Bit 0x03FFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask51Bit */ -#define kSCSICmdFieldMask51Bit 0x07FFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask52Bit */ -#define kSCSICmdFieldMask52Bit 0x0FFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask53Bit */ -#define kSCSICmdFieldMask53Bit 0x1FFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask54Bit */ -#define kSCSICmdFieldMask54Bit 0x3FFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask55Bit */ -#define kSCSICmdFieldMask55Bit 0x7FFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask7Byte */ -#define kSCSICmdFieldMask7Byte 0xFFFFFFFFFFFFFFULL - -/* 8 Bytes or smaller fields. */ - -/*! @constant kSCSICmdFieldMask57Bit */ -#define kSCSICmdFieldMask57Bit 0x01FFFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask58Bit */ -#define kSCSICmdFieldMask58Bit 0x03FFFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask59Bit */ -#define kSCSICmdFieldMask59Bit 0x07FFFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask60Bit */ -#define kSCSICmdFieldMask60Bit 0x0FFFFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask61Bit */ -#define kSCSICmdFieldMask61Bit 0x1FFFFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask62Bit */ -#define kSCSICmdFieldMask62Bit 0x3FFFFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask63Bit */ -#define kSCSICmdFieldMask63Bit 0x7FFFFFFFFFFFFFFFULL - -/*! @constant kSCSICmdFieldMask8Byte */ -#define kSCSICmdFieldMask8Byte 0xFFFFFFFFFFFFFFFFULL - -#endif /* _IOKIT_SCSI_COMMAND_DEFINITIONS_H_ */ diff --git a/i386/include/IOKit/scsi/SCSICommandOperationCodes.h b/i386/include/IOKit/scsi/SCSICommandOperationCodes.h deleted file mode 100644 index 21d9d1e..0000000 --- a/i386/include/IOKit/scsi/SCSICommandOperationCodes.h +++ /dev/null @@ -1,941 +0,0 @@ -/* - * Copyright (c) 2001-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _SCSI_COMMAND_OPERATION_CODES_H_ -#define _SCSI_COMMAND_OPERATION_CODES_H_ - -#pragma mark About this file -/* This file contains the operation code definitions for all commands defined - * by the SCSI specifications. The commands are listed in three formats: - * 1) All commands are listed in alphabetical order. This list is the live - * enumeration for all of the command constants. - * 2) The commands are listed in ascending numerical order. - * 3) The commands are grouped by Peripheral Device Type. - * - * In the command listings by Peripheral Device Type, there will be a comment - * following each command. This comment indentifies the section of the related - * specification where the commands is defined and the requirement type of the - * command, Mandatory or Optional. - * If a specification redefines an optional command from SPC as mandatory, - * the command will be relisted in the Peripheral Device Type command list with - * the mandatory tag next to it. - * All commands that are listed in SPC as Device Type Specifc will be relisted - * as a comment in all specifications lists that support that command with the - * appropriate Mandatory or Optional tag for that specification. - * - * The section number and the requirement type of the command are based on the - * version of the specification listed in the header comment for the Peripheral - * Device Type. This data is provided for informational purposes only. The - * specification document and version that the device adheres to as indicated - * by the data returned in response to the INQUIRY command should be used as - * the authorative source for supported and required behavior of the device. - * - * The SPC set is listed before all other Peripheral Device Type commands as - * this is the base document from which all of the other documents are derived. - * - * The Peripheral Device Types and associated command sets as defined by SPC-2, - * section 7.4.1 are as follows: - * Peripheral Device Type Associated Command Specification - * ------------------------------------ ----------------------------------- - * 0x00 Direct Access Device SBC - SCSI-3 Block Commands - * 0x01 Sequential Access Device SSC - SCSI-3 Stream Commands - * 0x02 Printer Device SSC - SCSI-3 Stream Commands - * 0x03 Processor Device SPC - SCSI Primary Commands-2 - * 0x04 Write Once Device SBC - SCSI-3 Block Commands - * 0x05 CD-ROM Device MMC - SCSI Multimedia Commands-2 - * 0x06 Scanner Device SGC - SCSI-3 Graphics Commands - * 0x07 Optical Memory Device SBC - SCSI-3 Block Commands - * 0x08 Medium Changer Device SMC - SCSI-3 Medium Changer Cmds - * 0x09 Communications Device SSC - SCSI-3 Stream Commands - * 0x0A - 0x0B Graphic Arts Prepress Dev ASC IT8 - * 0x0C Storage Array Controller Device SCC-2 - SCSI Controller Commands-2 - * 0x0D Enclosure Services SES - SCSI-3 Enclosure Services - * 0x0E Simplified Direct Access Device RBC - SCSI Reduced Block Commands - * 0x0F Optical Card Reader/Writer Device OCRW - SCSI Specification for - * Optical Card Reader/Writer - * 0x10 Reserved No command specification - * 0x11 Object-Based Storage Device OSD - SCSI Object Based Storage - * Device Commands - * 0x12 - 0x14 Reserved No command specification - * 0x15 Multimedia Media Access Engine RMC - Reduced Multimedia Commands - * 0x16 - 0x1E Reserved No command specification - * 0x1F Unknown or No Device No command specification - */ - -#pragma mark - -#pragma mark Command Definitions by Name -/* All SCSI Commands listed in alphabetical order. These are the live - * definitions of the commands. All other command lists are informative. - */ -enum -{ - kSCSICmd_ACCESS_CONTROL_IN = 0x86, - kSCSICmd_ACCESS_CONTROL_OUT = 0x87, - kSCSICmd_BLANK = 0xA1, - kSCSICmd_CHANGE_DEFINITION = 0x40, - kSCSICmd_CLOSE_TRACK_SESSION = 0x5B, - kSCSICmd_COMPARE = 0x39, - kSCSICmd_COPY = 0x18, - kSCSICmd_COPY_AND_VERIFY = 0x3A, - kSCSICmd_ERASE_10 = 0x2C, - kSCSICmd_ERASE_12 = 0xAC, - kSCSICmd_EXTENDED_COPY = 0x83, - kSCSICmd_FORMAT_UNIT = 0x04, - kSCSICmd_GET_CONFIGURATION = 0x46, - kSCSICmd_GET_EVENT_STATUS_NOTIFICATION = 0x4A, - kSCSICmd_GET_PERFORMANCE = 0xAC, - kSCSICmd_INQUIRY = 0x12, - kSCSICmd_LOAD_UNLOAD_MEDIUM = 0xA6, - kSCSICmd_LOCK_UNLOCK_CACHE = 0x36, - kSCSICmd_LOCK_UNLOCK_CACHE_16 = 0x92, - kSCSICmd_LOG_SELECT = 0x4C, - kSCSICmd_LOG_SENSE = 0x4D, - kSCSICmd_MAINTENANCE_IN = 0xA3, - kSCSICmd_MAINTENANCE_OUT = 0xA4, - kSCSICmd_MECHANISM_STATUS = 0xBD, - kSCSICmd_MEDIUM_SCAN = 0x38, - kSCSICmd_MODE_SELECT_6 = 0x15, - kSCSICmd_MODE_SELECT_10 = 0x55, - kSCSICmd_MODE_SENSE_6 = 0x1A, - kSCSICmd_MODE_SENSE_10 = 0x5A, - kSCSICmd_MOVE_MEDIUM_ATTACHED = 0xA7, - kSCSICmd_PAUSE_RESUME = 0x4B, - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, - kSCSICmd_PLAY_AUDIO_10 = 0x45, - kSCSICmd_PLAY_AUDIO_12 = 0xA5, - kSCSICmd_PLAY_AUDIO_MSF = 0x47, - kSCSICmd_PLAY_AUDIO_TRACK_INDEX = 0x48, - kSCSICmd_PLAY_CD = 0xBC, - kSCSICmd_PLAY_RELATIVE_10 = 0x49, - kSCSICmd_PLAY_RELATIVE_12 = 0xA9, - kSCSICmd_PREFETCH = 0x34, - kSCSICmd_PREFETCH_16 = 0x90, - kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, - kSCSICmd_READ_6 = 0x08, - kSCSICmd_READ_10 = 0x28, - kSCSICmd_READ_12 = 0xA8, - kSCSICmd_READ_16 = 0x88, - kSCSICmd_READ_ATTRIBUTE = 0x8C, - kSCSICmd_READ_BUFFER = 0x3C, - kSCSICmd_READ_BUFFER_CAPACITY = 0x5C, - kSCSICmd_READ_CAPACITY = 0x25, - kSCSICmd_READ_CD = 0xBE, - kSCSICmd_READ_CD_MSF = 0xB9, - kSCSICmd_READ_DEFECT_DATA_10 = 0x37, - kSCSICmd_READ_DEFECT_DATA_12 = 0xB7, - kSCSICmd_READ_DISC_INFORMATION = 0x51, - kSCSICmd_READ_DVD_STRUCTURE = 0xAD, - kSCSICmd_READ_DISC_STRUCTURE = 0xAD, - kSCSICmd_READ_ELEMENT_STATUS_ATTACHED = 0xB4, - kSCSICmd_READ_FORMAT_CAPACITIES = 0x23, - kSCSICmd_READ_GENERATION = 0x29, - kSCSICmd_READ_HEADER = 0x44, - kSCSICmd_READ_LONG = 0x3E, - kSCSICmd_READ_MASTER_CUE = 0x59, - kSCSICmd_READ_SUB_CHANNEL = 0x42, - kSCSICmd_READ_TOC_PMA_ATIP = 0x43, - kSCSICmd_READ_TRACK_INFORMATION = 0x52, - kSCSICmd_READ_UPDATED_BLOCK_10 = 0x2D, - kSCSICmd_REASSIGN_BLOCKS = 0x07, - kSCSICmd_REBUILD = 0x81, - kSCSICmd_RECEIVE = 0x08, - kSCSICmd_RECEIVE_COPY_RESULTS = 0x84, - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, - kSCSICmd_REDUNDANCY_GROUP_IN = 0xBA, - kSCSICmd_REDUNDANCY_GROUP_OUT = 0xBB, - kSCSICmd_REGENERATE = 0x82, - kSCSICmd_RELEASE_6 = 0x17, - kSCSICmd_RELEASE_10 = 0x57, - kSCSICmd_REPAIR_TRACK = 0x58, - kSCSICmd_REPORT_DEVICE_IDENTIFIER = 0xA3, - kSCSICmd_REPORT_KEY = 0xA4, - kSCSICmd_REPORT_LUNS = 0xA0, - kSCSICmd_REQUEST_SENSE = 0x03, - kSCSICmd_RESERVE_6 = 0x16, - kSCSICmd_RESERVE_10 = 0x56, - kSCSICmd_RESERVE_TRACK = 0x53, - kSCSICmd_REZERO_UNIT = 0x01, - kSCSICmd_SCAN_MMC = 0xBA, - kSCSICmd_SEARCH_DATA_EQUAL_10 = 0x31, - kSCSICmd_SEARCH_DATA_EQUAL_12 = 0xB1, - kSCSICmd_SEARCH_DATA_HIGH_10 = 0x30, - kSCSICmd_SEARCH_DATA_HIGH_12 = 0xB0, - kSCSICmd_SEARCH_DATA_LOW_10 = 0x32, - kSCSICmd_SEARCH_DATA_LOW_12 = 0xB2, - kSCSICmd_SEEK_6 = 0x0B, - kSCSICmd_SEEK_10 = 0x2B, - kSCSICmd_SEND = 0x0A, - kSCSICmd_SEND_CUE_SHEET = 0x5D, - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, - kSCSICmd_SEND_DVD_STRUCTURE = 0xBF, - kSCSICmd_SEND_EVENT = 0xA2, - kSCSICmd_SEND_KEY = 0xA3, - kSCSICmd_SEND_OPC_INFORMATION = 0x54, - kSCSICmd_SERVICE_ACTION_IN = 0x9E, - kSCSICmd_SERVICE_ACTION_OUT = 0x9F, - kSCSICmd_SET_CD_SPEED = 0xBB, - kSCSICmd_SET_DEVICE_IDENTIFIER = 0xA4, - kSCSICmd_SET_LIMITS_10 = 0x33, - kSCSICmd_SET_LIMITS_12 = 0xB3, - kSCSICmd_SET_READ_AHEAD = 0xA7, - kSCSICmd_SET_STREAMING = 0xB6, - kSCSICmd_SPARE_IN = 0xBC, - kSCSICmd_SPARE_OUT = 0xBD, - kSCSICmd_START_STOP_UNIT = 0x1B, - kSCSICmd_STOP_PLAY_SCAN = 0x4E, - kSCSICmd_SYNCHRONIZE_CACHE = 0x35, - kSCSICmd_SYNCHRONIZE_CACHE_16 = 0x91, - kSCSICmd_TEST_UNIT_READY = 0x00, - kSCSICmd_UPDATE_BLOCK = 0x3D, - kSCSICmd_VERIFY_10 = 0x2F, - kSCSICmd_VERIFY_12 = 0xAF, - kSCSICmd_VERIFY_16 = 0x8F, - kSCSICmd_VOLUME_SET_IN = 0xBE, - kSCSICmd_VOLUME_SET_OUT = 0xBF, - kSCSICmd_WRITE_6 = 0x0A, - kSCSICmd_WRITE_10 = 0x2A, - kSCSICmd_WRITE_12 = 0xAA, - kSCSICmd_WRITE_16 = 0x8A, - kSCSICmd_WRITE_AND_VERIFY_10 = 0x2E, - kSCSICmd_WRITE_AND_VERIFY_12 = 0xAE, - kSCSICmd_WRITE_AND_VERIFY_16 = 0x8E, - kSCSICmd_WRITE_ATTRIBUTE = 0x8D, - kSCSICmd_WRITE_BUFFER = 0x3B, - kSCSICmd_WRITE_LONG = 0x3F, - kSCSICmd_WRITE_SAME = 0x41, - kSCSICmd_WRITE_SAME_16 = 0x93, - kSCSICmd_XDREAD = 0x52, - kSCSICmd_XDWRITE = 0x50, - kSCSICmd_XDWRITE_EXTENDED = 0x80, - kSCSICmd_XDWRITEREAD_10 = 0x53, - kSCSICmd_XPWRITE = 0x51, - - kSCSICmdVariableLengthCDB = 0x7F -}; - -/* Service Action Definitions for the Variable Length CDB (7Fh) command */ -enum -{ - kSCSIServiceAction_READ_32 = 0x0009, - kSCSIServiceAction_VERIFY_32 = 0x000A, - kSCSIServiceAction_WRITE_32 = 0x000B, - kSCSIServiceAction_WRITE_AND_VERIFY_32 = 0x000C, - kSCSIServiceAction_WRITE_SAME_32 = 0x000D, - kSCSIServiceAction_XDREAD_32 = 0x0003, - kSCSIServiceAction_XDWRITE_32 = 0x0004, - kSCSIServiceAction_XDWRITEREAD_32 = 0x0007, - kSCSIServiceAction_XPWRITE_32 = 0x0006 -}; - -/* Service Action Definitions for the MAINTENANCE IN (A3h) command */ -enum -{ - kSCSIServiceAction_REPORT_ALIASES = 0x0B, - kSCSIServiceAction_REPORT_DEVICE_IDENTIFIER = 0x05, - kSCSIServiceAction_REPORT_PRIORITY = 0x0E, - kSCSIServiceAction_REPORT_SUPPORTED_OPERATION_CODES = 0x0C, - kSCSIServiceAction_REPORT_SUPPORTED_TASK_MANAGEMENT_FUNCTIONS = 0x0D, - kSCSIServiceAction_REPORT_TARGET_PORT_GROUPS = 0x0A -}; - -/* Service Action Definitions for the MAINTENANCE OUT (A4h) command */ -enum -{ - kSCSIServiceAction_CHANGE_ALIASES = 0x0B, - kSCSIServiceAction_SET_DEVICE_IDENTIFIER = 0x06, - kSCSIServiceAction_SET_PRIORITY = 0x0E, - kSCSIServiceAction_SET_TARGET_PORT_GROUPS = 0x0A -}; - -/* Service Action Definitions for the SERVICE ACTION IN (9Eh) command */ -enum -{ - kSCSIServiceAction_READ_CAPACITY_16 = 0x10, - kSCSIServiceAction_READ_LONG_16 = 0x11 -}; - -/* Service Action Definitions for the SERVICE ACTION OUT (9Fh) command */ -enum -{ - kSCSIServiceAction_WRITE_LONG_16 = 0x11 -}; - -#pragma mark - -#pragma mark Command Definitions by Number -#if 0 -enum -{ -}; -#endif - - -#pragma mark - -#pragma mark All Types SPC Commands -/* Commands defined by the T10:1236-D SCSI Primary Commands-2 (SPC-2) - * command specification. The definitions and section numbers are based on - * section 7 of the revision 18, 21 May 2000 version of the specification. - * - * These commands are defined for all devices. - */ -#if 0 -enum -{ - kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ - kSCSICmd_COMPARE = 0x39, /* Sec. 7.2: Optional */ - kSCSICmd_COPY = 0x18, /* Sec. 7.3: Optional */ - kSCSICmd_COPY_AND_VERIFY = 0x3A, /* Sec. 7.4: Optional */ - kSCSICmd_EXTENDED_COPY = 0x83, /* Sec. 7.5: Optional */ - kSCSICmd_INQUIRY = 0x12, /* Sec. 7.6: Mandatory */ - kSCSICmd_LOG_SELECT = 0x4C, /* Sec. 7.7: Optional */ - kSCSICmd_LOG_SENSE = 0x4D, /* Sec. 7.8: Optional */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* Sec. 7.9: Device Type - * Specific */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* Sec. 7.10: Device Type - * Specific */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* Sec. 7.11: Device Type - * Specific */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* Sec. 7.12: Device Type - * Specific */ - kSCSICmd_MOVE_MEDIUM_ATTACHED = 0xA7, /* Defined in SMC */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Sec. 7.13: Device Type - * Specific */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Sec. 7.14: Device Type - * Specific */ - kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* Sec. 7.15: Device Type - * Specific */ - kSCSICmd_READ_BUFFER = 0x3C, /* Sec. 7.16: Optional */ - kSCSICmd_READ_ELEMENT_STATUS_ATTACHED = 0xB4, /* Defined in SMC */ - kSCSICmd_RECEIVE_COPY_RESULTS = 0x84, /* Sec. 7.17: Optional */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* Sec. 7.18: Optional */ - kSCSICmd_RELEASE_10 = 0x57, /* Sec. 7.19: Device Type - * Specific */ - kSCSICmd_RELEASE_6 = 0x17, /* Sec. 7.20: Device Type - * Specific */ - kSCSICmd_REPORT_DEVICE_IDENTIFIER = 0xA3, /* Sec. 7.21: Optional */ - kSCSICmd_REPORT_LUNS = 0xA0, /* Sec. 7.22: Mandatory for - * LUN Supporting devices*/ - kSCSICmd_REQUEST_SENSE = 0x03, /* Sec. 7.23: Device Type - * Specific */ - kSCSICmd_RESERVE_10 = 0x56, /* Sec. 7.24: Device Type - * Specific */ - kSCSICmd_RESERVE_6 = 0x16, /* Sec. 7.25: Device Type - * Specific */ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* Sec. 7.26: Optional */ - kSCSICmd_SET_DEVICE_IDENTIFIER = 0xA4, /* Sec. 7.27: Optional */ - kSCSICmd_TEST_UNIT_READY = 0x00, /* Sec. 7.28: Mandatory */ - kSCSICmd_WRITE_BUFFER = 0x3B /* Sec. 7.29: Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x00 SBC Direct Access Commands -/* Commands defined by the T10:990-D SCSI-3 Block Commands (SBC) command - * specification. The definitions and section numbers are based on section 6.1 - * of the revision 8c, 13 November 1997 version of the specification. - */ -#if 0 -enum -{ - kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ - kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ - kSCSICmd_COPY = 0x18, /* SPC: Optional */ - kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional*/ - kSCSICmd_FORMAT_UNIT = 0x04, /* Sec. 6.1.1: Mandatory */ - kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ - kSCSICmd_LOCK_UNLOCK_CACHE = 0x36, /* Sec. 6.1.2: Optional */ - kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ - kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Optional */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Optional */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ - kSCSICmd_MOVE_MEDIUM_ATTACHED = 0xA7, /* SMC: Optional */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* SPC: Optional */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* SPC: Optional */ - kSCSICmd_PREFETCH = 0x34, /* Sec. 6.1.3: Optional */ - kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* SPC: Optional */ - kSCSICmd_READ_6 = 0x08, /* Sec. 6.1.4: Mandatory */ - kSCSICmd_READ_10 = 0x28, /* Sec. 6.1.5: Mandatory */ - kSCSICmd_READ_12 = 0xA8, /* Sec. 6.2.4: Optional */ - kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ - kSCSICmd_READ_CAPACITY = 0x25, /* Sec. 6.1.6: Mandatory */ - kSCSICmd_READ_DEFECT_DATA_10 = 0x37, /* Sec. 6.1.7: Optional */ - kSCSICmd_READ_DEFECT_DATA_12 = 0xB7, /* Sec. 6.2.5: Optional */ - kSCSICmd_READ_ELEMENT_STATUS_ATTACHED = 0xB4, /* SMC: Optional */ - kSCSICmd_READ_GENERATION = 0x29, /* Sec. 6.2.6: Optional */ - kSCSICmd_READ_LONG = 0x3E, /* Sec. 6.1.8: Optional */ - kSCSICmd_READ_UPDATED_BLOCK_10 = 0x2D, /* Sec. 6.2.7: Optional */ - kSCSICmd_REASSIGN_BLOCKS = 0x07, /* Sec. 6.1.9: Optional */ - kSCSICmd_REBUILD = 0x81, /* Sec. 6.1.10: Optional */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ - kSCSICmd_REGENERATE = 0x82, /* Sec. 6.1.11: Optional */ - kSCSICmd_RELEASE_6 = 0x17, /* SPC: Optional */ - kSCSICmd_RELEASE_10 = 0x57, /* SPC: Mandatory */ - kSCSICmd_REPORT_LUNS = 0xA0, /* SPC: Optional */ - kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ - kSCSICmd_RESERVE_6 = 0x16, /* SPC: Optional */ - kSCSICmd_RESERVE_10 = 0x56, /* SPC: Mandatory */ - kSCSICmd_REZERO_UNIT = 0x01, /* Obsolete */ - kSCSICmd_SEARCH_DATA_EQUAL_10 = 0x31, /* Obsolete */ - kSCSICmd_SEARCH_DATA_HIGH_10 = 0x30, /* Obsolete */ - kSCSICmd_SEARCH_DATA_LOW_10 = 0x32, /* Obsolete */ - kSCSICmd_SEEK_6 = 0x0B, /* Obsolete */ - kSCSICmd_SEEK_10 = 0x2B, /* Sec. 6.1.12: Optional */ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ - kSCSICmd_SET_LIMITS_10 = 0x33, /* Sec. 6.1.13: Optional */ - kSCSICmd_SET_LIMITS_12 = 0xB3, /* Sec. 6.2.8: Optional */ - kSCSICmd_START_STOP_UNIT = 0x1B, /* Sec. 6.1.14: Optional */ - kSCSICmd_SYNCHRONIZE_CACHE = 0x35, /* Sec. 6.1.15: Optional */ - kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ - kSCSICmd_UPDATE_BLOCK = 0x3D, /* Sec. 6.2.9: Optional */ - kSCSICmd_VERIFY_10 = 0x2F, /* Sec. 6.1.16: Optional */ - kSCSICmd_WRITE_6 = 0x0A, /* Sec. 6.1.17: Optional */ - kSCSICmd_WRITE_10 = 0x2A, /* Sec. 6.1.18: Optional */ - kSCSICmd_WRITE_12 = 0xAA, /* Sec. 6.2.13: Optional */ - kSCSICmd_WRITE_AND_VERIFY_10 = 0x2E, /* Sec. 6.1.19: Optional */ - kSCSICmd_WRITE_AND_VERIFY_12 = 0xAE, /* Sec. 6.2.15: Optional */ - kSCSICmd_WRITE_BUFFER = 0x3B, /* SPC: Optional */ - kSCSICmd_WRITE_LONG = 0x3F, /* Sec. 6.1.20: Optional */ - kSCSICmd_WRITE_SAME = 0x41, /* Sec. 6.1.21: Optional */ - kSCSICmd_XDREAD = 0x52, /* Sec. 6.1.22: Optional */ - kSCSICmd_XDWRITE = 0x50, /* Sec. 6.1.23: Optional */ - kSCSICmd_XDWRITE_EXTENDED = 0x80, /* Sec. 6.1.24: Optional */ - kSCSICmd_XPWRITE = 0x51 /* Sec. 6.1.25: Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x01 SSC Sequential Access Commands -/* Commands defined by the T10:997-D SCSI-3 Stream Commands (SSC) command - * specification. The definitions and section numbers are based on section 5 - * of the revision 22, January 1, 2000 version of the specification. - */ -#if 0 -enum -{ - kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ - kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ - kSCSICmd_COPY = 0x18, /* SPC: Optional */ - kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional */ - kSCSICmd_ERASE = 0x19, /* Sec. 5.3.1: Mandatory */ - kSCSICmd_FORMAT_MEDIUM = 0x04, /* Sec. 5.3.2: Optional */ - kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ - kSCSICmd_LOAD_UNLOAD = 0x1B, /* Sec. 5.3.3: Optional */ - kSCSICmd_LOCATE = 0x2B, /* Sec. 5.3.4: Optional */ - kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ - kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Mandatory */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Mandatory */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ - kSCSICmd_MOVE_MEDIUM = 0xA5, /* SMC: Optional */ - kSCSICmd_MOVE_MEDIUM_ATTACHED = 0xA7, /* SMC: Optional */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* SPC: Optional */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* SPC: Optional */ - kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* SPC: Optional */ - kSCSICmd_READ_6 = 0x08, /* Sec. 5.3.5: Mandatory */ - kSCSICmd_READ_BLOCK_LIMITS = 0x05, /* Sec. 5.3.6: Mandatory */ - kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ - kSCSICmd_READ_ELEMENT_STATUS = 0xB8, /* SMC: Optional */ - kSCSICmd_READ_ELEMENT_STATUS_ATTACHED = 0xB4, /* SMC: Optional */ - kSCSICmd_READ_POSITION = 0x34, /* Sec. 5.3.7: Mandatory */ - kSCSICmd_READ_REVERSE = 0x0F, /* Sec. 5.3.8: Optional */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ - kSCSICmd_RECOVER_BUFFERED_DATA = 0x14, /* Sec. 5.3.9: Optional */ - kSCSICmd_RELEASE_6 = 0x17, /* SPC: Mandatory */ - kSCSICmd_RELEASE_10 = 0x57, /* SPC: Mandatory */ - kSCSICmd_REPORT_DENSITY_SUPPORT = 0x44, /* Sec. 5.3.10: Mandatory*/ - kSCSICmd_REPORT_LUNS = 0xA0, /* SPC: Mandatory */ - kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ - kSCSICmd_RESERVE_6 = 0x16, /* SPC: Mandatory */ - kSCSICmd_RESERVE_10 = 0x56, /* SPC: Mandatory */ - kSCSICmd_REWIND = 0x01, /* Sec. 5.3.11: Mandatory*/ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ - kSCSICmd_SPACE = 0x11, /* Sec. 5.3.12: Mandatory*/ - kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ - kSCSICmd_VERIFY_6 = 0x13, /* Sec. 5.3.13: Optional */ - kSCSICmd_WRITE_6 = 0x0A, /* Sec. 5.3.14: Mandatory*/ - kSCSICmd_WRITE_BUFFER = 0x3B, /* SPC: Optional */ - kSCSICmd_WRITE_FILEMARKS = 0x10 /* Sec. 5.3.15: Mandatory*/ -}; -#endif - -#pragma mark - -#pragma mark 0x02 SSC Printer Commands -/* Commands defined by the T10:997-D SCSI-3 Stream Commands (SSC) command - * specification. The definitions and section numbers are based on section 6 - * of the revision 22, January 1, 2000 version of the specification. - */ -#if 0 -enum -{ - kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ - kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ - kSCSICmd_COPY = 0x18, /* SPC: Optional */ - kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional */ - kSCSICmd_FORMAT = 0x04, /* Sec. 6.2.1: Optional */ - kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ - kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ - kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Mandatory */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Mandatory */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* SPC: Optional */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* SPC: Optional */ - kSCSICmd_PRINT = 0x0A, /* Sec. 6.2.2: Mandatory */ - kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ - kSCSICmd_RECOVER_BUFFERED_DATA = 0x14, /* Sec. 6.2.3: Optional */ - kSCSICmd_RELEASE_6 = 0x17, /* SPC: Mandatory */ - kSCSICmd_RELEASE_10 = 0x57, /* SPC: Mandatory */ - kSCSICmd_REPORT_LUNS = 0xA0, /* SPC: Mandatory */ - kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ - kSCSICmd_RESERVE_6 = 0x16, /* SPC: Mandatory */ - kSCSICmd_RESERVE_10 = 0x56, /* SPC: Mandatory */ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ - kSCSICmd_SLEW_AND_PRINT = 0x0B, /* Sec. 6.2.4: Optional */ - kSCSICmd_STOP_PRINT = 0x1B, /* Sec. 6.2.5: Optional */ - kSCSICmd_SYNCHRONIZE_BUFFER = 0x10, /* Sec. 6.2.6: Optional */ - kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ - kSCSICmd_WRITE_BUFFER = 0x3B /* SPC: Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x03 SPC Processor Commands -/* Commands defined by the T10:1236-D SCSI Primary Commands-2 (SPC-2) - * command specification. The definitions and section numbers are based on - * section 9 of the revision 18, 21 May 2000 version of the specification. - */ -#if 0 -enum -{ - kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ - kSCSICmd_COMPARE = 0x39, /* Sec. 7.2: Optional */ - kSCSICmd_COPY = 0x18, /* Sec. 7.3: Optional */ - kSCSICmd_COPY_AND_VERIFY = 0x3A, /* Sec. 7.4: Optional */ - kSCSICmd_EXTENDED_COPY = 0x83, /* Sec. 7.5: Optional */ - kSCSICmd_INQUIRY = 0x12, /* Sec. 7.6: Mandatory */ - kSCSICmd_LOG_SELECT = 0x4C, /* Sec. 7.7: Optional */ - kSCSICmd_LOG_SENSE = 0x4D, /* Sec. 7.8: Optional */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Sec. 7.13: Optional */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Sec. 7.14: Optional */ - kSCSICmd_READ_BUFFER = 0x3C, /* Sec. 7.16: Optional */ - kSCSICmd_RECEIVE = 0x08, /* Sec. 9.2: Optional */ - kSCSICmd_RECEIVE_COPY_RESULTS = 0x84, /* Sec. 7.17: Optional */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* Sec. 7.18: Optional */ - kSCSICmd_RELEASE_10 = 0x57, /* Sec. 7.19: Optional */ - kSCSICmd_RELEASE_6 = 0x17, /* Sec. 7.20: Optional */ - kSCSICmd_REPORT_LUNS = 0xA0, /* Sec. 7.22: Optional */ - kSCSICmd_REQUEST_SENSE = 0x03, /* Sec. 7.23: Mandatory */ - kSCSICmd_RESERVE_10 = 0x56, /* Sec. 7.24: Optional */ - kSCSICmd_RESERVE_6 = 0x16, /* Sec. 7.25: Optional */ - kSCSICmd_SEND = 0x0A, /* Sec. 9.3: Optional */ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* Sec. 7.26: Mandatory */ - kSCSICmd_TEST_UNIT_READY = 0x00, /* Sec. 7.27: Mandatory */ - kSCSICmd_WRITE_BUFFER = 0x3B /* Sec. 7.29: Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x04 SBC Write Once Commands -/* Commands defined by the T10:990-D SCSI-3 Block Commands (SBC) command - * specification. The definitions and section numbers are based on section 6.3 - * of the revision 8c, 13 November 1997 version of the specification. - */ -#if 0 -enum -{ - kSCSICmd_CHANGE_DEFINITION = 0x40, /* SPC: Optional */ - kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ - kSCSICmd_COPY = 0x18, /* SPC: Optional */ - kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional*/ - kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ - kSCSICmd_LOCK_UNLOCK_CACHE = 0x36, /* Sec. 6.1.2: Optional */ - kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ - kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ - kSCSICmd_MEDIUM_SCAN = 0x38, /* Sec. 6.2.3: Optional */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Optional */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Optional */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ - kSCSICmd_MOVE_MEDIUM = 0xA5, /* SMC: Optional */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* SPC: Optional */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* SPC: Optional */ - kSCSICmd_PREFETCH = 0x34, /* Sec. 6.1.3: Optional */ - kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* SPC: Optional */ - kSCSICmd_READ_6 = 0x08, /* Sec. 6.1.4: Optional */ - kSCSICmd_READ_10 = 0x28, /* Sec. 6.1.5: Mandatory */ - kSCSICmd_READ_12 = 0xA8, /* Sec. 6.2.4: Optional */ - kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ - kSCSICmd_READ_CAPACITY = 0x25, /* Sec. 6.1.6: Mandatory */ - kSCSICmd_READ_ELEMENT_STATUS = 0xB8, /* SMC: Optional */ - kSCSICmd_READ_LONG = 0x3E, /* Sec. 6.1.8: Optional */ - kSCSICmd_REASSIGN_BLOCKS = 0x07, /* Sec. 6.1.9: Optional */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ - kSCSICmd_RELEASE_6 = 0x17, /* SPC: Optional */ - kSCSICmd_RELEASE_10 = 0x57, /* SPC: Mandatory */ - kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ - kSCSICmd_RESERVE_6 = 0x16, /* SPC: Optional */ - kSCSICmd_RESERVE_10 = 0x56, /* SPC: Mandatory */ - kSCSICmd_REZERO_UNIT = 0x01, /* Obsolete */ - kSCSICmd_SEARCH_DATA_EQUAL_10 = 0x31, /* Obsolete */ - kSCSICmd_SEARCH_DATA_EQUAL_12 = 0xB1, /* Obsolete */ - kSCSICmd_SEARCH_DATA_HIGH_10 = 0x30, /* Obsolete */ - kSCSICmd_SEARCH_DATA_HIGH_12 = 0xB0, /* Obsolete */ - kSCSICmd_SEARCH_DATA_LOW_10 = 0x32, /* Obsolete */ - kSCSICmd_SEARCH_DATA_LOW_12 = 0xB2, /* Obsolete */ - kSCSICmd_SEEK_6 = 0x0B, /* Obsolete */ - kSCSICmd_SEEK_10 = 0x2B, /* Sec. 6.1.12: Optional */ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ - kSCSICmd_SET_LIMITS_10 = 0x33, /* Sec. 6.1.13: Optional */ - kSCSICmd_SET_LIMITS_12 = 0xB3, /* Sec. 6.2.8: Optional */ - kSCSICmd_START_STOP_UNIT = 0x1B, /* Sec. 6.1.14: Optional */ - kSCSICmd_SYNCHRONIZE_CACHE = 0x35, /* Sec. 6.1.15: Optional */ - kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ - kSCSICmd_VERIFY_10 = 0x2F, /* Sec. 6.2.10: Optional */ - kSCSICmd_VERIFY_12 = 0xAF, /* Sec. 6.2.11: Optional */ - kSCSICmd_WRITE_6 = 0x0A, /* Sec. 6.1.17: Optional */ - kSCSICmd_WRITE_10 = 0x2A, /* Sec. 6.2.10: Mandatory*/ - kSCSICmd_WRITE_12 = 0xAA, /* Sec. 6.2.13: Optional */ - kSCSICmd_WRITE_AND_VERIFY_10 = 0x2E, /* Sec. 6.2.14: Optional */ - kSCSICmd_WRITE_AND_VERIFY_12 = 0xAE, /* Sec. 6.2.15: Optional */ - kSCSICmd_WRITE_BUFFER = 0x3B, /* SPC: Optional */ - kSCSICmd_WRITE_LONG = 0x3F /* Sec. 6.1.20: Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x05 MMC CD-ROM Commands -/* Commands defined by the T10:1363-D SCSI Multimedia Commands-3 (MMC-3) - * specification. The definitions and section numbers are based on section 6.1 - * of the revision 01, March 03, 2000 version of the specification. - * - * NOTE: The comments following each command may not be accurate. These are - * not from the MMC-3 specification, but have been derived from the SCSI-2 and - * original MMC specifications. Unlike the other SCSI command specifications, - * MMC-2 and MMC-3 do not provide a command requirement type and therefore does - * not relist the SPC commands with these requirements as they apply to MMC - * devices. The MMC-2 and MMC-3 specifications also refer back to the SBC - * specification which seems invalid since MMC devices do not represent a - * Peripheral Device Type defined by SBC. It is assumed that the SBC - * references refer to the Peripheral Device Type 0x00 - Direct Access Commands - * definitions from that specification. - */ -#if 0 -enum -{ - kSCSICmd_BLANK = 0xA1, /* Sec. 6.1.1: */ - kSCSICmd_CHANGE_DEFINITION = 0x40, /* Obsolete */ - kSCSICmd_CLOSE_TRACK_SESSION = 0x5B, /* Sec. 6.1.2: */ - kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ - kSCSICmd_COPY = 0x18, /* SPC: Optional */ - kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional */ - kSCSICmd_ERASE = 0x2C, /* SBC: */ - kSCSICmd_FORMAT_UNIT = 0x04, /* Sec. 6.1.3: */ - kSCSICmd_GET_CONFIGURATION = 0x46, /* Sec. 6.1.4: */ - kSCSICmd_GET_EVENT_STATUS_NOTIFICATION = 0x4A, /* Sec. 6.1.5: */ - kSCSICmd_GET_PERFORMANCE = 0xAC, /* Sec. 6.1.6: */ - kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ - kSCSICmd_LOAD_UNLOAD_MEDIUM = 0xA6, /* Sec. 6.1.7: */ - kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ - kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ - kSCSICmd_MECHANISM_STATUS = 0xBD, /* Sec. 6.1.8: */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Mandatory */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Mandatory */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Mandatory */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Mandatory */ - kSCSICmd_PAUSE_RESUME = 0x4B, /* Sec. 6.1.9: */ - kSCSICmd_PLAY_AUDIO_10 = 0x45, /* Sec. 6.1.10: */ - kSCSICmd_PLAY_AUDIO_12 = 0xA5, /* Sec. 6.1.11: */ - kSCSICmd_PLAY_AUDIO_MSF = 0x47, /* Sec. 6.1.12: */ - kSCSICmd_PLAY_AUDIO_TRACK_INDEX = 0x48, /* Obsolete */ - kSCSICmd_PLAY_CD = 0xBC, /* Sec. 6.1.13: */ - kSCSICmd_PLAY_RELATIVE_10 = 0x49, /* Obsolete */ - kSCSICmd_PLAY_RELATIVE_12 = 0xA9, /* Obsolete */ - kSCSICmd_PREFETCH = 0x34, /* Optional */ - kSCSICmd_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E, /* Optional */ - kSCSICmd_READ_6 = 0x08, /* Optional */ - kSCSICmd_READ_10 = 0x28, /* Mandatory */ - kSCSICmd_READ_12 = 0xA8, /* Optional */ - kSCSICmd_READ_BUFFER = 0x3C, /* Optional */ - kSCSICmd_READ_BUFFER_CAPACITY = 0x5C, /* Sec. 6.1.15: */ - kSCSICmd_READ_CD = 0xBE, /* Sec. 6.1.16: */ - kSCSICmd_READ_CD_MSF = 0xB9, /* Sec. 6.1.17: */ - kSCSICmd_READ_CAPACITY = 0x25, /* Sec. 6.1.18: */ - kSCSICmd_READ_DISC_INFORMATION = 0x51, /* Sec. 6.1.19: */ - kSCSICmd_READ_DVD_STRUCTURE = 0xAD, /* Sec. 6.1.20: */ - kSCSICmd_READ_DISC_STRUCTURE = 0xAD, /* Sec. 6.1.20: */ - kSCSICmd_READ_FORMAT_CAPACITIES = 0x23, /* Sec. 6.1.21: */ - kSCSICmd_READ_HEADER = 0x44, /* Sec. 6.1.22: */ - kSCSICmd_READ_LONG = 0x3E, /* Optional */ - kSCSICmd_READ_MASTER_CUE = 0x59, /* Sec. 6.1.23: */ - kSCSICmd_READ_SUB_CHANNEL = 0x42, /* Sec. 6.1.24: */ - kSCSICmd_READ_TOC_PMA_ATIP = 0x43, /* Sec. 6.1.25: */ - kSCSICmd_READ_TRACK_INFORMATION = 0x52, /* Sec. 6.1.27: */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* Optional */ - kSCSICmd_RELEASE_6 = 0x17, /* Mandatory */ - kSCSICmd_RELEASE_10 = 0x57, /* Optional */ - kSCSICmd_REPAIR_TRACK = 0x58, /* Sec. 6.1.28: */ - kSCSICmd_REPORT_KEY = 0xA4, /* Sec. 6.1.29: */ - kSCSICmd_REQUEST_SENSE = 0x03, /* Mandatory */ - kSCSICmd_RESERVE_6 = 0x16, /* Mandatory */ - kSCSICmd_RESERVE_10 = 0x56, /* Optional */ - kSCSICmd_RESERVE_TRACK = 0x53, /* Sec. 6.1.30: */ - kSCSICmd_SCAN_MMC = 0xBA, /* Sec. 6.1.31: */ - kSCSICmd_SEARCH_DATA_EQUAL_10 = 0x31, /* Obsolete */ - kSCSICmd_SEARCH_DATA_EQUAL_12 = 0xB1, /* Obsolete */ - kSCSICmd_SEARCH_DATA_HIGH_10 = 0x30, /* Obsolete */ - kSCSICmd_SEARCH_DATA_HIGH_12 = 0xB0, /* Obsolete */ - kSCSICmd_SEARCH_DATA_LOW_10 = 0x32, /* Obsolete */ - kSCSICmd_SEARCH_DATA_LOW_12 = 0xB2, /* Obsolete */ - kSCSICmd_SEEK_6 = 0x0B, /* Obsolete */ - kSCSICmd_SEEK_10 = 0x2B, /* SBC: */ - kSCSICmd_SEND_CUE_SHEET = 0x5D, /* Sec. 6.1.32: */ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* Mandatory */ - kSCSICmd_SEND_DVD_STRUCTURE = 0xBF, /* Sec. 6.1.33: */ - kSCSICmd_SEND_EVENT = 0xA2, /* Sec. 6.1.34: */ - kSCSICmd_SEND_KEY = 0xA3, /* Sec. 6.1.35: */ - kSCSICmd_SEND_OPC_INFORMATION = 0x54, /* Sec. 6.1.36: */ - kSCSICmd_SET_CD_SPEED = 0xBB, /* Sec. 6.1.37: */ - kSCSICmd_SET_LIMITS_10 = 0x33, /* Optional */ - kSCSICmd_SET_LIMITS_12 = 0xB3, /* Optional */ - kSCSICmd_SET_READ_AHEAD = 0xA7, /* Sec. 6.1.38: */ - kSCSICmd_SET_STREAMING = 0xB6, /* Sec. 6.1.39: */ - kSCSICmd_START_STOP_UNIT = 0x1B, /* Optional */ - kSCSICmd_STOP_PLAY_SCAN = 0x4E, /* Sec. 6.1.40: */ - kSCSICmd_SYNCHRONIZE_CACHE = 0x35, /* Sec. 6.1.41: */ - kSCSICmd_TEST_UNIT_READY = 0x00, /* Mandatory */ - kSCSICmd_VERIFY_10 = 0x2F, /* Optional */ - kSCSICmd_VERIFY_12 = 0xAF, /* Optional */ - kSCSICmd_WRITE_10 = 0x2A, /* Sec. 6.1.42: */ - kSCSICmd_WRITE_12 = 0xAA, /* Sec. 6.1.43: */ - kSCSICmd_WRITE_AND_VERIFY_10 = 0x2E, /* Sec. 6.1.44: */ - kSCSICmd_WRITE_BUFFER = 0x3B /* Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x06 SGC Scanner Commands -/* Commands defined by the T10:998-D SCSI-3 Graphics Commands (SGC) - * specification. The definitions and section numbers are based on section 6 - * of the revision 0, April 1995 version of the specification. - */ -#if 0 -enum -{ - kSCSICmd_CHANGE_DEFINITION = 0x40, /* SPC: Optional */ - kSCSICmd_COMPARE = 0x39, /* SPC: Optional */ - kSCSICmd_COPY = 0x18, /* SPC: Optional */ - kSCSICmd_COPY_AND_VERIFY = 0x3A, /* SPC: Optional */ - kSCSICmd_GET_DATA_BUFFER_STATUS = 0x34, /* Sec. 6.1.1: Optional */ - kSCSICmd_GET_WINDOW = 0x25, /* Sec. 6.1.2: Optional */ - kSCSICmd_INQUIRY = 0x12, /* SPC: Mandatory */ - kSCSICmd_LOG_SELECT = 0x4C, /* SPC: Optional */ - kSCSICmd_LOG_SENSE = 0x4D, /* SPC: Optional */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* SPC: Optional */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* SPC: Optional */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* SPC: Optional */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* SPC: Optional */ - kSCSICmd_OBJECT_POSITION = 0x31, /* Sec. 6.1.3: Optional */ - kSCSICmd_PORT_STATUS = 0x11, /* SPC (??): Mandatory - * for dual port devices */ - kSCSICmd_READ = 0x28, /* Sec. 6.1.4: Mandatory */ - kSCSICmd_READ_BUFFER = 0x3C, /* SPC: Optional */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x1C, /* SPC: Optional */ - kSCSICmd_RELEASE_6 = 0x17, /* SPC: Mandatory */ - kSCSICmd_REQUEST_SENSE = 0x03, /* SPC: Mandatory */ - kSCSICmd_RESERVE_6 = 0x16, /* SPC: Mandatory */ - kSCSICmd_SCAN = 0x1B, /* Sec. 6.1.5: Optional */ - kSCSICmd_SEND = 0x1B, /* Sec. 6.1.6: Optional */ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* SPC: Mandatory */ - kSCSICmd_SET_WINDOW = 0x24, /* Sec. 6.1.7: Mandatory */ - kSCSICmd_TEST_UNIT_READY = 0x00, /* SPC: Mandatory */ - kSCSICmd_WRITE_BUFFER = 0x3B /* SPC: Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x07 SBC Optical Media Commands -/* Commands defined by the T10:990-D SCSI-3 Block Commands (SBC) - * (revision 8c, 13 November 1998) command specification. - */ - -#pragma mark - -#pragma mark 0x08 SMC Medium Changer Commands -/* Commands defined by the T10:1228-D SCSI-3 Medium Changer Commands-2 (SMC-2) - * (revision 0, March 16, 2000) command specification. - */ -#if 0 -enum -{ - /* Commands For Independent Medium Changers */ - kSCSICmd_EXCHANGE_MEDIUM = 0xA6, /* Optional */ - kSCSICmd_INITIALIZE_ELEMENT_STATUS = 0x07, /* Optional */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* Optional */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* Optional */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* Optional */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* Optional */ - kSCSICmd_MOVE_MEDIUM = 0xA5, /* Mandatory */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Optional */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Optional */ - kSCSICmd_POSITION_TO_ELEMENT = 0x2B, /* Optional */ - kSCSICmd_READ_ELEMENT_STATUS = 0xB8, /* Mandatory */ - kSCSICmd_RELEASE_ELEMENT_6 = 0x16, /* Optional */ - kSCSICmd_RELEASE_ELEMENT_10 = 0x56, /* Optional */ - kSCSICmd_REQUEST_VOLUME_ELEMENT_ADDRESS = 0xB5, /* Optional */ - kSCSICmd_REQUEST_SENSE = 0x03, /* Mandatory */ - kSCSICmd_RESERVE_ELEMENT_6 = 0x16, /* Optional */ - kSCSICmd_RESERVE_ELEMENT_10 = 0x56 /* Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x09 SSC Communications Commands -/* Commands defined by the T10:997-D SCSI-3 Stream Commands (SSC) - * (revision 22, January 1, 2000) command specification. - */ - -#pragma mark - -#pragma mark 0x0A ASC IT8 Prepress Commands -#pragma mark 0x0B ASC IT8 Prepress Commands -/* Commands defined by the ASC IT8 <title goes here> specification - * (revision xx, month day, year) command specification. - */ -#if 0 -enum -{ -}; -#endif - -#pragma mark - -#pragma mark 0x0C SCC Array Controller Commands -/* Commands defined by the ANSI NCITS.318-199x SCSI Controller - * Commands (SCC-2) ratified command specification. - */ -#if 0 -enum -{ - kSCSICmd_MAINTENANCE_IN = 0xA3, /* Mandatory */ - kSCSICmd_MAINTENANCE_OUT = 0xA4, /* Optional */ - kSCSICmd_MODE_SELECT_6 = 0x15, /* Optional */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* Optional */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* Optional */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* Optional */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Optional */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Optional */ - kSCSICmd_PORT_STATUS = 0x1F, /* Optional */ - kSCSICmd_REDUNDANCY_GROUP_IN = 0xBA, /* Mandatory */ - kSCSICmd_REDUNDANCY_GROUP_OUT = 0xBB, /* Optional */ - kSCSICmd_RELEASE_6 = 0x17, /* Optional */ - kSCSICmd_RELEASE_10 = 0x57, /* Optional */ - kSCSICmd_REPORT_LUNS = 0xA0, /* Mandatory */ - kSCSICmd_REQUEST_SENSE = 0x03, /* Mandatory */ - kSCSICmd_RESERVE_6 = 0x16, /* Optional */ - kSCSICmd_RESERVE_10 = 0x56, /* Optional*/ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D, /* Optional */ - kSCSICmd_SPARE_IN = 0xBC, /* Mandatory */ - kSCSICmd_SPARE_OUT = 0xBD /* Optional */ -}; -#endif - -#pragma mark - -#pragma mark 0x0D SES Enclosure Services Commands -/* Commands defined by the T10:1212-D SCSI-3 Enclosure Services (SES) - * (revision 8b, February 11, 1998) command specification. - */ -#if 0 -enum -{ - kSCSICmd_MODE_SELECT_6 = 0x15, /* Optional */ - kSCSICmd_MODE_SELECT_10 = 0x55, /* Optional */ - kSCSICmd_MODE_SENSE_6 = 0x1A, /* Optional */ - kSCSICmd_MODE_SENSE_10 = 0x5A, /* Optional */ - kSCSICmd_PERSISTENT_RESERVE_IN = 0x5E, /* Optional */ - kSCSICmd_PERSISTENT_RESERVE_OUT = 0x5F, /* Optional */ - kSCSICmd_RECEIVE_DIAGNOSTICS_RESULTS = 0x17, /* Mandatory */ - kSCSICmd_RELEASE_6 = 0x17, /* Optional */ - kSCSICmd_RELEASE_10 = 0x57, /* Optional */ - kSCSICmd_REQUEST_SENSE = 0x03, /* Mandatory */ - kSCSICmd_RESERVE_6 = 0x16, /* Optional */ - kSCSICmd_RESERVE_10 = 0x56, /* Optional */ - kSCSICmd_SEND_DIAGNOSTICS = 0x1D /* Mandatory */ -}; -#endif - -#pragma mark - -#pragma mark 0x0E RBC Reduced Block Commands -/* Commands defined by the T10:1240-D Reduced Block Commands (RBC) - * (revision 10a, August 18, 1999) command specification. - */ -#if 0 -enum -{ - kSCSICmd_FORMAT_UNIT = 0x04, /* Optional */ - kSCSICmd_READ_10 = 0x28, /* Mandatory */ - kSCSICmd_READ_CAPACITY = 0x25, /* Mandatory */ - kSCSICmd_START_STOP_UNIT = 0x1B, /* Mandatory */ - kSCSICmd_SYNCHRONIZE_CACHE = 0x35, /* Optional */ - kSCSICmd_VERIFY_10 = 0x2F, /* Mandatory */ - kSCSICmd_WRITE_10 = 0x2A, /* Mandatory */ - kSCSICmd_WRITE_BUFFER = 0x3B /* Mandatory for fixed media - * Optional for removable */ -}; -#endif - -#pragma mark - -#pragma mark 0x0F OCRW Optical Card Commands -/* Commands defined by the ISO/IEC 14776-381 SCSI Specification for - * Optical Card Reader/Writer (OCRW) ratified command specification. - */ -#if 0 -enum -{ -}; -#endif - -#pragma mark - -#pragma mark 0x11 OSD Object-based Storage Commands -/* Commands defined by the T10:1355-D Object-based Storage Commands (OSD) - * (revision 1, 18 May 2000) command specification. - */ -#if 0 -enum -{ -}; -#endif - -#pragma mark - -#pragma mark 0x15 RMC Simplified Multimedia Commands -/* Commands defined by the T10:1364-D Reduced Multimedia Commands (RMC) - * (revision 1, November 11, 1999) command specification. - */ -#if 0 -enum -{ -}; -#endif - -#endif /* _SCSI_COMMAND_OPERATION_CODES_H_ */ diff --git a/i386/include/IOKit/scsi/SCSIPort.h b/i386/include/IOKit/scsi/SCSIPort.h deleted file mode 100644 index 8eefbeb..0000000 --- a/i386/include/IOKit/scsi/SCSIPort.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2004-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_SCSI_PORTS_H_ -#define _IOKIT_SCSI_PORTS_H_ - - -/*! @header SCSIPort - @discussion - This file contains all the definitions for SCSIPort notifications and status. -*/ - - -/*! -@enum kSCSIPort_NotificationStatusChange -@discussion -Message definition to be used with the messageClients -call to inform of a change in port status. -*/ -enum -{ - kSCSIPort_NotificationStatusChange = 0x68000001 -}; - - -/*! @typedef SCSIPortStatus - @abstract 32-bit number to represent a SCSIPortStatus. - @discussion Type for SCSIPortStatus. -*/ - -typedef UInt32 SCSIPortStatus; - -/*! @enum SCSI Port Status Values - @discussion Definitions for the possible port status values -*/ -enum -{ - /*! - @constant kSCSIPort_StatusOnline - The port is online. - */ - kSCSIPort_StatusOnline = 0, - - /*! - @constant kSCSIPort_StatusOffline - The port is offline (e.g. unplugged cable). - */ - kSCSIPort_StatusOffline = 1, - - /*! - @constant kSCSIPort_StatusFailure - Driver has detected unrecoverable port failure (e.g. hardware port failure) - */ - kSCSIPort_StatusFailure = 2 -}; - -#endif /* _IOKIT_SCSI_PORTS_H_ */ diff --git a/i386/include/IOKit/scsi/SCSITask.h b/i386/include/IOKit/scsi/SCSITask.h deleted file mode 100644 index 154c187..0000000 --- a/i386/include/IOKit/scsi/SCSITask.h +++ /dev/null @@ -1,456 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_SCSI_TASK_H_ -#define _IOKIT_SCSI_TASK_H_ - - -#if KERNEL -#include <IOKit/IOTypes.h> -#else -#include <CoreFoundation/CoreFoundation.h> -#endif - - -/*! @header SCSITask -SCSITask typedefs and constants used inside the kernel and user space. - -Note that the SCSITaskIdentifier is an opaque object and that directly -casting the SCSITaskIdentifier to any other type is discouraged. The SCSITask -implementation changes when necessary to accomodate architectural changes, -performance improvements, and bug fixes. - -Device and protocol layer drivers that need to access information -contained in a SCSITask should use the appropriate accessor methods in -IOSCSIPrimaryCommandsDevice.h or IOSCSIProtocolServices.h -*/ - - -/*! @typedef SCSIDeviceIdentifier - @abstract 64-bit number to represent a SCSI Device. - @discussion If the identifier can either be that of an initiator or a target, - SCSIDeviceIdentifier should be used. -*/ - -typedef UInt64 SCSIDeviceIdentifier; - -/*! @typedef SCSITargetIdentifier - @abstract 64-bit number to represent a SCSI Target Device. - @discussion If the identifier is for a target only and not an initiator, then - SCSITargetIdentifier should be used. -*/ - -typedef SCSIDeviceIdentifier SCSITargetIdentifier; - -/*! @typedef SCSIInitiatorIdentifier - @abstract 64-bit number to represent a SCSI Initiator Device. - @discussion If the identifier is for an initiator only and not a target, then - SCSIInitiatorIdentifier should be used. -*/ - -typedef SCSIDeviceIdentifier SCSIInitiatorIdentifier; - -/*! @typedef SCSILogicalUnitNumber - @abstract 64-bit number to represent a logical unit. - @discussion 64-bit number to represent a logical unit. -*/ - -typedef UInt64 SCSILogicalUnitNumber; - -/*! @typedef SCSITaggedTaskIdentifier - @abstract 64-bit number to represent a unique task identifier. - @discussion The Tagged Task Identifier is used when a Task has a Task Attribute other - than SIMPLE. The SCSI Application Layer client that controls the Logical - Unit for which a Task is intended is required to guarantee that the Task - Tag Identifier is unique. Zero cannot be used a a Tag value as this is used - to when a Tagged Task Identifier value is needed for a Task with a SIMPLE - attribute. -*/ - -typedef UInt64 SCSITaggedTaskIdentifier; - -/*! - @enum Untagged Task Identifier - @discussion The Untagged Task Identifier is used to indicate no unique tag - is associated with the Task. - @constant kSCSIUntaggedTaskIdentifier This value means the task is untagged. - */ - -enum -{ - kSCSIUntaggedTaskIdentifier = 0 -}; - -/*! - @typedef SCSITaskAttribute - @abstract Attributes for task delivery. - @discussion The Task Attribute defines how this task should be managed - when determing order for queueing and submission to the - appropriate device server. The Task Attribute is set by the SCSI - Application Layer and cannot be modified by the SCSI Protocol Layer. - @constant kSCSITask_SIMPLE The task has a simple attribute. - @constant kSCSITask_ORDERED The task has an ordered attribute. - @constant kSCSITask_HEAD_OF_QUEUE The task has a head-of-queue attribute. - @constant kSCSITask_ACA The task has an auto-contingent-allegiance attribute. - */ - -typedef enum SCSITaskAttribute -{ - kSCSITask_SIMPLE = 0, - kSCSITask_ORDERED = 1, - kSCSITask_HEAD_OF_QUEUE = 2, - kSCSITask_ACA = 3 -} SCSITaskAttribute; - -/*! - @typedef SCSITaskState - @abstract Attributes for task state. - @discussion The Task State represents the current state of the task. - The state is set to NEW_TASK when the task is created. The SCSI Protocol - Layer will then adjust the state as the task is queued and during - execution. The SCSI Application Layer can examine the state to monitor - the progress of a task. The Task State can only be modified by the SCSI - Protocol Layer. The SCSI Application Layer can only read the state. - @constant kSCSITaskState_NEW_TASK The task state is new task. - @constant kSCSITaskState_ENABLED The task is enabled and queued. - @constant kSCSITaskState_BLOCKED The task is blocked. - @constant kSCSITaskState_DORMANT The task is dormant. - @constant kSCSITaskState_ENDED The task is complete. - */ - -typedef enum SCSITaskState -{ - kSCSITaskState_NEW_TASK = 0, - kSCSITaskState_ENABLED = 1, - kSCSITaskState_BLOCKED = 2, - kSCSITaskState_DORMANT = 3, - kSCSITaskState_ENDED = 4 -} SCSITaskState; - - -/*! - @typedef SCSIServiceResponse - @abstract Attributes for task service response. - @discussion The Service Response represents the execution status of - a service request made to a Protocol Services Driver. The Service - Response can only be modified by the SCSI Protocol Layer. The SCSI - Application Layer can only read the state. - */ - -typedef enum SCSIServiceResponse -{ - /*! - @constant kSCSIServiceResponse_Request_In_Process - Not defined in SAM specification, but is a service response used - for asynchronous commands that are not yet completed. - */ - kSCSIServiceResponse_Request_In_Process = 0, - - /*! - @constant kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE - The service request failed because of a delivery or target failure. - */ - kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE = 1, - - /*! - @constant kSCSIServiceResponse_TASK_COMPLETE - The task completed. - */ - kSCSIServiceResponse_TASK_COMPLETE = 2, - - /*! - @constant kSCSIServiceResponse_LINK_COMMAND_COMPLETE - The linked command completed. - */ - kSCSIServiceResponse_LINK_COMMAND_COMPLETE = 3, - - /*! - @constant kSCSIServiceResponse_FUNCTION_COMPLETE - The task management function completed. - */ - kSCSIServiceResponse_FUNCTION_COMPLETE = 4, - - /*! - @constant kSCSIServiceResponse_FUNCTION_REJECTED - The task management function was rejected. - */ - kSCSIServiceResponse_FUNCTION_REJECTED = 5 -} SCSIServiceResponse; - -/*! - @typedef SCSITaskStatus - @abstract Attributes for task status. - @discussion The Task Status represents the completion status - of the task which provides the SCSI Application Layer with - additional information about how to procede in handling a - completed task. - - The SCSI Architecture Model specification only defines task - status values for when a task completes with a service response - of either TASK_COMPLETED or LINK_COMMAND_COMPLETE. - - Since additional information will aid in error recovery when - a task fails to be completed by a device due to a service - response of kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE, - additional values have been defined that can be returned by the - SCSI Protocol Layer to inform the SCSI Application Layer of the - cause of the delivery failure. - - The Task Status can only be modified by the SCSI Protocol Layer. - The SCSI Application Layer can only read the status -*/ -typedef enum SCSITaskStatus -{ - - /*! - @constant kSCSITaskStatus_GOOD - The task completed with a status of GOOD. - */ - - kSCSITaskStatus_GOOD = 0x00, - - /*! - @constant kSCSITaskStatus_CHECK_CONDITION - The task completed with a status of CHECK_CONDITION. Additional - information about the condition should be available in the sense data. - */ - - kSCSITaskStatus_CHECK_CONDITION = 0x02, - - /*! - @constant kSCSITaskStatus_CONDITION_MET - The task completed with a status of CONDITION_MET. - */ - - kSCSITaskStatus_CONDITION_MET = 0x04, - - /*! - @constant kSCSITaskStatus_BUSY - The task completed with a status of BUSY. The device server might need - time to process a request and a delay may be required. - */ - kSCSITaskStatus_BUSY = 0x08, - - /*! - @constant kSCSITaskStatus_INTERMEDIATE - The task completed with a status of INTERMEDIATE. - */ - kSCSITaskStatus_INTERMEDIATE = 0x10, - - /*! - @constant kSCSITaskStatus_INTERMEDIATE_CONDITION_MET - The task completed with a status of INTERMEDIATE_CONDITION_MET. - */ - kSCSITaskStatus_INTERMEDIATE_CONDITION_MET = 0x14, - - /*! - @constant kSCSITaskStatus_RESERVATION_CONFLICT - The task completed with a status of RESERVATION_CONFLICT. - */ - kSCSITaskStatus_RESERVATION_CONFLICT = 0x18, - - /*! - @constant kSCSITaskStatus_TASK_SET_FULL - The task completed with a status of TASK_SET_FULL. The device server - may need to complete a task before the initiator sends another. - */ - kSCSITaskStatus_TASK_SET_FULL = 0x28, - - /*! - @constant kSCSITaskStatus_ACA_ACTIVE - The task completed with a status of ACA_ACTIVE. The device server may - need the initiator to clear the Auto-Contingent Allegiance condition - before it will respond to new commands. - */ - kSCSITaskStatus_ACA_ACTIVE = 0x30, - - /*! - @constant kSCSITaskStatus_TaskTimeoutOccurred - If a task is aborted by the SCSI Protocol Layer due to it exceeding - the timeout value specified by the task, the task status shall be - set to kSCSITaskStatus_TaskTimeoutOccurred. - */ - - kSCSITaskStatus_TaskTimeoutOccurred = 0x01, - - /*! - @constant kSCSITaskStatus_ProtocolTimeoutOccurred - If a task is aborted by the SCSI Protocol Layer due to it exceeding a - timeout value specified by the support for the protocol or a related - specification, the task status shall be set to - kSCSITaskStatus_ProtocolTimeoutOccurred. - */ - - kSCSITaskStatus_ProtocolTimeoutOccurred = 0x02, - - /*! - @constant kSCSITaskStatus_DeviceNotResponding - If a task is unable to be delivered due to a failure of the device not - accepting the task or the device acknowledging the attempt to send it the - device the task status shall be set to kSCSITaskStatus_DeviceNotResponding. - This will allow the SCSI Application driver to perform the necessary steps - to try to recover the device. This shall only be reported after the SCSI - Protocol Layer driver has attempted all protocol specific attempts to recover - the device. - */ - - kSCSITaskStatus_DeviceNotResponding = 0x03, - - /*! - @constant kSCSITaskStatus_DeviceNotPresent - If the task is unable to be delivered because the device has been - detached, the task status shall be set to kSCSITaskStatus_DeviceNotPresent. - This will allow the SCSI Application Layer to halt the sending of tasks - to the device and, if supported, perform any device failover or system - cleanup. - */ - kSCSITaskStatus_DeviceNotPresent = 0x04, - - /*! - @constant kSCSITaskStatus_DeliveryFailure - If the task is unable to be - delivered to the device due to a failure in the SCSI Protocol Layer, - such as a bus reset or communications error, but the device is is - known to be functioning properly, the task status shall be set to - kSCSITaskStatus_DeliveryFailure. This can also be reported if the - task could not be delivered due to a protocol error that has since - been corrected. - */ - kSCSITaskStatus_DeliveryFailure = 0x05, - - /*! - @constant kSCSITaskStatus_No_Status - This status is not defined by - the SCSI specifications, but is here to provide a status that can - be returned in cases where there is not status available from the - device or protocol, for example, when the service response is - neither TASK_COMPLETED nor LINK_COMMAND_COMPLETE or when the - service response is SERVICE_DELIVERY_OR_TARGET_FAILURE and the - reason for failure could not be determined. - */ - kSCSITaskStatus_No_Status = 0xFF -} SCSITaskStatus; - -/*! - @enum Command Descriptor Block Size - @discussion Command Descriptor Block Size constants. -*/ -enum -{ - /*! - @constant kSCSICDBSize_Maximum This is the largest size a Command Descriptor - Block can be as specified in SPC-2. - */ - kSCSICDBSize_Maximum = 16, - - /*! - @constant kSCSICDBSize_6Byte Use this for a 6-byte CDB. - */ - kSCSICDBSize_6Byte = 6, - - /*! - @constant kSCSICDBSize_10Byte Use this for a 10-byte CDB. - */ - kSCSICDBSize_10Byte = 10, - - /*! - @constant kSCSICDBSize_12Byte Use this for a 12-byte CDB. - */ - kSCSICDBSize_12Byte = 12, - - /*! - @constant kSCSICDBSize_16Byte Use this for a 16-byte CDB. - */ - kSCSICDBSize_16Byte = 16 -}; - -typedef UInt8 SCSICommandDescriptorBlock[kSCSICDBSize_Maximum]; - -/*! - @enum Data Transfer Direction - @discussion DataTransferDirection constants. -*/ -enum -{ - /*! - @constant kSCSIDataTransfer_NoDataTransfer Use this for tasks - that transfer no data. - */ - kSCSIDataTransfer_NoDataTransfer = 0x00, - - /*! - @constant kSCSIDataTransfer_FromInitiatorToTarget Use this for tasks that transfer - data from the initiator to the target. - */ - kSCSIDataTransfer_FromInitiatorToTarget = 0x01, - - /*! - @constant kSCSIDataTransfer_FromTargetToInitiator Use this for tasks that transfer - data from the target to the initiator. - */ - kSCSIDataTransfer_FromTargetToInitiator = 0x02 -}; - - -#if defined(KERNEL) && defined(__cplusplus) - -/* Libkern includes */ -#include <libkern/c++/OSObject.h> - - -/*! - @enum SCSITaskMode - @discussion The SCSI Task mode is used by the SCSI - Protocol Layer to indicate what mode the task is executing. -*/ -typedef enum SCSITaskMode -{ - kSCSITaskMode_CommandExecution = 1, - kSCSITaskMode_Autosense = 2 -} SCSITaskMode; - -/*! - @typedef SCSITaskIdentifier - @discussion This is an opaque object that represents a task. - This is used so that drivers for both the SCSI Protocol Layer - and the SCSI Application Layer cannot modify the SCSITask object - directly but must instead use the inherited methods to do so. This - allows the implementation of SCSITask to change without directly - impacting device and protocol layer drivers. In addition, it - prevents changing of properties that are not allowed to be - changed by a given layer. -*/ -typedef OSObject * SCSITaskIdentifier; - - -/*! - @typedef SCSITaskCompletion - @discussion This is the typedef for completion routines that - work with SCSITaskIdentifiers. -*/ -typedef void ( *SCSITaskCompletion )( SCSITaskIdentifier completedTask ); - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_SCSI_TASK_H_ */ diff --git a/i386/include/IOKit/scsi/spi/.svn/all-wcprops b/i386/include/IOKit/scsi/spi/.svn/all-wcprops deleted file mode 100644 index b14b4a8..0000000 --- a/i386/include/IOKit/scsi/spi/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 61 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/spi -END -IOSCSIParallelInterfaceController.h -K 25 -svn:wc:ra_dav:version-url -V 97 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/scsi/spi/IOSCSIParallelInterfaceController.h -END diff --git a/i386/include/IOKit/scsi/spi/.svn/entries b/i386/include/IOKit/scsi/spi/.svn/entries deleted file mode 100644 index 49bbda1..0000000 --- a/i386/include/IOKit/scsi/spi/.svn/entries +++ /dev/null @@ -1,62 +0,0 @@ -10 - -dir -2117 -http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/scsi/spi -http://forge.voodooprojects.org/svn/chameleon - - - -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - -b5af796a-00a8-11df-919b-ffff7a100b7d - -IOSCSIParallelInterfaceController.h -file - - - - -2012-10-03T17:50:21.000000Z -bce86d456d916867cf05e6e916d27b7f -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -59066 - diff --git a/i386/include/IOKit/scsi/spi/.svn/text-base/IOSCSIParallelInterfaceController.h.svn-base b/i386/include/IOKit/scsi/spi/.svn/text-base/IOSCSIParallelInterfaceController.h.svn-base deleted file mode 100644 index 0bd7981..0000000 --- a/i386/include/IOKit/scsi/spi/.svn/text-base/IOSCSIParallelInterfaceController.h.svn-base +++ /dev/null @@ -1,1568 +0,0 @@ -/* - * Copyright (c) 2002-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __IOKIT_IO_SCSI_PARALLEL_INTERFACE_CONTROLLER_H__ -#define __IOKIT_IO_SCSI_PARALLEL_INTERFACE_CONTROLLER_H__ - - - /*! - @header IOSCSIParallelInterfaceController - The IOSCSIParallelInterfaceController class and the associated HBA child - class is responsible for the management of all related hardware. This - includes the onboard HBA controller chip and the physical state of the - bus. These classes are not responsible for any of the management of - the SCSI Devices on the bus with the exception of maintaining the queue that - holds the objects representing those SCSI Devices. -*/ - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// General IOKit includes -#include <IOKit/IOService.h> -#include <IOKit/IOWorkLoop.h> -#include <IOKit/IOCommandGate.h> -#include <IOKit/IODMACommand.h> -#include <IOKit/IOInterruptEventSource.h> -#include <IOKit/IOFilterInterruptEventSource.h> -#include <IOKit/IOTimerEventSource.h> -#include <IOKit/IOCommandPool.h> - -// IOKit SCSI ArchitectureModel Family includes -#include <IOKit/scsi/SCSITask.h> -#include <IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h> -#include <IOKit/scsi/SCSIPort.h> - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - - -#define kIOPropertySCSIDeviceFeaturesKey "SCSI Device Features" -#define kIOPropertySCSI_I_T_NexusFeaturesKey "SCSI I_T Nexus Features" - -// This is the alignment mask used when allocating per-task HBA data. It allows -// the HBA to declare whether or not it supports 64-bit addressability and what the -// minimum byte alignment is for the data. E.g. By specifying 0x0000FFFFFFFFFFFEULL, -// the controller would be indicating that it supports 48-bits of addressability, but -// at a minimum of being 2-byte aligned. -#define kIOMinimumHBADataAlignmentMaskKey "HBA Data Alignment" - -// The Feature Selectors used to identify features of the SCSI Parallel -// Interface. These are used by the DoesHBASupportSCSIParallelFeature -// to report whether the HBA supports a given SCSI Parallel Interface -// feature and are used for requesting negotiation and reporting negotiation -// results between the controller and the device. - -// When the DoesHBASupportSCSIParallelFeature() member routine of the controller -// child class is called, it will return true if the HBA that it controls -// supports the specified SCSIParallelFeature or false if it does not. -typedef enum SCSIParallelFeature -{ - // The selector for support of Wide Data Transfers. Only Wide16 is supported - // as Wide32 has been obsoleted by the SPI-3 specification. - kSCSIParallelFeature_WideDataTransfer = 0, - - // The selector for support of Synchronous Data Transfers. - kSCSIParallelFeature_SynchronousDataTransfer = 1, - - // The selector for support of Quick Arbitration and Selection (QAS). - kSCSIParallelFeature_QuickArbitrationAndSelection = 2, - - // The selector for support of Double Transition (DT) data transfers. - kSCSIParallelFeature_DoubleTransitionDataTransfers = 3, - - // The selector for SPI Information Unit (IU) transfers. - kSCSIParallelFeature_InformationUnitTransfers = 4, - - // Since the Feature selectors are zero base, this will always have the - // correct total. - kSCSIParallelFeature_TotalFeatureCount -} SCSIParallelFeature; - - -typedef enum SCSIParallelFeatureRequest -{ - // This selector indicates that current negotiation - // should be used. - kSCSIParallelFeature_NoNegotiation = 0, - - // This selector indicates that the controller - // should attempt negotiation for the feature - kSCSIParallelFeature_AttemptNegotiation = 1, - - // This selector indicates that the controller - // should clear any negotiation for the feature - kSCSIParallelFeature_ClearNegotiation = 2 -}; - -typedef enum SCSIParallelFeatureResult -{ - kSCSIParallelFeature_NegotitiationUnchanged = 0, - kSCSIParallelFeature_NegotitiationCleared = 1, - kSCSIParallelFeature_NegotitiationSuccess = 2 -}; - - -// The SCSI Message Codes used for MESSAGE IN and MESSAGE OUT phases. -enum SCSIParallelMessages -{ - // Link Control Messages - kSCSIParallelMessage_TASK_COMPLETE = 0x00, - kSCSIParallelMessage_EXTENDED_MESSAGE = 0x01, - kSCSIParallelMessage_SAVE_DATA_POINTER = 0x02, - kSCSIParallelMessage_RESTORE_POINTERS = 0x03, - kSCSIParallelMessage_DISCONNECT = 0x04, - kSCSIParallelMessage_INITIATOR_DETECTED_ERROR = 0x05, - kSCSIParallelMessage_MESSAGE_REJECT = 0x07, - kSCSIParallelMessage_NO_OPERATION = 0x08, - kSCSIParallelMessage_MESSAGE_PARITY_ERROR = 0x09, - kSCSIParallelMessage_IGNORE_WIDE_RESIDUE = 0x23, - kSCSIParallelMessage_QAS_REQUEST = 0x55, - kSCSIParallelMessage_IDENTIFY = 0x80, - - // The Message Codes used in the EXTENDED_MESSAGE message. - kSCSIParallelMessage_MODIFY_DATA_POINTER = 0x00, - kSCSIParallelMessage_SYNCHONOUS_DATA_TRANSFER_REQUEST = 0x01, - // Reserved = 0x02 - kSCSIParallelMessage_WIDE_DATA_TRANSFER_REQUEST = 0x03, - kSCSIParallelMessage_PARALLEL_PROTOCOL_REQUEST = 0x04, - // Reserved = 0x05 through 0xFF - - // Task Attribute Message Codes - kSCSIParallelMessage_ACA = 0x24, - kSCSIParallelMessage_HEAD_OF_QUEUE = 0x21, - kSCSIParallelMessage_LINKED_COMMAND_COMPLETE = 0x0A, - kSCSIParallelMessage_ORDERED = 0x22, - kSCSIParallelMessage_SIMPLE = 0x20, - - // Task Management Message Codes - kSCSIParallelMessage_ABORT_TASK = 0x0D, - kSCSIParallelMessage_ABORT_TASK_SET = 0x06, - kSCSIParallelMessage_CLEAR_ACA = 0x16, - kSCSIParallelMessage_CLEAR_TASK_SET = 0x0E, - kSCSIParallelMessage_LOGICAL_UNIT_RESET = 0x17, - kSCSIParallelMessage_TARGET_RESET = 0x0C -}; - -enum -{ - kSCSIParallelTaskControllerIDQueueHead = 0 -}; - -// Notifications -enum -{ - kSCSIControllerNotificationBusReset = 0x68000000 -}; - -// Forward declaration for the internally used Parallel Device object. -class IOSCSIParallelInterfaceDevice; - -// This is the identifier that is used to specify a given parallel Task. -typedef OSObject * SCSIParallelTaskIdentifier; - - -//----------------------------------------------------------------------------- -// Class Declarations -//----------------------------------------------------------------------------- - -/*! @class IOSCSIParallelInterfaceController - @abstract Class that represents a SCSI Host Bus Adapter. - @discussion Class that represents a SCSI Host Bus Adapter. -*/ -class IOSCSIParallelInterfaceController : public IOService -{ - - OSDeclareAbstractStructors ( IOSCSIParallelInterfaceController ) - -#if 0 -#pragma mark - -#pragma mark Client API -#endif - - -public: - - /*! - @function GetSCSIParallelTask - @abstract Method to allow the client to get a SCSIParallelTask - @discussion Get a SCSIParallelTask from the controller so that a request - can be issued to the HBA driver. - @param blockForCommand If the blockForCommand parameter is set to false - and there are no free SCSIParallelTasks, this method will return NULL, - otherwise it will wait for one to become available before returning. - @result If there is a SCSI Parallel Task available, a reference to it - will be returned. - */ - - SCSIParallelTaskIdentifier GetSCSIParallelTask ( bool blockForCommand ); - - /*! - @function FreeSCSIParallelTask - @abstract Method to allow the client to release a SCSIParallelTask - @discussion The FreeSCSIParallelTask method is called by the client when - a SCSIParallelTask has been completed and the associated returnTask - needs to be returned to the pool. - @param returnTask is a reference to the SCSIParallelTaskIdentifier to be - returned. - */ - - void FreeSCSIParallelTask ( SCSIParallelTaskIdentifier returnTask ); - - /*! - @function FindTaskForAddress - @abstract Find a task for a given Task Address, if one exists. - @discussion If a valid Tagged Task Identifier is specified, this method - will return the task specified by the Tagged Task Address if one is - found, or else NULL will be returned. If zero is used as the Tagged - Task Identifier, then this routine will search for an outstanding task - based on the Untagged Task Address and return the task or else, if one - is not found, return NULL. - @param theT is the Target component of the I_T_L or I_T_L_Q nexus. - @param theL is the Logical Unit component of the I_T_L or I_T_L_Q nexus. - @param theQ is the Queue Tag component of the I_T_L_Q nexus. If this is - an I_T_L nexus, then the kSCSIUntaggedTaskIdentifier constant should be - used for theQ. - @result returns a valid SCSIParallelTaskIdentifier or NULL if none - found. - */ - - SCSIParallelTaskIdentifier FindTaskForAddress ( - SCSIDeviceIdentifier theT, - SCSILogicalUnitNumber theL, - SCSITaggedTaskIdentifier theQ ); - - - /*! - @function FindTaskForControllerIdentifier - @abstract Find a task for a given Target and Controller Task Identifier - @discussion Allows the controller child class to find an outstanding task - for a specified target and controller task identifier - @param theTarget is the Target that the task . - @param theIdentifier is the controller task identifier set using the SCSI - Parallel Task's SetControllerTaskIdentifier() method. - @result returns a valid SCSIParallelTaskIdentifier or NULL if none - found. - */ - - SCSIParallelTaskIdentifier FindTaskForControllerIdentifier ( - SCSIDeviceIdentifier theTarget, - UInt64 theIdentifier ); - - - /*! - @function ExecuteParallelTask - @abstract Submit a SCSIParallelTask for execution. - @discussion The ExecuteParallelTask call is made by the client to submit - a SCSIParallelTask for execution. - @param parallelRequest is a reference to the SCSIParallelTaskIdentifier - to be executed. - @result is an appropriate SCSIServiceResponse which are defined in the - file <IOKit/scsi/SCSITask.h>. - */ - - SCSIServiceResponse ExecuteParallelTask ( - SCSIParallelTaskIdentifier parallelRequest ); - - // --- Public API methods provided by HBA child classes ---- - - /*! - @function ReportHBAHighestLogicalUnitNumber - @abstract Gets the Highest Logical Unit Number. - @discussion This method is used to query the HBA child class to - determine what the highest Logical Unit Number that the controller can - address. - @result returns a valid 64-bit logical unit number. - */ - - virtual SCSILogicalUnitNumber ReportHBAHighestLogicalUnitNumber ( void ) = 0; - - /*! - @function DoesHBASupportSCSIParallelFeature - @abstract Queries the HBA child class to determine if it supports a - specific SPI feature. - @discussion Queries the HBA child class to determine if it supports the - specified feature as defined by the SCSI Parallel Interconnect - specifications. - @result Returns true if requested feature is supported. - */ - - virtual bool DoesHBASupportSCSIParallelFeature ( - SCSIParallelFeature theFeature ) = 0; - - /*! - @function InitializeTargetForID - @abstract Called to initialize a target device. - @discussion This method will be called to initialize a target device in - a single-threaded manner. The HBA can use this method to probe the - target or do anything else necessary before the device object is - registered with IOKit for matching. - @result Returns true if the target was successfully initialized. - */ - - virtual bool InitializeTargetForID ( - SCSITargetIdentifier targetID ) = 0; - - // The SCSI Task Management Functions as defined in the SCSI Architecture - // Model - 2 (SAM-2) specification. These are used by the client to request - // the specified function. The controller can complete these immmediately - // by returning the appropriate SCSIServiceResponse, or these can be completed - // asyncronously by the controller returning a SCSIServiceResponse of - // kSCSIServiceResponse_Request_In_Process and then calling the appropriate - // function complete member routine listed in the child class API section. - - virtual SCSIServiceResponse AbortTaskRequest ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL, - SCSITaggedTaskIdentifier theQ ) = 0; - - virtual SCSIServiceResponse AbortTaskSetRequest ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL ) = 0; - - virtual SCSIServiceResponse ClearACARequest ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL ) = 0; - - virtual SCSIServiceResponse ClearTaskSetRequest ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL ) = 0; - - virtual SCSIServiceResponse LogicalUnitResetRequest ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL ) = 0; - - virtual SCSIServiceResponse TargetResetRequest ( - SCSITargetIdentifier theT ) = 0; - - - - /*! - @function DoesHBAPerformAutoSense - @abstract Queries the HBA child class to determine if it automatically - performs AutoSense and provides AutoSense data for each I/O. If the HBA - allocates space for AutoSense in its HBA specific data region on a per - task basis, the HBA should respond true. - @discussion Queries the HBA child class to determine if it automatically - performs AutoSense and provides AutoSense data for each I/O. If the HBA - allocates space for AutoSense in its HBA specific data region on a per - task basis, the HBA should respond true. - @result Return true if HBA performs AutoSense into its own private data - buffer. - */ - - OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 1 ); - - virtual bool DoesHBAPerformAutoSense ( void ); - - /*! - @function ReportHBAConstraints - @abstract Called to report the I/O constraints for this controller. - A list of valid keys includes: - kIOMaximumSegmentCountReadKey, (required) - kIOMaximumSegmentCountWriteKey, (required) - kIOMaximumSegmentByteCountReadKey, (required) - kIOMaximumSegmentByteCountWriteKey, (required) - kIOMinimumSegmentAlignmentByteCountKey, (required) - kIOMaximumSegmentAddressableBitCountKey, (required) - kIOMinimumHBADataAlignmentMaskKey (required). - NB: These keys and their values are described in this header and <IOKit/IOKitKeys.h> - @param constraints. An OSDictionary object used to aggregate the key/value pairs. - Subclasses must set the required keys if they override this method. If a subclass does - not provide the required keys, the system will panic. - */ - OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 2 ); - - virtual void ReportHBAConstraints ( OSDictionary * constraints ); - - // Padding for the Client API - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 3 ); - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 8 ); - - -#if 0 -#pragma mark - -#pragma mark Child Class API -#endif - - -protected: - - // ---- Target Creation and Destruction methods --- - - /*! - @function CreateTargetForID - @abstract Method to perform device creation. - @discussion For HBA child classes that report true to the - DoesHBAPerformDeviceManagement() method, the child class will be - responsible for all device management by using these methods; - otherwise, the superclass will be responsible for all device management. - This method must be used to perform SCSI Parallel Device creation and - cannot be overridden. - @param targetID SCSIDeviceIdentifier of desired targetID. - @result returns true if successful. - */ - - bool CreateTargetForID ( SCSIDeviceIdentifier targetID ); - - /*! - @function CreateTargetForID - @abstract Method to perform device creation. - @discussion For HBA child classes that report true to the - DoesHBAPerformDeviceManagement() method, the child class will be - responsible for all device management by using these methods; - otherwise, the superclass will be responsible for all device management. - This method must be used to perform SCSI Parallel Device creation and - cannot be overridden. - @param targetID SCSIDeviceIdentifier of desired targetID. - @param properties A dictionary of properties to associate with the device - upon creation. The list of valid property keys is as follows: - kIOPropertySASAddressKey, - kIOPropertyFibreChannelNodeWorldWideNameKey, - kIOPropertyFibreChannelPortWorldWideNameKey, - kIOPropertyFibreChannelAddressIdentifierKey, and - kIOPropertyFibreChannelALPAKey. - These keys are defined in - <IOKit/storage/IOStorageProtocolCharacteristics.h> and the values - associated with these keys must be of the proper type/size, - or the target creation will not succeed. - @result returns true if successful. - */ - - bool CreateTargetForID ( SCSIDeviceIdentifier targetID, - OSDictionary * properties ); - - /*! - @function DestroyTargetForID - @abstract Method to perform device destruction. - @discussion For HBA child classes that report true to the - DoesHBAPerformDeviceManagement() method, the child class will be - responsible for all device management by using these methods; otherwise, - the superclass will be responsible for all device management. - This method must be used to perform SCSI Parallel Device destruction and - cannot be overridden. - @param targetID SCSIDeviceIdentifier of desired targetID. - */ - - void DestroyTargetForID ( SCSIDeviceIdentifier targetID ); - - /*! - @function GetTargetForID - @abstract Accessor for getting pointer to IOSCSIParallelInterfaceDevice. - @param targetID SCSIDeviceIdentifier of desired targetID. - @result returns pointer to IOSCSIParallelInterfaceDevice or NULL if not - found. - */ - - IOSCSIParallelInterfaceDevice * GetTargetForID ( - SCSIDeviceIdentifier targetID ); - - /*! - @function SetTargetProperty - @abstract Accessor for setting a property for a specific target. - @param device A pointer to a valid IOSCSIParallelInterfaceDevice. - @param key A pointer to a valid OSString object which represents the key. - A list of valid keys includes: - kIOPropertySASAddressKey, - kIOPropertyFibreChannelNodeWorldWideNameKey, - kIOPropertyFibreChannelPortWorldWideNameKey, - kIOPropertyFibreChannelAddressIdentifierKey, and - kIOPropertyFibreChannelALPAKey. - NB: These keys and their values are described in <IOKit/storage/IOStorageProtocolCharacteristics.h> - @param value Pointer to an OSObject (one of type OSData, OSString, etc.) - which represents the value for the property. The value must be of the proper type - and size for the specified key. - @result returns true if identifier was properly set, otherwise false. - */ - - bool SetTargetProperty ( SCSIDeviceIdentifier targetID, - const char * key, - OSObject * value ); - - /*! - @function RemoveTargetProperty - @abstract Accessor for removing a property from a specific target. - @param device A pointer to a valid IOSCSIParallelInterfaceDevice. - @param key A pointer to a valid OSString object which represents the key. - */ - - void RemoveTargetProperty ( SCSIDeviceIdentifier targetID, - const char * key ); - - // ---- Methods for HBA specifics. ---- - - /*! - @function SetHBAProperty - @abstract Accessor for setting a property for this object. - @param key A pointer to a valid OSString object which represents the key. - A list of valid keys includes: - kIOPropertyVendorNameKey, - kIOPropertyProductNameKey, - kIOPropertyProductRevisionLevelKey, - kIOPropertyPortDescriptionKey, - kIOPropertyPortSpeedKey, - kIOPropertyPortTopologyKey, - kIOPropertySCSIParallelSignalingTypeKey, - kIOPropertyFibreChannelCableDescriptionKey, - kIOPropertyFibreChannelNodeWorldWideNameKey, - kIOPropertyFibreChannelPortWorldWideNameKey, - kIOPropertyFibreChannelAddressIdentifierKey, and - kIOPropertyFibreChannelALPAKey. - NB: These keys and their values are described in <IOKit/storage/IOStorageDeviceCharacteristics.h> - and <IOKit/storage/IOStorageProtocolCharacteristics.h> - @param value Pointer to an OSObject (one of type OSData, OSString, etc.) - which represents the value for the property. The value must be of the proper type, - and/or size for the specified key. - @result returns true if identifier was properly set, otherwise false. - */ - - bool SetHBAProperty ( const char * key, - OSObject * value ); - - /*! - @function RemoveHBAProperty - @abstract Accessor for removing a property for this object. - @param key A pointer to a valid OSString object which represents the key. - See the SetHBAProperty() method for a list of valid keys. - */ - - void RemoveHBAProperty ( const char * key ); - - // These methods will not be called before the InitializeController() call, - // and will not be called after the TerminateController() call. But in the - // interval between those calls, they shall report the correct requested - // information. They are implemented as seperate pure virtual methods - // instead of a selector driven method because the HBA child class is - // required to report this information. - - /*! - @function ReportInitiatorIdentifier - @abstract Get the SCSI Device Identifier for the HBA. - @discussion This method will be called to determine the SCSI Device - Identifier that the Initiator has assigned for this HBA. - @result returns SCSIInitiatorIdentifier. - */ - - virtual SCSIInitiatorIdentifier ReportInitiatorIdentifier ( void ) = 0; - - /*! - @function ReportHighestSupportedDeviceID - @abstract Get the highest supported SCSI Device Identifier. - @discussion This method will be called to determine the value of the - highest SCSI Device Identifier supported by the HBA. This value will be - used to determine the last ID to process. - @result returns highest SCSIDeviceIdentifier - */ - - virtual SCSIDeviceIdentifier ReportHighestSupportedDeviceID ( void ) = 0; - - /*! - @function ReportMaximumTaskCount - @abstract Report Maximum Task Count - @discussion This method will be called to retrieve the maximum number of - outstanding tasks the HBA can process. This number must be greater than - zero or the controller driver will fail to match and load. - @result returns maximum (non-zero) task count. - */ - - virtual UInt32 ReportMaximumTaskCount ( void ) = 0; - - /*! - @function ReportHBASpecificTaskDataSize - @abstract Determine memory needed for HBA Task specific use. - @discussion This method is used to retrieve the amount of memory that - will be allocated in the SCSI Parallel Task for HBA specific use. - @result returns memory required in bytes - */ - - virtual UInt32 ReportHBASpecificTaskDataSize ( void ) = 0; - - /*! - @function ReportHBASpecificDeviceDataSize - @abstract Determine memory needed for HBA Device specific use. - @discussion This method is used to retrieve the amount of memory that - will be allocated in the SCSI Parallel Device for HBA specific use. - @result returns memory required in bytes - */ - - virtual UInt32 ReportHBASpecificDeviceDataSize ( void ) = 0; - - /*! - @function DoesHBAPerformDeviceManagement - @abstract Determine if HBA will manage devices. - @discussion This method is used to determine if the HBA will manage - target device creation and destruction. - @result return true means objects for target devices will only be - created when the child class calls the CreateTargetForID method. - */ - - virtual bool DoesHBAPerformDeviceManagement ( void ) = 0; - - // ---- Initialize and Terminate methods for the subclass to implement ----- - // The subclass shall not override the IOKit init and terminate methods, - // but shall instead rely on these methods for initialization and - // termination. - - // This is done to allow for this superclass to manage all IOKit specifics - // and to require only a Family specific API to be implemented by the - // subclass drivers. - - /*! - @function InitializeController - @abstract Called to initialize the controller - @discussion It is guaranteed that the InitializeController() will only be - called once per instantiation. The InitializeController() methods allows - the subclass driver to do all the necessary initialization required by - the hardware before it is able to accept requests to execute. All - necessary allocation of resources should be made during this method - call. This is the first method that will be called in the subclass. - @result return true means that initialization was successful. - */ - - virtual bool InitializeController ( void ) = 0; - - /*! - @function TerminateController - @abstract Called to terminate the controller - @discussion It is guaranteed that the TerminateController() will only be - called once and only after the InitializeController() method and only if - true was returned in response to the InitializeController() method. - The TerminateController() method allows the subclass to release all - resources that were acquired for operation of the hardware and shutdown - all hardware services. - This is the last method of the subclass that will be called before the - class is destroyed. - */ - - virtual void TerminateController ( void ) = 0; - - // ---- Start and Stop methods for the subclass ---- - - /*! - @function StartController - @abstract Called to start the controller - @discussion The StartController will always be called before any - requests are sent to the driver for execution. This method is called - after an initialize to start the services provided by the specific HBA - driver or called after a StopController call to restart those services. - After this call completes, all services provided by the HBA driver are - available to the client. - @result return true means that start was successful. - */ - - virtual bool StartController ( void ) = 0; - - /*! - @function StopController - @abstract Called to stop the controller - @discussion The StopController method will be called any time that the - system wants the card to stop accepting requests. ( See StartController - discussion ). The subclass should disable the hardware interrupt for - the particular controller (if possible) in this method. - */ - - virtual void StopController ( void ) = 0; - - // ---- Suspend and Resume Methods for the subclass ---- - - /*! - @function SuspendServices - @abstract Called to suspend controller services - @discussion Method will be called when the system wants to suspend the - services that are provided by the HBA driver. This call is not a reset - and the driver shall retain all state data between this so that if a - ResumeServices call is received, the driver can continue providing - services without a visible difference to the client. The driver may - receive multiple SuspendServices calls without receiving a - ResumeServices call and should ignore any after the first until a - ResumeServices call is received. - */ - - virtual void SuspendServices ( void ); - - /*! - @function ResumeServices - @abstract Called to resume controller services - @discussion Method that will be called to resume services - provided by the driver. ( See SuspendServices discussion ) - */ - - virtual void ResumeServices ( void ); - - /*! - @function HandleInterruptRequest - @abstract Handle Interrupt Request - @discussion The HandleInterruptRequest is used to notify an HBA - specific subclass that an interrupt request needs to be serviced. It is - called on the workloop (it holds the gate) at secondary interrupt level. - */ - - virtual void HandleInterruptRequest ( void ) = 0; - - /*! - @function EnableInterrupt - @abstract Enable Interrupt - @discussion Method that the HBA child class can call to enable - the associated IOInterruptEventSource. - */ - - void EnableInterrupt ( void ); - - /*! - @function DisableInterrupt - @abstract Disable Interrupt - @discussion Method that the HBA child class can call to disable - the associated IOInterruptEventSource. - */ - - void DisableInterrupt ( void ); - - /*! - @function SignalInterrupt - @abstract Signals that an interrupt has occurred. - @discussion Subclasses of IOSCSIParallelInterfaceController - should call this method in order to get the secondary interrupt - thread scheduled if and only if they will be returning false from - their overriden FilterInterruptRequest() method. See the - discussion for the FilterInterruptRequest() method for more - details. - - NOTE: This method should only be called from within the - FilterInterruptRequest() method and at no other time. - - Available in 10.3.3 or later. - - */ - - void SignalInterrupt ( void ); - - /*! - @function ProcessParallelTask - @abstract Called by client to process a parallel task. - @discussion This method is called to process a parallel task (i.e. put - the command on the bus). The HBA specific sublcass must implement this - method. - @param parallelRequest A valid SCSIParallelTaskIdentifier. - @result serviceResponse (see <IOKit/scsi/SCSITask.h>) - */ - - virtual SCSIServiceResponse ProcessParallelTask ( - SCSIParallelTaskIdentifier parallelRequest ) = 0; - - /*! - @function CompleteParallelTask - @abstract Parallel Task Completion - @discussion The HBA specific sublcass inherits the CompleteParallelTask() - method which shall be called when the HBA has completed the processing - of a parallel task. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param completionStatus The status of the SCSI bus. - @param serviceResponse (see <IOKit/scsi/SCSITask.h>) - */ - - void CompleteParallelTask ( - SCSIParallelTaskIdentifier parallelRequest, - SCSITaskStatus completionStatus, - SCSIServiceResponse serviceResponse ); - - - // Completion routines for the SCSI Task Management functions as described - // in the SCSI ArchitectureModel - 2 (SAM-2) specification. Each of these - // correspond to a client request for the specific Task Management functions. - // If the Controller Child Class completed the request by returning a - // SCSIServiceResponse of anything other than kSCSIServiceResponse_Request_In_Process, - // then the controller class does not need to call the completion member routine. - // If the controller did not complete the request immediately, then it will - // need to call the appropriate completion member routine listed here. - void CompleteAbortTask ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL, - SCSITaggedTaskIdentifier theQ, - SCSIServiceResponse serviceResponse ); - - void CompleteAbortTaskSet ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL, - SCSIServiceResponse serviceResponse ); - - void CompleteClearACA ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL, - SCSIServiceResponse serviceResponse ); - - void CompleteClearTaskSet ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL, - SCSIServiceResponse serviceResponse ); - - void CompleteLogicalUnitReset ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL, - SCSIServiceResponse serviceResponse ); - - void CompleteTargetReset ( - SCSITargetIdentifier theT, - SCSIServiceResponse serviceResponse ); - - /*! - @function NotifyClientsOfBusReset - @abstract Method called to notify clients that a bus reset has occurred. - @discussion This method is used by the HBA child class to inform the - parent class and any clients that a bus reset has occurred. - */ - - void NotifyClientsOfBusReset ( void ); - - /*! - @function NotifyClientsOfPortStatusChange - @abstract Method called to notify clients of port status change events. - @discussion This method is used by the HBA child class to inform the - parent class and any clients that a port has changed status. - */ - - void NotifyClientsOfPortStatusChange ( SCSIPortStatus newStatus ); - - /*! - @function GetSCSIDomainIdentifier - @abstract Accessor method to get the SCSI Domain Identifier. - @discussion Accessor method to get the SCSI Domain Identifier. - @result returns SCSI Domain Identifier. - */ - - SInt32 GetSCSIDomainIdentifier ( void ); - - /*! - @function GetProvider - @abstract Accessor method to get the IOService which is the controller's - provider. - @discussion Accessor method to get the IOService which is the - controller's provider. - @result returns pointer to IOService. - */ - - IOService * GetProvider ( void ); - - /*! - @function GetWorkLoop - @abstract Accessor method to get the IOWorkLoop associated with this - HBA. - @discussion Accessor method to get the IOWorkLoop associated with this - HBA. - @result returns pointer to IOWorkLoop. - */ - - IOWorkLoop * GetWorkLoop ( void ) const; - - /*! - @function GetCommandGate - @abstract Accessor to get an IOCommandGate associated with the workloop. - @discussion Accessor to get an IOCommandGate associated with the - workloop. - @result returns pointer to IOCommandGate. - */ - - IOCommandGate * GetCommandGate ( void ); - - // ---- SCSI Parallel Task Object Accessors ---- - - /*! - @function GetSCSITaskIdentifier - @abstract Method to retrieve a SCSITaskIdentifier from a valid - SCSIParallelTaskIdentifier. - @discussion Method to retrieve a SCSITaskIdentifier from a valid - SCSIParallelTaskIdentifier. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns SCSITaskIdentifier that represents the original request - from the SCSI Application Layer client. - */ - - SCSITaskIdentifier GetSCSITaskIdentifier ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetTargetIdentifier - @abstract Method to get the SCSITargetIdentifier associated with a - request. - @discussion Method to get the SCSITargetIdentifier associated with a - request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns SCSITargetIdentifier - */ - - SCSITargetIdentifier GetTargetIdentifier ( - SCSIParallelTaskIdentifier parallelTask ); - - // ---- Methods for Accessing data in the client's SCSI Task Object ---- - // Method to retrieve the LUN that identifies the Logical Unit whose Task - // Set to which this task is to be added. - - /*! - @function GetLogicalUnitNumber - @abstract Method to get the logical unit number associated with a - request. - @discussion Method to get the logical unit number associated with a - request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns a valid 64-bit logical unit number. - */ - - SCSILogicalUnitNumber GetLogicalUnitNumber ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetTaggedTaskIdentifier - @abstract Method to retrieve the SCSI Tagged Task Identifier of the - task. If the returned value is equal to kSCSIUntaggedTaskIdentifier, - then this task is untagged. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result an SCSITaskAttribute value. - */ - - SCSITaggedTaskIdentifier GetTaggedTaskIdentifier ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetTaskAttribute - @abstract Method to retrieve the SCSI Task Attribute of the task - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result an SCSITaskAttribute value. - */ - - SCSITaskAttribute GetTaskAttribute ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetCommandDescriptorBlockSize - @abstract Method to retrieve the size of the SCSI Command Descriptor - Block (CDB). - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns the size of the SCSI Command Descriptor Block in bytes. - */ - - UInt8 GetCommandDescriptorBlockSize ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetCommandDescriptorBlock - @abstract Method to retrieve the SCSI Command Descriptor Block (CDB). - @discussion This will always return a 16 Byte CDB. If the Protocol Layer - driver does not support 16 Byte CDBs, it will have to create a local - SCSICommandDescriptorBlock variable to get the CDB data and then - transfer the needed bytes from there. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param cdbData is a SCSICommandDescriptorBlock pointer to 16 byte CDB - @result returns true if data was copied to cdbData pointer - */ - - bool GetCommandDescriptorBlock ( - SCSIParallelTaskIdentifier parallelTask, - SCSICommandDescriptorBlock * cdbData ); - - /*! - @function GetDataTransferDirection - @abstract Retrieves the data transfer direction for any data associated - with the request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result One of the valid data transfer directions described in - <IOKit/scsi/SCSITask.h> - */ - - UInt8 GetDataTransferDirection ( SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetRequestedDataTransferCount - @abstract Retrieves the requested data transfer count for any data - associated with the request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result The requested data transfer count in bytes. - */ - - UInt64 GetRequestedDataTransferCount ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetRealizedDataTransferCount - @abstract Retrieves the realized data transfer count for any data - associated with the request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result The realized data transfer count in bytes. - */ - - UInt64 GetRealizedDataTransferCount ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function SetRealizedDataTransferCount - @abstract Sets the realized data transfer count in bytes. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param realizedTransferCountInBytes is the number of bytes actually - transferred. - @result true means the data transfer count was successfully set. - */ - - bool SetRealizedDataTransferCount ( - SCSIParallelTaskIdentifier parallelTask, - UInt64 realizedTransferCountInBytes ); - - /*! - @function IncrementRealizedDataTransferCount - @abstract Increments the realized data transfer count. This method is - helpful for when the HBA has to do multiple passes of DMA because there - are more scatter-gather elements than it can process in one pass. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param realizedTransferCountInBytes is the number of bytes to add to the - realized data count for the task. - */ - - void IncrementRealizedDataTransferCount ( - SCSIParallelTaskIdentifier parallelTask, - UInt64 realizedTransferCountInBytes ); - - /*! - @function GetDataBuffer - @abstract Method to retrieve client buffer from the request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns pointer to an IOMemoryDescriptor which represents the - buffer. - */ - - IOMemoryDescriptor * GetDataBuffer ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetDataBufferOffset - @abstract Method to retrieve offset into client buffer at which to start - processing. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns offset in bytes - */ - - UInt64 GetDataBufferOffset ( SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetDMACommand - @abstract Method to retrieve a pointer to an IODMACommand from the request. - @discussion For devices utilizing DMA, the IODMACommand object should be - obtained via GetDMACommand(). The subclass is responsible for calling prepare() - on the IODMACommand object using the proper offset obtained via GetDataBufferOffset() - and correct size obtained via GetRequestedDataTransferCount(). The subclass - is further responsible for calling complete() on the IODMACommand object once - all DMA operations have finished. - NB: Subclasses should not call IODMACommand::setMemoryDescriptor(). - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns pointer to an IODMACommand which is used in conjunction - with the task. - */ - - IODMACommand * GetDMACommand ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetTimeoutDuration - @abstract Method to retrieve the timeout duration in milliseconds for a - request. - @discussion Method to retrieve the timeout duration in milliseconds for - a request. A value of zero represents an infinite timeout, or on - hardware where infinite timeouts are not possible, substitute the - longest timeout possible. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns timeout duration in milliseconds - */ - - UInt32 GetTimeoutDuration ( SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function SetAutoSenseData - @abstract Method to set the auto sense data buffer associated with a - request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param newSensedata pointer to auto sense data buffer - @result returns true if data in newSenseData was succesfully into the - task object - */ - - bool SetAutoSenseData ( - SCSIParallelTaskIdentifier parallelTask, - SCSI_Sense_Data * newSenseData, - UInt8 senseDataSize ); - - /*! - @function GetAutoSenseData - @abstract Method to retrieve auto sense data buffer associated with a - request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param receivingBuffer pointer to auto sense data buffer - @result returns true if successfully copied data into receivingBuffer - */ - - bool GetAutoSenseData ( - SCSIParallelTaskIdentifier parallelTask, - SCSI_Sense_Data * receivingBuffer, - UInt8 senseDataSize ); - - /*! - @function GetAutoSenseDataSize - @abstract Method to retrieve auto sense data buffer size associated with a - request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns Size of auto sense data buffer. - */ - - UInt8 GetAutoSenseDataSize ( - SCSIParallelTaskIdentifier parallelTask ); - - - /*! - @function GetSCSIParallelFeatureNegotiation - @abstract Method to retrieve the requested value for negotiation of the. - @discussion Query as to whether the SCSI Parallel Device object has - negotiated wide data transfers. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result A valid SCSIParallelFeatureControl. - */ - - SCSIParallelFeatureRequest GetSCSIParallelFeatureNegotiation ( - SCSIParallelTaskIdentifier parallelTask, - SCSIParallelFeature requestedFeature ); - - /*! - @function GetSCSIParallelFeatureNegotiationCount - @abstract Method to retrieve the number of requested negotiations. - @discussion Query as to the number of SCSI Parallel Features that are - requested to either be negotitated or cleared. These are all features - that are set to either kSCSIParallelFeature_AttemptNegotiation or - kSCSIParallelFeature_ClearNegotiation. If the return value is zero, - then all features are set to kSCSIParallelFeature_NoNegotiation - and all feature negotiations are to remain as they currently exist. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result an unsigned integer up to 64 bits in size. - */ - - UInt64 GetSCSIParallelFeatureNegotiationCount ( - SCSIParallelTaskIdentifier parallelTask); - - /*! - @function SetSCSIParallelFeatureNegotiationResult - @abstract Method to set the wide data transfer negotiation result. - @discussion Method to set the wide data transfer negotiation result. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param requestedFeature The SCSIParallelFeature that the has been set to - newResult. - @param newResult A valid SCSIParallelFeatureResult value. - */ - - void SetSCSIParallelFeatureNegotiationResult ( - SCSIParallelTaskIdentifier parallelTask, - SCSIParallelFeature requestedFeature, - SCSIParallelFeatureResult newResult ); - - /*! - @function GetSCSIParallelFeatureNegotiationResult - @abstract Method to retrieve the result of any wide transfer - negotiations. - @discussion Query as to whether the SCSI Parallel Controller object has - negotiated wide data transfers. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result A valid SCSIParallelFeatureResult. - */ - - SCSIParallelFeatureResult GetSCSIParallelFeatureNegotiationResult ( - SCSIParallelTaskIdentifier parallelTask, - SCSIParallelFeature requestedFeature ); - - /*! - @function GetSCSIParallelFeatureNegotiationResultCount - @abstract Method to retrieve the number of changed negotiations. - @discussion Query as to the number of SCSI Parallel Features that have - been changed to either negotitated or cleared. These are all features - that are set to either kSCSIParallelFeature_NegotitiationCleared or - kSCSIParallelFeature_NegotitiationSuccess. If the return value is zero, - then all features are set to kSCSIParallelFeature_NegotitiationUnchanged. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result an unsigned integer up to 64 bits in size. - */ - - UInt64 GetSCSIParallelFeatureNegotiationResultCount ( - SCSIParallelTaskIdentifier parallelTask); - - // Controller Task Identifier related member routines - - /*! - @function SetControllerTaskIdentifier - @abstract Method to set the Controller Task Identifier. - @discussion This method allows the Controller Child Class - driver to set a unique identifier to associate with the specified - SCSI Parallel Task. This identifier is designed to be used by - controllers that do not have access to the LUN and Tag information - when notified by the HBA that a request has completed. - If the kSCSIParallelTaskControllerIDQueueHead is used, this - member routine will return the first Task on the queue. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param newIdentifier unsigned 64 bit integer token. - @result none - */ - - void SetControllerTaskIdentifier ( - SCSIParallelTaskIdentifier parallelTask, - UInt64 newIdentifier ); - - UInt64 GetControllerTaskIdentifier ( - SCSIParallelTaskIdentifier parallelTask); - - - // The HBA Data related fields - - /*! - @function GetHBADataSize - @abstract Method to retrieve the HBA Data Size in bytes. - @discussion Method to retrieve the HBA Data Size in bytes. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns HBA Data size in bytes. - */ - - UInt32 GetHBADataSize ( SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetHBADataPointer - @abstract Method to retrieve the HBA Data pointer. - @discussion Method to retrieve the HBA Data pointer. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns pointer to buffer for HBA specific data, NULL if - none found or GetHBADataSize() returns zero. - */ - - void * GetHBADataPointer ( SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetHBADataDescriptor - @abstract Method to retrieve the IOMemoryDescriptor associated with - the HBA Data. - @discussion Method to retrieve the IOMemoryDescriptor associated with - the HBA Data. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns pointer to an IOMemoryDescriptor that wraps the HBA - specific data buffer, NULL if none found or GetHBADataSize() returns zero. - */ - - IOMemoryDescriptor * GetHBADataDescriptor ( - SCSIParallelTaskIdentifier parallelTask ); - - // ---- SCSI Parallel Device Object Accessors ---- - - // The HBA Data related fields - - /*! - @function GetHBATargetDataSize - @abstract Method to retrieve the HBA Data Size in bytes. - @discussion Method to retrieve the HBA Data Size in bytes. - @param targetDevice A valid SCSITargetIdentifier. - @result returns HBA Data size in bytes. - */ - - UInt32 GetHBATargetDataSize ( SCSITargetIdentifier targetID ); - - /*! - @function GetHBATargetDataPointer - @abstract Method to retrieve the HBA Data pointer. - @discussion Method to retrieve the HBA Data pointer. - @param targetDevice A valid SCSITargetIdentifier. - @result returns pointer to buffer for HBA specific data, NULL if - none found or GetHBADataSize is zero. - */ - - void * GetHBATargetDataPointer ( SCSITargetIdentifier targetID ); - - -#if 0 -#pragma mark - -#pragma mark Additional Child Class APIs -#endif - - - // ---- Timeout Related Methods ---- - - /*! - @function SetTimeoutForTask - @abstract Method to set the timeout duration in milliseconds for a - request. - @discussion Method to set the timeout duration in milliseconds for a - request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param timeoutOverride A timeout value in milliseconds in case the - HBA driver wishes to override the default value provided in the - parallelTask. - */ - - void SetTimeoutForTask ( SCSIParallelTaskIdentifier parallelTask, - UInt32 timeoutOverride = 0 ); - - /*! - @function HandleTimeout - @abstract Method to handle command timeouts. - @discussion Method to handle command timeouts. This should - be overridden by the child class in order to clean up HBA - specific structures after a timeout has occurred. This method - is called on the workloop (it holds the gate). - @param parallelRequest A valid SCSIParallelTaskIdentifier. - */ - - OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 9 ); - - virtual void HandleTimeout ( - SCSIParallelTaskIdentifier parallelRequest ); - - - // ---- Filter Interrupt ---- - - /*! - @function FilterInterruptRequest - @abstract Filter method called at primary interrupt time. - @discussion Filter method called at primary interrupt time. - This should only be overridden by the child class in order - to determine if an interrupt occurred for this controller instance. - Since all work occurs at primary interrupt time, this routine - should be quick and efficient and defer as much processing as - possible to the HandleInterruptRequest() method. - - NOTE: Unlike the HandleInterruptRequest() and HandleTimeout() - methods, FilterInterruptRequest() is NOT called with the - workloop lock held. - - If the value returned by FilterInterruptRequest() is true, the - secondary interrupt thread will be scheduled and the hardware - interrupt line will be disabled. If the controller instance shares - that interrupt line with other devices, it can cause large - interrupt latencies. If the controller instance can disable the - interrupt in the chip itself, the following can be done to reduce - interrupt latencies: - - - Interrupt occurs - - FilterInterruptRequest() method is called. - - If the interrupt is not for this controller, return false - immediately. - - If the interrupt is for this controller, and the controller - can disable interrupts for this chip, the controller should - disable the interrupts for this chip, call SignalInterrupt(), - and return false. This causes the secondary interrupt thread - to get scheduled, yet does not disable the interrupt line for - all devices tied to that interrupt. This effectively allows - other devices to process their interrrupts, thus reducing - interrupt latency for those devices. - - HandleInterruptRequest() method is called. - - Controller processes interrupt and completes I/O requests. - - Controller re-enables interrupts for the device. - - NOTE: If you use this approach, the interrupting condition MUST be - cleared from the hardware, otherwise an infinite process interrupt - loop will occur. - - If the controller cannot disable interrupts on the chip, it should - simply return true if an interrupt has occurred for its device. - - @result True if the hardware interrupt line should be disabled, - otherwise false. - */ - - OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 10 ); - - virtual bool FilterInterruptRequest ( void ); - - /*! - @function InitializeDMASpecification - @abstract Called to initialize an IODMACommand with a DMA specification. - @param command A pointer to a valid IODMACommand object. Subclasses - should override this method and call IODMACommand::initWithSpecification() - supplying the proper arguments to that method based on the DMA strategy. - @result boolean value indicating success or failure. - */ - OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 11 ); - - virtual bool InitializeDMASpecification ( IODMACommand * command ); - - /*! - @function CreateDeviceInterrupt - @abstract Called to create an IOInterruptEventSource for the device. Subclasses - may wish to use a different interrupt index than 0 (e.g. for using PCI Message - Signaled Interrupts) or might not need an interrupt at all (virtual HBA). - @param action A pointer to the action routine that should be passed to either - IOInterruptEventSource::interruptEventSource() or - IOFilterInterruptEventSource::filterInterruptEventSource as the method to call - when an interrupt occurs for the device (sometimes called the "deferred procedure call" - or the "secondary context method". By passing this routine along, it will - properly wire up the HandleInterruptRequest() method you should override to handle - interrupts. - @param filter A pointer to the filter routine that should be passed to - IOFilterInterruptEventSource::filterInterruptEventSource as the method to call - at primary interrupt time when an interrupt occurs for the device. - By passing this routine along, it will properly wire up the - FilterInterruptRequest() method you may override to handle primary interrupts. - @result IOInterruptEventSource. May return NULL if and only if there is no - hardware interrupt associated with this device. - */ - OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 12 ); - - virtual IOInterruptEventSource * CreateDeviceInterrupt ( - IOInterruptEventSource::Action action, - IOFilterInterruptEventSource::Filter filter, - IOService * provider ); - - // Padding for the Child Class API - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 16 ); - - -#if 0 -#pragma mark - -#pragma mark Internal Use Only -#endif - -private: - - // binary compatibility instance variable expansion - struct ExpansionData { }; - ExpansionData * fIOSCSIParallelInterfaceControllerExpansionData; - - IOService * fProvider; - OSSet * fClients; - - static SInt32 fSCSIParallelDomainCount; - SInt32 fSCSIDomainIdentifier; - - // The HBA attributes - SCSIInitiatorIdentifier fInitiatorIdentifier; - - // The maximum SCSI Device Identifier support by the HBA - // This is retreived from the child class via the - SCSIDeviceIdentifier fHighestSupportedDeviceID; - - // The total number of tasks that the HBA can proccess at a time. - // This is retrieved from the child class via ReportMaximumTaskCount - UInt32 fSupportedTaskCount; - - // The Number of requests that are currently outstanding for the current - // instantiation. - UInt16 fOutstandingRequests; - - // The member variable to indicate if the current instantiation has been - // succesfully intialized. - bool fHBAHasBeenInitialized; - - // The member variable to indicate if the current instantiation is running. - // A true means that the last or only Start call made was successful. A - // false value means that either a successful Start has not been made or a - // Stop call has been made. - bool fHBACanAcceptClientRequests; - - // The pool for the available SCSI Parallel Task objects - IOCommandPool * fParallelTaskPool; - - // WorkLoop variables - IOWorkLoop * fWorkLoop; - IOTimerEventSource * fTimerEvent; - IOInterruptEventSource * fDispatchEvent; - - IOCommandGate * fControllerGate; - - bool AllocateSCSIParallelTasks ( void ); - void DeallocateSCSIParallelTasks ( void ); - - IOWorkLoop * getWorkLoop ( void ) const; - bool CreateWorkLoop ( IOService * provider ); - void ReleaseWorkLoop ( void ); - - // SCSI Parallel Device List - // The SCSI Parallel Device List will consist of 16 elements to represent - // identifiers that end in 0h through Fh. Each array element will point - // to a device object that represents the beginning of a linked list of - // device objects. By using an array of linked lists, the traversal time - // to find an object on a bus that supports a large number of devices, such - // as Fibre Channel, will be significantly lower than having to walk a list - // that is comprised of all devices on the bus. For parallel wide and - // narrow busses, which support 16 and 8 devices respectively, this will act - // like a simple array of device objects. - enum - { - kSCSIParallelDeviceListArrayCount = 16, - kSCSIParallelDeviceListIndexMask = 0x0F - }; - - IOSimpleLock * fDeviceLock; - IOSCSIParallelInterfaceDevice * - fParallelDeviceList[kSCSIParallelDeviceListArrayCount]; - - void InitializeDeviceList ( void ); - void AddDeviceToTargetList ( - IOSCSIParallelInterfaceDevice * newDevice ); - void RemoveDeviceFromTargetList ( - IOSCSIParallelInterfaceDevice * victimDevice ); - - // The Interrupt Service Routine for the controller. - static void ServiceInterrupt ( - OSObject * theObject, - IOInterruptEventSource * theSource, - int count ); - - static void TimeoutOccurred ( OSObject * owner, IOTimerEventSource * sender ); - - static bool FilterInterrupt ( - OSObject * theObject, - IOFilterInterruptEventSource * theSource ); - - // IOService support methods - // These shall not be overridden by the HBA child classes. - bool start ( IOService * provider ); - void stop ( IOService * provider ); - - -protected: - - // These may be overriden by the HBA child classes if necessary, but should - // call the superclass implementation. - virtual bool handleOpen ( - IOService * client, - IOOptionBits options, - void * arg ); - - virtual void handleClose ( - IOService * client, - IOOptionBits options ); - - virtual bool handleIsOpen ( - const IOService * client ) const; - - virtual bool willTerminate ( IOService * provider, IOOptionBits options ); - virtual bool didTerminate ( IOService * provider, IOOptionBits options, bool * defer ); - -}; - - -#endif /* __IOKIT_IO_SCSI_PARALLEL_INTERFACE_CONTROLLER_H__ */ \ No newline at end of file diff --git a/i386/include/IOKit/scsi/spi/IOSCSIParallelInterfaceController.h b/i386/include/IOKit/scsi/spi/IOSCSIParallelInterfaceController.h deleted file mode 100644 index 0bd7981..0000000 --- a/i386/include/IOKit/scsi/spi/IOSCSIParallelInterfaceController.h +++ /dev/null @@ -1,1568 +0,0 @@ -/* - * Copyright (c) 2002-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __IOKIT_IO_SCSI_PARALLEL_INTERFACE_CONTROLLER_H__ -#define __IOKIT_IO_SCSI_PARALLEL_INTERFACE_CONTROLLER_H__ - - - /*! - @header IOSCSIParallelInterfaceController - The IOSCSIParallelInterfaceController class and the associated HBA child - class is responsible for the management of all related hardware. This - includes the onboard HBA controller chip and the physical state of the - bus. These classes are not responsible for any of the management of - the SCSI Devices on the bus with the exception of maintaining the queue that - holds the objects representing those SCSI Devices. -*/ - - -//----------------------------------------------------------------------------- -// Includes -//----------------------------------------------------------------------------- - -// General IOKit includes -#include <IOKit/IOService.h> -#include <IOKit/IOWorkLoop.h> -#include <IOKit/IOCommandGate.h> -#include <IOKit/IODMACommand.h> -#include <IOKit/IOInterruptEventSource.h> -#include <IOKit/IOFilterInterruptEventSource.h> -#include <IOKit/IOTimerEventSource.h> -#include <IOKit/IOCommandPool.h> - -// IOKit SCSI ArchitectureModel Family includes -#include <IOKit/scsi/SCSITask.h> -#include <IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h> -#include <IOKit/scsi/SCSIPort.h> - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - - -#define kIOPropertySCSIDeviceFeaturesKey "SCSI Device Features" -#define kIOPropertySCSI_I_T_NexusFeaturesKey "SCSI I_T Nexus Features" - -// This is the alignment mask used when allocating per-task HBA data. It allows -// the HBA to declare whether or not it supports 64-bit addressability and what the -// minimum byte alignment is for the data. E.g. By specifying 0x0000FFFFFFFFFFFEULL, -// the controller would be indicating that it supports 48-bits of addressability, but -// at a minimum of being 2-byte aligned. -#define kIOMinimumHBADataAlignmentMaskKey "HBA Data Alignment" - -// The Feature Selectors used to identify features of the SCSI Parallel -// Interface. These are used by the DoesHBASupportSCSIParallelFeature -// to report whether the HBA supports a given SCSI Parallel Interface -// feature and are used for requesting negotiation and reporting negotiation -// results between the controller and the device. - -// When the DoesHBASupportSCSIParallelFeature() member routine of the controller -// child class is called, it will return true if the HBA that it controls -// supports the specified SCSIParallelFeature or false if it does not. -typedef enum SCSIParallelFeature -{ - // The selector for support of Wide Data Transfers. Only Wide16 is supported - // as Wide32 has been obsoleted by the SPI-3 specification. - kSCSIParallelFeature_WideDataTransfer = 0, - - // The selector for support of Synchronous Data Transfers. - kSCSIParallelFeature_SynchronousDataTransfer = 1, - - // The selector for support of Quick Arbitration and Selection (QAS). - kSCSIParallelFeature_QuickArbitrationAndSelection = 2, - - // The selector for support of Double Transition (DT) data transfers. - kSCSIParallelFeature_DoubleTransitionDataTransfers = 3, - - // The selector for SPI Information Unit (IU) transfers. - kSCSIParallelFeature_InformationUnitTransfers = 4, - - // Since the Feature selectors are zero base, this will always have the - // correct total. - kSCSIParallelFeature_TotalFeatureCount -} SCSIParallelFeature; - - -typedef enum SCSIParallelFeatureRequest -{ - // This selector indicates that current negotiation - // should be used. - kSCSIParallelFeature_NoNegotiation = 0, - - // This selector indicates that the controller - // should attempt negotiation for the feature - kSCSIParallelFeature_AttemptNegotiation = 1, - - // This selector indicates that the controller - // should clear any negotiation for the feature - kSCSIParallelFeature_ClearNegotiation = 2 -}; - -typedef enum SCSIParallelFeatureResult -{ - kSCSIParallelFeature_NegotitiationUnchanged = 0, - kSCSIParallelFeature_NegotitiationCleared = 1, - kSCSIParallelFeature_NegotitiationSuccess = 2 -}; - - -// The SCSI Message Codes used for MESSAGE IN and MESSAGE OUT phases. -enum SCSIParallelMessages -{ - // Link Control Messages - kSCSIParallelMessage_TASK_COMPLETE = 0x00, - kSCSIParallelMessage_EXTENDED_MESSAGE = 0x01, - kSCSIParallelMessage_SAVE_DATA_POINTER = 0x02, - kSCSIParallelMessage_RESTORE_POINTERS = 0x03, - kSCSIParallelMessage_DISCONNECT = 0x04, - kSCSIParallelMessage_INITIATOR_DETECTED_ERROR = 0x05, - kSCSIParallelMessage_MESSAGE_REJECT = 0x07, - kSCSIParallelMessage_NO_OPERATION = 0x08, - kSCSIParallelMessage_MESSAGE_PARITY_ERROR = 0x09, - kSCSIParallelMessage_IGNORE_WIDE_RESIDUE = 0x23, - kSCSIParallelMessage_QAS_REQUEST = 0x55, - kSCSIParallelMessage_IDENTIFY = 0x80, - - // The Message Codes used in the EXTENDED_MESSAGE message. - kSCSIParallelMessage_MODIFY_DATA_POINTER = 0x00, - kSCSIParallelMessage_SYNCHONOUS_DATA_TRANSFER_REQUEST = 0x01, - // Reserved = 0x02 - kSCSIParallelMessage_WIDE_DATA_TRANSFER_REQUEST = 0x03, - kSCSIParallelMessage_PARALLEL_PROTOCOL_REQUEST = 0x04, - // Reserved = 0x05 through 0xFF - - // Task Attribute Message Codes - kSCSIParallelMessage_ACA = 0x24, - kSCSIParallelMessage_HEAD_OF_QUEUE = 0x21, - kSCSIParallelMessage_LINKED_COMMAND_COMPLETE = 0x0A, - kSCSIParallelMessage_ORDERED = 0x22, - kSCSIParallelMessage_SIMPLE = 0x20, - - // Task Management Message Codes - kSCSIParallelMessage_ABORT_TASK = 0x0D, - kSCSIParallelMessage_ABORT_TASK_SET = 0x06, - kSCSIParallelMessage_CLEAR_ACA = 0x16, - kSCSIParallelMessage_CLEAR_TASK_SET = 0x0E, - kSCSIParallelMessage_LOGICAL_UNIT_RESET = 0x17, - kSCSIParallelMessage_TARGET_RESET = 0x0C -}; - -enum -{ - kSCSIParallelTaskControllerIDQueueHead = 0 -}; - -// Notifications -enum -{ - kSCSIControllerNotificationBusReset = 0x68000000 -}; - -// Forward declaration for the internally used Parallel Device object. -class IOSCSIParallelInterfaceDevice; - -// This is the identifier that is used to specify a given parallel Task. -typedef OSObject * SCSIParallelTaskIdentifier; - - -//----------------------------------------------------------------------------- -// Class Declarations -//----------------------------------------------------------------------------- - -/*! @class IOSCSIParallelInterfaceController - @abstract Class that represents a SCSI Host Bus Adapter. - @discussion Class that represents a SCSI Host Bus Adapter. -*/ -class IOSCSIParallelInterfaceController : public IOService -{ - - OSDeclareAbstractStructors ( IOSCSIParallelInterfaceController ) - -#if 0 -#pragma mark - -#pragma mark Client API -#endif - - -public: - - /*! - @function GetSCSIParallelTask - @abstract Method to allow the client to get a SCSIParallelTask - @discussion Get a SCSIParallelTask from the controller so that a request - can be issued to the HBA driver. - @param blockForCommand If the blockForCommand parameter is set to false - and there are no free SCSIParallelTasks, this method will return NULL, - otherwise it will wait for one to become available before returning. - @result If there is a SCSI Parallel Task available, a reference to it - will be returned. - */ - - SCSIParallelTaskIdentifier GetSCSIParallelTask ( bool blockForCommand ); - - /*! - @function FreeSCSIParallelTask - @abstract Method to allow the client to release a SCSIParallelTask - @discussion The FreeSCSIParallelTask method is called by the client when - a SCSIParallelTask has been completed and the associated returnTask - needs to be returned to the pool. - @param returnTask is a reference to the SCSIParallelTaskIdentifier to be - returned. - */ - - void FreeSCSIParallelTask ( SCSIParallelTaskIdentifier returnTask ); - - /*! - @function FindTaskForAddress - @abstract Find a task for a given Task Address, if one exists. - @discussion If a valid Tagged Task Identifier is specified, this method - will return the task specified by the Tagged Task Address if one is - found, or else NULL will be returned. If zero is used as the Tagged - Task Identifier, then this routine will search for an outstanding task - based on the Untagged Task Address and return the task or else, if one - is not found, return NULL. - @param theT is the Target component of the I_T_L or I_T_L_Q nexus. - @param theL is the Logical Unit component of the I_T_L or I_T_L_Q nexus. - @param theQ is the Queue Tag component of the I_T_L_Q nexus. If this is - an I_T_L nexus, then the kSCSIUntaggedTaskIdentifier constant should be - used for theQ. - @result returns a valid SCSIParallelTaskIdentifier or NULL if none - found. - */ - - SCSIParallelTaskIdentifier FindTaskForAddress ( - SCSIDeviceIdentifier theT, - SCSILogicalUnitNumber theL, - SCSITaggedTaskIdentifier theQ ); - - - /*! - @function FindTaskForControllerIdentifier - @abstract Find a task for a given Target and Controller Task Identifier - @discussion Allows the controller child class to find an outstanding task - for a specified target and controller task identifier - @param theTarget is the Target that the task . - @param theIdentifier is the controller task identifier set using the SCSI - Parallel Task's SetControllerTaskIdentifier() method. - @result returns a valid SCSIParallelTaskIdentifier or NULL if none - found. - */ - - SCSIParallelTaskIdentifier FindTaskForControllerIdentifier ( - SCSIDeviceIdentifier theTarget, - UInt64 theIdentifier ); - - - /*! - @function ExecuteParallelTask - @abstract Submit a SCSIParallelTask for execution. - @discussion The ExecuteParallelTask call is made by the client to submit - a SCSIParallelTask for execution. - @param parallelRequest is a reference to the SCSIParallelTaskIdentifier - to be executed. - @result is an appropriate SCSIServiceResponse which are defined in the - file <IOKit/scsi/SCSITask.h>. - */ - - SCSIServiceResponse ExecuteParallelTask ( - SCSIParallelTaskIdentifier parallelRequest ); - - // --- Public API methods provided by HBA child classes ---- - - /*! - @function ReportHBAHighestLogicalUnitNumber - @abstract Gets the Highest Logical Unit Number. - @discussion This method is used to query the HBA child class to - determine what the highest Logical Unit Number that the controller can - address. - @result returns a valid 64-bit logical unit number. - */ - - virtual SCSILogicalUnitNumber ReportHBAHighestLogicalUnitNumber ( void ) = 0; - - /*! - @function DoesHBASupportSCSIParallelFeature - @abstract Queries the HBA child class to determine if it supports a - specific SPI feature. - @discussion Queries the HBA child class to determine if it supports the - specified feature as defined by the SCSI Parallel Interconnect - specifications. - @result Returns true if requested feature is supported. - */ - - virtual bool DoesHBASupportSCSIParallelFeature ( - SCSIParallelFeature theFeature ) = 0; - - /*! - @function InitializeTargetForID - @abstract Called to initialize a target device. - @discussion This method will be called to initialize a target device in - a single-threaded manner. The HBA can use this method to probe the - target or do anything else necessary before the device object is - registered with IOKit for matching. - @result Returns true if the target was successfully initialized. - */ - - virtual bool InitializeTargetForID ( - SCSITargetIdentifier targetID ) = 0; - - // The SCSI Task Management Functions as defined in the SCSI Architecture - // Model - 2 (SAM-2) specification. These are used by the client to request - // the specified function. The controller can complete these immmediately - // by returning the appropriate SCSIServiceResponse, or these can be completed - // asyncronously by the controller returning a SCSIServiceResponse of - // kSCSIServiceResponse_Request_In_Process and then calling the appropriate - // function complete member routine listed in the child class API section. - - virtual SCSIServiceResponse AbortTaskRequest ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL, - SCSITaggedTaskIdentifier theQ ) = 0; - - virtual SCSIServiceResponse AbortTaskSetRequest ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL ) = 0; - - virtual SCSIServiceResponse ClearACARequest ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL ) = 0; - - virtual SCSIServiceResponse ClearTaskSetRequest ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL ) = 0; - - virtual SCSIServiceResponse LogicalUnitResetRequest ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL ) = 0; - - virtual SCSIServiceResponse TargetResetRequest ( - SCSITargetIdentifier theT ) = 0; - - - - /*! - @function DoesHBAPerformAutoSense - @abstract Queries the HBA child class to determine if it automatically - performs AutoSense and provides AutoSense data for each I/O. If the HBA - allocates space for AutoSense in its HBA specific data region on a per - task basis, the HBA should respond true. - @discussion Queries the HBA child class to determine if it automatically - performs AutoSense and provides AutoSense data for each I/O. If the HBA - allocates space for AutoSense in its HBA specific data region on a per - task basis, the HBA should respond true. - @result Return true if HBA performs AutoSense into its own private data - buffer. - */ - - OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 1 ); - - virtual bool DoesHBAPerformAutoSense ( void ); - - /*! - @function ReportHBAConstraints - @abstract Called to report the I/O constraints for this controller. - A list of valid keys includes: - kIOMaximumSegmentCountReadKey, (required) - kIOMaximumSegmentCountWriteKey, (required) - kIOMaximumSegmentByteCountReadKey, (required) - kIOMaximumSegmentByteCountWriteKey, (required) - kIOMinimumSegmentAlignmentByteCountKey, (required) - kIOMaximumSegmentAddressableBitCountKey, (required) - kIOMinimumHBADataAlignmentMaskKey (required). - NB: These keys and their values are described in this header and <IOKit/IOKitKeys.h> - @param constraints. An OSDictionary object used to aggregate the key/value pairs. - Subclasses must set the required keys if they override this method. If a subclass does - not provide the required keys, the system will panic. - */ - OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 2 ); - - virtual void ReportHBAConstraints ( OSDictionary * constraints ); - - // Padding for the Client API - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 3 ); - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 4 ); - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 5 ); - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 6 ); - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 7 ); - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 8 ); - - -#if 0 -#pragma mark - -#pragma mark Child Class API -#endif - - -protected: - - // ---- Target Creation and Destruction methods --- - - /*! - @function CreateTargetForID - @abstract Method to perform device creation. - @discussion For HBA child classes that report true to the - DoesHBAPerformDeviceManagement() method, the child class will be - responsible for all device management by using these methods; - otherwise, the superclass will be responsible for all device management. - This method must be used to perform SCSI Parallel Device creation and - cannot be overridden. - @param targetID SCSIDeviceIdentifier of desired targetID. - @result returns true if successful. - */ - - bool CreateTargetForID ( SCSIDeviceIdentifier targetID ); - - /*! - @function CreateTargetForID - @abstract Method to perform device creation. - @discussion For HBA child classes that report true to the - DoesHBAPerformDeviceManagement() method, the child class will be - responsible for all device management by using these methods; - otherwise, the superclass will be responsible for all device management. - This method must be used to perform SCSI Parallel Device creation and - cannot be overridden. - @param targetID SCSIDeviceIdentifier of desired targetID. - @param properties A dictionary of properties to associate with the device - upon creation. The list of valid property keys is as follows: - kIOPropertySASAddressKey, - kIOPropertyFibreChannelNodeWorldWideNameKey, - kIOPropertyFibreChannelPortWorldWideNameKey, - kIOPropertyFibreChannelAddressIdentifierKey, and - kIOPropertyFibreChannelALPAKey. - These keys are defined in - <IOKit/storage/IOStorageProtocolCharacteristics.h> and the values - associated with these keys must be of the proper type/size, - or the target creation will not succeed. - @result returns true if successful. - */ - - bool CreateTargetForID ( SCSIDeviceIdentifier targetID, - OSDictionary * properties ); - - /*! - @function DestroyTargetForID - @abstract Method to perform device destruction. - @discussion For HBA child classes that report true to the - DoesHBAPerformDeviceManagement() method, the child class will be - responsible for all device management by using these methods; otherwise, - the superclass will be responsible for all device management. - This method must be used to perform SCSI Parallel Device destruction and - cannot be overridden. - @param targetID SCSIDeviceIdentifier of desired targetID. - */ - - void DestroyTargetForID ( SCSIDeviceIdentifier targetID ); - - /*! - @function GetTargetForID - @abstract Accessor for getting pointer to IOSCSIParallelInterfaceDevice. - @param targetID SCSIDeviceIdentifier of desired targetID. - @result returns pointer to IOSCSIParallelInterfaceDevice or NULL if not - found. - */ - - IOSCSIParallelInterfaceDevice * GetTargetForID ( - SCSIDeviceIdentifier targetID ); - - /*! - @function SetTargetProperty - @abstract Accessor for setting a property for a specific target. - @param device A pointer to a valid IOSCSIParallelInterfaceDevice. - @param key A pointer to a valid OSString object which represents the key. - A list of valid keys includes: - kIOPropertySASAddressKey, - kIOPropertyFibreChannelNodeWorldWideNameKey, - kIOPropertyFibreChannelPortWorldWideNameKey, - kIOPropertyFibreChannelAddressIdentifierKey, and - kIOPropertyFibreChannelALPAKey. - NB: These keys and their values are described in <IOKit/storage/IOStorageProtocolCharacteristics.h> - @param value Pointer to an OSObject (one of type OSData, OSString, etc.) - which represents the value for the property. The value must be of the proper type - and size for the specified key. - @result returns true if identifier was properly set, otherwise false. - */ - - bool SetTargetProperty ( SCSIDeviceIdentifier targetID, - const char * key, - OSObject * value ); - - /*! - @function RemoveTargetProperty - @abstract Accessor for removing a property from a specific target. - @param device A pointer to a valid IOSCSIParallelInterfaceDevice. - @param key A pointer to a valid OSString object which represents the key. - */ - - void RemoveTargetProperty ( SCSIDeviceIdentifier targetID, - const char * key ); - - // ---- Methods for HBA specifics. ---- - - /*! - @function SetHBAProperty - @abstract Accessor for setting a property for this object. - @param key A pointer to a valid OSString object which represents the key. - A list of valid keys includes: - kIOPropertyVendorNameKey, - kIOPropertyProductNameKey, - kIOPropertyProductRevisionLevelKey, - kIOPropertyPortDescriptionKey, - kIOPropertyPortSpeedKey, - kIOPropertyPortTopologyKey, - kIOPropertySCSIParallelSignalingTypeKey, - kIOPropertyFibreChannelCableDescriptionKey, - kIOPropertyFibreChannelNodeWorldWideNameKey, - kIOPropertyFibreChannelPortWorldWideNameKey, - kIOPropertyFibreChannelAddressIdentifierKey, and - kIOPropertyFibreChannelALPAKey. - NB: These keys and their values are described in <IOKit/storage/IOStorageDeviceCharacteristics.h> - and <IOKit/storage/IOStorageProtocolCharacteristics.h> - @param value Pointer to an OSObject (one of type OSData, OSString, etc.) - which represents the value for the property. The value must be of the proper type, - and/or size for the specified key. - @result returns true if identifier was properly set, otherwise false. - */ - - bool SetHBAProperty ( const char * key, - OSObject * value ); - - /*! - @function RemoveHBAProperty - @abstract Accessor for removing a property for this object. - @param key A pointer to a valid OSString object which represents the key. - See the SetHBAProperty() method for a list of valid keys. - */ - - void RemoveHBAProperty ( const char * key ); - - // These methods will not be called before the InitializeController() call, - // and will not be called after the TerminateController() call. But in the - // interval between those calls, they shall report the correct requested - // information. They are implemented as seperate pure virtual methods - // instead of a selector driven method because the HBA child class is - // required to report this information. - - /*! - @function ReportInitiatorIdentifier - @abstract Get the SCSI Device Identifier for the HBA. - @discussion This method will be called to determine the SCSI Device - Identifier that the Initiator has assigned for this HBA. - @result returns SCSIInitiatorIdentifier. - */ - - virtual SCSIInitiatorIdentifier ReportInitiatorIdentifier ( void ) = 0; - - /*! - @function ReportHighestSupportedDeviceID - @abstract Get the highest supported SCSI Device Identifier. - @discussion This method will be called to determine the value of the - highest SCSI Device Identifier supported by the HBA. This value will be - used to determine the last ID to process. - @result returns highest SCSIDeviceIdentifier - */ - - virtual SCSIDeviceIdentifier ReportHighestSupportedDeviceID ( void ) = 0; - - /*! - @function ReportMaximumTaskCount - @abstract Report Maximum Task Count - @discussion This method will be called to retrieve the maximum number of - outstanding tasks the HBA can process. This number must be greater than - zero or the controller driver will fail to match and load. - @result returns maximum (non-zero) task count. - */ - - virtual UInt32 ReportMaximumTaskCount ( void ) = 0; - - /*! - @function ReportHBASpecificTaskDataSize - @abstract Determine memory needed for HBA Task specific use. - @discussion This method is used to retrieve the amount of memory that - will be allocated in the SCSI Parallel Task for HBA specific use. - @result returns memory required in bytes - */ - - virtual UInt32 ReportHBASpecificTaskDataSize ( void ) = 0; - - /*! - @function ReportHBASpecificDeviceDataSize - @abstract Determine memory needed for HBA Device specific use. - @discussion This method is used to retrieve the amount of memory that - will be allocated in the SCSI Parallel Device for HBA specific use. - @result returns memory required in bytes - */ - - virtual UInt32 ReportHBASpecificDeviceDataSize ( void ) = 0; - - /*! - @function DoesHBAPerformDeviceManagement - @abstract Determine if HBA will manage devices. - @discussion This method is used to determine if the HBA will manage - target device creation and destruction. - @result return true means objects for target devices will only be - created when the child class calls the CreateTargetForID method. - */ - - virtual bool DoesHBAPerformDeviceManagement ( void ) = 0; - - // ---- Initialize and Terminate methods for the subclass to implement ----- - // The subclass shall not override the IOKit init and terminate methods, - // but shall instead rely on these methods for initialization and - // termination. - - // This is done to allow for this superclass to manage all IOKit specifics - // and to require only a Family specific API to be implemented by the - // subclass drivers. - - /*! - @function InitializeController - @abstract Called to initialize the controller - @discussion It is guaranteed that the InitializeController() will only be - called once per instantiation. The InitializeController() methods allows - the subclass driver to do all the necessary initialization required by - the hardware before it is able to accept requests to execute. All - necessary allocation of resources should be made during this method - call. This is the first method that will be called in the subclass. - @result return true means that initialization was successful. - */ - - virtual bool InitializeController ( void ) = 0; - - /*! - @function TerminateController - @abstract Called to terminate the controller - @discussion It is guaranteed that the TerminateController() will only be - called once and only after the InitializeController() method and only if - true was returned in response to the InitializeController() method. - The TerminateController() method allows the subclass to release all - resources that were acquired for operation of the hardware and shutdown - all hardware services. - This is the last method of the subclass that will be called before the - class is destroyed. - */ - - virtual void TerminateController ( void ) = 0; - - // ---- Start and Stop methods for the subclass ---- - - /*! - @function StartController - @abstract Called to start the controller - @discussion The StartController will always be called before any - requests are sent to the driver for execution. This method is called - after an initialize to start the services provided by the specific HBA - driver or called after a StopController call to restart those services. - After this call completes, all services provided by the HBA driver are - available to the client. - @result return true means that start was successful. - */ - - virtual bool StartController ( void ) = 0; - - /*! - @function StopController - @abstract Called to stop the controller - @discussion The StopController method will be called any time that the - system wants the card to stop accepting requests. ( See StartController - discussion ). The subclass should disable the hardware interrupt for - the particular controller (if possible) in this method. - */ - - virtual void StopController ( void ) = 0; - - // ---- Suspend and Resume Methods for the subclass ---- - - /*! - @function SuspendServices - @abstract Called to suspend controller services - @discussion Method will be called when the system wants to suspend the - services that are provided by the HBA driver. This call is not a reset - and the driver shall retain all state data between this so that if a - ResumeServices call is received, the driver can continue providing - services without a visible difference to the client. The driver may - receive multiple SuspendServices calls without receiving a - ResumeServices call and should ignore any after the first until a - ResumeServices call is received. - */ - - virtual void SuspendServices ( void ); - - /*! - @function ResumeServices - @abstract Called to resume controller services - @discussion Method that will be called to resume services - provided by the driver. ( See SuspendServices discussion ) - */ - - virtual void ResumeServices ( void ); - - /*! - @function HandleInterruptRequest - @abstract Handle Interrupt Request - @discussion The HandleInterruptRequest is used to notify an HBA - specific subclass that an interrupt request needs to be serviced. It is - called on the workloop (it holds the gate) at secondary interrupt level. - */ - - virtual void HandleInterruptRequest ( void ) = 0; - - /*! - @function EnableInterrupt - @abstract Enable Interrupt - @discussion Method that the HBA child class can call to enable - the associated IOInterruptEventSource. - */ - - void EnableInterrupt ( void ); - - /*! - @function DisableInterrupt - @abstract Disable Interrupt - @discussion Method that the HBA child class can call to disable - the associated IOInterruptEventSource. - */ - - void DisableInterrupt ( void ); - - /*! - @function SignalInterrupt - @abstract Signals that an interrupt has occurred. - @discussion Subclasses of IOSCSIParallelInterfaceController - should call this method in order to get the secondary interrupt - thread scheduled if and only if they will be returning false from - their overriden FilterInterruptRequest() method. See the - discussion for the FilterInterruptRequest() method for more - details. - - NOTE: This method should only be called from within the - FilterInterruptRequest() method and at no other time. - - Available in 10.3.3 or later. - - */ - - void SignalInterrupt ( void ); - - /*! - @function ProcessParallelTask - @abstract Called by client to process a parallel task. - @discussion This method is called to process a parallel task (i.e. put - the command on the bus). The HBA specific sublcass must implement this - method. - @param parallelRequest A valid SCSIParallelTaskIdentifier. - @result serviceResponse (see <IOKit/scsi/SCSITask.h>) - */ - - virtual SCSIServiceResponse ProcessParallelTask ( - SCSIParallelTaskIdentifier parallelRequest ) = 0; - - /*! - @function CompleteParallelTask - @abstract Parallel Task Completion - @discussion The HBA specific sublcass inherits the CompleteParallelTask() - method which shall be called when the HBA has completed the processing - of a parallel task. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param completionStatus The status of the SCSI bus. - @param serviceResponse (see <IOKit/scsi/SCSITask.h>) - */ - - void CompleteParallelTask ( - SCSIParallelTaskIdentifier parallelRequest, - SCSITaskStatus completionStatus, - SCSIServiceResponse serviceResponse ); - - - // Completion routines for the SCSI Task Management functions as described - // in the SCSI ArchitectureModel - 2 (SAM-2) specification. Each of these - // correspond to a client request for the specific Task Management functions. - // If the Controller Child Class completed the request by returning a - // SCSIServiceResponse of anything other than kSCSIServiceResponse_Request_In_Process, - // then the controller class does not need to call the completion member routine. - // If the controller did not complete the request immediately, then it will - // need to call the appropriate completion member routine listed here. - void CompleteAbortTask ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL, - SCSITaggedTaskIdentifier theQ, - SCSIServiceResponse serviceResponse ); - - void CompleteAbortTaskSet ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL, - SCSIServiceResponse serviceResponse ); - - void CompleteClearACA ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL, - SCSIServiceResponse serviceResponse ); - - void CompleteClearTaskSet ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL, - SCSIServiceResponse serviceResponse ); - - void CompleteLogicalUnitReset ( - SCSITargetIdentifier theT, - SCSILogicalUnitNumber theL, - SCSIServiceResponse serviceResponse ); - - void CompleteTargetReset ( - SCSITargetIdentifier theT, - SCSIServiceResponse serviceResponse ); - - /*! - @function NotifyClientsOfBusReset - @abstract Method called to notify clients that a bus reset has occurred. - @discussion This method is used by the HBA child class to inform the - parent class and any clients that a bus reset has occurred. - */ - - void NotifyClientsOfBusReset ( void ); - - /*! - @function NotifyClientsOfPortStatusChange - @abstract Method called to notify clients of port status change events. - @discussion This method is used by the HBA child class to inform the - parent class and any clients that a port has changed status. - */ - - void NotifyClientsOfPortStatusChange ( SCSIPortStatus newStatus ); - - /*! - @function GetSCSIDomainIdentifier - @abstract Accessor method to get the SCSI Domain Identifier. - @discussion Accessor method to get the SCSI Domain Identifier. - @result returns SCSI Domain Identifier. - */ - - SInt32 GetSCSIDomainIdentifier ( void ); - - /*! - @function GetProvider - @abstract Accessor method to get the IOService which is the controller's - provider. - @discussion Accessor method to get the IOService which is the - controller's provider. - @result returns pointer to IOService. - */ - - IOService * GetProvider ( void ); - - /*! - @function GetWorkLoop - @abstract Accessor method to get the IOWorkLoop associated with this - HBA. - @discussion Accessor method to get the IOWorkLoop associated with this - HBA. - @result returns pointer to IOWorkLoop. - */ - - IOWorkLoop * GetWorkLoop ( void ) const; - - /*! - @function GetCommandGate - @abstract Accessor to get an IOCommandGate associated with the workloop. - @discussion Accessor to get an IOCommandGate associated with the - workloop. - @result returns pointer to IOCommandGate. - */ - - IOCommandGate * GetCommandGate ( void ); - - // ---- SCSI Parallel Task Object Accessors ---- - - /*! - @function GetSCSITaskIdentifier - @abstract Method to retrieve a SCSITaskIdentifier from a valid - SCSIParallelTaskIdentifier. - @discussion Method to retrieve a SCSITaskIdentifier from a valid - SCSIParallelTaskIdentifier. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns SCSITaskIdentifier that represents the original request - from the SCSI Application Layer client. - */ - - SCSITaskIdentifier GetSCSITaskIdentifier ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetTargetIdentifier - @abstract Method to get the SCSITargetIdentifier associated with a - request. - @discussion Method to get the SCSITargetIdentifier associated with a - request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns SCSITargetIdentifier - */ - - SCSITargetIdentifier GetTargetIdentifier ( - SCSIParallelTaskIdentifier parallelTask ); - - // ---- Methods for Accessing data in the client's SCSI Task Object ---- - // Method to retrieve the LUN that identifies the Logical Unit whose Task - // Set to which this task is to be added. - - /*! - @function GetLogicalUnitNumber - @abstract Method to get the logical unit number associated with a - request. - @discussion Method to get the logical unit number associated with a - request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns a valid 64-bit logical unit number. - */ - - SCSILogicalUnitNumber GetLogicalUnitNumber ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetTaggedTaskIdentifier - @abstract Method to retrieve the SCSI Tagged Task Identifier of the - task. If the returned value is equal to kSCSIUntaggedTaskIdentifier, - then this task is untagged. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result an SCSITaskAttribute value. - */ - - SCSITaggedTaskIdentifier GetTaggedTaskIdentifier ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetTaskAttribute - @abstract Method to retrieve the SCSI Task Attribute of the task - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result an SCSITaskAttribute value. - */ - - SCSITaskAttribute GetTaskAttribute ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetCommandDescriptorBlockSize - @abstract Method to retrieve the size of the SCSI Command Descriptor - Block (CDB). - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns the size of the SCSI Command Descriptor Block in bytes. - */ - - UInt8 GetCommandDescriptorBlockSize ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetCommandDescriptorBlock - @abstract Method to retrieve the SCSI Command Descriptor Block (CDB). - @discussion This will always return a 16 Byte CDB. If the Protocol Layer - driver does not support 16 Byte CDBs, it will have to create a local - SCSICommandDescriptorBlock variable to get the CDB data and then - transfer the needed bytes from there. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param cdbData is a SCSICommandDescriptorBlock pointer to 16 byte CDB - @result returns true if data was copied to cdbData pointer - */ - - bool GetCommandDescriptorBlock ( - SCSIParallelTaskIdentifier parallelTask, - SCSICommandDescriptorBlock * cdbData ); - - /*! - @function GetDataTransferDirection - @abstract Retrieves the data transfer direction for any data associated - with the request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result One of the valid data transfer directions described in - <IOKit/scsi/SCSITask.h> - */ - - UInt8 GetDataTransferDirection ( SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetRequestedDataTransferCount - @abstract Retrieves the requested data transfer count for any data - associated with the request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result The requested data transfer count in bytes. - */ - - UInt64 GetRequestedDataTransferCount ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetRealizedDataTransferCount - @abstract Retrieves the realized data transfer count for any data - associated with the request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result The realized data transfer count in bytes. - */ - - UInt64 GetRealizedDataTransferCount ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function SetRealizedDataTransferCount - @abstract Sets the realized data transfer count in bytes. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param realizedTransferCountInBytes is the number of bytes actually - transferred. - @result true means the data transfer count was successfully set. - */ - - bool SetRealizedDataTransferCount ( - SCSIParallelTaskIdentifier parallelTask, - UInt64 realizedTransferCountInBytes ); - - /*! - @function IncrementRealizedDataTransferCount - @abstract Increments the realized data transfer count. This method is - helpful for when the HBA has to do multiple passes of DMA because there - are more scatter-gather elements than it can process in one pass. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param realizedTransferCountInBytes is the number of bytes to add to the - realized data count for the task. - */ - - void IncrementRealizedDataTransferCount ( - SCSIParallelTaskIdentifier parallelTask, - UInt64 realizedTransferCountInBytes ); - - /*! - @function GetDataBuffer - @abstract Method to retrieve client buffer from the request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns pointer to an IOMemoryDescriptor which represents the - buffer. - */ - - IOMemoryDescriptor * GetDataBuffer ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetDataBufferOffset - @abstract Method to retrieve offset into client buffer at which to start - processing. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns offset in bytes - */ - - UInt64 GetDataBufferOffset ( SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetDMACommand - @abstract Method to retrieve a pointer to an IODMACommand from the request. - @discussion For devices utilizing DMA, the IODMACommand object should be - obtained via GetDMACommand(). The subclass is responsible for calling prepare() - on the IODMACommand object using the proper offset obtained via GetDataBufferOffset() - and correct size obtained via GetRequestedDataTransferCount(). The subclass - is further responsible for calling complete() on the IODMACommand object once - all DMA operations have finished. - NB: Subclasses should not call IODMACommand::setMemoryDescriptor(). - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns pointer to an IODMACommand which is used in conjunction - with the task. - */ - - IODMACommand * GetDMACommand ( - SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetTimeoutDuration - @abstract Method to retrieve the timeout duration in milliseconds for a - request. - @discussion Method to retrieve the timeout duration in milliseconds for - a request. A value of zero represents an infinite timeout, or on - hardware where infinite timeouts are not possible, substitute the - longest timeout possible. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns timeout duration in milliseconds - */ - - UInt32 GetTimeoutDuration ( SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function SetAutoSenseData - @abstract Method to set the auto sense data buffer associated with a - request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param newSensedata pointer to auto sense data buffer - @result returns true if data in newSenseData was succesfully into the - task object - */ - - bool SetAutoSenseData ( - SCSIParallelTaskIdentifier parallelTask, - SCSI_Sense_Data * newSenseData, - UInt8 senseDataSize ); - - /*! - @function GetAutoSenseData - @abstract Method to retrieve auto sense data buffer associated with a - request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param receivingBuffer pointer to auto sense data buffer - @result returns true if successfully copied data into receivingBuffer - */ - - bool GetAutoSenseData ( - SCSIParallelTaskIdentifier parallelTask, - SCSI_Sense_Data * receivingBuffer, - UInt8 senseDataSize ); - - /*! - @function GetAutoSenseDataSize - @abstract Method to retrieve auto sense data buffer size associated with a - request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns Size of auto sense data buffer. - */ - - UInt8 GetAutoSenseDataSize ( - SCSIParallelTaskIdentifier parallelTask ); - - - /*! - @function GetSCSIParallelFeatureNegotiation - @abstract Method to retrieve the requested value for negotiation of the. - @discussion Query as to whether the SCSI Parallel Device object has - negotiated wide data transfers. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result A valid SCSIParallelFeatureControl. - */ - - SCSIParallelFeatureRequest GetSCSIParallelFeatureNegotiation ( - SCSIParallelTaskIdentifier parallelTask, - SCSIParallelFeature requestedFeature ); - - /*! - @function GetSCSIParallelFeatureNegotiationCount - @abstract Method to retrieve the number of requested negotiations. - @discussion Query as to the number of SCSI Parallel Features that are - requested to either be negotitated or cleared. These are all features - that are set to either kSCSIParallelFeature_AttemptNegotiation or - kSCSIParallelFeature_ClearNegotiation. If the return value is zero, - then all features are set to kSCSIParallelFeature_NoNegotiation - and all feature negotiations are to remain as they currently exist. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result an unsigned integer up to 64 bits in size. - */ - - UInt64 GetSCSIParallelFeatureNegotiationCount ( - SCSIParallelTaskIdentifier parallelTask); - - /*! - @function SetSCSIParallelFeatureNegotiationResult - @abstract Method to set the wide data transfer negotiation result. - @discussion Method to set the wide data transfer negotiation result. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param requestedFeature The SCSIParallelFeature that the has been set to - newResult. - @param newResult A valid SCSIParallelFeatureResult value. - */ - - void SetSCSIParallelFeatureNegotiationResult ( - SCSIParallelTaskIdentifier parallelTask, - SCSIParallelFeature requestedFeature, - SCSIParallelFeatureResult newResult ); - - /*! - @function GetSCSIParallelFeatureNegotiationResult - @abstract Method to retrieve the result of any wide transfer - negotiations. - @discussion Query as to whether the SCSI Parallel Controller object has - negotiated wide data transfers. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result A valid SCSIParallelFeatureResult. - */ - - SCSIParallelFeatureResult GetSCSIParallelFeatureNegotiationResult ( - SCSIParallelTaskIdentifier parallelTask, - SCSIParallelFeature requestedFeature ); - - /*! - @function GetSCSIParallelFeatureNegotiationResultCount - @abstract Method to retrieve the number of changed negotiations. - @discussion Query as to the number of SCSI Parallel Features that have - been changed to either negotitated or cleared. These are all features - that are set to either kSCSIParallelFeature_NegotitiationCleared or - kSCSIParallelFeature_NegotitiationSuccess. If the return value is zero, - then all features are set to kSCSIParallelFeature_NegotitiationUnchanged. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result an unsigned integer up to 64 bits in size. - */ - - UInt64 GetSCSIParallelFeatureNegotiationResultCount ( - SCSIParallelTaskIdentifier parallelTask); - - // Controller Task Identifier related member routines - - /*! - @function SetControllerTaskIdentifier - @abstract Method to set the Controller Task Identifier. - @discussion This method allows the Controller Child Class - driver to set a unique identifier to associate with the specified - SCSI Parallel Task. This identifier is designed to be used by - controllers that do not have access to the LUN and Tag information - when notified by the HBA that a request has completed. - If the kSCSIParallelTaskControllerIDQueueHead is used, this - member routine will return the first Task on the queue. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param newIdentifier unsigned 64 bit integer token. - @result none - */ - - void SetControllerTaskIdentifier ( - SCSIParallelTaskIdentifier parallelTask, - UInt64 newIdentifier ); - - UInt64 GetControllerTaskIdentifier ( - SCSIParallelTaskIdentifier parallelTask); - - - // The HBA Data related fields - - /*! - @function GetHBADataSize - @abstract Method to retrieve the HBA Data Size in bytes. - @discussion Method to retrieve the HBA Data Size in bytes. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns HBA Data size in bytes. - */ - - UInt32 GetHBADataSize ( SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetHBADataPointer - @abstract Method to retrieve the HBA Data pointer. - @discussion Method to retrieve the HBA Data pointer. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns pointer to buffer for HBA specific data, NULL if - none found or GetHBADataSize() returns zero. - */ - - void * GetHBADataPointer ( SCSIParallelTaskIdentifier parallelTask ); - - /*! - @function GetHBADataDescriptor - @abstract Method to retrieve the IOMemoryDescriptor associated with - the HBA Data. - @discussion Method to retrieve the IOMemoryDescriptor associated with - the HBA Data. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @result returns pointer to an IOMemoryDescriptor that wraps the HBA - specific data buffer, NULL if none found or GetHBADataSize() returns zero. - */ - - IOMemoryDescriptor * GetHBADataDescriptor ( - SCSIParallelTaskIdentifier parallelTask ); - - // ---- SCSI Parallel Device Object Accessors ---- - - // The HBA Data related fields - - /*! - @function GetHBATargetDataSize - @abstract Method to retrieve the HBA Data Size in bytes. - @discussion Method to retrieve the HBA Data Size in bytes. - @param targetDevice A valid SCSITargetIdentifier. - @result returns HBA Data size in bytes. - */ - - UInt32 GetHBATargetDataSize ( SCSITargetIdentifier targetID ); - - /*! - @function GetHBATargetDataPointer - @abstract Method to retrieve the HBA Data pointer. - @discussion Method to retrieve the HBA Data pointer. - @param targetDevice A valid SCSITargetIdentifier. - @result returns pointer to buffer for HBA specific data, NULL if - none found or GetHBADataSize is zero. - */ - - void * GetHBATargetDataPointer ( SCSITargetIdentifier targetID ); - - -#if 0 -#pragma mark - -#pragma mark Additional Child Class APIs -#endif - - - // ---- Timeout Related Methods ---- - - /*! - @function SetTimeoutForTask - @abstract Method to set the timeout duration in milliseconds for a - request. - @discussion Method to set the timeout duration in milliseconds for a - request. - @param parallelTask A valid SCSIParallelTaskIdentifier. - @param timeoutOverride A timeout value in milliseconds in case the - HBA driver wishes to override the default value provided in the - parallelTask. - */ - - void SetTimeoutForTask ( SCSIParallelTaskIdentifier parallelTask, - UInt32 timeoutOverride = 0 ); - - /*! - @function HandleTimeout - @abstract Method to handle command timeouts. - @discussion Method to handle command timeouts. This should - be overridden by the child class in order to clean up HBA - specific structures after a timeout has occurred. This method - is called on the workloop (it holds the gate). - @param parallelRequest A valid SCSIParallelTaskIdentifier. - */ - - OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 9 ); - - virtual void HandleTimeout ( - SCSIParallelTaskIdentifier parallelRequest ); - - - // ---- Filter Interrupt ---- - - /*! - @function FilterInterruptRequest - @abstract Filter method called at primary interrupt time. - @discussion Filter method called at primary interrupt time. - This should only be overridden by the child class in order - to determine if an interrupt occurred for this controller instance. - Since all work occurs at primary interrupt time, this routine - should be quick and efficient and defer as much processing as - possible to the HandleInterruptRequest() method. - - NOTE: Unlike the HandleInterruptRequest() and HandleTimeout() - methods, FilterInterruptRequest() is NOT called with the - workloop lock held. - - If the value returned by FilterInterruptRequest() is true, the - secondary interrupt thread will be scheduled and the hardware - interrupt line will be disabled. If the controller instance shares - that interrupt line with other devices, it can cause large - interrupt latencies. If the controller instance can disable the - interrupt in the chip itself, the following can be done to reduce - interrupt latencies: - - - Interrupt occurs - - FilterInterruptRequest() method is called. - - If the interrupt is not for this controller, return false - immediately. - - If the interrupt is for this controller, and the controller - can disable interrupts for this chip, the controller should - disable the interrupts for this chip, call SignalInterrupt(), - and return false. This causes the secondary interrupt thread - to get scheduled, yet does not disable the interrupt line for - all devices tied to that interrupt. This effectively allows - other devices to process their interrrupts, thus reducing - interrupt latency for those devices. - - HandleInterruptRequest() method is called. - - Controller processes interrupt and completes I/O requests. - - Controller re-enables interrupts for the device. - - NOTE: If you use this approach, the interrupting condition MUST be - cleared from the hardware, otherwise an infinite process interrupt - loop will occur. - - If the controller cannot disable interrupts on the chip, it should - simply return true if an interrupt has occurred for its device. - - @result True if the hardware interrupt line should be disabled, - otherwise false. - */ - - OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 10 ); - - virtual bool FilterInterruptRequest ( void ); - - /*! - @function InitializeDMASpecification - @abstract Called to initialize an IODMACommand with a DMA specification. - @param command A pointer to a valid IODMACommand object. Subclasses - should override this method and call IODMACommand::initWithSpecification() - supplying the proper arguments to that method based on the DMA strategy. - @result boolean value indicating success or failure. - */ - OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 11 ); - - virtual bool InitializeDMASpecification ( IODMACommand * command ); - - /*! - @function CreateDeviceInterrupt - @abstract Called to create an IOInterruptEventSource for the device. Subclasses - may wish to use a different interrupt index than 0 (e.g. for using PCI Message - Signaled Interrupts) or might not need an interrupt at all (virtual HBA). - @param action A pointer to the action routine that should be passed to either - IOInterruptEventSource::interruptEventSource() or - IOFilterInterruptEventSource::filterInterruptEventSource as the method to call - when an interrupt occurs for the device (sometimes called the "deferred procedure call" - or the "secondary context method". By passing this routine along, it will - properly wire up the HandleInterruptRequest() method you should override to handle - interrupts. - @param filter A pointer to the filter routine that should be passed to - IOFilterInterruptEventSource::filterInterruptEventSource as the method to call - at primary interrupt time when an interrupt occurs for the device. - By passing this routine along, it will properly wire up the - FilterInterruptRequest() method you may override to handle primary interrupts. - @result IOInterruptEventSource. May return NULL if and only if there is no - hardware interrupt associated with this device. - */ - OSMetaClassDeclareReservedUsed ( IOSCSIParallelInterfaceController, 12 ); - - virtual IOInterruptEventSource * CreateDeviceInterrupt ( - IOInterruptEventSource::Action action, - IOFilterInterruptEventSource::Filter filter, - IOService * provider ); - - // Padding for the Child Class API - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 13 ); - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 14 ); - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 15 ); - OSMetaClassDeclareReservedUnused ( IOSCSIParallelInterfaceController, 16 ); - - -#if 0 -#pragma mark - -#pragma mark Internal Use Only -#endif - -private: - - // binary compatibility instance variable expansion - struct ExpansionData { }; - ExpansionData * fIOSCSIParallelInterfaceControllerExpansionData; - - IOService * fProvider; - OSSet * fClients; - - static SInt32 fSCSIParallelDomainCount; - SInt32 fSCSIDomainIdentifier; - - // The HBA attributes - SCSIInitiatorIdentifier fInitiatorIdentifier; - - // The maximum SCSI Device Identifier support by the HBA - // This is retreived from the child class via the - SCSIDeviceIdentifier fHighestSupportedDeviceID; - - // The total number of tasks that the HBA can proccess at a time. - // This is retrieved from the child class via ReportMaximumTaskCount - UInt32 fSupportedTaskCount; - - // The Number of requests that are currently outstanding for the current - // instantiation. - UInt16 fOutstandingRequests; - - // The member variable to indicate if the current instantiation has been - // succesfully intialized. - bool fHBAHasBeenInitialized; - - // The member variable to indicate if the current instantiation is running. - // A true means that the last or only Start call made was successful. A - // false value means that either a successful Start has not been made or a - // Stop call has been made. - bool fHBACanAcceptClientRequests; - - // The pool for the available SCSI Parallel Task objects - IOCommandPool * fParallelTaskPool; - - // WorkLoop variables - IOWorkLoop * fWorkLoop; - IOTimerEventSource * fTimerEvent; - IOInterruptEventSource * fDispatchEvent; - - IOCommandGate * fControllerGate; - - bool AllocateSCSIParallelTasks ( void ); - void DeallocateSCSIParallelTasks ( void ); - - IOWorkLoop * getWorkLoop ( void ) const; - bool CreateWorkLoop ( IOService * provider ); - void ReleaseWorkLoop ( void ); - - // SCSI Parallel Device List - // The SCSI Parallel Device List will consist of 16 elements to represent - // identifiers that end in 0h through Fh. Each array element will point - // to a device object that represents the beginning of a linked list of - // device objects. By using an array of linked lists, the traversal time - // to find an object on a bus that supports a large number of devices, such - // as Fibre Channel, will be significantly lower than having to walk a list - // that is comprised of all devices on the bus. For parallel wide and - // narrow busses, which support 16 and 8 devices respectively, this will act - // like a simple array of device objects. - enum - { - kSCSIParallelDeviceListArrayCount = 16, - kSCSIParallelDeviceListIndexMask = 0x0F - }; - - IOSimpleLock * fDeviceLock; - IOSCSIParallelInterfaceDevice * - fParallelDeviceList[kSCSIParallelDeviceListArrayCount]; - - void InitializeDeviceList ( void ); - void AddDeviceToTargetList ( - IOSCSIParallelInterfaceDevice * newDevice ); - void RemoveDeviceFromTargetList ( - IOSCSIParallelInterfaceDevice * victimDevice ); - - // The Interrupt Service Routine for the controller. - static void ServiceInterrupt ( - OSObject * theObject, - IOInterruptEventSource * theSource, - int count ); - - static void TimeoutOccurred ( OSObject * owner, IOTimerEventSource * sender ); - - static bool FilterInterrupt ( - OSObject * theObject, - IOFilterInterruptEventSource * theSource ); - - // IOService support methods - // These shall not be overridden by the HBA child classes. - bool start ( IOService * provider ); - void stop ( IOService * provider ); - - -protected: - - // These may be overriden by the HBA child classes if necessary, but should - // call the superclass implementation. - virtual bool handleOpen ( - IOService * client, - IOOptionBits options, - void * arg ); - - virtual void handleClose ( - IOService * client, - IOOptionBits options ); - - virtual bool handleIsOpen ( - const IOService * client ) const; - - virtual bool willTerminate ( IOService * provider, IOOptionBits options ); - virtual bool didTerminate ( IOService * provider, IOOptionBits options, bool * defer ); - -}; - - -#endif /* __IOKIT_IO_SCSI_PARALLEL_INTERFACE_CONTROLLER_H__ */ \ No newline at end of file diff --git a/i386/include/IOKit/serial/.svn/all-wcprops b/i386/include/IOKit/serial/.svn/all-wcprops deleted file mode 100644 index 26769b8..0000000 --- a/i386/include/IOKit/serial/.svn/all-wcprops +++ /dev/null @@ -1,35 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 59 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/serial -END -IORS232SerialStreamSync.h -K 25 -svn:wc:ra_dav:version-url -V 85 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/serial/IORS232SerialStreamSync.h -END -IOSerialDriverSync.h -K 25 -svn:wc:ra_dav:version-url -V 80 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/serial/IOSerialDriverSync.h -END -IOSerialStreamSync.h -K 25 -svn:wc:ra_dav:version-url -V 80 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/serial/IOSerialStreamSync.h -END -IOModemSerialStreamSync.h -K 25 -svn:wc:ra_dav:version-url -V 85 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/serial/IOModemSerialStreamSync.h -END -IOSerialKeys.h -K 25 -svn:wc:ra_dav:version-url -V 74 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/serial/IOSerialKeys.h -END diff --git a/i386/include/IOKit/serial/.svn/entries b/i386/include/IOKit/serial/.svn/entries deleted file mode 100644 index 20342de..0000000 --- a/i386/include/IOKit/serial/.svn/entries +++ /dev/null @@ -1,198 +0,0 @@ -10 - -dir -2117 -http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/serial -http://forge.voodooprojects.org/svn/chameleon - - - -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - -b5af796a-00a8-11df-919b-ffff7a100b7d - -IORS232SerialStreamSync.h -file - - - - -2012-10-03T17:50:20.000000Z -0c2a5b36af70b8a5fc48f9f984e42b8f -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -7628 - -IOSerialDriverSync.h -file - - - - -2012-10-03T17:50:20.000000Z -1de76939037928e06b59a471b77174ea -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -3579 - -IOSerialStreamSync.h -file - - - - -2012-10-03T17:50:20.000000Z -91e7b9256b39f31244ba4cfa14404a6c -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -11947 - -IOModemSerialStreamSync.h -file - - - - -2012-10-03T17:50:20.000000Z -9ef1d5116b75c1c73a3ccb151f3eec13 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -1425 - -IOSerialKeys.h -file - - - - -2012-10-03T17:50:20.000000Z -85af242f0159d91cac30a3e340bb7ffb -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -2856 - diff --git a/i386/include/IOKit/serial/.svn/text-base/IOModemSerialStreamSync.h.svn-base b/i386/include/IOKit/serial/.svn/text-base/IOModemSerialStreamSync.h.svn-base deleted file mode 100644 index be75287..0000000 --- a/i386/include/IOKit/serial/.svn/text-base/IOModemSerialStreamSync.h.svn-base +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * - * IOModemSerialStreamSync.h - * This file contains Modem specific extensions to the IOSerialStreamSync class. - * - * 2000-10-21 gvdl Initial real change to IOKit serial family. - * - */ - -#ifndef _SERIAL_IOMODEMSERIALSTREAMSYNC_H -#define _SERIAL_IOMODEMSERIALSTREAMSYNC_H - -#include <IOKit/serial/IOSerialStreamSync.h> - -class IOModemSerialStreamSync : public IOSerialStreamSync -{ - OSDeclareDefaultStructors(IOModemSerialStreamSync) -}; - -#endif /* !_SERIAL_IOMODEMSERIALSTREAMSYNC_H */ - diff --git a/i386/include/IOKit/serial/.svn/text-base/IORS232SerialStreamSync.h.svn-base b/i386/include/IOKit/serial/.svn/text-base/IORS232SerialStreamSync.h.svn-base deleted file mode 100644 index 15d520a..0000000 --- a/i386/include/IOKit/serial/.svn/text-base/IORS232SerialStreamSync.h.svn-base +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/* - * IORS232SerialStreamSync.h - * This file contains RS232 specific extensions to the IOSerialStreamSync class. - * - * 2000-10-21 gvdl Initial real change to IOKit serial family. - */ - -#ifndef _SERIAL_IORS232SERIALSTREAMSYNC_H -#define _SERIAL_IORS232SERIALSTREAMSYNC_H - -#include <sys/ioctl.h> -#include <IOKit/serial/IOSerialStreamSync.h> - -/* - * Extra events for RS232 based PortDevices - */ - -#define PD_RS232_E_RX_LINE_BREAK (PD_DATA_VOID|PD_OP(63)) // line break was received -#define PD_RS232_E_LINE_BREAK (PD_DATA_BYTE|PD_OP(62)) // BOOL set/clear line break - -#define PD_RS232_E_RX_STOP_BITS (PD_DATA_LONG|PD_OP(61)) // half stop bits -#define PD_RS232_E_STOP_BITS (PD_DATA_LONG|PD_OP(60)) // half stop bits - -#define PD_RS232_E_XON_BYTE (PD_DATA_BYTE|PD_OP(59)) // The XON char for TX&RX -#define PD_RS232_E_XOFF_BYTE (PD_DATA_BYTE|PD_OP(58)) // The XOFF char for TX&RX - -#define PD_RS232_E_MIN_LATENCY (PD_DATA_BYTE|PD_OP(57)) // BOOL true if low latency req - -/* - * RS232 Parity stuff, used with the DATA_INTEGRITY event - */ -#define PD_RS232_PARITY_DEFAULT 0 // Valid only for RX, means follow TX -#define PD_RS232_PARITY_NONE 1 // No Parity bit inserted or expected -#define PD_RS232_PARITY_ODD 2 // Odd Parity bit inserted or expected -#define PD_RS232_PARITY_EVEN 3 // Even Parity bit inserted or expected -#define PD_RS232_PARITY_MARK 4 // Mark inserted or expected -#define PD_RS232_PARITY_SPACE 5 // Space inserted or expected -#define PD_RS232_PARITY_ANY 6 // Valid only for RX, means discard parity - -/* - * RS232 Flow Control specifiers, used with the FLOW_CONTROL event - * NB. The XON character is set with FLOW_START_DATA - * and the XOFF character is set with FLOW_STOP_DATA. - * - * Signal Name Direction - * RFR Ready For Receive Output generated by UART - * RTS Ready To Send (alias of RFR) Output generated by UART - * CTS Clear To Send Input sensed by UART - * DTR Data Terminal Ready Output generated by UART - * DSR Data Set Ready Input sensed by UART - * TXO XON/XOFF/XANY protocol Characters received by UART - * RXO XON/XOFF protocol Characters transmitted by UART - * DCD Data Carrier Detect Input sensed by UART - */ - -/* - * RS232 State Word extensions, based on <bsd/sys/ioctl.h> - * Also the 'current state' bits for enq/deq of Flow Control event - */ -#define PD_RS232_S_MASK 0x0000ffffUL -#define PD_RS232_S_SHIFT 0 // to align State bits for enq/deq event -#define PD_RS232_D_MASK 0xffff0000UL -#define PD_RS232_D_SHIFT 16 // to align Delta bits for enq/deq event -#define PD_RS232_A_MASK 0x0000ffffUL -#define PD_RS232_A_SHIFT 0 // to align Auto bits for req/exec event -#define PD_RS232_N_MASK 0xffff0000UL -#define PD_RS232_N_SHIFT 16 // to align Notify bits for req/exec event - -#define PD_RS232_S_LE TIOCM_LE // line enable -#define PD_RS232_S_DTR TIOCM_DTR // data terminal ready -#define PD_RS232_S_RTS TIOCM_RTS // request to send -#define PD_RS232_S_RFR PD_RS232_S_RTS // ready for receive -#define PD_RS232_S_TXO TIOCM_ST // TX XON/XOFF -#define PD_RS232_S_RXO TIOCM_SR // RX XON/XOFF -#define PD_RS232_S_CTS TIOCM_CTS // clear to send -#define PD_RS232_S_CAR TIOCM_CAR // carrier detect -#define PD_RS232_S_DCD PD_RS232_S_CAR -#define PD_RS232_S_RNG TIOCM_RNG // ring -#define PD_RS232_S_RI PD_RS232_S_RNG -#define PD_RS232_S_DSR TIOCM_DSR // data set ready - -#define PD_RS232_S_BRK 0x00000800UL // break active Extension to TIOCM -#define PD_RS232_S_LOOP 0x00001000UL // LOOP back Extension to TIOCM -#define PD_RS232_S_TXQ 0x00002000UL // User flowcontrol bit -#define PD_RS232_S_RXQ 0x00004000UL // User flowcontrol bit - -// The 'delta' bits for enq/deq of Flow Control event -#define PD_RS232_D_LE (PD_RS232_S_LE << PD_RS232_D_SHIFT) -#define PD_RS232_D_DTR (PD_RS232_S_DTR << PD_RS232_D_SHIFT) -#define PD_RS232_D_RTS (PD_RS232_S_RTS << PD_RS232_D_SHIFT) -#define PD_RS232_D_RFR (PD_RS232_S_RFR << PD_RS232_D_SHIFT) -#define PD_RS232_D_TXO (PD_RS232_S_TXO << PD_RS232_D_SHIFT) -#define PD_RS232_D_RXO (PD_RS232_S_RXO << PD_RS232_D_SHIFT) -#define PD_RS232_D_CTS (PD_RS232_S_CTS << PD_RS232_D_SHIFT) -#define PD_RS232_D_CAR (PD_RS232_S_CAR << PD_RS232_D_SHIFT) -#define PD_RS232_D_DCD (PD_RS232_S_DCD << PD_RS232_D_SHIFT) -#define PD_RS232_D_RNG (PD_RS232_S_RNG << PD_RS232_D_SHIFT) -#define PD_RS232_D_RI (PD_RS232_S_RI << PD_RS232_D_SHIFT) -#define PD_RS232_D_DSR (PD_RS232_S_DSR << PD_RS232_D_SHIFT) - -#define PD_RS232_D_BRK (PD_RS232_S_BRK << PD_RS232_D_SHIFT) -#define PD_RS232_D_LOOP (PD_RS232_S_LOOP << PD_RS232_D_SHIFT) -#define PD_RS232_D_TXQ (PD_RS232_S_TXQ << PD_RS232_D_SHIFT) -#define PD_RS232_D_RXQ (PD_RS232_S_RXQ << PD_RS232_D_SHIFT) - -// The 'auto' bits for exec/req of Flow Control event -#define PD_RS232_A_LE PD_RS232_S_LE -#define PD_RS232_A_DTR PD_RS232_S_DTR -#define PD_RS232_A_RTS PD_RS232_S_RTS -#define PD_RS232_A_RFR PD_RS232_S_RFR -#define PD_RS232_A_TXO PD_RS232_S_TXO -#define PD_RS232_A_RXO PD_RS232_S_RXO -#define PD_RS232_A_CTS PD_RS232_S_CTS -#define PD_RS232_A_CAR PD_RS232_S_CAR -#define PD_RS232_A_DCD PD_RS232_S_DCD -#define PD_RS232_A_RNG PD_RS232_S_RNG -#define PD_RS232_A_RI PD_RS232_S_RI -#define PD_RS232_A_DSR PD_RS232_S_DSR -#define PD_RS232_A_XANY 0x00000400 // changes _A_TXO from XON/XOFF to XANY/XOFF -#define PD_RS232_A_BRK PD_RS232_S_BRK -#define PD_RS232_A_LOOP PD_RS232_S_LOOP -#define PD_RS232_A_TXQ PD_RS232_S_TXQ -#define PD_RS232_A_RXQ PD_RS232_S_RXQ - -// The 'notify' bits for exec/req of Flow Control event -#define PD_RS232_N_LE (PD_RS232_S_LE << PD_RS232_N_SHIFT) -#define PD_RS232_N_DTR (PD_RS232_S_DTR << PD_RS232_N_SHIFT) -#define PD_RS232_N_RTS (PD_RS232_S_RTS << PD_RS232_N_SHIFT) -#define PD_RS232_N_RFR (PD_RS232_S_RFR << PD_RS232_N_SHIFT) -#define PD_RS232_N_TXO (PD_RS232_S_TXO << PD_RS232_N_SHIFT) -#define PD_RS232_N_RXO (PD_RS232_S_RXO << PD_RS232_N_SHIFT) -#define PD_RS232_N_CTS (PD_RS232_S_CTS << PD_RS232_N_SHIFT) -#define PD_RS232_N_CAR (PD_RS232_S_CAR << PD_RS232_N_SHIFT) -#define PD_RS232_N_DCD (PD_RS232_S_DCD << PD_RS232_N_SHIFT) -#define PD_RS232_N_RNG (PD_RS232_S_RNG << PD_RS232_N_SHIFT) -#define PD_RS232_N_RI (PD_RS232_S_RI << PD_RS232_N_SHIFT) -#define PD_RS232_N_DSR (PD_RS232_S_DSR << PD_RS232_N_SHIFT) - -#define PD_RS232_N_BRK (PD_RS232_S_BRK << PD_RS232_N_SHIFT) -#define PD_RS232_N_LOOP (PD_RS232_S_LOOP << PD_RS232_N_SHIFT) -#define PD_RS232_N_TXQ (PD_RS232_S_TXQ << PD_RS232_N_SHIFT) -#define PD_RS232_N_RXQ (PD_RS232_S_RXQ << PD_RS232_N_SHIFT) - -class IORS232SerialStreamSync : public IOSerialStreamSync -{ - OSDeclareDefaultStructors(IORS232SerialStreamSync) -}; - -#endif /* !_SERIAL_IORS232SERIALSTREAMSYNC_H */ - diff --git a/i386/include/IOKit/serial/.svn/text-base/IOSerialDriverSync.h.svn-base b/i386/include/IOKit/serial/.svn/text-base/IOSerialDriverSync.h.svn-base deleted file mode 100644 index 92f69df..0000000 --- a/i386/include/IOKit/serial/.svn/text-base/IOSerialDriverSync.h.svn-base +++ /dev/null @@ -1,91 +0,0 @@ -/* - *Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - *@APPLE_LICENSE_HEADER_START@ - * - *The contents of this file constitute Original Code as defined in and - *are subject to the Apple Public Source License Version 1.1 (the - *"License"). You may not use this file except in compliance with the - *License. Please obtain a copy of the License at - *http://www.apple.com/publicsource and read it before using this file. - * - *This Original Code and all software distributed under the License are - *distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - *EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - *INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - *License for the specific language governing rights and limitations - *under the License. - * - *@APPLE_LICENSE_HEADER_END@ - */ - -/* - * IOSerialDriverSync.h - * This file contains the abstract parent class for any IOSerialDriver - * interface, which is a generic serial interface, designed for devices - * that do character oriented transfers (async) rather than block or - * packet transfers. Most notably RS-232, Printer, Mouse, and Keyboard - * type devices. - * - * 2000-10-21 gvdl Initial real change to IOKit serial family. - */ - -#ifndef _SERIAL_IOSERIALDRIVERSYNC_H -#define _SERIAL_IOSERIALDRIVERSYNC_H - -#include <IOKit/IOService.h> - -class IOSerialDriverSync : public IOService -{ - OSDeclareAbstractStructors(IOSerialDriverSync); - -public: - virtual IOReturn acquirePort(bool sleep, void *refCon) = 0; - - virtual IOReturn releasePort(void *refCon) = 0; - - virtual IOReturn setState(UInt32 state, UInt32 mask, void *refCon) = 0; - - virtual UInt32 getState(void *refCon) = 0; - - virtual IOReturn watchState(UInt32 *state, UInt32 mask, void *refCon) = 0; - - virtual UInt32 nextEvent(void *refCon) = 0; - - virtual IOReturn executeEvent(UInt32 event, UInt32 data, void *refCon) = 0; - - virtual IOReturn requestEvent(UInt32 event, UInt32 *data, void *refCon) = 0; - - virtual IOReturn enqueueEvent(UInt32 event, UInt32 data, - bool sleep, void *refCon) = 0; - - virtual IOReturn dequeueEvent(UInt32 *event, UInt32 *data, - bool sleep, void *refCon) = 0; - - virtual IOReturn enqueueData(UInt8 *buffer, UInt32 size, UInt32 *count, - bool sleep, void *refCon) = 0; - - virtual IOReturn dequeueData(UInt8 *buffer, UInt32 size, UInt32 *count, - UInt32 min, void *refCon) = 0; - -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 0); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 1); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 2); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 3); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 4); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 5); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 6); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 7); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 8); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 9); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 10); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 11); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 12); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 13); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 14); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 15); - -}; - -#endif /* !_SERIAL_IOSERIALDRIVERSYNC_H */ diff --git a/i386/include/IOKit/serial/.svn/text-base/IOSerialKeys.h.svn-base b/i386/include/IOKit/serial/.svn/text-base/IOSerialKeys.h.svn-base deleted file mode 100644 index 9538a24..0000000 --- a/i386/include/IOKit/serial/.svn/text-base/IOSerialKeys.h.svn-base +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * IOSerialKeys.h - * - * 2000-10-21 gvdl Initial real change to IOKit serial family. - * - */ - -/* -Sample Matching dictionary -{ - IOProviderClass = kIOSerialBSDServiceValue; - kIOSerialBSDTypeKey = kIOSerialBSDAllTypes - | kIOSerialBSDModemType - | kIOSerialBSDRS232Type; - kIOTTYDeviceKey = <Raw Unique Device Name>; - kIOTTYBaseNameKey = <Raw Unique Device Name>; - kIOTTYSuffixKey = <Raw Unique Device Name>; - kIOCalloutDeviceKey = <Callout Device Name>; - kIODialinDeviceKey = <Dialin Device Name>; -} - -Note only the IOProviderClass is mandatory. The other keys allow the searcher to reduce the size of the set of matching devices. -*/ - -/* Service Matching That is the 'IOProviderClass' */ -#define kIOSerialBSDServiceValue "IOSerialBSDClient" - -/* Matching keys */ -#define kIOSerialBSDTypeKey "IOSerialBSDClientType" - -/* Currently possible kIOSerialBSDTypeKey values. */ -#define kIOSerialBSDAllTypes "IOSerialStream" -#define kIOSerialBSDModemType "IOModemSerialStream" -#define kIOSerialBSDRS232Type "IORS232SerialStream" - -// Properties that resolve to a /dev device node to open for -// a particular service -#define kIOTTYDeviceKey "IOTTYDevice" -#define kIOTTYBaseNameKey "IOTTYBaseName" -#define kIOTTYSuffixKey "IOTTYSuffix" - -#define kIOCalloutDeviceKey "IOCalloutDevice" -#define kIODialinDeviceKey "IODialinDevice" - -// Property 'ioctl' wait for the tty device to go idle. -#define kIOTTYWaitForIdleKey "IOTTYWaitForIdle" - -#if KERNEL -extern const OSSymbol *gIOSerialBSDServiceValue; -extern const OSSymbol *gIOSerialBSDTypeKey; -extern const OSSymbol *gIOSerialBSDAllTypes; -extern const OSSymbol *gIOSerialBSDModemType; -extern const OSSymbol *gIOSerialBSDRS232Type; -extern const OSSymbol *gIOTTYDeviceKey; -extern const OSSymbol *gIOTTYBaseNameKey; -extern const OSSymbol *gIOTTYSuffixKey; -extern const OSSymbol *gIOCalloutDeviceKey; -extern const OSSymbol *gIODialinDeviceKey; -#endif /* KERNEL */ diff --git a/i386/include/IOKit/serial/.svn/text-base/IOSerialStreamSync.h.svn-base b/i386/include/IOKit/serial/.svn/text-base/IOSerialStreamSync.h.svn-base deleted file mode 100644 index b654adb..0000000 --- a/i386/include/IOKit/serial/.svn/text-base/IOSerialStreamSync.h.svn-base +++ /dev/null @@ -1,275 +0,0 @@ -/* - *Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - *@APPLE_LICENSE_HEADER_START@ - * - *The contents of this file constitute Original Code as defined in and - *are subject to the Apple Public Source License Version 1.1 (the - *"License"). You may not use this file except in compliance with the - *License. Please obtain a copy of the License at - *http://www.apple.com/publicsource and read it before using this file. - * - *This Original Code and all software distributed under the License are - *distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - *EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - *INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - *License for the specific language governing rights and limitations - *under the License. - * - *@APPLE_LICENSE_HEADER_END@ - */ -/* - * IOSerialStreamSync.h - * - * 2000-10-21 gvdl Initial real change to IOKit serial family. - * - */ - -#ifndef _SERIAL_IOSERIALSTREAMSYNC_H -#define _SERIAL_IOSERIALSTREAMSYNC_H - -#include <IOKit/IOService.h> - -#ifdef __LP64__ - -#define PD_DATA_MASK 0x03U -#define PD_DATA_VOID 0x00U -#define PD_DATA_BYTE 0x01U -#define PD_DATA_WORD 0x02U -#define PD_DATA_LONG 0x03U - -#else - -#define PD_DATA_MASK 0x03UL -#define PD_DATA_VOID 0x00UL -#define PD_DATA_BYTE 0x01UL -#define PD_DATA_WORD 0x02UL -#define PD_DATA_LONG 0x03UL - -#endif - -#define PD_OP(x) ((x) << 2) -#define PD_E_MASK (~PD_DATA_MASK) - -/* General Command & Status events */ -#define PD_E_EOQ (PD_DATA_VOID|PD_OP( 0)) // Always nextEvent on empty queue -#define PD_E_ACTIVE (PD_DATA_BYTE|PD_OP( 1)) // BOOL start/shutdown chip - -/* Queue management events - all units are multiples of characters - *based on the current character size - */ -#define PD_E_TXQ_SIZE (PD_DATA_LONG|PD_OP( 2)) -#define PD_E_RXQ_SIZE (PD_DATA_LONG|PD_OP( 3)) -#define PD_E_TXQ_LOW_WATER (PD_DATA_LONG|PD_OP( 4)) -#define PD_E_RXQ_LOW_WATER (PD_DATA_LONG|PD_OP( 5)) -#define PD_E_TXQ_HIGH_WATER (PD_DATA_LONG|PD_OP( 6)) -#define PD_E_RXQ_HIGH_WATER (PD_DATA_LONG|PD_OP( 7)) -#define PD_E_TXQ_AVAILABLE (PD_DATA_LONG|PD_OP( 8)) -#define PD_E_RXQ_AVAILABLE (PD_DATA_LONG|PD_OP( 9)) -#define PD_E_TXQ_FLUSH (PD_DATA_VOID|PD_OP(10)) -#define PD_E_RXQ_FLUSH (PD_DATA_LONG|PD_OP(11)) - -/* port & link characteristics - units are half bits */ -#define PD_E_DATA_RATE (PD_DATA_LONG|PD_OP(12)) // raw bits of symbols per second -#define PD_E_RX_DATA_RATE (PD_DATA_LONG|PD_OP(13)) -#define PD_E_DATA_SIZE (PD_DATA_LONG|PD_OP(14)) // raw bits per symbol -#define PD_E_RX_DATA_SIZE (PD_DATA_LONG|PD_OP(15)) -#define PD_E_DATA_INTEGRITY (PD_DATA_LONG|PD_OP(16)) // parity or ECC method -#define PD_E_RX_DATA_INTEGRITY (PD_DATA_LONG|PD_OP(17)) -#define PD_E_EXTERNAL_CLOCK_MODE (PD_DATA_LONG|PD_OP(28)) // multiplier between clock and data rates - -/* timeout events */ -#define PD_E_DELAY (PD_DATA_LONG|PD_OP(18)) // inter-character delay (us) -#define PD_E_DATA_LATENCY (PD_DATA_LONG|PD_OP(19)) // A dequeueData Latency timeout - // rcs Secondary Timer mainly to fix performance - // problems with MIDI and IRDA drivers. - // Midi and Irda drivers will issue an IOCTL - // call with this as the selector and - // the Data as the value they want the rate set - // to (Typically 1 for IrDA devices) -#define PD_E_FLOW_CONTROL (PD_DATA_LONG|PD_OP(20)) // enable/disable each flow mechanism - -/* I/O events */ -#define PD_E_VALID_DATA (PD_DATA_VOID|PD_OP(21)) // A valid frame was received -#define PD_E_VALID_DATA_BYTE (PD_DATA_BYTE|PD_E_VALID_DATA) -#define PD_E_VALID_DATA_WORD (PD_DATA_WORD|PD_E_VALID_DATA) -#define PD_E_VALID_DATA_LONG (PD_DATA_LONG|PD_E_VALID_DATA) - -#define PD_E_SPECIAL (PD_DATA_VOID|PD_OP(22)) // valid data received with 'special' value -#define PD_E_SPECIAL_BYTE (PD_DATA_BYTE|PD_E_SPECIAL) -#define PD_E_SPECIAL_WORD (PD_DATA_WORD|PD_E_SPECIAL) -#define PD_E_SPECIAL_LONG (PD_DATA_LONG|PD_E_SPECIAL) - -#define PD_E_FRAMING_ERROR (PD_DATA_VOID|PD_OP(23)) // Failure occured assembling frame -#define PD_E_FRAMING_BYTE (PD_DATA_BYTE|PD_E_FRAMING_ERROR) -#define PD_E_FRAMING_WORD (PD_DATA_WORD|PD_E_FRAMING_ERROR) -#define PD_E_FRAMING_LONG (PD_DATA_LONG|PD_E_FRAMING_ERROR) - -#define PD_E_INTEGRITY_ERROR (PD_DATA_VOID|PD_OP(24)) // An uncorrectable frame was received -#define PD_E_INTEGRITY_BYTE (PD_DATA_BYTE|PD_E_INTEGRITY_ERROR) -#define PD_E_INTEGRITY_WORD (PD_DATA_WORD|PD_E_INTEGRITY_ERROR) -#define PD_E_INTEGRITY_LONG (PD_DATA_LONG|PD_E_INTEGRITY_ERROR) - -#define PD_E_INTEGRITY_WARNING (PD_DATA_VOID|PD_OP(25)) // A correctable frame was received -#define PD_E_HW_OVERRUN_ERROR (PD_DATA_VOID|PD_OP(26)) // Hardware's buffer overflowed, data lost -#define PD_E_SW_OVERRUN_ERROR (PD_DATA_VOID|PD_OP(27)) // Driver's buffer overflowed, data lost - -/* - *The variables below make up the bits returned - *by the State methods:- getState, setState, watchState - */ -#define PD_S_MASK 0xffff0000UL -#define PD_S_RX_OFFSET 7 - -#define PD_S_ACQUIRED 0x80000000UL -#define PD_S_ACTIVE 0x40000000UL - -#define PD_S_TX_ENABLE 0x20000000UL -#define PD_S_TX_BUSY 0x10000000UL -#define PD_S_TX_EVENT 0x08000000UL -#define PD_S_TXQ_EMPTY 0x04000000UL -#define PD_S_TXQ_LOW_WATER 0x02000000UL -#define PD_S_TXQ_HIGH_WATER 0x01000000UL -#define PD_S_TXQ_FULL 0x00800000UL -#define PD_S_TXQ_MASK ( PD_S_TXQ_EMPTY | PD_S_TXQ_LOW_WATER \ - | PD_S_TXQ_FULL | PD_S_TXQ_HIGH_WATER ) - -#define PD_S_RX_ENABLE (PD_S_TX_ENABLE >> PD_S_RX_OFFSET) -#define PD_S_RX_BUSY (PD_S_TX_BUSY >> PD_S_RX_OFFSET) -#define PD_S_RX_EVENT (PD_S_TX_EVENT >> PD_S_RX_OFFSET) -#define PD_S_RXQ_EMPTY (PD_S_TXQ_EMPTY >> PD_S_RX_OFFSET) -#define PD_S_RXQ_LOW_WATER (PD_S_TXQ_LOW_WATER >> PD_S_RX_OFFSET) -#define PD_S_RXQ_HIGH_WATER (PD_S_TXQ_HIGH_WATER >> PD_S_RX_OFFSET) -#define PD_S_RXQ_FULL (PD_S_TXQ_FULL >> PD_S_RX_OFFSET) -#define PD_S_RXQ_MASK (PD_S_TXQ_MASK >> PD_S_RX_OFFSET) - -class IOSerialDriverSync; -class IOSerialStreamSync : public IOService -{ - OSDeclareDefaultStructors(IOSerialStreamSync); - -protected: - IOSerialDriverSync *fProvider; - void *fRefCon; - -public: - /* acquire tests and sets the state of the port object. If the port was - *available, then the state is set to busy, and kIOReturnSuccess is returned. - *If the port was already busy and sleep is YES, then the thread will sleep - *until the port is freed, then re-attempts the acquire. If the port was - *already busy and sleep in NO, then kIOReturnExclusiveAccess is returned. - */ - virtual IOReturn acquirePort(bool sleep); - - /* release sets the state of the port object to available and wakes up any - *threads sleeping for access to this port. It will return kIOReturnSuccess - *if the port was in a busy state, and kIOReturnNotOpen if it was available. - */ - virtual IOReturn releasePort(); - - /* - *Set the state for the port device. - */ - virtual IOReturn setState(UInt32 state, UInt32 mask); - - /* - *Get the state for the port device. - */ - virtual UInt32 getState(); - - /* - *Wait for the at least one of the state bits defined in mask to be equal - *to the value defined in state. - *Check on entry then sleep until necessary. - */ - virtual IOReturn watchState(UInt32 *state, UInt32 mask); - - /* nextEvent returns the type of the next event on the RX queue. If no - *events are present on the RX queue, then EOQ is returned. - */ - virtual UInt32 nextEvent(); - - /* executeEvent causes the specified event to be processed immediately. - *This is primarily used for channel control commands like START & STOP - */ - virtual IOReturn executeEvent(UInt32 event, UInt32 data); - - /* requestEvent processes the specified event as an immediate request and - *returns the results in data. This is primarily used for getting link - *status information and verifying baud rate and such. - */ - virtual IOReturn requestEvent(UInt32 event, UInt32 *data); - - /* enqueueEvent will place the specified event into the TX queue. The - *sleep argument allows the caller to specify the enqueueEvent's - *behaviour when the TX queue is full. If sleep is true, then this - *method will sleep until the event is enqueued. If sleep is false, - *then enqueueEvent will immediatly return kIOReturnNoResources. - */ - virtual IOReturn enqueueEvent(UInt32 event, UInt32 data, bool sleep); - - /* dequeueEvent will remove the oldest event from the RX queue and return - *it in event & data. The sleep argument defines the behaviour if the RX - *queue is empty. If sleep is true, then this method will sleep until an - *event is available. If sleep is false, then an EOQ event will be - *returned. In either case kIOReturnSuccess is returned. - */ - virtual IOReturn dequeueEvent(UInt32 *event, UInt32 *data, bool sleep); - - /* enqueueData will attempt to copy data from the specified buffer to the - *TX queue as a sequence of VALID_DATA events. The argument bufferSize - *specifies the number of bytes to be sent. The actual number of bytes - *transferred is returned in transferCount. If sleep is true, then this - *method will sleep until all bytes can be transferred. If sleep is - *false, then as many bytes as possible will be copied to the TX queue. - */ - virtual IOReturn enqueueData(UInt8 *buffer, UInt32 size, UInt32 *count, bool sleep ); - - /* dequeueData will attempt to copy data from the RX queue to the specified - *buffer. No more than bufferSize VALID_DATA events will be transferred. - *In other words, copying will continue until either a non-data event is - *encountered or the transfer buffer is full. The actual number of bytes - *transferred is returned in transferCount. - * - *The sleep semantics of this method are slightly more complicated than - *other methods in this API: Basically, this method will continue to - *sleep until either minCount characters have been received or a non - *data event is next in the RX queue. If minCount is zero, then this - *method never sleeps and will return immediatly if the queue is empty. - * - *The latency parameter specifies the maximum amount of time that should - *pass after the first character is available before the routine returns. - *This allows the caller to specify a 'packet' timeout. The unit of the - *latency parameter is microseconds, though the exact delay may vary - *depending on the granularity of the timeout services available to the - *driver. - */ - virtual IOReturn dequeueData(UInt8 *buffer, UInt32 size, UInt32 *count, UInt32 min); - - /* Internal for IOSerialDriver only */ - virtual bool init(OSDictionary *dictionary = 0, void *refCon = 0); - virtual bool attach(IOService *provider); - void *getRefCon() const { return fRefCon; } - -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 0); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 1); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 2); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 3); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 4); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 5); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 6); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 7); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 8); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 9); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 10); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 11); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 12); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 13); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 14); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 15); -}; - -#endif /* !_SERIAL_IOSERIALSTREAMSYNC_H */ - - diff --git a/i386/include/IOKit/serial/IOModemSerialStreamSync.h b/i386/include/IOKit/serial/IOModemSerialStreamSync.h deleted file mode 100644 index be75287..0000000 --- a/i386/include/IOKit/serial/IOModemSerialStreamSync.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * - * IOModemSerialStreamSync.h - * This file contains Modem specific extensions to the IOSerialStreamSync class. - * - * 2000-10-21 gvdl Initial real change to IOKit serial family. - * - */ - -#ifndef _SERIAL_IOMODEMSERIALSTREAMSYNC_H -#define _SERIAL_IOMODEMSERIALSTREAMSYNC_H - -#include <IOKit/serial/IOSerialStreamSync.h> - -class IOModemSerialStreamSync : public IOSerialStreamSync -{ - OSDeclareDefaultStructors(IOModemSerialStreamSync) -}; - -#endif /* !_SERIAL_IOMODEMSERIALSTREAMSYNC_H */ - diff --git a/i386/include/IOKit/serial/IORS232SerialStreamSync.h b/i386/include/IOKit/serial/IORS232SerialStreamSync.h deleted file mode 100644 index 15d520a..0000000 --- a/i386/include/IOKit/serial/IORS232SerialStreamSync.h +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/* - * IORS232SerialStreamSync.h - * This file contains RS232 specific extensions to the IOSerialStreamSync class. - * - * 2000-10-21 gvdl Initial real change to IOKit serial family. - */ - -#ifndef _SERIAL_IORS232SERIALSTREAMSYNC_H -#define _SERIAL_IORS232SERIALSTREAMSYNC_H - -#include <sys/ioctl.h> -#include <IOKit/serial/IOSerialStreamSync.h> - -/* - * Extra events for RS232 based PortDevices - */ - -#define PD_RS232_E_RX_LINE_BREAK (PD_DATA_VOID|PD_OP(63)) // line break was received -#define PD_RS232_E_LINE_BREAK (PD_DATA_BYTE|PD_OP(62)) // BOOL set/clear line break - -#define PD_RS232_E_RX_STOP_BITS (PD_DATA_LONG|PD_OP(61)) // half stop bits -#define PD_RS232_E_STOP_BITS (PD_DATA_LONG|PD_OP(60)) // half stop bits - -#define PD_RS232_E_XON_BYTE (PD_DATA_BYTE|PD_OP(59)) // The XON char for TX&RX -#define PD_RS232_E_XOFF_BYTE (PD_DATA_BYTE|PD_OP(58)) // The XOFF char for TX&RX - -#define PD_RS232_E_MIN_LATENCY (PD_DATA_BYTE|PD_OP(57)) // BOOL true if low latency req - -/* - * RS232 Parity stuff, used with the DATA_INTEGRITY event - */ -#define PD_RS232_PARITY_DEFAULT 0 // Valid only for RX, means follow TX -#define PD_RS232_PARITY_NONE 1 // No Parity bit inserted or expected -#define PD_RS232_PARITY_ODD 2 // Odd Parity bit inserted or expected -#define PD_RS232_PARITY_EVEN 3 // Even Parity bit inserted or expected -#define PD_RS232_PARITY_MARK 4 // Mark inserted or expected -#define PD_RS232_PARITY_SPACE 5 // Space inserted or expected -#define PD_RS232_PARITY_ANY 6 // Valid only for RX, means discard parity - -/* - * RS232 Flow Control specifiers, used with the FLOW_CONTROL event - * NB. The XON character is set with FLOW_START_DATA - * and the XOFF character is set with FLOW_STOP_DATA. - * - * Signal Name Direction - * RFR Ready For Receive Output generated by UART - * RTS Ready To Send (alias of RFR) Output generated by UART - * CTS Clear To Send Input sensed by UART - * DTR Data Terminal Ready Output generated by UART - * DSR Data Set Ready Input sensed by UART - * TXO XON/XOFF/XANY protocol Characters received by UART - * RXO XON/XOFF protocol Characters transmitted by UART - * DCD Data Carrier Detect Input sensed by UART - */ - -/* - * RS232 State Word extensions, based on <bsd/sys/ioctl.h> - * Also the 'current state' bits for enq/deq of Flow Control event - */ -#define PD_RS232_S_MASK 0x0000ffffUL -#define PD_RS232_S_SHIFT 0 // to align State bits for enq/deq event -#define PD_RS232_D_MASK 0xffff0000UL -#define PD_RS232_D_SHIFT 16 // to align Delta bits for enq/deq event -#define PD_RS232_A_MASK 0x0000ffffUL -#define PD_RS232_A_SHIFT 0 // to align Auto bits for req/exec event -#define PD_RS232_N_MASK 0xffff0000UL -#define PD_RS232_N_SHIFT 16 // to align Notify bits for req/exec event - -#define PD_RS232_S_LE TIOCM_LE // line enable -#define PD_RS232_S_DTR TIOCM_DTR // data terminal ready -#define PD_RS232_S_RTS TIOCM_RTS // request to send -#define PD_RS232_S_RFR PD_RS232_S_RTS // ready for receive -#define PD_RS232_S_TXO TIOCM_ST // TX XON/XOFF -#define PD_RS232_S_RXO TIOCM_SR // RX XON/XOFF -#define PD_RS232_S_CTS TIOCM_CTS // clear to send -#define PD_RS232_S_CAR TIOCM_CAR // carrier detect -#define PD_RS232_S_DCD PD_RS232_S_CAR -#define PD_RS232_S_RNG TIOCM_RNG // ring -#define PD_RS232_S_RI PD_RS232_S_RNG -#define PD_RS232_S_DSR TIOCM_DSR // data set ready - -#define PD_RS232_S_BRK 0x00000800UL // break active Extension to TIOCM -#define PD_RS232_S_LOOP 0x00001000UL // LOOP back Extension to TIOCM -#define PD_RS232_S_TXQ 0x00002000UL // User flowcontrol bit -#define PD_RS232_S_RXQ 0x00004000UL // User flowcontrol bit - -// The 'delta' bits for enq/deq of Flow Control event -#define PD_RS232_D_LE (PD_RS232_S_LE << PD_RS232_D_SHIFT) -#define PD_RS232_D_DTR (PD_RS232_S_DTR << PD_RS232_D_SHIFT) -#define PD_RS232_D_RTS (PD_RS232_S_RTS << PD_RS232_D_SHIFT) -#define PD_RS232_D_RFR (PD_RS232_S_RFR << PD_RS232_D_SHIFT) -#define PD_RS232_D_TXO (PD_RS232_S_TXO << PD_RS232_D_SHIFT) -#define PD_RS232_D_RXO (PD_RS232_S_RXO << PD_RS232_D_SHIFT) -#define PD_RS232_D_CTS (PD_RS232_S_CTS << PD_RS232_D_SHIFT) -#define PD_RS232_D_CAR (PD_RS232_S_CAR << PD_RS232_D_SHIFT) -#define PD_RS232_D_DCD (PD_RS232_S_DCD << PD_RS232_D_SHIFT) -#define PD_RS232_D_RNG (PD_RS232_S_RNG << PD_RS232_D_SHIFT) -#define PD_RS232_D_RI (PD_RS232_S_RI << PD_RS232_D_SHIFT) -#define PD_RS232_D_DSR (PD_RS232_S_DSR << PD_RS232_D_SHIFT) - -#define PD_RS232_D_BRK (PD_RS232_S_BRK << PD_RS232_D_SHIFT) -#define PD_RS232_D_LOOP (PD_RS232_S_LOOP << PD_RS232_D_SHIFT) -#define PD_RS232_D_TXQ (PD_RS232_S_TXQ << PD_RS232_D_SHIFT) -#define PD_RS232_D_RXQ (PD_RS232_S_RXQ << PD_RS232_D_SHIFT) - -// The 'auto' bits for exec/req of Flow Control event -#define PD_RS232_A_LE PD_RS232_S_LE -#define PD_RS232_A_DTR PD_RS232_S_DTR -#define PD_RS232_A_RTS PD_RS232_S_RTS -#define PD_RS232_A_RFR PD_RS232_S_RFR -#define PD_RS232_A_TXO PD_RS232_S_TXO -#define PD_RS232_A_RXO PD_RS232_S_RXO -#define PD_RS232_A_CTS PD_RS232_S_CTS -#define PD_RS232_A_CAR PD_RS232_S_CAR -#define PD_RS232_A_DCD PD_RS232_S_DCD -#define PD_RS232_A_RNG PD_RS232_S_RNG -#define PD_RS232_A_RI PD_RS232_S_RI -#define PD_RS232_A_DSR PD_RS232_S_DSR -#define PD_RS232_A_XANY 0x00000400 // changes _A_TXO from XON/XOFF to XANY/XOFF -#define PD_RS232_A_BRK PD_RS232_S_BRK -#define PD_RS232_A_LOOP PD_RS232_S_LOOP -#define PD_RS232_A_TXQ PD_RS232_S_TXQ -#define PD_RS232_A_RXQ PD_RS232_S_RXQ - -// The 'notify' bits for exec/req of Flow Control event -#define PD_RS232_N_LE (PD_RS232_S_LE << PD_RS232_N_SHIFT) -#define PD_RS232_N_DTR (PD_RS232_S_DTR << PD_RS232_N_SHIFT) -#define PD_RS232_N_RTS (PD_RS232_S_RTS << PD_RS232_N_SHIFT) -#define PD_RS232_N_RFR (PD_RS232_S_RFR << PD_RS232_N_SHIFT) -#define PD_RS232_N_TXO (PD_RS232_S_TXO << PD_RS232_N_SHIFT) -#define PD_RS232_N_RXO (PD_RS232_S_RXO << PD_RS232_N_SHIFT) -#define PD_RS232_N_CTS (PD_RS232_S_CTS << PD_RS232_N_SHIFT) -#define PD_RS232_N_CAR (PD_RS232_S_CAR << PD_RS232_N_SHIFT) -#define PD_RS232_N_DCD (PD_RS232_S_DCD << PD_RS232_N_SHIFT) -#define PD_RS232_N_RNG (PD_RS232_S_RNG << PD_RS232_N_SHIFT) -#define PD_RS232_N_RI (PD_RS232_S_RI << PD_RS232_N_SHIFT) -#define PD_RS232_N_DSR (PD_RS232_S_DSR << PD_RS232_N_SHIFT) - -#define PD_RS232_N_BRK (PD_RS232_S_BRK << PD_RS232_N_SHIFT) -#define PD_RS232_N_LOOP (PD_RS232_S_LOOP << PD_RS232_N_SHIFT) -#define PD_RS232_N_TXQ (PD_RS232_S_TXQ << PD_RS232_N_SHIFT) -#define PD_RS232_N_RXQ (PD_RS232_S_RXQ << PD_RS232_N_SHIFT) - -class IORS232SerialStreamSync : public IOSerialStreamSync -{ - OSDeclareDefaultStructors(IORS232SerialStreamSync) -}; - -#endif /* !_SERIAL_IORS232SERIALSTREAMSYNC_H */ - diff --git a/i386/include/IOKit/serial/IOSerialDriverSync.h b/i386/include/IOKit/serial/IOSerialDriverSync.h deleted file mode 100644 index 92f69df..0000000 --- a/i386/include/IOKit/serial/IOSerialDriverSync.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - *Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - *@APPLE_LICENSE_HEADER_START@ - * - *The contents of this file constitute Original Code as defined in and - *are subject to the Apple Public Source License Version 1.1 (the - *"License"). You may not use this file except in compliance with the - *License. Please obtain a copy of the License at - *http://www.apple.com/publicsource and read it before using this file. - * - *This Original Code and all software distributed under the License are - *distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - *EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - *INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - *License for the specific language governing rights and limitations - *under the License. - * - *@APPLE_LICENSE_HEADER_END@ - */ - -/* - * IOSerialDriverSync.h - * This file contains the abstract parent class for any IOSerialDriver - * interface, which is a generic serial interface, designed for devices - * that do character oriented transfers (async) rather than block or - * packet transfers. Most notably RS-232, Printer, Mouse, and Keyboard - * type devices. - * - * 2000-10-21 gvdl Initial real change to IOKit serial family. - */ - -#ifndef _SERIAL_IOSERIALDRIVERSYNC_H -#define _SERIAL_IOSERIALDRIVERSYNC_H - -#include <IOKit/IOService.h> - -class IOSerialDriverSync : public IOService -{ - OSDeclareAbstractStructors(IOSerialDriverSync); - -public: - virtual IOReturn acquirePort(bool sleep, void *refCon) = 0; - - virtual IOReturn releasePort(void *refCon) = 0; - - virtual IOReturn setState(UInt32 state, UInt32 mask, void *refCon) = 0; - - virtual UInt32 getState(void *refCon) = 0; - - virtual IOReturn watchState(UInt32 *state, UInt32 mask, void *refCon) = 0; - - virtual UInt32 nextEvent(void *refCon) = 0; - - virtual IOReturn executeEvent(UInt32 event, UInt32 data, void *refCon) = 0; - - virtual IOReturn requestEvent(UInt32 event, UInt32 *data, void *refCon) = 0; - - virtual IOReturn enqueueEvent(UInt32 event, UInt32 data, - bool sleep, void *refCon) = 0; - - virtual IOReturn dequeueEvent(UInt32 *event, UInt32 *data, - bool sleep, void *refCon) = 0; - - virtual IOReturn enqueueData(UInt8 *buffer, UInt32 size, UInt32 *count, - bool sleep, void *refCon) = 0; - - virtual IOReturn dequeueData(UInt8 *buffer, UInt32 size, UInt32 *count, - UInt32 min, void *refCon) = 0; - -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 0); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 1); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 2); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 3); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 4); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 5); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 6); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 7); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 8); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 9); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 10); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 11); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 12); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 13); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 14); -OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 15); - -}; - -#endif /* !_SERIAL_IOSERIALDRIVERSYNC_H */ diff --git a/i386/include/IOKit/serial/IOSerialKeys.h b/i386/include/IOKit/serial/IOSerialKeys.h deleted file mode 100644 index 9538a24..0000000 --- a/i386/include/IOKit/serial/IOSerialKeys.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * IOSerialKeys.h - * - * 2000-10-21 gvdl Initial real change to IOKit serial family. - * - */ - -/* -Sample Matching dictionary -{ - IOProviderClass = kIOSerialBSDServiceValue; - kIOSerialBSDTypeKey = kIOSerialBSDAllTypes - | kIOSerialBSDModemType - | kIOSerialBSDRS232Type; - kIOTTYDeviceKey = <Raw Unique Device Name>; - kIOTTYBaseNameKey = <Raw Unique Device Name>; - kIOTTYSuffixKey = <Raw Unique Device Name>; - kIOCalloutDeviceKey = <Callout Device Name>; - kIODialinDeviceKey = <Dialin Device Name>; -} - -Note only the IOProviderClass is mandatory. The other keys allow the searcher to reduce the size of the set of matching devices. -*/ - -/* Service Matching That is the 'IOProviderClass' */ -#define kIOSerialBSDServiceValue "IOSerialBSDClient" - -/* Matching keys */ -#define kIOSerialBSDTypeKey "IOSerialBSDClientType" - -/* Currently possible kIOSerialBSDTypeKey values. */ -#define kIOSerialBSDAllTypes "IOSerialStream" -#define kIOSerialBSDModemType "IOModemSerialStream" -#define kIOSerialBSDRS232Type "IORS232SerialStream" - -// Properties that resolve to a /dev device node to open for -// a particular service -#define kIOTTYDeviceKey "IOTTYDevice" -#define kIOTTYBaseNameKey "IOTTYBaseName" -#define kIOTTYSuffixKey "IOTTYSuffix" - -#define kIOCalloutDeviceKey "IOCalloutDevice" -#define kIODialinDeviceKey "IODialinDevice" - -// Property 'ioctl' wait for the tty device to go idle. -#define kIOTTYWaitForIdleKey "IOTTYWaitForIdle" - -#if KERNEL -extern const OSSymbol *gIOSerialBSDServiceValue; -extern const OSSymbol *gIOSerialBSDTypeKey; -extern const OSSymbol *gIOSerialBSDAllTypes; -extern const OSSymbol *gIOSerialBSDModemType; -extern const OSSymbol *gIOSerialBSDRS232Type; -extern const OSSymbol *gIOTTYDeviceKey; -extern const OSSymbol *gIOTTYBaseNameKey; -extern const OSSymbol *gIOTTYSuffixKey; -extern const OSSymbol *gIOCalloutDeviceKey; -extern const OSSymbol *gIODialinDeviceKey; -#endif /* KERNEL */ diff --git a/i386/include/IOKit/serial/IOSerialStreamSync.h b/i386/include/IOKit/serial/IOSerialStreamSync.h deleted file mode 100644 index b654adb..0000000 --- a/i386/include/IOKit/serial/IOSerialStreamSync.h +++ /dev/null @@ -1,275 +0,0 @@ -/* - *Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - *@APPLE_LICENSE_HEADER_START@ - * - *The contents of this file constitute Original Code as defined in and - *are subject to the Apple Public Source License Version 1.1 (the - *"License"). You may not use this file except in compliance with the - *License. Please obtain a copy of the License at - *http://www.apple.com/publicsource and read it before using this file. - * - *This Original Code and all software distributed under the License are - *distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - *EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - *INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - *License for the specific language governing rights and limitations - *under the License. - * - *@APPLE_LICENSE_HEADER_END@ - */ -/* - * IOSerialStreamSync.h - * - * 2000-10-21 gvdl Initial real change to IOKit serial family. - * - */ - -#ifndef _SERIAL_IOSERIALSTREAMSYNC_H -#define _SERIAL_IOSERIALSTREAMSYNC_H - -#include <IOKit/IOService.h> - -#ifdef __LP64__ - -#define PD_DATA_MASK 0x03U -#define PD_DATA_VOID 0x00U -#define PD_DATA_BYTE 0x01U -#define PD_DATA_WORD 0x02U -#define PD_DATA_LONG 0x03U - -#else - -#define PD_DATA_MASK 0x03UL -#define PD_DATA_VOID 0x00UL -#define PD_DATA_BYTE 0x01UL -#define PD_DATA_WORD 0x02UL -#define PD_DATA_LONG 0x03UL - -#endif - -#define PD_OP(x) ((x) << 2) -#define PD_E_MASK (~PD_DATA_MASK) - -/* General Command & Status events */ -#define PD_E_EOQ (PD_DATA_VOID|PD_OP( 0)) // Always nextEvent on empty queue -#define PD_E_ACTIVE (PD_DATA_BYTE|PD_OP( 1)) // BOOL start/shutdown chip - -/* Queue management events - all units are multiples of characters - *based on the current character size - */ -#define PD_E_TXQ_SIZE (PD_DATA_LONG|PD_OP( 2)) -#define PD_E_RXQ_SIZE (PD_DATA_LONG|PD_OP( 3)) -#define PD_E_TXQ_LOW_WATER (PD_DATA_LONG|PD_OP( 4)) -#define PD_E_RXQ_LOW_WATER (PD_DATA_LONG|PD_OP( 5)) -#define PD_E_TXQ_HIGH_WATER (PD_DATA_LONG|PD_OP( 6)) -#define PD_E_RXQ_HIGH_WATER (PD_DATA_LONG|PD_OP( 7)) -#define PD_E_TXQ_AVAILABLE (PD_DATA_LONG|PD_OP( 8)) -#define PD_E_RXQ_AVAILABLE (PD_DATA_LONG|PD_OP( 9)) -#define PD_E_TXQ_FLUSH (PD_DATA_VOID|PD_OP(10)) -#define PD_E_RXQ_FLUSH (PD_DATA_LONG|PD_OP(11)) - -/* port & link characteristics - units are half bits */ -#define PD_E_DATA_RATE (PD_DATA_LONG|PD_OP(12)) // raw bits of symbols per second -#define PD_E_RX_DATA_RATE (PD_DATA_LONG|PD_OP(13)) -#define PD_E_DATA_SIZE (PD_DATA_LONG|PD_OP(14)) // raw bits per symbol -#define PD_E_RX_DATA_SIZE (PD_DATA_LONG|PD_OP(15)) -#define PD_E_DATA_INTEGRITY (PD_DATA_LONG|PD_OP(16)) // parity or ECC method -#define PD_E_RX_DATA_INTEGRITY (PD_DATA_LONG|PD_OP(17)) -#define PD_E_EXTERNAL_CLOCK_MODE (PD_DATA_LONG|PD_OP(28)) // multiplier between clock and data rates - -/* timeout events */ -#define PD_E_DELAY (PD_DATA_LONG|PD_OP(18)) // inter-character delay (us) -#define PD_E_DATA_LATENCY (PD_DATA_LONG|PD_OP(19)) // A dequeueData Latency timeout - // rcs Secondary Timer mainly to fix performance - // problems with MIDI and IRDA drivers. - // Midi and Irda drivers will issue an IOCTL - // call with this as the selector and - // the Data as the value they want the rate set - // to (Typically 1 for IrDA devices) -#define PD_E_FLOW_CONTROL (PD_DATA_LONG|PD_OP(20)) // enable/disable each flow mechanism - -/* I/O events */ -#define PD_E_VALID_DATA (PD_DATA_VOID|PD_OP(21)) // A valid frame was received -#define PD_E_VALID_DATA_BYTE (PD_DATA_BYTE|PD_E_VALID_DATA) -#define PD_E_VALID_DATA_WORD (PD_DATA_WORD|PD_E_VALID_DATA) -#define PD_E_VALID_DATA_LONG (PD_DATA_LONG|PD_E_VALID_DATA) - -#define PD_E_SPECIAL (PD_DATA_VOID|PD_OP(22)) // valid data received with 'special' value -#define PD_E_SPECIAL_BYTE (PD_DATA_BYTE|PD_E_SPECIAL) -#define PD_E_SPECIAL_WORD (PD_DATA_WORD|PD_E_SPECIAL) -#define PD_E_SPECIAL_LONG (PD_DATA_LONG|PD_E_SPECIAL) - -#define PD_E_FRAMING_ERROR (PD_DATA_VOID|PD_OP(23)) // Failure occured assembling frame -#define PD_E_FRAMING_BYTE (PD_DATA_BYTE|PD_E_FRAMING_ERROR) -#define PD_E_FRAMING_WORD (PD_DATA_WORD|PD_E_FRAMING_ERROR) -#define PD_E_FRAMING_LONG (PD_DATA_LONG|PD_E_FRAMING_ERROR) - -#define PD_E_INTEGRITY_ERROR (PD_DATA_VOID|PD_OP(24)) // An uncorrectable frame was received -#define PD_E_INTEGRITY_BYTE (PD_DATA_BYTE|PD_E_INTEGRITY_ERROR) -#define PD_E_INTEGRITY_WORD (PD_DATA_WORD|PD_E_INTEGRITY_ERROR) -#define PD_E_INTEGRITY_LONG (PD_DATA_LONG|PD_E_INTEGRITY_ERROR) - -#define PD_E_INTEGRITY_WARNING (PD_DATA_VOID|PD_OP(25)) // A correctable frame was received -#define PD_E_HW_OVERRUN_ERROR (PD_DATA_VOID|PD_OP(26)) // Hardware's buffer overflowed, data lost -#define PD_E_SW_OVERRUN_ERROR (PD_DATA_VOID|PD_OP(27)) // Driver's buffer overflowed, data lost - -/* - *The variables below make up the bits returned - *by the State methods:- getState, setState, watchState - */ -#define PD_S_MASK 0xffff0000UL -#define PD_S_RX_OFFSET 7 - -#define PD_S_ACQUIRED 0x80000000UL -#define PD_S_ACTIVE 0x40000000UL - -#define PD_S_TX_ENABLE 0x20000000UL -#define PD_S_TX_BUSY 0x10000000UL -#define PD_S_TX_EVENT 0x08000000UL -#define PD_S_TXQ_EMPTY 0x04000000UL -#define PD_S_TXQ_LOW_WATER 0x02000000UL -#define PD_S_TXQ_HIGH_WATER 0x01000000UL -#define PD_S_TXQ_FULL 0x00800000UL -#define PD_S_TXQ_MASK ( PD_S_TXQ_EMPTY | PD_S_TXQ_LOW_WATER \ - | PD_S_TXQ_FULL | PD_S_TXQ_HIGH_WATER ) - -#define PD_S_RX_ENABLE (PD_S_TX_ENABLE >> PD_S_RX_OFFSET) -#define PD_S_RX_BUSY (PD_S_TX_BUSY >> PD_S_RX_OFFSET) -#define PD_S_RX_EVENT (PD_S_TX_EVENT >> PD_S_RX_OFFSET) -#define PD_S_RXQ_EMPTY (PD_S_TXQ_EMPTY >> PD_S_RX_OFFSET) -#define PD_S_RXQ_LOW_WATER (PD_S_TXQ_LOW_WATER >> PD_S_RX_OFFSET) -#define PD_S_RXQ_HIGH_WATER (PD_S_TXQ_HIGH_WATER >> PD_S_RX_OFFSET) -#define PD_S_RXQ_FULL (PD_S_TXQ_FULL >> PD_S_RX_OFFSET) -#define PD_S_RXQ_MASK (PD_S_TXQ_MASK >> PD_S_RX_OFFSET) - -class IOSerialDriverSync; -class IOSerialStreamSync : public IOService -{ - OSDeclareDefaultStructors(IOSerialStreamSync); - -protected: - IOSerialDriverSync *fProvider; - void *fRefCon; - -public: - /* acquire tests and sets the state of the port object. If the port was - *available, then the state is set to busy, and kIOReturnSuccess is returned. - *If the port was already busy and sleep is YES, then the thread will sleep - *until the port is freed, then re-attempts the acquire. If the port was - *already busy and sleep in NO, then kIOReturnExclusiveAccess is returned. - */ - virtual IOReturn acquirePort(bool sleep); - - /* release sets the state of the port object to available and wakes up any - *threads sleeping for access to this port. It will return kIOReturnSuccess - *if the port was in a busy state, and kIOReturnNotOpen if it was available. - */ - virtual IOReturn releasePort(); - - /* - *Set the state for the port device. - */ - virtual IOReturn setState(UInt32 state, UInt32 mask); - - /* - *Get the state for the port device. - */ - virtual UInt32 getState(); - - /* - *Wait for the at least one of the state bits defined in mask to be equal - *to the value defined in state. - *Check on entry then sleep until necessary. - */ - virtual IOReturn watchState(UInt32 *state, UInt32 mask); - - /* nextEvent returns the type of the next event on the RX queue. If no - *events are present on the RX queue, then EOQ is returned. - */ - virtual UInt32 nextEvent(); - - /* executeEvent causes the specified event to be processed immediately. - *This is primarily used for channel control commands like START & STOP - */ - virtual IOReturn executeEvent(UInt32 event, UInt32 data); - - /* requestEvent processes the specified event as an immediate request and - *returns the results in data. This is primarily used for getting link - *status information and verifying baud rate and such. - */ - virtual IOReturn requestEvent(UInt32 event, UInt32 *data); - - /* enqueueEvent will place the specified event into the TX queue. The - *sleep argument allows the caller to specify the enqueueEvent's - *behaviour when the TX queue is full. If sleep is true, then this - *method will sleep until the event is enqueued. If sleep is false, - *then enqueueEvent will immediatly return kIOReturnNoResources. - */ - virtual IOReturn enqueueEvent(UInt32 event, UInt32 data, bool sleep); - - /* dequeueEvent will remove the oldest event from the RX queue and return - *it in event & data. The sleep argument defines the behaviour if the RX - *queue is empty. If sleep is true, then this method will sleep until an - *event is available. If sleep is false, then an EOQ event will be - *returned. In either case kIOReturnSuccess is returned. - */ - virtual IOReturn dequeueEvent(UInt32 *event, UInt32 *data, bool sleep); - - /* enqueueData will attempt to copy data from the specified buffer to the - *TX queue as a sequence of VALID_DATA events. The argument bufferSize - *specifies the number of bytes to be sent. The actual number of bytes - *transferred is returned in transferCount. If sleep is true, then this - *method will sleep until all bytes can be transferred. If sleep is - *false, then as many bytes as possible will be copied to the TX queue. - */ - virtual IOReturn enqueueData(UInt8 *buffer, UInt32 size, UInt32 *count, bool sleep ); - - /* dequeueData will attempt to copy data from the RX queue to the specified - *buffer. No more than bufferSize VALID_DATA events will be transferred. - *In other words, copying will continue until either a non-data event is - *encountered or the transfer buffer is full. The actual number of bytes - *transferred is returned in transferCount. - * - *The sleep semantics of this method are slightly more complicated than - *other methods in this API: Basically, this method will continue to - *sleep until either minCount characters have been received or a non - *data event is next in the RX queue. If minCount is zero, then this - *method never sleeps and will return immediatly if the queue is empty. - * - *The latency parameter specifies the maximum amount of time that should - *pass after the first character is available before the routine returns. - *This allows the caller to specify a 'packet' timeout. The unit of the - *latency parameter is microseconds, though the exact delay may vary - *depending on the granularity of the timeout services available to the - *driver. - */ - virtual IOReturn dequeueData(UInt8 *buffer, UInt32 size, UInt32 *count, UInt32 min); - - /* Internal for IOSerialDriver only */ - virtual bool init(OSDictionary *dictionary = 0, void *refCon = 0); - virtual bool attach(IOService *provider); - void *getRefCon() const { return fRefCon; } - -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 0); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 1); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 2); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 3); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 4); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 5); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 6); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 7); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 8); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 9); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 10); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 11); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 12); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 13); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 14); -OSMetaClassDeclareReservedUnused(IOSerialStreamSync, 15); -}; - -#endif /* !_SERIAL_IOSERIALSTREAMSYNC_H */ - - diff --git a/i386/include/IOKit/storage/.svn/all-wcprops b/i386/include/IOKit/storage/.svn/all-wcprops deleted file mode 100644 index 394531d..0000000 --- a/i386/include/IOKit/storage/.svn/all-wcprops +++ /dev/null @@ -1,185 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 60 -/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage -END -IOBDBlockStorageDriver.h -K 25 -svn:wc:ra_dav:version-url -V 85 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOBDBlockStorageDriver.h -END -IOCDBlockStorageDriver.h -K 25 -svn:wc:ra_dav:version-url -V 85 -/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOCDBlockStorageDriver.h -END -IODVDTypes.h -K 25 -svn:wc:ra_dav:version-url -V 73 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IODVDTypes.h -END -IOStorage.h -K 25 -svn:wc:ra_dav:version-url -V 72 -/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOStorage.h -END -IOCDPartitionScheme.h -K 25 -svn:wc:ra_dav:version-url -V 82 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOCDPartitionScheme.h -END -IOBDBlockStorageDevice.h -K 25 -svn:wc:ra_dav:version-url -V 85 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOBDBlockStorageDevice.h -END -IODVDMediaBSDClient.h -K 25 -svn:wc:ra_dav:version-url -V 82 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IODVDMediaBSDClient.h -END -IOCDBlockStorageDevice.h -K 25 -svn:wc:ra_dav:version-url -V 85 -/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOCDBlockStorageDevice.h -END -IOGUIDPartitionScheme.h -K 25 -svn:wc:ra_dav:version-url -V 84 -/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOGUIDPartitionScheme.h -END -IOMediaBSDClient.h -K 25 -svn:wc:ra_dav:version-url -V 79 -/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOMediaBSDClient.h -END -IOBDTypes.h -K 25 -svn:wc:ra_dav:version-url -V 72 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOBDTypes.h -END -IOFilterScheme.h -K 25 -svn:wc:ra_dav:version-url -V 77 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOFilterScheme.h -END -IOCDTypes.h -K 25 -svn:wc:ra_dav:version-url -V 72 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOCDTypes.h -END -IOBDMediaBSDClient.h -K 25 -svn:wc:ra_dav:version-url -V 81 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOBDMediaBSDClient.h -END -IODVDMedia.h -K 25 -svn:wc:ra_dav:version-url -V 73 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IODVDMedia.h -END -IOCDMediaBSDClient.h -K 25 -svn:wc:ra_dav:version-url -V 81 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOCDMediaBSDClient.h -END -IOFDiskPartitionScheme.h -K 25 -svn:wc:ra_dav:version-url -V 85 -/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOFDiskPartitionScheme.h -END -IOMedia.h -K 25 -svn:wc:ra_dav:version-url -V 70 -/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOMedia.h -END -IOApplePartitionScheme.h -K 25 -svn:wc:ra_dav:version-url -V 85 -/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOApplePartitionScheme.h -END -IOStorageDeviceCharacteristics.h -K 25 -svn:wc:ra_dav:version-url -V 93 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOStorageDeviceCharacteristics.h -END -IOStorageProtocolCharacteristics.h -K 25 -svn:wc:ra_dav:version-url -V 95 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOStorageProtocolCharacteristics.h -END -IOBDMedia.h -K 25 -svn:wc:ra_dav:version-url -V 72 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOBDMedia.h -END -IOCDMedia.h -K 25 -svn:wc:ra_dav:version-url -V 72 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOCDMedia.h -END -IOAppleLabelScheme.h -K 25 -svn:wc:ra_dav:version-url -V 81 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOAppleLabelScheme.h -END -IODVDBlockStorageDriver.h -K 25 -svn:wc:ra_dav:version-url -V 86 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IODVDBlockStorageDriver.h -END -IOBlockStorageDriver.h -K 25 -svn:wc:ra_dav:version-url -V 83 -/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOBlockStorageDriver.h -END -IODVDBlockStorageDevice.h -K 25 -svn:wc:ra_dav:version-url -V 86 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IODVDBlockStorageDevice.h -END -IOFireWireStorageCharacteristics.h -K 25 -svn:wc:ra_dav:version-url -V 95 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOFireWireStorageCharacteristics.h -END -IOPartitionScheme.h -K 25 -svn:wc:ra_dav:version-url -V 80 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/IOPartitionScheme.h -END -IOBlockStorageDevice.h -K 25 -svn:wc:ra_dav:version-url -V 83 -/svn/chameleon/!svn/ver/916/trunk/i386/include/IOKit/storage/IOBlockStorageDevice.h -END diff --git a/i386/include/IOKit/storage/.svn/entries b/i386/include/IOKit/storage/.svn/entries deleted file mode 100644 index a1d8a49..0000000 --- a/i386/include/IOKit/storage/.svn/entries +++ /dev/null @@ -1,1051 +0,0 @@ -10 - -dir -2117 -http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/storage -http://forge.voodooprojects.org/svn/chameleon - - - -2011-05-29T20:31:39.361475Z -916 -meklort - - - - - - - - - - - - - - -b5af796a-00a8-11df-919b-ffff7a100b7d - -IODVDTypes.h -file - - - - -2012-10-03T17:50:20.000000Z -e483ef56f42ffa0797fc8f07728e977b -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -10778 - -IOCDBlockStorageDriver.h -file - - - - -2012-10-03T17:50:20.000000Z -7e573eee203505f040b6c91952fd27ed -2011-05-29T20:31:39.361475Z -916 -meklort - - - - - - - - - - - - - - - - - - - - - -1784 - -IOStorage.h -file - - - - -2012-10-03T17:50:20.000000Z -6861395312a6c4d8504025439259a31d -2011-05-29T20:31:39.361475Z -916 -meklort - - - - - - - - - - - - - - - - - - - - - -6542 - -IOCDBlockStorageDevice.h -file - - - - -2012-10-03T17:50:20.000000Z -be4d88548b1a690ae872cd2bf28b314f -2011-05-29T20:31:39.361475Z -916 -meklort - - - - - - - - - - - - - - - - - - - - - -1824 - -IOMediaBSDClient.h -file - - - - -2012-10-03T17:50:20.000000Z -a223d0e3c33fa4525eed3f70692b2d17 -2011-05-29T20:31:39.361475Z -916 -meklort - - - - - - - - - - - - - - - - - - - - - -1089 - -IOBDMediaBSDClient.h -file - - - - -2012-10-03T17:50:20.000000Z -a69c6652c046f1a8e2f067ee0e24abc3 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -5362 - -IODVDMedia.h -file - - - - -2012-10-03T17:50:20.000000Z -ae6b1b0b9061f9a228168c7e85b9c301 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -11327 - -IOApplePartitionScheme.h -file - - - - -2012-10-03T17:50:20.000000Z -a056bad5bd21b62813749928b63112e8 -2011-05-29T20:31:39.361475Z -916 -meklort - - - - - - - - - - - - - - - - - - - - - -5490 - -IOBlockStorageDriver.h -file - - - - -2012-10-03T17:50:20.000000Z -91aa9b08fb435bcbe41cd3c05ac1c928 -2011-05-29T20:31:39.361475Z -916 -meklort - - - - - - - - - - - - - - - - - - - - - -8744 - -IOPartitionScheme.h -file - - - - -2012-10-03T17:50:20.000000Z -0860e541b3aff31008ce2090fb58f93a -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -13964 - -IOBlockStorageDevice.h -file - - - - -2012-10-03T17:50:20.000000Z -6f8ecd4d8450d6756ab68814db44e1ce -2011-05-29T20:31:39.361475Z -916 -meklort - - - - - - - - - - - - - - - - - - - - - -2369 - -IOBDBlockStorageDriver.h -file - - - - -2012-10-03T17:50:20.000000Z -7cf5b5bb3b93251c88ce55e0df8066a8 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -6051 - -IODVDMediaBSDClient.h -file - - - - -2012-10-03T17:50:20.000000Z -08191d1ae4cc6a238b9316ab3b38b716 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -5926 - -IOBDBlockStorageDevice.h -file - - - - -2012-10-03T17:50:20.000000Z -2c1c0ef6332409dae6b2795d999febbd -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -5189 - -IOCDPartitionScheme.h -file - - - - -2012-10-03T17:50:20.000000Z -844d9d0d2381539689b148fd89410116 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -8152 - -IOGUIDPartitionScheme.h -file - - - - -2012-10-03T17:50:20.000000Z -530816f5541c8445445c5fea0f26732f -2011-05-29T20:31:39.361475Z -916 -meklort - - - - - - - - - - - - - - - - - - - - - -2402 - -IOFilterScheme.h -file - - - - -2012-10-03T17:50:20.000000Z -e33b7cb7900db1f675747ebcce9eabac -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -11039 - -IOBDTypes.h -file - - - - -2012-10-03T17:50:20.000000Z -f925111d2be6068af39a1455b650c50e -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -3423 - -IOCDTypes.h -file - - - - -2012-10-03T17:50:20.000000Z -568a8b5033fcc89b9bf5e2f5477f3898 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -12304 - -IOCDMediaBSDClient.h -file - - - - -2012-10-03T17:50:20.000000Z -a923162dc13ec3c65bf9a8630545768b -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -6004 - -IOMedia.h -file - - - - -2012-10-03T17:50:20.000000Z -81f4dba74563d2f012e1f1132ff141e5 -2011-05-29T20:31:39.361475Z -916 -meklort - - - - - - - - - - - - - - - - - - - - - -6890 - -IOFDiskPartitionScheme.h -file - - - - -2012-10-03T17:50:20.000000Z -f9744ba40c80f31b76dd1dffad9efd77 -2011-05-29T20:31:39.361475Z -916 -meklort - - - - - - - - - - - - - - - - - - - - - -4057 - -IOStorageDeviceCharacteristics.h -file - - - - -2012-10-03T17:50:20.000000Z -8684062918e25591b2a0428cee9832b2 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -14734 - -IOStorageProtocolCharacteristics.h -file - - - - -2012-10-03T17:50:20.000000Z -325514be8136f0b9e64be88e35e9fe8d -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -40195 - -IOBDMedia.h -file - - - - -2012-10-03T17:50:20.000000Z -1ebd0da1f4d15c3942b7afad837f8401 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -9148 - -IOAppleLabelScheme.h -file - - - - -2012-10-03T17:50:20.000000Z -5694e06bb45c5a8e4be155f216878cc8 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -5461 - -IOCDMedia.h -file - - - - -2012-10-03T17:50:20.000000Z -6678a0743a966704a1b36bc02b9d5703 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -21272 - -ata -dir - -IODVDBlockStorageDriver.h -file - - - - -2012-10-03T17:50:20.000000Z -e4adcc63709c7d75558955fb8607ba2d -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -9113 - -IOFireWireStorageCharacteristics.h -file - - - - -2012-10-03T17:50:20.000000Z -c2f19d1a81610ee239cb252b99f75f74 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -2057 - -IODVDBlockStorageDevice.h -file - - - - -2012-10-03T17:50:20.000000Z -c7b8a53c5a82f8f283d2da92e6d3f903 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -5839 - diff --git a/i386/include/IOKit/storage/.svn/text-base/IOAppleLabelScheme.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOAppleLabelScheme.h.svn-base deleted file mode 100644 index 6e290a4..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOAppleLabelScheme.h.svn-base +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/* - * This header contains the IOAppleLabelScheme class definition. - */ - -#ifndef _IOAPPLELABELSCHEME_H -#define _IOAPPLELABELSCHEME_H - -#include <IOKit/IOTypes.h> - -/* - * kIOAppleLabelSchemeClass is the name of the IOAppleLabelScheme class. - */ - -#define kIOAppleLabelSchemeClass "IOAppleLabelScheme" - -/* - * Apple Label Scheme Definitions - */ - -#pragma pack(push, 1) /* (enable 8-bit struct packing) */ - -/* Label scheme. */ - -struct applelabel -{ - uint8_t al_boot0[416]; /* (reserved for boot area) */ - uint16_t al_magic; /* (the magic number) */ - uint16_t al_type; /* (label type) */ - uint32_t al_flags; /* (generic flags) */ - uint64_t al_offset; /* (offset of property area, bytes) */ - uint32_t al_size; /* (size of property area, bytes) */ - uint32_t al_checksum; /* (checksum of property area) */ - uint8_t al_boot1[72]; /* (reserved for boot area) */ -}; - -/* Label scheme signature (al_magic). */ - -#define AL_MAGIC 0x414C - -/* Label scheme version (al_type). */ - -#define AL_TYPE_DEFAULT 0x0000 - -/* Label scheme flags (al_flags). */ - -#define AL_FLAG_DEFAULT 0x00000000 - -#pragma pack(pop) /* (reset to default struct packing) */ - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOFilterScheme.h> - -/* - * Class - */ - -class IOAppleLabelScheme : public IOFilterScheme -{ - OSDeclareDefaultStructors(IOAppleLabelScheme); - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - - IOMedia * _content; - - /* - * Free all of this object's outstanding resources. - */ - - virtual void free(void); - - /* - * Scan the provider media for an Apple label scheme. - */ - - virtual IOMedia * scan(SInt32 * score); - - /* - * Ask whether the given content appears to be corrupt. - */ - - virtual bool isContentCorrupt(OSDictionary * properties); - - /* - * Ask whether the given content appears to be invalid. - */ - - virtual bool isContentInvalid(OSDictionary * properties); - - /* - * Instantiate a new media object to represent the given content. - */ - - virtual IOMedia * instantiateMediaObject(OSDictionary * properties); - - /* - * Allocate a new media object (called from instantiateMediaObject). - */ - - virtual IOMedia * instantiateDesiredMediaObject(OSDictionary * properties); - - /* - * Attach the given media object to the device tree plane. - */ - - virtual bool attachMediaObjectToDeviceTree(IOMedia * media); - - /* - * Detach the given media object from the device tree plane. - */ - - virtual void detachMediaObjectFromDeviceTree(IOMedia * media); - -public: - - /* - * Initialize this object's minimal state. - */ - - virtual bool init(OSDictionary * properties = 0); - - /* - * Determine whether the provider media contains an Apple label scheme. - */ - - virtual IOService * probe(IOService * provider, SInt32 * score); - - /* - * Publish the new media object which represents our content. - */ - - virtual bool start(IOService * provider); - - /* - * Clean up after the media object we published before terminating. - */ - - virtual void stop(IOService * provider); - - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 0); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 1); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 2); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 3); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 4); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 5); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 6); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 7); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 8); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 9); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 10); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 11); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 12); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 13); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 14); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 15); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOAPPLELABELSCHEME_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOApplePartitionScheme.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOApplePartitionScheme.h.svn-base deleted file mode 100644 index ace1f3b..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOApplePartitionScheme.h.svn-base +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/* - * This header contains the IOApplePartitionScheme class definition. - */ - -#ifndef _IOAPPLEPARTITIONSCHEME_H -#define _IOAPPLEPARTITIONSCHEME_H - -#include <IOKit/IOTypes.h> - -/* - * kIOApplePartitionSchemeClass is the name of the IOApplePartitionScheme class. - */ - -#define kIOApplePartitionSchemeClass "IOApplePartitionScheme" - -/* - * Apple Partition Map Definitions - */ - -#pragma pack(push, 1) /* (enable 8-bit struct packing) */ - -/* Structure constants. */ - -#define DPISTRLEN 32 - -/* Partition map entry, as found in blocks 1 to dpme_map_entries of the disk. */ - -typedef struct dpme -{ - UInt16 dpme_signature; /* (unique value for partition entry, 'PM') */ - UInt16 dpme_reserved_1; /* (reserved for future use) */ - UInt32 dpme_map_entries; /* (number of partition entries) */ - UInt32 dpme_pblock_start; /* (physical block start of partition) */ - UInt32 dpme_pblocks; /* (physical block count of partition) */ - char dpme_name[DPISTRLEN]; /* (name of partition) */ - char dpme_type[DPISTRLEN]; /* (type of partition, eg. Apple_HFS) */ - UInt32 dpme_lblock_start; /* (logical block start of partition) */ - UInt32 dpme_lblocks; /* (logical block count of partition) */ - UInt32 dpme_flags; /* (partition flags, see defines below) */ - UInt32 dpme_boot_block; /* (logical block start of boot code) */ - UInt32 dpme_boot_bytes; /* (byte count of boot code) */ - UInt32 dpme_load_addr; /* (load address in memory of boot code) */ - UInt32 dpme_load_addr_2; /* (reserved for future use) */ - UInt32 dpme_goto_addr; /* (jump address in memory of boot code) */ - UInt32 dpme_goto_addr_2; /* (reserved for future use) */ - UInt32 dpme_checksum; /* (checksum of boot code) */ - UInt8 dpme_process_id[16]; /* (processor type) */ - UInt32 dpme_reserved_2[32]; /* (reserved for future use) */ - UInt32 dpme_reserved_3[62]; /* (reserved for future use) */ -} DPME; - -/* Driver descriptor map entry. */ - -typedef struct DDMap -{ - UInt32 ddBlock; /* (driver's block start, sbBlkSize-blocks) */ - UInt16 ddSize; /* (driver's block count, 512-blocks) */ - UInt16 ddType; /* (driver's system type) */ -} DDMap; - -/* Driver descriptor map, as found in block zero of the disk. */ - -typedef struct Block0 -{ - UInt16 sbSig; /* (unique value for block zero, 'ER') */ - UInt16 sbBlkSize; /* (block size for this device) */ - UInt32 sbBlkCount; /* (block count for this device) */ - UInt16 sbDevType; /* (device type) */ - UInt16 sbDevId; /* (device id) */ - UInt32 sbDrvrData; /* (driver data) */ - UInt16 sbDrvrCount; /* (driver descriptor count) */ - DDMap sbDrvrMap[8]; /* (driver descriptor table) */ - UInt8 sbReserved[430]; /* (reserved for future use) */ -} Block0; - -/* Partition map signature (sbSig). */ - -#define BLOCK0_SIGNATURE 0x4552 - -/* Partition map entry signature (dpme_signature). */ - -#define DPME_SIGNATURE 0x504D - -/* Partition map entry flags (dpme_flags). */ - -#define DPME_FLAGS_VALID 0x00000001 /* (bit 0) */ -#define DPME_FLAGS_ALLOCATED 0x00000002 /* (bit 1) */ -#define DPME_FLAGS_IN_USE 0x00000004 /* (bit 2) */ -#define DPME_FLAGS_BOOTABLE 0x00000008 /* (bit 3) */ -#define DPME_FLAGS_READABLE 0x00000010 /* (bit 4) */ -#define DPME_FLAGS_WRITABLE 0x00000020 /* (bit 5) */ -#define DPME_FLAGS_OS_PIC_CODE 0x00000040 /* (bit 6) */ -#define DPME_FLAGS_OS_SPECIFIC_2 0x00000080 /* (bit 7) */ -#define DPME_FLAGS_OS_SPECIFIC_1 0x00000100 /* (bit 8) */ -#define DPME_FLAGS_RESERVED_2 0xFFFFFE00 /* (bit 9..31) */ - -#pragma pack(pop) /* (reset to default struct packing) */ - -#endif /* !_IOAPPLEPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOBDBlockStorageDevice.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOBDBlockStorageDevice.h.svn-base deleted file mode 100644 index 66a09d7..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOBDBlockStorageDevice.h.svn-base +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2006-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOBDBlockStorageDevice - * @abstract - * This header contains the IOBDBlockStorageDevice class definition. - */ - -#ifndef _IOBDBLOCKSTORAGEDEVICE_H -#define _IOBDBLOCKSTORAGEDEVICE_H - -#include <IOKit/storage/IOBDTypes.h> - -/*! - * @defined kIOBDBlockStorageDeviceClass - * @abstract - * kIOBDBlockStorageDeviceClass is the name of the IOBDBlockStorageDevice class. - * @discussion - * kIOBDBlockStorageDeviceClass is the name of the IOBDBlockStorageDevice class. - */ - -#define kIOBDBlockStorageDeviceClass "IOBDBlockStorageDevice" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IODVDBlockStorageDevice.h> - -/* Property used for matching, so the generic driver gets the nub it wants. */ -#define kIOBlockStorageDeviceTypeBD "BD" - -/*! - * @class - * IOBDBlockStorageDevice - * @abstract - * The IOBDBlockStorageDevice class is a generic BD block storage device - * abstraction. - * @discussion - * This class is the protocol for generic BD functionality, independent of - * the physical connection protocol (e.g. SCSI, ATA, USB). - * - * The APIs are the union of CD APIs, DVD APIs, and all - * necessary new low-level BD APIs. - * - * A subclass implements relay methods that translate our requests into - * calls to a protocol- and device-specific provider. - */ - -class IOBDBlockStorageDevice : public IODVDBlockStorageDevice -{ - OSDeclareAbstractStructors(IOBDBlockStorageDevice) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - -public: - - /*! - * @function init - * @discussion - * Initialize this object's minimal state. - * @param properties - * Substitute property table for this object (optional). - * @result - * Returns true on success, false otherwise. - */ - - virtual bool init(OSDictionary * properties); - - /*! - * @function readDiscStructure - * @discussion - * Issue an MMC READ DISC STRUCTURE command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param format - * As documented by MMC. - * @param address - * As documented by MMC. - * @param layer - * As documented by MMC. - * @param grantID - * As documented by MMC. - * @param type - * As documented by MMC. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readDiscStructure( IOMemoryDescriptor * buffer, - UInt8 format, - UInt32 address, - UInt8 layer, - UInt8 grantID, - UInt8 type ) = 0; - - /*! - * @function splitTrack - * @discussion - * Issue an MMC RESERVE TRACK command with the ARSV bit. - * @param address - * As documented by MMC. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn splitTrack(UInt32 address) = 0; - - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 0); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 1); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 2); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 3); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 4); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 5); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 6); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 7); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 8); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 9); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 10); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 11); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 12); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 13); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 14); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 15); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOBDBLOCKSTORAGEDEVICE_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOBDBlockStorageDriver.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOBDBlockStorageDriver.h.svn-base deleted file mode 100644 index 199218c..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOBDBlockStorageDriver.h.svn-base +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) 2006-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOBDBlockStorageDriver - * @abstract - * This header contains the IOBDBlockStorageDriver class definition. - * @discussion - * This class implements BD functionality, independent of - * the physical connection protocol (e.g. SCSI, ATA, USB). - * - * A protocol-specific provider implements the functionality using an appropriate - * protocol and commands. - */ - -#ifndef _IOBDBLOCKSTORAGEDRIVER_H -#define _IOBDBLOCKSTORAGEDRIVER_H - -#include <IOKit/storage/IOBDBlockStorageDevice.h> -#include <IOKit/storage/IODVDBlockStorageDriver.h> - -/*! - * @defined kIOBDBlockStorageDriverClass - * @abstract - * kIOBDBlockStorageDriverClass is the name of the IOBDBlockStorageDriver class. - * @discussion - * kIOBDBlockStorageDriverClass is the name of the IOBDBlockStorageDriver class. - */ - -#define kIOBDBlockStorageDriverClass "IOBDBlockStorageDriver" - -/*! - * @class - * IOBDBlockStorageDriver - * @abstract - * Generic BD Driver. - * @discussion - * Storage drivers are split into two parts: the Generic Driver handles - * all generic device issues, independent of the lower-level transport - * mechanism (e.g. SCSI, ATA, USB, FireWire). All storage operations - * at the Generic Driver level are translated into a series of generic - * device operations. These operations are passed via the Device Nub - * to a Transport Driver, which implements the appropriate - * transport-dependent protocol to execute these operations. - * - * To determine the write-protect state of a device (or media), for - * example, the generic driver would issue a call to the - * Transport Driver's reportWriteProtection method. If this were a SCSI - * device, its Transport Driver would issue a Mode Sense command to - * extract the write-protection status bit. The Transport Driver then - * reports true or false to the generic driver. - * - * The generic driver therefore has no knowledge of, or involvement - * with, the actual commands and mechanisms used to communicate with - * the device. It is expected that the generic driver will rarely, if - * ever, need to be subclassed to handle device idiosyncrasies; rather, - * the Transport Driver should be changed via overrides. - * - * A generic driver could be subclassed to create a different type of - * generic device. The generic driver IOBDBlockStorageDriver class is a subclass - * of IODVDBlockStorageDriver, adding BD functions. Similarly, the Transport Driver - * IOBDBlockStorageDevice is a subclass of IODVDBlockStorageDevice, adding BD - * functions. -*/ - -class IOBDBlockStorageDriver : public IODVDBlockStorageDriver -{ - OSDeclareDefaultStructors(IOBDBlockStorageDriver) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - - /* Overrides of IODVDBlockStorageDriver. */ - - virtual IOReturn acceptNewMedia(void); - - /* End of IODVDBlockStorageDriver overrides. */ - -public: - - /* - * Obtain this object's provider. We override the superclass's method to - * return a more specific subclass of IOService -- IOBDBlockStorageDevice. - * This method serves simply as a convenience to subclass developers. - */ - - virtual IOBDBlockStorageDevice * getProvider() const; - - /* Overrides of IODVDBlockStorageDriver: */ - - virtual const char * getDeviceTypeName(void); - virtual IOMedia * instantiateDesiredMediaObject(void); - virtual IOMedia * instantiateMediaObject(UInt64 base,UInt64 byteSize, - UInt32 blockSize,char *mediaName); - virtual IOReturn readStructure(IOMemoryDescriptor *buffer,const DVDStructureFormat format, - const UInt32 address,const UInt8 layer,const UInt8 agid); - - /* End of IODVDBlockStorageDriver overrides. */ - - /*! - * @function splitTrack - * @discussion - * Issue an MMC RESERVE TRACK command with the ARSV bit. - * @param address - * As documented by MMC. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn splitTrack(UInt32 address); - - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 0); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 1); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 2); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 3); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 4); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 5); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 6); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 7); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 8); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 9); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 10); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 11); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 12); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 13); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 14); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 15); -}; - -#endif /* !_IOBDBLOCKSTORAGEDRIVER_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOBDMedia.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOBDMedia.h.svn-base deleted file mode 100644 index e204a1e..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOBDMedia.h.svn-base +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright (c) 2006-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOBDMedia - * @abstract - * This header contains the IOBDMedia class definition. - */ - -#ifndef _IOBDMEDIA_H -#define _IOBDMEDIA_H - -/*! - * @defined kIOBDMediaClass - * @abstract - * kIOBDMediaClass is the name of the IOBDMedia class. - * @discussion - * kIOBDMediaClass is the name of the IOBDMedia class. - */ - -#define kIOBDMediaClass "IOBDMedia" - -/*! - * @defined kIOBDMediaTypeKey - * @abstract - * kIOBDMediaTypeKey is a property of IOBDMedia objects. It has an OSString - * value. - * @discussion - * The kIOBDMediaTypeKey property identifies the BD media type (BD-ROM, BD-R, - * BD-RE, etc). See the kIOBDMediaType contants for possible values. - */ - -#define kIOBDMediaTypeKey "Type" - -/*! - * @defined kIOBDMediaTypeROM - * The kIOBDMediaTypeKey constant for BD-ROM media. - */ - -#define kIOBDMediaTypeROM "BD-ROM" - -/*! - * @defined kIOBDMediaTypeR - * The kIOBDMediaTypeKey constant for BD-R media. - */ - -#define kIOBDMediaTypeR "BD-R" - -/*! - * @defined kIOBDMediaTypeRE - * The kIOBDMediaTypeKey constant for BD-RE media. - */ - -#define kIOBDMediaTypeRE "BD-RE" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOBDBlockStorageDriver.h> -#include <IOKit/storage/IOMedia.h> - -/*! - * @class IOBDMedia - * @abstract - * The IOBDMedia class is a random-access disk device abstraction for BDs. - * @discussion - * The IOBDMedia class is a random-access disk device abstraction for BDs. - */ - -class IOBDMedia : public IOMedia -{ - OSDeclareDefaultStructors(IOBDMedia) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - -public: - - /* - * Obtain this object's provider. We override the superclass's method to - * return a more specific subclass of IOService -- IOBDBlockStorageDriver. - * This method serves simply as a convenience to subclass developers. - */ - - virtual IOBDBlockStorageDriver * getProvider() const; - - /* - * Compare the properties in the supplied table to this object's properties. - */ - - virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); - - /*! - * @function reportKey - * @discussion - * Issue an MMC REPORT KEY command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param keyClass - * As documented by MMC. - * @param address - * As documented by MMC. - * @param grantID - * As documented by MMC. - * @param format - * As documented by MMC. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn reportKey( IOMemoryDescriptor * buffer, - UInt8 keyClass, - UInt32 address, - UInt8 grantID, - UInt8 format ); - - /*! - * @function sendKey - * @discussion - * Issue an MMC SEND KEY command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param keyClass - * As documented by MMC. - * @param grantID - * As documented by MMC. - * @param format - * As documented by MMC. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn sendKey( IOMemoryDescriptor * buffer, - UInt8 keyClass, - UInt8 grantID, - UInt8 format ); - - /*! - * @function readStructure - * @discussion - * Issue an MMC READ DISC STRUCTURE command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param format - * As documented by MMC. - * @param address - * As documented by MMC. - * @param layer - * As documented by MMC. - * @param grantID - * As documented by MMC. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readStructure( IOMemoryDescriptor * buffer, - UInt8 format, - UInt32 address, - UInt8 layer, - UInt8 grantID ); - - /*! - * @function getSpeed - * @discussion - * Get the current speed used for data transfers. - * @param kilobytesPerSecond - * Returns the current speed used for data transfers, in kB/s. - * - * kBDSpeedMin specifies the minimum speed for all BD media (1X). - * kBDSpeedMax specifies the maximum speed supported in hardware. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn getSpeed(UInt16 * kilobytesPerSecond); - - /*! - * @function setSpeed - * @discussion - * Set the speed to be used for data transfers. - * @param kilobytesPerSecond - * Speed to be used for data transfers, in kB/s. - * - * kBDSpeedMin specifies the minimum speed for all BD media (1X). - * kBDSpeedMax specifies the maximum speed supported in hardware. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn setSpeed(UInt16 kilobytesPerSecond); - - /*! - * @function readDiscInfo - * @discussion - * Issue an MMC READ DISC INFORMATION command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param type - * Reserved for future use. Set to zero. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readDiscInfo( IOMemoryDescriptor * buffer, - UInt8 type, - UInt16 * actualByteCount ); - - /*! - * @function readTrackInfo - * @discussion - * Issue an MMC READ TRACK INFORMATION command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param address - * As documented by MMC. - * @param addressType - * As documented by MMC. - * @param open - * Reserved for future use. Set to zero. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readTrackInfo( IOMemoryDescriptor * buffer, - UInt32 address, - UInt8 addressType, - UInt8 open, - UInt16 * actualByteCount ); - - /*! - * @function splitTrack - * @discussion - * Issue an MMC RESERVE TRACK command with the ARSV bit. - * @param address - * As documented by MMC. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn splitTrack(UInt32 address); - - OSMetaClassDeclareReservedUnused(IOBDMedia, 0); - OSMetaClassDeclareReservedUnused(IOBDMedia, 1); - OSMetaClassDeclareReservedUnused(IOBDMedia, 2); - OSMetaClassDeclareReservedUnused(IOBDMedia, 3); - OSMetaClassDeclareReservedUnused(IOBDMedia, 4); - OSMetaClassDeclareReservedUnused(IOBDMedia, 5); - OSMetaClassDeclareReservedUnused(IOBDMedia, 6); - OSMetaClassDeclareReservedUnused(IOBDMedia, 7); - OSMetaClassDeclareReservedUnused(IOBDMedia, 8); - OSMetaClassDeclareReservedUnused(IOBDMedia, 9); - OSMetaClassDeclareReservedUnused(IOBDMedia, 10); - OSMetaClassDeclareReservedUnused(IOBDMedia, 11); - OSMetaClassDeclareReservedUnused(IOBDMedia, 12); - OSMetaClassDeclareReservedUnused(IOBDMedia, 13); - OSMetaClassDeclareReservedUnused(IOBDMedia, 14); - OSMetaClassDeclareReservedUnused(IOBDMedia, 15); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOBDMEDIA_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOBDMediaBSDClient.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOBDMediaBSDClient.h.svn-base deleted file mode 100644 index ee356f5..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOBDMediaBSDClient.h.svn-base +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (c) 2006-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOBDMEDIABSDCLIENT_H -#define _IOBDMEDIABSDCLIENT_H - -#include <sys/ioctl.h> -#include <sys/types.h> - -#include <IOKit/storage/IOBDTypes.h> - -/* - * Definitions - * - * ioctl description - * ---------------------------- ------------------------------------------------ - * DKIOCBDREADSTRUCTURE see IOBDMedia::readStructure() in IOBDMedia.h - * - * DKIOCBDREADDISCINFO see IOBDMedia::readDiscInfo() in IOBDMedia.h - * DKIOCBDREADTRACKINFO see IOBDMedia::readTrackInfo() in IOBDMedia.h - * - * DKIOCBDREPORTKEY see IOBDMedia::reportKey() in IOBDMedia.h - * DKIOCBDSENDKEY see IOBDMedia::sendKey() in IOBDMedia.h - * - * DKIOCBDGETSPEED see IOBDMedia::getSpeed() in IOBDMedia.h - * DKIOCBDSETSPEED see IOBDMedia::setSpeed() in IOBDMedia.h - * - * in /System/Library/Frameworks/Kernel.framework/Headers/IOKit/storage/ - */ - -typedef struct -{ - uint8_t format; - - uint8_t reserved0008[3]; /* reserved, clear to zero */ - - uint32_t address; - uint8_t grantID; - uint8_t layer; - - uint8_t reserved0080[4]; /* reserved, clear to zero */ - - uint16_t bufferLength; - void * buffer; -} dk_bd_read_structure_t; - -typedef struct -{ - uint8_t format; - uint8_t keyClass; - - uint8_t reserved0016[2]; /* reserved, clear to zero */ - - uint32_t address; - uint8_t grantID; - - uint8_t reserved0072[5]; /* reserved, clear to zero */ - - uint16_t bufferLength; - void * buffer; -} dk_bd_report_key_t; - -typedef struct -{ - uint8_t format; - uint8_t keyClass; - - uint8_t reserved0016[6]; /* reserved, clear to zero */ - - uint8_t grantID; - - uint8_t reserved0072[5]; /* reserved, clear to zero */ - - uint16_t bufferLength; - void * buffer; -} dk_bd_send_key_t; - -typedef struct -{ - uint8_t reserved0000[14]; /* reserved, clear to zero */ - - uint16_t bufferLength; /* actual length on return */ - void * buffer; -} dk_bd_read_disc_info_t; - -typedef struct -{ - uint8_t reserved0000[4]; /* reserved, clear to zero */ - - uint32_t address; - uint8_t addressType; - - uint8_t reserved0072[5]; /* reserved, clear to zero */ - - uint16_t bufferLength; /* actual length on return */ - void * buffer; -} dk_bd_read_track_info_t; - -#define DKIOCBDREADSTRUCTURE _IOW('d', 160, dk_bd_read_structure_t) -#define DKIOCBDREPORTKEY _IOW('d', 161, dk_bd_report_key_t) -#define DKIOCBDSENDKEY _IOW('d', 162, dk_bd_send_key_t) - -#define DKIOCBDGETSPEED _IOR('d', 163, uint16_t) -#define DKIOCBDSETSPEED _IOW('d', 163, uint16_t) - -#define DKIOCBDREADDISCINFO _IOWR('d', 164, dk_bd_read_disc_info_t) -#define DKIOCBDREADTRACKINFO _IOWR('d', 165, dk_bd_read_track_info_t) - -#define DKIOCBDSPLITTRACK _IOW('d', 166, uint32_t) - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOBDMedia.h> -#include <IOKit/storage/IOMediaBSDClient.h> - -/* - * Class - */ - -class IOBDMediaBSDClient : public IOMediaBSDClient -{ - OSDeclareDefaultStructors(IOBDMediaBSDClient) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - -public: - - /* - * Obtain this object's provider. We override the superclass's method - * to return a more specific subclass of IOService -- IOBDMedia. This - * method serves simply as a convenience to subclass developers. - */ - - virtual IOBDMedia * getProvider() const; - - /* - * Process a BD-specific ioctl. - */ - - virtual int ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, proc_t proc); - - OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 0); - OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 1); - OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 2); - OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 3); - OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 4); - OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 5); - OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 6); - OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 7); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOBDMEDIABSDCLIENT_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOBDTypes.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOBDTypes.h.svn-base deleted file mode 100644 index f5b7927..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOBDTypes.h.svn-base +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2006-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _BDTYPES_H -#define _BDTYPES_H - -#include <IOKit/IOTypes.h> - -#pragma pack(push, 1) /* (enable 8-bit struct packing) */ - -/* - * Media Types - */ - -enum -{ - kBDMediaTypeUnknown = 0x0300, - kBDMediaTypeROM = 0x0302, /* BD-ROM */ - kBDMediaTypeRE = 0x0303, /* BD-RE */ - kBDMediaTypeR = 0x0304, /* BD-R */ - - kBDMediaTypeMin = 0x0300, - kBDMediaTypeMax = 0x03FF -}; - -typedef UInt32 BDMediaType; - -/* - * Media Speed (kB/s) - */ - -#define kBDSpeedMin 0x1126 -#define kBDSpeedMax 0xFFFF - -/* - * MMC Formats - */ - -// Read Disc Information Format -struct BDDiscInfo -{ - UInt16 dataLength; -#ifdef __LITTLE_ENDIAN__ - UInt8 discStatus:2; - UInt8 stateOfLastSession:2; - UInt8 erasable:1; - UInt8 dataType:3; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 dataType:3; - UInt8 erasable:1; - UInt8 stateOfLastSession:2; - UInt8 discStatus:2; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 reserved2; - UInt8 numberOfSessionsLSB; - UInt8 firstTrackNumberInLastSessionLSB; - UInt8 lastTrackNumberInLastSessionLSB; - UInt8 reserved4[2]; - UInt8 numberOfSessionsMSB; - UInt8 firstTrackNumberInLastSessionMSB; - UInt8 lastTrackNumberInLastSessionMSB; - UInt8 reserved6[22]; -}; -typedef struct BDDiscInfo BDDiscInfo; - -// Read Track Information Format -struct BDTrackInfo -{ - UInt16 dataLength; - UInt8 trackNumberLSB; - UInt8 sessionNumberLSB; - UInt8 reserved; -#ifdef __LITTLE_ENDIAN__ - UInt8 reserved2:5; - UInt8 damage:1; - UInt8 reserved3:2; - - UInt8 reserved4:6; - UInt8 blank:1; - UInt8 reservedTrack:1; - - UInt8 nextWritableAddressValid:1; - UInt8 lastRecordedAddressValid:1; - UInt8 reserved5:6; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 reserved3:2; - UInt8 damage:1; - UInt8 reserved2:5; - - UInt8 reservedTrack:1; - UInt8 blank:1; - UInt8 reserved4:6; - - UInt8 reserved5:6; - UInt8 lastRecordedAddressValid:1; - UInt8 nextWritableAddressValid:1; -#endif /* !__LITTLE_ENDIAN__ */ - UInt32 trackStartAddress; - UInt32 nextWritableAddress; - UInt32 freeBlocks; - UInt32 clusterSize; - UInt32 trackSize; - UInt32 lastRecordedAddress; - UInt8 trackNumberMSB; - UInt8 sessionNumberMSB; - UInt8 reserved6; - UInt8 reserved7; -}; -typedef struct BDTrackInfo BDTrackInfo; - -#pragma pack(pop) /* (reset to default struct packing) */ - -#endif /* _BDTYPES_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOBlockStorageDevice.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOBlockStorageDevice.h.svn-base deleted file mode 100644 index bbec146..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOBlockStorageDevice.h.svn-base +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOBlockStorageDevice - * @abstract - * This header contains the IOBlockStorageDevice class definition. - */ - -#ifndef _IOBLOCKSTORAGEDEVICE_H -#define _IOBLOCKSTORAGEDEVICE_H - -#include <IOKit/IOTypes.h> -#include <IOKit/storage/IOStorageDeviceCharacteristics.h> - -/*! - * @defined kIOBlockStorageDeviceClass - * @abstract - * The name of the IOBlockStorageDevice class. - */ - -#define kIOBlockStorageDeviceClass "IOBlockStorageDevice" - -/*! - * @defined kIOBlockStorageDeviceWriteCacheStateKey - * @abstract - * The name of the property used to get or set the write cache state of the - * block storage device. - */ -#define kIOBlockStorageDeviceWriteCacheStateKey "WriteCacheState" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IOMessage.h> -#include <IOKit/IOService.h> -#include <IOKit/storage/IOMedia.h> - -/* Property used for matching, so the generic driver gets the nub it wants. */ -/*! - * @defined kIOBlockStorageDeviceTypeKey - * @abstract The name of the property tested for nub type matching by the generic block - * storage driver. - */ -#define kIOBlockStorageDeviceTypeKey "device-type" -/*! - * @defined kIOBlockStorageDeviceTypeGeneric - * @abstract A character string used for nub matching. - */ -#define kIOBlockStorageDeviceTypeGeneric "Generic" - - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOBLOCKSTORAGEDEVICE_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOBlockStorageDriver.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOBlockStorageDriver.h.svn-base deleted file mode 100644 index 24ac3c2..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOBlockStorageDriver.h.svn-base +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOBlockStorageDriver - * @abstract - * This header contains the IOBlockStorageDriver class definition. - */ - -#ifndef _IOBLOCKSTORAGEDRIVER_H -#define _IOBLOCKSTORAGEDRIVER_H - -#include <IOKit/IOTypes.h> - -/*! - * @defined kIOBlockStorageDriverClass - * @abstract - * The name of the IOBlockStorageDriver class. - */ - -#define kIOBlockStorageDriverClass "IOBlockStorageDriver" - -/*! - * @defined kIOBlockStorageDriverStatisticsKey - * @abstract - * Holds a table of numeric values describing the driver's - * operating statistics. - * @discussion - * This property holds a table of numeric values describing the driver's - * operating statistics. The table is an OSDictionary, where each entry - * describes one given statistic. - */ - -#define kIOBlockStorageDriverStatisticsKey "Statistics" - -/*! - * @defined kIOBlockStorageDriverStatisticsBytesReadKey - * @abstract - * Describes the number of bytes read since the block storage - * driver was instantiated. - * @discussion - * This property describes the number of bytes read since the block storage - * driver was instantiated. It is one of the statistic entries listed under - * the top-level kIOBlockStorageDriverStatisticsKey property table. It has - * an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsBytesReadKey "Bytes (Read)" - -/*! - * @defined kIOBlockStorageDriverStatisticsBytesWrittenKey - * @abstract - * Describes the number of bytes written since the block storage - * driver was instantiated. - * @discussion - * This property describes the number of bytes written since the block storage - * driver was instantiated. It is one of the statistic entries listed under the - * top-level kIOBlockStorageDriverStatisticsKey property table. It has an - * OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsBytesWrittenKey "Bytes (Write)" - -/*! - * @defined kIOBlockStorageDriverStatisticsReadErrorsKey - * @abstract - * Describes the number of read errors encountered since the block - * storage driver was instantiated. - * @discussion - * This property describes the number of read errors encountered since the block - * storage driver was instantiated. It is one of the statistic entries listed - * under the top-level kIOBlockStorageDriverStatisticsKey property table. It - * has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsReadErrorsKey "Errors (Read)" - -/*! - * @defined kIOBlockStorageDriverStatisticsWriteErrorsKey - * @abstract - * Describes the number of write errors encountered since the - * block storage driver was instantiated. - * @discussion - * This property describes the number of write errors encountered since the - * block storage driver was instantiated. It is one of the statistic entries - * listed under the top-level kIOBlockStorageDriverStatisticsKey property table. - * It has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsWriteErrorsKey "Errors (Write)" - -/*! - * @defined kIOBlockStorageDriverStatisticsLatentReadTimeKey - * @abstract - * Describes the number of nanoseconds of latency during reads - * since the block storage driver was instantiated. - * @discussion - * This property describes the number of nanoseconds of latency during reads - * since the block storage driver was instantiated. It is one of the statistic - * entries listed under the top-level kIOBlockStorageDriverStatisticsKey - * property table. It has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsLatentReadTimeKey "Latency Time (Read)" - -/*! - * @defined kIOBlockStorageDriverStatisticsLatentWriteTimeKey - * @abstract - * Describes the number of nanoseconds of latency during writes - * since the block storage driver was instantiated. - * @discussion - * This property describes the number of nanoseconds of latency during writes - * since the block storage driver was instantiated. It is one of the statistic - * entries listed under the top-level kIOBlockStorageDriverStatisticsKey - * property table. It has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsLatentWriteTimeKey "Latency Time (Write)" - -/*! - * @defined kIOBlockStorageDriverStatisticsReadsKey - * @abstract - * Describes the number of read operations processed since the - * block storage driver was instantiated. - * @discussion - * This property describes the number of read operations processed since the - * block storage driver was instantiated. It is one of the statistic entries - * listed under the top-level kIOBlockStorageDriverStatisticsKey property table. - * It has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsReadsKey "Operations (Read)" - -/*! - * @defined kIOBlockStorageDriverStatisticsWritesKey - * @abstract - * Describes the number of write operations processed since the - * block storage driver was instantiated. - * @discussion - * This property describes the number of write operations processed since the - * block storage driver was instantiated. It is one of the statistic entries - * listed under the top-level kIOBlockStorageDriverStatisticsKey property table. - * It has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsWritesKey "Operations (Write)" - -/*! - * @defined kIOBlockStorageDriverStatisticsReadRetriesKey - * @abstract - * Describes the number of read retries required since the block - * storage driver was instantiated. - * @discussion - * This property describes the number of read retries required since the block - * storage driver was instantiated. It is one of the statistic entries listed - * under the top-level kIOBlockStorageDriverStatisticsKey property table. It - * has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsReadRetriesKey "Retries (Read)" - -/*! - * @defined kIOBlockStorageDriverStatisticsWriteRetriesKey - * @abstract - * Describes the number of write retries required since the block - * storage driver was instantiated. - * @discussion - * This property describes the number of write retries required since the block - * storage driver was instantiated. It is one of the statistic entries listed - * under the top-level kIOBlockStorageDriverStatisticsKey property table. It - * has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsWriteRetriesKey "Retries (Write)" - -/*! - * @defined kIOBlockStorageDriverStatisticsTotalReadTimeKey - * @abstract - * Describes the number of nanoseconds spent performing reads - * since the block storage driver was instantiated. - * @discussion - * This property describes the number of nanoseconds spent performing reads - * since the block storage driver was instantiated. It is one of the statistic - * entries listed under the top-level kIOBlockStorageDriverStatisticsKey - * property table. It has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsTotalReadTimeKey "Total Time (Read)" - -/*! - * @defined kIOBlockStorageDriverStatisticsTotalWriteTimeKey - * @abstract - * Describes the number of nanoseconds spent performing writes - * since the block storage driver was instantiated. - * @discussion - * This property describes the number of nanoseconds spent performing writes - * since the block storage driver was instantiated. It is one of the statistic - * entries listed under the top-level kIOBlockStorageDriverStatisticsKey - * property table. It has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsTotalWriteTimeKey "Total Time (Write)" - -/*! - * @enum IOMediaState - * @abstract - * The different states that getMediaState() can report. - * @constant kIOMediaStateOffline - * Media is not available. - * @constant kIOMediaStateOnline - * Media is available and ready for operations. - * @constant kIOMediaStateBusy - * Media is available, but not ready for operations. - */ - -enum -{ - kIOMediaStateOffline = 0, - kIOMediaStateOnline = 1, - kIOMediaStateBusy = 2 -}; - -typedef UInt32 IOMediaState; - -#endif /* !_IOBLOCKSTORAGEDRIVER_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOCDBlockStorageDevice.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOCDBlockStorageDevice.h.svn-base deleted file mode 100644 index 706da40..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOCDBlockStorageDevice.h.svn-base +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOCDBlockStorageDevice - * @abstract - * This header contains the IOCDBlockStorageDevice class definition. - */ - -#ifndef _IOCDBLOCKSTORAGEDEVICE_H -#define _IOCDBLOCKSTORAGEDEVICE_H - -#include <IOKit/storage/IOCDTypes.h> - -/*! - * @defined kIOCDBlockStorageDeviceClass - * @abstract - * kIOCDBlockStorageDeviceClass is the name of the IOCDBlockStorageDevice class. - * @discussion - * kIOCDBlockStorageDeviceClass is the name of the IOCDBlockStorageDevice class. - */ - -#define kIOCDBlockStorageDeviceClass "IOCDBlockStorageDevice" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOBlockStorageDevice.h> - -/* Property used for matching, so the generic driver gets the nub it wants. */ -#define kIOBlockStorageDeviceTypeCDROM "CDROM" - - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOCDBLOCKSTORAGEDEVICE_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOCDBlockStorageDriver.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOCDBlockStorageDriver.h.svn-base deleted file mode 100644 index f88a406..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOCDBlockStorageDriver.h.svn-base +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * IOCDBlockStorageDriver.h - * - * This class implements CD functionality, independent of - * the physical connection protocol (e.g. SCSI, ATA, USB). - * - * A protocol-specific provider implements the functionality using an appropriate - * protocol and commands. - */ - -#ifndef _IOCDBLOCKSTORAGEDRIVER_H -#define _IOCDBLOCKSTORAGEDRIVER_H - -#include <IOKit/IOTypes.h> -#include <IOKit/storage/IOCDBlockStorageDevice.h> -#include <IOKit/storage/IOCDTypes.h> -#include <IOKit/storage/IOBlockStorageDriver.h> - -/*! - * @defined kIOCDBlockStorageDriverClass - * @abstract - * kIOCDBlockStorageDriverClass is the name of the IOCDBlockStorageDriver class. - * @discussion - * kIOCDBlockStorageDriverClass is the name of the IOCDBlockStorageDriver class. - */ - -#define kIOCDBlockStorageDriverClass "IOCDBlockStorageDriver" - -#endif diff --git a/i386/include/IOKit/storage/.svn/text-base/IOCDMedia.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOCDMedia.h.svn-base deleted file mode 100644 index 85ad72d..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOCDMedia.h.svn-base +++ /dev/null @@ -1,553 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOCDMedia - * @abstract - * This header contains the IOCDMedia class definition. - */ - -#ifndef _IOCDMEDIA_H -#define _IOCDMEDIA_H - -/*! - * @defined kIOCDMediaClass - * @abstract - * kIOCDMediaClass is the name of the IOCDMedia class. - * @discussion - * kIOCDMediaClass is the name of the IOCDMedia class. - */ - -#define kIOCDMediaClass "IOCDMedia" - -/*! - * @defined kIOCDMediaTOCKey - * @abstract - * kIOCDMediaTOCKey is a property of IOCDMedia objects. It has an OSData value - * and a CDTOC structure. - * @discussion - * The kIOCDMediaTOCKey property contains the CD's full table of contents, - * formatted as a CDTOC structure. The CDTOC structure is same as what is - * returned by a READ TOC command, format 0x02. All fields in the TOC are - * guaranteed to be binary-encoded (no BCD-encoded numbers are ever passed). - */ - -#define kIOCDMediaTOCKey "TOC" - -/*! - * @defined kIOCDMediaTypeKey - * @abstract - * kIOCDMediaTypeKey is a property of IOCDMedia objects. It has an OSString - * value. - * @discussion - * The kIOCDMediaTypeKey property identifies the CD media type (CD-ROM, CD-R, - * CD-RW, etc). See the kIOCDMediaType contants for possible values. - */ - -#define kIOCDMediaTypeKey "Type" - -/*! - * @defined kIOCDMediaTypeROM - * The kIOCDMediaTypeKey constant for CD-ROM media (inclusive of the CD-I, - * CD-ROM XA, and CD Audio standards, and mixed mode combinations thereof). - */ - -#define kIOCDMediaTypeROM "CD-ROM" - -/*! - * @defined kIOCDMediaTypeR - * The kIOCDMediaTypeKey constant for CD Recordable (CD-R) media. - */ - -#define kIOCDMediaTypeR "CD-R" - -/*! - * @defined kIOCDMediaTypeRW - * The kIOCDMediaTypeKey constant for CD ReWritable (CD-RW) media. - */ - -#define kIOCDMediaTypeRW "CD-RW" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOCDBlockStorageDriver.h> -#include <IOKit/storage/IOMedia.h> - -/*! - * @class IOCDMedia - * @abstract - * The IOCDMedia class is a random-access disk device abstraction for CDs. - * @discussion - * The IOCDMedia class is a random-access disk device abstraction for CDs. It - * extends the IOMedia class by implementing special CD APIs, such as readCD, - * and publishing the TOC as a property of the IOCDMedia object. - */ - -class IOCDMedia : public IOMedia -{ - OSDeclareDefaultStructors(IOCDMedia) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - -public: - - using IOStorage::read; - using IOStorage::write; - - /* - * Obtain this object's provider. We override the superclass's method to - * return a more specific subclass of IOService -- IOCDBlockStorageDriver. - * This method serves simply as a convenience to subclass developers. - */ - - virtual IOCDBlockStorageDriver * getProvider() const; - - /* - * Compare the properties in the supplied table to this object's properties. - */ - - virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); - - /*! - * @function read - * @discussion - * Read data from the storage object at the specified byte offset into the - * specified buffer, asynchronously. When the read completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the read. - * @param client - * Client requesting the read. - * @param byteStart - * Starting byte offset for the data transfer. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - * @param completion - * Completion routine to call once the data transfer is complete. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - */ - - virtual void read(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); - - /* - * @function write - * @discussion - * Write data into the storage object at the specified byte offset from the - * specified buffer, asynchronously. When the write completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the write. - * @param client - * Client requesting the write. - * @param byteStart - * Starting byte offset for the data transfer. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - * @param completion - * Completion routine to call once the data transfer is complete. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - */ - - virtual void write(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); - - /*! - * @function readCD - * @discussion - * Read data from the CD media object at the specified byte offset into the - * specified buffer, asynchronously. Special areas of the CD sector can be - * read via this method, such as the header and subchannel data. When the - * read completes, the caller will be notified via the specified completion - * action. - * - * The buffer will be retained for the duration of the read. - * @param client - * Client requesting the read. - * @param byteStart - * Starting byte offset for the data transfer (see sectorArea parameter). - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param sectorArea - * Sector area(s) to read. The sum of each area's size defines the natural - * block size of the media for the call. This should be taken into account - * when computing the address of byteStart. See IOCDTypes.h. - * @param sectorType - * Sector type that is expected. The data transfer is terminated as soon as - * data is encountered that does not match the expected type. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - * @param completion - * Completion routine to call once the data transfer is complete. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - */ - -#ifdef __LP64__ - virtual void readCD(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); -#else /* !__LP64__ */ - virtual void readCD(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageCompletion completion); -#endif /* !__LP64__ */ - - /*! - * @function readCD - * @discussion - * Read data from the CD media object at the specified byte offset into the - * specified buffer, synchronously. Special areas of the CD sector can be - * read via this method, such as the header and subchannel data. When the - * read completes, this method will return to the caller. The actual byte - * count field is optional. - * @param client - * Client requesting the read. - * @param byteStart - * Starting byte offset for the data transfer (see sectorArea parameter). - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param sectorArea - * Sector area(s) to read. The sum of each area's size defines the natural - * block size of the media for the call. This should be taken into account - * when computing the address of byteStart. See IOCDTypes.h. - * @param sectorType - * Sector type that is expected. The data transfer is terminated as soon as - * data is encountered that does not match the expected type. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - -#ifdef __LP64__ - virtual IOReturn readCD(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageAttributes * attributes = 0, - UInt64 * actualByteCount = 0); -#else /* !__LP64__ */ - virtual IOReturn readCD(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - CDSectorArea sectorArea, - CDSectorType sectorType, - UInt64 * actualByteCount = 0); -#endif /* !__LP64__ */ - - /*! - * @function readISRC - * @discussion - * Read the International Standard Recording Code for the specified track. - * @param track - * Track number from which to read the ISRC. - * @param isrc - * Buffer for the ISRC data. Buffer contents will be zero-terminated. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn readISRC(UInt8 track, CDISRC isrc); - - /*! - * @function readMCN - * @discussion - * Read the Media Catalog Number (also known as the Universal Product Code). - * @param mcn - * Buffer for the MCN data. Buffer contents will be zero-terminated. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn readMCN(CDMCN mcn); - - /*! - * @function getTOC - * @discussion - * Get the full Table Of Contents. - * - * All CDTOC fields passed across I/O Kit APIs are guaranteed to be - * binary-encoded (no BCD-encoded numbers are ever passed). - * @result - * Returns a pointer to the TOC buffer (do not deallocate). - */ - - virtual CDTOC * getTOC(); - - /*! - * @function getSpeed - * @discussion - * Get the current speed used for data transfers. - * @param kilobytesPerSecond - * Returns the current speed used for data transfers, in kB/s. - * - * kCDSpeedMin specifies the minimum speed for all CD media (1X). - * kCDSpeedMax specifies the maximum speed supported in hardware. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn getSpeed(UInt16 * kilobytesPerSecond); /* 10.1.0 */ - - /*! - * @function setSpeed - * @discussion - * Set the speed to be used for data transfers. - * @param kilobytesPerSecond - * Speed to be used for data transfers, in kB/s. - * - * kCDSpeedMin specifies the minimum speed for all CD media (1X). - * kCDSpeedMax specifies the maximum speed supported in hardware. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn setSpeed(UInt16 kilobytesPerSecond); /* 10.1.0 */ - - /*! - * @function readTOC - * @discussion - * Issue an MMC READ TOC/PMA/ATIP command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param format - * As documented by MMC. - * @param formatAsTime - * As documented by MMC. - * @param trackOrSessionNumber - * As documented by MMC. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readTOC(IOMemoryDescriptor * buffer, - CDTOCFormat format, - UInt8 formatAsTime, - UInt8 trackOrSessionNumber, - UInt16 * actualByteCount); /* 10.1.3 */ - - /*! - * @function readDiscInfo - * @discussion - * Issue an MMC READ DISC INFORMATION command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readDiscInfo(IOMemoryDescriptor * buffer, - UInt16 * actualByteCount); /* 10.1.3 */ - - /*! - * @function readTrackInfo - * @discussion - * Issue an MMC READ TRACK INFORMATION command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param address - * As documented by MMC. - * @param addressType - * As documented by MMC. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readTrackInfo(IOMemoryDescriptor * buffer, - UInt32 address, - CDTrackInfoAddressType addressType, - UInt16 * actualByteCount); /* 10.1.3 */ - - /* - * @function writeCD - * @discussion - * Write data into the CD media object at the specified byte offset from the - * specified buffer, asynchronously. When the write completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the write. - * @param client - * Client requesting the write. - * @param byteStart - * Starting byte offset for the data transfer (see sectorArea parameter). - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param sectorArea - * Sector area(s) to write. The sum of each area's size defines the natural - * block size of the media for the call. This should be taken into account - * when computing the address of byteStart. See IOCDTypes.h. - * @param sectorType - * Sector type that is expected. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - * @param completion - * Completion routine to call once the data transfer is complete. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - */ - -#ifdef __LP64__ - virtual void writeCD(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); -#else /* !__LP64__ */ - virtual void writeCD(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageCompletion completion); /* 10.2.0 */ -#endif /* !__LP64__ */ - - /* - * @function writeCD - * @discussion - * Write data into the CD media object at the specified byte offset from the - * specified buffer, synchronously. When the write completes, this method - * will return to the caller. The actual byte count field is optional. - * @param client - * Client requesting the write. - * @param byteStart - * Starting byte offset for the data transfer (see sectorArea parameter). - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param sectorArea - * Sector area(s) to write. The sum of each area's size defines the natural - * block size of the media for the call. This should be taken into account - * when computing the address of byteStart. See IOCDTypes.h. - * @param sectorType - * Sector type that is expected. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - -#ifdef __LP64__ - virtual IOReturn writeCD(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageAttributes * attributes = 0, - UInt64 * actualByteCount = 0); -#else /* !__LP64__ */ - virtual IOReturn writeCD(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - CDSectorArea sectorArea, - CDSectorType sectorType, - UInt64 * actualByteCount = 0); /* 10.2.0 */ -#endif /* !__LP64__ */ - -#ifdef __LP64__ - OSMetaClassDeclareReservedUnused(IOCDMedia, 0); - OSMetaClassDeclareReservedUnused(IOCDMedia, 1); - OSMetaClassDeclareReservedUnused(IOCDMedia, 2); - OSMetaClassDeclareReservedUnused(IOCDMedia, 3); - OSMetaClassDeclareReservedUnused(IOCDMedia, 4); - OSMetaClassDeclareReservedUnused(IOCDMedia, 5); - OSMetaClassDeclareReservedUnused(IOCDMedia, 6); -#else /* !__LP64__ */ - OSMetaClassDeclareReservedUsed(IOCDMedia, 0); - OSMetaClassDeclareReservedUsed(IOCDMedia, 1); - OSMetaClassDeclareReservedUsed(IOCDMedia, 2); - OSMetaClassDeclareReservedUsed(IOCDMedia, 3); - OSMetaClassDeclareReservedUsed(IOCDMedia, 4); - OSMetaClassDeclareReservedUsed(IOCDMedia, 5); - OSMetaClassDeclareReservedUsed(IOCDMedia, 6); -#endif /* !__LP64__ */ - OSMetaClassDeclareReservedUnused(IOCDMedia, 7); - OSMetaClassDeclareReservedUnused(IOCDMedia, 8); - OSMetaClassDeclareReservedUnused(IOCDMedia, 9); - OSMetaClassDeclareReservedUnused(IOCDMedia, 10); - OSMetaClassDeclareReservedUnused(IOCDMedia, 11); - OSMetaClassDeclareReservedUnused(IOCDMedia, 12); - OSMetaClassDeclareReservedUnused(IOCDMedia, 13); - OSMetaClassDeclareReservedUnused(IOCDMedia, 14); - OSMetaClassDeclareReservedUnused(IOCDMedia, 15); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOCDMEDIA_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOCDMediaBSDClient.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOCDMediaBSDClient.h.svn-base deleted file mode 100644 index ce31863..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOCDMediaBSDClient.h.svn-base +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOCDMEDIABSDCLIENT_H -#define _IOCDMEDIABSDCLIENT_H - -#include <sys/ioctl.h> - -#include <IOKit/storage/IOCDTypes.h> - -/* - * Definitions - * - * ioctl description - * ---------------------------- ------------------------------------------------ - * DKIOCCDREAD see IOCDMedia::readCD() in IOCDMedia.h - * DKIOCCDREADTOC see IOCDMedia::readTOC() in IOCDMedia.h - * - * DKIOCCDREADDISCINFO see IOCDMedia::readDiscInfo() in IOCDMedia.h - * DKIOCCDREADTRACKINFO see IOCDMedia::readTrackInfo() in IOCDMedia.h - * - * DKIOCCDREADISRC see IOCDMedia::readISRC() in IOCDMedia.h - * DKIOCCDREADMCN see IOCDMedia::readMCN() in IOCDMedia.h - * - * DKIOCCDGETSPEED see IOCDMedia::getSpeed() in IOCDMedia.h - * DKIOCCDSETSPEED see IOCDMedia::setSpeed() in IOCDMedia.h - * - * in /System/Library/Frameworks/Kernel.framework/Headers/IOKit/storage/ - */ - -typedef struct -{ - uint64_t offset; - - uint8_t sectorArea; - uint8_t sectorType; - -#ifdef __LP64__ - uint8_t reserved0080[10]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0080[6]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ - - uint32_t bufferLength; /* actual length on return */ - void * buffer; -} dk_cd_read_t; - -typedef struct -{ - CDISRC isrc; - uint8_t track; - - uint8_t reserved0112[2]; /* reserved, clear to zero */ -} dk_cd_read_isrc_t; - -typedef struct -{ - CDMCN mcn; - - uint8_t reserved0112[2]; /* reserved, clear to zero */ -} dk_cd_read_mcn_t; - -typedef struct -{ - uint8_t format; - uint8_t formatAsTime; - - uint8_t reserved0016[5]; /* reserved, clear to zero */ - - union - { - uint8_t session; - uint8_t track; - } address; - -#ifdef __LP64__ - uint8_t reserved0064[6]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0064[2]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ - - uint16_t bufferLength; /* actual length on return */ - void * buffer; -} dk_cd_read_toc_t; - -typedef struct -{ -#ifdef __LP64__ - uint8_t reserved0000[14]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0000[10]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ - - uint16_t bufferLength; /* actual length on return */ - void * buffer; -} dk_cd_read_disc_info_t; - -typedef struct -{ - uint8_t reserved0000[4]; /* reserved, clear to zero */ - - uint32_t address; - uint8_t addressType; - -#ifdef __LP64__ - uint8_t reserved0072[5]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0072[1]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ - - uint16_t bufferLength; /* actual length on return */ - void * buffer; -} dk_cd_read_track_info_t; - -#define DKIOCCDREAD _IOWR('d', 96, dk_cd_read_t) - -#define DKIOCCDREADISRC _IOWR('d', 97, dk_cd_read_isrc_t) -#define DKIOCCDREADMCN _IOWR('d', 98, dk_cd_read_mcn_t) - -#define DKIOCCDGETSPEED _IOR('d', 99, uint16_t) -#define DKIOCCDSETSPEED _IOW('d', 99, uint16_t) - -#define DKIOCCDREADTOC _IOWR('d', 100, dk_cd_read_toc_t) - -#define DKIOCCDREADDISCINFO _IOWR('d', 101, dk_cd_read_disc_info_t) -#define DKIOCCDREADTRACKINFO _IOWR('d', 102, dk_cd_read_track_info_t) - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOCDMedia.h> -#include <IOKit/storage/IOMediaBSDClient.h> - -/* - * Class - */ - -class IOCDMediaBSDClient : public IOMediaBSDClient -{ - OSDeclareDefaultStructors(IOCDMediaBSDClient) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - -public: - - /* - * Obtain this object's provider. We override the superclass's method - * to return a more specific subclass of IOService -- IOCDMedia. This - * method serves simply as a convenience to subclass developers. - */ - - virtual IOCDMedia * getProvider() const; - - /* - * Process a CD-specific ioctl. - */ - - virtual int ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, proc_t proc); - - OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 0); - OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 1); - OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 2); - OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 3); - OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 4); - OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 5); - OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 6); - OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 7); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOCDMEDIABSDCLIENT_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOCDPartitionScheme.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOCDPartitionScheme.h.svn-base deleted file mode 100644 index 1ff58c4..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOCDPartitionScheme.h.svn-base +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOCDPartitionScheme - * @abstract - * This header contains the IOCDPartitionScheme class definition. - */ - -#ifndef _IOCDPARTITIONSCHEME_H -#define _IOCDPARTITIONSCHEME_H - -#include <IOKit/storage/IOCDTypes.h> - -/*! - * @defined kIOCDPartitionSchemeClass - * @abstract - * kIOCDPartitionSchemeClass is the name of the IOCDPartitionScheme class. - * @discussion - * kIOCDPartitionSchemeClass is the name of the IOCDPartitionScheme class. - */ - -#define kIOCDPartitionSchemeClass "IOCDPartitionScheme" - -/*! - * @defined kIOMediaSessionIDKey - * @abstract - * kIOMediaSessionIDKey is property of IOMedia objects. It has an OSNumber - * value. - * @discussion - * The kIOMediaSessionIDKey property is placed into each IOMedia instance - * created by the CD partition scheme. It identifies the session number - * the track was recorded on. - */ - -#define kIOMediaSessionIDKey "Session ID" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOCDMedia.h> -#include <IOKit/storage/IOPartitionScheme.h> - -/* - * Class - */ - -class IOCDPartitionScheme : public IOPartitionScheme -{ - OSDeclareDefaultStructors(IOCDPartitionScheme); - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - - OSSet * _partitions; /* (set of media objects representing partitions) */ - - /* - * Free all of this object's outstanding resources. - */ - - virtual void free(void); - - /* - * Scan the provider media for CD partitions (in TOC). Returns the set - * of media objects representing each of the partitions (the retain for - * the set is passed to the caller), or null should no CD partitions be - * found. The default probe score can be adjusted up or down, based on - * the confidence of the scan. - */ - - virtual OSSet * scan(SInt32 * score); - - /* - * Ask whether the given partition appears to be corrupt. A partition that - * is corrupt will cause the failure of the CD partition scheme altogether. - */ - - virtual bool isPartitionCorrupt( CDTOCDescriptor * partition, - UInt64 partitionSize, - UInt32 partitionBlockSize, - CDSectorType partitionBlockType, - CDTOC * toc ); - - /* - * Ask whether the given partition appears to be invalid. A partition that - * is invalid will cause it to be skipped in the scan, but will not cause a - * failure of the CD partition scheme. - */ - - virtual bool isPartitionInvalid( CDTOCDescriptor * partition, - UInt64 partitionSize, - UInt32 partitionBlockSize, - CDSectorType partitionBlockType, - CDTOC * toc ); - - /* - * Instantiate a new media object to represent the given partition. - */ - - virtual IOMedia * instantiateMediaObject( - CDTOCDescriptor * partition, - UInt64 partitionSize, - UInt32 partitionBlockSize, - CDSectorType partitionBlockType, - CDTOC * toc ); - - /* - * Allocate a new media object (called from instantiateMediaObject). - */ - - virtual IOMedia * instantiateDesiredMediaObject( - CDTOCDescriptor * partition, - UInt64 partitionSize, - UInt32 partitionBlockSize, - CDSectorType partitionBlockType, - CDTOC * toc ); - -public: - - /* - * Initialize this object's minimal state. - */ - - virtual bool init(OSDictionary * properties = 0); - - /* - * Scan the provider media for CD partitions. - */ - - virtual IOService * probe(IOService * provider, SInt32 * score); - - /* - * Determine whether the provider media contains CD partitions. - */ - - virtual bool start(IOService * provider); - - /* - * Read data from the storage object at the specified byte offset into the - * specified buffer, asynchronously. When the read completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the read. - * - * For the CD partition scheme, we convert the read from a partition - * object into the appropriate readCD command to our provider media. - */ - - virtual void read(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); - - /* - * Write data into the storage object at the specified byte offset from the - * specified buffer, asynchronously. When the write completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the write. - * - * For the CD partition scheme, we convert the write from a partition - * object into the appropriate writeCD command to our provider media. - */ - - virtual void write(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); - - /* - * Obtain this object's provider. We override the superclass's method - * to return a more specific subclass of OSObject -- IOCDMedia. This - * method serves simply as a convenience to subclass developers. - */ - - virtual IOCDMedia * getProvider() const; - - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 0); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 1); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 2); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 3); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 4); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 5); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 6); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 7); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 8); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 9); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 10); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 11); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 12); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 13); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 14); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 15); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOCDPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOCDTypes.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOCDTypes.h.svn-base deleted file mode 100644 index 6b1af29..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOCDTypes.h.svn-base +++ /dev/null @@ -1,492 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOCDTYPES_H -#define _IOCDTYPES_H - -#include <IOKit/IOTypes.h> -#include <libkern/OSByteOrder.h> - -#pragma pack(push, 1) /* (enable 8-bit struct packing) */ - -/* - * Minutes, Seconds, Frames (M:S:F) - * - * All M:S:F values passed across I/O Kit APIs are guaranteed to be - * binary-encoded numbers (no BCD-encoded numbers are ever passed). - */ - -typedef struct -{ - UInt8 minute; - UInt8 second; - UInt8 frame; -} CDMSF; - -/* - * Media Catalogue Numbers (MCN), International Standard Recording Codes (ISRC) - * - * All MCN and ISRC values passed across I/O Kit APIs are guaranteed - * to have a zero-terminating byte, for convenient use as C strings. - */ - -#define kCDMCNMaxLength 13 -#define kCDISRCMaxLength 12 - -typedef char CDMCN [kCDMCNMaxLength + 1]; -typedef char CDISRC[kCDISRCMaxLength + 1]; - -/* - * Audio Status - * - * All CDAudioStatus fields passed across I/O Kit APIs are guaranteed to - * be binary-encoded numbers (no BCD-encoded numbers are ever passed). - */ - -#define kCDAudioStatusUnsupported 0x00 -#define kCDAudioStatusActive 0x11 -#define kCDAudioStatusPaused 0x12 -#define kCDAudioStatusSuccess 0x13 -#define kCDAudioStatusFailure 0x14 -#define kCDAudioStatusNone 0x15 - -typedef struct -{ - UInt8 status; - struct - { - CDMSF time; - struct - { - UInt8 index; - UInt8 number; - CDMSF time; - } track; - } position; -} CDAudioStatus; - -/* - * Table Of Contents - * - * All CDTOC fields passed across I/O Kit APIs are guaranteed to be - * binary-encoded numbers (no BCD-encoded numbers are ever passed). - */ - -typedef struct -{ - UInt8 session; -#ifdef __LITTLE_ENDIAN__ - UInt8 control:4, adr:4; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 adr:4, control:4; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 tno; - UInt8 point; - CDMSF address; - UInt8 zero; - CDMSF p; -} CDTOCDescriptor; - -typedef struct -{ - UInt16 length; - UInt8 sessionFirst; - UInt8 sessionLast; - CDTOCDescriptor descriptors[0]; -} CDTOC; - -/* - * Table Of Contents Descriptor Count Convenience Function - */ - -static inline UInt32 CDTOCGetDescriptorCount(CDTOC * toc) -{ - UInt32 tocSize = OSSwapBigToHostInt16(toc->length) + (UInt32) sizeof(toc->length); - - return (tocSize < (UInt32) sizeof(CDTOC)) ? 0 : - (tocSize - (UInt32) sizeof(CDTOC)) / (UInt32) sizeof(CDTOCDescriptor); -} - -/* - * M:S:F To LBA Convenience Function - */ - -static inline UInt32 CDConvertMSFToLBA(CDMSF msf) -{ - return (((msf.minute * 60U) + msf.second) * 75U) + msf.frame - 150U; -} - -/* - * M:S:F To Clipped LBA Convenience Function - */ - -static inline UInt32 CDConvertMSFToClippedLBA(CDMSF msf) -{ - return (msf.minute == 0 && msf.second <= 1) ? 0 : CDConvertMSFToLBA(msf); -} - -/* - * LBA To M:S:F Convenience Function - */ - -static inline CDMSF CDConvertLBAToMSF(UInt32 lba) -{ - CDMSF msf; - - lba += 150; - msf.minute = (lba / (75 * 60)); - msf.second = (lba % (75 * 60)) / 75; - msf.frame = (lba % (75 )); - - return msf; -} - -/* - * Track Number To M:S:F Convenience Function - * - * The CDTOC structure is assumed to be complete, that is, none of - * the descriptors are missing or clipped due to an insufficiently - * sized buffer holding the CDTOC contents. - */ - -static inline CDMSF CDConvertTrackNumberToMSF(UInt8 track, CDTOC * toc) -{ - UInt32 count = CDTOCGetDescriptorCount(toc); - UInt32 i; - CDMSF msf = { 0xFF, 0xFF, 0xFF }; - - for (i = 0; i < count; i++) - { - if (toc->descriptors[i].point == track && toc->descriptors[i].adr == 1) - { - msf = toc->descriptors[i].p; - break; - } - } - - return msf; -} - -/* - * Sector Areas, Sector Types - * - * Bytes Per Type CDDA Mode1 Mode2 Mode2Form1 Mode2Form2 - * Per Area +----------+----------+----------+----------+----------+ - * Sync | 0 | 12 | 12 | 12 | 12 | - * Header | 0 | 4 | 4 | 4 | 4 | - * SubHeader | 0 | 0 | 0 | 8 | 8 | - * User | 2352 | 2048 | 2336 | 2048 | 2328 | - * Auxiliary | 0 | 288 | 0 | 280 | 0 | - * ErrorFlags | 294 | 294 | 294 | 294 | 294 | - * SubChannel | 96 | 96 | 96 | 96 | 96 | - * SubChannelQ | 16 | 16 | 16 | 16 | 16 | - * +----------+----------+----------+----------+----------+ - */ - -typedef enum -{ - kCDSectorAreaSync = 0x80, - kCDSectorAreaHeader = 0x20, - kCDSectorAreaSubHeader = 0x40, - kCDSectorAreaUser = 0x10, - kCDSectorAreaAuxiliary = 0x08, - kCDSectorAreaErrorFlags = 0x02, - kCDSectorAreaSubChannel = 0x01, - kCDSectorAreaSubChannelQ = 0x04 -} CDSectorArea; - -typedef enum -{ - kCDSectorTypeUnknown = 0x00, - kCDSectorTypeCDDA = 0x01, - kCDSectorTypeMode1 = 0x02, - kCDSectorTypeMode2 = 0x03, - kCDSectorTypeMode2Form1 = 0x04, - kCDSectorTypeMode2Form2 = 0x05, - kCDSectorTypeCount = 0x06 -} CDSectorType; - -typedef enum -{ - kCDSectorSizeCDDA = 2352, - kCDSectorSizeMode1 = 2048, - kCDSectorSizeMode2 = 2336, - kCDSectorSizeMode2Form1 = 2048, - kCDSectorSizeMode2Form2 = 2328, - kCDSectorSizeWhole = 2352 -} CDSectorSize; - -/* - * Media Types - */ - -typedef enum -{ - kCDMediaTypeUnknown = 0x0100, - kCDMediaTypeROM = 0x0102, /* CD-ROM */ - kCDMediaTypeR = 0x0104, /* CD-R */ - kCDMediaTypeRW = 0x0105, /* CD-RW */ - - kCDMediaTypeMin = 0x0100, - kCDMediaTypeMax = 0x01FF -}; - -typedef UInt32 CDMediaType; - -/* - * Media Speed (kB/s) - */ - -#define kCDSpeedMin 0x00B0 -#define kCDSpeedMax 0xFFFF - -/* - * MMC Formats - */ - -// Read Table Of Contents Format Types -typedef UInt8 CDTOCFormat; -enum -{ - kCDTOCFormatTOC = 0x02, // CDTOC - kCDTOCFormatPMA = 0x03, // CDPMA - kCDTOCFormatATIP = 0x04, // CDATIP - kCDTOCFormatTEXT = 0x05 // CDTEXT -}; - -// Read Table Of Contents Format 0x03 -struct CDPMADescriptor -{ - UInt8 reserved; -#ifdef __LITTLE_ENDIAN__ - UInt8 control:4, adr:4; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 adr:4, control:4; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 tno; - UInt8 point; - CDMSF address; - UInt8 zero; - CDMSF p; -}; -typedef struct CDPMADescriptor CDPMADescriptor; - -struct CDPMA -{ - UInt16 dataLength; - UInt8 reserved; - UInt8 reserved2; - CDPMADescriptor descriptors[0]; -}; -typedef struct CDPMA CDPMA; - -// Read Table Of Contents Format 0x04 -struct CDATIP -{ - UInt16 dataLength; - UInt8 reserved[2]; -#ifdef __LITTLE_ENDIAN__ - UInt8 referenceSpeed:3; - UInt8 reserved3:1; - UInt8 indicativeTargetWritingPower:3; - UInt8 reserved2:1; - - UInt8 reserved5:6; - UInt8 unrestrictedUse:1; - UInt8 reserved4:1; - - UInt8 a3Valid:1; - UInt8 a2Valid:1; - UInt8 a1Valid:1; - UInt8 discSubType:3; - UInt8 discType:1; - UInt8 reserved6:1; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 reserved2:1; - UInt8 indicativeTargetWritingPower:3; - UInt8 reserved3:1; - UInt8 referenceSpeed:3; - - UInt8 reserved4:1; - UInt8 unrestrictedUse:1; - UInt8 reserved5:6; - - UInt8 reserved6:1; - UInt8 discType:1; - UInt8 discSubType:3; - UInt8 a1Valid:1; - UInt8 a2Valid:1; - UInt8 a3Valid:1; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 reserved7; - CDMSF startTimeOfLeadIn; - UInt8 reserved8; - CDMSF lastPossibleStartTimeOfLeadOut; - UInt8 reserved9; - UInt8 a1[3]; - UInt8 reserved10; - UInt8 a2[3]; - UInt8 reserved11; - UInt8 a3[3]; - UInt8 reserved12; -}; -typedef struct CDATIP CDATIP; - -// Read Table Of Contents Format 0x05 -struct CDTEXTDescriptor -{ - UInt8 packType; - UInt8 trackNumber; - UInt8 sequenceNumber; -#ifdef __LITTLE_ENDIAN__ - UInt8 characterPosition:4; - UInt8 blockNumber:3; - UInt8 doubleByteCharacterCode:1; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 doubleByteCharacterCode:1; - UInt8 blockNumber:3; - UInt8 characterPosition:4; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 textData[12]; - UInt8 reserved[2]; -}; -typedef struct CDTEXTDescriptor CDTEXTDescriptor; - -struct CDTEXT -{ - UInt16 dataLength; - UInt8 reserved; - UInt8 reserved2; - CDTEXTDescriptor descriptors[0]; -}; -typedef struct CDTEXT CDTEXT; - -// Read Disc Information Format -struct CDDiscInfo -{ - UInt16 dataLength; -#ifdef __LITTLE_ENDIAN__ - UInt8 discStatus:2; - UInt8 stateOfLastSession:2; - UInt8 erasable:1; - UInt8 reserved:3; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 reserved:3; - UInt8 erasable:1; - UInt8 stateOfLastSession:2; - UInt8 discStatus:2; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 numberOfFirstTrack; - UInt8 numberOfSessionsLSB; - UInt8 firstTrackNumberInLastSessionLSB; - UInt8 lastTrackNumberInLastSessionLSB; -#ifdef __LITTLE_ENDIAN__ - UInt8 reserved3:5; - UInt8 unrestrictedUse:1; - UInt8 discBarCodeValid:1; - UInt8 discIdentificationValid:1; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 discIdentificationValid:1; - UInt8 discBarCodeValid:1; - UInt8 unrestrictedUse:1; - UInt8 reserved3:5; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 discType; - UInt8 numberOfSessionsMSB; - UInt8 firstTrackNumberInLastSessionMSB; - UInt8 lastTrackNumberInLastSessionMSB; - UInt32 discIdentification; - UInt8 reserved7; - CDMSF lastSessionLeadInStartTime; - UInt8 reserved8; - CDMSF lastPossibleStartTimeOfLeadOut; - UInt8 discBarCode[8]; - UInt8 reserved9; - UInt8 numberOfOPCTableEntries; - UInt8 opcTableEntries[0]; -}; -typedef struct CDDiscInfo CDDiscInfo; - -// Read Track Information Address Types -typedef UInt8 CDTrackInfoAddressType; -enum -{ - kCDTrackInfoAddressTypeLBA = 0x00, - kCDTrackInfoAddressTypeTrackNumber = 0x01, - kCDTrackInfoAddressTypeSessionNumber = 0x02, -}; - -// Read Track Information Format -struct CDTrackInfo -{ - UInt16 dataLength; - UInt8 trackNumberLSB; - UInt8 sessionNumberLSB; - UInt8 reserved; -#ifdef __LITTLE_ENDIAN__ - UInt8 trackMode:4; - UInt8 copy:1; - UInt8 damage:1; - UInt8 reserved3:2; - - UInt8 dataMode:4; - UInt8 fixedPacket:1; - UInt8 packet:1; - UInt8 blank:1; - UInt8 reservedTrack:1; - - UInt8 nextWritableAddressValid:1; - UInt8 lastRecordedAddressValid:1; - UInt8 reserved5:6; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 reserved3:2; - UInt8 damage:1; - UInt8 copy:1; - UInt8 trackMode:4; - - UInt8 reservedTrack:1; - UInt8 blank:1; - UInt8 packet:1; - UInt8 fixedPacket:1; - UInt8 dataMode:4; - - UInt8 reserved5:6; - UInt8 lastRecordedAddressValid:1; - UInt8 nextWritableAddressValid:1; -#endif /* !__LITTLE_ENDIAN__ */ - UInt32 trackStartAddress; - UInt32 nextWritableAddress; - UInt32 freeBlocks; - UInt32 fixedPacketSize; - UInt32 trackSize; - UInt32 lastRecordedAddress; - UInt8 trackNumberMSB; - UInt8 sessionNumberMSB; - UInt8 reserved6; - UInt8 reserved7; -}; -typedef struct CDTrackInfo CDTrackInfo; - -#pragma pack(pop) /* (reset to default struct packing) */ - -#endif /* _IOCDTYPES_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IODVDBlockStorageDevice.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IODVDBlockStorageDevice.h.svn-base deleted file mode 100644 index 161651c..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IODVDBlockStorageDevice.h.svn-base +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IODVDBlockStorageDevice - * @abstract - * This header contains the IODVDBlockStorageDevice class definition. - */ - -#ifndef _IODVDBLOCKSTORAGEDEVICE_H -#define _IODVDBLOCKSTORAGEDEVICE_H - -#include <IOKit/storage/IODVDTypes.h> - -/*! - * @defined kIODVDBlockStorageDeviceClass - * @abstract - * kIODVDBlockStorageDeviceClass is the name of the IODVDBlockStorageDevice class. - * @discussion - * kIODVDBlockStorageDeviceClass is the name of the IODVDBlockStorageDevice class. - */ - -#define kIODVDBlockStorageDeviceClass "IODVDBlockStorageDevice" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOCDBlockStorageDevice.h> - -/* Property used for matching, so the generic driver gets the nub it wants. */ -#define kIOBlockStorageDeviceTypeDVD "DVD" - -/*! - * @class - * IODVDBlockStorageDevice : public IOCDBlockStorageDevice - * @abstract - * The IODVDBlockStorageDevice class is a generic DVD block storage device - * abstraction. - * @discussion - * This class is the protocol for generic DVD functionality, independent of - * the physical connection protocol (e.g. SCSI, ATA, USB). - * - * The APIs are the union of CD APIs and all - * necessary new low-level DVD APIs. - * - * A subclass implements relay methods that translate our requests into - * calls to a protocol- and device-specific provider. - */ - -class IODVDBlockStorageDevice : public IOCDBlockStorageDevice { - - OSDeclareAbstractStructors(IODVDBlockStorageDevice) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - -public: - - /* Overrides from IORegistryEntry */ - - virtual bool init(OSDictionary * properties); - - /* New APIs for DVD */ - - virtual IOReturn reportKey(IOMemoryDescriptor *buffer,const DVDKeyClass keyClass, - const UInt32 lba,const UInt8 agid,const DVDKeyFormat keyFormat) = 0; - - virtual IOReturn sendKey(IOMemoryDescriptor *buffer,const DVDKeyClass keyClass, - const UInt8 agid,const DVDKeyFormat keyFormat) = 0; - -#ifdef __LP64__ - virtual IOReturn readDVDStructure(IOMemoryDescriptor *buffer,const DVDStructureFormat format, - const UInt32 address,const UInt8 layer,const UInt8 agid) = 0; -#else /* !__LP64__ */ - virtual IOReturn readDVDStructure(IOMemoryDescriptor *buffer,const DVDStructureFormat format, - const UInt32 address,const UInt8 layer,const UInt8 agid); /* 10.1.0 */ -#endif /* !__LP64__ */ - -#ifdef __LP64__ - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 0); -#else /* !__LP64__ */ - OSMetaClassDeclareReservedUsed(IODVDBlockStorageDevice, 0); -#endif /* !__LP64__ */ - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 1); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 2); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 3); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 4); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 5); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 6); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 7); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 8); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 9); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 10); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 11); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 12); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 13); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 14); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 15); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 16); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 17); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 18); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 19); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 20); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 21); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 22); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 23); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 24); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 25); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 26); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 27); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 28); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 29); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 30); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 31); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IODVDBLOCKSTORAGEDEVICE_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IODVDBlockStorageDriver.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IODVDBlockStorageDriver.h.svn-base deleted file mode 100644 index d9471f6..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IODVDBlockStorageDriver.h.svn-base +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * IODVDBlockStorageDriver.h - * - * This class implements DVD functionality, independent of - * the physical connection protocol (e.g. SCSI, ATA, USB). - * - * A protocol-specific provider implements the functionality using an appropriate - * protocol and commands. - */ - -#ifndef _IODVDBLOCKSTORAGEDRIVER_H -#define _IODVDBLOCKSTORAGEDRIVER_H - -#include <IOKit/IOTypes.h> -#include <IOKit/storage/IOCDBlockStorageDriver.h> -#include <IOKit/storage/IODVDBlockStorageDevice.h> -#include <IOKit/storage/IODVDTypes.h> - -/*! - * @defined kIODVDBlockStorageDriverClass - * @abstract - * kIODVDBlockStorageDriverClass is the name of the IODVDBlockStorageDriver class. - * @discussion - * kIODVDBlockStorageDriverClass is the name of the IODVDBlockStorageDriver class. - */ - -#define kIODVDBlockStorageDriverClass "IODVDBlockStorageDriver" - -class IODVDBlockStorageDevice; - -/*! - * @class - * IODVDBlockStorageDriver : public IOCDBlockStorageDriver - * @abstract - * Generic DVD Driver. - * @discussion - * Storage drivers are split into two parts: the Generic Driver handles - * all generic device issues, independent of the lower-level transport - * mechanism (e.g. SCSI, ATA, USB, FireWire). All storage operations - * at the Generic Driver level are translated into a series of generic - * device operations. These operations are passed via the Device Nub - * to a Transport Driver, which implements the appropriate - * transport-dependent protocol to execute these operations. - * - * To determine the write-protect state of a device (or media), for - * example, the generic driver would issue a call to the - * Transport Driver's reportWriteProtection method. If this were a SCSI - * device, its Transport Driver would issue a Mode Sense command to - * extract the write-protection status bit. The Transport Driver then - * reports true or false to the generic driver. - * - * The generic driver therefore has no knowledge of, or involvement - * with, the actual commands and mechanisms used to communicate with - * the device. It is expected that the generic driver will rarely, if - * ever, need to be subclassed to handle device idiosyncrasies; rather, - * the Transport Driver should be changed via overrides. - * - * A generic driver could be subclassed to create a different type of - * generic device. The generic driver IODVDBlockStorageDriver class is a subclass - * of IOCDBlockStorageDriver, adding DVD functions. Similarly, the Transport Driver - * IODVDBlockStorageDevice is a subclass of IOCDBlockStorageDevice, adding DVD - * functions. -*/ - -class IODVDBlockStorageDriver : public IOCDBlockStorageDriver { - - OSDeclareDefaultStructors(IODVDBlockStorageDriver) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - - /* Overrides of IOCDBlockStorageDriver. */ - - virtual IOReturn acceptNewMedia(void); - - /* End of IOCDBlockStorageDriver overrides. */ - -public: - - /* - * Obtain this object's provider. We override the superclass's method to - * return a more specific subclass of IOService -- IODVDBlockStorageDevice. - * This method serves simply as a convenience to subclass developers. - */ - - virtual IODVDBlockStorageDevice * getProvider() const; - - /* Overrides of IOCDBlockStorageDriver: */ - - virtual const char * getDeviceTypeName(void); - virtual IOMedia * instantiateDesiredMediaObject(void); - virtual IOMedia * instantiateMediaObject(UInt64 base,UInt64 byteSize, - UInt32 blockSize,char *mediaName); - - /* End of IOCDBlockStorageDriver overrides. */ - - /*! - * @function reportKey - * @abstract - * Get key info from the DVD drive. - * @discussion - * This function handles the getting of key- and encryption-related data for the drive. - * @param buffer - * A buffer containing information, as documented in the specification - * "MtFuji Commands For Multimedia Devices." - * @param keyClass - * As documented by MtFuji. See DVDKeyClass. - * @param lba - * As documented by MtFuji. - * @param agid - * As documented by MtFuji. - * @param keyFormat - * As documented by MtFuji. See DVDKeyFormat. - */ - virtual IOReturn reportKey(IOMemoryDescriptor *buffer,const DVDKeyClass keyClass, - const UInt32 lba,const UInt8 agid,const DVDKeyFormat keyFormat); - - /*! - * @function sendKey - * @abstract - * Send key info to the DVD drive. - * @discussion - * This function handles the setting of key- and encryption-related data for the drive. - * @param buffer - * A buffer containing information, as documented in the specification - * "MtFuji Commands For Multimedia Devices." - * @param keyClass - * As documented by MtFuji. See DVDKeyClass. - * @param agid - * As documented by MtFuji. - * @param keyFormat - * As documented by MtFuji. See DVDKeyFormat. - */ - virtual IOReturn sendKey(IOMemoryDescriptor *buffer,const DVDKeyClass keyClass, - const UInt8 agid,const DVDKeyFormat keyFormat); - - /*! - * @function readStructure - * @abstract - * Get control structures from the DVD media. - * @discussion - * This function handles the getting of control structure data for the media. - * @param buffer - * A buffer containing information, as documented in the specification - * "MtFuji Commands For Multimedia Devices." - * @param format - * As documented by MtFuji. See DVDStructureFormat. - * @param address - * As documented by MtFuji. - * @param layer - * As documented by MtFuji. - * @param agid - * As documented by MtFuji. - */ - virtual IOReturn readStructure(IOMemoryDescriptor *buffer,const DVDStructureFormat format, - const UInt32 address,const UInt8 layer,const UInt8 agid); /* 10.1.0 */ - -#ifdef __LP64__ - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 0); -#else /* !__LP64__ */ - OSMetaClassDeclareReservedUsed(IODVDBlockStorageDriver, 0); -#endif /* !__LP64__ */ - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 1); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 2); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 3); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 4); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 5); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 6); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 7); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 8); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 9); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 10); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 11); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 12); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 13); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 14); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 15); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 16); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 17); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 18); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 19); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 20); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 21); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 22); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 23); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 24); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 25); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 26); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 27); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 28); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 29); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 30); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 31); -}; -#endif diff --git a/i386/include/IOKit/storage/.svn/text-base/IODVDMedia.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IODVDMedia.h.svn-base deleted file mode 100644 index 02119c3..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IODVDMedia.h.svn-base +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IODVDMedia - * @abstract - * This header contains the IODVDMedia class definition. - */ - -#ifndef _IODVDMEDIA_H -#define _IODVDMEDIA_H - -/*! - * @defined kIODVDMediaClass - * @abstract - * kIODVDMediaClass is the name of the IODVDMedia class. - * @discussion - * kIODVDMediaClass is the name of the IODVDMedia class. - */ - -#define kIODVDMediaClass "IODVDMedia" - -/*! - * @defined kIODVDMediaTypeKey - * @abstract - * kIODVDMediaTypeKey is a property of IODVDMedia objects. It has an OSString - * value. - * @discussion - * The kIODVDMediaTypeKey property identifies the DVD media type (DVD-ROM, - * DVD-R, DVD-RW, DVD+RW, DVD-RAM, etc). See the kIODVDMediaType contants - * for possible values. - */ - -#define kIODVDMediaTypeKey "Type" - -/*! - * @defined kIODVDMediaTypeROM - * The kIODVDMediaTypeKey constant for DVD-ROM media. - */ - -#define kIODVDMediaTypeROM "DVD-ROM" - -/*! - * @defined kIODVDMediaTypeR - * The kIODVDMediaTypeKey constant for DVD Recordable (DVD-R) media. - */ - -#define kIODVDMediaTypeR "DVD-R" - -/*! - * @defined kIODVDMediaTypeRW - * The kIODVDMediaTypeKey constant for DVD ReWritable (DVD-RW) media. - */ - -#define kIODVDMediaTypeRW "DVD-RW" - -/*! - * @defined kIODVDMediaTypePlusR - * The kIODVDMediaTypeKey constant for DVD "Plus" Recordable (DVD+R) media. - */ - -#define kIODVDMediaTypePlusR "DVD+R" - -/*! - * @defined kIODVDMediaTypePlusRW - * The kIODVDMediaTypeKey constant for DVD "Plus" ReWritable (DVD+RW) media. - */ - -#define kIODVDMediaTypePlusRW "DVD+RW" - -/*! - * @defined kIODVDMediaTypeRAM - * The kIODVDMediaTypeKey constant for DVD-RAM media. - */ - -#define kIODVDMediaTypeRAM "DVD-RAM" - -/*! - * @defined kIODVDMediaTypeHDROM - * The kIODVDMediaTypeKey constant for HD DVD-ROM media. - */ - -#define kIODVDMediaTypeHDROM "HD DVD-ROM" - -/*! - * @defined kIODVDMediaTypeHDR - * The kIODVDMediaTypeKey constant for HD DVD Recordable (HD DVD-R) media. - */ - -#define kIODVDMediaTypeHDR "HD DVD-R" - -/*! - * @defined kIODVDMediaTypeHDRW - * The kIODVDMediaTypeKey constant for HD DVD ReWritable (HD DVD-RW) media. - */ - -#define kIODVDMediaTypeHDRW "HD DVD-RW" - -/*! - * @defined kIODVDMediaTypeHDRAM - * The kIODVDMediaTypeKey constant for HD DVD-RAM media. - */ - -#define kIODVDMediaTypeHDRAM "HD DVD-RAM" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IODVDBlockStorageDriver.h> -#include <IOKit/storage/IOMedia.h> - -/*! - * @class IODVDMedia - * @abstract - * The IODVDMedia class is a random-access disk device abstraction for DVDs. - * @discussion - * The IODVDMedia class is a random-access disk device abstraction for DVDs. - */ - -class IODVDMedia : public IOMedia -{ - OSDeclareDefaultStructors(IODVDMedia) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - -public: - - /* - * Obtain this object's provider. We override the superclass's method to - * return a more specific subclass of IOService -- IODVDBlockStorageDriver. - * This method serves simply as a convenience to subclass developers. - */ - - virtual IODVDBlockStorageDriver * getProvider() const; - - /* - * Compare the properties in the supplied table to this object's properties. - */ - - virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); - - /*! - * @function reportKey - * @discussion - * Issue an MMC REPORT KEY command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. Pass null for the kDVDKeyFormatAGID_Invalidate format - * case. - * @param keyClass - * As documented by MMC. - * @param address - * As documented by MMC. - * @param grantID - * As documented by MMC. - * @param format - * As documented by MMC. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn reportKey( IOMemoryDescriptor * buffer, - const DVDKeyClass keyClass, - const UInt32 address, - const UInt8 grantID, - const DVDKeyFormat format ); /* 10.1.0 */ - - /*! - * @function sendKey - * @discussion - * Issue an MMC SEND KEY command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. Pass null for the kDVDKeyFormatAGID_Invalidate format - * case. - * @param keyClass - * As documented by MMC. - * @param grantID - * As documented by MMC. - * @param format - * As documented by MMC. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn sendKey( IOMemoryDescriptor * buffer, - const DVDKeyClass keyClass, - const UInt8 grantID, - const DVDKeyFormat format ); /* 10.1.0 */ - - /*! - * @function readStructure - * @discussion - * Issue an MMC READ DVD STRUCTURE command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param format - * As documented by MMC. - * @param address - * As documented by MMC. - * @param layer - * As documented by MMC. - * @param grantID - * As documented by MMC. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readStructure( IOMemoryDescriptor * buffer, - const DVDStructureFormat format, - const UInt32 address, - const UInt8 layer, - const UInt8 grantID ); /* 10.1.0 */ - - /*! - * @function getSpeed - * @discussion - * Get the current speed used for data transfers. - * @param kilobytesPerSecond - * Returns the current speed used for data transfers, in kB/s. - * - * kDVDSpeedMin specifies the minimum speed for all DVD media (1X). - * kDVDSpeedMax specifies the maximum speed supported in hardware. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn getSpeed(UInt16 * kilobytesPerSecond); /* 10.1.0 */ - - /*! - * @function setSpeed - * @discussion - * Set the speed to be used for data transfers. - * @param kilobytesPerSecond - * Speed to be used for data transfers, in kB/s. - * - * kDVDSpeedMin specifies the minimum speed for all DVD media (1X). - * kDVDSpeedMax specifies the maximum speed supported in hardware. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn setSpeed(UInt16 kilobytesPerSecond); /* 10.1.0 */ - - /*! - * @function readDiscInfo - * @discussion - * Issue an MMC READ DISC INFORMATION command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readDiscInfo( IOMemoryDescriptor * buffer, - UInt16 * actualByteCount ); /* 10.2.0 */ - - /*! - * @function readRZoneInfo - * @discussion - * Issue an MMC READ RZONE INFORMATION (READ TRACK INFORMATION) command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param address - * As documented by MMC. - * @param addressType - * As documented by MMC. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readRZoneInfo( IOMemoryDescriptor * buffer, - UInt32 address, - DVDRZoneInfoAddressType addressType, - UInt16 * actualByteCount ); /* 10.2.0 */ - -#ifdef __LP64__ - OSMetaClassDeclareReservedUnused(IODVDMedia, 0); - OSMetaClassDeclareReservedUnused(IODVDMedia, 1); - OSMetaClassDeclareReservedUnused(IODVDMedia, 2); - OSMetaClassDeclareReservedUnused(IODVDMedia, 3); - OSMetaClassDeclareReservedUnused(IODVDMedia, 4); - OSMetaClassDeclareReservedUnused(IODVDMedia, 5); - OSMetaClassDeclareReservedUnused(IODVDMedia, 6); -#else /* !__LP64__ */ - OSMetaClassDeclareReservedUsed(IODVDMedia, 0); - OSMetaClassDeclareReservedUsed(IODVDMedia, 1); - OSMetaClassDeclareReservedUsed(IODVDMedia, 2); - OSMetaClassDeclareReservedUsed(IODVDMedia, 3); - OSMetaClassDeclareReservedUsed(IODVDMedia, 4); - OSMetaClassDeclareReservedUsed(IODVDMedia, 5); - OSMetaClassDeclareReservedUsed(IODVDMedia, 6); -#endif /* !__LP64__ */ - OSMetaClassDeclareReservedUnused(IODVDMedia, 7); - OSMetaClassDeclareReservedUnused(IODVDMedia, 8); - OSMetaClassDeclareReservedUnused(IODVDMedia, 9); - OSMetaClassDeclareReservedUnused(IODVDMedia, 10); - OSMetaClassDeclareReservedUnused(IODVDMedia, 11); - OSMetaClassDeclareReservedUnused(IODVDMedia, 12); - OSMetaClassDeclareReservedUnused(IODVDMedia, 13); - OSMetaClassDeclareReservedUnused(IODVDMedia, 14); - OSMetaClassDeclareReservedUnused(IODVDMedia, 15); - OSMetaClassDeclareReservedUnused(IODVDMedia, 16); - OSMetaClassDeclareReservedUnused(IODVDMedia, 17); - OSMetaClassDeclareReservedUnused(IODVDMedia, 18); - OSMetaClassDeclareReservedUnused(IODVDMedia, 19); - OSMetaClassDeclareReservedUnused(IODVDMedia, 20); - OSMetaClassDeclareReservedUnused(IODVDMedia, 21); - OSMetaClassDeclareReservedUnused(IODVDMedia, 22); - OSMetaClassDeclareReservedUnused(IODVDMedia, 23); - OSMetaClassDeclareReservedUnused(IODVDMedia, 24); - OSMetaClassDeclareReservedUnused(IODVDMedia, 25); - OSMetaClassDeclareReservedUnused(IODVDMedia, 26); - OSMetaClassDeclareReservedUnused(IODVDMedia, 27); - OSMetaClassDeclareReservedUnused(IODVDMedia, 28); - OSMetaClassDeclareReservedUnused(IODVDMedia, 29); - OSMetaClassDeclareReservedUnused(IODVDMedia, 30); - OSMetaClassDeclareReservedUnused(IODVDMedia, 31); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IODVDMEDIA_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IODVDMediaBSDClient.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IODVDMediaBSDClient.h.svn-base deleted file mode 100644 index 2258bf6..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IODVDMediaBSDClient.h.svn-base +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IODVDMEDIABSDCLIENT_H -#define _IODVDMEDIABSDCLIENT_H - -#include <sys/ioctl.h> - -#include <IOKit/storage/IODVDTypes.h> - -/* - * Definitions - * - * ioctl description - * ---------------------------- ------------------------------------------------ - * DKIOCDVDREADSTRUCTURE see IODVDMedia::readStructure() in IODVDMedia.h - * - * DKIOCDVDREADDISCINFO see IODVDMedia::readDiscInfo() in IODVDMedia.h - * DKIOCDVDREADRZONEINFO see IODVDMedia::readRZoneInfo() in IODVDMedia.h - * - * DKIOCDVDREPORTKEY see IODVDMedia::reportKey() in IODVDMedia.h - * DKIOCDVDSENDKEY see IODVDMedia::sendKey() in IODVDMedia.h - * - * DKIOCDVDGETSPEED see IODVDMedia::getSpeed() in IODVDMedia.h - * DKIOCDVDSETSPEED see IODVDMedia::setSpeed() in IODVDMedia.h - * - * in /System/Library/Frameworks/Kernel.framework/Headers/IOKit/storage/ - */ - -typedef struct -{ - uint8_t format; - - uint8_t reserved0008[3]; /* reserved, clear to zero */ - - uint32_t address; - uint8_t grantID; - uint8_t layer; - -#ifdef __LP64__ - uint8_t reserved0080[4]; /* reserved, clear to zero */ -#endif /* __LP64__ */ - - uint16_t bufferLength; - void * buffer; -} dk_dvd_read_structure_t; - -typedef struct -{ - uint8_t format; - uint8_t keyClass; - - uint8_t reserved0016[2]; /* reserved, clear to zero */ - - uint32_t address; - uint8_t grantID; - -#ifdef __LP64__ - uint8_t reserved0072[5]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0072[1]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ - - uint16_t bufferLength; - void * buffer; -} dk_dvd_report_key_t; - -typedef struct -{ - uint8_t format; - uint8_t keyClass; - - uint8_t reserved0016[6]; /* reserved, clear to zero */ - - uint8_t grantID; - -#ifdef __LP64__ - uint8_t reserved0072[5]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0072[1]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ - - uint16_t bufferLength; - void * buffer; -} dk_dvd_send_key_t; - -typedef struct -{ -#ifdef __LP64__ - uint8_t reserved0000[14]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0000[10]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ - - uint16_t bufferLength; /* actual length on return */ - void * buffer; -} dk_dvd_read_disc_info_t; - -typedef struct -{ - uint8_t reserved0000[4]; /* reserved, clear to zero */ - - uint32_t address; - uint8_t addressType; - -#ifdef __LP64__ - uint8_t reserved0072[5]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0072[1]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ - - uint16_t bufferLength; /* actual length on return */ - void * buffer; -} dk_dvd_read_rzone_info_t; - -#define DKIOCDVDREADSTRUCTURE _IOW('d', 128, dk_dvd_read_structure_t) -#define DKIOCDVDREPORTKEY _IOW('d', 129, dk_dvd_report_key_t) -#define DKIOCDVDSENDKEY _IOW('d', 130, dk_dvd_send_key_t) - -#define DKIOCDVDGETSPEED _IOR('d', 131, uint16_t) -#define DKIOCDVDSETSPEED _IOW('d', 131, uint16_t) - -#define DKIOCDVDREADDISCINFO _IOWR('d', 132, dk_dvd_read_disc_info_t) -#define DKIOCDVDREADRZONEINFO _IOWR('d', 133, dk_dvd_read_rzone_info_t) - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IODVDMedia.h> -#include <IOKit/storage/IOMediaBSDClient.h> - -/* - * Class - */ - -class IODVDMediaBSDClient : public IOMediaBSDClient -{ - OSDeclareDefaultStructors(IODVDMediaBSDClient) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - -public: - - /* - * Obtain this object's provider. We override the superclass's method - * to return a more specific subclass of IOService -- IODVDMedia. This - * method serves simply as a convenience to subclass developers. - */ - - virtual IODVDMedia * getProvider() const; - - /* - * Process a DVD-specific ioctl. - */ - - virtual int ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, proc_t proc); - - OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 0); - OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 1); - OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 2); - OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 3); - OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 4); - OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 5); - OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 6); - OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 7); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IODVDMEDIABSDCLIENT_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IODVDTypes.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IODVDTypes.h.svn-base deleted file mode 100644 index 039b8fb..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IODVDTypes.h.svn-base +++ /dev/null @@ -1,451 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IODVDTYPES_H -#define _IODVDTYPES_H - -#include <IOKit/IOTypes.h> - -#pragma pack(push, 1) /* (enable 8-bit struct packing) */ - -/* - * Media Types - */ - -enum -{ - kDVDMediaTypeUnknown = 0x0200, - kDVDMediaTypeROM = 0x0202, /* DVD-ROM */ - kDVDMediaTypeRAM = 0x0203, /* DVD-RAM */ - kDVDMediaTypeR = 0x0204, /* DVD-R */ - kDVDMediaTypeRW = 0x0205, /* DVD-RW */ - kDVDMediaTypePlusRW = 0x0206, /* DVD+RW */ - kDVDMediaTypePlusR = 0x0207, /* DVD+R */ - kDVDMediaTypeHDROM = 0x0212, /* HD DVD-ROM */ - kDVDMediaTypeHDRAM = 0x0213, /* HD DVD-RAM */ - kDVDMediaTypeHDR = 0x0214, /* HD DVD-R */ - kDVDMediaTypeHDRW = 0x0215, /* HD DVD-RW */ - - kDVDMediaTypeMin = 0x0200, - kDVDMediaTypeMax = 0x02FF -}; - -typedef UInt32 DVDMediaType; - -/* - * Media Speed (kB/s) - */ - -#define kDVDSpeedMin 0x0546 -#define kDVDSpeedMax 0xFFFF - -/* - * MMC Formats - */ - -typedef UInt8 DVDCPRMRegionCode; -enum -{ - kDVDCPRMRegion1 = 0xFE, - kDVDCPRMRegion2 = 0xFD, - kDVDCPRMRegion3 = 0xFB, - kDVDCPRMRegion4 = 0xF7, - kDVDCPRMRegion5 = 0xEF, - kDVDCPRMRegion6 = 0xDF -}; - -typedef UInt8 DVDRegionalPlaybackControlScheme; -enum -{ - kDVDRegionalPlaybackControlSchemePhase1 = 0x00, - kDVDRegionalPlaybackControlSchemePhase2 = 0x01 -}; - -typedef UInt8 DVDBookType; -enum -{ - kDVDBookTypeROM = 0x0, - kDVDBookTypeRAM = 0x1, - kDVDBookTypeR = 0x2, - kDVDBookTypeRW = 0x3, - kDVDBookTypeHDROM = 0x4, - kDVDBookTypeHDRAM = 0x5, - kDVDBookTypeHDR = 0x6, - kDVDBookTypeHDRW = 0x7, - kDVDBookTypePlusRW = 0x9, - kDVDBookTypePlusR = 0xA, - kDVDBookTypePlusRWDoubleLayer = 0xD, - kDVDBookTypePlusRDoubleLayer = 0xE -}; - -#ifdef __LP64__ -typedef UInt8 DVDKeyClass; -enum -#else /* !__LP64__ */ -enum DVDKeyClass -#endif /* !__LP64__ */ -{ - kDVDKeyClassCSS_CPPM_CPRM = 0x00, - kDVDKeyClassRSSA = 0x01 -}; -#ifndef __LP64__ -typedef enum DVDKeyClass DVDKeyClass; -#endif /* !__LP64__ */ - -#ifdef __LP64__ -typedef UInt8 DVDKeyFormat; -enum -#else /* !__LP64__ */ -enum DVDKeyFormat -#endif /* !__LP64__ */ -{ - kDVDKeyFormatAGID_CSS = 0x00, - kDVDKeyFormatChallengeKey = 0x01, - kDVDKeyFormatKey1 = 0x02, - kDVDKeyFormatKey2 = 0x03, - kDVDKeyFormatTitleKey = 0x04, - kDVDKeyFormatASF = 0x05, - kDVDKeyFormatSetRegion = 0x06, - kDVDKeyFormatRegionState = 0x08, - kDVDKeyFormatAGID_CSS2 = 0x10, - kDVDKeyFormatAGID_CPRM = 0x11, - kDVDKeyFormatAGID_Invalidate = 0x3F -}; -#ifndef __LP64__ -typedef enum DVDKeyFormat DVDKeyFormat; -#endif /* !__LP64__ */ - -typedef UInt8 DVDStructureFormat; -enum -{ - kDVDStructureFormatPhysicalFormatInfo = 0x00, - kDVDStructureFormatCopyrightInfo = 0x01, - kDVDStructureFormatDiscKeyInfo = 0x02, - // skip BCA - kDVDStructureFormatManufacturingInfo = 0x04 -}; - -// Read DVD Structures Format 0x00 -struct DVDPhysicalFormatInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; -#ifdef __LITTLE_ENDIAN__ - // Byte 0 - UInt8 partVersion:4; - UInt8 bookType:4; - - // Byte 1 - UInt8 minimumRate:4; - UInt8 discSize:4; - - // Byte 2 - UInt8 layerType:4; - UInt8 trackPath:1; - UInt8 numberOfLayers:2; - UInt8 reserved2:1; - - // Byte 3 - UInt8 trackDensity:4; - UInt8 linearDensity:4; -#else /* !__LITTLE_ENDIAN__ */ - // Byte 0 - UInt8 bookType:4; - UInt8 partVersion:4; - - // Byte 1 - UInt8 discSize:4; - UInt8 minimumRate:4; - - // Byte 2 - UInt8 reserved2:1; - UInt8 numberOfLayers:2; - UInt8 trackPath:1; - UInt8 layerType:4; - - // Byte 3 - UInt8 linearDensity:4; - UInt8 trackDensity:4; -#endif /* !__LITTLE_ENDIAN__ */ - - // Bytes 4-15 - UInt8 zero1; // always 0x00 - UInt8 startingPhysicalSectorNumberOfDataArea[3]; - UInt8 zero2; // always 0x00 - UInt8 endPhysicalSectorNumberOfDataArea[3]; - UInt8 zero3; // always 0x00 - UInt8 endSectorNumberInLayerZero[3]; - - // Byte 16 -#ifdef __LITTLE_ENDIAN__ - UInt8 reserved1:7; - UInt8 bcaFlag:1; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 bcaFlag:1; - UInt8 reserved1:7; -#endif /* !__LITTLE_ENDIAN__ */ - - // Bytes 17-2047 - UInt8 mediaSpecific[2031]; -}; -typedef struct DVDPhysicalFormatInfo DVDPhysicalFormatInfo; - -// Read DVD Structures Format 0x01 -struct DVDCopyrightInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; - UInt8 copyrightProtectionSystemType; - DVDCPRMRegionCode regionMask; - UInt8 reserved2[2]; -}; -typedef struct DVDCopyrightInfo DVDCopyrightInfo; - -// Read DVD Structures Format 0x02 -struct DVDDiscKeyInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; - UInt8 discKeyStructures[2048]; -}; -typedef struct DVDDiscKeyInfo DVDDiscKeyInfo; - -// Read DVD Structures Format 0x04 -struct DVDManufacturingInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; - UInt8 discManufacturingInfo[2048]; -}; -typedef struct DVDManufacturingInfo DVDManufacturingInfo; - -// ReportKey Format 0x00 -struct DVDAuthenticationGrantIDInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; - UInt8 reserved2[3]; -#ifdef __LITTLE_ENDIAN__ - UInt8 reservedBits:6; - UInt8 grantID:2; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 grantID:2; - UInt8 reservedBits:6; -#endif /* !__LITTLE_ENDIAN__ */ -}; -typedef struct DVDAuthenticationGrantIDInfo DVDAuthenticationGrantIDInfo; - -// ReportKey and SendKey Format 0x01 -struct DVDChallengeKeyInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; - UInt8 challengeKeyValue[10]; - UInt8 reserved2[2]; -}; -typedef struct DVDChallengeKeyInfo DVDChallengeKeyInfo; - -// ReportKey Format 0x02 -struct DVDKey1Info -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; - UInt8 key1Value[5]; - UInt8 reserved2[3]; -}; -typedef struct DVDKey1Info DVDKey1Info; - -// SendKey Format 0x03 -struct DVDKey2Info -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; - UInt8 key2Value[5]; - UInt8 reserved2[3]; -}; -typedef struct DVDKey2Info DVDKey2Info; - -// ReportKey Format 0x04 -struct DVDTitleKeyInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; -#ifdef __LITTLE_ENDIAN__ - UInt8 CP_MOD:4; - UInt8 CGMS:2; - UInt8 CP_SEC:1; - UInt8 CPM:1; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 CPM:1; - UInt8 CP_SEC:1; - UInt8 CGMS:2; - UInt8 CP_MOD:4; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 titleKeyValue[5]; - UInt8 reserved2[2]; -}; -typedef struct DVDTitleKeyInfo DVDTitleKeyInfo; - -// ReportKey Format 0x05 -struct DVDAuthenticationSuccessFlagInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; - UInt8 reserved2[3]; -#ifdef __LITTLE_ENDIAN__ - UInt8 successFlag:1; - UInt8 reservedBits:7; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 reservedBits:7; - UInt8 successFlag:1; -#endif /* !__LITTLE_ENDIAN__ */ -}; -typedef struct DVDAuthenticationSuccessFlagInfo DVDAuthenticationSuccessFlagInfo; - -// ReportKey Format 0x08 -struct DVDRegionPlaybackControlInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; -#ifdef __LITTLE_ENDIAN__ - UInt8 numberUserResets:3; - UInt8 numberVendorResets:3; - UInt8 typeCode:2; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 typeCode:2; - UInt8 numberVendorResets:3; - UInt8 numberUserResets:3; -#endif /* !__LITTLE_ENDIAN__ */ - DVDCPRMRegionCode driveRegion; - DVDRegionalPlaybackControlScheme rpcScheme; - UInt8 reserved2; -}; -typedef struct DVDRegionPlaybackControlInfo DVDRegionPlaybackControlInfo; - -// Read Disc Information Format -struct DVDDiscInfo -{ - UInt16 dataLength; -#ifdef __LITTLE_ENDIAN__ - UInt8 discStatus:2; - UInt8 stateOfLastBorder:2; - UInt8 erasable:1; - UInt8 reserved:3; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 reserved:3; - UInt8 erasable:1; - UInt8 stateOfLastBorder:2; - UInt8 discStatus:2; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 reserved2; - UInt8 numberOfBordersLSB; - UInt8 firstRZoneNumberInLastBorderLSB; - UInt8 lastRZoneNumberInLastBorderLSB; -#ifdef __LITTLE_ENDIAN__ - UInt8 reserved3:5; - UInt8 unrestrictedUse:1; - UInt8 discBarCodeValid:1; - UInt8 reserved4:1; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 reserved4:1; - UInt8 discBarCodeValid:1; - UInt8 unrestrictedUse:1; - UInt8 reserved3:5; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 reserved5; - UInt8 numberOfBordersMSB; - UInt8 firstRZoneNumberInLastBorderMSB; - UInt8 lastRZoneNumberInLastBorderMSB; - UInt8 reserved6[4]; - UInt8 reserved7[4]; - UInt8 reserved8[4]; - UInt8 discBarCode[8]; - UInt8 reserved9; - UInt8 numberOfOPCTableEntries; - UInt8 opcTableEntries[0]; -}; -typedef struct DVDDiscInfo DVDDiscInfo; - -// Read RZone Information Address Types -typedef UInt8 DVDRZoneInfoAddressType; -enum -{ - kDVDRZoneInfoAddressTypeLBA = 0x00, - kDVDRZoneInfoAddressTypeRZoneNumber = 0x01, - kDVDRZoneInfoAddressTypeBorderNumber = 0x02, -}; - -// Read RZone Information Format -struct DVDRZoneInfo -{ - UInt16 dataLength; - UInt8 rzoneNumberLSB; - UInt8 borderNumberLSB; - UInt8 reserved; -#ifdef __LITTLE_ENDIAN__ - UInt8 reserved2:4; - UInt8 copy:1; - UInt8 damage:1; - UInt8 reserved3:2; - - UInt8 reserved4:4; - UInt8 restrictedOverwrite:1; - UInt8 incremental:1; - UInt8 blank:1; - UInt8 reservedRZone:1; - - UInt8 nextWritableAddressValid:1; - UInt8 lastRecordedAddressValid:1; - UInt8 reserved5:6; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 reserved3:2; - UInt8 damage:1; - UInt8 copy:1; - UInt8 reserved2:4; - - UInt8 reservedRZone:1; - UInt8 blank:1; - UInt8 incremental:1; - UInt8 restrictedOverwrite:1; - UInt8 reserved4:4; - - UInt8 reserved5:6; - UInt8 lastRecordedAddressValid:1; - UInt8 nextWritableAddressValid:1; -#endif /* !__LITTLE_ENDIAN__ */ - UInt32 rzoneStartAddress; - UInt32 nextWritableAddress; - UInt32 freeBlocks; - UInt32 blockingFactor; - UInt32 rzoneSize; - UInt32 lastRecordedAddress; - UInt8 rzoneNumberMSB; - UInt8 borderNumberMSB; - UInt8 reserved6; - UInt8 reserved7; -}; -typedef struct DVDRZoneInfo DVDRZoneInfo; - -#pragma pack(pop) /* (reset to default struct packing) */ - -#endif /* _IODVDTYPES_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOFDiskPartitionScheme.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOFDiskPartitionScheme.h.svn-base deleted file mode 100644 index 7f96255..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOFDiskPartitionScheme.h.svn-base +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/* - * This header contains the IOFDiskPartitionScheme class definition. - */ - -#ifndef _IOFDISKPARTITIONSCHEME_H -#define _IOFDISKPARTITIONSCHEME_H - -#include <IOKit/IOTypes.h> - -/* - * kIOFDiskPartitionSchemeClass is the name of the IOFDiskPartitionScheme class. - */ - -#define kIOFDiskPartitionSchemeClass "IOFDiskPartitionScheme" - -/* - * FDisk Partition Map Definitions - */ - -#pragma pack(push, 1) /* (enable 8-bit struct packing) */ - -/* Structure constants. */ - -#define DISK_BLK0SZ sizeof(struct disk_blk0) /* (size of partition map) */ -#define DISK_BOOTSZ 446 /* (size of boot code in map) */ -#define DISK_NPART 4 /* (number of entries in map) */ - -/* Partition map entry. */ - -struct fdisk_part -{ - UInt8 bootid; /* (is active boot partition?) */ - UInt8 beghead; /* (beginning head) */ - UInt8 begsect; /* (beginning sector; beginning cylinder, high 2 bits) */ - UInt8 begcyl; /* (beginning cylinder, low 8 bits) */ - UInt8 systid; /* (type) */ - UInt8 endhead; /* (ending head) */ - UInt8 endsect; /* (ending sector; ending cylinder, high 2 bits) */ - UInt8 endcyl; /* (ending cylinder, low 8 bits) */ - UInt32 relsect; /* (block start) */ - UInt32 numsect; /* (block count) */ -}; - -/* Partition map, as found in block zero of the disk (or extended partition). */ - -struct disk_blk0 -{ - UInt8 bootcode[DISK_BOOTSZ]; /* (boot code) */ - struct fdisk_part parts[DISK_NPART]; /* (partition entries) */ - UInt16 signature; /* (unique signature for map) */ -}; - -/* Partition map signature (signature). */ - -#define DISK_SIGNATURE 0xAA55 - -/* Partition map entry types (systid). */ - -#define FDISK_PARTITION_TYPE_01 "DOS_FAT_12" -#define FDISK_PARTITION_TYPE_04 "DOS_FAT_16_S" -#define FDISK_PARTITION_TYPE_06 "DOS_FAT_16" -#define FDISK_PARTITION_TYPE_07 "Windows_NTFS" -#define FDISK_PARTITION_TYPE_0B "DOS_FAT_32" -#define FDISK_PARTITION_TYPE_0C "Windows_FAT_32" -#define FDISK_PARTITION_TYPE_0E "Windows_FAT_16" -#define FDISK_PARTITION_TYPE_42 "Windows_LDM" -#define FDISK_PARTITION_TYPE_82 "Linux_Swap" -#define FDISK_PARTITION_TYPE_83 "Linux" -#define FDISK_PARTITION_TYPE_8E "Linux_LVM" -#define FDISK_PARTITION_TYPE_A5 "FreeBSD" -#define FDISK_PARTITION_TYPE_A6 "OpenBSD" -#define FDISK_PARTITION_TYPE_A7 "Apple_Rhapsody_UFS" -#define FDISK_PARTITION_TYPE_A8 "Apple_UFS" -#define FDISK_PARTITION_TYPE_A9 "NetBSD" -#define FDISK_PARTITION_TYPE_AB "Apple_Boot" -#define FDISK_PARTITION_TYPE_AE "Apple_Encrypted" -#define FDISK_PARTITION_TYPE_AF "Apple_HFS" -#define FDISK_PARTITION_TYPE_FD "Linux_RAID" - -#pragma pack(pop) /* (reset to default struct packing) */ - -#endif /* !_IOFDISKPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOFilterScheme.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOFilterScheme.h.svn-base deleted file mode 100644 index 406b596..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOFilterScheme.h.svn-base +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOFilterScheme - * @abstract - * This header contains the IOFilterScheme class definition. - */ - -#ifndef _IOFILTERSCHEME_H -#define _IOFILTERSCHEME_H - -/*! - * @defined kIOFilterSchemeClass - * @abstract - * The name of the IOFilterScheme class. - * @discussion - * kIOFilterSchemeClass is the name of the IOFilterScheme class. - */ - -#define kIOFilterSchemeClass "IOFilterScheme" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOMedia.h> -#include <IOKit/storage/IOStorage.h> - -/*! - * @class IOFilterScheme - * @abstract - * The common base class for all filter scheme - * objects. - * @discussion - * The IOFilterScheme class is the common base class for all filter scheme - * objects. It extends the IOStorage class by implementing the appropriate - * open and close semantics for filter objects (standard semantics are act - * as a relay for incoming opens, producing one outgoing open for each - * incoming open). It also implements the default read and write semantics, - * which pass all reads and writes through to the provider media unprocessed. - * For simple schemes, the default behavior is sufficient. More complex - * filter schemes such as RAID will want to do extra processing for reads - * and writes. - */ - -class IOFilterScheme : public IOStorage -{ - OSDeclareDefaultStructors(IOFilterScheme); - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - - /*! - * @function handleOpen - * @discussion - * The handleOpen method grants or denies permission to access this object - * to an interested client. The argument is an IOStorageAccess value that - * specifies the level of access desired -- reader or reader-writer. - * - * This method can be invoked to upgrade or downgrade the access level for - * an existing client as well. The previous access level will prevail for - * upgrades that fail, of course. A downgrade should never fail. If the - * new access level should be the same as the old for a given client, this - * method will do nothing and return success. In all cases, one, singular - * close-per-client is expected for all opens-per-client received. - * - * This implementation replaces the IOService definition of handleOpen(). - * @param client - * Client requesting the open. - * @param options - * Options for the open. Set to zero. - * @param access - * Access level for the open. Set to kIOStorageAccessReader or - * kIOStorageAccessReaderWriter. - * @result - * Returns true if the open was successful, false otherwise. - */ - - virtual bool handleOpen(IOService * client, - IOOptionBits options, - void * access); - - /*! - * @function handleIsOpen - * @discussion - * The handleIsOpen method determines whether the specified client, or any - * client if none is specified, presently has an open on this object. - * - * This implementation replaces the IOService definition of handleIsOpen(). - * @param client - * Client to check the open state of. Set to zero to check the open state - * of all clients. - * @result - * Returns true if the client was (or clients were) open, false otherwise. - */ - - virtual bool handleIsOpen(const IOService * client) const; - - /*! - * @function handleClose - * @discussion - * The handleClose method closes the client's access to this object. - * - * This implementation replaces the IOService definition of handleClose(). - * @param client - * Client requesting the close. - * @param options - * Options for the close. Set to zero. - */ - - virtual void handleClose(IOService * client, IOOptionBits options); - -public: - - using IOStorage::read; - using IOStorage::write; - - /*! - * @function read - * @discussion - * Read data from the storage object at the specified byte offset into the - * specified buffer, asynchronously. When the read completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the read. - * - * For simple filter schemes, the default behavior is to simply pass the - * read through to the provider media. More complex filter schemes such - * as RAID will need to do extra processing here. - * @param client - * Client requesting the read. - * @param byteStart - * Starting byte offset for the data transfer. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - * @param completion - * Completion routine to call once the data transfer is complete. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - */ - - virtual void read(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); - - /*! - * @function write - * @discussion - * Write data into the storage object at the specified byte offset from the - * specified buffer, asynchronously. When the write completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the write. - * - * For simple filter schemes, the default behavior is to simply pass the - * write through to the provider media. More complex filter schemes such - * as RAID will need to do extra processing here. - * @param client - * Client requesting the write. - * @param byteStart - * Starting byte offset for the data transfer. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - * @param completion - * Completion routine to call once the data transfer is complete. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - */ - - virtual void write(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); - - /*! - * @function synchronizeCache - * @discussion - * Flush the cached data in the storage object, if any, synchronously. - * @param client - * Client requesting the cache synchronization. - * @result - * Returns the status of the cache synchronization. - */ - - virtual IOReturn synchronizeCache(IOService * client); - - /*! - * @function discard - * @discussion - * Delete unused data from the storage object at the specified byte offset, - * synchronously. - * @param client - * Client requesting the operation. - * @param byteStart - * Starting byte offset for the operation. - * @param byteCount - * Size of the operation. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn discard(IOService * client, - UInt64 byteStart, - UInt64 byteCount); - - /* - * Obtain this object's provider. We override the superclass's method - * to return a more specific subclass of OSObject -- an IOMedia. This - * method serves simply as a convenience to subclass developers. - */ - - virtual IOMedia * getProvider() const; - - OSMetaClassDeclareReservedUnused(IOFilterScheme, 0); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 1); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 2); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 3); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 4); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 5); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 6); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 7); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 8); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 9); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 10); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 11); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 12); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 13); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 14); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 15); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 16); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 17); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 18); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 19); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 20); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 21); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 22); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 23); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 24); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 25); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 26); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 27); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 28); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 29); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 30); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 31); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOFILTERSCHEME_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOFireWireStorageCharacteristics.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOFireWireStorageCharacteristics.h.svn-base deleted file mode 100644 index 710f29f..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOFireWireStorageCharacteristics.h.svn-base +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ -#define _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ - -// -// Bridge Characteristics - Characteristics defined for FireWire bridges. -// - -/*! -@defined kIOPropertyBridgeCharacteristicsKey -@discussion This key is used to define Bridge Characteristics for a particular -devices's bridge chipset. It has an associated dictionary which lists the -bridge characteristics. - -Requirement: Optional - -Example: -<pre> -@textblock -<dict> - <key>Bridge Characteristics</key> - <dict> - <key>Bridge Vendor Name</key> - <string>Oxford Semiconductor</string> - <key>Bridge Model Name</key> - <string>FW911</string> - <key>Bridge Revision Level</key> - <string>3.7</string> - </dict> -</dict> -@/textblock -</pre> -*/ - -#define kIOPropertyBridgeCharacteristicsKey "Bridge Characteristics" -#define kIOPropertyBridgeVendorNameKey "Bridge Vendor Name" -#define kIOPropertyBridgeModelNameKey "Bridge Model Name" -#define kIOPropertyBridgeRevisionLevelKey "Bridge Revision Level" - -#endif /* _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ */ \ No newline at end of file diff --git a/i386/include/IOKit/storage/.svn/text-base/IOGUIDPartitionScheme.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOGUIDPartitionScheme.h.svn-base deleted file mode 100644 index 3e197d0..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOGUIDPartitionScheme.h.svn-base +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/* - * This header contains the IOGUIDPartitionScheme class definition. - */ - -#ifndef _IOGUIDPARTITIONSCHEME_H -#define _IOGUIDPARTITIONSCHEME_H - -#include <IOKit/IOTypes.h> - -typedef unsigned char uuid_t[16]; -/* - * kIOGUIDPartitionSchemeClass is the name of the IOGUIDPartitionScheme class. - */ - -#define kIOGUIDPartitionSchemeClass "IOGUIDPartitionScheme" - - -#pragma pack(push, 1) /* (enable 8-bit struct packing) */ - -/* Partition map. */ - -struct gpt_hdr -{ - uint8_t hdr_sig[8]; - uint32_t hdr_revision; - uint32_t hdr_size; - uint32_t hdr_crc_self; - uint32_t __reserved; - uint64_t hdr_lba_self; - uint64_t hdr_lba_alt; - uint64_t hdr_lba_start; - uint64_t hdr_lba_end; - uuid_t hdr_uuid; - uint64_t hdr_lba_table; - uint32_t hdr_entries; - uint32_t hdr_entsz; - uint32_t hdr_crc_table; - uint32_t padding; -}; - -/* Partition map entry. */ - -struct gpt_ent -{ - uuid_t ent_type; - uuid_t ent_uuid; - uint64_t ent_lba_start; - uint64_t ent_lba_end; - uint64_t ent_attr; - uint16_t ent_name[36]; -}; - -/* Partition map signature (hdr_sig). */ - -#define GPT_HDR_SIG "EFI PART" - -/* Partition map version (hdr_revision). */ - -#define GPT_HDR_REVISION 0x00010000 - -/* Partition map entry flags (ent_attr). */ - -#define GPT_ENT_ATTR_PLATFORM 0x00000001 - -#pragma pack(pop) /* (reset to default struct packing) */ - -#endif /* !_IOGUIDPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOMedia.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOMedia.h.svn-base deleted file mode 100644 index 64052ec..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOMedia.h.svn-base +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOMedia - * @abstract - * This header contains the IOMedia class definition. - */ - -#ifndef _IOMEDIA_H -#define _IOMEDIA_H - -#include <IOKit/IOTypes.h> - -/*! - * @defined kIOMediaClass - * @abstract - * The name of the IOMedia class. - */ - -#define kIOMediaClass "IOMedia" - -/*! - * @defined kIOMediaContentKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaContentKey property has an OSString - * value and contains a description of the media's - * contents. The description is the same as the hint at the time of the - * object's creation, but it is possible that the description has been overridden - * by a client (which has probed the media and identified the content correctly) - * of the media object. It is more accurate than the hint for this reason. The - * string is formed in the likeness of Apple's "Apple_HFS" strings or in the - * likeness of a UUID. - */ - -#define kIOMediaContentKey "Content" - -/*! - * @defined kIOMediaContentHintKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaContentHintKey property has an OSString - * value and contains a hint of the media's contents. - * The hint is set at the time of the object's creation, should the creator have - * a clue as to what it may contain. The hint string does not change for the - * lifetime of the object and is formed in the likeness of Apple's "Apple_HFS" - * strings or in the likeness of a UUID. - */ - -#define kIOMediaContentHintKey "Content Hint" - -/*! - * @defined kIOMediaEjectableKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaEjectableKey property has an OSBoolean - * value and describes whether the media is ejectable - * from the drive mechanism under software control. Implies IOMediaRemovable - * is also true. - */ - -#define kIOMediaEjectableKey "Ejectable" - -/*! - * @defined kIOMediaLeafKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaLeafKey property has an OSBoolean value and describes whether the media is a leaf, that is, - * it is the deepest media object in this branch of the I/O Registry. - */ - -#define kIOMediaLeafKey "Leaf" - -/*! - * @defined kIOMediaOpenKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaOpenKey property has an OSBoolean value and describes whether - * a client presently has an open on this media. - */ - -#define kIOMediaOpenKey "Open" - -/*! - * @defined kIOMediaPreferredBlockSizeKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaPreferredBlockSizeKey property has an - * OSNumber value and describes the media's natural - * block size in bytes. This information is useful to clients that want to - * optimize access to the media. - */ - -#define kIOMediaPreferredBlockSizeKey "Preferred Block Size" - -/*! - * @defined kIOMediaRemovableKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaRemovableKey property has an OSBoolean - * value and describes whether the media is removable - * from the drive mechanism. - */ - -#define kIOMediaRemovableKey "Removable" - -/*! - * @defined kIOMediaSizeKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaSizeKey property has an OSNumber value and describes the total length of the media in - * bytes. - */ - -#define kIOMediaSizeKey "Size" - -/*! - * @defined kIOMediaUUIDKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaUUIDKey property has an OSString value and contains a persistent - * Universal Unique Identifier for the media if such an identifier is available. - */ - -#define kIOMediaUUIDKey "UUID" - -/*! - * @defined kIOMediaWholeKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaWholeKey property has an OSBoolean - * value and describes whether the media is whole, that is, - * it represents the whole disk (the physical disk, or a virtual replica - * thereof). - */ - -#define kIOMediaWholeKey "Whole" - -/*! - * @defined kIOMediaWritableKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaWritableKey property has an OSBoolean - * value and describes whether the media is writable. - */ - -#define kIOMediaWritableKey "Writable" - -/*! - * @defined kIOMediaContentMaskKey - * @abstract - * A property of IOMedia clients. - * @discussion - * The kIOMediaContentMaskKey property has an OSString - * value and must exist in all IOMedia clients that - * drive new content (that is, produce new media objects). When the client - * matches against the provider media, the value of the client's - * kIOMediaContentMaskKey property is used to replace the provider's - * kIOMediaContentKey property. - */ - -#define kIOMediaContentMaskKey "Content Mask" - -/*! - * @defined kIOMediaIconKey - * @abstract - * A property of any object in the media stack. - * @discussion - * kIOMediaIconKey is a property of any object in the media stack that wishes - * to override the default icon shown for the media objects in the stack. It - * is usually defined in a provider object below the media object. It has an - * OSDictionary value, with properties identical to the kIOIconKey definition, - * that is, kCFBundleIdentifierKey and kIOBundleResourceFileKey. - */ - -#define kIOMediaIconKey "IOMediaIcon" - -/*! - * @enum IOMediaAttributeMask - * @discussion - * The IOMediaAttributeMask bit mask describes various attributes of - * the media object, such as its ejectability and its removability. - * @constant kIOMediaAttributeEjectableMask - * Indicates whether the media is ejectable from the drive mechanism - * under software control. Implies kIOMediaAttributeRemovableMask. - * @constant kIOMediaAttributeRemovableMask - * Indicates whether the media is removable from the drive mechanism. - */ - -enum -{ - kIOMediaAttributeEjectableMask = 0x00000001, - kIOMediaAttributeRemovableMask = 0x00000002, - kIOMediaAttributeReservedMask = 0xFFFFFFFC -}; - -typedef UInt32 IOMediaAttributeMask; - -#endif /* !_IOMEDIA_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOMediaBSDClient.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOMediaBSDClient.h.svn-base deleted file mode 100644 index 56a3117..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOMediaBSDClient.h.svn-base +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOMEDIABSDCLIENT_H -#define _IOMEDIABSDCLIENT_H - -#include <sys/disk.h> - -#endif /* !_IOMEDIABSDCLIENT_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOPartitionScheme.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOPartitionScheme.h.svn-base deleted file mode 100644 index 7a1de37..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOPartitionScheme.h.svn-base +++ /dev/null @@ -1,373 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOPartitionScheme - * @abstract - * This header contains the IOPartitionScheme class definition. - */ - -#ifndef _IOPARTITIONSCHEME_H -#define _IOPARTITIONSCHEME_H - -/*! - * @defined kIOPartitionSchemeClass - * @abstract - * The name of the IOPartitionScheme class. - * @discussion - * kIOPartitionSchemeClass is the name of the IOPartitionScheme class. - */ - -#define kIOPartitionSchemeClass "IOPartitionScheme" - -/*! - * @defined kIOMediaLiveKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaLiveKey property has an OSBoolean - * value and is placed into an IOMedia instance - * created via the partition scheme. It describes whether the - * partition is live, that is, it is up-to-date with respect - * to the on-disk partition table. - */ - -#define kIOMediaLiveKey "Live" - -/*! - * @defined kIOMediaPartitionIDKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaPartitionIDKey property has an OSNumber - * value and is placed into an IOMedia instance - * created via the partition scheme. It is an ID that differentiates one - * partition from the other (within a given scheme). It is typically an index - * into the on-disk partition table. - */ - -#define kIOMediaPartitionIDKey "Partition ID" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOMedia.h> -#include <IOKit/storage/IOStorage.h> - -/*! - * @class IOPartitionScheme - * @abstract - * The common base class for all partition scheme - * objects. - * @discussion - * The IOPartitionScheme class is the common base class for all partition scheme - * objects. It extends the IOStorage class by implementing the appropriate open - * and close semantics for partition objects (standard semantics are to act as a - * multiplexor for incoming opens, producing one outgoing open with the correct - * access). It also implements the default read and write semantics, which pass - * all reads and writes through to the provider media unprocessed. For simple - * schemes, the default behavior is sufficient. More complex partition schemes - * such as RAID will want to do extra processing for reads and writes. - */ - -class IOPartitionScheme : public IOStorage -{ - OSDeclareDefaultStructors(IOPartitionScheme); - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - - IOStorageAccess _openLevel; - OSSet * _openReaders; - OSSet * _openReaderWriters; - - /* - * Free all of this object's outstanding resources. - */ - - virtual void free(); - - /*! - * @function handleOpen - * @discussion - * The handleOpen method grants or denies permission to access this object - * to an interested client. The argument is an IOStorageAccess value that - * specifies the level of access desired -- reader or reader-writer. - * - * This method can be invoked to upgrade or downgrade the access level for - * an existing client as well. The previous access level will prevail for - * upgrades that fail, of course. A downgrade should never fail. If the - * new access level should be the same as the old for a given client, this - * method will do nothing and return success. In all cases, one, singular - * close-per-client is expected for all opens-per-client received. - * - * This implementation replaces the IOService definition of handleOpen(). - * @param client - * Client requesting the open. - * @param options - * Options for the open. Set to zero. - * @param access - * Access level for the open. Set to kIOStorageAccessReader or - * kIOStorageAccessReaderWriter. - * @result - * Returns true if the open was successful, false otherwise. - */ - - virtual bool handleOpen(IOService * client, - IOOptionBits options, - void * access); - - /*! - * @function handleIsOpen - * @discussion - * The handleIsOpen method determines whether the specified client, or any - * client if none is specified, presently has an open on this object. - * - * This implementation replaces the IOService definition of handleIsOpen(). - * @param client - * Client to check the open state of. Set to zero to check the open state - * of all clients. - * @result - * Returns true if the client was (or clients were) open, false otherwise. - */ - - virtual bool handleIsOpen(const IOService * client) const; - - /*! - * @function handleClose - * @discussion - * The handleClose method closes the client's access to this object. - * - * This implementation replaces the IOService definition of handleClose(). - * @param client - * Client requesting the close. - * @param options - * Options for the close. Set to zero. - */ - - virtual void handleClose(IOService * client, IOOptionBits options); - - /* - * Attach the given media object to the device tree plane. - */ - -#ifdef __LP64__ - virtual bool attachMediaObjectToDeviceTree(IOMedia * media); -#else /* !__LP64__ */ - virtual bool attachMediaObjectToDeviceTree(IOMedia * media, - IOOptionBits options = 0); /* 10.5.0 */ -#endif /* !__LP64__ */ - - /* - * Detach the given media object from the device tree plane. - */ - -#ifdef __LP64__ - virtual void detachMediaObjectFromDeviceTree(IOMedia * media); -#else /* !__LP64__ */ - virtual void detachMediaObjectFromDeviceTree(IOMedia * media, - IOOptionBits options = 0); /* 10.5.0 */ -#endif /* !__LP64__ */ - - /* - * Updates a set of existing partitions, represented by partitionsOld, - * with possible updates from a rescan of the disk, represented by - * partitionsNew. It returns a new set of partitions with the results, - * removing partitions from partitionsOld where applicable, adding - * partitions from partitionsNew where applicable, and folding in property - * changes to partitions from partitionsNew into partitionsOld where - * applicable. - */ - - virtual OSSet * juxtaposeMediaObjects(OSSet * partitionsOld, - OSSet * partitionsNew); /* 10.5.0 */ - -public: - - using IOStorage::read; - using IOStorage::write; - - /* - * Initialize this object's minimal state. - */ - - virtual bool init(OSDictionary * properties = 0); - - /*! - * @function read - * @discussion - * Read data from the storage object at the specified byte offset into the - * specified buffer, asynchronously. When the read completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the read. - * - * For simple partition schemes, the default behavior is to simply pass the - * read through to the provider media. More complex partition schemes such - * as RAID will need to do extra processing here. - * @param client - * Client requesting the read. - * @param byteStart - * Starting byte offset for the data transfer. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - * @param completion - * Completion routine to call once the data transfer is complete. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - */ - - virtual void read(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); - - /*! - * @function write - * @discussion - * Write data into the storage object at the specified byte offset from the - * specified buffer, asynchronously. When the write completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the write. - * - * For simple partition schemes, the default behavior is to simply pass the - * write through to the provider media. More complex partition schemes such - * as RAID will need to do extra processing here. - * @param client - * Client requesting the write. - * @param byteStart - * Starting byte offset for the data transfer. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - * @param completion - * Completion routine to call once the data transfer is complete. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - */ - - virtual void write(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); - - /*! - * @function synchronizeCache - * @discussion - * Flush the cached data in the storage object, if any, synchronously. - * @param client - * Client requesting the cache synchronization. - * @result - * Returns the status of the cache synchronization. - */ - - virtual IOReturn synchronizeCache(IOService * client); - - /*! - * @function discard - * @discussion - * Delete unused data from the storage object at the specified byte offset, - * synchronously. - * @param client - * Client requesting the operation. - * @param byteStart - * Starting byte offset for the operation. - * @param byteCount - * Size of the operation. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn discard(IOService * client, - UInt64 byteStart, - UInt64 byteCount); - - /* - * Obtain this object's provider. We override the superclass's method - * to return a more specific subclass of OSObject -- an IOMedia. This - * method serves simply as a convenience to subclass developers. - */ - - virtual IOMedia * getProvider() const; - -#ifdef __LP64__ - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 0); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 1); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 2); -#else /* !__LP64__ */ - OSMetaClassDeclareReservedUsed(IOPartitionScheme, 0); - OSMetaClassDeclareReservedUsed(IOPartitionScheme, 1); - OSMetaClassDeclareReservedUsed(IOPartitionScheme, 2); -#endif /* !__LP64__ */ - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 3); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 4); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 5); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 6); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 7); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 8); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 9); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 10); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 11); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 12); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 13); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 14); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 15); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 16); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 17); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 18); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 19); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 20); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 21); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 22); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 23); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 24); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 25); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 26); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 27); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 28); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 29); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 30); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 31); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOStorage.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOStorage.h.svn-base deleted file mode 100644 index d5725c2..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOStorage.h.svn-base +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOStorage - * @abstract - * This header contains the IOStorage class definition. - */ - -#ifndef _IOSTORAGE_H -#define _IOSTORAGE_H - -#include <IOKit/IOTypes.h> - -/*! - * @defined kIOStorageClass - * @abstract - * The name of the IOStorage class. - */ - -#define kIOStorageClass "IOStorage" - -/*! - * @defined kIOStorageCategory - * @abstract - * kIOStorageCategory is a value for IOService's kIOMatchCategoryKey property. - * @discussion - * The kIOStorageCategory value is the standard value for the IOService property - * kIOMatchCategoryKey ("IOMatchCategory") for all storage drivers. All storage - * objects that expect to drive new content (that is, produce new media objects) - * are expected to compete within the kIOStorageCategory namespace. - * - * See the IOService documentation for more information on match categories. - */ - -#define kIOStorageCategory "IOStorage" /* (as IOMatchCategory) */ - -/*! - * @defined kIOStorageFeaturesKey - * @abstract - * A property of any object in the storage stack. - * @discussion - * kIOStorageFeaturesKey is a property of any object in the storage stack that - * wishes to express support of additional features, such as Force Unit Access. - * It is typically defined in the device object below the block storage driver - * object. It has an OSDictionary value, where each entry describes one given - * feature. - */ - -#define kIOStorageFeaturesKey "IOStorageFeatures" - -/*! - * @defined kIOStorageFeatureDiscard - * @abstract - * Describes the presence of the Discard feature. - * @discussion - * This property describes the ability of the storage stack to delete unused - * data from the media. It is one of the feature entries listed under the top- - * level kIOStorageFeaturesKey property table. It has an OSBoolean value. - */ - -#define kIOStorageFeatureDiscard "Discard" - -/*! - * @defined kIOStorageFeatureForceUnitAccess - * @abstract - * Describes the presence of the Force Unit Access feature. - * @discussion - * This property describes the ability of the storage stack to force a request - * to access the media. It is one of the feature entries listed under the top- - * level kIOStorageFeaturesKey property table. It has an OSBoolean value. - */ - -#define kIOStorageFeatureForceUnitAccess "Force Unit Access" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/assert.h> -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IOService.h> - -/*! - * @enum IOStorageAccess - * @discussion - * The IOStorageAccess enumeration describes the possible access levels for open - * requests. - * @constant kIOStorageAccessNone - * No access is requested; should not be passed to open(). - * @constant kIOStorageAccessReader - * Read-only access is requested. - * @constant kIOStorageAccessReaderWriter - * Read and write access is requested. - * @constant kIOStorageAccessSharedLock - * Shared access is requested. - * @constant kIOStorageAccessExclusiveLock - * Exclusive access is requested. - */ - -enum -{ - kIOStorageAccessNone = 0x00, - kIOStorageAccessReader = 0x01, - kIOStorageAccessReaderWriter = 0x03, - kIOStorageAccessSharedLock = 0x04, - kIOStorageAccessExclusiveLock = 0x08 -}; - -typedef UInt32 IOStorageAccess; - -/*! - * @enum IOStorageOptions - * @discussion - * Options for read and write storage requests. - * @constant kIOStorageOptionForceUnitAccess - * Force the request to access the media. - */ - -enum -{ - kIOStorageOptionNone = 0x00000000, - kIOStorageOptionForceUnitAccess = 0x00000001, - kIOStorageOptionReserved = 0xFFFFFFFE -}; - -typedef UInt32 IOStorageOptions; - -/*! - * @struct IOStorageAttributes - * @discussion - * Attributes of read and write storage requests. - * @field options - * Options for the request. See IOStorageOptions. - * @field reserved - * Reserved for future use. Set to zero. - */ - -struct IOStorageAttributes -{ - IOStorageOptions options; - UInt32 reserved0032; - UInt64 reserved0064; -#ifdef __LP64__ - UInt64 reserved0128; - UInt64 reserved0192; -#endif /* __LP64__ */ -}; - -/*! - * @typedef IOStorageCompletionAction - * @discussion - * The IOStorageCompletionAction declaration describes the C (or C++) completion - * routine that is called once an asynchronous storage operation completes. - * @param target - * Opaque client-supplied pointer (or an instance pointer for a C++ callback). - * @param parameter - * Opaque client-supplied pointer. - * @param status - * Status of the data transfer. - * @param actualByteCount - * Actual number of bytes transferred in the data transfer. - */ - -typedef void (*IOStorageCompletionAction)(void * target, - void * parameter, - IOReturn status, - UInt64 actualByteCount); - -/*! - * @struct IOStorageCompletion - * @discussion - * The IOStorageCompletion structure describes the C (or C++) completion routine - * that is called once an asynchronous storage operation completes. The values - * passed for the target and parameter fields will be passed to the routine when - * it is called. - * @field target - * Opaque client-supplied pointer (or an instance pointer for a C++ callback). - * @field action - * Completion routine to call on completion of the data transfer. - * @field parameter - * Opaque client-supplied pointer. - */ - -struct IOStorageCompletion -{ - void * target; - IOStorageCompletionAction action; - void * parameter; -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOSTORAGE_H */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOStorageDeviceCharacteristics.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOStorageDeviceCharacteristics.h.svn-base deleted file mode 100644 index 19a73a2..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOStorageDeviceCharacteristics.h.svn-base +++ /dev/null @@ -1,659 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IO_STORAGE_DEVICE_CHARACTERISTICS_H_ -#define _IOKIT_IO_STORAGE_DEVICE_CHARACTERISTICS_H_ - -#include <IOKit/storage/IOStorageProtocolCharacteristics.h> - -/* - * Device Characteristics - Characteristics defined for devices. - */ - -/*! -@defined kIOPropertyDeviceCharacteristicsKey -@discussion This key is used to define Device Characteristics for a particular -device and it has an associated dictionary which lists the -device characteristics. The device characteristics are Command Set specific -and are listed in the header files for each command set. - -Requirement: Mandatory - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyDeviceCharacteristicsKey "Device Characteristics" - - -/*! -@defined kIOPropertyVendorNameKey -@discussion This key is used to define the Vendor Name for a particular device -and it has an associated string. - -Requirement: Mandatory - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyVendorNameKey "Vendor Name" - - -/*! -@defined kIOPropertyProductNameKey -@discussion This key is used to define the Product Name for a particular device -and it has an associated string. - -Requirement: Mandatory - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyProductNameKey "Product Name" - - -/*! -@defined kIOPropertyProductRevisionLevelKey -@discussion This key is used to define the Product Revision Level for a -particular device and it has an associated string. - -Requirement: Mandatory - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyProductRevisionLevelKey "Product Revision Level" - - -/*! -@defined kIOPropertyProductSerialNumberKey -@discussion This key is used to define the Product Serial Number for a -particular device and it has an associated data. - -Requirement: Mandatory - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>Serial Number</key> - <string>123456789</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyProductSerialNumberKey "Serial Number" - - -/*! -@defined kIOPropertySupportedCDFeaturesKey -@discussion This key is used to define the supported CD Features for a -particular optical device and it has an associated bitfield. See -<IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> for definitions of the -bits and associated bitmasks. - -Requirement: Mandatory for optical devices (Peripheral Device Type 05h). - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>SuperDrive</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>CD Features</key> - <integer>1663</integer> - <key>DVD Features</key> - <integer>103</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySupportedCDFeaturesKey "CD Features" - - -/*! -@defined kIOPropertySupportedDVDFeaturesKey -@discussion This key is used to define the supported DVD Features for a -particular optical device and it has an associated bitfield. See -<IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> for definitions of the -bits and associated bitmasks. - -Requirement: Mandatory for optical devices (Peripheral Device Type 05h). - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>SuperDrive</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>CD Features</key> - <integer>1663</integer> - <key>DVD Features</key> - <integer>103</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySupportedDVDFeaturesKey "DVD Features" - - -/*! -@defined kIOPropertySupportedBDFeaturesKey -@discussion This key is used to define the supported BD Features for a -particular optical device and it has an associated bitfield. See -<IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> for definitions of the -bits and associated bitmasks. - -Requirement: Mandatory for optical devices (Peripheral Device Type 05h). - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>SuperDrive</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>CD Features</key> - <integer>1663</integer> - <key>DVD Features</key> - <integer>103</integer> - <key>BD Features</key> - <integer>21</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySupportedBDFeaturesKey "BD Features" - - -/*! -@defined kIOPropertyRigidDiskGeometryKey -@discussion This key is used to define a dictionary containing -rigid disk geometry information. - -Requirement: Optional. If a device publishes this dictionary, it -must publish all key/value pairs which are deemed Mandatory. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>Rigid Disk Geometry</key> - <dict> - <key>Sector Count per Track</key> - <integer>12345</integer> - <key>Head Count</key> - <integer>12</integer> - <key>Cylinder Count</key> - <integer>12345</integer> - <key>Bytes per Physical Sector</key> - <integer>512</integer> - </dict> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyRigidDiskGeometryKey "Rigid Disk Geometry" - - -/*! -@defined kIOPropertySectorCountPerTrackKey -@discussion This key is used to define the number of sectors per -each track for a particular medium. - -Requirement: Mandatory element of the Rigid Disk Geometry dictionary. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>Rigid Disk Geometry</key> - <dict> - <key>Sector Count per Track</key> - <integer>12345</integer> - </dict> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySectorCountPerTrackKey "Sector Count per Track" - - -/*! -@defined kIOPropertyHeadCountKey -@discussion This key is used to define the number of heads for -a particular medium. - -Requirement: Mandatory element of the Rigid Disk Geometry dictionary. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>Rigid Disk Geometry</key> - <dict> - <key>Sector Count per Track</key> - <integer>12345</integer> - <key>Head Count</key> - <integer>12</integer> - <key>Cylinder Count</key> - <integer>12345</integer> - <key>Bytes per Physical Sector</key> - <integer>512</integer> - </dict> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyHeadCountKey "Head Count" - - -/*! -@defined kIOPropertyCylinderCountKey -@discussion This key is used to define the number of heads for -a particular medium. - -Requirement: Mandatory element of the Rigid Disk Geometry dictionary. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>Rigid Disk Geometry</key> - <dict> - <key>Sector Count per Track</key> - <integer>12345</integer> - <key>Head Count</key> - <integer>12</integer> - <key>Cylinder Count</key> - <integer>12345</integer> - <key>Bytes per Physical Sector</key> - <integer>512</integer> - </dict> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyCylinderCountKey "Cylinder Count" - - -/*! -@defined kIOPropertyBytesPerPhysicalSectorKey -@discussion This key is used to define the number of heads for -a particular medium. - -Requirement: Mandatory element of the Rigid Disk Geometry dictionary. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>Rigid Disk Geometry</key> - <dict> - <key>Sector Count per Track</key> - <integer>12345</integer> - <key>Head Count</key> - <integer>12</integer> - <key>Cylinder Count</key> - <integer>12345</integer> - <key>Bytes per Physical Sector</key> - <integer>512</integer> - </dict> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyBytesPerPhysicalSectorKey "Bytes per Physical Sector" - - -/*! -@defined kIOPropertyPhysicalBlockSizeKey -@discussion This key is used to define the physical block size of a hard disk drive. - -Requirement: Mandatory for hard disk drives with physical block size other than 512 bytes. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>Physical Block Size</key> - <integer>4096</integer> - <key>Logical Block Size</key> - <integer>512</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalBlockSizeKey "Physical Block Size" - - -/*! -@defined kIOPropertyLogicalBlockSizeKey -@discussion This key is used to define the logical block size of a hard disk drive. - -Requirement: Mandatory for hard disk drives with logical block size other than 512 bytes -or that does not match its physical block size. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>Physical Block Size</key> - <integer>4096</integer> - <key>Logical Block Size</key> - <integer>512</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyLogicalBlockSizeKey "Logical Block Size" - - -/*! -@defined kIOPropertyTargetDiskModeKey -@discussion This key is used to indicate the device is another computer in Target Disk Mode. - -Requirement: Optional. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>AAPL</string> - <key>Product Name</key> - <string>FireWire Target</string> - <key>Product Revision Level</key> - <string>0000</string> - <key>Target Disk Mode</key> - <true/> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyTargetDiskModeKey "Target Disk Mode" - - -/*! -@defined kIOPropertyMediumTypeKey -@discussion This key is used to indicate the medium type of the device. - -Requirement: Optional. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>AAPL</string> - <key>Product Name</key> - <string>FireWire Target</string> - <key>Product Revision Level</key> - <string>0000</string> - <key>Medium Type</key> - <string>Rotational</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyMediumTypeKey "Medium Type" - - -/*! -@defined kIOPropertyMediumTypeRotationalKey -@discussion This key is used to indicate the medium type of the device is rotational. - -Requirement: Optional. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>AAPL</string> - <key>Product Name</key> - <string>FireWire Target</string> - <key>Product Revision Level</key> - <string>0000</string> - <key>Medium Type</key> - <string>Rotational</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyMediumTypeRotationalKey "Rotational" - - -/*! -@defined kIOPropertyMediumTypeSolidStateKey -@discussion This key is used to indicate the medium type of the device is solid state. - -Requirement: Optional. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>AAPL</string> - <key>Product Name</key> - <string>FireWire Target</string> - <key>Product Revision Level</key> - <string>0000</string> - <key>Medium Type</key> - <string>Solid State</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyMediumTypeSolidStateKey "Solid State" - - -/*! -@defined kIOPropertyMediumRotationRateKey -@discussion This key is used to indicate the medium rotation rate in RPM of the device. - -Requirement: Optional. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>AAPL</string> - <key>Product Name</key> - <string>FireWire Target</string> - <key>Product Revision Level</key> - <string>0000</string> - <key>Rotation Rate</key> - <integer>7200</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyMediumRotationRateKey "Rotation Rate" - - -#endif /* _IOKIT_IO_STORAGE_DEVICE_CHARACTERISTICS_H_ */ diff --git a/i386/include/IOKit/storage/.svn/text-base/IOStorageProtocolCharacteristics.h.svn-base b/i386/include/IOKit/storage/.svn/text-base/IOStorageProtocolCharacteristics.h.svn-base deleted file mode 100644 index 18a726f..0000000 --- a/i386/include/IOKit/storage/.svn/text-base/IOStorageProtocolCharacteristics.h.svn-base +++ /dev/null @@ -1,1758 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IO_STORAGE_PROTOCOL_CHARACTERISTICS_H_ -#define _IOKIT_IO_STORAGE_PROTOCOL_CHARACTERISTICS_H_ - - -/* - * Protocol Characteristics - Characteristics defined for protocols. - */ - - -/*! -@defined kIOPropertyProtocolCharacteristicsKey -@discussion This key is used to define Protocol Characteristics for a particular -protocol and it has an associated dictionary which lists the -protocol characteristics. - -Requirement: Mandatory - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>ATAPI</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyProtocolCharacteristicsKey "Protocol Characteristics" - - -/*! -@defined kIOPropertySCSIInitiatorIdentifierKey -@discussion An identifier that will uniquely identify this SCSI Initiator for the -SCSI Domain. - -Requirement: Mandatory for SCSI Parallel Interface, SAS, -and Fibre Channel Interface. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SCSI Parallel Interface</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - <key>SCSI Initiator Identifier</key> - <integer>7</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSIInitiatorIdentifierKey "SCSI Initiator Identifier" - - -/*! -@defined kIOPropertySCSIDomainIdentifierKey -@discussion An identifier that will uniquely identify this SCSI Domain for the -Physical Interconnect type. This identifier is only guaranteed to be unique for -any given Physical Interconnect and is not guaranteed to be the same across -restarts or shutdowns. - -Requirement: Mandatory for SCSI Parallel Interface and Fibre Channel Interface. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SCSI Parallel Interface</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - <key>SCSI Domain Identifier</key> - <integer>0</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSIDomainIdentifierKey "SCSI Domain Identifier" - - -/*! -@defined kIOPropertySCSITargetIdentifierKey -@discussion This is the SCSI Target Identifier for a given SCSI Target Device. - -Requirement: Mandatory for SCSI Parallel Interface and Fibre Channel Interface. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SCSI Parallel Interface</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - <key>SCSI Target Identifier</key> - <integer>3</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSITargetIdentifierKey "SCSI Target Identifier" - - -/*! -@defined kIOPropertySCSILogicalUnitNumberKey -@discussion This key is the SCSI Logical Unit Number for the device server -controlled by the driver. - -Requirement: Mandatory for SCSI Parallel Interface, SAS, and Fibre Channel Interface. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SCSI Parallel Interface</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - <key>SCSI Logical Unit Number</key> - <integer>2</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSILogicalUnitNumberKey "SCSI Logical Unit Number" - - -/*! -@defined kIOPropertySASAddressKey -@discussion This key is the unique 64-bit SAS Address for the device server -node located at this port, or for the initiating host port. - -Requirement: Mandatory for SAS. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SAS</string> - <key>Physical Interconnect Location</key> - <string>External</string> - <key>SAS Address</key> - <data>0011223344556677</data> - </dict> -</dict> -@/textblock -</pre> - -Example2: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>SAS Address</key> - <data>0011223344556677</data> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySASAddressKey "SAS Address" - - -/*! -@defined kIOPropertyFibreChannelNodeWorldWideNameKey -@discussion This key is the unique 64-bit World Wide Name for the device server -node located at this port, or for the initiating host port. - -Requirement: Mandatory for Fibre Channel Interface. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Fibre Channel Interface</string> - <key>Physical Interconnect Location</key> - <string>External</string> - <key>Node World Wide Name</key> - <data>0011223344556677</data> - </dict> -</dict> -@/textblock -</pre> - -Example2: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Node World Wide Name</key> - <data>0011223344556677</data> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyFibreChannelNodeWorldWideNameKey "Node World Wide Name" - - -/*! -@defined kIOPropertyFibreChannelPortWorldWideNameKey -@discussion This key is the unique 64-bit World Wide Name for the port. - -Requirement: Mandatory for Fibre Channel Interface. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Fibre Channel Interface</string> - <key>Physical Interconnect Location</key> - <string>External</string> - <key>Port World Wide Name</key> - <data>0011223344556677</data> - </dict> -</dict> -@/textblock -</pre> - -Example2: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port World Wide Name</key> - <data>0011223344556677</data> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyFibreChannelPortWorldWideNameKey "Port World Wide Name" - - -/*! -@defined kIOPropertyFibreChannelAddressIdentifierKey -@discussion This key is the 24-bit Address Identifier (S_ID or D_ID) as -defined in the FC-FS specification. It contains the address identifier -of the source or destination Nx_Port. - -Note: This value can change. It is not a static value. - -Requirement: Optional (only necessary for Fibre Channel Interface). - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Fibre Channel Interface</string> - <key>Physical Interconnect Location</key> - <string>External</string> - <key>Address Identifier</key> - <data>001122</data> - </dict> -</dict> -@/textblock -</pre> - -Example2: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Address Identifier</key> - <data>001122</data> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyFibreChannelAddressIdentifierKey "Address Identifier" - - -/*! -@defined kIOPropertyFibreChannelALPAKey -@discussion This key is the 8-bit Arbitrated Loop Physical Address -(AL_PA) value as defined in the FC-AL-2 specification. - -Note: This value can change. It is not a static value. - -Requirement: Optional (only necessary for Fibre Channel Interface). - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Fibre Channel Interface</string> - <key>Physical Interconnect Location</key> - <string>External</string> - <key>AL_PA</key> - <data>04</data> - </dict> -</dict> -@/textblock -</pre> - -Example2: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>AL_PA</key> - <data>04</data> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyFibreChannelALPAKey "AL_PA" - - -/*! -@defined kIOPropertyPortStatusKey -@discussion This key is associated with the current port -status of the physical link. The port status is either -"Link Established", "No Link Established", or "Link Failed". - -Note: This value can change when the port status changes. It -is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Status</key> - <string>Link Established</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortStatusKey "Port Status" - - -/*! -@defined kIOPropertyPortSpeedKey -@discussion This key is associated with the current port -speed. The port speed can be any valid speed for the interconnect. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (1 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedKey "Port Speed" - - -/*! -@defined kIOPropertyPortTopologyKey -@discussion This key is associated with the current port -topology. The port topology can be any valid topology for the interconnect. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Topology</key> - <string>Automatic (N_Port)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortTopologyKey "Port Topology" - - -/*! -@defined kIOPropertyPortDescriptionKey -@discussion This key is associated with an human -readable port description. Examples include -"Channel A", "Port 1", etc. - -Requirement: Optional for all interconnects. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Description</key> - <string>Channel A</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortDescriptionKey "Port Description" - - -/*! -@defined kIOPropertySCSIParallelSignalingTypeKey -@discussion This key is associated with the signaling type -used for this SCSI Parallel bus. Valid values include -"High Voltage Differential", "Low Voltage Differential", -and "Single Ended". - -Requirement: Optional for SCSI Parallel Interface. Not -defined for any other physical interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>SCSI Parallel Signaling Type</key> - <string>High Voltage Differential</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSIParallelSignalingTypeKey "SCSI Parallel Signaling Type" - - -/*! -@defined kIOPropertyFibreChannelCableDescriptionKey -@discussion This key is associated with the cabling type -used for this Fibre Channel port. Valid values include -"Copper" and "Fiber Optic". - -Requirement: Optional for Fibre Channel Interface. Not -defined for any other physical interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Fibre Channel Cabling Type</key> - <string>Copper</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyFibreChannelCableDescriptionKey "Fibre Channel Cabling Type" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeKey -@discussion This key is used to define the Physical Interconnect to which -a device is attached. - -Requirement: Mandatory. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SCSI Parallel Interface</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeKey "Physical Interconnect" - - -/*! -@defined kIOPropertyPhysicalInterconnectLocationKey -@discussion This key is used to define the Physical Interconnect -Location. - -Requirement: Mandatory. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SCSI Parallel Interface</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectLocationKey "Physical Interconnect Location" - - -/*! -@defined kIOPropertySCSIProtocolMultiInitKey -@discussion This protocol characteristics key is used to inform the system -that the protocol supports having multiple devices that act as initiators. - -Requirement: Optional. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Fibre Channel Interface</string> - <key>Physical Interconnect Location</key> - <string>External</string> - <key>Multiple Initiators</key> - <string>True</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSIProtocolMultiInitKey "Multiple Initiators" - - -/* - * Values - Values for the characteristics defined above. - */ - - -/*! -@defined kIOPropertyInternalKey -@discussion This key defines the value of Internal for the key -kIOPropertyPhysicalInterconnectLocationKey. If the device is -connected to an internal bus, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>ATA</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyInternalKey "Internal" - - -/*! -@defined kIOPropertyExternalKey -@discussion This key defines the value of External for the key -kIOPropertyPhysicalInterconnectLocationKey. If the device is -connected to an external bus, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Fibre Channel Interface</string> - <key>Physical Interconnect Location</key> - <string>External</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyExternalKey "External" - - -/*! -@defined kIOPropertyInternalExternalKey -@discussion This key defines the value of Internal/External for the key -kIOPropertyPhysicalInterconnectLocationKey. If the device is connected -to a bus and it is indeterminate whether it is internal or external, -this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SCSI Parallel Interface</string> - <key>Physical Interconnect Location</key> - <string>Internal/External</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyInternalExternalKey "Internal/External" - - -/*! -@defined kIOPropertyInterconnectFileKey -@discussion This key defines the value of File for the key -kIOPropertyPhysicalInterconnectLocationKey. If the device is a file -that is being represented as a storage device, this key should be set. - -NOTE: This key should only be used when the Physical Interconnect is set to -Virtual Interface. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Virtual Interface</string> - <key>Physical Interconnect Location</key> - <string>File</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyInterconnectFileKey "File" - - -/*! -@defined kIOPropertyInterconnectRAMKey -@discussion This key defines the value of RAM for the key -kIOPropertyPhysicalInterconnectLocationKey. If the device is system memory -that is being represented as a storage device, this key should be set. - -NOTE: This key should only be used when the Physical Interconnect is set to -Virtual Interface. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Virtual Interface</string> - <key>Physical Interconnect Location</key> - <string>RAM</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyInterconnectRAMKey "RAM" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeATA -@discussion This key defines the value of ATA for the key -kIOPropertyPhysicalInterconnectTypeKey. If the device is connected -to an ATA bus, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>ATA</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeATA "ATA" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeSerialATA -@discussion This key defines the value of SATA for the key -kIOPropertyPhysicalInterconnectTypeKey. If the device is connected -to a SATA bus, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SATA</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeSerialATA "SATA" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeSerialAttachedSCSI -@discussion This key defines the value of SAS for the key -kIOPropertyPhysicalInterconnectTypeKey. If the device is connected -to a SAS bus, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SAS</string> - <key>Physical Interconnect Location</key> - <string>External</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeSerialAttachedSCSI "SAS" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeATAPI -@discussion This key defines the value of ATAPI for the key -kIOPropertyPhysicalInterconnectTypeKey. If the device is connected -to an ATA bus and follows the ATAPI command specification, this key -should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>ATAPI</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeATAPI "ATAPI" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeUSB -@discussion This key defines the value of USB for the key -kIOPropertyPhysicalInterconnectTypeKey. If the device is connected -to a USB port, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>USB</string> - <key>Physical Interconnect Location</key> - <string>External</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeUSB "USB" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeFireWire -@discussion This key defines the value of USB for the key -kIOPropertyPhysicalInterconnectTypeKey. If the device is connected -to a FireWire port, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>FireWire</string> - <key>Physical Interconnect Location</key> - <string>External</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeFireWire "FireWire" - - -/*! - @defined kIOPropertyPhysicalInterconnectTypeSecureDigital - @discussion This key defines the value of Secure Digital for the key - kIOPropertyPhysicalInterconnectTypeSecureDigital. If the device is a - connected to a Secure Digital port and follows the Secure Digital - specification, this key should be set. - - Example: - <pre> - @textblock - <dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Secure Digital</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - </dict> - </dict> - @/textblock - </pre> - */ -#define kIOPropertyPhysicalInterconnectTypeSecureDigital "Secure Digital" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeSCSIParallel -@discussion This key defines the value of SCSI Parallel Interface for the key -kIOPropertyPhysicalInterconnectTypeKey. If the device is connected -to a SCSI Parallel port, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SCSI Parallel Interface</string> - <key>Physical Interconnect Location</key> - <string>External</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeSCSIParallel "SCSI Parallel Interface" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeFibreChannel -@discussion This key defines the value of Fibre Channel Interface for the key -kIOPropertyPhysicalInterconnectTypeKey. If the device is connected -to a Fibre Channel port, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Fibre Channel Interface</string> - <key>Physical Interconnect Location</key> - <string>External</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeFibreChannel "Fibre Channel Interface" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeVirtual -@discussion This key defines the value of Virtual Interface for the key -kIOPropertyPhysicalInterconnectTypeVirtual. If the device is being made to look -like a storage device, but is not such in actuality, such as a File or RAM, this -key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Virtual Interface</string> - <key>Physical Interconnect Location</key> - <string>File</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeVirtual "Virtual Interface" - - -/*! -@defined kIOPropertyPortStatusLinkEstablishedKey -@discussion This key defines the value of Link Established for the key -kIOPropertyPortStatusKey. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Status</key> - <string>Link Established</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortStatusLinkEstablishedKey "Link Established" - - -/*! -@defined kIOPropertyPortStatusNoLinkEstablishedKey -@discussion This key defines the value of No Link Established for the key -kIOPropertyPortStatusKey. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Status</key> - <string>No Link Established</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortStatusNoLinkEstablishedKey "No Link Established" - - -/*! -@defined kIOPropertyPortStatusLinkFailedKey -@discussion This key defines the value of Link Failed for the key -kIOPropertyPortStatusKey. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Status</key> - <string>Link Failed</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortStatusLinkFailedKey "Link Failed" - - -/*! -@defined kIOPropertyPortSpeedAutomaticKey -@discussion This key defines the value of Automatic for the key -kIOPropertyPortSpeedKey. If the speed of the port is automatically -adjusted by the host/device and a definitive speed is not known, -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomaticKey "Automatic" - - -/*! -@defined kIOPropertyPortSpeed1GigabitKey -@discussion This key defines the value of 1 Gigabit for the key -kIOPropertyPortSpeedKey. If the speed of the port is 1 Gigabit -per second and is not automatically determined (i.e. the user -configured the port to be exactly this speed), -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>1 Gigabit</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeed1GigabitKey "1 Gigabit" - -/*! -@defined kIOPropertyPortSpeed1_5GigabitKey -@discussion This key defines the value of 1.5 Gigabit for the key -kIOPropertyPortSpeedKey. If the speed of the port is 1.5 Gigabits -per second and is not automatically determined (i.e. the user -configured the port to be exactly this speed), -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>1.5 Gigabit</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeed1_5GigabitKey "1.5 Gigabit" - - -/*! -@defined kIOPropertyPortSpeed2GigabitKey -@discussion This key defines the value of 2 Gigabit for the key -kIOPropertyPortSpeedKey. If the speed of the port is 2 Gigabits -per second and is not automatically determined (i.e. the user -configured the port to be exactly this speed), -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>2 Gigabit</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeed2GigabitKey "2 Gigabit" - - -/*! -@defined kIOPropertyPortSpeed3GigabitKey -@discussion This key defines the value of 3 Gigabit for the key -kIOPropertyPortSpeedKey. If the speed of the port is 3 Gigabits -per second and is not automatically determined (i.e. the user -configured the port to be exactly this speed), -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>3 Gigabit</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeed3GigabitKey "3 Gigabit" - - -/*! -@defined kIOPropertyPortSpeed4GigabitKey -@discussion This key defines the value of 4 Gigabit for the key -kIOPropertyPortSpeedKey. If the speed of the port is 4 Gigabits -per second and is not automatically determined (i.e. the user -configured the port to be exactly this speed), -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>4 Gigabit</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeed4GigabitKey "4 Gigabit" - -/*! -@defined kIOPropertyPortSpeed6GigabitKey -@discussion This key defines the value of 6 Gigabit for the key -kIOPropertyPortSpeedKey. If the speed of the port is 6 Gigabits -per second and is not automatically determined (i.e. the user -configured the port to be exactly this speed), -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>6 Gigabit</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeed6GigabitKey "6 Gigabit" - - -/*! -@defined kIOPropertyPortSpeed8GigabitKey -@discussion This key defines the value of 8 Gigabit for the key -kIOPropertyPortSpeedKey. If the speed of the port is 8 Gigabits -per second and is not automatically determined (i.e. the user -configured the port to be exactly this speed), -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>8 Gigabit</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeed8GigabitKey "8 Gigabit" - - -/*! -@defined kIOPropertyPortSpeed10GigabitKey -@discussion This key defines the value of 10 Gigabit for the key -kIOPropertyPortSpeedKey. If the speed of the port is 10 Gigabits -per second and is not automatically determined (i.e. the user -configured the port to be exactly this speed), -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>10 Gigabit</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeed10GigabitKey "10 Gigabit" - - -/*! -@defined kIOPropertyPortSpeedAutomatic1GigabitKey -@discussion This key defines the value of Automatic (1 Gigabit) -for the key kIOPropertyPortSpeedKey. If the speed of the port is -1 Gigabit per second and is automatically determined by host -software, this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (1 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomatic1GigabitKey "Automatic (1 Gigabit)" - - -/*! -@defined kIOPropertyPortSpeedAutomatic1_5GigabitKey -@discussion This key defines the value of Automatic (1.5 Gigabit) for the key -kIOPropertyPortSpeedKey. If the speed of the port is -1.5 Gigabits per second and is automatically determined by host -software, this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (1.5 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomatic1_5GigabitKey "Automatic (1.5 Gigabit)" - - -/*! -@defined kIOPropertyPortSpeedAutomatic2GigabitKey -@discussion This key defines the value of Automatic (2 Gigabit) -for the key kIOPropertyPortSpeedKey. If the speed of the port is -2 Gigabits per second and is automatically determined by host -software, this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (2 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomatic2GigabitKey "Automatic (2 Gigabit)" - - -/*! -@defined kIOPropertyPortSpeedAutomatic3GigabitKey -@discussion This key defines the value of Automatic (3 Gigabit) -for the key kIOPropertyPortSpeedKey. If the speed of the port is -3 Gigabits per second and is automatically determined by host -software, this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (3 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomatic3GigabitKey "Automatic (3 Gigabit)" - - -/*! -@defined kIOPropertyPortSpeedAutomatic4GigabitKey -@discussion This key defines the value of Automatic (4 Gigabit) -for the key kIOPropertyPortSpeedKey. If the speed of the port is -4 Gigabits per second and is automatically determined by host -software, this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (4 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomatic4GigabitKey "Automatic (4 Gigabit)" - - -/*! -@defined kIOPropertyPortSpeedAutomatic6GigabitKey -@discussion This key defines the value of Automatic (6 Gigabit) -for the key kIOPropertyPortSpeedKey. If the speed of the port is -6 Gigabits per second and is automatically determined by host -software, this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (6 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomatic6GigabitKey "Automatic (6 Gigabit)" - - -/*! -@defined kIOPropertyPortSpeedAutomatic8GigabitKey -@discussion This key defines the value of Automatic (8 Gigabit) -for the key kIOPropertyPortSpeedKey. If the speed of the port is -8 Gigabits per second and is automatically determined by host -software, this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (8 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomatic8GigabitKey "Automatic (8 Gigabit)" - - -/*! -@defined kIOPropertyPortSpeedAutomatic10GigabitKey -@discussion This key defines the value of Automatic (10 Gigabit) -for the key kIOPropertyPortSpeedKey. If the speed of the port is -10 Gigabits per second and is automatically determined by host -software, this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (10 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomatic10GigabitKey "Automatic (10 Gigabit)" - - -/*! -@defined kIOPropertyPortTopologyAutomaticKey -@discussion This key defines the value of Automatic for the key -kIOPropertyPortTopologyKey. If the topology of the port is automatically -adjusted by the host/device and a definitive topology is not known, -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Topology</key> - <string>Automatic</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortTopologyAutomaticKey "Automatic" - - -/*! -@defined kIOPropertyPortTopologyNPortKey -@discussion This key defines the value of N_Port for the key -kIOPropertyPortTopologyKey. If the topology of the port is an N_Port, -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Topology</key> - <string>N_Port</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortTopologyNPortKey "N_Port" - - -/*! -@defined kIOPropertyPortTopologyNLPortKey -@discussion This key defines the value of NL_Port for the key -kIOPropertyPortTopologyKey. If the topology of the port is an NL_Port, -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Topology</key> - <string>NL_Port</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortTopologyNLPortKey "NL_Port" - - -/*! -@defined kIOPropertyPortTopologyAutomaticNPortKey -@discussion This key defines the value of Automatic (N_Port) for the key -kIOPropertyPortTopologyKey. If the topology of the port is -N_Port and is automatically determined by host software, this -key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Topology</key> - <string>Automatic (N_Port)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortTopologyAutomaticNPortKey "Automatic (N_Port)" - - -/*! -@defined kIOPropertyPortTopologyAutomaticNLPortKey -@discussion This key defines the value of Automatic (NL_Port) for the key -kIOPropertyPortTopologyKey. If the topology of the port is -NL_Port and is automatically determined by host software, this -key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Topology</key> - <string>Automatic (NL_Port)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortTopologyAutomaticNLPortKey "Automatic (NL_Port)" - - -/*! -@defined kIOPropertySCSIParallelSignalingTypeHVDKey -@discussion This key defines the value of High Voltage Differential for the key -kIOPropertySCSIParallelSignalingTypeKey. If the signaling type of the port is -High Voltage Differential, this key should be used. - -Requirement: Optional for SCSI Parallel Interface interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>SCSI Parallel Signaling Type</key> - <string>High Voltage Differential</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSIParallelSignalingTypeHVDKey "High Voltage Differential" - - -/*! -@defined kIOPropertySCSIParallelSignalingTypeLVDKey -@discussion This key defines the value of Low Voltage Differential for the key -kIOPropertySCSIParallelSignalingTypeKey. If the signaling type of the port is -Low Voltage Differential, this key should be used. - -Requirement: Optional for SCSI Parallel Interface interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>SCSI Parallel Signaling Type</key> - <string>Low Voltage Differential</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSIParallelSignalingTypeLVDKey "Low Voltage Differential" - - -/*! -@defined kIOPropertySCSIParallelSignalingTypeSEKey -@discussion This key defines the value of Single Ended for the key -kIOPropertySCSIParallelSignalingTypeKey. If the signaling type of the port is -Single Ended, this key should be used. - -Requirement: Optional for SCSI Parallel Interface interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>SCSI Parallel Signaling Type</key> - <string>Single Ended</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSIParallelSignalingTypeSEKey "Single Ended" - - -/*! -@defined kIOPropertyFibreChannelCableDescriptionCopperKey -@discussion This key defines the value of Copper for the key -kIOPropertyFibreChannelCableDescriptionKey. If the cabling is -Copper, this key should be used. - -Requirement: Optional for Fibre Channel Interface interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Fibre Channel Cabling Type</key> - <string>Copper</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyFibreChannelCableDescriptionCopperKey "Copper" - - -/*! -@defined kIOPropertyFibreChannelCableDescriptionFiberOpticKey -@discussion This key defines the value of Fiber Optic for the key -kIOPropertyFibreChannelCableDescriptionKey. If the cabling is -Fiber Optic, this key should be used. - -Requirement: Optional for Fibre Channel Interface interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Fibre Channel Cabling Type</key> - <string>Fiber Optic</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyFibreChannelCableDescriptionFiberOpticKey "Fiber Optic" - - -#endif /* _IOKIT_IO_STORAGE_PROTOCOL_CHARACTERISTICS_H_ */ diff --git a/i386/include/IOKit/storage/IOAppleLabelScheme.h b/i386/include/IOKit/storage/IOAppleLabelScheme.h deleted file mode 100644 index 6e290a4..0000000 --- a/i386/include/IOKit/storage/IOAppleLabelScheme.h +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/* - * This header contains the IOAppleLabelScheme class definition. - */ - -#ifndef _IOAPPLELABELSCHEME_H -#define _IOAPPLELABELSCHEME_H - -#include <IOKit/IOTypes.h> - -/* - * kIOAppleLabelSchemeClass is the name of the IOAppleLabelScheme class. - */ - -#define kIOAppleLabelSchemeClass "IOAppleLabelScheme" - -/* - * Apple Label Scheme Definitions - */ - -#pragma pack(push, 1) /* (enable 8-bit struct packing) */ - -/* Label scheme. */ - -struct applelabel -{ - uint8_t al_boot0[416]; /* (reserved for boot area) */ - uint16_t al_magic; /* (the magic number) */ - uint16_t al_type; /* (label type) */ - uint32_t al_flags; /* (generic flags) */ - uint64_t al_offset; /* (offset of property area, bytes) */ - uint32_t al_size; /* (size of property area, bytes) */ - uint32_t al_checksum; /* (checksum of property area) */ - uint8_t al_boot1[72]; /* (reserved for boot area) */ -}; - -/* Label scheme signature (al_magic). */ - -#define AL_MAGIC 0x414C - -/* Label scheme version (al_type). */ - -#define AL_TYPE_DEFAULT 0x0000 - -/* Label scheme flags (al_flags). */ - -#define AL_FLAG_DEFAULT 0x00000000 - -#pragma pack(pop) /* (reset to default struct packing) */ - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOFilterScheme.h> - -/* - * Class - */ - -class IOAppleLabelScheme : public IOFilterScheme -{ - OSDeclareDefaultStructors(IOAppleLabelScheme); - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - - IOMedia * _content; - - /* - * Free all of this object's outstanding resources. - */ - - virtual void free(void); - - /* - * Scan the provider media for an Apple label scheme. - */ - - virtual IOMedia * scan(SInt32 * score); - - /* - * Ask whether the given content appears to be corrupt. - */ - - virtual bool isContentCorrupt(OSDictionary * properties); - - /* - * Ask whether the given content appears to be invalid. - */ - - virtual bool isContentInvalid(OSDictionary * properties); - - /* - * Instantiate a new media object to represent the given content. - */ - - virtual IOMedia * instantiateMediaObject(OSDictionary * properties); - - /* - * Allocate a new media object (called from instantiateMediaObject). - */ - - virtual IOMedia * instantiateDesiredMediaObject(OSDictionary * properties); - - /* - * Attach the given media object to the device tree plane. - */ - - virtual bool attachMediaObjectToDeviceTree(IOMedia * media); - - /* - * Detach the given media object from the device tree plane. - */ - - virtual void detachMediaObjectFromDeviceTree(IOMedia * media); - -public: - - /* - * Initialize this object's minimal state. - */ - - virtual bool init(OSDictionary * properties = 0); - - /* - * Determine whether the provider media contains an Apple label scheme. - */ - - virtual IOService * probe(IOService * provider, SInt32 * score); - - /* - * Publish the new media object which represents our content. - */ - - virtual bool start(IOService * provider); - - /* - * Clean up after the media object we published before terminating. - */ - - virtual void stop(IOService * provider); - - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 0); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 1); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 2); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 3); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 4); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 5); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 6); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 7); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 8); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 9); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 10); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 11); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 12); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 13); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 14); - OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 15); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOAPPLELABELSCHEME_H */ diff --git a/i386/include/IOKit/storage/IOApplePartitionScheme.h b/i386/include/IOKit/storage/IOApplePartitionScheme.h deleted file mode 100644 index ace1f3b..0000000 --- a/i386/include/IOKit/storage/IOApplePartitionScheme.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/* - * This header contains the IOApplePartitionScheme class definition. - */ - -#ifndef _IOAPPLEPARTITIONSCHEME_H -#define _IOAPPLEPARTITIONSCHEME_H - -#include <IOKit/IOTypes.h> - -/* - * kIOApplePartitionSchemeClass is the name of the IOApplePartitionScheme class. - */ - -#define kIOApplePartitionSchemeClass "IOApplePartitionScheme" - -/* - * Apple Partition Map Definitions - */ - -#pragma pack(push, 1) /* (enable 8-bit struct packing) */ - -/* Structure constants. */ - -#define DPISTRLEN 32 - -/* Partition map entry, as found in blocks 1 to dpme_map_entries of the disk. */ - -typedef struct dpme -{ - UInt16 dpme_signature; /* (unique value for partition entry, 'PM') */ - UInt16 dpme_reserved_1; /* (reserved for future use) */ - UInt32 dpme_map_entries; /* (number of partition entries) */ - UInt32 dpme_pblock_start; /* (physical block start of partition) */ - UInt32 dpme_pblocks; /* (physical block count of partition) */ - char dpme_name[DPISTRLEN]; /* (name of partition) */ - char dpme_type[DPISTRLEN]; /* (type of partition, eg. Apple_HFS) */ - UInt32 dpme_lblock_start; /* (logical block start of partition) */ - UInt32 dpme_lblocks; /* (logical block count of partition) */ - UInt32 dpme_flags; /* (partition flags, see defines below) */ - UInt32 dpme_boot_block; /* (logical block start of boot code) */ - UInt32 dpme_boot_bytes; /* (byte count of boot code) */ - UInt32 dpme_load_addr; /* (load address in memory of boot code) */ - UInt32 dpme_load_addr_2; /* (reserved for future use) */ - UInt32 dpme_goto_addr; /* (jump address in memory of boot code) */ - UInt32 dpme_goto_addr_2; /* (reserved for future use) */ - UInt32 dpme_checksum; /* (checksum of boot code) */ - UInt8 dpme_process_id[16]; /* (processor type) */ - UInt32 dpme_reserved_2[32]; /* (reserved for future use) */ - UInt32 dpme_reserved_3[62]; /* (reserved for future use) */ -} DPME; - -/* Driver descriptor map entry. */ - -typedef struct DDMap -{ - UInt32 ddBlock; /* (driver's block start, sbBlkSize-blocks) */ - UInt16 ddSize; /* (driver's block count, 512-blocks) */ - UInt16 ddType; /* (driver's system type) */ -} DDMap; - -/* Driver descriptor map, as found in block zero of the disk. */ - -typedef struct Block0 -{ - UInt16 sbSig; /* (unique value for block zero, 'ER') */ - UInt16 sbBlkSize; /* (block size for this device) */ - UInt32 sbBlkCount; /* (block count for this device) */ - UInt16 sbDevType; /* (device type) */ - UInt16 sbDevId; /* (device id) */ - UInt32 sbDrvrData; /* (driver data) */ - UInt16 sbDrvrCount; /* (driver descriptor count) */ - DDMap sbDrvrMap[8]; /* (driver descriptor table) */ - UInt8 sbReserved[430]; /* (reserved for future use) */ -} Block0; - -/* Partition map signature (sbSig). */ - -#define BLOCK0_SIGNATURE 0x4552 - -/* Partition map entry signature (dpme_signature). */ - -#define DPME_SIGNATURE 0x504D - -/* Partition map entry flags (dpme_flags). */ - -#define DPME_FLAGS_VALID 0x00000001 /* (bit 0) */ -#define DPME_FLAGS_ALLOCATED 0x00000002 /* (bit 1) */ -#define DPME_FLAGS_IN_USE 0x00000004 /* (bit 2) */ -#define DPME_FLAGS_BOOTABLE 0x00000008 /* (bit 3) */ -#define DPME_FLAGS_READABLE 0x00000010 /* (bit 4) */ -#define DPME_FLAGS_WRITABLE 0x00000020 /* (bit 5) */ -#define DPME_FLAGS_OS_PIC_CODE 0x00000040 /* (bit 6) */ -#define DPME_FLAGS_OS_SPECIFIC_2 0x00000080 /* (bit 7) */ -#define DPME_FLAGS_OS_SPECIFIC_1 0x00000100 /* (bit 8) */ -#define DPME_FLAGS_RESERVED_2 0xFFFFFE00 /* (bit 9..31) */ - -#pragma pack(pop) /* (reset to default struct packing) */ - -#endif /* !_IOAPPLEPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/IOBDBlockStorageDevice.h b/i386/include/IOKit/storage/IOBDBlockStorageDevice.h deleted file mode 100644 index 66a09d7..0000000 --- a/i386/include/IOKit/storage/IOBDBlockStorageDevice.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2006-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOBDBlockStorageDevice - * @abstract - * This header contains the IOBDBlockStorageDevice class definition. - */ - -#ifndef _IOBDBLOCKSTORAGEDEVICE_H -#define _IOBDBLOCKSTORAGEDEVICE_H - -#include <IOKit/storage/IOBDTypes.h> - -/*! - * @defined kIOBDBlockStorageDeviceClass - * @abstract - * kIOBDBlockStorageDeviceClass is the name of the IOBDBlockStorageDevice class. - * @discussion - * kIOBDBlockStorageDeviceClass is the name of the IOBDBlockStorageDevice class. - */ - -#define kIOBDBlockStorageDeviceClass "IOBDBlockStorageDevice" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IODVDBlockStorageDevice.h> - -/* Property used for matching, so the generic driver gets the nub it wants. */ -#define kIOBlockStorageDeviceTypeBD "BD" - -/*! - * @class - * IOBDBlockStorageDevice - * @abstract - * The IOBDBlockStorageDevice class is a generic BD block storage device - * abstraction. - * @discussion - * This class is the protocol for generic BD functionality, independent of - * the physical connection protocol (e.g. SCSI, ATA, USB). - * - * The APIs are the union of CD APIs, DVD APIs, and all - * necessary new low-level BD APIs. - * - * A subclass implements relay methods that translate our requests into - * calls to a protocol- and device-specific provider. - */ - -class IOBDBlockStorageDevice : public IODVDBlockStorageDevice -{ - OSDeclareAbstractStructors(IOBDBlockStorageDevice) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - -public: - - /*! - * @function init - * @discussion - * Initialize this object's minimal state. - * @param properties - * Substitute property table for this object (optional). - * @result - * Returns true on success, false otherwise. - */ - - virtual bool init(OSDictionary * properties); - - /*! - * @function readDiscStructure - * @discussion - * Issue an MMC READ DISC STRUCTURE command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param format - * As documented by MMC. - * @param address - * As documented by MMC. - * @param layer - * As documented by MMC. - * @param grantID - * As documented by MMC. - * @param type - * As documented by MMC. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readDiscStructure( IOMemoryDescriptor * buffer, - UInt8 format, - UInt32 address, - UInt8 layer, - UInt8 grantID, - UInt8 type ) = 0; - - /*! - * @function splitTrack - * @discussion - * Issue an MMC RESERVE TRACK command with the ARSV bit. - * @param address - * As documented by MMC. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn splitTrack(UInt32 address) = 0; - - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 0); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 1); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 2); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 3); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 4); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 5); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 6); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 7); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 8); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 9); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 10); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 11); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 12); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 13); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 14); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 15); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOBDBLOCKSTORAGEDEVICE_H */ diff --git a/i386/include/IOKit/storage/IOBDBlockStorageDriver.h b/i386/include/IOKit/storage/IOBDBlockStorageDriver.h deleted file mode 100644 index 199218c..0000000 --- a/i386/include/IOKit/storage/IOBDBlockStorageDriver.h +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) 2006-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOBDBlockStorageDriver - * @abstract - * This header contains the IOBDBlockStorageDriver class definition. - * @discussion - * This class implements BD functionality, independent of - * the physical connection protocol (e.g. SCSI, ATA, USB). - * - * A protocol-specific provider implements the functionality using an appropriate - * protocol and commands. - */ - -#ifndef _IOBDBLOCKSTORAGEDRIVER_H -#define _IOBDBLOCKSTORAGEDRIVER_H - -#include <IOKit/storage/IOBDBlockStorageDevice.h> -#include <IOKit/storage/IODVDBlockStorageDriver.h> - -/*! - * @defined kIOBDBlockStorageDriverClass - * @abstract - * kIOBDBlockStorageDriverClass is the name of the IOBDBlockStorageDriver class. - * @discussion - * kIOBDBlockStorageDriverClass is the name of the IOBDBlockStorageDriver class. - */ - -#define kIOBDBlockStorageDriverClass "IOBDBlockStorageDriver" - -/*! - * @class - * IOBDBlockStorageDriver - * @abstract - * Generic BD Driver. - * @discussion - * Storage drivers are split into two parts: the Generic Driver handles - * all generic device issues, independent of the lower-level transport - * mechanism (e.g. SCSI, ATA, USB, FireWire). All storage operations - * at the Generic Driver level are translated into a series of generic - * device operations. These operations are passed via the Device Nub - * to a Transport Driver, which implements the appropriate - * transport-dependent protocol to execute these operations. - * - * To determine the write-protect state of a device (or media), for - * example, the generic driver would issue a call to the - * Transport Driver's reportWriteProtection method. If this were a SCSI - * device, its Transport Driver would issue a Mode Sense command to - * extract the write-protection status bit. The Transport Driver then - * reports true or false to the generic driver. - * - * The generic driver therefore has no knowledge of, or involvement - * with, the actual commands and mechanisms used to communicate with - * the device. It is expected that the generic driver will rarely, if - * ever, need to be subclassed to handle device idiosyncrasies; rather, - * the Transport Driver should be changed via overrides. - * - * A generic driver could be subclassed to create a different type of - * generic device. The generic driver IOBDBlockStorageDriver class is a subclass - * of IODVDBlockStorageDriver, adding BD functions. Similarly, the Transport Driver - * IOBDBlockStorageDevice is a subclass of IODVDBlockStorageDevice, adding BD - * functions. -*/ - -class IOBDBlockStorageDriver : public IODVDBlockStorageDriver -{ - OSDeclareDefaultStructors(IOBDBlockStorageDriver) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - - /* Overrides of IODVDBlockStorageDriver. */ - - virtual IOReturn acceptNewMedia(void); - - /* End of IODVDBlockStorageDriver overrides. */ - -public: - - /* - * Obtain this object's provider. We override the superclass's method to - * return a more specific subclass of IOService -- IOBDBlockStorageDevice. - * This method serves simply as a convenience to subclass developers. - */ - - virtual IOBDBlockStorageDevice * getProvider() const; - - /* Overrides of IODVDBlockStorageDriver: */ - - virtual const char * getDeviceTypeName(void); - virtual IOMedia * instantiateDesiredMediaObject(void); - virtual IOMedia * instantiateMediaObject(UInt64 base,UInt64 byteSize, - UInt32 blockSize,char *mediaName); - virtual IOReturn readStructure(IOMemoryDescriptor *buffer,const DVDStructureFormat format, - const UInt32 address,const UInt8 layer,const UInt8 agid); - - /* End of IODVDBlockStorageDriver overrides. */ - - /*! - * @function splitTrack - * @discussion - * Issue an MMC RESERVE TRACK command with the ARSV bit. - * @param address - * As documented by MMC. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn splitTrack(UInt32 address); - - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 0); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 1); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 2); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 3); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 4); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 5); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 6); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 7); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 8); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 9); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 10); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 11); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 12); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 13); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 14); - OSMetaClassDeclareReservedUnused(IOBDBlockStorageDriver, 15); -}; - -#endif /* !_IOBDBLOCKSTORAGEDRIVER_H */ diff --git a/i386/include/IOKit/storage/IOBDMedia.h b/i386/include/IOKit/storage/IOBDMedia.h deleted file mode 100644 index e204a1e..0000000 --- a/i386/include/IOKit/storage/IOBDMedia.h +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright (c) 2006-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOBDMedia - * @abstract - * This header contains the IOBDMedia class definition. - */ - -#ifndef _IOBDMEDIA_H -#define _IOBDMEDIA_H - -/*! - * @defined kIOBDMediaClass - * @abstract - * kIOBDMediaClass is the name of the IOBDMedia class. - * @discussion - * kIOBDMediaClass is the name of the IOBDMedia class. - */ - -#define kIOBDMediaClass "IOBDMedia" - -/*! - * @defined kIOBDMediaTypeKey - * @abstract - * kIOBDMediaTypeKey is a property of IOBDMedia objects. It has an OSString - * value. - * @discussion - * The kIOBDMediaTypeKey property identifies the BD media type (BD-ROM, BD-R, - * BD-RE, etc). See the kIOBDMediaType contants for possible values. - */ - -#define kIOBDMediaTypeKey "Type" - -/*! - * @defined kIOBDMediaTypeROM - * The kIOBDMediaTypeKey constant for BD-ROM media. - */ - -#define kIOBDMediaTypeROM "BD-ROM" - -/*! - * @defined kIOBDMediaTypeR - * The kIOBDMediaTypeKey constant for BD-R media. - */ - -#define kIOBDMediaTypeR "BD-R" - -/*! - * @defined kIOBDMediaTypeRE - * The kIOBDMediaTypeKey constant for BD-RE media. - */ - -#define kIOBDMediaTypeRE "BD-RE" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOBDBlockStorageDriver.h> -#include <IOKit/storage/IOMedia.h> - -/*! - * @class IOBDMedia - * @abstract - * The IOBDMedia class is a random-access disk device abstraction for BDs. - * @discussion - * The IOBDMedia class is a random-access disk device abstraction for BDs. - */ - -class IOBDMedia : public IOMedia -{ - OSDeclareDefaultStructors(IOBDMedia) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - -public: - - /* - * Obtain this object's provider. We override the superclass's method to - * return a more specific subclass of IOService -- IOBDBlockStorageDriver. - * This method serves simply as a convenience to subclass developers. - */ - - virtual IOBDBlockStorageDriver * getProvider() const; - - /* - * Compare the properties in the supplied table to this object's properties. - */ - - virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); - - /*! - * @function reportKey - * @discussion - * Issue an MMC REPORT KEY command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param keyClass - * As documented by MMC. - * @param address - * As documented by MMC. - * @param grantID - * As documented by MMC. - * @param format - * As documented by MMC. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn reportKey( IOMemoryDescriptor * buffer, - UInt8 keyClass, - UInt32 address, - UInt8 grantID, - UInt8 format ); - - /*! - * @function sendKey - * @discussion - * Issue an MMC SEND KEY command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param keyClass - * As documented by MMC. - * @param grantID - * As documented by MMC. - * @param format - * As documented by MMC. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn sendKey( IOMemoryDescriptor * buffer, - UInt8 keyClass, - UInt8 grantID, - UInt8 format ); - - /*! - * @function readStructure - * @discussion - * Issue an MMC READ DISC STRUCTURE command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param format - * As documented by MMC. - * @param address - * As documented by MMC. - * @param layer - * As documented by MMC. - * @param grantID - * As documented by MMC. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readStructure( IOMemoryDescriptor * buffer, - UInt8 format, - UInt32 address, - UInt8 layer, - UInt8 grantID ); - - /*! - * @function getSpeed - * @discussion - * Get the current speed used for data transfers. - * @param kilobytesPerSecond - * Returns the current speed used for data transfers, in kB/s. - * - * kBDSpeedMin specifies the minimum speed for all BD media (1X). - * kBDSpeedMax specifies the maximum speed supported in hardware. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn getSpeed(UInt16 * kilobytesPerSecond); - - /*! - * @function setSpeed - * @discussion - * Set the speed to be used for data transfers. - * @param kilobytesPerSecond - * Speed to be used for data transfers, in kB/s. - * - * kBDSpeedMin specifies the minimum speed for all BD media (1X). - * kBDSpeedMax specifies the maximum speed supported in hardware. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn setSpeed(UInt16 kilobytesPerSecond); - - /*! - * @function readDiscInfo - * @discussion - * Issue an MMC READ DISC INFORMATION command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param type - * Reserved for future use. Set to zero. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readDiscInfo( IOMemoryDescriptor * buffer, - UInt8 type, - UInt16 * actualByteCount ); - - /*! - * @function readTrackInfo - * @discussion - * Issue an MMC READ TRACK INFORMATION command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param address - * As documented by MMC. - * @param addressType - * As documented by MMC. - * @param open - * Reserved for future use. Set to zero. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readTrackInfo( IOMemoryDescriptor * buffer, - UInt32 address, - UInt8 addressType, - UInt8 open, - UInt16 * actualByteCount ); - - /*! - * @function splitTrack - * @discussion - * Issue an MMC RESERVE TRACK command with the ARSV bit. - * @param address - * As documented by MMC. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn splitTrack(UInt32 address); - - OSMetaClassDeclareReservedUnused(IOBDMedia, 0); - OSMetaClassDeclareReservedUnused(IOBDMedia, 1); - OSMetaClassDeclareReservedUnused(IOBDMedia, 2); - OSMetaClassDeclareReservedUnused(IOBDMedia, 3); - OSMetaClassDeclareReservedUnused(IOBDMedia, 4); - OSMetaClassDeclareReservedUnused(IOBDMedia, 5); - OSMetaClassDeclareReservedUnused(IOBDMedia, 6); - OSMetaClassDeclareReservedUnused(IOBDMedia, 7); - OSMetaClassDeclareReservedUnused(IOBDMedia, 8); - OSMetaClassDeclareReservedUnused(IOBDMedia, 9); - OSMetaClassDeclareReservedUnused(IOBDMedia, 10); - OSMetaClassDeclareReservedUnused(IOBDMedia, 11); - OSMetaClassDeclareReservedUnused(IOBDMedia, 12); - OSMetaClassDeclareReservedUnused(IOBDMedia, 13); - OSMetaClassDeclareReservedUnused(IOBDMedia, 14); - OSMetaClassDeclareReservedUnused(IOBDMedia, 15); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOBDMEDIA_H */ diff --git a/i386/include/IOKit/storage/IOBDMediaBSDClient.h b/i386/include/IOKit/storage/IOBDMediaBSDClient.h deleted file mode 100644 index ee356f5..0000000 --- a/i386/include/IOKit/storage/IOBDMediaBSDClient.h +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (c) 2006-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOBDMEDIABSDCLIENT_H -#define _IOBDMEDIABSDCLIENT_H - -#include <sys/ioctl.h> -#include <sys/types.h> - -#include <IOKit/storage/IOBDTypes.h> - -/* - * Definitions - * - * ioctl description - * ---------------------------- ------------------------------------------------ - * DKIOCBDREADSTRUCTURE see IOBDMedia::readStructure() in IOBDMedia.h - * - * DKIOCBDREADDISCINFO see IOBDMedia::readDiscInfo() in IOBDMedia.h - * DKIOCBDREADTRACKINFO see IOBDMedia::readTrackInfo() in IOBDMedia.h - * - * DKIOCBDREPORTKEY see IOBDMedia::reportKey() in IOBDMedia.h - * DKIOCBDSENDKEY see IOBDMedia::sendKey() in IOBDMedia.h - * - * DKIOCBDGETSPEED see IOBDMedia::getSpeed() in IOBDMedia.h - * DKIOCBDSETSPEED see IOBDMedia::setSpeed() in IOBDMedia.h - * - * in /System/Library/Frameworks/Kernel.framework/Headers/IOKit/storage/ - */ - -typedef struct -{ - uint8_t format; - - uint8_t reserved0008[3]; /* reserved, clear to zero */ - - uint32_t address; - uint8_t grantID; - uint8_t layer; - - uint8_t reserved0080[4]; /* reserved, clear to zero */ - - uint16_t bufferLength; - void * buffer; -} dk_bd_read_structure_t; - -typedef struct -{ - uint8_t format; - uint8_t keyClass; - - uint8_t reserved0016[2]; /* reserved, clear to zero */ - - uint32_t address; - uint8_t grantID; - - uint8_t reserved0072[5]; /* reserved, clear to zero */ - - uint16_t bufferLength; - void * buffer; -} dk_bd_report_key_t; - -typedef struct -{ - uint8_t format; - uint8_t keyClass; - - uint8_t reserved0016[6]; /* reserved, clear to zero */ - - uint8_t grantID; - - uint8_t reserved0072[5]; /* reserved, clear to zero */ - - uint16_t bufferLength; - void * buffer; -} dk_bd_send_key_t; - -typedef struct -{ - uint8_t reserved0000[14]; /* reserved, clear to zero */ - - uint16_t bufferLength; /* actual length on return */ - void * buffer; -} dk_bd_read_disc_info_t; - -typedef struct -{ - uint8_t reserved0000[4]; /* reserved, clear to zero */ - - uint32_t address; - uint8_t addressType; - - uint8_t reserved0072[5]; /* reserved, clear to zero */ - - uint16_t bufferLength; /* actual length on return */ - void * buffer; -} dk_bd_read_track_info_t; - -#define DKIOCBDREADSTRUCTURE _IOW('d', 160, dk_bd_read_structure_t) -#define DKIOCBDREPORTKEY _IOW('d', 161, dk_bd_report_key_t) -#define DKIOCBDSENDKEY _IOW('d', 162, dk_bd_send_key_t) - -#define DKIOCBDGETSPEED _IOR('d', 163, uint16_t) -#define DKIOCBDSETSPEED _IOW('d', 163, uint16_t) - -#define DKIOCBDREADDISCINFO _IOWR('d', 164, dk_bd_read_disc_info_t) -#define DKIOCBDREADTRACKINFO _IOWR('d', 165, dk_bd_read_track_info_t) - -#define DKIOCBDSPLITTRACK _IOW('d', 166, uint32_t) - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOBDMedia.h> -#include <IOKit/storage/IOMediaBSDClient.h> - -/* - * Class - */ - -class IOBDMediaBSDClient : public IOMediaBSDClient -{ - OSDeclareDefaultStructors(IOBDMediaBSDClient) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - -public: - - /* - * Obtain this object's provider. We override the superclass's method - * to return a more specific subclass of IOService -- IOBDMedia. This - * method serves simply as a convenience to subclass developers. - */ - - virtual IOBDMedia * getProvider() const; - - /* - * Process a BD-specific ioctl. - */ - - virtual int ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, proc_t proc); - - OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 0); - OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 1); - OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 2); - OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 3); - OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 4); - OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 5); - OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 6); - OSMetaClassDeclareReservedUnused(IOBDMediaBSDClient, 7); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOBDMEDIABSDCLIENT_H */ diff --git a/i386/include/IOKit/storage/IOBDTypes.h b/i386/include/IOKit/storage/IOBDTypes.h deleted file mode 100644 index f5b7927..0000000 --- a/i386/include/IOKit/storage/IOBDTypes.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2006-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _BDTYPES_H -#define _BDTYPES_H - -#include <IOKit/IOTypes.h> - -#pragma pack(push, 1) /* (enable 8-bit struct packing) */ - -/* - * Media Types - */ - -enum -{ - kBDMediaTypeUnknown = 0x0300, - kBDMediaTypeROM = 0x0302, /* BD-ROM */ - kBDMediaTypeRE = 0x0303, /* BD-RE */ - kBDMediaTypeR = 0x0304, /* BD-R */ - - kBDMediaTypeMin = 0x0300, - kBDMediaTypeMax = 0x03FF -}; - -typedef UInt32 BDMediaType; - -/* - * Media Speed (kB/s) - */ - -#define kBDSpeedMin 0x1126 -#define kBDSpeedMax 0xFFFF - -/* - * MMC Formats - */ - -// Read Disc Information Format -struct BDDiscInfo -{ - UInt16 dataLength; -#ifdef __LITTLE_ENDIAN__ - UInt8 discStatus:2; - UInt8 stateOfLastSession:2; - UInt8 erasable:1; - UInt8 dataType:3; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 dataType:3; - UInt8 erasable:1; - UInt8 stateOfLastSession:2; - UInt8 discStatus:2; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 reserved2; - UInt8 numberOfSessionsLSB; - UInt8 firstTrackNumberInLastSessionLSB; - UInt8 lastTrackNumberInLastSessionLSB; - UInt8 reserved4[2]; - UInt8 numberOfSessionsMSB; - UInt8 firstTrackNumberInLastSessionMSB; - UInt8 lastTrackNumberInLastSessionMSB; - UInt8 reserved6[22]; -}; -typedef struct BDDiscInfo BDDiscInfo; - -// Read Track Information Format -struct BDTrackInfo -{ - UInt16 dataLength; - UInt8 trackNumberLSB; - UInt8 sessionNumberLSB; - UInt8 reserved; -#ifdef __LITTLE_ENDIAN__ - UInt8 reserved2:5; - UInt8 damage:1; - UInt8 reserved3:2; - - UInt8 reserved4:6; - UInt8 blank:1; - UInt8 reservedTrack:1; - - UInt8 nextWritableAddressValid:1; - UInt8 lastRecordedAddressValid:1; - UInt8 reserved5:6; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 reserved3:2; - UInt8 damage:1; - UInt8 reserved2:5; - - UInt8 reservedTrack:1; - UInt8 blank:1; - UInt8 reserved4:6; - - UInt8 reserved5:6; - UInt8 lastRecordedAddressValid:1; - UInt8 nextWritableAddressValid:1; -#endif /* !__LITTLE_ENDIAN__ */ - UInt32 trackStartAddress; - UInt32 nextWritableAddress; - UInt32 freeBlocks; - UInt32 clusterSize; - UInt32 trackSize; - UInt32 lastRecordedAddress; - UInt8 trackNumberMSB; - UInt8 sessionNumberMSB; - UInt8 reserved6; - UInt8 reserved7; -}; -typedef struct BDTrackInfo BDTrackInfo; - -#pragma pack(pop) /* (reset to default struct packing) */ - -#endif /* _BDTYPES_H */ diff --git a/i386/include/IOKit/storage/IOBlockStorageDevice.h b/i386/include/IOKit/storage/IOBlockStorageDevice.h deleted file mode 100644 index bbec146..0000000 --- a/i386/include/IOKit/storage/IOBlockStorageDevice.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOBlockStorageDevice - * @abstract - * This header contains the IOBlockStorageDevice class definition. - */ - -#ifndef _IOBLOCKSTORAGEDEVICE_H -#define _IOBLOCKSTORAGEDEVICE_H - -#include <IOKit/IOTypes.h> -#include <IOKit/storage/IOStorageDeviceCharacteristics.h> - -/*! - * @defined kIOBlockStorageDeviceClass - * @abstract - * The name of the IOBlockStorageDevice class. - */ - -#define kIOBlockStorageDeviceClass "IOBlockStorageDevice" - -/*! - * @defined kIOBlockStorageDeviceWriteCacheStateKey - * @abstract - * The name of the property used to get or set the write cache state of the - * block storage device. - */ -#define kIOBlockStorageDeviceWriteCacheStateKey "WriteCacheState" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IOMessage.h> -#include <IOKit/IOService.h> -#include <IOKit/storage/IOMedia.h> - -/* Property used for matching, so the generic driver gets the nub it wants. */ -/*! - * @defined kIOBlockStorageDeviceTypeKey - * @abstract The name of the property tested for nub type matching by the generic block - * storage driver. - */ -#define kIOBlockStorageDeviceTypeKey "device-type" -/*! - * @defined kIOBlockStorageDeviceTypeGeneric - * @abstract A character string used for nub matching. - */ -#define kIOBlockStorageDeviceTypeGeneric "Generic" - - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOBLOCKSTORAGEDEVICE_H */ diff --git a/i386/include/IOKit/storage/IOBlockStorageDriver.h b/i386/include/IOKit/storage/IOBlockStorageDriver.h deleted file mode 100644 index 24ac3c2..0000000 --- a/i386/include/IOKit/storage/IOBlockStorageDriver.h +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOBlockStorageDriver - * @abstract - * This header contains the IOBlockStorageDriver class definition. - */ - -#ifndef _IOBLOCKSTORAGEDRIVER_H -#define _IOBLOCKSTORAGEDRIVER_H - -#include <IOKit/IOTypes.h> - -/*! - * @defined kIOBlockStorageDriverClass - * @abstract - * The name of the IOBlockStorageDriver class. - */ - -#define kIOBlockStorageDriverClass "IOBlockStorageDriver" - -/*! - * @defined kIOBlockStorageDriverStatisticsKey - * @abstract - * Holds a table of numeric values describing the driver's - * operating statistics. - * @discussion - * This property holds a table of numeric values describing the driver's - * operating statistics. The table is an OSDictionary, where each entry - * describes one given statistic. - */ - -#define kIOBlockStorageDriverStatisticsKey "Statistics" - -/*! - * @defined kIOBlockStorageDriverStatisticsBytesReadKey - * @abstract - * Describes the number of bytes read since the block storage - * driver was instantiated. - * @discussion - * This property describes the number of bytes read since the block storage - * driver was instantiated. It is one of the statistic entries listed under - * the top-level kIOBlockStorageDriverStatisticsKey property table. It has - * an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsBytesReadKey "Bytes (Read)" - -/*! - * @defined kIOBlockStorageDriverStatisticsBytesWrittenKey - * @abstract - * Describes the number of bytes written since the block storage - * driver was instantiated. - * @discussion - * This property describes the number of bytes written since the block storage - * driver was instantiated. It is one of the statistic entries listed under the - * top-level kIOBlockStorageDriverStatisticsKey property table. It has an - * OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsBytesWrittenKey "Bytes (Write)" - -/*! - * @defined kIOBlockStorageDriverStatisticsReadErrorsKey - * @abstract - * Describes the number of read errors encountered since the block - * storage driver was instantiated. - * @discussion - * This property describes the number of read errors encountered since the block - * storage driver was instantiated. It is one of the statistic entries listed - * under the top-level kIOBlockStorageDriverStatisticsKey property table. It - * has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsReadErrorsKey "Errors (Read)" - -/*! - * @defined kIOBlockStorageDriverStatisticsWriteErrorsKey - * @abstract - * Describes the number of write errors encountered since the - * block storage driver was instantiated. - * @discussion - * This property describes the number of write errors encountered since the - * block storage driver was instantiated. It is one of the statistic entries - * listed under the top-level kIOBlockStorageDriverStatisticsKey property table. - * It has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsWriteErrorsKey "Errors (Write)" - -/*! - * @defined kIOBlockStorageDriverStatisticsLatentReadTimeKey - * @abstract - * Describes the number of nanoseconds of latency during reads - * since the block storage driver was instantiated. - * @discussion - * This property describes the number of nanoseconds of latency during reads - * since the block storage driver was instantiated. It is one of the statistic - * entries listed under the top-level kIOBlockStorageDriverStatisticsKey - * property table. It has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsLatentReadTimeKey "Latency Time (Read)" - -/*! - * @defined kIOBlockStorageDriverStatisticsLatentWriteTimeKey - * @abstract - * Describes the number of nanoseconds of latency during writes - * since the block storage driver was instantiated. - * @discussion - * This property describes the number of nanoseconds of latency during writes - * since the block storage driver was instantiated. It is one of the statistic - * entries listed under the top-level kIOBlockStorageDriverStatisticsKey - * property table. It has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsLatentWriteTimeKey "Latency Time (Write)" - -/*! - * @defined kIOBlockStorageDriverStatisticsReadsKey - * @abstract - * Describes the number of read operations processed since the - * block storage driver was instantiated. - * @discussion - * This property describes the number of read operations processed since the - * block storage driver was instantiated. It is one of the statistic entries - * listed under the top-level kIOBlockStorageDriverStatisticsKey property table. - * It has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsReadsKey "Operations (Read)" - -/*! - * @defined kIOBlockStorageDriverStatisticsWritesKey - * @abstract - * Describes the number of write operations processed since the - * block storage driver was instantiated. - * @discussion - * This property describes the number of write operations processed since the - * block storage driver was instantiated. It is one of the statistic entries - * listed under the top-level kIOBlockStorageDriverStatisticsKey property table. - * It has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsWritesKey "Operations (Write)" - -/*! - * @defined kIOBlockStorageDriverStatisticsReadRetriesKey - * @abstract - * Describes the number of read retries required since the block - * storage driver was instantiated. - * @discussion - * This property describes the number of read retries required since the block - * storage driver was instantiated. It is one of the statistic entries listed - * under the top-level kIOBlockStorageDriverStatisticsKey property table. It - * has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsReadRetriesKey "Retries (Read)" - -/*! - * @defined kIOBlockStorageDriverStatisticsWriteRetriesKey - * @abstract - * Describes the number of write retries required since the block - * storage driver was instantiated. - * @discussion - * This property describes the number of write retries required since the block - * storage driver was instantiated. It is one of the statistic entries listed - * under the top-level kIOBlockStorageDriverStatisticsKey property table. It - * has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsWriteRetriesKey "Retries (Write)" - -/*! - * @defined kIOBlockStorageDriverStatisticsTotalReadTimeKey - * @abstract - * Describes the number of nanoseconds spent performing reads - * since the block storage driver was instantiated. - * @discussion - * This property describes the number of nanoseconds spent performing reads - * since the block storage driver was instantiated. It is one of the statistic - * entries listed under the top-level kIOBlockStorageDriverStatisticsKey - * property table. It has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsTotalReadTimeKey "Total Time (Read)" - -/*! - * @defined kIOBlockStorageDriverStatisticsTotalWriteTimeKey - * @abstract - * Describes the number of nanoseconds spent performing writes - * since the block storage driver was instantiated. - * @discussion - * This property describes the number of nanoseconds spent performing writes - * since the block storage driver was instantiated. It is one of the statistic - * entries listed under the top-level kIOBlockStorageDriverStatisticsKey - * property table. It has an OSNumber value. - */ - -#define kIOBlockStorageDriverStatisticsTotalWriteTimeKey "Total Time (Write)" - -/*! - * @enum IOMediaState - * @abstract - * The different states that getMediaState() can report. - * @constant kIOMediaStateOffline - * Media is not available. - * @constant kIOMediaStateOnline - * Media is available and ready for operations. - * @constant kIOMediaStateBusy - * Media is available, but not ready for operations. - */ - -enum -{ - kIOMediaStateOffline = 0, - kIOMediaStateOnline = 1, - kIOMediaStateBusy = 2 -}; - -typedef UInt32 IOMediaState; - -#endif /* !_IOBLOCKSTORAGEDRIVER_H */ diff --git a/i386/include/IOKit/storage/IOCDBlockStorageDevice.h b/i386/include/IOKit/storage/IOCDBlockStorageDevice.h deleted file mode 100644 index 706da40..0000000 --- a/i386/include/IOKit/storage/IOCDBlockStorageDevice.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOCDBlockStorageDevice - * @abstract - * This header contains the IOCDBlockStorageDevice class definition. - */ - -#ifndef _IOCDBLOCKSTORAGEDEVICE_H -#define _IOCDBLOCKSTORAGEDEVICE_H - -#include <IOKit/storage/IOCDTypes.h> - -/*! - * @defined kIOCDBlockStorageDeviceClass - * @abstract - * kIOCDBlockStorageDeviceClass is the name of the IOCDBlockStorageDevice class. - * @discussion - * kIOCDBlockStorageDeviceClass is the name of the IOCDBlockStorageDevice class. - */ - -#define kIOCDBlockStorageDeviceClass "IOCDBlockStorageDevice" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOBlockStorageDevice.h> - -/* Property used for matching, so the generic driver gets the nub it wants. */ -#define kIOBlockStorageDeviceTypeCDROM "CDROM" - - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOCDBLOCKSTORAGEDEVICE_H */ diff --git a/i386/include/IOKit/storage/IOCDBlockStorageDriver.h b/i386/include/IOKit/storage/IOCDBlockStorageDriver.h deleted file mode 100644 index f88a406..0000000 --- a/i386/include/IOKit/storage/IOCDBlockStorageDriver.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * IOCDBlockStorageDriver.h - * - * This class implements CD functionality, independent of - * the physical connection protocol (e.g. SCSI, ATA, USB). - * - * A protocol-specific provider implements the functionality using an appropriate - * protocol and commands. - */ - -#ifndef _IOCDBLOCKSTORAGEDRIVER_H -#define _IOCDBLOCKSTORAGEDRIVER_H - -#include <IOKit/IOTypes.h> -#include <IOKit/storage/IOCDBlockStorageDevice.h> -#include <IOKit/storage/IOCDTypes.h> -#include <IOKit/storage/IOBlockStorageDriver.h> - -/*! - * @defined kIOCDBlockStorageDriverClass - * @abstract - * kIOCDBlockStorageDriverClass is the name of the IOCDBlockStorageDriver class. - * @discussion - * kIOCDBlockStorageDriverClass is the name of the IOCDBlockStorageDriver class. - */ - -#define kIOCDBlockStorageDriverClass "IOCDBlockStorageDriver" - -#endif diff --git a/i386/include/IOKit/storage/IOCDMedia.h b/i386/include/IOKit/storage/IOCDMedia.h deleted file mode 100644 index 85ad72d..0000000 --- a/i386/include/IOKit/storage/IOCDMedia.h +++ /dev/null @@ -1,553 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOCDMedia - * @abstract - * This header contains the IOCDMedia class definition. - */ - -#ifndef _IOCDMEDIA_H -#define _IOCDMEDIA_H - -/*! - * @defined kIOCDMediaClass - * @abstract - * kIOCDMediaClass is the name of the IOCDMedia class. - * @discussion - * kIOCDMediaClass is the name of the IOCDMedia class. - */ - -#define kIOCDMediaClass "IOCDMedia" - -/*! - * @defined kIOCDMediaTOCKey - * @abstract - * kIOCDMediaTOCKey is a property of IOCDMedia objects. It has an OSData value - * and a CDTOC structure. - * @discussion - * The kIOCDMediaTOCKey property contains the CD's full table of contents, - * formatted as a CDTOC structure. The CDTOC structure is same as what is - * returned by a READ TOC command, format 0x02. All fields in the TOC are - * guaranteed to be binary-encoded (no BCD-encoded numbers are ever passed). - */ - -#define kIOCDMediaTOCKey "TOC" - -/*! - * @defined kIOCDMediaTypeKey - * @abstract - * kIOCDMediaTypeKey is a property of IOCDMedia objects. It has an OSString - * value. - * @discussion - * The kIOCDMediaTypeKey property identifies the CD media type (CD-ROM, CD-R, - * CD-RW, etc). See the kIOCDMediaType contants for possible values. - */ - -#define kIOCDMediaTypeKey "Type" - -/*! - * @defined kIOCDMediaTypeROM - * The kIOCDMediaTypeKey constant for CD-ROM media (inclusive of the CD-I, - * CD-ROM XA, and CD Audio standards, and mixed mode combinations thereof). - */ - -#define kIOCDMediaTypeROM "CD-ROM" - -/*! - * @defined kIOCDMediaTypeR - * The kIOCDMediaTypeKey constant for CD Recordable (CD-R) media. - */ - -#define kIOCDMediaTypeR "CD-R" - -/*! - * @defined kIOCDMediaTypeRW - * The kIOCDMediaTypeKey constant for CD ReWritable (CD-RW) media. - */ - -#define kIOCDMediaTypeRW "CD-RW" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOCDBlockStorageDriver.h> -#include <IOKit/storage/IOMedia.h> - -/*! - * @class IOCDMedia - * @abstract - * The IOCDMedia class is a random-access disk device abstraction for CDs. - * @discussion - * The IOCDMedia class is a random-access disk device abstraction for CDs. It - * extends the IOMedia class by implementing special CD APIs, such as readCD, - * and publishing the TOC as a property of the IOCDMedia object. - */ - -class IOCDMedia : public IOMedia -{ - OSDeclareDefaultStructors(IOCDMedia) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - -public: - - using IOStorage::read; - using IOStorage::write; - - /* - * Obtain this object's provider. We override the superclass's method to - * return a more specific subclass of IOService -- IOCDBlockStorageDriver. - * This method serves simply as a convenience to subclass developers. - */ - - virtual IOCDBlockStorageDriver * getProvider() const; - - /* - * Compare the properties in the supplied table to this object's properties. - */ - - virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); - - /*! - * @function read - * @discussion - * Read data from the storage object at the specified byte offset into the - * specified buffer, asynchronously. When the read completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the read. - * @param client - * Client requesting the read. - * @param byteStart - * Starting byte offset for the data transfer. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - * @param completion - * Completion routine to call once the data transfer is complete. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - */ - - virtual void read(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); - - /* - * @function write - * @discussion - * Write data into the storage object at the specified byte offset from the - * specified buffer, asynchronously. When the write completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the write. - * @param client - * Client requesting the write. - * @param byteStart - * Starting byte offset for the data transfer. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - * @param completion - * Completion routine to call once the data transfer is complete. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - */ - - virtual void write(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); - - /*! - * @function readCD - * @discussion - * Read data from the CD media object at the specified byte offset into the - * specified buffer, asynchronously. Special areas of the CD sector can be - * read via this method, such as the header and subchannel data. When the - * read completes, the caller will be notified via the specified completion - * action. - * - * The buffer will be retained for the duration of the read. - * @param client - * Client requesting the read. - * @param byteStart - * Starting byte offset for the data transfer (see sectorArea parameter). - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param sectorArea - * Sector area(s) to read. The sum of each area's size defines the natural - * block size of the media for the call. This should be taken into account - * when computing the address of byteStart. See IOCDTypes.h. - * @param sectorType - * Sector type that is expected. The data transfer is terminated as soon as - * data is encountered that does not match the expected type. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - * @param completion - * Completion routine to call once the data transfer is complete. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - */ - -#ifdef __LP64__ - virtual void readCD(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); -#else /* !__LP64__ */ - virtual void readCD(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageCompletion completion); -#endif /* !__LP64__ */ - - /*! - * @function readCD - * @discussion - * Read data from the CD media object at the specified byte offset into the - * specified buffer, synchronously. Special areas of the CD sector can be - * read via this method, such as the header and subchannel data. When the - * read completes, this method will return to the caller. The actual byte - * count field is optional. - * @param client - * Client requesting the read. - * @param byteStart - * Starting byte offset for the data transfer (see sectorArea parameter). - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param sectorArea - * Sector area(s) to read. The sum of each area's size defines the natural - * block size of the media for the call. This should be taken into account - * when computing the address of byteStart. See IOCDTypes.h. - * @param sectorType - * Sector type that is expected. The data transfer is terminated as soon as - * data is encountered that does not match the expected type. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - -#ifdef __LP64__ - virtual IOReturn readCD(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageAttributes * attributes = 0, - UInt64 * actualByteCount = 0); -#else /* !__LP64__ */ - virtual IOReturn readCD(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - CDSectorArea sectorArea, - CDSectorType sectorType, - UInt64 * actualByteCount = 0); -#endif /* !__LP64__ */ - - /*! - * @function readISRC - * @discussion - * Read the International Standard Recording Code for the specified track. - * @param track - * Track number from which to read the ISRC. - * @param isrc - * Buffer for the ISRC data. Buffer contents will be zero-terminated. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn readISRC(UInt8 track, CDISRC isrc); - - /*! - * @function readMCN - * @discussion - * Read the Media Catalog Number (also known as the Universal Product Code). - * @param mcn - * Buffer for the MCN data. Buffer contents will be zero-terminated. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn readMCN(CDMCN mcn); - - /*! - * @function getTOC - * @discussion - * Get the full Table Of Contents. - * - * All CDTOC fields passed across I/O Kit APIs are guaranteed to be - * binary-encoded (no BCD-encoded numbers are ever passed). - * @result - * Returns a pointer to the TOC buffer (do not deallocate). - */ - - virtual CDTOC * getTOC(); - - /*! - * @function getSpeed - * @discussion - * Get the current speed used for data transfers. - * @param kilobytesPerSecond - * Returns the current speed used for data transfers, in kB/s. - * - * kCDSpeedMin specifies the minimum speed for all CD media (1X). - * kCDSpeedMax specifies the maximum speed supported in hardware. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn getSpeed(UInt16 * kilobytesPerSecond); /* 10.1.0 */ - - /*! - * @function setSpeed - * @discussion - * Set the speed to be used for data transfers. - * @param kilobytesPerSecond - * Speed to be used for data transfers, in kB/s. - * - * kCDSpeedMin specifies the minimum speed for all CD media (1X). - * kCDSpeedMax specifies the maximum speed supported in hardware. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn setSpeed(UInt16 kilobytesPerSecond); /* 10.1.0 */ - - /*! - * @function readTOC - * @discussion - * Issue an MMC READ TOC/PMA/ATIP command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param format - * As documented by MMC. - * @param formatAsTime - * As documented by MMC. - * @param trackOrSessionNumber - * As documented by MMC. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readTOC(IOMemoryDescriptor * buffer, - CDTOCFormat format, - UInt8 formatAsTime, - UInt8 trackOrSessionNumber, - UInt16 * actualByteCount); /* 10.1.3 */ - - /*! - * @function readDiscInfo - * @discussion - * Issue an MMC READ DISC INFORMATION command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readDiscInfo(IOMemoryDescriptor * buffer, - UInt16 * actualByteCount); /* 10.1.3 */ - - /*! - * @function readTrackInfo - * @discussion - * Issue an MMC READ TRACK INFORMATION command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param address - * As documented by MMC. - * @param addressType - * As documented by MMC. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readTrackInfo(IOMemoryDescriptor * buffer, - UInt32 address, - CDTrackInfoAddressType addressType, - UInt16 * actualByteCount); /* 10.1.3 */ - - /* - * @function writeCD - * @discussion - * Write data into the CD media object at the specified byte offset from the - * specified buffer, asynchronously. When the write completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the write. - * @param client - * Client requesting the write. - * @param byteStart - * Starting byte offset for the data transfer (see sectorArea parameter). - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param sectorArea - * Sector area(s) to write. The sum of each area's size defines the natural - * block size of the media for the call. This should be taken into account - * when computing the address of byteStart. See IOCDTypes.h. - * @param sectorType - * Sector type that is expected. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - * @param completion - * Completion routine to call once the data transfer is complete. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - */ - -#ifdef __LP64__ - virtual void writeCD(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); -#else /* !__LP64__ */ - virtual void writeCD(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageCompletion completion); /* 10.2.0 */ -#endif /* !__LP64__ */ - - /* - * @function writeCD - * @discussion - * Write data into the CD media object at the specified byte offset from the - * specified buffer, synchronously. When the write completes, this method - * will return to the caller. The actual byte count field is optional. - * @param client - * Client requesting the write. - * @param byteStart - * Starting byte offset for the data transfer (see sectorArea parameter). - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param sectorArea - * Sector area(s) to write. The sum of each area's size defines the natural - * block size of the media for the call. This should be taken into account - * when computing the address of byteStart. See IOCDTypes.h. - * @param sectorType - * Sector type that is expected. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - -#ifdef __LP64__ - virtual IOReturn writeCD(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - CDSectorArea sectorArea, - CDSectorType sectorType, - IOStorageAttributes * attributes = 0, - UInt64 * actualByteCount = 0); -#else /* !__LP64__ */ - virtual IOReturn writeCD(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - CDSectorArea sectorArea, - CDSectorType sectorType, - UInt64 * actualByteCount = 0); /* 10.2.0 */ -#endif /* !__LP64__ */ - -#ifdef __LP64__ - OSMetaClassDeclareReservedUnused(IOCDMedia, 0); - OSMetaClassDeclareReservedUnused(IOCDMedia, 1); - OSMetaClassDeclareReservedUnused(IOCDMedia, 2); - OSMetaClassDeclareReservedUnused(IOCDMedia, 3); - OSMetaClassDeclareReservedUnused(IOCDMedia, 4); - OSMetaClassDeclareReservedUnused(IOCDMedia, 5); - OSMetaClassDeclareReservedUnused(IOCDMedia, 6); -#else /* !__LP64__ */ - OSMetaClassDeclareReservedUsed(IOCDMedia, 0); - OSMetaClassDeclareReservedUsed(IOCDMedia, 1); - OSMetaClassDeclareReservedUsed(IOCDMedia, 2); - OSMetaClassDeclareReservedUsed(IOCDMedia, 3); - OSMetaClassDeclareReservedUsed(IOCDMedia, 4); - OSMetaClassDeclareReservedUsed(IOCDMedia, 5); - OSMetaClassDeclareReservedUsed(IOCDMedia, 6); -#endif /* !__LP64__ */ - OSMetaClassDeclareReservedUnused(IOCDMedia, 7); - OSMetaClassDeclareReservedUnused(IOCDMedia, 8); - OSMetaClassDeclareReservedUnused(IOCDMedia, 9); - OSMetaClassDeclareReservedUnused(IOCDMedia, 10); - OSMetaClassDeclareReservedUnused(IOCDMedia, 11); - OSMetaClassDeclareReservedUnused(IOCDMedia, 12); - OSMetaClassDeclareReservedUnused(IOCDMedia, 13); - OSMetaClassDeclareReservedUnused(IOCDMedia, 14); - OSMetaClassDeclareReservedUnused(IOCDMedia, 15); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOCDMEDIA_H */ diff --git a/i386/include/IOKit/storage/IOCDMediaBSDClient.h b/i386/include/IOKit/storage/IOCDMediaBSDClient.h deleted file mode 100644 index ce31863..0000000 --- a/i386/include/IOKit/storage/IOCDMediaBSDClient.h +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOCDMEDIABSDCLIENT_H -#define _IOCDMEDIABSDCLIENT_H - -#include <sys/ioctl.h> - -#include <IOKit/storage/IOCDTypes.h> - -/* - * Definitions - * - * ioctl description - * ---------------------------- ------------------------------------------------ - * DKIOCCDREAD see IOCDMedia::readCD() in IOCDMedia.h - * DKIOCCDREADTOC see IOCDMedia::readTOC() in IOCDMedia.h - * - * DKIOCCDREADDISCINFO see IOCDMedia::readDiscInfo() in IOCDMedia.h - * DKIOCCDREADTRACKINFO see IOCDMedia::readTrackInfo() in IOCDMedia.h - * - * DKIOCCDREADISRC see IOCDMedia::readISRC() in IOCDMedia.h - * DKIOCCDREADMCN see IOCDMedia::readMCN() in IOCDMedia.h - * - * DKIOCCDGETSPEED see IOCDMedia::getSpeed() in IOCDMedia.h - * DKIOCCDSETSPEED see IOCDMedia::setSpeed() in IOCDMedia.h - * - * in /System/Library/Frameworks/Kernel.framework/Headers/IOKit/storage/ - */ - -typedef struct -{ - uint64_t offset; - - uint8_t sectorArea; - uint8_t sectorType; - -#ifdef __LP64__ - uint8_t reserved0080[10]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0080[6]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ - - uint32_t bufferLength; /* actual length on return */ - void * buffer; -} dk_cd_read_t; - -typedef struct -{ - CDISRC isrc; - uint8_t track; - - uint8_t reserved0112[2]; /* reserved, clear to zero */ -} dk_cd_read_isrc_t; - -typedef struct -{ - CDMCN mcn; - - uint8_t reserved0112[2]; /* reserved, clear to zero */ -} dk_cd_read_mcn_t; - -typedef struct -{ - uint8_t format; - uint8_t formatAsTime; - - uint8_t reserved0016[5]; /* reserved, clear to zero */ - - union - { - uint8_t session; - uint8_t track; - } address; - -#ifdef __LP64__ - uint8_t reserved0064[6]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0064[2]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ - - uint16_t bufferLength; /* actual length on return */ - void * buffer; -} dk_cd_read_toc_t; - -typedef struct -{ -#ifdef __LP64__ - uint8_t reserved0000[14]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0000[10]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ - - uint16_t bufferLength; /* actual length on return */ - void * buffer; -} dk_cd_read_disc_info_t; - -typedef struct -{ - uint8_t reserved0000[4]; /* reserved, clear to zero */ - - uint32_t address; - uint8_t addressType; - -#ifdef __LP64__ - uint8_t reserved0072[5]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0072[1]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ - - uint16_t bufferLength; /* actual length on return */ - void * buffer; -} dk_cd_read_track_info_t; - -#define DKIOCCDREAD _IOWR('d', 96, dk_cd_read_t) - -#define DKIOCCDREADISRC _IOWR('d', 97, dk_cd_read_isrc_t) -#define DKIOCCDREADMCN _IOWR('d', 98, dk_cd_read_mcn_t) - -#define DKIOCCDGETSPEED _IOR('d', 99, uint16_t) -#define DKIOCCDSETSPEED _IOW('d', 99, uint16_t) - -#define DKIOCCDREADTOC _IOWR('d', 100, dk_cd_read_toc_t) - -#define DKIOCCDREADDISCINFO _IOWR('d', 101, dk_cd_read_disc_info_t) -#define DKIOCCDREADTRACKINFO _IOWR('d', 102, dk_cd_read_track_info_t) - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOCDMedia.h> -#include <IOKit/storage/IOMediaBSDClient.h> - -/* - * Class - */ - -class IOCDMediaBSDClient : public IOMediaBSDClient -{ - OSDeclareDefaultStructors(IOCDMediaBSDClient) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - -public: - - /* - * Obtain this object's provider. We override the superclass's method - * to return a more specific subclass of IOService -- IOCDMedia. This - * method serves simply as a convenience to subclass developers. - */ - - virtual IOCDMedia * getProvider() const; - - /* - * Process a CD-specific ioctl. - */ - - virtual int ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, proc_t proc); - - OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 0); - OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 1); - OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 2); - OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 3); - OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 4); - OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 5); - OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 6); - OSMetaClassDeclareReservedUnused(IOCDMediaBSDClient, 7); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOCDMEDIABSDCLIENT_H */ diff --git a/i386/include/IOKit/storage/IOCDPartitionScheme.h b/i386/include/IOKit/storage/IOCDPartitionScheme.h deleted file mode 100644 index 1ff58c4..0000000 --- a/i386/include/IOKit/storage/IOCDPartitionScheme.h +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOCDPartitionScheme - * @abstract - * This header contains the IOCDPartitionScheme class definition. - */ - -#ifndef _IOCDPARTITIONSCHEME_H -#define _IOCDPARTITIONSCHEME_H - -#include <IOKit/storage/IOCDTypes.h> - -/*! - * @defined kIOCDPartitionSchemeClass - * @abstract - * kIOCDPartitionSchemeClass is the name of the IOCDPartitionScheme class. - * @discussion - * kIOCDPartitionSchemeClass is the name of the IOCDPartitionScheme class. - */ - -#define kIOCDPartitionSchemeClass "IOCDPartitionScheme" - -/*! - * @defined kIOMediaSessionIDKey - * @abstract - * kIOMediaSessionIDKey is property of IOMedia objects. It has an OSNumber - * value. - * @discussion - * The kIOMediaSessionIDKey property is placed into each IOMedia instance - * created by the CD partition scheme. It identifies the session number - * the track was recorded on. - */ - -#define kIOMediaSessionIDKey "Session ID" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOCDMedia.h> -#include <IOKit/storage/IOPartitionScheme.h> - -/* - * Class - */ - -class IOCDPartitionScheme : public IOPartitionScheme -{ - OSDeclareDefaultStructors(IOCDPartitionScheme); - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - - OSSet * _partitions; /* (set of media objects representing partitions) */ - - /* - * Free all of this object's outstanding resources. - */ - - virtual void free(void); - - /* - * Scan the provider media for CD partitions (in TOC). Returns the set - * of media objects representing each of the partitions (the retain for - * the set is passed to the caller), or null should no CD partitions be - * found. The default probe score can be adjusted up or down, based on - * the confidence of the scan. - */ - - virtual OSSet * scan(SInt32 * score); - - /* - * Ask whether the given partition appears to be corrupt. A partition that - * is corrupt will cause the failure of the CD partition scheme altogether. - */ - - virtual bool isPartitionCorrupt( CDTOCDescriptor * partition, - UInt64 partitionSize, - UInt32 partitionBlockSize, - CDSectorType partitionBlockType, - CDTOC * toc ); - - /* - * Ask whether the given partition appears to be invalid. A partition that - * is invalid will cause it to be skipped in the scan, but will not cause a - * failure of the CD partition scheme. - */ - - virtual bool isPartitionInvalid( CDTOCDescriptor * partition, - UInt64 partitionSize, - UInt32 partitionBlockSize, - CDSectorType partitionBlockType, - CDTOC * toc ); - - /* - * Instantiate a new media object to represent the given partition. - */ - - virtual IOMedia * instantiateMediaObject( - CDTOCDescriptor * partition, - UInt64 partitionSize, - UInt32 partitionBlockSize, - CDSectorType partitionBlockType, - CDTOC * toc ); - - /* - * Allocate a new media object (called from instantiateMediaObject). - */ - - virtual IOMedia * instantiateDesiredMediaObject( - CDTOCDescriptor * partition, - UInt64 partitionSize, - UInt32 partitionBlockSize, - CDSectorType partitionBlockType, - CDTOC * toc ); - -public: - - /* - * Initialize this object's minimal state. - */ - - virtual bool init(OSDictionary * properties = 0); - - /* - * Scan the provider media for CD partitions. - */ - - virtual IOService * probe(IOService * provider, SInt32 * score); - - /* - * Determine whether the provider media contains CD partitions. - */ - - virtual bool start(IOService * provider); - - /* - * Read data from the storage object at the specified byte offset into the - * specified buffer, asynchronously. When the read completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the read. - * - * For the CD partition scheme, we convert the read from a partition - * object into the appropriate readCD command to our provider media. - */ - - virtual void read(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); - - /* - * Write data into the storage object at the specified byte offset from the - * specified buffer, asynchronously. When the write completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the write. - * - * For the CD partition scheme, we convert the write from a partition - * object into the appropriate writeCD command to our provider media. - */ - - virtual void write(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); - - /* - * Obtain this object's provider. We override the superclass's method - * to return a more specific subclass of OSObject -- IOCDMedia. This - * method serves simply as a convenience to subclass developers. - */ - - virtual IOCDMedia * getProvider() const; - - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 0); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 1); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 2); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 3); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 4); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 5); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 6); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 7); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 8); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 9); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 10); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 11); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 12); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 13); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 14); - OSMetaClassDeclareReservedUnused(IOCDPartitionScheme, 15); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOCDPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/IOCDTypes.h b/i386/include/IOKit/storage/IOCDTypes.h deleted file mode 100644 index 6b1af29..0000000 --- a/i386/include/IOKit/storage/IOCDTypes.h +++ /dev/null @@ -1,492 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOCDTYPES_H -#define _IOCDTYPES_H - -#include <IOKit/IOTypes.h> -#include <libkern/OSByteOrder.h> - -#pragma pack(push, 1) /* (enable 8-bit struct packing) */ - -/* - * Minutes, Seconds, Frames (M:S:F) - * - * All M:S:F values passed across I/O Kit APIs are guaranteed to be - * binary-encoded numbers (no BCD-encoded numbers are ever passed). - */ - -typedef struct -{ - UInt8 minute; - UInt8 second; - UInt8 frame; -} CDMSF; - -/* - * Media Catalogue Numbers (MCN), International Standard Recording Codes (ISRC) - * - * All MCN and ISRC values passed across I/O Kit APIs are guaranteed - * to have a zero-terminating byte, for convenient use as C strings. - */ - -#define kCDMCNMaxLength 13 -#define kCDISRCMaxLength 12 - -typedef char CDMCN [kCDMCNMaxLength + 1]; -typedef char CDISRC[kCDISRCMaxLength + 1]; - -/* - * Audio Status - * - * All CDAudioStatus fields passed across I/O Kit APIs are guaranteed to - * be binary-encoded numbers (no BCD-encoded numbers are ever passed). - */ - -#define kCDAudioStatusUnsupported 0x00 -#define kCDAudioStatusActive 0x11 -#define kCDAudioStatusPaused 0x12 -#define kCDAudioStatusSuccess 0x13 -#define kCDAudioStatusFailure 0x14 -#define kCDAudioStatusNone 0x15 - -typedef struct -{ - UInt8 status; - struct - { - CDMSF time; - struct - { - UInt8 index; - UInt8 number; - CDMSF time; - } track; - } position; -} CDAudioStatus; - -/* - * Table Of Contents - * - * All CDTOC fields passed across I/O Kit APIs are guaranteed to be - * binary-encoded numbers (no BCD-encoded numbers are ever passed). - */ - -typedef struct -{ - UInt8 session; -#ifdef __LITTLE_ENDIAN__ - UInt8 control:4, adr:4; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 adr:4, control:4; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 tno; - UInt8 point; - CDMSF address; - UInt8 zero; - CDMSF p; -} CDTOCDescriptor; - -typedef struct -{ - UInt16 length; - UInt8 sessionFirst; - UInt8 sessionLast; - CDTOCDescriptor descriptors[0]; -} CDTOC; - -/* - * Table Of Contents Descriptor Count Convenience Function - */ - -static inline UInt32 CDTOCGetDescriptorCount(CDTOC * toc) -{ - UInt32 tocSize = OSSwapBigToHostInt16(toc->length) + (UInt32) sizeof(toc->length); - - return (tocSize < (UInt32) sizeof(CDTOC)) ? 0 : - (tocSize - (UInt32) sizeof(CDTOC)) / (UInt32) sizeof(CDTOCDescriptor); -} - -/* - * M:S:F To LBA Convenience Function - */ - -static inline UInt32 CDConvertMSFToLBA(CDMSF msf) -{ - return (((msf.minute * 60U) + msf.second) * 75U) + msf.frame - 150U; -} - -/* - * M:S:F To Clipped LBA Convenience Function - */ - -static inline UInt32 CDConvertMSFToClippedLBA(CDMSF msf) -{ - return (msf.minute == 0 && msf.second <= 1) ? 0 : CDConvertMSFToLBA(msf); -} - -/* - * LBA To M:S:F Convenience Function - */ - -static inline CDMSF CDConvertLBAToMSF(UInt32 lba) -{ - CDMSF msf; - - lba += 150; - msf.minute = (lba / (75 * 60)); - msf.second = (lba % (75 * 60)) / 75; - msf.frame = (lba % (75 )); - - return msf; -} - -/* - * Track Number To M:S:F Convenience Function - * - * The CDTOC structure is assumed to be complete, that is, none of - * the descriptors are missing or clipped due to an insufficiently - * sized buffer holding the CDTOC contents. - */ - -static inline CDMSF CDConvertTrackNumberToMSF(UInt8 track, CDTOC * toc) -{ - UInt32 count = CDTOCGetDescriptorCount(toc); - UInt32 i; - CDMSF msf = { 0xFF, 0xFF, 0xFF }; - - for (i = 0; i < count; i++) - { - if (toc->descriptors[i].point == track && toc->descriptors[i].adr == 1) - { - msf = toc->descriptors[i].p; - break; - } - } - - return msf; -} - -/* - * Sector Areas, Sector Types - * - * Bytes Per Type CDDA Mode1 Mode2 Mode2Form1 Mode2Form2 - * Per Area +----------+----------+----------+----------+----------+ - * Sync | 0 | 12 | 12 | 12 | 12 | - * Header | 0 | 4 | 4 | 4 | 4 | - * SubHeader | 0 | 0 | 0 | 8 | 8 | - * User | 2352 | 2048 | 2336 | 2048 | 2328 | - * Auxiliary | 0 | 288 | 0 | 280 | 0 | - * ErrorFlags | 294 | 294 | 294 | 294 | 294 | - * SubChannel | 96 | 96 | 96 | 96 | 96 | - * SubChannelQ | 16 | 16 | 16 | 16 | 16 | - * +----------+----------+----------+----------+----------+ - */ - -typedef enum -{ - kCDSectorAreaSync = 0x80, - kCDSectorAreaHeader = 0x20, - kCDSectorAreaSubHeader = 0x40, - kCDSectorAreaUser = 0x10, - kCDSectorAreaAuxiliary = 0x08, - kCDSectorAreaErrorFlags = 0x02, - kCDSectorAreaSubChannel = 0x01, - kCDSectorAreaSubChannelQ = 0x04 -} CDSectorArea; - -typedef enum -{ - kCDSectorTypeUnknown = 0x00, - kCDSectorTypeCDDA = 0x01, - kCDSectorTypeMode1 = 0x02, - kCDSectorTypeMode2 = 0x03, - kCDSectorTypeMode2Form1 = 0x04, - kCDSectorTypeMode2Form2 = 0x05, - kCDSectorTypeCount = 0x06 -} CDSectorType; - -typedef enum -{ - kCDSectorSizeCDDA = 2352, - kCDSectorSizeMode1 = 2048, - kCDSectorSizeMode2 = 2336, - kCDSectorSizeMode2Form1 = 2048, - kCDSectorSizeMode2Form2 = 2328, - kCDSectorSizeWhole = 2352 -} CDSectorSize; - -/* - * Media Types - */ - -typedef enum -{ - kCDMediaTypeUnknown = 0x0100, - kCDMediaTypeROM = 0x0102, /* CD-ROM */ - kCDMediaTypeR = 0x0104, /* CD-R */ - kCDMediaTypeRW = 0x0105, /* CD-RW */ - - kCDMediaTypeMin = 0x0100, - kCDMediaTypeMax = 0x01FF -}; - -typedef UInt32 CDMediaType; - -/* - * Media Speed (kB/s) - */ - -#define kCDSpeedMin 0x00B0 -#define kCDSpeedMax 0xFFFF - -/* - * MMC Formats - */ - -// Read Table Of Contents Format Types -typedef UInt8 CDTOCFormat; -enum -{ - kCDTOCFormatTOC = 0x02, // CDTOC - kCDTOCFormatPMA = 0x03, // CDPMA - kCDTOCFormatATIP = 0x04, // CDATIP - kCDTOCFormatTEXT = 0x05 // CDTEXT -}; - -// Read Table Of Contents Format 0x03 -struct CDPMADescriptor -{ - UInt8 reserved; -#ifdef __LITTLE_ENDIAN__ - UInt8 control:4, adr:4; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 adr:4, control:4; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 tno; - UInt8 point; - CDMSF address; - UInt8 zero; - CDMSF p; -}; -typedef struct CDPMADescriptor CDPMADescriptor; - -struct CDPMA -{ - UInt16 dataLength; - UInt8 reserved; - UInt8 reserved2; - CDPMADescriptor descriptors[0]; -}; -typedef struct CDPMA CDPMA; - -// Read Table Of Contents Format 0x04 -struct CDATIP -{ - UInt16 dataLength; - UInt8 reserved[2]; -#ifdef __LITTLE_ENDIAN__ - UInt8 referenceSpeed:3; - UInt8 reserved3:1; - UInt8 indicativeTargetWritingPower:3; - UInt8 reserved2:1; - - UInt8 reserved5:6; - UInt8 unrestrictedUse:1; - UInt8 reserved4:1; - - UInt8 a3Valid:1; - UInt8 a2Valid:1; - UInt8 a1Valid:1; - UInt8 discSubType:3; - UInt8 discType:1; - UInt8 reserved6:1; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 reserved2:1; - UInt8 indicativeTargetWritingPower:3; - UInt8 reserved3:1; - UInt8 referenceSpeed:3; - - UInt8 reserved4:1; - UInt8 unrestrictedUse:1; - UInt8 reserved5:6; - - UInt8 reserved6:1; - UInt8 discType:1; - UInt8 discSubType:3; - UInt8 a1Valid:1; - UInt8 a2Valid:1; - UInt8 a3Valid:1; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 reserved7; - CDMSF startTimeOfLeadIn; - UInt8 reserved8; - CDMSF lastPossibleStartTimeOfLeadOut; - UInt8 reserved9; - UInt8 a1[3]; - UInt8 reserved10; - UInt8 a2[3]; - UInt8 reserved11; - UInt8 a3[3]; - UInt8 reserved12; -}; -typedef struct CDATIP CDATIP; - -// Read Table Of Contents Format 0x05 -struct CDTEXTDescriptor -{ - UInt8 packType; - UInt8 trackNumber; - UInt8 sequenceNumber; -#ifdef __LITTLE_ENDIAN__ - UInt8 characterPosition:4; - UInt8 blockNumber:3; - UInt8 doubleByteCharacterCode:1; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 doubleByteCharacterCode:1; - UInt8 blockNumber:3; - UInt8 characterPosition:4; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 textData[12]; - UInt8 reserved[2]; -}; -typedef struct CDTEXTDescriptor CDTEXTDescriptor; - -struct CDTEXT -{ - UInt16 dataLength; - UInt8 reserved; - UInt8 reserved2; - CDTEXTDescriptor descriptors[0]; -}; -typedef struct CDTEXT CDTEXT; - -// Read Disc Information Format -struct CDDiscInfo -{ - UInt16 dataLength; -#ifdef __LITTLE_ENDIAN__ - UInt8 discStatus:2; - UInt8 stateOfLastSession:2; - UInt8 erasable:1; - UInt8 reserved:3; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 reserved:3; - UInt8 erasable:1; - UInt8 stateOfLastSession:2; - UInt8 discStatus:2; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 numberOfFirstTrack; - UInt8 numberOfSessionsLSB; - UInt8 firstTrackNumberInLastSessionLSB; - UInt8 lastTrackNumberInLastSessionLSB; -#ifdef __LITTLE_ENDIAN__ - UInt8 reserved3:5; - UInt8 unrestrictedUse:1; - UInt8 discBarCodeValid:1; - UInt8 discIdentificationValid:1; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 discIdentificationValid:1; - UInt8 discBarCodeValid:1; - UInt8 unrestrictedUse:1; - UInt8 reserved3:5; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 discType; - UInt8 numberOfSessionsMSB; - UInt8 firstTrackNumberInLastSessionMSB; - UInt8 lastTrackNumberInLastSessionMSB; - UInt32 discIdentification; - UInt8 reserved7; - CDMSF lastSessionLeadInStartTime; - UInt8 reserved8; - CDMSF lastPossibleStartTimeOfLeadOut; - UInt8 discBarCode[8]; - UInt8 reserved9; - UInt8 numberOfOPCTableEntries; - UInt8 opcTableEntries[0]; -}; -typedef struct CDDiscInfo CDDiscInfo; - -// Read Track Information Address Types -typedef UInt8 CDTrackInfoAddressType; -enum -{ - kCDTrackInfoAddressTypeLBA = 0x00, - kCDTrackInfoAddressTypeTrackNumber = 0x01, - kCDTrackInfoAddressTypeSessionNumber = 0x02, -}; - -// Read Track Information Format -struct CDTrackInfo -{ - UInt16 dataLength; - UInt8 trackNumberLSB; - UInt8 sessionNumberLSB; - UInt8 reserved; -#ifdef __LITTLE_ENDIAN__ - UInt8 trackMode:4; - UInt8 copy:1; - UInt8 damage:1; - UInt8 reserved3:2; - - UInt8 dataMode:4; - UInt8 fixedPacket:1; - UInt8 packet:1; - UInt8 blank:1; - UInt8 reservedTrack:1; - - UInt8 nextWritableAddressValid:1; - UInt8 lastRecordedAddressValid:1; - UInt8 reserved5:6; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 reserved3:2; - UInt8 damage:1; - UInt8 copy:1; - UInt8 trackMode:4; - - UInt8 reservedTrack:1; - UInt8 blank:1; - UInt8 packet:1; - UInt8 fixedPacket:1; - UInt8 dataMode:4; - - UInt8 reserved5:6; - UInt8 lastRecordedAddressValid:1; - UInt8 nextWritableAddressValid:1; -#endif /* !__LITTLE_ENDIAN__ */ - UInt32 trackStartAddress; - UInt32 nextWritableAddress; - UInt32 freeBlocks; - UInt32 fixedPacketSize; - UInt32 trackSize; - UInt32 lastRecordedAddress; - UInt8 trackNumberMSB; - UInt8 sessionNumberMSB; - UInt8 reserved6; - UInt8 reserved7; -}; -typedef struct CDTrackInfo CDTrackInfo; - -#pragma pack(pop) /* (reset to default struct packing) */ - -#endif /* _IOCDTYPES_H */ diff --git a/i386/include/IOKit/storage/IODVDBlockStorageDevice.h b/i386/include/IOKit/storage/IODVDBlockStorageDevice.h deleted file mode 100644 index 161651c..0000000 --- a/i386/include/IOKit/storage/IODVDBlockStorageDevice.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IODVDBlockStorageDevice - * @abstract - * This header contains the IODVDBlockStorageDevice class definition. - */ - -#ifndef _IODVDBLOCKSTORAGEDEVICE_H -#define _IODVDBLOCKSTORAGEDEVICE_H - -#include <IOKit/storage/IODVDTypes.h> - -/*! - * @defined kIODVDBlockStorageDeviceClass - * @abstract - * kIODVDBlockStorageDeviceClass is the name of the IODVDBlockStorageDevice class. - * @discussion - * kIODVDBlockStorageDeviceClass is the name of the IODVDBlockStorageDevice class. - */ - -#define kIODVDBlockStorageDeviceClass "IODVDBlockStorageDevice" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOCDBlockStorageDevice.h> - -/* Property used for matching, so the generic driver gets the nub it wants. */ -#define kIOBlockStorageDeviceTypeDVD "DVD" - -/*! - * @class - * IODVDBlockStorageDevice : public IOCDBlockStorageDevice - * @abstract - * The IODVDBlockStorageDevice class is a generic DVD block storage device - * abstraction. - * @discussion - * This class is the protocol for generic DVD functionality, independent of - * the physical connection protocol (e.g. SCSI, ATA, USB). - * - * The APIs are the union of CD APIs and all - * necessary new low-level DVD APIs. - * - * A subclass implements relay methods that translate our requests into - * calls to a protocol- and device-specific provider. - */ - -class IODVDBlockStorageDevice : public IOCDBlockStorageDevice { - - OSDeclareAbstractStructors(IODVDBlockStorageDevice) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - -public: - - /* Overrides from IORegistryEntry */ - - virtual bool init(OSDictionary * properties); - - /* New APIs for DVD */ - - virtual IOReturn reportKey(IOMemoryDescriptor *buffer,const DVDKeyClass keyClass, - const UInt32 lba,const UInt8 agid,const DVDKeyFormat keyFormat) = 0; - - virtual IOReturn sendKey(IOMemoryDescriptor *buffer,const DVDKeyClass keyClass, - const UInt8 agid,const DVDKeyFormat keyFormat) = 0; - -#ifdef __LP64__ - virtual IOReturn readDVDStructure(IOMemoryDescriptor *buffer,const DVDStructureFormat format, - const UInt32 address,const UInt8 layer,const UInt8 agid) = 0; -#else /* !__LP64__ */ - virtual IOReturn readDVDStructure(IOMemoryDescriptor *buffer,const DVDStructureFormat format, - const UInt32 address,const UInt8 layer,const UInt8 agid); /* 10.1.0 */ -#endif /* !__LP64__ */ - -#ifdef __LP64__ - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 0); -#else /* !__LP64__ */ - OSMetaClassDeclareReservedUsed(IODVDBlockStorageDevice, 0); -#endif /* !__LP64__ */ - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 1); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 2); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 3); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 4); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 5); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 6); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 7); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 8); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 9); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 10); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 11); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 12); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 13); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 14); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 15); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 16); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 17); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 18); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 19); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 20); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 21); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 22); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 23); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 24); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 25); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 26); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 27); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 28); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 29); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 30); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDevice, 31); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IODVDBLOCKSTORAGEDEVICE_H */ diff --git a/i386/include/IOKit/storage/IODVDBlockStorageDriver.h b/i386/include/IOKit/storage/IODVDBlockStorageDriver.h deleted file mode 100644 index d9471f6..0000000 --- a/i386/include/IOKit/storage/IODVDBlockStorageDriver.h +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * IODVDBlockStorageDriver.h - * - * This class implements DVD functionality, independent of - * the physical connection protocol (e.g. SCSI, ATA, USB). - * - * A protocol-specific provider implements the functionality using an appropriate - * protocol and commands. - */ - -#ifndef _IODVDBLOCKSTORAGEDRIVER_H -#define _IODVDBLOCKSTORAGEDRIVER_H - -#include <IOKit/IOTypes.h> -#include <IOKit/storage/IOCDBlockStorageDriver.h> -#include <IOKit/storage/IODVDBlockStorageDevice.h> -#include <IOKit/storage/IODVDTypes.h> - -/*! - * @defined kIODVDBlockStorageDriverClass - * @abstract - * kIODVDBlockStorageDriverClass is the name of the IODVDBlockStorageDriver class. - * @discussion - * kIODVDBlockStorageDriverClass is the name of the IODVDBlockStorageDriver class. - */ - -#define kIODVDBlockStorageDriverClass "IODVDBlockStorageDriver" - -class IODVDBlockStorageDevice; - -/*! - * @class - * IODVDBlockStorageDriver : public IOCDBlockStorageDriver - * @abstract - * Generic DVD Driver. - * @discussion - * Storage drivers are split into two parts: the Generic Driver handles - * all generic device issues, independent of the lower-level transport - * mechanism (e.g. SCSI, ATA, USB, FireWire). All storage operations - * at the Generic Driver level are translated into a series of generic - * device operations. These operations are passed via the Device Nub - * to a Transport Driver, which implements the appropriate - * transport-dependent protocol to execute these operations. - * - * To determine the write-protect state of a device (or media), for - * example, the generic driver would issue a call to the - * Transport Driver's reportWriteProtection method. If this were a SCSI - * device, its Transport Driver would issue a Mode Sense command to - * extract the write-protection status bit. The Transport Driver then - * reports true or false to the generic driver. - * - * The generic driver therefore has no knowledge of, or involvement - * with, the actual commands and mechanisms used to communicate with - * the device. It is expected that the generic driver will rarely, if - * ever, need to be subclassed to handle device idiosyncrasies; rather, - * the Transport Driver should be changed via overrides. - * - * A generic driver could be subclassed to create a different type of - * generic device. The generic driver IODVDBlockStorageDriver class is a subclass - * of IOCDBlockStorageDriver, adding DVD functions. Similarly, the Transport Driver - * IODVDBlockStorageDevice is a subclass of IOCDBlockStorageDevice, adding DVD - * functions. -*/ - -class IODVDBlockStorageDriver : public IOCDBlockStorageDriver { - - OSDeclareDefaultStructors(IODVDBlockStorageDriver) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - - /* Overrides of IOCDBlockStorageDriver. */ - - virtual IOReturn acceptNewMedia(void); - - /* End of IOCDBlockStorageDriver overrides. */ - -public: - - /* - * Obtain this object's provider. We override the superclass's method to - * return a more specific subclass of IOService -- IODVDBlockStorageDevice. - * This method serves simply as a convenience to subclass developers. - */ - - virtual IODVDBlockStorageDevice * getProvider() const; - - /* Overrides of IOCDBlockStorageDriver: */ - - virtual const char * getDeviceTypeName(void); - virtual IOMedia * instantiateDesiredMediaObject(void); - virtual IOMedia * instantiateMediaObject(UInt64 base,UInt64 byteSize, - UInt32 blockSize,char *mediaName); - - /* End of IOCDBlockStorageDriver overrides. */ - - /*! - * @function reportKey - * @abstract - * Get key info from the DVD drive. - * @discussion - * This function handles the getting of key- and encryption-related data for the drive. - * @param buffer - * A buffer containing information, as documented in the specification - * "MtFuji Commands For Multimedia Devices." - * @param keyClass - * As documented by MtFuji. See DVDKeyClass. - * @param lba - * As documented by MtFuji. - * @param agid - * As documented by MtFuji. - * @param keyFormat - * As documented by MtFuji. See DVDKeyFormat. - */ - virtual IOReturn reportKey(IOMemoryDescriptor *buffer,const DVDKeyClass keyClass, - const UInt32 lba,const UInt8 agid,const DVDKeyFormat keyFormat); - - /*! - * @function sendKey - * @abstract - * Send key info to the DVD drive. - * @discussion - * This function handles the setting of key- and encryption-related data for the drive. - * @param buffer - * A buffer containing information, as documented in the specification - * "MtFuji Commands For Multimedia Devices." - * @param keyClass - * As documented by MtFuji. See DVDKeyClass. - * @param agid - * As documented by MtFuji. - * @param keyFormat - * As documented by MtFuji. See DVDKeyFormat. - */ - virtual IOReturn sendKey(IOMemoryDescriptor *buffer,const DVDKeyClass keyClass, - const UInt8 agid,const DVDKeyFormat keyFormat); - - /*! - * @function readStructure - * @abstract - * Get control structures from the DVD media. - * @discussion - * This function handles the getting of control structure data for the media. - * @param buffer - * A buffer containing information, as documented in the specification - * "MtFuji Commands For Multimedia Devices." - * @param format - * As documented by MtFuji. See DVDStructureFormat. - * @param address - * As documented by MtFuji. - * @param layer - * As documented by MtFuji. - * @param agid - * As documented by MtFuji. - */ - virtual IOReturn readStructure(IOMemoryDescriptor *buffer,const DVDStructureFormat format, - const UInt32 address,const UInt8 layer,const UInt8 agid); /* 10.1.0 */ - -#ifdef __LP64__ - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 0); -#else /* !__LP64__ */ - OSMetaClassDeclareReservedUsed(IODVDBlockStorageDriver, 0); -#endif /* !__LP64__ */ - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 1); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 2); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 3); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 4); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 5); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 6); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 7); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 8); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 9); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 10); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 11); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 12); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 13); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 14); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 15); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 16); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 17); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 18); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 19); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 20); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 21); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 22); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 23); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 24); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 25); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 26); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 27); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 28); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 29); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 30); - OSMetaClassDeclareReservedUnused(IODVDBlockStorageDriver, 31); -}; -#endif diff --git a/i386/include/IOKit/storage/IODVDMedia.h b/i386/include/IOKit/storage/IODVDMedia.h deleted file mode 100644 index 02119c3..0000000 --- a/i386/include/IOKit/storage/IODVDMedia.h +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IODVDMedia - * @abstract - * This header contains the IODVDMedia class definition. - */ - -#ifndef _IODVDMEDIA_H -#define _IODVDMEDIA_H - -/*! - * @defined kIODVDMediaClass - * @abstract - * kIODVDMediaClass is the name of the IODVDMedia class. - * @discussion - * kIODVDMediaClass is the name of the IODVDMedia class. - */ - -#define kIODVDMediaClass "IODVDMedia" - -/*! - * @defined kIODVDMediaTypeKey - * @abstract - * kIODVDMediaTypeKey is a property of IODVDMedia objects. It has an OSString - * value. - * @discussion - * The kIODVDMediaTypeKey property identifies the DVD media type (DVD-ROM, - * DVD-R, DVD-RW, DVD+RW, DVD-RAM, etc). See the kIODVDMediaType contants - * for possible values. - */ - -#define kIODVDMediaTypeKey "Type" - -/*! - * @defined kIODVDMediaTypeROM - * The kIODVDMediaTypeKey constant for DVD-ROM media. - */ - -#define kIODVDMediaTypeROM "DVD-ROM" - -/*! - * @defined kIODVDMediaTypeR - * The kIODVDMediaTypeKey constant for DVD Recordable (DVD-R) media. - */ - -#define kIODVDMediaTypeR "DVD-R" - -/*! - * @defined kIODVDMediaTypeRW - * The kIODVDMediaTypeKey constant for DVD ReWritable (DVD-RW) media. - */ - -#define kIODVDMediaTypeRW "DVD-RW" - -/*! - * @defined kIODVDMediaTypePlusR - * The kIODVDMediaTypeKey constant for DVD "Plus" Recordable (DVD+R) media. - */ - -#define kIODVDMediaTypePlusR "DVD+R" - -/*! - * @defined kIODVDMediaTypePlusRW - * The kIODVDMediaTypeKey constant for DVD "Plus" ReWritable (DVD+RW) media. - */ - -#define kIODVDMediaTypePlusRW "DVD+RW" - -/*! - * @defined kIODVDMediaTypeRAM - * The kIODVDMediaTypeKey constant for DVD-RAM media. - */ - -#define kIODVDMediaTypeRAM "DVD-RAM" - -/*! - * @defined kIODVDMediaTypeHDROM - * The kIODVDMediaTypeKey constant for HD DVD-ROM media. - */ - -#define kIODVDMediaTypeHDROM "HD DVD-ROM" - -/*! - * @defined kIODVDMediaTypeHDR - * The kIODVDMediaTypeKey constant for HD DVD Recordable (HD DVD-R) media. - */ - -#define kIODVDMediaTypeHDR "HD DVD-R" - -/*! - * @defined kIODVDMediaTypeHDRW - * The kIODVDMediaTypeKey constant for HD DVD ReWritable (HD DVD-RW) media. - */ - -#define kIODVDMediaTypeHDRW "HD DVD-RW" - -/*! - * @defined kIODVDMediaTypeHDRAM - * The kIODVDMediaTypeKey constant for HD DVD-RAM media. - */ - -#define kIODVDMediaTypeHDRAM "HD DVD-RAM" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IODVDBlockStorageDriver.h> -#include <IOKit/storage/IOMedia.h> - -/*! - * @class IODVDMedia - * @abstract - * The IODVDMedia class is a random-access disk device abstraction for DVDs. - * @discussion - * The IODVDMedia class is a random-access disk device abstraction for DVDs. - */ - -class IODVDMedia : public IOMedia -{ - OSDeclareDefaultStructors(IODVDMedia) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - -public: - - /* - * Obtain this object's provider. We override the superclass's method to - * return a more specific subclass of IOService -- IODVDBlockStorageDriver. - * This method serves simply as a convenience to subclass developers. - */ - - virtual IODVDBlockStorageDriver * getProvider() const; - - /* - * Compare the properties in the supplied table to this object's properties. - */ - - virtual bool matchPropertyTable(OSDictionary * table, SInt32 * score); - - /*! - * @function reportKey - * @discussion - * Issue an MMC REPORT KEY command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. Pass null for the kDVDKeyFormatAGID_Invalidate format - * case. - * @param keyClass - * As documented by MMC. - * @param address - * As documented by MMC. - * @param grantID - * As documented by MMC. - * @param format - * As documented by MMC. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn reportKey( IOMemoryDescriptor * buffer, - const DVDKeyClass keyClass, - const UInt32 address, - const UInt8 grantID, - const DVDKeyFormat format ); /* 10.1.0 */ - - /*! - * @function sendKey - * @discussion - * Issue an MMC SEND KEY command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. Pass null for the kDVDKeyFormatAGID_Invalidate format - * case. - * @param keyClass - * As documented by MMC. - * @param grantID - * As documented by MMC. - * @param format - * As documented by MMC. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn sendKey( IOMemoryDescriptor * buffer, - const DVDKeyClass keyClass, - const UInt8 grantID, - const DVDKeyFormat format ); /* 10.1.0 */ - - /*! - * @function readStructure - * @discussion - * Issue an MMC READ DVD STRUCTURE command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param format - * As documented by MMC. - * @param address - * As documented by MMC. - * @param layer - * As documented by MMC. - * @param grantID - * As documented by MMC. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readStructure( IOMemoryDescriptor * buffer, - const DVDStructureFormat format, - const UInt32 address, - const UInt8 layer, - const UInt8 grantID ); /* 10.1.0 */ - - /*! - * @function getSpeed - * @discussion - * Get the current speed used for data transfers. - * @param kilobytesPerSecond - * Returns the current speed used for data transfers, in kB/s. - * - * kDVDSpeedMin specifies the minimum speed for all DVD media (1X). - * kDVDSpeedMax specifies the maximum speed supported in hardware. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn getSpeed(UInt16 * kilobytesPerSecond); /* 10.1.0 */ - - /*! - * @function setSpeed - * @discussion - * Set the speed to be used for data transfers. - * @param kilobytesPerSecond - * Speed to be used for data transfers, in kB/s. - * - * kDVDSpeedMin specifies the minimum speed for all DVD media (1X). - * kDVDSpeedMax specifies the maximum speed supported in hardware. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn setSpeed(UInt16 kilobytesPerSecond); /* 10.1.0 */ - - /*! - * @function readDiscInfo - * @discussion - * Issue an MMC READ DISC INFORMATION command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readDiscInfo( IOMemoryDescriptor * buffer, - UInt16 * actualByteCount ); /* 10.2.0 */ - - /*! - * @function readRZoneInfo - * @discussion - * Issue an MMC READ RZONE INFORMATION (READ TRACK INFORMATION) command. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param address - * As documented by MMC. - * @param addressType - * As documented by MMC. - * @param actualByteCount - * Returns the actual number of bytes transferred in the data transfer. - * @result - * Returns the status of the data transfer. - */ - - virtual IOReturn readRZoneInfo( IOMemoryDescriptor * buffer, - UInt32 address, - DVDRZoneInfoAddressType addressType, - UInt16 * actualByteCount ); /* 10.2.0 */ - -#ifdef __LP64__ - OSMetaClassDeclareReservedUnused(IODVDMedia, 0); - OSMetaClassDeclareReservedUnused(IODVDMedia, 1); - OSMetaClassDeclareReservedUnused(IODVDMedia, 2); - OSMetaClassDeclareReservedUnused(IODVDMedia, 3); - OSMetaClassDeclareReservedUnused(IODVDMedia, 4); - OSMetaClassDeclareReservedUnused(IODVDMedia, 5); - OSMetaClassDeclareReservedUnused(IODVDMedia, 6); -#else /* !__LP64__ */ - OSMetaClassDeclareReservedUsed(IODVDMedia, 0); - OSMetaClassDeclareReservedUsed(IODVDMedia, 1); - OSMetaClassDeclareReservedUsed(IODVDMedia, 2); - OSMetaClassDeclareReservedUsed(IODVDMedia, 3); - OSMetaClassDeclareReservedUsed(IODVDMedia, 4); - OSMetaClassDeclareReservedUsed(IODVDMedia, 5); - OSMetaClassDeclareReservedUsed(IODVDMedia, 6); -#endif /* !__LP64__ */ - OSMetaClassDeclareReservedUnused(IODVDMedia, 7); - OSMetaClassDeclareReservedUnused(IODVDMedia, 8); - OSMetaClassDeclareReservedUnused(IODVDMedia, 9); - OSMetaClassDeclareReservedUnused(IODVDMedia, 10); - OSMetaClassDeclareReservedUnused(IODVDMedia, 11); - OSMetaClassDeclareReservedUnused(IODVDMedia, 12); - OSMetaClassDeclareReservedUnused(IODVDMedia, 13); - OSMetaClassDeclareReservedUnused(IODVDMedia, 14); - OSMetaClassDeclareReservedUnused(IODVDMedia, 15); - OSMetaClassDeclareReservedUnused(IODVDMedia, 16); - OSMetaClassDeclareReservedUnused(IODVDMedia, 17); - OSMetaClassDeclareReservedUnused(IODVDMedia, 18); - OSMetaClassDeclareReservedUnused(IODVDMedia, 19); - OSMetaClassDeclareReservedUnused(IODVDMedia, 20); - OSMetaClassDeclareReservedUnused(IODVDMedia, 21); - OSMetaClassDeclareReservedUnused(IODVDMedia, 22); - OSMetaClassDeclareReservedUnused(IODVDMedia, 23); - OSMetaClassDeclareReservedUnused(IODVDMedia, 24); - OSMetaClassDeclareReservedUnused(IODVDMedia, 25); - OSMetaClassDeclareReservedUnused(IODVDMedia, 26); - OSMetaClassDeclareReservedUnused(IODVDMedia, 27); - OSMetaClassDeclareReservedUnused(IODVDMedia, 28); - OSMetaClassDeclareReservedUnused(IODVDMedia, 29); - OSMetaClassDeclareReservedUnused(IODVDMedia, 30); - OSMetaClassDeclareReservedUnused(IODVDMedia, 31); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IODVDMEDIA_H */ diff --git a/i386/include/IOKit/storage/IODVDMediaBSDClient.h b/i386/include/IOKit/storage/IODVDMediaBSDClient.h deleted file mode 100644 index 2258bf6..0000000 --- a/i386/include/IOKit/storage/IODVDMediaBSDClient.h +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IODVDMEDIABSDCLIENT_H -#define _IODVDMEDIABSDCLIENT_H - -#include <sys/ioctl.h> - -#include <IOKit/storage/IODVDTypes.h> - -/* - * Definitions - * - * ioctl description - * ---------------------------- ------------------------------------------------ - * DKIOCDVDREADSTRUCTURE see IODVDMedia::readStructure() in IODVDMedia.h - * - * DKIOCDVDREADDISCINFO see IODVDMedia::readDiscInfo() in IODVDMedia.h - * DKIOCDVDREADRZONEINFO see IODVDMedia::readRZoneInfo() in IODVDMedia.h - * - * DKIOCDVDREPORTKEY see IODVDMedia::reportKey() in IODVDMedia.h - * DKIOCDVDSENDKEY see IODVDMedia::sendKey() in IODVDMedia.h - * - * DKIOCDVDGETSPEED see IODVDMedia::getSpeed() in IODVDMedia.h - * DKIOCDVDSETSPEED see IODVDMedia::setSpeed() in IODVDMedia.h - * - * in /System/Library/Frameworks/Kernel.framework/Headers/IOKit/storage/ - */ - -typedef struct -{ - uint8_t format; - - uint8_t reserved0008[3]; /* reserved, clear to zero */ - - uint32_t address; - uint8_t grantID; - uint8_t layer; - -#ifdef __LP64__ - uint8_t reserved0080[4]; /* reserved, clear to zero */ -#endif /* __LP64__ */ - - uint16_t bufferLength; - void * buffer; -} dk_dvd_read_structure_t; - -typedef struct -{ - uint8_t format; - uint8_t keyClass; - - uint8_t reserved0016[2]; /* reserved, clear to zero */ - - uint32_t address; - uint8_t grantID; - -#ifdef __LP64__ - uint8_t reserved0072[5]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0072[1]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ - - uint16_t bufferLength; - void * buffer; -} dk_dvd_report_key_t; - -typedef struct -{ - uint8_t format; - uint8_t keyClass; - - uint8_t reserved0016[6]; /* reserved, clear to zero */ - - uint8_t grantID; - -#ifdef __LP64__ - uint8_t reserved0072[5]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0072[1]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ - - uint16_t bufferLength; - void * buffer; -} dk_dvd_send_key_t; - -typedef struct -{ -#ifdef __LP64__ - uint8_t reserved0000[14]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0000[10]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ - - uint16_t bufferLength; /* actual length on return */ - void * buffer; -} dk_dvd_read_disc_info_t; - -typedef struct -{ - uint8_t reserved0000[4]; /* reserved, clear to zero */ - - uint32_t address; - uint8_t addressType; - -#ifdef __LP64__ - uint8_t reserved0072[5]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0072[1]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ - - uint16_t bufferLength; /* actual length on return */ - void * buffer; -} dk_dvd_read_rzone_info_t; - -#define DKIOCDVDREADSTRUCTURE _IOW('d', 128, dk_dvd_read_structure_t) -#define DKIOCDVDREPORTKEY _IOW('d', 129, dk_dvd_report_key_t) -#define DKIOCDVDSENDKEY _IOW('d', 130, dk_dvd_send_key_t) - -#define DKIOCDVDGETSPEED _IOR('d', 131, uint16_t) -#define DKIOCDVDSETSPEED _IOW('d', 131, uint16_t) - -#define DKIOCDVDREADDISCINFO _IOWR('d', 132, dk_dvd_read_disc_info_t) -#define DKIOCDVDREADRZONEINFO _IOWR('d', 133, dk_dvd_read_rzone_info_t) - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IODVDMedia.h> -#include <IOKit/storage/IOMediaBSDClient.h> - -/* - * Class - */ - -class IODVDMediaBSDClient : public IOMediaBSDClient -{ - OSDeclareDefaultStructors(IODVDMediaBSDClient) - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - -public: - - /* - * Obtain this object's provider. We override the superclass's method - * to return a more specific subclass of IOService -- IODVDMedia. This - * method serves simply as a convenience to subclass developers. - */ - - virtual IODVDMedia * getProvider() const; - - /* - * Process a DVD-specific ioctl. - */ - - virtual int ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, proc_t proc); - - OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 0); - OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 1); - OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 2); - OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 3); - OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 4); - OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 5); - OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 6); - OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 7); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IODVDMEDIABSDCLIENT_H */ diff --git a/i386/include/IOKit/storage/IODVDTypes.h b/i386/include/IOKit/storage/IODVDTypes.h deleted file mode 100644 index 039b8fb..0000000 --- a/i386/include/IOKit/storage/IODVDTypes.h +++ /dev/null @@ -1,451 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IODVDTYPES_H -#define _IODVDTYPES_H - -#include <IOKit/IOTypes.h> - -#pragma pack(push, 1) /* (enable 8-bit struct packing) */ - -/* - * Media Types - */ - -enum -{ - kDVDMediaTypeUnknown = 0x0200, - kDVDMediaTypeROM = 0x0202, /* DVD-ROM */ - kDVDMediaTypeRAM = 0x0203, /* DVD-RAM */ - kDVDMediaTypeR = 0x0204, /* DVD-R */ - kDVDMediaTypeRW = 0x0205, /* DVD-RW */ - kDVDMediaTypePlusRW = 0x0206, /* DVD+RW */ - kDVDMediaTypePlusR = 0x0207, /* DVD+R */ - kDVDMediaTypeHDROM = 0x0212, /* HD DVD-ROM */ - kDVDMediaTypeHDRAM = 0x0213, /* HD DVD-RAM */ - kDVDMediaTypeHDR = 0x0214, /* HD DVD-R */ - kDVDMediaTypeHDRW = 0x0215, /* HD DVD-RW */ - - kDVDMediaTypeMin = 0x0200, - kDVDMediaTypeMax = 0x02FF -}; - -typedef UInt32 DVDMediaType; - -/* - * Media Speed (kB/s) - */ - -#define kDVDSpeedMin 0x0546 -#define kDVDSpeedMax 0xFFFF - -/* - * MMC Formats - */ - -typedef UInt8 DVDCPRMRegionCode; -enum -{ - kDVDCPRMRegion1 = 0xFE, - kDVDCPRMRegion2 = 0xFD, - kDVDCPRMRegion3 = 0xFB, - kDVDCPRMRegion4 = 0xF7, - kDVDCPRMRegion5 = 0xEF, - kDVDCPRMRegion6 = 0xDF -}; - -typedef UInt8 DVDRegionalPlaybackControlScheme; -enum -{ - kDVDRegionalPlaybackControlSchemePhase1 = 0x00, - kDVDRegionalPlaybackControlSchemePhase2 = 0x01 -}; - -typedef UInt8 DVDBookType; -enum -{ - kDVDBookTypeROM = 0x0, - kDVDBookTypeRAM = 0x1, - kDVDBookTypeR = 0x2, - kDVDBookTypeRW = 0x3, - kDVDBookTypeHDROM = 0x4, - kDVDBookTypeHDRAM = 0x5, - kDVDBookTypeHDR = 0x6, - kDVDBookTypeHDRW = 0x7, - kDVDBookTypePlusRW = 0x9, - kDVDBookTypePlusR = 0xA, - kDVDBookTypePlusRWDoubleLayer = 0xD, - kDVDBookTypePlusRDoubleLayer = 0xE -}; - -#ifdef __LP64__ -typedef UInt8 DVDKeyClass; -enum -#else /* !__LP64__ */ -enum DVDKeyClass -#endif /* !__LP64__ */ -{ - kDVDKeyClassCSS_CPPM_CPRM = 0x00, - kDVDKeyClassRSSA = 0x01 -}; -#ifndef __LP64__ -typedef enum DVDKeyClass DVDKeyClass; -#endif /* !__LP64__ */ - -#ifdef __LP64__ -typedef UInt8 DVDKeyFormat; -enum -#else /* !__LP64__ */ -enum DVDKeyFormat -#endif /* !__LP64__ */ -{ - kDVDKeyFormatAGID_CSS = 0x00, - kDVDKeyFormatChallengeKey = 0x01, - kDVDKeyFormatKey1 = 0x02, - kDVDKeyFormatKey2 = 0x03, - kDVDKeyFormatTitleKey = 0x04, - kDVDKeyFormatASF = 0x05, - kDVDKeyFormatSetRegion = 0x06, - kDVDKeyFormatRegionState = 0x08, - kDVDKeyFormatAGID_CSS2 = 0x10, - kDVDKeyFormatAGID_CPRM = 0x11, - kDVDKeyFormatAGID_Invalidate = 0x3F -}; -#ifndef __LP64__ -typedef enum DVDKeyFormat DVDKeyFormat; -#endif /* !__LP64__ */ - -typedef UInt8 DVDStructureFormat; -enum -{ - kDVDStructureFormatPhysicalFormatInfo = 0x00, - kDVDStructureFormatCopyrightInfo = 0x01, - kDVDStructureFormatDiscKeyInfo = 0x02, - // skip BCA - kDVDStructureFormatManufacturingInfo = 0x04 -}; - -// Read DVD Structures Format 0x00 -struct DVDPhysicalFormatInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; -#ifdef __LITTLE_ENDIAN__ - // Byte 0 - UInt8 partVersion:4; - UInt8 bookType:4; - - // Byte 1 - UInt8 minimumRate:4; - UInt8 discSize:4; - - // Byte 2 - UInt8 layerType:4; - UInt8 trackPath:1; - UInt8 numberOfLayers:2; - UInt8 reserved2:1; - - // Byte 3 - UInt8 trackDensity:4; - UInt8 linearDensity:4; -#else /* !__LITTLE_ENDIAN__ */ - // Byte 0 - UInt8 bookType:4; - UInt8 partVersion:4; - - // Byte 1 - UInt8 discSize:4; - UInt8 minimumRate:4; - - // Byte 2 - UInt8 reserved2:1; - UInt8 numberOfLayers:2; - UInt8 trackPath:1; - UInt8 layerType:4; - - // Byte 3 - UInt8 linearDensity:4; - UInt8 trackDensity:4; -#endif /* !__LITTLE_ENDIAN__ */ - - // Bytes 4-15 - UInt8 zero1; // always 0x00 - UInt8 startingPhysicalSectorNumberOfDataArea[3]; - UInt8 zero2; // always 0x00 - UInt8 endPhysicalSectorNumberOfDataArea[3]; - UInt8 zero3; // always 0x00 - UInt8 endSectorNumberInLayerZero[3]; - - // Byte 16 -#ifdef __LITTLE_ENDIAN__ - UInt8 reserved1:7; - UInt8 bcaFlag:1; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 bcaFlag:1; - UInt8 reserved1:7; -#endif /* !__LITTLE_ENDIAN__ */ - - // Bytes 17-2047 - UInt8 mediaSpecific[2031]; -}; -typedef struct DVDPhysicalFormatInfo DVDPhysicalFormatInfo; - -// Read DVD Structures Format 0x01 -struct DVDCopyrightInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; - UInt8 copyrightProtectionSystemType; - DVDCPRMRegionCode regionMask; - UInt8 reserved2[2]; -}; -typedef struct DVDCopyrightInfo DVDCopyrightInfo; - -// Read DVD Structures Format 0x02 -struct DVDDiscKeyInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; - UInt8 discKeyStructures[2048]; -}; -typedef struct DVDDiscKeyInfo DVDDiscKeyInfo; - -// Read DVD Structures Format 0x04 -struct DVDManufacturingInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; - UInt8 discManufacturingInfo[2048]; -}; -typedef struct DVDManufacturingInfo DVDManufacturingInfo; - -// ReportKey Format 0x00 -struct DVDAuthenticationGrantIDInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; - UInt8 reserved2[3]; -#ifdef __LITTLE_ENDIAN__ - UInt8 reservedBits:6; - UInt8 grantID:2; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 grantID:2; - UInt8 reservedBits:6; -#endif /* !__LITTLE_ENDIAN__ */ -}; -typedef struct DVDAuthenticationGrantIDInfo DVDAuthenticationGrantIDInfo; - -// ReportKey and SendKey Format 0x01 -struct DVDChallengeKeyInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; - UInt8 challengeKeyValue[10]; - UInt8 reserved2[2]; -}; -typedef struct DVDChallengeKeyInfo DVDChallengeKeyInfo; - -// ReportKey Format 0x02 -struct DVDKey1Info -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; - UInt8 key1Value[5]; - UInt8 reserved2[3]; -}; -typedef struct DVDKey1Info DVDKey1Info; - -// SendKey Format 0x03 -struct DVDKey2Info -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; - UInt8 key2Value[5]; - UInt8 reserved2[3]; -}; -typedef struct DVDKey2Info DVDKey2Info; - -// ReportKey Format 0x04 -struct DVDTitleKeyInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; -#ifdef __LITTLE_ENDIAN__ - UInt8 CP_MOD:4; - UInt8 CGMS:2; - UInt8 CP_SEC:1; - UInt8 CPM:1; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 CPM:1; - UInt8 CP_SEC:1; - UInt8 CGMS:2; - UInt8 CP_MOD:4; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 titleKeyValue[5]; - UInt8 reserved2[2]; -}; -typedef struct DVDTitleKeyInfo DVDTitleKeyInfo; - -// ReportKey Format 0x05 -struct DVDAuthenticationSuccessFlagInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; - UInt8 reserved2[3]; -#ifdef __LITTLE_ENDIAN__ - UInt8 successFlag:1; - UInt8 reservedBits:7; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 reservedBits:7; - UInt8 successFlag:1; -#endif /* !__LITTLE_ENDIAN__ */ -}; -typedef struct DVDAuthenticationSuccessFlagInfo DVDAuthenticationSuccessFlagInfo; - -// ReportKey Format 0x08 -struct DVDRegionPlaybackControlInfo -{ - UInt8 dataLength[2]; - UInt8 reserved[2]; -#ifdef __LITTLE_ENDIAN__ - UInt8 numberUserResets:3; - UInt8 numberVendorResets:3; - UInt8 typeCode:2; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 typeCode:2; - UInt8 numberVendorResets:3; - UInt8 numberUserResets:3; -#endif /* !__LITTLE_ENDIAN__ */ - DVDCPRMRegionCode driveRegion; - DVDRegionalPlaybackControlScheme rpcScheme; - UInt8 reserved2; -}; -typedef struct DVDRegionPlaybackControlInfo DVDRegionPlaybackControlInfo; - -// Read Disc Information Format -struct DVDDiscInfo -{ - UInt16 dataLength; -#ifdef __LITTLE_ENDIAN__ - UInt8 discStatus:2; - UInt8 stateOfLastBorder:2; - UInt8 erasable:1; - UInt8 reserved:3; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 reserved:3; - UInt8 erasable:1; - UInt8 stateOfLastBorder:2; - UInt8 discStatus:2; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 reserved2; - UInt8 numberOfBordersLSB; - UInt8 firstRZoneNumberInLastBorderLSB; - UInt8 lastRZoneNumberInLastBorderLSB; -#ifdef __LITTLE_ENDIAN__ - UInt8 reserved3:5; - UInt8 unrestrictedUse:1; - UInt8 discBarCodeValid:1; - UInt8 reserved4:1; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 reserved4:1; - UInt8 discBarCodeValid:1; - UInt8 unrestrictedUse:1; - UInt8 reserved3:5; -#endif /* !__LITTLE_ENDIAN__ */ - UInt8 reserved5; - UInt8 numberOfBordersMSB; - UInt8 firstRZoneNumberInLastBorderMSB; - UInt8 lastRZoneNumberInLastBorderMSB; - UInt8 reserved6[4]; - UInt8 reserved7[4]; - UInt8 reserved8[4]; - UInt8 discBarCode[8]; - UInt8 reserved9; - UInt8 numberOfOPCTableEntries; - UInt8 opcTableEntries[0]; -}; -typedef struct DVDDiscInfo DVDDiscInfo; - -// Read RZone Information Address Types -typedef UInt8 DVDRZoneInfoAddressType; -enum -{ - kDVDRZoneInfoAddressTypeLBA = 0x00, - kDVDRZoneInfoAddressTypeRZoneNumber = 0x01, - kDVDRZoneInfoAddressTypeBorderNumber = 0x02, -}; - -// Read RZone Information Format -struct DVDRZoneInfo -{ - UInt16 dataLength; - UInt8 rzoneNumberLSB; - UInt8 borderNumberLSB; - UInt8 reserved; -#ifdef __LITTLE_ENDIAN__ - UInt8 reserved2:4; - UInt8 copy:1; - UInt8 damage:1; - UInt8 reserved3:2; - - UInt8 reserved4:4; - UInt8 restrictedOverwrite:1; - UInt8 incremental:1; - UInt8 blank:1; - UInt8 reservedRZone:1; - - UInt8 nextWritableAddressValid:1; - UInt8 lastRecordedAddressValid:1; - UInt8 reserved5:6; -#else /* !__LITTLE_ENDIAN__ */ - UInt8 reserved3:2; - UInt8 damage:1; - UInt8 copy:1; - UInt8 reserved2:4; - - UInt8 reservedRZone:1; - UInt8 blank:1; - UInt8 incremental:1; - UInt8 restrictedOverwrite:1; - UInt8 reserved4:4; - - UInt8 reserved5:6; - UInt8 lastRecordedAddressValid:1; - UInt8 nextWritableAddressValid:1; -#endif /* !__LITTLE_ENDIAN__ */ - UInt32 rzoneStartAddress; - UInt32 nextWritableAddress; - UInt32 freeBlocks; - UInt32 blockingFactor; - UInt32 rzoneSize; - UInt32 lastRecordedAddress; - UInt8 rzoneNumberMSB; - UInt8 borderNumberMSB; - UInt8 reserved6; - UInt8 reserved7; -}; -typedef struct DVDRZoneInfo DVDRZoneInfo; - -#pragma pack(pop) /* (reset to default struct packing) */ - -#endif /* _IODVDTYPES_H */ diff --git a/i386/include/IOKit/storage/IOFDiskPartitionScheme.h b/i386/include/IOKit/storage/IOFDiskPartitionScheme.h deleted file mode 100644 index 7f96255..0000000 --- a/i386/include/IOKit/storage/IOFDiskPartitionScheme.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/* - * This header contains the IOFDiskPartitionScheme class definition. - */ - -#ifndef _IOFDISKPARTITIONSCHEME_H -#define _IOFDISKPARTITIONSCHEME_H - -#include <IOKit/IOTypes.h> - -/* - * kIOFDiskPartitionSchemeClass is the name of the IOFDiskPartitionScheme class. - */ - -#define kIOFDiskPartitionSchemeClass "IOFDiskPartitionScheme" - -/* - * FDisk Partition Map Definitions - */ - -#pragma pack(push, 1) /* (enable 8-bit struct packing) */ - -/* Structure constants. */ - -#define DISK_BLK0SZ sizeof(struct disk_blk0) /* (size of partition map) */ -#define DISK_BOOTSZ 446 /* (size of boot code in map) */ -#define DISK_NPART 4 /* (number of entries in map) */ - -/* Partition map entry. */ - -struct fdisk_part -{ - UInt8 bootid; /* (is active boot partition?) */ - UInt8 beghead; /* (beginning head) */ - UInt8 begsect; /* (beginning sector; beginning cylinder, high 2 bits) */ - UInt8 begcyl; /* (beginning cylinder, low 8 bits) */ - UInt8 systid; /* (type) */ - UInt8 endhead; /* (ending head) */ - UInt8 endsect; /* (ending sector; ending cylinder, high 2 bits) */ - UInt8 endcyl; /* (ending cylinder, low 8 bits) */ - UInt32 relsect; /* (block start) */ - UInt32 numsect; /* (block count) */ -}; - -/* Partition map, as found in block zero of the disk (or extended partition). */ - -struct disk_blk0 -{ - UInt8 bootcode[DISK_BOOTSZ]; /* (boot code) */ - struct fdisk_part parts[DISK_NPART]; /* (partition entries) */ - UInt16 signature; /* (unique signature for map) */ -}; - -/* Partition map signature (signature). */ - -#define DISK_SIGNATURE 0xAA55 - -/* Partition map entry types (systid). */ - -#define FDISK_PARTITION_TYPE_01 "DOS_FAT_12" -#define FDISK_PARTITION_TYPE_04 "DOS_FAT_16_S" -#define FDISK_PARTITION_TYPE_06 "DOS_FAT_16" -#define FDISK_PARTITION_TYPE_07 "Windows_NTFS" -#define FDISK_PARTITION_TYPE_0B "DOS_FAT_32" -#define FDISK_PARTITION_TYPE_0C "Windows_FAT_32" -#define FDISK_PARTITION_TYPE_0E "Windows_FAT_16" -#define FDISK_PARTITION_TYPE_42 "Windows_LDM" -#define FDISK_PARTITION_TYPE_82 "Linux_Swap" -#define FDISK_PARTITION_TYPE_83 "Linux" -#define FDISK_PARTITION_TYPE_8E "Linux_LVM" -#define FDISK_PARTITION_TYPE_A5 "FreeBSD" -#define FDISK_PARTITION_TYPE_A6 "OpenBSD" -#define FDISK_PARTITION_TYPE_A7 "Apple_Rhapsody_UFS" -#define FDISK_PARTITION_TYPE_A8 "Apple_UFS" -#define FDISK_PARTITION_TYPE_A9 "NetBSD" -#define FDISK_PARTITION_TYPE_AB "Apple_Boot" -#define FDISK_PARTITION_TYPE_AE "Apple_Encrypted" -#define FDISK_PARTITION_TYPE_AF "Apple_HFS" -#define FDISK_PARTITION_TYPE_FD "Linux_RAID" - -#pragma pack(pop) /* (reset to default struct packing) */ - -#endif /* !_IOFDISKPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/IOFilterScheme.h b/i386/include/IOKit/storage/IOFilterScheme.h deleted file mode 100644 index 406b596..0000000 --- a/i386/include/IOKit/storage/IOFilterScheme.h +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOFilterScheme - * @abstract - * This header contains the IOFilterScheme class definition. - */ - -#ifndef _IOFILTERSCHEME_H -#define _IOFILTERSCHEME_H - -/*! - * @defined kIOFilterSchemeClass - * @abstract - * The name of the IOFilterScheme class. - * @discussion - * kIOFilterSchemeClass is the name of the IOFilterScheme class. - */ - -#define kIOFilterSchemeClass "IOFilterScheme" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOMedia.h> -#include <IOKit/storage/IOStorage.h> - -/*! - * @class IOFilterScheme - * @abstract - * The common base class for all filter scheme - * objects. - * @discussion - * The IOFilterScheme class is the common base class for all filter scheme - * objects. It extends the IOStorage class by implementing the appropriate - * open and close semantics for filter objects (standard semantics are act - * as a relay for incoming opens, producing one outgoing open for each - * incoming open). It also implements the default read and write semantics, - * which pass all reads and writes through to the provider media unprocessed. - * For simple schemes, the default behavior is sufficient. More complex - * filter schemes such as RAID will want to do extra processing for reads - * and writes. - */ - -class IOFilterScheme : public IOStorage -{ - OSDeclareDefaultStructors(IOFilterScheme); - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - - /*! - * @function handleOpen - * @discussion - * The handleOpen method grants or denies permission to access this object - * to an interested client. The argument is an IOStorageAccess value that - * specifies the level of access desired -- reader or reader-writer. - * - * This method can be invoked to upgrade or downgrade the access level for - * an existing client as well. The previous access level will prevail for - * upgrades that fail, of course. A downgrade should never fail. If the - * new access level should be the same as the old for a given client, this - * method will do nothing and return success. In all cases, one, singular - * close-per-client is expected for all opens-per-client received. - * - * This implementation replaces the IOService definition of handleOpen(). - * @param client - * Client requesting the open. - * @param options - * Options for the open. Set to zero. - * @param access - * Access level for the open. Set to kIOStorageAccessReader or - * kIOStorageAccessReaderWriter. - * @result - * Returns true if the open was successful, false otherwise. - */ - - virtual bool handleOpen(IOService * client, - IOOptionBits options, - void * access); - - /*! - * @function handleIsOpen - * @discussion - * The handleIsOpen method determines whether the specified client, or any - * client if none is specified, presently has an open on this object. - * - * This implementation replaces the IOService definition of handleIsOpen(). - * @param client - * Client to check the open state of. Set to zero to check the open state - * of all clients. - * @result - * Returns true if the client was (or clients were) open, false otherwise. - */ - - virtual bool handleIsOpen(const IOService * client) const; - - /*! - * @function handleClose - * @discussion - * The handleClose method closes the client's access to this object. - * - * This implementation replaces the IOService definition of handleClose(). - * @param client - * Client requesting the close. - * @param options - * Options for the close. Set to zero. - */ - - virtual void handleClose(IOService * client, IOOptionBits options); - -public: - - using IOStorage::read; - using IOStorage::write; - - /*! - * @function read - * @discussion - * Read data from the storage object at the specified byte offset into the - * specified buffer, asynchronously. When the read completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the read. - * - * For simple filter schemes, the default behavior is to simply pass the - * read through to the provider media. More complex filter schemes such - * as RAID will need to do extra processing here. - * @param client - * Client requesting the read. - * @param byteStart - * Starting byte offset for the data transfer. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - * @param completion - * Completion routine to call once the data transfer is complete. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - */ - - virtual void read(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); - - /*! - * @function write - * @discussion - * Write data into the storage object at the specified byte offset from the - * specified buffer, asynchronously. When the write completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the write. - * - * For simple filter schemes, the default behavior is to simply pass the - * write through to the provider media. More complex filter schemes such - * as RAID will need to do extra processing here. - * @param client - * Client requesting the write. - * @param byteStart - * Starting byte offset for the data transfer. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - * @param completion - * Completion routine to call once the data transfer is complete. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - */ - - virtual void write(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); - - /*! - * @function synchronizeCache - * @discussion - * Flush the cached data in the storage object, if any, synchronously. - * @param client - * Client requesting the cache synchronization. - * @result - * Returns the status of the cache synchronization. - */ - - virtual IOReturn synchronizeCache(IOService * client); - - /*! - * @function discard - * @discussion - * Delete unused data from the storage object at the specified byte offset, - * synchronously. - * @param client - * Client requesting the operation. - * @param byteStart - * Starting byte offset for the operation. - * @param byteCount - * Size of the operation. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn discard(IOService * client, - UInt64 byteStart, - UInt64 byteCount); - - /* - * Obtain this object's provider. We override the superclass's method - * to return a more specific subclass of OSObject -- an IOMedia. This - * method serves simply as a convenience to subclass developers. - */ - - virtual IOMedia * getProvider() const; - - OSMetaClassDeclareReservedUnused(IOFilterScheme, 0); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 1); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 2); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 3); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 4); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 5); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 6); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 7); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 8); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 9); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 10); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 11); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 12); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 13); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 14); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 15); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 16); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 17); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 18); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 19); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 20); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 21); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 22); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 23); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 24); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 25); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 26); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 27); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 28); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 29); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 30); - OSMetaClassDeclareReservedUnused(IOFilterScheme, 31); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOFILTERSCHEME_H */ diff --git a/i386/include/IOKit/storage/IOFireWireStorageCharacteristics.h b/i386/include/IOKit/storage/IOFireWireStorageCharacteristics.h deleted file mode 100644 index 710f29f..0000000 --- a/i386/include/IOKit/storage/IOFireWireStorageCharacteristics.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ -#define _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ - -// -// Bridge Characteristics - Characteristics defined for FireWire bridges. -// - -/*! -@defined kIOPropertyBridgeCharacteristicsKey -@discussion This key is used to define Bridge Characteristics for a particular -devices's bridge chipset. It has an associated dictionary which lists the -bridge characteristics. - -Requirement: Optional - -Example: -<pre> -@textblock -<dict> - <key>Bridge Characteristics</key> - <dict> - <key>Bridge Vendor Name</key> - <string>Oxford Semiconductor</string> - <key>Bridge Model Name</key> - <string>FW911</string> - <key>Bridge Revision Level</key> - <string>3.7</string> - </dict> -</dict> -@/textblock -</pre> -*/ - -#define kIOPropertyBridgeCharacteristicsKey "Bridge Characteristics" -#define kIOPropertyBridgeVendorNameKey "Bridge Vendor Name" -#define kIOPropertyBridgeModelNameKey "Bridge Model Name" -#define kIOPropertyBridgeRevisionLevelKey "Bridge Revision Level" - -#endif /* _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ */ \ No newline at end of file diff --git a/i386/include/IOKit/storage/IOGUIDPartitionScheme.h b/i386/include/IOKit/storage/IOGUIDPartitionScheme.h deleted file mode 100644 index 3e197d0..0000000 --- a/i386/include/IOKit/storage/IOGUIDPartitionScheme.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/* - * This header contains the IOGUIDPartitionScheme class definition. - */ - -#ifndef _IOGUIDPARTITIONSCHEME_H -#define _IOGUIDPARTITIONSCHEME_H - -#include <IOKit/IOTypes.h> - -typedef unsigned char uuid_t[16]; -/* - * kIOGUIDPartitionSchemeClass is the name of the IOGUIDPartitionScheme class. - */ - -#define kIOGUIDPartitionSchemeClass "IOGUIDPartitionScheme" - - -#pragma pack(push, 1) /* (enable 8-bit struct packing) */ - -/* Partition map. */ - -struct gpt_hdr -{ - uint8_t hdr_sig[8]; - uint32_t hdr_revision; - uint32_t hdr_size; - uint32_t hdr_crc_self; - uint32_t __reserved; - uint64_t hdr_lba_self; - uint64_t hdr_lba_alt; - uint64_t hdr_lba_start; - uint64_t hdr_lba_end; - uuid_t hdr_uuid; - uint64_t hdr_lba_table; - uint32_t hdr_entries; - uint32_t hdr_entsz; - uint32_t hdr_crc_table; - uint32_t padding; -}; - -/* Partition map entry. */ - -struct gpt_ent -{ - uuid_t ent_type; - uuid_t ent_uuid; - uint64_t ent_lba_start; - uint64_t ent_lba_end; - uint64_t ent_attr; - uint16_t ent_name[36]; -}; - -/* Partition map signature (hdr_sig). */ - -#define GPT_HDR_SIG "EFI PART" - -/* Partition map version (hdr_revision). */ - -#define GPT_HDR_REVISION 0x00010000 - -/* Partition map entry flags (ent_attr). */ - -#define GPT_ENT_ATTR_PLATFORM 0x00000001 - -#pragma pack(pop) /* (reset to default struct packing) */ - -#endif /* !_IOGUIDPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/IOMedia.h b/i386/include/IOKit/storage/IOMedia.h deleted file mode 100644 index 64052ec..0000000 --- a/i386/include/IOKit/storage/IOMedia.h +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOMedia - * @abstract - * This header contains the IOMedia class definition. - */ - -#ifndef _IOMEDIA_H -#define _IOMEDIA_H - -#include <IOKit/IOTypes.h> - -/*! - * @defined kIOMediaClass - * @abstract - * The name of the IOMedia class. - */ - -#define kIOMediaClass "IOMedia" - -/*! - * @defined kIOMediaContentKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaContentKey property has an OSString - * value and contains a description of the media's - * contents. The description is the same as the hint at the time of the - * object's creation, but it is possible that the description has been overridden - * by a client (which has probed the media and identified the content correctly) - * of the media object. It is more accurate than the hint for this reason. The - * string is formed in the likeness of Apple's "Apple_HFS" strings or in the - * likeness of a UUID. - */ - -#define kIOMediaContentKey "Content" - -/*! - * @defined kIOMediaContentHintKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaContentHintKey property has an OSString - * value and contains a hint of the media's contents. - * The hint is set at the time of the object's creation, should the creator have - * a clue as to what it may contain. The hint string does not change for the - * lifetime of the object and is formed in the likeness of Apple's "Apple_HFS" - * strings or in the likeness of a UUID. - */ - -#define kIOMediaContentHintKey "Content Hint" - -/*! - * @defined kIOMediaEjectableKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaEjectableKey property has an OSBoolean - * value and describes whether the media is ejectable - * from the drive mechanism under software control. Implies IOMediaRemovable - * is also true. - */ - -#define kIOMediaEjectableKey "Ejectable" - -/*! - * @defined kIOMediaLeafKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaLeafKey property has an OSBoolean value and describes whether the media is a leaf, that is, - * it is the deepest media object in this branch of the I/O Registry. - */ - -#define kIOMediaLeafKey "Leaf" - -/*! - * @defined kIOMediaOpenKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaOpenKey property has an OSBoolean value and describes whether - * a client presently has an open on this media. - */ - -#define kIOMediaOpenKey "Open" - -/*! - * @defined kIOMediaPreferredBlockSizeKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaPreferredBlockSizeKey property has an - * OSNumber value and describes the media's natural - * block size in bytes. This information is useful to clients that want to - * optimize access to the media. - */ - -#define kIOMediaPreferredBlockSizeKey "Preferred Block Size" - -/*! - * @defined kIOMediaRemovableKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaRemovableKey property has an OSBoolean - * value and describes whether the media is removable - * from the drive mechanism. - */ - -#define kIOMediaRemovableKey "Removable" - -/*! - * @defined kIOMediaSizeKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaSizeKey property has an OSNumber value and describes the total length of the media in - * bytes. - */ - -#define kIOMediaSizeKey "Size" - -/*! - * @defined kIOMediaUUIDKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaUUIDKey property has an OSString value and contains a persistent - * Universal Unique Identifier for the media if such an identifier is available. - */ - -#define kIOMediaUUIDKey "UUID" - -/*! - * @defined kIOMediaWholeKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaWholeKey property has an OSBoolean - * value and describes whether the media is whole, that is, - * it represents the whole disk (the physical disk, or a virtual replica - * thereof). - */ - -#define kIOMediaWholeKey "Whole" - -/*! - * @defined kIOMediaWritableKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaWritableKey property has an OSBoolean - * value and describes whether the media is writable. - */ - -#define kIOMediaWritableKey "Writable" - -/*! - * @defined kIOMediaContentMaskKey - * @abstract - * A property of IOMedia clients. - * @discussion - * The kIOMediaContentMaskKey property has an OSString - * value and must exist in all IOMedia clients that - * drive new content (that is, produce new media objects). When the client - * matches against the provider media, the value of the client's - * kIOMediaContentMaskKey property is used to replace the provider's - * kIOMediaContentKey property. - */ - -#define kIOMediaContentMaskKey "Content Mask" - -/*! - * @defined kIOMediaIconKey - * @abstract - * A property of any object in the media stack. - * @discussion - * kIOMediaIconKey is a property of any object in the media stack that wishes - * to override the default icon shown for the media objects in the stack. It - * is usually defined in a provider object below the media object. It has an - * OSDictionary value, with properties identical to the kIOIconKey definition, - * that is, kCFBundleIdentifierKey and kIOBundleResourceFileKey. - */ - -#define kIOMediaIconKey "IOMediaIcon" - -/*! - * @enum IOMediaAttributeMask - * @discussion - * The IOMediaAttributeMask bit mask describes various attributes of - * the media object, such as its ejectability and its removability. - * @constant kIOMediaAttributeEjectableMask - * Indicates whether the media is ejectable from the drive mechanism - * under software control. Implies kIOMediaAttributeRemovableMask. - * @constant kIOMediaAttributeRemovableMask - * Indicates whether the media is removable from the drive mechanism. - */ - -enum -{ - kIOMediaAttributeEjectableMask = 0x00000001, - kIOMediaAttributeRemovableMask = 0x00000002, - kIOMediaAttributeReservedMask = 0xFFFFFFFC -}; - -typedef UInt32 IOMediaAttributeMask; - -#endif /* !_IOMEDIA_H */ diff --git a/i386/include/IOKit/storage/IOMediaBSDClient.h b/i386/include/IOKit/storage/IOMediaBSDClient.h deleted file mode 100644 index 56a3117..0000000 --- a/i386/include/IOKit/storage/IOMediaBSDClient.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOMEDIABSDCLIENT_H -#define _IOMEDIABSDCLIENT_H - -#include <sys/disk.h> - -#endif /* !_IOMEDIABSDCLIENT_H */ diff --git a/i386/include/IOKit/storage/IOPartitionScheme.h b/i386/include/IOKit/storage/IOPartitionScheme.h deleted file mode 100644 index 7a1de37..0000000 --- a/i386/include/IOKit/storage/IOPartitionScheme.h +++ /dev/null @@ -1,373 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOPartitionScheme - * @abstract - * This header contains the IOPartitionScheme class definition. - */ - -#ifndef _IOPARTITIONSCHEME_H -#define _IOPARTITIONSCHEME_H - -/*! - * @defined kIOPartitionSchemeClass - * @abstract - * The name of the IOPartitionScheme class. - * @discussion - * kIOPartitionSchemeClass is the name of the IOPartitionScheme class. - */ - -#define kIOPartitionSchemeClass "IOPartitionScheme" - -/*! - * @defined kIOMediaLiveKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaLiveKey property has an OSBoolean - * value and is placed into an IOMedia instance - * created via the partition scheme. It describes whether the - * partition is live, that is, it is up-to-date with respect - * to the on-disk partition table. - */ - -#define kIOMediaLiveKey "Live" - -/*! - * @defined kIOMediaPartitionIDKey - * @abstract - * A property of IOMedia objects. - * @discussion - * The kIOMediaPartitionIDKey property has an OSNumber - * value and is placed into an IOMedia instance - * created via the partition scheme. It is an ID that differentiates one - * partition from the other (within a given scheme). It is typically an index - * into the on-disk partition table. - */ - -#define kIOMediaPartitionIDKey "Partition ID" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/storage/IOMedia.h> -#include <IOKit/storage/IOStorage.h> - -/*! - * @class IOPartitionScheme - * @abstract - * The common base class for all partition scheme - * objects. - * @discussion - * The IOPartitionScheme class is the common base class for all partition scheme - * objects. It extends the IOStorage class by implementing the appropriate open - * and close semantics for partition objects (standard semantics are to act as a - * multiplexor for incoming opens, producing one outgoing open with the correct - * access). It also implements the default read and write semantics, which pass - * all reads and writes through to the provider media unprocessed. For simple - * schemes, the default behavior is sufficient. More complex partition schemes - * such as RAID will want to do extra processing for reads and writes. - */ - -class IOPartitionScheme : public IOStorage -{ - OSDeclareDefaultStructors(IOPartitionScheme); - -protected: - - struct ExpansionData { /* */ }; - ExpansionData * _expansionData; - - IOStorageAccess _openLevel; - OSSet * _openReaders; - OSSet * _openReaderWriters; - - /* - * Free all of this object's outstanding resources. - */ - - virtual void free(); - - /*! - * @function handleOpen - * @discussion - * The handleOpen method grants or denies permission to access this object - * to an interested client. The argument is an IOStorageAccess value that - * specifies the level of access desired -- reader or reader-writer. - * - * This method can be invoked to upgrade or downgrade the access level for - * an existing client as well. The previous access level will prevail for - * upgrades that fail, of course. A downgrade should never fail. If the - * new access level should be the same as the old for a given client, this - * method will do nothing and return success. In all cases, one, singular - * close-per-client is expected for all opens-per-client received. - * - * This implementation replaces the IOService definition of handleOpen(). - * @param client - * Client requesting the open. - * @param options - * Options for the open. Set to zero. - * @param access - * Access level for the open. Set to kIOStorageAccessReader or - * kIOStorageAccessReaderWriter. - * @result - * Returns true if the open was successful, false otherwise. - */ - - virtual bool handleOpen(IOService * client, - IOOptionBits options, - void * access); - - /*! - * @function handleIsOpen - * @discussion - * The handleIsOpen method determines whether the specified client, or any - * client if none is specified, presently has an open on this object. - * - * This implementation replaces the IOService definition of handleIsOpen(). - * @param client - * Client to check the open state of. Set to zero to check the open state - * of all clients. - * @result - * Returns true if the client was (or clients were) open, false otherwise. - */ - - virtual bool handleIsOpen(const IOService * client) const; - - /*! - * @function handleClose - * @discussion - * The handleClose method closes the client's access to this object. - * - * This implementation replaces the IOService definition of handleClose(). - * @param client - * Client requesting the close. - * @param options - * Options for the close. Set to zero. - */ - - virtual void handleClose(IOService * client, IOOptionBits options); - - /* - * Attach the given media object to the device tree plane. - */ - -#ifdef __LP64__ - virtual bool attachMediaObjectToDeviceTree(IOMedia * media); -#else /* !__LP64__ */ - virtual bool attachMediaObjectToDeviceTree(IOMedia * media, - IOOptionBits options = 0); /* 10.5.0 */ -#endif /* !__LP64__ */ - - /* - * Detach the given media object from the device tree plane. - */ - -#ifdef __LP64__ - virtual void detachMediaObjectFromDeviceTree(IOMedia * media); -#else /* !__LP64__ */ - virtual void detachMediaObjectFromDeviceTree(IOMedia * media, - IOOptionBits options = 0); /* 10.5.0 */ -#endif /* !__LP64__ */ - - /* - * Updates a set of existing partitions, represented by partitionsOld, - * with possible updates from a rescan of the disk, represented by - * partitionsNew. It returns a new set of partitions with the results, - * removing partitions from partitionsOld where applicable, adding - * partitions from partitionsNew where applicable, and folding in property - * changes to partitions from partitionsNew into partitionsOld where - * applicable. - */ - - virtual OSSet * juxtaposeMediaObjects(OSSet * partitionsOld, - OSSet * partitionsNew); /* 10.5.0 */ - -public: - - using IOStorage::read; - using IOStorage::write; - - /* - * Initialize this object's minimal state. - */ - - virtual bool init(OSDictionary * properties = 0); - - /*! - * @function read - * @discussion - * Read data from the storage object at the specified byte offset into the - * specified buffer, asynchronously. When the read completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the read. - * - * For simple partition schemes, the default behavior is to simply pass the - * read through to the provider media. More complex partition schemes such - * as RAID will need to do extra processing here. - * @param client - * Client requesting the read. - * @param byteStart - * Starting byte offset for the data transfer. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - * @param completion - * Completion routine to call once the data transfer is complete. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - */ - - virtual void read(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); - - /*! - * @function write - * @discussion - * Write data into the storage object at the specified byte offset from the - * specified buffer, asynchronously. When the write completes, the caller - * will be notified via the specified completion action. - * - * The buffer will be retained for the duration of the write. - * - * For simple partition schemes, the default behavior is to simply pass the - * write through to the provider media. More complex partition schemes such - * as RAID will need to do extra processing here. - * @param client - * Client requesting the write. - * @param byteStart - * Starting byte offset for the data transfer. - * @param buffer - * Buffer for the data transfer. The size of the buffer implies the size of - * the data transfer. - * @param attributes - * Attributes of the data transfer. See IOStorageAttributes. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - * @param completion - * Completion routine to call once the data transfer is complete. It is the - * responsibility of the callee to maintain the information for the duration - * of the data transfer, as necessary. - */ - - virtual void write(IOService * client, - UInt64 byteStart, - IOMemoryDescriptor * buffer, - IOStorageAttributes * attributes, - IOStorageCompletion * completion); - - /*! - * @function synchronizeCache - * @discussion - * Flush the cached data in the storage object, if any, synchronously. - * @param client - * Client requesting the cache synchronization. - * @result - * Returns the status of the cache synchronization. - */ - - virtual IOReturn synchronizeCache(IOService * client); - - /*! - * @function discard - * @discussion - * Delete unused data from the storage object at the specified byte offset, - * synchronously. - * @param client - * Client requesting the operation. - * @param byteStart - * Starting byte offset for the operation. - * @param byteCount - * Size of the operation. - * @result - * Returns the status of the operation. - */ - - virtual IOReturn discard(IOService * client, - UInt64 byteStart, - UInt64 byteCount); - - /* - * Obtain this object's provider. We override the superclass's method - * to return a more specific subclass of OSObject -- an IOMedia. This - * method serves simply as a convenience to subclass developers. - */ - - virtual IOMedia * getProvider() const; - -#ifdef __LP64__ - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 0); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 1); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 2); -#else /* !__LP64__ */ - OSMetaClassDeclareReservedUsed(IOPartitionScheme, 0); - OSMetaClassDeclareReservedUsed(IOPartitionScheme, 1); - OSMetaClassDeclareReservedUsed(IOPartitionScheme, 2); -#endif /* !__LP64__ */ - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 3); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 4); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 5); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 6); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 7); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 8); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 9); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 10); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 11); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 12); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 13); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 14); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 15); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 16); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 17); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 18); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 19); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 20); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 21); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 22); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 23); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 24); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 25); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 26); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 27); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 28); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 29); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 30); - OSMetaClassDeclareReservedUnused(IOPartitionScheme, 31); -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOPARTITIONSCHEME_H */ diff --git a/i386/include/IOKit/storage/IOStorage.h b/i386/include/IOKit/storage/IOStorage.h deleted file mode 100644 index d5725c2..0000000 --- a/i386/include/IOKit/storage/IOStorage.h +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - * @header IOStorage - * @abstract - * This header contains the IOStorage class definition. - */ - -#ifndef _IOSTORAGE_H -#define _IOSTORAGE_H - -#include <IOKit/IOTypes.h> - -/*! - * @defined kIOStorageClass - * @abstract - * The name of the IOStorage class. - */ - -#define kIOStorageClass "IOStorage" - -/*! - * @defined kIOStorageCategory - * @abstract - * kIOStorageCategory is a value for IOService's kIOMatchCategoryKey property. - * @discussion - * The kIOStorageCategory value is the standard value for the IOService property - * kIOMatchCategoryKey ("IOMatchCategory") for all storage drivers. All storage - * objects that expect to drive new content (that is, produce new media objects) - * are expected to compete within the kIOStorageCategory namespace. - * - * See the IOService documentation for more information on match categories. - */ - -#define kIOStorageCategory "IOStorage" /* (as IOMatchCategory) */ - -/*! - * @defined kIOStorageFeaturesKey - * @abstract - * A property of any object in the storage stack. - * @discussion - * kIOStorageFeaturesKey is a property of any object in the storage stack that - * wishes to express support of additional features, such as Force Unit Access. - * It is typically defined in the device object below the block storage driver - * object. It has an OSDictionary value, where each entry describes one given - * feature. - */ - -#define kIOStorageFeaturesKey "IOStorageFeatures" - -/*! - * @defined kIOStorageFeatureDiscard - * @abstract - * Describes the presence of the Discard feature. - * @discussion - * This property describes the ability of the storage stack to delete unused - * data from the media. It is one of the feature entries listed under the top- - * level kIOStorageFeaturesKey property table. It has an OSBoolean value. - */ - -#define kIOStorageFeatureDiscard "Discard" - -/*! - * @defined kIOStorageFeatureForceUnitAccess - * @abstract - * Describes the presence of the Force Unit Access feature. - * @discussion - * This property describes the ability of the storage stack to force a request - * to access the media. It is one of the feature entries listed under the top- - * level kIOStorageFeaturesKey property table. It has an OSBoolean value. - */ - -#define kIOStorageFeatureForceUnitAccess "Force Unit Access" - -#ifdef KERNEL -#ifdef __cplusplus - -/* - * Kernel - */ - -#include <IOKit/assert.h> -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IOService.h> - -/*! - * @enum IOStorageAccess - * @discussion - * The IOStorageAccess enumeration describes the possible access levels for open - * requests. - * @constant kIOStorageAccessNone - * No access is requested; should not be passed to open(). - * @constant kIOStorageAccessReader - * Read-only access is requested. - * @constant kIOStorageAccessReaderWriter - * Read and write access is requested. - * @constant kIOStorageAccessSharedLock - * Shared access is requested. - * @constant kIOStorageAccessExclusiveLock - * Exclusive access is requested. - */ - -enum -{ - kIOStorageAccessNone = 0x00, - kIOStorageAccessReader = 0x01, - kIOStorageAccessReaderWriter = 0x03, - kIOStorageAccessSharedLock = 0x04, - kIOStorageAccessExclusiveLock = 0x08 -}; - -typedef UInt32 IOStorageAccess; - -/*! - * @enum IOStorageOptions - * @discussion - * Options for read and write storage requests. - * @constant kIOStorageOptionForceUnitAccess - * Force the request to access the media. - */ - -enum -{ - kIOStorageOptionNone = 0x00000000, - kIOStorageOptionForceUnitAccess = 0x00000001, - kIOStorageOptionReserved = 0xFFFFFFFE -}; - -typedef UInt32 IOStorageOptions; - -/*! - * @struct IOStorageAttributes - * @discussion - * Attributes of read and write storage requests. - * @field options - * Options for the request. See IOStorageOptions. - * @field reserved - * Reserved for future use. Set to zero. - */ - -struct IOStorageAttributes -{ - IOStorageOptions options; - UInt32 reserved0032; - UInt64 reserved0064; -#ifdef __LP64__ - UInt64 reserved0128; - UInt64 reserved0192; -#endif /* __LP64__ */ -}; - -/*! - * @typedef IOStorageCompletionAction - * @discussion - * The IOStorageCompletionAction declaration describes the C (or C++) completion - * routine that is called once an asynchronous storage operation completes. - * @param target - * Opaque client-supplied pointer (or an instance pointer for a C++ callback). - * @param parameter - * Opaque client-supplied pointer. - * @param status - * Status of the data transfer. - * @param actualByteCount - * Actual number of bytes transferred in the data transfer. - */ - -typedef void (*IOStorageCompletionAction)(void * target, - void * parameter, - IOReturn status, - UInt64 actualByteCount); - -/*! - * @struct IOStorageCompletion - * @discussion - * The IOStorageCompletion structure describes the C (or C++) completion routine - * that is called once an asynchronous storage operation completes. The values - * passed for the target and parameter fields will be passed to the routine when - * it is called. - * @field target - * Opaque client-supplied pointer (or an instance pointer for a C++ callback). - * @field action - * Completion routine to call on completion of the data transfer. - * @field parameter - * Opaque client-supplied pointer. - */ - -struct IOStorageCompletion -{ - void * target; - IOStorageCompletionAction action; - void * parameter; -}; - -#endif /* __cplusplus */ -#endif /* KERNEL */ -#endif /* !_IOSTORAGE_H */ diff --git a/i386/include/IOKit/storage/IOStorageDeviceCharacteristics.h b/i386/include/IOKit/storage/IOStorageDeviceCharacteristics.h deleted file mode 100644 index 19a73a2..0000000 --- a/i386/include/IOKit/storage/IOStorageDeviceCharacteristics.h +++ /dev/null @@ -1,659 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IO_STORAGE_DEVICE_CHARACTERISTICS_H_ -#define _IOKIT_IO_STORAGE_DEVICE_CHARACTERISTICS_H_ - -#include <IOKit/storage/IOStorageProtocolCharacteristics.h> - -/* - * Device Characteristics - Characteristics defined for devices. - */ - -/*! -@defined kIOPropertyDeviceCharacteristicsKey -@discussion This key is used to define Device Characteristics for a particular -device and it has an associated dictionary which lists the -device characteristics. The device characteristics are Command Set specific -and are listed in the header files for each command set. - -Requirement: Mandatory - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyDeviceCharacteristicsKey "Device Characteristics" - - -/*! -@defined kIOPropertyVendorNameKey -@discussion This key is used to define the Vendor Name for a particular device -and it has an associated string. - -Requirement: Mandatory - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyVendorNameKey "Vendor Name" - - -/*! -@defined kIOPropertyProductNameKey -@discussion This key is used to define the Product Name for a particular device -and it has an associated string. - -Requirement: Mandatory - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyProductNameKey "Product Name" - - -/*! -@defined kIOPropertyProductRevisionLevelKey -@discussion This key is used to define the Product Revision Level for a -particular device and it has an associated string. - -Requirement: Mandatory - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyProductRevisionLevelKey "Product Revision Level" - - -/*! -@defined kIOPropertyProductSerialNumberKey -@discussion This key is used to define the Product Serial Number for a -particular device and it has an associated data. - -Requirement: Mandatory - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>Serial Number</key> - <string>123456789</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyProductSerialNumberKey "Serial Number" - - -/*! -@defined kIOPropertySupportedCDFeaturesKey -@discussion This key is used to define the supported CD Features for a -particular optical device and it has an associated bitfield. See -<IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> for definitions of the -bits and associated bitmasks. - -Requirement: Mandatory for optical devices (Peripheral Device Type 05h). - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>SuperDrive</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>CD Features</key> - <integer>1663</integer> - <key>DVD Features</key> - <integer>103</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySupportedCDFeaturesKey "CD Features" - - -/*! -@defined kIOPropertySupportedDVDFeaturesKey -@discussion This key is used to define the supported DVD Features for a -particular optical device and it has an associated bitfield. See -<IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> for definitions of the -bits and associated bitmasks. - -Requirement: Mandatory for optical devices (Peripheral Device Type 05h). - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>SuperDrive</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>CD Features</key> - <integer>1663</integer> - <key>DVD Features</key> - <integer>103</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySupportedDVDFeaturesKey "DVD Features" - - -/*! -@defined kIOPropertySupportedBDFeaturesKey -@discussion This key is used to define the supported BD Features for a -particular optical device and it has an associated bitfield. See -<IOKit/scsi/IOSCSIMultimediaCommandsDevice.h> for definitions of the -bits and associated bitmasks. - -Requirement: Mandatory for optical devices (Peripheral Device Type 05h). - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>SuperDrive</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>CD Features</key> - <integer>1663</integer> - <key>DVD Features</key> - <integer>103</integer> - <key>BD Features</key> - <integer>21</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySupportedBDFeaturesKey "BD Features" - - -/*! -@defined kIOPropertyRigidDiskGeometryKey -@discussion This key is used to define a dictionary containing -rigid disk geometry information. - -Requirement: Optional. If a device publishes this dictionary, it -must publish all key/value pairs which are deemed Mandatory. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>Rigid Disk Geometry</key> - <dict> - <key>Sector Count per Track</key> - <integer>12345</integer> - <key>Head Count</key> - <integer>12</integer> - <key>Cylinder Count</key> - <integer>12345</integer> - <key>Bytes per Physical Sector</key> - <integer>512</integer> - </dict> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyRigidDiskGeometryKey "Rigid Disk Geometry" - - -/*! -@defined kIOPropertySectorCountPerTrackKey -@discussion This key is used to define the number of sectors per -each track for a particular medium. - -Requirement: Mandatory element of the Rigid Disk Geometry dictionary. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>Rigid Disk Geometry</key> - <dict> - <key>Sector Count per Track</key> - <integer>12345</integer> - </dict> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySectorCountPerTrackKey "Sector Count per Track" - - -/*! -@defined kIOPropertyHeadCountKey -@discussion This key is used to define the number of heads for -a particular medium. - -Requirement: Mandatory element of the Rigid Disk Geometry dictionary. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>Rigid Disk Geometry</key> - <dict> - <key>Sector Count per Track</key> - <integer>12345</integer> - <key>Head Count</key> - <integer>12</integer> - <key>Cylinder Count</key> - <integer>12345</integer> - <key>Bytes per Physical Sector</key> - <integer>512</integer> - </dict> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyHeadCountKey "Head Count" - - -/*! -@defined kIOPropertyCylinderCountKey -@discussion This key is used to define the number of heads for -a particular medium. - -Requirement: Mandatory element of the Rigid Disk Geometry dictionary. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>Rigid Disk Geometry</key> - <dict> - <key>Sector Count per Track</key> - <integer>12345</integer> - <key>Head Count</key> - <integer>12</integer> - <key>Cylinder Count</key> - <integer>12345</integer> - <key>Bytes per Physical Sector</key> - <integer>512</integer> - </dict> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyCylinderCountKey "Cylinder Count" - - -/*! -@defined kIOPropertyBytesPerPhysicalSectorKey -@discussion This key is used to define the number of heads for -a particular medium. - -Requirement: Mandatory element of the Rigid Disk Geometry dictionary. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>Rigid Disk Geometry</key> - <dict> - <key>Sector Count per Track</key> - <integer>12345</integer> - <key>Head Count</key> - <integer>12</integer> - <key>Cylinder Count</key> - <integer>12345</integer> - <key>Bytes per Physical Sector</key> - <integer>512</integer> - </dict> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyBytesPerPhysicalSectorKey "Bytes per Physical Sector" - - -/*! -@defined kIOPropertyPhysicalBlockSizeKey -@discussion This key is used to define the physical block size of a hard disk drive. - -Requirement: Mandatory for hard disk drives with physical block size other than 512 bytes. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>Physical Block Size</key> - <integer>4096</integer> - <key>Logical Block Size</key> - <integer>512</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalBlockSizeKey "Physical Block Size" - - -/*! -@defined kIOPropertyLogicalBlockSizeKey -@discussion This key is used to define the logical block size of a hard disk drive. - -Requirement: Mandatory for hard disk drives with logical block size other than 512 bytes -or that does not match its physical block size. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>Apple</string> - <key>Product Name</key> - <string>iPod</string> - <key>Product Revision Level</key> - <string>1.0</string> - <key>Physical Block Size</key> - <integer>4096</integer> - <key>Logical Block Size</key> - <integer>512</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyLogicalBlockSizeKey "Logical Block Size" - - -/*! -@defined kIOPropertyTargetDiskModeKey -@discussion This key is used to indicate the device is another computer in Target Disk Mode. - -Requirement: Optional. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>AAPL</string> - <key>Product Name</key> - <string>FireWire Target</string> - <key>Product Revision Level</key> - <string>0000</string> - <key>Target Disk Mode</key> - <true/> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyTargetDiskModeKey "Target Disk Mode" - - -/*! -@defined kIOPropertyMediumTypeKey -@discussion This key is used to indicate the medium type of the device. - -Requirement: Optional. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>AAPL</string> - <key>Product Name</key> - <string>FireWire Target</string> - <key>Product Revision Level</key> - <string>0000</string> - <key>Medium Type</key> - <string>Rotational</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyMediumTypeKey "Medium Type" - - -/*! -@defined kIOPropertyMediumTypeRotationalKey -@discussion This key is used to indicate the medium type of the device is rotational. - -Requirement: Optional. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>AAPL</string> - <key>Product Name</key> - <string>FireWire Target</string> - <key>Product Revision Level</key> - <string>0000</string> - <key>Medium Type</key> - <string>Rotational</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyMediumTypeRotationalKey "Rotational" - - -/*! -@defined kIOPropertyMediumTypeSolidStateKey -@discussion This key is used to indicate the medium type of the device is solid state. - -Requirement: Optional. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>AAPL</string> - <key>Product Name</key> - <string>FireWire Target</string> - <key>Product Revision Level</key> - <string>0000</string> - <key>Medium Type</key> - <string>Solid State</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyMediumTypeSolidStateKey "Solid State" - - -/*! -@defined kIOPropertyMediumRotationRateKey -@discussion This key is used to indicate the medium rotation rate in RPM of the device. - -Requirement: Optional. - -Example: -<pre> -@textblock -<dict> - <key>Device Characteristics</key> - <dict> - <key>Vendor Name</key> - <string>AAPL</string> - <key>Product Name</key> - <string>FireWire Target</string> - <key>Product Revision Level</key> - <string>0000</string> - <key>Rotation Rate</key> - <integer>7200</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyMediumRotationRateKey "Rotation Rate" - - -#endif /* _IOKIT_IO_STORAGE_DEVICE_CHARACTERISTICS_H_ */ diff --git a/i386/include/IOKit/storage/IOStorageProtocolCharacteristics.h b/i386/include/IOKit/storage/IOStorageProtocolCharacteristics.h deleted file mode 100644 index 18a726f..0000000 --- a/i386/include/IOKit/storage/IOStorageProtocolCharacteristics.h +++ /dev/null @@ -1,1758 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IO_STORAGE_PROTOCOL_CHARACTERISTICS_H_ -#define _IOKIT_IO_STORAGE_PROTOCOL_CHARACTERISTICS_H_ - - -/* - * Protocol Characteristics - Characteristics defined for protocols. - */ - - -/*! -@defined kIOPropertyProtocolCharacteristicsKey -@discussion This key is used to define Protocol Characteristics for a particular -protocol and it has an associated dictionary which lists the -protocol characteristics. - -Requirement: Mandatory - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>ATAPI</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyProtocolCharacteristicsKey "Protocol Characteristics" - - -/*! -@defined kIOPropertySCSIInitiatorIdentifierKey -@discussion An identifier that will uniquely identify this SCSI Initiator for the -SCSI Domain. - -Requirement: Mandatory for SCSI Parallel Interface, SAS, -and Fibre Channel Interface. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SCSI Parallel Interface</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - <key>SCSI Initiator Identifier</key> - <integer>7</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSIInitiatorIdentifierKey "SCSI Initiator Identifier" - - -/*! -@defined kIOPropertySCSIDomainIdentifierKey -@discussion An identifier that will uniquely identify this SCSI Domain for the -Physical Interconnect type. This identifier is only guaranteed to be unique for -any given Physical Interconnect and is not guaranteed to be the same across -restarts or shutdowns. - -Requirement: Mandatory for SCSI Parallel Interface and Fibre Channel Interface. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SCSI Parallel Interface</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - <key>SCSI Domain Identifier</key> - <integer>0</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSIDomainIdentifierKey "SCSI Domain Identifier" - - -/*! -@defined kIOPropertySCSITargetIdentifierKey -@discussion This is the SCSI Target Identifier for a given SCSI Target Device. - -Requirement: Mandatory for SCSI Parallel Interface and Fibre Channel Interface. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SCSI Parallel Interface</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - <key>SCSI Target Identifier</key> - <integer>3</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSITargetIdentifierKey "SCSI Target Identifier" - - -/*! -@defined kIOPropertySCSILogicalUnitNumberKey -@discussion This key is the SCSI Logical Unit Number for the device server -controlled by the driver. - -Requirement: Mandatory for SCSI Parallel Interface, SAS, and Fibre Channel Interface. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SCSI Parallel Interface</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - <key>SCSI Logical Unit Number</key> - <integer>2</integer> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSILogicalUnitNumberKey "SCSI Logical Unit Number" - - -/*! -@defined kIOPropertySASAddressKey -@discussion This key is the unique 64-bit SAS Address for the device server -node located at this port, or for the initiating host port. - -Requirement: Mandatory for SAS. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SAS</string> - <key>Physical Interconnect Location</key> - <string>External</string> - <key>SAS Address</key> - <data>0011223344556677</data> - </dict> -</dict> -@/textblock -</pre> - -Example2: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>SAS Address</key> - <data>0011223344556677</data> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySASAddressKey "SAS Address" - - -/*! -@defined kIOPropertyFibreChannelNodeWorldWideNameKey -@discussion This key is the unique 64-bit World Wide Name for the device server -node located at this port, or for the initiating host port. - -Requirement: Mandatory for Fibre Channel Interface. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Fibre Channel Interface</string> - <key>Physical Interconnect Location</key> - <string>External</string> - <key>Node World Wide Name</key> - <data>0011223344556677</data> - </dict> -</dict> -@/textblock -</pre> - -Example2: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Node World Wide Name</key> - <data>0011223344556677</data> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyFibreChannelNodeWorldWideNameKey "Node World Wide Name" - - -/*! -@defined kIOPropertyFibreChannelPortWorldWideNameKey -@discussion This key is the unique 64-bit World Wide Name for the port. - -Requirement: Mandatory for Fibre Channel Interface. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Fibre Channel Interface</string> - <key>Physical Interconnect Location</key> - <string>External</string> - <key>Port World Wide Name</key> - <data>0011223344556677</data> - </dict> -</dict> -@/textblock -</pre> - -Example2: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port World Wide Name</key> - <data>0011223344556677</data> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyFibreChannelPortWorldWideNameKey "Port World Wide Name" - - -/*! -@defined kIOPropertyFibreChannelAddressIdentifierKey -@discussion This key is the 24-bit Address Identifier (S_ID or D_ID) as -defined in the FC-FS specification. It contains the address identifier -of the source or destination Nx_Port. - -Note: This value can change. It is not a static value. - -Requirement: Optional (only necessary for Fibre Channel Interface). - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Fibre Channel Interface</string> - <key>Physical Interconnect Location</key> - <string>External</string> - <key>Address Identifier</key> - <data>001122</data> - </dict> -</dict> -@/textblock -</pre> - -Example2: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Address Identifier</key> - <data>001122</data> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyFibreChannelAddressIdentifierKey "Address Identifier" - - -/*! -@defined kIOPropertyFibreChannelALPAKey -@discussion This key is the 8-bit Arbitrated Loop Physical Address -(AL_PA) value as defined in the FC-AL-2 specification. - -Note: This value can change. It is not a static value. - -Requirement: Optional (only necessary for Fibre Channel Interface). - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Fibre Channel Interface</string> - <key>Physical Interconnect Location</key> - <string>External</string> - <key>AL_PA</key> - <data>04</data> - </dict> -</dict> -@/textblock -</pre> - -Example2: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>AL_PA</key> - <data>04</data> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyFibreChannelALPAKey "AL_PA" - - -/*! -@defined kIOPropertyPortStatusKey -@discussion This key is associated with the current port -status of the physical link. The port status is either -"Link Established", "No Link Established", or "Link Failed". - -Note: This value can change when the port status changes. It -is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Status</key> - <string>Link Established</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortStatusKey "Port Status" - - -/*! -@defined kIOPropertyPortSpeedKey -@discussion This key is associated with the current port -speed. The port speed can be any valid speed for the interconnect. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (1 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedKey "Port Speed" - - -/*! -@defined kIOPropertyPortTopologyKey -@discussion This key is associated with the current port -topology. The port topology can be any valid topology for the interconnect. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Topology</key> - <string>Automatic (N_Port)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortTopologyKey "Port Topology" - - -/*! -@defined kIOPropertyPortDescriptionKey -@discussion This key is associated with an human -readable port description. Examples include -"Channel A", "Port 1", etc. - -Requirement: Optional for all interconnects. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Description</key> - <string>Channel A</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortDescriptionKey "Port Description" - - -/*! -@defined kIOPropertySCSIParallelSignalingTypeKey -@discussion This key is associated with the signaling type -used for this SCSI Parallel bus. Valid values include -"High Voltage Differential", "Low Voltage Differential", -and "Single Ended". - -Requirement: Optional for SCSI Parallel Interface. Not -defined for any other physical interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>SCSI Parallel Signaling Type</key> - <string>High Voltage Differential</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSIParallelSignalingTypeKey "SCSI Parallel Signaling Type" - - -/*! -@defined kIOPropertyFibreChannelCableDescriptionKey -@discussion This key is associated with the cabling type -used for this Fibre Channel port. Valid values include -"Copper" and "Fiber Optic". - -Requirement: Optional for Fibre Channel Interface. Not -defined for any other physical interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Fibre Channel Cabling Type</key> - <string>Copper</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyFibreChannelCableDescriptionKey "Fibre Channel Cabling Type" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeKey -@discussion This key is used to define the Physical Interconnect to which -a device is attached. - -Requirement: Mandatory. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SCSI Parallel Interface</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeKey "Physical Interconnect" - - -/*! -@defined kIOPropertyPhysicalInterconnectLocationKey -@discussion This key is used to define the Physical Interconnect -Location. - -Requirement: Mandatory. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SCSI Parallel Interface</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectLocationKey "Physical Interconnect Location" - - -/*! -@defined kIOPropertySCSIProtocolMultiInitKey -@discussion This protocol characteristics key is used to inform the system -that the protocol supports having multiple devices that act as initiators. - -Requirement: Optional. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Fibre Channel Interface</string> - <key>Physical Interconnect Location</key> - <string>External</string> - <key>Multiple Initiators</key> - <string>True</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSIProtocolMultiInitKey "Multiple Initiators" - - -/* - * Values - Values for the characteristics defined above. - */ - - -/*! -@defined kIOPropertyInternalKey -@discussion This key defines the value of Internal for the key -kIOPropertyPhysicalInterconnectLocationKey. If the device is -connected to an internal bus, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>ATA</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyInternalKey "Internal" - - -/*! -@defined kIOPropertyExternalKey -@discussion This key defines the value of External for the key -kIOPropertyPhysicalInterconnectLocationKey. If the device is -connected to an external bus, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Fibre Channel Interface</string> - <key>Physical Interconnect Location</key> - <string>External</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyExternalKey "External" - - -/*! -@defined kIOPropertyInternalExternalKey -@discussion This key defines the value of Internal/External for the key -kIOPropertyPhysicalInterconnectLocationKey. If the device is connected -to a bus and it is indeterminate whether it is internal or external, -this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SCSI Parallel Interface</string> - <key>Physical Interconnect Location</key> - <string>Internal/External</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyInternalExternalKey "Internal/External" - - -/*! -@defined kIOPropertyInterconnectFileKey -@discussion This key defines the value of File for the key -kIOPropertyPhysicalInterconnectLocationKey. If the device is a file -that is being represented as a storage device, this key should be set. - -NOTE: This key should only be used when the Physical Interconnect is set to -Virtual Interface. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Virtual Interface</string> - <key>Physical Interconnect Location</key> - <string>File</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyInterconnectFileKey "File" - - -/*! -@defined kIOPropertyInterconnectRAMKey -@discussion This key defines the value of RAM for the key -kIOPropertyPhysicalInterconnectLocationKey. If the device is system memory -that is being represented as a storage device, this key should be set. - -NOTE: This key should only be used when the Physical Interconnect is set to -Virtual Interface. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Virtual Interface</string> - <key>Physical Interconnect Location</key> - <string>RAM</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyInterconnectRAMKey "RAM" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeATA -@discussion This key defines the value of ATA for the key -kIOPropertyPhysicalInterconnectTypeKey. If the device is connected -to an ATA bus, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>ATA</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeATA "ATA" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeSerialATA -@discussion This key defines the value of SATA for the key -kIOPropertyPhysicalInterconnectTypeKey. If the device is connected -to a SATA bus, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SATA</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeSerialATA "SATA" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeSerialAttachedSCSI -@discussion This key defines the value of SAS for the key -kIOPropertyPhysicalInterconnectTypeKey. If the device is connected -to a SAS bus, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SAS</string> - <key>Physical Interconnect Location</key> - <string>External</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeSerialAttachedSCSI "SAS" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeATAPI -@discussion This key defines the value of ATAPI for the key -kIOPropertyPhysicalInterconnectTypeKey. If the device is connected -to an ATA bus and follows the ATAPI command specification, this key -should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>ATAPI</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeATAPI "ATAPI" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeUSB -@discussion This key defines the value of USB for the key -kIOPropertyPhysicalInterconnectTypeKey. If the device is connected -to a USB port, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>USB</string> - <key>Physical Interconnect Location</key> - <string>External</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeUSB "USB" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeFireWire -@discussion This key defines the value of USB for the key -kIOPropertyPhysicalInterconnectTypeKey. If the device is connected -to a FireWire port, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>FireWire</string> - <key>Physical Interconnect Location</key> - <string>External</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeFireWire "FireWire" - - -/*! - @defined kIOPropertyPhysicalInterconnectTypeSecureDigital - @discussion This key defines the value of Secure Digital for the key - kIOPropertyPhysicalInterconnectTypeSecureDigital. If the device is a - connected to a Secure Digital port and follows the Secure Digital - specification, this key should be set. - - Example: - <pre> - @textblock - <dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Secure Digital</string> - <key>Physical Interconnect Location</key> - <string>Internal</string> - </dict> - </dict> - @/textblock - </pre> - */ -#define kIOPropertyPhysicalInterconnectTypeSecureDigital "Secure Digital" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeSCSIParallel -@discussion This key defines the value of SCSI Parallel Interface for the key -kIOPropertyPhysicalInterconnectTypeKey. If the device is connected -to a SCSI Parallel port, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>SCSI Parallel Interface</string> - <key>Physical Interconnect Location</key> - <string>External</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeSCSIParallel "SCSI Parallel Interface" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeFibreChannel -@discussion This key defines the value of Fibre Channel Interface for the key -kIOPropertyPhysicalInterconnectTypeKey. If the device is connected -to a Fibre Channel port, this key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Fibre Channel Interface</string> - <key>Physical Interconnect Location</key> - <string>External</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeFibreChannel "Fibre Channel Interface" - - -/*! -@defined kIOPropertyPhysicalInterconnectTypeVirtual -@discussion This key defines the value of Virtual Interface for the key -kIOPropertyPhysicalInterconnectTypeVirtual. If the device is being made to look -like a storage device, but is not such in actuality, such as a File or RAM, this -key should be set. - -Example: -<pre> -@textblock -<dict> - <key>Protocol Characteristics</key> - <dict> - <key>Physical Interconnect</key> - <string>Virtual Interface</string> - <key>Physical Interconnect Location</key> - <string>File</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPhysicalInterconnectTypeVirtual "Virtual Interface" - - -/*! -@defined kIOPropertyPortStatusLinkEstablishedKey -@discussion This key defines the value of Link Established for the key -kIOPropertyPortStatusKey. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Status</key> - <string>Link Established</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortStatusLinkEstablishedKey "Link Established" - - -/*! -@defined kIOPropertyPortStatusNoLinkEstablishedKey -@discussion This key defines the value of No Link Established for the key -kIOPropertyPortStatusKey. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Status</key> - <string>No Link Established</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortStatusNoLinkEstablishedKey "No Link Established" - - -/*! -@defined kIOPropertyPortStatusLinkFailedKey -@discussion This key defines the value of Link Failed for the key -kIOPropertyPortStatusKey. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Status</key> - <string>Link Failed</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortStatusLinkFailedKey "Link Failed" - - -/*! -@defined kIOPropertyPortSpeedAutomaticKey -@discussion This key defines the value of Automatic for the key -kIOPropertyPortSpeedKey. If the speed of the port is automatically -adjusted by the host/device and a definitive speed is not known, -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomaticKey "Automatic" - - -/*! -@defined kIOPropertyPortSpeed1GigabitKey -@discussion This key defines the value of 1 Gigabit for the key -kIOPropertyPortSpeedKey. If the speed of the port is 1 Gigabit -per second and is not automatically determined (i.e. the user -configured the port to be exactly this speed), -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>1 Gigabit</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeed1GigabitKey "1 Gigabit" - -/*! -@defined kIOPropertyPortSpeed1_5GigabitKey -@discussion This key defines the value of 1.5 Gigabit for the key -kIOPropertyPortSpeedKey. If the speed of the port is 1.5 Gigabits -per second and is not automatically determined (i.e. the user -configured the port to be exactly this speed), -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>1.5 Gigabit</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeed1_5GigabitKey "1.5 Gigabit" - - -/*! -@defined kIOPropertyPortSpeed2GigabitKey -@discussion This key defines the value of 2 Gigabit for the key -kIOPropertyPortSpeedKey. If the speed of the port is 2 Gigabits -per second and is not automatically determined (i.e. the user -configured the port to be exactly this speed), -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>2 Gigabit</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeed2GigabitKey "2 Gigabit" - - -/*! -@defined kIOPropertyPortSpeed3GigabitKey -@discussion This key defines the value of 3 Gigabit for the key -kIOPropertyPortSpeedKey. If the speed of the port is 3 Gigabits -per second and is not automatically determined (i.e. the user -configured the port to be exactly this speed), -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>3 Gigabit</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeed3GigabitKey "3 Gigabit" - - -/*! -@defined kIOPropertyPortSpeed4GigabitKey -@discussion This key defines the value of 4 Gigabit for the key -kIOPropertyPortSpeedKey. If the speed of the port is 4 Gigabits -per second and is not automatically determined (i.e. the user -configured the port to be exactly this speed), -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>4 Gigabit</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeed4GigabitKey "4 Gigabit" - -/*! -@defined kIOPropertyPortSpeed6GigabitKey -@discussion This key defines the value of 6 Gigabit for the key -kIOPropertyPortSpeedKey. If the speed of the port is 6 Gigabits -per second and is not automatically determined (i.e. the user -configured the port to be exactly this speed), -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>6 Gigabit</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeed6GigabitKey "6 Gigabit" - - -/*! -@defined kIOPropertyPortSpeed8GigabitKey -@discussion This key defines the value of 8 Gigabit for the key -kIOPropertyPortSpeedKey. If the speed of the port is 8 Gigabits -per second and is not automatically determined (i.e. the user -configured the port to be exactly this speed), -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>8 Gigabit</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeed8GigabitKey "8 Gigabit" - - -/*! -@defined kIOPropertyPortSpeed10GigabitKey -@discussion This key defines the value of 10 Gigabit for the key -kIOPropertyPortSpeedKey. If the speed of the port is 10 Gigabits -per second and is not automatically determined (i.e. the user -configured the port to be exactly this speed), -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>10 Gigabit</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeed10GigabitKey "10 Gigabit" - - -/*! -@defined kIOPropertyPortSpeedAutomatic1GigabitKey -@discussion This key defines the value of Automatic (1 Gigabit) -for the key kIOPropertyPortSpeedKey. If the speed of the port is -1 Gigabit per second and is automatically determined by host -software, this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (1 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomatic1GigabitKey "Automatic (1 Gigabit)" - - -/*! -@defined kIOPropertyPortSpeedAutomatic1_5GigabitKey -@discussion This key defines the value of Automatic (1.5 Gigabit) for the key -kIOPropertyPortSpeedKey. If the speed of the port is -1.5 Gigabits per second and is automatically determined by host -software, this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (1.5 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomatic1_5GigabitKey "Automatic (1.5 Gigabit)" - - -/*! -@defined kIOPropertyPortSpeedAutomatic2GigabitKey -@discussion This key defines the value of Automatic (2 Gigabit) -for the key kIOPropertyPortSpeedKey. If the speed of the port is -2 Gigabits per second and is automatically determined by host -software, this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (2 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomatic2GigabitKey "Automatic (2 Gigabit)" - - -/*! -@defined kIOPropertyPortSpeedAutomatic3GigabitKey -@discussion This key defines the value of Automatic (3 Gigabit) -for the key kIOPropertyPortSpeedKey. If the speed of the port is -3 Gigabits per second and is automatically determined by host -software, this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (3 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomatic3GigabitKey "Automatic (3 Gigabit)" - - -/*! -@defined kIOPropertyPortSpeedAutomatic4GigabitKey -@discussion This key defines the value of Automatic (4 Gigabit) -for the key kIOPropertyPortSpeedKey. If the speed of the port is -4 Gigabits per second and is automatically determined by host -software, this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (4 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomatic4GigabitKey "Automatic (4 Gigabit)" - - -/*! -@defined kIOPropertyPortSpeedAutomatic6GigabitKey -@discussion This key defines the value of Automatic (6 Gigabit) -for the key kIOPropertyPortSpeedKey. If the speed of the port is -6 Gigabits per second and is automatically determined by host -software, this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (6 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomatic6GigabitKey "Automatic (6 Gigabit)" - - -/*! -@defined kIOPropertyPortSpeedAutomatic8GigabitKey -@discussion This key defines the value of Automatic (8 Gigabit) -for the key kIOPropertyPortSpeedKey. If the speed of the port is -8 Gigabits per second and is automatically determined by host -software, this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (8 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomatic8GigabitKey "Automatic (8 Gigabit)" - - -/*! -@defined kIOPropertyPortSpeedAutomatic10GigabitKey -@discussion This key defines the value of Automatic (10 Gigabit) -for the key kIOPropertyPortSpeedKey. If the speed of the port is -10 Gigabits per second and is automatically determined by host -software, this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Speed</key> - <string>Automatic (10 Gigabit)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortSpeedAutomatic10GigabitKey "Automatic (10 Gigabit)" - - -/*! -@defined kIOPropertyPortTopologyAutomaticKey -@discussion This key defines the value of Automatic for the key -kIOPropertyPortTopologyKey. If the topology of the port is automatically -adjusted by the host/device and a definitive topology is not known, -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Topology</key> - <string>Automatic</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortTopologyAutomaticKey "Automatic" - - -/*! -@defined kIOPropertyPortTopologyNPortKey -@discussion This key defines the value of N_Port for the key -kIOPropertyPortTopologyKey. If the topology of the port is an N_Port, -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Topology</key> - <string>N_Port</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortTopologyNPortKey "N_Port" - - -/*! -@defined kIOPropertyPortTopologyNLPortKey -@discussion This key defines the value of NL_Port for the key -kIOPropertyPortTopologyKey. If the topology of the port is an NL_Port, -this key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Topology</key> - <string>NL_Port</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortTopologyNLPortKey "NL_Port" - - -/*! -@defined kIOPropertyPortTopologyAutomaticNPortKey -@discussion This key defines the value of Automatic (N_Port) for the key -kIOPropertyPortTopologyKey. If the topology of the port is -N_Port and is automatically determined by host software, this -key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Topology</key> - <string>Automatic (N_Port)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortTopologyAutomaticNPortKey "Automatic (N_Port)" - - -/*! -@defined kIOPropertyPortTopologyAutomaticNLPortKey -@discussion This key defines the value of Automatic (NL_Port) for the key -kIOPropertyPortTopologyKey. If the topology of the port is -NL_Port and is automatically determined by host software, this -key should be used. - -Note: This value can change. It is not a static value. - -Requirement: Optional for any interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Port Topology</key> - <string>Automatic (NL_Port)</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyPortTopologyAutomaticNLPortKey "Automatic (NL_Port)" - - -/*! -@defined kIOPropertySCSIParallelSignalingTypeHVDKey -@discussion This key defines the value of High Voltage Differential for the key -kIOPropertySCSIParallelSignalingTypeKey. If the signaling type of the port is -High Voltage Differential, this key should be used. - -Requirement: Optional for SCSI Parallel Interface interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>SCSI Parallel Signaling Type</key> - <string>High Voltage Differential</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSIParallelSignalingTypeHVDKey "High Voltage Differential" - - -/*! -@defined kIOPropertySCSIParallelSignalingTypeLVDKey -@discussion This key defines the value of Low Voltage Differential for the key -kIOPropertySCSIParallelSignalingTypeKey. If the signaling type of the port is -Low Voltage Differential, this key should be used. - -Requirement: Optional for SCSI Parallel Interface interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>SCSI Parallel Signaling Type</key> - <string>Low Voltage Differential</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSIParallelSignalingTypeLVDKey "Low Voltage Differential" - - -/*! -@defined kIOPropertySCSIParallelSignalingTypeSEKey -@discussion This key defines the value of Single Ended for the key -kIOPropertySCSIParallelSignalingTypeKey. If the signaling type of the port is -Single Ended, this key should be used. - -Requirement: Optional for SCSI Parallel Interface interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>SCSI Parallel Signaling Type</key> - <string>Single Ended</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertySCSIParallelSignalingTypeSEKey "Single Ended" - - -/*! -@defined kIOPropertyFibreChannelCableDescriptionCopperKey -@discussion This key defines the value of Copper for the key -kIOPropertyFibreChannelCableDescriptionKey. If the cabling is -Copper, this key should be used. - -Requirement: Optional for Fibre Channel Interface interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Fibre Channel Cabling Type</key> - <string>Copper</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyFibreChannelCableDescriptionCopperKey "Copper" - - -/*! -@defined kIOPropertyFibreChannelCableDescriptionFiberOpticKey -@discussion This key defines the value of Fiber Optic for the key -kIOPropertyFibreChannelCableDescriptionKey. If the cabling is -Fiber Optic, this key should be used. - -Requirement: Optional for Fibre Channel Interface interconnect. - -Example: -<pre> -@textblock -<dict> - <key>Controller Characteristics</key> - <dict> - <key>Fibre Channel Cabling Type</key> - <string>Fiber Optic</string> - </dict> -</dict> -@/textblock -</pre> -*/ -#define kIOPropertyFibreChannelCableDescriptionFiberOpticKey "Fiber Optic" - - -#endif /* _IOKIT_IO_STORAGE_PROTOCOL_CHARACTERISTICS_H_ */ diff --git a/i386/include/IOKit/storage/ata/.svn/all-wcprops b/i386/include/IOKit/storage/ata/.svn/all-wcprops deleted file mode 100644 index 730c632..0000000 --- a/i386/include/IOKit/storage/ata/.svn/all-wcprops +++ /dev/null @@ -1,17 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 64 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/ata -END -IOATAStorageDefines.h -K 25 -svn:wc:ra_dav:version-url -V 86 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/ata/IOATAStorageDefines.h -END -IOATAPIProtocolTransport.h -K 25 -svn:wc:ra_dav:version-url -V 91 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/storage/ata/IOATAPIProtocolTransport.h -END diff --git a/i386/include/IOKit/storage/ata/.svn/entries b/i386/include/IOKit/storage/ata/.svn/entries deleted file mode 100644 index dc54b6f..0000000 --- a/i386/include/IOKit/storage/ata/.svn/entries +++ /dev/null @@ -1,96 +0,0 @@ -10 - -dir -2117 -http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/storage/ata -http://forge.voodooprojects.org/svn/chameleon - - - -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - -b5af796a-00a8-11df-919b-ffff7a100b7d - -IOATAStorageDefines.h -file - - - - -2012-10-03T17:50:20.000000Z -2636f67bb1c6a3bf217e724e581bbc77 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -9421 - -IOATAPIProtocolTransport.h -file - - - - -2012-10-03T17:50:20.000000Z -216442f064c65df79d52e27fa6006097 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -14901 - diff --git a/i386/include/IOKit/storage/ata/.svn/text-base/IOATAPIProtocolTransport.h.svn-base b/i386/include/IOKit/storage/ata/.svn/text-base/IOATAPIProtocolTransport.h.svn-base deleted file mode 100644 index 3356ae7..0000000 --- a/i386/include/IOKit/storage/ata/.svn/text-base/IOATAPIProtocolTransport.h.svn-base +++ /dev/null @@ -1,365 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - @header IOATAPIProtocolTransport - Contains the class definition for IOATAPIProtocolTransport. -*/ - - -#ifndef _IOKIT_IO_ATAPI_PROTOCOL_TRANSPORT_H_ -#define _IOKIT_IO_ATAPI_PROTOCOL_TRANSPORT_H_ - -#define kIOPropertyATAPIMassStorageCharacteristics "ATAPI Mass Storage Characteristics" - -#if defined(KERNEL) && defined(__cplusplus) - -/* General IOKit includes */ -#include <IOKit/IOLib.h> -#include <IOKit/IOMessage.h> -#include <IOKit/IOService.h> -#include <IOKit/IOCommandPool.h> - -/* IOKit ATA Family includes */ -#include <IOKit/ata/IOATADevice.h> -#include <IOKit/ata/IOATATypes.h> - -/* IOKit ATA Storage includes */ -#include <IOKit/storage/ata/IOATAStorageDefines.h> - -/* SCSI Architecture Model Family includes */ -#include <IOKit/scsi/IOSCSIProtocolServices.h> - -// Forward class declaration -class IOATAPIProtocolTransport; - -/*! - @typedef ATAPIClientData - @param cmd IOATACommand for request. - @param self Pointer to the object. - @param scsiTask SCSITaskIdentifier of request. - @discussion This structure is stuffed into the refcon so we can associate which - IOATACommand and SCSITaskIdentifier is completing. -*/ - -struct ATAPIClientData -{ - IOATACommand * cmd; - IOATAPIProtocolTransport * self; - SCSITaskIdentifier scsiTask; -}; -typedef struct ATAPIClientData ATAPIClientData; - - -/*! - @class IOATAPIProtocolTransport - @abstract SCSI Protocol Driver Family for ATAPI Devices. - @discussion IOATAPIProtocolTransport contains all the bus specific support for ATAPI compliant devices. - To add vendor specific features or workarounds you will sub-class the appropriate - methods of this family. -*/ - -class IOATAPIProtocolTransport : public IOSCSIProtocolServices -{ - - OSDeclareDefaultStructors ( IOATAPIProtocolTransport ) - -public: - - // ---- IOService methods overridden ---- - - bool init ( OSDictionary * propTable ); - - // The start method is called to start our services. If the device - // can be controlled by this object, then we return true, else we - // return false. start() is usually used to allocate resources once - // it is determined that the device can be controlled by this object. - virtual bool start ( IOService * provider ); - - // The stop method is called to stop our services. It is primarily - // called for deallocation of resources. - virtual void stop ( IOService * provider ); - - // This method is our last chance to free all resources allocated. - virtual void free ( void ); - - -protected: - - // ---- member variables ---- - - IOATADevice * fATADevice; - ataUnitID fATAUnitID; - ataDeviceType fATADeviceType; - ataSocketType fATASocketType; - atapiConfig fATAPIPacketConfig; - UInt8 fPIOMode; - UInt8 fDMAMode; - UInt8 fUltraDMAMode; - IOCommandGate * fCommandGate; - IOCommandPool * fCommandPool; - IOATACommand * fResetCommand; - IOATACommand * fConfigCommand; - IOATACommand * fIdentifyCommand; - char fRevision[kSizeOfATARevisionString + 1]; - char fModel[kSizeOfATAModelString + 1]; - bool fWakeUpResetOccurred; - bool fPhysicallyConnected; - - // Used for low-power polling support - thread_call_t fPollingThread; - - UInt16 fDeviceIdentifyData[256]; - IOMemoryDescriptor * fDeviceIdentifyBuffer; - bool fResetInProgress; - - // Binary Compatibility instance variable expansion - struct ExpansionData - { - UInt32 fSemaphore; - UInt32 fMediaNotifyValue; - }; - ExpansionData * reserved; - - // ---- IOService methods overridden ---- - - // The message method is used to listen to messages from our provider, the ATA controller. - // It sends messages for bus reset notifications and for device removal (such as MediaBay, - // PC card, etc.) - virtual IOReturn message ( UInt32 type, IOService * provider, void * argument = 0 ); - - // ---- Protocol transport methods overridden ---- - - // Send a SCSI Command to the device. If the command was sent to the - // device and is pending completion, the subclass should return true and - // return back the kSCSIServiceResponse_Request_In_Process response. - // If the command completes immediately with an error, the subclass will - // return true and return back the appropriate status. - // if the subclass is currently processing all the commands it can, the - // subclass will return false and the command will be resent next time - // CommandCompleted is called. - virtual bool SendSCSICommand ( SCSITaskIdentifier request, - SCSIServiceResponse * serviceResponse, - SCSITaskStatus * taskStatus ); - - // This is a stub - not implemented in upper layer yet. Eventually, there - // will be a way to abort a task or task set and this method will be called. - // It will abort any commands which have not been executed by the ATA controller - virtual SCSIServiceResponse AbortSCSICommand ( SCSITaskIdentifier request ); - - // The IsProtocolServiceSupported method will return true if the protocol - // layer supports the specified feature. - virtual bool IsProtocolServiceSupported ( SCSIProtocolFeature feature, void * serviceValue ); - - // The HandleProtocolServiceFeature method will return true if the protocol - // layer properly handled the specified feature. - virtual bool HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void * serviceValue ); - - // ------ Power Management Support ------ - - // The HandlePowerOff method is called to do any bus specific activity - // necessary before shutting down and going to sleep. - virtual IOReturn HandlePowerOff ( void ); - - // The HandlePowerOn method is called to do any bus specific activity - // necessary to recover from power-on/wake from sleep (e.g. device reset on ATAPI) - virtual IOReturn HandlePowerOn ( void ); - - - // ---- Methods defined by this class ---- - - // Static callback proc for all SCSITask objects, it calls through to - // SCSITaskCallbackFunction. - static void sSCSITaskCallbackProc ( IOATACommand * cmd ); - - // Callback proc for synchronous ATA only type commands. - static void sATACallbackSync ( IOATACommand * cmd ); - - // Callback proc for asynchronous ATAPI resets. - static void sATAPIResetCallback ( IOATACommand * cmd ); - - // Callback proc that does nothing. - static void sATAPIVoidCallback ( IOATACommand * cmd ); - - // State machine for device configuration. - static void sATAPIConfigStateMachine ( IOATACommand * cmd ); - - // Used for low-power polling. - static void sPollStatusRegister ( void * xptDriver, void * refCon ); - - // Static callback for low-power polling. - static void sPollStatusRegisterCallback ( IOATACommand * cmd ); - - // This method is called by the SCSITaskCallbackFunction and it calls the - // inherited CommandCompleted message with the results of the task. - virtual void CompleteSCSITask ( SCSITaskIdentifier scsiTask, - SCSIServiceResponse serviceResponse, - SCSITaskStatus taskStatus ); - - // The SCSITaskCallbackFunction method is called by the static callback procedure - // to complete SCSITask operations. This method may be subclassed if a device - // workaround is necessary. - virtual void SCSITaskCallbackFunction ( IOATACommand * cmd, - SCSITaskIdentifier scsiTask ); - - // The ReportATAPIDeviceType method returns the ataDeviceType for ATAPI - virtual ataDeviceType ReportATAPIDeviceType ( void ) const; - - // The InspectDevice method is called to inspect the ATA device and verify - // that it is a device which can be controlled by this object - virtual bool InspectDevice ( IOATADevice * ataDevice ); - - // The AllocateATACommandObjects method is called to allocate a pool of - // IOATACommands for general purpose I/O usage. - virtual void AllocateATACommandObjects ( void ); - - // The DeallocateATACommandObjects method is called to deallocate a pool of - // IOATACommands for general purpose I/O usage. - virtual void DeallocateATACommandObjects ( void ); - - // The GetATACommandObject method is called to retrieve a command from - // the pool. Pass true to allow the method to sleep waiting for a command, - // else pass false. If false is passed, there is NO guarantee that a valid - // command will be returned. If true is passed, it IS guaranteed that a - // valid command will be returned, but the thread may be slept waiting for - // those resources. - virtual IOATACommand * GetATACommandObject ( bool okToSleep = true ); - - // The ReturnATACommandObject method is called to return a command to - // the pool. - virtual void ReturnATACommandObject ( IOATACommand * cmd ); - - // The sSwapBytes16 method is used to word-swap the Device Identify data - // on big endian systems. Since all identify data is returned in little endian - // values, it must be word-swapped before inspected. - static void sSwapBytes16 ( UInt8 * buffer, IOByteCount numBytesToSwap ); - - // The sConvertHighestBitToNumber method is used to find the highest bit in a - // word and return a numeric value. This is used to find the highest possible - // values for PIO, DMA, and UltraDMA transfer modes. - static UInt8 sConvertHighestBitToNumber ( UInt16 bitField ); - - // The sSetWakeupResetOccurred method is used to safely set member variables - // behind the command gate. - static void sSetWakeupResetOccurred ( IOATAPIProtocolTransport * driver, - bool resetOccurred ); - - // The sCheckWakeupResetOccur method is used to safely check member variables - // behind the command gate. - static void sCheckWakeupResetOccurred ( IOATAPIProtocolTransport * driver, - bool * resetOccurred ); - - // The DidWakeupResetOccur method is used to safely find out if a reset - // occurred while we were asleep. - virtual bool CheckWakeupResetOccurred ( void ); - - // The WakeupResetOccurred method is used to safely set/clear the reset flag. - virtual void SetWakeupResetOccurred ( bool resetOccurred ); - - // The SetPIOTransferMode method is used to set the programmed input-output (PIO) - // transfer mode. The highest value reported by the device is used. - virtual IOReturn SetPIOTransferMode ( IOATACommand * cmd, bool forceSync ); - - // The SetDMATransferMode method is used to set the direct memory access (DMA) - // transfer mode. The highest value reported by the device is used. - virtual IOReturn SetDMATransferMode ( IOATACommand * cmd, bool forceSync ); - - // The IdentifyAndConfigureATAPIDevice method is called to correctly identify - // and configure an ATAPI device. - virtual IOReturn IdentifyAndConfigureATAPIDevice ( void ); - - // The ConfigureATAPIDevice method is called to correctly configure the ATAPI - // device. It currently configures any PIO/DMA/UDMA transfer modes but may be - // expanded in the future. - virtual IOReturn ConfigureATAPIDevice ( void ); - - // The ReconfigureATAPIDevice method is called to correctly reconfigure the ATAPI - // device after a reset event has occurred (bus reset or device reset). It - // currently reconfigures any PIO/DMA/UDMA transfer modes but may be expanded in - // the future. - virtual IOReturn ReconfigureATAPIDevice ( void ); - - // The IdentifyATAPIDevice method is called to correctly identify the ATAPI - // device. It currently issues the Identify ATAPI Device packet command and - // uses the data to correctly configure the device. - virtual IOReturn IdentifyATAPIDevice ( void ); - - // The ResetATAPIDevice method is called to issue a Device Reset (also known - // as a SOFT RESET). This method will only reset the specified device on the - // bus. - virtual IOReturn ResetATAPIDevice ( void ); - - // The SendATASleepCommand method is called to put an ATAPI drive in sleep - // mode. - virtual IOReturn SendATASleepCommand ( void ); - - // The EnablePollingOfStatusRegister method is called to set up a timer for - // the call to PollStatusRegister. It is called when the SCSI Application Layer - // driver wants to enable low-power polling and after a poll which does not - // see a change in the register status. - virtual void EnablePollingOfStatusRegister ( void ); - - // The DisablePollingOfStatusRegister method is called to cancel any thread - // call which is doing a poll and drop the retain count on the object. - virtual void DisablePollingOfStatusRegister ( void ); - - // The PollStatusRegister method is used to do low-power polling on drives which - // support it. This feature is enabled by the SCSI Application Layer driver. - virtual void PollStatusRegister ( void * refCon ); - - // Callback method for the polling of the status register. - virtual void PollStatusRegisterCallback ( IOATACommand * cmd ); - - // The TurnDrivePowerOff method is called to turn power to the drive OFF - IOReturn TurnDrivePowerOff ( void ); - - IOReturn SendCommand ( IOATACommand * cmd ); - IOReturn GatedWaitForRequest ( void * data ); - -private: - - // Binary Compatibility reserved method space - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 1 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 2 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 3 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 4 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 5 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 6 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 7 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 8 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 9 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 10 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 11 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 12 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 13 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 14 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 15 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 16 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_ATAPI_PROTOCOL_TRANSPORT_H_ */ \ No newline at end of file diff --git a/i386/include/IOKit/storage/ata/.svn/text-base/IOATAStorageDefines.h.svn-base b/i386/include/IOKit/storage/ata/.svn/text-base/IOATAStorageDefines.h.svn-base deleted file mode 100644 index fdac8b3..0000000 --- a/i386/include/IOKit/storage/ata/.svn/text-base/IOATAStorageDefines.h.svn-base +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright (c) 1998-2007 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IO_ATA_STORAGE_DEFINES_H_ -#define _IOKIT_IO_ATA_STORAGE_DEFINES_H_ - -#include <stdint.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Important word offsets in device identify data as - * defined in ATA-5 standard - */ - -enum -{ - kATAIdentifyConfiguration = 0, - kATAIdentifyLogicalCylinderCount = 1, - kATAIdentifyLogicalHeadCount = 3, - kATAIdentifySectorsPerTrack = 6, - kATAIdentifySerialNumber = 10, - kATAIdentifyFirmwareRevision = 23, - kATAIdentifyModelNumber = 27, - kATAIdentifyMultipleSectorCount = 47, - kATAIdentifyDriveCapabilities = 49, - kATAIdentifyDriveCapabilitiesExtended = 50, - kATAIdentifyPIOTiming = 51, - kATAIdentifyExtendedInfoSupport = 53, - kATAIdentifyCurrentCylinders = 54, - kATAIdentifyCurrentHeads = 55, - kATAIdentifyCurrentSectors = 56, - kATAIdentifyCurrentCapacity = 57, - kATAIdentifyCurrentMultipleSectors = 59, - kATAIdentifyLBACapacity = 60, - kATAIdentifySingleWordDMA = 62, - kATAIdentifyMultiWordDMA = 63, - kATAIdentifyAdvancedPIOModes = 64, - kATAIdentifyMinMultiWordDMATime = 65, - kATAIdentifyRecommendedMultiWordDMATime = 66, - kATAIdentifyMinPIOTime = 67, - kATAIdentifyMinPIOTimeWithIORDY = 68, - kATAIdentifyQueueDepth = 75, - kATAIdentifyMajorVersion = 80, - kATAIdentifyMinorVersion = 81, - kATAIdentifyCommandSetSupported = 82, - kATAIdentifyCommandSetSupported2 = 83, - kATAIdentifyCommandExtension1 = 84, - kATAIdentifyCommandExtension2 = 85, - kATAIdentifyCommandsEnabled = 86, - kATAIdentifyCommandsDefault = 87, - kATAIdentifyUltraDMASupported = 88, - kATAIdentifyPhysicalLogicalSectorSize = 106, - kATAIdentifyWordsPerLogicalSector1 = 117, - kATAIdentifyWordsPerLogicalSector2 = 118, - kATAIdentifyLogicalSectorAlignment = 209, - kATAIdentifyIntegrity = 255 -}; - - -/* - * Important bits in device identify data - * as defined in ATA-5 standard - */ - -enum -{ - // Configuration field (word 0) - kFixedDeviceBit = 6, // Fixed disk indicator bit - kRemoveableMediaBit = 7, // Removable media indicator bit - kNonMagneticDriveBit = 15, // Non-magnetic drive indicator bit - - kFixedDeviceMask = (1 << kFixedDeviceBit), // Mask for fixed disk indicator - kRemoveableMediaMask = (1 << kRemoveableMediaBit), // Mask for removable media indicator - kNonMagneticDriveMask = (1 << kNonMagneticDriveBit), // Mask for non-magnetic drive indicator - - // Capabilities field (word 49) - kDMABit = 8, // DMA supported bit - kLBABit = 9, // LBA supported bit - kIORDYDisableBit = 10, // IORDY can be disabled bit - kIORDYBit = 11, // IORDY supported bit - kStandbyTimerBit = 13, // Standby timer supported bit - - kDMASupportedMask = (1 << kDMABit), // Mask for DMA supported - kLBASupportedMask = (1 << kLBABit), // Mask for LBA supported - kDMADisableMask = (1 << kIORDYDisableBit), // Mask for DMA supported - kIORDYSupportedMask = (1 << kIORDYBit), // Mask for IORDY supported - kStandbySupportedMask = (1 << kStandbyTimerBit), // Mask for Standby Timer supported - - // Extensions field (word 53) - kCurFieldsValidBit = 0, // Bit to show words 54-58 are valid - kExtFieldsValidBit = 1, // Bit to show words 64-70 are valid - kCurFieldsValidMask = (1 << kCurFieldsValidBit), // Mask for current fields valid - kExtFieldsValidMask = (1 << kExtFieldsValidBit), // Extension word valid - - // Advanced PIO Transfer Modes field (word 64) - kMode3Bit = 0, // Bit to indicate mode 3 is supported - kMode3Mask = (1 << kMode3Bit), // Mask for mode 3 support - - // Integrity of Identify data (word 255) - kChecksumValidCookie = 0xA5 // Bits 7:0 if device supports feature - -}; - - -/* String size constants */ -enum -{ - kSizeOfATAModelString = 40, - kSizeOfATARevisionString = 8 -}; - -/* ATA Command timeout constants ( in milliseconds ) */ -enum -{ - kATATimeout10Seconds = 10000, - kATATimeout30Seconds = 30000, - kATATimeout45Seconds = 45000, - kATATimeout1Minute = 60000, - kATADefaultTimeout = kATATimeout30Seconds -}; - - -/* Retry constants */ -enum -{ - kATAZeroRetries = 0, - kATADefaultRetries = 4 -}; - -/* max number of blocks supported in ATA transaction */ -enum -{ - kIOATASectorCount8Bit = 8, - kIOATASectorCount16Bit = 16 -}; - -enum -{ - kIOATAMaximumBlockCount8Bit = (1 << kIOATASectorCount8Bit), - kIOATAMaximumBlockCount16Bit = (1 << kIOATASectorCount16Bit), - - // For backwards compatibility - kIOATAMaxBlocksPerXfer = kIOATAMaximumBlockCount8Bit -}; - - - -/* Power Management time constants (in seconds) */ -enum -{ - kSecondsInAMinute = 60, - k5Minutes = 5 * kSecondsInAMinute -}; - -/* Bits for features published in Word 82 of device identify data */ -enum -{ - kATASupportsSMARTBit = 0, - kATASupportsPowerManagementBit = 3, - kATASupportsWriteCacheBit = 5 -}; - -/* Masks for features published in Word 82 of device identify data */ -enum -{ - kATASupportsSMARTMask = (1 << kATASupportsSMARTBit), - kATASupportsPowerManagementMask = (1 << kATASupportsPowerManagementBit), - kATASupportsWriteCacheMask = (1 << kATASupportsWriteCacheBit) -}; - -/* Bits for features published in Word 83 of device identify data */ -enum -{ - kATASupportsCompactFlashBit = 2, - kATASupportsAdvancedPowerManagementBit = 3, - - kATASupports48BitAddressingBit = 10, - - kATASupportsFlushCacheBit = 12, - kATASupportsFlushCacheExtendedBit = 13 -}; - -/* Masks for features published in Word 83 of device identify data */ -enum -{ - kATASupportsCompactFlashMask = (1 << kATASupportsCompactFlashBit), - kATASupportsAdvancedPowerManagementMask = (1 << kATASupportsAdvancedPowerManagementBit), - - kATASupports48BitAddressingMask = (1 << kATASupports48BitAddressingBit), - - kATASupportsFlushCacheMask = (1 << kATASupportsFlushCacheBit), - kATASupportsFlushCacheExtendedMask = (1 << kATASupportsFlushCacheExtendedBit), - - // Mask to ensure data is valid - kIdentifyWordValidationMask = 0xC000, - kIdentifyWordValid = 0x4000 -}; - -/* Bits for features published in Word 84 of device identify data */ -enum -{ - kATAForceUnitAccessFeatureBit = 6, -}; - -/* Masks for features published in Word 84 of device identify data */ -enum -{ - kATAForceUnitAccessFeatureMask = (1 << kATAForceUnitAccessFeatureBit), -}; - -/* Bits for features published in Word 85 of device identify data */ -enum -{ - kATAWriteCacheEnabledBit = 5 -}; - -/* Masks for features published in Word 85 of device identify data */ -enum -{ - kATAWriteCacheEnabledMask = (1 << kATAWriteCacheEnabledBit) -}; - - -/* Bits for features published in Word 106 of device identify data */ -enum -{ - kATAPhysicalLogicalEnabledBit0 = 15, - kATAPhysicalLogicalEnabledBit1 = 14, - kATAMultipleLogicalSectorsBit = 13, - kATAValidLogicalSectorSizeBit = 12 -}; - -/* Masks for features published in Word 106 of device identify data */ -enum -{ - kATAPhysicalLogicalEnabledMask = (1 << kATAPhysicalLogicalEnabledBit0) | (1 << kATAPhysicalLogicalEnabledBit1), - kATAPhysicalLogicalEnabledValue = (0 << kATAPhysicalLogicalEnabledBit0) | (1 << kATAPhysicalLogicalEnabledBit1), - kATAMultipleLogicalSectorsMask = (1 << kATAMultipleLogicalSectorsBit), - kATAValidLogicalSectorSizeMask = (1 << kATAValidLogicalSectorSizeBit), - kATAPhysicalSectorSizeMask = 0xF, - kATALogicalSectorAlignmentMask = 0x3FFF -}; - -// Property table keys -#define kIOATASupportedFeaturesKey "ATA Features" - -/* ATA supported features */ -enum -{ - kIOATAFeaturePowerManagement = 0x01, /* OBSOLETE */ - kIOATAFeatureWriteCache = 0x02, /* OBSOLETE */ - kIOATAFeatureAdvancedPowerManagement = 0x04, - kIOATAFeatureCompactFlash = 0x08, - kIOATAFeature48BitLBA = 0x10, - kIOATAFeatureSMART = 0x20 -}; - -/* ATA Advanced Power Management settings (valid settings range from 1-254), -the settings below are the more common settings */ -enum -{ - kIOATAMaxPerformance = 0xFE, - kIOATADefaultPerformance = 0x80, - kIOATAMaxPowerSavings = 0x01 -}; - -/* ATA Transfer Mode bit masks */ -enum -{ - kATAEnableUltraDMAModeMask = 0x40, - kATAEnableMultiWordDMAModeMask = 0x20, - kATAEnablePIOModeMask = 0x08 -}; - - -typedef uint32_t ATAOperationType; -enum -{ - kATAOperationTypeRead = 0, - kATAOperationTypeWrite = 1, - kATAOperationTypeFlushCache = 2, - kATAOperationTypeSMART = 3, - kATAOperationTypeConfiguration = 4, - kATAOperationTypePowerManagement = 5, - kATAOperationTypeSMS = 6 -}; - -#if defined(KERNEL) - -typedef struct __ATAIORequest * ATARequestIdentifier; - -#endif // defined(KERNEL) - -#ifdef __cplusplus -} -#endif - -#endif /* _IOKIT_IO_ATA_STORAGE_DEFINES_H_ */ diff --git a/i386/include/IOKit/storage/ata/IOATAPIProtocolTransport.h b/i386/include/IOKit/storage/ata/IOATAPIProtocolTransport.h deleted file mode 100644 index 3356ae7..0000000 --- a/i386/include/IOKit/storage/ata/IOATAPIProtocolTransport.h +++ /dev/null @@ -1,365 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/*! - @header IOATAPIProtocolTransport - Contains the class definition for IOATAPIProtocolTransport. -*/ - - -#ifndef _IOKIT_IO_ATAPI_PROTOCOL_TRANSPORT_H_ -#define _IOKIT_IO_ATAPI_PROTOCOL_TRANSPORT_H_ - -#define kIOPropertyATAPIMassStorageCharacteristics "ATAPI Mass Storage Characteristics" - -#if defined(KERNEL) && defined(__cplusplus) - -/* General IOKit includes */ -#include <IOKit/IOLib.h> -#include <IOKit/IOMessage.h> -#include <IOKit/IOService.h> -#include <IOKit/IOCommandPool.h> - -/* IOKit ATA Family includes */ -#include <IOKit/ata/IOATADevice.h> -#include <IOKit/ata/IOATATypes.h> - -/* IOKit ATA Storage includes */ -#include <IOKit/storage/ata/IOATAStorageDefines.h> - -/* SCSI Architecture Model Family includes */ -#include <IOKit/scsi/IOSCSIProtocolServices.h> - -// Forward class declaration -class IOATAPIProtocolTransport; - -/*! - @typedef ATAPIClientData - @param cmd IOATACommand for request. - @param self Pointer to the object. - @param scsiTask SCSITaskIdentifier of request. - @discussion This structure is stuffed into the refcon so we can associate which - IOATACommand and SCSITaskIdentifier is completing. -*/ - -struct ATAPIClientData -{ - IOATACommand * cmd; - IOATAPIProtocolTransport * self; - SCSITaskIdentifier scsiTask; -}; -typedef struct ATAPIClientData ATAPIClientData; - - -/*! - @class IOATAPIProtocolTransport - @abstract SCSI Protocol Driver Family for ATAPI Devices. - @discussion IOATAPIProtocolTransport contains all the bus specific support for ATAPI compliant devices. - To add vendor specific features or workarounds you will sub-class the appropriate - methods of this family. -*/ - -class IOATAPIProtocolTransport : public IOSCSIProtocolServices -{ - - OSDeclareDefaultStructors ( IOATAPIProtocolTransport ) - -public: - - // ---- IOService methods overridden ---- - - bool init ( OSDictionary * propTable ); - - // The start method is called to start our services. If the device - // can be controlled by this object, then we return true, else we - // return false. start() is usually used to allocate resources once - // it is determined that the device can be controlled by this object. - virtual bool start ( IOService * provider ); - - // The stop method is called to stop our services. It is primarily - // called for deallocation of resources. - virtual void stop ( IOService * provider ); - - // This method is our last chance to free all resources allocated. - virtual void free ( void ); - - -protected: - - // ---- member variables ---- - - IOATADevice * fATADevice; - ataUnitID fATAUnitID; - ataDeviceType fATADeviceType; - ataSocketType fATASocketType; - atapiConfig fATAPIPacketConfig; - UInt8 fPIOMode; - UInt8 fDMAMode; - UInt8 fUltraDMAMode; - IOCommandGate * fCommandGate; - IOCommandPool * fCommandPool; - IOATACommand * fResetCommand; - IOATACommand * fConfigCommand; - IOATACommand * fIdentifyCommand; - char fRevision[kSizeOfATARevisionString + 1]; - char fModel[kSizeOfATAModelString + 1]; - bool fWakeUpResetOccurred; - bool fPhysicallyConnected; - - // Used for low-power polling support - thread_call_t fPollingThread; - - UInt16 fDeviceIdentifyData[256]; - IOMemoryDescriptor * fDeviceIdentifyBuffer; - bool fResetInProgress; - - // Binary Compatibility instance variable expansion - struct ExpansionData - { - UInt32 fSemaphore; - UInt32 fMediaNotifyValue; - }; - ExpansionData * reserved; - - // ---- IOService methods overridden ---- - - // The message method is used to listen to messages from our provider, the ATA controller. - // It sends messages for bus reset notifications and for device removal (such as MediaBay, - // PC card, etc.) - virtual IOReturn message ( UInt32 type, IOService * provider, void * argument = 0 ); - - // ---- Protocol transport methods overridden ---- - - // Send a SCSI Command to the device. If the command was sent to the - // device and is pending completion, the subclass should return true and - // return back the kSCSIServiceResponse_Request_In_Process response. - // If the command completes immediately with an error, the subclass will - // return true and return back the appropriate status. - // if the subclass is currently processing all the commands it can, the - // subclass will return false and the command will be resent next time - // CommandCompleted is called. - virtual bool SendSCSICommand ( SCSITaskIdentifier request, - SCSIServiceResponse * serviceResponse, - SCSITaskStatus * taskStatus ); - - // This is a stub - not implemented in upper layer yet. Eventually, there - // will be a way to abort a task or task set and this method will be called. - // It will abort any commands which have not been executed by the ATA controller - virtual SCSIServiceResponse AbortSCSICommand ( SCSITaskIdentifier request ); - - // The IsProtocolServiceSupported method will return true if the protocol - // layer supports the specified feature. - virtual bool IsProtocolServiceSupported ( SCSIProtocolFeature feature, void * serviceValue ); - - // The HandleProtocolServiceFeature method will return true if the protocol - // layer properly handled the specified feature. - virtual bool HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void * serviceValue ); - - // ------ Power Management Support ------ - - // The HandlePowerOff method is called to do any bus specific activity - // necessary before shutting down and going to sleep. - virtual IOReturn HandlePowerOff ( void ); - - // The HandlePowerOn method is called to do any bus specific activity - // necessary to recover from power-on/wake from sleep (e.g. device reset on ATAPI) - virtual IOReturn HandlePowerOn ( void ); - - - // ---- Methods defined by this class ---- - - // Static callback proc for all SCSITask objects, it calls through to - // SCSITaskCallbackFunction. - static void sSCSITaskCallbackProc ( IOATACommand * cmd ); - - // Callback proc for synchronous ATA only type commands. - static void sATACallbackSync ( IOATACommand * cmd ); - - // Callback proc for asynchronous ATAPI resets. - static void sATAPIResetCallback ( IOATACommand * cmd ); - - // Callback proc that does nothing. - static void sATAPIVoidCallback ( IOATACommand * cmd ); - - // State machine for device configuration. - static void sATAPIConfigStateMachine ( IOATACommand * cmd ); - - // Used for low-power polling. - static void sPollStatusRegister ( void * xptDriver, void * refCon ); - - // Static callback for low-power polling. - static void sPollStatusRegisterCallback ( IOATACommand * cmd ); - - // This method is called by the SCSITaskCallbackFunction and it calls the - // inherited CommandCompleted message with the results of the task. - virtual void CompleteSCSITask ( SCSITaskIdentifier scsiTask, - SCSIServiceResponse serviceResponse, - SCSITaskStatus taskStatus ); - - // The SCSITaskCallbackFunction method is called by the static callback procedure - // to complete SCSITask operations. This method may be subclassed if a device - // workaround is necessary. - virtual void SCSITaskCallbackFunction ( IOATACommand * cmd, - SCSITaskIdentifier scsiTask ); - - // The ReportATAPIDeviceType method returns the ataDeviceType for ATAPI - virtual ataDeviceType ReportATAPIDeviceType ( void ) const; - - // The InspectDevice method is called to inspect the ATA device and verify - // that it is a device which can be controlled by this object - virtual bool InspectDevice ( IOATADevice * ataDevice ); - - // The AllocateATACommandObjects method is called to allocate a pool of - // IOATACommands for general purpose I/O usage. - virtual void AllocateATACommandObjects ( void ); - - // The DeallocateATACommandObjects method is called to deallocate a pool of - // IOATACommands for general purpose I/O usage. - virtual void DeallocateATACommandObjects ( void ); - - // The GetATACommandObject method is called to retrieve a command from - // the pool. Pass true to allow the method to sleep waiting for a command, - // else pass false. If false is passed, there is NO guarantee that a valid - // command will be returned. If true is passed, it IS guaranteed that a - // valid command will be returned, but the thread may be slept waiting for - // those resources. - virtual IOATACommand * GetATACommandObject ( bool okToSleep = true ); - - // The ReturnATACommandObject method is called to return a command to - // the pool. - virtual void ReturnATACommandObject ( IOATACommand * cmd ); - - // The sSwapBytes16 method is used to word-swap the Device Identify data - // on big endian systems. Since all identify data is returned in little endian - // values, it must be word-swapped before inspected. - static void sSwapBytes16 ( UInt8 * buffer, IOByteCount numBytesToSwap ); - - // The sConvertHighestBitToNumber method is used to find the highest bit in a - // word and return a numeric value. This is used to find the highest possible - // values for PIO, DMA, and UltraDMA transfer modes. - static UInt8 sConvertHighestBitToNumber ( UInt16 bitField ); - - // The sSetWakeupResetOccurred method is used to safely set member variables - // behind the command gate. - static void sSetWakeupResetOccurred ( IOATAPIProtocolTransport * driver, - bool resetOccurred ); - - // The sCheckWakeupResetOccur method is used to safely check member variables - // behind the command gate. - static void sCheckWakeupResetOccurred ( IOATAPIProtocolTransport * driver, - bool * resetOccurred ); - - // The DidWakeupResetOccur method is used to safely find out if a reset - // occurred while we were asleep. - virtual bool CheckWakeupResetOccurred ( void ); - - // The WakeupResetOccurred method is used to safely set/clear the reset flag. - virtual void SetWakeupResetOccurred ( bool resetOccurred ); - - // The SetPIOTransferMode method is used to set the programmed input-output (PIO) - // transfer mode. The highest value reported by the device is used. - virtual IOReturn SetPIOTransferMode ( IOATACommand * cmd, bool forceSync ); - - // The SetDMATransferMode method is used to set the direct memory access (DMA) - // transfer mode. The highest value reported by the device is used. - virtual IOReturn SetDMATransferMode ( IOATACommand * cmd, bool forceSync ); - - // The IdentifyAndConfigureATAPIDevice method is called to correctly identify - // and configure an ATAPI device. - virtual IOReturn IdentifyAndConfigureATAPIDevice ( void ); - - // The ConfigureATAPIDevice method is called to correctly configure the ATAPI - // device. It currently configures any PIO/DMA/UDMA transfer modes but may be - // expanded in the future. - virtual IOReturn ConfigureATAPIDevice ( void ); - - // The ReconfigureATAPIDevice method is called to correctly reconfigure the ATAPI - // device after a reset event has occurred (bus reset or device reset). It - // currently reconfigures any PIO/DMA/UDMA transfer modes but may be expanded in - // the future. - virtual IOReturn ReconfigureATAPIDevice ( void ); - - // The IdentifyATAPIDevice method is called to correctly identify the ATAPI - // device. It currently issues the Identify ATAPI Device packet command and - // uses the data to correctly configure the device. - virtual IOReturn IdentifyATAPIDevice ( void ); - - // The ResetATAPIDevice method is called to issue a Device Reset (also known - // as a SOFT RESET). This method will only reset the specified device on the - // bus. - virtual IOReturn ResetATAPIDevice ( void ); - - // The SendATASleepCommand method is called to put an ATAPI drive in sleep - // mode. - virtual IOReturn SendATASleepCommand ( void ); - - // The EnablePollingOfStatusRegister method is called to set up a timer for - // the call to PollStatusRegister. It is called when the SCSI Application Layer - // driver wants to enable low-power polling and after a poll which does not - // see a change in the register status. - virtual void EnablePollingOfStatusRegister ( void ); - - // The DisablePollingOfStatusRegister method is called to cancel any thread - // call which is doing a poll and drop the retain count on the object. - virtual void DisablePollingOfStatusRegister ( void ); - - // The PollStatusRegister method is used to do low-power polling on drives which - // support it. This feature is enabled by the SCSI Application Layer driver. - virtual void PollStatusRegister ( void * refCon ); - - // Callback method for the polling of the status register. - virtual void PollStatusRegisterCallback ( IOATACommand * cmd ); - - // The TurnDrivePowerOff method is called to turn power to the drive OFF - IOReturn TurnDrivePowerOff ( void ); - - IOReturn SendCommand ( IOATACommand * cmd ); - IOReturn GatedWaitForRequest ( void * data ); - -private: - - // Binary Compatibility reserved method space - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 1 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 2 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 3 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 4 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 5 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 6 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 7 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 8 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 9 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 10 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 11 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 12 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 13 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 14 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 15 ); - OSMetaClassDeclareReservedUnused ( IOATAPIProtocolTransport, 16 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_ATAPI_PROTOCOL_TRANSPORT_H_ */ \ No newline at end of file diff --git a/i386/include/IOKit/storage/ata/IOATAStorageDefines.h b/i386/include/IOKit/storage/ata/IOATAStorageDefines.h deleted file mode 100644 index fdac8b3..0000000 --- a/i386/include/IOKit/storage/ata/IOATAStorageDefines.h +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright (c) 1998-2007 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IO_ATA_STORAGE_DEFINES_H_ -#define _IOKIT_IO_ATA_STORAGE_DEFINES_H_ - -#include <stdint.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Important word offsets in device identify data as - * defined in ATA-5 standard - */ - -enum -{ - kATAIdentifyConfiguration = 0, - kATAIdentifyLogicalCylinderCount = 1, - kATAIdentifyLogicalHeadCount = 3, - kATAIdentifySectorsPerTrack = 6, - kATAIdentifySerialNumber = 10, - kATAIdentifyFirmwareRevision = 23, - kATAIdentifyModelNumber = 27, - kATAIdentifyMultipleSectorCount = 47, - kATAIdentifyDriveCapabilities = 49, - kATAIdentifyDriveCapabilitiesExtended = 50, - kATAIdentifyPIOTiming = 51, - kATAIdentifyExtendedInfoSupport = 53, - kATAIdentifyCurrentCylinders = 54, - kATAIdentifyCurrentHeads = 55, - kATAIdentifyCurrentSectors = 56, - kATAIdentifyCurrentCapacity = 57, - kATAIdentifyCurrentMultipleSectors = 59, - kATAIdentifyLBACapacity = 60, - kATAIdentifySingleWordDMA = 62, - kATAIdentifyMultiWordDMA = 63, - kATAIdentifyAdvancedPIOModes = 64, - kATAIdentifyMinMultiWordDMATime = 65, - kATAIdentifyRecommendedMultiWordDMATime = 66, - kATAIdentifyMinPIOTime = 67, - kATAIdentifyMinPIOTimeWithIORDY = 68, - kATAIdentifyQueueDepth = 75, - kATAIdentifyMajorVersion = 80, - kATAIdentifyMinorVersion = 81, - kATAIdentifyCommandSetSupported = 82, - kATAIdentifyCommandSetSupported2 = 83, - kATAIdentifyCommandExtension1 = 84, - kATAIdentifyCommandExtension2 = 85, - kATAIdentifyCommandsEnabled = 86, - kATAIdentifyCommandsDefault = 87, - kATAIdentifyUltraDMASupported = 88, - kATAIdentifyPhysicalLogicalSectorSize = 106, - kATAIdentifyWordsPerLogicalSector1 = 117, - kATAIdentifyWordsPerLogicalSector2 = 118, - kATAIdentifyLogicalSectorAlignment = 209, - kATAIdentifyIntegrity = 255 -}; - - -/* - * Important bits in device identify data - * as defined in ATA-5 standard - */ - -enum -{ - // Configuration field (word 0) - kFixedDeviceBit = 6, // Fixed disk indicator bit - kRemoveableMediaBit = 7, // Removable media indicator bit - kNonMagneticDriveBit = 15, // Non-magnetic drive indicator bit - - kFixedDeviceMask = (1 << kFixedDeviceBit), // Mask for fixed disk indicator - kRemoveableMediaMask = (1 << kRemoveableMediaBit), // Mask for removable media indicator - kNonMagneticDriveMask = (1 << kNonMagneticDriveBit), // Mask for non-magnetic drive indicator - - // Capabilities field (word 49) - kDMABit = 8, // DMA supported bit - kLBABit = 9, // LBA supported bit - kIORDYDisableBit = 10, // IORDY can be disabled bit - kIORDYBit = 11, // IORDY supported bit - kStandbyTimerBit = 13, // Standby timer supported bit - - kDMASupportedMask = (1 << kDMABit), // Mask for DMA supported - kLBASupportedMask = (1 << kLBABit), // Mask for LBA supported - kDMADisableMask = (1 << kIORDYDisableBit), // Mask for DMA supported - kIORDYSupportedMask = (1 << kIORDYBit), // Mask for IORDY supported - kStandbySupportedMask = (1 << kStandbyTimerBit), // Mask for Standby Timer supported - - // Extensions field (word 53) - kCurFieldsValidBit = 0, // Bit to show words 54-58 are valid - kExtFieldsValidBit = 1, // Bit to show words 64-70 are valid - kCurFieldsValidMask = (1 << kCurFieldsValidBit), // Mask for current fields valid - kExtFieldsValidMask = (1 << kExtFieldsValidBit), // Extension word valid - - // Advanced PIO Transfer Modes field (word 64) - kMode3Bit = 0, // Bit to indicate mode 3 is supported - kMode3Mask = (1 << kMode3Bit), // Mask for mode 3 support - - // Integrity of Identify data (word 255) - kChecksumValidCookie = 0xA5 // Bits 7:0 if device supports feature - -}; - - -/* String size constants */ -enum -{ - kSizeOfATAModelString = 40, - kSizeOfATARevisionString = 8 -}; - -/* ATA Command timeout constants ( in milliseconds ) */ -enum -{ - kATATimeout10Seconds = 10000, - kATATimeout30Seconds = 30000, - kATATimeout45Seconds = 45000, - kATATimeout1Minute = 60000, - kATADefaultTimeout = kATATimeout30Seconds -}; - - -/* Retry constants */ -enum -{ - kATAZeroRetries = 0, - kATADefaultRetries = 4 -}; - -/* max number of blocks supported in ATA transaction */ -enum -{ - kIOATASectorCount8Bit = 8, - kIOATASectorCount16Bit = 16 -}; - -enum -{ - kIOATAMaximumBlockCount8Bit = (1 << kIOATASectorCount8Bit), - kIOATAMaximumBlockCount16Bit = (1 << kIOATASectorCount16Bit), - - // For backwards compatibility - kIOATAMaxBlocksPerXfer = kIOATAMaximumBlockCount8Bit -}; - - - -/* Power Management time constants (in seconds) */ -enum -{ - kSecondsInAMinute = 60, - k5Minutes = 5 * kSecondsInAMinute -}; - -/* Bits for features published in Word 82 of device identify data */ -enum -{ - kATASupportsSMARTBit = 0, - kATASupportsPowerManagementBit = 3, - kATASupportsWriteCacheBit = 5 -}; - -/* Masks for features published in Word 82 of device identify data */ -enum -{ - kATASupportsSMARTMask = (1 << kATASupportsSMARTBit), - kATASupportsPowerManagementMask = (1 << kATASupportsPowerManagementBit), - kATASupportsWriteCacheMask = (1 << kATASupportsWriteCacheBit) -}; - -/* Bits for features published in Word 83 of device identify data */ -enum -{ - kATASupportsCompactFlashBit = 2, - kATASupportsAdvancedPowerManagementBit = 3, - - kATASupports48BitAddressingBit = 10, - - kATASupportsFlushCacheBit = 12, - kATASupportsFlushCacheExtendedBit = 13 -}; - -/* Masks for features published in Word 83 of device identify data */ -enum -{ - kATASupportsCompactFlashMask = (1 << kATASupportsCompactFlashBit), - kATASupportsAdvancedPowerManagementMask = (1 << kATASupportsAdvancedPowerManagementBit), - - kATASupports48BitAddressingMask = (1 << kATASupports48BitAddressingBit), - - kATASupportsFlushCacheMask = (1 << kATASupportsFlushCacheBit), - kATASupportsFlushCacheExtendedMask = (1 << kATASupportsFlushCacheExtendedBit), - - // Mask to ensure data is valid - kIdentifyWordValidationMask = 0xC000, - kIdentifyWordValid = 0x4000 -}; - -/* Bits for features published in Word 84 of device identify data */ -enum -{ - kATAForceUnitAccessFeatureBit = 6, -}; - -/* Masks for features published in Word 84 of device identify data */ -enum -{ - kATAForceUnitAccessFeatureMask = (1 << kATAForceUnitAccessFeatureBit), -}; - -/* Bits for features published in Word 85 of device identify data */ -enum -{ - kATAWriteCacheEnabledBit = 5 -}; - -/* Masks for features published in Word 85 of device identify data */ -enum -{ - kATAWriteCacheEnabledMask = (1 << kATAWriteCacheEnabledBit) -}; - - -/* Bits for features published in Word 106 of device identify data */ -enum -{ - kATAPhysicalLogicalEnabledBit0 = 15, - kATAPhysicalLogicalEnabledBit1 = 14, - kATAMultipleLogicalSectorsBit = 13, - kATAValidLogicalSectorSizeBit = 12 -}; - -/* Masks for features published in Word 106 of device identify data */ -enum -{ - kATAPhysicalLogicalEnabledMask = (1 << kATAPhysicalLogicalEnabledBit0) | (1 << kATAPhysicalLogicalEnabledBit1), - kATAPhysicalLogicalEnabledValue = (0 << kATAPhysicalLogicalEnabledBit0) | (1 << kATAPhysicalLogicalEnabledBit1), - kATAMultipleLogicalSectorsMask = (1 << kATAMultipleLogicalSectorsBit), - kATAValidLogicalSectorSizeMask = (1 << kATAValidLogicalSectorSizeBit), - kATAPhysicalSectorSizeMask = 0xF, - kATALogicalSectorAlignmentMask = 0x3FFF -}; - -// Property table keys -#define kIOATASupportedFeaturesKey "ATA Features" - -/* ATA supported features */ -enum -{ - kIOATAFeaturePowerManagement = 0x01, /* OBSOLETE */ - kIOATAFeatureWriteCache = 0x02, /* OBSOLETE */ - kIOATAFeatureAdvancedPowerManagement = 0x04, - kIOATAFeatureCompactFlash = 0x08, - kIOATAFeature48BitLBA = 0x10, - kIOATAFeatureSMART = 0x20 -}; - -/* ATA Advanced Power Management settings (valid settings range from 1-254), -the settings below are the more common settings */ -enum -{ - kIOATAMaxPerformance = 0xFE, - kIOATADefaultPerformance = 0x80, - kIOATAMaxPowerSavings = 0x01 -}; - -/* ATA Transfer Mode bit masks */ -enum -{ - kATAEnableUltraDMAModeMask = 0x40, - kATAEnableMultiWordDMAModeMask = 0x20, - kATAEnablePIOModeMask = 0x08 -}; - - -typedef uint32_t ATAOperationType; -enum -{ - kATAOperationTypeRead = 0, - kATAOperationTypeWrite = 1, - kATAOperationTypeFlushCache = 2, - kATAOperationTypeSMART = 3, - kATAOperationTypeConfiguration = 4, - kATAOperationTypePowerManagement = 5, - kATAOperationTypeSMS = 6 -}; - -#if defined(KERNEL) - -typedef struct __ATAIORequest * ATARequestIdentifier; - -#endif // defined(KERNEL) - -#ifdef __cplusplus -} -#endif - -#endif /* _IOKIT_IO_ATA_STORAGE_DEFINES_H_ */ diff --git a/i386/include/IOKit/stream/.svn/all-wcprops b/i386/include/IOKit/stream/.svn/all-wcprops deleted file mode 100644 index cdf93a5..0000000 --- a/i386/include/IOKit/stream/.svn/all-wcprops +++ /dev/null @@ -1,29 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 59 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/stream -END -IOStreamShared.h -K 25 -svn:wc:ra_dav:version-url -V 76 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/stream/IOStreamShared.h -END -IOStreamUserClient.h -K 25 -svn:wc:ra_dav:version-url -V 80 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/stream/IOStreamUserClient.h -END -IOStream.h -K 25 -svn:wc:ra_dav:version-url -V 70 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/stream/IOStream.h -END -IOStreamFamily.h -K 25 -svn:wc:ra_dav:version-url -V 76 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/stream/IOStreamFamily.h -END diff --git a/i386/include/IOKit/stream/.svn/entries b/i386/include/IOKit/stream/.svn/entries deleted file mode 100644 index 1c63f86..0000000 --- a/i386/include/IOKit/stream/.svn/entries +++ /dev/null @@ -1,164 +0,0 @@ -10 - -dir -2117 -http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/stream -http://forge.voodooprojects.org/svn/chameleon - - - -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - -b5af796a-00a8-11df-919b-ffff7a100b7d - -IOStreamShared.h -file - - - - -2012-10-03T17:50:20.000000Z -925f10b148830bcae4312aa8a7ee2fea -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -4647 - -IOStreamUserClient.h -file - - - - -2012-10-03T17:50:20.000000Z -bdc9cf99229f3972604d4952b63a3aa2 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -2502 - -IOStream.h -file - - - - -2012-10-03T17:50:20.000000Z -3b670008c3567c9dc3699542b69dca37 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -21734 - -IOStreamFamily.h -file - - - - -2012-10-03T17:50:20.000000Z -f66e1be35cc893be907e91b6bc0f76e7 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -256 - diff --git a/i386/include/IOKit/stream/.svn/text-base/IOStream.h.svn-base b/i386/include/IOKit/stream/.svn/text-base/IOStream.h.svn-base deleted file mode 100644 index 01efad4..0000000 --- a/i386/include/IOKit/stream/.svn/text-base/IOStream.h.svn-base +++ /dev/null @@ -1,609 +0,0 @@ -/* - * Copyright 2006 Apple Computer, Inc. All rights reserved. - * - */ - -#if !defined(__IOKIT_IOSTREAM_H) -#define __IOKIT_IOSTREAM_H - -#include <IOKit/IOService.h> -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IOBufferMemoryDescriptor.h> -#include <IOKit/IOUserClient.h> - -#include <IOKit/stream/IOStreamShared.h> - -/*! - @header IOStream.h - Definitions for IOStream family. - */ - -class IOStreamBuffer; - -/*! - @class IOStream - @abstract - A class representing a stream of data buffers passed from kernel to - user space and back again. - @discussion - The IOStream class defines a mechanism for moving buffers of data from - kernel space to user space or vice-versa. The policy for which direction - the data flows and the nature of the data is left up the the implementer - of the driver which uses IOStream. - - Although it is expected that the client of an IOStream will be in user space, - this is not required. - - References to "output" mean "from the IOStream to the user client", and - "input" means "from the user client to the IOStream." - - */ - -class IOStream : public IOService -{ - OSDeclareDefaultStructors(IOStream); - - protected: - OSArray * _buffers; // IOStreamBuffer objects in this stream - - IOItemCount _queueCount; // Number of entries for the queues - - IOMemoryDescriptor * _inputQueueDescriptor; - IOMemoryMap * _inputQueueMap; - - IOMemoryDescriptor * _outputQueueDescriptor; - IOMemoryMap * _outputQueueMap; - - IOStreamBufferQueue * _outputQueue; // Shared memory for buffers out to user space - IOStreamBufferQueue * _inputQueue; // Shared memory for buffers in from user space - - mach_port_t _outputPort; - mach_port_t _inputPort; - - OSArray * _memoryMaps; // Maps for data queues - - IOStreamMode _streamMode; - - public: - - /*! - @functiongroup Creating IOStream objects - */ - - /*! - @function withBuffers - @param mode The initial mode of the stream, either output, input, or input/output. - @param queueLength The nuber of queue entries to reserve in the input and output queue. - Zero means to make the queues big enough to accommodate all the buffers at once. - @param properties - A dictionary of properties which will be set on the stream. - @param buffers - An array of IOStreamBuffer objects which will be the buffers for this stream. - */ - - static IOStream *withBuffers(OSArray *buffers, IOStreamMode mode = kIOStreamModeOutput, IOItemCount queueLength = 0, OSDictionary *properties = 0); - - virtual bool init(OSDictionary *properties = 0); - - /*! - @function initWithBuffers - @param mode The initial mode of the stream, either output, input, or input/output. - @param queueLength The nuber of queue entries to reserve in the input and output queue. - Zero means to make the queues big enough to accommodate all the buffers at once. - @param properties - A dictionary of properties which will be set on the stream. - @param buffers - An array of IOStreamBuffer objects which will be the buffers for this stream. - */ - virtual bool initWithBuffers(OSArray *buffers, IOStreamMode mode = kIOStreamModeOutput, IOItemCount queueLength = 0, OSDictionary *properties = 0); - - /*! - @function free - */ - virtual void free(void); - - /*! - @functiongroup Opening and closing streams - */ - - /*! - @function handleOpen - @abstract The handleOpen() method relies on the default IOService behavior - to ensure that - only one client has the stream open at a time. - The shared input and output queues are created at open time. - @param options - @param arg - */ - virtual bool handleOpen( IOService * forClient, - IOOptionBits options, - void * arg ); - - /*! - @function handleClose - @abstract The handleClose method destroys the shared input and output - queues. - @param options - */ - virtual void handleClose( IOService * forClient, - IOOptionBits options ); - - /*! - @functiongroup Managing shared queues - */ - - /*! - @function createQueues - @abstract Creates the shared input and output queues, without regard - to whether the stream is open or not. - Normally this is called by handleOpen(). - @param queueLength - @param options - @result Returns kIOReturnSuccess if the queues were successfully created. - */ - virtual IOReturn createQueues( IOItemCount queueLength = 0, IOOptionBits options = 0 ); - - /*! - @function destroyQueues - @abstract Releases the shared input and output queues. - @result Returns kIOReturnSuccess if the queues were successfully destroyed. - The queues cannot be destroyed while the stream is open by a client. - */ - virtual IOReturn destroyQueues( void ); - - /*! - @function getOutputQueue - @result A pointer to the output IOStreamBufferQueue structure for the stream, - or NULL if the stream is not open and the queue has not been created yet. - */ - virtual IOStreamBufferQueue *getOutputQueue(void); // get shared-memory output queue - - /*! - @function getOutputQueueMemoryDescriptor - @result An IOMemoryDescriptor object repesenting the shared memory - output queue buffer. - */ - virtual IOMemoryDescriptor *getOutputQueueMemoryDescriptor(void); - - /*! - @function getInputQueue - @result A pointer to the input IOStreamBufferQueue structure for the stream, - or NULL if the stream is not open and the queue has not been created yet. - */ - virtual IOStreamBufferQueue *getInputQueue(void); // get shared-memory input queue - - /*! - @function getInputQueueMemoryDescriptor - @result An IOMemoryDescriptor object repesenting the shared memory - input queue buffer. - */ - virtual IOMemoryDescriptor *getInputQueueMemoryDescriptor(void); - - - /*! - @functiongroup Managing buffers in an IOStream - */ - - /*! - @function addBuffer - @abstract Add a buffer to an IOStream. - @param buffer - @discussion - Adds an IOStreamBuffer to an IOStream. It will be added to the end - of the buffer array, so the buffer ID of existing buffers will not change. - */ - virtual IOReturn addBuffer(IOStreamBuffer *buffer); // add a new buffer to the stream - - /*! - @function addBuffers - @param buffers - @result - */ - virtual IOReturn addBuffers(OSArray *buffers); - - /*! - @function removeBuffer - @param buffer A pointer to an IOStreamBuffer object in the stream. - @result Returns kIOReturnSuccess if the buffer was removed, or kIOReturnNotFound - if the buffer was not in this stream. - @abstract - Removes a buffer from the stream. Buffers cannot be removed - while the stream is open, as this will change the buffer IDs of existing - buffers. - */ - virtual IOReturn removeBuffer(IOStreamBuffer *buffer); - - /*! - @function removeBuffer - @param bufferID The ID of the buffer to remove. - @result Returns kIOReturnSuccess if the buffer was removed. - @abstract - Removes a buffer from the stream. Buffers cannot be removed - while the stream is open, as this will change the buffer IDs of existing - buffers. - */ - - virtual IOReturn removeBuffer(IOStreamBufferID bufferID); - - /*! - @function removeAllBuffers - @result - */ - virtual IOReturn removeAllBuffers( void ); - - /*! - @function removeAllBuffers - @result Returns kIOReturnSuccess if all the buffers were successfully - removed. Buffers cannot be removed - while the stream is open, as this will change the buffer IDs of existing - buffers. - - */ - virtual IOItemCount getBufferCount( void ); - - /*! - @function getBuffers - @abstract Get an array containing all the buffers in the stream. - @discussion - Returns an OSArray containing all the buffers in the stream in order of their buffer ID. - */ - virtual OSArray *getBuffers( void ); - - - /*! - @function getBufferWithID - @param bufferID - The ID of the buffer to get. - @result - A pointer to an IOStreamBuffer object, or NULL if the - buffer ID was invalid for this stream. - */ - - virtual IOStreamBuffer *getBufferWithID(IOStreamBufferID bufferID); - - /*! - @functiongroup Managing notification ports - */ - - /*! - @function getInputPort - @abstract Get the Mach port used to receive notifications - from user space that a buffer has been added to the input queue. - */ - virtual mach_port_t getInputPort(void); - - /*! - @function setInputPort - @abstract Set the Mach port used to receive notifications from - user space that a buffer has been added to the input queue. - @param port - - */ - virtual IOReturn setInputPort(mach_port_t port); - - /*! - @function getOutputPort - @abstract Get the Mach port used to send notifications to user space - that a buffer has been added to the output queue. - */ - virtual mach_port_t getOutputPort(void); - - /*! - @function setOutputPort - @abstract Set the Mach port used to send notifications to user space - that a buffer has been added to the output queue. - @param port - */ - virtual IOReturn setOutputPort(mach_port_t port); - - /*! - @function sendOutputNotification - @abstract Send a notification to the user client that data is available - for reading on the output queue. This will result in the user's output - handler being called, if they registered one. - @result Returns kIOReturnSuccess if the notification was successfully sent. - */ - virtual IOReturn sendOutputNotification(void); - - /*! - @functiongroup Queueing and dequeueing buffers - */ - - /*! - @function enqueueOutputBuffer - @abstract A convenience method for enqueueing a buffer. - @param buffer - @param dataOffset - @param dataLength - @param controlOffset - @param controlLength - @result - */ - virtual IOReturn enqueueOutputBuffer(IOStreamBuffer *buffer, - IOByteCount dataOffset = 0, - IOByteCount dataLength = 0, - IOByteCount controlOffset = 0, - IOByteCount controlLength = 0); - - - /*! - @function enqueueOutputEntry - @param entry - @result - */ - virtual IOReturn enqueueOutputEntry( IOStreamBufferQueueEntry *entry ); - - /*! - @function dequeueInputEntry - @param entry - @result - */ - virtual IOReturn dequeueInputEntry( IOStreamBufferQueueEntry *entry ); - - /*! - @functiongroup Managing notifications - */ - - /*! - @function inputCallback - @abstract Input callback function to be implemented by a subclass; - @param token - A 32-bit token value that can be used by convention to communicate - from user space to the stream. The semantics of this value are - defined by the IOStream subclass. - @discussion - The inputCallback() method is called as a result of a fast trap - from user space. It is called on the same thread as the user request, - but the subclass should implement this call as a notification sent - to a workloop so that the request is asynchronous. - */ - virtual void inputCallback( UInt32 token ); - - /*! - @function inputSyncCallback - @abstract Input callback function to be implemented by a subclass. - @param token - A 32-bit token value that can be used by convention to communicate - from user space to the stream. The semantics of this value are - defined by the IOStream subclass. - @discussion - The inputSyncCallback() method is called as a result of a fast trap - from user space. It is called on the same thread as the user request, - so no context switch is necessary. - */ - virtual void inputSyncCallback( UInt32 token ); - - /*! - @functiongroup Stream control - */ - - /*! - @function getStreamMode - @abstract Returns the mode of the stream, either input or output. - @result The mode of the stream, either kIOStreamModeInput - (from user space to kernel space) or the default - kIOStreamModeOutput (from kernel space to user space). - */ - virtual IOStreamMode getStreamMode(void); - - /*! - @function setStreamMode - @abstract Sets the mode of the stream, either input or output. - @discussion Subclasses may define whether it is possible - to change the mode of a stream. - */ - virtual IOReturn setStreamMode(IOStreamMode mode); - - /*! - @function startStream - @abstract Start sending data on a stream. - @result Returns kIOReturnSuccess if the stream was successfully started. - @discussion This must be implemented by a subclass. - */ - virtual IOReturn startStream(void); - - /*! - @function stopStream - @abstract Stop sending data on a stream. - @result Returns kIOReturnSuccess if the stream was successfully stopped. - @discussion This must be implemented by a subclass. - */ - virtual IOReturn stopStream(void); - - /*! - @function suspendStream - @abstract Temporarily suspend data flow on the stream. - @result Returns kIOReturnSuccess if the stream was successfully suspended. - @discussion This must be implemented by a subclass. - */ - virtual IOReturn suspendStream(void); - - /*! - @functiongroup Managing user clients - */ - - /*! - @function newUserClient - @abstract See the documentation for the IOService method newUserClient. - */ - virtual IOReturn newUserClient( task_t owningTask, void * securityID, - UInt32 type, OSDictionary * properties, - IOUserClient ** handler ); - - - /* Reserved slots */ - - OSMetaClassDeclareReservedUnused(IOStream, 0); - OSMetaClassDeclareReservedUnused(IOStream, 1); - OSMetaClassDeclareReservedUnused(IOStream, 2); - OSMetaClassDeclareReservedUnused(IOStream, 3); - OSMetaClassDeclareReservedUnused(IOStream, 4); - OSMetaClassDeclareReservedUnused(IOStream, 5); - OSMetaClassDeclareReservedUnused(IOStream, 6); - OSMetaClassDeclareReservedUnused(IOStream, 7); - OSMetaClassDeclareReservedUnused(IOStream, 8); - OSMetaClassDeclareReservedUnused(IOStream, 9); - OSMetaClassDeclareReservedUnused(IOStream, 10); - OSMetaClassDeclareReservedUnused(IOStream, 11); - OSMetaClassDeclareReservedUnused(IOStream, 12); - OSMetaClassDeclareReservedUnused(IOStream, 13); - OSMetaClassDeclareReservedUnused(IOStream, 14); - OSMetaClassDeclareReservedUnused(IOStream, 15); - OSMetaClassDeclareReservedUnused(IOStream, 16); - OSMetaClassDeclareReservedUnused(IOStream, 17); - OSMetaClassDeclareReservedUnused(IOStream, 18); - OSMetaClassDeclareReservedUnused(IOStream, 19); - OSMetaClassDeclareReservedUnused(IOStream, 20); - OSMetaClassDeclareReservedUnused(IOStream, 21); - OSMetaClassDeclareReservedUnused(IOStream, 22); - OSMetaClassDeclareReservedUnused(IOStream, 23); - OSMetaClassDeclareReservedUnused(IOStream, 24); - OSMetaClassDeclareReservedUnused(IOStream, 25); - OSMetaClassDeclareReservedUnused(IOStream, 26); - OSMetaClassDeclareReservedUnused(IOStream, 27); - OSMetaClassDeclareReservedUnused(IOStream, 28); - OSMetaClassDeclareReservedUnused(IOStream, 29); - OSMetaClassDeclareReservedUnused(IOStream, 30); - OSMetaClassDeclareReservedUnused(IOStream, 31); - -}; - - -/*! - @class IOStreamBuffer - A class representing a data buffer that is part of an IOStream. - */ - -class IOStreamBuffer : public OSObject -{ - OSDeclareDefaultStructors(IOStreamBuffer); - -protected: - IOMemoryDescriptor * _dataBuffer; // The data buffer is expected to be filled by hardware. - IOMemoryDescriptor * _controlBuffer; // The control buffer is expected to be defined by the hardware driver. - - IOStreamBufferID _bufferID; // Client handle for this buffer. - - OSArray * _clientMemoryMaps; // Maps for clients who are sharing these buffers. - - SInt32 _clientReferenceCount; // Count of client uses of this buffer. May be negative. - -public: - /*! - @function initWithMemoryDescriptors - */ - virtual bool initWithMemoryDescriptors(IOMemoryDescriptor *dataBuffer, - IOMemoryDescriptor *controlBuffer, - IOStreamBufferID bufferID = 0); - - /*! - @function withMemoryDescriptors - */ - static IOStreamBuffer *withMemoryDescriptors(IOMemoryDescriptor *dataBuffer, - IOMemoryDescriptor *controlBuffer, - IOStreamBufferID bufferID = 0); - - virtual void free(void); - - /*! - @function getBufferID - @abstract Gets the buffer identifier for the IOStreamBuffer object. - @discussion The buffer identifier is unique across all buffers in a stream. - */ - virtual IOStreamBufferID getBufferID(void); - - /*! - @function setBufferID - @abstract Sets the buffer identifier for the IOStreamBuffer object. - */ - - virtual void setBufferID( IOStreamBufferID bufferID ); - - /*! - @function setDataBuffer - @abstract Sets the data buffer for the IOStreamBuffer object. - */ - virtual void setDataBuffer(IOMemoryDescriptor *dataBuffer); - - /*! - @function setControlBuffer - @abstract Sets the control buffer for the IOStreamBuffer object. - */ - virtual void setControlBuffer(IOMemoryDescriptor *controlBuffer); - - /*! - @function getDataBuffer - @result A pointer to the IOMemoryDescriptor for the data buffer. - */ - virtual IOMemoryDescriptor *getDataBuffer(void); - - /*! - @function getControlBuffer - @result A pointer to the IOMemoryDescriptor for the control buffer. - */ - virtual IOMemoryDescriptor *getControlBuffer(void); - - /*! - @function getClientReferenceCount - @result The count of client references to this buffer. It may be positive - or negative, depending on whether the client is sending data into the kernel, - or the kernel is sending data out to the client. - */ - virtual SInt32 getClientReferenceCount( void ); - - /*! - @function sendClientReference - @param offset The offset in the buffer of the data sent to the client. - @param length The length of the data sent to the client. - @result The new client reference count. - @abstract - */ - virtual SInt32 sendClientReference( IOByteCount offset = 0, IOByteCount length = 0 ); - - /*! - @function receiveClientReference - @param offset The offset in the buffer of the data from the client. - @param length The length of the data from the client. - @abstract - */ - virtual SInt32 receiveClientReference( IOByteCount offset = 0, IOByteCount length = 0 ); - - /* Reserved slots */ - - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 0); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 1); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 2); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 3); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 4); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 5); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 6); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 7); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 8); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 9); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 10); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 11); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 12); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 13); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 14); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 15); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 16); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 17); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 18); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 19); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 20); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 21); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 22); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 23); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 24); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 25); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 26); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 27); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 28); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 29); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 30); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 31); - -}; - -#endif /* ! __IOKIT_IOSTREAM_H */ - diff --git a/i386/include/IOKit/stream/.svn/text-base/IOStreamFamily.h.svn-base b/i386/include/IOKit/stream/.svn/text-base/IOStreamFamily.h.svn-base deleted file mode 100644 index a4eb7f0..0000000 --- a/i386/include/IOKit/stream/.svn/text-base/IOStreamFamily.h.svn-base +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright 2006 Apple Computer, Inc. All rights reserved. - * - */ - -#ifndef __IOKIT_IOSTREAMFAMILY_H -#define __IOKIT_IOSTREAMFAMILY_H - -#include <IOKit/stream/IOStream.h> -#include <IOKit/stream/IOStreamShared.h> - - -#endif /* !__IOKIT_IOSTREAMFAMILY_H */ diff --git a/i386/include/IOKit/stream/.svn/text-base/IOStreamShared.h.svn-base b/i386/include/IOKit/stream/.svn/text-base/IOStreamShared.h.svn-base deleted file mode 100644 index 5b2c0a3..0000000 --- a/i386/include/IOKit/stream/.svn/text-base/IOStreamShared.h.svn-base +++ /dev/null @@ -1,175 +0,0 @@ -/* - * IOStreamShared.h - * IOStreamFamily - * - * Copyright 2006 Apple Computer, Inc. All rights reserved. - * - */ - -#if !defined(__IOKIT_IOSTREAMSHARED_H) -#define __IOKIT_IOSTREAMSHARED_H - -#include <sys/cdefs.h> - -#include <IOKit/IOTypes.h> - -/*! - @header IOStreamShared.h - IOStream definitions shared between kernel and user space. - */ - -__BEGIN_DECLS - -// Buffer numbers are guaranteed to go from 0 to bufferCount - 1. -/*! - @typedef IOStreamBufferID - */ -typedef UInt32 IOStreamBufferID; -#define kIOStreamBufferIDInvalid (~0) - -// This is the header for the shared-memory queue used to send buffer notifications -// from kernel to user space or vice versa. - -// Queue entry in input or output queue - -#ifdef __cplusplus - -/*! - @struct IOStreamBufferQueueEntry - @field bufferID The ID of the buffer passed in this queue entry. - @field dataLength The length of the valid data in the buffer. - @field reserved Reserved for future use. -*/ - -struct IOStreamBufferQueueEntry { - IOStreamBufferID bufferID; - UInt32 dataOffset; - UInt32 dataLength; - UInt32 controlOffset; - UInt32 controlLength; - UInt32 reserved[3]; -}; - - -/*! - @struct IOStreamBufferQueue - @field entryCount The number of queue entries in the queue. - @field headIndex The index of the next queue slot that will be filled in by the queue writer. - @field tailIndex The index of the next queue slot that can be read by the queue reader. - @field reserved Reserved for future use. - @field queue The array of queue entries. - */ - -struct IOStreamBufferQueue { - UInt32 entryCount; - volatile UInt32 headIndex; - volatile UInt32 tailIndex; - UInt32 reserved; - IOStreamBufferQueueEntry queue[0]; -}; - -#else - -typedef struct __IOStreamBufferQueueEntry { - IOStreamBufferID bufferID; - UInt32 dataOffset; - UInt32 dataLength; - UInt32 controlOffset; - UInt32 controlLength; - UInt32 reserved[3]; -} IOStreamBufferQueueEntry; - -typedef struct __IOStreamBufferQueue { - UInt32 entryCount; - volatile UInt32 headIndex; - volatile UInt32 tailIndex; - UInt32 reserved; - IOStreamBufferQueueEntry queue[0]; -} IOStreamBufferQueue; - -#endif - -/*! - @enum Memory mapping types - @constant kIOStreamMemoryTypeOutputQueue - @constant kIOStreamMemoryTypeInputQueue - @constant kIOStreamMemoryTypeBufferData - @constant kIOStreamMemoryTypeBufferControl - @constant kIOStreamBufferIDMask - @constant kIOStreamMemoryTypeMask - @abstract Memory types used with IOConnectMapMemory(). - */ -enum { - kIOStreamMemoryTypeOutputQueue = 0x10000000, - kIOStreamMemoryTypeInputQueue = 0x20000000, - kIOStreamMemoryTypeBufferData = 0x30000000, - kIOStreamMemoryTypeBufferControl = 0x40000000, - kIOStreamBufferIDMask = 0x0FFFFFFF, - kIOStreamMemoryTypeMask = 0xF0000000 -}; - -/*! - @enum Mach port types - @constant kIOStreamPortTypeOutput - @constant kIOStreamPortTypeInput - @abstract Port types used with IOConnectSetNotificationPort(). - */ -enum { - kIOStreamPortTypeOutput, - kIOStreamPortTypeInput -}; - -/*! - @enum IOStream open options - */ - -enum { - kIOStreamOptionOpenExclusive = 0x00010000, - kIOStreamOptionOpenShared = 0x00020000 -}; - -/*! - @enum User client methods - @constant kIOStreamMethodOpen - @constant kIOStreamMethodClose - @constant kIOStreamMethodStart - @constant kIOStreamMethodStop - @constant kIOStreamMethodSuspend - @constant kIOStreamMethodGetMode - @constant kIOStreamMethodSetMode - - @abstract Client method numbers used with IOConnectMethod...() functions. - */ -enum { - kIOStreamMethodOpen, - kIOStreamMethodClose, - kIOStreamMethodStart, - kIOStreamMethodStop, - kIOStreamMethodSuspend, - kIOStreamMethodGetMode, - kIOStreamMethodSetMode, - kIOStreamMethodGetBufferCount -}; - -/*! - @enum User client traps - @constant kIOStreamEnqueueInputTrap - @constant kIOStreamEnqueueInputSyncTrap - @abstract Client trap numbers used with IOConnectTrap..() functions. - */ -enum { - kIOStreamEnqueueInputTrap, - kIOStreamEnqueueInputSyncTrap -}; - -typedef enum { - kIOStreamModeInput, // From user to kernel space - kIOStreamModeOutput, // From kernel to user space - kIOStreamModeInputOutput // bidirectional -} IOStreamMode; - - -__END_DECLS - -#endif /* ! __IOKIT_IOSTREAMSHARED_H */ - diff --git a/i386/include/IOKit/stream/.svn/text-base/IOStreamUserClient.h.svn-base b/i386/include/IOKit/stream/.svn/text-base/IOStreamUserClient.h.svn-base deleted file mode 100644 index 887575a..0000000 --- a/i386/include/IOKit/stream/.svn/text-base/IOStreamUserClient.h.svn-base +++ /dev/null @@ -1,76 +0,0 @@ -/* - * IOStreamUserClient.h - * IOStreamFamily - * - * Copyright 2006 Apple Computer, Inc. All rights reserved. - * - */ - -#if !defined( __IOKIT_IOSTREAMUSERCLIENT_H ) -#define __IOKIT_IOSTREAMUSERCLIENT_H - - -#include <IOKit/IOUserClient.h> - -#include <IOKit/stream/IOStreamShared.h> -#include <IOKit/stream/IOStream.h> - -class IOStreamUserClient : public IOUserClient -{ - OSDeclareDefaultStructors( IOStreamUserClient ) - -protected: - IOStream * _owner; - task_t _task; - -public: - virtual bool initWithTask( - task_t owningTask, void * securityToken, UInt32 type, - OSDictionary * properties); - virtual bool initWithTask( - task_t owningTask, void * securityToken, UInt32 type); - - virtual IOReturn clientClose( void ); - virtual IOReturn clientDied( void ); - - virtual IOService * getService( void ); - - virtual IOReturn registerNotificationPort( - mach_port_t port, UInt32 type, UInt32 refCon ); - - virtual IOReturn connectClient( IOUserClient * client ); - - virtual IOExternalMethod * getTargetAndMethodForIndex( - IOService ** targetP, UInt32 index ); - - virtual IOExternalTrap * - getTargetAndTrapForIndex( IOService **targetP, UInt32 index ); - - virtual IOReturn clientMemoryForType( UInt32 type, - IOOptionBits * options, - IOMemoryDescriptor ** memory ); - - virtual bool start( IOService * provider ); - - -protected: - virtual IOReturn openMethod( char * dataIn, char * dataOut, - IOByteCount inputSize, IOByteCount * outputSize ); - virtual IOReturn closeMethod( void ); - virtual IOReturn startMethod( void ); - virtual IOReturn stopMethod( void ); - virtual IOReturn suspendMethod( void ); - virtual IOReturn getModeMethod( char * dataOut, - IOByteCount * outputSize ); - virtual IOReturn setModeMethod( char * dataIn, - IOByteCount inputSize ); - virtual IOReturn getBufferCountMethod( char * dataOut, - IOByteCount * outputSize ); - - virtual IOReturn inputTrap( UInt32 token ); - virtual IOReturn inputSyncTrap( UInt32 token ); - -}; - -#endif /* ! __IOKIT_IOSTREAMUSERCLIENT_H */ - diff --git a/i386/include/IOKit/stream/IOStream.h b/i386/include/IOKit/stream/IOStream.h deleted file mode 100644 index 01efad4..0000000 --- a/i386/include/IOKit/stream/IOStream.h +++ /dev/null @@ -1,609 +0,0 @@ -/* - * Copyright 2006 Apple Computer, Inc. All rights reserved. - * - */ - -#if !defined(__IOKIT_IOSTREAM_H) -#define __IOKIT_IOSTREAM_H - -#include <IOKit/IOService.h> -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IOBufferMemoryDescriptor.h> -#include <IOKit/IOUserClient.h> - -#include <IOKit/stream/IOStreamShared.h> - -/*! - @header IOStream.h - Definitions for IOStream family. - */ - -class IOStreamBuffer; - -/*! - @class IOStream - @abstract - A class representing a stream of data buffers passed from kernel to - user space and back again. - @discussion - The IOStream class defines a mechanism for moving buffers of data from - kernel space to user space or vice-versa. The policy for which direction - the data flows and the nature of the data is left up the the implementer - of the driver which uses IOStream. - - Although it is expected that the client of an IOStream will be in user space, - this is not required. - - References to "output" mean "from the IOStream to the user client", and - "input" means "from the user client to the IOStream." - - */ - -class IOStream : public IOService -{ - OSDeclareDefaultStructors(IOStream); - - protected: - OSArray * _buffers; // IOStreamBuffer objects in this stream - - IOItemCount _queueCount; // Number of entries for the queues - - IOMemoryDescriptor * _inputQueueDescriptor; - IOMemoryMap * _inputQueueMap; - - IOMemoryDescriptor * _outputQueueDescriptor; - IOMemoryMap * _outputQueueMap; - - IOStreamBufferQueue * _outputQueue; // Shared memory for buffers out to user space - IOStreamBufferQueue * _inputQueue; // Shared memory for buffers in from user space - - mach_port_t _outputPort; - mach_port_t _inputPort; - - OSArray * _memoryMaps; // Maps for data queues - - IOStreamMode _streamMode; - - public: - - /*! - @functiongroup Creating IOStream objects - */ - - /*! - @function withBuffers - @param mode The initial mode of the stream, either output, input, or input/output. - @param queueLength The nuber of queue entries to reserve in the input and output queue. - Zero means to make the queues big enough to accommodate all the buffers at once. - @param properties - A dictionary of properties which will be set on the stream. - @param buffers - An array of IOStreamBuffer objects which will be the buffers for this stream. - */ - - static IOStream *withBuffers(OSArray *buffers, IOStreamMode mode = kIOStreamModeOutput, IOItemCount queueLength = 0, OSDictionary *properties = 0); - - virtual bool init(OSDictionary *properties = 0); - - /*! - @function initWithBuffers - @param mode The initial mode of the stream, either output, input, or input/output. - @param queueLength The nuber of queue entries to reserve in the input and output queue. - Zero means to make the queues big enough to accommodate all the buffers at once. - @param properties - A dictionary of properties which will be set on the stream. - @param buffers - An array of IOStreamBuffer objects which will be the buffers for this stream. - */ - virtual bool initWithBuffers(OSArray *buffers, IOStreamMode mode = kIOStreamModeOutput, IOItemCount queueLength = 0, OSDictionary *properties = 0); - - /*! - @function free - */ - virtual void free(void); - - /*! - @functiongroup Opening and closing streams - */ - - /*! - @function handleOpen - @abstract The handleOpen() method relies on the default IOService behavior - to ensure that - only one client has the stream open at a time. - The shared input and output queues are created at open time. - @param options - @param arg - */ - virtual bool handleOpen( IOService * forClient, - IOOptionBits options, - void * arg ); - - /*! - @function handleClose - @abstract The handleClose method destroys the shared input and output - queues. - @param options - */ - virtual void handleClose( IOService * forClient, - IOOptionBits options ); - - /*! - @functiongroup Managing shared queues - */ - - /*! - @function createQueues - @abstract Creates the shared input and output queues, without regard - to whether the stream is open or not. - Normally this is called by handleOpen(). - @param queueLength - @param options - @result Returns kIOReturnSuccess if the queues were successfully created. - */ - virtual IOReturn createQueues( IOItemCount queueLength = 0, IOOptionBits options = 0 ); - - /*! - @function destroyQueues - @abstract Releases the shared input and output queues. - @result Returns kIOReturnSuccess if the queues were successfully destroyed. - The queues cannot be destroyed while the stream is open by a client. - */ - virtual IOReturn destroyQueues( void ); - - /*! - @function getOutputQueue - @result A pointer to the output IOStreamBufferQueue structure for the stream, - or NULL if the stream is not open and the queue has not been created yet. - */ - virtual IOStreamBufferQueue *getOutputQueue(void); // get shared-memory output queue - - /*! - @function getOutputQueueMemoryDescriptor - @result An IOMemoryDescriptor object repesenting the shared memory - output queue buffer. - */ - virtual IOMemoryDescriptor *getOutputQueueMemoryDescriptor(void); - - /*! - @function getInputQueue - @result A pointer to the input IOStreamBufferQueue structure for the stream, - or NULL if the stream is not open and the queue has not been created yet. - */ - virtual IOStreamBufferQueue *getInputQueue(void); // get shared-memory input queue - - /*! - @function getInputQueueMemoryDescriptor - @result An IOMemoryDescriptor object repesenting the shared memory - input queue buffer. - */ - virtual IOMemoryDescriptor *getInputQueueMemoryDescriptor(void); - - - /*! - @functiongroup Managing buffers in an IOStream - */ - - /*! - @function addBuffer - @abstract Add a buffer to an IOStream. - @param buffer - @discussion - Adds an IOStreamBuffer to an IOStream. It will be added to the end - of the buffer array, so the buffer ID of existing buffers will not change. - */ - virtual IOReturn addBuffer(IOStreamBuffer *buffer); // add a new buffer to the stream - - /*! - @function addBuffers - @param buffers - @result - */ - virtual IOReturn addBuffers(OSArray *buffers); - - /*! - @function removeBuffer - @param buffer A pointer to an IOStreamBuffer object in the stream. - @result Returns kIOReturnSuccess if the buffer was removed, or kIOReturnNotFound - if the buffer was not in this stream. - @abstract - Removes a buffer from the stream. Buffers cannot be removed - while the stream is open, as this will change the buffer IDs of existing - buffers. - */ - virtual IOReturn removeBuffer(IOStreamBuffer *buffer); - - /*! - @function removeBuffer - @param bufferID The ID of the buffer to remove. - @result Returns kIOReturnSuccess if the buffer was removed. - @abstract - Removes a buffer from the stream. Buffers cannot be removed - while the stream is open, as this will change the buffer IDs of existing - buffers. - */ - - virtual IOReturn removeBuffer(IOStreamBufferID bufferID); - - /*! - @function removeAllBuffers - @result - */ - virtual IOReturn removeAllBuffers( void ); - - /*! - @function removeAllBuffers - @result Returns kIOReturnSuccess if all the buffers were successfully - removed. Buffers cannot be removed - while the stream is open, as this will change the buffer IDs of existing - buffers. - - */ - virtual IOItemCount getBufferCount( void ); - - /*! - @function getBuffers - @abstract Get an array containing all the buffers in the stream. - @discussion - Returns an OSArray containing all the buffers in the stream in order of their buffer ID. - */ - virtual OSArray *getBuffers( void ); - - - /*! - @function getBufferWithID - @param bufferID - The ID of the buffer to get. - @result - A pointer to an IOStreamBuffer object, or NULL if the - buffer ID was invalid for this stream. - */ - - virtual IOStreamBuffer *getBufferWithID(IOStreamBufferID bufferID); - - /*! - @functiongroup Managing notification ports - */ - - /*! - @function getInputPort - @abstract Get the Mach port used to receive notifications - from user space that a buffer has been added to the input queue. - */ - virtual mach_port_t getInputPort(void); - - /*! - @function setInputPort - @abstract Set the Mach port used to receive notifications from - user space that a buffer has been added to the input queue. - @param port - - */ - virtual IOReturn setInputPort(mach_port_t port); - - /*! - @function getOutputPort - @abstract Get the Mach port used to send notifications to user space - that a buffer has been added to the output queue. - */ - virtual mach_port_t getOutputPort(void); - - /*! - @function setOutputPort - @abstract Set the Mach port used to send notifications to user space - that a buffer has been added to the output queue. - @param port - */ - virtual IOReturn setOutputPort(mach_port_t port); - - /*! - @function sendOutputNotification - @abstract Send a notification to the user client that data is available - for reading on the output queue. This will result in the user's output - handler being called, if they registered one. - @result Returns kIOReturnSuccess if the notification was successfully sent. - */ - virtual IOReturn sendOutputNotification(void); - - /*! - @functiongroup Queueing and dequeueing buffers - */ - - /*! - @function enqueueOutputBuffer - @abstract A convenience method for enqueueing a buffer. - @param buffer - @param dataOffset - @param dataLength - @param controlOffset - @param controlLength - @result - */ - virtual IOReturn enqueueOutputBuffer(IOStreamBuffer *buffer, - IOByteCount dataOffset = 0, - IOByteCount dataLength = 0, - IOByteCount controlOffset = 0, - IOByteCount controlLength = 0); - - - /*! - @function enqueueOutputEntry - @param entry - @result - */ - virtual IOReturn enqueueOutputEntry( IOStreamBufferQueueEntry *entry ); - - /*! - @function dequeueInputEntry - @param entry - @result - */ - virtual IOReturn dequeueInputEntry( IOStreamBufferQueueEntry *entry ); - - /*! - @functiongroup Managing notifications - */ - - /*! - @function inputCallback - @abstract Input callback function to be implemented by a subclass; - @param token - A 32-bit token value that can be used by convention to communicate - from user space to the stream. The semantics of this value are - defined by the IOStream subclass. - @discussion - The inputCallback() method is called as a result of a fast trap - from user space. It is called on the same thread as the user request, - but the subclass should implement this call as a notification sent - to a workloop so that the request is asynchronous. - */ - virtual void inputCallback( UInt32 token ); - - /*! - @function inputSyncCallback - @abstract Input callback function to be implemented by a subclass. - @param token - A 32-bit token value that can be used by convention to communicate - from user space to the stream. The semantics of this value are - defined by the IOStream subclass. - @discussion - The inputSyncCallback() method is called as a result of a fast trap - from user space. It is called on the same thread as the user request, - so no context switch is necessary. - */ - virtual void inputSyncCallback( UInt32 token ); - - /*! - @functiongroup Stream control - */ - - /*! - @function getStreamMode - @abstract Returns the mode of the stream, either input or output. - @result The mode of the stream, either kIOStreamModeInput - (from user space to kernel space) or the default - kIOStreamModeOutput (from kernel space to user space). - */ - virtual IOStreamMode getStreamMode(void); - - /*! - @function setStreamMode - @abstract Sets the mode of the stream, either input or output. - @discussion Subclasses may define whether it is possible - to change the mode of a stream. - */ - virtual IOReturn setStreamMode(IOStreamMode mode); - - /*! - @function startStream - @abstract Start sending data on a stream. - @result Returns kIOReturnSuccess if the stream was successfully started. - @discussion This must be implemented by a subclass. - */ - virtual IOReturn startStream(void); - - /*! - @function stopStream - @abstract Stop sending data on a stream. - @result Returns kIOReturnSuccess if the stream was successfully stopped. - @discussion This must be implemented by a subclass. - */ - virtual IOReturn stopStream(void); - - /*! - @function suspendStream - @abstract Temporarily suspend data flow on the stream. - @result Returns kIOReturnSuccess if the stream was successfully suspended. - @discussion This must be implemented by a subclass. - */ - virtual IOReturn suspendStream(void); - - /*! - @functiongroup Managing user clients - */ - - /*! - @function newUserClient - @abstract See the documentation for the IOService method newUserClient. - */ - virtual IOReturn newUserClient( task_t owningTask, void * securityID, - UInt32 type, OSDictionary * properties, - IOUserClient ** handler ); - - - /* Reserved slots */ - - OSMetaClassDeclareReservedUnused(IOStream, 0); - OSMetaClassDeclareReservedUnused(IOStream, 1); - OSMetaClassDeclareReservedUnused(IOStream, 2); - OSMetaClassDeclareReservedUnused(IOStream, 3); - OSMetaClassDeclareReservedUnused(IOStream, 4); - OSMetaClassDeclareReservedUnused(IOStream, 5); - OSMetaClassDeclareReservedUnused(IOStream, 6); - OSMetaClassDeclareReservedUnused(IOStream, 7); - OSMetaClassDeclareReservedUnused(IOStream, 8); - OSMetaClassDeclareReservedUnused(IOStream, 9); - OSMetaClassDeclareReservedUnused(IOStream, 10); - OSMetaClassDeclareReservedUnused(IOStream, 11); - OSMetaClassDeclareReservedUnused(IOStream, 12); - OSMetaClassDeclareReservedUnused(IOStream, 13); - OSMetaClassDeclareReservedUnused(IOStream, 14); - OSMetaClassDeclareReservedUnused(IOStream, 15); - OSMetaClassDeclareReservedUnused(IOStream, 16); - OSMetaClassDeclareReservedUnused(IOStream, 17); - OSMetaClassDeclareReservedUnused(IOStream, 18); - OSMetaClassDeclareReservedUnused(IOStream, 19); - OSMetaClassDeclareReservedUnused(IOStream, 20); - OSMetaClassDeclareReservedUnused(IOStream, 21); - OSMetaClassDeclareReservedUnused(IOStream, 22); - OSMetaClassDeclareReservedUnused(IOStream, 23); - OSMetaClassDeclareReservedUnused(IOStream, 24); - OSMetaClassDeclareReservedUnused(IOStream, 25); - OSMetaClassDeclareReservedUnused(IOStream, 26); - OSMetaClassDeclareReservedUnused(IOStream, 27); - OSMetaClassDeclareReservedUnused(IOStream, 28); - OSMetaClassDeclareReservedUnused(IOStream, 29); - OSMetaClassDeclareReservedUnused(IOStream, 30); - OSMetaClassDeclareReservedUnused(IOStream, 31); - -}; - - -/*! - @class IOStreamBuffer - A class representing a data buffer that is part of an IOStream. - */ - -class IOStreamBuffer : public OSObject -{ - OSDeclareDefaultStructors(IOStreamBuffer); - -protected: - IOMemoryDescriptor * _dataBuffer; // The data buffer is expected to be filled by hardware. - IOMemoryDescriptor * _controlBuffer; // The control buffer is expected to be defined by the hardware driver. - - IOStreamBufferID _bufferID; // Client handle for this buffer. - - OSArray * _clientMemoryMaps; // Maps for clients who are sharing these buffers. - - SInt32 _clientReferenceCount; // Count of client uses of this buffer. May be negative. - -public: - /*! - @function initWithMemoryDescriptors - */ - virtual bool initWithMemoryDescriptors(IOMemoryDescriptor *dataBuffer, - IOMemoryDescriptor *controlBuffer, - IOStreamBufferID bufferID = 0); - - /*! - @function withMemoryDescriptors - */ - static IOStreamBuffer *withMemoryDescriptors(IOMemoryDescriptor *dataBuffer, - IOMemoryDescriptor *controlBuffer, - IOStreamBufferID bufferID = 0); - - virtual void free(void); - - /*! - @function getBufferID - @abstract Gets the buffer identifier for the IOStreamBuffer object. - @discussion The buffer identifier is unique across all buffers in a stream. - */ - virtual IOStreamBufferID getBufferID(void); - - /*! - @function setBufferID - @abstract Sets the buffer identifier for the IOStreamBuffer object. - */ - - virtual void setBufferID( IOStreamBufferID bufferID ); - - /*! - @function setDataBuffer - @abstract Sets the data buffer for the IOStreamBuffer object. - */ - virtual void setDataBuffer(IOMemoryDescriptor *dataBuffer); - - /*! - @function setControlBuffer - @abstract Sets the control buffer for the IOStreamBuffer object. - */ - virtual void setControlBuffer(IOMemoryDescriptor *controlBuffer); - - /*! - @function getDataBuffer - @result A pointer to the IOMemoryDescriptor for the data buffer. - */ - virtual IOMemoryDescriptor *getDataBuffer(void); - - /*! - @function getControlBuffer - @result A pointer to the IOMemoryDescriptor for the control buffer. - */ - virtual IOMemoryDescriptor *getControlBuffer(void); - - /*! - @function getClientReferenceCount - @result The count of client references to this buffer. It may be positive - or negative, depending on whether the client is sending data into the kernel, - or the kernel is sending data out to the client. - */ - virtual SInt32 getClientReferenceCount( void ); - - /*! - @function sendClientReference - @param offset The offset in the buffer of the data sent to the client. - @param length The length of the data sent to the client. - @result The new client reference count. - @abstract - */ - virtual SInt32 sendClientReference( IOByteCount offset = 0, IOByteCount length = 0 ); - - /*! - @function receiveClientReference - @param offset The offset in the buffer of the data from the client. - @param length The length of the data from the client. - @abstract - */ - virtual SInt32 receiveClientReference( IOByteCount offset = 0, IOByteCount length = 0 ); - - /* Reserved slots */ - - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 0); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 1); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 2); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 3); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 4); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 5); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 6); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 7); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 8); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 9); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 10); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 11); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 12); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 13); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 14); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 15); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 16); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 17); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 18); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 19); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 20); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 21); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 22); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 23); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 24); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 25); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 26); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 27); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 28); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 29); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 30); - OSMetaClassDeclareReservedUnused(IOStreamBuffer, 31); - -}; - -#endif /* ! __IOKIT_IOSTREAM_H */ - diff --git a/i386/include/IOKit/stream/IOStreamFamily.h b/i386/include/IOKit/stream/IOStreamFamily.h deleted file mode 100644 index a4eb7f0..0000000 --- a/i386/include/IOKit/stream/IOStreamFamily.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright 2006 Apple Computer, Inc. All rights reserved. - * - */ - -#ifndef __IOKIT_IOSTREAMFAMILY_H -#define __IOKIT_IOSTREAMFAMILY_H - -#include <IOKit/stream/IOStream.h> -#include <IOKit/stream/IOStreamShared.h> - - -#endif /* !__IOKIT_IOSTREAMFAMILY_H */ diff --git a/i386/include/IOKit/stream/IOStreamShared.h b/i386/include/IOKit/stream/IOStreamShared.h deleted file mode 100644 index 5b2c0a3..0000000 --- a/i386/include/IOKit/stream/IOStreamShared.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * IOStreamShared.h - * IOStreamFamily - * - * Copyright 2006 Apple Computer, Inc. All rights reserved. - * - */ - -#if !defined(__IOKIT_IOSTREAMSHARED_H) -#define __IOKIT_IOSTREAMSHARED_H - -#include <sys/cdefs.h> - -#include <IOKit/IOTypes.h> - -/*! - @header IOStreamShared.h - IOStream definitions shared between kernel and user space. - */ - -__BEGIN_DECLS - -// Buffer numbers are guaranteed to go from 0 to bufferCount - 1. -/*! - @typedef IOStreamBufferID - */ -typedef UInt32 IOStreamBufferID; -#define kIOStreamBufferIDInvalid (~0) - -// This is the header for the shared-memory queue used to send buffer notifications -// from kernel to user space or vice versa. - -// Queue entry in input or output queue - -#ifdef __cplusplus - -/*! - @struct IOStreamBufferQueueEntry - @field bufferID The ID of the buffer passed in this queue entry. - @field dataLength The length of the valid data in the buffer. - @field reserved Reserved for future use. -*/ - -struct IOStreamBufferQueueEntry { - IOStreamBufferID bufferID; - UInt32 dataOffset; - UInt32 dataLength; - UInt32 controlOffset; - UInt32 controlLength; - UInt32 reserved[3]; -}; - - -/*! - @struct IOStreamBufferQueue - @field entryCount The number of queue entries in the queue. - @field headIndex The index of the next queue slot that will be filled in by the queue writer. - @field tailIndex The index of the next queue slot that can be read by the queue reader. - @field reserved Reserved for future use. - @field queue The array of queue entries. - */ - -struct IOStreamBufferQueue { - UInt32 entryCount; - volatile UInt32 headIndex; - volatile UInt32 tailIndex; - UInt32 reserved; - IOStreamBufferQueueEntry queue[0]; -}; - -#else - -typedef struct __IOStreamBufferQueueEntry { - IOStreamBufferID bufferID; - UInt32 dataOffset; - UInt32 dataLength; - UInt32 controlOffset; - UInt32 controlLength; - UInt32 reserved[3]; -} IOStreamBufferQueueEntry; - -typedef struct __IOStreamBufferQueue { - UInt32 entryCount; - volatile UInt32 headIndex; - volatile UInt32 tailIndex; - UInt32 reserved; - IOStreamBufferQueueEntry queue[0]; -} IOStreamBufferQueue; - -#endif - -/*! - @enum Memory mapping types - @constant kIOStreamMemoryTypeOutputQueue - @constant kIOStreamMemoryTypeInputQueue - @constant kIOStreamMemoryTypeBufferData - @constant kIOStreamMemoryTypeBufferControl - @constant kIOStreamBufferIDMask - @constant kIOStreamMemoryTypeMask - @abstract Memory types used with IOConnectMapMemory(). - */ -enum { - kIOStreamMemoryTypeOutputQueue = 0x10000000, - kIOStreamMemoryTypeInputQueue = 0x20000000, - kIOStreamMemoryTypeBufferData = 0x30000000, - kIOStreamMemoryTypeBufferControl = 0x40000000, - kIOStreamBufferIDMask = 0x0FFFFFFF, - kIOStreamMemoryTypeMask = 0xF0000000 -}; - -/*! - @enum Mach port types - @constant kIOStreamPortTypeOutput - @constant kIOStreamPortTypeInput - @abstract Port types used with IOConnectSetNotificationPort(). - */ -enum { - kIOStreamPortTypeOutput, - kIOStreamPortTypeInput -}; - -/*! - @enum IOStream open options - */ - -enum { - kIOStreamOptionOpenExclusive = 0x00010000, - kIOStreamOptionOpenShared = 0x00020000 -}; - -/*! - @enum User client methods - @constant kIOStreamMethodOpen - @constant kIOStreamMethodClose - @constant kIOStreamMethodStart - @constant kIOStreamMethodStop - @constant kIOStreamMethodSuspend - @constant kIOStreamMethodGetMode - @constant kIOStreamMethodSetMode - - @abstract Client method numbers used with IOConnectMethod...() functions. - */ -enum { - kIOStreamMethodOpen, - kIOStreamMethodClose, - kIOStreamMethodStart, - kIOStreamMethodStop, - kIOStreamMethodSuspend, - kIOStreamMethodGetMode, - kIOStreamMethodSetMode, - kIOStreamMethodGetBufferCount -}; - -/*! - @enum User client traps - @constant kIOStreamEnqueueInputTrap - @constant kIOStreamEnqueueInputSyncTrap - @abstract Client trap numbers used with IOConnectTrap..() functions. - */ -enum { - kIOStreamEnqueueInputTrap, - kIOStreamEnqueueInputSyncTrap -}; - -typedef enum { - kIOStreamModeInput, // From user to kernel space - kIOStreamModeOutput, // From kernel to user space - kIOStreamModeInputOutput // bidirectional -} IOStreamMode; - - -__END_DECLS - -#endif /* ! __IOKIT_IOSTREAMSHARED_H */ - diff --git a/i386/include/IOKit/stream/IOStreamUserClient.h b/i386/include/IOKit/stream/IOStreamUserClient.h deleted file mode 100644 index 887575a..0000000 --- a/i386/include/IOKit/stream/IOStreamUserClient.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * IOStreamUserClient.h - * IOStreamFamily - * - * Copyright 2006 Apple Computer, Inc. All rights reserved. - * - */ - -#if !defined( __IOKIT_IOSTREAMUSERCLIENT_H ) -#define __IOKIT_IOSTREAMUSERCLIENT_H - - -#include <IOKit/IOUserClient.h> - -#include <IOKit/stream/IOStreamShared.h> -#include <IOKit/stream/IOStream.h> - -class IOStreamUserClient : public IOUserClient -{ - OSDeclareDefaultStructors( IOStreamUserClient ) - -protected: - IOStream * _owner; - task_t _task; - -public: - virtual bool initWithTask( - task_t owningTask, void * securityToken, UInt32 type, - OSDictionary * properties); - virtual bool initWithTask( - task_t owningTask, void * securityToken, UInt32 type); - - virtual IOReturn clientClose( void ); - virtual IOReturn clientDied( void ); - - virtual IOService * getService( void ); - - virtual IOReturn registerNotificationPort( - mach_port_t port, UInt32 type, UInt32 refCon ); - - virtual IOReturn connectClient( IOUserClient * client ); - - virtual IOExternalMethod * getTargetAndMethodForIndex( - IOService ** targetP, UInt32 index ); - - virtual IOExternalTrap * - getTargetAndTrapForIndex( IOService **targetP, UInt32 index ); - - virtual IOReturn clientMemoryForType( UInt32 type, - IOOptionBits * options, - IOMemoryDescriptor ** memory ); - - virtual bool start( IOService * provider ); - - -protected: - virtual IOReturn openMethod( char * dataIn, char * dataOut, - IOByteCount inputSize, IOByteCount * outputSize ); - virtual IOReturn closeMethod( void ); - virtual IOReturn startMethod( void ); - virtual IOReturn stopMethod( void ); - virtual IOReturn suspendMethod( void ); - virtual IOReturn getModeMethod( char * dataOut, - IOByteCount * outputSize ); - virtual IOReturn setModeMethod( char * dataIn, - IOByteCount inputSize ); - virtual IOReturn getBufferCountMethod( char * dataOut, - IOByteCount * outputSize ); - - virtual IOReturn inputTrap( UInt32 token ); - virtual IOReturn inputSyncTrap( UInt32 token ); - -}; - -#endif /* ! __IOKIT_IOSTREAMUSERCLIENT_H */ - diff --git a/i386/include/IOKit/system_management/.svn/all-wcprops b/i386/include/IOKit/system_management/.svn/all-wcprops deleted file mode 100644 index 3d336c3..0000000 --- a/i386/include/IOKit/system_management/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 70 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/system_management -END -IOWatchDogTimer.h -K 25 -svn:wc:ra_dav:version-url -V 88 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/system_management/IOWatchDogTimer.h -END diff --git a/i386/include/IOKit/system_management/.svn/entries b/i386/include/IOKit/system_management/.svn/entries deleted file mode 100644 index 0e7985e..0000000 --- a/i386/include/IOKit/system_management/.svn/entries +++ /dev/null @@ -1,62 +0,0 @@ -10 - -dir -2117 -http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/system_management -http://forge.voodooprojects.org/svn/chameleon - - - -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - -b5af796a-00a8-11df-919b-ffff7a100b7d - -IOWatchDogTimer.h -file - - - - -2012-10-03T17:50:20.000000Z -e2ec51de6352bd52efa9e10f4dcc69f0 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -2076 - diff --git a/i386/include/IOKit/system_management/.svn/text-base/IOWatchDogTimer.h.svn-base b/i386/include/IOKit/system_management/.svn/text-base/IOWatchDogTimer.h.svn-base deleted file mode 100644 index a89b95b..0000000 --- a/i386/include/IOKit/system_management/.svn/text-base/IOWatchDogTimer.h.svn-base +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOWATCHDOGTIMER_H -#define _IOWATCHDOGTIMER_H - -#include <IOKit/IOService.h> - -class IOWatchDogTimer : public IOService -{ - OSDeclareAbstractStructors(IOWatchDogTimer); - -protected: - IONotifier *notifier; - struct ExpansionData { }; - ExpansionData *reserved; - -public: - virtual bool start(IOService *provider); - virtual void stop(IOService *provider); - virtual IOReturn setProperties(OSObject *properties); - virtual void setWatchDogTimer(UInt32 timeOut) = 0; - - OSMetaClassDeclareReservedUnused(IOWatchDogTimer, 0); - OSMetaClassDeclareReservedUnused(IOWatchDogTimer, 1); - OSMetaClassDeclareReservedUnused(IOWatchDogTimer, 2); - OSMetaClassDeclareReservedUnused(IOWatchDogTimer, 3); -}; - -#endif /* !_IOWATCHDOGTIMER_H */ diff --git a/i386/include/IOKit/system_management/IOWatchDogTimer.h b/i386/include/IOKit/system_management/IOWatchDogTimer.h deleted file mode 100644 index a89b95b..0000000 --- a/i386/include/IOKit/system_management/IOWatchDogTimer.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOWATCHDOGTIMER_H -#define _IOWATCHDOGTIMER_H - -#include <IOKit/IOService.h> - -class IOWatchDogTimer : public IOService -{ - OSDeclareAbstractStructors(IOWatchDogTimer); - -protected: - IONotifier *notifier; - struct ExpansionData { }; - ExpansionData *reserved; - -public: - virtual bool start(IOService *provider); - virtual void stop(IOService *provider); - virtual IOReturn setProperties(OSObject *properties); - virtual void setWatchDogTimer(UInt32 timeOut) = 0; - - OSMetaClassDeclareReservedUnused(IOWatchDogTimer, 0); - OSMetaClassDeclareReservedUnused(IOWatchDogTimer, 1); - OSMetaClassDeclareReservedUnused(IOWatchDogTimer, 2); - OSMetaClassDeclareReservedUnused(IOWatchDogTimer, 3); -}; - -#endif /* !_IOWATCHDOGTIMER_H */ diff --git a/i386/include/IOKit/usb/.svn/all-wcprops b/i386/include/IOKit/usb/.svn/all-wcprops deleted file mode 100644 index 2069f31..0000000 --- a/i386/include/IOKit/usb/.svn/all-wcprops +++ /dev/null @@ -1,155 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 56 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb -END -USB.h -K 25 -svn:wc:ra_dav:version-url -V 62 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/USB.h -END -IOUSBControllerListElement.h -K 25 -svn:wc:ra_dav:version-url -V 85 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBControllerListElement.h -END -IOUSBBus.h -K 25 -svn:wc:ra_dav:version-url -V 67 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBBus.h -END -IOUSBControllerV2.h -K 25 -svn:wc:ra_dav:version-url -V 76 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBControllerV2.h -END -IOUSBMassStorageUFISubclass.h -K 25 -svn:wc:ra_dav:version-url -V 86 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBMassStorageUFISubclass.h -END -IOUSBControllerV3.h -K 25 -svn:wc:ra_dav:version-url -V 76 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBControllerV3.h -END -IOUSBPipe.h -K 25 -svn:wc:ra_dav:version-url -V 68 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBPipe.h -END -IOUSBHubDevice.h -K 25 -svn:wc:ra_dav:version-url -V 73 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBHubDevice.h -END -IOUSBDevice.h -K 25 -svn:wc:ra_dav:version-url -V 70 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBDevice.h -END -IOUSBInterface.h -K 25 -svn:wc:ra_dav:version-url -V 73 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBInterface.h -END -IOUFIStorageServices.h -K 25 -svn:wc:ra_dav:version-url -V 79 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUFIStorageServices.h -END -IOUSBRootHubDevice.h -K 25 -svn:wc:ra_dav:version-url -V 77 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBRootHubDevice.h -END -USBSpec.h -K 25 -svn:wc:ra_dav:version-url -V 66 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/USBSpec.h -END -USBTracepoints.h -K 25 -svn:wc:ra_dav:version-url -V 73 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/USBTracepoints.h -END -IOUSBWorkLoop.h -K 25 -svn:wc:ra_dav:version-url -V 72 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBWorkLoop.h -END -IOUSBUserClient.h -K 25 -svn:wc:ra_dav:version-url -V 74 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBUserClient.h -END -IOUSBMassStorageClass.h -K 25 -svn:wc:ra_dav:version-url -V 80 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBMassStorageClass.h -END -IOUSBHubPolicyMaker.h -K 25 -svn:wc:ra_dav:version-url -V 78 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBHubPolicyMaker.h -END -IOUSBCompositeDriver.h -K 25 -svn:wc:ra_dav:version-url -V 79 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBCompositeDriver.h -END -IOUSBCommand.h -K 25 -svn:wc:ra_dav:version-url -V 71 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBCommand.h -END -IOUSBHIDDriver.h -K 25 -svn:wc:ra_dav:version-url -V 73 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBHIDDriver.h -END -IOUSBLog.h -K 25 -svn:wc:ra_dav:version-url -V 67 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBLog.h -END -IOUSBController.h -K 25 -svn:wc:ra_dav:version-url -V 74 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBController.h -END -IOUSBNub.h -K 25 -svn:wc:ra_dav:version-url -V 67 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/IOUSBNub.h -END -USBHub.h -K 25 -svn:wc:ra_dav:version-url -V 65 -/svn/chameleon/!svn/ver/881/trunk/i386/include/IOKit/usb/USBHub.h -END diff --git a/i386/include/IOKit/usb/.svn/entries b/i386/include/IOKit/usb/.svn/entries deleted file mode 100644 index ffd827b..0000000 --- a/i386/include/IOKit/usb/.svn/entries +++ /dev/null @@ -1,878 +0,0 @@ -10 - -dir -2117 -http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/IOKit/usb -http://forge.voodooprojects.org/svn/chameleon - - - -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - -b5af796a-00a8-11df-919b-ffff7a100b7d - -USB.h -file - - - - -2012-10-03T17:50:20.000000Z -8bf23d0dad1a9225363c787a94ec58bc -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -45107 - -IOUSBControllerListElement.h -file - - - - -2012-10-03T17:50:20.000000Z -e919de00cc53e1f24ba901f60aa320e3 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -4738 - -IOUSBBus.h -file - - - - -2012-10-03T17:50:20.000000Z -ad6cbbbb1af98d5a96673d2b761ba9e5 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -1183 - -IOUSBControllerV2.h -file - - - - -2012-10-03T17:50:20.000000Z -5883ee016e6e171b318462f148c4d64d -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -20855 - -IOUSBMassStorageUFISubclass.h -file - - - - -2012-10-03T17:50:20.000000Z -378eb3a378af0fb004606ffed9d9136c -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -11928 - -IOUSBControllerV3.h -file - - - - -2012-10-03T17:50:20.000000Z -9932d9ac063d5f679fe298271057ead4 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -12479 - -IOUSBPipe.h -file - - - - -2012-10-03T17:50:20.000000Z -5b768a7a705b59ee7b8165ebb65fbcdf -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -17471 - -IOUSBHubDevice.h -file - - - - -2012-10-03T17:50:20.000000Z -e2d30f06c2626b944387f533cd6d0828 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -10211 - -IOUSBDevice.h -file - - - - -2012-10-03T17:50:20.000000Z -7e6687d8ebc8537c69885481626bcce5 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -28373 - -IOUSBInterface.h -file - - - - -2012-10-03T17:50:20.000000Z -59d558e91299bdbcd54eca2005080b56 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -12213 - -IOUFIStorageServices.h -file - - - - -2012-10-03T17:50:20.000000Z -60a9064a8b4272e667e4a57281afbb3f -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -4777 - -IOUSBRootHubDevice.h -file - - - - -2012-10-03T17:50:20.000000Z -4c9f61f93aca3228f4c7556b0056821e -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -3376 - -USBSpec.h -file - - - - -2012-10-03T17:50:20.000000Z -3136341088b9dbc0e613e3beb7ba1af8 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -15028 - -USBTracepoints.h -file - - - - -2012-10-03T17:50:20.000000Z -b1631300f3a48e7b698ab3e4baf60dd3 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -20349 - -IOUSBWorkLoop.h -file - - - - -2012-10-03T17:50:20.000000Z -4b4594c45a9238ed70acee961217da1d -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -2000 - -IOUSBUserClient.h -file - - - - -2012-10-03T17:50:20.000000Z -f22ed4f18efbd8826acc1a651f368cca -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -5331 - -IOUSBMassStorageClass.h -file - - - - -2012-10-03T17:50:20.000000Z -51cb0b7ba0d53f61721664ef0325a539 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -17705 - -IOUSBHubPolicyMaker.h -file - - - - -2012-10-03T17:50:20.000000Z -138fe70e48636d05d0b66dfc39842385 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -9227 - -IOUSBCompositeDriver.h -file - - - - -2012-10-03T17:50:20.000000Z -1de600100621201d642fb2bb395f9758 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -5382 - -IOUSBCommand.h -file - - - - -2012-10-03T17:50:20.000000Z -af982f7c12ee99330cb6ffaa73b32a03 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -10859 - -IOUSBHIDDriver.h -file - - - - -2012-10-03T17:50:20.000000Z -1d0f69397c09ecc6c1a685d252418bd6 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -11853 - -IOUSBLog.h -file - - - - -2012-10-03T17:50:20.000000Z -79f3680f444a5eb350afeec515f05e49 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -7979 - -IOUSBController.h -file - - - - -2012-10-03T17:50:20.000000Z -e5238919996dfc66485bb3f01e35de2e -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -50775 - -IOUSBNub.h -file - - - - -2012-10-03T17:50:20.000000Z -e436676a1824525edd3ef6f8ee62f088 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -2165 - -USBHub.h -file - - - - -2012-10-03T17:50:20.000000Z -7f59dcf439d351c5f6e8b4bb4ecceb9b -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -7420 - diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUFIStorageServices.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUFIStorageServices.h.svn-base deleted file mode 100644 index cac43f4..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUFIStorageServices.h.svn-base +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_UFI_STORAGE_SERVICES_H_ -#define _IOKIT_UFI_STORAGE_SERVICES_H_ - -#if defined(KERNEL) && defined(__cplusplus) - -#include <IOKit/IOTypes.h> -#include <IOKit/storage/IOBlockStorageDevice.h> -#include <IOKit/usb/IOUSBMassStorageUFISubclass.h> - - -class IOUFIStorageServices : public IOBlockStorageDevice -{ - - OSDeclareDefaultStructors ( IOUFIStorageServices ) - -private: - bool fMediaChanged; - bool fMediaPresent; - -protected: - - IOUSBMassStorageUFIDevice * fProvider; - - UInt64 fMaxReadBlocks; - UInt64 fMaxWriteBlocks; - - virtual bool attach ( IOService * provider ); - virtual void detach ( IOService * provider ); - - // Reserve space for future expansion. - struct IOUFIStorageServicesExpansionData { }; - IOUFIStorageServicesExpansionData *fIOUFIStorageServicesReserved; - -public: - - virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); - - static void AsyncReadWriteComplete ( void * clientData, - IOReturn status, - UInt64 actualByteCount ); - - // Deprecated - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageAttributes * attributes, - IOStorageCompletion * completion ); - - virtual IOReturn doSyncReadWrite ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks ); - - virtual IOReturn doEjectMedia ( void ); - - virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); - - virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - - virtual IOReturn doLockUnlockMedia ( bool doLock ); - - virtual IOReturn doSynchronizeCache ( void ); - - virtual char * getVendorString ( void ); - - virtual char * getProductString ( void ); - - virtual char * getRevisionString ( void ); - - virtual char * getAdditionalDeviceInfoString ( void ); - - virtual IOReturn reportBlockSize ( UInt64 * blockSize ); - - virtual IOReturn reportEjectability ( bool * isEjectable ); - - virtual IOReturn reportLockability ( bool * isLockable ); - - virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); - - virtual IOReturn reportPollRequirements ( bool * pollIsRequired, - bool * pollIsExpensive ); - - virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); - - virtual IOReturn reportRemovability ( bool * isRemovable ); - - virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); - - virtual IOReturn getWriteCacheState ( bool * enabled ); - - virtual IOReturn setWriteCacheState ( bool enabled ); - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 1 ); - OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 2 ); - OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 3 ); - OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 4 ); - OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 5 ); - OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 6 ); - OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 7 ); - OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_UFI_STORAGE_SERVICES_H_ */ diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBBus.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBBus.h.svn-base deleted file mode 100644 index a42191a..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBBus.h.svn-base +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBBUS_H -#define _IOKIT_IOUSBBUS_H - -#include <IOKit/IOService.h> - -class IOUSBBus : public IOService -{ - OSDeclareAbstractStructors(IOUSBBus) -}; - -#endif /* ! _IOKIT_IOUSBBUS_H */ - diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBCommand.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBCommand.h.svn-base deleted file mode 100644 index 0f7c36b..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBCommand.h.svn-base +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBCOMMAND_H -#define _IOKIT_IOUSBCOMMAND_H - -#include <IOKit/IOCommand.h> -#include <IOKit/IOCommandPool.h> -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IODMACommand.h> -#include <IOKit/usb/USB.h> - -/* - * USB Command - * This is the command block for a USB command to be queued on the - * Command Gate of the WorkLoop. Although the actual work of creating - * the command and enqueueing it is done for them via the deviceRequest, - * read, and write methods, this is the primary way that devices will get - * work done. - * Note: This is private to IOUSBController and should be moved to a - * private header. - */ - -typedef enum { - DEVICE_REQUEST, // Device request using pointer - READ, - WRITE, - CREATE_EP, - DELETE_EP, - DEVICE_REQUEST_DESC, // Device request using descriptor - DEVICE_REQUEST_BUFFERCOMMAND // Device request using a second IOUSBCommand in _bufferCommand -} usbCommand; - - - -/*! - @class IOUSBCommand - @abstract A subclass of IOCommand that is used to add USB specific data. - */ -class IOUSBCommand : public IOCommand -{ - OSDeclareAbstractStructors(IOUSBCommand) - -protected: - usbCommand _selector; - IOUSBDeviceRequestPtr _request; - USBDeviceAddress _address; - UInt8 _endpoint; - UInt8 _direction; - UInt8 _type; - bool _bufferRounding; - IOMemoryDescriptor * _buffer; - IOUSBCompletion _uslCompletion; - IOUSBCompletion _clientCompletion; - UInt32 _dataRemaining; // For Control transfers - UInt8 _stage; // For Control transfers - IOReturn _status; - IOMemoryDescriptor * _origBuffer; - IOUSBCompletion _disjointCompletion; - IOByteCount _dblBufLength; - UInt32 _noDataTimeout; - UInt32 _completionTimeout; - UInt32 _UIMScratch[10]; - - struct ExpansionData - { - IOByteCount _reqCount; - IOMemoryDescriptor *_requestMemoryDescriptor; - IOMemoryDescriptor *_bufferMemoryDescriptor; - bool _multiTransferTransaction; - bool _finalTransferInTransaction; - bool _useTimeStamp; - AbsoluteTime _timeStamp; - bool _isSyncTransfer; // Returns true if the command is used for a synchronous transfer - IODMACommand *_dmaCommand; // used to get memory mapping - IOUSBCommand *_bufferUSBCommand; // points to another IOUSBCommand used for phase 2 of control transactions - IOUSBCommand *_masterUSBCommand; // points from the bufferUSBCommand back to the parent command - }; - ExpansionData * _expansionData; - - // we override these OSObject method in order to allocate and release our expansion data - virtual bool init(); - virtual void free(); - -public: - - // static constructor - static IOUSBCommand * NewCommand(void); - - // Manipulators - void SetSelector(usbCommand sel); - void SetRequest(IOUSBDeviceRequestPtr req); - void SetAddress(USBDeviceAddress addr); - void SetEndpoint(UInt8 ep); - void SetDirection(UInt8 dir); - void SetType(UInt8 type); - void SetBufferRounding(bool br); - void SetBuffer(IOMemoryDescriptor *buf); - void SetUSLCompletion(IOUSBCompletion completion); - void SetClientCompletion(IOUSBCompletion completion); - void SetDataRemaining(UInt32 dr); - void SetStage(UInt8 stage); - void SetStatus(IOReturn stat); - void SetOrigBuffer(IOMemoryDescriptor *buf); - void SetDisjointCompletion(IOUSBCompletion completion); - void SetDblBufLength(IOByteCount len); - void SetNoDataTimeout(UInt32 to); - void SetCompletionTimeout(UInt32 to); - void SetUIMScratch(UInt32 index, UInt32 value); - void SetReqCount(IOByteCount reqCount); - void SetRequestMemoryDescriptor(IOMemoryDescriptor *requestMemoryDescriptor); - void SetBufferMemoryDescriptor(IOMemoryDescriptor *bufferMemoryDescriptor); - void SetMultiTransferTransaction(bool); - void SetFinalTransferInTransaction(bool); - void SetUseTimeStamp(bool); - void SetTimeStamp(AbsoluteTime timeStamp); - void SetIsSyncTransfer(bool); - inline void SetDMACommand(IODMACommand *dmaCommand) { _expansionData->_dmaCommand = dmaCommand; } - void SetBufferUSBCommand(IOUSBCommand *bufferUSBCommand); - - // Accessors - usbCommand GetSelector(void); - IOUSBDeviceRequestPtr GetRequest(void); - USBDeviceAddress GetAddress(void); - UInt8 GetEndpoint(void); - UInt8 GetDirection(void); - UInt8 GetType(void); - bool GetBufferRounding(void); - IOMemoryDescriptor * GetBuffer(void); - IOUSBCompletion GetUSLCompletion(void); - IOUSBCompletion GetClientCompletion(void); - UInt32 GetDataRemaining(void); - UInt8 GetStage(void); - IOReturn GetStatus(void); - IOMemoryDescriptor * GetOrigBuffer(void); - IOUSBCompletion GetDisjointCompletion(void); - IOByteCount GetDblBufLength(void); - UInt32 GetNoDataTimeout(void); - UInt32 GetCompletionTimeout(void); - UInt32 GetUIMScratch(UInt32 index); - IOByteCount GetReqCount(void); - IOMemoryDescriptor * GetRequestMemoryDescriptor(void); - IOMemoryDescriptor * GetBufferMemoryDescriptor(void); - bool GetMultiTransferTransaction(void); - bool GetFinalTransferInTransaction(void); - bool GetUseTimeStamp(void); - AbsoluteTime GetTimeStamp(void); - bool GetIsSyncTransfer(void); - inline IODMACommand * GetDMACommand(void) {return _expansionData->_dmaCommand; } - inline IOUSBCommand * GetBufferUSBCommand(void) {return _expansionData->_bufferUSBCommand; } -}; - - -class IOUSBIsocCommand : public IOCommand -{ - OSDeclareAbstractStructors(IOUSBIsocCommand) - -protected: - usbCommand _selector; - USBDeviceAddress _address; - UInt8 _endpoint; - UInt8 _direction; - IOMemoryDescriptor * _buffer; - IOUSBIsocCompletion _completion; - UInt64 _startFrame; - UInt32 _numFrames; - IOUSBIsocFrame * _frameList; - IOReturn _status; - - struct ExpansionData - { - UInt32 _updateFrequency; - bool _useTimeStamp; - AbsoluteTime _timeStamp; - bool _isSyncTransfer; // Returns true if the command is used for a synchronous transfer - bool _rosettaClient; - IODMACommand * _dmaCommand; - IOUSBIsocCompletion _uslCompletion; - bool _lowLatency; - }; - ExpansionData * _expansionData; - - // we override these OSObject method in order to allocate and release our expansion data - virtual bool init(); - virtual void free(); - -public: - // static constructor - static IOUSBIsocCommand *NewCommand(void); - - // Manipulators - void SetSelector(usbCommand sel) {_selector = sel; } - void SetAddress(USBDeviceAddress addr) {_address = addr; } - void SetEndpoint(UInt8 ep) {_endpoint = ep; } - void SetDirection(UInt8 dir) {_direction = dir; } - void SetBuffer(IOMemoryDescriptor *buf) {_buffer = buf; } - void SetCompletion(IOUSBIsocCompletion completion) {_completion = completion; } - void SetStartFrame(UInt64 sf) {_startFrame = sf; } - void SetNumFrames(UInt32 nf) {_numFrames = nf; } - void SetFrameList(IOUSBIsocFrame *fl) {_frameList = fl; } - void SetStatus(IOReturn stat) {_status = stat; } - void SetUpdateFrequency( UInt32 fr) { _expansionData->_updateFrequency = fr; } - void SetUseTimeStamp(bool useIt) { _expansionData->_useTimeStamp= useIt; } - void SetTimeStamp(AbsoluteTime timeStamp) { _expansionData->_timeStamp= timeStamp; } - void SetIsSyncTransfer(bool isSync) { _expansionData->_isSyncTransfer = isSync; } - void SetRosettaClient(bool isRosetta) { _expansionData->_rosettaClient = isRosetta; } - void SetDMACommand(IODMACommand *dmaCommand) { _expansionData->_dmaCommand = dmaCommand; } - void SetUSLCompletion(IOUSBIsocCompletion completion) { _expansionData->_uslCompletion = completion; } - void SetLowLatency(bool lowLatency) { _expansionData->_lowLatency = lowLatency; } - - // Accessors - usbCommand GetSelector(void) { return _selector; } - USBDeviceAddress GetAddress(void) { return _address; } - UInt8 GetEndpoint(void) { return _endpoint; } - UInt8 GetDirection(void) { return _direction; } - IOMemoryDescriptor * GetBuffer(void) { return _buffer; } - IOUSBIsocCompletion GetCompletion(void) { return _completion; } - UInt64 GetStartFrame(void) { return _startFrame; } - UInt32 GetNumFrames(void) { return _numFrames; } - IOUSBIsocFrame * GetFrameList(void) { return _frameList; } - UInt32 GetUpdateFrequency(void) { return _expansionData->_updateFrequency; } - IOReturn GetStatus(void) { return _status; } - bool GetUseTimeStamp(void) { return _expansionData->_useTimeStamp; } - AbsoluteTime GetTimeStamp(void) { return _expansionData->_timeStamp; } - bool GetIsSyncTransfer(void) { return _expansionData->_isSyncTransfer; } - bool GetIsRosettaClient(void) { return _expansionData->_rosettaClient; } - IODMACommand * GetDMACommand(void) { return _expansionData->_dmaCommand; } - IOUSBIsocCompletion GetUSLCompletion(void) { return _expansionData->_uslCompletion; } - bool GetLowLatency(void) { return _expansionData->_lowLatency; } -}; - -class IOUSBCommandPool : public IOCommandPool -{ - OSDeclareDefaultStructors( IOUSBCommandPool ) - -protected: - virtual IOReturn gatedReturnCommand(IOCommand * command); - virtual IOReturn gatedGetCommand(IOCommand ** command, bool blockForCommand); - -public: - static IOCommandPool * withWorkLoop(IOWorkLoop * inWorkLoop); -}; - - -#endif - diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBCompositeDriver.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBCompositeDriver.h.svn-base deleted file mode 100644 index ef72cf4..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBCompositeDriver.h.svn-base +++ /dev/null @@ -1,127 +0,0 @@ -/* - * - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1998-2006 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBCompositeDriver_H -#define _IOKIT_IOUSBCompositeDriver_H - -//================================================================================================ -// -// Headers -// -//================================================================================================ -// -#include <libkern/OSByteOrder.h> -#include <IOKit/IOLib.h> -#include <IOKit/IONotifier.h> -#include <IOKit/IOService.h> -#include <IOKit/IOMessage.h> -#include <IOKit/usb/IOUSBBus.h> -#include <IOKit/usb/IOUSBDevice.h> -#include <IOKit/usb/IOUSBInterface.h> -#include <IOKit/usb/IOUSBLog.h> -#include <IOKit/usb/USB.h> - - -//================================================================================================ -// -// Class Declaration for IOUSBCompositeDriver -// -//================================================================================================ -// -/*! - @class IOUSBCompositeDriver - @abstract Driver that matches to USB composite devices. - @discussion This class can be overriden to provide for specific behaviors. The driver itself essentially - just calls SetConfiguration(). - */ -class IOUSBCompositeDriver : public IOService -{ - OSDeclareDefaultStructors(IOUSBCompositeDriver) - - IOUSBDevice * fDevice; - IONotifier * fNotifier; - bool fExpectingClose; - UInt8 fConfigValue; - UInt8 fConfigbmAttributes; - - struct IOUSBCompositeDriverExpansionData - { - }; - - IOUSBCompositeDriverExpansionData * fIOUSBCompositeExpansionData; - - static IOReturn CompositeDriverInterestHandler( void * target, void * refCon, UInt32 messageType, IOService * provider, void * messageArgument, vm_size_t argSize ); - -public: - - // IOService Methods - // - virtual bool start(IOService * provider); - virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); - virtual bool willTerminate( IOService * provider, IOOptionBits options ); - virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer ); - - // IOUSBCompositeDriver Methods - // - virtual bool ConfigureDevice(); - virtual IOReturn ReConfigureDevice(); - /*! - @function SetConfiguration - @abstract Call IOUSBDevice to do a SetConfiguration call to the device. - @param configValue The desired configuration value. - @param startInterfaceMatching A boolean specifying whether IOKit should begin the process of finding - matching drivers for the new IOUSBInterface objects. - */ - virtual IOReturn SetConfiguration(UInt8 configValue, bool startInterfaceMatching=true); - - // Getters - // - bool GetExpectingClose() { return fExpectingClose; } - UInt8 GetConfigValue() { return fConfigValue; } - UInt8 GetConfigbmAttributes() { return fConfigbmAttributes; } - IONotifier * GetNotifier() { return fNotifier; } - - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 0); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 1); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 2); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 3); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 4); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 5); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 6); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 7); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 8); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 9); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 10); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 11); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 12); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 13); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 14); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 15); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 16); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 17); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 18); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 19); -}; - -#endif _IOKIT_IOUSBCompositeDriver_H diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBController.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBController.h.svn-base deleted file mode 100644 index 18940f2..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBController.h.svn-base +++ /dev/null @@ -1,1073 +0,0 @@ -/* - * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.2 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBCONTROLLER_H -#define _IOKIT_IOUSBCONTROLLER_H - -//================================================================================================ -// -// Headers -// -//================================================================================================ -// -#include <libkern/c++/OSArray.h> - -#include <IOKit/IOService.h> -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IODeviceMemory.h> -#include <IOKit/IOWorkLoop.h> -#include <IOKit/IOCommandGate.h> -#include <IOKit/IOCommandPool.h> - -#include <IOKit/usb/USB.h> -#include <IOKit/usb/USBHub.h> -#include <IOKit/usb/IOUSBBus.h> -#include <IOKit/usb/IOUSBNub.h> -#include <IOKit/usb/IOUSBCommand.h> -#include <IOKit/usb/IOUSBWorkLoop.h> - - -//================================================================================================ -// -// Types and Constants -// -//================================================================================================ -// -enum -{ - kErrataCMDDisableTestMode = (1 << 0), // turn off UHCI test mode - kErrataOnlySinglePageTransfers = (1 << 1), // Don't cross page boundaries in a single transfer - kErrataRetryBufferUnderruns = (1 << 2), // Don't cross page boundaries in a single transfer - kErrataLSHSOpti = (1 << 3), // Don't cross page boundaries in a single transfer - kErrataDisableOvercurrent = (1 << 4), // Always set the NOCP bit in rhDescriptorA register - kErrataLucentSuspendResume = (1 << 5), // Don't allow port suspend at the root hub - kErrataNeedsWatchdogTimer = (1 << 6), // Use Watchdog timer to reset confused controllers - kErrataNeedsPortPowerOff = (1 << 7), // Power off the ports and back on again to clear weird status. - kErrataAgereEHCIAsyncSched = (1 << 8), // needs workaround for Async Sched bug - kErrataNECOHCIIsochWraparound = (1 << 9), // needs workaround for NEC isoch buffer wraparound problem - kErrataNECIncompleteWrite = (1 << 10), // needs workaround for NEC bits not sticking (errata IBB-2UE-00030 Jun 23 2005) - kErrataICH6PowerSequencing = (1 << 11), // needs special power sequencing for early Transition machines - kErrataICH7ISTBuffer = (1 << 12), // buffer for Isochronous Scheduling Threshold - kErrataUHCISupportsOvercurrent = (1 << 13), // UHCI controller supports overcurrent detection - kErrataNeedsOvercurrentDebounce = (1 << 14), // The overcurrent indicator should be debounced by 10ms - kErrataSupportsPortResumeEnable = (1 << 15), // UHCI has resume enable bits at config address 0xC4 - kErrataNoCSonSplitIsoch = (1 << 16), // MCP79 - split iscoh is a little different - kErrataOHCINoGlobalSuspendOnSleep = (1 << 17), // when sleeping, do not put the OHCI controller in SUSPEND state. just leave it Operational with suspended downstream ports - kErrataMissingPortChangeInt = (1 << 18), // sometimes the port change interrupt may be missing - kErrataMCP79IgnoreDisconnect = (1 << 19), // MCP79 - need to ignore a connect/disconnect on wake - kErrataUse32bitEHCI = (1 << 20) , // MCP79 - EHCI should only run with 32 bit DMA addresses - kErrataUHCISupportsResumeDetectOnConnect = (1 << 21), // UHCI controller will generate a ResumeDetect interrupt while in Global Suspend if a device is plugged in - kErrataDontUseCompanionController = (1 << 22) // For systems which will end up being EHCI only -}; - -enum -{ - kUSBWatchdogTimeoutMS = 1000 -}; - - -/*! - @struct - @discussion This table contains the list of errata that are necessary for known problems with particular devices. - The format is vendorID, product ID, lowest revisionID needing errata, highest rev needing errata, errataBits. - The result of all matches is ORed together, so more than one entry may match. - Typically for a given errata a list of revisions that this applies to is supplied. - @field vendID The Vendor ID of the device - @field deviceID Product ID of device - @field revisionLo Lowest product revsion to apply errata to - @field revisionHi Highest product revision to apply errata to - @field errata Bit field flagging which errata to apply to device. -*/ - -struct ErrataListEntryStruct -{ - UInt16 vendID; - UInt16 deviceID; - UInt16 revisionLo; - UInt16 revisionHi; - UInt32 errata; -}; - -typedef struct ErrataListEntryStruct ErrataListEntry, *ErrataListEntryPtr; - - -//================================================================================================ -// -// Routines used to implement synchronous I/O -// -//================================================================================================ -// -void IOUSBSyncCompletion(void *target, void * parameter, IOReturn status, UInt32 bufferSizeRemaining); - -void IOUSBSyncIsoCompletion(void *target, void * parameter, IOReturn status, IOUSBIsocFrame *pFrames); - - -//================================================================================================ -// -// Forward Declarations -// -//================================================================================================ -// -class IOUSBDevice; -class IOUSBLog; -class IOUSBHubDevice; -class IOUSBRootHubDevice; -class IOMemoryDescriptor; - - -//================================================================================================ -// -// IOUSBController Class -// -//================================================================================================ -// -/*! - @class IOUSBController - @abstract Base class for USB hardware driver - @discussion Not many directly useful methods for USB device driver writers, - IOUSBDevice, IOUSBInterface and IOUSBPipe provide more useful abstractions. - The bulk of this class interfaces between IOKit and the low-level UIM, which is - based on the MacOS9 UIM. To impliment a new controller type, subclass - IOUSBController and impiment all the "UIM functions". AppleUSBOHCI - is an example of this implementing all the functions necessary to drive an - OHCI controller. -*/ -class IOUSBController : public IOUSBBus -{ - OSDeclareAbstractStructors(IOUSBController) - friend class IOUSBControllerV2; - friend class IOUSBControllerV3; - -protected: - - IOUSBWorkLoop * _workLoop; - IOCommandGate * _commandGate; - IOUSBRootHubDevice * _rootHubDevice; - UInt32 _devZeroLock; - static UInt32 _busCount; - static bool gUsedBusIDs[256]; - - struct ExpansionData - { - IOCommandPool *freeUSBCommandPool; - IOCommandPool *freeUSBIsocCommandPool; - IOTimerEventSource *watchdogUSBTimer; - bool _terminating; - bool _watchdogTimerActive; - bool _pcCardEjected; // Obsolete - UInt32 _busNumber; - UInt32 _currentSizeOfCommandPool; - UInt32 _currentSizeOfIsocCommandPool; - UInt8 _controllerSpeed; // Controller speed, passed down for splits - thread_call_t _terminatePCCardThread; // Obsolete - bool _addressPending[128]; - SInt32 _activeIsochTransfers; // isochronous transfers in the queue - IOService *_provider; // common name for our provider - bool _controllerCanSleep; // true iff the controller is able to support sleep/wake - bool _needToClose; - UInt32 _isochMaxBusStall; // value (in ns) of the maximum PCI bus stall allowed for Isoch.. - }; - ExpansionData *_expansionData; - - // The following methods do not use and upper case initial letter because they are part of IOKit - // - -public: - virtual bool init( OSDictionary * propTable ); - virtual bool start( IOService * provider ); - virtual void stop( IOService * provider ); - virtual bool finalize(IOOptionBits options); - virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); - virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer ); - -protected: - - IOReturn getNubResources( IOService * regEntry ); - - virtual UInt32 GetErrataBits( - UInt16 vendorID, - UInt16 deviceID, - UInt16 revisionID ); - - - static IOReturn DoDeleteEP( - OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - - static IOReturn DoAbortEP( - OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - - static IOReturn DoClearEPStall( - OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - - static IOReturn DoCreateEP( - OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - static IOReturn DoControlTransfer( - OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - - static IOReturn DoIOTransfer( - OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - - static IOReturn DoIsocTransfer( - OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - - static IOReturn DoLowLatencyIsocTransfer( - OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - - static void ControlPacketHandler( - OSObject * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining ); - - static void InterruptPacketHandler( - OSObject * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining ); - - static void BulkPacketHandler( - OSObject * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining ); - - static void IsocCompletionHandler( - OSObject * target, - void * parameter, - IOReturn status, - IOUSBIsocFrame *pFrames ); - - static void LowLatencyIsocCompletionHandler( - OSObject * target, - void * parameter, - IOReturn status, - IOUSBLowLatencyIsocFrame *pFrames ); - - static void WatchdogTimer(OSObject *target, IOTimerEventSource *sender); - - // Obsolete - static void TerminatePCCard(OSObject *target); - - static IOReturn ProtectedDevZeroLock(OSObject *target, void* lock, void *, void *, void*); - - - USBDeviceAddress GetNewAddress( void ); - - IOReturn ControlTransaction( IOUSBCommand * command ); - - IOReturn InterruptTransaction( IOUSBCommand * command ); - - IOReturn BulkTransaction( IOUSBCommand * command ); - - IOReturn IsocTransaction( IOUSBIsocCommand * command ); - - IOReturn LowLatencyIsocTransaction( IOUSBIsocCommand * command ); - - void FreeCommand( IOUSBCommand * command ); - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Invokes the specified completion action of the request. If - // the completion action is unspecified, no action is taken. - void Complete( - IOUSBCompletion completion, - IOReturn status, - UInt32 actualByteCount = 0 ); - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Invokes the specified completion action of the request. If - // the completion action is unspecified, no action is taken. - void CompleteWithTimeStamp ( - IOUSBCompletionWithTimeStamp completion, - IOReturn status, - UInt32 actualByteCount, - AbsoluteTime timeStamp); - - - - // - // UIM methods - // - -/*! - @function UIMInitialize - @abstract UIM function, initialise the controller and UIM data structures. -*/ - virtual IOReturn UIMInitialize( IOService * provider ) = 0; - -/*! - @function UIMFinalize - @abstract UIM function, finalise the controller and UIM data structures prior to removal. -*/ - virtual IOReturn UIMFinalize() = 0; - - // Control -/*! - @function UIMCreateControlEndpoint - @abstract UIM function, create a control endpoint for the controller. - @param functionNumber The USB device ID of the device for this endpoint - @param endpointNumber The endpoint number for this endpoint - @param maxPacketSize Maximum packet size of this endpoint - @param speed speed of the device: kUSBDeviceSpeedLow or kUSBDeviceSpeedFull -*/ - virtual IOReturn UIMCreateControlEndpoint( - UInt8 functionNumber, - UInt8 endpointNumber, - UInt16 maxPacketSize, - UInt8 speed) = 0; - -/* Note: this function has been superceded. */ - virtual IOReturn UIMCreateControlTransfer( short functionNumber, - short endpointNumber, - IOUSBCompletion completion, - void * CBP, - bool bufferRounding, - UInt32 bufferSize, - short direction) = 0; - -/*! - @function UIMCreateControlTransfer - @abstract UIM function, Do a transfer on a control endpoint. - This method supercedes the method which takes a void * parameter. - @param functionNumber The USB device ID of the device to perform the transaction with - @param endpointNumber The endpoint number for the transaction - @param completion Action to perform when I/O completes - @param CBP Memory descriptor describing the buffer to transfer. Will never describe - memory which has disjoint packets. - @param bufferRounding If true, short packets are OK and do not cause an error - @param bufferSize Size of the data to transfer in the data phase. (C - @param direction Specifies direction and PID for transaction. kUSBIn, KUSBOut (DATA PID) or kUSBSetup (SETUP PID). -*/ - virtual IOReturn UIMCreateControlTransfer( short functionNumber, - short endpointNumber, - IOUSBCompletion completion, - IOMemoryDescriptor * CBP, - bool bufferRounding, - UInt32 bufferSize, - short direction) = 0; - - // Bulk -/*! - @function UIMCreateBulkEndpoint - @abstract UIM function, create a bulk endpoint for the controller. - @param functionNumber The USB device ID of the device for this endpoint - @param endpointNumber The endpoint number for this endpoint - @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. - @param speed speed of the device: kUSBDeviceSpeedLow or kUSBDeviceSpeedFull - @param maxPacketSize Maximum packet size of this endpoint -*/ - virtual IOReturn UIMCreateBulkEndpoint( - UInt8 functionNumber, - UInt8 endpointNumber, - UInt8 direction, - UInt8 speed, - UInt8 maxPacketSize) = 0; - -/* Note: this function has been superceded. */ - virtual IOReturn UIMCreateBulkTransfer( short functionNumber, - short endpointNumber, - IOUSBCompletion completion, - IOMemoryDescriptor * CBP, - bool bufferRounding, - UInt32 bufferSize, - short direction) = 0; - - // Interrupt -/*! - @function UIMCreateInterruptEndpoint - @abstract UIM function, create an interrupt endpoint for the controller. - @param functionNumber The USB device ID of the device for this endpoint - @param endpointNumber The endpoint number for this endpoint - @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. - @param speed speed of the device: kUSBDeviceSpeedLow or kUSBDeviceSpeedFull - @param maxPacketSize Maximum packet size of this endpoint - @param pollingRate The maximum polling interval from the endpoint descriptor. -*/ - virtual IOReturn UIMCreateInterruptEndpoint( - short functionAddress, - short endpointNumber, - UInt8 direction, - short speed, - UInt16 maxPacketSize, - short pollingRate) = 0; - -/* Note: this function has been superceded. */ - virtual IOReturn UIMCreateInterruptTransfer( short functionNumber, - short endpointNumber, - IOUSBCompletion completion, - IOMemoryDescriptor * CBP, - bool bufferRounding, - UInt32 bufferSize, - short direction) = 0; - - // Isoch -/*! - @function UIMCreateIsochEndpoint - @abstract Create an Isochronous endpoint in the controller. - @param functionNumber The USB device ID of the device for this endpoint - @param endpointNumber The endpoint number for this endpoint - @param maxPacketSize Maximum packet size of this endpoint - @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. -*/ - virtual IOReturn UIMCreateIsochEndpoint( - short functionAddress, - short endpointNumber, - UInt32 maxPacketSize, - UInt8 direction) = 0; - -/*! - @function UIMCreateIsochTransfer - @abstract UIM function, Do a transfer on an Isocchronous endpoint. - @param functionNumber The USB device ID of the device to perform the transaction with - @param endpointNumber The endpoint number for the transaction - @param completion Action to perform when I/O completes - @param direction Specifies direction for transfer. kUSBIn or KUSBOut. - @param frameStart The frame number in which to start the transactions - @param pBuffer describes memory buffer. - @param frameCount number of frames to do transactions in - @param pFrames Describes transactions in individual frames, gives sizes and reults for transactions. -*/ - virtual IOReturn UIMCreateIsochTransfer( - short functionAddress, - short endpointNumber, - IOUSBIsocCompletion completion, - UInt8 direction, - UInt64 frameStart, - IOMemoryDescriptor * pBuffer, - UInt32 frameCount, - IOUSBIsocFrame *pFrames) = 0; - -/*! - @function UIMAbortEndpoint - @abstract UIM function Abort the specified endpoint, return all transactions queued on it. - @param functionNumber The USB device ID of the device to Abort - @param endpointNumber The endpoint number to Abort - @param direction Specifies direction of the endpoint for uniqueness. kUSBIn or KUSBOut. -*/ - virtual IOReturn UIMAbortEndpoint( - short functionNumber, - short endpointNumber, - short direction) = 0; - -/*! - @function UIMDeleteEndpoint - @abstract UIM function Delete the specified endpoint, returning all transactions queued on it. - @param functionNumber The USB device ID of the device to Delete - @param endpointNumber The endpoint number to Delete - @param direction Specifies direction of the endpoint for uniqueness. kUSBIn or KUSBOut. -*/ - virtual IOReturn UIMDeleteEndpoint( - short functionNumber, - short endpointNumber, - short direction) = 0; - -/*! - @function UIMClearEndpointStall - @abstract UIM function Clear stall on the specified endpoint, set data toggle to zero, - return all transactions queued on it. - @param functionNumber The USB device ID of the device to Clear - @param endpointNumber The endpoint number to Clear - @param direction Specifies direction of the endpoint for uniqueness. kUSBIn or KUSBOut. -*/ - virtual IOReturn UIMClearEndpointStall( - short functionNumber, - short endpointNumber, - short direction) = 0; - -/*! - @function UIMRootHubStatusChange - @abstract UIM function UIMRootHubStatusChange - This method was internal to the UIM (never called by the superclass) until - IOUSBControllerV3. For UIMs which are a subclass of IOUSBController or IOUSBControllerV2, it can - still be used internally only. For subclasses of IOUSBControllerV3, however, the meaning has changed - slightly. Now, it is used to determine if there is a status change on the root hub, and if so, it - needs to update the IOUSBControllerV3 instance variable _rootHubStatusChangedBitmap -*/ - virtual void UIMRootHubStatusChange(void) = 0; - - static const IORegistryPlane *gIOUSBPlane; - -public: - - static IOUSBLog *_log; - - IOCommandGate * GetCommandGate(void); - - /*! - @struct Endpoint - Describes an endpoint of a device. - Simply an easier to use version of the endpoint descriptor. - @field descriptor The raw endpoint descriptor. - @field number Endpoint number - @field direction Endpoint direction: kUSBOut, kUSBIn, kUSBAnyDirn - @field transferType Type of endpoint: kUSBControl, kUSBIsoc, kUSBBulk, kUSBInterrupt - @field maxPacketSize Maximum packet size for endpoint - @field interval Polling interval in milliseconds (only relevent for Interrupt endpoints) - */ - struct Endpoint { - IOUSBEndpointDescriptor * descriptor; - UInt8 number; - UInt8 direction; // in, out - UInt8 transferType; // cntrl, bulk, isoc, int - UInt16 maxPacketSize; - UInt8 interval; - }; - - // Implements IOService::getWorkLoop const member function - virtual IOWorkLoop * getWorkLoop() const; - - /* - * Root hub methods - * Only of interest to the IOUSBRootHubDevice object - */ -/*! - @function GetRootHubDeviceDescriptor - @abstract UIM function, return the device descriptor of the simulated root hub device - As GET_DESCRIPTOR control request for device descrptor - @param desc Descriptor structure to return data in -*/ - virtual IOReturn GetRootHubDeviceDescriptor( IOUSBDeviceDescriptor *desc ) = 0; - -/*! - @function GetRootHubDescriptor - @abstract UIM function, return the hub descriptor of the simulated root hub device - As GET_DESCRIPTOR control request for hub descrptor - @param desc Descriptor structure to return data in -*/ - virtual IOReturn GetRootHubDescriptor( IOUSBHubDescriptor *desc ) = 0; - -/*! - @function SetRootHubDescriptor - @abstract UIM function, optional. Set the hub descriptor data. - As SET_DESCRIPTOR control request for hub descrptor - @param buffer Descriptor data -*/ - virtual IOReturn SetRootHubDescriptor( OSData *buffer ) = 0; - -/*! - @function GetRootHubConfDescriptor - @abstract UIM function, retrun the configuration descriptor of the simulated root hub device - As GET_DESCRIPTOR control request for configuration descrptor - @param desc Descriptor structure to return data in -*/ - virtual IOReturn GetRootHubConfDescriptor( OSData *desc ) = 0; - -/*! - @function GetRootHubStatus - @abstract UIM function, get the status of the root hub. As GET_STATUS control request to device. - @param status Status structure to return -*/ - virtual IOReturn GetRootHubStatus( IOUSBHubStatus *status ) = 0; - -/*! - @function SetRootHubFeature - @abstract UIM function, set feature of root hub, As SET_FEATURE control request. - @param wValue The feature to set, as would be transferred in wValue field of SETUP packet. -*/ - virtual IOReturn SetRootHubFeature( UInt16 wValue ) = 0; - -/*! - @function ClearRootHubFeature - @abstract UIM function, set feature of root hub, As CLEAR_FEATURE control request. - @param wValue The feature to clear, as would be transferred in wValue field of SETUP packet. -*/ - virtual IOReturn ClearRootHubFeature( UInt16 wValue ) = 0; - -/*! - @function GetRootHubPortStatus - @abstract UIM function, get the status of a root hub port. As GET_STATUS control request to the port. - @param status Status structure to return - @param port Port to get status for. -*/ - virtual IOReturn GetRootHubPortStatus( IOUSBHubPortStatus *status, UInt16 port ) = 0; - -/*! - @function SetRootHubPortFeature - @abstract UIM function, set feature of a root hub port, As SET_FEATURE control request to a port. - @param wValue The feature to set, as would be transferred in wValue field of SETUP packet. - @param port Port to set feature for -*/ - virtual IOReturn SetRootHubPortFeature( UInt16 wValue, UInt16 port ) = 0; - -/*! - @function ClearRootHubPortFeature - @abstract UIM function, clear feature of a root hub port, As CLEAR_FEATURE control request to a port. - @param wValue The feature to clear, as would be transferred in wValue field of SETUP packet. - @param port Port to clear feature for -*/ - virtual IOReturn ClearRootHubPortFeature( UInt16 wValue, UInt16 port ) = 0; - -/*! - @function ClearRootHubPortFeature - @abstract UIM function, Impliments GET_BUS_STATE control request, now obsolete. -*/ - virtual IOReturn GetRootHubPortState( UInt8 *state, UInt16 port ) = 0; - -/*! - @function SetHubAddress - @abstract UIM function, set the address of the simulated root hub device, as SET_ADDRESS - @param wValue New address for root hub. -*/ - virtual IOReturn SetHubAddress( UInt16 wValue ) = 0; - - - /*! - @function openPipe - Open a pipe to the specified device endpoint - @param address Address of the device on the USB bus - @param speed of the device: kUSBHighSpeed or kUSBLowSpeed - @param endpoint description of endpoint to connect to - */ - virtual IOReturn OpenPipe( USBDeviceAddress address, - UInt8 speed, - Endpoint * endpoint ); - /*! - @function closePipe - Close a pipe to the specified device endpoint - @param address Address of the device on the USB bus - @param endpoint description of endpoint - */ - virtual IOReturn ClosePipe( USBDeviceAddress address, - Endpoint * endpoint ); - - // Controlling pipe state - /*! - @function abortPipe - Abort pending I/O to/from the specified endpoint, causing them to complete with return code kIOReturnAborted - @param address Address of the device on the USB bus - @param endpoint description of endpoint - */ - virtual IOReturn AbortPipe( - USBDeviceAddress address, - Endpoint * endpoint ); - /*! - @function resetPipe - Abort pending I/O and clear stalled state - this method is a combination of abortPipe and clearPipeStall - @param address Address of the device on the USB bus - @param endpoint description of endpoint - */ - virtual IOReturn ResetPipe( USBDeviceAddress address, - Endpoint * endpoint ); - /*! - @function clearPipeStall - Clear a pipe stall. - @param address Address of the device on the USB bus - @param endpoint description of endpoint - */ - virtual IOReturn ClearPipeStall( USBDeviceAddress address, - Endpoint * endpoint ); - - // Transferring Data - /*! - @function read - Read from an interrupt or bulk endpoint - @param buffer place to put the transferred data - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been filled - */ - virtual IOReturn Read( IOMemoryDescriptor * buffer, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBCompletion * completion ); - /*! - @function write - Write to an interrupt or bulk endpoint - @param buffer place to get the transferred data - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been emptied - */ - virtual IOReturn Write( IOMemoryDescriptor * buffer, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBCompletion * completion ); - - /*! - @function isocIO - Read from or write to an isochronous endpoint - @param buffer place to put the transferred data - @param frameStart USB frame number of the frame to start transfer - @param numFrames Number of frames to transfer - @param frameList Bytes to transfer and result for each frame - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been filled - */ - virtual IOReturn IsocIO( IOMemoryDescriptor * buffer, - UInt64 frameStart, - UInt32 numFrames, - IOUSBIsocFrame * frameList, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBIsocCompletion * completion ); - /*! - @function deviceRequest - Make a control request to the specified endpoint - There are two versions of this method, one uses a simple void * - to point to the data portion of the transfer, the other uses an - IOMemoryDescriptor to point to the data. - @param request parameter block for the control request - @param completion describes action to take when the request has been executed - @param address Address of the device on the USB bus - @param epNum endpoint number - */ - virtual IOReturn DeviceRequest( IOUSBDevRequest * request, - IOUSBCompletion * completion, - USBDeviceAddress address, - UInt8 epNum ); - - virtual IOReturn DeviceRequest( IOUSBDevRequestDesc * request, - IOUSBCompletion * completion, - USBDeviceAddress address, - UInt8 epNum ); - - /* - * Methods used by the hub driver to initialize a device - */ - /*! - @function AcquireDeviceZero - Get the device zero lock - call this before resetting a device, to ensure there's - only one device with address 0 - */ - virtual IOReturn AcquireDeviceZero( void ); - /*! - @function ReleaseDeviceZero - Release the device zero lock - call this to release the device zero lock, - when there is no longer a device at address 0 - */ - virtual void ReleaseDeviceZero( void ); - - // non-virtual methods - void WaitForReleaseDeviceZero( void ); - IOReturn ConfigureDeviceZero( UInt8 maxPacketSize, UInt8 speed ); - IOReturn GetDeviceZeroDescriptor( IOUSBDeviceDescriptor * desc, UInt16 size ); - IOReturn SetDeviceZeroAddress(USBDeviceAddress address); - IOUSBDevice * MakeDevice(USBDeviceAddress *address); - IOUSBHubDevice * MakeHubDevice(USBDeviceAddress *address); - IOReturn CreateDevice( IOUSBDevice * device, - USBDeviceAddress deviceAddress, - UInt8 maxPacketSize, - UInt8 speed, - UInt32 powerAvailable ); - - /*! - @function GetBandwidthAvailable - Returns the available bandwidth (in bytes) per frame or microframe for - isochronous transfers. - @result maximum number of bytes that a new iso pipe could transfer - per frame given current allocations. - */ - virtual UInt32 GetBandwidthAvailable( void ) = 0; - - /*! - @function GetFrameNumber - Returns the full current frame number. - @result The frame number. - */ - virtual UInt64 GetFrameNumber( void ) = 0; - - /*! - @function GetFrameNumber32 - Returns the least significant 32 bits of the frame number. - @result The lsb 32 bits of the frame number. - */ - virtual UInt32 GetFrameNumber32( void ) = 0; - - // Debugger polled mode - virtual void PollInterrupts( IOUSBCompletionAction safeAction = 0 ) = 0; - - virtual IOReturn PolledRead( - short functionNumber, - short endpointNumber, - IOUSBCompletion completion, - IOMemoryDescriptor * CBP, - bool bufferRounding, - UInt32 bufferSize); - - OSMetaClassDeclareReservedUsed(IOUSBController, 0); - virtual void UIMCheckForTimeouts(void); - - OSMetaClassDeclareReservedUsed(IOUSBController, 1); - virtual IOReturn UIMCreateControlTransfer( short functionNumber, - short endpointNumber, - IOUSBCommand* command, - void* CBP, - bool bufferRounding, - UInt32 bufferSize, - short direction); - - OSMetaClassDeclareReservedUsed(IOUSBController, 2); - virtual IOReturn UIMCreateControlTransfer( short functionNumber, - short endpointNumber, - IOUSBCommand* command, - IOMemoryDescriptor* CBP, - bool bufferRounding, - UInt32 bufferSize, - short direction); - - OSMetaClassDeclareReservedUsed(IOUSBController, 3); -/*! - @function UIMCreateBulkTransfer - @abstract UIM function, Do a transfer on a bulk endpoint. - This method supercedes the method which takes multiple parameters. - @param command paramters for transfer. -*/ - virtual IOReturn UIMCreateBulkTransfer(IOUSBCommand* command); - - OSMetaClassDeclareReservedUsed(IOUSBController, 4); -/*! - @function UIMCreateInterruptTransfer - @abstract UIM function, Do a transfer on an interrupt endpoint. - This method supercedes the method which takes multiple parameters. - @param command paramters for transfer. -*/ - virtual IOReturn UIMCreateInterruptTransfer(IOUSBCommand* command); - - /*! - @function deviceRequest - Make a control request to the specified endpoint - There are two versions of this method, one uses a simple void * - to point to the data portion of the transfer, the other uses an - IOMemoryDescriptor to point to the data. - @param request parameter block for the control request - @param completion describes action to take when the request has been executed - @param address Address of the device on the USB bus - @param epNum endpoint number - */ - OSMetaClassDeclareReservedUsed(IOUSBController, 5); - virtual IOReturn DeviceRequest( IOUSBDevRequest * request, - IOUSBCompletion * completion, - USBDeviceAddress address, - UInt8 epNum, - UInt32 noDataTimeout, - UInt32 completionTimeout ); - - OSMetaClassDeclareReservedUsed(IOUSBController, 6); - virtual IOReturn DeviceRequest( IOUSBDevRequestDesc * request, - IOUSBCompletion * completion, - USBDeviceAddress address, - UInt8 epNum, - UInt32 noDataTimeout, - UInt32 completionTimeout ); - - - - OSMetaClassDeclareReservedUsed(IOUSBController, 7); - /*! - @function read - Read from an interrupt or bulk endpoint - @param buffer place to put the transferred data - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been filled - */ - virtual IOReturn Read( IOMemoryDescriptor * buffer, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBCompletion * completion, - UInt32 noDataTimeout, - UInt32 completionTimeout ); - - OSMetaClassDeclareReservedUsed(IOUSBController, 8); - /*! - @function write - Write to an interrupt or bulk endpoint - @param buffer place to get the transferred data - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been emptied - */ - virtual IOReturn Write( IOMemoryDescriptor * buffer, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBCompletion * completion, - UInt32 noDataTimeout, - UInt32 completionTimeout ); - - // this should really not be using a padding slot, since free is in our superclas, but we shipped this way so now we need to leave it. - OSMetaClassDeclareReservedUsed(IOUSBController, 9); - virtual void free(); - -protected: - -/*! - @function UIMRootHubStatusChange(bool) - @abstract UIM function UIMRootHubStatusChange(bool) - This method was internal to the UIM (never called by the superclass) until - IOUSBControllerV3. For UIMs which are a subclass of IOUSBController or IOUSBControllerV2, it can - still be used internally only. For subclasses of IOUSBControllerV3, however, it has become obsolete - (it still needs to be implemented since it is pure virtual) -*/ - OSMetaClassDeclareReservedUsed(IOUSBController, 10); - virtual void UIMRootHubStatusChange( bool abort ) = 0; - -public: - - OSMetaClassDeclareReservedUsed(IOUSBController, 11); - virtual IOReturn CreateRootHubDevice( IOService * provider, IOUSBRootHubDevice ** rootHubDevice); - - OSMetaClassDeclareReservedUsed(IOUSBController, 12); - /*! - @function Read - Read from an interrupt or bulk endpoint - @param buffer place to put the transferred data - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been filled - @param noDataTimeout number of milliseconds of no data movement before the request is aborted - @param completionTimeout number of milliseonds after the command is on the bus in which it must complete - @param reqCount number of bytes requested for the transfer (must not be greater than the length of the buffer) - */ - virtual IOReturn Read( IOMemoryDescriptor * buffer, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBCompletion * completion, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOByteCount reqCount ); - - OSMetaClassDeclareReservedUsed(IOUSBController, 13); - /*! - @function Write - Write to an interrupt or bulk endpoint - @param buffer place to get the transferred data - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been emptied - @param noDataTimeout number of milliseconds of no data movement before the request is aborted - @param completionTimeout number of milliseonds after the command is on the bus in which it must complete - @param reqCount number of bytes requested for the transfer (must not be greater than the length of the buffer) - */ - virtual IOReturn Write( IOMemoryDescriptor * buffer, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBCompletion * completion, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOByteCount reqCount ); - - OSMetaClassDeclareReservedUsed(IOUSBController, 14); - - virtual IOReturn GetRootHubStringDescriptor(UInt8 index, OSData *desc) = 0; - - OSMetaClassDeclareReservedUsed(IOUSBController, 15); - /*! - @function IsocIO - Read from or write to an isochronous endpoint - @param buffer place to put the transferred data - @param frameStart USB frame number of the frame to start transfer - @param numFrames Number of frames to transfer - @param frameList Bytes to transfer and result for each frame - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been filled - @param updateFrequency describes how often to update the framelist once the transfer has completed (in ms) - */ - virtual IOReturn IsocIO( IOMemoryDescriptor * buffer, - UInt64 frameStart, - UInt32 numFrames, - IOUSBLowLatencyIsocFrame * frameList, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBLowLatencyIsocCompletion * completion, - UInt32 updateFrequency ); - - OSMetaClassDeclareReservedUsed(IOUSBController, 16); - - /*! - @function UIMCreateIsochTransfer - @abstract UIM function, Do a transfer on an Isocchronous endpoint. - @param functionNumber The USB device ID of the device to perform the transaction with - @param endpointNumber The endpoint number for the transaction - @param completion Action to perform when I/O completes - @param direction Specifies direction for transfer. kUSBIn or KUSBOut. - @param frameStart The frame number in which to start the transactions - @param pBuffer describes memory buffer. - @param frameCount number of frames to do transactions in - @param pFrames Describes transactions in individual frames, gives sizes and reults for transactions. - @param updateFrequency Describes how often we update the frameList parameters (in ms) - */ - virtual IOReturn UIMCreateIsochTransfer( - short functionAddress, - short endpointNumber, - IOUSBIsocCompletion completion, - UInt8 direction, - UInt64 frameStart, - IOMemoryDescriptor * pBuffer, - UInt32 frameCount, - IOUSBLowLatencyIsocFrame *pFrames, - UInt32 updateFrequency); - - - OSMetaClassDeclareReservedUsed(IOUSBController, 17); - virtual IOReturn CheckForDisjointDescriptor(IOUSBCommand *command, UInt16 maxPacketSize); - - /*! - @function UIMCreateIsochTransfer - @abstract UIM function, Do a transfer on an Isocchronous endpoint. - @param command an IOUSBIsocCommand object with all the necessary information - */ - OSMetaClassDeclareReservedUsed(IOUSBController, 18); - virtual IOReturn UIMCreateIsochTransfer(IOUSBIsocCommand *command); - - // do not use this slot without first checking bug rdar://6022420 - OSMetaClassDeclareReservedUnused(IOUSBController, 19); - -protected: - void IncreaseIsocCommandPool(); - void IncreaseCommandPool(); - void ParsePCILocation(const char *str, int *deviceNum, int *functionNum); - int ValueOfHexDigit(char c); -}; - -#endif /* ! _IOKIT_IOUSBCONTROLLER_H */ - diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerListElement.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerListElement.h.svn-base deleted file mode 100644 index 7351177..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerListElement.h.svn-base +++ /dev/null @@ -1,126 +0,0 @@ -/* - * - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1998-2007 Apple Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOUSBCONTROLLERLISTELEMENT_H -#define _IOUSBCONTROLLERLISTELEMENT_H - - -#include <libkern/c++/OSObject.h> - -#include <IOKit/IOTypes.h> - -#include <IOKit/usb/USB.h> - - -/*! - @class IOUSBControllerListElement - @abstract Used by the IOUSBController to manage the USB controller lists that are common between EHCI and UHCI. - */ -class IOUSBControllerListElement : public OSObject -{ - OSDeclareDefaultStructors(IOUSBControllerListElement) - -private: - -public: - - virtual void SetPhysicalLink(IOPhysicalAddress next) = 0; - virtual IOPhysicalAddress GetPhysicalLink(void) = 0; - virtual IOPhysicalAddress GetPhysicalAddrWithType(void) = 0; - virtual void print(int level); - - IOPhysicalAddress _sharedPhysical; // phys address of the memory shared with the controller - void * _sharedLogical; // logical address of the above - IOUSBControllerListElement *_logicalNext; // the next element in the list - -}; - - -class IOUSBControllerV2; // needed for a parameter -class IOUSBControllerIsochEndpoint; - -class IOUSBControllerIsochListElement : public IOUSBControllerListElement -{ - OSDeclareDefaultStructors(IOUSBControllerIsochListElement) - -private: - -public: - - virtual void SetPhysicalLink(IOPhysicalAddress next) = 0; - virtual IOPhysicalAddress GetPhysicalLink(void) = 0; - virtual IOPhysicalAddress GetPhysicalAddrWithType(void) = 0; - virtual void print(int level); - - IOUSBControllerIsochEndpoint *_pEndpoint; - IOUSBIsocFrame *_pFrames; - IOUSBIsocCompletion _completion; - Boolean _lowLatency; - bool _requestFromRosettaClient; // True if the request originated from a Rosetta client in user space - UInt8 _framesInTD; // used for HS Isoch only - UInt64 _frameNumber; // frame number for scheduling purposes - UInt32 _frameIndex; // index into the myFrames array - IOUSBControllerIsochListElement *_doneQueueLink; // linkage used by done queue processing - - // pure virtual methods which must be implemented by descendants - virtual IOReturn UpdateFrameList(AbsoluteTime timeStamp) = 0; - virtual IOReturn Deallocate(IOUSBControllerV2 *uim) = 0; -}; - -class IOUSBControllerIsochEndpoint : public OSObject -{ - OSDeclareDefaultStructors(IOUSBControllerIsochEndpoint) - -public: - - virtual bool init(); - - IOUSBControllerIsochEndpoint *nextEP; - IOUSBControllerIsochListElement *toDoList; // ITD or SITD - IOUSBControllerIsochListElement *toDoEnd; // ITD or SITD - IOUSBControllerIsochListElement *doneQueue; // ITD or SITD - IOUSBControllerIsochListElement *doneEnd; // ITD or SITD - IOUSBControllerIsochListElement *deferredQueue; // ITD or SITD - IOUSBControllerIsochListElement *deferredEnd; // ITD or SITD - UInt64 firstAvailableFrame; // next frame available for a transfer on this EP - UInt32 maxPacketSize; - UInt32 activeTDs; // + when added to todo list, - when taken from done queue - UInt32 onToDoList; // + when added to todo list, - when taken from done queue - UInt32 onDoneQueue; // + when added to todo list, - when taken from done queue - volatile SInt32 scheduledTDs; // + when linked onto periodic list, - when unlinked - UInt32 deferredTDs; - UInt32 onProducerQ; - UInt32 onReversedList; - UInt16 inSlot; // where Isoc TDs are being put in the periodic list - short functionAddress; - short endpointNumber; - IOReturn accumulatedStatus; - UInt32 interval; // this is the decoded interval value for HS endpoints and is 1 for FS endpoints - UInt8 direction; - bool aborting; -}; - - -#endif - diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerV2.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerV2.h.svn-base deleted file mode 100644 index 4d2c306..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerV2.h.svn-base +++ /dev/null @@ -1,374 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.2 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBCONTROLLERV2_H -#define _IOKIT_IOUSBCONTROLLERV2_H - -#include <IOKit/IODMACommand.h> - -#include <IOKit/usb/IOUSBControllerListElement.h> -#include <IOKit/usb/IOUSBController.h> - -enum -{ - kUSBHSHubCommandAddHub = 1, - kUSBHSHubCommandRemoveHub = 2, - - kUSBHSHubFlagsMultiTT = 1 -}; - - -/*! - @class IOUSBControllerV2 - @abstract subclass of the IOUSBController to provide support for high speed - devices and split transactions. - @discussion The IOUSBController class provide sufficient functionality to - work with full (12Mb/s) and low (1.5Mb/s) devices. IOUSBControllerV2 - introduces the support for high (480Mb/s) speed devices from the - USB 2.0 spec. In particular IOUSBControllerV2 indicates the high - speed hub a full or low speed device is attached to so that split - transactions can be directed to the hub at high speed to be forwarded - to the full or low speed device by the hub. - It also gives support for bulk endoints of greater than 256 bytes. -*/ - -class IOUSBControllerV2 : public IOUSBController -{ - OSDeclareAbstractStructors(IOUSBControllerV2) - -protected: - - // These for keeping track of high speed ancestor to allow controller to do splits. - // - UInt8 _highSpeedHub[128]; - UInt8 _highSpeedPort[128]; - - struct V2ExpansionData { - UInt8 _multiTT[128]; - IOUSBCommand *ClearTTCommand; - IOUSBControllerIsochEndpoint *_isochEPList; // linked list of active Isoch "endpoints" - IOUSBControllerIsochEndpoint *_freeIsochEPList; // linked list of freed Isoch EP data structures - thread_call_t _returnIsochDoneQueueThread; - }; - V2ExpansionData *_v2ExpansionData; - - // Super's expansion data - #define _freeUSBCommandPool _expansionData->freeUSBCommandPool - #define _freeUSBIsocCommandPool _expansionData->freeUSBIsocCommandPool - #define _watchdogUSBTimer _expansionData->watchdogUSBTimer - #define _controllerTerminating _expansionData->_terminating - #define _watchdogTimerActive _expansionData->_watchdogTimerActive - #define _busNumber _expansionData->_busNumber - #define _currentSizeOfCommandPool _expansionData->_currentSizeOfCommandPool - #define _currentSizeOfIsocCommandPool _expansionData->_currentSizeOfIsocCommandPool - #define _controllerSpeed _expansionData->_controllerSpeed - #define _activeIsochTransfers _expansionData->_activeIsochTransfers - - // this class's expansion data - #define _isochEPList _v2ExpansionData->_isochEPList - #define _freeIsochEPList _v2ExpansionData->_freeIsochEPList - #define _returnIsochDoneQueueThread _v2ExpansionData->_returnIsochDoneQueueThread - - virtual bool init( OSDictionary * propTable ); - virtual bool start( IOService * provider ); - virtual void free(); - - static IOReturn DoCreateEP(OSObject *owner, - void *arg0, void *arg1, - void *arg2, void *arg3); - - static void clearTTHandler( - OSObject * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining ); - -public: - - /*! - @function openPipe - Open a pipe to the specified device endpoint - @param address Address of the device on the USB bus - @param speed of the device: kUSBDeviceSpeedLow, kUSBDeviceSpeedFull or kUSBDeviceSpeedHigh - @param endpoint description of endpoint to connect to - */ - virtual IOReturn OpenPipe( USBDeviceAddress address, - UInt8 speed, - Endpoint * endpoint ); - - /*! - @function CreateDevice - @abstract Create a new device as IOUSBController, making a note of the - high speed hub device ID and port number the full/low speed - device is attached to. - @param newDevice new device object to work with - @param deviceAddress USB device ID - @param maxPacketSize max packet size of endpoint zero - @param speed speed of the device kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh - @param powerAvailable power available to the device - @param hub USB ID of hub the device is immediatly attached to. (Not necessarily high speed) - @param port port number of port the device is attached to. -*/ - virtual IOReturn CreateDevice( IOUSBDevice *newDevice, - USBDeviceAddress deviceAddress, - UInt8 maxPacketSize, - UInt8 speed, - UInt32 powerAvailable, - USBDeviceAddress hub, - int port); - -/*! - @function ConfigureDeviceZero - @abstract configure pipe zero of device zero, as IOUSBController, but also keeping - note of high speed hub device is attached to. - @param maxPacketSize max packet size for the pipe - @param speed speed of the device kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh - @param hub USB ID of hub the device is immediatly attached to. (Not necessarily high speed) - @param port port number of port the device is attached to. -*/ - virtual IOReturn ConfigureDeviceZero(UInt8 maxPacketSize, UInt8 speed, USBDeviceAddress hub, int port); - -/*! - @function UIMCreateControlEndpoint - @abstract Create an endpoint in the controller to do control transactions. - @param functionNumber USB device ID of device - @param endpointNumber endpoint address of the endpoint in the device - @param maxPacketSize maximum packet size of this endpoint - @param speed speed of the device kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh - @param highSpeedHub If speed is not kUSBDeviceSpeedHigh, the address of the high speed hub to - address split transactions to. - @param highSpeedPort If speed is not kUSBDeviceSpeedHigh, the hub port to address split transactions to -*/ - virtual IOReturn UIMCreateControlEndpoint( - UInt8 functionNumber, - UInt8 endpointNumber, - UInt16 maxPacketSize, - UInt8 speed, - USBDeviceAddress highSpeedHub, - int highSpeedPort) = 0; - -/*! - @function UIMCreateBulkEndpoint - @abstract Create an endpoint in the controller to do bulk transactions. - @param functionNumber USB device ID of device - @param endpointNumber endpoint address of the endpoint in the device - @param direction Direction of data flow. kUSBIn or kUSBOut - @param maxPacketSize maximum packet size of this endpoint - @param speed speed of the device kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh - @param highSpeedHub If speed is not kUSBDeviceSpeedHigh, the address of the high speed hub to - address split transactions to. - @param highSpeedPort If speed is not kUSBDeviceSpeedHigh, the hub port to address split transactions to -*/ - virtual IOReturn UIMCreateBulkEndpoint( - UInt8 functionNumber, - UInt8 endpointNumber, - UInt8 direction, - UInt8 speed, - UInt16 maxPacketSize, - USBDeviceAddress highSpeedHub, - int highSpeedPort) = 0; - -/*! - @function UIMCreateInterruptEndpoint - @abstract Create an endpoint in the controller to do interrupt transactions. - @param functionAddress USB device ID of device - @param endpointNumber endpoint address of the endpoint in the device - @param direction Direction of data flow. kUSBIn or kUSBOut - @param speed speed of the device kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh - @param maxPacketSize maximum packet size of this endpoint - @param pollingRate The maximum polling interval from the endpoint descriptor. - @param highSpeedHub If speed is not kUSBDeviceSpeedHigh, the address of the high speed hub to - address split transactions to. - @param highSpeedPort If speed is not kUSBDeviceSpeedHigh, the hub port to address split transactions to -*/ - virtual IOReturn UIMCreateInterruptEndpoint( - short functionAddress, - short endpointNumber, - UInt8 direction, - short speed, - UInt16 maxPacketSize, - short pollingRate, - USBDeviceAddress highSpeedHub, - int highSpeedPort) = 0; - -/*! - @function UIMCreateIsochEndpoint - @abstract Create an endpoint in the controller to do Isochronous transactions. - @param functionAddress USB device ID of device - @param endpointNumber endpoint address of the endpoint in the device - @param maxPacketSize maximum packet size of this endpoint - @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. - @param highSpeedHub If non zero, this is a full speed device, the address of the high speed hub to - address split transactions to. - @param highSpeedPort If highSpeedHub is non zero, the hub port to address split transactions to -*/ - virtual IOReturn UIMCreateIsochEndpoint( - short functionAddress, - short endpointNumber, - UInt32 maxPacketSize, - UInt8 direction, - USBDeviceAddress highSpeedHub, - int highSpeedPort) = 0; - - - static void ReturnIsochDoneQueueEntry(OSObject *target, thread_call_param_t endpointPtr); - - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 0); - virtual IOReturn AddHSHub(USBDeviceAddress highSpeedHub, UInt32 flags); - - static IOReturn DOHSHubMaintenance(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 1); - virtual IOReturn UIMHubMaintenance(USBDeviceAddress highSpeedHub, UInt32 highSpeedPort, UInt32 command, UInt32 flags); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 2); - virtual IOReturn RemoveHSHub(USBDeviceAddress highSpeedHub); - - static IOReturn DOSetTestMode(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 3); - virtual IOReturn SetTestMode(UInt32 mode, UInt32 port); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 4); - virtual IOReturn UIMSetTestMode(UInt32 mode, UInt32 port); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 5); - virtual UInt64 GetMicroFrameNumber( void ); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 6); - virtual void ClearTT(USBDeviceAddress addr, UInt8 endpt, Boolean IN); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 7); - /*! - @function Read - Read from an interrupt or bulk endpoint - @param buffer place to put the transferred data - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been filled - @param noDataTimeout number of milliseconds of no data movement before the request is aborted - @param completionTimeout number of milliseonds after the command is on the bus in which it must complete - @param reqCount number of bytes requested for the transfer (must not be greater than the length of the buffer) - */ - virtual IOReturn ReadV2( IOMemoryDescriptor * buffer, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBCompletionWithTimeStamp * completion, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOByteCount reqCount ); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 8); -/*! - @function UIMCreateIsochEndpoint - @abstract Create an endpoint in the controller to do Isochronous transactions. - @param functionAddress USB device ID of device - @param endpointNumber endpoint address of the endpoint in the device - @param maxPacketSize maximum packet size of this endpoint - @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. - @param highSpeedHub If non zero, this is a full speed device, the address of the high speed hub to - address split transactions to. - @param highSpeedPort If highSpeedHub is non zero, the hub port to address split transactions to - @param interval The encoded interval value from the endpoint descriptor -*/ - virtual IOReturn UIMCreateIsochEndpoint( short functionAddress, - short endpointNumber, - UInt32 maxPacketSize, - UInt8 direction, - USBDeviceAddress highSpeedHub, - int highSpeedPort, - UInt8 interval); - - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 9); - virtual IOUSBControllerIsochEndpoint* AllocateIsochEP(void); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 10); - virtual IOReturn DeallocateIsochEP(IOUSBControllerIsochEndpoint *pEP); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 11); - virtual IOUSBControllerIsochEndpoint* FindIsochronousEndpoint(short functionNumber, short endpointNumber, short direction, IOUSBControllerIsochEndpoint* *pEDBack); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 12); - virtual IOUSBControllerIsochEndpoint* CreateIsochronousEndpoint(short functionNumber, short endpointNumber, short direction); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 13); - virtual void PutTDonToDoList(IOUSBControllerIsochEndpoint* pED, IOUSBControllerIsochListElement *pTD); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 14); - virtual IOUSBControllerIsochListElement *GetTDfromToDoList(IOUSBControllerIsochEndpoint* pED); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 15); - virtual void PutTDonDeferredQueue(IOUSBControllerIsochEndpoint* pED, IOUSBControllerIsochListElement *pTD); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 16); - virtual IOUSBControllerIsochListElement *GetTDfromDeferredQueue(IOUSBControllerIsochEndpoint* pED); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 17); - virtual void PutTDonDoneQueue(IOUSBControllerIsochEndpoint* pED, IOUSBControllerIsochListElement *pTD, bool checkDeferred); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 18); - virtual IOUSBControllerIsochListElement *GetTDfromDoneQueue(IOUSBControllerIsochEndpoint* pED); - - // 7185026 - this is to make this call from behind the gate - static IOReturn GatedGetTDfromDoneQueue(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 19); - virtual void ReturnIsochDoneQueue(IOUSBControllerIsochEndpoint*); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 20); - virtual IODMACommand *GetNewDMACommand(); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 21); - /*! - @function GetLowLatencyOptionsAndPhysicalMask - @abstract Low Latency transfers require that the client have access to the memory after the Isochronous I/O request has already been scheduled. This might be used, for example to fill in outgoing data "just in time." Some controllers, however, may have requirements which need to be followed in order to make sure that the memory buffer isn't moved after the call is made. This call will return an IOOptionBits and mach_vm_address_t which can be used in a call to IOBufferMemoryDescriptor::inTaskWithPhysicalMask which will help meet these requirements. - @param optionBits Pointer to an an IOOptionBits. The only bit which may be returned is kIOMemoryPhysicallyContiguous. Other bits, e.g. direction bits, must be ORd in by the client as needed. This call replaces the old property based method of obtaining this information. - @param physicalMask Pointer to a mach_vm_address_t which should be used in the call to IOBufferMemoryDescriptor::inTaskWithPhysicalMask and will guarantee that when the memory is wired down it will be accessible by both the client and the USB controller at the same time. - @result returns kIOReturnSuccess if the method is implemented by the controller, otherwise kIOReturnUnsupported - */ - virtual IOReturn GetLowLatencyOptionsAndPhysicalMask(IOOptionBits *optionBits, mach_vm_address_t *physicalMask); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 22); - /*! - @function GetFrameNumberWithTime - @abstract Real Time A/V applications send and receive Iscohronous data scheduled on certain USB frame numbers. The clock for these frame numbers is independent of the system clock, and drivers need to synchronize these two clocks. This routine will return a system time which corresponds to the beginning of a USB frame number. It is not necessarily the currrent frame, but it will be a frame in the recent past (within the past minute). The jitter between the start of the USB frame and the system time will be as low as possible, but due to hardware interrupt latencies could be as high as 200 microseconds. - @param frameNumber A pointer to a UInt64 in which to hold the USB frame number corresponding to the given system time. - @param theTime A pointer to an AbsoluteTime corresponding to the system time at the beginning of the given USB frame number. - @result returns kIOReturnSuccess if the method is implemented by the controller, otherwise kIOReturnUnsupported - */ - virtual IOReturn GetFrameNumberWithTime(UInt64* frameNumber, AbsoluteTime *theTime); - - - OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 23); - OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 24); - OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 25); - OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 26); - OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 27); - OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 28); - OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 29); - -}; - - -#endif /* ! _IOKIT_IOUSBCONTROLLERV2_H */ diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerV3.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerV3.h.svn-base deleted file mode 100644 index 22da915..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBControllerV3.h.svn-base +++ /dev/null @@ -1,233 +0,0 @@ -/* -* Copyright (c) 2007-2008 Apple Inc. All rights reserved. -* -* @APPLE_LICENSE_HEADER_START@ -* -* The contents of this file constitute Original Code as defined in and -* are subject to the Apple Public Source License Version 1.2 (the -* "License"). You may not use this file except in compliance with the -* License. Please obtain a copy of the License at -* http://www.apple.com/publicsource and read it before using this file. -* -* This Original Code and all software distributed under the License are -* distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER -* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, -* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. -* Please see the License for the specific language governing rights and -* limitations under the License. -* -* @APPLE_LICENSE_HEADER_END@ -*/ - -#ifndef _IOKIT_IOUSBCONTROLLERV3_H -#define _IOKIT_IOUSBCONTROLLERV3_H - -#include <IOKit/pci/IOPCIDevice.h> - -#include <IOKit/usb/IOUSBControllerV2.h> -#include <IOKit/usb/IOUSBHubDevice.h> - -// Constants that define the different power states in the setPowerState call -enum -{ - kUSBPowerStateOff = 0, // controller is reset, nothing is attached - kUSBPowerStateRestart = 1, // same as OFF - kUSBPowerStateSleep = 2, // controller is suspended, preparing to lose main power - kUSBPowerStateLowPower = 3, // controller is suspended, power remains on - kUSBPowerStateOn = 4, // up and running - kUSBNumberBusPowerStates = 5 -}; - -#define kUSBPowerStateStable -1 - -enum -{ - kUSBBusStateReset = 0, // bus is in RESET - kUSBBusStateSuspended = 1, // bus is in SUSPEND mode - kUSBBusStateRunning = 2 // bus is operational -}; - - -// Root Hub things -typedef struct IOUSBRootHubInterruptTransaction -{ - IOMemoryDescriptor * buf; - UInt32 bufLen; - IOUSBCompletion completion; -} IOUSBRootHubInterruptTransaction; - -enum -{ - kIOUSBMaxRootHubTransactions = 2 -}; - - - -/*! - @class IOUSBControllerV3 - @abstract subclass of the IOUSBControllerV2 to provide support for new USB Power Management techniques. - @discussion With Leopard, we are providing more information to USB Device Drivers in the IOPower - tree to allow for more efficient Power Management. This controller class encapulates many of the changes - needed for that, without disturbing third party subclasses of IOUSBController or IOUSBControllerV2 - */ - -class IOUSBControllerV3 : public IOUSBControllerV2 -{ - OSDeclareAbstractStructors(IOUSBControllerV3) - - protected: - // static variable shared by all instances - static uint32_t * _gHibernateState; - - - UInt8 _myBusState; // kUSBBusStateReset, kUSBBusStateSuspended, kUSBBusStateRunning - bool _wakingFromHibernation; // True while the Hibernation Wake thread is active - bool _needToAckPowerDown; // True while we are changing power state due to shutdown/restart - bool _onCardBus; // OBSOLETE - bool _controllerAvailable; // true if we can talk to the controller - SInt32 _powerStateChangingTo; // a power state that we are in the process of changing to, or -1 if we are stable - bool _poweringDown; // true is the controller is powering down because of a systemWillPowerDown message - bool _restarting; // true is the controller is restarting because of a systemWillPowerDown message - unsigned long _myPowerState; // my current state (since getPowerState doesn't always change in time) - IOUSBControllerV3 *_ehciController; // set if I am a companion controller - unsigned long _numPowerStates; // how many power states do I support (defaults to kUSBNumDefaultPowerStates) - IOPMPowerState *_myPowerStates; // my power state array (allocated on the fly) - IOPCIDevice *_device; // my PCI device - - // root hub support - IOTimerEventSource *_rootHubTimer; // timer which fires at the rate of the root hub interrupt endpoint - UInt8 _rootHubPollingRate; // Obsolete -- we need to have it be a uint32_t - UInt8 _rootHubNumPorts; // number of root hub ports - should be 15 or fewer! - UInt16 _rootHubStatusChangedBitmap; // support up to 15 ports for status changes - bool _rootHubTimerActive; // UNUSED - IOUSBRootHubInterruptTransaction _outstandingRHTrans[4]; // Transactions for the Root Hub. We need 2, one for the current transaction and one for the next. This is declared as 4 for binary compatibility - - struct V3ExpansionData { - uint32_t _rootHubPollingRate32; - bool _rootHubTransactionWasAborted; - }; - V3ExpansionData *_v3ExpansionData; - - // IOKit methods - virtual bool init( OSDictionary * propTable ); - virtual bool start( IOService * provider ); - virtual void stop( IOService * provider ); - virtual unsigned long maxCapabilityForDomainState ( IOPMPowerFlags domainState ); - virtual unsigned long initialPowerStateForDomainState ( IOPMPowerFlags domainState ); - virtual IOReturn powerStateWillChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); - virtual IOReturn setPowerState( unsigned long powerStateOrdinal, IOService* whatDevice ); - virtual IOReturn powerStateDidChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); - virtual void powerChangeDone ( unsigned long fromState); - virtual void systemWillShutdown( IOOptionBits specifier ); - virtual void free(void); - - // IOUSBController methods - // we override these to deal with methods attempting to go through the workloop while we are in sleep - virtual IOReturn AcquireDeviceZero( void ); - virtual void ReleaseDeviceZero( void ); - virtual IOReturn DeviceRequest(IOUSBDevRequest *request, IOUSBCompletion *completion, USBDeviceAddress address, UInt8 epNum, UInt32 noDataTimeout, UInt32 completionTimeout); - virtual IOReturn DeviceRequest(IOUSBDevRequestDesc *request, IOUSBCompletion *completion, USBDeviceAddress address, UInt8 epNum, UInt32 noDataTimeout, UInt32 completionTimeout); - virtual IOReturn ClosePipe(USBDeviceAddress address, Endpoint *endpoint); - virtual IOReturn AbortPipe(USBDeviceAddress address, Endpoint *endpoint); - virtual IOReturn ResetPipe(USBDeviceAddress address, Endpoint *endpoint); - virtual IOReturn ClearPipeStall(USBDeviceAddress address, Endpoint *endpoint); - virtual IOReturn Read(IOMemoryDescriptor *buffer, USBDeviceAddress address, Endpoint *endpoint, IOUSBCompletion *completion, UInt32 noDataTimeout, UInt32 completionTimeout, IOByteCount reqCount); - virtual IOReturn Write(IOMemoryDescriptor *buffer, USBDeviceAddress address, Endpoint *endpoint, IOUSBCompletion *completion, UInt32 noDataTimeout, UInt32 completionTimeout, IOByteCount reqCount); - virtual IOReturn IsocIO(IOMemoryDescriptor *buffer, UInt64 frameStart, UInt32 numFrames, IOUSBIsocFrame *frameList, USBDeviceAddress address, Endpoint *endpoint, IOUSBIsocCompletion *completion ); - virtual IOReturn IsocIO(IOMemoryDescriptor *buffer, UInt64 frameStart, UInt32 numFrames, IOUSBLowLatencyIsocFrame *frameList, USBDeviceAddress address, Endpoint *endpoint, IOUSBLowLatencyIsocCompletion *completion, UInt32 updateFrequency ); - - // IOUSBControllerV2 methods - // we override these to deal with methods attempting to go through the workloop while we are in sleep - virtual IOReturn OpenPipe(USBDeviceAddress address, UInt8 speed, Endpoint *endpoint); - virtual IOReturn AddHSHub(USBDeviceAddress highSpeedHub, UInt32 flags); - virtual IOReturn RemoveHSHub(USBDeviceAddress highSpeedHub); - virtual IOReturn SetTestMode(UInt32 mode, UInt32 port); - virtual IOReturn ReadV2(IOMemoryDescriptor *buffer, USBDeviceAddress address, Endpoint *endpoint, IOUSBCompletionWithTimeStamp *completion, UInt32 noDataTimeout, UInt32 completionTimeout, IOByteCount reqCount); - - // IOUSBControllerV3 methods - - // these are called through the workloop - static IOReturn DoEnableAddressEndpoints(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3 ); - static IOReturn DoEnableAllEndpoints(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3 ); - static IOReturn GatedPowerChange(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3 ); - - // also on the workloop - static void RootHubTimerFired(OSObject *owner, IOTimerEventSource *sender); - - // subclassable methods - virtual IOReturn CheckForEHCIController(IOService *provider); - virtual IOReturn AllocatePowerStateArray(void); - virtual IOReturn InitForPM(void); - virtual IOReturn CheckPowerModeBeforeGatedCall(char *fromStr); - virtual IOReturn EnableAllEndpoints(bool enable); - virtual IOReturn EnableBusMastering(bool enable); - virtual IOReturn EnsureUsability(void); - virtual IOReturn CheckForRootHubChanges(void); - virtual IOReturn RootHubQueueInterruptRead(IOMemoryDescriptor *buf, UInt32 bufLen, IOUSBCompletion completion); - virtual IOReturn RootHubAbortInterruptRead(void); - virtual IOReturn RootHubStartTimer(UInt8 pollingRate); // Obsolete see RootHubStartTimer32 - virtual IOReturn RootHubStopTimer(void); - - // these methods have a default implementation using some of the virtual methods below - virtual void ControllerOff(void); - virtual void ControllerRestart(void); - virtual void ControllerSleep(void); - virtual void ControllerDoze(void); - virtual void ControllerOn(void); - - // these methods are pure virtual, and need to be implemented in the subclass driver - virtual IOReturn ResetControllerState(void) = 0; - virtual IOReturn RestartControllerFromReset(void) = 0; - virtual IOReturn SaveControllerStateForSleep(void) = 0; - virtual IOReturn RestoreControllerStateFromSleep(void) = 0; - virtual IOReturn DozeController(void) = 0; - virtual IOReturn WakeControllerFromDoze(void) = 0; - virtual IOReturn UIMEnableAddressEndpoints(USBDeviceAddress address, bool enable) = 0; - virtual IOReturn UIMEnableAllEndpoints(bool enable) = 0; - virtual IOReturn EnableInterruptsFromController(bool enable) = 0; - - public: - - // public methods - virtual IOReturn EnableAddressEndpoints(USBDeviceAddress address, bool enable); - virtual bool IsControllerAvailable(void); - virtual IOReturn HandlePowerChange(unsigned long powerStateOrdinal); - virtual UInt32 AllocateExtraRootHubPortPower(UInt32 extraPowerRequested); - virtual void ReturnExtraRootHubPortPower(UInt32 extraPowerReturned); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV3, 0); - virtual IOReturn RootHubStartTimer32(uint32_t pollingRate); - - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 1); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 2); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 3); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 4); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 5); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 6); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 7); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 8); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 9); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 10); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 11); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 12); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 13); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 14); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 15); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 16); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 17); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 18); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 19); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 20); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 21); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 22); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 23); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 24); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 25); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 26); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 27); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 28); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 29); -}; - -#endif // _IOKIT_IOUSBCONTROLLERV3_H \ No newline at end of file diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBDevice.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBDevice.h.svn-base deleted file mode 100644 index 58d73a0..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBDevice.h.svn-base +++ /dev/null @@ -1,639 +0,0 @@ -/* - * Copyright (c) 1998-2007 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.2 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __OPEN_SOURCE__ -/* - * - * $Log: IOUSBDevice.h,v $ - * Revision 1.65 2009/10/18 20:20:37 nano - * Bring in fixes in 390.4.0 QL: 7310698 7301024 7307079 and 7310698 - * - * Revision 1.64.32.4 2009/10/15 21:17:43 nano - * If OverrideAtLocationID does not see a override property, return true - * - * Revision 1.64.32.3.2.1 2009/10/15 21:36:27 nano - * If OverrideAtLocationID does not see a override property, return true - * - * Revision 1.64.32.3 2009/10/14 19:16:15 nano - * Minor name changes - * - * Revision 1.64.32.2 2009/10/14 19:05:21 nano - * 7284477 7293893 Simplify scheme to decide whether we want to override a property for a hub at a particular ID for a particular MacModel. Added a IOUSBDevice API that tells us if we are in the right model and locationID to override a property - * - * Revision 1.64.32.1 2009/10/08 19:55:56 nano - * rdar://7284477 Allow us to overide the config descriptor of a 2514 hub on a K23F - * - * Revision 1.64 2009/09/08 12:28:45 nano - * <rdar://problem/7195788> IOUSBDevice headerdoc comment problem - GetNumConfigs name is wrong, should be GetNumConfigurations - * - * Revision 1.63 2009/05/07 19:43:09 nano - * Move our SnowLeopard branch to TOT - * - * Revision 1.57.84.6 2009/03/13 22:45:11 nano - * Bring in branches to fix 6676089 6675858 6567987 6490273 - * - * Revision 1.57.84.5.4.1 2009/03/11 20:01:56 nano - * rdar://6567987 Do not let a Reset or a ReEnumerate through while the other is executing. - * - * Revision 1.57.84.5 2009/02/26 13:44:32 nano - * Bring in rdar://6536090&6586312 to SL branch - * - * Revision 1.57.84.4.10.1 2009/02/25 00:51:06 rhoads - * change the mechanism of getConfigLock so as to prevent a deadlock - * - * Revision 1.57.84.4 2009/02/13 15:57:33 rhoads - * roll in rdars: 6213394, 6489431, 6513000, 6515115, 6535200, 6567783 - * - * Revision 1.57.84.3.48.3 2009/02/11 19:19:08 rhoads - * add back an expansionData variable to preserve binary compatibility - * - * Revision 1.57.84.3.48.2 2009/02/11 03:05:56 arulchan - * more ::SuspendDevice changes - * - * Revision 1.57.84.3.48.1 2009/01/23 21:34:15 arulchan - * fix for rdar://6213394 - * - * Revision 1.57.84.3 2008/06/16 21:31:16 nano - * Bring in changes from Foxhound 320.2.17 - * - * Revision 1.57.84.2 2008/04/22 22:38:01 nano - * Bring in changes from Foxhound-320.2.9 - * - * Revision 1.60.28.2 2008/05/22 17:36:18 nano - * Fix the reporting of the internal bit for GetDeviceInformation - * - * Revision 1.60.28.1 2008/05/21 17:51:43 nano - * <rdar://problem/5952635> GetDeviceInformation needs some fixes - * - * Revision 1.60 2008/04/18 22:03:28 nano - * Bring in fix for rdar://5874560 - * - * Revision 1.59.4.1 2008/04/18 21:55:55 nano - * <rdar://problem/5874560> Need API to know how much extra power has been allocated - * - * Revision 1.59 2008/04/17 16:56:57 nano - * Bring in branches for rdar://5867990 & rdar://5768343 - * - * Revision 1.58.4.1 2008/04/16 20:26:13 nano - * <rdar://problem/5867990> Add API to allocate sleep current, as well as making sure that we return any extra power if our client dies or our device is terminated without returning it - * - * Revision 1.58 2008/04/14 16:08:38 nano - * Add new APIs for high power and for GetDeviceInformation. - * - * Revision 1.57.126.2 2008/04/13 05:25:40 nano - * Call into PolicyMaker for the GetPortInformation - * - * Revision 1.57.126.1 2008/04/11 22:25:44 nano - * Initial work on new user-client APIs and new IOUSBDevice APIs to return port state information and manage extra power requests, as well as groundwork for calling the policy maker directly from the IOUSBDevice - * - * Revision 1.57 2007/08/07 20:30:36 rhoads - * rolled in a few branches to TOT - * - * Revision 1.56.92.1 2007/08/07 03:43:34 nano - * Bring in more changes for M89 suppport -- like actually use the dang power if the properties are available - * - * Revision 1.56 2007/03/06 12:23:41 rhoads - * roll in 5024412, 5035829, and 5039670 - * - * Revision 1.55.30.1 2007/02/27 16:08:33 rhoads - * some fine tuning of our IOService overrides, including not overriding willTerminate and didTerminate (5024412) - * - * Revision 1.55 2007/01/19 17:58:48 rhoads - * roll in branches for a leopard build - * - * Revision 1.54.30.1 2007/01/17 16:37:02 rhoads - * remove the IOUSBDevice::attach method which is not really useful - * - * Revision 1.54 2006/10/06 04:42:01 rhoads - * roll in branches 4727961, 4758404, 4759810, 4760274, and 4762769 - * - * Revision 1.53.4.1 2006/10/04 16:03:57 rhoads - * better IOUSBHubDevice design - * - */ -#endif - -#ifndef _IOKIT_IOUSBDEVICE_H -#define _IOKIT_IOUSBDEVICE_H - -#include <IOKit/usb/IOUSBNub.h> -#include <IOKit/usb/IOUSBPipe.h> -#include <IOKit/IOBufferMemoryDescriptor.h> -#include <IOKit/IOWorkLoop.h> -#include <IOKit/IOCommandGate.h> - -#include <kern/thread_call.h> - -// The following are definitions for errata properties needed for different devices. This -// should be but in the dictionary of the IOUSBDevice in question. This can be achieved -// by using the AppleUSBMergeNub class and having an IOProviderMergeProperties dictionary -// with the required properties. - -// This property allows a device to specify a configuration value of 0 in its configuration -// descriptor. This does not follow the spec, but we will allow it in order to get the device -// to work. The property should be a Boolean -// -#define kAllowConfigValueOfZero "kAllowZeroConfigValue" -#define kAllowNumConfigsOfZero "kAllowZeroNumConfigs" - - -class IOUSBController; -class IOUSBControllerV2; -class IOUSBInterface; -class IOUSBHubPolicyMaker; -/*! - @class IOUSBDevice - @abstract The IOService object representing a device on the USB bus. - @discussion This class provides functionality to configure a device and to create - IOUSBInterface objects to represent the interfaces of the device. -*/ - -class IOUSBDevice : public IOUSBNub -{ - friend class IOUSBController; - friend class IOUSBControllerV2; - friend class IOUSBInterface; - friend class IOUSBPipe; - - OSDeclareDefaultStructors(IOUSBDevice) - -protected: - - USBDeviceAddress _address; - IOUSBController * _controller; - IOUSBPipe * _pipeZero; - IOUSBDeviceDescriptor _descriptor; - UInt32 _busPowerAvailable; - UInt8 _speed; - IOUSBEndpointDescriptor _endpointZero; // Fake ep for control pipe - void * _port; // Obsolete, do not use - IOBufferMemoryDescriptor** _configList; - IOUSBInterface** _interfaceList; - UInt8 _currentConfigValue; - UInt8 _numInterfaces; - - struct ExpansionData - { - UInt32 _portNumber; - thread_call_t _doPortResetThread; - IOUSBDevice * _usbPlaneParent; - bool _portResetThreadActive; - bool _allowConfigValueOfZero; - thread_call_t _doPortSuspendThread; - bool _portSuspendThreadActive; - thread_call_t _doPortReEnumerateThread; - bool _resetInProgress; - bool _portHasBeenReset; - IORecursiveLock* _XgetConfigLock; // Obsolete - bool _doneWaiting; // Obsolete - bool _notifiedWhileBooting; // Obsolete - IOWorkLoop * _workLoop; - IOTimerEventSource * _notifierHandlerTimer; - UInt32 _notificationType; - bool _suspendInProgress; - bool _portHasBeenSuspendedOrResumed; - bool _addExtraResetTime; - bool _suspendCommand; - IOCommandGate * _commandGate; - OSSet * _openInterfaces; - bool _resetCommand; - IOReturn _resetError; - IOReturn _suspendError; - thread_call_t _doMessageClientsThread; - IOUSBHubPolicyMaker * _hubPolicyMaker; - UInt32 _sleepPowerAllocated; // how much sleep power we already gave to our client - UInt32 _wakePowerAllocated; // how much extra power during wake did we already give our client - UInt32 _devicePortInfo; - bool _deviceIsInternal; // Will be set if all our upstream hubs are captive (internal to the computer) - bool _deviceIsInternalIsValid; // true if we have already determined whether the device is internal - bool _newGetConfigLock; // new lock, taken within the WL gate, when doing a GetConfig - UInt32 _resetAndReEnumerateLock; // "Lock" to prevent us from doing a reset or a re-enumerate while the other one is in progress - UInt32 _locationID; - }; - ExpansionData * _expansionData; - - const IOUSBConfigurationDescriptor *FindConfig(UInt8 configValue, UInt8 *configIndex=0); - - virtual IOUSBInterface * GetInterface(const IOUSBInterfaceDescriptor *interface); - -public: - virtual IOReturn SetFeature(UInt8 feature); - -protected: - virtual IOReturn GetConfigDescriptor(UInt8 configIndex, void *data, UInt32 len); - - virtual IOReturn GetDeviceDescriptor(IOUSBDeviceDescriptor *desc, UInt32 size); - - virtual bool init(USBDeviceAddress deviceAddress, UInt32 powerAvaiable, UInt8 speed, UInt8 maxPacketSize ); - - virtual bool matchPropertyTable(OSDictionary * table, SInt32 *score); - -public: - // IOService methods - virtual bool init( void ); - virtual bool start( IOService *provider ); - virtual bool handleIsOpen(const IOService *forClient) const; - virtual bool handleOpen(IOService *forClient, IOOptionBits options, void *arg); - virtual void handleClose(IOService *forClient, IOOptionBits options); - virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); - virtual bool terminate( IOOptionBits options = 0 ); - virtual bool requestTerminate( IOService * provider, IOOptionBits options ); - virtual void stop( IOService *provider ); - virtual bool finalize(IOOptionBits options); - virtual void free( void ); - - // IOUSBDevice methods - virtual void SetProperties(); - - static IOUSBDevice *NewDevice(void); - - virtual void SetPort(void *port); // Obsolete, do NOT use - - /*! - @function FindNextInterfaceDescriptor - return a pointer to the next interface descriptor within the given full configuration descriptor satisfying the requirements specified, or NULL if there aren't any. - @param configDescIn the configuration descriptor within which to search. obtained from GetFullConfigurationDescriptor(configIndex). use NULL to specify the current configuration's descriptor. - @param intfDesc interface descriptor from which to start the search. NULL for the first interface descriptor in the given configuration descriptor - @param request IOUSBFindInterfaceRequest specifying the desired interface. Not changed. - @param descOut pointer to placeholder for the returned descriptor ptr - @result returns kIOReturnBadArgument if configDesc is not correct, or if configDesc is NULL and the device is not configured, or if intfDesc is not in configDesc. Otherwise returns kIOReturnSuccess or kIOUSBInterfaceNotFound. - */ - virtual IOReturn FindNextInterfaceDescriptor(const IOUSBConfigurationDescriptor *configDescIn, - const IOUSBInterfaceDescriptor *intfDesc, - const IOUSBFindInterfaceRequest *request, - IOUSBInterfaceDescriptor **descOut); - /*! - @function FindNextInterface - return an pointer to an IOUSBInterface object satisfying the requirements specified in request, or NULL if there aren't any. the device - must be configured for there to be any interfaces. - @param current interface to start searching from, NULL to start at the beginning of the device's interface list for the current configuration. - @param request specifies what properties an interface must have to match. - @result Pointer to a matching IOUSBInterface, or NULL if none match. Note: The IOUSBInterface is NOT retained for the caller. If the caller wishes to continue to use the returned object, it should call retain() on that object. - */ - virtual IOUSBInterface *FindNextInterface(IOUSBInterface *current, - IOUSBFindInterfaceRequest *request); - - /*! - @function CreateInterfaceIterator - return an OSIterator to iterate through interfaces satisfying the requirements specified in request. - @param request specifies what properties an interface must have to match. - @result Pointer to an OSIterator. - */ - virtual OSIterator *CreateInterfaceIterator(IOUSBFindInterfaceRequest *request); - - // Get pointer to full config info (cached in device, don't free returned pointer) - /*! - @function GetFullConfigurationDescriptor - return a pointer to all the descriptors for the requested configuration. - @param configIndex The configuration index (not the configuration value) - @result Pointer to the descriptors, which are cached in the IOUSBDevice object. - */ - virtual const IOUSBConfigurationDescriptor *GetFullConfigurationDescriptor(UInt8 configIndex); - - /*! - @function GetConfigurationDescriptor - Copy the specified amount of data for a configuration into the suppled buffer. - @param configValue The configuration value - @param data Buffer to copy data into - @param len number of bytes to copy - */ - virtual IOReturn GetConfigurationDescriptor(UInt8 configValue, void *data, UInt32 len); - - /*! - @function ResetDevice - Reset the device, returning it to the addressed, unconfigured state. - This is useful if a device has got badly confused. Note that the AppleUSBComposite driver will automatically - reconfigure the device if it is a composite device. - */ - virtual IOReturn ResetDevice(); - - /*! - @function SetConfiguration - Do a USB SetConfiguration call to the device. The caller must have the device open() in order to - actually cause a configuration change. If the device is currently configured, all IOUSBInterface objects - associated with the device are freed. After the new configuration has been set, all of its IOUSBInterface objects are - instantiated automatically. - @param forClient The client requesting the configuration change - @param configValue The desired configuration value. - @param startInterfaceMatching A boolean specifying whether IOKit should begin the process of finding - matching drivers for the new IOUSBInterface objects. - */ - virtual IOReturn SetConfiguration(IOService *forClient, UInt8 configValue, bool startInterfaceMatching=true); - - // Access to addressing and cached info - /*! - @function GetAddress - returns the bus address of the device - */ - virtual USBDeviceAddress GetAddress(void); - - /*! - @function GetSpeed - returns the speed of the device - */ - virtual UInt8 GetSpeed(void); - /*! - @function GetBus - returns a pointer to the IOUSBController object for the device - */ - virtual IOUSBController *GetBus(void); - /*! - @function GetBusPowerAvailable - returns the power available to the device, in units of 2mA - */ - virtual UInt32 GetBusPowerAvailable( void ); - /*! - @function GetMaxPacketSize - returns the maximum packet size for endpoint zero (only 8, 16, 32, 64 are valid) - */ - virtual UInt8 GetMaxPacketSize(void); - /*! - @function GetVendorID - returns the Vendor ID of the device - */ - virtual UInt16 GetVendorID(void); - /*! - @function GetProductID - returns the Product ID of the device - */ - virtual UInt16 GetProductID(void); - /*! - @function GetDeviceRelease - returns the DeviceRelease information - */ - virtual UInt16 GetDeviceRelease(void); - /*! - @function GetNumConfigurations - returns the number of configs in the device config descriptor - */ - virtual UInt8 GetNumConfigurations(void); - /*! - @function GetManufacturerStringIndex - returns the index of string descriptor describing manufacturer - */ - virtual UInt8 GetManufacturerStringIndex(void ); - /*! - @function GetProductStringIndex - returns the index of string descriptor describing product - */ - virtual UInt8 GetProductStringIndex(void ); - /*! - @function GetSerialNumberStringIndex - returns the index of string descriptor describing the device's serial number - */ - virtual UInt8 GetSerialNumberStringIndex(void ); - /*! - @function GetPipeZero - returns a pointer to the device's default control pipe - */ - virtual IOUSBPipe * GetPipeZero(void); - - // Deprecated but needed for binary compatibility - virtual IOUSBPipe* MakePipe(const IOUSBEndpointDescriptor *ep); - - // this method is deprecated. use the other DeviceRequest methods - virtual IOReturn DeviceRequest(IOUSBDevRequest *request, - IOUSBCompletion *completion = 0); - - // Same but with a memory descriptor - virtual IOReturn DeviceRequest(IOUSBDevRequestDesc *request, - IOUSBCompletion *completion = 0); - - /*! - @function GetConfiguration - Gets the current configuration from the IOUSBDevice object. Note that this call will send a control - request on the bus to get the current configuration from the physical device. - @param configNum Pointer to place to store configuration value. - */ - virtual IOReturn GetConfiguration(UInt8 *configNumber); - - /*! - @function GetDeviceStatus - Gets the device's status. Note that this sends a control request to the physical device. - @param status Pointer to place to store the status. - */ - virtual IOReturn GetDeviceStatus(USBStatus *status); - - /*! - @function GetStringDescriptor - Get a string descriptor as ASCII, in the specified language (default is US English) - @param index Index of the string descriptor to get. - @param buf Pointer to place to store ASCII string - @param maxLen Size of buffer pointed to by buf - @param lang Language to get string in (default is US English) - */ - virtual IOReturn GetStringDescriptor(UInt8 index, char *buf, int maxLen, UInt16 lang=0x409); - - /*! - @function GetChildLocationID - Get the locationID (UInt32) given the port number and the parent's location - @param parentLocationID locationID for the hub to which this device is attached. - @param port Port number of the hub where this device is attached - */ - virtual UInt32 GetChildLocationID(UInt32 parentLocationID, int port); - - virtual const IOUSBDescriptorHeader* FindNextDescriptor(const void *cur, UInt8 descType); - - virtual void DisplayNotEnoughPowerNotice(); - - // this is a non-virtual function so that we don't have to take up a binary compatibility slot. - UInt16 GetbcdUSB(void); - UInt8 GetProtocol(void); - void SetBusPowerAvailable(UInt32 newPower); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 0); - /*! - @function DeviceRequest - @abstract execute a control request to the default control pipe (pipe zero) - @param request The parameter block to send to the device - @param noDataTimeout Specifies an amount of time (in ms) after which the command will be aborted - if no data has been transferred on the bus. - @param completionTimeout Specifies an amount of time (in ms) after which the command will be aborted if the entire command has - not been completed. - @param completion Function to call when request completes. If omitted then - DeviceRequest() executes synchronously, blocking until the request is complete. If the request is asynchronous, the client must make sure that - the IOUSBDevRequest is not released until the callback has occurred. - - */ - virtual IOReturn DeviceRequest(IOUSBDevRequest *request, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOUSBCompletion *completion = 0); - - /*! - @function DeviceRequest - @abstract execute a control request to the default control pipe (pipe zero) - @param request The parameter block to send to the device (with the pData as an IOMemoryDesriptor) - @param noDataTimeout Specifies an amount of time (in ms) after which the command will be aborted - if no data has been transferred on the bus. - @param completionTimeout Specifies an amount of time (in ms) after which the command will be aborted if the entire command has - not been completed. - @param completion Function to call when request completes. If omitted then - DeviceRequest() executes synchronously, blocking until the request is complete. If the request is asynchronous, the client must make sure that - the IOUSBDevRequest is not released until the callback has occurred. - - */ - OSMetaClassDeclareReservedUsed(IOUSBDevice, 1); - virtual IOReturn DeviceRequest(IOUSBDevRequestDesc *request, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOUSBCompletion *completion = 0); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 2); - /*! - @function SuspendDevice - @abstract Instruct the hub to which this device is attached to suspend or resume the port to which the device is attached. - Note that if there are any outstanding transactions on any pipes in the device, those transactions will get returned with a - kIOReturnNotResponding error. - @param suspend Boolean value. true = suspend, false = resume. - */ - virtual IOReturn SuspendDevice( bool suspend); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 3); - /*! - @function ReEnumerateDevice - @abstract Instruct the hub to which this device is attached to reset the port to which this device is attached. This causes the - IOUSBDevice object and any child objects (IOUSBInterface objects or driver objects) to be terminated, and the device to be - completely reenumerated, as if it had been detached and reattached. - @param options Reserved for future use. - */ - virtual IOReturn ReEnumerateDevice( UInt32 options ); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 4); - /*! - @function DisplayUserNotification - @abstract Will use the KUNCUserNotification mechanism to display a notification to the user. - @param notificationType Which notification to display. - */ - virtual void DisplayUserNotification(UInt32 notificationType); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 5); - /*! - @function MakePipe - @abstract build a pipe on a given endpoint - @param ep A description of the endpoint - @param interface The IOUSBInterface object requesting the pipe - returns the desired IOUSBPipe object - */ - virtual IOUSBPipe* MakePipe(const IOUSBEndpointDescriptor *ep, IOUSBInterface *interface); - - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 6); - /*! - @function SetHubParent - @abstract Used by the hub driver to give the nub a pointer to its HubPolicyMaker object - @param hubPolicyMaker The object representing the Hub driver - */ - virtual void SetHubParent(IOUSBHubPolicyMaker *hubParent); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 7); - /*! - @function GetHubParent - @abstract Used by the hub driver to give the nub a pointer to its HubPolicyMaker object - @param hubPolicyMaker The object representing the Hub driver - */ - virtual IOUSBHubPolicyMaker* GetHubParent(); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 8); - /*! - @function GetDeviceInformation - @abstract Returns status information about the USB device, such as whether the device is captive or whether it is in the suspended state. - @param requestedPower The desired amount of power that the client wishes to reserve - @result Actual power that was reserved - - */ - virtual IOReturn GetDeviceInformation(UInt32 *info); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 9); - /*! - @function RequestExtraPower - @abstract Clients can use this API to reserve extra power for use by this device while the machine is asleep or while it is awake. Units are milliAmps (mA). - @param type Indicates whether the power is to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake) - @param requestedPower Amount of power desired, in mA - @result Amount of power actually reserved, in mA. It can be less than the requested or zero. - - */ - virtual UInt32 RequestExtraPower(UInt32 type, UInt32 requestedPower); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 10); - /*! - @function ReturnExtraPower - @abstract Clients can use this API to tell the system that they will not use power that was previously reserved by using the RequestExtraPower API. - @param type Indicates whether the power is to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake) - @param returnedPower Amount of power that is no longer needed, in mA - @result If the returnedPower was not previously allocated, an error will be returned. This will include the case for power that was requested for sleep but was returned for wake. - - */ - virtual IOReturn ReturnExtraPower(UInt32 type, UInt32 returnedPower); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 11); - /*! - @function GetExtraPowerAllocated - @abstract Clients can use this API to ask how much extra power has already been reserved by this device. Units are milliAmps (mA). - @param type Indicates whether the allocated power was to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake) - @result Amount of power allocated, in mA. - - */ - virtual UInt32 GetExtraPowerAllocated(UInt32 type); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 12); - /*! - @function DoLocationOverrideAndModelMatch - @abstract Will look for a kOverrideIfAtLocationID array proerty with locationID entries and a "MacModel" property. If any of the locationIDs match to the Mac Model, will return true. - If there is no kOverrideAtLocationID property, it will also return true. - @result True if we have a match, false otherwise - */ - virtual bool DoLocationOverrideAndModelMatch(); - - OSMetaClassDeclareReservedUnused(IOUSBDevice, 13); - OSMetaClassDeclareReservedUnused(IOUSBDevice, 14); - OSMetaClassDeclareReservedUnused(IOUSBDevice, 15); - OSMetaClassDeclareReservedUnused(IOUSBDevice, 16); - OSMetaClassDeclareReservedUnused(IOUSBDevice, 17); - OSMetaClassDeclareReservedUnused(IOUSBDevice, 18); - OSMetaClassDeclareReservedUnused(IOUSBDevice, 19); - -private: - - static void ProcessPortResetEntry(OSObject *target); - void ProcessPortReset(void); - - void TerminateInterfaces(void); - - static void ProcessPortReEnumerateEntry(OSObject *target, thread_call_param_t options); - void ProcessPortReEnumerate(UInt32 options); - - static void DoMessageClientsEntry(OSObject *target, thread_call_param_t messageStruct); - void DoMessageClients( void * messageStructPtr); - - static void DisplayUserNotificationForDeviceEntry (OSObject *owner, IOTimerEventSource *sender); - void DisplayUserNotificationForDevice( ); - - UInt32 SimpleUnicodeToUTF8(UInt16 uChar, UInt8 utf8Bytes[4]); - void SwapUniWords (UInt16 **unicodeString, UInt32 uniSize); - - IOReturn TakeGetConfigLock(void); - IOReturn ReleaseGetConfigLock(void); - static IOReturn ChangeGetConfigLock(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); -}; - -#endif /* _IOKIT_IOUSBDEVICE_H */ diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBHIDDriver.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBHIDDriver.h.svn-base deleted file mode 100644 index 5e76887..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBHIDDriver.h.svn-base +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef IOUSBHIDDRIVER_H -#define IOUSBHIDDRIVER_H - -#include <IOKit/IOBufferMemoryDescriptor.h> - -#include <IOKit/hid/IOHIDDevice.h> - -#include <IOKit/usb/IOUSBBus.h> -#include <IOKit/usb/IOUSBInterface.h> -#include <IOKit/usb/USB.h> - - -#define ENABLE_HIDREPORT_LOGGING 0 - -// Report types from low level USB: -// from USBSpec.h: -// enum { -// kHIDRtInputReport = 1, -// kHIDRtOutputReport = 2, -// kHIDRtFeatureReport = 3 -// }; -// -// from IOHIDDescriptorParser.h: -// // types of HID reports (input, output, feature) -// enum -// { -// kHIDInputReport = 1, -// kHIDOutputReport, -// kHIDFeatureReport, -// kHIDUnknownReport = 255 -// }; -// -// Report types from high level HID Manager: -// from IOHIDKeys.h: -// enum IOHIDReportType -// { -// kIOHIDReportTypeInput = 0, -// kIOHIDReportTypeOutput, -// kIOHIDReportTypeFeature, -// kIOHIDReportTypeCount -// }; -// -#define HIDMGR2USBREPORTTYPE(x) (x + 1) -#define USB2HIDMGRREPORTTYPE(x) (x - 1) - - -// Note: In other Neptune files, kMaxHIDReportSize was defined as 64. But Ferg & Keithen were unable to -// find that value in the USB HID 1.1 specs. Brent had previously changed it to 256 in the OS 9 HID Driver -// to allow for reports spanning multiple packets. 256 may be no more a hard and fast limit, but it's -// working for now in OS 9. -#define kMaxHIDReportSize 256 // Max packet size = 8 for low speed & 64 for high speed. -#define kHIDDriverRetryCount 3 -#define kUSBHIDReportLoggingLevel "USB HID Report Logging Level" - - -// power states for the driver (awake or suspended) -enum -{ - kUSBHIDPowerStateOff = 0, - kUSBHIDPowerStateRestart = 1, - kUSBHIDPowerStateSleep = 2, // this could be system sleep or idle sleep - kUSBHIDPowerStateLowPower = 3, // this is idling - kUSBHIDPowerStateOn = 4, // this is fully on - kUSBHIDNumberPowerStates = 5 -}; - - -/*! - @class IOUSBHIDDriver - @abstract Driver that matches to USB HID devices. - @discussion This class can be overriden to provide for specific behaviors. - */ -class IOUSBHIDDriver : public IOHIDDevice -{ - OSDeclareDefaultStructors(IOUSBHIDDriver) - - IOUSBInterface * _interface; - IOUSBDevice * _device; - IOUSBPipe * _interruptPipe; - UInt32 _maxReportSize; - IOBufferMemoryDescriptor * _buffer; - IOUSBCompletion _completion; - UInt32 _retryCount; - thread_call_t _deviceDeadCheckThread; - thread_call_t _clearFeatureEndpointHaltThread; - bool _deviceDeadThreadActive; - bool _deviceIsDead; // Should really be called "abort expected" - bool _deviceHasBeenDisconnected; - bool _needToClose; - UInt32 _outstandingIO; - IOCommandGate * _gate; - IOUSBPipe * _interruptOutPipe; - UInt32 _locationID; - IOBufferMemoryDescriptor * _outBuffer; // Obsolete - UInt32 _deviceUsage; // Obsolete - UInt32 _deviceUsagePage; // Obsolete - - struct IOUSBHIDDriverExpansionData - { - IOWorkLoop * _workLoop; - thread_call_t _handleReportThread; - IOService * _rootDomain; - AbsoluteTime _wakeUpTime; - IOUSBCompletionWithTimeStamp _completionWithTimeStamp; - bool _checkForTimeStamp; - UInt32 _msToIgnoreTransactionsAfterWake; - IOTimerEventSource * _suspendPortTimer; - bool _portSuspended; - UInt32 _suspendTimeoutInMS; - UInt8 _interfaceNumber; - bool _logHIDReports; - UInt8 _hidLoggingLevel; - bool _needToClearPipeStall; - SInt32 _queuedReports; - AbsoluteTime _interruptTimeStamp; - bool _powerStateChanging; - unsigned long _myPowerState; - bool _pendingRead; - UInt32 _deviceDeadCheckLock; // "Lock" to prevent us from executing the device dead check while in progress - }; - IOUSBHIDDriverExpansionData *_usbHIDExpansionData; - - static void InterruptReadHandlerEntry(OSObject *target, void *param, IOReturn status, UInt32 bufferSizeRemaining); - static void InterruptReadHandlerWithTimeStampEntry(OSObject *target, void *param, IOReturn status, UInt32 bufferSizeRemaining, AbsoluteTime timeStamp); - void InterruptReadHandler(IOReturn status, UInt32 bufferSizeRemaining, AbsoluteTime timeStamp); - - static void CheckForDeadDeviceEntry(OSObject *target); - void CheckForDeadDevice(); - - static void ClearFeatureEndpointHaltEntry(OSObject *target); - void ClearFeatureEndpointHalt(void); - - static void HandleReportEntry(OSObject *target, thread_call_param_t timeStamp); - void HandleReport(AbsoluteTime timeStamp); - - virtual void processPacket(void *data, UInt32 size); // Obsolete - - static IOReturn ChangeOutstandingIO(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); - static IOReturn ClaimPendingRead(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); - - static void SuspendPortTimer(OSObject *target, IOTimerEventSource *sender); - -public: - - // IOService methods - // - virtual bool init(OSDictionary *properties); - virtual bool start(IOService * provider); - virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer ); - virtual bool willTerminate( IOService * provider, IOOptionBits options ); - virtual void stop(IOService * provider); - virtual void free(); - virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); - virtual unsigned long maxCapabilityForDomainState ( IOPMPowerFlags domainState ); - virtual IOReturn powerStateWillChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); - virtual IOReturn setPowerState ( unsigned long powerStateOrdinal, IOService* whatDevice ); - virtual IOReturn powerStateDidChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); - virtual void powerChangeDone ( unsigned long fromState); - - - // IOHIDDevice methods - // - virtual bool handleStart(IOService * provider); - virtual void handleStop(IOService * provider); - - virtual IOReturn newReportDescriptor( IOMemoryDescriptor ** descriptor ) const; - - virtual OSString * newTransportString() const; - - virtual OSNumber * newVendorIDNumber() const; - - virtual OSNumber * newProductIDNumber() const; - - virtual OSNumber * newVersionNumber() const; - - virtual OSString * newManufacturerString() const; - - virtual OSString * newProductString() const; - - virtual OSString * newSerialNumberString() const; - - virtual OSNumber * newLocationIDNumber() const; - - virtual OSNumber * newCountryCodeNumber() const; - - virtual IOReturn getReport( IOMemoryDescriptor * report, - IOHIDReportType reportType, - IOOptionBits options = 0 ); - - virtual IOReturn setReport( IOMemoryDescriptor * report, - IOHIDReportType reportType, - IOOptionBits options = 0 ); - - // HID driver methods - // - virtual OSString * newIndexedString(UInt8 index) const; - - virtual UInt32 getMaxReportSize(); - - virtual void DecrementOutstandingIO(void); - virtual void IncrementOutstandingIO(void); - virtual IOReturn StartFinalProcessing(); - virtual IOReturn SetIdleMillisecs(UInt16 msecs); - -private: - - IOReturn GetHIDDescriptor(UInt8 inDescriptorType, UInt8 inDescriptorIndex, UInt8 *vOutBuf, UInt32 *vOutSize); - IOReturn GetReport(UInt8 inReportType, UInt8 inReportID, UInt8 *vInBuf, UInt32 *vInSize); - IOReturn SetReport(UInt8 outReportType, UInt8 outReportID, UInt8 *vOutBuf, UInt32 vOutSize); - IOReturn GetIndexedString(UInt8 index, UInt8 *vOutBuf, UInt32 *vOutSize, UInt16 lang = 0x409) const; - IOReturn SetProtocol(UInt32 protocolType); - char GetHexChar(char hexChar); - IOReturn AbortAndSuspend( bool suspend ); - - - -#if ENABLE_HIDREPORT_LOGGING - void LogBufferReport(char *report, UInt32 len); - void LogMemReport(IOMemoryDescriptor * reportBuffer); - char GetHexChar(char hexChar); -#endif - -public: - OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 0); - virtual IOReturn RearmInterruptRead(); - - /*! - @function SuspendPort - @abstract Suspends the port for this device or optionally sets a timeout to suspend after a period of inactivity. - @discussion This call can be used to immediately suspend/resume a port or to enable the suspension of the port after a period of inactivity. If called with suspendPort = true (no timeout parameter), the HID driver - will immediately suspend the port, after aborting any outstanding reads on the interrupt pipe. If called with suspendPort = true and timeout != 0, it will suspend the port after the timeout number of ms have - passed without any read completions. If called with suspendPort = false, the port will be immediately resumed and the reads will be re-issued. If a timeout was enabled, it will be cancelled. - @param suspendPort Boolean value. true = suspend the port, false = resume the port. - @param timeoutMS Value in milliseconds If value is non-zero, the port will be suspended after the timeout milliseconds have passed without any read completions. - @result The IOReturn value from the IOUSBDevice::Suspend() call. - */ - OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 1); - virtual IOReturn SuspendPort(bool suspendPort, UInt32 timeoutMS = 0); - - OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 2); - virtual bool IsPortSuspended(); - - OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 3); - virtual void LogMemReport(UInt8 level, IOMemoryDescriptor * reportBuffer, IOByteCount size); - - OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 4); - virtual IOReturn InitializeUSBHIDPowerManagement(IOService *provider); - - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 5); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 6); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 7); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 8); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 9); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 10); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 11); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 12); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 13); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 14); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 15); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 16); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 17); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 18); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 19); -}; - -#endif // IOUSBHIDDRIVER_H diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBHubDevice.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBHubDevice.h.svn-base deleted file mode 100644 index 91c728c..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBHubDevice.h.svn-base +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __OPEN_SOURCE__ -/* - * - * $Log: IOUSBHubDevice.h,v $ - * Revision 1.11 2009/09/12 03:42:16 rhoads - * merge in the changes for the 390.3.4b QL - * - * Revision 1.10.52.1 2009/09/10 18:50:52 nano - * <rdar://problem/7134800> Task: Extra Current support for Ibex Peak RMHs -- look for a property that tells us to ask our USB plane parent for the extra current. This will allow the RMH to pass on the request to it's parent. - * - * Revision 1.10 2009/05/07 19:43:09 nano - * Move our SnowLeopard branch to TOT - * - * Revision 1.6.102.3 2008/06/16 22:02:16 nano - * Bring in changes from Foxound 320.2.19 - * - - * Revision 1.6.102.2 2008/04/22 22:38:01 nano - * Bring in changes from Foxhound-320.2.9 - * - * Revision 1.8.62.2 2008/06/06 21:08:44 nano - * Enable dynamic allocation of power for M89, so we don't reserve it if there isn't a high power device attached - * - * Revision 1.8.62.1 2008/06/06 04:14:32 nano - * Fix SleepCurrent allocation so it will work with hub devices and root hub devices as well as consolidating it across all controllers - * - * Revision 1.8 2008/04/17 16:56:57 nano - * Bring in branches for rdar://5867990 & rdar://5768343 - * - * Revision 1.7.4.1 2008/04/17 15:54:07 nano - * Merged PR-5768343 into this branch and fixed a couple of issues - * - * Revision 1.7.2.1 2008/04/16 00:48:49 ferg - * Bug #: 5768343 - * Add support for hubs with high-power downstream port capability. This is - * controlled by the properties "AAPL,current-available" and "AAPL,current-extra". - * - * Revision 1.7 2008/04/14 16:08:38 nano - * Add new APIs for high power and for GetDeviceInformation. - * - * Revision 1.6.144.1 2008/04/11 22:25:44 nano - * Initial work on new user-client APIs and new IOUSBDevice APIs to return port state information and manage extra power requests, as well as groundwork for calling the policy maker directly from the IOUSBDevice - * - * Revision 1.6 2007/08/01 16:10:18 rhoads - * roll in extra power changes - * - * Revision 1.5.118.1 2007/07/27 16:49:10 rhoads - * merge the extra current stuff into Leopard, and add extra sleep current for self powered hubs - * - * Revision 1.5 2007/01/20 00:47:01 rhoads - * roll in Hub Policy Maker changes - * - * Revision 1.4 2006/12/22 23:05:46 rhoads - * roll in branches 4364835 and 4277683-2 - * - * Revision 1.3.20.3 2007/01/15 19:58:07 rhoads - * saving more changes - * - * Revision 1.3.20.2 2007/01/09 21:55:53 rhoads - * commit some stuff to try to fix a permissions issue - * - * Revision 1.3.20.1 2006/12/18 19:13:56 rhoads - * re-integrate the old branch into TOT - * - * Revision 1.3.12.4 2006/12/18 17:33:48 rhoads - * looking good except for sleep/wake - * - * Revision 1.3.12.3 2006/12/08 05:42:40 rhoads - * mostly working - * - * Revision 1.3.12.2 2006/11/14 22:37:06 rhoads - * more changes with the root hubs - * - * Revision 1.3.12.1 2006/11/07 16:55:52 rhoads - * change to get the IOUSBHubDevice nubs into the IOPower tree - * - * Revision 1.3 2006/10/06 04:42:02 rhoads - * roll in branches 4727961, 4758404, 4759810, 4760274, and 4762769 - * - * Revision 1.2.4.2 2006/10/04 23:01:24 rhoads - * better naming - * - * Revision 1.2.4.1 2006/10/04 16:03:57 rhoads - * better IOUSBHubDevice design - * - */ -#endif - - -#ifndef _IOKIT_IOUSBHUBDEVICE_H -#define _IOKIT_IOUSBHUBDEVICE_H - -#include <IOKit/usb/IOUSBDevice.h> // our superclass - -// forward refeference. we don't include the header file because it would cause a circular reference -class IOUSBHubPolicyMaker; - -enum { - kIOUSBHubDeviceIsRootHub = 0x0001, - kIOUSBHubDeviceIsOnHighSpeedBus = 0x0002, - kIOUSBHubDeviceCanSleep = 0x0004 -}; - -/*! - @class IOUSBHubDevice - @abstract New in MAC OS X 10.5. The IOKit object representing a hub device on the USB bus. It is a subclass of IOUSBDevice. - @discussion With the exception of the IOUSBRootHubDevice objects representing the root hubs, every IOUSBDevice - will have an IOUSBHubDevice as its parent in the IOUSB plane. USB KEXT drivers will have the ability to - query this device for characteristics of the hub into which they are connected. This class will also give a dive driver - the abilty to get an IOService* pointing to the hub driver itself, which can then be used as the parent in the power plane. -*/ - -class IOUSBHubDevice : public IOUSBDevice -{ - friend class IOUSBHubPolicyMaker; - friend class AppleUSBHub; - friend class IOUSBController; // for the "can sleep" characteristic - -private: - OSDeclareDefaultStructors(IOUSBHubDevice) - - UInt32 _myCharacteristics; // bitmap of my characteristics - IOUSBHubPolicyMaker *_myPolicyMaker; // pointer to the policy maker in the IOPower tree for this hub - - struct ExpansionData - { - UInt32 _maxPortCurrent; // maximum current in milliamps per downstream port - UInt32 _totalExtraCurrent; // total amount of current above the spec'ed current per port available (during normal operation) - UInt32 _totalSleepCurrent; // total amount of current that can be drawn during sleep - UInt32 _canRequestExtraPower; // If 0, this hub does not support requesting extra power from its parent, non-zero: how much power we need to request in order to give out _extraPowerForPorts - UInt32 _extraPowerForPorts; // Of the power requested from our parent, how much can we parcel out -- the rest is consumed by voltage drop thru the cable - UInt32 _extraPowerAllocated; // Amount of power that we actually got from our parent - bool _requestFromParent; // True if we are to request the extra power from our parent, without modifying the request. Used for RMHs - }; - ExpansionData *_expansionData; - -protected: - // IOUSBHubDevice methods which will be used by the hub driver (which is also the Policy Maker) - virtual void SetPolicyMaker(IOUSBHubPolicyMaker *policyMaker); - virtual void SetHubCharacteristics(UInt32); - virtual bool InitializeCharacteristics(void); // used at start - -public: - // static constructor - static IOUSBHubDevice *NewHubDevice(void); - - // IOKit methods - virtual bool init(); - virtual bool start( IOService * provider ); - virtual void stop( IOService *provider ); - virtual void free(); - - // public IOUSBHubDevice methods - - void SetTotalSleepCurrent(UInt32 sleepCurrent); - UInt32 GetTotalSleepCurrent(); - - /*! - @function GetPolicyMaker - returns a pointer to the policy maker for the hub, which can be used as the power plane parent. - @result returns an IOUSBHubPolicyMaker* pointing to the policy maker for this hub. returns NULL is no policy maker is active on the hub device. - */ - virtual IOUSBHubPolicyMaker *GetPolicyMaker(void); - - /*! - @function GetHubCharacteristics - returns characteristics of the hub device which might be useful for the driver of a device connected to the hub. - kIOUSBHubDeviceIsRootHub indicates that the hub is a root hub - kIOUSBHubDeviceIsOnHighSpeedBus indicates that the hub is running on a High Speed bus. If this bit is set and kIOUSBHubDeviceIsHighSpeed is clear, then this is a Classic Speed hub running on a High Speed bus, which means that Split Transactions will be used to communicate with downstream devices. - - @result returns a bitmap of characteristics - */ - virtual UInt32 GetHubCharacteristics(); - - /*! - @function GetMaxProvidedPower - returns the maximum amount of power available on any downstream port of this hub - @result the power is returned in milliamps - usually 100ma or 500 ma. - */ - virtual UInt32 GetMaxProvidedPower(); - - /*! - @function RequestProvidedPower - requests power from the hub device - @param requestedPower - the amount of power requested in milliamps (usually 100ma or 500 ma) - @result the amount of power allocated for this driver in milliamps (usually 100ma or 500 ma) - */ - virtual UInt32 RequestProvidedPower(UInt32 requestedPower); - - virtual UInt32 RequestExtraPower(UInt32 requestedPower); - - virtual void ReturnExtraPower(UInt32 returnedPower); - - OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 0); - - virtual void InitializeExtraPower(UInt32 maxPortCurrent, UInt32 totalExtraCurrent); - - OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 1); - virtual UInt32 RequestSleepPower(UInt32 requestedPower); - - OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 2); - virtual void ReturnSleepPower(UInt32 returnedPower); - - OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 3); - virtual void SetSleepCurrent(UInt32 sleepCurrent); - - OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 4); - virtual UInt32 GetSleepCurrent(); - - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 5); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 6); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 7); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 8); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 9); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 10); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 11); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 12); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 13); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 14); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 15); -}; - -#endif /* _IOKIT_IOUSBROOTHUBDEVICE_H */ - diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBHubPolicyMaker.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBHubPolicyMaker.h.svn-base deleted file mode 100644 index a0021d3..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBHubPolicyMaker.h.svn-base +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright (c) 2007 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __OPEN_SOURCE__ -/* - * - * $Log: IOUSBHubPolicyMaker.h,v $ - * Revision 1.10 2009/05/07 19:43:09 nano - * Move our SnowLeopard branch to TOT - * - * Revision 1.7.72.3 2008/07/23 17:43:32 nano - * <rdar://problem/5939357> IOUSBHIDDriver, IOHIDEventService missing HeaderDoc class declarations - * - * Revision 1.7.72.2 2008/04/22 22:38:01 nano - * Bring in changes from Foxhound-320.2.9 - * - * Revision 1.9 2008/04/17 16:56:57 nano - * Bring in branches for rdar://5867990 & rdar://5768343 - * - * Revision 1.8.4.1 2008/04/16 20:26:15 nano - * <rdar://problem/5867990> Add API to allocate sleep current, as well as making sure that we return any extra power if our client dies or our device is terminated without returning it - * - * Revision 1.8 2008/04/14 16:08:38 nano - * Add new APIs for high power and for GetDeviceInformation. - * - * Revision 1.7.114.1 2008/04/11 22:25:44 nano - * Initial work on new user-client APIs and new IOUSBDevice APIs to return port state information and manage extra power requests, as well as groundwork for calling the policy maker directly from the IOUSBDevice - * - * Revision 1.7 2007/08/17 22:41:11 nano - * Bring in branch that fixes <rdar://problem/5414582> USB not honoring Resume recovery time (hub driver) and adds extra time for iPods - * - * Revision 1.6.30.1 2007/08/16 19:14:02 nano - * ResumeRecovery additions. - * - * Revision 1.6 2007/08/01 16:10:18 rhoads - * roll in extra power changes - * - * Revision 1.5.12.1 2007/07/27 16:49:10 rhoads - * merge the extra current stuff into Leopard, and add extra sleep current for self powered hubs - * - * Revision 1.5 2007/07/20 22:31:22 rhoads - * roll in branch300-3-2 - * - * Revision 1.4.40.1 2007/07/18 18:44:24 rhoads - * this is the 300.3.2g version plus some quieter logs - * - * Revision 1.4.34.2 2007/07/17 06:30:35 rhoads - * more hub chain fixes - * - * Revision 1.4.34.1 2007/07/16 16:45:00 rhoads - * more power management and termination tweaks - * - * Revision 1.4 2007/05/18 01:59:12 rhoads - * roll in 5112084 and 5204170 - * - * Revision 1.3.2.1 2007/05/15 18:23:48 rhoads - * some initial power state bug fixes - * - * Revision 1.3 2007/05/10 22:25:35 rhoads - * roll in branch 5113395 - the last major piece of the new power architecture - * - * Revision 1.2.64.4 2007/04/13 22:34:59 rhoads - * fix restart and shutdown - * - * Revision 1.2.64.3 2007/04/11 23:56:23 rhoads - * first mostly working dozing hub - * - * Revision 1.2.64.2 2007/04/10 02:09:09 rhoads - * got UHCI almost working - * - * Revision 1.2.64.1 2007/04/05 02:57:50 rhoads - * move power management out of AppleUSBHub and into IOUSBHubPolicyMaker - * - * Revision 1.2 2007/01/20 00:47:01 rhoads - * roll in Hub Policy Maker changes - * - * Revision 1.1.2.4 2007/01/18 22:51:08 rhoads - * add some padding - * - * Revision 1.1.2.3 2007/01/15 19:58:07 rhoads - * saving more changes - * - * Revision 1.1.2.2 2007/01/09 23:55:36 rhoads - * working version - * - * Revision 1.1.2.1 2007/01/09 21:57:02 rhoads - * commit some stuff to try to fix a permissions issue - * - * - */ -#endif -#ifndef _IOKIT_IOUSBHUBPOLICYMAKER_H -#define _IOKIT_IOUSBHUBPOLICYMAKER_H - -#include <IOKit/IOService.h> -#include <IOKit/usb/IOUSBController.h> -#include <IOKit/usb/IOUSBHubDevice.h> - - -enum { - kIOUSBHubPowerStateOff = 0, // losing power - kIOUSBHubPowerStateRestart = 1, // reseting bus, but may maintain power - kIOUSBHubPowerStateSleep = 2, // upstream port and all downstream ports suspended (from the top) - kIOUSBHubPowerStateLowPower = 3, // upstream port and all downstream ports suspended (from the bottom) - kIOUSBHubPowerStateOn = 4, // upstream port and at least one downstream port on - kIOUSBHubNumberPowerStates = 5 -}; - -enum { - kHubResumeRecoveryTime = 10, // 10 ms to recover after I resume myself - kPortResumeRecoveryTime = 10 // 10 ms to recover another device -}; - -#define kIOUSBHubPowerStateStable -1 - -/*! - @class IOUSBHubPolicyMaker - @abstract Super class for Hub drivers to incorporate common Power Management code. - */ -class IOUSBHubPolicyMaker : public IOService -{ - OSDeclareAbstractStructors(IOUSBHubPolicyMaker) - -protected: - IOUSBControllerV2 * _bus; - IOUSBHubDevice * _device; // our provider - IOUSBHubDevice * _parentHubDevice; // for non root hub drivers, this is the hub device that my hub device is connected to - bool _isRootHub; // this is a root hub - bool _dozeEnabled; // true if the controller has been enabled to go into doze mode - bool _dontAllowLowPower; // If true, we will not allow the hub to go into low power mode. - bool _dontAllowSleepPower; // If true, we will not allow extra sleep power for a self powered hub. - SInt32 _powerStateChangingTo; // a power state if we are changing to one, or -1 if we are stable - unsigned long _myPowerState; // my current state (since getPowerState doesn't always change in time) - UInt32 _extraPower; // how much extra power we might be able to get from our parent hub - UInt32 _extraPowerRemaining; // how many milliamps we can still give to any one port - UInt32 _hubResumeRecoveryTime; // # of ms that we will wait before issuing any transactions on our port (nominally 10ms) - struct ExpansionData - { - }; - ExpansionData *_expansionData; - -public: - // IOService methods - virtual bool start(IOService * provider); - virtual IOReturn powerStateWillChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); - virtual unsigned long powerStateForDomainState ( IOPMPowerFlags domainState ); - virtual IOReturn setPowerState ( unsigned long powerStateOrdinal, IOService* whatDevice ); - virtual IOReturn powerStateDidChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); - virtual unsigned long maxCapabilityForDomainState ( IOPMPowerFlags domainState ); - virtual void powerChangeDone ( unsigned long fromState ); - - // public methods which MAY be implemented in subclass - virtual IOReturn EnsureUsability(void); - - // Extra Port Power calls - void AllocateExtraPower(); - IOReturn GetExtraPortPower(UInt32 portNum, UInt32 *extraPower); - IOReturn ReturnExtraPortPower(UInt32 portNum, UInt32 extraPower); - - // virtual methods to be implemented in the controlling driver subclass - virtual bool ConfigureHubDriver(void) = 0; - virtual IOReturn HubPowerChange(unsigned long powerStateOrdinal) = 0; - - OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 0); - virtual IOReturn GetPortInformation(UInt32 portNum, UInt32 *info); - - OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 1); - virtual IOReturn ResetPort(UInt32 portNum); - - OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 2); - virtual IOReturn SuspendPort(UInt32 portNum, bool suspend); - - OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 3); - virtual IOReturn ReEnumeratePort(UInt32 portNum, UInt32 options); - - OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 4); - virtual UInt32 RequestExtraPower(UInt32 portNum, UInt32 type, UInt32 requestedPower); - - OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 5); - virtual IOReturn ReturnExtraPower(UInt32 portNum, UInt32 type, UInt32 returnedPower); - - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 6); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 7); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 8); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 9); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 10); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 11); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 12); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 13); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 14); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 15); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 16); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 17); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 18); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 19); -}; - -#endif _IOKIT_IOUSBHUBPOLICYMAKER_H diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBInterface.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBInterface.h.svn-base deleted file mode 100644 index 4777e50..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBInterface.h.svn-base +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright (c) 1998-2007 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBINTERFACE_H -#define _IOKIT_IOUSBINTERFACE_H - -#include <IOKit/IOService.h> -#include <libkern/c++/OSData.h> - -#include <IOKit/usb/USB.h> -#include <IOKit/usb/IOUSBNub.h> -#include <IOKit/usb/IOUSBDevice.h> - -/*! - @class IOUSBInterface - @abstract The object representing an interface of a device on the USB bus. - @discussion This class provides functionality to find the pipes of an interface and - to read the descriptors associated with an interface. When an interface is open()ed, - all its pipes are created -*/ -class IOUSBInterface : public IOUSBNub -{ - friend class IOUSBInterfaceUserClientV2; - - OSDeclareDefaultStructors(IOUSBInterface) - -protected: - IOUSBPipe * _pipeList[kUSBMaxPipes]; - const IOUSBConfigurationDescriptor *_configDesc; - const IOUSBInterfaceDescriptor * _interfaceDesc; - IOUSBDevice * _device; - - // these variable are the parsed interface descriptor - UInt8 _bInterfaceNumber; - UInt8 _bAlternateSetting; - UInt8 _bNumEndpoints; - UInt8 _bInterfaceClass; - UInt8 _bInterfaceSubClass; - UInt8 _bInterfaceProtocol; - UInt8 _iInterface; - - struct ExpansionData { - IOCommandGate *_gate; - IOWorkLoop *_workLoop; - bool _needToClose; - IOLock * _pipeObjLock; // Lock to synchronize accesses to our pipeObjects - }; - ExpansionData * _expansionData; - - // private methods - virtual void ClosePipes(void); // close all pipes (except pipe zero) - virtual IOReturn CreatePipes(void); // open all pipes in the current interface/alt interface - virtual void SetProperties(void); // update my property table with the correct properties - -public: - // static methods - static IOUSBInterface *withDescriptors(const IOUSBConfigurationDescriptor *cfDesc, const IOUSBInterfaceDescriptor *ifDesc); - static IOReturn CallSuperOpen(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); - static IOReturn CallSuperClose(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); - static UInt8 hex2char( UInt8 digit ); - - // IOService methods - virtual bool start(IOService * provider); - virtual bool handleOpen(IOService *forClient, IOOptionBits options = 0, void *arg = 0 ); - virtual bool open(IOService *forClient, IOOptionBits options = 0, void *arg = 0 ); - virtual void close(IOService *forClient, IOOptionBits options = 0); - virtual void handleClose(IOService *forClient, IOOptionBits options = 0); - virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); - virtual bool finalize(IOOptionBits options); - virtual void stop(IOService * provider); - virtual bool terminate( IOOptionBits options = 0 ); - virtual void free(); - - // IOUSBInterface class methods - virtual bool init( const IOUSBConfigurationDescriptor *cfDesc, - const IOUSBInterfaceDescriptor *ifDesc); - /*! - @function FindNextAltInterface - return alternate interface descriptor satisfying the requirements specified in request, or NULL if there aren't any. - request is updated with the properties of the returned interface. - @param current interface descriptor to start searching from, NULL to start at alternate interface 0. - @param request specifies what properties an interface must have to match. - @result Pointer to a matching interface descriptor, or NULL if none match. - */ - virtual const IOUSBInterfaceDescriptor *FindNextAltInterface(const IOUSBInterfaceDescriptor *current, - IOUSBFindInterfaceRequest *request); - - /*! - @function FindNextPipe - Find a pipe of the interface that matches the requirements, either - starting from the beginning of the interface's pipe list or from a specified - pipe. - @param current Pipe to start searching from, NULL to start from beginning of list. - @param request Requirements for pipe to match, updated with the found pipe's - properties. - @result Pointer to the pipe, or NULL if no pipe matches the request. - */ - virtual IOUSBPipe *FindNextPipe(IOUSBPipe *current, IOUSBFindEndpointRequest *request); - - /*! - @function FindNextAssociatedDescriptor - Find the next descriptor of the requested type associated with the interface. - @param current Descriptor to start searching from, NULL to start from beginning of list. - @param type Descriptor type to search for, or kUSBAnyDesc to return any descriptor type. - @result Pointer to the descriptor, or NULL if no matching descriptors found. - */ - virtual const IOUSBDescriptorHeader * FindNextAssociatedDescriptor(const void *current, UInt8 type); - - /*! - @function SetAlternateInterface - Select the specified alternate interface. - @param forClient The client requesting the alternate setting. This client must have the interface open in order to perform the request. - @param alternateSetting Alternate setting (from the alternate interface's interface descriptor). - @result exclusive access error if the interface is not open. otherwise the result of the transaction - */ - virtual IOReturn SetAlternateInterface(IOService *forClient, UInt16 alternateSetting); - - /*! - @function GetPipeObj - returns a handle to the pipe at the corresponding index - @param index value from zero to kUSBMaxPipes-1 - @result The IOUSBPipe object. Note that the client does not own a reference to this pipe, so the client should retain() the IOUSBPipe object if necessary. - */ - virtual IOUSBPipe *GetPipeObj(UInt8 index); - /*! - @function GetConfigValue - returns the device configuration value for the interface - @result The device configuration value. - */ - virtual UInt8 GetConfigValue(); - /*! - @function GetDevice - returns the device the interface is part of. - @result Pointer to the IOUSBDevice object which is the parent of this IOUSBInterface object. - */ - virtual IOUSBDevice *GetDevice(); - /*! - @function GetInterfaceNumber - returns the zero based value identifying the index in the array of concurrent - interfaces supported by the current configuration - @result the interface index - */ - virtual UInt8 GetInterfaceNumber(); - /*! - @function GetAlternateSetting - returns the alternate setting for this interface. - @result the alternate setting - */ - virtual UInt8 GetAlternateSetting(); - /*! - @function GetNumEndpoints - returns the number of endpoints used by this interface (excluding - device endpoint zero. If the value is zero, this interface only - uses endpoint zero. - @result the number of endpoints - */ - virtual UInt8 GetNumEndpoints(); - /*! - @function GetInterfaceClass - returns the class code for this interface (assigned by the USB) - a value of zero is reserved - if the value is FFh, the interface class is vendor-specific - all other values are reserved for assignment by the USB - @result the interface class - */ - virtual UInt8 GetInterfaceClass(); - /*! - @function GetInterfaceSubClass - returns the subclass code (assigned by the USB). - These codes are qualified by the value returned by GetInterfaceClass - @result the interface subclass - */ - virtual UInt8 GetInterfaceSubClass(); - /*! - @function GetInterfaceProtocol - returns the protocol code (assigned by the USB). - @result the interface index - */ - virtual UInt8 GetInterfaceProtocol(); - /*! - @function GetInterfaceStringIndex - returns the index of the string descriptor describing the interface - @result the string index - */ - virtual UInt8 GetInterfaceStringIndex(); - - /*! - @function DeviceRequest - @abstract Sends a control request to the default control pipe in the device (pipe zero) - @param request The parameter block to send to the device - @param completion Function to call when request completes. If omitted then - DeviceRequest() executes synchronously, blocking until the request is complete. If the request is asynchronous, the client must make sure that - the IOUSBDevRequest is not released until the callback has occurred. - */ - virtual IOReturn DeviceRequest(IOUSBDevRequest *request, IOUSBCompletion *completion = 0); - - /*! - @function DeviceRequest - @abstract Sends a control request to the default control pipe in the device (pipe zero) - @param request The parameter block to send to the device (with the pData as an IOMemoryDesriptor) - @param completion Function to call when request completes. If omitted then - DeviceRequest() executes synchronously, blocking until the request is complete. If the request is asynchronous, the client must make sure that - the IOUSBDevRequest is not released until the callback has occurred. - */ - virtual IOReturn DeviceRequest(IOUSBDevRequestDesc *request, IOUSBCompletion *completion = 0); - - virtual bool matchPropertyTable(OSDictionary * table, SInt32 *score); - - OSMetaClassDeclareReservedUsed(IOUSBInterface, 0); - /*! - @function GetEndpointProperties - @abstract Returns the properties of an endpoint, possibly in an alternate interface. - @param alternateSetting specifies the desired alternate setting - @param endpointNumber specifies the endpoint number - @param direction specifies the direction (kUSBIn, kUSBOut) - @param transferType a pointer to hold the transfer type (kUSBControl, kUSBBulk, etc.) of the endpoint if found. - @param maxPacketSize a pointer to hold the maxPacketSize in the endpoint descriptor. - @param interval a pointer to hold the interval value in the endpoint descriptor. - @result returns kIOReturnSuccess if the endpoint is found, and kIOUSBEndpointNotFound if it is not. - */ - virtual IOReturn GetEndpointProperties(UInt8 alternateSetting, UInt8 endpointNumber, UInt8 direction, UInt8 *transferType, UInt16 *maxPacketSize, UInt8 *interval); - - OSMetaClassDeclareReservedUnused(IOUSBInterface, 1); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 2); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 3); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 4); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 5); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 6); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 7); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 8); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 9); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 10); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 11); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 12); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 13); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 14); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 15); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 16); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 17); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 18); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 19); -}; - -#endif /* _IOKIT_IOUSBINTERFACE_H */ diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBLog.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBLog.h.svn-base deleted file mode 100644 index 7f8f2a3..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBLog.h.svn-base +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Copyright © 1998-20010 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBLOG_H -#define _IOKIT_IOUSBLOG_H - -#include <IOKit/IOService.h> -#include <IOKit/IOLib.h> - - -#ifdef __cplusplus - extern "C" { -#endif - -// USB Specific defines -#define USBLog( LEVEL, ARGS...) KernelDebugLogTag( LEVEL, 'USBF', ## ARGS ) -#define USBError( LEVEL, ARGS...) KernelDebugLogInternal( ( LEVEL ), 'USBF', ## ARGS ) -#define USBStringFromReturn( IORETURN) (IOUSBController::_log)->stringFromReturn( IORETURN ) - - -// Possible Debug levels. If DEBUG_LEVEL is set to DEBUG_LEVEL_PRODUCTION, all debug logs will be -// stripped of the final code. - -#define DEBUG_LEVEL_PRODUCTION 0 -#define DEBUG_LEVEL_DEVELOPMENT 1 -#define DEBUG_LEVEL_ALPHA 2 -#define DEBUG_LEVEL_BETA 3 -#define DEBUG_LEVEL_FINAL DEBUG_LEVEL_PRODUCTION - -// Allow clients to define their own debug level. - -#if ( !defined( DEBUG_LEVEL ) ) - #define DEBUG_LEVEL DEBUG_LEVEL_PRODUCTION -#endif - -// Index for user client methods -// -enum -{ - kUSBControllerUserClientOpen = 0, - kUSBControllerUserClientClose, - kUSBControllerUserClientEnableLogger, - kUSBControllerUserClientSetDebuggingLevel, - kUSBControllerUserClientSetDebuggingType, - kUSBControllerUserClientGetDebuggingLevel, - kUSBControllerUserClientGetDebuggingType, -#ifndef __OPEN_SOURCE__ - kUSBControllerUserClientSetTestMode, - kUSBControllerUserClientReadRegister, - kUSBControllerUserClientWriteRegister, - kUSBControllerUserClientMessageController, -#endif - kNumUSBControllerMethods -}; - -#ifndef __OPEN_SOURCE__ -// Enums for the private kIOUSBMessageController message -enum -{ - kIOUSBMessageControllerDoGPIOReset = 0x00000001 -}; -#endif - -// Info Debug Output Types. - -typedef UInt32 KernelDebuggingOutputType; -enum -{ - kKernelDebugOutputIOLogType = 0x00000001, - kKernelDebugOutputKextLoggerType = 0x00000002 -}; - - -// Info Debug levels. - -typedef UInt32 KernelDebugLevel; -enum -{ - kKernelDebugInfoLevel = 1000, - kKernelDebugRareInfoLevel = 2000, - kKernelDebugAllowedErrorLevel = 3000, - kKernelDebugAssertLevel = 4000, - kKernelDebugRequireLevel = 5000, - kKernelDebugErrorLevel = 6000, - kKernelDebugCriticalErrorLevel = 7000, - kKernelDebugTragicErrorLevel = 8000, - kKernelDebugAnyLevel = 0 -}; - -// Function prototypes. - -void KernelDebugSetLevel( KernelDebugLevel inLevel ); -KernelDebugLevel KernelDebugGetLevel(); -void KernelDebugSetOutputType( KernelDebuggingOutputType inType ); -KernelDebuggingOutputType KernelDebugGetOutputType(); -IOReturn KernelDebugFindKernelLogger(); -void KernelDebugEnable( bool enable ); - -// Yes, you can call this directly. But, why? If you use the macros declared below, such as -// KernelIOLog, you get the benefit of having your logs compiled out when you set the -// DEBUG_LEVEL to production mode and recompile. Dude. Sweet. What's mine say? - -void KernelDebugLogInternal( KernelDebugLevel inLevel, UInt32 inTag, char const *inFormatString, ... ) __attribute__ ((format(printf,3,4)));; -void KernelDebugLogDataInternal( UInt32 inLevel, UInt32 inTag, void *buffer, UInt32 byteCount, bool preBuffer); - -// Handy macros. - -#define REQUIRE_NO_ERR_PRINTF( VALUE, LABEL, ARGS... ) \ - if ( VALUE != kIOReturnSuccess ) \ - { \ - KernelDebugLogInternal( kDebugInfoLevel, 'BluD', ## ARGS ); \ - goto LABEL; \ - } - -#define REQUIRE_PRINTF( TEST, LABEL, ARGS... ) \ - do \ - { \ - if ( !( TEST ) ) \ - { \ - KernelDebugLogInternal( kDebugInfoLevel, 'BluD', ## ARGS ); \ - goto LABEL; \ - } \ - } while( false ) - -// Some macros to call the debugging outputs. We'll strip out the debug logs if we are production code. - -#if DEBUG_LEVEL != DEBUG_LEVEL_PRODUCTION -#define KernelDebugLog( LEVEL, ARGS... ) KernelDebugLogInternal( ( LEVEL ), 'KDbg', ## ARGS ) __attribute__ ((format(printf,1,2))); - #define KernelDebugLogTag( LEVEL, TAG, ARGS... ) KernelDebugLogInternal( ( LEVEL ), ( TAG ), ## ARGS ) - #define KernelDebugLogData( LEVEL, TAG, BUFFER, SIZE, HOLD) KernelDebugLogDataInternal( ( LEVEL ), ( TAG ), ( BUFFER ), ( SIZE ), ( HOLD )) -#else - #define KernelDebugLog( LEVEL, ARGS... ) - #define KernelDebugLogTag( LEVEL, TAG, ARGS... ) - #define KernelDebugLogData( LEVEL, TAG, BUFFER, SIZE, HOLD) -#endif - - -#ifdef __cplusplus - } - -//================================================================================================ -// Forward declarations -//================================================================================================ -class com_apple_iokit_KLogClient; - -//================================================================================================ -// Defines -//================================================================================================ -#define kLogKextName "com_apple_iokit_KLog" -#define MAXUSERS 5 - -//================================================================================================ -// Custom Types -//================================================================================================ - -typedef UInt32 KLogLevel; -typedef UInt32 KLogTag; - -//================================================================================================ -// com_apple_iokit_KLog -//================================================================================================ - -class com_apple_iokit_KLog : public IOService -{ - - OSDeclareDefaultStructors(com_apple_iokit_KLog) - - com_apple_iokit_KLogClient * mClientPtr[MAXUSERS+1]; - - unsigned char * mMsgBuffer; - UInt8 mClientCount; - UInt8 mMsgSize; - bool mErrFlag; - struct timeval * mTimeVal; - IOLock * mLogLock; - -public: - - static com_apple_iokit_KLog * logger; - - virtual bool init(OSDictionary *dictionary = 0); - virtual void free(void); - - virtual IOService * probe(IOService *provider, SInt32 *score); - virtual bool start(IOService *provider); - virtual void stop(IOService *provider); - virtual IOReturn newUserClient( task_t owningTask, void * securityID, - UInt32 type, IOUserClient ** handler ); - - virtual SInt8 Log( KLogLevel level, KLogTag tag, const char *format, ... ); - virtual SInt8 vLog( KLogLevel level, KLogTag tag, const char *format, va_list in_va_list ); - - void closeChild(com_apple_iokit_KLogClient *ptr); - void setErr(bool set); - -}; - -#define kMaxStatusBufSize (8*1024) - - -class IOUSBLog : public IOService -{ - OSDeclareAbstractStructors(IOUSBLog) - -private: -public: - virtual bool init( OSDictionary * dictionary = 0 ); - virtual const char * stringFromReturn( IOReturn rtn ); - static IOUSBLog *usblog(); - virtual void AddStatusLevel (UInt32 level, UInt32 ref, char *status, UInt32 value); - virtual void AddStatus(char *message); - virtual void AddStatus(UInt32 level, char *message); - virtual void USBLogPrintf(UInt32 level, char *format,...); - virtual char * strstr(const char *in, const char *str); -}; - - -#endif -#endif /* ! _IOKIT_IOUSBLOG_H */ - diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBMassStorageClass.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBMassStorageClass.h.svn-base deleted file mode 100644 index 02c8557..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBMassStorageClass.h.svn-base +++ /dev/null @@ -1,507 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IOUSBMASSSTORAGECLASS_H -#define _IOKIT_IOUSBMASSSTORAGECLASS_H - -// Headers for general IOKit definitions -#include <IOKit/IOLib.h> -#include <IOKit/IOService.h> -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IOMessage.h> - -// Headers for USB specific definitions -#include <IOKit/usb/IOUSBInterface.h> -#include <IOKit/usb/IOUSBPipe.h> -#include <IOKit/usb/USBSpec.h> -#include <IOKit/usb/USB.h> - -// Headers for SCSI Protocol support definitions -#include <IOKit/scsi/IOSCSIProtocolServices.h> - -// BSD includes -#include <sys/sysctl.h> - -#define UNUSED(x) ((void)x) - - -#pragma mark - -#pragma mark Vendor Specific Device Support -#define kIOUSBMassStorageCharacteristics "USB Mass Storage Characteristics" -#define kIOUSBMassStoragePreferredSubclass "Preferred Subclass" -#define kIOUSBMassStoragePreferredProtocol "Preferred Protocol" -#define kIOUSBMassStorageResetOnResume "Reset On Resume" -#define kIOUSBMassStorageUseStandardUSBReset "Use Standard USB Reset" -#define kIOUSBKnownCSWTagIssues "Known CSW Tag Issues" -#define kIOUSBMassStorageMaxLogicalUnitNumber "Max Logical Unit Number" -#define kIOPropertyIOUnitKey "IOUnit" -#define kIOUSBMassStorageDoNotMatch "Do Not Match MSC" -#define kIOUSBMassStorageDoNotOperate "Do Not Operate" -#define kIOUSBMassStorageEnableSuspendResumePM "Enable Port Suspend-Resume PM" - -enum -{ - kUSBDAddressLength = 10 -}; - -#pragma mark - -#pragma mark CBI Protocol Strutures -// Structure for the global PB's -struct CBIRequestBlock -{ - SCSITaskIdentifier request; - IOUSBDevRequest cbiDevRequest; - SCSICommandDescriptorBlock cbiCDB; - IOUSBCompletion cbiCompletion; - UInt32 currentState; - IOMemoryDescriptor * cbiPhaseDesc; - UInt8 cbiGetStatusBuffer[2]; // 2 bytes as specified in the USB spec -}; - -typedef struct CBIRequestBlock CBIRequestBlock; - -#pragma mark - -#pragma mark Bulk Only Protocol Structures - -struct StorageBulkOnlyCBW -{ - UInt32 cbwSignature; - UInt32 cbwTag; - UInt32 cbwTransferLength; - UInt8 cbwFlags; - UInt8 cbwLUN; // Bits 0-3: LUN, 4-7: Reserved - UInt8 cbwCDBLength; // Bits 0-4: CDB Length, 5-7: Reserved - UInt8 cbwCDB[16]; -}; - -typedef struct StorageBulkOnlyCBW StorageBulkOnlyCBW; - -struct StorageBulkOnlyCSW -{ - UInt32 cswSignature; - UInt32 cswTag; - UInt32 cswDataResidue; - UInt8 cswStatus; -}; - -typedef struct StorageBulkOnlyCSW StorageBulkOnlyCSW; - -struct BulkOnlyRequestBlock -{ - SCSITaskIdentifier request; - IOUSBCompletion boCompletion; - UInt32 currentState; - StorageBulkOnlyCBW boCBW; - StorageBulkOnlyCSW boCSW; - IOMemoryDescriptor * boPhaseDesc; - UInt8 boGetStatusBuffer[2]; // 2 bytes as specified in the USB spec -}; - -typedef struct BulkOnlyRequestBlock BulkOnlyRequestBlock; - - -#pragma mark - -#pragma mark IOUSBMassStorageClass definition - -class IOUSBMassStorageClass : public IOSCSIProtocolServices -{ - OSDeclareDefaultStructors(IOUSBMassStorageClass) - -private: - // ---- Member variables used by all protocols ---- - // The interface object that provides the driver with access to the - // USB so that it may talk to its device. - IOUSBInterface * fInterface; - - // The pipe objects that the driver uses to transport data through a - // pipe to the appropriate endpoint. - IOUSBPipe * fBulkInPipe; - IOUSBPipe * fBulkOutPipe; - IOUSBPipe * fInterruptPipe; - IOUSBDevRequest fUSBDeviceRequest; - UInt8 fPreferredSubclass; - UInt8 fPreferredProtocol; - - // The maximum Logical Unit Number. This is the highest valid LUN - // that the USB device supports, so if the device only supports one - // LUN, such as CBI and CB, this number will be zero. - UInt8 fMaxLogicalUnitNumber; - - // ---- Member variables used by CBI protocol ---- - bool fCBICommandStructInUse; - - CBIRequestBlock fCBICommandRequestBlock; - - // ---- Member variables used by Bulk Only protocol ---- - // Command tag, this driver just uses a sequential counter that is - // incremented for each CBW that is sent to the device. - UInt32 fBulkOnlyCommandTag; - - bool fBulkOnlyCommandStructInUse; - - // Dedicated CBW and CSW IOMemoryDescriptors are listed in the ExpansionData struct. - - // The Request block that contains all the necessary data for - // transporting a Bulk Only request across the USB. - BulkOnlyRequestBlock fBulkOnlyCommandRequestBlock; - -protected: - // Reserve space for future expansion. - struct ExpansionData - { - bool fResetInProgress; - OSSet * fClients; - IOUSBPipe * fPotentiallyStalledPipe; - bool fUseUSBResetNotBOReset; - bool fAbortCurrentSCSITaskInProgress; - IOMemoryDescriptor * fCBIMemoryDescriptor; - IOMemoryDescriptor * fBulkOnlyCBWMemoryDescriptor; - IOMemoryDescriptor * fBulkOnlyCSWMemoryDescriptor; - bool fDeviceAttached; - bool fWaitingForReconfigurationMessage; - bool fTerminating; - bool fKnownCSWTagMismatchIssues; - bool fPortSuspendResumeForPMEnabled; - bool fPortIsSuspended; - bool fRequiresResetOnResume; - bool fAutonomousSpinDownWorkAround; - UInt8 fConsecutiveResetCount; - bool fClearStallInProgress; /* OBSOLETE */ - bool fTerminationDeferred; - }; - ExpansionData * reserved; - - #define fResetInProgress reserved->fResetInProgress - #define fClients reserved->fClients - #define fPotentiallyStalledPipe reserved->fPotentiallyStalledPipe - #define fUseUSBResetNotBOReset reserved->fUseUSBResetNotBOReset - #define fAbortCurrentSCSITaskInProgress reserved->fAbortCurrentSCSITaskInProgress - #define fCBIMemoryDescriptor reserved->fCBIMemoryDescriptor - #define fBulkOnlyCBWMemoryDescriptor reserved->fBulkOnlyCBWMemoryDescriptor - #define fBulkOnlyCSWMemoryDescriptor reserved->fBulkOnlyCSWMemoryDescriptor - #define fDeviceAttached reserved->fDeviceAttached - #define fWaitingForReconfigurationMessage reserved->fWaitingForReconfigurationMessage - #define fTerminating reserved->fTerminating - #define fKnownCSWTagMismatchIssues reserved->fKnownCSWTagMismatchIssues - #define fPortSuspendResumeForPMEnabled reserved->fPortSuspendResumeForPMEnabled - #define fPortIsSuspended reserved->fPortIsSuspended - #define fRequiresResetOnResume reserved->fRequiresResetOnResume - #define fAutonomousSpinDownWorkAround reserved->fAutonomousSpinDownWorkAround - #define fConsecutiveResetCount reserved->fConsecutiveResetCount - #define fClearStallInProgress reserved->fClearStallInProgress - #define fTerminationDeferred reserved->fTerminationDeferred - - // Enumerated constants used to control various aspects of this - // driver. - - // Enumerations for Mass Storage Class Subclass types - enum - { - kUSBStorageRBCSubclass = 1, - kUSBStorageSFF8020iSubclass = 2, - kUSBStorageQIC157Subclass = 3, - kUSBStorageUFISubclass = 4, - kUSBStorageSFF8070iSubclass = 5, - kUSBStorageSCSITransparentSubclass = 6 - }; - - // The supported USB Mass Storage Class transport protocols. - enum - { - kProtocolControlBulkInterrupt = 0x00, - kProtocolControlBulk = 0x01, - kProtocolBulkOnly = 0x50 - }; - - // ------- Protocol support functions ------------ - // The SendSCSICommand function will take a SCSITask Object and transport - // it across the physical wire(s) to the device - virtual bool SendSCSICommand( - SCSITaskIdentifier request, - SCSIServiceResponse * serviceResponse, - SCSITaskStatus * taskStatus ); - - // The AbortSCSICommand function will abort the indicated SCSITask object, - // if it is possible and the SCSITask has not already completed. - virtual SCSIServiceResponse AbortSCSICommand( SCSITaskIdentifier abortTask ); - - virtual bool IsProtocolServiceSupported( - SCSIProtocolFeature feature, - void * serviceValue ); - - virtual bool HandleProtocolServiceFeature( - SCSIProtocolFeature feature, - void * serviceValue ); - - // Methods for retrieving and setting the object for the Interface - IOUSBInterface * GetInterfaceReference( void ); - void SetInterfaceReference( IOUSBInterface * newInterface ); - - UInt8 GetInterfaceSubclass( void ); - UInt8 GetInterfaceProtocol( void ); - - // Methods for retrieving an object for a Pipe. - IOUSBPipe * GetControlPipe( void ); - IOUSBPipe * GetBulkInPipe( void ); - IOUSBPipe * GetBulkOutPipe( void ); - IOUSBPipe * GetInterruptPipe( void ); - - // Methods for getting and setting the maximum LUN of a device. - UInt8 GetMaxLogicalUnitNumber( void ) const; - void SetMaxLogicalUnitNumber( UInt8 maxLUN ); - - virtual void CompleteSCSICommand( - SCSITaskIdentifier request, - IOReturn status ); - - virtual bool BeginProvidedServices( void ); - virtual bool EndProvidedServices( void ); - - // The Protocol specific helper methods for SendSCSICommand - virtual IOReturn SendSCSICommandForCBIProtocol( - SCSITaskIdentifier request ); - - virtual IOReturn SendSCSICommandForBulkOnlyProtocol( - SCSITaskIdentifier request ); - - // The Protocol specific helper methods for AbortSCSICommand - virtual IOReturn AbortSCSICommandForCBIProtocol( - SCSITaskIdentifier abortTask ); - - virtual IOReturn AbortSCSICommandForBulkOnlyProtocol( - SCSITaskIdentifier abortTask ); - - // Helper methods for performing general USB device requests - virtual IOReturn ClearFeatureEndpointStall( - IOUSBPipe * thePipe, - IOUSBCompletion * completion ); - virtual IOReturn GetStatusEndpointStatus( - IOUSBPipe * thePipe, - void * endpointStatus, - IOUSBCompletion * completion ); - - /* All CBI transport related methods. - */ - // All definitions and structures for the CBI Protocol - enum - { - kUSBStorageAutoStatusSize = 2 // Per the USB CBI Protocol - }; - - // Methods for accessing Bulk Only specific member variables. - CBIRequestBlock * GetCBIRequestBlock( void ); - - void ReleaseCBIRequestBlock( - CBIRequestBlock * cbiRequestBlock ); - - // Methods used for CBI/CB command transportation. - static void CBIProtocolUSBCompletionAction( - void * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining); - - IOReturn CBIProtocolTransferData( - CBIRequestBlock * cbiRequestBlock, - UInt32 nextExecutionState ); - - IOReturn CBIProtocolReadInterrupt( - CBIRequestBlock * cbiRequestBlock, - UInt32 nextExecutionState ); - - IOReturn CBIGetStatusEndpointStatus( - IOUSBPipe * targetPipe, - CBIRequestBlock * cbiRequestBlock, - UInt32 nextExecutionState ); - - IOReturn CBIClearFeatureEndpointStall( - IOUSBPipe * targetPipe, - CBIRequestBlock * cbiRequestBlock, - UInt32 nextExecutionState ); - - void CBIProtocolCommandCompletion( - CBIRequestBlock * cbiRequestBlock, - IOReturn resultingStatus, - UInt32 bufferSizeRemaining ); - - /* All Bulk Only transport related methods, structures and enums. - */ - // All Bulk Only specific structures and enums. - - // All definitions and structures for the Bulk Only Protocol - // Command Block Wrapper (CBW) - enum - { - // CBW general struture definitions - kCommandBlockWrapperSignature = OSSwapHostToBigConstInt32 ( 'USBC' ), - kByteCountOfCBW = 31, - - // CBW LUN related definitions - kCBWLUNMask = 0x0F, - - kCBWFlagsDataOut = 0x00, - kCBWFlagsDataIn = 0x80 - }; - - // All definitions and structures for the Bulk Only Protocol - // Command Status Wrapper (CSW) - enum - { - // CSW general struture definitions - kCommandStatusWrapperSignature = OSSwapHostToBigConstInt32 ( 'USBS' ), - kByteCountOfCSW = 13, - - // CSW status definitions - kCSWCommandPassedError = 0x00, // No error occurred - kCSWCommandFailedError = 0x01, /* An error occurred (probably a - * bad command or parameter ) */ - kCSWPhaseError = 0x02 /* A transfer was performed in - * the wrong sequence */ - }; - - // Methods for accessing Bulk Only specific member variables. - BulkOnlyRequestBlock * GetBulkOnlyRequestBlock( void ); - - void ReleaseBulkOnlyRequestBlock( - BulkOnlyRequestBlock * boRequestBlock ); - - UInt32 GetNextBulkOnlyCommandTag( void ); - - // Methods for Bulk Only specific utility commands - IOReturn BulkDeviceResetDevice( - BulkOnlyRequestBlock * boRequestBlock, - UInt32 nextExecutionState ); - - // Methods used for Bulk Only command transportation. - IOReturn BulkOnlySendCBWPacket( - BulkOnlyRequestBlock * boRequestBlock, - UInt32 nextExecutionState ); - - IOReturn BulkOnlyTransferData( - BulkOnlyRequestBlock * boRequestBlock, - UInt32 nextExecutionState ); - - IOReturn BulkOnlyReceiveCSWPacket( - BulkOnlyRequestBlock * boRequestBlock, - UInt32 nextExecutionState ); - - void BulkOnlyExecuteCommandCompletion ( - BulkOnlyRequestBlock * boRequestBlock, - IOReturn resultingStatus, - UInt32 bufferSizeRemaining ); - - static void BulkOnlyUSBCompletionAction ( - void * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining ); - -public: - - bool init( OSDictionary * propTable ); - virtual bool start( IOService * provider ); - virtual void stop( IOService * provider ); - virtual void free( void ); - virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); - - virtual bool willTerminate( IOService * provider, - IOOptionBits options ); - - virtual bool didTerminate( IOService * provider, - IOOptionBits options, - bool * defer ); - - virtual bool handleOpen( IOService * client, - IOOptionBits options, - void * arg ); - - virtual void handleClose( IOService * client, - IOOptionBits options ); - - virtual bool handleIsOpen( const IOService * client ) const; - - virtual IOReturn HandlePowerOn( void ); - -protected: - - static IOReturn sWaitForReset( void * refcon ); - IOReturn GatedWaitForReset( void ); - - static IOReturn sWaitForTaskAbort( void * refcon ); /* OBSOLETE */ - IOReturn GatedWaitForTaskAbort( void ); /* OBSOLETE */ - - static void sResetDevice( void * refcon ); - - static void sAbortCurrentSCSITask( void * refcon ); /* OBSOLETE */ - - OSMetaClassDeclareReservedUsed( IOUSBMassStorageClass, 1 ); - virtual IOReturn StartDeviceRecovery( void ); /* OBSOLETE */ - - OSMetaClassDeclareReservedUsed( IOUSBMassStorageClass, 2 ); - virtual void FinishDeviceRecovery( IOReturn status ); /* OBSOLETE */ - - static void DeviceRecoveryCompletionAction( - void * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining ); /* OBSOLETE */ - - void ResetDeviceNow( bool waitForReset ); - - void AbortCurrentSCSITask( void ); - - bool IsPhysicalInterconnectLocationInternal ( void ); - - IOReturn SuspendPort ( bool suspend ); - -private: - - void ClearPipeStall ( void ); - - IOReturn AcceptSCSITask ( SCSITaskIdentifier scsiTask, bool * pAccepted ); - - void CheckDeferredTermination ( void ); - - void GatedCompleteSCSICommand ( SCSITaskIdentifier request, SCSIServiceResponse * serviceResponse, SCSITaskStatus * taskStatus ); - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 3 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 4 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 5 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 6 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 7 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 8 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 9 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 10 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 11 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 12 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 13 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 14 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 15 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 16 ); - -}; - - -#endif _IOKIT_IOUSBMASSSTORAGECLASS_H diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBMassStorageUFISubclass.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBMassStorageUFISubclass.h.svn-base deleted file mode 100644 index cbfe3c8..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBMassStorageUFISubclass.h.svn-base +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IOUSBMASSSTORAGEUFISUBCLASS_H -#define _IOKIT_IOUSBMASSSTORAGEUFISUBCLASS_H - -// This class' header file -#include <IOKit/usb/IOUSBMassStorageClass.h> -#include <IOKit/scsi/IOSCSIPrimaryCommandsDevice.h> - - -#pragma mark - -#pragma mark IOUSBMassStorageUFIDevice declaration - -class IOUSBMassStorageUFIDevice : public IOSCSIPrimaryCommandsDevice -{ - OSDeclareDefaultStructors(IOUSBMassStorageUFIDevice) - -private: - static void AsyncReadWriteComplete( SCSITaskIdentifier completedTask ); - -protected: - // Reserve space for future expansion. - struct IOUSBMassStorageUFIDeviceExpansionData - { - }; - IOUSBMassStorageUFIDeviceExpansionData *fIOUSBMassStorageUFIDeviceReserved; - - // ---- Medium Characteristics ---- - bool fMediumPresent; - - // The byte count of each physical block on the medium. - UInt32 fMediumBlockSize; - - // The total number of blocks of fMediumBlockSize on the medium. - UInt32 fMediumBlockCount; - - // Whether the installed medium is protected from writes - bool fMediumIsWriteProtected; - - // Polling thread variables - thread_call_t fPollingThread; - UInt32 fPollingMode; - enum - { - kPollingMode_Suspended = 0, - kPollingMode_NewMedia = 1, - kPollingMode_MediaRemoval = 2 - }; - - // ---- Methods for controlling the current state of device support ---- - virtual bool InitializeDeviceSupport( void ); - virtual void StartDeviceSupport ( void ); - virtual void SuspendDeviceSupport( void ); - virtual void ResumeDeviceSupport( void ); - virtual void StopDeviceSupport ( void ); - virtual void TerminateDeviceSupport( void ); - - // ---- Methods used for misc ---- - virtual bool ClearNotReadyStatus( void ); - virtual void CreateStorageServiceNub( void ); - virtual bool DetermineDeviceCharacteristics( void ); - - // ---- Methods used for controlling the polling thread ---- - virtual void ProcessPoll( void ); - virtual void EnablePolling( void ); - virtual void DisablePolling( void ); - - // ---- Main and support methods for polling for new Media ---- - virtual void PollForNewMedia( void ); - virtual bool DetermineMediaPresence( void ); - virtual bool DetermineMediumCapacity( - UInt64 * blockSize, - UInt64 * blockCount ); - virtual bool DetermineMediumWriteProtectState( void ); - - // ---- Main and support methods for polling for Media removal ---- - virtual void PollForMediaRemoval( void ); - - // ---- Methods used for power managment ---- - virtual UInt32 GetInitialPowerState ( void ); - virtual void InitializePowerManagement ( IOService * provider ); - virtual void HandlePowerChange ( void ); - virtual void HandleCheckPowerState ( void ); - virtual void TicklePowerManager ( void ); - virtual UInt32 GetNumberOfPowerStateTransitions ( void ); - - // ---- Methods used for handling medium characteristics ---- - virtual void SetMediumCharacteristics( - UInt32 blockSize, - UInt32 blockCount ); - - virtual void ResetMediumCharacteristics( void ); - - virtual IOReturn IssueRead( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueRead( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - void * clientData ); - - - virtual IOReturn IssueWrite( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueWrite( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - void * clientData ); - -public: - - static void sProcessPoll( void * pdtDriver, void * refCon ); - - // Interface to the UFI Storage Services Driver - // ---- Methods for controlling the device ---- - virtual IOReturn SyncReadWrite( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - UInt64 blockSize ); - - virtual IOReturn AsyncReadWrite( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - UInt64 blockSize, - void * clientData ); - - // ---- Methods for controlling medium state ---- - virtual IOReturn EjectTheMedium( void ); - - // ---- Methods for controlling media format ---- - virtual IOReturn FormatMedium( - UInt64 blockCount, - UInt64 blockSize ); - virtual UInt32 GetFormatCapacities( - UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - - // ---- Query methods to report device characteristics ---- - // Report the maximum number of blocks that the device can handle per - // read or write. A value of 0 (zero) indicates there is no limit aside - // from the size of the method's return parameter. - virtual UInt64 ReportDeviceMaxBlocksReadTransfer( void ); - virtual UInt64 ReportDeviceMaxBlocksWriteTransfer( void ); - - // ---- Query methods to report installed medium characteristics ---- - virtual UInt64 ReportMediumBlockSize( void ); - virtual UInt64 ReportMediumTotalBlockCount( void ); - virtual bool ReportMediumWriteProtection( void ); - - // Methods for getting device information strings - virtual char * GetVendorString( void ); - virtual char * GetProductString( void ); - virtual char * GetRevisionString( void ); - OSDictionary * GetProtocolCharacteristicsDictionary ( void ); - OSDictionary * GetDeviceCharacteristicsDictionary ( void ); - -protected: - // Utility methods used by all SCSI Command Set objects - - // isParameterValid methods are used to validate that the parameter passed into - // the command methods are of the correct value. - - // Validate Parameter used for 1 bit to 1 byte paramaters - bool IsParameterValid( - SCSICmdField1Byte param, - SCSICmdField1Byte mask ); - - // Validate Parameter used for 9 bit to 2 byte paramaters - bool IsParameterValid( - SCSICmdField2Byte param, - SCSICmdField2Byte mask ); - - // Validate Parameter used for 17 bit to 4 byte paramaters - bool IsParameterValid( - SCSICmdField4Byte param, - SCSICmdField4Byte mask ); - - // UFI Required Commands - virtual bool FORMAT_UNIT( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - IOByteCount defectListSize, - SCSICmdField1Byte TRACK_NUMBER, - SCSICmdField2Byte INTERLEAVE ); - - virtual bool INQUIRY( - SCSITaskIdentifier request, - IOMemoryDescriptor *dataBuffer, - SCSICmdField1Byte PAGE_OR_OPERATION_CODE, - SCSICmdField1Byte ALLOCATION_LENGTH ); - - virtual bool MODE_SELECT_10( - SCSITaskIdentifier request, - IOMemoryDescriptor *dataBuffer, - SCSICmdField1Bit PF, - SCSICmdField1Bit SP, - SCSICmdField2Byte PARAMETER_LIST_LENGTH ); - - virtual bool MODE_SENSE_10( - SCSITaskIdentifier request, - IOMemoryDescriptor *dataBuffer, - SCSICmdField1Bit DBD, - SCSICmdField2Bit PC, - SCSICmdField6Bit PAGE_CODE, - SCSICmdField2Byte PARAMETER_LIST_LENGTH ); - - virtual bool PREVENT_ALLOW_MEDIUM_REMOVAL( - SCSITaskIdentifier request, - SCSICmdField1Bit PREVENT ); - - virtual bool READ_10( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH ); - - virtual bool READ_12( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH ); - - virtual bool READ_CAPACITY( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Bit PMI ); - - virtual bool READ_FORMAT_CAPACITIES( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Byte ALLOCATION_LENGTH ); - - virtual bool REQUEST_SENSE( - SCSITaskIdentifier request, - IOMemoryDescriptor *dataBuffer, - SCSICmdField1Byte ALLOCATION_LENGTH ); - - virtual bool REZERO_UNIT( - SCSITaskIdentifier request ); - - virtual bool SEEK( - SCSITaskIdentifier request, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS ); - - virtual bool SEND_DIAGNOSTICS( - SCSITaskIdentifier request, - SCSICmdField1Bit PF, - SCSICmdField1Bit SELF_TEST, - SCSICmdField1Bit DEF_OFL, - SCSICmdField1Bit UNIT_OFL ); - - virtual bool START_STOP_UNIT( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField1Bit LOEJ, - SCSICmdField1Bit START ); - - virtual bool TEST_UNIT_READY( - SCSITaskIdentifier request ); - - virtual bool VERIFY( - SCSITaskIdentifier request, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYTCHK, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte VERIFICATION_LENGTH ); - - virtual bool WRITE_10( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH ); - - virtual bool WRITE_12( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit EBP, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH ); - - virtual bool WRITE_AND_VERIFY( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYTCHK, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH ); -}; - - -#pragma mark - -#pragma mark IOUSBMassStorageUFISubclass declaration - - -class IOUSBMassStorageUFISubclass : public IOUSBMassStorageClass -{ - OSDeclareDefaultStructors(IOUSBMassStorageUFISubclass) - -protected: - virtual bool BeginProvidedServices( void ); - virtual bool EndProvidedServices( void ); -}; - -#endif _IOKIT_IOUSBMASSSTORAGEUFISUBCLASS_H diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBNub.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBNub.h.svn-base deleted file mode 100644 index a998e5b..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBNub.h.svn-base +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBNUB_H -#define _IOKIT_IOUSBNUB_H - -#include <IOKit/IOService.h> -#include <libkern/c++/OSData.h> -#include <IOKit/IOMemoryDescriptor.h> - -#include <IOKit/usb/USB.h> - -class IOUSBController; -class IOUSBPipe; - -/*! - @class IOUSBNub - @abstract Super class for for IOUSBDevice and IOUSBInterface. - */ -class IOUSBNub : public IOService -{ - OSDeclareDefaultStructors(IOUSBNub) - -public: - - // IOKit method - virtual void joinPMtree ( IOService * driver ); - - virtual bool USBCompareProperty(OSDictionary * matching, const char * key ); - - bool IsWildCardMatch( OSDictionary * matching, const char * key ); - bool USBComparePropertyWithMask( OSDictionary *matching, const char *key, const char * maskKey ); -}; - -#ifdef __cplusplus -extern "C" { -#endif - -void printDescriptor(const IOUSBDescriptorHeader *desc); -void printDeviceDescriptor(const IOUSBDeviceDescriptor *desc); -void printConfigDescriptor(const IOUSBConfigurationDescriptor *cd); -void printEndpointDescriptor(const IOUSBEndpointDescriptor *ed); -void printInterfaceDescriptor(const IOUSBInterfaceDescriptor *id); - -#ifdef __cplusplus -} -#endif - -#endif /* _IOKIT_IOUSBNUB_H */ diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBPipe.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBPipe.h.svn-base deleted file mode 100644 index 3286b92..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBPipe.h.svn-base +++ /dev/null @@ -1,387 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.2 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBPIPE_H -#define _IOKIT_IOUSBPIPE_H - -#include <IOKit/IOService.h> -#include <IOKit/IOMemoryDescriptor.h> - -#include <IOKit/usb/USB.h> -#include <IOKit/usb/IOUSBController.h> -#include <IOKit/usb/IOUSBControllerV2.h> - -class IOUSBInterface; - -/*! - @class IOUSBPipe - @abstract The object representing an open pipe for a device. -*/ -class IOUSBPipe : public OSObject -{ - friend class IOUSBInterface; - friend class IOUSBDevice; - - OSDeclareDefaultStructors(IOUSBPipe) - -protected: - - const IOUSBEndpointDescriptor * _descriptor; - IOUSBController::Endpoint _endpoint; // tidied up version of descriptor - IOUSBController * _controller; - USBDeviceAddress _address; - UInt8 _status; // was previously used for status. Now used to detect whether a property exists or not - - struct ExpansionData - { - IOReturn _correctStatus; - IOUSBDevice * _device; // Remember containing device for clearing TTs - UInt8 _speed; - IOUSBInterface * _interface; - bool _crossEndianCompatible; - UInt32 _locationID; - }; - ExpansionData * _expansionData; - - virtual void free(); - - IOReturn ClosePipe(void); - -public: - - virtual bool InitToEndpoint(const IOUSBEndpointDescriptor *endpoint, UInt8 speed, - USBDeviceAddress address, IOUSBController * controller); - - // The following 2 methods are obsolete - // - static IOUSBPipe *ToEndpoint(const IOUSBEndpointDescriptor *endpoint, UInt8 speed, - USBDeviceAddress address, IOUSBController * controller); - - static IOUSBPipe *ToEndpoint(const IOUSBEndpointDescriptor *endpoint, - IOUSBDevice * device, IOUSBController * controller); - - static IOUSBPipe *ToEndpoint(const IOUSBEndpointDescriptor *endpoint, - IOUSBDevice * device, IOUSBController * controller, IOUSBInterface *interface); - - // Controlling pipe state - /*! - @function GetStatus - This method does NOT work. Do not call it. See GetPipeStatus for the correct method. - GetStatus will always return 0. - */ - virtual UInt8 GetStatus(void); - /*! - @function Abort - This method causes all outstanding I/O on a pipe to complete with return code kIOReturnAborted. It clears the halted bit but does NOT clear the - toggle bit on the endpoint in the controller. If you wish to clear the toggle bit, see ClearPipeStall - */ - virtual IOReturn Abort(void); - /*! - @function Reset - This method is identical to ClearPipeStall(false). The use of that API is preferred. - */ - virtual IOReturn Reset(void); - /*! - @function ClearStall - This method is equivalent to ClearPipeStall(false). This method is available before version 1.9. - */ - virtual IOReturn ClearStall(void); - - // - // Transferring Data - // - - // deprecated - virtual IOReturn Read(IOMemoryDescriptor * buffer, - IOUSBCompletion * completion = 0, - IOByteCount * bytesRead = 0); - - // deprecated - virtual IOReturn Write(IOMemoryDescriptor * buffer, - IOUSBCompletion * completion = 0); - - // Transfer data over Isochronous pipes - /*! - @function Read - Read from an isochronous endpoint - @param buffer place to put the transferred data - @param frameStart USB frame number of the frame to start transfer - @param numFrames Number of frames to transfer - @param frameList Bytes to transfer and result for each frame - @param completion describes action to take when buffer has been filled - */ - virtual IOReturn Read(IOMemoryDescriptor * buffer, - UInt64 frameStart, UInt32 numFrames, IOUSBIsocFrame *frameList, - IOUSBIsocCompletion * completion = 0); - /*! - @function Write - Write to an isochronous endpoint - @param buffer place to get the transferred data - @param frameStart USB frame number of the frame to start transfer - @param numFrames Number of frames to transfer - @param frameList Bytes to transfer and result for each frame - @param completion describes action to take when buffer has been emptied - */ - virtual IOReturn Write(IOMemoryDescriptor * buffer, - UInt64 frameStart, UInt32 numFrames, IOUSBIsocFrame *frameList, - IOUSBIsocCompletion * completion = 0); - - // Do a control request over a Control pipe, using a memory descriptor - /*! - @function ControlRequest - Make a control request - There are two versions of this method, one uses a simple void * - to point to the data portion of the transfer, the other uses an - IOMemoryDescriptor to point to the data. - @param request parameter block for the control request - @param completion describes action to take when the request has been executed - */ - virtual IOReturn ControlRequest(IOUSBDevRequestDesc *request, - IOUSBCompletion *completion = 0); - - // Do a control request over a Control pipe, using a simple buffer - virtual IOReturn ControlRequest(IOUSBDevRequest *request, - IOUSBCompletion *completion = 0); - - /* - * Accessors - */ - /*! - @function GetEndpoint - returns a pointer to the Endpoint structure for the pipe. - */ - virtual const IOUSBController::Endpoint * GetEndpoint(); - /*! - @function GetEndpointDescriptor - returns the endpoint descriptor for the pipe. - */ - virtual const IOUSBEndpointDescriptor * GetEndpointDescriptor(); - /*! - @function GetDirection - returns the direction of the pipe:kUSBOut/kUSBIn for a bulk or interrupt pipe, - kUSBAnyDirn for a control pipe. - */ - virtual UInt8 GetDirection(); - /*! - @function GetType - returns the pipe type: kUSBControl, kUSBBulk or kUSBInterrupt. - */ - virtual UInt8 GetType(); - /*! - @function GetEndpointNumber - returns the endpoint number in the device that the pipe is connected to. - */ - virtual UInt8 GetEndpointNumber(); - virtual USBDeviceAddress GetAddress(); - virtual UInt16 GetMaxPacketSize(); - virtual UInt8 GetInterval(); - - // Transfer data over Bulk pipes with timeouts. - OSMetaClassDeclareReservedUsed(IOUSBPipe, 0); - - // deprecated - virtual IOReturn Read(IOMemoryDescriptor * buffer, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOUSBCompletion * completion = 0, - IOByteCount * bytesRead = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 1); - - // deprecated - virtual IOReturn Write(IOMemoryDescriptor * buffer, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOUSBCompletion * completion = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 2); - // Do a control request over a Control pipe, using a memory descriptor - /*! - @function ControlRequest - Make a control request. - There are two versions of this method, one uses a simple void * - to point to the data portion of the transfer, the other uses an - IOMemoryDescriptor to point to the data. - @param request parameter block for the control request - @param noDataTimeout Specifies an amount of time (in ms) after which the command will be aborted - if no data has been transferred on the bus. - @param completionTimeout Specifies an amount of time (in ms) after which the command will be aborted if the entire command has - not been completed. - @param completion describes action to take when the request has been executed - */ - virtual IOReturn ControlRequest(IOUSBDevRequestDesc *request, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOUSBCompletion *completion = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 3); - // Do a control request over a Control pipe, using a simple buffer - virtual IOReturn ControlRequest(IOUSBDevRequest *request, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOUSBCompletion *completion = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 4); - /*! - @function Read - Read from an interrupt or bulk endpoint - @param buffer place to put the transferred data - @param noDataTimeout number of milliseconds of no bus activity until transaction times out. Note that if a tranasction times out - the driver software may have to resynchronize the data toggle. See ClearPipeStall. - @param completionTimeout number of milliseconds from the time the transaction is placed on the bus until it times out - @param reqCount requested number of bytes to transfer. must be <= buffer->getLength() - @param completion describes action to take when buffer has been filled - @param bytesRead returns total bytes read for synchronous reads - */ - virtual IOReturn Read(IOMemoryDescriptor * buffer, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOByteCount reqCount, - IOUSBCompletion * completion = 0, - IOByteCount * bytesRead = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 5); - /*! - @function Write - Write to an interrupt or bulk endpoint - @param buffer place to get the transferred data - @param noDataTimeout number of milliseconds of no bus activity until transaction times out. Note that if a tranasction times out - the driver software may have to resynchronize the data toggle. See ClearPipeStall. - @param completionTimeout number of milliseconds from the time the transaction is placed on the bus until it times out - @param reqCount requested number of bytes to transfer. must be <= buffer->getLength() - @param completion describes action to take when buffer has been emptied - */ - virtual IOReturn Write(IOMemoryDescriptor * buffer, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOByteCount reqCount, - IOUSBCompletion * completion = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 6); - /*! - @function GetPipeStatus - Returns the status of the pipe (kIOUSBPipeStalled of the pipe is stalled, else kIOReturnSuccess) - */ - virtual IOReturn GetPipeStatus(void); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 7); - /*! - @function ClearPipeStall - AVAILABLE ONLY IN VERSION 1.9 AND ABOVE - This method causes all outstanding I/O on a pipe to complete with return code kIOUSBTransactionReturned. It also clears both the halted bit and the - toggle bit on the endpoint in the controller. The driver may need to reset the data toggle within the device to avoid losing any data. If the - device correctly handles the ClearFeature(ENDPOINT_HALT) device request, then this API will handle that by sending the correct request to the - device. - @param withDeviceRequest if true, a ClearFeature(ENDPOINT_HALT) is sent to the appropriate endpoint on the device after the transactions on the - controllers endpoint are returned and the toggle bit on the controllers endpoint is cleared. if this parameter is false, then this is equivalent - to the pre-1.9 API. This means that the endpoint on the controller is cleared, but no DeviceRequest is sent to the device's endpoint. - */ - virtual IOReturn ClearPipeStall(bool withDeviceRequest); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 8); - /*! - @function SetPipePolicy - AVAILABLE ONLY IN VERSION 1.9 AND ABOVE - This method allows a driver to change the maxPacketSize of an Isochronous pipe, or the polling interval for an interrupt pipe. There is a limited - amount of bandwidth on any single bus, and isochronous pipes tend to use much of this bandwidth. The driver may know, however, that there - will never be as much bandwidth used as is specified in the pipe's endpoint descriptor. Therefore, the driver may return some of this - bandwidth to the system by using this method. Additionally, if on an open of an IOUSBInterface any of the Isochronous pipes is unable to be - opened because of a lack of bandwidth, the pipe will be created with a bandwidth of zero, and the driver may get some of the limited bandwidth - remaining by using this call. - This method returns kIOReturnBadArgument if the pipe is a bulk on control pipe, or if the maxPacketSize parameter is larger than the amount specified - in the endpoint descriptor. It returns kIOReturnNoBandwidth if the bandwidth requested cannot be allocated. Otherwise it returns kIOReturnSuccess. - @param maxPacketSize specifies the maximum number of bytes to be used in any one millisecond frame by this pipe. The value must be less than or - equal to the maxPacketSize specified in the endpoint descriptor. - @param maxInterval not currently used. reserved for future expansion - - */ - virtual IOReturn SetPipePolicy(UInt16 maxPacketSize, UInt8 maxInterval); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 9); - - // Transfer data over Isochronous pipes and process the frame list at hardware interrupt time - /*! - @function Read - AVAILABLE ONLY IN VERSION 1.9.2 AND ABOVE - Read from an isochronous endpoint and process the IOUSBLowLatencyIsocFrame fields at - hardware interrupt time - @param buffer place to put the transferred data - @param frameStart USB frame number of the frame to start transfer - @param numFrames Number of frames to transfer - @param frameList Bytes to transfer, result, and time stamp for each frame - @param completion describes action to take when buffer has been filled - @param updateFrequency describes how often (in milliseconds) should the frame list be processed - */ - virtual IOReturn Read(IOMemoryDescriptor * buffer, - UInt64 frameStart, UInt32 numFrames, IOUSBLowLatencyIsocFrame *frameList, - IOUSBLowLatencyIsocCompletion * completion = 0, UInt32 updateFrequency = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 10); - /*! - @function Write - AVAILABLE ONLY IN VERSION 1.9.2 AND ABOVE - Write to an isochronous endpoint - @param buffer place to get the data to transfer - @param frameStart USB frame number of the frame to start transfer - @param numFrames Number of frames to transfer - @param frameList Pointer to list of frames indicating bytes to transfer and result for each frame - @param completion describes action to take when buffer has been emptied - @param updateFrequency describes how often (in milliseconds) should the frame list be processed - */ - virtual IOReturn Write(IOMemoryDescriptor * buffer, - UInt64 frameStart, UInt32 numFrames, IOUSBLowLatencyIsocFrame *frameList, - IOUSBLowLatencyIsocCompletion * completion = 0, UInt32 updateFrequency = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 11); - /*! - @function Read - Read from an interrupt or bulk endpoint - @param buffer place to put the transferred data - @param noDataTimeout number of milliseconds of no bus activity until transaction times out. Note that if a tranasction times out - the driver software may have to resynchronize the data toggle. See ClearPipeStall. - @param completionTimeout number of milliseconds from the time the transaction is placed on the bus until it times out - @param reqCount requested number of bytes to transfer. must be <= buffer->getLength() - @param completion describes action to take when buffer has been filled - @param bytesRead returns total bytes read for synchronous reads - */ - virtual IOReturn Read(IOMemoryDescriptor * buffer, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOByteCount reqCount, - IOUSBCompletionWithTimeStamp * completion = 0, - IOByteCount * bytesRead = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 12); - virtual bool InitToEndpoint(const IOUSBEndpointDescriptor *endpoint, UInt8 speed, - USBDeviceAddress address, IOUSBController * controller, IOUSBDevice * device, IOUSBInterface * interface); - - OSMetaClassDeclareReservedUnused(IOUSBPipe, 13); - OSMetaClassDeclareReservedUnused(IOUSBPipe, 14); - OSMetaClassDeclareReservedUnused(IOUSBPipe, 15); - OSMetaClassDeclareReservedUnused(IOUSBPipe, 16); - OSMetaClassDeclareReservedUnused(IOUSBPipe, 17); - OSMetaClassDeclareReservedUnused(IOUSBPipe, 18); - OSMetaClassDeclareReservedUnused(IOUSBPipe, 19); - -}; - -#endif /* _IOKIT_IOUSBPIPE_H */ diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBRootHubDevice.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBRootHubDevice.h.svn-base deleted file mode 100644 index 19a17c4..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBRootHubDevice.h.svn-base +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBROOTHUBDEVICE_H -#define _IOKIT_IOUSBROOTHUBDEVICE_H - -#include <IOKit/usb/IOUSBHubDevice.h> - -/*! - @class IOUSBRootHubDevice - @abstract The object representing the Root Hub simulation. - */ -class IOUSBRootHubDevice : public IOUSBHubDevice -{ - OSDeclareDefaultStructors(IOUSBRootHubDevice) - -private: - UInt16 configuration; - IOCommandGate *_commandGate; - - // private method which overrides the same method in IOUSBHubDevice - virtual bool InitializeCharacteristics(void); // used at start - - struct ExpansionData - { - IOService * _IOResourcesEntry; - }; - ExpansionData *_expansionData; - -public: - // static methods - static IOUSBRootHubDevice *NewRootHubDevice(void); - static IOReturn GatedDeviceRequest (OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - - // IOKit methods - virtual bool init(); - virtual bool start( IOService * provider ); - virtual void stop( IOService *provider ); - virtual void free(); - - // IOUSBHubDevice methods - virtual bool IsRootHub(void); - virtual UInt32 RequestExtraPower(UInt32 requestedPower); - virtual void ReturnExtraPower(UInt32 returnedPower); - - // - virtual UInt32 RequestSleepPower(UInt32 requestedPower); - virtual void ReturnSleepPower(UInt32 returnedPower); - - // a non static but non-virtual function - IOReturn DeviceRequestWorker(IOUSBDevRequest *request, UInt32 noDataTimeout, UInt32 completionTimeout, IOUSBCompletion *completion); - - // IOUSBDevice methods overriden here - virtual IOReturn DeviceRequest(IOUSBDevRequest *request, IOUSBCompletion *completion = 0); - virtual IOReturn DeviceRequest(IOUSBDevRequest *request, UInt32 noDataTimeout, UInt32 completionTimeout, IOUSBCompletion *completion = 0); - - OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 0); - virtual IOReturn GetDeviceInformation(UInt32 *info); - - OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 1); - virtual void InitializeExtraPower(UInt32 maxPortCurrent, UInt32 totalExtraCurrent); - - OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 2); - virtual void SetSleepCurrent(UInt32 sleepCurrent); - - OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 3); - virtual UInt32 GetSleepCurrent(); - - OSMetaClassDeclareReservedUnused(IOUSBRootHubDevice, 4); -}; - -#endif /* _IOKIT_IOUSBROOTHUBDEVICE_H */ - diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBUserClient.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBUserClient.h.svn-base deleted file mode 100644 index 1cd47a8..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBUserClient.h.svn-base +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBUSERCLIENT_H -#define _IOKIT_IOUSBUSERCLIENT_H - -// these are the new User Client method names -enum { - kUSBDeviceUserClientOpen, - kUSBDeviceUserClientClose, - kUSBDeviceUserClientSetConfig, - kUSBDeviceUserClientGetConfig, - kUSBDeviceUserClientGetConfigDescriptor, - kUSBDeviceUserClientGetFrameNumber, - kUSBDeviceUserClientDeviceRequestOut, - kUSBDeviceUserClientDeviceRequestIn, - kUSBDeviceUserClientCreateInterfaceIterator, - kUSBDeviceUserClientResetDevice, - kUSBDeviceUserClientSuspend, - kUSBDeviceUserClientAbortPipeZero, - kUSBDeviceUserClientReEnumerateDevice, - kUSBDeviceUserClientGetMicroFrameNumber, - kUSBDeviceUserClientGetFrameNumberWithTime, - kUSBDeviceUserClientSetAsyncPort, - kUSBDeviceUserClientGetDeviceInformation, - kUSBDeviceUserClientRequestExtraPower, - kUSBDeviceUserClientReturnExtraPower, - kUSBDeviceUserClientGetExtraPowerAllocated, - kIOUSBLibDeviceUserClientNumCommands - }; - -enum { - kUSBInterfaceUserClientOpen, - kUSBInterfaceUserClientClose, - kUSBInterfaceUserClientGetDevice, - kUSBInterfaceUserClientSetAlternateInterface, - kUSBInterfaceUserClientGetFrameNumber, - kUSBInterfaceUserClientGetPipeProperties, - kUSBInterfaceUserClientReadPipe, - kUSBInterfaceUserClientWritePipe, - kUSBInterfaceUserClientGetPipeStatus, - kUSBInterfaceUserClientAbortPipe, - kUSBInterfaceUserClientResetPipe, - kUSBInterfaceUserClientClearPipeStall, - kUSBInterfaceUserClientControlRequestOut, - kUSBInterfaceUserClientControlRequestIn, - kUSBInterfaceUserClientSetPipePolicy, - kUSBInterfaceUserClientGetBandwidthAvailable, - kUSBInterfaceUserClientGetEndpointProperties, - kUSBInterfaceUserClientLowLatencyPrepareBuffer, - kUSBInterfaceUserClientLowLatencyReleaseBuffer, - kUSBInterfaceUserClientGetMicroFrameNumber, - kUSBInterfaceUserClientGetFrameListTime, - kUSBInterfaceUserClientGetFrameNumberWithTime, - kUSBInterfaceUserClientSetAsyncPort, - kUSBInterfaceUserClientReadIsochPipe, - kUSBInterfaceUserClientWriteIsochPipe, - kUSBInterfaceUserClientLowLatencyReadIsochPipe, - kUSBInterfaceUserClientLowLatencyWriteIsochPipe, - kUSBInterfaceUserClientGetConfigDescriptor, - kIOUSBLibInterfaceUserClientNumCommands - }; - - -#if KERNEL -#include <IOKit/IOService.h> -#include <IOKit/IOUserClient.h> -#include <IOKit/usb/USB.h> - -//================================================================================================ -// -// Structure declarations -// -//================================================================================================ -// -typedef struct IOUSBUserClientAsyncParamBlock IOUSBUserClientAsyncParamBlock; - -struct IOUSBUserClientAsyncParamBlock -{ - OSAsyncReference64 fAsyncRef; - uint32_t fAsyncCount; - uint32_t fMax; - IOMemoryDescriptor * fMem; - IOUSBDevRequestDesc req; -}; - -typedef struct IOUSBInterfaceUserClientISOAsyncParamBlock IOUSBInterfaceUserClientISOAsyncParamBlock; -struct IOUSBInterfaceUserClientISOAsyncParamBlock -{ - OSAsyncReference64 fAsyncRef; - uint32_t fAsyncCount; - mach_vm_size_t frameLen; // In bytes - mach_vm_address_t frameBase; // In user task - IOMemoryDescriptor * dataMem; - IOMemoryDescriptor * countMem; - uint64_t numFrames; - IOUSBIsocFrame frames[0]; // Must be the last one -}; - - -//================================================================================================ -// -// This class is used to add an IOProviderMergeProperties dictionary entry to a provider's -// property list, thus providing a tie between hardware and a CFBundle at hardware -// load time. This property usually contains the user client class name and the CFPlugInTypes UUID's -// but it can contain other properties. -// -//================================================================================================ -// -class IOUSBUserClientInit : public IOService -{ - OSDeclareDefaultStructors(IOUSBUserClientInit); - -public: - - virtual bool start(IOService * provider) ; - virtual bool MergeDictionaryIntoProvider(IOService * provider, OSDictionary * mergeDict); - virtual bool MergeDictionaryIntoDictionary(OSDictionary * sourceDictionary, OSDictionary * targetDictionary); -}; - -#endif // KERNEL - -#endif /* ! _IOKIT_IOUSBUSERCLIENT_H */ - diff --git a/i386/include/IOKit/usb/.svn/text-base/IOUSBWorkLoop.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/IOUSBWorkLoop.h.svn-base deleted file mode 100644 index 7630704..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/IOUSBWorkLoop.h.svn-base +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2001-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBWORKLOOP_H -#define _IOKIT_IOUSBWORKLOOP_H - -#include <IOKit/IOWorkLoop.h> - -/*! - @class IOUSBWorkLoop - @abstract Subclass of IOWorkloop that allows the USB stack to more finely control sleep and wake. - */ -class IOUSBWorkLoop : public IOWorkLoop -{ - OSDeclareDefaultStructors(IOUSBWorkLoop) - -protected: - void * fSleepToken; -#ifndef __OPEN_SOURCE__ - lck_grp_t * fLockGroup; -#endif - bool init ( const char * controllerLocation ); - void free ( void ); - - // Overrides to check for sleeping - virtual void closeGate(); - virtual bool tryCloseGate(); - -public: - // Create a workloop - static IOUSBWorkLoop * workLoop(const char * controllerLocation); - - // Put workloop to sleep (Must have gate closed, opens gate if successful) - virtual IOReturn sleep(void *token); - - // Wake workloop up (closes gate if successful) - virtual IOReturn wake(void *token); - - void CloseGate(void); - void OpenGate(void); -}; - -#endif /* ! _IOKIT_IOUSBWORKLOOP_H */ - diff --git a/i386/include/IOKit/usb/.svn/text-base/USB.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/USB.h.svn-base deleted file mode 100644 index 8ba12bb..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/USB.h.svn-base +++ /dev/null @@ -1,1076 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _USB_H -#define _USB_H - -#if KERNEL - #include <libkern/OSByteOrder.h> - #include <IOKit/IOMemoryDescriptor.h> -#else - #include <libkern/OSByteOrder.h> -#endif - -#include <IOKit/IOTypes.h> - -#if !defined(__USB__) -# include <IOKit/usb/USBSpec.h> -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - /*! - @header USB.h - @abstract Public Interfaces to the USB implementation in Mac OS X. - @discussion This header file contains definitions and structures that are used in the different USB API's in Mac OS X, both in the kernel and in the user space. - */ - - /*! - @defined Endian conversion definitions - @discussion The USB API's use a convention of specifying parameters in the host order. The USB spec specifies that multi-byte items should be - formatted in little endian order. The following macros allow one to translate multi-byte values from Host order to USB order and vice versa. There are separate macros for - in-kernel use and for user space use. - */ -#define USBToHostWord OSSwapLittleToHostInt16 -#define HostToUSBWord OSSwapHostToLittleInt16 -#define USBToHostLong OSSwapLittleToHostInt32 -#define HostToUSBLong OSSwapHostToLittleInt32 - - /*! - @enum Miscellaneous Constants - @discussion - */ - enum { - kUSBDeviceIDShift = 7, - kUSBMaxDevices = 128, - kUSBMaxDevice = kUSBMaxDevices-1, - kUSBDeviceIDMask = 0x7f, - - kUSBPipeIDMask = 0xf, - kUSBMaxPipes = 32, // In and Out pipes can have same pipe number. - - kUSBInterfaceIDShift = 8, - kUSBMaxInterfaces = 1 << kUSBInterfaceIDShift, - kUSBInterfaceIDMask = kUSBMaxInterfaces-1, - - kUSBEndPtShift = 7, - kUSBDeviceMask = ((1 << kUSBEndPtShift) -1), - - kUSBNoPipeIdx = -1 -}; - -/*! -@enum bRequest Shifts and Masks -@discussion These are used to create the macro to encode the bRequest filed of a Device Request -*/ -enum { - kUSBRqDirnShift = 7, - kUSBRqDirnMask = 1, - - kUSBRqTypeShift = 5, - kUSBRqTypeMask = 3, - - kUSBRqRecipientMask = 0X1F -}; - -/*! -@defined USBmakebmRequestType -@discussion Macro to encode the bRequest field of a Device Request. It is used when constructing an IOUSBDevRequest. -*/ -#define USBmakebmRequestType(direction, type, recipient) \ - ((direction & kUSBRqDirnMask) << kUSBRqDirnShift) | \ - ((type & kUSBRqTypeMask) << kUSBRqTypeShift) | \ - (recipient & kUSBRqRecipientMask) - -/*! -@enum kUSBMaxIsocFrameReqCount -@discussion Maximum size in bytes allowed for one Isochronous frame -*/ -enum { - kUSBMaxFSIsocEndpointReqCount = 1023, // max size (bytes) of any one Isoc frame for 1 FS endpoint - kUSBMaxHSIsocEndpointReqCount = 3072, // max size (bytes) of any one Isoc frame for 1 HS endpoint - kUSBMaxHSIsocFrameCount = 7168 // max size (bytes) of all Isoc transfers in a HS frame -}; - -/*! -@defined EncodeRequest -@discussion Macro that encodes the bRequest and bRequestType fields of a IOUSBDevRequest into a single value. It is useful when one needs -to know what type of request the IOUSBDevRequest encodes and simplifies comparisons. -*/ -#define EncodeRequest(request, direction, type, recipient) \ - (((UInt16)request << 8) + \ - ((UInt16)recipient + \ - ((UInt16)type << kUSBRqTypeShift) + \ - ((UInt16)direction << kUSBRqDirnShift))) - - -/*! -@enum Standard Device Requests -@discussion Encoding of the standard device requests. -<tt> -<pre><b> -bmRequestType bRequest wValue wIndex wLength Data</b> -00000000B CLEAR_FEATURE Feature Zero Zero None (device) -00000001B Feature Interface Zero None (Interface) -00000010B Feature Endpoint Zero None (Endpoint) - -10000000B GET_CONFIGURATION Zero Zero One Configuration -10000000B GET_DESCRIPTOR Type LangID Length Descriptor -10000001B GET_INTERFACE Zero Interface One Alternate - -10000000B GET_STATUS Zero Zero Two status (device) -10000001B Zero Interface Two status (Interface) -10000010B Zero Endpoint Two status (Endpoint) - -00000000B SET_ADDRESS Address Zero Zero None -00000000B SET_CONFIGURATION Configuration Zero Zero None -00000000B SET_DESCRIPTOR Type LangID Length Descriptor - -00000000B SET_FEATURE Feature Zero Zero None (device) -00000001B Feature Interface Zero None (Interface) -00000010B Feature Endpoint Zero None (Endpoint) - -00000001B SET_INTERFACE Alternate Interface Zero None -10000010B SYNCH_FRAME Zero Endpoint Two Frame Number -</pre> -</tt> -*/ -enum { - kClearDeviceFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBStandard, kUSBDevice), - kClearInterfaceFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBStandard, kUSBInterface), - kClearEndpointFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBStandard, kUSBEndpoint), - kGetConfiguration = EncodeRequest(kUSBRqGetConfig, kUSBIn, kUSBStandard, kUSBDevice), - kGetDescriptor = EncodeRequest(kUSBRqGetDescriptor, kUSBIn, kUSBStandard, kUSBDevice), - kGetInterface = EncodeRequest(kUSBRqGetInterface, kUSBIn, kUSBStandard, kUSBInterface), - kGetDeviceStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBStandard, kUSBDevice), - kGetInterfaceStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBStandard, kUSBInterface), - kGetEndpointStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBStandard, kUSBEndpoint), - kSetAddress = EncodeRequest(kUSBRqSetAddress, kUSBOut, kUSBStandard, kUSBDevice), - kSetConfiguration = EncodeRequest(kUSBRqSetConfig, kUSBOut, kUSBStandard, kUSBDevice), - kSetDescriptor = EncodeRequest(kUSBRqSetDescriptor, kUSBOut, kUSBStandard, kUSBDevice), - kSetDeviceFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBStandard, kUSBDevice), - kSetInterfaceFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBStandard, kUSBInterface), - kSetEndpointFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBStandard, kUSBEndpoint), - kSetInterface = EncodeRequest(kUSBRqSetInterface, kUSBOut, kUSBStandard, kUSBInterface), - kSyncFrame = EncodeRequest(kUSBRqSyncFrame, kUSBIn, kUSBStandard, kUSBEndpoint), -}; - -/*! -@defined kCallInterfaceOpenWithGate - @discussion If the USB Device has this property, drivers for any of its interfaces will have their handleOpen method called while holding the workloop gate. - */ -#define kCallInterfaceOpenWithGate "kCallInterfaceOpenWithGate" - -// TYPES - -typedef UInt16 USBDeviceAddress; - -typedef uint32_t USBPhysicalAddress32; - -/*! - @typedef IOUSBIsocFrame - @discussion Structure used to encode information about each isoc frame. - @param frStatus Returns status associated with the frame. - @param frReqCount Input specifiying how many bytes to read or write. - @param frActCount Actual # of bytes transferred. -*/ -typedef struct IOUSBIsocFrame { - IOReturn frStatus; - UInt16 frReqCount; - UInt16 frActCount; -} IOUSBIsocFrame; - - -/*! - @typedef IOUSBLowLatencyIsocFrame - @discussion Structure used to encode information about each isoc frame that is processed - at hardware interrupt time (low latency). - @param frStatus Returns status associated with the frame. - @param frReqCount Input specifiying how many bytes to read or write. - @param frActCount Actual # of bytes transferred. - @param frTimeStamp Time stamp that indicates time when frame was procesed. -*/ -struct IOUSBLowLatencyIsocFrame { - IOReturn frStatus; - UInt16 frReqCount; - UInt16 frActCount; - AbsoluteTime frTimeStamp; -}; -typedef struct IOUSBLowLatencyIsocFrame IOUSBLowLatencyIsocFrame; - -/*! -@typedef IOUSBCompletionAction - @discussion Function called when USB I/O completes. - @param target The target specified in the IOUSBCompletion struct. - @param parameter The parameter specified in the IOUSBCompletion struct. - @param status Completion status. - @param bufferSizeRemaining Bytes left to be transferred. - */ -typedef void (*IOUSBCompletionAction)( - void * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining); - -/*! -@typedef IOUSBCompletionActionWithTimeStamp - @discussion Function called when USB I/O completes. - @param target The target specified in the IOUSBCompletion struct. - @param parameter The parameter specified in the IOUSBCompletion struct. - @param status Completion status. - @param bufferSizeRemaining Bytes left to be transferred. - @param timeStamp Time at which the transaction was processed. - */ -typedef void (*IOUSBCompletionActionWithTimeStamp)( - void * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining, - AbsoluteTime timeStamp); - -/*! - @typedef IOUSBIsocCompletionAction - @discussion Function called when Isochronous USB I/O completes. - @param target The target specified in the IOUSBIsocCompletionn struct. - @param parameter The parameter specified in the IOUSBIsocCompletion struct. - @param status Completion status. - @param pFrames Pointer to the frame list containing the status for each frame transferred. -*/ -typedef void (*IOUSBIsocCompletionAction)( - void * target, - void * parameter, - IOReturn status, - IOUSBIsocFrame *pFrames); - -/*! - @typedef IOUSBLowLatencyIsocCompletionAction - @discussion Function called when Low Latency Isochronous USB I/O completes. - @param target The target specified in the IOUSBLowLatencyIsocCompletion struct. - @param parameter The parameter specified in the IOUSBLowLatencyIsocCompletion struct. - @param status Completion status. - @param pFrames Pointer to the low latency frame list containing the status for each frame transferred. -*/ -typedef void (*IOUSBLowLatencyIsocCompletionAction)( - void * target, - void * parameter, - IOReturn status, - IOUSBLowLatencyIsocFrame *pFrames); - -/*! -@typedef IOUSBCompletion - @discussion Struct specifying action to perform when a USB I/O completes. - @param target The target to pass to the action function. - @param action The function to call. - @param parameter The parameter to pass to the action function. - */ -typedef struct IOUSBCompletion { - void * target; - IOUSBCompletionAction action; - void * parameter; -} IOUSBCompletion; - -/*! -@typedef IOUSBCompletionWithTimeStamp - @discussion Struct specifying action to perform when a USB I/O completes. - @param target The target to pass to the action function. - @param action The function to call. - @param parameter The parameter to pass to the action function. - */ -typedef struct IOUSBCompletionWithTimeStamp { - void * target; - IOUSBCompletionActionWithTimeStamp action; - void * parameter; -} IOUSBCompletionWithTimeStamp; - -/*! - @typedef IOUSBIsocCompletion - @discussion Struct specifying action to perform when an Isochronous USB I/O completes. - @param target The target to pass to the action function. - @param action The function to call. - @param parameter The parameter to pass to the action function. -*/ -typedef struct IOUSBIsocCompletion { - void * target; - IOUSBIsocCompletionAction action; - void * parameter; -} IOUSBIsocCompletion; - -/*! - @typedef IOUSBLowLatencyIsocCompletion - @discussion Struct specifying action to perform when an Low Latency Isochronous USB I/O completes. - @param target The target to pass to the action function. - @param action The function to call. - @param parameter The parameter to pass to the action function. -*/ -typedef struct IOUSBLowLatencyIsocCompletion { - void * target; - IOUSBLowLatencyIsocCompletionAction action; - void * parameter; -} IOUSBLowLatencyIsocCompletion; - - -/*! -@defined IOUSBFamily error codes -@discussion Errors specific to the IOUSBFamily. Note that the iokit_usb_err(x) translates to 0xe0004xxx, where xxx is the value in parenthesis as a hex number. -*/ -#define iokit_usb_err(return) (sys_iokit|sub_iokit_usb|return) -#define kIOUSBUnknownPipeErr iokit_usb_err(0x61) // 0xe0004061 Pipe ref not recognized -#define kIOUSBTooManyPipesErr iokit_usb_err(0x60) // 0xe0004060 Too many pipes -#define kIOUSBNoAsyncPortErr iokit_usb_err(0x5f) // 0xe000405f no async port -#define kIOUSBNotEnoughPipesErr iokit_usb_err(0x5e) // 0xe000405e not enough pipes in interface -#define kIOUSBNotEnoughPowerErr iokit_usb_err(0x5d) // 0xe000405d not enough power for selected configuration -#define kIOUSBEndpointNotFound iokit_usb_err(0x57) // 0xe0004057 Endpoint Not found -#define kIOUSBConfigNotFound iokit_usb_err(0x56) // 0xe0004056 Configuration Not found -#define kIOUSBTransactionTimeout iokit_usb_err(0x51) // 0xe0004051 Transaction timed out -#define kIOUSBTransactionReturned iokit_usb_err(0x50) // 0xe0004050 The transaction has been returned to the caller -#define kIOUSBPipeStalled iokit_usb_err(0x4f) // 0xe000404f Pipe has stalled, error needs to be cleared -#define kIOUSBInterfaceNotFound iokit_usb_err(0x4e) // 0xe000404e Interface ref not recognized -#define kIOUSBLowLatencyBufferNotPreviouslyAllocated iokit_usb_err(0x4d) // 0xe000404d Attempted to use user land low latency isoc calls w/out calling PrepareBuffer (on the data buffer) first -#define kIOUSBLowLatencyFrameListNotPreviouslyAllocated iokit_usb_err(0x4c) // 0xe000404c Attempted to use user land low latency isoc calls w/out calling PrepareBuffer (on the frame list) first -#define kIOUSBHighSpeedSplitError iokit_usb_err(0x4b) // 0xe000404b Error to hub on high speed bus trying to do split transaction -#define kIOUSBSyncRequestOnWLThread iokit_usb_err(0x4a) // 0xe000404a A synchronous USB request was made on the workloop thread (from a callback?). Only async requests are permitted in that case -#define kIOUSBDeviceNotHighSpeed iokit_usb_err(0x49) // 0xe0004049 The device is not a high speed device, so the EHCI driver returns an error -#define kIOUSBDevicePortWasNotSuspended iokit_usb_err(0x50) // 0xe0004050 Port was not suspended - -/*! -@defined IOUSBFamily hardware error codes -@discussion These errors are returned by the OHCI controller. The # in parenthesis (xx) corresponds to the OHCI Completion Code. -For the following Completion codes, we return a generic IOKit error instead of a USB specific error. -<tt> -<pre> -Completion Code Error Returned Description -9 kIOReturnUnderrun (Data Underrun) EP returned less data than max packet size -8 kIOReturnOverrun (Data Overrun) Packet too large or more data than buffer -5 kIOReturnNotResponding Device Not responding -4 kIOUSBPipeStalled Endpoint returned a STALL PID -</pre> -</tt> -*/ -#define kIOUSBLinkErr iokit_usb_err(0x10) // 0xe0004010 -#define kIOUSBNotSent2Err iokit_usb_err(0x0f) // 0xe000400f Transaction not sent -#define kIOUSBNotSent1Err iokit_usb_err(0x0e) // 0xe000400e Transaction not sent -#define kIOUSBBufferUnderrunErr iokit_usb_err(0x0d) // 0xe000400d Buffer Underrun (Host hardware failure on data out, PCI busy?) -#define kIOUSBBufferOverrunErr iokit_usb_err(0x0c) // 0xe000400c Buffer Overrun (Host hardware failure on data out, PCI busy?) -#define kIOUSBReserved2Err iokit_usb_err(0x0b) // 0xe000400b Reserved -#define kIOUSBReserved1Err iokit_usb_err(0x0a) // 0xe000400a Reserved -#define kIOUSBWrongPIDErr iokit_usb_err(0x07) // 0xe0004007 Pipe stall, Bad or wrong PID -#define kIOUSBPIDCheckErr iokit_usb_err(0x06) // 0xe0004006 Pipe stall, PID CRC error -#define kIOUSBDataToggleErr iokit_usb_err(0x03) // 0xe0004003 Pipe stall, Bad data toggle -#define kIOUSBBitstufErr iokit_usb_err(0x02) // 0xe0004002 Pipe stall, bitstuffing -#define kIOUSBCRCErr iokit_usb_err(0x01) // 0xe0004001 Pipe stall, bad CRC - -/*! -@defined IOUSBFamily message codes -@discussion Messages specific to the IOUSBFamily. Note that the iokit_usb_msg(x) translates to 0xe0004xxx, where xxx is the value in parenthesis as a hex number. -*/ -#define iokit_usb_msg(message) (UInt32)(sys_iokit|sub_iokit_usb|message) -#define kIOUSBMessageHubResetPort iokit_usb_msg(0x01) // 0xe0004001 Message sent to a hub to reset a particular port -#define kIOUSBMessageHubSuspendPort iokit_usb_msg(0x02) // 0xe0004002 Message sent to a hub to suspend a particular port -#define kIOUSBMessageHubResumePort iokit_usb_msg(0x03) // 0xe0004003 Message sent to a hub to resume a particular port -#define kIOUSBMessageHubIsDeviceConnected iokit_usb_msg(0x04) // 0xe0004004 Message sent to a hub to inquire whether a particular port has a device connected or not -#define kIOUSBMessageHubIsPortEnabled iokit_usb_msg(0x05) // 0xe0004005 Message sent to a hub to inquire whether a particular port is enabled or not -#define kIOUSBMessageHubReEnumeratePort iokit_usb_msg(0x06) // 0xe0004006 Message sent to a hub to reenumerate the device attached to a particular port -#define kIOUSBMessagePortHasBeenReset iokit_usb_msg(0x0a) // 0xe000400a Message sent to a device indicating that the port it is attached to has been reset -#define kIOUSBMessagePortHasBeenResumed iokit_usb_msg(0x0b) // 0xe000400b Message sent to a device indicating that the port it is attached to has been resumed -#define kIOUSBMessageHubPortClearTT iokit_usb_msg(0x0c) // 0xe000400c Message sent to a hub to clear the transaction translator -#define kIOUSBMessagePortHasBeenSuspended iokit_usb_msg(0x0d) // 0xe000400d Message sent to a device indicating that the port it is attached to has been suspended -#define kIOUSBMessageFromThirdParty iokit_usb_msg(0x0e) // 0xe000400e Message sent from a third party. Uses IOUSBThirdPartyParam to encode the sender's ID -#define kIOUSBMessagePortWasNotSuspended iokit_usb_msg(0x0f) // 0xe000400f Message indicating that the hub driver received a resume request for a port that was not suspended -#define kIOUSBMessageExpressCardCantWake iokit_usb_msg(0x10) // 0xe0004010 Message from a driver to a bus that an express card will disconnect on sleep and thus shouldn't wake -#define kIOUSBMessageCompositeDriverReconfigured iokit_usb_msg(0x11) // 0xe0004011 Message from the composite driver indicating that it has finished re-configuring the device after a reset -#define kIOUSBMessageHubSetPortRecoveryTime iokit_usb_msg(0x12) // 0xe0004012 Message sent to a hub to set the # of ms required when resuming a particular port -#define kIOUSBMessageOvercurrentCondition iokit_usb_msg(0x13) // 0xe0004013 Message sent to the clients of the device's hub parent, when a device causes an overcurrent condition. The message argument contains the locationID of the device -#define kIOUSBMessageNotEnoughPower iokit_usb_msg(0x14) // 0xe0004014 Message sent to the clients of the device's hub parent, when a device causes an low power notice to be displayed. The message argument contains the locationID of the device -#define kIOUSBMessageController iokit_usb_msg(0x15) // 0xe0004015 Generic message sent from controller user client to controllers -#define kIOUSBMessageRootHubWakeEvent iokit_usb_msg(0x16) // 0xe0004016 Message from the HC Wakeup code indicating that a Root Hub port has a wake event - -// Obsolete -// -struct IOUSBMouseData { - UInt16 buttons; - SInt16 XDelta; - SInt16 YDelta; -}; -typedef struct IOUSBMouseData IOUSBMouseData; -typedef IOUSBMouseData * IOUSBMouseDataPtr; - -// Obsolete -// -struct IOUSBKeyboardData { - UInt16 keycount; - UInt16 usbkeycode[32]; -}; -typedef struct IOUSBKeyboardData IOUSBKeyboardData; -typedef IOUSBKeyboardData * IOUSBKeyboardDataPtr; - -// Obsolete -// -union IOUSBHIDData { - IOUSBKeyboardData kbd; - IOUSBMouseData mouse; -}; -typedef union IOUSBHIDData IOUSBHIDData; -typedef IOUSBHIDData * IOUSBHIDDataPtr; - -/*! - @typedef IOUSBDeviceDescriptor - @discussion Descriptor for a USB Device. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. -*/ -struct IOUSBDeviceDescriptor { - UInt8 bLength; - UInt8 bDescriptorType; - UInt16 bcdUSB; - UInt8 bDeviceClass; - UInt8 bDeviceSubClass; - UInt8 bDeviceProtocol; - UInt8 bMaxPacketSize0; - UInt16 idVendor; - UInt16 idProduct; - UInt16 bcdDevice; - UInt8 iManufacturer; - UInt8 iProduct; - UInt8 iSerialNumber; - UInt8 bNumConfigurations; -}; -typedef struct IOUSBDeviceDescriptor IOUSBDeviceDescriptor; -typedef IOUSBDeviceDescriptor * IOUSBDeviceDescriptorPtr; - -/*! - @typedef IOUSBDescriptorHeader - @discussion Standard header used for all USB descriptors. Used to read the length of a descriptor so that we can allocate storage for the whole descriptor later on. -*/ -struct IOUSBDescriptorHeader { - UInt8 bLength; - UInt8 bDescriptorType; -}; -typedef struct IOUSBDescriptorHeader IOUSBDescriptorHeader; -typedef IOUSBDescriptorHeader * IOUSBDescriptorHeaderPtr; - -/*! - @typedef IOUSBConfigurationDescriptor - @discussion Standard USB Configuration Descriptor. It is variable length, so this only specifies the known fields. We use the wTotalLength field to read the whole descriptor. - See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. -*/ -struct IOUSBConfigurationDescriptor { - UInt8 bLength; - UInt8 bDescriptorType; - UInt16 wTotalLength; - UInt8 bNumInterfaces; - UInt8 bConfigurationValue; - UInt8 iConfiguration; - UInt8 bmAttributes; - UInt8 MaxPower; -}; -typedef struct IOUSBConfigurationDescriptor IOUSBConfigurationDescriptor; -typedef IOUSBConfigurationDescriptor * IOUSBConfigurationDescriptorPtr; - -/*! - @typedef IOUSBConfigurationDescHeader - @discussion Header of a IOUSBConfigurationDescriptor. Used to get the total length of the descriptor. -*/ -struct IOUSBConfigurationDescHeader { - UInt8 bLength; - UInt8 bDescriptorType; - UInt16 wTotalLength; -}; -typedef struct IOUSBConfigurationDescHeader IOUSBConfigurationDescHeader; -typedef IOUSBConfigurationDescHeader * IOUSBConfigurationDescHeaderPtr; - -/*! - @typedef IOUSBInterfaceDescriptor - @discussion Descriptor for a USB Interface. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. -*/ -struct IOUSBInterfaceDescriptor { - UInt8 bLength; - UInt8 bDescriptorType; - UInt8 bInterfaceNumber; - UInt8 bAlternateSetting; - UInt8 bNumEndpoints; - UInt8 bInterfaceClass; - UInt8 bInterfaceSubClass; - UInt8 bInterfaceProtocol; - UInt8 iInterface; -}; -typedef struct IOUSBInterfaceDescriptor IOUSBInterfaceDescriptor; -typedef IOUSBInterfaceDescriptor * IOUSBInterfaceDescriptorPtr; - -/*! - @typedef IOUSBEndpointDescriptor - @discussion Descriptor for a USB Endpoint. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. -*/ -struct IOUSBEndpointDescriptor { - UInt8 bLength; - UInt8 bDescriptorType; - UInt8 bEndpointAddress; - UInt8 bmAttributes; - UInt16 wMaxPacketSize; - UInt8 bInterval; -}; -typedef struct IOUSBEndpointDescriptor IOUSBEndpointDescriptor; -typedef IOUSBEndpointDescriptor * IOUSBEndpointDescriptorPtr; - -enum{addPacketShift = 11}; // Bits for additional packets in maxPacketField. (Table 9-13) -#define mungeMaxPacketSize(w) ((w>1024)?(((w>>(addPacketShift))+1)*(w&((1<<addPacketShift)-1))):w) - -/*! - @typedef IOUSBHIDDescriptor - @discussion USB HID Descriptor. See the USB HID Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. (This structure - should have used the #pragma pack(1) compiler directive to get byte alignment. -*/ -struct IOUSBHIDDescriptor { - UInt8 descLen; - UInt8 descType; - UInt16 descVersNum; - UInt8 hidCountryCode; - UInt8 hidNumDescriptors; - UInt8 hidDescriptorType; - UInt8 hidDescriptorLengthLo; - UInt8 hidDescriptorLengthHi; -}; -typedef struct IOUSBHIDDescriptor IOUSBHIDDescriptor; -typedef IOUSBHIDDescriptor *IOUSBHIDDescriptorPtr; - -/*! - @typedef IOUSBHIDReportDesc - @discussion USB HID Report Descriptor header. See the USB HID Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. (This structure - should have used the #pragma pack(1) compiler directive to get byte alignment. -*/ -struct IOUSBHIDReportDesc { - UInt8 hidDescriptorType; - UInt8 hidDescriptorLengthLo; - UInt8 hidDescriptorLengthHi; -}; -typedef struct IOUSBHIDReportDesc IOUSBHIDReportDesc; -typedef IOUSBHIDReportDesc * IOUSBHIDReportDescPtr; - -/*! - @typedef IOUSBDeviceQualifierDescriptor - @discussion USB Device Qualifier Descriptor. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. -*/ -#pragma pack(1) -struct IOUSBDeviceQualifierDescriptor -{ - UInt8 bLength; - UInt8 bDescriptorType; - UInt16 bcdUSB; - UInt8 bDeviceClass; - UInt8 bDeviceSubClass; - UInt8 bDeviceProtocol; - UInt8 bMaxPacketSize0; - UInt8 bNumConfigurations; - UInt8 bReserved; -}; -typedef struct IOUSBDeviceQualifierDescriptor IOUSBDeviceQualifierDescriptor; -typedef IOUSBDeviceQualifierDescriptor * IOUSBDeviceQualifierDescriptorPtr; -#pragma options align=reset - -/*! - @typedef IOUSBDFUDescriptor - @discussion USB Device Firmware Update Descriptor. See the USB Device Firmware Update Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. -*/ -#pragma pack(1) -struct IOUSBDFUDescriptor -{ - UInt8 bLength; - UInt8 bDescriptorType; - UInt8 bmAttributes; - UInt16 wDetachTimeout; - UInt16 wTransferSize; -}; -typedef struct IOUSBDFUDescriptor IOUSBDFUDescriptor; -typedef IOUSBDFUDescriptor * IOUSBDFUDescriptorPtr; - -#pragma options align=reset - -/*! -@typedef IOUSBInterfaceAssociationDescriptor - @discussion USB Inerface Association Descriptor. ECN to the USB 2.0 Spec. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. - */ -#pragma pack(1) -struct IOUSBInterfaceAssociationDescriptor -{ - UInt8 bLength; - UInt8 bDescriptorType; - UInt8 bFirstInterface; - UInt8 bInterfaceCount; - UInt8 bFunctionClass; - UInt8 bFunctionSubClass; - UInt8 bFunctionProtocol; - UInt8 iFunction; -}; -typedef struct IOUSBInterfaceAssociationDescriptor IOUSBInterfaceAssociationDescriptor; -typedef IOUSBInterfaceAssociationDescriptor * IOUSBInterfaceAssociationDescriptorPtr; -#pragma options align=reset - -/*! - @typedef USBStatus - @discussion Type used to get a DeviceStatus as a single quantity. -*/ -typedef UInt16 USBStatus; -typedef USBStatus * USBStatusPtr; - -// These constants are obsolete -// -enum { - kIOUSBAnyClass = 0xFFFF, - kIOUSBAnySubClass = 0xFFFF, - kIOUSBAnyProtocol = 0xFFFF, - kIOUSBAnyVendor = 0xFFFF, - kIOUSBAnyProduct = 0xFFFF -}; - -// This structure are obsolete -// -typedef struct IOUSBMatch { - UInt16 usbClass; - UInt16 usbSubClass; - UInt16 usbProtocol; - UInt16 usbVendor; - UInt16 usbProduct; -} IOUSBMatch; - -/*! - @typedef IOUSBFindEndpointRequest - @discussion Struct used to find endpoints of an interface - type and direction are used to match endpoints, - type, direction, maxPacketSize and interval are updated - with the properties of the found endpoint. - @field type Type of endpoint: kUSBControl, kUSBIsoc, kUSBBulk, kUSBInterrupt, kUSBAnyType. If kUSBAnyType is specified, this field is treated as a don't care. - @field direction Direction of endpoint: kUSBOut, kUSBIn, kUSBAnyDirn. If kUSBAnyDirn is specified, this field is treated as a don't care. - @field maxPacketSize maximum packet size of endpoint. - @field interval Polling interval in mSec for endpoint. -*/ -typedef struct { - UInt8 type; - UInt8 direction; - UInt16 maxPacketSize; - UInt8 interval; -} IOUSBFindEndpointRequest; - -/*! - @struct IOUSBDevRequest - @discussion Parameter block for control requests, using a simple pointer - for the data to be transferred. - @field bmRequestType Request type: kUSBStandard, kUSBClass or kUSBVendor - @field bRequest Request code - @field wValue 16 bit parameter for request, host endianess - @field wIndex 16 bit parameter for request, host endianess - @field wLength Length of data part of request, 16 bits, host endianess - @field pData Pointer to data for request - data returned in bus endianess - @field wLenDone Set by standard completion routine to number of data bytes - actually transferred -*/ -typedef struct { - UInt8 bmRequestType; - UInt8 bRequest; - UInt16 wValue; - UInt16 wIndex; - UInt16 wLength; - void * pData; - UInt32 wLenDone; -} IOUSBDevRequest; -typedef IOUSBDevRequest * IOUSBDeviceRequestPtr; - -/*! - @struct IOUSBDevRequestTO - @discussion Parameter block for control requests with timeouts, using a simple pointer - for the data to be transferred. Same as a IOUSBDevRequest except for the two extra timeout fields. - @field bmRequestType Request type: kUSBStandard, kUSBClass or kUSBVendor - @field bRequest Request code - @field wValue 16 bit parameter for request, host endianess - @field wIndex 16 bit parameter for request, host endianess - @field wLength Length of data part of request, 16 bits, host endianess - @field pData Pointer to data for request - data returned in bus endianess - @field wLenDone Set by standard completion routine to number of data bytes - actually transferred - @field noDataTimeout Specifies a time value in milliseconds. Once the request is queued on the bus, if no data is transferred in this amount of time, the request will be aborted and returned. - @field completionTimeout Specifies a time value in milliseconds. Once the request is queued on the bus, if the entire request is not completed in this amount of time, the request will be aborted and returned -*/ -typedef struct { - UInt8 bmRequestType; - UInt8 bRequest; - UInt16 wValue; - UInt16 wIndex; - UInt16 wLength; - void * pData; - UInt32 wLenDone; - UInt32 noDataTimeout; - UInt32 completionTimeout; -} IOUSBDevRequestTO; - -/*! - @enum Default timeout values - @discussion default values used for data and completion timeouts. -*/ -enum -{ - kUSBDefaultControlNoDataTimeoutMS = 5000, - kUSBDefaultControlCompletionTimeoutMS = 0 -}; - -// Internal structure to pass parameters between IOUSBLib and UserClient -// -typedef struct -{ - UInt32 pipeRef; - void * buf; - UInt32 size; - UInt32 noDataTimeout; - UInt32 completionTimeout; -} IOUSBBulkPipeReq; - - -#if KERNEL -/*! - @struct IOUSBDevRequestDesc - @discussion Parameter block for control requests, using a memory descriptor - for the data to be transferred. Only available in the kernel. - @field bmRequestType Request type: kUSBStandard, kUSBClass or kUSBVendor - @field bRequest Request code - @field wValue 16 bit parameter for request, host endianess - @field wIndex 16 bit parameter for request, host endianess - @field wLength Length of data part of request, 16 bits, host endianess - @field pData Pointer to memory descriptor for data for request - data returned in bus endianess - @field wLenDone Set by standard completion routine to number of data bytes - actually transferred -*/ -typedef struct { - UInt8 bmRequestType; - UInt8 bRequest; - UInt16 wValue; - UInt16 wIndex; - UInt16 wLength; - IOMemoryDescriptor * pData; - UInt32 wLenDone; -} IOUSBDevRequestDesc; - - -/*! - @enum IOOptionBits - @discussion Parameter passed to an IOService::open() call. - @constant kIOUSBInterfaceOpenAlt Open the alternate interface specified when creating the interface. -*/ -enum { - kIOUSBInterfaceOpenAlt = 0x00010000 -}; - -#endif - -// Internal structure to pass parameters between IOUSBLib and UserClient -// -// use a structure because there's a limit of 6 total arguments -// to a user client method. -typedef struct { - UInt8 bmRequestType; - UInt8 bRequest; - UInt16 wValue; - UInt16 wIndex; - UInt16 wLength; - void * pData; // data pointer - UInt32 wLenDone; // # bytes transferred - UInt8 pipeRef; -} IOUSBDevReqOOL; - -// Internal structure to pass parameters between IOUSBLib and UserClient -// -typedef struct { - UInt8 bmRequestType; - UInt8 bRequest; - UInt16 wValue; - UInt16 wIndex; - UInt16 wLength; - void * pData; // data pointer - UInt32 wLenDone; // # bytes transferred - UInt8 pipeRef; - UInt32 noDataTimeout; - UInt32 completionTimeout; -} IOUSBDevReqOOLTO; - -// Internal structure to pass parameters between IOUSBLib and UserClient -// -// Structure to request isochronous transfer -// -typedef struct { - UInt32 fPipe; - void *fBuffer; - UInt32 fBufSize; - UInt64 fStartFrame; - UInt32 fNumFrames; - IOUSBIsocFrame *fFrameCounts; -} IOUSBIsocStruct; - -// Internal structure to pass parameters between IOUSBLib and UserClient -// -// Structure to request low latency isochronous transfer -// -struct IOUSBLowLatencyIsocStruct { - UInt32 fPipe; - UInt32 fBufSize; - UInt64 fStartFrame; - UInt32 fNumFrames; - UInt32 fUpdateFrequency; - UInt32 fDataBufferCookie; - UInt32 fDataBufferOffset; - UInt32 fFrameListBufferCookie; - UInt32 fFrameListBufferOffset; -}; - -typedef struct IOUSBLowLatencyIsocStruct IOUSBLowLatencyIsocStruct; - - -/*! - @struct IOUSBGetFrameStruct - @discussion Structure used from user space to return the frame number and a timestamp on when the frame register was read. - @field frame frame number - @field timeStamp AbsoluteTime when the frame was updated -*/ -typedef struct { - UInt64 frame; - AbsoluteTime timeStamp; -} IOUSBGetFrameStruct; - - -/*! - @struct IOUSBFindInterfaceRequest - @discussion Structure used with FindNextInterface. -*/ -typedef struct { - UInt16 bInterfaceClass; // requested class - UInt16 bInterfaceSubClass; // requested subclass - UInt16 bInterfaceProtocol; // requested protocol - UInt16 bAlternateSetting; // requested alt setting -} IOUSBFindInterfaceRequest; - -/*! - @enum kIOUSBFindInterfaceDontCare - @discussion Constant that can be used for the fields of IOUSBFindInterfaceRequest to specify that they should not be matched. -*/ -enum { - kIOUSBFindInterfaceDontCare = 0xFFFF - }; - -/*! - @enum kIOUSBVendorIDAppleComputer - @discussion USB Vendor ID for Apple Computer, Inc. -*/ -enum { - kIOUSBVendorIDAppleComputer = 0x05AC - }; - -/*! - @enum USBDeviceSpeed - @discussion Returns the speed of a particular USB device. - @constant kUSBDeviceSpeedLow The device a low speed device. - @constant kUSBDeviceSpeedFull The device a full speed device. - @constant kUSBDeviceSpeedHigh The device a high speed device. -*/ -enum { - kUSBDeviceSpeedLow = 0, - kUSBDeviceSpeedFull = 1, - kUSBDeviceSpeedHigh = 2 - }; - -/*! - @enum MicrosecondsInFrame - @discussion Returns the number of microseconds in a USB frame. - @constant kUSBFullSpeedMicrosecondsInFrame The device is attached to a bus running at full speed (1 ms / frame). - @constant kUSBHighSpeedMicrosecondsInFrame The device is attached to a bus running at high speed (125 microseconds / frame). -*/ -enum { - kUSBFullSpeedMicrosecondsInFrame = 1000, - kUSBHighSpeedMicrosecondsInFrame = 125 -}; - -// During low latency transfers, the stack will set the frStatus for each frame to this value. A client can check that to see if the transfer has completed. We set the frStatus to a -// valid return code when the transfer completes. -// -enum { - kUSBLowLatencyIsochTransferKey = 'llit' // Set frStatus field of first frame in isoch transfer to designate as low latency - }; - -// This structure is DEPRECATED. See the LowLatencyUserBufferInfoV2 -// -typedef struct LowLatencyUserBufferInfo LowLatencyUserBufferInfo; - -struct LowLatencyUserBufferInfo { - UInt32 cookie; - void * bufferAddress; - IOByteCount bufferSize; - UInt32 bufferType; - Boolean isPrepared; - LowLatencyUserBufferInfo * nextBuffer; -}; - -// This structure is DEPRECATED. See the LowLatencyUserBufferInfoV3 - -typedef struct LowLatencyUserBufferInfoV2 LowLatencyUserBufferInfoV2; - -struct LowLatencyUserBufferInfoV2 -{ - UInt32 cookie; - void * bufferAddress; - IOByteCount bufferSize; - UInt32 bufferType; - Boolean isPrepared; - void * mappedUHCIAddress; - LowLatencyUserBufferInfoV2 * nextBuffer; -}; - - -// This structure is used to pass information for the low latency calls between user space and the kernel. -// -typedef struct LowLatencyUserBufferInfoV3 LowLatencyUserBufferInfoV3; - -struct LowLatencyUserBufferInfoV3 -{ - uint64_t cookie; - mach_vm_address_t bufferAddress; - mach_vm_size_t bufferSize; - uint64_t bufferType; - uint64_t isPrepared; - mach_vm_address_t mappedUHCIAddress; - LowLatencyUserBufferInfoV3 * nextBuffer; -}; - - - /*! - @enum USBLowLatencyBufferType - @discussion Used to specify what kind of buffer to create when calling LowLatencyCreateBuffer(). - @constant kUSBLowLatencyWriteBuffer The buffer will be used to write data out to a device. - @constant kUSBLowLatencyReadBuffer The buffer will be used to read data from a device. - @constant kUSBLowLatencyFrameListBuffer The buffer will be used for a low latency isoch frame list. -*/ -typedef enum { - kUSBLowLatencyWriteBuffer = 0, - kUSBLowLatencyReadBuffer = 1, - kUSBLowLatencyFrameListBuffer = 2 -} USBLowLatencyBufferType; - -// USB User Notification Types -// -enum { - kUSBNoUserNotificationType = 0, - kUSBNotEnoughPowerNotificationType = 1, - kUSBIndividualOverCurrentNotificationType = 2, - kUSBGangOverCurrentNotificationType = 3 -}; - -/*! - @defined Property Definitions - @discussion Useful property names in USB land. -*/ -#define kUSBDevicePropertySpeed "Device Speed" -#define kUSBDevicePropertyBusPowerAvailable "Bus Power Available" -#define kUSBDevicePropertyAddress "USB Address" -#define kUSBDevicePropertyLocationID "locationID" -#define kUSBProductIDMask "idProductMask" -#define kUSBPreferredConfiguration "Preferred Configuration" -#define kUSBSuspendPort "kSuspendPort" -#define kUSBExpressCardCantWake "ExpressCardCantWake" -#define kUSBControllerNeedsContiguousMemoryForIsoch "Need contiguous memory for isoch" -#define kUSBHubDontAllowLowPower "kUSBHubDontAllowLowPower" -#define kUSBDeviceResumeRecoveryTime "kUSBDeviceResumeRecoveryTime" -#define kUSBOutOfSpecMPSOK "Out of spec MPS OK" -#define kConfigurationDescriptorOverride "ConfigurationDescriptorOverride" -#define kOverrideIfAtLocationID "OverrideIfAtLocationID" - -/*! -@enum USBReEnumerateOptions - @discussion Options used when calling ReEnumerateDevice. - @constant kUSBAddExtraResetTimeBit Setting this bit will cause the Hub driver to wait 100ms before addressing the device after the reset following the re-enumeration. - */ -typedef enum { - kUSBAddExtraResetTimeBit = 31, - kUSBAddExtraResetTimeMask = ( 1 << kUSBAddExtraResetTimeBit) -} USBReEnumerateOptions; - -/*! - @enum USBDeviceInformationBits - @discussion GetUSBDeviceInformation will return a unit32_t value with bits set indicating that a particular state is present in the USB device. These bits are described here - - @constant kUSBInformationDeviceIsCaptiveBit The USB device is directly attached to its hub and cannot be removed. - @constant kUSBInformationDeviceIsAttachedToRootHubBit The USB device is directly attached to the root hub - @constant kUSBInformationDeviceIsInternalBit The USB device is internal to the computer (all the hubs it attaches to are captive) - @constant kUSBInformationDeviceIsConnectedBit The USB device is connected to its hub - @constant kUSBInformationDeviceIsEnabledBit The hub port to which the USB device is attached is enabled - @constant kUSBInformationDeviceIsSuspendedBit The hub port to which the USB device is attached is suspended - @constant kUSBInformationDeviceIsInResetBit The hub port to which the USB device is attached is being reset - @constant kUSBInformationDeviceOvercurrentBit The USB device generated an overcurrent - @constant kUSBInformationDevicePortIsInTestModeBit The hub port to which the USB device is attached is in test mode - @constant kUSBInformationDeviceIsRootHub The device is actually the root hub simulation - @constant kUSBInformationRootHubisBuiltIn If this is a root hub simulation and it's built into the machine, this bit is set. If it's on an expansion card, it will be cleared - - */ - typedef enum { - kUSBInformationDeviceIsCaptiveBit = 0, - kUSBInformationDeviceIsAttachedToRootHubBit = 1, - kUSBInformationDeviceIsInternalBit = 2, - kUSBInformationDeviceIsConnectedBit = 3, - kUSBInformationDeviceIsEnabledBit = 4, - kUSBInformationDeviceIsSuspendedBit = 5, - kUSBInformationDeviceIsInResetBit = 6, - kUSBInformationDeviceOvercurrentBit = 7, - kUSBInformationDevicePortIsInTestModeBit = 8, - kUSBInformationDeviceIsRootHub = 9, - kUSBInformationRootHubisBuiltIn = 10, - kUSBInformationDeviceIsRemote = 11, - kUSBInformationDeviceIsCaptiveMask = (1 << kUSBInformationDeviceIsCaptiveBit), - kUSBInformationDeviceIsAttachedToRootHubMask = (1 << kUSBInformationDeviceIsAttachedToRootHubBit), - kUSBInformationDeviceIsInternalMask = (1 << kUSBInformationDeviceIsInternalBit), - kUSBInformationDeviceIsConnectedMask = (1 << kUSBInformationDeviceIsConnectedBit), - kUSBInformationDeviceIsEnabledMask = (1 << kUSBInformationDeviceIsEnabledBit), - kUSBInformationDeviceIsSuspendedMask = (1 << kUSBInformationDeviceIsSuspendedBit), - kUSBInformationDeviceIsInResetMask = (1 << kUSBInformationDeviceIsInResetBit), - kUSBInformationDeviceOvercurrentMask = (1 << kUSBInformationDeviceOvercurrentBit), - kUSBInformationDevicePortIsInTestModeMask = (1 << kUSBInformationDevicePortIsInTestModeBit), - kUSBInformationDeviceIsRootHubMask = (1 << kUSBInformationDeviceIsRootHub), - kUSBInformationRootHubisBuiltInMask = (1 << kUSBInformationRootHubisBuiltIn), - kUSBInformationDeviceIsRemoteMask = (1 << kUSBInformationDeviceIsRemote) - } USBDeviceInformationBits; - - /*! - @enum USBPowerRequestTypes - @discussion Used to specify what kind of power will be reserved using the IOUSBDevice RequestExtraPower and ReturnExtraPower APIs. - @constant kUSBPowerDuringSleep The power is to be used during sleep. - @constant kUSBPowerDuringWake The power is to be used while the system is awake (i.e not sleeping) - */ - typedef enum { - kUSBPowerDuringSleep = 0, - kUSBPowerDuringWake = 1 - } USBPowerRequestTypes; - - // Apple specific properties -#define kAppleCurrentAvailable "AAPL,current-available" -#define kAppleCurrentInSleep "AAPL,current-in-sleep" -#define kAppleCurrentExtra "AAPL,current-extra" -#define kAppleInternalUSBDevice "AAPL,device-internal" -#define kUSBBusID "AAPL,bus-id" - - -#ifdef __cplusplus -} -#endif - -#endif /* _USB_H */ diff --git a/i386/include/IOKit/usb/.svn/text-base/USBHub.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/USBHub.h.svn-base deleted file mode 100644 index 4bbda15..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/USBHub.h.svn-base +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _USBHUB_H -#define _USBHUB_H - -#include <IOKit/usb/USB.h> -#include <IOKit/usb/USBSpec.h> - - /*! - @header USBHub.h - @abstract Constants and definitions used with Hub devices. - @discussion - */ - - /*! - @enum Hub Descriptor Type - @discussion - */ -enum { - kUSBHubDescriptorType = 0x29 -}; - - /*! - @enum HubFeatures - @discussion Used with SET_FEATURE to set hub and port features - */ -enum { - - kUSBHubLocalPowerChangeFeature = 0, /* Hub features */ - kUSBHubOverCurrentChangeFeature = 1, - - kUSBHubPortConnectionFeature = 0, /* port features */ - kUSBHubPortEnableFeature = 1, - kUSBHubPortSuspendFeature = 2, - kUSBHubPortOverCurrentFeature = 3, - kUSBHubPortResetFeature = 4, - kUSBHubPortPowerFeature = 8, - kUSBHubPortLowSpeedFeature = 9, - kUSBHubPortConnectionChangeFeature = 16, - kUSBHubPortEnableChangeFeature = 17, - kUSBHubPortSuspendChangeFeature = 18, - kUSBHubPortOverCurrentChangeFeature = 19, - kUSBHubPortResetChangeFeature = 20, - kUSBHubPortTestFeature = 21, - kUSBHubPortIndicatorFeature = 22 -}; - - /*! - @enum HubPortStatus - @discussion Used to decode the Port Status and Change - */ -enum { - kHubPortConnection = 0x0001, - kHubPortEnabled = 0x0002, - kHubPortSuspend = 0x0004, - kHubPortOverCurrent = 0x0008, - kHubPortBeingReset = 0x0010, - kHubPortPower = 0x0100, - kHubPortLowSpeed = 0x0200, - kHubPortHighSpeed = 0x0400, - kHubPortTestMode = 0x0800, - kHubPortIndicator = 0x1000, - - // these are the bits which cause the hub port state machine to keep moving - kHubPortStateChangeMask = kHubPortConnection | kHubPortEnabled | kHubPortSuspend | kHubPortOverCurrent | kHubPortBeingReset -}; - - - /*! - @enum HubStatus - @discussion Used to decode the Hub Status and Change - */ -enum { - kHubLocalPowerStatus = 1, - kHubOverCurrentIndicator = 2, - kHubLocalPowerStatusChange = 1, - kHubOverCurrentIndicatorChange = 2 -}; - - /*! - @enum HubCharacteristics - @discussion - */ -enum { - kPerPortSwitchingBit = (1 << 0), - kNoPowerSwitchingBit = (1 << 1), - kCompoundDeviceBit = (1 << 2), - kPerPortOverCurrentBit = (1 << 3), - kNoOverCurrentBit = (1 << 4), - - kHubPortIndicatorBit = 7, - kHubPortIndicatorMask = 0x0080 -}; - -/*! -@enum PowerSwitching - @discussion - */ -enum { - kHubSupportsGangPower = 0, - kHubSupportsIndividualPortPower = 1, - kHubPortSetPowerOff = 0, - kHubPortSetPowerOn = 1 -}; - -/*! -@enum PortIndicatorSelectors - @discussion - */ -enum { - kHubPortIndicatorAutomatic = 0, - kHubPortIndicatorAmber, - kHubPortIndicatorGreen, - kHubPortIndicatorOff -}; - -/*! - @enum Root Hub specific - @discussion - */ -enum { - kPrdRootHubApple = 0x8005, // ProductID for classic speed root hubs - kPrdRootHubAppleE = 0x8006, // ProductID for high speed root hubs - kUSBRootHubPollingRate = 32 // Enpoint polling rate interval for root hubs -}; - -/*! -@enum Hub Device Requests -@discussion Encoding of the hub specific standard requests -<tt> -<pre><b> -Request bmRequestType bRequest wValue wIndex wLength Data</b> -ClearHubFeature 0010 0000B CLEAR_FEATURE Feature Zero Zero None -ClearPortFeature 0010 0011B Feature Port Zero None - -GetBusState 1010 0011B GET_STATE Zero Port One Port Bus State - -GetHubDescriptor 1010 0000B GET_DESCRIPTOR Type Zero Length Descriptor - -GetHubStatus 1010 0000B GET_STATUS Zero Zero Four Hub Status -GetPortStatus 1010 0011B Zero Port Four Port Status - -SetHubDescriptor 0010 0000B SET_DESCRIPTOR Type Zero Length Descriptor - -SetHubFeature 0010 0000B SET_FEATURE Feature Zero Zero None -SetPortFeature 0010 0011B Feature Port Zero None -</pre> -</tt> - */ -enum { - kClearHubFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBClass, kUSBDevice), - kClearPortFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBClass, kUSBOther), - kGetPortState = EncodeRequest(kUSBRqGetState, kUSBIn, kUSBClass, kUSBOther), - kGetHubDescriptor = EncodeRequest(kUSBRqGetDescriptor, kUSBIn, kUSBClass, kUSBDevice), - kGetHubStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBClass, kUSBDevice), - kGetPortStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBClass, kUSBOther), - kSetHubDescriptor = EncodeRequest(kUSBRqGetDescriptor, kUSBOut, kUSBClass, kUSBDevice), - kSetHubFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBClass, kUSBDevice), - kSetPortFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBClass, kUSBOther) -}; - - -/*! - @typedef IOUSBHubDescriptor - @discussion USB Hub Descriptor. See the USB HID Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. -*/ -struct IOUSBHubDescriptor { - UInt8 length; - UInt8 hubType; - UInt8 numPorts; - UInt16 characteristics __attribute__((packed)); - UInt8 powerOnToGood; /* Port settling time, in 2ms */ - UInt8 hubCurrent; - /* These are received packed, will have to be unpacked */ - UInt8 removablePortFlags[8]; - UInt8 pwrCtlPortFlags[8]; -}; - -typedef struct IOUSBHubDescriptor IOUSBHubDescriptor; - -/*! - @typedef IOUSBHubStatus - @discussion Used to get the port status and change flags using GetPortStatus() -*/ -struct IOUSBHubStatus { - UInt16 statusFlags; - UInt16 changeFlags; -}; -typedef struct IOUSBHubStatus IOUSBHubStatus; -typedef IOUSBHubStatus * IOUSBHubStatusPtr; - -typedef struct IOUSBHubStatus IOUSBHubPortStatus; - - -/*! - @typedef IOUSBHubPortReEnumerateParam - @discussion Used to specify the port that needs to be reenumerated -*/ -typedef struct IOUSBHubPortReEnumerateParam IOUSBHubPortReEnumerateParam; - -struct IOUSBHubPortReEnumerateParam { - UInt32 portNumber; - UInt32 options; -}; - -typedef struct IOUSBHubPortClearTTParam IOUSBHubPortClearTTParam; - -struct IOUSBHubPortClearTTParam { - UInt32 portNumber; - UInt32 options; -#if 0 - UInt8 deviceAddress; <<0 - UInt8 endpointNum; <<8 - UInt8 endpointType; <<16 // As split transaction. 00 Control, 10 Bulk - UInt8 IN; <<24 // Direction, 1 = IN, 0 = OUT -#endif -}; - -#endif /* _USBHUB_H */ diff --git a/i386/include/IOKit/usb/.svn/text-base/USBSpec.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/USBSpec.h.svn-base deleted file mode 100644 index 0665819..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/USBSpec.h.svn-base +++ /dev/null @@ -1,470 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -/* - * Constants that both OS9 and OSX want to define, and whose values are - * specified by the USB Standard. - * Put in a seperate file so they can be included if the OS9 include file isn't already - * included. - */ -#ifndef _USBSPEC_H -#define _USBSPEC_H - -#ifdef __cplusplus -extern "C" { -#endif - - /*! - @header USBSpec.h - @abstract Constants and definitions of parameters that are used in communcating with USB devices and interfaces. - @discussion - */ - - /*! - @enum Endpoint type - @discussion Used in IOUSBFindEndpointRequest's type field - */ -enum { - kUSBControl = 0, - kUSBIsoc = 1, - kUSBBulk = 2, - kUSBInterrupt = 3, - kUSBAnyType = 0xFF -}; - - /*! - @enum Endpoint direction - @discussion Used in IOUSBFindEndpointRequest's direction field - */ -enum { - kUSBOut = 0, - kUSBIn = 1, - kUSBNone = 2, - kUSBAnyDirn = 3 -}; - - /*! - @enum Device Request Type - @discussion This type is encoded in the bmRequestType field of a Device Request. It specifies the type of request: standard, class or vendor specific. - */ -enum { - kUSBStandard = 0, - kUSBClass = 1, - kUSBVendor = 2 -}; - - /*! - @enum Device Request Recipient - @discussion This recipient is encoded in the bmRequestType field of a Device Request. It specifies the type of recipient for a request: the device, the interface, or an endpoint. - */ -enum { - kUSBDevice = 0, - kUSBInterface = 1, - kUSBEndpoint = 2, - kUSBOther = 3 -}; - - /*! - @enum Device Request - @discussion Specifies values for the bRequest field of a Device Request. - */ -enum { - kUSBRqGetStatus = 0, - kUSBRqClearFeature = 1, - kUSBRqGetState = 2, - kUSBRqSetFeature = 3, - kUSBRqReserved2 = 4, - kUSBRqSetAddress = 5, - kUSBRqGetDescriptor = 6, - kUSBRqSetDescriptor = 7, - kUSBRqGetConfig = 8, - kUSBRqSetConfig = 9, - kUSBRqGetInterface = 10, - kUSBRqSetInterface = 11, - kUSBRqSyncFrame = 12 -}; - - /*! - @enum USB Descriptors - @discussion Specifies values for diffent descriptor types. - */ -enum { - kUSBAnyDesc = 0, // Wildcard for searches - kUSBDeviceDesc = 1, - kUSBConfDesc = 2, - kUSBStringDesc = 3, - kUSBInterfaceDesc = 4, - kUSBEndpointDesc = 5, - kUSBDeviceQualifierDesc = 6, - kUSBOtherSpeedConfDesc = 7, - kUSBInterfacePowerDesc = 8, - kUSBOnTheGoDesc = 9, - kUSDebugDesc = 10, - kUSBInterfaceAssociationDesc = 11, - kUSBHIDDesc = 0x21, - kUSBReportDesc = 0x22, - kUSBPhysicalDesc = 0x23, - kUSBHUBDesc = 0x29 -}; - - /*! - @enum Feature Selectors - @discussion Used with SET/CLEAR_FEATURE requests. - */ -enum { - kUSBFeatureEndpointStall = 0, - kUSBFeatureDeviceRemoteWakeup = 1 -}; - - /*! - @enum USB Power constants - @discussion Constants relating to USB Power. - */ -enum { - kUSB100mAAvailable = 50, - kUSB500mAAvailable = 250, - kUSB100mA = 50, - kUSBAtrBusPowered = 0x80, - kUSBAtrSelfPowered = 0x40, - kUSBAtrRemoteWakeup = 0x20 -}; - - /*! - @enum USB Release constants - @discussion Constants relating to USB releases as found in the bcdUSB field of the Device Descriptor. - */ -enum { - kUSBRel10 = 0x0100, - kUSBRel11 = 0x0110, - kUSBRel20 = 0x0200 -}; - - - /*! - @enum HID requests - @discussion Constants for HID requests. - */ -enum { - kHIDRqGetReport = 1, - kHIDRqGetIdle = 2, - kHIDRqGetProtocol = 3, - kHIDRqSetReport = 9, - kHIDRqSetIdle = 10, - kHIDRqSetProtocol = 11 -}; - - /*! - @enum HID report types - @discussion Constants for the three kinds of HID reports. - */ -enum { - kHIDRtInputReport = 1, - kHIDRtOutputReport = 2, - kHIDRtFeatureReport = 3 -}; - - - /*! - @enum HID Protocol - @discussion Used in the SET_PROTOCOL device request - */ -enum { - kHIDBootProtocolValue = 0, - kHIDReportProtocolValue = 1 -}; - - - -enum { - kUSBCapsLockKey = 0x39, - kUSBNumLockKey = 0x53, - kUSBScrollLockKey = 0x47 -}; - -/*! -@enum Device Class Codes - @discussion Constants for USB Device classes (bDeviceClass). - */ -enum { - kUSBCompositeClass = 0, - kUSBCommClass = 2, // Deprecated - kUSBCommunicationClass = 2, - kUSBHubClass = 9, - kUSBDataClass = 10, - kUSBPersonalHealthcareClass = 15, - kUSBDiagnosticClass = 220, - kUSBWirelessControllerClass = 224, - kUSBMiscellaneousClass = 239, - kUSBApplicationSpecificClass = 254, - kUSBVendorSpecificClass = 255 -}; - -/*! -@enum Interface Class - @discussion Constants for Interface classes (bInterfaceClass). - */ -enum { - kUSBAudioClass = 1, // Deprecated - kUSBAudioInterfaceClass = 1, - - kUSBCommunicationControlInterfaceClass = 2, - kUSBCommunicationDataInterfaceClass = 10, - - kUSBHIDClass = 3, - kUSBHIDInterfaceClass = 3, - - kUSBPhysicalInterfaceClass = 5, - - kUSBImageInterfaceClass = 6, - - kUSBPrintingClass = 7, // Deprecated - kUSBPrintingInterfaceClass = 7, - - kUSBMassStorageClass = 8, // Deprecated - kUSBMassStorageInterfaceClass = 8, - - kUSBChipSmartCardInterfaceClass = 11, - - kUSBContentSecurityInterfaceClass = 13, - - kUSBVideoInterfaceClass = 14, - - kUSBPersonalHealthcareInterfaceClass = 15, - - kUSBDiagnosticDeviceInterfaceClass = 220, - - kUSBWirelessControllerInterfaceClass = 224, - - kUSBApplicationSpecificInterfaceClass = 254, - - kUSBVendorSpecificInterfaceClass = 255 -}; - -// Obsolete -enum { - - kUSBDisplayClass = 4, // Obsolete -}; - -/*! - @enum Interface SubClass - @discussion Constants for USB Interface SubClasses (bInterfaceSubClass). -*/ -enum { - kUSBCompositeSubClass = 0, - - kUSBHubSubClass = 0, - - // For the kUSBAudioInterfaceClass - // - kUSBAudioControlSubClass = 0x01, - kUSBAudioStreamingSubClass = 0x02, - kUSBMIDIStreamingSubClass = 0x03, - - // For the kUSBApplicationSpecificInterfaceClass - // - kUSBDFUSubClass = 0x01, - kUSBIrDABridgeSubClass = 0x02, - kUSBTestMeasurementSubClass = 0x03, - - // For the kUSBMassStorageInterfaceClass - // - kUSBMassStorageRBCSubClass = 0x01, - kUSBMassStorageATAPISubClass = 0x02, - kUSBMassStorageQIC157SubClass = 0x03, - kUSBMassStorageUFISubClass = 0x04, - kUSBMassStorageSFF8070iSubClass = 0x05, - kUSBMassStorageSCSISubClass = 0x06, - - // For the kUSBHIDInterfaceClass - // - kUSBHIDBootInterfaceSubClass = 0x01, - - // For the kUSBCommunicationDataInterfaceClass - // - kUSBCommDirectLineSubClass = 0x01, - kUSBCommAbstractSubClass = 0x02, - kUSBCommTelephoneSubClass = 0x03, - kUSBCommMultiChannelSubClass = 0x04, - kUSBCommCAPISubClass = 0x05, - kUSBCommEthernetNetworkingSubClass = 0x06, - kUSBATMNetworkingSubClass = 0x07, - - // For the kUSBDiagnosticDeviceInterfaceClass - // - kUSBReprogrammableDiagnosticSubClass = 0x01, - - // For the kUSBWirelessControllerInterfaceClass - // - kUSBRFControllerSubClass = 0x01, - - // For the kUSBMiscellaneousClass - // - kUSBCommonClassSubClass = 0x02, - - // For the kUSBVideoInterfaceClass - // - kUSBVideoControlSubClass = 0x01, - kUSBVideoStreamingSubClass = 0x02, - kUSBVideoInterfaceCollectionSubClass = 0x03 - -}; - -/*! -@enum Interface Protocol - @discussion Reported in the bInterfaceProtocol field of the Interface Descriptor. - */ -enum { - - // For kUSBHIDInterfaceClass - // - kHIDNoInterfaceProtocol = 0, - kHIDKeyboardInterfaceProtocol = 1, - kHIDMouseInterfaceProtocol = 2, - kUSBVendorSpecificProtocol = 0xff, - - // For kUSBDiagnosticDeviceInterfaceClass - // - kUSB2ComplianceDeviceProtocol = 0x01, - - // For kUSBWirelessControllerInterfaceClass - // - kUSBBluetoothProgrammingInterfaceProtocol = 0x01, - - // For kUSBMiscellaneousClass - // - KUSBInterfaceAssociationDescriptorProtocol = 0x01 - -}; - - -/*! - @enum DFU Class Attributes - @discussion -*/ -enum { - kUSBDFUAttributesMask = 0x07, - kUSBDFUCanDownloadBit = 0, - kUSBDFUCanUploadBit = 1, - kUSBDFUManifestationTolerantBit = 2 -}; - -/*! - @enum Printer Class Requests - @discussion The bRequest parameter for Printing Class Sepcific Requests - */ -enum { - kUSPrintingClassGetDeviceID = 0, - kUSPrintingClassGePortStatus = 1, - kUSPrintingClassSoftReset = 2 -}; - - /*! -@enum Endpoint Descriptor bits - @discussion Bit definitions for endpoint descriptor fields - */ -enum { - kUSBbEndpointAddressMask = 0x0f, - kUSBbEndpointDirectionBit = 7, - kUSBbEndpointDirectionMask = ( 1 << kUSBbEndpointDirectionBit ), - kUSBEndpointDirectionOut = 0x00, - kUSBEndpointDirectionIn = 0x80, - kUSBEndpointbmAttributesTransferTypeMask = 0x03, - kUSBEndpointbmAttributesSynchronizationTypeMask = 0x0c, - kUSBEndpointbmAttributesSynchronizationTypeShift = 2, - kUSBEndpointbmAttributesUsageTypeMask = 0x30, - kUSBEndpointbmAttributesUsageTypeShift = 4 -}; - - /*! - @defineblock USB Descriptor and IORegistry constants - @discussion Various constants used to describe the fields in the various USB Device Descriptors and IORegistry names used for some of those fields - - @define kUSBDeviceClass The field in the USB Device Descriptor corresponding to the device class - @define kUSBDeviceSubClass The field in the USB Device Descriptor corresponding to the device sub class - @define kUSBDeviceProtocol The field in the USB Device Descriptor corresponding to the device protocol - @define kUSBDeviceMaxPacketSize The field in the USB Device Descriptor corresponding to the maximum packet size for endpoint 0 - @define kUSBVendorID The field in the USB Device Descriptor corresponding to the device USB Vendor ID - @define kUSBVendorName Deprecated. Use kUSBVendorID - @define kUSBProductID The field in the USB Device Descriptor corresponding to the device USB Product ID - @define kUSBProductName Deprecated. Use kUSBProductID - @define kUSBDeviceReleaseNumber The field in the USB Device Descriptor corresponding to the device release version - @define kUSBManufacturerStringIndex The field in the USB Device Descriptor corresponding to the index for the manufacturer's string - @define kUSBProductStringIndex The field in the USB Device Descriptor corresponding to the index for the product name's string - @define kUSBSerialNumberStringIndex The field in the USB Device Descriptor corresponding to the index for the serial number's string - @define kUSBDeviceNumConfigs The field in the USB Configuration Descriptor corresponding to the number of configurations - @define kUSBInterfaceNumber The field in the USB Configuration Descriptor corresponding to the number of configurations - @define kUSBAlternateSetting The field in the USB Configuration Descriptor corresponding to the number of configurations - @define kUSBNumEndpoints The field in the USB Configuration Descriptor corresponding to the number of configurations - @define kUSBInterfaceClass The field in the USB Interface Descriptor corresponding to the interface class - @define kUSBInterfaceSubClass The field in the USB Interface Descriptor corresponding to the interface sub class - @define kUSBInterfaceProtocol The field in the USB Interface Descriptor corresponding to the interface protocol - @define kUSBInterfaceStringIndex The field in the USB Interface Descriptor corresponding to the index for the interface name's string - @define kUSBConfigurationValue The field in the USB Interface Descriptor corresponding to the configuration - @define kUSBProductString IORegistry key for the device's USB Product string - @define kUSBVendorString IORegistry key for the device's USB manufacturer string - @define kUSBSerialNumberString IORegistry key for the device's USB serial number string - @define kUSB1284DeviceID IORegistry key for the 1284 Device ID of a printer - - */ -#define kUSBDeviceClass "bDeviceClass" -#define kUSBDeviceSubClass "bDeviceSubClass" -#define kUSBDeviceProtocol "bDeviceProtocol" -#define kUSBDeviceMaxPacketSize "bMaxPacketSize0" -#define kUSBVendorID "idVendor" // good name -#define kUSBVendorName kUSBVendorID // bad name - keep for backward compatibility -#define kUSBProductID "idProduct" // good name -#define kUSBProductName kUSBProductID // bad name - keep for backward compatibility -#define kUSBDeviceReleaseNumber "bcdDevice" -#define kUSBManufacturerStringIndex "iManufacturer" -#define kUSBProductStringIndex "iProduct" -#define kUSBSerialNumberStringIndex "iSerialNumber" -#define kUSBDeviceNumConfigs "bNumConfigurations" -#define kUSBInterfaceNumber "bInterfaceNumber" -#define kUSBAlternateSetting "bAlternateSetting" -#define kUSBNumEndpoints "bNumEndpoints" -#define kUSBInterfaceClass "bInterfaceClass" -#define kUSBInterfaceSubClass "bInterfaceSubClass" -#define kUSBInterfaceProtocol "bInterfaceProtocol" -#define kUSBInterfaceStringIndex "iInterface" -#define kUSBConfigurationValue "bConfigurationValue" -#define kUSBProductString "USB Product Name" -#define kUSBVendorString "USB Vendor Name" -#define kUSBSerialNumberString "USB Serial Number" -#define kUSB1284DeviceID "1284 Device ID" - /*! @/defineblock */ - - /*! - @enum Apple USB Vendor ID - @discussion Apple's vendor ID, assigned by the USB-IF -*/ -enum { - kAppleVendorID = 0x05AC -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _USBSPEC_H */ diff --git a/i386/include/IOKit/usb/.svn/text-base/USBTracepoints.h.svn-base b/i386/include/IOKit/usb/.svn/text-base/USBTracepoints.h.svn-base deleted file mode 100644 index f2fe81e..0000000 --- a/i386/include/IOKit/usb/.svn/text-base/USBTracepoints.h.svn-base +++ /dev/null @@ -1,662 +0,0 @@ -/* - * Copyright � 2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __IOKIT_IO_USB_FAMILY_TRACEPOINTS__ -#define __IOKIT_IO_USB_FAMILY_TRACEPOINTS__ - -#include <IOKit/IOTypes.h> - -#include <sys/kdebug.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#define USB_SYSCTL "debug.USB" -#define kUSBTypeDebug 'USBD' -#define DEBUG_UNUSED( X ) ( void )( X ) - - extern UInt32 gUSBStackDebugFlags; - - typedef struct USBSysctlArgs - { - uint32_t type; - uint32_t operation; - uint32_t debugFlags; - } USBSysctlArgs; - - enum - { - kUSBOperationGetFlags = 0, - kUSBOperationSetFlags = 1 - }; - - // the following bits/masks are for use in the usb boot args - // e.g. boot-args="usb=0x102" will turn on Trace Points and set the EHCI retry count to 1 - // the bits can also be set with a sysctl call - enum - { - kUSBEnableDebugLoggingBit = 0, // bit 0 currently not used - kUSBEnableTracePointsBit = 1, // bit 1 used to turn on Trace Points when a USB controller first loads - kUSBEnableErrorLogBit = 2, // bit 2 (4) turns level 1 log for errors - kUSBDebugRetryCountShift = 8, // bits 8 and 9 will set the retry count for low level bus transactions - kUSBDebugRetryCountReserved = 9, // must be 1, 2, or 3 (0 is invalid, 3 is the default) - - kUSBEnableDebugLoggingMask = (1 << kUSBEnableDebugLoggingBit), - kUSBEnableTracePointsMask = (1 << kUSBEnableTracePointsBit), - kUSBDebugRetryCountMask = (3 << kUSBDebugRetryCountShift), - kUSBEnableErrorLogMask = (1 << kUSBEnableErrorLogBit) - }; - - - /* Kernel Tracepoints - * - * Kernel tracepoints are a logging mechanism reduces the size of a log-laden binary. - * Codes are placed into a buffer, from the kernel, and picked up by a userspace - * tool that displays a unique log message for each tracepoint. Additionally, each - * tracepoint may contain up-to four 32-bit (may change with LP64) arguments. - * - * To add a tracepoint, use the code below as an example: - * USBTrace( kUSBTController, kTPControllerStart, (uintptr_t)myArgValue ); - * Next, add the corresponding tracepoint code in the USBTracer tool, using - * the existing examples. Avoid using confidential information in the log strings. - * Some functions have a argument counter, to signify which of the function's tracepoints - * are actually being logged. When adding a tracepoint using an existing code, you - * must verify that you increment this argument counter properly. - * - * The trace codes consist of the following: - * - * ---------------------------------------------------------------------- - *| Class (8) | SubClass (8) | USBGroup(6) | Code (8) |Func | - *| DBG_IOKIT | DBG_IOUSB | | |Qual(2)| - * ---------------------------------------------------------------------- - * - * DBG_IOKIT(05h) DBG_IOUSB(2Dh) - * - * See <sys/kdebug.h> and IOTimeStamp.h for more details. - */ - - - // USB groupings (max of 64) - enum - { - // Family groupings - kUSBTController = 0, - kUSBTControllerUserClient = 1, - - kUSBTDevice = 2, - kUSBTDeviceUserClient = 3, - - kUSBTHub = 4, - kUSBTHubPort = 5, - kUSBTHSHubUserClient = 6, - kUSBTHID = 7, - kUSBTPipe = 8, - - kUSBTInterfaceUserClient = 9, - - kUSBTEnumeration = 10, // Tracepoints in various components to debug USB enumeration - - - // UIM groupings - kUSBTUHCI = 11, - kUSBTUHCIUIM = 12, - kUSBTUHCIInterrupts = 13, - - kUSBTOHCI = 14, - kUSBTOHCIInterrupts = 15, - - kUSBTEHCI = 20, - kUSBTEHCIHubInfo = 22, - kUSBTEHCIInterrupts = 23, - - // 30-33 reserved - - // 21-25 reserved - kUSBTHubPolicyMaker = 35, - kUSBTCompositeDriver = 36, - - // Actions - kUSBTOutstandingIO = 42, - - // kUSBAudio - kUSBAudio = 50 - - // 61-63 reserved - }; - - // USB Controller Tracepoints 0x052D0000 - 0x052D03FF - // kUSBTController - enum - { - kTPControllerStart = 1, - kTPControllerControlPacketHandler = 2, - kTPControllerMakeDevice = 3, - kTPControllerMakeHubDevice = 4, - kTPControllerCreateRootHubDevice = 5, - kTPControllerClearTTHandler = 6, - kTPControllerClearTT = 7, - kTPControllerDoCreateEP = 8, - kTPControllerReadV2 = 9, - kTPControllerReturnIsochDoneQueue = 10, - kTPControllersetPowerState = 11, - kTPControllerCheckPowerModeBeforeGatedCall = 12, - kTPControllerGatedPowerChange = 13, - kTPControllerCheckForRootHubChanges = 14, - kTPControllerRootHubQueueInterruptRead = 15, - kTPControllerRootHubTimer = 16, - kTPControllerDisjointCompletion = 17, - kTPControllerCheckForDisjointDescriptor = 18, - kTPControllerRead = 19, - kTPControllerV3Start = 20, - kTPAllocatePowerStateArray = 21, - kTPInitForPM = 22, - kTPIsocIOLL = 23, - kTPIsocIO = 24, - kTPControllerWrite = 25, - kTPCompletionCall = 26, - kTPControlTransaction = 27, - kTPInterruptTransaction = 28, - kTPInterruptTransactionData = 29, - kTPBulkTransaction = 30, - kTPBulkTransactionData = 31, - kTPIsocTransaction = 32, - kTPInterruptPacketHandler = 33, - kTPBulkPacketHandler = 34, - kTPDevZeroLock = 35, - kTPControlPacketHandlerData = 36, - kTPDoIOTransferIntrSync = 37, - kTPDoIOTransferBulkSync = 38, - kTPBulkPacketHandlerData = 39, - kTPInterruptPacketHandlerData = 40 - }; - - // USB Device Tracepoints - // kUSBTDevice - enum - { - kTPDeviceInit = 1, - kTPDeviceMessage = 2, - kTPDeviceResetDevice = 3, - kTPDeviceGetFullConfigurationDescriptor = 4, - kTPDeviceGetDeviceDescriptor = 5, - kTPDeviceGetConfigDescriptor = 6, - kTPDeviceSetConfiguration = 7, - kTPDeviceSetFeature = 8, - kTPDeviceDeviceRequest = 9, - kTPDeviceGetConfiguration = 10, - kTPDeviceGetDeviceStatus = 11, - kTPDeviceSuspendDevice = 12, - kTPDeviceReEnumerateDevice = 13, - kTPDeviceConfigLock = 14 - }; - - // USB Pipe Tracepoints - // kUSBTPipe - enum - { - kTPPipeInitToEndpoint = 1, - kTPBulkPipeRead = 2, - kTPBulkPipeWrite = 3, - kTPIsocPipeRead = 4, - kTPIsocPipeWrite = 5, - kTPIsocPipeReadLL = 6, - kTPIsocPipeWriteLL = 7, - kTPIBulkReadTS = 8, - kTPPipeControlRequest = 9, - kTPPipeControlRequestMemDesc = 10 - }; - - - // USB kUSBTControllerUserClient Tracepoints - // kUSBTControllerUserClient - enum - { - kTPControllerUCStart = 1, - kTPControllerUCOpen = 2, - kTPControllerUCReadRegister = 3, - kTPControllerUCWriteRegister = 4 - }; - - // USB kUSBTDeviceUserClient Tracepoints - // kUSBTDeviceUserClient - enum - { - kTPDeviceUCDeviceRequestIn = 1, - kTPDeviceUCDeviceRequestOut = 2, - kTPDeviceUCChangeOutstandingIO = 3, - kTPDeviceUCGetGatedOutstandingIO = 4, - kTPDeviceUCReqComplete = 5 - }; - - // USB InterfaceUserClient Tracepoints - // kUSBTInterfaceUserClient - enum - { - kTPInterfaceUCReadPipe = 1, - kTPInterfaceUCWritePipe = 2, - kTPInterfaceUCControlRequestOut = 3, - kTPInterfaceUCControlRequestIn = 4, - kTPInterfaceUCDoIsochPipeAsync = 5, - kTPInterfaceUCLowLatencyPrepareBuffer = 6, - kTPInterfaceUCChangeOutstandingIO = 7, - kTPInterfaceUCReqComplete = 8, - kTPInterfaceUCIsoReqComplete = 9, - kTPInterfaceUCLLIsoReqComplete = 10 - }; - - - // USB HSHubUserClient Tracepoints - // kUSBTHSHubUserClient - enum - { - kTPHSHubUCInitWithTask = 1, - kTPHSHubUCStart = 2, - kTPHSHubUCClose = 3, - kTPHSHubUCGetNumberOfPorts = 4, - kTPHSHubUCGetLocationID = 5, - kTPHSHubUCPutPortIntoTestMode = 6, - kTPHSHubUCSupportsIndicators = 7, - kTPHSHubUCSetIndicatorForPort = 8, - kTPHSHubUCGetPortIndicatorControl = 9, - kTPHSHubUCSetIndicatorsToAutomatic = 10, - kTPHSHubUCGetPowerSwitchingMode = 11, - kTPHSHubUCGetPortPower = 12, - kTPHSHubUCSetPortPower = 13, - kTPHSHubUCDisablePwrMgmt = 14 - }; - - // USB Hub Tracepoints - // kUSBTHub - enum - { - kTPHubStart = 1, - kTPHubMessage = 2, - kTPHubWillTerminate = 3, - kTPHubPowerStateWillChangeTo = 4, - kTPHubPowerChangeDone = 5, - kTPHubConfigureHub = 6, - kTPHubCheckPowerPowerRequirements = 7, - kTPHubHubPowerChange = 8, - kTPHubAreAllPortsDisconnectedOrSuspended= 9, - kTPHubSuspendPorts = 10, - kTPHubSetPortFeature = 11, - kTPHubClearPortFeature = 12, - kTPHubDoPortAction = 13, - kTPHubInterruptReadHandler = 14, - kTPHubResetPortZero = 15, - kTPHubProcessStateChanged = 16, - kTPHubRearmInterruptRead = 17, - kTPHubDoDeviceRequest = 18, - kTPHubWaitForPortResumes = 19, - kTPHubResetMyPort = 20, - kTPHubDecrementOutstandingIO = 21, - kTPHubChangeOutstandingIO = 22, - kTPHubChangeRaisedPowerState = 23, - kTPHubChangeOutstandingResumes = 24, - kTPHubEnterTestMode = 25, - kTPHubLeaveTestMode = 26, - kTPHubPutPortIntoTestMode = 27, - kTPHubGetPortIndicatorControl = 28, - kTPHubSetIndicatorsToAutomatic = 29, - kTPHubGetPortPower = 30, - kTPHubEnsureUsability = 31, - kTPHubCheckPowerRequirements = 32, - kTPHubWaitForPowerOn = 33, - kTPHubDoPortActionLock = 34, - kTPHubCheckForDeadDevice = 35 - }; - - // USB HubPort Tracepoints - // kUSBTHubPort - enum - { - kTPHubPortStop = 1, - kTPHubPortAddDevice = 2, - kTPHubPortSuspendPort = 3, - kTPHubPortFatalError = 4, - kTPHubPortAddDeviceResetChangeHandler = 5, - kTPHubPortHandleResetPortHandler = 6, - kTPHubPortDefaultOverCrntChangeHandler = 7, - kTPHubPortDefaultConnectionChangeHandler = 8, - kTPHubPortReleaseDevZeroLock = 9, - kTPHubPortDetachDevice = 10, - kTPHubPortGetDevZeroDescriptorWithRetries = 11, - kTPHubPortDisplayOverCurrentNotice = 12, - kTPHubPortWakeSuspendCommand = 13, - kTPHubPortWaitForSuspendCommand = 14, - kTPHubPortEnablePowerAfterOvercurrent = 15 - }; - - // USB HID Tracepoints - // kUSBTHID - enum - { - kTPHIDStart = 1, - kTPHIDpowerStateWillChangeTo = 2, - kTPHIDsetPowerState = 3, - kTPHIDpowerStateDidChangeTo = 4, - kTPHIDpowerChangeDone = 5, - kTPHIDhandleStart = 6, - kTPHIDClearFeatureEndpointHalt = 7, - kTPHIDHandleReport = 8, - kTPHIDSuspendPort = 9, - kTPHIDAbortAndSuspend = 10, - kTPHIDClaimPendingRead = 11, - kTPHIDChangeOutstandingIO = 12, - kTPHIDRearmInterruptRead = 13, - kTPHIDInitializeUSBHIDPowerManagement = 14, - kTPHIDInterruptRead = 15, - kTPHIDInterruptReadError = 16, - kTPHIDCheckForDeadDevice = 17 - }; - - // USB Enumeration Tracepoints - // kUSBTEnumeration - enum - { - kTPEnumerationProcessStatusChanged = 1, - kTPEnumerationInitialGetPortStatus = 2, - kTPEnumerationCallAddDevice = 3, - kTPEnumerationAddDevice = 4, - kTPEnumerationResetPort = 5, - kTPEnumerationAddDeviceResetChangeHandler = 6, - kTPEnumerationRegisterService = 7, - kTPEnumerationLowSpeedDevice = 8, - kTPEnumerationFullSpeedDevice = 9 - - }; - - // USB UHCI Tracepoints - // kUSBTUHCI - enum - { - kTPUHCIMessage = 1, - kTPUHCIGetFrameNumber = 2, - kTPUHCIScavengeIsocTransactions = 3, - kTPUHCIScavengeQueueHeads = 4, - kTPUHCIAllocateQH = 5, - kTPUHCIRootHubStatusChange = 6, - kTPUHCIRHSuspendPort = 7, - kTPUHCIRHHoldPortReset = 8, - kTPUHCIRHResumePortCompletion = 9, - kTPUHCISuspendController = 10, - KTPUHCIResumeController = 11, - KTPUHCIResetControllerState = 12, - KTPUHCIRestartControllerFromReset = 13, - KTPUHCIEnableInterrupts = 14, - KTPUHCIDozeController = 15, - KTPUHCIWakeFromDoze = 16, - KTPUHCIPowerState = 17, - }; - - - // USB UHCI Tracepoints - // kUSBTUHCIUIM - enum - { - kTPUHCIUIMCreateControlEndpoint = 1, - kTPUHCIUIMCreateBulkEndpoint = 2, - kTPUHCIUIMCreateInterruptEndpoint = 3, - kTPUHCIUIMCreateIsochEndpoint = 4, - kTPUHCIUIMCreateIsochTransfer = 5, - kTPUHCIUIMDeleteEndpoint = 6, - kTPUHCIUIMUnlinkQueueHead = 7, - kTPUHCIUIMCheckForTimeouts = 8, - kTPUHCIUIMReturnOneTransaction = 9, - kTPUHCIUIMAllocateTDChain = 10, - kTPUHCIUIMAddIsochFramesToSchedule = 11, - kTPUHCIUIMAbortIsochEP = 12, - kTPUHCIUIMCreateInterruptTransfer = 13, - kTPUHCIUIMHandleEndpointAbort = 14 - }; - - // USB UHCI Interrupt Tracepoints - // kUSBTUHCIInterrupts - enum - { - kTPUHCIInterruptsGetFrameNumberInternal = 1, - kTPUHCIInterruptsFilterInterrupt = 2, - kTPUHCIInterruptsHandleInterrupt = 3, - kTPUHCIUpdateFrameList = 4 - }; - - // USB EHCI Tracepoints - // kUSBTEHCI - enum - { - kTPEHCIRootHubResetPort = 1, - kTPEHCIRootHubPortEnable = 2, - kTPEHCIRootHubPortSuspend = 3, - // kTPEHCIRootHubStatusChange = 4, - kTPEHCIRHResumePortCompletion = 5, - kTPEHCIUIMFinalize = 6, - kTPEHCIGetFrameNumber32 = 7, - kTPEHCIGetFrameNumber = 8, - kTPEHCIAllocateQH = 9, - kTPEHCIEnableAsyncSchedule = 10, - kTPEHCIDisableAsyncSchedule = 11, - kTPEHCIEnablePeriodicSchedule = 12, - kTPEHCIDisablePeriodicSchedule = 13, - kTPEHCIMessage = 14, - kTPEHCIMakeEmptyEndPoint = 15, - kTPEHCIAllocateTDs = 16, - kTPEHCIMungeECHIStatus = 17, - kTPEHCIScavengeIsocTransactions = 18, - kTPEHCIScavengeAnEndpointQueue = 19, - kTPEHCIScavengeCompletedTransactions = 20, - kTPEHCICreateBulkEndpoint = 21, - kTPEHCICreateBulkTransfer = 22, - - kTPEHCICreateInterruptEndpoint = 24, - kTPEHCICreateIsochEndpoint = 25, - kTPEHCIAbortIsochEP = 26, - kTPEHCIHandleEndpointAbort = 27, - kTPEHCICreateInterruptTransfer = 28, - kTPEHCIUnlinkAsyncEndpoint = 29, - kTPEHCIDeleteEndpoint = 30, - kTPEHCICreateHSIsochTransfer = 31, - kTPEHCICreateSplitIsochTransfer = 32, - kTPEHCICreateIsochTransfer = 33, - kTPEHCIAddIsocFramesToSchedule = 34, - kTPEHCIReturnOneTransaction = 35, - kTPEHCICheckEDListForTimeouts = 36, - kTPEHCISuspendUSBBus = 37, - kTPEHCICheckForTimeouts = 38, - kTPEHCIResumeUSBBus = 39, - kTPEHCIRestartUSBBus = 40, - kTPEHCIResetControllerState = 41, - kTPEHCIDozeController = 42, - kTPEHCIWakeControllerFromDoze = 43, - kTPEHCIEnableInterrupts = 44, - kTPEHCIPowerState = 45, - kTPEHCIStopUSBBus = 46, - kTPEHCIRestartControllerFromReset = 47 - }; - - // USB EHCI Interrupt Tracepoints - // kUSBTEHCIInterrupts - enum - { - kTPEHCIInterruptsPollInterrupts = 1, - kTPEHCIInterruptsPrimaryInterruptFilter = 2, - kTPEHCIUpdateFrameList = 3, - }; - - - // USB EHCI Interrupt Tracepoints - // kUSBTEHCIHubInfo - enum - { - kTPEHCIAvailableIsochBandwidth = 1, - kTPEHCIAllocateIsochBandwidth = 2 - }; - - // USB OHCI Tracepoints - // kUSBTOHCI - enum - { - kTPOHCIInitialize = 1, - kTPOHCICreateGeneralTransfer = 2, - kTPOHCIAbortEndpoint = 3, - kTPOHCIDeleteEndpoint = 4, - kTPOHCIEndpointStall = 5, - kTPOHCICreateIsochTransfer = 6, - kTPOHCIAllocateTD = 7, - kTPOHCIAllocateITD = 8, - kTPOHCIAllocateED = 9, - kTPOHCIProcessCompletedITD = 10, - kTPOHCIReturnTransactions = 11, - kTPOHCIMessage = 12, - KTPOHCISuspendUSBBus = 13, - KTPOHCIResumeUSBBus = 14, - KTPOHCIResetControllerState = 15, - KTPOHCIRestartControllerFromReset = 16, - KTPOHCIEnableInterrupts = 17, - KTPOHCIDozeController = 18, - KTPOHCIWakeControllerFromDoze = 19, - KTPOHCIPowerState = 20, - kTPOHCIDoneQueueCompletion = 21 - }; - - // USB OHCI Interrupt Tracepoints - // kUSBTOHCIInterrupts - enum - { - kTPOHCIInterruptsPollInterrupts = 1, - kTPOHCIInterruptsPrimaryInterruptFilter = 2, - kTPOHCIUpdateFrameList = 3 - }; - - - // USB HubPolicyMaker Tracepoints - // kUSBTHubPolicyMaker - enum - { - kTPSetPowerState = 1 - }; - - // USB CompositeDriver Tracepoints - // kUSBTCompositeDriver - enum - { - kTPCompositeDriverConfigureDevice = 1 - }; - - // USB USB OutstandingIO Tracepoints - // kUSBTOutstandingIO - enum - { - kTPDeviceUCDecrement = 1, - kTPDeviceUCIncrement = 2, - kTPInterfaceUCDecrement = 3, - kTPInterfaceUCIncrement = 4, - kTPHubDecrement = 5, - kTPHubIncrement = 6, - kTPHIDDecrement = 7, - kTPHIDIncrement = 8 - }; - - // USB Audio driver Tracepoints - // kUSBAudio - enum - { - kTPAudioDriverRead = 1, - kTPAudioDriverCoalesceInputSamples = 2, - kTPAudioDriverCoalesceError = 3, - kTPAudioDriverCoalesce = 4, - kTPAudioDriverReadHandler = 5, - kTPAudioDriverCoalesceError2 = 6, - kTPAudioDriverConvertInputSamples = 7 - }; - - // Tracepoint macros. -#define USB_TRACE(USBClass, code, funcQualifier) ( ( ( DBG_IOKIT & 0xFF ) << 24) | ( ( DBG_IOUSB & 0xFF ) << 16 ) | ( ( USBClass & 0x3F ) << 10 ) | ( ( code & 0xFF ) << 2 ) | ( funcQualifier & 0x3 ) ) - -#define kTPAllUSB USB_TRACE ( 0, 0, 0 ) - -#define USB_CONTROLLER_TRACE(code) USB_TRACE( kUSBTController, code, DBG_FUNC_NONE ) -#define USB_CONTROLLER_UC_TRACE(code) USB_TRACE( kUSBTControllerUserClient, code, DBG_FUNC_NONE ) -#define USB_DEVICE_TRACE(code) USB_TRACE( kUSBTDevice, code, DBG_FUNC_NONE ) -#define USB_DEVICE_UC_TRACE(code) USB_TRACE( kUSBTDeviceUserClient, code, DBG_FUNC_NONE ) - -#define USB_HUB_TRACE(code) USB_TRACE( kUSBTHub, code, DBG_FUNC_NONE ) -#define USB_HUB_PORT_TRACE(code) USB_TRACE( kUSBTHubPort, code, DBG_FUNC_NONE ) -#define USB_HUB_UC_TRACE(code) USB_TRACE( kUSBTHSHubUserClient, code, DBG_FUNC_NONE ) -#define USB_HID_TRACE(code) USB_TRACE( kUSBTHID, code, DBG_FUNC_NONE ) -#define USB_PIPE_TRACE(code) USB_TRACE( kUSBTPipe, code, DBG_FUNC_NONE ) - -#define USB_INTERFACE_UC_TRACE(code) USB_TRACE( kUSBTInterfaceUserClient, code, DBG_FUNC_NONE ) - -#define USB_ENUMERATION_TRACE(code) USB_TRACE( kUSBTEnumeration, code, DBG_FUNC_NONE ) - -#define USB_UHCI_TRACE(code) USB_TRACE( kUSBTUHCI, code, DBG_FUNC_NONE ) -#define USB_UHCI_UIM_TRACE(code) USB_TRACE( kUSBTUHCIUIM, code, DBG_FUNC_NONE ) -#define USB_UHCI_INTERRUPTS_TRACE(code) USB_TRACE( kUSBTUHCIInterrupts, code, DBG_FUNC_NONE ) - -#define USB_OHCI_TRACE(code) USB_TRACE( kUSBTOHCI, code, DBG_FUNC_NONE ) -#define USB_OHCI_INTERRUPTS_TRACE(code) USB_TRACE( kUSBTOHCIInterrupts, code, DBG_FUNC_NONE ) - -#define USB_EHCI_TRACE(code) USB_TRACE( kUSBTEHCI, code, DBG_FUNC_NONE ) -#define USB_EHCI_HUBINFO_TRACE(code) USB_TRACE( kUSBTEHCIHubInfo, code, DBG_FUNC_NONE ) -#define USB_EHCI_INTERRUPTS_TRACE(code) USB_TRACE( kUSBTEHCIInterrupts, code, DBG_FUNC_NONE ) - -#define USB_HUB_POLICYMAKER_TRACE(code) USB_TRACE( kUSBTHubPolicyMaker, code, DBG_FUNC_NONE ) -#define USB_COMPOSITE_DRIVER_TRACE(code) USB_TRACE( kUSBTCompositeDriver, code, DBG_FUNC_NONE ) - -#define USB_OUTSTANDING_IO_TRACE(code) USB_TRACE( kUSBTOutstandingIO, code, DBG_FUNC_NONE ) - -#define USB_AUDIO_DRIVER_TRACE(code) USB_TRACE( kUSBAudio, code, DBG_FUNC_NONE ) - -#ifdef KERNEL - -#include <IOKit/IOTimeStamp.h> - -#define USBTrace(USBClass, code, a, b, c, d) { \ - if (gUSBStackDebugFlags & kUSBEnableTracePointsMask) { \ - IOTimeStampConstant( USB_TRACE(USBClass, code, DBG_FUNC_NONE), a, b, c, d ); \ - } \ - } - -#define USBTrace_Start(USBClass, code, a, b, c, d) { \ - if (gUSBStackDebugFlags & kUSBEnableTracePointsMask) { \ - IOTimeStampConstant( USB_TRACE(USBClass, code, DBG_FUNC_START), a, b, c, d ); \ - } \ - } - -#define USBTrace_End(USBClass, code, a, b, c, d) { \ - if (gUSBStackDebugFlags & kUSBEnableTracePointsMask) { \ - IOTimeStampConstant( USB_TRACE(USBClass, code, DBG_FUNC_END), a, b, c, d ); \ - } \ - } - -#endif - - - -#ifdef __cplusplus -} -#endif - - -#endif /* __IOKIT_IO_USB_FAMILY_TRACEPOINTS__ */ diff --git a/i386/include/IOKit/usb/IOUFIStorageServices.h b/i386/include/IOKit/usb/IOUFIStorageServices.h deleted file mode 100644 index cac43f4..0000000 --- a/i386/include/IOKit/usb/IOUFIStorageServices.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_UFI_STORAGE_SERVICES_H_ -#define _IOKIT_UFI_STORAGE_SERVICES_H_ - -#if defined(KERNEL) && defined(__cplusplus) - -#include <IOKit/IOTypes.h> -#include <IOKit/storage/IOBlockStorageDevice.h> -#include <IOKit/usb/IOUSBMassStorageUFISubclass.h> - - -class IOUFIStorageServices : public IOBlockStorageDevice -{ - - OSDeclareDefaultStructors ( IOUFIStorageServices ) - -private: - bool fMediaChanged; - bool fMediaPresent; - -protected: - - IOUSBMassStorageUFIDevice * fProvider; - - UInt64 fMaxReadBlocks; - UInt64 fMaxWriteBlocks; - - virtual bool attach ( IOService * provider ); - virtual void detach ( IOService * provider ); - - // Reserve space for future expansion. - struct IOUFIStorageServicesExpansionData { }; - IOUFIStorageServicesExpansionData *fIOUFIStorageServicesReserved; - -public: - - virtual IOReturn message ( UInt32 type, IOService * provider, void * argument ); - - static void AsyncReadWriteComplete ( void * clientData, - IOReturn status, - UInt64 actualByteCount ); - - // Deprecated - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks, - IOStorageCompletion completion ); - - virtual IOReturn doAsyncReadWrite ( IOMemoryDescriptor * buffer, - UInt64 block, - UInt64 nblks, - IOStorageAttributes * attributes, - IOStorageCompletion * completion ); - - virtual IOReturn doSyncReadWrite ( IOMemoryDescriptor * buffer, - UInt32 block, - UInt32 nblks ); - - virtual IOReturn doEjectMedia ( void ); - - virtual IOReturn doFormatMedia ( UInt64 byteCapacity ); - - virtual UInt32 doGetFormatCapacities ( UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - - virtual IOReturn doLockUnlockMedia ( bool doLock ); - - virtual IOReturn doSynchronizeCache ( void ); - - virtual char * getVendorString ( void ); - - virtual char * getProductString ( void ); - - virtual char * getRevisionString ( void ); - - virtual char * getAdditionalDeviceInfoString ( void ); - - virtual IOReturn reportBlockSize ( UInt64 * blockSize ); - - virtual IOReturn reportEjectability ( bool * isEjectable ); - - virtual IOReturn reportLockability ( bool * isLockable ); - - virtual IOReturn reportMediaState ( bool * mediaPresent, bool * changed ); - - virtual IOReturn reportPollRequirements ( bool * pollIsRequired, - bool * pollIsExpensive ); - - virtual IOReturn reportMaxValidBlock ( UInt64 * maxBlock ); - - virtual IOReturn reportRemovability ( bool * isRemovable ); - - virtual IOReturn reportWriteProtection ( bool * isWriteProtected ); - - virtual IOReturn getWriteCacheState ( bool * enabled ); - - virtual IOReturn setWriteCacheState ( bool enabled ); - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 1 ); - OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 2 ); - OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 3 ); - OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 4 ); - OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 5 ); - OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 6 ); - OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 7 ); - OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 8 ); - -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_UFI_STORAGE_SERVICES_H_ */ diff --git a/i386/include/IOKit/usb/IOUSBBus.h b/i386/include/IOKit/usb/IOUSBBus.h deleted file mode 100644 index a42191a..0000000 --- a/i386/include/IOKit/usb/IOUSBBus.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBBUS_H -#define _IOKIT_IOUSBBUS_H - -#include <IOKit/IOService.h> - -class IOUSBBus : public IOService -{ - OSDeclareAbstractStructors(IOUSBBus) -}; - -#endif /* ! _IOKIT_IOUSBBUS_H */ - diff --git a/i386/include/IOKit/usb/IOUSBCommand.h b/i386/include/IOKit/usb/IOUSBCommand.h deleted file mode 100644 index 0f7c36b..0000000 --- a/i386/include/IOKit/usb/IOUSBCommand.h +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBCOMMAND_H -#define _IOKIT_IOUSBCOMMAND_H - -#include <IOKit/IOCommand.h> -#include <IOKit/IOCommandPool.h> -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IODMACommand.h> -#include <IOKit/usb/USB.h> - -/* - * USB Command - * This is the command block for a USB command to be queued on the - * Command Gate of the WorkLoop. Although the actual work of creating - * the command and enqueueing it is done for them via the deviceRequest, - * read, and write methods, this is the primary way that devices will get - * work done. - * Note: This is private to IOUSBController and should be moved to a - * private header. - */ - -typedef enum { - DEVICE_REQUEST, // Device request using pointer - READ, - WRITE, - CREATE_EP, - DELETE_EP, - DEVICE_REQUEST_DESC, // Device request using descriptor - DEVICE_REQUEST_BUFFERCOMMAND // Device request using a second IOUSBCommand in _bufferCommand -} usbCommand; - - - -/*! - @class IOUSBCommand - @abstract A subclass of IOCommand that is used to add USB specific data. - */ -class IOUSBCommand : public IOCommand -{ - OSDeclareAbstractStructors(IOUSBCommand) - -protected: - usbCommand _selector; - IOUSBDeviceRequestPtr _request; - USBDeviceAddress _address; - UInt8 _endpoint; - UInt8 _direction; - UInt8 _type; - bool _bufferRounding; - IOMemoryDescriptor * _buffer; - IOUSBCompletion _uslCompletion; - IOUSBCompletion _clientCompletion; - UInt32 _dataRemaining; // For Control transfers - UInt8 _stage; // For Control transfers - IOReturn _status; - IOMemoryDescriptor * _origBuffer; - IOUSBCompletion _disjointCompletion; - IOByteCount _dblBufLength; - UInt32 _noDataTimeout; - UInt32 _completionTimeout; - UInt32 _UIMScratch[10]; - - struct ExpansionData - { - IOByteCount _reqCount; - IOMemoryDescriptor *_requestMemoryDescriptor; - IOMemoryDescriptor *_bufferMemoryDescriptor; - bool _multiTransferTransaction; - bool _finalTransferInTransaction; - bool _useTimeStamp; - AbsoluteTime _timeStamp; - bool _isSyncTransfer; // Returns true if the command is used for a synchronous transfer - IODMACommand *_dmaCommand; // used to get memory mapping - IOUSBCommand *_bufferUSBCommand; // points to another IOUSBCommand used for phase 2 of control transactions - IOUSBCommand *_masterUSBCommand; // points from the bufferUSBCommand back to the parent command - }; - ExpansionData * _expansionData; - - // we override these OSObject method in order to allocate and release our expansion data - virtual bool init(); - virtual void free(); - -public: - - // static constructor - static IOUSBCommand * NewCommand(void); - - // Manipulators - void SetSelector(usbCommand sel); - void SetRequest(IOUSBDeviceRequestPtr req); - void SetAddress(USBDeviceAddress addr); - void SetEndpoint(UInt8 ep); - void SetDirection(UInt8 dir); - void SetType(UInt8 type); - void SetBufferRounding(bool br); - void SetBuffer(IOMemoryDescriptor *buf); - void SetUSLCompletion(IOUSBCompletion completion); - void SetClientCompletion(IOUSBCompletion completion); - void SetDataRemaining(UInt32 dr); - void SetStage(UInt8 stage); - void SetStatus(IOReturn stat); - void SetOrigBuffer(IOMemoryDescriptor *buf); - void SetDisjointCompletion(IOUSBCompletion completion); - void SetDblBufLength(IOByteCount len); - void SetNoDataTimeout(UInt32 to); - void SetCompletionTimeout(UInt32 to); - void SetUIMScratch(UInt32 index, UInt32 value); - void SetReqCount(IOByteCount reqCount); - void SetRequestMemoryDescriptor(IOMemoryDescriptor *requestMemoryDescriptor); - void SetBufferMemoryDescriptor(IOMemoryDescriptor *bufferMemoryDescriptor); - void SetMultiTransferTransaction(bool); - void SetFinalTransferInTransaction(bool); - void SetUseTimeStamp(bool); - void SetTimeStamp(AbsoluteTime timeStamp); - void SetIsSyncTransfer(bool); - inline void SetDMACommand(IODMACommand *dmaCommand) { _expansionData->_dmaCommand = dmaCommand; } - void SetBufferUSBCommand(IOUSBCommand *bufferUSBCommand); - - // Accessors - usbCommand GetSelector(void); - IOUSBDeviceRequestPtr GetRequest(void); - USBDeviceAddress GetAddress(void); - UInt8 GetEndpoint(void); - UInt8 GetDirection(void); - UInt8 GetType(void); - bool GetBufferRounding(void); - IOMemoryDescriptor * GetBuffer(void); - IOUSBCompletion GetUSLCompletion(void); - IOUSBCompletion GetClientCompletion(void); - UInt32 GetDataRemaining(void); - UInt8 GetStage(void); - IOReturn GetStatus(void); - IOMemoryDescriptor * GetOrigBuffer(void); - IOUSBCompletion GetDisjointCompletion(void); - IOByteCount GetDblBufLength(void); - UInt32 GetNoDataTimeout(void); - UInt32 GetCompletionTimeout(void); - UInt32 GetUIMScratch(UInt32 index); - IOByteCount GetReqCount(void); - IOMemoryDescriptor * GetRequestMemoryDescriptor(void); - IOMemoryDescriptor * GetBufferMemoryDescriptor(void); - bool GetMultiTransferTransaction(void); - bool GetFinalTransferInTransaction(void); - bool GetUseTimeStamp(void); - AbsoluteTime GetTimeStamp(void); - bool GetIsSyncTransfer(void); - inline IODMACommand * GetDMACommand(void) {return _expansionData->_dmaCommand; } - inline IOUSBCommand * GetBufferUSBCommand(void) {return _expansionData->_bufferUSBCommand; } -}; - - -class IOUSBIsocCommand : public IOCommand -{ - OSDeclareAbstractStructors(IOUSBIsocCommand) - -protected: - usbCommand _selector; - USBDeviceAddress _address; - UInt8 _endpoint; - UInt8 _direction; - IOMemoryDescriptor * _buffer; - IOUSBIsocCompletion _completion; - UInt64 _startFrame; - UInt32 _numFrames; - IOUSBIsocFrame * _frameList; - IOReturn _status; - - struct ExpansionData - { - UInt32 _updateFrequency; - bool _useTimeStamp; - AbsoluteTime _timeStamp; - bool _isSyncTransfer; // Returns true if the command is used for a synchronous transfer - bool _rosettaClient; - IODMACommand * _dmaCommand; - IOUSBIsocCompletion _uslCompletion; - bool _lowLatency; - }; - ExpansionData * _expansionData; - - // we override these OSObject method in order to allocate and release our expansion data - virtual bool init(); - virtual void free(); - -public: - // static constructor - static IOUSBIsocCommand *NewCommand(void); - - // Manipulators - void SetSelector(usbCommand sel) {_selector = sel; } - void SetAddress(USBDeviceAddress addr) {_address = addr; } - void SetEndpoint(UInt8 ep) {_endpoint = ep; } - void SetDirection(UInt8 dir) {_direction = dir; } - void SetBuffer(IOMemoryDescriptor *buf) {_buffer = buf; } - void SetCompletion(IOUSBIsocCompletion completion) {_completion = completion; } - void SetStartFrame(UInt64 sf) {_startFrame = sf; } - void SetNumFrames(UInt32 nf) {_numFrames = nf; } - void SetFrameList(IOUSBIsocFrame *fl) {_frameList = fl; } - void SetStatus(IOReturn stat) {_status = stat; } - void SetUpdateFrequency( UInt32 fr) { _expansionData->_updateFrequency = fr; } - void SetUseTimeStamp(bool useIt) { _expansionData->_useTimeStamp= useIt; } - void SetTimeStamp(AbsoluteTime timeStamp) { _expansionData->_timeStamp= timeStamp; } - void SetIsSyncTransfer(bool isSync) { _expansionData->_isSyncTransfer = isSync; } - void SetRosettaClient(bool isRosetta) { _expansionData->_rosettaClient = isRosetta; } - void SetDMACommand(IODMACommand *dmaCommand) { _expansionData->_dmaCommand = dmaCommand; } - void SetUSLCompletion(IOUSBIsocCompletion completion) { _expansionData->_uslCompletion = completion; } - void SetLowLatency(bool lowLatency) { _expansionData->_lowLatency = lowLatency; } - - // Accessors - usbCommand GetSelector(void) { return _selector; } - USBDeviceAddress GetAddress(void) { return _address; } - UInt8 GetEndpoint(void) { return _endpoint; } - UInt8 GetDirection(void) { return _direction; } - IOMemoryDescriptor * GetBuffer(void) { return _buffer; } - IOUSBIsocCompletion GetCompletion(void) { return _completion; } - UInt64 GetStartFrame(void) { return _startFrame; } - UInt32 GetNumFrames(void) { return _numFrames; } - IOUSBIsocFrame * GetFrameList(void) { return _frameList; } - UInt32 GetUpdateFrequency(void) { return _expansionData->_updateFrequency; } - IOReturn GetStatus(void) { return _status; } - bool GetUseTimeStamp(void) { return _expansionData->_useTimeStamp; } - AbsoluteTime GetTimeStamp(void) { return _expansionData->_timeStamp; } - bool GetIsSyncTransfer(void) { return _expansionData->_isSyncTransfer; } - bool GetIsRosettaClient(void) { return _expansionData->_rosettaClient; } - IODMACommand * GetDMACommand(void) { return _expansionData->_dmaCommand; } - IOUSBIsocCompletion GetUSLCompletion(void) { return _expansionData->_uslCompletion; } - bool GetLowLatency(void) { return _expansionData->_lowLatency; } -}; - -class IOUSBCommandPool : public IOCommandPool -{ - OSDeclareDefaultStructors( IOUSBCommandPool ) - -protected: - virtual IOReturn gatedReturnCommand(IOCommand * command); - virtual IOReturn gatedGetCommand(IOCommand ** command, bool blockForCommand); - -public: - static IOCommandPool * withWorkLoop(IOWorkLoop * inWorkLoop); -}; - - -#endif - diff --git a/i386/include/IOKit/usb/IOUSBCompositeDriver.h b/i386/include/IOKit/usb/IOUSBCompositeDriver.h deleted file mode 100644 index ef72cf4..0000000 --- a/i386/include/IOKit/usb/IOUSBCompositeDriver.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1998-2006 Apple Computer, Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBCompositeDriver_H -#define _IOKIT_IOUSBCompositeDriver_H - -//================================================================================================ -// -// Headers -// -//================================================================================================ -// -#include <libkern/OSByteOrder.h> -#include <IOKit/IOLib.h> -#include <IOKit/IONotifier.h> -#include <IOKit/IOService.h> -#include <IOKit/IOMessage.h> -#include <IOKit/usb/IOUSBBus.h> -#include <IOKit/usb/IOUSBDevice.h> -#include <IOKit/usb/IOUSBInterface.h> -#include <IOKit/usb/IOUSBLog.h> -#include <IOKit/usb/USB.h> - - -//================================================================================================ -// -// Class Declaration for IOUSBCompositeDriver -// -//================================================================================================ -// -/*! - @class IOUSBCompositeDriver - @abstract Driver that matches to USB composite devices. - @discussion This class can be overriden to provide for specific behaviors. The driver itself essentially - just calls SetConfiguration(). - */ -class IOUSBCompositeDriver : public IOService -{ - OSDeclareDefaultStructors(IOUSBCompositeDriver) - - IOUSBDevice * fDevice; - IONotifier * fNotifier; - bool fExpectingClose; - UInt8 fConfigValue; - UInt8 fConfigbmAttributes; - - struct IOUSBCompositeDriverExpansionData - { - }; - - IOUSBCompositeDriverExpansionData * fIOUSBCompositeExpansionData; - - static IOReturn CompositeDriverInterestHandler( void * target, void * refCon, UInt32 messageType, IOService * provider, void * messageArgument, vm_size_t argSize ); - -public: - - // IOService Methods - // - virtual bool start(IOService * provider); - virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); - virtual bool willTerminate( IOService * provider, IOOptionBits options ); - virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer ); - - // IOUSBCompositeDriver Methods - // - virtual bool ConfigureDevice(); - virtual IOReturn ReConfigureDevice(); - /*! - @function SetConfiguration - @abstract Call IOUSBDevice to do a SetConfiguration call to the device. - @param configValue The desired configuration value. - @param startInterfaceMatching A boolean specifying whether IOKit should begin the process of finding - matching drivers for the new IOUSBInterface objects. - */ - virtual IOReturn SetConfiguration(UInt8 configValue, bool startInterfaceMatching=true); - - // Getters - // - bool GetExpectingClose() { return fExpectingClose; } - UInt8 GetConfigValue() { return fConfigValue; } - UInt8 GetConfigbmAttributes() { return fConfigbmAttributes; } - IONotifier * GetNotifier() { return fNotifier; } - - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 0); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 1); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 2); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 3); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 4); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 5); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 6); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 7); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 8); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 9); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 10); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 11); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 12); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 13); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 14); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 15); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 16); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 17); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 18); - OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 19); -}; - -#endif _IOKIT_IOUSBCompositeDriver_H diff --git a/i386/include/IOKit/usb/IOUSBController.h b/i386/include/IOKit/usb/IOUSBController.h deleted file mode 100644 index 18940f2..0000000 --- a/i386/include/IOKit/usb/IOUSBController.h +++ /dev/null @@ -1,1073 +0,0 @@ -/* - * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.2 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBCONTROLLER_H -#define _IOKIT_IOUSBCONTROLLER_H - -//================================================================================================ -// -// Headers -// -//================================================================================================ -// -#include <libkern/c++/OSArray.h> - -#include <IOKit/IOService.h> -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IODeviceMemory.h> -#include <IOKit/IOWorkLoop.h> -#include <IOKit/IOCommandGate.h> -#include <IOKit/IOCommandPool.h> - -#include <IOKit/usb/USB.h> -#include <IOKit/usb/USBHub.h> -#include <IOKit/usb/IOUSBBus.h> -#include <IOKit/usb/IOUSBNub.h> -#include <IOKit/usb/IOUSBCommand.h> -#include <IOKit/usb/IOUSBWorkLoop.h> - - -//================================================================================================ -// -// Types and Constants -// -//================================================================================================ -// -enum -{ - kErrataCMDDisableTestMode = (1 << 0), // turn off UHCI test mode - kErrataOnlySinglePageTransfers = (1 << 1), // Don't cross page boundaries in a single transfer - kErrataRetryBufferUnderruns = (1 << 2), // Don't cross page boundaries in a single transfer - kErrataLSHSOpti = (1 << 3), // Don't cross page boundaries in a single transfer - kErrataDisableOvercurrent = (1 << 4), // Always set the NOCP bit in rhDescriptorA register - kErrataLucentSuspendResume = (1 << 5), // Don't allow port suspend at the root hub - kErrataNeedsWatchdogTimer = (1 << 6), // Use Watchdog timer to reset confused controllers - kErrataNeedsPortPowerOff = (1 << 7), // Power off the ports and back on again to clear weird status. - kErrataAgereEHCIAsyncSched = (1 << 8), // needs workaround for Async Sched bug - kErrataNECOHCIIsochWraparound = (1 << 9), // needs workaround for NEC isoch buffer wraparound problem - kErrataNECIncompleteWrite = (1 << 10), // needs workaround for NEC bits not sticking (errata IBB-2UE-00030 Jun 23 2005) - kErrataICH6PowerSequencing = (1 << 11), // needs special power sequencing for early Transition machines - kErrataICH7ISTBuffer = (1 << 12), // buffer for Isochronous Scheduling Threshold - kErrataUHCISupportsOvercurrent = (1 << 13), // UHCI controller supports overcurrent detection - kErrataNeedsOvercurrentDebounce = (1 << 14), // The overcurrent indicator should be debounced by 10ms - kErrataSupportsPortResumeEnable = (1 << 15), // UHCI has resume enable bits at config address 0xC4 - kErrataNoCSonSplitIsoch = (1 << 16), // MCP79 - split iscoh is a little different - kErrataOHCINoGlobalSuspendOnSleep = (1 << 17), // when sleeping, do not put the OHCI controller in SUSPEND state. just leave it Operational with suspended downstream ports - kErrataMissingPortChangeInt = (1 << 18), // sometimes the port change interrupt may be missing - kErrataMCP79IgnoreDisconnect = (1 << 19), // MCP79 - need to ignore a connect/disconnect on wake - kErrataUse32bitEHCI = (1 << 20) , // MCP79 - EHCI should only run with 32 bit DMA addresses - kErrataUHCISupportsResumeDetectOnConnect = (1 << 21), // UHCI controller will generate a ResumeDetect interrupt while in Global Suspend if a device is plugged in - kErrataDontUseCompanionController = (1 << 22) // For systems which will end up being EHCI only -}; - -enum -{ - kUSBWatchdogTimeoutMS = 1000 -}; - - -/*! - @struct - @discussion This table contains the list of errata that are necessary for known problems with particular devices. - The format is vendorID, product ID, lowest revisionID needing errata, highest rev needing errata, errataBits. - The result of all matches is ORed together, so more than one entry may match. - Typically for a given errata a list of revisions that this applies to is supplied. - @field vendID The Vendor ID of the device - @field deviceID Product ID of device - @field revisionLo Lowest product revsion to apply errata to - @field revisionHi Highest product revision to apply errata to - @field errata Bit field flagging which errata to apply to device. -*/ - -struct ErrataListEntryStruct -{ - UInt16 vendID; - UInt16 deviceID; - UInt16 revisionLo; - UInt16 revisionHi; - UInt32 errata; -}; - -typedef struct ErrataListEntryStruct ErrataListEntry, *ErrataListEntryPtr; - - -//================================================================================================ -// -// Routines used to implement synchronous I/O -// -//================================================================================================ -// -void IOUSBSyncCompletion(void *target, void * parameter, IOReturn status, UInt32 bufferSizeRemaining); - -void IOUSBSyncIsoCompletion(void *target, void * parameter, IOReturn status, IOUSBIsocFrame *pFrames); - - -//================================================================================================ -// -// Forward Declarations -// -//================================================================================================ -// -class IOUSBDevice; -class IOUSBLog; -class IOUSBHubDevice; -class IOUSBRootHubDevice; -class IOMemoryDescriptor; - - -//================================================================================================ -// -// IOUSBController Class -// -//================================================================================================ -// -/*! - @class IOUSBController - @abstract Base class for USB hardware driver - @discussion Not many directly useful methods for USB device driver writers, - IOUSBDevice, IOUSBInterface and IOUSBPipe provide more useful abstractions. - The bulk of this class interfaces between IOKit and the low-level UIM, which is - based on the MacOS9 UIM. To impliment a new controller type, subclass - IOUSBController and impiment all the "UIM functions". AppleUSBOHCI - is an example of this implementing all the functions necessary to drive an - OHCI controller. -*/ -class IOUSBController : public IOUSBBus -{ - OSDeclareAbstractStructors(IOUSBController) - friend class IOUSBControllerV2; - friend class IOUSBControllerV3; - -protected: - - IOUSBWorkLoop * _workLoop; - IOCommandGate * _commandGate; - IOUSBRootHubDevice * _rootHubDevice; - UInt32 _devZeroLock; - static UInt32 _busCount; - static bool gUsedBusIDs[256]; - - struct ExpansionData - { - IOCommandPool *freeUSBCommandPool; - IOCommandPool *freeUSBIsocCommandPool; - IOTimerEventSource *watchdogUSBTimer; - bool _terminating; - bool _watchdogTimerActive; - bool _pcCardEjected; // Obsolete - UInt32 _busNumber; - UInt32 _currentSizeOfCommandPool; - UInt32 _currentSizeOfIsocCommandPool; - UInt8 _controllerSpeed; // Controller speed, passed down for splits - thread_call_t _terminatePCCardThread; // Obsolete - bool _addressPending[128]; - SInt32 _activeIsochTransfers; // isochronous transfers in the queue - IOService *_provider; // common name for our provider - bool _controllerCanSleep; // true iff the controller is able to support sleep/wake - bool _needToClose; - UInt32 _isochMaxBusStall; // value (in ns) of the maximum PCI bus stall allowed for Isoch.. - }; - ExpansionData *_expansionData; - - // The following methods do not use and upper case initial letter because they are part of IOKit - // - -public: - virtual bool init( OSDictionary * propTable ); - virtual bool start( IOService * provider ); - virtual void stop( IOService * provider ); - virtual bool finalize(IOOptionBits options); - virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); - virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer ); - -protected: - - IOReturn getNubResources( IOService * regEntry ); - - virtual UInt32 GetErrataBits( - UInt16 vendorID, - UInt16 deviceID, - UInt16 revisionID ); - - - static IOReturn DoDeleteEP( - OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - - static IOReturn DoAbortEP( - OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - - static IOReturn DoClearEPStall( - OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - - static IOReturn DoCreateEP( - OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - static IOReturn DoControlTransfer( - OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - - static IOReturn DoIOTransfer( - OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - - static IOReturn DoIsocTransfer( - OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - - static IOReturn DoLowLatencyIsocTransfer( - OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - - static void ControlPacketHandler( - OSObject * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining ); - - static void InterruptPacketHandler( - OSObject * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining ); - - static void BulkPacketHandler( - OSObject * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining ); - - static void IsocCompletionHandler( - OSObject * target, - void * parameter, - IOReturn status, - IOUSBIsocFrame *pFrames ); - - static void LowLatencyIsocCompletionHandler( - OSObject * target, - void * parameter, - IOReturn status, - IOUSBLowLatencyIsocFrame *pFrames ); - - static void WatchdogTimer(OSObject *target, IOTimerEventSource *sender); - - // Obsolete - static void TerminatePCCard(OSObject *target); - - static IOReturn ProtectedDevZeroLock(OSObject *target, void* lock, void *, void *, void*); - - - USBDeviceAddress GetNewAddress( void ); - - IOReturn ControlTransaction( IOUSBCommand * command ); - - IOReturn InterruptTransaction( IOUSBCommand * command ); - - IOReturn BulkTransaction( IOUSBCommand * command ); - - IOReturn IsocTransaction( IOUSBIsocCommand * command ); - - IOReturn LowLatencyIsocTransaction( IOUSBIsocCommand * command ); - - void FreeCommand( IOUSBCommand * command ); - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Invokes the specified completion action of the request. If - // the completion action is unspecified, no action is taken. - void Complete( - IOUSBCompletion completion, - IOReturn status, - UInt32 actualByteCount = 0 ); - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Invokes the specified completion action of the request. If - // the completion action is unspecified, no action is taken. - void CompleteWithTimeStamp ( - IOUSBCompletionWithTimeStamp completion, - IOReturn status, - UInt32 actualByteCount, - AbsoluteTime timeStamp); - - - - // - // UIM methods - // - -/*! - @function UIMInitialize - @abstract UIM function, initialise the controller and UIM data structures. -*/ - virtual IOReturn UIMInitialize( IOService * provider ) = 0; - -/*! - @function UIMFinalize - @abstract UIM function, finalise the controller and UIM data structures prior to removal. -*/ - virtual IOReturn UIMFinalize() = 0; - - // Control -/*! - @function UIMCreateControlEndpoint - @abstract UIM function, create a control endpoint for the controller. - @param functionNumber The USB device ID of the device for this endpoint - @param endpointNumber The endpoint number for this endpoint - @param maxPacketSize Maximum packet size of this endpoint - @param speed speed of the device: kUSBDeviceSpeedLow or kUSBDeviceSpeedFull -*/ - virtual IOReturn UIMCreateControlEndpoint( - UInt8 functionNumber, - UInt8 endpointNumber, - UInt16 maxPacketSize, - UInt8 speed) = 0; - -/* Note: this function has been superceded. */ - virtual IOReturn UIMCreateControlTransfer( short functionNumber, - short endpointNumber, - IOUSBCompletion completion, - void * CBP, - bool bufferRounding, - UInt32 bufferSize, - short direction) = 0; - -/*! - @function UIMCreateControlTransfer - @abstract UIM function, Do a transfer on a control endpoint. - This method supercedes the method which takes a void * parameter. - @param functionNumber The USB device ID of the device to perform the transaction with - @param endpointNumber The endpoint number for the transaction - @param completion Action to perform when I/O completes - @param CBP Memory descriptor describing the buffer to transfer. Will never describe - memory which has disjoint packets. - @param bufferRounding If true, short packets are OK and do not cause an error - @param bufferSize Size of the data to transfer in the data phase. (C - @param direction Specifies direction and PID for transaction. kUSBIn, KUSBOut (DATA PID) or kUSBSetup (SETUP PID). -*/ - virtual IOReturn UIMCreateControlTransfer( short functionNumber, - short endpointNumber, - IOUSBCompletion completion, - IOMemoryDescriptor * CBP, - bool bufferRounding, - UInt32 bufferSize, - short direction) = 0; - - // Bulk -/*! - @function UIMCreateBulkEndpoint - @abstract UIM function, create a bulk endpoint for the controller. - @param functionNumber The USB device ID of the device for this endpoint - @param endpointNumber The endpoint number for this endpoint - @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. - @param speed speed of the device: kUSBDeviceSpeedLow or kUSBDeviceSpeedFull - @param maxPacketSize Maximum packet size of this endpoint -*/ - virtual IOReturn UIMCreateBulkEndpoint( - UInt8 functionNumber, - UInt8 endpointNumber, - UInt8 direction, - UInt8 speed, - UInt8 maxPacketSize) = 0; - -/* Note: this function has been superceded. */ - virtual IOReturn UIMCreateBulkTransfer( short functionNumber, - short endpointNumber, - IOUSBCompletion completion, - IOMemoryDescriptor * CBP, - bool bufferRounding, - UInt32 bufferSize, - short direction) = 0; - - // Interrupt -/*! - @function UIMCreateInterruptEndpoint - @abstract UIM function, create an interrupt endpoint for the controller. - @param functionNumber The USB device ID of the device for this endpoint - @param endpointNumber The endpoint number for this endpoint - @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. - @param speed speed of the device: kUSBDeviceSpeedLow or kUSBDeviceSpeedFull - @param maxPacketSize Maximum packet size of this endpoint - @param pollingRate The maximum polling interval from the endpoint descriptor. -*/ - virtual IOReturn UIMCreateInterruptEndpoint( - short functionAddress, - short endpointNumber, - UInt8 direction, - short speed, - UInt16 maxPacketSize, - short pollingRate) = 0; - -/* Note: this function has been superceded. */ - virtual IOReturn UIMCreateInterruptTransfer( short functionNumber, - short endpointNumber, - IOUSBCompletion completion, - IOMemoryDescriptor * CBP, - bool bufferRounding, - UInt32 bufferSize, - short direction) = 0; - - // Isoch -/*! - @function UIMCreateIsochEndpoint - @abstract Create an Isochronous endpoint in the controller. - @param functionNumber The USB device ID of the device for this endpoint - @param endpointNumber The endpoint number for this endpoint - @param maxPacketSize Maximum packet size of this endpoint - @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. -*/ - virtual IOReturn UIMCreateIsochEndpoint( - short functionAddress, - short endpointNumber, - UInt32 maxPacketSize, - UInt8 direction) = 0; - -/*! - @function UIMCreateIsochTransfer - @abstract UIM function, Do a transfer on an Isocchronous endpoint. - @param functionNumber The USB device ID of the device to perform the transaction with - @param endpointNumber The endpoint number for the transaction - @param completion Action to perform when I/O completes - @param direction Specifies direction for transfer. kUSBIn or KUSBOut. - @param frameStart The frame number in which to start the transactions - @param pBuffer describes memory buffer. - @param frameCount number of frames to do transactions in - @param pFrames Describes transactions in individual frames, gives sizes and reults for transactions. -*/ - virtual IOReturn UIMCreateIsochTransfer( - short functionAddress, - short endpointNumber, - IOUSBIsocCompletion completion, - UInt8 direction, - UInt64 frameStart, - IOMemoryDescriptor * pBuffer, - UInt32 frameCount, - IOUSBIsocFrame *pFrames) = 0; - -/*! - @function UIMAbortEndpoint - @abstract UIM function Abort the specified endpoint, return all transactions queued on it. - @param functionNumber The USB device ID of the device to Abort - @param endpointNumber The endpoint number to Abort - @param direction Specifies direction of the endpoint for uniqueness. kUSBIn or KUSBOut. -*/ - virtual IOReturn UIMAbortEndpoint( - short functionNumber, - short endpointNumber, - short direction) = 0; - -/*! - @function UIMDeleteEndpoint - @abstract UIM function Delete the specified endpoint, returning all transactions queued on it. - @param functionNumber The USB device ID of the device to Delete - @param endpointNumber The endpoint number to Delete - @param direction Specifies direction of the endpoint for uniqueness. kUSBIn or KUSBOut. -*/ - virtual IOReturn UIMDeleteEndpoint( - short functionNumber, - short endpointNumber, - short direction) = 0; - -/*! - @function UIMClearEndpointStall - @abstract UIM function Clear stall on the specified endpoint, set data toggle to zero, - return all transactions queued on it. - @param functionNumber The USB device ID of the device to Clear - @param endpointNumber The endpoint number to Clear - @param direction Specifies direction of the endpoint for uniqueness. kUSBIn or KUSBOut. -*/ - virtual IOReturn UIMClearEndpointStall( - short functionNumber, - short endpointNumber, - short direction) = 0; - -/*! - @function UIMRootHubStatusChange - @abstract UIM function UIMRootHubStatusChange - This method was internal to the UIM (never called by the superclass) until - IOUSBControllerV3. For UIMs which are a subclass of IOUSBController or IOUSBControllerV2, it can - still be used internally only. For subclasses of IOUSBControllerV3, however, the meaning has changed - slightly. Now, it is used to determine if there is a status change on the root hub, and if so, it - needs to update the IOUSBControllerV3 instance variable _rootHubStatusChangedBitmap -*/ - virtual void UIMRootHubStatusChange(void) = 0; - - static const IORegistryPlane *gIOUSBPlane; - -public: - - static IOUSBLog *_log; - - IOCommandGate * GetCommandGate(void); - - /*! - @struct Endpoint - Describes an endpoint of a device. - Simply an easier to use version of the endpoint descriptor. - @field descriptor The raw endpoint descriptor. - @field number Endpoint number - @field direction Endpoint direction: kUSBOut, kUSBIn, kUSBAnyDirn - @field transferType Type of endpoint: kUSBControl, kUSBIsoc, kUSBBulk, kUSBInterrupt - @field maxPacketSize Maximum packet size for endpoint - @field interval Polling interval in milliseconds (only relevent for Interrupt endpoints) - */ - struct Endpoint { - IOUSBEndpointDescriptor * descriptor; - UInt8 number; - UInt8 direction; // in, out - UInt8 transferType; // cntrl, bulk, isoc, int - UInt16 maxPacketSize; - UInt8 interval; - }; - - // Implements IOService::getWorkLoop const member function - virtual IOWorkLoop * getWorkLoop() const; - - /* - * Root hub methods - * Only of interest to the IOUSBRootHubDevice object - */ -/*! - @function GetRootHubDeviceDescriptor - @abstract UIM function, return the device descriptor of the simulated root hub device - As GET_DESCRIPTOR control request for device descrptor - @param desc Descriptor structure to return data in -*/ - virtual IOReturn GetRootHubDeviceDescriptor( IOUSBDeviceDescriptor *desc ) = 0; - -/*! - @function GetRootHubDescriptor - @abstract UIM function, return the hub descriptor of the simulated root hub device - As GET_DESCRIPTOR control request for hub descrptor - @param desc Descriptor structure to return data in -*/ - virtual IOReturn GetRootHubDescriptor( IOUSBHubDescriptor *desc ) = 0; - -/*! - @function SetRootHubDescriptor - @abstract UIM function, optional. Set the hub descriptor data. - As SET_DESCRIPTOR control request for hub descrptor - @param buffer Descriptor data -*/ - virtual IOReturn SetRootHubDescriptor( OSData *buffer ) = 0; - -/*! - @function GetRootHubConfDescriptor - @abstract UIM function, retrun the configuration descriptor of the simulated root hub device - As GET_DESCRIPTOR control request for configuration descrptor - @param desc Descriptor structure to return data in -*/ - virtual IOReturn GetRootHubConfDescriptor( OSData *desc ) = 0; - -/*! - @function GetRootHubStatus - @abstract UIM function, get the status of the root hub. As GET_STATUS control request to device. - @param status Status structure to return -*/ - virtual IOReturn GetRootHubStatus( IOUSBHubStatus *status ) = 0; - -/*! - @function SetRootHubFeature - @abstract UIM function, set feature of root hub, As SET_FEATURE control request. - @param wValue The feature to set, as would be transferred in wValue field of SETUP packet. -*/ - virtual IOReturn SetRootHubFeature( UInt16 wValue ) = 0; - -/*! - @function ClearRootHubFeature - @abstract UIM function, set feature of root hub, As CLEAR_FEATURE control request. - @param wValue The feature to clear, as would be transferred in wValue field of SETUP packet. -*/ - virtual IOReturn ClearRootHubFeature( UInt16 wValue ) = 0; - -/*! - @function GetRootHubPortStatus - @abstract UIM function, get the status of a root hub port. As GET_STATUS control request to the port. - @param status Status structure to return - @param port Port to get status for. -*/ - virtual IOReturn GetRootHubPortStatus( IOUSBHubPortStatus *status, UInt16 port ) = 0; - -/*! - @function SetRootHubPortFeature - @abstract UIM function, set feature of a root hub port, As SET_FEATURE control request to a port. - @param wValue The feature to set, as would be transferred in wValue field of SETUP packet. - @param port Port to set feature for -*/ - virtual IOReturn SetRootHubPortFeature( UInt16 wValue, UInt16 port ) = 0; - -/*! - @function ClearRootHubPortFeature - @abstract UIM function, clear feature of a root hub port, As CLEAR_FEATURE control request to a port. - @param wValue The feature to clear, as would be transferred in wValue field of SETUP packet. - @param port Port to clear feature for -*/ - virtual IOReturn ClearRootHubPortFeature( UInt16 wValue, UInt16 port ) = 0; - -/*! - @function ClearRootHubPortFeature - @abstract UIM function, Impliments GET_BUS_STATE control request, now obsolete. -*/ - virtual IOReturn GetRootHubPortState( UInt8 *state, UInt16 port ) = 0; - -/*! - @function SetHubAddress - @abstract UIM function, set the address of the simulated root hub device, as SET_ADDRESS - @param wValue New address for root hub. -*/ - virtual IOReturn SetHubAddress( UInt16 wValue ) = 0; - - - /*! - @function openPipe - Open a pipe to the specified device endpoint - @param address Address of the device on the USB bus - @param speed of the device: kUSBHighSpeed or kUSBLowSpeed - @param endpoint description of endpoint to connect to - */ - virtual IOReturn OpenPipe( USBDeviceAddress address, - UInt8 speed, - Endpoint * endpoint ); - /*! - @function closePipe - Close a pipe to the specified device endpoint - @param address Address of the device on the USB bus - @param endpoint description of endpoint - */ - virtual IOReturn ClosePipe( USBDeviceAddress address, - Endpoint * endpoint ); - - // Controlling pipe state - /*! - @function abortPipe - Abort pending I/O to/from the specified endpoint, causing them to complete with return code kIOReturnAborted - @param address Address of the device on the USB bus - @param endpoint description of endpoint - */ - virtual IOReturn AbortPipe( - USBDeviceAddress address, - Endpoint * endpoint ); - /*! - @function resetPipe - Abort pending I/O and clear stalled state - this method is a combination of abortPipe and clearPipeStall - @param address Address of the device on the USB bus - @param endpoint description of endpoint - */ - virtual IOReturn ResetPipe( USBDeviceAddress address, - Endpoint * endpoint ); - /*! - @function clearPipeStall - Clear a pipe stall. - @param address Address of the device on the USB bus - @param endpoint description of endpoint - */ - virtual IOReturn ClearPipeStall( USBDeviceAddress address, - Endpoint * endpoint ); - - // Transferring Data - /*! - @function read - Read from an interrupt or bulk endpoint - @param buffer place to put the transferred data - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been filled - */ - virtual IOReturn Read( IOMemoryDescriptor * buffer, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBCompletion * completion ); - /*! - @function write - Write to an interrupt or bulk endpoint - @param buffer place to get the transferred data - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been emptied - */ - virtual IOReturn Write( IOMemoryDescriptor * buffer, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBCompletion * completion ); - - /*! - @function isocIO - Read from or write to an isochronous endpoint - @param buffer place to put the transferred data - @param frameStart USB frame number of the frame to start transfer - @param numFrames Number of frames to transfer - @param frameList Bytes to transfer and result for each frame - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been filled - */ - virtual IOReturn IsocIO( IOMemoryDescriptor * buffer, - UInt64 frameStart, - UInt32 numFrames, - IOUSBIsocFrame * frameList, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBIsocCompletion * completion ); - /*! - @function deviceRequest - Make a control request to the specified endpoint - There are two versions of this method, one uses a simple void * - to point to the data portion of the transfer, the other uses an - IOMemoryDescriptor to point to the data. - @param request parameter block for the control request - @param completion describes action to take when the request has been executed - @param address Address of the device on the USB bus - @param epNum endpoint number - */ - virtual IOReturn DeviceRequest( IOUSBDevRequest * request, - IOUSBCompletion * completion, - USBDeviceAddress address, - UInt8 epNum ); - - virtual IOReturn DeviceRequest( IOUSBDevRequestDesc * request, - IOUSBCompletion * completion, - USBDeviceAddress address, - UInt8 epNum ); - - /* - * Methods used by the hub driver to initialize a device - */ - /*! - @function AcquireDeviceZero - Get the device zero lock - call this before resetting a device, to ensure there's - only one device with address 0 - */ - virtual IOReturn AcquireDeviceZero( void ); - /*! - @function ReleaseDeviceZero - Release the device zero lock - call this to release the device zero lock, - when there is no longer a device at address 0 - */ - virtual void ReleaseDeviceZero( void ); - - // non-virtual methods - void WaitForReleaseDeviceZero( void ); - IOReturn ConfigureDeviceZero( UInt8 maxPacketSize, UInt8 speed ); - IOReturn GetDeviceZeroDescriptor( IOUSBDeviceDescriptor * desc, UInt16 size ); - IOReturn SetDeviceZeroAddress(USBDeviceAddress address); - IOUSBDevice * MakeDevice(USBDeviceAddress *address); - IOUSBHubDevice * MakeHubDevice(USBDeviceAddress *address); - IOReturn CreateDevice( IOUSBDevice * device, - USBDeviceAddress deviceAddress, - UInt8 maxPacketSize, - UInt8 speed, - UInt32 powerAvailable ); - - /*! - @function GetBandwidthAvailable - Returns the available bandwidth (in bytes) per frame or microframe for - isochronous transfers. - @result maximum number of bytes that a new iso pipe could transfer - per frame given current allocations. - */ - virtual UInt32 GetBandwidthAvailable( void ) = 0; - - /*! - @function GetFrameNumber - Returns the full current frame number. - @result The frame number. - */ - virtual UInt64 GetFrameNumber( void ) = 0; - - /*! - @function GetFrameNumber32 - Returns the least significant 32 bits of the frame number. - @result The lsb 32 bits of the frame number. - */ - virtual UInt32 GetFrameNumber32( void ) = 0; - - // Debugger polled mode - virtual void PollInterrupts( IOUSBCompletionAction safeAction = 0 ) = 0; - - virtual IOReturn PolledRead( - short functionNumber, - short endpointNumber, - IOUSBCompletion completion, - IOMemoryDescriptor * CBP, - bool bufferRounding, - UInt32 bufferSize); - - OSMetaClassDeclareReservedUsed(IOUSBController, 0); - virtual void UIMCheckForTimeouts(void); - - OSMetaClassDeclareReservedUsed(IOUSBController, 1); - virtual IOReturn UIMCreateControlTransfer( short functionNumber, - short endpointNumber, - IOUSBCommand* command, - void* CBP, - bool bufferRounding, - UInt32 bufferSize, - short direction); - - OSMetaClassDeclareReservedUsed(IOUSBController, 2); - virtual IOReturn UIMCreateControlTransfer( short functionNumber, - short endpointNumber, - IOUSBCommand* command, - IOMemoryDescriptor* CBP, - bool bufferRounding, - UInt32 bufferSize, - short direction); - - OSMetaClassDeclareReservedUsed(IOUSBController, 3); -/*! - @function UIMCreateBulkTransfer - @abstract UIM function, Do a transfer on a bulk endpoint. - This method supercedes the method which takes multiple parameters. - @param command paramters for transfer. -*/ - virtual IOReturn UIMCreateBulkTransfer(IOUSBCommand* command); - - OSMetaClassDeclareReservedUsed(IOUSBController, 4); -/*! - @function UIMCreateInterruptTransfer - @abstract UIM function, Do a transfer on an interrupt endpoint. - This method supercedes the method which takes multiple parameters. - @param command paramters for transfer. -*/ - virtual IOReturn UIMCreateInterruptTransfer(IOUSBCommand* command); - - /*! - @function deviceRequest - Make a control request to the specified endpoint - There are two versions of this method, one uses a simple void * - to point to the data portion of the transfer, the other uses an - IOMemoryDescriptor to point to the data. - @param request parameter block for the control request - @param completion describes action to take when the request has been executed - @param address Address of the device on the USB bus - @param epNum endpoint number - */ - OSMetaClassDeclareReservedUsed(IOUSBController, 5); - virtual IOReturn DeviceRequest( IOUSBDevRequest * request, - IOUSBCompletion * completion, - USBDeviceAddress address, - UInt8 epNum, - UInt32 noDataTimeout, - UInt32 completionTimeout ); - - OSMetaClassDeclareReservedUsed(IOUSBController, 6); - virtual IOReturn DeviceRequest( IOUSBDevRequestDesc * request, - IOUSBCompletion * completion, - USBDeviceAddress address, - UInt8 epNum, - UInt32 noDataTimeout, - UInt32 completionTimeout ); - - - - OSMetaClassDeclareReservedUsed(IOUSBController, 7); - /*! - @function read - Read from an interrupt or bulk endpoint - @param buffer place to put the transferred data - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been filled - */ - virtual IOReturn Read( IOMemoryDescriptor * buffer, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBCompletion * completion, - UInt32 noDataTimeout, - UInt32 completionTimeout ); - - OSMetaClassDeclareReservedUsed(IOUSBController, 8); - /*! - @function write - Write to an interrupt or bulk endpoint - @param buffer place to get the transferred data - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been emptied - */ - virtual IOReturn Write( IOMemoryDescriptor * buffer, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBCompletion * completion, - UInt32 noDataTimeout, - UInt32 completionTimeout ); - - // this should really not be using a padding slot, since free is in our superclas, but we shipped this way so now we need to leave it. - OSMetaClassDeclareReservedUsed(IOUSBController, 9); - virtual void free(); - -protected: - -/*! - @function UIMRootHubStatusChange(bool) - @abstract UIM function UIMRootHubStatusChange(bool) - This method was internal to the UIM (never called by the superclass) until - IOUSBControllerV3. For UIMs which are a subclass of IOUSBController or IOUSBControllerV2, it can - still be used internally only. For subclasses of IOUSBControllerV3, however, it has become obsolete - (it still needs to be implemented since it is pure virtual) -*/ - OSMetaClassDeclareReservedUsed(IOUSBController, 10); - virtual void UIMRootHubStatusChange( bool abort ) = 0; - -public: - - OSMetaClassDeclareReservedUsed(IOUSBController, 11); - virtual IOReturn CreateRootHubDevice( IOService * provider, IOUSBRootHubDevice ** rootHubDevice); - - OSMetaClassDeclareReservedUsed(IOUSBController, 12); - /*! - @function Read - Read from an interrupt or bulk endpoint - @param buffer place to put the transferred data - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been filled - @param noDataTimeout number of milliseconds of no data movement before the request is aborted - @param completionTimeout number of milliseonds after the command is on the bus in which it must complete - @param reqCount number of bytes requested for the transfer (must not be greater than the length of the buffer) - */ - virtual IOReturn Read( IOMemoryDescriptor * buffer, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBCompletion * completion, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOByteCount reqCount ); - - OSMetaClassDeclareReservedUsed(IOUSBController, 13); - /*! - @function Write - Write to an interrupt or bulk endpoint - @param buffer place to get the transferred data - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been emptied - @param noDataTimeout number of milliseconds of no data movement before the request is aborted - @param completionTimeout number of milliseonds after the command is on the bus in which it must complete - @param reqCount number of bytes requested for the transfer (must not be greater than the length of the buffer) - */ - virtual IOReturn Write( IOMemoryDescriptor * buffer, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBCompletion * completion, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOByteCount reqCount ); - - OSMetaClassDeclareReservedUsed(IOUSBController, 14); - - virtual IOReturn GetRootHubStringDescriptor(UInt8 index, OSData *desc) = 0; - - OSMetaClassDeclareReservedUsed(IOUSBController, 15); - /*! - @function IsocIO - Read from or write to an isochronous endpoint - @param buffer place to put the transferred data - @param frameStart USB frame number of the frame to start transfer - @param numFrames Number of frames to transfer - @param frameList Bytes to transfer and result for each frame - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been filled - @param updateFrequency describes how often to update the framelist once the transfer has completed (in ms) - */ - virtual IOReturn IsocIO( IOMemoryDescriptor * buffer, - UInt64 frameStart, - UInt32 numFrames, - IOUSBLowLatencyIsocFrame * frameList, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBLowLatencyIsocCompletion * completion, - UInt32 updateFrequency ); - - OSMetaClassDeclareReservedUsed(IOUSBController, 16); - - /*! - @function UIMCreateIsochTransfer - @abstract UIM function, Do a transfer on an Isocchronous endpoint. - @param functionNumber The USB device ID of the device to perform the transaction with - @param endpointNumber The endpoint number for the transaction - @param completion Action to perform when I/O completes - @param direction Specifies direction for transfer. kUSBIn or KUSBOut. - @param frameStart The frame number in which to start the transactions - @param pBuffer describes memory buffer. - @param frameCount number of frames to do transactions in - @param pFrames Describes transactions in individual frames, gives sizes and reults for transactions. - @param updateFrequency Describes how often we update the frameList parameters (in ms) - */ - virtual IOReturn UIMCreateIsochTransfer( - short functionAddress, - short endpointNumber, - IOUSBIsocCompletion completion, - UInt8 direction, - UInt64 frameStart, - IOMemoryDescriptor * pBuffer, - UInt32 frameCount, - IOUSBLowLatencyIsocFrame *pFrames, - UInt32 updateFrequency); - - - OSMetaClassDeclareReservedUsed(IOUSBController, 17); - virtual IOReturn CheckForDisjointDescriptor(IOUSBCommand *command, UInt16 maxPacketSize); - - /*! - @function UIMCreateIsochTransfer - @abstract UIM function, Do a transfer on an Isocchronous endpoint. - @param command an IOUSBIsocCommand object with all the necessary information - */ - OSMetaClassDeclareReservedUsed(IOUSBController, 18); - virtual IOReturn UIMCreateIsochTransfer(IOUSBIsocCommand *command); - - // do not use this slot without first checking bug rdar://6022420 - OSMetaClassDeclareReservedUnused(IOUSBController, 19); - -protected: - void IncreaseIsocCommandPool(); - void IncreaseCommandPool(); - void ParsePCILocation(const char *str, int *deviceNum, int *functionNum); - int ValueOfHexDigit(char c); -}; - -#endif /* ! _IOKIT_IOUSBCONTROLLER_H */ - diff --git a/i386/include/IOKit/usb/IOUSBControllerListElement.h b/i386/include/IOKit/usb/IOUSBControllerListElement.h deleted file mode 100644 index 7351177..0000000 --- a/i386/include/IOKit/usb/IOUSBControllerListElement.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1998-2007 Apple Inc. All Rights Reserved. - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOUSBCONTROLLERLISTELEMENT_H -#define _IOUSBCONTROLLERLISTELEMENT_H - - -#include <libkern/c++/OSObject.h> - -#include <IOKit/IOTypes.h> - -#include <IOKit/usb/USB.h> - - -/*! - @class IOUSBControllerListElement - @abstract Used by the IOUSBController to manage the USB controller lists that are common between EHCI and UHCI. - */ -class IOUSBControllerListElement : public OSObject -{ - OSDeclareDefaultStructors(IOUSBControllerListElement) - -private: - -public: - - virtual void SetPhysicalLink(IOPhysicalAddress next) = 0; - virtual IOPhysicalAddress GetPhysicalLink(void) = 0; - virtual IOPhysicalAddress GetPhysicalAddrWithType(void) = 0; - virtual void print(int level); - - IOPhysicalAddress _sharedPhysical; // phys address of the memory shared with the controller - void * _sharedLogical; // logical address of the above - IOUSBControllerListElement *_logicalNext; // the next element in the list - -}; - - -class IOUSBControllerV2; // needed for a parameter -class IOUSBControllerIsochEndpoint; - -class IOUSBControllerIsochListElement : public IOUSBControllerListElement -{ - OSDeclareDefaultStructors(IOUSBControllerIsochListElement) - -private: - -public: - - virtual void SetPhysicalLink(IOPhysicalAddress next) = 0; - virtual IOPhysicalAddress GetPhysicalLink(void) = 0; - virtual IOPhysicalAddress GetPhysicalAddrWithType(void) = 0; - virtual void print(int level); - - IOUSBControllerIsochEndpoint *_pEndpoint; - IOUSBIsocFrame *_pFrames; - IOUSBIsocCompletion _completion; - Boolean _lowLatency; - bool _requestFromRosettaClient; // True if the request originated from a Rosetta client in user space - UInt8 _framesInTD; // used for HS Isoch only - UInt64 _frameNumber; // frame number for scheduling purposes - UInt32 _frameIndex; // index into the myFrames array - IOUSBControllerIsochListElement *_doneQueueLink; // linkage used by done queue processing - - // pure virtual methods which must be implemented by descendants - virtual IOReturn UpdateFrameList(AbsoluteTime timeStamp) = 0; - virtual IOReturn Deallocate(IOUSBControllerV2 *uim) = 0; -}; - -class IOUSBControllerIsochEndpoint : public OSObject -{ - OSDeclareDefaultStructors(IOUSBControllerIsochEndpoint) - -public: - - virtual bool init(); - - IOUSBControllerIsochEndpoint *nextEP; - IOUSBControllerIsochListElement *toDoList; // ITD or SITD - IOUSBControllerIsochListElement *toDoEnd; // ITD or SITD - IOUSBControllerIsochListElement *doneQueue; // ITD or SITD - IOUSBControllerIsochListElement *doneEnd; // ITD or SITD - IOUSBControllerIsochListElement *deferredQueue; // ITD or SITD - IOUSBControllerIsochListElement *deferredEnd; // ITD or SITD - UInt64 firstAvailableFrame; // next frame available for a transfer on this EP - UInt32 maxPacketSize; - UInt32 activeTDs; // + when added to todo list, - when taken from done queue - UInt32 onToDoList; // + when added to todo list, - when taken from done queue - UInt32 onDoneQueue; // + when added to todo list, - when taken from done queue - volatile SInt32 scheduledTDs; // + when linked onto periodic list, - when unlinked - UInt32 deferredTDs; - UInt32 onProducerQ; - UInt32 onReversedList; - UInt16 inSlot; // where Isoc TDs are being put in the periodic list - short functionAddress; - short endpointNumber; - IOReturn accumulatedStatus; - UInt32 interval; // this is the decoded interval value for HS endpoints and is 1 for FS endpoints - UInt8 direction; - bool aborting; -}; - - -#endif - diff --git a/i386/include/IOKit/usb/IOUSBControllerV2.h b/i386/include/IOKit/usb/IOUSBControllerV2.h deleted file mode 100644 index 4d2c306..0000000 --- a/i386/include/IOKit/usb/IOUSBControllerV2.h +++ /dev/null @@ -1,374 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.2 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBCONTROLLERV2_H -#define _IOKIT_IOUSBCONTROLLERV2_H - -#include <IOKit/IODMACommand.h> - -#include <IOKit/usb/IOUSBControllerListElement.h> -#include <IOKit/usb/IOUSBController.h> - -enum -{ - kUSBHSHubCommandAddHub = 1, - kUSBHSHubCommandRemoveHub = 2, - - kUSBHSHubFlagsMultiTT = 1 -}; - - -/*! - @class IOUSBControllerV2 - @abstract subclass of the IOUSBController to provide support for high speed - devices and split transactions. - @discussion The IOUSBController class provide sufficient functionality to - work with full (12Mb/s) and low (1.5Mb/s) devices. IOUSBControllerV2 - introduces the support for high (480Mb/s) speed devices from the - USB 2.0 spec. In particular IOUSBControllerV2 indicates the high - speed hub a full or low speed device is attached to so that split - transactions can be directed to the hub at high speed to be forwarded - to the full or low speed device by the hub. - It also gives support for bulk endoints of greater than 256 bytes. -*/ - -class IOUSBControllerV2 : public IOUSBController -{ - OSDeclareAbstractStructors(IOUSBControllerV2) - -protected: - - // These for keeping track of high speed ancestor to allow controller to do splits. - // - UInt8 _highSpeedHub[128]; - UInt8 _highSpeedPort[128]; - - struct V2ExpansionData { - UInt8 _multiTT[128]; - IOUSBCommand *ClearTTCommand; - IOUSBControllerIsochEndpoint *_isochEPList; // linked list of active Isoch "endpoints" - IOUSBControllerIsochEndpoint *_freeIsochEPList; // linked list of freed Isoch EP data structures - thread_call_t _returnIsochDoneQueueThread; - }; - V2ExpansionData *_v2ExpansionData; - - // Super's expansion data - #define _freeUSBCommandPool _expansionData->freeUSBCommandPool - #define _freeUSBIsocCommandPool _expansionData->freeUSBIsocCommandPool - #define _watchdogUSBTimer _expansionData->watchdogUSBTimer - #define _controllerTerminating _expansionData->_terminating - #define _watchdogTimerActive _expansionData->_watchdogTimerActive - #define _busNumber _expansionData->_busNumber - #define _currentSizeOfCommandPool _expansionData->_currentSizeOfCommandPool - #define _currentSizeOfIsocCommandPool _expansionData->_currentSizeOfIsocCommandPool - #define _controllerSpeed _expansionData->_controllerSpeed - #define _activeIsochTransfers _expansionData->_activeIsochTransfers - - // this class's expansion data - #define _isochEPList _v2ExpansionData->_isochEPList - #define _freeIsochEPList _v2ExpansionData->_freeIsochEPList - #define _returnIsochDoneQueueThread _v2ExpansionData->_returnIsochDoneQueueThread - - virtual bool init( OSDictionary * propTable ); - virtual bool start( IOService * provider ); - virtual void free(); - - static IOReturn DoCreateEP(OSObject *owner, - void *arg0, void *arg1, - void *arg2, void *arg3); - - static void clearTTHandler( - OSObject * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining ); - -public: - - /*! - @function openPipe - Open a pipe to the specified device endpoint - @param address Address of the device on the USB bus - @param speed of the device: kUSBDeviceSpeedLow, kUSBDeviceSpeedFull or kUSBDeviceSpeedHigh - @param endpoint description of endpoint to connect to - */ - virtual IOReturn OpenPipe( USBDeviceAddress address, - UInt8 speed, - Endpoint * endpoint ); - - /*! - @function CreateDevice - @abstract Create a new device as IOUSBController, making a note of the - high speed hub device ID and port number the full/low speed - device is attached to. - @param newDevice new device object to work with - @param deviceAddress USB device ID - @param maxPacketSize max packet size of endpoint zero - @param speed speed of the device kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh - @param powerAvailable power available to the device - @param hub USB ID of hub the device is immediatly attached to. (Not necessarily high speed) - @param port port number of port the device is attached to. -*/ - virtual IOReturn CreateDevice( IOUSBDevice *newDevice, - USBDeviceAddress deviceAddress, - UInt8 maxPacketSize, - UInt8 speed, - UInt32 powerAvailable, - USBDeviceAddress hub, - int port); - -/*! - @function ConfigureDeviceZero - @abstract configure pipe zero of device zero, as IOUSBController, but also keeping - note of high speed hub device is attached to. - @param maxPacketSize max packet size for the pipe - @param speed speed of the device kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh - @param hub USB ID of hub the device is immediatly attached to. (Not necessarily high speed) - @param port port number of port the device is attached to. -*/ - virtual IOReturn ConfigureDeviceZero(UInt8 maxPacketSize, UInt8 speed, USBDeviceAddress hub, int port); - -/*! - @function UIMCreateControlEndpoint - @abstract Create an endpoint in the controller to do control transactions. - @param functionNumber USB device ID of device - @param endpointNumber endpoint address of the endpoint in the device - @param maxPacketSize maximum packet size of this endpoint - @param speed speed of the device kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh - @param highSpeedHub If speed is not kUSBDeviceSpeedHigh, the address of the high speed hub to - address split transactions to. - @param highSpeedPort If speed is not kUSBDeviceSpeedHigh, the hub port to address split transactions to -*/ - virtual IOReturn UIMCreateControlEndpoint( - UInt8 functionNumber, - UInt8 endpointNumber, - UInt16 maxPacketSize, - UInt8 speed, - USBDeviceAddress highSpeedHub, - int highSpeedPort) = 0; - -/*! - @function UIMCreateBulkEndpoint - @abstract Create an endpoint in the controller to do bulk transactions. - @param functionNumber USB device ID of device - @param endpointNumber endpoint address of the endpoint in the device - @param direction Direction of data flow. kUSBIn or kUSBOut - @param maxPacketSize maximum packet size of this endpoint - @param speed speed of the device kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh - @param highSpeedHub If speed is not kUSBDeviceSpeedHigh, the address of the high speed hub to - address split transactions to. - @param highSpeedPort If speed is not kUSBDeviceSpeedHigh, the hub port to address split transactions to -*/ - virtual IOReturn UIMCreateBulkEndpoint( - UInt8 functionNumber, - UInt8 endpointNumber, - UInt8 direction, - UInt8 speed, - UInt16 maxPacketSize, - USBDeviceAddress highSpeedHub, - int highSpeedPort) = 0; - -/*! - @function UIMCreateInterruptEndpoint - @abstract Create an endpoint in the controller to do interrupt transactions. - @param functionAddress USB device ID of device - @param endpointNumber endpoint address of the endpoint in the device - @param direction Direction of data flow. kUSBIn or kUSBOut - @param speed speed of the device kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh - @param maxPacketSize maximum packet size of this endpoint - @param pollingRate The maximum polling interval from the endpoint descriptor. - @param highSpeedHub If speed is not kUSBDeviceSpeedHigh, the address of the high speed hub to - address split transactions to. - @param highSpeedPort If speed is not kUSBDeviceSpeedHigh, the hub port to address split transactions to -*/ - virtual IOReturn UIMCreateInterruptEndpoint( - short functionAddress, - short endpointNumber, - UInt8 direction, - short speed, - UInt16 maxPacketSize, - short pollingRate, - USBDeviceAddress highSpeedHub, - int highSpeedPort) = 0; - -/*! - @function UIMCreateIsochEndpoint - @abstract Create an endpoint in the controller to do Isochronous transactions. - @param functionAddress USB device ID of device - @param endpointNumber endpoint address of the endpoint in the device - @param maxPacketSize maximum packet size of this endpoint - @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. - @param highSpeedHub If non zero, this is a full speed device, the address of the high speed hub to - address split transactions to. - @param highSpeedPort If highSpeedHub is non zero, the hub port to address split transactions to -*/ - virtual IOReturn UIMCreateIsochEndpoint( - short functionAddress, - short endpointNumber, - UInt32 maxPacketSize, - UInt8 direction, - USBDeviceAddress highSpeedHub, - int highSpeedPort) = 0; - - - static void ReturnIsochDoneQueueEntry(OSObject *target, thread_call_param_t endpointPtr); - - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 0); - virtual IOReturn AddHSHub(USBDeviceAddress highSpeedHub, UInt32 flags); - - static IOReturn DOHSHubMaintenance(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 1); - virtual IOReturn UIMHubMaintenance(USBDeviceAddress highSpeedHub, UInt32 highSpeedPort, UInt32 command, UInt32 flags); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 2); - virtual IOReturn RemoveHSHub(USBDeviceAddress highSpeedHub); - - static IOReturn DOSetTestMode(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 3); - virtual IOReturn SetTestMode(UInt32 mode, UInt32 port); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 4); - virtual IOReturn UIMSetTestMode(UInt32 mode, UInt32 port); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 5); - virtual UInt64 GetMicroFrameNumber( void ); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 6); - virtual void ClearTT(USBDeviceAddress addr, UInt8 endpt, Boolean IN); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 7); - /*! - @function Read - Read from an interrupt or bulk endpoint - @param buffer place to put the transferred data - @param address Address of the device on the USB bus - @param endpoint description of endpoint - @param completion describes action to take when buffer has been filled - @param noDataTimeout number of milliseconds of no data movement before the request is aborted - @param completionTimeout number of milliseonds after the command is on the bus in which it must complete - @param reqCount number of bytes requested for the transfer (must not be greater than the length of the buffer) - */ - virtual IOReturn ReadV2( IOMemoryDescriptor * buffer, - USBDeviceAddress address, - Endpoint * endpoint, - IOUSBCompletionWithTimeStamp * completion, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOByteCount reqCount ); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 8); -/*! - @function UIMCreateIsochEndpoint - @abstract Create an endpoint in the controller to do Isochronous transactions. - @param functionAddress USB device ID of device - @param endpointNumber endpoint address of the endpoint in the device - @param maxPacketSize maximum packet size of this endpoint - @param direction Specifies direction for the endpoint. kUSBIn or KUSBOut. - @param highSpeedHub If non zero, this is a full speed device, the address of the high speed hub to - address split transactions to. - @param highSpeedPort If highSpeedHub is non zero, the hub port to address split transactions to - @param interval The encoded interval value from the endpoint descriptor -*/ - virtual IOReturn UIMCreateIsochEndpoint( short functionAddress, - short endpointNumber, - UInt32 maxPacketSize, - UInt8 direction, - USBDeviceAddress highSpeedHub, - int highSpeedPort, - UInt8 interval); - - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 9); - virtual IOUSBControllerIsochEndpoint* AllocateIsochEP(void); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 10); - virtual IOReturn DeallocateIsochEP(IOUSBControllerIsochEndpoint *pEP); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 11); - virtual IOUSBControllerIsochEndpoint* FindIsochronousEndpoint(short functionNumber, short endpointNumber, short direction, IOUSBControllerIsochEndpoint* *pEDBack); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 12); - virtual IOUSBControllerIsochEndpoint* CreateIsochronousEndpoint(short functionNumber, short endpointNumber, short direction); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 13); - virtual void PutTDonToDoList(IOUSBControllerIsochEndpoint* pED, IOUSBControllerIsochListElement *pTD); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 14); - virtual IOUSBControllerIsochListElement *GetTDfromToDoList(IOUSBControllerIsochEndpoint* pED); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 15); - virtual void PutTDonDeferredQueue(IOUSBControllerIsochEndpoint* pED, IOUSBControllerIsochListElement *pTD); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 16); - virtual IOUSBControllerIsochListElement *GetTDfromDeferredQueue(IOUSBControllerIsochEndpoint* pED); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 17); - virtual void PutTDonDoneQueue(IOUSBControllerIsochEndpoint* pED, IOUSBControllerIsochListElement *pTD, bool checkDeferred); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 18); - virtual IOUSBControllerIsochListElement *GetTDfromDoneQueue(IOUSBControllerIsochEndpoint* pED); - - // 7185026 - this is to make this call from behind the gate - static IOReturn GatedGetTDfromDoneQueue(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 19); - virtual void ReturnIsochDoneQueue(IOUSBControllerIsochEndpoint*); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 20); - virtual IODMACommand *GetNewDMACommand(); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 21); - /*! - @function GetLowLatencyOptionsAndPhysicalMask - @abstract Low Latency transfers require that the client have access to the memory after the Isochronous I/O request has already been scheduled. This might be used, for example to fill in outgoing data "just in time." Some controllers, however, may have requirements which need to be followed in order to make sure that the memory buffer isn't moved after the call is made. This call will return an IOOptionBits and mach_vm_address_t which can be used in a call to IOBufferMemoryDescriptor::inTaskWithPhysicalMask which will help meet these requirements. - @param optionBits Pointer to an an IOOptionBits. The only bit which may be returned is kIOMemoryPhysicallyContiguous. Other bits, e.g. direction bits, must be ORd in by the client as needed. This call replaces the old property based method of obtaining this information. - @param physicalMask Pointer to a mach_vm_address_t which should be used in the call to IOBufferMemoryDescriptor::inTaskWithPhysicalMask and will guarantee that when the memory is wired down it will be accessible by both the client and the USB controller at the same time. - @result returns kIOReturnSuccess if the method is implemented by the controller, otherwise kIOReturnUnsupported - */ - virtual IOReturn GetLowLatencyOptionsAndPhysicalMask(IOOptionBits *optionBits, mach_vm_address_t *physicalMask); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV2, 22); - /*! - @function GetFrameNumberWithTime - @abstract Real Time A/V applications send and receive Iscohronous data scheduled on certain USB frame numbers. The clock for these frame numbers is independent of the system clock, and drivers need to synchronize these two clocks. This routine will return a system time which corresponds to the beginning of a USB frame number. It is not necessarily the currrent frame, but it will be a frame in the recent past (within the past minute). The jitter between the start of the USB frame and the system time will be as low as possible, but due to hardware interrupt latencies could be as high as 200 microseconds. - @param frameNumber A pointer to a UInt64 in which to hold the USB frame number corresponding to the given system time. - @param theTime A pointer to an AbsoluteTime corresponding to the system time at the beginning of the given USB frame number. - @result returns kIOReturnSuccess if the method is implemented by the controller, otherwise kIOReturnUnsupported - */ - virtual IOReturn GetFrameNumberWithTime(UInt64* frameNumber, AbsoluteTime *theTime); - - - OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 23); - OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 24); - OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 25); - OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 26); - OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 27); - OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 28); - OSMetaClassDeclareReservedUnused(IOUSBControllerV2, 29); - -}; - - -#endif /* ! _IOKIT_IOUSBCONTROLLERV2_H */ diff --git a/i386/include/IOKit/usb/IOUSBControllerV3.h b/i386/include/IOKit/usb/IOUSBControllerV3.h deleted file mode 100644 index 22da915..0000000 --- a/i386/include/IOKit/usb/IOUSBControllerV3.h +++ /dev/null @@ -1,233 +0,0 @@ -/* -* Copyright (c) 2007-2008 Apple Inc. All rights reserved. -* -* @APPLE_LICENSE_HEADER_START@ -* -* The contents of this file constitute Original Code as defined in and -* are subject to the Apple Public Source License Version 1.2 (the -* "License"). You may not use this file except in compliance with the -* License. Please obtain a copy of the License at -* http://www.apple.com/publicsource and read it before using this file. -* -* This Original Code and all software distributed under the License are -* distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER -* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, -* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. -* Please see the License for the specific language governing rights and -* limitations under the License. -* -* @APPLE_LICENSE_HEADER_END@ -*/ - -#ifndef _IOKIT_IOUSBCONTROLLERV3_H -#define _IOKIT_IOUSBCONTROLLERV3_H - -#include <IOKit/pci/IOPCIDevice.h> - -#include <IOKit/usb/IOUSBControllerV2.h> -#include <IOKit/usb/IOUSBHubDevice.h> - -// Constants that define the different power states in the setPowerState call -enum -{ - kUSBPowerStateOff = 0, // controller is reset, nothing is attached - kUSBPowerStateRestart = 1, // same as OFF - kUSBPowerStateSleep = 2, // controller is suspended, preparing to lose main power - kUSBPowerStateLowPower = 3, // controller is suspended, power remains on - kUSBPowerStateOn = 4, // up and running - kUSBNumberBusPowerStates = 5 -}; - -#define kUSBPowerStateStable -1 - -enum -{ - kUSBBusStateReset = 0, // bus is in RESET - kUSBBusStateSuspended = 1, // bus is in SUSPEND mode - kUSBBusStateRunning = 2 // bus is operational -}; - - -// Root Hub things -typedef struct IOUSBRootHubInterruptTransaction -{ - IOMemoryDescriptor * buf; - UInt32 bufLen; - IOUSBCompletion completion; -} IOUSBRootHubInterruptTransaction; - -enum -{ - kIOUSBMaxRootHubTransactions = 2 -}; - - - -/*! - @class IOUSBControllerV3 - @abstract subclass of the IOUSBControllerV2 to provide support for new USB Power Management techniques. - @discussion With Leopard, we are providing more information to USB Device Drivers in the IOPower - tree to allow for more efficient Power Management. This controller class encapulates many of the changes - needed for that, without disturbing third party subclasses of IOUSBController or IOUSBControllerV2 - */ - -class IOUSBControllerV3 : public IOUSBControllerV2 -{ - OSDeclareAbstractStructors(IOUSBControllerV3) - - protected: - // static variable shared by all instances - static uint32_t * _gHibernateState; - - - UInt8 _myBusState; // kUSBBusStateReset, kUSBBusStateSuspended, kUSBBusStateRunning - bool _wakingFromHibernation; // True while the Hibernation Wake thread is active - bool _needToAckPowerDown; // True while we are changing power state due to shutdown/restart - bool _onCardBus; // OBSOLETE - bool _controllerAvailable; // true if we can talk to the controller - SInt32 _powerStateChangingTo; // a power state that we are in the process of changing to, or -1 if we are stable - bool _poweringDown; // true is the controller is powering down because of a systemWillPowerDown message - bool _restarting; // true is the controller is restarting because of a systemWillPowerDown message - unsigned long _myPowerState; // my current state (since getPowerState doesn't always change in time) - IOUSBControllerV3 *_ehciController; // set if I am a companion controller - unsigned long _numPowerStates; // how many power states do I support (defaults to kUSBNumDefaultPowerStates) - IOPMPowerState *_myPowerStates; // my power state array (allocated on the fly) - IOPCIDevice *_device; // my PCI device - - // root hub support - IOTimerEventSource *_rootHubTimer; // timer which fires at the rate of the root hub interrupt endpoint - UInt8 _rootHubPollingRate; // Obsolete -- we need to have it be a uint32_t - UInt8 _rootHubNumPorts; // number of root hub ports - should be 15 or fewer! - UInt16 _rootHubStatusChangedBitmap; // support up to 15 ports for status changes - bool _rootHubTimerActive; // UNUSED - IOUSBRootHubInterruptTransaction _outstandingRHTrans[4]; // Transactions for the Root Hub. We need 2, one for the current transaction and one for the next. This is declared as 4 for binary compatibility - - struct V3ExpansionData { - uint32_t _rootHubPollingRate32; - bool _rootHubTransactionWasAborted; - }; - V3ExpansionData *_v3ExpansionData; - - // IOKit methods - virtual bool init( OSDictionary * propTable ); - virtual bool start( IOService * provider ); - virtual void stop( IOService * provider ); - virtual unsigned long maxCapabilityForDomainState ( IOPMPowerFlags domainState ); - virtual unsigned long initialPowerStateForDomainState ( IOPMPowerFlags domainState ); - virtual IOReturn powerStateWillChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); - virtual IOReturn setPowerState( unsigned long powerStateOrdinal, IOService* whatDevice ); - virtual IOReturn powerStateDidChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); - virtual void powerChangeDone ( unsigned long fromState); - virtual void systemWillShutdown( IOOptionBits specifier ); - virtual void free(void); - - // IOUSBController methods - // we override these to deal with methods attempting to go through the workloop while we are in sleep - virtual IOReturn AcquireDeviceZero( void ); - virtual void ReleaseDeviceZero( void ); - virtual IOReturn DeviceRequest(IOUSBDevRequest *request, IOUSBCompletion *completion, USBDeviceAddress address, UInt8 epNum, UInt32 noDataTimeout, UInt32 completionTimeout); - virtual IOReturn DeviceRequest(IOUSBDevRequestDesc *request, IOUSBCompletion *completion, USBDeviceAddress address, UInt8 epNum, UInt32 noDataTimeout, UInt32 completionTimeout); - virtual IOReturn ClosePipe(USBDeviceAddress address, Endpoint *endpoint); - virtual IOReturn AbortPipe(USBDeviceAddress address, Endpoint *endpoint); - virtual IOReturn ResetPipe(USBDeviceAddress address, Endpoint *endpoint); - virtual IOReturn ClearPipeStall(USBDeviceAddress address, Endpoint *endpoint); - virtual IOReturn Read(IOMemoryDescriptor *buffer, USBDeviceAddress address, Endpoint *endpoint, IOUSBCompletion *completion, UInt32 noDataTimeout, UInt32 completionTimeout, IOByteCount reqCount); - virtual IOReturn Write(IOMemoryDescriptor *buffer, USBDeviceAddress address, Endpoint *endpoint, IOUSBCompletion *completion, UInt32 noDataTimeout, UInt32 completionTimeout, IOByteCount reqCount); - virtual IOReturn IsocIO(IOMemoryDescriptor *buffer, UInt64 frameStart, UInt32 numFrames, IOUSBIsocFrame *frameList, USBDeviceAddress address, Endpoint *endpoint, IOUSBIsocCompletion *completion ); - virtual IOReturn IsocIO(IOMemoryDescriptor *buffer, UInt64 frameStart, UInt32 numFrames, IOUSBLowLatencyIsocFrame *frameList, USBDeviceAddress address, Endpoint *endpoint, IOUSBLowLatencyIsocCompletion *completion, UInt32 updateFrequency ); - - // IOUSBControllerV2 methods - // we override these to deal with methods attempting to go through the workloop while we are in sleep - virtual IOReturn OpenPipe(USBDeviceAddress address, UInt8 speed, Endpoint *endpoint); - virtual IOReturn AddHSHub(USBDeviceAddress highSpeedHub, UInt32 flags); - virtual IOReturn RemoveHSHub(USBDeviceAddress highSpeedHub); - virtual IOReturn SetTestMode(UInt32 mode, UInt32 port); - virtual IOReturn ReadV2(IOMemoryDescriptor *buffer, USBDeviceAddress address, Endpoint *endpoint, IOUSBCompletionWithTimeStamp *completion, UInt32 noDataTimeout, UInt32 completionTimeout, IOByteCount reqCount); - - // IOUSBControllerV3 methods - - // these are called through the workloop - static IOReturn DoEnableAddressEndpoints(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3 ); - static IOReturn DoEnableAllEndpoints(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3 ); - static IOReturn GatedPowerChange(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3 ); - - // also on the workloop - static void RootHubTimerFired(OSObject *owner, IOTimerEventSource *sender); - - // subclassable methods - virtual IOReturn CheckForEHCIController(IOService *provider); - virtual IOReturn AllocatePowerStateArray(void); - virtual IOReturn InitForPM(void); - virtual IOReturn CheckPowerModeBeforeGatedCall(char *fromStr); - virtual IOReturn EnableAllEndpoints(bool enable); - virtual IOReturn EnableBusMastering(bool enable); - virtual IOReturn EnsureUsability(void); - virtual IOReturn CheckForRootHubChanges(void); - virtual IOReturn RootHubQueueInterruptRead(IOMemoryDescriptor *buf, UInt32 bufLen, IOUSBCompletion completion); - virtual IOReturn RootHubAbortInterruptRead(void); - virtual IOReturn RootHubStartTimer(UInt8 pollingRate); // Obsolete see RootHubStartTimer32 - virtual IOReturn RootHubStopTimer(void); - - // these methods have a default implementation using some of the virtual methods below - virtual void ControllerOff(void); - virtual void ControllerRestart(void); - virtual void ControllerSleep(void); - virtual void ControllerDoze(void); - virtual void ControllerOn(void); - - // these methods are pure virtual, and need to be implemented in the subclass driver - virtual IOReturn ResetControllerState(void) = 0; - virtual IOReturn RestartControllerFromReset(void) = 0; - virtual IOReturn SaveControllerStateForSleep(void) = 0; - virtual IOReturn RestoreControllerStateFromSleep(void) = 0; - virtual IOReturn DozeController(void) = 0; - virtual IOReturn WakeControllerFromDoze(void) = 0; - virtual IOReturn UIMEnableAddressEndpoints(USBDeviceAddress address, bool enable) = 0; - virtual IOReturn UIMEnableAllEndpoints(bool enable) = 0; - virtual IOReturn EnableInterruptsFromController(bool enable) = 0; - - public: - - // public methods - virtual IOReturn EnableAddressEndpoints(USBDeviceAddress address, bool enable); - virtual bool IsControllerAvailable(void); - virtual IOReturn HandlePowerChange(unsigned long powerStateOrdinal); - virtual UInt32 AllocateExtraRootHubPortPower(UInt32 extraPowerRequested); - virtual void ReturnExtraRootHubPortPower(UInt32 extraPowerReturned); - - OSMetaClassDeclareReservedUsed(IOUSBControllerV3, 0); - virtual IOReturn RootHubStartTimer32(uint32_t pollingRate); - - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 1); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 2); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 3); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 4); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 5); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 6); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 7); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 8); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 9); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 10); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 11); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 12); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 13); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 14); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 15); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 16); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 17); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 18); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 19); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 20); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 21); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 22); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 23); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 24); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 25); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 26); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 27); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 28); - OSMetaClassDeclareReservedUnused(IOUSBControllerV3, 29); -}; - -#endif // _IOKIT_IOUSBCONTROLLERV3_H \ No newline at end of file diff --git a/i386/include/IOKit/usb/IOUSBDevice.h b/i386/include/IOKit/usb/IOUSBDevice.h deleted file mode 100644 index 58d73a0..0000000 --- a/i386/include/IOKit/usb/IOUSBDevice.h +++ /dev/null @@ -1,639 +0,0 @@ -/* - * Copyright (c) 1998-2007 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.2 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __OPEN_SOURCE__ -/* - * - * $Log: IOUSBDevice.h,v $ - * Revision 1.65 2009/10/18 20:20:37 nano - * Bring in fixes in 390.4.0 QL: 7310698 7301024 7307079 and 7310698 - * - * Revision 1.64.32.4 2009/10/15 21:17:43 nano - * If OverrideAtLocationID does not see a override property, return true - * - * Revision 1.64.32.3.2.1 2009/10/15 21:36:27 nano - * If OverrideAtLocationID does not see a override property, return true - * - * Revision 1.64.32.3 2009/10/14 19:16:15 nano - * Minor name changes - * - * Revision 1.64.32.2 2009/10/14 19:05:21 nano - * 7284477 7293893 Simplify scheme to decide whether we want to override a property for a hub at a particular ID for a particular MacModel. Added a IOUSBDevice API that tells us if we are in the right model and locationID to override a property - * - * Revision 1.64.32.1 2009/10/08 19:55:56 nano - * rdar://7284477 Allow us to overide the config descriptor of a 2514 hub on a K23F - * - * Revision 1.64 2009/09/08 12:28:45 nano - * <rdar://problem/7195788> IOUSBDevice headerdoc comment problem - GetNumConfigs name is wrong, should be GetNumConfigurations - * - * Revision 1.63 2009/05/07 19:43:09 nano - * Move our SnowLeopard branch to TOT - * - * Revision 1.57.84.6 2009/03/13 22:45:11 nano - * Bring in branches to fix 6676089 6675858 6567987 6490273 - * - * Revision 1.57.84.5.4.1 2009/03/11 20:01:56 nano - * rdar://6567987 Do not let a Reset or a ReEnumerate through while the other is executing. - * - * Revision 1.57.84.5 2009/02/26 13:44:32 nano - * Bring in rdar://6536090&6586312 to SL branch - * - * Revision 1.57.84.4.10.1 2009/02/25 00:51:06 rhoads - * change the mechanism of getConfigLock so as to prevent a deadlock - * - * Revision 1.57.84.4 2009/02/13 15:57:33 rhoads - * roll in rdars: 6213394, 6489431, 6513000, 6515115, 6535200, 6567783 - * - * Revision 1.57.84.3.48.3 2009/02/11 19:19:08 rhoads - * add back an expansionData variable to preserve binary compatibility - * - * Revision 1.57.84.3.48.2 2009/02/11 03:05:56 arulchan - * more ::SuspendDevice changes - * - * Revision 1.57.84.3.48.1 2009/01/23 21:34:15 arulchan - * fix for rdar://6213394 - * - * Revision 1.57.84.3 2008/06/16 21:31:16 nano - * Bring in changes from Foxhound 320.2.17 - * - * Revision 1.57.84.2 2008/04/22 22:38:01 nano - * Bring in changes from Foxhound-320.2.9 - * - * Revision 1.60.28.2 2008/05/22 17:36:18 nano - * Fix the reporting of the internal bit for GetDeviceInformation - * - * Revision 1.60.28.1 2008/05/21 17:51:43 nano - * <rdar://problem/5952635> GetDeviceInformation needs some fixes - * - * Revision 1.60 2008/04/18 22:03:28 nano - * Bring in fix for rdar://5874560 - * - * Revision 1.59.4.1 2008/04/18 21:55:55 nano - * <rdar://problem/5874560> Need API to know how much extra power has been allocated - * - * Revision 1.59 2008/04/17 16:56:57 nano - * Bring in branches for rdar://5867990 & rdar://5768343 - * - * Revision 1.58.4.1 2008/04/16 20:26:13 nano - * <rdar://problem/5867990> Add API to allocate sleep current, as well as making sure that we return any extra power if our client dies or our device is terminated without returning it - * - * Revision 1.58 2008/04/14 16:08:38 nano - * Add new APIs for high power and for GetDeviceInformation. - * - * Revision 1.57.126.2 2008/04/13 05:25:40 nano - * Call into PolicyMaker for the GetPortInformation - * - * Revision 1.57.126.1 2008/04/11 22:25:44 nano - * Initial work on new user-client APIs and new IOUSBDevice APIs to return port state information and manage extra power requests, as well as groundwork for calling the policy maker directly from the IOUSBDevice - * - * Revision 1.57 2007/08/07 20:30:36 rhoads - * rolled in a few branches to TOT - * - * Revision 1.56.92.1 2007/08/07 03:43:34 nano - * Bring in more changes for M89 suppport -- like actually use the dang power if the properties are available - * - * Revision 1.56 2007/03/06 12:23:41 rhoads - * roll in 5024412, 5035829, and 5039670 - * - * Revision 1.55.30.1 2007/02/27 16:08:33 rhoads - * some fine tuning of our IOService overrides, including not overriding willTerminate and didTerminate (5024412) - * - * Revision 1.55 2007/01/19 17:58:48 rhoads - * roll in branches for a leopard build - * - * Revision 1.54.30.1 2007/01/17 16:37:02 rhoads - * remove the IOUSBDevice::attach method which is not really useful - * - * Revision 1.54 2006/10/06 04:42:01 rhoads - * roll in branches 4727961, 4758404, 4759810, 4760274, and 4762769 - * - * Revision 1.53.4.1 2006/10/04 16:03:57 rhoads - * better IOUSBHubDevice design - * - */ -#endif - -#ifndef _IOKIT_IOUSBDEVICE_H -#define _IOKIT_IOUSBDEVICE_H - -#include <IOKit/usb/IOUSBNub.h> -#include <IOKit/usb/IOUSBPipe.h> -#include <IOKit/IOBufferMemoryDescriptor.h> -#include <IOKit/IOWorkLoop.h> -#include <IOKit/IOCommandGate.h> - -#include <kern/thread_call.h> - -// The following are definitions for errata properties needed for different devices. This -// should be but in the dictionary of the IOUSBDevice in question. This can be achieved -// by using the AppleUSBMergeNub class and having an IOProviderMergeProperties dictionary -// with the required properties. - -// This property allows a device to specify a configuration value of 0 in its configuration -// descriptor. This does not follow the spec, but we will allow it in order to get the device -// to work. The property should be a Boolean -// -#define kAllowConfigValueOfZero "kAllowZeroConfigValue" -#define kAllowNumConfigsOfZero "kAllowZeroNumConfigs" - - -class IOUSBController; -class IOUSBControllerV2; -class IOUSBInterface; -class IOUSBHubPolicyMaker; -/*! - @class IOUSBDevice - @abstract The IOService object representing a device on the USB bus. - @discussion This class provides functionality to configure a device and to create - IOUSBInterface objects to represent the interfaces of the device. -*/ - -class IOUSBDevice : public IOUSBNub -{ - friend class IOUSBController; - friend class IOUSBControllerV2; - friend class IOUSBInterface; - friend class IOUSBPipe; - - OSDeclareDefaultStructors(IOUSBDevice) - -protected: - - USBDeviceAddress _address; - IOUSBController * _controller; - IOUSBPipe * _pipeZero; - IOUSBDeviceDescriptor _descriptor; - UInt32 _busPowerAvailable; - UInt8 _speed; - IOUSBEndpointDescriptor _endpointZero; // Fake ep for control pipe - void * _port; // Obsolete, do not use - IOBufferMemoryDescriptor** _configList; - IOUSBInterface** _interfaceList; - UInt8 _currentConfigValue; - UInt8 _numInterfaces; - - struct ExpansionData - { - UInt32 _portNumber; - thread_call_t _doPortResetThread; - IOUSBDevice * _usbPlaneParent; - bool _portResetThreadActive; - bool _allowConfigValueOfZero; - thread_call_t _doPortSuspendThread; - bool _portSuspendThreadActive; - thread_call_t _doPortReEnumerateThread; - bool _resetInProgress; - bool _portHasBeenReset; - IORecursiveLock* _XgetConfigLock; // Obsolete - bool _doneWaiting; // Obsolete - bool _notifiedWhileBooting; // Obsolete - IOWorkLoop * _workLoop; - IOTimerEventSource * _notifierHandlerTimer; - UInt32 _notificationType; - bool _suspendInProgress; - bool _portHasBeenSuspendedOrResumed; - bool _addExtraResetTime; - bool _suspendCommand; - IOCommandGate * _commandGate; - OSSet * _openInterfaces; - bool _resetCommand; - IOReturn _resetError; - IOReturn _suspendError; - thread_call_t _doMessageClientsThread; - IOUSBHubPolicyMaker * _hubPolicyMaker; - UInt32 _sleepPowerAllocated; // how much sleep power we already gave to our client - UInt32 _wakePowerAllocated; // how much extra power during wake did we already give our client - UInt32 _devicePortInfo; - bool _deviceIsInternal; // Will be set if all our upstream hubs are captive (internal to the computer) - bool _deviceIsInternalIsValid; // true if we have already determined whether the device is internal - bool _newGetConfigLock; // new lock, taken within the WL gate, when doing a GetConfig - UInt32 _resetAndReEnumerateLock; // "Lock" to prevent us from doing a reset or a re-enumerate while the other one is in progress - UInt32 _locationID; - }; - ExpansionData * _expansionData; - - const IOUSBConfigurationDescriptor *FindConfig(UInt8 configValue, UInt8 *configIndex=0); - - virtual IOUSBInterface * GetInterface(const IOUSBInterfaceDescriptor *interface); - -public: - virtual IOReturn SetFeature(UInt8 feature); - -protected: - virtual IOReturn GetConfigDescriptor(UInt8 configIndex, void *data, UInt32 len); - - virtual IOReturn GetDeviceDescriptor(IOUSBDeviceDescriptor *desc, UInt32 size); - - virtual bool init(USBDeviceAddress deviceAddress, UInt32 powerAvaiable, UInt8 speed, UInt8 maxPacketSize ); - - virtual bool matchPropertyTable(OSDictionary * table, SInt32 *score); - -public: - // IOService methods - virtual bool init( void ); - virtual bool start( IOService *provider ); - virtual bool handleIsOpen(const IOService *forClient) const; - virtual bool handleOpen(IOService *forClient, IOOptionBits options, void *arg); - virtual void handleClose(IOService *forClient, IOOptionBits options); - virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); - virtual bool terminate( IOOptionBits options = 0 ); - virtual bool requestTerminate( IOService * provider, IOOptionBits options ); - virtual void stop( IOService *provider ); - virtual bool finalize(IOOptionBits options); - virtual void free( void ); - - // IOUSBDevice methods - virtual void SetProperties(); - - static IOUSBDevice *NewDevice(void); - - virtual void SetPort(void *port); // Obsolete, do NOT use - - /*! - @function FindNextInterfaceDescriptor - return a pointer to the next interface descriptor within the given full configuration descriptor satisfying the requirements specified, or NULL if there aren't any. - @param configDescIn the configuration descriptor within which to search. obtained from GetFullConfigurationDescriptor(configIndex). use NULL to specify the current configuration's descriptor. - @param intfDesc interface descriptor from which to start the search. NULL for the first interface descriptor in the given configuration descriptor - @param request IOUSBFindInterfaceRequest specifying the desired interface. Not changed. - @param descOut pointer to placeholder for the returned descriptor ptr - @result returns kIOReturnBadArgument if configDesc is not correct, or if configDesc is NULL and the device is not configured, or if intfDesc is not in configDesc. Otherwise returns kIOReturnSuccess or kIOUSBInterfaceNotFound. - */ - virtual IOReturn FindNextInterfaceDescriptor(const IOUSBConfigurationDescriptor *configDescIn, - const IOUSBInterfaceDescriptor *intfDesc, - const IOUSBFindInterfaceRequest *request, - IOUSBInterfaceDescriptor **descOut); - /*! - @function FindNextInterface - return an pointer to an IOUSBInterface object satisfying the requirements specified in request, or NULL if there aren't any. the device - must be configured for there to be any interfaces. - @param current interface to start searching from, NULL to start at the beginning of the device's interface list for the current configuration. - @param request specifies what properties an interface must have to match. - @result Pointer to a matching IOUSBInterface, or NULL if none match. Note: The IOUSBInterface is NOT retained for the caller. If the caller wishes to continue to use the returned object, it should call retain() on that object. - */ - virtual IOUSBInterface *FindNextInterface(IOUSBInterface *current, - IOUSBFindInterfaceRequest *request); - - /*! - @function CreateInterfaceIterator - return an OSIterator to iterate through interfaces satisfying the requirements specified in request. - @param request specifies what properties an interface must have to match. - @result Pointer to an OSIterator. - */ - virtual OSIterator *CreateInterfaceIterator(IOUSBFindInterfaceRequest *request); - - // Get pointer to full config info (cached in device, don't free returned pointer) - /*! - @function GetFullConfigurationDescriptor - return a pointer to all the descriptors for the requested configuration. - @param configIndex The configuration index (not the configuration value) - @result Pointer to the descriptors, which are cached in the IOUSBDevice object. - */ - virtual const IOUSBConfigurationDescriptor *GetFullConfigurationDescriptor(UInt8 configIndex); - - /*! - @function GetConfigurationDescriptor - Copy the specified amount of data for a configuration into the suppled buffer. - @param configValue The configuration value - @param data Buffer to copy data into - @param len number of bytes to copy - */ - virtual IOReturn GetConfigurationDescriptor(UInt8 configValue, void *data, UInt32 len); - - /*! - @function ResetDevice - Reset the device, returning it to the addressed, unconfigured state. - This is useful if a device has got badly confused. Note that the AppleUSBComposite driver will automatically - reconfigure the device if it is a composite device. - */ - virtual IOReturn ResetDevice(); - - /*! - @function SetConfiguration - Do a USB SetConfiguration call to the device. The caller must have the device open() in order to - actually cause a configuration change. If the device is currently configured, all IOUSBInterface objects - associated with the device are freed. After the new configuration has been set, all of its IOUSBInterface objects are - instantiated automatically. - @param forClient The client requesting the configuration change - @param configValue The desired configuration value. - @param startInterfaceMatching A boolean specifying whether IOKit should begin the process of finding - matching drivers for the new IOUSBInterface objects. - */ - virtual IOReturn SetConfiguration(IOService *forClient, UInt8 configValue, bool startInterfaceMatching=true); - - // Access to addressing and cached info - /*! - @function GetAddress - returns the bus address of the device - */ - virtual USBDeviceAddress GetAddress(void); - - /*! - @function GetSpeed - returns the speed of the device - */ - virtual UInt8 GetSpeed(void); - /*! - @function GetBus - returns a pointer to the IOUSBController object for the device - */ - virtual IOUSBController *GetBus(void); - /*! - @function GetBusPowerAvailable - returns the power available to the device, in units of 2mA - */ - virtual UInt32 GetBusPowerAvailable( void ); - /*! - @function GetMaxPacketSize - returns the maximum packet size for endpoint zero (only 8, 16, 32, 64 are valid) - */ - virtual UInt8 GetMaxPacketSize(void); - /*! - @function GetVendorID - returns the Vendor ID of the device - */ - virtual UInt16 GetVendorID(void); - /*! - @function GetProductID - returns the Product ID of the device - */ - virtual UInt16 GetProductID(void); - /*! - @function GetDeviceRelease - returns the DeviceRelease information - */ - virtual UInt16 GetDeviceRelease(void); - /*! - @function GetNumConfigurations - returns the number of configs in the device config descriptor - */ - virtual UInt8 GetNumConfigurations(void); - /*! - @function GetManufacturerStringIndex - returns the index of string descriptor describing manufacturer - */ - virtual UInt8 GetManufacturerStringIndex(void ); - /*! - @function GetProductStringIndex - returns the index of string descriptor describing product - */ - virtual UInt8 GetProductStringIndex(void ); - /*! - @function GetSerialNumberStringIndex - returns the index of string descriptor describing the device's serial number - */ - virtual UInt8 GetSerialNumberStringIndex(void ); - /*! - @function GetPipeZero - returns a pointer to the device's default control pipe - */ - virtual IOUSBPipe * GetPipeZero(void); - - // Deprecated but needed for binary compatibility - virtual IOUSBPipe* MakePipe(const IOUSBEndpointDescriptor *ep); - - // this method is deprecated. use the other DeviceRequest methods - virtual IOReturn DeviceRequest(IOUSBDevRequest *request, - IOUSBCompletion *completion = 0); - - // Same but with a memory descriptor - virtual IOReturn DeviceRequest(IOUSBDevRequestDesc *request, - IOUSBCompletion *completion = 0); - - /*! - @function GetConfiguration - Gets the current configuration from the IOUSBDevice object. Note that this call will send a control - request on the bus to get the current configuration from the physical device. - @param configNum Pointer to place to store configuration value. - */ - virtual IOReturn GetConfiguration(UInt8 *configNumber); - - /*! - @function GetDeviceStatus - Gets the device's status. Note that this sends a control request to the physical device. - @param status Pointer to place to store the status. - */ - virtual IOReturn GetDeviceStatus(USBStatus *status); - - /*! - @function GetStringDescriptor - Get a string descriptor as ASCII, in the specified language (default is US English) - @param index Index of the string descriptor to get. - @param buf Pointer to place to store ASCII string - @param maxLen Size of buffer pointed to by buf - @param lang Language to get string in (default is US English) - */ - virtual IOReturn GetStringDescriptor(UInt8 index, char *buf, int maxLen, UInt16 lang=0x409); - - /*! - @function GetChildLocationID - Get the locationID (UInt32) given the port number and the parent's location - @param parentLocationID locationID for the hub to which this device is attached. - @param port Port number of the hub where this device is attached - */ - virtual UInt32 GetChildLocationID(UInt32 parentLocationID, int port); - - virtual const IOUSBDescriptorHeader* FindNextDescriptor(const void *cur, UInt8 descType); - - virtual void DisplayNotEnoughPowerNotice(); - - // this is a non-virtual function so that we don't have to take up a binary compatibility slot. - UInt16 GetbcdUSB(void); - UInt8 GetProtocol(void); - void SetBusPowerAvailable(UInt32 newPower); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 0); - /*! - @function DeviceRequest - @abstract execute a control request to the default control pipe (pipe zero) - @param request The parameter block to send to the device - @param noDataTimeout Specifies an amount of time (in ms) after which the command will be aborted - if no data has been transferred on the bus. - @param completionTimeout Specifies an amount of time (in ms) after which the command will be aborted if the entire command has - not been completed. - @param completion Function to call when request completes. If omitted then - DeviceRequest() executes synchronously, blocking until the request is complete. If the request is asynchronous, the client must make sure that - the IOUSBDevRequest is not released until the callback has occurred. - - */ - virtual IOReturn DeviceRequest(IOUSBDevRequest *request, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOUSBCompletion *completion = 0); - - /*! - @function DeviceRequest - @abstract execute a control request to the default control pipe (pipe zero) - @param request The parameter block to send to the device (with the pData as an IOMemoryDesriptor) - @param noDataTimeout Specifies an amount of time (in ms) after which the command will be aborted - if no data has been transferred on the bus. - @param completionTimeout Specifies an amount of time (in ms) after which the command will be aborted if the entire command has - not been completed. - @param completion Function to call when request completes. If omitted then - DeviceRequest() executes synchronously, blocking until the request is complete. If the request is asynchronous, the client must make sure that - the IOUSBDevRequest is not released until the callback has occurred. - - */ - OSMetaClassDeclareReservedUsed(IOUSBDevice, 1); - virtual IOReturn DeviceRequest(IOUSBDevRequestDesc *request, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOUSBCompletion *completion = 0); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 2); - /*! - @function SuspendDevice - @abstract Instruct the hub to which this device is attached to suspend or resume the port to which the device is attached. - Note that if there are any outstanding transactions on any pipes in the device, those transactions will get returned with a - kIOReturnNotResponding error. - @param suspend Boolean value. true = suspend, false = resume. - */ - virtual IOReturn SuspendDevice( bool suspend); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 3); - /*! - @function ReEnumerateDevice - @abstract Instruct the hub to which this device is attached to reset the port to which this device is attached. This causes the - IOUSBDevice object and any child objects (IOUSBInterface objects or driver objects) to be terminated, and the device to be - completely reenumerated, as if it had been detached and reattached. - @param options Reserved for future use. - */ - virtual IOReturn ReEnumerateDevice( UInt32 options ); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 4); - /*! - @function DisplayUserNotification - @abstract Will use the KUNCUserNotification mechanism to display a notification to the user. - @param notificationType Which notification to display. - */ - virtual void DisplayUserNotification(UInt32 notificationType); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 5); - /*! - @function MakePipe - @abstract build a pipe on a given endpoint - @param ep A description of the endpoint - @param interface The IOUSBInterface object requesting the pipe - returns the desired IOUSBPipe object - */ - virtual IOUSBPipe* MakePipe(const IOUSBEndpointDescriptor *ep, IOUSBInterface *interface); - - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 6); - /*! - @function SetHubParent - @abstract Used by the hub driver to give the nub a pointer to its HubPolicyMaker object - @param hubPolicyMaker The object representing the Hub driver - */ - virtual void SetHubParent(IOUSBHubPolicyMaker *hubParent); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 7); - /*! - @function GetHubParent - @abstract Used by the hub driver to give the nub a pointer to its HubPolicyMaker object - @param hubPolicyMaker The object representing the Hub driver - */ - virtual IOUSBHubPolicyMaker* GetHubParent(); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 8); - /*! - @function GetDeviceInformation - @abstract Returns status information about the USB device, such as whether the device is captive or whether it is in the suspended state. - @param requestedPower The desired amount of power that the client wishes to reserve - @result Actual power that was reserved - - */ - virtual IOReturn GetDeviceInformation(UInt32 *info); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 9); - /*! - @function RequestExtraPower - @abstract Clients can use this API to reserve extra power for use by this device while the machine is asleep or while it is awake. Units are milliAmps (mA). - @param type Indicates whether the power is to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake) - @param requestedPower Amount of power desired, in mA - @result Amount of power actually reserved, in mA. It can be less than the requested or zero. - - */ - virtual UInt32 RequestExtraPower(UInt32 type, UInt32 requestedPower); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 10); - /*! - @function ReturnExtraPower - @abstract Clients can use this API to tell the system that they will not use power that was previously reserved by using the RequestExtraPower API. - @param type Indicates whether the power is to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake) - @param returnedPower Amount of power that is no longer needed, in mA - @result If the returnedPower was not previously allocated, an error will be returned. This will include the case for power that was requested for sleep but was returned for wake. - - */ - virtual IOReturn ReturnExtraPower(UInt32 type, UInt32 returnedPower); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 11); - /*! - @function GetExtraPowerAllocated - @abstract Clients can use this API to ask how much extra power has already been reserved by this device. Units are milliAmps (mA). - @param type Indicates whether the allocated power was to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake) - @result Amount of power allocated, in mA. - - */ - virtual UInt32 GetExtraPowerAllocated(UInt32 type); - - OSMetaClassDeclareReservedUsed(IOUSBDevice, 12); - /*! - @function DoLocationOverrideAndModelMatch - @abstract Will look for a kOverrideIfAtLocationID array proerty with locationID entries and a "MacModel" property. If any of the locationIDs match to the Mac Model, will return true. - If there is no kOverrideAtLocationID property, it will also return true. - @result True if we have a match, false otherwise - */ - virtual bool DoLocationOverrideAndModelMatch(); - - OSMetaClassDeclareReservedUnused(IOUSBDevice, 13); - OSMetaClassDeclareReservedUnused(IOUSBDevice, 14); - OSMetaClassDeclareReservedUnused(IOUSBDevice, 15); - OSMetaClassDeclareReservedUnused(IOUSBDevice, 16); - OSMetaClassDeclareReservedUnused(IOUSBDevice, 17); - OSMetaClassDeclareReservedUnused(IOUSBDevice, 18); - OSMetaClassDeclareReservedUnused(IOUSBDevice, 19); - -private: - - static void ProcessPortResetEntry(OSObject *target); - void ProcessPortReset(void); - - void TerminateInterfaces(void); - - static void ProcessPortReEnumerateEntry(OSObject *target, thread_call_param_t options); - void ProcessPortReEnumerate(UInt32 options); - - static void DoMessageClientsEntry(OSObject *target, thread_call_param_t messageStruct); - void DoMessageClients( void * messageStructPtr); - - static void DisplayUserNotificationForDeviceEntry (OSObject *owner, IOTimerEventSource *sender); - void DisplayUserNotificationForDevice( ); - - UInt32 SimpleUnicodeToUTF8(UInt16 uChar, UInt8 utf8Bytes[4]); - void SwapUniWords (UInt16 **unicodeString, UInt32 uniSize); - - IOReturn TakeGetConfigLock(void); - IOReturn ReleaseGetConfigLock(void); - static IOReturn ChangeGetConfigLock(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); -}; - -#endif /* _IOKIT_IOUSBDEVICE_H */ diff --git a/i386/include/IOKit/usb/IOUSBHIDDriver.h b/i386/include/IOKit/usb/IOUSBHIDDriver.h deleted file mode 100644 index 5e76887..0000000 --- a/i386/include/IOKit/usb/IOUSBHIDDriver.h +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef IOUSBHIDDRIVER_H -#define IOUSBHIDDRIVER_H - -#include <IOKit/IOBufferMemoryDescriptor.h> - -#include <IOKit/hid/IOHIDDevice.h> - -#include <IOKit/usb/IOUSBBus.h> -#include <IOKit/usb/IOUSBInterface.h> -#include <IOKit/usb/USB.h> - - -#define ENABLE_HIDREPORT_LOGGING 0 - -// Report types from low level USB: -// from USBSpec.h: -// enum { -// kHIDRtInputReport = 1, -// kHIDRtOutputReport = 2, -// kHIDRtFeatureReport = 3 -// }; -// -// from IOHIDDescriptorParser.h: -// // types of HID reports (input, output, feature) -// enum -// { -// kHIDInputReport = 1, -// kHIDOutputReport, -// kHIDFeatureReport, -// kHIDUnknownReport = 255 -// }; -// -// Report types from high level HID Manager: -// from IOHIDKeys.h: -// enum IOHIDReportType -// { -// kIOHIDReportTypeInput = 0, -// kIOHIDReportTypeOutput, -// kIOHIDReportTypeFeature, -// kIOHIDReportTypeCount -// }; -// -#define HIDMGR2USBREPORTTYPE(x) (x + 1) -#define USB2HIDMGRREPORTTYPE(x) (x - 1) - - -// Note: In other Neptune files, kMaxHIDReportSize was defined as 64. But Ferg & Keithen were unable to -// find that value in the USB HID 1.1 specs. Brent had previously changed it to 256 in the OS 9 HID Driver -// to allow for reports spanning multiple packets. 256 may be no more a hard and fast limit, but it's -// working for now in OS 9. -#define kMaxHIDReportSize 256 // Max packet size = 8 for low speed & 64 for high speed. -#define kHIDDriverRetryCount 3 -#define kUSBHIDReportLoggingLevel "USB HID Report Logging Level" - - -// power states for the driver (awake or suspended) -enum -{ - kUSBHIDPowerStateOff = 0, - kUSBHIDPowerStateRestart = 1, - kUSBHIDPowerStateSleep = 2, // this could be system sleep or idle sleep - kUSBHIDPowerStateLowPower = 3, // this is idling - kUSBHIDPowerStateOn = 4, // this is fully on - kUSBHIDNumberPowerStates = 5 -}; - - -/*! - @class IOUSBHIDDriver - @abstract Driver that matches to USB HID devices. - @discussion This class can be overriden to provide for specific behaviors. - */ -class IOUSBHIDDriver : public IOHIDDevice -{ - OSDeclareDefaultStructors(IOUSBHIDDriver) - - IOUSBInterface * _interface; - IOUSBDevice * _device; - IOUSBPipe * _interruptPipe; - UInt32 _maxReportSize; - IOBufferMemoryDescriptor * _buffer; - IOUSBCompletion _completion; - UInt32 _retryCount; - thread_call_t _deviceDeadCheckThread; - thread_call_t _clearFeatureEndpointHaltThread; - bool _deviceDeadThreadActive; - bool _deviceIsDead; // Should really be called "abort expected" - bool _deviceHasBeenDisconnected; - bool _needToClose; - UInt32 _outstandingIO; - IOCommandGate * _gate; - IOUSBPipe * _interruptOutPipe; - UInt32 _locationID; - IOBufferMemoryDescriptor * _outBuffer; // Obsolete - UInt32 _deviceUsage; // Obsolete - UInt32 _deviceUsagePage; // Obsolete - - struct IOUSBHIDDriverExpansionData - { - IOWorkLoop * _workLoop; - thread_call_t _handleReportThread; - IOService * _rootDomain; - AbsoluteTime _wakeUpTime; - IOUSBCompletionWithTimeStamp _completionWithTimeStamp; - bool _checkForTimeStamp; - UInt32 _msToIgnoreTransactionsAfterWake; - IOTimerEventSource * _suspendPortTimer; - bool _portSuspended; - UInt32 _suspendTimeoutInMS; - UInt8 _interfaceNumber; - bool _logHIDReports; - UInt8 _hidLoggingLevel; - bool _needToClearPipeStall; - SInt32 _queuedReports; - AbsoluteTime _interruptTimeStamp; - bool _powerStateChanging; - unsigned long _myPowerState; - bool _pendingRead; - UInt32 _deviceDeadCheckLock; // "Lock" to prevent us from executing the device dead check while in progress - }; - IOUSBHIDDriverExpansionData *_usbHIDExpansionData; - - static void InterruptReadHandlerEntry(OSObject *target, void *param, IOReturn status, UInt32 bufferSizeRemaining); - static void InterruptReadHandlerWithTimeStampEntry(OSObject *target, void *param, IOReturn status, UInt32 bufferSizeRemaining, AbsoluteTime timeStamp); - void InterruptReadHandler(IOReturn status, UInt32 bufferSizeRemaining, AbsoluteTime timeStamp); - - static void CheckForDeadDeviceEntry(OSObject *target); - void CheckForDeadDevice(); - - static void ClearFeatureEndpointHaltEntry(OSObject *target); - void ClearFeatureEndpointHalt(void); - - static void HandleReportEntry(OSObject *target, thread_call_param_t timeStamp); - void HandleReport(AbsoluteTime timeStamp); - - virtual void processPacket(void *data, UInt32 size); // Obsolete - - static IOReturn ChangeOutstandingIO(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); - static IOReturn ClaimPendingRead(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); - - static void SuspendPortTimer(OSObject *target, IOTimerEventSource *sender); - -public: - - // IOService methods - // - virtual bool init(OSDictionary *properties); - virtual bool start(IOService * provider); - virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer ); - virtual bool willTerminate( IOService * provider, IOOptionBits options ); - virtual void stop(IOService * provider); - virtual void free(); - virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); - virtual unsigned long maxCapabilityForDomainState ( IOPMPowerFlags domainState ); - virtual IOReturn powerStateWillChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); - virtual IOReturn setPowerState ( unsigned long powerStateOrdinal, IOService* whatDevice ); - virtual IOReturn powerStateDidChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); - virtual void powerChangeDone ( unsigned long fromState); - - - // IOHIDDevice methods - // - virtual bool handleStart(IOService * provider); - virtual void handleStop(IOService * provider); - - virtual IOReturn newReportDescriptor( IOMemoryDescriptor ** descriptor ) const; - - virtual OSString * newTransportString() const; - - virtual OSNumber * newVendorIDNumber() const; - - virtual OSNumber * newProductIDNumber() const; - - virtual OSNumber * newVersionNumber() const; - - virtual OSString * newManufacturerString() const; - - virtual OSString * newProductString() const; - - virtual OSString * newSerialNumberString() const; - - virtual OSNumber * newLocationIDNumber() const; - - virtual OSNumber * newCountryCodeNumber() const; - - virtual IOReturn getReport( IOMemoryDescriptor * report, - IOHIDReportType reportType, - IOOptionBits options = 0 ); - - virtual IOReturn setReport( IOMemoryDescriptor * report, - IOHIDReportType reportType, - IOOptionBits options = 0 ); - - // HID driver methods - // - virtual OSString * newIndexedString(UInt8 index) const; - - virtual UInt32 getMaxReportSize(); - - virtual void DecrementOutstandingIO(void); - virtual void IncrementOutstandingIO(void); - virtual IOReturn StartFinalProcessing(); - virtual IOReturn SetIdleMillisecs(UInt16 msecs); - -private: - - IOReturn GetHIDDescriptor(UInt8 inDescriptorType, UInt8 inDescriptorIndex, UInt8 *vOutBuf, UInt32 *vOutSize); - IOReturn GetReport(UInt8 inReportType, UInt8 inReportID, UInt8 *vInBuf, UInt32 *vInSize); - IOReturn SetReport(UInt8 outReportType, UInt8 outReportID, UInt8 *vOutBuf, UInt32 vOutSize); - IOReturn GetIndexedString(UInt8 index, UInt8 *vOutBuf, UInt32 *vOutSize, UInt16 lang = 0x409) const; - IOReturn SetProtocol(UInt32 protocolType); - char GetHexChar(char hexChar); - IOReturn AbortAndSuspend( bool suspend ); - - - -#if ENABLE_HIDREPORT_LOGGING - void LogBufferReport(char *report, UInt32 len); - void LogMemReport(IOMemoryDescriptor * reportBuffer); - char GetHexChar(char hexChar); -#endif - -public: - OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 0); - virtual IOReturn RearmInterruptRead(); - - /*! - @function SuspendPort - @abstract Suspends the port for this device or optionally sets a timeout to suspend after a period of inactivity. - @discussion This call can be used to immediately suspend/resume a port or to enable the suspension of the port after a period of inactivity. If called with suspendPort = true (no timeout parameter), the HID driver - will immediately suspend the port, after aborting any outstanding reads on the interrupt pipe. If called with suspendPort = true and timeout != 0, it will suspend the port after the timeout number of ms have - passed without any read completions. If called with suspendPort = false, the port will be immediately resumed and the reads will be re-issued. If a timeout was enabled, it will be cancelled. - @param suspendPort Boolean value. true = suspend the port, false = resume the port. - @param timeoutMS Value in milliseconds If value is non-zero, the port will be suspended after the timeout milliseconds have passed without any read completions. - @result The IOReturn value from the IOUSBDevice::Suspend() call. - */ - OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 1); - virtual IOReturn SuspendPort(bool suspendPort, UInt32 timeoutMS = 0); - - OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 2); - virtual bool IsPortSuspended(); - - OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 3); - virtual void LogMemReport(UInt8 level, IOMemoryDescriptor * reportBuffer, IOByteCount size); - - OSMetaClassDeclareReservedUsed(IOUSBHIDDriver, 4); - virtual IOReturn InitializeUSBHIDPowerManagement(IOService *provider); - - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 5); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 6); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 7); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 8); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 9); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 10); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 11); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 12); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 13); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 14); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 15); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 16); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 17); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 18); - OSMetaClassDeclareReservedUnused(IOUSBHIDDriver, 19); -}; - -#endif // IOUSBHIDDRIVER_H diff --git a/i386/include/IOKit/usb/IOUSBHubDevice.h b/i386/include/IOKit/usb/IOUSBHubDevice.h deleted file mode 100644 index 91c728c..0000000 --- a/i386/include/IOKit/usb/IOUSBHubDevice.h +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __OPEN_SOURCE__ -/* - * - * $Log: IOUSBHubDevice.h,v $ - * Revision 1.11 2009/09/12 03:42:16 rhoads - * merge in the changes for the 390.3.4b QL - * - * Revision 1.10.52.1 2009/09/10 18:50:52 nano - * <rdar://problem/7134800> Task: Extra Current support for Ibex Peak RMHs -- look for a property that tells us to ask our USB plane parent for the extra current. This will allow the RMH to pass on the request to it's parent. - * - * Revision 1.10 2009/05/07 19:43:09 nano - * Move our SnowLeopard branch to TOT - * - * Revision 1.6.102.3 2008/06/16 22:02:16 nano - * Bring in changes from Foxound 320.2.19 - * - - * Revision 1.6.102.2 2008/04/22 22:38:01 nano - * Bring in changes from Foxhound-320.2.9 - * - * Revision 1.8.62.2 2008/06/06 21:08:44 nano - * Enable dynamic allocation of power for M89, so we don't reserve it if there isn't a high power device attached - * - * Revision 1.8.62.1 2008/06/06 04:14:32 nano - * Fix SleepCurrent allocation so it will work with hub devices and root hub devices as well as consolidating it across all controllers - * - * Revision 1.8 2008/04/17 16:56:57 nano - * Bring in branches for rdar://5867990 & rdar://5768343 - * - * Revision 1.7.4.1 2008/04/17 15:54:07 nano - * Merged PR-5768343 into this branch and fixed a couple of issues - * - * Revision 1.7.2.1 2008/04/16 00:48:49 ferg - * Bug #: 5768343 - * Add support for hubs with high-power downstream port capability. This is - * controlled by the properties "AAPL,current-available" and "AAPL,current-extra". - * - * Revision 1.7 2008/04/14 16:08:38 nano - * Add new APIs for high power and for GetDeviceInformation. - * - * Revision 1.6.144.1 2008/04/11 22:25:44 nano - * Initial work on new user-client APIs and new IOUSBDevice APIs to return port state information and manage extra power requests, as well as groundwork for calling the policy maker directly from the IOUSBDevice - * - * Revision 1.6 2007/08/01 16:10:18 rhoads - * roll in extra power changes - * - * Revision 1.5.118.1 2007/07/27 16:49:10 rhoads - * merge the extra current stuff into Leopard, and add extra sleep current for self powered hubs - * - * Revision 1.5 2007/01/20 00:47:01 rhoads - * roll in Hub Policy Maker changes - * - * Revision 1.4 2006/12/22 23:05:46 rhoads - * roll in branches 4364835 and 4277683-2 - * - * Revision 1.3.20.3 2007/01/15 19:58:07 rhoads - * saving more changes - * - * Revision 1.3.20.2 2007/01/09 21:55:53 rhoads - * commit some stuff to try to fix a permissions issue - * - * Revision 1.3.20.1 2006/12/18 19:13:56 rhoads - * re-integrate the old branch into TOT - * - * Revision 1.3.12.4 2006/12/18 17:33:48 rhoads - * looking good except for sleep/wake - * - * Revision 1.3.12.3 2006/12/08 05:42:40 rhoads - * mostly working - * - * Revision 1.3.12.2 2006/11/14 22:37:06 rhoads - * more changes with the root hubs - * - * Revision 1.3.12.1 2006/11/07 16:55:52 rhoads - * change to get the IOUSBHubDevice nubs into the IOPower tree - * - * Revision 1.3 2006/10/06 04:42:02 rhoads - * roll in branches 4727961, 4758404, 4759810, 4760274, and 4762769 - * - * Revision 1.2.4.2 2006/10/04 23:01:24 rhoads - * better naming - * - * Revision 1.2.4.1 2006/10/04 16:03:57 rhoads - * better IOUSBHubDevice design - * - */ -#endif - - -#ifndef _IOKIT_IOUSBHUBDEVICE_H -#define _IOKIT_IOUSBHUBDEVICE_H - -#include <IOKit/usb/IOUSBDevice.h> // our superclass - -// forward refeference. we don't include the header file because it would cause a circular reference -class IOUSBHubPolicyMaker; - -enum { - kIOUSBHubDeviceIsRootHub = 0x0001, - kIOUSBHubDeviceIsOnHighSpeedBus = 0x0002, - kIOUSBHubDeviceCanSleep = 0x0004 -}; - -/*! - @class IOUSBHubDevice - @abstract New in MAC OS X 10.5. The IOKit object representing a hub device on the USB bus. It is a subclass of IOUSBDevice. - @discussion With the exception of the IOUSBRootHubDevice objects representing the root hubs, every IOUSBDevice - will have an IOUSBHubDevice as its parent in the IOUSB plane. USB KEXT drivers will have the ability to - query this device for characteristics of the hub into which they are connected. This class will also give a dive driver - the abilty to get an IOService* pointing to the hub driver itself, which can then be used as the parent in the power plane. -*/ - -class IOUSBHubDevice : public IOUSBDevice -{ - friend class IOUSBHubPolicyMaker; - friend class AppleUSBHub; - friend class IOUSBController; // for the "can sleep" characteristic - -private: - OSDeclareDefaultStructors(IOUSBHubDevice) - - UInt32 _myCharacteristics; // bitmap of my characteristics - IOUSBHubPolicyMaker *_myPolicyMaker; // pointer to the policy maker in the IOPower tree for this hub - - struct ExpansionData - { - UInt32 _maxPortCurrent; // maximum current in milliamps per downstream port - UInt32 _totalExtraCurrent; // total amount of current above the spec'ed current per port available (during normal operation) - UInt32 _totalSleepCurrent; // total amount of current that can be drawn during sleep - UInt32 _canRequestExtraPower; // If 0, this hub does not support requesting extra power from its parent, non-zero: how much power we need to request in order to give out _extraPowerForPorts - UInt32 _extraPowerForPorts; // Of the power requested from our parent, how much can we parcel out -- the rest is consumed by voltage drop thru the cable - UInt32 _extraPowerAllocated; // Amount of power that we actually got from our parent - bool _requestFromParent; // True if we are to request the extra power from our parent, without modifying the request. Used for RMHs - }; - ExpansionData *_expansionData; - -protected: - // IOUSBHubDevice methods which will be used by the hub driver (which is also the Policy Maker) - virtual void SetPolicyMaker(IOUSBHubPolicyMaker *policyMaker); - virtual void SetHubCharacteristics(UInt32); - virtual bool InitializeCharacteristics(void); // used at start - -public: - // static constructor - static IOUSBHubDevice *NewHubDevice(void); - - // IOKit methods - virtual bool init(); - virtual bool start( IOService * provider ); - virtual void stop( IOService *provider ); - virtual void free(); - - // public IOUSBHubDevice methods - - void SetTotalSleepCurrent(UInt32 sleepCurrent); - UInt32 GetTotalSleepCurrent(); - - /*! - @function GetPolicyMaker - returns a pointer to the policy maker for the hub, which can be used as the power plane parent. - @result returns an IOUSBHubPolicyMaker* pointing to the policy maker for this hub. returns NULL is no policy maker is active on the hub device. - */ - virtual IOUSBHubPolicyMaker *GetPolicyMaker(void); - - /*! - @function GetHubCharacteristics - returns characteristics of the hub device which might be useful for the driver of a device connected to the hub. - kIOUSBHubDeviceIsRootHub indicates that the hub is a root hub - kIOUSBHubDeviceIsOnHighSpeedBus indicates that the hub is running on a High Speed bus. If this bit is set and kIOUSBHubDeviceIsHighSpeed is clear, then this is a Classic Speed hub running on a High Speed bus, which means that Split Transactions will be used to communicate with downstream devices. - - @result returns a bitmap of characteristics - */ - virtual UInt32 GetHubCharacteristics(); - - /*! - @function GetMaxProvidedPower - returns the maximum amount of power available on any downstream port of this hub - @result the power is returned in milliamps - usually 100ma or 500 ma. - */ - virtual UInt32 GetMaxProvidedPower(); - - /*! - @function RequestProvidedPower - requests power from the hub device - @param requestedPower - the amount of power requested in milliamps (usually 100ma or 500 ma) - @result the amount of power allocated for this driver in milliamps (usually 100ma or 500 ma) - */ - virtual UInt32 RequestProvidedPower(UInt32 requestedPower); - - virtual UInt32 RequestExtraPower(UInt32 requestedPower); - - virtual void ReturnExtraPower(UInt32 returnedPower); - - OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 0); - - virtual void InitializeExtraPower(UInt32 maxPortCurrent, UInt32 totalExtraCurrent); - - OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 1); - virtual UInt32 RequestSleepPower(UInt32 requestedPower); - - OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 2); - virtual void ReturnSleepPower(UInt32 returnedPower); - - OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 3); - virtual void SetSleepCurrent(UInt32 sleepCurrent); - - OSMetaClassDeclareReservedUsed(IOUSBHubDevice, 4); - virtual UInt32 GetSleepCurrent(); - - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 5); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 6); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 7); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 8); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 9); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 10); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 11); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 12); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 13); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 14); - OSMetaClassDeclareReservedUnused(IOUSBHubDevice, 15); -}; - -#endif /* _IOKIT_IOUSBROOTHUBDEVICE_H */ - diff --git a/i386/include/IOKit/usb/IOUSBHubPolicyMaker.h b/i386/include/IOKit/usb/IOUSBHubPolicyMaker.h deleted file mode 100644 index a0021d3..0000000 --- a/i386/include/IOKit/usb/IOUSBHubPolicyMaker.h +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright (c) 2007 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __OPEN_SOURCE__ -/* - * - * $Log: IOUSBHubPolicyMaker.h,v $ - * Revision 1.10 2009/05/07 19:43:09 nano - * Move our SnowLeopard branch to TOT - * - * Revision 1.7.72.3 2008/07/23 17:43:32 nano - * <rdar://problem/5939357> IOUSBHIDDriver, IOHIDEventService missing HeaderDoc class declarations - * - * Revision 1.7.72.2 2008/04/22 22:38:01 nano - * Bring in changes from Foxhound-320.2.9 - * - * Revision 1.9 2008/04/17 16:56:57 nano - * Bring in branches for rdar://5867990 & rdar://5768343 - * - * Revision 1.8.4.1 2008/04/16 20:26:15 nano - * <rdar://problem/5867990> Add API to allocate sleep current, as well as making sure that we return any extra power if our client dies or our device is terminated without returning it - * - * Revision 1.8 2008/04/14 16:08:38 nano - * Add new APIs for high power and for GetDeviceInformation. - * - * Revision 1.7.114.1 2008/04/11 22:25:44 nano - * Initial work on new user-client APIs and new IOUSBDevice APIs to return port state information and manage extra power requests, as well as groundwork for calling the policy maker directly from the IOUSBDevice - * - * Revision 1.7 2007/08/17 22:41:11 nano - * Bring in branch that fixes <rdar://problem/5414582> USB not honoring Resume recovery time (hub driver) and adds extra time for iPods - * - * Revision 1.6.30.1 2007/08/16 19:14:02 nano - * ResumeRecovery additions. - * - * Revision 1.6 2007/08/01 16:10:18 rhoads - * roll in extra power changes - * - * Revision 1.5.12.1 2007/07/27 16:49:10 rhoads - * merge the extra current stuff into Leopard, and add extra sleep current for self powered hubs - * - * Revision 1.5 2007/07/20 22:31:22 rhoads - * roll in branch300-3-2 - * - * Revision 1.4.40.1 2007/07/18 18:44:24 rhoads - * this is the 300.3.2g version plus some quieter logs - * - * Revision 1.4.34.2 2007/07/17 06:30:35 rhoads - * more hub chain fixes - * - * Revision 1.4.34.1 2007/07/16 16:45:00 rhoads - * more power management and termination tweaks - * - * Revision 1.4 2007/05/18 01:59:12 rhoads - * roll in 5112084 and 5204170 - * - * Revision 1.3.2.1 2007/05/15 18:23:48 rhoads - * some initial power state bug fixes - * - * Revision 1.3 2007/05/10 22:25:35 rhoads - * roll in branch 5113395 - the last major piece of the new power architecture - * - * Revision 1.2.64.4 2007/04/13 22:34:59 rhoads - * fix restart and shutdown - * - * Revision 1.2.64.3 2007/04/11 23:56:23 rhoads - * first mostly working dozing hub - * - * Revision 1.2.64.2 2007/04/10 02:09:09 rhoads - * got UHCI almost working - * - * Revision 1.2.64.1 2007/04/05 02:57:50 rhoads - * move power management out of AppleUSBHub and into IOUSBHubPolicyMaker - * - * Revision 1.2 2007/01/20 00:47:01 rhoads - * roll in Hub Policy Maker changes - * - * Revision 1.1.2.4 2007/01/18 22:51:08 rhoads - * add some padding - * - * Revision 1.1.2.3 2007/01/15 19:58:07 rhoads - * saving more changes - * - * Revision 1.1.2.2 2007/01/09 23:55:36 rhoads - * working version - * - * Revision 1.1.2.1 2007/01/09 21:57:02 rhoads - * commit some stuff to try to fix a permissions issue - * - * - */ -#endif -#ifndef _IOKIT_IOUSBHUBPOLICYMAKER_H -#define _IOKIT_IOUSBHUBPOLICYMAKER_H - -#include <IOKit/IOService.h> -#include <IOKit/usb/IOUSBController.h> -#include <IOKit/usb/IOUSBHubDevice.h> - - -enum { - kIOUSBHubPowerStateOff = 0, // losing power - kIOUSBHubPowerStateRestart = 1, // reseting bus, but may maintain power - kIOUSBHubPowerStateSleep = 2, // upstream port and all downstream ports suspended (from the top) - kIOUSBHubPowerStateLowPower = 3, // upstream port and all downstream ports suspended (from the bottom) - kIOUSBHubPowerStateOn = 4, // upstream port and at least one downstream port on - kIOUSBHubNumberPowerStates = 5 -}; - -enum { - kHubResumeRecoveryTime = 10, // 10 ms to recover after I resume myself - kPortResumeRecoveryTime = 10 // 10 ms to recover another device -}; - -#define kIOUSBHubPowerStateStable -1 - -/*! - @class IOUSBHubPolicyMaker - @abstract Super class for Hub drivers to incorporate common Power Management code. - */ -class IOUSBHubPolicyMaker : public IOService -{ - OSDeclareAbstractStructors(IOUSBHubPolicyMaker) - -protected: - IOUSBControllerV2 * _bus; - IOUSBHubDevice * _device; // our provider - IOUSBHubDevice * _parentHubDevice; // for non root hub drivers, this is the hub device that my hub device is connected to - bool _isRootHub; // this is a root hub - bool _dozeEnabled; // true if the controller has been enabled to go into doze mode - bool _dontAllowLowPower; // If true, we will not allow the hub to go into low power mode. - bool _dontAllowSleepPower; // If true, we will not allow extra sleep power for a self powered hub. - SInt32 _powerStateChangingTo; // a power state if we are changing to one, or -1 if we are stable - unsigned long _myPowerState; // my current state (since getPowerState doesn't always change in time) - UInt32 _extraPower; // how much extra power we might be able to get from our parent hub - UInt32 _extraPowerRemaining; // how many milliamps we can still give to any one port - UInt32 _hubResumeRecoveryTime; // # of ms that we will wait before issuing any transactions on our port (nominally 10ms) - struct ExpansionData - { - }; - ExpansionData *_expansionData; - -public: - // IOService methods - virtual bool start(IOService * provider); - virtual IOReturn powerStateWillChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); - virtual unsigned long powerStateForDomainState ( IOPMPowerFlags domainState ); - virtual IOReturn setPowerState ( unsigned long powerStateOrdinal, IOService* whatDevice ); - virtual IOReturn powerStateDidChangeTo ( IOPMPowerFlags capabilities, unsigned long stateNumber, IOService* whatDevice); - virtual unsigned long maxCapabilityForDomainState ( IOPMPowerFlags domainState ); - virtual void powerChangeDone ( unsigned long fromState ); - - // public methods which MAY be implemented in subclass - virtual IOReturn EnsureUsability(void); - - // Extra Port Power calls - void AllocateExtraPower(); - IOReturn GetExtraPortPower(UInt32 portNum, UInt32 *extraPower); - IOReturn ReturnExtraPortPower(UInt32 portNum, UInt32 extraPower); - - // virtual methods to be implemented in the controlling driver subclass - virtual bool ConfigureHubDriver(void) = 0; - virtual IOReturn HubPowerChange(unsigned long powerStateOrdinal) = 0; - - OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 0); - virtual IOReturn GetPortInformation(UInt32 portNum, UInt32 *info); - - OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 1); - virtual IOReturn ResetPort(UInt32 portNum); - - OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 2); - virtual IOReturn SuspendPort(UInt32 portNum, bool suspend); - - OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 3); - virtual IOReturn ReEnumeratePort(UInt32 portNum, UInt32 options); - - OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 4); - virtual UInt32 RequestExtraPower(UInt32 portNum, UInt32 type, UInt32 requestedPower); - - OSMetaClassDeclareReservedUsed(IOUSBHubPolicyMaker, 5); - virtual IOReturn ReturnExtraPower(UInt32 portNum, UInt32 type, UInt32 returnedPower); - - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 6); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 7); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 8); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 9); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 10); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 11); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 12); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 13); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 14); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 15); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 16); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 17); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 18); - OSMetaClassDeclareReservedUnused(IOUSBHubPolicyMaker, 19); -}; - -#endif _IOKIT_IOUSBHUBPOLICYMAKER_H diff --git a/i386/include/IOKit/usb/IOUSBInterface.h b/i386/include/IOKit/usb/IOUSBInterface.h deleted file mode 100644 index 4777e50..0000000 --- a/i386/include/IOKit/usb/IOUSBInterface.h +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright (c) 1998-2007 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBINTERFACE_H -#define _IOKIT_IOUSBINTERFACE_H - -#include <IOKit/IOService.h> -#include <libkern/c++/OSData.h> - -#include <IOKit/usb/USB.h> -#include <IOKit/usb/IOUSBNub.h> -#include <IOKit/usb/IOUSBDevice.h> - -/*! - @class IOUSBInterface - @abstract The object representing an interface of a device on the USB bus. - @discussion This class provides functionality to find the pipes of an interface and - to read the descriptors associated with an interface. When an interface is open()ed, - all its pipes are created -*/ -class IOUSBInterface : public IOUSBNub -{ - friend class IOUSBInterfaceUserClientV2; - - OSDeclareDefaultStructors(IOUSBInterface) - -protected: - IOUSBPipe * _pipeList[kUSBMaxPipes]; - const IOUSBConfigurationDescriptor *_configDesc; - const IOUSBInterfaceDescriptor * _interfaceDesc; - IOUSBDevice * _device; - - // these variable are the parsed interface descriptor - UInt8 _bInterfaceNumber; - UInt8 _bAlternateSetting; - UInt8 _bNumEndpoints; - UInt8 _bInterfaceClass; - UInt8 _bInterfaceSubClass; - UInt8 _bInterfaceProtocol; - UInt8 _iInterface; - - struct ExpansionData { - IOCommandGate *_gate; - IOWorkLoop *_workLoop; - bool _needToClose; - IOLock * _pipeObjLock; // Lock to synchronize accesses to our pipeObjects - }; - ExpansionData * _expansionData; - - // private methods - virtual void ClosePipes(void); // close all pipes (except pipe zero) - virtual IOReturn CreatePipes(void); // open all pipes in the current interface/alt interface - virtual void SetProperties(void); // update my property table with the correct properties - -public: - // static methods - static IOUSBInterface *withDescriptors(const IOUSBConfigurationDescriptor *cfDesc, const IOUSBInterfaceDescriptor *ifDesc); - static IOReturn CallSuperOpen(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); - static IOReturn CallSuperClose(OSObject *target, void *arg0, void *arg1, void *arg2, void *arg3); - static UInt8 hex2char( UInt8 digit ); - - // IOService methods - virtual bool start(IOService * provider); - virtual bool handleOpen(IOService *forClient, IOOptionBits options = 0, void *arg = 0 ); - virtual bool open(IOService *forClient, IOOptionBits options = 0, void *arg = 0 ); - virtual void close(IOService *forClient, IOOptionBits options = 0); - virtual void handleClose(IOService *forClient, IOOptionBits options = 0); - virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); - virtual bool finalize(IOOptionBits options); - virtual void stop(IOService * provider); - virtual bool terminate( IOOptionBits options = 0 ); - virtual void free(); - - // IOUSBInterface class methods - virtual bool init( const IOUSBConfigurationDescriptor *cfDesc, - const IOUSBInterfaceDescriptor *ifDesc); - /*! - @function FindNextAltInterface - return alternate interface descriptor satisfying the requirements specified in request, or NULL if there aren't any. - request is updated with the properties of the returned interface. - @param current interface descriptor to start searching from, NULL to start at alternate interface 0. - @param request specifies what properties an interface must have to match. - @result Pointer to a matching interface descriptor, or NULL if none match. - */ - virtual const IOUSBInterfaceDescriptor *FindNextAltInterface(const IOUSBInterfaceDescriptor *current, - IOUSBFindInterfaceRequest *request); - - /*! - @function FindNextPipe - Find a pipe of the interface that matches the requirements, either - starting from the beginning of the interface's pipe list or from a specified - pipe. - @param current Pipe to start searching from, NULL to start from beginning of list. - @param request Requirements for pipe to match, updated with the found pipe's - properties. - @result Pointer to the pipe, or NULL if no pipe matches the request. - */ - virtual IOUSBPipe *FindNextPipe(IOUSBPipe *current, IOUSBFindEndpointRequest *request); - - /*! - @function FindNextAssociatedDescriptor - Find the next descriptor of the requested type associated with the interface. - @param current Descriptor to start searching from, NULL to start from beginning of list. - @param type Descriptor type to search for, or kUSBAnyDesc to return any descriptor type. - @result Pointer to the descriptor, or NULL if no matching descriptors found. - */ - virtual const IOUSBDescriptorHeader * FindNextAssociatedDescriptor(const void *current, UInt8 type); - - /*! - @function SetAlternateInterface - Select the specified alternate interface. - @param forClient The client requesting the alternate setting. This client must have the interface open in order to perform the request. - @param alternateSetting Alternate setting (from the alternate interface's interface descriptor). - @result exclusive access error if the interface is not open. otherwise the result of the transaction - */ - virtual IOReturn SetAlternateInterface(IOService *forClient, UInt16 alternateSetting); - - /*! - @function GetPipeObj - returns a handle to the pipe at the corresponding index - @param index value from zero to kUSBMaxPipes-1 - @result The IOUSBPipe object. Note that the client does not own a reference to this pipe, so the client should retain() the IOUSBPipe object if necessary. - */ - virtual IOUSBPipe *GetPipeObj(UInt8 index); - /*! - @function GetConfigValue - returns the device configuration value for the interface - @result The device configuration value. - */ - virtual UInt8 GetConfigValue(); - /*! - @function GetDevice - returns the device the interface is part of. - @result Pointer to the IOUSBDevice object which is the parent of this IOUSBInterface object. - */ - virtual IOUSBDevice *GetDevice(); - /*! - @function GetInterfaceNumber - returns the zero based value identifying the index in the array of concurrent - interfaces supported by the current configuration - @result the interface index - */ - virtual UInt8 GetInterfaceNumber(); - /*! - @function GetAlternateSetting - returns the alternate setting for this interface. - @result the alternate setting - */ - virtual UInt8 GetAlternateSetting(); - /*! - @function GetNumEndpoints - returns the number of endpoints used by this interface (excluding - device endpoint zero. If the value is zero, this interface only - uses endpoint zero. - @result the number of endpoints - */ - virtual UInt8 GetNumEndpoints(); - /*! - @function GetInterfaceClass - returns the class code for this interface (assigned by the USB) - a value of zero is reserved - if the value is FFh, the interface class is vendor-specific - all other values are reserved for assignment by the USB - @result the interface class - */ - virtual UInt8 GetInterfaceClass(); - /*! - @function GetInterfaceSubClass - returns the subclass code (assigned by the USB). - These codes are qualified by the value returned by GetInterfaceClass - @result the interface subclass - */ - virtual UInt8 GetInterfaceSubClass(); - /*! - @function GetInterfaceProtocol - returns the protocol code (assigned by the USB). - @result the interface index - */ - virtual UInt8 GetInterfaceProtocol(); - /*! - @function GetInterfaceStringIndex - returns the index of the string descriptor describing the interface - @result the string index - */ - virtual UInt8 GetInterfaceStringIndex(); - - /*! - @function DeviceRequest - @abstract Sends a control request to the default control pipe in the device (pipe zero) - @param request The parameter block to send to the device - @param completion Function to call when request completes. If omitted then - DeviceRequest() executes synchronously, blocking until the request is complete. If the request is asynchronous, the client must make sure that - the IOUSBDevRequest is not released until the callback has occurred. - */ - virtual IOReturn DeviceRequest(IOUSBDevRequest *request, IOUSBCompletion *completion = 0); - - /*! - @function DeviceRequest - @abstract Sends a control request to the default control pipe in the device (pipe zero) - @param request The parameter block to send to the device (with the pData as an IOMemoryDesriptor) - @param completion Function to call when request completes. If omitted then - DeviceRequest() executes synchronously, blocking until the request is complete. If the request is asynchronous, the client must make sure that - the IOUSBDevRequest is not released until the callback has occurred. - */ - virtual IOReturn DeviceRequest(IOUSBDevRequestDesc *request, IOUSBCompletion *completion = 0); - - virtual bool matchPropertyTable(OSDictionary * table, SInt32 *score); - - OSMetaClassDeclareReservedUsed(IOUSBInterface, 0); - /*! - @function GetEndpointProperties - @abstract Returns the properties of an endpoint, possibly in an alternate interface. - @param alternateSetting specifies the desired alternate setting - @param endpointNumber specifies the endpoint number - @param direction specifies the direction (kUSBIn, kUSBOut) - @param transferType a pointer to hold the transfer type (kUSBControl, kUSBBulk, etc.) of the endpoint if found. - @param maxPacketSize a pointer to hold the maxPacketSize in the endpoint descriptor. - @param interval a pointer to hold the interval value in the endpoint descriptor. - @result returns kIOReturnSuccess if the endpoint is found, and kIOUSBEndpointNotFound if it is not. - */ - virtual IOReturn GetEndpointProperties(UInt8 alternateSetting, UInt8 endpointNumber, UInt8 direction, UInt8 *transferType, UInt16 *maxPacketSize, UInt8 *interval); - - OSMetaClassDeclareReservedUnused(IOUSBInterface, 1); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 2); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 3); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 4); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 5); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 6); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 7); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 8); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 9); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 10); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 11); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 12); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 13); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 14); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 15); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 16); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 17); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 18); - OSMetaClassDeclareReservedUnused(IOUSBInterface, 19); -}; - -#endif /* _IOKIT_IOUSBINTERFACE_H */ diff --git a/i386/include/IOKit/usb/IOUSBLog.h b/i386/include/IOKit/usb/IOUSBLog.h deleted file mode 100644 index 7f8f2a3..0000000 --- a/i386/include/IOKit/usb/IOUSBLog.h +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Copyright © 1998-20010 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBLOG_H -#define _IOKIT_IOUSBLOG_H - -#include <IOKit/IOService.h> -#include <IOKit/IOLib.h> - - -#ifdef __cplusplus - extern "C" { -#endif - -// USB Specific defines -#define USBLog( LEVEL, ARGS...) KernelDebugLogTag( LEVEL, 'USBF', ## ARGS ) -#define USBError( LEVEL, ARGS...) KernelDebugLogInternal( ( LEVEL ), 'USBF', ## ARGS ) -#define USBStringFromReturn( IORETURN) (IOUSBController::_log)->stringFromReturn( IORETURN ) - - -// Possible Debug levels. If DEBUG_LEVEL is set to DEBUG_LEVEL_PRODUCTION, all debug logs will be -// stripped of the final code. - -#define DEBUG_LEVEL_PRODUCTION 0 -#define DEBUG_LEVEL_DEVELOPMENT 1 -#define DEBUG_LEVEL_ALPHA 2 -#define DEBUG_LEVEL_BETA 3 -#define DEBUG_LEVEL_FINAL DEBUG_LEVEL_PRODUCTION - -// Allow clients to define their own debug level. - -#if ( !defined( DEBUG_LEVEL ) ) - #define DEBUG_LEVEL DEBUG_LEVEL_PRODUCTION -#endif - -// Index for user client methods -// -enum -{ - kUSBControllerUserClientOpen = 0, - kUSBControllerUserClientClose, - kUSBControllerUserClientEnableLogger, - kUSBControllerUserClientSetDebuggingLevel, - kUSBControllerUserClientSetDebuggingType, - kUSBControllerUserClientGetDebuggingLevel, - kUSBControllerUserClientGetDebuggingType, -#ifndef __OPEN_SOURCE__ - kUSBControllerUserClientSetTestMode, - kUSBControllerUserClientReadRegister, - kUSBControllerUserClientWriteRegister, - kUSBControllerUserClientMessageController, -#endif - kNumUSBControllerMethods -}; - -#ifndef __OPEN_SOURCE__ -// Enums for the private kIOUSBMessageController message -enum -{ - kIOUSBMessageControllerDoGPIOReset = 0x00000001 -}; -#endif - -// Info Debug Output Types. - -typedef UInt32 KernelDebuggingOutputType; -enum -{ - kKernelDebugOutputIOLogType = 0x00000001, - kKernelDebugOutputKextLoggerType = 0x00000002 -}; - - -// Info Debug levels. - -typedef UInt32 KernelDebugLevel; -enum -{ - kKernelDebugInfoLevel = 1000, - kKernelDebugRareInfoLevel = 2000, - kKernelDebugAllowedErrorLevel = 3000, - kKernelDebugAssertLevel = 4000, - kKernelDebugRequireLevel = 5000, - kKernelDebugErrorLevel = 6000, - kKernelDebugCriticalErrorLevel = 7000, - kKernelDebugTragicErrorLevel = 8000, - kKernelDebugAnyLevel = 0 -}; - -// Function prototypes. - -void KernelDebugSetLevel( KernelDebugLevel inLevel ); -KernelDebugLevel KernelDebugGetLevel(); -void KernelDebugSetOutputType( KernelDebuggingOutputType inType ); -KernelDebuggingOutputType KernelDebugGetOutputType(); -IOReturn KernelDebugFindKernelLogger(); -void KernelDebugEnable( bool enable ); - -// Yes, you can call this directly. But, why? If you use the macros declared below, such as -// KernelIOLog, you get the benefit of having your logs compiled out when you set the -// DEBUG_LEVEL to production mode and recompile. Dude. Sweet. What's mine say? - -void KernelDebugLogInternal( KernelDebugLevel inLevel, UInt32 inTag, char const *inFormatString, ... ) __attribute__ ((format(printf,3,4)));; -void KernelDebugLogDataInternal( UInt32 inLevel, UInt32 inTag, void *buffer, UInt32 byteCount, bool preBuffer); - -// Handy macros. - -#define REQUIRE_NO_ERR_PRINTF( VALUE, LABEL, ARGS... ) \ - if ( VALUE != kIOReturnSuccess ) \ - { \ - KernelDebugLogInternal( kDebugInfoLevel, 'BluD', ## ARGS ); \ - goto LABEL; \ - } - -#define REQUIRE_PRINTF( TEST, LABEL, ARGS... ) \ - do \ - { \ - if ( !( TEST ) ) \ - { \ - KernelDebugLogInternal( kDebugInfoLevel, 'BluD', ## ARGS ); \ - goto LABEL; \ - } \ - } while( false ) - -// Some macros to call the debugging outputs. We'll strip out the debug logs if we are production code. - -#if DEBUG_LEVEL != DEBUG_LEVEL_PRODUCTION -#define KernelDebugLog( LEVEL, ARGS... ) KernelDebugLogInternal( ( LEVEL ), 'KDbg', ## ARGS ) __attribute__ ((format(printf,1,2))); - #define KernelDebugLogTag( LEVEL, TAG, ARGS... ) KernelDebugLogInternal( ( LEVEL ), ( TAG ), ## ARGS ) - #define KernelDebugLogData( LEVEL, TAG, BUFFER, SIZE, HOLD) KernelDebugLogDataInternal( ( LEVEL ), ( TAG ), ( BUFFER ), ( SIZE ), ( HOLD )) -#else - #define KernelDebugLog( LEVEL, ARGS... ) - #define KernelDebugLogTag( LEVEL, TAG, ARGS... ) - #define KernelDebugLogData( LEVEL, TAG, BUFFER, SIZE, HOLD) -#endif - - -#ifdef __cplusplus - } - -//================================================================================================ -// Forward declarations -//================================================================================================ -class com_apple_iokit_KLogClient; - -//================================================================================================ -// Defines -//================================================================================================ -#define kLogKextName "com_apple_iokit_KLog" -#define MAXUSERS 5 - -//================================================================================================ -// Custom Types -//================================================================================================ - -typedef UInt32 KLogLevel; -typedef UInt32 KLogTag; - -//================================================================================================ -// com_apple_iokit_KLog -//================================================================================================ - -class com_apple_iokit_KLog : public IOService -{ - - OSDeclareDefaultStructors(com_apple_iokit_KLog) - - com_apple_iokit_KLogClient * mClientPtr[MAXUSERS+1]; - - unsigned char * mMsgBuffer; - UInt8 mClientCount; - UInt8 mMsgSize; - bool mErrFlag; - struct timeval * mTimeVal; - IOLock * mLogLock; - -public: - - static com_apple_iokit_KLog * logger; - - virtual bool init(OSDictionary *dictionary = 0); - virtual void free(void); - - virtual IOService * probe(IOService *provider, SInt32 *score); - virtual bool start(IOService *provider); - virtual void stop(IOService *provider); - virtual IOReturn newUserClient( task_t owningTask, void * securityID, - UInt32 type, IOUserClient ** handler ); - - virtual SInt8 Log( KLogLevel level, KLogTag tag, const char *format, ... ); - virtual SInt8 vLog( KLogLevel level, KLogTag tag, const char *format, va_list in_va_list ); - - void closeChild(com_apple_iokit_KLogClient *ptr); - void setErr(bool set); - -}; - -#define kMaxStatusBufSize (8*1024) - - -class IOUSBLog : public IOService -{ - OSDeclareAbstractStructors(IOUSBLog) - -private: -public: - virtual bool init( OSDictionary * dictionary = 0 ); - virtual const char * stringFromReturn( IOReturn rtn ); - static IOUSBLog *usblog(); - virtual void AddStatusLevel (UInt32 level, UInt32 ref, char *status, UInt32 value); - virtual void AddStatus(char *message); - virtual void AddStatus(UInt32 level, char *message); - virtual void USBLogPrintf(UInt32 level, char *format,...); - virtual char * strstr(const char *in, const char *str); -}; - - -#endif -#endif /* ! _IOKIT_IOUSBLOG_H */ - diff --git a/i386/include/IOKit/usb/IOUSBMassStorageClass.h b/i386/include/IOKit/usb/IOUSBMassStorageClass.h deleted file mode 100644 index 02c8557..0000000 --- a/i386/include/IOKit/usb/IOUSBMassStorageClass.h +++ /dev/null @@ -1,507 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IOUSBMASSSTORAGECLASS_H -#define _IOKIT_IOUSBMASSSTORAGECLASS_H - -// Headers for general IOKit definitions -#include <IOKit/IOLib.h> -#include <IOKit/IOService.h> -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IOMessage.h> - -// Headers for USB specific definitions -#include <IOKit/usb/IOUSBInterface.h> -#include <IOKit/usb/IOUSBPipe.h> -#include <IOKit/usb/USBSpec.h> -#include <IOKit/usb/USB.h> - -// Headers for SCSI Protocol support definitions -#include <IOKit/scsi/IOSCSIProtocolServices.h> - -// BSD includes -#include <sys/sysctl.h> - -#define UNUSED(x) ((void)x) - - -#pragma mark - -#pragma mark Vendor Specific Device Support -#define kIOUSBMassStorageCharacteristics "USB Mass Storage Characteristics" -#define kIOUSBMassStoragePreferredSubclass "Preferred Subclass" -#define kIOUSBMassStoragePreferredProtocol "Preferred Protocol" -#define kIOUSBMassStorageResetOnResume "Reset On Resume" -#define kIOUSBMassStorageUseStandardUSBReset "Use Standard USB Reset" -#define kIOUSBKnownCSWTagIssues "Known CSW Tag Issues" -#define kIOUSBMassStorageMaxLogicalUnitNumber "Max Logical Unit Number" -#define kIOPropertyIOUnitKey "IOUnit" -#define kIOUSBMassStorageDoNotMatch "Do Not Match MSC" -#define kIOUSBMassStorageDoNotOperate "Do Not Operate" -#define kIOUSBMassStorageEnableSuspendResumePM "Enable Port Suspend-Resume PM" - -enum -{ - kUSBDAddressLength = 10 -}; - -#pragma mark - -#pragma mark CBI Protocol Strutures -// Structure for the global PB's -struct CBIRequestBlock -{ - SCSITaskIdentifier request; - IOUSBDevRequest cbiDevRequest; - SCSICommandDescriptorBlock cbiCDB; - IOUSBCompletion cbiCompletion; - UInt32 currentState; - IOMemoryDescriptor * cbiPhaseDesc; - UInt8 cbiGetStatusBuffer[2]; // 2 bytes as specified in the USB spec -}; - -typedef struct CBIRequestBlock CBIRequestBlock; - -#pragma mark - -#pragma mark Bulk Only Protocol Structures - -struct StorageBulkOnlyCBW -{ - UInt32 cbwSignature; - UInt32 cbwTag; - UInt32 cbwTransferLength; - UInt8 cbwFlags; - UInt8 cbwLUN; // Bits 0-3: LUN, 4-7: Reserved - UInt8 cbwCDBLength; // Bits 0-4: CDB Length, 5-7: Reserved - UInt8 cbwCDB[16]; -}; - -typedef struct StorageBulkOnlyCBW StorageBulkOnlyCBW; - -struct StorageBulkOnlyCSW -{ - UInt32 cswSignature; - UInt32 cswTag; - UInt32 cswDataResidue; - UInt8 cswStatus; -}; - -typedef struct StorageBulkOnlyCSW StorageBulkOnlyCSW; - -struct BulkOnlyRequestBlock -{ - SCSITaskIdentifier request; - IOUSBCompletion boCompletion; - UInt32 currentState; - StorageBulkOnlyCBW boCBW; - StorageBulkOnlyCSW boCSW; - IOMemoryDescriptor * boPhaseDesc; - UInt8 boGetStatusBuffer[2]; // 2 bytes as specified in the USB spec -}; - -typedef struct BulkOnlyRequestBlock BulkOnlyRequestBlock; - - -#pragma mark - -#pragma mark IOUSBMassStorageClass definition - -class IOUSBMassStorageClass : public IOSCSIProtocolServices -{ - OSDeclareDefaultStructors(IOUSBMassStorageClass) - -private: - // ---- Member variables used by all protocols ---- - // The interface object that provides the driver with access to the - // USB so that it may talk to its device. - IOUSBInterface * fInterface; - - // The pipe objects that the driver uses to transport data through a - // pipe to the appropriate endpoint. - IOUSBPipe * fBulkInPipe; - IOUSBPipe * fBulkOutPipe; - IOUSBPipe * fInterruptPipe; - IOUSBDevRequest fUSBDeviceRequest; - UInt8 fPreferredSubclass; - UInt8 fPreferredProtocol; - - // The maximum Logical Unit Number. This is the highest valid LUN - // that the USB device supports, so if the device only supports one - // LUN, such as CBI and CB, this number will be zero. - UInt8 fMaxLogicalUnitNumber; - - // ---- Member variables used by CBI protocol ---- - bool fCBICommandStructInUse; - - CBIRequestBlock fCBICommandRequestBlock; - - // ---- Member variables used by Bulk Only protocol ---- - // Command tag, this driver just uses a sequential counter that is - // incremented for each CBW that is sent to the device. - UInt32 fBulkOnlyCommandTag; - - bool fBulkOnlyCommandStructInUse; - - // Dedicated CBW and CSW IOMemoryDescriptors are listed in the ExpansionData struct. - - // The Request block that contains all the necessary data for - // transporting a Bulk Only request across the USB. - BulkOnlyRequestBlock fBulkOnlyCommandRequestBlock; - -protected: - // Reserve space for future expansion. - struct ExpansionData - { - bool fResetInProgress; - OSSet * fClients; - IOUSBPipe * fPotentiallyStalledPipe; - bool fUseUSBResetNotBOReset; - bool fAbortCurrentSCSITaskInProgress; - IOMemoryDescriptor * fCBIMemoryDescriptor; - IOMemoryDescriptor * fBulkOnlyCBWMemoryDescriptor; - IOMemoryDescriptor * fBulkOnlyCSWMemoryDescriptor; - bool fDeviceAttached; - bool fWaitingForReconfigurationMessage; - bool fTerminating; - bool fKnownCSWTagMismatchIssues; - bool fPortSuspendResumeForPMEnabled; - bool fPortIsSuspended; - bool fRequiresResetOnResume; - bool fAutonomousSpinDownWorkAround; - UInt8 fConsecutiveResetCount; - bool fClearStallInProgress; /* OBSOLETE */ - bool fTerminationDeferred; - }; - ExpansionData * reserved; - - #define fResetInProgress reserved->fResetInProgress - #define fClients reserved->fClients - #define fPotentiallyStalledPipe reserved->fPotentiallyStalledPipe - #define fUseUSBResetNotBOReset reserved->fUseUSBResetNotBOReset - #define fAbortCurrentSCSITaskInProgress reserved->fAbortCurrentSCSITaskInProgress - #define fCBIMemoryDescriptor reserved->fCBIMemoryDescriptor - #define fBulkOnlyCBWMemoryDescriptor reserved->fBulkOnlyCBWMemoryDescriptor - #define fBulkOnlyCSWMemoryDescriptor reserved->fBulkOnlyCSWMemoryDescriptor - #define fDeviceAttached reserved->fDeviceAttached - #define fWaitingForReconfigurationMessage reserved->fWaitingForReconfigurationMessage - #define fTerminating reserved->fTerminating - #define fKnownCSWTagMismatchIssues reserved->fKnownCSWTagMismatchIssues - #define fPortSuspendResumeForPMEnabled reserved->fPortSuspendResumeForPMEnabled - #define fPortIsSuspended reserved->fPortIsSuspended - #define fRequiresResetOnResume reserved->fRequiresResetOnResume - #define fAutonomousSpinDownWorkAround reserved->fAutonomousSpinDownWorkAround - #define fConsecutiveResetCount reserved->fConsecutiveResetCount - #define fClearStallInProgress reserved->fClearStallInProgress - #define fTerminationDeferred reserved->fTerminationDeferred - - // Enumerated constants used to control various aspects of this - // driver. - - // Enumerations for Mass Storage Class Subclass types - enum - { - kUSBStorageRBCSubclass = 1, - kUSBStorageSFF8020iSubclass = 2, - kUSBStorageQIC157Subclass = 3, - kUSBStorageUFISubclass = 4, - kUSBStorageSFF8070iSubclass = 5, - kUSBStorageSCSITransparentSubclass = 6 - }; - - // The supported USB Mass Storage Class transport protocols. - enum - { - kProtocolControlBulkInterrupt = 0x00, - kProtocolControlBulk = 0x01, - kProtocolBulkOnly = 0x50 - }; - - // ------- Protocol support functions ------------ - // The SendSCSICommand function will take a SCSITask Object and transport - // it across the physical wire(s) to the device - virtual bool SendSCSICommand( - SCSITaskIdentifier request, - SCSIServiceResponse * serviceResponse, - SCSITaskStatus * taskStatus ); - - // The AbortSCSICommand function will abort the indicated SCSITask object, - // if it is possible and the SCSITask has not already completed. - virtual SCSIServiceResponse AbortSCSICommand( SCSITaskIdentifier abortTask ); - - virtual bool IsProtocolServiceSupported( - SCSIProtocolFeature feature, - void * serviceValue ); - - virtual bool HandleProtocolServiceFeature( - SCSIProtocolFeature feature, - void * serviceValue ); - - // Methods for retrieving and setting the object for the Interface - IOUSBInterface * GetInterfaceReference( void ); - void SetInterfaceReference( IOUSBInterface * newInterface ); - - UInt8 GetInterfaceSubclass( void ); - UInt8 GetInterfaceProtocol( void ); - - // Methods for retrieving an object for a Pipe. - IOUSBPipe * GetControlPipe( void ); - IOUSBPipe * GetBulkInPipe( void ); - IOUSBPipe * GetBulkOutPipe( void ); - IOUSBPipe * GetInterruptPipe( void ); - - // Methods for getting and setting the maximum LUN of a device. - UInt8 GetMaxLogicalUnitNumber( void ) const; - void SetMaxLogicalUnitNumber( UInt8 maxLUN ); - - virtual void CompleteSCSICommand( - SCSITaskIdentifier request, - IOReturn status ); - - virtual bool BeginProvidedServices( void ); - virtual bool EndProvidedServices( void ); - - // The Protocol specific helper methods for SendSCSICommand - virtual IOReturn SendSCSICommandForCBIProtocol( - SCSITaskIdentifier request ); - - virtual IOReturn SendSCSICommandForBulkOnlyProtocol( - SCSITaskIdentifier request ); - - // The Protocol specific helper methods for AbortSCSICommand - virtual IOReturn AbortSCSICommandForCBIProtocol( - SCSITaskIdentifier abortTask ); - - virtual IOReturn AbortSCSICommandForBulkOnlyProtocol( - SCSITaskIdentifier abortTask ); - - // Helper methods for performing general USB device requests - virtual IOReturn ClearFeatureEndpointStall( - IOUSBPipe * thePipe, - IOUSBCompletion * completion ); - virtual IOReturn GetStatusEndpointStatus( - IOUSBPipe * thePipe, - void * endpointStatus, - IOUSBCompletion * completion ); - - /* All CBI transport related methods. - */ - // All definitions and structures for the CBI Protocol - enum - { - kUSBStorageAutoStatusSize = 2 // Per the USB CBI Protocol - }; - - // Methods for accessing Bulk Only specific member variables. - CBIRequestBlock * GetCBIRequestBlock( void ); - - void ReleaseCBIRequestBlock( - CBIRequestBlock * cbiRequestBlock ); - - // Methods used for CBI/CB command transportation. - static void CBIProtocolUSBCompletionAction( - void * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining); - - IOReturn CBIProtocolTransferData( - CBIRequestBlock * cbiRequestBlock, - UInt32 nextExecutionState ); - - IOReturn CBIProtocolReadInterrupt( - CBIRequestBlock * cbiRequestBlock, - UInt32 nextExecutionState ); - - IOReturn CBIGetStatusEndpointStatus( - IOUSBPipe * targetPipe, - CBIRequestBlock * cbiRequestBlock, - UInt32 nextExecutionState ); - - IOReturn CBIClearFeatureEndpointStall( - IOUSBPipe * targetPipe, - CBIRequestBlock * cbiRequestBlock, - UInt32 nextExecutionState ); - - void CBIProtocolCommandCompletion( - CBIRequestBlock * cbiRequestBlock, - IOReturn resultingStatus, - UInt32 bufferSizeRemaining ); - - /* All Bulk Only transport related methods, structures and enums. - */ - // All Bulk Only specific structures and enums. - - // All definitions and structures for the Bulk Only Protocol - // Command Block Wrapper (CBW) - enum - { - // CBW general struture definitions - kCommandBlockWrapperSignature = OSSwapHostToBigConstInt32 ( 'USBC' ), - kByteCountOfCBW = 31, - - // CBW LUN related definitions - kCBWLUNMask = 0x0F, - - kCBWFlagsDataOut = 0x00, - kCBWFlagsDataIn = 0x80 - }; - - // All definitions and structures for the Bulk Only Protocol - // Command Status Wrapper (CSW) - enum - { - // CSW general struture definitions - kCommandStatusWrapperSignature = OSSwapHostToBigConstInt32 ( 'USBS' ), - kByteCountOfCSW = 13, - - // CSW status definitions - kCSWCommandPassedError = 0x00, // No error occurred - kCSWCommandFailedError = 0x01, /* An error occurred (probably a - * bad command or parameter ) */ - kCSWPhaseError = 0x02 /* A transfer was performed in - * the wrong sequence */ - }; - - // Methods for accessing Bulk Only specific member variables. - BulkOnlyRequestBlock * GetBulkOnlyRequestBlock( void ); - - void ReleaseBulkOnlyRequestBlock( - BulkOnlyRequestBlock * boRequestBlock ); - - UInt32 GetNextBulkOnlyCommandTag( void ); - - // Methods for Bulk Only specific utility commands - IOReturn BulkDeviceResetDevice( - BulkOnlyRequestBlock * boRequestBlock, - UInt32 nextExecutionState ); - - // Methods used for Bulk Only command transportation. - IOReturn BulkOnlySendCBWPacket( - BulkOnlyRequestBlock * boRequestBlock, - UInt32 nextExecutionState ); - - IOReturn BulkOnlyTransferData( - BulkOnlyRequestBlock * boRequestBlock, - UInt32 nextExecutionState ); - - IOReturn BulkOnlyReceiveCSWPacket( - BulkOnlyRequestBlock * boRequestBlock, - UInt32 nextExecutionState ); - - void BulkOnlyExecuteCommandCompletion ( - BulkOnlyRequestBlock * boRequestBlock, - IOReturn resultingStatus, - UInt32 bufferSizeRemaining ); - - static void BulkOnlyUSBCompletionAction ( - void * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining ); - -public: - - bool init( OSDictionary * propTable ); - virtual bool start( IOService * provider ); - virtual void stop( IOService * provider ); - virtual void free( void ); - virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 ); - - virtual bool willTerminate( IOService * provider, - IOOptionBits options ); - - virtual bool didTerminate( IOService * provider, - IOOptionBits options, - bool * defer ); - - virtual bool handleOpen( IOService * client, - IOOptionBits options, - void * arg ); - - virtual void handleClose( IOService * client, - IOOptionBits options ); - - virtual bool handleIsOpen( const IOService * client ) const; - - virtual IOReturn HandlePowerOn( void ); - -protected: - - static IOReturn sWaitForReset( void * refcon ); - IOReturn GatedWaitForReset( void ); - - static IOReturn sWaitForTaskAbort( void * refcon ); /* OBSOLETE */ - IOReturn GatedWaitForTaskAbort( void ); /* OBSOLETE */ - - static void sResetDevice( void * refcon ); - - static void sAbortCurrentSCSITask( void * refcon ); /* OBSOLETE */ - - OSMetaClassDeclareReservedUsed( IOUSBMassStorageClass, 1 ); - virtual IOReturn StartDeviceRecovery( void ); /* OBSOLETE */ - - OSMetaClassDeclareReservedUsed( IOUSBMassStorageClass, 2 ); - virtual void FinishDeviceRecovery( IOReturn status ); /* OBSOLETE */ - - static void DeviceRecoveryCompletionAction( - void * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining ); /* OBSOLETE */ - - void ResetDeviceNow( bool waitForReset ); - - void AbortCurrentSCSITask( void ); - - bool IsPhysicalInterconnectLocationInternal ( void ); - - IOReturn SuspendPort ( bool suspend ); - -private: - - void ClearPipeStall ( void ); - - IOReturn AcceptSCSITask ( SCSITaskIdentifier scsiTask, bool * pAccepted ); - - void CheckDeferredTermination ( void ); - - void GatedCompleteSCSICommand ( SCSITaskIdentifier request, SCSIServiceResponse * serviceResponse, SCSITaskStatus * taskStatus ); - - // Space reserved for future expansion. - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 3 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 4 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 5 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 6 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 7 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 8 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 9 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 10 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 11 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 12 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 13 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 14 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 15 ); - OSMetaClassDeclareReservedUnused( IOUSBMassStorageClass, 16 ); - -}; - - -#endif _IOKIT_IOUSBMASSSTORAGECLASS_H diff --git a/i386/include/IOKit/usb/IOUSBMassStorageUFISubclass.h b/i386/include/IOKit/usb/IOUSBMassStorageUFISubclass.h deleted file mode 100644 index cbfe3c8..0000000 --- a/i386/include/IOKit/usb/IOUSBMassStorageUFISubclass.h +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef _IOKIT_IOUSBMASSSTORAGEUFISUBCLASS_H -#define _IOKIT_IOUSBMASSSTORAGEUFISUBCLASS_H - -// This class' header file -#include <IOKit/usb/IOUSBMassStorageClass.h> -#include <IOKit/scsi/IOSCSIPrimaryCommandsDevice.h> - - -#pragma mark - -#pragma mark IOUSBMassStorageUFIDevice declaration - -class IOUSBMassStorageUFIDevice : public IOSCSIPrimaryCommandsDevice -{ - OSDeclareDefaultStructors(IOUSBMassStorageUFIDevice) - -private: - static void AsyncReadWriteComplete( SCSITaskIdentifier completedTask ); - -protected: - // Reserve space for future expansion. - struct IOUSBMassStorageUFIDeviceExpansionData - { - }; - IOUSBMassStorageUFIDeviceExpansionData *fIOUSBMassStorageUFIDeviceReserved; - - // ---- Medium Characteristics ---- - bool fMediumPresent; - - // The byte count of each physical block on the medium. - UInt32 fMediumBlockSize; - - // The total number of blocks of fMediumBlockSize on the medium. - UInt32 fMediumBlockCount; - - // Whether the installed medium is protected from writes - bool fMediumIsWriteProtected; - - // Polling thread variables - thread_call_t fPollingThread; - UInt32 fPollingMode; - enum - { - kPollingMode_Suspended = 0, - kPollingMode_NewMedia = 1, - kPollingMode_MediaRemoval = 2 - }; - - // ---- Methods for controlling the current state of device support ---- - virtual bool InitializeDeviceSupport( void ); - virtual void StartDeviceSupport ( void ); - virtual void SuspendDeviceSupport( void ); - virtual void ResumeDeviceSupport( void ); - virtual void StopDeviceSupport ( void ); - virtual void TerminateDeviceSupport( void ); - - // ---- Methods used for misc ---- - virtual bool ClearNotReadyStatus( void ); - virtual void CreateStorageServiceNub( void ); - virtual bool DetermineDeviceCharacteristics( void ); - - // ---- Methods used for controlling the polling thread ---- - virtual void ProcessPoll( void ); - virtual void EnablePolling( void ); - virtual void DisablePolling( void ); - - // ---- Main and support methods for polling for new Media ---- - virtual void PollForNewMedia( void ); - virtual bool DetermineMediaPresence( void ); - virtual bool DetermineMediumCapacity( - UInt64 * blockSize, - UInt64 * blockCount ); - virtual bool DetermineMediumWriteProtectState( void ); - - // ---- Main and support methods for polling for Media removal ---- - virtual void PollForMediaRemoval( void ); - - // ---- Methods used for power managment ---- - virtual UInt32 GetInitialPowerState ( void ); - virtual void InitializePowerManagement ( IOService * provider ); - virtual void HandlePowerChange ( void ); - virtual void HandleCheckPowerState ( void ); - virtual void TicklePowerManager ( void ); - virtual UInt32 GetNumberOfPowerStateTransitions ( void ); - - // ---- Methods used for handling medium characteristics ---- - virtual void SetMediumCharacteristics( - UInt32 blockSize, - UInt32 blockCount ); - - virtual void ResetMediumCharacteristics( void ); - - virtual IOReturn IssueRead( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueRead( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - void * clientData ); - - - virtual IOReturn IssueWrite( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount ); - - virtual IOReturn IssueWrite( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - void * clientData ); - -public: - - static void sProcessPoll( void * pdtDriver, void * refCon ); - - // Interface to the UFI Storage Services Driver - // ---- Methods for controlling the device ---- - virtual IOReturn SyncReadWrite( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - UInt64 blockSize ); - - virtual IOReturn AsyncReadWrite( - IOMemoryDescriptor * buffer, - UInt64 startBlock, - UInt64 blockCount, - UInt64 blockSize, - void * clientData ); - - // ---- Methods for controlling medium state ---- - virtual IOReturn EjectTheMedium( void ); - - // ---- Methods for controlling media format ---- - virtual IOReturn FormatMedium( - UInt64 blockCount, - UInt64 blockSize ); - virtual UInt32 GetFormatCapacities( - UInt64 * capacities, - UInt32 capacitiesMaxCount ) const; - - // ---- Query methods to report device characteristics ---- - // Report the maximum number of blocks that the device can handle per - // read or write. A value of 0 (zero) indicates there is no limit aside - // from the size of the method's return parameter. - virtual UInt64 ReportDeviceMaxBlocksReadTransfer( void ); - virtual UInt64 ReportDeviceMaxBlocksWriteTransfer( void ); - - // ---- Query methods to report installed medium characteristics ---- - virtual UInt64 ReportMediumBlockSize( void ); - virtual UInt64 ReportMediumTotalBlockCount( void ); - virtual bool ReportMediumWriteProtection( void ); - - // Methods for getting device information strings - virtual char * GetVendorString( void ); - virtual char * GetProductString( void ); - virtual char * GetRevisionString( void ); - OSDictionary * GetProtocolCharacteristicsDictionary ( void ); - OSDictionary * GetDeviceCharacteristicsDictionary ( void ); - -protected: - // Utility methods used by all SCSI Command Set objects - - // isParameterValid methods are used to validate that the parameter passed into - // the command methods are of the correct value. - - // Validate Parameter used for 1 bit to 1 byte paramaters - bool IsParameterValid( - SCSICmdField1Byte param, - SCSICmdField1Byte mask ); - - // Validate Parameter used for 9 bit to 2 byte paramaters - bool IsParameterValid( - SCSICmdField2Byte param, - SCSICmdField2Byte mask ); - - // Validate Parameter used for 17 bit to 4 byte paramaters - bool IsParameterValid( - SCSICmdField4Byte param, - SCSICmdField4Byte mask ); - - // UFI Required Commands - virtual bool FORMAT_UNIT( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - IOByteCount defectListSize, - SCSICmdField1Byte TRACK_NUMBER, - SCSICmdField2Byte INTERLEAVE ); - - virtual bool INQUIRY( - SCSITaskIdentifier request, - IOMemoryDescriptor *dataBuffer, - SCSICmdField1Byte PAGE_OR_OPERATION_CODE, - SCSICmdField1Byte ALLOCATION_LENGTH ); - - virtual bool MODE_SELECT_10( - SCSITaskIdentifier request, - IOMemoryDescriptor *dataBuffer, - SCSICmdField1Bit PF, - SCSICmdField1Bit SP, - SCSICmdField2Byte PARAMETER_LIST_LENGTH ); - - virtual bool MODE_SENSE_10( - SCSITaskIdentifier request, - IOMemoryDescriptor *dataBuffer, - SCSICmdField1Bit DBD, - SCSICmdField2Bit PC, - SCSICmdField6Bit PAGE_CODE, - SCSICmdField2Byte PARAMETER_LIST_LENGTH ); - - virtual bool PREVENT_ALLOW_MEDIUM_REMOVAL( - SCSITaskIdentifier request, - SCSICmdField1Bit PREVENT ); - - virtual bool READ_10( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH ); - - virtual bool READ_12( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH ); - - virtual bool READ_CAPACITY( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField1Bit PMI ); - - virtual bool READ_FORMAT_CAPACITIES( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - SCSICmdField2Byte ALLOCATION_LENGTH ); - - virtual bool REQUEST_SENSE( - SCSITaskIdentifier request, - IOMemoryDescriptor *dataBuffer, - SCSICmdField1Byte ALLOCATION_LENGTH ); - - virtual bool REZERO_UNIT( - SCSITaskIdentifier request ); - - virtual bool SEEK( - SCSITaskIdentifier request, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS ); - - virtual bool SEND_DIAGNOSTICS( - SCSITaskIdentifier request, - SCSICmdField1Bit PF, - SCSICmdField1Bit SELF_TEST, - SCSICmdField1Bit DEF_OFL, - SCSICmdField1Bit UNIT_OFL ); - - virtual bool START_STOP_UNIT( - SCSITaskIdentifier request, - SCSICmdField1Bit IMMED, - SCSICmdField1Bit LOEJ, - SCSICmdField1Bit START ); - - virtual bool TEST_UNIT_READY( - SCSITaskIdentifier request ); - - virtual bool VERIFY( - SCSITaskIdentifier request, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYTCHK, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte VERIFICATION_LENGTH ); - - virtual bool WRITE_10( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit FUA, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH ); - - virtual bool WRITE_12( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit EBP, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField4Byte TRANSFER_LENGTH ); - - virtual bool WRITE_AND_VERIFY( - SCSITaskIdentifier request, - IOMemoryDescriptor * dataBuffer, - UInt32 blockSize, - SCSICmdField1Bit DPO, - SCSICmdField1Bit BYTCHK, - SCSICmdField1Bit RELADR, - SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS, - SCSICmdField2Byte TRANSFER_LENGTH ); -}; - - -#pragma mark - -#pragma mark IOUSBMassStorageUFISubclass declaration - - -class IOUSBMassStorageUFISubclass : public IOUSBMassStorageClass -{ - OSDeclareDefaultStructors(IOUSBMassStorageUFISubclass) - -protected: - virtual bool BeginProvidedServices( void ); - virtual bool EndProvidedServices( void ); -}; - -#endif _IOKIT_IOUSBMASSSTORAGEUFISUBCLASS_H diff --git a/i386/include/IOKit/usb/IOUSBNub.h b/i386/include/IOKit/usb/IOUSBNub.h deleted file mode 100644 index a998e5b..0000000 --- a/i386/include/IOKit/usb/IOUSBNub.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBNUB_H -#define _IOKIT_IOUSBNUB_H - -#include <IOKit/IOService.h> -#include <libkern/c++/OSData.h> -#include <IOKit/IOMemoryDescriptor.h> - -#include <IOKit/usb/USB.h> - -class IOUSBController; -class IOUSBPipe; - -/*! - @class IOUSBNub - @abstract Super class for for IOUSBDevice and IOUSBInterface. - */ -class IOUSBNub : public IOService -{ - OSDeclareDefaultStructors(IOUSBNub) - -public: - - // IOKit method - virtual void joinPMtree ( IOService * driver ); - - virtual bool USBCompareProperty(OSDictionary * matching, const char * key ); - - bool IsWildCardMatch( OSDictionary * matching, const char * key ); - bool USBComparePropertyWithMask( OSDictionary *matching, const char *key, const char * maskKey ); -}; - -#ifdef __cplusplus -extern "C" { -#endif - -void printDescriptor(const IOUSBDescriptorHeader *desc); -void printDeviceDescriptor(const IOUSBDeviceDescriptor *desc); -void printConfigDescriptor(const IOUSBConfigurationDescriptor *cd); -void printEndpointDescriptor(const IOUSBEndpointDescriptor *ed); -void printInterfaceDescriptor(const IOUSBInterfaceDescriptor *id); - -#ifdef __cplusplus -} -#endif - -#endif /* _IOKIT_IOUSBNUB_H */ diff --git a/i386/include/IOKit/usb/IOUSBPipe.h b/i386/include/IOKit/usb/IOUSBPipe.h deleted file mode 100644 index 3286b92..0000000 --- a/i386/include/IOKit/usb/IOUSBPipe.h +++ /dev/null @@ -1,387 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.2 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBPIPE_H -#define _IOKIT_IOUSBPIPE_H - -#include <IOKit/IOService.h> -#include <IOKit/IOMemoryDescriptor.h> - -#include <IOKit/usb/USB.h> -#include <IOKit/usb/IOUSBController.h> -#include <IOKit/usb/IOUSBControllerV2.h> - -class IOUSBInterface; - -/*! - @class IOUSBPipe - @abstract The object representing an open pipe for a device. -*/ -class IOUSBPipe : public OSObject -{ - friend class IOUSBInterface; - friend class IOUSBDevice; - - OSDeclareDefaultStructors(IOUSBPipe) - -protected: - - const IOUSBEndpointDescriptor * _descriptor; - IOUSBController::Endpoint _endpoint; // tidied up version of descriptor - IOUSBController * _controller; - USBDeviceAddress _address; - UInt8 _status; // was previously used for status. Now used to detect whether a property exists or not - - struct ExpansionData - { - IOReturn _correctStatus; - IOUSBDevice * _device; // Remember containing device for clearing TTs - UInt8 _speed; - IOUSBInterface * _interface; - bool _crossEndianCompatible; - UInt32 _locationID; - }; - ExpansionData * _expansionData; - - virtual void free(); - - IOReturn ClosePipe(void); - -public: - - virtual bool InitToEndpoint(const IOUSBEndpointDescriptor *endpoint, UInt8 speed, - USBDeviceAddress address, IOUSBController * controller); - - // The following 2 methods are obsolete - // - static IOUSBPipe *ToEndpoint(const IOUSBEndpointDescriptor *endpoint, UInt8 speed, - USBDeviceAddress address, IOUSBController * controller); - - static IOUSBPipe *ToEndpoint(const IOUSBEndpointDescriptor *endpoint, - IOUSBDevice * device, IOUSBController * controller); - - static IOUSBPipe *ToEndpoint(const IOUSBEndpointDescriptor *endpoint, - IOUSBDevice * device, IOUSBController * controller, IOUSBInterface *interface); - - // Controlling pipe state - /*! - @function GetStatus - This method does NOT work. Do not call it. See GetPipeStatus for the correct method. - GetStatus will always return 0. - */ - virtual UInt8 GetStatus(void); - /*! - @function Abort - This method causes all outstanding I/O on a pipe to complete with return code kIOReturnAborted. It clears the halted bit but does NOT clear the - toggle bit on the endpoint in the controller. If you wish to clear the toggle bit, see ClearPipeStall - */ - virtual IOReturn Abort(void); - /*! - @function Reset - This method is identical to ClearPipeStall(false). The use of that API is preferred. - */ - virtual IOReturn Reset(void); - /*! - @function ClearStall - This method is equivalent to ClearPipeStall(false). This method is available before version 1.9. - */ - virtual IOReturn ClearStall(void); - - // - // Transferring Data - // - - // deprecated - virtual IOReturn Read(IOMemoryDescriptor * buffer, - IOUSBCompletion * completion = 0, - IOByteCount * bytesRead = 0); - - // deprecated - virtual IOReturn Write(IOMemoryDescriptor * buffer, - IOUSBCompletion * completion = 0); - - // Transfer data over Isochronous pipes - /*! - @function Read - Read from an isochronous endpoint - @param buffer place to put the transferred data - @param frameStart USB frame number of the frame to start transfer - @param numFrames Number of frames to transfer - @param frameList Bytes to transfer and result for each frame - @param completion describes action to take when buffer has been filled - */ - virtual IOReturn Read(IOMemoryDescriptor * buffer, - UInt64 frameStart, UInt32 numFrames, IOUSBIsocFrame *frameList, - IOUSBIsocCompletion * completion = 0); - /*! - @function Write - Write to an isochronous endpoint - @param buffer place to get the transferred data - @param frameStart USB frame number of the frame to start transfer - @param numFrames Number of frames to transfer - @param frameList Bytes to transfer and result for each frame - @param completion describes action to take when buffer has been emptied - */ - virtual IOReturn Write(IOMemoryDescriptor * buffer, - UInt64 frameStart, UInt32 numFrames, IOUSBIsocFrame *frameList, - IOUSBIsocCompletion * completion = 0); - - // Do a control request over a Control pipe, using a memory descriptor - /*! - @function ControlRequest - Make a control request - There are two versions of this method, one uses a simple void * - to point to the data portion of the transfer, the other uses an - IOMemoryDescriptor to point to the data. - @param request parameter block for the control request - @param completion describes action to take when the request has been executed - */ - virtual IOReturn ControlRequest(IOUSBDevRequestDesc *request, - IOUSBCompletion *completion = 0); - - // Do a control request over a Control pipe, using a simple buffer - virtual IOReturn ControlRequest(IOUSBDevRequest *request, - IOUSBCompletion *completion = 0); - - /* - * Accessors - */ - /*! - @function GetEndpoint - returns a pointer to the Endpoint structure for the pipe. - */ - virtual const IOUSBController::Endpoint * GetEndpoint(); - /*! - @function GetEndpointDescriptor - returns the endpoint descriptor for the pipe. - */ - virtual const IOUSBEndpointDescriptor * GetEndpointDescriptor(); - /*! - @function GetDirection - returns the direction of the pipe:kUSBOut/kUSBIn for a bulk or interrupt pipe, - kUSBAnyDirn for a control pipe. - */ - virtual UInt8 GetDirection(); - /*! - @function GetType - returns the pipe type: kUSBControl, kUSBBulk or kUSBInterrupt. - */ - virtual UInt8 GetType(); - /*! - @function GetEndpointNumber - returns the endpoint number in the device that the pipe is connected to. - */ - virtual UInt8 GetEndpointNumber(); - virtual USBDeviceAddress GetAddress(); - virtual UInt16 GetMaxPacketSize(); - virtual UInt8 GetInterval(); - - // Transfer data over Bulk pipes with timeouts. - OSMetaClassDeclareReservedUsed(IOUSBPipe, 0); - - // deprecated - virtual IOReturn Read(IOMemoryDescriptor * buffer, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOUSBCompletion * completion = 0, - IOByteCount * bytesRead = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 1); - - // deprecated - virtual IOReturn Write(IOMemoryDescriptor * buffer, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOUSBCompletion * completion = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 2); - // Do a control request over a Control pipe, using a memory descriptor - /*! - @function ControlRequest - Make a control request. - There are two versions of this method, one uses a simple void * - to point to the data portion of the transfer, the other uses an - IOMemoryDescriptor to point to the data. - @param request parameter block for the control request - @param noDataTimeout Specifies an amount of time (in ms) after which the command will be aborted - if no data has been transferred on the bus. - @param completionTimeout Specifies an amount of time (in ms) after which the command will be aborted if the entire command has - not been completed. - @param completion describes action to take when the request has been executed - */ - virtual IOReturn ControlRequest(IOUSBDevRequestDesc *request, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOUSBCompletion *completion = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 3); - // Do a control request over a Control pipe, using a simple buffer - virtual IOReturn ControlRequest(IOUSBDevRequest *request, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOUSBCompletion *completion = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 4); - /*! - @function Read - Read from an interrupt or bulk endpoint - @param buffer place to put the transferred data - @param noDataTimeout number of milliseconds of no bus activity until transaction times out. Note that if a tranasction times out - the driver software may have to resynchronize the data toggle. See ClearPipeStall. - @param completionTimeout number of milliseconds from the time the transaction is placed on the bus until it times out - @param reqCount requested number of bytes to transfer. must be <= buffer->getLength() - @param completion describes action to take when buffer has been filled - @param bytesRead returns total bytes read for synchronous reads - */ - virtual IOReturn Read(IOMemoryDescriptor * buffer, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOByteCount reqCount, - IOUSBCompletion * completion = 0, - IOByteCount * bytesRead = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 5); - /*! - @function Write - Write to an interrupt or bulk endpoint - @param buffer place to get the transferred data - @param noDataTimeout number of milliseconds of no bus activity until transaction times out. Note that if a tranasction times out - the driver software may have to resynchronize the data toggle. See ClearPipeStall. - @param completionTimeout number of milliseconds from the time the transaction is placed on the bus until it times out - @param reqCount requested number of bytes to transfer. must be <= buffer->getLength() - @param completion describes action to take when buffer has been emptied - */ - virtual IOReturn Write(IOMemoryDescriptor * buffer, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOByteCount reqCount, - IOUSBCompletion * completion = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 6); - /*! - @function GetPipeStatus - Returns the status of the pipe (kIOUSBPipeStalled of the pipe is stalled, else kIOReturnSuccess) - */ - virtual IOReturn GetPipeStatus(void); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 7); - /*! - @function ClearPipeStall - AVAILABLE ONLY IN VERSION 1.9 AND ABOVE - This method causes all outstanding I/O on a pipe to complete with return code kIOUSBTransactionReturned. It also clears both the halted bit and the - toggle bit on the endpoint in the controller. The driver may need to reset the data toggle within the device to avoid losing any data. If the - device correctly handles the ClearFeature(ENDPOINT_HALT) device request, then this API will handle that by sending the correct request to the - device. - @param withDeviceRequest if true, a ClearFeature(ENDPOINT_HALT) is sent to the appropriate endpoint on the device after the transactions on the - controllers endpoint are returned and the toggle bit on the controllers endpoint is cleared. if this parameter is false, then this is equivalent - to the pre-1.9 API. This means that the endpoint on the controller is cleared, but no DeviceRequest is sent to the device's endpoint. - */ - virtual IOReturn ClearPipeStall(bool withDeviceRequest); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 8); - /*! - @function SetPipePolicy - AVAILABLE ONLY IN VERSION 1.9 AND ABOVE - This method allows a driver to change the maxPacketSize of an Isochronous pipe, or the polling interval for an interrupt pipe. There is a limited - amount of bandwidth on any single bus, and isochronous pipes tend to use much of this bandwidth. The driver may know, however, that there - will never be as much bandwidth used as is specified in the pipe's endpoint descriptor. Therefore, the driver may return some of this - bandwidth to the system by using this method. Additionally, if on an open of an IOUSBInterface any of the Isochronous pipes is unable to be - opened because of a lack of bandwidth, the pipe will be created with a bandwidth of zero, and the driver may get some of the limited bandwidth - remaining by using this call. - This method returns kIOReturnBadArgument if the pipe is a bulk on control pipe, or if the maxPacketSize parameter is larger than the amount specified - in the endpoint descriptor. It returns kIOReturnNoBandwidth if the bandwidth requested cannot be allocated. Otherwise it returns kIOReturnSuccess. - @param maxPacketSize specifies the maximum number of bytes to be used in any one millisecond frame by this pipe. The value must be less than or - equal to the maxPacketSize specified in the endpoint descriptor. - @param maxInterval not currently used. reserved for future expansion - - */ - virtual IOReturn SetPipePolicy(UInt16 maxPacketSize, UInt8 maxInterval); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 9); - - // Transfer data over Isochronous pipes and process the frame list at hardware interrupt time - /*! - @function Read - AVAILABLE ONLY IN VERSION 1.9.2 AND ABOVE - Read from an isochronous endpoint and process the IOUSBLowLatencyIsocFrame fields at - hardware interrupt time - @param buffer place to put the transferred data - @param frameStart USB frame number of the frame to start transfer - @param numFrames Number of frames to transfer - @param frameList Bytes to transfer, result, and time stamp for each frame - @param completion describes action to take when buffer has been filled - @param updateFrequency describes how often (in milliseconds) should the frame list be processed - */ - virtual IOReturn Read(IOMemoryDescriptor * buffer, - UInt64 frameStart, UInt32 numFrames, IOUSBLowLatencyIsocFrame *frameList, - IOUSBLowLatencyIsocCompletion * completion = 0, UInt32 updateFrequency = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 10); - /*! - @function Write - AVAILABLE ONLY IN VERSION 1.9.2 AND ABOVE - Write to an isochronous endpoint - @param buffer place to get the data to transfer - @param frameStart USB frame number of the frame to start transfer - @param numFrames Number of frames to transfer - @param frameList Pointer to list of frames indicating bytes to transfer and result for each frame - @param completion describes action to take when buffer has been emptied - @param updateFrequency describes how often (in milliseconds) should the frame list be processed - */ - virtual IOReturn Write(IOMemoryDescriptor * buffer, - UInt64 frameStart, UInt32 numFrames, IOUSBLowLatencyIsocFrame *frameList, - IOUSBLowLatencyIsocCompletion * completion = 0, UInt32 updateFrequency = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 11); - /*! - @function Read - Read from an interrupt or bulk endpoint - @param buffer place to put the transferred data - @param noDataTimeout number of milliseconds of no bus activity until transaction times out. Note that if a tranasction times out - the driver software may have to resynchronize the data toggle. See ClearPipeStall. - @param completionTimeout number of milliseconds from the time the transaction is placed on the bus until it times out - @param reqCount requested number of bytes to transfer. must be <= buffer->getLength() - @param completion describes action to take when buffer has been filled - @param bytesRead returns total bytes read for synchronous reads - */ - virtual IOReturn Read(IOMemoryDescriptor * buffer, - UInt32 noDataTimeout, - UInt32 completionTimeout, - IOByteCount reqCount, - IOUSBCompletionWithTimeStamp * completion = 0, - IOByteCount * bytesRead = 0); - - OSMetaClassDeclareReservedUsed(IOUSBPipe, 12); - virtual bool InitToEndpoint(const IOUSBEndpointDescriptor *endpoint, UInt8 speed, - USBDeviceAddress address, IOUSBController * controller, IOUSBDevice * device, IOUSBInterface * interface); - - OSMetaClassDeclareReservedUnused(IOUSBPipe, 13); - OSMetaClassDeclareReservedUnused(IOUSBPipe, 14); - OSMetaClassDeclareReservedUnused(IOUSBPipe, 15); - OSMetaClassDeclareReservedUnused(IOUSBPipe, 16); - OSMetaClassDeclareReservedUnused(IOUSBPipe, 17); - OSMetaClassDeclareReservedUnused(IOUSBPipe, 18); - OSMetaClassDeclareReservedUnused(IOUSBPipe, 19); - -}; - -#endif /* _IOKIT_IOUSBPIPE_H */ diff --git a/i386/include/IOKit/usb/IOUSBRootHubDevice.h b/i386/include/IOKit/usb/IOUSBRootHubDevice.h deleted file mode 100644 index 19a17c4..0000000 --- a/i386/include/IOKit/usb/IOUSBRootHubDevice.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBROOTHUBDEVICE_H -#define _IOKIT_IOUSBROOTHUBDEVICE_H - -#include <IOKit/usb/IOUSBHubDevice.h> - -/*! - @class IOUSBRootHubDevice - @abstract The object representing the Root Hub simulation. - */ -class IOUSBRootHubDevice : public IOUSBHubDevice -{ - OSDeclareDefaultStructors(IOUSBRootHubDevice) - -private: - UInt16 configuration; - IOCommandGate *_commandGate; - - // private method which overrides the same method in IOUSBHubDevice - virtual bool InitializeCharacteristics(void); // used at start - - struct ExpansionData - { - IOService * _IOResourcesEntry; - }; - ExpansionData *_expansionData; - -public: - // static methods - static IOUSBRootHubDevice *NewRootHubDevice(void); - static IOReturn GatedDeviceRequest (OSObject * owner, - void * arg0, - void * arg1, - void * arg2, - void * arg3 ); - - // IOKit methods - virtual bool init(); - virtual bool start( IOService * provider ); - virtual void stop( IOService *provider ); - virtual void free(); - - // IOUSBHubDevice methods - virtual bool IsRootHub(void); - virtual UInt32 RequestExtraPower(UInt32 requestedPower); - virtual void ReturnExtraPower(UInt32 returnedPower); - - // - virtual UInt32 RequestSleepPower(UInt32 requestedPower); - virtual void ReturnSleepPower(UInt32 returnedPower); - - // a non static but non-virtual function - IOReturn DeviceRequestWorker(IOUSBDevRequest *request, UInt32 noDataTimeout, UInt32 completionTimeout, IOUSBCompletion *completion); - - // IOUSBDevice methods overriden here - virtual IOReturn DeviceRequest(IOUSBDevRequest *request, IOUSBCompletion *completion = 0); - virtual IOReturn DeviceRequest(IOUSBDevRequest *request, UInt32 noDataTimeout, UInt32 completionTimeout, IOUSBCompletion *completion = 0); - - OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 0); - virtual IOReturn GetDeviceInformation(UInt32 *info); - - OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 1); - virtual void InitializeExtraPower(UInt32 maxPortCurrent, UInt32 totalExtraCurrent); - - OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 2); - virtual void SetSleepCurrent(UInt32 sleepCurrent); - - OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 3); - virtual UInt32 GetSleepCurrent(); - - OSMetaClassDeclareReservedUnused(IOUSBRootHubDevice, 4); -}; - -#endif /* _IOKIT_IOUSBROOTHUBDEVICE_H */ - diff --git a/i386/include/IOKit/usb/IOUSBUserClient.h b/i386/include/IOKit/usb/IOUSBUserClient.h deleted file mode 100644 index 1cd47a8..0000000 --- a/i386/include/IOKit/usb/IOUSBUserClient.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBUSERCLIENT_H -#define _IOKIT_IOUSBUSERCLIENT_H - -// these are the new User Client method names -enum { - kUSBDeviceUserClientOpen, - kUSBDeviceUserClientClose, - kUSBDeviceUserClientSetConfig, - kUSBDeviceUserClientGetConfig, - kUSBDeviceUserClientGetConfigDescriptor, - kUSBDeviceUserClientGetFrameNumber, - kUSBDeviceUserClientDeviceRequestOut, - kUSBDeviceUserClientDeviceRequestIn, - kUSBDeviceUserClientCreateInterfaceIterator, - kUSBDeviceUserClientResetDevice, - kUSBDeviceUserClientSuspend, - kUSBDeviceUserClientAbortPipeZero, - kUSBDeviceUserClientReEnumerateDevice, - kUSBDeviceUserClientGetMicroFrameNumber, - kUSBDeviceUserClientGetFrameNumberWithTime, - kUSBDeviceUserClientSetAsyncPort, - kUSBDeviceUserClientGetDeviceInformation, - kUSBDeviceUserClientRequestExtraPower, - kUSBDeviceUserClientReturnExtraPower, - kUSBDeviceUserClientGetExtraPowerAllocated, - kIOUSBLibDeviceUserClientNumCommands - }; - -enum { - kUSBInterfaceUserClientOpen, - kUSBInterfaceUserClientClose, - kUSBInterfaceUserClientGetDevice, - kUSBInterfaceUserClientSetAlternateInterface, - kUSBInterfaceUserClientGetFrameNumber, - kUSBInterfaceUserClientGetPipeProperties, - kUSBInterfaceUserClientReadPipe, - kUSBInterfaceUserClientWritePipe, - kUSBInterfaceUserClientGetPipeStatus, - kUSBInterfaceUserClientAbortPipe, - kUSBInterfaceUserClientResetPipe, - kUSBInterfaceUserClientClearPipeStall, - kUSBInterfaceUserClientControlRequestOut, - kUSBInterfaceUserClientControlRequestIn, - kUSBInterfaceUserClientSetPipePolicy, - kUSBInterfaceUserClientGetBandwidthAvailable, - kUSBInterfaceUserClientGetEndpointProperties, - kUSBInterfaceUserClientLowLatencyPrepareBuffer, - kUSBInterfaceUserClientLowLatencyReleaseBuffer, - kUSBInterfaceUserClientGetMicroFrameNumber, - kUSBInterfaceUserClientGetFrameListTime, - kUSBInterfaceUserClientGetFrameNumberWithTime, - kUSBInterfaceUserClientSetAsyncPort, - kUSBInterfaceUserClientReadIsochPipe, - kUSBInterfaceUserClientWriteIsochPipe, - kUSBInterfaceUserClientLowLatencyReadIsochPipe, - kUSBInterfaceUserClientLowLatencyWriteIsochPipe, - kUSBInterfaceUserClientGetConfigDescriptor, - kIOUSBLibInterfaceUserClientNumCommands - }; - - -#if KERNEL -#include <IOKit/IOService.h> -#include <IOKit/IOUserClient.h> -#include <IOKit/usb/USB.h> - -//================================================================================================ -// -// Structure declarations -// -//================================================================================================ -// -typedef struct IOUSBUserClientAsyncParamBlock IOUSBUserClientAsyncParamBlock; - -struct IOUSBUserClientAsyncParamBlock -{ - OSAsyncReference64 fAsyncRef; - uint32_t fAsyncCount; - uint32_t fMax; - IOMemoryDescriptor * fMem; - IOUSBDevRequestDesc req; -}; - -typedef struct IOUSBInterfaceUserClientISOAsyncParamBlock IOUSBInterfaceUserClientISOAsyncParamBlock; -struct IOUSBInterfaceUserClientISOAsyncParamBlock -{ - OSAsyncReference64 fAsyncRef; - uint32_t fAsyncCount; - mach_vm_size_t frameLen; // In bytes - mach_vm_address_t frameBase; // In user task - IOMemoryDescriptor * dataMem; - IOMemoryDescriptor * countMem; - uint64_t numFrames; - IOUSBIsocFrame frames[0]; // Must be the last one -}; - - -//================================================================================================ -// -// This class is used to add an IOProviderMergeProperties dictionary entry to a provider's -// property list, thus providing a tie between hardware and a CFBundle at hardware -// load time. This property usually contains the user client class name and the CFPlugInTypes UUID's -// but it can contain other properties. -// -//================================================================================================ -// -class IOUSBUserClientInit : public IOService -{ - OSDeclareDefaultStructors(IOUSBUserClientInit); - -public: - - virtual bool start(IOService * provider) ; - virtual bool MergeDictionaryIntoProvider(IOService * provider, OSDictionary * mergeDict); - virtual bool MergeDictionaryIntoDictionary(OSDictionary * sourceDictionary, OSDictionary * targetDictionary); -}; - -#endif // KERNEL - -#endif /* ! _IOKIT_IOUSBUSERCLIENT_H */ - diff --git a/i386/include/IOKit/usb/IOUSBWorkLoop.h b/i386/include/IOKit/usb/IOUSBWorkLoop.h deleted file mode 100644 index 7630704..0000000 --- a/i386/include/IOKit/usb/IOUSBWorkLoop.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2001-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOUSBWORKLOOP_H -#define _IOKIT_IOUSBWORKLOOP_H - -#include <IOKit/IOWorkLoop.h> - -/*! - @class IOUSBWorkLoop - @abstract Subclass of IOWorkloop that allows the USB stack to more finely control sleep and wake. - */ -class IOUSBWorkLoop : public IOWorkLoop -{ - OSDeclareDefaultStructors(IOUSBWorkLoop) - -protected: - void * fSleepToken; -#ifndef __OPEN_SOURCE__ - lck_grp_t * fLockGroup; -#endif - bool init ( const char * controllerLocation ); - void free ( void ); - - // Overrides to check for sleeping - virtual void closeGate(); - virtual bool tryCloseGate(); - -public: - // Create a workloop - static IOUSBWorkLoop * workLoop(const char * controllerLocation); - - // Put workloop to sleep (Must have gate closed, opens gate if successful) - virtual IOReturn sleep(void *token); - - // Wake workloop up (closes gate if successful) - virtual IOReturn wake(void *token); - - void CloseGate(void); - void OpenGate(void); -}; - -#endif /* ! _IOKIT_IOUSBWORKLOOP_H */ - diff --git a/i386/include/IOKit/usb/USB.h b/i386/include/IOKit/usb/USB.h deleted file mode 100644 index 8ba12bb..0000000 --- a/i386/include/IOKit/usb/USB.h +++ /dev/null @@ -1,1076 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _USB_H -#define _USB_H - -#if KERNEL - #include <libkern/OSByteOrder.h> - #include <IOKit/IOMemoryDescriptor.h> -#else - #include <libkern/OSByteOrder.h> -#endif - -#include <IOKit/IOTypes.h> - -#if !defined(__USB__) -# include <IOKit/usb/USBSpec.h> -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - /*! - @header USB.h - @abstract Public Interfaces to the USB implementation in Mac OS X. - @discussion This header file contains definitions and structures that are used in the different USB API's in Mac OS X, both in the kernel and in the user space. - */ - - /*! - @defined Endian conversion definitions - @discussion The USB API's use a convention of specifying parameters in the host order. The USB spec specifies that multi-byte items should be - formatted in little endian order. The following macros allow one to translate multi-byte values from Host order to USB order and vice versa. There are separate macros for - in-kernel use and for user space use. - */ -#define USBToHostWord OSSwapLittleToHostInt16 -#define HostToUSBWord OSSwapHostToLittleInt16 -#define USBToHostLong OSSwapLittleToHostInt32 -#define HostToUSBLong OSSwapHostToLittleInt32 - - /*! - @enum Miscellaneous Constants - @discussion - */ - enum { - kUSBDeviceIDShift = 7, - kUSBMaxDevices = 128, - kUSBMaxDevice = kUSBMaxDevices-1, - kUSBDeviceIDMask = 0x7f, - - kUSBPipeIDMask = 0xf, - kUSBMaxPipes = 32, // In and Out pipes can have same pipe number. - - kUSBInterfaceIDShift = 8, - kUSBMaxInterfaces = 1 << kUSBInterfaceIDShift, - kUSBInterfaceIDMask = kUSBMaxInterfaces-1, - - kUSBEndPtShift = 7, - kUSBDeviceMask = ((1 << kUSBEndPtShift) -1), - - kUSBNoPipeIdx = -1 -}; - -/*! -@enum bRequest Shifts and Masks -@discussion These are used to create the macro to encode the bRequest filed of a Device Request -*/ -enum { - kUSBRqDirnShift = 7, - kUSBRqDirnMask = 1, - - kUSBRqTypeShift = 5, - kUSBRqTypeMask = 3, - - kUSBRqRecipientMask = 0X1F -}; - -/*! -@defined USBmakebmRequestType -@discussion Macro to encode the bRequest field of a Device Request. It is used when constructing an IOUSBDevRequest. -*/ -#define USBmakebmRequestType(direction, type, recipient) \ - ((direction & kUSBRqDirnMask) << kUSBRqDirnShift) | \ - ((type & kUSBRqTypeMask) << kUSBRqTypeShift) | \ - (recipient & kUSBRqRecipientMask) - -/*! -@enum kUSBMaxIsocFrameReqCount -@discussion Maximum size in bytes allowed for one Isochronous frame -*/ -enum { - kUSBMaxFSIsocEndpointReqCount = 1023, // max size (bytes) of any one Isoc frame for 1 FS endpoint - kUSBMaxHSIsocEndpointReqCount = 3072, // max size (bytes) of any one Isoc frame for 1 HS endpoint - kUSBMaxHSIsocFrameCount = 7168 // max size (bytes) of all Isoc transfers in a HS frame -}; - -/*! -@defined EncodeRequest -@discussion Macro that encodes the bRequest and bRequestType fields of a IOUSBDevRequest into a single value. It is useful when one needs -to know what type of request the IOUSBDevRequest encodes and simplifies comparisons. -*/ -#define EncodeRequest(request, direction, type, recipient) \ - (((UInt16)request << 8) + \ - ((UInt16)recipient + \ - ((UInt16)type << kUSBRqTypeShift) + \ - ((UInt16)direction << kUSBRqDirnShift))) - - -/*! -@enum Standard Device Requests -@discussion Encoding of the standard device requests. -<tt> -<pre><b> -bmRequestType bRequest wValue wIndex wLength Data</b> -00000000B CLEAR_FEATURE Feature Zero Zero None (device) -00000001B Feature Interface Zero None (Interface) -00000010B Feature Endpoint Zero None (Endpoint) - -10000000B GET_CONFIGURATION Zero Zero One Configuration -10000000B GET_DESCRIPTOR Type LangID Length Descriptor -10000001B GET_INTERFACE Zero Interface One Alternate - -10000000B GET_STATUS Zero Zero Two status (device) -10000001B Zero Interface Two status (Interface) -10000010B Zero Endpoint Two status (Endpoint) - -00000000B SET_ADDRESS Address Zero Zero None -00000000B SET_CONFIGURATION Configuration Zero Zero None -00000000B SET_DESCRIPTOR Type LangID Length Descriptor - -00000000B SET_FEATURE Feature Zero Zero None (device) -00000001B Feature Interface Zero None (Interface) -00000010B Feature Endpoint Zero None (Endpoint) - -00000001B SET_INTERFACE Alternate Interface Zero None -10000010B SYNCH_FRAME Zero Endpoint Two Frame Number -</pre> -</tt> -*/ -enum { - kClearDeviceFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBStandard, kUSBDevice), - kClearInterfaceFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBStandard, kUSBInterface), - kClearEndpointFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBStandard, kUSBEndpoint), - kGetConfiguration = EncodeRequest(kUSBRqGetConfig, kUSBIn, kUSBStandard, kUSBDevice), - kGetDescriptor = EncodeRequest(kUSBRqGetDescriptor, kUSBIn, kUSBStandard, kUSBDevice), - kGetInterface = EncodeRequest(kUSBRqGetInterface, kUSBIn, kUSBStandard, kUSBInterface), - kGetDeviceStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBStandard, kUSBDevice), - kGetInterfaceStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBStandard, kUSBInterface), - kGetEndpointStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBStandard, kUSBEndpoint), - kSetAddress = EncodeRequest(kUSBRqSetAddress, kUSBOut, kUSBStandard, kUSBDevice), - kSetConfiguration = EncodeRequest(kUSBRqSetConfig, kUSBOut, kUSBStandard, kUSBDevice), - kSetDescriptor = EncodeRequest(kUSBRqSetDescriptor, kUSBOut, kUSBStandard, kUSBDevice), - kSetDeviceFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBStandard, kUSBDevice), - kSetInterfaceFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBStandard, kUSBInterface), - kSetEndpointFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBStandard, kUSBEndpoint), - kSetInterface = EncodeRequest(kUSBRqSetInterface, kUSBOut, kUSBStandard, kUSBInterface), - kSyncFrame = EncodeRequest(kUSBRqSyncFrame, kUSBIn, kUSBStandard, kUSBEndpoint), -}; - -/*! -@defined kCallInterfaceOpenWithGate - @discussion If the USB Device has this property, drivers for any of its interfaces will have their handleOpen method called while holding the workloop gate. - */ -#define kCallInterfaceOpenWithGate "kCallInterfaceOpenWithGate" - -// TYPES - -typedef UInt16 USBDeviceAddress; - -typedef uint32_t USBPhysicalAddress32; - -/*! - @typedef IOUSBIsocFrame - @discussion Structure used to encode information about each isoc frame. - @param frStatus Returns status associated with the frame. - @param frReqCount Input specifiying how many bytes to read or write. - @param frActCount Actual # of bytes transferred. -*/ -typedef struct IOUSBIsocFrame { - IOReturn frStatus; - UInt16 frReqCount; - UInt16 frActCount; -} IOUSBIsocFrame; - - -/*! - @typedef IOUSBLowLatencyIsocFrame - @discussion Structure used to encode information about each isoc frame that is processed - at hardware interrupt time (low latency). - @param frStatus Returns status associated with the frame. - @param frReqCount Input specifiying how many bytes to read or write. - @param frActCount Actual # of bytes transferred. - @param frTimeStamp Time stamp that indicates time when frame was procesed. -*/ -struct IOUSBLowLatencyIsocFrame { - IOReturn frStatus; - UInt16 frReqCount; - UInt16 frActCount; - AbsoluteTime frTimeStamp; -}; -typedef struct IOUSBLowLatencyIsocFrame IOUSBLowLatencyIsocFrame; - -/*! -@typedef IOUSBCompletionAction - @discussion Function called when USB I/O completes. - @param target The target specified in the IOUSBCompletion struct. - @param parameter The parameter specified in the IOUSBCompletion struct. - @param status Completion status. - @param bufferSizeRemaining Bytes left to be transferred. - */ -typedef void (*IOUSBCompletionAction)( - void * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining); - -/*! -@typedef IOUSBCompletionActionWithTimeStamp - @discussion Function called when USB I/O completes. - @param target The target specified in the IOUSBCompletion struct. - @param parameter The parameter specified in the IOUSBCompletion struct. - @param status Completion status. - @param bufferSizeRemaining Bytes left to be transferred. - @param timeStamp Time at which the transaction was processed. - */ -typedef void (*IOUSBCompletionActionWithTimeStamp)( - void * target, - void * parameter, - IOReturn status, - UInt32 bufferSizeRemaining, - AbsoluteTime timeStamp); - -/*! - @typedef IOUSBIsocCompletionAction - @discussion Function called when Isochronous USB I/O completes. - @param target The target specified in the IOUSBIsocCompletionn struct. - @param parameter The parameter specified in the IOUSBIsocCompletion struct. - @param status Completion status. - @param pFrames Pointer to the frame list containing the status for each frame transferred. -*/ -typedef void (*IOUSBIsocCompletionAction)( - void * target, - void * parameter, - IOReturn status, - IOUSBIsocFrame *pFrames); - -/*! - @typedef IOUSBLowLatencyIsocCompletionAction - @discussion Function called when Low Latency Isochronous USB I/O completes. - @param target The target specified in the IOUSBLowLatencyIsocCompletion struct. - @param parameter The parameter specified in the IOUSBLowLatencyIsocCompletion struct. - @param status Completion status. - @param pFrames Pointer to the low latency frame list containing the status for each frame transferred. -*/ -typedef void (*IOUSBLowLatencyIsocCompletionAction)( - void * target, - void * parameter, - IOReturn status, - IOUSBLowLatencyIsocFrame *pFrames); - -/*! -@typedef IOUSBCompletion - @discussion Struct specifying action to perform when a USB I/O completes. - @param target The target to pass to the action function. - @param action The function to call. - @param parameter The parameter to pass to the action function. - */ -typedef struct IOUSBCompletion { - void * target; - IOUSBCompletionAction action; - void * parameter; -} IOUSBCompletion; - -/*! -@typedef IOUSBCompletionWithTimeStamp - @discussion Struct specifying action to perform when a USB I/O completes. - @param target The target to pass to the action function. - @param action The function to call. - @param parameter The parameter to pass to the action function. - */ -typedef struct IOUSBCompletionWithTimeStamp { - void * target; - IOUSBCompletionActionWithTimeStamp action; - void * parameter; -} IOUSBCompletionWithTimeStamp; - -/*! - @typedef IOUSBIsocCompletion - @discussion Struct specifying action to perform when an Isochronous USB I/O completes. - @param target The target to pass to the action function. - @param action The function to call. - @param parameter The parameter to pass to the action function. -*/ -typedef struct IOUSBIsocCompletion { - void * target; - IOUSBIsocCompletionAction action; - void * parameter; -} IOUSBIsocCompletion; - -/*! - @typedef IOUSBLowLatencyIsocCompletion - @discussion Struct specifying action to perform when an Low Latency Isochronous USB I/O completes. - @param target The target to pass to the action function. - @param action The function to call. - @param parameter The parameter to pass to the action function. -*/ -typedef struct IOUSBLowLatencyIsocCompletion { - void * target; - IOUSBLowLatencyIsocCompletionAction action; - void * parameter; -} IOUSBLowLatencyIsocCompletion; - - -/*! -@defined IOUSBFamily error codes -@discussion Errors specific to the IOUSBFamily. Note that the iokit_usb_err(x) translates to 0xe0004xxx, where xxx is the value in parenthesis as a hex number. -*/ -#define iokit_usb_err(return) (sys_iokit|sub_iokit_usb|return) -#define kIOUSBUnknownPipeErr iokit_usb_err(0x61) // 0xe0004061 Pipe ref not recognized -#define kIOUSBTooManyPipesErr iokit_usb_err(0x60) // 0xe0004060 Too many pipes -#define kIOUSBNoAsyncPortErr iokit_usb_err(0x5f) // 0xe000405f no async port -#define kIOUSBNotEnoughPipesErr iokit_usb_err(0x5e) // 0xe000405e not enough pipes in interface -#define kIOUSBNotEnoughPowerErr iokit_usb_err(0x5d) // 0xe000405d not enough power for selected configuration -#define kIOUSBEndpointNotFound iokit_usb_err(0x57) // 0xe0004057 Endpoint Not found -#define kIOUSBConfigNotFound iokit_usb_err(0x56) // 0xe0004056 Configuration Not found -#define kIOUSBTransactionTimeout iokit_usb_err(0x51) // 0xe0004051 Transaction timed out -#define kIOUSBTransactionReturned iokit_usb_err(0x50) // 0xe0004050 The transaction has been returned to the caller -#define kIOUSBPipeStalled iokit_usb_err(0x4f) // 0xe000404f Pipe has stalled, error needs to be cleared -#define kIOUSBInterfaceNotFound iokit_usb_err(0x4e) // 0xe000404e Interface ref not recognized -#define kIOUSBLowLatencyBufferNotPreviouslyAllocated iokit_usb_err(0x4d) // 0xe000404d Attempted to use user land low latency isoc calls w/out calling PrepareBuffer (on the data buffer) first -#define kIOUSBLowLatencyFrameListNotPreviouslyAllocated iokit_usb_err(0x4c) // 0xe000404c Attempted to use user land low latency isoc calls w/out calling PrepareBuffer (on the frame list) first -#define kIOUSBHighSpeedSplitError iokit_usb_err(0x4b) // 0xe000404b Error to hub on high speed bus trying to do split transaction -#define kIOUSBSyncRequestOnWLThread iokit_usb_err(0x4a) // 0xe000404a A synchronous USB request was made on the workloop thread (from a callback?). Only async requests are permitted in that case -#define kIOUSBDeviceNotHighSpeed iokit_usb_err(0x49) // 0xe0004049 The device is not a high speed device, so the EHCI driver returns an error -#define kIOUSBDevicePortWasNotSuspended iokit_usb_err(0x50) // 0xe0004050 Port was not suspended - -/*! -@defined IOUSBFamily hardware error codes -@discussion These errors are returned by the OHCI controller. The # in parenthesis (xx) corresponds to the OHCI Completion Code. -For the following Completion codes, we return a generic IOKit error instead of a USB specific error. -<tt> -<pre> -Completion Code Error Returned Description -9 kIOReturnUnderrun (Data Underrun) EP returned less data than max packet size -8 kIOReturnOverrun (Data Overrun) Packet too large or more data than buffer -5 kIOReturnNotResponding Device Not responding -4 kIOUSBPipeStalled Endpoint returned a STALL PID -</pre> -</tt> -*/ -#define kIOUSBLinkErr iokit_usb_err(0x10) // 0xe0004010 -#define kIOUSBNotSent2Err iokit_usb_err(0x0f) // 0xe000400f Transaction not sent -#define kIOUSBNotSent1Err iokit_usb_err(0x0e) // 0xe000400e Transaction not sent -#define kIOUSBBufferUnderrunErr iokit_usb_err(0x0d) // 0xe000400d Buffer Underrun (Host hardware failure on data out, PCI busy?) -#define kIOUSBBufferOverrunErr iokit_usb_err(0x0c) // 0xe000400c Buffer Overrun (Host hardware failure on data out, PCI busy?) -#define kIOUSBReserved2Err iokit_usb_err(0x0b) // 0xe000400b Reserved -#define kIOUSBReserved1Err iokit_usb_err(0x0a) // 0xe000400a Reserved -#define kIOUSBWrongPIDErr iokit_usb_err(0x07) // 0xe0004007 Pipe stall, Bad or wrong PID -#define kIOUSBPIDCheckErr iokit_usb_err(0x06) // 0xe0004006 Pipe stall, PID CRC error -#define kIOUSBDataToggleErr iokit_usb_err(0x03) // 0xe0004003 Pipe stall, Bad data toggle -#define kIOUSBBitstufErr iokit_usb_err(0x02) // 0xe0004002 Pipe stall, bitstuffing -#define kIOUSBCRCErr iokit_usb_err(0x01) // 0xe0004001 Pipe stall, bad CRC - -/*! -@defined IOUSBFamily message codes -@discussion Messages specific to the IOUSBFamily. Note that the iokit_usb_msg(x) translates to 0xe0004xxx, where xxx is the value in parenthesis as a hex number. -*/ -#define iokit_usb_msg(message) (UInt32)(sys_iokit|sub_iokit_usb|message) -#define kIOUSBMessageHubResetPort iokit_usb_msg(0x01) // 0xe0004001 Message sent to a hub to reset a particular port -#define kIOUSBMessageHubSuspendPort iokit_usb_msg(0x02) // 0xe0004002 Message sent to a hub to suspend a particular port -#define kIOUSBMessageHubResumePort iokit_usb_msg(0x03) // 0xe0004003 Message sent to a hub to resume a particular port -#define kIOUSBMessageHubIsDeviceConnected iokit_usb_msg(0x04) // 0xe0004004 Message sent to a hub to inquire whether a particular port has a device connected or not -#define kIOUSBMessageHubIsPortEnabled iokit_usb_msg(0x05) // 0xe0004005 Message sent to a hub to inquire whether a particular port is enabled or not -#define kIOUSBMessageHubReEnumeratePort iokit_usb_msg(0x06) // 0xe0004006 Message sent to a hub to reenumerate the device attached to a particular port -#define kIOUSBMessagePortHasBeenReset iokit_usb_msg(0x0a) // 0xe000400a Message sent to a device indicating that the port it is attached to has been reset -#define kIOUSBMessagePortHasBeenResumed iokit_usb_msg(0x0b) // 0xe000400b Message sent to a device indicating that the port it is attached to has been resumed -#define kIOUSBMessageHubPortClearTT iokit_usb_msg(0x0c) // 0xe000400c Message sent to a hub to clear the transaction translator -#define kIOUSBMessagePortHasBeenSuspended iokit_usb_msg(0x0d) // 0xe000400d Message sent to a device indicating that the port it is attached to has been suspended -#define kIOUSBMessageFromThirdParty iokit_usb_msg(0x0e) // 0xe000400e Message sent from a third party. Uses IOUSBThirdPartyParam to encode the sender's ID -#define kIOUSBMessagePortWasNotSuspended iokit_usb_msg(0x0f) // 0xe000400f Message indicating that the hub driver received a resume request for a port that was not suspended -#define kIOUSBMessageExpressCardCantWake iokit_usb_msg(0x10) // 0xe0004010 Message from a driver to a bus that an express card will disconnect on sleep and thus shouldn't wake -#define kIOUSBMessageCompositeDriverReconfigured iokit_usb_msg(0x11) // 0xe0004011 Message from the composite driver indicating that it has finished re-configuring the device after a reset -#define kIOUSBMessageHubSetPortRecoveryTime iokit_usb_msg(0x12) // 0xe0004012 Message sent to a hub to set the # of ms required when resuming a particular port -#define kIOUSBMessageOvercurrentCondition iokit_usb_msg(0x13) // 0xe0004013 Message sent to the clients of the device's hub parent, when a device causes an overcurrent condition. The message argument contains the locationID of the device -#define kIOUSBMessageNotEnoughPower iokit_usb_msg(0x14) // 0xe0004014 Message sent to the clients of the device's hub parent, when a device causes an low power notice to be displayed. The message argument contains the locationID of the device -#define kIOUSBMessageController iokit_usb_msg(0x15) // 0xe0004015 Generic message sent from controller user client to controllers -#define kIOUSBMessageRootHubWakeEvent iokit_usb_msg(0x16) // 0xe0004016 Message from the HC Wakeup code indicating that a Root Hub port has a wake event - -// Obsolete -// -struct IOUSBMouseData { - UInt16 buttons; - SInt16 XDelta; - SInt16 YDelta; -}; -typedef struct IOUSBMouseData IOUSBMouseData; -typedef IOUSBMouseData * IOUSBMouseDataPtr; - -// Obsolete -// -struct IOUSBKeyboardData { - UInt16 keycount; - UInt16 usbkeycode[32]; -}; -typedef struct IOUSBKeyboardData IOUSBKeyboardData; -typedef IOUSBKeyboardData * IOUSBKeyboardDataPtr; - -// Obsolete -// -union IOUSBHIDData { - IOUSBKeyboardData kbd; - IOUSBMouseData mouse; -}; -typedef union IOUSBHIDData IOUSBHIDData; -typedef IOUSBHIDData * IOUSBHIDDataPtr; - -/*! - @typedef IOUSBDeviceDescriptor - @discussion Descriptor for a USB Device. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. -*/ -struct IOUSBDeviceDescriptor { - UInt8 bLength; - UInt8 bDescriptorType; - UInt16 bcdUSB; - UInt8 bDeviceClass; - UInt8 bDeviceSubClass; - UInt8 bDeviceProtocol; - UInt8 bMaxPacketSize0; - UInt16 idVendor; - UInt16 idProduct; - UInt16 bcdDevice; - UInt8 iManufacturer; - UInt8 iProduct; - UInt8 iSerialNumber; - UInt8 bNumConfigurations; -}; -typedef struct IOUSBDeviceDescriptor IOUSBDeviceDescriptor; -typedef IOUSBDeviceDescriptor * IOUSBDeviceDescriptorPtr; - -/*! - @typedef IOUSBDescriptorHeader - @discussion Standard header used for all USB descriptors. Used to read the length of a descriptor so that we can allocate storage for the whole descriptor later on. -*/ -struct IOUSBDescriptorHeader { - UInt8 bLength; - UInt8 bDescriptorType; -}; -typedef struct IOUSBDescriptorHeader IOUSBDescriptorHeader; -typedef IOUSBDescriptorHeader * IOUSBDescriptorHeaderPtr; - -/*! - @typedef IOUSBConfigurationDescriptor - @discussion Standard USB Configuration Descriptor. It is variable length, so this only specifies the known fields. We use the wTotalLength field to read the whole descriptor. - See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. -*/ -struct IOUSBConfigurationDescriptor { - UInt8 bLength; - UInt8 bDescriptorType; - UInt16 wTotalLength; - UInt8 bNumInterfaces; - UInt8 bConfigurationValue; - UInt8 iConfiguration; - UInt8 bmAttributes; - UInt8 MaxPower; -}; -typedef struct IOUSBConfigurationDescriptor IOUSBConfigurationDescriptor; -typedef IOUSBConfigurationDescriptor * IOUSBConfigurationDescriptorPtr; - -/*! - @typedef IOUSBConfigurationDescHeader - @discussion Header of a IOUSBConfigurationDescriptor. Used to get the total length of the descriptor. -*/ -struct IOUSBConfigurationDescHeader { - UInt8 bLength; - UInt8 bDescriptorType; - UInt16 wTotalLength; -}; -typedef struct IOUSBConfigurationDescHeader IOUSBConfigurationDescHeader; -typedef IOUSBConfigurationDescHeader * IOUSBConfigurationDescHeaderPtr; - -/*! - @typedef IOUSBInterfaceDescriptor - @discussion Descriptor for a USB Interface. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. -*/ -struct IOUSBInterfaceDescriptor { - UInt8 bLength; - UInt8 bDescriptorType; - UInt8 bInterfaceNumber; - UInt8 bAlternateSetting; - UInt8 bNumEndpoints; - UInt8 bInterfaceClass; - UInt8 bInterfaceSubClass; - UInt8 bInterfaceProtocol; - UInt8 iInterface; -}; -typedef struct IOUSBInterfaceDescriptor IOUSBInterfaceDescriptor; -typedef IOUSBInterfaceDescriptor * IOUSBInterfaceDescriptorPtr; - -/*! - @typedef IOUSBEndpointDescriptor - @discussion Descriptor for a USB Endpoint. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. -*/ -struct IOUSBEndpointDescriptor { - UInt8 bLength; - UInt8 bDescriptorType; - UInt8 bEndpointAddress; - UInt8 bmAttributes; - UInt16 wMaxPacketSize; - UInt8 bInterval; -}; -typedef struct IOUSBEndpointDescriptor IOUSBEndpointDescriptor; -typedef IOUSBEndpointDescriptor * IOUSBEndpointDescriptorPtr; - -enum{addPacketShift = 11}; // Bits for additional packets in maxPacketField. (Table 9-13) -#define mungeMaxPacketSize(w) ((w>1024)?(((w>>(addPacketShift))+1)*(w&((1<<addPacketShift)-1))):w) - -/*! - @typedef IOUSBHIDDescriptor - @discussion USB HID Descriptor. See the USB HID Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. (This structure - should have used the #pragma pack(1) compiler directive to get byte alignment. -*/ -struct IOUSBHIDDescriptor { - UInt8 descLen; - UInt8 descType; - UInt16 descVersNum; - UInt8 hidCountryCode; - UInt8 hidNumDescriptors; - UInt8 hidDescriptorType; - UInt8 hidDescriptorLengthLo; - UInt8 hidDescriptorLengthHi; -}; -typedef struct IOUSBHIDDescriptor IOUSBHIDDescriptor; -typedef IOUSBHIDDescriptor *IOUSBHIDDescriptorPtr; - -/*! - @typedef IOUSBHIDReportDesc - @discussion USB HID Report Descriptor header. See the USB HID Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. (This structure - should have used the #pragma pack(1) compiler directive to get byte alignment. -*/ -struct IOUSBHIDReportDesc { - UInt8 hidDescriptorType; - UInt8 hidDescriptorLengthLo; - UInt8 hidDescriptorLengthHi; -}; -typedef struct IOUSBHIDReportDesc IOUSBHIDReportDesc; -typedef IOUSBHIDReportDesc * IOUSBHIDReportDescPtr; - -/*! - @typedef IOUSBDeviceQualifierDescriptor - @discussion USB Device Qualifier Descriptor. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. -*/ -#pragma pack(1) -struct IOUSBDeviceQualifierDescriptor -{ - UInt8 bLength; - UInt8 bDescriptorType; - UInt16 bcdUSB; - UInt8 bDeviceClass; - UInt8 bDeviceSubClass; - UInt8 bDeviceProtocol; - UInt8 bMaxPacketSize0; - UInt8 bNumConfigurations; - UInt8 bReserved; -}; -typedef struct IOUSBDeviceQualifierDescriptor IOUSBDeviceQualifierDescriptor; -typedef IOUSBDeviceQualifierDescriptor * IOUSBDeviceQualifierDescriptorPtr; -#pragma options align=reset - -/*! - @typedef IOUSBDFUDescriptor - @discussion USB Device Firmware Update Descriptor. See the USB Device Firmware Update Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. -*/ -#pragma pack(1) -struct IOUSBDFUDescriptor -{ - UInt8 bLength; - UInt8 bDescriptorType; - UInt8 bmAttributes; - UInt16 wDetachTimeout; - UInt16 wTransferSize; -}; -typedef struct IOUSBDFUDescriptor IOUSBDFUDescriptor; -typedef IOUSBDFUDescriptor * IOUSBDFUDescriptorPtr; - -#pragma options align=reset - -/*! -@typedef IOUSBInterfaceAssociationDescriptor - @discussion USB Inerface Association Descriptor. ECN to the USB 2.0 Spec. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. - */ -#pragma pack(1) -struct IOUSBInterfaceAssociationDescriptor -{ - UInt8 bLength; - UInt8 bDescriptorType; - UInt8 bFirstInterface; - UInt8 bInterfaceCount; - UInt8 bFunctionClass; - UInt8 bFunctionSubClass; - UInt8 bFunctionProtocol; - UInt8 iFunction; -}; -typedef struct IOUSBInterfaceAssociationDescriptor IOUSBInterfaceAssociationDescriptor; -typedef IOUSBInterfaceAssociationDescriptor * IOUSBInterfaceAssociationDescriptorPtr; -#pragma options align=reset - -/*! - @typedef USBStatus - @discussion Type used to get a DeviceStatus as a single quantity. -*/ -typedef UInt16 USBStatus; -typedef USBStatus * USBStatusPtr; - -// These constants are obsolete -// -enum { - kIOUSBAnyClass = 0xFFFF, - kIOUSBAnySubClass = 0xFFFF, - kIOUSBAnyProtocol = 0xFFFF, - kIOUSBAnyVendor = 0xFFFF, - kIOUSBAnyProduct = 0xFFFF -}; - -// This structure are obsolete -// -typedef struct IOUSBMatch { - UInt16 usbClass; - UInt16 usbSubClass; - UInt16 usbProtocol; - UInt16 usbVendor; - UInt16 usbProduct; -} IOUSBMatch; - -/*! - @typedef IOUSBFindEndpointRequest - @discussion Struct used to find endpoints of an interface - type and direction are used to match endpoints, - type, direction, maxPacketSize and interval are updated - with the properties of the found endpoint. - @field type Type of endpoint: kUSBControl, kUSBIsoc, kUSBBulk, kUSBInterrupt, kUSBAnyType. If kUSBAnyType is specified, this field is treated as a don't care. - @field direction Direction of endpoint: kUSBOut, kUSBIn, kUSBAnyDirn. If kUSBAnyDirn is specified, this field is treated as a don't care. - @field maxPacketSize maximum packet size of endpoint. - @field interval Polling interval in mSec for endpoint. -*/ -typedef struct { - UInt8 type; - UInt8 direction; - UInt16 maxPacketSize; - UInt8 interval; -} IOUSBFindEndpointRequest; - -/*! - @struct IOUSBDevRequest - @discussion Parameter block for control requests, using a simple pointer - for the data to be transferred. - @field bmRequestType Request type: kUSBStandard, kUSBClass or kUSBVendor - @field bRequest Request code - @field wValue 16 bit parameter for request, host endianess - @field wIndex 16 bit parameter for request, host endianess - @field wLength Length of data part of request, 16 bits, host endianess - @field pData Pointer to data for request - data returned in bus endianess - @field wLenDone Set by standard completion routine to number of data bytes - actually transferred -*/ -typedef struct { - UInt8 bmRequestType; - UInt8 bRequest; - UInt16 wValue; - UInt16 wIndex; - UInt16 wLength; - void * pData; - UInt32 wLenDone; -} IOUSBDevRequest; -typedef IOUSBDevRequest * IOUSBDeviceRequestPtr; - -/*! - @struct IOUSBDevRequestTO - @discussion Parameter block for control requests with timeouts, using a simple pointer - for the data to be transferred. Same as a IOUSBDevRequest except for the two extra timeout fields. - @field bmRequestType Request type: kUSBStandard, kUSBClass or kUSBVendor - @field bRequest Request code - @field wValue 16 bit parameter for request, host endianess - @field wIndex 16 bit parameter for request, host endianess - @field wLength Length of data part of request, 16 bits, host endianess - @field pData Pointer to data for request - data returned in bus endianess - @field wLenDone Set by standard completion routine to number of data bytes - actually transferred - @field noDataTimeout Specifies a time value in milliseconds. Once the request is queued on the bus, if no data is transferred in this amount of time, the request will be aborted and returned. - @field completionTimeout Specifies a time value in milliseconds. Once the request is queued on the bus, if the entire request is not completed in this amount of time, the request will be aborted and returned -*/ -typedef struct { - UInt8 bmRequestType; - UInt8 bRequest; - UInt16 wValue; - UInt16 wIndex; - UInt16 wLength; - void * pData; - UInt32 wLenDone; - UInt32 noDataTimeout; - UInt32 completionTimeout; -} IOUSBDevRequestTO; - -/*! - @enum Default timeout values - @discussion default values used for data and completion timeouts. -*/ -enum -{ - kUSBDefaultControlNoDataTimeoutMS = 5000, - kUSBDefaultControlCompletionTimeoutMS = 0 -}; - -// Internal structure to pass parameters between IOUSBLib and UserClient -// -typedef struct -{ - UInt32 pipeRef; - void * buf; - UInt32 size; - UInt32 noDataTimeout; - UInt32 completionTimeout; -} IOUSBBulkPipeReq; - - -#if KERNEL -/*! - @struct IOUSBDevRequestDesc - @discussion Parameter block for control requests, using a memory descriptor - for the data to be transferred. Only available in the kernel. - @field bmRequestType Request type: kUSBStandard, kUSBClass or kUSBVendor - @field bRequest Request code - @field wValue 16 bit parameter for request, host endianess - @field wIndex 16 bit parameter for request, host endianess - @field wLength Length of data part of request, 16 bits, host endianess - @field pData Pointer to memory descriptor for data for request - data returned in bus endianess - @field wLenDone Set by standard completion routine to number of data bytes - actually transferred -*/ -typedef struct { - UInt8 bmRequestType; - UInt8 bRequest; - UInt16 wValue; - UInt16 wIndex; - UInt16 wLength; - IOMemoryDescriptor * pData; - UInt32 wLenDone; -} IOUSBDevRequestDesc; - - -/*! - @enum IOOptionBits - @discussion Parameter passed to an IOService::open() call. - @constant kIOUSBInterfaceOpenAlt Open the alternate interface specified when creating the interface. -*/ -enum { - kIOUSBInterfaceOpenAlt = 0x00010000 -}; - -#endif - -// Internal structure to pass parameters between IOUSBLib and UserClient -// -// use a structure because there's a limit of 6 total arguments -// to a user client method. -typedef struct { - UInt8 bmRequestType; - UInt8 bRequest; - UInt16 wValue; - UInt16 wIndex; - UInt16 wLength; - void * pData; // data pointer - UInt32 wLenDone; // # bytes transferred - UInt8 pipeRef; -} IOUSBDevReqOOL; - -// Internal structure to pass parameters between IOUSBLib and UserClient -// -typedef struct { - UInt8 bmRequestType; - UInt8 bRequest; - UInt16 wValue; - UInt16 wIndex; - UInt16 wLength; - void * pData; // data pointer - UInt32 wLenDone; // # bytes transferred - UInt8 pipeRef; - UInt32 noDataTimeout; - UInt32 completionTimeout; -} IOUSBDevReqOOLTO; - -// Internal structure to pass parameters between IOUSBLib and UserClient -// -// Structure to request isochronous transfer -// -typedef struct { - UInt32 fPipe; - void *fBuffer; - UInt32 fBufSize; - UInt64 fStartFrame; - UInt32 fNumFrames; - IOUSBIsocFrame *fFrameCounts; -} IOUSBIsocStruct; - -// Internal structure to pass parameters between IOUSBLib and UserClient -// -// Structure to request low latency isochronous transfer -// -struct IOUSBLowLatencyIsocStruct { - UInt32 fPipe; - UInt32 fBufSize; - UInt64 fStartFrame; - UInt32 fNumFrames; - UInt32 fUpdateFrequency; - UInt32 fDataBufferCookie; - UInt32 fDataBufferOffset; - UInt32 fFrameListBufferCookie; - UInt32 fFrameListBufferOffset; -}; - -typedef struct IOUSBLowLatencyIsocStruct IOUSBLowLatencyIsocStruct; - - -/*! - @struct IOUSBGetFrameStruct - @discussion Structure used from user space to return the frame number and a timestamp on when the frame register was read. - @field frame frame number - @field timeStamp AbsoluteTime when the frame was updated -*/ -typedef struct { - UInt64 frame; - AbsoluteTime timeStamp; -} IOUSBGetFrameStruct; - - -/*! - @struct IOUSBFindInterfaceRequest - @discussion Structure used with FindNextInterface. -*/ -typedef struct { - UInt16 bInterfaceClass; // requested class - UInt16 bInterfaceSubClass; // requested subclass - UInt16 bInterfaceProtocol; // requested protocol - UInt16 bAlternateSetting; // requested alt setting -} IOUSBFindInterfaceRequest; - -/*! - @enum kIOUSBFindInterfaceDontCare - @discussion Constant that can be used for the fields of IOUSBFindInterfaceRequest to specify that they should not be matched. -*/ -enum { - kIOUSBFindInterfaceDontCare = 0xFFFF - }; - -/*! - @enum kIOUSBVendorIDAppleComputer - @discussion USB Vendor ID for Apple Computer, Inc. -*/ -enum { - kIOUSBVendorIDAppleComputer = 0x05AC - }; - -/*! - @enum USBDeviceSpeed - @discussion Returns the speed of a particular USB device. - @constant kUSBDeviceSpeedLow The device a low speed device. - @constant kUSBDeviceSpeedFull The device a full speed device. - @constant kUSBDeviceSpeedHigh The device a high speed device. -*/ -enum { - kUSBDeviceSpeedLow = 0, - kUSBDeviceSpeedFull = 1, - kUSBDeviceSpeedHigh = 2 - }; - -/*! - @enum MicrosecondsInFrame - @discussion Returns the number of microseconds in a USB frame. - @constant kUSBFullSpeedMicrosecondsInFrame The device is attached to a bus running at full speed (1 ms / frame). - @constant kUSBHighSpeedMicrosecondsInFrame The device is attached to a bus running at high speed (125 microseconds / frame). -*/ -enum { - kUSBFullSpeedMicrosecondsInFrame = 1000, - kUSBHighSpeedMicrosecondsInFrame = 125 -}; - -// During low latency transfers, the stack will set the frStatus for each frame to this value. A client can check that to see if the transfer has completed. We set the frStatus to a -// valid return code when the transfer completes. -// -enum { - kUSBLowLatencyIsochTransferKey = 'llit' // Set frStatus field of first frame in isoch transfer to designate as low latency - }; - -// This structure is DEPRECATED. See the LowLatencyUserBufferInfoV2 -// -typedef struct LowLatencyUserBufferInfo LowLatencyUserBufferInfo; - -struct LowLatencyUserBufferInfo { - UInt32 cookie; - void * bufferAddress; - IOByteCount bufferSize; - UInt32 bufferType; - Boolean isPrepared; - LowLatencyUserBufferInfo * nextBuffer; -}; - -// This structure is DEPRECATED. See the LowLatencyUserBufferInfoV3 - -typedef struct LowLatencyUserBufferInfoV2 LowLatencyUserBufferInfoV2; - -struct LowLatencyUserBufferInfoV2 -{ - UInt32 cookie; - void * bufferAddress; - IOByteCount bufferSize; - UInt32 bufferType; - Boolean isPrepared; - void * mappedUHCIAddress; - LowLatencyUserBufferInfoV2 * nextBuffer; -}; - - -// This structure is used to pass information for the low latency calls between user space and the kernel. -// -typedef struct LowLatencyUserBufferInfoV3 LowLatencyUserBufferInfoV3; - -struct LowLatencyUserBufferInfoV3 -{ - uint64_t cookie; - mach_vm_address_t bufferAddress; - mach_vm_size_t bufferSize; - uint64_t bufferType; - uint64_t isPrepared; - mach_vm_address_t mappedUHCIAddress; - LowLatencyUserBufferInfoV3 * nextBuffer; -}; - - - /*! - @enum USBLowLatencyBufferType - @discussion Used to specify what kind of buffer to create when calling LowLatencyCreateBuffer(). - @constant kUSBLowLatencyWriteBuffer The buffer will be used to write data out to a device. - @constant kUSBLowLatencyReadBuffer The buffer will be used to read data from a device. - @constant kUSBLowLatencyFrameListBuffer The buffer will be used for a low latency isoch frame list. -*/ -typedef enum { - kUSBLowLatencyWriteBuffer = 0, - kUSBLowLatencyReadBuffer = 1, - kUSBLowLatencyFrameListBuffer = 2 -} USBLowLatencyBufferType; - -// USB User Notification Types -// -enum { - kUSBNoUserNotificationType = 0, - kUSBNotEnoughPowerNotificationType = 1, - kUSBIndividualOverCurrentNotificationType = 2, - kUSBGangOverCurrentNotificationType = 3 -}; - -/*! - @defined Property Definitions - @discussion Useful property names in USB land. -*/ -#define kUSBDevicePropertySpeed "Device Speed" -#define kUSBDevicePropertyBusPowerAvailable "Bus Power Available" -#define kUSBDevicePropertyAddress "USB Address" -#define kUSBDevicePropertyLocationID "locationID" -#define kUSBProductIDMask "idProductMask" -#define kUSBPreferredConfiguration "Preferred Configuration" -#define kUSBSuspendPort "kSuspendPort" -#define kUSBExpressCardCantWake "ExpressCardCantWake" -#define kUSBControllerNeedsContiguousMemoryForIsoch "Need contiguous memory for isoch" -#define kUSBHubDontAllowLowPower "kUSBHubDontAllowLowPower" -#define kUSBDeviceResumeRecoveryTime "kUSBDeviceResumeRecoveryTime" -#define kUSBOutOfSpecMPSOK "Out of spec MPS OK" -#define kConfigurationDescriptorOverride "ConfigurationDescriptorOverride" -#define kOverrideIfAtLocationID "OverrideIfAtLocationID" - -/*! -@enum USBReEnumerateOptions - @discussion Options used when calling ReEnumerateDevice. - @constant kUSBAddExtraResetTimeBit Setting this bit will cause the Hub driver to wait 100ms before addressing the device after the reset following the re-enumeration. - */ -typedef enum { - kUSBAddExtraResetTimeBit = 31, - kUSBAddExtraResetTimeMask = ( 1 << kUSBAddExtraResetTimeBit) -} USBReEnumerateOptions; - -/*! - @enum USBDeviceInformationBits - @discussion GetUSBDeviceInformation will return a unit32_t value with bits set indicating that a particular state is present in the USB device. These bits are described here - - @constant kUSBInformationDeviceIsCaptiveBit The USB device is directly attached to its hub and cannot be removed. - @constant kUSBInformationDeviceIsAttachedToRootHubBit The USB device is directly attached to the root hub - @constant kUSBInformationDeviceIsInternalBit The USB device is internal to the computer (all the hubs it attaches to are captive) - @constant kUSBInformationDeviceIsConnectedBit The USB device is connected to its hub - @constant kUSBInformationDeviceIsEnabledBit The hub port to which the USB device is attached is enabled - @constant kUSBInformationDeviceIsSuspendedBit The hub port to which the USB device is attached is suspended - @constant kUSBInformationDeviceIsInResetBit The hub port to which the USB device is attached is being reset - @constant kUSBInformationDeviceOvercurrentBit The USB device generated an overcurrent - @constant kUSBInformationDevicePortIsInTestModeBit The hub port to which the USB device is attached is in test mode - @constant kUSBInformationDeviceIsRootHub The device is actually the root hub simulation - @constant kUSBInformationRootHubisBuiltIn If this is a root hub simulation and it's built into the machine, this bit is set. If it's on an expansion card, it will be cleared - - */ - typedef enum { - kUSBInformationDeviceIsCaptiveBit = 0, - kUSBInformationDeviceIsAttachedToRootHubBit = 1, - kUSBInformationDeviceIsInternalBit = 2, - kUSBInformationDeviceIsConnectedBit = 3, - kUSBInformationDeviceIsEnabledBit = 4, - kUSBInformationDeviceIsSuspendedBit = 5, - kUSBInformationDeviceIsInResetBit = 6, - kUSBInformationDeviceOvercurrentBit = 7, - kUSBInformationDevicePortIsInTestModeBit = 8, - kUSBInformationDeviceIsRootHub = 9, - kUSBInformationRootHubisBuiltIn = 10, - kUSBInformationDeviceIsRemote = 11, - kUSBInformationDeviceIsCaptiveMask = (1 << kUSBInformationDeviceIsCaptiveBit), - kUSBInformationDeviceIsAttachedToRootHubMask = (1 << kUSBInformationDeviceIsAttachedToRootHubBit), - kUSBInformationDeviceIsInternalMask = (1 << kUSBInformationDeviceIsInternalBit), - kUSBInformationDeviceIsConnectedMask = (1 << kUSBInformationDeviceIsConnectedBit), - kUSBInformationDeviceIsEnabledMask = (1 << kUSBInformationDeviceIsEnabledBit), - kUSBInformationDeviceIsSuspendedMask = (1 << kUSBInformationDeviceIsSuspendedBit), - kUSBInformationDeviceIsInResetMask = (1 << kUSBInformationDeviceIsInResetBit), - kUSBInformationDeviceOvercurrentMask = (1 << kUSBInformationDeviceOvercurrentBit), - kUSBInformationDevicePortIsInTestModeMask = (1 << kUSBInformationDevicePortIsInTestModeBit), - kUSBInformationDeviceIsRootHubMask = (1 << kUSBInformationDeviceIsRootHub), - kUSBInformationRootHubisBuiltInMask = (1 << kUSBInformationRootHubisBuiltIn), - kUSBInformationDeviceIsRemoteMask = (1 << kUSBInformationDeviceIsRemote) - } USBDeviceInformationBits; - - /*! - @enum USBPowerRequestTypes - @discussion Used to specify what kind of power will be reserved using the IOUSBDevice RequestExtraPower and ReturnExtraPower APIs. - @constant kUSBPowerDuringSleep The power is to be used during sleep. - @constant kUSBPowerDuringWake The power is to be used while the system is awake (i.e not sleeping) - */ - typedef enum { - kUSBPowerDuringSleep = 0, - kUSBPowerDuringWake = 1 - } USBPowerRequestTypes; - - // Apple specific properties -#define kAppleCurrentAvailable "AAPL,current-available" -#define kAppleCurrentInSleep "AAPL,current-in-sleep" -#define kAppleCurrentExtra "AAPL,current-extra" -#define kAppleInternalUSBDevice "AAPL,device-internal" -#define kUSBBusID "AAPL,bus-id" - - -#ifdef __cplusplus -} -#endif - -#endif /* _USB_H */ diff --git a/i386/include/IOKit/usb/USBHub.h b/i386/include/IOKit/usb/USBHub.h deleted file mode 100644 index 4bbda15..0000000 --- a/i386/include/IOKit/usb/USBHub.h +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _USBHUB_H -#define _USBHUB_H - -#include <IOKit/usb/USB.h> -#include <IOKit/usb/USBSpec.h> - - /*! - @header USBHub.h - @abstract Constants and definitions used with Hub devices. - @discussion - */ - - /*! - @enum Hub Descriptor Type - @discussion - */ -enum { - kUSBHubDescriptorType = 0x29 -}; - - /*! - @enum HubFeatures - @discussion Used with SET_FEATURE to set hub and port features - */ -enum { - - kUSBHubLocalPowerChangeFeature = 0, /* Hub features */ - kUSBHubOverCurrentChangeFeature = 1, - - kUSBHubPortConnectionFeature = 0, /* port features */ - kUSBHubPortEnableFeature = 1, - kUSBHubPortSuspendFeature = 2, - kUSBHubPortOverCurrentFeature = 3, - kUSBHubPortResetFeature = 4, - kUSBHubPortPowerFeature = 8, - kUSBHubPortLowSpeedFeature = 9, - kUSBHubPortConnectionChangeFeature = 16, - kUSBHubPortEnableChangeFeature = 17, - kUSBHubPortSuspendChangeFeature = 18, - kUSBHubPortOverCurrentChangeFeature = 19, - kUSBHubPortResetChangeFeature = 20, - kUSBHubPortTestFeature = 21, - kUSBHubPortIndicatorFeature = 22 -}; - - /*! - @enum HubPortStatus - @discussion Used to decode the Port Status and Change - */ -enum { - kHubPortConnection = 0x0001, - kHubPortEnabled = 0x0002, - kHubPortSuspend = 0x0004, - kHubPortOverCurrent = 0x0008, - kHubPortBeingReset = 0x0010, - kHubPortPower = 0x0100, - kHubPortLowSpeed = 0x0200, - kHubPortHighSpeed = 0x0400, - kHubPortTestMode = 0x0800, - kHubPortIndicator = 0x1000, - - // these are the bits which cause the hub port state machine to keep moving - kHubPortStateChangeMask = kHubPortConnection | kHubPortEnabled | kHubPortSuspend | kHubPortOverCurrent | kHubPortBeingReset -}; - - - /*! - @enum HubStatus - @discussion Used to decode the Hub Status and Change - */ -enum { - kHubLocalPowerStatus = 1, - kHubOverCurrentIndicator = 2, - kHubLocalPowerStatusChange = 1, - kHubOverCurrentIndicatorChange = 2 -}; - - /*! - @enum HubCharacteristics - @discussion - */ -enum { - kPerPortSwitchingBit = (1 << 0), - kNoPowerSwitchingBit = (1 << 1), - kCompoundDeviceBit = (1 << 2), - kPerPortOverCurrentBit = (1 << 3), - kNoOverCurrentBit = (1 << 4), - - kHubPortIndicatorBit = 7, - kHubPortIndicatorMask = 0x0080 -}; - -/*! -@enum PowerSwitching - @discussion - */ -enum { - kHubSupportsGangPower = 0, - kHubSupportsIndividualPortPower = 1, - kHubPortSetPowerOff = 0, - kHubPortSetPowerOn = 1 -}; - -/*! -@enum PortIndicatorSelectors - @discussion - */ -enum { - kHubPortIndicatorAutomatic = 0, - kHubPortIndicatorAmber, - kHubPortIndicatorGreen, - kHubPortIndicatorOff -}; - -/*! - @enum Root Hub specific - @discussion - */ -enum { - kPrdRootHubApple = 0x8005, // ProductID for classic speed root hubs - kPrdRootHubAppleE = 0x8006, // ProductID for high speed root hubs - kUSBRootHubPollingRate = 32 // Enpoint polling rate interval for root hubs -}; - -/*! -@enum Hub Device Requests -@discussion Encoding of the hub specific standard requests -<tt> -<pre><b> -Request bmRequestType bRequest wValue wIndex wLength Data</b> -ClearHubFeature 0010 0000B CLEAR_FEATURE Feature Zero Zero None -ClearPortFeature 0010 0011B Feature Port Zero None - -GetBusState 1010 0011B GET_STATE Zero Port One Port Bus State - -GetHubDescriptor 1010 0000B GET_DESCRIPTOR Type Zero Length Descriptor - -GetHubStatus 1010 0000B GET_STATUS Zero Zero Four Hub Status -GetPortStatus 1010 0011B Zero Port Four Port Status - -SetHubDescriptor 0010 0000B SET_DESCRIPTOR Type Zero Length Descriptor - -SetHubFeature 0010 0000B SET_FEATURE Feature Zero Zero None -SetPortFeature 0010 0011B Feature Port Zero None -</pre> -</tt> - */ -enum { - kClearHubFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBClass, kUSBDevice), - kClearPortFeature = EncodeRequest(kUSBRqClearFeature, kUSBOut, kUSBClass, kUSBOther), - kGetPortState = EncodeRequest(kUSBRqGetState, kUSBIn, kUSBClass, kUSBOther), - kGetHubDescriptor = EncodeRequest(kUSBRqGetDescriptor, kUSBIn, kUSBClass, kUSBDevice), - kGetHubStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBClass, kUSBDevice), - kGetPortStatus = EncodeRequest(kUSBRqGetStatus, kUSBIn, kUSBClass, kUSBOther), - kSetHubDescriptor = EncodeRequest(kUSBRqGetDescriptor, kUSBOut, kUSBClass, kUSBDevice), - kSetHubFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBClass, kUSBDevice), - kSetPortFeature = EncodeRequest(kUSBRqSetFeature, kUSBOut, kUSBClass, kUSBOther) -}; - - -/*! - @typedef IOUSBHubDescriptor - @discussion USB Hub Descriptor. See the USB HID Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. -*/ -struct IOUSBHubDescriptor { - UInt8 length; - UInt8 hubType; - UInt8 numPorts; - UInt16 characteristics __attribute__((packed)); - UInt8 powerOnToGood; /* Port settling time, in 2ms */ - UInt8 hubCurrent; - /* These are received packed, will have to be unpacked */ - UInt8 removablePortFlags[8]; - UInt8 pwrCtlPortFlags[8]; -}; - -typedef struct IOUSBHubDescriptor IOUSBHubDescriptor; - -/*! - @typedef IOUSBHubStatus - @discussion Used to get the port status and change flags using GetPortStatus() -*/ -struct IOUSBHubStatus { - UInt16 statusFlags; - UInt16 changeFlags; -}; -typedef struct IOUSBHubStatus IOUSBHubStatus; -typedef IOUSBHubStatus * IOUSBHubStatusPtr; - -typedef struct IOUSBHubStatus IOUSBHubPortStatus; - - -/*! - @typedef IOUSBHubPortReEnumerateParam - @discussion Used to specify the port that needs to be reenumerated -*/ -typedef struct IOUSBHubPortReEnumerateParam IOUSBHubPortReEnumerateParam; - -struct IOUSBHubPortReEnumerateParam { - UInt32 portNumber; - UInt32 options; -}; - -typedef struct IOUSBHubPortClearTTParam IOUSBHubPortClearTTParam; - -struct IOUSBHubPortClearTTParam { - UInt32 portNumber; - UInt32 options; -#if 0 - UInt8 deviceAddress; <<0 - UInt8 endpointNum; <<8 - UInt8 endpointType; <<16 // As split transaction. 00 Control, 10 Bulk - UInt8 IN; <<24 // Direction, 1 = IN, 0 = OUT -#endif -}; - -#endif /* _USBHUB_H */ diff --git a/i386/include/IOKit/usb/USBSpec.h b/i386/include/IOKit/usb/USBSpec.h deleted file mode 100644 index 0665819..0000000 --- a/i386/include/IOKit/usb/USBSpec.h +++ /dev/null @@ -1,470 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -/* - * Constants that both OS9 and OSX want to define, and whose values are - * specified by the USB Standard. - * Put in a seperate file so they can be included if the OS9 include file isn't already - * included. - */ -#ifndef _USBSPEC_H -#define _USBSPEC_H - -#ifdef __cplusplus -extern "C" { -#endif - - /*! - @header USBSpec.h - @abstract Constants and definitions of parameters that are used in communcating with USB devices and interfaces. - @discussion - */ - - /*! - @enum Endpoint type - @discussion Used in IOUSBFindEndpointRequest's type field - */ -enum { - kUSBControl = 0, - kUSBIsoc = 1, - kUSBBulk = 2, - kUSBInterrupt = 3, - kUSBAnyType = 0xFF -}; - - /*! - @enum Endpoint direction - @discussion Used in IOUSBFindEndpointRequest's direction field - */ -enum { - kUSBOut = 0, - kUSBIn = 1, - kUSBNone = 2, - kUSBAnyDirn = 3 -}; - - /*! - @enum Device Request Type - @discussion This type is encoded in the bmRequestType field of a Device Request. It specifies the type of request: standard, class or vendor specific. - */ -enum { - kUSBStandard = 0, - kUSBClass = 1, - kUSBVendor = 2 -}; - - /*! - @enum Device Request Recipient - @discussion This recipient is encoded in the bmRequestType field of a Device Request. It specifies the type of recipient for a request: the device, the interface, or an endpoint. - */ -enum { - kUSBDevice = 0, - kUSBInterface = 1, - kUSBEndpoint = 2, - kUSBOther = 3 -}; - - /*! - @enum Device Request - @discussion Specifies values for the bRequest field of a Device Request. - */ -enum { - kUSBRqGetStatus = 0, - kUSBRqClearFeature = 1, - kUSBRqGetState = 2, - kUSBRqSetFeature = 3, - kUSBRqReserved2 = 4, - kUSBRqSetAddress = 5, - kUSBRqGetDescriptor = 6, - kUSBRqSetDescriptor = 7, - kUSBRqGetConfig = 8, - kUSBRqSetConfig = 9, - kUSBRqGetInterface = 10, - kUSBRqSetInterface = 11, - kUSBRqSyncFrame = 12 -}; - - /*! - @enum USB Descriptors - @discussion Specifies values for diffent descriptor types. - */ -enum { - kUSBAnyDesc = 0, // Wildcard for searches - kUSBDeviceDesc = 1, - kUSBConfDesc = 2, - kUSBStringDesc = 3, - kUSBInterfaceDesc = 4, - kUSBEndpointDesc = 5, - kUSBDeviceQualifierDesc = 6, - kUSBOtherSpeedConfDesc = 7, - kUSBInterfacePowerDesc = 8, - kUSBOnTheGoDesc = 9, - kUSDebugDesc = 10, - kUSBInterfaceAssociationDesc = 11, - kUSBHIDDesc = 0x21, - kUSBReportDesc = 0x22, - kUSBPhysicalDesc = 0x23, - kUSBHUBDesc = 0x29 -}; - - /*! - @enum Feature Selectors - @discussion Used with SET/CLEAR_FEATURE requests. - */ -enum { - kUSBFeatureEndpointStall = 0, - kUSBFeatureDeviceRemoteWakeup = 1 -}; - - /*! - @enum USB Power constants - @discussion Constants relating to USB Power. - */ -enum { - kUSB100mAAvailable = 50, - kUSB500mAAvailable = 250, - kUSB100mA = 50, - kUSBAtrBusPowered = 0x80, - kUSBAtrSelfPowered = 0x40, - kUSBAtrRemoteWakeup = 0x20 -}; - - /*! - @enum USB Release constants - @discussion Constants relating to USB releases as found in the bcdUSB field of the Device Descriptor. - */ -enum { - kUSBRel10 = 0x0100, - kUSBRel11 = 0x0110, - kUSBRel20 = 0x0200 -}; - - - /*! - @enum HID requests - @discussion Constants for HID requests. - */ -enum { - kHIDRqGetReport = 1, - kHIDRqGetIdle = 2, - kHIDRqGetProtocol = 3, - kHIDRqSetReport = 9, - kHIDRqSetIdle = 10, - kHIDRqSetProtocol = 11 -}; - - /*! - @enum HID report types - @discussion Constants for the three kinds of HID reports. - */ -enum { - kHIDRtInputReport = 1, - kHIDRtOutputReport = 2, - kHIDRtFeatureReport = 3 -}; - - - /*! - @enum HID Protocol - @discussion Used in the SET_PROTOCOL device request - */ -enum { - kHIDBootProtocolValue = 0, - kHIDReportProtocolValue = 1 -}; - - - -enum { - kUSBCapsLockKey = 0x39, - kUSBNumLockKey = 0x53, - kUSBScrollLockKey = 0x47 -}; - -/*! -@enum Device Class Codes - @discussion Constants for USB Device classes (bDeviceClass). - */ -enum { - kUSBCompositeClass = 0, - kUSBCommClass = 2, // Deprecated - kUSBCommunicationClass = 2, - kUSBHubClass = 9, - kUSBDataClass = 10, - kUSBPersonalHealthcareClass = 15, - kUSBDiagnosticClass = 220, - kUSBWirelessControllerClass = 224, - kUSBMiscellaneousClass = 239, - kUSBApplicationSpecificClass = 254, - kUSBVendorSpecificClass = 255 -}; - -/*! -@enum Interface Class - @discussion Constants for Interface classes (bInterfaceClass). - */ -enum { - kUSBAudioClass = 1, // Deprecated - kUSBAudioInterfaceClass = 1, - - kUSBCommunicationControlInterfaceClass = 2, - kUSBCommunicationDataInterfaceClass = 10, - - kUSBHIDClass = 3, - kUSBHIDInterfaceClass = 3, - - kUSBPhysicalInterfaceClass = 5, - - kUSBImageInterfaceClass = 6, - - kUSBPrintingClass = 7, // Deprecated - kUSBPrintingInterfaceClass = 7, - - kUSBMassStorageClass = 8, // Deprecated - kUSBMassStorageInterfaceClass = 8, - - kUSBChipSmartCardInterfaceClass = 11, - - kUSBContentSecurityInterfaceClass = 13, - - kUSBVideoInterfaceClass = 14, - - kUSBPersonalHealthcareInterfaceClass = 15, - - kUSBDiagnosticDeviceInterfaceClass = 220, - - kUSBWirelessControllerInterfaceClass = 224, - - kUSBApplicationSpecificInterfaceClass = 254, - - kUSBVendorSpecificInterfaceClass = 255 -}; - -// Obsolete -enum { - - kUSBDisplayClass = 4, // Obsolete -}; - -/*! - @enum Interface SubClass - @discussion Constants for USB Interface SubClasses (bInterfaceSubClass). -*/ -enum { - kUSBCompositeSubClass = 0, - - kUSBHubSubClass = 0, - - // For the kUSBAudioInterfaceClass - // - kUSBAudioControlSubClass = 0x01, - kUSBAudioStreamingSubClass = 0x02, - kUSBMIDIStreamingSubClass = 0x03, - - // For the kUSBApplicationSpecificInterfaceClass - // - kUSBDFUSubClass = 0x01, - kUSBIrDABridgeSubClass = 0x02, - kUSBTestMeasurementSubClass = 0x03, - - // For the kUSBMassStorageInterfaceClass - // - kUSBMassStorageRBCSubClass = 0x01, - kUSBMassStorageATAPISubClass = 0x02, - kUSBMassStorageQIC157SubClass = 0x03, - kUSBMassStorageUFISubClass = 0x04, - kUSBMassStorageSFF8070iSubClass = 0x05, - kUSBMassStorageSCSISubClass = 0x06, - - // For the kUSBHIDInterfaceClass - // - kUSBHIDBootInterfaceSubClass = 0x01, - - // For the kUSBCommunicationDataInterfaceClass - // - kUSBCommDirectLineSubClass = 0x01, - kUSBCommAbstractSubClass = 0x02, - kUSBCommTelephoneSubClass = 0x03, - kUSBCommMultiChannelSubClass = 0x04, - kUSBCommCAPISubClass = 0x05, - kUSBCommEthernetNetworkingSubClass = 0x06, - kUSBATMNetworkingSubClass = 0x07, - - // For the kUSBDiagnosticDeviceInterfaceClass - // - kUSBReprogrammableDiagnosticSubClass = 0x01, - - // For the kUSBWirelessControllerInterfaceClass - // - kUSBRFControllerSubClass = 0x01, - - // For the kUSBMiscellaneousClass - // - kUSBCommonClassSubClass = 0x02, - - // For the kUSBVideoInterfaceClass - // - kUSBVideoControlSubClass = 0x01, - kUSBVideoStreamingSubClass = 0x02, - kUSBVideoInterfaceCollectionSubClass = 0x03 - -}; - -/*! -@enum Interface Protocol - @discussion Reported in the bInterfaceProtocol field of the Interface Descriptor. - */ -enum { - - // For kUSBHIDInterfaceClass - // - kHIDNoInterfaceProtocol = 0, - kHIDKeyboardInterfaceProtocol = 1, - kHIDMouseInterfaceProtocol = 2, - kUSBVendorSpecificProtocol = 0xff, - - // For kUSBDiagnosticDeviceInterfaceClass - // - kUSB2ComplianceDeviceProtocol = 0x01, - - // For kUSBWirelessControllerInterfaceClass - // - kUSBBluetoothProgrammingInterfaceProtocol = 0x01, - - // For kUSBMiscellaneousClass - // - KUSBInterfaceAssociationDescriptorProtocol = 0x01 - -}; - - -/*! - @enum DFU Class Attributes - @discussion -*/ -enum { - kUSBDFUAttributesMask = 0x07, - kUSBDFUCanDownloadBit = 0, - kUSBDFUCanUploadBit = 1, - kUSBDFUManifestationTolerantBit = 2 -}; - -/*! - @enum Printer Class Requests - @discussion The bRequest parameter for Printing Class Sepcific Requests - */ -enum { - kUSPrintingClassGetDeviceID = 0, - kUSPrintingClassGePortStatus = 1, - kUSPrintingClassSoftReset = 2 -}; - - /*! -@enum Endpoint Descriptor bits - @discussion Bit definitions for endpoint descriptor fields - */ -enum { - kUSBbEndpointAddressMask = 0x0f, - kUSBbEndpointDirectionBit = 7, - kUSBbEndpointDirectionMask = ( 1 << kUSBbEndpointDirectionBit ), - kUSBEndpointDirectionOut = 0x00, - kUSBEndpointDirectionIn = 0x80, - kUSBEndpointbmAttributesTransferTypeMask = 0x03, - kUSBEndpointbmAttributesSynchronizationTypeMask = 0x0c, - kUSBEndpointbmAttributesSynchronizationTypeShift = 2, - kUSBEndpointbmAttributesUsageTypeMask = 0x30, - kUSBEndpointbmAttributesUsageTypeShift = 4 -}; - - /*! - @defineblock USB Descriptor and IORegistry constants - @discussion Various constants used to describe the fields in the various USB Device Descriptors and IORegistry names used for some of those fields - - @define kUSBDeviceClass The field in the USB Device Descriptor corresponding to the device class - @define kUSBDeviceSubClass The field in the USB Device Descriptor corresponding to the device sub class - @define kUSBDeviceProtocol The field in the USB Device Descriptor corresponding to the device protocol - @define kUSBDeviceMaxPacketSize The field in the USB Device Descriptor corresponding to the maximum packet size for endpoint 0 - @define kUSBVendorID The field in the USB Device Descriptor corresponding to the device USB Vendor ID - @define kUSBVendorName Deprecated. Use kUSBVendorID - @define kUSBProductID The field in the USB Device Descriptor corresponding to the device USB Product ID - @define kUSBProductName Deprecated. Use kUSBProductID - @define kUSBDeviceReleaseNumber The field in the USB Device Descriptor corresponding to the device release version - @define kUSBManufacturerStringIndex The field in the USB Device Descriptor corresponding to the index for the manufacturer's string - @define kUSBProductStringIndex The field in the USB Device Descriptor corresponding to the index for the product name's string - @define kUSBSerialNumberStringIndex The field in the USB Device Descriptor corresponding to the index for the serial number's string - @define kUSBDeviceNumConfigs The field in the USB Configuration Descriptor corresponding to the number of configurations - @define kUSBInterfaceNumber The field in the USB Configuration Descriptor corresponding to the number of configurations - @define kUSBAlternateSetting The field in the USB Configuration Descriptor corresponding to the number of configurations - @define kUSBNumEndpoints The field in the USB Configuration Descriptor corresponding to the number of configurations - @define kUSBInterfaceClass The field in the USB Interface Descriptor corresponding to the interface class - @define kUSBInterfaceSubClass The field in the USB Interface Descriptor corresponding to the interface sub class - @define kUSBInterfaceProtocol The field in the USB Interface Descriptor corresponding to the interface protocol - @define kUSBInterfaceStringIndex The field in the USB Interface Descriptor corresponding to the index for the interface name's string - @define kUSBConfigurationValue The field in the USB Interface Descriptor corresponding to the configuration - @define kUSBProductString IORegistry key for the device's USB Product string - @define kUSBVendorString IORegistry key for the device's USB manufacturer string - @define kUSBSerialNumberString IORegistry key for the device's USB serial number string - @define kUSB1284DeviceID IORegistry key for the 1284 Device ID of a printer - - */ -#define kUSBDeviceClass "bDeviceClass" -#define kUSBDeviceSubClass "bDeviceSubClass" -#define kUSBDeviceProtocol "bDeviceProtocol" -#define kUSBDeviceMaxPacketSize "bMaxPacketSize0" -#define kUSBVendorID "idVendor" // good name -#define kUSBVendorName kUSBVendorID // bad name - keep for backward compatibility -#define kUSBProductID "idProduct" // good name -#define kUSBProductName kUSBProductID // bad name - keep for backward compatibility -#define kUSBDeviceReleaseNumber "bcdDevice" -#define kUSBManufacturerStringIndex "iManufacturer" -#define kUSBProductStringIndex "iProduct" -#define kUSBSerialNumberStringIndex "iSerialNumber" -#define kUSBDeviceNumConfigs "bNumConfigurations" -#define kUSBInterfaceNumber "bInterfaceNumber" -#define kUSBAlternateSetting "bAlternateSetting" -#define kUSBNumEndpoints "bNumEndpoints" -#define kUSBInterfaceClass "bInterfaceClass" -#define kUSBInterfaceSubClass "bInterfaceSubClass" -#define kUSBInterfaceProtocol "bInterfaceProtocol" -#define kUSBInterfaceStringIndex "iInterface" -#define kUSBConfigurationValue "bConfigurationValue" -#define kUSBProductString "USB Product Name" -#define kUSBVendorString "USB Vendor Name" -#define kUSBSerialNumberString "USB Serial Number" -#define kUSB1284DeviceID "1284 Device ID" - /*! @/defineblock */ - - /*! - @enum Apple USB Vendor ID - @discussion Apple's vendor ID, assigned by the USB-IF -*/ -enum { - kAppleVendorID = 0x05AC -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _USBSPEC_H */ diff --git a/i386/include/IOKit/usb/USBTracepoints.h b/i386/include/IOKit/usb/USBTracepoints.h deleted file mode 100644 index f2fe81e..0000000 --- a/i386/include/IOKit/usb/USBTracepoints.h +++ /dev/null @@ -1,662 +0,0 @@ -/* - * Copyright � 2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __IOKIT_IO_USB_FAMILY_TRACEPOINTS__ -#define __IOKIT_IO_USB_FAMILY_TRACEPOINTS__ - -#include <IOKit/IOTypes.h> - -#include <sys/kdebug.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#define USB_SYSCTL "debug.USB" -#define kUSBTypeDebug 'USBD' -#define DEBUG_UNUSED( X ) ( void )( X ) - - extern UInt32 gUSBStackDebugFlags; - - typedef struct USBSysctlArgs - { - uint32_t type; - uint32_t operation; - uint32_t debugFlags; - } USBSysctlArgs; - - enum - { - kUSBOperationGetFlags = 0, - kUSBOperationSetFlags = 1 - }; - - // the following bits/masks are for use in the usb boot args - // e.g. boot-args="usb=0x102" will turn on Trace Points and set the EHCI retry count to 1 - // the bits can also be set with a sysctl call - enum - { - kUSBEnableDebugLoggingBit = 0, // bit 0 currently not used - kUSBEnableTracePointsBit = 1, // bit 1 used to turn on Trace Points when a USB controller first loads - kUSBEnableErrorLogBit = 2, // bit 2 (4) turns level 1 log for errors - kUSBDebugRetryCountShift = 8, // bits 8 and 9 will set the retry count for low level bus transactions - kUSBDebugRetryCountReserved = 9, // must be 1, 2, or 3 (0 is invalid, 3 is the default) - - kUSBEnableDebugLoggingMask = (1 << kUSBEnableDebugLoggingBit), - kUSBEnableTracePointsMask = (1 << kUSBEnableTracePointsBit), - kUSBDebugRetryCountMask = (3 << kUSBDebugRetryCountShift), - kUSBEnableErrorLogMask = (1 << kUSBEnableErrorLogBit) - }; - - - /* Kernel Tracepoints - * - * Kernel tracepoints are a logging mechanism reduces the size of a log-laden binary. - * Codes are placed into a buffer, from the kernel, and picked up by a userspace - * tool that displays a unique log message for each tracepoint. Additionally, each - * tracepoint may contain up-to four 32-bit (may change with LP64) arguments. - * - * To add a tracepoint, use the code below as an example: - * USBTrace( kUSBTController, kTPControllerStart, (uintptr_t)myArgValue ); - * Next, add the corresponding tracepoint code in the USBTracer tool, using - * the existing examples. Avoid using confidential information in the log strings. - * Some functions have a argument counter, to signify which of the function's tracepoints - * are actually being logged. When adding a tracepoint using an existing code, you - * must verify that you increment this argument counter properly. - * - * The trace codes consist of the following: - * - * ---------------------------------------------------------------------- - *| Class (8) | SubClass (8) | USBGroup(6) | Code (8) |Func | - *| DBG_IOKIT | DBG_IOUSB | | |Qual(2)| - * ---------------------------------------------------------------------- - * - * DBG_IOKIT(05h) DBG_IOUSB(2Dh) - * - * See <sys/kdebug.h> and IOTimeStamp.h for more details. - */ - - - // USB groupings (max of 64) - enum - { - // Family groupings - kUSBTController = 0, - kUSBTControllerUserClient = 1, - - kUSBTDevice = 2, - kUSBTDeviceUserClient = 3, - - kUSBTHub = 4, - kUSBTHubPort = 5, - kUSBTHSHubUserClient = 6, - kUSBTHID = 7, - kUSBTPipe = 8, - - kUSBTInterfaceUserClient = 9, - - kUSBTEnumeration = 10, // Tracepoints in various components to debug USB enumeration - - - // UIM groupings - kUSBTUHCI = 11, - kUSBTUHCIUIM = 12, - kUSBTUHCIInterrupts = 13, - - kUSBTOHCI = 14, - kUSBTOHCIInterrupts = 15, - - kUSBTEHCI = 20, - kUSBTEHCIHubInfo = 22, - kUSBTEHCIInterrupts = 23, - - // 30-33 reserved - - // 21-25 reserved - kUSBTHubPolicyMaker = 35, - kUSBTCompositeDriver = 36, - - // Actions - kUSBTOutstandingIO = 42, - - // kUSBAudio - kUSBAudio = 50 - - // 61-63 reserved - }; - - // USB Controller Tracepoints 0x052D0000 - 0x052D03FF - // kUSBTController - enum - { - kTPControllerStart = 1, - kTPControllerControlPacketHandler = 2, - kTPControllerMakeDevice = 3, - kTPControllerMakeHubDevice = 4, - kTPControllerCreateRootHubDevice = 5, - kTPControllerClearTTHandler = 6, - kTPControllerClearTT = 7, - kTPControllerDoCreateEP = 8, - kTPControllerReadV2 = 9, - kTPControllerReturnIsochDoneQueue = 10, - kTPControllersetPowerState = 11, - kTPControllerCheckPowerModeBeforeGatedCall = 12, - kTPControllerGatedPowerChange = 13, - kTPControllerCheckForRootHubChanges = 14, - kTPControllerRootHubQueueInterruptRead = 15, - kTPControllerRootHubTimer = 16, - kTPControllerDisjointCompletion = 17, - kTPControllerCheckForDisjointDescriptor = 18, - kTPControllerRead = 19, - kTPControllerV3Start = 20, - kTPAllocatePowerStateArray = 21, - kTPInitForPM = 22, - kTPIsocIOLL = 23, - kTPIsocIO = 24, - kTPControllerWrite = 25, - kTPCompletionCall = 26, - kTPControlTransaction = 27, - kTPInterruptTransaction = 28, - kTPInterruptTransactionData = 29, - kTPBulkTransaction = 30, - kTPBulkTransactionData = 31, - kTPIsocTransaction = 32, - kTPInterruptPacketHandler = 33, - kTPBulkPacketHandler = 34, - kTPDevZeroLock = 35, - kTPControlPacketHandlerData = 36, - kTPDoIOTransferIntrSync = 37, - kTPDoIOTransferBulkSync = 38, - kTPBulkPacketHandlerData = 39, - kTPInterruptPacketHandlerData = 40 - }; - - // USB Device Tracepoints - // kUSBTDevice - enum - { - kTPDeviceInit = 1, - kTPDeviceMessage = 2, - kTPDeviceResetDevice = 3, - kTPDeviceGetFullConfigurationDescriptor = 4, - kTPDeviceGetDeviceDescriptor = 5, - kTPDeviceGetConfigDescriptor = 6, - kTPDeviceSetConfiguration = 7, - kTPDeviceSetFeature = 8, - kTPDeviceDeviceRequest = 9, - kTPDeviceGetConfiguration = 10, - kTPDeviceGetDeviceStatus = 11, - kTPDeviceSuspendDevice = 12, - kTPDeviceReEnumerateDevice = 13, - kTPDeviceConfigLock = 14 - }; - - // USB Pipe Tracepoints - // kUSBTPipe - enum - { - kTPPipeInitToEndpoint = 1, - kTPBulkPipeRead = 2, - kTPBulkPipeWrite = 3, - kTPIsocPipeRead = 4, - kTPIsocPipeWrite = 5, - kTPIsocPipeReadLL = 6, - kTPIsocPipeWriteLL = 7, - kTPIBulkReadTS = 8, - kTPPipeControlRequest = 9, - kTPPipeControlRequestMemDesc = 10 - }; - - - // USB kUSBTControllerUserClient Tracepoints - // kUSBTControllerUserClient - enum - { - kTPControllerUCStart = 1, - kTPControllerUCOpen = 2, - kTPControllerUCReadRegister = 3, - kTPControllerUCWriteRegister = 4 - }; - - // USB kUSBTDeviceUserClient Tracepoints - // kUSBTDeviceUserClient - enum - { - kTPDeviceUCDeviceRequestIn = 1, - kTPDeviceUCDeviceRequestOut = 2, - kTPDeviceUCChangeOutstandingIO = 3, - kTPDeviceUCGetGatedOutstandingIO = 4, - kTPDeviceUCReqComplete = 5 - }; - - // USB InterfaceUserClient Tracepoints - // kUSBTInterfaceUserClient - enum - { - kTPInterfaceUCReadPipe = 1, - kTPInterfaceUCWritePipe = 2, - kTPInterfaceUCControlRequestOut = 3, - kTPInterfaceUCControlRequestIn = 4, - kTPInterfaceUCDoIsochPipeAsync = 5, - kTPInterfaceUCLowLatencyPrepareBuffer = 6, - kTPInterfaceUCChangeOutstandingIO = 7, - kTPInterfaceUCReqComplete = 8, - kTPInterfaceUCIsoReqComplete = 9, - kTPInterfaceUCLLIsoReqComplete = 10 - }; - - - // USB HSHubUserClient Tracepoints - // kUSBTHSHubUserClient - enum - { - kTPHSHubUCInitWithTask = 1, - kTPHSHubUCStart = 2, - kTPHSHubUCClose = 3, - kTPHSHubUCGetNumberOfPorts = 4, - kTPHSHubUCGetLocationID = 5, - kTPHSHubUCPutPortIntoTestMode = 6, - kTPHSHubUCSupportsIndicators = 7, - kTPHSHubUCSetIndicatorForPort = 8, - kTPHSHubUCGetPortIndicatorControl = 9, - kTPHSHubUCSetIndicatorsToAutomatic = 10, - kTPHSHubUCGetPowerSwitchingMode = 11, - kTPHSHubUCGetPortPower = 12, - kTPHSHubUCSetPortPower = 13, - kTPHSHubUCDisablePwrMgmt = 14 - }; - - // USB Hub Tracepoints - // kUSBTHub - enum - { - kTPHubStart = 1, - kTPHubMessage = 2, - kTPHubWillTerminate = 3, - kTPHubPowerStateWillChangeTo = 4, - kTPHubPowerChangeDone = 5, - kTPHubConfigureHub = 6, - kTPHubCheckPowerPowerRequirements = 7, - kTPHubHubPowerChange = 8, - kTPHubAreAllPortsDisconnectedOrSuspended= 9, - kTPHubSuspendPorts = 10, - kTPHubSetPortFeature = 11, - kTPHubClearPortFeature = 12, - kTPHubDoPortAction = 13, - kTPHubInterruptReadHandler = 14, - kTPHubResetPortZero = 15, - kTPHubProcessStateChanged = 16, - kTPHubRearmInterruptRead = 17, - kTPHubDoDeviceRequest = 18, - kTPHubWaitForPortResumes = 19, - kTPHubResetMyPort = 20, - kTPHubDecrementOutstandingIO = 21, - kTPHubChangeOutstandingIO = 22, - kTPHubChangeRaisedPowerState = 23, - kTPHubChangeOutstandingResumes = 24, - kTPHubEnterTestMode = 25, - kTPHubLeaveTestMode = 26, - kTPHubPutPortIntoTestMode = 27, - kTPHubGetPortIndicatorControl = 28, - kTPHubSetIndicatorsToAutomatic = 29, - kTPHubGetPortPower = 30, - kTPHubEnsureUsability = 31, - kTPHubCheckPowerRequirements = 32, - kTPHubWaitForPowerOn = 33, - kTPHubDoPortActionLock = 34, - kTPHubCheckForDeadDevice = 35 - }; - - // USB HubPort Tracepoints - // kUSBTHubPort - enum - { - kTPHubPortStop = 1, - kTPHubPortAddDevice = 2, - kTPHubPortSuspendPort = 3, - kTPHubPortFatalError = 4, - kTPHubPortAddDeviceResetChangeHandler = 5, - kTPHubPortHandleResetPortHandler = 6, - kTPHubPortDefaultOverCrntChangeHandler = 7, - kTPHubPortDefaultConnectionChangeHandler = 8, - kTPHubPortReleaseDevZeroLock = 9, - kTPHubPortDetachDevice = 10, - kTPHubPortGetDevZeroDescriptorWithRetries = 11, - kTPHubPortDisplayOverCurrentNotice = 12, - kTPHubPortWakeSuspendCommand = 13, - kTPHubPortWaitForSuspendCommand = 14, - kTPHubPortEnablePowerAfterOvercurrent = 15 - }; - - // USB HID Tracepoints - // kUSBTHID - enum - { - kTPHIDStart = 1, - kTPHIDpowerStateWillChangeTo = 2, - kTPHIDsetPowerState = 3, - kTPHIDpowerStateDidChangeTo = 4, - kTPHIDpowerChangeDone = 5, - kTPHIDhandleStart = 6, - kTPHIDClearFeatureEndpointHalt = 7, - kTPHIDHandleReport = 8, - kTPHIDSuspendPort = 9, - kTPHIDAbortAndSuspend = 10, - kTPHIDClaimPendingRead = 11, - kTPHIDChangeOutstandingIO = 12, - kTPHIDRearmInterruptRead = 13, - kTPHIDInitializeUSBHIDPowerManagement = 14, - kTPHIDInterruptRead = 15, - kTPHIDInterruptReadError = 16, - kTPHIDCheckForDeadDevice = 17 - }; - - // USB Enumeration Tracepoints - // kUSBTEnumeration - enum - { - kTPEnumerationProcessStatusChanged = 1, - kTPEnumerationInitialGetPortStatus = 2, - kTPEnumerationCallAddDevice = 3, - kTPEnumerationAddDevice = 4, - kTPEnumerationResetPort = 5, - kTPEnumerationAddDeviceResetChangeHandler = 6, - kTPEnumerationRegisterService = 7, - kTPEnumerationLowSpeedDevice = 8, - kTPEnumerationFullSpeedDevice = 9 - - }; - - // USB UHCI Tracepoints - // kUSBTUHCI - enum - { - kTPUHCIMessage = 1, - kTPUHCIGetFrameNumber = 2, - kTPUHCIScavengeIsocTransactions = 3, - kTPUHCIScavengeQueueHeads = 4, - kTPUHCIAllocateQH = 5, - kTPUHCIRootHubStatusChange = 6, - kTPUHCIRHSuspendPort = 7, - kTPUHCIRHHoldPortReset = 8, - kTPUHCIRHResumePortCompletion = 9, - kTPUHCISuspendController = 10, - KTPUHCIResumeController = 11, - KTPUHCIResetControllerState = 12, - KTPUHCIRestartControllerFromReset = 13, - KTPUHCIEnableInterrupts = 14, - KTPUHCIDozeController = 15, - KTPUHCIWakeFromDoze = 16, - KTPUHCIPowerState = 17, - }; - - - // USB UHCI Tracepoints - // kUSBTUHCIUIM - enum - { - kTPUHCIUIMCreateControlEndpoint = 1, - kTPUHCIUIMCreateBulkEndpoint = 2, - kTPUHCIUIMCreateInterruptEndpoint = 3, - kTPUHCIUIMCreateIsochEndpoint = 4, - kTPUHCIUIMCreateIsochTransfer = 5, - kTPUHCIUIMDeleteEndpoint = 6, - kTPUHCIUIMUnlinkQueueHead = 7, - kTPUHCIUIMCheckForTimeouts = 8, - kTPUHCIUIMReturnOneTransaction = 9, - kTPUHCIUIMAllocateTDChain = 10, - kTPUHCIUIMAddIsochFramesToSchedule = 11, - kTPUHCIUIMAbortIsochEP = 12, - kTPUHCIUIMCreateInterruptTransfer = 13, - kTPUHCIUIMHandleEndpointAbort = 14 - }; - - // USB UHCI Interrupt Tracepoints - // kUSBTUHCIInterrupts - enum - { - kTPUHCIInterruptsGetFrameNumberInternal = 1, - kTPUHCIInterruptsFilterInterrupt = 2, - kTPUHCIInterruptsHandleInterrupt = 3, - kTPUHCIUpdateFrameList = 4 - }; - - // USB EHCI Tracepoints - // kUSBTEHCI - enum - { - kTPEHCIRootHubResetPort = 1, - kTPEHCIRootHubPortEnable = 2, - kTPEHCIRootHubPortSuspend = 3, - // kTPEHCIRootHubStatusChange = 4, - kTPEHCIRHResumePortCompletion = 5, - kTPEHCIUIMFinalize = 6, - kTPEHCIGetFrameNumber32 = 7, - kTPEHCIGetFrameNumber = 8, - kTPEHCIAllocateQH = 9, - kTPEHCIEnableAsyncSchedule = 10, - kTPEHCIDisableAsyncSchedule = 11, - kTPEHCIEnablePeriodicSchedule = 12, - kTPEHCIDisablePeriodicSchedule = 13, - kTPEHCIMessage = 14, - kTPEHCIMakeEmptyEndPoint = 15, - kTPEHCIAllocateTDs = 16, - kTPEHCIMungeECHIStatus = 17, - kTPEHCIScavengeIsocTransactions = 18, - kTPEHCIScavengeAnEndpointQueue = 19, - kTPEHCIScavengeCompletedTransactions = 20, - kTPEHCICreateBulkEndpoint = 21, - kTPEHCICreateBulkTransfer = 22, - - kTPEHCICreateInterruptEndpoint = 24, - kTPEHCICreateIsochEndpoint = 25, - kTPEHCIAbortIsochEP = 26, - kTPEHCIHandleEndpointAbort = 27, - kTPEHCICreateInterruptTransfer = 28, - kTPEHCIUnlinkAsyncEndpoint = 29, - kTPEHCIDeleteEndpoint = 30, - kTPEHCICreateHSIsochTransfer = 31, - kTPEHCICreateSplitIsochTransfer = 32, - kTPEHCICreateIsochTransfer = 33, - kTPEHCIAddIsocFramesToSchedule = 34, - kTPEHCIReturnOneTransaction = 35, - kTPEHCICheckEDListForTimeouts = 36, - kTPEHCISuspendUSBBus = 37, - kTPEHCICheckForTimeouts = 38, - kTPEHCIResumeUSBBus = 39, - kTPEHCIRestartUSBBus = 40, - kTPEHCIResetControllerState = 41, - kTPEHCIDozeController = 42, - kTPEHCIWakeControllerFromDoze = 43, - kTPEHCIEnableInterrupts = 44, - kTPEHCIPowerState = 45, - kTPEHCIStopUSBBus = 46, - kTPEHCIRestartControllerFromReset = 47 - }; - - // USB EHCI Interrupt Tracepoints - // kUSBTEHCIInterrupts - enum - { - kTPEHCIInterruptsPollInterrupts = 1, - kTPEHCIInterruptsPrimaryInterruptFilter = 2, - kTPEHCIUpdateFrameList = 3, - }; - - - // USB EHCI Interrupt Tracepoints - // kUSBTEHCIHubInfo - enum - { - kTPEHCIAvailableIsochBandwidth = 1, - kTPEHCIAllocateIsochBandwidth = 2 - }; - - // USB OHCI Tracepoints - // kUSBTOHCI - enum - { - kTPOHCIInitialize = 1, - kTPOHCICreateGeneralTransfer = 2, - kTPOHCIAbortEndpoint = 3, - kTPOHCIDeleteEndpoint = 4, - kTPOHCIEndpointStall = 5, - kTPOHCICreateIsochTransfer = 6, - kTPOHCIAllocateTD = 7, - kTPOHCIAllocateITD = 8, - kTPOHCIAllocateED = 9, - kTPOHCIProcessCompletedITD = 10, - kTPOHCIReturnTransactions = 11, - kTPOHCIMessage = 12, - KTPOHCISuspendUSBBus = 13, - KTPOHCIResumeUSBBus = 14, - KTPOHCIResetControllerState = 15, - KTPOHCIRestartControllerFromReset = 16, - KTPOHCIEnableInterrupts = 17, - KTPOHCIDozeController = 18, - KTPOHCIWakeControllerFromDoze = 19, - KTPOHCIPowerState = 20, - kTPOHCIDoneQueueCompletion = 21 - }; - - // USB OHCI Interrupt Tracepoints - // kUSBTOHCIInterrupts - enum - { - kTPOHCIInterruptsPollInterrupts = 1, - kTPOHCIInterruptsPrimaryInterruptFilter = 2, - kTPOHCIUpdateFrameList = 3 - }; - - - // USB HubPolicyMaker Tracepoints - // kUSBTHubPolicyMaker - enum - { - kTPSetPowerState = 1 - }; - - // USB CompositeDriver Tracepoints - // kUSBTCompositeDriver - enum - { - kTPCompositeDriverConfigureDevice = 1 - }; - - // USB USB OutstandingIO Tracepoints - // kUSBTOutstandingIO - enum - { - kTPDeviceUCDecrement = 1, - kTPDeviceUCIncrement = 2, - kTPInterfaceUCDecrement = 3, - kTPInterfaceUCIncrement = 4, - kTPHubDecrement = 5, - kTPHubIncrement = 6, - kTPHIDDecrement = 7, - kTPHIDIncrement = 8 - }; - - // USB Audio driver Tracepoints - // kUSBAudio - enum - { - kTPAudioDriverRead = 1, - kTPAudioDriverCoalesceInputSamples = 2, - kTPAudioDriverCoalesceError = 3, - kTPAudioDriverCoalesce = 4, - kTPAudioDriverReadHandler = 5, - kTPAudioDriverCoalesceError2 = 6, - kTPAudioDriverConvertInputSamples = 7 - }; - - // Tracepoint macros. -#define USB_TRACE(USBClass, code, funcQualifier) ( ( ( DBG_IOKIT & 0xFF ) << 24) | ( ( DBG_IOUSB & 0xFF ) << 16 ) | ( ( USBClass & 0x3F ) << 10 ) | ( ( code & 0xFF ) << 2 ) | ( funcQualifier & 0x3 ) ) - -#define kTPAllUSB USB_TRACE ( 0, 0, 0 ) - -#define USB_CONTROLLER_TRACE(code) USB_TRACE( kUSBTController, code, DBG_FUNC_NONE ) -#define USB_CONTROLLER_UC_TRACE(code) USB_TRACE( kUSBTControllerUserClient, code, DBG_FUNC_NONE ) -#define USB_DEVICE_TRACE(code) USB_TRACE( kUSBTDevice, code, DBG_FUNC_NONE ) -#define USB_DEVICE_UC_TRACE(code) USB_TRACE( kUSBTDeviceUserClient, code, DBG_FUNC_NONE ) - -#define USB_HUB_TRACE(code) USB_TRACE( kUSBTHub, code, DBG_FUNC_NONE ) -#define USB_HUB_PORT_TRACE(code) USB_TRACE( kUSBTHubPort, code, DBG_FUNC_NONE ) -#define USB_HUB_UC_TRACE(code) USB_TRACE( kUSBTHSHubUserClient, code, DBG_FUNC_NONE ) -#define USB_HID_TRACE(code) USB_TRACE( kUSBTHID, code, DBG_FUNC_NONE ) -#define USB_PIPE_TRACE(code) USB_TRACE( kUSBTPipe, code, DBG_FUNC_NONE ) - -#define USB_INTERFACE_UC_TRACE(code) USB_TRACE( kUSBTInterfaceUserClient, code, DBG_FUNC_NONE ) - -#define USB_ENUMERATION_TRACE(code) USB_TRACE( kUSBTEnumeration, code, DBG_FUNC_NONE ) - -#define USB_UHCI_TRACE(code) USB_TRACE( kUSBTUHCI, code, DBG_FUNC_NONE ) -#define USB_UHCI_UIM_TRACE(code) USB_TRACE( kUSBTUHCIUIM, code, DBG_FUNC_NONE ) -#define USB_UHCI_INTERRUPTS_TRACE(code) USB_TRACE( kUSBTUHCIInterrupts, code, DBG_FUNC_NONE ) - -#define USB_OHCI_TRACE(code) USB_TRACE( kUSBTOHCI, code, DBG_FUNC_NONE ) -#define USB_OHCI_INTERRUPTS_TRACE(code) USB_TRACE( kUSBTOHCIInterrupts, code, DBG_FUNC_NONE ) - -#define USB_EHCI_TRACE(code) USB_TRACE( kUSBTEHCI, code, DBG_FUNC_NONE ) -#define USB_EHCI_HUBINFO_TRACE(code) USB_TRACE( kUSBTEHCIHubInfo, code, DBG_FUNC_NONE ) -#define USB_EHCI_INTERRUPTS_TRACE(code) USB_TRACE( kUSBTEHCIInterrupts, code, DBG_FUNC_NONE ) - -#define USB_HUB_POLICYMAKER_TRACE(code) USB_TRACE( kUSBTHubPolicyMaker, code, DBG_FUNC_NONE ) -#define USB_COMPOSITE_DRIVER_TRACE(code) USB_TRACE( kUSBTCompositeDriver, code, DBG_FUNC_NONE ) - -#define USB_OUTSTANDING_IO_TRACE(code) USB_TRACE( kUSBTOutstandingIO, code, DBG_FUNC_NONE ) - -#define USB_AUDIO_DRIVER_TRACE(code) USB_TRACE( kUSBAudio, code, DBG_FUNC_NONE ) - -#ifdef KERNEL - -#include <IOKit/IOTimeStamp.h> - -#define USBTrace(USBClass, code, a, b, c, d) { \ - if (gUSBStackDebugFlags & kUSBEnableTracePointsMask) { \ - IOTimeStampConstant( USB_TRACE(USBClass, code, DBG_FUNC_NONE), a, b, c, d ); \ - } \ - } - -#define USBTrace_Start(USBClass, code, a, b, c, d) { \ - if (gUSBStackDebugFlags & kUSBEnableTracePointsMask) { \ - IOTimeStampConstant( USB_TRACE(USBClass, code, DBG_FUNC_START), a, b, c, d ); \ - } \ - } - -#define USBTrace_End(USBClass, code, a, b, c, d) { \ - if (gUSBStackDebugFlags & kUSBEnableTracePointsMask) { \ - IOTimeStampConstant( USB_TRACE(USBClass, code, DBG_FUNC_END), a, b, c, d ); \ - } \ - } - -#endif - - - -#ifdef __cplusplus -} -#endif - - -#endif /* __IOKIT_IO_USB_FAMILY_TRACEPOINTS__ */ diff --git a/i386/include/libkern/crypto/md5.h b/i386/include/libkern/crypto/md5.h deleted file mode 100644 index 57e826a..0000000 --- a/i386/include/libkern/crypto/md5.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -/* - * MD5.H - header file for MD5.C - */ - -/* - * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All - * rights reserved. - * - * License to copy and use this software is granted provided that it - * is identified as the "RSA Data Security, Inc. MD5 Message-Digest - * Algorithm" in all material mentioning or referencing this software - * or this function. - * - * License is also granted to make and use derivative works provided - * that such works are identified as "derived from the RSA Data - * Security, Inc. MD5 Message-Digest Algorithm" in all material - * mentioning or referencing the derived work. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - -#ifndef _CRYPTO_MD5_H_ -#define _CRYPTO_MD5_H_ - -#include <sys/types.h> -#include <sys/cdefs.h> - -__BEGIN_DECLS - -#define MD5_DIGEST_LENGTH 16 - -/* MD5 context. */ -typedef struct { - u_int32_t state[4]; /* state (ABCD) */ - u_int32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */ - unsigned char buffer[64]; /* input buffer */ -} MD5_CTX; - -extern void MD5Init(MD5_CTX *); -extern void MD5Update(MD5_CTX *, const void *, unsigned int); -extern void MD5Final(unsigned char [MD5_DIGEST_LENGTH], MD5_CTX *); - -__END_DECLS - -#endif /* _CRYPTO_MD5_H_ */ diff --git a/i386/include/libkern/crypto/sha1.h b/i386/include/libkern/crypto/sha1.h deleted file mode 100644 index 9acc46b..0000000 --- a/i386/include/libkern/crypto/sha1.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _CRYPTO_SHA1_H_ -#define _CRYPTO_SHA1_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#define SHA_DIGEST_LENGTH 20 -#define SHA1_RESULTLEN SHA_DIGEST_LENGTH - -typedef struct sha1_ctxt { - union { - u_int8_t b8[20]; - u_int32_t b32[5]; /* state (ABCDE) */ - } h; - union { - u_int8_t b8[8]; - u_int32_t b32[2]; - u_int64_t b64[1]; /* # of bits, modulo 2^64 (msb first) */ - } c; - union { - u_int8_t b8[64]; - u_int32_t b32[16]; /* input buffer */ - } m; - u_int8_t count; /* unused; for compatibility only */ -} SHA1_CTX; - -/* For compatibility with the other SHA-1 implementation. */ -#define sha1_init(c) SHA1Init(c) -#define sha1_loop(c, b, l) SHA1Update(c, b, l) -#define sha1_result(c, b) SHA1Final(b, c) - -extern void SHA1Init(SHA1_CTX *); -extern void SHA1Update(SHA1_CTX *, const void *, size_t); -extern void SHA1UpdateUsePhysicalAddress(SHA1_CTX *, const void *, size_t); -extern void SHA1Final(void *, SHA1_CTX *); - -#ifdef __cplusplus -} -#endif - -#endif /*_CRYPTO_SHA1_H_*/ diff --git a/i386/include/libkern/ppc/OSByteOrder.h b/i386/include/libkern/ppc/OSByteOrder.h deleted file mode 100644 index c666685..0000000 --- a/i386/include/libkern/ppc/OSByteOrder.h +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _OS_OSBYTEORDERPPC_H -#define _OS_OSBYTEORDERPPC_H - -#include <stdint.h> - -#if !defined(OS_INLINE) -# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -# define OS_INLINE static inline -# elif defined(__MWERKS__) || defined(__cplusplus) -# define OS_INLINE static inline -# else -# define OS_INLINE static __inline__ -# endif -#endif - -/* Functions for byte reversed loads. */ - -OS_INLINE -uint16_t -OSReadSwapInt16( - const volatile void * base, - uintptr_t byteOffset -) -{ - uint16_t result; - volatile uint16_t *addr = (volatile uint16_t *)((uintptr_t)base + byteOffset); - -#if defined(__llvm__) - result = *addr; - result = ((result << 8) | (result >> 8)); -#else - __asm__ ("lhbrx %0, %2, %1" - : "=r" (result) - : "r" (base), "bO" (byteOffset), "m" (*addr)); -#endif - - return result; -} - -OS_INLINE -uint32_t -OSReadSwapInt32( - const volatile void * base, - uintptr_t byteOffset -) -{ - uint32_t result; - volatile uint32_t *addr = (volatile uint32_t *)((uintptr_t)base + byteOffset); - -#if defined(__llvm__) - result = __builtin_bswap32(*addr); -#else - __asm__ ("lwbrx %0, %2, %1" - : "=r" (result) - : "r" (base), "bO" (byteOffset), "m" (*addr)); -#endif - - return result; -} - -OS_INLINE -uint64_t -OSReadSwapInt64( - const volatile void * base, - uintptr_t byteOffset -) -{ - volatile uint64_t *addr = (volatile uint64_t *)((uintptr_t)base + byteOffset); - union { - uint64_t u64; - uint32_t u32[2]; - } u; - -#if defined(__llvm__) - u.u64 = __builtin_bswap64(*addr); -#else - __asm__ ("lwbrx %0, %3, %2\n\t" - "lwbrx %1, %4, %2" - : "=&r" (u.u32[1]), "=r" (u.u32[0]) - : "r" (base), "bO" (byteOffset), "b" (byteOffset + 4), "m" (*addr)); -#endif - - return u.u64; -} - -/* Functions for byte reversed stores. */ - -OS_INLINE -void -OSWriteSwapInt16( - volatile void * base, - uintptr_t byteOffset, - uint16_t data -) -{ - volatile uint16_t *addr = (volatile uint16_t *)((uintptr_t)base + byteOffset); - -#if defined(__llvm__) - *addr = ((data >> 8) | (data << 8)); -#else - __asm__ ("sthbrx %1, %3, %2" - : "=m" (*addr) - : "r" (data), "r" (base), "bO" (byteOffset)); -#endif -} - -OS_INLINE -void -OSWriteSwapInt32( - volatile void * base, - uintptr_t byteOffset, - uint32_t data -) -{ - volatile uint32_t *addr = (volatile uint32_t *)((uintptr_t)base + byteOffset); - -#if defined(__llvm__) - *addr = __builtin_bswap32(data); -#else - __asm__ ("stwbrx %1, %3, %2" - : "=m" (*addr) - : "r" (data), "r" (base), "bO" (byteOffset)); -#endif -} - -OS_INLINE -void -OSWriteSwapInt64( - volatile void * base, - uintptr_t byteOffset, - uint64_t data -) -{ - volatile uint64_t *addr = (volatile uint64_t *)((uintptr_t)base + byteOffset); - -#if defined(__llvm__) - *addr = __builtin_bswap64(data); -#else - uint32_t hi = (uint32_t)(data >> 32); - uint32_t lo = (uint32_t)(data & 0xffffffff); - - __asm__ ("stwbrx %1, %4, %3\n\t" - "stwbrx %2, %5, %3" - : "=m" (*addr) - : "r" (lo), "r" (hi), "r" (base), "bO" (byteOffset), "b" (byteOffset + 4)); -#endif -} - -/* Generic byte swapping functions. */ - -OS_INLINE -uint16_t -_OSSwapInt16( - uint16_t data -) -{ - return OSReadSwapInt16(&data, 0); -} - -OS_INLINE -uint32_t -_OSSwapInt32( - uint32_t data -) -{ - return OSReadSwapInt32(&data, 0); -} - -OS_INLINE -uint64_t -_OSSwapInt64( - uint64_t data -) -{ - return OSReadSwapInt64(&data, 0); -} - -#endif /* ! _OS_OSBYTEORDERPPC_H */ diff --git a/i386/include/mach-o/i386/swap.h b/i386/include/mach-o/i386/swap.h deleted file mode 100644 index 09e322f..0000000 --- a/i386/include/mach-o/i386/swap.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#include <architecture/byte_order.h> -#include <mach/i386/thread_status.h> - -extern void swap_i386_thread_state( - i386_thread_state_t *cpu, - enum NXByteOrder target_byte_order); - -/* current i386 thread states */ -#if i386_THREAD_STATE == 1 -extern void swap_i386_float_state( - struct i386_float_state *fpu, - enum NXByteOrder target_byte_order); - -extern void swap_i386_exception_state( - i386_exception_state_t *exc, - enum NXByteOrder target_byte_order); -#endif /* i386_THREAD_STATE == 1 */ - -/* i386 thread states on older releases */ -#if i386_THREAD_STATE == -1 -extern void swap_i386_thread_fpstate( - i386_thread_fpstate_t *fpu, - enum NXByteOrder target_byte_order); - -extern void swap_i386_thread_exceptstate( - i386_thread_exceptstate_t *exc, - enum NXByteOrder target_byte_order); - -extern void swap_i386_thread_cthreadstate( - i386_thread_cthreadstate_t *user, - enum NXByteOrder target_byte_order); -#endif /* i386_THREAD_STATE == -1 */ - -#ifdef x86_THREAD_STATE64 -extern void swap_x86_thread_state64( - x86_thread_state64_t *cpu, - enum NXByteOrder target_byte_order); - -extern void swap_x86_state_hdr( - x86_state_hdr_t *hdr, - enum NXByteOrder target_byte_order); - -extern void swap_x86_float_state64( - x86_float_state64_t *fpu, - enum NXByteOrder target_byte_order); - -extern void swap_x86_exception_state64( - x86_exception_state64_t *exc, - enum NXByteOrder target_byte_order); - -extern void swap_x86_thread_state( - x86_thread_state_t *cpu, - enum NXByteOrder target_byte_order); - -extern void swap_x86_float_state( - x86_float_state_t *fpu, - enum NXByteOrder target_byte_order); - -extern void swap_x86_exception_state( - x86_exception_state_t *exc, - enum NXByteOrder target_byte_order); - -extern void swap_x86_debug_state32( - x86_debug_state32_t *debug, - enum NXByteOrder target_byte_order); - -extern void swap_x86_debug_state64( - x86_debug_state64_t *debug, - enum NXByteOrder target_byte_order); - -extern void swap_x86_debug_state( - x86_debug_state_t *debug, - enum NXByteOrder target_byte_order); -#endif /* x86_THREAD_STATE64 */ diff --git a/i386/include/mach-o/x86_64/reloc.h b/i386/include/mach-o/x86_64/reloc.h deleted file mode 100644 index d3466d8..0000000 --- a/i386/include/mach-o/x86_64/reloc.h +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Relocations for x86_64 are a bit different than for other architectures in - * Mach-O: Scattered relocations are not used. Almost all relocations produced - * by the compiler are external relocations. An external relocation has the - * r_extern bit set to 1 and the r_symbolnum field contains the symbol table - * index of the target label. - * - * When the assembler is generating relocations, if the target label is a local - * label (begins with 'L'), then the previous non-local label in the same - * section is used as the target of the external relocation. An addend is used - * with the distance from that non-local label to the target label. Only when - * there is no previous non-local label in the section is an internal - * relocation used. - * - * The addend (i.e. the 4 in _foo+4) is encoded in the instruction (Mach-O does - * not have RELA relocations). For PC-relative relocations, the addend is - * stored directly in the instruction. This is different from other Mach-O - * architectures, which encode the addend minus the current section offset. - * - * The relocation types are: - * - * X86_64_RELOC_UNSIGNED // for absolute addresses - * X86_64_RELOC_SIGNED // for signed 32-bit displacement - * X86_64_RELOC_BRANCH // a CALL/JMP instruction with 32-bit displacement - * X86_64_RELOC_GOT_LOAD // a MOVQ load of a GOT entry - * X86_64_RELOC_GOT // other GOT references - * X86_64_RELOC_SUBTRACTOR // must be followed by a X86_64_RELOC_UNSIGNED - * - * The following are sample assembly instructions, followed by the relocation - * and section content they generate in an object file: - * - * call _foo - * r_type=X86_64_RELOC_BRANCH, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo - * E8 00 00 00 00 - * - * call _foo+4 - * r_type=X86_64_RELOC_BRANCH, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo - * E8 04 00 00 00 - * - * movq _foo@GOTPCREL(%rip), %rax - * r_type=X86_64_RELOC_GOT_LOAD, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo - * 48 8B 05 00 00 00 00 - * - * pushq _foo@GOTPCREL(%rip) - * r_type=X86_64_RELOC_GOT, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo - * FF 35 00 00 00 00 - * - * movl _foo(%rip), %eax - * r_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo - * 8B 05 00 00 00 00 - * - * movl _foo+4(%rip), %eax - * r_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo - * 8B 05 04 00 00 00 - * - * movb $0x12, _foo(%rip) - * r_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo - * C6 05 FF FF FF FF 12 - * - * movl $0x12345678, _foo(%rip) - * r_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo - * C7 05 FC FF FF FF 78 56 34 12 - * - * .quad _foo - * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo - * 00 00 00 00 00 00 00 00 - * - * .quad _foo+4 - * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo - * 04 00 00 00 00 00 00 00 - * - * .quad _foo - _bar - * r_type=X86_64_RELOC_SUBTRACTOR, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_bar - * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo - * 00 00 00 00 00 00 00 00 - * - * .quad _foo - _bar + 4 - * r_type=X86_64_RELOC_SUBTRACTOR, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_bar - * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo - * 04 00 00 00 00 00 00 00 - * - * .long _foo - _bar - * r_type=X86_64_RELOC_SUBTRACTOR, r_length=2, r_extern=1, r_pcrel=0, r_symbolnum=_bar - * r_type=X86_64_RELOC_UNSIGNED, r_length=2, r_extern=1, r_pcrel=0, r_symbolnum=_foo - * 00 00 00 00 - * - * lea L1(%rip), %rax - * r_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_prev - * 48 8d 05 12 00 00 00 - * // assumes _prev is the first non-local label 0x12 bytes before L1 - * - * lea L0(%rip), %rax - * r_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=0, r_pcrel=1, r_symbolnum=3 - * 48 8d 05 56 00 00 00 - * // assumes L0 is in third section and there is no previous non-local label. - * // The rip-relative-offset of 0x00000056 is L0-address_of_next_instruction. - * // address_of_next_instruction is the address of the relocation + 4. - * - * add $6,L0(%rip) - * r_type=X86_64_RELOC_SIGNED_1, r_length=2, r_extern=0, r_pcrel=1, r_symbolnum=3 - * 83 05 18 00 00 00 06 - * // assumes L0 is in third section and there is no previous non-local label. - * // The rip-relative-offset of 0x00000018 is L0-address_of_next_instruction. - * // address_of_next_instruction is the address of the relocation + 4 + 1. - * // The +1 comes from SIGNED_1. This is used because the relocation is not - * // at the end of the instruction. - * - * .quad L1 - * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_prev - * 12 00 00 00 00 00 00 00 - * // assumes _prev is the first non-local label 0x12 bytes before L1 - * - * .quad L0 - * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=0, r_pcrel=0, r_symbolnum=3 - * 56 00 00 00 00 00 00 00 - * // assumes L0 is in third section, has an address of 0x00000056 in .o - * // file, and there is no previous non-local label - * - * .quad _foo - . - * r_type=X86_64_RELOC_SUBTRACTOR, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_prev - * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo - * EE FF FF FF FF FF FF FF - * // assumes _prev is the first non-local label 0x12 bytes before this - * // .quad - * - * .quad _foo - L1 - * r_type=X86_64_RELOC_SUBTRACTOR, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_prev - * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo - * EE FF FF FF FF FF FF FF - * // assumes _prev is the first non-local label 0x12 bytes before L1 - * - * .quad L1 - _prev - * // No relocations. This is an assembly time constant. - * 12 00 00 00 00 00 00 00 - * // assumes _prev is the first non-local label 0x12 bytes before L1 - * - * - * - * In final linked images, there are only two valid relocation kinds: - * - * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_pcrel=0, r_extern=1, r_symbolnum=sym_index - * This tells dyld to add the address of a symbol to a pointer sized (8-byte) - * piece of data (i.e on disk the 8-byte piece of data contains the addend). The - * r_symbolnum contains the index into the symbol table of the target symbol. - * - * r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_pcrel=0, r_extern=0, r_symbolnum=0 - * This tells dyld to adjust the pointer sized (8-byte) piece of data by the amount - * the containing image was loaded from its base address (e.g. slide). - * - */ -enum reloc_type_x86_64 -{ - X86_64_RELOC_UNSIGNED, // for absolute addresses - X86_64_RELOC_SIGNED, // for signed 32-bit displacement - X86_64_RELOC_BRANCH, // a CALL/JMP instruction with 32-bit displacement - X86_64_RELOC_GOT_LOAD, // a MOVQ load of a GOT entry - X86_64_RELOC_GOT, // other GOT references - X86_64_RELOC_SUBTRACTOR, // must be followed by a X86_64_RELOC_UNSIGNED - X86_64_RELOC_SIGNED_1, // for signed 32-bit displacement with a -1 addend - X86_64_RELOC_SIGNED_2, // for signed 32-bit displacement with a -2 addend - X86_64_RELOC_SIGNED_4, // for signed 32-bit displacement with a -4 addend - X86_64_RELOC_TLV, // for thread local variables -}; diff --git a/i386/include/mach/x86_64/.svn/all-wcprops b/i386/include/mach/x86_64/.svn/all-wcprops deleted file mode 100644 index c569814..0000000 --- a/i386/include/mach/x86_64/.svn/all-wcprops +++ /dev/null @@ -1,17 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 58 -/svn/chameleon/!svn/ver/881/trunk/i386/include/mach/x86_64 -END -thread_act.h -K 25 -svn:wc:ra_dav:version-url -V 71 -/svn/chameleon/!svn/ver/881/trunk/i386/include/mach/x86_64/thread_act.h -END -task.h -K 25 -svn:wc:ra_dav:version-url -V 65 -/svn/chameleon/!svn/ver/881/trunk/i386/include/mach/x86_64/task.h -END diff --git a/i386/include/mach/x86_64/.svn/entries b/i386/include/mach/x86_64/.svn/entries deleted file mode 100644 index 0636f47..0000000 --- a/i386/include/mach/x86_64/.svn/entries +++ /dev/null @@ -1,96 +0,0 @@ -10 - -dir -2117 -http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/mach/x86_64 -http://forge.voodooprojects.org/svn/chameleon - - - -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - -b5af796a-00a8-11df-919b-ffff7a100b7d - -thread_act.h -file - - - - -2012-10-03T17:50:21.000000Z -25d845f2e915a195e887ae48026bf854 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -25654 - -task.h -file - - - - -2012-10-03T17:50:21.000000Z -d87c8dd8a5baf21d6cd2fb7fd2c6775d -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -34704 - diff --git a/i386/include/mach/x86_64/.svn/text-base/task.h.svn-base b/i386/include/mach/x86_64/.svn/text-base/task.h.svn-base deleted file mode 100644 index 15c8248..0000000 --- a/i386/include/mach/x86_64/.svn/text-base/task.h.svn-base +++ /dev/null @@ -1,1578 +0,0 @@ -#ifndef _task_user_ -#define _task_user_ - -/* Module task */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef task_MSG_COUNT -#define task_MSG_COUNT 35 -#endif /* task_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mig.h> -#include <mach/mach_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine task_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_create -( - task_t target_task, - ledger_array_t ledgers, - mach_msg_type_number_t ledgersCnt, - boolean_t inherit_memory, - task_t *child_task -); - -/* Routine task_terminate */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_terminate -( - task_t target_task -); - -/* Routine task_threads */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_threads -( - task_t target_task, - thread_act_array_t *act_list, - mach_msg_type_number_t *act_listCnt -); - -/* Routine mach_ports_register */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_ports_register -( - task_t target_task, - mach_port_array_t init_port_set, - mach_msg_type_number_t init_port_setCnt -); - -/* Routine mach_ports_lookup */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_ports_lookup -( - task_t target_task, - mach_port_array_t *init_port_set, - mach_msg_type_number_t *init_port_setCnt -); - -/* Routine task_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_info -( - task_name_t target_task, - task_flavor_t flavor, - task_info_t task_info_out, - mach_msg_type_number_t *task_info_outCnt -); - -/* Routine task_set_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_info -( - task_t target_task, - task_flavor_t flavor, - task_info_t task_info_in, - mach_msg_type_number_t task_info_inCnt -); - -/* Routine task_suspend */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_suspend -( - task_t target_task -); - -/* Routine task_resume */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_resume -( - task_t target_task -); - -/* Routine task_get_special_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_get_special_port -( - task_t task, - int which_port, - mach_port_t *special_port -); - -/* Routine task_set_special_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_special_port -( - task_t task, - int which_port, - mach_port_t special_port -); - -/* Routine thread_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_create -( - task_t parent_task, - thread_act_t *child_act -); - -/* Routine thread_create_running */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_create_running -( - task_t parent_task, - thread_state_flavor_t flavor, - thread_state_t new_state, - mach_msg_type_number_t new_stateCnt, - thread_act_t *child_act -); - -/* Routine task_set_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_exception_ports -( - task_t task, - exception_mask_t exception_mask, - mach_port_t new_port, - exception_behavior_t behavior, - thread_state_flavor_t new_flavor -); - -/* Routine task_get_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_get_exception_ports -( - task_t task, - exception_mask_t exception_mask, - exception_mask_array_t masks, - mach_msg_type_number_t *masksCnt, - exception_handler_array_t old_handlers, - exception_behavior_array_t old_behaviors, - exception_flavor_array_t old_flavors -); - -/* Routine task_swap_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_swap_exception_ports -( - task_t task, - exception_mask_t exception_mask, - mach_port_t new_port, - exception_behavior_t behavior, - thread_state_flavor_t new_flavor, - exception_mask_array_t masks, - mach_msg_type_number_t *masksCnt, - exception_handler_array_t old_handlerss, - exception_behavior_array_t old_behaviors, - exception_flavor_array_t old_flavors -); - -/* Routine lock_set_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t lock_set_create -( - task_t task, - lock_set_t *new_lock_set, - int n_ulocks, - int policy -); - -/* Routine lock_set_destroy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t lock_set_destroy -( - task_t task, - lock_set_t lock_set -); - -/* Routine semaphore_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t semaphore_create -( - task_t task, - semaphore_t *semaphore, - int policy, - int value -); - -/* Routine semaphore_destroy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t semaphore_destroy -( - task_t task, - semaphore_t semaphore -); - -/* Routine task_policy_set */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_policy_set -( - task_t task, - task_policy_flavor_t flavor, - task_policy_t policy_info, - mach_msg_type_number_t policy_infoCnt -); - -/* Routine task_policy_get */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_policy_get -( - task_t task, - task_policy_flavor_t flavor, - task_policy_t policy_info, - mach_msg_type_number_t *policy_infoCnt, - boolean_t *get_default -); - -/* Routine task_sample */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_sample -( - task_t task, - mach_port_t reply -); - -/* Routine task_policy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_policy -( - task_t task, - policy_t policy, - policy_base_t base, - mach_msg_type_number_t baseCnt, - boolean_t set_limit, - boolean_t change -); - -/* Routine task_set_emulation */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_emulation -( - task_t target_port, - vm_address_t routine_entry_pt, - int routine_number -); - -/* Routine task_get_emulation_vector */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_get_emulation_vector -( - task_t task, - int *vector_start, - emulation_vector_t *emulation_vector, - mach_msg_type_number_t *emulation_vectorCnt -); - -/* Routine task_set_emulation_vector */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_emulation_vector -( - task_t task, - int vector_start, - emulation_vector_t emulation_vector, - mach_msg_type_number_t emulation_vectorCnt -); - -/* Routine task_set_ras_pc */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_ras_pc -( - task_t target_task, - vm_address_t basepc, - vm_address_t boundspc -); - -/* Routine task_assign */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_assign -( - task_t task, - processor_set_t new_set, - boolean_t assign_threads -); - -/* Routine task_assign_default */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_assign_default -( - task_t task, - boolean_t assign_threads -); - -/* Routine task_get_assignment */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_get_assignment -( - task_t task, - processor_set_name_t *assigned_set -); - -/* Routine task_set_policy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_policy -( - task_t task, - processor_set_t pset, - policy_t policy, - policy_base_t base, - mach_msg_type_number_t baseCnt, - policy_limit_t limit, - mach_msg_type_number_t limitCnt, - boolean_t change -); - -/* Routine task_get_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_get_state -( - task_t task, - thread_state_flavor_t flavor, - thread_state_t old_state, - mach_msg_type_number_t *old_stateCnt -); - -/* Routine task_set_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_state -( - task_t task, - thread_state_flavor_t flavor, - thread_state_t new_state, - mach_msg_type_number_t new_stateCnt -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__task_subsystem__defined -#define __Request__task_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_ports_descriptor_t ledgers; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t ledgersCnt; - boolean_t inherit_memory; - } __Request__task_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_terminate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_threads_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_ports_descriptor_t init_port_set; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t init_port_setCnt; - } __Request__mach_ports_register_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__mach_ports_lookup_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - task_flavor_t flavor; - mach_msg_type_number_t task_info_outCnt; - } __Request__task_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - task_flavor_t flavor; - mach_msg_type_number_t task_info_inCnt; - integer_t task_info_in[10]; - } __Request__task_set_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_suspend_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_resume_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int which_port; - } __Request__task_get_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t special_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - int which_port; - } __Request__task_set_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_state_flavor_t flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Request__thread_create_running_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_mask_t exception_mask; - exception_behavior_t behavior; - thread_state_flavor_t new_flavor; - } __Request__task_set_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_mask_t exception_mask; - } __Request__task_get_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_mask_t exception_mask; - exception_behavior_t behavior; - thread_state_flavor_t new_flavor; - } __Request__task_swap_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int n_ulocks; - int policy; - } __Request__lock_set_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t lock_set; - /* end of the kernel processed data */ - } __Request__lock_set_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int policy; - int value; - } __Request__semaphore_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t semaphore; - /* end of the kernel processed data */ - } __Request__semaphore_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - task_policy_flavor_t flavor; - mach_msg_type_number_t policy_infoCnt; - integer_t policy_info[16]; - } __Request__task_policy_set_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - task_policy_flavor_t flavor; - mach_msg_type_number_t policy_infoCnt; - boolean_t get_default; - } __Request__task_policy_get_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t reply; - /* end of the kernel processed data */ - } __Request__task_sample_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - policy_t policy; - mach_msg_type_number_t baseCnt; - integer_t base[5]; - boolean_t set_limit; - boolean_t change; - } __Request__task_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t routine_entry_pt; - int routine_number; - } __Request__task_set_emulation_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_get_emulation_vector_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t emulation_vector; - /* end of the kernel processed data */ - NDR_record_t NDR; - int vector_start; - mach_msg_type_number_t emulation_vectorCnt; - } __Request__task_set_emulation_vector_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t basepc; - vm_address_t boundspc; - } __Request__task_set_ras_pc_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_set; - /* end of the kernel processed data */ - NDR_record_t NDR; - boolean_t assign_threads; - } __Request__task_assign_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - boolean_t assign_threads; - } __Request__task_assign_default_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_get_assignment_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t pset; - /* end of the kernel processed data */ - NDR_record_t NDR; - policy_t policy; - mach_msg_type_number_t baseCnt; - integer_t base[5]; - mach_msg_type_number_t limitCnt; - integer_t limit[1]; - boolean_t change; - } __Request__task_set_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_state_flavor_t flavor; - mach_msg_type_number_t old_stateCnt; - } __Request__task_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_state_flavor_t flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Request__task_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__task_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__task_subsystem__defined -#define __RequestUnion__task_subsystem__defined -union __RequestUnion__task_subsystem { - __Request__task_create_t Request_task_create; - __Request__task_terminate_t Request_task_terminate; - __Request__task_threads_t Request_task_threads; - __Request__mach_ports_register_t Request_mach_ports_register; - __Request__mach_ports_lookup_t Request_mach_ports_lookup; - __Request__task_info_t Request_task_info; - __Request__task_set_info_t Request_task_set_info; - __Request__task_suspend_t Request_task_suspend; - __Request__task_resume_t Request_task_resume; - __Request__task_get_special_port_t Request_task_get_special_port; - __Request__task_set_special_port_t Request_task_set_special_port; - __Request__thread_create_t Request_thread_create; - __Request__thread_create_running_t Request_thread_create_running; - __Request__task_set_exception_ports_t Request_task_set_exception_ports; - __Request__task_get_exception_ports_t Request_task_get_exception_ports; - __Request__task_swap_exception_ports_t Request_task_swap_exception_ports; - __Request__lock_set_create_t Request_lock_set_create; - __Request__lock_set_destroy_t Request_lock_set_destroy; - __Request__semaphore_create_t Request_semaphore_create; - __Request__semaphore_destroy_t Request_semaphore_destroy; - __Request__task_policy_set_t Request_task_policy_set; - __Request__task_policy_get_t Request_task_policy_get; - __Request__task_sample_t Request_task_sample; - __Request__task_policy_t Request_task_policy; - __Request__task_set_emulation_t Request_task_set_emulation; - __Request__task_get_emulation_vector_t Request_task_get_emulation_vector; - __Request__task_set_emulation_vector_t Request_task_set_emulation_vector; - __Request__task_set_ras_pc_t Request_task_set_ras_pc; - __Request__task_assign_t Request_task_assign; - __Request__task_assign_default_t Request_task_assign_default; - __Request__task_get_assignment_t Request_task_get_assignment; - __Request__task_set_policy_t Request_task_set_policy; - __Request__task_get_state_t Request_task_get_state; - __Request__task_set_state_t Request_task_set_state; -}; -#endif /* !__RequestUnion__task_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__task_subsystem__defined -#define __Reply__task_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t child_task; - /* end of the kernel processed data */ - } __Reply__task_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_terminate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_ports_descriptor_t act_list; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t act_listCnt; - } __Reply__task_threads_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_ports_register_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_ports_descriptor_t init_port_set; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t init_port_setCnt; - } __Reply__mach_ports_lookup_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t task_info_outCnt; - integer_t task_info_out[10]; - } __Reply__task_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_suspend_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_resume_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t special_port; - /* end of the kernel processed data */ - } __Reply__task_get_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t child_act; - /* end of the kernel processed data */ - } __Reply__thread_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t child_act; - /* end of the kernel processed data */ - } __Reply__thread_create_running_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t old_handlers[32]; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t masksCnt; - exception_mask_t masks[32]; - exception_behavior_t old_behaviors[32]; - thread_state_flavor_t old_flavors[32]; - } __Reply__task_get_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t old_handlerss[32]; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t masksCnt; - exception_mask_t masks[32]; - exception_behavior_t old_behaviors[32]; - thread_state_flavor_t old_flavors[32]; - } __Reply__task_swap_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_lock_set; - /* end of the kernel processed data */ - } __Reply__lock_set_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__lock_set_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t semaphore; - /* end of the kernel processed data */ - } __Reply__semaphore_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__semaphore_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_policy_set_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t policy_infoCnt; - integer_t policy_info[16]; - boolean_t get_default; - } __Reply__task_policy_get_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_sample_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_emulation_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t emulation_vector; - /* end of the kernel processed data */ - NDR_record_t NDR; - int vector_start; - mach_msg_type_number_t emulation_vectorCnt; - } __Reply__task_get_emulation_vector_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_emulation_vector_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_ras_pc_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_assign_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_assign_default_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t assigned_set; - /* end of the kernel processed data */ - } __Reply__task_get_assignment_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Reply__task_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__task_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__task_subsystem__defined -#define __ReplyUnion__task_subsystem__defined -union __ReplyUnion__task_subsystem { - __Reply__task_create_t Reply_task_create; - __Reply__task_terminate_t Reply_task_terminate; - __Reply__task_threads_t Reply_task_threads; - __Reply__mach_ports_register_t Reply_mach_ports_register; - __Reply__mach_ports_lookup_t Reply_mach_ports_lookup; - __Reply__task_info_t Reply_task_info; - __Reply__task_set_info_t Reply_task_set_info; - __Reply__task_suspend_t Reply_task_suspend; - __Reply__task_resume_t Reply_task_resume; - __Reply__task_get_special_port_t Reply_task_get_special_port; - __Reply__task_set_special_port_t Reply_task_set_special_port; - __Reply__thread_create_t Reply_thread_create; - __Reply__thread_create_running_t Reply_thread_create_running; - __Reply__task_set_exception_ports_t Reply_task_set_exception_ports; - __Reply__task_get_exception_ports_t Reply_task_get_exception_ports; - __Reply__task_swap_exception_ports_t Reply_task_swap_exception_ports; - __Reply__lock_set_create_t Reply_lock_set_create; - __Reply__lock_set_destroy_t Reply_lock_set_destroy; - __Reply__semaphore_create_t Reply_semaphore_create; - __Reply__semaphore_destroy_t Reply_semaphore_destroy; - __Reply__task_policy_set_t Reply_task_policy_set; - __Reply__task_policy_get_t Reply_task_policy_get; - __Reply__task_sample_t Reply_task_sample; - __Reply__task_policy_t Reply_task_policy; - __Reply__task_set_emulation_t Reply_task_set_emulation; - __Reply__task_get_emulation_vector_t Reply_task_get_emulation_vector; - __Reply__task_set_emulation_vector_t Reply_task_set_emulation_vector; - __Reply__task_set_ras_pc_t Reply_task_set_ras_pc; - __Reply__task_assign_t Reply_task_assign; - __Reply__task_assign_default_t Reply_task_assign_default; - __Reply__task_get_assignment_t Reply_task_get_assignment; - __Reply__task_set_policy_t Reply_task_set_policy; - __Reply__task_get_state_t Reply_task_get_state; - __Reply__task_set_state_t Reply_task_set_state; -}; -#endif /* !__RequestUnion__task_subsystem__defined */ - -#ifndef subsystem_to_name_map_task -#define subsystem_to_name_map_task \ - { "task_create", 3400 },\ - { "task_terminate", 3401 },\ - { "task_threads", 3402 },\ - { "mach_ports_register", 3403 },\ - { "mach_ports_lookup", 3404 },\ - { "task_info", 3405 },\ - { "task_set_info", 3406 },\ - { "task_suspend", 3407 },\ - { "task_resume", 3408 },\ - { "task_get_special_port", 3409 },\ - { "task_set_special_port", 3410 },\ - { "thread_create", 3411 },\ - { "thread_create_running", 3412 },\ - { "task_set_exception_ports", 3413 },\ - { "task_get_exception_ports", 3414 },\ - { "task_swap_exception_ports", 3415 },\ - { "lock_set_create", 3416 },\ - { "lock_set_destroy", 3417 },\ - { "semaphore_create", 3418 },\ - { "semaphore_destroy", 3419 },\ - { "task_policy_set", 3420 },\ - { "task_policy_get", 3421 },\ - { "task_sample", 3422 },\ - { "task_policy", 3423 },\ - { "task_set_emulation", 3424 },\ - { "task_get_emulation_vector", 3425 },\ - { "task_set_emulation_vector", 3426 },\ - { "task_set_ras_pc", 3427 },\ - { "task_assign", 3429 },\ - { "task_assign_default", 3430 },\ - { "task_get_assignment", 3431 },\ - { "task_set_policy", 3432 },\ - { "task_get_state", 3433 },\ - { "task_set_state", 3434 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _task_user_ */ diff --git a/i386/include/mach/x86_64/.svn/text-base/thread_act.h.svn-base b/i386/include/mach/x86_64/.svn/text-base/thread_act.h.svn-base deleted file mode 100644 index fde4189..0000000 --- a/i386/include/mach/x86_64/.svn/text-base/thread_act.h.svn-base +++ /dev/null @@ -1,1155 +0,0 @@ -#ifndef _thread_act_user_ -#define _thread_act_user_ - -/* Module thread_act */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef thread_act_MSG_COUNT -#define thread_act_MSG_COUNT 25 -#endif /* thread_act_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mig.h> -#include <mach/mach_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine thread_terminate */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_terminate -( - thread_act_t target_act -); - -/* Routine act_get_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t act_get_state -( - thread_act_t target_act, - int flavor, - thread_state_t old_state, - mach_msg_type_number_t *old_stateCnt -); - -/* Routine act_set_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t act_set_state -( - thread_act_t target_act, - int flavor, - thread_state_t new_state, - mach_msg_type_number_t new_stateCnt -); - -/* Routine thread_get_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_get_state -( - thread_act_t target_act, - thread_state_flavor_t flavor, - thread_state_t old_state, - mach_msg_type_number_t *old_stateCnt -); - -/* Routine thread_set_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_set_state -( - thread_act_t target_act, - thread_state_flavor_t flavor, - thread_state_t new_state, - mach_msg_type_number_t new_stateCnt -); - -/* Routine thread_suspend */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_suspend -( - thread_act_t target_act -); - -/* Routine thread_resume */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_resume -( - thread_act_t target_act -); - -/* Routine thread_abort */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_abort -( - thread_act_t target_act -); - -/* Routine thread_abort_safely */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_abort_safely -( - thread_act_t target_act -); - -/* Routine thread_depress_abort */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_depress_abort -( - thread_act_t thread -); - -/* Routine thread_get_special_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_get_special_port -( - thread_act_t thr_act, - int which_port, - mach_port_t *special_port -); - -/* Routine thread_set_special_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_set_special_port -( - thread_act_t thr_act, - int which_port, - mach_port_t special_port -); - -/* Routine thread_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_info -( - thread_act_t target_act, - thread_flavor_t flavor, - thread_info_t thread_info_out, - mach_msg_type_number_t *thread_info_outCnt -); - -/* Routine thread_set_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_set_exception_ports -( - thread_act_t thread, - exception_mask_t exception_mask, - mach_port_t new_port, - exception_behavior_t behavior, - thread_state_flavor_t new_flavor -); - -/* Routine thread_get_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_get_exception_ports -( - thread_act_t thread, - exception_mask_t exception_mask, - exception_mask_array_t masks, - mach_msg_type_number_t *masksCnt, - exception_handler_array_t old_handlers, - exception_behavior_array_t old_behaviors, - exception_flavor_array_t old_flavors -); - -/* Routine thread_swap_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_swap_exception_ports -( - thread_act_t thread, - exception_mask_t exception_mask, - mach_port_t new_port, - exception_behavior_t behavior, - thread_state_flavor_t new_flavor, - exception_mask_array_t masks, - mach_msg_type_number_t *masksCnt, - exception_handler_array_t old_handlers, - exception_behavior_array_t old_behaviors, - exception_flavor_array_t old_flavors -); - -/* Routine thread_policy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_policy -( - thread_act_t thr_act, - policy_t policy, - policy_base_t base, - mach_msg_type_number_t baseCnt, - boolean_t set_limit -); - -/* Routine thread_policy_set */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_policy_set -( - thread_act_t thread, - thread_policy_flavor_t flavor, - thread_policy_t policy_info, - mach_msg_type_number_t policy_infoCnt -); - -/* Routine thread_policy_get */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_policy_get -( - thread_act_t thread, - thread_policy_flavor_t flavor, - thread_policy_t policy_info, - mach_msg_type_number_t *policy_infoCnt, - boolean_t *get_default -); - -/* Routine thread_sample */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_sample -( - thread_act_t thread, - mach_port_t reply -); - -/* Routine etap_trace_thread */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t etap_trace_thread -( - thread_act_t target_act, - boolean_t trace_status -); - -/* Routine thread_assign */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_assign -( - thread_act_t thread, - processor_set_t new_set -); - -/* Routine thread_assign_default */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_assign_default -( - thread_act_t thread -); - -/* Routine thread_get_assignment */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_get_assignment -( - thread_act_t thread, - processor_set_name_t *assigned_set -); - -/* Routine thread_set_policy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_set_policy -( - thread_act_t thr_act, - processor_set_t pset, - policy_t policy, - policy_base_t base, - mach_msg_type_number_t baseCnt, - policy_limit_t limit, - mach_msg_type_number_t limitCnt -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__thread_act_subsystem__defined -#define __Request__thread_act_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_terminate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int flavor; - mach_msg_type_number_t old_stateCnt; - } __Request__act_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Request__act_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_state_flavor_t flavor; - mach_msg_type_number_t old_stateCnt; - } __Request__thread_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_state_flavor_t flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Request__thread_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_suspend_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_resume_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_abort_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_abort_safely_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_depress_abort_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int which_port; - } __Request__thread_get_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t special_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - int which_port; - } __Request__thread_set_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_flavor_t flavor; - mach_msg_type_number_t thread_info_outCnt; - } __Request__thread_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_mask_t exception_mask; - exception_behavior_t behavior; - thread_state_flavor_t new_flavor; - } __Request__thread_set_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_mask_t exception_mask; - } __Request__thread_get_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_mask_t exception_mask; - exception_behavior_t behavior; - thread_state_flavor_t new_flavor; - } __Request__thread_swap_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - policy_t policy; - mach_msg_type_number_t baseCnt; - integer_t base[5]; - boolean_t set_limit; - } __Request__thread_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_policy_flavor_t flavor; - mach_msg_type_number_t policy_infoCnt; - integer_t policy_info[16]; - } __Request__thread_policy_set_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_policy_flavor_t flavor; - mach_msg_type_number_t policy_infoCnt; - boolean_t get_default; - } __Request__thread_policy_get_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t reply; - /* end of the kernel processed data */ - } __Request__thread_sample_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - boolean_t trace_status; - } __Request__etap_trace_thread_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_set; - /* end of the kernel processed data */ - } __Request__thread_assign_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_assign_default_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_get_assignment_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t pset; - /* end of the kernel processed data */ - NDR_record_t NDR; - policy_t policy; - mach_msg_type_number_t baseCnt; - integer_t base[5]; - mach_msg_type_number_t limitCnt; - integer_t limit[1]; - } __Request__thread_set_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__thread_act_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__thread_act_subsystem__defined -#define __RequestUnion__thread_act_subsystem__defined -union __RequestUnion__thread_act_subsystem { - __Request__thread_terminate_t Request_thread_terminate; - __Request__act_get_state_t Request_act_get_state; - __Request__act_set_state_t Request_act_set_state; - __Request__thread_get_state_t Request_thread_get_state; - __Request__thread_set_state_t Request_thread_set_state; - __Request__thread_suspend_t Request_thread_suspend; - __Request__thread_resume_t Request_thread_resume; - __Request__thread_abort_t Request_thread_abort; - __Request__thread_abort_safely_t Request_thread_abort_safely; - __Request__thread_depress_abort_t Request_thread_depress_abort; - __Request__thread_get_special_port_t Request_thread_get_special_port; - __Request__thread_set_special_port_t Request_thread_set_special_port; - __Request__thread_info_t Request_thread_info; - __Request__thread_set_exception_ports_t Request_thread_set_exception_ports; - __Request__thread_get_exception_ports_t Request_thread_get_exception_ports; - __Request__thread_swap_exception_ports_t Request_thread_swap_exception_ports; - __Request__thread_policy_t Request_thread_policy; - __Request__thread_policy_set_t Request_thread_policy_set; - __Request__thread_policy_get_t Request_thread_policy_get; - __Request__thread_sample_t Request_thread_sample; - __Request__etap_trace_thread_t Request_etap_trace_thread; - __Request__thread_assign_t Request_thread_assign; - __Request__thread_assign_default_t Request_thread_assign_default; - __Request__thread_get_assignment_t Request_thread_get_assignment; - __Request__thread_set_policy_t Request_thread_set_policy; -}; -#endif /* !__RequestUnion__thread_act_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__thread_act_subsystem__defined -#define __Reply__thread_act_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_terminate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Reply__act_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__act_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Reply__thread_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_suspend_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_resume_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_abort_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_abort_safely_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_depress_abort_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t special_port; - /* end of the kernel processed data */ - } __Reply__thread_get_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_set_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t thread_info_outCnt; - integer_t thread_info_out[12]; - } __Reply__thread_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_set_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t old_handlers[32]; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t masksCnt; - exception_mask_t masks[32]; - exception_behavior_t old_behaviors[32]; - thread_state_flavor_t old_flavors[32]; - } __Reply__thread_get_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t old_handlers[32]; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t masksCnt; - exception_mask_t masks[32]; - exception_behavior_t old_behaviors[32]; - thread_state_flavor_t old_flavors[32]; - } __Reply__thread_swap_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_policy_set_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t policy_infoCnt; - integer_t policy_info[16]; - boolean_t get_default; - } __Reply__thread_policy_get_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_sample_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__etap_trace_thread_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_assign_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_assign_default_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t assigned_set; - /* end of the kernel processed data */ - } __Reply__thread_get_assignment_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_set_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__thread_act_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__thread_act_subsystem__defined -#define __ReplyUnion__thread_act_subsystem__defined -union __ReplyUnion__thread_act_subsystem { - __Reply__thread_terminate_t Reply_thread_terminate; - __Reply__act_get_state_t Reply_act_get_state; - __Reply__act_set_state_t Reply_act_set_state; - __Reply__thread_get_state_t Reply_thread_get_state; - __Reply__thread_set_state_t Reply_thread_set_state; - __Reply__thread_suspend_t Reply_thread_suspend; - __Reply__thread_resume_t Reply_thread_resume; - __Reply__thread_abort_t Reply_thread_abort; - __Reply__thread_abort_safely_t Reply_thread_abort_safely; - __Reply__thread_depress_abort_t Reply_thread_depress_abort; - __Reply__thread_get_special_port_t Reply_thread_get_special_port; - __Reply__thread_set_special_port_t Reply_thread_set_special_port; - __Reply__thread_info_t Reply_thread_info; - __Reply__thread_set_exception_ports_t Reply_thread_set_exception_ports; - __Reply__thread_get_exception_ports_t Reply_thread_get_exception_ports; - __Reply__thread_swap_exception_ports_t Reply_thread_swap_exception_ports; - __Reply__thread_policy_t Reply_thread_policy; - __Reply__thread_policy_set_t Reply_thread_policy_set; - __Reply__thread_policy_get_t Reply_thread_policy_get; - __Reply__thread_sample_t Reply_thread_sample; - __Reply__etap_trace_thread_t Reply_etap_trace_thread; - __Reply__thread_assign_t Reply_thread_assign; - __Reply__thread_assign_default_t Reply_thread_assign_default; - __Reply__thread_get_assignment_t Reply_thread_get_assignment; - __Reply__thread_set_policy_t Reply_thread_set_policy; -}; -#endif /* !__RequestUnion__thread_act_subsystem__defined */ - -#ifndef subsystem_to_name_map_thread_act -#define subsystem_to_name_map_thread_act \ - { "thread_terminate", 3600 },\ - { "act_get_state", 3601 },\ - { "act_set_state", 3602 },\ - { "thread_get_state", 3603 },\ - { "thread_set_state", 3604 },\ - { "thread_suspend", 3605 },\ - { "thread_resume", 3606 },\ - { "thread_abort", 3607 },\ - { "thread_abort_safely", 3608 },\ - { "thread_depress_abort", 3609 },\ - { "thread_get_special_port", 3610 },\ - { "thread_set_special_port", 3611 },\ - { "thread_info", 3612 },\ - { "thread_set_exception_ports", 3613 },\ - { "thread_get_exception_ports", 3614 },\ - { "thread_swap_exception_ports", 3615 },\ - { "thread_policy", 3616 },\ - { "thread_policy_set", 3617 },\ - { "thread_policy_get", 3618 },\ - { "thread_sample", 3619 },\ - { "etap_trace_thread", 3620 },\ - { "thread_assign", 3621 },\ - { "thread_assign_default", 3622 },\ - { "thread_get_assignment", 3623 },\ - { "thread_set_policy", 3624 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _thread_act_user_ */ diff --git a/i386/include/mach/x86_64/task.h b/i386/include/mach/x86_64/task.h deleted file mode 100644 index 15c8248..0000000 --- a/i386/include/mach/x86_64/task.h +++ /dev/null @@ -1,1578 +0,0 @@ -#ifndef _task_user_ -#define _task_user_ - -/* Module task */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef task_MSG_COUNT -#define task_MSG_COUNT 35 -#endif /* task_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mig.h> -#include <mach/mach_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine task_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_create -( - task_t target_task, - ledger_array_t ledgers, - mach_msg_type_number_t ledgersCnt, - boolean_t inherit_memory, - task_t *child_task -); - -/* Routine task_terminate */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_terminate -( - task_t target_task -); - -/* Routine task_threads */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_threads -( - task_t target_task, - thread_act_array_t *act_list, - mach_msg_type_number_t *act_listCnt -); - -/* Routine mach_ports_register */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_ports_register -( - task_t target_task, - mach_port_array_t init_port_set, - mach_msg_type_number_t init_port_setCnt -); - -/* Routine mach_ports_lookup */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_ports_lookup -( - task_t target_task, - mach_port_array_t *init_port_set, - mach_msg_type_number_t *init_port_setCnt -); - -/* Routine task_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_info -( - task_name_t target_task, - task_flavor_t flavor, - task_info_t task_info_out, - mach_msg_type_number_t *task_info_outCnt -); - -/* Routine task_set_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_info -( - task_t target_task, - task_flavor_t flavor, - task_info_t task_info_in, - mach_msg_type_number_t task_info_inCnt -); - -/* Routine task_suspend */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_suspend -( - task_t target_task -); - -/* Routine task_resume */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_resume -( - task_t target_task -); - -/* Routine task_get_special_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_get_special_port -( - task_t task, - int which_port, - mach_port_t *special_port -); - -/* Routine task_set_special_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_special_port -( - task_t task, - int which_port, - mach_port_t special_port -); - -/* Routine thread_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_create -( - task_t parent_task, - thread_act_t *child_act -); - -/* Routine thread_create_running */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_create_running -( - task_t parent_task, - thread_state_flavor_t flavor, - thread_state_t new_state, - mach_msg_type_number_t new_stateCnt, - thread_act_t *child_act -); - -/* Routine task_set_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_exception_ports -( - task_t task, - exception_mask_t exception_mask, - mach_port_t new_port, - exception_behavior_t behavior, - thread_state_flavor_t new_flavor -); - -/* Routine task_get_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_get_exception_ports -( - task_t task, - exception_mask_t exception_mask, - exception_mask_array_t masks, - mach_msg_type_number_t *masksCnt, - exception_handler_array_t old_handlers, - exception_behavior_array_t old_behaviors, - exception_flavor_array_t old_flavors -); - -/* Routine task_swap_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_swap_exception_ports -( - task_t task, - exception_mask_t exception_mask, - mach_port_t new_port, - exception_behavior_t behavior, - thread_state_flavor_t new_flavor, - exception_mask_array_t masks, - mach_msg_type_number_t *masksCnt, - exception_handler_array_t old_handlerss, - exception_behavior_array_t old_behaviors, - exception_flavor_array_t old_flavors -); - -/* Routine lock_set_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t lock_set_create -( - task_t task, - lock_set_t *new_lock_set, - int n_ulocks, - int policy -); - -/* Routine lock_set_destroy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t lock_set_destroy -( - task_t task, - lock_set_t lock_set -); - -/* Routine semaphore_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t semaphore_create -( - task_t task, - semaphore_t *semaphore, - int policy, - int value -); - -/* Routine semaphore_destroy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t semaphore_destroy -( - task_t task, - semaphore_t semaphore -); - -/* Routine task_policy_set */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_policy_set -( - task_t task, - task_policy_flavor_t flavor, - task_policy_t policy_info, - mach_msg_type_number_t policy_infoCnt -); - -/* Routine task_policy_get */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_policy_get -( - task_t task, - task_policy_flavor_t flavor, - task_policy_t policy_info, - mach_msg_type_number_t *policy_infoCnt, - boolean_t *get_default -); - -/* Routine task_sample */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_sample -( - task_t task, - mach_port_t reply -); - -/* Routine task_policy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_policy -( - task_t task, - policy_t policy, - policy_base_t base, - mach_msg_type_number_t baseCnt, - boolean_t set_limit, - boolean_t change -); - -/* Routine task_set_emulation */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_emulation -( - task_t target_port, - vm_address_t routine_entry_pt, - int routine_number -); - -/* Routine task_get_emulation_vector */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_get_emulation_vector -( - task_t task, - int *vector_start, - emulation_vector_t *emulation_vector, - mach_msg_type_number_t *emulation_vectorCnt -); - -/* Routine task_set_emulation_vector */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_emulation_vector -( - task_t task, - int vector_start, - emulation_vector_t emulation_vector, - mach_msg_type_number_t emulation_vectorCnt -); - -/* Routine task_set_ras_pc */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_ras_pc -( - task_t target_task, - vm_address_t basepc, - vm_address_t boundspc -); - -/* Routine task_assign */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_assign -( - task_t task, - processor_set_t new_set, - boolean_t assign_threads -); - -/* Routine task_assign_default */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_assign_default -( - task_t task, - boolean_t assign_threads -); - -/* Routine task_get_assignment */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_get_assignment -( - task_t task, - processor_set_name_t *assigned_set -); - -/* Routine task_set_policy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_policy -( - task_t task, - processor_set_t pset, - policy_t policy, - policy_base_t base, - mach_msg_type_number_t baseCnt, - policy_limit_t limit, - mach_msg_type_number_t limitCnt, - boolean_t change -); - -/* Routine task_get_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_get_state -( - task_t task, - thread_state_flavor_t flavor, - thread_state_t old_state, - mach_msg_type_number_t *old_stateCnt -); - -/* Routine task_set_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_state -( - task_t task, - thread_state_flavor_t flavor, - thread_state_t new_state, - mach_msg_type_number_t new_stateCnt -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__task_subsystem__defined -#define __Request__task_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_ports_descriptor_t ledgers; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t ledgersCnt; - boolean_t inherit_memory; - } __Request__task_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_terminate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_threads_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_ports_descriptor_t init_port_set; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t init_port_setCnt; - } __Request__mach_ports_register_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__mach_ports_lookup_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - task_flavor_t flavor; - mach_msg_type_number_t task_info_outCnt; - } __Request__task_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - task_flavor_t flavor; - mach_msg_type_number_t task_info_inCnt; - integer_t task_info_in[10]; - } __Request__task_set_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_suspend_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_resume_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int which_port; - } __Request__task_get_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t special_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - int which_port; - } __Request__task_set_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_state_flavor_t flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Request__thread_create_running_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_mask_t exception_mask; - exception_behavior_t behavior; - thread_state_flavor_t new_flavor; - } __Request__task_set_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_mask_t exception_mask; - } __Request__task_get_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_mask_t exception_mask; - exception_behavior_t behavior; - thread_state_flavor_t new_flavor; - } __Request__task_swap_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int n_ulocks; - int policy; - } __Request__lock_set_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t lock_set; - /* end of the kernel processed data */ - } __Request__lock_set_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int policy; - int value; - } __Request__semaphore_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t semaphore; - /* end of the kernel processed data */ - } __Request__semaphore_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - task_policy_flavor_t flavor; - mach_msg_type_number_t policy_infoCnt; - integer_t policy_info[16]; - } __Request__task_policy_set_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - task_policy_flavor_t flavor; - mach_msg_type_number_t policy_infoCnt; - boolean_t get_default; - } __Request__task_policy_get_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t reply; - /* end of the kernel processed data */ - } __Request__task_sample_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - policy_t policy; - mach_msg_type_number_t baseCnt; - integer_t base[5]; - boolean_t set_limit; - boolean_t change; - } __Request__task_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t routine_entry_pt; - int routine_number; - } __Request__task_set_emulation_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_get_emulation_vector_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t emulation_vector; - /* end of the kernel processed data */ - NDR_record_t NDR; - int vector_start; - mach_msg_type_number_t emulation_vectorCnt; - } __Request__task_set_emulation_vector_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t basepc; - vm_address_t boundspc; - } __Request__task_set_ras_pc_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_set; - /* end of the kernel processed data */ - NDR_record_t NDR; - boolean_t assign_threads; - } __Request__task_assign_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - boolean_t assign_threads; - } __Request__task_assign_default_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_get_assignment_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t pset; - /* end of the kernel processed data */ - NDR_record_t NDR; - policy_t policy; - mach_msg_type_number_t baseCnt; - integer_t base[5]; - mach_msg_type_number_t limitCnt; - integer_t limit[1]; - boolean_t change; - } __Request__task_set_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_state_flavor_t flavor; - mach_msg_type_number_t old_stateCnt; - } __Request__task_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_state_flavor_t flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Request__task_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__task_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__task_subsystem__defined -#define __RequestUnion__task_subsystem__defined -union __RequestUnion__task_subsystem { - __Request__task_create_t Request_task_create; - __Request__task_terminate_t Request_task_terminate; - __Request__task_threads_t Request_task_threads; - __Request__mach_ports_register_t Request_mach_ports_register; - __Request__mach_ports_lookup_t Request_mach_ports_lookup; - __Request__task_info_t Request_task_info; - __Request__task_set_info_t Request_task_set_info; - __Request__task_suspend_t Request_task_suspend; - __Request__task_resume_t Request_task_resume; - __Request__task_get_special_port_t Request_task_get_special_port; - __Request__task_set_special_port_t Request_task_set_special_port; - __Request__thread_create_t Request_thread_create; - __Request__thread_create_running_t Request_thread_create_running; - __Request__task_set_exception_ports_t Request_task_set_exception_ports; - __Request__task_get_exception_ports_t Request_task_get_exception_ports; - __Request__task_swap_exception_ports_t Request_task_swap_exception_ports; - __Request__lock_set_create_t Request_lock_set_create; - __Request__lock_set_destroy_t Request_lock_set_destroy; - __Request__semaphore_create_t Request_semaphore_create; - __Request__semaphore_destroy_t Request_semaphore_destroy; - __Request__task_policy_set_t Request_task_policy_set; - __Request__task_policy_get_t Request_task_policy_get; - __Request__task_sample_t Request_task_sample; - __Request__task_policy_t Request_task_policy; - __Request__task_set_emulation_t Request_task_set_emulation; - __Request__task_get_emulation_vector_t Request_task_get_emulation_vector; - __Request__task_set_emulation_vector_t Request_task_set_emulation_vector; - __Request__task_set_ras_pc_t Request_task_set_ras_pc; - __Request__task_assign_t Request_task_assign; - __Request__task_assign_default_t Request_task_assign_default; - __Request__task_get_assignment_t Request_task_get_assignment; - __Request__task_set_policy_t Request_task_set_policy; - __Request__task_get_state_t Request_task_get_state; - __Request__task_set_state_t Request_task_set_state; -}; -#endif /* !__RequestUnion__task_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__task_subsystem__defined -#define __Reply__task_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t child_task; - /* end of the kernel processed data */ - } __Reply__task_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_terminate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_ports_descriptor_t act_list; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t act_listCnt; - } __Reply__task_threads_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_ports_register_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_ports_descriptor_t init_port_set; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t init_port_setCnt; - } __Reply__mach_ports_lookup_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t task_info_outCnt; - integer_t task_info_out[10]; - } __Reply__task_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_suspend_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_resume_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t special_port; - /* end of the kernel processed data */ - } __Reply__task_get_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t child_act; - /* end of the kernel processed data */ - } __Reply__thread_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t child_act; - /* end of the kernel processed data */ - } __Reply__thread_create_running_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t old_handlers[32]; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t masksCnt; - exception_mask_t masks[32]; - exception_behavior_t old_behaviors[32]; - thread_state_flavor_t old_flavors[32]; - } __Reply__task_get_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t old_handlerss[32]; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t masksCnt; - exception_mask_t masks[32]; - exception_behavior_t old_behaviors[32]; - thread_state_flavor_t old_flavors[32]; - } __Reply__task_swap_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_lock_set; - /* end of the kernel processed data */ - } __Reply__lock_set_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__lock_set_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t semaphore; - /* end of the kernel processed data */ - } __Reply__semaphore_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__semaphore_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_policy_set_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t policy_infoCnt; - integer_t policy_info[16]; - boolean_t get_default; - } __Reply__task_policy_get_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_sample_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_emulation_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t emulation_vector; - /* end of the kernel processed data */ - NDR_record_t NDR; - int vector_start; - mach_msg_type_number_t emulation_vectorCnt; - } __Reply__task_get_emulation_vector_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_emulation_vector_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_ras_pc_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_assign_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_assign_default_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t assigned_set; - /* end of the kernel processed data */ - } __Reply__task_get_assignment_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Reply__task_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__task_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__task_subsystem__defined -#define __ReplyUnion__task_subsystem__defined -union __ReplyUnion__task_subsystem { - __Reply__task_create_t Reply_task_create; - __Reply__task_terminate_t Reply_task_terminate; - __Reply__task_threads_t Reply_task_threads; - __Reply__mach_ports_register_t Reply_mach_ports_register; - __Reply__mach_ports_lookup_t Reply_mach_ports_lookup; - __Reply__task_info_t Reply_task_info; - __Reply__task_set_info_t Reply_task_set_info; - __Reply__task_suspend_t Reply_task_suspend; - __Reply__task_resume_t Reply_task_resume; - __Reply__task_get_special_port_t Reply_task_get_special_port; - __Reply__task_set_special_port_t Reply_task_set_special_port; - __Reply__thread_create_t Reply_thread_create; - __Reply__thread_create_running_t Reply_thread_create_running; - __Reply__task_set_exception_ports_t Reply_task_set_exception_ports; - __Reply__task_get_exception_ports_t Reply_task_get_exception_ports; - __Reply__task_swap_exception_ports_t Reply_task_swap_exception_ports; - __Reply__lock_set_create_t Reply_lock_set_create; - __Reply__lock_set_destroy_t Reply_lock_set_destroy; - __Reply__semaphore_create_t Reply_semaphore_create; - __Reply__semaphore_destroy_t Reply_semaphore_destroy; - __Reply__task_policy_set_t Reply_task_policy_set; - __Reply__task_policy_get_t Reply_task_policy_get; - __Reply__task_sample_t Reply_task_sample; - __Reply__task_policy_t Reply_task_policy; - __Reply__task_set_emulation_t Reply_task_set_emulation; - __Reply__task_get_emulation_vector_t Reply_task_get_emulation_vector; - __Reply__task_set_emulation_vector_t Reply_task_set_emulation_vector; - __Reply__task_set_ras_pc_t Reply_task_set_ras_pc; - __Reply__task_assign_t Reply_task_assign; - __Reply__task_assign_default_t Reply_task_assign_default; - __Reply__task_get_assignment_t Reply_task_get_assignment; - __Reply__task_set_policy_t Reply_task_set_policy; - __Reply__task_get_state_t Reply_task_get_state; - __Reply__task_set_state_t Reply_task_set_state; -}; -#endif /* !__RequestUnion__task_subsystem__defined */ - -#ifndef subsystem_to_name_map_task -#define subsystem_to_name_map_task \ - { "task_create", 3400 },\ - { "task_terminate", 3401 },\ - { "task_threads", 3402 },\ - { "mach_ports_register", 3403 },\ - { "mach_ports_lookup", 3404 },\ - { "task_info", 3405 },\ - { "task_set_info", 3406 },\ - { "task_suspend", 3407 },\ - { "task_resume", 3408 },\ - { "task_get_special_port", 3409 },\ - { "task_set_special_port", 3410 },\ - { "thread_create", 3411 },\ - { "thread_create_running", 3412 },\ - { "task_set_exception_ports", 3413 },\ - { "task_get_exception_ports", 3414 },\ - { "task_swap_exception_ports", 3415 },\ - { "lock_set_create", 3416 },\ - { "lock_set_destroy", 3417 },\ - { "semaphore_create", 3418 },\ - { "semaphore_destroy", 3419 },\ - { "task_policy_set", 3420 },\ - { "task_policy_get", 3421 },\ - { "task_sample", 3422 },\ - { "task_policy", 3423 },\ - { "task_set_emulation", 3424 },\ - { "task_get_emulation_vector", 3425 },\ - { "task_set_emulation_vector", 3426 },\ - { "task_set_ras_pc", 3427 },\ - { "task_assign", 3429 },\ - { "task_assign_default", 3430 },\ - { "task_get_assignment", 3431 },\ - { "task_set_policy", 3432 },\ - { "task_get_state", 3433 },\ - { "task_set_state", 3434 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _task_user_ */ diff --git a/i386/include/mach/x86_64/thread_act.h b/i386/include/mach/x86_64/thread_act.h deleted file mode 100644 index fde4189..0000000 --- a/i386/include/mach/x86_64/thread_act.h +++ /dev/null @@ -1,1155 +0,0 @@ -#ifndef _thread_act_user_ -#define _thread_act_user_ - -/* Module thread_act */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef thread_act_MSG_COUNT -#define thread_act_MSG_COUNT 25 -#endif /* thread_act_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mig.h> -#include <mach/mach_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine thread_terminate */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_terminate -( - thread_act_t target_act -); - -/* Routine act_get_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t act_get_state -( - thread_act_t target_act, - int flavor, - thread_state_t old_state, - mach_msg_type_number_t *old_stateCnt -); - -/* Routine act_set_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t act_set_state -( - thread_act_t target_act, - int flavor, - thread_state_t new_state, - mach_msg_type_number_t new_stateCnt -); - -/* Routine thread_get_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_get_state -( - thread_act_t target_act, - thread_state_flavor_t flavor, - thread_state_t old_state, - mach_msg_type_number_t *old_stateCnt -); - -/* Routine thread_set_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_set_state -( - thread_act_t target_act, - thread_state_flavor_t flavor, - thread_state_t new_state, - mach_msg_type_number_t new_stateCnt -); - -/* Routine thread_suspend */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_suspend -( - thread_act_t target_act -); - -/* Routine thread_resume */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_resume -( - thread_act_t target_act -); - -/* Routine thread_abort */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_abort -( - thread_act_t target_act -); - -/* Routine thread_abort_safely */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_abort_safely -( - thread_act_t target_act -); - -/* Routine thread_depress_abort */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_depress_abort -( - thread_act_t thread -); - -/* Routine thread_get_special_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_get_special_port -( - thread_act_t thr_act, - int which_port, - mach_port_t *special_port -); - -/* Routine thread_set_special_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_set_special_port -( - thread_act_t thr_act, - int which_port, - mach_port_t special_port -); - -/* Routine thread_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_info -( - thread_act_t target_act, - thread_flavor_t flavor, - thread_info_t thread_info_out, - mach_msg_type_number_t *thread_info_outCnt -); - -/* Routine thread_set_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_set_exception_ports -( - thread_act_t thread, - exception_mask_t exception_mask, - mach_port_t new_port, - exception_behavior_t behavior, - thread_state_flavor_t new_flavor -); - -/* Routine thread_get_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_get_exception_ports -( - thread_act_t thread, - exception_mask_t exception_mask, - exception_mask_array_t masks, - mach_msg_type_number_t *masksCnt, - exception_handler_array_t old_handlers, - exception_behavior_array_t old_behaviors, - exception_flavor_array_t old_flavors -); - -/* Routine thread_swap_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_swap_exception_ports -( - thread_act_t thread, - exception_mask_t exception_mask, - mach_port_t new_port, - exception_behavior_t behavior, - thread_state_flavor_t new_flavor, - exception_mask_array_t masks, - mach_msg_type_number_t *masksCnt, - exception_handler_array_t old_handlers, - exception_behavior_array_t old_behaviors, - exception_flavor_array_t old_flavors -); - -/* Routine thread_policy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_policy -( - thread_act_t thr_act, - policy_t policy, - policy_base_t base, - mach_msg_type_number_t baseCnt, - boolean_t set_limit -); - -/* Routine thread_policy_set */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_policy_set -( - thread_act_t thread, - thread_policy_flavor_t flavor, - thread_policy_t policy_info, - mach_msg_type_number_t policy_infoCnt -); - -/* Routine thread_policy_get */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_policy_get -( - thread_act_t thread, - thread_policy_flavor_t flavor, - thread_policy_t policy_info, - mach_msg_type_number_t *policy_infoCnt, - boolean_t *get_default -); - -/* Routine thread_sample */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_sample -( - thread_act_t thread, - mach_port_t reply -); - -/* Routine etap_trace_thread */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t etap_trace_thread -( - thread_act_t target_act, - boolean_t trace_status -); - -/* Routine thread_assign */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_assign -( - thread_act_t thread, - processor_set_t new_set -); - -/* Routine thread_assign_default */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_assign_default -( - thread_act_t thread -); - -/* Routine thread_get_assignment */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_get_assignment -( - thread_act_t thread, - processor_set_name_t *assigned_set -); - -/* Routine thread_set_policy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_set_policy -( - thread_act_t thr_act, - processor_set_t pset, - policy_t policy, - policy_base_t base, - mach_msg_type_number_t baseCnt, - policy_limit_t limit, - mach_msg_type_number_t limitCnt -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__thread_act_subsystem__defined -#define __Request__thread_act_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_terminate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int flavor; - mach_msg_type_number_t old_stateCnt; - } __Request__act_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Request__act_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_state_flavor_t flavor; - mach_msg_type_number_t old_stateCnt; - } __Request__thread_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_state_flavor_t flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Request__thread_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_suspend_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_resume_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_abort_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_abort_safely_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_depress_abort_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int which_port; - } __Request__thread_get_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t special_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - int which_port; - } __Request__thread_set_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_flavor_t flavor; - mach_msg_type_number_t thread_info_outCnt; - } __Request__thread_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_mask_t exception_mask; - exception_behavior_t behavior; - thread_state_flavor_t new_flavor; - } __Request__thread_set_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_mask_t exception_mask; - } __Request__thread_get_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_mask_t exception_mask; - exception_behavior_t behavior; - thread_state_flavor_t new_flavor; - } __Request__thread_swap_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - policy_t policy; - mach_msg_type_number_t baseCnt; - integer_t base[5]; - boolean_t set_limit; - } __Request__thread_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_policy_flavor_t flavor; - mach_msg_type_number_t policy_infoCnt; - integer_t policy_info[16]; - } __Request__thread_policy_set_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_policy_flavor_t flavor; - mach_msg_type_number_t policy_infoCnt; - boolean_t get_default; - } __Request__thread_policy_get_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t reply; - /* end of the kernel processed data */ - } __Request__thread_sample_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - boolean_t trace_status; - } __Request__etap_trace_thread_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_set; - /* end of the kernel processed data */ - } __Request__thread_assign_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_assign_default_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_get_assignment_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t pset; - /* end of the kernel processed data */ - NDR_record_t NDR; - policy_t policy; - mach_msg_type_number_t baseCnt; - integer_t base[5]; - mach_msg_type_number_t limitCnt; - integer_t limit[1]; - } __Request__thread_set_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__thread_act_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__thread_act_subsystem__defined -#define __RequestUnion__thread_act_subsystem__defined -union __RequestUnion__thread_act_subsystem { - __Request__thread_terminate_t Request_thread_terminate; - __Request__act_get_state_t Request_act_get_state; - __Request__act_set_state_t Request_act_set_state; - __Request__thread_get_state_t Request_thread_get_state; - __Request__thread_set_state_t Request_thread_set_state; - __Request__thread_suspend_t Request_thread_suspend; - __Request__thread_resume_t Request_thread_resume; - __Request__thread_abort_t Request_thread_abort; - __Request__thread_abort_safely_t Request_thread_abort_safely; - __Request__thread_depress_abort_t Request_thread_depress_abort; - __Request__thread_get_special_port_t Request_thread_get_special_port; - __Request__thread_set_special_port_t Request_thread_set_special_port; - __Request__thread_info_t Request_thread_info; - __Request__thread_set_exception_ports_t Request_thread_set_exception_ports; - __Request__thread_get_exception_ports_t Request_thread_get_exception_ports; - __Request__thread_swap_exception_ports_t Request_thread_swap_exception_ports; - __Request__thread_policy_t Request_thread_policy; - __Request__thread_policy_set_t Request_thread_policy_set; - __Request__thread_policy_get_t Request_thread_policy_get; - __Request__thread_sample_t Request_thread_sample; - __Request__etap_trace_thread_t Request_etap_trace_thread; - __Request__thread_assign_t Request_thread_assign; - __Request__thread_assign_default_t Request_thread_assign_default; - __Request__thread_get_assignment_t Request_thread_get_assignment; - __Request__thread_set_policy_t Request_thread_set_policy; -}; -#endif /* !__RequestUnion__thread_act_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__thread_act_subsystem__defined -#define __Reply__thread_act_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_terminate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Reply__act_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__act_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Reply__thread_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_suspend_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_resume_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_abort_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_abort_safely_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_depress_abort_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t special_port; - /* end of the kernel processed data */ - } __Reply__thread_get_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_set_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t thread_info_outCnt; - integer_t thread_info_out[12]; - } __Reply__thread_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_set_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t old_handlers[32]; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t masksCnt; - exception_mask_t masks[32]; - exception_behavior_t old_behaviors[32]; - thread_state_flavor_t old_flavors[32]; - } __Reply__thread_get_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t old_handlers[32]; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t masksCnt; - exception_mask_t masks[32]; - exception_behavior_t old_behaviors[32]; - thread_state_flavor_t old_flavors[32]; - } __Reply__thread_swap_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_policy_set_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t policy_infoCnt; - integer_t policy_info[16]; - boolean_t get_default; - } __Reply__thread_policy_get_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_sample_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__etap_trace_thread_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_assign_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_assign_default_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t assigned_set; - /* end of the kernel processed data */ - } __Reply__thread_get_assignment_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_set_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__thread_act_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__thread_act_subsystem__defined -#define __ReplyUnion__thread_act_subsystem__defined -union __ReplyUnion__thread_act_subsystem { - __Reply__thread_terminate_t Reply_thread_terminate; - __Reply__act_get_state_t Reply_act_get_state; - __Reply__act_set_state_t Reply_act_set_state; - __Reply__thread_get_state_t Reply_thread_get_state; - __Reply__thread_set_state_t Reply_thread_set_state; - __Reply__thread_suspend_t Reply_thread_suspend; - __Reply__thread_resume_t Reply_thread_resume; - __Reply__thread_abort_t Reply_thread_abort; - __Reply__thread_abort_safely_t Reply_thread_abort_safely; - __Reply__thread_depress_abort_t Reply_thread_depress_abort; - __Reply__thread_get_special_port_t Reply_thread_get_special_port; - __Reply__thread_set_special_port_t Reply_thread_set_special_port; - __Reply__thread_info_t Reply_thread_info; - __Reply__thread_set_exception_ports_t Reply_thread_set_exception_ports; - __Reply__thread_get_exception_ports_t Reply_thread_get_exception_ports; - __Reply__thread_swap_exception_ports_t Reply_thread_swap_exception_ports; - __Reply__thread_policy_t Reply_thread_policy; - __Reply__thread_policy_set_t Reply_thread_policy_set; - __Reply__thread_policy_get_t Reply_thread_policy_get; - __Reply__thread_sample_t Reply_thread_sample; - __Reply__etap_trace_thread_t Reply_etap_trace_thread; - __Reply__thread_assign_t Reply_thread_assign; - __Reply__thread_assign_default_t Reply_thread_assign_default; - __Reply__thread_get_assignment_t Reply_thread_get_assignment; - __Reply__thread_set_policy_t Reply_thread_set_policy; -}; -#endif /* !__RequestUnion__thread_act_subsystem__defined */ - -#ifndef subsystem_to_name_map_thread_act -#define subsystem_to_name_map_thread_act \ - { "thread_terminate", 3600 },\ - { "act_get_state", 3601 },\ - { "act_set_state", 3602 },\ - { "thread_get_state", 3603 },\ - { "thread_set_state", 3604 },\ - { "thread_suspend", 3605 },\ - { "thread_resume", 3606 },\ - { "thread_abort", 3607 },\ - { "thread_abort_safely", 3608 },\ - { "thread_depress_abort", 3609 },\ - { "thread_get_special_port", 3610 },\ - { "thread_set_special_port", 3611 },\ - { "thread_info", 3612 },\ - { "thread_set_exception_ports", 3613 },\ - { "thread_get_exception_ports", 3614 },\ - { "thread_swap_exception_ports", 3615 },\ - { "thread_policy", 3616 },\ - { "thread_policy_set", 3617 },\ - { "thread_policy_get", 3618 },\ - { "thread_sample", 3619 },\ - { "etap_trace_thread", 3620 },\ - { "thread_assign", 3621 },\ - { "thread_assign_default", 3622 },\ - { "thread_get_assignment", 3623 },\ - { "thread_set_policy", 3624 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _thread_act_user_ */ From f61eb274020816a4c98369dc412a8655e7582618 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sun, 11 Nov 2012 16:15:16 +0100 Subject: [PATCH 131/623] Eliminate -Wl,-alias,boot2,start requirement --- i386/boot2/boot2.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/boot2/boot2.s b/i386/boot2/boot2.s index b9e1519..98de95f 100755 --- a/i386/boot2/boot2.s +++ b/i386/boot2/boot2.s @@ -61,7 +61,7 @@ # # Returns: # -LABEL(boot2) # Entry point at 0:BOOTER_ADDR (will be called by boot1) +LABEL(start) # Entry point at 0:BOOTER_ADDR (will be called by boot1) pushl %ecx # Save general purpose registers pushl %ebx pushl %ebp From 64d5dcf598909111e5fc9a19aeb59b07dde801b8 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sun, 11 Nov 2012 16:19:03 +0100 Subject: [PATCH 132/623] Eliminate -Wl,-alias,boot2,start requirement --- i386/boot2/Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/i386/boot2/Makefile b/i386/boot2/Makefile index d69d15d..1feed42 100644 --- a/i386/boot2/Makefile +++ b/i386/boot2/Makefile @@ -48,14 +48,18 @@ MAXBOOTSIZE = 131072 $(MAKEGOAL): $(DIRS_NEEDED) boot boot: machOconv $(OBJS) $(LIBDEP) - @$(CC) -Wl,-preload -Wl,-alias,boot2,start \ - -nostdlib -arch i386 -Wl,-pie \ + @$(CC) -nostdlib -arch i386 \ + -Wl,-preload \ + -Wl,-pie \ + -Wl,-segalign,20 \ -Wl,-read_only_relocs,suppress \ -lcc_kext \ $(filter %.o,$^) $(LIBS) \ -o ${SYMROOT}/$@.sys + @echo "\t[LD] boot.sys" - @$(CC) -Wl,-preload -Wl,-alias,boot2,start \ + @$(CC) -Wl,static \ + -Wl,-preload \ -nostdlib -arch i386 -Wl,-pie \ -Wl,-segalign,20 \ -Wl,-segaddr,__INIT,`echo obase=16\; $$((0x${BOOT2ADDR})) | bc` \ @@ -65,8 +69,10 @@ boot: machOconv $(OBJS) $(LIBDEP) -lcc_kext \ $(filter %.o,$^) $(LIBS) \ -o ${SYMROOT}/$@.sys + @echo "\t[MACHOCONV] boot" @$(SYMROOT)/machOconv $(SYMROOT)/boot.sys $(SYMROOT)/boot + @( size=`ls -l $(SYMROOT)/boot | awk '{ print $$5}'` ; \ if expr "$$size" ">" "$(MAXBOOTSIZE)" > /dev/null ;\ then \ From ebe4f99915fd2d3b278caddb70ac58d4c491d833 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Mon, 12 Nov 2012 01:07:23 +0100 Subject: [PATCH 133/623] Simplified calls to segsize --- i386/boot2/Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/i386/boot2/Makefile b/i386/boot2/Makefile index 1feed42..9b02229 100644 --- a/i386/boot2/Makefile +++ b/i386/boot2/Makefile @@ -3,9 +3,11 @@ # # Updates: # -# - Support for self compiled libcc_kext.a added (PikerAlpha, October 2012). -# - Major cleanup (PikerAlpha, October 2012). -# - Fixed clang compilation (dgsga, November 2012. Credits to Evan Lojewski for original work). +# - Support for self compiled libcc_kext.a added (PikerAlpha, October 2012). +# - Major cleanup (PikerAlpha, October 2012). +# - Fixed clang compilation (dgsga, November 2012. Credits to Evan Lojewski for original work). +# - BOOT2ADDR moved to RevoBoot/i386/util/segsize.c (PikerAlpha, November 2012). +# - Simplified calls to RevoBoot/i386/util/segsize (PikerAlpha, November 2012). # @@ -62,9 +64,9 @@ boot: machOconv $(OBJS) $(LIBDEP) -Wl,-preload \ -nostdlib -arch i386 -Wl,-pie \ -Wl,-segalign,20 \ - -Wl,-segaddr,__INIT,`echo obase=16\; $$((0x${BOOT2ADDR})) | bc` \ - -Wl,-segaddr,__TEXT,`echo obase=16\; $$((0x${BOOT2ADDR})) + \`${SYMROOT}/segsize ${SYMROOT}/$@.sys __INIT\` | bc` \ - -Wl,-segaddr,__DATA,`echo obase=16\; $$((0x${BOOT2ADDR})) + \`${SYMROOT}/segsize ${SYMROOT}/$@.sys __INIT\` + \`${SYMROOT}/segsize ${SYMROOT}/$@.sys __TEXT\` | bc` \ + -Wl,-segaddr,__INIT,`${SYMROOT}/segsize __INIT` \ + -Wl,-segaddr,__TEXT,`${SYMROOT}/segsize __TEXT` \ + -Wl,-segaddr,__DATA,`${SYMROOT}/segsize __DATA` \ -Wl,-read_only_relocs,suppress \ -lcc_kext \ $(filter %.o,$^) $(LIBS) \ From b149432dd43bb92bd92111072a5a455e610ec61f Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Mon, 12 Nov 2012 01:08:28 +0100 Subject: [PATCH 134/623] Reformat and single pass runs --- i386/util/segsize.c | 169 ++++++++++++++++++++++++++++---------------- 1 file changed, 108 insertions(+), 61 deletions(-) diff --git a/i386/util/segsize.c b/i386/util/segsize.c index 592878a..2608bfd 100644 --- a/i386/util/segsize.c +++ b/i386/util/segsize.c @@ -20,7 +20,16 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ + * + * Updates: + * - Reformated and cleanups (PikerAlpha, November 2012) + * - Single pass runs for all target segment names (PikerAlpha, November 2012) + * + * + * Note: RevoBoot/i386/boot2/Makefile calls this tool to calculate segment sizes, example: + * -segaddr __INIT 20200 -segaddr __TEXT 20480 -segaddr __DATA 2C6E0 */ + #include <stdio.h> #include <stdlib.h> #include <stdbool.h> @@ -31,98 +40,136 @@ #include <libkern/OSByteOrder.h> #include <unistd.h> -int infile; +int infile; struct mach_header mh; -void * cmds; + +void * cmds; static bool swap_ends; -static unsigned long swap( - unsigned long x - ) +//========================================================================== + +static unsigned long swap(unsigned long x) { - if (swap_ends) + if (swap_ends) + { return OSSwapInt32(x); - else + } + else + { return x; + } } -int -main(int argc, char *argv[]) +//========================================================================== + +int main(int argc, char *argv[]) { - int nc, ncmds; - char * cp; - - if (argc == 3) { - infile = open(argv[1], O_RDONLY); - if (infile < 0) - goto usage; - } - else { - usage: - fprintf(stderr, "usage: segsize segment\n"); + int nc, ncmds; + char *cp; + long boot2Address = 0x20200L; + + if (argc != 2) + { + fprintf(stderr, "Usage: ./segsize [__INIT/__TEXT/__DATA]\n"); + exit(1); + } + else if (strcmp(argv[1], "__INIT") == 0) + { + printf("%lX\n", boot2Address); + exit(0); + } + + infile = open("../../sym/i386/boot.sys", O_RDONLY); + + if (infile < 0) + { + fprintf(stderr, "Error: boot.sys Not Found\n"); exit(1); - } - - nc = read(infile, &mh, sizeof (mh)); - if (nc < 0) { + } + + nc = read(infile, &mh, sizeof (mh)); + + if (nc < 0) + { perror("read mach header"); exit(1); - } - if (nc < (int)sizeof (mh)) { + } + + if (nc < (int)sizeof (mh)) + { fprintf(stderr, "read mach header: premature EOF %d\n", nc); exit(1); - } - if (mh.magic == MH_MAGIC) + } + + if (mh.magic == MH_MAGIC) + { swap_ends = false; - else if (mh.magic == MH_CIGAM) + } + else if (mh.magic == MH_CIGAM) + { swap_ends = true; - else { - fprintf(stderr, "bad magic number %lx\n", (unsigned long)mh.magic); + } + else + { + fprintf(stderr, "bad magic number %lx\n", (unsigned long)mh.magic); exit(1); - } + } - cmds = calloc(swap(mh.sizeofcmds), sizeof (char)); - if (cmds == 0) { + cmds = calloc(swap(mh.sizeofcmds), sizeof (char)); + + if (cmds == 0) + { fprintf(stderr, "alloc load commands: no memory\n"); exit(1); - } - nc = read(infile, cmds, swap(mh.sizeofcmds)); - if (nc < 0) { + } + + nc = read(infile, cmds, swap(mh.sizeofcmds)); + + if (nc < 0) + { perror("read load commands"); exit(1); - } - if (nc < (int)swap(mh.sizeofcmds)) { + } + + if (nc < (int)swap(mh.sizeofcmds)) + { fprintf(stderr, "read load commands: premature EOF %d\n", nc); exit(1); - } - - for ( ncmds = swap(mh.ncmds), cp = cmds; - ncmds > 0; ncmds--) { -// bool isDATA; -// unsigned vmsize; - -#define lcp ((struct load_command *)cp) - switch(swap(lcp->cmd)) { - + } + + long text = 0L; + + #define lcp ((struct load_command *)cp) + #define scp ((struct segment_command *)cp) + + for (ncmds = swap(mh.ncmds), cp = cmds; ncmds > 0; ncmds--) + { + switch(swap(lcp->cmd)) + { case LC_SEGMENT: -#define scp ((struct segment_command *)cp) - if(strcmp(scp->segname, argv[2]) == 0) + if (strcmp(scp->segname, "__TEXT") == 0) + { + text = swap(scp->vmsize); + } + else if (strcmp(scp->segname, "__INIT") == 0) { - printf("%ld\n", swap(scp->vmsize)); -#if 0 - if (isDATA) - vmsize = swap(scp->filesize); - else - vmsize = swap(scp->vmsize); -#endif + if (strcmp(argv[1], "__TEXT") == 0) + { + printf("%lX\n", boot2Address + swap(scp->vmsize)); + } + else // __DATA + { + printf("%lX\n", boot2Address + swap(scp->vmsize) + text); + } } + break; } - + cp += swap(lcp->cmdsize); - } + } - exit(0); + exit(0); } From 18e1483b1587ac22c14148ffc3e9aa7e69a3c5f2 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Mon, 12 Nov 2012 09:42:52 +0100 Subject: [PATCH 135/623] Reformatted output, include directory dependency lifted --- i386/boot2/Makefile | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/i386/boot2/Makefile b/i386/boot2/Makefile index 9b02229..7c16f0e 100644 --- a/i386/boot2/Makefile +++ b/i386/boot2/Makefile @@ -8,6 +8,7 @@ # - Fixed clang compilation (dgsga, November 2012. Credits to Evan Lojewski for original work). # - BOOT2ADDR moved to RevoBoot/i386/util/segsize.c (PikerAlpha, November 2012). # - Simplified calls to RevoBoot/i386/util/segsize (PikerAlpha, November 2012). +# - Reformatted output, include directory dependency lifted (PikerAlpha, November 2012). # @@ -19,14 +20,13 @@ CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Werror \ -DMAKE_TARGET_OS=$(PRODUCT_OS_TARGET) \ -DSETTINGS_FILE=SETTINGS/$(MAKE_TARGET_MODEL).h \ -fno-stack-protector \ - -march=pentium4 -msse2 -msoft-float -nostdinc + -march=pentium4 -msse2 -msoft-float LIBSADIR = ../libsa LIBSAIODIR = ../libsaio UTILDIR = ../util -SRCROOT = $(abspath $(CURDIR)/../..) -INC = -I. -I.. -I$(SYMROOT) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(UTILDIR) -I${SRCROOT}/i386/include +INC = -I. -I.. -I$(SYMROOT) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(UTILDIR) LIBS = -L$(SYMROOT) -lsaio -lsa LIBDEP = $(SYMROOT)/libsaio.a $(SYMROOT)/libsa.a @@ -75,15 +75,17 @@ boot: machOconv $(OBJS) $(LIBDEP) @echo "\t[MACHOCONV] boot" @$(SYMROOT)/machOconv $(SYMROOT)/boot.sys $(SYMROOT)/boot + @echo "============================================" + @size $(SYMROOT)/boot.sys + @( size=`ls -l $(SYMROOT)/boot | awk '{ print $$5}'` ; \ - if expr "$$size" ">" "$(MAXBOOTSIZE)" > /dev/null ;\ - then \ - echo "\t******* boot is $$size bytes *******"; \ - echo "Booter executable larger than $(MAXBOOTSIZE) bytes" ;\ - rm $(SYMROOT)/boot ;\ - exit 1;\ - else \ - echo "\t******* boot is $$size bytes *******"; \ - fi) + if expr "$$size" ">" "$(MAXBOOTSIZE)" > /dev/null ;\ + then \ + echo "Boot ($$size) larger than $(MAXBOOTSIZE) bytes" ;\ + rm $(SYMROOT)/boot ;\ + exit 1;\ + else \ + echo "=========== boot is $$size bytes ============"; \ + fi) include ../MakeInc.dir From ffba95856b033a32eb05519829869af1722b60d5 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Tue, 13 Nov 2012 20:42:53 +0100 Subject: [PATCH 136/623] Single pass ld support --- i386/util/machOconv.c | 197 ++++++++++++++++++++++++++++-------------- 1 file changed, 130 insertions(+), 67 deletions(-) diff --git a/i386/util/machOconv.c b/i386/util/machOconv.c index 540efe3..be83af3 100644 --- a/i386/util/machOconv.c +++ b/i386/util/machOconv.c @@ -20,7 +20,11 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ + * + * Updates: + * Reformatted and elimination of -Wl,-segaddr (PikerAlpha, November 2012) */ + #include <stdio.h> #include <stdlib.h> #include <stdbool.h> @@ -33,90 +37,131 @@ int infile, outfile; +void * cmds; + struct mach_header mh; -void * cmds; static bool swap_ends; +//============================================================================== + static unsigned long swap(unsigned long x) { - if (swap_ends) return OSSwapInt32(x); - else return x; + if (swap_ends) + { + return OSSwapInt32(x); + } + else + { + return x; + } } -int -main(int argc, char *argv[]) + +//============================================================================== + +int main(int argc, char *argv[]) { - kern_return_t result; - vm_address_t data; - int nc, ncmds; - char * cp; - - if (argc == 2) + kern_return_t result; + vm_address_t data; + int nc, ncmds; + char * cp; + + if (argc == 2) { infile = open(argv[1], O_RDONLY); - if (infile < 0) goto usage; + + if (infile < 0) + { + goto filenotfound; + } + outfile = fileno(stdout); - } - else if (argc == 3) + } + else if (argc == 3) { - infile = open(argv[1], O_RDONLY); - if (infile < 0) goto usage; - outfile = open(argv[2], O_WRONLY|O_CREAT|O_TRUNC, 0644); - if (outfile < 0) goto usage; - } - else + infile = open(argv[1], O_RDONLY); + + if (infile < 0) + { + goto filenotfound; + } + + outfile = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC, 0644); + + if (outfile < 0) + { + goto openerror; + } + } + else { - usage: - fprintf(stderr, "usage: machOconv inputfile [outputfile]\n"); + fprintf(stderr, "Usage: machOconv inputfile [outputfile]\n"); exit(1); - } - - nc = read(infile, &mh, sizeof (mh)); - if (nc < 0) + + filenotfound: + fprintf(stderr, "Error: File Not Found\n"); + exit(1); + + openerror: + fprintf(stderr, "Error: Open Failed\n"); + exit(1); + } + + nc = read(infile, &mh, sizeof (mh)); + + if (nc < 0) { perror("read mach header"); exit(1); - } - - if (nc < (int)sizeof (mh)) + } + + if (nc < (int)sizeof (mh)) { - fprintf(stderr, "read mach header: premature EOF %d\n", nc); + fprintf(stderr, "Error: read mach header: premature EOF %d\n", nc); exit(1); - } - - - if (mh.magic == MH_MAGIC) swap_ends = false; - else if (mh.magic == MH_CIGAM) swap_ends = true; - else + } + + if (mh.magic == MH_MAGIC) + { + swap_ends = false; + } + else if (mh.magic == MH_CIGAM) + { + swap_ends = true; + } + else { - fprintf(stderr, "bad magic number %lx\n", (unsigned long)mh.magic); + fprintf(stderr, "Error: bad magic number %lx\n", (unsigned long)mh.magic); exit(1); - } + } - cmds = calloc(swap(mh.sizeofcmds), sizeof (char)); - if (cmds == 0) + cmds = calloc(swap(mh.sizeofcmds), sizeof (char)); + + if (cmds == 0) { - fprintf(stderr, "alloc load commands: no memory\n"); + fprintf(stderr, "Error: alloc load commands: no memory\n"); exit(1); - } - nc = read(infile, cmds, swap(mh.sizeofcmds)); - if (nc < 0) + } + + nc = read(infile, cmds, swap(mh.sizeofcmds)); + + if (nc < 0) { perror("read load commands"); exit(1); - } - if (nc < (int)swap(mh.sizeofcmds)) + } + + if (nc < (int)swap(mh.sizeofcmds)) { - fprintf(stderr, "read load commands: premature EOF %d\n", nc); + fprintf(stderr, "Error: read load commands: premature EOF %d\n", nc); exit(1); - } + } - unsigned long vmstart = (unsigned long)-1; + long initSegmentSize = 0L; // First pass: determine actual load address - for (ncmds = swap(mh.ncmds), cp = cmds; - ncmds > 0; ncmds--) + for (ncmds = swap(mh.ncmds), cp = cmds; ncmds > 0; ncmds--) { #define lcp ((struct load_command *)cp) #define scp ((struct segment_command *)cp) @@ -124,29 +169,29 @@ main(int argc, char *argv[]) switch(swap(lcp->cmd)) { case LC_SEGMENT: - if(vmstart > swap(scp->vmaddr)) + if (strcmp(scp->segname, "__INIT") == 0) { - vmstart = swap(scp->vmaddr); + initSegment = swap(scp->vmsize); } } - cp += swap(lcp->cmdsize); + cp += swap(lcp->cmdsize); } - + // Second pass: output to file. - for (ncmds = swap(mh.ncmds), cp = cmds; - ncmds > 0; ncmds--) + for (ncmds = swap(mh.ncmds), cp = cmds; ncmds > 0; ncmds--) { #define lcp ((struct load_command *)cp) #define scp ((struct segment_command *)cp) - bool isDATA; - unsigned vmsize; + bool isDATA; + unsigned vmsize; switch(swap(lcp->cmd)) { case LC_SEGMENT: isDATA = (strcmp(scp->segname, "__DATA") == 0); + if (isDATA) { vmsize = swap(scp->filesize); @@ -157,25 +202,43 @@ main(int argc, char *argv[]) } result = vm_allocate(mach_task_self(), &data, vmsize, true); - if (result != KERN_SUCCESS) { + + if (result != KERN_SUCCESS) + { mach_error("vm_allocate segment data", result); exit(1); } lseek(infile, swap(scp->fileoff), L_SET); nc = read(infile, (void *)data, swap(scp->filesize)); - if (nc < 0) { + + if (nc < 0) + { perror("read segment data"); exit(1); } - if (nc < (int)swap(scp->filesize)) { + + if (nc < (int)swap(scp->filesize)) + { fprintf(stderr, "read segment data: premature EOF %d\n", nc); exit(1); } - - lseek(outfile, swap(scp->vmaddr) - vmstart, L_SET); + + if (strcmp(scp->segname, "__INIT") == 0) + { + // Start of file + lseek(outfile, 0, L_SET); + } + else + { + // Address + size of __INIT segment + lseek(outfile, swap(scp->vmaddr) + initSegmentSize, L_SET); + } + nc = write(outfile, (void *)data, vmsize); - if (nc < (int)vmsize) { + + if (nc < (int)vmsize) + { perror("write segment data"); exit(1); } @@ -185,7 +248,7 @@ main(int argc, char *argv[]) } cp += swap(lcp->cmdsize); - } + } - exit(0); + exit(0); } From 6616ef714c8b8677f133b234efc05530ac495dcb Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Tue, 13 Nov 2012 20:45:57 +0100 Subject: [PATCH 137/623] Single pass LD support --- i386/boot2/Makefile | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/i386/boot2/Makefile b/i386/boot2/Makefile index 7c16f0e..3149a5a 100644 --- a/i386/boot2/Makefile +++ b/i386/boot2/Makefile @@ -9,6 +9,7 @@ # - BOOT2ADDR moved to RevoBoot/i386/util/segsize.c (PikerAlpha, November 2012). # - Simplified calls to RevoBoot/i386/util/segsize (PikerAlpha, November 2012). # - Reformatted output, include directory dependency lifted (PikerAlpha, November 2012). +# - Single pass linking and elimination of -Wl,-segaddr (PikerAlpha, November 2012). # @@ -49,28 +50,16 @@ MAXBOOTSIZE = 131072 $(MAKEGOAL): $(DIRS_NEEDED) boot -boot: machOconv $(OBJS) $(LIBDEP) - @$(CC) -nostdlib -arch i386 \ - -Wl,-preload \ - -Wl,-pie \ - -Wl,-segalign,20 \ - -Wl,-read_only_relocs,suppress \ - -lcc_kext \ - $(filter %.o,$^) $(LIBS) \ - -o ${SYMROOT}/$@.sys +boot: $(OBJS) @echo "\t[LD] boot.sys" - @$(CC) -Wl,static \ + @$(CC) -nostdlib -arch i386 \ -Wl,-preload \ - -nostdlib -arch i386 -Wl,-pie \ + -Wl,-pie \ -Wl,-segalign,20 \ - -Wl,-segaddr,__INIT,`${SYMROOT}/segsize __INIT` \ - -Wl,-segaddr,__TEXT,`${SYMROOT}/segsize __TEXT` \ - -Wl,-segaddr,__DATA,`${SYMROOT}/segsize __DATA` \ -Wl,-read_only_relocs,suppress \ -lcc_kext \ - $(filter %.o,$^) $(LIBS) \ - -o ${SYMROOT}/$@.sys + $(filter %.o,$^) $(LIBS) -o ${SYMROOT}/$@.sys @echo "\t[MACHOCONV] boot" @$(SYMROOT)/machOconv $(SYMROOT)/boot.sys $(SYMROOT)/boot From 69a233d0fce5c5bcc01455c2356adb1810359773 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Tue, 13 Nov 2012 20:47:30 +0100 Subject: [PATCH 138/623] Lastminute fix --- i386/util/machOconv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/util/machOconv.c b/i386/util/machOconv.c index be83af3..bb08044 100644 --- a/i386/util/machOconv.c +++ b/i386/util/machOconv.c @@ -171,7 +171,7 @@ int main(int argc, char *argv[]) case LC_SEGMENT: if (strcmp(scp->segname, "__INIT") == 0) { - initSegment = swap(scp->vmsize); + initSegmentSize = swap(scp->vmsize); } } From b51ed6eb8867301a16568ce6e7c25001cb3a24fc Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Tue, 13 Nov 2012 23:07:19 +0100 Subject: [PATCH 139/623] Back to two pass LD (single pass wasn't working). --- i386/boot2/Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/i386/boot2/Makefile b/i386/boot2/Makefile index 3149a5a..6ed320c 100644 --- a/i386/boot2/Makefile +++ b/i386/boot2/Makefile @@ -9,7 +9,6 @@ # - BOOT2ADDR moved to RevoBoot/i386/util/segsize.c (PikerAlpha, November 2012). # - Simplified calls to RevoBoot/i386/util/segsize (PikerAlpha, November 2012). # - Reformatted output, include directory dependency lifted (PikerAlpha, November 2012). -# - Single pass linking and elimination of -Wl,-segaddr (PikerAlpha, November 2012). # @@ -61,6 +60,18 @@ boot: $(OBJS) -lcc_kext \ $(filter %.o,$^) $(LIBS) -o ${SYMROOT}/$@.sys + @echo "\t[LD] boot.sys" + @$(CC) -nostdlib -arch i386 -static -v \ + -Wl,-preload \ + -Wl,-pie \ + -Wl,-segalign,20 \ + -Wl,-segaddr,__INIT,`$(UTILDIR)/segaddr __INIT` \ + -Wl,-segaddr,__TEXT,`$(UTILDIR)/segaddr __TEXT` \ + -Wl,-segaddr,__DATA,`$(UTILDIR)/segaddr __DATA` \ + -Wl,-read_only_relocs,suppress \ + -lcc_kext \ + $(filter %.o,$^) $(LIBS) -o ${SYMROOT}/$@.sys + @echo "\t[MACHOCONV] boot" @$(SYMROOT)/machOconv $(SYMROOT)/boot.sys $(SYMROOT)/boot From 4095653aa08d5d443126f924e59a98c26fdd5af5 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Tue, 13 Nov 2012 23:10:57 +0100 Subject: [PATCH 140/623] Back to two pass LD (single pass wasn't working). --- i386/util/machOconv.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/i386/util/machOconv.c b/i386/util/machOconv.c index bb08044..f7aede5 100644 --- a/i386/util/machOconv.c +++ b/i386/util/machOconv.c @@ -22,7 +22,7 @@ * @APPLE_LICENSE_HEADER_END@ * * Updates: - * Reformatted and elimination of -Wl,-segaddr (PikerAlpha, November 2012) + * Reformatted (PikerAlpha, November 2012) */ #include <stdio.h> @@ -158,7 +158,7 @@ int main(int argc, char *argv[]) exit(1); } - long initSegmentSize = 0L; + unsigned long vmstart = (unsigned long) -1; // First pass: determine actual load address for (ncmds = swap(mh.ncmds), cp = cmds; ncmds > 0; ncmds--) @@ -169,9 +169,9 @@ int main(int argc, char *argv[]) switch(swap(lcp->cmd)) { case LC_SEGMENT: - if (strcmp(scp->segname, "__INIT") == 0) + if (vmstart > swap(scp->vmaddr)) { - initSegmentSize = swap(scp->vmsize); + vmstart = swap(scp->vmaddr); } } @@ -224,17 +224,7 @@ int main(int argc, char *argv[]) exit(1); } - if (strcmp(scp->segname, "__INIT") == 0) - { - // Start of file - lseek(outfile, 0, L_SET); - } - else - { - // Address + size of __INIT segment - lseek(outfile, swap(scp->vmaddr) + initSegmentSize, L_SET); - } - + lseek(outfile, swap(scp->vmaddr) - vmstart, L_SET); nc = write(outfile, (void *)data, vmsize); if (nc < (int)vmsize) From 538a07426082964a78f16887492bac7644d5d088 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 14 Nov 2012 09:13:20 +0100 Subject: [PATCH 141/623] Cleanup --- i386/libsa/Makefile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/i386/libsa/Makefile b/i386/libsa/Makefile index 9085a72..ce11708 100644 --- a/i386/libsa/Makefile +++ b/i386/libsa/Makefile @@ -5,7 +5,8 @@ # # - Major cleanup (PikerAlpha, October 2012). # - Output added for rm/ar/ranlib actions (PikerAlpha, November 2012). -# - Enabled clang compilation (dgsga,PikerAlpha, November 2012. Credits to Evan Lojewski for original work). +# - Enabled clang compilation (dgsga, November 2012. Credits to Evan Lojewski for original work). +# - Output change and now using libtool instead of ar/ranlib (PikerAlpha, November 2012). # include ../MakePaths.dir @@ -14,7 +15,7 @@ UTILDIR = ../util LIBSAIODIR = ../libsaio OPTIM = -Os -Oz -CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Werror \ +CFLAGS = $(RC_CFLAGS) $(OPTIM) -arch i386 -g -Wmost -Werror \ -fno-builtin -static $(OMIT_FRAME_POINTER_CFLAG) \ -DSETTINGS_FILE=SETTINGS/$(MAKE_TARGET_MODEL).h \ -fno-stack-protector \ @@ -33,11 +34,12 @@ DIRS_NEEDED = $(OBJROOT) $(SYMROOT) $(MAKEGOAL): $(DIRS_NEEDED) $(LIBS) $(LIBS): $(SA_OBJS) - @echo "\t[RM] $@" - @rm -f $(SYMROOT)/$@ - @echo "\t[AR] $@" - @ar qc $(SYMROOT)/$@ $^ &> /dev/null - @echo "\t[RANLIB] $@" - @ranlib $(SYMROOT)/$@ + @if [ -f $(SYMROOT)/$@ ]; then \ + echo "\t[RM] $@"; \ + rm -f $(SYMROOT)/$@; \ + fi; + + @echo "\t[LIBTOOL] $@" + @libtool -o $(SYMROOT)/$@ $^ include ../MakeInc.dir From 574861ddbb25c49fbb02ec106f69563a83369bb0 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 14 Nov 2012 09:14:38 +0100 Subject: [PATCH 142/623] Cleanups --- i386/libsaio/Makefile | 51 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/i386/libsaio/Makefile b/i386/libsaio/Makefile index 7a8b670..8f8b991 100644 --- a/i386/libsaio/Makefile +++ b/i386/libsaio/Makefile @@ -9,6 +9,7 @@ # - STATIC_DATA_FILENAME added (PikerAlpha, October 2012). # - Output added for rm/ar/ranlib actions (PikerAlpha, November 2012). # - Enabled clang compilation (dgsga, PikerAlpha, November 2012. Credits to Evan Lojewski for original work). +# - Output change and now using libtool instead of ar/ranlib (PikerAlpha, November 2012). # include ../MakePaths.dir @@ -19,31 +20,28 @@ LIBSADIR = ../libsa OPTIM = -Os -Oz DEBUG = -DNOTHING -CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ - -DREVOBOOT_VERSION_INFO=\"RevoBoot\ v$(PRODUCT_VERSION_NUMBER)\" \ - -DMAKE_TARGET_OS=$(PRODUCT_OS_TARGET) \ - -DSETTINGS_FILE=SETTINGS/$(MAKE_TARGET_MODEL).h \ - -DSTATIC_DATA_FILENAME=$(MAKE_TARGET_MODEL).bin \ - -DACPI_DATA_FILE=../../config/$(MAKE_ACPI_DATA_FILE) \ - -DEFI_DATA_FILE=../config/$(MAKE_EFI_DATA_FILE) \ - -DSMBIOS_DATA_FILE=../config/$(MAKE_SMBIOS_DATA_FILE) \ - -fno-builtin -static $(OMIT_FRAME_POINTER_CFLAG) \ - -fno-stack-protector \ - -march=pentium4 -msse2 -msoft-float +CFLAGS = $(RC_CFLAGS) $(OPTIM) -arch i386 -g -Wmost \ + -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ + -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -DREVOBOOT_VERSION_INFO=\"RevoBoot\ v$(PRODUCT_VERSION_NUMBER)\" \ + -DMAKE_TARGET_OS=$(PRODUCT_OS_TARGET) \ + -DSETTINGS_FILE=SETTINGS/$(MAKE_TARGET_MODEL).h \ + -DSTATIC_DATA_FILENAME=$(MAKE_TARGET_MODEL).bin \ + -DACPI_DATA_FILE=../../config/$(MAKE_ACPI_DATA_FILE) \ + -DEFI_DATA_FILE=../config/$(MAKE_EFI_DATA_FILE) \ + -DSMBIOS_DATA_FILE=../config/$(MAKE_SMBIOS_DATA_FILE) \ + -fno-builtin -static $(OMIT_FRAME_POINTER_CFLAG) \ + -fno-stack-protector \ + -march=pentium4 -msse2 -msoft-float INC = -I. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) VPATH = $(OBJROOT):$(SYMROOT) -SAIO_OBJS = table.o asm.o bios.o biosfn.o \ - disk.o sys.o cache.o bootstruct.o \ - stringTable.o load.o pci.o allocate.o \ - vbe.o hfs.o hfs_compare.o \ - xml.o md5c.o device_tree.o \ - cpu.o platform.o acpi.o \ - smbios.o efi.o console.o +SAIO_OBJS = table.o asm.o bios.o biosfn.o disk.o sys.o cache.o bootstruct.o \ + stringTable.o load.o pci.o allocate.o vbe.o hfs.o hfs_compare.o \ + xml.o md5c.o device_tree.o cpu.o platform.o acpi.o smbios.o \ + efi.o console.o LIBS = libsaio.a @@ -52,11 +50,12 @@ DIRS_NEEDED = $(OBJROOT) $(SYMROOT) $(MAKEGOAL): $(DIRS_NEEDED) libsaio.h $(LIBS) $(LIBS): $(SAIO_OBJS) - @echo "\t[RM] $@" - @rm -f $@ - @echo "\t[AR] $@" - @ar qc $(SYMROOT)/$@ $^ &> /dev/null - @echo "\t[RANLIB] $@" - @ranlib $(SYMROOT)/$@ + @if [ -f $(SYMROOT)/$@ ]; then \ + echo "\t[RM] $@"; \ + rm -f $(SYMROOT)/$@; \ + fi; + + @echo "\t[LIBTOOL] $@" + @libtool -o $(SYMROOT)/$@ $^ include ../MakeInc.dir From 07d6dfc4701618a400d55138ab8a664f72c71487 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 13:17:41 +0100 Subject: [PATCH 143/623] Cleanup and output changes --- Makefile | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 2a7a5f8..79682ea 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ # - Copies ACPI/EFI/SMBIOS/data-template.h for new conigurations (PikerAlpha, October 2012). # - Output added for cp/mkdir/rm actions (PikerAlpha, November 2012). # - New build target 'help' added (PikerAlpha, November 2012). +# - Cleanups and output changed (PikerAlpha, November 2012). # # @@ -134,7 +135,7 @@ CONFIG_DIR=$(ARCH_DIR)/config SETTINGS_DIR=$(CONFIG_DIR)/SETTINGS SETTINGS_FILE=$(SETTINGS_DIR)/$(MAKE_TARGET_MODEL).h -$(MAKEGOAL): $(SYMROOT) $(OBJROOT) +$(MAKEGOAL): @if [ ! -f $(CONFIG_DIR)/$(MAKE_ACPI_DATA_FILE) ]; then \ echo "\t[CP] $(CONFIG_DIR)/ACPI/data-template.h $(CONFIG_DIR)/$(MAKE_ACPI_DATA_FILE)"; \ cp -n $(CONFIG_DIR)/ACPI/data-template.h $(CONFIG_DIR)/$(MAKE_ACPI_DATA_FILE); \ @@ -160,33 +161,34 @@ $(MAKEGOAL): $(SYMROOT) $(OBJROOT) cp -n $(CONFIG_DIR)/settings-template.h $(SETTINGS_FILE); \ fi; - @if [ -d $(ARCH_DIR) ]; then \ - echo ================= make MODEL=$(MAKE_TARGET_MODEL) $@ for: RevoBoot/$(ARCH_DIR) =================; \ - ( OBJROOT=$(OBJROOT)/$(ARCH_DIR); \ - SYMROOT=$(SYMROOT)/$(ARCH_DIR); \ - XCFLAGS="$(RC_CFLAGS)"; \ - echo "$$OBJROOT $$SYMROOT"; \ - cd $(ARCH_DIR); ${MAKE} \ - "OBJROOT=$$OBJROOT" \ - "SYMROOT=$$SYMROOT" \ - "RC_ARCHS=$(ARCH_DIR)" \ - "TARGET=$(ARCH_DIR)" \ - "RC_CFLAGS=$$XCFLAGS" $@ \ - ) || exit $$?; \ - fi; + @echo "======================================================"; + @echo "Running: make MODEL=$(MODEL) $@"; + + @(OBJROOT=$(OBJROOT)/$(ARCH_DIR); \ + SYMROOT=$(SYMROOT)/$(ARCH_DIR); \ + XCFLAGS="$(RC_CFLAGS)"; \ + cd $(ARCH_DIR); \ + ${MAKE} "OBJROOT=$$OBJROOT" "SYMROOT=$$SYMROOT" "RC_ARCHS=$(ARCH_DIR)" \ + "TARGET=$(ARCH_DIR)" "RC_CFLAGS=$$XCFLAGS" $@ ) clean: - @if [ -d "$(OBJROOT)" ];then echo "\t[RMDIR] $(OBJROOT)"; fi - @if [ -d "$(SYMROOT)" ];then echo "\t[RMDIR] $(SYMROOT)"; fi - rm -rf sym obj dst out.log + @if [ -d "$(OBJROOT)" ]; then \ + echo "\t[RMDIR] $(OBJROOT)" > /dev/null; \ + fi; + + @if [ -d "$(SYMROOT)" ]; then \ + echo "\t[RMDIR] $(SYMROOT)" > /dev/null; \ + fi; + + @rm -rf sym obj dst out.log help: @echo - @echo 'Build targets:' - @echo ' - Build all targets [DEFAULT]' + @echo 'Build targets:' + @echo ' - Builds all targets [DEFAULT]' @echo - @echo 'Cleaning targets:' - @echo ' clean - Remove generated files' + @echo 'Cleaning targets:' + @echo ' clean - Removes generated files' $(SYMROOT) $(OBJROOT): @/bin/mkdir -p $@ From 8e2fd093c23fc6cb026ddd00ab90696f272b5917 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 13:25:51 +0100 Subject: [PATCH 144/623] Cleanup and output changes --- i386/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/i386/Makefile b/i386/Makefile index 57f3137..9b930a8 100644 --- a/i386/Makefile +++ b/i386/Makefile @@ -6,6 +6,7 @@ # - Major cleanup (PikerAlpha, October 2012). # - Output improvements (PikerAlpha, October 2012). # - PRODUCT_MODEL_TARGET renamed to MAKE_TARGET_MODEL (PikerAlpha, November 2012). +# - Cleanup and output changed (PikerAlpha, October 2012). # # @@ -25,9 +26,9 @@ SUBDIRS = util libsa libsaio boot2 $(MAKEGOAL): - @for i in ${SUBDIRS}; \ + @for i in $(SUBDIRS); \ do \ - echo ================= make MODEL=$(MAKE_TARGET_MODEL) $@ for: RevoBoot/i386/$$i =================; \ + echo ================= RevoBoot/i386/$$i =================; \ ( cd $$i; ${MAKE} \ "OBJROOT=$(OBJROOT)/$$i" \ "SYMROOT=$(SYMROOT)" \ From 232063bbc03f6172dedcb9c2844dce0b38f67b13 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 13:27:45 +0100 Subject: [PATCH 145/623] Single pass compilation --- i386/MakeInc.dir | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/i386/MakeInc.dir b/i386/MakeInc.dir index cf4ed0a..bdaf6ca 100755 --- a/i386/MakeInc.dir +++ b/i386/MakeInc.dir @@ -4,8 +4,8 @@ # Updates: # # - Major cleanup (PikerAlpha, October 2012). -# - Fixed clang compilation (dgsga, November 2012. Credits to Evan Lojewski -# for original work). +# - Fixed clang compilation (dgsga, November 2012). +# - Single pass compilation (PikerAlpha, November 2012). # @@ -22,33 +22,27 @@ OMIT_FRAME_POINTER_CFLAG= .c.o .m.o: @echo "\t[CC] $<" - @$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -MM -M -o $(OBJROOT)/$@.Makedep @$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$@ - + $(OBJROOT)/%.o: %.c @echo "\t[CC] $<" - @$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -MM -M -o $(OBJROOT)/$@.Makedep @$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$@ $(OBJROOT)/%.o: %.m @echo "\t[M] $<" - @$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -MM -M -o $(OBJROOT)/$@.Makedep @$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$@ .s.o: @echo "\t[AS] $<" - @$(CC) $(CPPFLAGS) -c $(INC) -arch i386 $< -MM -M -o $(OBJROOT)/$@.Makedep - @$(CC) $(CPPFLAGS) -c $(INC) -arch i386 $< -o $(OBJROOT)/$(@F) + @$(CC) $(CPPFLAGS) -c $(INC) -arch i386 $< -o $(OBJROOT)/$@ $(OBJROOT)/boot2.o: @echo "\t[AS] boot2.s" - @$(CC) -Wa,-n -c $(INC) -arch i386 boot2.s -MM -M -o $(OBJROOT)/$@.Makedep - @$(CC) -Wa,-n -c $(INC) -arch i386 boot2.s -o $(OBJROOT)/$(@F) + @$(CC) -Wa,-n -c $(INC) -arch i386 boot2.s -o $(OBJROOT)/$@ $(OBJROOT)/%.o: %.s @echo "\t[AS] $<" - @$(CC) $(CPPFLAGS) -c $(INC) -arch i386 $< -MM -M -o $(OBJROOT)/$@.Makedep - @$(CC) $(CPPFLAGS) -c $(INC) -arch i386 $< -o $(OBJROOT)/$(@F) + @$(CC) $(CPPFLAGS) -c $(INC) -arch i386 $< -o $(OBJROOT)/$@ -$(DIRS_NEEDED): # $(INSTALLDIR) $(SRCROOT): +$(DIRS_NEEDED): @/bin/mkdir -p $@ From 5eebf3ee8ea059102471dbd7ccb795b9e8b9598b Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 13:31:08 +0100 Subject: [PATCH 146/623] Layout changed --- i386/libsaio/allocate.c | 45 ++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/i386/libsaio/allocate.c b/i386/libsaio/allocate.c index fdd5849..eb84fbc 100755 --- a/i386/libsaio/allocate.c +++ b/i386/libsaio/allocate.c @@ -20,6 +20,11 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ + * + * + * Updates: + * - Layout change only (PikerAlpha, November 2012) + * */ #include "sl.h" @@ -28,8 +33,8 @@ #include "device_tree.h" #include "platform.h" -#define kPageSize 4096 -#define RoundPage(x) ((((unsigned)(x)) + kPageSize - 1) & ~(kPageSize - 1)) +#define kPageSize 4096 +#define RoundPage(x) ((((unsigned)(x)) + kPageSize - 1) & ~(kPageSize - 1)) //============================================================================== @@ -38,32 +43,30 @@ long AllocateMemoryRange(char * rangeName, long start, long length, long type) { char *nameBuf = malloc(strlen(rangeName) + 1); - if (nameBuf == 0) + if (nameBuf) { - return -1; - } + strcpy(nameBuf, rangeName); - strcpy(nameBuf, rangeName); - - uint32_t *buffer = malloc(2 * sizeof(uint32_t)); - - if (buffer == 0) - { - free(nameBuf); + uint32_t *buffer = malloc(2 * sizeof(uint32_t)); - return -1; - } - - buffer[0] = start; - buffer[1] = length; + if (buffer) + { + buffer[0] = start; + buffer[1] = length; #if DEBUG - printf("AllocateMemoryRange : %s - 0x%lx - 0x%lx\n", nameBuf, length, start); + printf("AllocateMemoryRange : %s - 0x%lx - 0x%lx\n", nameBuf, length, start); #endif - DT__AddProperty(gPlatform.EFI.Nodes.MemoryMap, nameBuf, 2 * sizeof(uint32_t), (char *)buffer); - - return 0; + DT__AddProperty(gPlatform.EFI.Nodes.MemoryMap, nameBuf, 2 * sizeof(uint32_t), (char *)buffer); + + return 0; + } + + free(nameBuf); + } + + return -1; } From 17ddd47138a36da5fc71eb731dc8f73d295d4ba8 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 13:34:37 +0100 Subject: [PATCH 147/623] Check return of malloc call --- i386/libsaio/efi.c | 88 +++++++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 41 deletions(-) diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index 4b35f18..3d88f18 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -34,6 +34,7 @@ * - Data selector moved over from RevoBoot/i386/config/data.h (PikerAlpha, October 2012). * - Get static EFI data (optional) from /Extra/EFI/[MacModelNN].bin (PikerAlpha, October 2012). * - STATIC_SYSTEM_SERIAL_NUMBER renamed to EFI_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). + * - Check return of malloc call (PikerAlpha, November 2012). * */ @@ -257,64 +258,69 @@ void *convertHexStr2Binary(const char *hexStr, int *outLength) uint8_t binChar; uint8_t *binStr = NULL; int hexStrIdx, binStrIdx, hexNibbleIdx; - + len = strlen(hexStr); - + if (len > 1) { // the resulting binary will be the half size of the input hex string binStr = malloc(len / 2); - binStrIdx = 0; - hexNibbleIdx = 0; - - for (hexStrIdx = 0; hexStrIdx < len; hexStrIdx++) + + if (binStr) { - hexNibble = hexStr[hexStrIdx]; - - // ignore all chars except valid hex numbers - if ((hexNibble >= '0' && hexNibble <= '9') || (hexNibble >= 'A' && hexNibble <= 'F') || (hexNibble >= 'a' && hexNibble <= 'f')) + binStrIdx = 0; + hexNibbleIdx = 0; + + for (hexStrIdx = 0; hexStrIdx < len; hexStrIdx++) { - hexByte[hexNibbleIdx++] = hexNibble; - - // found both two nibbles, convert to binary - if (hexNibbleIdx == 2) + hexNibble = hexStr[hexStrIdx]; + + // ignore all chars except valid hex numbers + if ((hexNibble >= '0' && hexNibble <= '9') || (hexNibble >= 'A' && hexNibble <= 'F') || (hexNibble >= 'a' && hexNibble <= 'f')) { - binChar = 0; - - for (hexNibbleIdx = 0; hexNibbleIdx < sizeof(hexByte); hexNibbleIdx++) + hexByte[hexNibbleIdx++] = hexNibble; + + // found both two nibbles, convert to binary + if (hexNibbleIdx == 2) { - if (hexNibbleIdx > 0) + binChar = 0; + + for (hexNibbleIdx = 0; hexNibbleIdx < sizeof(hexByte); hexNibbleIdx++) { - binChar = binChar << 4; - } + if (hexNibbleIdx > 0) + { + binChar = binChar << 4; + } - if (hexByte[hexNibbleIdx] <= '9') - { - binChar += hexByte[hexNibbleIdx] - '0'; + if (hexByte[hexNibbleIdx] <= '9') + { + binChar += hexByte[hexNibbleIdx] - '0'; + } + else if (hexByte[hexNibbleIdx] <= 'F') + { + binChar += hexByte[hexNibbleIdx] - ('A' - 10); + } + else if (hexByte[hexNibbleIdx] <= 'f') + { + binChar += hexByte[hexNibbleIdx] - ('a' - 10); + } } - else if (hexByte[hexNibbleIdx] <= 'F') - { - binChar += hexByte[hexNibbleIdx] - ('A' - 10); - } - else if (hexByte[hexNibbleIdx] <= 'f') - { - binChar += hexByte[hexNibbleIdx] - ('a' - 10); - } - } - binStr[binStrIdx++] = binChar; - hexNibbleIdx = 0; + binStr[binStrIdx++] = binChar; + hexNibbleIdx = 0; + } } } + + *outLength = binStrIdx; + + return binStr; } - *outLength = binStrIdx; - return binStr; - } - else - { - *outLength = 0; - return NULL; } + + *outLength = 0; + + return NULL; } //============================================================================== From 48201641d522faa449433ca27b40c61dc2c72ee3 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 13:39:08 +0100 Subject: [PATCH 148/623] OSBigEndian removed and some minor style nits --- i386/libsaio/disk.c | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/i386/libsaio/disk.c b/i386/libsaio/disk.c index 6335e14..a1ed781 100644 --- a/i386/libsaio/disk.c +++ b/i386/libsaio/disk.c @@ -30,31 +30,27 @@ */ /* - * INTEL CORPORATION PROPRIETARY INFORMATION + * INTEL CORPORATION PROPRIETARY INFORMATION * - * This software is supplied under the terms of a license agreement or - * nondisclosure agreement with Intel Corporation and may not be copied - * nor disclosed except in accordance with the terms of that agreement. + * This software is supplied under the terms of a license agreement or + * nondisclosure agreement with Intel Corporation and may not be copied + * nor disclosed except in accordance with the terms of that agreement. + * + * Copyright 1988, 1989 Intel Corporation + * + * Copyright 1993 NeXT Computer, Inc. All rights reserved. + * + * Copyright 2007 VMware Inc. + * "Preboot" ramdisk support added by David Elliott + * GPT support added by David Elliott. Based on IOGUIDPartitionScheme.cpp. * - * Copyright 1988, 1989 Intel Corporation - */ - -/* - * Copyright 1993 NeXT Computer, Inc. - * All rights reserved. - */ - -/* Copyright 2007 VMware Inc. - "Preboot" ramdisk support added by David Elliott - GPT support added by David Elliott. Based on IOGUIDPartitionScheme.cpp. - */ - -/* * Updates: - * - Cleanups and refactoring by DHP in 2010 and 2011. - * - Renamed LION_RECOVERY_SUPPORT to CORE_STARAGE_SUPPORT (PikerAlpha, November 2012). - * - Renamed LION_FILEVAULT_SUPPORT to CORE_STARAGE_SUPPORT (PikerAlpha, November 2012). - * - Renamed encryptedBootPartition to coreStoragePartition (PikerAlpha, November 2012). + * - Cleanups and refactoring by DHP in 2010 and 2011. + * - Renamed LION_RECOVERY_SUPPORT to CORE_STARAGE_SUPPORT (PikerAlpha, November 2012). + * - Renamed LION_FILEVAULT_SUPPORT to CORE_STARAGE_SUPPORT (PikerAlpha, November 2012). + * - Renamed encryptedBootPartition to coreStoragePartition (PikerAlpha, November 2012). + * - OSBigEndian removed and some minor style nits (PikerAlpha, November 2012). + * */ From 69755028c94b561a0f146d747e1c49939107a052 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 13:40:26 +0100 Subject: [PATCH 149/623] Overhaul of HPS table data --- i386/libsaio/hfs_CaseTables.h | 687 ++++++++++++++++++---------------- 1 file changed, 373 insertions(+), 314 deletions(-) diff --git a/i386/libsaio/hfs_CaseTables.h b/i386/libsaio/hfs_CaseTables.h index 105007c..ac12604 100755 --- a/i386/libsaio/hfs_CaseTables.h +++ b/i386/libsaio/hfs_CaseTables.h @@ -18,41 +18,43 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ + * + * Updates: + * - Table data updated to match the XNU 2050.18.24 source code (PikerAlpha, November 2012) + * - Latin is now a seperate table, done to make it faster (PikerAlpha, November 2012) + * - Compressed and uncompressed table data is now 100% the same (PikerAlpha, November 2012) + * - UNCOMPRESSED renamed to USE_UNCOMPRESSED_TABLES (PikerAlpha, November 2012) + * - Cleanups and other reformatting to pull it out of the 90's (PikerAlpha, November 2012) + * - Table length errors fixed. Don't use 512/5632 instead of 256/2816 (PikerAlpha, November 2012) + * - Table data verified against HFSPlusX64.efi (PikerAlpha, November 2012) + * */ -/* - File: CaseTables.h -*/ -/* The lower case table consists of a 256-entry high-byte table followed by some number of - 256-entry subtables. The high-byte table contains either an offset to the subtable for - characters with that high byte or zero, which means that there are no case mappings or - ignored characters in that block. Ignored characters are mapped to zero. +/* + * The default setting is 1, but you can change it to 0 to use uncompressed + * table data. Making the booter 5152 bytes (data/extra code) bigger. */ -#if UNCOMPRESSED -u_int16_t gLowerCaseTable[] = { +#define USE_COMPRESSED_TABLES 1 - // High-byte indices ( == 0 iff no case mapping and no ignorables ) +/* Do NOT change this one! */ - /* 0 */ 0x0100, 0x0200, 0x0000, 0x0300, 0x0400, 0x0500, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 1 */ 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 2 */ 0x0700, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 3 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 4 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 5 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 6 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 7 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 8 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 9 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* A */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* B */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* C */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* D */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* E */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* F */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0900, 0x0A00, +#define USE_UNCOMPRESSED_TABLES ! USE_COMPRESSED_TABLES + + +#if USE_UNCOMPRESSED_TABLES +/*============================================================================== + * For better performance, the case folding table for basic latin + * is seperate from the others. This eliminates the extra lookup + * to get the offset to this table. + * + * Note: 0x0000 now maps to 0 so that it will be ignored + */ - // Table 1 (for high byte 0x00) +u_int16_t gLatinCaseFoldTable[] = +{ + // gLatinCaseFold in XNU/bsd/hfs/hfscommon/Unicode/UCStringCompareData.h) 512 bytes starting @ 0x4240 in HFSPlusX64.efi /* 0 */ 0xFFFF, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, /* 1 */ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F, @@ -70,8 +72,38 @@ u_int16_t gLowerCaseTable[] = { /* D */ 0x00F0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00F8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00FE, 0x00DF, /* E */ 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, /* F */ 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF, +}; + + +/*============================================================================== + * The lower case table consists of a 256-entry high-byte table followed by some number of + * 256-entry subtables. The high-byte table contains either an offset to the subtable for + * characters with that high byte or zero, which means that there are no case mappings or + * ignored characters in that block. Ignored characters are mapped to zero. + */ + +u_int16_t gLowerCaseTable[] = +{ + /* Table 0 high-byte indices ( == 0 iff no case mapping and no ignorables ) 512 bytes starting @ 0x4440 in HFSPlusX64.efi */ + + /* 0 */ 0x0000, 0x0100, 0x0000, 0x0200, 0x0300, 0x0400, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 1 */ 0x0500, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 2 */ 0x0600, 0x0700, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 3 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 4 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 5 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 6 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 7 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 8 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 9 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* A */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* B */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* C */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* D */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* E */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* F */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x0900, - // Table 2 (for high byte 0x01) + // Table 1 (for high byte 0x01) 512 bytes starting @ 0x4640 in HFSPlusX64.efi /* 0 */ 0x0100, 0x0101, 0x0102, 0x0103, 0x0104, 0x0105, 0x0106, 0x0107, 0x0108, 0x0109, 0x010A, 0x010B, 0x010C, 0x010D, 0x010E, 0x010F, /* 1 */ 0x0111, 0x0111, 0x0112, 0x0113, 0x0114, 0x0115, 0x0116, 0x0117, 0x0118, 0x0119, 0x011A, 0x011B, 0x011C, 0x011D, 0x011E, 0x011F, @@ -90,7 +122,7 @@ u_int16_t gLowerCaseTable[] = { /* E */ 0x01E0, 0x01E1, 0x01E2, 0x01E3, 0x01E5, 0x01E5, 0x01E6, 0x01E7, 0x01E8, 0x01E9, 0x01EA, 0x01EB, 0x01EC, 0x01ED, 0x01EE, 0x01EF, /* F */ 0x01F0, 0x01F3, 0x01F3, 0x01F3, 0x01F4, 0x01F5, 0x01F6, 0x01F7, 0x01F8, 0x01F9, 0x01FA, 0x01FB, 0x01FC, 0x01FD, 0x01FE, 0x01FF, - // Table 3 (for high byte 0x03) + // Table 2 (for high byte 0x03) 512 bytes starting @ 0x4840 in HFSPlusX64.efi /* 0 */ 0x0300, 0x0301, 0x0302, 0x0303, 0x0304, 0x0305, 0x0306, 0x0307, 0x0308, 0x0309, 0x030A, 0x030B, 0x030C, 0x030D, 0x030E, 0x030F, /* 1 */ 0x0310, 0x0311, 0x0312, 0x0313, 0x0314, 0x0315, 0x0316, 0x0317, 0x0318, 0x0319, 0x031A, 0x031B, 0x031C, 0x031D, 0x031E, 0x031F, @@ -109,7 +141,7 @@ u_int16_t gLowerCaseTable[] = { /* E */ 0x03E0, 0x03E1, 0x03E3, 0x03E3, 0x03E5, 0x03E5, 0x03E7, 0x03E7, 0x03E9, 0x03E9, 0x03EB, 0x03EB, 0x03ED, 0x03ED, 0x03EF, 0x03EF, /* F */ 0x03F0, 0x03F1, 0x03F2, 0x03F3, 0x03F4, 0x03F5, 0x03F6, 0x03F7, 0x03F8, 0x03F9, 0x03FA, 0x03FB, 0x03FC, 0x03FD, 0x03FE, 0x03FF, - // Table 4 (for high byte 0x04) + // Table 3 (for high byte 0x04) 512 bytes starting @ 0x4A40 in HFSPlusX64.efi /* 0 */ 0x0400, 0x0401, 0x0452, 0x0403, 0x0454, 0x0455, 0x0456, 0x0407, 0x0458, 0x0459, 0x045A, 0x045B, 0x040C, 0x040D, 0x040E, 0x045F, /* 1 */ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0419, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, @@ -128,7 +160,7 @@ u_int16_t gLowerCaseTable[] = { /* E */ 0x04E0, 0x04E1, 0x04E2, 0x04E3, 0x04E4, 0x04E5, 0x04E6, 0x04E7, 0x04E8, 0x04E9, 0x04EA, 0x04EB, 0x04EC, 0x04ED, 0x04EE, 0x04EF, /* F */ 0x04F0, 0x04F1, 0x04F2, 0x04F3, 0x04F4, 0x04F5, 0x04F6, 0x04F7, 0x04F8, 0x04F9, 0x04FA, 0x04FB, 0x04FC, 0x04FD, 0x04FE, 0x04FF, - // Table 5 (for high byte 0x05) + // Table 4 (for high byte 0x05) 512 bytes starting @ 0x4C40 in HFSPlusX64.efi /* 0 */ 0x0500, 0x0501, 0x0502, 0x0503, 0x0504, 0x0505, 0x0506, 0x0507, 0x0508, 0x0509, 0x050A, 0x050B, 0x050C, 0x050D, 0x050E, 0x050F, /* 1 */ 0x0510, 0x0511, 0x0512, 0x0513, 0x0514, 0x0515, 0x0516, 0x0517, 0x0518, 0x0519, 0x051A, 0x051B, 0x051C, 0x051D, 0x051E, 0x051F, @@ -147,7 +179,7 @@ u_int16_t gLowerCaseTable[] = { /* E */ 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA, 0x05EB, 0x05EC, 0x05ED, 0x05EE, 0x05EF, /* F */ 0x05F0, 0x05F1, 0x05F2, 0x05F3, 0x05F4, 0x05F5, 0x05F6, 0x05F7, 0x05F8, 0x05F9, 0x05FA, 0x05FB, 0x05FC, 0x05FD, 0x05FE, 0x05FF, - // Table 6 (for high byte 0x10) + // Table 5 (for high byte 0x10) 512 bytes starting @ 0x4E40 in HFSPlusX64.efi /* 0 */ 0x1000, 0x1001, 0x1002, 0x1003, 0x1004, 0x1005, 0x1006, 0x1007, 0x1008, 0x1009, 0x100A, 0x100B, 0x100C, 0x100D, 0x100E, 0x100F, /* 1 */ 0x1010, 0x1011, 0x1012, 0x1013, 0x1014, 0x1015, 0x1016, 0x1017, 0x1018, 0x1019, 0x101A, 0x101B, 0x101C, 0x101D, 0x101E, 0x101F, @@ -166,7 +198,7 @@ u_int16_t gLowerCaseTable[] = { /* E */ 0x10E0, 0x10E1, 0x10E2, 0x10E3, 0x10E4, 0x10E5, 0x10E6, 0x10E7, 0x10E8, 0x10E9, 0x10EA, 0x10EB, 0x10EC, 0x10ED, 0x10EE, 0x10EF, /* F */ 0x10F0, 0x10F1, 0x10F2, 0x10F3, 0x10F4, 0x10F5, 0x10F6, 0x10F7, 0x10F8, 0x10F9, 0x10FA, 0x10FB, 0x10FC, 0x10FD, 0x10FE, 0x10FF, - // Table 7 (for high byte 0x20) + // Table 6 (for high byte 0x20) 512 bytes starting @ 0x5040 in HFSPlusX64.efi /* 0 */ 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x200B, 0x0000, 0x0000, 0x0000, 0x0000, /* 1 */ 0x2010, 0x2011, 0x2012, 0x2013, 0x2014, 0x2015, 0x2016, 0x2017, 0x2018, 0x2019, 0x201A, 0x201B, 0x201C, 0x201D, 0x201E, 0x201F, @@ -185,7 +217,7 @@ u_int16_t gLowerCaseTable[] = { /* E */ 0x20E0, 0x20E1, 0x20E2, 0x20E3, 0x20E4, 0x20E5, 0x20E6, 0x20E7, 0x20E8, 0x20E9, 0x20EA, 0x20EB, 0x20EC, 0x20ED, 0x20EE, 0x20EF, /* F */ 0x20F0, 0x20F1, 0x20F2, 0x20F3, 0x20F4, 0x20F5, 0x20F6, 0x20F7, 0x20F8, 0x20F9, 0x20FA, 0x20FB, 0x20FC, 0x20FD, 0x20FE, 0x20FF, - // Table 8 (for high byte 0x21) + // Table 7 (for high byte 0x21) 512 bytes starting @ 0x5240 in HFSPlusX64.efi /* 0 */ 0x2100, 0x2101, 0x2102, 0x2103, 0x2104, 0x2105, 0x2106, 0x2107, 0x2108, 0x2109, 0x210A, 0x210B, 0x210C, 0x210D, 0x210E, 0x210F, /* 1 */ 0x2110, 0x2111, 0x2112, 0x2113, 0x2114, 0x2115, 0x2116, 0x2117, 0x2118, 0x2119, 0x211A, 0x211B, 0x211C, 0x211D, 0x211E, 0x211F, @@ -204,7 +236,7 @@ u_int16_t gLowerCaseTable[] = { /* E */ 0x21E0, 0x21E1, 0x21E2, 0x21E3, 0x21E4, 0x21E5, 0x21E6, 0x21E7, 0x21E8, 0x21E9, 0x21EA, 0x21EB, 0x21EC, 0x21ED, 0x21EE, 0x21EF, /* F */ 0x21F0, 0x21F1, 0x21F2, 0x21F3, 0x21F4, 0x21F5, 0x21F6, 0x21F7, 0x21F8, 0x21F9, 0x21FA, 0x21FB, 0x21FC, 0x21FD, 0x21FE, 0x21FF, - // Table 9 (for high byte 0xFE) + // Table 8 (for high byte 0xFE) 512 bytes starting @ 0x5440 in HFSPlusX64.efi /* 0 */ 0xFE00, 0xFE01, 0xFE02, 0xFE03, 0xFE04, 0xFE05, 0xFE06, 0xFE07, 0xFE08, 0xFE09, 0xFE0A, 0xFE0B, 0xFE0C, 0xFE0D, 0xFE0E, 0xFE0F, /* 1 */ 0xFE10, 0xFE11, 0xFE12, 0xFE13, 0xFE14, 0xFE15, 0xFE16, 0xFE17, 0xFE18, 0xFE19, 0xFE1A, 0xFE1B, 0xFE1C, 0xFE1D, 0xFE1E, 0xFE1F, @@ -223,7 +255,7 @@ u_int16_t gLowerCaseTable[] = { /* E */ 0xFEE0, 0xFEE1, 0xFEE2, 0xFEE3, 0xFEE4, 0xFEE5, 0xFEE6, 0xFEE7, 0xFEE8, 0xFEE9, 0xFEEA, 0xFEEB, 0xFEEC, 0xFEED, 0xFEEE, 0xFEEF, /* F */ 0xFEF0, 0xFEF1, 0xFEF2, 0xFEF3, 0xFEF4, 0xFEF5, 0xFEF6, 0xFEF7, 0xFEF8, 0xFEF9, 0xFEFA, 0xFEFB, 0xFEFC, 0xFEFD, 0xFEFE, 0x0000, - // Table 10 (for high byte 0xFF) + // Table 9 (for high byte 0xFF) 512 bytes starting @ 0x5640 in HFSPlusX64.efi /* 0 */ 0xFF00, 0xFF01, 0xFF02, 0xFF03, 0xFF04, 0xFF05, 0xFF06, 0xFF07, 0xFF08, 0xFF09, 0xFF0A, 0xFF0B, 0xFF0C, 0xFF0D, 0xFF0E, 0xFF0F, /* 1 */ 0xFF10, 0xFF11, 0xFF12, 0xFF13, 0xFF14, 0xFF15, 0xFF16, 0xFF17, 0xFF18, 0xFF19, 0xFF1A, 0xFF1B, 0xFF1C, 0xFF1D, 0xFF1E, 0xFF1F, @@ -245,8 +277,8 @@ u_int16_t gLowerCaseTable[] = { /* RelString case folding table */ -unsigned short gCompareTable[] = { - +unsigned short gCompareTable[] = +{ /* 0 */ 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x0700, 0x0800, 0x0900, 0x0A00, 0x0B00, 0x0C00, 0x0D00, 0x0E00, 0x0F00, /* 1 */ 0x1000, 0x1100, 0x1200, 0x1300, 0x1400, 0x1500, 0x1600, 0x1700, 0x1800, 0x1900, 0x1A00, 0x1B00, 0x1C00, 0x1D00, 0x1E00, 0x1F00, /* 2 */ 0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500, 0x2600, 0x2700, 0x2800, 0x2900, 0x2A00, 0x2B00, 0x2C00, 0x2D00, 0x2E00, 0x2F00, @@ -261,7 +293,7 @@ unsigned short gCompareTable[] = { /* 7 */ 0x5000, 0x5100, 0x5200, 0x5300, 0x5400, 0x5500, 0x5600, 0x5700, 0x5800, 0x5900, 0x5A00, 0x7B00, 0x7C00, 0x7D00, 0x7E00, 0x7F00, // range 0x80 to 0xd8 gets mapped... - + /* 8 */ 0x4108, 0x410C, 0x4310, 0x4502, 0x4E0A, 0x4F08, 0x5508, 0x4182, 0x4104, 0x4186, 0x4108, 0x410A, 0x410C, 0x4310, 0x4502, 0x4584, /* 9 */ 0x4586, 0x4588, 0x4982, 0x4984, 0x4986, 0x4988, 0x4E0A, 0x4F82, 0x4F84, 0x4F86, 0x4F08, 0x4F0A, 0x5582, 0x5584, 0x5586, 0x5508, /* A */ 0xA000, 0xA100, 0xA200, 0xA300, 0xA400, 0xA500, 0xA600, 0x5382, 0xA800, 0xA900, 0xAA00, 0xAB00, 0xAC00, 0xAD00, 0x4114, 0x4F0E, @@ -271,290 +303,317 @@ unsigned short gCompareTable[] = { /* E */ 0xE000, 0xE100, 0xE200, 0xE300, 0xE400, 0xE500, 0xE600, 0xE700, 0xE800, 0xE900, 0xEA00, 0xEB00, 0xEC00, 0xED00, 0xEE00, 0xEF00, /* F */ 0xF000, 0xF100, 0xF200, 0xF300, 0xF400, 0xF500, 0xF600, 0xF700, 0xF800, 0xF900, 0xFA00, 0xFB00, 0xFC00, 0xFD00, 0xFE00, 0xFF00, - }; -#else /* ! UNCOMPRESSED */ +#else -enum { - kTypeLiteral = 0, - kTypeAscending = 1, - kTypeAscending256 = 2 +enum +{ + kTypeLiteral = 0, + kTypeAscending = 1, + kTypeAscending256 = 2 }; -struct compressed_block { - unsigned char type; - unsigned char count; - unsigned short data; +struct CompressedBlock +{ + unsigned char type; + unsigned char count; + unsigned short data; }; +unsigned short *gLatinCaseFoldTable; unsigned short *gLowerCaseTable; +unsigned short *gCompareTable; -struct compressed_block gLowerCaseTableCompressed[] = { - {0x0, 0x1, 0x100}, - {0x0, 0x1, 0x200}, - {0x0, 0x1, 0x0}, - {0x0, 0x1, 0x300}, - {0x0, 0x1, 0x400}, - {0x0, 0x1, 0x500}, - {0x0, 0xa, 0x0}, - {0x0, 0x1, 0x600}, - {0x0, 0xf, 0x0}, - {0x0, 0x1, 0x700}, - {0x0, 0x1, 0x800}, - {0x0, 0xdc, 0x0}, - {0x0, 0x1, 0x900}, - {0x0, 0x1, 0xa00}, - {0x0, 0x1, 0xffff}, - {0x1, 0x40, 0x1}, - {0x1, 0x1a, 0x61}, - {0x1, 0x6b, 0x5b}, - {0x0, 0x1, 0xe6}, - {0x1, 0x9, 0xc7}, - {0x0, 0x1, 0xf0}, - {0x1, 0x7, 0xd1}, - {0x0, 0x1, 0xf8}, - {0x1, 0x5, 0xd9}, - {0x0, 0x1, 0xfe}, - {0x1, 0x31, 0xdf}, - {0x0, 0x2, 0x111}, - {0x1, 0x14, 0x112}, - {0x0, 0x2, 0x127}, - {0x1, 0xa, 0x128}, - {0x0, 0x2, 0x133}, - {0x1, 0xb, 0x134}, - {0x0, 0x2, 0x140}, - {0x0, 0x2, 0x142}, - {0x1, 0x7, 0x143}, - {0x0, 0x2, 0x14b}, - {0x1, 0x6, 0x14c}, - {0x0, 0x2, 0x153}, - {0x1, 0x12, 0x154}, - {0x0, 0x2, 0x167}, - {0x1, 0x19, 0x168}, - {0x0, 0x1, 0x253}, - {0x0, 0x2, 0x183}, - {0x0, 0x2, 0x185}, - {0x0, 0x1, 0x254}, - {0x0, 0x2, 0x188}, - {0x1, 0x2, 0x256}, - {0x0, 0x2, 0x18c}, - {0x0, 0x1, 0x18d}, - {0x0, 0x1, 0x1dd}, - {0x0, 0x1, 0x259}, - {0x0, 0x1, 0x25b}, - {0x0, 0x2, 0x192}, - {0x0, 0x1, 0x260}, - {0x0, 0x1, 0x263}, - {0x0, 0x1, 0x195}, - {0x0, 0x1, 0x269}, - {0x0, 0x1, 0x268}, - {0x0, 0x2, 0x199}, - {0x1, 0x2, 0x19a}, - {0x0, 0x1, 0x26f}, - {0x0, 0x1, 0x272}, - {0x0, 0x1, 0x19e}, - {0x0, 0x1, 0x275}, - {0x1, 0x2, 0x1a0}, - {0x0, 0x2, 0x1a3}, - {0x0, 0x2, 0x1a5}, - {0x0, 0x1, 0x1a6}, - {0x0, 0x2, 0x1a8}, - {0x0, 0x1, 0x283}, - {0x1, 0x2, 0x1aa}, - {0x0, 0x2, 0x1ad}, - {0x0, 0x1, 0x288}, - {0x1, 0x2, 0x1af}, - {0x1, 0x2, 0x28a}, - {0x0, 0x2, 0x1b4}, - {0x0, 0x2, 0x1b6}, - {0x0, 0x1, 0x292}, - {0x0, 0x2, 0x1b9}, - {0x1, 0x2, 0x1ba}, - {0x0, 0x2, 0x1bd}, - {0x1, 0x6, 0x1be}, - {0x0, 0x3, 0x1c6}, - {0x0, 0x3, 0x1c9}, - {0x0, 0x3, 0x1cc}, - {0x1, 0x17, 0x1cd}, - {0x0, 0x2, 0x1e5}, - {0x1, 0xb, 0x1e6}, - {0x0, 0x3, 0x1f3}, - {0x1, 0xc, 0x1f4}, - {0x1, 0x91, 0x300}, - {0x1, 0x11, 0x3b1}, - {0x0, 0x1, 0x3a2}, - {0x1, 0x7, 0x3c3}, - {0x1, 0x38, 0x3aa}, - {0x0, 0x2, 0x3e3}, - {0x0, 0x2, 0x3e5}, - {0x0, 0x2, 0x3e7}, - {0x0, 0x2, 0x3e9}, - {0x0, 0x2, 0x3eb}, - {0x0, 0x2, 0x3ed}, - {0x0, 0x2, 0x3ef}, - {0x1, 0x12, 0x3f0}, - {0x0, 0x1, 0x452}, - {0x0, 0x1, 0x403}, - {0x1, 0x3, 0x454}, - {0x0, 0x1, 0x407}, - {0x1, 0x4, 0x458}, - {0x1, 0x3, 0x40c}, - {0x0, 0x1, 0x45f}, - {0x1, 0x9, 0x430}, - {0x0, 0x1, 0x419}, - {0x1, 0x16, 0x43a}, - {0x1, 0x30, 0x430}, - {0x0, 0x2, 0x461}, - {0x0, 0x2, 0x463}, - {0x0, 0x2, 0x465}, - {0x0, 0x2, 0x467}, - {0x0, 0x2, 0x469}, - {0x0, 0x2, 0x46b}, - {0x0, 0x2, 0x46d}, - {0x0, 0x2, 0x46f}, - {0x0, 0x2, 0x471}, - {0x0, 0x2, 0x473}, - {0x0, 0x2, 0x475}, - {0x1, 0x2, 0x476}, - {0x0, 0x2, 0x479}, - {0x0, 0x2, 0x47b}, - {0x0, 0x2, 0x47d}, - {0x0, 0x2, 0x47f}, - {0x0, 0x2, 0x481}, - {0x1, 0xe, 0x482}, - {0x0, 0x2, 0x491}, - {0x0, 0x2, 0x493}, - {0x0, 0x2, 0x495}, - {0x0, 0x2, 0x497}, - {0x0, 0x2, 0x499}, - {0x0, 0x2, 0x49b}, - {0x0, 0x2, 0x49d}, - {0x0, 0x2, 0x49f}, - {0x0, 0x2, 0x4a1}, - {0x0, 0x2, 0x4a3}, - {0x0, 0x2, 0x4a5}, - {0x0, 0x2, 0x4a7}, - {0x0, 0x2, 0x4a9}, - {0x0, 0x2, 0x4ab}, - {0x0, 0x2, 0x4ad}, - {0x0, 0x2, 0x4af}, - {0x0, 0x2, 0x4b1}, - {0x0, 0x2, 0x4b3}, - {0x0, 0x2, 0x4b5}, - {0x0, 0x2, 0x4b7}, - {0x0, 0x2, 0x4b9}, - {0x0, 0x2, 0x4bb}, - {0x0, 0x2, 0x4bd}, - {0x0, 0x2, 0x4bf}, - {0x1, 0x3, 0x4c0}, - {0x0, 0x2, 0x4c4}, - {0x1, 0x2, 0x4c5}, - {0x0, 0x2, 0x4c8}, - {0x1, 0x2, 0x4c9}, - {0x0, 0x2, 0x4cc}, - {0x1, 0x64, 0x4cd}, - {0x1, 0x26, 0x561}, - {0x1, 0xa9, 0x557}, - {0x1, 0xa0, 0x1000}, - {0x1, 0x26, 0x10d0}, - {0x1, 0x3a, 0x10c6}, - {0x1, 0xc, 0x2000}, - {0x0, 0x4, 0x0}, - {0x1, 0x1a, 0x2010}, - {0x0, 0x5, 0x0}, - {0x1, 0x3b, 0x202f}, - {0x0, 0x6, 0x0}, - {0x1, 0xf0, 0x2070}, - {0x1, 0x10, 0x2170}, - {0x1, 0x90, 0x2170}, - {0x1, 0xff, 0xfe00}, - {0x0, 0x1, 0x0}, - {0x1, 0x21, 0xff00}, - {0x1, 0x1a, 0xff41}, - {0x1, 0xc5, 0xff3b}, +struct CompressedBlock gLatinCaseFoldTableCompressed[] = +{ + { kTypeLiteral, 0x01, 0xffff }, + { kTypeAscending, 0x40, 0x0001 }, + { kTypeAscending, 0x1a, 0x0061 }, + { kTypeAscending, 0x6b, 0x005b }, + { kTypeLiteral, 0x01, 0x00e6 }, + { kTypeAscending, 0x09, 0x00c7 }, + { kTypeLiteral, 0x01, 0x00f0 }, + { kTypeAscending, 0x07, 0x00d1 }, + { kTypeLiteral, 0x01, 0x00f8 }, + { kTypeAscending, 0x05, 0x00d9 }, + { kTypeLiteral, 0x01, 0x00fe }, + { kTypeAscending, 0x21, 0x00df } +}; + +struct CompressedBlock gLowerCaseTableCompressed[] = +{ + /* Table 0 */ + { kTypeLiteral, 0x01, 0x0000 }, + { kTypeLiteral, 0x01, 0x0100 }, + { kTypeLiteral, 0x01, 0x0000 }, + { kTypeLiteral, 0x01, 0x0200 }, + { kTypeLiteral, 0x01, 0x0300 }, + { kTypeLiteral, 0x01, 0x0400 }, + { kTypeLiteral, 0x0a, 0x0000 }, + { kTypeLiteral, 0x01, 0x0500 }, + { kTypeLiteral, 0x0f, 0x0000 }, + { kTypeLiteral, 0x01, 0x0600 }, + { kTypeLiteral, 0x01, 0x0700 }, + { kTypeLiteral, 0xdc, 0x0000 }, + { kTypeLiteral, 0x01, 0x0800 }, + { kTypeLiteral, 0x01, 0x0900 }, + + /* Table 1 */ + { kTypeAscending, 0x10, 0x0100 }, + { kTypeLiteral, 0x01, 0x0111 }, + { kTypeAscending, 0x15, 0x0111 }, + { kTypeLiteral, 0x01, 0x0127 }, + { kTypeAscending, 0x0b, 0x0127 }, + { kTypeLiteral, 0x01, 0x0133 }, + { kTypeAscending, 0x0c, 0x0133 }, + { kTypeLiteral, 0x02, 0x0140 }, + { kTypeLiteral, 0x01, 0x0142 }, + { kTypeAscending, 0x08, 0x0142 }, + { kTypeLiteral, 0x01, 0x014b }, + { kTypeAscending, 0x07, 0x014b }, + { kTypeLiteral, 0x01, 0x0153 }, + { kTypeAscending, 0x13, 0x0153 }, + { kTypeLiteral, 0x01, 0x0167 }, + { kTypeAscending, 0x1a, 0x0167 }, + { kTypeLiteral, 0x01, 0x0253 }, + { kTypeLiteral, 0x02, 0x0183 }, + { kTypeLiteral, 0x02, 0x0185 }, + { kTypeLiteral, 0x01, 0x0254 }, + { kTypeLiteral, 0x02, 0x0188 }, + { kTypeAscending, 0x02, 0x0256 }, + { kTypeLiteral, 0x01, 0x018c }, + { kTypeAscending, 0x02, 0x018c }, + { kTypeLiteral, 0x01, 0x01dd }, + { kTypeLiteral, 0x01, 0x0259 }, + { kTypeLiteral, 0x01, 0x025b }, + { kTypeLiteral, 0x02, 0x0192 }, + { kTypeLiteral, 0x01, 0x0260 }, + { kTypeLiteral, 0x01, 0x0263 }, + { kTypeLiteral, 0x01, 0x0195 }, + { kTypeLiteral, 0x01, 0x0269 }, + { kTypeLiteral, 0x01, 0x0268 }, + { kTypeLiteral, 0x01, 0x0199 }, + { kTypeAscending, 0x03, 0x0199 }, + { kTypeLiteral, 0x01, 0x026f }, + { kTypeLiteral, 0x01, 0x0272 }, + { kTypeLiteral, 0x01, 0x019e }, + { kTypeLiteral, 0x01, 0x0275 }, + { kTypeAscending, 0x02, 0x01a0 }, + { kTypeLiteral, 0x02, 0x01a3 }, + { kTypeLiteral, 0x02, 0x01a5 }, + { kTypeLiteral, 0x01, 0x01a6 }, + { kTypeLiteral, 0x02, 0x01a8 }, + { kTypeLiteral, 0x01, 0x0283 }, + { kTypeAscending, 0x02, 0x01aa }, + { kTypeLiteral, 0x02, 0x01ad }, + { kTypeLiteral, 0x01, 0x0288 }, + { kTypeAscending, 0x02, 0x01af }, + { kTypeAscending, 0x02, 0x028a }, + { kTypeLiteral, 0x02, 0x01b4 }, + { kTypeLiteral, 0x02, 0x01b6 }, + { kTypeLiteral, 0x01, 0x0292 }, + { kTypeLiteral, 0x02, 0x01b9 }, + { kTypeAscending, 0x02, 0x01ba }, + { kTypeLiteral, 0x01, 0x01bd }, + { kTypeAscending, 0x07, 0x01bd }, + { kTypeLiteral, 0x03, 0x01c6 }, + { kTypeLiteral, 0x03, 0x01c9 }, + { kTypeLiteral, 0x02, 0x01cc }, + { kTypeAscending, 0x18, 0x01cc }, + { kTypeLiteral, 0x01, 0x01e5 }, + { kTypeAscending, 0x0c, 0x01e5 }, + { kTypeLiteral, 0x02, 0x01f3 }, + { kTypeAscending, 0x0d, 0x01f3 }, + + /* Table 2 */ + { kTypeAscending, 0x91, 0x0300 }, + { kTypeAscending, 0x11, 0x03b1 }, + { kTypeLiteral, 0x01, 0x03a2 }, + { kTypeAscending, 0x07, 0x03c3 }, + { kTypeAscending, 0x38, 0x03aa }, + { kTypeLiteral, 0x02, 0x03e3 }, + { kTypeLiteral, 0x02, 0x03e5 }, + { kTypeLiteral, 0x02, 0x03e7 }, + { kTypeLiteral, 0x02, 0x03e9 }, + { kTypeLiteral, 0x02, 0x03eb }, + { kTypeLiteral, 0x02, 0x03ed }, + { kTypeLiteral, 0x02, 0x03ef }, + { kTypeAscending, 0x10, 0x03f0 }, + + /* Table 3 */ + { kTypeAscending, 0x02, 0x0400 }, + { kTypeLiteral, 0x01, 0x0452 }, + { kTypeLiteral, 0x01, 0x0403 }, + { kTypeAscending, 0x03, 0x0454 }, + { kTypeLiteral, 0x01, 0x0407 }, + { kTypeAscending, 0x04, 0x0458 }, + { kTypeAscending, 0x03, 0x040c }, + { kTypeLiteral, 0x01, 0x045f }, + { kTypeAscending, 0x09, 0x0430 }, + { kTypeLiteral, 0x01, 0x0419 }, + { kTypeAscending, 0x16, 0x043a }, + { kTypeAscending, 0x30, 0x0430 }, + { kTypeLiteral, 0x02, 0x0461 }, + { kTypeLiteral, 0x02, 0x0463 }, + { kTypeLiteral, 0x02, 0x0465 }, + { kTypeLiteral, 0x02, 0x0467 }, + { kTypeLiteral, 0x02, 0x0469 }, + { kTypeLiteral, 0x02, 0x046b }, + { kTypeLiteral, 0x02, 0x046d }, + { kTypeLiteral, 0x02, 0x046f }, + { kTypeLiteral, 0x02, 0x0471 }, + { kTypeLiteral, 0x02, 0x0473 }, + { kTypeLiteral, 0x02, 0x0475 }, + { kTypeAscending, 0x02, 0x0476 }, + { kTypeLiteral, 0x02, 0x0479 }, + { kTypeLiteral, 0x02, 0x047b }, + { kTypeLiteral, 0x02, 0x047d }, + { kTypeLiteral, 0x02, 0x047f }, + { kTypeLiteral, 0x02, 0x0481 }, + { kTypeAscending, 0x0e, 0x0482 }, + { kTypeLiteral, 0x02, 0x0491 }, + { kTypeLiteral, 0x02, 0x0493 }, + { kTypeLiteral, 0x02, 0x0495 }, + { kTypeLiteral, 0x02, 0x0497 }, + { kTypeLiteral, 0x02, 0x0499 }, + { kTypeLiteral, 0x02, 0x049b }, + { kTypeLiteral, 0x02, 0x049d }, + { kTypeLiteral, 0x02, 0x049f }, + { kTypeLiteral, 0x02, 0x04a1 }, + { kTypeLiteral, 0x02, 0x04a3 }, + { kTypeLiteral, 0x02, 0x04a5 }, + { kTypeLiteral, 0x02, 0x04a7 }, + { kTypeLiteral, 0x02, 0x04a9 }, + { kTypeLiteral, 0x02, 0x04ab }, + { kTypeLiteral, 0x02, 0x04ad }, + { kTypeLiteral, 0x02, 0x04af }, + { kTypeLiteral, 0x02, 0x04b1 }, + { kTypeLiteral, 0x02, 0x04b3 }, + { kTypeLiteral, 0x02, 0x04b5 }, + { kTypeLiteral, 0x02, 0x04b7 }, + { kTypeLiteral, 0x02, 0x04b9 }, + { kTypeLiteral, 0x02, 0x04bb }, + { kTypeLiteral, 0x02, 0x04bd }, + { kTypeLiteral, 0x02, 0x04bf }, + { kTypeAscending, 0x03, 0x04c0 }, + { kTypeLiteral, 0x02, 0x04c4 }, + { kTypeAscending, 0x02, 0x04c5 }, + { kTypeLiteral, 0x02, 0x04c8 }, + { kTypeAscending, 0x02, 0x04c9 }, + { kTypeLiteral, 0x01, 0x04cc }, + { kTypeAscending, 0x34, 0x04cc }, + + /* Table 4 */ + { kTypeAscending, 0x31, 0x0500 }, + { kTypeAscending, 0x26, 0x0561 }, + { kTypeAscending, 0xa9, 0x0557 }, + + /* Table 5 */ + { kTypeAscending, 0xa0, 0x1000 }, + { kTypeAscending, 0x26, 0x10d0 }, + { kTypeAscending, 0x3a, 0x10c6 }, + + /* Table 6 */ + { kTypeAscending, 0x0c, 0x2000 }, + { kTypeLiteral, 0x04, 0x0000 }, + { kTypeAscending, 0x1a, 0x2010 }, + { kTypeLiteral, 0x05, 0x0000 }, + { kTypeAscending, 0x3b, 0x202f }, + { kTypeLiteral, 0x06, 0x0000 }, + { kTypeAscending, 0x90, 0x2070 }, + + /* Table 7 */ + { kTypeLiteral, 0x01, 0x2100 }, + { kTypeAscending, 0x5f, 0x2101 }, + { kTypeAscending, 0x10, 0x2170 }, + { kTypeAscending, 0x90, 0x2170 }, + + /* Table 8 */ + { kTypeAscending, 0xff, 0xfe00 }, + { kTypeLiteral, 0x01, 0x0000 }, + + /* Table 9 */ + { kTypeAscending, 0x21, 0xff00 }, + { kTypeAscending, 0x1a, 0xff41 }, + { kTypeAscending, 0xc5, 0xff3b } }; -// Please update count if you add/remove entries but also please just let -// the compiler calculate it so you don't get it wrong. -//#define kLowerCaseTableNBlocks 182 -#define kLowerCaseTableNBlocks (sizeof(gLowerCaseTableCompressed)/sizeof(*gLowerCaseTableCompressed)) -// WARNING: The expanded size MUST be updated if you change the table and -// cannot be calculated at compile time. -#define kLowerCaseTableDataSize 5632 /* size of uncompressed structure in bytes */ -unsigned short *gCompareTable; -struct compressed_block gCompareTableCompressed[] = { - {0x2, 0x60, 0x0}, - {0x0, 0x1, 0x4180}, - {0x2, 0x1a, 0x4100}, - {0x2, 0x5, 0x7b00}, - {0x0, 0x1, 0x4108}, - {0x0, 0x1, 0x410c}, - {0x0, 0x1, 0x4310}, - {0x0, 0x1, 0x4502}, - {0x0, 0x1, 0x4e0a}, - {0x0, 0x1, 0x4f08}, - {0x0, 0x1, 0x5508}, - {0x0, 0x1, 0x4182}, - {0x0, 0x1, 0x4104}, - {0x0, 0x1, 0x4186}, - {0x0, 0x1, 0x4108}, - {0x0, 0x1, 0x410a}, - {0x0, 0x1, 0x410c}, - {0x0, 0x1, 0x4310}, - {0x0, 0x1, 0x4502}, - {0x0, 0x1, 0x4584}, - {0x0, 0x1, 0x4586}, - {0x0, 0x1, 0x4588}, - {0x0, 0x1, 0x4982}, - {0x0, 0x1, 0x4984}, - {0x0, 0x1, 0x4986}, - {0x0, 0x1, 0x4988}, - {0x0, 0x1, 0x4e0a}, - {0x0, 0x1, 0x4f82}, - {0x0, 0x1, 0x4f84}, - {0x0, 0x1, 0x4f86}, - {0x0, 0x1, 0x4f08}, - {0x0, 0x1, 0x4f0a}, - {0x0, 0x1, 0x5582}, - {0x0, 0x1, 0x5584}, - {0x0, 0x1, 0x5586}, - {0x0, 0x1, 0x5508}, - {0x2, 0x7, 0xa000}, - {0x0, 0x1, 0x5382}, - {0x2, 0x6, 0xa800}, - {0x0, 0x1, 0x4114}, - {0x0, 0x1, 0x4f0e}, - {0x2, 0xb, 0xb000}, - {0x0, 0x1, 0x4192}, - {0x0, 0x1, 0x4f92}, - {0x0, 0x1, 0xbd00}, - {0x0, 0x1, 0x4114}, - {0x0, 0x1, 0x4f0e}, - {0x2, 0x7, 0xc000}, - {0x0, 0x1, 0x2206}, - {0x0, 0x1, 0x2208}, - {0x0, 0x1, 0xc900}, - {0x0, 0x1, 0x2000}, - {0x0, 0x1, 0x4104}, - {0x0, 0x1, 0x410a}, - {0x0, 0x1, 0x4f0a}, - {0x0, 0x2, 0x4f14}, - {0x2, 0x2, 0xd000}, - {0x0, 0x1, 0x2202}, - {0x0, 0x1, 0x2204}, - {0x0, 0x1, 0x2702}, - {0x0, 0x1, 0x2704}, - {0x2, 0x2, 0xd600}, - {0x0, 0x1, 0x5988}, - {0x2, 0x27, 0xd900}, +struct CompressedBlock gCompareTableCompressed[] = +{ + { kTypeAscending256, 0x60, 0x0000 }, + { kTypeLiteral, 0x01, 0x4180 }, + { kTypeAscending256, 0x1a, 0x4100 }, + { kTypeAscending256, 0x05, 0x7b00 }, + { kTypeLiteral, 0x01, 0x4108 }, + { kTypeLiteral, 0x01, 0x410c }, + { kTypeLiteral, 0x01, 0x4310 }, + { kTypeLiteral, 0x01, 0x4502 }, + { kTypeLiteral, 0x01, 0x4e0a }, + { kTypeLiteral, 0x01, 0x4f08 }, + { kTypeLiteral, 0x01, 0x5508 }, + { kTypeLiteral, 0x01, 0x4182 }, + { kTypeLiteral, 0x01, 0x4104 }, + { kTypeLiteral, 0x01, 0x4186 }, + { kTypeLiteral, 0x01, 0x4108 }, + { kTypeLiteral, 0x01, 0x410a }, + { kTypeLiteral, 0x01, 0x410c }, + { kTypeLiteral, 0x01, 0x4310 }, + { kTypeLiteral, 0x01, 0x4502 }, + { kTypeLiteral, 0x01, 0x4584 }, + { kTypeLiteral, 0x01, 0x4586 }, + { kTypeLiteral, 0x01, 0x4588 }, + { kTypeLiteral, 0x01, 0x4982 }, + { kTypeLiteral, 0x01, 0x4984 }, + { kTypeLiteral, 0x01, 0x4986 }, + { kTypeLiteral, 0x01, 0x4988 }, + { kTypeLiteral, 0x01, 0x4e0a }, + { kTypeLiteral, 0x01, 0x4f82 }, + { kTypeLiteral, 0x01, 0x4f84 }, + { kTypeLiteral, 0x01, 0x4f86 }, + { kTypeLiteral, 0x01, 0x4f08 }, + { kTypeLiteral, 0x01, 0x4f0a }, + { kTypeLiteral, 0x01, 0x5582 }, + { kTypeLiteral, 0x01, 0x5584 }, + { kTypeLiteral, 0x01, 0x5586 }, + { kTypeLiteral, 0x01, 0x5508 }, + { kTypeAscending256, 0x07, 0xa000 }, + { kTypeLiteral, 0x01, 0x5382 }, + { kTypeAscending256, 0x06, 0xa800 }, + { kTypeLiteral, 0x01, 0x4114 }, + { kTypeLiteral, 0x01, 0x4f0e }, + { kTypeAscending256, 0x0b, 0xb000 }, + { kTypeLiteral, 0x01, 0x4192 }, + { kTypeLiteral, 0x01, 0x4f92 }, + { kTypeLiteral, 0x01, 0xbd00 }, + { kTypeLiteral, 0x01, 0x4114 }, + { kTypeLiteral, 0x01, 0x4f0e }, + { kTypeAscending256, 0x07, 0xc000 }, + { kTypeLiteral, 0x01, 0x2206 }, + { kTypeLiteral, 0x01, 0x2208 }, + { kTypeLiteral, 0x01, 0xc900 }, + { kTypeLiteral, 0x01, 0x2000 }, + { kTypeLiteral, 0x01, 0x4104 }, + { kTypeLiteral, 0x01, 0x410a }, + { kTypeLiteral, 0x01, 0x4f0a }, + { kTypeLiteral, 0x02, 0x4f14 }, + { kTypeAscending256, 0x02, 0xd000 }, + { kTypeLiteral, 0x01, 0x2202 }, + { kTypeLiteral, 0x01, 0x2204 }, + { kTypeLiteral, 0x01, 0x2702 }, + { kTypeLiteral, 0x01, 0x2704 }, + { kTypeAscending256, 0x02, 0xd600 }, + { kTypeLiteral, 0x01, 0x5988 }, + { kTypeAscending256, 0x27, 0xd900 }, }; -// Please update count if you add/remove entries but also please just let -// the compiler calculate it so you don't get it wrong. -//#define kCompareTableNBlocks 64 -#define kCompareTableNBlocks (sizeof(gCompareTableCompressed)/sizeof(*gCompareTableCompressed)) -// WARNING: The expanded size MUST be updated if you change the table and -// cannot be calculated at compile time. -#define kCompareTableDataSize 512 /* size of uncompressed structure in bytes */ - -#endif /* UNCOMPRESSED */ + + +#define kLatinCaseFoldTableNBlocks (sizeof(gLatinCaseFoldTableCompressed) / sizeof(*gLatinCaseFoldTableCompressed)) +#define kLowerCaseTableNBlocks (sizeof(gLowerCaseTableCompressed) / sizeof(*gLowerCaseTableCompressed)) +#define kCompareTableNBlocks (sizeof(gCompareTableCompressed) / sizeof(*gCompareTableCompressed)) + +#define kLatinCaseFoldTableDataSize 256 +#define kLowerCaseTableDataSize 2816 +#define kCompareTableDataSize 256 + +#endif /* USE_UNCOMPRESSED_TABLES */ From b57fccf2cafefa1d90b1ba23678fe71edec43531 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 13:43:05 +0100 Subject: [PATCH 150/623] Overhaul of HFS table data --- i386/libsaio/hfs_compare.c | 376 ++++++++++++++++++------------------- 1 file changed, 182 insertions(+), 194 deletions(-) diff --git a/i386/libsaio/hfs_compare.c b/i386/libsaio/hfs_compare.c index 8b86b60..6b61cd6 100755 --- a/i386/libsaio/hfs_compare.c +++ b/i386/libsaio/hfs_compare.c @@ -7,7 +7,7 @@ * are subject to the Apple Public Source License Version 2.0 (the * "License"). You may not use this file except in compliance with the * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. + * http: *www.apple.com/publicsource and read it before using this file. * * This Original Code and all software distributed under the License are * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER @@ -18,91 +18,104 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ - */ -/* - * HFSCompare.c - Functions for working with and comparing HFS nams. * - * Copyright (c) 1999-2000 Apple Computer, Inc. + * HFSCompare.c - Functions for working with and comparing HFS nams. + * + * Copyright (c) 1999-2000 Apple Computer, Inc. + * + * DRI: Josh de Cesare + * + * Updates: + * - Latin is now a seperate table, done to make it faster (PikerAlpha, November 2012) + * - UNCOMPRESSED renamed to USE_UNCOMPRESSED_TABLES (PikerAlpha, November 2012) + * - Cleanups and other reformatting to pull it out of the 90's (PikerAlpha, November 2012) * - * DRI: Josh de Cesare */ #include <sl.h> #include "hfs_CaseTables.h" -#if ! UNCOMPRESSED + +#if USE_COMPRESSED_TABLES //============================================================================== -static unsigned short * UncompressStructure(struct compressed_block *bp, int count, int size) +static unsigned short * deCompressStructure(struct CompressedBlock *cb, int count, int size) { int i, j; unsigned short *out = malloc(size); - unsigned short *op = out; - unsigned short data; - for (i = 0; i < count; i++, bp++) + if (out) { - // If this happens (it shouldn't) please fix size and/or double check that count really is - // the number of elements in the array. - // This was a very hard bug to find, so please leave this code here. - if (out + size <= op + bp->count) - { - stop("HFS+ Unicode tables are malformed\n"); - } - - data = bp->data; + unsigned short *op = out; + unsigned short data; - for (j = 0; j <bp->count; j++) + for (i = 0; i < count; i++, cb++) { - *op++ = data; - - if (bp->type == kTypeAscending) + /* If this happens (it shouldn't) please fix size and/or double check that count really is + * the number of elements in the array. + * This was a very hard bug to find, so please leave this code here. + */ +#if DEBUG + if ((out + size) <= (op + cb->count)) { - data++; + stop("HFS+ Unicode tables are malformed\n"); } - else if (bp->type == kTypeAscending256) +#endif + data = cb->data; + + for (j = 0; j < cb->count; j++) { - data += 256; + *op++ = data; + + if (cb->type == kTypeAscending) // 1 + { + data++; + } + else if (cb->type == kTypeAscending256) // 2 + { + data += 256; + } } } + + return out; } - return out; + return NULL; } //============================================================================== -static void InitCompareTables(void) +static void deCompressHFSUnicodeTables(void) { if (gCompareTable == 0) { - gCompareTable = UncompressStructure(gCompareTableCompressed, kCompareTableNBlocks, kCompareTableDataSize); - gLowerCaseTable = UncompressStructure(gLowerCaseTableCompressed, kLowerCaseTableNBlocks, kLowerCaseTableDataSize); + gLatinCaseFoldTable = deCompressStructure(gLatinCaseFoldTableCompressed, kLatinCaseFoldTableNBlocks, kLatinCaseFoldTableDataSize); + gLowerCaseTable = deCompressStructure(gLowerCaseTableCompressed, kLowerCaseTableNBlocks, kLowerCaseTableDataSize); + gCompareTable = deCompressStructure(gCompareTableCompressed, kCompareTableNBlocks, kCompareTableDataSize); + } } -#endif /* ! UNCOMPRESSED */ +#endif /* ! USE_COMPRESSED_TABLES */ -//============================================================================== -// -// Routine: FastRelString -// -// Output: returns -1 if str1 < str2 -// returns 1 if str1 > str2 -// return 0 if equal -// -//============================================================================== + +/*============================================================================== + * + * Routine: FastRelString + * + * Output: returns -1 if str1 < str2 + * returns 1 if str1 > str2 + * return 0 if equal + * + */ int32_t FastRelString(u_int8_t * str1, u_int8_t * str2) { int32_t bestGuess; u_int8_t length, length2; -#if ! UNCOMPRESED - InitCompareTables(); -#endif - length = *(str1++); length2 = *(str2++); @@ -120,6 +133,12 @@ int32_t FastRelString(u_int8_t * str1, u_int8_t * str2) length = length2; } +#if USE_COMPRESSED_TABLES + deCompressHFSUnicodeTables(); +#endif + + // u_int16_t* compareTable = (u_int16_t*) gCompareTable; + while (length--) { u_int32_t aChar, bChar; @@ -127,7 +146,7 @@ int32_t FastRelString(u_int8_t * str1, u_int8_t * str2) aChar = *(str1++); bChar = *(str2++); - if (aChar != bChar) /* If they don't match exacly, do case conversion */ + if (aChar != bChar) /* If they don't match exacly, do case conversion */ { u_int16_t aSortWord, bSortWord; @@ -151,77 +170,78 @@ int32_t FastRelString(u_int8_t * str1, u_int8_t * str2) */ } - /* if you got to here, then return bestGuess */ + /* If you got to here, then return bestGuess */ return bestGuess; } -//============================================================================== -// -// FastUnicodeCompare - Compare two Unicode strings; produce a relative ordering -// -// IF RESULT -// -------------------------- -// str1 < str2 => -1 -// str1 = str2 => 0 -// str1 > str2 => +1 -// -// The lower case table starts with 256 entries (one for each of the upper bytes -// of the original Unicode char). If that entry is zero, then all characters with -// that upper byte are already case folded. If the entry is non-zero, then it is -// the _index_ (not byte offset) of the start of the sub-table for the characters -// with that upper byte. All ignorable characters are folded to the value zero. -// -// In pseudocode: -// -// Let c = source Unicode character -// Let table[] = lower case table -// -// lower = table[highbyte(c)] -// if (lower == 0) -// lower = c -// else -// lower = table[lower+lowbyte(c)] -// -// if (lower == 0) -// ignore this character -// -// To handle ignorable characters, we now need a loop to find the next valid character. -// Also, we can't pre-compute the number of characters to compare; the string length might -// be larger than the number of non-ignorable characters. Further, we must be able to handle -// ignorable characters at any point in the string, including as the first or last characters. -// We use a zero value as a sentinel to detect both end-of-string and ignorable characters. -// Since the File Manager doesn't prevent the NUL character (value zero) as part of a filename, -// the case mapping table is assumed to map u+0000 to some non-zero value (like 0xFFFF, which is -// an invalid Unicode character). -// -// Pseudocode: -// -// while (1) { -// c1 = GetNextValidChar(str1) // returns zero if at end of string -// c2 = GetNextValidChar(str2) -// -// if (c1 != c2) break // found a difference -// -// if (c1 == 0) // reached end of string on both strings at once? -// return 0; // yes, so strings are equal -// } -// -// // When we get here, c1 != c2. So, we just need to determine which one is less. -// if (c1 < c2) -// return -1; -// else -// return 1; -// - -int32_t FastUnicodeCompare(u_int16_t * str1, register u_int32_t length1, - u_int16_t * str2, register u_int32_t length2, int byte_order) +/*============================================================================== + * + * FastUnicodeCompare - Compare two Unicode strings; produce a relative ordering + * + * IF RESULT + * -------------------------- + * str1 < str2 => -1 + * str1 = str2 => 0 + * str1 > str2 => +1 + * + * The lower case table starts with 256 entries (one for each of the upper bytes + * of the original Unicode char). If that entry is zero, then all characters with + * that upper byte are already case folded. If the entry is non-zero, then it is + * the _index_ (not byte offset) of the start of the sub-table for the characters + * with that upper byte. All ignorable characters are folded to the value zero. + * + * In pseudocode: + * + * Let c = source Unicode character + * Let table[] = lower case table + * + * lower = table[highbyte(c)] + * if (lower == 0) + * lower = c + * else + * lower = table[lower+lowbyte(c)] + * + * if (lower == 0) + * ignore this character + * + * To handle ignorable characters, we now need a loop to find the next valid character. + * Also, we can't pre-compute the number of characters to compare; the string length might + * be larger than the number of non-ignorable characters. Further, we must be able to handle + * ignorable characters at any point in the string, including as the first or last characters. + * We use a zero value as a sentinel to detect both end-of-string and ignorable characters. + * Since the File Manager doesn't prevent the NUL character (value zero) as part of a filename, + * the case mapping table is assumed to map u+0000 to some non-zero value (like 0xFFFF, which is + * an invalid Unicode character). + * + * Pseudocode: + * + * while (1) { + * c1 = GetNextValidChar(str1) * returns zero if at end of string + * c2 = GetNextValidChar(str2) + * + * if (c1 != c2) break * found a difference + * + * if (c1 == 0) * reached end of string on both strings at once? + * return 0; * yes, so strings are equal + * } + * + * // When we get here, c1 != c2. So, we just need to determine which one is less. + * if (c1 < c2) + * return -1; + * else + * return 1; + */ + +int32_t FastUnicodeCompare(u_int16_t * str1, register u_int32_t length1, u_int16_t * str2, register u_int32_t length2) { register u_int16_t c1, c2; register u_int16_t temp; -#if ! UNCOMPRESSED - InitCompareTables(); + register UInt16 * lowerCaseTable = (UInt16*) gLowerCaseTable; + +#if USE_COMPRESSED_TABLES + deCompressHFSUnicodeTables(); #endif while (1) @@ -233,51 +253,50 @@ int32_t FastUnicodeCompare(u_int16_t * str1, register u_int32_t length1, /* Find next non-ignorable char from str1, or zero if no more */ while (length1 && c1 == 0) { - if (byte_order == OSBigEndian) - { - c1 = SWAP_BE16(*(str1++)); - } - else - { - c1 = SWAP_LE16(*(str1++)); - } - + c1 = SWAP_BE16(*(str1++)); --length1; - if ((temp = gLowerCaseTable[c1>>8]) != 0) // is there a subtable for this upper byte? + /* Check for basic latin first */ + if (c1 < 0x0100) + { + c1 = SWAP_BE16(gLatinCaseFoldTable[c1]); + break; + } + /* Case fold if neccessary */ + if ((temp = lowerCaseTable[c1 >> 8]) != 0) /* Is there a subtable for this upper byte? */ { - c1 = gLowerCaseTable[temp + (c1 & 0x00FF)]; // yes, so fold the char + c1 = lowerCaseTable[temp + (c1 & 0x00FF)]; /* Yes, so fold the char */ } } /* Find next non-ignorable char from str2, or zero if no more */ while (length2 && c2 == 0) { - if (byte_order == OSBigEndian) - { - c2 = SWAP_BE16(*(str2++)); - } - else + c2 = SWAP_BE16(*(str2++)); + --length2; + + /* Check for basic latin first */ + if (c2 < 0x0100) { - c2 = SWAP_LE16(*(str2++)); + c2 = SWAP_BE16(gLatinCaseFoldTable[c2]); + break; } - --length2; - - if ((temp = gLowerCaseTable[c2>>8]) != 0) // is there a subtable for this upper byte? + /* Case fold if neccessary */ + if ((temp = lowerCaseTable[c2 >> 8]) != 0) /* Is there a subtable for this upper byte? */ { - c2 = gLowerCaseTable[temp + (c2 & 0x00FF)]; // yes, so fold the char + c2 = lowerCaseTable[temp + (c2 & 0x00FF)]; /* Yes, so fold the char */ } } - if (c1 != c2) /* found a difference, so stop looping */ + if (c1 != c2) /* Found a difference, so stop looping */ { break; } - if (c1 == 0) /* did we reach the end of both strings at the same time? */ + if (c1 == 0) /* Did we reach the end of both strings at the same time? */ { - return 0; /* yes, so strings are equal */ + return 0; /* Yes, so strings are equal */ } } @@ -290,10 +309,10 @@ int32_t FastUnicodeCompare(u_int16_t * str1, register u_int32_t length1, } -//============================================================================== -// -// BinaryUnicodeCompare - Compare two Unicode strings; produce a relative ordering -// Compared using a 16-bit binary comparison (no case folding) +/*============================================================================== + * BinaryUnicodeCompare - Compare two Unicode strings; produce a relative ordering + * Compared using a 16-bit binary comparison (no case folding) + */ int32_t BinaryUnicodeCompare(u_int16_t * str1, u_int32_t length1, u_int16_t * str2, u_int32_t length2) { @@ -327,7 +346,7 @@ int32_t BinaryUnicodeCompare(u_int16_t * str1, u_int32_t length1, u_int16_t * st } if (c1 < c2) - { + { return (-1); } } @@ -336,14 +355,14 @@ int32_t BinaryUnicodeCompare(u_int16_t * str1, u_int32_t length1, u_int16_t * st } -/* +/*============================================================================== * UTF-8 (UCS Transformation Format) * * The following subset of UTF-8 is used to encode UCS-2 filenames. It * requires a maximum of three 3 bytes per UCS-2 character. Only the * shortest encoding required to represent the significant UCS-2 bits * is legal. - * + * * UTF-8 Multibyte Codes * * Bytes Bits UCS-2 Min UCS-2 Max UTF-8 Byte Sequence (binary) @@ -355,7 +374,7 @@ int32_t BinaryUnicodeCompare(u_int16_t * str1, u_int32_t length1, u_int16_t * st */ -/* +/*============================================================================== * utf_encodestr - Encodes the UCS-2 (Unicode) string at ucsp into a * null terminated UTF-8 string at utf8p. * @@ -363,7 +382,7 @@ int32_t BinaryUnicodeCompare(u_int16_t * str1, u_int32_t length1, u_int16_t * st * bufsize is the size of the output buffer in bytes */ -void utf_encodestr(const u_int16_t * ucsp, int ucslen, u_int8_t * utf8p, u_int32_t bufsize, int byte_order) +void utf_encodestr(const u_int16_t * ucsp, int ucslen, u_int8_t * utf8p, u_int32_t bufsize) { u_int8_t *bufend; u_int16_t ucs_ch; @@ -372,14 +391,7 @@ void utf_encodestr(const u_int16_t * ucsp, int ucslen, u_int8_t * utf8p, u_int32 while (ucslen-- > 0) { - if (byte_order == OSBigEndian) - { - ucs_ch = SWAP_BE16(*ucsp++); - } - else - { - ucs_ch = SWAP_LE16(*ucsp++); - } + ucs_ch = SWAP_BE16(*ucsp++); if (ucs_ch < 0x0080) { @@ -390,7 +402,7 @@ void utf_encodestr(const u_int16_t * ucsp, int ucslen, u_int8_t * utf8p, u_int32 if (ucs_ch == '\0') { - continue; /* skip over embedded NULLs */ + continue; /* Skip over embedded NULLs */ } *utf8p++ = ucs_ch; @@ -403,8 +415,8 @@ void utf_encodestr(const u_int16_t * ucsp, int ucslen, u_int8_t * utf8p, u_int32 break; } - *utf8p++ = (ucs_ch >> 6) | 0xc0; - *utf8p++ = (ucs_ch & 0x3f) | 0x80; + *utf8p++ = ((ucs_ch >> 6) | 0xc0); + *utf8p++ = ((ucs_ch & 0x3f) | 0x80); } else { @@ -413,9 +425,9 @@ void utf_encodestr(const u_int16_t * ucsp, int ucslen, u_int8_t * utf8p, u_int32 break; } - *utf8p++ = (ucs_ch >> 12) | 0xe0; - *utf8p++ = ((ucs_ch >> 6) & 0x3f) | 0x80; - *utf8p++ = ((ucs_ch) & 0x3f) | 0x80; + *utf8p++ = ((ucs_ch >> 12) | 0xe0); + *utf8p++ = (((ucs_ch >> 6) & 0x3f) | 0x80); + *utf8p++ = ((ucs_ch & 0x3f) | 0x80); } } @@ -423,7 +435,7 @@ void utf_encodestr(const u_int16_t * ucsp, int ucslen, u_int8_t * utf8p, u_int32 } -/* +/*============================================================================== * utf_decodestr - Decodes the null terminated UTF-8 string at * utf8p into a UCS-2 (Unicode) string at ucsp. * @@ -431,7 +443,7 @@ void utf_encodestr(const u_int16_t * ucsp, int ucslen, u_int8_t * utf8p, u_int32 * bufsize is the size of the output buffer in bytes */ -void utf_decodestr(const u_int8_t * utf8p, u_int16_t * ucsp, u_int16_t * ucslen, u_int32_t bufsize, int byte_order) +void utf_decodestr(const u_int8_t * utf8p, u_int16_t * ucsp, u_int16_t * ucslen, u_int32_t bufsize) { u_int16_t *bufstart; u_int16_t *bufend; @@ -448,36 +460,27 @@ void utf_decodestr(const u_int8_t * utf8p, u_int16_t * ucsp, u_int16_t * ucslen, break; } - /* check for ascii */ + /* Check for ASCII */ if (byte < 0x80) { ucs_ch = byte; - - if (byte_order == OSBigEndian) - { - *ucsp++ = SWAP_BE16(ucs_ch); - } - else - { - *ucsp++ = SWAP_LE16(ucs_ch); - } - + *ucsp++ = SWAP_BE16(ucs_ch); continue; } switch (byte & 0xf0) { - /* 2 byte sequence*/ + /* 2 byte sequence */ case 0xc0: - case 0xd0: /* extract bits 6 - 10 from first byte */ - ucs_ch = (byte & 0x1F) << 6; + case 0xd0: /* Extract bits 6 - 10 from first byte */ + ucs_ch = ((byte & 0x1F) << 6); break; - /* 3 byte sequence*/ + /* 3 byte sequence */ case 0xe0: - /* extract bits 12 - 15 from first byte */ - ucs_ch = (byte & 0x0F) << 6; + /* Extract bits 12 - 15 from first byte */ + ucs_ch = ((byte & 0x0F) << 6); - /* extract bits 6 - 11 from second byte */ + /* Extract bits 6 - 11 from second byte */ if (((byte = *utf8p++) & 0xc0) != 0x80) { goto stop; @@ -490,31 +493,16 @@ void utf_decodestr(const u_int8_t * utf8p, u_int16_t * ucsp, u_int16_t * ucslen, goto stop; } - /* extract bits 0 - 5 from final byte */ + /* Extract bits 0 - 5 from final byte */ if (((byte = *utf8p++) & 0xc0) != 0x80) { goto stop; } ucs_ch += (byte & 0x3F); - - if (byte_order == OSBigEndian) - { - *ucsp++ = SWAP_BE16(ucs_ch); - } - else - { - *ucsp++ = SWAP_LE16(ucs_ch); - } + *ucsp++ = SWAP_BE16(ucs_ch); } stop: - if (byte_order == OSBigEndian) - { - *ucslen = SWAP_BE16(ucsp - bufstart); - } - else - { - *ucslen = SWAP_LE16(ucsp - bufstart); - } + *ucslen = SWAP_BE16(ucsp - bufstart); } From bbf0dfbc59fe5e99ac539b72223462859c621709 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 13:45:22 +0100 Subject: [PATCH 151/623] White space changes --- i386/libsaio/load.c | 168 ++++++++++++++++++++++---------------------- 1 file changed, 85 insertions(+), 83 deletions(-) diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index 2b89f0e..d727f3c 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -18,11 +18,13 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ - */ -/* - * load.c - Functions for decoding a Mach-o Kernel. * - * Copyright (c) 1998-2003 Apple Computer, Inc. + * load.c - Functions for decoding a Mach-o Kernel. + * + * Copyright (c) 1998-2003 Apple Computer, Inc. + * + * Updates: + * - White space changes (PikerAlpha, November 2012) * */ @@ -64,7 +66,7 @@ long ThinFatFile(void **binary, unsigned long *length) cpu_type_t fapcputype; uint32_t fapoffset; uint32_t fapsize; - + if (fhp->magic == FAT_MAGIC) { nfat = fhp->nfat_arch; @@ -94,7 +96,7 @@ long ThinFatFile(void **binary, unsigned long *length) fapoffset = fap->offset; fapsize = fap->size; } - + if (fapcputype == gArchCPUType) { *binary = (void *) ((unsigned long)*binary + fapoffset); @@ -102,7 +104,7 @@ long ThinFatFile(void **binary, unsigned long *length) break; } } - + if (length != 0) { *length = size; @@ -124,7 +126,7 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) unsigned long cnt; long ret = -1; unsigned int entry = 0; - + gBinaryAddress = (unsigned long)binary; mH = (struct mach_header *)(gBinaryAddress); @@ -143,7 +145,7 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) (gArchCPUType == CPU_TYPE_X86_64 && mH->magic != MH_MAGIC_64)) { error("Mach-O file has bad magic number\n"); - return -1; + return -1; } */ switch (gArchCPUType) @@ -181,74 +183,75 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) return -1; } - /* cmdstart = (unsigned long)gBinaryAddress + (gArchCPUType == CPU_TYPE_I386) ? sizeof(struct mach_header) : + /* cmdstart = (unsigned long)gBinaryAddress + (gArchCPUType == CPU_TYPE_I386) ? sizeof(struct mach_header) : sizeof(struct mach_header_64); */ - cmdBase = cmdstart; - ncmds = mH->ncmds; - - for (cnt = 0; cnt < ncmds; cnt++) - { - cmd = ((long *)cmdBase)[0]; - cmdsize = ((long *)cmdBase)[1]; - unsigned int load_addr; - unsigned int load_size; - - switch (cmd) - { - case LC_SEGMENT_64: - case LC_SEGMENT: - - ret = DecodeSegment(cmdBase, &load_addr, &load_size); - - if (ret == 0 && load_size != 0 && load_addr >= KERNEL_ADDR) - { - vmaddr = min(vmaddr, load_addr); - vmend = max(vmend, load_addr + load_size); - } - break; - - case LC_MAIN: /* Mountain Lion's replacement for LC_UNIXTHREAD */ - case LC_UNIXTHREAD: - ret = DecodeUnixThread(cmdBase, &entry); - break; - - case LC_SYMTAB: - break; - - default: + cmdBase = cmdstart; + ncmds = mH->ncmds; + + for (cnt = 0; cnt < ncmds; cnt++) + { + cmd = ((long *)cmdBase)[0]; + cmdsize = ((long *)cmdBase)[1]; + unsigned int load_addr; + unsigned int load_size; + + switch (cmd) + { + case LC_SEGMENT_64: + case LC_SEGMENT: + ret = DecodeSegment(cmdBase, &load_addr, &load_size); + + if (ret == 0 && load_size != 0 && load_addr >= KERNEL_ADDR) + { + vmaddr = min(vmaddr, load_addr); + vmend = max(vmend, load_addr + load_size); + } + break; + + case LC_MAIN: /* Mountain Lion's replacement for LC_UNIXTHREAD */ + case LC_UNIXTHREAD: + ret = DecodeUnixThread(cmdBase, &entry); + break; + + case LC_SYMTAB: + break; + + default: #if NOTDEF - printf("Ignoring cmd type %d.\n", (unsigned)cmd); + printf("Ignoring cmd type %d.\n", (unsigned)cmd); #endif - break; - } - - if (ret != 0) - return -1; - - cmdBase += cmdsize; - } - - *rentry = (entry_t)( (unsigned long) entry & 0x3fffffff ); - *rsize = vmend - vmaddr; - *raddr = (char *)vmaddr; - - cmdBase = cmdstart; - - for (cnt = 0; cnt < ncmds; cnt++) - { - cmd = ((long *)cmdBase)[0]; - cmdsize = ((long *)cmdBase)[1]; + break; + } + + if (ret != 0) + { + return -1; + } + + cmdBase += cmdsize; + } + + *rentry = (entry_t)( (unsigned long) entry & 0x3fffffff ); + *rsize = vmend - vmaddr; + *raddr = (char *)vmaddr; + + cmdBase = cmdstart; + + for (cnt = 0; cnt < ncmds; cnt++) + { + cmd = ((long *)cmdBase)[0]; + cmdsize = ((long *)cmdBase)[1]; - if (cmd == LC_SYMTAB) - { + if (cmd == LC_SYMTAB) + { if (DecodeSymbolTable(cmdBase) != 0) { return -1; } - } - + } + cmdBase += cmdsize; - } + } return ret; } @@ -263,7 +266,7 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l char *segname; long vmsize, filesize; unsigned long vmaddr, fileaddr; - + if (((long *)cmdBase)[0] == LC_SEGMENT_64) { struct segment_command_64 *segCmd = (struct segment_command_64 *)cmdBase; @@ -284,7 +287,7 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l filesize = segCmd->filesize; segname = segCmd->segname; } - + // Pre-flight checks. if (vmsize && filesize) { @@ -322,13 +325,13 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l // Make boot() skip kernel / MKext(s) loading. gLoadKernelDrivers = false; } - + // Copy from file load area. if (filesize > 0) { bcopy((char *)fileaddr, (char *)vmaddr, vmsize > filesize ? filesize : vmsize); } - + // Zero space at the end of the segment. if (vmsize > filesize) { @@ -343,7 +346,7 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l *load_addr = ~0; *load_size = 0; } - + return 0; } @@ -359,7 +362,7 @@ static long DecodeUnixThread(long cmdBase, unsigned int *entry) { i386_thread_state_t *i386ThreadState; i386ThreadState = (i386_thread_state_t *) (cmdBase + sizeof(struct thread_command) + 8); - + #if defined(__DARWIN_UNIX03) && __DARWIN_UNIX03 *entry = i386ThreadState->__eip; #else @@ -398,33 +401,32 @@ static long DecodeSymbolTable(long cmdBase) long gSymbolTableSize; struct symtab_command *symTab, *symTableSave; - + symTab = (struct symtab_command *)cmdBase; - + #if DEBUG - printf("symoff: %x, nsyms: %x, stroff: %x, strsize: %x\n", - symTab->symoff, symTab->nsyms, symTab->stroff, symTab->strsize); + printf("symoff: %x, nsyms: %x, stroff: %x, strsize: %x\n", symTab->symoff, symTab->nsyms, symTab->stroff, symTab->strsize); getchar(); #endif - + symsSize = symTab->stroff - symTab->symoff; totalSize = symsSize + symTab->strsize; - + gSymbolTableSize = totalSize + sizeof(struct symtab_command); gSymbolTableAddr = AllocateKernelMemory(gSymbolTableSize); // Add the SymTab to the memory-map. AllocateMemoryRange("Kernel-__SYMTAB", gSymbolTableAddr, gSymbolTableSize, -1); - + symTableSave = (struct symtab_command *)gSymbolTableAddr; tmpAddr = gSymbolTableAddr + sizeof(struct symtab_command); - + symTableSave->symoff = tmpAddr; symTableSave->nsyms = symTab->nsyms; symTableSave->stroff = tmpAddr + symsSize; symTableSave->strsize = symTab->strsize; bcopy((char *)(gBinaryAddress + symTab->symoff), (char *)tmpAddr, totalSize); - + return 0; } From d9983db8d34f2092a866062a6fbae37143dee724 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 13:47:52 +0100 Subject: [PATCH 152/623] Cleanups and changes for hfs_compare.c --- i386/libsaio/saio_internal.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/i386/libsaio/saio_internal.h b/i386/libsaio/saio_internal.h index 1bc2fa0..518887c 100755 --- a/i386/libsaio/saio_internal.h +++ b/i386/libsaio/saio_internal.h @@ -23,8 +23,8 @@ * * Updates: * - * - loadBinaryData(load.c) and toLowerCase(string.c) added (PikerAlpha, October 2012). - * - Tidied up (spaces -> tabs) (PikerAlpha, October 2012). + * - loadBinaryData(load.c) and toLowerCase(string.c) added (PikerAlpha, October 2012). + * - Tidied up (spaces -> tabs) (PikerAlpha, October 2012). * */ @@ -116,9 +116,9 @@ extern int testFAT32EFIBootSector(int biosdev, unsigned int secno, void * buffe /* hfs_compare.c */ -extern int32_t FastUnicodeCompare(u_int16_t *uniStr1, u_int32_t len1, u_int16_t *uniStr2, u_int32_t len2, int byte_order); -extern void utf_encodestr(const u_int16_t * ucsp, int ucslen, u_int8_t * utf8p, u_int32_t bufsize, int byte_order); -extern void utf_decodestr(const u_int8_t *utf8p, u_int16_t *ucsp, u_int16_t *ucslen, u_int32_t bufsize, int byte_order); +extern int32_t FastUnicodeCompare(u_int16_t *uniStr1, u_int32_t len1, u_int16_t *uniStr2, u_int32_t len2); +extern void utf_encodestr(const u_int16_t * ucsp, int ucslen, u_int8_t * utf8p, u_int32_t bufsize); +extern void utf_decodestr(const u_int8_t *utf8p, u_int16_t *ucsp, u_int16_t *ucslen, u_int32_t bufsize); /* load.c */ @@ -148,7 +148,6 @@ extern int loadConfigFile(const char *configFile, config_file_t *configBuff); extern int loadSystemConfig(config_file_t *configBuff); extern int loadHelperConfig(config_file_t *configBuff); extern int loadOverrideConfig(config_file_t *configBuff); -extern char * newString(const char *oldString); extern char * getNextArg(char ** ptr, char * val); extern long ParseXMLFile(char * buffer, TagPtr * dict); @@ -165,7 +164,7 @@ extern long GetFileBlock(const char *fileSpec, unsigned long long *firstBlock); extern long GetFSUUID(char *spec, char *uuidStr); extern long CreateUUIDString(uint8_t uubytes[], int nbytes, char *uuidStr); extern int openmem(char *buf, int len); -extern int open(const char *str, int how); +extern int open(const char *str, int flags); extern int close(int fdesc); extern int file_size(int fdesc); extern int read(int fdesc, char *buf, int count); From 378c6a6f0951c5fad9104cafa4769847c8829a53 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 13:51:03 +0100 Subject: [PATCH 153/623] Unused Little Endian macro's removed --- i386/libsaio/sl.h | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/i386/libsaio/sl.h b/i386/libsaio/sl.h index ac5e7d1..2706a24 100755 --- a/i386/libsaio/sl.h +++ b/i386/libsaio/sl.h @@ -20,6 +20,11 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ + * + * Updates: + * - White space changes (PikerAlpha, November 2012) + * - Unused Little Endian macro's removed (PikerAlpha, November 2012) + * */ #ifndef __LIBSAIO_SL_H @@ -31,35 +36,32 @@ #include "libsaio.h" #define SWAP_BE16(x) OSSwapBigToHostInt16(x) -#define SWAP_LE16(x) OSSwapLittleToHostInt16(x) #define SWAP_BE32(x) OSSwapBigToHostInt32(x) -#define SWAP_LE32(x) OSSwapLittleToHostInt32(x) #define SWAP_BE64(x) OSSwapBigToHostInt64(x) -#define SWAP_LE64(x) OSSwapLittleToHostInt64(x) // File Permissions and Types enum { - kPermOtherExecute = 1 << 0, - kPermOtherWrite = 1 << 1, - kPermOtherRead = 1 << 2, - kPermGroupExecute = 1 << 3, - kPermGroupWrite = 1 << 4, - kPermGroupRead = 1 << 5, - kPermOwnerExecute = 1 << 6, - kPermOwnerWrite = 1 << 7, - kPermOwnerRead = 1 << 8, - kPermMask = 0x1FF, - kOwnerNotRoot = 1 << 9, - kFileTypeUnknown = 0x0 << 16, - kFileTypeFlat = 0x1 << 16, - kFileTypeDirectory = 0x2 << 16, - kFileTypeLink = 0x3 << 16, - kFileTypeMask = 0x3 << 16 + kPermOtherExecute = 1 << 0, + kPermOtherWrite = 1 << 1, + kPermOtherRead = 1 << 2, + kPermGroupExecute = 1 << 3, + kPermGroupWrite = 1 << 4, + kPermGroupRead = 1 << 5, + kPermOwnerExecute = 1 << 6, + kPermOwnerWrite = 1 << 7, + kPermOwnerRead = 1 << 8, + kPermMask = 0x1FF, + kOwnerNotRoot = 1 << 9, + kFileTypeUnknown = 0x0 << 16, + kFileTypeFlat = 0x1 << 16, + kFileTypeDirectory = 0x2 << 16, + kFileTypeLink = 0x3 << 16, + kFileTypeMask = 0x3 << 16 }; -#define Seek(c, p) diskSeek(c, p); -#define Read(c, a, l) diskRead(c, a, l); +#define Seek(c, p) diskSeek(c, p); +#define Read(c, a, l) diskRead(c, a, l); extern void * gFSLoadAddress; From 2cd4823ee86086647b2ad161efa94fd59e901ebb Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 13:54:24 +0100 Subject: [PATCH 154/623] Check malloc returns --- i386/libsaio/stringTable.c | 297 ++++++++++++++++++++----------------- 1 file changed, 159 insertions(+), 138 deletions(-) diff --git a/i386/libsaio/stringTable.c b/i386/libsaio/stringTable.c index 73e55e0..d74585e 100755 --- a/i386/libsaio/stringTable.c +++ b/i386/libsaio/stringTable.c @@ -22,6 +22,11 @@ * @APPLE_LICENSE_HEADER_END@ * * Copyright 1993 NeXT, Inc. All rights reserved. + * + * Updates: + * - White space changes (PikerAlpha, November 2012) + * - Check malloc returns (PikerAlpha, November 2012) + * */ #include "bootstruct.h" @@ -29,17 +34,14 @@ #include "xml.h" #include "stdbool.h" -extern char *Language; -extern char *LoadableFamilies; - -int sysConfigValid; +#define DEBUG_XML_PARSER 0 //============================================================================== static inline int isspace(char c) { - return (c == ' ' || c == '\t'); + return (c == ' ' || c == '\t'); } @@ -47,25 +49,29 @@ static inline int isspace(char c) bool getValueForConfigTableKey(config_file_t *config, const char *key, const char **val, int *size) { - if (config->dictionary != 0) - { - // Look up key in XML dictionary - TagPtr value; - value = XMLGetProperty(config->dictionary, key); - - if (value != 0) - { - if (value->type != kTagTypeString) - { - error("Non-string tag '%s' found in config file\n", key); - return false; - } - *val = value->string; - *size = strlen(value->string); - return true; - } - } - // else {} for legacy plist-style table, which is not implemented! + if (config->dictionary != 0) + { + // Look up key in XML dictionary + TagPtr value; + value = XMLGetProperty(config->dictionary, key); + + if (value != 0) + { + if (value->type != kTagTypeString) + { +#if DEBUG_XML_PARSER + error("Non-string tag '%s' found in config file\n", key); +#endif + + return false; + } + *val = value->string; + *size = strlen(value->string); + + return true; + } + } + // else {} for legacy plist-style table, which is not implemented! return false; } @@ -75,26 +81,22 @@ bool getValueForConfigTableKey(config_file_t *config, const char *key, const cha char * newStringForKey(char *key, config_file_t *config) { - const char *val; - char *newstr; - int size; - - if (getValueForKey(key, &val, &size, config) && size) - { - newstr = (char *)malloc(size + 1); - strlcpy(newstr, val, size + 1); - return newstr; - } - - return 0; + const char *val; + int size; + + if (getValueForKey(key, &val, &size, config) && size) + { + return strdup(val); // string.c + } + + return 0; } //============================================================================== -/* parse a command line - * in the form: [<argument> ...] [<option>=<value> ...] - * both <option> and <value> must be either composed of - * non-whitespace characters, or enclosed in quotes. +/* parse command line in the form: [<argument> ...] [<option>=<value> ...] + * both <option> and <value> must be either composed of non-whitespace + * characters, or enclosed in quotes. */ static const char *getToken(const char *line, const char **begin, int *len) @@ -135,7 +137,6 @@ bool getValueForBootKey(const char *line, const char *target, const char **match int key_len, value_len; int targetLength = strlen(target); - while (*line) { // Check for keyword or argument. @@ -178,24 +179,24 @@ bool getValueForBootKey(const char *line, const char *target, const char **match bool getBoolForKey(const char *key, bool *result_val, config_file_t *config) { - const char *key_val; - int size; - - if (getValueForKey(key, &key_val, &size, config)) - { - if ((size >= 1) && (key_val[0] == 'Y' || key_val[0] == 'y')) + const char *key_val; + int size; + + if (getValueForKey(key, &key_val, &size, config)) + { + if ((size >= 1) && (key_val[0] == 'Y' || key_val[0] == 'y')) { - *result_val = true; + *result_val = true; } - else + else { - *result_val = false; + *result_val = false; } - return true; // Key found. - } + return true; // Key found. + } - return false; // Key not found. + return false; // Key not found. } @@ -203,11 +204,11 @@ bool getBoolForKey(const char *key, bool *result_val, config_file_t *config) bool getIntForKey(const char *key, int *value, config_file_t *config) { - const char *val; - int size, sum; - bool negative = false; - - if (getValueForKey(key, &val, &size, config)) + const char *val; + int size, sum; + bool negative = false; + + if (getValueForKey(key, &val, &size, config)) { if (size) { @@ -239,74 +240,101 @@ bool getIntForKey(const char *key, int *value, config_file_t *config) } } - return false; // Key not found + return false; // Key not found } //============================================================================== bool getValueForKey(const char *key, const char **val, int *size, config_file_t *config) -{ - if (getValueForBootKey(bootArgs->CommandLine, key, val, size)) +{ + if (getValueForBootKey(bootArgs->CommandLine, key, val, size)) { - return true; + return true; } - bool ret = getValueForConfigTableKey(config, key, val, size); + bool ret = getValueForConfigTableKey(config, key, val, size); - return ret; + return ret; } -//============================================================================== -// ParseXMLFile modifies the input buffer and expects one dictionary in the -// XML file. Puts the first dictionary it finds in the tag pointer and -// returns 0, or -1 if not found (and does not modify the dict pointer). -// Prints an error message if there is a parsing error. +/*============================================================================== + * ParseXMLFile modifies the input buffer and expects one dictionary in the + * XML file. Puts the first dictionary it finds in the tag pointer and returns + * the length on success or 0 on error, in which case it will not modify the + * dictionary pointer). + */ -long ParseXMLFile(char * buffer, TagPtr * dict) +long ParseXMLFile(char * buffer, TagPtr * dictionaryPtr) { - long length; + long length = -1; long pos = 0; - TagPtr tag; - char *configBuffer; - - configBuffer = malloc(strlen(buffer)+1); - strcpy(configBuffer, buffer); - - while (1) - { - length = XMLParseNextTag(configBuffer + pos, &tag); - - if (length == -1) - break; - - pos += length; - - if (tag == 0) - { - continue; - } + TagPtr tag; + char *configBuffer = NULL; - if (tag->type == kTagTypeDict) + if (buffer) + { + configBuffer = malloc(strlen(buffer) + 1); + + if (configBuffer) { - break; - } - - XMLFreeTag(tag); - } + strcpy(configBuffer, buffer); - free(configBuffer); + while (1) + { + length = XMLParseNextTag(configBuffer + pos, &tag); - if (length < 0) - { - error ("Error parsing plist file\n"); - return -1; - } + if (length == -1) + { + break; + } - *dict = tag; + pos += length; + + if (tag == 0) + { + continue; + } + + if (tag->type == kTagTypeDict) + { + break; + } - return 0; + XMLFreeTag(tag); + } + + free(configBuffer); + + if (length) + { + *dictionaryPtr = tag; + + return length; + } +#if DEBUG_XML_PARSER + else + { + error ("ParseXMLFile: Error parsing plist file\n"); + } +#endif + } +#if DEBUG_XML_PARSER + else + { + error ("ParseXMLFile: configBuffer == NULL\n"); + } +#endif + } +#if DEBUG_XML_PARSER + else + { + error ("ParseXMLFile: buffer == NULL\n"); + } +#endif + + return 0; } @@ -316,20 +344,19 @@ long ParseXMLFile(char * buffer, TagPtr * dict) int loadSystemConfig(config_file_t *config) { - char *path = malloc(80); // Long enough for the longest (default) path. - static char * dirspec[] = { - + static char * dirspec[] = + { #if LION_RECOVERY_SUPPORT "com.apple.recovery.boot", #endif - + #if LION_INSTALL_SUPPORT ".IABootFiles", "OS X Install Data", "Mac OS X Install Data", #endif "Library/Preferences/SystemConfiguration" // The default. - + #if APPLE_RAID_SUPPORT /* * This is a temporarily change to test RAID support, but it @@ -341,40 +368,34 @@ int loadSystemConfig(config_file_t *config) "com.apple.boot.S/Library/Preferences/SystemConfiguration" #endif }; - - int i, fd; - - for (i = 0; i < sizeof(dirspec) / sizeof(dirspec[0]); i++) + + char *path = (char *)malloc(80); // Long enough for the longest (default) path. + + if (path) { - sprintf(path, "/%s/%s", dirspec[i], "com.apple.Boot.plist"); - - if ((fd = open(path, 0)) >= 0) + int i = 0; + int fd = 0; + int len = (sizeof(dirspec) / sizeof(dirspec[0])); + + for (; i < len; i++) { - // IO_CONFIG_DATA_SIZE is defined as 4096 in bios.h and which should - // be sufficient enough for RevoBoot (size was 4K for years already). - read(fd, config->plist, IO_CONFIG_DATA_SIZE); - close(fd); - - // Build XML dictionary. - ParseXMLFile(config->plist, &config->dictionary); - - return 0; - } - } - - return -1; -} + sprintf(path, "/%s/%s", dirspec[i], "com.apple.Boot.plist"); + if ((fd = open(path, 0)) >= 0) + { + // IO_CONFIG_DATA_SIZE is defined as 4096 in bios.h and which should + // be sufficient enough for RevoBoot (size was 4K for years already). + read(fd, config->plist, IO_CONFIG_DATA_SIZE); + close(fd); -//============================================================================== + // Build XML dictionary. + ParseXMLFile(config->plist, &config->dictionary); -char * newString(const char * oldString) -{ - if (oldString) - { - return strcpy(malloc(strlen(oldString) + 1), oldString); + free (path); + return 0; + } + } } - return NULL; + return -1; } - From 3dcdd2980a21abbcbfadc11f402abfe0731fece7 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 13:57:43 +0100 Subject: [PATCH 155/623] Cleanups, white space and layout changes --- i386/libsaio/sys.c | 396 ++++++++++++++++++++++----------------------- 1 file changed, 197 insertions(+), 199 deletions(-) diff --git a/i386/libsaio/sys.c b/i386/libsaio/sys.c index df9e03c..ff60af6 100755 --- a/i386/libsaio/sys.c +++ b/i386/libsaio/sys.c @@ -44,18 +44,17 @@ * where everything is defaulted * Add routine, ptol(), to parse partition letters. * - */ - -/* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * * @(#)sys.c 7.1 (Berkeley) 6/5/86 - */ - -/* Copyright 2007 VMware Inc. - "Preboot" ramdisk support added by David Elliott + * + * Copyright 2007 VMware Inc. "Preboot" ramdisk support added by David Elliott + * + * Updates: + * - Cleanups, white space and layout changes (PikerAlpha, November2012) + * */ #include <AvailabilityMacros.h> @@ -73,19 +72,19 @@ UUID_DEFINE( kFSUUIDNamespaceSHA1, 0xB3, 0xE2, 0x0F, 0x39, 0xF2, 0x92, 0x11, 0xD struct devsw { - const char * name; - // size increased from char to short to handle non-BIOS internal devices - unsigned short biosdev; - int type; + const char * name; + // size increased from char to short to handle non-BIOS internal devices + unsigned short biosdev; + int type; }; static struct devsw devsw[] = { - { "sd", 0x80, kBIOSDevTypeHardDrive }, /* DEV_SD */ - { "hd", 0x80, kBIOSDevTypeHardDrive }, /* DEV_HD */ - { "rd", 0x100, kBIOSDevTypeHardDrive }, - { "bt", 0x101, kBIOSDevTypeHardDrive }, // turbo - type for booter partition - { 0, 0 } + { "sd", 0x80, kBIOSDevTypeHardDrive }, /* DEV_SD */ + { "hd", 0x80, kBIOSDevTypeHardDrive }, /* DEV_HD */ + { "rd", 0x100, kBIOSDevTypeHardDrive }, + { "bt", 0x101, kBIOSDevTypeHardDrive }, // turbo - type for booter partition + { 0, 0 } }; /* @@ -111,36 +110,36 @@ static BVRef newBootVolumeRef( int biosdev, int partno ); //============================================================================== // LoadVolumeFile - LOW-LEVEL FILESYSTEM FUNCTION. -// Load the specified file from the specified volume -// to the load buffer at LOAD_ADDR. -// If the file is fat, load only the i386 portion. +// Load the specified file from the specified volume +// to the load buffer at LOAD_ADDR. +// If the file is fat, load only the i386 portion. long LoadVolumeFile(BVRef bvr, const char *filePath) { - long fileSize; + long fileSize; - // Read file into load buffer. The data in the load buffer will be - // overwritten by the next LoadFile() call. + // Read file into load buffer. The data in the load buffer will be + // overwritten by the next LoadFile() call. - gFSLoadAddress = (void *) LOAD_ADDR; + gFSLoadAddress = (void *) LOAD_ADDR; - fileSize = bvr->fs_loadfile(bvr, (char *)filePath); + fileSize = bvr->fs_loadfile(bvr, (char *)filePath); - // Return the size of the file, or -1 if load failed. + // Return the size of the file, or -1 if load failed. - return fileSize; + return fileSize; } //============================================================================== // LoadFile - LOW-LEVEL FILESYSTEM FUNCTION. -// Load the specified file to the load buffer at LOAD_ADDR. -// If the file is fat, load only the i386 portion. +// Load the specified file to the load buffer at LOAD_ADDR. +// If the file is fat, load only the i386 portion. long LoadFile(const char * fileSpec) { - const char * filePath; - BVRef bvr; + const char * filePath; + BVRef bvr; // Resolve the boot volume from the file spec. @@ -183,7 +182,7 @@ long LoadThinFatFile(const char *fileSpec, void **binary) BVRef bvr; unsigned long length; // = 0; unsigned long length2; // = 0; - + // Resolve the boot volume from the file spec. if ((bvr = getBootVolumeRef(fileSpec, &filePath)) == NULL) @@ -192,51 +191,57 @@ long LoadThinFatFile(const char *fileSpec, void **binary) } *binary = (void *)kLoadAddr; - + // Read file into load buffer. The data in the load buffer will be // overwritten by the next LoadFile() call. gFSLoadAddress = (void *) LOAD_ADDR; readFile = bvr->fs_readfile; - + if (readFile != NULL) { // Read the first 4096 bytes (fat header) length = readFile(bvr, (char *)filePath, *binary, 0, 0x1000); - if (length > 0) - { - if (ThinFatFile(binary, &length) == 0) - { + if (length > 0) + { + if (ThinFatFile(binary, &length) == 0) + { if (length == 0) + { return 0; + } - // We found a fat binary; read only the thin part - length = readFile(bvr, (char *)filePath, (void *)kLoadAddr, (unsigned long)(*binary) - kLoadAddr, length); - *binary = (void *)kLoadAddr; - } - else - { - // Not a fat binary; read the rest of the file - length2 = readFile(bvr, (char *)filePath, (void *)(kLoadAddr + length), length, 0); - - if (length2 == -1) - return -1; - - length += length2; - } - } - } - else - { - length = bvr->fs_loadfile(bvr, (char *)filePath); - - if (length > 0) - ThinFatFile(binary, &length); - } - - return length; + // We found a fat binary; read only the thin part + length = readFile(bvr, (char *)filePath, (void *)kLoadAddr, (unsigned long)(*binary) - kLoadAddr, length); + *binary = (void *)kLoadAddr; + } + else + { + // Not a fat binary; read the rest of the file + length2 = readFile(bvr, (char *)filePath, (void *)(kLoadAddr + length), length, 0); + + if (length2 == -1) + { + return -1; + } + + length += length2; + } + } + } + else + { + length = bvr->fs_loadfile(bvr, (char *)filePath); + + if (length > 0) + { + ThinFatFile(binary, &length); + } + } + + return length; } @@ -245,30 +250,30 @@ long LoadThinFatFile(const char *fileSpec, void **binary) long CreateUUIDString(uint8_t uubytes[], int nbytes, char *uuidStr) { - unsigned fmtbase, fmtidx, i; - uint8_t uuidfmt[] = { 4, 2, 2, 2, 6 }; - char *p = uuidStr; - MD5_CTX md5c; - uint8_t mdresult[16]; + unsigned fmtbase, fmtidx, i; + uint8_t uuidfmt[] = { 4, 2, 2, 2, 6 }; + char *p = uuidStr; + MD5_CTX md5c; + uint8_t mdresult[16]; - bzero(mdresult, sizeof(mdresult)); + bzero(mdresult, sizeof(mdresult)); - // just like AppleFileSystemDriver - MD5Init(&md5c); - MD5Update(&md5c, kFSUUIDNamespaceSHA1, sizeof(kFSUUIDNamespaceSHA1)); - MD5Update(&md5c, uubytes, nbytes); - MD5Final(mdresult, &md5c); + // just like AppleFileSystemDriver + MD5Init(&md5c); + MD5Update(&md5c, kFSUUIDNamespaceSHA1, sizeof(kFSUUIDNamespaceSHA1)); + MD5Update(&md5c, uubytes, nbytes); + MD5Final(mdresult, &md5c); - // this UUID has been made version 3 style (i.e. via namespace) - // see "-uuid-urn-" IETF draft (which otherwise copies byte for byte) - mdresult[6] = 0x30 | ( mdresult[6] & 0x0F ); - mdresult[8] = 0x80 | ( mdresult[8] & 0x3F ); + // this UUID has been made version 3 style (i.e. via namespace) + // see "-uuid-urn-" IETF draft (which otherwise copies byte for byte) + mdresult[6] = 0x30 | ( mdresult[6] & 0x0F ); + mdresult[8] = 0x80 | ( mdresult[8] & 0x3F ); - // generate the text: e.g. 5EB1869F-C4FA-3502-BDEB-3B8ED5D87292 + // generate the text: e.g. 5EB1869F-C4FA-3502-BDEB-3B8ED5D87292 i = 0; fmtbase = 0; - + for (fmtidx = 0; fmtidx < sizeof(uuidfmt); fmtidx++) { for (i = 0; i < uuidfmt[fmtidx]; i++) @@ -276,7 +281,7 @@ long CreateUUIDString(uint8_t uubytes[], int nbytes, char *uuidStr) uint8_t byte = mdresult[fmtbase + i]; char nib = byte >> 4; *p = nib + '0'; // 0x4 -> '4' - + if (*p > '9') { *p = (nib - 9 + ('A'-1)); // 0xB -> 'B' @@ -287,16 +292,16 @@ long CreateUUIDString(uint8_t uubytes[], int nbytes, char *uuidStr) nib = byte & 0xf; *p = nib + '0'; // 0x4 -> '4' - if (*p > '9') + if (*p > '9') { *p = (nib - 9 + ('A'-1)); // 0xB -> 'B' } p++; } - + fmtbase += i; - + if (fmtidx < sizeof(uuidfmt) - 1) { *(p++) = '-'; @@ -313,16 +318,16 @@ long CreateUUIDString(uint8_t uubytes[], int nbytes, char *uuidStr) //============================================================================== // GetDirEntry - LOW-LEVEL FILESYSTEM FUNCTION. -// Fetch the next directory entry for the given directory. +// Fetch the next directory entry for the given directory. long GetDirEntry(const char * dirSpec, long * dirIndex, const char ** dirEntry, long * flags, long * time) { - const char * dirPath; - BVRef bvr; + const char * dirPath; + BVRef bvr; // Resolve the boot volume from the dir spec. - if ((bvr = getBootVolumeRef(dirSpec, &dirPath)) == NULL) + if ((bvr = getBootVolumeRef(dirSpec, &dirPath)) == NULL) { return -1; } @@ -335,7 +340,7 @@ long GetDirEntry(const char * dirSpec, long * dirIndex, const char ** dirEntry, //============================================================================== // GetFileInfo - LOW-LEVEL FILESYSTEM FUNCTION. -// Get attributes for the specified file. +// Get attributes for the specified file. static char* gMakeDirSpec; @@ -377,11 +382,11 @@ long GetFileInfo(const char * dirSpec, const char * name, long * flags, long * t { if (strcmp(entryName, name) == 0) { - return 0; // success + return 0; // success } } - return -1; // file not found + return -1; // file not found } @@ -389,8 +394,8 @@ long GetFileInfo(const char * dirSpec, const char * name, long * flags, long * t long GetFileBlock(const char *fileSpec, unsigned long long *firstBlock) { - const char * filePath; - BVRef bvr; + const char * filePath; + BVRef bvr; // Resolve the boot volume from the file spec. @@ -398,9 +403,9 @@ long GetFileBlock(const char *fileSpec, unsigned long long *firstBlock) { // printf("Boot volume for '%s' is bogus\n", fileSpec); return -1; - } + } - return bvr->fs_getfileblock(bvr, (char *)filePath, firstBlock); + return bvr->fs_getfileblock(bvr, (char *)filePath, firstBlock); } @@ -416,7 +421,7 @@ static struct iob * iob_from_fdesc(int fdesc) if (fdesc < 0 || fdesc >= NFILES || ((io = &iob[fdesc])->i_flgs & F_ALLOC) == 0) { - return NULL; + return NULL; } return io; @@ -424,77 +429,71 @@ static struct iob * iob_from_fdesc(int fdesc) //============================================================================== -// Open the file specified by 'path' for reading. int open(const char * path, int flags) { - int fdesc, i; - struct iob * io; - const char * filePath; - BVRef bvr; + int fdesc, i; + struct iob * io; + const char * filePath; + BVRef bvr; - // Locate a free descriptor slot. + // Locate a free descriptor slot. for (fdesc = 0; fdesc < NFILES; fdesc++) { if (iob[fdesc].i_flgs == 0) { - goto gotfile; - } - } - - stop("Out of file descriptors"); - -gotfile: - io = &iob[fdesc]; - bzero(io, sizeof(*io)); - - // Mark the descriptor as taken. - - io->i_flgs = F_ALLOC; - - // Resolve the boot volume from the file spec. - - if ((bvr = getBootVolumeRef(path, &filePath)) == NULL) - { - goto error; - } - - // Find the next available memory block in the download buffer. - - io->i_buf = (char *) LOAD_ADDR; + io = &iob[fdesc]; + bzero(io, sizeof(*io)); + + // Mark the descriptor as taken. + + io->i_flgs = F_ALLOC; + + // Resolve the boot volume from the file spec. + + if ((bvr = getBootVolumeRef(path, &filePath)) != NULL) + { + // Find the next available memory block in the download buffer. + + io->i_buf = (char *) LOAD_ADDR; + + for (i = 0; i < NFILES; i++) + { + if ((iob[i].i_flgs != F_ALLOC) || (i == fdesc)) + { + continue; + } + + io->i_buf = max(iob[i].i_filesize + iob[i].i_buf, io->i_buf); + } + + // Load entire file into memory. Unnecessary open() calls must be avoided. - for (i = 0; i < NFILES; i++) - { - if ((iob[i].i_flgs != F_ALLOC) || (i == fdesc)) - { - continue; + gFSLoadAddress = io->i_buf; + io->i_filesize = bvr->fs_loadfile(bvr, (char *)filePath); + + if (io->i_filesize > 0) + { + return fdesc; + } + } } - - io->i_buf = max(iob[i].i_filesize + iob[i].i_buf, io->i_buf); - } - - // Load entire file into memory. Unnecessary open() calls must be avoided. - - gFSLoadAddress = io->i_buf; - io->i_filesize = bvr->fs_loadfile(bvr, (char *)filePath); - - if (io->i_filesize < 0) + } +#if DEBUG + if (fdesc == NFILES) { - goto error; + stop("Out of file descriptors"); } - - return fdesc; - -error: +#endif close(fdesc); - + return -1; } //============================================================================== -// close() - Close a file descriptor. +// Close given file descriptor. int close(int fdesc) { @@ -513,7 +512,7 @@ int close(int fdesc) //============================================================================== // lseek() - Reposition the byte offset of the file descriptor from the -// beginning of the file. Returns the relocated offset. +// beginning of the file. Returns the relocated offset. int b_lseek(int fdesc, int offset, int ptr) { @@ -548,7 +547,7 @@ int tell(int fdesc) //============================================================================== // read() - Read up to 'count' bytes of data from the file descriptor -// into the buffer pointed to by buf. +// into the buffer pointed to by buf. int read(int fdesc, char * buf, int count) { @@ -603,7 +602,7 @@ struct dirstuff * vol_opendir(BVRef bvr, const char * path) if (dirp) { - dirp->dir_path = newString(path); + dirp->dir_path = strdup(path); if (dirp->dir_path) { @@ -623,9 +622,9 @@ struct dirstuff * vol_opendir(BVRef bvr, const char * path) struct dirstuff * opendir(const char * path) { - struct dirstuff * dirp = 0; - const char * dirPath; - BVRef bvr; + struct dirstuff * dirp = 0; + const char * dirPath; + BVRef bvr; if ((bvr = getBootVolumeRef(path, &dirPath))) { @@ -633,8 +632,8 @@ struct dirstuff * opendir(const char * path) if (dirp) { - dirp->dir_path = newString(dirPath); - + dirp->dir_path = strdup(dirPath); + if (dirp->dir_path) { dirp->dir_bvr = bvr; @@ -644,9 +643,9 @@ struct dirstuff * opendir(const char * path) } } - closedir(dirp); + closedir(dirp); - return NULL; + return NULL; } @@ -664,7 +663,7 @@ int closedir(struct dirstuff * dirp) free(dirp); } - return 0; + return 0; } @@ -707,22 +706,21 @@ void scanBootVolumes(int biosdev, int * count) } -//============================================================================== -/*! - Extracts the volume selector from the pathname, returns the selected - BVRef, and sets *outPath to the remainder of the path. - If the path did not include a volume selector then the current volume - is used. When called with a volume selector the current volume - is changed to the selected volume unless the volume selector is - that of a ramdisk. */ +/*============================================================================== + * Extracts the volume selector from the pathname, returns the selected BVRef, + * and sets *outPath to the remainder of the path. If the path did not include + * a volume selector then the current volume is used. When called with a volume + * selector the current volume is changed to the selected volume unless the + * volume selector is that of a ramdisk. + */ BVRef getBootVolumeRef(const char * path, const char ** outPath) { - const char * cp; - BVRef bvr = gPlatform.RootVolume; - int biosdev = gPlatform.BIOSDevice; + const char * cp; + BVRef bvr = gPlatform.RootVolume; + int biosdev = gPlatform.BIOSDevice; - // Search for left parenthesis in the path specification. + // Search for left parenthesis in the path specification. for (cp = path; *cp; cp++) { @@ -768,7 +766,7 @@ BVRef getBootVolumeRef(const char * path, const char ** outPath) error("Unknown device '%c%c'\n", xp[0], xp[1]); return NULL; } - + // Extract the optional unit number from the specification. // hd(unit) or hd(unit, part). @@ -780,28 +778,28 @@ BVRef getBootVolumeRef(const char * path, const char ** outPath) unit = i; } - // Unit is no longer optional and never really was. - // If the user failed to specify it then the unit number from the previous kernDev - // would have been used which makes little sense anyway. - // For example, if the user did fd()/foobar and the current root device was the - // second hard disk (i.e. unit 1) then fd() would select the second floppy drive! - if (unit == -1) + // Unit is no longer optional and never really was. + // If the user failed to specify it then the unit number from the previous kernDev + // would have been used which makes little sense anyway. + // For example, if the user did fd()/foobar and the current root device was the + // second hard disk (i.e. unit 1) then fd() would select the second floppy drive! + if (unit == -1) { return NULL; } - // Extract the optional partition number from the specification. + // Extract the optional partition number from the specification. if (*cp == ',') { part = atoi(++cp); } - // If part is not specified part will be -1 whereas before it would have been - // whatever the last partition was which makes about zero sense if the device - // has been switched. + // If part is not specified part will be -1 whereas before it would have been + // whatever the last partition was which makes about zero sense if the device + // has been switched. - // Skip past the right paren. + // Skip past the right paren. for ( ; *cp && *cp != RP; cp++) /* LOOP */; @@ -809,7 +807,7 @@ BVRef getBootVolumeRef(const char * path, const char ** outPath) { cp++; } - + biosdev = dp->biosdev + unit; // turbo - bt(0,0) hook @@ -851,7 +849,7 @@ BVRef getBootVolumeRef(const char * path, const char ** outPath) cp++; } } - + // If gPlatform.RootVolume was NULL, then bvr will be NULL as well which // should be caught by the caller. } @@ -871,31 +869,31 @@ BVRef getBootVolumeRef(const char * path, const char ** outPath) static BVRef newBootVolumeRef(int biosdev, int partno) { - BVRef bvr, bvr1, bvrChain; + BVRef bvr, bvr1, bvrChain; - // Fetch the volume list from the device. + // Fetch the volume list from the device. - scanBootVolumes(biosdev, NULL); - bvrChain = getBVChainForBIOSDev(biosdev); + scanBootVolumes(biosdev, NULL); + bvrChain = getBVChainForBIOSDev(biosdev); - // Look for a perfect match based on device and partition number. + // Look for a perfect match based on device and partition number. - for (bvr1 = NULL, bvr = bvrChain; bvr; bvr = bvr->next) - { - if ((bvr->flags & kBVFlagNativeBoot) == 0) + for (bvr1 = NULL, bvr = bvrChain; bvr; bvr = bvr->next) + { + if ((bvr->flags & kBVFlagNativeBoot) == 0) { - continue; + continue; } - - bvr1 = bvr; - if (bvr->part_no == partno) + bvr1 = bvr; + + if (bvr->part_no == partno) { - break; + break; } - } + } - return bvr ? bvr : bvr1; + return bvr ? bvr : bvr1; } From 2d6c051ad1b9a6f94e31d4686956b643b915ca00 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 13:59:51 +0100 Subject: [PATCH 156/623] Cleanups, white space and layout changes --- i386/libsaio/xml.c | 651 +++++++++++++++++++++------------------------ 1 file changed, 304 insertions(+), 347 deletions(-) diff --git a/i386/libsaio/xml.c b/i386/libsaio/xml.c index 68fbd2d..a4a0c65 100755 --- a/i386/libsaio/xml.c +++ b/i386/libsaio/xml.c @@ -20,13 +20,17 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ + * + * Updates: + * - Cleanups, white space and layout changes (PikerAlpha, November 2012) + * */ #include "libsaio.h" #include "xml.h" typedef struct Module -{ +{ struct Module *nextModule; long willLoad; TagPtr dict; @@ -64,19 +68,15 @@ enum kCFBundleType3 }; - -#define USEMALLOC 1 -#define DOFREE 1 - #define kTagsPerBlock (0x1000) static TagPtr gTagsFree; typedef struct Symbol { - long refCount; - struct Symbol *next; - char string[]; + long refCount; + struct Symbol * next; + char string[]; } Symbol, *SymbolPtr; static SymbolPtr FindSymbol(char * string, SymbolPtr * prevSymbol); @@ -94,37 +94,31 @@ static long GetNextTag(char *buffer, char **tag, long *start); static long FixDataMatchingTag(char *buffer, char *tag); static TagPtr NewTag(void); static char *NewSymbol(char *string); - -#if DOFREE - static void FreeSymbol(char *string); -#endif +static void FreeSymbol(char *string); //============================================================================== TagPtr XMLGetProperty(TagPtr dict, const char * key) { - if (dict->type != kTagTypeDict) + if (dict->type == kTagTypeDict) { - return 0; - } - - TagPtr tag = 0; - TagPtr tagList = dict->tag; + TagPtr tag = 0; + TagPtr tagList = dict->tag; - while (tagList) - { - tag = tagList; - tagList = tag->tagNext; - - if ((tag->type != kTagTypeKey) || (tag->string == 0)) + while (tagList) { - continue; - } + tag = tagList; + tagList = tag->tagNext; - if (!strcmp(tag->string, key)) - { - return tag->tag; + if ((tag->type != kTagTypeKey) || (tag->string == 0)) + { + continue; + } + else if (!strcmp(tag->string, key)) + { + return tag->tag; + } } } @@ -138,13 +132,13 @@ TagPtr XMLGetProperty(TagPtr dict, const char * key) // Puts the first dictionary it finds in the // tag pointer and returns 0, or returns -1 if not found. // -long XMLParseFile( char * buffer, TagPtr * dict ) +long XMLParseFile(char * buffer, TagPtr * dict) { - TagPtr tag; + TagPtr tag = NULL; - long length, pos = 0; + long length, pos = 0L; - while (1) + while (TRUE) { length = XMLParseNextTag(buffer + pos, &tag); @@ -155,7 +149,7 @@ long XMLParseFile( char * buffer, TagPtr * dict ) pos += length; - if (tag == 0) + if (tag == NULL) { continue; } @@ -170,12 +164,12 @@ long XMLParseFile( char * buffer, TagPtr * dict ) if (length < 0) { - return -1; + return -1L; } *dict = tag; - return 0; + return 0L; } #endif /* UNUSED */ @@ -185,73 +179,72 @@ long XMLParseFile( char * buffer, TagPtr * dict ) long XMLParseNextTag(char * buffer, TagPtr * tag) { char * tagName; + long pos = 0L; + long length = GetNextTag(buffer, &tagName, 0); + + if (length != -1L) + { + pos = length; + + if (!strncmp(tagName, kXMLTagPList, 6)) + { + length = 0L; + } + else if (!strcmp(tagName, kXMLTagDict)) + { + length = ParseTagList(buffer + pos, tag, kTagTypeDict, 0); + } + else if (!strcmp(tagName, kXMLTagDict "/")) + { + length = ParseTagList(buffer + pos, tag, kTagTypeDict, 1); + } + else if (!strcmp(tagName, kXMLTagKey)) + { + length = ParseTagKey(buffer + pos, tag); + } + else if (!strcmp(tagName, kXMLTagString)) + { + length = ParseTagString(buffer + pos, tag); + } + else if (!strcmp(tagName, kXMLTagInteger)) + { + length = ParseTagInteger(buffer + pos, tag); + } + else if (!strcmp(tagName, kXMLTagData)) + { + length = ParseTagData(buffer + pos, tag); + } + else if (!strcmp(tagName, kXMLTagDate)) + { + length = ParseTagDate(buffer + pos, tag); + } + else if (!strcmp(tagName, kXMLTagFalse)) + { + length = ParseTagBoolean(buffer + pos, tag, kTagTypeFalse); + } + else if (!strcmp(tagName, kXMLTagTrue)) + { + length = ParseTagBoolean(buffer + pos, tag, kTagTypeTrue); + } + else if (!strcmp(tagName, kXMLTagArray)) + { + length = ParseTagList(buffer + pos, tag, kTagTypeArray, 0); + } + else if (!strcmp(tagName, kXMLTagArray "/")) + { + length = ParseTagList(buffer + pos, tag, kTagTypeArray, 1); + } + else + { + *tag = 0; + length = 0L; + } + + if (length == -1) + { + pos = 0L; + } - long length = GetNextTag(buffer, &tagName, 0); - - if (length == -1) - { - return -1; - } - - long pos = length; - - if (!strncmp(tagName, kXMLTagPList, 6)) - { - length = 0; - } - else if (!strcmp(tagName, kXMLTagDict)) - { - length = ParseTagList(buffer + pos, tag, kTagTypeDict, 0); - } - else if (!strcmp(tagName, kXMLTagDict "/")) - { - length = ParseTagList(buffer + pos, tag, kTagTypeDict, 1); - } - else if (!strcmp(tagName, kXMLTagKey)) - { - length = ParseTagKey(buffer + pos, tag); - } - else if (!strcmp(tagName, kXMLTagString)) - { - length = ParseTagString(buffer + pos, tag); - } - else if (!strcmp(tagName, kXMLTagInteger)) - { - length = ParseTagInteger(buffer + pos, tag); - } - else if (!strcmp(tagName, kXMLTagData)) - { - length = ParseTagData(buffer + pos, tag); - } - else if (!strcmp(tagName, kXMLTagDate)) - { - length = ParseTagDate(buffer + pos, tag); - } - else if (!strcmp(tagName, kXMLTagFalse)) - { - length = ParseTagBoolean(buffer + pos, tag, kTagTypeFalse); - } - else if (!strcmp(tagName, kXMLTagTrue)) - { - length = ParseTagBoolean(buffer + pos, tag, kTagTypeTrue); - } - else if (!strcmp(tagName, kXMLTagArray)) - { - length = ParseTagList(buffer + pos, tag, kTagTypeArray, 0); - } - else if (!strcmp(tagName, kXMLTagArray "/")) - { - length = ParseTagList(buffer + pos, tag, kTagTypeArray, 1); - } - else - { - *tag = 0; - length = 0; - } - - if (length == -1) - { - return -1; } return pos + length; @@ -262,7 +255,7 @@ long XMLParseNextTag(char * buffer, TagPtr * tag) static long ParseTagList(char * buffer, TagPtr * tag, long type, long empty) { - long length, pos = 0; + long length, pos = 0L; TagPtr tmpTag, tagList = 0; @@ -292,7 +285,7 @@ static long ParseTagList(char * buffer, TagPtr * tag, long type, long empty) { XMLFreeTag(tagList); - return -1; + return -1L; } } @@ -302,7 +295,7 @@ static long ParseTagList(char * buffer, TagPtr * tag, long type, long empty) { XMLFreeTag(tagList); - return -1; + return -1L; } tmpTag->type = type; @@ -322,47 +315,45 @@ static long ParseTagKey(char * buffer, TagPtr * tag) { long length = FixDataMatchingTag(buffer, kXMLTagKey); - if (length == -1) + if (length != -1L) { - return -1; - } + TagPtr subTag; - TagPtr subTag; + long length2 = XMLParseNextTag(buffer + length, &subTag); - long length2 = XMLParseNextTag(buffer + length, &subTag); - - if (length2 == -1) - { - return -1; - } - - TagPtr tmpTag = NewTag(); - - if (tmpTag == 0) - { - XMLFreeTag(subTag); - - return -1; - } - - char * string = NewSymbol(buffer); - - if (string == 0) - { - XMLFreeTag(subTag); - XMLFreeTag(tmpTag); + if (length2 != -1L) + { + TagPtr tmpTag = NewTag(); - return -1; + if (tmpTag) + { + char * string = NewSymbol(buffer); + + if (string) + { + tmpTag->type = kTagTypeKey; + tmpTag->string = string; + tmpTag->tag = subTag; + tmpTag->tagNext = 0; + + *tag = tmpTag; + + return length + length2; + } + else + { + XMLFreeTag(subTag); + XMLFreeTag(tmpTag); + } + } + else + { + XMLFreeTag(subTag); + } + } } - tmpTag->type = kTagTypeKey; - tmpTag->string = string; - tmpTag->tag = subTag; - tmpTag->tagNext = 0; - - *tag = tmpTag; - - return length + length2; + return length; // -1; } @@ -372,35 +363,31 @@ static long ParseTagString(char * buffer, TagPtr * tag) { long length = FixDataMatchingTag(buffer, kXMLTagString); - if (length == -1) - { - return -1; - } - - TagPtr tmpTag = NewTag(); - - if (tmpTag == 0) + if (length != -1L) { - return -1; - } + TagPtr tmpTag = NewTag(); - char * string = NewSymbol(buffer); - - if (string == 0) - { - XMLFreeTag(tmpTag); + if (tmpTag) + { + char * string = NewSymbol(buffer); - return -1; + if (string) + { + tmpTag->type = kTagTypeString; + tmpTag->string = string; + tmpTag->tag = 0; + tmpTag->tagNext = 0; + + *tag = tmpTag; + } + else + { + XMLFreeTag(tmpTag); + } + } } - tmpTag->type = kTagTypeString; - tmpTag->string = string; - tmpTag->tag = 0; - tmpTag->tagNext = 0; - - *tag = tmpTag; - - return length; + return length; // -1; } @@ -410,28 +397,24 @@ static long ParseTagInteger(char * buffer, TagPtr * tag) { long length = FixDataMatchingTag(buffer, kXMLTagInteger); - if (length == -1) + if (length != -1L) { - return -1; - } - - TagPtr tmpTag = NewTag(); + TagPtr tmpTag = NewTag(); - if (tmpTag == 0) - { - return -1; - } + if (tmpTag) + { + long integer = 0L; - long integer = 0; - - tmpTag->type = kTagTypeInteger; - tmpTag->string = (char *)integer; - tmpTag->tag = 0; - tmpTag->tagNext = 0; + tmpTag->type = kTagTypeInteger; + tmpTag->string = (char *)integer; + tmpTag->tag = 0; + tmpTag->tagNext = 0; - *tag = tmpTag; + *tag = tmpTag; + } + } - return length; + return length; // -1 } @@ -441,26 +424,24 @@ static long ParseTagData(char * buffer, TagPtr * tag) { long length = FixDataMatchingTag(buffer, kXMLTagData); - if (length == -1) + if (length != -1L) { - return -1; - } + TagPtr tmpTag = NewTag(); - TagPtr tmpTag = NewTag(); - - if (tmpTag == 0) - { - return -1; - } + if (tmpTag) + { + tmpTag->type = kTagTypeData; + tmpTag->string = 0; + tmpTag->tag = 0; + tmpTag->tagNext = 0; - tmpTag->type = kTagTypeData; - tmpTag->string = 0; - tmpTag->tag = 0; - tmpTag->tagNext = 0; + *tag = tmpTag; - *tag = tmpTag; + return length; + } + } - return length; + return length; // -1 } @@ -470,26 +451,24 @@ static long ParseTagDate(char * buffer, TagPtr * tag) { long length = FixDataMatchingTag(buffer, kXMLTagDate); - if (length == -1) + if (length != -1L) { - return -1; - } + TagPtr tmpTag = NewTag(); - TagPtr tmpTag = NewTag(); + if (tmpTag) + { + tmpTag->type = kTagTypeDate; + tmpTag->string = 0; + tmpTag->tag = 0; + tmpTag->tagNext = 0; - if (tmpTag == 0) - { - return -1; + *tag = tmpTag; + + return length; + } } - - tmpTag->type = kTagTypeDate; - tmpTag->string = 0; - tmpTag->tag = 0; - tmpTag->tagNext = 0; - *tag = tmpTag; - - return length; + return -1; } @@ -499,19 +478,19 @@ static long ParseTagBoolean(char * buffer, TagPtr * tag, long type) { TagPtr tmpTag = NewTag(); - if (tmpTag == 0) + if (tmpTag) { - return -1; - } - - tmpTag->type = type; - tmpTag->string = 0; - tmpTag->tag = 0; - tmpTag->tagNext = 0; + tmpTag->type = type; + tmpTag->string = 0; + tmpTag->tag = 0; + tmpTag->tagNext = 0; - *tag = tmpTag; + *tag = tmpTag; - return 0; + return 0L; + } + + return -1L; } @@ -519,47 +498,43 @@ static long ParseTagBoolean(char * buffer, TagPtr * tag, long type) static long GetNextTag(char * buffer, char ** tag, long * start) { - if (tag == 0) - { - return -1; - } - - // Find the start of the tag. - long cnt = 0; - - while ((buffer[cnt] != '\0') && (buffer[cnt] != '<')) - { - cnt++; - } - - if (buffer[cnt] == '\0') - { - return -1; - } - - // Find the end of the tag. - long cnt2 = cnt + 1; - - while ((buffer[cnt2] != '\0') && (buffer[cnt2] != '>')) - { - cnt2++; - } - - if (buffer[cnt2] == '\0') - { - return -1; - } - - // Fix the tag data. - *tag = buffer + cnt + 1; - buffer[cnt2] = '\0'; - - if (start) + if (tag) { - *start = cnt; + // Find the start of the tag. + long cnt = 0L; + + while ((buffer[cnt] != '\0') && (buffer[cnt] != '<')) + { + cnt++; + } + + if (buffer[cnt] != '\0') + { + // Find the end of the tag. + long cnt2 = cnt + 1L; + + while ((buffer[cnt2] != '\0') && (buffer[cnt2] != '>')) + { + cnt2++; + } + + if (buffer[cnt2] != '\0') + { + // Fix the tag data. + *tag = buffer + cnt + 1; + buffer[cnt2] = '\0'; + + if (start) + { + *start = cnt; + } + + return cnt2 + 1; + } + } } - - return cnt2 + 1; + + return -1L; } @@ -582,8 +557,7 @@ static long FixDataMatchingTag(char * buffer, char * tag) { return -1; } - - if ((*endTag == '/') && !strcmp(endTag + 1, tag)) + else if ((*endTag == '/') && !strcmp(endTag + 1, tag)) { break; } @@ -601,34 +575,33 @@ static long FixDataMatchingTag(char * buffer, char * tag) static TagPtr NewTag(void) { - long cnt; + long cnt = 0L; - TagPtr tag; + TagPtr tag = NULL; - if (gTagsFree == 0) + if (gTagsFree == NULL) { -#if USEMALLOC tag = (TagPtr)malloc(kTagsPerBlock * sizeof(Tag)); -#else - tag = (TagPtr)AllocateBootXMemory(kTagsPerBlock * sizeof(Tag)); -#endif - if (tag == 0) - { - return 0; - } - // Initalize the new tags. - for (cnt = 0; cnt < kTagsPerBlock; cnt++) + if (tag) { - tag[cnt].type = kTagTypeNone; - tag[cnt].string = 0; - tag[cnt].tag = 0; - tag[cnt].tagNext = tag + cnt + 1; - } + // Initalize the new tags. + for (cnt = 0; cnt < kTagsPerBlock; cnt++) + { + tag[cnt].type = kTagTypeNone; + tag[cnt].string = 0; + tag[cnt].tag = 0; + tag[cnt].tagNext = tag + cnt + 1; + } - tag[kTagsPerBlock - 1].tagNext = 0; + tag[kTagsPerBlock - 1].tagNext = 0; - gTagsFree = tag; + gTagsFree = tag; + } + else + { + return NULL; + } } tag = gTagsFree; @@ -642,29 +615,23 @@ static TagPtr NewTag(void) void XMLFreeTag(TagPtr tag) { -#if DOFREE - if (tag == 0) + if (tag) { - return; - } + if (tag->string) + { + FreeSymbol(tag->string); + } - if (tag->string) - { - FreeSymbol(tag->string); - } + XMLFreeTag(tag->tag); + XMLFreeTag(tag->tagNext); - XMLFreeTag(tag->tag); - XMLFreeTag(tag->tagNext); - - // Clear and free the tag. - tag->type = kTagTypeNone; - tag->string = 0; - tag->tag = 0; - tag->tagNext = gTagsFree; - gTagsFree = tag; -#else - return; -#endif + // Clear and free the tag. + tag->type = kTagTypeNone; + tag->string = 0; + tag->tag = 0; + tag->tagNext = gTagsFree; + gTagsFree = tag; + } } @@ -674,31 +641,28 @@ static char * NewSymbol(char * string) { static SymbolPtr lastGuy = 0; - SymbolPtr symbol; - // Look for string in the list of symbols. - symbol = FindSymbol(string, 0); + SymbolPtr symbol = FindSymbol(string, 0); - // Add the new symbol. + // Add new symbol. if (symbol == 0) { -#if USEMALLOC symbol = (SymbolPtr)malloc(sizeof(Symbol) + 1 + strlen(string)); -#else - symbol = (SymbolPtr)AllocateBootXMemory(sizeof(Symbol) + 1 + strlen(string)); -#endif - if (symbol == 0) - { - stop("NULL symbol!"); - } - // Set the symbol's data. - symbol->refCount = 0; - strcpy(symbol->string, string); + if (symbol) + { + // Set the symbol's data. + symbol->refCount = 0; + strcpy(symbol->string, string); - // Add the symbol to the list. - symbol->next = gSymbolsHead; - gSymbolsHead = symbol; + // Add the symbol to the list. + symbol->next = gSymbolsHead; + gSymbolsHead = symbol; + } + else + { + stop ("xml.c"); + } } // Update the refCount and return the string. @@ -706,51 +670,45 @@ static char * NewSymbol(char * string) if (lastGuy && lastGuy->next != 0) { - stop("last guy not last!"); + stop ("xml.c"); } return symbol->string; } -#if DOFREE //============================================================================== static void FreeSymbol(char * string) -{ +{ SymbolPtr symbol, prev; prev = 0; // Look for string in the list of symbols. symbol = FindSymbol(string, &prev); - if (symbol == 0) + if (symbol) { - return; - } - - // Update the refCount. - symbol->refCount--; + // Update the refCount. + symbol->refCount--; - if (symbol->refCount != 0) - { - return; - } + if (symbol->refCount == 0) + { + // Remove the symbol from the list. + if (prev != 0) + { + prev->next = symbol->next; + } + else + { + gSymbolsHead = symbol->next; + } + } - // Remove the symbol from the list. - if (prev != 0) - { - prev->next = symbol->next; - } - else - { - gSymbolsHead = symbol->next; + // Free the symbol's memory. + free (symbol); } - - // Free the symbol's memory. - free(symbol); } -#endif //============================================================================== @@ -766,7 +724,7 @@ static SymbolPtr FindSymbol(char * string, SymbolPtr * prevSymbol) { break; } - + prev = symbol; symbol = symbol->next; } @@ -778,4 +736,3 @@ static SymbolPtr FindSymbol(char * string, SymbolPtr * prevSymbol) return symbol; } - From ff60513fe732496d9ea10588c90b84d941b8b68c Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 14:01:30 +0100 Subject: [PATCH 157/623] Adding FIXME note --- i386/libsaio/smbios/static_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/smbios/static_data.h b/i386/libsaio/smbios/static_data.h index 85823ee..27601f1 100755 --- a/i386/libsaio/smbios/static_data.h +++ b/i386/libsaio/smbios/static_data.h @@ -17,7 +17,7 @@ #include "essentials.h" int tableLength = 0; - //long fileSize = 0; ***unused variable + long fileSize = 0; // FIXME: This variable <i>is used</i> but conditionally! #if LOAD_MODEL_SPECIFIC_SMBIOS_DATA char dirSpec[32] = ""; From 1950263742d4250e5c668db64dc4fa646c283243 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 14:03:17 +0100 Subject: [PATCH 158/623] Output improved --- i386/util/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/i386/util/Makefile b/i386/util/Makefile index 714a6f4..aaa3484 100644 --- a/i386/util/Makefile +++ b/i386/util/Makefile @@ -5,6 +5,7 @@ # # - Major cleanup (PikerAlpha, October 2012). # - Fixed clang compilation (dgsga, November 2012. Credits to Evan Lojewski for original work). +# - Output improved (PikerAlpha, October 2012). # From a91747be1235a591a2aee34d7bd52458a28cdbeb Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 14:05:51 +0100 Subject: [PATCH 159/623] Unused sysConfigValid removed and white space fix --- i386/boot2/boot.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 2a4b3c4..280bba2 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -50,7 +50,8 @@ * Updates: * - Refactorized by DHP in 2010 and 2011. * - Optionally include Recovery HD support code (PikerAlpha, November 2012). - * - Fixed clang compilation (PikerAlpha, November 2012). + * - Fixed clang compilation (PikerAlpha, November 2012). + * - Unused sysConfigValid removed and white space fix (PikerAlpha, November 2012). */ @@ -386,8 +387,6 @@ void boot(int biosdev) while (1) { // Initialize globals. - - sysConfigValid = 0; gErrors = 0; int retStatus = -1; From 8c2706b19df4e07703c4b1f7a8fe536b936266a6 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 14:07:08 +0100 Subject: [PATCH 160/623] Unused sysConfigValid removed --- i386/boot2/boot.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/i386/boot2/boot.h b/i386/boot2/boot.h index b841f20..e243f8d 100755 --- a/i386/boot2/boot.h +++ b/i386/boot2/boot.h @@ -20,9 +20,12 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ - */ -/* + * * Copyright 1994 NeXT Computer, Inc. All rights reserved. + * + * Updates: + * - Unused sysConfigValid removed (PikerAlpha, November 2012). + * */ #ifndef __BOOT2_BOOT_H From ca541b7bf31570659e2113762989b0d88077af7f Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 14:10:27 +0100 Subject: [PATCH 161/623] BOOT2ADDR removed, static compilation and some white space changes --- i386/boot2/Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/i386/boot2/Makefile b/i386/boot2/Makefile index 6ed320c..765fb6e 100644 --- a/i386/boot2/Makefile +++ b/i386/boot2/Makefile @@ -9,6 +9,7 @@ # - BOOT2ADDR moved to RevoBoot/i386/util/segsize.c (PikerAlpha, November 2012). # - Simplified calls to RevoBoot/i386/util/segsize (PikerAlpha, November 2012). # - Reformatted output, include directory dependency lifted (PikerAlpha, November 2012). +# - BOOT2ADDR removed, static compilation and some white space changes (PikerAlpha, November 2012). # @@ -26,8 +27,7 @@ LIBSADIR = ../libsa LIBSAIODIR = ../libsaio UTILDIR = ../util -INC = -I. -I.. -I$(SYMROOT) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(UTILDIR) - +INC = -I. -I.. -I$(SYMROOT) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(UTILDIR) LIBS = -L$(SYMROOT) -lsaio -lsa LIBDEP = $(SYMROOT)/libsaio.a $(SYMROOT)/libsa.a @@ -40,7 +40,6 @@ VPATH = $(OBJROOT):$(SYMROOT) OBJS = boot2.o boot.o bootlogo.o graphics.o drivers.o options.o lzss.o DIRS_NEEDED = $(OBJROOT) $(SYMROOT) -BOOT2ADDR = 20200 # # Set maximum size of the booter to 128KB (should be more than sufficient). @@ -49,10 +48,10 @@ MAXBOOTSIZE = 131072 $(MAKEGOAL): $(DIRS_NEEDED) boot -boot: $(OBJS) +boot: $(OBJS) @echo "\t[LD] boot.sys" - @$(CC) -nostdlib -arch i386 \ + @$(CC) -nostdlib -arch i386 -static \ -Wl,-preload \ -Wl,-pie \ -Wl,-segalign,20 \ From 71f4e5944936bb27813ae0ef4666788fb7e86a8c Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 14:20:35 +0100 Subject: [PATCH 162/623] OSBigEndian removed and white space changes --- i386/libsaio/hfs.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/i386/libsaio/hfs.c b/i386/libsaio/hfs.c index e19206c..f980a6e 100755 --- a/i386/libsaio/hfs.c +++ b/i386/libsaio/hfs.c @@ -18,13 +18,16 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ - */ -/* - * hfs.c - File System Module for HFS and HFS+. * - * Copyright (c) 1999-2002 Apple Computer, Inc. + * hfs.c - File System Module for HFS and HFS+. + * + * Copyright (c) 1999-2002 Apple Computer, Inc. + * + * DRI: Josh de Cesare + * + * Updates: + * - OSBigEndian removed and white space changes (PikerAlpha, November 2012) * - * DRI: Josh de Cesare */ #include <sl.h> @@ -131,7 +134,7 @@ bool HFSProbe (const void *buf) mdb = (const HFSMasterDirectoryBlock *)(((const char*)buf)+kMDBBaseOffset); header = (const HFSPlusVolumeHeader *)(((const char*)buf)+kMDBBaseOffset); - if ( SWAP_BE16(mdb->drSigWord) == kHFSSigWord ) + if (SWAP_BE16(mdb->drSigWord) == kHFSSigWord) return true; if (SWAP_BE16(header->signature) != kHFSPlusSigWord && SWAP_BE16(header->signature) != kHFSXSigWord) @@ -257,11 +260,9 @@ long HFSInitPartition(CICell ih) extentSize = SWAP_BE64(gHFSPlus->catalogFile.logicalSize); extentFile = kHFSCatalogFileID; - ReadExtent(extent, extentSize, extentFile, 0, 256, - gBTreeHeaderBuffer + kBTreeCatalog * 256, 0); + ReadExtent(extent, extentSize, extentFile, 0, 256, gBTreeHeaderBuffer + kBTreeCatalog * 256, 0); - nodeSize = SWAP_BE16(((BTHeaderRec *)(gBTreeHeaderBuffer + kBTreeCatalog * 256 + - sizeof(BTNodeDescriptor)))->nodeSize); + nodeSize = SWAP_BE16(((BTHeaderRec *)(gBTreeHeaderBuffer + kBTreeCatalog * 256 + sizeof(BTNodeDescriptor)))->nodeSize); // If the BTree node size is larger than the block size, reset the cache. if (nodeSize > gBlockSize) @@ -772,7 +773,7 @@ static long GetCatalogEntry(long * dirIndex, char ** name, long * flags, long * { utf_encodestr(((HFSPlusCatalogKey *)testKey)->nodeName.unicode, SWAP_BE16(((HFSPlusCatalogKey *)testKey)->nodeName.length), - (u_int8_t *)gTempStr, 256, OSBigEndian); + (u_int8_t *)gTempStr, 256); } else { @@ -820,7 +821,7 @@ static long ReadCatalogEntry(char * fileName, long dirID, void * entry, long * d length = 255; } - utf_decodestr((u_int8_t *)fileName, hfsPlusKey->nodeName.unicode, &(hfsPlusKey->nodeName.length), 512, OSBigEndian); + utf_decodestr((u_int8_t *)fileName, hfsPlusKey->nodeName.unicode, &(hfsPlusKey->nodeName.length), 512); } else { @@ -1301,7 +1302,7 @@ static long CompareHFSPlusCatalogKeys(void * key, void * testKey) result = FastUnicodeCompare(&searchKey->nodeName.unicode[0], SWAP_BE16(searchKey->nodeName.length), &trialKey->nodeName.unicode[0], - SWAP_BE16(trialKey->nodeName.length), OSBigEndian); + SWAP_BE16(trialKey->nodeName.length)); } } @@ -1415,4 +1416,3 @@ static long CompareHFSPlusExtentsKeys(void * key, void * testKey) return result; } - From 66f31e453ba24bf1c2b272c61c4ee43e1f6306e1 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 14:24:27 +0100 Subject: [PATCH 163/623] Check malloc return --- i386/libsaio/efi/fake_efi.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/efi/fake_efi.h b/i386/libsaio/efi/fake_efi.h index bfa1bff..94c18a9 100755 --- a/i386/libsaio/efi/fake_efi.h +++ b/i386/libsaio/efi/fake_efi.h @@ -27,6 +27,9 @@ * EFI implementation for Revolution Copyright (c) 2010 by DHP. * All rights reserved. * + * Updates: + * - Check malloc return (PikerAlpha, November 2012). + * */ #include "bootstruct.h" // For bootArgs. @@ -56,12 +59,17 @@ static EFI_UINT32 const FIRMWARE_REVISION = EFI_SYSTEM_TABLE_REVISION; static inline char * mallocStringForGuid(EFI_GUID const *pGuid) { - char *string = malloc(37); - efi_guid_unparse_upper(pGuid, string); + char *string = malloc(37); - return string; -} + if (string) + { + efi_guid_unparse_upper(pGuid, string); + return string; + } + + return NULL; +} //============================================================================== // Function to map a 32-bit address to a 64-bit address, or it simply returns From 8dc15e1ec8b4888ec8aa8da3e11ce4639f9d5716 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 14:27:39 +0100 Subject: [PATCH 164/623] Use size_t instead of int when required --- i386/libsa/string.c | 106 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 92 insertions(+), 14 deletions(-) diff --git a/i386/libsa/string.c b/i386/libsa/string.c index 2e58d88..0f2c9bc 100755 --- a/i386/libsa/string.c +++ b/i386/libsa/string.c @@ -20,8 +20,13 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ + * + * Updates: + * - Layout and white space changes (PikerAlpha, November 2012) + * - Use size_t instead of int when required (PikerAlpha, November 2012) + * */ -/* string operations */ + #include "libsa.h" @@ -128,10 +133,15 @@ void bzero(void * dst, size_t len) //========================================================================== -int strlen(const char * s) +size_t strlen(const char * s) { int n = 0; - while (*s++) n++; + + while (*s++) + { + n++; + } + return(n); } /*#endif*/ @@ -140,12 +150,16 @@ int strlen(const char * s) //========================================================================== /* NOTE: Moved from ntfs.c */ -int memcmp(const void *p1, const void *p2, int len) +int memcmp(const void *p1, const void *p2, size_t len) { - while (len--) { + while (len--) + { if (*(const char*)(p1++) != *(const char*)(p2++)) + { return -1; + } } + return 0; } @@ -154,10 +168,12 @@ int memcmp(const void *p1, const void *p2, int len) int strcmp(const char * s1, const char * s2) { - while (*s1 && (*s1 == *s2)) { + while (*s1 && (*s1 == *s2)) + { s1++; s2++; } + return (*s1 - *s2); } @@ -167,9 +183,15 @@ int strcmp(const char * s1, const char * s2) int strncmp(const char * s1, const char * s2, size_t len) { register int n = len; + while (--n >= 0 && *s1 == *s2++) + { if (*s1++ == '\0') + { return(0); + } + } + return(n<0 ? 0 : *s1 - *--s2); } @@ -179,8 +201,12 @@ int strncmp(const char * s1, const char * s2, size_t len) char * strcpy(char * s1, const char * s2) { register char *ret = s1; + while ((*s1++ = *s2++)) + { continue; + } + return ret; } @@ -190,21 +216,33 @@ char * strcpy(char * s1, const char * s2) char * strncpy(char * s1, const char * s2, size_t n) { register char *ret = s1; + while (n && (*s1++ = *s2++)) + { n--; + } + return ret; } //========================================================================== -char * strlcpy(char * s1, const char * s2, size_t n) +size_t strlcpy(char * s1, const char * s2, size_t n) { register char *ret = s1; + while (n && (*s1++ = *s2++)) + { n--; - if (!n) *--s1=0; - return ret; + } + + if (!n) + { + *--s1=0; + } + + return strlen(ret); } @@ -216,10 +254,14 @@ char * strstr(const char *in, const char *str) size_t len; c = *str++; + if (!c) + { return (char *) in; // Trivial empty string case + } len = strlen(str); + do { char sc; @@ -241,10 +283,18 @@ int ptol(const char *str) register int c = *str; if (c <= '7' && c >= '0') + { c -= '0'; + } else if (c <= 'h' && c >= 'a') + { c -= 'a'; - else c = 0; + } + else + { + c = 0; + } + return c; } @@ -254,9 +304,14 @@ int ptol(const char *str) int atoi(const char *str) { register int sum = 0; + while (*str == ' ' || *str == '\t') + { str++; - while (*str >= '0' && *str <= '9') { + } + + while (*str >= '0' && *str <= '9') + { sum *= 10; sum += *str++ - '0'; } @@ -269,11 +324,19 @@ int atoi(const char *str) char *strncat(char *s1, const char *s2, size_t n) { register char *ret = s1; + while (*s1) + { s1++; + } + while (n-- && *s2) + { *s1++ = *s2++; + } + *s1 = '\0'; + return ret; } @@ -288,9 +351,16 @@ char *strcat(char *s1, const char *s2) //========================================================================== -char *strdup(const char *s1) +char *strdup(const char *sourceString) { - return strcpy(malloc(strlen(s1) + 1), s1); + char * newString = (char *)malloc(strlen(sourceString) + 1); + + if (newString) + { + return strcpy(newString, sourceString); + } + + return NULL; } @@ -299,9 +369,15 @@ char *strdup(const char *s1) int strncasecmp(const char *s1, const char *s2, size_t len) { register int n = len; + while (--n >= 0 && tolower(*s1) == tolower(*s2++)) + { if (*s1++ == '\0') + { return(0); + } + } + return(n<0 ? 0 : tolower(*s1) - tolower(*--s2)); } #endif @@ -316,8 +392,10 @@ uint8_t checksum8( void * start, unsigned int length ) uint8_t * cp = (uint8_t *) start; unsigned int i; - for ( i = 0; i < length; i++) + for (i = 0; i < length; i++) + { csum += *cp++; + } return csum; } From 7fcf15e77e2edfac14ce76127a2883b6115d84d6 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 14:29:09 +0100 Subject: [PATCH 165/623] Use size_t instead of int when required --- i386/libsa/libsa.h | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/i386/libsa/libsa.h b/i386/libsa/libsa.h index 7cba5a5..d2ae491 100755 --- a/i386/libsa/libsa.h +++ b/i386/libsa/libsa.h @@ -20,6 +20,10 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ + * + * Updates: + * - Use size_t instead of int when required (PikerAlpha, November 2012) + * */ #ifndef __BOOT_LIBSA_H @@ -53,22 +57,27 @@ extern int fastEnableA20(void); extern void bzero(void * dst, size_t len); #endif -extern void * memset(void * dst, int c, size_t n); -extern void * memcpy(void * dst, const void * src, size_t len); -extern int memcmp(const void * p1, const void * p2, int len); -extern int strcmp(const char * s1, const char * s2); -extern int strncmp(const char * s1, const char * s2, size_t n); extern char * strcpy(char * s1, const char * s2); extern char * strncpy(char * s1, const char * s2, size_t n); -extern char * strlcpy(char * s1, const char * s2, size_t n); + extern char * strstr(const char *in, const char *str); -extern int atoi(const char * str); -extern int ptol(const char * str); -extern int strlen(const char * str); extern char * strcat(char * s1, const char * s2); extern char * strncat(char * s1, const char * s2, size_t n); extern char * strdup(const char *s1); +extern void * memset(void * dst, int c, size_t n); +extern void * memcpy(void * dst, const void * src, size_t len); + +extern int strcmp(const char * s1, const char * s2); +extern int strncmp(const char * s1, const char * s2, size_t n); +extern int atoi(const char * str); +extern int ptol(const char * str); + +extern int memcmp(const void * p1, const void * p2, size_t len); + +extern size_t strlcpy(char * s1, const char * s2, size_t n); +extern size_t strlen(const char * str); + #if STRNCASECMP extern int strncasecmp(const char * s1, const char * s2, size_t n); #endif From 70118487b04263214817b945fb72ca0f69abbb56 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 14:32:10 +0100 Subject: [PATCH 166/623] White space changes only --- i386/boot2/boot.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 280bba2..1ebeb08 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -30,28 +30,25 @@ */ /* - * INTEL CORPORATION PROPRIETARY INFORMATION + * INTEL CORPORATION PROPRIETARY INFORMATION * - * This software is supplied under the terms of a license agreement or - * nondisclosure agreement with Intel Corporation and may not be copied - * nor disclosed except in accordance with the terms of that agreement. + * This software is supplied under the terms of a license agreement or + * nondisclosure agreement with Intel Corporation and may not be copied + * nor disclosed except in accordance with the terms of that agreement. + * + * Copyright 1988, 1989 by Intel Corporation * - * Copyright 1988, 1989 by Intel Corporation - */ - -/* * Copyright 1993 NeXT Computer, Inc. All rights reserved. * * Completely reworked by Sam Streeper (sam_s@NeXT.com) * Reworked again by Curtis Galloway (galloway@NeXT.com) - */ - -/* + * * Updates: - * - Refactorized by DHP in 2010 and 2011. - * - Optionally include Recovery HD support code (PikerAlpha, November 2012). - * - Fixed clang compilation (PikerAlpha, November 2012). - * - Unused sysConfigValid removed and white space fix (PikerAlpha, November 2012). + * - Refactorized by DHP in 2010 and 2011. + * - Optionally include Recovery HD support code (PikerAlpha, November 2012). + * - Fixed clang compilation (PikerAlpha, November 2012). + * - Unused sysConfigValid removed and white space fix (PikerAlpha, November 2012). + * */ @@ -122,7 +119,7 @@ unsigned long Adler32(unsigned char *buf, long len) static void zeroBSS() { extern int _DATA_bss__start __asm("section$start$__DATA$__bss"); - extern int _DATA_bss__end __asm("section$end$__DATA$__bss"); + extern int _DATA_bss__end __asm("section$end$__DATA$__bss"); extern int _DATA_common__start __asm("section$start$__DATA$__common"); extern int _DATA_common__end __asm("section$end$__DATA$__common"); From fef08f4dd74da5d7ac3433101b1dcfeb278e50fb Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 14:34:21 +0100 Subject: [PATCH 167/623] Really removing sysConfigValid --- i386/boot2/boot.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/i386/boot2/boot.h b/i386/boot2/boot.h index e243f8d..bb3c6c8 100755 --- a/i386/boot2/boot.h +++ b/i386/boot2/boot.h @@ -24,7 +24,7 @@ * Copyright 1994 NeXT Computer, Inc. All rights reserved. * * Updates: - * - Unused sysConfigValid removed (PikerAlpha, November 2012). + * - Unused sysConfigValid removed (PikerAlpha, November 2012). * */ @@ -105,7 +105,6 @@ // A global set by boot() to record the device that the booter was loaded from. extern long gBootMode; -extern bool sysConfigValid; extern char bootPrompt[]; // Kernel Boot Modes From a86aae1407b999d0e40e11192fb673d093fb3cb7 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 14:40:53 +0100 Subject: [PATCH 168/623] Now using my bash script instead of segsize.c --- i386/util/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/i386/util/Makefile b/i386/util/Makefile index aaa3484..8651f6e 100644 --- a/i386/util/Makefile +++ b/i386/util/Makefile @@ -6,9 +6,9 @@ # - Major cleanup (PikerAlpha, October 2012). # - Fixed clang compilation (dgsga, November 2012. Credits to Evan Lojewski for original work). # - Output improved (PikerAlpha, October 2012). +# - Now using my bash script instead of segsize.c (PikerAlpha, November 2012). # - include ../MakePaths.dir VPATH = $(OBJROOT):$(SYMROOT) @@ -19,10 +19,10 @@ CFLAGS = $(RC_CFLAGS) $(OPTIM) -Wmost -Werror -g LDFLAGS = DEFINES= -PROGRAMS = machOconv segsize -OBJS = machOconv.o segsize.o +PROGRAMS = machOconv +OBJS = machOconv.o -DIRS_NEEDED = $(OBJROOT) $(SYMROOT) $(LANGDIR) +DIRS_NEEDED = $(OBJROOT) $(SYMROOT) $(MAKEGOAL): $(DIRS_NEEDED) $(PROGRAMS) From f1858c0fee3c8d2fb6c0f16b9db2a0ccbdd71470 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 15:09:54 +0100 Subject: [PATCH 169/623] Unused code removed and whitespace fixes --- i386/libsaio/fdisk.h | 94 ++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/i386/libsaio/fdisk.h b/i386/libsaio/fdisk.h index 9c51847..a6634cd 100755 --- a/i386/libsaio/fdisk.h +++ b/i386/libsaio/fdisk.h @@ -28,62 +28,62 @@ * * HISTORY * - * 8 July 1992 David E. Bohman at NeXT - * Created. + * 8 July 1992 David E. Bohman at NeXT Created. + * + * Updates: + * - Spaces replaced with tabs (PikerAlpha, November 2012) + * - Unused 'REAL_disk_blk0' removed (PikerAlpha, November 2012) + * */ - + + #ifndef __LIBSAIO_FDISK_H #define __LIBSAIO_FDISK_H -#define DISK_BLK0 0 /* blkno of boot block */ -#define DISK_BLK0SZ 512 /* size of boot block */ -#define DISK_BOOTSZ 446 /* size of boot code in boot block */ -#define DISK_SIGNATURE 0xAA55 /* signature of the boot record */ -#define FDISK_NPART 4 /* number of entries in fdisk table */ -#define FDISK_ACTIVE 0x80 /* indicator of active partition */ -#define FDISK_NEXTNAME 0xA7 /* indicator of NeXT partition */ -#define FDISK_DOS12 0x01 /* 12-bit fat < 10MB dos partition */ -#define FDISK_DOS16S 0x04 /* 16-bit fat < 32MB dos partition */ -#define FDISK_DOSEXT 0x05 /* extended dos partition */ -#define FDISK_DOS16B 0x06 /* 16-bit fat >= 32MB dos partition */ -#define FDISK_NTFS 0x07 /* NTFS partition */ -#define FDISK_SMALLFAT32 0x0b /* FAT32 partition */ -#define FDISK_FAT32 0x0c /* FAT32 partition */ +#define DISK_BLK0 0 // Block number of boot block +#define DISK_BLK0SZ 512 // Size of boot block +#define DISK_BOOTSZ 446 // Size of boot code in boot block +#define DISK_SIGNATURE 0xAA55 // signature of the boot record +#define FDISK_NPART 4 // Number of entries in fdisk table +#define FDISK_ACTIVE 0x80 // Indicator of active partition +#define FDISK_NEXTNAME 0xA7 // Indicator of NeXT partition +#define FDISK_DOS12 0x01 // 12-bit fat < 10MB dos partition +#define FDISK_DOS16S 0x04 // 16-bit fat < 32MB dos partition +#define FDISK_DOSEXT 0x05 // Extended DOS partition +#define FDISK_DOS16B 0x06 // 16-bit fat >= 32MB dos partition +#define FDISK_NTFS 0x07 // NTFS partition +#define FDISK_SMALLFAT32 0x0b // FAT32 partition +#define FDISK_FAT32 0x0c // FAT32 partition #define FDISK_DOS16SLBA 0x0e #define FDISK_LINUX 0x83 -#define FDISK_UFS 0xa8 /* Apple UFS partition */ -#define FDISK_HFS 0xaf /* Apple HFS partition */ -#define FDISK_BOOTER 0xab /* Apple booter partition */ +#define FDISK_UFS 0xa8 // Apple UFS partition +#define FDISK_HFS 0xaf // Apple HFS partition +#define FDISK_BOOTER 0xab // Apple booter partition -/* - * Format of fdisk partion entry (if present). - */ -struct fdisk_part { - unsigned char bootid; /* bootable or not */ - unsigned char beghead; /* begining head, sector, cylinder */ - unsigned char begsect; /* begcyl is a 10-bit number */ - unsigned char begcyl; /* High 2 bits are in begsect */ - unsigned char systid; /* OS type */ - unsigned char endhead; /* ending head, sector, cylinder */ - unsigned char endsect; /* endcyl is a 10-bit number */ - unsigned char endcyl; /* High 2 bits are in endsect */ - unsigned long relsect; /* partion physical offset on disk */ - unsigned long numsect; /* number of sectors in partition */ +// Format of fdisk partion entry (if present). + +struct fdisk_part +{ + unsigned char bootid; // Bootable or not + unsigned char beghead; // Begining head, sector, cylinder + unsigned char begsect; // Beginning cylinder is a 10-bit number + unsigned char begcyl; // High 2 bits are in begsect + unsigned char systid; // OS type + unsigned char endhead; // Ending head, sector, cylinder + unsigned char endsect; // Endcyl is a 10-bit number + unsigned char endcyl; // High 2 bits are in endsect + unsigned long relsect; // Partion physical offset on disk + unsigned long numsect; // Number of sectors in partition } __attribute__((packed)); -/* - * Format of boot block. - */ -struct disk_blk0 { - unsigned char bootcode[DISK_BOOTSZ]; - unsigned char parts[FDISK_NPART][sizeof (struct fdisk_part)]; - unsigned short signature; -}; -struct REAL_disk_blk0 { - unsigned char bootcode[DISK_BOOTSZ]; - struct fdisk_part parts[FDISK_NPART]; - unsigned short signature; -} __attribute__((packed)); +// Format of boot block. + +struct disk_blk0 +{ + unsigned char bootcode[DISK_BOOTSZ]; + unsigned char parts[FDISK_NPART][sizeof (struct fdisk_part)]; + unsigned short signature; +}; #endif /* !__LIBSAIO_FDISK_H */ From 4303a8488cbfcd859d0beb302955af48d78d8052 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 17 Nov 2012 15:44:44 +0100 Subject: [PATCH 170/623] Cleanups and spaces -> tabs --- i386/libsaio/hfs.c | 1325 ++++++++++++++++++++++---------------------- 1 file changed, 674 insertions(+), 651 deletions(-) diff --git a/i386/libsaio/hfs.c b/i386/libsaio/hfs.c index f980a6e..8a94a5d 100755 --- a/i386/libsaio/hfs.c +++ b/i386/libsaio/hfs.c @@ -2,13 +2,13 @@ * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * The contents of this file constitute Original Code as defined in and * are subject to the Apple Public Source License Version 2.0 (the * "License"). You may not use this file except in compliance with the * License. Please obtain a copy of the License at * http://www.apple.com/publicsource and read it before using this file. - * + * * This Original Code and all software distributed under the License are * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -16,7 +16,7 @@ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the * License for the specific language governing rights and limitations * under the License. - * + * * @APPLE_LICENSE_HEADER_END@ * * hfs.c - File System Module for HFS and HFS+. @@ -27,6 +27,7 @@ * * Updates: * - OSBigEndian removed and white space changes (PikerAlpha, November 2012) + * - Cleanups and spaces -> tabs (PikerAlpha, November 2012) * */ @@ -42,40 +43,33 @@ #define kBTreeCatalog (0) #define kBTreeExtents (1) +static CICell gCurrentIH; +static long long gAllocationOffset; +static long gIsHFSPlus; +static long gBlockSize; +static long gCaseSensitive; +static long gCacheBlockSize; +static BTHeaderRec *gBTHeaders[2]; +static long long gVolID; + #ifdef __i386__ -static CICell gCurrentIH; -static long long gAllocationOffset; -static long gIsHFSPlus; -static long gCaseSensitive; -static long gBlockSize; -static long gCacheBlockSize; -static char *gBTreeHeaderBuffer; -static BTHeaderRec *gBTHeaders[2]; -static char *gHFSMdbVib; -static HFSMasterDirectoryBlock *gHFSMDB; -static char *gHFSPlusHeader; -static HFSPlusVolumeHeader *gHFSPlus; -static char *gLinkTemp; -static long long gVolID; -static char *gTempStr; +static char *gBTreeHeaderBuffer; +static char *gHFSMdbVib; +static HFSMasterDirectoryBlock *gHFSMDB; +static char *gHFSPlusHeader; +static HFSPlusVolumeHeader *gHFSPlus; +static char *gLinkTemp; +static char *gTempStr; #else /* !__i386__ */ -static CICell gCurrentIH; -static long long gAllocationOffset; -static long gIsHFSPlus; -static long gBlockSize; -static long gCaseSensitive; -static long gCacheBlockSize; -static char gBTreeHeaderBuffer[512]; -static BTHeaderRec *gBTHeaders[2]; -static char gHFSMdbVib[kBlockSize]; -static HFSMasterDirectoryBlock *gHFSMDB =(HFSMasterDirectoryBlock*)gHFSMdbVib; -static char gHFSPlusHeader[kBlockSize]; -static HFSPlusVolumeHeader *gHFSPlus =(HFSPlusVolumeHeader*)gHFSPlusHeader; -static char gLinkTemp[64]; -static long long gVolID; +static char gBTreeHeaderBuffer[512]; +static char gHFSMdbVib[kBlockSize]; +static HFSMasterDirectoryBlock *gHFSMDB =(HFSMasterDirectoryBlock*)gHFSMdbVib; +static char gHFSPlusHeader[kBlockSize]; +static HFSPlusVolumeHeader *gHFSPlus =(HFSPlusVolumeHeader*)gHFSPlusHeader; +static char gLinkTemp[64]; #endif /* !__i386__ */ @@ -108,10 +102,10 @@ extern long BinaryUnicodeCompare(u_int16_t *uniStr1, u_int32_t len1, u_int16_t * static void SwapFinderInfo(FndrFileInfo *dst, FndrFileInfo *src) { - dst->fdType = SWAP_BE32(src->fdType); - dst->fdCreator = SWAP_BE32(src->fdCreator); - dst->fdFlags = SWAP_BE16(src->fdFlags); - // Don't bother with location + dst->fdType = SWAP_BE32(src->fdType); + dst->fdCreator = SWAP_BE32(src->fdCreator); + dst->fdFlags = SWAP_BE16(src->fdFlags); + // Don't bother with location } @@ -119,9 +113,12 @@ static void SwapFinderInfo(FndrFileInfo *dst, FndrFileInfo *src) void HFSFree(CICell ih) { - if(gCurrentIH == ih) - gCurrentIH = 0; - free(ih); + if(gCurrentIH == ih) + { + gCurrentIH = 0; + } + + free(ih); } @@ -129,18 +126,20 @@ void HFSFree(CICell ih) bool HFSProbe (const void *buf) { - const HFSMasterDirectoryBlock *mdb; - const HFSPlusVolumeHeader *header; - mdb = (const HFSMasterDirectoryBlock *)(((const char*)buf)+kMDBBaseOffset); - header = (const HFSPlusVolumeHeader *)(((const char*)buf)+kMDBBaseOffset); + const HFSMasterDirectoryBlock *mdb = (const HFSMasterDirectoryBlock *)(((const char*)buf)+kMDBBaseOffset); + const HFSPlusVolumeHeader *header = (const HFSPlusVolumeHeader *)(((const char*)buf)+kMDBBaseOffset); - if (SWAP_BE16(mdb->drSigWord) == kHFSSigWord) - return true; - - if (SWAP_BE16(header->signature) != kHFSPlusSigWord && SWAP_BE16(header->signature) != kHFSXSigWord) - return false; - - return true; + if (SWAP_BE16(mdb->drSigWord) == kHFSSigWord) + { + return true; + } + + if (SWAP_BE16(header->signature) != kHFSPlusSigWord && SWAP_BE16(header->signature) != kHFSXSigWord) + { + return false; + } + + return true; } @@ -148,130 +147,138 @@ bool HFSProbe (const void *buf) long HFSInitPartition(CICell ih) { - long extentSize, extentFile, nodeSize; - void *extent; - - if (ih == gCurrentIH) + long extentSize, extentFile, nodeSize; + void *extent; + + if (ih == gCurrentIH) { #ifdef __i386__ - CacheInit(ih, gCacheBlockSize); + CacheInit(ih, gCacheBlockSize); #endif - return 0; - } - + return 0L; + } + #ifdef __i386__ - if (!gTempStr) + if (!gTempStr) + { gTempStr = (char *)malloc(4096); - - if (!gLinkTemp) + } + + if (!gLinkTemp) + { gLinkTemp = (char *)malloc(64); - - if (!gBTreeHeaderBuffer) + } + + if (!gBTreeHeaderBuffer) + { gBTreeHeaderBuffer = (char *)malloc(512); - - if (!gHFSMdbVib) + } + + if (!gHFSMdbVib) { - gHFSMdbVib = (char *)malloc(kBlockSize); - gHFSMDB = (HFSMasterDirectoryBlock *)gHFSMdbVib; - } - - if (!gHFSPlusHeader) + gHFSMdbVib = (char *)malloc(kBlockSize); + gHFSMDB = (HFSMasterDirectoryBlock *)gHFSMdbVib; + } + + if (!gHFSPlusHeader) { - gHFSPlusHeader = (char *)malloc(kBlockSize); - gHFSPlus = (HFSPlusVolumeHeader *)gHFSPlusHeader; - } - - if (!gTempStr || !gLinkTemp || !gBTreeHeaderBuffer || !gHFSMdbVib || !gHFSPlusHeader) return -1; + gHFSPlusHeader = (char *)malloc(kBlockSize); + gHFSPlus = (HFSPlusVolumeHeader *)gHFSPlusHeader; + } + + if (!gTempStr || !gLinkTemp || !gBTreeHeaderBuffer || !gHFSMdbVib || !gHFSPlusHeader) + { + return -1L; + } #endif /* __i386__ */ - - gAllocationOffset = 0; - gIsHFSPlus = 0; - gCaseSensitive = 0; - gBTHeaders[0] = 0; - gBTHeaders[1] = 0; - - // Look for the HFS MDB - Seek(ih, kMDBBaseOffset); - Read(ih, (long)gHFSMdbVib, kBlockSize); - - if (SWAP_BE16(gHFSMDB->drSigWord) == kHFSSigWord) + + gAllocationOffset = 0; + gIsHFSPlus = 0; + gCaseSensitive = 0; + gBTHeaders[0] = 0; + gBTHeaders[1] = 0; + + // Look for the HFS MDB + Seek(ih, kMDBBaseOffset); + Read(ih, (long)gHFSMdbVib, kBlockSize); + + if (SWAP_BE16(gHFSMDB->drSigWord) == kHFSSigWord) { - gAllocationOffset = SWAP_BE16(gHFSMDB->drAlBlSt) * kBlockSize; - - // See if it is HFSPlus - if (SWAP_BE16(gHFSMDB->drEmbedSigWord) != kHFSPlusSigWord) + gAllocationOffset = SWAP_BE16(gHFSMDB->drAlBlSt) * kBlockSize; + + // See if it is HFSPlus + if (SWAP_BE16(gHFSMDB->drEmbedSigWord) != kHFSPlusSigWord) { - // Normal HFS; - gCacheBlockSize = gBlockSize = SWAP_BE32(gHFSMDB->drAlBlkSiz); - CacheInit(ih, gCacheBlockSize); - gCurrentIH = ih; - - // grab the 64 bit volume ID - bcopy(&gHFSMDB->drFndrInfo[6], &gVolID, 8); - - // Get the Catalog BTree node size. - extent = (HFSExtentDescriptor *)&gHFSMDB->drCTExtRec; - extentSize = SWAP_BE32(gHFSMDB->drCTFlSize); - extentFile = kHFSCatalogFileID; - ReadExtent(extent, extentSize, extentFile, 0, 256, gBTreeHeaderBuffer + kBTreeCatalog * 256, 0); - - nodeSize = SWAP_BE16(((BTHeaderRec *)(gBTreeHeaderBuffer + kBTreeCatalog * 256 + - sizeof(BTNodeDescriptor)))->nodeSize); - - // If the BTree node size is larger than the block size, reset the cache. - if (nodeSize > gBlockSize) + // Normal HFS; + gCacheBlockSize = gBlockSize = SWAP_BE32(gHFSMDB->drAlBlkSiz); + CacheInit(ih, gCacheBlockSize); + gCurrentIH = ih; + + // grab the 64 bit volume ID + bcopy(&gHFSMDB->drFndrInfo[6], &gVolID, 8); + + // Get the Catalog BTree node size. + extent = (HFSExtentDescriptor *)&gHFSMDB->drCTExtRec; + extentSize = SWAP_BE32(gHFSMDB->drCTFlSize); + extentFile = kHFSCatalogFileID; + ReadExtent(extent, extentSize, extentFile, 0, 256, gBTreeHeaderBuffer + kBTreeCatalog * 256, 0); + + nodeSize = SWAP_BE16(((BTHeaderRec *)(gBTreeHeaderBuffer + kBTreeCatalog * 256 + sizeof(BTNodeDescriptor)))->nodeSize); + + // If the BTree node size is larger than the block size, reset the cache. + if (nodeSize > gBlockSize) { - gCacheBlockSize = nodeSize; - CacheInit(ih, gCacheBlockSize); - } - - return 0; - } - - // Calculate the offset to the embeded HFSPlus volume. - gAllocationOffset += (long long)SWAP_BE16(gHFSMDB->drEmbedExtent.startBlock) * - SWAP_BE32(gHFSMDB->drAlBlkSiz); - } - - // Look for the HFSPlus Header - Seek(ih, gAllocationOffset + kMDBBaseOffset); - Read(ih, (long)gHFSPlusHeader, kBlockSize); - - // Not a HFS+ or HFSX volume. - if (SWAP_BE16(gHFSPlus->signature) != kHFSPlusSigWord && SWAP_BE16(gHFSPlus->signature) != kHFSXSigWord) + gCacheBlockSize = nodeSize; + CacheInit(ih, gCacheBlockSize); + } + + return 0L; + } + + // Calculate the offset to the embeded HFSPlus volume. + gAllocationOffset += (long long)SWAP_BE16(gHFSMDB->drEmbedExtent.startBlock) * SWAP_BE32(gHFSMDB->drAlBlkSiz); + } + + // Look for the HFSPlus Header + Seek(ih, gAllocationOffset + kMDBBaseOffset); + Read(ih, (long)gHFSPlusHeader, kBlockSize); + + // Not a HFS+ or HFSX volume. + if (SWAP_BE16(gHFSPlus->signature) != kHFSPlusSigWord && SWAP_BE16(gHFSPlus->signature) != kHFSXSigWord) { verbose("HFS signature was not present.\n"); gCurrentIH = 0; - return -1; - } - - gIsHFSPlus = 1; - gCacheBlockSize = gBlockSize = SWAP_BE32(gHFSPlus->blockSize); - CacheInit(ih, gCacheBlockSize); - gCurrentIH = ih; - + + return -1L; + } + + gIsHFSPlus = 1; + gCacheBlockSize = gBlockSize = SWAP_BE32(gHFSPlus->blockSize); + CacheInit(ih, gCacheBlockSize); + gCurrentIH = ih; + ih->modTime = SWAP_BE32(gHFSPlus->modifyDate) - 2082844800; - // grab the 64 bit volume ID - bcopy(&gHFSPlus->finderInfo[24], &gVolID, 8); - - // Get the Catalog BTree node size. - extent = &gHFSPlus->catalogFile.extents; - extentSize = SWAP_BE64(gHFSPlus->catalogFile.logicalSize); - extentFile = kHFSCatalogFileID; - - ReadExtent(extent, extentSize, extentFile, 0, 256, gBTreeHeaderBuffer + kBTreeCatalog * 256, 0); - - nodeSize = SWAP_BE16(((BTHeaderRec *)(gBTreeHeaderBuffer + kBTreeCatalog * 256 + sizeof(BTNodeDescriptor)))->nodeSize); - - // If the BTree node size is larger than the block size, reset the cache. - if (nodeSize > gBlockSize) + // grab the 64 bit volume ID + bcopy(&gHFSPlus->finderInfo[24], &gVolID, 8); + + // Get the Catalog BTree node size. + extent = &gHFSPlus->catalogFile.extents; + extentSize = SWAP_BE64(gHFSPlus->catalogFile.logicalSize); + extentFile = kHFSCatalogFileID; + + ReadExtent(extent, extentSize, extentFile, 0, 256, gBTreeHeaderBuffer + kBTreeCatalog * 256, 0); + + nodeSize = SWAP_BE16(((BTHeaderRec *)(gBTreeHeaderBuffer + kBTreeCatalog * 256 + sizeof(BTNodeDescriptor)))->nodeSize); + + // If the BTree node size is larger than the block size, reset the cache. + if (nodeSize > gBlockSize) { - gCacheBlockSize = nodeSize; - CacheInit(ih, gCacheBlockSize); - } - - return 0; + gCacheBlockSize = nodeSize; + CacheInit(ih, gCacheBlockSize); + } + + return 0L; } @@ -279,7 +286,7 @@ long HFSInitPartition(CICell ih) long HFSLoadFile(CICell ih, char * filePath) { - return HFSReadFile(ih, filePath, (void *)gFSLoadAddress, 0, 0); + return HFSReadFile(ih, filePath, (void *)gFSLoadAddress, 0, 0); } @@ -287,81 +294,67 @@ long HFSLoadFile(CICell ih, char * filePath) long HFSReadFile(CICell ih, char * filePath, void *base, uint64_t offset, uint64_t length) { - char entry[512]; - long dirID, result, flags; - // bool thinFatReadRequest = (length == 4096 && offset == 0); - - if (HFSInitPartition(ih) == -1) + char entry[512]; + long dirID, result, flags; + + if (HFSInitPartition(ih) == -1) { return -1; } - - dirID = kHFSRootFolderID; - // Skip a lead '\'. Start in the system folder if there are two. - if (filePath[0] == '/') + + dirID = kHFSRootFolderID; + + // Skip a lead '\'. Start in the system folder if there are two. + if (filePath[0] == '/') { - if (filePath[1] == '/') + if (filePath[1] == '/') { - if (gIsHFSPlus) + if (gIsHFSPlus) { dirID = SWAP_BE32(((long *)gHFSPlus->finderInfo)[5]); } - else + else { dirID = SWAP_BE32(gHFSMDB->drFndrInfo[5]); } - - if (dirID == 0) + + if (dirID == 0) { - return -1; + return -1L; } - filePath++; - } - filePath++; - } - - result = ResolvePathToCatalogEntry(filePath, &flags, entry, dirID, 0); - - if ((result == -1) || ((flags & kFileTypeMask) != kFileTypeFlat)) + + filePath++; + } + + filePath++; + } + + result = ResolvePathToCatalogEntry(filePath, &flags, entry, dirID, 0); + + if ((result == -1) || ((flags & kFileTypeMask) != kFileTypeFlat)) { - return -1; - } - + return -1L; + } + #if UNUSED - // Not yet for Intel. System.config/Default.table will fail this check. - // Check file owner and permissions. - if (flags & (kOwnerNotRoot | kPermGroupWrite | kPermOtherWrite)) + // Not yet for Intel. System.config/Default.table will fail this check. + // Check file owner and permissions. + if (flags & (kOwnerNotRoot | kPermGroupWrite | kPermOtherWrite)) { - return -1; + return -1L; } #endif - - /* if (thinFatReadRequest) - { - length = 0; // Zero will make it load the whole file at once. - } */ - - if (ReadFile(entry, &length, base, offset) == -1) - { - return -1; - } - - /* if (thinFatReadRequest) + + if (ReadFile(entry, &length, base, offset) == -1) { - unsigned long length2 = 0; - printf("thinFatReadRequest()\n"); - ReadFile(entry, &length2, base + 4096, 0); - length += length2; - return 0; // Zero prevents ThinFatFile() from calling us again. - } */ - -#if CHAMELEON - verbose("Loaded HFS%s file: [%s] %d bytes from %x.\n", (gIsHFSPlus ? "+" : ""), filePath, (uint32_t)length, ih); -#elif DEBUG + return -1L; + } + +#if DEBUG printf("Loaded [%s] %d bytes.\n", filePath, (uint32_t)length); #endif - return length; + return length; } @@ -370,21 +363,21 @@ long HFSReadFile(CICell ih, char * filePath, void *base, uint64_t offset, uint64 long HFSGetDirEntry(CICell ih, char * dirPath, long * dirIndex, char ** name, long * flags, long * time, FinderInfo * finderInfo, long * infoValid) { char entry[512]; - + long dirID, dirFlags; - + if (HFSInitPartition(ih) == -1) { return -1; } - + if (*dirIndex == -1) { return -1; } - + dirID = kHFSRootFolderID; - + // Skip a lead '\'. Start in the system folder if there are two. if (dirPath[0] == '/') { @@ -394,49 +387,49 @@ long HFSGetDirEntry(CICell ih, char * dirPath, long * dirIndex, char ** name, lo { dirID = SWAP_BE32(((long *)gHFSPlus->finderInfo)[5]); } - else + else { dirID = SWAP_BE32(gHFSMDB->drFndrInfo[5]); } - + if (dirID == 0) { return -1; } - + dirPath++; } - + dirPath++; } - + if (*dirIndex == 0) { ResolvePathToCatalogEntry(dirPath, &dirFlags, entry, dirID, dirIndex); - + if (*dirIndex == 0) { *dirIndex = -1; } - + if ((dirFlags & kFileTypeMask) != kFileTypeUnknown) { return -1; } } - + GetCatalogEntry(dirIndex, name, flags, time, finderInfo, infoValid); - + if (*dirIndex == 0) { *dirIndex = -1; } - + if ((*flags & kFileTypeMask) == kFileTypeUnknown) { return -1; } - + return 0; } @@ -450,24 +443,24 @@ void HFSGetDescription(CICell ih, char *str, long strMaxLen) long dirIndex; char *name; long flags, time; - + if (HFSInitPartition(ih) == -1) { return; } - + /* Fill some crucial data structures by side effect. */ dirIndex = 0; HFSGetDirEntry(ih, "/", &dirIndex, &name, &flags, &time, 0, 0); - + /* Now we can loook up the volume name node. */ nodeSize = SWAP_BE16(gBTHeaders[kBTreeCatalog]->nodeSize); firstLeafNode = SWAP_BE32(gBTHeaders[kBTreeCatalog]->firstLeafNode); - + dirIndex = firstLeafNode * nodeSize; - + GetCatalogEntry(&dirIndex, &name, &flags, &time, 0, 0); - + strncpy(str, name, strMaxLen); str[strMaxLen] = '\0'; } @@ -477,62 +470,73 @@ void HFSGetDescription(CICell ih, char *str, long strMaxLen) long HFSGetFileBlock(CICell ih, char *filePath, unsigned long long *firstBlock) { - char entry[512]; - long dirID, result, flags; - void *extents; - HFSCatalogFile *hfsFile = (void *)entry; - HFSPlusCatalogFile *hfsPlusFile = (void *)entry; - - if (HFSInitPartition(ih) == -1) return -1; - - dirID = kHFSRootFolderID; - // Skip a lead '\'. Start in the system folder if there are two. - if (filePath[0] == '/') + char entry[512]; + long dirID, result, flags; + void *extents; + + HFSCatalogFile *hfsFile = (void *)entry; + HFSPlusCatalogFile *hfsPlusFile = (void *)entry; + + if (HFSInitPartition(ih) == -1) + { + return -1L; + } + + dirID = kHFSRootFolderID; + + // Skip a lead '\'. Start in the system folder if there are two. + + if (filePath[0] == '/') { - if (filePath[1] == '/') + if (filePath[1] == '/') { - if (gIsHFSPlus) + if (gIsHFSPlus) { dirID = SWAP_BE32(((long *) gHFSPlus->finderInfo)[5]); } - else + else { dirID = SWAP_BE32(gHFSMDB->drFndrInfo[5]); } - + if (dirID == 0) { return -1; } - filePath++; - } - filePath++; - } - - result = ResolvePathToCatalogEntry(filePath, &flags, entry, dirID, 0); - - if ((result == -1) || ((flags & kFileTypeMask) != kFileTypeFlat)) + + filePath++; + } + + filePath++; + } + + result = ResolvePathToCatalogEntry(filePath, &flags, entry, dirID, 0); + + if ((result == -1) || ((flags & kFileTypeMask) != kFileTypeFlat)) { - printf("HFS: Resolve path %s failed\n", filePath); - return -1; - } - - if (gIsHFSPlus) + printf("HFS: Resolve path %s failed\n", filePath); + + return -1L; + } + + if (gIsHFSPlus) { - extents = &hfsPlusFile->dataFork.extents; - } + extents = &hfsPlusFile->dataFork.extents; + } else { - extents = &hfsFile->dataExtents; - } - + extents = &hfsFile->dataExtents; + } + #if DEBUG - printf("extent start 0x%x\n", (unsigned long)GetExtentStart(extents, 0)); - printf("block size 0x%x\n", (unsigned long)gBlockSize); - printf("Allocation offset 0x%x\n", (unsigned long)gAllocationOffset); + printf("extent start 0x%x\n", (unsigned long)GetExtentStart(extents, 0)); + printf("block size 0x%x\n", (unsigned long)gBlockSize); + printf("Allocation offset 0x%x\n", (unsigned long)gAllocationOffset); #endif - *firstBlock = ((unsigned long long)GetExtentStart(extents, 0) * (unsigned long long) gBlockSize + gAllocationOffset) / 512ULL; - return 0; + + *firstBlock = ((unsigned long long)GetExtentStart(extents, 0) * (unsigned long long) gBlockSize + gAllocationOffset) / 512ULL; + + return 0L; } @@ -540,13 +544,17 @@ long HFSGetFileBlock(CICell ih, char *filePath, unsigned long long *firstBlock) long HFSGetUUID(CICell ih, char *uuidStr) { - if (HFSInitPartition(ih) == -1) + if (HFSInitPartition(ih) == -1) + { return -1; - - if (gVolID == 0LL) + } + + if (gVolID == 0LL) + { return -1; - - return CreateUUIDString((uint8_t*)(&gVolID), sizeof(gVolID), uuidStr); + } + + return CreateUUIDString((uint8_t*)(&gVolID), sizeof(gVolID), uuidStr); } @@ -555,44 +563,42 @@ long HFSGetUUID(CICell ih, char *uuidStr) static long ReadFile(void * file, uint64_t * length, void * base, uint64_t offset) { - void *extents; - long fileID; - uint64_t fileLength; - HFSCatalogFile *hfsFile = file; - HFSPlusCatalogFile *hfsPlusFile = file; - - if (gIsHFSPlus) - { - fileID = SWAP_BE32(hfsPlusFile->fileID); - fileLength = (uint64_t)SWAP_BE64(hfsPlusFile->dataFork.logicalSize); - extents = &hfsPlusFile->dataFork.extents; - } + void *extents; + long fileID; + + uint64_t fileLength; + + HFSCatalogFile *hfsFile = file; + HFSPlusCatalogFile *hfsPlusFile = file; + + if (gIsHFSPlus) + { + fileID = SWAP_BE32(hfsPlusFile->fileID); + fileLength = (uint64_t)SWAP_BE64(hfsPlusFile->dataFork.logicalSize); + extents = &hfsPlusFile->dataFork.extents; + } else { - fileID = SWAP_BE32(hfsFile->fileID); - fileLength = SWAP_BE32(hfsFile->dataLogicalSize); - extents = &hfsFile->dataExtents; - } - - if (offset > fileLength) + fileID = SWAP_BE32(hfsFile->fileID); + fileLength = SWAP_BE32(hfsFile->dataLogicalSize); + extents = &hfsFile->dataExtents; + } + + if (offset > fileLength) { - printf("Offset is too large.\n"); - return -1; - } - - if ((*length == 0) || ((offset + *length) > fileLength)) + printf("Offset is too large.\n"); + + return -1L; + } + + if ((*length == 0) || ((offset + *length) > fileLength)) { - *length = fileLength - offset; - } - -/* if (*length > kLoadSize) { - printf("File is too large.\n"); - return -1; - }*/ - - *length = ReadExtent((char *)extents, fileLength, fileID, offset, *length, (char *)base, 0); - - return 0; + *length = fileLength - offset; + } + + *length = ReadExtent((char *)extents, fileLength, fileID, offset, *length, (char *)base, 0); + + return 0L; } @@ -600,68 +606,83 @@ static long ReadFile(void * file, uint64_t * length, void * base, uint64_t offse static long GetCatalogEntryInfo(void * entry, long * flags, long * time, FinderInfo * finderInfo, long * infoValid) { - long tmpTime = 0; - long valid = 0; - - // Get information about the file. - - switch (SWAP_BE16(*(short *)entry)) - { - case kHFSFolderRecord : - *flags = kFileTypeDirectory; - tmpTime = SWAP_BE32(((HFSCatalogFolder *)entry)->modifyDate); - break; - - case kHFSPlusFolderRecord : - *flags = kFileTypeDirectory | - (SWAP_BE16(((HFSPlusCatalogFolder *)entry)->bsdInfo.fileMode) & kPermMask); - if (SWAP_BE32(((HFSPlusCatalogFolder *)entry)->bsdInfo.ownerID) != 0) - *flags |= kOwnerNotRoot; - tmpTime = SWAP_BE32(((HFSPlusCatalogFolder *)entry)->contentModDate); - break; - - case kHFSFileRecord : - *flags = kFileTypeFlat; - tmpTime = SWAP_BE32(((HFSCatalogFile *)entry)->modifyDate); - if (finderInfo) { - SwapFinderInfo((FndrFileInfo *)finderInfo, &((HFSCatalogFile *)entry)->userInfo); - valid = 1; - } - break; - - case kHFSPlusFileRecord : - *flags = kFileTypeFlat | - (SWAP_BE16(((HFSPlusCatalogFile *)entry)->bsdInfo.fileMode) & kPermMask); - if (SWAP_BE32(((HFSPlusCatalogFile *)entry)->bsdInfo.ownerID) != 0) - *flags |= kOwnerNotRoot; - tmpTime = SWAP_BE32(((HFSPlusCatalogFile *)entry)->contentModDate); - if (finderInfo) { - SwapFinderInfo((FndrFileInfo *)finderInfo, &((HFSPlusCatalogFile *)entry)->userInfo); - valid = 1; - } - break; - - case kHFSFileThreadRecord : - case kHFSPlusFileThreadRecord : - case kHFSFolderThreadRecord : - case kHFSPlusFolderThreadRecord : - *flags = kFileTypeUnknown; - tmpTime = 0; - break; + long tmpTime = 0L; + long valid = 0L; + + // Get information about the file. + + switch (SWAP_BE16(*(short *)entry)) + { + case kHFSFolderRecord: + *flags = kFileTypeDirectory; + tmpTime = SWAP_BE32(((HFSCatalogFolder *)entry)->modifyDate); + + break; + + case kHFSPlusFolderRecord: + *flags = kFileTypeDirectory | (SWAP_BE16(((HFSPlusCatalogFolder *)entry)->bsdInfo.fileMode) & kPermMask); + + if (SWAP_BE32(((HFSPlusCatalogFolder *)entry)->bsdInfo.ownerID) != 0) + { + *flags |= kOwnerNotRoot; + } + + tmpTime = SWAP_BE32(((HFSPlusCatalogFolder *)entry)->contentModDate); + + break; + + case kHFSFileRecord: + *flags = kFileTypeFlat; + tmpTime = SWAP_BE32(((HFSCatalogFile *)entry)->modifyDate); + + if (finderInfo) + { + SwapFinderInfo((FndrFileInfo *)finderInfo, &((HFSCatalogFile *)entry)->userInfo); + valid = 1; + } + + break; + + case kHFSPlusFileRecord: + *flags = kFileTypeFlat | (SWAP_BE16(((HFSPlusCatalogFile *)entry)->bsdInfo.fileMode) & kPermMask); + + if (SWAP_BE32(((HFSPlusCatalogFile *)entry)->bsdInfo.ownerID) != 0) + { + *flags |= kOwnerNotRoot; + } + + tmpTime = SWAP_BE32(((HFSPlusCatalogFile *)entry)->contentModDate); + + if (finderInfo) + { + SwapFinderInfo((FndrFileInfo *)finderInfo, &((HFSPlusCatalogFile *)entry)->userInfo); + valid = 1; + } + + break; + + case kHFSFileThreadRecord: + case kHFSPlusFileThreadRecord: + case kHFSFolderThreadRecord: + case kHFSPlusFolderThreadRecord: + *flags = kFileTypeUnknown; + tmpTime = 0; + + break; } - + if (time != 0) { // Convert base time from 1904 to 1970. *time = tmpTime - 2082844800; } - + if (infoValid) { *infoValid = valid; } - - return 0; + + return 0L; } @@ -672,37 +693,37 @@ static long ResolvePathToCatalogEntry(char * filePath, long * flags, void * entr char *restPath; long result, subFolderID = 0, tmpDirIndex; HFSPlusCatalogFile *hfsPlusFile; - + // Copy the file name to gTempStr long cnt = 0; - + while ((filePath[cnt] != '/') && (filePath[cnt] != '\0')) { cnt++; } - + strlcpy(gTempStr, filePath, cnt+1); - + // Move restPath to the right place. if (filePath[cnt] != '\0') { cnt++; } - + restPath = filePath + cnt; - + // gTempStr is a name in the current Dir. // restPath is the rest of the path if any. - + result = ReadCatalogEntry(gTempStr, dirID, entry, dirIndex); - + if (result == -1) { return -1; } - + GetCatalogEntryInfo(entry, flags, 0, 0, 0); - + if ((*flags & kFileTypeMask) == kFileTypeDirectory) { if (gIsHFSPlus) @@ -714,16 +735,16 @@ static long ResolvePathToCatalogEntry(char * filePath, long * flags, void * entr subFolderID = SWAP_BE32(((HFSCatalogFolder *)entry)->folderID); } } - + if ((*flags & kFileTypeMask) == kFileTypeDirectory) { result = ResolvePathToCatalogEntry(restPath, flags, entry, subFolderID, dirIndex); } - + if (gIsHFSPlus && ((*flags & kFileTypeMask) == kFileTypeFlat)) { hfsPlusFile = (HFSPlusCatalogFile *)entry; - + if ((SWAP_BE32(hfsPlusFile->userInfo.fdType) == kHardLinkFileType) && (SWAP_BE32(hfsPlusFile->userInfo.fdCreator) == kHFSPlusCreator)) { @@ -731,7 +752,7 @@ static long ResolvePathToCatalogEntry(char * filePath, long * flags, void * entr result = ResolvePathToCatalogEntry(gLinkTemp, flags, entry, kHFSRootFolderID, &tmpDirIndex); } } - + return result; } @@ -740,63 +761,63 @@ static long ResolvePathToCatalogEntry(char * filePath, long * flags, void * entr static long GetCatalogEntry(long * dirIndex, char ** name, long * flags, long * time, FinderInfo * finderInfo, long * infoValid) { - long extentSize, nodeSize, curNode, index; - void *extent; - char *nodeBuf, *testKey, *entry; + long extentSize, nodeSize, curNode, index; + void *extent; + char *nodeBuf, *testKey, *entry; + BTNodeDescriptor *node; - + if (gIsHFSPlus) { - extent = &gHFSPlus->catalogFile.extents; - extentSize = SWAP_BE64(gHFSPlus->catalogFile.logicalSize); + extent = &gHFSPlus->catalogFile.extents; + extentSize = SWAP_BE64(gHFSPlus->catalogFile.logicalSize); } else { - extent = (HFSExtentDescriptor *)&gHFSMDB->drCTExtRec; - extentSize = SWAP_BE32(gHFSMDB->drCTFlSize); + extent = (HFSExtentDescriptor *)&gHFSMDB->drCTExtRec; + extentSize = SWAP_BE32(gHFSMDB->drCTFlSize); } - - nodeSize = SWAP_BE16(gBTHeaders[kBTreeCatalog]->nodeSize); - nodeBuf = (char *)malloc(nodeSize); - node = (BTNodeDescriptor *)nodeBuf; - + + nodeSize = SWAP_BE16(gBTHeaders[kBTreeCatalog]->nodeSize); + nodeBuf = (char *)malloc(nodeSize); + node = (BTNodeDescriptor *)nodeBuf; + index = *dirIndex % nodeSize; curNode = *dirIndex / nodeSize; - + // Read the BTree node and get the record for index. ReadExtent(extent, extentSize, kHFSCatalogFileID, curNode * nodeSize, nodeSize, nodeBuf, 1); GetBTreeRecord(index, nodeBuf, nodeSize, &testKey, &entry); GetCatalogEntryInfo(entry, flags, time, finderInfo, infoValid); - + // Get the file name. if (gIsHFSPlus) { - utf_encodestr(((HFSPlusCatalogKey *)testKey)->nodeName.unicode, - SWAP_BE16(((HFSPlusCatalogKey *)testKey)->nodeName.length), - (u_int8_t *)gTempStr, 256); + utf_encodestr(((HFSPlusCatalogKey *)testKey)->nodeName.unicode, SWAP_BE16(((HFSPlusCatalogKey *)testKey)->nodeName.length), (u_int8_t *)gTempStr, 256); } else { - strncpy(gTempStr, (const char *)&((HFSCatalogKey *)testKey)->nodeName[1], + strncpy(gTempStr, (const char *)&((HFSCatalogKey *)testKey)->nodeName[1], ((HFSCatalogKey *)testKey)->nodeName[0]); - + gTempStr[((HFSCatalogKey *)testKey)->nodeName[0]] = '\0'; } - *name = gTempStr; - - // Update dirIndex. - index++; - - if (index == SWAP_BE16(node->numRecords)) + + *name = gTempStr; + + // Update dirIndex. + index++; + + if (index == SWAP_BE16(node->numRecords)) { index = 0; curNode = SWAP_BE32(node->fLink); - } - + } + *dirIndex = curNode * nodeSize + index; - + free(nodeBuf); - + return 0; } @@ -805,38 +826,39 @@ static long GetCatalogEntry(long * dirIndex, char ** name, long * flags, long * static long ReadCatalogEntry(char * fileName, long dirID, void * entry, long * dirIndex) { - long length; - char key[sizeof(HFSPlusCatalogKey)]; - HFSCatalogKey *hfsKey = (HFSCatalogKey *)key; - HFSPlusCatalogKey *hfsPlusKey = (HFSPlusCatalogKey *)key; - + long length = 0L; + char key[sizeof(HFSPlusCatalogKey)]; + + HFSCatalogKey *hfsKey = (HFSCatalogKey *)key; + HFSPlusCatalogKey *hfsPlusKey = (HFSPlusCatalogKey *)key; + // Make the catalog key. if (gIsHFSPlus) { hfsPlusKey->parentID = SWAP_BE32(dirID); length = strlen(fileName); - + if (length > 255) { length = 255; } - + utf_decodestr((u_int8_t *)fileName, hfsPlusKey->nodeName.unicode, &(hfsPlusKey->nodeName.length), 512); } else { hfsKey->parentID = SWAP_BE32(dirID); length = strlen(fileName); - + if (length > 31) { length = 31; } - + hfsKey->nodeName[0] = length; strncpy((char *)(hfsKey->nodeName + 1), fileName, length); } - + return ReadBTreeEntry(kBTreeCatalog, &key, entry, dirIndex); } @@ -845,25 +867,26 @@ static long ReadCatalogEntry(char * fileName, long dirID, void * entry, long * d static long ReadExtentsEntry(long fileID, long startBlock, void * entry) { - char key[sizeof(HFSPlusExtentKey)]; - HFSExtentKey *hfsKey = (HFSExtentKey *)key; - HFSPlusExtentKey *hfsPlusKey = (HFSPlusExtentKey *)key; - - // Make the extents key. - if (gIsHFSPlus) + char key[sizeof(HFSPlusExtentKey)]; + + HFSExtentKey *hfsKey = (HFSExtentKey *)key; + HFSPlusExtentKey *hfsPlusKey = (HFSPlusExtentKey *)key; + + // Make the extents key. + if (gIsHFSPlus) { - hfsPlusKey->forkType = 0; - hfsPlusKey->fileID = SWAP_BE32(fileID); - hfsPlusKey->startBlock = SWAP_BE32(startBlock); - } + hfsPlusKey->forkType = 0; + hfsPlusKey->fileID = SWAP_BE32(fileID); + hfsPlusKey->startBlock = SWAP_BE32(startBlock); + } else { - hfsKey->forkType = 0; - hfsKey->fileID = SWAP_BE32(fileID); - hfsKey->startBlock = SWAP_BE16(startBlock); - } - - return ReadBTreeEntry(kBTreeExtents, &key, entry, 0); + hfsKey->forkType = 0; + hfsKey->fileID = SWAP_BE32(fileID); + hfsKey->startBlock = SWAP_BE16(startBlock); + } + + return ReadBTreeEntry(kBTreeExtents, &key, entry, 0); } @@ -871,121 +894,123 @@ static long ReadExtentsEntry(long fileID, long startBlock, void * entry) static long ReadBTreeEntry(long btree, void * key, char * entry, long * dirIndex) { - long extentSize; - void *extent; - short extentFile; - char *nodeBuf; - BTNodeDescriptor *node; - long nodeSize, result = 0, entrySize = 0; - long curNode, index = 0, lowerBound, upperBound; - char *testKey, *recordData; - - // Figure out which tree is being looked at. - if (btree == kBTreeCatalog) - { - if (gIsHFSPlus) + + void *extent; + short extentFile; + long nodeSize, result = 0, entrySize = 0; + long curNode, index = 0, lowerBound, upperBound; + long extentSize; + char *testKey, *recordData; + char *nodeBuf; + + BTNodeDescriptor *node; + + // Figure out which tree is being looked at. + if (btree == kBTreeCatalog) + { + if (gIsHFSPlus) { - extent = &gHFSPlus->catalogFile.extents; - extentSize = SWAP_BE64(gHFSPlus->catalogFile.logicalSize); - } + extent = &gHFSPlus->catalogFile.extents; + extentSize = SWAP_BE64(gHFSPlus->catalogFile.logicalSize); + } else { - extent = (HFSExtentDescriptor *)&gHFSMDB->drCTExtRec; - extentSize = SWAP_BE32(gHFSMDB->drCTFlSize); - } - extentFile = kHFSCatalogFileID; - } + extent = (HFSExtentDescriptor *)&gHFSMDB->drCTExtRec; + extentSize = SWAP_BE32(gHFSMDB->drCTFlSize); + } + extentFile = kHFSCatalogFileID; + } else { - if (gIsHFSPlus) + if (gIsHFSPlus) { - extent = &gHFSPlus->extentsFile.extents; - extentSize = SWAP_BE64(gHFSPlus->extentsFile.logicalSize); - } + extent = &gHFSPlus->extentsFile.extents; + extentSize = SWAP_BE64(gHFSPlus->extentsFile.logicalSize); + } else { - extent = (HFSExtentDescriptor *)&gHFSMDB->drXTExtRec; - extentSize = SWAP_BE32(gHFSMDB->drXTFlSize); - } - extentFile = kHFSExtentsFileID; - } - - // Read the BTree Header if needed. - if (gBTHeaders[btree] == 0) + extent = (HFSExtentDescriptor *)&gHFSMDB->drXTExtRec; + extentSize = SWAP_BE32(gHFSMDB->drXTFlSize); + } + + extentFile = kHFSExtentsFileID; + } + + // Read the BTree Header if needed. + if (gBTHeaders[btree] == 0) { - ReadExtent(extent, extentSize, extentFile, 0, 256, gBTreeHeaderBuffer + btree * 256, 0); - gBTHeaders[btree] = (BTHeaderRec *)(gBTreeHeaderBuffer + btree * 256 + sizeof(BTNodeDescriptor)); - - if ((gIsHFSPlus && btree == kBTreeCatalog) && (gBTHeaders[btree]->keyCompareType == kHFSBinaryCompare)) + ReadExtent(extent, extentSize, extentFile, 0, 256, gBTreeHeaderBuffer + btree * 256, 0); + gBTHeaders[btree] = (BTHeaderRec *)(gBTreeHeaderBuffer + btree * 256 + sizeof(BTNodeDescriptor)); + + if ((gIsHFSPlus && btree == kBTreeCatalog) && (gBTHeaders[btree]->keyCompareType == kHFSBinaryCompare)) { gCaseSensitive = 1; - } - } - - curNode = SWAP_BE32(gBTHeaders[btree]->rootNode); - nodeSize = SWAP_BE16(gBTHeaders[btree]->nodeSize); - nodeBuf = (char *)malloc(nodeSize); - node = (BTNodeDescriptor *)nodeBuf; - - while (1) - { - // Read the current node. - ReadExtent(extent, extentSize, extentFile, - curNode * nodeSize, nodeSize, nodeBuf, 1); - - // Find the matching key. - lowerBound = 0; - upperBound = SWAP_BE16(node->numRecords) - 1; - - while (lowerBound <= upperBound) + } + } + + curNode = SWAP_BE32(gBTHeaders[btree]->rootNode); + nodeSize = SWAP_BE16(gBTHeaders[btree]->nodeSize); + nodeBuf = (char *)malloc(nodeSize); + node = (BTNodeDescriptor *)nodeBuf; + + while (1) + { + // Read the current node. + ReadExtent(extent, extentSize, extentFile, curNode * nodeSize, nodeSize, nodeBuf, 1); + + // Find the matching key. + lowerBound = 0; + upperBound = SWAP_BE16(node->numRecords) - 1; + + while (lowerBound <= upperBound) { - index = (lowerBound + upperBound) / 2; - - GetBTreeRecord(index, nodeBuf, nodeSize, &testKey, &recordData); - - if (gIsHFSPlus) + index = (lowerBound + upperBound) / 2; + + GetBTreeRecord(index, nodeBuf, nodeSize, &testKey, &recordData); + + if (gIsHFSPlus) { - if (btree == kBTreeCatalog) + if (btree == kBTreeCatalog) { - result = CompareHFSPlusCatalogKeys(key, testKey); - } + result = CompareHFSPlusCatalogKeys(key, testKey); + } else { - result = CompareHFSPlusExtentsKeys(key, testKey); - } - } + result = CompareHFSPlusExtentsKeys(key, testKey); + } + } else { - if (btree == kBTreeCatalog) + if (btree == kBTreeCatalog) { - result = CompareHFSCatalogKeys(key, testKey); - } + result = CompareHFSCatalogKeys(key, testKey); + } else { - result = CompareHFSExtentsKeys(key, testKey); - } - } - - if (result < 0) + result = CompareHFSExtentsKeys(key, testKey); + } + } + + if (result < 0) { upperBound = index - 1; // search < trial } - else if (result > 0) + else if (result > 0) { lowerBound = index + 1; // search > trial } - else + else { break; // search = trial } } - + if (result < 0) { index = upperBound; GetBTreeRecord(index, nodeBuf, nodeSize, &testKey, &recordData); } - + // Found the closest key... Recurse on it if this is an index node. if (node->kind == kBTIndexNode) { @@ -996,33 +1021,33 @@ static long ReadBTreeEntry(long btree, void * key, char * entry, long * dirIndex break; } } - + // Return error if the file was not found. if (result != 0) { free(nodeBuf); return -1; } - + if (btree == kBTreeCatalog) { switch (SWAP_BE16(*(short *)recordData)) { - case kHFSFolderRecord : entrySize = 70; + case kHFSFolderRecord : entrySize = 70; break; - case kHFSFileRecord : entrySize = 102; + case kHFSFileRecord : entrySize = 102; break; - case kHFSFolderThreadRecord : entrySize = 46; + case kHFSFolderThreadRecord : entrySize = 46; break; - case kHFSFileThreadRecord : entrySize = 46; + case kHFSFileThreadRecord : entrySize = 46; break; - case kHFSPlusFolderRecord : entrySize = 88; + case kHFSPlusFolderRecord : entrySize = 88; break; - case kHFSPlusFileRecord : entrySize = 248; + case kHFSPlusFileRecord : entrySize = 248; break; - case kHFSPlusFolderThreadRecord : entrySize = 264; + case kHFSPlusFolderThreadRecord : entrySize = 264; break; - case kHFSPlusFileThreadRecord : entrySize = 264; + case kHFSPlusFileThreadRecord : entrySize = 264; break; } } @@ -1037,25 +1062,25 @@ static long ReadBTreeEntry(long btree, void * key, char * entry, long * dirIndex entrySize = sizeof(HFSExtentRecord); } } - + bcopy(recordData, entry, entrySize); - + // Update dirIndex. if (dirIndex != 0) { index++; - + if (index == SWAP_BE16(node->numRecords)) { index = 0; curNode = SWAP_BE32(node->fLink); } - + *dirIndex = curNode * nodeSize + index; } - + free(nodeBuf); - + return 0; } @@ -1066,9 +1091,9 @@ static void GetBTreeRecord(long index, char * nodeBuffer, long nodeSize, char ** { long keySize; long recordOffset = SWAP_BE16(*((short *)(nodeBuffer + (nodeSize - 2 * index - 2)))); - + *key = nodeBuffer + recordOffset; - + if (gIsHFSPlus) { keySize = SWAP_BE16(*(short *)*key); @@ -1092,30 +1117,30 @@ static long ReadExtent(char * extent, uint64_t extentSize, long extentFile, uint long long nextExtentBlock, currentExtentBlock = 0; long long readOffset; long long extentDensity, sizeofExtent, currentExtentSize; - char *currentExtent, *extentBuffer = 0, *bufferPos = buffer; - + char *currentExtent, *extentBuffer = 0, *bufferPos = buffer; + if (offset >= extentSize) { return 0; } - + if (gIsHFSPlus) { extentDensity = kHFSPlusExtentDensity; sizeofExtent = sizeof(HFSPlusExtentDescriptor); - } + } else { extentDensity = kHFSExtentDensity; sizeofExtent = sizeof(HFSExtentDescriptor); } - + lastOffset = offset + size; - + while (offset < lastOffset) { blockNumber = offset / gBlockSize; - + // Find the extent for the offset. for (; ; nextExtent++) { @@ -1126,63 +1151,63 @@ static long ReadExtent(char * extent, uint64_t extentSize, long extentFile, uint countedBlocks += GetExtentSize(extent, nextExtent); continue; } - + currentExtent = extent + nextExtent * sizeofExtent; break; } - + if (extentBuffer == 0) { extentBuffer = malloc(sizeofExtent * extentDensity); - + if (extentBuffer == 0) { return -1; } } - + nextExtentBlock = nextExtent / extentDensity; - + if (currentExtentBlock != nextExtentBlock) { ReadExtentsEntry(extentFile, countedBlocks, extentBuffer); currentExtentBlock = nextExtentBlock; } - + currentExtentSize = GetExtentSize(extentBuffer, nextExtent % extentDensity); - + if ((countedBlocks + currentExtentSize - 1) >= blockNumber) { currentExtent = extentBuffer + sizeofExtent * (nextExtent % extentDensity); break; } - + countedBlocks += currentExtentSize; } - + readOffset = ((blockNumber - countedBlocks) * gBlockSize) + (offset % gBlockSize); - + readSize = GetExtentSize(currentExtent, 0) * gBlockSize - readOffset; - + if (readSize > (size - sizeRead)) { readSize = size - sizeRead; } - + readOffset += (long long)GetExtentStart(currentExtent, 0) * gBlockSize; - + CacheRead(gCurrentIH, bufferPos, gAllocationOffset + readOffset, readSize, cache); - + sizeRead += readSize; offset += readSize; bufferPos += readSize; } - + if (extentBuffer) { free(extentBuffer); } - + return sizeRead; } @@ -1192,19 +1217,19 @@ static long ReadExtent(char * extent, uint64_t extentSize, long extentFile, uint static long GetExtentStart(void * extents, long index) { long start; - + HFSExtentDescriptor *hfsExtents = extents; HFSPlusExtentDescriptor *hfsPlusExtents = extents; - + if (gIsHFSPlus) { start = SWAP_BE32(hfsPlusExtents[index].startBlock); } - else + else { start = SWAP_BE16(hfsExtents[index].startBlock); } - + return start; } @@ -1213,20 +1238,21 @@ static long GetExtentStart(void * extents, long index) static long GetExtentSize(void * extents, long index) { - long size; - HFSExtentDescriptor *hfsExtents = extents; - HFSPlusExtentDescriptor *hfsPlusExtents = extents; - - if (gIsHFSPlus) + long size = 0L; + + HFSExtentDescriptor *hfsExtents = extents; + HFSPlusExtentDescriptor *hfsPlusExtents = extents; + + if (gIsHFSPlus) { size = SWAP_BE32(hfsPlusExtents[index].blockCount); } - else + else { size = SWAP_BE16(hfsExtents[index].blockCount); } - - return size; + + return size; } @@ -1234,30 +1260,31 @@ static long GetExtentSize(void * extents, long index) static long CompareHFSCatalogKeys(void * key, void * testKey) { - HFSCatalogKey *searchKey, *trialKey; - long result, searchParentID, trialParentID; - - searchKey = key; - trialKey = testKey; - - searchParentID = SWAP_BE32(searchKey->parentID); - trialParentID = SWAP_BE32(trialKey->parentID); - - // parent dirID is unsigned - if (searchParentID > trialParentID) + HFSCatalogKey *searchKey, *trialKey; + long result, searchParentID, trialParentID; + + searchKey = key; + trialKey = testKey; + + searchParentID = SWAP_BE32(searchKey->parentID); + trialParentID = SWAP_BE32(trialKey->parentID); + + // parent dirID is unsigned + if (searchParentID > trialParentID) { result = 1; } - else if (searchParentID < trialParentID) + else if (searchParentID < trialParentID) { result = -1; } - else { - // parent dirID's are equal, compare names - result = FastRelString(searchKey->nodeName, trialKey->nodeName); - } - - return result; + else + { + // parent dirID's are equal, compare names + result = FastRelString(searchKey->nodeName, trialKey->nodeName); + } + + return result; } @@ -1265,48 +1292,44 @@ static long CompareHFSCatalogKeys(void * key, void * testKey) static long CompareHFSPlusCatalogKeys(void * key, void * testKey) { - HFSPlusCatalogKey *searchKey, *trialKey; - long result, searchParentID, trialParentID; - - searchKey = key; - trialKey = testKey; - - searchParentID = SWAP_BE32(searchKey->parentID); - trialParentID = SWAP_BE32(trialKey->parentID); - - // parent dirID is unsigned - if (searchParentID > trialParentID) + HFSPlusCatalogKey *searchKey, *trialKey; + long result, searchParentID, trialParentID; + + searchKey = key; + trialKey = testKey; + + searchParentID = SWAP_BE32(searchKey->parentID); + trialParentID = SWAP_BE32(trialKey->parentID); + + // parent dirID is unsigned + if (searchParentID > trialParentID) { result = 1; } - else if (searchParentID < trialParentID) + else if (searchParentID < trialParentID) { result = -1; } - else + else { - // parent dirID's are equal, compare names - if ((searchKey->nodeName.length == 0) || (trialKey->nodeName.length == 0)) + // parent dirID's are equal, compare names + if ((searchKey->nodeName.length == 0) || (trialKey->nodeName.length == 0)) { - result = searchKey->nodeName.length - trialKey->nodeName.length; + result = searchKey->nodeName.length - trialKey->nodeName.length; } - else if (gCaseSensitive) + else if (gCaseSensitive) { - result = BinaryUnicodeCompare(&searchKey->nodeName.unicode[0], - SWAP_BE16(searchKey->nodeName.length), - &trialKey->nodeName.unicode[0], - SWAP_BE16(trialKey->nodeName.length)); - } + result = BinaryUnicodeCompare(&searchKey->nodeName.unicode[0],SWAP_BE16(searchKey->nodeName.length), + &trialKey->nodeName.unicode[0], SWAP_BE16(trialKey->nodeName.length)); + } else { - result = FastUnicodeCompare(&searchKey->nodeName.unicode[0], - SWAP_BE16(searchKey->nodeName.length), - &trialKey->nodeName.unicode[0], - SWAP_BE16(trialKey->nodeName.length)); - } - } - - return result; + result = FastUnicodeCompare(&searchKey->nodeName.unicode[0], SWAP_BE16(searchKey->nodeName.length), + &trialKey->nodeName.unicode[0], SWAP_BE16(trialKey->nodeName.length)); + } + } + + return result; } @@ -1314,26 +1337,26 @@ static long CompareHFSPlusCatalogKeys(void * key, void * testKey) static long CompareHFSExtentsKeys(void * key, void * testKey) { - HFSExtentKey *searchKey, *trialKey; - long result; - - searchKey = key; - trialKey = testKey; - - // assume searchKey < trialKey - result = -1; - - if (searchKey->fileID == trialKey->fileID) - { - // FileNum's are equal; compare fork types - if (searchKey->forkType == trialKey->forkType) + HFSExtentKey *searchKey, *trialKey; + long result; + + searchKey = key; + trialKey = testKey; + + // assume searchKey < trialKey + result = -1; + + if (searchKey->fileID == trialKey->fileID) + { + // FileNum's are equal; compare fork types + if (searchKey->forkType == trialKey->forkType) { - // Fork types are equal; compare allocation block number - if (searchKey->startBlock == trialKey->startBlock) + // Fork types are equal; compare allocation block number + if (searchKey->startBlock == trialKey->startBlock) { - // Everything is equal - result = 0; - } + // Everything is equal + result = 0; + } else { // Allocation block numbers differ; determine sign @@ -1342,26 +1365,26 @@ static long CompareHFSExtentsKeys(void * key, void * testKey) result = 1; } } - } + } else { // Fork types differ; determine sign - if (searchKey->forkType > trialKey->forkType) + if (searchKey->forkType > trialKey->forkType) { result = 1; } - } - } + } + } else { - // FileNums differ; determine sign - if (SWAP_BE32(searchKey->fileID) > SWAP_BE32(trialKey->fileID)) + // FileNums differ; determine sign + if (SWAP_BE32(searchKey->fileID) > SWAP_BE32(trialKey->fileID)) { - result = 1; + result = 1; } - } - - return result; + } + + return result; } @@ -1370,12 +1393,12 @@ static long CompareHFSExtentsKeys(void * key, void * testKey) static long CompareHFSPlusExtentsKeys(void * key, void * testKey) { HFSPlusExtentKey *searchKey, *trialKey; - + long result = -1; // assume searchKey < trialKey - - searchKey = key; - trialKey = testKey; - + + searchKey = key; + trialKey = testKey; + if (searchKey->fileID == trialKey->fileID) { // FileNum's are equal; compare fork types @@ -1386,7 +1409,7 @@ static long CompareHFSPlusExtentsKeys(void * key, void * testKey) { // Everything is equal result = 0; - } + } else { // Allocation block numbers differ; determine sign @@ -1394,8 +1417,8 @@ static long CompareHFSPlusExtentsKeys(void * key, void * testKey) { result = 1; } - } - } + } + } else { // Fork types differ; determine sign @@ -1404,15 +1427,15 @@ static long CompareHFSPlusExtentsKeys(void * key, void * testKey) result = 1; } } - } + } else { - // FileNums differ; determine sign - if (SWAP_BE32(searchKey->fileID) > SWAP_BE32(trialKey->fileID)) + // FileNums differ; determine sign + if (SWAP_BE32(searchKey->fileID) > SWAP_BE32(trialKey->fileID)) { result = 1; } } - - return result; + + return result; } From b90727911353fa1e54db5a0204ba34a7d0544a3e Mon Sep 17 00:00:00 2001 From: Dave Griffin <davegriffin@stainedglass1.plus.com> Date: Sat, 17 Nov 2012 18:45:37 +0000 Subject: [PATCH 171/623] Remove unused include directory, add util/segaddr script --- i386/include/IOKit/IOBSD.h | 41 - i386/include/IOKit/IOBufferMemoryDescriptor.h | 261 --- i386/include/IOKit/IOCatalogue.h | 272 --- i386/include/IOKit/IOCommand.h | 83 - i386/include/IOKit/IOCommandGate.h | 241 --- i386/include/IOKit/IOCommandPool.h | 230 --- i386/include/IOKit/IOConditionLock.h | 71 - i386/include/IOKit/IODMACommand.h | 557 ------ i386/include/IOKit/IODMAController.h | 67 - i386/include/IOKit/IODMAEventSource.h | 84 - i386/include/IOKit/IODataQueue.h | 141 -- i386/include/IOKit/IODataQueueShared.h | 92 - i386/include/IOKit/IODeviceMemory.h | 98 - i386/include/IOKit/IODeviceTreeSupport.h | 127 -- i386/include/IOKit/IOEventSource.h | 244 --- .../IOKit/IOFilterInterruptEventSource.h | 156 -- .../IOKit/IOInterleavedMemoryDescriptor.h | 122 -- i386/include/IOKit/IOInterruptController.h | 155 -- i386/include/IOKit/IOInterruptEventSource.h | 200 -- i386/include/IOKit/IOInterrupts.h | 58 - i386/include/IOKit/IOKitDebug.h | 111 -- i386/include/IOKit/IOKitKeys.h | 164 -- i386/include/IOKit/IOKitServer.h | 123 -- i386/include/IOKit/IOLib.h | 83 - i386/include/IOKit/IOLocks.h | 409 ---- i386/include/IOKit/IOMapper.h | 154 -- i386/include/IOKit/IOMemoryCursor.h | 462 ----- i386/include/IOKit/IOMemoryDescriptor.h | 898 --------- i386/include/IOKit/IOMessage.h | 75 - i386/include/IOKit/IOMultiMemoryDescriptor.h | 110 -- i386/include/IOKit/IONVRAM.h | 167 -- i386/include/IOKit/IONotifier.h | 72 - i386/include/IOKit/IOPlatformExpert.h | 318 ---- i386/include/IOKit/IORangeAllocator.h | 171 -- i386/include/IOKit/IORegistryEntry.h | 947 --------- i386/include/IOKit/IOReturn.h | 137 -- i386/include/IOKit/IOService.h | 1690 ----------------- i386/include/IOKit/IOServicePM.h | 42 - i386/include/IOKit/IOSharedDataQueue.h | 129 -- i386/include/IOKit/IOSharedLock.h | 86 - i386/include/IOKit/IOSubMemoryDescriptor.h | 109 -- i386/include/IOKit/IOSyncer.h | 64 - i386/include/IOKit/IOTimeStamp.h | 189 -- i386/include/IOKit/IOTimerEventSource.h | 230 --- i386/include/IOKit/IOTypes.h | 238 --- i386/include/IOKit/IOUserClient.h | 333 ---- i386/include/IOKit/IOWorkLoop.h | 321 ---- i386/include/IOKit/OSMessageNotification.h | 158 -- i386/include/IOKit/assert.h | 54 - i386/include/IOKit/system.h | 67 - i386/include/_structs.h | 25 - i386/include/_types.h | 68 - i386/include/architecture/alignment.h | 47 - i386/include/architecture/byte_order.h | 36 - i386/include/architecture/i386/alignment.h | 69 - i386/include/architecture/i386/asm_help.h | 398 ---- i386/include/architecture/i386/byte_order.h | 33 - i386/include/architecture/i386/cpu.h | 74 - i386/include/architecture/i386/desc.h | 150 -- i386/include/architecture/i386/fenv.h | 287 --- i386/include/architecture/i386/fpu.h | 170 -- i386/include/architecture/i386/frame.h | 129 -- i386/include/architecture/i386/io.h | 40 - i386/include/architecture/i386/math.h | 642 ------- i386/include/architecture/i386/pio.h | 104 - i386/include/architecture/i386/reg_help.h | 105 - i386/include/architecture/i386/sel.h | 53 - i386/include/architecture/i386/table.h | 98 - i386/include/architecture/i386/tss.h | 120 -- i386/include/assert.h | 92 - i386/include/ctype.h | 438 ----- i386/include/device/.svn/all-wcprops | 17 - i386/include/device/.svn/entries | 96 - .../.svn/text-base/device_port.h.svn-base | 80 - .../.svn/text-base/device_types.h.svn-base | 141 -- i386/include/device/device_port.h | 80 - i386/include/device/device_types.h | 141 -- i386/include/errno.h | 24 - i386/include/float.h | 281 --- i386/include/i386/_limits.h | 27 - i386/include/i386/_param.h | 46 - i386/include/i386/_structs.h | 105 - i386/include/i386/_types.h | 120 -- i386/include/i386/eflags.h | 94 - i386/include/i386/endian.h | 102 - i386/include/i386/fasttrap_isa.h | 116 -- i386/include/i386/limits.h | 107 -- i386/include/i386/param.h | 169 -- i386/include/i386/profile.h | 39 - i386/include/i386/setjmp.h | 80 - i386/include/i386/signal.h | 62 - i386/include/i386/types.h | 138 -- i386/include/i386/user_ldt.h | 80 - i386/include/i386/vmparam.h | 62 - i386/include/inttypes.h | 321 ---- i386/include/libkern/OSAtomic.h | 209 -- i386/include/libkern/OSByteOrder.h | 310 --- i386/include/libkern/OSCacheControl.h | 65 - i386/include/libkern/OSDebug.h | 66 - i386/include/libkern/OSKextLib.h | 472 ----- i386/include/libkern/OSReturn.h | 198 -- i386/include/libkern/OSTypes.h | 131 -- i386/include/libkern/_OSByteOrder.h | 133 -- i386/include/libkern/i386/OSByteOrder.h | 115 -- i386/include/libkern/i386/_OSByteOrder.h | 104 - i386/include/libkern/machine/OSByteOrder.h | 143 -- i386/include/limits.h | 144 -- i386/include/locale.h | 56 - i386/include/mach-o/arch.h | 105 - i386/include/mach-o/compact_unwind_encoding.h | 224 --- i386/include/mach-o/dyld.h | 253 --- i386/include/mach-o/dyld_images.h | 164 -- i386/include/mach-o/fat.h | 64 - i386/include/mach-o/getsect.h | 131 -- i386/include/mach-o/ldsyms.h | 133 -- i386/include/mach-o/loader.h | 1402 -------------- i386/include/mach-o/nlist.h | 312 --- i386/include/mach-o/ranlib.h | 67 - i386/include/mach-o/reloc.h | 203 -- i386/include/mach-o/stab.h | 122 -- i386/include/mach-o/swap.h | 207 -- i386/include/mach/audit_triggers.defs | 49 - i386/include/mach/boolean.h | 88 - i386/include/mach/bootstrap.h | 34 - i386/include/mach/clock.defs | 81 - i386/include/mach/clock.h | 221 --- i386/include/mach/clock_priv.defs | 69 - i386/include/mach/clock_priv.h | 175 -- i386/include/mach/clock_reply.defs | 56 - i386/include/mach/clock_reply.h | 136 -- i386/include/mach/clock_types.defs | 73 - i386/include/mach/clock_types.h | 126 -- i386/include/mach/error.h | 114 -- i386/include/mach/exc.defs | 119 -- i386/include/mach/exc.h | 257 --- i386/include/mach/exception.h | 62 - i386/include/mach/exception_types.h | 181 -- i386/include/mach/host_info.h | 218 --- i386/include/mach/host_notify.h | 37 - i386/include/mach/host_notify_reply.defs | 40 - i386/include/mach/host_priv.defs | 380 ---- i386/include/mach/host_priv.h | 1269 ------------- i386/include/mach/host_reboot.h | 39 - i386/include/mach/host_security.defs | 101 - i386/include/mach/host_security.h | 197 -- i386/include/mach/host_special_ports.h | 180 -- i386/include/mach/i386/_structs.h | 561 ------ i386/include/mach/i386/asm.h | 308 --- i386/include/mach/i386/boolean.h | 74 - i386/include/mach/i386/exception.h | 135 -- i386/include/mach/i386/fp_reg.h | 141 -- i386/include/mach/i386/kern_return.h | 74 - i386/include/mach/i386/machine_types.defs | 127 -- i386/include/mach/i386/ndr_def.h | 45 - i386/include/mach/i386/processor_info.h | 37 - i386/include/mach/i386/rpc.h | 36 - i386/include/mach/i386/sdt_isa.h | 412 ---- i386/include/mach/i386/task.h | 1578 --------------- i386/include/mach/i386/thread_act.h | 1155 ----------- i386/include/mach/i386/thread_state.h | 42 - i386/include/mach/i386/thread_status.h | 297 --- i386/include/mach/i386/vm_param.h | 157 -- i386/include/mach/i386/vm_types.h | 140 -- i386/include/mach/kern_return.h | 322 ---- i386/include/mach/kmod.h | 180 -- i386/include/mach/ledger.defs | 79 - i386/include/mach/ledger.h | 259 --- i386/include/mach/lock_set.defs | 79 - i386/include/mach/lock_set.h | 326 ---- i386/include/mach/mach.h | 133 -- i386/include/mach/mach_error.h | 93 - i386/include/mach/mach_exc.defs | 119 -- i386/include/mach/mach_host.defs | 257 --- i386/include/mach/mach_host.h | 873 --------- i386/include/mach/mach_init.h | 130 -- i386/include/mach/mach_interface.h | 54 - i386/include/mach/mach_param.h | 73 - i386/include/mach/mach_port.defs | 492 ----- i386/include/mach/mach_port.h | 1383 -------------- i386/include/mach/mach_syscalls.h | 37 - i386/include/mach/mach_time.h | 56 - i386/include/mach/mach_traps.h | 152 -- i386/include/mach/mach_types.defs | 474 ----- i386/include/mach/mach_types.h | 230 --- i386/include/mach/mach_vm.defs | 480 ----- i386/include/mach/mach_vm.h | 1032 ---------- i386/include/mach/machine.h | 344 ---- i386/include/mach/machine/asm.h | 42 - i386/include/mach/machine/boolean.h | 42 - i386/include/mach/machine/exception.h | 42 - i386/include/mach/machine/kern_return.h | 42 - i386/include/mach/machine/machine_types.defs | 44 - i386/include/mach/machine/ndr_def.h | 42 - i386/include/mach/machine/processor_info.h | 42 - i386/include/mach/machine/rpc.h | 42 - i386/include/mach/machine/sdt.h | 36 - i386/include/mach/machine/sdt_isa.h | 41 - i386/include/mach/machine/thread_state.h | 42 - i386/include/mach/machine/thread_status.h | 42 - i386/include/mach/machine/vm_param.h | 42 - i386/include/mach/machine/vm_types.h | 42 - i386/include/mach/memory_object_types.h | 271 --- i386/include/mach/message.h | 783 -------- i386/include/mach/mig.h | 174 -- i386/include/mach/mig_errors.h | 124 -- i386/include/mach/ndr.h | 207 -- i386/include/mach/notify.defs | 124 -- i386/include/mach/notify.h | 132 -- i386/include/mach/policy.h | 235 --- i386/include/mach/port.h | 319 ---- i386/include/mach/port_obj.h | 103 - i386/include/mach/processor.defs | 128 -- i386/include/mach/processor.h | 336 ---- i386/include/mach/processor_info.h | 153 -- i386/include/mach/processor_set.defs | 161 -- i386/include/mach/processor_set.h | 516 ----- i386/include/mach/rpc.h | 135 -- i386/include/mach/sdt.h | 32 - i386/include/mach/security.defs | 208 -- i386/include/mach/semaphore.h | 78 - i386/include/mach/shared_memory_server.h | 147 -- i386/include/mach/shared_region.h | 134 -- i386/include/mach/std_types.defs | 150 -- i386/include/mach/std_types.h | 72 - i386/include/mach/sync.h | 35 - i386/include/mach/sync_policy.h | 49 - i386/include/mach/task.defs | 393 ---- i386/include/mach/task.h | 40 - i386/include/mach/task_access.defs | 59 - i386/include/mach/task_info.h | 244 --- i386/include/mach/task_ledger.h | 51 - i386/include/mach/task_policy.h | 129 -- i386/include/mach/task_special_ports.h | 141 -- i386/include/mach/thread_act.defs | 323 ---- i386/include/mach/thread_act.h | 40 - i386/include/mach/thread_info.h | 154 -- i386/include/mach/thread_policy.h | 218 --- i386/include/mach/thread_special_ports.h | 83 - i386/include/mach/thread_status.h | 94 - i386/include/mach/thread_switch.h | 77 - i386/include/mach/time_value.h | 96 - i386/include/mach/vm_attributes.h | 99 - i386/include/mach/vm_behavior.h | 78 - i386/include/mach/vm_inherit.h | 89 - i386/include/mach/vm_map.defs | 475 ----- i386/include/mach/vm_map.h | 1378 -------------- i386/include/mach/vm_param.h | 73 - i386/include/mach/vm_prot.h | 141 -- i386/include/mach/vm_purgable.h | 134 -- i386/include/mach/vm_region.h | 320 ---- i386/include/mach/vm_statistics.h | 335 ---- i386/include/mach/vm_sync.h | 80 - i386/include/mach/vm_task.h | 34 - i386/include/mach/vm_types.h | 93 - i386/include/machine/_limits.h | 41 - i386/include/machine/_param.h | 36 - i386/include/machine/_structs.h | 36 - i386/include/machine/_types.h | 41 - i386/include/machine/byte_order.h | 37 - i386/include/machine/endian.h | 44 - i386/include/machine/fasttrap_isa.h | 41 - i386/include/machine/limits.h | 13 - i386/include/machine/param.h | 44 - i386/include/machine/profile.h | 46 - i386/include/machine/setjmp.h | 44 - i386/include/machine/signal.h | 41 - i386/include/machine/types.h | 44 - i386/include/machine/vmparam.h | 41 - i386/include/math.h | 35 - i386/include/pexpert/boot.h | 33 - i386/include/pexpert/i386/boot.h | 177 -- i386/include/pexpert/i386/efi.h | 558 ------ i386/include/pexpert/i386/protos.h | 95 - i386/include/pexpert/machine/boot.h | 39 - i386/include/pexpert/machine/protos.h | 39 - i386/include/pexpert/pexpert.h | 306 --- i386/include/pexpert/protos.h | 32 - i386/include/runetype.h | 136 -- i386/include/setjmp.h | 28 - i386/include/signal.h | 187 -- i386/include/stdarg.h | 133 -- i386/include/stdbool.h | 46 - i386/include/stddef.h | 130 -- i386/include/stdint.h | 253 --- i386/include/stdio.h | 503 ----- i386/include/stdlib.h | 320 ---- i386/include/string.h | 154 -- i386/include/sys/_endian.h | 139 -- i386/include/sys/_select.h | 52 - i386/include/sys/_structs.h | 236 --- i386/include/sys/_types.h | 84 - i386/include/sys/appleapiopts.h | 62 - i386/include/sys/buf.h | 859 --------- i386/include/sys/cdefs.h | 583 ------ i386/include/sys/disk.h | 139 -- i386/include/sys/kernel_types.h | 143 -- i386/include/sys/param.h | 250 --- i386/include/sys/reboot.h | 129 -- i386/include/sys/select.h | 157 -- i386/include/sys/socket.h | 629 ------ i386/include/sys/syscall.h | 477 ----- i386/include/sys/syslimits.h | 117 -- i386/include/sys/time.h | 221 --- i386/include/sys/types.h | 239 --- i386/include/sys/unistd.h | 181 -- i386/include/sys/vnode.h | 119 -- i386/include/time.h | 213 --- i386/include/unistd.h | 623 ------ i386/include/unwind.h | 245 --- i386/util/segaddr | 56 + i386/util/segsize.c | 175 -- 311 files changed, 56 insertions(+), 60613 deletions(-) delete mode 100644 i386/include/IOKit/IOBSD.h delete mode 100644 i386/include/IOKit/IOBufferMemoryDescriptor.h delete mode 100644 i386/include/IOKit/IOCatalogue.h delete mode 100644 i386/include/IOKit/IOCommand.h delete mode 100644 i386/include/IOKit/IOCommandGate.h delete mode 100644 i386/include/IOKit/IOCommandPool.h delete mode 100644 i386/include/IOKit/IOConditionLock.h delete mode 100644 i386/include/IOKit/IODMACommand.h delete mode 100644 i386/include/IOKit/IODMAController.h delete mode 100644 i386/include/IOKit/IODMAEventSource.h delete mode 100644 i386/include/IOKit/IODataQueue.h delete mode 100644 i386/include/IOKit/IODataQueueShared.h delete mode 100644 i386/include/IOKit/IODeviceMemory.h delete mode 100644 i386/include/IOKit/IODeviceTreeSupport.h delete mode 100644 i386/include/IOKit/IOEventSource.h delete mode 100644 i386/include/IOKit/IOFilterInterruptEventSource.h delete mode 100644 i386/include/IOKit/IOInterleavedMemoryDescriptor.h delete mode 100644 i386/include/IOKit/IOInterruptController.h delete mode 100644 i386/include/IOKit/IOInterruptEventSource.h delete mode 100644 i386/include/IOKit/IOInterrupts.h delete mode 100644 i386/include/IOKit/IOKitDebug.h delete mode 100644 i386/include/IOKit/IOKitKeys.h delete mode 100644 i386/include/IOKit/IOKitServer.h delete mode 100644 i386/include/IOKit/IOLib.h delete mode 100644 i386/include/IOKit/IOLocks.h delete mode 100644 i386/include/IOKit/IOMapper.h delete mode 100644 i386/include/IOKit/IOMemoryCursor.h delete mode 100644 i386/include/IOKit/IOMemoryDescriptor.h delete mode 100644 i386/include/IOKit/IOMessage.h delete mode 100644 i386/include/IOKit/IOMultiMemoryDescriptor.h delete mode 100644 i386/include/IOKit/IONVRAM.h delete mode 100644 i386/include/IOKit/IONotifier.h delete mode 100644 i386/include/IOKit/IOPlatformExpert.h delete mode 100644 i386/include/IOKit/IORangeAllocator.h delete mode 100644 i386/include/IOKit/IORegistryEntry.h delete mode 100644 i386/include/IOKit/IOReturn.h delete mode 100644 i386/include/IOKit/IOService.h delete mode 100644 i386/include/IOKit/IOServicePM.h delete mode 100644 i386/include/IOKit/IOSharedDataQueue.h delete mode 100644 i386/include/IOKit/IOSharedLock.h delete mode 100644 i386/include/IOKit/IOSubMemoryDescriptor.h delete mode 100644 i386/include/IOKit/IOSyncer.h delete mode 100644 i386/include/IOKit/IOTimeStamp.h delete mode 100644 i386/include/IOKit/IOTimerEventSource.h delete mode 100644 i386/include/IOKit/IOTypes.h delete mode 100644 i386/include/IOKit/IOUserClient.h delete mode 100644 i386/include/IOKit/IOWorkLoop.h delete mode 100644 i386/include/IOKit/OSMessageNotification.h delete mode 100644 i386/include/IOKit/assert.h delete mode 100644 i386/include/IOKit/system.h delete mode 100644 i386/include/_structs.h delete mode 100644 i386/include/_types.h delete mode 100644 i386/include/architecture/alignment.h delete mode 100644 i386/include/architecture/byte_order.h delete mode 100644 i386/include/architecture/i386/alignment.h delete mode 100644 i386/include/architecture/i386/asm_help.h delete mode 100644 i386/include/architecture/i386/byte_order.h delete mode 100644 i386/include/architecture/i386/cpu.h delete mode 100644 i386/include/architecture/i386/desc.h delete mode 100644 i386/include/architecture/i386/fenv.h delete mode 100644 i386/include/architecture/i386/fpu.h delete mode 100644 i386/include/architecture/i386/frame.h delete mode 100644 i386/include/architecture/i386/io.h delete mode 100644 i386/include/architecture/i386/math.h delete mode 100644 i386/include/architecture/i386/pio.h delete mode 100644 i386/include/architecture/i386/reg_help.h delete mode 100644 i386/include/architecture/i386/sel.h delete mode 100644 i386/include/architecture/i386/table.h delete mode 100644 i386/include/architecture/i386/tss.h delete mode 100644 i386/include/assert.h delete mode 100644 i386/include/ctype.h delete mode 100644 i386/include/device/.svn/all-wcprops delete mode 100644 i386/include/device/.svn/entries delete mode 100644 i386/include/device/.svn/text-base/device_port.h.svn-base delete mode 100644 i386/include/device/.svn/text-base/device_types.h.svn-base delete mode 100644 i386/include/device/device_port.h delete mode 100644 i386/include/device/device_types.h delete mode 100644 i386/include/errno.h delete mode 100644 i386/include/float.h delete mode 100644 i386/include/i386/_limits.h delete mode 100644 i386/include/i386/_param.h delete mode 100644 i386/include/i386/_structs.h delete mode 100644 i386/include/i386/_types.h delete mode 100644 i386/include/i386/eflags.h delete mode 100644 i386/include/i386/endian.h delete mode 100644 i386/include/i386/fasttrap_isa.h delete mode 100644 i386/include/i386/limits.h delete mode 100644 i386/include/i386/param.h delete mode 100644 i386/include/i386/profile.h delete mode 100644 i386/include/i386/setjmp.h delete mode 100644 i386/include/i386/signal.h delete mode 100644 i386/include/i386/types.h delete mode 100644 i386/include/i386/user_ldt.h delete mode 100644 i386/include/i386/vmparam.h delete mode 100644 i386/include/inttypes.h delete mode 100644 i386/include/libkern/OSAtomic.h delete mode 100644 i386/include/libkern/OSByteOrder.h delete mode 100644 i386/include/libkern/OSCacheControl.h delete mode 100644 i386/include/libkern/OSDebug.h delete mode 100644 i386/include/libkern/OSKextLib.h delete mode 100644 i386/include/libkern/OSReturn.h delete mode 100644 i386/include/libkern/OSTypes.h delete mode 100644 i386/include/libkern/_OSByteOrder.h delete mode 100644 i386/include/libkern/i386/OSByteOrder.h delete mode 100644 i386/include/libkern/i386/_OSByteOrder.h delete mode 100644 i386/include/libkern/machine/OSByteOrder.h delete mode 100644 i386/include/limits.h delete mode 100644 i386/include/locale.h delete mode 100644 i386/include/mach-o/arch.h delete mode 100644 i386/include/mach-o/compact_unwind_encoding.h delete mode 100644 i386/include/mach-o/dyld.h delete mode 100644 i386/include/mach-o/dyld_images.h delete mode 100644 i386/include/mach-o/fat.h delete mode 100644 i386/include/mach-o/getsect.h delete mode 100644 i386/include/mach-o/ldsyms.h delete mode 100644 i386/include/mach-o/loader.h delete mode 100644 i386/include/mach-o/nlist.h delete mode 100644 i386/include/mach-o/ranlib.h delete mode 100644 i386/include/mach-o/reloc.h delete mode 100644 i386/include/mach-o/stab.h delete mode 100644 i386/include/mach-o/swap.h delete mode 100644 i386/include/mach/audit_triggers.defs delete mode 100644 i386/include/mach/boolean.h delete mode 100644 i386/include/mach/bootstrap.h delete mode 100644 i386/include/mach/clock.defs delete mode 100644 i386/include/mach/clock.h delete mode 100644 i386/include/mach/clock_priv.defs delete mode 100644 i386/include/mach/clock_priv.h delete mode 100644 i386/include/mach/clock_reply.defs delete mode 100644 i386/include/mach/clock_reply.h delete mode 100644 i386/include/mach/clock_types.defs delete mode 100644 i386/include/mach/clock_types.h delete mode 100644 i386/include/mach/error.h delete mode 100644 i386/include/mach/exc.defs delete mode 100644 i386/include/mach/exc.h delete mode 100644 i386/include/mach/exception.h delete mode 100644 i386/include/mach/exception_types.h delete mode 100644 i386/include/mach/host_info.h delete mode 100644 i386/include/mach/host_notify.h delete mode 100644 i386/include/mach/host_notify_reply.defs delete mode 100644 i386/include/mach/host_priv.defs delete mode 100644 i386/include/mach/host_priv.h delete mode 100644 i386/include/mach/host_reboot.h delete mode 100644 i386/include/mach/host_security.defs delete mode 100644 i386/include/mach/host_security.h delete mode 100644 i386/include/mach/host_special_ports.h delete mode 100644 i386/include/mach/i386/_structs.h delete mode 100644 i386/include/mach/i386/asm.h delete mode 100644 i386/include/mach/i386/boolean.h delete mode 100644 i386/include/mach/i386/exception.h delete mode 100644 i386/include/mach/i386/fp_reg.h delete mode 100644 i386/include/mach/i386/kern_return.h delete mode 100644 i386/include/mach/i386/machine_types.defs delete mode 100644 i386/include/mach/i386/ndr_def.h delete mode 100644 i386/include/mach/i386/processor_info.h delete mode 100644 i386/include/mach/i386/rpc.h delete mode 100644 i386/include/mach/i386/sdt_isa.h delete mode 100644 i386/include/mach/i386/task.h delete mode 100644 i386/include/mach/i386/thread_act.h delete mode 100644 i386/include/mach/i386/thread_state.h delete mode 100644 i386/include/mach/i386/thread_status.h delete mode 100644 i386/include/mach/i386/vm_param.h delete mode 100644 i386/include/mach/i386/vm_types.h delete mode 100644 i386/include/mach/kern_return.h delete mode 100644 i386/include/mach/kmod.h delete mode 100644 i386/include/mach/ledger.defs delete mode 100644 i386/include/mach/ledger.h delete mode 100644 i386/include/mach/lock_set.defs delete mode 100644 i386/include/mach/lock_set.h delete mode 100644 i386/include/mach/mach.h delete mode 100644 i386/include/mach/mach_error.h delete mode 100644 i386/include/mach/mach_exc.defs delete mode 100644 i386/include/mach/mach_host.defs delete mode 100644 i386/include/mach/mach_host.h delete mode 100644 i386/include/mach/mach_init.h delete mode 100644 i386/include/mach/mach_interface.h delete mode 100644 i386/include/mach/mach_param.h delete mode 100644 i386/include/mach/mach_port.defs delete mode 100644 i386/include/mach/mach_port.h delete mode 100644 i386/include/mach/mach_syscalls.h delete mode 100644 i386/include/mach/mach_time.h delete mode 100644 i386/include/mach/mach_traps.h delete mode 100644 i386/include/mach/mach_types.defs delete mode 100644 i386/include/mach/mach_types.h delete mode 100644 i386/include/mach/mach_vm.defs delete mode 100644 i386/include/mach/mach_vm.h delete mode 100644 i386/include/mach/machine.h delete mode 100644 i386/include/mach/machine/asm.h delete mode 100644 i386/include/mach/machine/boolean.h delete mode 100644 i386/include/mach/machine/exception.h delete mode 100644 i386/include/mach/machine/kern_return.h delete mode 100644 i386/include/mach/machine/machine_types.defs delete mode 100644 i386/include/mach/machine/ndr_def.h delete mode 100644 i386/include/mach/machine/processor_info.h delete mode 100644 i386/include/mach/machine/rpc.h delete mode 100644 i386/include/mach/machine/sdt.h delete mode 100644 i386/include/mach/machine/sdt_isa.h delete mode 100644 i386/include/mach/machine/thread_state.h delete mode 100644 i386/include/mach/machine/thread_status.h delete mode 100644 i386/include/mach/machine/vm_param.h delete mode 100644 i386/include/mach/machine/vm_types.h delete mode 100644 i386/include/mach/memory_object_types.h delete mode 100644 i386/include/mach/message.h delete mode 100644 i386/include/mach/mig.h delete mode 100644 i386/include/mach/mig_errors.h delete mode 100644 i386/include/mach/ndr.h delete mode 100644 i386/include/mach/notify.defs delete mode 100644 i386/include/mach/notify.h delete mode 100644 i386/include/mach/policy.h delete mode 100644 i386/include/mach/port.h delete mode 100644 i386/include/mach/port_obj.h delete mode 100644 i386/include/mach/processor.defs delete mode 100644 i386/include/mach/processor.h delete mode 100644 i386/include/mach/processor_info.h delete mode 100644 i386/include/mach/processor_set.defs delete mode 100644 i386/include/mach/processor_set.h delete mode 100644 i386/include/mach/rpc.h delete mode 100644 i386/include/mach/sdt.h delete mode 100644 i386/include/mach/security.defs delete mode 100644 i386/include/mach/semaphore.h delete mode 100644 i386/include/mach/shared_memory_server.h delete mode 100644 i386/include/mach/shared_region.h delete mode 100644 i386/include/mach/std_types.defs delete mode 100644 i386/include/mach/std_types.h delete mode 100644 i386/include/mach/sync.h delete mode 100644 i386/include/mach/sync_policy.h delete mode 100644 i386/include/mach/task.defs delete mode 100644 i386/include/mach/task.h delete mode 100644 i386/include/mach/task_access.defs delete mode 100644 i386/include/mach/task_info.h delete mode 100644 i386/include/mach/task_ledger.h delete mode 100644 i386/include/mach/task_policy.h delete mode 100644 i386/include/mach/task_special_ports.h delete mode 100644 i386/include/mach/thread_act.defs delete mode 100644 i386/include/mach/thread_act.h delete mode 100644 i386/include/mach/thread_info.h delete mode 100644 i386/include/mach/thread_policy.h delete mode 100644 i386/include/mach/thread_special_ports.h delete mode 100644 i386/include/mach/thread_status.h delete mode 100644 i386/include/mach/thread_switch.h delete mode 100644 i386/include/mach/time_value.h delete mode 100644 i386/include/mach/vm_attributes.h delete mode 100644 i386/include/mach/vm_behavior.h delete mode 100644 i386/include/mach/vm_inherit.h delete mode 100644 i386/include/mach/vm_map.defs delete mode 100644 i386/include/mach/vm_map.h delete mode 100644 i386/include/mach/vm_param.h delete mode 100644 i386/include/mach/vm_prot.h delete mode 100644 i386/include/mach/vm_purgable.h delete mode 100644 i386/include/mach/vm_region.h delete mode 100644 i386/include/mach/vm_statistics.h delete mode 100644 i386/include/mach/vm_sync.h delete mode 100644 i386/include/mach/vm_task.h delete mode 100644 i386/include/mach/vm_types.h delete mode 100644 i386/include/machine/_limits.h delete mode 100644 i386/include/machine/_param.h delete mode 100644 i386/include/machine/_structs.h delete mode 100644 i386/include/machine/_types.h delete mode 100644 i386/include/machine/byte_order.h delete mode 100644 i386/include/machine/endian.h delete mode 100644 i386/include/machine/fasttrap_isa.h delete mode 100644 i386/include/machine/limits.h delete mode 100644 i386/include/machine/param.h delete mode 100644 i386/include/machine/profile.h delete mode 100644 i386/include/machine/setjmp.h delete mode 100644 i386/include/machine/signal.h delete mode 100644 i386/include/machine/types.h delete mode 100644 i386/include/machine/vmparam.h delete mode 100644 i386/include/math.h delete mode 100644 i386/include/pexpert/boot.h delete mode 100644 i386/include/pexpert/i386/boot.h delete mode 100644 i386/include/pexpert/i386/efi.h delete mode 100644 i386/include/pexpert/i386/protos.h delete mode 100644 i386/include/pexpert/machine/boot.h delete mode 100644 i386/include/pexpert/machine/protos.h delete mode 100644 i386/include/pexpert/pexpert.h delete mode 100644 i386/include/pexpert/protos.h delete mode 100644 i386/include/runetype.h delete mode 100644 i386/include/setjmp.h delete mode 100644 i386/include/signal.h delete mode 100644 i386/include/stdarg.h delete mode 100644 i386/include/stdbool.h delete mode 100644 i386/include/stddef.h delete mode 100644 i386/include/stdint.h delete mode 100644 i386/include/stdio.h delete mode 100644 i386/include/stdlib.h delete mode 100644 i386/include/string.h delete mode 100644 i386/include/sys/_endian.h delete mode 100644 i386/include/sys/_select.h delete mode 100644 i386/include/sys/_structs.h delete mode 100644 i386/include/sys/_types.h delete mode 100644 i386/include/sys/appleapiopts.h delete mode 100644 i386/include/sys/buf.h delete mode 100644 i386/include/sys/cdefs.h delete mode 100644 i386/include/sys/disk.h delete mode 100644 i386/include/sys/kernel_types.h delete mode 100644 i386/include/sys/param.h delete mode 100644 i386/include/sys/reboot.h delete mode 100644 i386/include/sys/select.h delete mode 100644 i386/include/sys/socket.h delete mode 100644 i386/include/sys/syscall.h delete mode 100644 i386/include/sys/syslimits.h delete mode 100644 i386/include/sys/time.h delete mode 100644 i386/include/sys/types.h delete mode 100644 i386/include/sys/unistd.h delete mode 100644 i386/include/sys/vnode.h delete mode 100644 i386/include/time.h delete mode 100644 i386/include/unistd.h delete mode 100644 i386/include/unwind.h create mode 100755 i386/util/segaddr delete mode 100644 i386/util/segsize.c diff --git a/i386/include/IOKit/IOBSD.h b/i386/include/IOKit/IOBSD.h deleted file mode 100644 index 8938656..0000000 --- a/i386/include/IOKit/IOBSD.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _IOBSD_H -#define _IOBSD_H - -/* - * bsd-related registry properties - */ - -#define kIOBSDNameKey "BSD Name" // (an OSString) -#define kIOBSDNamesKey "BSD Names" // (an OSDictionary of OSString's, for links) -#define kIOBSDMajorKey "BSD Major" // (an OSNumber) -#define kIOBSDMinorKey "BSD Minor" // (an OSNumber) -#define kIOBSDUnitKey "BSD Unit" // (an OSNumber) - -#endif /* !_IOBSD_H */ diff --git a/i386/include/IOKit/IOBufferMemoryDescriptor.h b/i386/include/IOKit/IOBufferMemoryDescriptor.h deleted file mode 100644 index 0926e5b..0000000 --- a/i386/include/IOKit/IOBufferMemoryDescriptor.h +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _IOBUFFERMEMORYDESCRIPTOR_H -#define _IOBUFFERMEMORYDESCRIPTOR_H - -#include <IOKit/IOMemoryDescriptor.h> - -enum { - kIOMemoryPhysicallyContiguous = 0x00000010, - kIOMemoryPageable = 0x00000020, - kIOMemoryPurgeable = 0x00000040, - kIOMemorySharingTypeMask = 0x000f0000, - kIOMemoryUnshared = 0x00000000, - kIOMemoryKernelUserShared = 0x00010000, - // shared IOMemoryDescriptor options for IOBufferMemoryDescriptor: - kIOBufferDescriptorMemoryFlags = kIOMemoryDirectionMask - | kIOMemoryThreadSafe -}; - -#define _IOBUFFERMEMORYDESCRIPTOR_INTASKWITHOPTIONS_ 1 -/*! - @class IOBufferMemoryDescriptor - @abstract Provides a simple memory descriptor that allocates its own buffer memory. -*/ - -class IOBufferMemoryDescriptor : public IOGeneralMemoryDescriptor -{ - OSDeclareDefaultStructors(IOBufferMemoryDescriptor); - -private: -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of this class in the future. - */ - struct ExpansionData { - IOMemoryMap * map; - }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * reserved; - -protected: - void * _buffer; - vm_size_t _capacity; - vm_offset_t _alignment; - IOOptionBits _options; -private: - uintptr_t _internalReserved; - unsigned _internalFlags; - -private: -#ifndef __LP64__ - virtual bool initWithOptions( - IOOptionBits options, - vm_size_t capacity, - vm_offset_t alignment, - task_t inTask) APPLE_KEXT_DEPRECATED; /* use withOptions() instead */ -#endif /* !__LP64__ */ - - virtual bool initWithPhysicalMask( - task_t inTask, - IOOptionBits options, - mach_vm_size_t capacity, - mach_vm_address_t alignment, - mach_vm_address_t physicalMask); - -#ifdef __LP64__ - OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 0); - OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 1); -#else /* !__LP64__ */ - OSMetaClassDeclareReservedUsed(IOBufferMemoryDescriptor, 0); - OSMetaClassDeclareReservedUsed(IOBufferMemoryDescriptor, 1); -#endif /* !__LP64__ */ - OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 2); - OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 3); - OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 4); - OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 5); - OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 6); - OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 7); - OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 8); - OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 9); - OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 10); - OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 11); - OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 12); - OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 13); - OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 14); - OSMetaClassDeclareReservedUnused(IOBufferMemoryDescriptor, 15); - -protected: - virtual void free(); - -public: - - /* - * withOptions: - * - * Returns a new IOBufferMemoryDescriptor with a buffer large enough to - * hold capacity bytes. The descriptor's length is initially set to the - * capacity. - */ -#ifndef __LP64__ - virtual bool initWithOptions( IOOptionBits options, - vm_size_t capacity, - vm_offset_t alignment) APPLE_KEXT_DEPRECATED; /* use withOptions() instead */ -#endif /* !__LP64__ */ - - static IOBufferMemoryDescriptor * withOptions( IOOptionBits options, - vm_size_t capacity, - vm_offset_t alignment = 1); - -/*! @function inTaskWithOptions - @abstract Creates a memory buffer with memory descriptor for that buffer. - @discussion Added in Mac OS X 10.2, this method allocates a memory buffer with a given size and alignment in the task's address space specified, and returns a memory descriptor instance representing the memory. It is recommended that memory allocated for I/O or sharing via mapping be created via IOBufferMemoryDescriptor. Options passed with the request specify the kind of memory to be allocated - pageablity and sharing are specified with option bits. This function may block and so should not be called from interrupt level or while a simple lock is held. - @param inTask The task the buffer will be allocated in. - @param options Options for the allocation:<br> - kIODirectionOut, kIODirectionIn - set the direction of the I/O transfer.<br> - kIOMemoryPhysicallyContiguous - pass to request memory be physically contiguous. This option is heavily discouraged. The request may fail if memory is fragmented, may cause large amounts of paging activity, and may take a very long time to execute.<br> - kIOMemoryPageable - pass to request memory be non-wired - the default for kernel allocated memory is wired.<br> - kIOMemoryPurgeable - pass to request memory that may later have its purgeable state set with IOMemoryDescriptor::setPurgeable. Only supported for kIOMemoryPageable allocations.<br> - kIOMemoryKernelUserShared - pass to request memory that will be mapped into both the kernel and client applications. - @param capacity The number of bytes to allocate. - @param alignment The minimum required alignment of the buffer in bytes - 1 is the default for no required alignment. For example, pass 256 to get memory allocated at an address with bits 0-7 zero. - @result Returns an instance of class IOBufferMemoryDescriptor to be released by the caller, which will free the memory desriptor and associated buffer. */ - - static IOBufferMemoryDescriptor * inTaskWithOptions( - task_t inTask, - IOOptionBits options, - vm_size_t capacity, - vm_offset_t alignment = 1); - -/*! @function inTaskWithPhysicalMask - @abstract Creates a memory buffer with memory descriptor for that buffer. - @discussion Added in Mac OS X 10.5, this method allocates a memory buffer with a given size and alignment in the task's address space specified, and returns a memory descriptor instance representing the memory. It is recommended that memory allocated for I/O or sharing via mapping be created via IOBufferMemoryDescriptor. Options passed with the request specify the kind of memory to be allocated - pageablity and sharing are specified with option bits. This function may block and so should not be called from interrupt level or while a simple lock is held. - @param inTask The task the buffer will be mapped in. Pass NULL to create memory unmapped in any task (eg. for use as a DMA buffer). - @param options Options for the allocation:<br> - kIODirectionOut, kIODirectionIn - set the direction of the I/O transfer.<br> - kIOMemoryPhysicallyContiguous - pass to request memory be physically contiguous. This option is heavily discouraged. The request may fail if memory is fragmented, may cause large amounts of paging activity, and may take a very long time to execute.<br> - kIOMemoryKernelUserShared - pass to request memory that will be mapped into both the kernel and client applications. - @param capacity The number of bytes to allocate. - @param mask The buffer will be allocated with pages such that physical addresses will only have bits set present in physicalMask. For example, pass 0x00000000FFFFFFFFULL for a buffer to be accessed by hardware that has 32 address bits. - @result Returns an instance of class IOBufferMemoryDescriptor to be released by the caller, which will free the memory desriptor and associated buffer. */ - - static IOBufferMemoryDescriptor * inTaskWithPhysicalMask( - task_t inTask, - IOOptionBits options, - mach_vm_size_t capacity, - mach_vm_address_t physicalMask); - - /* - * withCapacity: - * - * Returns a new IOBufferMemoryDescriptor with a buffer large enough to - * hold capacity bytes. The descriptor's length is initially set to the - * capacity. - */ - static IOBufferMemoryDescriptor * withCapacity( - vm_size_t capacity, - IODirection withDirection, - bool withContiguousMemory = false); -#ifndef __LP64__ - virtual bool initWithBytes(const void * bytes, - vm_size_t withLength, - IODirection withDirection, - bool withContiguousMemory = false) APPLE_KEXT_DEPRECATED; /* use withBytes() instead */ -#endif /* !__LP64__ */ - - /* - * withBytes: - * - * Returns a new IOBufferMemoryDescriptor preloaded with bytes (copied). - * The descriptor's length and capacity are set to the input buffer's size. - */ - static IOBufferMemoryDescriptor * withBytes( - const void * bytes, - vm_size_t withLength, - IODirection withDirection, - bool withContiguousMemory = false); - - /* - * setLength: - * - * Change the buffer length of the memory descriptor. When a new buffer - * is created, the initial length of the buffer is set to be the same as - * the capacity. The length can be adjusted via setLength for a shorter - * transfer (there is no need to create more buffer descriptors when you - * can reuse an existing one, even for different transfer sizes). Note - * that the specified length must not exceed the capacity of the buffer. - */ - virtual void setLength(vm_size_t length); - - /* - * setDirection: - * - * Change the direction of the transfer. This method allows one to redirect - * the descriptor's transfer direction. This eliminates the need to destroy - * and create new buffers when different transfer directions are needed. - */ - virtual void setDirection(IODirection direction); - - /* - * getCapacity: - * - * Get the buffer capacity - */ - virtual vm_size_t getCapacity() const; - - /* - * getBytesNoCopy: - * - * Return the virtual address of the beginning of the buffer - */ - virtual void *getBytesNoCopy(); - - /* - * getBytesNoCopy: - * - * Return the virtual address of an offset from the beginning of the buffer - */ - virtual void *getBytesNoCopy(vm_size_t start, vm_size_t withLength); - - /* - * appendBytes: - * - * Add some data to the end of the buffer. This method automatically - * maintains the memory descriptor buffer length. Note that appendBytes - * will not copy past the end of the memory descriptor's current capacity. - */ - virtual bool appendBytes(const void *bytes, vm_size_t withLength); - -#ifndef __LP64__ - virtual void * getVirtualSegment(IOByteCount offset, - IOByteCount * length) APPLE_KEXT_DEPRECATED; /* use getBytesNoCopy() instead */ -#endif /* !__LP64__ */ -}; - -#endif /* !_IOBUFFERMEMORYDESCRIPTOR_H */ diff --git a/i386/include/IOKit/IOCatalogue.h b/i386/include/IOKit/IOCatalogue.h deleted file mode 100644 index f087396..0000000 --- a/i386/include/IOKit/IOCatalogue.h +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998 Apple Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_IOCATALOGUE_H -#define _IOKIT_IOCATALOGUE_H - -#include <libkern/c++/OSObject.h> -#include <libkern/c++/OSCollectionIterator.h> -#include <libkern/c++/OSArray.h> -#include <libkern/c++/OSDictionary.h> -#include <IOKit/IOLocks.h> -#include <sys/cdefs.h> - -#include <IOKit/IOKitServer.h> - -class IOService; - -/*! - @class IOCatalogue - @abstract In-kernel database for IOKit driver personalities. - @discussion The IOCatalogue is a database which contains all IOKit driver personalities. IOService uses this resource when matching devices to their associated drivers. -*/ -class IOCatalogue : public OSObject -{ - OSDeclareDefaultStructors(IOCatalogue) - -private: - OSCollectionIterator * kernelTables; - OSArray * array; - IOLock * lock; - SInt32 generation; - -/* This stuff is no longer used at all but was exported in prior - * releases, so we keep it around for PPC/i386 only. - */ -#if __ppc__ || __i386__ - IOLock * kld_lock; -#endif /* __ppc__ || __i386__ */ - -public: - /*! - @function initialize - @abstract Creates and initializes the database object and poputates it with in-kernel driver personalities. - */ - static void initialize( void ); - - /*! - @function init - @abstract Initializes the database object. - @param initArray The initial array of driver personalities to populate the database. - */ - bool init( OSArray * initArray ); - - /*! - @function free - @abstract Cleans up the database and deallocates memory allocated at initialization. This is never called in normal operation of the system. - */ - void free( void ); - - /*! - @function findDrivers - @abstract This is the primary entry point for IOService. - @param service - @param generationCount Returns a reference to the generation count of the database. The generation count increases only when personalities are added to the database *and* IOService matching has been initiated. - @result Returns an ordered set of driver personalities ranked on probe-scores. The ordered set must be released by the receiver. - */ - OSOrderedSet * findDrivers( IOService * service, SInt32 * generationCount ); - - /*! - @function findDrivers - @abstract A more general purpose interface which allows one to retreive driver personalities based the intersection of the 'matching' dictionary and the personality's own property list. - @param matching A dictionary containing only keys and values which are to be used for matching. For example, a matching dictionary containing 'IOProviderClass'='IOPCIDevice' will return all personalities with an IOProviderClass key and a value of IOPCIDevice. - @param generationCount Returns a reference to the current generation of the database. The generation count increases only when personalities are added to the database *and* IOService matching has been initiated. - @result Returns an ordered set of driver personalities ranked on probe-scores. The ordered set must be released by the receiver. - */ - OSOrderedSet * findDrivers( OSDictionary * matching, SInt32 * generationCount ); - - /*! - @function addDrivers - @abstract Adds an array of driver personalities to the database. - @param array Array of driver personalities to be added to the database. - @param doNubMatchng Start matching process after personalities have been added. - @result Returns true if driver personality was added to the database successfully. Failure is due to a memory allocation failure. - */ - bool addDrivers( OSArray * array, bool doNubMatching = true ); - - /*! - @function removeDrivers - @abstract Remove driver personalities from the database based on matching information provided. - @param matching A dictionary whose keys and values are used for matching personalities in the database. For example, a matching dictionary containing a 'IOProviderClass' key with the value 'IOPCIDevice' will remove all personalities which have the key 'IOProviderClass' equal to 'IOPCIDevice'. - @param doNubMatchng Start matching process after personalities have been removed. Matching criteria is based on IOProviderClass of those personalities which were removed. This is to allow drivers which haven't been matched to match against NUB's which were blocked by the previous personalities. - @result Returns true if personality was removed successfully. Failure is due to a memory allocation failure. - */ - bool removeDrivers( OSDictionary * matching, bool doNubMatching = true ); - - /*! - @function getGenerationCount - @abstract Get the current generation count of the database. - */ - SInt32 getGenerationCount( void ) const; - - /*! - @function isModuleLoaded - @abstract Reports if a kernel module has been loaded. - @param moduleName Name of the module. - @result Returns true if the associated kernel module has been loaded into the kernel. - */ - bool isModuleLoaded( OSString * moduleName ) const; - - /*! - @function isModuleLoaded - @abstract Reports if a kernel module has been loaded. - @param moduleName Name of the module. - @result Returns true if the associated kernel module has been loaded into the kernel. - */ - bool isModuleLoaded( const char * moduleName ) const; - - /*! - @function isModuleLoaded - @abstract Reports if a kernel module has been loaded for a particular personality. - @param driver A driver personality's property list. - @result Returns true if the associated kernel module has been loaded into the kernel for a particular driver personality on which it depends. - */ - bool isModuleLoaded( OSDictionary * driver ) const; - - /*! - @function moduleHasLoaded - @abstract Callback function called after a IOKit dependent kernel module is loaded. - @param name Name of the kernel module. - */ - void moduleHasLoaded( OSString * name ); - - /*! - @function moduleHasLoaded - @abstract Callback function called after a IOKit dependent kernel module is loaded. - @param name Name of the kernel module. - */ - void moduleHasLoaded( const char * name ); - - /*! - @function terminateDrivers - @abstract Terminates all instances of a driver which match the contents of the matching dictionary. Does not unload module. - @param matching A dictionary whose keys and values are used for matching personalities in the database. For example, a matching dictionary containing a 'IOProviderClass' key with the value 'IOPCIDevice' will cause termination for all instances whose personalities have the key 'IOProviderClass' equal to 'IOPCIDevice'. - */ - IOReturn terminateDrivers( OSDictionary * matching ); - - /*! - @function terminateDriversForModule - @abstract Terminates all instances of a driver which depends on a particular module and unloads the module. - @param moduleName Name of the module which is used to determine which driver instances to terminate and unload. - @param unload Flag to cause the actual unloading of the module. - */ - IOReturn terminateDriversForModule( OSString * moduleName, bool unload = true); - - /*! - @function terminateDriversForModule - @abstract Terminates all instances of a driver which depends on a particular module and unloads the module. - @param moduleName Name of the module which is used to determine which driver instances to terminate and unload. - @param unload Flag to cause the actual unloading of the module. - */ - IOReturn terminateDriversForModule( const char * moduleName, bool unload = true); - - /*! - @function startMatching - @abstract Starts an IOService matching thread where matching keys and values are provided by the matching dictionary. - @param matching A dictionary whose keys and values are used for matching personalities in the database. For example, a matching dictionary containing a 'IOProviderClass' key with the value 'IOPCIDevice' will start matching for all personalities which have the key 'IOProviderClass' equal to 'IOPCIDevice'. - */ - bool startMatching( OSDictionary * matching ); - - /*! - @function reset - @abstract Return the Catalogue to its initial state. - */ - void reset(void); - - /*! - @function serialize - @abstract Serializes the catalog for transport to the user. - @param s The serializer object. - @result Returns false if unable to serialize database, most likely due to memory shortage. - */ - virtual bool serialize(OSSerialize * s) const; - - bool serializeData(IOOptionBits kind, OSSerialize * s) const; - -/* This stuff is no longer used at all we keep it around for PPC/i386 - * binary compatibility only. Symbols are no longer exported. - */ -#if __ppc__ || __i386__ - /*! - @function recordStartupExtensions - @abstract Records extensions made available by the primary booter. - <p> - This function is for internal use by the kernel startup linker. - Kernel extensions should never call it. - @result Returns true if startup extensions were successfully recorded, - false if not. - */ - virtual bool recordStartupExtensions(void); - - /*! - @function addExtensionsFromArchive() - @abstract Records an archive of extensions, as from device ROM. - <p> - This function is currently for internal use. - Kernel extensions should never call it. - @param mkext An OSData object containing a multikext archive. - @result Returns true if mkext was properly unserialized and its - contents recorded, false if not. - */ - virtual bool addExtensionsFromArchive(OSData * mkext); - - - /*! - @function removeKernelLinker - @abstract Removes from memory all code and data related to - boot-time loading of kernel extensions. kextd triggers - this when it first starts in order to pass responsibility - for loading extensions from the kernel itself to kextd. - @result Returns KERN_SUCCESS if the kernel linker is successfully - removed or wasn't present, KERN_FAILURE otherwise. - */ - virtual kern_return_t removeKernelLinker(void); -#endif /* __ppc__ || __i386__ */ - -private: - - /*! - @function unloadModule - @abstract Unloads the reqested module if no driver instances are currently depending on it. - @param moduleName An OSString containing the name of the module to unload. - */ - IOReturn unloadModule( OSString * moduleName ) const; -}; - -extern const OSSymbol * gIOClassKey; -extern const OSSymbol * gIOProbeScoreKey; -extern IOCatalogue * gIOCatalogue; - -#endif /* ! _IOKIT_IOCATALOGUE_H */ diff --git a/i386/include/IOKit/IOCommand.h b/i386/include/IOKit/IOCommand.h deleted file mode 100644 index 136c41b..0000000 --- a/i386/include/IOKit/IOCommand.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -/* - * - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - * 2001-01-18 gvdl Made the primary queue pointer public, to be used when - * Ownership is clear. - * 11/13/2000 CJS Created IOCommand class and implementation - * - */ - -/*! - * @header IOCommand - * @abstract - * This header contains the IOCommand class definition. - */ - -#ifndef _IOKIT_IO_COMMAND_H_ -#define _IOKIT_IO_COMMAND_H_ - -/* - * Kernel - */ - -#if defined(KERNEL) && defined(__cplusplus) - -#include <kern/queue.h> -#include <libkern/c++/OSObject.h> - -/*! - * @class IOCommand - * @abstract - * This class is an abstract class which represents an I/O command. - * @discussion - * This class is an abstract class which represents an I/O command passed - * from a device driver to a controller. All controller commands (e.g. IOATACommand) - * should inherit from this class. - */ - -class IOCommand : public OSObject -{ - OSDeclareDefaultStructors(IOCommand) - -public: - virtual bool init(void); - -/*! @var fCommandChain - This variable is used by the current 'owner' to queue the command. During the life cycle of a command it moves through a series of queues. This is the queue pointer for it. Only valid while 'ownership' is clear. For instance a IOCommandPool uses this pointer to maintain its list of free commands. May be manipulated using the kern/queue.h macros */ - queue_chain_t fCommandChain; /* used to queue commands */ -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_COMMAND_H_ */ diff --git a/i386/include/IOKit/IOCommandGate.h b/i386/include/IOKit/IOCommandGate.h deleted file mode 100644 index 1b17b79..0000000 --- a/i386/include/IOKit/IOCommandGate.h +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/*[ - 1999-8-10 Godfrey van der Linden(gvdl) - Created. -]*/ -/*! @language embedded-c++ */ - -#ifndef _IOKIT_IOCOMMANDGATE_H -#define _IOKIT_IOCOMMANDGATE_H - -#include <IOKit/IOEventSource.h> - -/*! - @class IOCommandGate : public IOEventSource - @abstract Single-threaded work-loop client request mechanism. - @discussion An IOCommandGate instance is an extremely light way mechanism -that executes an action on the driver's work-loop. 'On the work-loop' is -actually a lie but the work-loop single threaded semantic is maintained for this -event source. Using the work-loop gate rather than execution by the workloop. -The command gate tests for a potential self dead lock by checking if the -runCommand request is made from the work-loop's thread, it doesn't check for a -mutual dead lock though where a pair of work loop's dead lock each other. -<br><br> - The IOCommandGate is a lighter weight version of the IOCommandQueue and -should be used in preference. Generally use a command queue whenever you need a -client to submit a request to a work loop. A typical command gate action would -check if the hardware is active, if so it will add the request to a pending -queue internal to the device or the device's family. Otherwise if the hardware -is inactive then this request can be acted upon immediately. -<br><br> - CAUTION: The runAction, runCommand, and attemptCommand functions cannot be called from an interrupt context. - -*/ -class IOCommandGate : public IOEventSource -{ - OSDeclareDefaultStructors(IOCommandGate) - -public: -/*! - @typedef Action - @discussion Type and arguments of callout C function that is used when -a runCommand is executed by a client. Cast to this type when you want a C++ -member function to be used. Note the arg1 - arg3 parameters are straight pass -through from the runCommand to the action callout. - @param owner - Target of the function, can be used as a refcon. The owner is set -during initialisation of the IOCommandGate instance. Note if a C++ function -was specified this parameter is implicitly the first paramter in the target -member function's parameter list. - @param arg0 Argument to action from run operation. - @param arg1 Argument to action from run operation. - @param arg2 Argument to action from run operation. - @param arg3 Argument to action from run operation. -*/ - typedef IOReturn (*Action)(OSObject *owner, - void *arg0, void *arg1, - void *arg2, void *arg3); - -protected: -/*! - @function checkForWork - @abstract Not used, $link IOEventSource::checkForWork(). */ - virtual bool checkForWork(); - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - -public: -/*! @function commandGate - @abstract Factory method to create and initialise an IOCommandGate, See $link init. - @result Returns a pointer to the new command gate if sucessful, 0 otherwise. */ - static IOCommandGate *commandGate(OSObject *owner, Action action = 0); - -/*! @function init - @abstract Class initialiser. - @discussion Initialiser for IOCommandGate operates only on newly 'newed' -objects. Shouldn't be used to re-init an existing instance. - @param owner Owner of this, newly created, instance of the IOCommandGate. This argument will be used as the first parameter in the action callout. - @param action - Pointer to a C function that is called whenever a client of the -IOCommandGate calls runCommand. NB Can be a C++ member function but caller -must cast the member function to $link IOCommandGate::Action and they will get a -compiler warning. Defaults to zero, see $link IOEventSource::setAction. - @result True if inherited classes initialise successfully. */ - virtual bool init(OSObject *owner, Action action = 0); - - // Superclass overrides - virtual void free(); - virtual void setWorkLoop(IOWorkLoop *inWorkLoop); - -/*! @function runCommand - @abstract Single thread a command with the target work-loop. - @discussion Client function that causes the current action to be called in -a single threaded manner. Beware the work-loop's gate is recursive and command -gates can cause direct or indirect re-entrancy. When the executing on a -client's thread runCommand will sleep until the work-loop's gate opens for -execution of client actions, the action is single threaded against all other -work-loop event sources. If the command is disabled the attempt to run a command will be stalled until enable is called. - @param arg0 Parameter for action of command gate, defaults to 0. - @param arg1 Parameter for action of command gate, defaults to 0. - @param arg2 Parameter for action of command gate, defaults to 0. - @param arg3 Parameter for action of command gate, defaults to 0. - @result kIOReturnSuccess if successful. kIOReturnAborted if a disabled command gate is free()ed before being reenabled, kIOReturnNoResources if no action available. -*/ - virtual IOReturn runCommand(void *arg0 = 0, void *arg1 = 0, - void *arg2 = 0, void *arg3 = 0); - -/*! @function runAction - @abstract Single thread a call to an action with the target work-loop. - @discussion Client function that causes the given action to be called in -a single threaded manner. Beware the work-loop's gate is recursive and command -gates can cause direct or indirect re-entrancy. When the executing on a -client's thread runAction will sleep until the work-loop's gate opens for -execution of client actions, the action is single threaded against all other -work-loop event sources. If the command is disabled the attempt to run a command will be stalled until enable is called. - @param action Pointer to function to be executed in work-loop context. - @param arg0 Parameter for action parameter, defaults to 0. - @param arg1 Parameter for action parameter, defaults to 0. - @param arg2 Parameter for action parameter, defaults to 0. - @param arg3 Parameter for action parameter, defaults to 0. - @result kIOReturnSuccess if successful. kIOReturnBadArgument if action is not defined, kIOReturnAborted if a disabled command gate is free()ed before being reenabled. -*/ - virtual IOReturn runAction(Action action, - void *arg0 = 0, void *arg1 = 0, - void *arg2 = 0, void *arg3 = 0); - -/*! @function attemptCommand - @abstract Single thread a command with the target work-loop. - @discussion Client function that causes the current action to be called in -a single threaded manner. When the executing on a client's thread attemptCommand will fail if the work-loop's gate is closed. - @param arg0 Parameter for action of command gate, defaults to 0. - @param arg1 Parameter for action of command gate, defaults to 0. - @param arg2 Parameter for action of command gate, defaults to 0. - @param arg3 Parameter for action of command gate, defaults to 0. - @result kIOReturnSuccess if successful. kIOReturnNotPermitted if this event source is currently disabled, kIOReturnNoResources if no action available, kIOReturnCannotLock if lock attempt fails. -*/ - virtual IOReturn attemptCommand(void *arg0 = 0, void *arg1 = 0, - void *arg2 = 0, void *arg3 = 0); - -/*! @function attemptAction - @abstract Single thread a call to an action with the target work-loop. - @discussion Client function that causes the given action to be called in -a single threaded manner. Beware the work-loop's gate is recursive and command -gates can cause direct or indirect re-entrancy. When the executing on a -client's thread attemptCommand will fail if the work-loop's gate is closed. - @param action Pointer to function to be executed in work-loop context. - @param arg0 Parameter for action parameter, defaults to 0. - @param arg1 Parameter for action parameter, defaults to 0. - @param arg2 Parameter for action parameter, defaults to 0. - @param arg3 Parameter for action parameter, defaults to 0. - @result kIOReturnSuccess if successful. kIOReturnBadArgument if action is not defined, kIOReturnNotPermitted if this event source is currently disabled, kIOReturnCannotLock if lock attempt fails. - -*/ - virtual IOReturn attemptAction(Action action, - void *arg0 = 0, void *arg1 = 0, - void *arg2 = 0, void *arg3 = 0); - -/*! @function commandSleep - @abstract Put a thread that is currently holding the command gate to sleep. - @discussion Put a thread to sleep waiting for an event but release the gate first. If the event occurs then the commandGate is closed before the function returns. - @param event Pointer to an address. - @param interruptible THREAD_UNINT, THREAD_INTERRUPTIBLE or THREAD_ABORTSAFE. THREAD_UNINT specifies that the sleep cannot be interrupted by a signal. THREAD_INTERRUPTIBLE specifies that the sleep may be interrupted by a "kill -9" signal. THREAD_ABORTSAFE (the default value) specifies that the sleep may be interrupted by any user signal. - @result THREAD_AWAKENED - normal wakeup, THREAD_TIMED_OUT - timeout expired, THREAD_INTERRUPTED - interrupted, THREAD_RESTART - restart operation entirely, kIOReturnNotPermitted if the calling thread does not hold the command gate. */ - virtual IOReturn commandSleep(void *event, - UInt32 interruptible = THREAD_ABORTSAFE); - -/*! @function commandWakeup - @abstract Wakeup one or more threads that are asleep on an event. - @param event Pointer to an address. - @param onlyOneThread true to only wake up at most one thread, false otherwise. */ - virtual void commandWakeup(void *event, bool oneThread = false); - -/*! @function disable - @abstract Disable the command gate - @discussion When a command gate is disabled all future calls to runAction and runCommand will stall until the gate is enable()d later. This can be used to block client threads when a system sleep is requested. The IOWorkLoop thread itself will never stall, even when making runAction/runCommand calls. This call must be made from a gated context, to clear potential race conditions. */ - virtual void disable(); - -/*! @function enable - @abstract Enable command gate, this will unblock any blocked Commands and Actions. - @discussion Enable the command gate. The attemptAction/attemptCommand calls will now be enabled and can succeeed. Stalled runCommand/runAction calls will be woken up. */ - virtual void enable(); - -/*! @function commandSleep - @abstract Put a thread that is currently holding the command gate to sleep. - @discussion Put a thread to sleep waiting for an event but release the gate first. If the event occurs or timeout occurs then the commandGate is closed before the function returns. - @param event Pointer to an address. - @param deadline Clock deadline to timeout the sleep. - @param interruptible THREAD_UNINT, THREAD_INTERRUPTIBLE or THREAD_ABORTSAFE. THREAD_UNINT specifies that the sleep cannot be interrupted by a signal. THREAD_INTERRUPTIBLE specifies that the sleep may be interrupted by a "kill -9" signal. THREAD_ABORTSAFE specifies that the sleep may be interrupted by any user signal. - @result THREAD_AWAKENED - normal wakeup, THREAD_TIMED_OUT - timeout expired, THREAD_INTERRUPTED - interrupted, THREAD_RESTART - restart operation entirely, kIOReturnNotPermitted if the calling thread does not hold the command gate. */ - virtual IOReturn commandSleep(void *event, - AbsoluteTime deadline, - UInt32 interruptible); - -private: -#if __LP64__ - OSMetaClassDeclareReservedUnused(IOCommandGate, 0); -#else - OSMetaClassDeclareReservedUsed(IOCommandGate, 0); -#endif - OSMetaClassDeclareReservedUnused(IOCommandGate, 1); - OSMetaClassDeclareReservedUnused(IOCommandGate, 2); - OSMetaClassDeclareReservedUnused(IOCommandGate, 3); - OSMetaClassDeclareReservedUnused(IOCommandGate, 4); - OSMetaClassDeclareReservedUnused(IOCommandGate, 5); - OSMetaClassDeclareReservedUnused(IOCommandGate, 6); - OSMetaClassDeclareReservedUnused(IOCommandGate, 7); -}; - -#endif /* !_IOKIT_IOCOMMANDGATE_H */ diff --git a/i386/include/IOKit/IOCommandPool.h b/i386/include/IOKit/IOCommandPool.h deleted file mode 100644 index 91069f3..0000000 --- a/i386/include/IOKit/IOCommandPool.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -/* - * - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - * 2001-01-17 gvdl Re-implement on IOCommandGate::commandSleep - * 11/13/2000 CJS Created IOCommandPool class and implementation - * - */ - -/*! - * @header IOCommandPool - * @abstract - * This header contains the IOCommandPool class definition. - */ - -#ifndef _IOKIT_IO_COMMAND_POOL_H_ -#define _IOKIT_IO_COMMAND_POOL_H_ - -/* - * Kernel - */ - -#if defined(KERNEL) && defined(__cplusplus) - -#include <kern/kern_types.h> -#include <kern/queue.h> -#include <IOKit/IOCommand.h> -#include <IOKit/IOCommandGate.h> -#include <IOKit/IOService.h> -#include <IOKit/IOWorkLoop.h> - -/*! - * @class IOCommandPool - * @abstract Manipulates a pool of commands which inherit from IOCommand. - * @discussion - * The IOCommandPool class is used to manipulate a pool of commands which - * inherit from IOCommand. It includes a factory method to create a pool - * of a certain size. Once the factory method is invoked, the semaphore - * is set to zero. The caller must then put commands in the pool by creating - * the command (via the controller's factory method or a memory allocation) - * and calling the returnCommand method with the newly created command as its - * argument. - */ - -class IOCommandPool : public OSObject -{ - - OSDeclareDefaultStructors(IOCommandPool) - - -protected: - - queue_head_t fQueueHead; /* head of the queue of elements available */ - UInt32 fSleepers; /* Count of threads sleeping on this pool */ - IOCommandGate *fSerializer; /* command gate used for serializing pool access */ - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOEventSource in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - - /*! - * @const kIOCommandPoolDefaultSize - * @abstract The default size of any command pool. - * @discussion - * kIOCommandPoolDefaultSize is the default size of any command pool. - * The default size was determined to be the smallest size for which - * a pool makes sense. - */ - - static const UInt32 kIOCommandPoolDefaultSize = 2; - - /* - * Free all of this object's outstanding resources. - */ - - virtual void free(void); - - -public: - - /*! - * @function initWithWorkLoop - * @abstract Primary initializer for an IOCommandPool object. - * @discussion Primary initializer for an IOCommandPool. - * Should probably use IOCommandPool::withWorkLoop() as it is easier to use. - * @param inWorkLoop - * The workloop that this command pool should synchronize with. - * @result Returns true if command pool was successfully initialized. - */ - virtual bool initWithWorkLoop(IOWorkLoop *workLoop); - - /*! - * @function withWorkLoop - * @abstract Primary factory method for the IOCommandPool class - * @discussion - * The withWorkLoop method is what is known as a factory method. It creates - * a new instance of an IOCommandPool and returns a pointer to that object. - * @param inWorkLoop - * The workloop that this command pool should synchronize with. - * @result - * Returns a pointer to an instance of IOCommandPool if successful, - * otherwise NULL. - */ - - static IOCommandPool *withWorkLoop(IOWorkLoop *inWorkLoop); - - /*! - * @function init - * @abstract Should never be used, obsolete. See initWithWorkLoop. - */ - virtual bool init(IOService *inOwner, - IOWorkLoop *inWorkLoop, - UInt32 inSize = kIOCommandPoolDefaultSize); - - /*! - * @function withWorkLoop - * @abstract Should never be used, obsolete. See IOCommandPool::withWorkLoop. - */ - static IOCommandPool *commandPool(IOService *inOwner, - IOWorkLoop *inWorkLoop, - UInt32 inSize = kIOCommandPoolDefaultSize); - - - /*! - * @function getCommand - * @discussion The getCommand method is used to get a pointer to an object of type IOCommand from the pool. - * @param blockForCommand - * If the caller would like to have its thread slept until a command is - * available, it should pass true, else false. - * @result - * If the caller passes true in blockForCommand, getCommand guarantees that - * the result will be a pointer to an IOCommand object from the pool. If - * the caller passes false, s/he is responsible for checking whether a non-NULL - * pointer was returned. - */ - - virtual IOCommand *getCommand(bool blockForCommand = true); - - /*! - * @function returnCommand - * @discussion - * The returnCommand method is used to place an object of type IOCommand - * into the pool, whether it be the first time, or the 1000th time. - * @param commmand - * The command to place in the pool. - */ - - virtual void returnCommand(IOCommand *command); - -protected: - - /*! - * @function gatedGetCommand - * @discussion - * The gatedGetCommand method is used to serialize the extraction of a - * command from the pool behind a command gate, runAction-ed by getCommand. - * @param vCommand - * A pointer to a pointer to an IOCommand object where the returned - * command will be stored. - * @param vBlock - * A bool that indicates whether to block the request until a command - * becomes available. - * @result - * Returns kIOReturnNoResources if no command is available and the client - * doesn't wish to block until one does become available. - * kIOReturnSuccess if the vCommand argument is valid. - */ - virtual IOReturn gatedGetCommand(IOCommand **command, bool blockForCommand); - - /*! - * @function gatedReturnCommand - * @discussion - * The gatedReturnCommand method is used to serialize the return of a - * command to the pool behind a command gate, runAction-ed by returnCommand. - * @param vCommand - * A pointer to the IOCommand object to be returned to the pool. - * @result - * Always returns kIOReturnSuccess if the vCommand argument is valid. - */ - virtual IOReturn gatedReturnCommand(IOCommand *command); - -private: - OSMetaClassDeclareReservedUnused(IOCommandPool, 0); - OSMetaClassDeclareReservedUnused(IOCommandPool, 1); - OSMetaClassDeclareReservedUnused(IOCommandPool, 2); - OSMetaClassDeclareReservedUnused(IOCommandPool, 3); - OSMetaClassDeclareReservedUnused(IOCommandPool, 4); - OSMetaClassDeclareReservedUnused(IOCommandPool, 5); - OSMetaClassDeclareReservedUnused(IOCommandPool, 6); - OSMetaClassDeclareReservedUnused(IOCommandPool, 7); -}; - -#endif /* defined(KERNEL) && defined(__cplusplus) */ - -#endif /* _IOKIT_IO_COMMAND_POOL_H_ */ diff --git a/i386/include/IOKit/IOConditionLock.h b/i386/include/IOKit/IOConditionLock.h deleted file mode 100644 index f628fee..0000000 --- a/i386/include/IOKit/IOConditionLock.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * Copyright (c) 1994-1996 NeXT Software, Inc. All rights reserved. - */ - -#ifndef _IOKIT_IOCONDITIONLOCK_H -#define _IOKIT_IOCONDITIONLOCK_H - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOLib.h> -#include <IOKit/system.h> - -#include <IOKit/IOLocks.h> - -class IOConditionLock : public OSObject -{ - OSDeclareDefaultStructors(IOConditionLock) - -private: - IOLock * cond_interlock; // condition var Simple lock - volatile int condition; - - IOLock * sleep_interlock; // sleep lock Simple lock - unsigned char interruptible; - volatile bool want_lock; - volatile bool waiting; - -public: - static IOConditionLock *withCondition(int condition, bool inIntr = true); - virtual bool initWithCondition(int condition, bool inIntr = true); - virtual void free(); - - virtual bool tryLock(); // acquire lock, no waiting - virtual int lock(); // acquire lock (enter critical section) - virtual void unlock(); // release lock (leave critical section) - - virtual bool getInterruptible() const; - virtual int getCondition() const; - virtual int setCondition(int condition); - - virtual int lockWhen(int condition); // acquire lock when condition - virtual void unlockWith(int condition); // set condition & release lock -}; - -#endif /* _IOKIT_IOCONDITIONLOCK_H */ diff --git a/i386/include/IOKit/IODMACommand.h b/i386/include/IOKit/IODMACommand.h deleted file mode 100644 index a2a2852..0000000 --- a/i386/include/IOKit/IODMACommand.h +++ /dev/null @@ -1,557 +0,0 @@ -/* - * Copyright (c) 2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _IODMACOMMAND_H -#define _IODMACOMMAND_H - -#include <IOKit/IOCommand.h> -#include <IOKit/IOMemoryDescriptor.h> -class IOMapper; - -/**************************** class IODMACommand ***************************/ - -/*! - @class IODMACommand - @abstract A mechanism to convert memory references to I/O bus addresses. - @discussion The IODMACommand is supersedes the IOMemoryCursor and greatly enhances the functionality and power of it. The command can be specified to output 64 bit physical addresses and also allows driver writers bypass mapping hardware or get addresses suitable for non-snooped DMA. -<br><br> - The command is designed to be very easily subclassable. Most driver writers need to associate some DMA operations with their memory descriptor and usually use a C structure for that purpose. This structure is often kept in a linked list. This IODMACommand has built it <kern/queue.h> linkage and can be derived and 'public:' variables added, giving the developer a structure that can associate a memory descriptor with a particular dma command but will also allow the developer to generate that command and keep the state necessary for tracking it. -<br><br> - It is envisaged that a pool of IODMACommands will be created at driver initialisation and each command will be kept in an IOCommandPool while not in use. However if developers wishes to maintain their own free lists that is certainly possible. See the <kern/queue.h> and <xnu/iokit/Kernel/IOCommandPool> for sample code on manipulating the command's doubly linked list entries. -<br><br> - The IODMACommand can be used in a 'weak-linked' manner. To do this you must avoid using any static member functions. Use the, much slower but safe, weakWithSpecification function. On success a dma command instance will be returned. This instance can then be used to clone as many commands as is needed. Remember deriving from this class can not be done weakly, that is no weak subclassing! -*/ - -class IODMACommand : public IOCommand -{ - OSDeclareDefaultStructors(IODMACommand); - -friend class IODMAEventSource; - -public: - -/*! - @typedef Segment32 - @discussion A 32 bit I/O bus address/length pair -*/ - struct Segment32 { - UInt32 fIOVMAddr, fLength; - }; - -/*! - @typedef Segment64 - @discussion A 64 bit I/O bus address/length pair -*/ - struct Segment64 { - UInt64 fIOVMAddr, fLength; - }; - -/*! @enum MappingOptions - @abstract Mapping types to indicate the desired mapper type for translating memory descriptors into I/O DMA Bus addresses. - @constant kNonCoherent Used by drivers for non-coherent transfers, implies unmapped memmory - @constant kMapped Allow a driver to define addressing size - @constant kBypassed Allow drivers to bypass any mapper - @constant kMaxMappingOptions Internal use only -*/ - enum MappingOptions { - kMapped = 0x00000000, - kBypassed = 0x00000001, - kNonCoherent = 0x00000002, - kTypeMask = 0x0000000f, - - kNoCacheStore = 0x00000010, // Memory in descriptor - kOnChip = 0x00000020, // Indicates DMA is on South Bridge - kIterateOnly = 0x00000040 // DMACommand will be used as a cursor only - }; - -/*! @enum SynchronizeOptions - @abstract Options for the synchronize method. - @constant kForceDoubleBuffer Copy the entire prepared range to a new page aligned buffer. -*/ - enum SynchronizeOptions { - kForceDoubleBuffer = 0x01000000 - }; - -/*! - @typedef SegmentFunction - @discussion Pointer to a C function that translates a 64 segment and outputs a single desired segment to the array at the requested index. There are a group of pre-implemented SegmentFunctions that may be usefull to the developer below. - @param segment The 64Bit I/O bus address and length. - @param segments Base of the output vector of DMA address length pairs. - @param segmentIndex Index to output 'segment' in the 'segments' array. - @result Returns true if segment encoding succeeded. false may be returned if the current segment does not fit in an output segment, i.e. a 38bit address wont fit into a 32 encoding. -*/ - typedef bool (*SegmentFunction)(IODMACommand *target, - Segment64 segment, - void *segments, - UInt32 segmentIndex); - - // -------------- Preimplemented output functions ---------------- - -/*! @function OutputHost32 - @abstract Output host natural Segment32 output segment function. -*/ - static bool OutputHost32(IODMACommand *target, - Segment64 seg, void *segs, UInt32 ind); - -/*! @defined kIODMACommandOutputHost32 - @abstract Output host natural Segment32 output segment function. - */ -#define kIODMACommandOutputHost32 (IODMACommand::OutputHost32) - -/*! @function OutputBig32 - @abstract Output big-endian Segment32 output segment function. -*/ - static bool OutputBig32(IODMACommand *target, - Segment64 seg, void *segs, UInt32 ind); - -/*! @defined kIODMACommandOutputBig32 - @abstract Output big-endian Segment32 output segment function. - */ -#define kIODMACommandOutputBig32 (IODMACommand::OutputBig32) - -/*! @function OutputLittle32 - @abstract Output little-endian Segment32 output segment function. -*/ - static bool OutputLittle32(IODMACommand *target, - Segment64 seg, void *segs, UInt32 ind); - -/*! @defined kIODMACommandOutputLittle32 - @abstract Output little-endian Segment32 output segment function. -*/ -#define kIODMACommandOutputLittle32 (IODMACommand::OutputLittle32) - -/*! @function OutputHost64 - @abstract Output host natural Segment64 output segment function. -*/ - static bool OutputHost64(IODMACommand *target, - Segment64 seg, void *segs, UInt32 ind); - -/*! @defined kIODMACommandOutputHost64 - @abstract Output host natural Segment64 output segment function. -*/ -#define kIODMACommandOutputHost64 (IODMACommand::OutputHost64) - -/*! @function OutputBig64 - @abstract Output big-endian Segment64 output segment function. -*/ - static bool OutputBig64(IODMACommand *target, - Segment64 seg, void *segs, UInt32 ind); - -/*! @defined kIODMACommandOutputLittle64 - @abstract Output little-endian Segment64 output segment function. -*/ -#define kIODMACommandOutputBig64 (IODMACommand::OutputBig64) - -/*! @function OutputLittle64 - @abstract Output little-endian Segment64 output segment function. -*/ - static bool OutputLittle64(IODMACommand *target, - Segment64 seg, void *segs, UInt32 ind); - -/*! @defined kIODMACommandOutputBig64 - @abstract Output big-endian Segment64 output segment function. -*/ -#define kIODMACommandOutputLittle64 (IODMACommand::OutputLittle64) - -/*! @function withSpecification - @abstract Creates and initializes an IODMACommand in one operation. - @discussion Factory function to create and initialize an IODMACommand in one operation. - @param outSegFunc SegmentFunction to call to output one physical segment. A set of nine commonly required segment functions are provided. - @param numAddressBits Number of bits that the hardware uses on its internal address bus. Typically 32 but may be more on modern hardware. A 0 implies no-restriction other than that implied by the output segment function. - @param maxSegmentSize Maximum allowable size for one segment. If 0 is passed the maximum segment size is unlimited. - @param mappingOptions is the type of mapping that is required to translate an IOMemoryDescriptor into the desired number of bits. For instance if your hardware only supports 32 bits but must run on machines with > 4G of RAM some mapping will be required. Number of bits will be specified in numAddressBits, see below.This parameter can take 3 values:- kNonCoherent - used for non-coherent hardware transfers, Mapped - Validate that all I/O bus generated addresses are within the number of addressing bits specified, Bypassed indicates that bypassed addressing is required, this is used when the hardware transferes are into coherent memory but no mapping is required. See also prepare() for failure cases. - @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. - @param alignment Alignment restriction, in bytes, on I/O bus addresses. Defaults to single byte alignment. - @param mapper For mapping types kMapped & kBypassed mapper is used to define the hardware that will perform the mapping, defaults to the system mapper. - @result Returns a new memory cursor if successfully created and initialized, 0 otherwise. -*/ - static IODMACommand * - withSpecification(SegmentFunction outSegFunc, - UInt8 numAddressBits, - UInt64 maxSegmentSize, - MappingOptions mappingOptions = kMapped, - UInt64 maxTransferSize = 0, - UInt32 alignment = 1, - IOMapper *mapper = 0, - void *refCon = 0); - -/*! @function weakWithSpecification - @abstract Creates and initialises an IODMACommand in one operation if this version of the operating system supports it. - @discussion Factory function to create and initialise an IODMACommand in one operation. The function allows a developer to 'weak' link with IODMACommand. This function will return kIOReturnUnsupported if the IODMACommand is unavailable. This function is actually fairly slow so it will be better to call it once then clone the successfully create command using cloneCommand (q.v.). - @param newCommand Output reference variable of the newly created IODMACommand. - @param outSegFunc SegmentFunction to call to output one physical segment. A set of nine commonly required segment functions are provided. - @param numAddressBits Number of bits that the hardware uses on its internal address bus. Typically 32 but may be more on modern hardware. A 0 implies no-restriction other than that implied by the output segment function. - @param maxSegmentSize Maximum allowable size for one segment. Zero is treated as an unlimited segment size. - @param mapType is the type of mapping that is required to translate an IOMemoryDescriptor into the desired number of bits. For instance if your hardware only supports 32 bits but must run on machines with > 4G of RAM some mapping will be required. Number of bits will be specified in numAddressBits, see below. This parameter can take 3 values:- kNonCoherent - used for non-coherent hardware transfers, Mapped - Validate that all I/O bus generated addresses are within the number of addressing bits specified, Bypassed indicates that bypassed addressing is required, this is used when the hardware transfers are into coherent memory but no mapping is required. See also prepare() for failure cases. - @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. - @param alignment Alignment restriction, in bytes, on I/O bus addresses. Defaults to single byte alignment. - @param mapper For mapping types kMapped & kBypassed mapper is used to define the hardware that will perform the mapping, defaults to the system mapper. - @result kIOReturnSuccess if everything is OK, otherwise kIOReturnBadArgument if newCommand is NULL, kIOReturnUnsupported if the kernel doesn't export IODMACommand or IOReturnError if the new command fails to init, q.v. initWithSpecification. -*/ - // Note that the function has the attribute always_inline. - // The point of this function is to make a call into the kernel - // without generating an undefined symbol. If the client could call - // the code as a function then the goal of no undefined symbols - // would be lost thus defeating the purpose. - static inline IOReturn weakWithSpecification - (IODMACommand **newCommand, - SegmentFunction outSegFunc, - UInt8 numAddressBits, - UInt64 maxSegmentSize, - MappingOptions mapType = kMapped, - UInt64 maxTransferSize = 0, - UInt32 alignment = 1, - IOMapper *mapper = 0, - void *refCon = 0) __attribute__((always_inline)); - -/*! - @function cloneCommand - @abstract Creates a new command based on the specification of the current one. - @discussion Factory function to create and initialise an IODMACommand in one operation. The current command's specification will be duplicated in the new object, but however none of its state will be duplicated. This means that it is safe to clone a command even if it is currently active and running, however you must be certain that the command to be duplicated does have a valid reference for the duration. - @result Returns a new memory cursor if successfully created and initialised, 0 otherwise. -*/ - virtual IODMACommand *cloneCommand(void *refCon = 0); - -/*! @function initWithSpecification - @abstract Primary initializer for the IODMACommand class. - @param outSegFunc SegmentFunction to call to output one physical segment. A set of nine commonly required segment functions are provided. - @param numAddressBits Number of bits that the hardware uses on its internal address bus. Typically 32 but may be more on modern hardware. A 0 implies no-restriction other than that implied by the output segment function. - @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0 which means any size. - @param mappingOptions is the type of mapping that is required to translate an IOMemoryDescriptor into the desired number of bits. For instance if your hardware only supports 32 bits but must run on machines with > 4G of RAM some mapping will be required. Number of bits will be specified in numAddressBits, see below.This parameter can take 3 values:- kNonCoherent - used for non-coherent hardware transfers, Mapped - Validate that all I/O bus generated addresses are within the number of addressing bits specified, Bypassed indicates that bypassed addressing is required, this is used when the hardware transferes are into coherent memory but no mapping is required. See also prepare() for failure cases. - @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. - @param alignment Alignment restriction, in bytes, on I/O bus addresses. Defaults to single byte alignment. - @param mapper For mapping types kMapped & kBypassed mapper is used to define the hardware that will perform the mapping, defaults to the system mapper. - @result Can fail if the mapping type is not recognised, if one of the 3 mandatory parameters are set to 0, if a 32 bit output function is selected when more than 32 bits of address is required or, if kBypassed is requested on a machine that doesn't support bypassing. Returns true otherwise. -*/ - virtual bool initWithSpecification( SegmentFunction outSegFunc, - UInt8 numAddressBits, - UInt64 maxSegmentSize, - MappingOptions mappingOptions = kMapped, - UInt64 maxTransferSize = 0, - UInt32 alignment = 1, - IOMapper *mapper = 0, - void *refCon = 0); - -/*! @function setMemoryDescriptor - @abstract Sets and resets the DMACommand's current memory descriptor - @discussion The DMA command will configure itself based on the information that it finds in the memory descriptor. It looks for things like the direction of the memory descriptor and whether the current memory descriptor is already mapped into some IOMMU. As a programmer convenience it can also prepare the memory descriptor immediately. See prepare(). Note the IODMACommand is designed to used multiple times with a succession of memory descriptors, making the pooling of commands possible. It is an error though to attempt to reset a currently prepared() DMA command. Warning: This routine may block so never try to autoprepare an IODMACommand while in a gated context, i.e. one of the WorkLoops action call outs. - @param mem A pointer to the current I/Os memory descriptor. - @param autoPrepare An optional boolean variable that will call the prepare() function automatically after the memory descriptor is processed. Defaults to true. - @result Returns kIOReturnSuccess, kIOReturnBusy if currently prepared, kIOReturnNoSpace if the length(mem) >= Maximum Transfer Size or the error codes returned by prepare() (qv). -*/ - virtual IOReturn setMemoryDescriptor(const IOMemoryDescriptor *mem, - bool autoPrepare = true); - -/*! @function clearMemoryDescriptor - @abstract Clears the DMACommand's current memory descriptor - @discussion completes and invalidates the cache if the DMA command is currently active, copies all data from bounce buffers if necessary and releases all resources acquired during setMemoryDescriptor. - @param autoComplete An optional boolean variable that will call the complete() function automatically before the memory descriptor is processed. Defaults to true. -*/ - virtual IOReturn clearMemoryDescriptor(bool autoComplete = true); - -/*! @function getMemoryDescriptor - @abstract Get the current memory descriptor -*/ - virtual const IOMemoryDescriptor *getMemoryDescriptor() const; - -/*! @function prepare - @abstract Prepare the memory for an I/O transfer. - @discussion Allocate the mapping resources neccessary for this transfer, specifying a sub range of the IOMemoryDescriptor that will be the target of the I/O. The complete() method frees these resources. Data may be copied to buffers for kIODirectionOut memory descriptors, depending on hardware mapping resource availabilty or alignment restrictions. It should be noted that the this function may block and should only be called on the clients context, i.e never call this routine while gated; also the call itself is not thread safe though this should be an issue as each IODMACommand is independant. - @param offset defines the starting offset in the memory descriptor the DMA command will operate on. genIOVMSegments will produce its results based on the offset and length passed to the prepare method. - @param length defines the ending position in the memory descriptor the DMA command will operate on. genIOVMSegments will produce its results based on the offset and length passed to the prepare method. - @param flushCache Flush the caches for the memory descriptor and make certain that the memory cycles are complete. Defaults to true for kNonCoherent and is ignored by the other types. - @param synchronize Copy any buffered data back from the target IOMemoryDescriptor. Defaults to true, if synchronize() is being used to explicitly copy data, passing false may avoid an unneeded copy. - @result An IOReturn code. */ - - virtual IOReturn prepare(UInt64 offset = 0, UInt64 length = 0, bool flushCache = true, bool synchronize = true); - -/*! @function complete - @abstract Complete processing of DMA mappings after an I/O transfer is finished. - @discussion This method should not be called unless a prepare was previously issued; the prepare() and complete() must occur in pairs, before and after an I/O transfer - @param invalidCache Invalidate the caches for the memory descriptor. Defaults to true for kNonCoherent and is ignored by the other types. - @param synchronize Copy any buffered data back to the target IOMemoryDescriptor. Defaults to true, if synchronize() is being used to explicitly copy data, passing false may avoid an unneeded copy. - @result kIOReturnNotReady if not prepared, kIOReturnSuccess otherwise. */ - - virtual IOReturn complete(bool invalidateCache = true, bool synchronize = true); - -/*! @function synchronize - @abstract Bring IOMemoryDescriptor and IODMACommand buffers into sync. - @discussion This method should not be called unless a prepare was previously issued. If needed a caller may synchronize any IODMACommand buffers with the original IOMemoryDescriptor buffers. - @param options Specifies the direction of the copy: - kIODirectionOut copy IOMemoryDesciptor memory to any IODMACommand buffers. By default this action takes place automatically at prepare(). - kIODirectionIn copy any IODMACommand buffers back to the IOMemoryDescriptor. By default this action takes place automatically at complete(). - kForceDoubleBuffer copy the entire prepared range to a new page aligned buffer. - @result kIOReturnNotReady if not prepared, kIOReturnBadArgument if invalid options are passed, kIOReturnSuccess otherwise. */ - - virtual IOReturn synchronize(IOOptionBits options); - -/*! @function genIOVMSegments - @abstract Generates a physical scatter/gather for the current DMA command - @discussion Generates a list of physical segments from the given memory descriptor, relative to the current position of the descriptor. The constraints that are set during initialisation will be respected. This function maintains the state across multiple calls for efficiency. However the state is discarded if the new offset is not the expected one. - @param offset input/output parameter, defines the starting and ending offset in the memory descriptor, relative to any offset passed to the prepare() method. - @param segments Void pointer to base of output physical scatter/gather list. Always passed directly onto the SegmentFunction. - @param numSegments Input/output parameter Number of segments that can fit in the segment array and returns number of segments generated. - @result kIOReturnSuccess on success, kIOReturnOverrun if the memory descriptor is exhausted, kIOReturnMessageTooLarge if the output segment function's address bits has insufficient resolution for a segment, kIOReturnNotReady if the DMA command has not be prepared, kIOReturnBadArgument if the DMA command doesn't have a memory descriptor yet or some of the parameters are NULL and kIOReturnNotReady if the DMA command is not prepared. -*/ - virtual IOReturn genIOVMSegments(UInt64 *offset, - void *segments, - UInt32 *numSegments); - -private: - virtual UInt64 transfer( IOOptionBits transferOp, UInt64 offset, void * buffer, UInt64 length ); - -public: - -/*! @function writeBytes - @abstract Copy data to the IODMACommand's buffer from the specified buffer. - @discussion This method copies data to the IODMACommand's memory at the given offset, from the caller's buffer. The IODMACommand must be prepared, and the offset is relative to the prepared offset. - @param offset A byte offset into the IODMACommand's memory, relative to the prepared offset. - @param bytes The caller supplied buffer to copy the data from. - @param length The length of the data to copy. - @result The number of bytes copied, zero will be returned if the specified offset is beyond the prepared length of the IODMACommand. */ - - UInt64 writeBytes(UInt64 offset, const void *bytes, UInt64 length); - -/*! @function readBytes - @abstract Copy data from the IODMACommand's buffer to the specified buffer. - @discussion This method copies data from the IODMACommand's memory at the given offset, to the caller's buffer. The IODMACommand must be prepared, and the offset is relative to the prepared offset. - @param offset A byte offset into the IODMACommand's memory, relative to the prepared offset. - @param bytes The caller supplied buffer to copy the data to. - @param length The length of the data to copy. - @result The number of bytes copied, zero will be returned if the specified offset is beyond the prepared length of the IODMACommand. */ - - UInt64 readBytes(UInt64 offset, void *bytes, UInt64 length); - -/*! @function gen32IOVMSegments - @abstract Helper function for a type checked call to genIOVMSegments(qv), for use with an IODMACommand set up with the output function kIODMACommandOutputHost32, kIODMACommandOutputBig32, or kIODMACommandOutputLittle32. If the output function of the IODMACommand is not a 32 bit function, results will be incorrect. -*/ - inline IOReturn gen32IOVMSegments(UInt64 *offset, - Segment32 *segments, - UInt32 *numSegments) - { return genIOVMSegments(offset, segments, numSegments); }; - -/*! @function gen64IOVMSegments - @abstract Helper function for a type checked call to genIOVMSegments(qv), for use with an IODMACommand set up with the output function kIODMACommandOutputHost64, kIODMACommandOutputBig64, or kIODMACommandOutputLittle64. If the output function of the IODMACommand is not a 64 bit function, results will be incorrect. -*/ - inline IOReturn gen64IOVMSegments(UInt64 *offset, - Segment64 *segments, - UInt32 *numSegments) - { return genIOVMSegments(offset, segments, numSegments); }; - - IOReturn - genIOVMSegments(SegmentFunction segmentFunction, - UInt64 *offsetP, - void *segmentsP, - UInt32 *numSegmentsP); - - virtual void free(); - -private: - typedef IOReturn (*InternalSegmentFunction)( - void *reference, - IODMACommand *target, - Segment64 segment, - void *segments, - UInt32 segmentIndex); - - IOReturn genIOVMSegments(uint32_t op, - InternalSegmentFunction outSegFunc, - void *reference, - UInt64 *offsetP, - void *segmentsP, - UInt32 *numSegmentsP); - - static IOReturn clientOutputSegment( - void *reference, IODMACommand *target, - Segment64 segment, void *vSegList, UInt32 outSegIndex); - - static IOReturn segmentOp( - void *reference, - IODMACommand *target, - Segment64 segment, - void *segments, - UInt32 segmentIndex); - IOReturn walkAll(UInt8 op); - -public: - -/*! @function prepareWithSpecification - @abstract Prepare the memory for an I/O transfer with a new specification. - @discussion Allocate the mapping resources neccessary for this transfer, specifying a sub range of the IOMemoryDescriptor that will be the target of the I/O. The complete() method frees these resources. Data may be copied to buffers for kIODirectionOut memory descriptors, depending on hardware mapping resource availabilty or alignment restrictions. It should be noted that the this function may block and should only be called on the clients context, i.e never call this routine while gated; also the call itself is not thread safe though this should be an issue as each IODMACommand is independant. - @param outSegFunc SegmentFunction to call to output one physical segment. A set of nine commonly required segment functions are provided. - @param numAddressBits Number of bits that the hardware uses on its internal address bus. Typically 32 but may be more on modern hardware. A 0 implies no-restriction other than that implied by the output segment function. - @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0 which means any size. - @param mappingOptions is the type of mapping that is required to translate an IOMemoryDescriptor into the desired number of bits. For instance if your hardware only supports 32 bits but must run on machines with > 4G of RAM some mapping will be required. Number of bits will be specified in numAddressBits, see below.This parameter can take 3 values:- kNonCoherent - used for non-coherent hardware transfers, Mapped - Validate that all I/O bus generated addresses are within the number of addressing bits specified, Bypassed indicates that bypassed addressing is required, this is used when the hardware transferes are into coherent memory but no mapping is required. See also prepare() for failure cases. - @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. - @param alignment Alignment restriction, in bytes, on I/O bus addresses. Defaults to single byte alignment. - @param mapper For mapping types kMapped & kBypassed mapper is used to define the hardware that will perform the mapping, defaults to the system mapper. - @param offset defines the starting offset in the memory descriptor the DMA command will operate on. genIOVMSegments will produce its results based on the offset and length passed to the prepare method. - @param length defines the ending position in the memory descriptor the DMA command will operate on. genIOVMSegments will produce its results based on the offset and length passed to the prepare method. - @param flushCache Flush the caches for the memory descriptor and make certain that the memory cycles are complete. Defaults to true for kNonCoherent and is ignored by the other types. - @param synchronize Copy any buffered data back from the target IOMemoryDescriptor. Defaults to true, if synchronize() is being used to explicitly copy data, passing false may avoid an unneeded copy. - @result An IOReturn code. Can fail if the mapping type is not recognised, if one of the 3 mandatory parameters are set to 0, if a 32 bit output function is selected when more than 32 bits of address is required or, if kBypassed is requested on a machine that doesn't support bypassing. -*/ - - virtual IOReturn prepareWithSpecification(SegmentFunction outSegFunc, - UInt8 numAddressBits, - UInt64 maxSegmentSize, - MappingOptions mappingOptions = kMapped, - UInt64 maxTransferSize = 0, - UInt32 alignment = 1, - IOMapper *mapper = 0, - UInt64 offset = 0, - UInt64 length = 0, - bool flushCache = true, - bool synchronize = true); - - static IOReturn transferSegment( - void *reference, - IODMACommand *target, - Segment64 segment, - void *segments, - UInt32 segmentIndex); - -/*! @function getPreparedOffsetAndLength - @abstract Returns the offset and length into the target IOMemoryDescriptor of a prepared IODDMACommand. - @discussion If successfully prepared, returns the offset and length into the IOMemoryDescriptor. Will fail for an unprepared IODMACommand. - @param offset returns the starting offset in the memory descriptor the DMA command was prepared with. Pass NULL for don't care. - @param length returns the length in the memory descriptor the DMA command was prepared with. Pass NULL for don't care. - @result An IOReturn code. kIOReturnNotReady if the IODMACommand is not prepared. */ - - virtual IOReturn getPreparedOffsetAndLength(UInt64 * offset, UInt64 * length); - - UInt8 getNumAddressBits(void); - UInt32 getAlignment(void); - -private: - OSMetaClassDeclareReservedUsed(IODMACommand, 0); - OSMetaClassDeclareReservedUsed(IODMACommand, 1); - OSMetaClassDeclareReservedUsed(IODMACommand, 2); - OSMetaClassDeclareReservedUnused(IODMACommand, 3); - OSMetaClassDeclareReservedUnused(IODMACommand, 4); - OSMetaClassDeclareReservedUnused(IODMACommand, 5); - OSMetaClassDeclareReservedUnused(IODMACommand, 6); - OSMetaClassDeclareReservedUnused(IODMACommand, 7); - OSMetaClassDeclareReservedUnused(IODMACommand, 8); - OSMetaClassDeclareReservedUnused(IODMACommand, 9); - OSMetaClassDeclareReservedUnused(IODMACommand, 10); - OSMetaClassDeclareReservedUnused(IODMACommand, 11); - OSMetaClassDeclareReservedUnused(IODMACommand, 12); - OSMetaClassDeclareReservedUnused(IODMACommand, 13); - OSMetaClassDeclareReservedUnused(IODMACommand, 14); - OSMetaClassDeclareReservedUnused(IODMACommand, 15); - -public: -/*! @var fRefCon Reference Constant, client defined publicly avialable */ - void *fRefCon; - -protected: - -/*! @var fMaxSegmentSize Maximum size of one segment in a scatter/gather list */ - UInt64 fMaxSegmentSize; - -/*! @var fMaxTransferSize - Maximum size of a transfer that this memory cursor is allowed to generate */ - UInt64 fMaxTransferSize; - -/*! @var fBypassMask - Mask to be ored into the address to bypass the given iommu's mapping. */ - UInt64 fBypassMask; - -/*! @var fMapper - Client defined mapper. */ - IOMapper *fMapper; - -/*! @var fMemory - memory descriptor for current I/O. */ - const IOMemoryDescriptor *fMemory; - -/*! @var fOutSeg The action method called when an event has been delivered */ - SegmentFunction fOutSeg; - -/*! @var fAlignMask - Alignment restriction mask. */ - UInt32 fAlignMask; - -/*! @var fNumAddressBits - Number of bits that the hardware can address */ - UInt32 fNumAddressBits; - -/*! @var fNumSegments - Number of contiguous segments required for the current memory descriptor and desired mapping */ - UInt32 fNumSegments; - -/*! @var fMappingOptions - What type of I/O virtual address mapping is required for this command */ - MappingOptions fMappingOptions; - -/*! @var fActive - fActive indicates that this DMA command is currently prepared and ready to go */ - UInt32 fActive; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - struct IODMACommandInternal * reserved; -}; - -IOReturn IODMACommand:: -weakWithSpecification(IODMACommand **newCommand, - SegmentFunction outSegFunc, - UInt8 numAddressBits, - UInt64 maxSegmentSize, - MappingOptions mapType, - UInt64 maxTransferSize, - UInt32 alignment, - IOMapper *mapper, - void *refCon) -{ - if (!newCommand) - return kIOReturnBadArgument; - - IODMACommand *self = (IODMACommand *) - OSMetaClass::allocClassWithName("IODMACommand"); - if (!self) - return kIOReturnUnsupported; - - IOReturn ret; - bool inited = self-> - initWithSpecification(outSegFunc, - numAddressBits, maxSegmentSize, mapType, - maxTransferSize, alignment, mapper, refCon); - if (inited) - ret = kIOReturnSuccess; - else { - self->release(); - self = 0; - ret = kIOReturnError; - } - - *newCommand = self; - return ret; -}; -#endif /* !_IODMACOMMAND_H */ - diff --git a/i386/include/IOKit/IODMAController.h b/i386/include/IOKit/IODMAController.h deleted file mode 100644 index a8c1aed..0000000 --- a/i386/include/IOKit/IODMAController.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IODMACONTROLLER_H -#define _IOKIT_IODMACONTROLLER_H - -#include <IOKit/IODMACommand.h> -#include <IOKit/IODMAEventSource.h> -#include <IOKit/IOService.h> - -class IODMAEventSource; - -class IODMAController : public IOService -{ - OSDeclareAbstractStructors(IODMAController); - - friend class IODMAEventSource; - - private: - IOService *_provider; - const OSSymbol *_dmaControllerName; - - protected: - virtual void registerDMAController(IOOptionBits options = 0); - virtual IOReturn initDMAChannel(IOService *provider, IODMAEventSource *dmaES, UInt32 *dmaIndex, UInt32 reqIndex) = 0; - virtual IOReturn startDMACommand(UInt32 dmaIndex, IODMACommand *dmaCommand, IODirection direction, - IOByteCount byteCount = 0, IOByteCount byteOffset = 0) = 0; - virtual IOReturn stopDMACommand(UInt32 dmaIndex, bool flush = false, uint64_t timeout = UINT64_MAX) = 0; - virtual void completeDMACommand(IODMAEventSource *dmaES, IODMACommand *dmaCommand); - virtual void notifyDMACommand(IODMAEventSource *dmaES, IODMACommand *dmaCommand, IOReturn status, IOByteCount actualByteCount); - virtual IOReturn queryDMACommand(UInt32 dmaIndex, IODMACommand **dmaCommand, IOByteCount *transferCount, bool waitForIdle = false) = 0; - virtual IOByteCount getFIFODepth(UInt32 dmaIndex) = 0; - - public: - static const OSSymbol *createControllerName(UInt32 phandle); - static IODMAController *getController(IOService *provider, UInt32 dmaIndex); - - virtual bool start(IOService *provider); -}; - - -#endif /* _IOKIT_IODMACONTROLLER_H */ diff --git a/i386/include/IOKit/IODMAEventSource.h b/i386/include/IOKit/IODMAEventSource.h deleted file mode 100644 index 18a72de..0000000 --- a/i386/include/IOKit/IODMAEventSource.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IODMAEVENTSOURCE_H -#define _IOKIT_IODMAEVENTSOURCE_H - -#include <IOKit/IOService.h> -#include <IOKit/IODMACommand.h> -#include <IOKit/IODMAController.h> -#include <IOKit/IOEventSource.h> - -class IODMAController; - -class IODMAEventSource : public IOEventSource -{ - OSDeclareDefaultStructors(IODMAEventSource); - - friend class IODMAController; - - public: - typedef void (*Action)(OSObject *owner, IODMAEventSource *dmaES, IODMACommand *dmaCommand, IOReturn status, IOByteCount actualByteCount); -#define IODMAEventAction IODMAEventSource::Action - - protected: - virtual void completeDMACommand(IODMACommand *dmaCommand); - virtual void notifyDMACommand(IODMACommand *dmaCommand, IOReturn status, IOByteCount actualByteCount); - - public: - static IODMAEventSource *dmaEventSource(OSObject *owner, - IOService *provider, - Action completion = 0, - Action notification = 0, - UInt32 dmaIndex = 0); - - virtual IOReturn startDMACommand(IODMACommand *dmaCommand, IODirection direction, IOByteCount byteCount = 0, IOByteCount byteOffset = 0); - virtual IOReturn stopDMACommand(bool flush = false, uint64_t timeout = UINT64_MAX); - - virtual IOReturn queryDMACommand(IODMACommand **dmaCommand, IOByteCount *transferCount, bool waitForIdle = false); - virtual IOByteCount getFIFODepth(); - - private: - IOService *dmaProvider; - IODMAController *dmaController; - UInt32 dmaIndex; - queue_head_t dmaCommandsCompleted; - IOSimpleLock *dmaCommandsCompletedLock; - Action dmaCompletionAction; - Action dmaNotificationAction; - bool dmaSynchBusy; - - virtual bool init(OSObject *owner, - IOService *provider, - Action completion = 0, - Action notification = 0, - UInt32 dmaIndex = 0); - virtual bool checkForWork(void); -}; - -#endif /* _IOKIT_IODMAEVENTSOURCE_H */ diff --git a/i386/include/IOKit/IODataQueue.h b/i386/include/IOKit/IODataQueue.h deleted file mode 100644 index 458cb47..0000000 --- a/i386/include/IOKit/IODataQueue.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IODATAQUEUE_H -#define _IOKIT_IODATAQUEUE_H - -#include <libkern/c++/OSObject.h> -#include <libkern/OSTypes.h> -#include <mach/port.h> -#include <mach/message.h> - -typedef struct _IODataQueueMemory IODataQueueMemory; -class IOMemoryDescriptor; - -struct _notifyMsg { - mach_msg_header_t h; -}; - -/*! - * @class IODataQueue : public OSObject - * @abstract A generic queue designed to pass data from the kernel to a user process. - * @discussion The IODataQueue class is designed to allow kernel code to queue data to a user process. IODataQueue objects are designed to be used in a single producer / single consumer situation. As such, there are no locks on the data itself. Because the kernel enqueue and user-space dequeue methods follow a strict set of guidelines, no locks are necessary to maintain the integrity of the data struct. - * - * <br>Each data entry can be variable sized, but the entire size of the queue data region (including overhead for each entry) must be specified up front. - * - * <br>In order for the IODataQueue instance to notify the user process that data is available, a notification mach port must be set. When the queue is empty and a new entry is added, a message is sent to the specified port. - * - * <br>User client code exists in the IOKit framework that facilitates the creation of the receive notification port as well as the listen process for new data available notifications. - * - * <br>In order to make the data queue memory available to a user process, the method getMemoryDescriptor() must be used to get an IOMemoryDescriptor instance that can be mapped into a user process. Typically, the clientMemoryForType() method on an IOUserClient instance will be used to request the IOMemoryDescriptor and then return it to be mapped into the user process. - */ -class IODataQueue : public OSObject -{ - OSDeclareDefaultStructors(IODataQueue) - -protected: - IODataQueueMemory * dataQueue; - - void * notifyMsg; - - virtual void free(); - - /*! - * @function sendDataAvailableNotification - * @abstract Sends a dataAvailableNotification message to the specified mach port. - * @discussion This method sends a message to the mach port passed to setNotificationPort(). It is used to indicate that data is available in the queue. - */ - virtual void sendDataAvailableNotification(); - -public: - /*! - * @function withCapacity - * @abstract Static method that creates a new IODataQueue instance with the capacity specified in the size parameter. - * @discussion The actual size of the entire data queue memory region (to be shared into a user process) is equal to the capacity plus the IODataQueueMemory overhead. This overhead value can be determined from the DATA_QUEUE_MEMORY_HEADER_SIZE macro in <IOKit/IODataQueueShared.h>. The size of the data queue memory region must include space for the overhead of each IODataQueueEntry. This entry overhead can be determined from the DATA_QUEUE_ENTRY_HEADER_SIZE macro in <IOKit/IODataQueueShared.h>.<br> This method allocates a new IODataQueue instance and then calls initWithCapacity() with the given size parameter. If the initWithCapacity() fails, the new instance is released and zero is returned. - * @param size The size of the data queue memory region. - * @result Returns the newly allocated IODataQueue instance. Zero is returned on failure. - */ - static IODataQueue *withCapacity(UInt32 size); - - /*! - * @function withEntries - * @abstract Static method that creates a new IODataQueue instance with the specified number of entries of the given size. - * @discussion This method will create a new IODataQueue instance with enough capacity for numEntries of entrySize. It does account for the IODataQueueEntry overhead for each entry. Note that the numEntries and entrySize are simply used to determine the data region size. They do not actually restrict the size of number of entries that can be added to the queue.<br> This method allocates a new IODataQueue instance and then calls initWithEntries() with the given numEntries and entrySize parameters. If the initWithEntries() fails, the new instance is released and zero is returned. - * @param numEntries Number of entries to allocate space for. - * @param entrySize Size of each entry. - * @result Reeturns the newly allocated IODataQueue instance. Zero is returned on failure. - */ - static IODataQueue *withEntries(UInt32 numEntries, UInt32 entrySize); - - /*! - * @function initWithCapacity - * @abstract Initializes an IODataQueue instance with the capacity specified in the size parameter. - * @discussion The actual size of the entire data queue memory region (to be shared into a user process) is equal to the capacity plus the IODataQueueMemory overhead. This overhead value can be determined from the DATA_QUEUE_MEMORY_HEADER_SIZE macro in <IOKit/IODataQueueShared.h>. The size of the data queue memory region must include space for the overhead of each IODataQueueEntry. This entry overhead can be determined from the DATA_QUEUE_ENTRY_HEADER_SIZE macro in <IOKit/IODataQueueShared.h>. - * @param size The size of the data queue memory region. - * @result Returns true on success and false on failure. - */ - virtual Boolean initWithCapacity(UInt32 size); - - /*! - * @function initWithEntries - * @abstract Initializes an IODataQueue instance with the specified number of entries of the given size. - * @discussion This method will initialize an IODataQueue instance with enough capacity for numEntries of entrySize. It does account for the IODataQueueEntry overhead for each entry. Note that the numEntries and entrySize are simply used to determine the data region size. They do not actually restrict the size of number of entries that can be added to the queue.<br> This method allocates a new IODataQueue instance and then calls initWithEntries() with the given numEntries and entrySize parameters. - * @param numEntries Number of entries to allocate space for. - * @param entrySize Size of each entry. - * @result Reeturns true on success and false on failure. - */ - virtual Boolean initWithEntries(UInt32 numEntries, UInt32 entrySize); - - /*! - * @function enqueue - * @abstract Enqueues a new entry on the queue. - * @discussion This method adds a new data entry of dataSize to the queue. It sets the size parameter of the entry pointed to by the tail value and copies the memory pointed to by the data parameter in place in the queue. Once that is done, it moves the tail to the next available location. When attempting to add a new entry towards the end of the queue and there isn't enough space at the end, it wraps back to the beginning.<br> If the queue is empty when a new entry is added, sendDataAvailableNotification() is called to send a message to the user process that data is now available. - * @param data Pointer to the data to be added to the queue. - * @param dataSize Size of the data pointed to by data. - * @result Returns true on success and false on failure. Typically failure means that the queue is full. - */ - virtual Boolean enqueue(void *data, UInt32 dataSize); - - /*! - * @function setNotificationPort - * @abstract Creates a simple mach message targeting the mach port specified in port. - * @discussion This message is sent when data is added to an empty queue. It is to notify a user process that new data has become available. - * @param port The mach port to target with the notification message. - */ - virtual void setNotificationPort(mach_port_t port); - - /*! - * @function getMemoryDescriptor - * @abstract Returns a memory descriptor covering the IODataQueueMemory region. - * @discussion The IOMemoryDescriptor instance returned by this method is intended to be mapped into a user process. This is the memory region that the IODataQueueClient code operates on. - * @result Returns a newly allocated IOMemoryDescriptor for the IODataQueueMemory region. Returns zero on failure. - */ - virtual IOMemoryDescriptor *getMemoryDescriptor(); -}; - -#endif /* _IOKIT_IODATAQUEUE_H */ diff --git a/i386/include/IOKit/IODataQueueShared.h b/i386/include/IOKit/IODataQueueShared.h deleted file mode 100644 index 2fa0e9a..0000000 --- a/i386/include/IOKit/IODataQueueShared.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IODATAQUEUESHARED_H -#define _IOKIT_IODATAQUEUESHARED_H - -#include <libkern/OSTypes.h> -#include <mach/port.h> -#include <mach/message.h> - -/*! - * @typedef IODataQueueEntry - * @abstract Represents an entry within the data queue - * @discussion This is a variable sized struct. The data field simply represents the start of the data region. The size of the data region is stored in the size field. The whole size of the specific entry is the size of a UInt32 plus the size of the data region. - * @field size The size of the following data region. - * @field data Represents the beginning of the data region. The address of the data field is a pointer to the start of the data region. - */ -typedef struct _IODataQueueEntry{ - UInt32 size; - UInt8 data[4]; -} IODataQueueEntry; - -/*! - * @typedef IODataQueueMemory - * @abstract A struct mapping to the header region of a data queue. - * @discussion This struct is variable sized. The struct represents the data queue header information plus a pointer to the actual data queue itself. The size of the struct is the combined size of the header fields (3 * sizeof(UInt32)) plus the actual size of the queue region. This size is stored in the queueSize field. - * @field queueSize The size of the queue region pointed to by the queue field. - * @field head The location of the queue head. This field is represented as a byte offset from the beginning of the queue memory region. - * @field tail The location of the queue tail. This field is represented as a byte offset from the beginning of the queue memory region. - * @field queue Represents the beginning of the queue memory region. The size of the region pointed to by queue is stored in the queueSize field. - */ -typedef struct _IODataQueueMemory { - UInt32 queueSize; - volatile UInt32 head; - volatile UInt32 tail; - IODataQueueEntry queue[1]; -} IODataQueueMemory; - -/*! - * @typedef IODataQueueAppendix - * @abstract A struct mapping to the appendix region of a data queue. - * @discussion This struct is variable sized dependent on the version. The struct represents the data queue appendix information. - * @field version The version of the queue appendix. - * @field port The notification port associated with this queue. - */ -typedef struct _IODataQueueAppendix { - UInt32 version; - mach_msg_header_t msgh; -} IODataQueueAppendix; - -/*! - * @defined DATA_QUEUE_ENTRY_HEADER_SIZE Represents the size of the data queue entry header independent of the actual size of the data in the entry. This is the overhead of each entry in the queue. The total size of an entry is equal to this value plus the size stored in the entry's size field (in IODataQueueEntry). - */ -#define DATA_QUEUE_ENTRY_HEADER_SIZE (sizeof(IODataQueueEntry) - 4) - -/*! - * @defined DATA_QUEUE_MEMORY_HEADER_SIZE Represents the size of the data queue memory header independent of the actual size of the queue data itself. The total size of the queue memory is equal to this value plus the size of the queue appendix and the size of the queue data region which is stored in the queueSize field of IODataQueueMeory. - */ -#define DATA_QUEUE_MEMORY_HEADER_SIZE (sizeof(IODataQueueMemory) - sizeof(IODataQueueEntry)) - -/*! - * @defined DATA_QUEUE_MEMORY_APPENDIX_SIZE Represents the size of the data queue memory appendix independent of the actual size of the queue data itself. The total size of the queue memory is equal to this value plus the size of queue header and size of the queue data region which is stored in the queueSize field of IODataQueueMeory. - */ -#define DATA_QUEUE_MEMORY_APPENDIX_SIZE (sizeof(IODataQueueAppendix)) - -#endif /* _IOKIT_IODATAQUEUESHARED_H */ - diff --git a/i386/include/IOKit/IODeviceMemory.h b/i386/include/IOKit/IODeviceMemory.h deleted file mode 100644 index 0665efc..0000000 --- a/i386/include/IOKit/IODeviceMemory.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - -#ifndef _IOKIT_IODEVICEMEMORY_H -#define _IOKIT_IODEVICEMEMORY_H - -#include <IOKit/IOMemoryDescriptor.h> - -/*! @class IODeviceMemory - @abstract An IOMemoryDescriptor used for device physical memory ranges. - @discussion The IODeviceMemory class is a simple subclass of IOMemoryDescriptor that uses its methods to describe a single range of physical memory on a device. IODeviceMemory objects are usually looked up with IOService or IOPCIDevice accessors, and are created by memory-mapped bus families. IODeviceMemory implements only some factory methods in addition to the methods of IOMemoryDescriptor. -*/ - -class IODeviceMemory : public IOMemoryDescriptor -{ - OSDeclareDefaultStructors(IODeviceMemory) - -public: - -/*! @struct InitElement - @field start First physical address in the range. - @field length Length of the range. - @field tag 32-bit value not interpreted by IODeviceMemory or IOMemoryDescriptor, for use by the bus family. */ - - struct InitElement { - IOPhysicalAddress start; - IOPhysicalLength length; - IOOptionBits tag; - }; - -/*! @function arrayFromList - @abstract Constructs an OSArray of IODeviceMemory instances, each describing one physical range, and a tag value. - @discussion This method creates IODeviceMemory instances for each physical range passed in an IODeviceMemory::InitElement array. Each element consists of a physical address, length and tag value for the IODeviceMemory. The instances are returned as a created OSArray. - @param list An array of IODeviceMemory::InitElement structures. - @param count The number of elements in the list. - @result Returns a created OSArray of IODeviceMemory objects, to be released by the caller, or zero on failure. */ - - static OSArray * arrayFromList( - InitElement list[], - IOItemCount count ); - -/*! @function withRange - @abstract Constructs an IODeviceMemory instance, describing one physical range. - @discussion This method creates an IODeviceMemory instance for one physical range passed as a physical address and length. It just calls IOMemoryDescriptor::withPhysicalAddress. - @param address The physical address of the first byte in the memory. - @param withLength The length of memory. - @result Returns the created IODeviceMemory on success, to be released by the caller, or zero on failure. */ - - static IODeviceMemory * withRange( - IOPhysicalAddress start, - IOPhysicalLength length ); - -/*! @function withSubRange - @abstract Constructs an IODeviceMemory instance, describing a subset of an existing IODeviceMemory range. - @discussion This method creates an IODeviceMemory instance for a subset of an existing IODeviceMemory range, passed as a physical address offset and length. It just calls IOMemoryDescriptor::withSubRange. - @param of The parent IODeviceMemory of which a subrange is to be used for the new descriptor, which will be retained by the subrange IODeviceMemory. - @param offset A byte offset into the parent's memory. - @param length The length of the subrange. - @result Returns the created IODeviceMemory on success, to be released by the caller, or zero on failure. */ - - static IODeviceMemory * withSubRange( - IODeviceMemory * of, - IOPhysicalAddress offset, - IOPhysicalLength length ); -}; - -#endif /* ! _IOKIT_IODEVICEMEMORY_H */ diff --git a/i386/include/IOKit/IODeviceTreeSupport.h b/i386/include/IOKit/IODeviceTreeSupport.h deleted file mode 100644 index 15b5aa4..0000000 --- a/i386/include/IOKit/IODeviceTreeSupport.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - -#ifndef _IOKIT_IODEVICETREE_H -#define _IOKIT_IODEVICETREE_H - -#include <IOKit/IORegistryEntry.h> -#include <libkern/c++/OSData.h> - -class IODeviceMemory; -class IOService; - -extern const IORegistryPlane * gIODTPlane; - -extern const OSSymbol * gIODTPHandleKey; - -extern const OSSymbol * gIODTCompatibleKey; -extern const OSSymbol * gIODTTypeKey; -extern const OSSymbol * gIODTModelKey; - -extern const OSSymbol * gIODTAAPLInterruptsKey; -extern const OSSymbol * gIODTDefaultInterruptController; -extern const OSSymbol * gIODTNWInterruptMappingKey; - -IORegistryEntry * IODeviceTreeAlloc( void * dtTop ); - - -bool IODTMatchNubWithKeys( IORegistryEntry * nub, - const char * keys ); - -bool IODTCompareNubName( const IORegistryEntry * regEntry, - OSString * name, OSString ** matchingName ); - -enum { - kIODTRecursive = 0x00000001, - kIODTExclusive = 0x00000002 -}; - -OSCollectionIterator * IODTFindMatchingEntries( IORegistryEntry * from, - IOOptionBits options, const char * keys ); - -typedef SInt32 (*IODTCompareAddressCellFunc) - (UInt32 cellCount, UInt32 left[], UInt32 right[]); -typedef void (*IODTNVLocationFunc) - (IORegistryEntry * entry, - UInt8 * busNum, UInt8 * deviceNum, UInt8 * functionNum ); - -void IODTSetResolving( IORegistryEntry * regEntry, - IODTCompareAddressCellFunc compareFunc, - IODTNVLocationFunc locationFunc ); - -bool IODTResolveAddressCell( IORegistryEntry * regEntry, - UInt32 cellsIn[], - IOPhysicalAddress * phys, IOPhysicalLength * len ); - -OSArray * IODTResolveAddressing( IORegistryEntry * regEntry, - const char * addressPropertyName, - IODeviceMemory * parent ); - -struct IONVRAMDescriptor { - unsigned int format:4; - unsigned int marker:1; - unsigned int bridgeCount:3; - unsigned int busNum:2; - unsigned int bridgeDevices:6 * 5; - unsigned int functionNum:3; - unsigned int deviceNum:5; -} __attribute__((aligned(2), packed)); - -IOReturn IODTMakeNVDescriptor( IORegistryEntry * regEntry, - IONVRAMDescriptor * hdr ); - -OSData * IODTFindSlotName( IORegistryEntry * regEntry, UInt32 deviceNumber ); - -const OSSymbol * IODTInterruptControllerName( - IORegistryEntry * regEntry ); - -bool IODTMapInterrupts( IORegistryEntry * regEntry ); - -enum { - kIODTInterruptShared = 0x00000001 -}; -IOReturn IODTGetInterruptOptions( IORegistryEntry * regEntry, int source, IOOptionBits * options ); - -#ifdef __cplusplus -extern "C" { -#endif - -IOReturn IONDRVLibrariesInitialize( IOService * provider ); - -#ifdef __cplusplus -} -#endif - -#endif /* _IOKIT_IODEVICETREE_H */ - diff --git a/i386/include/IOKit/IOEventSource.h b/i386/include/IOKit/IOEventSource.h deleted file mode 100644 index 4afc5aa..0000000 --- a/i386/include/IOKit/IOEventSource.h +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* -Copyright (c) 1998 Apple Computer, Inc. All rights reserved. -HISTORY - 1998-7-13 Godfrey van der Linden(gvdl) - Created. - 1998-10-30 Godfrey van der Linden(gvdl) - Converted to C++ -*/ -#ifndef _IOKIT_IOEVENTSOURCE_H -#define _IOKIT_IOEVENTSOURCE_H - -#include <sys/cdefs.h> - -#include <libkern/c++/OSObject.h> - -#include <IOKit/IOLib.h> -#include <IOKit/system.h> -#include <IOKit/IOWorkLoop.h> - - -__BEGIN_DECLS -#include <mach/clock_types.h> -#include <kern/clock.h> -__END_DECLS - -/*! - @class IOEventSource : public OSObject - @abstract Abstract class for all work-loop event sources. - @discussion The IOEventSource declares the abstract super class that all -event sources must inherit from if an IOWorkLoop is to receive events from them. -<br><br> - An event source can represent any event that should cause the work-loop of a -device to wake up and perform work. Two examples of event sources are the -IOInterruptEventSource which delivers interrupt notifications and IOCommandGate -which delivers command requests. -<br><br> - A kernel module can always use the work-loop model for serialising access to -anything at all. The IOEventSource is used for communicating events to the -work-loop, and the chain of event sources should be used to walk the possible -event sources and demultipex them. Note a particular instance of an event -source may only be a member of 1 linked list chain. If you need to move it -between chains than make sure it is removed from the original chain before -attempting to move it. -<br><br> - The IOEventSource makes no attempt to maintain the consitency of it's internal data across multi-threading. It is assumed that the user of these basic tools will protect the data that these objects represent in some sort of device wide instance lock. For example the IOWorkLoop maintains the event chain by handing off change request to its own thread and thus single threading access to its state. -<br><br> - All subclasses of the IOEventSource are expected to implement the checkForWork() member function. - -<br><br> - checkForWork() is the key method in this class. It is called by some work-loop when convienient and is expected to evaluate it's internal state and determine if an event has occurred since the last call. In the case of an event having occurred then the instance defined target(owner)/action will be called. The action is stored as an ordinary C function pointer but the first parameter is always the owner. This means that a C++ member function can be used as an action function though this depends on the ABI. -<br><br> - Although the eventChainNext variable contains a reference to the next event source in the chain this reference is not retained. The list 'owner' i.e. the client that creates the event, not the work-loop, is expected to retain the source. -*/ -class IOEventSource : public OSObject -{ - OSDeclareAbstractStructors(IOEventSource) - friend class IOWorkLoop; - -public: -/*! - @typedef Action - @discussion Placeholder type for C++ function overloading discrimination. -As the all event sources require an action and it has to be stored somewhere -and be of some type, this is that type. - @param owner - Target of the function, can be used as a refcon. The owner is set -during initialisation. Note if a C++ function was specified this parameter -is implicitly the first paramter in the target member function's parameter list. -*/ - typedef void (*Action)(OSObject *owner, ...); - -/*! @defined IOEventSourceAction - @discussion Backward compatibilty define for the old non-class scoped type definition. See $link IOEventSource::Action */ - #define IOEventSourceAction IOEventSource::Action - -protected: -/*! @var eventChainNext - The next event source in the event chain. nil at end of chain. */ - IOEventSource *eventChainNext; - -/*! @var owner The owner object called when an event has been delivered. */ - OSObject *owner; - -/*! @var action - The action method called when an event has been delivered */ - Action action; - -/*! @var enabled - Is this event source enabled to deliver requests to the work-loop. */ - bool enabled; - -/*! @var workLoop What is the work-loop for this event source. */ - IOWorkLoop *workLoop; - -/*! @var refcon What ever the client wants to do, see $link setRefcon. */ - void *refcon; - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOEventSource in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - -/*! @function init - @abstract Primary initialiser for the IOEventSource class. - @param owner - Owner of this instance of an event source. Used as the first parameter -of the action callout. Owner will generally be an OSObject it doesn't have to -be as no member functions will be called directly in it. It can just be a -refcon for a client routine. - @param action - Pointer to C call out function. Action is a pointer to a C function -that gets called when this event source has outstanding work. It will usually -be called by the checkForWork member function. The first parameter of the -action call out will always be the owner, this allows C++ member functions to -be used as actions. Defaults to 0. - @result true if the inherited classes and this instance initialise -successfully. -*/ - virtual bool init(OSObject *owner, IOEventSource::Action action = 0); - -/*! @function checkForWork - @abstract Pure Virtual member function used by IOWorkLoop for work -scheduling. - @discussion This function will be called to request a subclass to check -it's internal state for any work to do and then to call out the owner/action. - @result Return true if this function needs to be called again before all its outstanding events have been processed. - */ - virtual bool checkForWork() = 0; - -/*! @function setWorkLoop - @abstract Set'ter for $link workLoop variable. - @param workLoop - Target work-loop of this event source instance. A subclass of -IOWorkLoop that at least reacts to signalWorkAvailable() and onThread functions. -*/ - virtual void setWorkLoop(IOWorkLoop *workLoop); - -/*! @function setNext - @abstract Set'ter for $link eventChainNext variable. - @param next - Pointer to another IOEventSource instance. -*/ - virtual void setNext(IOEventSource *next); - -/*! @function getNext - @abstract Get'ter for $link eventChainNext variable. - @result value of eventChainNext. -*/ - virtual IOEventSource *getNext() const; - - -protected: - // Methods to access the IOWorkLoop exported fields - void signalWorkAvailable(); - void openGate(); - void closeGate(); - bool tryCloseGate(); - int sleepGate(void *event, UInt32 type); - int sleepGate(void *event, AbsoluteTime deadline, UInt32 type); - void wakeupGate(void *event, bool oneThread); - -public: -/*! @function setAction - @abstract Set'ter for $link action variable. - @param action Pointer to a C function of type IOEventSource::Action. */ - virtual void setAction(IOEventSource::Action action); - -/*! @function getAction - @abstract Get'ter for $link action variable. - @result value of action. */ - virtual IOEventSource::Action getAction() const; - -/*! @function enable - @abstract Enable event source. - @discussion A subclass implementation is expected to respect the enabled -state when checkForWork is called. Calling this function will cause the -work-loop to be signalled so that a checkForWork is performed. */ - virtual void enable(); - -/*! @function disable - @abstract Disable event source. - @discussion A subclass implementation is expected to respect the enabled -state when checkForWork is called. */ - virtual void disable(); - -/*! @function isEnabled - @abstract Get'ter for $link enable variable. - @result true if enabled. */ - virtual bool isEnabled() const; - -/*! @function getWorkLoop - @abstract Get'ter for $link workLoop variable. - @result value of workLoop. */ - virtual IOWorkLoop *getWorkLoop() const; - -/*! @function onThread - @abstract Convenience function for workLoop->onThread. - @result true if called on the work-loop thread. -*/ - virtual bool onThread() const; - -private: - OSMetaClassDeclareReservedUnused(IOEventSource, 0); - OSMetaClassDeclareReservedUnused(IOEventSource, 1); - OSMetaClassDeclareReservedUnused(IOEventSource, 2); - OSMetaClassDeclareReservedUnused(IOEventSource, 3); - OSMetaClassDeclareReservedUnused(IOEventSource, 4); - OSMetaClassDeclareReservedUnused(IOEventSource, 5); - OSMetaClassDeclareReservedUnused(IOEventSource, 6); - OSMetaClassDeclareReservedUnused(IOEventSource, 7); -}; - -#endif /* !_IOKIT_IOEVENTSOURCE_H */ diff --git a/i386/include/IOKit/IOFilterInterruptEventSource.h b/i386/include/IOKit/IOFilterInterruptEventSource.h deleted file mode 100644 index de05c90..0000000 --- a/i386/include/IOKit/IOFilterInterruptEventSource.h +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* -Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - -HISTORY - 1999-4-15 Godfrey van der Linden(gvdl) - Created. -*/ -#ifndef _IOKIT_IOFILTERINTERRUPTEVENTSOURCE_H -#define _IOKIT_IOFILTERINTERRUPTEVENTSOURCE_H - -#include <IOKit/IOInterruptEventSource.h> - -class IOService; - -/*! @class IOFilterInterruptEventSource : public IOInterruptEventSource - @abstract Filtering varient of the $link IOInterruptEventSource. - @discussion An interrupt event source that calls the client to determine if a interrupt event needs to be scheduled on the work loop. A filter interrupt event source call's the client in the primary interrupt context, the client can then interrogate its hardware and determine if the interrupt needs to be processed yet. -<br><br> - As the routine is called in the primary interrupt context great care must be taken in the writing of this routine. In general none of the generic IOKit environment is safe to call in this context. We intend this routine to be used by hardware that can interrogate its registers without destroying state. Primarily this variant of event sources will be used by drivers that share interrupts. The filter routine will determine if the interrupt is a real interrupt or a ghost and thus optimise the work thread context switch away. -<br><br> -If you are implementing 'SoftDMA' (or pseudo-DMA), you may not want the I/O Kit to automatically start your interrupt handler routine on your work loop when your filter routine returns true. In this case, you may choose to have your filter routine schedule the work on the work loop itself and then return false. If you do this, the interrupt will not be disabled in hardware and you could receive additional primary interrupts before your work loop–level service routine completes. Because this scheme has implications for synchronization between your filter routine and your interrupt service routine, you should avoid doing this unless your driver requires SoftDMA. -<br><br> -CAUTION: Called in primary interrupt context, if you need to disable interrupt to guard you registers against an unexpected call then it is better to use a straight IOInterruptEventSource and its secondary interrupt delivery mechanism. -*/ -class IOFilterInterruptEventSource : public IOInterruptEventSource -{ - OSDeclareDefaultStructors(IOFilterInterruptEventSource) - -public: -/*! - @typedef Filter - @discussion C Function pointer to a routine to call when an interrupt occurs. - @param owner Pointer to the owning/client instance. - @param sender Where is the interrupt comming from. - @result false if this interrupt can be ignored. */ - typedef bool (*Filter)(OSObject *, IOFilterInterruptEventSource *); - -/*! @defined IOFilterInterruptAction - @discussion Backward compatibilty define for the old non-class scoped type definition. See $link IOFilterInterruptSource::Filter */ -#define IOFilterInterruptAction IOFilterInterruptEventSource::Filter - -private: - // Hide the superclass initializers - virtual bool init(OSObject *inOwner, - IOInterruptEventSource::Action inAction = 0, - IOService *inProvider = 0, - int inIntIndex = 0); - - static IOInterruptEventSource * - interruptEventSource(OSObject *inOwner, - IOInterruptEventSource::Action inAction = 0, - IOService *inProvider = 0, - int inIntIndex = 0); - -protected: -/*! @var filterAction Filter callout */ - Filter filterAction; - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - -public: -/*! @function filterInterruptEventSource - @abstract Factor method to create and initialise an IOFilterInterruptEventSource. See $link init. - @param owner Owner/client of this event source. - @param action 'C' Function to call when something happens. - @param filter 'C' Function to call when interrupt occurs. - @param provider Service that provides interrupts. - @param intIndex Defaults to 0. - @result a new event source if succesful, 0 otherwise. */ - static IOFilterInterruptEventSource * - filterInterruptEventSource(OSObject *owner, - IOInterruptEventSource::Action action, - Filter filter, - IOService *provider, - int intIndex = 0); - -/*! @function init - @abstract Primary initialiser for the IOFilterInterruptEventSource class. - @param owner Owner/client of this event source. - @param action 'C' Function to call when something happens. - @param filter 'C' Function to call in primary interrupt context. - @param provider Service that provides interrupts. - @param intIndex Interrupt source within provider. Defaults to 0. - @result true if the inherited classes and this instance initialise -successfully. */ - virtual bool init(OSObject *owner, - IOInterruptEventSource::Action action, - Filter filter, - IOService *provider, - int intIndex = 0); - - -/*! @function signalInterrupt - @abstract Cause the work loop to schedule the action. - @discussion Cause the work loop to schedule the interrupt action even if the filter routine returns 'false'. Note well the interrupting condition MUST be cleared from the hardware otherwise an infinite process interrupt loop will occur. Use this function when SoftDMA is desired. See $link IOFilterInterruptSource::Filter */ - virtual void signalInterrupt(); - -/*! @function getFilterAction - @abstract Get'ter for filterAction variable. - @result value of filterAction. */ - virtual Filter getFilterAction() const; - -/*! @function normalInterruptOccurred - @abstract Override $link IOInterruptEventSource::normalInterruptOccured to make a filter callout. */ - virtual void normalInterruptOccurred(void *self, IOService *prov, int ind); - -/*! @function disableInterruptOccurred - @abstract Override $link IOInterruptEventSource::disableInterruptOccurred to make a filter callout. */ - virtual void disableInterruptOccurred(void *self, IOService *prov, int ind); - -private: - OSMetaClassDeclareReservedUnused(IOFilterInterruptEventSource, 0); - OSMetaClassDeclareReservedUnused(IOFilterInterruptEventSource, 1); - OSMetaClassDeclareReservedUnused(IOFilterInterruptEventSource, 2); - OSMetaClassDeclareReservedUnused(IOFilterInterruptEventSource, 3); - OSMetaClassDeclareReservedUnused(IOFilterInterruptEventSource, 4); - OSMetaClassDeclareReservedUnused(IOFilterInterruptEventSource, 5); - OSMetaClassDeclareReservedUnused(IOFilterInterruptEventSource, 6); - OSMetaClassDeclareReservedUnused(IOFilterInterruptEventSource, 7); -}; - -#endif /* !_IOKIT_IOFILTERINTERRUPTEVENTSOURCE_H */ diff --git a/i386/include/IOKit/IOInterleavedMemoryDescriptor.h b/i386/include/IOKit/IOInterleavedMemoryDescriptor.h deleted file mode 100644 index e5c2a94..0000000 --- a/i386/include/IOKit/IOInterleavedMemoryDescriptor.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOINTERLEAVEDMEMORYDESCRIPTOR_H -#define _IOINTERLEAVEDMEMORYDESCRIPTOR_H - -#include <IOKit/IOMemoryDescriptor.h> - -/*! @class IOInterleavedMemoryDescriptor : public IOMemoryDescriptor - @abstract The IOInterleavedMemoryDescriptor object describes a memory area made up of portions of several other IOMemoryDescriptors. - @discussion The IOInterleavedMemoryDescriptor object represents interleaved ranges of memory, specified as an ordered list of portions of individual IOMemoryDescriptors. The portions are chained end-to-end to make up a single contiguous buffer. */ - -class IOInterleavedMemoryDescriptor : public IOMemoryDescriptor -{ - OSDeclareDefaultStructors(IOInterleavedMemoryDescriptor); - -protected: - - IOByteCount _descriptorCapacity; - UInt32 _descriptorCount; - IOMemoryDescriptor ** _descriptors; - IOByteCount * _descriptorOffsets; - IOByteCount * _descriptorLengths; - bool _descriptorPrepared; - - virtual void free(); - -public: - -/*! @function withCapacity - @abstract Create an IOInterleavedMemoryDescriptor to describe a memory area made up of several other IOMemoryDescriptors. - @discussion This method creates and initializes an IOInterleavedMemoryDescriptor for memory consisting of portions of a number of other IOMemoryDescriptors, chained end-to-end (in the order they appear in the array) to represent a single contiguous memory buffer. - @param capacity The maximum number of IOMemoryDescriptors that may be subsequently added to this IOInterleavedMemoryDescriptor. - @param direction An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. - @result The created IOInterleavedMemoryDescriptor on success, to be released by the caller, or zero on failure. */ - - static IOInterleavedMemoryDescriptor * withCapacity( IOByteCount capacity, - IODirection direction); - -/*! @function initWithCapacity - @abstract Initialize an IOInterleavedMemoryDescriptor to describe a memory area made up of several other IOMemoryDescriptors. - @discussion This method initializes an IOInterleavedMemoryDescriptor for memory consisting of portions of a number of other IOMemoryDescriptors, chained end-to-end (in the order they appear in the array) to represent a single contiguous memory buffer. - @param capacity The maximum number of IOMemoryDescriptors that may be subsequently added to this IOInterleavedMemoryDescriptor. - @param direction An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. - @result The created IOInterleavedMemoryDescriptor on success, to be released by the caller, or zero on failure. */ - - virtual bool initWithCapacity( IOByteCount capacity, - IODirection direction ); - -/*! @function clearMemoryDescriptors - @abstract Clear all of the IOMemoryDescriptors currently contained in and reset the IOInterleavedMemoryDescriptor. - @discussion Clears each IOMemoryDescriptor by completing (if needed) and releasing. The IOInterleavedMemoryDescriptor is then reset and may accept new descriptors up to the capacity specified when it was created. - @param direction An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. */ - - virtual void clearMemoryDescriptors( IODirection direction = kIODirectionNone ); - -/*! @function setMemoryDescriptor - @abstract Add a portion of an IOMemoryDescriptor to the IOInterleavedMemoryDescriptor. - @discussion This method adds the portion of an IOMemoryDescriptor described by the offset and length parameters to the end of the IOInterleavedMemoryDescriptor. A single IOMemoryDescriptor may be added as many times as there is room for it. The offset and length must describe a portion entirely within the IOMemoryDescriptor. - @param descriptor An IOMemoryDescriptor to be added to the IOInterleavedMemoryDescriptor. Its direction must be compatible with that of the IOInterleavedMemoryDescriptor. - @param offset The offset into the IOMemoryDescriptor of the portion that will be added to the virtualized buffer. - @param length The length of the portion of the IOMemoryDescriptor to be added to the virtualized buffer. - @result Returns true the portion was successfully added. */ - - virtual bool setMemoryDescriptor( IOMemoryDescriptor * descriptor, - IOByteCount offset, - IOByteCount length ); - -/*! @function getPhysicalSegment - @abstract Break a memory descriptor into its physically contiguous segments. - @discussion This method returns the physical address of the byte at the given offset into the memory, and optionally the length of the physically contiguous segment from that offset. - @param offset A byte offset into the memory whose physical address to return. - @param length If non-zero, getPhysicalSegment will store here the length of the physically contiguous segement at the given offset. - @result A physical address, or zero if the offset is beyond the length of the memory. */ - - virtual addr64_t getPhysicalSegment( IOByteCount offset, - IOByteCount * length, - IOOptionBits options = 0 ); - -/*! @function prepare - @abstract Prepare the memory for an I/O transfer. - @discussion This involves paging in the memory, if necessary, and wiring it down for the duration of the transfer. The complete() method completes the processing of the memory after the I/O transfer finishes. This method need not called for non-pageable memory. - @param forDirection The direction of the I/O to be performed, or kIODirectionNone for the direction specified by the memory descriptor. - @result An IOReturn code. */ - - virtual IOReturn prepare(IODirection forDirection = kIODirectionNone); - -/*! @function complete - @abstract Complete processing of the memory after an I/O transfer finishes. - @discussion This method should not be called unless a prepare was previously issued; the prepare() and complete() must occur in pairs, before and after an I/O transfer involving pageable memory. - @param forDirection The direction of the I/O just completed, or kIODirectionNone for the direction specified by the memory descriptor. - @result An IOReturn code. */ - - virtual IOReturn complete(IODirection forDirection = kIODirectionNone); -}; - -#endif /* !_IOINTERLEAVEDMEMORYDESCRIPTOR_H */ diff --git a/i386/include/IOKit/IOInterruptController.h b/i386/include/IOKit/IOInterruptController.h deleted file mode 100644 index 71f55e5..0000000 --- a/i386/include/IOKit/IOInterruptController.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * DRI: Josh de Cesare - * - */ - - -#ifndef _IOKIT_IOINTERRUPTCONTROLLER_H -#define _IOKIT_IOINTERRUPTCONTROLLER_H - -#include <IOKit/IOLocks.h> -#include <IOKit/IOService.h> -#include <IOKit/IOInterrupts.h> - - -class IOSharedInterruptController; - -struct IOInterruptVector { - volatile char interruptActive; - volatile char interruptDisabledSoft; - volatile char interruptDisabledHard; - volatile char interruptRegistered; - IOLock * interruptLock; - IOService * nub; - int source; - void * target; - IOInterruptHandler handler; - void * refCon; - IOSharedInterruptController *sharedController; -}; - -typedef struct IOInterruptVector IOInterruptVector; - -#if __LP64__ -typedef int32_t IOInterruptVectorNumber; -#else -typedef long IOInterruptVectorNumber; -#endif - -class IOInterruptController : public IOService -{ - OSDeclareAbstractStructors(IOInterruptController); - -protected: - IOInterruptVector *vectors; - IOSimpleLock *controllerLock; - - struct ExpansionData { }; - ExpansionData *reserved; - -public: - virtual IOReturn registerInterrupt(IOService *nub, int source, - void *target, - IOInterruptHandler handler, - void *refCon); - virtual IOReturn unregisterInterrupt(IOService *nub, int source); - - virtual IOReturn getInterruptType(IOService *nub, int source, - int *interruptType); - - virtual IOReturn enableInterrupt(IOService *nub, int source); - virtual IOReturn disableInterrupt(IOService *nub, int source); - virtual IOReturn causeInterrupt(IOService *nub, int source); - - virtual IOInterruptAction getInterruptHandlerAddress(void); - virtual IOReturn handleInterrupt(void *refCon, IOService *nub, - int source); - - // Methods to be overridden for simplifed interrupt controller subclasses. - - virtual bool vectorCanBeShared(IOInterruptVectorNumber vectorNumber, IOInterruptVector *vector); - virtual void initVector(IOInterruptVectorNumber vectorNumber, IOInterruptVector *vector); - virtual int getVectorType(IOInterruptVectorNumber vectorNumber, IOInterruptVector *vector); - virtual void disableVectorHard(IOInterruptVectorNumber vectorNumber, IOInterruptVector *vector); - virtual void enableVector(IOInterruptVectorNumber vectorNumber, IOInterruptVector *vector); - virtual void causeVector(IOInterruptVectorNumber vectorNumber, IOInterruptVector *vector); - - OSMetaClassDeclareReservedUnused(IOInterruptController, 0); - OSMetaClassDeclareReservedUnused(IOInterruptController, 1); - OSMetaClassDeclareReservedUnused(IOInterruptController, 2); - OSMetaClassDeclareReservedUnused(IOInterruptController, 3); - OSMetaClassDeclareReservedUnused(IOInterruptController, 4); - OSMetaClassDeclareReservedUnused(IOInterruptController, 5); -}; - - -class IOSharedInterruptController : public IOInterruptController -{ - OSDeclareDefaultStructors(IOSharedInterruptController); - -private: - IOService *provider; - int numVectors; - int vectorsRegistered; - int vectorsEnabled; - volatile int controllerDisabled; - bool sourceIsLevel; - - struct ExpansionData { }; - ExpansionData *reserved; - -public: - virtual IOReturn initInterruptController(IOInterruptController *parentController, OSData *parentSource); - - virtual IOReturn registerInterrupt(IOService *nub, int source, - void *target, - IOInterruptHandler handler, - void *refCon); - virtual IOReturn unregisterInterrupt(IOService *nub, int source); - - virtual IOReturn getInterruptType(IOService *nub, int source, - int *interruptType); - - virtual IOReturn enableInterrupt(IOService *nub, int source); - virtual IOReturn disableInterrupt(IOService *nub, int source); - - virtual IOInterruptAction getInterruptHandlerAddress(void); - virtual IOReturn handleInterrupt(void *refCon, IOService *nub, int source); - - OSMetaClassDeclareReservedUnused(IOSharedInterruptController, 0); - OSMetaClassDeclareReservedUnused(IOSharedInterruptController, 1); - OSMetaClassDeclareReservedUnused(IOSharedInterruptController, 2); - OSMetaClassDeclareReservedUnused(IOSharedInterruptController, 3); -}; - - -#endif /* ! _IOKIT_IOINTERRUPTCONTROLLER_H */ diff --git a/i386/include/IOKit/IOInterruptEventSource.h b/i386/include/IOKit/IOInterruptEventSource.h deleted file mode 100644 index 0be7caf..0000000 --- a/i386/include/IOKit/IOInterruptEventSource.h +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* -Copyright (c) 1998 Apple Computer, Inc. All rights reserved. - -HISTORY - 1998-7-13 Godfrey van der Linden(gvdl) - Created. - 1998-10-30 Godfrey van der Linden(gvdl) - Converted to C++ -*/ - -#ifndef _IOKIT_IOINTERRUPTEVENTSOURCE_H -#define _IOKIT_IOINTERRUPTEVENTSOURCE_H - -#include <IOKit/IOEventSource.h> - -class IOService; - -/*! @class IOInterruptEventSource : public IOEventSource - @abstract Event source for interrupt delivery to work-loop based drivers. - @discussion The IOInterruptEventSource is a generic object that delivers calls interrupt routines in it's client in a guaranteed single-threaded manner. IOInterruptEventSource is part of the IOKit $link IOWorkLoop infrastructure where the semantic that one and only one action method is executing within a work-loops event chain. -<br><br> -When the action method is called in the client member function will receive 2 arguments, (IOEventSource *) sender and (int) count, See $link IOInterruptEventSource::Action. Where sender will be reference to the interrupt that occurred and the count will be computed by the difference between the $link producerCount and $link consumerCount. This number may not be reliable as no attempt is made to adjust for around the world type problems but is provided for general information and statistic gathering. -<br><br> -In general a client will use the factory member function to create and initialise the event source and then add it to their work-loop. It is the work loop's responsiblity to maintain the new event source in it's event chain. See $link IOWorkLoop. -<br><br> -An interrupt event source attaches itself to the given provider's interrupt source at initialisation time. At this time it determines if it is connected to a level or edge triggered interrupt. If the interrupt is an level triggered interrupt the event source automatically disables the interrupt source at primary interrupt time and after it call's the client it automatically reenables the interrupt. This action is fairly expensive but it is 100% safe and defaults sensibly so that the driver writer does not have to implement type dependant interrupt routines. So to repeat, the driver writer does not have to be concerned by the actual underlying interrupt mechanism as the event source hides the complexity. -<br><br> -Saying this if the hardware is a multi-device card, for instance a 4 port NIC, where all of the devices are sharing one level triggered interrupt AND it is possible to determine each port's interrupt state non-destructively then the $link IOFilterInterruptEventSource would be a better choice. -<br><br> -Warning: All IOInterruptEventSources are created in the disabled state. If you want to actually schedule interrupt delivery do not forget to enable the source. -*/ -class IOInterruptEventSource : public IOEventSource -{ - OSDeclareDefaultStructors(IOInterruptEventSource) - -public: -/*! @typedef Action - @discussion 'C' pointer prototype of functions that are called in a single threaded context when an interrupt occurs. - @param owner Pointer to client instance. - @param sender Pointer to generation interrupt event source. - @param count Number of interrupts seen before delivery. */ - typedef void (*Action)(OSObject *, IOInterruptEventSource *, int count); - -/*! @defined IOInterruptEventAction - @discussion Backward compatibilty define for the old non-class scoped type definition. See $link IOInterruptEventSource::Action */ -#define IOInterruptEventAction IOInterruptEventSource::Action - -protected: -/*! @var provider IOService that provides interrupts for delivery. */ - IOService *provider; - -/*! @var intIndex */ - int intIndex; - -/*! @var producerCount - Current count of produced interrupts that have been received. */ - volatile unsigned int producerCount; - -/*! @var consumerCount - Current count of produced interrupts that the owner has been informed of. */ - unsigned int consumerCount; - -/*! @var autoDisable Do we need to automatically disable the interrupt source when we take an interrupt, i.e. we are level triggered. */ - bool autoDisable; - -/*! @var explicitDisable Has the user expicitly disabled this event source, if so then do not overide their request when returning from the callout */ - bool explicitDisable; - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - -/*! @function free - @abstract Sub-class implementation of free method, disconnects from the interrupt source. */ - virtual void free(); - -/*! @function checkForWork - @abstract Pure Virtual member function used by IOWorkLoop for issueing a client calls. - @discussion This function called when the work-loop is ready to check for any work to do and then to call out the owner/action. - @result Return true if this function needs to be called again before all its outstanding events have been processed. */ - virtual bool checkForWork(); - -public: - -/*! @function interruptEventSource - @abstract Factory function for IOInterruptEventSources creation and initialisation. - @param owner Owning client of the new event source. - @param action 'C' Function to call when something happens. - @param provider IOService that represents the interrupt source. Defaults to 0. When no provider is defined the event source assumes that the client will in some manner call the interruptOccured method explicitly. This will start the ball rolling for safe delivery of asynchronous event's into the driver. - @param intIndex The index of the interrupt within the provider's interrupt sources. Defaults to 0, i.e. the first interrupt in the provider. - @result A new interrupt event source if successfully created and initialised, 0 otherwise. */ - static IOInterruptEventSource * - interruptEventSource(OSObject *owner, - Action action, - IOService *provider = 0, - int intIndex = 0); - -/*! @function init - @abstract Primary initialiser for the IOInterruptEventSource class. - @param owner Owning client of the new event source. - @param action 'C' Function to call when something happens. - @param provider IOService that represents the interrupt source. Defaults to 0. When no provider is defined the event source assumes that the client will in some manner call the interruptOccured method explicitly. This will start the ball rolling for safe delivery of asynchronous event's into the driver. - @param intIndex The index of the interrupt within the provider's interrupt sources. Defaults to 0, i.e. the first interrupt in the provider. - @result true if the inherited classes and this instance initialise -successfully. */ - virtual bool init(OSObject *owner, - Action action, - IOService *provider = 0, - int intIndex = 0); - -/*! @function enable - @abstract Enable event source. - @discussion A subclass implementation is expected to respect the enabled -state when checkForWork is called. Calling this function will cause the -work-loop to be signalled so that a checkForWork is performed. */ - virtual void enable(); - -/*! @function disable - @abstract Disable event source. - @discussion A subclass implementation is expected to respect the enabled -state when checkForWork is called. */ - virtual void disable(); - -/*! @function getProvider - @abstract Get'ter for $link provider variable. - @result value of provider. */ - virtual const IOService *getProvider() const; - -/*! @function getIntIndex - @abstract Get'ter for $link intIndex interrupt index variable. - @result value of intIndex. */ - virtual int getIntIndex() const; - -/*! @function getAutoDisable - @abstract Get'ter for $link autoDisable variable. - @result value of autoDisable. */ - virtual bool getAutoDisable() const; - -/*! @function interruptOccurred - @abstract Functions that get called by the interrupt controller. See $link IOService::registerInterrupt - @param nub Where did the interrupt originate from - @param ind What is this interrupts index within 'nub'. */ - virtual void interruptOccurred(void *, IOService *nub, int ind); - -/*! @function normalInterruptOccurred - @abstract Functions that get called by the interrupt controller.See $link IOService::registerInterrupt - @param nub Where did the interrupt originate from - @param ind What is this interrupts index within 'nub'. */ - virtual void normalInterruptOccurred(void *, IOService *nub, int ind); - -/*! @function disableInterruptOccurred - @abstract Functions that get called by the interrupt controller.See $link IOService::registerInterrupt - @param nub Where did the interrupt originate from - @param ind What is this interrupts index within 'nub'. */ - virtual void disableInterruptOccurred(void *, IOService *nub, int ind); - -private: - OSMetaClassDeclareReservedUnused(IOInterruptEventSource, 0); - OSMetaClassDeclareReservedUnused(IOInterruptEventSource, 1); - OSMetaClassDeclareReservedUnused(IOInterruptEventSource, 2); - OSMetaClassDeclareReservedUnused(IOInterruptEventSource, 3); - OSMetaClassDeclareReservedUnused(IOInterruptEventSource, 4); - OSMetaClassDeclareReservedUnused(IOInterruptEventSource, 5); - OSMetaClassDeclareReservedUnused(IOInterruptEventSource, 6); - OSMetaClassDeclareReservedUnused(IOInterruptEventSource, 7); -}; - -#endif /* !_IOKIT_IOINTERRUPTEVENTSOURCE_H */ diff --git a/i386/include/IOKit/IOInterrupts.h b/i386/include/IOKit/IOInterrupts.h deleted file mode 100644 index fa8aa7b..0000000 --- a/i386/include/IOKit/IOInterrupts.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * DRI: Josh de Cesare - * - */ - - -#ifndef _IOKIT_IOINTERRUPTS_H -#define _IOKIT_IOINTERRUPTS_H - -#define kIOInterruptTypeEdge (0) -#define kIOInterruptTypeLevel (1) - -#ifdef __cplusplus - -class OSData; -class IOInterruptController; - -struct IOInterruptSource { - IOInterruptController *interruptController; - OSData *vectorData; -}; -typedef struct IOInterruptSource IOInterruptSource; - -#endif /* __cplusplus */ - -typedef void (*IOInterruptHandler)(void *target, void *refCon, - void *nub, int source); - -#endif /* ! _IOKIT_IOINTERRUPTS_H */ diff --git a/i386/include/IOKit/IOKitDebug.h b/i386/include/IOKit/IOKitDebug.h deleted file mode 100644 index 499faa3..0000000 --- a/i386/include/IOKit/IOKitDebug.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_IOKITDEBUG_H -#define _IOKIT_IOKITDEBUG_H - -#include <IOKit/IOTypes.h> - - -#ifdef __cplusplus - -#include <libkern/c++/OSObject.h> -#include <libkern/c++/OSDictionary.h> -#include <libkern/c++/OSSerialize.h> - -class IOKitDiagnostics : public OSObject -{ - OSDeclareDefaultStructors(IOKitDiagnostics) - -public: - static OSObject * diagnostics( void ); - virtual bool serialize(OSSerialize *s) const; -private: - static void updateOffset( OSDictionary * dict, - UInt32 value, const char * name ); -}; - -#endif /* __cplusplus */ - -enum { - // loggage - kIOLogAttach = 0x00000001ULL, - kIOLogProbe = 0x00000002ULL, - kIOLogStart = 0x00000004ULL, - kIOLogRegister = 0x00000008ULL, - kIOLogMatch = 0x00000010ULL, - kIOLogConfig = 0x00000020ULL, - kIOLogYield = 0x00000040ULL, - kIOLogPower = 0x00000080ULL, - kIOLogMapping = 0x00000100ULL, - kIOLogCatalogue = 0x00000200ULL, - kIOLogTracePower = 0x00000400ULL, - kIOLogDebugPower = 0x00000800ULL, - kIOLogServiceTree = 0x00001000ULL, - kIOLogDTree = 0x00002000ULL, - kIOLogMemory = 0x00004000ULL, - kIOLogKextMemory = 0x00008000ULL, - kOSLogRegistryMods = 0x00010000ULL, // Log attempts to modify registry collections - kIOLogPMRootDomain = 0x00020000ULL, - kOSRegistryModsMode = 0x00040000ULL, // Change default registry modification handling - panic vs. log - kIOTraceIOService = 0x00080000ULL, - kIOLogHibernate = 0x00100000ULL, - - // debug aids - change behaviour - kIONoFreeObjects = 0x00100000ULL, - kIOLogSynchronous = 0x00200000ULL, // IOLog completes synchronously - kOSTraceObjectAlloc = 0x00400000ULL, - - _kIODebugTopFlag = 0x8000000000000000ULL // force enum to be 64 bits -}; - -extern SInt64 gIOKitDebug; - -#ifdef __cplusplus -extern "C" { -#endif - -struct IORegistryPlane; -extern void IOPrintPlane( const struct IORegistryPlane * plane ); -#ifndef _OSCPPDEBUG_H -extern void OSPrintMemory( void ); -#endif -#define IOPrintMemory OSPrintMemory - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* __cplusplus */ - -#endif /* ! _IOKIT_IOKITDEBUG_H */ diff --git a/i386/include/IOKit/IOKitKeys.h b/i386/include/IOKit/IOKitKeys.h deleted file mode 100644 index 62395d5..0000000 --- a/i386/include/IOKit/IOKitKeys.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * Common symbol definitions for IOKit. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_IOKITKEYS_H -#define _IOKIT_IOKITKEYS_H - -// properties found in the registry root -#define kIOKitBuildVersionKey "IOKitBuildVersion" -#define kIOKitDiagnosticsKey "IOKitDiagnostics" - // a dictionary keyed by plane name -#define kIORegistryPlanesKey "IORegistryPlanes" -#define kIOCatalogueKey "IOCatalogue" - -// registry plane names -#define kIOServicePlane "IOService" -#define kIOPowerPlane "IOPower" -#define kIODeviceTreePlane "IODeviceTree" -#define kIOAudioPlane "IOAudio" -#define kIOFireWirePlane "IOFireWire" -#define kIOUSBPlane "IOUSB" - -// registry ID number -#define kIORegistryEntryIDKey "IORegistryEntryID" - -// IOService class name -#define kIOServiceClass "IOService" - -// IOResources class name -#define kIOResourcesClass "IOResources" - -// IOService driver probing property names -#define kIOClassKey "IOClass" -#define kIOProbeScoreKey "IOProbeScore" -#define kIOKitDebugKey "IOKitDebug" - -// IOService matching property names -#define kIOProviderClassKey "IOProviderClass" -#define kIONameMatchKey "IONameMatch" -#define kIOPropertyMatchKey "IOPropertyMatch" -#define kIOPathMatchKey "IOPathMatch" -#define kIOLocationMatchKey "IOLocationMatch" -#define kIOParentMatchKey "IOParentMatch" -#define kIOResourceMatchKey "IOResourceMatch" -#define kIOMatchedServiceCountKey "IOMatchedServiceCountMatch" - -#define kIONameMatchedKey "IONameMatched" - -#define kIOMatchCategoryKey "IOMatchCategory" -#define kIODefaultMatchCategoryKey "IODefaultMatchCategory" - -// IOService default user client class, for loadable user clients -#define kIOUserClientClassKey "IOUserClientClass" - -// key to find IOMappers -#define kIOMapperIDKey "IOMapperID" - -#define kIOUserClientCrossEndianKey "IOUserClientCrossEndian" -#define kIOUserClientCrossEndianCompatibleKey "IOUserClientCrossEndianCompatible" -#define kIOUserClientSharedInstanceKey "IOUserClientSharedInstance" -// diagnostic string describing the creating task -#define kIOUserClientCreatorKey "IOUserClientCreator" - -// IOService notification types -#define kIOPublishNotification "IOServicePublish" -#define kIOFirstPublishNotification "IOServiceFirstPublish" -#define kIOMatchedNotification "IOServiceMatched" -#define kIOFirstMatchNotification "IOServiceFirstMatch" -#define kIOTerminatedNotification "IOServiceTerminate" - -// IOService interest notification types -#define kIOGeneralInterest "IOGeneralInterest" -#define kIOBusyInterest "IOBusyInterest" -#define kIOAppPowerStateInterest "IOAppPowerStateInterest" -#define kIOPriorityPowerStateInterest "IOPriorityPowerStateInterest" - -#define kIOPlatformDeviceMessageKey "IOPlatformDeviceMessage" - -// IOService interest notification types -#define kIOCFPlugInTypesKey "IOCFPlugInTypes" - -// properties found in services that implement command pooling -#define kIOCommandPoolSizeKey "IOCommandPoolSize" // (OSNumber) - -// properties found in services that have transfer constraints -#define kIOMaximumBlockCountReadKey "IOMaximumBlockCountRead" // (OSNumber) -#define kIOMaximumBlockCountWriteKey "IOMaximumBlockCountWrite" // (OSNumber) -#define kIOMaximumByteCountReadKey "IOMaximumByteCountRead" // (OSNumber) -#define kIOMaximumByteCountWriteKey "IOMaximumByteCountWrite" // (OSNumber) -#define kIOMaximumSegmentCountReadKey "IOMaximumSegmentCountRead" // (OSNumber) -#define kIOMaximumSegmentCountWriteKey "IOMaximumSegmentCountWrite" // (OSNumber) -#define kIOMaximumSegmentByteCountReadKey "IOMaximumSegmentByteCountRead" // (OSNumber) -#define kIOMaximumSegmentByteCountWriteKey "IOMaximumSegmentByteCountWrite" // (OSNumber) -#define kIOMinimumSegmentAlignmentByteCountKey "IOMinimumSegmentAlignmentByteCount" // (OSNumber) -#define kIOMaximumSegmentAddressableBitCountKey "IOMaximumSegmentAddressableBitCount" // (OSNumber) - -// properties found in services that wish to describe an icon -// -// IOIcon = -// { -// CFBundleIdentifier = "com.example.driver.example"; -// IOBundleResourceFile = "example.icns"; -// }; -// -// where IOBundleResourceFile is the filename of the resource - -#define kIOIconKey "IOIcon" // (OSDictionary) -#define kIOBundleResourceFileKey "IOBundleResourceFile" // (OSString) - -#define kIOBusBadgeKey "IOBusBadge" // (OSDictionary) -#define kIODeviceIconKey "IODeviceIcon" // (OSDictionary) - -// property of root that describes the machine's serial number as a string -#define kIOPlatformSerialNumberKey "IOPlatformSerialNumber" // (OSString) - -// property of root that describes the machine's UUID as a string -#define kIOPlatformUUIDKey "IOPlatformUUID" // (OSString) - -// IODTNVRAM property keys -#define kIONVRAMDeletePropertyKey "IONVRAM-DELETE-PROPERTY" -#define kIODTNVRAMPanicInfoKey "aapl,panic-info" - -// keys for complex boot information -#define kIOBootDeviceKey "IOBootDevice" // dict | array of dicts -#define kIOBootDevicePathKey "IOBootDevicePath" // arch-neutral OSString -#define kIOBootDeviceSizeKey "IOBootDeviceSize" // OSNumber of bytes - -// keys for OS Version information -#define kOSBuildVersionKey "OS Build Version" - -#endif /* ! _IOKIT_IOKITKEYS_H */ diff --git a/i386/include/IOKit/IOKitServer.h b/i386/include/IOKit/IOKitServer.h deleted file mode 100644 index a68c992..0000000 --- a/i386/include/IOKit/IOKitServer.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - -/* - * Internal definitions used between the iokit user library and - * server routines. - */ - -#ifndef _IOKIT_IOKITSERVER_H -#define _IOKIT_IOKITSERVER_H - -#include <IOKit/IOTypes.h> -#include <IOKit/IOKitKeys.h> -#include <IOKit/OSMessageNotification.h> - -#ifdef __cplusplus -extern "C" { -#endif -#include <mach/kmod.h> -#ifdef __cplusplus -} -#endif - -// IOMakeMatching -/*! - @enum IOMakeMatching - @constant kIOServiceMatching - @constant kIOBSDNameMatching - @constant kIOOFPathMatching -*/ -enum { - kIOServiceMatching = 100, - kIOBSDNameMatching = 101, - kIOOFPathMatching = 102 -}; - -// IOCatalogueSendData -/*! - @enum IOCatalogueSendData user-client flags. - @constant kIOCatalogAddDrivers Signals a call to the addDrivers function in IOCatalogue. - @constant kIOCatalogAddDriversNoMatch Signals a call to the addDrivers function in IOCatalogue but does not start a matching thread. - @constant kIOCatalogRemoveDrivers Signals a call to the removeDrivers function in IOCatalogue. - @constant kIOCatalogRemoveDriversNoMatch Signals a call to the removedrivers function in IOCatalogue but does not start a matching thread. - @constant kIOCatalogStartMatching Signals the IOCatalogue to start an IOService matching thread. -*/ -enum { - kIOCatalogAddDrivers = 1, - kIOCatalogAddDriversNoMatch, - kIOCatalogRemoveDrivers, - kIOCatalogRemoveDriversNoMatch, - kIOCatalogStartMatching, - kIOCatalogRemoveKernelLinker, - kIOCatalogKextdActive, - kIOCatalogKextdFinishedLaunching -}; - -// IOCatalogueGetData -/*! - @enum IOCatalogueGetData user-client flags - @constant kIOCatalogGetContents Returns a snapshot of the database to the caller. -*/ -enum { - kIOCatalogGetContents = 1, - kIOCatalogGetModuleDemandList = 2, - kIOCatalogGetCacheMissList = 3, - kIOCatalogGetROMMkextList = 4 -}; - -// IOCatalogueReset -/*! - @enum IOCatalogueReset user-client flag - @constant kIOCatalogResetDefault Removes all entries from IOCatalogue except those used for booting the system. -*/ -enum { - kIOCatalogResetDefault = 1 -}; - -// IOCatalogueTerminate -/*! - @enum IOCatalogueTerminate user-client flags. - @constant kIOCatalogModuleUnload Terminates all services which depend on a particular module and unloads the module. - @constant kIOCatalogModuleTerminate Terminates all services which depend on a particular module but does not unload the module. - @constant kIOCatalogServiceTerminate Terminates a particular service by name. -*/ -enum { - kIOCatalogModuleUnload = 1, - kIOCatalogModuleTerminate, - kIOCatalogServiceTerminate -}; - -#endif /* ! _IOKIT_IOKITSERVER_H */ - diff --git a/i386/include/IOKit/IOLib.h b/i386/include/IOKit/IOLib.h deleted file mode 100644 index 1eb5562..0000000 --- a/i386/include/IOKit/IOLib.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - -#ifndef __IOKIT_IOLIB_H -#define __IOKIT_IOLIB_H - - -#include <stdarg.h> -#include <sys/cdefs.h> - -#include <sys/appleapiopts.h> - -#include <IOKit/system.h> - -#include <IOKit/IOReturn.h> -#include <IOKit/IOTypes.h> -#include <IOKit/IOLocks.h> - -#include <libkern/OSAtomic.h> - -__BEGIN_DECLS - -#include <kern/thread_call.h> -#include <kern/clock.h> - -/* - * min/max macros. - */ - -#define min(a,b) ((a) < (b) ? (a) : (b)) -#define max(a,b) ((a) > (b) ? (a) : (b)) - -/* - * These are opaque to the user. - */ -typedef thread_t IOThread; -typedef void (*IOThreadFunc)(void *argument); - - -/* - * IORound and IOTrunc convenience functions, in the spirit - * of vm's round_page() and trunc_page(). - */ -#define IORound(value,multiple) \ - ((((value) + (multiple) - 1) / (multiple)) * (multiple)) - -#define IOTrunc(value,multiple) \ - (((value) / (multiple)) * (multiple)); - -__END_DECLS - -#endif /* !__IOKIT_IOLIB_H */ diff --git a/i386/include/IOKit/IOLocks.h b/i386/include/IOKit/IOLocks.h deleted file mode 100644 index 81701a0..0000000 --- a/i386/include/IOKit/IOLocks.h +++ /dev/null @@ -1,409 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * - */ - -#ifndef __IOKIT_IOLOCKS_H -#define __IOKIT_IOLOCKS_H - - -#include <sys/appleapiopts.h> - -#include <IOKit/system.h> - -#include <IOKit/IOReturn.h> -#include <IOKit/IOTypes.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#include <libkern/locks.h> -#include <machine/machine_routines.h> - -/*! @var IOLockGroup - Global lock group used by all IOKit locks. To simplify kext debugging and lock-heat analysis, consider using lck_* locks with a per-driver lock group, as defined in kern/locks.h. -*/ -extern lck_grp_t *IOLockGroup; - - -/* - * Mutex lock operations - */ - -#ifdef IOLOCKS_INLINE -typedef lck_mtx_t IOLock; -#else -typedef struct _IOLock IOLock; -#endif /* IOLOCKS_INLINE */ - - -/*! @function IOLockAlloc - @abstract Allocates and initializes a mutex. - @discussion Allocates a mutex in general purpose memory, and initializes it. Mutexes are general purpose blocking mutual exclusion locks, supplied by libkern/locks.h. This function may block and so should not be called from interrupt level or while a spin lock is held. IOLocks use the global IOKit lock group, IOLockGroup. To simplify kext debugging and lock-heat analysis, consider using lck_* locks with a per-driver lock group, as defined in kern/locks.h. - @result Pointer to the allocated lock, or zero on failure. */ - -IOLock * IOLockAlloc( void ); - -/*! @function IOLockFree - @abstract Frees a mutex. - @discussion Frees a lock allocated with IOLockAlloc. Any blocked waiters will not be woken. - @param lock Pointer to the allocated lock. */ - -void IOLockFree( IOLock * lock); - -/*! @function IOLockGetMachLock - @abstract Accessor to a Mach mutex. - @discussion Accessor to the Mach mutex. - @param lock Pointer to the allocated lock. */ - -lck_mtx_t * IOLockGetMachLock( IOLock * lock); - -/*! @function IOLockLock - @abstract Lock a mutex. - @discussion Lock the mutex. If the lock is held by any thread, block waiting for its unlock. This function may block and so should not be called from interrupt level or while a spin lock is held. Locking the mutex recursively from one thread will result in deadlock. - @param lock Pointer to the allocated lock. */ - -#ifdef IOLOCKS_INLINE -#define IOLockLock(l) lck_mtx_lock(l) -#else -void IOLockLock( IOLock * lock); -#endif /* !IOLOCKS_INLINE */ - -/*! @function IOLockTryLock - @abstract Attempt to lock a mutex. - @discussion Lock the mutex if it is currently unlocked, and return true. If the lock is held by any thread, return false. - @param lock Pointer to the allocated lock. - @result True if the mutex was unlocked and is now locked by the caller, otherwise false. */ - -#ifdef IOLOCKS_INLINE -#define IOLockTryLock(l) lck_mtx_try_lock(l) -#else -boolean_t IOLockTryLock( IOLock * lock); -#endif /* !IOLOCKS_INLINE */ - -/*! @function IOLockUnlock - @abstract Unlock a mutex. -@discussion Unlock the mutex and wake any blocked waiters. Results are undefined if the caller has not locked the mutex. This function may block and so should not be called from interrupt level or while a spin lock is held. - @param lock Pointer to the allocated lock. */ - -#ifdef IOLOCKS_INLINE -#define IOLockUnlock(l) lck_mtx_unlock(l) -#else -#if defined(__i386__) -void IOLockUnlock( IOLock * lock) __DARWIN10_ALIAS(IOLockUnlock); -#else /* !__i386__ */ -void IOLockUnlock( IOLock * lock); -#endif /* __i386__ */ -#endif /* !IOLOCKS_INLINE */ - -/*! @function IOLockSleep - @abstract Sleep with mutex unlock and relock -@discussion Prepare to sleep,unlock the mutex, and re-acquire it on wakeup. Results are undefined if the caller has not locked the mutex. This function may block and so should not be called from interrupt level or while a spin lock is held. - @param lock Pointer to the locked lock. - @param event The event to sleep on. - @param interType How can the sleep be interrupted. - @result The wait-result value indicating how the thread was awakened.*/ -int IOLockSleep( IOLock * lock, void *event, UInt32 interType); - -int IOLockSleepDeadline( IOLock * lock, void *event, - AbsoluteTime deadline, UInt32 interType); - -void IOLockWakeup(IOLock * lock, void *event, bool oneThread); - -#ifdef __APPLE_API_OBSOLETE - -/* The following API is deprecated */ - -typedef enum { - kIOLockStateUnlocked = 0, - kIOLockStateLocked = 1 -} IOLockState; - -void IOLockInitWithState( IOLock * lock, IOLockState state); -#define IOLockInit( l ) IOLockInitWithState( l, kIOLockStateUnlocked); - -static __inline__ void IOTakeLock( IOLock * lock) { IOLockLock(lock); } -static __inline__ boolean_t IOTryLock( IOLock * lock) { return(IOLockTryLock(lock)); } -static __inline__ void IOUnlock( IOLock * lock) { IOLockUnlock(lock); } - -#endif /* __APPLE_API_OBSOLETE */ - -/* - * Recursive lock operations - */ - -typedef struct _IORecursiveLock IORecursiveLock; - -/*! @function IORecursiveLockAlloc - @abstract Allocates and initializes an recursive lock. - @discussion Allocates a recursive lock in general purpose memory, and initializes it. Recursive locks function identically to mutexes but allow one thread to lock more than once, with balanced unlocks. IORecursiveLocks use the global IOKit lock group, IOLockGroup. To simplify kext debugging and lock-heat analysis, consider using lck_* locks with a per-driver lock group, as defined in kern/locks.h. - @result Pointer to the allocated lock, or zero on failure. */ - -IORecursiveLock * IORecursiveLockAlloc( void ); - -/*! @function IORecursiveLockFree - @abstract Frees a recursive lock. - @discussion Frees a lock allocated with IORecursiveLockAlloc. Any blocked waiters will not be woken. - @param lock Pointer to the allocated lock. */ - -void IORecursiveLockFree( IORecursiveLock * lock); - -/*! @function IORecursiveLockGetMachLock - @abstract Accessor to a Mach mutex. - @discussion Accessor to the Mach mutex. - @param lock Pointer to the allocated lock. */ - -lck_mtx_t * IORecursiveLockGetMachLock( IORecursiveLock * lock); - -/*! @function IORecursiveLockLock - @abstract Lock a recursive lock. - @discussion Lock the recursive lock. If the lock is held by another thread, block waiting for its unlock. This function may block and so should not be called from interrupt level or while a spin lock is held. The lock may be taken recursively by the same thread, with a balanced number of calls to IORecursiveLockUnlock. - @param lock Pointer to the allocated lock. */ - -void IORecursiveLockLock( IORecursiveLock * lock); - -/*! @function IORecursiveLockTryLock - @abstract Attempt to lock a recursive lock. - @discussion Lock the lock if it is currently unlocked, or held by the calling thread, and return true. If the lock is held by another thread, return false. Successful calls to IORecursiveLockTryLock should be balanced with calls to IORecursiveLockUnlock. - @param lock Pointer to the allocated lock. - @result True if the lock is now locked by the caller, otherwise false. */ - -boolean_t IORecursiveLockTryLock( IORecursiveLock * lock); - -/*! @function IORecursiveLockUnlock - @abstract Unlock a recursive lock. -@discussion Undo one call to IORecursiveLockLock, if the lock is now unlocked wake any blocked waiters. Results are undefined if the caller does not balance calls to IORecursiveLockLock with IORecursiveLockUnlock. This function may block and so should not be called from interrupt level or while a spin lock is held. - @param lock Pointer to the allocated lock. */ - -void IORecursiveLockUnlock( IORecursiveLock * lock); - -/*! @function IORecursiveLockHaveLock - @abstract Check if a recursive lock is held by the calling thread. - @discussion If the lock is held by the calling thread, return true, otherwise the lock is unlocked, or held by another thread and false is returned. - @param lock Pointer to the allocated lock. - @result True if the calling thread holds the lock otherwise false. */ - -boolean_t IORecursiveLockHaveLock( const IORecursiveLock * lock); - -extern int IORecursiveLockSleep( IORecursiveLock *_lock, - void *event, UInt32 interType); -extern int IORecursiveLockSleepDeadline( IORecursiveLock * _lock, void *event, - AbsoluteTime deadline, UInt32 interType); -extern void IORecursiveLockWakeup( IORecursiveLock *_lock, - void *event, bool oneThread); - -/* - * Complex (read/write) lock operations - */ - -#ifdef IOLOCKS_INLINE -typedef lck_rw_t IORWLock; -#else -typedef struct _IORWLock IORWLock; -#endif /* IOLOCKS_INLINE */ - -/*! @function IORWLockAlloc - @abstract Allocates and initializes a read/write lock. - @discussion Allocates and initializes a read/write lock in general purpose memory. Read/write locks provide for multiple readers, one exclusive writer, and are supplied by libkern/locks.h. This function may block and so should not be called from interrupt level or while a spin lock is held. IORWLocks use the global IOKit lock group, IOLockGroup. To simplify kext debugging and lock-heat analysis, consider using lck_* locks with a per-driver lock group, as defined in kern/locks.h. - @result Pointer to the allocated lock, or zero on failure. */ - -IORWLock * IORWLockAlloc( void ); - -/*! @function IORWLockFree - @abstract Frees a read/write lock. - @discussion Frees a lock allocated with IORWLockAlloc. Any blocked waiters will not be woken. - @param lock Pointer to the allocated lock. */ - -void IORWLockFree( IORWLock * lock); - -/*! @function IORWLockGetMachLock - @abstract Accessor to a Mach read/write lock. - @discussion Accessor to the Mach read/write lock. - @param lock Pointer to the allocated lock. */ - -lck_rw_t * IORWLockGetMachLock( IORWLock * lock); - -/*! @function IORWLockRead - @abstract Lock a read/write lock for read. -@discussion Lock the lock for read, allowing multiple readers when there are no writers. If the lock is held for write, block waiting for its unlock. This function may block and so should not be called from interrupt level or while a spin lock is held. Locking the lock recursively from one thread, for read or write, can result in deadlock. - @param lock Pointer to the allocated lock. */ - -#ifdef IOLOCKS_INLINE -#define IORWLockRead(l) lck_rw_lock_shared(l) -#else -void IORWLockRead(IORWLock * lock); -#endif /* !IOLOCKS_INLINE */ - -/*! @function IORWLockWrite - @abstract Lock a read/write lock for write. - @discussion Lock the lock for write, allowing one writer exlusive access. If the lock is held for read or write, block waiting for its unlock. This function may block and so should not be called from interrupt level or while a spin lock is held. Locking the lock recursively from one thread, for read or write, can result in deadlock. - @param lock Pointer to the allocated lock. */ - -#ifdef IOLOCKS_INLINE -#define IORWLockWrite(l) lck_rw_lock_exclusive(l) -#else -void IORWLockWrite( IORWLock * lock); -#endif /* !IOLOCKS_INLINE */ - -/*! @function IORWLockUnlock - @abstract Unlock a read/write lock. - @discussion Undo one call to IORWLockRead or IORWLockWrite. Results are undefined if the caller has not locked the lock. This function may block and so should not be called from interrupt level or while a spin lock is held. - @param lock Pointer to the allocated lock. */ - -#ifdef IOLOCKS_INLINE -#define IORWLockUnlock(l) lck_rw_done(l) -#else -void IORWLockUnlock( IORWLock * lock); -#endif /* !IOLOCKS_INLINE */ - - -#ifdef __APPLE_API_OBSOLETE - -/* The following API is deprecated */ - -static __inline__ void IOReadLock( IORWLock * lock) { IORWLockRead(lock); } -static __inline__ void IOWriteLock( IORWLock * lock) { IORWLockWrite(lock); } -static __inline__ void IORWUnlock( IORWLock * lock) { IORWLockUnlock(lock); } - -#endif /* __APPLE_API_OBSOLETE */ - - -/* - * Simple locks. Cannot block while holding a simple lock. - */ - -#ifdef IOLOCKS_INLINE -typedef lck_spin_t IOSimpleLock; -#else -typedef struct _IOSimpleLock IOSimpleLock; -#endif /* IOLOCKS_INLINE */ - -/*! @function IOSimpleLockAlloc - @abstract Allocates and initializes a spin lock. - @discussion Allocates and initializes a spin lock in general purpose memory. Spin locks provide non-blocking mutual exclusion for synchronization between thread context and interrupt context, or for multiprocessor synchronization, and are supplied by libkern/locks.h. This function may block and so should not be called from interrupt level or while a spin lock is held. IOSimpleLocks use the global IOKit lock group, IOLockGroup. To simplify kext debugging and lock-heat analysis, consider using lck_* locks with a per-driver lock group, as defined in kern/locks.h. - @result Pointer to the allocated lock, or zero on failure. */ - -IOSimpleLock * IOSimpleLockAlloc( void ); - -/*! @function IOSimpleLockFree - @abstract Frees a spin lock. - @discussion Frees a lock allocated with IOSimpleLockAlloc. - @param lock Pointer to the lock. */ - -void IOSimpleLockFree( IOSimpleLock * lock ); - -/*! @function IOSimpleLockGetMachLock - @abstract Accessor to a Mach spin lock. - @discussion Accessor to the Mach spin lock. - @param lock Pointer to the allocated lock. */ - -lck_spin_t * IOSimpleLockGetMachLock( IOSimpleLock * lock); - -/*! @function IOSimpleLockInit - @abstract Initialize a spin lock. - @discussion Initialize an embedded spin lock, to the unlocked state. - @param lock Pointer to the lock. */ - -void IOSimpleLockInit( IOSimpleLock * lock ); - -/*! @function IOSimpleLockLock - @abstract Lock a spin lock. -@discussion Lock the spin lock. If the lock is held, spin waiting for its unlock. Spin locks disable preemption, cannot be held across any blocking operation, and should be held for very short periods. When used to synchronize between interrupt context and thread context they should be locked with interrupts disabled - IOSimpleLockLockDisableInterrupt() will do both. Locking the lock recursively from one thread will result in deadlock. - @param lock Pointer to the lock. */ - -#ifdef IOLOCKS_INLINE -#define IOSimpleLockLock(l) lck_spin_lock(l) -#else -void IOSimpleLockLock( IOSimpleLock * lock ); -#endif /* !IOLOCKS_INLINE */ - - -/*! @function IOSimpleLockTryLock - @abstract Attempt to lock a spin lock. -@discussion Lock the spin lock if it is currently unlocked, and return true. If the lock is held, return false. Successful calls to IOSimpleLockTryLock should be balanced with calls to IOSimpleLockUnlock. - @param lock Pointer to the lock. - @result True if the lock was unlocked and is now locked by the caller, otherwise false. */ - -#ifdef IOLOCKS_INLINE -#define IOSimpleLockTryLock(l) lck_spin_try_lock(l) -#else -boolean_t IOSimpleLockTryLock( IOSimpleLock * lock ); -#endif /* !IOLOCKS_INLINE */ - -/*! @function IOSimpleLockUnlock - @abstract Unlock a spin lock. - @discussion Unlock the lock, and restore preemption. Results are undefined if the caller has not locked the lock. - @param lock Pointer to the lock. */ - -#ifdef IOLOCKS_INLINE -#define IOSimpleLockUnlock(l) lck_spin_unlock(l) -#else -void IOSimpleLockUnlock( IOSimpleLock * lock ); -#endif /* !IOLOCKS_INLINE */ - -#if __LP64__ -typedef boolean_t IOInterruptState; -#else -typedef long int IOInterruptState; -#endif - -/*! @function IOSimpleLockLockDisableInterrupt - @abstract Lock a spin lock. - @discussion Lock the spin lock. If the lock is held, spin waiting for its unlock. Simple locks disable preemption, cannot be held across any blocking operation, and should be held for very short periods. When used to synchronize between interrupt context and thread context they should be locked with interrupts disabled - IOSimpleLockLockDisableInterrupt() will do both. Locking the lock recursively from one thread will result in deadlock. - @param lock Pointer to the lock. */ - -static __inline__ -IOInterruptState IOSimpleLockLockDisableInterrupt( IOSimpleLock * lock ) -{ - IOInterruptState state = ml_set_interrupts_enabled( false ); - IOSimpleLockLock( lock ); - return( state ); -} - -/*! @function IOSimpleLockUnlockEnableInterrupt - @abstract Unlock a spin lock, and restore interrupt state. - @discussion Unlock the lock, and restore preemption and interrupts to the state as they were when the lock was taken. Results are undefined if the caller has not locked the lock. - @param lock Pointer to the lock. - @param state The interrupt state returned by IOSimpleLockLockDisableInterrupt() */ - -static __inline__ -void IOSimpleLockUnlockEnableInterrupt( IOSimpleLock * lock, - IOInterruptState state ) -{ - IOSimpleLockUnlock( lock ); - ml_set_interrupts_enabled( state ); -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* !__IOKIT_IOLOCKS_H */ - diff --git a/i386/include/IOKit/IOMapper.h b/i386/include/IOKit/IOMapper.h deleted file mode 100644 index d877974..0000000 --- a/i386/include/IOKit/IOMapper.h +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) 1998-2003 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef __IOKIT_IOMAPPER_H -#define __IOKIT_IOMAPPER_H - -#include <sys/cdefs.h> - -__BEGIN_DECLS -#include <IOKit/IOTypes.h> -#include <mach/vm_types.h> - -// These are C accessors to the system mapper for non-IOKit clients -ppnum_t IOMapperIOVMAlloc(unsigned pages); -void IOMapperIOVMFree(ppnum_t addr, unsigned pages); - -ppnum_t IOMapperInsertPage(ppnum_t addr, unsigned offset, ppnum_t page); -void IOMapperInsertPPNPages(ppnum_t addr, unsigned offset, - ppnum_t *pageList, unsigned pageCount); -void IOMapperInsertUPLPages(ppnum_t addr, unsigned offset, - upl_page_info_t *pageList, unsigned pageCount); - -mach_vm_address_t IOMallocPhysical(mach_vm_size_t size, mach_vm_address_t mask); - -void IOFreePhysical(mach_vm_address_t address, mach_vm_size_t size); - -__END_DECLS - -#if __cplusplus - -#include <IOKit/IOService.h> -#include <IOKit/IOMemoryDescriptor.h> - -class OSData; -class IODMACommand; - -extern const OSSymbol * gIOMapperIDKey; - -class IOMapper : public IOService -{ - OSDeclareAbstractStructors(IOMapper); - - // Give the platform expert access to setMapperRequired(); - friend class IOPlatformExpert; - -private: - enum SystemMapperState { - kNoMapper = 0, - kUnknown = 1, - kHasMapper = 2, // Any other value is pointer to a live mapper - kWaitMask = 3, - }; -protected: - void *fTable; - ppnum_t fTablePhys; - IOItemCount fTableSize; - OSData *fTableHandle; - bool fIsSystem; - - - static void setMapperRequired(bool hasMapper); - static void waitForSystemMapper(); - - virtual bool initHardware(IOService *provider) = 0; - - virtual bool allocTable(IOByteCount size); - -public: - virtual bool start(IOService *provider); - virtual void free(); - - // Static routines capable of allocating tables that are physically - // contiguous in real memory space. - static OSData * NewARTTable(IOByteCount size, - void ** virtAddrP, ppnum_t *physAddrP); - static void FreeARTTable(OSData *handle, IOByteCount size); - - - // To get access to the system mapper IOMapper::gSystem - static IOMapper *gSystem; - - virtual ppnum_t iovmAlloc(IOItemCount pages) = 0; - virtual void iovmFree(ppnum_t addr, IOItemCount pages) = 0; - - virtual void iovmInsert(ppnum_t addr, IOItemCount offset, ppnum_t page) = 0; - virtual void iovmInsert(ppnum_t addr, IOItemCount offset, - ppnum_t *pageList, IOItemCount pageCount); - virtual void iovmInsert(ppnum_t addr, IOItemCount offset, - upl_page_info_t *pageList, IOItemCount pageCount); - - static void checkForSystemMapper() - { if ((uintptr_t) gSystem & kWaitMask) waitForSystemMapper(); }; - - static IOMapper * copyMapperForDevice(IOService * device); - - - // Function will panic if the given address is not found in a valid - // iovm mapping. - virtual addr64_t mapAddr(IOPhysicalAddress addr) = 0; - - // Get the address mask to or into an address to bypass this mapper - virtual bool getBypassMask(addr64_t *maskP) const; - - virtual ppnum_t iovmAllocDMACommand(IODMACommand * command, IOItemCount pageCount); - virtual void iovmFreeDMACommand(IODMACommand * command, ppnum_t addr, IOItemCount pageCount); - - OSMetaClassDeclareReservedUsed(IOMapper, 0); - OSMetaClassDeclareReservedUsed(IOMapper, 1); - OSMetaClassDeclareReservedUsed(IOMapper, 2); - -private: - OSMetaClassDeclareReservedUnused(IOMapper, 3); - OSMetaClassDeclareReservedUnused(IOMapper, 4); - OSMetaClassDeclareReservedUnused(IOMapper, 5); - OSMetaClassDeclareReservedUnused(IOMapper, 6); - OSMetaClassDeclareReservedUnused(IOMapper, 7); - OSMetaClassDeclareReservedUnused(IOMapper, 8); - OSMetaClassDeclareReservedUnused(IOMapper, 9); - OSMetaClassDeclareReservedUnused(IOMapper, 10); - OSMetaClassDeclareReservedUnused(IOMapper, 11); - OSMetaClassDeclareReservedUnused(IOMapper, 12); - OSMetaClassDeclareReservedUnused(IOMapper, 13); - OSMetaClassDeclareReservedUnused(IOMapper, 14); - OSMetaClassDeclareReservedUnused(IOMapper, 15); -}; - -#endif /* __cplusplus */ - -#endif /* !__IOKIT_IOMAPPER_H */ diff --git a/i386/include/IOKit/IOMemoryCursor.h b/i386/include/IOKit/IOMemoryCursor.h deleted file mode 100644 index dfe9eed..0000000 --- a/i386/include/IOKit/IOMemoryCursor.h +++ /dev/null @@ -1,462 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _IOMEMORYCURSOR_H -#define _IOMEMORYCURSOR_H - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOTypes.h> - -class IOMemoryDescriptor; - -/**************************** class IOMemoryCursor ***************************/ - -/*! - @class IOMemoryCursor - @abstract A mechanism to convert memory references to physical addresses. - @discussion The IOMemoryCursor declares the super class that all -specific memory cursors must inherit from, but a memory cursor can be created without a specific format subclass by just providing a segment function to the initializers. This class does the difficult stuff of dividing a memory descriptor into a physical scatter/gather list appropriate for the target hardware. -<br><br> - A driver is expected to create a memory cursor and configure it to the limitations of its DMA hardware; for instance the memory cursor used by the FireWire SBP-2 protocol has a maximum physical segment size of 2^16 - 1 but the actual transfer size is unlimited. Thus it would create a cursor with a maxSegmentSize of 65535 and a maxTransfer size of UINT_MAX. It would also provide a SegmentFunction that can output a pagelist entry. -<br><br> -Below is the simplest example of a SegmentFunction:<br> -void IONaturalMemoryCursor::outputSegment(PhysicalSegment segment,<br> - void * outSegments,<br> - UInt32 outSegmentIndex)<br> -{<br> - ((PhysicalSegment *) outSegments)[outSegmentIndex] = segment;<br> -} - -*/ -class IOMemoryCursor : public OSObject -{ - OSDeclareDefaultStructors(IOMemoryCursor) - -public: -/*! - @typedef PhysicalSegment - @discussion A physical address/length pair. -*/ - struct PhysicalSegment - { - IOPhysicalAddress location; - IOPhysicalLength length; - }; - -/*! @defined IOPhysicalSegment - @discussion Backward compatibility define for the old non-class scoped type definition. See IOMemoryCursor::PhysicalSegment -*/ -#define IOPhysicalSegment IOMemoryCursor::PhysicalSegment - -/*! - @typedef SegmentFunction - @discussion Pointer to a C function that outputs a single physical segment to an element in the array as defined by the segments and segmentIndex parameters. - @param segment The physical address and length that is next to be output. - @param segments Base of the output vector of DMA address length pairs. - @param segmentIndex Index to output 'segment' in the 'segments' array. -*/ - typedef void (*SegmentFunction)(PhysicalSegment segment, - void * segments, - UInt32 segmentIndex); - -/*! @defined OutputSegmentFunc - @discussion Backward compatibility define for the old non-class scoped type definition. See IOMemoryCursor::SegmentFunction */ -#define OutputSegmentFunc IOMemoryCursor::SegmentFunction - -protected: -/*! @var outSeg The action method called when an event has been delivered */ - SegmentFunction outSeg; - -/*! @var maxSegmentSize Maximum size of one segment in a scatter/gather list */ - IOPhysicalLength maxSegmentSize; - -/*! @var maxTransferSize - Maximum size of a transfer that this memory cursor is allowed to generate */ - IOPhysicalLength maxTransferSize; - -/*! @var alignMask - Currently unused. Reserved for automated aligment restriction code. */ - IOPhysicalLength alignMask; - -public: -/*! @function withSpecification - @abstract Creates and initializes an IOMemoryCursor in one operation. - @discussion Factory function to create and initialize an IOMemoryCursor in one operation. For more information, see IOMemoryCursor::initWithSpecification. - @param outSegFunc SegmentFunction to call to output one physical segment. - @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. - @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. - @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. - @result Returns a new memory cursor if successfully created and initialized, 0 otherwise. -*/ - static IOMemoryCursor * - withSpecification(SegmentFunction outSegFunc, - IOPhysicalLength maxSegmentSize = 0, - IOPhysicalLength maxTransferSize = 0, - IOPhysicalLength alignment = 1); - -/*! @function initWithSpecification - @abstract Primary initializer for the IOMemoryCursor class. - @param outSegFunc SegmentFunction to call to output one physical segment. - @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. - @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. - @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. - @result Returns true if the inherited classes and this instance initialize -successfully. -*/ - virtual bool initWithSpecification(SegmentFunction outSegFunc, - IOPhysicalLength maxSegmentSize = 0, - IOPhysicalLength maxTransferSize = 0, - IOPhysicalLength alignment = 1); - -/*! @function genPhysicalSegments - @abstract Generates a physical scatter/gather list given a memory descriptor. - @discussion Generates a list of physical segments from the given memory descriptor, relative to the current position of the descriptor. - @param descriptor IOMemoryDescriptor that describes the data associated with an I/O request. - @param fromPosition Starting location of the I/O within a memory descriptor. - @param segments Void pointer to base of output physical scatter/gather list. Always passed directly onto the SegmentFunction without interpretation by the cursor. - @param maxSegments Maximum number of segments that can be written to segments array. - @param maxTransferSize Maximum transfer size is limited to that many bytes, otherwise it defaults to the maximum transfer size specified when the memory cursor was initialized. - @param transferSize Pointer to an IOByteCount variable that can contain the total size of the transfer being described. Defaults to 0 indicating that no transfer size need be returned. - @result If the descriptor is exhausted of memory, a zero is returned, otherwise the number of segments that were filled in is returned. -*/ - virtual UInt32 genPhysicalSegments( - IOMemoryDescriptor *descriptor, - IOByteCount fromPosition, - void * segments, - UInt32 maxSegments, - UInt32 maxTransferSize = 0, - IOByteCount *transferSize = 0); -}; - -/************************ class IONaturalMemoryCursor ************************/ - - -/*! - @class IONaturalMemoryCursor - @abstract An IOMemoryCursor subclass that outputs a vector of PhysicalSegments in the natural byte orientation for the CPU. - @discussion The IONaturalMemoryCursor would be used when it is too difficult to safely describe a SegmentFunction that is more appropriate for your hardware. This cursor just outputs an array of PhysicalSegments. -*/ -class IONaturalMemoryCursor : public IOMemoryCursor -{ - OSDeclareDefaultStructors(IONaturalMemoryCursor) - -public: -/*! @function outputSegment - @abstract Outputs the given segment into the output segments array in natural byte order. - @param segment The physical address and length that is next to be output. - @param segments Base of the output vector of DMA address length pairs. - @param segmentIndex Index to output 'segment' in the 'segments' array. -*/ - static void outputSegment(PhysicalSegment segment, - void * segments, - UInt32 segmentIndex); - -/*! @defined naturalOutputSegment - @discussion Backward compatibility define for the old global function definition. See IONaturalMemoryCursor::outputSegment. -*/ -#define naturalOutputSegment IONaturalMemoryCursor::outputSegment - -/*! @function withSpecification - @abstract Creates and initializes an IONaturalMemoryCursor in one operation. - @discussion Factory function to create and initialize an IONaturalMemoryCursor in one operation. For more information, see IONaturalMemoryCursor::initWithSpecification. - @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. - @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. - @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. - @result Returns a new memory cursor if successfully created and initialized, 0 otherwise. -*/ - static IONaturalMemoryCursor * - withSpecification(IOPhysicalLength maxSegmentSize, - IOPhysicalLength maxTransferSize, - IOPhysicalLength alignment = 1); - -/*! @function initWithSpecification - @abstract Primary initializer for the IONaturalMemoryCursor class. - @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. - @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. - @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. - @result Returns true if the inherited classes and this instance initialize successfully. -*/ - virtual bool initWithSpecification(IOPhysicalLength maxSegmentSize, - IOPhysicalLength maxTransferSize, - IOPhysicalLength alignment = 1); - - -/*! @function getPhysicalSegments - @abstract Generates a CPU natural physical scatter/gather list given a memory descriptor. - @discussion Generates a list of physical segments from the given memory descriptor, relative to the current position of the descriptor. Wraps IOMemoryCursor::genPhysicalSegments. - @param descriptor IOMemoryDescriptor that describes the data associated with an I/O request. - @param fromPosition Starting location of the I/O within a memory descriptor. - @param segments Pointer to an array of IOMemoryCursor::PhysicalSegments for the output physical scatter/gather list. - @param maxSegments Maximum number of segments that can be written to segments array. - @param inMaxTransferSize Maximum transfer size is limited to that many bytes, otherwise it defaults to the maximum transfer size specified when the memory cursor was initialized. - @param transferSize Pointer to an IOByteCount variable that can contain the total size of the transfer being described. Defaults to 0 indicating that no transfer size need be returned. - @result If the descriptor is exhausted of memory, a zero is returned, otherwise the number of segments that were filled in is returned. -*/ - virtual UInt32 getPhysicalSegments(IOMemoryDescriptor *descriptor, - IOByteCount fromPosition, - PhysicalSegment *segments, - UInt32 maxSegments, - UInt32 inMaxTransferSize = 0, - IOByteCount *transferSize = 0) - { - return genPhysicalSegments(descriptor, fromPosition, segments, - maxSegments, inMaxTransferSize, transferSize); - } -}; - -/************************** class IOBigMemoryCursor **************************/ - -/*! - @class IOBigMemoryCursor - @abstract An IOMemoryCursor subclass that outputs a vector of PhysicalSegments in the big endian byte order. - @discussion The IOBigMemoryCursor would be used when the DMA hardware requires a big endian address and length pair. This cursor outputs an array of PhysicalSegments that are encoded in big-endian format. -*/ -class IOBigMemoryCursor : public IOMemoryCursor -{ - OSDeclareDefaultStructors(IOBigMemoryCursor) - -public: -/*! @function outputSegment - @abstract Outputs the given segment into the output segments array in big endian byte order. - @param segment The physical address and length that is next to be output. - @param segments Base of the output vector of DMA address length pairs. - @param segmentIndex Index to output 'segment' in the 'segments' array. -*/ - static void outputSegment(PhysicalSegment segment, - void * segments, - UInt32 segmentIndex); - -/*! @defined bigOutputSegment - @discussion Backward compatibility define for the old global function definition. See IOBigMemoryCursor::outputSegment -*/ -#define bigOutputSegment IOBigMemoryCursor::outputSegment - -/*! @function withSpecification - @abstract Creates and initializes an IOBigMemoryCursor in one operation. - @discussion Factory function to create and initialize an IOBigMemoryCursor in one operation. See also IOBigMemoryCursor::initWithSpecification. - @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. - @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. - @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. - @result Returns a new memory cursor if successfully created and initialized, 0 otherwise. -*/ - static IOBigMemoryCursor * - withSpecification(IOPhysicalLength maxSegmentSize, - IOPhysicalLength maxTransferSize, - IOPhysicalLength alignment = 1); - -/*! @function initWithSpecification - @abstract Primary initializer for the IOBigMemoryCursor class. - @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. - @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. - @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. - @result Returns true if the inherited classes and this instance initialize -successfully. -*/ - virtual bool initWithSpecification(IOPhysicalLength maxSegmentSize, - IOPhysicalLength maxTransferSize, - IOPhysicalLength alignment = 1); - - -/*! @function getPhysicalSegments - @abstract Generates a big endian physical scatter/gather list given a memory descriptor. - @discussion Generates a list of physical segments from the given memory descriptor, relative to the current position of the descriptor. Wraps IOMemoryCursor::genPhysicalSegments. - @param descriptor IOMemoryDescriptor that describes the data associated with an I/O request. - @param fromPosition Starting location of the I/O within a memory descriptor. - @param segments Pointer to an array of IOMemoryCursor::PhysicalSegments for the output physical scatter/gather list. - @param maxSegments Maximum number of segments that can be written to segments array. - @param inMaxTransferSize Maximum transfer size is limited to that many bytes, otherwise it defaults to the maximum transfer size specified when the memory cursor was initialized. - @param transferSize Pointer to an IOByteCount variable that can contain the total size of the transfer being described. Defaults to 0 indicating that no transfer size need be returned. - @result If the descriptor is exhausted of memory, a zero is returned, otherwise the number of segments that were filled in is returned. -*/ - virtual UInt32 getPhysicalSegments(IOMemoryDescriptor * descriptor, - IOByteCount fromPosition, - PhysicalSegment * segments, - UInt32 maxSegments, - UInt32 inMaxTransferSize = 0, - IOByteCount * transferSize = 0) - { - return genPhysicalSegments(descriptor, fromPosition, segments, - maxSegments, inMaxTransferSize, transferSize); - } -}; - -/************************* class IOLittleMemoryCursor ************************/ - -/*! - @class IOLittleMemoryCursor - @abstract An IOMemoryCursor subclass that outputs a vector of PhysicalSegments in the little endian byte order. - @discussion The IOLittleMemoryCursor would be used when the DMA hardware requires a little endian address and length pair. This cursor outputs an array of PhysicalSegments that are encoded in little endian format. -*/ -class IOLittleMemoryCursor : public IOMemoryCursor -{ - OSDeclareDefaultStructors(IOLittleMemoryCursor) - -public: -/*! @function outputSegment - @abstract Outputs the given segment into the output segments array in little endian byte order. - @param segment The physical address and length that is next to be output. - @param segments Base of the output vector of DMA address length pairs. - @param segmentIndex Index to output 'segment' in the 'segments' array. -*/ - static void outputSegment(PhysicalSegment segment, - void * segments, - UInt32 segmentIndex); - -/*! @defined littleOutputSegment - @discussion Backward compatibility define for the old global function definition. See also IOLittleMemoryCursor::outputSegment. */ -#define littleOutputSegment IOLittleMemoryCursor::outputSegment - -/*! @function withSpecification - @abstract Creates and initializes an IOLittleMemoryCursor in one operation. - @discussion Factory function to create and initialize an IOLittleMemoryCursor in one operation. See also IOLittleMemoryCursor::initWithSpecification. - @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. - @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. - @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. - @result Returns a new memory cursor if successfully created and initialized, 0 otherwise. -*/ - static IOLittleMemoryCursor * - withSpecification(IOPhysicalLength maxSegmentSize, - IOPhysicalLength maxTransferSize, - IOPhysicalLength alignment = 1); - -/*! @function initWithSpecification - @abstract Primary initializer for the IOLittleMemoryCursor class. - @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. - @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. - @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. - @result Returns true if the inherited classes and this instance initialize successfully. -*/ - virtual bool initWithSpecification(IOPhysicalLength maxSegmentSize, - IOPhysicalLength maxTransferSize, - IOPhysicalLength alignment = 1); - - -/*! @function getPhysicalSegments - @abstract Generates a little endian physical scatter/gather list given a memory descriptor. - @discussion Generates a list of physical segments from the given memory descriptor, relative to the current position of the descriptor. Wraps IOMemoryCursor::genPhysicalSegments. - @param descriptor IOMemoryDescriptor that describes the data associated with an I/O request. - @param fromPosition Starting location of the I/O within a memory descriptor. - @param segments Pointer to an array of IOMemoryCursor::PhysicalSegments for the output physical scatter/gather list. - @param maxSegments Maximum number of segments that can be written to segments array. - @param inMaxTransferSize Maximum transfer size is limited to that many bytes, otherwise it defaults to the maximum transfer size specified when the memory cursor was initialized. - @param transferSize Pointer to an IOByteCount variable that can contain the total size of the transfer being described. Defaults to 0 indicating that no transfer size need be returned. - @result If the descriptor is exhausted of memory, a zero is returned, otherwise the number of segments that were filled in is returned. -*/ - virtual UInt32 getPhysicalSegments(IOMemoryDescriptor * descriptor, - IOByteCount fromPosition, - PhysicalSegment * segments, - UInt32 maxSegments, - UInt32 inMaxTransferSize = 0, - IOByteCount * transferSize = 0) - { - return genPhysicalSegments(descriptor, fromPosition, segments, - maxSegments, inMaxTransferSize, transferSize); - } -}; - -/************************* class IODBDMAMemoryCursor *************************/ - -#if defined(__ppc__) - -struct IODBDMADescriptor; - -/*! - @class IODBDMAMemoryCursor - @abstract An IOMemoryCursor subclass that outputs a vector of DBDMA descriptors where the address and length are filled in. - @discussion The IODBDMAMemoryCursor would be used when the DBDMA hardware is available for the device for that will use an instance of this cursor. -*/ -class IODBDMAMemoryCursor : public IOMemoryCursor -{ - OSDeclareDefaultStructors(IODBDMAMemoryCursor) - -public: -/*! @function outputSegment - @abstract Outpust the given segment into the output segments array in address and length fields of an DBDMA descriptor. - @param segment The physical address and length that is next to be output. - @param segments Base of the output vector of DMA address length pairs. - @param segmentIndex Index to output 'segment' in the 'segments' array. -*/ - static void outputSegment(PhysicalSegment segment, - void * segments, - UInt32 segmentIndex); - -/*! @defined dbdmaOutputSegment - @discussion Backward compatibility define for the old global function definition. See IODBDMAMemoryCursor::outputSegment. */ -#define dbdmaOutputSegment IODBDMAMemoryCursor::outputSegment - -/*! @function withSpecification - @abstract Creates and initializes an IODBDMAMemoryCursor in one operation. - @discussion Factory function to create and initialize an IODBDMAMemoryCursor in one operation. See also IODBDMAMemoryCursor::initWithSpecification. - @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. - @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. - @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. - @result Returns a new memory cursor if successfully created and initialized, 0 otherwise. -*/ - static IODBDMAMemoryCursor * - withSpecification(IOPhysicalLength maxSegmentSize, - IOPhysicalLength maxTransferSize, - IOPhysicalLength alignment = 1); - -/*! @function initWithSpecification - @abstract Primary initializer for the IODBDMAMemoryCursor class. - @param maxSegmentSize Maximum allowable size for one segment. Defaults to 0. - @param maxTransferSize Maximum size of an entire transfer. Defaults to 0 indicating no maximum. - @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. - @result Returns true if the inherited classes and this instance initialize successfully. -*/ - virtual bool initWithSpecification(IOPhysicalLength maxSegmentSize, - IOPhysicalLength maxTransferSize, - IOPhysicalLength alignment = 1); - - -/*! @function getPhysicalSegments - @abstract Generates a DBDMA physical scatter/gather list given a memory descriptor. - @discussion Generates a list of DBDMA descriptors where the address and length fields are filled in appropriately. But the client is expected to fill in the rest of the DBDMA descriptor as is appropriate for their particular hardware. Wraps IOMemoryCursor::genPhysicalSegments. - @param descriptor IOMemoryDescriptor that describes the data associated with an I/O request. - @param fromPosition Starting location of the I/O within a memory descriptor. - @param segments Pointer to an array of DBDMA descriptors for the output physical scatter/gather list. Be warned no room is left for a preamble in the output array. 'segments' should point to the first memory description slot in a DBDMA command. - @param maxSegments Maximum number of segments that can be written to the DBDMA descriptor table. - @param inMaxTransferSize Maximum transfer size is limited to that many bytes, otherwise it defaults to the maximum transfer size specified when the memory cursor was initialized. - @param transferSize Pointer to an IOByteCount variable that can contain the total size of the transfer being described. Defaults to 0 indicating that no transfer size need be returned. - @result If the descriptor is exhausted of memory, a zero is returned, otherwise the number of segments that were filled in is returned. -*/ - virtual UInt32 getPhysicalSegments(IOMemoryDescriptor * descriptor, - IOByteCount fromPosition, - IODBDMADescriptor * segments, - UInt32 maxSegments, - UInt32 inMaxTransferSize = 0, - IOByteCount * transferSize = 0) - { - return genPhysicalSegments(descriptor, fromPosition, segments, - maxSegments, inMaxTransferSize, transferSize); - } -}; - -#endif /* defined(__ppc__) */ - -#endif /* !_IOMEMORYCURSOR_H */ - diff --git a/i386/include/IOKit/IOMemoryDescriptor.h b/i386/include/IOKit/IOMemoryDescriptor.h deleted file mode 100644 index d60d864..0000000 --- a/i386/include/IOKit/IOMemoryDescriptor.h +++ /dev/null @@ -1,898 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _IOMEMORYDESCRIPTOR_H -#define _IOMEMORYDESCRIPTOR_H - -#include <sys/cdefs.h> - -#include <IOKit/IOTypes.h> -#include <IOKit/IOLocks.h> -#include <libkern/c++/OSContainers.h> - -#include <mach/memory_object_types.h> - -class IOMemoryMap; -class IOMapper; - -/* - * Direction of transfer, with respect to the described memory. - */ -#ifdef __LP64__ -enum -#else /* !__LP64__ */ -enum IODirection -#endif /* !__LP64__ */ -{ - kIODirectionNone = 0x0, // same as VM_PROT_NONE - kIODirectionIn = 0x1, // User land 'read', same as VM_PROT_READ - kIODirectionOut = 0x2, // User land 'write', same as VM_PROT_WRITE - kIODirectionOutIn = kIODirectionOut | kIODirectionIn, - kIODirectionInOut = kIODirectionIn | kIODirectionOut -}; -#ifdef __LP64__ -typedef IOOptionBits IODirection; -#endif /* __LP64__ */ - -/* - * IOOptionBits used in the withOptions variant - */ -enum { - kIOMemoryDirectionMask = 0x00000007, - - kIOMemoryTypeVirtual = 0x00000010, - kIOMemoryTypePhysical = 0x00000020, - kIOMemoryTypeUPL = 0x00000030, - kIOMemoryTypePersistentMD = 0x00000040, // Persistent Memory Descriptor - kIOMemoryTypeUIO = 0x00000050, -#ifdef __LP64__ - kIOMemoryTypeVirtual64 = kIOMemoryTypeVirtual, - kIOMemoryTypePhysical64 = kIOMemoryTypePhysical, -#else /* !__LP64__ */ - kIOMemoryTypeVirtual64 = 0x00000060, - kIOMemoryTypePhysical64 = 0x00000070, -#endif /* !__LP64__ */ - kIOMemoryTypeMask = 0x000000f0, - - kIOMemoryAsReference = 0x00000100, - kIOMemoryBufferPageable = 0x00000400, - kIOMemoryMapperNone = 0x00000800, - kIOMemoryPersistent = 0x00010000, - kIOMemoryThreadSafe = 0x00100000, // Shared with Buffer MD -}; - -#define kIOMapperSystem ((IOMapper *) 0) - -enum -{ - kIOMemoryPurgeableKeepCurrent = 1, - kIOMemoryPurgeableNonVolatile = 2, - kIOMemoryPurgeableVolatile = 3, - kIOMemoryPurgeableEmpty = 4 -}; -enum -{ - kIOMemoryIncoherentIOFlush = 1, - kIOMemoryIncoherentIOStore = 2, -}; - -#define IOMEMORYDESCRIPTOR_SUPPORTS_DMACOMMAND 1 - -enum -{ - kIOPreparationIDUnprepared = 0, - kIOPreparationIDUnsupported = 1, - kIOPreparationIDAlwaysPrepared = 2, -}; - -/*! @class IOMemoryDescriptor : public OSObject - @abstract An abstract base class defining common methods for describing physical or virtual memory. - @discussion The IOMemoryDescriptor object represents a buffer or range of memory, specified as one or more physical or virtual address ranges. It contains methods to return the memory's physically contiguous segments (fragments), for use with the IOMemoryCursor, and methods to map the memory into any address space with caching and placed mapping options. */ - -class IOMemoryDescriptor : public OSObject -{ - friend class IOMemoryMap; - - OSDeclareDefaultStructors(IOMemoryDescriptor); - -protected: -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of this class in the future. - */ - struct ExpansionData { - void * devicePager; - unsigned int pagerContig:1; - unsigned int unused:31; - IOMemoryDescriptor * memory; - }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * reserved; - -protected: - OSSet * _mappings; - IOOptionBits _flags; - void * _memEntry; - -#ifdef __LP64__ - uint64_t __iomd_reserved1; - uint64_t __iomd_reserved2; - uint64_t __iomd_reserved3; - uint64_t __iomd_reserved4; -#else /* !__LP64__ */ - IODirection _direction; /* use _flags instead */ -#endif /* !__LP64__ */ - IOByteCount _length; /* length of all ranges */ - IOOptionBits _tag; - -public: -typedef IOOptionBits DMACommandOps; -#ifndef __LP64__ - virtual IOPhysicalAddress getSourceSegment( IOByteCount offset, - IOByteCount * length ) APPLE_KEXT_DEPRECATED; -#endif /* !__LP64__ */ - -/*! @function initWithOptions - @abstract Master initialiser for all variants of memory descriptors. For a more complete description see IOMemoryDescriptor::withOptions. - @discussion Note this function can be used to re-init a previously created memory descriptor. - @result true on success, false on failure. */ - virtual bool initWithOptions(void * buffers, - UInt32 count, - UInt32 offset, - task_t task, - IOOptionBits options, - IOMapper * mapper = kIOMapperSystem); - -#ifndef __LP64__ - virtual addr64_t getPhysicalSegment64( IOByteCount offset, - IOByteCount * length ) APPLE_KEXT_DEPRECATED; /* use getPhysicalSegment() and kIOMemoryMapperNone instead */ -#endif /* !__LP64__ */ - -/*! @function setPurgeable - @abstract Control the purgeable status of a memory descriptors memory. - @discussion Buffers may be allocated with the ability to have their purgeable status changed - IOBufferMemoryDescriptor with the kIOMemoryPurgeable option, VM_FLAGS_PURGEABLE may be passed to vm_allocate() in user space to allocate such buffers. The purgeable status of such a buffer may be controlled with setPurgeable(). The process of making a purgeable memory descriptor non-volatile and determining its previous state is atomic - if a purgeable memory descriptor is made nonvolatile and the old state is returned as kIOMemoryPurgeableVolatile, then the memory's previous contents are completely intact and will remain so until the memory is made volatile again. If the old state is returned as kIOMemoryPurgeableEmpty then the memory was reclaimed while it was in a volatile state and its previous contents have been lost. - @param newState - the desired new purgeable state of the memory:<br> - kIOMemoryPurgeableKeepCurrent - make no changes to the memory's purgeable state.<br> - kIOMemoryPurgeableVolatile - make the memory volatile - the memory may be reclaimed by the VM system without saving its contents to backing store.<br> - kIOMemoryPurgeableNonVolatile - make the memory nonvolatile - the memory is treated as with usual allocations and must be saved to backing store if paged.<br> - kIOMemoryPurgeableEmpty - make the memory volatile, and discard any pages allocated to it. - @param oldState - if non-NULL, the previous purgeable state of the memory is returned here:<br> - kIOMemoryPurgeableNonVolatile - the memory was nonvolatile.<br> - kIOMemoryPurgeableVolatile - the memory was volatile but its content has not been discarded by the VM system.<br> - kIOMemoryPurgeableEmpty - the memory was volatile and has been discarded by the VM system.<br> - @result An IOReturn code. */ - - virtual IOReturn setPurgeable( IOOptionBits newState, - IOOptionBits * oldState ); - -/*! @function performOperation - @abstract Perform an operation on the memory descriptor's memory. - @discussion This method performs some operation on a range of the memory descriptor's memory. When a memory descriptor's memory is not mapped, it should be more efficient to use this method than mapping the memory to perform the operation virtually. - @param options The operation to perform on the memory:<br> - kIOMemoryIncoherentIOFlush - pass this option to store to memory and flush any data in the processor cache for the memory range, with synchronization to ensure the data has passed through all levels of processor cache. It may not be supported on all architectures. This type of flush may be used for non-coherent I/O such as AGP - it is NOT required for PCI coherent operations. The memory descriptor must have been previously prepared.<br> - kIOMemoryIncoherentIOStore - pass this option to store to memory any data in the processor cache for the memory range, with synchronization to ensure the data has passed through all levels of processor cache. It may not be supported on all architectures. This type of flush may be used for non-coherent I/O such as AGP - it is NOT required for PCI coherent operations. The memory descriptor must have been previously prepared. - @param offset A byte offset into the memory descriptor's memory. - @param length The length of the data range. - @result An IOReturn code. */ - - virtual IOReturn performOperation( IOOptionBits options, - IOByteCount offset, IOByteCount length ); - - // Used for dedicated communications for IODMACommand - virtual IOReturn dmaCommandOperation(DMACommandOps op, void *vData, UInt dataSize) const; - -/*! @function getPhysicalSegment - @abstract Break a memory descriptor into its physically contiguous segments. - @discussion This method returns the physical address of the byte at the given offset into the memory, and optionally the length of the physically contiguous segment from that offset. - @param offset A byte offset into the memory whose physical address to return. - @param length If non-zero, getPhysicalSegment will store here the length of the physically contiguous segement at the given offset. - @result A physical address, or zero if the offset is beyond the length of the memory. */ - -#ifdef __LP64__ - virtual addr64_t getPhysicalSegment( IOByteCount offset, - IOByteCount * length, - IOOptionBits options = 0 ) = 0; -#else /* !__LP64__ */ - virtual addr64_t getPhysicalSegment( IOByteCount offset, - IOByteCount * length, - IOOptionBits options ); -#endif /* !__LP64__ */ - - virtual uint64_t getPreparationID( void ); - -private: - OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 0); -#ifdef __LP64__ - OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 1); - OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 2); - OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 3); - OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 4); - OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 5); - OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 6); - OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 7); -#else /* !__LP64__ */ - OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 1); - OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 2); - OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 3); - OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 4); - OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 5); - OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 6); - OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 7); -#endif /* !__LP64__ */ - OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 8); - OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 9); - OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 10); - OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 11); - OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 12); - OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 13); - OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 14); - OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 15); - -protected: - virtual void free(); -public: - static void initialize( void ); - -public: -/*! @function withAddress - @abstract Create an IOMemoryDescriptor to describe one virtual range of the kernel task. - @discussion This method creates and initializes an IOMemoryDescriptor for memory consisting of a single virtual memory range mapped into the kernel map. This memory descriptor needs to be prepared before it can be used to extract data from the memory described. - @param address The virtual address of the first byte in the memory. - @param withLength The length of memory. - @param withDirection An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. - @result The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure. */ - - static IOMemoryDescriptor * withAddress(void * address, - IOByteCount withLength, - IODirection withDirection); - -#ifndef __LP64__ - static IOMemoryDescriptor * withAddress(IOVirtualAddress address, - IOByteCount withLength, - IODirection withDirection, - task_t withTask) APPLE_KEXT_DEPRECATED; /* use withAddressRange() and prepare() instead */ -#endif /* !__LP64__ */ - -/*! @function withPhysicalAddress - @abstract Create an IOMemoryDescriptor to describe one physical range. - @discussion This method creates and initializes an IOMemoryDescriptor for memory consisting of a single physical memory range. - @param address The physical address of the first byte in the memory. - @param withLength The length of memory. - @param withDirection An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. - @result The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure. */ - - static IOMemoryDescriptor * withPhysicalAddress( - IOPhysicalAddress address, - IOByteCount withLength, - IODirection withDirection ); - -#ifndef __LP64__ - static IOMemoryDescriptor * withRanges(IOVirtualRange * ranges, - UInt32 withCount, - IODirection withDirection, - task_t withTask, - bool asReference = false) APPLE_KEXT_DEPRECATED; /* use withAddressRanges() instead */ -#endif /* !__LP64__ */ - -/*! @function withAddressRange - @abstract Create an IOMemoryDescriptor to describe one virtual range of the specified map. - @discussion This method creates and initializes an IOMemoryDescriptor for memory consisting of a single virtual memory range mapped into the specified map. This memory descriptor needs to be prepared before it can be used to extract data from the memory described. - @param address The virtual address of the first byte in the memory. - @param withLength The length of memory. - @param options - kIOMemoryDirectionMask (options:direction) This nibble indicates the I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. - @param task The task the virtual ranges are mapped into. Note that unlike IOMemoryDescriptor::withAddress(), kernel_task memory must be explicitly prepared when passed to this api. - @result The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure. */ - - static IOMemoryDescriptor * withAddressRange( - mach_vm_address_t address, - mach_vm_size_t length, - IOOptionBits options, - task_t task); - -/*! @function withAddressRanges - @abstract Create an IOMemoryDescriptor to describe one or more virtual ranges. - @discussion This method creates and initializes an IOMemoryDescriptor for memory consisting of an array of virtual memory ranges each mapped into a specified source task. This memory descriptor needs to be prepared before it can be used to extract data from the memory described. - @param ranges An array of IOAddressRange structures which specify the virtual ranges in the specified map which make up the memory to be described. IOAddressRange is the 64bit version of IOVirtualRange. - @param rangeCount The member count of the ranges array. - @param options - kIOMemoryDirectionMask (options:direction) This nibble indicates the I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. - kIOMemoryAsReference For options:type = Virtual or Physical this indicate that the memory descriptor need not copy the ranges array into local memory. This is an optimisation to try to minimise unnecessary allocations. - @param task The task each of the virtual ranges are mapped into. Note that unlike IOMemoryDescriptor::withAddress(), kernel_task memory must be explicitly prepared when passed to this api. - @result The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure. */ - - static IOMemoryDescriptor * withAddressRanges( - IOAddressRange * ranges, - UInt32 rangeCount, - IOOptionBits options, - task_t task); - -/*! @function withOptions - @abstract Master initialiser for all variants of memory descriptors. - @discussion This method creates and initializes an IOMemoryDescriptor for memory it has three main variants: Virtual, Physical & mach UPL. These variants are selected with the options parameter, see below. This memory descriptor needs to be prepared before it can be used to extract data from the memory described. - - - @param buffers A pointer to an array of IOAddressRange when options:type is kIOMemoryTypeVirtual64 or kIOMemoryTypePhysical64 or a 64bit kernel. For type UPL it is a upl_t returned by the mach/memory_object_types.h apis, primarily used internally by the UBC. IOVirtualRanges or IOPhysicalRanges are 32 bit only types for use when options:type is kIOMemoryTypeVirtual or kIOMemoryTypePhysical on 32bit kernels. - - @param count options:type = Virtual or Physical count contains a count of the number of entires in the buffers array. For options:type = UPL this field contains a total length. - - @param offset Only used when options:type = UPL, in which case this field contains an offset for the memory within the buffers upl. - - @param task Only used options:type = Virtual, The task each of the virtual ranges are mapped into. - - @param options - kIOMemoryDirectionMask (options:direction) This nibble indicates the I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. - kIOMemoryTypeMask (options:type) kIOMemoryTypeVirtual64, kIOMemoryTypeVirtual, kIOMemoryTypePhysical64, kIOMemoryTypePhysical, kIOMemoryTypeUPL Indicates that what type of memory basic memory descriptor to use. This sub-field also controls the interpretation of the buffers, count, offset & task parameters. - kIOMemoryAsReference For options:type = Virtual or Physical this indicate that the memory descriptor need not copy the ranges array into local memory. This is an optimisation to try to minimise unnecessary allocations. - kIOMemoryBufferPageable Only used by the IOBufferMemoryDescriptor as an indication that the kernel virtual memory is in fact pageable and we need to use the kernel pageable submap rather than the default map. - - @param mapper Which IOMapper should be used to map the in-memory physical addresses into I/O space addresses. Defaults to 0 which indicates that the system mapper is to be used, if present. - - @result The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure. */ - - static IOMemoryDescriptor *withOptions(void * buffers, - UInt32 count, - UInt32 offset, - task_t task, - IOOptionBits options, - IOMapper * mapper = kIOMapperSystem); - -#ifndef __LP64__ - static IOMemoryDescriptor * withPhysicalRanges( - IOPhysicalRange * ranges, - UInt32 withCount, - IODirection withDirection, - bool asReference = false) APPLE_KEXT_DEPRECATED; /* use withOptions() and kIOMemoryTypePhysical instead */ -#endif /* !__LP64__ */ - -#ifndef __LP64__ - static IOMemoryDescriptor * withSubRange(IOMemoryDescriptor *of, - IOByteCount offset, - IOByteCount length, - IODirection withDirection) APPLE_KEXT_DEPRECATED; /* use IOSubMemoryDescriptor::withSubRange() and kIOMemoryThreadSafe instead */ -#endif /* !__LP64__ */ - -/*! @function withPersistentMemoryDescriptor - @abstract Copy constructor that generates a new memory descriptor if the backing memory for the same task's virtual address and length has changed. - @discussion If the original memory descriptor's address and length is still backed by the same real memory, i.e. the user hasn't deallocated and the reallocated memory at the same address then the original memory descriptor is returned with a additional reference. Otherwise we build a totally new memory descriptor with the same characteristics as the previous one but with a new view of the vm. Note not legal to call this function with anything except an IOGeneralMemoryDescriptor that was created with the kIOMemoryPersistent option. - @param originalMD The memory descriptor to be duplicated. - @result Either the original memory descriptor with an additional retain or a new memory descriptor, 0 for a bad original memory descriptor or some other resource shortage. */ - static IOMemoryDescriptor * - withPersistentMemoryDescriptor(IOMemoryDescriptor *originalMD); - -#ifndef __LP64__ - // obsolete initializers - // - initWithOptions is the designated initializer - virtual bool initWithAddress(void * address, - IOByteCount withLength, - IODirection withDirection) APPLE_KEXT_DEPRECATED; /* use initWithOptions() instead */ - virtual bool initWithAddress(IOVirtualAddress address, - IOByteCount withLength, - IODirection withDirection, - task_t withTask) APPLE_KEXT_DEPRECATED; /* use initWithOptions() instead */ - virtual bool initWithPhysicalAddress( - IOPhysicalAddress address, - IOByteCount withLength, - IODirection withDirection ) APPLE_KEXT_DEPRECATED; /* use initWithOptions() instead */ - virtual bool initWithRanges(IOVirtualRange * ranges, - UInt32 withCount, - IODirection withDirection, - task_t withTask, - bool asReference = false) APPLE_KEXT_DEPRECATED; /* use initWithOptions() instead */ - virtual bool initWithPhysicalRanges(IOPhysicalRange * ranges, - UInt32 withCount, - IODirection withDirection, - bool asReference = false) APPLE_KEXT_DEPRECATED; /* use initWithOptions() instead */ -#endif /* __LP64__ */ - -/*! @function getDirection - @abstract Accessor to get the direction the memory descriptor was created with. - @discussion This method returns the direction the memory descriptor was created with. - @result The direction. */ - - virtual IODirection getDirection() const; - -/*! @function getLength - @abstract Accessor to get the length of the memory descriptor (over all its ranges). - @discussion This method returns the total length of the memory described by the descriptor, ie. the sum of its ranges' lengths. - @result The byte count. */ - - virtual IOByteCount getLength() const; - -/*! @function setTag - @abstract Set the tag for the memory descriptor. - @discussion This method sets the tag for the memory descriptor. Tag bits are not interpreted by IOMemoryDescriptor. - @param tag The tag. */ - - virtual void setTag( IOOptionBits tag ); - -/*! @function getTag - @abstract Accessor to the retrieve the tag for the memory descriptor. - @discussion This method returns the tag for the memory descriptor. Tag bits are not interpreted by IOMemoryDescriptor. - @result The tag. */ - - virtual IOOptionBits getTag( void ); - -/*! @function readBytes - @abstract Copy data from the memory descriptor's buffer to the specified buffer. - @discussion This method copies data from the memory descriptor's memory at the given offset, to the caller's buffer. The memory descriptor MUST have the kIODirectionOut direcction bit set and be prepared. kIODirectionOut means that this memory descriptor will be output to an external device, so readBytes is used to get memory into a local buffer for a PIO transfer to the device. - @param offset A byte offset into the memory descriptor's memory. - @param bytes The caller supplied buffer to copy the data to. - @param withLength The length of the data to copy. - @result The number of bytes copied, zero will be returned if the specified offset is beyond the length of the descriptor. Development/debug kernel builds will assert if the offset is beyond the length of the descriptor. */ - - virtual IOByteCount readBytes(IOByteCount offset, - void * bytes, IOByteCount withLength); - -/*! @function writeBytes - @abstract Copy data to the memory descriptor's buffer from the specified buffer. - @discussion This method copies data to the memory descriptor's memory at the given offset, from the caller's buffer. The memory descriptor MUST have the kIODirectionIn direcction bit set and be prepared. kIODirectionIn means that this memory descriptor will be input from an external device, so writeBytes is used to write memory into the descriptor for PIO drivers. - @param offset A byte offset into the memory descriptor's memory. - @param bytes The caller supplied buffer to copy the data from. - @param withLength The length of the data to copy. - @result The number of bytes copied, zero will be returned if the specified offset is beyond the length of the descriptor. Development/debug kernel builds will assert if the offset is beyond the length of the descriptor. */ - - virtual IOByteCount writeBytes(IOByteCount offset, - const void * bytes, IOByteCount withLength); - -#ifndef __LP64__ - virtual IOPhysicalAddress getPhysicalSegment(IOByteCount offset, - IOByteCount * length); -#endif /* !__LP64__ */ - -/*! @function getPhysicalAddress - @abstract Return the physical address of the first byte in the memory. - @discussion This method returns the physical address of the first byte in the memory. It is most useful on memory known to be physically contiguous. - @result A physical address. */ - - IOPhysicalAddress getPhysicalAddress(); - -#ifndef __LP64__ - virtual void * getVirtualSegment(IOByteCount offset, - IOByteCount * length) APPLE_KEXT_DEPRECATED; /* use map() and getVirtualAddress() instead */ -#endif /* !__LP64__ */ - -/*! @function prepare - @abstract Prepare the memory for an I/O transfer. - @discussion This involves paging in the memory, if necessary, and wiring it down for the duration of the transfer. The complete() method completes the processing of the memory after the I/O transfer finishes. Note that the prepare call is not thread safe and it is expected that the client will more easily be able to guarantee single threading a particular memory descriptor. - @param forDirection The direction of the I/O just completed, or kIODirectionNone for the direction specified by the memory descriptor. - @result An IOReturn code. */ - - virtual IOReturn prepare(IODirection forDirection = kIODirectionNone) = 0; - -/*! @function complete - @abstract Complete processing of the memory after an I/O transfer finishes. - @discussion This method should not be called unless a prepare was previously issued; the prepare() and complete() must occur in pairs, before and after an I/O transfer involving pageable memory. In 10.3 or greater systems the direction argument to complete is not longer respected. The direction is totally determined at prepare() time. - @param forDirection DEPRECATED The direction of the I/O just completed, or kIODirectionNone for the direction specified by the memory descriptor. - @result An IOReturn code. */ - - virtual IOReturn complete(IODirection forDirection = kIODirectionNone) = 0; - - /* - * Mapping functions. - */ - -/*! @function createMappingInTask - @abstract Maps a IOMemoryDescriptor into a task. - @discussion This is the general purpose method to map all or part of the memory described by a memory descriptor into a task at any available address, or at a fixed address if possible. Caching & read-only options may be set for the mapping. The mapping is represented as a returned reference to a IOMemoryMap object, which may be shared if the mapping is compatible with an existing mapping of the IOMemoryDescriptor. The IOMemoryMap object returned should be released only when the caller has finished accessing the mapping, as freeing the object destroys the mapping. - @param intoTask Sets the target task for the mapping. Pass kernel_task for the kernel address space. - @param atAddress If a placed mapping is requested, atAddress specifies its address, and the kIOMapAnywhere should not be set. Otherwise, atAddress is ignored. - @param options Mapping options are defined in IOTypes.h,<br> - kIOMapAnywhere should be passed if the mapping can be created anywhere. If not set, the atAddress parameter sets the location of the mapping, if it is available in the target map.<br> - kIOMapDefaultCache to inhibit the cache in I/O areas, kIOMapCopybackCache in general purpose RAM.<br> - kIOMapInhibitCache, kIOMapWriteThruCache, kIOMapCopybackCache to set the appropriate caching.<br> - kIOMapReadOnly to allow only read only accesses to the memory - writes will cause and access fault.<br> - kIOMapReference will only succeed if the mapping already exists, and the IOMemoryMap object is just an extra reference, ie. no new mapping will be created.<br> - kIOMapUnique allows a special kind of mapping to be created that may be used with the IOMemoryMap::redirect() API. These mappings will not be shared as is the default - there will always be a unique mapping created for the caller, not an existing mapping with an extra reference.<br> - @param offset Is a beginning offset into the IOMemoryDescriptor's memory where the mapping starts. Zero is the default to map all the memory. - @param length Is the length of the mapping requested for a subset of the IOMemoryDescriptor. Zero is the default to map all the memory. - @result A reference to an IOMemoryMap object representing the mapping, which can supply the virtual address of the mapping and other information. The mapping may be shared with multiple callers - multiple maps are avoided if a compatible one exists. The IOMemoryMap object returned should be released only when the caller has finished accessing the mapping, as freeing the object destroys the mapping. The IOMemoryMap instance also retains the IOMemoryDescriptor it maps while it exists. */ - - IOMemoryMap * createMappingInTask( - task_t intoTask, - mach_vm_address_t atAddress, - IOOptionBits options, - mach_vm_size_t offset = 0, - mach_vm_size_t length = 0 ); - -#ifndef __LP64__ - virtual IOMemoryMap * map( - task_t intoTask, - IOVirtualAddress atAddress, - IOOptionBits options, - IOByteCount offset = 0, - IOByteCount length = 0 ) APPLE_KEXT_DEPRECATED; /* use createMappingInTask() instead */ -#endif /* !__LP64__ */ - -/*! @function map - @abstract Maps a IOMemoryDescriptor into the kernel map. - @discussion This is a shortcut method to map all the memory described by a memory descriptor into the kernel map at any available address. See the full version of the createMappingInTask method for further details. - @param options Mapping options as in the full version of the createMappingInTask method, with kIOMapAnywhere assumed. - @result See the full version of the createMappingInTask method. */ - - virtual IOMemoryMap * map( - IOOptionBits options = 0 ); - -/*! @function setMapping - @abstract Establishes an already existing mapping. - @discussion This method tells the IOMemoryDescriptor about a mapping that exists, but was created elsewhere. It allows later callers of the map method to share this externally created mapping. The IOMemoryMap object returned is created to represent it. This method is not commonly needed. - @param task Address space in which the mapping exists. - @param mapAddress Virtual address of the mapping. - @param options Caching and read-only attributes of the mapping. - @result A IOMemoryMap object created to represent the mapping. */ - - virtual IOMemoryMap * setMapping( - task_t task, - IOVirtualAddress mapAddress, - IOOptionBits options = 0 ); - - // Following methods are private implementation - -#ifdef __LP64__ - virtual -#endif /* __LP64__ */ - IOReturn redirect( task_t safeTask, bool redirect ); - - IOReturn handleFault( - void * pager, - vm_map_t addressMap, - mach_vm_address_t address, - mach_vm_size_t sourceOffset, - mach_vm_size_t length, - IOOptionBits options ); - - virtual IOMemoryMap * makeMapping( - IOMemoryDescriptor * owner, - task_t intoTask, - IOVirtualAddress atAddress, - IOOptionBits options, - IOByteCount offset, - IOByteCount length ); - -protected: - virtual void addMapping( - IOMemoryMap * mapping ); - - virtual void removeMapping( - IOMemoryMap * mapping ); - - virtual IOReturn doMap( - vm_map_t addressMap, - IOVirtualAddress * atAddress, - IOOptionBits options, - IOByteCount sourceOffset = 0, - IOByteCount length = 0 ); - - virtual IOReturn doUnmap( - vm_map_t addressMap, - IOVirtualAddress logical, - IOByteCount length ); -}; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/*! @class IOMemoryMap : public OSObject - @abstract A class defining common methods for describing a memory mapping. - @discussion The IOMemoryMap object represents a mapped range of memory, described by a IOMemoryDescriptor. The mapping may be in the kernel or a non-kernel task and has processor cache mode attributes. IOMemoryMap instances are created by IOMemoryDescriptor when it creates mappings in its map method, and returned to the caller. */ - -class IOMemoryMap : public OSObject -{ - OSDeclareDefaultStructors(IOMemoryMap) - -protected: - virtual void taggedRelease(const void *tag = 0) const; - virtual void free(); - -public: -/*! @function getVirtualAddress - @abstract Accessor to the virtual address of the first byte in the mapping. - @discussion This method returns the virtual address of the first byte in the mapping. - @result A virtual address. */ - - virtual IOVirtualAddress getVirtualAddress(); - -/*! @function getPhysicalSegment - @abstract Break a mapping into its physically contiguous segments. - @discussion This method returns the physical address of the byte at the given offset into the mapping, and optionally the length of the physically contiguous segment from that offset. It functions similarly to IOMemoryDescriptor::getPhysicalSegment. - @param offset A byte offset into the mapping whose physical address to return. - @param length If non-zero, getPhysicalSegment will store here the length of the physically contiguous segement at the given offset. - @result A physical address, or zero if the offset is beyond the length of the mapping. */ - -#ifdef __LP64__ - virtual IOPhysicalAddress getPhysicalSegment(IOByteCount offset, - IOByteCount * length, - IOOptionBits options = 0); -#else /* !__LP64__ */ - virtual IOPhysicalAddress getPhysicalSegment(IOByteCount offset, - IOByteCount * length); -#endif /* !__LP64__ */ - -/*! @function getPhysicalAddress - @abstract Return the physical address of the first byte in the mapping. - @discussion This method returns the physical address of the first byte in the mapping. It is most useful on mappings known to be physically contiguous. - @result A physical address. */ - - IOPhysicalAddress getPhysicalAddress(); - -/*! @function getLength - @abstract Accessor to the length of the mapping. - @discussion This method returns the length of the mapping. - @result A byte count. */ - - virtual IOByteCount getLength(); - -/*! @function getAddressTask - @abstract Accessor to the task of the mapping. - @discussion This method returns the mach task the mapping exists in. - @result A mach task_t. */ - - virtual task_t getAddressTask(); - -/*! @function getMemoryDescriptor - @abstract Accessor to the IOMemoryDescriptor the mapping was created from. - @discussion This method returns the IOMemoryDescriptor the mapping was created from. - @result An IOMemoryDescriptor reference, which is valid while the IOMemoryMap object is retained. It should not be released by the caller. */ - - virtual IOMemoryDescriptor * getMemoryDescriptor(); - -/*! @function getMapOptions - @abstract Accessor to the options the mapping was created with. - @discussion This method returns the options to IOMemoryDescriptor::map the mapping was created with. - @result Options for the mapping, including cache settings. */ - - virtual IOOptionBits getMapOptions(); - -/*! @function unmap - @abstract Force the IOMemoryMap to unmap, without destroying the object. - @discussion IOMemoryMap instances will unmap themselves upon free, ie. when the last client with a reference calls release. This method forces the IOMemoryMap to destroy the mapping it represents, regardless of the number of clients. It is not generally used. - @result An IOReturn code. */ - - virtual IOReturn unmap(); - - virtual void taskDied(); - -/*! @function redirect - @abstract Replace the memory mapped in a process with new backing memory. - @discussion An IOMemoryMap created with the kIOMapUnique option to IOMemoryDescriptor::map() can remapped to a new IOMemoryDescriptor backing object. If the new IOMemoryDescriptor is specified as NULL, client access to the memory map is blocked until a new backing object has been set. By blocking access and copying data, the caller can create atomic copies of the memory while the client is potentially reading or writing the memory. - @param newBackingMemory The IOMemoryDescriptor that represents the physical memory that is to be now mapped in the virtual range the IOMemoryMap represents. If newBackingMemory is NULL, any access to the mapping will hang (in vm_fault()) until access has been restored by a new call to redirect() with non-NULL newBackingMemory argument. - @param options Mapping options are defined in IOTypes.h, and are documented in IOMemoryDescriptor::map() - @param offset As with IOMemoryDescriptor::map(), a beginning offset into the IOMemoryDescriptor's memory where the mapping starts. Zero is the default. - @result An IOReturn code. */ - -#ifndef __LP64__ -// For 32 bit XNU, there is a 32 bit (IOByteCount) and a 64 bit (mach_vm_size_t) interface; -// for 64 bit, these fall together on the 64 bit one. - virtual IOReturn redirect(IOMemoryDescriptor * newBackingMemory, - IOOptionBits options, - IOByteCount offset = 0); -#endif - virtual IOReturn redirect(IOMemoryDescriptor * newBackingMemory, - IOOptionBits options, - mach_vm_size_t offset = 0); - -#ifdef __LP64__ - inline mach_vm_address_t getAddress() __attribute__((always_inline)); - inline mach_vm_size_t getSize() __attribute__((always_inline)); -#else /* !__LP64__ */ - virtual mach_vm_address_t getAddress(); - virtual mach_vm_size_t getSize(); -#endif /* !__LP64__ */ - - - OSMetaClassDeclareReservedUnused(IOMemoryMap, 0); - OSMetaClassDeclareReservedUnused(IOMemoryMap, 1); - OSMetaClassDeclareReservedUnused(IOMemoryMap, 2); - OSMetaClassDeclareReservedUnused(IOMemoryMap, 3); - OSMetaClassDeclareReservedUnused(IOMemoryMap, 4); - OSMetaClassDeclareReservedUnused(IOMemoryMap, 5); - OSMetaClassDeclareReservedUnused(IOMemoryMap, 6); - OSMetaClassDeclareReservedUnused(IOMemoryMap, 7); -}; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#if !defined(__LP64) || defined(_IOMEMORYDESCRIPTOR_INTERNAL_) - -// The following classes are private implementation of IOMemoryDescriptor - they -// should not be referenced directly, just through the public API's in the -// IOMemoryDescriptor class. For example, an IOGeneralMemoryDescriptor instance -// might be created by IOMemoryDescriptor::withAddressRange(), but there should be -// no need to reference as anything but a generic IOMemoryDescriptor *. - -class IOGeneralMemoryDescriptor : public IOMemoryDescriptor -{ - OSDeclareDefaultStructors(IOGeneralMemoryDescriptor); - -public: - union Ranges { - IOVirtualRange *v; - IOAddressRange *v64; - IOPhysicalRange *p; - void *uio; - }; -protected: - Ranges _ranges; - unsigned _rangesCount; /* number of address ranges in list */ -#ifndef __LP64__ - bool _rangesIsAllocated; /* is list allocated by us? */ -#endif /* !__LP64__ */ - - task_t _task; /* task where all ranges are mapped to */ - - union { - IOVirtualRange v; - IOPhysicalRange p; - } _singleRange; /* storage space for a single range */ - - unsigned _wireCount; /* number of outstanding wires */ - -#ifndef __LP64__ - uintptr_t _cachedVirtualAddress; - - IOPhysicalAddress _cachedPhysicalAddress; -#endif /* !__LP64__ */ - - bool _initialized; /* has superclass been initialized? */ - -public: - virtual void free(); - - virtual IOReturn dmaCommandOperation(DMACommandOps op, void *vData, UInt dataSize) const; - - virtual uint64_t getPreparationID( void ); - -private: - -#ifndef __LP64__ - virtual void setPosition(IOByteCount position); - virtual void mapIntoKernel(unsigned rangeIndex); - virtual void unmapFromKernel(); -#endif /* !__LP64__ */ - - // Internal APIs may be made virtual at some time in the future. - IOReturn wireVirtual(IODirection forDirection); - void *createNamedEntry(); - - // Internal - OSData * _memoryEntries; - unsigned int _pages; - ppnum_t _highestPage; - uint32_t __iomd_reservedA; - uint32_t __iomd_reservedB; - - IOLock * _prepareLock; - -public: - /* - * IOMemoryDescriptor required methods - */ - - // Master initaliser - virtual bool initWithOptions(void * buffers, - UInt32 count, - UInt32 offset, - task_t task, - IOOptionBits options, - IOMapper * mapper = kIOMapperSystem); - -#ifndef __LP64__ - // Secondary initialisers - virtual bool initWithAddress(void * address, - IOByteCount withLength, - IODirection withDirection) APPLE_KEXT_DEPRECATED; - - virtual bool initWithAddress(IOVirtualAddress address, - IOByteCount withLength, - IODirection withDirection, - task_t withTask) APPLE_KEXT_DEPRECATED; - - virtual bool initWithPhysicalAddress( - IOPhysicalAddress address, - IOByteCount withLength, - IODirection withDirection ) APPLE_KEXT_DEPRECATED; - - virtual bool initWithRanges( IOVirtualRange * ranges, - UInt32 withCount, - IODirection withDirection, - task_t withTask, - bool asReference = false) APPLE_KEXT_DEPRECATED; - - virtual bool initWithPhysicalRanges(IOPhysicalRange * ranges, - UInt32 withCount, - IODirection withDirection, - bool asReference = false) APPLE_KEXT_DEPRECATED; - - virtual addr64_t getPhysicalSegment64( IOByteCount offset, - IOByteCount * length ) APPLE_KEXT_DEPRECATED; - - virtual IOPhysicalAddress getPhysicalSegment(IOByteCount offset, - IOByteCount * length); - - virtual IOPhysicalAddress getSourceSegment(IOByteCount offset, - IOByteCount * length) APPLE_KEXT_DEPRECATED; - - virtual void * getVirtualSegment(IOByteCount offset, - IOByteCount * length) APPLE_KEXT_DEPRECATED; -#endif /* !__LP64__ */ - - virtual IOReturn setPurgeable( IOOptionBits newState, - IOOptionBits * oldState ); - - virtual addr64_t getPhysicalSegment( IOByteCount offset, - IOByteCount * length, -#ifdef __LP64__ - IOOptionBits options = 0 ); -#else /* !__LP64__ */ - IOOptionBits options ); -#endif /* !__LP64__ */ - - virtual IOReturn prepare(IODirection forDirection = kIODirectionNone); - - virtual IOReturn complete(IODirection forDirection = kIODirectionNone); - - virtual IOReturn doMap( - vm_map_t addressMap, - IOVirtualAddress * atAddress, - IOOptionBits options, - IOByteCount sourceOffset = 0, - IOByteCount length = 0 ); - - virtual IOReturn doUnmap( - vm_map_t addressMap, - IOVirtualAddress logical, - IOByteCount length ); - - virtual bool serialize(OSSerialize *s) const; - - // Factory method for cloning a persistent IOMD, see IOMemoryDescriptor - static IOMemoryDescriptor * - withPersistentMemoryDescriptor(IOGeneralMemoryDescriptor *originalMD); - -}; - -#endif /* !defined(__LP64) || defined(_IOMEMORYDESCRIPTOR_INTERNAL_) */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#ifdef __LP64__ -mach_vm_address_t IOMemoryMap::getAddress() -{ - return (getVirtualAddress()); -} - -mach_vm_size_t IOMemoryMap::getSize() -{ - return (getLength()); -} -#else /* !__LP64__ */ -#include <IOKit/IOSubMemoryDescriptor.h> -#endif /* !__LP64__ */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#endif /* !_IOMEMORYDESCRIPTOR_H */ diff --git a/i386/include/IOKit/IOMessage.h b/i386/include/IOKit/IOMessage.h deleted file mode 100644 index 3ca9e1e..0000000 --- a/i386/include/IOKit/IOMessage.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef __IOKIT_IOMESSAGE_H -#define __IOKIT_IOMESSAGE_H - -#include <IOKit/IOReturn.h> -#include <IOKit/IOTypes.h> - -typedef UInt32 IOMessage; - -#define iokit_common_msg(message) (UInt32)(sys_iokit|sub_iokit_common|message) -#define iokit_family_msg(sub,message) (UInt32)(sys_iokit|sub|message) - -/*! @defined iokit_vendor_specific_msg - @discussion iokit_vendor_specific_msg passes messages in the sub_iokit_vendor_specific - subsystem. It can be used to be generate messages that are used for private - communication between vendor specific code with the IOService::message() etc. APIs. -*/ -#define iokit_vendor_specific_msg(message) (UInt32)(sys_iokit|sub_iokit_vendor_specific|message) - -#define kIOMessageServiceIsTerminated iokit_common_msg(0x010) -#define kIOMessageServiceIsSuspended iokit_common_msg(0x020) -#define kIOMessageServiceIsResumed iokit_common_msg(0x030) - -#define kIOMessageServiceIsRequestingClose iokit_common_msg(0x100) -#define kIOMessageServiceIsAttemptingOpen iokit_common_msg(0x101) -#define kIOMessageServiceWasClosed iokit_common_msg(0x110) - -#define kIOMessageServiceBusyStateChange iokit_common_msg(0x120) - -#define kIOMessageServicePropertyChange iokit_common_msg(0x130) - -#define kIOMessageCanDevicePowerOff iokit_common_msg(0x200) -#define kIOMessageDeviceWillPowerOff iokit_common_msg(0x210) -#define kIOMessageDeviceWillNotPowerOff iokit_common_msg(0x220) -#define kIOMessageDeviceHasPoweredOn iokit_common_msg(0x230) -#define kIOMessageCanSystemPowerOff iokit_common_msg(0x240) -#define kIOMessageSystemWillPowerOff iokit_common_msg(0x250) -#define kIOMessageSystemWillNotPowerOff iokit_common_msg(0x260) -#define kIOMessageCanSystemSleep iokit_common_msg(0x270) -#define kIOMessageSystemWillSleep iokit_common_msg(0x280) -#define kIOMessageSystemWillNotSleep iokit_common_msg(0x290) -#define kIOMessageSystemHasPoweredOn iokit_common_msg(0x300) -#define kIOMessageSystemWillRestart iokit_common_msg(0x310) -#define kIOMessageSystemWillPowerOn iokit_common_msg(0x320) - -#define kIOMessageCopyClientID iokit_common_msg(0x330) - -#endif /* ! __IOKIT_IOMESSAGE_H */ diff --git a/i386/include/IOKit/IOMultiMemoryDescriptor.h b/i386/include/IOKit/IOMultiMemoryDescriptor.h deleted file mode 100644 index 42b19a4..0000000 --- a/i386/include/IOKit/IOMultiMemoryDescriptor.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOMULTIMEMORYDESCRIPTOR_H -#define _IOMULTIMEMORYDESCRIPTOR_H - -#include <IOKit/IOMemoryDescriptor.h> - -/*! @class IOMultiMemoryDescriptor : public IOMemoryDescriptor - @abstract The IOMultiMemoryDescriptor object describes a memory area made up of several other IOMemoryDescriptors. - @discussion The IOMultiMemoryDescriptor object represents multiple ranges of memory, specified as an ordered list of IOMemoryDescriptors. The descriptors are chained end-to-end to make up a single contiguous buffer. */ - -class IOMultiMemoryDescriptor : public IOMemoryDescriptor -{ - OSDeclareDefaultStructors(IOMultiMemoryDescriptor); - -protected: - - IOMemoryDescriptor ** _descriptors; - UInt32 _descriptorsCount; - bool _descriptorsIsAllocated; - - virtual void free(); - -public: - -/*! @function withDescriptors - @abstract Create an IOMultiMemoryDescriptor to describe a memory area made up of several other IOMemoryDescriptors. - @discussion This method creates and initializes an IOMultiMemoryDescriptor for memory consisting of a number of other IOMemoryDescriptors, chained end-to-end (in the order they appear in the array) to represent a single contiguous memory buffer. Passing the descriptor array as a reference will avoid an extra allocation. - @param descriptors An array of IOMemoryDescriptors which make up the memory to be described. - @param withCount The object count for the descriptors array. - @param withDirection An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. - @param asReference If false, the IOMultiMemoryDescriptor object will make a copy of the descriptors array, otherwise, the array will be used in situ, avoiding an extra allocation. - @result The created IOMultiMemoryDescriptor on success, to be released by the caller, or zero on failure. */ - - static IOMultiMemoryDescriptor * withDescriptors( - IOMemoryDescriptor ** descriptors, - UInt32 withCount, - IODirection withDirection, - bool asReference = false ); - -/*! @function withDescriptors - @abstract Initialize an IOMultiMemoryDescriptor to describe a memory area made up of several other IOMemoryDescriptors. - @discussion This method initializes an IOMultiMemoryDescriptor for memory consisting of a number of other IOMemoryDescriptors, chained end-to-end (in the order they appear in the array) to represent a single contiguous memory buffer. Passing the descriptor array as a reference will avoid an extra allocation. - @param descriptors An array of IOMemoryDescriptors which make up the memory to be described. - @param withCount The object count for the descriptors array. - @param withDirection An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. - @param asReference If false, the IOMultiMemoryDescriptor object will make a copy of the descriptors array, otherwise, the array will be used in situ, avoiding an extra allocation. - @result The created IOMultiMemoryDescriptor on success, to be released by the caller, or zero on failure. */ - - virtual bool initWithDescriptors( - IOMemoryDescriptor ** descriptors, - UInt32 withCount, - IODirection withDirection, - bool asReference = false ); - -/*! @function getPhysicalSegment - @abstract Break a memory descriptor into its physically contiguous segments. - @discussion This method returns the physical address of the byte at the given offset into the memory, and optionally the length of the physically contiguous segment from that offset. - @param offset A byte offset into the memory whose physical address to return. - @param length If non-zero, getPhysicalSegment will store here the length of the physically contiguous segement at the given offset. - @result A physical address, or zero if the offset is beyond the length of the memory. */ - - virtual addr64_t getPhysicalSegment( IOByteCount offset, - IOByteCount * length, - IOOptionBits options = 0 ); - -/*! @function prepare - @abstract Prepare the memory for an I/O transfer. - @discussion This involves paging in the memory, if necessary, and wiring it down for the duration of the transfer. The complete() method completes the processing of the memory after the I/O transfer finishes. This method needn't called for non-pageable memory. - @param forDirection The direction of the I/O just completed, or kIODirectionNone for the direction specified by the memory descriptor. - @result An IOReturn code. */ - - virtual IOReturn prepare(IODirection forDirection = kIODirectionNone); - -/*! @function complete - @abstract Complete processing of the memory after an I/O transfer finishes. - @discussion This method should not be called unless a prepare was previously issued; the prepare() and complete() must occur in pairs, before and after an I/O transfer involving pageable memory. - @param forDirection The direction of the I/O just completed, or kIODirectionNone for the direction specified by the memory descriptor. - @result An IOReturn code. */ - - virtual IOReturn complete(IODirection forDirection = kIODirectionNone); -}; - -#endif /* !_IOMULTIMEMORYDESCRIPTOR_H */ diff --git a/i386/include/IOKit/IONVRAM.h b/i386/include/IOKit/IONVRAM.h deleted file mode 100644 index a9337bd..0000000 --- a/i386/include/IOKit/IONVRAM.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IONVRAM_H -#define _IOKIT_IONVRAM_H - -#include <IOKit/IOKitKeys.h> -#include <IOKit/IOService.h> -#include <IOKit/IODeviceTreeSupport.h> -#include <IOKit/nvram/IONVRAMController.h> - - -#define kIODTNVRAMOFPartitionName "common" -#define kIODTNVRAMXPRAMPartitionName "APL,MacOS75" -#define kIODTNVRAMPanicInfoPartitonName "APL,OSXPanic" -#define kIODTNVRAMFreePartitionName "wwwwwwwwwwww" - -enum { - kIODTNVRAMImageSize = 0x2000, - kIODTNVRAMXPRAMSize = 0x0100, - kIODTNVRAMNameRegistrySize = 0x0400 -}; - -enum { - kOFVariableTypeBoolean = 1, - kOFVariableTypeNumber, - kOFVariableTypeString, - kOFVariableTypeData -}; - -enum { - kOFVariablePermRootOnly = 0, - kOFVariablePermUserRead, - kOFVariablePermUserWrite, - kOFVariablePermKernelOnly -}; - -class IODTNVRAM : public IOService -{ - OSDeclareDefaultStructors(IODTNVRAM); - -private: - IONVRAMController *_nvramController; - const OSSymbol *_registryPropertiesKey; - UInt8 *_nvramImage; - bool _nvramImageDirty; - UInt32 _ofPartitionOffset; - UInt32 _ofPartitionSize; - UInt8 *_ofImage; - bool _ofImageDirty; - OSDictionary *_ofDict; - OSDictionary *_nvramPartitionOffsets; - OSDictionary *_nvramPartitionLengths; - UInt32 _xpramPartitionOffset; - UInt32 _xpramPartitionSize; - UInt8 *_xpramImage; - UInt32 _nrPartitionOffset; - UInt32 _nrPartitionSize; - UInt8 *_nrImage; - UInt32 _piPartitionOffset; - UInt32 _piPartitionSize; - UInt8 *_piImage; - bool _systemPaniced; - - virtual UInt8 calculatePartitionChecksum(UInt8 *partitionHeader); - virtual IOReturn initOFVariables(void); -public: - virtual IOReturn syncOFVariables(void); -private: - virtual UInt32 getOFVariableType(const OSSymbol *propSymbol) const; - virtual UInt32 getOFVariablePerm(const OSSymbol *propSymbol) const; - virtual bool getOWVariableInfo(UInt32 variableNumber, const OSSymbol **propSymbol, - UInt32 *propType, UInt32 *propOffset); - virtual bool convertPropToObject(UInt8 *propName, UInt32 propNameLength, - UInt8 *propData, UInt32 propDataLength, - const OSSymbol **propSymbol, - OSObject **propObject); - virtual bool convertObjectToProp(UInt8 *buffer, UInt32 *length, - const OSSymbol *propSymbol, OSObject *propObject); - virtual UInt16 generateOWChecksum(UInt8 *buffer); - virtual bool validateOWChecksum(UInt8 *buffer); - virtual void updateOWBootArgs(const OSSymbol *key, OSObject *value); - virtual bool searchNVRAMProperty(struct IONVRAMDescriptor *hdr, - UInt32 *where); - - virtual IOReturn readNVRAMPropertyType0(IORegistryEntry *entry, - const OSSymbol **name, - OSData **value); - virtual IOReturn writeNVRAMPropertyType0(IORegistryEntry *entry, - const OSSymbol *name, - OSData * value); - - virtual OSData *unescapeBytesToData(const UInt8 *bytes, UInt32 length); - virtual OSData *escapeDataToData(OSData * value); - - virtual IOReturn readNVRAMPropertyType1(IORegistryEntry *entry, - const OSSymbol **name, - OSData **value); - virtual IOReturn writeNVRAMPropertyType1(IORegistryEntry *entry, - const OSSymbol *name, - OSData *value); - -public: - virtual bool init(IORegistryEntry *old, const IORegistryPlane *plane); - - virtual void registerNVRAMController(IONVRAMController *nvram); - - virtual void sync(void); - - virtual bool serializeProperties(OSSerialize *s) const; - virtual OSObject *getProperty(const OSSymbol *aKey) const; - virtual OSObject *getProperty(const char *aKey) const; - virtual bool setProperty(const OSSymbol *aKey, OSObject *anObject); - virtual void removeProperty(const OSSymbol *aKey); - virtual IOReturn setProperties(OSObject *properties); - - virtual IOReturn readXPRAM(IOByteCount offset, UInt8 *buffer, - IOByteCount length); - virtual IOReturn writeXPRAM(IOByteCount offset, UInt8 *buffer, - IOByteCount length); - - virtual IOReturn readNVRAMProperty(IORegistryEntry *entry, - const OSSymbol **name, - OSData **value); - virtual IOReturn writeNVRAMProperty(IORegistryEntry *entry, - const OSSymbol *name, - OSData *value); - - virtual OSDictionary *getNVRAMPartitions(void); - - virtual IOReturn readNVRAMPartition(const OSSymbol *partitionID, - IOByteCount offset, UInt8 *buffer, - IOByteCount length); - - virtual IOReturn writeNVRAMPartition(const OSSymbol *partitionID, - IOByteCount offset, UInt8 *buffer, - IOByteCount length); - - virtual IOByteCount savePanicInfo(UInt8 *buffer, IOByteCount length); -}; - -#endif /* !_IOKIT_IONVRAM_H */ diff --git a/i386/include/IOKit/IONotifier.h b/i386/include/IOKit/IONotifier.h deleted file mode 100644 index 8f4378a..0000000 --- a/i386/include/IOKit/IONotifier.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - -#ifndef _IOKIT_IONOTIFIER_H -#define _IOKIT_IONOTIFIER_H - -#include <libkern/c++/OSObject.h> - -/*! @class IONotifier : public OSObject - @abstract An abstract base class defining common methods for controlling a notification request. - @discussion IOService notification requests are represented as implementations of the IONotifier object. It defines methods to enable, disable and remove notification requests. These actions are synchronized with invocations of the notification handler, so removing a notification request will guarantee the handler is not being executed. */ - -class IONotifier : public OSObject -{ - OSDeclareAbstractStructors(IONotifier) - -public: - -/*! @function remove - @abstract Removes the notification request and releases it. - @discussion Removes the notification request and release it. Since creating an IONotifier instance will leave it with a retain count of one, creating an IONotifier and then removing it will destroy it. This method is synchronous with any handler invocations, so when this method returns its guaranteed the handler will not be in entered. */ - - virtual void remove() = 0; - -/*! @function disable - @abstract Disables the notification request. - @discussion Disables the notification request. This method is synchronous with any handler invocations, so when this method returns its guaranteed the handler will not be in entered. - @result Returns the previous enable state of the IONotifier. */ - - virtual bool disable() = 0; - -/*! @function enable - @abstract Sets the enable state of the notification request. - @discussion Restores the enable state of the notification request, given the previous state passed in. - @param was The enable state of the notifier to restore. */ - - virtual void enable( bool was ) = 0; - -}; - -#endif /* ! _IOKIT_IONOTIFIER_H */ diff --git a/i386/include/IOKit/IOPlatformExpert.h b/i386/include/IOKit/IOPlatformExpert.h deleted file mode 100644 index f75a3e3..0000000 --- a/i386/include/IOKit/IOPlatformExpert.h +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_IOPLATFORMEXPERT_H -#define _IOKIT_IOPLATFORMEXPERT_H - -#ifdef __cplusplus -#include <IOKit/IOLib.h> -#include <IOKit/IOService.h> -#include <IOKit/IOInterrupts.h> -#include <IOKit/IOInterruptController.h> - -extern "C" { -#endif - -#include <libkern/OSTypes.h> - -extern boolean_t PEGetMachineName( char * name, int maxLength ); -extern boolean_t PEGetModelName( char * name, int maxLength ); -extern int PEGetPlatformEpoch( void ); - -enum { - kPEHaltCPU, - kPERestartCPU, - kPEHangCPU, - kPEUPSDelayHaltCPU, - kPEPanicRestartCPU, - kPEPanicSync -}; -extern int (*PE_halt_restart)(unsigned int type); -extern int PEHaltRestart(unsigned int type); - -// Save the Panic Info. Returns the number of bytes saved. -extern UInt32 PESavePanicInfo(UInt8 *buffer, UInt32 length); - -extern long PEGetGMTTimeOfDay( void ); -extern void PESetGMTTimeOfDay( long secs ); - -#ifdef __cplusplus -} /* extern "C" */ - -#define kIOPlatformMapperPresentKey "IOPlatformMapperPresent" - - -extern OSSymbol * gPlatformInterruptControllerName; - -extern const OSSymbol * gIOPlatformSleepActionKey; -extern const OSSymbol * gIOPlatformWakeActionKey; -extern const OSSymbol * gIOPlatformQuiesceActionKey; -extern const OSSymbol * gIOPlatformActiveActionKey; - -class IORangeAllocator; -class IONVRAMController; -class IOPMrootDomain; - -class IOPlatformExpert : public IOService -{ - OSDeclareDefaultStructors(IOPlatformExpert); - -private: - long _peBootROMType; - long _peChipSetType; - long _peMachineType; - -protected: - IOPMrootDomain * root; - int _pePMFeatures; - int _pePrivPMFeatures; - int _peNumBatteriesSupported; - OSArray * thePowerTree; - - bool searchingForAdditionalParents; - OSNumber * multipleParentKeyValue; - int numInstancesRegistered; - - struct ExpansionData { }; - ExpansionData *reserved; - - virtual void setBootROMType(long peBootROMType); - virtual void setChipSetType(long peChipSetType); - virtual void setMachineType(long peMachineType); - - virtual bool CheckSubTree (OSArray * inSubTree, IOService * theNub, IOService * theDevice, OSDictionary * theParent); - virtual bool RegisterServiceInTree (IOService * theService, OSDictionary * theTreeNode, OSDictionary * theTreeParentNode, IOService * theProvider); - - virtual void PMInstantiatePowerDomains ( void ); - -public: - virtual bool attach( IOService * provider ); - virtual bool start( IOService * provider ); - virtual bool configure( IOService * provider ); - virtual IOService * createNub( OSDictionary * from ); - - virtual bool compareNubName( const IOService * nub, OSString * name, - OSString ** matched = 0 ) const; - virtual IOReturn getNubResources( IOService * nub ); - - virtual long getBootROMType(void); - virtual long getChipSetType(void); - virtual long getMachineType(void); - - virtual bool getModelName( char * name, int maxLength ); - virtual bool getMachineName( char * name, int maxLength ); - - virtual int haltRestart(unsigned int type); - virtual void sleepKernel(void); - - virtual long getGMTTimeOfDay( void ); - virtual void setGMTTimeOfDay( long secs ); - - virtual IOReturn getConsoleInfo( PE_Video * consoleInfo ); - virtual IOReturn setConsoleInfo( PE_Video * consoleInfo, unsigned int op ); - - virtual void registerNVRAMController( IONVRAMController * nvram ); - - virtual IOReturn registerInterruptController(OSSymbol *name, IOInterruptController *interruptController); - virtual IOInterruptController *lookUpInterruptController(OSSymbol *name); - virtual void setCPUInterruptProperties(IOService *service); - virtual bool atInterruptLevel(void); - - virtual IOReturn callPlatformFunction(const OSSymbol *functionName, - bool waitForFunction, - void *param1, void *param2, - void *param3, void *param4); - - virtual IORangeAllocator * getPhysicalRangeAllocator(void); - - virtual bool platformAdjustService(IOService *service); - - virtual void PMRegisterDevice(IOService * theNub, IOService * theDevice); - virtual void PMLog ( const char *,unsigned long, unsigned long, unsigned long ); - - virtual bool hasPMFeature (unsigned long featureMask); - virtual bool hasPrivPMFeature (unsigned long privFeatureMask); - virtual int numBatteriesSupported (void); - - virtual IOByteCount savePanicInfo(UInt8 *buffer, IOByteCount length); - - virtual OSString* createSystemSerialNumberString(OSData* myProperty); - - OSMetaClassDeclareReservedUsed(IOPlatformExpert, 0); - OSMetaClassDeclareReservedUsed(IOPlatformExpert, 1); - OSMetaClassDeclareReservedUnused(IOPlatformExpert, 2); - OSMetaClassDeclareReservedUnused(IOPlatformExpert, 3); - OSMetaClassDeclareReservedUnused(IOPlatformExpert, 4); - OSMetaClassDeclareReservedUnused(IOPlatformExpert, 5); - OSMetaClassDeclareReservedUnused(IOPlatformExpert, 6); - OSMetaClassDeclareReservedUnused(IOPlatformExpert, 7); - OSMetaClassDeclareReservedUnused(IOPlatformExpert, 8); - OSMetaClassDeclareReservedUnused(IOPlatformExpert, 9); - OSMetaClassDeclareReservedUnused(IOPlatformExpert, 10); - OSMetaClassDeclareReservedUnused(IOPlatformExpert, 11); -}; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -class IODTNVRAM; - -class IODTPlatformExpert : public IOPlatformExpert -{ - OSDeclareAbstractStructors(IODTPlatformExpert); - -private: - IODTNVRAM *dtNVRAM; - - struct ExpansionData { }; - ExpansionData *reserved; - -public: - virtual IOService * probe( IOService * provider, - SInt32 * score ); - virtual bool configure( IOService * provider ); - - virtual void processTopLevel( IORegistryEntry * root ); - virtual const char * deleteList( void ) = 0; - virtual const char * excludeList( void ) = 0; - virtual IOService * createNub( IORegistryEntry * from ); - virtual bool createNubs( IOService * parent, OSIterator * iter ); - - virtual bool compareNubName( const IOService * nub, OSString * name, - OSString ** matched = 0 ) const; - - virtual IOReturn getNubResources( IOService * nub ); - - virtual bool getModelName( char * name, int maxLength ); - virtual bool getMachineName( char * name, int maxLength ); - - virtual void registerNVRAMController( IONVRAMController * nvram ); - - virtual int haltRestart(unsigned int type); - - /* virtual */ IOReturn readXPRAM(IOByteCount offset, UInt8 * buffer, - IOByteCount length); - - /* virtual */ IOReturn writeXPRAM(IOByteCount offset, UInt8 * buffer, - IOByteCount length); - - virtual IOReturn readNVRAMProperty( - IORegistryEntry * entry, - const OSSymbol ** name, OSData ** value ); - - virtual IOReturn writeNVRAMProperty( - IORegistryEntry * entry, - const OSSymbol * name, OSData * value ); - - // This returns a dictionary describing all the NVRAM partitions. - // The keys will be the partitionIDs of the form "0x52,nvram". - // The values will be OSNumbers of the partition's byte count. - /* virtual */ OSDictionary *getNVRAMPartitions(void); - - /* virtual */ IOReturn readNVRAMPartition(const OSSymbol * partitionID, - IOByteCount offset, UInt8 * buffer, - IOByteCount length); - - /* virtual */ IOReturn writeNVRAMPartition(const OSSymbol * partitionID, - IOByteCount offset, UInt8 * buffer, - IOByteCount length); - - virtual IOByteCount savePanicInfo(UInt8 *buffer, IOByteCount length); - virtual OSString* createSystemSerialNumberString(OSData* myProperty); - - OSMetaClassDeclareReservedUnused(IODTPlatformExpert, 0); - OSMetaClassDeclareReservedUnused(IODTPlatformExpert, 1); - OSMetaClassDeclareReservedUnused(IODTPlatformExpert, 2); - OSMetaClassDeclareReservedUnused(IODTPlatformExpert, 3); - OSMetaClassDeclareReservedUnused(IODTPlatformExpert, 4); - OSMetaClassDeclareReservedUnused(IODTPlatformExpert, 5); - OSMetaClassDeclareReservedUnused(IODTPlatformExpert, 6); - OSMetaClassDeclareReservedUnused(IODTPlatformExpert, 7); -}; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* generic root nub of service tree */ - -class IOPlatformExpertDevice : public IOService -{ - OSDeclareDefaultStructors(IOPlatformExpertDevice) - -private: - IOWorkLoop *workLoop; - - struct ExpansionData { }; - ExpansionData *reserved; - -public: - virtual bool initWithArgs( void * p1, void * p2, - void * p3, void *p4 ); - virtual bool compareName( OSString * name, OSString ** matched = 0 ) const; - - virtual IOWorkLoop *getWorkLoop() const; - virtual IOReturn setProperties( OSObject * properties ); - - virtual void free(); - - OSMetaClassDeclareReservedUnused(IOPlatformExpertDevice, 0); - OSMetaClassDeclareReservedUnused(IOPlatformExpertDevice, 1); - OSMetaClassDeclareReservedUnused(IOPlatformExpertDevice, 2); - OSMetaClassDeclareReservedUnused(IOPlatformExpertDevice, 3); -}; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* generic nub for motherboard devices */ - -class IOPlatformDevice : public IOService -{ - OSDeclareDefaultStructors(IOPlatformDevice) - - struct ExpansionData { }; - ExpansionData *reserved; - -public: - virtual bool compareName( OSString * name, OSString ** matched = 0 ) const; - virtual IOService * matchLocation( IOService * client ); - virtual IOReturn getResources( void ); - - OSMetaClassDeclareReservedUnused(IOPlatformDevice, 0); - OSMetaClassDeclareReservedUnused(IOPlatformDevice, 1); - OSMetaClassDeclareReservedUnused(IOPlatformDevice, 2); - OSMetaClassDeclareReservedUnused(IOPlatformDevice, 3); -}; - -#endif /* __cplusplus */ - -#endif /* ! _IOKIT_IOPLATFORMEXPERT_H */ diff --git a/i386/include/IOKit/IORangeAllocator.h b/i386/include/IOKit/IORangeAllocator.h deleted file mode 100644 index d81bbef..0000000 --- a/i386/include/IOKit/IORangeAllocator.h +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999 Apple Computer, Inc. - * - * - * HISTORY - * - * sdouglas 05 Nov 99 - created. - */ - -#ifndef _IOKIT_IORANGEALLOCATOR_H -#define _IOKIT_IORANGEALLOCATOR_H - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOTypes.h> - -typedef IOByteCount IORangeScalar; - -/*! @class IORangeAllocator - @abstract A utility class to manage allocations from a range. - @discussion The IORangeAllocator class provides functions for allocating ranges, at a fixed or any offset, and freeing them back to a free list. It is useful for describing ranges of memory or address space without requiring storage in the memory - information describing the free elements is kept elsewhere. Ranges are described by a start offset and a size. IORangeAllocator is optionally protected against multithreaded access. -*/ - -class IORangeAllocator : public OSObject { - - OSDeclareDefaultStructors(IORangeAllocator) - -protected: - UInt32 numElements; - UInt32 capacity; - UInt32 capacityIncrement; - IORangeScalar defaultAlignmentMask; - IOOptionBits options; - - struct IORangeAllocatorElement * elements; - -private: - virtual bool allocElement( UInt32 index ); - - virtual void deallocElement( UInt32 index ); - -public: - enum { - kLocking = 0x00000001 - }; - -/*! @function init - @abstract Standard initializer for IORangeAllocator. - @discussion This method initializes an IORangeAllocator and optionally sets the free list to contain one fragment, from zero to an endOfRange parameter. The capacity in terms of free fragments and locking options are set for the instance. - @param endOfRange If the free list is to contain an initial fragment, set endOfRange to the last offset in the range, ie. size - 1, to create a free fragment for the range zero to endOfRange inclusive. If zero is passed, the free list will be initialized empty, and can be populated with calls to the deallocate method. - @param defaultAlignment If this parameter is non-zero it specifies a required alignment for all allocations, for example pass 256 to align allocations on 256 byte boundaries. Zero or one specify unaligned allocations. - @param capacity Sets the initial size of the free list in number of noncontiguous fragments. This value is also used for the capacityIncrement. - @param options Pass kLocking if the instance can be used by multiple threads. - @result Returns true if the instance is successfully initialized, false on failure. */ - - virtual bool init( IORangeScalar endOfRange, - IORangeScalar defaultAlignment, - UInt32 capacity, - IOOptionBits options ); - -/*! @function withRange - @abstract Standard factory method for IORangeAllocator. - @discussion This method allocates and initializes an IORangeAllocator and optionally sets the free list to contain one fragment, from zero to an endOfRange parameter. The capacity in terms of free fragments and locking options are set for the instance. - @param endOfRange If the free list is to contain an initial fragment, set endOfRange to the last offset in the range, ie. size - 1, to create a free fragment for the range zero to endOfRange inclusive. If zero is passed the free list will be initialized empty, and can be populated with calls to the deallocate method. - @param defaultAlignment If this parameter is non-zero it specifies a required alignment for all allocations, for example pass 256 to align allocations on 256 byte boundaries. Zero or one specify unaligned allocations. - @param capacity Sets the initial size of the free list in number of non-contiguous fragments. This value is also used for the capacityIncrement. - @param options Pass kLocking if the instance can be used by multiple threads. - @result Returns the new IORangeAllocator instance, to be released by the caller, or zero on failure. */ - - static IORangeAllocator * withRange( IORangeScalar endOfRange, - IORangeScalar defaultAlignment = 0, - UInt32 capacity = 0, - IOOptionBits options = 0 ); - - virtual void free(); - virtual bool serialize(OSSerialize *s) const; - -/*! @function getFragmentCount - @abstract Accessor to return the number of free fragments in the range. - @discussion This method returns a count of free fragments. Each fragment describes a non-contiguous free range - deallocations will merge contiguous fragments together. - @result Returns the count of free fragments. -*/ - - virtual UInt32 getFragmentCount( void ); - -/*! @function getFragmentCapacity - @abstract Accessor to return the number of free fragments in the range. - @discussion This method returns the current capacity of the free fragment list. - @result Returns the current capacity of free fragment list. -*/ - - virtual UInt32 getFragmentCapacity( void ); - -/*! @function setFragmentCapacityIncrement - @abstract Sets the count of fragments the free list will increase by when full. - @discussion This method sets the number of extra fragments the free list will expand to when full. It defaults to the initial capacity. - @param count The number of fragments to increment the capacity by when the free list is full. -*/ - - virtual void setFragmentCapacityIncrement( UInt32 count ); - -/*! @function getFreeCount - @abstract Totals the sizes of the free fragments. - @discussion This method returns the total of the sizes of the fragments on the free list. - @result Returns the total of the free fragments sizes. -*/ - - virtual IORangeScalar getFreeCount( void ); - -/*! @function allocate - @abstract Allocates from the free list, at any offset. - @discussion This method allocates a range from the free list. The alignment will default to the alignment set when the allocator was created or may be set here. - @param size The size of the range requested. - @param result The beginning of the range allocated is returned here on success. - @param alignment If zero is passed, default to the allocators alignment, otherwise pass an alignment required for the allocation, for example 4096 to page align. - @result Returns true if the allocation was successful, else false. -*/ - - virtual bool allocate( IORangeScalar size, - IORangeScalar * result, - IORangeScalar alignment = 0 ); - -/*! @function allocateRange - @abstract Allocates from the free list, at a set offset. - @discussion This method allocates a range from the free list, given a set offset passed in. - @param start The beginning of the range requested. - @param size The size of the range requested. - @result Returns true if the allocation was successful, else false. -*/ - - virtual bool allocateRange( IORangeScalar start, - IORangeScalar size ); - -/*! @function deallocate - @abstract Deallocates a range to the free list. - @discussion This method deallocates a range to the free list, given a the start offset and length passed in. - @param start The beginning of the range requested. - @param size Returns the size of the range requested. -*/ - - virtual void deallocate( IORangeScalar start, - IORangeScalar size ); -}; - -#endif /* _IOKIT_IORANGEALLOCATOR_H */ diff --git a/i386/include/IOKit/IORegistryEntry.h b/i386/include/IOKit/IORegistryEntry.h deleted file mode 100644 index bbe4b18..0000000 --- a/i386/include/IOKit/IORegistryEntry.h +++ /dev/null @@ -1,947 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - - -#ifndef _IOKIT_IOREGISTRYENTRY_H -#define _IOKIT_IOREGISTRYENTRY_H - -#include <IOKit/IOTypes.h> -#include <libkern/c++/OSContainers.h> - - -extern const OSSymbol * gIONameKey; -extern const OSSymbol * gIOLocationKey; -extern const OSSymbol * gIORegistryEntryIDKey; - -class IORegistryEntry; -class IORegistryPlane; -class IORegistryIterator; - -typedef void (*IORegistryEntryApplierFunction)(IORegistryEntry * entry, - void * context); - -enum { - kIORegistryIterateRecursively = 0x00000001, - kIORegistryIterateParents = 0x00000002 -}; - -/*! @class IORegistryEntry : public OSObject - @abstract The base class for all objects in the registry. - @discussion The IORegistryEntry base class provides functions for describing graphs of connected registry entries, each with a dictionary-based property table. Entries may be connected in different planes, with differing topologies. Access to the registry is protected against multiple threads. Inside the kernel planes are specified with plane objects and are published by the creator - IOService exports the gIOServicePlane plane object for example. Non kernel clients specify planes by their name. -*/ - -class IORegistryEntry : public OSObject -{ - friend class IORegistryIterator; - - OSDeclareDefaultStructors(IORegistryEntry) - -protected: -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of this class in the future. - */ - struct ExpansionData - { - uint64_t fRegistryEntryID; - }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * reserved; - -private: - - OSDictionary * fRegistryTable; - OSDictionary * fPropertyTable; - -public: - /* methods available in Mac OS X 10.1 or later */ - -/*! @function copyProperty - @abstract Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy. Available in Mac OS X 10.1 or later. - @discussion This method will search for a property, starting first with this registry entry's property table, then iterating recusively through either the parent registry entries or the child registry entries of this entry. Once the first occurrence is found, it will lookup and return the value of the property, using the OSDictionary::getObject semantics. The iteration keeps track of entries that have been recursed into previously to avoid loops. This method is synchronized with other IORegistryEntry accesses to the property table(s). - @param aKey The property's name as a C-string. - @param plane The plane to iterate over, eg. gIOServicePlane. - @param options kIORegistryIterateRecursively may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard getProperty() call. kIORegistryIterateParents may be set to iterate the parents of the entry, in place of the children. - @result The property value found, or zero. A reference on any found property is returned to caller, which should be released. */ - - virtual OSObject * copyProperty( const char * aKey, - const IORegistryPlane * plane, - IOOptionBits options = - kIORegistryIterateRecursively | - kIORegistryIterateParents) const; - -/*! @function copyProperty - @abstract Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy. Available in Mac OS X 10.1 or later. - @discussion This method will search for a property, starting first with this registry entry's property table, then iterating recusively through either the parent registry entries or the child registry entries of this entry. Once the first occurrence is found, it will lookup and return the value of the property, using the OSDictionary::getObject semantics. The iteration keeps track of entries that have been recursed into previously to avoid loops. This method is synchronized with other IORegistryEntry accesses to the property table(s). - @param aKey The property's name as an OSString. - @param plane The plane to iterate over, eg. gIOServicePlane. - @param options kIORegistryIterateRecursively may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard getProperty() call. kIORegistryIterateParents may be set to iterate the parents of the entry, in place of the children. - @result The property value found, or zero. A reference on any found property is returned to caller, which should be released. */ - - virtual OSObject * copyProperty( const OSString * aKey, - const IORegistryPlane * plane, - IOOptionBits options = - kIORegistryIterateRecursively | - kIORegistryIterateParents) const; - -/*! @function copyProperty - @abstract Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy. Available in Mac OS X 10.1 or later. - @discussion This method will search for a property, starting first with this registry entry's property table, then iterating recusively through either the parent registry entries or the child registry entries of this entry. Once the first occurrence is found, it will lookup and return the value of the property, using the OSDictionary::getObject semantics. The iteration keeps track of entries that have been recursed into previously to avoid loops. This method is synchronized with other IORegistryEntry accesses to the property table(s). - @param aKey The property's name as an OSSymbol. - @param plane The plane to iterate over, eg. gIOServicePlane. - @param options kIORegistryIterateRecursively may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard getProperty() call. kIORegistryIterateParents may be set to iterate the parents of the entry, in place of the children. - @result The property value found, or zero. A reference on any found property is returned to caller, which should be released. */ - - virtual OSObject * copyProperty( const OSSymbol * aKey, - const IORegistryPlane * plane, - IOOptionBits options = - kIORegistryIterateRecursively | - kIORegistryIterateParents) const; - -/*! @function copyParentEntry - @abstract Returns an registry entry's first parent entry in a plane. Available in Mac OS X 10.1 or later. - @discussion This function will return the parent to which a registry entry was first attached. Since the majority of registry entrys have only one provider, this is a useful simplification. - @param plane The plane object. - @result Returns the first parent of the registry entry, or zero if the entry is not attached into the registry in that plane. A reference on the entry is returned to caller, which should be released. */ - - virtual IORegistryEntry * copyParentEntry( const IORegistryPlane * plane ) const; - -/*! @function copyChildEntry - @abstract Returns an registry entry's first child entry in a plane. Available in Mac OS X 10.1 or later. - @discussion This function will return the child which first attached to a registry entry. - @param plane The plane object. - @result Returns the first child of the registry entry, or zero if the entry is not attached into the registry in that plane. A reference on the entry is returned to caller, which should be released. */ - - virtual IORegistryEntry * copyChildEntry( const IORegistryPlane * plane ) const; - - /* method available in Mac OS X 10.4 or later */ -/*! - @typedef Action - @discussion Type and arguments of callout C function that is used when -a runCommand is executed by a client. Cast to this type when you want a C++ -member function to be used. Note the arg1 - arg3 parameters are passed straight pass through to the action callout. - @param target - Target of the function, can be used as a refcon. Note if a C++ function -was specified, this parameter is implicitly the first parameter in the target -member function's parameter list. - @param arg0 Argument to action from run operation. - @param arg1 Argument to action from run operation. - @param arg2 Argument to action from run operation. - @param arg3 Argument to action from run operation. -*/ - typedef IOReturn (*Action)(OSObject *target, - void *arg0, void *arg1, - void *arg2, void *arg3); - -/*! @function runPropertyAction - @abstract Single thread a call to an action w.r.t. the property lock - @discussion Client function that causes the given action to be called in a manner that syncrhonises with the registry iterators and serialisers. This functin can be used to synchronously manipulate the property table of this nub - @param action Pointer to function to be executed in work-loop context. - @param arg0 Parameter for action parameter, defaults to 0. - @param arg1 Parameter for action parameter, defaults to 0. - @param arg2 Parameter for action parameter, defaults to 0. - @param arg3 Parameter for action parameter, defaults to 0. - @result Returns the value of the Action callout. -*/ - virtual IOReturn runPropertyAction(Action action, OSObject *target, - void *arg0 = 0, void *arg1 = 0, - void *arg2 = 0, void *arg3 = 0); - -private: -#if __LP64__ - OSMetaClassDeclareReservedUnused(IORegistryEntry, 0); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 1); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 2); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 3); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 4); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 5); -#else - OSMetaClassDeclareReservedUsed(IORegistryEntry, 0); - OSMetaClassDeclareReservedUsed(IORegistryEntry, 1); - OSMetaClassDeclareReservedUsed(IORegistryEntry, 2); - OSMetaClassDeclareReservedUsed(IORegistryEntry, 3); - OSMetaClassDeclareReservedUsed(IORegistryEntry, 4); - OSMetaClassDeclareReservedUsed(IORegistryEntry, 5); -#endif - OSMetaClassDeclareReservedUnused(IORegistryEntry, 6); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 7); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 8); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 9); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 10); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 11); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 12); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 13); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 14); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 15); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 16); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 17); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 18); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 19); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 20); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 21); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 22); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 23); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 24); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 25); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 26); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 27); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 28); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 29); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 30); - OSMetaClassDeclareReservedUnused(IORegistryEntry, 31); - -public: - - /* Registry accessors */ - -/*! @function getRegistryRoot - @abstract Returns a pointer to the root instance of the registry. - @discussion This method provides an accessor to the root of the registry for the machine. The root may be passed to a registry iterator when iterating a plane, and contains properties that describe the available planes, and diagnostic information for IOKit. Keys for these properties are in IOKitKeys.h. - @result A pointer to the IORegistryEntry root instance. It should not be released by the caller. */ - - static IORegistryEntry * getRegistryRoot( void ); - -/*! @function getGenerationCount - @abstract Returns an generation count for all registry changing operations. - @discussion This method provides an accessor to the current generation count (or seed) of the registry which changes when any topology change occurs in the registry - this does not include property table changes. It may be used to invalidate any caching of the results from IORegistryEntry methods. - @result An integer generation count. */ - - static SInt32 getGenerationCount( void ); - -/*! @function getPlane - @abstract Looks up the plane object by a C-string name. - @discussion Planes are usually provided as globals by the creator, eg. gIOServicePlane, gIODeviceTreePlane, or gIOAudioPlane, however they may also be looked up by name with this method. - @result A pointer to the plane object, or zero if no such plane exists. The returned plane should not be released. */ - - static const IORegistryPlane * getPlane( const char * name ); - - /* Registry Entry allocation & init */ - -/*! @function init - @abstract Standard init method for all IORegistryEntry subclasses. - @discussion A registry entry must be initialized with this method before it can be used. A property dictionary may passed and will be retained by this method for use as the registry entry's property table, or an empty one will be created. - @param A dictionary that will become the registry entry's property table (retaining it), or zero which will cause an empty property table to be created. - @result true on success, or false on a resource failure. */ - - virtual bool init( OSDictionary * dictionary = 0 ); - -/*! @function free - @abstract Standard free method for all IORegistryEntry subclasses. - @discussion This method will release any resources of the entry, in particular its property table. Note that the registry entry must always be detached from the registry before free may be called, and subclasses (namely IOService) will have additional protocols for removing registry entries. free should never need be called directly. */ - - virtual void free( void ); - -/*! @function setPropertyTable - @abstract Replace a registry entry's property table. - @discussion This method will release the current property table of a the entry and replace it with another, retaining the new property table. - @param dict The new dictionary to be used as the entry's property table. */ - - virtual void setPropertyTable( OSDictionary * dict ); - - /* Synchronized property accessors; wrappers to OSDictionary - * plus property creation helpers */ - -/*! @function setProperty - @abstract Synchronized method to add a property to a registry entry's property table. - @discussion This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. - @param aKey The properties name as an OSSymbol. - @param anObject The property value. - @result true on success or false on a resource failure. */ - - virtual bool setProperty(const OSSymbol * aKey, OSObject * anObject); - -/*! @function setProperty - @abstract Synchronized method to add a property to a registry entry's property table. - @discussion This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. - @param aKey The property's name as an OSString. - @param anObject The property value. - @result true on success or false on a resource failure. */ - - virtual bool setProperty(const OSString * aKey, OSObject * anObject); - -/*! @function setProperty - @abstract Synchronized method to add a property to a registry entry's property table. - @discussion This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. - @param aKey The property's name as a C-string. - @param anObject The property value. - @result true on success or false on a resource failure. */ - - virtual bool setProperty(const char * aKey, OSObject * anObject); - -/*! @function setProperty - @abstract Synchronized method to construct and add a OSString property to a registry entry's property table. - @discussion This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. The property is created as an OSString from the supplied C-string, set in the property table with the given name, and released. - @param aKey The property's name as a C-string. - @param aString The property value as a C-string. - @result true on success or false on a resource failure. */ - - virtual bool setProperty(const char * aKey, const char * aString); - -/*! @function setProperty - @abstract Synchronized method to construct and add an OSBoolean property to a registry entry's property table. - @discussion This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. The property is created as an OSBoolean from the supplied value, set in the property table with the given name, and released. - @param aKey The property's name as a C-string. - @param aBoolean The property's boolean value. - @result true on success or false on a resource failure. */ - - virtual bool setProperty(const char * aKey, bool aBoolean); - -/*! @function setProperty - @abstract Synchronized method to construct and add an OSNumber property to a registry entry's property table. - @discussion This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. The property is created as an OSNumber from the supplied value and size, set in the property table with the given name, and released. - @param aKey The property's name as a C-string. - @param aValue The property's numeric value. - @param aNumberOfBits The property's size in bits, for OSNumber. - @result true on success or false on a resource failure. */ - - virtual bool setProperty( const char * aKey, - unsigned long long aValue, - unsigned int aNumberOfBits); - -/*! @function setProperty - @abstract Synchronized method to construct and add an OSData property to a registry entry's property table. - @discussion This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. The property is created as an OSData copied from the supplied data and length, set in the property table with the given name, and released. - @param aKey The property's name as a C-string. - @param bytes The property's value as a pointer. OSData will copy this data. - @param length The property's size in bytes, for OSData. - @result true on success or false on a resource failure. */ - - virtual bool setProperty( const char * aKey, - void * bytes, - unsigned int length); - -/*! @function removeProperty - @abstract Synchronized method to remove a property from a registry entry's property table. - @discussion This method will remove a property from a registry entry's property table, using the OSDictionary::removeObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. - @param aKey The property's name as an OSSymbol. */ - - virtual void removeProperty( const OSSymbol * aKey); - -/*! @function removeProperty - @abstract Synchronized method to remove a property from a registry entry's property table. - @discussion This method will remove a property from a registry entry's property table, using the OSDictionary::removeObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. - @param aKey The property's name as an OSString. */ - - virtual void removeProperty( const OSString * aKey); - -/*! @function removeProperty - @abstract Synchronized method to remove a property from a registry entry's property table. - @discussion This method will remove a property from a registry entry's property table, using the OSDictionary::removeObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. - @param aKey The property's name as a C-string. */ - - virtual void removeProperty( const char * aKey); - -/*! @function getProperty - @abstract Synchronized method to obtain a property from a registry entry's property table. - @discussion This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. - @param aKey The property's name as an OSSymbol. - @result The property value found, or zero. */ - - virtual OSObject * getProperty( const OSSymbol * aKey) const; - -/*! @function getProperty - @abstract Synchronized method to obtain a property from a registry entry's property table. - @discussion This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. - @param aKey The property's name as an OSString. - @result The property value found, or zero. */ - - virtual OSObject * getProperty( const OSString * aKey) const; - -/*! @function getProperty - @abstract Synchronized method to obtain a property from a registry entry's property table. - @discussion This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. - @param aKey The property's name as a C-string. - @result The property value found, or zero. */ - - virtual OSObject * getProperty( const char * aKey) const; - -/*! @function getProperty - @abstract Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy. - @discussion This method will search for a property, starting first with this registry entry's property table, then iterating recusively through either the parent registry entries or the child registry entries of this entry. Once the first occurrence is found, it will lookup and return the value of the property, using the OSDictionary::getObject semantics. The iteration keeps track of entries that have been recursed into previously to avoid loops. This method is synchronized with other IORegistryEntry accesses to the property table(s). - @param aKey The property's name as an OSSymbol. - @param plane The plane to iterate over, eg. gIOServicePlane. - @param options kIORegistryIterateRecursively may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard getProperty() call. kIORegistryIterateParents may be set to iterate the parents of the entry, in place of the children. - @result The property value found, or zero. */ - - virtual OSObject * getProperty( const OSSymbol * aKey, - const IORegistryPlane * plane, - IOOptionBits options = - kIORegistryIterateRecursively | - kIORegistryIterateParents) const; - -/*! @function getProperty - @abstract Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy. - @discussion This method will search for a property, starting first with this registry entry's property table, then iterating recusively through either the parent registry entries or the child registry entries of this entry. Once the first occurrence is found, it will lookup and return the value of the property, using the OSDictionary::getObject semantics. The iteration keeps track of entries that have been recursed into previously to avoid loops. This method is synchronized with other IORegistryEntry accesses to the property table(s). - @param aKey The property's name as an OSString. - @param plane The plane to iterate over, eg. gIOServicePlane. - @param options kIORegistryIterateRecursively may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard getProperty() call. kIORegistryIterateParents may be set to iterate the parents of the entry, in place of the children. - @result The property value found, or zero. */ - - virtual OSObject * getProperty( const OSString * aKey, - const IORegistryPlane * plane, - IOOptionBits options = - kIORegistryIterateRecursively | - kIORegistryIterateParents) const; - -/*! @function getProperty - @abstract Synchronized method to obtain a property from a registry entry or one of its parents (or children) in the hierarchy. - @discussion This method will search for a property, starting first with this registry entry's property table, then iterating recusively through either the parent registry entries or the child registry entries of this entry. Once the first occurrence is found, it will lookup and return the value of the property, using the OSDictionary::getObject semantics. The iteration keeps track of entries that have been recursed into previously to avoid loops. This method is synchronized with other IORegistryEntry accesses to the property table(s). - @param aKey The property's name as a C-string. - @param plane The plane to iterate over, eg. gIOServicePlane. - @param options kIORegistryIterateRecursively may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard getProperty() call. kIORegistryIterateParents may be set to iterate the parents of the entry, in place of the children. - @result The property value found, or zero. */ - - virtual OSObject * getProperty( const char * aKey, - const IORegistryPlane * plane, - IOOptionBits options = - kIORegistryIterateRecursively | - kIORegistryIterateParents) const; - -/*! @function copyProperty - @abstract Synchronized method to obtain a property from a registry entry's property table. - @discussion This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics, and return a reference to the caller. This method is synchronized with other IORegistryEntry accesses to the property table. - @param aKey The property's name as an OSSymbol. - @result The property value found, or zero. It should be released by the caller. */ - - virtual OSObject * copyProperty( const OSSymbol * aKey) const; - -/*! @function copyProperty - @abstract Synchronized method to obtain a property from a registry entry's property table. - @discussion This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics, and return a reference to the caller. This method is synchronized with other IORegistryEntry accesses to the property table. - @param aKey The property's name as an OSString. - @result The property value found, or zero. It should be released by the caller. */ - - virtual OSObject * copyProperty( const OSString * aKey) const; - -/*! @function copyProperty - @abstract Synchronized method to obtain a property from a registry entry's property table. - @discussion This method will lookup a property in a registry entry's property table, using the OSDictionary::getObject semantics, and return a reference to the caller. This method is synchronized with other IORegistryEntry accesses to the property table. - @param aKey The property's name as a C-string. - @result The property value found, or zero. It should be released by the caller. */ - - virtual OSObject * copyProperty( const char * aKey) const; - -/*! @function dictionaryWithProperties - @abstract Synchronized method to obtain copy a registry entry's property table. - @discussion This method will copy a registry entry's property table, using the OSDictionary::withDictionary semantics. This method is synchronized with other IORegistryEntry accesses to the property table. Since OSDictionary will only copy property values by reference, synchronization is not guaranteed to any collection values. - @result The created dictionary, or zero on a resource value. It should be released by the caller. */ - - virtual OSDictionary * dictionaryWithProperties( void ) const; - -/*! @function serializeProperties - @abstract Synchronized method to serialize a registry entry's property table. - @discussion This method will serialize a registry entry's property table, using the OSDictionary::serialize semantics. This method is synchronized with other IORegistryEntry accesses to the property table. Many non-kernel clients of IOKit read information from the registry via properties, and will invoke this method in a registry entry to create a serialization of all the entry's properties, which is then reconstructed in the client's task as a CFDictionary. This method may be intercepted by subclasses to update their properties or implement a different serialization method, though it is usually better to implement such functionality by creating objects in the property table and implementing their serialize methods, avoiding any need to implement serializeProperties. - @param serialize The OSSerialize instance representing the serialization request. - @result True on success, false otherwise. */ - - virtual bool serializeProperties( OSSerialize * serialize ) const; - - /* Unsynchronized(!) property table access */ - -/*! @function getPropertyTable - @abstract Unsynchronized accessor to a registry entry's property table. - @discussion This method will return a pointer to the live property table as an OSDictionery. Its use is not recommended in most cases, instead use the synchronized accessors and helper functions of IORegistryEntry to access properties. It can only safely be used by one thread, which usually means it can only be used before a registry entry is entered into the registry. - @result A pointer to the property table as an OSDictionary. The pointer is valid while the registry entry is retained, and should not be released by the caller. */ - - /* inline */ OSDictionary * getPropertyTable( void ) const; - /* { return(fPropertyTable); } */ - - /* Set properties from user level, to be overridden if supported */ - -/*! @function setProperties - @abstract Optionally supported external method to set properties in a registry entry. - @discussion This method is not implemented by IORegistryEntry, but is available to kernel and non-kernel clients to set properties in a registry entry. IOUserClient provides connection based, more controlled access to this functionality and may be more appropriate for many uses, since there is no differentiation between clients available to this method. - @param properties Any OSObject subclass, to be interpreted by the implementing method - for example an OSDictionary, OSData etc. may all be appropriate. - @result An IOReturn code to be returned to the caller. */ - - virtual IOReturn setProperties( OSObject * properties ); - - /* Topology */ - -/*! @function getParentIterator - @abstract Returns an iterator over an registry entry's parent entries in a specified plane. - @param plane The plane object. - @result Returns an iterator over the parents of the registry entry, or zero if there is a resource failure. The iterator must be released when the iteration is finished. All objects returned by the iteration are retained while the iterator is valid, though they may no longer be attached during the iteration. */ - - virtual OSIterator * getParentIterator( const IORegistryPlane * plane ) - const; - virtual void applyToParents( IORegistryEntryApplierFunction applier, - void * context, - const IORegistryPlane * plane ) const; - -/*! @function getParentEntry - @abstract Returns an registry entry's first parent entry in a plane. - @discussion This function will return the parent to which a registry entry was first attached. Since the majority of registry entrys have only one provider, this is a useful simplification. - @param plane The plane object. - @result Returns the first parent of the registry entry, or zero if the entry is not attached into the registry in that plane. The parent is retained while the entry is attached, and should not be released by the caller. */ - - virtual IORegistryEntry * getParentEntry( const IORegistryPlane * plane ) const; - -/*! @function getChildIterator - @abstract Returns an iterator over an registry entry's child entries in a plane. - @discussion This method creates an iterator which will return each of a registry entry's child entries in a specified plane. - @param plane The plane object. - @result Returns an iterator over the children of the entry, or zero if there is a resource failure. The iterator must be released when the iteration is finished. All objects returned by the iteration are retained while the iterator is valid, though they may no longer be attached during the iteration. */ - - virtual OSIterator * getChildIterator( const IORegistryPlane * plane ) - const; - - virtual void applyToChildren( IORegistryEntryApplierFunction applier, - void * context, - const IORegistryPlane * plane ) const; - -/*! @function getChildEntry - @abstract Returns an registry entry's first child entry in a plane. - @discussion This function will return the child which first attached to a registry entry. - @param plane The plane object. - @result Returns the first child of the registry entry, or zero if the entry is not attached into the registry in that plane. The child is retained while the entry is attached, and should not be released by the caller. */ - - virtual IORegistryEntry * getChildEntry( const IORegistryPlane * plane ) const; - -/*! @function isChild - @abstract Determines whether a registry entry is the child of another in a plane. - @discussion This method called in the parent entry determines if the specified entry is a child, in a plane. Additionally, it can check if the child is the only child of the parent entry. - @param child The possible child registry entry. - @param plane The plane object. - @param onlyChild If true, check also if the child is the only child. - @result If the child argument is not a child of the registry entry, false is returned. If onlyChild is true and the child is not the only child of the entry, false is returned, otherwise true is returned. */ - - virtual bool isChild( IORegistryEntry * child, - const IORegistryPlane * plane, - bool onlyChild = false ) const; - -/*! @function isParent - @abstract Determines whether a registry entry is the parent of another in a plane. - @discussion This method called in the child entry determines if the specified entry is a parent, in a plane. Additionally, it can check if the parent is the only parent of the child entry. - @param parent The possible parent registry entry. - @param plane The plane object. - @param onlyParent If true, check also if the parent is the only parent. - @result If the parent argument is not a parent of the registry entry, false is returned. If onlyParent is true and the parent is not the only parent of the entry, false is returned, otherwise true is returned. */ - - virtual bool isParent( IORegistryEntry * parent, - const IORegistryPlane * plane, - bool onlyParent = false ) const; - -/*! @function inPlane - @abstract Determines whether a registry entry is attached in a plane. - @discussion This method determines if the entry is attached in a plane to any other entry. It can also be used to determine if the entry is a member of any plane. - @param plane The plane object, 0 indicates any plane. - @result If the entry has a parent in the given plane or if plane = 0 then if entry has any parent; return true, otherwise false. */ - - virtual bool inPlane( const IORegistryPlane * plane = 0) const; - -/*! @function getDepth - @abstract Counts the maximum number of entries between an entry and the registry root, in a plane. - @discussion This method counts the number of entries between and entry and the registry root, in a plane, for each parent of the entry and returns the maximum value. - @param plane The plane object. - @result The maximum number of entries between the entry and the root. Zero is returned if the entry is not attached in the plane. */ - - virtual unsigned int getDepth( const IORegistryPlane * plane ) const; - - /* Attach / detach */ - -/*! @function attachToParent - @abstract Attaches a entry to a parent entry in a plane. - @discussion This is the usual method of entering an entry into the registry. It is a no-op and success if the entry is already attached to the parent. Attaching the entry into the registry retains both the child and parent while they are attached. This method will call attachToChild in the parent entry if it is not being called from attachToChild. - @param parent The registry entry to attach to. - @param plane The plane object. - @result true on success, or false on a resource failure, or if the parent is the same as the child. */ - - virtual bool attachToParent( IORegistryEntry * parent, - const IORegistryPlane * plane ); - -/*! @function detachFromParent - @abstract Detaches an entry from a parent entry in a plane. - @discussion This is the usual method of removing an entry from the registry. It is a no-op if the entry is not attached to the parent. Detaching the entry will release both the child and parent. This method will call detachFromChild in the parent entry if it is not being called from detachFromChild. - @param parent The registry entry to detach from. - @param plane The plane object. */ - - virtual void detachFromParent( IORegistryEntry * parent, - const IORegistryPlane * plane ); - -/*! @function attachToChild - @abstract Method called in the parent entry when a child attaches. - @discussion This method is called in the parent entry when a child attaches, to make overrides possible. This method will also call attachToParent in the child entry if it is not being called from attachToParent. It is a no-op and success if the entry is already a child. Attaching the entry into the registry retains both the child and parent while they are attached. - @param child The registry entry being attached. - @param plane The plane object. - @result true on success, or false on a resource failure, or if the parent is the same as the child. */ - - virtual bool attachToChild( IORegistryEntry * child, - const IORegistryPlane * plane ); - -/*! @function detachFromChild - @abstract Detaches a child entry from its parent in a plane. - @discussion This method is called in the parent entry when a child detaches, to make overrides possible. It is a no-op if the entry is not a child of the parent. Detaching the entry will release both the child and parent. This method will call detachFromParent in the child entry if it is not being called from detachFromParent. - @param parent The registry entry to detach. - @param plane The plane object. */ - - virtual void detachFromChild( IORegistryEntry * child, - const IORegistryPlane * plane ); - -/*! @function detachAbove - @abstract Detaches an entry from all its parent entries in a plane. - @discussion This method calls detachFromParent in the entry for each of its parent entries in the plane. - @param plane The plane object. */ - - virtual void detachAbove( const IORegistryPlane * plane ); - -/*! @function detachAll - @abstract Detaches an entry and all its children recursively in a plane. - @discussion This method breaks the registry connections for a subtree. detachAbove is called in the entry, and all child entries and their children in the plane. - @param plane The plane object. */ - - virtual void detachAll( const IORegistryPlane * plane ); - - /* Name, location and path accessors */ - -/*! @function getName - @abstract Returns the name assigned to the registry entry as a C-string. - @discussion Entries can be named in a particular plane, or globally. If the entry is named in plane and the plane is specified that name will be returned, otherwise the global name is returned. The global name defaults to the entry's meta class name if it has not been named. - @param plane The plane object, or zero for the global name. - @result A C-string name, valid while the entry is retained. */ - - virtual const char * getName( const IORegistryPlane * plane = 0 ) const; - -/*! @function copyName - @abstract Returns the name assigned to the registry entry as an OSSymbol. - @discussion Entries can be named in a particular plane, or globally. If the entry is named in plane and the plane is specified that name will be returned, otherwise the global name is returned. The global name defaults to the entry's meta class name if it has not been named. - @param plane The plane object, or zero for the global name. - @result A reference to an OSSymbol for the name, which should be released by the caller. */ - - virtual const OSSymbol * copyName( - const IORegistryPlane * plane = 0 ) const; - -/*! @function compareNames - @abstract Compares the name of the entry with one or more names, and optionally returns the matching name. - @discussion This method is called during IOService name matching and elsewhere to compare the entry's global name with a list of names, or a single name. A list of names may be passed as any OSCollection of OSStrings, while a single name may be passed an OSString, in the name parameter. compareNames will call the compareName method for each name, for overrides. - @param name The name or names to compare with as any OSCollection (eg. OSArray, OSSet, OSDictionary) of OSStrings, or a single name may be passed an OSString. - @param matched If the caller wants the successfully matched name returned, pass a non-zero pointer for the matched parameter and an OSString will be returned here. It should be released by the caller. - @result True if one of the names compared true with the entry's global name. */ - - virtual bool compareNames( OSObject * name, OSString ** matched = 0 ) const; - -/*! @function compareName - @abstract Compares the name of the entry with one name, and optionally returns the matching name. - @discussion This method is called during IOService name matching and elsewhere from the compareNames method. It should be overridden to provide non-standard name matching. - @param name The name to compare with as an OSString. - @param matched If the caller wants the successfully matched name returned, pass a non-zero pointer for the matched parameter and an OSString will be returned here. It should be released by the caller. Generally, this will be the same as the name parameter, but may not be if wildcards are used. - @result True if the name compared true with the entry's global name. */ - - virtual bool compareName( OSString * name, OSString ** matched = 0 ) const; - -/*! @function setName - @abstract Sets a name for the registry entry, in a particular plane, or globally. - @discussion Entries can be named in a particular plane, or globally. If the plane is specified the name applies only to that plane, otherwise the global name is set. The global name defaults to the entry's meta class name if it has not been named. - @param name An OSSymbol which will be retained. - @param plane The plane object, or zero to set the global name. */ - - virtual void setName( const OSSymbol * name, - const IORegistryPlane * plane = 0 ); - -/*! @function setName - @abstract Sets a name for the registry entry, in a particular plane, or globally. - @discussion Entries can be named in a particular plane, or globally. If the plane is specified the name applies only to that plane, otherwise the global name is set. The global name defaults to the entry's meta class name if it has not been named. - @param name A const C-string name which will be copied. - @param plane The plane object, or zero to set the global name. */ - - virtual void setName( const char * name, - const IORegistryPlane * plane = 0 ); - -/*! @function getLocation - @abstract Returns the location string assigned to the registry entry as a C-string. - @discussion Entries can given a location string in a particular plane, or globally. If the entry has had a location set in a plane and the plane is specified that location string will be returned, otherwise the global location string is returned. If no global location string has been set, zero is returned. - @param plane The plane object, or zero for the global name. - @result A C-string location string, valid while the entry is retained, or zero. */ - - virtual const char * getLocation( const IORegistryPlane * plane = 0 ) const; - -/*! @function copyLocation - @abstract Returns the location string assigned to the registry entry as an OSSymbol. - @discussion Entries can given a location string in a particular plane, or globally. If the entry has had a location set in a plane and the plane is specified that location string will be returned, otherwise the global location string is returned. If no global location string has been set, zero is returned. - @param plane The plane object, or zero for the global name. - @result A reference to an OSSymbol for the location if one exists, which should be released by the caller, or zero. */ - - virtual const OSSymbol * copyLocation( - const IORegistryPlane * plane = 0 ) const; - -/*! @function setLocation - @abstract Sets a location string for the registry entry, in a particular plane, or globally. - @discussion Entries can be given a location string in a particular plane, or globally. If the plane is specified the location applies only to that plane, otherwise the global location is set. The location string may be used during path lookups of registry entries, to distinguish between sibling entries with the same name. The default IORegistryEntry parsing of location strings expects a list of hex numbers separated by commas, though subclasses of IORegistryEntry might do their own parsing. - @param location A C-string location string which will be copied, or an OSSymbol which will be retained. - @param plane The plane object, or zero to set the global location string. */ - - virtual void setLocation( const OSSymbol * location, - const IORegistryPlane * plane = 0 ); - virtual void setLocation( const char * location, - const IORegistryPlane * plane = 0 ); - -/*! @function getPath - @abstract Create a path for a registry entry. - @discussion The path for a registry entry is copied to the caller's buffer. The path describes the entry's attachment in a particular plane, which must be specified. The path begins with the plane name followed by a colon, and then followed by '/' separated path components for each of the entries between the root and the registry entry. Each component is constructed with the getPathComponent method called in each entry. An alias may also exist for the entry, which are described as properties in a registry entry found at /aliases in the plane. If a property value interpreted as a path in a call to IORegistryEntry::fromPath yields the entry, then the property name is used as the entry's path. - @param path A char buffer allocated by the caller. - @param length An in/out parameter - the caller sets the length of the buffer available, and getPath returns the total length of the path copied to the buffer. - @param plane The plane object. - @result getPath will fail if the entry is not attached in the plane, or if the buffer is not large enough to contain the path. */ - - virtual bool getPath( char * path, int * length, - const IORegistryPlane * plane) const; - -/*! @function getPathComponent - @abstract Create a path component for a registry entry. - @discussion Each component of a path created with getPath is created with getPathComponent. The default implementation concatenates the entry's name in the the plane, with the "at" symbol and the location string of the entry in the plane if it has been set. - @param path A char buffer allocated by the caller. - @param length An in/out parameter - the caller sets the length of the buffer available, and getPathComponent returns the total length of the path component copied to the buffer. - @param plane The plane object. - @result true if the path fits into the supplied buffer or false on a overflow. */ - - virtual bool getPathComponent( char * path, int * length, - const IORegistryPlane * plane ) const; - -/*! @function fromPath - @abstract Looks up a registry entry by path. - @discussion This function parses paths to lookup registry entries. The path may begin with the <plane name>: created by getPath, or the plane may be set by the caller. If there are characters remaining unparsed after an entry has been looked up, this may be considered an invalid lookup, or those characters may be passed back to the caller and the lookup successful. - @param path A C-string path. - @param plane The plane to lookup up the path, or zero, in which case the path must begin with the plane name. - @param residualPath If the path may contain residual characters after the last path component, the residual will be copied back to the caller's residualPath buffer. If there are residual characters and no residual buffer is specified, fromPath will fail. - @param residualLength An in/out parameter - the caller sets the length of the residual buffer available, and fromPath returns the total length of the residual path copied to the buffer. If there is no residualBuffer (residualPath = 0) then residualLength may be zero also. - @param fromEntry The lookup will proceed rooted at this entry if non-zero, otherwise it proceeds from the root of the plane. - @result A retained registry entry is returned on success, or zero on failure. The caller should release the entry. */ - - static IORegistryEntry * fromPath( const char * path, - const IORegistryPlane * plane = 0, - char * residualPath = 0, - int * residualLength = 0, - IORegistryEntry * fromEntry = 0 ); - -/*! @function fromPath - @abstract Looks up a registry entry by relative path. - @discussion This function looks up a entry below the called entry by a relative path. It is just a convenience that calls IORegistryEntry::fromPath with this as the fromEntry parameter. - @param path See IORegistryEntry::fromPath. - @param plane See IORegistryEntry::fromPath. - @param residualPath See IORegistryEntry::fromPath. - @param residualLength See IORegistryEntry::fromPath. - @result See IORegistryEntry::fromPath. */ - - virtual IORegistryEntry * childFromPath( const char * path, - const IORegistryPlane * plane = 0, - char * residualPath = 0, - int * residualLength = 0 ); - -/*! @function dealiasPath - @abstract Strips any aliases from the head of path and returns the full path. - @discussion If the path specified begins with an alias found in the /aliases entry, the value of the alias is returned, and a pointer into the passed in path after the alias is passed back to the caller. If an alias is not found, zero is returned and the path parameter is unchanged. - @param opath An in/out paramter - the caller passes in a pointer to a C-string pointer to a path. If an alias is found, dealiasPath returns a pointer into the path just beyond the end of the alias. - @param plane A plane object must be specified. - @result A C-string pointer to the value of the alias if one is found, or zero if not. */ - - static const char * dealiasPath( const char ** opath, - const IORegistryPlane * plane ); - -/*! @function makePlane - @abstract Constructs an IORegistryPlane object. - @discussion Most planes in IOKit are created by the OS, although other planes may be created. - @param name A C-string name for the new plane, to be copied. - @result A new instance of an IORegistryPlane, or zero on failure. */ - - static const IORegistryPlane * makePlane( const char * name ); - -/*! @abstract Returns an ID for the registry entry that is global to all tasks. - @discussion The entry ID returned by getRegistryEntryID can be used to identify a registry entry across all tasks. A registry entry may be looked up by its entry ID by creating a matching dictionary with IORegistryEntryIDMatching() in user space, or <code>IOService::registryEntryIDMatching()</code> in the kernel, to be used with the IOKit matching functions. The ID is valid only until the machine reboots. - @result An ID for the registry entry, assigned when the entry is first attached in the registry. */ - - uint64_t getRegistryEntryID( void ); - - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - /* * * * * * * * * * * * internals * * * * * * * * * * * */ - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - virtual bool init( IORegistryEntry * from, - const IORegistryPlane * inPlane ); - -private: - static IORegistryEntry * initialize( void ); - -private: - inline bool arrayMember( OSArray * set, - const IORegistryEntry * member, - unsigned int * index = 0 ) const; - - bool makeLink( IORegistryEntry * to, - unsigned int relation, - const IORegistryPlane * plane ) const; - void breakLink( IORegistryEntry * to, - unsigned int relation, - const IORegistryPlane * plane ) const; - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - OSArray * getParentSetReference( const IORegistryPlane * plane ) - const; - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - OSArray * getChildSetReference( const IORegistryPlane * plane ) - const; - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - IORegistryEntry * getChildFromComponent( const char ** path, - const IORegistryPlane * plane ); - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - const OSSymbol * hasAlias( const IORegistryPlane * plane, - char * opath = 0, int * length = 0 ) const; - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - const char * matchPathLocation( const char * cmp, - const IORegistryPlane * plane ); - -}; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/*! @class IORegistryIterator : public OSIterator - @abstract An iterator over the registry. - @discussion An iterator that can traverse the children or parents of a registry entry in a plane, and recurse. Access to the registry is protected against multiple threads, but an IORegistryIterator instance is for use by one thread only. */ - -class IORegistryIterator : public OSIterator -{ - OSDeclareAbstractStructors(IORegistryIterator) - -private: - struct IORegCursor { - IORegCursor * next; - IORegistryEntry * current; - OSIterator * iter; - }; - IORegCursor start; - IORegCursor * where; - IORegistryEntry * root; - OSOrderedSet * done; - const IORegistryPlane * plane; - IOOptionBits options; - - virtual void free( void ); - -public: -/*! @function iterateOver - @abstract Create an iterator rooted at a given registry entry. - @discussion This method creates an IORegistryIterator that is set up with options to iterate children or parents of a root entry, and to recurse automatically into entries as they are returned, or only when instructed. The iterator object keeps track of entries that have been recursed into previously to avoid loops. - @param start The root entry to begin the iteration at. - @param plane A plane object must be specified. - @param options kIORegistryIterateRecursively may be set to recurse automatically into each entry as it is returned. This option affects the behaviour of the getNextObject method, which is defined in the OSIterator superclass. Other methods will override this behaviour. kIORegistryIterateParents may be set to iterate the parents of each entry, by default the children are iterated. - @result A created IORegistryIterator instance, to be released by the caller when it has finished with it. */ - - static IORegistryIterator * iterateOver( IORegistryEntry * start, - const IORegistryPlane * plane, - IOOptionBits options = 0 ); - -/*! @function iterateOver - @abstract Create an iterator rooted at the registry root. - @discussion This method creates an IORegistryIterator that is set up with options to iterate children of the registry root entry, and to recurse automatically into entries as they are returned, or only when instructed. The iterator object keeps track of entries that have been recursed into previously to avoid loops. - @param plane A plane object must be specified. - @param options kIORegistryIterateRecursively may be set to recurse automatically into each entry as it is returned. This option affects the behaviour of the getNextObject method, which is defined in the OSIterator superclass. Other methods will override this behaviour. kIORegistryIterateParents may be set to iterate the parents of each entry, by default the children are iterated. - @result A created IORegistryIterator instance, to be released by the caller when it has finished with it. */ - - static IORegistryIterator * iterateOver( const IORegistryPlane * plane, - IOOptionBits options = 0 ); - -/*! @function getNextObject - @abstract Return the next object in the registry iteration. - @discussion This method calls either getNextObjectFlat or getNextObjectRecursive depending on the options the iterator was created with. This implements the OSIterator defined getNextObject method. The object returned is retained while the iterator is pointing at it (its the current entry), or recursing into it. The caller should not release it. - @result The next registry entry in the iteration (the current entry), or zero if the iteration has finished at this level of recursion. The entry returned is retained while the iterator is pointing at it (its the current entry), or recursing into it. The caller should not release it. */ - - virtual IORegistryEntry * getNextObject( void ); - -/*! @function getNextObjectFlat - @abstract Return the next object in the registry iteration, ignoring the kIORegistryIterateRecursively option. - @discussion This method returns the next child, or parent if the kIORegistryIterateParents option was used to create the iterator, of the current root entry. The object returned is retained while the iterator is pointing at it (its the current entry), or recursing into it. The caller should not release it. - @result The next registry entry in the iteration (the current entry), or zero if the iteration has finished at this level of recursion, or the iteration is invalid (see isValid). The entry returned is retained while the iterator is pointing at it (its the current entry), or recursing into it. The caller should not release it. */ - - virtual IORegistryEntry * getNextObjectFlat( void ); - -/*! @function getNextObjectRecursive - @abstract Return the next object in the registry iteration, and enter it. - @discussion If the iterator has a current entry, and the iterator has not already entered previously, enterEntry is called to recurse into it, ie. make it the new root, and the next child, or parent if the kIORegistryIterateParents option was used to create the iterator, at this new level of recursion is returned. If there is no current entry at this level of recursion, exitEntry is called and the process repeats, until the iteration returns to the entry the iterator was created with and zero is returned. The object returned is retained while the iterator is pointing at it (its the current entry), or recursing into it. The caller should not release it. - @result The next registry entry in the iteration (the current entry), or zero if its finished, or the iteration is invalid (see isValid). The entry returned is retained while the iterator is pointing at it (its the current entry), or recursing into it. The caller should not release it. */ - - virtual IORegistryEntry * getNextObjectRecursive( void ); - -/*! @function getCurrentEntry - @abstract Return the current entry in the registry iteration. - @discussion This method returns the current entry, last returned by getNextObject et al. The object returned is retained while the iterator is pointing at it (its the current entry), or recursing into it. The caller should not release it. If the iteration is no longer valid (see isValid), the current entry is zero. - @result The current registry entry in the iteration, or zero if the last iteration returned zero, or the iteration is invalid (see isValid). The entry returned is retained while the iterator is pointing at it (its the current entry), or recursing into it. The caller should not release it. */ - - virtual IORegistryEntry * getCurrentEntry( void ); - -/*! @function enterEntry - @abstract Recurse into the current entry in the registry iteration. - @discussion This method makes the current entry, ie. the last entry returned by getNextObject et al., the root in a new level of recursion. */ - - virtual void enterEntry( void ); - -/*! @function enterEntry - @abstract Recurse into the current entry in the registry iteration. - @discussion This method recurses into an entry as with enterEntry, but also switches from the current plane to a new one set by the caller. - @param plane The new plane to switch into. */ - - virtual void enterEntry( const IORegistryPlane * plane ); - -/*! @function exitEntry - @abstract Exits a level of recursion, restoring the current entry. - @discussion This method undoes an enterEntry, restoring the current entry. If there are no more levels of recursion to exit false is returned, otherwise true is returned. - @result true if a level of recursion was undone, false if no recursive levels are left in the iteration. */ - - virtual bool exitEntry( void ); - -/*! @function reset - @abstract Exits all levels of recursion, restoring the iterator to its state at creation. - @discussion This method exits all levels of recursion, and restores the iterator to its state at creation. */ - - virtual void reset( void ); - -/*! @function isValid - @abstract Checks that no registry changes have invalidated the iteration. - @discussion If a registry iteration is invalidated by changes to the registry, it will be made invalid, the currentEntry will be considered zero, and further calls to getNextObject et al. will return zero. The iterator should be reset to restart the iteration when this happens. - @result false if the iterator has been invalidated by changes to the registry, true otherwise. */ - - virtual bool isValid( void ); - -/*! @function iterateAll - @abstract Iterates all entries (with getNextObject) and returns a set of all returned entries. - @discussion This method will reset, then iterate all entries in the iteration (with getNextObject) until successful (ie. the iterator is valid at the end of the iteration). - @result A set of entries returned by the iteration. The caller should release the set when it has finished with it. Zero is returned on a resource failure. */ - - virtual OSOrderedSet * iterateAll( void ); -}; - -#endif /* _IOKIT_IOREGISTRYENTRY_H */ diff --git a/i386/include/IOKit/IOReturn.h b/i386/include/IOKit/IOReturn.h deleted file mode 100644 index 38811b6..0000000 --- a/i386/include/IOKit/IOReturn.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * HISTORY - */ - -/* - * Core IOReturn values. Others may be family defined. - */ - -#ifndef __IOKIT_IORETURN_H -#define __IOKIT_IORETURN_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <mach/error.h> - -typedef kern_return_t IOReturn; - -#ifndef sys_iokit -#define sys_iokit err_system(0x38) -#endif /* sys_iokit */ -#define sub_iokit_common err_sub(0) -#define sub_iokit_usb err_sub(1) -#define sub_iokit_firewire err_sub(2) -#define sub_iokit_block_storage err_sub(4) -#define sub_iokit_graphics err_sub(5) -#define sub_iokit_networking err_sub(6) -#define sub_iokit_bluetooth err_sub(8) -#define sub_iokit_pmu err_sub(9) -#define sub_iokit_acpi err_sub(10) -#define sub_iokit_smbus err_sub(11) -#define sub_iokit_ahci err_sub(12) -#define sub_iokit_powermanagement err_sub(13) -//#define sub_iokit_hidsystem err_sub(14) -#define sub_iokit_scsi err_sub(16) -//#define sub_iokit_pccard err_sub(21) - -#define sub_iokit_vendor_specific err_sub(-2) -#define sub_iokit_reserved err_sub(-1) - -#define iokit_common_err(return) (sys_iokit|sub_iokit_common|return) -#define iokit_family_err(sub,return) (sys_iokit|sub|return) -#define iokit_vendor_specific_err(return) (sys_iokit|sub_iokit_vendor_specific|return) - -#define kIOReturnSuccess KERN_SUCCESS // OK -#define kIOReturnError iokit_common_err(0x2bc) // general error -#define kIOReturnNoMemory iokit_common_err(0x2bd) // can't allocate memory -#define kIOReturnNoResources iokit_common_err(0x2be) // resource shortage -#define kIOReturnIPCError iokit_common_err(0x2bf) // error during IPC -#define kIOReturnNoDevice iokit_common_err(0x2c0) // no such device -#define kIOReturnNotPrivileged iokit_common_err(0x2c1) // privilege violation -#define kIOReturnBadArgument iokit_common_err(0x2c2) // invalid argument -#define kIOReturnLockedRead iokit_common_err(0x2c3) // device read locked -#define kIOReturnLockedWrite iokit_common_err(0x2c4) // device write locked -#define kIOReturnExclusiveAccess iokit_common_err(0x2c5) // exclusive access and - // device already open -#define kIOReturnBadMessageID iokit_common_err(0x2c6) // sent/received messages - // had different msg_id -#define kIOReturnUnsupported iokit_common_err(0x2c7) // unsupported function -#define kIOReturnVMError iokit_common_err(0x2c8) // misc. VM failure -#define kIOReturnInternalError iokit_common_err(0x2c9) // internal error -#define kIOReturnIOError iokit_common_err(0x2ca) // General I/O error -//#define kIOReturn???Error iokit_common_err(0x2cb) // ??? -#define kIOReturnCannotLock iokit_common_err(0x2cc) // can't acquire lock -#define kIOReturnNotOpen iokit_common_err(0x2cd) // device not open -#define kIOReturnNotReadable iokit_common_err(0x2ce) // read not supported -#define kIOReturnNotWritable iokit_common_err(0x2cf) // write not supported -#define kIOReturnNotAligned iokit_common_err(0x2d0) // alignment error -#define kIOReturnBadMedia iokit_common_err(0x2d1) // Media Error -#define kIOReturnStillOpen iokit_common_err(0x2d2) // device(s) still open -#define kIOReturnRLDError iokit_common_err(0x2d3) // rld failure -#define kIOReturnDMAError iokit_common_err(0x2d4) // DMA failure -#define kIOReturnBusy iokit_common_err(0x2d5) // Device Busy -#define kIOReturnTimeout iokit_common_err(0x2d6) // I/O Timeout -#define kIOReturnOffline iokit_common_err(0x2d7) // device offline -#define kIOReturnNotReady iokit_common_err(0x2d8) // not ready -#define kIOReturnNotAttached iokit_common_err(0x2d9) // device not attached -#define kIOReturnNoChannels iokit_common_err(0x2da) // no DMA channels left -#define kIOReturnNoSpace iokit_common_err(0x2db) // no space for data -//#define kIOReturn???Error iokit_common_err(0x2dc) // ??? -#define kIOReturnPortExists iokit_common_err(0x2dd) // port already exists -#define kIOReturnCannotWire iokit_common_err(0x2de) // can't wire down - // physical memory -#define kIOReturnNoInterrupt iokit_common_err(0x2df) // no interrupt attached -#define kIOReturnNoFrames iokit_common_err(0x2e0) // no DMA frames enqueued -#define kIOReturnMessageTooLarge iokit_common_err(0x2e1) // oversized msg received - // on interrupt port -#define kIOReturnNotPermitted iokit_common_err(0x2e2) // not permitted -#define kIOReturnNoPower iokit_common_err(0x2e3) // no power to device -#define kIOReturnNoMedia iokit_common_err(0x2e4) // media not present -#define kIOReturnUnformattedMedia iokit_common_err(0x2e5)// media not formatted -#define kIOReturnUnsupportedMode iokit_common_err(0x2e6) // no such mode -#define kIOReturnUnderrun iokit_common_err(0x2e7) // data underrun -#define kIOReturnOverrun iokit_common_err(0x2e8) // data overrun -#define kIOReturnDeviceError iokit_common_err(0x2e9) // the device is not working properly! -#define kIOReturnNoCompletion iokit_common_err(0x2ea) // a completion routine is required -#define kIOReturnAborted iokit_common_err(0x2eb) // operation aborted -#define kIOReturnNoBandwidth iokit_common_err(0x2ec) // bus bandwidth would be exceeded -#define kIOReturnNotResponding iokit_common_err(0x2ed) // device not responding -#define kIOReturnIsoTooOld iokit_common_err(0x2ee) // isochronous I/O request for distant past! -#define kIOReturnIsoTooNew iokit_common_err(0x2ef) // isochronous I/O request for distant future -#define kIOReturnNotFound iokit_common_err(0x2f0) // data was not found -#define kIOReturnInvalid iokit_common_err(0x1) // should never be seen - -#ifdef __cplusplus -} -#endif - -#endif /* ! __IOKIT_IORETURN_H */ diff --git a/i386/include/IOKit/IOService.h b/i386/include/IOKit/IOService.h deleted file mode 100644 index a965ea1..0000000 --- a/i386/include/IOKit/IOService.h +++ /dev/null @@ -1,1690 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998,1999 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ -/*! - @header - This header contains the definition of the IOService class. IOService is the sole direct subclass of IORegistryEntry and is the base class of almost all I/O Kit family superclasses. IOService defines methods that support the life cycle of I/O Kit drivers. For more information on IOService, see {@linkdoc //apple_ref/doc/uid/TP0000011 I/O Kit Fundamentals}. - - @seealso //apple_ref/doc/header/IORegistryEntry.h IORegistryEntry -*/ - -#ifndef _IOKIT_IOSERVICE_H -#define _IOKIT_IOSERVICE_H - -#include <IOKit/IORegistryEntry.h> -#include <IOKit/IOReturn.h> -#include <IOKit/IODeviceMemory.h> -#include <IOKit/IONotifier.h> -#include <IOKit/IOLocks.h> - -#include <IOKit/IOKitDebug.h> -#include <IOKit/IOInterrupts.h> - -#include <IOKit/pwr_mgt/IOPMpowerState.h> -#include <IOKit/IOServicePM.h> - -extern "C" { -#include <kern/thread_call.h> -} - -#ifndef UINT64_MAX -#define UINT64_MAX 18446744073709551615ULL -#endif - -enum { - kIODefaultProbeScore = 0 -}; - -// masks for getState() -enum { - kIOServiceInactiveState = 0x00000001, - kIOServiceRegisteredState = 0x00000002, - kIOServiceMatchedState = 0x00000004, - kIOServiceFirstPublishState = 0x00000008, - kIOServiceFirstMatchState = 0x00000010 -}; - -enum { - // options for registerService() - kIOServiceExclusive = 0x00000001, - - // options for terminate() - kIOServiceRequired = 0x00000001, - kIOServiceTerminate = 0x00000004, - - // options for registerService() & terminate() - kIOServiceSynchronous = 0x00000002, - // options for registerService() - kIOServiceAsynchronous = 0x00000008 -}; - -// options for open() -enum { - kIOServiceSeize = 0x00000001, - kIOServiceFamilyOpenOptions = 0xffff0000 -}; - -// options for close() -enum { - kIOServiceFamilyCloseOptions = 0xffff0000 -}; - -typedef void * IONotificationRef; - -extern const IORegistryPlane * gIOServicePlane; -extern const IORegistryPlane * gIOPowerPlane; - -extern const OSSymbol * gIOResourcesKey; -extern const OSSymbol * gIOResourceMatchKey; -extern const OSSymbol * gIOProviderClassKey; -extern const OSSymbol * gIONameMatchKey; -extern const OSSymbol * gIONameMatchedKey; -extern const OSSymbol * gIOPropertyMatchKey; -extern const OSSymbol * gIOLocationMatchKey; -extern const OSSymbol * gIOParentMatchKey; -extern const OSSymbol * gIOPathMatchKey; -extern const OSSymbol * gIOMatchCategoryKey; -extern const OSSymbol * gIODefaultMatchCategoryKey; -extern const OSSymbol * gIOMatchedServiceCountKey; - -extern const OSSymbol * gIOUserClientClassKey; -extern const OSSymbol * gIOKitDebugKey; -extern const OSSymbol * gIOServiceKey; - -extern const OSSymbol * gIOCommandPoolSizeKey; - -extern const OSSymbol * gIOPublishNotification; -extern const OSSymbol * gIOFirstPublishNotification; -extern const OSSymbol * gIOMatchedNotification; -extern const OSSymbol * gIOFirstMatchNotification; -extern const OSSymbol * gIOTerminatedNotification; - -extern const OSSymbol * gIOGeneralInterest; -extern const OSSymbol * gIOBusyInterest; -extern const OSSymbol * gIOOpenInterest; -extern const OSSymbol * gIOAppPowerStateInterest; -extern const OSSymbol * gIOPriorityPowerStateInterest; - -extern const OSSymbol * gIODeviceMemoryKey; -extern const OSSymbol * gIOInterruptControllersKey; -extern const OSSymbol * gIOInterruptSpecifiersKey; - -extern SInt32 IOServiceOrdering( const OSMetaClassBase * inObj1, const OSMetaClassBase * inObj2, void * ref ); - -typedef void (*IOInterruptAction)( OSObject * target, void * refCon, - IOService * nub, int source ); - -/*! @typedef IOServiceNotificationHandler - @param target Reference supplied when the notification was registered. - @param refCon Reference constant supplied when the notification was registered. - @param newService The IOService object the notification is delivering. It is retained for the duration of the handler's invocation and doesn't need to be released by the handler. */ - -typedef bool (*IOServiceNotificationHandler)( void * target, void * refCon, - IOService * newService ); - -typedef bool (*IOServiceMatchingNotificationHandler)( void * target, void * refCon, - IOService * newService, - IONotifier * notifier ); - -/*! @typedef IOServiceInterestHandler - @param target Reference supplied when the notification was registered. - @param refCon Reference constant supplied when the notification was registered. - @param messageType Type of the message - IOKit defined in IOKit/IOMessage.h or family specific. - @param provider The IOService object who is delivering the notification. It is retained for the duration of the handler's invocation and doesn't need to be released by the handler. - @param messageArgument An argument for message, dependent on its type. - @param argSize Non zero if the argument represents a struct of that size, used when delivering messages outside the kernel. */ - -typedef IOReturn (*IOServiceInterestHandler)( void * target, void * refCon, - UInt32 messageType, IOService * provider, - void * messageArgument, vm_size_t argSize ); - -typedef void (*IOServiceApplierFunction)(IOService * service, void * context); -typedef void (*OSObjectApplierFunction)(OSObject * object, void * context); - -class IOUserClient; -class IOPlatformExpert; - -/*! @class IOService - @abstract The base class for most I/O Kit families, devices, and drivers. - @discussion The IOService base class defines APIs used to publish services, instantiate other services based on the existance of a providing service (ie. driver stacking), destroy a service and its dependent stack, notify interested parties of service state changes, and general utility functions useful across all families. - -Types of service are specified with a matching dictionary that describes properties of the service. For example, a matching dictionary might describe any IOUSBDevice (or subclass), an IOUSBDevice with a certain class code, or a IOPCIDevice with a set of OpenFirmware matching names or device & vendor IDs. Since the matching dictionary is interpreted by the family which created the service, as well as generically by IOService, the list of properties considered for matching depends on the familiy. - -Matching dictionaries are associated with IOService classes by the catalogue, as driver property tables, and also supplied by clients of the notification APIs. - -IOService provides matching based on C++ class (via OSMetaClass dynamic casting), registry entry name, a registry path to the service (which includes OpenFirmware paths), a name assigned by BSD, or by its location (its point of attachment). - -<br><br>Driver Instantiation by IOService<br><br> - -Drivers are subclasses of IOService, and their availability is managed through the catalogue. They are instantiated based on the publication of an IOService they use (for example, an IOPCIDevice or IOUSBDevice), or when they are added to the catalogue and the IOService(s) they use are already available. - -When an IOService (the "provider") is published with the @link registerService registerService@/link method, the matching and probing process begins, which is always single threaded per provider. A list of matching dictionaries from the catalog and installed publish notification requests, that successfully match the IOService, is constructed, with ordering supplied by <code>kIOProbeScoreKey</code> ("IOProbeScore") property in the dictionary, or supplied with the notification. - -Each entry in the list is then processed in order - for notifications, the notification is delivered, for driver property tables a lot more happens. - -The driver class is instantiated and <code>init()</code> called with its property table. The new driver instance is then attached to the provider, and has its @link probe probe@/link method called with the provider as an argument. The default <code>probe</code> method does nothing but return success, but a driver may implement this method to interrogate the provider to make sure it can work with it. It may also modify its probe score at this time. After probe, the driver is detached and the next in the list is considered (ie. attached, probed, and detached). - -When the probing phase is complete, the list consists of successfully probed drivers, in order of their probe score (after adjustment during the @link probe probe@/link call). The list is then divided into categories based on the <code>kIOMatchCategoryKey</code> property ("IOMatchCategory"); drivers without a match category are all considered in one default category. Match categories allow multiple clients of a provider to be attached and started, though the provider may also enforce open/close semantics to gain active access to it. - -For each category, the highest scoring driver in that category is attached to the provider, and its @link start start@/link method called. If <code>start</code> is successful, the rest of the drivers in the same match category are discarded, otherwise the next highest scoring driver is started, and so on. - -The driver should only consider itself in action when the start method is called, meaning it has been selected for use on the provider, and consuming that particular match category. It should also be prepared to be allocated, probed and freed even if the probe was successful. - -After the drivers have all synchronously been started, the installed "matched" notifications that match the registered IOService are delivered. - -<br><br>Properties used by IOService<br><br> - - <code>kIOClassKey, extern const OSSymbol * gIOClassKey, "IOClass"</code> -<br> -<br> -Class of the driver to instantiate on matching providers. -<br> -<br> - <code>kIOProviderClassKey, extern const OSSymbol * gIOProviderClassKey, "IOProviderClass"</code> -<br> -<br> -Class of the provider(s) to be considered for matching, checked with OSDynamicCast so subclasses will also match. -<br> -<br> - <code>kIOProbeScoreKey, extern const OSSymbol * gIOProbeScoreKey, "IOProbeScore"</code> -<br> -<br> -The probe score initially used to order multiple matching drivers. -<br> -<br> - <code>kIOMatchCategoryKey, extern const OSSymbol * gIOMatchCategoryKey, "IOMatchCategory"</code> -<br> -<br> -A string defining the driver category for matching purposes. All drivers with no <code>IOMatchCategory</code> property are considered to be in the same default category. Only one driver in a category can be started on each provider. -<br> -<br> - <code>kIONameMatchKey, extern const OSSymbol * gIONameMatchKey, "IONameMatch"</code> -<br> -A string or collection of strings that match the provider's name. The comparison is implemented with the @link //apple_ref/cpp/instm/IORegistryEntry/compareNames/virtualbool/(OSObject*,OSString**) IORegistryEntry::compareNames@/link method, which supports a single string, or any collection (OSArray, OSSet, OSDictionary etc.) of strings. IOService objects with OpenFirmware device tree properties (eg. IOPCIDevice) will also be matched based on that standard's "compatible", "name", "device_type" properties. The matching name will be left in the driver's property table in the <code>kIONameMatchedKey</code> property. -<br> -Examples -<pre> -@textblock - <key>IONameMatch</key> - <string>pci106b,7</string> -@/textblock -</pre> - -For a list of possible matching names, a serialized array of strings should used, eg. -<pre> -@textblock - <key>IONameMatch</key> - <array> - <string>APPL,happy16</string> - <string>pci106b,7</string> - </array> -@/textblock -</pre> - -<br> - <code>kIONameMatchedKey, extern const OSSymbol * gIONameMatchedKey, "IONameMatched"</code> -<br> -The name successfully matched name from the <code>kIONameMatchKey</code> property will be left in the driver's property table as the <code>kIONameMatchedKey</code> property. -<br> -<br> - <code>kIOPropertyMatchKey, extern const OSSymbol * gIOPropertyMatchKey, "IOPropertyMatch"</code> -<br> -A dictionary of properties that each must exist in the matching IOService and compare successfully with the <code>isEqualTo</code> method. - -<pre> -@textblock - <key>IOPropertyMatch</key> - <dictionary> - <key>APPL,happy16</key> - <string>APPL,meek8</string> - </dictionary> -@/textblock -</pre> - -<br> - <code>kIOUserClientClassKey, extern const OSSymbol * gIOUserClientClassKey, "IOUserClientClass"</code> -<br> -The class name that the service will attempt to allocate when a user client connection is requested. First the device nub is queried, then the nub's provider is queried by default. -<br> -<br> - <code>kIOKitDebugKey, extern const OSSymbol * gIOKitDebugKey, "IOKitDebug"</code> -<br> -Set some debug flags for logging the driver loading process. Flags are defined in <code>IOKit/IOKitDebug.h</code>, but <code>65535</code> works well.*/ - -class IOService : public IORegistryEntry -{ - OSDeclareDefaultStructors(IOService) - -protected: -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of this class in the future. - */ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * reserved; - -private: - IOService * __provider; - SInt32 __providerGeneration; - IOService * __owner; - IOOptionBits __state[2]; - uint64_t __timeBusy; - uint64_t __accumBusy; - IOServicePM * pwrMgt; - -protected: - // TRUE once PMinit has been called - bool initialized; - -public: - // DEPRECATED - void * pm_vars; - -public: - /* methods available in Mac OS X 10.1 or later */ -/*! @function requestTerminate - @abstract Passes a termination up the stack. - @discussion When an IOService is made inactive the default behavior is to also make any of its clients that have it as their only provider also inactive, in this way recursing the termination up the driver stack. This method allows an IOService object to override this behavior. Returning <code>true</code> from this method when passed a just terminated provider will cause the client to also be terminated. - @param provider The terminated provider of this object. - @param options Options originally passed to terminate, plus <code>kIOServiceRecursing</code>. - @result <code>true</code> if this object should be terminated now that its provider has been. */ - - virtual bool requestTerminate( IOService * provider, IOOptionBits options ); - -/*! @function willTerminate - @abstract Passes a termination up the stack. - @discussion Notification that a provider has been terminated, sent before recursing up the stack, in root-to-leaf order. - @param provider The terminated provider of this object. - @param options Options originally passed to terminate. - @result <code>true</code>. */ - - virtual bool willTerminate( IOService * provider, IOOptionBits options ); - -/*! @function didTerminate - @abstract Passes a termination up the stack. - @discussion Notification that a provider has been terminated, sent after recursing up the stack, in leaf-to-root order. - @param provider The terminated provider of this object. - @param options Options originally passed to terminate. - @param defer If there is pending I/O that requires this object to persist, and the provider is not opened by this object set <code>defer</code> to <code>true</code> and call the <code>IOService::didTerminate()</code> implementation when the I/O completes. Otherwise, leave <code>defer</code> set to its default value of <code>false</code>. - @result <code>true</code>. */ - - virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer ); - -/*! @function nextIdleTimeout - @availability Mac OS X v10.4 and later - @abstract Allows subclasses to customize idle power management behavior. - @discussion Returns the next time that the device should idle into its next lower power state. Subclasses may override for custom idle behavior. - - A power managed driver might override this method to provide a more sophisticated idle power off algorithm than the one defined by power management. - @param currentTime The current time - @param lastActivity The time of last activity on this device - @param powerState The device's current power state. - @result Returns the next time the device should idle off (in seconds, relative to the current time). */ - - virtual SInt32 nextIdleTimeout(AbsoluteTime currentTime, - AbsoluteTime lastActivity, unsigned int powerState); - -/*! @function systemWillShutdown - @availability Mac OS X v10.5 and later - @abstract Notifies members of the power plane of system shutdown and restart. - @discussion This function is called for all members of the power plane in leaf-to-root order. If a subclass needs to wait for a pending I/O, then the call to <code>systemWillShutdown</code> should be postponed until the I/O completes. - - Any power managed driver (which has called @link joinPMtree joinPMtree@/link to join the power plane) interested in taking action at system shutdown or restart should override this method. - @param specifier <code>kIOMessageSystemWillPowerOff</code> or <code>kIOMessageSystemWillRestart</code>. */ - - virtual void systemWillShutdown( IOOptionBits specifier ); - -/*! @function copyClientWithCategory - @availability Mac OS X v10.6 and later - @param category An OSSymbol corresponding to an IOMatchCategory matching property. - @result Returns a reference to the IOService child with the given category. The result should be released by the caller. -*/ - - virtual IOService * copyClientWithCategory( const OSSymbol * category ); - -private: -#if __LP64__ - OSMetaClassDeclareReservedUnused(IOService, 0); - OSMetaClassDeclareReservedUnused(IOService, 1); - OSMetaClassDeclareReservedUnused(IOService, 2); - OSMetaClassDeclareReservedUnused(IOService, 3); - OSMetaClassDeclareReservedUnused(IOService, 4); - OSMetaClassDeclareReservedUnused(IOService, 5); -#else - OSMetaClassDeclareReservedUsed(IOService, 0); - OSMetaClassDeclareReservedUsed(IOService, 1); - OSMetaClassDeclareReservedUsed(IOService, 2); - OSMetaClassDeclareReservedUsed(IOService, 3); - OSMetaClassDeclareReservedUsed(IOService, 4); - OSMetaClassDeclareReservedUsed(IOService, 5); -#endif - - OSMetaClassDeclareReservedUnused(IOService, 6); - OSMetaClassDeclareReservedUnused(IOService, 7); - OSMetaClassDeclareReservedUnused(IOService, 8); - OSMetaClassDeclareReservedUnused(IOService, 9); - OSMetaClassDeclareReservedUnused(IOService, 10); - OSMetaClassDeclareReservedUnused(IOService, 11); - OSMetaClassDeclareReservedUnused(IOService, 12); - OSMetaClassDeclareReservedUnused(IOService, 13); - OSMetaClassDeclareReservedUnused(IOService, 14); - OSMetaClassDeclareReservedUnused(IOService, 15); - OSMetaClassDeclareReservedUnused(IOService, 16); - OSMetaClassDeclareReservedUnused(IOService, 17); - OSMetaClassDeclareReservedUnused(IOService, 18); - OSMetaClassDeclareReservedUnused(IOService, 19); - OSMetaClassDeclareReservedUnused(IOService, 20); - OSMetaClassDeclareReservedUnused(IOService, 21); - OSMetaClassDeclareReservedUnused(IOService, 22); - OSMetaClassDeclareReservedUnused(IOService, 23); - OSMetaClassDeclareReservedUnused(IOService, 24); - OSMetaClassDeclareReservedUnused(IOService, 25); - OSMetaClassDeclareReservedUnused(IOService, 26); - OSMetaClassDeclareReservedUnused(IOService, 27); - OSMetaClassDeclareReservedUnused(IOService, 28); - OSMetaClassDeclareReservedUnused(IOService, 29); - OSMetaClassDeclareReservedUnused(IOService, 30); - OSMetaClassDeclareReservedUnused(IOService, 31); - OSMetaClassDeclareReservedUnused(IOService, 32); - OSMetaClassDeclareReservedUnused(IOService, 33); - OSMetaClassDeclareReservedUnused(IOService, 34); - OSMetaClassDeclareReservedUnused(IOService, 35); - OSMetaClassDeclareReservedUnused(IOService, 36); - OSMetaClassDeclareReservedUnused(IOService, 37); - OSMetaClassDeclareReservedUnused(IOService, 38); - OSMetaClassDeclareReservedUnused(IOService, 39); - OSMetaClassDeclareReservedUnused(IOService, 40); - OSMetaClassDeclareReservedUnused(IOService, 41); - OSMetaClassDeclareReservedUnused(IOService, 42); - OSMetaClassDeclareReservedUnused(IOService, 43); - OSMetaClassDeclareReservedUnused(IOService, 44); - OSMetaClassDeclareReservedUnused(IOService, 45); - OSMetaClassDeclareReservedUnused(IOService, 46); - OSMetaClassDeclareReservedUnused(IOService, 47); - -#ifdef __ppc__ - OSMetaClassDeclareReservedUnused(IOService, 48); - OSMetaClassDeclareReservedUnused(IOService, 49); - OSMetaClassDeclareReservedUnused(IOService, 50); - OSMetaClassDeclareReservedUnused(IOService, 51); - OSMetaClassDeclareReservedUnused(IOService, 52); - OSMetaClassDeclareReservedUnused(IOService, 53); - OSMetaClassDeclareReservedUnused(IOService, 54); - OSMetaClassDeclareReservedUnused(IOService, 55); - OSMetaClassDeclareReservedUnused(IOService, 56); - OSMetaClassDeclareReservedUnused(IOService, 57); - OSMetaClassDeclareReservedUnused(IOService, 58); - OSMetaClassDeclareReservedUnused(IOService, 59); - OSMetaClassDeclareReservedUnused(IOService, 60); - OSMetaClassDeclareReservedUnused(IOService, 61); - OSMetaClassDeclareReservedUnused(IOService, 62); - OSMetaClassDeclareReservedUnused(IOService, 63); -#endif - -public: -/*! @function getState - @abstract Accessor for IOService state bits, not normally needed or used outside IOService. - @result State bits for the IOService, eg. <code>kIOServiceInactiveState</code>, <code>kIOServiceRegisteredState</code>. */ - - virtual IOOptionBits getState( void ) const; - -/*! @function isInactive - @abstract Checks if the IOService object has been terminated, and is in the process of being destroyed. - @discussion When an IOService object is successfully terminated, it is immediately made inactive, which blocks further attach()es, matching or notifications occuring on the object. It remains inactive until the last client closes, and is then finalized and destroyed. - @result <code>true</code> if the IOService object has been terminated. */ - - bool isInactive( void ) const; - - /* Stack creation */ - -/*! @function registerService - @abstract Starts the registration process for a newly discovered IOService object. - @discussion This function allows an IOService subclass to be published and made available to possible clients, by starting the registration process and delivering notifications to registered clients. The object should be completely setup and ready to field requests from clients before <code>registerService</code> is called. - @param options The default zero options mask is recommended and should be used in most cases. The registration process is usually asynchronous, with possible driver probing and notification occurring some time later. <code>kIOServiceSynchronous</code> may be passed to carry out the matching and notification process for currently registered clients before returning to the caller. */ - - virtual void registerService( IOOptionBits options = 0 ); - -/*! @function probe - @abstract During an IOService object's instantiation, probes a matched service to see if it can be used. - @discussion The registration process for an IOService object (the provider) includes instantiating possible driver clients. The <code>probe</code> method is called in the client instance to check the matched service can be used before the driver is considered to be started. Since matching screens many possible providers, in many cases the <code>probe</code> method can be left unimplemented by IOService subclasses. The client is already attached to the provider when <code>probe</code> is called. - @param provider The registered IOService object that matches a driver personality's matching dictionary. - @param score Pointer to the current driver's probe score, which is used to order multiple matching drivers in the same match category. It defaults to the value of the <code>IOProbeScore</code> property in the drivers property table, or <code>kIODefaultProbeScore</code> if none is specified. The <code>probe</code> method may alter the score to affect start order. - @result An IOService instance or zero when the probe is unsuccessful. In almost all cases the value of <code>this</code> is returned on success. If another IOService object is returned, the probed instance is detached and freed, and the returned instance is used in its stead for <code>start</code>. */ - - virtual IOService * probe( IOService * provider, - SInt32 * score ); - -/*! @function start - @abstract During an IOService object's instantiation, starts the IOService object that has been selected to run on the provider. - @discussion The <code>start</code> method of an IOService instance is called by its provider when it has been selected (due to its probe score and match category) as the winning client. The client is already attached to the provider when <code>start</code> is called.<br>Implementations of <code>start</code> must call <code>start</code> on their superclass at an appropriate point. If an implementation of <code>start</code> has already called <code>super::start</code> but subsequently determines that it will fail, it must call <code>super::stop</code> to balance the prior call to <code>super::start</code> and prevent reference leaks. - @result <code>true</code> if the start was successful; <code>false</code> otherwise (which will cause the instance to be detached and usually freed). */ - - virtual bool start( IOService * provider ); - -/*! @function stop - @abstract During an IOService termination, the stop method is called in its clients before they are detached & it is destroyed. - @discussion The termination process for an IOService (the provider) will call stop in each of its clients, after they have closed the provider if they had it open, or immediately on termination. */ - - virtual void stop( IOService * provider ); - - /* Open / Close */ - -/*! @function open - @abstract Requests active access to a provider. - @discussion IOService provides generic open and close semantics to track clients of a provider that have established an active datapath. The use of <code>open</code> and @link close close@/link, and rules regarding ownership are family defined, and defined by the @link handleOpen handleOpen@/link and @link handleClose handleClose@/link methods in the provider. Some families will limit access to a provider based on its open state. - @param forClient Designates the client of the provider requesting the open. - @param options Options for the open. The provider family may implement options for open; IOService defines only <code>kIOServiceSeize</code> to request the device be withdrawn from its current owner. - @result <code>true</code> if the open was successful; <code>false</code> otherwise. */ - - virtual bool open( IOService * forClient, - IOOptionBits options = 0, - void * arg = 0 ); - -/*! @function close - @abstract Releases active access to a provider. - @discussion IOService provides generic open and close semantics to track clients of a provider that have established an active datapath. The use of @link open open@/link and <code>close</code>, and rules regarding ownership are family defined, and defined by the @link handleOpen handleOpen@/link and @link handleClose handleClose@/link methods in the provider. - @param forClient Designates the client of the provider requesting the close. - @param options Options available for the close. The provider family may implement options for close; IOService defines none. - @param arg Family specific arguments which are ignored by IOService. */ - - virtual void close( IOService * forClient, - IOOptionBits options = 0 ); - -/*! @function isOpen - @abstract Determines whether a specific, or any, client has an IOService object open. - @discussion Returns the open state of an IOService object with respect to the specified client, or when it is open by any client. - @param forClient If non-zero, <codeisOpen</code returns the open state for that client. If zero is passed, <codeisOpen</code returns the open state for all clients. - @result <codetrue</code if the specific, or any, client has the IOService object open. */ - - virtual bool isOpen( const IOService * forClient = 0 ) const; - -/*! @function handleOpen - @abstract Controls the open / close behavior of an IOService object (overrideable by subclasses). - @discussion IOService calls this method in its subclasses in response to the @link open open@/link method, so the subclass may implement the request. The default implementation provides single owner access to an IOService object via <code>open</code>. The object is locked via @link lockForArbitration lockForArbitration@/link before <code>handleOpen</code> is called. - @param forClient Designates the client of the provider requesting the open. - @param options Options for the open, may be interpreted by the implementor of <code>handleOpen</code>. - @result <code>true</code>if the open was successful; <code>false</code> otherwise. */ - - virtual bool handleOpen( IOService * forClient, - IOOptionBits options, - void * arg ); - -/*! @function handleClose - @abstract Controls the open / close behavior of an IOService object (overrideable by subclasses). - @discussion IOService calls this method in its subclasses in response to the @link close close@/link method, so the subclass may implement the request. The default implementation provides single owner access to an IOService object via @link open open@/link. The object is locked via @link lockForArbitration lockForArbitration@/link before <code>handleClose</code> is called. - @param forClient Designates the client of the provider requesting the close. - @param options Options for the close, may be interpreted by the implementor of @link handleOpen handleOpen@/link. */ - - virtual void handleClose( IOService * forClient, - IOOptionBits options ); - -/*! @function handleIsOpen - @abstract Controls the open / close behavior of an IOService object (overrideable by subclasses). - @discussion IOService calls this method in its subclasses in response to the @link open open@/link method, so the subclass may implement the request. The default implementation provides single owner access to an IOService object via @link open open@/link. The object is locked via @link lockForArbitration lockForArbitration@/link before <code>handleIsOpen</code> is called. - @param forClient If non-zero, <code>isOpen</code> returns the open state for that client. If zero is passed, <code>isOpen</code> returns the open state for all clients. - @result <code>true</code> if the specific, or any, client has the IOService object open. */ - - virtual bool handleIsOpen( const IOService * forClient ) const; - - /* Stacking change */ - -/*! @function terminate - @abstract Makes an IOService object inactive and begins its destruction. - @discussion Registering an IOService object informs possible clients of its existance and instantiates drivers that may be used with it; <code>terminate</code> involves the opposite process of informing clients that an IOService object is no longer able to be used and will be destroyed. By default, if any client has the service open, <code>terminate</code> fails. If the <code>kIOServiceRequired</code> flag is passed however, <code>terminate</code> will be successful though further progress in the destruction of the IOService object will not proceed until the last client has closed it. The service will be made inactive immediately upon successful termination, and all its clients will be notified via their @link message message@/link method with a message of type <code>kIOMessageServiceIsTerminated</code>. Both these actions take place on the caller's thread. After the IOService object is made inactive, further matching or attach calls will fail on it. Each client has its @link stop stop@/link method called upon their close of an inactive IOService object , or on its termination if they do not have it open. After <code>stop</code>, @link detach detach@/link is called in each client. When all clients have been detached, the @link finalize finalize@/link method is called in the inactive service. The termination process is inherently asynchronous because it will be deferred until all clients have chosen to close. - @param options In most cases no options are needed. <code>kIOServiceSynchronous</code> may be passed to cause <code>terminate</code> to not return until the service is finalized. */ - - virtual bool terminate( IOOptionBits options = 0 ); - -/*! @function finalize - @abstract Finalizes the destruction of an IOService object. - @discussion The <code>finalize</code> method is called in an inactive (ie. terminated) IOService object after the last client has detached. IOService's implementation will call @link stop stop@/link, @link close close@/link, and @link detach detach@/link on each provider. When <code>finalize</code> returns, the object's retain count will have no references generated by IOService's registration process. - @param options The options passed to the @link terminate terminate@/link method of the IOService object are passed on to <code>finalize</code>. - @result <code>true</code>. */ - - virtual bool finalize( IOOptionBits options ); - -/*! @function free - @abstract Frees data structures that were allocated when power management was initialized on this service. */ - - virtual void free( void ); - -/*! @function lockForArbitration - @abstract Locks an IOService object against changes in state or ownership. - @discussion The registration, termination and open / close functions of IOService use <code>lockForArbtration</code> to single-thread access to an IOService object. <code>lockForArbitration</code> grants recursive access to the same thread. - @param isSuccessRequired If a request for access to an IOService object should be denied if it is terminated, pass <code>false</code>, otherwise pass <code>true</code>. */ - - virtual bool lockForArbitration( bool isSuccessRequired = true ); - -/*! @function unlockForArbitration - @abstract Unlocks an IOService obkect after a successful @link lockForArbitration lockForArbitration@/link. - @discussion A thread granted exclusive access to an IOService object should release it with <code>unlockForArbitration</code>. */ - - virtual void unlockForArbitration( void ); - -/*! @function terminateClient - @abstract Passes a termination up the stack. - @discussion When an IOService object is made inactive the default behavior is to also make any of its clients that have it as their only provider inactive, in this way recursing the termination up the driver stack. This method allows a terminated IOService object to override this behavior. Note the client may also override this behavior by overriding its @link terminate terminate@/link method. - @param client The client of the terminated provider. - @param options Options originally passed to @link terminate terminate@/link, plus <code>kIOServiceRecursing</code>. - @result result of the terminate request on the client. */ - - virtual bool terminateClient( IOService * client, IOOptionBits options ); - - /* Busy state indicates discovery, matching or termination is in progress */ - -/*! @function getBusyState - @abstract Returns the <code>busyState</code> of an IOService object. - @discussion Many activities in IOService are asynchronous. When registration, matching, or termination is in progress on an IOService object, its <code>busyState</code> is increased by one. Change in <code>busyState</code> to or from zero also changes the IOService object's provider's <code>busyState</code> by one, which means that an IOService object is marked busy when any of the above activities is ocurring on it or any of its clients. - @result The <code>busyState</code> value. */ - - virtual UInt32 getBusyState( void ); - -/*! @function adjustBusy - @abstract Adjusts the <code>busyState</code> of an IOService object. - @discussion Applies a delta to an IOService object's <code>busyState</code>. A change in the <code>busyState</code> to or from zero will change the IOService object's provider's <code>busyState</code> by one (in the same direction). - @param delta The delta to be applied to the IOService object's <code>busyState</code>. */ - - virtual void adjustBusy( SInt32 delta ); - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - IOReturn waitQuiet(mach_timespec_t * timeout) - APPLE_KEXT_DEPRECATED; - -/*! @function waitQuiet - @abstract Waits for an IOService object's <code>busyState</code> to be zero. - @discussion Blocks the caller until an IOService object is non busy. - @param timeout The maximum time to wait in nanoseconds. Default is to wait forever. - @result Returns an error code if Mach synchronization primitives fail, <code>kIOReturnTimeout</code>, or <code>kIOReturnSuccess</code>. */ - - IOReturn waitQuiet(uint64_t timeout = UINT64_MAX); - - /* Matching */ - -/*! @function matchPropertyTable - @abstract Allows a registered IOService object to implement family specific matching. - @discussion All matching on an IOService object will call this method to allow a family writer to implement matching in addition to the generic methods provided by IOService. The implementer should examine the matching dictionary passed to see if it contains properties the family understands for matching, and use them to match with the IOService object if so. Note that since matching is also carried out by other parts of the I/O Kit, the matching dictionary may contain properties the family does not understand - these should not be considered matching failures. - @param table The dictionary of properties to be matched against. - @param score Pointer to the current driver's probe score, which is used to order multiple matching drivers in the same match category. It defaults to the value of the <code>IOProbeScore</code> property in the drivers property table, or <code>kIODefaultProbeScore</code> if none is specified. - @result <code>false</code> if the family considers the matching dictionary does not match in properties it understands; <code>true</code> otherwise. */ - - virtual bool matchPropertyTable( OSDictionary * table, - SInt32 * score ); - - virtual bool matchPropertyTable( OSDictionary * table ); - -/*! @function matchLocation - @abstract Allows a registered IOService object to direct location matching. - @discussion By default, a location matching property will be applied to an IOService object's provider. This method allows that behavior to be overridden by families. - @param client The IOService object at which matching is taking place. - @result Returns the IOService instance to be used for location matching. */ - - virtual IOService * matchLocation( IOService * client ); - - /* Resource service */ - -/*! @function publishResource - @abstract Uses the resource service to publish a property. - @discussion The resource service uses IOService's matching and notification to allow objects to be published and found by any I/O Kit client by a global name. <code>publishResource</code> makes an object available to anyone waiting for it or looking for it in the future. - @param key An OSSymbol key that globally identifies the object. - @param The object to be published. */ - - static void publishResource( const OSSymbol * key, OSObject * value = 0 ); - -/*! @function publishResource - @abstract Uses the resource service to publish a property. - @discussion The resource service uses IOService object's matching and notification to allow objects to be published and found by any I/O Kit client by a global name. <code>publishResource</code> makes an object available to anyone waiting for it or looking for it in the future. - @param key A C string key that globally identifies the object. - @param The object to be published. */ - - static void publishResource( const char * key, OSObject * value = 0 ); - virtual bool addNeededResource( const char * key ); - - /* Notifications */ - -/*! @function addNotification - @abstract Deprecated use addMatchingNotification(). Adds a persistant notification handler to be notified of IOService events. - @discussion IOService will deliver notifications of changes in state of an IOService object to registered clients. The type of notification is specified by a symbol, for example <code>gIOMatchedNotification</code> or <code>gIOTerminatedNotification</code>, and notifications will only include IOService objects that match the supplied matching dictionary. Notifications are ordered by a priority set with <code>addNotification</code>. When the notification is installed, its handler will be called with each of any currently existing IOService objects that are in the correct state (eg. registered) and match the supplied matching dictionary, avoiding races between finding preexisting and new IOService events. The notification request is identified by an instance of an IONotifier object, through which it can be enabled, disabled, or removed. <code>addNotification</code> consumes a retain count on the matching dictionary when the notification is removed. - @param type An OSSymbol identifying the type of notification and IOService state: -<br> <code>gIOPublishNotification</code> Delivered when an IOService object is registered. -<br> <code>gIOFirstPublishNotification</code> Delivered when an IOService object is registered, but only once per IOService instance. Some IOService objects may be reregistered when their state is changed. -<br> <code>gIOMatchedNotification</code> Delivered when an IOService object has been matched with all client drivers, and they have been probed and started. -<br> <code>gIOFirstMatchNotification</code> Delivered when an IOService object has been matched with all client drivers, but only once per IOService instance. Some IOService objects may be reregistered when their state is changed. -<br> <code>gIOTerminatedNotification</code> Delivered after an IOService object has been terminated, during its finalize stage. - @param matching A matching dictionary to restrict notifications to only matching IOService objects. The dictionary will be released when the notification is removed, consuming the passed-in reference. - @param handler A C function callback to deliver notifications. - @param target An instance reference for the callback's use. - @param ref A reference constant for the callback's use. - @param priority A constant ordering all notifications of a each type. - @result An instance of an IONotifier object that can be used to control or destroy the notification request. */ - - static IONotifier * addNotification( - const OSSymbol * type, OSDictionary * matching, - IOServiceNotificationHandler handler, - void * target, void * ref = 0, - SInt32 priority = 0 ) - APPLE_KEXT_DEPRECATED; - -/*! @function addMatchingNotification - @abstract Adds a persistant notification handler to be notified of IOService events. - @discussion IOService will deliver notifications of changes in state of an IOService object to registered clients. The type of notification is specified by a symbol, for example <code>gIOMatchedNotification</code> or <code>gIOTerminatedNotification</code>, and notifications will only include IOService objects that match the supplied matching dictionary. Notifications are ordered by a priority set with <code>addNotification</code>. When the notification is installed, its handler will be called with each of any currently existing IOService objects that are in the correct state (eg. registered) and match the supplied matching dictionary, avoiding races between finding preexisting and new IOService events. The notification request is identified by an instance of an IONotifier object, through which it can be enabled, disabled, or removed. <code>addMatchingNotification</code> does not consume a reference on the matching dictionary when the notification is removed, unlike addNotification. - @param type An OSSymbol identifying the type of notification and IOService state: -<br> <code>gIOPublishNotification</code> Delivered when an IOService object is registered. -<br> <code>gIOFirstPublishNotification</code> Delivered when an IOService object is registered, but only once per IOService instance. Some IOService objects may be reregistered when their state is changed. -<br> <code>gIOMatchedNotification</code> Delivered when an IOService object has been matched with all client drivers, and they have been probed and started. -<br> <code>gIOFirstMatchNotification</code> Delivered when an IOService object has been matched with all client drivers, but only once per IOService instance. Some IOService objects may be reregistered when their state is changed. -<br> <code>gIOTerminatedNotification</code> Delivered after an IOService object has been terminated, during its finalize stage. - @param matching A matching dictionary to restrict notifications to only matching IOService objects. The dictionary is retained while the notification is installed. (Differs from addNotification). - @param handler A C function callback to deliver notifications. - @param target An instance reference for the callback's use. - @param ref A reference constant for the callback's use. - @param priority A constant ordering all notifications of a each type. - @result An instance of an IONotifier object that can be used to control or destroy the notification request. */ - - static IONotifier * addMatchingNotification( - const OSSymbol * type, OSDictionary * matching, - IOServiceMatchingNotificationHandler handler, - void * target, void * ref = 0, - SInt32 priority = 0 ); - -/*! @function waitForService - @abstract Deprecated use waitForMatchingService(). Waits for a matching to service to be published. - @discussion Provides a method of waiting for an IOService object matching the supplied matching dictionary to be registered and fully matched. - @param matching The matching dictionary describing the desired IOService object. <code>waitForService</code> consumes one reference of the matching dictionary. - @param timeout The maximum time to wait. - @result A published IOService object matching the supplied dictionary. */ - - static IOService * waitForService( OSDictionary * matching, - mach_timespec_t * timeout = 0); - -/*! @function waitForMatchingService - @abstract Waits for a matching to service to be published. - @discussion Provides a method of waiting for an IOService object matching the supplied matching dictionary to be registered and fully matched. - @param matching The matching dictionary describing the desired IOService object. (Does not consume a reference of the matching dictionary - differs from waitForService() which does consume a reference on the matching dictionary.) - @param timeout The maximum time to wait in nanoseconds. Default is to wait forever. - @result A published IOService object matching the supplied dictionary. waitForMatchingService returns a reference to the IOService which should be released by the caller. (Differs from waitForService() which does not retain the returned object.) */ - - static IOService * waitForMatchingService( OSDictionary * matching, - uint64_t timeout = UINT64_MAX); - -/*! @function getMatchingServices - @abstract Finds the set of current published IOService objects matching a matching dictionary. - @discussion Provides a method of finding the current set of published IOService objects matching the supplied matching dictionary. - @param matching The matching dictionary describing the desired IOService objects. - @result An instance of an iterator over a set of IOService objects. To be released by the caller. */ - - static OSIterator * getMatchingServices( OSDictionary * matching ); - -public: - /* Helpers to make matching dictionaries for simple cases, - * they add keys to an existing dictionary, or create one. */ - -/*! @function serviceMatching - @abstract Creates a matching dictionary, or adds matching properties to an existing dictionary, that specify an IOService class match. - @discussion A very common matching criteria for IOService object is based on its class. <code>serviceMatching</code> creates a matching dictionary that specifies any IOService object of a class, or its subclasses. The class is specified by name, and an existing dictionary may be passed in, in which case the matching properties will be added to that dictionary rather than creating a new one. - @param className The class name, as a const C string. Class matching is successful on IOService objects of this class or any subclass. - @param table If zero, <code>serviceMatching</code> creates a matching dictionary and returns a reference to it, otherwise the matching properties are added to the specified dictionary. - @result The matching dictionary created, or passed in, is returned on success, or zero on failure. */ - - static OSDictionary * serviceMatching( const char * className, - OSDictionary * table = 0 ); - -/*! @function serviceMatching - @abstract Creates a matching dictionary, or adds matching properties to an existing dictionary, that specify an IOService class match. - @discussion A very common matching criteria for IOService object is based on its class. <code>serviceMatching</code> creates a matching dictionary that specifies any IOService of a class, or its subclasses. The class is specified by name, and an existing dictionary may be passed in, in which case the matching properties will be added to that dictionary rather than creating a new one. - @param className The class name, as an OSString (which includes OSSymbol). Class matching is successful on IOService objects of this class or any subclass. - @param table If zero, <code>serviceMatching</code> creates a matching dictionary and returns a reference to it, otherwise the matching properties are added to the specified dictionary. - @result The matching dictionary created, or passed in, is returned on success, or zero on failure. */ - - static OSDictionary * serviceMatching( const OSString * className, - OSDictionary * table = 0 ); - -/*! @function nameMatching - @abstract Creates a matching dictionary, or adds matching properties to an existing dictionary, that specify an IOService name match. - @discussion A very common matching criteria for IOService object is based on its name. <code>nameMatching</code> creates a matching dictionary that specifies any IOService object which responds successfully to the @link //apple_ref/cpp/instm/IORegistryEntry/compareName/virtualbool/(OSString*,OSString**) IORegistryEntry::compareName@/link method. An existing dictionary may be passed in, in which case the matching properties will be added to that dictionary rather than creating a new one. - @param name The service's name, as a const C string. Name matching is successful on IOService objects that respond successfully to the <code>IORegistryEntry::compareName</code> method. - @param table If zero, <code>nameMatching</code> creates a matching dictionary and returns a reference to it, otherwise the matching properties are added to the specified dictionary. - @result The matching dictionary created, or passed in, is returned on success, or zero on failure. */ - - static OSDictionary * nameMatching( const char * name, - OSDictionary * table = 0 ); - -/*! @function nameMatching - @abstract Creates a matching dictionary, or adds matching properties to an existing dictionary, that specify an IOService name match. - @discussion A very common matching criteria for IOService object is based on its name. <code>nameMatching</code> creates a matching dictionary that specifies any IOService object which responds successfully to the @link //apple_ref/cpp/instm/IORegistryEntry/compareName/virtualbool/(OSString*,OSString**) IORegistryEntry::compareName@/link method. An existing dictionary may be passed in, in which case the matching properties will be added to that dictionary rather than creating a new one. - @param name The service's name, as an OSString (which includes OSSymbol). Name matching is successful on IOService objects that respond successfully to the <code>IORegistryEntry::compareName</code> method. - @param table If zero, <code>nameMatching</code> creates a matching dictionary and returns a reference to it, otherwise the matching properties are added to the specified dictionary. - @result The matching dictionary created, or passed in, is returned on success, or zero on failure. */ - - static OSDictionary * nameMatching( const OSString* name, - OSDictionary * table = 0 ); - -/*! @function resourceMatching - @abstract Creates a matching dictionary, or adds matching properties to an existing dictionary, that specify a resource service match. - @discussion IOService maintains a resource service IOResources that allows objects to be published and found globally in the I/O Kit based on a name, using the standard IOService matching and notification calls. - @param name The resource name, as a const C string. Resource matching is successful when an object by that name has been published with the <code>publishResource</code> method. - @param table If zero, <code>resourceMatching</code> creates a matching dictionary and returns a reference to it, otherwise the matching properties are added to the specified dictionary. - @result The matching dictionary created, or passed in, is returned on success, or zero on failure. */ - - static OSDictionary * resourceMatching( const char * name, - OSDictionary * table = 0 ); - -/*! @function resourceMatching - @abstract Creates a matching dictionary, or adds matching properties to an existing dictionary, that specify a resource service match. - @discussion IOService maintains a resource service IOResources that allows objects to be published and found globally in the I/O Kit based on a name, using the standard IOService matching and notification calls. - @param name The resource name, as an OSString (which includes OSSymbol). Resource matching is successful when an object by that name has been published with the <code>publishResource</code> method. - @param table If zero, <code>resourceMatching</code> creates a matching dictionary and returns a reference to it, otherwise the matching properties are added to the specified dictionary. - @result The matching dictionary created, or passed in, is returned on success, or zero on failure. */ - - static OSDictionary * resourceMatching( const OSString * name, - OSDictionary * table = 0 ); - - -/*! @function propertyMatching - @abstract Creates a matching dictionary, or adds matching properties to an existing dictionary, that specify an IOService phandle match. - @discussion TODO A very common matching criteria for IOService is based on its name. nameMatching will create a matching dictionary that specifies any IOService which respond successfully to the IORegistryEntry method compareName. An existing dictionary may be passed in, in which case the matching properties will be added to that dictionary rather than creating a new one. - @param key The service's phandle, as a const UInt32. PHandle matching is successful on IOService objects that respond successfully to the IORegistryEntry method compareName. - @param value The service's phandle, as a const UInt32. PHandle matching is successful on IOService's which respond successfully to the IORegistryEntry method compareName. - @param table If zero, nameMatching will create a matching dictionary and return a reference to it, otherwise the matching properties are added to the specified dictionary. - @result The matching dictionary created, or passed in, is returned on success, or zero on failure. */ - - static OSDictionary * propertyMatching( const OSSymbol * key, const OSObject * value, - OSDictionary * table = 0 ); - -/*! @function registryEntryIDMatching - @abstract Creates a matching dictionary, or adds matching properties to an existing dictionary, that specify a IORegistryEntryID match. - @discussion <code>registryEntryIDMatching</code> creates a matching dictionary that specifies the IOService object with the assigned registry entry ID (returned by <code>IORegistryEntry::getRegistryEntryID()</code>). An existing dictionary may be passed in, in which case the matching properties will be added to that dictionary rather than creating a new one. - @param name The service's ID. Matching is successful on the IOService object that return that ID from the <code>IORegistryEntry::getRegistryEntryID()</code> method. - @param table If zero, <code>registryEntryIDMatching</code> creates a matching dictionary and returns a reference to it, otherwise the matching properties are added to the specified dictionary. - @result The matching dictionary created, or passed in, is returned on success, or zero on failure. */ - - static OSDictionary * registryEntryIDMatching( uint64_t entryID, - OSDictionary * table = 0 ); - - -/*! @function addLocation - @abstract Adds a location matching property to an existing dictionary. - @discussion This function creates matching properties that specify the location of a IOService object, as an embedded matching dictionary. This matching will be successful on an IOService object that attached to an IOService object which matches this location matching dictionary. - @param table The matching properties are added to the specified dictionary, which must be non-zero. - @result The location matching dictionary created is returned on success, or zero on failure. */ - - static OSDictionary * addLocation( OSDictionary * table ); - - /* Helpers for matching dictionaries. */ - -/*! @function compareProperty - @abstract Compares a property in a matching dictionary with an IOService object's property table. - @discussion This is a helper function to aid in implementing @link matchPropertyTable matchPropertyTable@/link. If the property specified by <code>key</code> exists in the matching dictionary, it is compared with a property of the same name in the IOService object's property table. The comparison is performed with the <code>isEqualTo</code> method. If the property does not exist in the matching table, success is returned. If the property exists in the matching dictionary but not the IOService property table, failure is returned. - @param matching The matching dictionary, which must be non-zero. - @param key The dictionary key specifying the property to be compared, as a C string. - @result <code>true</code> if the property does not exist in the matching table. If the property exists in the matching dictionary but not the IOService property table, failure is returned. Otherwise the result of calling the property from the matching dictionary's <code>isEqualTo</code> method with the IOService property as an argument is returned. */ - - virtual bool compareProperty( OSDictionary * matching, - const char * key ); -/*! @function compareProperty - @abstract Compares a property in a matching dictionary with an IOService object's property table. - @discussion This is a helper function to aid in implementing @link matchPropertyTable matchPropertyTable@/link. If the property specified by <code>key</code> exists in the matching dictionary, it is compared with a property of the same name in the IOService object's property table. The comparison is performed with the <code>isEqualTo</code> method. If the property does not exist in the matching table, success is returned. If the property exists in the matching dictionary but not the IOService property table, failure is returned. - @param matching The matching dictionary, which must be non-zero. - @param key The dictionary key specifying the property to be compared, as an OSString (which includes OSSymbol). - @result <code>true</code> if the property does not exist in the matching table. If the property exists in the matching dictionary but not the IOService property table, failure is returned. Otherwise the result of calling the property from the matching dictionary's <code>isEqualTo</code> method with the IOService property as an argument is returned. */ - - virtual bool compareProperty( OSDictionary * matching, - const OSString * key ); - -/*! @function compareProperties - @abstract Compares a set of properties in a matching dictionary with an IOService object's property table. - @discussion This is a helper function to aid in implementing @link matchPropertyTable matchPropertyTable@/link. A collection of dictionary keys specifies properties in a matching dictionary to be compared, with <code>compareProperty</code>, with an IOService object's property table, if <code>compareProperty</code> returns <code>true</code> for each key, success is returned; otherwise failure. - @param matching The matching dictionary, which must be non-zero. - @param keys A collection (eg. OSSet, OSArray, OSDictionary) which should contain OSStrings (or OSSymbols) that specify the property keys to be compared. - @result Success if <code>compareProperty</code> returns <code>true</code> for each key in the collection; otherwise failure. */ - - virtual bool compareProperties( OSDictionary * matching, - OSCollection * keys ); - - /* Client / provider accessors */ - -/*! @function attach - @abstract Attaches an IOService client to a provider in the I/O Registry. - @discussion This function called in an IOService client enters the client into the I/O Registry as a child of the provider in the service plane. The provider must be active or the attach will fail. Multiple attach calls to the same provider are no-ops and return success. A client may be attached to multiple providers. Entering an object into the I/O Registry retains both the client and provider until they are detached. - @param provider The IOService object which will serve as this object's provider. - @result <code>false</code> if the provider is inactive or on a resource failure; otherwise <code>true</code>. */ - - virtual bool attach( IOService * provider ); - -/*! @function detach - @abstract Detaches an IOService client from a provider in the I/O Registry. - @discussion This function called in an IOService client removes the client as a child of the provider in the service plane of the I/O Registry. If the provider is not a parent of the client this is a no-op, otherwise the I/O Registry releases both the client and provider. - @param provider The IOService object to detach from. */ - - virtual void detach( IOService * provider ); - -/*! @function getProvider - @abstract Returns an IOService object's primary provider. - @discussion This function called in an IOService client will return the provider to which it was first attached. Because the majority of IOService objects have only one provider, this is a useful simplification and also supports caching of the provider when the I/O Registry is unchanged. - @result The first provider of the client, or zero if the IOService object is not attached into the I/O Registry. The provider is retained while the client is attached, and should not be released by the caller. */ - - virtual IOService * getProvider( void ) const; - -/*! @function getWorkLoop - @abstract Returns the current work loop or <code>provider->getWorkLoop</code>. - @discussion This function returns a valid work loop that a client can use to add an IOCommandGate to. The intention is that an IOService client has data that needs to be protected but doesn't want to pay the cost of a dedicated thread. This data has to be accessed from a provider's call-out context as well. So to achieve both of these goals the client creates an IOCommandGate to lock access to his data but he registers it with the provider's work loop, i.e. the work loop which will make the completion call-outs. This avoids a potential deadlock because the work loop gate uses a recursive lock, which allows the same lock to be held multiple times by a single thread. - @result A work loop, either the current work loop or it walks up the @link getProvider getProvider@/link chain calling <code>getWorkLoop</code>. Eventually it will reach a valid work loop-based driver or the root of the I/O tree, where it will return a system-wide work loop. Returns 0 if it fails to find (or create) a work loop.*/ - - virtual IOWorkLoop * getWorkLoop() const; - -/*! @function getProviderIterator - @abstract Returns an iterator over an IOService object's providers. - @discussion For those few IOService objects that obtain service from multiple providers, this method supplies an iterator over a client's providers. - @result An iterator over the providers of the client, or zero if there is a resource failure. The iterator must be released when the iteration is finished. All objects returned by the iteration are retained while the iterator is valid, though they may no longer be attached during the iteration. */ - - virtual OSIterator * getProviderIterator( void ) const; - -/*! @function getOpenProviderIterator - @abstract Returns an iterator over an client's providers that are currently opened by the client. - @discussion For those few IOService objects that obtain service from multiple providers, this method supplies an iterator over a client's providers, locking each in turn with @link lockForArbitration lockForArbitration@/link and returning those that have been opened by the client. - @result An iterator over the providers the client has open, or zero if there is a resource failure. The iterator must be released when the iteration is finished. All objects returned by the iteration are retained while the iterator is valid, and the current entry in the iteration is locked with <code>lockForArbitration</code>, protecting it from state changes. */ - - virtual OSIterator * getOpenProviderIterator( void ) const; - -/*! @function getClient - @abstract Returns an IOService object's primary client. - @discussion This function called in an IOService provider will return the first client to attach to it. For IOService objects which have only only one client, this may be a useful simplification. - @result The first client of the provider, or zero if the IOService object is not attached into the I/O Registry. The client is retained while it is attached, and should not be released by the caller. */ - - virtual IOService * getClient( void ) const; - -/*! @function getClientIterator - @abstract Returns an iterator over an IOService object's clients. - @discussion For IOService objects that may have multiple clients, this method supplies an iterator over a provider's clients. - @result An iterator over the clients of the provider, or zero if there is a resource failure. The iterator must be released when the iteration is finished. All objects returned by the iteration are retained while the iterator is valid, though they may no longer be attached during the iteration. */ - - virtual OSIterator * getClientIterator( void ) const; - -/*! @function getOpenClientIterator - @abstract Returns an iterator over a provider's clients that currently have opened the provider. - @discussion For IOService objects that may have multiple clients, this method supplies an iterator over a provider's clients, locking each in turn with @link lockForArbitration lockForArbitration@/link and returning those that have opened the provider. - @result An iterator over the clients that have opened the provider, or zero if there is a resource failure. The iterator must be released when the iteration is finished. All objects returned by the iteration are retained while the iterator is valid, and the current entry in the iteration is locked with <code>lockForArbitration</code>, protecting it from state changes. */ - - virtual OSIterator * getOpenClientIterator( void ) const; - -/*! @function callPlatformFunction - @abstract Calls the platform function with the given name. - @discussion The platform expert or other drivers may implement various functions to control hardware features. <code>callPlatformFunction</code> allows any IOService object to access these functions. Normally <code>callPlatformFunction</code> is called on a service's provider. The provider services the request or passes it to its provider. The system's IOPlatformExpert subclass catches functions it knows about and redirects them into other parts of the service plane. If the IOPlatformExpert subclass cannot execute the function, the base class is called. The IOPlatformExpert base class attempts to find a service to execute the function by looking up the function name in an IOResources name space. A service may publish a service using <code>publishResource(functionName, this)</code>. If no service can be found to execute the function an error is returned. - @param functionName Name of the function to be called. When <code>functionName</code> is a C string, <code>callPlatformFunction</code> converts the C string to an OSSymbol and calls the OSSymbol version of <code>callPlatformFunction</code>. This process can block and should not be used from an interrupt context. - @param waitForFunction If <code>true</code>, <code>callPlatformFunction</code> will not return until the function has been called. - @result An IOReturn code; <code>kIOReturnSuccess</code> if the function was successfully executed, <code>kIOReturnUnsupported</code> if a service to execute the function could not be found. Other return codes may be returned by the function.*/ - - virtual IOReturn callPlatformFunction( const OSSymbol * functionName, - bool waitForFunction, - void *param1, void *param2, - void *param3, void *param4 ); - - virtual IOReturn callPlatformFunction( const char * functionName, - bool waitForFunction, - void *param1, void *param2, - void *param3, void *param4 ); - - - /* Some accessors */ - -/*! @function getPlatform - @abstract Returns a pointer to the platform expert instance for the computer. - @discussion This method provides an accessor to the platform expert instance for the computer. - @result A pointer to the IOPlatformExport instance. It should not be released by the caller. */ - - static IOPlatformExpert * getPlatform( void ); - -/*! @function getPMRootDomain - @abstract Returns a pointer to the power management root domain instance for the computer. - @discussion This method provides an accessor to the power management root domain instance for the computer. - @result A pointer to the power management root domain instance. It should not be released by the caller. */ - - static class IOPMrootDomain * getPMRootDomain( void ); - -/*! @function getServiceRoot - @abstract Returns a pointer to the root of the service plane. - @discussion This method provides an accessor to the root of the service plane for the computer. - @result A pointer to the IOService instance at the root of the service plane. It should not be released by the caller. */ - - static IOService * getServiceRoot( void ); - -/*! @function getResourceService - @abstract Returns a pointer to the IOResources service. - @discussion IOService maintains a resource service IOResources that allows objects to be published and found globally in the I/O Kit based on a name, using the standard IOService matching and notification calls. - @result A pointer to the IOResources instance. It should not be released by the caller. */ - - static IOService * getResourceService( void ); - - /* Allocate resources for a matched service */ - -/*! @function getResources - @abstract Allocates any needed resources for a published IOService object before clients attach. - @discussion This method is called during the registration process for an IOService object if there are successful driver matches, before any clients attach. It allows for lazy allocation of resources to an IOService object when a matching driver is found. - @result An IOReturn code; <code>kIOReturnSuccess</code> is necessary for the IOService object to be successfully used, otherwise the registration process for the object is halted. */ - - virtual IOReturn getResources( void ); - - /* Device memory accessors */ - -/*! @function getDeviceMemoryCount - @abstract Returns a count of the physical memory ranges available for a device. - @discussion This method returns the count of physical memory ranges, each represented by an IODeviceMemory instance, that have been allocated for a memory mapped device. - @result An integer count of the number of ranges available. */ - - virtual IOItemCount getDeviceMemoryCount( void ); - -/*! @function getDeviceMemoryWithIndex - @abstract Returns an instance of IODeviceMemory representing one of a device's memory mapped ranges. - @discussion This method returns a pointer to an instance of IODeviceMemory for the physical memory range at the given index for a memory mapped device. - @param index An index into the array of ranges assigned to the device. - @result A pointer to an instance of IODeviceMemory, or zero if the index is beyond the count available. The IODeviceMemory is retained by the provider, so is valid while attached, or while any mappings to it exist. It should not be released by the caller. See also @link mapDeviceMemoryWithIndex mapDeviceMemoryWithIndex@/link, which creates a device memory mapping. */ - - virtual IODeviceMemory * getDeviceMemoryWithIndex( unsigned int index ); - -/*! @function mapDeviceMemoryWithIndex - @abstract Maps a physical range of a device. - @discussion This method creates a mapping for the IODeviceMemory at the given index, with <code>IODeviceMemory::map(options)</code>. The mapping is represented by the returned instance of IOMemoryMap, which should not be released until the mapping is no longer required. - @param index An index into the array of ranges assigned to the device. - @result An instance of IOMemoryMap, or zero if the index is beyond the count available. The mapping should be released only when access to it is no longer required. */ - - virtual IOMemoryMap * mapDeviceMemoryWithIndex( unsigned int index, - IOOptionBits options = 0 ); - -/*! @function getDeviceMemory - @abstract Returns the array of IODeviceMemory objects representing a device's memory mapped ranges. - @discussion This method returns an array of IODeviceMemory objects representing the physical memory ranges allocated to a memory mapped device. - @result An OSArray of IODeviceMemory objects, or zero if none are available. The array is retained by the provider, so is valid while attached. */ - - virtual OSArray * getDeviceMemory( void ); - -/*! @function setDeviceMemory - @abstract Sets the array of IODeviceMemory objects representing a device's memory mapped ranges. - @discussion This method sets an array of IODeviceMemory objects representing the physical memory ranges allocated to a memory mapped device. - @param array An OSArray of IODeviceMemory objects, or zero if none are available. The array will be retained by the object. */ - - virtual void setDeviceMemory( OSArray * array ); - - /* Interrupt accessors */ - -/*! @function registerInterrupt - @abstract Registers a C function interrupt handler for a device supplying interrupts. - @discussion This method installs a C function interrupt handler to be called at primary interrupt time for a device's interrupt. Only one handler may be installed per interrupt source. IOInterruptEventSource provides a work loop based abstraction for interrupt delivery that may be more appropriate for work loop based drivers. - @param source The index of the interrupt source in the device. - @param target An object instance to be passed to the interrupt handler. - @param handler The C function to be called at primary interrupt time when the interrupt occurs. The handler should process the interrupt by clearing the interrupt, or by disabling the source. - @param refCon A reference constant for the handler's use. - @result An IOReturn code.<br><code>kIOReturnNoInterrupt</code> is returned if the source is not valid; <code>kIOReturnNoResources</code> is returned if the interrupt already has an installed handler. */ - - virtual IOReturn registerInterrupt(int source, OSObject *target, - IOInterruptAction handler, - void *refCon = 0); - -/*! @function unregisterInterrupt - @abstract Removes a C function interrupt handler for a device supplying hardware interrupts. - @discussion This method removes a C function interrupt handler previously installed with @link registerInterrupt registerInterrupt@/link. - @param source The index of the interrupt source in the device. - @result An IOReturn code (<code>kIOReturnNoInterrupt</code> is returned if the source is not valid). */ - - virtual IOReturn unregisterInterrupt(int source); - -/*! @function getInterruptType - @abstract Returns the type of interrupt used for a device supplying hardware interrupts. - @param source The index of the interrupt source in the device. - @param interruptType The interrupt type for the interrupt source will be stored here by <code>getInterruptType</code>.<br> <code>kIOInterruptTypeEdge</code> will be returned for edge-trigggered sources.<br><code>kIOInterruptTypeLevel</code> will be returned for level-trigggered sources. - @result An IOReturn code (<code>kIOReturnNoInterrupt</code> is returned if the source is not valid). */ - - virtual IOReturn getInterruptType(int source, int *interruptType); - -/*! @function enableInterrupt - @abstract Enables a device interrupt. - @discussion It is the caller's responsiblity to keep track of the enable state of the interrupt source. - @param source The index of the interrupt source in the device. - @result An IOReturn code (<code>kIOReturnNoInterrupt</code> is returned if the source is not valid). */ - - virtual IOReturn enableInterrupt(int source); - -/*! @function disableInterrupt - @abstract Synchronously disables a device interrupt. - @discussion If the interrupt routine is running, the call will block until the routine completes. It is the caller's responsiblity to keep track of the enable state of the interrupt source. - @param source The index of the interrupt source in the device. - @result An IOReturn code (<code>kIOReturnNoInterrupt</code> is returned if the source is not valid). */ - - virtual IOReturn disableInterrupt(int source); - -/*! @function causeInterrupt - @abstract Causes a device interrupt to occur. - @discussion Emulates a hardware interrupt, to be called from task level. - @param source The index of the interrupt source in the device. - @result An IOReturn code (<code>kIOReturnNoInterrupt</code> is returned if the source is not valid). */ - - virtual IOReturn causeInterrupt(int source); - -/*! @function requestProbe - @abstract Requests that hardware be re-scanned for devices. - @discussion For bus families that do not usually detect device addition or removal, this method represents an external request (eg. from a utility application) to rescan and publish or remove found devices. - @param options Family defined options, not interpreted by IOService. - @result An IOReturn code. */ - - virtual IOReturn requestProbe( IOOptionBits options ); - - /* Generic API for non-data-path upstream calls */ - -/*! @function message - @abstract Receives a generic message delivered from an attached provider. - @discussion A provider may deliver messages via the <code>message</code> method to its clients informing them of state changes, such as <code>kIOMessageServiceIsTerminated</code> or <code>kIOMessageServiceIsSuspended</code>. Certain messages are defined by the I/O Kit in <code>IOMessage.h</code> while others may be family dependent. This method is implemented in the client to receive messages. - @param type A type defined in <code>IOMessage.h</code> or defined by the provider family. - @param provider The provider from which the message originates. - @param argument An argument defined by the provider family, not used by IOService. - @result An IOReturn code defined by the message type. */ - - virtual IOReturn message( UInt32 type, IOService * provider, - void * argument = 0 ); - -/*! @function messageClient - @abstract Sends a generic message to an attached client. - @discussion A provider may deliver messages via the @link message message@/link method to its clients informing them of state changes, such as <code>kIOMessageServiceIsTerminated</code> or <code>kIOMessageServiceIsSuspended</code>. Certain messages are defined by the I/O Kit in <code>IOMessage.h</code> while others may be family dependent. This method may be called in the provider to send a message to the specified client, which may be useful for overrides. - @param messageType A type defined in <code>IOMessage.h</code> or defined by the provider family. - @param client A client of the IOService to send the message. - @param messageArgument An argument defined by the provider family, not used by IOService. - @param argSize Specifies the size of messageArgument, in bytes. If argSize is non-zero, messageArgument is treated as a pointer to argSize bytes of data. If argSize is 0 (the default), messageArgument is treated as an ordinal and passed by value. - @result The return code from the client message call. */ - - virtual IOReturn messageClient( UInt32 messageType, OSObject * client, - void * messageArgument = 0, vm_size_t argSize = 0 ); - -/*! @function messageClients - @abstract Sends a generic message to all attached clients. - @discussion A provider may deliver messages via the @link message message@/link method to its clients informing them of state changes, such as <code>kIOMessageServiceIsTerminated</code> or <code>kIOMessageServiceIsSuspended</code>. Certain messages are defined by the I/O Kit in <code>IOMessage.h</code> while others may be family dependent. This method may be called in the provider to send a message to all the attached clients, via the @link messageClient messageClient@/link method. - @param type A type defined in <code>IOMessage.h</code> or defined by the provider family. - @param argument An argument defined by the provider family, not used by IOService. - @param argSize Specifies the size of argument, in bytes. If argSize is non-zero, argument is treated as a pointer to argSize bytes of data. If argSize is 0 (the default), argument is treated as an ordinal and passed by value. - @result Any non-<code>kIOReturnSuccess</code> return codes returned by the clients, or <code>kIOReturnSuccess</code> if all return <code>kIOReturnSuccess</code>. */ - - virtual IOReturn messageClients( UInt32 type, - void * argument = 0, vm_size_t argSize = 0 ); - - virtual IONotifier * registerInterest( const OSSymbol * typeOfInterest, - IOServiceInterestHandler handler, - void * target, void * ref = 0 ); - - virtual void applyToProviders( IOServiceApplierFunction applier, - void * context ); - - virtual void applyToClients( IOServiceApplierFunction applier, - void * context ); - - virtual void applyToInterested( const OSSymbol * typeOfInterest, - OSObjectApplierFunction applier, - void * context ); - - virtual IOReturn acknowledgeNotification( IONotificationRef notification, - IOOptionBits response ); - - /* User client create */ - -/*! @function newUserClient - @abstract Creates a connection for a non kernel client. - @discussion A non kernel client may request a connection be opened via the @link //apple_ref/c/func/IOServiceOpen IOServiceOpen@/link library function, which will call this method in an IOService object. The rules and capabilities of user level clients are family dependent, and use the functions of the IOUserClient class for support. IOService's implementation returns <code>kIOReturnUnsupported</code>, so any family supporting user clients must implement this method. - @param owningTask The Mach task of the client thread in the process of opening the user client. Note that in Mac OS X, each process is based on a Mach task and one or more Mach threads. For more information on the composition of a Mach task and its relationship with Mach threads, see {@linkdoc //apple_ref/doc/uid/TP30000905-CH209-TPXREF103 "Tasks and Threads"}. - @param securityID A token representing the access level for the task. - @param type A constant specifying the type of connection to be created, specified by the caller of @link //apple_ref/c/func/IOServiceOpen IOServiceOpen@/link and interpreted only by the family. - @param handler An instance of an IOUserClient object to represent the connection, which will be released when the connection is closed, or zero if the connection was not opened. - @param properties A dictionary of additional properties for the connection. - @result A return code to be passed back to the caller of <code>IOServiceOpen</code>. */ - - virtual IOReturn newUserClient( task_t owningTask, void * securityID, - UInt32 type, OSDictionary * properties, - IOUserClient ** handler ); - - virtual IOReturn newUserClient( task_t owningTask, void * securityID, - UInt32 type, IOUserClient ** handler ); - - /* Return code utilities */ - -/*! @function stringFromReturn - @abstract Supplies a programmer-friendly string from an IOReturn code. - @discussion Strings are available for the standard return codes in <code>IOReturn.h</code> in IOService, while subclasses may implement this method to interpret family dependent return codes. - @param rtn The IOReturn code. - @result A pointer to a constant string, or zero if the return code is unknown. */ - - virtual const char * stringFromReturn( IOReturn rtn ); - -/*! @function errnoFromReturn - @abstract Translates an IOReturn code to a BSD <code>errno</code>. - @discussion BSD defines its own return codes for its functions in <code>sys/errno.h</code>, and I/O Kit families may need to supply compliant results in BSD shims. Results are available for the standard return codes in <code>IOReturn.h</code> in IOService, while subclasses may implement this method to interpret family dependent return codes. - @param rtn The IOReturn code. - @result The BSD <code>errno</code> or <code>EIO</code> if unknown. */ - - virtual int errnoFromReturn( IOReturn rtn ); - - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - /* * * * * * * * * * end of IOService API * * * * * * * */ - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - /* for IOInterruptController implementors */ - - int _numInterruptSources; - IOInterruptSource *_interruptSources; - - /* overrides */ - virtual bool serializeProperties( OSSerialize * s ) const; - - void requireMaxBusStall(UInt32 ns); - void requireMaxInterruptDelay(uint32_t ns); - - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - /* * * * * * * * * * * * Internals * * * * * * * * * * * */ - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - -private: - APPLE_KEXT_COMPATIBILITY_VIRTUAL - bool checkResources( void ); - APPLE_KEXT_COMPATIBILITY_VIRTUAL - bool checkResource( OSObject * matching ); - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - void probeCandidates( OSOrderedSet * matches ); - APPLE_KEXT_COMPATIBILITY_VIRTUAL - bool startCandidate( IOService * candidate ); - -public: - APPLE_KEXT_COMPATIBILITY_VIRTUAL - IOService * getClientWithCategory( const OSSymbol * category ) - APPLE_KEXT_DEPRECATED; - // copyClientWithCategory is the public replacement - -private: - APPLE_KEXT_COMPATIBILITY_VIRTUAL - bool passiveMatch( OSDictionary * matching, bool changesOK = false); - APPLE_KEXT_COMPATIBILITY_VIRTUAL - void startMatching( IOOptionBits options = 0 ); - APPLE_KEXT_COMPATIBILITY_VIRTUAL - void doServiceMatch( IOOptionBits options ); - APPLE_KEXT_COMPATIBILITY_VIRTUAL - void doServiceTerminate( IOOptionBits options ); - -private: - static OSObject * copyExistingServices( OSDictionary * matching, - IOOptionBits inState, IOOptionBits options = 0 ); - - static IONotifier * setNotification( - const OSSymbol * type, OSDictionary * matching, - IOServiceMatchingNotificationHandler handler, - void * target, void * ref, - SInt32 priority = 0 ); - - static IONotifier * doInstallNotification( - const OSSymbol * type, OSDictionary * matching, - IOServiceMatchingNotificationHandler handler, - void * target, void * ref, - SInt32 priority, OSIterator ** existing ); - - static bool syncNotificationHandler( void * target, void * ref, - IOService * newService, IONotifier * notifier ); - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - void deliverNotification( const OSSymbol * type, - IOOptionBits orNewState, IOOptionBits andNewState ); - - bool invokeNotifer( class _IOServiceNotifier * notify ); - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - void unregisterAllInterest( void ); - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - IOReturn waitForState( UInt32 mask, UInt32 value, - mach_timespec_t * timeout = 0 ); - - IOReturn waitForState( UInt32 mask, UInt32 value, uint64_t timeout ); - - UInt32 _adjustBusy( SInt32 delta ); - - bool terminatePhase1( IOOptionBits options = 0 ); - void scheduleTerminatePhase2( IOOptionBits options = 0 ); - void scheduleStop( IOService * provider ); - void scheduleFinalize( void ); - static void terminateThread( void * arg, wait_result_t unused ); - static void terminateWorker( IOOptionBits options ); - static void actionWillTerminate( IOService * victim, IOOptionBits options, - OSArray * doPhase2List ); - static void actionDidTerminate( IOService * victim, IOOptionBits options ); - static void actionFinalize( IOService * victim, IOOptionBits options ); - static void actionStop( IOService * client, IOService * provider ); - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - IOReturn resolveInterrupt(IOService *nub, int source); - APPLE_KEXT_COMPATIBILITY_VIRTUAL - IOReturn lookupInterrupt(int source, bool resolve, IOInterruptController **interruptController); - - - /* power management */ -public: - -/*! @function PMinit - @abstract Initializes power management for a driver. - @discussion <code>PMinit</code> allocates and initializes the power management instance variables, and it should be called before accessing those variables or calling the power management methods. This method should be called inside the driver's <code>start</code> routine and must be paired with a call to @link PMstop PMstop@/link. - Most calls to <code>PMinit</code> are followed by calls to @link joinPMtree joinPMtree@/link and @link registerPowerDriver registerPowerDriver@/link. */ - - virtual void PMinit( void ); - -/*! @function PMstop - @abstract Frees and removes the driver from power management. - @discussion The power managment variables don't exist after this call and the power managment methods in the caller shouldn't be called. - Calling <code>PMstop</code> cleans up for the three power management initialization calls: @link PMinit PMinit@/link, @link joinPMtree joinPMtree@/link, and @link registerPowerDriver registerPowerDriver@/link. */ - - virtual void PMstop( void ); - -/*! @function joinPMtree - @abstract Joins the driver into the power plane of the I/O Registry. - @discussion A driver uses this method to call its nub when initializing (usually in its <code>start</code> routine after calling @link PMinit PMinit@/link), to be attached into the power management hierarchy (i.e., the power plane). A driver usually calls this method on the driver for the device that provides it power (this is frequently the nub). - Before this call returns, the caller will probably be called at @link setPowerParent setPowerParent@/link and @link setAggressiveness setAggressiveness@/link and possibly at @link addPowerChild addPowerChild@/link as it is added to the hierarchy. This method may be overridden by a nub subclass. - @param driver The driver to be added to the power plane, usually <code>this</code>. */ - - virtual void joinPMtree( IOService * driver ); - -/*! @function registerPowerDriver - @abstract Registers a set of power states that the driver supports. - @discussion A driver defines its array of supported power states with power management in its power management initialization (its <code>start</code> routine). If successful, power management will call the driver to instruct it to change its power state through @link setPowerState setPowerState@/link. - Most drivers do not need to override <code>registerPowerDriver</code>. A nub may override <code>registerPowerDriver</code> if it needs to arrange its children in the power plane differently than the default placement, but this is uncommon. - @param controllingDriver A pointer to the calling driver, usually <code>this</code>. - @param powerStates A driver-defined array of power states that the driver and device support. Power states are defined in <code>pwr_mgt/IOPMpowerState.h</code>. - @param numberOfStates The number of power states in the array. - @result </code>IOPMNoErr</code>. All errors are logged via <code>kprintf</code>. */ - - virtual IOReturn registerPowerDriver( - IOService * controllingDriver, - IOPMPowerState * powerStates, - unsigned long numberOfStates ); - -/*! @function registerInterestedDriver - @abstract Allows an IOService object to register interest in the changing power state of a power-managed IOService object. - @discussion Call <code>registerInterestedDriver</code> on the IOService object you are interested in receiving power state messages from, and pass a pointer to the interested driver (<code>this</code>) as an argument. - The interested driver should override @link powerStateWillChangeTo powerStateWillChangeTo@/link and @link powerStateDidChangeTo powerStateDidChangeTo@/link to receive these power change messages. - Interested drivers must acknowledge power changes in <code>powerStateWillChangeTo</code> or <code>powerStateDidChangeTo</code>, either via return value or later calls to @link acknowledgePowerChange acknowledgePowerChange@/link. - @param theDriver The driver of interest adds this pointer to the list of interested drivers. It informs drivers on this list before and after the power change. - @result Flags describing the capability of the device in its current power state. If the current power state is not yet defined, zero is returned (this is the case when the driver is not yet in the power domain hierarchy or hasn't fully registered with power management yet). */ - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - IOPMPowerFlags registerInterestedDriver( IOService * theDriver ); - -/*! @function deRegisterInterestedDriver - @abstract De-registers power state interest from a previous call to <code>registerInterestedDriver</code>. - @discussion Most drivers do not need to override <code>deRegisterInterestedDriver</code>. - @param theDriver The interested driver previously passed into @link registerInterestedDriver registerInterestedDriver@/link. - @result A return code that can be ignored by the caller. */ - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - IOReturn deRegisterInterestedDriver( IOService * theDriver ); - -/*! @function acknowledgePowerChange - @abstract Acknowledges an in-progress power state change. - @discussion When power management informs an interested object (via @link powerStateWillChangeTo powerStateWillChangeTo@/link or @link powerStateDidChangeTo powerStateDidChangeTo@/link), the object can return an immediate acknowledgement via a return code, or it may return an indication that it will acknowledge later by calling <code>acknowledgePowerChange</code>. - Interested objects are those that have registered as interested drivers, as well as power plane children of the power changing driver. A driver that calls @link registerInterestedDriver registerInterestedDriver@/link must call <code>acknowledgePowerChange</code>, or use an immediate acknowledgement return from <code>powerStateWillChangeTo</code> or <code>powerStateDidChangeTo</code>. - @param whichDriver A pointer to the calling driver. The called object tracks all interested parties to ensure that all have acknowledged the power state change. - @result <code>IOPMNoErr</code>. */ - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - IOReturn acknowledgePowerChange( IOService * whichDriver ); - -/*! @function acknowledgeSetPowerState - @abstract Acknowledges the belated completion of a driver's <code>setPowerState</code> power state change. - @discussion After power management instructs a driver to change its state via @link setPowerState setPowerState@/link, that driver must acknowledge the change when its device has completed its transition. The acknowledgement may be immediate, via a return code from <code>setPowerState</code>, or delayed, via this call to <code>acknowledgeSetPowerState</code>. - Any driver that does not return <code>kIOPMAckImplied</code> from its <code>setPowerState</code> implementation must later call <code>acknowledgeSetPowerState</code>. - @result <code>IOPMNoErr</code>. */ - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - IOReturn acknowledgeSetPowerState( void ); - -/*! @function requestPowerDomainState - @abstract Tells a driver to adjust its power state. - @discussion This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ - - virtual IOReturn requestPowerDomainState( - IOPMPowerFlags desiredState, - IOPowerConnection * whichChild, - unsigned long specificationFlags ); - -/*! @function makeUsable - @abstract Requests that a device become usable. - @discussion This method is called when some client of a device (or the device's own driver) is asking for the device to become usable. Power management responds by telling the object upon which this method is called to change to its highest power state. - <code>makeUsable</code> is implemented using @link changePowerStateToPriv changePowerStateToPriv@/link. Subsequent requests for lower power, such as from <code>changePowerStateToPriv</code>, will pre-empt this request. - @result A return code that can be ignored by the caller. */ - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - IOReturn makeUsable( void ); - -/*! @function temporaryPowerClampOn - @abstract A driver calls this method to hold itself in the highest power state until it has children. - @discussion Use <code>temporaryPowerClampOn</code> to hold your driver in its highest power state while waiting for child devices to attach. After children have attached, the clamp is released and the device's power state is controlled by the children's requirements. - @result A return code that can be ignored by the caller. */ - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - IOReturn temporaryPowerClampOn( void ); - -/*! @function changePowerStateTo - @abstract Sets a driver's power state. - @discussion This function is one of several that are used to set a driver's power state. In most circumstances, however, you should call @link changePowerStateToPriv changePowerStateToPriv@/link instead. - Calls to <code>changePowerStateTo</code>, <code>changePowerStateToPriv</code>, and a driver's power children all affect the power state of a driver. For legacy design reasons, they have overlapping functionality. Although you should call <code>changePowerStateToPriv</code> to change your device's power state, you might need to call <code>changePowerStateTo</code> in the following circumstances: - <ul><li>If a driver will be using <code>changePowerStateToPriv</code> to change its power state, it should call <code>changePowerStateTo(0)</code> in its <code>start</code> routine to eliminate the influence <code>changePowerStateTo</code> has on power state calculations. - <li>Call <code>changePowerStateTo</code> in conjunction with @link setIdleTimerPeriod setIdleTimerPeriod@/link and @link activityTickle activityTickle@/link to idle a driver into a low power state. For a driver with 3 power states, for example, <code>changePowerStateTo(1)</code> sets a minimum level of power state 1, such that the idle timer period may not set your device's power any lower than state 1.</ul> - @param ordinal The number of the desired power state in the power state array. - @result A return code that can be ignored by the caller. */ - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - IOReturn changePowerStateTo( unsigned long ordinal ); - -/*! @function currentCapability - @abstract Finds out the capability of a device's current power state. - @result A copy of the <code>capabilityFlags</code> field for the current power state in the power state array. */ - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - IOPMPowerFlags currentCapability( void ); - -/*! @function currentPowerConsumption - @abstract Finds out the current power consumption of a device. - @discussion Most Mac OS X power managed drivers do not report their power consumption via the <code>staticPower</code> field. Thus this call will not accurately reflect power consumption for most drivers. - @result A copy of the <code>staticPower</code> field for the current power state in the power state array. */ - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - unsigned long currentPowerConsumption( void ); - -/*! @function activityTickle - @abstract Informs power management when a power-managed device is in use, so that power management can track when it is idle and adjust its power state accordingly. - @discussion The <code>activityTickle</code> method is provided for objects in the system (or for the driver itself) to tell a driver that its device is being used. - The IOService superclass can manage idleness determination with a simple idle timer mechanism and this <code>activityTickle</code> call. To start this up, the driver calls its superclass's <code>setIdleTimerPeriod</code>. This starts a timer for the time interval specified in the call. When the timer expires, the superclass checks to see if there has been any activity since the last timer expiration. (It checks to see if <code>activityTickle</code> has been called). If there has been activity, it restarts the timer, and this process continues. When the timer expires, and there has been no device activity, the superclass lowers the device power state to the next lower state. This can continue until the device is in state zero. - After the device has been powered down by at least one power state, a subsequent call to <code>activityTickle</code> causes the device to be switched to a higher state required for the activity. - If the driver is managing the idleness determination totally on its own, the value of the <code>type</code> parameter should be <code>kIOPMSubclassPolicy</code>, and the driver should override the <code>activityTickle</code> method. The superclass IOService implementation of <code>activityTickle</code> does nothing with the <code>kIOPMSubclassPolicy</code> argument. - @param type When <code>type</code> is <code>kIOPMSubclassPolicy</code>, <code>activityTickle</code> is not handled in IOService and should be intercepted by the subclass. When <code>type</code> is <code>kIOPMSuperclassPolicy1</code>, an activity flag is set and the device state is checked. If the device has been powered down, it is powered up again. - @param stateNumber When <code>type</code> is <code>kIOPMSuperclassPolicy1</code>, <code>stateNumber</code> contains the desired power state ordinal for the activity. If the device is in a lower state, the superclass will switch it to this state. This is for devices that can handle some accesses in lower power states; the device is powered up only as far as it needs to be for the activity. - @result When <code>type</code> is <code>kIOPMSuperclassPolicy1</code>, the superclass returns <code>true</code> if the device is currently in the state specified by <code>stateNumber</code>. If the device is in a lower state and must be powered up, the superclass returns <code>false</code>; in this case the superclass will initiate a power change to power the device up. */ - - virtual bool activityTickle( - unsigned long type, - unsigned long stateNumber = 0 ); - -/*! @function setAggressiveness - @abstract Broadcasts an aggressiveness factor from the parent of a driver to the driver. - @discussion Implement <code>setAggressiveness</code> to receive a notification when an "aggressiveness Aggressiveness factors are a loose set of power management variables that contain values for system sleep timeout, display sleep timeout, whether the system is on battery or AC, and other power management features. There are several aggressiveness factors that can be broadcast and a driver may take action on whichever factors apply to it. - A driver that has joined the power plane via @link joinPMtree joinPMtree@/link will receive <code>setAgressiveness</code> calls when aggressiveness factors change. - A driver may override this call if it needs to do something with the new factor (such as change its idle timeout). If overridden, the driver must call its superclass's <code>setAgressiveness</code> method in its own <code>setAgressiveness</code> implementation. - Most drivers do not need to implement <code>setAgressiveness</code>. - @param type The aggressiveness factor type, such as <code>kPMMinutesToDim</code>, <code>kPMMinutesToSpinDown</code>, <code>kPMMinutesToSleep</code>, and <code>kPMPowerSource</code>. (Aggressiveness factors are defined in <code>pwr_mgt/IOPM.h</code>.) - @param newLevel The aggressiveness factor's new value. - @result <code>IOPMNoErr</code>. */ - - virtual IOReturn setAggressiveness( - unsigned long type, - unsigned long newLevel ); - -/*! @function getAggressiveness - @abstract Returns the current aggressiveness value for the given type. - @param type The aggressiveness factor to query. - @param currentLevel Upon successful return, contains the value of aggressiveness factor <code>type</code>. - @result <code>kIOReturnSuccess</code> upon success; an I/O Kit error code otherwise. */ - - virtual IOReturn getAggressiveness( - unsigned long type, - unsigned long * currentLevel ); - -#ifndef __LP64__ -/*! @function systemWake - @abstract Tells every driver in the power plane that the system is waking up. - @discussion This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ - - virtual IOReturn systemWake( void ) - APPLE_KEXT_DEPRECATED; - -/*! @function temperatureCriticalForZone - @abstract Alerts a driver to a critical temperature in some thermal zone. - @discussion This call is unused by power management. It is not intended to be called or overridden. */ - - virtual IOReturn temperatureCriticalForZone( IOService * whichZone ) - APPLE_KEXT_DEPRECATED; - -/*! @function youAreRoot - @abstract Informs power management which IOService object is the power plane root. - @discussion This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ - - virtual IOReturn youAreRoot( void ) - APPLE_KEXT_DEPRECATED; - -/*! @function setPowerParent - @abstract This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ - - virtual IOReturn setPowerParent( - IOPowerConnection * parent, - bool stateKnown, - IOPMPowerFlags currentState ) - APPLE_KEXT_DEPRECATED; -#endif /* !__LP64__ */ - -/*! @function addPowerChild - @abstract Informs a driver that it has a new child. - @discussion The Platform Expert uses this method to call a driver and introduce it to a new child. This call is handled internally by power management. It is not intended to be overridden or called by drivers. - @param theChild A pointer to the child IOService object. */ - - virtual IOReturn addPowerChild( IOService * theChild ); - -/*! @function removePowerChild - @abstract Informs a power managed driver that one of its power plane childen is disappearing. - @discussion This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ - - virtual IOReturn removePowerChild( IOPowerConnection * theChild ); - -#ifndef __LP64__ -/*! @function command_received - @discussion This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ - - virtual void command_received( void *, void * , void * , void * ); -#endif - -/*! @function start_PM_idle_timer - @discussion This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ - - APPLE_KEXT_COMPATIBILITY_VIRTUAL - void start_PM_idle_timer( void ); - -#ifndef __LP64__ -/*! @function PM_idle_timer_expiration - @discussion This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ - - virtual void PM_idle_timer_expiration( void ) - APPLE_KEXT_DEPRECATED; - -/*! @function PM_Clamp_Timer_Expired - @discussion This call is handled internally by power management. It is not intended to be overridden or called by drivers. */ - - virtual void PM_Clamp_Timer_Expired( void ) - APPLE_KEXT_DEPRECATED; -#endif - -/*! @function setIdleTimerPeriod - @abstract Sets or changes the idle timer period. - @discussion A driver using the idleness determination provided by IOService calls its superclass with this method to set or change the idle timer period. See @link activityTickle activityTickle@/link for a description of this type of idleness determination. - @param period The desired idle timer period in seconds. - @result <code>kIOReturnSuccess</code> upon success; an I/O Kit error code otherwise. */ - - virtual IOReturn setIdleTimerPeriod( unsigned long ); - -#ifndef __LP64__ -/*! @function getPMworkloop - @abstract Returns a pointer to the system-wide power management work loop. - @availability Deprecated in Mac OS X version 10.6. - @discussion Most drivers should create their own work loops to synchronize their code; drivers should not run arbitrary code on the power management work loop. */ - - virtual IOWorkLoop * getPMworkloop( void ) - APPLE_KEXT_DEPRECATED; -#endif - -/*! @function getPowerState - @abstract Determines a device's power state. - @discussion A device's "current power state" is updated at the end of each power state transition (e.g. transition from state 1 to state 0, or state 0 to state 2). This transition includes the time spent powering on or off any power plane children. Thus, if a child calls <code>getPowerState</code> on its power parent during system wake from sleep, the call will return the index to the device's off state rather than its on state. - @result The current power state's index into the device's power state array. */ - - UInt32 getPowerState( void ); - -/*! @function setPowerState - @abstract Requests a power managed driver to change the power state of its device. - @discussion A power managed driver must override <code>setPowerState</code> to take part in system power management. After a driver is registered with power management, the system uses <code>setPowerState</code> to power the device off and on for system sleep and wake. - Calls to @link PMinit PMinit@/link and @link registerPowerDriver registerPowerDriver@/link enable power management to change a device's power state using <code>setPowerState</code>. <code>setPowerState</code> is called in a clean and separate thread context. - @param powerStateOrdinal The number in the power state array of the state the driver is being instructed to switch to. - @param whatDevice A pointer to the power management object which registered to manage power for this device. In most cases, <code>whatDevice</code> will be equal to your driver's own <code>this</code> pointer. - @result The driver must return <code>IOPMAckImplied</code> if it has complied with the request when it returns. Otherwise if it has started the process of changing power state but not finished it, the driver should return a number of microseconds which is an upper limit of the time it will need to finish. Then, when it has completed the power switch, it should call @link acknowledgeSetPowerState acknowledgeSetPowerState@/link. */ - - virtual IOReturn setPowerState( - unsigned long powerStateOrdinal, - IOService * whatDevice ); - -#ifndef __LP64__ -/*! @function clampPowerOn - @abstract Deprecated. Do not use. */ - - virtual void clampPowerOn( unsigned long duration ); -#endif - -/*! @function maxCapabilityForDomainState - @abstract Determines a driver's highest power state possible for a given power domain state. - @discussion This happens when the power domain is changing state and power management needs to determine which state the device is capable of in the new domain state. - Most drivers do not need to implement this method, and can rely upon the default IOService implementation. The IOService implementation scans the power state array looking for the highest state whose <code>inputPowerRequirement</code> field exactly matches the value of the <code>domainState</code> parameter. If more intelligent determination is required, the driver itself should implement the method and override the superclass's implementation. - @param domainState Flags that describe the character of "domain power"; they represent the <code>outputPowerCharacter</code> field of a state in the power domain's power state array. - @result A state number. */ - - virtual unsigned long maxCapabilityForDomainState( IOPMPowerFlags domainState ); - -/*! @function initialPowerStateForDomainState - @abstract Determines which power state a device is in, given the current power domain state. - @discussion Power management calls this method once, when the driver is initializing power management. - Most drivers do not need to implement this method, and can rely upon the default IOService implementation. The IOService implementation scans the power state array looking for the highest state whose <code>inputPowerRequirement</code> field exactly matches the value of the <code>domainState</code> parameter. If more intelligent determination is required, the power managed driver should implement the method and override the superclass's implementation. - @param domainState Flags that describe the character of "domain power"; they represent the <code>outputPowerCharacter</code> field of a state in the power domain's power state array. - @result A state number. */ - - virtual unsigned long initialPowerStateForDomainState( IOPMPowerFlags domainState ); - -/*! @function powerStateForDomainState - @abstract Determines what power state the device would be in for a given power domain state. - @discussion Power management calls a driver with this method to find out what power state the device would be in for a given power domain state. This happens when the power domain is changing state and power management needs to determine the effect of the change. - Most drivers do not need to implement this method, and can rely upon the default IOService implementation. The IOService implementation scans the power state array looking for the highest state whose <code>inputPowerRequirement</code> field exactly matches the value of the <code>domainState</code> parameter. If more intelligent determination is required, the power managed driver should implement the method and override the superclass's implementation. - @param domainState Flags that describe the character of "domain power"; they represent the <code>outputPowerCharacter</code> field of a state in the power domain's power state array. - @result A state number. */ - - virtual unsigned long powerStateForDomainState( IOPMPowerFlags domainState ); - -/*! @function powerStateWillChangeTo - @abstract Informs interested parties that a device is about to change its power state. - @discussion Power management informs interested parties that a device is about to change to a different power state. Interested parties are those that have registered for this notification via @link registerInterestedDriver registerInterestedDriver@/link. If you have called <code>registerInterestedDriver</code> on a power managed driver, you must implement <code>powerStateWillChangeTo</code> and @link powerStateDidChangeTo powerStateDidChangeTo@/link to receive the notifications. - <code>powerStateWillChangeTo</code> is called in a clean and separate thread context. <code>powerStateWillChangeTo</code> is called before a power state transition takes place; <code>powerStateDidChangeTo</code> is called after the transition has completed. - @param capabilities Flags that describe the capability of the device in the new power state (they come from the <code>capabilityFlags</code> field of the new state in the power state array). - @param stateNumber The number of the state in the state array that the device is switching to. - @param whatDevice A pointer to the driver that is changing. It can be used by a driver that is receiving power state change notifications for multiple devices to distinguish between them. - @result The driver returns <code>IOPMAckImplied</code> if it has prepared for the power change when it returns. If it has started preparing but not finished, it should return a number of microseconds which is an upper limit of the time it will need to finish preparing. Then, when it has completed its preparations, it should call @link acknowledgePowerChange acknowledgePowerChange@/link. */ - - virtual IOReturn powerStateWillChangeTo( - IOPMPowerFlags capabilities, - unsigned long stateNumber, - IOService * whatDevice ); - -/*! @function powerStateDidChangeTo - @abstract Informs interested parties that a device has changed to a different power state. - @discussion Power management informs interested parties that a device has changed to a different power state. Interested parties are those that have registered for this notification via @link registerInterestedDriver registerInterestedDriver@/link. If you have called <code>registerInterestedDriver</code> on a power managed driver, you must implemnt @link powerStateWillChangeTo powerStateWillChangeTo@/link and <code>powerStateDidChangeTo</code> to receive the notifications. - <code>powerStateDidChangeTo</code> is called in a clean and separate thread context. <code>powerStateWillChangeTo</code> is called before a power state transition takes place; <code>powerStateDidChangeTo</code> is called after the transition has completed. - @param capabilities Flags that describe the capability of the device in the new power state (they come from the <code>capabilityFlags</code> field of the new state in the power state array). - @param stateNumber The number of the state in the state array that the device is switching to. - @param whatDevice A pointer to the driver that is changing. It can be used by a driver that is receiving power state change notifications for multiple devices to distinguish between them. - @result The driver returns <code>IOPMAckImplied</code> if it has prepared for the power change when it returns. If it has started preparing but not finished, it should return a number of microseconds which is an upper limit of the time it will need to finish preparing. Then, when it has completed its preparations, it should call @link acknowledgePowerChange acknowledgePowerChange@/link. */ - - virtual IOReturn powerStateDidChangeTo( - IOPMPowerFlags capabilities, - unsigned long stateNumber, - IOService * whatDevice ); - -#ifndef __LP64__ -/*! @function didYouWakeSystem - @abstract Asks a driver if its device is the one that just woke the system from sleep. - @availability Deprecated in Mac OS X version 10.6. - @discussion Power management calls a power managed driver with this method to ask if its device is the one that just woke the system from sleep. If a device is capable of waking the system from sleep, its driver should implement <code>didYouWakeSystem</code> and return <code>true</code> if its device was responsible for waking the system. - @result <code>true</code> if the driver's device woke the system and <code>false</code> otherwise. */ - - virtual bool didYouWakeSystem( void ) - APPLE_KEXT_DEPRECATED; - -/*! @function newTemperature - @abstract Tells a power managed driver that the temperature in the thermal zone has changed. - @discussion This call is unused by power management. It is not intended to be called or overridden. */ - - virtual IOReturn newTemperature( long currentTemp, IOService * whichZone ) - APPLE_KEXT_DEPRECATED; -#endif - - virtual bool askChangeDown( unsigned long ); - virtual bool tellChangeDown( unsigned long ); - virtual void tellNoChangeDown ( unsigned long ); - virtual void tellChangeUp( unsigned long ); - virtual IOReturn allowPowerChange( unsigned long refcon ); - virtual IOReturn cancelPowerChange( unsigned long refcon ); - -protected: -/*! @function changePowerStateToPriv - @abstract Tells a driver's superclass to change the power state of its device. - @discussion A driver uses this method to tell its superclass to change the power state of the device. This is the recommended way to change the power state of a device. - Three things affect driver power state: @link changePowerStateTo changePowerStateTo@/link, <code>changePowerStateToPriv</code>, and the desires of the driver's power plane children. Power management puts the device into the maximum state governed by those three entities. - Drivers may eliminate the influence of the <code>changePowerStateTo</code> method on power state one of two ways. See @link powerOverrideOnPriv powerOverrideOnPriv@/link to ignore the method's influence, or call <code>changePowerStateTo(0)</code> in the driver's <code>start</code> routine to remove the <code>changePowerStateTo</code> method's power request. - @param ordinal The number of the desired power state in the power state array. - @result A return code that can be ignored by the caller. */ - - IOReturn changePowerStateToPriv( unsigned long ordinal ); - -/*! @function powerOverrideOnPriv - @abstract Allows a driver to ignore its children's power management requests and only use changePowerStateToPriv to define its own power state. - @discussion Power management normally keeps a device at the highest state required by its requests via @link changePowerStateTo changePowerStateTo@/link, @link changePowerStateToPriv changePowerStateToPriv@/link, and its children. However, a driver may ensure a lower power state than otherwise required by itself and its children using <code>powerOverrideOnPriv</code>. When the override is on, power management keeps the device's power state in the state specified by <code>changePowerStateToPriv</code>. Turning on the override will initiate a power change if the driver's <code>changePowerStateToPriv</code> desired power state is different from the maximum of the <code>changePowerStateTo</code> desired power state and the children's desires. - @result A return code that can be ignored by the caller. */ - - IOReturn powerOverrideOnPriv( void ); - -/*! @function powerOverrideOffPriv - @abstract Allows a driver to disable a power override. - @discussion When a driver has enabled an override via @link powerOverrideOnPriv powerOverrideOnPriv@/link, it can disable it again by calling this method in its superclass. Disabling the override reverts to the default algorithm for determining a device's power state. The superclass will now keep the device at the highest state required by <code>changePowerStateTo</code>, <code>changePowerStateToPriv</code>, and its children. Turning off the override will initiate a power change if the driver's desired power state is different from the maximum of the power managed driver's desire and the children's desires. - @result A return code that can be ignored by the caller. */ - - IOReturn powerOverrideOffPriv( void ); - -/*! @function powerChangeDone - @abstract Tells a driver when a power state change is complete. - @discussion Power management uses this method to inform a driver when a power change is completely done, when all interested parties have acknowledged the @link powerStateDidChangeTo powerStateDidChangeTo@/link call. The default implementation of this method is null; the method is meant to be overridden by subclassed power managed drivers. A driver should use this method to find out if a power change it initiated is complete. - @param stateNumber The number of the state in the state array that the device has switched from. */ - - virtual void powerChangeDone( unsigned long stateNumber ); -}; - -#endif /* ! _IOKIT_IOSERVICE_H */ diff --git a/i386/include/IOKit/IOServicePM.h b/i386/include/IOKit/IOServicePM.h deleted file mode 100644 index 9955e03..0000000 --- a/i386/include/IOKit/IOServicePM.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOSERVICEPM_H -#define _IOKIT_IOSERVICEPM_H - -#include <IOKit/pwr_mgt/IOPM.h> - -class IOService; -class IOServicePM; -class IOPowerConnection; -class IOWorkLoop; -class IOCommandGate; -class IOTimerEventSource; -class IOPlatformExpert; - -#endif /* !_IOKIT_IOSERVICEPM_H */ diff --git a/i386/include/IOKit/IOSharedDataQueue.h b/i386/include/IOKit/IOSharedDataQueue.h deleted file mode 100644 index fdfa1d6..0000000 --- a/i386/include/IOKit/IOSharedDataQueue.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOKIT_IOSHAREDDATAQUEUE_H -#define _IOKIT_IOSHAREDDATAQUEUE_H - -#ifdef dequeue -#undef dequeue -#endif - -#include <IOKit/IODataQueue.h> - -typedef struct _IODataQueueEntry IODataQueueEntry; - -/*! - * @class IOSharedDataQueue : public IODataQueue - * @abstract A generic queue designed to pass data both from the kernel to a user process and from a user process to the kernel. - * @discussion The IOSharedDataQueue class is designed to also allow a user process to queue data to kernel code. IOSharedDataQueue objects are designed to be used in a single producer / single consumer situation. As such, there are no locks on the data itself. Because the kernel enqueue and user-space dequeue methods follow a strict set of guidelines, no locks are necessary to maintain the integrity of the data struct. - * - * <br>Each data entry can be variable sized, but the entire size of the queue data region (including overhead for each entry) must be specified up front. - * - * <br>In order for the IODataQueue instance to notify the user process that data is available, a notification mach port must be set. When the queue is empty and a new entry is added, a message is sent to the specified port. - * - * <br>In order to make the data queue memory available to a user process, the method getMemoryDescriptor() must be used to get an IOMemoryDescriptor instance that can be mapped into a user process. Typically, the clientMemoryForType() method on an IOUserClient instance will be used to request the IOMemoryDescriptor and then return it to be mapped into the user process. - */ -class IOSharedDataQueue : public IODataQueue -{ - OSDeclareDefaultStructors(IOSharedDataQueue) - - struct ExpansionData { - }; - /*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData * _reserved; - -protected: - virtual void free(); - -public: - /*! - * @function withCapacity - * @abstract Static method that creates a new IOSharedDataQueue instance with the capacity specified in the size parameter. - * @discussion The actual size of the entire data queue memory region (to be shared into a user process) is equal to the capacity plus the IODataQueueMemory overhead. This overhead value can be determined from the DATA_QUEUE_MEMORY_HEADER_SIZE macro in <IOKit/IODataQueueShared.h>. The size of the data queue memory region must include space for the overhead of each IODataQueueEntry. This entry overhead can be determined from the DATA_QUEUE_ENTRY_HEADER_SIZE macro in <IOKit/IODataQueueShared.h>.<br> This method allocates a new IODataQueue instance and then calls initWithCapacity() with the given size parameter. If the initWithCapacity() fails, the new instance is released and zero is returned. - * @param size The size of the data queue memory region. - * @result Returns the newly allocated IOSharedDataQueue instance. Zero is returned on failure. - */ - static IOSharedDataQueue *withCapacity(UInt32 size); - - /*! - * @function withEntries - * @abstract Static method that creates a new IOSharedDataQueue instance with the specified number of entries of the given size. - * @discussion This method will create a new IOSharedDataQueue instance with enough capacity for numEntries of entrySize. It does account for the IODataQueueEntry overhead for each entry. Note that the numEntries and entrySize are simply used to determine the data region size. They do not actually restrict the size of number of entries that can be added to the queue.<br> This method allocates a new IODataQueue instance and then calls initWithEntries() with the given numEntries and entrySize parameters. If the initWithEntries() fails, the new instance is released and zero is returned. - * @param numEntries Number of entries to allocate space for. - * @param entrySize Size of each entry. - * @result Reeturns the newly allocated IOSharedDataQueue instance. Zero is returned on failure. - */ - static IOSharedDataQueue *withEntries(UInt32 numEntries, UInt32 entrySize); - - /*! - * @function initWithCapacity - * @abstract Initializes an IOSharedDataQueue instance with the capacity specified in the size parameter. - * @discussion The actual size of the entire data queue memory region (to be shared into a user process) is equal to the capacity plus the IODataQueueMemory overhead. This overhead value can be determined from the DATA_QUEUE_MEMORY_HEADER_SIZE and DATA_QUEUE_MEMORY_APPENDIX_SIZE macro in <IOKit/IODataQueueShared.h>. The size of the data queue memory region must include space for the overhead of each IODataQueueEntry. This entry overhead can be determined from the DATA_QUEUE_ENTRY_HEADER_SIZE macro in <IOKit/IODataQueueShared.h>. - * @param size The size of the data queue memory region. - * @result Returns true on success and false on failure. - */ - virtual Boolean initWithCapacity(UInt32 size); - - /*! - * @function getMemoryDescriptor - * @abstract Returns a memory descriptor covering the IODataQueueMemory region. - * @discussion The IOMemoryDescriptor instance returned by this method is intended to be mapped into a user process. This is the memory region that the IODataQueueClient code operates on. - * @result Returns a newly allocated IOMemoryDescriptor for the IODataQueueMemory region. Returns zero on failure. - */ - virtual IOMemoryDescriptor *getMemoryDescriptor(); - - /*! - * @function peek - * @abstract Used to peek at the next entry on the queue. - * @discussion This function can be used to look at the next entry which allows the entry to be received without having to copy it with dequeue. In order to do this, call peek to get the entry. Then call dequeue with a NULL data pointer. That will cause the head to be moved to the next entry, but no memory to be copied. - * @result Returns a pointer to the next IODataQueueEntry if one is available. 0 (NULL) is returned if the queue is empty. - */ - virtual IODataQueueEntry * peek(); - - /*! - * @function dequeue - * @abstract Dequeues the next available entry on the queue and copies it into the given data pointer. - * @discussion This function will dequeue the next available entry on the queue. If a data pointer is provided, it will copy the data into the memory region if there is enough space available as specified in the dataSize parameter. If no data pointer is provided, it will simply move the head value past the current entry. - * @param data A pointer to the data memory region in which to copy the next entry data on the queue. If this parameter is 0 (NULL), it will simply move to the next entry. - * @param dataSize A pointer to the size of the data parameter. On return, this contains the size of the actual entry data - even if the original size was not large enough. - * @result Returns true on success and false on failure. Typically failure means that the queue is empty. - */ - virtual Boolean dequeue(void *data, UInt32 *dataSize); - - OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 0); - OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 1); - OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 2); - OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 3); - OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 4); - OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 5); - OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 6); - OSMetaClassDeclareReservedUnused(IOSharedDataQueue, 7); -}; - -#endif /* _IOKIT_IOSHAREDDATAQUEUE_H */ diff --git a/i386/include/IOKit/IOSharedLock.h b/i386/include/IOKit/IOSharedLock.h deleted file mode 100644 index 59b47ec..0000000 --- a/i386/include/IOKit/IOSharedLock.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - -/* - * Multiprocessor locks used within the shared memory area between the - * kernel and event system. These must work in both user and kernel mode. - * - * These routines are public, for the purpose of writing frame buffer device - * drivers which handle their own cursors. Certain architectures define a - * generic display class which handles cursor drawing and is subclassed by - * driver writers. These drivers need not be concerned with the following - * types and definitions. - * - * The ev_lock(), ev_unlock(), and ev_try_lock() functions are available only - * to drivers built in or dynamically loaded into the kernel, and to DPS - * drivers built in or dynamically loaded into the Window Server. They do not - * exist in any shared library. - * - * --> They're now in IOKit user lib. - */ - -#ifndef _IOKIT_IOSHAREDLOCK_H -#define _IOKIT_IOSHAREDLOCK_H - -#ifdef __cplusplus -extern "C" { -#endif - -// should be 32 bytes on PPC -typedef volatile int IOSharedLockData; -typedef IOSharedLockData * IOSharedLock; - -#define IOSpinLockInit(l) (*(l) = (IOSharedLockData)0) - - -extern void IOSpinUnlock(IOSharedLock l); -extern boolean_t IOTrySpinLock(IOSharedLock l); - -/* exact same stuff & implementation */ - -typedef IOSharedLockData ev_lock_data_t; -typedef ev_lock_data_t * ev_lock_t; - -#define ev_init_lock(l) (*(l) = (ev_lock_data_t)0) -// needs isync? -//#define ev_is_locked(l) (*(l) != (ev_lock_data_t)0) - - -extern void ev_unlock(ev_lock_t l); -extern boolean_t ev_try_lock(ev_lock_t l); - -#ifdef __cplusplus -} -#endif -#endif /* ! _IOKIT_IOSHAREDLOCK_H */ diff --git a/i386/include/IOKit/IOSubMemoryDescriptor.h b/i386/include/IOKit/IOSubMemoryDescriptor.h deleted file mode 100644 index 0093ea3..0000000 --- a/i386/include/IOKit/IOSubMemoryDescriptor.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IOSUBMEMORYDESCRIPTOR_H -#define _IOSUBMEMORYDESCRIPTOR_H - -#include <IOKit/IOMemoryDescriptor.h> - -/*! @class IOSubMemoryDescriptor : public IOMemoryDescriptor - @abstract The IOSubMemoryDescriptor object describes a memory area made up of a portion of another IOMemoryDescriptor. - @discussion The IOSubMemoryDescriptor object represents a subrange of memory, specified as a portion of another IOMemoryDescriptor. */ - -class IOSubMemoryDescriptor : public IOMemoryDescriptor -{ - OSDeclareDefaultStructors(IOSubMemoryDescriptor); - -protected: - IOMemoryDescriptor * _parent; - IOByteCount _start; - - virtual void free(); - -public: -/*! @function withSubRange - @abstract Create an IOMemoryDescriptor to describe a subrange of an existing descriptor. - @discussion This method creates and initializes an IOMemoryDescriptor for memory consisting of a subrange of the specified memory descriptor. The parent memory descriptor is retained by the new descriptor. - @param of The parent IOMemoryDescriptor of which a subrange is to be used for the new descriptor, which will be retained by the subrange IOMemoryDescriptor. - @param offset A byte offset into the parent memory descriptor's memory. - @param length The length of the subrange. - @param options - kIOMemoryDirectionMask (options:direction) This nibble indicates the I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. - @result The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure. */ - - static IOSubMemoryDescriptor * withSubRange(IOMemoryDescriptor *of, - IOByteCount offset, - IOByteCount length, - IOOptionBits options); - - /* - * Initialize or reinitialize an IOSubMemoryDescriptor to describe - * a subrange of an existing descriptor. - * - * An IOSubMemoryDescriptor can be re-used by calling initSubRange - * again on an existing instance -- note that this behavior is not - * commonly supported in other IOKit classes, although it is here. - */ - virtual bool initSubRange( IOMemoryDescriptor * parent, - IOByteCount offset, IOByteCount length, - IODirection withDirection ); - - /* - * IOMemoryDescriptor required methods - */ - - virtual addr64_t getPhysicalSegment( IOByteCount offset, - IOByteCount * length, - IOOptionBits options = 0 ); - - virtual IOReturn prepare(IODirection forDirection = kIODirectionNone); - - virtual IOReturn complete(IODirection forDirection = kIODirectionNone); - -#ifdef __LP64__ - virtual -#endif /* __LP64__ */ - IOReturn redirect( task_t safeTask, bool redirect ); - - virtual IOReturn setPurgeable( IOOptionBits newState, - IOOptionBits * oldState ); - - // support map() on kIOMemoryTypeVirtual without prepare() - virtual IOMemoryMap * makeMapping( - IOMemoryDescriptor * owner, - task_t intoTask, - IOVirtualAddress atAddress, - IOOptionBits options, - IOByteCount offset, - IOByteCount length ); - - virtual uint64_t getPreparationID( void ); - -}; - -#endif /* !_IOSUBMEMORYDESCRIPTOR_H */ diff --git a/i386/include/IOKit/IOSyncer.h b/i386/include/IOKit/IOSyncer.h deleted file mode 100644 index f6dfce3..0000000 --- a/i386/include/IOKit/IOSyncer.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _IOSYNCER_H -#define _IOSYNCER_H - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOTypes.h> -#include <IOKit/IOLocks.h> - -class IOSyncer : public OSObject -{ - OSDeclareDefaultStructors(IOSyncer) - -private: - // The spin lock that is used to guard the 'threadMustStop' variable. - IOSimpleLock *guardLock; - volatile bool threadMustStop; - IOReturn fResult; - virtual void free(); - virtual void privateSignal(); - -public: - - static IOSyncer * create(bool twoRetains = true) - APPLE_KEXT_DEPRECATED; - - virtual bool init(bool twoRetains) - APPLE_KEXT_DEPRECATED; - virtual void reinit() - APPLE_KEXT_DEPRECATED; - virtual IOReturn wait(bool autoRelease = true) - APPLE_KEXT_DEPRECATED; - virtual void signal(IOReturn res = kIOReturnSuccess, - bool autoRelease = true) - APPLE_KEXT_DEPRECATED; -}; - -#endif /* !_IOSYNCER */ - diff --git a/i386/include/IOKit/IOTimeStamp.h b/i386/include/IOKit/IOTimeStamp.h deleted file mode 100644 index b1b0905..0000000 --- a/i386/include/IOKit/IOTimeStamp.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef IOKIT_IOTIMESTAMP_H -#define IOKIT_IOTIMESTAMP_H - -#include <sys/kdebug.h> - -static inline void -IOTimeStampStartConstant(unsigned int csc, - uintptr_t a = 0, uintptr_t b = 0, - uintptr_t c = 0, uintptr_t d = 0) -{ - KERNEL_DEBUG_CONSTANT(csc | DBG_FUNC_START, a, b, c, d, 0); -} - -static inline void -IOTimeStampEndConstant(uintptr_t csc, - uintptr_t a = 0, uintptr_t b = 0, - uintptr_t c = 0, uintptr_t d = 0) -{ - KERNEL_DEBUG_CONSTANT(csc | DBG_FUNC_END, a, b, c, d, 0); -} - -static inline void -IOTimeStampConstant(uintptr_t csc, - uintptr_t a = 0, uintptr_t b = 0, - uintptr_t c = 0, uintptr_t d = 0) -{ - KERNEL_DEBUG_CONSTANT(csc | DBG_FUNC_NONE, a, b, c, d, 0); -} - -#if KDEBUG - -static inline void -IOTimeStampStart(uintptr_t csc, - uintptr_t a = 0, uintptr_t b = 0, - uintptr_t c = 0, uintptr_t d = 0) -{ - KERNEL_DEBUG(csc | DBG_FUNC_START, a, b, c, d, 0); -} - -static inline void -IOTimeStampEnd(uintptr_t csc, - uintptr_t a = 0, uintptr_t b = 0, - uintptr_t c = 0, uintptr_t d = 0) -{ - KERNEL_DEBUG(csc | DBG_FUNC_END, a, b, c, d, 0); -} - -static inline void -IOTimeStamp(uintptr_t csc, - uintptr_t a = 0, uintptr_t b = 0, - uintptr_t c = 0, uintptr_t d = 0) -{ - KERNEL_DEBUG(csc | DBG_FUNC_NONE, a, b, c, d, 0); -} - -#endif /* KDEBUG */ - -#define IODBG_STORAGE(code) (KDBG_CODE(DBG_IOKIT, DBG_IOSTORAGE, code)) -#define IODBG_NETWORK(code) (KDBG_CODE(DBG_IOKIT, DBG_IONETWORK, code)) -#define IODBG_KEYBOARD(code) (KDBG_CODE(DBG_IOKIT, DBG_IOKEYBOARD, code)) -#define IODBG_HID(code) (KDBG_CODE(DBG_IOKIT, DBG_IOHID, code)) -#define IODBG_AUDIO(code) (KDBG_CODE(DBG_IOKIT, DBG_IOAUDIO, code)) -#define IODBG_SERIAL(code) (KDBG_CODE(DBG_IOKIT, DBG_IOSERIAL, code)) -#define IODBG_TTY(code) (KDBG_CODE(DBG_IOKIT, DBG_IOTTY, code)) -#define IODBG_SAM(code) (KDBG_CODE(DBG_IOKIT, DBG_IOSAM, code)) -#define IODBG_PARALLELATA(code) (KDBG_CODE(DBG_IOKIT, DBG_IOPARALLELATA, code)) -#define IODBG_PARALLELSCSI(code) (KDBG_CODE(DBG_IOKIT, DBG_IOPARALLELSCSI, code)) -#define IODBG_SATA(code) (KDBG_CODE(DBG_IOKIT, DBG_IOSATA, code)) -#define IODBG_SAS(code) (KDBG_CODE(DBG_IOKIT, DBG_IOSAS, code)) -#define IODBG_FIBRECHANNEL(code) (KDBG_CODE(DBG_IOKIT, DBG_IOFIBRECHANNEL, code)) -#define IODBG_USB(code) (KDBG_CODE(DBG_IOKIT, DBG_IOUSB, code)) -#define IODBG_BLUETOOTH(code) (KDBG_CODE(DBG_IOKIT, DBG_IOBLUETOOTH, code)) -#define IODBG_FIREWIRE(code) (KDBG_CODE(DBG_IOKIT, DBG_IOFIREWIRE, code)) -#define IODBG_INFINIBAND(code) (KDBG_CODE(DBG_IOKIT, DBG_IOINFINIBAND, code)) - - -/* Backwards compatibility */ -#define IODBG_DISK(code) IODBG_STORAGE(code) -#define IODBG_POINTING(code) IODBG_HID(code) - - -/* IOKit infrastructure subclasses */ -#define IODBG_WORKLOOP(code) (KDBG_CODE(DBG_IOKIT, DBG_IOWORKLOOP, code)) -#define IODBG_INTES(code) (KDBG_CODE(DBG_IOKIT, DBG_IOINTES, code)) -#define IODBG_TIMES(code) (KDBG_CODE(DBG_IOKIT, DBG_IOCLKES, code)) -#define IODBG_CMDQ(code) (KDBG_CODE(DBG_IOKIT, DBG_IOCMDQ, code)) -#define IODBG_MCURS(code) (KDBG_CODE(DBG_IOKIT, DBG_IOMCURS, code)) -#define IODBG_MDESC(code) (KDBG_CODE(DBG_IOKIT, DBG_IOMDESC, code)) -#define IODBG_POWER(code) (KDBG_CODE(DBG_IOKIT, DBG_IOPOWER, code)) -#define IODBG_IOSERVICE(code) (KDBG_CODE(DBG_IOKIT, DBG_IOSERVICE, code)) - -/* IOKit specific codes - within each subclass */ - -/* DBG_IOKIT/DBG_IODISK codes */ - -/* DBG_IOKIT/DBG_IONETWORK codes */ - -/* DBG_IOKIT/DBG_IOKEYBOARD codes */ - -/* DBG_IOKIT/DBG_IOHID codes */ - -/* DBG_IOKIT/DBG_IOAUDIO codes */ - -/* DBG_IOKIT/DBG_IOSERIAL codes */ - -/* DBG_IOKIT/DBG_IOTTY codes */ - -/* DBG_IOKIT/DBG_IOWORKLOOP codes */ -#define IOWL_CLIENT 1 /* 0x05010004 */ -#define IOWL_WORK 2 /* 0x05010008 */ - -/* DBG_IOKIT/DBG_IOINTES codes */ -#define IOINTES_CLIENT 1 /* 0x05020004 */ -#define IOINTES_LAT 2 /* 0x05020008 */ -#define IOINTES_SEMA 3 /* 0x0502000c */ -#define IOINTES_INTCTXT 4 /* 0x05020010 */ -#define IOINTES_INTFLTR 5 /* 0x05020014 */ -#define IOINTES_ACTION 6 /* 0x05020018 */ -#define IOINTES_FILTER 7 /* 0x0502001c */ - -/* DBG_IOKIT/DBG_IOTIMES codes */ -#define IOTIMES_CLIENT 1 /* 0x05030004 */ -#define IOTIMES_LAT 2 /* 0x05030008 */ -#define IOTIMES_SEMA 3 /* 0x0503000c */ -#define IOTIMES_ACTION 4 /* 0x05030010 */ - -/* DBG_IOKIT/DBG_IOCMDQ codes */ -#define IOCMDQ_CLIENT 1 /* 0x05040004 */ -#define IOCMDQ_LAT 2 /* 0x05040008 */ -#define IOCMDQ_SEMA 3 /* 0x0504000c */ -#define IOCMDQ_PSEMA 4 /* 0x05040010 */ -#define IOCMDQ_PLOCK 5 /* 0x05040014 */ -#define IOCMDQ_ACTION 6 /* 0x05040018 */ - -/* DBG_IOKIT/DBG_IOMCURS codes */ - -/* DBG_IOKIT/DBG_IOMDESC codes */ - -/* DBG_IOKIT/DBG_IOPOWER codes */ -// See IOKit/pwr_mgt/IOPMlog.h for the power management codes - -/* DBG_IOKIT/DBG_IOSERVICE codes */ -#define IOSERVICE_BUSY 1 /* 0x05080004 */ -#define IOSERVICE_NONBUSY 2 /* 0x05080008 */ -#define IOSERVICE_MODULESTALL 3 /* 0x0508000C */ -#define IOSERVICE_MODULEUNSTALL 4 /* 0x05080010 */ - -#define IOSERVICE_TERMINATE_PHASE1 5 /* 0x05080014 */ -#define IOSERVICE_TERMINATE_REQUEST_OK 6 /* 0x05080018 */ -#define IOSERVICE_TERMINATE_REQUEST_FAIL 7 /* 0x0508001C */ -#define IOSERVICE_TERMINATE_SCHEDULE_STOP 8 /* 0x05080020 */ -#define IOSERVICE_TERMINATE_SCHEDULE_FINALIZE 9 /* 0x05080024 */ -#define IOSERVICE_TERMINATE_WILL 10 /* 0x05080028 */ -#define IOSERVICE_TERMINATE_DID 11 /* 0x0508002C */ -#define IOSERVICE_TERMINATE_DID_DEFER 12 /* 0x05080030 */ -#define IOSERVICE_TERMINATE_FINALIZE 13 /* 0x05080034 */ -#define IOSERVICE_TERMINATE_STOP 14 /* 0x05080038 */ -#define IOSERVICE_TERMINATE_STOP_NOP 15 /* 0x0508003C */ -#define IOSERVICE_TERMINATE_STOP_DEFER 16 /* 0x05080040 */ -#define IOSERVICE_TERMINATE_DONE 17 /* 0x05080044 */ - -#endif /* ! IOKIT_IOTIMESTAMP_H */ diff --git a/i386/include/IOKit/IOTimerEventSource.h b/i386/include/IOKit/IOTimerEventSource.h deleted file mode 100644 index 7cc0d38..0000000 --- a/i386/include/IOKit/IOTimerEventSource.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * IOTimerEventSource.h - * - * HISTORY - * 2-Feb-1999 Joe Liu (jliu) created. - * - */ - -#ifndef _IOTIMEREVENTSOURCE -#define _IOTIMEREVENTSOURCE - -#include <sys/cdefs.h> - -__BEGIN_DECLS -#include <kern/clock.h> -__END_DECLS - -#include <IOKit/IOEventSource.h> -#include <IOKit/IOTypes.h> - -/*! - @class IOTimerEventSource : public IOEventSource - @abstract Time based event source mechanism. - @discussion An event source that implements a simple timer. A timeout handler is called once the timeout period expires. This timeout handler will be called by the work-loop that this event source is attached to. -<br><br> - Usually a timer event source will be used to implement a timeout. In general when a driver makes a request it will need to setup a call to keep track of when the I/O doesn't complete. This class is designed to make that somewhat easier. -<br><br> - Remember the system doesn't guarantee the accuracy of the callout. It is possible that a higher priority thread is running which will delay the execution of the action routine. In fact the thread will be made runable at the exact requested time, within the accuracy of the CPU's decrementer based interrupt, but the scheduler will then control execution. -*/ -class IOTimerEventSource : public IOEventSource -{ - OSDeclareDefaultStructors(IOTimerEventSource) - -protected: -/*! @var calloutEntry thread_call entry for preregistered thread callouts */ - void *calloutEntry; - -/*! @var abstime time to wake up next, see enable. */ - AbsoluteTime abstime; - -/*! @struct ExpansionData - @discussion This structure is private to the IOTimerEventSource implementation. - */ - struct ExpansionData - { - SInt32 calloutGeneration; - IOWorkLoop * workLoop; - }; - -/*! @var reserved - Reserved for future use. (Internal use only) */ - ExpansionData *reserved; - -/*! @function timeout - @abstract Function that routes the call from the OS' timeout mechanism into a work-loop context. - @discussion timeout will normally not be called nor overridden by a subclass. If the event source is enabled then close the work-loop's gate and call the action routine. - @param self This argument will be cast to an IOTimerEventSource. */ - static void timeout(void *self); - -/*! @function setTimeoutFunc - @abstract Set's timeout as the function of calloutEntry. - @discussion IOTimerEventSource is based upon the kern/thread_call.h APIs currently. This function allocates the calloutEntry member variable by using thread_call_allocate(timeout, this). If you need to write your own subclass of IOTimerEventSource you probably should override this method to allocate an entry that points to your own timeout routine. */ - virtual void setTimeoutFunc(); - -/*! @function free - @abstract Sub-class implementation of free method, frees calloutEntry */ - virtual void free(); - -/*! @function checkForWork - @abstract Have to implement it is mandatory in $link IOEventSource, but IOTimerEventSources don't actually use this work-loop mechanism. */ - virtual bool checkForWork(); - - virtual void setWorkLoop(IOWorkLoop *workLoop); - -public: - -/*! @typedef Action - @discussion 'C' Function pointer defining the callout routine of this event source. - @param owner Owning target object. Note by a startling coincidence the first parameter in a C callout is currently used to define the target of a C++ member function. - @param sender The object that timed out. */ - typedef void (*Action)(OSObject *owner, IOTimerEventSource *sender); - -/*! @function timerEventSource - @abstract Allocates and returns an initialized timer instance. - @param owner - @param action */ - static IOTimerEventSource * - timerEventSource(OSObject *owner, Action action = 0); - -/*! @function init - @abstract Initializes the timer with an owner, and a handler to call when the timeout expires. - @param owner - @param action */ - virtual bool init(OSObject *owner, Action action = 0); - -/*! @function enable - @abstract Enables a call to the action. - @discussion Allows the action function to be called. If the timer event source was disabled while a call was outstanding and the call wasn't cancelled then it will be rescheduled. So a disable/enable pair will disable calls from this event source. */ - virtual void enable(); - -/*! @function disable - @abstract Disable a timed callout. - @discussion When disable returns the action will not be called until the next time enable(qv) is called. */ - virtual void disable(); - - -/*! @function setTimeoutTicks - @abstract Setup a callback at after the delay in scheduler ticks. See wakeAtTime(AbsoluteTime). - @param interval Delay from now to wake up, in scheduler ticks, whatever that may be. - @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ - virtual IOReturn setTimeoutTicks(UInt32 ticks); - -/*! @function setTimeoutMS - @abstract Setup a callback at after the delay in milliseconds. See wakeAtTime(AbsoluteTime). - @param interval Delay from now to wake up, time in milliseconds. - @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ - virtual IOReturn setTimeoutMS(UInt32 ms); - -/*! @function setTimeoutUS - @abstract Setup a callback at after the delay in microseconds. See wakeAtTime(AbsoluteTime). - @param interval Delay from now to wake up, time in microseconds. - @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ - virtual IOReturn setTimeoutUS(UInt32 us); - -/*! @function setTimeout - @abstract Setup a callback at after the delay in some unit. See wakeAtTime(AbsoluteTime). - @param interval Delay from now to wake up in some defined unit. - @param scale_factor Define the unit of interval, default to nanoseconds. - @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ - virtual IOReturn setTimeout(UInt32 interval, - UInt32 scale_factor = kNanosecondScale); - -#if !defined(__LP64__) - virtual IOReturn setTimeout(mach_timespec_t interval) - APPLE_KEXT_DEPRECATED; -#endif - -/*! @function setTimeout - @abstract Setup a callback at after the delay in decrementer ticks. See wakeAtTime(AbsoluteTime). - @param interval Delay from now to wake up in decrementer ticks. - @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ - virtual IOReturn setTimeout(AbsoluteTime interval); - -/*! @function wakeAtTimeTicks - @abstract Setup a callback at this absolute time. See wakeAtTime(AbsoluteTime). - @param abstime Time to wake up in scheduler quantums, whatever that is? - @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ - virtual IOReturn wakeAtTimeTicks(UInt32 ticks); - -/*! @function wakeAtTimeMS - @abstract Setup a callback at this absolute time. See wakeAtTime(AbsoluteTime). - @param abstime Time to wake up in milliseconds. - @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ - virtual IOReturn wakeAtTimeMS(UInt32 ms); - -/*! @function wakeAtTimeUS - @abstract Setup a callback at this absolute time. See wakeAtTime(AbsoluteTime). - @param abstime Time to wake up in microseconds. - @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ - virtual IOReturn wakeAtTimeUS(UInt32 us); - -/*! @function wakeAtTime - @abstract Setup a callback at this absolute time. See wakeAtTime(AbsoluteTime). - @param abstime Time to wake up in some unit. - @param scale_factor Define the unit of abstime, default to nanoseconds. - @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared. */ - virtual IOReturn wakeAtTime(UInt32 abstime, - UInt32 scale_factor = kNanosecondScale); - -#if !defined(__LP64__) - virtual IOReturn wakeAtTime(mach_timespec_t abstime) - APPLE_KEXT_DEPRECATED; -#endif - -/*! @function wakeAtTime - @abstract Setup a callback at this absolute time. - @discussion Starts the timer, which will expire at abstime. After it expires, the timer will call the 'action' registered in the init() function. This timer is not periodic, a further call is needed to reset and restart the timer after it expires. - @param abstime Absolute Time when to wake up, counted in 'decrementer' units and starts at zero when system boots. - @result kIOReturnSuccess if everything is fine, kIOReturnNoResources if action hasn't been declared by init or IOEventSource::setAction (qqv). */ - virtual IOReturn wakeAtTime(AbsoluteTime abstime); - -/*! @function cancelTimeout - @abstract Disable any outstanding calls to this event source. - @discussion Clear down any oustanding calls. By the time this function completes it is guaranteed that the action will not be called again. */ - virtual void cancelTimeout(); - -private: - static void timeoutAndRelease(void *self, void *wl); - -private: - OSMetaClassDeclareReservedUnused(IOTimerEventSource, 0); - OSMetaClassDeclareReservedUnused(IOTimerEventSource, 1); - OSMetaClassDeclareReservedUnused(IOTimerEventSource, 2); - OSMetaClassDeclareReservedUnused(IOTimerEventSource, 3); - OSMetaClassDeclareReservedUnused(IOTimerEventSource, 4); - OSMetaClassDeclareReservedUnused(IOTimerEventSource, 5); - OSMetaClassDeclareReservedUnused(IOTimerEventSource, 6); - OSMetaClassDeclareReservedUnused(IOTimerEventSource, 7); -}; - -#endif /* !_IOTIMEREVENTSOURCE */ diff --git a/i386/include/IOKit/IOTypes.h b/i386/include/IOKit/IOTypes.h deleted file mode 100644 index 5d20efb..0000000 --- a/i386/include/IOKit/IOTypes.h +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef __IOKIT_IOTYPES_H -#define __IOKIT_IOTYPES_H - -#ifndef IOKIT -#define IOKIT 1 -#endif /* !IOKIT */ - -#if KERNEL -#include <IOKit/system.h> -#else -#include <mach/message.h> -#include <mach/vm_types.h> -#endif - -#include <IOKit/IOReturn.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef NULL -#if defined (__cplusplus) -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -/* - * Simple data types. - */ -#ifndef __MACTYPES__ /* CF MacTypes.h */ -#ifndef __TYPES__ /* guess... Mac Types.h */ - -#include <stdbool.h> -#include <libkern/OSTypes.h> - -#endif /* __TYPES__ */ -#endif /* __MACTYPES__ */ - -#if KERNEL -#include <libkern/OSBase.h> -#endif - -typedef UInt32 IOOptionBits; -typedef SInt32 IOFixed; -typedef UInt32 IOVersion; -typedef UInt32 IOItemCount; -typedef UInt32 IOCacheMode; - -typedef UInt32 IOByteCount32; -typedef UInt64 IOByteCount64; - -typedef UInt32 IOPhysicalAddress32; -typedef UInt64 IOPhysicalAddress64; -typedef UInt32 IOPhysicalLength32; -typedef UInt64 IOPhysicalLength64; - -#ifdef __LP64__ -typedef mach_vm_address_t IOVirtualAddress; -#else -typedef vm_address_t IOVirtualAddress; -#endif - -#if defined(__LP64__) && defined(KERNEL) -typedef IOByteCount64 IOByteCount; -#else -typedef IOByteCount32 IOByteCount; -#endif - -typedef IOVirtualAddress IOLogicalAddress; - -#if defined(__LP64__) && defined(KERNEL) - -typedef IOPhysicalAddress64 IOPhysicalAddress; -typedef IOPhysicalLength64 IOPhysicalLength; -#define IOPhysical32( hi, lo ) ((UInt64) lo + ((UInt64)(hi) << 32)) -#define IOPhysSize 64 - -#else - -typedef IOPhysicalAddress32 IOPhysicalAddress; -typedef IOPhysicalLength32 IOPhysicalLength; -#define IOPhysical32( hi, lo ) (lo) -#define IOPhysSize 32 - -#endif - - -typedef struct -{ - IOPhysicalAddress address; - IOByteCount length; -} IOPhysicalRange; - -typedef struct -{ - IOVirtualAddress address; - IOByteCount length; -} IOVirtualRange; - -#ifdef __LP64__ -typedef IOVirtualRange IOAddressRange; -#else /* !__LP64__ */ -typedef struct -{ - mach_vm_address_t address; - mach_vm_size_t length; -} IOAddressRange; -#endif /* !__LP64__ */ - -/* - * Map between #defined or enum'd constants and text description. - */ -typedef struct { - int value; - const char *name; -} IONamedValue; - - -/* - * Memory alignment -- specified as a power of two. - */ -typedef unsigned int IOAlignment; - -#define IO_NULL_VM_TASK ((vm_task_t)0) - - -/* - * Pull in machine specific stuff. - */ - -//#include <IOKit/machine/IOTypes.h> - -#ifndef MACH_KERNEL - -#ifndef __IOKIT_PORTS_DEFINED__ -#define __IOKIT_PORTS_DEFINED__ -typedef struct OSObject * io_object_t; -#endif /* __IOKIT_PORTS_DEFINED__ */ - -#include <device/device_types.h> - -typedef io_object_t io_connect_t; -typedef io_object_t io_enumerator_t; -typedef io_object_t io_iterator_t; -typedef io_object_t io_registry_entry_t; -typedef io_object_t io_service_t; - -#define IO_OBJECT_NULL ((io_object_t) 0) - -#endif /* MACH_KERNEL */ - -// IOConnectMapMemory memoryTypes -enum { - kIODefaultMemoryType = 0 -}; - -enum { - kIODefaultCache = 0, - kIOInhibitCache = 1, - kIOWriteThruCache = 2, - kIOCopybackCache = 3, - kIOWriteCombineCache = 4 -}; - -// IOMemory mapping options -enum { - kIOMapAnywhere = 0x00000001, - - kIOMapCacheMask = 0x00000700, - kIOMapCacheShift = 8, - kIOMapDefaultCache = kIODefaultCache << kIOMapCacheShift, - kIOMapInhibitCache = kIOInhibitCache << kIOMapCacheShift, - kIOMapWriteThruCache = kIOWriteThruCache << kIOMapCacheShift, - kIOMapCopybackCache = kIOCopybackCache << kIOMapCacheShift, - kIOMapWriteCombineCache = kIOWriteCombineCache << kIOMapCacheShift, - - kIOMapUserOptionsMask = 0x00000fff, - - kIOMapReadOnly = 0x00001000, - - kIOMapStatic = 0x01000000, - kIOMapReference = 0x02000000, - kIOMapUnique = 0x04000000 -}; - -/*! @enum Scale Factors - @discussion Used when a scale_factor parameter is required to define a unit of time. - @constant kNanosecondScale Scale factor for nanosecond based times. - @constant kMicrosecondScale Scale factor for microsecond based times. - @constant kMillisecondScale Scale factor for millisecond based times. - @constant kTickScale Scale factor for the standard (100Hz) tick. - @constant kSecondScale Scale factor for second based times. */ - -enum { - kNanosecondScale = 1, - kMicrosecondScale = 1000, - kMillisecondScale = 1000 * 1000, - kSecondScale = 1000 * 1000 * 1000, - kTickScale = (kSecondScale / 100) -}; - -/* compatibility types */ - - -#ifdef __cplusplus -} -#endif - -#endif /* ! __IOKIT_IOTYPES_H */ diff --git a/i386/include/IOKit/IOUserClient.h b/i386/include/IOKit/IOUserClient.h deleted file mode 100644 index c1d7fe5..0000000 --- a/i386/include/IOKit/IOUserClient.h +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -/* - * Changes to this API are expected. - */ - -#ifndef _IOKIT_IOUSERCLIENT_H -#define _IOKIT_IOUSERCLIENT_H - -#include <IOKit/IOTypes.h> -#include <IOKit/IOService.h> -#include <IOKit/OSMessageNotification.h> - - -enum { - kIOUCTypeMask = 0x0000000f, - kIOUCScalarIScalarO = 0, - kIOUCScalarIStructO = 2, - kIOUCStructIStructO = 3, - kIOUCScalarIStructI = 4, - - kIOUCForegroundOnly = 0x00000010, -}; - -/*! @enum - @abstract Constant to denote a variable length structure argument to IOUserClient. - @constant kIOUCVariableStructureSize Use in the structures IOExternalMethod, IOExternalAsyncMethod, IOExternalMethodDispatch to specify the size of the structure is variable. -*/ -enum { - kIOUCVariableStructureSize = 0xffffffff -}; - - -typedef IOReturn (IOService::*IOMethod)(void * p1, void * p2, void * p3, - void * p4, void * p5, void * p6 ); - -typedef IOReturn (IOService::*IOAsyncMethod)(OSAsyncReference asyncRef, - void * p1, void * p2, void * p3, - void * p4, void * p5, void * p6 ); - -typedef IOReturn (IOService::*IOTrap)(void * p1, void * p2, void * p3, - void * p4, void * p5, void * p6 ); - -struct IOExternalMethod { - IOService * object; - IOMethod func; - IOOptionBits flags; - IOByteCount count0; - IOByteCount count1; -}; - -struct IOExternalAsyncMethod { - IOService * object; - IOAsyncMethod func; - IOOptionBits flags; - IOByteCount count0; - IOByteCount count1; -}; - -struct IOExternalTrap { - IOService * object; - IOTrap func; -}; - -enum { - kIOUserNotifyMaxMessageSize = 64 -}; - -// keys for clientHasPrivilege -#define kIOClientPrivilegeAdministrator "root" -#define kIOClientPrivilegeLocalUser "local" -#define kIOClientPrivilegeForeground "foreground" - -/*! @enum - @abstract Constants to specify the maximum number of scalar arguments in the IOExternalMethodArguments structure. These constants are documentary since the scalarInputCount, scalarOutputCount fields reflect the actual number passed. - @constant kIOExternalMethodScalarInputCountMax The maximum number of scalars able to passed on input. - @constant kIOExternalMethodScalarOutputCountMax The maximum number of scalars able to passed on output. -*/ -enum { - kIOExternalMethodScalarInputCountMax = 16, - kIOExternalMethodScalarOutputCountMax = 16, -}; - - -struct IOExternalMethodArguments -{ - uint32_t version; - - uint32_t selector; - - mach_port_t asyncWakePort; - io_user_reference_t * asyncReference; - uint32_t asyncReferenceCount; - - const uint64_t * scalarInput; - uint32_t scalarInputCount; - - const void * structureInput; - uint32_t structureInputSize; - - IOMemoryDescriptor * structureInputDescriptor; - - uint64_t * scalarOutput; - uint32_t scalarOutputCount; - - void * structureOutput; - uint32_t structureOutputSize; - - IOMemoryDescriptor * structureOutputDescriptor; - uint32_t structureOutputDescriptorSize; - - uint32_t __reserved[32]; -}; - -typedef IOReturn (*IOExternalMethodAction)(OSObject * target, void * reference, - IOExternalMethodArguments * arguments); -struct IOExternalMethodDispatch -{ - IOExternalMethodAction function; - uint32_t checkScalarInputCount; - uint32_t checkStructureInputSize; - uint32_t checkScalarOutputCount; - uint32_t checkStructureOutputSize; -}; - -enum { -#define IO_EXTERNAL_METHOD_ARGUMENTS_CURRENT_VERSION 1 - kIOExternalMethodArgumentsCurrentVersion = IO_EXTERNAL_METHOD_ARGUMENTS_CURRENT_VERSION -}; - - -/*! - @class IOUserClient - @abstract Provides a basis for communication between client applications and I/O Kit objects. -*/ - - -class IOUserClient : public IOService -{ - OSDeclareAbstractStructors(IOUserClient) - -protected: -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of this class in the future. -*/ - struct ExpansionData { }; - -/*! @var reserved - Reserved for future use. (Internal use only) -*/ - ExpansionData * reserved; - -private: - OSSet * mappings; - UInt8 sharedInstance; - UInt8 __reservedA[3]; - void * __reserved[7]; - -public: - virtual IOReturn externalMethod( uint32_t selector, IOExternalMethodArguments * arguments, - IOExternalMethodDispatch * dispatch = 0, OSObject * target = 0, void * reference = 0 ); - - virtual IOReturn registerNotificationPort( - mach_port_t port, UInt32 type, io_user_reference_t refCon); - -private: -#if __LP64__ - OSMetaClassDeclareReservedUnused(IOUserClient, 0); - OSMetaClassDeclareReservedUnused(IOUserClient, 1); -#else - OSMetaClassDeclareReservedUsed(IOUserClient, 0); - OSMetaClassDeclareReservedUsed(IOUserClient, 1); -#endif - OSMetaClassDeclareReservedUnused(IOUserClient, 2); - OSMetaClassDeclareReservedUnused(IOUserClient, 3); - OSMetaClassDeclareReservedUnused(IOUserClient, 4); - OSMetaClassDeclareReservedUnused(IOUserClient, 5); - OSMetaClassDeclareReservedUnused(IOUserClient, 6); - OSMetaClassDeclareReservedUnused(IOUserClient, 7); - OSMetaClassDeclareReservedUnused(IOUserClient, 8); - OSMetaClassDeclareReservedUnused(IOUserClient, 9); - OSMetaClassDeclareReservedUnused(IOUserClient, 10); - OSMetaClassDeclareReservedUnused(IOUserClient, 11); - OSMetaClassDeclareReservedUnused(IOUserClient, 12); - OSMetaClassDeclareReservedUnused(IOUserClient, 13); - OSMetaClassDeclareReservedUnused(IOUserClient, 14); - OSMetaClassDeclareReservedUnused(IOUserClient, 15); - - -protected: - static IOReturn sendAsyncResult(OSAsyncReference reference, - IOReturn result, void *args[], UInt32 numArgs); - static void setAsyncReference(OSAsyncReference asyncRef, - mach_port_t wakePort, - void *callback, void *refcon); - - static IOReturn sendAsyncResult64(OSAsyncReference64 reference, - IOReturn result, io_user_reference_t args[], UInt32 numArgs); - static void setAsyncReference64(OSAsyncReference64 asyncRef, - mach_port_t wakePort, - mach_vm_address_t callback, io_user_reference_t refcon); -public: - - static IOReturn clientHasPrivilege( void * securityToken, - const char * privilegeName ); - - /*! - @function releaseAsyncReference64 - @abstract Release the mach_port_t reference held within the OSAsyncReference64 structure. - @discussion The OSAsyncReference64 structure passed to async methods holds a reference to the wakeup mach port, which should be released to balance each async method call. Behavior is undefined if these calls are not correctly balanced. - @param reference The reference passed to the subclass IOAsyncMethod, or externalMethod() in the IOExternalMethodArguments.asyncReference field. - @result A return code. - */ - static IOReturn releaseAsyncReference64(OSAsyncReference64 reference); - /*! - @function releaseNotificationPort - @abstract Release the mach_port_t passed to registerNotificationPort(). - @discussion The mach_port_t passed to the registerNotificationPort() methods should be released to balance each call to registerNotificationPort(). Behavior is undefined if these calls are not correctly balanced. - @param reference The mach_port_t argument previously passed to the subclass implementation of registerNotificationPort(). - @result A return code. - */ - static IOReturn releaseNotificationPort(mach_port_t port); - - virtual bool init(); - virtual bool init( OSDictionary * dictionary ); - // Currently ignores the all args, just passes up to IOService::init() - virtual bool initWithTask( - task_t owningTask, void * securityToken, UInt32 type, - OSDictionary * properties); - - virtual bool initWithTask( - task_t owningTask, void * securityToken, UInt32 type); - - virtual void free(); - - virtual IOReturn clientClose( void ); - virtual IOReturn clientDied( void ); - - virtual IOService * getService( void ); - - virtual IOReturn registerNotificationPort( - mach_port_t port, UInt32 type, UInt32 refCon ); - - virtual IOReturn getNotificationSemaphore( UInt32 notification_type, - semaphore_t * semaphore ); - - virtual IOReturn connectClient( IOUserClient * client ); - - // memory will be released by user client when last map is destroyed - virtual IOReturn clientMemoryForType( UInt32 type, - IOOptionBits * options, - IOMemoryDescriptor ** memory ); - -#if !__LP64__ -private: - APPLE_KEXT_COMPATIBILITY_VIRTUAL - IOMemoryMap * mapClientMemory( IOOptionBits type, - task_t task, - IOOptionBits mapFlags = kIOMapAnywhere, - IOVirtualAddress atAddress = 0 ); -#endif - -public: - - /*! - @function removeMappingForDescriptor - Remove the first mapping created from the memory descriptor returned by clientMemoryForType() from IOUserClient's list of mappings. If such a mapping exists, it is retained and the reference currently held by IOUserClient is returned to the caller. - @param memory The memory descriptor instance previously returned by the implementation of clientMemoryForType(). - @result A reference to the first IOMemoryMap instance found in the list of mappings created by IOUserClient from that passed memory descriptor is returned, or zero if none exist. The caller should release this reference. - */ - IOMemoryMap * removeMappingForDescriptor(IOMemoryDescriptor * memory); - - /*! - @function exportObjectToClient - Make an arbitrary OSObject available to the client task. - @param task The task. - @param obj The object we want to export to the client. - @param clientObj Returned value is the client's port name. - */ - virtual IOReturn exportObjectToClient(task_t task, - OSObject *obj, io_object_t *clientObj); - - // Old methods for accessing method vector backward compatiblility only - virtual IOExternalMethod * - getExternalMethodForIndex( UInt32 index ) - APPLE_KEXT_DEPRECATED; - virtual IOExternalAsyncMethod * - getExternalAsyncMethodForIndex( UInt32 index ) - APPLE_KEXT_DEPRECATED; - - // Methods for accessing method vector. - virtual IOExternalMethod * - getTargetAndMethodForIndex( IOService ** targetP, UInt32 index ); - virtual IOExternalAsyncMethod * - getAsyncTargetAndMethodForIndex( IOService ** targetP, UInt32 index ); - - // Methods for accessing trap vector - old and new style - virtual IOExternalTrap * - getExternalTrapForIndex( UInt32 index ) - APPLE_KEXT_DEPRECATED; - - virtual IOExternalTrap * - getTargetAndTrapForIndex( IOService **targetP, UInt32 index ); -}; - -#endif /* ! _IOKIT_IOUSERCLIENT_H */ - diff --git a/i386/include/IOKit/IOWorkLoop.h b/i386/include/IOKit/IOWorkLoop.h deleted file mode 100644 index 808329a..0000000 --- a/i386/include/IOKit/IOWorkLoop.h +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright (c) 1998-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* -Copyright (c) 1998 Apple Computer, Inc. All rights reserved. -HISTORY - 1998-7-13 Godfrey van der Linden(gvdl) - Created. - 1998-10-30 Godfrey van der Linden(gvdl) - Converted to C++ -*/ - -#ifndef __IOKIT_IOWORKLOOP_H -#define __IOKIT_IOWORKLOOP_H - -#include <libkern/c++/OSObject.h> -#include <IOKit/IOReturn.h> -#include <IOKit/IOLib.h> -#include <IOKit/IOLocks.h> - -#include <IOKit/system.h> - -class IOEventSource; -class IOTimerEventSource; -class IOCommandGate; - -/*! @class IOWorkLoop - @discussion An IOWorkLoop is a thread of control that is intended to be used to provide single threaded access to hardware. This class has no knowledge of the nature and type of the events that it marshals and forwards. When a device driver successfully starts (see IOService::start), it is expected to create the event sources it will need to receive events. Then a work loop is initialized and the events are added to the work loop for monitoring. In general this set up will be automated by the family superclass of the specific device. -<br><br> - The thread main method walks the event source linked list and messages each one requesting a work check. At this point each event source is expected to notify its registered owner that the event has occurred. After each event has been walked and each indicates that another loop isn't required (by setting the 'more' flag to false) the thread will go to sleep on a signaling semaphore. -<br><br> - When an event source is registered with a work loop it is informed of the semaphore to use to wake up the loop. -*/ -class IOWorkLoop : public OSObject -{ - OSDeclareDefaultStructors(IOWorkLoop) - -public: -/*! - @typedef Action - @discussion Type and arguments of callout C function that is used when -a runCommand is executed by a client. Cast to this type when you want a C++ -member function to be used. Note the arg1 - arg3 parameters are straight pass -through from the runCommand to the action callout. - @param target - Target of the function, can be used as a refcon. Note if a C++ function -was specified, this parameter is implicitly the first parameter in the target -member function's parameter list. - @param arg0 Argument to action from run operation. - @param arg1 Argument to action from run operation. - @param arg2 Argument to action from run operation. - @param arg3 Argument to action from run operation. -*/ - typedef IOReturn (*Action)(OSObject *target, - void *arg0, void *arg1, - void *arg2, void *arg3); - enum { - kPreciousStack = 0x00000001 - }; - -private: -/*! @function threadMainContinuation - @abstract Static function that calls the threadMain function. -*/ - static void threadMainContinuation(IOWorkLoop *self); - -protected: - -/*! @typedef maintCommandEnum - @discussion Enumeration of commands that _maintCommand can deal with. - @constant mAddEvent Used to tag a Remove event source command. - @constant mRemoveEvent Used to tag a Remove event source command. -*/ - typedef enum { mAddEvent, mRemoveEvent } maintCommandEnum; - -/*! @var gateLock - Mutual exclusion lock that is used by close and open Gate functions. - This is a recursive lock, which allows multiple layers of code to share a single IOWorkLoop without deadlock. This is common in IOKit since threads of execution tend to follow the service plane in the IORegistry, and multiple objects along the call path may acquire the gate for the same (shared) workloop. -*/ - IORecursiveLock *gateLock; - -/*! @var eventChain - Pointer to first event source in linked list. -*/ - IOEventSource *eventChain; - -/*! @var controlG - Internal control gate to maintain event system. -*/ - IOCommandGate *controlG; - -/*! @var workToDoLock - The spin lock that is used to guard the 'workToDo' variable. -*/ - IOSimpleLock *workToDoLock; - -/*! @var workThread - Work loop thread. -*/ - IOThread workThread; - -/*! @var workToDo - Used to to indicate that an interrupt has fired and needs to be processed. -*/ - volatile bool workToDo; - -/*! @var loopRestart - Set if an event chain has been changed and the system has to be rechecked from start. (Internal use only) -*/ - bool loopRestart; - -/*! @struct ExpansionData - @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future. -*/ - struct ExpansionData { - IOOptionBits options; - }; - -/*! @var reserved - Reserved for future use. (Internal use only) -*/ - ExpansionData *reserved; - -/*! @function _maintRequest - @abstract Synchronous implementation of addEventSource and removeEventSource functions. - @discussion This function implements the commands as defined in the maintCommandEnum. It can be subclassed but it isn't an external API in the usual sense. A subclass implementation of _maintRequest would be called synchronously with respect to the work loop and it should be implemented in the usual way that an ioctl would be. - @return kIOReturnUnsupported if the command given is not implemented, kIOReturnSuccess otherwise. -*/ - virtual IOReturn _maintRequest(void *command, void *data, void *, void *); - -/*! @function free - @discussion Mandatory free of the object independent of the current retain count. If the work loop is running, this method will not return until the thread has successfully terminated. Each event source in the chain will be released and the working semaphore will be destroyed. -<br><br> - If the client has some outstanding requests on an event they will never be informed of completion. If an external thread is blocked on any of the event sources they will be awakened with a KERN_INTERUPTED status. -*/ - virtual void free(); - -/*! @function threadMain - @discussion Work loop threads main function. This function consists of 3 - loops: the outermost loop is the semaphore clear and wait loop, the middle - loop terminates when there is no more work, and the inside loop walks the - event list calling the checkForWork method in each event source. If an - event source has more work to do, it can set the more flag and the middle - loop will repeat. When no more work is outstanding the outermost will - sleep until an event is signalled. -*/ - virtual void threadMain(); - -public: - -/*! @function workLoop - @abstract Factory member function to construct and intialize a work loop. - @result Returns a workLoop instance if constructed successfully, 0 otherwise. -*/ - static IOWorkLoop *workLoop(); - -/*! @function workLoopWithOptions(IOOptionBits options) - @abstract Factory member function to constuct and intialize a work loop. - @param options Options - kPreciousStack to avoid stack deallocation on paging path. - @result Returns a workLoop instance if constructed successfully, 0 otherwise. -*/ - static IOWorkLoop *workLoopWithOptions(IOOptionBits options); - -/*! @function init - @discussion Initializes an instance of the workloop. This method creates and initializes the signaling semaphore, the controller gate lock, and spawns the thread that will continue executing. - @result Returns true if initialized successfully, false otherwise. -*/ - virtual bool init(); - -/*! @function getThread - @abstract Gets the workThread. - @result Returns workThread. -*/ - virtual IOThread getThread() const; - -/*! @function onThread - @abstract Is the current execution context on the work thread? - @result Returns true if IOThreadSelf() == workThread. -*/ - virtual bool onThread() const; - -/*! @function inGate - @abstract Is the current execution context holding the work-loop's gate? - @result Returns true if IOThreadSelf() is gate holder. -*/ - virtual bool inGate() const; - -/*! @function addEventSource - @discussion Add an event source to be monitored by the work loop. This function does not return until the work loop has acknowledged the arrival of the new event source. When a new event has been added the threadMain will always restart its loop and check all outstanding events. The event source is retained by the work loop. - @param newEvent Pointer to IOEventSource subclass to add. - @result Always returns kIOReturnSuccess. -*/ - virtual IOReturn addEventSource(IOEventSource *newEvent); - -/*! @function removeEventSource - @discussion Remove an event source from the work loop. This function does not return until the work loop has acknowledged the removal of the event source. When an event has been removed the threadMain will always restart its loop and check all outstanding events. The event source will be released before return. - @param toRemove Pointer to IOEventSource subclass to remove. - @result Returns kIOReturnSuccess if successful, kIOReturnBadArgument if toRemove couldn't be found. -*/ - virtual IOReturn removeEventSource(IOEventSource *toRemove); - -/*! @function enableAllEventSources - @abstract Calls enable() in all event sources. - @discussion For all event sources in eventChain, call enable() function. See IOEventSource::enable(). -*/ - virtual void enableAllEventSources() const; - -/*! @function disableAllEventSources - @abstract Calls disable() in all event sources. - @discussion For all event sources in eventChain, call disable() function. See IOEventSource::disable(). -*/ - virtual void disableAllEventSources() const; - -/*! @function enableAllInterrupts - @abstract Calls enable() in all interrupt event sources. - @discussion For all event sources (ES) for which IODynamicCast(IOInterruptEventSource, ES) is valid, in eventChain call enable() function. See IOEventSource::enable(). -*/ - virtual void enableAllInterrupts() const; - -/*! @function disableAllInterrupts - @abstract Calls disable() in all interrupt event sources. - @discussion For all event sources (ES) for which IODynamicCast(IOInterruptEventSource, ES) is valid, in eventChain call disable() function. See IOEventSource::disable(). -*/ - virtual void disableAllInterrupts() const; - - -protected: - // Internal APIs used by event sources to control the thread - friend class IOEventSource; - friend class IOTimerEventSource; - virtual void signalWorkAvailable(); - virtual void openGate(); - virtual void closeGate(); - virtual bool tryCloseGate(); - virtual int sleepGate(void *event, UInt32 interuptibleType); - virtual void wakeupGate(void *event, bool oneThread); - -public: - /* methods available in Mac OS X 10.1 or later */ - -/*! @function runAction - @abstract Single thread a call to an action with the work-loop. - @discussion Client function that causes the given action to be called in a single threaded manner. Beware: the work-loop's gate is recursive and runAction can cause direct or indirect re-entrancy. When executing on a client's thread, runAction will sleep until the work-loop's gate opens for execution of client actions, the action is single threaded against all other work-loop event sources. - @param action Pointer to function to be executed in work-loop context. - @param arg0 Parameter for action parameter, defaults to 0. - @param arg1 Parameter for action parameter, defaults to 0. - @param arg2 Parameter for action parameter, defaults to 0. - @param arg3 Parameter for action parameter, defaults to 0. - @result Returns the value of the Action callout. -*/ - virtual IOReturn runAction(Action action, OSObject *target, - void *arg0 = 0, void *arg1 = 0, - void *arg2 = 0, void *arg3 = 0); - -/*! @function runEventSources - @discussion Consists of the inner 2 loops of the threadMain function(qv). - The outer loop terminates when there is no more work, and the inside loop - walks the event list calling the checkForWork method in each event source. - If an event source has more work to do, it can set the more flag and the - outer loop will repeat. -<br><br> - This function can be used to clear a priority inversion between the normal - workloop thread and multimedia's real time threads. The problem is that - the interrupt action routine is often held off by high priority threads. - So if they want to get their data now they will have to call us and ask if - any data is available. The multi-media user client will arrange for this - function to be called, which causes any pending interrupts to be processed - and the completion routines called. By the time the function returns all - outstanding work will have been completed at the real time threads - priority. - - @result Return false if the work loop is shutting down, true otherwise. -*/ - virtual bool runEventSources(); - -protected: - // Internal APIs used by event sources to control the thread - virtual int sleepGate(void *event, AbsoluteTime deadline, UInt32 interuptibleType); - -protected: -#if __LP64__ - OSMetaClassDeclareReservedUnused(IOWorkLoop, 0); - OSMetaClassDeclareReservedUnused(IOWorkLoop, 1); - OSMetaClassDeclareReservedUnused(IOWorkLoop, 2); -#else - OSMetaClassDeclareReservedUsed(IOWorkLoop, 0); - OSMetaClassDeclareReservedUsed(IOWorkLoop, 1); - OSMetaClassDeclareReservedUsed(IOWorkLoop, 2); -#endif - OSMetaClassDeclareReservedUnused(IOWorkLoop, 3); - OSMetaClassDeclareReservedUnused(IOWorkLoop, 4); - OSMetaClassDeclareReservedUnused(IOWorkLoop, 5); - OSMetaClassDeclareReservedUnused(IOWorkLoop, 6); - OSMetaClassDeclareReservedUnused(IOWorkLoop, 7); -}; - -#endif /* !__IOKIT_IOWORKLOOP_H */ diff --git a/i386/include/IOKit/OSMessageNotification.h b/i386/include/IOKit/OSMessageNotification.h deleted file mode 100644 index 7d7b5e5..0000000 --- a/i386/include/IOKit/OSMessageNotification.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - -#ifndef __OS_OSMESSAGENOTIFICATION_H -#define __OS_OSMESSAGENOTIFICATION_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <mach/mach_types.h> -#include <device/device_types.h> -#include <IOKit/IOReturn.h> - -enum { - kFirstIOKitNotificationType = 100, - kIOServicePublishNotificationType = 100, - kIOServiceMatchedNotificationType = 101, - kIOServiceTerminatedNotificationType = 102, - kIOAsyncCompletionNotificationType = 150, - kIOServiceMessageNotificationType = 160, - kLastIOKitNotificationType = 199 -}; - -enum { - kOSNotificationMessageID = 53, - kOSAsyncCompleteMessageID = 57, - kMaxAsyncArgs = 16 -}; - -enum { - kIOAsyncReservedIndex = 0, - kIOAsyncReservedCount, - - kIOAsyncCalloutFuncIndex = kIOAsyncReservedCount, - kIOAsyncCalloutRefconIndex, - kIOAsyncCalloutCount, - - kIOMatchingCalloutFuncIndex = kIOAsyncReservedCount, - kIOMatchingCalloutRefconIndex, - kIOMatchingCalloutCount, - - kIOInterestCalloutFuncIndex = kIOAsyncReservedCount, - kIOInterestCalloutRefconIndex, - kIOInterestCalloutServiceIndex, - kIOInterestCalloutCount -}; - - - -// -------------- -enum { - kOSAsyncRef64Count = 8, - kOSAsyncRef64Size = kOSAsyncRef64Count * ((int) sizeof(io_user_reference_t)) -}; -typedef io_user_reference_t OSAsyncReference64[kOSAsyncRef64Count]; - -struct OSNotificationHeader64 { - mach_msg_size_t size; /* content size */ - natural_t type; - OSAsyncReference64 reference; - -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) - unsigned char content[]; -#else - unsigned char content[0]; -#endif -}; - -#pragma pack(4) -struct IOServiceInterestContent64 { - natural_t messageType; - io_user_reference_t messageArgument[1]; -}; -#pragma pack() -// -------------- - -#if !KERNEL_USER32 - -enum { - kOSAsyncRefCount = 8, - kOSAsyncRefSize = 32 -}; -typedef natural_t OSAsyncReference[kOSAsyncRefCount]; - -struct OSNotificationHeader { - mach_msg_size_t size; /* content size */ - natural_t type; - OSAsyncReference reference; - -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) - unsigned char content[]; -#else - unsigned char content[0]; -#endif -}; - -#pragma pack(4) -struct IOServiceInterestContent { - natural_t messageType; - void * messageArgument[1]; -}; -#pragma pack() - -#endif /* KERNEL_USER32 */ - -struct IOAsyncCompletionContent { - IOReturn result; -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) - void * args[] __attribute__ ((packed)); -#else - void * args[0] __attribute__ ((packed)); -#endif -}; - -#ifndef __cplusplus -typedef struct OSNotificationHeader OSNotificationHeader; -typedef struct IOServiceInterestContent IOServiceInterestContent; -typedef struct IOAsyncCompletionContent IOAsyncCompletionContent; -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __OS_OSMESSAGENOTIFICATION_H */ - diff --git a/i386/include/IOKit/assert.h b/i386/include/IOKit/assert.h deleted file mode 100644 index 4c56050..0000000 --- a/i386/include/IOKit/assert.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _IO_ASSERT_H_ -#define _IO_ASSERT_H_ -#include <sys/cdefs.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#if IOASSERT -#undef MACH_ASSERT -#define MACH_ASSERT 1 -#endif -#include <kern/assert.h> - -#ifdef __cplusplus -} -#endif - - -#if( !defined( OSCompileAssert ) ) -# define OSCompileAssert( TEST ) \ - extern int OSCompileAssertFailed[ ( TEST ) ? 1 : -1 ] __unused; -#endif - -#endif /* _IO_ASSERT_H_ */ - diff --git a/i386/include/IOKit/system.h b/i386/include/IOKit/system.h deleted file mode 100644 index 7092d59..0000000 --- a/i386/include/IOKit/system.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 1998-2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef __IOKIT_SYSTEM_H -#define __IOKIT_SYSTEM_H - -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS -#endif - -#include <sys/cdefs.h> - -__BEGIN_DECLS - -#include <mach/mach_types.h> -#include <mach/mach_interface.h> -#include <mach/memory_object_types.h> - -#include <stdarg.h> -#include <stdint.h> -#include <string.h> - -#include <IOKit/assert.h> /* Must be before other includes of kern/assert.h */ - -#include <kern/kern_types.h> -#include <kern/thread.h> -#include <kern/debug.h> -#include <kern/task.h> -#include <kern/sched_prim.h> -#include <kern/locks.h> -#include <kern/queue.h> -#include <kern/ipc_mig.h> -#include <libkern/libkern.h> - - -#ifndef _MISC_PROTOS_H_ -extern void _doprnt( const char *format, va_list *arg, - void (*lputc)(char), int radix ); -#endif - -__END_DECLS - -#endif /* !__IOKIT_SYSTEM_H */ diff --git a/i386/include/_structs.h b/i386/include/_structs.h deleted file mode 100644 index 44443b2..0000000 --- a/i386/include/_structs.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#include <sys/_structs.h> - diff --git a/i386/include/_types.h b/i386/include/_types.h deleted file mode 100644 index 6340283..0000000 --- a/i386/include/_types.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2004, 2008, 2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __TYPES_H_ -#define __TYPES_H_ - -#include <sys/_types.h> - -#if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7 -#define __strfmonlike(fmtarg, firstvararg) \ - __attribute__((__format__ (__strfmon__, fmtarg, firstvararg))) -#define __strftimelike(fmtarg) \ - __attribute__((__format__ (__strftime__, fmtarg, 0))) -#else -#define __strfmonlike(fmtarg, firstvararg) -#define __strftimelike(fmtarg) -#endif - -typedef int __darwin_nl_item; -typedef int __darwin_wctrans_t; -#ifdef __LP64__ -typedef __uint32_t __darwin_wctype_t; -#else /* !__LP64__ */ -typedef unsigned long __darwin_wctype_t; -#endif /* __LP64__ */ - -#ifdef __WCHAR_MAX__ -#define __DARWIN_WCHAR_MAX __WCHAR_MAX__ -#else /* ! __WCHAR_MAX__ */ -#define __DARWIN_WCHAR_MAX 0x7fffffff -#endif /* __WCHAR_MAX__ */ - -#if __DARWIN_WCHAR_MAX > 0xffffU -#define __DARWIN_WCHAR_MIN (-0x7fffffff - 1) -#else -#define __DARWIN_WCHAR_MIN 0 -#endif -#define __DARWIN_WEOF ((__darwin_wint_t)-1) - -#ifndef _FORTIFY_SOURCE -# if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1050) -# define _FORTIFY_SOURCE 0 -# else -# define _FORTIFY_SOURCE 2 /* on by default */ -# endif -#endif - -#endif /* __TYPES_H_ */ diff --git a/i386/include/architecture/alignment.h b/i386/include/architecture/alignment.h deleted file mode 100644 index 3a27fc4..0000000 --- a/i386/include/architecture/alignment.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 1999, 2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1996 NeXT Software, Inc. - * - * Natural alignment of shorts and longs. - * - * HISTORY - * - * 2 Sept 1992 Brian Raymor at NeXT - * Moved over to architecture. - * 18 August 1992 Jack Greenfield at NeXT - * Created. - */ - - -#if defined (__ppc__) -#include "architecture/ppc/alignment.h" -#elif defined (__i386__) -#include "architecture/i386/alignment.h" -#elif defined (__arm__) -#include "architecture/arm/alignment.h" -#else -#error architecture not supported -#endif - - diff --git a/i386/include/architecture/byte_order.h b/i386/include/architecture/byte_order.h deleted file mode 100644 index 4542986..0000000 --- a/i386/include/architecture/byte_order.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 1999-2008 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1992 NeXT Computer, Inc. - * - * Byte ordering conversion. - * - */ - -#ifndef _ARCHITECTURE_BYTE_ORDER_H_ -#define _ARCHITECTURE_BYTE_ORDER_H_ - -#include <libkern/OSByteOrder.h> - - -#endif /* _ARCHITECTURE_BYTE_ORDER_H_ */ diff --git a/i386/include/architecture/i386/alignment.h b/i386/include/architecture/i386/alignment.h deleted file mode 100644 index 17dd0ef..0000000 --- a/i386/include/architecture/i386/alignment.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1992 NeXT Computer, Inc. - * - * Natural alignment of shorts and longs (for i386) - * - * HISTORY - * - * 2 Sept 1992 Brian Raymor at NeXT - * Moved over to architecture. - * 18 August 1992 Jack Greenfield at NeXT - * Created. - */ - -#ifndef _ARCH_I386_ALIGNMENT_H_ -#define _ARCH_I386_ALIGNMENT_H_ - -/* - * NOP - */ -__inline__ static unsigned short -get_align_short(void *ivalue) -{ - return *((unsigned short *) ivalue); -} - -__inline__ static unsigned short -put_align_short(unsigned short ivalue, void *ovalue) -{ - return *((unsigned short *) ovalue) = ivalue; -} - -/* - * NOP - */ -__inline__ static unsigned long -get_align_long(void *ivalue) -{ - return *((unsigned long *) ivalue); -} - -__inline__ static unsigned long -put_align_long(unsigned long ivalue, void *ovalue) -{ - return *((unsigned long *) ovalue) = ivalue; -} - -#endif /* _ARCH_I386_ALIGNMENT_H_ */ diff --git a/i386/include/architecture/i386/asm_help.h b/i386/include/architecture/i386/asm_help.h deleted file mode 100644 index 0207c1d..0000000 --- a/i386/include/architecture/i386/asm_help.h +++ /dev/null @@ -1,398 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1991 NeXT Computer, Inc. All rights reserved. - * - * File: architecture/i386/asm_help.h - * Author: Mike DeMoney, NeXT Computer, Inc. - * Modified for i386 by: Bruce Martin, NeXT Computer, Inc. - * - * This header file defines macros useful when writing assembly code - * for the Intel i386 family processors. - * - * HISTORY - * 10-Mar-92 Bruce Martin (bmartin@next.com) - * Adapted to i386 - * 23-Jan-91 Mike DeMoney (mike@next.com) - * Created. - */ - -#ifndef _ARCH_I386_ASM_HELP_H_ -#define _ARCH_I386_ASM_HELP_H_ - -#include <architecture/i386/reg_help.h> - - -#ifdef __ASSEMBLER__ - -#define ALIGN \ - .align 2, 0x90 - -#define ROUND_TO_STACK(len) \ - (((len) + STACK_INCR - 1) / STACK_INCR * STACK_INCR) - -#ifdef notdef -#if defined(__i386__) -#define CALL_MCOUNT \ - pushl %ebp ;\ - movl %esp, %ebp ;\ - .data ;\ - 1: .long 0 ;\ - .text ;\ - lea 9b,%edx ;\ - call mcount ;\ - popl %ebp ; -#elif defined(__x86_64__) -#define CALL_MCOUNT \ - pushq %rbp ;\ - movq %rsp, %rbp ;\ - .data ;\ - 1: .quad 0 ;\ - .text ;\ - lea 9b,%r13 ;\ - call mcount ;\ - popq %rbp ; -#endif -#else -#define CALL_MCOUNT -#endif - -/* - * Prologue for functions that may call other functions. Saves - * registers and sets up a C frame. - */ -#if defined(__i386__) -#define NESTED_FUNCTION_PROLOGUE(localvarsize) \ - .set __framesize,ROUND_TO_STACK(localvarsize) ;\ - .set __nested_function, 1 ;\ - CALL_MCOUNT \ - .if __framesize ;\ - pushl %ebp ;\ - movl %esp, %ebp ;\ - subl $__framesize, %esp ;\ - .endif ;\ - pushl %edi ;\ - pushl %esi ;\ - pushl %ebx -#elif defined(__x86_64__) -#define NESTED_FUNCTION_PROLOGUE(localvarsize) \ - .set __framesize,ROUND_TO_STACK(localvarsize) ;\ - .set __nested_function, 1 ;\ - CALL_MCOUNT \ - .if __framesize ;\ - pushq %rbp ;\ - movq %rsp, %rbp ;\ - subq $__framesize, %rsp ;\ - .endif ; -#endif - -/* - * Prologue for functions that do not call other functions. Does not - * save registers (this is the functions responsibility). Does set - * up a C frame. - */ -#if defined(__i386__) -#define LEAF_FUNCTION_PROLOGUE(localvarsize) \ - .set __framesize,ROUND_TO_STACK(localvarsize) ;\ - .set __nested_function, 0 ;\ - CALL_MCOUNT \ - .if __framesize ;\ - pushl %ebp ;\ - movl %esp, %ebp ;\ - subl $__framesize, %esp ;\ - .endif -#elif defined(__x86_64__) -#define LEAF_FUNCTION_PROLOGUE(localvarsize) \ - .set __framesize,ROUND_TO_STACK(localvarsize) ;\ - .set __nested_function, 0 ;\ - CALL_MCOUNT \ - .if __framesize ;\ - pushq %rbp ;\ - movq %rsp, %rbp ;\ - subq $__framesize, %rsp ;\ - .endif -#endif - -/* - * Epilogue for any function. - * - * We assume that all Leaf functions will be responsible for saving any - * local registers they clobber. - */ -#if defined(__i386__) -#define FUNCTION_EPILOGUE \ - .if __nested_function ;\ - popl %ebx ;\ - popl %esi ;\ - popl %edi ;\ - .endif ;\ - .if __framesize ;\ - movl %ebp, %esp ;\ - popl %ebp ;\ - .endif ;\ - ret -#elif defined(__x86_64__) -#define FUNCTION_EPILOGUE \ - .if __framesize ;\ - movq %rbp, %rsp ;\ - popq %rbp ;\ - .endif ;\ - ret -#endif - -/* - * Macros for declaring procedures - * - * Use of these macros allows ctags to have a predictable way - * to find various types of declarations. They also simplify - * inserting appropriate symbol table information. - * - * NOTE: these simple stubs will be replaced with more - * complicated versions once we know what the linker and gdb - * will require as far as register use masks and frame declarations. - * These macros may also be ifdef'ed in the future to contain profiling - * code. - * - */ - -/* - * TEXT -- declare start of text segment - */ -#define TEXT \ - .text - -/* - * DATA -- declare start of data segment - */ -#define DATA \ - .data - -/* - * LEAF -- declare global leaf procedure - * NOTE: Control SHOULD NOT FLOW into a LEAF! A LEAF should only - * be jumped to. (A leaf may do an align.) Use a LABEL() if you - * need control to flow into the label. - */ -#define LEAF(name, localvarsize) \ - .globl name ;\ - ALIGN ;\ -name: ;\ - LEAF_FUNCTION_PROLOGUE(localvarsize) - -/* - * X_LEAF -- declare alternate global label for leaf - */ -#define X_LEAF(name, value) \ - .globl name ;\ - .set name,value - -/* - * P_LEAF -- declare private leaf procedure - */ -#define P_LEAF(name, localvarsize) \ - ALIGN ;\ -name: ;\ - LEAF_FUNCTION_PROLOGUE(localvarsize) - -/* - * LABEL -- declare a global code label - * MUST be used (rather than LEAF, NESTED, etc) if control - * "flows into" the label. - */ -#define LABEL(name) \ - .globl name ;\ -name: - -/* - * NESTED -- declare procedure that invokes other procedures - */ -#define NESTED(name, localvarsize) \ - .globl name ;\ - ALIGN ;\ -name: ;\ - NESTED_FUNCTION_PROLOGUE(localvarsize) - -/* - * X_NESTED -- declare alternate global label for nested proc - */ -#define X_NESTED(name, value) \ - .globl name ;\ - .set name,value - -/* - * P_NESTED -- declare private nested procedure - */ -#define P_NESTED(name, localvarsize) \ - ALIGN ;\ -name: ;\ - NESTED_FUNCTION_PROLOGUE(localvarsize) - -/* - * END -- mark end of procedure - */ -#define END(name) \ - FUNCTION_EPILOGUE - - -/* - * Storage definition macros - * The main purpose of these is to allow an easy handle for ctags - */ - -/* - * IMPORT -- import symbol - */ -#define IMPORT(name) \ - .reference name - -/* - * ABS -- declare global absolute symbol - */ -#define ABS(name, value) \ - .globl name ;\ - .set name,value - -/* - * P_ABS -- declare private absolute symbol - */ -#define P_ABS(name, value) \ - .set name,value - -/* - * EXPORT -- declare global label for data - */ -#define EXPORT(name) \ - .globl name ;\ -name: - -/* - * BSS -- declare global zero'ed storage - */ -#define BSS(name,size) \ - .comm name,size - - -/* - * P_BSS -- declare private zero'ed storage - */ -#define P_BSS(name,size) \ - .lcomm name,size - -/* - * dynamic/PIC macros for routines which reference external symbols - */ - -#if defined(__DYNAMIC__) -#if defined(__i386__) -#define PICIFY(var) \ - call 1f ; \ -1: ; \ - popl %edx ; \ - movl L ## var ## __non_lazy_ptr-1b(%edx),%edx -#elif defined(__x86_64__) -#define PICIFY(var) \ - movq var@GOTPCREL(%rip),%r11 -#endif - -#if defined(__i386__) -#define CALL_EXTERN_AGAIN(func) \ - PICIFY(func) ; \ - call *%edx -#elif defined(__x86_64__) -#define CALL_EXTERN_AGAIN(func) \ - call func -#endif - -#if defined(__i386__) -#define NON_LAZY_STUB(var) \ -.section __IMPORT,__pointers,non_lazy_symbol_pointers ; \ -L ## var ## __non_lazy_ptr: ; \ -.indirect_symbol var ; \ -.long 0 ; \ -.text -#elif defined(__x86_64__) -#define NON_LAZY_STUB(var) -#endif - -#define CALL_EXTERN(func) \ - CALL_EXTERN_AGAIN(func) ; \ - NON_LAZY_STUB(func) - -#if defined(__i386__) -#define BRANCH_EXTERN(func) \ - PICIFY(func) ; \ - jmp *%edx ; \ - NON_LAZY_STUB(func) -#elif defined(__x86_64__) -#define BRANCH_EXTERN(func) \ - jmp func -#endif - -#if defined(__i386__) -#define PUSH_EXTERN(var) \ - PICIFY(var) ; \ - movl (%edx),%edx ; \ - pushl %edx ; \ - NON_LAZY_STUB(var) -#endif - -#if defined(__i386__) -#define REG_TO_EXTERN(reg, var) \ - PICIFY(var) ; \ - movl reg, (%edx) ; \ - NON_LAZY_STUB(var) -#elif defined(__x86_64__) -#define REG_TO_EXTERN(reg, var) \ - PICIFY(var) ; \ - mov reg, (%r11) -#endif - -#if defined(__i386__) -#define EXTERN_TO_REG(var, reg) \ - call 1f ; \ -1: ; \ - popl %edx ; \ - movl L ## var ##__non_lazy_ptr-1b(%edx),reg ; \ - NON_LAZY_STUB(var) -#elif defined(__x86_64__) -#define EXTERN_TO_REG(var, reg) \ - PICIFY(var) ; \ - mov (%r11), reg -#endif - -#else -#define BRANCH_EXTERN(func) jmp func -#define PUSH_EXTERN(var) push var -#define CALL_EXTERN(func) call func -#define CALL_EXTERN_AGAIN(func) call func -#if defined(__i386__) -#define REG_TO_EXTERN(reg, var) mov reg, var -#define EXTERN_TO_REG(var, reg) mov $ ## var, reg -#elif defined(__x86_64__) -#define REG_TO_EXTERN(reg, var) mov reg, var ## (%rip) -#define EXTERN_TO_REG(var, reg) mov var ## (%rip), reg -#endif -#endif - -#endif /* __ASSEMBLER__ */ - -#endif /* _ARCH_I386_ASM_HELP_H_ */ diff --git a/i386/include/architecture/i386/byte_order.h b/i386/include/architecture/i386/byte_order.h deleted file mode 100644 index 60afd0f..0000000 --- a/i386/include/architecture/i386/byte_order.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _ARCH_I386_BYTE_ORDER_H_ -#define _ARCH_I386_BYTE_ORDER_H_ - -/* - * Maintain source compatibility - */ - -#include <architecture/byte_order.h> - -#endif /* _ARCH_I386_BYTE_ORDER_H_ */ diff --git a/i386/include/architecture/i386/cpu.h b/i386/include/architecture/i386/cpu.h deleted file mode 100644 index c5fc807..0000000 --- a/i386/include/architecture/i386/cpu.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1992 NeXT Computer, Inc. - * - * Intel386 Family: Special processor registers. - * - * HISTORY - * - * 5 April 1992 ? at NeXT - * Created. - */ - -#ifndef _ARCH_I386_CPU_H_ -#define _ARCH_I386_CPU_H_ - -/* - * Control register 0 - */ - -typedef struct _cr0 { - unsigned int pe :1, - mp :1, - em :1, - ts :1, - :1, - ne :1, - :10, - wp :1, - :1, - am :1, - :10, - nw :1, - cd :1, - pg :1; -} cr0_t; - -/* - * Debugging register 6 - */ - -typedef struct _dr6 { - unsigned int b0 :1, - b1 :1, - b2 :1, - b3 :1, - :9, - bd :1, - bs :1, - bt :1, - :16; -} dr6_t; - -#endif /* _ARCH_I386_CPU_H_ */ diff --git a/i386/include/architecture/i386/desc.h b/i386/include/architecture/i386/desc.h deleted file mode 100644 index 3997a8a..0000000 --- a/i386/include/architecture/i386/desc.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1992 NeXT Computer, Inc. - * - * Intel386 Family: Segment descriptors. - * - * HISTORY - * - * 29 March 1992 ? at NeXT - * Created. - */ - -#ifndef _ARCH_I386_DESC_H_ -#define _ARCH_I386_DESC_H_ - -/* - * Code segment descriptor. - */ - -typedef struct code_desc { - unsigned short limit00; - unsigned short base00; - unsigned char base16; - unsigned char type :5, -#define DESC_CODE_EXEC 0x18 -#define DESC_CODE_READ 0x1a - dpl :2, - present :1; - unsigned char limit16 :4, - :2, - opsz :1, -#define DESC_CODE_16B 0 -#define DESC_CODE_32B 1 - granular:1; -#define DESC_GRAN_BYTE 0 -#define DESC_GRAN_PAGE 1 - unsigned char base24; -} code_desc_t; - -/* - * Data segment descriptor. - */ - -typedef struct data_desc { - unsigned short limit00; - unsigned short base00; - unsigned char base16; - unsigned char type :5, -#define DESC_DATA_RONLY 0x10 -#define DESC_DATA_WRITE 0x12 - dpl :2, - present :1; - unsigned char limit16 :4, - :2, - stksz :1, -#define DESC_DATA_16B 0 -#define DESC_DATA_32B 1 - granular:1; - unsigned char base24; -} data_desc_t; - -/* - * LDT segment descriptor. - */ - -typedef struct ldt_desc { - unsigned short limit00; - unsigned short base00; - unsigned char base16; - unsigned char type :5, -#define DESC_LDT 0x02 - :2, - present :1; - unsigned char limit16 :4, - :3, - granular:1; - unsigned char base24; -} ldt_desc_t; - -#include <architecture/i386/sel.h> - -/* - * Call gate descriptor. - */ - -typedef struct call_gate { - unsigned short offset00; - sel_t seg; - unsigned int argcnt :5, - :3, - type :5, -#define DESC_CALL_GATE 0x0c - dpl :2, - present :1, - offset16:16; -} call_gate_t; - -/* - * Trap gate descriptor. - */ - -typedef struct trap_gate { - unsigned short offset00; - sel_t seg; - unsigned int :8, - type :5, -#define DESC_TRAP_GATE 0x0f - dpl :2, - present :1, - offset16:16; -} trap_gate_t; - - -/* - * Interrupt gate descriptor. - */ - -typedef struct intr_gate { - unsigned short offset00; - sel_t seg; - unsigned int :8, - type :5, -#define DESC_INTR_GATE 0x0e - dpl :2, - present :1, - offset16:16; -} intr_gate_t; - -#endif /* _ARCH_I386_DESC_H_ */ diff --git a/i386/include/architecture/i386/fenv.h b/i386/include/architecture/i386/fenv.h deleted file mode 100644 index 9a50747..0000000 --- a/i386/include/architecture/i386/fenv.h +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/******************************************************************************* -* * -* File: fenv.h * -* * -* Contains: typedefs and prototypes for C99 floating point environment. * -* * -*******************************************************************************/ - -#ifndef __FENV__ -#define __FENV__ - -#if defined( __ppc__ ) || defined( __ppc64__ ) - #error Wrong arch. This is Intel only. -#endif - -#if defined(__GNUC__) && (__GNUC__ >= 4) -#pragma GCC fenv -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* - A collection of functions designed to provide access to the floating - point environment for numerical programming. It is compliant with - the floating-point requirements in C99. - - Earlier versions of fenv.h were merely "modeled after" C9X. Many of the functions - that formerly returned ints now return void to be standard compliant. - - Note: There are actually two physical floating point environments on x86. There - is the one described by the x87 floating point control and status words, which applies - primarily to calculations done with long double on MacOS X for Intel. There is the - MXCSR which applies primarily to calculations done with scalar float, scalar double - and SSE/SSE2/SSE3. The high level interface, which uses FE_ macros as int arguments - to configure the fexcep_t, returns and works with values that represents the logical - OR of these two sets of flags or masks. That is, if a flag or mask is set in either - environment, it will be set in fexcept_t when the state is read. Likewise, setting - the mask using a fexcep_t will set that mask on both environments. For this reason, - changing the value of the MXCSR state or floating point control/status word state on - your own will make the results of the functions declared in this header undefined. - See below for details about how and when. Exception: you may change the FZ, DAZ, DE - and DM bits in the MXCSR independent of this interface and retain defined behavior, - so long as you do not change the other bits. It is suggested that developers who wish - this level of control access the bits in the fenv_t directly. They are direct copies - of the hardware special purpose registers of similar name. Please consult appropriate - Intel documentation for the processor about the meaning of various bits in each register. - - The file <fenv.h> declares many functions in support of numerical - programming. Programs that test flags or run under - non-default modes must do so under the effect of an enabling - "fenv_access" pragma. -*/ - -/******************************************************************************** -* * -* fenv_t is a type for representing the entire floating-point * -* environment in a single object. * -* * -* fexcept_t is a type for representing the floating-point * -* exception flag state collectively. * -* * -********************************************************************************/ -typedef struct { - unsigned short __control; /* A direct copy of the floaing point control word */ - unsigned short __status; /* A direct copy of the floaing point status word */ - unsigned int __mxcsr; /* A direct copy of the MXCSR */ - char __reserved[8]; /* Reserved for future expansion. */ -} fenv_t; - -typedef unsigned short fexcept_t; - -/* Definitions of floating-point exception macros */ -#define FE_INEXACT 0x0020 -#define FE_UNDERFLOW 0x0010 -#define FE_OVERFLOW 0x0008 -#define FE_DIVBYZERO 0x0004 -#define FE_INVALID 0x0001 -#define FE_ALL_EXCEPT 0x003D - -/* Definitions of rounding direction macros */ -#define FE_TONEAREST 0x0000 -#define FE_DOWNWARD 0x0400 -#define FE_UPWARD 0x0800 -#define FE_TOWARDZERO 0x0C00 - -/* default environment object */ -extern const fenv_t _FE_DFL_ENV; -#define FE_DFL_ENV &_FE_DFL_ENV /* pointer to default environment */ - -/******************************************************************************* -* A environment object that sets to defualt settings and in addition sets the * -* FZ and DAZ bits in the MXCSR, which causes flush-to-zero behavior of * -* denormals. When using this environment, denormals encountered by XMM based * -* calculation (which normally should be all single and double precision scalar * -* floating point calculations, and all SSE/SSE2/SSE3 computation) will be * -* treated as zero. Calculation results that are denormals will also be * -* truncated to zero. This calculation mode is not IEEE-754 compliant, but may * -* prevent lengthy stalls that occur in code that encounters denormals. It is * -* suggested that you do not use this mode unless you have established that * -* denormals are causing trouble for your code. Please use wisely. * -* * -* CAUTION: The math library currently is not architected to do the right * -* thing in the face of DAZ + FZ mode. For example, ceil( +denormal) returns * -* +denormal rather than 1.0 in some versions of MacOS X. In some circumstances * -* this may lead to unexpected application behavior. Use at your own risk. * -* * -* It is not possible to disable denorm stalls on calculation using the x87 FPU.* -*******************************************************************************/ -extern const fenv_t _FE_DFL_DISABLE_SSE_DENORMS_ENV; -#define FE_DFL_DISABLE_SSE_DENORMS_ENV &_FE_DFL_DISABLE_SSE_DENORMS_ENV - -/******************************************************************************* -* The following functions provide high level access to the exception flags.* -* The "int" input argument can be constructed by bitwise ORs of the * -* exception macros: for example: FE_OVERFLOW | FE_INEXACT. * -*******************************************************************************/ - -/******************************************************************************* -* The function "feclearexcept" clears the supported floating point * -* exceptions represented by its argument. * -*******************************************************************************/ - -extern int feclearexcept(int /*excepts*/); - - -/******************************************************************************* -* The function "fegetexceptflag" stores a implementation-defined * -* representation of the states of the floating-point status flags indicated * -* by its integer argument excepts in the object pointed to by the argument, * -* flagp. * -*******************************************************************************/ - -extern int fegetexceptflag(fexcept_t * /*flagp*/, int /*excepts*/); - - -/******************************************************************************* -* The function "feraiseexcept" raises the supported floating-point * -* exceptions represented by its argument. The order in which these * -* floating-point exceptions are raised is unspecified. * -*******************************************************************************/ - -extern int feraiseexcept(int /*excepts*/); - - -/******************************************************************************* -* The function "fesetexceptflag" sets or clears the floating point status * -* flags indicated by the argument excepts to the states stored in the * -* object pointed to by flagp. The value of the *flagp shall have been set * -* by a previous call to fegetexceptflag whose second argument represented * -* at least those floating-point exceptions represented by the argument * -* excepts. This function does not raise floating-point exceptions; it just * -* sets the state of the flags. * -*******************************************************************************/ - -extern int fesetexceptflag(const fexcept_t * /*flagp*/, int /*excepts*/); - - -/******************************************************************************* -* The function "fetestexcept" determines which of the specified subset of * -* the floating-point exception flags are currently set. The excepts * -* argument specifies the floating-point status flags to be queried. This * -* function returns the value of the bitwise OR of the floating-point * -* exception macros corresponding to the currently set floating-point * -* exceptions included in excepts. * -* * -* On MacOS X for Intel, the result is the value of union of the * -* corresponding result from the x87 and SSE floating point states. * -*******************************************************************************/ - -extern int fetestexcept(int /*excepts*/); - - -/******************************************************************************* -* The following functions provide control of rounding direction modes. * -*******************************************************************************/ - -/******************************************************************************* -* The function "fegetround" returns the value of the rounding direction * -* macro which represents the current rounding direction, or a negative * -* if there is no such rounding direction macro or the current rounding * -* direction is not determinable. * -*******************************************************************************/ - -extern int fegetround(void); - - -/******************************************************************************* -* The function "fesetround" establishes the rounding direction represented * -* by its argument "round". If the argument is not equal to the value of a * -* rounding direction macro, the rounding direction is not changed. It * -* returns zero if and only if the argument is equal to a rounding * -* direction macro. * -*******************************************************************************/ - -extern int fesetround(int /*round*/); - - -/******************************************************************************* -* The following functions manage the floating-point environment, exception * -* flags and dynamic modes, as one entity. * -*******************************************************************************/ - -/******************************************************************************* -* The fegetenv function stores the current floating-point enviornment in * -* the object pointed to by envp. * -*******************************************************************************/ -extern int fegetenv(fenv_t * /*envp*/); - -/******************************************************************************* -* The feholdexcept function saves the current floating-point environment in * -* the object pointed to by envp, clears the floating-point status flags, * -* and then installs a non-stop (continue on floating-point exceptions) * -* mode, if available, for all floating-point exceptions. The feholdexcept * -* function returns zero if and only if non-stop floating-point exceptions * -* handling was successfully installed. * -*******************************************************************************/ -extern int feholdexcept(fenv_t * /*envp*/); - -/******************************************************************************* -* The fesetnv function establishes the floating-point environment * -* represented by the object pointed to by envp. The argument envp shall * -* point to an object set by a call to fegetenv or feholdexcept, or equal to * -* a floating-point environment macro -- we define only *FE_DFL_ENV and * -* FE_DISABLE_SSE_DENORMS_ENV -- to be C99 standard compliant and portable * -* to other architectures. Note that fesetnv merely installs the state of * -* the floating-point status flags represented through its argument, and * -* does not raise these floating-point exceptions. * -* * -* On MacOS X for Intel you may test and set the bits in *envp yourself, * -* provided that you conditionalize the code appropriately to preserve * -* portability and you follow the various strictures and suggestions * -* provided by Intel in appropriate processor documentation. Please be aware * -* that because there are two hardware locations for setting and reading * -* floating point environment, this function (and others like it) are not * -* atomic -- that is, for a brief period of time during the function call * -* your new environment will have been applied to one but not both of the * -* floating point engines (x87 and SSE). In addition, the behavior of some * -* higher level interfaces (fegetround) is undefined if the x87 and SSE * -* floating point units rounding modes are configured differently. Please * -* use common sense. * -*******************************************************************************/ -extern int fesetenv(const fenv_t * /*envp*/); - -/******************************************************************************* -* The feupdateenv function saves the currently raised floating-point * -* exceptions in its automatic storage, installs the floating-point * -* environment represented by the object pointed to by envp, and then raises * -* the saved floating-point exceptions. The argument envp shall point to an * -* object set by a call to feholdexcept or fegetenv or equal a * -* floating-point environment macro. * -* * -* Please see the description of feholdexcept for additional ways to create * -* a fenv_t object, which are valid only for MacOS X for Intel. * -*******************************************************************************/ -extern int feupdateenv(const fenv_t * /*envp*/); - - -#ifdef __cplusplus -} -#endif - -#endif /* __FENV__ */ - diff --git a/i386/include/architecture/i386/fpu.h b/i386/include/architecture/i386/fpu.h deleted file mode 100644 index 29c260b..0000000 --- a/i386/include/architecture/i386/fpu.h +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1992 NeXT Computer, Inc. - * - * Intel386 Family: Floating Point unit. - * - * HISTORY - * - * 5 October 1992 ? at NeXT - * Added names to previously unamed fields in the mantissa. - * - * 5 April 1992 ? at NeXT - * Created. - */ - -#ifndef _ARCH_I386_FPU_H_ -#define _ARCH_I386_FPU_H_ - -/* - * Data register. - */ - -typedef struct fp_data_reg { - unsigned short mant; - unsigned short mant1 :16, - mant2 :16, - mant3 :16; - unsigned short exp :15, - sign :1; -} fp_data_reg_t; - -/* - * Data register stack. - */ - -typedef struct fp_stack { - fp_data_reg_t ST[8]; -} fp_stack_t; - -/* - * Register stack tag word. - */ - -typedef struct fp_tag { - unsigned short tag0 :2, - tag1 :2, - tag2 :2, - tag3 :2, - tag4 :2, - tag5 :2, - tag6 :2, - tag7 :2; -#define FP_TAG_VALID 0 -#define FP_TAG_ZERO 1 -#define FP_TAG_SPEC 2 -#define FP_TAG_EMPTY 3 -} fp_tag_t; - -/* - * Status word. - */ - -typedef struct fp_status { - unsigned short invalid :1, - denorm :1, - zdiv :1, - ovrfl :1, - undfl :1, - precis :1, - stkflt :1, - errsumm :1, - c0 :1, - c1 :1, - c2 :1, - tos :3, - c3 :1, - busy :1; -} fp_status_t; - -/* - * Control word. - */ - -typedef struct fp_control { - unsigned short invalid :1, - denorm :1, - zdiv :1, - ovrfl :1, - undfl :1, - precis :1, - :2, - pc :2, -#define FP_PREC_24B 0 -#define FP_PREC_53B 2 -#define FP_PREC_64B 3 - rc :2, -#define FP_RND_NEAR 0 -#define FP_RND_DOWN 1 -#define FP_RND_UP 2 -#define FP_CHOP 3 - /*inf*/ :1, - :3; -} fp_control_t; - -#include <architecture/i386/sel.h> - -/* - * Floating point 'environment' - * used by FSTENV/FLDENV instructions. - */ - -typedef struct fp_env { - fp_control_t control; - unsigned short :16; - fp_status_t status; - unsigned short :16; - fp_tag_t tag; - unsigned short :16; - unsigned int ip; - sel_t cs; - unsigned short opcode; - unsigned int dp; - sel_t ds; - unsigned short :16; -} fp_env_t; - -/* - * Floating point state - * used by FSAVE/FRSTOR instructions. - */ - -/* - * To allow the the common idiom of: - * #define environ (*_NSGetEnviron()) - * to be used these fields were renamed. Old code that that does - * not use this idiom can use the old field names by defining - * _ARCHITECTURE_I386_FPU_FPSTATE_LEGACY_FIELD_NAMES_ . - */ -typedef struct fp_state { -#if _ARCHITECTURE_I386_FPU_FPSTATE_LEGACY_FIELD_NAMES_ - fp_env_t environ; - fp_stack_t stack; -#else - fp_env_t fp_environ; - fp_stack_t fp_stack; -#endif -} fp_state_t; - -#endif /* _ARCH_I386_FPU_H_ */ diff --git a/i386/include/architecture/i386/frame.h b/i386/include/architecture/i386/frame.h deleted file mode 100644 index 112cbcd..0000000 --- a/i386/include/architecture/i386/frame.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1992 NeXT Computer, Inc. - * - * Intel386 Family: Processor exception frame. - * - * HISTORY - * - * 31 August 1992 ? at NeXT - * Added v86 mode stuff. - * - * 8 June 1992 ? at NeXT - * Changed name of write field in err_code_t - * which collided with write() in shlib. - * - * 30 March 1992 ? at NeXT - * Created. - */ - -#ifndef _ARCH_I386_FRAME_H_ -#define _ARCH_I386_FRAME_H_ - -/* - * Format of the error code - * generated by the hardware - * for certain exceptions. - */ - -typedef union err_code { - struct err_code_normal { - unsigned int ext :1, - tbl :2, -#define ERR_GDT 0 -#define ERR_IDT 1 -#define ERR_LDT 2 - index :13, - :16; - } normal; - struct err_code_pgfault { - unsigned int prot :1, - wrtflt :1, - user :1, - :29; - } pgfault; -} err_code_t; - -#include <architecture/i386/sel.h> - -/* - * The actual hardware exception frame - * is variable in size. An error code is - * only pushed for certain exceptions. - * Previous stack information is only - * pushed for exceptions that cause a - * change in privilege level. The dpl - * field of the saved CS selector can be - * used to determine whether this is the - * case. If the interrupted task was - * executing in v86 mode, then the data - * segment registers are also present in - * the exception frame (in addition to - * previous stack information). This - * case can be determined by examining - * eflags. - */ - -typedef struct except_frame { - err_code_t err; - unsigned int eip; - sel_t cs; - unsigned int :0; - unsigned int eflags; - unsigned int esp; - sel_t ss; - unsigned int :0; - unsigned short v_es; - unsigned int :0; - unsigned short v_ds; - unsigned int :0; - unsigned short v_fs; - unsigned int :0; - unsigned short v_gs; - unsigned int :0; -} except_frame_t; - -/* - * Values in eflags. - */ - -#define EFL_CF 0x00001 -#define EFL_PF 0x00004 -#define EFL_AF 0x00010 -#define EFL_ZF 0x00040 -#define EFL_SF 0x00080 -#define EFL_TF 0x00100 -#define EFL_IF 0x00200 -#define EFL_DF 0x00400 -#define EFL_OF 0x00800 -#define EFL_IOPL 0x03000 -#define EFL_NT 0x04000 -#define EFL_RF 0x10000 -#define EFL_VM 0x20000 -#define EFL_AC 0x40000 - -#define EFL_CLR 0xfff88028 -#define EFL_SET 0x00000002 - -#endif /* _ARCH_I386_FRAME_H_ */ diff --git a/i386/include/architecture/i386/io.h b/i386/include/architecture/i386/io.h deleted file mode 100644 index 07021a1..0000000 --- a/i386/include/architecture/i386/io.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1992 NeXT Computer, Inc. - * - * Intel 386 Family: IO space defines. - * - * HISTORY - * - * 11 August 1992 ? at NeXT - * Created. - */ - -#ifndef _ARCH_I386_IO_H_ -#define _ARCH_I386_IO_H_ - -typedef unsigned short io_addr_t; -typedef unsigned short io_len_t; - -#endif /* _ARCH_I386_IO_H_ */ diff --git a/i386/include/architecture/i386/math.h b/i386/include/architecture/i386/math.h deleted file mode 100644 index 6723ef4..0000000 --- a/i386/include/architecture/i386/math.h +++ /dev/null @@ -1,642 +0,0 @@ -/* - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/******************************************************************************* -* * -* File: math.h * -* * -* Contains: typedefs, prototypes, and macros germane to C99 floating point.* -* * -*******************************************************************************/ -#ifndef __MATH__ -#define __MATH__ - -#include "sys/cdefs.h" /* For definition of __DARWIN_UNIX03 et al */ - -#ifdef __cplusplus -extern "C" { -#endif - -/****************************************************************************** -* Floating point data types * -******************************************************************************/ - -/* Define float_t and double_t per C standard, ISO/IEC 9899:1999 7.12 2, - taking advantage of GCC's __FLT_EVAL_METHOD__ (which a compiler may - define anytime and GCC does) that shadows FLT_EVAL_METHOD (which a compiler - must and may define only in float.h). -*/ -#if __FLT_EVAL_METHOD__ == 0 - typedef float float_t; - typedef double double_t; -#elif __FLT_EVAL_METHOD__ == 1 - typedef double float_t; - typedef double double_t; -#elif __FLT_EVAL_METHOD__ == 2 || __FLT_EVAL_METHOD__ == -1 - typedef long double float_t; - typedef long double double_t; -#else /* __FLT_EVAL_METHOD__ */ - #error "Unsupported value of __FLT_EVAL_METHOD__." -#endif /* __FLT_EVAL_METHOD__ */ - - -#if defined(__GNUC__) - #define HUGE_VAL __builtin_huge_val() - #define HUGE_VALF __builtin_huge_valf() - #define HUGE_VALL __builtin_huge_vall() - #define NAN __builtin_nanf("0x7fc00000") /* Constant expression, can be used as initializer. */ - #define __MATH_H_ALWAYS_INLINE__ __attribute__ ((always_inline)) -#else - #define HUGE_VAL 1e500 - #define HUGE_VALF 1e50f - #define HUGE_VALL 1e5000L - #define NAN __nan( ) - #define __MATH_H_ALWAYS_INLINE__ -#endif - -#define INFINITY HUGE_VALF - - -/****************************************************************************** -* Taxonomy of floating point data types * -******************************************************************************/ - -#define FP_NAN 1 -#define FP_INFINITE 2 -#define FP_ZERO 3 -#define FP_NORMAL 4 -#define FP_SUBNORMAL 5 -#define FP_SUPERNORMAL 6 /* meaningful only on PowerPC */ - -/* fma() *function call* is more costly than equivalent (in-line) multiply and add operations */ -/* For single and double precision, the cost isn't too bad, because we can fall back on higher */ -/* precision hardware, with the necessary range to handle infinite precision products. However, */ -/* expect the long double fma to be at least an order of magnitude slower than a simple multiply */ -/* and an add. */ -#undef FP_FAST_FMA -#undef FP_FAST_FMAF -#undef FP_FAST_FMAL - -/* The values returned by `ilogb' for 0 and NaN respectively. */ -#define FP_ILOGB0 (-2147483647 - 1) -#define FP_ILOGBNAN (-2147483647 - 1) - -/* Bitmasks for the math_errhandling macro. */ -#define MATH_ERRNO 1 /* errno set by math functions. */ -#define MATH_ERREXCEPT 2 /* Exceptions raised by math functions. */ - -#define math_errhandling (__math_errhandling()) -extern unsigned int __math_errhandling ( void ); - -/******************************************************************************** -* * -* Inquiry macros * -* * -* fpclassify Returns one of the FP_Švalues. * -* isnormal Non-zero if and only if the argument x is normalized. * -* isfinite Non-zero if and only if the argument x is finite. * -* isnan Non-zero if and only if the argument x is a NaN. * -* signbit Non-zero if and only if the sign of the argument x is * -* negative. This includes, NaNs, infinities and zeros. * -* * -********************************************************************************/ - -#define fpclassify(x) \ - ( sizeof (x) == sizeof(float ) ? __fpclassifyf((float)(x)) \ - : sizeof (x) == sizeof(double) ? __fpclassifyd((double)(x)) \ - : __fpclassify ((long double)(x))) - -extern int __fpclassifyf(float ); -extern int __fpclassifyd(double ); -extern int __fpclassify (long double); - -#if defined( __GNUC__ ) && 0 == __FINITE_MATH_ONLY__ - /* Yes, that's right. You only get the fast iswhatever() macros if you do NOT turn on -ffast-math. */ - /* These inline functions require the compiler to be compiling to standard in order to work. */ - /* -ffast-math, among other things, implies that NaNs don't happen. The compiler can in that case */ - /* optimize x != x to be false always, wheras it would be true for NaNs. That breaks __inline_isnan() */ - /* below. */ - #define isnormal(x) \ - ( sizeof (x) == sizeof(float ) ? __inline_isnormalf((float)(x)) \ - : sizeof (x) == sizeof(double) ? __inline_isnormald((double)(x)) \ - : __inline_isnormal ((long double)(x))) - - #define isfinite(x) \ - ( sizeof (x) == sizeof(float ) ? __inline_isfinitef((float)(x)) \ - : sizeof (x) == sizeof(double) ? __inline_isfinited((double)(x)) \ - : __inline_isfinite ((long double)(x))) - - #define isinf(x) \ - ( sizeof (x) == sizeof(float ) ? __inline_isinff((float)(x)) \ - : sizeof (x) == sizeof(double) ? __inline_isinfd((double)(x)) \ - : __inline_isinf ((long double)(x))) - - #define isnan(x) \ - ( sizeof (x) == sizeof(float ) ? __inline_isnanf((float)(x)) \ - : sizeof (x) == sizeof(double) ? __inline_isnand((double)(x)) \ - : __inline_isnan ((long double)(x))) - - #define signbit(x) \ - ( sizeof (x) == sizeof(float ) ? __inline_signbitf((float)(x)) \ - : sizeof (x) == sizeof(double) ? __inline_signbitd((double)(x)) \ - : __inline_signbit((long double)(x))) - - static __inline__ int __inline_isfinitef (float ) __MATH_H_ALWAYS_INLINE__; - static __inline__ int __inline_isfinited (double ) __MATH_H_ALWAYS_INLINE__; - static __inline__ int __inline_isfinite (long double) __MATH_H_ALWAYS_INLINE__; - static __inline__ int __inline_isinff (float ) __MATH_H_ALWAYS_INLINE__; - static __inline__ int __inline_isinfd (double ) __MATH_H_ALWAYS_INLINE__; - static __inline__ int __inline_isinf (long double) __MATH_H_ALWAYS_INLINE__; - static __inline__ int __inline_isnanf (float ) __MATH_H_ALWAYS_INLINE__; - static __inline__ int __inline_isnand (double ) __MATH_H_ALWAYS_INLINE__; - static __inline__ int __inline_isnan (long double) __MATH_H_ALWAYS_INLINE__; - static __inline__ int __inline_isnormalf (float ) __MATH_H_ALWAYS_INLINE__; - static __inline__ int __inline_isnormald (double ) __MATH_H_ALWAYS_INLINE__; - static __inline__ int __inline_isnormal (long double) __MATH_H_ALWAYS_INLINE__; - static __inline__ int __inline_signbitf (float ) __MATH_H_ALWAYS_INLINE__; - static __inline__ int __inline_signbitd (double ) __MATH_H_ALWAYS_INLINE__; - static __inline__ int __inline_signbit (long double) __MATH_H_ALWAYS_INLINE__; - - static __inline__ int __inline_isinff( float __x ) { return __builtin_fabsf(__x) == __builtin_inff(); } - static __inline__ int __inline_isinfd( double __x ) { return __builtin_fabs(__x) == __builtin_inf(); } - static __inline__ int __inline_isinf( long double __x ) { return __builtin_fabsl(__x) == __builtin_infl(); } - static __inline__ int __inline_isfinitef( float __x ) { return __x == __x && __builtin_fabsf(__x) != __builtin_inff(); } - static __inline__ int __inline_isfinited( double __x ) { return __x == __x && __builtin_fabs(__x) != __builtin_inf(); } - static __inline__ int __inline_isfinite( long double __x ) { return __x == __x && __builtin_fabsl(__x) != __builtin_infl(); } - static __inline__ int __inline_isnanf( float __x ) { return __x != __x; } - static __inline__ int __inline_isnand( double __x ) { return __x != __x; } - static __inline__ int __inline_isnan( long double __x ) { return __x != __x; } - static __inline__ int __inline_signbitf( float __x ) { union{ float __f; unsigned int __u; }__u; __u.__f = __x; return (int)(__u.__u >> 31); } - static __inline__ int __inline_signbitd( double __x ) { union{ double __f; unsigned int __u[2]; }__u; __u.__f = __x; return (int)(__u.__u[1] >> 31); } - static __inline__ int __inline_signbit( long double __x ){ union{ long double __ld; struct{ unsigned int __m[2]; short __sexp; }__p; }__u; __u.__ld = __x; return (int) (((unsigned short) __u.__p.__sexp) >> 15); } - static __inline__ int __inline_isnormalf( float __x ) { float fabsf = __builtin_fabsf(__x); if( __x != __x ) return 0; return fabsf < __builtin_inff() && fabsf >= __FLT_MIN__; } - static __inline__ int __inline_isnormald( double __x ) { double fabsf = __builtin_fabs(__x); if( __x != __x ) return 0; return fabsf < __builtin_inf() && fabsf >= __DBL_MIN__; } - static __inline__ int __inline_isnormal( long double __x ) { long double fabsf = __builtin_fabsl(__x); if( __x != __x ) return 0; return fabsf < __builtin_infl() && fabsf >= __LDBL_MIN__; } - -#else - - #define isnormal(x) \ - ( sizeof (x) == sizeof(float ) ? __isnormalf((float)(x)) \ - : sizeof (x) == sizeof(double) ? __isnormald((double)(x)) \ - : __isnormal ((long double)(x))) - - #define isfinite(x) \ - ( sizeof (x) == sizeof(float ) ? __isfinitef((float)(x)) \ - : sizeof (x) == sizeof(double) ? __isfinited((double)(x)) \ - : __isfinite ((long double)(x))) - - #define isinf(x) \ - ( sizeof (x) == sizeof(float ) ? __isinff((float)(x)) \ - : sizeof (x) == sizeof(double) ? __isinfd((double)(x)) \ - : __isinf ((long double)(x))) - - #define isnan(x) \ - ( sizeof (x) == sizeof(float ) ? __isnanf((float)(x)) \ - : sizeof (x) == sizeof(double) ? __isnand((double)(x)) \ - : __isnan ((long double)(x))) - - #define signbit(x) \ - ( sizeof (x) == sizeof(float ) ? __signbitf((float)(x)) \ - : sizeof (x) == sizeof(double) ? __signbitd((double)(x)) \ - : __signbitl((long double)(x))) - - - extern int __isnormalf (float ); - extern int __isnormald (double ); - extern int __isnormal (long double); - - extern int __isfinitef (float ); - extern int __isfinited (double ); - extern int __isfinite (long double); - - extern int __isinff (float ); - extern int __isinfd (double ); - extern int __isinf (long double); - - extern int __isnanf (float ); - extern int __isnand (double ); - extern int __isnan (long double); - - extern int __signbitf (float ); - extern int __signbitd (double ); - extern int __signbitl (long double); - -#endif - - - -/******************************************************************************** -* * -* Math Functions * -* * -********************************************************************************/ - -extern double acos( double ); -extern float acosf( float ); - -extern double asin( double ); -extern float asinf( float ); - -extern double atan( double ); -extern float atanf( float ); - -extern double atan2( double, double ); -extern float atan2f( float, float ); - -extern double cos( double ); -extern float cosf( float ); - -extern double sin( double ); -extern float sinf( float ); - -extern double tan( double ); -extern float tanf( float ); - -extern double acosh( double ); -extern float acoshf( float ); - -extern double asinh( double ); -extern float asinhf( float ); - -extern double atanh( double ); -extern float atanhf( float ); - -extern double cosh( double ); -extern float coshf( float ); - -extern double sinh( double ); -extern float sinhf( float ); - -extern double tanh( double ); -extern float tanhf( float ); - -extern double exp ( double ); -extern float expf ( float ); - -extern double exp2 ( double ); -extern float exp2f ( float ); - -extern double expm1 ( double ); -extern float expm1f ( float ); - -extern double log ( double ); -extern float logf ( float ); - -extern double log10 ( double ); -extern float log10f ( float ); - -extern double log2 ( double ); -extern float log2f ( float ); - -extern double log1p ( double ); -extern float log1pf ( float ); - -extern double logb ( double ); -extern float logbf ( float ); - -extern double modf ( double, double * ); -extern float modff ( float, float * ); - -extern double ldexp ( double, int ); -extern float ldexpf ( float, int ); - -extern double frexp ( double, int * ); -extern float frexpf ( float, int * ); - -extern int ilogb ( double ); -extern int ilogbf ( float ); - -extern double scalbn ( double, int ); -extern float scalbnf ( float, int ); - -extern double scalbln ( double, long int ); -extern float scalblnf ( float, long int ); - -extern double fabs( double ); -extern float fabsf( float ); - -extern double cbrt( double ); -extern float cbrtf( float ); - -extern double hypot ( double, double ); -extern float hypotf ( float, float ); - -extern double pow ( double, double ); -extern float powf ( float, float ); - -extern double sqrt( double ); -extern float sqrtf( float ); - -extern double erf( double ); -extern float erff( float ); - -extern double erfc( double ); -extern float erfcf( float ); - -/* lgamma and lgammaf are not thread-safe. The thread-safe variants - * lgamma_r and lgammaf_r are available on OS X 10.6 and later. - * - * To use the thread-safe variants, you must define the _REENTRANT symbol. - */ -extern double lgamma( double ); -extern float lgammaf( float ); - -extern double tgamma( double ); -extern float tgammaf( float ); - -extern double ceil ( double ); -extern float ceilf ( float ); - -extern double floor ( double ); -extern float floorf ( float ); - -extern double nearbyint ( double ); -extern float nearbyintf ( float ); - -extern double rint ( double ); -extern float rintf ( float ); - -extern long int lrint ( double ); -extern long int lrintf ( float ); - -extern double round ( double ); -extern float roundf ( float ); - -extern long int lround ( double ); -extern long int lroundf ( float ); - -#if ( defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) || ! defined( __STRICT_ANSI__ ) || ! defined( __GNUC__ ) - - /* long long is not part of C90. Make sure you are passing -std=c99 or -std=gnu99 or better if you need this. */ - extern long long int llrint ( double ); - extern long long int llrintf ( float ); - - extern long long int llround ( double ); - extern long long int llroundf ( float ); - -#endif /* #if ( defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) || ! defined( __STRICT_ANSI__ ) || ! defined( __GNUC__ ) */ - -extern double trunc ( double ); -extern float truncf ( float ); - -extern double fmod ( double, double ); -extern float fmodf ( float, float ); - -extern double remainder ( double, double ); -extern float remainderf ( float, float ); - -extern double remquo ( double, double, int * ); -extern float remquof ( float, float, int * ); - -extern double copysign ( double, double ); -extern float copysignf ( float, float ); - -extern double nan( const char * ); -extern float nanf( const char * ); - -extern double nextafter ( double, double ); -extern float nextafterf ( float, float ); - -extern double fdim ( double, double ); -extern float fdimf ( float, float ); - -extern double fmax ( double, double ); -extern float fmaxf ( float, float ); - -extern double fmin ( double, double ); -extern float fminf ( float, float ); - -extern double fma ( double, double, double ); -extern float fmaf ( float, float, float ); - -extern long double acosl(long double); -extern long double asinl(long double); -extern long double atanl(long double); -extern long double atan2l(long double, long double); -extern long double cosl(long double); -extern long double sinl(long double); -extern long double tanl(long double); -extern long double acoshl(long double); -extern long double asinhl(long double); -extern long double atanhl(long double); -extern long double coshl(long double); -extern long double sinhl(long double); -extern long double tanhl(long double); -extern long double expl(long double); -extern long double exp2l(long double); -extern long double expm1l(long double); -extern long double logl(long double); -extern long double log10l(long double); -extern long double log2l(long double); -extern long double log1pl(long double); -extern long double logbl(long double); -extern long double modfl(long double, long double *); -extern long double ldexpl(long double, int); -extern long double frexpl(long double, int *); -extern int ilogbl(long double); -extern long double scalbnl(long double, int); -extern long double scalblnl(long double, long int); -extern long double fabsl(long double); -extern long double cbrtl(long double); -extern long double hypotl(long double, long double); -extern long double powl(long double, long double); -extern long double sqrtl(long double); -extern long double erfl(long double); -extern long double erfcl(long double); - -/* lgammal is not thread-safe. - * The thread-safe variant lgammal_r is available on OS X 10.6 and later. - * - * To use the thread-safe variant, you must define the _REENTRANT symbol. - */ -extern long double lgammal(long double); - -extern long double tgammal(long double); -extern long double ceill(long double); -extern long double floorl(long double); -extern long double nearbyintl(long double); -extern long double rintl(long double); -extern long int lrintl(long double); -extern long double roundl(long double); -extern long int lroundl(long double); - -#if ( defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) || ! defined( __STRICT_ANSI__ ) || ! defined( __GNUC__ ) - /* long long is not part of C90. Make sure you are passing -std=c99 or -std=gnu99 or better if you need this. */ - extern long long int llrintl(long double); - extern long long int llroundl(long double); -#endif /* #if ( defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) || ! defined( __STRICT_ANSI__ ) || ! defined( __GNUC__ ) */ - -extern long double truncl(long double); -extern long double fmodl(long double, long double); -extern long double remainderl(long double, long double); -extern long double remquol(long double, long double, int *); -extern long double copysignl(long double, long double); -extern long double nanl(const char *); -extern long double nextafterl(long double, long double); -extern double nexttoward(double, long double); -extern float nexttowardf(float, long double); -extern long double nexttowardl(long double, long double); -extern long double fdiml(long double, long double); -extern long double fmaxl(long double, long double); -extern long double fminl(long double, long double); -extern long double fmal(long double, long double, long double); - -#define isgreater(x, y) __builtin_isgreater ((x),(y)) -#define isgreaterequal(x, y) __builtin_isgreaterequal ((x),(y)) -#define isless(x, y) __builtin_isless ((x),(y)) -#define islessequal(x, y) __builtin_islessequal ((x),(y)) -#define islessgreater(x, y) __builtin_islessgreater ((x),(y)) -#define isunordered(x, y) __builtin_isunordered ((x),(y)) - -extern double __inf( void ); -extern float __inff( void ); -extern long double __infl( void ); -extern float __nan( void ); /* 10.3 (and later) must retain in ABI for backward compatability */ - -#if !defined(_ANSI_SOURCE) -extern double j0 ( double ); - -extern double j1 ( double ); - -extern double jn ( int, double ); - -extern double y0 ( double ); - -extern double y1 ( double ); - -extern double yn ( int, double ); - -extern double scalb ( double, double ); - - -#define M_E 2.71828182845904523536028747135266250 /* e */ -#define M_LOG2E 1.44269504088896340735992468100189214 /* log 2e */ -#define M_LOG10E 0.434294481903251827651128918916605082 /* log 10e */ -#define M_LN2 0.693147180559945309417232121458176568 /* log e2 */ -#define M_LN10 2.30258509299404568401799145468436421 /* log e10 */ -#define M_PI 3.14159265358979323846264338327950288 /* pi */ -#define M_PI_2 1.57079632679489661923132169163975144 /* pi/2 */ -#define M_PI_4 0.785398163397448309615660845819875721 /* pi/4 */ -#define M_1_PI 0.318309886183790671537767526745028724 /* 1/pi */ -#define M_2_PI 0.636619772367581343075535053490057448 /* 2/pi */ -#define M_2_SQRTPI 1.12837916709551257389615890312154517 /* 2/sqrt(pi) */ -#define M_SQRT2 1.41421356237309504880168872420969808 /* sqrt(2) */ -#define M_SQRT1_2 0.707106781186547524400844362104849039 /* 1/sqrt(2) */ - -#define MAXFLOAT ((float)3.40282346638528860e+38) -extern int signgam; /* required for unix 2003 */ - - -#endif /* !defined(_ANSI_SOURCE) */ - -#if !defined(__NOEXTENSIONS__) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -#define __WANT_EXTENSIONS__ -#endif - -#ifdef __WANT_EXTENSIONS__ - -#define FP_SNAN FP_NAN -#define FP_QNAN FP_NAN - -extern long int rinttol ( double ); /* Legacy API: please use C99 lrint() instead. */ - -extern long int roundtol ( double ); /* Legacy API: please use C99 lround() instead. */ - -/* - * XOPEN/SVID - */ -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -#if (!defined(_XOPEN_SOURCE) || defined(_DARWIN_C_SOURCE)) -#if !defined(__cplusplus) -/* used by matherr below */ -struct exception { - int type; - char *name; - double arg1; - double arg2; - double retval; -}; -#endif - -#define HUGE MAXFLOAT - -/* - * set X_TLOSS = pi*2**52, which is possibly defined in <values.h> - * (one may replace the following line by "#include <values.h>") - */ - -#define X_TLOSS 1.41484755040568800000e+16 - -#define DOMAIN 1 -#define SING 2 -#define OVERFLOW 3 -#define UNDERFLOW 4 -#define TLOSS 5 -#define PLOSS 6 - -#endif /* (!_XOPEN_SOURCE || _DARWIN_C_SOURCE) */ -#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -#if !defined( __STRICT_ANSI__) && !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -extern int finite ( double ); /* Legacy API: please use C99 isfinite() instead. */ - -extern double gamma ( double ); /* Legacy API: please use C99 tgamma() instead. */ - -#if (!defined(_XOPEN_SOURCE) || defined(_DARWIN_C_SOURCE)) - -#if !defined(__cplusplus) -extern int matherr ( struct exception * ); -#endif - -/* - * IEEE Test Vector - */ -extern double significand ( double ); - -/* - * BSD math library entry points - */ -extern double drem ( double, double ); /* Legacy API: please use C99 remainder() instead. */ - -/* - * Reentrant version of lgamma; passes signgam back by reference - * as the second argument; user must allocate space for signgam. - */ - -#ifdef _REENTRANT - #include <AvailabilityMacros.h> - // Available on OS X 10.6 and later. - extern float lgammaf_r ( float, int * ) AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER; - extern double lgamma_r ( double, int * ) AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER; - extern long double lgammal_r ( long double, int * ) AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER; -#endif /* _REENTRANT */ - -#endif /* (!_XOPEN_SOURCE || _DARWIN_C_SOURCE) */ -#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -#endif /* __WANT_EXTENSIONS__ */ - -#ifdef __cplusplus -} -#endif - -#endif /* __MATH__ */ diff --git a/i386/include/architecture/i386/pio.h b/i386/include/architecture/i386/pio.h deleted file mode 100644 index 338f158..0000000 --- a/i386/include/architecture/i386/pio.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -#ifndef _ARCH_I386_PIO_H_ -#define _ARCH_I386_PIO_H_ - -typedef unsigned short i386_ioport_t; - -#if defined(__GNUC__) -static __inline__ unsigned long inl( - i386_ioport_t port) -{ - unsigned long datum; - __asm__ volatile("inl %w1, %0" : "=a" (datum) : "Nd" (port)); - return(datum); -} - -static __inline__ unsigned short inw( - i386_ioport_t port) -{ - unsigned short datum; - __asm__ volatile("inw %w1, %w0" : "=a" (datum) : "Nd" (port)); - return(datum); -} - -static __inline__ unsigned char inb( - i386_ioport_t port) -{ - unsigned char datum; - __asm__ volatile("inb %w1, %b0" : "=a" (datum) : "Nd" (port)); - return(datum); -} - -static __inline__ void outl( - i386_ioport_t port, - unsigned long datum) -{ - __asm__ volatile("outl %0, %w1" : : "a" (datum), "Nd" (port)); -} - -static __inline__ void outw( - i386_ioport_t port, - unsigned short datum) -{ - __asm__ volatile("outw %w0, %w1" : : "a" (datum), "Nd" (port)); -} - -static __inline__ void outb( - i386_ioport_t port, - unsigned char datum) -{ - __asm__ volatile("outb %b0, %w1" : : "a" (datum), "Nd" (port)); -} -#endif /* defined(__GNUC__) */ -#endif /* _ARCH_I386_PIO_H_ */ diff --git a/i386/include/architecture/i386/reg_help.h b/i386/include/architecture/i386/reg_help.h deleted file mode 100644 index 98c18c5..0000000 --- a/i386/include/architecture/i386/reg_help.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1991 NeXT Computer, Inc. All rights reserved. - * - * File: architecture/i386/reg_help.h - * Author: Mike DeMoney, NeXT Computer, Inc. - * Modified for i386 by: Bruce Martin, NeXT Computer, Inc. - * - * This header file defines cpp macros useful for defining - * machine register and doing machine-level operations. - * - * HISTORY - * 10-Mar-92 Bruce Martin (bmartin@next.com) - * Adapted to i386 - * 23-Jan-91 Mike DeMoney (mike@next.com) - * Created. - */ - -#ifndef _ARCH_I386_REG_HELP_H_ -#define _ARCH_I386_REG_HELP_H_ - -/* Bitfield definition aid */ -#define BITS_WIDTH(msb, lsb) ((msb)-(lsb)+1) -#define BIT_WIDTH(pos) (1) /* mostly to record the position */ - -/* Mask creation */ -#define MKMASK(width, offset) (((unsigned)-1)>>(32-(width))<<(offset)) -#define BITSMASK(msb, lsb) MKMASK(BITS_WIDTH(msb, lsb), lsb & 0x1f) -#define BITMASK(pos) MKMASK(BIT_WIDTH(pos), pos & 0x1f) - -/* Register addresses */ -#if __ASSEMBLER__ -# define REG_ADDR(type, addr) (addr) -#else /* __ASSEMBLER__ */ -# define REG_ADDR(type, addr) (*(volatile type *)(addr)) -#endif /* __ASSEMBLER__ */ - -/* Cast a register to be an unsigned */ -#define CONTENTS(foo) (*(unsigned *) &(foo)) - -/* Stack pointer must always be a multiple of 4 */ -#define STACK_INCR 4 -#define ROUND_FRAME(x) ((((unsigned)(x)) + STACK_INCR - 1) & ~(STACK_INCR-1)) - -/* STRINGIFY -- perform all possible substitutions, then stringify */ -#define __STR(x) #x /* just a helper macro */ -#define STRINGIFY(x) __STR(x) - -/* - * REG_PAIR_DEF -- define a register pair - * Register pairs are appropriately aligned to allow access via - * ld.d and st.d. - * - * Usage: - * struct foo { - * REG_PAIR_DEF( - * bar_t *, barp, - * afu_t, afu - * ); - * }; - * - * Access to individual entries of the pair is via the REG_PAIR - * macro (below). - */ -#define REG_PAIR_DEF(type0, name0, type1, name1) \ - struct { \ - type0 name0 __attribute__(( aligned(8) )); \ - type1 name1; \ - } name0##_##name1 - -/* - * REG_PAIR -- Macro to define names for accessing individual registers - * of register pairs. - * - * Usage: - * arg0 is first element of pair - * arg1 is second element of pair - * arg2 is desired element of pair - * eg: - * #define foo_barp REG_PAIR(barp, afu, afu) - */ -#define REG_PAIR(name0, name1, the_name) \ - name0##_##name1.the_name - -#endif /* _ARCH_I386_REG_HELP_H_ */ diff --git a/i386/include/architecture/i386/sel.h b/i386/include/architecture/i386/sel.h deleted file mode 100644 index 80cb516..0000000 --- a/i386/include/architecture/i386/sel.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1992 NeXT Computer, Inc. - * - * Intel386 Family: Segment selector. - * - * HISTORY - * - * 29 March 1992 ? at NeXT - * Created. - */ - -#ifndef _ARCH_I386_SEL_H_ -#define _ARCH_I386_SEL_H_ - -/* - * Segment selector. - */ - -typedef struct sel { - unsigned short rpl :2, -#define KERN_PRIV 0 -#define USER_PRIV 3 - ti :1, -#define SEL_GDT 0 -#define SEL_LDT 1 - index :13; -} sel_t; - -#define NULL_SEL ((sel_t) { 0, 0, 0 } ) - -#endif /* _ARCH_I386_SEL_H_ */ diff --git a/i386/include/architecture/i386/table.h b/i386/include/architecture/i386/table.h deleted file mode 100644 index 3ce1f81..0000000 --- a/i386/include/architecture/i386/table.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1992 NeXT Computer, Inc. - * - * Intel386 Family: Descriptor tables. - * - * HISTORY - * - * 30 March 1992 ? at NeXT - * Created. - */ - -#ifndef _ARCH_I386_TABLE_H_ -#define _ARCH_I386_TABLE_H_ - -#include <architecture/i386/desc.h> -#include <architecture/i386/tss.h> - -/* - * A totally generic descriptor - * table entry. - */ - -typedef union dt_entry { - code_desc_t code; - data_desc_t data; - ldt_desc_t ldt; - tss_desc_t task_state; - call_gate_t call_gate; - trap_gate_t trap_gate; - intr_gate_t intr_gate; - task_gate_t task_gate; -} dt_entry_t; - -#define DESC_TBL_MAX 8192 - -/* - * Global descriptor table. - */ - -typedef union gdt_entry { - code_desc_t code; - data_desc_t data; - ldt_desc_t ldt; - call_gate_t call_gate; - task_gate_t task_gate; - tss_desc_t task_state; -} gdt_entry_t; - -typedef gdt_entry_t gdt_t; - -/* - * Interrupt descriptor table. - */ - -typedef union idt_entry { - trap_gate_t trap_gate; - intr_gate_t intr_gate; - task_gate_t task_gate; -} idt_entry_t; - -typedef idt_entry_t idt_t; - -/* - * Local descriptor table. - */ - -typedef union ldt_entry { - code_desc_t code; - data_desc_t data; - call_gate_t call_gate; - task_gate_t task_gate; -} ldt_entry_t; - -typedef ldt_entry_t ldt_t; - -#endif /* _ARCH_I386_TABLE_H_ */ diff --git a/i386/include/architecture/i386/tss.h b/i386/include/architecture/i386/tss.h deleted file mode 100644 index 7f060ec..0000000 --- a/i386/include/architecture/i386/tss.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1992 NeXT Computer, Inc. - * - * Intel386 Family: Task State Segment. - * - * HISTORY - * - * 29 March 1992 ? at NeXT - * Created. - */ - -#ifndef _ARCH_I386_TSS_H_ -#define _ARCH_I386_TSS_H_ - -#include <architecture/i386/sel.h> - -/* - * Task State segment. - */ - -typedef struct tss { - sel_t oldtss; - unsigned int :0; - unsigned int esp0; - sel_t ss0; - unsigned int :0; - unsigned int esp1; - sel_t ss1; - unsigned int :0; - unsigned int esp2; - sel_t ss2; - unsigned int :0; - unsigned int cr3; - unsigned int eip; - unsigned int eflags; - unsigned int eax; - unsigned int ecx; - unsigned int edx; - unsigned int ebx; - unsigned int esp; - unsigned int ebp; - unsigned int esi; - unsigned int edi; - sel_t es; - unsigned int :0; - sel_t cs; - unsigned int :0; - sel_t ss; - unsigned int :0; - sel_t ds; - unsigned int :0; - sel_t fs; - unsigned int :0; - sel_t gs; - unsigned int :0; - sel_t ldt; - unsigned int :0; - unsigned int t :1, - :15, - io_bmap :16; -} tss_t; - -#define TSS_SIZE(n) (sizeof (struct tss) + (n)) - -/* - * Task State segment descriptor. - */ - -typedef struct tss_desc { - unsigned short limit00; - unsigned short base00; - unsigned char base16; - unsigned char type :5, -#define DESC_TSS 0x09 - dpl :2, - present :1; - unsigned char limit16 :4, - :3, - granular:1; - unsigned char base24; -} tss_desc_t; - -/* - * Task gate descriptor. - */ - -typedef struct task_gate { - unsigned short :16; - sel_t tss; - unsigned int :8, - type :5, -#define DESC_TASK_GATE 0x05 - dpl :2, - present :1, - :0; -} task_gate_t; - -#endif /* _ARCH_I386_TSS_H_ */ diff --git a/i386/include/assert.h b/i386/include/assert.h deleted file mode 100644 index 1bfea51..0000000 --- a/i386/include/assert.h +++ /dev/null @@ -1,92 +0,0 @@ -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)assert.h 8.2 (Berkeley) 1/21/94 - * $FreeBSD: src/include/assert.h,v 1.4 2002/03/23 17:24:53 imp Exp $ - */ - -#include <sys/cdefs.h> -#ifdef __cplusplus -#include <stdlib.h> -#endif /* __cplusplus */ - -/* - * Unlike other ANSI header files, <assert.h> may usefully be included - * multiple times, with and without NDEBUG defined. - */ - -#undef assert -#undef __assert - -#ifdef NDEBUG -#define assert(e) ((void)0) -#else - -#ifndef __GNUC__ - -__BEGIN_DECLS -#ifndef __cplusplus -void abort(void) __dead2; -#endif /* !__cplusplus */ -int printf(const char * __restrict, ...); -__END_DECLS - -#define assert(e) \ - ((void) ((e) ? 0 : __assert (#e, __FILE__, __LINE__))) -#define __assert(e, file, line) \ - ((void)printf ("%s:%u: failed assertion `%s'\n", file, line, e), abort()) - -#else /* __GNUC__ */ - -__BEGIN_DECLS -void __assert_rtn(const char *, const char *, int, const char *) __dead2; -void __eprintf(const char *, const char *, unsigned, const char *) __dead2; -__END_DECLS - -#define __assert(e, file, line) \ - __eprintf ("%s:%u: failed assertion `%s'\n", file, line, e) - -#if __DARWIN_UNIX03 -#define assert(e) \ - (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0) -#else /* !__DARWIN_UNIX03 */ -#define assert(e) \ - (__builtin_expect(!(e), 0) ? __assert (#e, __FILE__, __LINE__) : (void)0) -#endif /* __DARWIN_UNIX03 */ - -#endif /* __GNUC__ */ -#endif /* NDEBUG */ diff --git a/i386/include/ctype.h b/i386/include/ctype.h deleted file mode 100644 index 58dca3d..0000000 --- a/i386/include/ctype.h +++ /dev/null @@ -1,438 +0,0 @@ -/* - * Copyright (c) 2000, 2005, 2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * This code is derived from software contributed to Berkeley by - * Paul Borman at Krystal Technologies. - * - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)ctype.h 8.4 (Berkeley) 1/21/94 - */ - -//Begin-Libc -//#include "xlocale_private.h" -//End-Libc -#ifndef _CTYPE_H_ -#define _CTYPE_H_ - -#include <runetype.h> - -#define _CTYPE_A 0x00000100L /* Alpha */ -#define _CTYPE_C 0x00000200L /* Control */ -#define _CTYPE_D 0x00000400L /* Digit */ -#define _CTYPE_G 0x00000800L /* Graph */ -#define _CTYPE_L 0x00001000L /* Lower */ -#define _CTYPE_P 0x00002000L /* Punct */ -#define _CTYPE_S 0x00004000L /* Space */ -#define _CTYPE_U 0x00008000L /* Upper */ -#define _CTYPE_X 0x00010000L /* X digit */ -#define _CTYPE_B 0x00020000L /* Blank */ -#define _CTYPE_R 0x00040000L /* Print */ -#define _CTYPE_I 0x00080000L /* Ideogram */ -#define _CTYPE_T 0x00100000L /* Special */ -#define _CTYPE_Q 0x00200000L /* Phonogram */ -#define _CTYPE_SW0 0x20000000L /* 0 width character */ -#define _CTYPE_SW1 0x40000000L /* 1 width character */ -#define _CTYPE_SW2 0x80000000L /* 2 width character */ -#define _CTYPE_SW3 0xc0000000L /* 3 width character */ -#define _CTYPE_SWM 0xe0000000L /* Mask for screen width data */ -#define _CTYPE_SWS 30 /* Bits to shift to get width */ - -#ifdef _NONSTD_SOURCE -/* - * Backward compatibility - */ -#define _A _CTYPE_A /* Alpha */ -#define _C _CTYPE_C /* Control */ -#define _D _CTYPE_D /* Digit */ -#define _G _CTYPE_G /* Graph */ -#define _L _CTYPE_L /* Lower */ -#define _P _CTYPE_P /* Punct */ -#define _S _CTYPE_S /* Space */ -#define _U _CTYPE_U /* Upper */ -#define _X _CTYPE_X /* X digit */ -#define _B _CTYPE_B /* Blank */ -#define _R _CTYPE_R /* Print */ -#define _I _CTYPE_I /* Ideogram */ -#define _T _CTYPE_T /* Special */ -#define _Q _CTYPE_Q /* Phonogram */ -#define _SW0 _CTYPE_SW0 /* 0 width character */ -#define _SW1 _CTYPE_SW1 /* 1 width character */ -#define _SW2 _CTYPE_SW2 /* 2 width character */ -#define _SW3 _CTYPE_SW3 /* 3 width character */ -#endif /* _NONSTD_SOURCE */ - -/* - * _EXTERNALIZE_CTYPE_INLINES_ is defined in locale/nomacros.c to tell us - * to generate code for extern versions of all intermediate inline functions. - */ -#ifdef _EXTERNALIZE_CTYPE_INLINES_ -#define _USE_CTYPE_INLINE_ -#define __DARWIN_CTYPE_static_inline -#else /* !_EXTERNALIZE_CTYPE_INLINES_ */ -#define __DARWIN_CTYPE_static_inline static __inline -#endif /* !_EXTERNALIZE_CTYPE_INLINES_ */ - -/* - * _EXTERNALIZE_CTYPE_INLINES_TOP_ is defined in locale/isctype.c to tell us - * to generate code for extern versions of all top-level inline functions. - */ -#ifdef _EXTERNALIZE_CTYPE_INLINES_TOP_ -#define _USE_CTYPE_INLINE_ -#define __DARWIN_CTYPE_TOP_static_inline -#else /* !_EXTERNALIZE_CTYPE_INLINES_TOP_ */ -#define __DARWIN_CTYPE_TOP_static_inline static __inline -#endif /* _EXTERNALIZE_CTYPE_INLINES_TOP_ */ - -/* - * Use inline functions if we are allowed to and the compiler supports them. - */ -#if !defined(_DONT_USE_CTYPE_INLINE_) && \ - (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus)) - -/* See comments in <machine/_type.h> about __darwin_ct_rune_t. */ -__BEGIN_DECLS -unsigned long ___runetype(__darwin_ct_rune_t); -__darwin_ct_rune_t ___tolower(__darwin_ct_rune_t); -__darwin_ct_rune_t ___toupper(__darwin_ct_rune_t); -__END_DECLS - -__DARWIN_CTYPE_TOP_static_inline int -isascii(int _c) -{ - return ((_c & ~0x7F) == 0); -} - -#ifdef USE_ASCII -__DARWIN_CTYPE_static_inline int -__maskrune(__darwin_ct_rune_t _c, unsigned long _f) -{ - return _DefaultRuneLocale.__runetype[_c & 0xff] & _f; -} -//Begin-Libc -#elif defined(__LIBC__) -__DARWIN_CTYPE_static_inline int -__maskrune(__darwin_ct_rune_t _c, unsigned long _f) -{ - return ((_c < 0 || _c >= _CACHED_RUNES) ? ___runetype(_c) : - __current_locale()->__lc_ctype->_CurrentRuneLocale.__runetype[_c]) & _f; -} -//End-Libc -#else /* !USE_ASCII */ -__BEGIN_DECLS -int __maskrune(__darwin_ct_rune_t, unsigned long); -__END_DECLS -#endif /* USE_ASCII */ - -__DARWIN_CTYPE_static_inline int -__istype(__darwin_ct_rune_t _c, unsigned long _f) -{ -#ifdef USE_ASCII - return !!(__maskrune(_c, _f)); -#else /* USE_ASCII */ - return (isascii(_c) ? !!(_DefaultRuneLocale.__runetype[_c] & _f) - : !!__maskrune(_c, _f)); -#endif /* USE_ASCII */ -} - -__DARWIN_CTYPE_static_inline __darwin_ct_rune_t -__isctype(__darwin_ct_rune_t _c, unsigned long _f) -{ -#ifdef USE_ASCII - return !!(__maskrune(_c, _f)); -#else /* USE_ASCII */ - return (_c < 0 || _c >= _CACHED_RUNES) ? 0 : - !!(_DefaultRuneLocale.__runetype[_c] & _f); -#endif /* USE_ASCII */ -} - -#ifdef USE_ASCII -__DARWIN_CTYPE_static_inline __darwin_ct_rune_t -__toupper(__darwin_ct_rune_t _c) -{ - return _DefaultRuneLocale.__mapupper[_c & 0xff]; -} - -__DARWIN_CTYPE_static_inline __darwin_ct_rune_t -__tolower(__darwin_ct_rune_t _c) -{ - return _DefaultRuneLocale.__maplower[_c & 0xff]; -} -//Begin-Libc -#elif defined(__LIBC__) -/* - * We can't do what we do for __toupper_l() (check for ASCII first, then call - * ___toupper_l() otherwise) because versions of ___toupper() before Tiger - * assume c >= _CACHED_RUNES. So we are stuck making __toupper() a routine - * to hide the extended locale details, outside of Libc. - */ -__DARWIN_CTYPE_static_inline __darwin_ct_rune_t -__toupper(__darwin_ct_rune_t _c) -{ - return (_c < 0 || _c >= _CACHED_RUNES) ? ___toupper(_c) : - __current_locale()->__lc_ctype->_CurrentRuneLocale.__mapupper[_c]; -} - -__DARWIN_CTYPE_static_inline __darwin_ct_rune_t -__tolower(__darwin_ct_rune_t _c) -{ - return (_c < 0 || _c >= _CACHED_RUNES) ? ___tolower(_c) : - __current_locale()->__lc_ctype->_CurrentRuneLocale.__maplower[_c]; -} -//End-Libc -#else /* !USE_ASCII */ -__BEGIN_DECLS -__darwin_ct_rune_t __toupper(__darwin_ct_rune_t); -__darwin_ct_rune_t __tolower(__darwin_ct_rune_t); -__END_DECLS -#endif /* USE_ASCII */ - -__DARWIN_CTYPE_static_inline int -__wcwidth(__darwin_ct_rune_t _c) -{ - unsigned int _x; - - if (_c == 0) - return (0); - _x = (unsigned int)__maskrune(_c, _CTYPE_SWM|_CTYPE_R); - if ((_x & _CTYPE_SWM) != 0) - return ((_x & _CTYPE_SWM) >> _CTYPE_SWS); - return ((_x & _CTYPE_R) != 0 ? 1 : -1); -} - -#ifndef _EXTERNALIZE_CTYPE_INLINES_ - -#define _tolower(c) __tolower(c) -#define _toupper(c) __toupper(c) - -__DARWIN_CTYPE_TOP_static_inline int -isalnum(int _c) -{ - return (__istype(_c, _CTYPE_A|_CTYPE_D)); -} - -__DARWIN_CTYPE_TOP_static_inline int -isalpha(int _c) -{ - return (__istype(_c, _CTYPE_A)); -} - -__DARWIN_CTYPE_TOP_static_inline int -isblank(int _c) -{ - return (__istype(_c, _CTYPE_B)); -} - -__DARWIN_CTYPE_TOP_static_inline int -iscntrl(int _c) -{ - return (__istype(_c, _CTYPE_C)); -} - -/* ANSI -- locale independent */ -__DARWIN_CTYPE_TOP_static_inline int -isdigit(int _c) -{ - return (__isctype(_c, _CTYPE_D)); -} - -__DARWIN_CTYPE_TOP_static_inline int -isgraph(int _c) -{ - return (__istype(_c, _CTYPE_G)); -} - -__DARWIN_CTYPE_TOP_static_inline int -islower(int _c) -{ - return (__istype(_c, _CTYPE_L)); -} - -__DARWIN_CTYPE_TOP_static_inline int -isprint(int _c) -{ - return (__istype(_c, _CTYPE_R)); -} - -__DARWIN_CTYPE_TOP_static_inline int -ispunct(int _c) -{ - return (__istype(_c, _CTYPE_P)); -} - -__DARWIN_CTYPE_TOP_static_inline int -isspace(int _c) -{ - return (__istype(_c, _CTYPE_S)); -} - -__DARWIN_CTYPE_TOP_static_inline int -isupper(int _c) -{ - return (__istype(_c, _CTYPE_U)); -} - -/* ANSI -- locale independent */ -__DARWIN_CTYPE_TOP_static_inline int -isxdigit(int _c) -{ - return (__isctype(_c, _CTYPE_X)); -} - -__DARWIN_CTYPE_TOP_static_inline int -toascii(int _c) -{ - return (_c & 0x7F); -} - -__DARWIN_CTYPE_TOP_static_inline int -tolower(int _c) -{ - return (__tolower(_c)); -} - -__DARWIN_CTYPE_TOP_static_inline int -toupper(int _c) -{ - return (__toupper(_c)); -} - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -__DARWIN_CTYPE_TOP_static_inline int -digittoint(int _c) -{ - return (__maskrune(_c, 0x0F)); -} - -__DARWIN_CTYPE_TOP_static_inline int -ishexnumber(int _c) -{ - return (__istype(_c, _CTYPE_X)); -} - -__DARWIN_CTYPE_TOP_static_inline int -isideogram(int _c) -{ - return (__istype(_c, _CTYPE_I)); -} - -__DARWIN_CTYPE_TOP_static_inline int -isnumber(int _c) -{ - return (__istype(_c, _CTYPE_D)); -} - -__DARWIN_CTYPE_TOP_static_inline int -isphonogram(int _c) -{ - return (__istype(_c, _CTYPE_Q)); -} - -__DARWIN_CTYPE_TOP_static_inline int -isrune(int _c) -{ - return (__istype(_c, 0xFFFFFFF0L)); -} - -__DARWIN_CTYPE_TOP_static_inline int -isspecial(int _c) -{ - return (__istype(_c, _CTYPE_T)); -} -#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#endif /* _EXTERNALIZE_CTYPE_INLINES_ */ - -#else /* not using inlines */ - -__BEGIN_DECLS -int isalnum(int); -int isalpha(int); -int isblank(int); -int iscntrl(int); -int isdigit(int); -int isgraph(int); -int islower(int); -int isprint(int); -int ispunct(int); -int isspace(int); -int isupper(int); -int isxdigit(int); -int tolower(int); -int toupper(int); -int isascii(int); -int toascii(int); - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -int _tolower(int); -int _toupper(int); -int digittoint(int); -int ishexnumber(int); -int isideogram(int); -int isnumber(int); -int isphonogram(int); -int isrune(int); -int isspecial(int); -#endif -__END_DECLS - -#endif /* using inlines */ - -#ifdef _USE_EXTENDED_LOCALES_ -#include <xlocale/_ctype.h> -#endif /* _USE_EXTENDED_LOCALES_ */ - -#endif /* !_CTYPE_H_ */ diff --git a/i386/include/device/.svn/all-wcprops b/i386/include/device/.svn/all-wcprops deleted file mode 100644 index 206efb7..0000000 --- a/i386/include/device/.svn/all-wcprops +++ /dev/null @@ -1,17 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 53 -/svn/chameleon/!svn/ver/881/trunk/i386/include/device -END -device_port.h -K 25 -svn:wc:ra_dav:version-url -V 67 -/svn/chameleon/!svn/ver/881/trunk/i386/include/device/device_port.h -END -device_types.h -K 25 -svn:wc:ra_dav:version-url -V 68 -/svn/chameleon/!svn/ver/881/trunk/i386/include/device/device_types.h -END diff --git a/i386/include/device/.svn/entries b/i386/include/device/.svn/entries deleted file mode 100644 index b2356fb..0000000 --- a/i386/include/device/.svn/entries +++ /dev/null @@ -1,96 +0,0 @@ -10 - -dir -2117 -http://forge.voodooprojects.org/svn/chameleon/trunk/i386/include/device -http://forge.voodooprojects.org/svn/chameleon - - - -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - -b5af796a-00a8-11df-919b-ffff7a100b7d - -device_port.h -file - - - - -2012-10-03T17:50:21.000000Z -a32061f0b361911908c8f1a738ad6fbd -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -2936 - -device_types.h -file - - - - -2012-10-03T17:50:21.000000Z -3002c6d1dc242f177c4ae99fb073e186 -2011-05-26T03:34:29.106114Z -881 -meklort - - - - - - - - - - - - - - - - - - - - - -4507 - diff --git a/i386/include/device/.svn/text-base/device_port.h.svn-base b/i386/include/device/.svn/text-base/device_port.h.svn-base deleted file mode 100644 index 8948ed5..0000000 --- a/i386/include/device/.svn/text-base/device_port.h.svn-base +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * Author: David B. Golub, Carnegie Mellon University - * Date: 8/89 - */ - -#ifndef _DEVICE_DEVICE_PORT_H_ -#define _DEVICE_DEVICE_PORT_H_ - -#include <device/device_types.h> - -/* - * Master privileged I/O object for this host - */ -extern mach_port_t master_device_port; - -#define DEVICE_PAGER_GUARDED 0x1 -#define DEVICE_PAGER_COHERENT 0x2 -#define DEVICE_PAGER_CACHE_INHIB 0x4 -#define DEVICE_PAGER_WRITE_THROUGH 0x8 -#define DEVICE_PAGER_CONTIGUOUS 0x100 -#define DEVICE_PAGER_NOPHYSCACHE 0x200 - -#endif /* _DEVICE_DEVICE_PORT_H_ */ diff --git a/i386/include/device/.svn/text-base/device_types.h.svn-base b/i386/include/device/.svn/text-base/device_types.h.svn-base deleted file mode 100644 index f71249e..0000000 --- a/i386/include/device/.svn/text-base/device_types.h.svn-base +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * Author: David B. Golub, Carnegie Mellon University - * Date: 3/89 - */ - -#ifndef DEVICE_TYPES_H -#define DEVICE_TYPES_H - -/* - * Types for device interface. - */ -#include <mach/std_types.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/port.h> - -/* - * IO buffer - out-of-line array of characters. - */ -typedef char * io_buf_ptr_t; - -/* - * Some types for IOKit. - */ - -#ifdef IOKIT - -/* must match device_types.defs */ -typedef char io_name_t[128]; -typedef char io_string_t[512]; -typedef char io_struct_inband_t[4096]; - -#if KERNEL -typedef uint64_t io_user_scalar_t; -typedef uint64_t io_user_reference_t; -typedef int io_scalar_inband_t[16]; -// must be the same type as OSAsyncReference -typedef natural_t io_async_ref_t[8]; -typedef io_user_scalar_t io_scalar_inband64_t[16]; -typedef io_user_reference_t io_async_ref64_t[8]; -#elif __LP64__ -typedef uint64_t io_user_scalar_t; -typedef uint64_t io_user_reference_t; -typedef io_user_scalar_t io_scalar_inband_t[16]; -typedef io_user_reference_t io_async_ref_t[8]; -typedef io_user_scalar_t io_scalar_inband64_t[16]; -typedef io_user_reference_t io_async_ref64_t[8]; -#else -typedef int io_user_scalar_t; -typedef natural_t io_user_reference_t; -typedef io_user_scalar_t io_scalar_inband_t[16]; -typedef io_user_reference_t io_async_ref_t[8]; -typedef uint64_t io_scalar_inband64_t[16]; -typedef uint64_t io_async_ref64_t[8]; -#endif // __LP64__ - -#ifdef MACH_KERNEL - -typedef struct IOObject * io_object_t; -typedef io_object_t io_connect_t; - -extern void iokit_remove_reference( io_object_t obj ); - -extern io_object_t iokit_lookup_object_port( ipc_port_t port ); -extern io_connect_t iokit_lookup_connect_port( ipc_port_t port ); - -extern ipc_port_t iokit_make_object_port( io_object_t obj ); -extern ipc_port_t iokit_make_connect_port( io_connect_t obj ); - -extern boolean_t iokit_notify( mach_msg_header_t *msg ); - -#else - -#ifndef __IOKIT_PORTS_DEFINED__ -#define __IOKIT_PORTS_DEFINED__ -typedef mach_port_t io_object_t; -#endif /* __IOKIT_PORTS_DEFINED__ */ - -#endif /* MACH_KERNEL */ - -#endif /* IOKIT */ - -#endif /* DEVICE_TYPES_H */ - diff --git a/i386/include/device/device_port.h b/i386/include/device/device_port.h deleted file mode 100644 index 8948ed5..0000000 --- a/i386/include/device/device_port.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * Author: David B. Golub, Carnegie Mellon University - * Date: 8/89 - */ - -#ifndef _DEVICE_DEVICE_PORT_H_ -#define _DEVICE_DEVICE_PORT_H_ - -#include <device/device_types.h> - -/* - * Master privileged I/O object for this host - */ -extern mach_port_t master_device_port; - -#define DEVICE_PAGER_GUARDED 0x1 -#define DEVICE_PAGER_COHERENT 0x2 -#define DEVICE_PAGER_CACHE_INHIB 0x4 -#define DEVICE_PAGER_WRITE_THROUGH 0x8 -#define DEVICE_PAGER_CONTIGUOUS 0x100 -#define DEVICE_PAGER_NOPHYSCACHE 0x200 - -#endif /* _DEVICE_DEVICE_PORT_H_ */ diff --git a/i386/include/device/device_types.h b/i386/include/device/device_types.h deleted file mode 100644 index f71249e..0000000 --- a/i386/include/device/device_types.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * Author: David B. Golub, Carnegie Mellon University - * Date: 3/89 - */ - -#ifndef DEVICE_TYPES_H -#define DEVICE_TYPES_H - -/* - * Types for device interface. - */ -#include <mach/std_types.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/port.h> - -/* - * IO buffer - out-of-line array of characters. - */ -typedef char * io_buf_ptr_t; - -/* - * Some types for IOKit. - */ - -#ifdef IOKIT - -/* must match device_types.defs */ -typedef char io_name_t[128]; -typedef char io_string_t[512]; -typedef char io_struct_inband_t[4096]; - -#if KERNEL -typedef uint64_t io_user_scalar_t; -typedef uint64_t io_user_reference_t; -typedef int io_scalar_inband_t[16]; -// must be the same type as OSAsyncReference -typedef natural_t io_async_ref_t[8]; -typedef io_user_scalar_t io_scalar_inband64_t[16]; -typedef io_user_reference_t io_async_ref64_t[8]; -#elif __LP64__ -typedef uint64_t io_user_scalar_t; -typedef uint64_t io_user_reference_t; -typedef io_user_scalar_t io_scalar_inband_t[16]; -typedef io_user_reference_t io_async_ref_t[8]; -typedef io_user_scalar_t io_scalar_inband64_t[16]; -typedef io_user_reference_t io_async_ref64_t[8]; -#else -typedef int io_user_scalar_t; -typedef natural_t io_user_reference_t; -typedef io_user_scalar_t io_scalar_inband_t[16]; -typedef io_user_reference_t io_async_ref_t[8]; -typedef uint64_t io_scalar_inband64_t[16]; -typedef uint64_t io_async_ref64_t[8]; -#endif // __LP64__ - -#ifdef MACH_KERNEL - -typedef struct IOObject * io_object_t; -typedef io_object_t io_connect_t; - -extern void iokit_remove_reference( io_object_t obj ); - -extern io_object_t iokit_lookup_object_port( ipc_port_t port ); -extern io_connect_t iokit_lookup_connect_port( ipc_port_t port ); - -extern ipc_port_t iokit_make_object_port( io_object_t obj ); -extern ipc_port_t iokit_make_connect_port( io_connect_t obj ); - -extern boolean_t iokit_notify( mach_msg_header_t *msg ); - -#else - -#ifndef __IOKIT_PORTS_DEFINED__ -#define __IOKIT_PORTS_DEFINED__ -typedef mach_port_t io_object_t; -#endif /* __IOKIT_PORTS_DEFINED__ */ - -#endif /* MACH_KERNEL */ - -#endif /* IOKIT */ - -#endif /* DEVICE_TYPES_H */ - diff --git a/i386/include/errno.h b/i386/include/errno.h deleted file mode 100644 index 9879cc4..0000000 --- a/i386/include/errno.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#include <sys/errno.h> - diff --git a/i386/include/float.h b/i386/include/float.h deleted file mode 100644 index 84fd005..0000000 --- a/i386/include/float.h +++ /dev/null @@ -1,281 +0,0 @@ -/* This file exists soley to keep Metrowerks' compilers happy. The version - used by GCC can be found in /usr/lib/gcc, although it's - not very informative. */ - -#ifndef _FLOAT_H_ - -#if defined(__GNUC__) -#include_next <float.h> - -#elif defined(__MWERKS__) -#define _FLOAT_H_ - -/* APPLE LOCAL begin MW compatibility */ -/* Define various characteristics of floating-point types, if needed. */ -#ifndef __FLT_RADIX__ -#define __FLT_RADIX__ 2 -#endif -#ifndef __FLT_MANT_DIG__ -#define __FLT_MANT_DIG__ 24 -#endif -#ifndef __FLT_DIG__ -#define __FLT_DIG__ 6 -#endif -#ifndef __FLT_EPSILON__ -#define __FLT_EPSILON__ 1.19209290e-07F -#endif -#ifndef __FLT_MIN__ -#define __FLT_MIN__ 1.17549435e-38F -#endif -#ifndef __FLT_MAX__ -#define __FLT_MAX__ 3.40282347e+38F -#endif -#ifndef __FLT_MIN_EXP__ -#define __FLT_MIN_EXP__ (-125) -#endif -#ifndef __FLT_MIN_10_EXP__ -#define __FLT_MIN_10_EXP__ (-37) -#endif -#ifndef __FLT_MAX_EXP__ -#define __FLT_MAX_EXP__ 128 -#endif -#ifndef __FLT_MAX_10_EXP__ -#define __FLT_MAX_10_EXP__ 38 -#endif -#ifndef __DBL_MANT_DIG__ -#define __DBL_MANT_DIG__ 53 -#endif -#ifndef __DBL_DIG__ -#define __DBL_DIG__ 15 -#endif -#ifndef __DBL_EPSILON__ -#define __DBL_EPSILON__ 2.2204460492503131e-16 -#endif -#ifndef __DBL_MIN__ -#define __DBL_MIN__ 2.2250738585072014e-308 -#endif -#ifndef __DBL_MAX__ -#define __DBL_MAX__ 1.7976931348623157e+308 -#endif -#ifndef __DBL_MIN_EXP__ -#define __DBL_MIN_EXP__ (-1021) -#endif -#ifndef __DBL_MIN_10_EXP__ -#define __DBL_MIN_10_EXP__ (-307) -#endif -#ifndef __DBL_MAX_EXP__ -#define __DBL_MAX_EXP__ 1024 -#endif -#ifndef __DBL_MAX_10_EXP__ -#define __DBL_MAX_10_EXP__ 308 -#endif -#ifndef __LDBL_MANT_DIG__ -#define __LDBL_MANT_DIG__ 53 -#endif -#ifndef __LDBL_DIG__ -#define __LDBL_DIG__ 15 -#endif -#ifndef __LDBL_EPSILON__ -#define __LDBL_EPSILON__ 2.2204460492503131e-16 -#endif -#ifndef __LDBL_MIN__ -#define __LDBL_MIN__ 2.2250738585072014e-308 -#endif -#ifndef __LDBL_MAX__ -#define __LDBL_MAX__ 1.7976931348623157e+308 -#endif -#ifndef __LDBL_MIN_EXP__ -#define __LDBL_MIN_EXP__ (-1021) -#endif -#ifndef __LDBL_MIN_10_EXP__ -#define __LDBL_MIN_10_EXP__ (-307) -#endif -#ifndef __LDBL_MAX_EXP__ -#define __LDBL_MAX_EXP__ 1024 -#endif -#ifndef __LDBL_MAX_10_EXP__ -#define __LDBL_MAX_10_EXP__ 308 -#endif -/* APPLE LOCAl end MW compatibility */ - -/* Copyright (C) 2002 Free Software Foundation, Inc. - -This file is part of GNU CC. - -GNU CC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU CC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* As a special exception, if you include this header file into source - files compiled by GCC, this header file does not by itself cause - the resulting executable to be covered by the GNU General Public - License. This exception does not however invalidate any other - reasons why the executable file might be covered by the GNU General - Public License. */ - -/* - * ISO C Standard: 5.2.4.2.2 Characteristics of floating types <float.h> - */ - - -/* Radix of exponent representation, b. */ -#undef FLT_RADIX -#define FLT_RADIX __FLT_RADIX__ - -/* Number of base-FLT_RADIX digits in the significand, p. */ -#undef FLT_MANT_DIG -#undef DBL_MANT_DIG -#undef LDBL_MANT_DIG -#define FLT_MANT_DIG __FLT_MANT_DIG__ -#define DBL_MANT_DIG __DBL_MANT_DIG__ -#define LDBL_MANT_DIG __LDBL_MANT_DIG__ - -/* Number of decimal digits, q, such that any floating-point number with q - decimal digits can be rounded into a floating-point number with p radix b - digits and back again without change to the q decimal digits, - - p * log10(b) if b is a power of 10 - floor((p - 1) * log10(b)) otherwise -*/ -#undef FLT_DIG -#undef DBL_DIG -#undef LDBL_DIG -#define FLT_DIG __FLT_DIG__ -#define DBL_DIG __DBL_DIG__ -#define LDBL_DIG __LDBL_DIG__ - -/* Minimum int x such that FLT_RADIX**(x-1) is a normalized float, emin */ -#undef FLT_MIN_EXP -#undef DBL_MIN_EXP -#undef LDBL_MIN_EXP -#define FLT_MIN_EXP __FLT_MIN_EXP__ -#define DBL_MIN_EXP __DBL_MIN_EXP__ -#define LDBL_MIN_EXP __LDBL_MIN_EXP__ - -/* Minimum negative integer such that 10 raised to that power is in the - range of normalized floating-point numbers, - - ceil(log10(b) * (emin - 1)) -*/ -#undef FLT_MIN_10_EXP -#undef DBL_MIN_10_EXP -#undef LDBL_MIN_10_EXP -#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__ -#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__ -#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__ - -/* Maximum int x such that FLT_RADIX**(x-1) is a representable float, emax. */ -#undef FLT_MAX_EXP -#undef DBL_MAX_EXP -#undef LDBL_MAX_EXP -#define FLT_MAX_EXP __FLT_MAX_EXP__ -#define DBL_MAX_EXP __DBL_MAX_EXP__ -#define LDBL_MAX_EXP __LDBL_MAX_EXP__ - -/* Maximum integer such that 10 raised to that power is in the range of - representable finite floating-point numbers, - - floor(log10((1 - b**-p) * b**emax)) -*/ -#undef FLT_MAX_10_EXP -#undef DBL_MAX_10_EXP -#undef LDBL_MAX_10_EXP -#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__ -#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__ -#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__ - -/* Maximum representable finite floating-point number, - - (1 - b**-p) * b**emax -*/ -#undef FLT_MAX -#undef DBL_MAX -#undef LDBL_MAX -#define FLT_MAX __FLT_MAX__ -#define DBL_MAX __DBL_MAX__ -#define LDBL_MAX __LDBL_MAX__ - -/* The difference between 1 and the least value greater than 1 that is - representable in the given floating point type, b**1-p. */ -#undef FLT_EPSILON -#undef DBL_EPSILON -#undef LDBL_EPSILON -#define FLT_EPSILON __FLT_EPSILON__ -#define DBL_EPSILON __DBL_EPSILON__ -#define LDBL_EPSILON __LDBL_EPSILON__ - -/* Minimum normalized positive floating-point number, b**(emin - 1). */ -#undef FLT_MIN -#undef DBL_MIN -#undef LDBL_MIN -#define FLT_MIN __FLT_MIN__ -#define DBL_MIN __DBL_MIN__ -#define LDBL_MIN __LDBL_MIN__ - -/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown. */ -/* ??? This is supposed to change with calls to fesetround in <fenv.h>. */ -#undef FLT_ROUNDS -#define FLT_ROUNDS 1 - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -/* The floating-point expression evaluation method. - -1 indeterminate - 0 evaluate all operations and constants just to the range and - precision of the type - 1 evaluate operations and constants of type float and double - to the range and precision of the double type, evaluate - long double operations and constants to the range and - precision of the long double type - 2 evaluate all operations and constants to the range and - precision of the long double type - - ??? This ought to change with the setting of the fp control word; - the value provided by the compiler assumes the widest setting. */ -#undef FLT_EVAL_METHOD -#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__ - -/* Number of decimal digits, n, such that any floating-point number in the - widest supported floating type with pmax radix b digits can be rounded - to a floating-point number with n decimal digits and back again without - change to the value, - - pmax * log10(b) if b is a power of 10 - ceil(1 + pmax * log10(b)) otherwise -*/ -#undef DECIMAL_DIG -#define DECIMAL_DIG __DECIMAL_DIG__ - -#endif /* C99 */ - -#ifdef __cplusplus -extern "C" { -#endif -extern int __fegetfltrounds( void ); -#ifdef __cplusplus -} -#endif -#undef FLT_ROUNDS -#define FLT_ROUNDS (__fegetfltrounds ()) -/* End of GNU CC file */ - -/* APPLE LOCAL begin CW compatibility */ -/* CodeWarrior defines the following on its own. */ -#undef DECIMAL_DIG -/* APPLE LOCAL end CW compatibility */ - -#else -#error This file is only for Metrowerks compatibilty. -#endif - -#endif /* _FLOAT_H_ */ diff --git a/i386/include/i386/_limits.h b/i386/include/i386/_limits.h deleted file mode 100644 index 3b9e7a6..0000000 --- a/i386/include/i386/_limits.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _I386__LIMITS_H_ -#define _I386__LIMITS_H_ - -#define __DARWIN_CLK_TCK 100 /* ticks per second */ - -#endif /* _I386__LIMITS_H_ */ diff --git a/i386/include/i386/_param.h b/i386/include/i386/_param.h deleted file mode 100644 index 61f0d24..0000000 --- a/i386/include/i386/_param.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2008 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _I386__PARAM_H_ -#define _I386__PARAM_H_ - -#include <i386/_types.h> - -/* - * Round p (pointer or byte index) up to a correctly-aligned value for all - * data types (int, long, ...). The result is unsigned int and must be - * cast to any desired pointer type. - */ -#define __DARWIN_ALIGNBYTES (sizeof(__darwin_size_t) - 1) -#define __DARWIN_ALIGN(p) ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES) &~ __DARWIN_ALIGNBYTES) - -#define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1) -#define __DARWIN_ALIGN32(p) ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32) - - -#endif /* _I386__PARAM_H_ */ diff --git a/i386/include/i386/_structs.h b/i386/include/i386/_structs.h deleted file mode 100644 index 9cad355..0000000 --- a/i386/include/i386/_structs.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#include <sys/appleapiopts.h> - -#ifdef __need_mcontext_t -#ifndef __need_struct_mcontext -#define __need_struct_mcontext -#endif /* __need_struct_mcontext */ -#endif /* __need_mcontext_t */ - -#if defined(__need_struct_mcontext) -#include <mach/i386/_structs.h> -#endif /* __need_struct_mcontext */ - - -#ifdef __need_struct_mcontext -#undef __need_struct_mcontext - -#ifndef _STRUCT_MCONTEXT32 -#if __DARWIN_UNIX03 -#define _STRUCT_MCONTEXT32 struct __darwin_mcontext32 -_STRUCT_MCONTEXT32 -{ - _STRUCT_X86_EXCEPTION_STATE32 __es; - _STRUCT_X86_THREAD_STATE32 __ss; - _STRUCT_X86_FLOAT_STATE32 __fs; -}; -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_MCONTEXT32 struct mcontext32 -_STRUCT_MCONTEXT32 -{ - _STRUCT_X86_EXCEPTION_STATE32 es; - _STRUCT_X86_THREAD_STATE32 ss; - _STRUCT_X86_FLOAT_STATE32 fs; -}; -#endif /* __DARWIN_UNIX03 */ -#endif /* _STRUCT_MCONTEXT32 */ - -#ifndef _STRUCT_MCONTEXT64 -#if __DARWIN_UNIX03 -#define _STRUCT_MCONTEXT64 struct __darwin_mcontext64 -_STRUCT_MCONTEXT64 -{ - _STRUCT_X86_EXCEPTION_STATE64 __es; - _STRUCT_X86_THREAD_STATE64 __ss; - _STRUCT_X86_FLOAT_STATE64 __fs; -}; -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_MCONTEXT64 struct mcontext64 -_STRUCT_MCONTEXT64 -{ - _STRUCT_X86_EXCEPTION_STATE64 es; - _STRUCT_X86_THREAD_STATE64 ss; - _STRUCT_X86_FLOAT_STATE64 fs; -}; -#endif /* __DARWIN_UNIX03 */ -#endif /* _STRUCT_MCONTEXT64 */ -#endif /* __need_struct_mcontext */ - -#ifdef __need_mcontext_t -#undef __need_mcontext_t -#ifndef _MCONTEXT_T -#define _MCONTEXT_T -#if defined(__LP64__) -typedef _STRUCT_MCONTEXT64 *mcontext_t; -#define _STRUCT_MCONTEXT _STRUCT_MCONTEXT64 -#else -typedef _STRUCT_MCONTEXT32 *mcontext_t; -#define _STRUCT_MCONTEXT _STRUCT_MCONTEXT32 -#endif -#endif /* _MCONTEXT_T */ -#endif /* __need_mcontext_t */ - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#ifndef I386_MCONTEXT_SIZE -#define I386_MCONTEXT_SIZE sizeof(struct mcontext) -#endif /* I386_MCONTEXT_SIZE */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - diff --git a/i386/include/i386/_types.h b/i386/include/i386/_types.h deleted file mode 100644 index 67741d5..0000000 --- a/i386/include/i386/_types.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _BSD_I386__TYPES_H_ -#define _BSD_I386__TYPES_H_ - -/* - * This header file contains integer types. It's intended to also contain - * flotaing point and other arithmetic types, as needed, later. - */ - -#ifdef __GNUC__ -typedef __signed char __int8_t; -#else /* !__GNUC__ */ -typedef char __int8_t; -#endif /* !__GNUC__ */ -typedef unsigned char __uint8_t; -typedef short __int16_t; -typedef unsigned short __uint16_t; -typedef int __int32_t; -typedef unsigned int __uint32_t; -typedef long long __int64_t; -typedef unsigned long long __uint64_t; - -typedef long __darwin_intptr_t; -typedef unsigned int __darwin_natural_t; - -/* - * The rune type below is declared to be an ``int'' instead of the more natural - * ``unsigned long'' or ``long''. Two things are happening here. It is not - * unsigned so that EOF (-1) can be naturally assigned to it and used. Also, - * it looks like 10646 will be a 31 bit standard. This means that if your - * ints cannot hold 32 bits, you will be in trouble. The reason an int was - * chosen over a long is that the is*() and to*() routines take ints (says - * ANSI C), but they use __darwin_ct_rune_t instead of int. By changing it - * here, you lose a bit of ANSI conformance, but your programs will still - * work. - * - * NOTE: rune_t is not covered by ANSI nor other standards, and should not - * be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and - * rune_t must be the same type. Also wint_t must be no narrower than - * wchar_t, and should also be able to hold all members of the largest - * character set plus one extra value (WEOF). wint_t must be at least 16 bits. - */ - -typedef int __darwin_ct_rune_t; /* ct_rune_t */ - -/* - * mbstate_t is an opaque object to keep conversion state, during multibyte - * stream conversions. The content must not be referenced by user programs. - */ -typedef union { - char __mbstate8[128]; - long long _mbstateL; /* for alignment */ -} __mbstate_t; - -typedef __mbstate_t __darwin_mbstate_t; /* mbstate_t */ - -#if defined(__GNUC__) && defined(__PTRDIFF_TYPE__) -typedef __PTRDIFF_TYPE__ __darwin_ptrdiff_t; /* ptr1 - ptr2 */ -#else -typedef int __darwin_ptrdiff_t; /* ptr1 - ptr2 */ -#endif /* __GNUC__ */ - -#if defined(__GNUC__) && defined(__SIZE_TYPE__) -typedef __SIZE_TYPE__ __darwin_size_t; /* sizeof() */ -#else -typedef unsigned long __darwin_size_t; /* sizeof() */ -#endif - -#if (__GNUC__ > 2) -typedef __builtin_va_list __darwin_va_list; /* va_list */ -#else -typedef void * __darwin_va_list; /* va_list */ -#endif - -#if defined(__GNUC__) && defined(__WCHAR_TYPE__) -typedef __WCHAR_TYPE__ __darwin_wchar_t; /* wchar_t */ -#else -typedef __darwin_ct_rune_t __darwin_wchar_t; /* wchar_t */ -#endif - -typedef __darwin_wchar_t __darwin_rune_t; /* rune_t */ - -#if defined(__GNUC__) && defined(__WINT_TYPE__) -typedef __WINT_TYPE__ __darwin_wint_t; /* wint_t */ -#else -typedef __darwin_ct_rune_t __darwin_wint_t; /* wint_t */ -#endif - -typedef unsigned long __darwin_clock_t; /* clock() */ -typedef __uint32_t __darwin_socklen_t; /* socklen_t (duh) */ -typedef long __darwin_ssize_t; /* byte count or error */ -typedef long __darwin_time_t; /* time() */ - -#endif /* _BSD_I386__TYPES_H_ */ diff --git a/i386/include/i386/eflags.h b/i386/include/i386/eflags.h deleted file mode 100644 index 9dc6478..0000000 --- a/i386/include/i386/eflags.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ - -#ifndef _I386_EFLAGS_H_ -#define _I386_EFLAGS_H_ - -/* - * i386 flags register - */ - -#ifndef EFL_CF -#define EFL_CF 0x00000001 /* carry */ -#define EFL_PF 0x00000004 /* parity of low 8 bits */ -#define EFL_AF 0x00000010 /* carry out of bit 3 */ -#define EFL_ZF 0x00000040 /* zero */ -#define EFL_SF 0x00000080 /* sign */ -#define EFL_TF 0x00000100 /* trace trap */ -#define EFL_IF 0x00000200 /* interrupt enable */ -#define EFL_DF 0x00000400 /* direction */ -#define EFL_OF 0x00000800 /* overflow */ -#define EFL_IOPL 0x00003000 /* IO privilege level: */ -#define EFL_IOPL_KERNEL 0x00000000 /* kernel */ -#define EFL_IOPL_USER 0x00003000 /* user */ -#define EFL_NT 0x00004000 /* nested task */ -#define EFL_RF 0x00010000 /* resume without tracing */ -#define EFL_VM 0x00020000 /* virtual 8086 mode */ -#define EFL_AC 0x00040000 /* alignment check */ -#define EFL_VIF 0x00080000 /* virtual interrupt flag */ -#define EFL_VIP 0x00100000 /* virtual interrupt pending */ -#define EFL_ID 0x00200000 /* cpuID instruction */ -#endif - -#define EFL_CLR 0xfff88028 -#define EFL_SET 0x00000002 - -#define EFL_USER_SET (EFL_IF) -#define EFL_USER_CLEAR (EFL_IOPL|EFL_NT|EFL_RF) - -#endif /* _I386_EFLAGS_H_ */ diff --git a/i386/include/i386/endian.h b/i386/include/i386/endian.h deleted file mode 100644 index 9f64aa0..0000000 --- a/i386/include/i386/endian.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright 1995 NeXT Computer, Inc. All rights reserved. - */ -/* - * Copyright (c) 1987, 1991, 1993 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)endian.h 8.1 (Berkeley) 6/11/93 - */ - -#ifndef _I386__ENDIAN_H_ -#define _I386__ENDIAN_H_ - -#include <sys/cdefs.h> -/* - * Define _NOQUAD if the compiler does NOT support 64-bit integers. - */ -/* #define _NOQUAD */ - -/* - * Define the order of 32-bit words in 64-bit words. - */ -#define _QUAD_HIGHWORD 1 -#define _QUAD_LOWWORD 0 - -/* - * Definitions for byte order, according to byte significance from low - * address to high. - */ -#define __DARWIN_LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ -#define __DARWIN_BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ -#define __DARWIN_PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ - -#define __DARWIN_BYTE_ORDER __DARWIN_LITTLE_ENDIAN - -#if defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) - -#define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN -#define BIG_ENDIAN __DARWIN_BIG_ENDIAN -#define PDP_ENDIAN __DARWIN_PDP_ENDIAN - -#define BYTE_ORDER __DARWIN_BYTE_ORDER - -#include <sys/_endian.h> - -#endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ -#endif /* !_I386__ENDIAN_H_ */ diff --git a/i386/include/i386/fasttrap_isa.h b/i386/include/i386/fasttrap_isa.h deleted file mode 100644 index d51c7dd..0000000 --- a/i386/include/i386/fasttrap_isa.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _FASTTRAP_ISA_H -#define _FASTTRAP_ISA_H - -/* - * #pragma ident "@(#)fasttrap_isa.h 1.6 06/09/19 SMI" - */ - -#include <sys/types.h> -#include <stdint.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#define FASTTRAP_MAX_INSTR_SIZE 15 - -#define FASTTRAP_INSTR 0xcc - -#define FASTTRAP_SUNWDTRACE_SIZE 64 - -typedef uint8_t fasttrap_instr_t; - -typedef struct fasttrap_machtp { - uint8_t ftmt_instr[FASTTRAP_MAX_INSTR_SIZE]; /* orig. instr. */ - uint8_t ftmt_size; /* instruction size */ -#if __sol64 || defined(__APPLE__) - uint8_t ftmt_ripmode; /* %rip-relative handling mode */ - uint8_t ftmt_modrm; /* saved modrm byte */ -#endif - uint8_t ftmt_type; /* emulation type */ - uint8_t ftmt_code; /* branch condition */ - uint8_t ftmt_base; /* branch base */ - uint8_t ftmt_index; /* branch index */ - uint8_t ftmt_scale; /* branch scale */ - uint8_t ftmt_segment; /* segment for memory accesses */ - user_addr_t ftmt_dest; /* destination of control flow */ -} fasttrap_machtp_t; - -#define ftt_instr ftt_mtp.ftmt_instr -#if __sol64 || defined(__APPLE__) -#define ftt_ripmode ftt_mtp.ftmt_ripmode -#define ftt_modrm ftt_mtp.ftmt_modrm -#endif -#define ftt_size ftt_mtp.ftmt_size -#define ftt_type ftt_mtp.ftmt_type -#define ftt_code ftt_mtp.ftmt_code -#define ftt_base ftt_mtp.ftmt_base -#define ftt_index ftt_mtp.ftmt_index -#define ftt_scale ftt_mtp.ftmt_scale -#define ftt_segment ftt_mtp.ftmt_segment -#define ftt_dest ftt_mtp.ftmt_dest - -#define FASTTRAP_T_COMMON 0x00 /* common case -- no emulation */ -#define FASTTRAP_T_JCC 0x01 /* near and far conditional jumps */ -#define FASTTRAP_T_LOOP 0x02 /* loop instructions */ -#define FASTTRAP_T_JCXZ 0x03 /* jump if %ecx/%rcx is zero */ -#define FASTTRAP_T_JMP 0x04 /* relative jump */ -#define FASTTRAP_T_CALL 0x05 /* near call (and link) */ -#define FASTTRAP_T_RET 0x06 /* ret */ -#define FASTTRAP_T_RET16 0x07 /* ret <imm16> */ - -/* - * For performance rather than correctness. - */ -#define FASTTRAP_T_PUSHL_EBP 0x10 /* pushl %ebp (for function entry) */ -#define FASTTRAP_T_NOP 0x11 /* nop */ - -#define FASTTRAP_RIP_1 0x1 -#define FASTTRAP_RIP_2 0x2 -#define FASTTRAP_RIP_X 0x4 - -/* - * Segment values. - */ -#define FASTTRAP_SEG_NONE 0 -#define FASTTRAP_SEG_CS 1 -#define FASTTRAP_SEG_DS 2 -#define FASTTRAP_SEG_ES 3 -#define FASTTRAP_SEG_FS 4 -#define FASTTRAP_SEG_GS 5 -#define FASTTRAP_SEG_SS 6 - -#define FASTTRAP_RETURN_AFRAMES 6 -#define FASTTRAP_ENTRY_AFRAMES 5 -#define FASTTRAP_OFFSET_AFRAMES 5 - -#ifdef __cplusplus -} -#endif - -#endif /* _FASTTRAP_ISA_H */ diff --git a/i386/include/i386/limits.h b/i386/include/i386/limits.h deleted file mode 100644 index 9ee7c03..0000000 --- a/i386/include/i386/limits.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 1988, 1993 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)limits.h 8.3 (Berkeley) 1/4/94 - */ - -#ifndef _I386_LIMITS_H_ -#define _I386_LIMITS_H_ - -#include <sys/cdefs.h> -#include <i386/_limits.h> - -#define CHAR_BIT 8 /* number of bits in a char */ -#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */ - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -#define CLK_TCK __DARWIN_CLK_TCK /* ticks per second */ -#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -/* - * According to ANSI (section 2.2.4.2), the values below must be usable by - * #if preprocessing directives. Additionally, the expression must have the - * same type as would an expression that is an object of the corresponding - * type converted according to the integral promotions. The subtraction for - * INT_MIN and LONG_MIN is so the value is not unsigned; 2147483648 is an - * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). - * These numbers work for pcc as well. The UINT_MAX and ULONG_MAX values - * are written as hex so that GCC will be quiet about large integer constants. - */ -#define SCHAR_MAX 127 /* min value for a signed char */ -#define SCHAR_MIN (-128) /* max value for a signed char */ - -#define UCHAR_MAX 255 /* max value for an unsigned char */ -#define CHAR_MAX 127 /* max value for a char */ -#define CHAR_MIN (-128) /* min value for a char */ - -#define USHRT_MAX 65535 /* max value for an unsigned short */ -#define SHRT_MAX 32767 /* max value for a short */ -#define SHRT_MIN (-32768) /* min value for a short */ - -#define UINT_MAX 0xffffffff /* max value for an unsigned int */ -#define INT_MAX 2147483647 /* max value for an int */ -#define INT_MIN (-2147483647-1) /* min value for an int */ - -#ifdef __LP64__ -#define ULONG_MAX 0xffffffffffffffffUL /* max unsigned long */ -#define LONG_MAX 0x7fffffffffffffffL /* max signed long */ -#define LONG_MIN (-0x7fffffffffffffffL-1) /* min signed long */ -#else /* !__LP64__ */ -#define ULONG_MAX 0xffffffffUL /* max unsigned long */ -#define LONG_MAX 2147483647L /* max signed long */ -#define LONG_MIN (-2147483647L-1) /* min signed long */ -#endif /* __LP64__ */ - -#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */ -#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */ -#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */ - -#if !defined(_ANSI_SOURCE) -#ifdef __LP64__ -#define LONG_BIT 64 -#else /* !__LP64__ */ -#define LONG_BIT 32 -#endif /* __LP64__ */ -#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */ -#define WORD_BIT 32 - -#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) -#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */ - -#define UQUAD_MAX ULLONG_MAX -#define QUAD_MAX LLONG_MAX -#define QUAD_MIN LLONG_MIN - -#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */ -#endif /* !_ANSI_SOURCE */ - -#endif /* _I386_LIMITS_H_ */ diff --git a/i386/include/i386/param.h b/i386/include/i386/param.h deleted file mode 100644 index 03a38d2..0000000 --- a/i386/include/i386/param.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)param.h 8.1 (Berkeley) 4/4/95 - */ - -/* - * Machine dependent constants for Intel 386. - */ - -#ifndef _I386_PARAM_H_ -#define _I386_PARAM_H_ - -#include <i386/_param.h> - -/* - * Round p (pointer or byte index) up to a correctly-aligned value for all - * data types (int, long, ...). The result is unsigned int and must be - * cast to any desired pointer type. - */ -#define ALIGNBYTES __DARWIN_ALIGNBYTES -#define ALIGN(p) __DARWIN_ALIGN(p) - -#define NBPG 4096 /* bytes/page */ -#define PGOFSET (NBPG-1) /* byte offset into page */ -#define PGSHIFT 12 /* LOG2(NBPG) */ - -#define DEV_BSIZE 512 -#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ -#define BLKDEV_IOSIZE 2048 -#define MAXPHYS (128 * 1024) /* max raw I/O transfer size */ - -#define CLSIZE 1 -#define CLSIZELOG2 0 - -/* - * Constants related to network buffer management. - * MCLBYTES must be no larger than CLBYTES (the software page size), and, - * on machines that exchange pages of input or output buffers with mbuf - * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple - * of the hardware page size. - */ -#define MSIZE 256 /* size of an mbuf */ -#define MCLBYTES 2048 /* large enough for ether MTU */ -#define MCLSHIFT 11 -#define MCLOFSET (MCLBYTES - 1) -#ifndef NMBCLUSTERS -#ifdef GATEWAY -#define NMBCLUSTERS ((1024 * 1024) / MCLBYTES) /* cl map size: 1MB */ -#else -#define NMBCLUSTERS ((1024 * 512) / MCLBYTES) /* cl map size: 0.5MB */ -#endif -#endif - -/* - * Some macros for units conversion - */ -/* Core clicks (NeXT_page_size bytes) to segments and vice versa */ -#define ctos(x) (x) -#define stoc(x) (x) - -/* Core clicks (4096 bytes) to disk blocks */ -#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT)) -#define dtoc(x) ((x)>>(PGSHIFT-DEV_BSHIFT)) -#define dtob(x) ((x)<<DEV_BSHIFT) - -/* clicks to bytes */ -#define ctob(x) ((x)<<PGSHIFT) - -/* bytes to clicks */ -#define btoc(x) (((unsigned)(x)+(NBPG-1))>>PGSHIFT) - -#ifdef __APPLE__ -#define btodb(bytes, devBlockSize) \ - ((unsigned)(bytes) / devBlockSize) -#define dbtob(db, devBlockSize) \ - ((unsigned)(db) * devBlockSize) -#else -#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \ - ((unsigned)(bytes) >> DEV_BSHIFT) -#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \ - ((unsigned)(db) << DEV_BSHIFT) -#endif - -/* - * Map a ``block device block'' to a file system block. - * This should be device dependent, and will be if we - * add an entry to cdevsw/bdevsw for that purpose. - * For now though just use DEV_BSIZE. - */ -#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE)) - -/* - * Macros to decode (and encode) processor status word. - */ -#define STATUS_WORD(rpl, ipl) (((ipl) << 8) | (rpl)) -#define USERMODE(x) (((x) & 3) == 3) -#define BASEPRI(x) (((x) & (255 << 8)) == 0) - - -#if defined(KERNEL) || defined(STANDALONE) -#define DELAY(n) delay(n) - -#else /* defined(KERNEL) || defined(STANDALONE) */ -#define DELAY(n) { register int N = (n); while (--N > 0); } -#endif /* defined(KERNEL) || defined(STANDALONE) */ - -#endif /* _I386_PARAM_H_ */ diff --git a/i386/include/i386/profile.h b/i386/include/i386/profile.h deleted file mode 100644 index 26782f8..0000000 --- a/i386/include/i386/profile.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1997, Apple Computer, Inc. All rights reserved. - * - */ - -#ifndef _BSD_I386_PROFILE_H_ -#define _BSD_I386_PROFILE_H_ - -#include <sys/appleapiopts.h> - - -#endif /* _BSD_I386_PROFILE_H_ */ diff --git a/i386/include/i386/setjmp.h b/i386/include/i386/setjmp.h deleted file mode 100644 index aff6e3c..0000000 --- a/i386/include/i386/setjmp.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. - * - * File: setjmp.h - * - * Declaration of setjmp routines and data structures. - */ -#ifndef _BSD_I386_SETJMP_H -#define _BSD_I386_SETJMP_H - -#include <sys/cdefs.h> - -#if defined(__x86_64__) -/* - * _JBLEN is number of ints required to save the following: - * rflags, rip, rbp, rsp, rbx, r12, r13, r14, r15... these are 8 bytes each - * mxcsr, fp control word, sigmask... these are 4 bytes each - * add 16 ints for future expansion needs... - */ -#define _JBLEN ((9 * 2) + 3 + 16) -typedef int jmp_buf[_JBLEN]; -typedef int sigjmp_buf[_JBLEN + 1]; - -#else - -/* - * _JBLEN is number of ints required to save the following: - * eax, ebx, ecx, edx, edi, esi, ebp, esp, ss, eflags, eip, - * cs, de, es, fs, gs == 16 ints - * onstack, mask = 2 ints - */ - -#define _JBLEN (18) -typedef int jmp_buf[_JBLEN]; -typedef int sigjmp_buf[_JBLEN + 1]; - -#endif - -__BEGIN_DECLS -int setjmp(jmp_buf); -void longjmp(jmp_buf, int); - -#ifndef _ANSI_SOURCE -int _setjmp(jmp_buf); -void _longjmp(jmp_buf, int); -int sigsetjmp(sigjmp_buf, int); -void siglongjmp(sigjmp_buf, int); -#endif /* _ANSI_SOURCE */ - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -void longjmperror(void); -#endif /* neither ANSI nor POSIX */ -__END_DECLS -#endif /* !_BSD_I386_SETJMP_H */ diff --git a/i386/include/i386/signal.h b/i386/include/i386/signal.h deleted file mode 100644 index 8419888..0000000 --- a/i386/include/i386/signal.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1992 NeXT Computer, Inc. - * - */ - -#ifndef _I386_SIGNAL_H_ -#define _I386_SIGNAL_H_ 1 - -#include <sys/cdefs.h> - -#ifndef _ANSI_SOURCE -typedef int sig_atomic_t; - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) - -#include <sys/appleapiopts.h> - -#ifdef __APPLE_API_OBSOLETE - -/* - * Information pushed on stack when a signal is delivered. - * This is used by the kernel to restore state following - * execution of the signal handler. It is also made available - * to the handler to allow it to properly restore state if - * a non-standard exit is performed. - */ -#define __need_struct_sigcontext -#include <i386/_structs.h> - -#endif /* __APPLE_API_OBSOLETE */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#endif /* ! _ANSI_SOURCE */ - -#endif /* _I386_SIGNAL_H_ */ - diff --git a/i386/include/i386/types.h b/i386/include/i386/types.h deleted file mode 100644 index ef4e660..0000000 --- a/i386/include/i386/types.h +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2000-2008 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright 1995 NeXT Computer, Inc. All rights reserved. - */ -/* - * Copyright (c) 1990, 1993 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)types.h 8.3 (Berkeley) 1/5/94 - */ - -#ifndef _MACHTYPES_H_ -#define _MACHTYPES_H_ - -#include <i386/types.h> - - -#ifndef __ASSEMBLER__ -#include <i386/_types.h> -#include <sys/cdefs.h> -/* - * Basic integral types. Omit the typedef if - * not possible for a machine/compiler combination. - */ -#ifndef _INT8_T -#define _INT8_T -typedef __signed char int8_t; -#endif -typedef unsigned char u_int8_t; -#ifndef _INT16_T -#define _INT16_T -typedef short int16_t; -#endif -typedef unsigned short u_int16_t; -#ifndef _INT32_T -#define _INT32_T -typedef int int32_t; -#endif -typedef unsigned int u_int32_t; -#ifndef _INT64_T -#define _INT64_T -typedef long long int64_t; -#endif -typedef unsigned long long u_int64_t; - -#if __LP64__ -typedef int64_t register_t; -#else -typedef int32_t register_t; -#endif - -#ifndef _INTPTR_T -#define _INTPTR_T -typedef __darwin_intptr_t intptr_t; -#endif -#ifndef _UINTPTR_T -#define _UINTPTR_T -typedef unsigned long uintptr_t; -#endif - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -/* These types are used for reserving the largest possible size. */ -typedef u_int64_t user_addr_t; -typedef u_int64_t user_size_t; -typedef int64_t user_ssize_t; -typedef int64_t user_long_t; -typedef u_int64_t user_ulong_t; -typedef int64_t user_time_t; -typedef int64_t user_off_t; -#define USER_ADDR_NULL ((user_addr_t) 0) -#define CAST_USER_ADDR_T(a_ptr) ((user_addr_t)((uintptr_t)(a_ptr))) - - -#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -/* This defines the size of syscall arguments after copying into the kernel: */ -typedef u_int64_t syscall_arg_t; - -#ifndef __offsetof -#define __offsetof(type, field) ((size_t)(&((type *)0)->field)) -#endif - -#endif /* __ASSEMBLER__ */ -#endif /* _MACHTYPES_H_ */ diff --git a/i386/include/i386/user_ldt.h b/i386/include/i386/user_ldt.h deleted file mode 100644 index 3b61e3f..0000000 --- a/i386/include/i386/user_ldt.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2000-2008 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ - -/* - */ - -#ifndef _I386_USER_LDT_H_ -#define _I386_USER_LDT_H_ - -/* - * User LDT management. - * - * Each task may have its own LDT. - */ - -#define LDT_AUTO_ALLOC 0xffffffff - -#include <sys/cdefs.h> - -union ldt_entry; - -__BEGIN_DECLS -int i386_get_ldt(int, union ldt_entry *, int); -int i386_set_ldt(int, const union ldt_entry *, int); -__END_DECLS - -#endif /* _I386_USER_LDT_H_ */ diff --git a/i386/include/i386/vmparam.h b/i386/include/i386/vmparam.h deleted file mode 100644 index b6389b4..0000000 --- a/i386/include/i386/vmparam.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _BSD_I386_VMPARAM_H_ -#define _BSD_I386_VMPARAM_H_ 1 - -#include <sys/resource.h> - -/* Rosetta dependency on this address */ -#define USRSTACK VM_USRSTACK32 - -#define USRSTACK64 VM_USRSTACK64 - - -/* - * Virtual memory related constants, all in bytes - */ -#ifndef DFLDSIZ -#define DFLDSIZ (RLIM_INFINITY) /* initial data size limit */ -#endif -#ifndef MAXDSIZ -#define MAXDSIZ (RLIM_INFINITY) /* max data size */ -#endif -#ifndef DFLSSIZ -#define DFLSSIZ (8*1024*1024) /* initial stack size limit */ -#endif -#ifndef MAXSSIZ -#define MAXSSIZ (64*1024*1024) /* max stack size */ -#endif -#ifndef DFLCSIZ -#define DFLCSIZ (0) /* initial core size limit */ -#endif -#ifndef MAXCSIZ -#define MAXCSIZ (RLIM_INFINITY) /* max core size */ -#endif /* MAXCSIZ */ - -#endif /* _BSD_I386_VMPARAM_H_ */ diff --git a/i386/include/inttypes.h b/i386/include/inttypes.h deleted file mode 100644 index 4f9dd8d..0000000 --- a/i386/include/inttypes.h +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright (c) 2000, 2001, 2002, 2003, 2004 Apple Computer, Inc. - * All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/* - * <inttypes.h> -- Standard C header, defined in ISO/IEC 9899:1999 - * (aka "C99"), section 7.8. This defines format string conversion - * specifiers suitable for use within arguments to fprintf and fscanf - * and their ilk. - */ - -/* "C++ implementations should define these macros only when - * __STDC_FORMAT_MACROS is defined before <inttypes.h> is included." - */ -#if (!defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)) && !defined(__STDC_FORMAT_MACROS_DEFINED) -#define __STDC_FORMAT_MACROS_DEFINED - -# undef __PRI_8_LENGTH_MODIFIER__ -# undef __PRI_64_LENGTH_MODIFIER__ -# undef __SCN_64_LENGTH_MODIFIER__ - -# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 > 1020 -# define __PRI_8_LENGTH_MODIFIER__ "hh" -# define __PRI_64_LENGTH_MODIFIER__ "ll" -# define __SCN_64_LENGTH_MODIFIER__ "ll" -# else -/* These could be "hh", "ll", and "ll" respectively, but that doesn't work on - 10.2, and these do. Note that there's no way to use scanf to scan a - decimal into a 'char' argument on 10.2, so "hh" is used unconditionally - and programs that use it won't work on Jaguar. */ -# define __PRI_8_LENGTH_MODIFIER__ "" /* none */ -# define __PRI_64_LENGTH_MODIFIER__ "q" -# define __SCN_64_LENGTH_MODIFIER__ "q" -# endif -# define __PRI_MAX_LENGTH_MODIFIER__ "j" -# define __SCN_MAX_LENGTH_MODIFIER__ "j" - -# define PRId8 __PRI_8_LENGTH_MODIFIER__ "d" -# define PRIi8 __PRI_8_LENGTH_MODIFIER__ "i" -# define PRIo8 __PRI_8_LENGTH_MODIFIER__ "o" -# define PRIu8 __PRI_8_LENGTH_MODIFIER__ "u" -# define PRIx8 __PRI_8_LENGTH_MODIFIER__ "x" -# define PRIX8 __PRI_8_LENGTH_MODIFIER__ "X" - -# define PRId16 "hd" -# define PRIi16 "hi" -# define PRIo16 "ho" -# define PRIu16 "hu" -# define PRIx16 "hx" -# define PRIX16 "hX" - -# define PRId32 "d" -# define PRIi32 "i" -# define PRIo32 "o" -# define PRIu32 "u" -# define PRIx32 "x" -# define PRIX32 "X" - -# define PRId64 __PRI_64_LENGTH_MODIFIER__ "d" -# define PRIi64 __PRI_64_LENGTH_MODIFIER__ "i" -# define PRIo64 __PRI_64_LENGTH_MODIFIER__ "o" -# define PRIu64 __PRI_64_LENGTH_MODIFIER__ "u" -# define PRIx64 __PRI_64_LENGTH_MODIFIER__ "x" -# define PRIX64 __PRI_64_LENGTH_MODIFIER__ "X" - -# define PRIdLEAST8 PRId8 -# define PRIiLEAST8 PRIi8 -# define PRIoLEAST8 PRIo8 -# define PRIuLEAST8 PRIu8 -# define PRIxLEAST8 PRIx8 -# define PRIXLEAST8 PRIX8 - -# define PRIdLEAST16 PRId16 -# define PRIiLEAST16 PRIi16 -# define PRIoLEAST16 PRIo16 -# define PRIuLEAST16 PRIu16 -# define PRIxLEAST16 PRIx16 -# define PRIXLEAST16 PRIX16 - -# define PRIdLEAST32 PRId32 -# define PRIiLEAST32 PRIi32 -# define PRIoLEAST32 PRIo32 -# define PRIuLEAST32 PRIu32 -# define PRIxLEAST32 PRIx32 -# define PRIXLEAST32 PRIX32 - -# define PRIdLEAST64 PRId64 -# define PRIiLEAST64 PRIi64 -# define PRIoLEAST64 PRIo64 -# define PRIuLEAST64 PRIu64 -# define PRIxLEAST64 PRIx64 -# define PRIXLEAST64 PRIX64 - -# define PRIdFAST8 PRId8 -# define PRIiFAST8 PRIi8 -# define PRIoFAST8 PRIo8 -# define PRIuFAST8 PRIu8 -# define PRIxFAST8 PRIx8 -# define PRIXFAST8 PRIX8 - -# define PRIdFAST16 PRId16 -# define PRIiFAST16 PRIi16 -# define PRIoFAST16 PRIo16 -# define PRIuFAST16 PRIu16 -# define PRIxFAST16 PRIx16 -# define PRIXFAST16 PRIX16 - -# define PRIdFAST32 PRId32 -# define PRIiFAST32 PRIi32 -# define PRIoFAST32 PRIo32 -# define PRIuFAST32 PRIu32 -# define PRIxFAST32 PRIx32 -# define PRIXFAST32 PRIX32 - -# define PRIdFAST64 PRId64 -# define PRIiFAST64 PRIi64 -# define PRIoFAST64 PRIo64 -# define PRIuFAST64 PRIu64 -# define PRIxFAST64 PRIx64 -# define PRIXFAST64 PRIX64 - -/* int32_t is 'int', but intptr_t is 'long'. */ -# define PRIdPTR "ld" -# define PRIiPTR "li" -# define PRIoPTR "lo" -# define PRIuPTR "lu" -# define PRIxPTR "lx" -# define PRIXPTR "lX" - -# define PRIdMAX __PRI_MAX_LENGTH_MODIFIER__ "d" -# define PRIiMAX __PRI_MAX_LENGTH_MODIFIER__ "i" -# define PRIoMAX __PRI_MAX_LENGTH_MODIFIER__ "o" -# define PRIuMAX __PRI_MAX_LENGTH_MODIFIER__ "u" -# define PRIxMAX __PRI_MAX_LENGTH_MODIFIER__ "x" -# define PRIXMAX __PRI_MAX_LENGTH_MODIFIER__ "X" - -# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 > 1020 -# define SCNd8 __PRI_8_LENGTH_MODIFIER__ "d" -# define SCNi8 __PRI_8_LENGTH_MODIFIER__ "i" -# define SCNo8 __PRI_8_LENGTH_MODIFIER__ "o" -# define SCNu8 __PRI_8_LENGTH_MODIFIER__ "u" -# define SCNx8 __PRI_8_LENGTH_MODIFIER__ "x" -# else -# define SCNd8 "hhd" -# define SCNi8 "hhi" -# define SCNo8 "hho" -# define SCNu8 "hhu" -# define SCNx8 "hhx" -# endif - -# define SCNd16 "hd" -# define SCNi16 "hi" -# define SCNo16 "ho" -# define SCNu16 "hu" -# define SCNx16 "hx" - -# define SCNd32 "d" -# define SCNi32 "i" -# define SCNo32 "o" -# define SCNu32 "u" -# define SCNx32 "x" - -# define SCNd64 __SCN_64_LENGTH_MODIFIER__ "d" -# define SCNi64 __SCN_64_LENGTH_MODIFIER__ "i" -# define SCNo64 __SCN_64_LENGTH_MODIFIER__ "o" -# define SCNu64 __SCN_64_LENGTH_MODIFIER__ "u" -# define SCNx64 __SCN_64_LENGTH_MODIFIER__ "x" - -# define SCNdLEAST8 SCNd8 -# define SCNiLEAST8 SCNi8 -# define SCNoLEAST8 SCNo8 -# define SCNuLEAST8 SCNu8 -# define SCNxLEAST8 SCNx8 - -# define SCNdLEAST16 SCNd16 -# define SCNiLEAST16 SCNi16 -# define SCNoLEAST16 SCNo16 -# define SCNuLEAST16 SCNu16 -# define SCNxLEAST16 SCNx16 - -# define SCNdLEAST32 SCNd32 -# define SCNiLEAST32 SCNi32 -# define SCNoLEAST32 SCNo32 -# define SCNuLEAST32 SCNu32 -# define SCNxLEAST32 SCNx32 - -# define SCNdLEAST64 SCNd64 -# define SCNiLEAST64 SCNi64 -# define SCNoLEAST64 SCNo64 -# define SCNuLEAST64 SCNu64 -# define SCNxLEAST64 SCNx64 - -# define SCNdFAST8 SCNd8 -# define SCNiFAST8 SCNi8 -# define SCNoFAST8 SCNo8 -# define SCNuFAST8 SCNu8 -# define SCNxFAST8 SCNx8 - -# define SCNdFAST16 SCNd16 -# define SCNiFAST16 SCNi16 -# define SCNoFAST16 SCNo16 -# define SCNuFAST16 SCNu16 -# define SCNxFAST16 SCNx16 - -# define SCNdFAST32 SCNd32 -# define SCNiFAST32 SCNi32 -# define SCNoFAST32 SCNo32 -# define SCNuFAST32 SCNu32 -# define SCNxFAST32 SCNx32 - -# define SCNdFAST64 SCNd64 -# define SCNiFAST64 SCNi64 -# define SCNoFAST64 SCNo64 -# define SCNuFAST64 SCNu64 -# define SCNxFAST64 SCNx64 - -# define SCNdPTR "ld" -# define SCNiPTR "li" -# define SCNoPTR "lo" -# define SCNuPTR "lu" -# define SCNxPTR "lx" - -# define SCNdMAX __SCN_MAX_LENGTH_MODIFIER__ "d" -# define SCNiMAX __SCN_MAX_LENGTH_MODIFIER__ "i" -# define SCNoMAX __SCN_MAX_LENGTH_MODIFIER__ "o" -# define SCNuMAX __SCN_MAX_LENGTH_MODIFIER__ "u" -# define SCNxMAX __SCN_MAX_LENGTH_MODIFIER__ "x" - -#endif /* if C++, then __STDC_FORMAT_MACROS enables the above macros */ - -#if !defined(_INTTYPES_H_) -#define _INTTYPES_H_ - -#include <sys/cdefs.h> /* For __BEGIN_DECLS and __END_DECLS */ -#include <_types.h> /* For __darwin_wchar_t */ -#include <stdint.h> - -#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) - /* Translator is not ISO/IEC 9899:1999-compliant. */ -# if !defined(restrict) -# define restrict -# define __RESTRICT_KEYWORD_DEFINED__ -# endif -#endif - -__BEGIN_DECLS - - /* 7.8.2.1 */ - extern intmax_t imaxabs(intmax_t j); - - /* 7.8.2.2 */ - typedef struct { - intmax_t quot; - intmax_t rem; - } imaxdiv_t; - - extern imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom); - - /* 7.8.2.3 */ - extern intmax_t strtoimax(const char * restrict nptr, char ** restrict endptr, int base); - extern uintmax_t strtoumax(const char * restrict nptr, char ** restrict endptr, int base); - -#ifndef __cplusplus /* wchar_t is a built-in type in C++ */ -# ifndef _WCHAR_T -# define _WCHAR_T - typedef __darwin_wchar_t wchar_t; -# endif /* _WCHAR_T */ -#endif /* __cplusplus */ - - /* 7.8.2.4 */ - extern intmax_t wcstoimax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); - extern uintmax_t wcstoumax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); - -/* Poison the following routines if -fshort-wchar is set */ -#if !defined(__cplusplus) && defined(__WCHAR_MAX__) && __WCHAR_MAX__ <= 0xffffU -#pragma GCC poison wcstoimax wcstoumax -#endif - -__END_DECLS - -#ifdef _USE_EXTENDED_LOCALES_ -#include <xlocale/_inttypes.h> -#endif /* _USE_EXTENDED_LOCALES_ */ - -/* - No need to #undef the __*_{8,64}_LENGTH_MODIFIER__ macros; - in fact, you can't #undef them, because later uses of any of - their dependents will *not* then do the intended substitution. - Expansion of a #define like this one: - - #define x IDENT y - - uses the cpp value of IDENT at the location where x is *expanded*, - not where it is #defined. -*/ - -#if defined(__RESTRICT_KEYWORD_DEFINED__) -# undef restrict -# undef __RESTRICT_KEYWORD_DEFINED__ -#endif - -#endif /* !_INTTYPES_H_ */ diff --git a/i386/include/libkern/OSAtomic.h b/i386/include/libkern/OSAtomic.h deleted file mode 100644 index 9f2dba4..0000000 --- a/i386/include/libkern/OSAtomic.h +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _OSATOMIC_H_ -#define _OSATOMIC_H_ - -#include <stddef.h> -#include <sys/cdefs.h> -#include <stdint.h> -#include <stdbool.h> - -/* These are the preferred versions of the atomic and synchronization operations. - * Their implementation is customized at boot time for the platform, including - * late-breaking errata fixes as necessary. They are thread safe. - * - * WARNING: all addresses passed to these functions must be "naturally aligned", ie - * int32_t's must be 32-bit aligned (low 2 bits of address zero), and int64_t's - * must be 64-bit aligned (low 3 bits of address zero.) - * - * Note that some versions of the atomic functions incorporate memory barriers, - * and some do not. Barriers strictly order memory access on a weakly-ordered - * architecture such as PPC. All loads and stores executed in sequential program - * order before the barrier will complete before any load or store executed after - * the barrier. On a uniprocessor, the barrier operation is typically a nop. - * On a multiprocessor, the barrier can be quite expensive on some platforms, - * eg PPC. - * - * Most code will want to use the barrier functions to insure that memory shared - * between threads is properly synchronized. For example, if you want to initialize - * a shared data structure and then atomically increment a variable to indicate - * that the initialization is complete, then you must use OSAtomicIncrement32Barrier() - * to ensure that the stores to your data structure complete before the atomic add. - * Likewise, the consumer of that data structure must use OSAtomicDecrement32Barrier(), - * in order to ensure that their loads of the structure are not executed before - * the atomic decrement. On the other hand, if you are simply incrementing a global - * counter, then it is safe and potentially faster to use OSAtomicIncrement32(). - * - * If you are unsure which version to use, prefer the barrier variants as they are - * safer. - * - * The spinlock and queue operations always incorporate a barrier. - */ -__BEGIN_DECLS - - -/* Arithmetic functions. They return the new value. - */ -int32_t OSAtomicAdd32( int32_t __theAmount, volatile int32_t *__theValue ); -int32_t OSAtomicAdd32Barrier( int32_t __theAmount, volatile int32_t *__theValue ); - -__inline static -int32_t OSAtomicIncrement32( volatile int32_t *__theValue ) - { return OSAtomicAdd32( 1, __theValue); } -__inline static -int32_t OSAtomicIncrement32Barrier( volatile int32_t *__theValue ) - { return OSAtomicAdd32Barrier( 1, __theValue); } - -__inline static -int32_t OSAtomicDecrement32( volatile int32_t *__theValue ) - { return OSAtomicAdd32( -1, __theValue); } -__inline static -int32_t OSAtomicDecrement32Barrier( volatile int32_t *__theValue ) - { return OSAtomicAdd32Barrier( -1, __theValue); } - -#if defined(__ppc64__) || defined(__i386__) || defined(__x86_64__) || defined(__arm__) - -int64_t OSAtomicAdd64( int64_t __theAmount, volatile int64_t *__theValue ); -int64_t OSAtomicAdd64Barrier( int64_t __theAmount, volatile int64_t *__theValue ); - -__inline static -int64_t OSAtomicIncrement64( volatile int64_t *__theValue ) - { return OSAtomicAdd64( 1, __theValue); } -__inline static -int64_t OSAtomicIncrement64Barrier( volatile int64_t *__theValue ) - { return OSAtomicAdd64Barrier( 1, __theValue); } - -__inline static -int64_t OSAtomicDecrement64( volatile int64_t *__theValue ) - { return OSAtomicAdd64( -1, __theValue); } -__inline static -int64_t OSAtomicDecrement64Barrier( volatile int64_t *__theValue ) - { return OSAtomicAdd64Barrier( -1, __theValue); } - -#endif /* defined(__ppc64__) || defined(__i386__) || defined(__x86_64__) || defined(__arm__) */ - - -/* Boolean functions (and, or, xor.) These come in four versions for each operation: - * with and without barriers, and returning the old or new value of the operation. - * The "Orig" versions return the original value, ie before the operation, the non-Orig - * versions return the value after the operation. All are layered on top of - * compare-and-swap. - */ -int32_t OSAtomicOr32( uint32_t __theMask, volatile uint32_t *__theValue ); -int32_t OSAtomicOr32Barrier( uint32_t __theMask, volatile uint32_t *__theValue ); -int32_t OSAtomicOr32Orig( uint32_t __theMask, volatile uint32_t *__theValue ); -int32_t OSAtomicOr32OrigBarrier( uint32_t __theMask, volatile uint32_t *__theValue ); - -int32_t OSAtomicAnd32( uint32_t __theMask, volatile uint32_t *__theValue ); -int32_t OSAtomicAnd32Barrier( uint32_t __theMask, volatile uint32_t *__theValue ); -int32_t OSAtomicAnd32Orig( uint32_t __theMask, volatile uint32_t *__theValue ); -int32_t OSAtomicAnd32OrigBarrier( uint32_t __theMask, volatile uint32_t *__theValue ); - -int32_t OSAtomicXor32( uint32_t __theMask, volatile uint32_t *__theValue ); -int32_t OSAtomicXor32Barrier( uint32_t __theMask, volatile uint32_t *__theValue ); -int32_t OSAtomicXor32Orig( uint32_t __theMask, volatile uint32_t *__theValue ); -int32_t OSAtomicXor32OrigBarrier( uint32_t __theMask, volatile uint32_t *__theValue ); - - -/* Compare and swap. They return true if the swap occured. There are several versions, - * depending on data type and whether or not a barrier is used. - */ -bool OSAtomicCompareAndSwap32( int32_t __oldValue, int32_t __newValue, volatile int32_t *__theValue ); -bool OSAtomicCompareAndSwap32Barrier( int32_t __oldValue, int32_t __newValue, volatile int32_t *__theValue ); -bool OSAtomicCompareAndSwapPtr( void *__oldValue, void *__newValue, void * volatile *__theValue ); -bool OSAtomicCompareAndSwapPtrBarrier( void *__oldValue, void *__newValue, void * volatile *__theValue ); -bool OSAtomicCompareAndSwapInt( int __oldValue, int __newValue, volatile int *__theValue ); -bool OSAtomicCompareAndSwapIntBarrier( int __oldValue, int __newValue, volatile int *__theValue ); -bool OSAtomicCompareAndSwapLong( long __oldValue, long __newValue, volatile long *__theValue ); -bool OSAtomicCompareAndSwapLongBarrier( long __oldValue, long __newValue, volatile long *__theValue ); - -#if defined(__ppc64__) || defined(__i386__) || defined(__x86_64__) || defined(__arm__) - -bool OSAtomicCompareAndSwap64( int64_t __oldValue, int64_t __newValue, volatile int64_t *__theValue ); -bool OSAtomicCompareAndSwap64Barrier( int64_t __oldValue, int64_t __newValue, volatile int64_t *__theValue ); - -#endif /* defined(__ppc64__) || defined(__i386__) || defined(__x86_64__) || defined(__arm__) */ - - -/* Test and set. They return the original value of the bit, and operate on bit (0x80>>(n&7)) - * in byte ((char*)theAddress + (n>>3)). - */ -bool OSAtomicTestAndSet( uint32_t __n, volatile void *__theAddress ); -bool OSAtomicTestAndSetBarrier( uint32_t __n, volatile void *__theAddress ); -bool OSAtomicTestAndClear( uint32_t __n, volatile void *__theAddress ); -bool OSAtomicTestAndClearBarrier( uint32_t __n, volatile void *__theAddress ); - - -/* Spinlocks. These use memory barriers as required to synchronize access to shared - * memory protected by the lock. The lock operation spins, but employs various strategies - * to back off if the lock is held, making it immune to most priority-inversion livelocks. - * The try operation immediately returns false if the lock was held, true if it took the - * lock. The convention is that unlocked is zero, locked is nonzero. - */ -#define OS_SPINLOCK_INIT 0 - -typedef int32_t OSSpinLock; - -bool OSSpinLockTry( volatile OSSpinLock *__lock ); -void OSSpinLockLock( volatile OSSpinLock *__lock ); -void OSSpinLockUnlock( volatile OSSpinLock *__lock ); - - -/* Lockless atomic enqueue and dequeue. These routines manipulate singly - * linked LIFO lists. Ie, a dequeue will return the most recently enqueued - * element, or NULL if the list is empty. The "offset" parameter is the offset - * in bytes of the link field within the data structure being queued. The - * link field should be a pointer type. Memory barriers are incorporated as - * needed to permit thread-safe access to the queue element. - */ -#if defined(__x86_64__) - -typedef volatile struct { - void *opaque1; - long opaque2; -} OSQueueHead __attribute__ ((aligned (16))); - -#else - -typedef volatile struct { - void *opaque1; - long opaque2; -} OSQueueHead; - -#endif - -#define OS_ATOMIC_QUEUE_INIT { NULL, 0 } - -void OSAtomicEnqueue( OSQueueHead *__list, void *__new, size_t __offset); -void* OSAtomicDequeue( OSQueueHead *__list, size_t __offset); - - -/* Memory barrier. It is both a read and write barrier. - */ -void OSMemoryBarrier( void ); - - -__END_DECLS - -#endif /* _OSATOMIC_H_ */ diff --git a/i386/include/libkern/OSByteOrder.h b/i386/include/libkern/OSByteOrder.h deleted file mode 100644 index 915a249..0000000 --- a/i386/include/libkern/OSByteOrder.h +++ /dev/null @@ -1,310 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _OS_OSBYTEORDER_H -#define _OS_OSBYTEORDER_H - -#include <stdint.h> -#include <libkern/_OSByteOrder.h> - -/* Macros for swapping constant values in the preprocessing stage. */ -#define OSSwapConstInt16(x) __DARWIN_OSSwapConstInt16(x) -#define OSSwapConstInt32(x) __DARWIN_OSSwapConstInt32(x) -#define OSSwapConstInt64(x) __DARWIN_OSSwapConstInt64(x) - -#if defined(__GNUC__) - -#if (defined(__ppc__) || defined(__ppc64__)) -#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 - -#else /* ! __GNUC__ */ - -#include <libkern/machine/OSByteOrder.h> - -#endif /* __GNUC__ */ - -#define OSSwapInt16(x) __DARWIN_OSSwapInt16(x) -#define OSSwapInt32(x) __DARWIN_OSSwapInt32(x) -#define OSSwapInt64(x) __DARWIN_OSSwapInt64(x) - -enum { - OSUnknownByteOrder, - OSLittleEndian, - OSBigEndian -}; - -OS_INLINE -int32_t -OSHostByteOrder(void) { -#if defined(__LITTLE_ENDIAN__) - return OSLittleEndian; -#elif defined(__BIG_ENDIAN__) - return OSBigEndian; -#else - return OSUnknownByteOrder; -#endif -} - -#define OSReadBigInt(x, y) OSReadBigInt32(x, y) -#define OSWriteBigInt(x, y, z) OSWriteBigInt32(x, y, z) -#define OSSwapBigToHostInt(x) OSSwapBigToHostInt32(x) -#define OSSwapHostToBigInt(x) OSSwapHostToBigInt32(x) -#define OSReadLittleInt(x, y) OSReadLittleInt32(x, y) -#define OSWriteLittleInt(x, y, z) OSWriteLittleInt32(x, y, z) -#define OSSwapHostToLittleInt(x) OSSwapHostToLittleInt32(x) -#define OSSwapLittleToHostInt(x) OSSwapLittleToHostInt32(x) - -/* Functions for loading native endian values. */ - -OS_INLINE -uint16_t -_OSReadInt16( - const volatile void * base, - uintptr_t byteOffset -) -{ - return *(volatile uint16_t *)((uintptr_t)base + byteOffset); -} - -OS_INLINE -uint32_t -_OSReadInt32( - const volatile void * base, - uintptr_t byteOffset -) -{ - return *(volatile uint32_t *)((uintptr_t)base + byteOffset); -} - -OS_INLINE -uint64_t -_OSReadInt64( - const volatile void * base, - uintptr_t byteOffset -) -{ - return *(volatile uint64_t *)((uintptr_t)base + byteOffset); -} - -/* Functions for storing native endian values. */ - -OS_INLINE -void -_OSWriteInt16( - volatile void * base, - uintptr_t byteOffset, - uint16_t data -) -{ - *(volatile uint16_t *)((uintptr_t)base + byteOffset) = data; -} - -OS_INLINE -void -_OSWriteInt32( - volatile void * base, - uintptr_t byteOffset, - uint32_t data -) -{ - *(volatile uint32_t *)((uintptr_t)base + byteOffset) = data; -} - -OS_INLINE -void -_OSWriteInt64( - volatile void * base, - uintptr_t byteOffset, - uint64_t data -) -{ - *(volatile uint64_t *)((uintptr_t)base + byteOffset) = data; -} - -#if defined(__BIG_ENDIAN__) - -/* Functions for loading big endian to host endianess. */ - -#define OSReadBigInt16(base, byteOffset) _OSReadInt16(base, byteOffset) -#define OSReadBigInt32(base, byteOffset) _OSReadInt32(base, byteOffset) -#define OSReadBigInt64(base, byteOffset) _OSReadInt64(base, byteOffset) - -/* Functions for storing host endianess to big endian. */ - -#define OSWriteBigInt16(base, byteOffset, data) _OSWriteInt16(base, byteOffset, data) -#define OSWriteBigInt32(base, byteOffset, data) _OSWriteInt32(base, byteOffset, data) -#define OSWriteBigInt64(base, byteOffset, data) _OSWriteInt64(base, byteOffset, data) - -/* Functions for loading little endian to host endianess. */ - -#define OSReadLittleInt16(base, byteOffset) OSReadSwapInt16(base, byteOffset) -#define OSReadLittleInt32(base, byteOffset) OSReadSwapInt32(base, byteOffset) -#define OSReadLittleInt64(base, byteOffset) OSReadSwapInt64(base, byteOffset) - -/* Functions for storing host endianess to little endian. */ - -#define OSWriteLittleInt16(base, byteOffset, data) OSWriteSwapInt16(base, byteOffset, data) -#define OSWriteLittleInt32(base, byteOffset, data) OSWriteSwapInt32(base, byteOffset, data) -#define OSWriteLittleInt64(base, byteOffset, data) OSWriteSwapInt64(base, byteOffset, data) - -/* Host endianess to big endian byte swapping macros for constants. */ - -#define OSSwapHostToBigConstInt16(x) ((uint16_t)(x)) -#define OSSwapHostToBigConstInt32(x) ((uint32_t)(x)) -#define OSSwapHostToBigConstInt64(x) ((uint64_t)(x)) - -/* Generic host endianess to big endian byte swapping functions. */ - -#define OSSwapHostToBigInt16(x) ((uint16_t)(x)) -#define OSSwapHostToBigInt32(x) ((uint32_t)(x)) -#define OSSwapHostToBigInt64(x) ((uint64_t)(x)) - -/* Host endianess to little endian byte swapping macros for constants. */ - -#define OSSwapHostToLittleConstInt16(x) OSSwapConstInt16(x) -#define OSSwapHostToLittleConstInt32(x) OSSwapConstInt32(x) -#define OSSwapHostToLittleConstInt64(x) OSSwapConstInt64(x) - -/* Generic host endianess to little endian byte swapping functions. */ - -#define OSSwapHostToLittleInt16(x) OSSwapInt16(x) -#define OSSwapHostToLittleInt32(x) OSSwapInt32(x) -#define OSSwapHostToLittleInt64(x) OSSwapInt64(x) - -/* Big endian to host endianess byte swapping macros for constants. */ - -#define OSSwapBigToHostConstInt16(x) ((uint16_t)(x)) -#define OSSwapBigToHostConstInt32(x) ((uint32_t)(x)) -#define OSSwapBigToHostConstInt64(x) ((uint64_t)(x)) - -/* Generic big endian to host endianess byte swapping functions. */ - -#define OSSwapBigToHostInt16(x) ((uint16_t)(x)) -#define OSSwapBigToHostInt32(x) ((uint32_t)(x)) -#define OSSwapBigToHostInt64(x) ((uint64_t)(x)) - -/* Little endian to host endianess byte swapping macros for constants. */ - -#define OSSwapLittleToHostConstInt16(x) OSSwapConstInt16(x) -#define OSSwapLittleToHostConstInt32(x) OSSwapConstInt32(x) -#define OSSwapLittleToHostConstInt64(x) OSSwapConstInt64(x) - -/* Generic little endian to host endianess byte swapping functions. */ - -#define OSSwapLittleToHostInt16(x) OSSwapInt16(x) -#define OSSwapLittleToHostInt32(x) OSSwapInt32(x) -#define OSSwapLittleToHostInt64(x) OSSwapInt64(x) - -#elif defined(__LITTLE_ENDIAN__) - -/* Functions for loading big endian to host endianess. */ - -#define OSReadBigInt16(base, byteOffset) OSReadSwapInt16(base, byteOffset) -#define OSReadBigInt32(base, byteOffset) OSReadSwapInt32(base, byteOffset) -#define OSReadBigInt64(base, byteOffset) OSReadSwapInt64(base, byteOffset) - -/* Functions for storing host endianess to big endian. */ - -#define OSWriteBigInt16(base, byteOffset, data) OSWriteSwapInt16(base, byteOffset, data) -#define OSWriteBigInt32(base, byteOffset, data) OSWriteSwapInt32(base, byteOffset, data) -#define OSWriteBigInt64(base, byteOffset, data) OSWriteSwapInt64(base, byteOffset, data) - -/* Functions for loading little endian to host endianess. */ - -#define OSReadLittleInt16(base, byteOffset) _OSReadInt16(base, byteOffset) -#define OSReadLittleInt32(base, byteOffset) _OSReadInt32(base, byteOffset) -#define OSReadLittleInt64(base, byteOffset) _OSReadInt64(base, byteOffset) - -/* Functions for storing host endianess to little endian. */ - -#define OSWriteLittleInt16(base, byteOffset, data) _OSWriteInt16(base, byteOffset, data) -#define OSWriteLittleInt32(base, byteOffset, data) _OSWriteInt32(base, byteOffset, data) -#define OSWriteLittleInt64(base, byteOffset, data) _OSWriteInt64(base, byteOffset, data) - -/* Host endianess to big endian byte swapping macros for constants. */ - -#define OSSwapHostToBigConstInt16(x) OSSwapConstInt16(x) -#define OSSwapHostToBigConstInt32(x) OSSwapConstInt32(x) -#define OSSwapHostToBigConstInt64(x) OSSwapConstInt64(x) - -/* Generic host endianess to big endian byte swapping functions. */ - -#define OSSwapHostToBigInt16(x) OSSwapInt16(x) -#define OSSwapHostToBigInt32(x) OSSwapInt32(x) -#define OSSwapHostToBigInt64(x) OSSwapInt64(x) - -/* Host endianess to little endian byte swapping macros for constants. */ - -#define OSSwapHostToLittleConstInt16(x) ((uint16_t)(x)) -#define OSSwapHostToLittleConstInt32(x) ((uint32_t)(x)) -#define OSSwapHostToLittleConstInt64(x) ((uint64_t)(x)) - -/* Generic host endianess to little endian byte swapping functions. */ - -#define OSSwapHostToLittleInt16(x) ((uint16_t)(x)) -#define OSSwapHostToLittleInt32(x) ((uint32_t)(x)) -#define OSSwapHostToLittleInt64(x) ((uint64_t)(x)) - -/* Big endian to host endianess byte swapping macros for constants. */ - -#define OSSwapBigToHostConstInt16(x) OSSwapConstInt16(x) -#define OSSwapBigToHostConstInt32(x) OSSwapConstInt32(x) -#define OSSwapBigToHostConstInt64(x) OSSwapConstInt64(x) - -/* Generic big endian to host endianess byte swapping functions. */ - -#define OSSwapBigToHostInt16(x) OSSwapInt16(x) -#define OSSwapBigToHostInt32(x) OSSwapInt32(x) -#define OSSwapBigToHostInt64(x) OSSwapInt64(x) - -/* Little endian to host endianess byte swapping macros for constants. */ - -#define OSSwapLittleToHostConstInt16(x) ((uint16_t)(x)) -#define OSSwapLittleToHostConstInt32(x) ((uint32_t)(x)) -#define OSSwapLittleToHostConstInt64(x) ((uint64_t)(x)) - -/* Generic little endian to host endianess byte swapping functions. */ - -#define OSSwapLittleToHostInt16(x) ((uint16_t)(x)) -#define OSSwapLittleToHostInt32(x) ((uint32_t)(x)) -#define OSSwapLittleToHostInt64(x) ((uint64_t)(x)) - -#else -#error Unknown endianess. -#endif - -#endif /* ! _OS_OSBYTEORDER_H */ - - diff --git a/i386/include/libkern/OSCacheControl.h b/i386/include/libkern/OSCacheControl.h deleted file mode 100644 index 771a704..0000000 --- a/i386/include/libkern/OSCacheControl.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _OS_CACHE_CONTROL_H_ -#define _OS_CACHE_CONTROL_H_ - -#include <stddef.h> -#include <sys/cdefs.h> -#include <stdint.h> - -__BEGIN_DECLS - - -/* Functions performed by sys_cache_control(): */ - -/* Prepare memory for execution. This should be called - * after writing machine instructions to memory, before - * executing them. It syncs the dcache and icache. - * On IA32 processors this function is a NOP, because - * no synchronization is required. - */ -#define kCacheFunctionPrepareForExecution 1 - -/* Flush data cache(s). This ensures that cached data - * makes it all the way out to DRAM, and then removes - * copies of the data from all processor caches. - * It can be useful when dealing with cache incoherent - * devices or DMA. - */ -#define kCacheFunctionFlushDcache 2 - - -/* perform one of the above cache functions: */ -int sys_cache_control( int function, void *start, size_t len); - -/* equivalent to sys_cache_control(kCacheFunctionPrepareForExecution): */ -void sys_icache_invalidate( void *start, size_t len); - -/* equivalent to sys_cache_control(kCacheFunctionFlushDcache): */ -void sys_dcache_flush( void *start, size_t len); - - -__END_DECLS - -#endif /* _OS_CACHE_CONTROL_H_ */ diff --git a/i386/include/libkern/OSDebug.h b/i386/include/libkern/OSDebug.h deleted file mode 100644 index eaeefc1..0000000 --- a/i386/include/libkern/OSDebug.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - -#ifndef _OS_OSDEBBUG_H -#define _OS_OSDEBBUG_H - -#include <sys/cdefs.h> -#include <mach/mach_types.h> - -__BEGIN_DECLS - -extern int log_leaks; - -/* Use kernel_debug() to log a backtrace */ -extern void trace_backtrace(unsigned int debugid, unsigned int debugid2, unsigned long size, unsigned long data); -/* Report a message with a 4 entry backtrace - very slow */ -extern void OSReportWithBacktrace(const char *str, ...); -extern unsigned OSBacktrace(void **bt, unsigned maxAddrs); - -/*! @function OSKernelStackRemaining - @abstract Returns bytes available below the current stack frame. - @discussion Returns bytes available below the current stack frame. Safe for interrupt or thread context. - @result Approximate byte count available. */ - -vm_offset_t OSKernelStackRemaining( void ); - -__END_DECLS - -#define TRACE_MACHLEAKS(a,b,c,d) \ -do { \ - if (log_leaks) \ - trace_backtrace(a,b,c,d); \ -} while(0) - -#endif /* !_OS_OSDEBBUG_H */ diff --git a/i386/include/libkern/OSKextLib.h b/i386/include/libkern/OSKextLib.h deleted file mode 100644 index dbe2ba2..0000000 --- a/i386/include/libkern/OSKextLib.h +++ /dev/null @@ -1,472 +0,0 @@ -/* - * Copyright (c) 2008 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _LIBKERN_OSKEXTLIB_H -#define _LIBKERN_OSKEXTLIB_H - -#include <sys/cdefs.h> -__BEGIN_DECLS - -#include <stdint.h> -#include <mach/kmod.h> -#include <mach/vm_types.h> - -#include <CoreFoundation/CoreFoundation.h> -#include <System/libkern/OSReturn.h> - -/*! - * @header - * - * Declares functions, basic return values, and other constants - * related to kernel extensions (kexts). - */ - -#if PRAGMA_MARK -#pragma mark - -/********************************************************************/ -#pragma mark OSReturn Values for Kernel Extensions -/********************************************************************/ -#endif -/*! - * @group OSReturn Values for Kernel Extensions - * Many kext-related functions return these values, - * as well as those defined under - * <code>@link //apple_ref/c/tdef/OSReturn OSReturn@/link</code> - * and other variants of <code>kern_return_t</code>. - */ - - -#define sub_libkern_kext err_sub(2) -#define libkern_kext_err(code) (sys_libkern|sub_libkern_kext|(code)) - - -/*! - * @define kOSKextReturnInternalError - * @abstract An internal error in the kext library. - * Contrast with <code>@link //apple_ref/c/econst/OSReturnError - * OSReturnError@/link</code>. - */ -#define kOSKextReturnInternalError libkern_kext_err(0x1) - -/*! - * @define kOSKextReturnNoMemory - * @abstract Memory allocation failed. - */ -#define kOSKextReturnNoMemory libkern_kext_err(0x2) - -/*! - * @define kOSKextReturnNoResources - * @abstract Some resource other than memory (such as available load tags) - * is exhausted. - */ -#define kOSKextReturnNoResources libkern_kext_err(0x3) - -/*! - * @define kOSKextReturnNotPrivileged - * @abstract The caller lacks privileges to perform the requested operation. - */ -#define kOSKextReturnNotPrivileged libkern_kext_err(0x4) - -/*! - * @define kOSKextReturnInvalidArgument - * @abstract Invalid argument. - */ -#define kOSKextReturnInvalidArgument libkern_kext_err(0x5) - -/*! - * @define kOSKextReturnNotFound - * @abstract Search item not found. - */ -#define kOSKextReturnNotFound libkern_kext_err(0x6) - -/*! - * @define kOSKextReturnBadData - * @abstract Malformed data (not used for XML). - */ -#define kOSKextReturnBadData libkern_kext_err(0x7) - -/*! - * @define kOSKextReturnSerialization - * @abstract Error converting or (un)serializing URL, string, or XML. - */ -#define kOSKextReturnSerialization libkern_kext_err(0x8) - -/*! - * @define kOSKextReturnUnsupported - * @abstract Operation is no longer or not yet supported. - */ -#define kOSKextReturnUnsupported libkern_kext_err(0x9) - -/*! - * @define kOSKextReturnDisabled - * @abstract Operation is currently disabled. - */ -#define kOSKextReturnDisabled libkern_kext_err(0xa) - -/*! - * @define kOSKextReturnNotAKext - * @abstract Bundle is not a kernel extension. - */ -#define kOSKextReturnNotAKext libkern_kext_err(0xb) - -/*! - * @define kOSKextReturnValidation - * @abstract Validation failures encountered; check diagnostics for details. - */ -#define kOSKextReturnValidation libkern_kext_err(0xc) - -/*! - * @define kOSKextReturnAuthentication - * @abstract Authetication failures encountered; check diagnostics for details. - */ -#define kOSKextReturnAuthentication libkern_kext_err(0xd) - -/*! - * @define kOSKextReturnDependencies - * @abstract Dependency resolution failures encountered; check diagnostics for details. - */ -#define kOSKextReturnDependencies libkern_kext_err(0xe) - -/*! - * @define kOSKextReturnArchNotFound - * @abstract Kext does not contain code for the requested architecture. - */ -#define kOSKextReturnArchNotFound libkern_kext_err(0xf) - -/*! - * @define kOSKextReturnCache - * @abstract An error occurred processing a system kext cache. - */ -#define kOSKextReturnCache libkern_kext_err(0x10) - -/*! - * @define kOSKextReturnDeferred - * @abstract Operation has been posted asynchronously to user space (kernel only). - */ -#define kOSKextReturnDeferred libkern_kext_err(0x11) - -/*! - * @define kOSKextReturnBootLevel - * @abstract Kext not loadable or operation not allowed at current boot level. - */ -#define kOSKextReturnBootLevel libkern_kext_err(0x12) - -/*! - * @define kOSKextReturnNotLoadable - * @abstract Kext cannot be loaded; check diagnostics for details. - */ -#define kOSKextReturnNotLoadable libkern_kext_err(0x13) - -/*! - * @define kOSKextReturnLoadedVersionDiffers - * @abstract A different version (or executable UUID, or executable by checksum) - * of the requested kext is already loaded. - */ -#define kOSKextReturnLoadedVersionDiffers libkern_kext_err(0x14) - -/*! - * @define kOSKextReturnDependencyLoadError - * @abstract A load error occurred on a dependency of the kext being loaded. - */ -#define kOSKextReturnDependencyLoadError libkern_kext_err(0x15) - -/*! - * @define kOSKextReturnLinkError - * @abstract A link failure occured with this kext or a dependency. - */ -#define kOSKextReturnLinkError libkern_kext_err(0x16) - -/*! - * @define kOSKextReturnStartStopError - * @abstract The kext start or stop routine returned an error. - */ -#define kOSKextReturnStartStopError libkern_kext_err(0x17) - -/*! - * @define kOSKextReturnInUse - * @abstract The kext is currently in use or has outstanding references, - * and cannot be unloaded. - */ -#define kOSKextReturnInUse libkern_kext_err(0x18) - -/*! - * @define kOSKextReturnTimeout - * @abstract A kext request has timed out. - */ -#define kOSKextReturnTimeout libkern_kext_err(0x19) - -/*! - * @define kOSKextReturnStopping - * @abstract The kext is in the process of stopping; requests cannot be made. - */ -#define kOSKextReturnStopping libkern_kext_err(0x1a) - -#if PRAGMA_MARK -#pragma mark - -/********************************************************************/ -#pragma mark Kext/OSBundle Property List Keys -/********************************************************************/ -#endif -/*! - * @group Kext Property List Keys - * These constants cover CFBundle properties defined for kernel extensions. - * Because they are used in the kernel, if you want to use one with - * CFBundle APIs you'll need to wrap it in a <code>CFSTR()</code> macro. - */ - - -/*! - * @define kOSBundleCompatibleVersionKey - * @abstract A string giving the backwards-compatible version of a library kext - * in extended Mac OS 'vers' format (####.##.##s{1-255} where 's' - * is a build stage 'd', 'a', 'b', 'f' or 'fc'). - */ -#define kOSBundleCompatibleVersionKey "OSBundleCompatibleVersion" - -/*! - * @define kOSBundleEnableKextLoggingKey - * @abstract Set to true to have the kernel kext logging spec applied - * to the kext. - * See <code>@link //apple_ref/c/econst/OSKextLogSpec - * OSKextLogSpec@/link</code>. - */ -#define kOSBundleEnableKextLoggingKey "OSBundleEnableKextLogging" - -/*! - * @define kOSBundleIsInterfaceKey - * @abstract A boolean value indicating whether the kext executable - * contains only symbol references. - */ -#define kOSBundleIsInterfaceKey "OSBundleIsInterface" - -/*! - * @define kOSBundleLibrariesKey - * @abstract A dictionary listing link dependencies for this kext. - * Keys are bundle identifiers, values are version strings. - */ -#define kOSBundleLibrariesKey "OSBundleLibraries" - -/*! - * @define kOSBundleRequiredKey - * @abstract A string indicating in which kinds of startup this kext - * may need to load during early startup (before - * <code>@link //apple_ref/doc/man/8/kextd kextcache(8)@/link</code>). - * @discussion - * The value is one of: - * <ul> - * <li>@link kOSBundleRequiredRoot "OSBundleRequiredRoot"@/link</li> - * <li>@link kOSBundleRequiredLocalRoot "OSBundleRequiredLocalRoot"@/link</li> - * <li>@link kOSBundleRequiredNetworkRoot "OSBundleRequiredNetworkRoot"@/link</li> - * <li>@link kOSBundleRequiredSafeBoot "OSBundleRequiredSafeBoot"@/link</li> - * <li>@link kOSBundleRequiredConsole "OSBundleRequiredConsole"@/link</li> - * </ul> - * - * Use this property judiciously. - * Every kext that declares a value other than "OSBundleRequiredSafeBoot" - * increases startup time, as the booter must read it into memory, - * or startup kext caches must include it. - */ -#define kOSBundleRequiredKey "OSBundleRequired" - -/*! - * @define kOSBundleAllowUserLoadKey - * @abstract A boolean value indicating whether - * <code>@link //apple_ref/doc/man/8/kextd kextcache(8)@/link</code> - * will honor a non-root process's request to load a kext. - * @discussion - * See <code>@link //apple_ref/doc/compositePage/c/func/KextManagerLoadKextWithURL - * KextManagerLoadKextWithURL@/link</code> - * and <code>@link //apple_ref/doc/compositePage/c/func/KextManagerLoadKextWithIdentifier - * KextManagerLoadKextWithIdentifier@/link</code>. - */ -#define kOSBundleAllowUserLoadKey "OSBundleAllowUserLoad" - -/*! - * @define kOSKernelResourceKey - * @abstract A boolean value indicating whether the kext represents a built-in - * component of the kernel. - */ -#define kOSKernelResourceKey "OSKernelResource" - -/*! - * @define kIOKitPersonalitiesKey - * @abstract A dictionary of dictionaries used in matching for I/O Kit drivers. - */ -#define kIOKitPersonalitiesKey "IOKitPersonalities" - -/* - * @define kIOPersonalityPublisherKey - * @abstract Used in personalities sent to the I/O Kit, - * contains the CFBundleIdentifier of the kext - * that the personality originated in. - */ -#define kIOPersonalityPublisherKey "IOPersonalityPublisher" - - -#if PRAGMA_MARK -/********************************************************************/ -#pragma mark Kext/OSBundle Property Deprecated Keys -/********************************************************************/ -#endif -/* - * @define kOSBundleDebugLevelKey - * @abstract - * Deprecated (used on some releases of Mac OS X prior to 10.6 Snow Leopard). - * Value is an integer from 1-6, corresponding to the verbose levels - * of kext tools on those releases. - * On 10.6 Snow Leopard, use <code>@link OSKextEnableKextLogging - * OSKextEnableKextLogging@/link</code>. - */ -#define kOSBundleDebugLevelKey "OSBundleDebugLevel" - -/*! - * @define kOSBundleSharedExecutableIdentifierKey - * @abstract Deprecated (used on some releases of Mac OS X - * prior to 10.6 Snow Leopard). - * Value is the bundle identifier of the pseudokext - * that contains an executable shared by this kext. - */ -#define kOSBundleSharedExecutableIdentifierKey "OSBundleSharedExecutableIdentifier" - - -#if PRAGMA_MARK -/********************************************************************/ -#pragma mark Kext/OSBundle Property List Values -/********************************************************************/ -#endif - -/*! - * @group Kext Property List Values - * These constants encompass established values - * for kernel extension bundle properties. - */ - -/*! -* @define kOSKextKernelIdentifier -* @abstract -* This is the CFBundleIdentifier user for the kernel itself. -*/ -#define kOSKextKernelIdentifier "__kernel__" - -/*! -* @define kOSBundleRequiredRoot -* @abstract -* This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> -* value indicates that the kext may be needed to mount the root filesystem -* whether starting from a local or a network volume. -*/ -#define kOSBundleRequiredRoot "Root" - -/*! -* @define kOSBundleRequiredLocalRoot -* @abstract -* This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> -* value indicates that the kext may be needed to mount the root filesystem -* when starting from a local disk. -*/ -#define kOSBundleRequiredLocalRoot "Local-Root" - -/*! -* @define kOSBundleRequiredNetworkRoot -* @abstract -* This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> -* value indicates that the kext may be needed to mount the root filesystem -* when starting over a network connection. -*/ -#define kOSBundleRequiredNetworkRoot "Network-Root" - -/*! -* @define kOSBundleRequiredSafeBoot -* @abstract -* This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> -* value indicates that the kext can be loaded during a safe startup. -* This value does not normally cause the kext to be read by the booter -* or included in startup kext caches. -*/ -#define kOSBundleRequiredSafeBoot "Safe Boot" - -/*! -* @define kOSBundleRequiredConsole -* @abstract -* This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> -* value indicates that the kext may be needed for console access -* (specifically in a single-user startup when -* <code>@link //apple_ref/doc/man/8/kextd kextd(8)@/link</code>. -* does not run) -* and should be loaded during early startup. -*/ -#define kOSBundleRequiredConsole "Console" - - -#if PRAGMA_MARK -#pragma mark - -/********************************************************************/ -#pragma mark Kext Information -/********************************************************************/ -#endif -/*! - * @group Kext Information - * Types, constants, and macros providing a kext with information - * about itself. - */ - -/*! - * @typedef OSKextLoadTag - * - * @abstract - * A unique identifier assigned to a loaded instanace of a kext. - * - * @discussion - * If a kext is unloaded and later reloaded, the new instance - * has a different load tag. - * - * A kext can get its own load tag in the <code>kmod_info_t</code> - * structure passed into its module start routine, as the - * <code>id</code> field (cast to this type). - * You can use the load tag with the functions - * <code>@link OSKextRetainKextWithLoadTag - * OSKextRetainKextWithLoadTag@/link</code> and - * <code>@link OSKextReleaseKextWithLoadTag - * OSKextReleaseKextWithLoadTag@/link</code>. - */ -typedef uint32_t OSKextLoadTag; - -/*! - * @define kOSKextInvalidLoadTag - * - * @abstract - * A load tag value that will never be used for a loaded kext; - * indicates kext not found. - */ -#define kOSKextInvalidLoadTag ((OSKextLoadTag)(-1)) - - - -__END_DECLS - -#endif /* _LIBKERN_OSKEXTLIB_H */ diff --git a/i386/include/libkern/OSReturn.h b/i386/include/libkern/OSReturn.h deleted file mode 100644 index b5490c9..0000000 --- a/i386/include/libkern/OSReturn.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright (c) 2000 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1998 Apple Inc. All rights reserved. - * - * HISTORY - * - */ - -/* - * Core OSReturn values. - */ - -#ifndef __LIBKERN_OSRETURN_H -#define __LIBKERN_OSRETURN_H - -#include <sys/cdefs.h> - -__BEGIN_DECLS - -#include <mach/error.h> - - -/*! - * @header - * - * Declares functions, basic return values, and other constants - * related to kernel extensions (kexts). - */ - -#if PRAGMA_MARK -#pragma mark Core OSReturn Values for Libkern -#endif -/********************************************************************* -* Core OSReturn Values for Libkern -*********************************************************************/ -/*! - * @group Core OSReturn Values for Libkern - * Some kext and I/O Kit functions can return these values, - * as well as other values of - * <code>kern_return_t</code>. - * - * Many of these return values represent internal errors - * in the Libkern C++ run-time typing information system - * based on @link //apple_ref/doc/class/OSMetaClass OSMetaClass@/link; - * you are unlikely to ever see them. - * - */ - - -/*! - * @typedef OSReturn - * @abstract The return type for many Libkern functions. - */ -typedef kern_return_t OSReturn; - -#ifndef sys_libkern -#define sys_libkern err_system(0x37) -#endif /* sys_libkern */ - -#define sub_libkern_common err_sub(0) -#define sub_libkern_metaclass err_sub(1) -#define sub_libkern_reserved err_sub(-1) - -#define libkern_common_err(return) (sys_libkern|sub_libkern_common|(return)) -#define libkern_metaclass_err(return) (sys_libkern|sub_libkern_metaclass|(return)) - -/* See OSKextLib.h for these - * #define sub_libkern_kext err_sub(2) - * #define libkern_kext_err(code) (sys_libkern|sub_libkern_kext|(code)) - */ - -/*! - * @define kOSReturnSuccess - * @abstract Operation successful. - * Equal to <code>@link //apple_ref/c/econst/KERN_SUCCESS - * KERN_SUCCESS@/link</code>. - */ -#define kOSReturnSuccess KERN_SUCCESS - -/*! - * @define kOSReturnError - * @abstract Unspecified Libkern error. - * <b>Not equal</b> to - * <code>@link //apple_ref/c/econst/KERN_FAILURE - * KERN_FAILURE@/link</code>. - */ -#define kOSReturnError libkern_common_err(1) - -/*! - * @define kOSMetaClassInternal - * @abstract Internal OSMetaClass run-time error. - */ -#define kOSMetaClassInternal libkern_metaclass_err(1) - -/*! - * @define kOSMetaClassHasInstances - * @abstract A kext cannot be unloaded because there are instances - * derived from Libkern C++ classes that it defines. - */ -#define kOSMetaClassHasInstances libkern_metaclass_err(2) - -/*! - * @define kOSMetaClassNoInit - * @abstract Internal error: The Libkern C++ class registration system - * was not properly initialized during kext loading. - */ -#define kOSMetaClassNoInit libkern_metaclass_err(3) -// OSMetaClass::preModLoad wasn't called, runtime internal error - -/*! - * @define kOSMetaClassNoTempData - * @abstract Internal error: An allocation failure occurred - * registering Libkern C++ classes during kext loading. - */ -#define kOSMetaClassNoTempData libkern_metaclass_err(4) -// Allocation failure internal data - -/*! - * @define kOSMetaClassNoDicts - * @abstract Internal error: An allocation failure occurred - * registering Libkern C++ classes during kext loading. - */ -#define kOSMetaClassNoDicts libkern_metaclass_err(5) -// Allocation failure for Metaclass internal dictionaries - -/*! - * @define kOSMetaClassNoKModSet - * @abstract Internal error: An allocation failure occurred - * registering Libkern C++ classes during kext loading. - */ -#define kOSMetaClassNoKModSet libkern_metaclass_err(6) -// Allocation failure for internal kmodule set - -/*! - * @define kOSMetaClassNoInsKModSet - * @abstract Internal error: An error occurred registering - * a specific Libkern C++ class during kext loading. - */ -#define kOSMetaClassNoInsKModSet libkern_metaclass_err(7) -// Can't insert the KMod set into the module dictionary - -/*! - * @define kOSMetaClassNoSuper - * @abstract Internal error: No superclass can be found - * for a specific Libkern C++ class during kext loading. - */ -#define kOSMetaClassNoSuper libkern_metaclass_err(8) - -/*! - * @define kOSMetaClassInstNoSuper - * @abstract Internal error: No superclass can be found when constructing - * an instance of a Libkern C++ class. - */ -#define kOSMetaClassInstNoSuper libkern_metaclass_err(9) - -/*! - * @define kOSMetaClassDuplicateClass - * @abstract A duplicate Libkern C++ classname was encountered - * during kext loading. - */ -#define kOSMetaClassDuplicateClass libkern_metaclass_err(10) - -/*! - * @define kOSMetaClassNoKext - * @abstract Internal error: The kext for a Libkern C++ class - * can't be found during kext loading. - */ -#define kOSMetaClassNoKext libkern_metaclass_err(11) - -__END_DECLS - -#endif /* ! __LIBKERN_OSRETURN_H */ diff --git a/i386/include/libkern/OSTypes.h b/i386/include/libkern/OSTypes.h deleted file mode 100644 index 6a03a27..0000000 --- a/i386/include/libkern/OSTypes.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * HISTORY - * - */ - -#ifndef _OS_OSTYPES_H -#define _OS_OSTYPES_H - -#define OSTYPES_K64_REV 2 - -typedef unsigned int UInt; -typedef signed int SInt; - -#ifndef __MACTYPES__ /* CF MacTypes.h */ -#ifndef __TYPES__ /* guess... Mac Types.h */ - -typedef unsigned char UInt8; -typedef unsigned short UInt16; -#if __LP64__ -typedef unsigned int UInt32; -#else -typedef unsigned long UInt32; -#endif -typedef unsigned long long UInt64; -#if defined(__BIG_ENDIAN__) -typedef struct UnsignedWide { - UInt32 hi; - UInt32 lo; -} UnsignedWide; -#elif defined(__LITTLE_ENDIAN__) -typedef struct UnsignedWide { - UInt32 lo; - UInt32 hi; -} UnsignedWide; -#else -#error Unknown endianess. -#endif - -typedef signed char SInt8; -typedef signed short SInt16; -#if __LP64__ -typedef signed int SInt32; -#else -typedef signed long SInt32; -#endif -typedef signed long long SInt64; -#if defined(__BIG_ENDIAN__) -typedef struct wide { - SInt32 hi; - UInt32 lo; -} wide; -#elif defined(__LITTLE_ENDIAN__) -typedef struct wide { - UInt32 lo; - SInt32 hi; -} wide; -#else -#error Unknown endianess. -#endif - -typedef SInt32 OSStatus; - -#if defined(__LP64__) && defined(KERNEL) -#ifndef ABSOLUTETIME_SCALAR_TYPE -#define ABSOLUTETIME_SCALAR_TYPE 1 -#endif -typedef UInt64 AbsoluteTime; -#else -typedef UnsignedWide AbsoluteTime; -#endif - -typedef UInt32 OptionBits; - -#if defined(KERNEL) && defined(__LP64__) -/* - * Use intrinsic boolean types for the LP64 kernel, otherwise maintain - * source and binary backward compatibility. This attempts to resolve - * the "(x == true)" vs. "(x)" conditional issue. - */ -#ifdef __cplusplus -typedef bool Boolean; -#else /* !__cplusplus */ -#if defined(__STDC_VERSION__) && ((__STDC_VERSION__ - 199901L) > 0L) -/* only use this if we are sure we are using a c99 compiler */ -typedef _Bool Boolean; -#else /* !c99 */ -/* Fall back to previous definition unless c99 */ -typedef unsigned char Boolean; -#endif /* !c99 */ -#endif /* !__cplusplus */ -#else /* !(KERNEL && __LP64__) */ -typedef unsigned char Boolean; -#endif /* !(KERNEL && __LP64__) */ - -#endif /* __TYPES__ */ -#endif /* __MACTYPES__ */ - -#if !defined(OS_INLINE) -# define OS_INLINE static inline -#endif - -#endif /* _OS_OSTYPES_H */ diff --git a/i386/include/libkern/_OSByteOrder.h b/i386/include/libkern/_OSByteOrder.h deleted file mode 100644 index d8806fc..0000000 --- a/i386/include/libkern/_OSByteOrder.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _OS__OSBYTEORDER_H -#define _OS__OSBYTEORDER_H - -/* - * This header is normally included from <libkern/OSByteOrder.h>. However, - * <sys/_endian.h> also includes this in the case of little-endian - * architectures, so that we can map OSByteOrder routines to the hton* and ntoh* - * macros. This results in the asymmetry below; we only include - * <libkern/arch/_OSByteOrder.h> for little-endian architectures. - */ - -//#include <sys/_types.h> - -/* Macros for swapping constant values in the preprocessing stage. */ -#define __DARWIN_OSSwapConstInt16(x) \ - ((__uint16_t)((((__uint16_t)(x) & 0xff00) >> 8) | \ - (((__uint16_t)(x) & 0x00ff) << 8))) - -#define __DARWIN_OSSwapConstInt32(x) \ - ((__uint32_t)((((__uint32_t)(x) & 0xff000000) >> 24) | \ - (((__uint32_t)(x) & 0x00ff0000) >> 8) | \ - (((__uint32_t)(x) & 0x0000ff00) << 8) | \ - (((__uint32_t)(x) & 0x000000ff) << 24))) - -#define __DARWIN_OSSwapConstInt64(x) \ - ((__uint64_t)((((__uint64_t)(x) & 0xff00000000000000ULL) >> 56) | \ - (((__uint64_t)(x) & 0x00ff000000000000ULL) >> 40) | \ - (((__uint64_t)(x) & 0x0000ff0000000000ULL) >> 24) | \ - (((__uint64_t)(x) & 0x000000ff00000000ULL) >> 8) | \ - (((__uint64_t)(x) & 0x00000000ff000000ULL) << 8) | \ - (((__uint64_t)(x) & 0x0000000000ff0000ULL) << 24) | \ - (((__uint64_t)(x) & 0x000000000000ff00ULL) << 40) | \ - (((__uint64_t)(x) & 0x00000000000000ffULL) << 56))) - -#if defined(__GNUC__) - -#if defined(__i386__) || defined(__x86_64__) -#include <libkern/i386/_OSByteOrder.h> -#endif - -#if defined(__arm__) -#include <libkern/arm/OSByteOrder.h> -#endif - - -#define __DARWIN_OSSwapInt16(x) \ - (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _OSSwapInt16(x)) - -#define __DARWIN_OSSwapInt32(x) \ - (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt32(x) : _OSSwapInt32(x)) - -#define __DARWIN_OSSwapInt64(x) \ - (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x)) - -#else /* ! __GNUC__ */ - -#if defined(__i386__) || defined(__x86_64__) - -#if !defined(__DARWIN_OS_INLINE) -# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -# define __DARWIN_OS_INLINE static inline -# elif defined(__MWERKS__) || defined(__cplusplus) -# define __DARWIN_OS_INLINE static inline -# else -# define __DARWIN_OS_INLINE static __inline__ -# endif -#endif - -__DARWIN_OS_INLINE -uint16_t -_OSSwapInt16( - uint16_t data -) -{ - return __DARWIN_OSSwapConstInt16(data); -} - -__DARWIN_OS_INLINE -uint32_t -_OSSwapInt32( - uint32_t data -) -{ - return __DARWIN_OSSwapConstInt32(data); -} - -__DARWIN_OS_INLINE -uint64_t -_OSSwapInt64( - uint64_t data -) -{ - return __DARWIN_OSSwapConstInt64(data); -} -#endif - -#define __DARWIN_OSSwapInt16(x) _OSSwapInt16(x) - -#define __DARWIN_OSSwapInt32(x) _OSSwapInt32(x) - -#define __DARWIN_OSSwapInt64(x) _OSSwapInt64(x) - -#endif /* __GNUC__ */ - -#endif /* ! _OS__OSBYTEORDER_H */ diff --git a/i386/include/libkern/i386/OSByteOrder.h b/i386/include/libkern/i386/OSByteOrder.h deleted file mode 100644 index 7f19736..0000000 --- a/i386/include/libkern/i386/OSByteOrder.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 1999-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _OS_OSBYTEORDERI386_H -#define _OS_OSBYTEORDERI386_H - -#include <stdint.h> -#include <libkern/i386/_OSByteOrder.h> - -#if !defined(OS_INLINE) -#define OS_INLINE __DARWIN_OS_INLINE -#endif - -/* Functions for byte reversed loads. */ - -OS_INLINE -uint16_t -OSReadSwapInt16( - const volatile void * base, - uintptr_t byteOffset -) -{ - uint16_t result; - - result = *(volatile uint16_t *)((uintptr_t)base + byteOffset); - return _OSSwapInt16(result); -} - -OS_INLINE -uint32_t -OSReadSwapInt32( - const volatile void * base, - uintptr_t byteOffset -) -{ - uint32_t result; - - result = *(volatile uint32_t *)((uintptr_t)base + byteOffset); - return _OSSwapInt32(result); -} - -OS_INLINE -uint64_t -OSReadSwapInt64( - const volatile void * base, - uintptr_t byteOffset -) -{ - uint64_t result; - - result = *(volatile uint64_t *)((uintptr_t)base + byteOffset); - return _OSSwapInt64(result); -} - -/* Functions for byte reversed stores. */ - -OS_INLINE -void -OSWriteSwapInt16( - volatile void * base, - uintptr_t byteOffset, - uint16_t data -) -{ - *(volatile uint16_t *)((uintptr_t)base + byteOffset) = _OSSwapInt16(data); -} - -OS_INLINE -void -OSWriteSwapInt32( - volatile void * base, - uintptr_t byteOffset, - uint32_t data -) -{ - *(volatile uint32_t *)((uintptr_t)base + byteOffset) = _OSSwapInt32(data); -} - -OS_INLINE -void -OSWriteSwapInt64( - volatile void * base, - uintptr_t byteOffset, - uint64_t data -) -{ - *(volatile uint64_t *)((uintptr_t)base + byteOffset) = _OSSwapInt64(data); -} - -#endif /* ! _OS_OSBYTEORDERI386_H */ diff --git a/i386/include/libkern/i386/_OSByteOrder.h b/i386/include/libkern/i386/_OSByteOrder.h deleted file mode 100644 index 51477bb..0000000 --- a/i386/include/libkern/i386/_OSByteOrder.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _OS__OSBYTEORDERI386_H -#define _OS__OSBYTEORDERI386_H - -#if !defined(__DARWIN_OS_INLINE) -# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -# define __DARWIN_OS_INLINE static inline -# elif defined(__MWERKS__) || defined(__cplusplus) -# define __DARWIN_OS_INLINE static inline -# else -# define __DARWIN_OS_INLINE static __inline__ -# endif -#endif - -/* Generic byte swapping functions. */ - -__DARWIN_OS_INLINE -__uint16_t -_OSSwapInt16( - __uint16_t _data -) -{ - return ((_data << 8) | (_data >> 8)); -} - -__DARWIN_OS_INLINE -__uint32_t -_OSSwapInt32( - __uint32_t _data -) -{ -#if defined(__llvm__) - return __builtin_bswap32(_data); -#else - __asm__ ("bswap %0" : "+r" (_data)); - return _data; -#endif -} - -#if defined(__llvm__) -__DARWIN_OS_INLINE -__uint64_t -_OSSwapInt64( - __uint64_t _data -) -{ - return __builtin_bswap64(_data); -} - -#elif defined(__i386__) -__DARWIN_OS_INLINE -__uint64_t -_OSSwapInt64( - __uint64_t _data -) -{ - __asm__ ("bswap %%eax\n\t" - "bswap %%edx\n\t" - "xchgl %%eax, %%edx" - : "+A" (_data)); - return _data; -} -#elif defined(__x86_64__) -__DARWIN_OS_INLINE -__uint64_t -_OSSwapInt64( - __uint64_t _data -) -{ - __asm__ ("bswap %0" : "+r" (_data)); - return _data; -} -#else -#error Unknown architecture -#endif - -#endif /* ! _OS__OSBYTEORDERI386_H */ diff --git a/i386/include/libkern/machine/OSByteOrder.h b/i386/include/libkern/machine/OSByteOrder.h deleted file mode 100644 index 4860215..0000000 --- a/i386/include/libkern/machine/OSByteOrder.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _OS_OSBYTEORDERMACHINE_H -#define _OS_OSBYTEORDERMACHINE_H - -#include <stdint.h> - -#if !defined(OS_INLINE) -# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -# define OS_INLINE static inline -# elif defined(__MWERKS__) || defined(__cplusplus) -# define OS_INLINE static inline -# else -# define OS_INLINE static __inline__ -# endif -#endif - -/* Generic byte swapping functions. */ - -OS_INLINE -uint16_t -_OSSwapInt16( - uint16_t data -) -{ - return OSSwapConstInt16(data); -} - -OS_INLINE -uint32_t -_OSSwapInt32( - uint32_t data -) -{ - return OSSwapConstInt32(data); -} - -OS_INLINE -uint64_t -_OSSwapInt64( - uint64_t data -) -{ - return OSSwapConstInt64(data); -} - -/* Functions for byte reversed loads. */ - -OS_INLINE -uint16_t -OSReadSwapInt16( - const volatile void * base, - uintptr_t byteOffset -) -{ - uint16_t data = *(volatile uint16_t *)((uintptr_t)base + byteOffset); - return _OSSwapInt16(data); -} - -OS_INLINE -uint32_t -OSReadSwapInt32( - const volatile void * base, - uintptr_t byteOffset -) -{ - uint32_t data = *(volatile uint32_t *)((uintptr_t)base + byteOffset); - return _OSSwapInt32(data); -} - -OS_INLINE -uint64_t -OSReadSwapInt64( - const volatile void * base, - uintptr_t byteOffset -) -{ - uint64_t data = *(volatile uint64_t *)((uintptr_t)base + byteOffset); - return _OSSwapInt64(data); -} - -/* Functions for byte reversed stores. */ - -OS_INLINE -void -OSWriteSwapInt16( - volatile void * base, - uintptr_t byteOffset, - uint16_t data -) -{ - *(volatile uint16_t *)((uintptr_t)base + byteOffset) = _OSSwapInt16(data); -} - -OS_INLINE -void -OSWriteSwapInt32( - volatile void * base, - uintptr_t byteOffset, - uint32_t data -) -{ - *(volatile uint32_t *)((uintptr_t)base + byteOffset) = _OSSwapInt32(data); -} - -OS_INLINE -void -OSWriteSwapInt64( - volatile void * base, - uintptr_t byteOffset, - uint64_t data -) -{ - *(volatile uint64_t *)((uintptr_t)base + byteOffset) = _OSSwapInt64(data); -} - -#endif /* ! _OS_OSBYTEORDERMACHINE_H */ diff --git a/i386/include/limits.h b/i386/include/limits.h deleted file mode 100644 index a117167..0000000 --- a/i386/include/limits.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* $NetBSD: limits.h,v 1.8 1996/10/21 05:10:50 jtc Exp $ */ - -/* - * Copyright (c) 1988, 1993 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)limits.h 8.2 (Berkeley) 1/4/94 - */ - -#ifndef _LIMITS_H_ -#define _LIMITS_H_ - -#include <sys/cdefs.h> -#include <i386/limits.h> -#include <sys/syslimits.h> - -#if !defined(_ANSI_SOURCE) -#define _POSIX_AIO_LISTIO_MAX 2 -#define _POSIX_AIO_MAX 1 -#define _POSIX_DELAYTIMER_MAX 32 -#define _POSIX_HOST_NAME_MAX 255 -#define _POSIX_LOGIN_NAME_MAX 9 -#define _POSIX_MQ_OPEN_MAX 8 -#define _POSIX_MQ_PRIO_MAX 32 - -#define _POSIX_ARG_MAX 4096 -#define _POSIX_CHILD_MAX 25 -#define _POSIX_LINK_MAX 8 -#define _POSIX_MAX_CANON 255 -#define _POSIX_MAX_INPUT 255 -#define _POSIX_NAME_MAX 14 -#define _POSIX_NGROUPS_MAX 8 -#define _POSIX_OPEN_MAX 20 -#define _POSIX_PATH_MAX 256 -#define _POSIX_PIPE_BUF 512 -#define _POSIX_SSIZE_MAX 32767 -#define _POSIX_STREAM_MAX 8 -#define _POSIX_TZNAME_MAX 6 - -#define _POSIX_RE_DUP_MAX 255 -#define _POSIX_RTSIG_MAX 8 -#define _POSIX_SEM_NSEMS_MAX 256 -#define _POSIX_SEM_VALUE_MAX 32767 -#define _POSIX_SIGQUEUE_MAX 32 -#define _POSIX_SS_REPL_MAX 4 -#define _POSIX_SYMLINK_MAX 255 -#define _POSIX_SYMLOOP_MAX 8 -#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 -#define _POSIX_THREAD_KEYS_MAX 128 -#define _POSIX_THREAD_THREADS_MAX 64 -#define _POSIX_TIMER_MAX 32 -#define _POSIX_TRACE_EVENT_NAME_MAX 30 -#define _POSIX_TRACE_NAME_MAX 8 -#define _POSIX_TRACE_SYS_MAX 8 -#define _POSIX_TRACE_USER_EVENT_MAX 32 -#define _POSIX_TTY_NAME_MAX 9 - -#define _POSIX2_BC_BASE_MAX 99 -#define _POSIX2_BC_DIM_MAX 2048 -#define _POSIX2_BC_SCALE_MAX 99 -#define _POSIX2_BC_STRING_MAX 1000 -#define _POSIX2_CHARCLASS_NAME_MAX 14 -#define _POSIX2_COLL_WEIGHTS_MAX 2 -#define _POSIX2_EQUIV_CLASS_MAX 2 -#define _POSIX2_EXPR_NEST_MAX 32 -#define _POSIX2_LINE_MAX 2048 -#define _POSIX2_RE_DUP_MAX 255 - -#define PTHREAD_STACK_MIN 8192 -#define PTHREAD_DESTRUCTOR_ITERATIONS 4 -#define PTHREAD_KEYS_MAX 512 - -#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -#define PASS_MAX 128 -#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ - -#define NL_ARGMAX 9 -#define NL_LANGMAX 14 -#define NL_MSGMAX 32767 -#define NL_NMAX 1 -#define NL_SETMAX 255 -#define NL_TEXTMAX 2048 - -#define _XOPEN_IOV_MAX 16 -#define IOV_MAX 1024 -#define _XOPEN_NAME_MAX 255 -#define _XOPEN_PATH_MAX 1024 - -#endif /* _ANSI_SOURCE */ - -/* NZERO to be defined here. TBD. See also sys/param.h */ - -#endif /* !_LIMITS_H_ */ - diff --git a/i386/include/locale.h b/i386/include/locale.h deleted file mode 100644 index ab28ceb..0000000 --- a/i386/include/locale.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 1991, 1993 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)locale.h 8.1 (Berkeley) 6/2/93 - * $FreeBSD: /repoman/r/ncvs/src/include/locale.h,v 1.7 2002/10/09 09:19:27 tjr Exp $ - */ - -#ifndef _LOCALE_H_ -#define _LOCALE_H_ - -#include <_locale.h> - -#define LC_ALL 0 -#define LC_COLLATE 1 -#define LC_CTYPE 2 -#define LC_MONETARY 3 -#define LC_NUMERIC 4 -#define LC_TIME 5 -#define LC_MESSAGES 6 - -#define _LC_LAST 7 /* marks end */ - -__BEGIN_DECLS -char *setlocale(int, const char *); -__END_DECLS - -#endif /* _LOCALE_H_ */ diff --git a/i386/include/mach-o/arch.h b/i386/include/mach-o/arch.h deleted file mode 100644 index 526c10f..0000000 --- a/i386/include/mach-o/arch.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _MACH_O_ARCH_H_ -#define _MACH_O_ARCH_H_ -/* - * Copyright (c) 1997 Apple Computer, Inc. - * - * Functions that deal with information about architectures. - * - */ - -#include <stdint.h> -#include <mach/machine.h> -#include <architecture/byte_order.h> - -/* The NXArchInfo structs contain the architectures symbolic name - * (such as "ppc"), its CPU type and CPU subtype as defined in - * mach/machine.h, the byte order for the architecture, and a - * describing string (such as "PowerPC"). - * There will both be entries for specific CPUs (such as ppc604e) as - * well as generic "family" entries (such as ppc). - */ -typedef struct { - const char *name; - cpu_type_t cputype; - cpu_subtype_t cpusubtype; - enum NXByteOrder byteorder; - const char *description; -} NXArchInfo; - -#if __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* NXGetAllArchInfos() returns a pointer to an array of all known - * NXArchInfo structures. The last NXArchInfo is marked by a NULL name. - */ -extern const NXArchInfo *NXGetAllArchInfos(void); - -/* NXGetLocalArchInfo() returns the NXArchInfo for the local host, or NULL - * if none is known. - */ -extern const NXArchInfo *NXGetLocalArchInfo(void); - -/* NXGetArchInfoFromName() and NXGetArchInfoFromCpuType() return the - * NXArchInfo from the architecture's name or cputype/cpusubtype - * combination. A cpusubtype of CPU_SUBTYPE_MULTIPLE can be used - * to request the most general NXArchInfo known for the given cputype. - * NULL is returned if no matching NXArchInfo can be found. - */ -extern const NXArchInfo *NXGetArchInfoFromName(const char *name); -extern const NXArchInfo *NXGetArchInfoFromCpuType(cpu_type_t cputype, - cpu_subtype_t cpusubtype); - -/* NXFindBestFatArch() is passed a cputype and cpusubtype and a set of - * fat_arch structs and selects the best one that matches (if any) and returns - * a pointer to that fat_arch struct (or NULL). The fat_arch structs must be - * in the host byte order and correct such that the fat_archs really points to - * enough memory for nfat_arch structs. It is possible that this routine could - * fail if new cputypes or cpusubtypes are added and an old version of this - * routine is used. But if there is an exact match between the cputype and - * cpusubtype and one of the fat_arch structs this routine will always succeed. - */ -extern struct fat_arch *NXFindBestFatArch(cpu_type_t cputype, - cpu_subtype_t cpusubtype, - struct fat_arch *fat_archs, - uint32_t nfat_archs); - -/* NXCombineCpuSubtypes() returns the resulting cpusubtype when combining two - * different cpusubtypes for the specified cputype. If the two cpusubtypes - * can't be combined (the specific subtypes are mutually exclusive) -1 is - * returned indicating it is an error to combine them. This can also fail and - * return -1 if new cputypes or cpusubtypes are added and an old version of - * this routine is used. But if the cpusubtypes are the same they can always - * be combined and this routine will return the cpusubtype pass in. - */ -extern cpu_subtype_t NXCombineCpuSubtypes(cpu_type_t cputype, - cpu_subtype_t cpusubtype1, - cpu_subtype_t cpusubtype2); - -#if __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _MACH_O_ARCH_H_ */ diff --git a/i386/include/mach-o/compact_unwind_encoding.h b/i386/include/mach-o/compact_unwind_encoding.h deleted file mode 100644 index 237b226..0000000 --- a/i386/include/mach-o/compact_unwind_encoding.h +++ /dev/null @@ -1,224 +0,0 @@ -/* -*- mode: C; c-basic-offset: 4; tab-width: 4 -*- - * - * Copyright (c) 2008-2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - - -#ifndef __COMPACT_UNWIND_ENCODING__ -#define __COMPACT_UNWIND_ENCODING__ - -#include <stdint.h> - - -// -// Each final linked mach-o image has an optional __TEXT, __unwind_info section. -// This section is much smaller and faster to use than the __eh_frame section. -// - - - -// -// Compilers usually emit standard Dwarf FDEs. The linker recognizes standard FDEs and -// synthesizes a matching compact_unwind_encoding_t and adds it to the __unwind_info table. -// It is also possible for the compiler to emit __unwind_info entries for functions that -// have different unwind requirements at different ranges in the function. -// -typedef uint32_t compact_unwind_encoding_t; - - - -// -// The __unwind_info section is laid out for an efficient two level lookup. -// The header of the section contains a coarse index that maps function address -// to the page (4096 byte block) containing the unwind info for that function. -// - -#define UNWIND_SECTION_VERSION 1 -struct unwind_info_section_header -{ - uint32_t version; // UNWIND_SECTION_VERSION - uint32_t commonEncodingsArraySectionOffset; - uint32_t commonEncodingsArrayCount; - uint32_t personalityArraySectionOffset; - uint32_t personalityArrayCount; - uint32_t indexSectionOffset; - uint32_t indexCount; - // compact_unwind_encoding_t[] - // uintptr_t personalities[] - // unwind_info_section_header_index_entry[] - // unwind_info_section_header_lsda_index_entry[] -}; - -struct unwind_info_section_header_index_entry -{ - uint32_t functionOffset; - uint32_t secondLevelPagesSectionOffset; // section offset to start of regular or compress page - uint32_t lsdaIndexArraySectionOffset; // section offset to start of lsda_index array for this range -}; - -struct unwind_info_section_header_lsda_index_entry -{ - uint32_t functionOffset; - uint32_t lsdaOffset; -}; - -// -// There are two kinds of second level index pages: regular and compressed. -// A compressed page can hold up to 1021 entries, but it cannot be used -// if too many different encoding types are used. The regular page holds -// 511 entries. -// - -struct unwind_info_regular_second_level_entry -{ - uint32_t functionOffset; - compact_unwind_encoding_t encoding; -}; - -#define UNWIND_SECOND_LEVEL_REGULAR 2 -struct unwind_info_regular_second_level_page_header -{ - uint32_t kind; // UNWIND_SECOND_LEVEL_REGULAR - uint16_t entryPageOffset; - uint16_t entryCount; - // entry array -}; - -#define UNWIND_SECOND_LEVEL_COMPRESSED 3 -struct unwind_info_compressed_second_level_page_header -{ - uint32_t kind; // UNWIND_SECOND_LEVEL_COMPRESSED - uint16_t entryPageOffset; - uint16_t entryCount; - uint16_t encodingsPageOffset; - uint16_t encodingsCount; - // 32-bit entry array - // encodings array -}; - -#define UNWIND_INFO_COMPRESSED_ENTRY_FUNC_OFFSET(entry) (entry & 0x00FFFFFF) -#define UNWIND_INFO_COMPRESSED_ENTRY_ENCODING_INDEX(entry) ((entry >> 24) & 0xFF) - - - -// architecture independent bits -enum { - UNWIND_IS_NOT_FUNCTION_START = 0x80000000, - UNWIND_HAS_LSDA = 0x40000000, - UNWIND_PERSONALITY_MASK = 0x30000000, -}; - - -// x86_64 -// -// 1-bit: start -// 1-bit: has lsda -// 2-bit: personality index -// -// 4-bits: 0=old, 1=rbp based, 2=stack-imm, 3=stack-ind, 4=dwarf -// rbp based: -// 15-bits (5*3-bits per reg) register permutation -// 8-bits for stack offset -// frameless: -// 8-bits stack size -// 3-bits stack adjust -// 3-bits register count -// 10-bits register permutation -// -enum { - UNWIND_X86_64_MODE_MASK = 0x0F000000, - UNWIND_X86_64_MODE_COMPATIBILITY = 0x00000000, - UNWIND_X86_64_MODE_RBP_FRAME = 0x01000000, - UNWIND_X86_64_MODE_STACK_IMMD = 0x02000000, - UNWIND_X86_64_MODE_STACK_IND = 0x03000000, - UNWIND_X86_64_MODE_DWARF = 0x04000000, - - UNWIND_X86_64_RBP_FRAME_REGISTERS = 0x00007FFF, - UNWIND_X86_64_RBP_FRAME_OFFSET = 0x00FF0000, - - UNWIND_X86_64_FRAMELESS_STACK_SIZE = 0x00FF0000, - UNWIND_X86_64_FRAMELESS_STACK_ADJUST = 0x0000E000, - UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT = 0x00001C00, - UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION = 0x000003FF, - - UNWIND_X86_64_DWARF_SECTION_OFFSET = 0x03FFFFFF, -}; - -enum { - UNWIND_X86_64_REG_NONE = 0, - UNWIND_X86_64_REG_RBX = 1, - UNWIND_X86_64_REG_R12 = 2, - UNWIND_X86_64_REG_R13 = 3, - UNWIND_X86_64_REG_R14 = 4, - UNWIND_X86_64_REG_R15 = 5, - UNWIND_X86_64_REG_RBP = 6, -}; - - -// x86 -// -// 1-bit: start -// 1-bit: has lsda -// 2-bit: personality index -// -// 4-bits: 0=old, 1=ebp based, 2=stack-imm, 3=stack-ind, 4=dwarf -// ebp based: -// 15-bits (5*3-bits per reg) register permutation -// 8-bits for stack offset -// frameless: -// 8-bits stack size -// 3-bits stack adjust -// 3-bits register count -// 10-bits register permutation -// -enum { - UNWIND_X86_MODE_MASK = 0x0F000000, - UNWIND_X86_MODE_COMPATIBILITY = 0x00000000, - UNWIND_X86_MODE_EBP_FRAME = 0x01000000, - UNWIND_X86_MODE_STACK_IMMD = 0x02000000, - UNWIND_X86_MODE_STACK_IND = 0x03000000, - UNWIND_X86_MODE_DWARF = 0x04000000, - - UNWIND_X86_EBP_FRAME_REGISTERS = 0x00007FFF, - UNWIND_X86_EBP_FRAME_OFFSET = 0x00FF0000, - - UNWIND_X86_FRAMELESS_STACK_SIZE = 0x00FF0000, - UNWIND_X86_FRAMELESS_STACK_ADJUST = 0x0000E000, - UNWIND_X86_FRAMELESS_STACK_REG_COUNT = 0x00001C00, - UNWIND_X86_FRAMELESS_STACK_REG_PERMUTATION = 0x000003FF, - - UNWIND_X86_DWARF_SECTION_OFFSET = 0x03FFFFFF, -}; - -enum { - UNWIND_X86_REG_NONE = 0, - UNWIND_X86_REG_EBX = 1, - UNWIND_X86_REG_ECX = 2, - UNWIND_X86_REG_EDX = 3, - UNWIND_X86_REG_EDI = 4, - UNWIND_X86_REG_ESI = 5, - UNWIND_X86_REG_EBP = 6, -}; - - -#endif - diff --git a/i386/include/mach-o/dyld.h b/i386/include/mach-o/dyld.h deleted file mode 100644 index 3f579ef..0000000 --- a/i386/include/mach-o/dyld.h +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright (c) 1999-2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _MACH_O_DYLD_H_ -#define _MACH_O_DYLD_H_ - - -#include <stddef.h> -#include <stdint.h> -#include <stdbool.h> - -#include <mach-o/loader.h> -#include <Availability.h> - -#if __cplusplus -extern "C" { -#endif - -/* - * The following functions allow you to iterate through all loaded images. - * This is not a thread safe operation. Another thread can add or remove - * an image during the iteration. - * - * Many uses of these routines can be replace by a call to dladdr() which - * will return the mach_header and name of an image, given an address in - * the image. dladdr() is thread safe. - */ -extern uint32_t _dyld_image_count(void) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); -extern const struct mach_header* _dyld_get_image_header(uint32_t image_index) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); -extern intptr_t _dyld_get_image_vmaddr_slide(uint32_t image_index) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); -extern const char* _dyld_get_image_name(uint32_t image_index) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); - - -/* - * The following functions allow you to install callbacks which will be called - * by dyld whenever an image is loaded or unloaded. During a call to _dyld_register_func_for_add_image() - * the callback func is called for every existing image. Later, it is called as each new image - * is loaded and bound (but initializers not yet run). The callback registered with - * _dyld_register_func_for_remove_image() is called after any terminators in an image are run - * and before the image is un-memory-mapped. - */ -extern void _dyld_register_func_for_add_image(void (*func)(const struct mach_header* mh, intptr_t vmaddr_slide)) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); -extern void _dyld_register_func_for_remove_image(void (*func)(const struct mach_header* mh, intptr_t vmaddr_slide)) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); - - -/* - * NSVersionOfRunTimeLibrary() returns the current_version number of the currently dylib - * specifed by the libraryName. The libraryName parameter would be "bar" for /path/libbar.3.dylib and - * "Foo" for /path/Foo.framework/Versions/A/Foo. It returns -1 if no such library is loaded. - */ -extern int32_t NSVersionOfRunTimeLibrary(const char* libraryName) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); - - -/* - * NSVersionOfRunTimeLibrary() returns the current_version number that the main executable was linked - * against at build time. The libraryName parameter would be "bar" for /path/libbar.3.dylib and - * "Foo" for /path/Foo.framework/Versions/A/Foo. It returns -1 if the main executable did not link - * against the specified library. - */ -extern int32_t NSVersionOfLinkTimeLibrary(const char* libraryName) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); - - -/* - * _NSGetExecutablePath() copies the path of the main executable into the buffer. The bufsize parameter - * should initially be the size of the buffer. The function returns 0 if the path was successfully copied, - * and *bufsize is left unchanged. It returns -1 if the buffer is not large enough, and *bufsize is set - * to the size required. - * - * Note that _NSGetExecutablePath will return "a path" to the executable not a "real path" to the executable. - * That is the path may be a symbolic link and not the real file. With deep directories the total bufsize - * needed could be more than MAXPATHLEN. - */ -extern int _NSGetExecutablePath(char* buf, uint32_t* bufsize) __OSX_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_2_0); - - - -/* - * _dyld_moninit() is a private interface between dyld and libSystem. - */ -extern void _dyld_moninit(void (*monaddition)(char *lowpc, char *highpc)) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0); - - - - - -/* - * The following dyld API's are deprecated as of Mac OS X 10.5. They are either - * no longer necessary or are superceeded by dlopen and friends in <dlfcn.h>. - * dlopen/dlsym/dlclose have been available since Mac OS X 10.3 and work with - * dylibs and bundles. - * - * NSAddImage -> dlopen - * NSLookupSymbolInImage -> dlsym - * NSCreateObjectFileImageFromFile -> dlopen - * NSDestroyObjectFileImage -> dlclose - * NSLinkModule -> not needed when dlopen used - * NSUnLinkModule -> not needed when dlclose used - * NSLookupSymbolInModule -> dlsym - * _dyld_image_containing_address -> dladdr - * NSLinkEditError -> dlerror - * - */ - -#ifndef ENUM_DYLD_BOOL -#define ENUM_DYLD_BOOL - #undef FALSE - #undef TRUE - enum DYLD_BOOL { FALSE, TRUE }; -#endif /* ENUM_DYLD_BOOL */ - - -/* Object file image API */ -typedef enum { - NSObjectFileImageFailure, /* for this a message is printed on stderr */ - NSObjectFileImageSuccess, - NSObjectFileImageInappropriateFile, - NSObjectFileImageArch, - NSObjectFileImageFormat, /* for this a message is printed on stderr */ - NSObjectFileImageAccess -} NSObjectFileImageReturnCode; - -typedef struct __NSObjectFileImage* NSObjectFileImage; - -/* NSObjectFileImage can only be used with MH_BUNDLE files */ -extern NSObjectFileImageReturnCode NSCreateObjectFileImageFromFile(const char* pathName, NSObjectFileImage *objectFileImage) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern NSObjectFileImageReturnCode NSCreateObjectFileImageFromMemory(const void *address, size_t size, NSObjectFileImage *objectFileImage) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern bool NSDestroyObjectFileImage(NSObjectFileImage objectFileImage) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); - -extern uint32_t NSSymbolDefinitionCountInObjectFileImage(NSObjectFileImage objectFileImage) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern const char* NSSymbolDefinitionNameInObjectFileImage(NSObjectFileImage objectFileImage, uint32_t ordinal) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern uint32_t NSSymbolReferenceCountInObjectFileImage(NSObjectFileImage objectFileImage) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern const char* NSSymbolReferenceNameInObjectFileImage(NSObjectFileImage objectFileImage, uint32_t ordinal, bool *tentative_definition) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern bool NSIsSymbolDefinedInObjectFileImage(NSObjectFileImage objectFileImage, const char* symbolName) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); -extern void* NSGetSectionDataInObjectFileImage(NSObjectFileImage objectFileImage, const char* segmentName, const char* sectionName, size_t *size) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern bool NSHasModInitObjectFileImage(NSObjectFileImage objectFileImage) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); - -typedef struct __NSModule* NSModule; -extern const char* NSNameOfModule(NSModule m) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern const char* NSLibraryNameForModule(NSModule m) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); - -extern NSModule NSLinkModule(NSObjectFileImage objectFileImage, const char* moduleName, uint32_t options) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -#define NSLINKMODULE_OPTION_NONE 0x0 -#define NSLINKMODULE_OPTION_BINDNOW 0x1 -#define NSLINKMODULE_OPTION_PRIVATE 0x2 -#define NSLINKMODULE_OPTION_RETURN_ON_ERROR 0x4 -#define NSLINKMODULE_OPTION_DONT_CALL_MOD_INIT_ROUTINES 0x8 -#define NSLINKMODULE_OPTION_TRAILING_PHYS_NAME 0x10 - -extern bool NSUnLinkModule(NSModule module, uint32_t options) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -#define NSUNLINKMODULE_OPTION_NONE 0x0 -#define NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED 0x1 -#define NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES 0x2 - -/* symbol API */ -typedef struct __NSSymbol* NSSymbol; -extern bool NSIsSymbolNameDefined(const char* symbolName) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); -extern bool NSIsSymbolNameDefinedWithHint(const char* symbolName, const char* libraryNameHint) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); -extern bool NSIsSymbolNameDefinedInImage(const struct mach_header* image, const char* symbolName) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); -extern NSSymbol NSLookupAndBindSymbol(const char* symbolName) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); -extern NSSymbol NSLookupAndBindSymbolWithHint(const char* symbolName, const char* libraryNameHint) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); -extern NSSymbol NSLookupSymbolInModule(NSModule module, const char* symbolName) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern NSSymbol NSLookupSymbolInImage(const struct mach_header* image, const char* symbolName, uint32_t options) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0 -#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1 -#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY 0x2 -#define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4 -extern const char* NSNameOfSymbol(NSSymbol symbol) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern void * NSAddressOfSymbol(NSSymbol symbol) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern NSModule NSModuleForSymbol(NSSymbol symbol) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); - -/* error handling API */ -typedef enum { - NSLinkEditFileAccessError, - NSLinkEditFileFormatError, - NSLinkEditMachResourceError, - NSLinkEditUnixResourceError, - NSLinkEditOtherError, - NSLinkEditWarningError, - NSLinkEditMultiplyDefinedError, - NSLinkEditUndefinedError -} NSLinkEditErrors; - -/* - * For the NSLinkEditErrors value NSLinkEditOtherError these are the values - * passed to the link edit error handler as the errorNumber (what would be an - * errno value for NSLinkEditUnixResourceError or a kern_return_t value for - * NSLinkEditMachResourceError). - */ -typedef enum { - NSOtherErrorRelocation, - NSOtherErrorLazyBind, - NSOtherErrorIndrLoop, - NSOtherErrorLazyInit, - NSOtherErrorInvalidArgs -} NSOtherErrorNumbers; - -extern void NSLinkEditError(NSLinkEditErrors *c, int *errorNumber, const char** fileName, const char** errorString) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); - -typedef struct { - void (*undefined)(const char* symbolName); - NSModule (*multiple)(NSSymbol s, NSModule oldModule, NSModule newModule); - void (*linkEdit)(NSLinkEditErrors errorClass, int errorNumber, - const char* fileName, const char* errorString); -} NSLinkEditErrorHandlers; - -extern void NSInstallLinkEditErrorHandlers(const NSLinkEditErrorHandlers *handlers) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); - -extern bool NSAddLibrary(const char* pathName) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); -extern bool NSAddLibraryWithSearching(const char* pathName) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); -extern const struct mach_header* NSAddImage(const char* image_name, uint32_t options) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -#define NSADDIMAGE_OPTION_NONE 0x0 -#define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1 -#define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2 -#define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4 -#define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME 0x8 - -extern bool _dyld_present(void) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern bool _dyld_launched_prebound(void) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern bool _dyld_all_twolevel_modules_prebound(void) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern void _dyld_bind_objc_module(const void* objc_module) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern bool _dyld_bind_fully_image_containing_address(const void* address) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern bool _dyld_image_containing_address(const void* address) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); -extern void _dyld_lookup_and_bind(const char* symbol_name, void **address, NSModule* module) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); -extern void _dyld_lookup_and_bind_with_hint(const char* symbol_name, const char* library_name_hint, void** address, NSModule* module) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); -extern void _dyld_lookup_and_bind_fully(const char* symbol_name, void** address, NSModule* module) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); - -extern const struct mach_header* _dyld_get_image_header_containing_address(const void* address) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); - - -#if __cplusplus -} -#endif - -#endif /* _MACH_O_DYLD_H_ */ diff --git a/i386/include/mach-o/dyld_images.h b/i386/include/mach-o/dyld_images.h deleted file mode 100644 index ed710ef..0000000 --- a/i386/include/mach-o/dyld_images.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (c) 2006-2010 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _DYLD_IMAGES_ -#define _DYLD_IMAGES_ - -#include <stdbool.h> -#include <unistd.h> -#include <mach/mach.h> - -#ifdef __cplusplus -extern "C" { -#endif - - -/* - * Beginning in Mac OS X 10.4, this is how gdb discovers which mach-o images are loaded in a process. - * - * gdb looks for the symbol "_dyld_all_image_infos" in dyld. It contains the fields below. - * - * For a snashot of what images are currently loaded, the infoArray fields contain a pointer - * to an array of all images. If infoArray is NULL, it means it is being modified, come back later. - * - * To be notified of changes, gdb sets a break point on the address pointed to by the notificationn - * field. The function it points to is called by dyld with an array of information about what images - * have been added (dyld_image_adding) or are about to be removed (dyld_image_removing). - * - * The notification is called after infoArray is updated. This means that if gdb attaches to a process - * and infoArray is NULL, gdb can set a break point on notification and let the proccess continue to - * run until the break point. Then gdb can inspect the full infoArray. - * - * The dyldVersion field always points to a C string that contains the dyld version. For instance, - * in dyld-127.3, dyldVersion would contain a pointer to "127.3". - * - * The errorMessage and terminationFlags fields are normally zero. If dyld terminates a process - * (for instance because a required dylib or symbol is missing), then the errorMessage field will - * be set to point to a C string message buffer containing the reason dyld terminate the process. - * The low bit of the terminationFlags will be set if dyld terminated the process before any user - * code ran, in which case there is no need for the crash log to contain the backtrace. - * - * When dyld terminates a process because some required dylib or symbol cannot be bound, in - * addition to the errorMessage field, it now sets the errorKind field and the corresponding - * fields: errorClientOfDylibPath, errorTargetDylibPath, errorSymbol. - * - */ - -enum dyld_image_mode { dyld_image_adding=0, dyld_image_removing=1 }; - -struct dyld_image_info { - const struct mach_header* imageLoadAddress; /* base address image is mapped into */ - const char* imageFilePath; /* path dyld used to load the image */ - uintptr_t imageFileModDate; /* time_t of image file */ - /* if stat().st_mtime of imageFilePath does not match imageFileModDate, */ - /* then file has been modified since dyld loaded it */ -}; - -struct dyld_uuid_info { - const struct mach_header* imageLoadAddress; /* base address image is mapped into */ - uuid_t imageUUID; /* UUID of image */ -}; - -typedef void (*dyld_image_notifier)(enum dyld_image_mode mode, uint32_t infoCount, const struct dyld_image_info info[]); - -/* for use in dyld_all_image_infos.errorKind field */ -enum { dyld_error_kind_none=0, - dyld_error_kind_dylib_missing=1, - dyld_error_kind_dylib_wrong_arch=2, - dyld_error_kind_dylib_version=3, - dyld_error_kind_symbol_missing=4 - }; - - -struct dyld_all_image_infos { - uint32_t version; /* 1 in Mac OS X 10.4 and 10.5 */ - uint32_t infoArrayCount; - const struct dyld_image_info* infoArray; - dyld_image_notifier notification; - bool processDetachedFromSharedRegion; - /* the following fields are only in version 2 (Mac OS X 10.6, iPhoneOS 2.0) and later */ - bool libSystemInitialized; - const struct mach_header* dyldImageLoadAddress; - /* the following field is only in version 3 (Mac OS X 10.6, iPhoneOS 3.0) and later */ - void* jitInfo; - /* the following fields are only in version 5 (Mac OS X 10.6, iPhoneOS 3.0) and later */ - const char* dyldVersion; - const char* errorMessage; - uintptr_t terminationFlags; - /* the following field is only in version 6 (Mac OS X 10.6, iPhoneOS 3.1) and later */ - void* coreSymbolicationShmPage; - /* the following field is only in version 7 (Mac OS X 10.6, iPhoneOS 3.1) and later */ - uintptr_t systemOrderFlag; - /* the following field is only in version 8 (Mac OS X 10.7, iPhoneOS 3.1) and later */ - uintptr_t uuidArrayCount; - const struct dyld_uuid_info* uuidArray; /* only images not in dyld shared cache */ - /* the following field is only in version 9 (Mac OS X 10.7, iOS 4.0) and later */ - struct dyld_all_image_infos* dyldAllImageInfosAddress; - /* the following field is only in version 10 (Mac OS X 10.7, iOS 4.2) and later */ - uintptr_t initialImageCount; - /* the following field is only in version 11 (Mac OS X 10.7, iOS 4.2) and later */ - uintptr_t errorKind; - const char* errorClientOfDylibPath; - const char* errorTargetDylibPath; - const char* errorSymbol; - /* the following field is only in version 12 (Mac OS X 10.7, iOS 4.3) and later */ - uintptr_t sharedCacheSlide; -}; -extern struct dyld_all_image_infos dyld_all_image_infos; - -/* - * Beginning in Mac OS X 10.6, rather than looking up the symbol "_dyld_all_image_infos" - * in dyld's symbol table, you can add DYLD_ALL_IMAGE_INFOS_OFFSET_OFFSET to the mach_header - * for dyld and read the 32-bit unsigned int at that location. Adding that value to dyld's - * mach_header address gets you the address of dyld_all_image_infos in dyld. - */ -#define DYLD_ALL_IMAGE_INFOS_OFFSET_OFFSET 0x1010 - - - -/* - * Beginning in Mac OS X 10.5, this is how gdb discovers where the shared cache is in a process. - * Images that are in the shared cache have their segments rearranged, so when using imageFilePath - * to load the file from disk, you have to know to adjust addresses based on how their segment - * was rearranged. - * - * gdb looks for the symbol "_dyld_shared_region_ranges" in dyld. - * - * It contains information the count of shared regions used by the process. The count is - * the number of start/length pairs. - */ -struct dyld_shared_cache_ranges { - uintptr_t sharedRegionsCount; /* how many ranges follow */ - struct { - uintptr_t start; - uintptr_t length; - } ranges[4]; /* max regions */ -}; -extern struct dyld_shared_cache_ranges dyld_shared_cache_ranges; - - - -#ifdef __cplusplus -} -#endif - -#endif /* _DYLD_IMAGES_ */ diff --git a/i386/include/mach-o/fat.h b/i386/include/mach-o/fat.h deleted file mode 100644 index e2bcf43..0000000 --- a/i386/include/mach-o/fat.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _MACH_O_FAT_H_ -#define _MACH_O_FAT_H_ -/* - * This header file describes the structures of the file format for "fat" - * architecture specific file (wrapper design). At the begining of the file - * there is one fat_header structure followed by a number of fat_arch - * structures. For each architecture in the file, specified by a pair of - * cputype and cpusubtype, the fat_header describes the file offset, file - * size and alignment in the file of the architecture specific member. - * The padded bytes in the file to place each member on it's specific alignment - * are defined to be read as zeros and can be left as "holes" if the file system - * can support them as long as they read as zeros. - * - * All structures defined here are always written and read to/from disk - * in big-endian order. - */ - -/* - * <mach/machine.h> is needed here for the cpu_type_t and cpu_subtype_t types - * and contains the constants for the possible values of these types. - */ -#include <stdint.h> -#include <mach/machine.h> -#include <architecture/byte_order.h> - -#define FAT_MAGIC 0xcafebabe -#define FAT_CIGAM 0xbebafeca /* NXSwapLong(FAT_MAGIC) */ - -struct fat_header { - uint32_t magic; /* FAT_MAGIC */ - uint32_t nfat_arch; /* number of structs that follow */ -}; - -struct fat_arch { - cpu_type_t cputype; /* cpu specifier (int) */ - cpu_subtype_t cpusubtype; /* machine specifier (int) */ - uint32_t offset; /* file offset to this object file */ - uint32_t size; /* size of this object file */ - uint32_t align; /* alignment as a power of 2 */ -}; - -#endif /* _MACH_O_FAT_H_ */ diff --git a/i386/include/mach-o/getsect.h b/i386/include/mach-o/getsect.h deleted file mode 100644 index cee1f9f..0000000 --- a/i386/include/mach-o/getsect.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _MACH_O_GETSECT_H_ -#define _MACH_O_GETSECT_H_ - -#include <stdint.h> -#include <mach-o/loader.h> - -#if __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* - * Runtime interfaces for Mach-O programs. For both 32-bit and 64-bit programs, - * where the sizes returned will be 32-bit or 64-bit based on the size of - * 'unsigned long'. - */ -extern char *getsectdata( - const char *segname, - const char *sectname, - unsigned long *size); - -extern char *getsectdatafromFramework( - const char *FrameworkName, - const char *segname, - const char *sectname, - unsigned long *size); - -extern unsigned long get_end(void); -extern unsigned long get_etext(void); -extern unsigned long get_edata(void); - -#ifndef __LP64__ -/* - * Runtime interfaces for 32-bit Mach-O programs. - */ -extern const struct section *getsectbyname( - const char *segname, - const char *sectname); - -extern uint8_t *getsectiondata( - const struct mach_header *mhp, - const char *segname, - const char *sectname, - unsigned long *size); - -extern const struct segment_command *getsegbyname( - const char *segname); - -extern uint8_t *getsegmentdata( - const struct mach_header *mhp, - const char *segname, - unsigned long *size); - -#else /* defined(__LP64__) */ -/* - * Runtime interfaces for 64-bit Mach-O programs. - */ -extern const struct section_64 *getsectbyname( - const char *segname, - const char *sectname); - -extern uint8_t *getsectiondata( - const struct mach_header_64 *mhp, - const char *segname, - const char *sectname, - unsigned long *size); - -extern const struct segment_command_64 *getsegbyname( - const char *segname); - -extern uint8_t *getsegmentdata( - const struct mach_header_64 *mhp, - const char *segname, - unsigned long *size); - -#endif /* defined(__LP64__) */ - -/* - * Interfaces for tools working with 32-bit Mach-O files. - */ -extern char *getsectdatafromheader( - const struct mach_header *mhp, - const char *segname, - const char *sectname, - uint32_t *size); - -extern const struct section *getsectbynamefromheader( - const struct mach_header *mhp, - const char *segname, - const char *sectname); - -/* - * Interfaces for tools working with 64-bit Mach-O files. - */ -extern char *getsectdatafromheader_64( - const struct mach_header_64 *mhp, - const char *segname, - const char *sectname, - uint64_t *size); - -extern const struct section_64 *getsectbynamefromheader_64( - const struct mach_header_64 *mhp, - const char *segname, - const char *sectname); - -#if __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _MACH_O_GETSECT_H_ */ diff --git a/i386/include/mach-o/ldsyms.h b/i386/include/mach-o/ldsyms.h deleted file mode 100644 index 3f28b1b..0000000 --- a/i386/include/mach-o/ldsyms.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _MACHO_LDSYMS_H_ -#define _MACHO_LDSYMS_H_ - -#include <mach-o/loader.h> - -/* - * This file describes the link editor defined symbols. The semantics of a - * link editor symbol is that it is defined by the link editor only if it is - * referenced and it is an error for the user to define them (see the man page - * ld(1)). The standard UNIX link editor symbols: __end, __etext and __edata - * are not not supported by the Apple Mach-O link editor. These symbols are - * really not meaningful in a Mach-O object file and the link editor symbols - * that are supported (described here) replace them. In the case of the - * standard UNIX link editor symbols the program can use the symbol - * __mh_execute_header and walk the load commands of it's program to determine - * the ending (or beginning) of any section or segment in the program. Note - * that the compiler prepends an underbar to all external symbol names coded - * in a high level language. Thus in 'C' names are coded without an underbar - * and symbol names in the symbol table have an underbar. There are two cpp - * macros for each link editor defined name in this file. The macro with a - * leading underbar is the symbol name and the one without is the name as - * coded in 'C'. - */ - -/* - * The value of the link editor defined symbol _MH_EXECUTE_SYM is the address - * of the mach header in a Mach-O executable file type. It does not appear in - * any file type other than a MH_EXECUTE file type. The type of the symbol is - * absolute as the header is not part of any section. - */ -#define _MH_EXECUTE_SYM "__mh_execute_header" -#define MH_EXECUTE_SYM "_mh_execute_header" -extern const struct -#ifdef __LP64__ -mach_header_64 -#else -mach_header -#endif -_mh_execute_header; - -/* - * The value of the link editor defined symbol _MH_BUNDLE_SYM is the address - * of the mach header in a Mach-O bundle file type. It does not appear in - * any file type other than a MH_BUNDLE file type. The type of the symbol is - * an N_SECT symbol even thought the header is not part of any section. This - * symbol is private to the code in the bundle it is a part of. - */ -#define _MH_BUNDLE_SYM "__mh_bundle_header" -#define MH_BUNDLE_SYM "_mh_bundle_header" -extern const struct -#ifdef __LP64__ -mach_header_64 -#else -mach_header -#endif -_mh_bundle_header; - -/* - * The value of the link editor defined symbol _MH_DYLIB_SYM is the address - * of the mach header in a Mach-O dylib file type. It does not appear in - * any file type other than a MH_DYLIB file type. The type of the symbol is - * an N_SECT symbol even thought the header is not part of any section. This - * symbol is private to the code in the library it is a part of. - */ -#define _MH_DYLIB_SYM "__mh_dylib_header" -#define MH_DYLIB_SYM "_mh_dylib_header" -extern const struct -#ifdef __LP64__ -mach_header_64 -#else -mach_header -#endif -_mh_dylib_header; - -/* - * The value of the link editor defined symbol _MH_DYLINKER_SYM is the address - * of the mach header in a Mach-O dylinker file type. It does not appear in - * any file type other than a MH_DYLINKER file type. The type of the symbol is - * an N_SECT symbol even thought the header is not part of any section. This - * symbol is private to the code in the dynamic linker it is a part of. - */ -#define _MH_DYLINKER_SYM "__mh_dylinker_header" -#define MH_DYLINKER_SYM "_mh_dylinker_header" -extern const struct -#ifdef __LP64__ -mach_header_64 -#else -mach_header -#endif -_mh_dylinker_header; - -/* - * For the MH_PRELOAD file type the headers are not loaded as part of any - * segment so the link editor defines symbols defined for the beginning - * and ending of each segment and each section in each segment. The names for - * the symbols for a segment's beginning and end will have the form: - * __SEGNAME__begin and __SEGNAME__end where __SEGNAME is the name of the - * segment. The names for the symbols for a section's beginning and end will - * have the form: __SEGNAME__sectname__begin and __SEGNAME__sectname__end - * where __sectname is the name of the section and __SEGNAME is the segment it - * is in. - * - * The above symbols' types are those of the section they are referring to. - * This is true even for symbols who's values are end's of a section and - * that value is next address after that section and not really in that - * section. This results in these symbols having types referring to sections - * who's values are not in that section. - */ - -#endif /* _MACHO_LDSYMS_H_ */ diff --git a/i386/include/mach-o/loader.h b/i386/include/mach-o/loader.h deleted file mode 100644 index ff18e29..0000000 --- a/i386/include/mach-o/loader.h +++ /dev/null @@ -1,1402 +0,0 @@ -/* - * Copyright (c) 1999-2010 Apple Inc. All Rights Reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _MACHO_LOADER_H_ -#define _MACHO_LOADER_H_ - -/* - * This file describes the format of mach object files. - */ -#include <stdint.h> - -/* - * <mach/machine.h> is needed here for the cpu_type_t and cpu_subtype_t types - * and contains the constants for the possible values of these types. - */ -#include <mach/machine.h> - -/* - * <mach/vm_prot.h> is needed here for the vm_prot_t type and contains the - * constants that are or'ed together for the possible values of this type. - */ -#include <mach/vm_prot.h> - -/* - * <machine/thread_status.h> is expected to define the flavors of the thread - * states and the structures of those flavors for each machine. - */ -#include <mach/machine/thread_status.h> -#include <architecture/byte_order.h> - -/* - * The 32-bit mach header appears at the very beginning of the object file for - * 32-bit architectures. - */ -struct mach_header { - uint32_t magic; /* mach magic number identifier */ - cpu_type_t cputype; /* cpu specifier */ - cpu_subtype_t cpusubtype; /* machine specifier */ - uint32_t filetype; /* type of file */ - uint32_t ncmds; /* number of load commands */ - uint32_t sizeofcmds; /* the size of all the load commands */ - uint32_t flags; /* flags */ -}; - -/* Constant for the magic field of the mach_header (32-bit architectures) */ -#define MH_MAGIC 0xfeedface /* the mach magic number */ -#define MH_CIGAM 0xcefaedfe /* NXSwapInt(MH_MAGIC) */ - -/* - * The 64-bit mach header appears at the very beginning of object files for - * 64-bit architectures. - */ -struct mach_header_64 { - uint32_t magic; /* mach magic number identifier */ - cpu_type_t cputype; /* cpu specifier */ - cpu_subtype_t cpusubtype; /* machine specifier */ - uint32_t filetype; /* type of file */ - uint32_t ncmds; /* number of load commands */ - uint32_t sizeofcmds; /* the size of all the load commands */ - uint32_t flags; /* flags */ - uint32_t reserved; /* reserved */ -}; - -/* Constant for the magic field of the mach_header_64 (64-bit architectures) */ -#define MH_MAGIC_64 0xfeedfacf /* the 64-bit mach magic number */ -#define MH_CIGAM_64 0xcffaedfe /* NXSwapInt(MH_MAGIC_64) */ - -/* - * The layout of the file depends on the filetype. For all but the MH_OBJECT - * file type the segments are padded out and aligned on a segment alignment - * boundary for efficient demand pageing. The MH_EXECUTE, MH_FVMLIB, MH_DYLIB, - * MH_DYLINKER and MH_BUNDLE file types also have the headers included as part - * of their first segment. - * - * The file type MH_OBJECT is a compact format intended as output of the - * assembler and input (and possibly output) of the link editor (the .o - * format). All sections are in one unnamed segment with no segment padding. - * This format is used as an executable format when the file is so small the - * segment padding greatly increases its size. - * - * The file type MH_PRELOAD is an executable format intended for things that - * are not executed under the kernel (proms, stand alones, kernels, etc). The - * format can be executed under the kernel but may demand paged it and not - * preload it before execution. - * - * A core file is in MH_CORE format and can be any in an arbritray legal - * Mach-O file. - * - * Constants for the filetype field of the mach_header - */ -#define MH_OBJECT 0x1 /* relocatable object file */ -#define MH_EXECUTE 0x2 /* demand paged executable file */ -#define MH_FVMLIB 0x3 /* fixed VM shared library file */ -#define MH_CORE 0x4 /* core file */ -#define MH_PRELOAD 0x5 /* preloaded executable file */ -#define MH_DYLIB 0x6 /* dynamically bound shared library */ -#define MH_DYLINKER 0x7 /* dynamic link editor */ -#define MH_BUNDLE 0x8 /* dynamically bound bundle file */ -#define MH_DYLIB_STUB 0x9 /* shared library stub for static */ - /* linking only, no section contents */ -#define MH_DSYM 0xa /* companion file with only debug */ - /* sections */ -#define MH_KEXT_BUNDLE 0xb /* x86_64 kexts */ - -/* Constants for the flags field of the mach_header */ -#define MH_NOUNDEFS 0x1 /* the object file has no undefined - references */ -#define MH_INCRLINK 0x2 /* the object file is the output of an - incremental link against a base file - and can't be link edited again */ -#define MH_DYLDLINK 0x4 /* the object file is input for the - dynamic linker and can't be staticly - link edited again */ -#define MH_BINDATLOAD 0x8 /* the object file's undefined - references are bound by the dynamic - linker when loaded. */ -#define MH_PREBOUND 0x10 /* the file has its dynamic undefined - references prebound. */ -#define MH_SPLIT_SEGS 0x20 /* the file has its read-only and - read-write segments split */ -#define MH_LAZY_INIT 0x40 /* the shared library init routine is - to be run lazily via catching memory - faults to its writeable segments - (obsolete) */ -#define MH_TWOLEVEL 0x80 /* the image is using two-level name - space bindings */ -#define MH_FORCE_FLAT 0x100 /* the executable is forcing all images - to use flat name space bindings */ -#define MH_NOMULTIDEFS 0x200 /* this umbrella guarantees no multiple - defintions of symbols in its - sub-images so the two-level namespace - hints can always be used. */ -#define MH_NOFIXPREBINDING 0x400 /* do not have dyld notify the - prebinding agent about this - executable */ -#define MH_PREBINDABLE 0x800 /* the binary is not prebound but can - have its prebinding redone. only used - when MH_PREBOUND is not set. */ -#define MH_ALLMODSBOUND 0x1000 /* indicates that this binary binds to - all two-level namespace modules of - its dependent libraries. only used - when MH_PREBINDABLE and MH_TWOLEVEL - are both set. */ -#define MH_SUBSECTIONS_VIA_SYMBOLS 0x2000/* safe to divide up the sections into - sub-sections via symbols for dead - code stripping */ -#define MH_CANONICAL 0x4000 /* the binary has been canonicalized - via the unprebind operation */ -#define MH_WEAK_DEFINES 0x8000 /* the final linked image contains - external weak symbols */ -#define MH_BINDS_TO_WEAK 0x10000 /* the final linked image uses - weak symbols */ - -#define MH_ALLOW_STACK_EXECUTION 0x20000/* When this bit is set, all stacks - in the task will be given stack - execution privilege. Only used in - MH_EXECUTE filetypes. */ -#define MH_ROOT_SAFE 0x40000 /* When this bit is set, the binary - declares it is safe for use in - processes with uid zero */ - -#define MH_SETUID_SAFE 0x80000 /* When this bit is set, the binary - declares it is safe for use in - processes when issetugid() is true */ - -#define MH_NO_REEXPORTED_DYLIBS 0x100000 /* When this bit is set on a dylib, - the static linker does not need to - examine dependent dylibs to see - if any are re-exported */ -#define MH_PIE 0x200000 /* When this bit is set, the OS will - load the main executable at a - random address. Only used in - MH_EXECUTE filetypes. */ -#define MH_DEAD_STRIPPABLE_DYLIB 0x400000 /* Only for use on dylibs. When - linking against a dylib that - has this bit set, the static linker - will automatically not create a - LC_LOAD_DYLIB load command to the - dylib if no symbols are being - referenced from the dylib. */ -#define MH_HAS_TLV_DESCRIPTORS 0x800000 /* Contains a section of type - S_THREAD_LOCAL_VARIABLES */ - -#define MH_NO_HEAP_EXECUTION 0x1000000 /* When this bit is set, the OS will - run the main executable with - a non-executable heap even on - platforms (e.g. i386) that don't - require it. Only used in MH_EXECUTE - filetypes. */ - -/* - * The load commands directly follow the mach_header. The total size of all - * of the commands is given by the sizeofcmds field in the mach_header. All - * load commands must have as their first two fields cmd and cmdsize. The cmd - * field is filled in with a constant for that command type. Each command type - * has a structure specifically for it. The cmdsize field is the size in bytes - * of the particular load command structure plus anything that follows it that - * is a part of the load command (i.e. section structures, strings, etc.). To - * advance to the next load command the cmdsize can be added to the offset or - * pointer of the current load command. The cmdsize for 32-bit architectures - * MUST be a multiple of 4 bytes and for 64-bit architectures MUST be a multiple - * of 8 bytes (these are forever the maximum alignment of any load commands). - * The padded bytes must be zero. All tables in the object file must also - * follow these rules so the file can be memory mapped. Otherwise the pointers - * to these tables will not work well or at all on some machines. With all - * padding zeroed like objects will compare byte for byte. - */ -struct load_command { - uint32_t cmd; /* type of load command */ - uint32_t cmdsize; /* total size of command in bytes */ -}; - -/* - * After MacOS X 10.1 when a new load command is added that is required to be - * understood by the dynamic linker for the image to execute properly the - * LC_REQ_DYLD bit will be or'ed into the load command constant. If the dynamic - * linker sees such a load command it it does not understand will issue a - * "unknown load command required for execution" error and refuse to use the - * image. Other load commands without this bit that are not understood will - * simply be ignored. - */ -#define LC_REQ_DYLD 0x80000000 - -/* Constants for the cmd field of all load commands, the type */ -#define LC_SEGMENT 0x1 /* segment of this file to be mapped */ -#define LC_SYMTAB 0x2 /* link-edit stab symbol table info */ -#define LC_SYMSEG 0x3 /* link-edit gdb symbol table info (obsolete) */ -#define LC_THREAD 0x4 /* thread */ -#define LC_UNIXTHREAD 0x5 /* unix thread (includes a stack) */ -#define LC_LOADFVMLIB 0x6 /* load a specified fixed VM shared library */ -#define LC_IDFVMLIB 0x7 /* fixed VM shared library identification */ -#define LC_IDENT 0x8 /* object identification info (obsolete) */ -#define LC_FVMFILE 0x9 /* fixed VM file inclusion (internal use) */ -#define LC_PREPAGE 0xa /* prepage command (internal use) */ -#define LC_DYSYMTAB 0xb /* dynamic link-edit symbol table info */ -#define LC_LOAD_DYLIB 0xc /* load a dynamically linked shared library */ -#define LC_ID_DYLIB 0xd /* dynamically linked shared lib ident */ -#define LC_LOAD_DYLINKER 0xe /* load a dynamic linker */ -#define LC_ID_DYLINKER 0xf /* dynamic linker identification */ -#define LC_PREBOUND_DYLIB 0x10 /* modules prebound for a dynamically */ - /* linked shared library */ -#define LC_ROUTINES 0x11 /* image routines */ -#define LC_SUB_FRAMEWORK 0x12 /* sub framework */ -#define LC_SUB_UMBRELLA 0x13 /* sub umbrella */ -#define LC_SUB_CLIENT 0x14 /* sub client */ -#define LC_SUB_LIBRARY 0x15 /* sub library */ -#define LC_TWOLEVEL_HINTS 0x16 /* two-level namespace lookup hints */ -#define LC_PREBIND_CKSUM 0x17 /* prebind checksum */ - -/* - * load a dynamically linked shared library that is allowed to be missing - * (all symbols are weak imported). - */ -#define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD) - -#define LC_SEGMENT_64 0x19 /* 64-bit segment of this file to be - mapped */ -#define LC_ROUTINES_64 0x1a /* 64-bit image routines */ -#define LC_UUID 0x1b /* the uuid */ -#define LC_RPATH (0x1c | LC_REQ_DYLD) /* runpath additions */ -#define LC_CODE_SIGNATURE 0x1d /* local of code signature */ -#define LC_SEGMENT_SPLIT_INFO 0x1e /* local of info to split segments */ -#define LC_REEXPORT_DYLIB (0x1f | LC_REQ_DYLD) /* load and re-export dylib */ -#define LC_LAZY_LOAD_DYLIB 0x20 /* delay load of dylib until first use */ -#define LC_ENCRYPTION_INFO 0x21 /* encrypted segment information */ -#define LC_DYLD_INFO 0x22 /* compressed dyld information */ -#define LC_DYLD_INFO_ONLY (0x22|LC_REQ_DYLD) /* compressed dyld information only */ -#define LC_LOAD_UPWARD_DYLIB (0x23 | LC_REQ_DYLD) /* load upward dylib */ -#define LC_VERSION_MIN_MACOSX 0x24 /* build for MacOSX min OS version */ -#define LC_VERSION_MIN_IPHONEOS 0x25 /* build for iPhoneOS min OS version */ -#define LC_FUNCTION_STARTS 0x26 /* compressed table of function start addresses */ -#define LC_DYLD_ENVIRONMENT 0x27 /* string for dyld to treat - like environment variable */ - -/* - * A variable length string in a load command is represented by an lc_str - * union. The strings are stored just after the load command structure and - * the offset is from the start of the load command structure. The size - * of the string is reflected in the cmdsize field of the load command. - * Once again any padded bytes to bring the cmdsize field to a multiple - * of 4 bytes must be zero. - */ -union lc_str { - uint32_t offset; /* offset to the string */ -#ifndef __LP64__ - char *ptr; /* pointer to the string */ -#endif -}; - -/* - * The segment load command indicates that a part of this file is to be - * mapped into the task's address space. The size of this segment in memory, - * vmsize, maybe equal to or larger than the amount to map from this file, - * filesize. The file is mapped starting at fileoff to the beginning of - * the segment in memory, vmaddr. The rest of the memory of the segment, - * if any, is allocated zero fill on demand. The segment's maximum virtual - * memory protection and initial virtual memory protection are specified - * by the maxprot and initprot fields. If the segment has sections then the - * section structures directly follow the segment command and their size is - * reflected in cmdsize. - */ -struct segment_command { /* for 32-bit architectures */ - uint32_t cmd; /* LC_SEGMENT */ - uint32_t cmdsize; /* includes sizeof section structs */ - char segname[16]; /* segment name */ - uint32_t vmaddr; /* memory address of this segment */ - uint32_t vmsize; /* memory size of this segment */ - uint32_t fileoff; /* file offset of this segment */ - uint32_t filesize; /* amount to map from the file */ - vm_prot_t maxprot; /* maximum VM protection */ - vm_prot_t initprot; /* initial VM protection */ - uint32_t nsects; /* number of sections in segment */ - uint32_t flags; /* flags */ -}; - -/* - * The 64-bit segment load command indicates that a part of this file is to be - * mapped into a 64-bit task's address space. If the 64-bit segment has - * sections then section_64 structures directly follow the 64-bit segment - * command and their size is reflected in cmdsize. - */ -struct segment_command_64 { /* for 64-bit architectures */ - uint32_t cmd; /* LC_SEGMENT_64 */ - uint32_t cmdsize; /* includes sizeof section_64 structs */ - char segname[16]; /* segment name */ - uint64_t vmaddr; /* memory address of this segment */ - uint64_t vmsize; /* memory size of this segment */ - uint64_t fileoff; /* file offset of this segment */ - uint64_t filesize; /* amount to map from the file */ - vm_prot_t maxprot; /* maximum VM protection */ - vm_prot_t initprot; /* initial VM protection */ - uint32_t nsects; /* number of sections in segment */ - uint32_t flags; /* flags */ -}; - -/* Constants for the flags field of the segment_command */ -#define SG_HIGHVM 0x1 /* the file contents for this segment is for - the high part of the VM space, the low part - is zero filled (for stacks in core files) */ -#define SG_FVMLIB 0x2 /* this segment is the VM that is allocated by - a fixed VM library, for overlap checking in - the link editor */ -#define SG_NORELOC 0x4 /* this segment has nothing that was relocated - in it and nothing relocated to it, that is - it maybe safely replaced without relocation*/ -#define SG_PROTECTED_VERSION_1 0x8 /* This segment is protected. If the - segment starts at file offset 0, the - first page of the segment is not - protected. All other pages of the - segment are protected. */ - -/* - * A segment is made up of zero or more sections. Non-MH_OBJECT files have - * all of their segments with the proper sections in each, and padded to the - * specified segment alignment when produced by the link editor. The first - * segment of a MH_EXECUTE and MH_FVMLIB format file contains the mach_header - * and load commands of the object file before its first section. The zero - * fill sections are always last in their segment (in all formats). This - * allows the zeroed segment padding to be mapped into memory where zero fill - * sections might be. The gigabyte zero fill sections, those with the section - * type S_GB_ZEROFILL, can only be in a segment with sections of this type. - * These segments are then placed after all other segments. - * - * The MH_OBJECT format has all of its sections in one segment for - * compactness. There is no padding to a specified segment boundary and the - * mach_header and load commands are not part of the segment. - * - * Sections with the same section name, sectname, going into the same segment, - * segname, are combined by the link editor. The resulting section is aligned - * to the maximum alignment of the combined sections and is the new section's - * alignment. The combined sections are aligned to their original alignment in - * the combined section. Any padded bytes to get the specified alignment are - * zeroed. - * - * The format of the relocation entries referenced by the reloff and nreloc - * fields of the section structure for mach object files is described in the - * header file <reloc.h>. - */ -struct section { /* for 32-bit architectures */ - char sectname[16]; /* name of this section */ - char segname[16]; /* segment this section goes in */ - uint32_t addr; /* memory address of this section */ - uint32_t size; /* size in bytes of this section */ - uint32_t offset; /* file offset of this section */ - uint32_t align; /* section alignment (power of 2) */ - uint32_t reloff; /* file offset of relocation entries */ - uint32_t nreloc; /* number of relocation entries */ - uint32_t flags; /* flags (section type and attributes)*/ - uint32_t reserved1; /* reserved (for offset or index) */ - uint32_t reserved2; /* reserved (for count or sizeof) */ -}; - -struct section_64 { /* for 64-bit architectures */ - char sectname[16]; /* name of this section */ - char segname[16]; /* segment this section goes in */ - uint64_t addr; /* memory address of this section */ - uint64_t size; /* size in bytes of this section */ - uint32_t offset; /* file offset of this section */ - uint32_t align; /* section alignment (power of 2) */ - uint32_t reloff; /* file offset of relocation entries */ - uint32_t nreloc; /* number of relocation entries */ - uint32_t flags; /* flags (section type and attributes)*/ - uint32_t reserved1; /* reserved (for offset or index) */ - uint32_t reserved2; /* reserved (for count or sizeof) */ - uint32_t reserved3; /* reserved */ -}; - -/* - * The flags field of a section structure is separated into two parts a section - * type and section attributes. The section types are mutually exclusive (it - * can only have one type) but the section attributes are not (it may have more - * than one attribute). - */ -#define SECTION_TYPE 0x000000ff /* 256 section types */ -#define SECTION_ATTRIBUTES 0xffffff00 /* 24 section attributes */ - -/* Constants for the type of a section */ -#define S_REGULAR 0x0 /* regular section */ -#define S_ZEROFILL 0x1 /* zero fill on demand section */ -#define S_CSTRING_LITERALS 0x2 /* section with only literal C strings*/ -#define S_4BYTE_LITERALS 0x3 /* section with only 4 byte literals */ -#define S_8BYTE_LITERALS 0x4 /* section with only 8 byte literals */ -#define S_LITERAL_POINTERS 0x5 /* section with only pointers to */ - /* literals */ -/* - * For the two types of symbol pointers sections and the symbol stubs section - * they have indirect symbol table entries. For each of the entries in the - * section the indirect symbol table entries, in corresponding order in the - * indirect symbol table, start at the index stored in the reserved1 field - * of the section structure. Since the indirect symbol table entries - * correspond to the entries in the section the number of indirect symbol table - * entries is inferred from the size of the section divided by the size of the - * entries in the section. For symbol pointers sections the size of the entries - * in the section is 4 bytes and for symbol stubs sections the byte size of the - * stubs is stored in the reserved2 field of the section structure. - */ -#define S_NON_LAZY_SYMBOL_POINTERS 0x6 /* section with only non-lazy - symbol pointers */ -#define S_LAZY_SYMBOL_POINTERS 0x7 /* section with only lazy symbol - pointers */ -#define S_SYMBOL_STUBS 0x8 /* section with only symbol - stubs, byte size of stub in - the reserved2 field */ -#define S_MOD_INIT_FUNC_POINTERS 0x9 /* section with only function - pointers for initialization*/ -#define S_MOD_TERM_FUNC_POINTERS 0xa /* section with only function - pointers for termination */ -#define S_COALESCED 0xb /* section contains symbols that - are to be coalesced */ -#define S_GB_ZEROFILL 0xc /* zero fill on demand section - (that can be larger than 4 - gigabytes) */ -#define S_INTERPOSING 0xd /* section with only pairs of - function pointers for - interposing */ -#define S_16BYTE_LITERALS 0xe /* section with only 16 byte - literals */ -#define S_DTRACE_DOF 0xf /* section contains - DTrace Object Format */ -#define S_LAZY_DYLIB_SYMBOL_POINTERS 0x10 /* section with only lazy - symbol pointers to lazy - loaded dylibs */ -/* - * Section types to support thread local variables - */ -#define S_THREAD_LOCAL_REGULAR 0x11 /* template of initial - values for TLVs */ -#define S_THREAD_LOCAL_ZEROFILL 0x12 /* template of initial - values for TLVs */ -#define S_THREAD_LOCAL_VARIABLES 0x13 /* TLV descriptors */ -#define S_THREAD_LOCAL_VARIABLE_POINTERS 0x14 /* pointers to TLV - descriptors */ -#define S_THREAD_LOCAL_INIT_FUNCTION_POINTERS 0x15 /* functions to call - to initialize TLV - values */ - -/* - * Constants for the section attributes part of the flags field of a section - * structure. - */ -#define SECTION_ATTRIBUTES_USR 0xff000000 /* User setable attributes */ -#define S_ATTR_PURE_INSTRUCTIONS 0x80000000 /* section contains only true - machine instructions */ -#define S_ATTR_NO_TOC 0x40000000 /* section contains coalesced - symbols that are not to be - in a ranlib table of - contents */ -#define S_ATTR_STRIP_STATIC_SYMS 0x20000000 /* ok to strip static symbols - in this section in files - with the MH_DYLDLINK flag */ -#define S_ATTR_NO_DEAD_STRIP 0x10000000 /* no dead stripping */ -#define S_ATTR_LIVE_SUPPORT 0x08000000 /* blocks are live if they - reference live blocks */ -#define S_ATTR_SELF_MODIFYING_CODE 0x04000000 /* Used with i386 code stubs - written on by dyld */ -/* - * If a segment contains any sections marked with S_ATTR_DEBUG then all - * sections in that segment must have this attribute. No section other than - * a section marked with this attribute may reference the contents of this - * section. A section with this attribute may contain no symbols and must have - * a section type S_REGULAR. The static linker will not copy section contents - * from sections with this attribute into its output file. These sections - * generally contain DWARF debugging info. - */ -#define S_ATTR_DEBUG 0x02000000 /* a debug section */ -#define SECTION_ATTRIBUTES_SYS 0x00ffff00 /* system setable attributes */ -#define S_ATTR_SOME_INSTRUCTIONS 0x00000400 /* section contains some - machine instructions */ -#define S_ATTR_EXT_RELOC 0x00000200 /* section has external - relocation entries */ -#define S_ATTR_LOC_RELOC 0x00000100 /* section has local - relocation entries */ - - -/* - * The names of segments and sections in them are mostly meaningless to the - * link-editor. But there are few things to support traditional UNIX - * executables that require the link-editor and assembler to use some names - * agreed upon by convention. - * - * The initial protection of the "__TEXT" segment has write protection turned - * off (not writeable). - * - * The link-editor will allocate common symbols at the end of the "__common" - * section in the "__DATA" segment. It will create the section and segment - * if needed. - */ - -/* The currently known segment names and the section names in those segments */ - -#define SEG_PAGEZERO "__PAGEZERO" /* the pagezero segment which has no */ - /* protections and catches NULL */ - /* references for MH_EXECUTE files */ - - -#define SEG_TEXT "__TEXT" /* the tradition UNIX text segment */ -#define SECT_TEXT "__text" /* the real text part of the text */ - /* section no headers, and no padding */ -#define SECT_FVMLIB_INIT0 "__fvmlib_init0" /* the fvmlib initialization */ - /* section */ -#define SECT_FVMLIB_INIT1 "__fvmlib_init1" /* the section following the */ - /* fvmlib initialization */ - /* section */ - -#define SEG_DATA "__DATA" /* the tradition UNIX data segment */ -#define SECT_DATA "__data" /* the real initialized data section */ - /* no padding, no bss overlap */ -#define SECT_BSS "__bss" /* the real uninitialized data section*/ - /* no padding */ -#define SECT_COMMON "__common" /* the section common symbols are */ - /* allocated in by the link editor */ - -#define SEG_OBJC "__OBJC" /* objective-C runtime segment */ -#define SECT_OBJC_SYMBOLS "__symbol_table" /* symbol table */ -#define SECT_OBJC_MODULES "__module_info" /* module information */ -#define SECT_OBJC_STRINGS "__selector_strs" /* string table */ -#define SECT_OBJC_REFS "__selector_refs" /* string table */ - -#define SEG_ICON "__ICON" /* the icon segment */ -#define SECT_ICON_HEADER "__header" /* the icon headers */ -#define SECT_ICON_TIFF "__tiff" /* the icons in tiff format */ - -#define SEG_LINKEDIT "__LINKEDIT" /* the segment containing all structs */ - /* created and maintained by the link */ - /* editor. Created with -seglinkedit */ - /* option to ld(1) for MH_EXECUTE and */ - /* FVMLIB file types only */ - -#define SEG_UNIXSTACK "__UNIXSTACK" /* the unix stack segment */ - -#define SEG_IMPORT "__IMPORT" /* the segment for the self (dyld) */ - /* modifing code stubs that has read, */ - /* write and execute permissions */ - -/* - * Fixed virtual memory shared libraries are identified by two things. The - * target pathname (the name of the library as found for execution), and the - * minor version number. The address of where the headers are loaded is in - * header_addr. (THIS IS OBSOLETE and no longer supported). - */ -struct fvmlib { - union lc_str name; /* library's target pathname */ - uint32_t minor_version; /* library's minor version number */ - uint32_t header_addr; /* library's header address */ -}; - -/* - * A fixed virtual shared library (filetype == MH_FVMLIB in the mach header) - * contains a fvmlib_command (cmd == LC_IDFVMLIB) to identify the library. - * An object that uses a fixed virtual shared library also contains a - * fvmlib_command (cmd == LC_LOADFVMLIB) for each library it uses. - * (THIS IS OBSOLETE and no longer supported). - */ -struct fvmlib_command { - uint32_t cmd; /* LC_IDFVMLIB or LC_LOADFVMLIB */ - uint32_t cmdsize; /* includes pathname string */ - struct fvmlib fvmlib; /* the library identification */ -}; - -/* - * Dynamicly linked shared libraries are identified by two things. The - * pathname (the name of the library as found for execution), and the - * compatibility version number. The pathname must match and the compatibility - * number in the user of the library must be greater than or equal to the - * library being used. The time stamp is used to record the time a library was - * built and copied into user so it can be use to determined if the library used - * at runtime is exactly the same as used to built the program. - */ -struct dylib { - union lc_str name; /* library's path name */ - uint32_t timestamp; /* library's build time stamp */ - uint32_t current_version; /* library's current version number */ - uint32_t compatibility_version; /* library's compatibility vers number*/ -}; - -/* - * A dynamically linked shared library (filetype == MH_DYLIB in the mach header) - * contains a dylib_command (cmd == LC_ID_DYLIB) to identify the library. - * An object that uses a dynamically linked shared library also contains a - * dylib_command (cmd == LC_LOAD_DYLIB, LC_LOAD_WEAK_DYLIB, or - * LC_REEXPORT_DYLIB) for each library it uses. - */ -struct dylib_command { - uint32_t cmd; /* LC_ID_DYLIB, LC_LOAD_{,WEAK_}DYLIB, - LC_REEXPORT_DYLIB */ - uint32_t cmdsize; /* includes pathname string */ - struct dylib dylib; /* the library identification */ -}; - -/* - * A dynamically linked shared library may be a subframework of an umbrella - * framework. If so it will be linked with "-umbrella umbrella_name" where - * Where "umbrella_name" is the name of the umbrella framework. A subframework - * can only be linked against by its umbrella framework or other subframeworks - * that are part of the same umbrella framework. Otherwise the static link - * editor produces an error and states to link against the umbrella framework. - * The name of the umbrella framework for subframeworks is recorded in the - * following structure. - */ -struct sub_framework_command { - uint32_t cmd; /* LC_SUB_FRAMEWORK */ - uint32_t cmdsize; /* includes umbrella string */ - union lc_str umbrella; /* the umbrella framework name */ -}; - -/* - * For dynamically linked shared libraries that are subframework of an umbrella - * framework they can allow clients other than the umbrella framework or other - * subframeworks in the same umbrella framework. To do this the subframework - * is built with "-allowable_client client_name" and an LC_SUB_CLIENT load - * command is created for each -allowable_client flag. The client_name is - * usually a framework name. It can also be a name used for bundles clients - * where the bundle is built with "-client_name client_name". - */ -struct sub_client_command { - uint32_t cmd; /* LC_SUB_CLIENT */ - uint32_t cmdsize; /* includes client string */ - union lc_str client; /* the client name */ -}; - -/* - * A dynamically linked shared library may be a sub_umbrella of an umbrella - * framework. If so it will be linked with "-sub_umbrella umbrella_name" where - * Where "umbrella_name" is the name of the sub_umbrella framework. When - * staticly linking when -twolevel_namespace is in effect a twolevel namespace - * umbrella framework will only cause its subframeworks and those frameworks - * listed as sub_umbrella frameworks to be implicited linked in. Any other - * dependent dynamic libraries will not be linked it when -twolevel_namespace - * is in effect. The primary library recorded by the static linker when - * resolving a symbol in these libraries will be the umbrella framework. - * Zero or more sub_umbrella frameworks may be use by an umbrella framework. - * The name of a sub_umbrella framework is recorded in the following structure. - */ -struct sub_umbrella_command { - uint32_t cmd; /* LC_SUB_UMBRELLA */ - uint32_t cmdsize; /* includes sub_umbrella string */ - union lc_str sub_umbrella; /* the sub_umbrella framework name */ -}; - -/* - * A dynamically linked shared library may be a sub_library of another shared - * library. If so it will be linked with "-sub_library library_name" where - * Where "library_name" is the name of the sub_library shared library. When - * staticly linking when -twolevel_namespace is in effect a twolevel namespace - * shared library will only cause its subframeworks and those frameworks - * listed as sub_umbrella frameworks and libraries listed as sub_libraries to - * be implicited linked in. Any other dependent dynamic libraries will not be - * linked it when -twolevel_namespace is in effect. The primary library - * recorded by the static linker when resolving a symbol in these libraries - * will be the umbrella framework (or dynamic library). Zero or more sub_library - * shared libraries may be use by an umbrella framework or (or dynamic library). - * The name of a sub_library framework is recorded in the following structure. - * For example /usr/lib/libobjc_profile.A.dylib would be recorded as "libobjc". - */ -struct sub_library_command { - uint32_t cmd; /* LC_SUB_LIBRARY */ - uint32_t cmdsize; /* includes sub_library string */ - union lc_str sub_library; /* the sub_library name */ -}; - -/* - * A program (filetype == MH_EXECUTE) that is - * prebound to its dynamic libraries has one of these for each library that - * the static linker used in prebinding. It contains a bit vector for the - * modules in the library. The bits indicate which modules are bound (1) and - * which are not (0) from the library. The bit for module 0 is the low bit - * of the first byte. So the bit for the Nth module is: - * (linked_modules[N/8] >> N%8) & 1 - */ -struct prebound_dylib_command { - uint32_t cmd; /* LC_PREBOUND_DYLIB */ - uint32_t cmdsize; /* includes strings */ - union lc_str name; /* library's path name */ - uint32_t nmodules; /* number of modules in library */ - union lc_str linked_modules; /* bit vector of linked modules */ -}; - -/* - * A program that uses a dynamic linker contains a dylinker_command to identify - * the name of the dynamic linker (LC_LOAD_DYLINKER). And a dynamic linker - * contains a dylinker_command to identify the dynamic linker (LC_ID_DYLINKER). - * A file can have at most one of these. - * This struct is also used for the LC_DYLD_ENVIRONMENT load command and - * contains string for dyld to treat like environment variable. - */ -struct dylinker_command { - uint32_t cmd; /* LC_ID_DYLINKER, LC_LOAD_DYLINKER or - LC_DYLD_ENVIRONMENT */ - uint32_t cmdsize; /* includes pathname string */ - union lc_str name; /* dynamic linker's path name */ -}; - -/* - * Thread commands contain machine-specific data structures suitable for - * use in the thread state primitives. The machine specific data structures - * follow the struct thread_command as follows. - * Each flavor of machine specific data structure is preceded by an unsigned - * long constant for the flavor of that data structure, an uint32_t - * that is the count of longs of the size of the state data structure and then - * the state data structure follows. This triple may be repeated for many - * flavors. The constants for the flavors, counts and state data structure - * definitions are expected to be in the header file <machine/thread_status.h>. - * These machine specific data structures sizes must be multiples of - * 4 bytes The cmdsize reflects the total size of the thread_command - * and all of the sizes of the constants for the flavors, counts and state - * data structures. - * - * For executable objects that are unix processes there will be one - * thread_command (cmd == LC_UNIXTHREAD) created for it by the link-editor. - * This is the same as a LC_THREAD, except that a stack is automatically - * created (based on the shell's limit for the stack size). Command arguments - * and environment variables are copied onto that stack. - */ -struct thread_command { - uint32_t cmd; /* LC_THREAD or LC_UNIXTHREAD */ - uint32_t cmdsize; /* total size of this command */ - /* uint32_t flavor flavor of thread state */ - /* uint32_t count count of longs in thread state */ - /* struct XXX_thread_state state thread state for this flavor */ - /* ... */ -}; - -/* - * The routines command contains the address of the dynamic shared library - * initialization routine and an index into the module table for the module - * that defines the routine. Before any modules are used from the library the - * dynamic linker fully binds the module that defines the initialization routine - * and then calls it. This gets called before any module initialization - * routines (used for C++ static constructors) in the library. - */ -struct routines_command { /* for 32-bit architectures */ - uint32_t cmd; /* LC_ROUTINES */ - uint32_t cmdsize; /* total size of this command */ - uint32_t init_address; /* address of initialization routine */ - uint32_t init_module; /* index into the module table that */ - /* the init routine is defined in */ - uint32_t reserved1; - uint32_t reserved2; - uint32_t reserved3; - uint32_t reserved4; - uint32_t reserved5; - uint32_t reserved6; -}; - -/* - * The 64-bit routines command. Same use as above. - */ -struct routines_command_64 { /* for 64-bit architectures */ - uint32_t cmd; /* LC_ROUTINES_64 */ - uint32_t cmdsize; /* total size of this command */ - uint64_t init_address; /* address of initialization routine */ - uint64_t init_module; /* index into the module table that */ - /* the init routine is defined in */ - uint64_t reserved1; - uint64_t reserved2; - uint64_t reserved3; - uint64_t reserved4; - uint64_t reserved5; - uint64_t reserved6; -}; - -/* - * The symtab_command contains the offsets and sizes of the link-edit 4.3BSD - * "stab" style symbol table information as described in the header files - * <nlist.h> and <stab.h>. - */ -struct symtab_command { - uint32_t cmd; /* LC_SYMTAB */ - uint32_t cmdsize; /* sizeof(struct symtab_command) */ - uint32_t symoff; /* symbol table offset */ - uint32_t nsyms; /* number of symbol table entries */ - uint32_t stroff; /* string table offset */ - uint32_t strsize; /* string table size in bytes */ -}; - -/* - * This is the second set of the symbolic information which is used to support - * the data structures for the dynamically link editor. - * - * The original set of symbolic information in the symtab_command which contains - * the symbol and string tables must also be present when this load command is - * present. When this load command is present the symbol table is organized - * into three groups of symbols: - * local symbols (static and debugging symbols) - grouped by module - * defined external symbols - grouped by module (sorted by name if not lib) - * undefined external symbols (sorted by name if MH_BINDATLOAD is not set, - * and in order the were seen by the static - * linker if MH_BINDATLOAD is set) - * In this load command there are offsets and counts to each of the three groups - * of symbols. - * - * This load command contains a the offsets and sizes of the following new - * symbolic information tables: - * table of contents - * module table - * reference symbol table - * indirect symbol table - * The first three tables above (the table of contents, module table and - * reference symbol table) are only present if the file is a dynamically linked - * shared library. For executable and object modules, which are files - * containing only one module, the information that would be in these three - * tables is determined as follows: - * table of contents - the defined external symbols are sorted by name - * module table - the file contains only one module so everything in the - * file is part of the module. - * reference symbol table - is the defined and undefined external symbols - * - * For dynamically linked shared library files this load command also contains - * offsets and sizes to the pool of relocation entries for all sections - * separated into two groups: - * external relocation entries - * local relocation entries - * For executable and object modules the relocation entries continue to hang - * off the section structures. - */ -struct dysymtab_command { - uint32_t cmd; /* LC_DYSYMTAB */ - uint32_t cmdsize; /* sizeof(struct dysymtab_command) */ - - /* - * The symbols indicated by symoff and nsyms of the LC_SYMTAB load command - * are grouped into the following three groups: - * local symbols (further grouped by the module they are from) - * defined external symbols (further grouped by the module they are from) - * undefined symbols - * - * The local symbols are used only for debugging. The dynamic binding - * process may have to use them to indicate to the debugger the local - * symbols for a module that is being bound. - * - * The last two groups are used by the dynamic binding process to do the - * binding (indirectly through the module table and the reference symbol - * table when this is a dynamically linked shared library file). - */ - uint32_t ilocalsym; /* index to local symbols */ - uint32_t nlocalsym; /* number of local symbols */ - - uint32_t iextdefsym;/* index to externally defined symbols */ - uint32_t nextdefsym;/* number of externally defined symbols */ - - uint32_t iundefsym; /* index to undefined symbols */ - uint32_t nundefsym; /* number of undefined symbols */ - - /* - * For the for the dynamic binding process to find which module a symbol - * is defined in the table of contents is used (analogous to the ranlib - * structure in an archive) which maps defined external symbols to modules - * they are defined in. This exists only in a dynamically linked shared - * library file. For executable and object modules the defined external - * symbols are sorted by name and is use as the table of contents. - */ - uint32_t tocoff; /* file offset to table of contents */ - uint32_t ntoc; /* number of entries in table of contents */ - - /* - * To support dynamic binding of "modules" (whole object files) the symbol - * table must reflect the modules that the file was created from. This is - * done by having a module table that has indexes and counts into the merged - * tables for each module. The module structure that these two entries - * refer to is described below. This exists only in a dynamically linked - * shared library file. For executable and object modules the file only - * contains one module so everything in the file belongs to the module. - */ - uint32_t modtaboff; /* file offset to module table */ - uint32_t nmodtab; /* number of module table entries */ - - /* - * To support dynamic module binding the module structure for each module - * indicates the external references (defined and undefined) each module - * makes. For each module there is an offset and a count into the - * reference symbol table for the symbols that the module references. - * This exists only in a dynamically linked shared library file. For - * executable and object modules the defined external symbols and the - * undefined external symbols indicates the external references. - */ - uint32_t extrefsymoff; /* offset to referenced symbol table */ - uint32_t nextrefsyms; /* number of referenced symbol table entries */ - - /* - * The sections that contain "symbol pointers" and "routine stubs" have - * indexes and (implied counts based on the size of the section and fixed - * size of the entry) into the "indirect symbol" table for each pointer - * and stub. For every section of these two types the index into the - * indirect symbol table is stored in the section header in the field - * reserved1. An indirect symbol table entry is simply a 32bit index into - * the symbol table to the symbol that the pointer or stub is referring to. - * The indirect symbol table is ordered to match the entries in the section. - */ - uint32_t indirectsymoff; /* file offset to the indirect symbol table */ - uint32_t nindirectsyms; /* number of indirect symbol table entries */ - - /* - * To support relocating an individual module in a library file quickly the - * external relocation entries for each module in the library need to be - * accessed efficiently. Since the relocation entries can't be accessed - * through the section headers for a library file they are separated into - * groups of local and external entries further grouped by module. In this - * case the presents of this load command who's extreloff, nextrel, - * locreloff and nlocrel fields are non-zero indicates that the relocation - * entries of non-merged sections are not referenced through the section - * structures (and the reloff and nreloc fields in the section headers are - * set to zero). - * - * Since the relocation entries are not accessed through the section headers - * this requires the r_address field to be something other than a section - * offset to identify the item to be relocated. In this case r_address is - * set to the offset from the vmaddr of the first LC_SEGMENT command. - * For MH_SPLIT_SEGS images r_address is set to the the offset from the - * vmaddr of the first read-write LC_SEGMENT command. - * - * The relocation entries are grouped by module and the module table - * entries have indexes and counts into them for the group of external - * relocation entries for that the module. - * - * For sections that are merged across modules there must not be any - * remaining external relocation entries for them (for merged sections - * remaining relocation entries must be local). - */ - uint32_t extreloff; /* offset to external relocation entries */ - uint32_t nextrel; /* number of external relocation entries */ - - /* - * All the local relocation entries are grouped together (they are not - * grouped by their module since they are only used if the object is moved - * from it staticly link edited address). - */ - uint32_t locreloff; /* offset to local relocation entries */ - uint32_t nlocrel; /* number of local relocation entries */ - -}; - -/* - * An indirect symbol table entry is simply a 32bit index into the symbol table - * to the symbol that the pointer or stub is refering to. Unless it is for a - * non-lazy symbol pointer section for a defined symbol which strip(1) as - * removed. In which case it has the value INDIRECT_SYMBOL_LOCAL. If the - * symbol was also absolute INDIRECT_SYMBOL_ABS is or'ed with that. - */ -#define INDIRECT_SYMBOL_LOCAL 0x80000000 -#define INDIRECT_SYMBOL_ABS 0x40000000 - - -/* a table of contents entry */ -struct dylib_table_of_contents { - uint32_t symbol_index; /* the defined external symbol - (index into the symbol table) */ - uint32_t module_index; /* index into the module table this symbol - is defined in */ -}; - -/* a module table entry */ -struct dylib_module { - uint32_t module_name; /* the module name (index into string table) */ - - uint32_t iextdefsym; /* index into externally defined symbols */ - uint32_t nextdefsym; /* number of externally defined symbols */ - uint32_t irefsym; /* index into reference symbol table */ - uint32_t nrefsym; /* number of reference symbol table entries */ - uint32_t ilocalsym; /* index into symbols for local symbols */ - uint32_t nlocalsym; /* number of local symbols */ - - uint32_t iextrel; /* index into external relocation entries */ - uint32_t nextrel; /* number of external relocation entries */ - - uint32_t iinit_iterm; /* low 16 bits are the index into the init - section, high 16 bits are the index into - the term section */ - uint32_t ninit_nterm; /* low 16 bits are the number of init section - entries, high 16 bits are the number of - term section entries */ - - uint32_t /* for this module address of the start of */ - objc_module_info_addr; /* the (__OBJC,__module_info) section */ - uint32_t /* for this module size of */ - objc_module_info_size; /* the (__OBJC,__module_info) section */ -}; - -/* a 64-bit module table entry */ -struct dylib_module_64 { - uint32_t module_name; /* the module name (index into string table) */ - - uint32_t iextdefsym; /* index into externally defined symbols */ - uint32_t nextdefsym; /* number of externally defined symbols */ - uint32_t irefsym; /* index into reference symbol table */ - uint32_t nrefsym; /* number of reference symbol table entries */ - uint32_t ilocalsym; /* index into symbols for local symbols */ - uint32_t nlocalsym; /* number of local symbols */ - - uint32_t iextrel; /* index into external relocation entries */ - uint32_t nextrel; /* number of external relocation entries */ - - uint32_t iinit_iterm; /* low 16 bits are the index into the init - section, high 16 bits are the index into - the term section */ - uint32_t ninit_nterm; /* low 16 bits are the number of init section - entries, high 16 bits are the number of - term section entries */ - - uint32_t /* for this module size of */ - objc_module_info_size; /* the (__OBJC,__module_info) section */ - uint64_t /* for this module address of the start of */ - objc_module_info_addr; /* the (__OBJC,__module_info) section */ -}; - -/* - * The entries in the reference symbol table are used when loading the module - * (both by the static and dynamic link editors) and if the module is unloaded - * or replaced. Therefore all external symbols (defined and undefined) are - * listed in the module's reference table. The flags describe the type of - * reference that is being made. The constants for the flags are defined in - * <mach-o/nlist.h> as they are also used for symbol table entries. - */ -struct dylib_reference { - uint32_t isym:24, /* index into the symbol table */ - flags:8; /* flags to indicate the type of reference */ -}; - -/* - * The twolevel_hints_command contains the offset and number of hints in the - * two-level namespace lookup hints table. - */ -struct twolevel_hints_command { - uint32_t cmd; /* LC_TWOLEVEL_HINTS */ - uint32_t cmdsize; /* sizeof(struct twolevel_hints_command) */ - uint32_t offset; /* offset to the hint table */ - uint32_t nhints; /* number of hints in the hint table */ -}; - -/* - * The entries in the two-level namespace lookup hints table are twolevel_hint - * structs. These provide hints to the dynamic link editor where to start - * looking for an undefined symbol in a two-level namespace image. The - * isub_image field is an index into the sub-images (sub-frameworks and - * sub-umbrellas list) that made up the two-level image that the undefined - * symbol was found in when it was built by the static link editor. If - * isub-image is 0 the the symbol is expected to be defined in library and not - * in the sub-images. If isub-image is non-zero it is an index into the array - * of sub-images for the umbrella with the first index in the sub-images being - * 1. The array of sub-images is the ordered list of sub-images of the umbrella - * that would be searched for a symbol that has the umbrella recorded as its - * primary library. The table of contents index is an index into the - * library's table of contents. This is used as the starting point of the - * binary search or a directed linear search. - */ -struct twolevel_hint { - uint32_t - isub_image:8, /* index into the sub images */ - itoc:24; /* index into the table of contents */ -}; - -/* - * The prebind_cksum_command contains the value of the original check sum for - * prebound files or zero. When a prebound file is first created or modified - * for other than updating its prebinding information the value of the check sum - * is set to zero. When the file has it prebinding re-done and if the value of - * the check sum is zero the original check sum is calculated and stored in - * cksum field of this load command in the output file. If when the prebinding - * is re-done and the cksum field is non-zero it is left unchanged from the - * input file. - */ -struct prebind_cksum_command { - uint32_t cmd; /* LC_PREBIND_CKSUM */ - uint32_t cmdsize; /* sizeof(struct prebind_cksum_command) */ - uint32_t cksum; /* the check sum or zero */ -}; - -/* - * The uuid load command contains a single 128-bit unique random number that - * identifies an object produced by the static link editor. - */ -struct uuid_command { - uint32_t cmd; /* LC_UUID */ - uint32_t cmdsize; /* sizeof(struct uuid_command) */ - uint8_t uuid[16]; /* the 128-bit uuid */ -}; - -/* - * The rpath_command contains a path which at runtime should be added to - * the current run path used to find @rpath prefixed dylibs. - */ -struct rpath_command { - uint32_t cmd; /* LC_RPATH */ - uint32_t cmdsize; /* includes string */ - union lc_str path; /* path to add to run path */ -}; - -/* - * The linkedit_data_command contains the offsets and sizes of a blob - * of data in the __LINKEDIT segment. - */ -struct linkedit_data_command { - uint32_t cmd; /* LC_CODE_SIGNATURE, LC_SEGMENT_SPLIT_INFO, - or LC_FUNCTION_STARTS */ - uint32_t cmdsize; /* sizeof(struct linkedit_data_command) */ - uint32_t dataoff; /* file offset of data in __LINKEDIT segment */ - uint32_t datasize; /* file size of data in __LINKEDIT segment */ -}; - -/* - * The encryption_info_command contains the file offset and size of an - * of an encrypted segment. - */ -struct encryption_info_command { - uint32_t cmd; /* LC_ENCRYPTION_INFO */ - uint32_t cmdsize; /* sizeof(struct encryption_info_command) */ - uint32_t cryptoff; /* file offset of encrypted range */ - uint32_t cryptsize; /* file size of encrypted range */ - uint32_t cryptid; /* which enryption system, - 0 means not-encrypted yet */ -}; - -/* - * The version_min_command contains the min OS version on which this - * binary was built to run. - */ -struct version_min_command { - uint32_t cmd; /* LC_VERSION_MIN_MACOSX or - LC_VERSION_MIN_IPHONEOS */ - uint32_t cmdsize; /* sizeof(struct min_version_command) */ - uint32_t version; /* X.Y.Z is encoded in nibbles xxxx.yy.zz */ - uint32_t reserved; /* zero */ -}; - -/* - * The dyld_info_command contains the file offsets and sizes of - * the new compressed form of the information dyld needs to - * load the image. This information is used by dyld on Mac OS X - * 10.6 and later. All information pointed to by this command - * is encoded using byte streams, so no endian swapping is needed - * to interpret it. - */ -struct dyld_info_command { - uint32_t cmd; /* LC_DYLD_INFO or LC_DYLD_INFO_ONLY */ - uint32_t cmdsize; /* sizeof(struct dyld_info_command) */ - - /* - * Dyld rebases an image whenever dyld loads it at an address different - * from its preferred address. The rebase information is a stream - * of byte sized opcodes whose symbolic names start with REBASE_OPCODE_. - * Conceptually the rebase information is a table of tuples: - * <seg-index, seg-offset, type> - * The opcodes are a compressed way to encode the table by only - * encoding when a column changes. In addition simple patterns - * like "every n'th offset for m times" can be encoded in a few - * bytes. - */ - uint32_t rebase_off; /* file offset to rebase info */ - uint32_t rebase_size; /* size of rebase info */ - - /* - * Dyld binds an image during the loading process, if the image - * requires any pointers to be initialized to symbols in other images. - * The bind information is a stream of byte sized - * opcodes whose symbolic names start with BIND_OPCODE_. - * Conceptually the bind information is a table of tuples: - * <seg-index, seg-offset, type, symbol-library-ordinal, symbol-name, addend> - * The opcodes are a compressed way to encode the table by only - * encoding when a column changes. In addition simple patterns - * like for runs of pointers initialzed to the same value can be - * encoded in a few bytes. - */ - uint32_t bind_off; /* file offset to binding info */ - uint32_t bind_size; /* size of binding info */ - - /* - * Some C++ programs require dyld to unique symbols so that all - * images in the process use the same copy of some code/data. - * This step is done after binding. The content of the weak_bind - * info is an opcode stream like the bind_info. But it is sorted - * alphabetically by symbol name. This enable dyld to walk - * all images with weak binding information in order and look - * for collisions. If there are no collisions, dyld does - * no updating. That means that some fixups are also encoded - * in the bind_info. For instance, all calls to "operator new" - * are first bound to libstdc++.dylib using the information - * in bind_info. Then if some image overrides operator new - * that is detected when the weak_bind information is processed - * and the call to operator new is then rebound. - */ - uint32_t weak_bind_off; /* file offset to weak binding info */ - uint32_t weak_bind_size; /* size of weak binding info */ - - /* - * Some uses of external symbols do not need to be bound immediately. - * Instead they can be lazily bound on first use. The lazy_bind - * are contains a stream of BIND opcodes to bind all lazy symbols. - * Normal use is that dyld ignores the lazy_bind section when - * loading an image. Instead the static linker arranged for the - * lazy pointer to initially point to a helper function which - * pushes the offset into the lazy_bind area for the symbol - * needing to be bound, then jumps to dyld which simply adds - * the offset to lazy_bind_off to get the information on what - * to bind. - */ - uint32_t lazy_bind_off; /* file offset to lazy binding info */ - uint32_t lazy_bind_size; /* size of lazy binding infs */ - - /* - * The symbols exported by a dylib are encoded in a trie. This - * is a compact representation that factors out common prefixes. - * It also reduces LINKEDIT pages in RAM because it encodes all - * information (name, address, flags) in one small, contiguous range. - * The export area is a stream of nodes. The first node sequentially - * is the start node for the trie. - * - * Nodes for a symbol start with a uleb128 that is the length of - * the exported symbol information for the string so far. - * If there is no exported symbol, the node starts with a zero byte. - * If there is exported info, it follows the length. First is - * a uleb128 containing flags. Normally, it is followed by a - * uleb128 encoded offset which is location of the content named - * by the symbol from the mach_header for the image. If the flags - * is EXPORT_SYMBOL_FLAGS_REEXPORT, then following the flags is - * a uleb128 encoded library ordinal, then a zero terminated - * UTF8 string. If the string is zero length, then the symbol - * is re-export from the specified dylib with the same name. - * - * After the optional exported symbol information is a byte of - * how many edges (0-255) that this node has leaving it, - * followed by each edge. - * Each edge is a zero terminated UTF8 of the addition chars - * in the symbol, followed by a uleb128 offset for the node that - * edge points to. - * - */ - uint32_t export_off; /* file offset to lazy binding info */ - uint32_t export_size; /* size of lazy binding infs */ -}; - -/* - * The following are used to encode rebasing information - */ -#define REBASE_TYPE_POINTER 1 -#define REBASE_TYPE_TEXT_ABSOLUTE32 2 -#define REBASE_TYPE_TEXT_PCREL32 3 - -#define REBASE_OPCODE_MASK 0xF0 -#define REBASE_IMMEDIATE_MASK 0x0F -#define REBASE_OPCODE_DONE 0x00 -#define REBASE_OPCODE_SET_TYPE_IMM 0x10 -#define REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB 0x20 -#define REBASE_OPCODE_ADD_ADDR_ULEB 0x30 -#define REBASE_OPCODE_ADD_ADDR_IMM_SCALED 0x40 -#define REBASE_OPCODE_DO_REBASE_IMM_TIMES 0x50 -#define REBASE_OPCODE_DO_REBASE_ULEB_TIMES 0x60 -#define REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB 0x70 -#define REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB 0x80 - - -/* - * The following are used to encode binding information - */ -#define BIND_TYPE_POINTER 1 -#define BIND_TYPE_TEXT_ABSOLUTE32 2 -#define BIND_TYPE_TEXT_PCREL32 3 - -#define BIND_SPECIAL_DYLIB_SELF 0 -#define BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE -1 -#define BIND_SPECIAL_DYLIB_FLAT_LOOKUP -2 - -#define BIND_SYMBOL_FLAGS_WEAK_IMPORT 0x1 -#define BIND_SYMBOL_FLAGS_NON_WEAK_DEFINITION 0x8 - -#define BIND_OPCODE_MASK 0xF0 -#define BIND_IMMEDIATE_MASK 0x0F -#define BIND_OPCODE_DONE 0x00 -#define BIND_OPCODE_SET_DYLIB_ORDINAL_IMM 0x10 -#define BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB 0x20 -#define BIND_OPCODE_SET_DYLIB_SPECIAL_IMM 0x30 -#define BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM 0x40 -#define BIND_OPCODE_SET_TYPE_IMM 0x50 -#define BIND_OPCODE_SET_ADDEND_SLEB 0x60 -#define BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB 0x70 -#define BIND_OPCODE_ADD_ADDR_ULEB 0x80 -#define BIND_OPCODE_DO_BIND 0x90 -#define BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB 0xA0 -#define BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED 0xB0 -#define BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB 0xC0 - - -/* - * The following are used on the flags byte of a terminal node - * in the export information. - */ -#define EXPORT_SYMBOL_FLAGS_KIND_MASK 0x03 -#define EXPORT_SYMBOL_FLAGS_KIND_REGULAR 0x00 -#define EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL 0x01 -#define EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION 0x04 -#define EXPORT_SYMBOL_FLAGS_REEXPORT 0x08 -#define EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER 0x10 - -/* - * The symseg_command contains the offset and size of the GNU style - * symbol table information as described in the header file <symseg.h>. - * The symbol roots of the symbol segments must also be aligned properly - * in the file. So the requirement of keeping the offsets aligned to a - * multiple of a 4 bytes translates to the length field of the symbol - * roots also being a multiple of a long. Also the padding must again be - * zeroed. (THIS IS OBSOLETE and no longer supported). - */ -struct symseg_command { - uint32_t cmd; /* LC_SYMSEG */ - uint32_t cmdsize; /* sizeof(struct symseg_command) */ - uint32_t offset; /* symbol segment offset */ - uint32_t size; /* symbol segment size in bytes */ -}; - -/* - * The ident_command contains a free format string table following the - * ident_command structure. The strings are null terminated and the size of - * the command is padded out with zero bytes to a multiple of 4 bytes/ - * (THIS IS OBSOLETE and no longer supported). - */ -struct ident_command { - uint32_t cmd; /* LC_IDENT */ - uint32_t cmdsize; /* strings that follow this command */ -}; - -/* - * The fvmfile_command contains a reference to a file to be loaded at the - * specified virtual address. (Presently, this command is reserved for - * internal use. The kernel ignores this command when loading a program into - * memory). - */ -struct fvmfile_command { - uint32_t cmd; /* LC_FVMFILE */ - uint32_t cmdsize; /* includes pathname string */ - union lc_str name; /* files pathname */ - uint32_t header_addr; /* files virtual address */ -}; - -/* - * Sections of type S_THREAD_LOCAL_VARIABLES contain an array - * of tlv_descriptor structures. - */ -struct tlv_descriptor -{ - void* (*thunk)(struct tlv_descriptor*); - unsigned long key; - unsigned long offset; -}; - -#endif /* _MACHO_LOADER_H_ */ diff --git a/i386/include/mach-o/nlist.h b/i386/include/mach-o/nlist.h deleted file mode 100644 index 1c19410..0000000 --- a/i386/include/mach-o/nlist.h +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _MACHO_NLIST_H_ -#define _MACHO_NLIST_H_ -/* $NetBSD: nlist.h,v 1.5 1994/10/26 00:56:11 cgd Exp $ */ - -/*- - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)nlist.h 8.2 (Berkeley) 1/21/94 - */ -#include <stdint.h> - -/* - * Format of a symbol table entry of a Mach-O file for 32-bit architectures. - * Modified from the BSD format. The modifications from the original format - * were changing n_other (an unused field) to n_sect and the addition of the - * N_SECT type. These modifications are required to support symbols in a larger - * number of sections not just the three sections (text, data and bss) in a BSD - * file. - */ -struct nlist { - union { -#ifndef __LP64__ - char *n_name; /* for use when in-core */ -#endif - int32_t n_strx; /* index into the string table */ - } n_un; - uint8_t n_type; /* type flag, see below */ - uint8_t n_sect; /* section number or NO_SECT */ - int16_t n_desc; /* see <mach-o/stab.h> */ - uint32_t n_value; /* value of this symbol (or stab offset) */ -}; - -/* - * This is the symbol table entry structure for 64-bit architectures. - */ -struct nlist_64 { - union { - uint32_t n_strx; /* index into the string table */ - } n_un; - uint8_t n_type; /* type flag, see below */ - uint8_t n_sect; /* section number or NO_SECT */ - uint16_t n_desc; /* see <mach-o/stab.h> */ - uint64_t n_value; /* value of this symbol (or stab offset) */ -}; - -/* - * Symbols with a index into the string table of zero (n_un.n_strx == 0) are - * defined to have a null, "", name. Therefore all string indexes to non null - * names must not have a zero string index. This is bit historical information - * that has never been well documented. - */ - -/* - * The n_type field really contains four fields: - * unsigned char N_STAB:3, - * N_PEXT:1, - * N_TYPE:3, - * N_EXT:1; - * which are used via the following masks. - */ -#define N_STAB 0xe0 /* if any of these bits set, a symbolic debugging entry */ -#define N_PEXT 0x10 /* private external symbol bit */ -#define N_TYPE 0x0e /* mask for the type bits */ -#define N_EXT 0x01 /* external symbol bit, set for external symbols */ - -/* - * Only symbolic debugging entries have some of the N_STAB bits set and if any - * of these bits are set then it is a symbolic debugging entry (a stab). In - * which case then the values of the n_type field (the entire field) are given - * in <mach-o/stab.h> - */ - -/* - * Values for N_TYPE bits of the n_type field. - */ -#define N_UNDF 0x0 /* undefined, n_sect == NO_SECT */ -#define N_ABS 0x2 /* absolute, n_sect == NO_SECT */ -#define N_SECT 0xe /* defined in section number n_sect */ -#define N_PBUD 0xc /* prebound undefined (defined in a dylib) */ -#define N_INDR 0xa /* indirect */ - -/* - * If the type is N_INDR then the symbol is defined to be the same as another - * symbol. In this case the n_value field is an index into the string table - * of the other symbol's name. When the other symbol is defined then they both - * take on the defined type and value. - */ - -/* - * If the type is N_SECT then the n_sect field contains an ordinal of the - * section the symbol is defined in. The sections are numbered from 1 and - * refer to sections in order they appear in the load commands for the file - * they are in. This means the same ordinal may very well refer to different - * sections in different files. - * - * The n_value field for all symbol table entries (including N_STAB's) gets - * updated by the link editor based on the value of it's n_sect field and where - * the section n_sect references gets relocated. If the value of the n_sect - * field is NO_SECT then it's n_value field is not changed by the link editor. - */ -#define NO_SECT 0 /* symbol is not in any section */ -#define MAX_SECT 255 /* 1 thru 255 inclusive */ - -/* - * Common symbols are represented by undefined (N_UNDF) external (N_EXT) types - * who's values (n_value) are non-zero. In which case the value of the n_value - * field is the size (in bytes) of the common symbol. The n_sect field is set - * to NO_SECT. The alignment of a common symbol may be set as a power of 2 - * between 2^1 and 2^15 as part of the n_desc field using the macros below. If - * the alignment is not set (a value of zero) then natural alignment based on - * the size is used. - */ -#define GET_COMM_ALIGN(n_desc) (((n_desc) >> 8) & 0x0f) -#define SET_COMM_ALIGN(n_desc,align) \ - (n_desc) = (((n_desc) & 0xf0ff) | (((align) & 0x0f) << 8)) - -/* - * To support the lazy binding of undefined symbols in the dynamic link-editor, - * the undefined symbols in the symbol table (the nlist structures) are marked - * with the indication if the undefined reference is a lazy reference or - * non-lazy reference. If both a non-lazy reference and a lazy reference is - * made to the same symbol the non-lazy reference takes precedence. A reference - * is lazy only when all references to that symbol are made through a symbol - * pointer in a lazy symbol pointer section. - * - * The implementation of marking nlist structures in the symbol table for - * undefined symbols will be to use some of the bits of the n_desc field as a - * reference type. The mask REFERENCE_TYPE will be applied to the n_desc field - * of an nlist structure for an undefined symbol to determine the type of - * undefined reference (lazy or non-lazy). - * - * The constants for the REFERENCE FLAGS are propagated to the reference table - * in a shared library file. In that case the constant for a defined symbol, - * REFERENCE_FLAG_DEFINED, is also used. - */ -/* Reference type bits of the n_desc field of undefined symbols */ -#define REFERENCE_TYPE 0x7 -/* types of references */ -#define REFERENCE_FLAG_UNDEFINED_NON_LAZY 0 -#define REFERENCE_FLAG_UNDEFINED_LAZY 1 -#define REFERENCE_FLAG_DEFINED 2 -#define REFERENCE_FLAG_PRIVATE_DEFINED 3 -#define REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY 4 -#define REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY 5 - -/* - * To simplify stripping of objects that use are used with the dynamic link - * editor, the static link editor marks the symbols defined an object that are - * referenced by a dynamicly bound object (dynamic shared libraries, bundles). - * With this marking strip knows not to strip these symbols. - */ -#define REFERENCED_DYNAMICALLY 0x0010 - -/* - * For images created by the static link editor with the -twolevel_namespace - * option in effect the flags field of the mach header is marked with - * MH_TWOLEVEL. And the binding of the undefined references of the image are - * determined by the static link editor. Which library an undefined symbol is - * bound to is recorded by the static linker in the high 8 bits of the n_desc - * field using the SET_LIBRARY_ORDINAL macro below. The ordinal recorded - * references the libraries listed in the Mach-O's LC_LOAD_DYLIB, - * LC_LOAD_WEAK_DYLIB, LC_REEXPORT_DYLIB, LC_LOAD_UPWARD_DYLIB, and - * LC_LAZY_LOAD_DYLIB, etc. load commands in the order they appear in the - * headers. The library ordinals start from 1. - * For a dynamic library that is built as a two-level namespace image the - * undefined references from module defined in another use the same nlist struct - * an in that case SELF_LIBRARY_ORDINAL is used as the library ordinal. For - * defined symbols in all images they also must have the library ordinal set to - * SELF_LIBRARY_ORDINAL. The EXECUTABLE_ORDINAL refers to the executable - * image for references from plugins that refer to the executable that loads - * them. - * - * The DYNAMIC_LOOKUP_ORDINAL is for undefined symbols in a two-level namespace - * image that are looked up by the dynamic linker with flat namespace semantics. - * This ordinal was added as a feature in Mac OS X 10.3 by reducing the - * value of MAX_LIBRARY_ORDINAL by one. So it is legal for existing binaries - * or binaries built with older tools to have 0xfe (254) dynamic libraries. In - * this case the ordinal value 0xfe (254) must be treated as a library ordinal - * for compatibility. - */ -#define GET_LIBRARY_ORDINAL(n_desc) (((n_desc) >> 8) & 0xff) -#define SET_LIBRARY_ORDINAL(n_desc,ordinal) \ - (n_desc) = (((n_desc) & 0x00ff) | (((ordinal) & 0xff) << 8)) -#define SELF_LIBRARY_ORDINAL 0x0 -#define MAX_LIBRARY_ORDINAL 0xfd -#define DYNAMIC_LOOKUP_ORDINAL 0xfe -#define EXECUTABLE_ORDINAL 0xff - -/* - * The bit 0x0020 of the n_desc field is used for two non-overlapping purposes - * and has two different symbolic names, N_NO_DEAD_STRIP and N_DESC_DISCARDED. - */ - -/* - * The N_NO_DEAD_STRIP bit of the n_desc field only ever appears in a - * relocatable .o file (MH_OBJECT filetype). And is used to indicate to the - * static link editor it is never to dead strip the symbol. - */ -#define N_NO_DEAD_STRIP 0x0020 /* symbol is not to be dead stripped */ - -/* - * The N_DESC_DISCARDED bit of the n_desc field never appears in linked image. - * But is used in very rare cases by the dynamic link editor to mark an in - * memory symbol as discared and longer used for linking. - */ -#define N_DESC_DISCARDED 0x0020 /* symbol is discarded */ - -/* - * The N_WEAK_REF bit of the n_desc field indicates to the dynamic linker that - * the undefined symbol is allowed to be missing and is to have the address of - * zero when missing. - */ -#define N_WEAK_REF 0x0040 /* symbol is weak referenced */ - -/* - * The N_WEAK_DEF bit of the n_desc field indicates to the static and dynamic - * linkers that the symbol definition is weak, allowing a non-weak symbol to - * also be used which causes the weak definition to be discared. Currently this - * is only supported for symbols in coalesed sections. - */ -#define N_WEAK_DEF 0x0080 /* coalesed symbol is a weak definition */ - -/* - * The N_REF_TO_WEAK bit of the n_desc field indicates to the dynamic linker - * that the undefined symbol should be resolved using flat namespace searching. - */ -#define N_REF_TO_WEAK 0x0080 /* reference to a weak symbol */ - -/* - * The N_ARM_THUMB_DEF bit of the n_desc field indicates that the symbol is - * a defintion of a Thumb function. - */ -#define N_ARM_THUMB_DEF 0x0008 /* symbol is a Thumb function (ARM) */ - -/* - * The N_SYMBOL_RESOLVER bit of the n_desc field indicates that the - * that the function is actually a resolver function and should - * be called to get the address of the real function to use. - * This bit is only available in .o files (MH_OBJECT filetype) - */ -#define N_SYMBOL_RESOLVER 0x0100 - -#ifndef __STRICT_BSD__ -#if __cplusplus -extern "C" { -#endif /* __cplusplus */ -/* - * The function nlist(3) from the C library. - */ -extern int nlist (const char *filename, struct nlist *list); -#if __cplusplus -} -#endif /* __cplusplus */ -#endif /* __STRICT_BSD__ */ - -#endif /* _MACHO_LIST_H_ */ diff --git a/i386/include/mach-o/ranlib.h b/i386/include/mach-o/ranlib.h deleted file mode 100644 index 66a1f09..0000000 --- a/i386/include/mach-o/ranlib.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* ranlib.h 4.1 83/05/03 */ -#ifndef _MACH_O_RANLIB_H_ -#define _MACH_O_RANLIB_H_ - -#include <stdint.h> -#include <sys/types.h> /* off_t */ - -/* - * There are two known orders of table of contents for archives. The first is - * the order ranlib(1) originally produced and still produces without any - * options. This table of contents has the archive member name "__.SYMDEF" - * This order has the ranlib structures in the order the objects appear in the - * archive and the symbol names of those objects in the order of symbol table. - * The second know order is sorted by symbol name and is produced with the -s - * option to ranlib(1). This table of contents has the archive member name - * "__.SYMDEF SORTED" and many programs (notably the 1.0 version of ld(1) can't - * tell the difference between names because of the imbedded blank in the name - * and works with either table of contents). This second order is used by the - * post 1.0 link editor to produce faster linking. The original 1.0 version of - * ranlib(1) gets confused when it is run on a archive with the second type of - * table of contents because it and ar(1) which it uses use different ways to - * determined the member name (ar(1) treats all blanks in the name as - * significant and ranlib(1) only checks for the first one). - */ -#define SYMDEF "__.SYMDEF" -#define SYMDEF_SORTED "__.SYMDEF SORTED" - -/* - * Structure of the __.SYMDEF table of contents for an archive. - * __.SYMDEF begins with a long giving the size in bytes of the ranlib - * structures which immediately follow, and then continues with a string - * table consisting of a long giving the number of bytes of strings which - * follow and then the strings themselves. The ran_strx fields index the - * string table whose first byte is numbered 0. - */ -struct ranlib { - union { - uint32_t ran_strx; /* string table index of */ -#ifndef __LP64__ - char *ran_name; /* symbol defined by */ -#endif - } ran_un; - uint32_t ran_off; /* library member at this offset */ -}; -#endif /* _MACH_O_RANLIB_H_ */ diff --git a/i386/include/mach-o/reloc.h b/i386/include/mach-o/reloc.h deleted file mode 100644 index d5741ef..0000000 --- a/i386/include/mach-o/reloc.h +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* $NetBSD: exec.h,v 1.6 1994/10/27 04:16:05 cgd Exp $ */ - -/* - * Copyright (c) 1993 Christopher G. Demetriou - * 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 author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. - */ - -#ifndef _MACHO_RELOC_H_ -#define _MACHO_RELOC_H_ -#include <stdint.h> - -/* - * Format of a relocation entry of a Mach-O file. Modified from the 4.3BSD - * format. The modifications from the original format were changing the value - * of the r_symbolnum field for "local" (r_extern == 0) relocation entries. - * This modification is required to support symbols in an arbitrary number of - * sections not just the three sections (text, data and bss) in a 4.3BSD file. - * Also the last 4 bits have had the r_type tag added to them. - */ -struct relocation_info { - int32_t r_address; /* offset in the section to what is being - relocated */ - uint32_t r_symbolnum:24, /* symbol index if r_extern == 1 or section - ordinal if r_extern == 0 */ - r_pcrel:1, /* was relocated pc relative already */ - r_length:2, /* 0=byte, 1=word, 2=long, 3=quad */ - r_extern:1, /* does not include value of sym referenced */ - r_type:4; /* if not 0, machine specific relocation type */ -}; -#define R_ABS 0 /* absolute relocation type for Mach-O files */ - -/* - * The r_address is not really the address as it's name indicates but an offset. - * In 4.3BSD a.out objects this offset is from the start of the "segment" for - * which relocation entry is for (text or data). For Mach-O object files it is - * also an offset but from the start of the "section" for which the relocation - * entry is for. See comments in <mach-o/loader.h> about the r_address feild - * in images for used with the dynamic linker. - * - * In 4.3BSD a.out objects if r_extern is zero then r_symbolnum is an ordinal - * for the segment the symbol being relocated is in. These ordinals are the - * symbol types N_TEXT, N_DATA, N_BSS or N_ABS. In Mach-O object files these - * ordinals refer to the sections in the object file in the order their section - * structures appear in the headers of the object file they are in. The first - * section has the ordinal 1, the second 2, and so on. This means that the - * same ordinal in two different object files could refer to two different - * sections. And further could have still different ordinals when combined - * by the link-editor. The value R_ABS is used for relocation entries for - * absolute symbols which need no further relocation. - */ - -/* - * For RISC machines some of the references are split across two instructions - * and the instruction does not contain the complete value of the reference. - * In these cases a second, or paired relocation entry, follows each of these - * relocation entries, using a PAIR r_type, which contains the other part of the - * reference not contained in the instruction. This other part is stored in the - * pair's r_address field. The exact number of bits of the other part of the - * reference store in the r_address field is dependent on the particular - * relocation type for the particular architecture. - */ - -/* - * To make scattered loading by the link editor work correctly "local" - * relocation entries can't be used when the item to be relocated is the value - * of a symbol plus an offset (where the resulting expresion is outside the - * block the link editor is moving, a blocks are divided at symbol addresses). - * In this case. where the item is a symbol value plus offset, the link editor - * needs to know more than just the section the symbol was defined. What is - * needed is the actual value of the symbol without the offset so it can do the - * relocation correctly based on where the value of the symbol got relocated to - * not the value of the expression (with the offset added to the symbol value). - * So for the NeXT 2.0 release no "local" relocation entries are ever used when - * there is a non-zero offset added to a symbol. The "external" and "local" - * relocation entries remain unchanged. - * - * The implemention is quite messy given the compatibility with the existing - * relocation entry format. The ASSUMPTION is that a section will never be - * bigger than 2**24 - 1 (0x00ffffff or 16,777,215) bytes. This assumption - * allows the r_address (which is really an offset) to fit in 24 bits and high - * bit of the r_address field in the relocation_info structure to indicate - * it is really a scattered_relocation_info structure. Since these are only - * used in places where "local" relocation entries are used and not where - * "external" relocation entries are used the r_extern field has been removed. - * - * For scattered loading to work on a RISC machine where some of the references - * are split across two instructions the link editor needs to be assured that - * each reference has a unique 32 bit reference (that more than one reference is - * NOT sharing the same high 16 bits for example) so it move each referenced - * item independent of each other. Some compilers guarantees this but the - * compilers don't so scattered loading can be done on those that do guarantee - * this. - */ -#if defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__) -/* - * The reason for the ifdef's of __BIG_ENDIAN__ and __LITTLE_ENDIAN__ are that - * when stattered relocation entries were added the mistake of using a mask - * against a structure that is made up of bit fields was used. To make this - * design work this structure must be laid out in memory the same way so the - * mask can be applied can check the same bit each time (r_scattered). - */ -#endif /* defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__) */ -#define R_SCATTERED 0x80000000 /* mask to be applied to the r_address field - of a relocation_info structure to tell that - is is really a scattered_relocation_info - stucture */ -struct scattered_relocation_info { -#ifdef __BIG_ENDIAN__ - uint32_t r_scattered:1, /* 1=scattered, 0=non-scattered (see above) */ - r_pcrel:1, /* was relocated pc relative already */ - r_length:2, /* 0=byte, 1=word, 2=long, 3=quad */ - r_type:4, /* if not 0, machine specific relocation type */ - r_address:24; /* offset in the section to what is being - relocated */ - int32_t r_value; /* the value the item to be relocated is - refering to (without any offset added) */ -#endif /* __BIG_ENDIAN__ */ -#ifdef __LITTLE_ENDIAN__ - uint32_t - r_address:24, /* offset in the section to what is being - relocated */ - r_type:4, /* if not 0, machine specific relocation type */ - r_length:2, /* 0=byte, 1=word, 2=long, 3=quad */ - r_pcrel:1, /* was relocated pc relative already */ - r_scattered:1; /* 1=scattered, 0=non-scattered (see above) */ - int32_t r_value; /* the value the item to be relocated is - refering to (without any offset added) */ -#endif /* __LITTLE_ENDIAN__ */ -}; - -/* - * Relocation types used in a generic implementation. Relocation entries for - * normal things use the generic relocation as discribed above and their r_type - * is GENERIC_RELOC_VANILLA (a value of zero). - * - * Another type of generic relocation, GENERIC_RELOC_SECTDIFF, is to support - * the difference of two symbols defined in different sections. That is the - * expression "symbol1 - symbol2 + constant" is a relocatable expression when - * both symbols are defined in some section. For this type of relocation the - * both relocations entries are scattered relocation entries. The value of - * symbol1 is stored in the first relocation entry's r_value field and the - * value of symbol2 is stored in the pair's r_value field. - * - * A special case for a prebound lazy pointer is needed to beable to set the - * value of the lazy pointer back to its non-prebound state. This is done - * using the GENERIC_RELOC_PB_LA_PTR r_type. This is a scattered relocation - * entry where the r_value feild is the value of the lazy pointer not prebound. - */ -enum reloc_type_generic -{ - GENERIC_RELOC_VANILLA, /* generic relocation as discribed above */ - GENERIC_RELOC_PAIR, /* Only follows a GENERIC_RELOC_SECTDIFF */ - GENERIC_RELOC_SECTDIFF, - GENERIC_RELOC_PB_LA_PTR, /* prebound lazy pointer */ - GENERIC_RELOC_LOCAL_SECTDIFF, - GENERIC_RELOC_TLV /* thread local variables */ -}; - -#endif /* _MACHO_RELOC_H_ */ diff --git a/i386/include/mach-o/stab.h b/i386/include/mach-o/stab.h deleted file mode 100644 index e9e15b2..0000000 --- a/i386/include/mach-o/stab.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _MACHO_STAB_H_ -#define _MACHO_STAB_H_ -/* $NetBSD: stab.h,v 1.4 1994/10/26 00:56:25 cgd Exp $ */ - -/*- - * Copyright (c) 1991 The Regents of the University of California. - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)stab.h 5.2 (Berkeley) 4/4/91 - */ - -/* - * This file gives definitions supplementing <nlist.h> for permanent symbol - * table entries of Mach-O files. Modified from the BSD definitions. The - * modifications from the original definitions were changing what the values of - * what was the n_other field (an unused field) which is now the n_sect field. - * These modifications are required to support symbols in an arbitrary number of - * sections not just the three sections (text, data and bss) in a BSD file. - * The values of the defined constants have NOT been changed. - * - * These must have one of the N_STAB bits on. The n_value fields are subject - * to relocation according to the value of their n_sect field. So for types - * that refer to things in sections the n_sect field must be filled in with the - * proper section ordinal. For types that are not to have their n_value field - * relocatated the n_sect field must be NO_SECT. - */ - -/* - * Symbolic debugger symbols. The comments give the conventional use for - * - * .stabs "n_name", n_type, n_sect, n_desc, n_value - * - * where n_type is the defined constant and not listed in the comment. Other - * fields not listed are zero. n_sect is the section ordinal the entry is - * refering to. - */ -#define N_GSYM 0x20 /* global symbol: name,,NO_SECT,type,0 */ -#define N_FNAME 0x22 /* procedure name (f77 kludge): name,,NO_SECT,0,0 */ -#define N_FUN 0x24 /* procedure: name,,n_sect,linenumber,address */ -#define N_STSYM 0x26 /* static symbol: name,,n_sect,type,address */ -#define N_LCSYM 0x28 /* .lcomm symbol: name,,n_sect,type,address */ -#define N_BNSYM 0x2e /* begin nsect sym: 0,,n_sect,0,address */ -#define N_OPT 0x3c /* emitted with gcc2_compiled and in gcc source */ -#define N_RSYM 0x40 /* register sym: name,,NO_SECT,type,register */ -#define N_SLINE 0x44 /* src line: 0,,n_sect,linenumber,address */ -#define N_ENSYM 0x4e /* end nsect sym: 0,,n_sect,0,address */ -#define N_SSYM 0x60 /* structure elt: name,,NO_SECT,type,struct_offset */ -#define N_SO 0x64 /* source file name: name,,n_sect,0,address */ -#define N_OSO 0x66 /* object file name: name,,0,0,st_mtime */ -#define N_LSYM 0x80 /* local sym: name,,NO_SECT,type,offset */ -#define N_BINCL 0x82 /* include file beginning: name,,NO_SECT,0,sum */ -#define N_SOL 0x84 /* #included file name: name,,n_sect,0,address */ -#define N_PARAMS 0x86 /* compiler parameters: name,,NO_SECT,0,0 */ -#define N_VERSION 0x88 /* compiler version: name,,NO_SECT,0,0 */ -#define N_OLEVEL 0x8A /* compiler -O level: name,,NO_SECT,0,0 */ -#define N_PSYM 0xa0 /* parameter: name,,NO_SECT,type,offset */ -#define N_EINCL 0xa2 /* include file end: name,,NO_SECT,0,0 */ -#define N_ENTRY 0xa4 /* alternate entry: name,,n_sect,linenumber,address */ -#define N_LBRAC 0xc0 /* left bracket: 0,,NO_SECT,nesting level,address */ -#define N_EXCL 0xc2 /* deleted include file: name,,NO_SECT,0,sum */ -#define N_RBRAC 0xe0 /* right bracket: 0,,NO_SECT,nesting level,address */ -#define N_BCOMM 0xe2 /* begin common: name,,NO_SECT,0,0 */ -#define N_ECOMM 0xe4 /* end common: name,,n_sect,0,0 */ -#define N_ECOML 0xe8 /* end common (local name): 0,,n_sect,0,address */ -#define N_LENG 0xfe /* second stab entry with length information */ - -/* - * for the berkeley pascal compiler, pc(1): - */ -#define N_PC 0x30 /* global pascal symbol: name,,NO_SECT,subtype,line */ - -#endif /* _MACHO_STAB_H_ */ diff --git a/i386/include/mach-o/swap.h b/i386/include/mach-o/swap.h deleted file mode 100644 index ba10994..0000000 --- a/i386/include/mach-o/swap.h +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _MACH_O_SWAP_H_ -#define _MACH_O_SWAP_H_ - -#include <stdint.h> -#include <architecture/byte_order.h> -#include <mach-o/fat.h> -#include <mach-o/loader.h> -#include <mach-o/nlist.h> -#include <mach-o/reloc.h> -#include <mach-o/ranlib.h> - -#if __cplusplus -extern "C" { -#endif /* __cplusplus */ - -extern void swap_fat_header( - struct fat_header *fat_header, - enum NXByteOrder target_byte_order); - -extern void swap_fat_arch( - struct fat_arch *fat_archs, - uint32_t nfat_arch, - enum NXByteOrder target_byte_order); - -extern void swap_mach_header( - struct mach_header *mh, - enum NXByteOrder target_byte_order); - -extern void swap_mach_header_64( - struct mach_header_64 *mh, - enum NXByteOrder target_byte_order); - -extern void swap_load_command( - struct load_command *lc, - enum NXByteOrder target_byte_order); - -extern void swap_segment_command( - struct segment_command *sg, - enum NXByteOrder target_byte_order); - -extern void swap_segment_command_64( - struct segment_command_64 *sg, - enum NXByteOrder target_byte_order); - -extern void swap_section( - struct section *s, - uint32_t nsects, - enum NXByteOrder target_byte_order); - -extern void swap_section_64( - struct section_64 *s, - uint32_t nsects, - enum NXByteOrder target_byte_order); - -extern void swap_symtab_command( - struct symtab_command *st, - enum NXByteOrder target_byte_order); - -extern void swap_dysymtab_command( - struct dysymtab_command *dyst, - enum NXByteOrder target_byte_sex); - -extern void swap_symseg_command( - struct symseg_command *ss, - enum NXByteOrder target_byte_order); - -extern void swap_fvmlib_command( - struct fvmlib_command *fl, - enum NXByteOrder target_byte_order); - -extern void swap_dylib_command( - struct dylib_command *dl, - enum NXByteOrder target_byte_sex); - -extern void swap_sub_framework_command( - struct sub_framework_command *sub, - enum NXByteOrder target_byte_sex); - -extern void swap_sub_umbrella_command( - struct sub_umbrella_command *usub, - enum NXByteOrder target_byte_sex); - -extern void swap_sub_library_command( - struct sub_library_command *lsub, - enum NXByteOrder target_byte_sex); - -extern void swap_sub_client_command( - struct sub_client_command *csub, - enum NXByteOrder target_byte_sex); - -extern void swap_prebound_dylib_command( - struct prebound_dylib_command *pbdylib, - enum NXByteOrder target_byte_sex); - -extern void swap_dylinker_command( - struct dylinker_command *dyld, - enum NXByteOrder target_byte_sex); - -extern void swap_fvmfile_command( - struct fvmfile_command *ff, - enum NXByteOrder target_byte_order); - -extern void swap_thread_command( - struct thread_command *ut, - enum NXByteOrder target_byte_order); - -extern void swap_ident_command( - struct ident_command *ident, - enum NXByteOrder target_byte_order); - -extern void swap_routines_command( - struct routines_command *r_cmd, - enum NXByteOrder target_byte_sex); - -extern void swap_routines_command_64( - struct routines_command_64 *r_cmd, - enum NXByteOrder target_byte_sex); - -extern void swap_twolevel_hints_command( - struct twolevel_hints_command *hints_cmd, - enum NXByteOrder target_byte_sex); - -extern void swap_prebind_cksum_command( - struct prebind_cksum_command *cksum_cmd, - enum NXByteOrder target_byte_sex); - -extern void swap_uuid_command( - struct uuid_command *uuid_cmd, - enum NXByteOrder target_byte_sex); - -extern void swap_twolevel_hint( - struct twolevel_hint *hints, - uint32_t nhints, - enum NXByteOrder target_byte_sex); - -extern void swap_nlist( - struct nlist *symbols, - uint32_t nsymbols, - enum NXByteOrder target_byte_order); - -extern void swap_nlist_64( - struct nlist_64 *symbols, - uint32_t nsymbols, - enum NXByteOrder target_byte_order); - -extern void swap_ranlib( - struct ranlib *ranlibs, - uint32_t nranlibs, - enum NXByteOrder target_byte_order); - -extern void swap_relocation_info( - struct relocation_info *relocs, - uint32_t nrelocs, - enum NXByteOrder target_byte_order); - -extern void swap_indirect_symbols( - uint32_t *indirect_symbols, - uint32_t nindirect_symbols, - enum NXByteOrder target_byte_sex); - -extern void swap_dylib_reference( - struct dylib_reference *refs, - uint32_t nrefs, - enum NXByteOrder target_byte_sex); - -extern void swap_dylib_module( - struct dylib_module *mods, - uint32_t nmods, - enum NXByteOrder target_byte_sex); - -extern void swap_dylib_module_64( - struct dylib_module_64 *mods, - uint32_t nmods, - enum NXByteOrder target_byte_sex); - -extern void swap_dylib_table_of_contents( - struct dylib_table_of_contents *tocs, - uint32_t ntocs, - enum NXByteOrder target_byte_sex); - -#if __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _MACH_O_SWAP_H_ */ diff --git a/i386/include/mach/audit_triggers.defs b/i386/include/mach/audit_triggers.defs deleted file mode 100644 index 1d6e279..0000000 --- a/i386/include/mach/audit_triggers.defs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2004-2008, Apple Inc. All rights reserved. - * - * @APPLE_BSD_LICENSE_HEADER_START@ - * - * 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. Neither the name of Apple Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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. - * - * @APPLE_BSD_LICENSE_HEADER_END@ -*/ - -/* - * Interface definition for the audit logging facility. - */ - -subsystem -#if KERNEL_USER - KernelUser -#endif /* KERNEL_USER */ - audit_triggers 123; - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> - -simpleroutine audit_triggers( - audit_port : mach_port_t; - in flags : int); - diff --git a/i386/include/mach/boolean.h b/i386/include/mach/boolean.h deleted file mode 100644 index 641c396..0000000 --- a/i386/include/mach/boolean.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/boolean.h - * - * Boolean data type. - * - */ - -#ifndef _MACH_BOOLEAN_H_ -#define _MACH_BOOLEAN_H_ - -/* - * Pick up "boolean_t" type definition - */ - -#ifndef ASSEMBLER -#include <mach/machine/boolean.h> -#endif /* ASSEMBLER */ - -/* - * Define TRUE and FALSE if not defined. - */ - -#ifndef TRUE -#define TRUE 1 -#endif /* TRUE */ - -#ifndef FALSE -#define FALSE 0 -#endif /* FALSE */ - -#endif /* _MACH_BOOLEAN_H_ */ diff --git a/i386/include/mach/bootstrap.h b/i386/include/mach/bootstrap.h deleted file mode 100644 index 67667c3..0000000 --- a/i386/include/mach/bootstrap.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Mach bootstrap interfaces (obsolete: header included only for compatibility) - */ -#ifndef _MACH_BOOTSTRAP_H_ -#define _MACH_BOOTSTRAP_H_ - -#endif /* _MACH_BOOTSTRAP_H_ */ diff --git a/i386/include/mach/clock.defs b/i386/include/mach/clock.defs deleted file mode 100644 index 440042c..0000000 --- a/i386/include/mach/clock.defs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * File: mach/clock.defs - * Purpose: Kernel clock subsystem definitions. This - * file defines the clock request interface. - */ - -subsystem -#if KERNEL_SERVER - KernelServer -#endif /* KERNEL_SERVER */ - clock 1000; - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> -#include <mach/clock_types.defs> - -/* - * References to clock objects are returned by: - * host_get_clock_service(host_t,...) - * host_get_clock_control(host_priv_t,...) - Priviledged subclass - */ - -/* - * Get the clock time. - * Available to all. - */ -routine clock_get_time( - clock_serv : clock_serv_t; - out cur_time : mach_timespec_t); - -/* - * Get clock attributes. - * Available to all. - */ -routine clock_get_attributes( - clock_serv : clock_serv_t; - in flavor : clock_flavor_t; - out clock_attr : clock_attr_t, CountInOut); - -/* - * Setup a clock alarm. - * Available to all. - */ -routine clock_alarm( - clock_serv : clock_serv_t; - alarm_type : alarm_type_t; - alarm_time : mach_timespec_t; - alarm_port : clock_reply_t = - MACH_MSG_TYPE_MAKE_SEND_ONCE|polymorphic); - -/* vim: set ft=c : */ diff --git a/i386/include/mach/clock.h b/i386/include/mach/clock.h deleted file mode 100644 index 948b489..0000000 --- a/i386/include/mach/clock.h +++ /dev/null @@ -1,221 +0,0 @@ -#ifndef _clock_user_ -#define _clock_user_ - -/* Module clock */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef clock_MSG_COUNT -#define clock_MSG_COUNT 3 -#endif /* clock_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mach_types.h> -#include <mach/mach_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine clock_get_time */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t clock_get_time -( - clock_serv_t clock_serv, - mach_timespec_t *cur_time -); - -/* Routine clock_get_attributes */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t clock_get_attributes -( - clock_serv_t clock_serv, - clock_flavor_t flavor, - clock_attr_t clock_attr, - mach_msg_type_number_t *clock_attrCnt -); - -/* Routine clock_alarm */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t clock_alarm -( - clock_serv_t clock_serv, - alarm_type_t alarm_type, - mach_timespec_t alarm_time, - clock_reply_t alarm_port -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__clock_subsystem__defined -#define __Request__clock_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__clock_get_time_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - clock_flavor_t flavor; - mach_msg_type_number_t clock_attrCnt; - } __Request__clock_get_attributes_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t alarm_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - alarm_type_t alarm_type; - mach_timespec_t alarm_time; - } __Request__clock_alarm_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__clock_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__clock_subsystem__defined -#define __RequestUnion__clock_subsystem__defined -union __RequestUnion__clock_subsystem { - __Request__clock_get_time_t Request_clock_get_time; - __Request__clock_get_attributes_t Request_clock_get_attributes; - __Request__clock_alarm_t Request_clock_alarm; -}; -#endif /* !__RequestUnion__clock_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__clock_subsystem__defined -#define __Reply__clock_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_timespec_t cur_time; - } __Reply__clock_get_time_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t clock_attrCnt; - int clock_attr[1]; - } __Reply__clock_get_attributes_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__clock_alarm_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__clock_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__clock_subsystem__defined -#define __ReplyUnion__clock_subsystem__defined -union __ReplyUnion__clock_subsystem { - __Reply__clock_get_time_t Reply_clock_get_time; - __Reply__clock_get_attributes_t Reply_clock_get_attributes; - __Reply__clock_alarm_t Reply_clock_alarm; -}; -#endif /* !__RequestUnion__clock_subsystem__defined */ - -#ifndef subsystem_to_name_map_clock -#define subsystem_to_name_map_clock \ - { "clock_get_time", 1000 },\ - { "clock_get_attributes", 1001 },\ - { "clock_alarm", 1002 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _clock_user_ */ diff --git a/i386/include/mach/clock_priv.defs b/i386/include/mach/clock_priv.defs deleted file mode 100644 index b3854a4..0000000 --- a/i386/include/mach/clock_priv.defs +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * File: mach/clock_priv.defs - * Purpose: Kernel clock subsystem definitions. This - * file defines the clock request interface. - */ - -subsystem -#if KERNEL_SERVER - KernelServer -#endif /* KERNEL_SERVER */ - clock_priv 1200; - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> -#include <mach/clock_types.defs> - -/* - * References to clock_priv objects are returned by: - * host_get_clock_control(host_priv_t,...) - Priviledged subclass - */ - -/* - * Set the clock time. - * Privileged. - */ -routine clock_set_time( - clock_ctrl : clock_ctrl_t; - new_time : mach_timespec_t); - -/* - * Set clock attributes. - * Privileged. - */ -routine clock_set_attributes( - clock_ctrl : clock_ctrl_t; - in flavor : clock_flavor_t; - in clock_attr : clock_attr_t); - -/* vim: set ft=c : */ diff --git a/i386/include/mach/clock_priv.h b/i386/include/mach/clock_priv.h deleted file mode 100644 index 8a38935..0000000 --- a/i386/include/mach/clock_priv.h +++ /dev/null @@ -1,175 +0,0 @@ -#ifndef _clock_priv_user_ -#define _clock_priv_user_ - -/* Module clock_priv */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef clock_priv_MSG_COUNT -#define clock_priv_MSG_COUNT 2 -#endif /* clock_priv_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mach_types.h> -#include <mach/mach_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine clock_set_time */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t clock_set_time -( - clock_ctrl_t clock_ctrl, - mach_timespec_t new_time -); - -/* Routine clock_set_attributes */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t clock_set_attributes -( - clock_ctrl_t clock_ctrl, - clock_flavor_t flavor, - clock_attr_t clock_attr, - mach_msg_type_number_t clock_attrCnt -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__clock_priv_subsystem__defined -#define __Request__clock_priv_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_timespec_t new_time; - } __Request__clock_set_time_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - clock_flavor_t flavor; - mach_msg_type_number_t clock_attrCnt; - int clock_attr[1]; - } __Request__clock_set_attributes_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__clock_priv_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__clock_priv_subsystem__defined -#define __RequestUnion__clock_priv_subsystem__defined -union __RequestUnion__clock_priv_subsystem { - __Request__clock_set_time_t Request_clock_set_time; - __Request__clock_set_attributes_t Request_clock_set_attributes; -}; -#endif /* !__RequestUnion__clock_priv_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__clock_priv_subsystem__defined -#define __Reply__clock_priv_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__clock_set_time_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__clock_set_attributes_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__clock_priv_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__clock_priv_subsystem__defined -#define __ReplyUnion__clock_priv_subsystem__defined -union __ReplyUnion__clock_priv_subsystem { - __Reply__clock_set_time_t Reply_clock_set_time; - __Reply__clock_set_attributes_t Reply_clock_set_attributes; -}; -#endif /* !__RequestUnion__clock_priv_subsystem__defined */ - -#ifndef subsystem_to_name_map_clock_priv -#define subsystem_to_name_map_clock_priv \ - { "clock_set_time", 1200 },\ - { "clock_set_attributes", 1201 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _clock_priv_user_ */ diff --git a/i386/include/mach/clock_reply.defs b/i386/include/mach/clock_reply.defs deleted file mode 100644 index 9646f90..0000000 --- a/i386/include/mach/clock_reply.defs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * File: clock_reply.defs - * Purpose: Kernel clock subsystem definitions. This - * file defines the clock reply interface. - */ - -subsystem -#if KERNEL_USER - KernelUser -#endif /* KERNEL_USER */ - clock_reply 3125107; /* Matches up with old value */ - -#include <mach/std_types.defs> -#include <mach/clock_types.defs> - - -/* - * Reply routine for clock_alarm. - */ -simpleroutine clock_alarm_reply( - alarm_port : clock_reply_t; - alarm_code : kern_return_t; - alarm_type : alarm_type_t; - alarm_time : mach_timespec_t); - -/* vim: set ft=c : */ diff --git a/i386/include/mach/clock_reply.h b/i386/include/mach/clock_reply.h deleted file mode 100644 index d0cf150..0000000 --- a/i386/include/mach/clock_reply.h +++ /dev/null @@ -1,136 +0,0 @@ -#ifndef _clock_reply_user_ -#define _clock_reply_user_ - -/* Module clock_reply */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef clock_reply_MSG_COUNT -#define clock_reply_MSG_COUNT 1 -#endif /* clock_reply_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mach_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* SimpleRoutine clock_alarm_reply */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t clock_alarm_reply -( - clock_reply_t alarm_port, - mach_msg_type_name_t alarm_portPoly, - kern_return_t alarm_code, - alarm_type_t alarm_type, - mach_timespec_t alarm_time -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__clock_reply_subsystem__defined -#define __Request__clock_reply_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t alarm_code; - alarm_type_t alarm_type; - mach_timespec_t alarm_time; - } __Request__clock_alarm_reply_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__clock_reply_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__clock_reply_subsystem__defined -#define __RequestUnion__clock_reply_subsystem__defined -union __RequestUnion__clock_reply_subsystem { - __Request__clock_alarm_reply_t Request_clock_alarm_reply; -}; -#endif /* !__RequestUnion__clock_reply_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__clock_reply_subsystem__defined -#define __Reply__clock_reply_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__clock_alarm_reply_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__clock_reply_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__clock_reply_subsystem__defined -#define __ReplyUnion__clock_reply_subsystem__defined -union __ReplyUnion__clock_reply_subsystem { - __Reply__clock_alarm_reply_t Reply_clock_alarm_reply; -}; -#endif /* !__RequestUnion__clock_reply_subsystem__defined */ - -#ifndef subsystem_to_name_map_clock_reply -#define subsystem_to_name_map_clock_reply \ - { "clock_alarm_reply", 3125107 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _clock_reply_user_ */ diff --git a/i386/include/mach/clock_types.defs b/i386/include/mach/clock_types.defs deleted file mode 100644 index 4dbacfc..0000000 --- a/i386/include/mach/clock_types.defs +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * File: clock_types.defs - * Purpose: - * Clock kernel interface type declarations - */ - -#ifndef _MACH_CLOCK_TYPES_DEFS_ -#define _MACH_CLOCK_TYPES_DEFS_ - -#include <mach/std_types.defs> - -type clock_serv_t = mach_port_t - cusertype: clock_serv_t -#if KERNEL_SERVER - intran: clock_serv_t convert_port_to_clock(mach_port_t) - outtran: mach_port_t convert_clock_to_port(clock_serv_t) -#endif /* KERNEL_SERVER */ - ; - -type clock_ctrl_t = mach_port_t - cusertype: clock_ctrl_t -#if KERNEL_SERVER - intran: clock_ctrl_t convert_port_to_clock_ctrl(mach_port_t) - outtran: mach_port_t convert_clock_ctrl_to_port(clock_ctrl_t) -#endif /* KERNEL_SERVER */ - ; - -type clock_reply_t = polymorphic|MACH_MSG_TYPE_MAKE_SEND_ONCE; - -type clock_flavor_t = int; -type clock_attr_t = array[*:1] of int; -type mach_timespec_t = struct[2] of int; -type time_t = int; -type sleep_type_t = int; -type alarm_type_t = int; -type clock_res_t = int; -type clock_id_t = int; - -import <mach/mach_types.h>; - -#endif /* _MACH_CLOCK_TYPES_DEFS_ */ - -/* vim: set ft=c : */ diff --git a/i386/include/mach/clock_types.h b/i386/include/mach/clock_types.h deleted file mode 100644 index 12035da..0000000 --- a/i386/include/mach/clock_types.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * File: clock_types.h - * Purpose: Clock facility header definitions. These - * definitons are needed by both kernel and - * user-level software. - */ - -/* - * All interfaces defined here are obsolete. - */ - -#ifndef _MACH_CLOCK_TYPES_H_ -#define _MACH_CLOCK_TYPES_H_ - -#include <stdint.h> -#include <mach/time_value.h> - -/* - * Type definitions. - */ -typedef int alarm_type_t; /* alarm time type */ -typedef int sleep_type_t; /* sleep time type */ -typedef int clock_id_t; /* clock identification type */ -typedef int clock_flavor_t; /* clock flavor type */ -typedef int *clock_attr_t; /* clock attribute type */ -typedef int clock_res_t; /* clock resolution type */ - -/* - * Normal time specification used by the kernel clock facility. - */ -struct mach_timespec { - unsigned int tv_sec; /* seconds */ - clock_res_t tv_nsec; /* nanoseconds */ -}; -typedef struct mach_timespec mach_timespec_t; - -/* - * Reserved clock id values for default clocks. - */ -#define SYSTEM_CLOCK 0 -#define CALENDAR_CLOCK 1 - -#define REALTIME_CLOCK 0 - -/* - * Attribute names. - */ -#define CLOCK_GET_TIME_RES 1 /* get_time call resolution */ -/* 2 * was map_time call resolution */ -#define CLOCK_ALARM_CURRES 3 /* current alarm resolution */ -#define CLOCK_ALARM_MINRES 4 /* minimum alarm resolution */ -#define CLOCK_ALARM_MAXRES 5 /* maximum alarm resolution */ - -#define NSEC_PER_USEC 1000 /* nanoseconds per microsecond */ -#define USEC_PER_SEC 1000000 /* microseconds per second */ -#define NSEC_PER_SEC 1000000000 /* nanoseconds per second */ - -#define BAD_MACH_TIMESPEC(t) \ - ((t)->tv_nsec < 0 || (t)->tv_nsec >= NSEC_PER_SEC) - -/* t1 <=> t2, also (t1 - t2) in nsec with max of +- 1 sec */ -#define CMP_MACH_TIMESPEC(t1, t2) \ - ((t1)->tv_sec > (t2)->tv_sec ? +NSEC_PER_SEC : \ - ((t1)->tv_sec < (t2)->tv_sec ? -NSEC_PER_SEC : \ - (t1)->tv_nsec - (t2)->tv_nsec)) - -/* t1 += t2 */ -#define ADD_MACH_TIMESPEC(t1, t2) \ - do { \ - if (((t1)->tv_nsec += (t2)->tv_nsec) >= NSEC_PER_SEC) { \ - (t1)->tv_nsec -= NSEC_PER_SEC; \ - (t1)->tv_sec += 1; \ - } \ - (t1)->tv_sec += (t2)->tv_sec; \ - } while (0) - -/* t1 -= t2 */ -#define SUB_MACH_TIMESPEC(t1, t2) \ - do { \ - if (((t1)->tv_nsec -= (t2)->tv_nsec) < 0) { \ - (t1)->tv_nsec += NSEC_PER_SEC; \ - (t1)->tv_sec -= 1; \ - } \ - (t1)->tv_sec -= (t2)->tv_sec; \ - } while (0) - -/* - * Alarm parameter defines. - */ -#define ALRMTYPE 0xff /* type (8-bit field) */ -#define TIME_ABSOLUTE 0x00 /* absolute time */ -#define TIME_RELATIVE 0x01 /* relative time */ - -#define BAD_ALRMTYPE(t) (((t) &~ TIME_RELATIVE) != 0) - -#endif /* _MACH_CLOCK_TYPES_H_ */ diff --git a/i386/include/mach/error.h b/i386/include/mach/error.h deleted file mode 100644 index a32eaee..0000000 --- a/i386/include/mach/error.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/error.h - * Purpose: - * error module definitions - * - */ - -#ifndef _MACH_ERROR_H_ -#define _MACH_ERROR_H_ - -#include <mach/kern_return.h> - -/* - * error number layout as follows: - * - * hi lo - * | system(6) | subsystem(12) | code(14) | - */ - - -#define err_none (mach_error_t)0 -#define ERR_SUCCESS (mach_error_t)0 -#define ERR_ROUTINE_NIL (mach_error_fn_t)0 - - -#define err_system(x) (((x)&0x3f)<<26) -#define err_sub(x) (((x)&0xfff)<<14) - -#define err_get_system(err) (((err)>>26)&0x3f) -#define err_get_sub(err) (((err)>>14)&0xfff) -#define err_get_code(err) ((err)&0x3fff) - -#define system_emask (err_system(0x3f)) -#define sub_emask (err_sub(0xfff)) -#define code_emask (0x3fff) - - -/* major error systems */ -#define err_kern err_system(0x0) /* kernel */ -#define err_us err_system(0x1) /* user space library */ -#define err_server err_system(0x2) /* user space servers */ -#define err_ipc err_system(0x3) /* old ipc errors */ -#define err_mach_ipc err_system(0x4) /* mach-ipc errors */ -#define err_dipc err_system(0x7) /* distributed ipc */ -#define err_local err_system(0x3e) /* user defined errors */ -#define err_ipc_compat err_system(0x3f) /* (compatibility) mach-ipc errors */ - -#define err_max_system 0x3f - - -/* unix errors get lumped into one subsystem */ -#define unix_err(errno) (err_kern|err_sub(3)|errno) - -typedef kern_return_t mach_error_t; -typedef mach_error_t (* mach_error_fn_t)( void ); - -#endif /* _MACH_ERROR_H_ */ diff --git a/i386/include/mach/exc.defs b/i386/include/mach/exc.defs deleted file mode 100644 index de6aee7..0000000 --- a/i386/include/mach/exc.defs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * Abstract: - * MiG definitions file for Mach exception interface. - */ - -subsystem -#if KERNEL_USER - KernelUser -#endif - exc 2401; - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> - -ServerPrefix catch_; - -type exception_data_t = array[*:2] of integer_t; -type exception_type_t = int; - -routine exception_raise( -#if KERNEL_USER - exception_port : mach_port_move_send_t; - thread : mach_port_move_send_t; - task : mach_port_move_send_t; -#else /* KERNEL_USER */ - exception_port : mach_port_t; - thread : mach_port_t; - task : mach_port_t; -#endif /* KERNEL_USER */ - exception : exception_type_t; - code : exception_data_t - ); - -routine exception_raise_state( -#if KERNEL_USER - exception_port : mach_port_move_send_t; -#else /* KERNEL_USER */ - exception_port : mach_port_t; -#endif /* KERNEL_USER */ - exception : exception_type_t; - code : exception_data_t, const; - inout flavor : int; - old_state : thread_state_t, const; - out new_state : thread_state_t); - -routine exception_raise_state_identity( -#if KERNEL_USER - exception_port : mach_port_move_send_t; - thread : mach_port_move_send_t; - task : mach_port_move_send_t; -#else /* KERNEL_USER */ - exception_port : mach_port_t; - thread : mach_port_t; - task : mach_port_t; -#endif /* KERNEL_USER */ - exception : exception_type_t; - code : exception_data_t; - inout flavor : int; - old_state : thread_state_t; - out new_state : thread_state_t); - -/* vim: set ft=c : */ diff --git a/i386/include/mach/exc.h b/i386/include/mach/exc.h deleted file mode 100644 index 3987a6e..0000000 --- a/i386/include/mach/exc.h +++ /dev/null @@ -1,257 +0,0 @@ -#ifndef _exc_user_ -#define _exc_user_ - -/* Module exc */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef exc_MSG_COUNT -#define exc_MSG_COUNT 3 -#endif /* exc_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mach_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine exception_raise */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t exception_raise -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t codeCnt -); - -/* Routine exception_raise_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t exception_raise_state -( - mach_port_t exception_port, - exception_type_t exception, - const exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - const thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -/* Routine exception_raise_state_identity */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t exception_raise_state_identity -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__exc_subsystem__defined -#define __Request__exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - } __Request__exception_raise_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Request__exception_raise_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Request__exception_raise_state_identity_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__exc_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__exc_subsystem__defined -#define __RequestUnion__exc_subsystem__defined -union __RequestUnion__exc_subsystem { - __Request__exception_raise_t Request_exception_raise; - __Request__exception_raise_state_t Request_exception_raise_state; - __Request__exception_raise_state_identity_t Request_exception_raise_state_identity; -}; -#endif /* !__RequestUnion__exc_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__exc_subsystem__defined -#define __Reply__exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__exception_raise_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Reply__exception_raise_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Reply__exception_raise_state_identity_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__exc_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__exc_subsystem__defined -#define __ReplyUnion__exc_subsystem__defined -union __ReplyUnion__exc_subsystem { - __Reply__exception_raise_t Reply_exception_raise; - __Reply__exception_raise_state_t Reply_exception_raise_state; - __Reply__exception_raise_state_identity_t Reply_exception_raise_state_identity; -}; -#endif /* !__RequestUnion__exc_subsystem__defined */ - -#ifndef subsystem_to_name_map_exc -#define subsystem_to_name_map_exc \ - { "exception_raise", 2401 },\ - { "exception_raise_state", 2402 },\ - { "exception_raise_state_identity", 2403 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _exc_user_ */ diff --git a/i386/include/mach/exception.h b/i386/include/mach/exception.h deleted file mode 100644 index e7d5d23..0000000 --- a/i386/include/mach/exception.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ - -#ifndef _MACH_EXCEPTION_H_ -#define _MACH_EXCEPTION_H_ - -#include <mach/exception_types.h> - -#endif /* _MACH_EXCEPTION_H_ */ diff --git a/i386/include/mach/exception_types.h b/i386/include/mach/exception_types.h deleted file mode 100644 index 642cbe2..0000000 --- a/i386/include/mach/exception_types.h +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ - -#ifndef _MACH_EXCEPTION_TYPES_H_ -#define _MACH_EXCEPTION_TYPES_H_ - -#include <mach/machine/exception.h> - -/* - * Machine-independent exception definitions. - */ - -#define EXC_BAD_ACCESS 1 /* Could not access memory */ - /* Code contains kern_return_t describing error. */ - /* Subcode contains bad memory address. */ - -#define EXC_BAD_INSTRUCTION 2 /* Instruction failed */ - /* Illegal or undefined instruction or operand */ - -#define EXC_ARITHMETIC 3 /* Arithmetic exception */ - /* Exact nature of exception is in code field */ - -#define EXC_EMULATION 4 /* Emulation instruction */ - /* Emulation support instruction encountered */ - /* Details in code and subcode fields */ - -#define EXC_SOFTWARE 5 /* Software generated exception */ - /* Exact exception is in code field. */ - /* Codes 0 - 0xFFFF reserved to hardware */ - /* Codes 0x10000 - 0x1FFFF reserved for OS emulation (Unix) */ - -#define EXC_BREAKPOINT 6 /* Trace, breakpoint, etc. */ - /* Details in code field. */ - -#define EXC_SYSCALL 7 /* System calls. */ - -#define EXC_MACH_SYSCALL 8 /* Mach system calls. */ - -#define EXC_RPC_ALERT 9 /* RPC alert */ - -#define EXC_CRASH 10 /* Abnormal process exit */ - -/* - * Machine-independent exception behaviors - */ - -# define EXCEPTION_DEFAULT 1 -/* Send a catch_exception_raise message including the identity. - */ - -# define EXCEPTION_STATE 2 -/* Send a catch_exception_raise_state message including the - * thread state. - */ - -# define EXCEPTION_STATE_IDENTITY 3 -/* Send a catch_exception_raise_state_identity message including - * the thread identity and state. - */ - -#define MACH_EXCEPTION_CODES 0x80000000 -/* Send 64-bit code and subcode in the exception header */ - -/* - * Masks for exception definitions, above - * bit zero is unused, therefore 1 word = 31 exception types - */ - -#define EXC_MASK_BAD_ACCESS (1 << EXC_BAD_ACCESS) -#define EXC_MASK_BAD_INSTRUCTION (1 << EXC_BAD_INSTRUCTION) -#define EXC_MASK_ARITHMETIC (1 << EXC_ARITHMETIC) -#define EXC_MASK_EMULATION (1 << EXC_EMULATION) -#define EXC_MASK_SOFTWARE (1 << EXC_SOFTWARE) -#define EXC_MASK_BREAKPOINT (1 << EXC_BREAKPOINT) -#define EXC_MASK_SYSCALL (1 << EXC_SYSCALL) -#define EXC_MASK_MACH_SYSCALL (1 << EXC_MACH_SYSCALL) -#define EXC_MASK_RPC_ALERT (1 << EXC_RPC_ALERT) -#define EXC_MASK_CRASH (1 << EXC_CRASH) - -#define EXC_MASK_ALL (EXC_MASK_BAD_ACCESS | \ - EXC_MASK_BAD_INSTRUCTION | \ - EXC_MASK_ARITHMETIC | \ - EXC_MASK_EMULATION | \ - EXC_MASK_SOFTWARE | \ - EXC_MASK_BREAKPOINT | \ - EXC_MASK_SYSCALL | \ - EXC_MASK_MACH_SYSCALL | \ - EXC_MASK_RPC_ALERT | \ - EXC_MASK_MACHINE) - - -#define FIRST_EXCEPTION 1 /* ZERO is illegal */ - -/* - * Machine independent codes for EXC_SOFTWARE - * Codes 0x10000 - 0x1FFFF reserved for OS emulation (Unix) - * 0x10000 - 0x10002 in use for unix signals - */ -#define EXC_SOFT_SIGNAL 0x10003 /* Unix signal exceptions */ - -#ifndef ASSEMBLER - -#include <mach/port.h> -#include <mach/thread_status.h> -#include <mach/machine/vm_types.h> -/* - * Exported types - */ - -typedef int exception_type_t; -typedef integer_t exception_data_type_t; -typedef int64_t mach_exception_data_type_t; -typedef int exception_behavior_t; -typedef exception_data_type_t *exception_data_t; -typedef mach_exception_data_type_t *mach_exception_data_t; -typedef unsigned int exception_mask_t; -typedef exception_mask_t *exception_mask_array_t; -typedef exception_behavior_t *exception_behavior_array_t; -typedef thread_state_flavor_t *exception_flavor_array_t; -typedef mach_port_t *exception_port_array_t; -typedef mach_exception_data_type_t mach_exception_code_t; -typedef mach_exception_data_type_t mach_exception_subcode_t; - -#endif /* ASSEMBLER */ - -#endif /* _MACH_EXCEPTION_TYPES_H_ */ diff --git a/i386/include/mach/host_info.h b/i386/include/mach/host_info.h deleted file mode 100644 index bc8f803..0000000 --- a/i386/include/mach/host_info.h +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright (c) 2000-2009 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ - -/* - * File: mach/host_info.h - * - * Definitions for host_info call. - */ - -#ifndef _MACH_HOST_INFO_H_ -#define _MACH_HOST_INFO_H_ - -#include <mach/message.h> -#include <mach/vm_statistics.h> -#include <mach/machine.h> -#include <mach/machine/vm_types.h> -#include <mach/time_value.h> - -#include <sys/cdefs.h> - -/* - * Generic information structure to allow for expansion. - */ -typedef integer_t *host_info_t; /* varying array of int. */ -typedef integer_t *host_info64_t; /* varying array of int. */ - -#define HOST_INFO_MAX (1024) /* max array size */ -typedef integer_t host_info_data_t[HOST_INFO_MAX]; - -#define KERNEL_VERSION_MAX (512) -typedef char kernel_version_t[KERNEL_VERSION_MAX]; - -#define KERNEL_BOOT_INFO_MAX (4096) -typedef char kernel_boot_info_t[KERNEL_BOOT_INFO_MAX]; - -/* - * Currently defined information. - */ -/* host_info() */ -typedef integer_t host_flavor_t; -#define HOST_BASIC_INFO 1 /* basic info */ -#define HOST_SCHED_INFO 3 /* scheduling info */ -#define HOST_RESOURCE_SIZES 4 /* kernel struct sizes */ -#define HOST_PRIORITY_INFO 5 /* priority information */ -#define HOST_SEMAPHORE_TRAPS 7 /* Has semaphore traps */ -#define HOST_MACH_MSG_TRAP 8 /* Has mach_msg_trap */ - - -#pragma pack(4) - -struct host_basic_info { - integer_t max_cpus; /* max number of CPUs possible */ - integer_t avail_cpus; /* number of CPUs now available */ - natural_t memory_size; /* size of memory in bytes, capped at 2 GB */ - cpu_type_t cpu_type; /* cpu type */ - cpu_subtype_t cpu_subtype; /* cpu subtype */ - cpu_threadtype_t cpu_threadtype; /* cpu threadtype */ - integer_t physical_cpu; /* number of physical CPUs now available */ - integer_t physical_cpu_max; /* max number of physical CPUs possible */ - integer_t logical_cpu; /* number of logical cpu now available */ - integer_t logical_cpu_max; /* max number of physical CPUs possible */ - uint64_t max_mem; /* actual size of physical memory */ -}; - -#pragma pack() - -typedef struct host_basic_info host_basic_info_data_t; -typedef struct host_basic_info *host_basic_info_t; -#define HOST_BASIC_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(host_basic_info_data_t)/sizeof(integer_t))) - -struct host_sched_info { - integer_t min_timeout; /* minimum timeout in milliseconds */ - integer_t min_quantum; /* minimum quantum in milliseconds */ -}; - -typedef struct host_sched_info host_sched_info_data_t; -typedef struct host_sched_info *host_sched_info_t; -#define HOST_SCHED_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(host_sched_info_data_t)/sizeof(integer_t))) - -struct kernel_resource_sizes { - natural_t task; - natural_t thread; - natural_t port; - natural_t memory_region; - natural_t memory_object; -}; - -typedef struct kernel_resource_sizes kernel_resource_sizes_data_t; -typedef struct kernel_resource_sizes *kernel_resource_sizes_t; -#define HOST_RESOURCE_SIZES_COUNT ((mach_msg_type_number_t) \ - (sizeof(kernel_resource_sizes_data_t)/sizeof(integer_t))) - -struct host_priority_info { - integer_t kernel_priority; - integer_t system_priority; - integer_t server_priority; - integer_t user_priority; - integer_t depress_priority; - integer_t idle_priority; - integer_t minimum_priority; - integer_t maximum_priority; -}; - -typedef struct host_priority_info host_priority_info_data_t; -typedef struct host_priority_info *host_priority_info_t; -#define HOST_PRIORITY_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(host_priority_info_data_t)/sizeof(integer_t))) - -/* host_statistics() */ -#define HOST_LOAD_INFO 1 /* System loading stats */ -#define HOST_VM_INFO 2 /* Virtual memory stats */ -#define HOST_CPU_LOAD_INFO 3 /* CPU load stats */ - -/* host_statistics64() */ -#define HOST_VM_INFO64 4 /* 64-bit virtual memory stats */ - - -struct host_load_info { - integer_t avenrun[3]; /* scaled by LOAD_SCALE */ - integer_t mach_factor[3]; /* scaled by LOAD_SCALE */ -}; - -typedef struct host_load_info host_load_info_data_t; -typedef struct host_load_info *host_load_info_t; -#define HOST_LOAD_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(host_load_info_data_t)/sizeof(integer_t))) - -/* in <mach/vm_statistics.h> */ -/* vm_statistics64 */ -#define HOST_VM_INFO64_COUNT ((mach_msg_type_number_t) \ - (sizeof(vm_statistics64_data_t)/sizeof(integer_t))) - -/* size of the latest version of the structure */ -#define HOST_VM_INFO64_LATEST_COUNT HOST_VM_INFO64_COUNT - - -/* vm_statistics */ -#define HOST_VM_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(vm_statistics_data_t)/sizeof(integer_t))) - -/* size of the latest version of the structure */ -#define HOST_VM_INFO_LATEST_COUNT HOST_VM_INFO_COUNT -#define HOST_VM_INFO_REV2_COUNT HOST_VM_INFO_LATEST_COUNT -/* previous versions: adjust the size according to what was added each time */ -#define HOST_VM_INFO_REV1_COUNT /* added "speculative_count" (1 int) */ \ - ((mach_msg_type_number_t) \ - (HOST_VM_INFO_REV2_COUNT - 1)) -#define HOST_VM_INFO_REV0_COUNT /* added "purgable" info (2 ints) */ \ - ((mach_msg_type_number_t) \ - (HOST_VM_INFO_REV1_COUNT - 2)) - -struct host_cpu_load_info { /* number of ticks while running... */ - natural_t cpu_ticks[CPU_STATE_MAX]; /* ... in the given mode */ -}; - -typedef struct host_cpu_load_info host_cpu_load_info_data_t; -typedef struct host_cpu_load_info *host_cpu_load_info_t; -#define HOST_CPU_LOAD_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof (host_cpu_load_info_data_t) / sizeof (integer_t))) - -#endif /* _MACH_HOST_INFO_H_ */ diff --git a/i386/include/mach/host_notify.h b/i386/include/mach/host_notify.h deleted file mode 100644 index 6c0ca74..0000000 --- a/i386/include/mach/host_notify.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_HOST_NOTIFY_H_ -#define _MACH_HOST_NOTIFY_H_ - -#define HOST_NOTIFY_CALENDAR_CHANGE 0 -#define HOST_NOTIFY_TYPE_MAX 0 - -#define HOST_CALENDAR_CHANGED_REPLYID 950 - -#endif /* _MACH_HOST_NOTIFY_H_ */ diff --git a/i386/include/mach/host_notify_reply.defs b/i386/include/mach/host_notify_reply.defs deleted file mode 100644 index 85437f8..0000000 --- a/i386/include/mach/host_notify_reply.defs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -subsystem -#if KERNEL_USER - KernelUser -#endif /* KERN_USER */ - host_notify_reply 950; - -#include <mach/std_types.defs> - -simpleroutine host_calendar_changed( - notify_port : mach_port_move_send_once_t); - -/* vim: set ft=c : */ diff --git a/i386/include/mach/host_priv.defs b/i386/include/mach/host_priv.defs deleted file mode 100644 index 3be3986..0000000 --- a/i386/include/mach/host_priv.defs +++ /dev/null @@ -1,380 +0,0 @@ -/* - * Copyright (c) 2000-2004 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ - -/* - * Matchmaker definitions file for Mach kernel interface. - */ -subsystem -#if KERNEL_USER - KernelUser -#endif /* KERNEL_USER */ -#if KERNEL_SERVER - KernelServer -#endif /* KERNEL_SERVER */ - host_priv 400; - -#ifdef KERNEL_USER -userprefix r_; -#endif /* KERNEL_USER */ - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> -#include <mach/clock_types.defs> -#include <mach_debug/mach_debug_types.defs> - -/* - * Get boot configuration information from kernel. - */ -routine host_get_boot_info( - host_priv : host_priv_t; - out boot_info : kernel_boot_info_t); - -/* - * Reboot this host. - * Only available to privileged users. - */ -routine host_reboot( - host_priv : host_priv_t; - options : int); - - -/* - * Return privileged statistics from this host. - */ -routine host_priv_statistics( - host_priv : host_priv_t; - flavor : host_flavor_t; - out host_info_out : host_info_t, CountInOut); - -/* - * Sets the default memory manager, the port to which - * newly-created temporary memory objects are delivered. - * [See (memory_object_default)memory_object_create.] - * Also sets the default cluster size used for pagein/pageout - * to this port. - * The old memory manager port is returned. - */ -routine host_default_memory_manager( - host_priv : host_priv_t; - inout default_manager : memory_object_default_t = - MACH_MSG_TYPE_MAKE_SEND; - cluster_size : memory_object_cluster_size_t); - - -/* - * Specify that the range of the virtual address space - * of the target task must not cause page faults for - * the indicated accesses. - * - * [ To unwire the pages, specify VM_PROT_NONE. ] - */ -routine vm_wire( - host_priv : host_priv_t; - task : vm_map_t; - address : vm_address_t; - size : vm_size_t; - desired_access : vm_prot_t); - -/* - * Specify that the target thread must always be able - * to run and to allocate memory. - */ -routine thread_wire( - host_priv : host_priv_t; - thread : thread_act_t; - wired : boolean_t); - -/* - * Allocate zero-filled, wired, contiguous physical memory - * in the address space of the target task, either at the - * specified address, or wherever space can be found (if - * anywhere is TRUE), of the specified size. The address - * at which the allocation actually took place is returned. - * All pages will be entered into the task's pmap immediately, - * with VM_PROT_ALL. - * - * In addition to all the failure modes of its cousin, - * vm_allocate, this call may also fail if insufficient - * contiguous memory exists to satisfy the request. - * - * Memory obtained from this call should be freed the - * normal way, via vm_deallocate. - * - * N.B. This is an EXPERIMENTAL interface! - */ -routine vm_allocate_cpm( - host_priv : host_priv_t; - task : vm_map_t; - inout address : vm_address_t; - size : vm_size_t; - flags : int); - -/* - * Get list of processors on this host. - */ -routine host_processors( - host_priv : host_priv_t; - out out_processor_list : processor_array_t); - - -/* - * Get control port for a system-wide clock. - * Privileged. - */ -routine host_get_clock_control( - host_priv : host_priv_t; - clock_id : clock_id_t; - out clock_ctrl : clock_ctrl_t); - - -/* - * kernel module interface (obsolete as of SnowLeopard) - * see mach/kmod.h - */ -/* kmod_ MIG calls now return KERN_NOT_SUPPORTED on PPC/i386/x86_64. */ -routine kmod_create( - host_priv : host_priv_t; - info : vm_address_t; - out module : kmod_t); - -routine kmod_destroy( - host_priv : host_priv_t; - module : kmod_t); - -routine kmod_control( - host_priv : host_priv_t; - module : kmod_t; - flavor : kmod_control_flavor_t; - inout data : kmod_args_t); - -/* - * Get a given special port for a given node. - * Special ports are defined in host_special_ports.h; - * examples include the master device port. - * There are a limited number of slots available for system servers. - */ -routine host_get_special_port( - host_priv : host_priv_t; - node : int; - which : int; - out port : mach_port_t); - -/* - * Set a given special port for the local node. - * See host_get_special_port. - */ -routine host_set_special_port( - host_priv : host_priv_t; - which : int; - port : mach_port_t); - -/* - * Set an exception handler for a host on one or more exception types. - * These handlers are invoked for all threads on the host if there are - * no task or thread-specific exception handlers or those handlers returned - * an error. - */ -routine host_set_exception_ports( - host_priv : host_priv_t; - exception_mask : exception_mask_t; - new_port : mach_port_t; - behavior : exception_behavior_t; - new_flavor : thread_state_flavor_t); - - -/* - * Lookup some of the old exception handlers for a host - */ -routine host_get_exception_ports( - host_priv : host_priv_t; - exception_mask : exception_mask_t; - out masks : exception_mask_array_t; - out old_handlers : exception_handler_array_t, SameCount; - out old_behaviors : exception_behavior_array_t, SameCount; - out old_flavors : exception_flavor_array_t, SameCount); - - -/* - * Set an exception handler for a host on one or more exception types. - * At the same time, return the previously defined exception handlers for - * those types. - */ -routine host_swap_exception_ports( - host_priv : host_priv_t; - exception_mask : exception_mask_t; - new_port : mach_port_t; - behavior : exception_behavior_t; - new_flavor : thread_state_flavor_t; - out masks : exception_mask_array_t; - out old_handlerss : exception_handler_array_t, SameCount; - out old_behaviors : exception_behavior_array_t, SameCount; - out old_flavors : exception_flavor_array_t, SameCount); - -/* - * Loads a symbol table for an external file into the kernel debugger. - * The symbol table data is an array of characters. It is assumed that - * the caller and the kernel debugger agree on its format. - * This call is only supported in MACH_DEBUG and MACH_KDB kernels, - * otherwise KERN_FAILURE is returned. - */ -routine host_load_symbol_table( - host : host_priv_t; - task : task_t; - name : symtab_name_t; - symtab : pointer_t); - -/* - * Specify that the range of the virtual address space - * of the target task must not cause page faults for - * the indicated accesses. - * - * [ To unwire the pages, specify VM_PROT_NONE. ] - */ -routine mach_vm_wire( - host_priv : host_priv_t; - task : vm_map_t; - address : mach_vm_address_t; - size : mach_vm_size_t; - desired_access : vm_prot_t); - -/* - * JMM - Keep all processor_set related items at the end for easy - * removal. - */ -/* - * List all processor sets on host. - */ -routine host_processor_sets( - host_priv : host_priv_t; - out processor_sets : processor_set_name_array_t); - -/* - * Get control port for a processor set. - */ -routine host_processor_set_priv( - host_priv : host_priv_t; - set_name : processor_set_name_t; - out set : processor_set_t); - -/************************** Warning *************************************/ -/* The following routines are going away in a future release */ -/* use the appropriate variant of host_set_special_port instead */ -/************************************************************************/ - -/* - * Set the dynamic_pager control port. Other entities - * can request a send right to this port to talk with - * the dynamic_pager utility, setting behavioral parameters - * within the dynamic pager and getting low/high backing store - * resource notifications. - */ -routine set_dp_control_port( - host : host_priv_t; - in control_port : mach_port_t); - -/* - * Get the dynamic_pager control port. This port - * allows the holder to talk directly with the dynamic - * pager utility. - */ -routine get_dp_control_port( - host : host_priv_t; - out contorl_port :mach_port_t); - -/* - * Set the UserNotification daemon access port for this host. - * If this value is already set, the kernel will discard its - * reference to the previously registered port. - */ -routine host_set_UNDServer( - host : host_priv_t; - in server : UNDServerRef); - -/* - * Get the UserNotification daemon access port for this host. - * This can then be used to communicate with that daemon, which - * in turn communicates with the User through whatever means - * available (pop-up-menus for GUI systems, text for non-GUI, etc..). - * - * Access to this port is restricted to privileged clients because - * it is a special purpose port intended for kernel clients. User - * level clients should go directly to the CFUserNotifcation services. - */ -routine host_get_UNDServer( - host : host_priv_t; - out server : UNDServerRef); - -/* - * Perform an operation with a kernel extension, on the kext loading system, - * or request information about loaded kexts or the state of the kext loading - * system. - * Active operations (load, unload, disable/enable) require host_priv/root access. - * Info retrieval does not. - * - * WARNING: THIS ROUTINE IS PRIVATE TO THE KEXT-MANAGEMENT STACK AND IS - * SUBJECT TO CHANGE AT ANY TIME. - */ -routine kext_request( - host_priv : host_priv_t; - in user_log_flags : uint32_t; - in request_data : pointer_t; - out response_data : pointer_t; - out log_data : pointer_t; - out op_result : kern_return_t); - -/* vim: set ft=c : */ diff --git a/i386/include/mach/host_priv.h b/i386/include/mach/host_priv.h deleted file mode 100644 index 7a9df1f..0000000 --- a/i386/include/mach/host_priv.h +++ /dev/null @@ -1,1269 +0,0 @@ -#ifndef _host_priv_user_ -#define _host_priv_user_ - -/* Module host_priv */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef host_priv_MSG_COUNT -#define host_priv_MSG_COUNT 26 -#endif /* host_priv_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mach_types.h> -#include <mach/mach_types.h> -#include <mach_debug/mach_debug_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine host_get_boot_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_get_boot_info -( - host_priv_t host_priv, - kernel_boot_info_t boot_info -); - -/* Routine host_reboot */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_reboot -( - host_priv_t host_priv, - int options -); - -/* Routine host_priv_statistics */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_priv_statistics -( - host_priv_t host_priv, - host_flavor_t flavor, - host_info_t host_info_out, - mach_msg_type_number_t *host_info_outCnt -); - -/* Routine host_default_memory_manager */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_default_memory_manager -( - host_priv_t host_priv, - memory_object_default_t *default_manager, - memory_object_cluster_size_t cluster_size -); - -/* Routine vm_wire */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_wire -( - host_priv_t host_priv, - vm_map_t task, - vm_address_t address, - vm_size_t size, - vm_prot_t desired_access -); - -/* Routine thread_wire */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_wire -( - host_priv_t host_priv, - thread_act_t thread, - boolean_t wired -); - -/* Routine vm_allocate_cpm */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_allocate_cpm -( - host_priv_t host_priv, - vm_map_t task, - vm_address_t *address, - vm_size_t size, - int flags -); - -/* Routine host_processors */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_processors -( - host_priv_t host_priv, - processor_array_t *out_processor_list, - mach_msg_type_number_t *out_processor_listCnt -); - -/* Routine host_get_clock_control */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_get_clock_control -( - host_priv_t host_priv, - clock_id_t clock_id, - clock_ctrl_t *clock_ctrl -); - -/* Routine kmod_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t kmod_create -( - host_priv_t host_priv, - vm_address_t info, - kmod_t *module -); - -/* Routine kmod_destroy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t kmod_destroy -( - host_priv_t host_priv, - kmod_t module -); - -/* Routine kmod_control */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t kmod_control -( - host_priv_t host_priv, - kmod_t module, - kmod_control_flavor_t flavor, - kmod_args_t *data, - mach_msg_type_number_t *dataCnt -); - -/* Routine host_get_special_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_get_special_port -( - host_priv_t host_priv, - int node, - int which, - mach_port_t *port -); - -/* Routine host_set_special_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_set_special_port -( - host_priv_t host_priv, - int which, - mach_port_t port -); - -/* Routine host_set_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_set_exception_ports -( - host_priv_t host_priv, - exception_mask_t exception_mask, - mach_port_t new_port, - exception_behavior_t behavior, - thread_state_flavor_t new_flavor -); - -/* Routine host_get_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_get_exception_ports -( - host_priv_t host_priv, - exception_mask_t exception_mask, - exception_mask_array_t masks, - mach_msg_type_number_t *masksCnt, - exception_handler_array_t old_handlers, - exception_behavior_array_t old_behaviors, - exception_flavor_array_t old_flavors -); - -/* Routine host_swap_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_swap_exception_ports -( - host_priv_t host_priv, - exception_mask_t exception_mask, - mach_port_t new_port, - exception_behavior_t behavior, - thread_state_flavor_t new_flavor, - exception_mask_array_t masks, - mach_msg_type_number_t *masksCnt, - exception_handler_array_t old_handlerss, - exception_behavior_array_t old_behaviors, - exception_flavor_array_t old_flavors -); - -/* Routine host_load_symbol_table */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_load_symbol_table -( - host_priv_t host, - task_t task, - symtab_name_t name, - vm_offset_t symtab, - mach_msg_type_number_t symtabCnt -); - -/* Routine mach_vm_wire */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_wire -( - host_priv_t host_priv, - vm_map_t task, - mach_vm_address_t address, - mach_vm_size_t size, - vm_prot_t desired_access -); - -/* Routine host_processor_sets */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_processor_sets -( - host_priv_t host_priv, - processor_set_name_array_t *processor_sets, - mach_msg_type_number_t *processor_setsCnt -); - -/* Routine host_processor_set_priv */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_processor_set_priv -( - host_priv_t host_priv, - processor_set_name_t set_name, - processor_set_t *set -); - -/* Routine set_dp_control_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t set_dp_control_port -( - host_priv_t host, - mach_port_t control_port -); - -/* Routine get_dp_control_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t get_dp_control_port -( - host_priv_t host, - mach_port_t *contorl_port -); - -/* Routine host_set_UNDServer */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_set_UNDServer -( - host_priv_t host, - UNDServerRef server -); - -/* Routine host_get_UNDServer */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_get_UNDServer -( - host_priv_t host, - UNDServerRef *server -); - -/* Routine kext_request */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t kext_request -( - host_priv_t host_priv, - uint32_t user_log_flags, - vm_offset_t request_data, - mach_msg_type_number_t request_dataCnt, - vm_offset_t *response_data, - mach_msg_type_number_t *response_dataCnt, - vm_offset_t *log_data, - mach_msg_type_number_t *log_dataCnt, - kern_return_t *op_result -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__host_priv_subsystem__defined -#define __Request__host_priv_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_get_boot_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int options; - } __Request__host_reboot_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - host_flavor_t flavor; - mach_msg_type_number_t host_info_outCnt; - } __Request__host_priv_statistics_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t default_manager; - /* end of the kernel processed data */ - NDR_record_t NDR; - memory_object_cluster_size_t cluster_size; - } __Request__host_default_memory_manager_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - vm_prot_t desired_access; - } __Request__vm_wire_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - /* end of the kernel processed data */ - NDR_record_t NDR; - boolean_t wired; - } __Request__thread_wire_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - int flags; - } __Request__vm_allocate_cpm_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_processors_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - clock_id_t clock_id; - } __Request__host_get_clock_control_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t info; - } __Request__kmod_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kmod_t module; - } __Request__kmod_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t data; - /* end of the kernel processed data */ - NDR_record_t NDR; - kmod_t module; - kmod_control_flavor_t flavor; - mach_msg_type_number_t dataCnt; - } __Request__kmod_control_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int node; - int which; - } __Request__host_get_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t port; - /* end of the kernel processed data */ - NDR_record_t NDR; - int which; - } __Request__host_set_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_mask_t exception_mask; - exception_behavior_t behavior; - thread_state_flavor_t new_flavor; - } __Request__host_set_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_mask_t exception_mask; - } __Request__host_get_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_mask_t exception_mask; - exception_behavior_t behavior; - thread_state_flavor_t new_flavor; - } __Request__host_swap_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t task; - mach_msg_ool_descriptor_t symtab; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t nameOffset; /* MiG doesn't use it */ - mach_msg_type_number_t nameCnt; - char name[32]; - mach_msg_type_number_t symtabCnt; - } __Request__host_load_symbol_table_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_vm_address_t address; - mach_vm_size_t size; - vm_prot_t desired_access; - } __Request__mach_vm_wire_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_processor_sets_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t set_name; - /* end of the kernel processed data */ - } __Request__host_processor_set_priv_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t control_port; - /* end of the kernel processed data */ - } __Request__set_dp_control_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__get_dp_control_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t server; - /* end of the kernel processed data */ - } __Request__host_set_UNDServer_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_get_UNDServer_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t request_data; - /* end of the kernel processed data */ - NDR_record_t NDR; - uint32_t user_log_flags; - mach_msg_type_number_t request_dataCnt; - } __Request__kext_request_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__host_priv_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__host_priv_subsystem__defined -#define __RequestUnion__host_priv_subsystem__defined -union __RequestUnion__host_priv_subsystem { - __Request__host_get_boot_info_t Request_host_get_boot_info; - __Request__host_reboot_t Request_host_reboot; - __Request__host_priv_statistics_t Request_host_priv_statistics; - __Request__host_default_memory_manager_t Request_host_default_memory_manager; - __Request__vm_wire_t Request_vm_wire; - __Request__thread_wire_t Request_thread_wire; - __Request__vm_allocate_cpm_t Request_vm_allocate_cpm; - __Request__host_processors_t Request_host_processors; - __Request__host_get_clock_control_t Request_host_get_clock_control; - __Request__kmod_create_t Request_kmod_create; - __Request__kmod_destroy_t Request_kmod_destroy; - __Request__kmod_control_t Request_kmod_control; - __Request__host_get_special_port_t Request_host_get_special_port; - __Request__host_set_special_port_t Request_host_set_special_port; - __Request__host_set_exception_ports_t Request_host_set_exception_ports; - __Request__host_get_exception_ports_t Request_host_get_exception_ports; - __Request__host_swap_exception_ports_t Request_host_swap_exception_ports; - __Request__host_load_symbol_table_t Request_host_load_symbol_table; - __Request__mach_vm_wire_t Request_mach_vm_wire; - __Request__host_processor_sets_t Request_host_processor_sets; - __Request__host_processor_set_priv_t Request_host_processor_set_priv; - __Request__set_dp_control_port_t Request_set_dp_control_port; - __Request__get_dp_control_port_t Request_get_dp_control_port; - __Request__host_set_UNDServer_t Request_host_set_UNDServer; - __Request__host_get_UNDServer_t Request_host_get_UNDServer; - __Request__kext_request_t Request_kext_request; -}; -#endif /* !__RequestUnion__host_priv_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__host_priv_subsystem__defined -#define __Reply__host_priv_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t boot_infoOffset; /* MiG doesn't use it */ - mach_msg_type_number_t boot_infoCnt; - char boot_info[4096]; - } __Reply__host_get_boot_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__host_reboot_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t host_info_outCnt; - integer_t host_info_out[15]; - } __Reply__host_priv_statistics_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t default_manager; - /* end of the kernel processed data */ - } __Reply__host_default_memory_manager_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__vm_wire_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_wire_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - vm_address_t address; - } __Reply__vm_allocate_cpm_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_ports_descriptor_t out_processor_list; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t out_processor_listCnt; - } __Reply__host_processors_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t clock_ctrl; - /* end of the kernel processed data */ - } __Reply__host_get_clock_control_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - kmod_t module; - } __Reply__kmod_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__kmod_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t data; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t dataCnt; - } __Reply__kmod_control_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t port; - /* end of the kernel processed data */ - } __Reply__host_get_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__host_set_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__host_set_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t old_handlers[32]; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t masksCnt; - exception_mask_t masks[32]; - exception_behavior_t old_behaviors[32]; - thread_state_flavor_t old_flavors[32]; - } __Reply__host_get_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t old_handlerss[32]; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t masksCnt; - exception_mask_t masks[32]; - exception_behavior_t old_behaviors[32]; - thread_state_flavor_t old_flavors[32]; - } __Reply__host_swap_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__host_load_symbol_table_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_vm_wire_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_ports_descriptor_t processor_sets; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t processor_setsCnt; - } __Reply__host_processor_sets_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t set; - /* end of the kernel processed data */ - } __Reply__host_processor_set_priv_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__set_dp_control_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t contorl_port; - /* end of the kernel processed data */ - } __Reply__get_dp_control_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__host_set_UNDServer_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t server; - /* end of the kernel processed data */ - } __Reply__host_get_UNDServer_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t response_data; - mach_msg_ool_descriptor_t log_data; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t response_dataCnt; - mach_msg_type_number_t log_dataCnt; - kern_return_t op_result; - } __Reply__kext_request_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__host_priv_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__host_priv_subsystem__defined -#define __ReplyUnion__host_priv_subsystem__defined -union __ReplyUnion__host_priv_subsystem { - __Reply__host_get_boot_info_t Reply_host_get_boot_info; - __Reply__host_reboot_t Reply_host_reboot; - __Reply__host_priv_statistics_t Reply_host_priv_statistics; - __Reply__host_default_memory_manager_t Reply_host_default_memory_manager; - __Reply__vm_wire_t Reply_vm_wire; - __Reply__thread_wire_t Reply_thread_wire; - __Reply__vm_allocate_cpm_t Reply_vm_allocate_cpm; - __Reply__host_processors_t Reply_host_processors; - __Reply__host_get_clock_control_t Reply_host_get_clock_control; - __Reply__kmod_create_t Reply_kmod_create; - __Reply__kmod_destroy_t Reply_kmod_destroy; - __Reply__kmod_control_t Reply_kmod_control; - __Reply__host_get_special_port_t Reply_host_get_special_port; - __Reply__host_set_special_port_t Reply_host_set_special_port; - __Reply__host_set_exception_ports_t Reply_host_set_exception_ports; - __Reply__host_get_exception_ports_t Reply_host_get_exception_ports; - __Reply__host_swap_exception_ports_t Reply_host_swap_exception_ports; - __Reply__host_load_symbol_table_t Reply_host_load_symbol_table; - __Reply__mach_vm_wire_t Reply_mach_vm_wire; - __Reply__host_processor_sets_t Reply_host_processor_sets; - __Reply__host_processor_set_priv_t Reply_host_processor_set_priv; - __Reply__set_dp_control_port_t Reply_set_dp_control_port; - __Reply__get_dp_control_port_t Reply_get_dp_control_port; - __Reply__host_set_UNDServer_t Reply_host_set_UNDServer; - __Reply__host_get_UNDServer_t Reply_host_get_UNDServer; - __Reply__kext_request_t Reply_kext_request; -}; -#endif /* !__RequestUnion__host_priv_subsystem__defined */ - -#ifndef subsystem_to_name_map_host_priv -#define subsystem_to_name_map_host_priv \ - { "host_get_boot_info", 400 },\ - { "host_reboot", 401 },\ - { "host_priv_statistics", 402 },\ - { "host_default_memory_manager", 403 },\ - { "vm_wire", 404 },\ - { "thread_wire", 405 },\ - { "vm_allocate_cpm", 406 },\ - { "host_processors", 407 },\ - { "host_get_clock_control", 408 },\ - { "kmod_create", 409 },\ - { "kmod_destroy", 410 },\ - { "kmod_control", 411 },\ - { "host_get_special_port", 412 },\ - { "host_set_special_port", 413 },\ - { "host_set_exception_ports", 414 },\ - { "host_get_exception_ports", 415 },\ - { "host_swap_exception_ports", 416 },\ - { "host_load_symbol_table", 417 },\ - { "mach_vm_wire", 418 },\ - { "host_processor_sets", 419 },\ - { "host_processor_set_priv", 420 },\ - { "set_dp_control_port", 421 },\ - { "get_dp_control_port", 422 },\ - { "host_set_UNDServer", 423 },\ - { "host_get_UNDServer", 424 },\ - { "kext_request", 425 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _host_priv_user_ */ diff --git a/i386/include/mach/host_reboot.h b/i386/include/mach/host_reboot.h deleted file mode 100644 index 65609dd..0000000 --- a/i386/include/mach/host_reboot.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -#ifndef _MACH_HOST_REBOOT_ -#define _MACH_HOST_REBOOT_ - -#define HOST_REBOOT_HALT 0x0008 -#define HOST_REBOOT_UPSDELAY 0x0100 -#define HOST_REBOOT_DEBUGGER 0x1000 - -#endif /* _MACH_HOST_REBOOT_ */ diff --git a/i386/include/mach/host_security.defs b/i386/include/mach/host_security.defs deleted file mode 100644 index 4098df4..0000000 --- a/i386/include/mach/host_security.defs +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ - -/* - * File: mach/host_security.defs - * - * Abstract: - * Mach host security operations support. - */ -subsystem -#if KERNEL_SERVER - KernelServer -#endif /* KERNEL_SERVER */ - host_security 600; - -/* - * Basic types - */ -#include <mach/std_types.defs> -#include <mach/mach_types.defs> - - -/* - * Create a new task with an explicit security token - */ -routine host_security_create_task_token( - host_security : host_security_t; - parent_task : task_t; - sec_token : security_token_t; - audit_token : audit_token_t; - host : host_t; - ledgers : ledger_array_t; - inherit_memory : boolean_t; - out child_task : task_t); - -/* - * Change a task's security token - */ -routine host_security_set_task_token( - host_security : host_security_t; - target_task : task_t; - sec_token : security_token_t; - audit_token : audit_token_t; - host : host_t); - -/* vim: set ft=c : */ diff --git a/i386/include/mach/host_security.h b/i386/include/mach/host_security.h deleted file mode 100644 index ee4ed9e..0000000 --- a/i386/include/mach/host_security.h +++ /dev/null @@ -1,197 +0,0 @@ -#ifndef _host_security_user_ -#define _host_security_user_ - -/* Module host_security */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef host_security_MSG_COUNT -#define host_security_MSG_COUNT 2 -#endif /* host_security_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mach_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine host_security_create_task_token */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_security_create_task_token -( - host_security_t host_security, - task_t parent_task, - security_token_t sec_token, - audit_token_t audit_token, - host_t host, - ledger_array_t ledgers, - mach_msg_type_number_t ledgersCnt, - boolean_t inherit_memory, - task_t *child_task -); - -/* Routine host_security_set_task_token */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_security_set_task_token -( - host_security_t host_security, - task_t target_task, - security_token_t sec_token, - audit_token_t audit_token, - host_t host -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__host_security_subsystem__defined -#define __Request__host_security_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t parent_task; - mach_msg_port_descriptor_t host; - mach_msg_ool_ports_descriptor_t ledgers; - /* end of the kernel processed data */ - NDR_record_t NDR; - security_token_t sec_token; - audit_token_t audit_token; - mach_msg_type_number_t ledgersCnt; - boolean_t inherit_memory; - } __Request__host_security_create_task_token_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t target_task; - mach_msg_port_descriptor_t host; - /* end of the kernel processed data */ - NDR_record_t NDR; - security_token_t sec_token; - audit_token_t audit_token; - } __Request__host_security_set_task_token_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__host_security_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__host_security_subsystem__defined -#define __RequestUnion__host_security_subsystem__defined -union __RequestUnion__host_security_subsystem { - __Request__host_security_create_task_token_t Request_host_security_create_task_token; - __Request__host_security_set_task_token_t Request_host_security_set_task_token; -}; -#endif /* !__RequestUnion__host_security_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__host_security_subsystem__defined -#define __Reply__host_security_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t child_task; - /* end of the kernel processed data */ - } __Reply__host_security_create_task_token_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__host_security_set_task_token_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__host_security_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__host_security_subsystem__defined -#define __ReplyUnion__host_security_subsystem__defined -union __ReplyUnion__host_security_subsystem { - __Reply__host_security_create_task_token_t Reply_host_security_create_task_token; - __Reply__host_security_set_task_token_t Reply_host_security_set_task_token; -}; -#endif /* !__RequestUnion__host_security_subsystem__defined */ - -#ifndef subsystem_to_name_map_host_security -#define subsystem_to_name_map_host_security \ - { "host_security_create_task_token", 600 },\ - { "host_security_set_task_token", 601 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _host_security_user_ */ diff --git a/i386/include/mach/host_special_ports.h b/i386/include/mach/host_special_ports.h deleted file mode 100644 index 755327c..0000000 --- a/i386/include/mach/host_special_ports.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/host_special_ports.h - * - * Defines codes for access to host-wide special ports. - */ - -#ifndef _MACH_HOST_SPECIAL_PORTS_H_ -#define _MACH_HOST_SPECIAL_PORTS_H_ - -/* - * Cannot be set or gotten from user space - */ -#define HOST_SECURITY_PORT 0 - -/* - * Always provided by kernel (cannot be set from user-space). - */ -#define HOST_PORT 1 -#define HOST_PRIV_PORT 2 -#define HOST_IO_MASTER_PORT 3 -#define HOST_MAX_SPECIAL_KERNEL_PORT 7 /* room to grow */ - -/* - * Not provided by kernel - */ -#define HOST_DYNAMIC_PAGER_PORT (1 + HOST_MAX_SPECIAL_KERNEL_PORT) -#define HOST_AUDIT_CONTROL_PORT (2 + HOST_MAX_SPECIAL_KERNEL_PORT) -#define HOST_USER_NOTIFICATION_PORT (3 + HOST_MAX_SPECIAL_KERNEL_PORT) -#define HOST_AUTOMOUNTD_PORT (4 + HOST_MAX_SPECIAL_KERNEL_PORT) -#define HOST_LOCKD_PORT (5 + HOST_MAX_SPECIAL_KERNEL_PORT) -#define HOST_SEATBELT_PORT (7 + HOST_MAX_SPECIAL_KERNEL_PORT) -#define HOST_KEXTD_PORT (8 + HOST_MAX_SPECIAL_KERNEL_PORT) -#define HOST_CHUD_PORT (9 + HOST_MAX_SPECIAL_KERNEL_PORT) -#define HOST_UNFREED_PORT (10 + HOST_MAX_SPECIAL_KERNEL_PORT) -#define HOST_AMFID_PORT (11 + HOST_MAX_SPECIAL_KERNEL_PORT) -#define HOST_MAX_SPECIAL_PORT (12 + HOST_MAX_SPECIAL_KERNEL_PORT) - /* room to grow here as well */ - -/* - * Special node identifier to always represent the local node. - */ -#define HOST_LOCAL_NODE -1 - -/* - * Definitions for ease of use. - * - * In the get call, the host parameter can be any host, but will generally - * be the local node host port. In the set call, the host must the per-node - * host port for the node being affected. - */ -#define host_get_host_port(host, port) \ - (host_get_special_port((host), \ - HOST_LOCAL_NODE, HOST_PORT, (port))) -#define host_set_host_port(host, port) (KERN_INVALID_ARGUMENT) - -#define host_get_host_priv_port(host, port) \ - (host_get_special_port((host), \ - HOST_LOCAL_NODE, HOST_PRIV_PORT, (port))) -#define host_set_host_priv_port(host, port) (KERN_INVALID_ARGUMENT) - -#define host_get_io_master_port(host, port) \ - (host_get_special_port((host), \ - HOST_LOCAL_NODE, HOST_IO_MASTER_PORT, (port))) -#define host_set_io_master_port(host, port) (KERN_INVALID_ARGUMENT) - -/* - * User-settable special ports. - */ -#define host_get_dynamic_pager_port(host, port) \ - (host_get_special_port((host), \ - HOST_LOCAL_NODE, HOST_DYNAMIC_PAGER_PORT, (port))) -#define host_set_dynamic_pager_port(host, port) \ - (host_set_special_port((host), HOST_DYNAMIC_PAGER_PORT, (port))) - -#define host_get_audit_control_port(host, port) \ - (host_get_special_port((host), \ - HOST_LOCAL_NODE, HOST_AUDIT_CONTROL_PORT, (port))) -#define host_set_audit_control_port(host, port) \ - (host_set_special_port((host), HOST_AUDIT_CONTROL_PORT, (port))) - -#define host_get_user_notification_port(host, port) \ - (host_get_special_port((host), \ - HOST_LOCAL_NODE, HOST_USER_NOTIFICATION_PORT, (port))) -#define host_set_user_notification_port(host, port) \ - (host_set_special_port((host), HOST_USER_NOTIFICATION_PORT, (port))) - -#define host_get_automountd_port(host, port) \ - (host_get_special_port((host), \ - HOST_LOCAL_NODE, HOST_AUTOMOUNTD_PORT, (port))) -#define host_set_automountd_port(host, port) \ - (host_set_special_port((host), HOST_AUTOMOUNTD_PORT, (port))) - -#define host_get_lockd_port(host, port) \ - (host_get_special_port((host), \ - HOST_LOCAL_NODE, HOST_LOCKD_PORT, (port))) -#define host_set_lockd_port(host, port) \ - (host_set_special_port((host), HOST_LOCKD_PORT, (port))) - -#define host_get_kextd_port(host, port) \ - (host_get_special_port((host), \ - HOST_LOCAL_NODE, HOST_KEXTD_PORT, (port))) -#define host_set_kextd_port(host, port) \ - (host_set_special_port((host), HOST_KEXTD_PORT, (port))) - -#define host_get_chud_port(host, port) \ - (host_get_special_port((host), \ - HOST_LOCAL_NODE, HOST_CHUD_PORT, (port))) -#define host_set_chud_port(host, port) \ - (host_set_special_port((host), HOST_CHUD_PORT, (port))) - -#define host_get_unfreed_port(host, port) \ - (host_get_special_port((host), \ - HOST_LOCAL_NODE, HOST_UNFREED_PORT, (port))) -#define host_set_unfreed_port(host, port) \ - (host_set_special_port((host), HOST_UNFREED_PORT, (port))) - -#define host_get_amfid_port(host, port) \ - (host_get_special_port((host), \ - HOST_LOCAL_NODE, HOST_AMFID_PORT, (port))) -#define host_set_amfid_port(host, port) \ - (host_set_special_port((host), HOST_AMFID_PORT, (port))) - -#endif /* _MACH_HOST_SPECIAL_PORTS_H_ */ diff --git a/i386/include/mach/i386/_structs.h b/i386/include/mach/i386/_structs.h deleted file mode 100644 index 927d12f..0000000 --- a/i386/include/mach/i386/_structs.h +++ /dev/null @@ -1,561 +0,0 @@ -/* - * Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -#ifndef _MACH_I386__STRUCTS_H_ -#define _MACH_I386__STRUCTS_H_ - -/* - * i386 is the structure that is exported to user threads for - * use in status/mutate calls. This structure should never change. - * - */ - -#if __DARWIN_UNIX03 -#define _STRUCT_X86_THREAD_STATE32 struct __darwin_i386_thread_state -_STRUCT_X86_THREAD_STATE32 -{ - unsigned int __eax; - unsigned int __ebx; - unsigned int __ecx; - unsigned int __edx; - unsigned int __edi; - unsigned int __esi; - unsigned int __ebp; - unsigned int __esp; - unsigned int __ss; - unsigned int __eflags; - unsigned int __eip; - unsigned int __cs; - unsigned int __ds; - unsigned int __es; - unsigned int __fs; - unsigned int __gs; -}; -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_X86_THREAD_STATE32 struct i386_thread_state -_STRUCT_X86_THREAD_STATE32 -{ - unsigned int eax; - unsigned int ebx; - unsigned int ecx; - unsigned int edx; - unsigned int edi; - unsigned int esi; - unsigned int ebp; - unsigned int esp; - unsigned int ss; - unsigned int eflags; - unsigned int eip; - unsigned int cs; - unsigned int ds; - unsigned int es; - unsigned int fs; - unsigned int gs; -}; -#endif /* !__DARWIN_UNIX03 */ - -/* This structure should be double-word aligned for performance */ - -#if __DARWIN_UNIX03 -#define _STRUCT_FP_CONTROL struct __darwin_fp_control -_STRUCT_FP_CONTROL -{ - unsigned short __invalid :1, - __denorm :1, - __zdiv :1, - __ovrfl :1, - __undfl :1, - __precis :1, - :2, - __pc :2, -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define FP_PREC_24B 0 -#define FP_PREC_53B 2 -#define FP_PREC_64B 3 -#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */ - __rc :2, -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define FP_RND_NEAR 0 -#define FP_RND_DOWN 1 -#define FP_RND_UP 2 -#define FP_CHOP 3 -#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */ - /*inf*/ :1, - :3; -}; -typedef _STRUCT_FP_CONTROL __darwin_fp_control_t; -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_FP_CONTROL struct fp_control -_STRUCT_FP_CONTROL -{ - unsigned short invalid :1, - denorm :1, - zdiv :1, - ovrfl :1, - undfl :1, - precis :1, - :2, - pc :2, -#define FP_PREC_24B 0 -#define FP_PREC_53B 2 -#define FP_PREC_64B 3 - rc :2, -#define FP_RND_NEAR 0 -#define FP_RND_DOWN 1 -#define FP_RND_UP 2 -#define FP_CHOP 3 - /*inf*/ :1, - :3; -}; -typedef _STRUCT_FP_CONTROL fp_control_t; -#endif /* !__DARWIN_UNIX03 */ - -/* - * Status word. - */ - -#if __DARWIN_UNIX03 -#define _STRUCT_FP_STATUS struct __darwin_fp_status -_STRUCT_FP_STATUS -{ - unsigned short __invalid :1, - __denorm :1, - __zdiv :1, - __ovrfl :1, - __undfl :1, - __precis :1, - __stkflt :1, - __errsumm :1, - __c0 :1, - __c1 :1, - __c2 :1, - __tos :3, - __c3 :1, - __busy :1; -}; -typedef _STRUCT_FP_STATUS __darwin_fp_status_t; -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_FP_STATUS struct fp_status -_STRUCT_FP_STATUS -{ - unsigned short invalid :1, - denorm :1, - zdiv :1, - ovrfl :1, - undfl :1, - precis :1, - stkflt :1, - errsumm :1, - c0 :1, - c1 :1, - c2 :1, - tos :3, - c3 :1, - busy :1; -}; -typedef _STRUCT_FP_STATUS fp_status_t; -#endif /* !__DARWIN_UNIX03 */ - -/* defn of 80bit x87 FPU or MMX register */ - -#if __DARWIN_UNIX03 -#define _STRUCT_MMST_REG struct __darwin_mmst_reg -_STRUCT_MMST_REG -{ - char __mmst_reg[10]; - char __mmst_rsrv[6]; -}; -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_MMST_REG struct mmst_reg -_STRUCT_MMST_REG -{ - char mmst_reg[10]; - char mmst_rsrv[6]; -}; -#endif /* !__DARWIN_UNIX03 */ - - -/* defn of 128 bit XMM regs */ - -#if __DARWIN_UNIX03 -#define _STRUCT_XMM_REG struct __darwin_xmm_reg -_STRUCT_XMM_REG -{ - char __xmm_reg[16]; -}; -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_XMM_REG struct xmm_reg -_STRUCT_XMM_REG -{ - char xmm_reg[16]; -}; -#endif /* !__DARWIN_UNIX03 */ - -/* - * Floating point state. - */ - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define FP_STATE_BYTES 512 /* number of chars worth of data from fpu_fcw */ -#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */ - -#if __DARWIN_UNIX03 -#define _STRUCT_X86_FLOAT_STATE32 struct __darwin_i386_float_state -_STRUCT_X86_FLOAT_STATE32 -{ - int __fpu_reserved[2]; - _STRUCT_FP_CONTROL __fpu_fcw; /* x87 FPU control word */ - _STRUCT_FP_STATUS __fpu_fsw; /* x87 FPU status word */ - __uint8_t __fpu_ftw; /* x87 FPU tag word */ - __uint8_t __fpu_rsrv1; /* reserved */ - __uint16_t __fpu_fop; /* x87 FPU Opcode */ - __uint32_t __fpu_ip; /* x87 FPU Instruction Pointer offset */ - __uint16_t __fpu_cs; /* x87 FPU Instruction Pointer Selector */ - __uint16_t __fpu_rsrv2; /* reserved */ - __uint32_t __fpu_dp; /* x87 FPU Instruction Operand(Data) Pointer offset */ - __uint16_t __fpu_ds; /* x87 FPU Instruction Operand(Data) Pointer Selector */ - __uint16_t __fpu_rsrv3; /* reserved */ - __uint32_t __fpu_mxcsr; /* MXCSR Register state */ - __uint32_t __fpu_mxcsrmask; /* MXCSR mask */ - _STRUCT_MMST_REG __fpu_stmm0; /* ST0/MM0 */ - _STRUCT_MMST_REG __fpu_stmm1; /* ST1/MM1 */ - _STRUCT_MMST_REG __fpu_stmm2; /* ST2/MM2 */ - _STRUCT_MMST_REG __fpu_stmm3; /* ST3/MM3 */ - _STRUCT_MMST_REG __fpu_stmm4; /* ST4/MM4 */ - _STRUCT_MMST_REG __fpu_stmm5; /* ST5/MM5 */ - _STRUCT_MMST_REG __fpu_stmm6; /* ST6/MM6 */ - _STRUCT_MMST_REG __fpu_stmm7; /* ST7/MM7 */ - _STRUCT_XMM_REG __fpu_xmm0; /* XMM 0 */ - _STRUCT_XMM_REG __fpu_xmm1; /* XMM 1 */ - _STRUCT_XMM_REG __fpu_xmm2; /* XMM 2 */ - _STRUCT_XMM_REG __fpu_xmm3; /* XMM 3 */ - _STRUCT_XMM_REG __fpu_xmm4; /* XMM 4 */ - _STRUCT_XMM_REG __fpu_xmm5; /* XMM 5 */ - _STRUCT_XMM_REG __fpu_xmm6; /* XMM 6 */ - _STRUCT_XMM_REG __fpu_xmm7; /* XMM 7 */ - char __fpu_rsrv4[14*16]; /* reserved */ - int __fpu_reserved1; -}; -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_X86_FLOAT_STATE32 struct i386_float_state -_STRUCT_X86_FLOAT_STATE32 -{ - int fpu_reserved[2]; - _STRUCT_FP_CONTROL fpu_fcw; /* x87 FPU control word */ - _STRUCT_FP_STATUS fpu_fsw; /* x87 FPU status word */ - __uint8_t fpu_ftw; /* x87 FPU tag word */ - __uint8_t fpu_rsrv1; /* reserved */ - __uint16_t fpu_fop; /* x87 FPU Opcode */ - __uint32_t fpu_ip; /* x87 FPU Instruction Pointer offset */ - __uint16_t fpu_cs; /* x87 FPU Instruction Pointer Selector */ - __uint16_t fpu_rsrv2; /* reserved */ - __uint32_t fpu_dp; /* x87 FPU Instruction Operand(Data) Pointer offset */ - __uint16_t fpu_ds; /* x87 FPU Instruction Operand(Data) Pointer Selector */ - __uint16_t fpu_rsrv3; /* reserved */ - __uint32_t fpu_mxcsr; /* MXCSR Register state */ - __uint32_t fpu_mxcsrmask; /* MXCSR mask */ - _STRUCT_MMST_REG fpu_stmm0; /* ST0/MM0 */ - _STRUCT_MMST_REG fpu_stmm1; /* ST1/MM1 */ - _STRUCT_MMST_REG fpu_stmm2; /* ST2/MM2 */ - _STRUCT_MMST_REG fpu_stmm3; /* ST3/MM3 */ - _STRUCT_MMST_REG fpu_stmm4; /* ST4/MM4 */ - _STRUCT_MMST_REG fpu_stmm5; /* ST5/MM5 */ - _STRUCT_MMST_REG fpu_stmm6; /* ST6/MM6 */ - _STRUCT_MMST_REG fpu_stmm7; /* ST7/MM7 */ - _STRUCT_XMM_REG fpu_xmm0; /* XMM 0 */ - _STRUCT_XMM_REG fpu_xmm1; /* XMM 1 */ - _STRUCT_XMM_REG fpu_xmm2; /* XMM 2 */ - _STRUCT_XMM_REG fpu_xmm3; /* XMM 3 */ - _STRUCT_XMM_REG fpu_xmm4; /* XMM 4 */ - _STRUCT_XMM_REG fpu_xmm5; /* XMM 5 */ - _STRUCT_XMM_REG fpu_xmm6; /* XMM 6 */ - _STRUCT_XMM_REG fpu_xmm7; /* XMM 7 */ - char fpu_rsrv4[14*16]; /* reserved */ - int fpu_reserved1; -}; -#endif /* !__DARWIN_UNIX03 */ - -#if __DARWIN_UNIX03 -#define _STRUCT_X86_EXCEPTION_STATE32 struct __darwin_i386_exception_state -_STRUCT_X86_EXCEPTION_STATE32 -{ - unsigned int __trapno; - unsigned int __err; - unsigned int __faultvaddr; -}; -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_X86_EXCEPTION_STATE32 struct i386_exception_state -_STRUCT_X86_EXCEPTION_STATE32 -{ - unsigned int trapno; - unsigned int err; - unsigned int faultvaddr; -}; -#endif /* !__DARWIN_UNIX03 */ - -#if __DARWIN_UNIX03 -#define _STRUCT_X86_DEBUG_STATE32 struct __darwin_x86_debug_state32 -_STRUCT_X86_DEBUG_STATE32 -{ - unsigned int __dr0; - unsigned int __dr1; - unsigned int __dr2; - unsigned int __dr3; - unsigned int __dr4; - unsigned int __dr5; - unsigned int __dr6; - unsigned int __dr7; -}; -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_X86_DEBUG_STATE32 struct x86_debug_state32 -_STRUCT_X86_DEBUG_STATE32 -{ - unsigned int dr0; - unsigned int dr1; - unsigned int dr2; - unsigned int dr3; - unsigned int dr4; - unsigned int dr5; - unsigned int dr6; - unsigned int dr7; -}; -#endif /* !__DARWIN_UNIX03 */ - -/* - * 64 bit versions of the above - */ - -#if __DARWIN_UNIX03 -#define _STRUCT_X86_THREAD_STATE64 struct __darwin_x86_thread_state64 -_STRUCT_X86_THREAD_STATE64 -{ - __uint64_t __rax; - __uint64_t __rbx; - __uint64_t __rcx; - __uint64_t __rdx; - __uint64_t __rdi; - __uint64_t __rsi; - __uint64_t __rbp; - __uint64_t __rsp; - __uint64_t __r8; - __uint64_t __r9; - __uint64_t __r10; - __uint64_t __r11; - __uint64_t __r12; - __uint64_t __r13; - __uint64_t __r14; - __uint64_t __r15; - __uint64_t __rip; - __uint64_t __rflags; - __uint64_t __cs; - __uint64_t __fs; - __uint64_t __gs; -}; -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_X86_THREAD_STATE64 struct x86_thread_state64 -_STRUCT_X86_THREAD_STATE64 -{ - __uint64_t rax; - __uint64_t rbx; - __uint64_t rcx; - __uint64_t rdx; - __uint64_t rdi; - __uint64_t rsi; - __uint64_t rbp; - __uint64_t rsp; - __uint64_t r8; - __uint64_t r9; - __uint64_t r10; - __uint64_t r11; - __uint64_t r12; - __uint64_t r13; - __uint64_t r14; - __uint64_t r15; - __uint64_t rip; - __uint64_t rflags; - __uint64_t cs; - __uint64_t fs; - __uint64_t gs; -}; -#endif /* !__DARWIN_UNIX03 */ - - -#if __DARWIN_UNIX03 -#define _STRUCT_X86_FLOAT_STATE64 struct __darwin_x86_float_state64 -_STRUCT_X86_FLOAT_STATE64 -{ - int __fpu_reserved[2]; - _STRUCT_FP_CONTROL __fpu_fcw; /* x87 FPU control word */ - _STRUCT_FP_STATUS __fpu_fsw; /* x87 FPU status word */ - __uint8_t __fpu_ftw; /* x87 FPU tag word */ - __uint8_t __fpu_rsrv1; /* reserved */ - __uint16_t __fpu_fop; /* x87 FPU Opcode */ - - /* x87 FPU Instruction Pointer */ - __uint32_t __fpu_ip; /* offset */ - __uint16_t __fpu_cs; /* Selector */ - - __uint16_t __fpu_rsrv2; /* reserved */ - - /* x87 FPU Instruction Operand(Data) Pointer */ - __uint32_t __fpu_dp; /* offset */ - __uint16_t __fpu_ds; /* Selector */ - - __uint16_t __fpu_rsrv3; /* reserved */ - __uint32_t __fpu_mxcsr; /* MXCSR Register state */ - __uint32_t __fpu_mxcsrmask; /* MXCSR mask */ - _STRUCT_MMST_REG __fpu_stmm0; /* ST0/MM0 */ - _STRUCT_MMST_REG __fpu_stmm1; /* ST1/MM1 */ - _STRUCT_MMST_REG __fpu_stmm2; /* ST2/MM2 */ - _STRUCT_MMST_REG __fpu_stmm3; /* ST3/MM3 */ - _STRUCT_MMST_REG __fpu_stmm4; /* ST4/MM4 */ - _STRUCT_MMST_REG __fpu_stmm5; /* ST5/MM5 */ - _STRUCT_MMST_REG __fpu_stmm6; /* ST6/MM6 */ - _STRUCT_MMST_REG __fpu_stmm7; /* ST7/MM7 */ - _STRUCT_XMM_REG __fpu_xmm0; /* XMM 0 */ - _STRUCT_XMM_REG __fpu_xmm1; /* XMM 1 */ - _STRUCT_XMM_REG __fpu_xmm2; /* XMM 2 */ - _STRUCT_XMM_REG __fpu_xmm3; /* XMM 3 */ - _STRUCT_XMM_REG __fpu_xmm4; /* XMM 4 */ - _STRUCT_XMM_REG __fpu_xmm5; /* XMM 5 */ - _STRUCT_XMM_REG __fpu_xmm6; /* XMM 6 */ - _STRUCT_XMM_REG __fpu_xmm7; /* XMM 7 */ - _STRUCT_XMM_REG __fpu_xmm8; /* XMM 8 */ - _STRUCT_XMM_REG __fpu_xmm9; /* XMM 9 */ - _STRUCT_XMM_REG __fpu_xmm10; /* XMM 10 */ - _STRUCT_XMM_REG __fpu_xmm11; /* XMM 11 */ - _STRUCT_XMM_REG __fpu_xmm12; /* XMM 12 */ - _STRUCT_XMM_REG __fpu_xmm13; /* XMM 13 */ - _STRUCT_XMM_REG __fpu_xmm14; /* XMM 14 */ - _STRUCT_XMM_REG __fpu_xmm15; /* XMM 15 */ - char __fpu_rsrv4[6*16]; /* reserved */ - int __fpu_reserved1; -}; -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_X86_FLOAT_STATE64 struct x86_float_state64 -_STRUCT_X86_FLOAT_STATE64 -{ - int fpu_reserved[2]; - _STRUCT_FP_CONTROL fpu_fcw; /* x87 FPU control word */ - _STRUCT_FP_STATUS fpu_fsw; /* x87 FPU status word */ - __uint8_t fpu_ftw; /* x87 FPU tag word */ - __uint8_t fpu_rsrv1; /* reserved */ - __uint16_t fpu_fop; /* x87 FPU Opcode */ - - /* x87 FPU Instruction Pointer */ - __uint32_t fpu_ip; /* offset */ - __uint16_t fpu_cs; /* Selector */ - - __uint16_t fpu_rsrv2; /* reserved */ - - /* x87 FPU Instruction Operand(Data) Pointer */ - __uint32_t fpu_dp; /* offset */ - __uint16_t fpu_ds; /* Selector */ - - __uint16_t fpu_rsrv3; /* reserved */ - __uint32_t fpu_mxcsr; /* MXCSR Register state */ - __uint32_t fpu_mxcsrmask; /* MXCSR mask */ - _STRUCT_MMST_REG fpu_stmm0; /* ST0/MM0 */ - _STRUCT_MMST_REG fpu_stmm1; /* ST1/MM1 */ - _STRUCT_MMST_REG fpu_stmm2; /* ST2/MM2 */ - _STRUCT_MMST_REG fpu_stmm3; /* ST3/MM3 */ - _STRUCT_MMST_REG fpu_stmm4; /* ST4/MM4 */ - _STRUCT_MMST_REG fpu_stmm5; /* ST5/MM5 */ - _STRUCT_MMST_REG fpu_stmm6; /* ST6/MM6 */ - _STRUCT_MMST_REG fpu_stmm7; /* ST7/MM7 */ - _STRUCT_XMM_REG fpu_xmm0; /* XMM 0 */ - _STRUCT_XMM_REG fpu_xmm1; /* XMM 1 */ - _STRUCT_XMM_REG fpu_xmm2; /* XMM 2 */ - _STRUCT_XMM_REG fpu_xmm3; /* XMM 3 */ - _STRUCT_XMM_REG fpu_xmm4; /* XMM 4 */ - _STRUCT_XMM_REG fpu_xmm5; /* XMM 5 */ - _STRUCT_XMM_REG fpu_xmm6; /* XMM 6 */ - _STRUCT_XMM_REG fpu_xmm7; /* XMM 7 */ - _STRUCT_XMM_REG fpu_xmm8; /* XMM 8 */ - _STRUCT_XMM_REG fpu_xmm9; /* XMM 9 */ - _STRUCT_XMM_REG fpu_xmm10; /* XMM 10 */ - _STRUCT_XMM_REG fpu_xmm11; /* XMM 11 */ - _STRUCT_XMM_REG fpu_xmm12; /* XMM 12 */ - _STRUCT_XMM_REG fpu_xmm13; /* XMM 13 */ - _STRUCT_XMM_REG fpu_xmm14; /* XMM 14 */ - _STRUCT_XMM_REG fpu_xmm15; /* XMM 15 */ - char fpu_rsrv4[6*16]; /* reserved */ - int fpu_reserved1; -}; -#endif /* !__DARWIN_UNIX03 */ - -#if __DARWIN_UNIX03 -#define _STRUCT_X86_EXCEPTION_STATE64 struct __darwin_x86_exception_state64 -_STRUCT_X86_EXCEPTION_STATE64 -{ - unsigned int __trapno; - unsigned int __err; - __uint64_t __faultvaddr; -}; -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_X86_EXCEPTION_STATE64 struct x86_exception_state64 -_STRUCT_X86_EXCEPTION_STATE64 -{ - unsigned int trapno; - unsigned int err; - __uint64_t faultvaddr; -}; -#endif /* !__DARWIN_UNIX03 */ - -#if __DARWIN_UNIX03 -#define _STRUCT_X86_DEBUG_STATE64 struct __darwin_x86_debug_state64 -_STRUCT_X86_DEBUG_STATE64 -{ - __uint64_t __dr0; - __uint64_t __dr1; - __uint64_t __dr2; - __uint64_t __dr3; - __uint64_t __dr4; - __uint64_t __dr5; - __uint64_t __dr6; - __uint64_t __dr7; -}; -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_X86_DEBUG_STATE64 struct x86_debug_state64 -_STRUCT_X86_DEBUG_STATE64 -{ - __uint64_t dr0; - __uint64_t dr1; - __uint64_t dr2; - __uint64_t dr3; - __uint64_t dr4; - __uint64_t dr5; - __uint64_t dr6; - __uint64_t dr7; -}; -#endif /* !__DARWIN_UNIX03 */ - -#endif /* _MACH_I386__STRUCTS_H_ */ diff --git a/i386/include/mach/i386/asm.h b/i386/include/mach/i386/asm.h deleted file mode 100644 index 02a5620..0000000 --- a/i386/include/mach/i386/asm.h +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ - -#ifndef _I386_ASM_H_ -#define _I386_ASM_H_ - -#ifdef _KERNEL -#include <gprof.h> -#endif /* _KERNEL */ - -#ifdef MACH_KERNEL -#include <mach_kdb.h> -#else /* !MACH_KERNEL */ -#define MACH_KDB 0 -#endif /* !MACH_KERNEL */ - - -#if defined(MACH_KERNEL) || defined(_KERNEL) -#include <gprof.h> -#endif /* MACH_KERNEL || _KERNEL */ - -#if defined(__i386__) - -#define S_PC (%esp) -#define S_ARG0 4(%esp) -#define S_ARG1 8(%esp) -#define S_ARG2 12(%esp) -#define S_ARG3 16(%esp) -#define S_ARG4 20(%esp) - -#define FRAME pushl %ebp; movl %esp, %ebp -#define EMARF leave - -#define B_LINK (%ebp) -#define B_PC 4(%ebp) -#define B_ARG0 8(%ebp) -#define B_ARG1 12(%ebp) -#define B_ARG2 16(%ebp) -#define B_ARG3 20(%ebp) - -#elif defined(__x86_64__) - -#define S_PC (%rsp) - -#define FRAME pushq %rbp; movq %rsp, %rbp -#define EMARF leave - -#define B_LINK (%rbp) -#define B_PC 8(%rbp) - -#else -#error unsupported architecture -#endif - -/* There is another definition of ALIGN for .c sources */ -#ifdef ASSEMBLER -#define ALIGN 4,0x90 -#endif /* ASSEMBLER */ - -#ifndef FALIGN -#define FALIGN ALIGN -#endif - -#define LB(x,n) n -#if __STDC__ -#ifndef __NO_UNDERSCORES__ -#define LCL(x) L ## x -#define EXT(x) _ ## x -#define LEXT(x) _ ## x ## : -#else -#define LCL(x) .L ## x -#define EXT(x) x -#define LEXT(x) x ## : -#endif -#define LBc(x,n) n ## : -#define LBb(x,n) n ## b -#define LBf(x,n) n ## f -#else /* __STDC__ */ -#ifndef __NO_UNDERSCORES__ -#define LCL(x) L/**/x -#define EXT(x) _/**/x -#define LEXT(x) _/**/x/**/: -#else /* __NO_UNDERSCORES__ */ -#define LCL(x) .L/**/x -#define EXT(x) x -#define LEXT(x) x/**/: -#endif /* __NO_UNDERSCORES__ */ -#define LBc(x,n) n/**/: -#define LBb(x,n) n/**/b -#define LBf(x,n) n/**/f -#endif /* __STDC__ */ - -#define SVC .byte 0x9a; .long 0; .word 0x7 - -#define RPC_SVC .byte 0x9a; .long 0; .word 0xf - -#define String .asciz -#define Value .word -#define Times(a,b) (a*b) -#define Divide(a,b) (a/b) - -#define INB inb %dx, %al -#define OUTB outb %al, %dx -#define INL inl %dx, %eax -#define OUTL outl %eax, %dx - -#define data16 .byte 0x66 -#define addr16 .byte 0x67 - -#if !GPROF -#define MCOUNT - -#elif defined(__SHARED__) -#define MCOUNT ; .data;\ - .align ALIGN;\ - LBc(x, 8) .long 0;\ - .text;\ - Gpush;\ - Gload;\ - leal Gotoff(LBb(x,8)),%edx;\ - Egaddr(%eax,_mcount_ptr);\ - Gpop;\ - call *(%eax); - -#else /* !GPROF, !__SHARED__ */ -#define MCOUNT ; call mcount; -#endif /* GPROF */ - -#ifdef __ELF__ -#define ELF_FUNC(x) .type x,@function -#define ELF_DATA(x) .type x,@object -#define ELF_SIZE(x,s) .size x,s -#else -#define ELF_FUNC(x) -#define ELF_DATA(x) -#define ELF_SIZE(x,s) -#endif - -#define Entry(x) .globl EXT(x); ELF_FUNC(EXT(x)); .align FALIGN; LEXT(x) -#define ENTRY(x) Entry(x) MCOUNT -#define ENTRY2(x,y) .globl EXT(x); .globl EXT(y); \ - ELF_FUNC(EXT(x)); ELF_FUNC(EXT(y)); \ - .align FALIGN; LEXT(x); LEXT(y) \ - MCOUNT -#if __STDC__ -#define ASENTRY(x) .globl x; .align FALIGN; x ## : ELF_FUNC(x) MCOUNT -#else -#define ASENTRY(x) .globl x; .align FALIGN; x: ELF_FUNC(x) MCOUNT -#endif /* __STDC__ */ - -#define DATA(x) .globl EXT(x); ELF_DATA(EXT(x)); .align ALIGN; LEXT(x) - -#define End(x) ELF_SIZE(x,.-x) -#define END(x) End(EXT(x)) -#define ENDDATA(x) END(x) -#define Enddata(x) End(x) - -/* - * ELF shared library accessor macros. - * Gpush saves the %ebx register used for the GOT address - * Gpop pops %ebx if we need a GOT - * Gload loads %ebx with the GOT address if shared libraries are used - * Gcall calls an external function. - * Gotoff allows you to reference local labels. - * Gotoff2 allows you to reference local labels with an index reg. - * Gotoff3 allows you to reference local labels with an index reg & size. - * Gaddr loads up a register with an address of an external item. - * Gstack is the number of bytes that Gpush pushes on the stack. - * - * Varients of the above with E or L prefixes do EXT(name) or LCL(name) - * respectively. - */ - -#ifndef __SHARED__ -#define Gpush -#define Gpop -#define Gload -#define Gcall(func) call func -#define Gotoff(lab) lab -#define Gotoff2(l,r) l(r) -#define Gotoff3(l,r,s) l(,r,s) -#define Gaddr(to,lab) movl $lab,to -#define Gcmp(lab,reg) cmpl $lab,reg -#define Gmemload(lab,reg) movl lab,reg -#define Gmemstore(reg,lab,tmp) movl reg,lab -#define Gstack 0 - -#else -#ifdef __ELF__ /* ELF shared libraries */ -#define Gpush pushl %ebx -#define Gpop popl %ebx -#define Gload call 9f; 9: popl %ebx; addl $_GLOBAL_OFFSET_TABLE_+[.-9b],%ebx -#define Gcall(func) call EXT(func)@PLT -#define Gotoff(lab) lab@GOTOFF(%ebx) -#define Gotoff2(l,r) l@GOTOFF(%ebx,r) -#define Gotoff3(l,r,s) l@GOTOFF(%ebx,r,s) -#define Gaddr(to,lab) movl lab@GOT(%ebx),to -#define Gcmp(lab,reg) cmpl reg,lab@GOT(%ebx) -#define Gmemload(lab,reg) movl lab@GOT(%ebx),reg; movl (reg),reg -#define Gmemstore(reg,lab,tmp) movl lab@GOT(%ebx),tmp; movl reg,(tmp) -#define Gstack 4 - -#else /* ROSE shared libraries */ -#define Gpush -#define Gpop -#define Gload -#define Gcall(func) call *9f; .data; .align ALIGN; 9: .long func; .text -#define Gotoff(lab) lab -#define Gotoff2(l,r) l(r) -#define Gotoff3(l,r,s) l(,r,s) -#define Gaddr(to,lab) movl 9f,to; .data; .align ALIGN; 9: .long lab; .text -#define Gcmp(lab,reg) cmpl reg,9f; .data; .align ALIGN; 9: .long lab; .text -#define Gmemload(lab,reg) movl 9f,reg; movl (reg),reg; .data; .align ALIGN; 9: .long lab; .text -#define Gmemstore(reg,lab,tmp) movl 9f,tmp; movl reg,(tmp); .data; .align ALIGN; 9: .long lab; .text -#define Gstack 0 -#endif /* __ELF__ */ -#endif /* __SHARED__ */ - -/* Egotoff is not provided, since external symbols should not use @GOTOFF - relocations. */ -#define Egcall(func) Gcall(EXT(func)) -#define Egaddr(to,lab) Gaddr(to,EXT(lab)) -#define Egcmp(lab,reg) Gcmp(EXT(lab),reg) -#define Egmemload(lab,reg) Gmemload(EXT(lab),reg) -#define Egmemstore(reg,lab,tmp) Gmemstore(reg,EXT(lab),tmp) - -#define Lgotoff(lab) Gotoff(LCL(lab)) -#define Lgotoff2(l,r) Gotoff2(LCL(l),r) -#define Lgotoff3(l,r,s) Gotoff3(LCL(l),r,s) -#define Lgcmp(lab,reg) Gcmp(LCL(lab),reg) -#define Lgmemload(lab,reg) movl Lgotoff(lab),reg -#define Lgmemstore(reg,lab,tmp) movl reg,Lgotoff(lab) - -#ifdef ASSEMBLER -#if MACH_KDB -#include <ddb/stab.h> -/* - * This pseudo-assembler line is added so that there will be at least - * one N_SO entry in the symbol stable to define the current file name. - */ -#endif /* MACH_KDB */ - -#else /* NOT ASSEMBLER */ - -/* These defines are here for .c files that wish to reference global symbols - * within __asm__ statements. - */ -#ifndef __NO_UNDERSCORES__ -#define CC_SYM_PREFIX "_" -#else -#define CC_SYM_PREFIX "" -#endif /* __NO_UNDERSCORES__ */ -#endif /* ASSEMBLER */ - -#endif /* _I386_ASM_H_ */ diff --git a/i386/include/mach/i386/boolean.h b/i386/include/mach/i386/boolean.h deleted file mode 100644 index 100f7e7..0000000 --- a/i386/include/mach/i386/boolean.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ - -/* - * File: boolean.h - * - * Boolean type, for I386. - */ - -#ifndef _MACH_I386_BOOLEAN_H_ -#define _MACH_I386_BOOLEAN_H_ - -#if defined(__x86_64__) && !defined(KERNEL) -typedef unsigned int boolean_t; -#else -typedef int boolean_t; -#endif - -#endif /* _MACH_I386_BOOLEAN_H_ */ diff --git a/i386/include/mach/i386/exception.h b/i386/include/mach/i386/exception.h deleted file mode 100644 index 77fe4e4..0000000 --- a/i386/include/mach/i386/exception.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ - -#ifndef _MACH_I386_EXCEPTION_H_ -#define _MACH_I386_EXCEPTION_H_ - -/* - * No machine dependent types for the 80386 - */ - -#define EXC_TYPES_COUNT 11 /* incl. illegal exception 0 */ - -/* - * Codes and subcodes for 80386 exceptions. - */ - -#define EXCEPTION_CODE_MAX 2 /* currently code and subcode */ - -/* - * EXC_BAD_INSTRUCTION - */ - -#define EXC_I386_INVOP 1 - -/* - * EXC_ARITHMETIC - */ - -#define EXC_I386_DIV 1 -#define EXC_I386_INTO 2 -#define EXC_I386_NOEXT 3 -#define EXC_I386_EXTOVR 4 -#define EXC_I386_EXTERR 5 -#define EXC_I386_EMERR 6 -#define EXC_I386_BOUND 7 -#define EXC_I386_SSEEXTERR 8 - -/* - * EXC_SOFTWARE - * Note: 0x10000-0x10003 in use for unix signal - */ - -/* - * EXC_BAD_ACCESS - */ - -/* - * EXC_BREAKPOINT - */ - -#define EXC_I386_SGL 1 -#define EXC_I386_BPT 2 - -#define EXC_I386_DIVERR 0 /* divide by 0 eprror */ -#define EXC_I386_SGLSTP 1 /* single step */ -#define EXC_I386_NMIFLT 2 /* NMI */ -#define EXC_I386_BPTFLT 3 /* breakpoint fault */ -#define EXC_I386_INTOFLT 4 /* INTO overflow fault */ -#define EXC_I386_BOUNDFLT 5 /* BOUND instruction fault */ -#define EXC_I386_INVOPFLT 6 /* invalid opcode fault */ -#define EXC_I386_NOEXTFLT 7 /* extension not available fault*/ -#define EXC_I386_DBLFLT 8 /* double fault */ -#define EXC_I386_EXTOVRFLT 9 /* extension overrun fault */ -#define EXC_I386_INVTSSFLT 10 /* invalid TSS fault */ -#define EXC_I386_SEGNPFLT 11 /* segment not present fault */ -#define EXC_I386_STKFLT 12 /* stack fault */ -#define EXC_I386_GPFLT 13 /* general protection fault */ -#define EXC_I386_PGFLT 14 /* page fault */ -#define EXC_I386_EXTERRFLT 16 /* extension error fault */ -#define EXC_I386_ALIGNFLT 17 /* Alignment fault */ -#define EXC_I386_ENDPERR 33 /* emulated extension error flt */ -#define EXC_I386_ENOEXTFLT 32 /* emulated ext not present */ - - -/* - * machine dependent exception masks - */ -#define EXC_MASK_MACHINE 0 - -#endif /* _MACH_I386_EXCEPTION_H_ */ diff --git a/i386/include/mach/i386/fp_reg.h b/i386/include/mach/i386/fp_reg.h deleted file mode 100644 index 47a26a9..0000000 --- a/i386/include/mach/i386/fp_reg.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1992-1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ - -#ifndef _I386_FP_SAVE_H_ -#define _I386_FP_SAVE_H_ - - -/* note when allocating this data structure, it must be 16 byte aligned. */ -struct x86_fx_save { - unsigned short fx_control; /* control */ - unsigned short fx_status; /* status */ - unsigned char fx_tag; /* register tags */ - unsigned char fx_bbz1; /* better be zero when calling fxrtstor */ - unsigned short fx_opcode; - unsigned int fx_eip; /* eip instruction */ - unsigned short fx_cs; /* cs instruction */ - unsigned short fx_bbz2; /* better be zero when calling fxrtstor */ - unsigned int fx_dp; /* data address */ - unsigned short fx_ds; /* data segment */ - unsigned short fx_bbz3; /* better be zero when calling fxrtstor */ - unsigned int fx_MXCSR; - unsigned int fx_MXCSR_MASK; - unsigned short fx_reg_word[8][8]; /* STx/MMx registers */ - unsigned short fx_XMM_reg[8][16]; /* XMM0-XMM15 on 64 bit processors */ - /* XMM0-XMM7 on 32 bit processors... unused storage reserved */ - unsigned char fx_reserved[16*6]; /* reserved by intel for future expansion */ -}; - - -/* - * Control register - */ -#define FPC_IE 0x0001 /* enable invalid operation - exception */ -#define FPC_IM FPC_IE -#define FPC_DE 0x0002 /* enable denormalized operation - exception */ -#define FPC_DM FPC_DE -#define FPC_ZE 0x0004 /* enable zero-divide exception */ -#define FPC_ZM FPC_ZE -#define FPC_OE 0x0008 /* enable overflow exception */ -#define FPC_OM FPC_OE -#define FPC_UE 0x0010 /* enable underflow exception */ -#define FPC_PE 0x0020 /* enable precision exception */ -#define FPC_PC 0x0300 /* precision control: */ -#define FPC_PC_24 0x0000 /* 24 bits */ -#define FPC_PC_53 0x0200 /* 53 bits */ -#define FPC_PC_64 0x0300 /* 64 bits */ -#define FPC_RC 0x0c00 /* rounding control: */ -#define FPC_RC_RN 0x0000 /* round to nearest or even */ -#define FPC_RC_RD 0x0400 /* round down */ -#define FPC_RC_RU 0x0800 /* round up */ -#define FPC_RC_CHOP 0x0c00 /* chop */ -#define FPC_IC 0x1000 /* infinity control (obsolete) */ -#define FPC_IC_PROJ 0x0000 /* projective infinity */ -#define FPC_IC_AFF 0x1000 /* affine infinity (std) */ - -/* - * Status register - */ -#define FPS_IE 0x0001 /* invalid operation */ -#define FPS_DE 0x0002 /* denormalized operand */ -#define FPS_ZE 0x0004 /* divide by zero */ -#define FPS_OE 0x0008 /* overflow */ -#define FPS_UE 0x0010 /* underflow */ -#define FPS_PE 0x0020 /* precision */ -#define FPS_SF 0x0040 /* stack flag */ -#define FPS_ES 0x0080 /* error summary */ -#define FPS_C0 0x0100 /* condition code bit 0 */ -#define FPS_C1 0x0200 /* condition code bit 1 */ -#define FPS_C2 0x0400 /* condition code bit 2 */ -#define FPS_TOS 0x3800 /* top-of-stack pointer */ -#define FPS_TOS_SHIFT 11 -#define FPS_C3 0x4000 /* condition code bit 3 */ -#define FPS_BUSY 0x8000 /* FPU busy */ - -/* - * Kind of floating-point support provided by kernel. - */ -#define FP_NO 0 /* no floating point */ -#define FP_SOFT 1 /* software FP emulator */ -#define FP_287 2 /* 80287 */ -#define FP_387 3 /* 80387 or 80486 */ -#define FP_FXSR 4 /* Fast save/restore SIMD Extension */ - -#endif /* _I386_FP_SAVE_H_ */ diff --git a/i386/include/mach/i386/kern_return.h b/i386/include/mach/i386/kern_return.h deleted file mode 100644 index a9df708..0000000 --- a/i386/include/mach/i386/kern_return.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ - -/* - * File: kern_return.h - * Author: Avadis Tevanian, Jr., Michael Wayne Young - * Date: 1985 - * - * Machine-dependent kernel return definitions. - */ - -#ifndef _MACH_I386_KERN_RETURN_H_ -#define _MACH_I386_KERN_RETURN_H_ - -#ifndef ASSEMBLER -typedef int kern_return_t; -#endif /* ASSEMBLER */ - -#endif /* _MACH_I386_KERN_RETURN_H_ */ diff --git a/i386/include/mach/i386/machine_types.defs b/i386/include/mach/i386/machine_types.defs deleted file mode 100644 index 6a35615..0000000 --- a/i386/include/mach/i386/machine_types.defs +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -/* - * Header file for basic, machine-dependent data types. i386 version. - */ - -#ifndef _MACHINE_VM_TYPES_DEFS_ -#define _MACHINE_VM_TYPES_DEFS_ 1 - -type short = int16_t; -type int = int32_t; -type unsigned = uint32_t; - -type float = MACH_MSG_TYPE_REAL_32; -type double = MACH_MSG_TYPE_REAL_64; - - -/* from ISO/IEC 988:1999 spec */ -/* 7.18.1.4 Integer types capable of hgolding object pointers */ -/* - * The [u]intptr_t types for the native - * integer type, e.g. 32 or 64 or.. whatever - * register size the machine has. They are - * used for entities that might be either - * [unsigned] integers or pointers, and for - * type-casting between the two. - * - * For instance, the IPC system represents - * a port in user space as an integer and - * in kernel space as a pointer. - */ -#if defined(__LP64__) -type uintptr_t = uint64_t; -type intptr_t = int64_t; -#else -type uintptr_t = uint32_t; -type intptr_t = int32_t; -#endif - -/* - * These are the legacy Mach types that are - * the [rough] equivalents of the standards above. - * They were defined in terms of int, not - * long int, so they remain separate. - */ -#if defined(__LP64__) -type register_t = int64_t; -#else -type register_t = int32_t; -#endif -type integer_t = int32_t; -type natural_t = uint32_t; - -/* - * These are the VM types that scale with the address - * space size of a given process. - */ - -#if defined(__LP64__) -type vm_address_t = uint64_t; -type vm_offset_t = uint64_t; -type vm_size_t = uint64_t; -#else -type vm_address_t = natural_t; -type vm_offset_t = natural_t; -type vm_size_t = natural_t; -#endif - -/* - * The mach_vm_xxx_t types are sized to hold the - * maximum pointer, offset, etc... supported on the - * platform. - */ -type mach_vm_address_t = uint64_t; -type mach_vm_offset_t = uint64_t; -type mach_vm_size_t = uint64_t; - -#if MACH_IPC_COMPAT -/* - * For the old IPC interface - */ -#define MSG_TYPE_PORT_NAME natural_t - -#endif /* MACH_IPC_COMPAT */ - -/* - * These are types used internal to Mach to implement the - * legacy 32-bit VM APIs published by the kernel. - */ -#define VM32_SUPPORT 1 - -type vm32_address_t = uint32_t; -type vm32_offset_t = uint32_t; -type vm32_size_t = uint32_t; - -#endif /* _MACHINE_VM_TYPES_DEFS_ */ - -/* vim: set ft=c : */ diff --git a/i386/include/mach/i386/ndr_def.h b/i386/include/mach/i386/ndr_def.h deleted file mode 100644 index 5163f63..0000000 --- a/i386/include/mach/i386/ndr_def.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -/* NDR record for Intel x86s */ - -#include <mach/ndr.h> - -NDR_record_t NDR_record = { - 0, /* mig_reserved */ - 0, /* mig_reserved */ - 0, /* mig_reserved */ - NDR_PROTOCOL_2_0, - NDR_INT_LITTLE_ENDIAN, - NDR_CHAR_ASCII, - NDR_FLOAT_IEEE, - 0, -}; diff --git a/i386/include/mach/i386/processor_info.h b/i386/include/mach/i386/processor_info.h deleted file mode 100644 index 8272c6d..0000000 --- a/i386/include/mach/i386/processor_info.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * File: mach/i386/processor_info.h - * - * Data structure definitions for i386 specific processor control - */ - -#ifndef _MACH_I386_PROCESSOR_INFO_H_ -#define _MACH_I386_PROCESSOR_INFO_H_ - -#endif /* _MACH_I386_PROCESSOR_INFO_H_ */ diff --git a/i386/include/mach/i386/rpc.h b/i386/include/mach/i386/rpc.h deleted file mode 100644 index 55561f9..0000000 --- a/i386/include/mach/i386/rpc.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2002,2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -#ifndef _MACH_I386_RPC_H_ -#define _MACH_I386_RPC_H_ - -#endif /* _MACH_I386_RPC_H_ */ - diff --git a/i386/include/mach/i386/sdt_isa.h b/i386/include/mach/i386/sdt_isa.h deleted file mode 100644 index 7934a2c..0000000 --- a/i386/include/mach/i386/sdt_isa.h +++ /dev/null @@ -1,412 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _MACH_I386_SDT_ISA_H -#define _MACH_I386_SDT_ISA_H - -/* - * Only define when testing. This makes the calls into actual calls to - * test functions. - */ -/* #define DTRACE_CALL_TEST */ - -#define DTRACE_STRINGIFY(s) #s -#define DTRACE_TOSTRING(s) DTRACE_STRINGIFY(s) -#define DTRACE_LABEL(p, n) \ - "__dtrace_probe$" DTRACE_TOSTRING(__LINE__) DTRACE_STRINGIFY(_##p##___##n) ":" "\n\t" - -#ifdef DTRACE_CALL_TEST - -#define DTRACE_CALL(p,n) \ - DTRACE_LABEL(p,n) \ - DTRACE_CALL_INSN(p,n) - -#else - -#define DTRACE_CALL(p,n) \ - DTRACE_LABEL(p,n) \ - DTRACE_NOPS - -#endif - -#ifdef __x86_64__ - -#define DTRACE_NOPS \ - "nop" "\n\t" \ - "nop" "\n\t" \ - "nop" "\n\t" - -#define DTRACE_CALL_INSN(p,n) \ - "call _dtracetest" DTRACE_STRINGIFY(_##p##_##n) "\n\t" - -#define ARG1_EXTENT 1 -#define ARGS2_EXTENT 2 -#define ARGS3_EXTENT 3 -#define ARGS4_EXTENT 4 -#define ARGS5_EXTENT 5 -#define ARGS6_EXTENT 6 -#define ARGS7_EXTENT 7 -#define ARGS8_EXTENT 8 -#define ARGS9_EXTENT 10 -#define ARGS10_EXTENT 10 - -#define DTRACE_CALL0ARGS(provider, name) \ - asm volatile ( \ - DTRACE_CALL(provider, name) \ - ); - -#define DTRACE_CALL1ARG(provider, name) \ - asm volatile ("movq\t0x0(%0),%%rdi" "\n\t" \ - DTRACE_CALL(provider, name) \ - : \ - : "r" (__dtrace_args) \ - : "memory", "rdi" \ - ); - -#define DTRACE_CALL2ARGS(provider, name) \ - asm volatile ("movq\t0x0(%0),%%rdi" "\n\t" \ - "movq\t0x8(%0),%%rsi" "\n\t" \ - DTRACE_CALL(provider, name) \ - : \ - : "r" (__dtrace_args) \ - : "memory", "rdi", "rsi" \ - ); - -#define DTRACE_CALL3ARGS(provider, name) \ - asm volatile ("movq\t0x0(%0),%%rdi" "\n\t" \ - "movq\t0x8(%0),%%rsi" "\n\t" \ - "movq\t0x10(%0),%%rdx" "\n\t" \ - DTRACE_CALL(provider, name) \ - : \ - : "r" (__dtrace_args) \ - : "memory", "rdi", "rsi", "rdx" \ - ); - -#define DTRACE_CALL4ARGS(provider, name) \ - asm volatile ("movq\t0x0(%0),%%rdi" "\n\t" \ - "movq\t0x8(%0),%%rsi" "\n\t" \ - "movq\t0x10(%0),%%rdx" "\n\t" \ - "movq\t0x18(%0),%%rcx" "\n\t" \ - DTRACE_CALL(provider, name) \ - : \ - : "r" (__dtrace_args) \ - : "memory", "rdi", "rsi", "rdx", "rcx" \ - ); - -#define DTRACE_CALL5ARGS(provider, name) \ - asm volatile ("movq\t0x0(%0),%%rdi" "\n\t" \ - "movq\t0x8(%0),%%rsi" "\n\t" \ - "movq\t0x10(%0),%%rdx" "\n\t" \ - "movq\t0x18(%0),%%rcx" "\n\t" \ - "movq\t0x20(%0),%%r8" "\n\t" \ - DTRACE_CALL(provider, name) \ - : \ - : "r" (__dtrace_args) \ - : "memory", "rdi", "rsi", "rdx", "rcx", "r8" \ - ); - -#define DTRACE_CALL6ARGS(provider, name) \ - asm volatile ("movq\t0x0(%0),%%rdi" "\n\t" \ - "movq\t0x8(%0),%%rsi" "\n\t" \ - "movq\t0x10(%0),%%rdx" "\n\t" \ - "movq\t0x18(%0),%%rcx" "\n\t" \ - "movq\t0x20(%0),%%r8" "\n\t" \ - "movq\t0x28(%0),%%r9" "\n\t" \ - DTRACE_CALL(provider, name) \ - : \ - : "r" (__dtrace_args) \ - : "memory", "rdi", "rsi", "rdx", "rcx", "r8", "r9" \ - ); - -#define DTRACE_CALL7ARGS(provider, name) \ - asm volatile ("subq\t$0x8,%%rsp" "\n\t" \ - "movq\t0x0(%0),%%rdi" "\n\t" \ - "movq\t0x8(%0),%%rsi" "\n\t" \ - "movq\t0x10(%0),%%rdx" "\n\t" \ - "movq\t0x18(%0),%%rcx" "\n\t" \ - "movq\t0x20(%0),%%r8" "\n\t" \ - "movq\t0x28(%0),%%r9" "\n\t" \ - "movq\t0x30(%0),%%rax" "\n\t" \ - "movq\t%%rax,0x0(%%rsp)" "\n\t" \ - DTRACE_CALL(provider, name) \ - "addq\t$0x8,%%rsp" "\n\t" \ - : \ - : "r" (__dtrace_args) \ - : "memory", "rdi", "rsi", "rdx", "rcx", "r8", "r9", "rax" \ - ); - -#endif // __x86_64__ - -#ifdef __i386__ - -#define DTRACE_NOPS \ - "nop" "\n\t" \ - "leal 0(%%esi), %%esi" "\n\t" - -#define DTRACE_CALL_INSN(p,n) \ - "call _dtracetest" DTRACE_STRINGIFY(_##p##_##n) "\n\t" - -#define ARG1_EXTENT 1 -#define ARGS2_EXTENT 2 -#define ARGS3_EXTENT 4 -#define ARGS4_EXTENT 4 -#define ARGS5_EXTENT 8 -#define ARGS6_EXTENT 8 -#define ARGS7_EXTENT 8 -#define ARGS8_EXTENT 8 -#define ARGS9_EXTENT 12 -#define ARGS10_EXTENT 12 - -/* - * Because this code is used in the kernel, we must not touch any floating point - * or specialized registers. This leaves the following registers: - * - * eax ; volatile, safe to use - * ebx ; PIC register, gcc error when used - * ecx ; volatile, safe to use - * edx ; volatile, safe to use - * esi ; non-volatile, otherwise safe to use - * edi ; non-volatile, otherwise safe to use - * - * Using any of the non volatile register causes a spill to stack which is almost - * certainly a net performance loss. Also, note that the array ref (__dtrace_args) - * consumes one free register. If all three of the volatile regs are used for load/store, - * the compiler will spill a register to hold the array ref. - * - * The end result is that we only pipeline two loads/stores at a time. Blech. - */ - -#define DTRACE_CALL0ARGS(provider, name) \ - asm volatile ( \ - DTRACE_CALL(provider, name) \ - "# eat trailing nl +tabfrom DTRACE_CALL" \ - : \ - : \ - ); - -#define DTRACE_CALL1ARG(provider, name) \ - asm volatile ("subl\t$0x10,%%esp" "\n\t" \ - "movl\t0x0(%0),%%eax" "\n\t" \ - "movl\t%%eax,0x0(%%esp)" "\n\t" \ - DTRACE_CALL(provider, name) \ - "addl\t$0x10,%%esp" \ - : \ - : "r" (__dtrace_args) \ - : "memory", "eax" \ - ); - -#define DTRACE_CALL2ARGS(provider, name) \ - asm volatile ("subl\t$0x10,%%esp" "\n\t" \ - "movl\t0x0(%0),%%eax" "\n\t" \ - "movl\t0x4(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x0(%%esp)" "\n\t" \ - "movl\t%%edx,0x4(%%esp)" "\n\t" \ - DTRACE_CALL(provider, name) \ - "addl\t$0x10,%%esp" \ - : \ - : "r" (__dtrace_args) \ - : "memory", "eax", "edx" \ - ); - -#define DTRACE_CALL3ARGS(provider, name) \ - asm volatile ("subl\t$0x10,%%esp" "\n\t" \ - "movl\t0x0(%0),%%eax" "\n\t" \ - "movl\t0x4(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x0(%%esp)" "\n\t" \ - "movl\t%%edx,0x4(%%esp)" "\n\t" \ - "movl\t0x8(%0),%%eax" "\n\t" \ - "movl\t%%eax,0x8(%%esp)" "\n\t" \ - DTRACE_CALL(provider, name) \ - "addl\t$0x10,%%esp" \ - : \ - : "r" (__dtrace_args) \ - : "memory", "eax", "edx" \ - ); - -#define DTRACE_CALL4ARGS(provider, name) \ - asm volatile ("subl\t$0x10,%%esp" "\n\t" \ - "movl\t0x0(%0),%%eax" "\n\t" \ - "movl\t0x4(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x0(%%esp)" "\n\t" \ - "movl\t%%edx,0x4(%%esp)" "\n\t" \ - "movl\t0x8(%0),%%eax" "\n\t" \ - "movl\t0xC(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x8(%%esp)" "\n\t" \ - "movl\t%%edx,0xC(%%esp)" "\n\t" \ - DTRACE_CALL(provider, name) \ - "addl\t$0x10,%%esp" \ - : \ - : "r" (__dtrace_args) \ - : "memory", "eax", "edx" \ - ); - -#define DTRACE_CALL5ARGS(provider, name) \ - asm volatile ("subl\t$0x20,%%esp" "\n\t" \ - "movl\t0x0(%0),%%eax" "\n\t" \ - "movl\t0x4(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x0(%%esp)" "\n\t" \ - "movl\t%%edx,0x4(%%esp)" "\n\t" \ - "movl\t0x8(%0),%%eax" "\n\t" \ - "movl\t0xC(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x8(%%esp)" "\n\t" \ - "movl\t%%edx,0xC(%%esp)" "\n\t" \ - "movl\t0x10(%0),%%eax" "\n\t" \ - "movl\t%%eax,0x10(%%esp)" "\n\t" \ - DTRACE_CALL(provider, name) \ - "addl\t$0x20,%%esp" \ - : \ - : "r" (__dtrace_args) \ - : "memory", "eax", "edx" \ - ); - -#define DTRACE_CALL6ARGS(provider, name) \ - asm volatile ("subl\t$0x20,%%esp" "\n\t" \ - "movl\t0x0(%0),%%eax" "\n\t" \ - "movl\t0x4(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x0(%%esp)" "\n\t" \ - "movl\t%%edx,0x4(%%esp)" "\n\t" \ - "movl\t0x8(%0),%%eax" "\n\t" \ - "movl\t0xC(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x8(%%esp)" "\n\t" \ - "movl\t%%edx,0xC(%%esp)" "\n\t" \ - "movl\t0x10(%0),%%eax" "\n\t" \ - "movl\t0x14(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x10(%%esp)" "\n\t" \ - "movl\t%%edx,0x14(%%esp)" "\n\t" \ - DTRACE_CALL(provider, name) \ - "addl\t$0x20,%%esp" \ - : \ - : "r" (__dtrace_args) \ - : "memory", "eax", "edx" \ - ); - -#define DTRACE_CALL7ARGS(provider, name) \ - asm volatile ("subl\t$0x20,%%esp" "\n\t" \ - "movl\t0x0(%0),%%eax" "\n\t" \ - "movl\t0x4(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x0(%%esp)" "\n\t" \ - "movl\t%%edx,0x4(%%esp)" "\n\t" \ - "movl\t0x8(%0),%%eax" "\n\t" \ - "movl\t0xC(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x8(%%esp)" "\n\t" \ - "movl\t%%edx,0xC(%%esp)" "\n\t" \ - "movl\t0x10(%0),%%eax" "\n\t" \ - "movl\t0x14(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x10(%%esp)" "\n\t" \ - "movl\t%%edx,0x14(%%esp)" "\n\t" \ - "movl\t0x18(%0),%%eax" "\n\t" \ - "movl\t%%eax,0x18(%%esp)" "\n\t" \ - DTRACE_CALL(provider, name) \ - "addl\t$0x20,%%esp" \ - : \ - : "r" (__dtrace_args) \ - : "memory", "eax", "edx" \ - ); - -#define DTRACE_CALL8ARGS(provider, name) \ - asm volatile ("subl\t$0x20,%%esp" "\n\t" \ - "movl\t0x0(%0),%%eax" "\n\t" \ - "movl\t0x4(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x0(%%esp)" "\n\t" \ - "movl\t%%edx,0x4(%%esp)" "\n\t" \ - "movl\t0x8(%0),%%eax" "\n\t" \ - "movl\t0xC(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x8(%%esp)" "\n\t" \ - "movl\t%%edx,0xC(%%esp)" "\n\t" \ - "movl\t0x10(%0),%%eax" "\n\t" \ - "movl\t0x14(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x10(%%esp)" "\n\t" \ - "movl\t%%edx,0x14(%%esp)" "\n\t" \ - "movl\t0x18(%0),%%eax" "\n\t" \ - "movl\t0x1C(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x18(%%esp)" "\n\t" \ - "movl\t%%edx,0x1C(%%esp)" "\n\t" \ - DTRACE_CALL(provider, name) \ - "addl\t$0x20,%%esp" \ - : \ - : "r" (__dtrace_args) \ - : "memory", "eax", "edx" \ - ); - -#define DTRACE_CALL9ARGS(provider, name) \ - asm volatile ("subl\t$0x30,%%esp" "\n\t" \ - "movl\t0x0(%0),%%eax" "\n\t" \ - "movl\t0x4(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x0(%%esp)" "\n\t" \ - "movl\t%%edx,0x4(%%esp)" "\n\t" \ - "movl\t0x8(%0),%%eax" "\n\t" \ - "movl\t0xC(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x8(%%esp)" "\n\t" \ - "movl\t%%edx,0xC(%%esp)" "\n\t" \ - "movl\t0x10(%0),%%eax" "\n\t" \ - "movl\t0x14(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x10(%%esp)" "\n\t" \ - "movl\t%%edx,0x14(%%esp)" "\n\t" \ - "movl\t0x18(%0),%%eax" "\n\t" \ - "movl\t0x1C(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x18(%%esp)" "\n\t" \ - "movl\t%%edx,0x1C(%%esp)" "\n\t" \ - "movl\t0x20(%0),%%eax" "\n\t" \ - "movl\t%%eax,0x20(%%esp)" "\n\t" \ - DTRACE_CALL(provider, name) \ - "addl\t$0x30,%%esp" \ - : \ - : "r" (__dtrace_args) \ - : "memory", "eax", "edx" \ - ); - -#define DTRACE_CALL10ARGS(provider, name) \ - asm volatile ("subl\t$0x30,%%esp" "\n\t" \ - "movl\t0x0(%0),%%eax" "\n\t" \ - "movl\t0x4(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x0(%%esp)" "\n\t" \ - "movl\t%%edx,0x4(%%esp)" "\n\t" \ - "movl\t0x8(%0),%%eax" "\n\t" \ - "movl\t0xC(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x8(%%esp)" "\n\t" \ - "movl\t%%edx,0xC(%%esp)" "\n\t" \ - "movl\t0x10(%0),%%eax" "\n\t" \ - "movl\t0x14(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x10(%%esp)" "\n\t" \ - "movl\t%%edx,0x14(%%esp)" "\n\t" \ - "movl\t0x18(%0),%%eax" "\n\t" \ - "movl\t0x1C(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x18(%%esp)" "\n\t" \ - "movl\t%%edx,0x1C(%%esp)" "\n\t" \ - "movl\t0x20(%0),%%eax" "\n\t" \ - "movl\t0x24(%0),%%edx" "\n\t" \ - "movl\t%%eax,0x20(%%esp)" "\n\t" \ - "movl\t%%edx,0x24(%%esp)" "\n\t" \ - DTRACE_CALL(provider, name) \ - "addl\t$0x30,%%esp" \ - : \ - : "r" (__dtrace_args) \ - : "memory", "eax", "edx" \ - ); - -#endif // __i386__ - -#endif /* _MACH_I386_SDT_ISA_H */ diff --git a/i386/include/mach/i386/task.h b/i386/include/mach/i386/task.h deleted file mode 100644 index 15c8248..0000000 --- a/i386/include/mach/i386/task.h +++ /dev/null @@ -1,1578 +0,0 @@ -#ifndef _task_user_ -#define _task_user_ - -/* Module task */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef task_MSG_COUNT -#define task_MSG_COUNT 35 -#endif /* task_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mig.h> -#include <mach/mach_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine task_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_create -( - task_t target_task, - ledger_array_t ledgers, - mach_msg_type_number_t ledgersCnt, - boolean_t inherit_memory, - task_t *child_task -); - -/* Routine task_terminate */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_terminate -( - task_t target_task -); - -/* Routine task_threads */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_threads -( - task_t target_task, - thread_act_array_t *act_list, - mach_msg_type_number_t *act_listCnt -); - -/* Routine mach_ports_register */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_ports_register -( - task_t target_task, - mach_port_array_t init_port_set, - mach_msg_type_number_t init_port_setCnt -); - -/* Routine mach_ports_lookup */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_ports_lookup -( - task_t target_task, - mach_port_array_t *init_port_set, - mach_msg_type_number_t *init_port_setCnt -); - -/* Routine task_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_info -( - task_name_t target_task, - task_flavor_t flavor, - task_info_t task_info_out, - mach_msg_type_number_t *task_info_outCnt -); - -/* Routine task_set_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_info -( - task_t target_task, - task_flavor_t flavor, - task_info_t task_info_in, - mach_msg_type_number_t task_info_inCnt -); - -/* Routine task_suspend */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_suspend -( - task_t target_task -); - -/* Routine task_resume */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_resume -( - task_t target_task -); - -/* Routine task_get_special_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_get_special_port -( - task_t task, - int which_port, - mach_port_t *special_port -); - -/* Routine task_set_special_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_special_port -( - task_t task, - int which_port, - mach_port_t special_port -); - -/* Routine thread_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_create -( - task_t parent_task, - thread_act_t *child_act -); - -/* Routine thread_create_running */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_create_running -( - task_t parent_task, - thread_state_flavor_t flavor, - thread_state_t new_state, - mach_msg_type_number_t new_stateCnt, - thread_act_t *child_act -); - -/* Routine task_set_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_exception_ports -( - task_t task, - exception_mask_t exception_mask, - mach_port_t new_port, - exception_behavior_t behavior, - thread_state_flavor_t new_flavor -); - -/* Routine task_get_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_get_exception_ports -( - task_t task, - exception_mask_t exception_mask, - exception_mask_array_t masks, - mach_msg_type_number_t *masksCnt, - exception_handler_array_t old_handlers, - exception_behavior_array_t old_behaviors, - exception_flavor_array_t old_flavors -); - -/* Routine task_swap_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_swap_exception_ports -( - task_t task, - exception_mask_t exception_mask, - mach_port_t new_port, - exception_behavior_t behavior, - thread_state_flavor_t new_flavor, - exception_mask_array_t masks, - mach_msg_type_number_t *masksCnt, - exception_handler_array_t old_handlerss, - exception_behavior_array_t old_behaviors, - exception_flavor_array_t old_flavors -); - -/* Routine lock_set_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t lock_set_create -( - task_t task, - lock_set_t *new_lock_set, - int n_ulocks, - int policy -); - -/* Routine lock_set_destroy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t lock_set_destroy -( - task_t task, - lock_set_t lock_set -); - -/* Routine semaphore_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t semaphore_create -( - task_t task, - semaphore_t *semaphore, - int policy, - int value -); - -/* Routine semaphore_destroy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t semaphore_destroy -( - task_t task, - semaphore_t semaphore -); - -/* Routine task_policy_set */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_policy_set -( - task_t task, - task_policy_flavor_t flavor, - task_policy_t policy_info, - mach_msg_type_number_t policy_infoCnt -); - -/* Routine task_policy_get */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_policy_get -( - task_t task, - task_policy_flavor_t flavor, - task_policy_t policy_info, - mach_msg_type_number_t *policy_infoCnt, - boolean_t *get_default -); - -/* Routine task_sample */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_sample -( - task_t task, - mach_port_t reply -); - -/* Routine task_policy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_policy -( - task_t task, - policy_t policy, - policy_base_t base, - mach_msg_type_number_t baseCnt, - boolean_t set_limit, - boolean_t change -); - -/* Routine task_set_emulation */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_emulation -( - task_t target_port, - vm_address_t routine_entry_pt, - int routine_number -); - -/* Routine task_get_emulation_vector */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_get_emulation_vector -( - task_t task, - int *vector_start, - emulation_vector_t *emulation_vector, - mach_msg_type_number_t *emulation_vectorCnt -); - -/* Routine task_set_emulation_vector */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_emulation_vector -( - task_t task, - int vector_start, - emulation_vector_t emulation_vector, - mach_msg_type_number_t emulation_vectorCnt -); - -/* Routine task_set_ras_pc */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_ras_pc -( - task_t target_task, - vm_address_t basepc, - vm_address_t boundspc -); - -/* Routine task_assign */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_assign -( - task_t task, - processor_set_t new_set, - boolean_t assign_threads -); - -/* Routine task_assign_default */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_assign_default -( - task_t task, - boolean_t assign_threads -); - -/* Routine task_get_assignment */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_get_assignment -( - task_t task, - processor_set_name_t *assigned_set -); - -/* Routine task_set_policy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_policy -( - task_t task, - processor_set_t pset, - policy_t policy, - policy_base_t base, - mach_msg_type_number_t baseCnt, - policy_limit_t limit, - mach_msg_type_number_t limitCnt, - boolean_t change -); - -/* Routine task_get_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_get_state -( - task_t task, - thread_state_flavor_t flavor, - thread_state_t old_state, - mach_msg_type_number_t *old_stateCnt -); - -/* Routine task_set_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_state -( - task_t task, - thread_state_flavor_t flavor, - thread_state_t new_state, - mach_msg_type_number_t new_stateCnt -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__task_subsystem__defined -#define __Request__task_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_ports_descriptor_t ledgers; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t ledgersCnt; - boolean_t inherit_memory; - } __Request__task_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_terminate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_threads_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_ports_descriptor_t init_port_set; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t init_port_setCnt; - } __Request__mach_ports_register_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__mach_ports_lookup_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - task_flavor_t flavor; - mach_msg_type_number_t task_info_outCnt; - } __Request__task_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - task_flavor_t flavor; - mach_msg_type_number_t task_info_inCnt; - integer_t task_info_in[10]; - } __Request__task_set_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_suspend_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_resume_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int which_port; - } __Request__task_get_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t special_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - int which_port; - } __Request__task_set_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_state_flavor_t flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Request__thread_create_running_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_mask_t exception_mask; - exception_behavior_t behavior; - thread_state_flavor_t new_flavor; - } __Request__task_set_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_mask_t exception_mask; - } __Request__task_get_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_mask_t exception_mask; - exception_behavior_t behavior; - thread_state_flavor_t new_flavor; - } __Request__task_swap_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int n_ulocks; - int policy; - } __Request__lock_set_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t lock_set; - /* end of the kernel processed data */ - } __Request__lock_set_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int policy; - int value; - } __Request__semaphore_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t semaphore; - /* end of the kernel processed data */ - } __Request__semaphore_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - task_policy_flavor_t flavor; - mach_msg_type_number_t policy_infoCnt; - integer_t policy_info[16]; - } __Request__task_policy_set_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - task_policy_flavor_t flavor; - mach_msg_type_number_t policy_infoCnt; - boolean_t get_default; - } __Request__task_policy_get_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t reply; - /* end of the kernel processed data */ - } __Request__task_sample_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - policy_t policy; - mach_msg_type_number_t baseCnt; - integer_t base[5]; - boolean_t set_limit; - boolean_t change; - } __Request__task_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t routine_entry_pt; - int routine_number; - } __Request__task_set_emulation_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_get_emulation_vector_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t emulation_vector; - /* end of the kernel processed data */ - NDR_record_t NDR; - int vector_start; - mach_msg_type_number_t emulation_vectorCnt; - } __Request__task_set_emulation_vector_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t basepc; - vm_address_t boundspc; - } __Request__task_set_ras_pc_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_set; - /* end of the kernel processed data */ - NDR_record_t NDR; - boolean_t assign_threads; - } __Request__task_assign_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - boolean_t assign_threads; - } __Request__task_assign_default_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__task_get_assignment_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t pset; - /* end of the kernel processed data */ - NDR_record_t NDR; - policy_t policy; - mach_msg_type_number_t baseCnt; - integer_t base[5]; - mach_msg_type_number_t limitCnt; - integer_t limit[1]; - boolean_t change; - } __Request__task_set_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_state_flavor_t flavor; - mach_msg_type_number_t old_stateCnt; - } __Request__task_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_state_flavor_t flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Request__task_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__task_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__task_subsystem__defined -#define __RequestUnion__task_subsystem__defined -union __RequestUnion__task_subsystem { - __Request__task_create_t Request_task_create; - __Request__task_terminate_t Request_task_terminate; - __Request__task_threads_t Request_task_threads; - __Request__mach_ports_register_t Request_mach_ports_register; - __Request__mach_ports_lookup_t Request_mach_ports_lookup; - __Request__task_info_t Request_task_info; - __Request__task_set_info_t Request_task_set_info; - __Request__task_suspend_t Request_task_suspend; - __Request__task_resume_t Request_task_resume; - __Request__task_get_special_port_t Request_task_get_special_port; - __Request__task_set_special_port_t Request_task_set_special_port; - __Request__thread_create_t Request_thread_create; - __Request__thread_create_running_t Request_thread_create_running; - __Request__task_set_exception_ports_t Request_task_set_exception_ports; - __Request__task_get_exception_ports_t Request_task_get_exception_ports; - __Request__task_swap_exception_ports_t Request_task_swap_exception_ports; - __Request__lock_set_create_t Request_lock_set_create; - __Request__lock_set_destroy_t Request_lock_set_destroy; - __Request__semaphore_create_t Request_semaphore_create; - __Request__semaphore_destroy_t Request_semaphore_destroy; - __Request__task_policy_set_t Request_task_policy_set; - __Request__task_policy_get_t Request_task_policy_get; - __Request__task_sample_t Request_task_sample; - __Request__task_policy_t Request_task_policy; - __Request__task_set_emulation_t Request_task_set_emulation; - __Request__task_get_emulation_vector_t Request_task_get_emulation_vector; - __Request__task_set_emulation_vector_t Request_task_set_emulation_vector; - __Request__task_set_ras_pc_t Request_task_set_ras_pc; - __Request__task_assign_t Request_task_assign; - __Request__task_assign_default_t Request_task_assign_default; - __Request__task_get_assignment_t Request_task_get_assignment; - __Request__task_set_policy_t Request_task_set_policy; - __Request__task_get_state_t Request_task_get_state; - __Request__task_set_state_t Request_task_set_state; -}; -#endif /* !__RequestUnion__task_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__task_subsystem__defined -#define __Reply__task_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t child_task; - /* end of the kernel processed data */ - } __Reply__task_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_terminate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_ports_descriptor_t act_list; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t act_listCnt; - } __Reply__task_threads_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_ports_register_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_ports_descriptor_t init_port_set; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t init_port_setCnt; - } __Reply__mach_ports_lookup_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t task_info_outCnt; - integer_t task_info_out[10]; - } __Reply__task_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_suspend_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_resume_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t special_port; - /* end of the kernel processed data */ - } __Reply__task_get_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t child_act; - /* end of the kernel processed data */ - } __Reply__thread_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t child_act; - /* end of the kernel processed data */ - } __Reply__thread_create_running_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t old_handlers[32]; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t masksCnt; - exception_mask_t masks[32]; - exception_behavior_t old_behaviors[32]; - thread_state_flavor_t old_flavors[32]; - } __Reply__task_get_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t old_handlerss[32]; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t masksCnt; - exception_mask_t masks[32]; - exception_behavior_t old_behaviors[32]; - thread_state_flavor_t old_flavors[32]; - } __Reply__task_swap_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_lock_set; - /* end of the kernel processed data */ - } __Reply__lock_set_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__lock_set_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t semaphore; - /* end of the kernel processed data */ - } __Reply__semaphore_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__semaphore_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_policy_set_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t policy_infoCnt; - integer_t policy_info[16]; - boolean_t get_default; - } __Reply__task_policy_get_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_sample_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_emulation_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t emulation_vector; - /* end of the kernel processed data */ - NDR_record_t NDR; - int vector_start; - mach_msg_type_number_t emulation_vectorCnt; - } __Reply__task_get_emulation_vector_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_emulation_vector_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_ras_pc_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_assign_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_assign_default_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t assigned_set; - /* end of the kernel processed data */ - } __Reply__task_get_assignment_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Reply__task_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__task_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__task_subsystem__defined -#define __ReplyUnion__task_subsystem__defined -union __ReplyUnion__task_subsystem { - __Reply__task_create_t Reply_task_create; - __Reply__task_terminate_t Reply_task_terminate; - __Reply__task_threads_t Reply_task_threads; - __Reply__mach_ports_register_t Reply_mach_ports_register; - __Reply__mach_ports_lookup_t Reply_mach_ports_lookup; - __Reply__task_info_t Reply_task_info; - __Reply__task_set_info_t Reply_task_set_info; - __Reply__task_suspend_t Reply_task_suspend; - __Reply__task_resume_t Reply_task_resume; - __Reply__task_get_special_port_t Reply_task_get_special_port; - __Reply__task_set_special_port_t Reply_task_set_special_port; - __Reply__thread_create_t Reply_thread_create; - __Reply__thread_create_running_t Reply_thread_create_running; - __Reply__task_set_exception_ports_t Reply_task_set_exception_ports; - __Reply__task_get_exception_ports_t Reply_task_get_exception_ports; - __Reply__task_swap_exception_ports_t Reply_task_swap_exception_ports; - __Reply__lock_set_create_t Reply_lock_set_create; - __Reply__lock_set_destroy_t Reply_lock_set_destroy; - __Reply__semaphore_create_t Reply_semaphore_create; - __Reply__semaphore_destroy_t Reply_semaphore_destroy; - __Reply__task_policy_set_t Reply_task_policy_set; - __Reply__task_policy_get_t Reply_task_policy_get; - __Reply__task_sample_t Reply_task_sample; - __Reply__task_policy_t Reply_task_policy; - __Reply__task_set_emulation_t Reply_task_set_emulation; - __Reply__task_get_emulation_vector_t Reply_task_get_emulation_vector; - __Reply__task_set_emulation_vector_t Reply_task_set_emulation_vector; - __Reply__task_set_ras_pc_t Reply_task_set_ras_pc; - __Reply__task_assign_t Reply_task_assign; - __Reply__task_assign_default_t Reply_task_assign_default; - __Reply__task_get_assignment_t Reply_task_get_assignment; - __Reply__task_set_policy_t Reply_task_set_policy; - __Reply__task_get_state_t Reply_task_get_state; - __Reply__task_set_state_t Reply_task_set_state; -}; -#endif /* !__RequestUnion__task_subsystem__defined */ - -#ifndef subsystem_to_name_map_task -#define subsystem_to_name_map_task \ - { "task_create", 3400 },\ - { "task_terminate", 3401 },\ - { "task_threads", 3402 },\ - { "mach_ports_register", 3403 },\ - { "mach_ports_lookup", 3404 },\ - { "task_info", 3405 },\ - { "task_set_info", 3406 },\ - { "task_suspend", 3407 },\ - { "task_resume", 3408 },\ - { "task_get_special_port", 3409 },\ - { "task_set_special_port", 3410 },\ - { "thread_create", 3411 },\ - { "thread_create_running", 3412 },\ - { "task_set_exception_ports", 3413 },\ - { "task_get_exception_ports", 3414 },\ - { "task_swap_exception_ports", 3415 },\ - { "lock_set_create", 3416 },\ - { "lock_set_destroy", 3417 },\ - { "semaphore_create", 3418 },\ - { "semaphore_destroy", 3419 },\ - { "task_policy_set", 3420 },\ - { "task_policy_get", 3421 },\ - { "task_sample", 3422 },\ - { "task_policy", 3423 },\ - { "task_set_emulation", 3424 },\ - { "task_get_emulation_vector", 3425 },\ - { "task_set_emulation_vector", 3426 },\ - { "task_set_ras_pc", 3427 },\ - { "task_assign", 3429 },\ - { "task_assign_default", 3430 },\ - { "task_get_assignment", 3431 },\ - { "task_set_policy", 3432 },\ - { "task_get_state", 3433 },\ - { "task_set_state", 3434 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _task_user_ */ diff --git a/i386/include/mach/i386/thread_act.h b/i386/include/mach/i386/thread_act.h deleted file mode 100644 index fde4189..0000000 --- a/i386/include/mach/i386/thread_act.h +++ /dev/null @@ -1,1155 +0,0 @@ -#ifndef _thread_act_user_ -#define _thread_act_user_ - -/* Module thread_act */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef thread_act_MSG_COUNT -#define thread_act_MSG_COUNT 25 -#endif /* thread_act_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mig.h> -#include <mach/mach_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine thread_terminate */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_terminate -( - thread_act_t target_act -); - -/* Routine act_get_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t act_get_state -( - thread_act_t target_act, - int flavor, - thread_state_t old_state, - mach_msg_type_number_t *old_stateCnt -); - -/* Routine act_set_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t act_set_state -( - thread_act_t target_act, - int flavor, - thread_state_t new_state, - mach_msg_type_number_t new_stateCnt -); - -/* Routine thread_get_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_get_state -( - thread_act_t target_act, - thread_state_flavor_t flavor, - thread_state_t old_state, - mach_msg_type_number_t *old_stateCnt -); - -/* Routine thread_set_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_set_state -( - thread_act_t target_act, - thread_state_flavor_t flavor, - thread_state_t new_state, - mach_msg_type_number_t new_stateCnt -); - -/* Routine thread_suspend */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_suspend -( - thread_act_t target_act -); - -/* Routine thread_resume */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_resume -( - thread_act_t target_act -); - -/* Routine thread_abort */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_abort -( - thread_act_t target_act -); - -/* Routine thread_abort_safely */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_abort_safely -( - thread_act_t target_act -); - -/* Routine thread_depress_abort */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_depress_abort -( - thread_act_t thread -); - -/* Routine thread_get_special_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_get_special_port -( - thread_act_t thr_act, - int which_port, - mach_port_t *special_port -); - -/* Routine thread_set_special_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_set_special_port -( - thread_act_t thr_act, - int which_port, - mach_port_t special_port -); - -/* Routine thread_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_info -( - thread_act_t target_act, - thread_flavor_t flavor, - thread_info_t thread_info_out, - mach_msg_type_number_t *thread_info_outCnt -); - -/* Routine thread_set_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_set_exception_ports -( - thread_act_t thread, - exception_mask_t exception_mask, - mach_port_t new_port, - exception_behavior_t behavior, - thread_state_flavor_t new_flavor -); - -/* Routine thread_get_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_get_exception_ports -( - thread_act_t thread, - exception_mask_t exception_mask, - exception_mask_array_t masks, - mach_msg_type_number_t *masksCnt, - exception_handler_array_t old_handlers, - exception_behavior_array_t old_behaviors, - exception_flavor_array_t old_flavors -); - -/* Routine thread_swap_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_swap_exception_ports -( - thread_act_t thread, - exception_mask_t exception_mask, - mach_port_t new_port, - exception_behavior_t behavior, - thread_state_flavor_t new_flavor, - exception_mask_array_t masks, - mach_msg_type_number_t *masksCnt, - exception_handler_array_t old_handlers, - exception_behavior_array_t old_behaviors, - exception_flavor_array_t old_flavors -); - -/* Routine thread_policy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_policy -( - thread_act_t thr_act, - policy_t policy, - policy_base_t base, - mach_msg_type_number_t baseCnt, - boolean_t set_limit -); - -/* Routine thread_policy_set */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_policy_set -( - thread_act_t thread, - thread_policy_flavor_t flavor, - thread_policy_t policy_info, - mach_msg_type_number_t policy_infoCnt -); - -/* Routine thread_policy_get */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_policy_get -( - thread_act_t thread, - thread_policy_flavor_t flavor, - thread_policy_t policy_info, - mach_msg_type_number_t *policy_infoCnt, - boolean_t *get_default -); - -/* Routine thread_sample */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_sample -( - thread_act_t thread, - mach_port_t reply -); - -/* Routine etap_trace_thread */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t etap_trace_thread -( - thread_act_t target_act, - boolean_t trace_status -); - -/* Routine thread_assign */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_assign -( - thread_act_t thread, - processor_set_t new_set -); - -/* Routine thread_assign_default */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_assign_default -( - thread_act_t thread -); - -/* Routine thread_get_assignment */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_get_assignment -( - thread_act_t thread, - processor_set_name_t *assigned_set -); - -/* Routine thread_set_policy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_set_policy -( - thread_act_t thr_act, - processor_set_t pset, - policy_t policy, - policy_base_t base, - mach_msg_type_number_t baseCnt, - policy_limit_t limit, - mach_msg_type_number_t limitCnt -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__thread_act_subsystem__defined -#define __Request__thread_act_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_terminate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int flavor; - mach_msg_type_number_t old_stateCnt; - } __Request__act_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Request__act_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_state_flavor_t flavor; - mach_msg_type_number_t old_stateCnt; - } __Request__thread_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_state_flavor_t flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Request__thread_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_suspend_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_resume_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_abort_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_abort_safely_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_depress_abort_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int which_port; - } __Request__thread_get_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t special_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - int which_port; - } __Request__thread_set_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_flavor_t flavor; - mach_msg_type_number_t thread_info_outCnt; - } __Request__thread_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_mask_t exception_mask; - exception_behavior_t behavior; - thread_state_flavor_t new_flavor; - } __Request__thread_set_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_mask_t exception_mask; - } __Request__thread_get_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_mask_t exception_mask; - exception_behavior_t behavior; - thread_state_flavor_t new_flavor; - } __Request__thread_swap_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - policy_t policy; - mach_msg_type_number_t baseCnt; - integer_t base[5]; - boolean_t set_limit; - } __Request__thread_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_policy_flavor_t flavor; - mach_msg_type_number_t policy_infoCnt; - integer_t policy_info[16]; - } __Request__thread_policy_set_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - thread_policy_flavor_t flavor; - mach_msg_type_number_t policy_infoCnt; - boolean_t get_default; - } __Request__thread_policy_get_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t reply; - /* end of the kernel processed data */ - } __Request__thread_sample_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - boolean_t trace_status; - } __Request__etap_trace_thread_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_set; - /* end of the kernel processed data */ - } __Request__thread_assign_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_assign_default_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__thread_get_assignment_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t pset; - /* end of the kernel processed data */ - NDR_record_t NDR; - policy_t policy; - mach_msg_type_number_t baseCnt; - integer_t base[5]; - mach_msg_type_number_t limitCnt; - integer_t limit[1]; - } __Request__thread_set_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__thread_act_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__thread_act_subsystem__defined -#define __RequestUnion__thread_act_subsystem__defined -union __RequestUnion__thread_act_subsystem { - __Request__thread_terminate_t Request_thread_terminate; - __Request__act_get_state_t Request_act_get_state; - __Request__act_set_state_t Request_act_set_state; - __Request__thread_get_state_t Request_thread_get_state; - __Request__thread_set_state_t Request_thread_set_state; - __Request__thread_suspend_t Request_thread_suspend; - __Request__thread_resume_t Request_thread_resume; - __Request__thread_abort_t Request_thread_abort; - __Request__thread_abort_safely_t Request_thread_abort_safely; - __Request__thread_depress_abort_t Request_thread_depress_abort; - __Request__thread_get_special_port_t Request_thread_get_special_port; - __Request__thread_set_special_port_t Request_thread_set_special_port; - __Request__thread_info_t Request_thread_info; - __Request__thread_set_exception_ports_t Request_thread_set_exception_ports; - __Request__thread_get_exception_ports_t Request_thread_get_exception_ports; - __Request__thread_swap_exception_ports_t Request_thread_swap_exception_ports; - __Request__thread_policy_t Request_thread_policy; - __Request__thread_policy_set_t Request_thread_policy_set; - __Request__thread_policy_get_t Request_thread_policy_get; - __Request__thread_sample_t Request_thread_sample; - __Request__etap_trace_thread_t Request_etap_trace_thread; - __Request__thread_assign_t Request_thread_assign; - __Request__thread_assign_default_t Request_thread_assign_default; - __Request__thread_get_assignment_t Request_thread_get_assignment; - __Request__thread_set_policy_t Request_thread_set_policy; -}; -#endif /* !__RequestUnion__thread_act_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__thread_act_subsystem__defined -#define __Reply__thread_act_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_terminate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Reply__act_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__act_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Reply__thread_get_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_set_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_suspend_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_resume_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_abort_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_abort_safely_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_depress_abort_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t special_port; - /* end of the kernel processed data */ - } __Reply__thread_get_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_set_special_port_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t thread_info_outCnt; - integer_t thread_info_out[12]; - } __Reply__thread_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_set_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t old_handlers[32]; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t masksCnt; - exception_mask_t masks[32]; - exception_behavior_t old_behaviors[32]; - thread_state_flavor_t old_flavors[32]; - } __Reply__thread_get_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t old_handlers[32]; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t masksCnt; - exception_mask_t masks[32]; - exception_behavior_t old_behaviors[32]; - thread_state_flavor_t old_flavors[32]; - } __Reply__thread_swap_exception_ports_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_policy_set_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t policy_infoCnt; - integer_t policy_info[16]; - boolean_t get_default; - } __Reply__thread_policy_get_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_sample_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__etap_trace_thread_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_assign_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_assign_default_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t assigned_set; - /* end of the kernel processed data */ - } __Reply__thread_get_assignment_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__thread_set_policy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__thread_act_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__thread_act_subsystem__defined -#define __ReplyUnion__thread_act_subsystem__defined -union __ReplyUnion__thread_act_subsystem { - __Reply__thread_terminate_t Reply_thread_terminate; - __Reply__act_get_state_t Reply_act_get_state; - __Reply__act_set_state_t Reply_act_set_state; - __Reply__thread_get_state_t Reply_thread_get_state; - __Reply__thread_set_state_t Reply_thread_set_state; - __Reply__thread_suspend_t Reply_thread_suspend; - __Reply__thread_resume_t Reply_thread_resume; - __Reply__thread_abort_t Reply_thread_abort; - __Reply__thread_abort_safely_t Reply_thread_abort_safely; - __Reply__thread_depress_abort_t Reply_thread_depress_abort; - __Reply__thread_get_special_port_t Reply_thread_get_special_port; - __Reply__thread_set_special_port_t Reply_thread_set_special_port; - __Reply__thread_info_t Reply_thread_info; - __Reply__thread_set_exception_ports_t Reply_thread_set_exception_ports; - __Reply__thread_get_exception_ports_t Reply_thread_get_exception_ports; - __Reply__thread_swap_exception_ports_t Reply_thread_swap_exception_ports; - __Reply__thread_policy_t Reply_thread_policy; - __Reply__thread_policy_set_t Reply_thread_policy_set; - __Reply__thread_policy_get_t Reply_thread_policy_get; - __Reply__thread_sample_t Reply_thread_sample; - __Reply__etap_trace_thread_t Reply_etap_trace_thread; - __Reply__thread_assign_t Reply_thread_assign; - __Reply__thread_assign_default_t Reply_thread_assign_default; - __Reply__thread_get_assignment_t Reply_thread_get_assignment; - __Reply__thread_set_policy_t Reply_thread_set_policy; -}; -#endif /* !__RequestUnion__thread_act_subsystem__defined */ - -#ifndef subsystem_to_name_map_thread_act -#define subsystem_to_name_map_thread_act \ - { "thread_terminate", 3600 },\ - { "act_get_state", 3601 },\ - { "act_set_state", 3602 },\ - { "thread_get_state", 3603 },\ - { "thread_set_state", 3604 },\ - { "thread_suspend", 3605 },\ - { "thread_resume", 3606 },\ - { "thread_abort", 3607 },\ - { "thread_abort_safely", 3608 },\ - { "thread_depress_abort", 3609 },\ - { "thread_get_special_port", 3610 },\ - { "thread_set_special_port", 3611 },\ - { "thread_info", 3612 },\ - { "thread_set_exception_ports", 3613 },\ - { "thread_get_exception_ports", 3614 },\ - { "thread_swap_exception_ports", 3615 },\ - { "thread_policy", 3616 },\ - { "thread_policy_set", 3617 },\ - { "thread_policy_get", 3618 },\ - { "thread_sample", 3619 },\ - { "etap_trace_thread", 3620 },\ - { "thread_assign", 3621 },\ - { "thread_assign_default", 3622 },\ - { "thread_get_assignment", 3623 },\ - { "thread_set_policy", 3624 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _thread_act_user_ */ diff --git a/i386/include/mach/i386/thread_state.h b/i386/include/mach/i386/thread_state.h deleted file mode 100644 index dba05b9..0000000 --- a/i386/include/mach/i386/thread_state.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -#ifndef _MACH_I386_THREAD_STATE_H_ -#define _MACH_I386_THREAD_STATE_H_ - -/* Size of maximum exported thread state in words */ -#define I386_THREAD_STATE_MAX (144) /* Size of biggest state possible */ - -#if defined (__i386__) || defined(__x86_64__) -#define THREAD_STATE_MAX I386_THREAD_STATE_MAX -#endif - -#endif /* _MACH_I386_THREAD_STATE_H_ */ diff --git a/i386/include/mach/i386/thread_status.h b/i386/include/mach/i386/thread_status.h deleted file mode 100644 index 65773e3..0000000 --- a/i386/include/mach/i386/thread_status.h +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: thread_status.h - * Author: Avadis Tevanian, Jr. - * Date: 1985 - * - * This file contains the structure definitions for the thread - * state as applied to I386 processors. - */ - -#ifndef _MACH_I386_THREAD_STATUS_H_ -#define _MACH_I386_THREAD_STATUS_H_ - -#include <mach/i386/_structs.h> -#include <mach/message.h> -#include <mach/i386/fp_reg.h> -#include <mach/i386/thread_state.h> -#include <i386/eflags.h> - -/* - * the i386_xxxx form is kept for legacy purposes since these types - * are externally known... eventually they should be deprecated. - * our internal implementation has moved to the following naming convention - * - * x86_xxxx32 names are used to deal with 32 bit states - * x86_xxxx64 names are used to deal with 64 bit states - * x86_xxxx names are used to deal with either 32 or 64 bit states - * via a self-describing mechanism - */ - -/* - * these are the legacy names which should be deprecated in the future - * they are externally known which is the only reason we don't just get - * rid of them - */ -#define i386_THREAD_STATE 1 -#define i386_FLOAT_STATE 2 -#define i386_EXCEPTION_STATE 3 - -/* - * THREAD_STATE_FLAVOR_LIST 0 - * these are the supported flavors - */ -#define x86_THREAD_STATE32 1 -#define x86_FLOAT_STATE32 2 -#define x86_EXCEPTION_STATE32 3 -#define x86_THREAD_STATE64 4 -#define x86_FLOAT_STATE64 5 -#define x86_EXCEPTION_STATE64 6 -#define x86_THREAD_STATE 7 -#define x86_FLOAT_STATE 8 -#define x86_EXCEPTION_STATE 9 -#define x86_DEBUG_STATE32 10 -#define x86_DEBUG_STATE64 11 -#define x86_DEBUG_STATE 12 -#define THREAD_STATE_NONE 13 - -/* - * Largest state on this machine: - * (be sure mach/machine/thread_state.h matches!) - */ -#define THREAD_MACHINE_STATE_MAX THREAD_STATE_MAX - -/* - * VALID_THREAD_STATE_FLAVOR is a platform specific macro that when passed - * an exception flavor will return if that is a defined flavor for that - * platform. The macro must be manually updated to include all of the valid - * exception flavors as defined above. - */ -#define VALID_THREAD_STATE_FLAVOR(x) \ - ((x == x86_THREAD_STATE32) || \ - (x == x86_FLOAT_STATE32) || \ - (x == x86_EXCEPTION_STATE32) || \ - (x == x86_DEBUG_STATE32) || \ - (x == x86_THREAD_STATE64) || \ - (x == x86_FLOAT_STATE64) || \ - (x == x86_EXCEPTION_STATE64) || \ - (x == x86_DEBUG_STATE64) || \ - (x == x86_THREAD_STATE) || \ - (x == x86_FLOAT_STATE) || \ - (x == x86_EXCEPTION_STATE) || \ - (x == x86_DEBUG_STATE) || \ - (x == THREAD_STATE_NONE)) - -struct x86_state_hdr { - int flavor; - int count; -}; -typedef struct x86_state_hdr x86_state_hdr_t; - -/* - * Default segment register values. - */ - -#define USER_CODE_SELECTOR 0x0017 -#define USER_DATA_SELECTOR 0x001f -#define KERN_CODE_SELECTOR 0x0008 -#define KERN_DATA_SELECTOR 0x0010 - -/* - * to be deprecated in the future - */ -typedef _STRUCT_X86_THREAD_STATE32 i386_thread_state_t; -#define i386_THREAD_STATE_COUNT ((mach_msg_type_number_t) \ - ( sizeof (i386_thread_state_t) / sizeof (int) )) - -typedef _STRUCT_X86_THREAD_STATE32 x86_thread_state32_t; -#define x86_THREAD_STATE32_COUNT ((mach_msg_type_number_t) \ - ( sizeof (x86_thread_state32_t) / sizeof (int) )) - -/* - * to be deprecated in the future - */ -typedef _STRUCT_X86_FLOAT_STATE32 i386_float_state_t; -#define i386_FLOAT_STATE_COUNT ((mach_msg_type_number_t) \ - (sizeof(i386_float_state_t)/sizeof(unsigned int))) - -typedef _STRUCT_X86_FLOAT_STATE32 x86_float_state32_t; -#define x86_FLOAT_STATE32_COUNT ((mach_msg_type_number_t) \ - (sizeof(x86_float_state32_t)/sizeof(unsigned int))) - -/* - * to be deprecated in the future - */ -typedef _STRUCT_X86_EXCEPTION_STATE32 i386_exception_state_t; -#define i386_EXCEPTION_STATE_COUNT ((mach_msg_type_number_t) \ - ( sizeof (i386_exception_state_t) / sizeof (int) )) - -typedef _STRUCT_X86_EXCEPTION_STATE32 x86_exception_state32_t; -#define x86_EXCEPTION_STATE32_COUNT ((mach_msg_type_number_t) \ - ( sizeof (x86_exception_state32_t) / sizeof (int) )) - -#define I386_EXCEPTION_STATE_COUNT i386_EXCEPTION_STATE_COUNT - -typedef _STRUCT_X86_DEBUG_STATE32 x86_debug_state32_t; -#define x86_DEBUG_STATE32_COUNT ((mach_msg_type_number_t) \ - ( sizeof (x86_debug_state32_t) / sizeof (int) )) - -#define X86_DEBUG_STATE32_COUNT x86_DEBUG_STATE32_COUNT - -typedef _STRUCT_X86_THREAD_STATE64 x86_thread_state64_t; -#define x86_THREAD_STATE64_COUNT ((mach_msg_type_number_t) \ - ( sizeof (x86_thread_state64_t) / sizeof (int) )) - -typedef _STRUCT_X86_FLOAT_STATE64 x86_float_state64_t; -#define x86_FLOAT_STATE64_COUNT ((mach_msg_type_number_t) \ - (sizeof(x86_float_state64_t)/sizeof(unsigned int))) - -typedef _STRUCT_X86_EXCEPTION_STATE64 x86_exception_state64_t; -#define x86_EXCEPTION_STATE64_COUNT ((mach_msg_type_number_t) \ - ( sizeof (x86_exception_state64_t) / sizeof (int) )) - -#define X86_EXCEPTION_STATE64_COUNT x86_EXCEPTION_STATE64_COUNT - -typedef _STRUCT_X86_DEBUG_STATE64 x86_debug_state64_t; -#define x86_DEBUG_STATE64_COUNT ((mach_msg_type_number_t) \ - ( sizeof (x86_debug_state64_t) / sizeof (int) )) - -#define X86_DEBUG_STATE64_COUNT x86_DEBUG_STATE64_COUNT - -/* - * Combined thread, float and exception states - */ -struct x86_thread_state { - x86_state_hdr_t tsh; - union { - x86_thread_state32_t ts32; - x86_thread_state64_t ts64; - } uts; -}; - -struct x86_float_state { - x86_state_hdr_t fsh; - union { - x86_float_state32_t fs32; - x86_float_state64_t fs64; - } ufs; -}; - -struct x86_exception_state { - x86_state_hdr_t esh; - union { - x86_exception_state32_t es32; - x86_exception_state64_t es64; - } ues; -}; - -struct x86_debug_state { - x86_state_hdr_t dsh; - union { - x86_debug_state32_t ds32; - x86_debug_state64_t ds64; - } uds; -}; - -typedef struct x86_thread_state x86_thread_state_t; -#define x86_THREAD_STATE_COUNT ((mach_msg_type_number_t) \ - ( sizeof (x86_thread_state_t) / sizeof (int) )) - -typedef struct x86_float_state x86_float_state_t; -#define x86_FLOAT_STATE_COUNT ((mach_msg_type_number_t) \ - (sizeof(x86_float_state_t)/sizeof(unsigned int))) - -typedef struct x86_exception_state x86_exception_state_t; -#define x86_EXCEPTION_STATE_COUNT ((mach_msg_type_number_t) \ - (sizeof(x86_exception_state_t)/sizeof(unsigned int))) - -typedef struct x86_debug_state x86_debug_state_t; -#define x86_DEBUG_STATE_COUNT ((mach_msg_type_number_t) \ - (sizeof(x86_debug_state_t)/sizeof(unsigned int))) - -/* - * Machine-independent way for servers and Mach's exception mechanism to - * choose the most efficient state flavor for exception RPC's: - */ -#define MACHINE_THREAD_STATE x86_THREAD_STATE -#define MACHINE_THREAD_STATE_COUNT x86_THREAD_STATE_COUNT - -/* - * when reloading the segment registers on - * a return out of the kernel, we may take - * a GeneralProtection or SegmentNotPresent - * fault if one or more of the segment - * registers in the saved state was improperly - * specified via an x86_THREAD_STATE32 call - * the frame we push on top of the existing - * save area looks like this... we need to - * carry this as part of the save area - * in case we get hit so that we have a big - * enough stack - */ -struct x86_seg_load_fault32 { - unsigned int trapno; - unsigned int err; - unsigned int eip; - unsigned int cs; - unsigned int efl; -}; - - -#endif /* _MACH_I386_THREAD_STATUS_H_ */ diff --git a/i386/include/mach/i386/vm_param.h b/i386/include/mach/i386/vm_param.h deleted file mode 100644 index edcb834..0000000 --- a/i386/include/mach/i386/vm_param.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ - -/* - * Copyright (c) 1994 The University of Utah and - * the Computer Systems Laboratory at the University of Utah (CSL). - * All rights reserved. - * - * Permission to use, copy, modify and distribute this software is hereby - * granted provided that (1) source code retains these copyright, permission, - * and disclaimer notices, and (2) redistributions including binaries - * reproduce the notices in supporting documentation, and (3) all advertising - * materials mentioning features or use of this software display the following - * acknowledgement: ``This product includes software developed by the - * Computer Systems Laboratory at the University of Utah.'' - * - * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS - * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF - * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * CSL requests users of this software to return to csl-dist@cs.utah.edu any - * improvements that they make and grant CSL redistribution rights. - * - */ - -/* - * File: vm_param.h - * Author: Avadis Tevanian, Jr. - * Date: 1985 - * - * I386 machine dependent virtual memory parameters. - * Most of the declarations are preceeded by I386_ (or i386_) - * which is OK because only I386 specific code will be using - * them. - */ - -#ifndef _MACH_I386_VM_PARAM_H_ -#define _MACH_I386_VM_PARAM_H_ - -#define BYTE_SIZE 8 /* byte size in bits */ - -#define I386_PGBYTES 4096 /* bytes per 80386 page */ -#define I386_PGSHIFT 12 /* bitshift for pages */ - -#define PAGE_SIZE I386_PGBYTES -#define PAGE_SHIFT I386_PGSHIFT -#define PAGE_MASK (PAGE_SIZE - 1) - -#define I386_LPGBYTES 2*1024*1024 /* bytes per large page */ -#define I386_LPGSHIFT 21 /* bitshift for large pages */ -#define I386_LPGMASK (I386_LPGBYTES-1) - -/* - * Convert bytes to pages and convert pages to bytes. - * No rounding is used. - */ - -#define i386_btop(x) ((ppnum_t)((x) >> I386_PGSHIFT)) -#define machine_btop(x) i386_btop(x) -#define i386_ptob(x) (((pmap_paddr_t)(x)) << I386_PGSHIFT) - -/* - * Round off or truncate to the nearest page. These will work - * for either addresses or counts. (i.e. 1 byte rounds to 1 page - * bytes. - */ - -#define i386_round_page(x) ((((pmap_paddr_t)(x)) + I386_PGBYTES - 1) & \ - ~(I386_PGBYTES-1)) -#define i386_trunc_page(x) (((pmap_paddr_t)(x)) & ~(I386_PGBYTES-1)) - - - -#define VM_MIN_ADDRESS64 ((user_addr_t) 0x0000000000000000ULL) -/* - * default top of user stack... it grows down from here - */ -#define VM_USRSTACK64 ((user_addr_t) 0x00007FFF5FC00000ULL) -#define VM_DYLD64 ((user_addr_t) 0x00007FFF5FC00000ULL) -#define VM_LIB64_SHR_DATA ((user_addr_t) 0x00007FFF60000000ULL) -#define VM_LIB64_SHR_TEXT ((user_addr_t) 0x00007FFF80000000ULL) -/* - * the end of the usable user address space , for now about 47 bits. - * the 64 bit commpage is past the end of this - */ -#define VM_MAX_PAGE_ADDRESS ((user_addr_t) 0x00007FFFFFE00000ULL) -/* - * canonical end of user address space for limits checking - */ -#define VM_MAX_USER_PAGE_ADDRESS ((user_addr_t)0x00007FFFFFFFF000ULL) - - -/* system-wide values */ -#define MACH_VM_MIN_ADDRESS ((mach_vm_offset_t) 0) -#define MACH_VM_MAX_ADDRESS ((mach_vm_offset_t) VM_MAX_PAGE_ADDRESS) - -/* process-relative values (all 32-bit legacy only for now) */ -#define VM_MIN_ADDRESS ((vm_offset_t) 0) -#define VM_USRSTACK32 ((vm_offset_t) 0xC0000000) -#define VM_MAX_ADDRESS ((vm_offset_t) 0xFFE00000) - - - -#endif /* _MACH_I386_VM_PARAM_H_ */ diff --git a/i386/include/mach/i386/vm_types.h b/i386/include/mach/i386/vm_types.h deleted file mode 100644 index 2c38fa2..0000000 --- a/i386/include/mach/i386/vm_types.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ - -/* - * File: vm_types.h - * Author: Avadis Tevanian, Jr. - * Date: 1985 - * - * Header file for VM data types. I386 version. - */ - -#ifndef _MACH_I386_VM_TYPES_H_ -#define _MACH_I386_VM_TYPES_H_ - -#ifndef ASSEMBLER - -#include <i386/_types.h> -#include <mach/i386/vm_param.h> -#include <stdint.h> - -/* - * natural_t and integer_t are Mach's legacy types for machine- - * independent integer types (unsigned, and signed, respectively). - * Their original purpose was to define other types in a machine/ - * compiler independent way. - * - * They also had an implicit "same size as pointer" characteristic - * to them (i.e. Mach's traditional types are very ILP32 or ILP64 - * centric). We support x86 ABIs that do not follow either of - * these models (specifically LP64). Therefore, we had to make a - * choice between making these types scale with pointers or stay - * tied to integers. Because their use is predominantly tied to - * to the size of an integer, we are keeping that association and - * breaking free from pointer size guarantees. - * - * New use of these types is discouraged. - */ -typedef __darwin_natural_t natural_t; -typedef int integer_t; - -/* - * A vm_offset_t is a type-neutral pointer, - * e.g. an offset into a virtual memory space. - */ -#ifdef __LP64__ -typedef uintptr_t vm_offset_t; -#else /* __LP64__ */ -typedef natural_t vm_offset_t; -#endif /* __LP64__ */ - -/* - * A vm_size_t is the proper type for e.g. - * expressing the difference between two - * vm_offset_t entities. - */ -#ifdef __LP64__ -typedef uintptr_t vm_size_t; -#else /* __LP64__ */ -typedef natural_t vm_size_t; -#endif /* __LP64__ */ - -/* - * This new type is independent of a particular vm map's - * implementation size - and represents appropriate types - * for all possible maps. This is used for interfaces - * where the size of the map is not known - or we don't - * want to have to distinguish. - */ -typedef uint64_t mach_vm_address_t; -typedef uint64_t mach_vm_offset_t; -typedef uint64_t mach_vm_size_t; - -typedef uint64_t vm_map_offset_t; -typedef uint64_t vm_map_address_t; -typedef uint64_t vm_map_size_t; - - -#endif /* ASSEMBLER */ - -/* - * If composing messages by hand (please do not) - */ -#define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32 - -#endif /* _MACH_I386_VM_TYPES_H_ */ diff --git a/i386/include/mach/kern_return.h b/i386/include/mach/kern_return.h deleted file mode 100644 index da73236..0000000 --- a/i386/include/mach/kern_return.h +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: h/kern_return.h - * Author: Avadis Tevanian, Jr. - * Date: 1985 - * - * Kernel return codes. - * - */ - -#ifndef _MACH_KERN_RETURN_H_ -#define _MACH_KERN_RETURN_H_ - -#include <mach/machine/kern_return.h> - -#define KERN_SUCCESS 0 - -#define KERN_INVALID_ADDRESS 1 - /* Specified address is not currently valid. - */ - -#define KERN_PROTECTION_FAILURE 2 - /* Specified memory is valid, but does not permit the - * required forms of access. - */ - -#define KERN_NO_SPACE 3 - /* The address range specified is already in use, or - * no address range of the size specified could be - * found. - */ - -#define KERN_INVALID_ARGUMENT 4 - /* The function requested was not applicable to this - * type of argument, or an argument is invalid - */ - -#define KERN_FAILURE 5 - /* The function could not be performed. A catch-all. - */ - -#define KERN_RESOURCE_SHORTAGE 6 - /* A system resource could not be allocated to fulfill - * this request. This failure may not be permanent. - */ - -#define KERN_NOT_RECEIVER 7 - /* The task in question does not hold receive rights - * for the port argument. - */ - -#define KERN_NO_ACCESS 8 - /* Bogus access restriction. - */ - -#define KERN_MEMORY_FAILURE 9 - /* During a page fault, the target address refers to a - * memory object that has been destroyed. This - * failure is permanent. - */ - -#define KERN_MEMORY_ERROR 10 - /* During a page fault, the memory object indicated - * that the data could not be returned. This failure - * may be temporary; future attempts to access this - * same data may succeed, as defined by the memory - * object. - */ - -#define KERN_ALREADY_IN_SET 11 - /* The receive right is already a member of the portset. - */ - -#define KERN_NOT_IN_SET 12 - /* The receive right is not a member of a port set. - */ - -#define KERN_NAME_EXISTS 13 - /* The name already denotes a right in the task. - */ - -#define KERN_ABORTED 14 - /* The operation was aborted. Ipc code will - * catch this and reflect it as a message error. - */ - -#define KERN_INVALID_NAME 15 - /* The name doesn't denote a right in the task. - */ - -#define KERN_INVALID_TASK 16 - /* Target task isn't an active task. - */ - -#define KERN_INVALID_RIGHT 17 - /* The name denotes a right, but not an appropriate right. - */ - -#define KERN_INVALID_VALUE 18 - /* A blatant range error. - */ - -#define KERN_UREFS_OVERFLOW 19 - /* Operation would overflow limit on user-references. - */ - -#define KERN_INVALID_CAPABILITY 20 - /* The supplied (port) capability is improper. - */ - -#define KERN_RIGHT_EXISTS 21 - /* The task already has send or receive rights - * for the port under another name. - */ - -#define KERN_INVALID_HOST 22 - /* Target host isn't actually a host. - */ - -#define KERN_MEMORY_PRESENT 23 - /* An attempt was made to supply "precious" data - * for memory that is already present in a - * memory object. - */ - -#define KERN_MEMORY_DATA_MOVED 24 - /* A page was requested of a memory manager via - * memory_object_data_request for an object using - * a MEMORY_OBJECT_COPY_CALL strategy, with the - * VM_PROT_WANTS_COPY flag being used to specify - * that the page desired is for a copy of the - * object, and the memory manager has detected - * the page was pushed into a copy of the object - * while the kernel was walking the shadow chain - * from the copy to the object. This error code - * is delivered via memory_object_data_error - * and is handled by the kernel (it forces the - * kernel to restart the fault). It will not be - * seen by users. - */ - -#define KERN_MEMORY_RESTART_COPY 25 - /* A strategic copy was attempted of an object - * upon which a quicker copy is now possible. - * The caller should retry the copy using - * vm_object_copy_quickly. This error code - * is seen only by the kernel. - */ - -#define KERN_INVALID_PROCESSOR_SET 26 - /* An argument applied to assert processor set privilege - * was not a processor set control port. - */ - -#define KERN_POLICY_LIMIT 27 - /* The specified scheduling attributes exceed the thread's - * limits. - */ - -#define KERN_INVALID_POLICY 28 - /* The specified scheduling policy is not currently - * enabled for the processor set. - */ - -#define KERN_INVALID_OBJECT 29 - /* The external memory manager failed to initialize the - * memory object. - */ - -#define KERN_ALREADY_WAITING 30 - /* A thread is attempting to wait for an event for which - * there is already a waiting thread. - */ - -#define KERN_DEFAULT_SET 31 - /* An attempt was made to destroy the default processor - * set. - */ - -#define KERN_EXCEPTION_PROTECTED 32 - /* An attempt was made to fetch an exception port that is - * protected, or to abort a thread while processing a - * protected exception. - */ - -#define KERN_INVALID_LEDGER 33 - /* A ledger was required but not supplied. - */ - -#define KERN_INVALID_MEMORY_CONTROL 34 - /* The port was not a memory cache control port. - */ - -#define KERN_INVALID_SECURITY 35 - /* An argument supplied to assert security privilege - * was not a host security port. - */ - -#define KERN_NOT_DEPRESSED 36 - /* thread_depress_abort was called on a thread which - * was not currently depressed. - */ - -#define KERN_TERMINATED 37 - /* Object has been terminated and is no longer available - */ - -#define KERN_LOCK_SET_DESTROYED 38 - /* Lock set has been destroyed and is no longer available. - */ - -#define KERN_LOCK_UNSTABLE 39 - /* The thread holding the lock terminated before releasing - * the lock - */ - -#define KERN_LOCK_OWNED 40 - /* The lock is already owned by another thread - */ - -#define KERN_LOCK_OWNED_SELF 41 - /* The lock is already owned by the calling thread - */ - -#define KERN_SEMAPHORE_DESTROYED 42 - /* Semaphore has been destroyed and is no longer available. - */ - -#define KERN_RPC_SERVER_TERMINATED 43 - /* Return from RPC indicating the target server was - * terminated before it successfully replied - */ - -#define KERN_RPC_TERMINATE_ORPHAN 44 - /* Terminate an orphaned activation. - */ - -#define KERN_RPC_CONTINUE_ORPHAN 45 - /* Allow an orphaned activation to continue executing. - */ - -#define KERN_NOT_SUPPORTED 46 - /* Empty thread activation (No thread linked to it) - */ - -#define KERN_NODE_DOWN 47 - /* Remote node down or inaccessible. - */ - -#define KERN_NOT_WAITING 48 - /* A signalled thread was not actually waiting. */ - -#define KERN_OPERATION_TIMED_OUT 49 - /* Some thread-oriented operation (semaphore_wait) timed out - */ - -#define KERN_CODESIGN_ERROR 50 - /* During a page fault, indicates that the page was rejected - * as a result of a signature check. - */ - -#define KERN_RETURN_MAX 0x100 - /* Maximum return value allowable - */ - -#endif /* _MACH_KERN_RETURN_H_ */ diff --git a/i386/include/mach/kmod.h b/i386/include/mach/kmod.h deleted file mode 100644 index f31821d..0000000 --- a/i386/include/mach/kmod.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce - * support for mandatory and extensible security protections. This notice - * is included in support of clause 2.2 (b) of the Apple Public License, - * Version 2.0. - */ - -#ifndef _MACH_KMOD_H_ -#define _MACH_KMOD_H_ - -#include <mach/kern_return.h> -#include <mach/mach_types.h> - -#include <sys/cdefs.h> - -__BEGIN_DECLS - -#if PRAGMA_MARK -#pragma mark Basic macros & typedefs -#endif -/*********************************************************************** -* Basic macros & typedefs -***********************************************************************/ -#define KMOD_MAX_NAME 64 - -#define KMOD_RETURN_SUCCESS KERN_SUCCESS -#define KMOD_RETURN_FAILURE KERN_FAILURE - -typedef int kmod_t; - -struct kmod_info; -typedef kern_return_t kmod_start_func_t(struct kmod_info * ki, void * data); -typedef kern_return_t kmod_stop_func_t(struct kmod_info * ki, void * data); - -#if PRAGMA_MARK -#pragma mark Structure definitions -#endif -/*********************************************************************** -* Structure definitions -* -* All structures must be #pragma pack(4). -***********************************************************************/ -#pragma pack(4) - -/* Run-time struct only; never saved to a file */ -typedef struct kmod_reference { - struct kmod_reference * next; - struct kmod_info * info; -} kmod_reference_t; - -/*********************************************************************** -* Warning: Any changes to the kmod_info structure affect the -* KMOD_..._DECL macros below. -***********************************************************************/ - -/* The kmod_info_t structure is only safe to use inside the running - * kernel. If you need to work with a kmod_info_t structure outside - * the kernel, please use the compatibility definitions below. - */ -typedef struct kmod_info { - struct kmod_info * next; - int32_t info_version; // version of this structure - uint32_t id; - char name[KMOD_MAX_NAME]; - char version[KMOD_MAX_NAME]; - int32_t reference_count; // # linkage refs to this - kmod_reference_t * reference_list; // who this refs (links on) - vm_address_t address; // starting address - vm_size_t size; // total size - vm_size_t hdr_size; // unwired hdr size - kmod_start_func_t * start; - kmod_stop_func_t * stop; -} kmod_info_t; - -/* A compatibility definition of kmod_info_t for 32-bit kexts. - */ -typedef struct kmod_info_32_v1 { - uint32_t next_addr; - int32_t info_version; - uint32_t id; - uint8_t name[KMOD_MAX_NAME]; - uint8_t version[KMOD_MAX_NAME]; - int32_t reference_count; - uint32_t reference_list_addr; - uint32_t address; - uint32_t size; - uint32_t hdr_size; - uint32_t start_addr; - uint32_t stop_addr; -} kmod_info_32_v1_t; - -/* A compatibility definition of kmod_info_t for 64-bit kexts. - */ -typedef struct kmod_info_64_v1 { - uint64_t next_addr; - int32_t info_version; - uint32_t id; - uint8_t name[KMOD_MAX_NAME]; - uint8_t version[KMOD_MAX_NAME]; - int32_t reference_count; - uint64_t reference_list_addr; - uint64_t address; - uint64_t size; - uint64_t hdr_size; - uint64_t start_addr; - uint64_t stop_addr; -} kmod_info_64_v1_t; - -#pragma pack() - -#if PRAGMA_MARK -#pragma mark Kmod structure declaration macros -#endif -/*********************************************************************** -* Kmod structure declaration macros -***********************************************************************/ -#define KMOD_INFO_NAME kmod_info -#define KMOD_INFO_VERSION 1 - -#define KMOD_DECL(name, version) \ - static kmod_start_func_t name ## _module_start; \ - static kmod_stop_func_t name ## _module_stop; \ - kmod_info_t KMOD_INFO_NAME = { 0, KMOD_INFO_VERSION, -1U, \ - { #name }, { version }, -1, 0, 0, 0, 0, \ - name ## _module_start, \ - name ## _module_stop }; - -#define KMOD_EXPLICIT_DECL(name, version, start, stop) \ - kmod_info_t KMOD_INFO_NAME = { 0, KMOD_INFO_VERSION, -1U, \ - { #name }, { version }, -1, 0, 0, 0, 0, \ - start, stop }; - -#if PRAGMA_MARK -#pragma mark Kernel private declarations -#endif -/*********************************************************************** -* Kernel private declarations. -***********************************************************************/ - - -#if PRAGMA_MARK -#pragma mark Obsolete kmod stuff -#endif -/*********************************************************************** -* These 3 should be dropped but they're referenced by MIG declarations. -***********************************************************************/ -typedef void * kmod_args_t; -typedef int kmod_control_flavor_t; -typedef kmod_info_t * kmod_info_array_t; - -__END_DECLS - -#endif /* _MACH_KMOD_H_ */ diff --git a/i386/include/mach/ledger.defs b/i386/include/mach/ledger.defs deleted file mode 100644 index 76367a9..0000000 --- a/i386/include/mach/ledger.defs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -subsystem -#if KERNEL_USER - KernelUser -#endif /* KERNEL_USER */ -#if KERNEL_SERVER - KernelServer -#endif /* KERNEL_SERVER */ - ledger 5000; - -#ifdef KERNEL_USER -userprefix r_; -#endif /* KERNEL_USER */ - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> - -/* - * Create a subordinate ledger - */ -routine ledger_create( - parent_ledger : ledger_t; - ledger_ledger : ledger_t; - out new_ledger : ledger_t; - transfer : ledger_item_t); - -/* - * Destroy a ledger - */ -routine ledger_terminate( - ledger : ledger_t); - -/* - * Transfer resources from a parent ledger to a child - */ -routine ledger_transfer( - parent_ledger : ledger_t; - child_ledger : ledger_t; - transfer : ledger_item_t); - -/* - * Return the ledger limit and balance - */ -routine ledger_read( - ledger : ledger_t; - out balance : ledger_item_t; - out limit : ledger_item_t); - -/* vim: set ft=c : */ diff --git a/i386/include/mach/ledger.h b/i386/include/mach/ledger.h deleted file mode 100644 index f0f050f..0000000 --- a/i386/include/mach/ledger.h +++ /dev/null @@ -1,259 +0,0 @@ -#ifndef _ledger_user_ -#define _ledger_user_ - -/* Module ledger */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef ledger_MSG_COUNT -#define ledger_MSG_COUNT 4 -#endif /* ledger_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mach_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine ledger_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t ledger_create -( - ledger_t parent_ledger, - ledger_t ledger_ledger, - ledger_t *new_ledger, - ledger_item_t transfer -); - -/* Routine ledger_terminate */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t ledger_terminate -( - ledger_t ledger -); - -/* Routine ledger_transfer */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t ledger_transfer -( - ledger_t parent_ledger, - ledger_t child_ledger, - ledger_item_t transfer -); - -/* Routine ledger_read */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t ledger_read -( - ledger_t ledger, - ledger_item_t *balance, - ledger_item_t *limit -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__ledger_subsystem__defined -#define __Request__ledger_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t ledger_ledger; - /* end of the kernel processed data */ - NDR_record_t NDR; - ledger_item_t transfer; - } __Request__ledger_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__ledger_terminate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t child_ledger; - /* end of the kernel processed data */ - NDR_record_t NDR; - ledger_item_t transfer; - } __Request__ledger_transfer_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__ledger_read_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__ledger_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__ledger_subsystem__defined -#define __RequestUnion__ledger_subsystem__defined -union __RequestUnion__ledger_subsystem { - __Request__ledger_create_t Request_ledger_create; - __Request__ledger_terminate_t Request_ledger_terminate; - __Request__ledger_transfer_t Request_ledger_transfer; - __Request__ledger_read_t Request_ledger_read; -}; -#endif /* !__RequestUnion__ledger_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__ledger_subsystem__defined -#define __Reply__ledger_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_ledger; - /* end of the kernel processed data */ - } __Reply__ledger_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__ledger_terminate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__ledger_transfer_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - ledger_item_t balance; - ledger_item_t limit; - } __Reply__ledger_read_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__ledger_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__ledger_subsystem__defined -#define __ReplyUnion__ledger_subsystem__defined -union __ReplyUnion__ledger_subsystem { - __Reply__ledger_create_t Reply_ledger_create; - __Reply__ledger_terminate_t Reply_ledger_terminate; - __Reply__ledger_transfer_t Reply_ledger_transfer; - __Reply__ledger_read_t Reply_ledger_read; -}; -#endif /* !__RequestUnion__ledger_subsystem__defined */ - -#ifndef subsystem_to_name_map_ledger -#define subsystem_to_name_map_ledger \ - { "ledger_create", 5000 },\ - { "ledger_terminate", 5001 },\ - { "ledger_transfer", 5002 },\ - { "ledger_read", 5003 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _ledger_user_ */ diff --git a/i386/include/mach/lock_set.defs b/i386/include/mach/lock_set.defs deleted file mode 100644 index c7ee584..0000000 --- a/i386/include/mach/lock_set.defs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - * - */ -/* - * File: mach/lock_set.defs - * Author: Joseph CaraDonna - * - * Exported kernel calls - * - */ - -subsystem -#if KERNEL_SERVER - KernelServer -#endif /* KERNEL_SERVER */ - lock_set 617000; - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> - -/* - * a lock_set_t is created and destroyed through the task object. - * lock_set_create(task,&lock_set_t,...); - * lock_set_destroy(task,lock_set_t); - */ - -routine lock_acquire( - lock_set : lock_set_t; - lock_id : int); - -routine lock_release( - lock_set : lock_set_t; - lock_id : int); - -routine lock_try( - lock_set : lock_set_t; - lock_id : int); - -routine lock_make_stable( - lock_set : lock_set_t; - lock_id : int); - -routine lock_handoff( - lock_set : lock_set_t; - lock_id : int); - -routine lock_handoff_accept( - lock_set : lock_set_t; - lock_id : int); - -/* vim: set ft=c : */ diff --git a/i386/include/mach/lock_set.h b/i386/include/mach/lock_set.h deleted file mode 100644 index 07a8d13..0000000 --- a/i386/include/mach/lock_set.h +++ /dev/null @@ -1,326 +0,0 @@ -#ifndef _lock_set_user_ -#define _lock_set_user_ - -/* Module lock_set */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef lock_set_MSG_COUNT -#define lock_set_MSG_COUNT 6 -#endif /* lock_set_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mach_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine lock_acquire */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t lock_acquire -( - lock_set_t lock_set, - int lock_id -); - -/* Routine lock_release */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t lock_release -( - lock_set_t lock_set, - int lock_id -); - -/* Routine lock_try */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t lock_try -( - lock_set_t lock_set, - int lock_id -); - -/* Routine lock_make_stable */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t lock_make_stable -( - lock_set_t lock_set, - int lock_id -); - -/* Routine lock_handoff */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t lock_handoff -( - lock_set_t lock_set, - int lock_id -); - -/* Routine lock_handoff_accept */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t lock_handoff_accept -( - lock_set_t lock_set, - int lock_id -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__lock_set_subsystem__defined -#define __Request__lock_set_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int lock_id; - } __Request__lock_acquire_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int lock_id; - } __Request__lock_release_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int lock_id; - } __Request__lock_try_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int lock_id; - } __Request__lock_make_stable_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int lock_id; - } __Request__lock_handoff_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int lock_id; - } __Request__lock_handoff_accept_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__lock_set_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__lock_set_subsystem__defined -#define __RequestUnion__lock_set_subsystem__defined -union __RequestUnion__lock_set_subsystem { - __Request__lock_acquire_t Request_lock_acquire; - __Request__lock_release_t Request_lock_release; - __Request__lock_try_t Request_lock_try; - __Request__lock_make_stable_t Request_lock_make_stable; - __Request__lock_handoff_t Request_lock_handoff; - __Request__lock_handoff_accept_t Request_lock_handoff_accept; -}; -#endif /* !__RequestUnion__lock_set_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__lock_set_subsystem__defined -#define __Reply__lock_set_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__lock_acquire_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__lock_release_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__lock_try_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__lock_make_stable_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__lock_handoff_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__lock_handoff_accept_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__lock_set_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__lock_set_subsystem__defined -#define __ReplyUnion__lock_set_subsystem__defined -union __ReplyUnion__lock_set_subsystem { - __Reply__lock_acquire_t Reply_lock_acquire; - __Reply__lock_release_t Reply_lock_release; - __Reply__lock_try_t Reply_lock_try; - __Reply__lock_make_stable_t Reply_lock_make_stable; - __Reply__lock_handoff_t Reply_lock_handoff; - __Reply__lock_handoff_accept_t Reply_lock_handoff_accept; -}; -#endif /* !__RequestUnion__lock_set_subsystem__defined */ - -#ifndef subsystem_to_name_map_lock_set -#define subsystem_to_name_map_lock_set \ - { "lock_acquire", 617000 },\ - { "lock_release", 617001 },\ - { "lock_try", 617002 },\ - { "lock_make_stable", 617003 },\ - { "lock_handoff", 617004 },\ - { "lock_handoff_accept", 617005 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _lock_set_user_ */ diff --git a/i386/include/mach/mach.h b/i386/include/mach/mach.h deleted file mode 100644 index 0b3b1a0..0000000 --- a/i386/include/mach/mach.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 1999-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ - -/* - * Includes all the types that a normal user - * of Mach programs should need - */ - -#ifndef _MACH_H_ -#define _MACH_H_ - -#define __MACH30__ -#define MACH_IPC_FLAVOR UNTYPED - -#include <mach/std_types.h> -#include <mach/mach_types.h> -#include <mach/mach_interface.h> -#include <mach/mach_port.h> -#include <mach/mach_init.h> -#include <mach/mach_host.h> -#include <mach/thread_switch.h> - -#include <mach/rpc.h> /* for compatibility only */ -#include <mach/mig.h> - -#include <mach/mig_errors.h> -#include <mach/mach_error.h> - -#include <sys/cdefs.h> - -__BEGIN_DECLS -/* - * Standard prototypes - */ -extern void panic_init(mach_port_t); -extern void panic(const char *, ...); - -extern void safe_gets(char *, - char *, - int); - -extern void slot_name(cpu_type_t, - cpu_subtype_t, - char **, - char **); - -extern void mig_reply_setup(mach_msg_header_t *, - mach_msg_header_t *); - -extern void mach_msg_destroy(mach_msg_header_t *); - -extern mach_msg_return_t mach_msg_receive(mach_msg_header_t *); - -extern mach_msg_return_t mach_msg_send(mach_msg_header_t *); - -extern mach_msg_return_t mach_msg_server_once(boolean_t (*) - (mach_msg_header_t *, - mach_msg_header_t *), - mach_msg_size_t, - mach_port_t, - mach_msg_options_t); -extern mach_msg_return_t mach_msg_server(boolean_t (*) - (mach_msg_header_t *, - mach_msg_header_t *), - mach_msg_size_t, - mach_port_t, - mach_msg_options_t); - -/* - * Prototypes for compatibility - */ -extern kern_return_t clock_get_res(mach_port_t, - clock_res_t *); -extern kern_return_t clock_set_res(mach_port_t, - clock_res_t); - -extern kern_return_t clock_sleep(mach_port_t, - int, - mach_timespec_t, - mach_timespec_t *); -__END_DECLS - -#endif /* _MACH_H_ */ diff --git a/i386/include/mach/mach_error.h b/i386/include/mach/mach_error.h deleted file mode 100644 index 5840bd5..0000000 --- a/i386/include/mach/mach_error.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -/* - * File: mach_error.h - * Author: Douglas Orr, Carnegie Mellon University - * Date: Mar. 1988 - * - * Definitions of routines in mach_error.c - */ - -#ifndef _MACH_ERROR_ -#define _MACH_ERROR_ 1 - -#include <mach/error.h> - -#include <sys/cdefs.h> - -__BEGIN_DECLS -char *mach_error_string( -/* - * Returns a string appropriate to the error argument given - */ - mach_error_t error_value - ); - -void mach_error( -/* - * Prints an appropriate message on the standard error stream - */ - const char *str, - mach_error_t error_value - ); - -char *mach_error_type( -/* - * Returns a string with the error system, subsystem and code - */ - mach_error_t error_value - ); -__END_DECLS - -#endif /* _MACH_ERROR_ */ diff --git a/i386/include/mach/mach_exc.defs b/i386/include/mach/mach_exc.defs deleted file mode 100644 index 00fae28..0000000 --- a/i386/include/mach/mach_exc.defs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * Abstract: - * MiG definitions file for Mach exception interface. - */ - -subsystem -#if KERNEL_USER - KernelUser -#endif - mach_exc 2405; - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> - -ServerPrefix catch_; - -type mach_exception_data_t = array[*:2] of int64_t; -type exception_type_t = int; - -routine mach_exception_raise( -#if KERNEL_USER - exception_port : mach_port_move_send_t; - thread : mach_port_move_send_t; - task : mach_port_move_send_t; -#else /* KERNEL_USER */ - exception_port : mach_port_t; - thread : mach_port_t; - task : mach_port_t; -#endif /* KERNEL_USER */ - exception : exception_type_t; - code : mach_exception_data_t - ); - -routine mach_exception_raise_state( -#if KERNEL_USER - exception_port : mach_port_move_send_t; -#else /* KERNEL_USER */ - exception_port : mach_port_t; -#endif /* KERNEL_USER */ - exception : exception_type_t; - code : mach_exception_data_t, const; - inout flavor : int; - old_state : thread_state_t, const; - out new_state : thread_state_t); - -routine mach_exception_raise_state_identity( -#if KERNEL_USER - exception_port : mach_port_move_send_t; - thread : mach_port_move_send_t; - task : mach_port_move_send_t; -#else /* KERNEL_USER */ - exception_port : mach_port_t; - thread : mach_port_t; - task : mach_port_t; -#endif /* KERNEL_USER */ - exception : exception_type_t; - code : mach_exception_data_t; - inout flavor : int; - old_state : thread_state_t; - out new_state : thread_state_t); - -/* vim: set ft=c : */ diff --git a/i386/include/mach/mach_host.defs b/i386/include/mach/mach_host.defs deleted file mode 100644 index 90ba9b9..0000000 --- a/i386/include/mach/mach_host.defs +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright (c) 2000-2009 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ - -/* - * File: mach/mach_host.defs - * - * Abstract: - * Mach host operations support. Includes processor allocation and - * control. - */ - -#ifdef MACH_KERNEL -#include <advisory_pageout.h> -#endif /* MACH_KERNEL */ - -subsystem -#if KERNEL_SERVER - KernelServer -#endif /* KERNEL_SERVER */ - mach_host 200; - -/* - * Basic types - */ - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> -#include <mach/clock_types.defs> -#include <mach_debug/mach_debug_types.defs> - -/* - * References to host objects are returned by: - * mach_host_self() - trap - */ - -/* - * Return information about this host. - */ -routine host_info( - host : host_t; - flavor : host_flavor_t; - out host_info_out : host_info_t, CountInOut); - -/* - * Get string describing current kernel version. - */ -routine host_kernel_version( - host : host_t; - out kernel_version : kernel_version_t); - -/* - * Get host page size - * (compatibility for running old libraries on new kernels - - * host_page_size() is now a library routine based on constants) - */ -routine _host_page_size( - host : host_t; - out out_page_size : vm_size_t); - -/* - * Allow pagers to create named entries that point to un-mapped - * abstract memory object. The named entries are generally mappable - * and can be subsetted through the mach_make_memory_entry call - */ -routine mach_memory_object_memory_entry( - host :host_t; - internal :boolean_t; - size :vm_size_t; - permission :vm_prot_t; - pager :memory_object_t; - out entry_handle :mach_port_move_send_t); - - -/* - * Get processor info for all the processors on this host. - * The returned data is an OOL array of processor info. - */ -routine host_processor_info( - host : host_t; - flavor : processor_flavor_t; - out out_processor_count : natural_t; - out out_processor_info : processor_info_array_t); - -/* - * Return host IO master access port - */ -routine host_get_io_master( - host : host_t; - out io_master : io_master_t); - -/* - * Get service port for a processor set. - * Available to all. - */ -routine host_get_clock_service( - host : host_t; - clock_id : clock_id_t; - out clock_serv : clock_serv_t); - -/* - * kernel module interface (obsolete as of SnowLeopard) - * see mach/kmod.h - */ -/* kmod_ MIG calls now return KERN_NOT_SUPPORTED on PPC/i386/x86_64. */ -routine kmod_get_info( - host : host_t; - out modules : kmod_args_t); - -/* - * Returns information about the memory allocation zones. - * Supported in all kernels.. - */ -routine host_zone_info( - host : host_t; - out names : zone_name_array_t, - Dealloc; - out info : zone_info_array_t, - Dealloc); - -/* - * Returns information about the global VP table. - * Only supported in MACH_VM_DEBUG kernels, - * otherwise returns KERN_FAILURE. - */ -routine host_virtual_physical_table_info( - host : host_t; - out info : hash_info_bucket_array_t, - Dealloc); - -/* - * Returns information about the global reverse hash table. - * This call is only valid on MACH_IPC_DEBUG kernels. - * Otherwise, KERN_FAILURE is returned. - */ -routine host_ipc_hash_info( - host : host_t; - out info : hash_info_bucket_array_t, - Dealloc); - -skip; /* was enable_bluebox */ -skip; /* was disable_bluebox */ - -/* - * JMM - Keep processor_set related items at the end for easy - * removal. - */ -/* - * Get default processor set for host. - */ -routine processor_set_default( - host : host_t; - out default_set : processor_set_name_t); - -/* - * Create new processor set. Returns real port for manipulations, - * and name port for obtaining information. - */ -routine processor_set_create( - host : host_t; - out new_set : processor_set_t; - out new_name : processor_set_name_t); - -/* - * Temporary interfaces for conversion to 64 bit data path - */ - -routine mach_memory_object_memory_entry_64( - host :host_t; - internal :boolean_t; - size :memory_object_size_t; - permission :vm_prot_t; - pager :memory_object_t; - out entry_handle :mach_port_move_send_t); - -/* - * Return statistics from this host. - */ -routine host_statistics( - host_priv : host_t; - flavor : host_flavor_t; - out host_info_out : host_info_t, CountInOut); - -routine host_request_notification( - host : host_t; - notify_type : host_flavor_t; - notify_port : mach_port_make_send_once_t); - -routine host_lockgroup_info( - host : host_t; - out lockgroup_info : lockgroup_info_array_t, - Dealloc); - -/* - * Return 64-bit statistics from this host. - */ -routine host_statistics64( - host_priv : host_t; - flavor : host_flavor_t; - out host_info64_out : host_info64_t, CountInOut); - - -/* vim: set ft=c : */ diff --git a/i386/include/mach/mach_host.h b/i386/include/mach/mach_host.h deleted file mode 100644 index 70ab53f..0000000 --- a/i386/include/mach/mach_host.h +++ /dev/null @@ -1,873 +0,0 @@ -#ifndef _mach_host_user_ -#define _mach_host_user_ - -/* Module mach_host */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef mach_host_MSG_COUNT -#define mach_host_MSG_COUNT 20 -#endif /* mach_host_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mach_types.h> -#include <mach/mach_types.h> -#include <mach_debug/mach_debug_types.h> -#include <mach/mach_init.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine host_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_info -( - host_t host, - host_flavor_t flavor, - host_info_t host_info_out, - mach_msg_type_number_t *host_info_outCnt -); - -/* Routine host_kernel_version */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_kernel_version -( - host_t host, - kernel_version_t kernel_version -); - -/* Routine _host_page_size */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t _host_page_size -( - host_t host, - vm_size_t *out_page_size -); - -/* Routine mach_memory_object_memory_entry */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_memory_object_memory_entry -( - host_t host, - boolean_t internal, - vm_size_t size, - vm_prot_t permission, - memory_object_t pager, - mach_port_t *entry_handle -); - -/* Routine host_processor_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_processor_info -( - host_t host, - processor_flavor_t flavor, - natural_t *out_processor_count, - processor_info_array_t *out_processor_info, - mach_msg_type_number_t *out_processor_infoCnt -); - -/* Routine host_get_io_master */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_get_io_master -( - host_t host, - io_master_t *io_master -); - -/* Routine host_get_clock_service */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_get_clock_service -( - host_t host, - clock_id_t clock_id, - clock_serv_t *clock_serv -); - -/* Routine kmod_get_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t kmod_get_info -( - host_t host, - kmod_args_t *modules, - mach_msg_type_number_t *modulesCnt -); - -/* Routine host_zone_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_zone_info -( - host_t host, - zone_name_array_t *names, - mach_msg_type_number_t *namesCnt, - zone_info_array_t *info, - mach_msg_type_number_t *infoCnt -); - -/* Routine host_virtual_physical_table_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_virtual_physical_table_info -( - host_t host, - hash_info_bucket_array_t *info, - mach_msg_type_number_t *infoCnt -); - -/* Routine host_ipc_hash_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_ipc_hash_info -( - host_t host, - hash_info_bucket_array_t *info, - mach_msg_type_number_t *infoCnt -); - -/* Routine processor_set_default */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_set_default -( - host_t host, - processor_set_name_t *default_set -); - -/* Routine processor_set_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_set_create -( - host_t host, - processor_set_t *new_set, - processor_set_name_t *new_name -); - -/* Routine mach_memory_object_memory_entry_64 */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_memory_object_memory_entry_64 -( - host_t host, - boolean_t internal, - memory_object_size_t size, - vm_prot_t permission, - memory_object_t pager, - mach_port_t *entry_handle -); - -/* Routine host_statistics */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_statistics -( - host_t host_priv, - host_flavor_t flavor, - host_info_t host_info_out, - mach_msg_type_number_t *host_info_outCnt -); - -/* Routine host_request_notification */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_request_notification -( - host_t host, - host_flavor_t notify_type, - mach_port_t notify_port -); - -/* Routine host_lockgroup_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_lockgroup_info -( - host_t host, - lockgroup_info_array_t *lockgroup_info, - mach_msg_type_number_t *lockgroup_infoCnt -); - -/* Routine host_statistics64 */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_statistics64 -( - host_t host_priv, - host_flavor_t flavor, - host_info64_t host_info64_out, - mach_msg_type_number_t *host_info64_outCnt -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__mach_host_subsystem__defined -#define __Request__mach_host_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - host_flavor_t flavor; - mach_msg_type_number_t host_info_outCnt; - } __Request__host_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_kernel_version_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request___host_page_size_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t pager; - /* end of the kernel processed data */ - NDR_record_t NDR; - boolean_t internal; - vm_size_t size; - vm_prot_t permission; - } __Request__mach_memory_object_memory_entry_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - processor_flavor_t flavor; - } __Request__host_processor_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_get_io_master_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - clock_id_t clock_id; - } __Request__host_get_clock_service_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__kmod_get_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_zone_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_virtual_physical_table_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_ipc_hash_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__processor_set_default_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__processor_set_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t pager; - /* end of the kernel processed data */ - NDR_record_t NDR; - boolean_t internal; - memory_object_size_t size; - vm_prot_t permission; - } __Request__mach_memory_object_memory_entry_64_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - host_flavor_t flavor; - mach_msg_type_number_t host_info_outCnt; - } __Request__host_statistics_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t notify_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - host_flavor_t notify_type; - } __Request__host_request_notification_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_lockgroup_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - host_flavor_t flavor; - mach_msg_type_number_t host_info64_outCnt; - } __Request__host_statistics64_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__mach_host_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__mach_host_subsystem__defined -#define __RequestUnion__mach_host_subsystem__defined -union __RequestUnion__mach_host_subsystem { - __Request__host_info_t Request_host_info; - __Request__host_kernel_version_t Request_host_kernel_version; - __Request___host_page_size_t Request__host_page_size; - __Request__mach_memory_object_memory_entry_t Request_mach_memory_object_memory_entry; - __Request__host_processor_info_t Request_host_processor_info; - __Request__host_get_io_master_t Request_host_get_io_master; - __Request__host_get_clock_service_t Request_host_get_clock_service; - __Request__kmod_get_info_t Request_kmod_get_info; - __Request__host_zone_info_t Request_host_zone_info; - __Request__host_virtual_physical_table_info_t Request_host_virtual_physical_table_info; - __Request__host_ipc_hash_info_t Request_host_ipc_hash_info; - __Request__processor_set_default_t Request_processor_set_default; - __Request__processor_set_create_t Request_processor_set_create; - __Request__mach_memory_object_memory_entry_64_t Request_mach_memory_object_memory_entry_64; - __Request__host_statistics_t Request_host_statistics; - __Request__host_request_notification_t Request_host_request_notification; - __Request__host_lockgroup_info_t Request_host_lockgroup_info; - __Request__host_statistics64_t Request_host_statistics64; -}; -#endif /* !__RequestUnion__mach_host_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__mach_host_subsystem__defined -#define __Reply__mach_host_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t host_info_outCnt; - integer_t host_info_out[15]; - } __Reply__host_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t kernel_versionOffset; /* MiG doesn't use it */ - mach_msg_type_number_t kernel_versionCnt; - char kernel_version[512]; - } __Reply__host_kernel_version_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - vm_size_t out_page_size; - } __Reply___host_page_size_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t entry_handle; - /* end of the kernel processed data */ - } __Reply__mach_memory_object_memory_entry_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t out_processor_info; - /* end of the kernel processed data */ - NDR_record_t NDR; - natural_t out_processor_count; - mach_msg_type_number_t out_processor_infoCnt; - } __Reply__host_processor_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t io_master; - /* end of the kernel processed data */ - } __Reply__host_get_io_master_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t clock_serv; - /* end of the kernel processed data */ - } __Reply__host_get_clock_service_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t modules; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t modulesCnt; - } __Reply__kmod_get_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t names; - mach_msg_ool_descriptor_t info; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t namesCnt; - mach_msg_type_number_t infoCnt; - } __Reply__host_zone_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t info; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t infoCnt; - } __Reply__host_virtual_physical_table_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t info; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t infoCnt; - } __Reply__host_ipc_hash_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t default_set; - /* end of the kernel processed data */ - } __Reply__processor_set_default_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_set; - mach_msg_port_descriptor_t new_name; - /* end of the kernel processed data */ - } __Reply__processor_set_create_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t entry_handle; - /* end of the kernel processed data */ - } __Reply__mach_memory_object_memory_entry_64_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t host_info_outCnt; - integer_t host_info_out[15]; - } __Reply__host_statistics_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__host_request_notification_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t lockgroup_info; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t lockgroup_infoCnt; - } __Reply__host_lockgroup_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t host_info64_outCnt; - integer_t host_info64_out[256]; - } __Reply__host_statistics64_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__mach_host_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__mach_host_subsystem__defined -#define __ReplyUnion__mach_host_subsystem__defined -union __ReplyUnion__mach_host_subsystem { - __Reply__host_info_t Reply_host_info; - __Reply__host_kernel_version_t Reply_host_kernel_version; - __Reply___host_page_size_t Reply__host_page_size; - __Reply__mach_memory_object_memory_entry_t Reply_mach_memory_object_memory_entry; - __Reply__host_processor_info_t Reply_host_processor_info; - __Reply__host_get_io_master_t Reply_host_get_io_master; - __Reply__host_get_clock_service_t Reply_host_get_clock_service; - __Reply__kmod_get_info_t Reply_kmod_get_info; - __Reply__host_zone_info_t Reply_host_zone_info; - __Reply__host_virtual_physical_table_info_t Reply_host_virtual_physical_table_info; - __Reply__host_ipc_hash_info_t Reply_host_ipc_hash_info; - __Reply__processor_set_default_t Reply_processor_set_default; - __Reply__processor_set_create_t Reply_processor_set_create; - __Reply__mach_memory_object_memory_entry_64_t Reply_mach_memory_object_memory_entry_64; - __Reply__host_statistics_t Reply_host_statistics; - __Reply__host_request_notification_t Reply_host_request_notification; - __Reply__host_lockgroup_info_t Reply_host_lockgroup_info; - __Reply__host_statistics64_t Reply_host_statistics64; -}; -#endif /* !__RequestUnion__mach_host_subsystem__defined */ - -#ifndef subsystem_to_name_map_mach_host -#define subsystem_to_name_map_mach_host \ - { "host_info", 200 },\ - { "host_kernel_version", 201 },\ - { "_host_page_size", 202 },\ - { "mach_memory_object_memory_entry", 203 },\ - { "host_processor_info", 204 },\ - { "host_get_io_master", 205 },\ - { "host_get_clock_service", 206 },\ - { "kmod_get_info", 207 },\ - { "host_zone_info", 208 },\ - { "host_virtual_physical_table_info", 209 },\ - { "host_ipc_hash_info", 210 },\ - { "processor_set_default", 213 },\ - { "processor_set_create", 214 },\ - { "mach_memory_object_memory_entry_64", 215 },\ - { "host_statistics", 216 },\ - { "host_request_notification", 217 },\ - { "host_lockgroup_info", 218 },\ - { "host_statistics64", 219 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _mach_host_user_ */ diff --git a/i386/include/mach/mach_init.h b/i386/include/mach/mach_init.h deleted file mode 100644 index 36a47fa..0000000 --- a/i386/include/mach/mach_init.h +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987,1986 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ - -/* - * Items provided by the Mach environment initialization. - */ - -#ifndef _MACH_INIT_ -#define _MACH_INIT_ 1 - -#include <mach/mach_types.h> -#include <stdarg.h> - -#include <sys/cdefs.h> - -/* - * Kernel-related ports; how a task/thread controls itself - */ - -__BEGIN_DECLS -extern mach_port_t mach_task_self(void); -extern mach_port_t mach_host_self(void); -extern mach_port_t mach_thread_self(void); -extern kern_return_t host_page_size(host_t, vm_size_t *); - -extern mach_port_t mach_task_self_; -#define mach_task_self() mach_task_self_ -#define current_task() mach_task_self() - -__END_DECLS -#include <mach/mach_traps.h> -__BEGIN_DECLS - -/* - * Other important ports in the Mach user environment - */ - -extern mach_port_t bootstrap_port; -extern mach_port_t name_server_port; -extern mach_port_t environment_port; -extern mach_port_t service_port; - -/* - * Where these ports occur in the "mach_ports_register" - * collection... only servers or the runtime library need know. - */ - -#define NAME_SERVER_SLOT 0 -#define ENVIRONMENT_SLOT 1 -#define SERVICE_SLOT 2 - -#define MACH_PORTS_SLOTS_USED 3 - -/* - * Globally interesting numbers. - * These macros assume vm_page_size is a power-of-2. - */ - -extern vm_size_t vm_page_size; -extern vm_size_t vm_page_mask; -extern int vm_page_shift; - -#define trunc_page(x) ((x) & (~(vm_page_size - 1))) -#define round_page(x) trunc_page((x) + (vm_page_size - 1)) - -/* - * Page-size rounding macros for the fixed-width VM types. - */ -#define mach_vm_trunc_page(x) ((mach_vm_offset_t)(x) & ~((signed)PAGE_MASK)) -#define mach_vm_round_page(x) (((mach_vm_offset_t)(x) + PAGE_MASK) & ~((signed)PAGE_MASK)) - -/* - * fprintf_stderr uses vprintf_stderr_func to produce - * error messages, this can be overridden by a user - * application to point to a user-specified output function - */ -extern int (*vprintf_stderr_func)(const char *format, va_list ap); -__END_DECLS - -#endif /* _MACH_INIT_ */ diff --git a/i386/include/mach/mach_interface.h b/i386/include/mach/mach_interface.h deleted file mode 100644 index af939cb..0000000 --- a/i386/include/mach/mach_interface.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (C) Apple Computer 1998 - * ALL Rights Reserved - */ -/* - * This file represents the interfaces that used to come - * from creating the user headers from the mach.defs file. - * Because mach.defs was decomposed, this file now just - * wraps up all the new interface headers generated from - * each of the new .defs resulting from that decomposition. - */ -#ifndef _MACH_INTERFACE_H_ -#define _MACH_INTERFACE_H_ - -#include <mach/clock_priv.h> -#include <mach/host_priv.h> -#include <mach/host_security.h> -#include <mach/ledger.h> -#include <mach/lock_set.h> -#include <mach/processor.h> -#include <mach/processor_set.h> -#include <mach/semaphore.h> -#include <mach/task.h> -#include <mach/thread_act.h> -#include <mach/vm_map.h> - -#endif /* _MACH_INTERFACE_H_ */ diff --git a/i386/include/mach/mach_param.h b/i386/include/mach/mach_param.h deleted file mode 100644 index e4ead67..0000000 --- a/i386/include/mach/mach_param.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/mach_param.h - * Author: Avadis Tevanian, Jr., Michael Wayne Young - * Date: 1986 - * - * Mach system sizing parameters - */ - -#ifndef _MACH_MACH_PARAM_H_ -#define _MACH_MACH_PARAM_H_ - -/* Number of "registered" ports */ - -#define TASK_PORT_REGISTER_MAX 3 - -#endif /* _MACH_MACH_PARAM_H_ */ diff --git a/i386/include/mach/mach_port.defs b/i386/include/mach/mach_port.defs deleted file mode 100644 index 5801ee4..0000000 --- a/i386/include/mach/mach_port.defs +++ /dev/null @@ -1,492 +0,0 @@ -/* - * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_FREE_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/mach_port.defs - * Author: Rich Draves - * - * Exported kernel calls. - */ - -subsystem -#if KERNEL_SERVER - KernelServer -#endif /* KERNEL_SERVER */ - mach_port 3200; - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> -#include <mach_debug/mach_debug_types.defs> - -/* - * Returns the set of port and port set names - * to which the target task has access, along with - * the type (set or port) for each name. - */ - -routine mach_port_names( - task : ipc_space_t; - out names : mach_port_name_array_t; - out types : mach_port_type_array_t); - -/* - * Returns the type (set or port) for the port name - * within the target task. Also indicates whether - * there is a dead-name request for the name. - */ - -routine mach_port_type( - task : ipc_space_t; - name : mach_port_name_t; - out ptype : mach_port_type_t); - -/* - * Changes the name by which a port (or port set) is known to - * the target task. The new name can't be in use. The - * old name becomes available for recycling. - */ - -routine mach_port_rename( - task : ipc_space_t; - old_name : mach_port_name_t; - new_name : mach_port_name_t); - -/* - * Allocates the specified kind of object, with the given name. - * The right must be one of - * MACH_PORT_RIGHT_RECEIVE - * MACH_PORT_RIGHT_PORT_SET - * MACH_PORT_RIGHT_DEAD_NAME - * New port sets are empty. New ports don't have any - * send/send-once rights or queued messages. The make-send - * count is zero and their queue limit is MACH_PORT_QLIMIT_DEFAULT. - * New sets, ports, and dead names have one user reference. - */ - -routine mach_port_allocate_name( - task : ipc_space_t; - right : mach_port_right_t; - name : mach_port_name_t); - -/* - * Allocates the specified kind of object. - * The right must be one of - * MACH_PORT_RIGHT_RECEIVE - * MACH_PORT_RIGHT_PORT_SET - * MACH_PORT_RIGHT_DEAD_NAME - * Like port_allocate_name, but the kernel picks a name. - * It can use any name not associated with a right. - */ - -routine mach_port_allocate( - task : ipc_space_t; - right : mach_port_right_t; - out name : mach_port_name_t); - -/* - * Destroys all rights associated with the name and makes it - * available for recycling immediately. The name can be a - * port (possibly with multiple user refs), a port set, or - * a dead name (again, with multiple user refs). - */ - -routine mach_port_destroy( - task : ipc_space_t; - name : mach_port_name_t); - -/* - * Releases one send/send-once/dead-name user ref. - * Just like mach_port_mod_refs -1, but deduces the - * correct type of right. This allows a user task - * to release a ref for a port without worrying - * about whether the port has died or not. - */ - -routine mach_port_deallocate( - task : ipc_space_t; - name : mach_port_name_t); - -/* - * A port set always has one user ref. - * A send-once right always has one user ref. - * A dead name always has one or more user refs. - * A send right always has one or more user refs. - * A receive right always has one user ref. - * The right must be one of - * MACH_PORT_RIGHT_RECEIVE - * MACH_PORT_RIGHT_PORT_SET - * MACH_PORT_RIGHT_DEAD_NAME - * MACH_PORT_RIGHT_SEND - * MACH_PORT_RIGHT_SEND_ONCE - */ - -routine mach_port_get_refs( - task : ipc_space_t; - name : mach_port_name_t; - right : mach_port_right_t; - out refs : mach_port_urefs_t); - -/* - * The delta is a signed change to the task's - * user ref count for the right. Only dead names - * and send rights can have a positive delta. - * The resulting user ref count can't be negative. - * If it is zero, the right is deallocated. - * If the name isn't a composite right, it becomes - * available for recycling. The right must be one of - * MACH_PORT_RIGHT_RECEIVE - * MACH_PORT_RIGHT_PORT_SET - * MACH_PORT_RIGHT_DEAD_NAME - * MACH_PORT_RIGHT_SEND - * MACH_PORT_RIGHT_SEND_ONCE - */ - -routine mach_port_mod_refs( - task : ipc_space_t; - name : mach_port_name_t; - right : mach_port_right_t; - delta : mach_port_delta_t); - -skip; - -/* - * Only valid for receive rights. - * Sets the make-send count for the port. - */ -routine mach_port_set_mscount( - task : ipc_space_t; - name : mach_port_name_t; - mscount : mach_port_mscount_t); - -/* - * Only valid for port sets. Returns a list of - * the members. - */ - -routine mach_port_get_set_status( - task : ipc_space_t; - name : mach_port_name_t; - out members : mach_port_name_array_t); - -/* - * Puts the member port (the task must have receive rights) - * into the after port set. If the port is already a member - * of any set(s), it is atomically removed from those sets as - * part of this operation. (If after is MACH_PORT_NULL, the - * port is still removed from all current sets). - */ - -routine mach_port_move_member( - task : ipc_space_t; - member : mach_port_name_t; - after : mach_port_name_t); - -/* - * Requests a notification from the kernel. The request - * must supply the send-once right which is used for - * the notification. If a send-once right was previously - * registered, it is returned. The msg_id must be one of - * MACH_NOTIFY_PORT_DESTROYED (receive rights) - * MACH_NOTIFY_DEAD_NAME (send/receive/send-once rights) - * MACH_NOTIFY_NO_SENDERS (receive rights) - * - * The sync value specifies whether a notification should - * get sent immediately, if appropriate. The exact meaning - * depends on the notification: - * MACH_NOTIFY_PORT_DESTROYED: must be zero. - * MACH_NOTIFY_DEAD_NAME: if non-zero, then name can be dead, - * and the notification gets sent immediately. - * If zero, then name can't be dead. - * MACH_NOTIFY_NO_SENDERS: the notification gets sent - * immediately if the current mscount is greater - * than or equal to the sync value and there are no - * extant send rights. - */ - -routine mach_port_request_notification( - task : ipc_space_t; - name : mach_port_name_t; - msgid : mach_msg_id_t; - sync : mach_port_mscount_t; - notify : mach_port_send_once_t; - out previous : mach_port_move_send_once_t); - -/* - * Inserts the specified rights into the target task, - * using the specified name. If inserting send/receive - * rights and the task already has send/receive rights - * for the port, then the names must agree. In any case, - * the task gains a user ref for the port. - */ - -routine mach_port_insert_right( - task : ipc_space_t; - name : mach_port_name_t; - poly : mach_port_poly_t); - -/* - * Returns the specified right for the named port - * in the target task, extracting that right from - * the target task. The target task loses a user - * ref and the name may be available for recycling. - * msgt_name must be one of - * MACH_MSG_TYPE_MOVE_RECEIVE - * MACH_MSG_TYPE_COPY_SEND - * MACH_MSG_TYPE_MAKE_SEND - * MACH_MSG_TYPE_MOVE_SEND - * MACH_MSG_TYPE_MAKE_SEND_ONCE - * MACH_MSG_TYPE_MOVE_SEND_ONCE - */ - -routine mach_port_extract_right( - task : ipc_space_t; - name : mach_port_name_t; - msgt_name : mach_msg_type_name_t; - out poly : mach_port_poly_t); - -/* - * Only valid for receive rights. - * Sets the sequence number for the port. - */ - -routine mach_port_set_seqno( - task : ipc_space_t; - name : mach_port_name_t; - seqno : mach_port_seqno_t); - -/* - * Returns information about a port. - */ - -routine mach_port_get_attributes( - task : ipc_space_t; - name : mach_port_name_t; - flavor : mach_port_flavor_t; - out port_info_out : mach_port_info_t, CountInOut); - -/* - * Set attributes of a port - */ - -routine mach_port_set_attributes( - task : ipc_space_t; - name : mach_port_name_t; - flavor : mach_port_flavor_t; - port_info : mach_port_info_t); - - -/* - * Allocates the specified kind of object, qos version. - * The right must be - * MACH_PORT_RIGHT_RECEIVE - * Like port_allocate_name, but the kernel picks a name. - * It can use any name not associated with a right. - */ - -routine mach_port_allocate_qos( - task : ipc_space_t; - right : mach_port_right_t; - inout qos : mach_port_qos_t; - out name : mach_port_name_t); - - -/* - * Generic interface to allocation various kinds of ports. - * Should never be called directly by users (at least not - * unless they are exceedingly masochistic). - */ - -routine mach_port_allocate_full( - task : ipc_space_t; - right : mach_port_right_t; - proto : mach_port_t; - inout qos : mach_port_qos_t; - inout name : mach_port_name_t); - - -/* - * Pre-expand task port name space. - */ -routine task_set_port_space( - task : ipc_space_t; - table_entries : int); - - -/* - * Returns the exact number of extant send rights - * for the given receive right. - * This call is only valid on MACH_IPC_DEBUG kernels. - * Otherwise, KERN_FAILURE is returned. - */ -routine mach_port_get_srights( - task : ipc_space_t; - name : mach_port_name_t; - out srights : mach_port_rights_t); - - -/* - * Returns information about an IPC space. - * This call is only valid on MACH_IPC_DEBUG kernels. - * Otherwise, KERN_FAILURE is returned. - */ -routine mach_port_space_info( - task : ipc_space_t; - out space_info : ipc_info_space_t; - out table_info : ipc_info_name_array_t; - out tree_info : ipc_info_tree_name_array_t); - -/* - * Returns information about the dead-name requests - * registered with the named receive right. - * This call is only valid on MACH_IPC_DEBUG kernels. - * Otherwise, KERN_FAILURE is returned. - */ -routine mach_port_dnrequest_info( - task : ipc_space_t; - name : mach_port_name_t; - out dnr_total : unsigned; /* total size of table */ - out dnr_used : unsigned); /* amount used */ - -/* - * Return the type and address of the kernel object - * that the given send/receive right represents. - * This call is only valid on MACH_IPC_DEBUG kernels. - * Otherwise, KERN_FAILURE is returned. - * - * This interface is DEPRECATED in favor of the new - * mach_port_kernel_object64() call (see below). - */ -routine mach_port_kernel_object( - task : ipc_space_t; - name : mach_port_name_t; - out object_type : unsigned; - out object_addr : unsigned); - - -/* - * Inserts the specified rights into the portset identified - * by the <task, pset> pair. The results of passing in the - * Poly argument via the supplied disposition must yield a - * receive right. - * - * If the <task,pset> pair does not represent a valid portset - * KERN_INVALID_RIGHT is returned. - * - * If the passed in name argument does not represent a receive - * right, KERN_INVALID_CAPABILITY will be returned. - * - * If the port represented by the receive right is already in - * the portset, KERN_ALREADY_IN_SET is returned. - */ -routine mach_port_insert_member( - task : ipc_space_t; - name : mach_port_name_t; - pset : mach_port_name_t); - -/* - * Extracts the specified right from the named portset - * in the target task. - * the target task. The target task loses a user - * ref and the name may be available for recycling. - * msgt_name must be one of - * MACH_MSG_TYPE_MOVE_RECEIVE - * MACH_MSG_TYPE_COPY_SEND - * MACH_MSG_TYPE_MAKE_SEND - * MACH_MSG_TYPE_MOVE_SEND - * MACH_MSG_TYPE_MAKE_SEND_ONCE - * MACH_MSG_TYPE_MOVE_SEND_ONCE - */ - -routine mach_port_extract_member( - task : ipc_space_t; - name : mach_port_name_t; - pset : mach_port_name_t); - -/* - * Only valid for receive rights. - * Gets the context pointer for the port. - */ - -routine mach_port_get_context( - task : ipc_space_t; - name : mach_port_name_t; - out context : mach_vm_address_t); - -/* - * Only valid for receive rights. - * Sets the context pointer for the port. - */ - -routine mach_port_set_context( - task : ipc_space_t; - name : mach_port_name_t; - context : mach_vm_address_t); - -/* - * Return the type and address of the kernel object - * that the given send/receive right represents. - * This call is only valid on MACH_IPC_DEBUG kernels. - * Otherwise, KERN_FAILURE is returned. - */ -routine mach_port_kobject( - task : ipc_space_t; - name : mach_port_name_t; - out object_type : natural_t; - out object_addr : mach_vm_address_t); - - -/* vim: set ft=c : */ diff --git a/i386/include/mach/mach_port.h b/i386/include/mach/mach_port.h deleted file mode 100644 index c964828..0000000 --- a/i386/include/mach/mach_port.h +++ /dev/null @@ -1,1383 +0,0 @@ -#ifndef _mach_port_user_ -#define _mach_port_user_ - -/* Module mach_port */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef mach_port_MSG_COUNT -#define mach_port_MSG_COUNT 31 -#endif /* mach_port_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mach_types.h> -#include <mach_debug/mach_debug_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine mach_port_names */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_names -( - ipc_space_t task, - mach_port_name_array_t *names, - mach_msg_type_number_t *namesCnt, - mach_port_type_array_t *types, - mach_msg_type_number_t *typesCnt -); - -/* Routine mach_port_type */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_type -( - ipc_space_t task, - mach_port_name_t name, - mach_port_type_t *ptype -); - -/* Routine mach_port_rename */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_rename -( - ipc_space_t task, - mach_port_name_t old_name, - mach_port_name_t new_name -); - -/* Routine mach_port_allocate_name */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_allocate_name -( - ipc_space_t task, - mach_port_right_t right, - mach_port_name_t name -); - -/* Routine mach_port_allocate */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_allocate -( - ipc_space_t task, - mach_port_right_t right, - mach_port_name_t *name -); - -/* Routine mach_port_destroy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_destroy -( - ipc_space_t task, - mach_port_name_t name -); - -/* Routine mach_port_deallocate */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_deallocate -( - ipc_space_t task, - mach_port_name_t name -); - -/* Routine mach_port_get_refs */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_get_refs -( - ipc_space_t task, - mach_port_name_t name, - mach_port_right_t right, - mach_port_urefs_t *refs -); - -/* Routine mach_port_mod_refs */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_mod_refs -( - ipc_space_t task, - mach_port_name_t name, - mach_port_right_t right, - mach_port_delta_t delta -); - -/* Routine mach_port_set_mscount */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_set_mscount -( - ipc_space_t task, - mach_port_name_t name, - mach_port_mscount_t mscount -); - -/* Routine mach_port_get_set_status */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_get_set_status -( - ipc_space_t task, - mach_port_name_t name, - mach_port_name_array_t *members, - mach_msg_type_number_t *membersCnt -); - -/* Routine mach_port_move_member */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_move_member -( - ipc_space_t task, - mach_port_name_t member, - mach_port_name_t after -); - -/* Routine mach_port_request_notification */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_request_notification -( - ipc_space_t task, - mach_port_name_t name, - mach_msg_id_t msgid, - mach_port_mscount_t sync, - mach_port_t notify, - mach_msg_type_name_t notifyPoly, - mach_port_t *previous -); - -/* Routine mach_port_insert_right */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_insert_right -( - ipc_space_t task, - mach_port_name_t name, - mach_port_t poly, - mach_msg_type_name_t polyPoly -); - -/* Routine mach_port_extract_right */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_extract_right -( - ipc_space_t task, - mach_port_name_t name, - mach_msg_type_name_t msgt_name, - mach_port_t *poly, - mach_msg_type_name_t *polyPoly -); - -/* Routine mach_port_set_seqno */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_set_seqno -( - ipc_space_t task, - mach_port_name_t name, - mach_port_seqno_t seqno -); - -/* Routine mach_port_get_attributes */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_get_attributes -( - ipc_space_t task, - mach_port_name_t name, - mach_port_flavor_t flavor, - mach_port_info_t port_info_out, - mach_msg_type_number_t *port_info_outCnt -); - -/* Routine mach_port_set_attributes */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_set_attributes -( - ipc_space_t task, - mach_port_name_t name, - mach_port_flavor_t flavor, - mach_port_info_t port_info, - mach_msg_type_number_t port_infoCnt -); - -/* Routine mach_port_allocate_qos */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_allocate_qos -( - ipc_space_t task, - mach_port_right_t right, - mach_port_qos_t *qos, - mach_port_name_t *name -); - -/* Routine mach_port_allocate_full */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_allocate_full -( - ipc_space_t task, - mach_port_right_t right, - mach_port_t proto, - mach_port_qos_t *qos, - mach_port_name_t *name -); - -/* Routine task_set_port_space */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_set_port_space -( - ipc_space_t task, - int table_entries -); - -/* Routine mach_port_get_srights */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_get_srights -( - ipc_space_t task, - mach_port_name_t name, - mach_port_rights_t *srights -); - -/* Routine mach_port_space_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_space_info -( - ipc_space_t task, - ipc_info_space_t *space_info, - ipc_info_name_array_t *table_info, - mach_msg_type_number_t *table_infoCnt, - ipc_info_tree_name_array_t *tree_info, - mach_msg_type_number_t *tree_infoCnt -); - -/* Routine mach_port_dnrequest_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_dnrequest_info -( - ipc_space_t task, - mach_port_name_t name, - unsigned *dnr_total, - unsigned *dnr_used -); - -/* Routine mach_port_kernel_object */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_kernel_object -( - ipc_space_t task, - mach_port_name_t name, - unsigned *object_type, - unsigned *object_addr -); - -/* Routine mach_port_insert_member */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_insert_member -( - ipc_space_t task, - mach_port_name_t name, - mach_port_name_t pset -); - -/* Routine mach_port_extract_member */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_extract_member -( - ipc_space_t task, - mach_port_name_t name, - mach_port_name_t pset -); - -/* Routine mach_port_get_context */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_get_context -( - ipc_space_t task, - mach_port_name_t name, - mach_vm_address_t *context -); - -/* Routine mach_port_set_context */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_set_context -( - ipc_space_t task, - mach_port_name_t name, - mach_vm_address_t context -); - -/* Routine mach_port_kobject */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_port_kobject -( - ipc_space_t task, - mach_port_name_t name, - natural_t *object_type, - mach_vm_address_t *object_addr -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__mach_port_subsystem__defined -#define __Request__mach_port_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__mach_port_names_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - } __Request__mach_port_type_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t old_name; - mach_port_name_t new_name; - } __Request__mach_port_rename_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_right_t right; - mach_port_name_t name; - } __Request__mach_port_allocate_name_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_right_t right; - } __Request__mach_port_allocate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - } __Request__mach_port_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - } __Request__mach_port_deallocate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - mach_port_right_t right; - } __Request__mach_port_get_refs_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - mach_port_right_t right; - mach_port_delta_t delta; - } __Request__mach_port_mod_refs_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - mach_port_mscount_t mscount; - } __Request__mach_port_set_mscount_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - } __Request__mach_port_get_set_status_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t member; - mach_port_name_t after; - } __Request__mach_port_move_member_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t notify; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_port_name_t name; - mach_msg_id_t msgid; - mach_port_mscount_t sync; - } __Request__mach_port_request_notification_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t poly; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_port_name_t name; - } __Request__mach_port_insert_right_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - mach_msg_type_name_t msgt_name; - } __Request__mach_port_extract_right_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - mach_port_seqno_t seqno; - } __Request__mach_port_set_seqno_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - mach_port_flavor_t flavor; - mach_msg_type_number_t port_info_outCnt; - } __Request__mach_port_get_attributes_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - mach_port_flavor_t flavor; - mach_msg_type_number_t port_infoCnt; - integer_t port_info[10]; - } __Request__mach_port_set_attributes_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_right_t right; - mach_port_qos_t qos; - } __Request__mach_port_allocate_qos_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t proto; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_port_right_t right; - mach_port_qos_t qos; - mach_port_name_t name; - } __Request__mach_port_allocate_full_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int table_entries; - } __Request__task_set_port_space_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - } __Request__mach_port_get_srights_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__mach_port_space_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - } __Request__mach_port_dnrequest_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - } __Request__mach_port_kernel_object_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - mach_port_name_t pset; - } __Request__mach_port_insert_member_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - mach_port_name_t pset; - } __Request__mach_port_extract_member_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - } __Request__mach_port_get_context_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - mach_vm_address_t context; - } __Request__mach_port_set_context_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_port_name_t name; - } __Request__mach_port_kobject_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__mach_port_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__mach_port_subsystem__defined -#define __RequestUnion__mach_port_subsystem__defined -union __RequestUnion__mach_port_subsystem { - __Request__mach_port_names_t Request_mach_port_names; - __Request__mach_port_type_t Request_mach_port_type; - __Request__mach_port_rename_t Request_mach_port_rename; - __Request__mach_port_allocate_name_t Request_mach_port_allocate_name; - __Request__mach_port_allocate_t Request_mach_port_allocate; - __Request__mach_port_destroy_t Request_mach_port_destroy; - __Request__mach_port_deallocate_t Request_mach_port_deallocate; - __Request__mach_port_get_refs_t Request_mach_port_get_refs; - __Request__mach_port_mod_refs_t Request_mach_port_mod_refs; - __Request__mach_port_set_mscount_t Request_mach_port_set_mscount; - __Request__mach_port_get_set_status_t Request_mach_port_get_set_status; - __Request__mach_port_move_member_t Request_mach_port_move_member; - __Request__mach_port_request_notification_t Request_mach_port_request_notification; - __Request__mach_port_insert_right_t Request_mach_port_insert_right; - __Request__mach_port_extract_right_t Request_mach_port_extract_right; - __Request__mach_port_set_seqno_t Request_mach_port_set_seqno; - __Request__mach_port_get_attributes_t Request_mach_port_get_attributes; - __Request__mach_port_set_attributes_t Request_mach_port_set_attributes; - __Request__mach_port_allocate_qos_t Request_mach_port_allocate_qos; - __Request__mach_port_allocate_full_t Request_mach_port_allocate_full; - __Request__task_set_port_space_t Request_task_set_port_space; - __Request__mach_port_get_srights_t Request_mach_port_get_srights; - __Request__mach_port_space_info_t Request_mach_port_space_info; - __Request__mach_port_dnrequest_info_t Request_mach_port_dnrequest_info; - __Request__mach_port_kernel_object_t Request_mach_port_kernel_object; - __Request__mach_port_insert_member_t Request_mach_port_insert_member; - __Request__mach_port_extract_member_t Request_mach_port_extract_member; - __Request__mach_port_get_context_t Request_mach_port_get_context; - __Request__mach_port_set_context_t Request_mach_port_set_context; - __Request__mach_port_kobject_t Request_mach_port_kobject; -}; -#endif /* !__RequestUnion__mach_port_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__mach_port_subsystem__defined -#define __Reply__mach_port_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t names; - mach_msg_ool_descriptor_t types; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t namesCnt; - mach_msg_type_number_t typesCnt; - } __Reply__mach_port_names_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_port_type_t ptype; - } __Reply__mach_port_type_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_port_rename_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_port_allocate_name_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_port_name_t name; - } __Reply__mach_port_allocate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_port_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_port_deallocate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_port_urefs_t refs; - } __Reply__mach_port_get_refs_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_port_mod_refs_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_port_set_mscount_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t members; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t membersCnt; - } __Reply__mach_port_get_set_status_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_port_move_member_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t previous; - /* end of the kernel processed data */ - } __Reply__mach_port_request_notification_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_port_insert_right_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t poly; - /* end of the kernel processed data */ - } __Reply__mach_port_extract_right_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_port_set_seqno_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t port_info_outCnt; - integer_t port_info_out[10]; - } __Reply__mach_port_get_attributes_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_port_set_attributes_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_port_qos_t qos; - mach_port_name_t name; - } __Reply__mach_port_allocate_qos_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_port_qos_t qos; - mach_port_name_t name; - } __Reply__mach_port_allocate_full_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_set_port_space_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_port_rights_t srights; - } __Reply__mach_port_get_srights_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t table_info; - mach_msg_ool_descriptor_t tree_info; - /* end of the kernel processed data */ - NDR_record_t NDR; - ipc_info_space_t space_info; - mach_msg_type_number_t table_infoCnt; - mach_msg_type_number_t tree_infoCnt; - } __Reply__mach_port_space_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - unsigned dnr_total; - unsigned dnr_used; - } __Reply__mach_port_dnrequest_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - unsigned object_type; - unsigned object_addr; - } __Reply__mach_port_kernel_object_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_port_insert_member_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_port_extract_member_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_vm_address_t context; - } __Reply__mach_port_get_context_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_port_set_context_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - natural_t object_type; - mach_vm_address_t object_addr; - } __Reply__mach_port_kobject_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__mach_port_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__mach_port_subsystem__defined -#define __ReplyUnion__mach_port_subsystem__defined -union __ReplyUnion__mach_port_subsystem { - __Reply__mach_port_names_t Reply_mach_port_names; - __Reply__mach_port_type_t Reply_mach_port_type; - __Reply__mach_port_rename_t Reply_mach_port_rename; - __Reply__mach_port_allocate_name_t Reply_mach_port_allocate_name; - __Reply__mach_port_allocate_t Reply_mach_port_allocate; - __Reply__mach_port_destroy_t Reply_mach_port_destroy; - __Reply__mach_port_deallocate_t Reply_mach_port_deallocate; - __Reply__mach_port_get_refs_t Reply_mach_port_get_refs; - __Reply__mach_port_mod_refs_t Reply_mach_port_mod_refs; - __Reply__mach_port_set_mscount_t Reply_mach_port_set_mscount; - __Reply__mach_port_get_set_status_t Reply_mach_port_get_set_status; - __Reply__mach_port_move_member_t Reply_mach_port_move_member; - __Reply__mach_port_request_notification_t Reply_mach_port_request_notification; - __Reply__mach_port_insert_right_t Reply_mach_port_insert_right; - __Reply__mach_port_extract_right_t Reply_mach_port_extract_right; - __Reply__mach_port_set_seqno_t Reply_mach_port_set_seqno; - __Reply__mach_port_get_attributes_t Reply_mach_port_get_attributes; - __Reply__mach_port_set_attributes_t Reply_mach_port_set_attributes; - __Reply__mach_port_allocate_qos_t Reply_mach_port_allocate_qos; - __Reply__mach_port_allocate_full_t Reply_mach_port_allocate_full; - __Reply__task_set_port_space_t Reply_task_set_port_space; - __Reply__mach_port_get_srights_t Reply_mach_port_get_srights; - __Reply__mach_port_space_info_t Reply_mach_port_space_info; - __Reply__mach_port_dnrequest_info_t Reply_mach_port_dnrequest_info; - __Reply__mach_port_kernel_object_t Reply_mach_port_kernel_object; - __Reply__mach_port_insert_member_t Reply_mach_port_insert_member; - __Reply__mach_port_extract_member_t Reply_mach_port_extract_member; - __Reply__mach_port_get_context_t Reply_mach_port_get_context; - __Reply__mach_port_set_context_t Reply_mach_port_set_context; - __Reply__mach_port_kobject_t Reply_mach_port_kobject; -}; -#endif /* !__RequestUnion__mach_port_subsystem__defined */ - -#ifndef subsystem_to_name_map_mach_port -#define subsystem_to_name_map_mach_port \ - { "mach_port_names", 3200 },\ - { "mach_port_type", 3201 },\ - { "mach_port_rename", 3202 },\ - { "mach_port_allocate_name", 3203 },\ - { "mach_port_allocate", 3204 },\ - { "mach_port_destroy", 3205 },\ - { "mach_port_deallocate", 3206 },\ - { "mach_port_get_refs", 3207 },\ - { "mach_port_mod_refs", 3208 },\ - { "mach_port_set_mscount", 3210 },\ - { "mach_port_get_set_status", 3211 },\ - { "mach_port_move_member", 3212 },\ - { "mach_port_request_notification", 3213 },\ - { "mach_port_insert_right", 3214 },\ - { "mach_port_extract_right", 3215 },\ - { "mach_port_set_seqno", 3216 },\ - { "mach_port_get_attributes", 3217 },\ - { "mach_port_set_attributes", 3218 },\ - { "mach_port_allocate_qos", 3219 },\ - { "mach_port_allocate_full", 3220 },\ - { "task_set_port_space", 3221 },\ - { "mach_port_get_srights", 3222 },\ - { "mach_port_space_info", 3223 },\ - { "mach_port_dnrequest_info", 3224 },\ - { "mach_port_kernel_object", 3225 },\ - { "mach_port_insert_member", 3226 },\ - { "mach_port_extract_member", 3227 },\ - { "mach_port_get_context", 3228 },\ - { "mach_port_set_context", 3229 },\ - { "mach_port_kobject", 3230 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _mach_port_user_ */ diff --git a/i386/include/mach/mach_syscalls.h b/i386/include/mach/mach_syscalls.h deleted file mode 100644 index 0e04e4f..0000000 --- a/i386/include/mach/mach_syscalls.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -#ifndef _MACH_MACH_SYSCALLS_H_ -#define _MACH_MACH_SYSCALLS_H_ - -#include <mach/mach_traps.h> - -#endif /* _MACH_MACH_SYSCALLS_H_ */ diff --git a/i386/include/mach/mach_time.h b/i386/include/mach/mach_time.h deleted file mode 100644 index 6a7ce4f..0000000 --- a/i386/include/mach/mach_time.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2001-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_MACH_TIME_H_ -#define _MACH_MACH_TIME_H_ - -#include <mach/mach_types.h> - -#include <sys/cdefs.h> - -struct mach_timebase_info { - uint32_t numer; - uint32_t denom; -}; - -typedef struct mach_timebase_info *mach_timebase_info_t; -typedef struct mach_timebase_info mach_timebase_info_data_t; - -__BEGIN_DECLS - -kern_return_t mach_timebase_info( - mach_timebase_info_t info); - -kern_return_t mach_wait_until( - uint64_t deadline); - - -uint64_t mach_absolute_time(void); -__END_DECLS - -#endif /* _MACH_MACH_TIME_H_ */ diff --git a/i386/include/mach/mach_traps.h b/i386/include/mach/mach_traps.h deleted file mode 100644 index 50cbd0a..0000000 --- a/i386/include/mach/mach_traps.h +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * Definitions of general Mach system traps. - * - * These are the definitions as seen from user-space. - * The kernel definitions are in <mach/syscall_sw.h>. - * Kernel RPC functions are defined in <mach/mach_interface.h>. - */ - -#ifndef _MACH_MACH_TRAPS_H_ -#define _MACH_MACH_TRAPS_H_ - -#include <stdint.h> - -#include <mach/std_types.h> -#include <mach/mach_types.h> -#include <mach/kern_return.h> -#include <mach/port.h> -#include <mach/vm_types.h> -#include <mach/clock_types.h> - -#include <machine/endian.h> - -#include <sys/cdefs.h> - -__BEGIN_DECLS - - - -extern kern_return_t macx_swapon( - uint64_t filename, - int flags, - int size, - int priority); - -extern kern_return_t macx_swapoff( - uint64_t filename, - int flags); - -extern kern_return_t macx_triggers( - int hi_water, - int low_water, - int flags, - mach_port_t alert_port); - -extern kern_return_t macx_backing_store_suspend( - boolean_t suspend); - -extern kern_return_t macx_backing_store_recovery( - int pid); - -extern boolean_t swtch_pri(int pri); - -extern boolean_t swtch(void); - -extern kern_return_t thread_switch( - mach_port_name_t thread_name, - int option, - mach_msg_timeout_t option_time); - -extern mach_port_name_t task_self_trap(void); - -/* - * Obsolete interfaces. - */ - -extern kern_return_t task_for_pid( - mach_port_name_t target_tport, - int pid, - mach_port_name_t *t); - -extern kern_return_t task_name_for_pid( - mach_port_name_t target_tport, - int pid, - mach_port_name_t *tn); - -extern kern_return_t pid_for_task( - mach_port_name_t t, - int *x); - -#if !defined(__LP64__) -/* these should go away altogether - so no 64 legacy please */ - -extern kern_return_t map_fd( - int fd, - vm_offset_t offset, - vm_offset_t *va, - boolean_t findspace, - vm_size_t size); - -#endif /* !defined(__LP64__) */ - - -__END_DECLS - -#endif /* _MACH_MACH_TRAPS_H_ */ diff --git a/i386/include/mach/mach_types.defs b/i386/include/mach/mach_types.defs deleted file mode 100644 index d325179..0000000 --- a/i386/include/mach/mach_types.defs +++ /dev/null @@ -1,474 +0,0 @@ -/* - * Copyright (c) 2000-2009 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - * NOTICE: This file was modified by McAfee Research in 2004 to introduce - * support for mandatory and extensible security protections. This notice - * is included in support of clause 2.2 (b) of the Apple Public License, - * Version 2.0. - */ -/* - */ -/* - * Mach kernel interface type declarations - */ - -#ifndef _MACH_MACH_TYPES_DEFS_ -#define _MACH_MACH_TYPES_DEFS_ - - -#include <mach/std_types.defs> - -type memory_object_offset_t = uint64_t; -type memory_object_size_t = uint64_t; -type memory_object_cluster_size_t = uint32_t; -type memory_object_fault_info_t = array[16] of integer_t; - - -type mach_port_status_t = struct[10] of integer_t; /* obsolete */ - - /* mach_port_info_t: can hold either a - * mach_port_status_t (9 ints) or a - * mach_port_limits_t (1 int). If new flavors of - * mach_port_{get,set}_attributes are added, the size of - * this array may have to be increased. (See mach/port.h) - */ -type mach_port_flavor_t = int; -type mach_port_info_t = array[*:10] of integer_t; - -type task_t = mach_port_t -#if KERNEL_SERVER - intran: task_t convert_port_to_task(mach_port_t) - outtran: mach_port_t convert_task_to_port(task_t) - destructor: task_deallocate(task_t) -#endif /* KERNEL_SERVER */ - ; - -type task_name_t = mach_port_t -#if KERNEL_SERVER - intran: task_name_t convert_port_to_task_name(mach_port_t) - outtran: mach_port_t convert_task_name_to_port(task_name_t) - destructor: task_name_deallocate(task_name_t) -#endif /* KERNEL_SERVER */ - ; - -type thread_t = mach_port_t -#if KERNEL_SERVER - intran: thread_t convert_port_to_thread(mach_port_t) - outtran: mach_port_t convert_thread_to_port(thread_t) - destructor: thread_deallocate(thread_t) -#endif /* KERNEL_SERVER */ - ; - -type thread_act_t = mach_port_t -#if KERNEL_SERVER - intran: thread_act_t convert_port_to_thread(mach_port_t) - outtran: mach_port_t convert_thread_to_port(thread_act_t) - destructor: thread_deallocate(thread_act_t) -#endif /* KERNEL_SERVER */ - ; - -type thread_act_consume_ref_t = mach_port_move_send_t - cusertype: thread_act_t -#if KERNEL_SERVER - intran: thread_act_t convert_port_to_thread(mach_port_t) - destructor: thread_deallocate(thread_act_t) -#endif /* KERNEL_SERVER */ - ; - - /* thread_state_t: This inline array can hold - * a machine-dependent amount of data, defined in - * mach/machine/???? (currently THREAD_STATE_MAX, - * in mach/thread_state.h) - */ -#include <mach/machine/thread_state.h> -type thread_state_flavor_t = int; -type thread_state_t = array[*:THREAD_STATE_MAX] of natural_t; - -type task_array_t = ^array[] of task_t; -type thread_array_t = ^array[] of thread_t; -type thread_act_array_t = ^array[] of thread_act_t; -type act_params_t = array[6] of int; - -type vm_map_t = mach_port_t -#if KERNEL_SERVER - intran: vm_map_t convert_port_to_map(mach_port_t) - destructor: vm_map_deallocate(vm_map_t) -#endif /* KERNEL_SERVER */ - ; - -type vm_task_entry_t = mach_port_t - cusertype: vm_map_t -#if KERNEL_SERVER - intran: vm_map_t convert_port_entry_to_map(mach_port_t) - destructor: vm_map_deallocate(vm_map_t) -#endif /* KERNEL_SERVER */ - ; - -type ipc_space_t = mach_port_t -#if KERNEL_SERVER - intran: ipc_space_t convert_port_to_space(mach_port_t) - destructor: space_deallocate(ipc_space_t) -#endif /* KERNEL_SERVER */ - ; - -type vm_prot_t = int; -type vm_inherit_t = int; -type vm_purgable_t = int; -type xxx_vm_statistics_data_t = struct[13] of integer_t; -type vm_behavior_t = int; -type vm_statistics_data_t = struct[15] of integer_t; -type vm_machine_attribute_t = int; -type vm_machine_attribute_val_t = int; -type vm_sync_t = int; - - /* thread_info_t: this inline array can hold any of: - * thread_basic_info_t (10 ints) - * policy_timeshare_info_t (5 ints) - * policy_fifo_info_t (4 ints) - * policy_rr_info_t (5 ints) - * if other thread_info flavors are added, this - * definition may need to be changed. (See - * mach/thread_info.h and mach/policy.h) */ -type thread_flavor_t = int; -type thread_info_t = array[*:12] of integer_t; - -type thread_policy_flavor_t = natural_t; -type thread_policy_t = array[*:16] of integer_t; - - /* task_info_t: this inline array can hold any of: - * task_basic_info_32_t (8 ints) - * task_basic_info_64_t (10 ints) - * task_events_info_t (8 ints) - * task_thread_times_info_t (4 ints) - * policy_timeshare_info_t (5 ints) - * policy_fifo_info_t (4 ints) - * policy_rr_info_t (5 ints) - * task security token (2 ints) - * task audit token (8 ints) - * If other task_info flavors are added, this - * definition may need to be changed. (See - * mach/task_info.h and mach/policy.h) */ -type task_flavor_t = int; -type task_info_t = array[*:10] of integer_t; - -type task_policy_flavor_t = natural_t; -type task_policy_t = array[*:16] of integer_t; - -type mem_entry_name_port_t = mach_port_t -#if KERNEL_SERVER - intran: mem_entry_name_port_t null_conversion(mach_port_t) - outtran: mach_port_t null_conversion(mem_entry_name_port_t) -#endif /* KERNEL_SERVER */ - ; - -type mem_entry_name_port_move_send_t = mach_port_move_send_t - cusertype: mem_entry_name_port_t -#if KERNEL_SERVER - intran: mem_entry_name_port_t null_conversion(mach_port_t) - outtran: mach_port_t null_conversion(mem_entry_name_port_t) -#endif /* KERNEL_SERVER */ - ; - -type memory_object_default_t = mach_port_t - ; - -type memory_object_t = mach_port_t - ; - - -type memory_object_control_t = mach_port_t - ; - -type memory_object_name_t = mach_port_t - ctype: mach_port_t - ; - - -type memory_object_copy_strategy_t = int; -type memory_object_return_t = int; - -type machine_info_data_t = struct[5] of integer_t; -type machine_slot_data_t = struct[8] of integer_t; - -type host_t = mach_port_t -#if KERNEL_SERVER - intran: host_t convert_port_to_host(mach_port_t) - outtran: mach_port_t convert_host_to_port(host_t) -#endif /* KERNEL_SERVER */ - ; - -type host_priv_t = mach_port_t -#if KERNEL_SERVER - intran: host_priv_t convert_port_to_host_priv(mach_port_t) -#endif /* KERNEL_SERVER */ - ; - -type host_security_t = mach_port_t -#if KERNEL_SERVER - intran: host_security_t convert_port_to_host_security(mach_port_t) -#endif /* KERNEL_SERVER */ - ; - - /* - * host_info_t: variable-sized inline array that can contain: - * - * host_basic_info_old_t (5 ints) - * host_basic_info_t (12 ints) - * host_sched_info_t (2 ints) - * kernel_resource_sizes_t (5 ints) - * host_load_info_t (6 ints) - * vm_statistics32_t (15 ints) - * - * If other host_info flavors are added, this definition may - * need to be changed. (See mach/{host_info,vm_statistics}.h) - */ -type host_flavor_t = int; -type host_info_t = array[*:15] of integer_t; - - - /* - * host_info64_t: variable-sized inline array that can contain: - * - * vm_statistics_t (6 ints and 9 longs) - */ -type host_info64_t = array[*:256] of integer_t; - -type processor_t = mach_port_t -#if KERNEL_SERVER - intran: processor_t convert_port_to_processor(mach_port_t) - outtran: mach_port_t convert_processor_to_port(processor_t) -#endif /* KERNEL_SERVER */ - ; - -type processor_array_t = ^array[] of processor_t; - - /* processor_info_t: variable-sized inline array that can - * contain: - * processor_basic_info_t: (5 ints) - * processor_cpu_load_info_t:(4 ints) - * processor_machine_info_t :(12 ints) - * If other processor_info flavors are added, this definition - * may need to be changed. (See mach/processor_info.h) */ -type processor_flavor_t = int; -type processor_info_t = array[*:12] of integer_t; -type processor_info_array_t = ^array[] of integer_t; - -type processor_set_t = mach_port_t -#if KERNEL_SERVER - intran: processor_set_t convert_port_to_pset(mach_port_t) - outtran: mach_port_t convert_pset_to_port(processor_set_t) - destructor: pset_deallocate(processor_set_t) -#endif /* KERNEL_SERVER */ - ; - -type processor_set_array_t = ^array[] of processor_set_t; - -type processor_set_name_t = mach_port_t -#if KERNEL_SERVER - intran: processor_set_name_t convert_port_to_pset_name(mach_port_t) - outtran: mach_port_t convert_pset_name_to_port(processor_set_name_t) - destructor: pset_deallocate(processor_set_name_t) -#endif /* KERNEL_SERVER */ - ; - -type processor_set_name_array_t = ^array[] of processor_set_name_t; - - /* processor_set_info_t: variable-size inline array - * that can hold: - * processor_set_basic_info (5 ints) - * processor_set_load_info (4 ints) - * policy_timeshare_base_t (1 int) - * policy_fifo_base_t (1 int) - * policy_rr_base_t (1 int) - * policy_timeshare_base_t (1 int) - * policy_fifo_base_t (1 int) - * policy_rr_base_t (1 int) - * policy_t (1 int) - * If other flavors are added, this definition may - * need to be changed. (see mach/processor.h) */ -type processor_set_flavor_t = int; -type processor_set_info_t = array[*:5] of integer_t; - -type bootstrap_t = mach_port_t; - -type kernel_version_t = c_string[*:512]; -type kernel_boot_info_t = c_string[*:4096]; - -type time_value_t = struct[2] of integer_t; - -type mach_port_qos_t = struct[2] of integer_t; - -type emulation_vector_t = ^array[] of vm_offset_t; - -type inline_existence_map_t = array[*:512] of char; - -type policy_t = int; - /* policy_info_t: variable-size inline array. Can hold: - * policy_timeshare_info_t (5 ints) - * policy_fifo_info_t (4 ints) - * policy_rr_info_t (5 ints) */ -type policy_base_t = array[*:5] of integer_t; -type policy_info_t = array[*:2] of integer_t; -type policy_limit_t = array[*:1] of integer_t; - -type ledger_t = mach_port_t -#if KERNEL_SERVER - intran: ledger_t convert_port_to_ledger(mach_port_t) - outtran: mach_port_t convert_ledger_to_port(ledger_t) -#endif /* KERNEL_SERVER */ - ; - -type ledger_array_t = ^array[] of ledger_t; -type ledger_item_t = integer_t; - -type security_token_t = struct[2] of uint32_t; -type audit_token_t = struct[8] of uint32_t; - -type msg_labels_t = mach_port_t; - - /* memory_object_info_t: variable-size inline array: - * memory_object_attr_info_t (5 ints) - * XXX actually it's 6 ints temporarily (object_ready!) - * memory_object_behave_info_t (4 ints) - * memory_object_perf_info_t (2 ints) - * old_memory_object_attr_info_t (3 ints) - * memory_object_norma_info_t (5 ints) - * If other flavors are added, this definition may - * need to be changed. (see mach/memory_object.h) */ -type memory_object_flavor_t = int; -type memory_object_info_t = array[*:6] of int; - - /* vm_region_info_t: variable-size inline array that can hold: - * vm_region_basic_info_t (8 ints) - * If other flavors are added, this definition may - * need to be changed. (see mach/vm_region.h) */ -type vm_region_flavor_t = int; -type vm_region_info_t = array[*:10] of int; -type vm_region_recurse_info_t = array[*:19] of int; - -type vm_page_info_flavor_t = int; -type vm_page_info_t = array[*:32] of int; - -type mach_vm_read_entry_t = array[512] of mach_vm_offset_t; -type vm_read_entry_t = array[512] of vm_offset_t; -#if VM32_SUPPORT -type vm32_read_entry_t = array[512] of vm32_offset_t; -#endif - -type exception_mask_t = int; -type exception_behavior_t = int; - -type exception_handler_t = mach_port_t; - -type exception_handler_array_t = - array[*:32] of exception_handler_t; - -type exception_behavior_array_t = - array[*:32] of exception_behavior_t; - -type exception_flavor_array_t = - array[*:32] of thread_state_flavor_t; - -type exception_mask_array_t = - array[*:32] of exception_mask_t; - -type semaphore_t = mach_port_t -#if KERNEL_SERVER - intran: semaphore_t convert_port_to_semaphore(mach_port_t) - outtran: mach_port_t convert_semaphore_to_port(semaphore_t) - destructor: semaphore_dereference(semaphore_t) -#endif /* KERNEL_SERVER */ - ; - -type semaphore_consume_ref_t = mach_port_move_send_t - cusertype: semaphore_t -#if KERNEL_SERVER - intran: semaphore_t convert_port_to_semaphore(mach_port_t) - outtran: mach_port_t convert_semaphore_to_port(semaphore_t) - destructor: semaphore_dereference(semaphore_t) -#endif /* KERNEL_SERVER */ - ; - -type lock_set_t = mach_port_t -#if KERNEL_SERVER - intran: lock_set_t convert_port_to_lock_set(mach_port_t) - outtran: mach_port_t convert_lock_set_to_port(lock_set_t) - destructor: lock_set_dereference(lock_set_t) -#endif /* KERNEL_SERVER */ - ; - -/* kernel module loader */ -type kmod_t = int; -type kmod_control_flavor_t = int; - -type kmod_args_t = ^array[] of MACH_MSG_TYPE_BYTE - ctype: kmod_args_t; - -type io_master_t = mach_port_t; -type UNDServerRef = mach_port_t; - -#if KERNEL_SERVER - -simport <kern/ipc_mig.h>; /* pick up kernel-specific MIG things */ - -#endif /* KERNEL_SERVER */ - -import <mach/mig.h>; -import <mach/mach_types.h>; - -#endif /* _MACH_MACH_TYPES_DEFS_ */ - -/* vim: set ft=c : */ diff --git a/i386/include/mach/mach_types.h b/i386/include/mach/mach_types.h deleted file mode 100644 index 30ebec9..0000000 --- a/i386/include/mach/mach_types.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce - * support for mandatory and extensible security protections. This notice - * is included in support of clause 2.2 (b) of the Apple Public License, - * Version 2.0. - */ -/* - * File: mach/mach_types.h - * Author: Avadis Tevanian, Jr., Michael Wayne Young - * Date: 1986 - * - * Mach external interface definitions. - * - */ - -#ifndef _MACH_MACH_TYPES_H_ -#define _MACH_MACH_TYPES_H_ - -#include <stdint.h> - -#include <sys/cdefs.h> - -#include <mach/host_info.h> -#include <mach/host_notify.h> -#include <mach/host_special_ports.h> -#include <mach/machine.h> -#include <mach/machine/vm_types.h> -#include <mach/memory_object_types.h> -#include <mach/message.h> -#include <mach/exception_types.h> -#include <mach/port.h> -#include <mach/processor_info.h> -#include <mach/task_info.h> -#include <mach/task_policy.h> -#include <mach/task_special_ports.h> -#include <mach/thread_info.h> -#include <mach/thread_policy.h> -#include <mach/thread_special_ports.h> -#include <mach/thread_status.h> -#include <mach/time_value.h> -#include <mach/clock_types.h> -#include <mach/vm_attributes.h> -#include <mach/vm_inherit.h> -#include <mach/vm_purgable.h> -#include <mach/vm_behavior.h> -#include <mach/vm_prot.h> -#include <mach/vm_statistics.h> -#include <mach/vm_sync.h> -#include <mach/vm_types.h> -#include <mach/vm_region.h> -#include <mach/kmod.h> - - -/* - * If we are not in the kernel, then these will all be represented by - * ports at user-space. - */ -typedef mach_port_t task_t; -typedef mach_port_t task_name_t; -typedef mach_port_t thread_t; -typedef mach_port_t thread_act_t; -typedef mach_port_t ipc_space_t; -typedef mach_port_t host_t; -typedef mach_port_t host_priv_t; -typedef mach_port_t host_security_t; -typedef mach_port_t processor_t; -typedef mach_port_t processor_set_t; -typedef mach_port_t processor_set_control_t; -typedef mach_port_t semaphore_t; -typedef mach_port_t lock_set_t; -typedef mach_port_t ledger_t; -typedef mach_port_t alarm_t; -typedef mach_port_t clock_serv_t; -typedef mach_port_t clock_ctrl_t; - - -/* - * These aren't really unique types. They are just called - * out as unique types at one point in history. So we list - * them here for compatibility. - */ -typedef processor_set_t processor_set_name_t; - -/* - * These types are just hard-coded as ports - */ -typedef mach_port_t clock_reply_t; -typedef mach_port_t bootstrap_t; -typedef mach_port_t mem_entry_name_port_t; -typedef mach_port_t exception_handler_t; -typedef exception_handler_t *exception_handler_array_t; -typedef mach_port_t vm_task_entry_t; -typedef mach_port_t io_master_t; -typedef mach_port_t UNDServerRef; - -/* - * Mig doesn't translate the components of an array. - * For example, Mig won't use the thread_t translations - * to translate a thread_array_t argument. So, these definitions - * are not completely accurate at the moment for other kernel - * components. - */ -typedef task_t *task_array_t; -typedef thread_t *thread_array_t; -typedef processor_set_t *processor_set_array_t; -typedef processor_set_t *processor_set_name_array_t; -typedef processor_t *processor_array_t; -typedef thread_act_t *thread_act_array_t; -typedef ledger_t *ledger_array_t; - -/* - * However the real mach_types got declared, we also have to declare - * types with "port" in the name for compatability with the way OSF - * had declared the user interfaces at one point. Someday these should - * go away. - */ -typedef task_t task_port_t; -typedef task_array_t task_port_array_t; -typedef thread_t thread_port_t; -typedef thread_array_t thread_port_array_t; -typedef ipc_space_t ipc_space_port_t; -typedef host_t host_name_t; -typedef host_t host_name_port_t; -typedef processor_set_t processor_set_port_t; -typedef processor_set_t processor_set_name_port_t; -typedef processor_set_array_t processor_set_name_port_array_t; -typedef processor_set_t processor_set_control_port_t; -typedef processor_t processor_port_t; -typedef processor_array_t processor_port_array_t; -typedef thread_act_t thread_act_port_t; -typedef thread_act_array_t thread_act_port_array_t; -typedef semaphore_t semaphore_port_t; -typedef lock_set_t lock_set_port_t; -typedef ledger_t ledger_port_t; -typedef ledger_array_t ledger_port_array_t; -typedef alarm_t alarm_port_t; -typedef clock_serv_t clock_serv_port_t; -typedef clock_ctrl_t clock_ctrl_port_t; -typedef exception_handler_t exception_port_t; -typedef exception_handler_array_t exception_port_arrary_t; - - -#define TASK_NULL ((task_t) 0) -#define TASK_NAME_NULL ((task_name_t) 0) -#define THREAD_NULL ((thread_t) 0) -#define THR_ACT_NULL ((thread_act_t) 0) -#define IPC_SPACE_NULL ((ipc_space_t) 0) -#define HOST_NULL ((host_t) 0) -#define HOST_PRIV_NULL ((host_priv_t)0) -#define HOST_SECURITY_NULL ((host_security_t)0) -#define PROCESSOR_SET_NULL ((processor_set_t) 0) -#define PROCESSOR_NULL ((processor_t) 0) -#define SEMAPHORE_NULL ((semaphore_t) 0) -#define LOCK_SET_NULL ((lock_set_t) 0) -#define LEDGER_NULL ((ledger_t) 0) -#define ALARM_NULL ((alarm_t) 0) -#define CLOCK_NULL ((clock_t) 0) -#define UND_SERVER_NULL ((UNDServerRef) 0) - -typedef natural_t ledger_item_t; -#define LEDGER_ITEM_INFINITY ((ledger_item_t) (~0)) - -typedef mach_vm_offset_t *emulation_vector_t; -typedef char *user_subsystem_t; - -typedef char *labelstr_t; -/* - * Backwards compatibility, for those programs written - * before mach/{std,mach}_types.{defs,h} were set up. - */ -#include <mach/std_types.h> - -#endif /* _MACH_MACH_TYPES_H_ */ diff --git a/i386/include/mach/mach_vm.defs b/i386/include/mach/mach_vm.defs deleted file mode 100644 index 8dbb71f..0000000 --- a/i386/include/mach/mach_vm.defs +++ /dev/null @@ -1,480 +0,0 @@ -/* - * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_FREE_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/mach_vm.defs - * - * Exported kernel VM calls (for any task on the platform). - */ - -subsystem -#if KERNEL_SERVER - KernelServer -#endif /* KERNEL_SERVER */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) - mach_vm -#else - vm_map_lp64_local -#endif - 4800; - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> -#include <mach_debug/mach_debug_types.defs> - -/* - * Allocate zero-filled memory in the address space - * of the target task, either at the specified address, - * or wherever space can be found (controlled by flags), - * of the specified size. The address at which the - * allocation actually took place is returned. - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_allocate( -#else -routine vm_allocate( -#endif - target : vm_task_entry_t; - inout address : mach_vm_address_t; - size : mach_vm_size_t; - flags : int); - -/* - * Deallocate the specified range from the virtual - * address space of the target virtual memory map. - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_deallocate( -#else -routine vm_deallocate( -#endif - target : vm_task_entry_t; - address : mach_vm_address_t; - size : mach_vm_size_t); - -/* - * Set the current or maximum protection attribute - * for the specified range of the virtual address - * space of the target virtual memory map. The current - * protection limits the memory access rights of threads - * within the map; the maximum protection limits the accesses - * that may be given in the current protection. - * Protections are specified as a set of {read, write, execute} - * *permissions*. - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_protect( -#else -routine vm_protect( -#endif - target_task : vm_task_entry_t; - address : mach_vm_address_t; - size : mach_vm_size_t; - set_maximum : boolean_t; - new_protection : vm_prot_t); - -/* - * Set the inheritance attribute for the specified range - * of the virtual address space of the target address space. - * The inheritance value is one of {none, copy, share}, and - * specifies how the child address space should acquire - * this memory at the time of a task_create call. - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_inherit( -#else -routine vm_inherit( -#endif - target_task : vm_task_entry_t; - address : mach_vm_address_t; - size : mach_vm_size_t; - new_inheritance : vm_inherit_t); - -/* - * Returns the contents of the specified range of the - * virtual address space of the target task. [The - * range must be aligned on a virtual page boundary, - * and must be a multiple of pages in extent. The - * protection on the specified range must permit reading.] - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_read( -#else -routine vm_read( -#endif - target_task : vm_map_t; - address : mach_vm_address_t; - size : mach_vm_size_t; - out data : pointer_t); - -/* - * List corrollary to vm_read, returns mapped contents of specified - * ranges within target address space. - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_read_list( -#else -routine vm_read_list( -#endif - target_task : vm_map_t; - inout data_list : mach_vm_read_entry_t; - count : natural_t); - -/* - * Writes the contents of the specified range of the - * virtual address space of the target task. [The - * range must be aligned on a virtual page boundary, - * and must be a multiple of pages in extent. The - * protection on the specified range must permit writing.] - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_write( -#else -routine vm_write( -#endif - target_task : vm_map_t; - address : mach_vm_address_t; - data : pointer_t); - -/* - * Copy the contents of the source range of the virtual - * address space of the target task to the destination - * range in that same address space. [Both of the - * ranges must be aligned on a virtual page boundary, - * and must be multiples of pages in extent. The - * protection on the source range must permit reading, - * and the protection on the destination range must - * permit writing.] - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_copy( -#else -routine vm_copy( -#endif - target_task : vm_map_t; - source_address : mach_vm_address_t; - size : mach_vm_size_t; - dest_address : mach_vm_address_t); - -/* - * Returns the contents of the specified range of the - * virtual address space of the target task. [There - * are no alignment restrictions, and the results will - * overwrite the area pointed to by data - which must - * already exist. The protection on the specified range - * must permit reading.] - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_read_overwrite( -#else -routine vm_read_overwrite( -#endif - target_task : vm_map_t; - address : mach_vm_address_t; - size : mach_vm_size_t; - data : mach_vm_address_t; - out outsize : mach_vm_size_t); - - -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_msync( -#else -routine vm_msync( -#endif - target_task : vm_map_t; - address : mach_vm_address_t; - size : mach_vm_size_t; - sync_flags : vm_sync_t ); - -/* - * Set the paging behavior attribute for the specified range - * of the virtual address space of the target task. - * The behavior value is one of {default, random, forward - * sequential, reverse sequential} and indicates the expected - * page reference pattern for the specified range. - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_behavior_set( -#else -routine vm_behavior_set( -#endif - target_task : vm_map_t; - address : mach_vm_address_t; - size : mach_vm_size_t; - new_behavior : vm_behavior_t); - - -/* - * Map a user-supplie memory object into the virtual address - * space of the target task. If desired (anywhere is TRUE), - * the kernel will find a suitable address range of the - * specified size; else, the specific address will be allocated. - * - * The beginning address of the range will be aligned on a virtual - * page boundary, be at or beyond the address specified, and - * meet the mask requirements (bits turned on in the mask must not - * be turned on in the result); the size of the range, in bytes, - * will be rounded up to an integral number of virtual pages. - * - * The memory in the resulting range will be associated with the - * specified memory object, with the beginning of the memory range - * referring to the specified offset into the memory object. - * - * The mapping will take the current and maximum protections and - * the inheritance attributes specified; see the vm_protect and - * vm_inherit calls for a description of these attributes. - * - * If desired (copy is TRUE), the memory range will be filled - * with a copy of the data from the memory object; this copy will - * be private to this mapping in this target task. Otherwise, - * the memory in this mapping will be shared with other mappings - * of the same memory object at the same offset (in this task or - * in other tasks). [The Mach kernel only enforces shared memory - * consistency among mappings on one host with similar page alignments. - * The user-defined memory manager for this object is responsible - * for further consistency.] - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_map( -#else -routine vm_map( -#endif - target_task : vm_task_entry_t; - inout address : mach_vm_address_t; - size : mach_vm_size_t; - mask : mach_vm_offset_t; - flags : int; - object : mem_entry_name_port_t; - offset : memory_object_offset_t; - copy : boolean_t; - cur_protection : vm_prot_t; - max_protection : vm_prot_t; - inheritance : vm_inherit_t); - -/* - * Set/Get special properties of memory associated - * to some virtual address range, such as cachability, - * migrability, replicability. Machine-dependent. - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_machine_attribute( -#else -routine vm_machine_attribute( -#endif - target_task : vm_map_t; - address : mach_vm_address_t; - size : mach_vm_size_t; - attribute : vm_machine_attribute_t; - inout value : vm_machine_attribute_val_t); - -/* - * Map portion of a task's address space. - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_remap( -#else -routine vm_remap( -#endif - target_task : vm_map_t; - inout target_address : mach_vm_address_t; - size : mach_vm_size_t; - mask : mach_vm_offset_t; - anywhere : boolean_t; - src_task : vm_map_t; - src_address : mach_vm_address_t; - copy : boolean_t; - out cur_protection : vm_prot_t; - out max_protection : vm_prot_t; - inheritance : vm_inherit_t); - -/* - * Give the caller information on the given location in a virtual - * address space. If a page is mapped return ref and dirty info. - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_page_query( -#else -routine vm_map_page_query( -#endif - target_map :vm_map_t; - offset :mach_vm_offset_t; - out disposition :integer_t; - out ref_count :integer_t); - - -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_region_recurse( -#else -routine vm_region_recurse_64( -#endif - target_task : vm_map_t; - inout address : mach_vm_address_t; - out size : mach_vm_size_t; - inout nesting_depth : natural_t; - out info : vm_region_recurse_info_t,CountInOut); - -/* - * Returns information about the contents of the virtual - * address space of the target task at the specified - * address. The returned protection, inheritance, sharing - * and memory object values apply to the entire range described - * by the address range returned; the memory object offset - * corresponds to the beginning of the address range. - * [If the specified address is not allocated, the next - * highest address range is described. If no addresses beyond - * the one specified are allocated, the call returns KERN_NO_SPACE.] - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_region( -#else -routine vm_region_64( -#endif - target_task : vm_map_t; - inout address : mach_vm_address_t; - out size : mach_vm_size_t; - flavor : vm_region_flavor_t; - out info : vm_region_info_t, CountInOut; - out object_name : memory_object_name_t = - MACH_MSG_TYPE_MOVE_SEND - ctype: mach_port_t); - -/* - * Allow application level processes to create named entries which - * correspond to mapped portions of their address space. These named - * entries can then be manipulated, shared with other processes in - * other address spaces and ultimately mapped in ohter address spaces - * - * THIS INTERFACE IS STILL EVOLVING. - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -#if !defined(__LP64__) || KERNEL_SERVER || XNU_KERNEL_PRIVATE || LIBSYSCALL_INTERFACE -routine _mach_make_memory_entry( -#else -routine mach_make_memory_entry( -#endif -#else -routine mach_make_memory_entry_64( -#endif - target_task :vm_map_t; - inout size :memory_object_size_t; - offset :memory_object_offset_t; - permission :vm_prot_t; - out object_handle :mem_entry_name_port_move_send_t; - parent_handle :mem_entry_name_port_t); - -/* - * Control behavior and investigate state of a "purgable" object in - * the virtual address space of the target task. A purgable object is - * created via a call to mach_vm_allocate() with VM_FLAGS_PURGABLE - * specified. See the routine implementation for a complete - * definition of the routine. - */ -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_purgable_control( -#else -routine vm_purgable_control( -#endif - target_task : vm_map_t; - address : mach_vm_address_t; - control : vm_purgable_t; - inout state : int); - - -#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_) -routine mach_vm_page_info( - target_task : vm_map_t; - address : mach_vm_address_t; - flavor : vm_page_info_flavor_t; - out info : vm_page_info_t, CountInOut); -#else -skip; -#endif - -/****************************** Legacy section ***************************/ -/* The following definitions are exist to provide compatibility with */ -/* the legacy APIs. They are no different. We just need to produce */ -/* the user-level stub interface for them. */ -/****************************** Legacy section ***************************/ - - -/* - * These interfaces just aren't supported in the new (wide) model: - * - * mach_vm_region_info() - - * vm_map_pages_info() - - * no user-level replacement for these MACH_DEBUG interfaces - * vm_map_get_upl() - - * no user-level replacement at the moment - * vm_region_info() - - * use mach_vm_region_info() or vm_region_info_64() - * vm_region_recurse() - - * use mach_vm_region_recurse() or vm_region_recurse_64() - */ - -/* - * The following legacy interfaces are provides as macro wrappers to the new - * interfaces. You should strive to use the new ones instead: - * - * vm_map() - - * use mach_vm_map() or vm_map_64() - * vm_region() - - * use mach_vm_region() or vm_region_64() - * mach_make_memory_entry() - - * use mach_vm_make_memory_entry() or mach_make_memory_entry_64() - */ - -/* vim: set ft=c : */ diff --git a/i386/include/mach/mach_vm.h b/i386/include/mach/mach_vm.h deleted file mode 100644 index f72b17e..0000000 --- a/i386/include/mach/mach_vm.h +++ /dev/null @@ -1,1032 +0,0 @@ -#ifndef _mach_vm_user_ -#define _mach_vm_user_ - -/* Module mach_vm */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef mach_vm_MSG_COUNT -#define mach_vm_MSG_COUNT 20 -#endif /* mach_vm_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mach_types.h> -#include <mach_debug/mach_debug_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine mach_vm_allocate */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_allocate -( - vm_map_t target, - mach_vm_address_t *address, - mach_vm_size_t size, - int flags -); - -/* Routine mach_vm_deallocate */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_deallocate -( - vm_map_t target, - mach_vm_address_t address, - mach_vm_size_t size -); - -/* Routine mach_vm_protect */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_protect -( - vm_map_t target_task, - mach_vm_address_t address, - mach_vm_size_t size, - boolean_t set_maximum, - vm_prot_t new_protection -); - -/* Routine mach_vm_inherit */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_inherit -( - vm_map_t target_task, - mach_vm_address_t address, - mach_vm_size_t size, - vm_inherit_t new_inheritance -); - -/* Routine mach_vm_read */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_read -( - vm_map_t target_task, - mach_vm_address_t address, - mach_vm_size_t size, - vm_offset_t *data, - mach_msg_type_number_t *dataCnt -); - -/* Routine mach_vm_read_list */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_read_list -( - vm_map_t target_task, - mach_vm_read_entry_t data_list, - natural_t count -); - -/* Routine mach_vm_write */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_write -( - vm_map_t target_task, - mach_vm_address_t address, - vm_offset_t data, - mach_msg_type_number_t dataCnt -); - -/* Routine mach_vm_copy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_copy -( - vm_map_t target_task, - mach_vm_address_t source_address, - mach_vm_size_t size, - mach_vm_address_t dest_address -); - -/* Routine mach_vm_read_overwrite */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_read_overwrite -( - vm_map_t target_task, - mach_vm_address_t address, - mach_vm_size_t size, - mach_vm_address_t data, - mach_vm_size_t *outsize -); - -/* Routine mach_vm_msync */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_msync -( - vm_map_t target_task, - mach_vm_address_t address, - mach_vm_size_t size, - vm_sync_t sync_flags -); - -/* Routine mach_vm_behavior_set */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_behavior_set -( - vm_map_t target_task, - mach_vm_address_t address, - mach_vm_size_t size, - vm_behavior_t new_behavior -); - -/* Routine mach_vm_map */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_map -( - vm_map_t target_task, - mach_vm_address_t *address, - mach_vm_size_t size, - mach_vm_offset_t mask, - int flags, - mem_entry_name_port_t object, - memory_object_offset_t offset, - boolean_t copy, - vm_prot_t cur_protection, - vm_prot_t max_protection, - vm_inherit_t inheritance -); - -/* Routine mach_vm_machine_attribute */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_machine_attribute -( - vm_map_t target_task, - mach_vm_address_t address, - mach_vm_size_t size, - vm_machine_attribute_t attribute, - vm_machine_attribute_val_t *value -); - -/* Routine mach_vm_remap */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_remap -( - vm_map_t target_task, - mach_vm_address_t *target_address, - mach_vm_size_t size, - mach_vm_offset_t mask, - boolean_t anywhere, - vm_map_t src_task, - mach_vm_address_t src_address, - boolean_t copy, - vm_prot_t *cur_protection, - vm_prot_t *max_protection, - vm_inherit_t inheritance -); - -/* Routine mach_vm_page_query */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_page_query -( - vm_map_t target_map, - mach_vm_offset_t offset, - integer_t *disposition, - integer_t *ref_count -); - -/* Routine mach_vm_region_recurse */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_region_recurse -( - vm_map_t target_task, - mach_vm_address_t *address, - mach_vm_size_t *size, - natural_t *nesting_depth, - vm_region_recurse_info_t info, - mach_msg_type_number_t *infoCnt -); - -/* Routine mach_vm_region */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_region -( - vm_map_t target_task, - mach_vm_address_t *address, - mach_vm_size_t *size, - vm_region_flavor_t flavor, - vm_region_info_t info, - mach_msg_type_number_t *infoCnt, - mach_port_t *object_name -); - -/* Routine _mach_make_memory_entry */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t _mach_make_memory_entry -( - vm_map_t target_task, - memory_object_size_t *size, - memory_object_offset_t offset, - vm_prot_t permission, - mem_entry_name_port_t *object_handle, - mem_entry_name_port_t parent_handle -); - -/* Routine mach_vm_purgable_control */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_purgable_control -( - vm_map_t target_task, - mach_vm_address_t address, - vm_purgable_t control, - int *state -); - -/* Routine mach_vm_page_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_page_info -( - vm_map_t target_task, - mach_vm_address_t address, - vm_page_info_flavor_t flavor, - vm_page_info_t info, - mach_msg_type_number_t *infoCnt -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__mach_vm_subsystem__defined -#define __Request__mach_vm_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_vm_address_t address; - mach_vm_size_t size; - int flags; - } __Request__mach_vm_allocate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_vm_address_t address; - mach_vm_size_t size; - } __Request__mach_vm_deallocate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_vm_address_t address; - mach_vm_size_t size; - boolean_t set_maximum; - vm_prot_t new_protection; - } __Request__mach_vm_protect_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_vm_address_t address; - mach_vm_size_t size; - vm_inherit_t new_inheritance; - } __Request__mach_vm_inherit_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_vm_address_t address; - mach_vm_size_t size; - } __Request__mach_vm_read_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_vm_read_entry_t data_list; - natural_t count; - } __Request__mach_vm_read_list_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t data; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_vm_address_t address; - mach_msg_type_number_t dataCnt; - } __Request__mach_vm_write_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_vm_address_t source_address; - mach_vm_size_t size; - mach_vm_address_t dest_address; - } __Request__mach_vm_copy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_vm_address_t address; - mach_vm_size_t size; - mach_vm_address_t data; - } __Request__mach_vm_read_overwrite_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_vm_address_t address; - mach_vm_size_t size; - vm_sync_t sync_flags; - } __Request__mach_vm_msync_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_vm_address_t address; - mach_vm_size_t size; - vm_behavior_t new_behavior; - } __Request__mach_vm_behavior_set_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t object; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_vm_address_t address; - mach_vm_size_t size; - mach_vm_offset_t mask; - int flags; - memory_object_offset_t offset; - boolean_t copy; - vm_prot_t cur_protection; - vm_prot_t max_protection; - vm_inherit_t inheritance; - } __Request__mach_vm_map_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_vm_address_t address; - mach_vm_size_t size; - vm_machine_attribute_t attribute; - vm_machine_attribute_val_t value; - } __Request__mach_vm_machine_attribute_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t src_task; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_vm_address_t target_address; - mach_vm_size_t size; - mach_vm_offset_t mask; - boolean_t anywhere; - mach_vm_address_t src_address; - boolean_t copy; - vm_inherit_t inheritance; - } __Request__mach_vm_remap_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_vm_offset_t offset; - } __Request__mach_vm_page_query_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_vm_address_t address; - natural_t nesting_depth; - mach_msg_type_number_t infoCnt; - } __Request__mach_vm_region_recurse_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_vm_address_t address; - vm_region_flavor_t flavor; - mach_msg_type_number_t infoCnt; - } __Request__mach_vm_region_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t parent_handle; - /* end of the kernel processed data */ - NDR_record_t NDR; - memory_object_size_t size; - memory_object_offset_t offset; - vm_prot_t permission; - } __Request___mach_make_memory_entry_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_vm_address_t address; - vm_purgable_t control; - int state; - } __Request__mach_vm_purgable_control_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_vm_address_t address; - vm_page_info_flavor_t flavor; - mach_msg_type_number_t infoCnt; - } __Request__mach_vm_page_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__mach_vm_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__mach_vm_subsystem__defined -#define __RequestUnion__mach_vm_subsystem__defined -union __RequestUnion__mach_vm_subsystem { - __Request__mach_vm_allocate_t Request_mach_vm_allocate; - __Request__mach_vm_deallocate_t Request_mach_vm_deallocate; - __Request__mach_vm_protect_t Request_mach_vm_protect; - __Request__mach_vm_inherit_t Request_mach_vm_inherit; - __Request__mach_vm_read_t Request_mach_vm_read; - __Request__mach_vm_read_list_t Request_mach_vm_read_list; - __Request__mach_vm_write_t Request_mach_vm_write; - __Request__mach_vm_copy_t Request_mach_vm_copy; - __Request__mach_vm_read_overwrite_t Request_mach_vm_read_overwrite; - __Request__mach_vm_msync_t Request_mach_vm_msync; - __Request__mach_vm_behavior_set_t Request_mach_vm_behavior_set; - __Request__mach_vm_map_t Request_mach_vm_map; - __Request__mach_vm_machine_attribute_t Request_mach_vm_machine_attribute; - __Request__mach_vm_remap_t Request_mach_vm_remap; - __Request__mach_vm_page_query_t Request_mach_vm_page_query; - __Request__mach_vm_region_recurse_t Request_mach_vm_region_recurse; - __Request__mach_vm_region_t Request_mach_vm_region; - __Request___mach_make_memory_entry_t Request__mach_make_memory_entry; - __Request__mach_vm_purgable_control_t Request_mach_vm_purgable_control; - __Request__mach_vm_page_info_t Request_mach_vm_page_info; -}; -#endif /* !__RequestUnion__mach_vm_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__mach_vm_subsystem__defined -#define __Reply__mach_vm_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_vm_address_t address; - } __Reply__mach_vm_allocate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_vm_deallocate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_vm_protect_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_vm_inherit_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t data; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t dataCnt; - } __Reply__mach_vm_read_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_vm_read_entry_t data_list; - } __Reply__mach_vm_read_list_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_vm_write_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_vm_copy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_vm_size_t outsize; - } __Reply__mach_vm_read_overwrite_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_vm_msync_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_vm_behavior_set_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_vm_address_t address; - } __Reply__mach_vm_map_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - vm_machine_attribute_val_t value; - } __Reply__mach_vm_machine_attribute_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_vm_address_t target_address; - vm_prot_t cur_protection; - vm_prot_t max_protection; - } __Reply__mach_vm_remap_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - integer_t disposition; - integer_t ref_count; - } __Reply__mach_vm_page_query_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_vm_address_t address; - mach_vm_size_t size; - natural_t nesting_depth; - mach_msg_type_number_t infoCnt; - int info[19]; - } __Reply__mach_vm_region_recurse_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t object_name; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_vm_address_t address; - mach_vm_size_t size; - mach_msg_type_number_t infoCnt; - int info[10]; - } __Reply__mach_vm_region_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t object_handle; - /* end of the kernel processed data */ - NDR_record_t NDR; - memory_object_size_t size; - } __Reply___mach_make_memory_entry_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int state; - } __Reply__mach_vm_purgable_control_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t infoCnt; - int info[32]; - } __Reply__mach_vm_page_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__mach_vm_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__mach_vm_subsystem__defined -#define __ReplyUnion__mach_vm_subsystem__defined -union __ReplyUnion__mach_vm_subsystem { - __Reply__mach_vm_allocate_t Reply_mach_vm_allocate; - __Reply__mach_vm_deallocate_t Reply_mach_vm_deallocate; - __Reply__mach_vm_protect_t Reply_mach_vm_protect; - __Reply__mach_vm_inherit_t Reply_mach_vm_inherit; - __Reply__mach_vm_read_t Reply_mach_vm_read; - __Reply__mach_vm_read_list_t Reply_mach_vm_read_list; - __Reply__mach_vm_write_t Reply_mach_vm_write; - __Reply__mach_vm_copy_t Reply_mach_vm_copy; - __Reply__mach_vm_read_overwrite_t Reply_mach_vm_read_overwrite; - __Reply__mach_vm_msync_t Reply_mach_vm_msync; - __Reply__mach_vm_behavior_set_t Reply_mach_vm_behavior_set; - __Reply__mach_vm_map_t Reply_mach_vm_map; - __Reply__mach_vm_machine_attribute_t Reply_mach_vm_machine_attribute; - __Reply__mach_vm_remap_t Reply_mach_vm_remap; - __Reply__mach_vm_page_query_t Reply_mach_vm_page_query; - __Reply__mach_vm_region_recurse_t Reply_mach_vm_region_recurse; - __Reply__mach_vm_region_t Reply_mach_vm_region; - __Reply___mach_make_memory_entry_t Reply__mach_make_memory_entry; - __Reply__mach_vm_purgable_control_t Reply_mach_vm_purgable_control; - __Reply__mach_vm_page_info_t Reply_mach_vm_page_info; -}; -#endif /* !__RequestUnion__mach_vm_subsystem__defined */ - -#ifndef subsystem_to_name_map_mach_vm -#define subsystem_to_name_map_mach_vm \ - { "mach_vm_allocate", 4800 },\ - { "mach_vm_deallocate", 4801 },\ - { "mach_vm_protect", 4802 },\ - { "mach_vm_inherit", 4803 },\ - { "mach_vm_read", 4804 },\ - { "mach_vm_read_list", 4805 },\ - { "mach_vm_write", 4806 },\ - { "mach_vm_copy", 4807 },\ - { "mach_vm_read_overwrite", 4808 },\ - { "mach_vm_msync", 4809 },\ - { "mach_vm_behavior_set", 4810 },\ - { "mach_vm_map", 4811 },\ - { "mach_vm_machine_attribute", 4812 },\ - { "mach_vm_remap", 4813 },\ - { "mach_vm_page_query", 4814 },\ - { "mach_vm_region_recurse", 4815 },\ - { "mach_vm_region", 4816 },\ - { "_mach_make_memory_entry", 4817 },\ - { "mach_vm_purgable_control", 4818 },\ - { "mach_vm_page_info", 4819 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _mach_vm_user_ */ diff --git a/i386/include/mach/machine.h b/i386/include/mach/machine.h deleted file mode 100644 index 431d3c9..0000000 --- a/i386/include/mach/machine.h +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* File: machine.h - * Author: Avadis Tevanian, Jr. - * Date: 1986 - * - * Machine independent machine abstraction. - */ - -#ifndef _MACH_MACHINE_H_ -#define _MACH_MACHINE_H_ - -#include <stdint.h> -#include <mach/machine/vm_types.h> -#include <mach/boolean.h> - -typedef integer_t cpu_type_t; -typedef integer_t cpu_subtype_t; -typedef integer_t cpu_threadtype_t; - -#define CPU_STATE_MAX 4 - -#define CPU_STATE_USER 0 -#define CPU_STATE_SYSTEM 1 -#define CPU_STATE_IDLE 2 -#define CPU_STATE_NICE 3 - - - -/* - * Capability bits used in the definition of cpu_type. - */ -#define CPU_ARCH_MASK 0xff000000 /* mask for architecture bits */ -#define CPU_ARCH_ABI64 0x01000000 /* 64 bit ABI */ - -/* - * Machine types known by all. - */ - -#define CPU_TYPE_ANY ((cpu_type_t) -1) - -#define CPU_TYPE_VAX ((cpu_type_t) 1) -/* skip ((cpu_type_t) 2) */ -/* skip ((cpu_type_t) 3) */ -/* skip ((cpu_type_t) 4) */ -/* skip ((cpu_type_t) 5) */ -#define CPU_TYPE_MC680x0 ((cpu_type_t) 6) -#define CPU_TYPE_X86 ((cpu_type_t) 7) -#define CPU_TYPE_I386 CPU_TYPE_X86 /* compatibility */ -#define CPU_TYPE_X86_64 (CPU_TYPE_X86 | CPU_ARCH_ABI64) - -/* skip CPU_TYPE_MIPS ((cpu_type_t) 8) */ -/* skip ((cpu_type_t) 9) */ -#define CPU_TYPE_MC98000 ((cpu_type_t) 10) -#define CPU_TYPE_HPPA ((cpu_type_t) 11) -#define CPU_TYPE_ARM ((cpu_type_t) 12) -#define CPU_TYPE_MC88000 ((cpu_type_t) 13) -#define CPU_TYPE_SPARC ((cpu_type_t) 14) -#define CPU_TYPE_I860 ((cpu_type_t) 15) -/* skip CPU_TYPE_ALPHA ((cpu_type_t) 16) */ -/* skip ((cpu_type_t) 17) */ -#define CPU_TYPE_POWERPC ((cpu_type_t) 18) -#define CPU_TYPE_POWERPC64 (CPU_TYPE_POWERPC | CPU_ARCH_ABI64) - -/* - * Machine subtypes (these are defined here, instead of in a machine - * dependent directory, so that any program can get all definitions - * regardless of where is it compiled). - */ - -/* - * Capability bits used in the definition of cpu_subtype. - */ -#define CPU_SUBTYPE_MASK 0xff000000 /* mask for feature flags */ -#define CPU_SUBTYPE_LIB64 0x80000000 /* 64 bit libraries */ - - -/* - * Object files that are hand-crafted to run on any - * implementation of an architecture are tagged with - * CPU_SUBTYPE_MULTIPLE. This functions essentially the same as - * the "ALL" subtype of an architecture except that it allows us - * to easily find object files that may need to be modified - * whenever a new implementation of an architecture comes out. - * - * It is the responsibility of the implementor to make sure the - * software handles unsupported implementations elegantly. - */ -#define CPU_SUBTYPE_MULTIPLE ((cpu_subtype_t) -1) -#define CPU_SUBTYPE_LITTLE_ENDIAN ((cpu_subtype_t) 0) -#define CPU_SUBTYPE_BIG_ENDIAN ((cpu_subtype_t) 1) - -/* - * Machine threadtypes. - * This is none - not defined - for most machine types/subtypes. - */ -#define CPU_THREADTYPE_NONE ((cpu_threadtype_t) 0) - -/* - * VAX subtypes (these do *not* necessary conform to the actual cpu - * ID assigned by DEC available via the SID register). - */ - -#define CPU_SUBTYPE_VAX_ALL ((cpu_subtype_t) 0) -#define CPU_SUBTYPE_VAX780 ((cpu_subtype_t) 1) -#define CPU_SUBTYPE_VAX785 ((cpu_subtype_t) 2) -#define CPU_SUBTYPE_VAX750 ((cpu_subtype_t) 3) -#define CPU_SUBTYPE_VAX730 ((cpu_subtype_t) 4) -#define CPU_SUBTYPE_UVAXI ((cpu_subtype_t) 5) -#define CPU_SUBTYPE_UVAXII ((cpu_subtype_t) 6) -#define CPU_SUBTYPE_VAX8200 ((cpu_subtype_t) 7) -#define CPU_SUBTYPE_VAX8500 ((cpu_subtype_t) 8) -#define CPU_SUBTYPE_VAX8600 ((cpu_subtype_t) 9) -#define CPU_SUBTYPE_VAX8650 ((cpu_subtype_t) 10) -#define CPU_SUBTYPE_VAX8800 ((cpu_subtype_t) 11) -#define CPU_SUBTYPE_UVAXIII ((cpu_subtype_t) 12) - -/* - * 680x0 subtypes - * - * The subtype definitions here are unusual for historical reasons. - * NeXT used to consider 68030 code as generic 68000 code. For - * backwards compatability: - * - * CPU_SUBTYPE_MC68030 symbol has been preserved for source code - * compatability. - * - * CPU_SUBTYPE_MC680x0_ALL has been defined to be the same - * subtype as CPU_SUBTYPE_MC68030 for binary comatability. - * - * CPU_SUBTYPE_MC68030_ONLY has been added to allow new object - * files to be tagged as containing 68030-specific instructions. - */ - -#define CPU_SUBTYPE_MC680x0_ALL ((cpu_subtype_t) 1) -#define CPU_SUBTYPE_MC68030 ((cpu_subtype_t) 1) /* compat */ -#define CPU_SUBTYPE_MC68040 ((cpu_subtype_t) 2) -#define CPU_SUBTYPE_MC68030_ONLY ((cpu_subtype_t) 3) - -/* - * I386 subtypes - */ - -#define CPU_SUBTYPE_INTEL(f, m) ((cpu_subtype_t) (f) + ((m) << 4)) - -#define CPU_SUBTYPE_I386_ALL CPU_SUBTYPE_INTEL(3, 0) -#define CPU_SUBTYPE_386 CPU_SUBTYPE_INTEL(3, 0) -#define CPU_SUBTYPE_486 CPU_SUBTYPE_INTEL(4, 0) -#define CPU_SUBTYPE_486SX CPU_SUBTYPE_INTEL(4, 8) // 8 << 4 = 128 -#define CPU_SUBTYPE_586 CPU_SUBTYPE_INTEL(5, 0) -#define CPU_SUBTYPE_PENT CPU_SUBTYPE_INTEL(5, 0) -#define CPU_SUBTYPE_PENTPRO CPU_SUBTYPE_INTEL(6, 1) -#define CPU_SUBTYPE_PENTII_M3 CPU_SUBTYPE_INTEL(6, 3) -#define CPU_SUBTYPE_PENTII_M5 CPU_SUBTYPE_INTEL(6, 5) -#define CPU_SUBTYPE_CELERON CPU_SUBTYPE_INTEL(7, 6) -#define CPU_SUBTYPE_CELERON_MOBILE CPU_SUBTYPE_INTEL(7, 7) -#define CPU_SUBTYPE_PENTIUM_3 CPU_SUBTYPE_INTEL(8, 0) -#define CPU_SUBTYPE_PENTIUM_3_M CPU_SUBTYPE_INTEL(8, 1) -#define CPU_SUBTYPE_PENTIUM_3_XEON CPU_SUBTYPE_INTEL(8, 2) -#define CPU_SUBTYPE_PENTIUM_M CPU_SUBTYPE_INTEL(9, 0) -#define CPU_SUBTYPE_PENTIUM_4 CPU_SUBTYPE_INTEL(10, 0) -#define CPU_SUBTYPE_PENTIUM_4_M CPU_SUBTYPE_INTEL(10, 1) -#define CPU_SUBTYPE_ITANIUM CPU_SUBTYPE_INTEL(11, 0) -#define CPU_SUBTYPE_ITANIUM_2 CPU_SUBTYPE_INTEL(11, 1) -#define CPU_SUBTYPE_XEON CPU_SUBTYPE_INTEL(12, 0) -#define CPU_SUBTYPE_XEON_MP CPU_SUBTYPE_INTEL(12, 1) - -#define CPU_SUBTYPE_INTEL_FAMILY(x) ((x) & 15) -#define CPU_SUBTYPE_INTEL_FAMILY_MAX 15 - -#define CPU_SUBTYPE_INTEL_MODEL(x) ((x) >> 4) -#define CPU_SUBTYPE_INTEL_MODEL_ALL 0 - -/* - * X86 subtypes. - */ - -#define CPU_SUBTYPE_X86_ALL ((cpu_subtype_t)3) -#define CPU_SUBTYPE_X86_64_ALL ((cpu_subtype_t)3) -#define CPU_SUBTYPE_X86_ARCH1 ((cpu_subtype_t)4) - - -#define CPU_THREADTYPE_INTEL_HTT ((cpu_threadtype_t) 1) - -/* - * Mips subtypes. - */ - -#define CPU_SUBTYPE_MIPS_ALL ((cpu_subtype_t) 0) -#define CPU_SUBTYPE_MIPS_R2300 ((cpu_subtype_t) 1) -#define CPU_SUBTYPE_MIPS_R2600 ((cpu_subtype_t) 2) -#define CPU_SUBTYPE_MIPS_R2800 ((cpu_subtype_t) 3) -#define CPU_SUBTYPE_MIPS_R2000a ((cpu_subtype_t) 4) /* pmax */ -#define CPU_SUBTYPE_MIPS_R2000 ((cpu_subtype_t) 5) -#define CPU_SUBTYPE_MIPS_R3000a ((cpu_subtype_t) 6) /* 3max */ -#define CPU_SUBTYPE_MIPS_R3000 ((cpu_subtype_t) 7) - -/* - * MC98000 (PowerPC) subtypes - */ -#define CPU_SUBTYPE_MC98000_ALL ((cpu_subtype_t) 0) -#define CPU_SUBTYPE_MC98601 ((cpu_subtype_t) 1) - -/* - * HPPA subtypes for Hewlett-Packard HP-PA family of - * risc processors. Port by NeXT to 700 series. - */ - -#define CPU_SUBTYPE_HPPA_ALL ((cpu_subtype_t) 0) -#define CPU_SUBTYPE_HPPA_7100 ((cpu_subtype_t) 0) /* compat */ -#define CPU_SUBTYPE_HPPA_7100LC ((cpu_subtype_t) 1) - -/* - * MC88000 subtypes. - */ -#define CPU_SUBTYPE_MC88000_ALL ((cpu_subtype_t) 0) -#define CPU_SUBTYPE_MC88100 ((cpu_subtype_t) 1) -#define CPU_SUBTYPE_MC88110 ((cpu_subtype_t) 2) - -/* - * SPARC subtypes - */ -#define CPU_SUBTYPE_SPARC_ALL ((cpu_subtype_t) 0) - -/* - * I860 subtypes - */ -#define CPU_SUBTYPE_I860_ALL ((cpu_subtype_t) 0) -#define CPU_SUBTYPE_I860_860 ((cpu_subtype_t) 1) - -/* - * PowerPC subtypes - */ -#define CPU_SUBTYPE_POWERPC_ALL ((cpu_subtype_t) 0) -#define CPU_SUBTYPE_POWERPC_601 ((cpu_subtype_t) 1) -#define CPU_SUBTYPE_POWERPC_602 ((cpu_subtype_t) 2) -#define CPU_SUBTYPE_POWERPC_603 ((cpu_subtype_t) 3) -#define CPU_SUBTYPE_POWERPC_603e ((cpu_subtype_t) 4) -#define CPU_SUBTYPE_POWERPC_603ev ((cpu_subtype_t) 5) -#define CPU_SUBTYPE_POWERPC_604 ((cpu_subtype_t) 6) -#define CPU_SUBTYPE_POWERPC_604e ((cpu_subtype_t) 7) -#define CPU_SUBTYPE_POWERPC_620 ((cpu_subtype_t) 8) -#define CPU_SUBTYPE_POWERPC_750 ((cpu_subtype_t) 9) -#define CPU_SUBTYPE_POWERPC_7400 ((cpu_subtype_t) 10) -#define CPU_SUBTYPE_POWERPC_7450 ((cpu_subtype_t) 11) -#define CPU_SUBTYPE_POWERPC_970 ((cpu_subtype_t) 100) - -/* - * ARM subtypes - */ -#define CPU_SUBTYPE_ARM_ALL ((cpu_subtype_t) 0) -#define CPU_SUBTYPE_ARM_V4T ((cpu_subtype_t) 5) -#define CPU_SUBTYPE_ARM_V6 ((cpu_subtype_t) 6) -#define CPU_SUBTYPE_ARM_V5TEJ ((cpu_subtype_t) 7) -#define CPU_SUBTYPE_ARM_XSCALE ((cpu_subtype_t) 8) -#define CPU_SUBTYPE_ARM_V7 ((cpu_subtype_t) 9) - -/* - * CPU families (sysctl hw.cpufamily) - * - * These are meant to identify the CPU's marketing name - an - * application can map these to (possibly) localized strings. - * NB: the encodings of the CPU families are intentionally arbitrary. - * There is no ordering, and you should never try to deduce whether - * or not some feature is available based on the family. - * Use feature flags (eg, hw.optional.altivec) to test for optional - * functionality. - */ -#define CPUFAMILY_UNKNOWN 0 -#define CPUFAMILY_POWERPC_G3 0xcee41549 -#define CPUFAMILY_POWERPC_G4 0x77c184ae -#define CPUFAMILY_POWERPC_G5 0xed76d8aa -#define CPUFAMILY_INTEL_6_13 0xaa33392b -#define CPUFAMILY_INTEL_YONAH 0x73d67300 -#define CPUFAMILY_INTEL_MEROM 0x426f69ef -#define CPUFAMILY_INTEL_PENRYN 0x78ea4fbc -#define CPUFAMILY_INTEL_NEHALEM 0x6b5a4cd2 -#define CPUFAMILY_INTEL_WESTMERE 0x573b5eec -#define CPUFAMILY_ARM_9 0xe73283ae -#define CPUFAMILY_ARM_11 0x8ff620d8 -#define CPUFAMILY_ARM_XSCALE 0x53b005f5 -#define CPUFAMILY_ARM_13 0x0cc90e64 - -/* The following synonyms are deprecated: */ -#define CPUFAMILY_INTEL_6_14 CPUFAMILY_INTEL_YONAH -#define CPUFAMILY_INTEL_6_15 CPUFAMILY_INTEL_MEROM -#define CPUFAMILY_INTEL_6_23 CPUFAMILY_INTEL_PENRYN -#define CPUFAMILY_INTEL_6_26 CPUFAMILY_INTEL_NEHALEM - -#define CPUFAMILY_INTEL_CORE CPUFAMILY_INTEL_YONAH -#define CPUFAMILY_INTEL_CORE2 CPUFAMILY_INTEL_MEROM - - -#endif /* _MACH_MACHINE_H_ */ diff --git a/i386/include/mach/machine/asm.h b/i386/include/mach/machine/asm.h deleted file mode 100644 index 59e1da2..0000000 --- a/i386/include/mach/machine/asm.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_MACHINE_ASM_H -#define _MACH_MACHINE_ASM_H - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _MACH_MACHINE_ASM_H */ diff --git a/i386/include/mach/machine/boolean.h b/i386/include/mach/machine/boolean.h deleted file mode 100644 index 1bec00d..0000000 --- a/i386/include/mach/machine/boolean.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_MACHINE_BOOLEAN_H_ -#define _MACH_MACHINE_BOOLEAN_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _MACH_MACHINE_BOOLEAN_H_ */ diff --git a/i386/include/mach/machine/exception.h b/i386/include/mach/machine/exception.h deleted file mode 100644 index 5ce83f2..0000000 --- a/i386/include/mach/machine/exception.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_MACHINE_EXCEPTION_H_ -#define _MACH_MACHINE_EXCEPTION_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _MACH_MACHINE_EXCEPTION_H_ */ diff --git a/i386/include/mach/machine/kern_return.h b/i386/include/mach/machine/kern_return.h deleted file mode 100644 index df37396..0000000 --- a/i386/include/mach/machine/kern_return.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_MACHINE_KERN_RETURN_H_ -#define _MACH_MACHINE_KERN_RETURN_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _MACH_MACHINE_KERN_RETURN_H_ */ diff --git a/i386/include/mach/machine/machine_types.defs b/i386/include/mach/machine/machine_types.defs deleted file mode 100644 index 418d16b..0000000 --- a/i386/include/mach/machine/machine_types.defs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_MACHINE_MACHINE_TYPES_DEFS -#define _MACH_MACHINE_MACHINE_TYPES_DEFS - -#if defined (__ppc__) || defined (__ppc64__) -#include "mach/ppc/machine_types.defs" -#elif defined (__i386__) || defined(__x86_64__) -#include "mach/i386/machine_types.defs" -#elif defined (__arm__) -#include "mach/arm/machine_types.defs" -#else -#error architecture not supported -#endif - -#endif /* _MACH_MACHINE_THREAD_STATUS_H_ */ - -/* vim: set ft=c : */ diff --git a/i386/include/mach/machine/ndr_def.h b/i386/include/mach/machine/ndr_def.h deleted file mode 100644 index a7b5a9b..0000000 --- a/i386/include/mach/machine/ndr_def.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_MACHINE_NDR_DEF_H -#define _MACH_MACHINE_NDR_DEF_H - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _MACH_MACHINE_NDR_DEF_H */ diff --git a/i386/include/mach/machine/processor_info.h b/i386/include/mach/machine/processor_info.h deleted file mode 100644 index ca96367..0000000 --- a/i386/include/mach/machine/processor_info.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_MACHINE_PROCESSOR_INFO_H_ -#define _MACH_MACHINE_PROCESSOR_INFO_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _MACH_MACHINE_PROCESSOR_INFO_H_ */ diff --git a/i386/include/mach/machine/rpc.h b/i386/include/mach/machine/rpc.h deleted file mode 100644 index b969bd4..0000000 --- a/i386/include/mach/machine/rpc.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_MACHINE_RPC_H_ -#define _MACH_MACHINE_RPC_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _MACH_MACHINE_RPC_H_ */ diff --git a/i386/include/mach/machine/sdt.h b/i386/include/mach/machine/sdt.h deleted file mode 100644 index e85508f..0000000 --- a/i386/include/mach/machine/sdt.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2007 Apple Inc. All rights reserved. - */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _MACH_MACHINE_SYS_SDT_H -#define _MACH_MACHINE_SYS_SDT_H - -#include <mach/machine/sdt_isa.h> - - -#endif /* _MACH_MACHINE_SYS_SDT_H */ diff --git a/i386/include/mach/machine/sdt_isa.h b/i386/include/mach/machine/sdt_isa.h deleted file mode 100644 index a8e1379..0000000 --- a/i386/include/mach/machine/sdt_isa.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _MACH_MACHINE_SDT_ISA_H_ -#define _MACH_MACHINE_SDT_ISA_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _BSD_MACHINE_SDT_ISA_H_ */ diff --git a/i386/include/mach/machine/thread_state.h b/i386/include/mach/machine/thread_state.h deleted file mode 100644 index 18ffca4..0000000 --- a/i386/include/mach/machine/thread_state.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_MACHINE_THREAD_STATE_H_ -#define _MACH_MACHINE_THREAD_STATE_H_ - -#if defined (__ppc__) || defined(__ppc64__) -#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 - -#endif /* _MACH_MACHINE_THREAD_STATE_H_ */ diff --git a/i386/include/mach/machine/thread_status.h b/i386/include/mach/machine/thread_status.h deleted file mode 100644 index ad5eff0..0000000 --- a/i386/include/mach/machine/thread_status.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_MACHINE_THREAD_STATUS_H_ -#define _MACH_MACHINE_THREAD_STATUS_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _MACH_MACHINE_THREAD_STATUS_H_ */ diff --git a/i386/include/mach/machine/vm_param.h b/i386/include/mach/machine/vm_param.h deleted file mode 100644 index c71121b..0000000 --- a/i386/include/mach/machine/vm_param.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_MACHINE_VM_PARAM_H_ -#define _MACH_MACHINE_VM_PARAM_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _MACH_MACHINE_VM_PARAM_H_ */ diff --git a/i386/include/mach/machine/vm_types.h b/i386/include/mach/machine/vm_types.h deleted file mode 100644 index b366092..0000000 --- a/i386/include/mach/machine/vm_types.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_MACHINE_VM_TYPES_H_ -#define _MACH_MACHINE_VM_TYPES_H_ - -#if defined (__ppc__) || defined(__ppc64__) -#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 - -#endif /* _MACH_MACHINE_VM_TYPES_H_ */ diff --git a/i386/include/mach/memory_object_types.h b/i386/include/mach/memory_object_types.h deleted file mode 100644 index 5c1f76e..0000000 --- a/i386/include/mach/memory_object_types.h +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: memory_object.h - * Author: Michael Wayne Young - * - * External memory management interface definition. - */ - -#ifndef _MACH_MEMORY_OBJECT_TYPES_H_ -#define _MACH_MEMORY_OBJECT_TYPES_H_ - -/* - * User-visible types used in the external memory - * management interface: - */ - -#include <mach/port.h> -#include <mach/message.h> -#include <mach/vm_prot.h> -#include <mach/vm_sync.h> -#include <mach/vm_types.h> -#include <mach/machine/vm_types.h> - -#include <sys/cdefs.h> - -#define VM_64_BIT_DATA_OBJECTS - -typedef unsigned long long memory_object_offset_t; -typedef unsigned long long memory_object_size_t; -typedef natural_t memory_object_cluster_size_t; -typedef natural_t * memory_object_fault_info_t; - -typedef unsigned long long vm_object_id_t; - - -/* - * Temporary until real EMMI version gets re-implemented - */ - - -typedef mach_port_t memory_object_t; -typedef mach_port_t memory_object_control_t; - - -typedef memory_object_t *memory_object_array_t; - /* A memory object ... */ - /* Used by the kernel to retrieve */ - /* or store data */ - -typedef mach_port_t memory_object_name_t; - /* Used to describe the memory ... */ - /* object in vm_regions() calls */ - -typedef mach_port_t memory_object_default_t; - /* Registered with the host ... */ - /* for creating new internal objects */ - -#define MEMORY_OBJECT_NULL ((memory_object_t) 0) -#define MEMORY_OBJECT_CONTROL_NULL ((memory_object_control_t) 0) -#define MEMORY_OBJECT_NAME_NULL ((memory_object_name_t) 0) -#define MEMORY_OBJECT_DEFAULT_NULL ((memory_object_default_t) 0) - - -typedef int memory_object_copy_strategy_t; - /* How memory manager handles copy: */ -#define MEMORY_OBJECT_COPY_NONE 0 - /* ... No special support */ -#define MEMORY_OBJECT_COPY_CALL 1 - /* ... Make call on memory manager */ -#define MEMORY_OBJECT_COPY_DELAY 2 - /* ... Memory manager doesn't - * change data externally. - */ -#define MEMORY_OBJECT_COPY_TEMPORARY 3 - /* ... Memory manager doesn't - * change data externally, and - * doesn't need to see changes. - */ -#define MEMORY_OBJECT_COPY_SYMMETRIC 4 - /* ... Memory manager doesn't - * change data externally, - * doesn't need to see changes, - * and object will not be - * multiply mapped. - * - * XXX - * Not yet safe for non-kernel use. - */ - -#define MEMORY_OBJECT_COPY_INVALID 5 - /* ... An invalid copy strategy, - * for external objects which - * have not been initialized. - * Allows copy_strategy to be - * examined without also - * examining pager_ready and - * internal. - */ - -typedef int memory_object_return_t; - /* Which pages to return to manager - this time (lock_request) */ -#define MEMORY_OBJECT_RETURN_NONE 0 - /* ... don't return any. */ -#define MEMORY_OBJECT_RETURN_DIRTY 1 - /* ... only dirty pages. */ -#define MEMORY_OBJECT_RETURN_ALL 2 - /* ... dirty and precious pages. */ -#define MEMORY_OBJECT_RETURN_ANYTHING 3 - /* ... any resident page. */ - -/* - * Data lock request flags - */ - -#define MEMORY_OBJECT_DATA_FLUSH 0x1 -#define MEMORY_OBJECT_DATA_NO_CHANGE 0x2 -#define MEMORY_OBJECT_DATA_PURGE 0x4 -#define MEMORY_OBJECT_COPY_SYNC 0x8 -#define MEMORY_OBJECT_DATA_SYNC 0x10 -#define MEMORY_OBJECT_IO_SYNC 0x20 -#define MEMORY_OBJECT_DATA_FLUSH_ALL 0x40 - -/* - * Types for the memory object flavor interfaces - */ - -#define MEMORY_OBJECT_INFO_MAX (1024) -typedef int *memory_object_info_t; -typedef int memory_object_flavor_t; -typedef int memory_object_info_data_t[MEMORY_OBJECT_INFO_MAX]; - - -#define MEMORY_OBJECT_PERFORMANCE_INFO 11 -#define MEMORY_OBJECT_ATTRIBUTE_INFO 14 -#define MEMORY_OBJECT_BEHAVIOR_INFO 15 - - -struct memory_object_perf_info { - memory_object_cluster_size_t cluster_size; - boolean_t may_cache; -}; - -struct memory_object_attr_info { - memory_object_copy_strategy_t copy_strategy; - memory_object_cluster_size_t cluster_size; - boolean_t may_cache_object; - boolean_t temporary; -}; - -struct memory_object_behave_info { - memory_object_copy_strategy_t copy_strategy; - boolean_t temporary; - boolean_t invalidate; - boolean_t silent_overwrite; - boolean_t advisory_pageout; -}; - - -typedef struct memory_object_behave_info *memory_object_behave_info_t; -typedef struct memory_object_behave_info memory_object_behave_info_data_t; - -typedef struct memory_object_perf_info *memory_object_perf_info_t; -typedef struct memory_object_perf_info memory_object_perf_info_data_t; - -typedef struct memory_object_attr_info *memory_object_attr_info_t; -typedef struct memory_object_attr_info memory_object_attr_info_data_t; - -#define MEMORY_OBJECT_BEHAVE_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(memory_object_behave_info_data_t)/sizeof(int))) -#define MEMORY_OBJECT_PERF_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(memory_object_perf_info_data_t)/sizeof(int))) -#define MEMORY_OBJECT_ATTR_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(memory_object_attr_info_data_t)/sizeof(int))) - -#define invalid_memory_object_flavor(f) \ - (f != MEMORY_OBJECT_ATTRIBUTE_INFO && \ - f != MEMORY_OBJECT_PERFORMANCE_INFO && \ - f != OLD_MEMORY_OBJECT_BEHAVIOR_INFO && \ - f != MEMORY_OBJECT_BEHAVIOR_INFO && \ - f != OLD_MEMORY_OBJECT_ATTRIBUTE_INFO) - - -/* - * Used to support options on memory_object_release_name call - */ -#define MEMORY_OBJECT_TERMINATE_IDLE 0x1 -#define MEMORY_OBJECT_RESPECT_CACHE 0x2 -#define MEMORY_OBJECT_RELEASE_NO_OP 0x4 - - -/* named entry processor mapping options */ -/* enumerated */ -#define MAP_MEM_NOOP 0 -#define MAP_MEM_COPYBACK 1 -#define MAP_MEM_IO 2 -#define MAP_MEM_WTHRU 3 -#define MAP_MEM_WCOMB 4 /* Write combining mode */ - /* aka store gather */ - -#define GET_MAP_MEM(flags) \ - ((((unsigned int)(flags)) >> 24) & 0xFF) - -#define SET_MAP_MEM(caching, flags) \ - ((flags) = ((((unsigned int)(caching)) << 24) \ - & 0xFF000000) | ((flags) & 0xFFFFFF)); - -/* leave room for vm_prot bits */ -#define MAP_MEM_ONLY 0x10000 /* change processor caching */ -#define MAP_MEM_NAMED_CREATE 0x20000 /* create extant object */ -#define MAP_MEM_PURGABLE 0x40000 /* create a purgable VM object */ -#define MAP_MEM_NAMED_REUSE 0x80000 /* reuse provided entry if identical */ - - -#endif /* _MACH_MEMORY_OBJECT_TYPES_H_ */ diff --git a/i386/include/mach/message.h b/i386/include/mach/message.h deleted file mode 100644 index 15c9be4..0000000 --- a/i386/include/mach/message.h +++ /dev/null @@ -1,783 +0,0 @@ -/* - * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - * NOTICE: This file was modified by McAfee Research in 2004 to introduce - * support for mandatory and extensible security protections. This notice - * is included in support of clause 2.2 (b) of the Apple Public License, - * Version 2.0. - * Copyright (c) 2005 SPARTA, Inc. - */ -/* - */ -/* - * File: mach/message.h - * - * Mach IPC message and primitive function definitions. - */ - -#ifndef _MACH_MESSAGE_H_ -#define _MACH_MESSAGE_H_ - -#include <stdint.h> -#include <mach/port.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/machine/vm_types.h> - -#include <sys/cdefs.h> - -/* - * The timeout mechanism uses mach_msg_timeout_t values, - * passed by value. The timeout units are milliseconds. - * It is controlled with the MACH_SEND_TIMEOUT - * and MACH_RCV_TIMEOUT options. - */ - -typedef natural_t mach_msg_timeout_t; - -/* - * The value to be used when there is no timeout. - * (No MACH_SEND_TIMEOUT/MACH_RCV_TIMEOUT option.) - */ - -#define MACH_MSG_TIMEOUT_NONE ((mach_msg_timeout_t) 0) - -/* - * The kernel uses MACH_MSGH_BITS_COMPLEX as a hint. If it isn't on, it - * assumes the body of the message doesn't contain port rights or OOL - * data. The field is set in received messages. A user task must - * use caution in interpreting the body of a message if the bit isn't - * on, because the mach_msg_type's in the body might "lie" about the - * contents. If the bit isn't on, but the mach_msg_types - * in the body specify rights or OOL data, the behavior is undefined. - * (Ie, an error may or may not be produced.) - * - * The value of MACH_MSGH_BITS_REMOTE determines the interpretation - * of the msgh_remote_port field. It is handled like a msgt_name. - * - * The value of MACH_MSGH_BITS_LOCAL determines the interpretation - * of the msgh_local_port field. It is handled like a msgt_name. - * - * MACH_MSGH_BITS() combines two MACH_MSG_TYPE_* values, for the remote - * and local fields, into a single value suitable for msgh_bits. - * - * MACH_MSGH_BITS_CIRCULAR should be zero; is is used internally. - * - * The unused bits should be zero and are reserved for the kernel - * or for future interface expansion. - */ - -#define MACH_MSGH_BITS_ZERO 0x00000000 -#define MACH_MSGH_BITS_REMOTE_MASK 0x000000ff -#define MACH_MSGH_BITS_LOCAL_MASK 0x0000ff00 -#define MACH_MSGH_BITS_COMPLEX 0x80000000U -#define MACH_MSGH_BITS_USER 0x8000ffffU - -#define MACH_MSGH_BITS_CIRCULAR 0x40000000 /* internal use only */ -#define MACH_MSGH_BITS_USED 0xc000ffffU - -#define MACH_MSGH_BITS_PORTS_MASK \ - (MACH_MSGH_BITS_REMOTE_MASK|MACH_MSGH_BITS_LOCAL_MASK) - -#define MACH_MSGH_BITS(remote, local) \ - ((remote) | ((local) << 8)) -#define MACH_MSGH_BITS_REMOTE(bits) \ - ((bits) & MACH_MSGH_BITS_REMOTE_MASK) -#define MACH_MSGH_BITS_LOCAL(bits) \ - (((bits) & MACH_MSGH_BITS_LOCAL_MASK) >> 8) -#define MACH_MSGH_BITS_PORTS(bits) \ - ((bits) & MACH_MSGH_BITS_PORTS_MASK) -#define MACH_MSGH_BITS_OTHER(bits) \ - ((bits) &~ MACH_MSGH_BITS_PORTS_MASK) - -/* - * Every message starts with a message header. - * Following the message header, if the message is complex, are a count - * of type descriptors and the type descriptors themselves - * (mach_msg_descriptor_t). The size of the message must be specified in - * bytes, and includes the message header, descriptor count, descriptors, - * and inline data. - * - * The msgh_remote_port field specifies the destination of the message. - * It must specify a valid send or send-once right for a port. - * - * The msgh_local_port field specifies a "reply port". Normally, - * This field carries a send-once right that the receiver will use - * to reply to the message. It may carry the values MACH_PORT_NULL, - * MACH_PORT_DEAD, a send-once right, or a send right. - * - * The msgh_seqno field carries a sequence number associated with the - * received-from port. A port's sequence number is incremented every - * time a message is received from it. In sent messages, the field's - * value is ignored. - * - * The msgh_id field is uninterpreted by the message primitives. - * It normally carries information specifying the format - * or meaning of the message. - */ - -typedef unsigned int mach_msg_bits_t; -typedef natural_t mach_msg_size_t; -typedef integer_t mach_msg_id_t; - - -#define MACH_MSG_SIZE_NULL (mach_msg_size_t *) 0 - -typedef unsigned int mach_msg_type_name_t; - -#define MACH_MSG_TYPE_MOVE_RECEIVE 16 /* Must hold receive rights */ -#define MACH_MSG_TYPE_MOVE_SEND 17 /* Must hold send rights */ -#define MACH_MSG_TYPE_MOVE_SEND_ONCE 18 /* Must hold sendonce rights */ -#define MACH_MSG_TYPE_COPY_SEND 19 /* Must hold send rights */ -#define MACH_MSG_TYPE_MAKE_SEND 20 /* Must hold receive rights */ -#define MACH_MSG_TYPE_MAKE_SEND_ONCE 21 /* Must hold receive rights */ -#define MACH_MSG_TYPE_COPY_RECEIVE 22 /* Must hold receive rights */ - -typedef unsigned int mach_msg_copy_options_t; - -#define MACH_MSG_PHYSICAL_COPY 0 -#define MACH_MSG_VIRTUAL_COPY 1 -#define MACH_MSG_ALLOCATE 2 -#define MACH_MSG_OVERWRITE 3 -#ifdef MACH_KERNEL -#define MACH_MSG_KALLOC_COPY_T 4 -#endif /* MACH_KERNEL */ - -/* - * In a complex mach message, the mach_msg_header_t is followed by - * a descriptor count, then an array of that number of descriptors - * (mach_msg_*_descriptor_t). The type field of mach_msg_type_descriptor_t - * (which any descriptor can be cast to) indicates the flavor of the - * descriptor. - * - * Note that in LP64, the various types of descriptors are no longer all - * the same size as mach_msg_descriptor_t, so the array cannot be indexed - * as expected. - */ - -typedef unsigned int mach_msg_descriptor_type_t; - -#define MACH_MSG_PORT_DESCRIPTOR 0 -#define MACH_MSG_OOL_DESCRIPTOR 1 -#define MACH_MSG_OOL_PORTS_DESCRIPTOR 2 -#define MACH_MSG_OOL_VOLATILE_DESCRIPTOR 3 - -#pragma pack(4) - -typedef struct -{ - natural_t pad1; - mach_msg_size_t pad2; - unsigned int pad3 : 24; - mach_msg_descriptor_type_t type : 8; -} mach_msg_type_descriptor_t; - -typedef struct -{ - mach_port_t name; -#if !(defined(KERNEL) && defined(__LP64__)) -// Pad to 8 bytes everywhere except the K64 kernel where mach_port_t is 8 bytes - mach_msg_size_t pad1; -#endif - unsigned int pad2 : 16; - mach_msg_type_name_t disposition : 8; - mach_msg_descriptor_type_t type : 8; -} mach_msg_port_descriptor_t; - -typedef struct -{ - uint32_t address; - mach_msg_size_t size; - boolean_t deallocate: 8; - mach_msg_copy_options_t copy: 8; - unsigned int pad1: 8; - mach_msg_descriptor_type_t type: 8; -} mach_msg_ool_descriptor32_t; - -typedef struct -{ - uint64_t address; - boolean_t deallocate: 8; - mach_msg_copy_options_t copy: 8; - unsigned int pad1: 8; - mach_msg_descriptor_type_t type: 8; - mach_msg_size_t size; -} mach_msg_ool_descriptor64_t; - -typedef struct -{ - void* address; -#if !defined(__LP64__) - mach_msg_size_t size; -#endif - boolean_t deallocate: 8; - mach_msg_copy_options_t copy: 8; - unsigned int pad1: 8; - mach_msg_descriptor_type_t type: 8; -#if defined(__LP64__) - mach_msg_size_t size; -#endif -#if defined(KERNEL) && !defined(__LP64__) - uint32_t pad_end; -#endif -} mach_msg_ool_descriptor_t; - -typedef struct -{ - uint32_t address; - mach_msg_size_t count; - boolean_t deallocate: 8; - mach_msg_copy_options_t copy: 8; - mach_msg_type_name_t disposition : 8; - mach_msg_descriptor_type_t type : 8; -} mach_msg_ool_ports_descriptor32_t; - -typedef struct -{ - uint64_t address; - boolean_t deallocate: 8; - mach_msg_copy_options_t copy: 8; - mach_msg_type_name_t disposition : 8; - mach_msg_descriptor_type_t type : 8; - mach_msg_size_t count; -} mach_msg_ool_ports_descriptor64_t; - -typedef struct -{ - void* address; -#if !defined(__LP64__) - mach_msg_size_t count; -#endif - boolean_t deallocate: 8; - mach_msg_copy_options_t copy: 8; - mach_msg_type_name_t disposition : 8; - mach_msg_descriptor_type_t type : 8; -#if defined(__LP64__) - mach_msg_size_t count; -#endif -#if defined(KERNEL) && !defined(__LP64__) - uint32_t pad_end; -#endif -} mach_msg_ool_ports_descriptor_t; - -/* - * LP64support - This union definition is not really - * appropriate in LP64 mode because not all descriptors - * are of the same size in that environment. - */ -#if defined(__LP64__) && defined(KERNEL) -typedef union -{ - mach_msg_port_descriptor_t port; - mach_msg_ool_descriptor32_t out_of_line; - mach_msg_ool_ports_descriptor32_t ool_ports; - mach_msg_type_descriptor_t type; -} mach_msg_descriptor_t; -#else -typedef union -{ - mach_msg_port_descriptor_t port; - mach_msg_ool_descriptor_t out_of_line; - mach_msg_ool_ports_descriptor_t ool_ports; - mach_msg_type_descriptor_t type; -} mach_msg_descriptor_t; -#endif - -typedef struct -{ - mach_msg_size_t msgh_descriptor_count; -} mach_msg_body_t; - -#define MACH_MSG_BODY_NULL (mach_msg_body_t *) 0 -#define MACH_MSG_DESCRIPTOR_NULL (mach_msg_descriptor_t *) 0 - -typedef struct -{ - mach_msg_bits_t msgh_bits; - mach_msg_size_t msgh_size; - mach_port_t msgh_remote_port; - mach_port_t msgh_local_port; - mach_msg_size_t msgh_reserved; - mach_msg_id_t msgh_id; -} mach_msg_header_t; - -#define MACH_MSG_NULL (mach_msg_header_t *) 0 - -typedef struct -{ - mach_msg_header_t header; - mach_msg_body_t body; -} mach_msg_base_t; - -typedef unsigned int mach_msg_trailer_type_t; - -#define MACH_MSG_TRAILER_FORMAT_0 0 - -typedef unsigned int mach_msg_trailer_size_t; - -typedef struct -{ - mach_msg_trailer_type_t msgh_trailer_type; - mach_msg_trailer_size_t msgh_trailer_size; -} mach_msg_trailer_t; - -typedef struct -{ - mach_msg_trailer_type_t msgh_trailer_type; - mach_msg_trailer_size_t msgh_trailer_size; - mach_port_seqno_t msgh_seqno; -} mach_msg_seqno_trailer_t; - -typedef struct -{ - unsigned int val[2]; -} security_token_t; - -typedef struct -{ - mach_msg_trailer_type_t msgh_trailer_type; - mach_msg_trailer_size_t msgh_trailer_size; - mach_port_seqno_t msgh_seqno; - security_token_t msgh_sender; -} mach_msg_security_trailer_t; - -/* - * The audit token is an opaque token which identifies - * Mach tasks and senders of Mach messages as subjects - * to the BSM audit system. Only the appropriate BSM - * library routines should be used to interpret the - * contents of the audit token as the representation - * of the subject identity within the token may change - * over time. - */ -typedef struct -{ - unsigned int val[8]; -} audit_token_t; - -typedef struct -{ - mach_msg_trailer_type_t msgh_trailer_type; - mach_msg_trailer_size_t msgh_trailer_size; - mach_port_seqno_t msgh_seqno; - security_token_t msgh_sender; - audit_token_t msgh_audit; -} mach_msg_audit_trailer_t; - -typedef struct -{ - mach_msg_trailer_type_t msgh_trailer_type; - mach_msg_trailer_size_t msgh_trailer_size; - mach_port_seqno_t msgh_seqno; - security_token_t msgh_sender; - audit_token_t msgh_audit; - mach_vm_address_t msgh_context; -} mach_msg_context_trailer_t; - - -typedef struct -{ - mach_port_name_t sender; -} msg_labels_t; - -/* - Trailer type to pass MAC policy label info as a mach message trailer. - -*/ - -typedef struct -{ - mach_msg_trailer_type_t msgh_trailer_type; - mach_msg_trailer_size_t msgh_trailer_size; - mach_port_seqno_t msgh_seqno; - security_token_t msgh_sender; - audit_token_t msgh_audit; - mach_vm_address_t msgh_context; - int msgh_ad; - msg_labels_t msgh_labels; -} mach_msg_mac_trailer_t; - -#define MACH_MSG_TRAILER_MINIMUM_SIZE sizeof(mach_msg_trailer_t) - -/* - * These values can change from release to release - but clearly - * code cannot request additional trailer elements one was not - * compiled to understand. Therefore, it is safe to use this - * constant when the same module specified the receive options. - * Otherwise, you run the risk that the options requested by - * another module may exceed the local modules notion of - * MAX_TRAILER_SIZE. - */ -typedef mach_msg_mac_trailer_t mach_msg_max_trailer_t; -#define MAX_TRAILER_SIZE ((mach_msg_size_t)sizeof(mach_msg_max_trailer_t)) - -/* - * Legacy requirements keep us from ever updating these defines (even - * when the format_0 trailers gain new option data fields in the future). - * Therefore, they shouldn't be used going forward. Instead, the sizes - * should be compared against the specific element size requested using - * REQUESTED_TRAILER_SIZE. - */ -typedef mach_msg_security_trailer_t mach_msg_format_0_trailer_t; - -/*typedef mach_msg_mac_trailer_t mach_msg_format_0_trailer_t; -*/ - -#define MACH_MSG_TRAILER_FORMAT_0_SIZE sizeof(mach_msg_format_0_trailer_t) - -#define KERNEL_SECURITY_TOKEN_VALUE { {0, 1} } -extern security_token_t KERNEL_SECURITY_TOKEN; - -#define KERNEL_AUDIT_TOKEN_VALUE { {0, 0, 0, 0, 0, 0, 0, 0} } -extern audit_token_t KERNEL_AUDIT_TOKEN; - -typedef integer_t mach_msg_options_t; - -typedef struct -{ - mach_msg_header_t header; -} mach_msg_empty_send_t; - -typedef struct -{ - mach_msg_header_t header; - mach_msg_trailer_t trailer; -} mach_msg_empty_rcv_t; - -typedef union -{ - mach_msg_empty_send_t send; - mach_msg_empty_rcv_t rcv; -} mach_msg_empty_t; - -#pragma pack() - -/* utility to round the message size - will become machine dependent */ -#define round_msg(x) (((mach_msg_size_t)(x) + sizeof (natural_t) - 1) & \ - ~(sizeof (natural_t) - 1)) - -/* - * There is no fixed upper bound to the size of Mach messages. - */ - -#define MACH_MSG_SIZE_MAX ((mach_msg_size_t) ~0) - -/* - * Compatibility definitions, for code written - * when there was a msgh_kind instead of msgh_seqno. - */ -#define MACH_MSGH_KIND_NORMAL 0x00000000 -#define MACH_MSGH_KIND_NOTIFICATION 0x00000001 -#define msgh_kind msgh_seqno -#define mach_msg_kind_t mach_port_seqno_t - -typedef natural_t mach_msg_type_size_t; -typedef natural_t mach_msg_type_number_t; - -/* - * Values received/carried in messages. Tells the receiver what - * sort of port right he now has. - * - * MACH_MSG_TYPE_PORT_NAME is used to transfer a port name - * which should remain uninterpreted by the kernel. (Port rights - * are not transferred, just the port name.) - */ - -#define MACH_MSG_TYPE_PORT_NONE 0 - -#define MACH_MSG_TYPE_PORT_NAME 15 -#define MACH_MSG_TYPE_PORT_RECEIVE MACH_MSG_TYPE_MOVE_RECEIVE -#define MACH_MSG_TYPE_PORT_SEND MACH_MSG_TYPE_MOVE_SEND -#define MACH_MSG_TYPE_PORT_SEND_ONCE MACH_MSG_TYPE_MOVE_SEND_ONCE - -#define MACH_MSG_TYPE_LAST 22 /* Last assigned */ - -/* - * A dummy value. Mostly used to indicate that the actual value - * will be filled in later, dynamically. - */ - -#define MACH_MSG_TYPE_POLYMORPHIC ((mach_msg_type_name_t) -1) - -/* - * Is a given item a port type? - */ - -#define MACH_MSG_TYPE_PORT_ANY(x) \ - (((x) >= MACH_MSG_TYPE_MOVE_RECEIVE) && \ - ((x) <= MACH_MSG_TYPE_MAKE_SEND_ONCE)) - -#define MACH_MSG_TYPE_PORT_ANY_SEND(x) \ - (((x) >= MACH_MSG_TYPE_MOVE_SEND) && \ - ((x) <= MACH_MSG_TYPE_MAKE_SEND_ONCE)) - -#define MACH_MSG_TYPE_PORT_ANY_RIGHT(x) \ - (((x) >= MACH_MSG_TYPE_MOVE_RECEIVE) && \ - ((x) <= MACH_MSG_TYPE_MOVE_SEND_ONCE)) - -typedef integer_t mach_msg_option_t; - -#define MACH_MSG_OPTION_NONE 0x00000000 - -#define MACH_SEND_MSG 0x00000001 -#define MACH_RCV_MSG 0x00000002 -#define MACH_RCV_LARGE 0x00000004 - -#define MACH_SEND_TIMEOUT 0x00000010 -#define MACH_SEND_INTERRUPT 0x00000040 /* libmach implements */ -#define MACH_SEND_CANCEL 0x00000080 -#define MACH_SEND_ALWAYS 0x00010000 /* internal use only */ -#define MACH_SEND_TRAILER 0x00020000 - -#define MACH_RCV_TIMEOUT 0x00000100 -#define MACH_RCV_NOTIFY 0x00000200 -#define MACH_RCV_INTERRUPT 0x00000400 /* libmach implements */ -#define MACH_RCV_OVERWRITE 0x00001000 - -/* - * NOTE: a 0x00------ RCV mask implies to ask for - * a MACH_MSG_TRAILER_FORMAT_0 with 0 Elements, - * which is equivalent to a mach_msg_trailer_t. - * - * XXXMAC: unlike the rest of the MACH_RCV_* flags, MACH_RCV_TRAILER_LABELS - * needs its own private bit since we only calculate its fields when absolutely - * required. - */ -#define MACH_RCV_TRAILER_NULL 0 -#define MACH_RCV_TRAILER_SEQNO 1 -#define MACH_RCV_TRAILER_SENDER 2 -#define MACH_RCV_TRAILER_AUDIT 3 -#define MACH_RCV_TRAILER_CTX 4 -#define MACH_RCV_TRAILER_AV 7 -#define MACH_RCV_TRAILER_LABELS 8 - -#define MACH_RCV_TRAILER_TYPE(x) (((x) & 0xf) << 28) -#define MACH_RCV_TRAILER_ELEMENTS(x) (((x) & 0xf) << 24) -#define MACH_RCV_TRAILER_MASK ((0xff << 24)) - -#define GET_RCV_ELEMENTS(y) (((y) >> 24) & 0xf) - -/* - * XXXMAC: note that in the case of MACH_RCV_TRAILER_LABELS, - * we just fall through to mach_msg_max_trailer_t. - * This is correct behavior since mach_msg_max_trailer_t is defined as - * mac_msg_mac_trailer_t which is used for the LABELS trailer. - * It also makes things work properly if MACH_RCV_TRAILER_LABELS is ORed - * with one of the other options. - */ -#define REQUESTED_TRAILER_SIZE(y) \ - ((mach_msg_trailer_size_t) \ - ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_NULL) ? \ - sizeof(mach_msg_trailer_t) : \ - ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_SEQNO) ? \ - sizeof(mach_msg_seqno_trailer_t) : \ - ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_SENDER) ? \ - sizeof(mach_msg_security_trailer_t) : \ - ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_AUDIT) ? \ - sizeof(mach_msg_audit_trailer_t) : \ - ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_CTX) ? \ - sizeof(mach_msg_context_trailer_t) : \ - ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_AV) ? \ - sizeof(mach_msg_mac_trailer_t) : \ - sizeof(mach_msg_max_trailer_t)))))))) - -/* - * Much code assumes that mach_msg_return_t == kern_return_t. - * This definition is useful for descriptive purposes. - * - * See <mach/error.h> for the format of error codes. - * IPC errors are system 4. Send errors are subsystem 0; - * receive errors are subsystem 1. The code field is always non-zero. - * The high bits of the code field communicate extra information - * for some error codes. MACH_MSG_MASK masks off these special bits. - */ - -typedef kern_return_t mach_msg_return_t; - -#define MACH_MSG_SUCCESS 0x00000000 - - -#define MACH_MSG_MASK 0x00003e00 - /* All special error code bits defined below. */ -#define MACH_MSG_IPC_SPACE 0x00002000 - /* No room in IPC name space for another capability name. */ -#define MACH_MSG_VM_SPACE 0x00001000 - /* No room in VM address space for out-of-line memory. */ -#define MACH_MSG_IPC_KERNEL 0x00000800 - /* Kernel resource shortage handling an IPC capability. */ -#define MACH_MSG_VM_KERNEL 0x00000400 - /* Kernel resource shortage handling out-of-line memory. */ - -#define MACH_SEND_IN_PROGRESS 0x10000001 - /* Thread is waiting to send. (Internal use only.) */ -#define MACH_SEND_INVALID_DATA 0x10000002 - /* Bogus in-line data. */ -#define MACH_SEND_INVALID_DEST 0x10000003 - /* Bogus destination port. */ -#define MACH_SEND_TIMED_OUT 0x10000004 - /* Message not sent before timeout expired. */ -#define MACH_SEND_INTERRUPTED 0x10000007 - /* Software interrupt. */ -#define MACH_SEND_MSG_TOO_SMALL 0x10000008 - /* Data doesn't contain a complete message. */ -#define MACH_SEND_INVALID_REPLY 0x10000009 - /* Bogus reply port. */ -#define MACH_SEND_INVALID_RIGHT 0x1000000a - /* Bogus port rights in the message body. */ -#define MACH_SEND_INVALID_NOTIFY 0x1000000b - /* Bogus notify port argument. */ -#define MACH_SEND_INVALID_MEMORY 0x1000000c - /* Invalid out-of-line memory pointer. */ -#define MACH_SEND_NO_BUFFER 0x1000000d - /* No message buffer is available. */ -#define MACH_SEND_TOO_LARGE 0x1000000e - /* Send is too large for port */ -#define MACH_SEND_INVALID_TYPE 0x1000000f - /* Invalid msg-type specification. */ -#define MACH_SEND_INVALID_HEADER 0x10000010 - /* A field in the header had a bad value. */ -#define MACH_SEND_INVALID_TRAILER 0x10000011 - /* The trailer to be sent does not match kernel format. */ -#define MACH_SEND_INVALID_RT_OOL_SIZE 0x10000015 - /* compatibility: no longer a returned error */ - -#define MACH_RCV_IN_PROGRESS 0x10004001 - /* Thread is waiting for receive. (Internal use only.) */ -#define MACH_RCV_INVALID_NAME 0x10004002 - /* Bogus name for receive port/port-set. */ -#define MACH_RCV_TIMED_OUT 0x10004003 - /* Didn't get a message within the timeout value. */ -#define MACH_RCV_TOO_LARGE 0x10004004 - /* Message buffer is not large enough for inline data. */ -#define MACH_RCV_INTERRUPTED 0x10004005 - /* Software interrupt. */ -#define MACH_RCV_PORT_CHANGED 0x10004006 - /* compatibility: no longer a returned error */ -#define MACH_RCV_INVALID_NOTIFY 0x10004007 - /* Bogus notify port argument. */ -#define MACH_RCV_INVALID_DATA 0x10004008 - /* Bogus message buffer for inline data. */ -#define MACH_RCV_PORT_DIED 0x10004009 - /* Port/set was sent away/died during receive. */ -#define MACH_RCV_IN_SET 0x1000400a - /* compatibility: no longer a returned error */ -#define MACH_RCV_HEADER_ERROR 0x1000400b - /* Error receiving message header. See special bits. */ -#define MACH_RCV_BODY_ERROR 0x1000400c - /* Error receiving message body. See special bits. */ -#define MACH_RCV_INVALID_TYPE 0x1000400d - /* Invalid msg-type specification in scatter list. */ -#define MACH_RCV_SCATTER_SMALL 0x1000400e - /* Out-of-line overwrite region is not large enough */ -#define MACH_RCV_INVALID_TRAILER 0x1000400f - /* trailer type or number of trailer elements not supported */ -#define MACH_RCV_IN_PROGRESS_TIMED 0x10004011 - /* Waiting for receive with timeout. (Internal use only.) */ - - -__BEGIN_DECLS - -/* - * Routine: mach_msg_overwrite - * Purpose: - * Send and/or receive a message. If the message operation - * is interrupted, and the user did not request an indication - * of that fact, then restart the appropriate parts of the - * operation silently (trap version does not restart). - * - * Distinct send and receive buffers may be specified. If - * no separate receive buffer is specified, the msg parameter - * will be used for both send and receive operations. - * - * In addition to a distinct receive buffer, that buffer may - * already contain scatter control information to direct the - * receiving of the message. - */ - -extern mach_msg_return_t mach_msg_overwrite( - mach_msg_header_t *msg, - mach_msg_option_t option, - mach_msg_size_t send_size, - mach_msg_size_t rcv_size, - mach_port_name_t rcv_name, - mach_msg_timeout_t timeout, - mach_port_name_t notify, - mach_msg_header_t *rcv_msg, - mach_msg_size_t rcv_limit); - - -/* - * Routine: mach_msg - * Purpose: - * Send and/or receive a message. If the message operation - * is interrupted, and the user did not request an indication - * of that fact, then restart the appropriate parts of the - * operation silently (trap version does not restart). - */ -extern mach_msg_return_t mach_msg( - mach_msg_header_t *msg, - mach_msg_option_t option, - mach_msg_size_t send_size, - mach_msg_size_t rcv_size, - mach_port_name_t rcv_name, - mach_msg_timeout_t timeout, - mach_port_name_t notify); - - -__END_DECLS - -#endif /* _MACH_MESSAGE_H_ */ - diff --git a/i386/include/mach/mig.h b/i386/include/mach/mig.h deleted file mode 100644 index b62dd2c..0000000 --- a/i386/include/mach/mig.h +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -/* - * Mach MIG Subsystem Interfaces - */ - -#ifndef _MACH_MIG_H_ -#define _MACH_MIG_H_ - -#include <stdint.h> -#include <mach/port.h> -#include <mach/message.h> -#include <mach/vm_types.h> - -#include <sys/cdefs.h> - -#if defined(MACH_KERNEL) - -#if defined(BSMALL_LATER) -/* Really small configurations don't need type checking */ -#define __MigTypeCheck 0 -#else -/* Turn MIG type checking on by default for kernel */ -#define __MigTypeCheck 1 -#endif -#define __MigKernelSpecificCode 1 -#define _MIG_KERNEL_SPECIFIC_CODE_ 1 - -/* Otherwise check legacy setting (temporary) */ -#elif defined(TypeCheck) - -#define __MigTypeCheck TypeCheck - -#elif !defined(__MigTypeCheck) - -/* otherwise, default MIG type checking on - except in small configurations */ -#if defined(BSMALL) -#define __MigTypeCheck 0 -#else -#define __MigTypeCheck 1 -#endif - -#endif /* !defined(__MigTypeCheck) */ - -/* - * Pack MIG message structs. - * This is an indicator of the need to view shared structs in a - * binary-compatible format - and MIG message structs are no different. - */ -#define __MigPackStructs 1 - -/* - * Definition for MIG-generated server stub routines. These routines - * unpack the request message, call the server procedure, and pack the - * reply message. - */ -typedef void (*mig_stub_routine_t) (mach_msg_header_t *InHeadP, - mach_msg_header_t *OutHeadP); - -typedef mig_stub_routine_t mig_routine_t; - -/* - * Definition for MIG-generated server routine. This routine takes a - * message, and returns the appropriate stub function for handling that - * message. - */ -typedef mig_routine_t (*mig_server_routine_t) (mach_msg_header_t *InHeadP); - -/* - * Generic definition for implementation routines. These routines do - * the real work associated with this request. This generic type is - * used for keeping the pointers in the subsystem array. - */ -typedef kern_return_t (*mig_impl_routine_t)(void); - -typedef mach_msg_type_descriptor_t routine_arg_descriptor; -typedef mach_msg_type_descriptor_t *routine_arg_descriptor_t; -typedef mach_msg_type_descriptor_t *mig_routine_arg_descriptor_t; - -#define MIG_ROUTINE_ARG_DESCRIPTOR_NULL ((mig_routine_arg_descriptor_t)0) - -struct routine_descriptor { - mig_impl_routine_t impl_routine; /* Server work func pointer */ - mig_stub_routine_t stub_routine; /* Unmarshalling func pointer */ - unsigned int argc; /* Number of argument words */ - unsigned int descr_count; /* Number complex descriptors */ - routine_arg_descriptor_t - arg_descr; /* pointer to descriptor array*/ - unsigned int max_reply_msg; /* Max size for reply msg */ -}; -typedef struct routine_descriptor *routine_descriptor_t; - -typedef struct routine_descriptor mig_routine_descriptor; -typedef mig_routine_descriptor *mig_routine_descriptor_t; - -#define MIG_ROUTINE_DESCRIPTOR_NULL ((mig_routine_descriptor_t)0) - -typedef struct mig_subsystem { - mig_server_routine_t server; /* pointer to demux routine */ - mach_msg_id_t start; /* Min routine number */ - mach_msg_id_t end; /* Max routine number + 1 */ - mach_msg_size_t maxsize; /* Max reply message size */ - vm_address_t reserved; /* reserved for MIG use */ - mig_routine_descriptor - routine[1]; /* Routine descriptor array */ -} *mig_subsystem_t; - -#define MIG_SUBSYSTEM_NULL ((mig_subsystem_t)0) - -typedef struct mig_symtab { - char *ms_routine_name; - int ms_routine_number; - void (*ms_routine)(void); /* Since the functions in the - * symbol table have unknown - * signatures, this is the best - * we can do... - */ -} mig_symtab_t; - - -__BEGIN_DECLS - -/* Client side reply port allocate */ -extern mach_port_t mig_get_reply_port(void); - -/* Client side reply port deallocate */ -extern void mig_dealloc_reply_port(mach_port_t reply_port); - -/* Client side reply port "deallocation" */ -extern void mig_put_reply_port(mach_port_t reply_port); - -/* Bounded string copy */ -extern int mig_strncpy(char *dest, const char *src, int len); - - -/* Allocate memory for out-of-line mig structures */ -extern void mig_allocate(vm_address_t *, vm_size_t); - -/* Deallocate memory used for out-of-line mig structures */ -extern void mig_deallocate(vm_address_t, vm_size_t); - - -__END_DECLS - -#endif /* _MACH_MIG_H_ */ diff --git a/i386/include/mach/mig_errors.h b/i386/include/mach/mig_errors.h deleted file mode 100644 index f1234bc..0000000 --- a/i386/include/mach/mig_errors.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * Mach Interface Generator errors - * - */ - -#ifndef _MACH_MIG_ERRORS_H_ -#define _MACH_MIG_ERRORS_H_ - -#include <mach/mig.h> -#include <mach/ndr.h> -#include <mach/message.h> -#include <mach/kern_return.h> - -#include <sys/cdefs.h> - -/* - * These error codes should be specified as system 4, subsytem 2. - * But alas backwards compatibility makes that impossible. - * The problem is old clients of new servers (eg, the kernel) - * which get strange large error codes when there is a Mig problem - * in the server. Unfortunately, the IPC system doesn't have - * the knowledge to convert the codes in this situation. - */ - -#define MIG_TYPE_ERROR -300 /* client type check failure */ -#define MIG_REPLY_MISMATCH -301 /* wrong reply message ID */ -#define MIG_REMOTE_ERROR -302 /* server detected error */ -#define MIG_BAD_ID -303 /* bad request message ID */ -#define MIG_BAD_ARGUMENTS -304 /* server type check failure */ -#define MIG_NO_REPLY -305 /* no reply should be send */ -#define MIG_EXCEPTION -306 /* server raised exception */ -#define MIG_ARRAY_TOO_LARGE -307 /* array not large enough */ -#define MIG_SERVER_DIED -308 /* server died */ -#define MIG_TRAILER_ERROR -309 /* trailer has an unknown format */ - -/* - * Whenever MIG detects an error, it sends back a generic - * mig_reply_error_t format message. Clients must accept - * these in addition to the expected reply message format. - */ -#pragma pack(4) -typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; -} mig_reply_error_t; -#pragma pack() - - -__BEGIN_DECLS - -#if !defined(__NDR_convert__mig_reply_error_t__defined) -#define __NDR_convert__mig_reply_error_t__defined - -static __inline__ void -__NDR_convert__mig_reply_error_t(__unused mig_reply_error_t *x) -{ -#if defined(__NDR_convert__int_rep__kern_return_t__defined) - if (x->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__kern_return_t(&x->RetCode, x->NDR.int_rep); -#endif /* __NDR_convert__int_rep__kern_return_t__defined */ -} -#endif /* !defined(__NDR_convert__mig_reply_error_t__defined) */ - -__END_DECLS - -#endif /* _MACH_MIG_ERRORS_H_ */ diff --git a/i386/include/mach/ndr.h b/i386/include/mach/ndr.h deleted file mode 100644 index cb64d3f..0000000 --- a/i386/include/mach/ndr.h +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -#ifndef _MACH_NDR_H_ -#define _MACH_NDR_H_ - -#include <stdint.h> -#include <sys/cdefs.h> - -typedef struct { - unsigned char mig_vers; - unsigned char if_vers; - unsigned char reserved1; - unsigned char mig_encoding; - unsigned char int_rep; - unsigned char char_rep; - unsigned char float_rep; - unsigned char reserved2; -} NDR_record_t; - -/* - * MIG supported protocols for Network Data Representation - */ -#define NDR_PROTOCOL_2_0 0 - -/* - * NDR 2.0 format flag type definition and values. - */ -#define NDR_INT_BIG_ENDIAN 0 -#define NDR_INT_LITTLE_ENDIAN 1 -#define NDR_FLOAT_IEEE 0 -#define NDR_FLOAT_VAX 1 -#define NDR_FLOAT_CRAY 2 -#define NDR_FLOAT_IBM 3 -#define NDR_CHAR_ASCII 0 -#define NDR_CHAR_EBCDIC 1 - -extern NDR_record_t NDR_record; - -#if defined(BSMALL) -#define __NDR_convert__ 0 -#define __NDR_convert__int_rep__ 0 -#else -#ifndef __NDR_convert__ -#define __NDR_convert__ 1 -#endif /* __NDR_convert__ */ - -#ifndef __NDR_convert__int_rep__ -#define __NDR_convert__int_rep__ 1 -#endif /* __NDR_convert__int_rep__ */ - -#endif /* defined(BSMALL) */ - -#ifndef __NDR_convert__char_rep__ -#define __NDR_convert__char_rep__ 0 -#endif /* __NDR_convert__char_rep__ */ - -#ifndef __NDR_convert__float_rep__ -#define __NDR_convert__float_rep__ 0 -#endif /* __NDR_convert__float_rep__ */ - -#if __NDR_convert__ - -#define __NDR_convert__NOOP do ; while (0) -#define __NDR_convert__UNKNOWN(s) __NDR_convert__NOOP -#define __NDR_convert__SINGLE(a, f, r) do { r((a), (f)); } while (0) -#define __NDR_convert__ARRAY(a, f, c, r) \ - do { int __i__, __C__ = (c); \ - for (__i__ = 0; __i__ < __C__; __i__++) \ - r(&(a)[__i__], f); } while (0) -#define __NDR_convert__2DARRAY(a, f, s, c, r) \ - do { int __i__, __C__ = (c), __S__ = (s); \ - for (__i__ = 0; __i__ < __C__; __i__++) \ - r(&(a)[__i__ * __S__], f, __S__); } while (0) - -#if __NDR_convert__int_rep__ - -#include <libkern/OSByteOrder.h> - -#define __NDR_READSWAP_assign(a, rs) do { *(a) = rs(a); } while (0) - -#define __NDR_READSWAP__uint16_t(a) OSReadSwapInt16((void *)a, 0) -#define __NDR_READSWAP__int16_t(a) (int16_t)OSReadSwapInt16((void *)a, 0) -#define __NDR_READSWAP__uint32_t(a) OSReadSwapInt32((void *)a, 0) -#define __NDR_READSWAP__int32_t(a) (int32_t)OSReadSwapInt32((void *)a, 0) -#define __NDR_READSWAP__uint64_t(a) OSReadSwapInt64((void *)a, 0) -#define __NDR_READSWAP__int64_t(a) (int64_t)OSReadSwapInt64((void *)a, 0) - -__BEGIN_DECLS - -static __inline__ float __NDR_READSWAP__float(float *argp) { - union { - float sv; - uint32_t ull; - } result; - result.ull = __NDR_READSWAP__uint32_t((uint32_t *)argp); - return result.sv; -} - -static __inline__ double __NDR_READSWAP__double(double *argp) { - union { - double sv; - uint64_t ull; - } result; - result.ull = __NDR_READSWAP__uint64_t((uint64_t *)argp); - return result.sv; -} - -__END_DECLS - -#define __NDR_convert__int_rep__int16_t__defined -#define __NDR_convert__int_rep__int16_t(v,f) \ - __NDR_READSWAP_assign(v, __NDR_READSWAP__int16_t) - -#define __NDR_convert__int_rep__uint16_t__defined -#define __NDR_convert__int_rep__uint16_t(v,f) \ - __NDR_READSWAP_assign(v, __NDR_READSWAP__uint16_t) - -#define __NDR_convert__int_rep__int32_t__defined -#define __NDR_convert__int_rep__int32_t(v,f) \ - __NDR_READSWAP_assign(v, __NDR_READSWAP__int32_t) - -#define __NDR_convert__int_rep__uint32_t__defined -#define __NDR_convert__int_rep__uint32_t(v,f) \ - __NDR_READSWAP_assign(v, __NDR_READSWAP__uint32_t) - -#define __NDR_convert__int_rep__int64_t__defined -#define __NDR_convert__int_rep__int64_t(v,f) \ - __NDR_READSWAP_assign(v, __NDR_READSWAP__int64_t) - -#define __NDR_convert__int_rep__uint64_t__defined -#define __NDR_convert__int_rep__uint64_t(v,f) \ - __NDR_READSWAP_assign(v, __NDR_READSWAP__uint64_t) - -#define __NDR_convert__int_rep__float__defined -#define __NDR_convert__int_rep__float(v,f) \ - __NDR_READSWAP_assign(v, __NDR_READSWAP__float) - -#define __NDR_convert__int_rep__double__defined -#define __NDR_convert__int_rep__double(v,f) \ - __NDR_READSWAP_assign(v, __NDR_READSWAP__double) - -#define __NDR_convert__int_rep__boolean_t__defined -#define __NDR_convert__int_rep__boolean_t(v, f) \ - __NDR_convert__int_rep__int32_t(v,f) - -#define __NDR_convert__int_rep__kern_return_t__defined -#define __NDR_convert__int_rep__kern_return_t(v,f) \ - __NDR_convert__int_rep__int32_t(v,f) - -#define __NDR_convert__int_rep__mach_port_name_t__defined -#define __NDR_convert__int_rep__mach_port_name_t(v,f) \ - __NDR_convert__int_rep__uint32_t(v,f) - -#define __NDR_convert__int_rep__mach_msg_type_number_t__defined -#define __NDR_convert__int_rep__mach_msg_type_number_t(v,f) \ - __NDR_convert__int_rep__uint32_t(v,f) - -#endif /* __NDR_convert__int_rep__ */ - -#if __NDR_convert__char_rep__ - -#warning NDR character representation conversions not implemented yet! -#define __NDR_convert__char_rep__char(v,f) __NDR_convert__NOOP -#define __NDR_convert__char_rep__string(v,f,l) __NDR_convert__NOOP - -#endif /* __NDR_convert__char_rep__ */ - -#if __NDR_convert__float_rep__ - -#warning NDR floating point representation conversions not implemented yet! -#define __NDR_convert__float_rep__float(v,f) __NDR_convert__NOOP -#define __NDR_convert__float_rep__double(v,f) __NDR_convert__NOOP - -#endif /* __NDR_convert__float_rep__ */ - -#endif /* __NDR_convert__ */ - -#endif /* _MACH_NDR_H_ */ diff --git a/i386/include/mach/notify.defs b/i386/include/mach/notify.defs deleted file mode 100644 index 6f7f81d..0000000 --- a/i386/include/mach/notify.defs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ - -subsystem -#if KERNEL_USER - KernelUser -#endif - notify 64; - -#include <mach/std_types.defs> - -#if SEQNOS -serverprefix do_seqnos_; -serverdemux seqnos_notify_server; -#else /* !SEQNOS */ -serverprefix do_; -serverdemux notify_server; -#endif /* SEQNOS */ - -/* MACH_NOTIFY_FIRST: 0100 */ -skip; - -/* MACH_NOTIFY_PORT_DELETED: 0101 */ -simpleroutine mach_notify_port_deleted( - notify : mach_port_move_send_once_t; -#if SEQNOS - msgseqno seqno : mach_port_seqno_t; -#endif /* SEQNOS */ - name : mach_port_name_t); - -skip; /* was MACH_NOTIFY_MSG_ACCEPTED: 0102 */ - -skip; /* was NOTIFY_OWNERSHIP_RIGHTS: 0103 */ - -skip; /* was NOTIFY_RECEIVE_RIGHTS: 0104 */ - -/* MACH_NOTIFY_PORT_DESTROYED: 0105 */ -simpleroutine mach_notify_port_destroyed( - notify : mach_port_move_send_once_t; -#if SEQNOS - msgseqno seqno : mach_port_seqno_t; -#endif /* SEQNOS */ - rights : mach_port_move_receive_t); - -/* MACH_NOTIFY_NO_SENDERS: 0106 */ -simpleroutine mach_notify_no_senders( - notify : mach_port_move_send_once_t; -#if SEQNOS - msgseqno seqno : mach_port_seqno_t; -#endif /* SEQNOS */ - mscount : mach_port_mscount_t); - -/* MACH_NOTIFY_SEND_ONCE: 0107 */ -simpleroutine mach_notify_send_once( - notify : mach_port_move_send_once_t -#if SEQNOS -; msgseqno seqno : mach_port_seqno_t -#endif /* SEQNOS */ - ); - -/* MACH_NOTIFY_DEAD_NAME: 0110 */ -simpleroutine mach_notify_dead_name( - notify : mach_port_move_send_once_t; -#if SEQNOS - msgseqno seqno : mach_port_seqno_t; -#endif /* SEQNOS */ - name : mach_port_name_t); - -/* vim: set ft=c : */ diff --git a/i386/include/mach/notify.h b/i386/include/mach/notify.h deleted file mode 100644 index 768a865..0000000 --- a/i386/include/mach/notify.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/notify.h - * - * Kernel notification message definitions. - */ - -#ifndef _MACH_NOTIFY_H_ -#define _MACH_NOTIFY_H_ - -#include <mach/port.h> -#include <mach/message.h> -#include <mach/ndr.h> - -/* - * An alternative specification of the notification interface - * may be found in mach/notify.defs. - */ - -#define MACH_NOTIFY_FIRST 0100 -#define MACH_NOTIFY_PORT_DELETED (MACH_NOTIFY_FIRST + 001 ) - /* A send or send-once right was deleted. */ -#define MACH_NOTIFY_PORT_DESTROYED (MACH_NOTIFY_FIRST + 005) - /* A receive right was (would have been) deallocated */ -#define MACH_NOTIFY_NO_SENDERS (MACH_NOTIFY_FIRST + 006) - /* Receive right has no extant send rights */ -#define MACH_NOTIFY_SEND_ONCE (MACH_NOTIFY_FIRST + 007) - /* An extant send-once right died */ -#define MACH_NOTIFY_DEAD_NAME (MACH_NOTIFY_FIRST + 010) - /* Send or send-once right died, leaving a dead-name */ -#define MACH_NOTIFY_LAST (MACH_NOTIFY_FIRST + 015) - -typedef mach_port_t notify_port_t; - -/* - * Hard-coded message structures for receiving Mach port notification - * messages. However, they are not actual large enough to receive - * the largest trailers current exported by Mach IPC (so they cannot - * be used for space allocations in situations using these new larger - * trailers). Instead, the MIG-generated server routines (and - * related prototypes should be used). - */ -typedef struct { - mach_msg_header_t not_header; - NDR_record_t NDR; - mach_port_name_t not_port;/* MACH_MSG_TYPE_PORT_NAME */ - mach_msg_format_0_trailer_t trailer; -} mach_port_deleted_notification_t; - -typedef struct { - mach_msg_header_t not_header; - mach_msg_body_t not_body; - mach_msg_port_descriptor_t not_port;/* MACH_MSG_TYPE_PORT_RECEIVE */ - mach_msg_format_0_trailer_t trailer; -} mach_port_destroyed_notification_t; - -typedef struct { - mach_msg_header_t not_header; - NDR_record_t NDR; - mach_msg_type_number_t not_count; - mach_msg_format_0_trailer_t trailer; -} mach_no_senders_notification_t; - -typedef struct { - mach_msg_header_t not_header; - mach_msg_format_0_trailer_t trailer; -} mach_send_once_notification_t; - -typedef struct { - mach_msg_header_t not_header; - NDR_record_t NDR; - mach_port_name_t not_port;/* MACH_MSG_TYPE_PORT_NAME */ - mach_msg_format_0_trailer_t trailer; -} mach_dead_name_notification_t; - -#endif /* _MACH_NOTIFY_H_ */ diff --git a/i386/include/mach/policy.h b/i386/include/mach/policy.h deleted file mode 100644 index b6ec795..0000000 --- a/i386/include/mach/policy.h +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ - -#ifndef _MACH_POLICY_H_ -#define _MACH_POLICY_H_ - -/* - * mach/policy.h - * - * Definitions for scheduing policy. - */ - -/* - * All interfaces defined here are obsolete. - */ - -#include <mach/boolean.h> -#include <mach/message.h> -#include <mach/vm_types.h> - -/* - * Old scheduling control interface - */ -typedef int policy_t; -typedef integer_t *policy_info_t; -typedef integer_t *policy_base_t; -typedef integer_t *policy_limit_t; - -/* - * Policy definitions. Policies should be powers of 2, - * but cannot be or'd together other than to test for a - * policy 'class'. - */ -#define POLICY_NULL 0 /* none */ -#define POLICY_TIMESHARE 1 /* timesharing */ -#define POLICY_RR 2 /* fixed round robin */ -#define POLICY_FIFO 4 /* fixed fifo */ - -#define __NEW_SCHEDULING_FRAMEWORK__ - -/* - * Check if policy is of 'class' fixed-priority. - */ -#define POLICYCLASS_FIXEDPRI (POLICY_RR | POLICY_FIFO) - -/* - * Check if policy is valid. - */ -#define invalid_policy(policy) \ - ((policy) != POLICY_TIMESHARE && \ - (policy) != POLICY_RR && \ - (policy) != POLICY_FIFO) - - -/* - * Types for TIMESHARE policy - */ -struct policy_timeshare_base { - integer_t base_priority; -}; -struct policy_timeshare_limit { - integer_t max_priority; -}; -struct policy_timeshare_info { - integer_t max_priority; - integer_t base_priority; - integer_t cur_priority; - boolean_t depressed; - integer_t depress_priority; -}; - -typedef struct policy_timeshare_base *policy_timeshare_base_t; -typedef struct policy_timeshare_limit *policy_timeshare_limit_t; -typedef struct policy_timeshare_info *policy_timeshare_info_t; - -typedef struct policy_timeshare_base policy_timeshare_base_data_t; -typedef struct policy_timeshare_limit policy_timeshare_limit_data_t; -typedef struct policy_timeshare_info policy_timeshare_info_data_t; - - -#define POLICY_TIMESHARE_BASE_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_timeshare_base)/sizeof(integer_t))) -#define POLICY_TIMESHARE_LIMIT_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_timeshare_limit)/sizeof(integer_t))) -#define POLICY_TIMESHARE_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_timeshare_info)/sizeof(integer_t))) - - -/* - * Types for the ROUND ROBIN (RR) policy - */ -struct policy_rr_base { - integer_t base_priority; - integer_t quantum; -}; -struct policy_rr_limit { - integer_t max_priority; -}; -struct policy_rr_info { - integer_t max_priority; - integer_t base_priority; - integer_t quantum; - boolean_t depressed; - integer_t depress_priority; -}; - -typedef struct policy_rr_base *policy_rr_base_t; -typedef struct policy_rr_limit *policy_rr_limit_t; -typedef struct policy_rr_info *policy_rr_info_t; - -typedef struct policy_rr_base policy_rr_base_data_t; -typedef struct policy_rr_limit policy_rr_limit_data_t; -typedef struct policy_rr_info policy_rr_info_data_t; - -#define POLICY_RR_BASE_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_rr_base)/sizeof(integer_t))) -#define POLICY_RR_LIMIT_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_rr_limit)/sizeof(integer_t))) -#define POLICY_RR_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_rr_info)/sizeof(integer_t))) - - -/* - * Types for the FIRST-IN-FIRST-OUT (FIFO) policy - */ -struct policy_fifo_base { - integer_t base_priority; -}; -struct policy_fifo_limit { - integer_t max_priority; -}; -struct policy_fifo_info { - integer_t max_priority; - integer_t base_priority; - boolean_t depressed; - integer_t depress_priority; -}; - -typedef struct policy_fifo_base *policy_fifo_base_t; -typedef struct policy_fifo_limit *policy_fifo_limit_t; -typedef struct policy_fifo_info *policy_fifo_info_t; - -typedef struct policy_fifo_base policy_fifo_base_data_t; -typedef struct policy_fifo_limit policy_fifo_limit_data_t; -typedef struct policy_fifo_info policy_fifo_info_data_t; - -#define POLICY_FIFO_BASE_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_fifo_base)/sizeof(integer_t))) -#define POLICY_FIFO_LIMIT_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_fifo_limit)/sizeof(integer_t))) -#define POLICY_FIFO_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_fifo_info)/sizeof(integer_t))) - -/* - * Aggregate policy types - */ - -struct policy_bases { - policy_timeshare_base_data_t ts; - policy_rr_base_data_t rr; - policy_fifo_base_data_t fifo; -}; - -struct policy_limits { - policy_timeshare_limit_data_t ts; - policy_rr_limit_data_t rr; - policy_fifo_limit_data_t fifo; -}; - -struct policy_infos { - policy_timeshare_info_data_t ts; - policy_rr_info_data_t rr; - policy_fifo_info_data_t fifo; -}; - -typedef struct policy_bases policy_base_data_t; -typedef struct policy_limits policy_limit_data_t; -typedef struct policy_infos policy_info_data_t; - -#endif /* _MACH_POLICY_H_ */ diff --git a/i386/include/mach/port.h b/i386/include/mach/port.h deleted file mode 100644 index 6550139..0000000 --- a/i386/include/mach/port.h +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - * NOTICE: This file was modified by McAfee Research in 2004 to introduce - * support for mandatory and extensible security protections. This notice - * is included in support of clause 2.2 (b) of the Apple Public License, - * Version 2.0. - */ -/* - */ -/* - * File: mach/port.h - * - * Definition of a Mach port - * - * Mach ports are the endpoints to Mach-implemented communications - * channels (usually uni-directional message queues, but other types - * also exist). - * - * Unique collections of these endpoints are maintained for each - * Mach task. Each Mach port in the task's collection is given a - * [task-local] name to identify it - and the the various "rights" - * held by the task for that specific endpoint. - * - * This header defines the types used to identify these Mach ports - * and the various rights associated with them. For more info see: - * - * <mach/mach_port.h> - manipulation of port rights in a given space - * <mach/message.h> - message queue [and port right passing] mechanism - * - */ - -#ifndef _MACH_PORT_H_ -#define _MACH_PORT_H_ - -#include <sys/cdefs.h> -#include <stdint.h> -#include <mach/boolean.h> -#include <mach/machine/vm_types.h> - -/* - * mach_port_name_t - the local identity for a Mach port - * - * The name is Mach port namespace specific. It is used to - * identify the rights held for that port by the task whose - * namespace is implied [or specifically provided]. - * - * Use of this type usually implies just a name - no rights. - * See mach_port_t for a type that implies a "named right." - * - */ - -typedef natural_t mach_port_name_t; -typedef mach_port_name_t *mach_port_name_array_t; - - -/* - * mach_port_t - a named port right - * - * In user-space, "rights" are represented by the name of the - * right in the Mach port namespace. Even so, this type is - * presented as a unique one to more clearly denote the presence - * of a right coming along with the name. - * - * Often, various rights for a port held in a single name space - * will coalesce and are, therefore, be identified by a single name - * [this is the case for send and receive rights]. But not - * always [send-once rights currently get a unique name for - * each right]. - * - */ - -#ifndef _MACH_PORT_T -#define _MACH_PORT_T -typedef mach_port_name_t mach_port_t; -#endif - - -typedef mach_port_t *mach_port_array_t; - -/* - * MACH_PORT_NULL is a legal value that can be carried in messages. - * It indicates the absence of any port or port rights. (A port - * argument keeps the message from being "simple", even if the - * value is MACH_PORT_NULL.) The value MACH_PORT_DEAD is also a legal - * value that can be carried in messages. It indicates - * that a port right was present, but it died. - */ - -#define MACH_PORT_NULL 0 /* intentional loose typing */ -#define MACH_PORT_DEAD ((mach_port_name_t) ~0) -#define MACH_PORT_VALID(name) \ - (((name) != MACH_PORT_NULL) && \ - ((name) != MACH_PORT_DEAD)) - - -/* - * For kernel-selected [assigned] port names, the name is - * comprised of two parts: a generation number and an index. - * This approach keeps the exact same name from being generated - * and reused too quickly [to catch right/reference counting bugs]. - * The dividing line between the constituent parts is exposed so - * that efficient "mach_port_name_t to data structure pointer" - * conversion implementation can be made. But it is possible - * for user-level code to assign their own names to Mach ports. - * These are not required to participate in this algorithm. So - * care should be taken before "assuming" this model. - * - */ - -#ifndef NO_PORT_GEN - -#define MACH_PORT_INDEX(name) ((name) >> 8) -#define MACH_PORT_GEN(name) (((name) & 0xff) << 24) -#define MACH_PORT_MAKE(index, gen) \ - (((index) << 8) | (gen) >> 24) - -#else /* NO_PORT_GEN */ - -#define MACH_PORT_INDEX(name) (name) -#define MACH_PORT_GEN(name) (0) -#define MACH_PORT_MAKE(index, gen) (index) - -#endif /* NO_PORT_GEN */ - - -/* - * These are the different rights a task may have for a port. - * The MACH_PORT_RIGHT_* definitions are used as arguments - * to mach_port_allocate, mach_port_get_refs, etc, to specify - * a particular right to act upon. The mach_port_names and - * mach_port_type calls return bitmasks using the MACH_PORT_TYPE_* - * definitions. This is because a single name may denote - * multiple rights. - */ - -typedef natural_t mach_port_right_t; - -#define MACH_PORT_RIGHT_SEND ((mach_port_right_t) 0) -#define MACH_PORT_RIGHT_RECEIVE ((mach_port_right_t) 1) -#define MACH_PORT_RIGHT_SEND_ONCE ((mach_port_right_t) 2) -#define MACH_PORT_RIGHT_PORT_SET ((mach_port_right_t) 3) -#define MACH_PORT_RIGHT_DEAD_NAME ((mach_port_right_t) 4) -#define MACH_PORT_RIGHT_LABELH ((mach_port_right_t) 5) -#define MACH_PORT_RIGHT_NUMBER ((mach_port_right_t) 6) - -typedef natural_t mach_port_type_t; -typedef mach_port_type_t *mach_port_type_array_t; - -#define MACH_PORT_TYPE(right) \ - ((mach_port_type_t)(((mach_port_type_t) 1) \ - << ((right) + ((mach_port_right_t) 16)))) -#define MACH_PORT_TYPE_NONE ((mach_port_type_t) 0L) -#define MACH_PORT_TYPE_SEND MACH_PORT_TYPE(MACH_PORT_RIGHT_SEND) -#define MACH_PORT_TYPE_RECEIVE MACH_PORT_TYPE(MACH_PORT_RIGHT_RECEIVE) -#define MACH_PORT_TYPE_SEND_ONCE MACH_PORT_TYPE(MACH_PORT_RIGHT_SEND_ONCE) -#define MACH_PORT_TYPE_PORT_SET MACH_PORT_TYPE(MACH_PORT_RIGHT_PORT_SET) -#define MACH_PORT_TYPE_DEAD_NAME MACH_PORT_TYPE(MACH_PORT_RIGHT_DEAD_NAME) -#define MACH_PORT_TYPE_LABELH MACH_PORT_TYPE(MACH_PORT_RIGHT_LABELH) - -/* Convenient combinations. */ - -#define MACH_PORT_TYPE_SEND_RECEIVE \ - (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_RECEIVE) -#define MACH_PORT_TYPE_SEND_RIGHTS \ - (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_SEND_ONCE) -#define MACH_PORT_TYPE_PORT_RIGHTS \ - (MACH_PORT_TYPE_SEND_RIGHTS|MACH_PORT_TYPE_RECEIVE) -#define MACH_PORT_TYPE_PORT_OR_DEAD \ - (MACH_PORT_TYPE_PORT_RIGHTS|MACH_PORT_TYPE_DEAD_NAME) -#define MACH_PORT_TYPE_ALL_RIGHTS \ - (MACH_PORT_TYPE_PORT_OR_DEAD|MACH_PORT_TYPE_PORT_SET) - -/* Dummy type bits that mach_port_type/mach_port_names can return. */ - -#define MACH_PORT_TYPE_DNREQUEST 0x80000000 - -/* User-references for capabilities. */ - -typedef natural_t mach_port_urefs_t; -typedef integer_t mach_port_delta_t; /* change in urefs */ - -/* Attributes of ports. (See mach_port_get_receive_status.) */ - -typedef natural_t mach_port_seqno_t; /* sequence number */ -typedef natural_t mach_port_mscount_t; /* make-send count */ -typedef natural_t mach_port_msgcount_t; /* number of msgs */ -typedef natural_t mach_port_rights_t; /* number of rights */ - -/* - * Are there outstanding send rights for a given port? - */ -#define MACH_PORT_SRIGHTS_NONE 0 /* no srights */ -#define MACH_PORT_SRIGHTS_PRESENT 1 /* srights */ -typedef unsigned int mach_port_srights_t; /* status of send rights */ - -typedef struct mach_port_status { - mach_port_rights_t mps_pset; /* count of containing port sets */ - mach_port_seqno_t mps_seqno; /* sequence number */ - mach_port_mscount_t mps_mscount; /* make-send count */ - mach_port_msgcount_t mps_qlimit; /* queue limit */ - mach_port_msgcount_t mps_msgcount; /* number in the queue */ - mach_port_rights_t mps_sorights; /* how many send-once rights */ - boolean_t mps_srights; /* do send rights exist? */ - boolean_t mps_pdrequest; /* port-deleted requested? */ - boolean_t mps_nsrequest; /* no-senders requested? */ - natural_t mps_flags; /* port flags */ -} mach_port_status_t; - -/* System-wide values for setting queue limits on a port */ -#define MACH_PORT_QLIMIT_ZERO ((mach_port_msgcount_t) 0) -#define MACH_PORT_QLIMIT_BASIC ((mach_port_msgcount_t) 5) -#define MACH_PORT_QLIMIT_SMALL ((mach_port_msgcount_t) 16) -#define MACH_PORT_QLIMIT_LARGE ((mach_port_msgcount_t) 1024) -#define MACH_PORT_QLIMIT_KERNEL ((mach_port_msgcount_t) 65536) -#define MACH_PORT_QLIMIT_MIN MACH_PORT_QLIMIT_ZERO -#define MACH_PORT_QLIMIT_DEFAULT MACH_PORT_QLIMIT_BASIC -#define MACH_PORT_QLIMIT_MAX MACH_PORT_QLIMIT_LARGE - -typedef struct mach_port_limits { - mach_port_msgcount_t mpl_qlimit; /* number of msgs */ -} mach_port_limits_t; - -typedef integer_t *mach_port_info_t; /* varying array of natural_t */ - -/* Flavors for mach_port_get/set_attributes() */ -typedef int mach_port_flavor_t; -#define MACH_PORT_LIMITS_INFO 1 /* uses mach_port_status_t */ -#define MACH_PORT_RECEIVE_STATUS 2 /* uses mach_port_limits_t */ -#define MACH_PORT_DNREQUESTS_SIZE 3 /* info is int */ - -#define MACH_PORT_LIMITS_INFO_COUNT ((natural_t) \ - (sizeof(mach_port_limits_t)/sizeof(natural_t))) -#define MACH_PORT_RECEIVE_STATUS_COUNT ((natural_t) \ - (sizeof(mach_port_status_t)/sizeof(natural_t))) -#define MACH_PORT_DNREQUESTS_SIZE_COUNT 1 - -/* - * Structure used to pass information about port allocation requests. - * Must be padded to 64-bits total length. - */ -typedef struct mach_port_qos { - unsigned int name:1; /* name given */ - unsigned int prealloc:1; /* prealloced message */ - boolean_t pad1:30; - natural_t len; -} mach_port_qos_t; - -#if !__DARWIN_UNIX03 && !defined(_NO_PORT_T_FROM_MACH) -/* - * Mach 3.0 renamed everything to have mach_ in front of it. - * These types and macros are provided for backward compatibility - * but are deprecated. - */ -typedef mach_port_t port_t; -typedef mach_port_name_t port_name_t; -typedef mach_port_name_t *port_name_array_t; - -#define PORT_NULL ((port_t) 0) -#define PORT_DEAD ((port_t) ~0) -#define PORT_VALID(name) \ - ((port_t)(name) != PORT_NULL && (port_t)(name) != PORT_DEAD) - -#endif /* !__DARWIN_UNIX03 && !_NO_PORT_T_FROM_MACH */ - -#endif /* _MACH_PORT_H_ */ diff --git a/i386/include/mach/port_obj.h b/i386/include/mach/port_obj.h deleted file mode 100644 index d2b5f89..0000000 --- a/i386/include/mach/port_obj.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -/* - * Define a service to map from a kernel-generated port name - * to server-defined "type" and "value" data to be associated - * with the port. - */ - -#ifndef PORT_OBJ_H -#define PORT_OBJ_H - -#include <mach/port.h> - -struct port_obj_tentry { - void *pos_value; - int pos_type; -}; - -#include <sys/cdefs.h> - -__BEGIN_DECLS -extern void port_obj_init(int); -__END_DECLS - -extern struct port_obj_tentry *port_obj_table; -extern int port_obj_table_size; - -#ifndef PORT_OBJ_ASSERT - -#define port_set_obj_value_type(pname, value, type) \ -do { \ - int ndx; \ - \ - if (!port_obj_table) \ - port_obj_init(port_obj_table_size); \ - ndx = MACH_PORT_INDEX(pname); \ - port_obj_table[ndx].pos_value = (value); \ - port_obj_table[ndx].pos_type = (type); \ -} while (0) - -#define port_get_obj_value(pname) \ - (port_obj_table[MACH_PORT_INDEX(pname)].pos_value) - -#define port_get_obj_type(pname) \ - (port_obj_table[MACH_PORT_INDEX(pname)].pos_type) - -#else /* PORT_OBJ_ASSERT */ - -#define port_set_obj_value_type(pname, value, type) \ -do { \ - int ndx; \ - \ - if (!port_obj_table) \ - port_obj_init(port_obj_table_size); \ - ndx = MACH_PORT_INDEX(pname); \ - assert(ndx > 0); \ - assert(ndx < port_obj_table_size); \ - port_obj_table[ndx].pos_value = (value); \ - port_obj_table[ndx].pos_type = (type); \ -} while (0) - -#define port_get_obj_value(pname) \ - ((MACH_PORT_INDEX(pname) < (unsigned)port_obj_table_size) ? \ - port_obj_table[MACH_PORT_INDEX(pname)].pos_value : \ - (panic("port_get_obj_value: index too big"), (void *)-1)) - -#define port_get_obj_type(pname) \ - ((MACH_PORT_INDEX(pname) < (unsigned)port_obj_table_size) ? \ - port_obj_table[MACH_PORT_INDEX(pname)].pos_type : \ - (panic("port_get_obj_type: index too big"), -1)) - -#endif /* PORT_OBJ_ASSERT */ - -#endif /* PORT_OBJ_H */ diff --git a/i386/include/mach/processor.defs b/i386/include/mach/processor.defs deleted file mode 100644 index f590633..0000000 --- a/i386/include/mach/processor.defs +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_FREE_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/mach_port.defs - * Author: Rich Draves - * - * Exported kernel calls. - */ - -subsystem -#if KERNEL_SERVER - KernelServer -#endif /* KERNEL_SERVER */ - processor 3000; - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> - -/* - * References to processor objects are returned by: - * host_processors(host_priv_t,...); - * -/* - * Start processor. - */ -routine processor_start( - processor : processor_t); - -/* - * Exit processor -- may not be restartable. - */ - -routine processor_exit( - processor : processor_t); - -/* - * Return information about this processor. - */ -routine processor_info( - processor : processor_t; - flavor : processor_flavor_t; - out host : host_t; - out processor_info_out: processor_info_t, CountInOut); - - -/* - * Do something machine-dependent to processor. - */ -routine processor_control( - processor : processor_t; - processor_cmd : processor_info_t); - -/* - * JMM - Keep processor_set related stuff at the end because - * they likely will be removed. - */ - -/* - * Assign processor to processor set. - */ -routine processor_assign( - processor : processor_t; - new_set : processor_set_t; - wait : boolean_t); - -/* - * Get current assignment for processor. - */ -routine processor_get_assignment( - processor : processor_t; - out assigned_set : processor_set_name_t); - -/* vim: set ft=c : */ diff --git a/i386/include/mach/processor.h b/i386/include/mach/processor.h deleted file mode 100644 index e3afbde..0000000 --- a/i386/include/mach/processor.h +++ /dev/null @@ -1,336 +0,0 @@ -#ifndef _processor_user_ -#define _processor_user_ - -/* Module processor */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef processor_MSG_COUNT -#define processor_MSG_COUNT 6 -#endif /* processor_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mach_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine processor_start */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_start -( - processor_t processor -); - -/* Routine processor_exit */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_exit -( - processor_t processor -); - -/* Routine processor_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_info -( - processor_t processor, - processor_flavor_t flavor, - host_t *host, - processor_info_t processor_info_out, - mach_msg_type_number_t *processor_info_outCnt -); - -/* Routine processor_control */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_control -( - processor_t processor, - processor_info_t processor_cmd, - mach_msg_type_number_t processor_cmdCnt -); - -/* Routine processor_assign */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_assign -( - processor_t processor, - processor_set_t new_set, - boolean_t wait -); - -/* Routine processor_get_assignment */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_get_assignment -( - processor_t processor, - processor_set_name_t *assigned_set -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__processor_subsystem__defined -#define __Request__processor_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__processor_start_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__processor_exit_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - processor_flavor_t flavor; - mach_msg_type_number_t processor_info_outCnt; - } __Request__processor_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_msg_type_number_t processor_cmdCnt; - integer_t processor_cmd[12]; - } __Request__processor_control_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t new_set; - /* end of the kernel processed data */ - NDR_record_t NDR; - boolean_t wait; - } __Request__processor_assign_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__processor_get_assignment_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__processor_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__processor_subsystem__defined -#define __RequestUnion__processor_subsystem__defined -union __RequestUnion__processor_subsystem { - __Request__processor_start_t Request_processor_start; - __Request__processor_exit_t Request_processor_exit; - __Request__processor_info_t Request_processor_info; - __Request__processor_control_t Request_processor_control; - __Request__processor_assign_t Request_processor_assign; - __Request__processor_get_assignment_t Request_processor_get_assignment; -}; -#endif /* !__RequestUnion__processor_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__processor_subsystem__defined -#define __Reply__processor_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__processor_start_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__processor_exit_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t host; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t processor_info_outCnt; - integer_t processor_info_out[12]; - } __Reply__processor_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__processor_control_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__processor_assign_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t assigned_set; - /* end of the kernel processed data */ - } __Reply__processor_get_assignment_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__processor_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__processor_subsystem__defined -#define __ReplyUnion__processor_subsystem__defined -union __ReplyUnion__processor_subsystem { - __Reply__processor_start_t Reply_processor_start; - __Reply__processor_exit_t Reply_processor_exit; - __Reply__processor_info_t Reply_processor_info; - __Reply__processor_control_t Reply_processor_control; - __Reply__processor_assign_t Reply_processor_assign; - __Reply__processor_get_assignment_t Reply_processor_get_assignment; -}; -#endif /* !__RequestUnion__processor_subsystem__defined */ - -#ifndef subsystem_to_name_map_processor -#define subsystem_to_name_map_processor \ - { "processor_start", 3000 },\ - { "processor_exit", 3001 },\ - { "processor_info", 3002 },\ - { "processor_control", 3003 },\ - { "processor_assign", 3004 },\ - { "processor_get_assignment", 3005 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _processor_user_ */ diff --git a/i386/include/mach/processor_info.h b/i386/include/mach/processor_info.h deleted file mode 100644 index 1607c71..0000000 --- a/i386/include/mach/processor_info.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ - -/* - * File: mach/processor_info.h - * Author: David L. Black - * Date: 1988 - * - * Data structure definitions for processor_info, processor_set_info - */ - -#ifndef _MACH_PROCESSOR_INFO_H_ -#define _MACH_PROCESSOR_INFO_H_ - -#include <mach/message.h> -#include <mach/machine.h> -#include <mach/machine/processor_info.h> - -/* - * Generic information structure to allow for expansion. - */ -typedef integer_t *processor_info_t; /* varying array of int. */ -typedef integer_t *processor_info_array_t; /* varying array of int */ - -#define PROCESSOR_INFO_MAX (1024) /* max array size */ -typedef integer_t processor_info_data_t[PROCESSOR_INFO_MAX]; - - -typedef integer_t *processor_set_info_t; /* varying array of int. */ - -#define PROCESSOR_SET_INFO_MAX (1024) /* max array size */ -typedef integer_t processor_set_info_data_t[PROCESSOR_SET_INFO_MAX]; - -/* - * Currently defined information. - */ -typedef int processor_flavor_t; -#define PROCESSOR_BASIC_INFO 1 /* basic information */ -#define PROCESSOR_CPU_LOAD_INFO 2 /* cpu load information */ -#define PROCESSOR_PM_REGS_INFO 0x10000001 /* performance monitor register info */ -#define PROCESSOR_TEMPERATURE 0x10000002 /* Processor core temperature */ - -struct processor_basic_info { - cpu_type_t cpu_type; /* type of cpu */ - cpu_subtype_t cpu_subtype; /* subtype of cpu */ - boolean_t running; /* is processor running */ - int slot_num; /* slot number */ - boolean_t is_master; /* is this the master processor */ -}; - -typedef struct processor_basic_info processor_basic_info_data_t; -typedef struct processor_basic_info *processor_basic_info_t; -#define PROCESSOR_BASIC_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(processor_basic_info_data_t)/sizeof(natural_t))) - -struct processor_cpu_load_info { /* number of ticks while running... */ - unsigned int cpu_ticks[CPU_STATE_MAX]; /* ... in the given mode */ -}; - -typedef struct processor_cpu_load_info processor_cpu_load_info_data_t; -typedef struct processor_cpu_load_info *processor_cpu_load_info_t; -#define PROCESSOR_CPU_LOAD_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(processor_cpu_load_info_data_t)/sizeof(natural_t))) - -/* - * Scaling factor for load_average, mach_factor. - */ -#define LOAD_SCALE 1000 - -typedef int processor_set_flavor_t; -#define PROCESSOR_SET_BASIC_INFO 5 /* basic information */ - -struct processor_set_basic_info { - int processor_count; /* How many processors */ - int default_policy; /* When others not enabled */ -}; - -typedef struct processor_set_basic_info processor_set_basic_info_data_t; -typedef struct processor_set_basic_info *processor_set_basic_info_t; -#define PROCESSOR_SET_BASIC_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(processor_set_basic_info_data_t)/sizeof(natural_t))) - -#define PROCESSOR_SET_LOAD_INFO 4 /* scheduling statistics */ - -struct processor_set_load_info { - int task_count; /* How many tasks */ - int thread_count; /* How many threads */ - integer_t load_average; /* Scaled */ - integer_t mach_factor; /* Scaled */ -}; - -typedef struct processor_set_load_info processor_set_load_info_data_t; -typedef struct processor_set_load_info *processor_set_load_info_t; -#define PROCESSOR_SET_LOAD_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(processor_set_load_info_data_t)/sizeof(natural_t))) - - -#endif /* _MACH_PROCESSOR_INFO_H_ */ diff --git a/i386/include/mach/processor_set.defs b/i386/include/mach/processor_set.defs deleted file mode 100644 index dc0f407..0000000 --- a/i386/include/mach/processor_set.defs +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_FREE_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/mach_port.defs - * Author: Rich Draves - * - * Exported kernel calls. - */ - -subsystem -#if KERNEL_SERVER - KernelServer -#endif /* KERNEL_SERVER */ - processor_set 4000; - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> - -/* - * Return scheduling statistics for a processor set. - */ -routine processor_set_statistics( - pset : processor_set_name_t; - flavor : processor_set_flavor_t; - out info_out : processor_set_info_t, CountInOut); - - -/* - * Destroy processor set. - */ -routine processor_set_destroy( - set : processor_set_t); - - -/* - * Set max priority for processor_set. - */ -routine processor_set_max_priority( - processor_set : processor_set_t; - max_priority : int; - change_threads : boolean_t); - -/* - * Enable policy for processor set - */ -routine processor_set_policy_enable( - processor_set : processor_set_t; - policy : int); - -/* - * Disable policy for processor set - */ -routine processor_set_policy_disable( - processor_set : processor_set_t; - policy : int; - change_threads : boolean_t); - -/* - * List all tasks in processor set. - */ -routine processor_set_tasks( - processor_set : processor_set_t; - out task_list : task_array_t); - -/* - * List all threads in processor set. - */ -routine processor_set_threads( - processor_set : processor_set_t; - out thread_list : thread_act_array_t); - -/* - * Controls the scheduling attributes governing the processor set. - * Allows control of enabled policies, and per-policy base and limit - * priorities. - */ -routine processor_set_policy_control( - pset : processor_set_t; - flavor : processor_set_flavor_t; - policy_info : processor_set_info_t; - change : boolean_t); - - -/* - * Debug Info - * This call is only valid on MACH_DEBUG kernels. - * Otherwise, KERN_FAILURE is returned. - */ -routine processor_set_stack_usage( - pset : processor_set_t; - out ltotal : unsigned; - out space : vm_size_t; - out resident : vm_size_t; - out maxusage : vm_size_t; - out maxstack : vm_offset_t); - -/* - * Get information about processor set. - */ -routine processor_set_info( - set_name : processor_set_name_t; - flavor : int; - out host : host_t; - out info_out : processor_set_info_t, CountInOut); - -/* vim: set ft=c : */ diff --git a/i386/include/mach/processor_set.h b/i386/include/mach/processor_set.h deleted file mode 100644 index 1aaf327..0000000 --- a/i386/include/mach/processor_set.h +++ /dev/null @@ -1,516 +0,0 @@ -#ifndef _processor_set_user_ -#define _processor_set_user_ - -/* Module processor_set */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef processor_set_MSG_COUNT -#define processor_set_MSG_COUNT 10 -#endif /* processor_set_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mach_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine processor_set_statistics */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_set_statistics -( - processor_set_name_t pset, - processor_set_flavor_t flavor, - processor_set_info_t info_out, - mach_msg_type_number_t *info_outCnt -); - -/* Routine processor_set_destroy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_set_destroy -( - processor_set_t set -); - -/* Routine processor_set_max_priority */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_set_max_priority -( - processor_set_t processor_set, - int max_priority, - boolean_t change_threads -); - -/* Routine processor_set_policy_enable */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_set_policy_enable -( - processor_set_t processor_set, - int policy -); - -/* Routine processor_set_policy_disable */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_set_policy_disable -( - processor_set_t processor_set, - int policy, - boolean_t change_threads -); - -/* Routine processor_set_tasks */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_set_tasks -( - processor_set_t processor_set, - task_array_t *task_list, - mach_msg_type_number_t *task_listCnt -); - -/* Routine processor_set_threads */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_set_threads -( - processor_set_t processor_set, - thread_act_array_t *thread_list, - mach_msg_type_number_t *thread_listCnt -); - -/* Routine processor_set_policy_control */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_set_policy_control -( - processor_set_t pset, - processor_set_flavor_t flavor, - processor_set_info_t policy_info, - mach_msg_type_number_t policy_infoCnt, - boolean_t change -); - -/* Routine processor_set_stack_usage */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_set_stack_usage -( - processor_set_t pset, - unsigned *ltotal, - vm_size_t *space, - vm_size_t *resident, - vm_size_t *maxusage, - vm_offset_t *maxstack -); - -/* Routine processor_set_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_set_info -( - processor_set_name_t set_name, - int flavor, - host_t *host, - processor_set_info_t info_out, - mach_msg_type_number_t *info_outCnt -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__processor_set_subsystem__defined -#define __Request__processor_set_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - processor_set_flavor_t flavor; - mach_msg_type_number_t info_outCnt; - } __Request__processor_set_statistics_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__processor_set_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int max_priority; - boolean_t change_threads; - } __Request__processor_set_max_priority_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int policy; - } __Request__processor_set_policy_enable_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int policy; - boolean_t change_threads; - } __Request__processor_set_policy_disable_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__processor_set_tasks_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__processor_set_threads_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - processor_set_flavor_t flavor; - mach_msg_type_number_t policy_infoCnt; - integer_t policy_info[5]; - boolean_t change; - } __Request__processor_set_policy_control_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__processor_set_stack_usage_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - int flavor; - mach_msg_type_number_t info_outCnt; - } __Request__processor_set_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__processor_set_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__processor_set_subsystem__defined -#define __RequestUnion__processor_set_subsystem__defined -union __RequestUnion__processor_set_subsystem { - __Request__processor_set_statistics_t Request_processor_set_statistics; - __Request__processor_set_destroy_t Request_processor_set_destroy; - __Request__processor_set_max_priority_t Request_processor_set_max_priority; - __Request__processor_set_policy_enable_t Request_processor_set_policy_enable; - __Request__processor_set_policy_disable_t Request_processor_set_policy_disable; - __Request__processor_set_tasks_t Request_processor_set_tasks; - __Request__processor_set_threads_t Request_processor_set_threads; - __Request__processor_set_policy_control_t Request_processor_set_policy_control; - __Request__processor_set_stack_usage_t Request_processor_set_stack_usage; - __Request__processor_set_info_t Request_processor_set_info; -}; -#endif /* !__RequestUnion__processor_set_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__processor_set_subsystem__defined -#define __Reply__processor_set_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - mach_msg_type_number_t info_outCnt; - integer_t info_out[5]; - } __Reply__processor_set_statistics_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__processor_set_destroy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__processor_set_max_priority_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__processor_set_policy_enable_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__processor_set_policy_disable_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_ports_descriptor_t task_list; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t task_listCnt; - } __Reply__processor_set_tasks_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_ports_descriptor_t thread_list; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t thread_listCnt; - } __Reply__processor_set_threads_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__processor_set_policy_control_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - unsigned ltotal; - vm_size_t space; - vm_size_t resident; - vm_size_t maxusage; - vm_offset_t maxstack; - } __Reply__processor_set_stack_usage_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t host; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t info_outCnt; - integer_t info_out[5]; - } __Reply__processor_set_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__processor_set_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__processor_set_subsystem__defined -#define __ReplyUnion__processor_set_subsystem__defined -union __ReplyUnion__processor_set_subsystem { - __Reply__processor_set_statistics_t Reply_processor_set_statistics; - __Reply__processor_set_destroy_t Reply_processor_set_destroy; - __Reply__processor_set_max_priority_t Reply_processor_set_max_priority; - __Reply__processor_set_policy_enable_t Reply_processor_set_policy_enable; - __Reply__processor_set_policy_disable_t Reply_processor_set_policy_disable; - __Reply__processor_set_tasks_t Reply_processor_set_tasks; - __Reply__processor_set_threads_t Reply_processor_set_threads; - __Reply__processor_set_policy_control_t Reply_processor_set_policy_control; - __Reply__processor_set_stack_usage_t Reply_processor_set_stack_usage; - __Reply__processor_set_info_t Reply_processor_set_info; -}; -#endif /* !__RequestUnion__processor_set_subsystem__defined */ - -#ifndef subsystem_to_name_map_processor_set -#define subsystem_to_name_map_processor_set \ - { "processor_set_statistics", 4000 },\ - { "processor_set_destroy", 4001 },\ - { "processor_set_max_priority", 4002 },\ - { "processor_set_policy_enable", 4003 },\ - { "processor_set_policy_disable", 4004 },\ - { "processor_set_tasks", 4005 },\ - { "processor_set_threads", 4006 },\ - { "processor_set_policy_control", 4007 },\ - { "processor_set_stack_usage", 4008 },\ - { "processor_set_info", 4009 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _processor_set_user_ */ diff --git a/i386/include/mach/rpc.h b/i386/include/mach/rpc.h deleted file mode 100644 index 565d7ac..0000000 --- a/i386/include/mach/rpc.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) 2002,2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -/* - * Mach RPC Subsystem Interfaces - */ - -#ifndef _MACH_RPC_H_ -#define _MACH_RPC_H_ - -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/port.h> -#include <mach/vm_types.h> - -#include <mach/mig.h> -#include <mach/mig_errors.h> -#include <mach/machine/rpc.h> -#include <mach/thread_status.h> - -/* - * These are the types for RPC-specific variants of the MIG routine - * descriptor and subsystem data types. - * - * THIS IS ONLY FOR COMPATIBILITY. WE WILL NOT BE IMPLEMENTING THIS. - */ - -/* - * Basic mach rpc types. - */ -typedef unsigned int routine_arg_type; -typedef unsigned int routine_arg_offset; -typedef unsigned int routine_arg_size; - -/* - * Definitions for a signature's argument and routine descriptor's. - */ -struct rpc_routine_arg_descriptor { - routine_arg_type type; /* Port, Array, etc. */ - routine_arg_size size; /* element size in bytes */ - routine_arg_size count; /* number of elements */ - routine_arg_offset offset; /* Offset in list of routine args */ -}; -typedef struct rpc_routine_arg_descriptor *rpc_routine_arg_descriptor_t; - -struct rpc_routine_descriptor { - mig_impl_routine_t impl_routine; /* Server work func pointer */ - mig_stub_routine_t stub_routine; /* Unmarshalling func pointer */ - unsigned int argc; /* Number of argument words */ - unsigned int descr_count; /* Number of complex argument */ - /* descriptors */ - rpc_routine_arg_descriptor_t - arg_descr; /* Pointer to beginning of */ - /* the arg_descr array */ - unsigned int max_reply_msg; /* Max size for reply msg */ -}; -typedef struct rpc_routine_descriptor *rpc_routine_descriptor_t; - -#define RPC_DESCR_SIZE(x) ((x)->descr_count * \ - sizeof(struct rpc_routine_arg_descriptor)) - -struct rpc_signature { - struct rpc_routine_descriptor rd; - struct rpc_routine_arg_descriptor rad[1]; -}; - -#define RPC_SIGBUF_SIZE 8 - -/* - * A subsystem describes a set of server routines that can be invoked by - * mach_rpc() on the ports that are registered with the subsystem. For - * each routine, the routine number is given, along with the - * address of the implementation function in the server and a - * description of the arguments of the routine (it's "signature"). - * - * This structure definition is only a template for what is really a - * variable-length structure (generated by MIG for each subsystem). - * The actual structures do not always have one entry in the routine - * array, and also have a varying number of entries in the arg_descr - * array. Each routine has an array of zero or more arg descriptors - * one for each complex arg. These arrays are all catenated together - * to form the arg_descr field of the subsystem struct. The - * arg_descr field of each routine entry points to a unique sub-sequence - * within this catenated array. The goal is to keep everything - * contiguous. - */ -struct rpc_subsystem { - void *reserved; /* Reserved for system use */ - - mach_msg_id_t start; /* Min routine number */ - mach_msg_id_t end; /* Max routine number + 1 */ - unsigned int maxsize; /* Max mach_msg size */ - vm_address_t base_addr; /* Address of this struct in user */ - - struct rpc_routine_descriptor /* Array of routine descriptors */ - routine[1 /* Actually, (start-end+1) */ - ]; - - struct rpc_routine_arg_descriptor - arg_descriptor[1 /* Actually, the sum of the descr_ */ - ]; /* count fields for all routines */ -}; -typedef struct rpc_subsystem *rpc_subsystem_t; - -#define RPC_SUBSYSTEM_NULL ((rpc_subsystem_t) 0) - -#endif /* _MACH_RPC_H_ */ diff --git a/i386/include/mach/sdt.h b/i386/include/mach/sdt.h deleted file mode 100644 index 3268551..0000000 --- a/i386/include/mach/sdt.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _MACH_SDT_H -#define _MACH_SDT_H - -#include <mach/machine/sdt.h> - -#endif /* _MACH_SDT_H */ diff --git a/i386/include/mach/security.defs b/i386/include/mach/security.defs deleted file mode 100644 index 734aa90..0000000 --- a/i386/include/mach/security.defs +++ /dev/null @@ -1,208 +0,0 @@ - -/* -*- C++ -*- */ - -subsystem -#if KERNEL_SERVER - KernelServer -#endif KERNEL_SERVER - security 5200; - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> - -type labelstr_t = c_string[*:512]; - -/** - @brief Retrieve a task label as a label handle - @param task Target's task port - @param label Returned label handle - - This call retrieves the label handle of the specified task. - - @return Standard MiG return values (0 for success) -*/ - -routine mach_get_task_label(task : ipc_space_t; - out label : mach_port_name_t); - -/** - @brief Retrieve a task label in textual form - @param task Target's task port - @param policies Comma-delimited list of policies to query - @param label Returned label text - - This call retrieves an externalized task label for the - specified task, with respect to the specified policies. - - @return Standard MiG return values (0 for success) -*/ - -routine mach_get_task_label_text(task : ipc_space_t; - policies : labelstr_t; - out label : labelstr_t); - -/** - @brief Retrieve a port label as a label handle - @param task Issuer's task port - @param port Port to query label from - @param label Returned label handle - - This call retrieves a new label handle for the specified port. - If the port represents a label handle, KERN_INVALID_ARGUMENT is - returned. - - @return Standard MiG return values (0 for success) -*/ - -routine mach_get_label(task : ipc_space_t; - port : mach_port_name_t; - out label : mach_port_name_t); - -/** - @brief Retrieve a port label in textual form - @param task Issuer's task port - @param name Port to query label from - @param policies Comma-delimited list of policies to query - @param label Returned label text - - This call retrieves an externalized port label for the specified port, - with respect to the specified policies. If the port represents a label - handle, the returned label text refers to the stored label and not the - access control label. - - @return Standard MiG return values (0 for success) -*/ - -routine mach_get_label_text(task : ipc_space_t; - name : mach_port_name_t; - policies : labelstr_t; - out label : labelstr_t); - -/** - @brief Relabel a port - @param task Task containing specified ports - @param name Port to relabel - @param label String representation of new label - - This call attempts to relabel the specified port to the - label specified. For label handles, it changes the access control - label and not the stored label. - - @return Standard MiG return values (0 for success) -*/ - -routine mach_set_port_label(task : ipc_space_t; - name : mach_port_name_t; - label : labelstr_t); - -/** - @brief Generic access control check - @param task Any task port - @param subj subject label in textual form - @param obj object label in textual form - @param serv Service or object class name - @param perm Permission, or method, within the specified service - - This function provides a general way for a user process to query - an arbitrary access control decision from the system's security policies. - Currently, there are no standards for the format of the service and - permission names. - - @return Standard MiG return values (0 for success) -*/ - -routine mac_check_service(task : ipc_space_t; - subject : labelstr_t; - object : labelstr_t; - service : labelstr_t; - perm : labelstr_t); - -/** - @brief Generic access control check - @param task Task containing specified ports (usually caller's) - @param subj subject label in textual form - @param obj port containing object label - @param serv Service or object class name - @param perm Permission, or method, within the specified service - - This function provides a general way for a user process to query - an arbitrary access control decision from the system's security policies. - Currently, there are no standards for the format of the service and - permission names. If the port is a label handle, the stored label is - used. Otherwise, its access control label is used. - - @return Standard MiG return values (0 for success) -*/ - -routine mac_port_check_service_obj(task : ipc_space_t; - subject : labelstr_t; - object : mach_port_name_t; - service : labelstr_t; - perm : labelstr_t); - -/** - @brief Generic access control check - @param task Task containing specified ports (usually caller's) - @param subj port containing subject label - @param obj port containing object label - @param serv Service or object class name - @param perm Permission, or method, within the specified service - - This function provides a general way for a user process to query - an arbitrary access control decision from the system's security policies. - Currently, there are no standards for the format of the service and - permission names. If any ports are label handles, the stored label is - used. Otherwise, the access control labels are used. - - @return Standard MiG return values (0 for success) -*/ - -routine mac_port_check_access(task : ipc_space_t; - subject : mach_port_name_t; - object : mach_port_name_t; - service : labelstr_t; - perm : labelstr_t); - -/** - @brief Create a new label handle - @param task Task to receive new ports (usually caller's) - @param name Returned label handle port - @param label String representation of new label - - Creates a new label handle, with the stored label defined by the - given text. Any task may create a label handle with any valid label, - not necessarily one that it has permission to access. A port right - for the new label handle is inserted into the specified task. - Posession of label handles should not imply any security properties. - - @return Standard MiG return values (0 for success) -*/ - -routine mac_label_new(task : ipc_space_t; - out name : mach_port_name_t; - label : labelstr_t); - -/** - @brief Request a computed label - @param task subj,obj,newlabel relative to this task (usually caller's) - @param subj port containing subject label - @param obj port containing object label - @param serv Service or object class name - @param newlabel Returned label handle port - - Ask the loaded policies to compute a label based on the two input labels - and the service name. There is currently no standard for the service name, - or even what the input labels represent (Subject and parent object are only - a suggestion). If any ports are label handles, the stored label is - used. Otherwise, the access control labels are used. A new label handle - is created to contain the computed label, and is stored into the - specified task. - - @return Standard MiG return values (0 for success) -*/ - -routine mac_request_label(task : ipc_space_t; - subject : mach_port_name_t; - object : mach_port_name_t; - service : labelstr_t; - out newlabel : mach_port_name_t); diff --git a/i386/include/mach/semaphore.h b/i386/include/mach/semaphore.h deleted file mode 100644 index 660af09..0000000 --- a/i386/include/mach/semaphore.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2000-2008 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_SEMAPHORE_H_ -#define _MACH_SEMAPHORE_H_ - -#include <mach/port.h> -#include <mach/mach_types.h> -#include <mach/kern_return.h> -#include <mach/sync_policy.h> - -/* - * Forward Declarations - * - * The semaphore creation and deallocation routines are - * defined with the Mach task APIs in <mach/task.h>. - * - * kern_return_t semaphore_create(task_t task, - * semaphore_t *new_semaphore, - * sync_policy_t policy, - * int value); - * - * kern_return_t semaphore_destroy(task_t task, - * semaphore_t semaphore); - */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - -extern kern_return_t semaphore_signal (semaphore_t semaphore); -extern kern_return_t semaphore_signal_all (semaphore_t semaphore); - -extern kern_return_t semaphore_wait (semaphore_t semaphore); - - -extern kern_return_t semaphore_timedwait (semaphore_t semaphore, - mach_timespec_t wait_time); - -extern kern_return_t semaphore_timedwait_signal(semaphore_t wait_semaphore, - semaphore_t signal_semaphore, - mach_timespec_t wait_time); - -extern kern_return_t semaphore_wait_signal (semaphore_t wait_semaphore, - semaphore_t signal_semaphore); - -extern kern_return_t semaphore_signal_thread (semaphore_t semaphore, - thread_t thread); - - -__END_DECLS - - -#endif /* _MACH_SEMAPHORE_H_ */ diff --git a/i386/include/mach/shared_memory_server.h b/i386/include/mach/shared_memory_server.h deleted file mode 100644 index 1ca25f3..0000000 --- a/i386/include/mach/shared_memory_server.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * - * File: mach/shared_memory_server.h - * - * protos and struct definitions for shared library - * server and interface - */ - -/* - * XXX - * - * NOTE: this file is deprecated and will be removed in the near future. - * Any project that includes this file should be changed to: - * 1. use <mach/shared_region.h> instead of this file, - * 2. handle the new shared regions, now available on more platforms - */ - -#ifndef _MACH_SHARED_MEMORY_SERVER_H_ -#define _MACH_SHARED_MEMORY_SERVER_H_ - -#warning "<mach/shared_memory_server.h> is deprecated. Please use <mach/shared_region.h> instead." - -#include <sys/cdefs.h> -#include <mach/vm_prot.h> -#include <mach/vm_types.h> -#include <mach/mach_types.h> - -#define VM_PROT_COW 0x8 /* must not interfere with normal prot assignments */ -#define VM_PROT_ZF 0x10 /* must not interfere with normal prot assignments */ - -#ifdef __arm__ -#define GLOBAL_SHARED_TEXT_SEGMENT 0x30000000U -#define GLOBAL_SHARED_DATA_SEGMENT 0x38000000U -#define GLOBAL_SHARED_SEGMENT_MASK 0xF8000000U - -#define SHARED_TEXT_REGION_SIZE 0x08000000 -#define SHARED_DATA_REGION_SIZE 0x08000000 -#else -#define GLOBAL_SHARED_TEXT_SEGMENT 0x90000000U -#define GLOBAL_SHARED_DATA_SEGMENT 0xA0000000U -#define GLOBAL_SHARED_SEGMENT_MASK 0xF0000000U - -#define SHARED_TEXT_REGION_SIZE 0x10000000 -#define SHARED_DATA_REGION_SIZE 0x10000000 -#endif - -#if !defined(__LP64__) - -#define SHARED_LIBRARY_SERVER_SUPPORTED - -#define SHARED_ALTERNATE_LOAD_BASE 0x09000000 - -/* - * Note: the two masks below are useful because the assumption is - * made that these shared regions will always be mapped on natural boundaries - * i.e. if the size is 0x10000000 the object can be mapped at - * 0x20000000, or 0x30000000, but not 0x1000000 - */ -#ifdef __arm__ -#define SHARED_TEXT_REGION_MASK 0x07FFFFFF -#define SHARED_DATA_REGION_MASK 0x07FFFFFF -#else -#define SHARED_TEXT_REGION_MASK 0x0FFFFFFF -#define SHARED_DATA_REGION_MASK 0x0FFFFFFF -#endif - - -/* flags field aliases for copyin_shared_file and load_shared_file */ - -/* IN */ -#define ALTERNATE_LOAD_SITE 0x1 -#define NEW_LOCAL_SHARED_REGIONS 0x2 -#define QUERY_IS_SYSTEM_REGION 0x4 - -/* OUT */ -#define SF_PREV_LOADED 0x1 -#define SYSTEM_REGION_BACKED 0x2 - - -struct sf_mapping { - vm_offset_t mapping_offset; - vm_size_t size; - vm_offset_t file_offset; - vm_prot_t protection; /* read/write/execute/COW/ZF */ - vm_offset_t cksum; -}; -typedef struct sf_mapping sf_mapping_t; - -#endif /* !defined(__LP64__) */ - -/* - * All shared_region_* declarations are a private interface - * between dyld and the kernel. - * - */ -struct shared_file_mapping_np { - mach_vm_address_t sfm_address; - mach_vm_size_t sfm_size; - mach_vm_offset_t sfm_file_offset; - vm_prot_t sfm_max_prot; - vm_prot_t sfm_init_prot; -}; - -struct shared_region_range_np { - mach_vm_address_t srr_address; - mach_vm_size_t srr_size; -}; - - -__BEGIN_DECLS -int shared_region_map_file_np(int fd, - uint32_t mappingCount, - const struct shared_file_mapping_np *mappings, - int64_t *slide_p); -int shared_region_make_private_np(uint32_t rangeCount, - const struct shared_region_range_np *ranges); -__END_DECLS - - -#endif /* _MACH_SHARED_MEMORY_SERVER_H_ */ diff --git a/i386/include/mach/shared_region.h b/i386/include/mach/shared_region.h deleted file mode 100644 index 4bea17e..0000000 --- a/i386/include/mach/shared_region.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2007 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * - * File: mach/shared_region.h - * - * protos and struct definitions for shared region - */ - -#ifndef _MACH_SHARED_REGION_H_ -#define _MACH_SHARED_REGION_H_ - -#include <sys/cdefs.h> -#include <mach/vm_prot.h> -#include <mach/vm_types.h> -#include <mach/mach_types.h> - -#define SHARED_REGION_BASE_I386 0x90000000ULL -#define SHARED_REGION_SIZE_I386 0x20000000ULL -#define SHARED_REGION_NESTING_BASE_I386 0x90000000ULL -#define SHARED_REGION_NESTING_SIZE_I386 0x20000000ULL -#define SHARED_REGION_NESTING_MIN_I386 0x00200000ULL -#define SHARED_REGION_NESTING_MAX_I386 0xFFE00000ULL - -#define SHARED_REGION_BASE_X86_64 0x00007FFF70000000ULL -#define SHARED_REGION_SIZE_X86_64 0x000000008FE00000ULL -#define SHARED_REGION_NESTING_BASE_X86_64 0x00007FFF80000000ULL -#define SHARED_REGION_NESTING_SIZE_X86_64 0x0000000040000000ULL -#define SHARED_REGION_NESTING_MIN_X86_64 0x0000000000200000ULL -#define SHARED_REGION_NESTING_MAX_X86_64 0xFFFFFFFFFFE00000ULL - -#define SHARED_REGION_BASE_PPC 0x90000000ULL -#define SHARED_REGION_SIZE_PPC 0x20000000ULL -#define SHARED_REGION_NESTING_BASE_PPC 0x90000000ULL -#define SHARED_REGION_NESTING_SIZE_PPC 0x10000000ULL -#define SHARED_REGION_NESTING_MIN_PPC 0x10000000ULL -#define SHARED_REGION_NESTING_MAX_PPC 0x10000000ULL - -#define SHARED_REGION_BASE_PPC64 0x00007FFF60000000ULL -#define SHARED_REGION_SIZE_PPC64 0x00000000A0000000ULL -#define SHARED_REGION_NESTING_BASE_PPC64 0x00007FFF60000000ULL -#define SHARED_REGION_NESTING_SIZE_PPC64 0x00000000A0000000ULL -#define SHARED_REGION_NESTING_MIN_PPC64 0x0000000010000000ULL -#define SHARED_REGION_NESTING_MAX_PPC64 0x0000000010000000ULL - -#define SHARED_REGION_BASE_ARM 0x30000000ULL -#define SHARED_REGION_SIZE_ARM 0x10000000ULL -#define SHARED_REGION_NESTING_BASE_ARM 0x30000000ULL -#define SHARED_REGION_NESTING_SIZE_ARM 0x08000000ULL -#define SHARED_REGION_NESTING_MIN_ARM ? -#define SHARED_REGION_NESTING_MAX_ARM ? - -#if defined(__i386__) -#define SHARED_REGION_BASE SHARED_REGION_BASE_I386 -#define SHARED_REGION_SIZE SHARED_REGION_SIZE_I386 -#define SHARED_REGION_NESTING_BASE SHARED_REGION_NESTING_BASE_I386 -#define SHARED_REGION_NESTING_SIZE SHARED_REGION_NESTING_SIZE_I386 -#define SHARED_REGION_NESTING_MIN SHARED_REGION_NESTING_MIN_I386 -#define SHARED_REGION_NESTING_MAX SHARED_REGION_NESTING_MAX_I386 -#elif defined(__x86_64__) -#define SHARED_REGION_BASE SHARED_REGION_BASE_X86_64 -#define SHARED_REGION_SIZE SHARED_REGION_SIZE_X86_64 -#define SHARED_REGION_NESTING_BASE SHARED_REGION_NESTING_BASE_X86_64 -#define SHARED_REGION_NESTING_SIZE SHARED_REGION_NESTING_SIZE_X86_64 -#define SHARED_REGION_NESTING_MIN SHARED_REGION_NESTING_MIN_X86_64 -#define SHARED_REGION_NESTING_MAX SHARED_REGION_NESTING_MAX_X86_64 -#elif defined(__ppc__) -#define SHARED_REGION_BASE SHARED_REGION_BASE_PPC -#define SHARED_REGION_SIZE SHARED_REGION_SIZE_PPC -#define SHARED_REGION_NESTING_BASE SHARED_REGION_NESTING_BASE_PPC -#define SHARED_REGION_NESTING_SIZE SHARED_REGION_NESTING_SIZE_PPC -#define SHARED_REGION_NESTING_MIN SHARED_REGION_NESTING_MIN_PPC -#define SHARED_REGION_NESTING_MAX SHARED_REGION_NESTING_MAX_PPC -#elif defined(__ppc64__) -#define SHARED_REGION_BASE SHARED_REGION_BASE_PPC64 -#define SHARED_REGION_SIZE SHARED_REGION_SIZE_PPC64 -#define SHARED_REGION_NESTING_BASE SHARED_REGION_NESTING_BASE_PPC64 -#define SHARED_REGION_NESTING_SIZE SHARED_REGION_NESTING_SIZE_PPC64 -#define SHARED_REGION_NESTING_MIN SHARED_REGION_NESTING_MIN_PPC64 -#define SHARED_REGION_NESTING_MAX SHARED_REGION_NESTING_MAX_PPC64 -#elif defined(__arm__) -#define SHARED_REGION_BASE SHARED_REGION_BASE_ARM -#define SHARED_REGION_SIZE SHARED_REGION_SIZE_ARM -#define SHARED_REGION_NESTING_BASE SHARED_REGION_NESTING_BASE_ARM -#define SHARED_REGION_NESTING_SIZE SHARED_REGION_NESTING_SIZE_ARM -#define SHARED_REGION_NESTING_MIN SHARED_REGION_NESTING_MIN_ARM -#define SHARED_REGION_NESTING_MAX SHARED_REGION_NESTING_MAX_ARM -#endif - -/* - * All shared_region_* declarations are a private interface - * between dyld and the kernel. - * - */ -struct shared_file_mapping_np { - mach_vm_address_t sfm_address; - mach_vm_size_t sfm_size; - mach_vm_offset_t sfm_file_offset; - vm_prot_t sfm_max_prot; - vm_prot_t sfm_init_prot; -}; -#define VM_PROT_COW 0x8 /* must not interfere with normal prot assignments */ -#define VM_PROT_ZF 0x10 /* must not interfere with normal prot assignments */ - - -__BEGIN_DECLS -int shared_region_check_np(uint64_t *startaddress); -int shared_region_map_np(int fd, - uint32_t mappingCount, - const struct shared_file_mapping_np *mappings); -__END_DECLS - - -#endif /* _MACH_SHARED_REGION_H_ */ diff --git a/i386/include/mach/std_types.defs b/i386/include/mach/std_types.defs deleted file mode 100644 index 0b48383..0000000 --- a/i386/include/mach/std_types.defs +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 2002,2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * Mach kernel standard interface type declarations - */ - -#ifndef _MACH_STD_TYPES_DEFS_ -#define _MACH_STD_TYPES_DEFS_ - -/* from ISO/IEC 988:1999 spec */ -/* 7.18.1.1 Exact-width integer types */ - -type int8_t = MACH_MSG_TYPE_INTEGER_8; -type uint8_t = MACH_MSG_TYPE_INTEGER_8; -type int16_t = MACH_MSG_TYPE_INTEGER_16; -type uint16_t = MACH_MSG_TYPE_INTEGER_16; -type int32_t = MACH_MSG_TYPE_INTEGER_32; -type uint32_t = MACH_MSG_TYPE_INTEGER_32; -type int64_t = MACH_MSG_TYPE_INTEGER_64; -type uint64_t = MACH_MSG_TYPE_INTEGER_64; - -/* - * Legacy fixed-length Mach types which should - * be replaced with the Standard types from above. - */ -type int32 = int32_t; -type unsigned32 = uint32_t; -type int64 = int64_t; -type unsigned64 = uint64_t; - -/* - * Other fixed length Mach types. - */ -type char = MACH_MSG_TYPE_CHAR; -type boolean_t = MACH_MSG_TYPE_BOOLEAN; - -#include <mach/machine/machine_types.defs> - -type kern_return_t = int; - -type pointer_t = ^array[] of MACH_MSG_TYPE_BYTE - ctype: vm_offset_t; - - -type mach_port_t = MACH_MSG_TYPE_COPY_SEND; -type mach_port_array_t = array[] of mach_port_t; - -type mach_port_name_t = MACH_MSG_TYPE_PORT_NAME; -type mach_port_name_array_t = array[] of mach_port_name_t; - -type mach_port_right_t = natural_t; - -type mach_port_type_t = natural_t; -type mach_port_type_array_t = array[] of mach_port_type_t; - -type mach_port_urefs_t = natural_t; -type mach_port_delta_t = integer_t; -type mach_port_seqno_t = natural_t; -type mach_port_mscount_t = unsigned; -type mach_port_msgcount_t = unsigned; -type mach_port_rights_t = unsigned; -type mach_msg_id_t = integer_t; -type mach_msg_size_t = natural_t; -type mach_msg_type_name_t = unsigned; -type mach_msg_options_t = integer_t; - -type mach_port_move_receive_t = MACH_MSG_TYPE_MOVE_RECEIVE - ctype: mach_port_t; -type mach_port_copy_send_t = MACH_MSG_TYPE_COPY_SEND - ctype: mach_port_t; -type mach_port_make_send_t = MACH_MSG_TYPE_MAKE_SEND - ctype: mach_port_t; -type mach_port_move_send_t = MACH_MSG_TYPE_MOVE_SEND - ctype: mach_port_t; -type mach_port_make_send_once_t = MACH_MSG_TYPE_MAKE_SEND_ONCE - ctype: mach_port_t; -type mach_port_move_send_once_t = MACH_MSG_TYPE_MOVE_SEND_ONCE - ctype: mach_port_t; - -type mach_port_receive_t = MACH_MSG_TYPE_PORT_RECEIVE - ctype: mach_port_t; -type mach_port_send_t = MACH_MSG_TYPE_PORT_SEND - ctype: mach_port_t; -type mach_port_send_once_t = MACH_MSG_TYPE_PORT_SEND_ONCE - ctype: mach_port_t; - -type mach_port_poly_t = polymorphic - ctype: mach_port_t; - -import <mach/std_types.h>; -import <mach/mig.h>; - -#endif /* _MACH_STD_TYPES_DEFS_ */ - -/* vim: set ft=c : */ diff --git a/i386/include/mach/std_types.h b/i386/include/mach/std_types.h deleted file mode 100644 index f5b838a..0000000 --- a/i386/include/mach/std_types.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2002,2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * Mach standard external interface type definitions. - * - */ - -#ifndef _MACH_STD_TYPES_H_ -#define _MACH_STD_TYPES_H_ - -#include <stdint.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/port.h> -#include <mach/vm_types.h> - -#endif /* _MACH_STD_TYPES_H_ */ diff --git a/i386/include/mach/sync.h b/i386/include/mach/sync.h deleted file mode 100644 index 0a567c2..0000000 --- a/i386/include/mach/sync.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* -** This file contains compatibilty wrapper header for things that used -** to be generated from mach/sync.defs. Now that code is split into two -** different interface generator files, so include the two resulting -** headers here. -*/ -#include <mach/semaphore.h> -#include <mach/lock_set.h> diff --git a/i386/include/mach/sync_policy.h b/i386/include/mach/sync_policy.h deleted file mode 100644 index 1fd8d3f..0000000 --- a/i386/include/mach/sync_policy.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -#ifndef _MACH_SYNC_POLICY_H_ -#define _MACH_SYNC_POLICY_H_ - -typedef int sync_policy_t; - -/* - * These options define the wait ordering of the synchronizers - */ -#define SYNC_POLICY_FIFO 0x0 -#define SYNC_POLICY_FIXED_PRIORITY 0x1 -#define SYNC_POLICY_REVERSED 0x2 -#define SYNC_POLICY_ORDER_MASK 0x3 -#define SYNC_POLICY_LIFO (SYNC_POLICY_FIFO|SYNC_POLICY_REVERSED) - - -#define SYNC_POLICY_MAX 0x7 - -#endif /* _MACH_SYNC_POLICY_H_ */ diff --git a/i386/include/mach/task.defs b/i386/include/mach/task.defs deleted file mode 100644 index ceebc95..0000000 --- a/i386/include/mach/task.defs +++ /dev/null @@ -1,393 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_FREE_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/mach_port.defs - * Author: Rich Draves - * - * Exported kernel calls. - */ - -subsystem -#if KERNEL_SERVER - KernelServer -#endif /* KERNEL_SERVER */ - task 3400; - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> -/* - * Create a new task with an empty set of IPC rights, - * and having an address space constructed from the - * target task (or empty, if inherit_memory is FALSE). - */ -routine task_create( - target_task : task_t; - ledgers : ledger_array_t; - inherit_memory : boolean_t; - out child_task : task_t); - -/* - * Destroy the target task, causing all of its threads - * to be destroyed, all of its IPC rights to be deallocated, - * and all of its address space to be deallocated. - */ -routine task_terminate( - target_task : task_t); - -/* - * Returns the set of threads belonging to the target task. - */ -routine task_threads( - target_task : task_t; - out act_list : thread_act_array_t); - -/* - * Stash a handful of ports for the target task; child - * tasks inherit this stash at task_create time. - */ -routine mach_ports_register( - target_task : task_t; - init_port_set : mach_port_array_t = - ^array[] of mach_port_t); - -/* - * Retrieve the stashed ports for the target task. - */ -routine mach_ports_lookup( - target_task : task_t; - out init_port_set : mach_port_array_t = - ^array[] of mach_port_t); - -/* - * Returns information about the target task. - */ -routine task_info( - target_task : task_name_t; - flavor : task_flavor_t; - out task_info_out : task_info_t, CountInOut); - -/* - * Set task information. - */ -routine task_set_info( - target_task : task_t; - flavor : task_flavor_t; - task_info_in : task_info_t); - -/* - * Increment the suspend count for the target task. - * No threads within a task may run when the suspend - * count for that task is non-zero. - */ -routine task_suspend( - target_task : task_t); - - -/* - * Decrement the suspend count for the target task, - * if the count is currently non-zero. If the resulting - * suspend count is zero, then threads within the task - * that also have non-zero suspend counts may execute. - */ -routine task_resume( - target_task : task_t); - -/* - * Returns the current value of the selected special port - * associated with the target task. - */ -routine task_get_special_port( - task : task_t; - which_port : int; - out special_port : mach_port_t); - -/* - * Set one of the special ports associated with the - * target task. - */ -routine task_set_special_port( - task : task_t; - which_port : int; - special_port : mach_port_t); - -/* - * Create a new thread within the target task, returning - * the port representing the first thr_act in that new thread. The - * initial execution state of the thread is undefined. - */ -routine thread_create( - parent_task : task_t; - out child_act : thread_act_t); - -/* - * Create a new thread within the target task, returning - * the port representing that new thread. The new thread - * is not suspended; its initial execution state is given - * by flavor and new_state. Returns the port representing - * the new thread. - */ -routine thread_create_running( - parent_task : task_t; - flavor : thread_state_flavor_t; - new_state : thread_state_t; - out child_act : thread_act_t); - -/* - * Set an exception handler for a task on one or more exception types. - * These handlers are invoked for all threads in the task if there are - * no thread-specific exception handlers or those handlers returned an - * error. - */ -routine task_set_exception_ports( - task : task_t; - exception_mask : exception_mask_t; - new_port : mach_port_t; - behavior : exception_behavior_t; - new_flavor : thread_state_flavor_t); - - -/* - * Lookup some of the old exception handlers for a task - */ -routine task_get_exception_ports( - task : task_t; - exception_mask : exception_mask_t; - out masks : exception_mask_array_t; - out old_handlers : exception_handler_array_t, SameCount; - out old_behaviors : exception_behavior_array_t, SameCount; - out old_flavors : exception_flavor_array_t, SameCount); - - -/* - * Set an exception handler for a thread on one or more exception types. - * At the same time, return the previously defined exception handlers for - * those types. - */ -routine task_swap_exception_ports( - task : task_t; - exception_mask : exception_mask_t; - new_port : mach_port_t; - behavior : exception_behavior_t; - new_flavor : thread_state_flavor_t; - out masks : exception_mask_array_t; - out old_handlerss : exception_handler_array_t, SameCount; - out old_behaviors : exception_behavior_array_t, SameCount; - out old_flavors : exception_flavor_array_t, SameCount); - -/* - * Create and destroy lock_set and semaphore synchronizers on a - * per-task basis (i.e. the task owns them). - */ -routine lock_set_create( - task : task_t; - out new_lock_set : lock_set_t; - n_ulocks : int; - policy : int); - -routine lock_set_destroy( - task : task_t; - lock_set : lock_set_t); - -routine semaphore_create( - task : task_t; - out semaphore : semaphore_t; - policy : int; - value : int); - -routine semaphore_destroy( - task : task_t; - semaphore : semaphore_consume_ref_t); - -/* - * Set/get policy information for a task. - * (Approved Mac OS X microkernel interface) - */ - -routine task_policy_set( - task : task_t; - flavor : task_policy_flavor_t; - policy_info : task_policy_t); - -routine task_policy_get( - task : task_t; - flavor : task_policy_flavor_t; -out policy_info : task_policy_t, CountInOut; -inout get_default : boolean_t); - -/* - * Removed from the kernel. - */ -#if KERNEL_SERVER -skip; -#else -routine task_sample( - task : task_t; - reply : mach_port_make_send_t); -#endif - -/* - * JMM - Everything from here down is likely to go away soon - */ -/* - * OBSOLETE interface. - */ -routine task_policy( - task : task_t; - policy : policy_t; - base : policy_base_t; - set_limit : boolean_t; - change : boolean_t); - - -/* - * Establish a user-level handler for the specified - * system call. - */ -routine task_set_emulation( - target_port : task_t; - routine_entry_pt: vm_address_t; - routine_number : int); - -/* - * Get user-level handler entry points for all - * emulated system calls. - */ -routine task_get_emulation_vector( - task : task_t; - out vector_start : int; - out emulation_vector: emulation_vector_t); - -/* - * Establish user-level handlers for the specified - * system calls. Non-emulated system calls are specified - * with emulation_vector[i] == EML_ROUTINE_NULL. - */ -routine task_set_emulation_vector( - task : task_t; - vector_start : int; - emulation_vector: emulation_vector_t); - - -/* - * Establish restart pc for interrupted atomic sequences. - */ -routine task_set_ras_pc( - target_task : task_t; - basepc : vm_address_t; - boundspc : vm_address_t); - - -skip; /* was kernel_task_create() */ - -/* - * JMM - Want to eliminate processor_set so keep them at the end. - */ - -/* - * Assign task to processor set. - */ -routine task_assign( - task : task_t; - new_set : processor_set_t; - assign_threads : boolean_t); - -/* - * Assign task to default set. - */ -routine task_assign_default( - task : task_t; - assign_threads : boolean_t); - -/* - * Get current assignment for task. - */ -routine task_get_assignment( - task : task_t; - out assigned_set : processor_set_name_t); - -/* - * OBSOLETE interface. - */ -routine task_set_policy( - task : task_t; - pset : processor_set_t; - policy : policy_t; - base : policy_base_t; - limit : policy_limit_t; - change : boolean_t); - -/* - * Read the selected state which is to be installed on new - * threads in the task as they are created. - */ -routine task_get_state( - task : task_t; - flavor : thread_state_flavor_t; - out old_state : thread_state_t, CountInOut); - -/* - * Set the selected state information to be installed on - * all subsequently created threads in the task. - */ -routine task_set_state( - task : task_t; - flavor : thread_state_flavor_t; - new_state : thread_state_t); - - -/* vim: set ft=c : */ diff --git a/i386/include/mach/task.h b/i386/include/mach/task.h deleted file mode 100644 index 459a330..0000000 --- a/i386/include/mach/task.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#if defined(__i386__) -#include <mach/i386/task.h> -#elif defined(__x86_64__) -#include <mach/x86_64/task.h> -#elif defined(__ppc__) -#include <mach/ppc/task.h> -#elif defined(__ppc64__) -#include <mach/ppc64/task.h> -#elif defined(__arm__) -#include <mach/arm/task.h> -#else -#error unknown architecture -#endif diff --git a/i386/include/mach/task_access.defs b/i386/include/mach/task_access.defs deleted file mode 100644 index 1696fd3..0000000 --- a/i386/include/mach/task_access.defs +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -subsystem -#if KERNEL_USER - KernelUser -#endif /* KERN_USER */ - task_access 27000; - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> - -/* - * Verify task_for_pid access for the given pid - * Access granted by return value (success/failure) - */ -routine check_task_access( - task_access_port : mach_port_t; - calling_pid : int32_t; - calling_gid : uint32_t; - target_pid : int32_t; - ServerAuditToken caller_cred : audit_token_t); - -/* - * Search for a code signature for unsigned executables - */ -routine find_code_signature( - task_access_port : mach_port_t; - new_pid : int32_t); - -/* vim: set ft=c : */ diff --git a/i386/include/mach/task_info.h b/i386/include/mach/task_info.h deleted file mode 100644 index cab9c17..0000000 --- a/i386/include/mach/task_info.h +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - * Machine-independent task information structures and definitions. - * - * The definitions in this file are exported to the user. The kernel - * will translate its internal data structures to these structures - * as appropriate. - * - */ - -#ifndef _MACH_TASK_INFO_H_ -#define _MACH_TASK_INFO_H_ - -#include <mach/message.h> -#include <mach/machine/vm_types.h> -#include <mach/time_value.h> -#include <mach/policy.h> - -#include <sys/cdefs.h> - -/* - * Generic information structure to allow for expansion. - */ -typedef natural_t task_flavor_t; -typedef integer_t *task_info_t; /* varying array of int */ - -#define TASK_INFO_MAX (1024) /* maximum array size */ -typedef integer_t task_info_data_t[TASK_INFO_MAX]; - -/* - * Currently defined information structures. - */ - -#pragma pack(4) - -#define TASK_BASIC_INFO_32 4 /* basic information */ -#define TASK_BASIC2_INFO_32 6 - -struct task_basic_info_32 { - integer_t suspend_count; /* suspend count for task */ - natural_t virtual_size; /* virtual memory size (bytes) */ - natural_t resident_size; /* resident memory size (bytes) */ - time_value_t user_time; /* total user run time for - terminated threads */ - time_value_t system_time; /* total system run time for - terminated threads */ - policy_t policy; /* default policy for new threads */ -}; -typedef struct task_basic_info_32 task_basic_info_32_data_t; -typedef struct task_basic_info_32 *task_basic_info_32_t; -#define TASK_BASIC_INFO_32_COUNT \ - (sizeof(task_basic_info_32_data_t) / sizeof(natural_t)) - - -#define TASK_BASIC_INFO_64 5 /* 64-bit capable basic info */ - -struct task_basic_info_64 { - integer_t suspend_count; /* suspend count for task */ - mach_vm_size_t virtual_size; /* virtual memory size (bytes) */ - mach_vm_size_t resident_size; /* resident memory size (bytes) */ - time_value_t user_time; /* total user run time for - terminated threads */ - time_value_t system_time; /* total system run time for - terminated threads */ - policy_t policy; /* default policy for new threads */ -}; -typedef struct task_basic_info_64 task_basic_info_64_data_t; -typedef struct task_basic_info_64 *task_basic_info_64_t; -#define TASK_BASIC_INFO_64_COUNT \ - (sizeof(task_basic_info_64_data_t) / sizeof(natural_t)) - - -/* localized structure - cannot be safely passed between tasks of differing sizes */ - -struct task_basic_info { - integer_t suspend_count; /* suspend count for task */ - vm_size_t virtual_size; /* virtual memory size (bytes) */ - vm_size_t resident_size; /* resident memory size (bytes) */ - time_value_t user_time; /* total user run time for - terminated threads */ - time_value_t system_time; /* total system run time for - terminated threads */ - policy_t policy; /* default policy for new threads */ -}; - -typedef struct task_basic_info task_basic_info_data_t; -typedef struct task_basic_info *task_basic_info_t; -#define TASK_BASIC_INFO_COUNT \ - (sizeof(task_basic_info_data_t) / sizeof(natural_t)) -#if !defined(__LP64__) -#define TASK_BASIC_INFO TASK_BASIC_INFO_32 -#else -#define TASK_BASIC_INFO TASK_BASIC_INFO_64 -#endif - - - -#define TASK_EVENTS_INFO 2 /* various event counts */ - -struct task_events_info { - integer_t faults; /* number of page faults */ - integer_t pageins; /* number of actual pageins */ - integer_t cow_faults; /* number of copy-on-write faults */ - integer_t messages_sent; /* number of messages sent */ - integer_t messages_received; /* number of messages received */ - integer_t syscalls_mach; /* number of mach system calls */ - integer_t syscalls_unix; /* number of unix system calls */ - integer_t csw; /* number of context switches */ -}; -typedef struct task_events_info task_events_info_data_t; -typedef struct task_events_info *task_events_info_t; -#define TASK_EVENTS_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(task_events_info_data_t) / sizeof(natural_t))) - -#define TASK_THREAD_TIMES_INFO 3 /* total times for live threads - - only accurate if suspended */ - -struct task_thread_times_info { - time_value_t user_time; /* total user run time for - live threads */ - time_value_t system_time; /* total system run time for - live threads */ -}; - -typedef struct task_thread_times_info task_thread_times_info_data_t; -typedef struct task_thread_times_info *task_thread_times_info_t; -#define TASK_THREAD_TIMES_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(task_thread_times_info_data_t) / sizeof(natural_t))) - -#define TASK_ABSOLUTETIME_INFO 1 - -struct task_absolutetime_info { - uint64_t total_user; /* total time */ - uint64_t total_system; - uint64_t threads_user; /* existing threads only */ - uint64_t threads_system; -}; - -typedef struct task_absolutetime_info task_absolutetime_info_data_t; -typedef struct task_absolutetime_info *task_absolutetime_info_t; -#define TASK_ABSOLUTETIME_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof (task_absolutetime_info_data_t) / sizeof (natural_t))) - -#define TASK_SECURITY_TOKEN 13 -#define TASK_SECURITY_TOKEN_COUNT ((mach_msg_type_number_t) \ - (sizeof(security_token_t) / sizeof(natural_t))) - -#define TASK_AUDIT_TOKEN 15 -#define TASK_AUDIT_TOKEN_COUNT \ - (sizeof(audit_token_t) / sizeof(natural_t)) - - -#define TASK_AFFINITY_TAG_INFO 16 /* This is experimental. */ - -struct task_affinity_tag_info { - integer_t set_count; - integer_t min; - integer_t max; - integer_t task_count; -}; -typedef struct task_affinity_tag_info task_affinity_tag_info_data_t; -typedef struct task_affinity_tag_info *task_affinity_tag_info_t; -#define TASK_AFFINITY_TAG_INFO_COUNT \ - (sizeof(task_affinity_tag_info_data_t) / sizeof(natural_t)) - -#define TASK_DYLD_INFO 17 /* This is experimental. */ - -struct task_dyld_info { - mach_vm_address_t all_image_info_addr; - mach_vm_size_t all_image_info_size; -}; -typedef struct task_dyld_info task_dyld_info_data_t; -typedef struct task_dyld_info *task_dyld_info_t; -#define TASK_DYLD_INFO_COUNT \ - (sizeof(task_dyld_info_data_t) / sizeof(natural_t)) - -#pragma pack() - - -/* - * Obsolete interfaces. - */ - -#define TASK_SCHED_TIMESHARE_INFO 10 -#define TASK_SCHED_RR_INFO 11 -#define TASK_SCHED_FIFO_INFO 12 - -#define TASK_SCHED_INFO 14 - -#endif /* _MACH_TASK_INFO_H_ */ diff --git a/i386/include/mach/task_ledger.h b/i386/include/mach/task_ledger.h deleted file mode 100644 index 5d4bc25..0000000 --- a/i386/include/mach/task_ledger.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -#ifndef _MACH_TASK_LEDGER_H_ -#define _MACH_TASK_LEDGER_H_ - -/* - * Evolving and likely to change. - */ - -/* - * Definitions for task ledger line items - */ -#define ITEM_THREADS 0 /* number of threads */ -#define ITEM_TASKS 1 /* number of tasks */ - -#define ITEM_VM 2 /* virtual space (bytes)*/ - -#define LEDGER_N_ITEMS 3 /* Total line items */ - -#define LEDGER_UNLIMITED 0 /* ignored item.maximum */ - -#endif /* _MACH_TASK_LEDGER_H_ */ diff --git a/i386/include/mach/task_policy.h b/i386/include/mach/task_policy.h deleted file mode 100644 index 3a2fb39..0000000 --- a/i386/include/mach/task_policy.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_TASK_POLICY_H_ -#define _MACH_TASK_POLICY_H_ - -#include <mach/mach_types.h> - -/* - * These are the calls for accessing the policy parameters - * of a particular task. - * - * The extra 'get_default' parameter to the second call is - * IN/OUT as follows: - * 1) if asserted on the way in it indicates that the default - * values should be returned, not the ones currently set, in - * this case 'get_default' will always be asserted on return; - * 2) if unasserted on the way in, the current settings are - * desired and if still unasserted on return, then the info - * returned reflects the current settings, otherwise if - * 'get_default' returns asserted, it means that there are no - * current settings due to other parameters taking precedence, - * and the default ones are being returned instead. - */ - -typedef natural_t task_policy_flavor_t; -typedef integer_t *task_policy_t; - -/* -kern_return_t task_policy_set( - task_t task, - task_policy_flavor_t flavor, - task_policy_t policy_info, - mach_msg_type_number_t count); - -kern_return_t task_policy_get( - task_t task, - task_policy_flavor_t flavor, - task_policy_t policy_info, - mach_msg_type_number_t *count, - boolean_t *get_default); -*/ - -/* - * Defined flavors. - */ -/* - * TASK_CATEGORY_POLICY: - * - * This provides information to the kernel about the role - * of the task in the system. - * - * Parameters: - * - * role: Enumerated as follows: - * - * TASK_UNSPECIFIED is the default, since the role is not - * inherited from the parent. - * - * TASK_FOREGROUND_APPLICATION should be assigned when the - * task is a normal UI application in the foreground from - * the HI point of view. - * **N.B. There may be more than one of these at a given time. - * - * TASK_BACKGROUND_APPLICATION should be assigned when the - * task is a normal UI application in the background from - * the HI point of view. - * - * TASK_CONTROL_APPLICATION should be assigned to the unique - * UI application which implements the pop-up application dialog. - * There can only be one task at a time with this designation, - * which is assigned FCFS. - * - * TASK_GRAPHICS_SERVER should be assigned to the graphics - * management (window) server. There can only be one task at - * a time with this designation, which is assigned FCFS. - */ - -#define TASK_CATEGORY_POLICY 1 - -enum task_role { - TASK_RENICED = -1, - TASK_UNSPECIFIED = 0, - TASK_FOREGROUND_APPLICATION, - TASK_BACKGROUND_APPLICATION, - TASK_CONTROL_APPLICATION, - TASK_GRAPHICS_SERVER, - TASK_THROTTLE_APPLICATION, - TASK_DEFAULT_APPLICATION -}; - -typedef enum task_role task_role_t; - -struct task_category_policy { - task_role_t role; -}; - -typedef struct task_category_policy task_category_policy_data_t; -typedef struct task_category_policy *task_category_policy_t; - -#define TASK_CATEGORY_POLICY_COUNT ((mach_msg_type_number_t) \ - (sizeof (task_category_policy_data_t) / sizeof (integer_t))) - -#endif /* _MACH_TASK_POLICY_H_ */ diff --git a/i386/include/mach/task_special_ports.h b/i386/include/mach/task_special_ports.h deleted file mode 100644 index ec980cf..0000000 --- a/i386/include/mach/task_special_ports.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/task_special_ports.h - * - * Defines codes for special_purpose task ports. These are NOT - * port identifiers - they are only used for the task_get_special_port - * and task_set_special_port routines. - * - */ - -#ifndef _MACH_TASK_SPECIAL_PORTS_H_ -#define _MACH_TASK_SPECIAL_PORTS_H_ - -typedef int task_special_port_t; - -#define TASK_KERNEL_PORT 1 /* Represents task to the outside - world.*/ - -#define TASK_HOST_PORT 2 /* The host (priv) port for task. */ - -#define TASK_NAME_PORT 3 /* the name (unpriv) port for task */ - -#define TASK_BOOTSTRAP_PORT 4 /* Bootstrap environment for task. */ - -/* - * Evolving and likely to change. - */ - -#define TASK_WIRED_LEDGER_PORT 5 /* Wired resource ledger for task. */ - -#define TASK_PAGED_LEDGER_PORT 6 /* Paged resource ledger for task. */ - -#define TASK_SEATBELT_PORT 7 /* Seatbelt compiler/DEM port for task. */ - -#define TASK_GSSD_PORT 8 /* GSSD port for security context */ - -#define TASK_ACCESS_PORT 9 /* Permission check for task_for_pid. */ - -#define task_get_wired_ledger_port(task, port) \ - (task_get_special_port((task), TASK_WIRED_LEDGER_PORT, (port))) - -#define task_set_wired_ledger_port(task, port) \ - (task_set_special_port((task), TASK_WIRED_LEDGER_PORT, (port))) - -#define task_get_paged_ledger_port(task, port) \ - (task_get_special_port((task), TASK_PAGED_LEDGER_PORT, (port))) - -#define task_set_paged_ledger_port(task, port) \ - (task_set_special_port((task), TASK_PAGED_LEDGER_PORT, (port))) - -/* - * Definitions for ease of use - */ - -#define task_get_kernel_port(task, port) \ - (task_get_special_port((task), TASK_KERNEL_PORT, (port))) - -#define task_set_kernel_port(task, port) \ - (task_set_special_port((task), TASK_KERNEL_PORT, (port))) - -#define task_get_host_port(task, port) \ - (task_get_special_port((task), TASK_HOST_PORT, (port))) - -#define task_set_host_port(task, port) \ - (task_set_special_port((task), TASK_HOST_PORT, (port))) - -#define task_get_bootstrap_port(task, port) \ - (task_get_special_port((task), TASK_BOOTSTRAP_PORT, (port))) - -#define task_set_bootstrap_port(task, port) \ - (task_set_special_port((task), TASK_BOOTSTRAP_PORT, (port))) - -#define task_get_gssd_port(task, port) \ - (task_get_special_port((task), TASK_GSSD_PORT, (port))) - -#define task_set_gssd_port(task, port) \ - (task_set_special_port((task), TASK_GSSD_PORT, (port))) - -#define task_get_task_access_port(task, port) \ - (task_get_special_port((task), TASK_ACCESS_PORT, (port))) - -#define task_set_task_access_port(task, port) \ - (task_set_special_port((task), TASK_ACCESS_PORT, (port))) - -#endif /* _MACH_TASK_SPECIAL_PORTS_H_ */ diff --git a/i386/include/mach/thread_act.defs b/i386/include/mach/thread_act.defs deleted file mode 100644 index 47a21a9..0000000 --- a/i386/include/mach/thread_act.defs +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_FREE_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/mach_port.defs - * Author: Rich Draves - * - * Exported kernel calls. - */ - -subsystem -#if KERNEL_SERVER - KernelServer -#endif /* KERNEL_SERVER */ - thread_act 3600; - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> - -/* - * Destroy the target thread. - * - * JMM - For legacy reasons this consumes a reference to the - * target thread. This will have to change in the future because - * we want the interfaces to be able to be defined in more standard - * IDLs and transports, and most of them do not support the notion - * of reference ownership transfers (just sharing). - */ -routine thread_terminate( - target_act : thread_act_consume_ref_t); - - -/* - * Return the selected state information for the target - * thr_act. If the thr_act is currently executing, the results - * may be stale. [Flavor THREAD_STATE_FLAVOR_LIST provides a - * list of valid flavors for the target thread.] - */ -routine act_get_state( - target_act : thread_act_t; - flavor : int; - out old_state : thread_state_t, CountInOut); - -/* - * Set the selected state information for the target thread. - * If the thread is currently executing, the state change - * may be ill-defined. - */ -routine act_set_state( - target_act : thread_act_t; - flavor : int; - new_state : thread_state_t); - -/* - * Backward compatible old-style thread routines. - * These have different semantics than the new activation versions. - * - * Return the selected state information for the target - * thread. If the thread is currently executing, the results - * may be stale. [Flavor THREAD_STATE_FLAVOR_LIST provides a - * list of valid flavors for the target thr_act.] - */ -routine thread_get_state( - target_act : thread_act_t; - flavor : thread_state_flavor_t; - out old_state : thread_state_t, CountInOut); - -/* - * Set the selected state information for the target thread. - * If the thread is currently executing, the state change - * may be ill-defined. - */ -routine thread_set_state( - target_act : thread_act_t; - flavor : thread_state_flavor_t; - new_state : thread_state_t); - -/* - * Increment the suspend count for the target thread. - * Once this call has completed, the thread will not - * execute any further user or meta- instructions. - * Once suspended, a thread may not execute again until - * its suspend count is zero, and the suspend count - * for its task is also zero. - */ -routine thread_suspend( - target_act : thread_act_t); - -/* - * Decrement the suspend count for the target thread, - * if that count is not already zero. - */ -routine thread_resume( - target_act : thread_act_t); - -/* - * Cause any user or meta- instructions currently being - * executed by the target thread to be aborted. [Meta- - * instructions consist of the basic traps for IPC - * (e.g., msg_send, msg_receive) and self-identification - * (e.g., task_self, thread_self, thread_reply). Calls - * described by MiG interfaces are not meta-instructions - * themselves.] - */ -routine thread_abort( - target_act : thread_act_t); - -/* - * Cause any user or meta- instructions currently being - * executed by the target thread to be aborted so that - * they are transparently restartable. This call fails - * if the abort would result in a non-restartable condition. - * Retry is the caller's responsibility. [Meta- - * instructions consist of the basic traps for IPC - * (e.g., msg_send, msg_receive) and self-identification - * (e.g., task_self, thread_self, thread_reply). Calls - * described by MiG interfaces are not meta-instructions - * themselves.] - */ -routine thread_abort_safely( - target_act : thread_act_t); - - -routine thread_depress_abort( - thread : thread_act_t); - - -/* - * Returns the current value of the selected special port - * associated with the target thread. - */ -routine thread_get_special_port( - thr_act : thread_act_t; - which_port : int; - out special_port : mach_port_t); - -/* - * Set one of the special ports associated with the - * target thread. - */ -routine thread_set_special_port( - thr_act : thread_act_t; - which_port : int; - special_port : mach_port_t); - -/* - * Returns information about the target thread. - */ -routine thread_info( - target_act : thread_act_t; - flavor : thread_flavor_t; - out thread_info_out : thread_info_t, CountInOut); - -/* - * Set an exception handler for a thread on one or more exception types - */ -routine thread_set_exception_ports( - thread : thread_act_t; - exception_mask : exception_mask_t; - new_port : mach_port_t; - behavior : exception_behavior_t; - new_flavor : thread_state_flavor_t); - -/* - * Lookup some of the old exception handlers for a thread - */ -routine thread_get_exception_ports( - thread : thread_act_t; - exception_mask : exception_mask_t; - out masks : exception_mask_array_t; - out old_handlers : exception_handler_array_t, SameCount; - out old_behaviors : exception_behavior_array_t, SameCount; - out old_flavors : exception_flavor_array_t, SameCount); - -/* - * Set an exception handler for a thread on one or more exception types. - * At the same time, return the previously defined exception handlers for - * those types. - */ -routine thread_swap_exception_ports( - thread : thread_act_t; - exception_mask : exception_mask_t; - new_port : mach_port_t; - behavior : exception_behavior_t; - new_flavor : thread_state_flavor_t; - out masks : exception_mask_array_t; - out old_handlers : exception_handler_array_t, SameCount; - out old_behaviors : exception_behavior_array_t, SameCount; - out old_flavors : exception_flavor_array_t, SameCount); - -/* - * OBSOLETE interface. - */ -routine thread_policy( - thr_act : thread_act_t; - policy : policy_t; - base : policy_base_t; - set_limit : boolean_t); - -/* - * Set/get policy information for a thread. - * (Approved Mac OS X microkernel interface) - */ - -routine thread_policy_set( - thread : thread_act_t; - flavor : thread_policy_flavor_t; - policy_info : thread_policy_t); - -routine thread_policy_get( - thread : thread_act_t; - flavor : thread_policy_flavor_t; -out policy_info : thread_policy_t, CountInOut; -inout get_default : boolean_t); - -/* - * Removed from the kernel. - */ -#if KERNEL_SERVER -skip; -#else -routine thread_sample( - thread : thread_act_t; - reply : mach_port_make_send_t); -#endif - -/* - * ETAP has been removed from the kernel. - */ -#if KERNEL_SERVER -skip; -#else -routine etap_trace_thread( - target_act : thread_act_t; - trace_status : boolean_t); -#endif - -/* - * Assign thread to processor set. - */ -routine thread_assign( - thread : thread_act_t; - new_set : processor_set_t); - -/* - * Assign thread to default set. - */ -routine thread_assign_default( - thread : thread_act_t); - -/* - * Get current assignment for thread. - */ -routine thread_get_assignment( - thread : thread_act_t; - out assigned_set : processor_set_name_t); - - -/* - * OBSOLETE interface. - */ -routine thread_set_policy( - thr_act : thread_act_t; - pset : processor_set_t; - policy : policy_t; - base : policy_base_t; - limit : policy_limit_t); - -/* vim: set ft=c : */ diff --git a/i386/include/mach/thread_act.h b/i386/include/mach/thread_act.h deleted file mode 100644 index ac2309b..0000000 --- a/i386/include/mach/thread_act.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#if defined(__i386__) -#include <mach/i386/thread_act.h> -#elif defined(__x86_64__) -#include <mach/x86_64/thread_act.h> -#elif defined(__ppc__) -#include <mach/ppc/thread_act.h> -#elif defined(__ppc64__) -#include <mach/ppc64/thread_act.h> -#elif defined(__arm__) -#include <mach/arm/thread_act.h> -#else -#error unknown architecture -#endif diff --git a/i386/include/mach/thread_info.h b/i386/include/mach/thread_info.h deleted file mode 100644 index 5f51aea..0000000 --- a/i386/include/mach/thread_info.h +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/thread_info - * - * Thread information structure and definitions. - * - * The defintions in this file are exported to the user. The kernel - * will translate its internal data structures to these structures - * as appropriate. - * - */ - -#ifndef _MACH_THREAD_INFO_H_ -#define _MACH_THREAD_INFO_H_ - -#include <mach/boolean.h> -#include <mach/policy.h> -#include <mach/time_value.h> -#include <mach/message.h> -#include <mach/machine/vm_types.h> - -/* - * Generic information structure to allow for expansion. - */ -typedef natural_t thread_flavor_t; -typedef integer_t *thread_info_t; /* varying array of int */ - -#define THREAD_INFO_MAX (1024) /* maximum array size */ -typedef integer_t thread_info_data_t[THREAD_INFO_MAX]; - -/* - * Currently defined information. - */ -#define THREAD_BASIC_INFO 3 /* basic information */ - -struct thread_basic_info { - time_value_t user_time; /* user run time */ - time_value_t system_time; /* system run time */ - integer_t cpu_usage; /* scaled cpu usage percentage */ - policy_t policy; /* scheduling policy in effect */ - integer_t run_state; /* run state (see below) */ - integer_t flags; /* various flags (see below) */ - integer_t suspend_count; /* suspend count for thread */ - integer_t sleep_time; /* number of seconds that thread - has been sleeping */ -}; - -typedef struct thread_basic_info thread_basic_info_data_t; -typedef struct thread_basic_info *thread_basic_info_t; -#define THREAD_BASIC_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(thread_basic_info_data_t) / sizeof(natural_t))) - -#define THREAD_IDENTIFIER_INFO 4 /* thread id and other information */ - -struct thread_identifier_info { - uint64_t thread_id; /* system-wide unique 64-bit thread id */ - uint64_t thread_handle; /* handle to be used by libproc */ - uint64_t dispatch_qaddr; /* libdispatch queue address */ -}; - -typedef struct thread_identifier_info thread_identifier_info_data_t; -typedef struct thread_identifier_info *thread_identifier_info_t; -#define THREAD_IDENTIFIER_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(thread_identifier_info_data_t) / sizeof(natural_t))) - -/* - * Scale factor for usage field. - */ - -#define TH_USAGE_SCALE 1000 - -/* - * Thread run states (state field). - */ - -#define TH_STATE_RUNNING 1 /* thread is running normally */ -#define TH_STATE_STOPPED 2 /* thread is stopped */ -#define TH_STATE_WAITING 3 /* thread is waiting normally */ -#define TH_STATE_UNINTERRUPTIBLE 4 /* thread is in an uninterruptible - wait */ -#define TH_STATE_HALTED 5 /* thread is halted at a - clean point */ - -/* - * Thread flags (flags field). - */ -#define TH_FLAGS_SWAPPED 0x1 /* thread is swapped out */ -#define TH_FLAGS_IDLE 0x2 /* thread is an idle thread */ - -/* - * Obsolete interfaces. - */ - -#define THREAD_SCHED_TIMESHARE_INFO 10 -#define THREAD_SCHED_RR_INFO 11 -#define THREAD_SCHED_FIFO_INFO 12 - -#endif /* _MACH_THREAD_INFO_H_ */ diff --git a/i386/include/mach/thread_policy.h b/i386/include/mach/thread_policy.h deleted file mode 100644 index d9530b7..0000000 --- a/i386/include/mach/thread_policy.h +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _MACH_THREAD_POLICY_H_ -#define _MACH_THREAD_POLICY_H_ - -#include <mach/mach_types.h> - -/* - * These are the calls for accessing the policy parameters - * of a particular thread. - * - * The extra 'get_default' parameter to the second call is - * IN/OUT as follows: - * 1) if asserted on the way in it indicates that the default - * values should be returned, not the ones currently set, in - * this case 'get_default' will always be asserted on return; - * 2) if unasserted on the way in, the current settings are - * desired and if still unasserted on return, then the info - * returned reflects the current settings, otherwise if - * 'get_default' returns asserted, it means that there are no - * current settings due to other parameters taking precedence, - * and the default ones are being returned instead. - */ - -typedef natural_t thread_policy_flavor_t; -typedef integer_t *thread_policy_t; - -/* -kern_return_t thread_policy_set( - thread_t thread, - thread_policy_flavor_t flavor, - thread_policy_t policy_info, - mach_msg_type_number_t count); - -kern_return_t thread_policy_get( - thread_t thread, - thread_policy_flavor_t flavor, - thread_policy_t policy_info, - mach_msg_type_number_t *count, - boolean_t *get_default); -*/ - -/* - * Defined flavors. - */ -/* - * THREAD_STANDARD_POLICY: - * - * This is the standard (fair) scheduling mode, assigned to new - * threads. The thread will be given processor time in a manner - * which apportions approximately equal share to long running - * computations. - * - * Parameters: - * [none] - */ - -#define THREAD_STANDARD_POLICY 1 - -struct thread_standard_policy { - natural_t no_data; -}; - -typedef struct thread_standard_policy thread_standard_policy_data_t; -typedef struct thread_standard_policy *thread_standard_policy_t; - -#define THREAD_STANDARD_POLICY_COUNT 0 - -/* - * THREAD_EXTENDED_POLICY: - * - * Extended form of THREAD_STANDARD_POLICY, which supplies a - * hint indicating whether this is a long running computation. - * - * Parameters: - * - * timeshare: TRUE (the default) results in identical scheduling - * behavior as THREAD_STANDARD_POLICY. - */ - -#define THREAD_EXTENDED_POLICY 1 - -struct thread_extended_policy { - boolean_t timeshare; -}; - -typedef struct thread_extended_policy thread_extended_policy_data_t; -typedef struct thread_extended_policy *thread_extended_policy_t; - -#define THREAD_EXTENDED_POLICY_COUNT ((mach_msg_type_number_t) \ - (sizeof (thread_extended_policy_data_t) / sizeof (integer_t))) - -/* - * THREAD_TIME_CONSTRAINT_POLICY: - * - * This scheduling mode is for threads which have real time - * constraints on their execution. - * - * Parameters: - * - * period: This is the nominal amount of time between separate - * processing arrivals, specified in absolute time units. A - * value of 0 indicates that there is no inherent periodicity in - * the computation. - * - * computation: This is the nominal amount of computation - * time needed during a separate processing arrival, specified - * in absolute time units. - * - * constraint: This is the maximum amount of real time that - * may elapse from the start of a separate processing arrival - * to the end of computation for logically correct functioning, - * specified in absolute time units. Must be (>= computation). - * Note that latency = (constraint - computation). - * - * preemptible: This indicates that the computation may be - * interrupted, subject to the constraint specified above. - */ - -#define THREAD_TIME_CONSTRAINT_POLICY 2 - -struct thread_time_constraint_policy { - uint32_t period; - uint32_t computation; - uint32_t constraint; - boolean_t preemptible; -}; - -typedef struct thread_time_constraint_policy \ - thread_time_constraint_policy_data_t; -typedef struct thread_time_constraint_policy \ - *thread_time_constraint_policy_t; - -#define THREAD_TIME_CONSTRAINT_POLICY_COUNT ((mach_msg_type_number_t) \ - (sizeof (thread_time_constraint_policy_data_t) / sizeof (integer_t))) - -/* - * THREAD_PRECEDENCE_POLICY: - * - * This may be used to indicate the relative value of the - * computation compared to the other threads in the task. - * - * Parameters: - * - * importance: The importance is specified as a signed value. - */ - -#define THREAD_PRECEDENCE_POLICY 3 - -struct thread_precedence_policy { - integer_t importance; -}; - -typedef struct thread_precedence_policy thread_precedence_policy_data_t; -typedef struct thread_precedence_policy *thread_precedence_policy_t; - -#define THREAD_PRECEDENCE_POLICY_COUNT ((mach_msg_type_number_t) \ - (sizeof (thread_precedence_policy_data_t) / sizeof (integer_t))) - -/* - * THREAD_AFFINITY_POLICY: - * - * This policy is experimental. - * This may be used to express affinity relationships - * between threads in the task. Threads with the same affinity tag will - * be scheduled to share an L2 cache if possible. That is, affinity tags - * are a hint to the scheduler for thread placement. - * - * The namespace of affinity tags is generally local to one task. However, - * a child task created after the assignment of affinity tags by its parent - * will share that namespace. In particular, a family of forked processes - * may be created with a shared affinity namespace. - * - * Parameters: - * tag: The affinity set identifier. - */ - -#define THREAD_AFFINITY_POLICY 4 - -struct thread_affinity_policy { - integer_t affinity_tag; -}; - -#define THREAD_AFFINITY_TAG_NULL 0 - -typedef struct thread_affinity_policy thread_affinity_policy_data_t; -typedef struct thread_affinity_policy *thread_affinity_policy_t; - -#define THREAD_AFFINITY_POLICY_COUNT ((mach_msg_type_number_t) \ - (sizeof (thread_affinity_policy_data_t) / sizeof (integer_t))) - -#endif /* _MACH_THREAD_POLICY_H_ */ diff --git a/i386/include/mach/thread_special_ports.h b/i386/include/mach/thread_special_ports.h deleted file mode 100644 index 1d44c02..0000000 --- a/i386/include/mach/thread_special_ports.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/thread_special_ports.h - * - * Defines codes for special_purpose thread ports. These are NOT - * port identifiers - they are only used for the thread_get_special_port - * and thread_set_special_port routines. - * - */ - -#ifndef _MACH_THREAD_SPECIAL_PORTS_H_ -#define _MACH_THREAD_SPECIAL_PORTS_H_ - -#define THREAD_KERNEL_PORT 1 /* Represents the thread to the outside - world.*/ - -/* - * Definitions for ease of use - */ - -#define thread_get_kernel_port(thread, port) \ - (thread_get_special_port((thread), THREAD_KERNEL_PORT, (port))) - -#define thread_set_kernel_port(thread, port) \ - (thread_set_special_port((thread), THREAD_KERNEL_PORT, (port))) - -#endif /* _MACH_THREAD_SPECIAL_PORTS_H_ */ diff --git a/i386/include/mach/thread_status.h b/i386/include/mach/thread_status.h deleted file mode 100644 index aead09b..0000000 --- a/i386/include/mach/thread_status.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/thread_status.h - * Author: Avadis Tevanian, Jr. - * - * This file contains the structure definitions for the user-visible - * thread state. This thread state is examined with the thread_get_state - * kernel call and may be changed with the thread_set_state kernel call. - * - */ - -#ifndef _MACH_THREAD_STATUS_H_ -#define _MACH_THREAD_STATUS_H_ - -/* - * The actual structure that comprises the thread state is defined - * in the machine dependent module. - */ -#include <mach/machine/vm_types.h> -#include <mach/machine/thread_status.h> -#include <mach/machine/thread_state.h> - -/* - * Generic definition for machine-dependent thread status. - */ - -typedef natural_t *thread_state_t; /* Variable-length array */ - -/* THREAD_STATE_MAX is now defined in <mach/machine/thread_state.h> */ -typedef natural_t thread_state_data_t[THREAD_STATE_MAX]; - -#define THREAD_STATE_FLAVOR_LIST 0 /* List of valid flavors */ -#define THREAD_STATE_FLAVOR_LIST_NEW 128 - -typedef int thread_state_flavor_t; -typedef thread_state_flavor_t *thread_state_flavor_array_t; - -#endif /* _MACH_THREAD_STATUS_H_ */ diff --git a/i386/include/mach/thread_switch.h b/i386/include/mach/thread_switch.h deleted file mode 100644 index f555894..0000000 --- a/i386/include/mach/thread_switch.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ - -#ifndef _MACH_THREAD_SWITCH_H_ -#define _MACH_THREAD_SWITCH_H_ - -#include <mach/mach_types.h> -#include <mach/kern_return.h> -#include <mach/message.h> -#include <mach/mach_traps.h> - -/* - * Constant definitions for thread_switch trap. - */ - -#define SWITCH_OPTION_NONE 0 -#define SWITCH_OPTION_DEPRESS 1 -#define SWITCH_OPTION_WAIT 2 - -#define valid_switch_option(opt) (0 <= (opt) && (opt) <= 2) - -#endif /* _MACH_THREAD_SWITCH_H_ */ diff --git a/i386/include/mach/time_value.h b/i386/include/mach/time_value.h deleted file mode 100644 index e4f912d..0000000 --- a/i386/include/mach/time_value.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ - -#ifndef _MACH_TIME_VALUE_H_ -#define _MACH_TIME_VALUE_H_ - -#include <mach/machine/vm_types.h> - -/* - * Time value returned by kernel. - */ - -struct time_value { - integer_t seconds; - integer_t microseconds; -}; - -typedef struct time_value time_value_t; - -/* - * Macros to manipulate time values. Assume that time values - * are normalized (microseconds <= 999999). - */ -#define TIME_MICROS_MAX (1000000) - -#define time_value_add_usec(val, micros) { \ - if (((val)->microseconds += (micros)) \ - >= TIME_MICROS_MAX) { \ - (val)->microseconds -= TIME_MICROS_MAX; \ - (val)->seconds++; \ - } \ -} - -#define time_value_add(result, addend) { \ - (result)->microseconds += (addend)->microseconds; \ - (result)->seconds += (addend)->seconds; \ - if ((result)->microseconds >= TIME_MICROS_MAX) { \ - (result)->microseconds -= TIME_MICROS_MAX; \ - (result)->seconds++; \ - } \ -} - -#endif /* _MACH_TIME_VALUE_H_ */ diff --git a/i386/include/mach/vm_attributes.h b/i386/include/mach/vm_attributes.h deleted file mode 100644 index 2be3233..0000000 --- a/i386/include/mach/vm_attributes.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/vm_attributes.h - * Author: Alessandro Forin - * - * Virtual memory attributes definitions. - * - * These definitions are in addition to the machine-independent - * ones (e.g. protection), and are only selectively supported - * on specific machine architectures. - * - */ - -#ifndef _MACH_VM_ATTRIBUTES_H_ -#define _MACH_VM_ATTRIBUTES_H_ - -/* - * Types of machine-dependent attributes - */ -typedef unsigned int vm_machine_attribute_t; - -#define MATTR_CACHE 1 /* cachability */ -#define MATTR_MIGRATE 2 /* migrability */ -#define MATTR_REPLICATE 4 /* replicability */ - -/* - * Values for the above, e.g. operations on attribute - */ -typedef int vm_machine_attribute_val_t; - -#define MATTR_VAL_OFF 0 /* (generic) turn attribute off */ -#define MATTR_VAL_ON 1 /* (generic) turn attribute on */ -#define MATTR_VAL_GET 2 /* (generic) return current value */ - -#define MATTR_VAL_CACHE_FLUSH 6 /* flush from all caches */ -#define MATTR_VAL_DCACHE_FLUSH 7 /* flush from data caches */ -#define MATTR_VAL_ICACHE_FLUSH 8 /* flush from instruction caches */ -#define MATTR_VAL_CACHE_SYNC 9 /* sync I+D caches */ -#define MATTR_VAL_CACHE_SYNC 9 /* sync I+D caches */ - -#define MATTR_VAL_GET_INFO 10 /* get page info (stats) */ - -#endif /* _MACH_VM_ATTRIBUTES_H_ */ diff --git a/i386/include/mach/vm_behavior.h b/i386/include/mach/vm_behavior.h deleted file mode 100644 index ec0ee72..0000000 --- a/i386/include/mach/vm_behavior.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * File: mach/vm_behavior.h - * - * Virtual memory map behavior definitions. - * - */ - -#ifndef _MACH_VM_BEHAVIOR_H_ -#define _MACH_VM_BEHAVIOR_H_ - -/* - * Types defined: - * - * vm_behavior_t behavior codes. - */ - -typedef int vm_behavior_t; - -/* - * Enumeration of valid values for vm_behavior_t. - * These describe expected page reference behavior for - * for a given range of virtual memory. For implementation - * details see vm/vm_fault.c - */ - - -/* - * The following behaviors affect the memory region's future behavior - * and are stored in the VM map entry data structure. - */ -#define VM_BEHAVIOR_DEFAULT ((vm_behavior_t) 0) /* default */ -#define VM_BEHAVIOR_RANDOM ((vm_behavior_t) 1) /* random */ -#define VM_BEHAVIOR_SEQUENTIAL ((vm_behavior_t) 2) /* forward sequential */ -#define VM_BEHAVIOR_RSEQNTL ((vm_behavior_t) 3) /* reverse sequential */ - -/* - * The following "behaviors" affect the memory region only at the time of the - * call and are not stored in the VM map entry. - */ -#define VM_BEHAVIOR_WILLNEED ((vm_behavior_t) 4) /* will need in near future */ -#define VM_BEHAVIOR_DONTNEED ((vm_behavior_t) 5) /* dont need in near future */ -#define VM_BEHAVIOR_FREE ((vm_behavior_t) 6) /* free memory without write-back */ -#define VM_BEHAVIOR_ZERO_WIRED_PAGES ((vm_behavior_t) 7) /* zero out the wired pages of an entry if it is being deleted without unwiring them first */ -#define VM_BEHAVIOR_REUSABLE ((vm_behavior_t) 8) -#define VM_BEHAVIOR_REUSE ((vm_behavior_t) 9) -#define VM_BEHAVIOR_CAN_REUSE ((vm_behavior_t) 10) - -#endif /*_MACH_VM_BEHAVIOR_H_*/ diff --git a/i386/include/mach/vm_inherit.h b/i386/include/mach/vm_inherit.h deleted file mode 100644 index d6440e4..0000000 --- a/i386/include/mach/vm_inherit.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/vm_inherit.h - * Author: Avadis Tevanian, Jr., Michael Wayne Young - * - * Virtual memory map inheritance definitions. - * - */ - -#ifndef _MACH_VM_INHERIT_H_ -#define _MACH_VM_INHERIT_H_ - -/* - * Types defined: - * - * vm_inherit_t inheritance codes. - */ - -typedef unsigned int vm_inherit_t; /* might want to change this */ - -/* - * Enumeration of valid values for vm_inherit_t. - */ - -#define VM_INHERIT_SHARE ((vm_inherit_t) 0) /* share with child */ -#define VM_INHERIT_COPY ((vm_inherit_t) 1) /* copy into child */ -#define VM_INHERIT_NONE ((vm_inherit_t) 2) /* absent from child */ -#define VM_INHERIT_DONATE_COPY ((vm_inherit_t) 3) /* copy and delete */ - -#define VM_INHERIT_DEFAULT VM_INHERIT_COPY -#define VM_INHERIT_LAST_VALID VM_INHERIT_NONE - -#endif /* _MACH_VM_INHERIT_H_ */ diff --git a/i386/include/mach/vm_map.defs b/i386/include/mach/vm_map.defs deleted file mode 100644 index 439c014..0000000 --- a/i386/include/mach/vm_map.defs +++ /dev/null @@ -1,475 +0,0 @@ -/* - * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_FREE_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/vm_map.defs - * - * Exported (native-sized) kernel VM calls. - */ - -subsystem -#if KERNEL_SERVER - KernelServer -#endif /* KERNEL_SERVER */ - vm_map 3800; - -#include <mach/std_types.defs> -#include <mach/mach_types.defs> -#include <mach_debug/mach_debug_types.defs> - -/* - * Returns information about the contents of the virtual - * address space of the target task at the specified - * address. The returned protection, inheritance, sharing - * and memory object values apply to the entire range described - * by the address range returned; the memory object offset - * corresponds to the beginning of the address range. - * [If the specified address is not allocated, the next - * highest address range is described. If no addresses beyond - * the one specified are allocated, the call returns KERN_NO_SPACE.] - */ -routine vm_region( - target_task : vm_map_t; - inout address : vm_address_t; - out size : vm_size_t; - flavor : vm_region_flavor_t; - out info : vm_region_info_t, CountInOut; - out object_name : memory_object_name_t = - MACH_MSG_TYPE_MOVE_SEND - ctype: mach_port_t); - -/* - * Allocate zero-filled memory in the address space - * of the target task, either at the specified address, - * or wherever space can be found (if anywhere is TRUE), - * of the specified size. The address at which the - * allocation actually took place is returned. - */ -routine vm_allocate( - target_task : vm_task_entry_t; - inout address : vm_address_t; - size : vm_size_t; - flags : int); - -/* - * Deallocate the specified range from the virtual - * address space of the target task. - */ -routine vm_deallocate( - target_task : vm_task_entry_t; - address : vm_address_t; - size : vm_size_t); - -/* - * Set the current or maximum protection attribute - * for the specified range of the virtual address - * space of the target task. The current protection - * limits the memory access rights of threads within - * the task; the maximum protection limits the accesses - * that may be given in the current protection. - * Protections are specified as a set of {read, write, execute} - * *permissions*. - */ -routine vm_protect( - target_task : vm_task_entry_t; - address : vm_address_t; - size : vm_size_t; - set_maximum : boolean_t; - new_protection : vm_prot_t); - -/* - * Set the inheritance attribute for the specified range - * of the virtual address space of the target task. - * The inheritance value is one of {none, copy, share}, and - * specifies how the child address space should acquire - * this memory at the time of a task_create call. - */ -routine vm_inherit( - target_task : vm_task_entry_t; - address : vm_address_t; - size : vm_size_t; - new_inheritance : vm_inherit_t); - -/* - * Returns the contents of the specified range of the - * virtual address space of the target task. [The - * range must be aligned on a virtual page boundary, - * and must be a multiple of pages in extent. The - * protection on the specified range must permit reading.] - */ -routine vm_read( - target_task : vm_map_t; - address : vm_address_t; - size : vm_size_t; - out data : pointer_t); - -/* - * List corrollary to vm_read, returns mapped contents of specified - * ranges within target address space. - */ -routine vm_read_list( - target_task : vm_map_t; - inout data_list : vm_read_entry_t; - count : natural_t); - -/* - * Writes the contents of the specified range of the - * virtual address space of the target task. [The - * range must be aligned on a virtual page boundary, - * and must be a multiple of pages in extent. The - * protection on the specified range must permit writing.] - */ -routine vm_write( - target_task : vm_map_t; - address : vm_address_t; - data : pointer_t); - -/* - * Copy the contents of the source range of the virtual - * address space of the target task to the destination - * range in that same address space. [Both of the - * ranges must be aligned on a virtual page boundary, - * and must be multiples of pages in extent. The - * protection on the source range must permit reading, - * and the protection on the destination range must - * permit writing.] - */ -routine vm_copy( - target_task : vm_map_t; - source_address : vm_address_t; - size : vm_size_t; - dest_address : vm_address_t); - -/* - * Returns the contents of the specified range of the - * virtual address space of the target task. [There - * are no alignment restrictions, and the results will - * overwrite the area pointed to by data - which must - * already exist. The protection on the specified range - * must permit reading.] - */ -routine vm_read_overwrite( - target_task : vm_map_t; - address : vm_address_t; - size : vm_size_t; - data : vm_address_t; - out outsize : vm_size_t); - - -routine vm_msync( - target_task : vm_map_t; - address : vm_address_t; - size : vm_size_t; - sync_flags : vm_sync_t ); - -/* - * Set the paging behavior attribute for the specified range - * of the virtual address space of the target task. - * The behavior value is one of {default, random, forward - * sequential, reverse sequential} and indicates the expected - * page reference pattern for the specified range. - */ -routine vm_behavior_set( - target_task : vm_map_t; - address : vm_address_t; - size : vm_size_t; - new_behavior : vm_behavior_t); - - -/* - * Map a user-defined memory object into the virtual address - * space of the target task. If desired (anywhere is TRUE), - * the kernel will find a suitable address range of the - * specified size; else, the specific address will be allocated. - * - * The beginning address of the range will be aligned on a virtual - * page boundary, be at or beyond the address specified, and - * meet the mask requirements (bits turned on in the mask must not - * be turned on in the result); the size of the range, in bytes, - * will be rounded up to an integral number of virtual pages. - * - * The memory in the resulting range will be associated with the - * specified memory object, with the beginning of the memory range - * referring to the specified offset into the memory object. - * - * The mapping will take the current and maximum protections and - * the inheritance attributes specified; see the vm_protect and - * vm_inherit calls for a description of these attributes. - * - * If desired (copy is TRUE), the memory range will be filled - * with a copy of the data from the memory object; this copy will - * be private to this mapping in this target task. Otherwise, - * the memory in this mapping will be shared with other mappings - * of the same memory object at the same offset (in this task or - * in other tasks). [The Mach kernel only enforces shared memory - * consistency among mappings on one host with similar page alignments. - * The user-defined memory manager for this object is responsible - * for further consistency.] - */ -routine vm_map( - target_task : vm_task_entry_t; - inout address : vm_address_t; - size : vm_size_t; - mask : vm_address_t; - flags : int; - object : mem_entry_name_port_t; - offset : vm_offset_t; - copy : boolean_t; - cur_protection : vm_prot_t; - max_protection : vm_prot_t; - inheritance : vm_inherit_t); - -/* - * Set/Get special properties of memory associated - * to some virtual address range, such as cachability, - * migrability, replicability. Machine-dependent. - */ -routine vm_machine_attribute( - target_task : vm_map_t; - address : vm_address_t; - size : vm_size_t; - attribute : vm_machine_attribute_t; - inout value : vm_machine_attribute_val_t); - -/* - * Map portion of a task's address space. - */ -routine vm_remap( - target_task : vm_map_t; - inout target_address : vm_address_t; - size : vm_size_t; - mask : vm_address_t; - anywhere : boolean_t; - src_task : vm_map_t; - src_address : vm_address_t; - copy : boolean_t; - out cur_protection : vm_prot_t; - out max_protection : vm_prot_t; - inheritance : vm_inherit_t); - -/* - * Require that all future virtual memory allocation - * allocates wired memory. Setting must_wire to FALSE - * disables the wired future feature. - */ -routine task_wire( - target_task : vm_map_t; - must_wire : boolean_t); - - -/* - * Allow application level processes to create named entries which - * correspond to mapped portions of their address space. These named - * entries can then be manipulated, shared with other processes in - * other address spaces and ultimately mapped in ohter address spaces - */ - -routine mach_make_memory_entry( - target_task :vm_map_t; - inout size :vm_size_t; - offset :vm_offset_t; - permission :vm_prot_t; - out object_handle :mem_entry_name_port_move_send_t; - parent_entry :mem_entry_name_port_t); - -/* - * Give the caller information on the given location in a virtual - * address space. If a page is mapped return ref and dirty info. - */ -routine vm_map_page_query( - target_map :vm_map_t; - offset :vm_offset_t; - out disposition :integer_t; - out ref_count :integer_t); - -/* - * Returns information about a region of memory. - * Includes info about the chain of objects rooted at that region. - * Only available in MACH_VM_DEBUG compiled kernels, - * otherwise returns KERN_FAILURE. - */ -routine mach_vm_region_info( - task : vm_map_t; - address : vm_address_t; - out region : vm_info_region_t; - out objects : vm_info_object_array_t); - -routine vm_mapped_pages_info( - task : vm_map_t; - out pages : page_address_array_t); - -#if 0 -/* - * Allow application level processes to create named entries which - * are backed by sub-maps which describe regions of address space. - * These regions of space can have objects mapped into them and - * in turn, can be mapped into target address spaces - */ - -routine vm_region_object_create( - target_task :vm_map_t; - in size :vm_size_t; - out region_object :mach_port_move_send_t); -#else -skip; /* was vm_region_object_create */ -#endif - -/* - * A recursive form of vm_region which probes submaps withint the - * address space. - */ -routine vm_region_recurse( - target_task : vm_map_t; - inout address : vm_address_t; - out size : vm_size_t; - inout nesting_depth : natural_t; - out info : vm_region_recurse_info_t,CountInOut); - - -/* - * The routines below are temporary, meant for transitional use - * as their counterparts are moved from 32 to 64 bit data path - */ - - -routine vm_region_recurse_64( - target_task : vm_map_t; - inout address : vm_address_t; - out size : vm_size_t; - inout nesting_depth : natural_t; - out info : vm_region_recurse_info_t,CountInOut); - -routine mach_vm_region_info_64( - task : vm_map_t; - address : vm_address_t; - out region : vm_info_region_64_t; - out objects : vm_info_object_array_t); - -routine vm_region_64( - target_task : vm_map_t; - inout address : vm_address_t; - out size : vm_size_t; - flavor : vm_region_flavor_t; - out info : vm_region_info_t, CountInOut; - out object_name : memory_object_name_t = - MACH_MSG_TYPE_MOVE_SEND - ctype: mach_port_t); - -routine mach_make_memory_entry_64( - target_task :vm_map_t; - inout size :memory_object_size_t; - offset :memory_object_offset_t; - permission :vm_prot_t; - out object_handle :mach_port_move_send_t; - parent_entry :mem_entry_name_port_t); - - - -routine vm_map_64( - target_task : vm_task_entry_t; - inout address : vm_address_t; - size : vm_size_t; - mask : vm_address_t; - flags : int; - object : mem_entry_name_port_t; - offset : memory_object_offset_t; - copy : boolean_t; - cur_protection : vm_prot_t; - max_protection : vm_prot_t; - inheritance : vm_inherit_t); - -#if 0 -/* - * The UPL interfaces are not ready for user-level export. - */ -routine vm_map_get_upl( - target_task : vm_map_t; - address : vm_map_offset_t; - inout size : vm_size_t; - out upl : upl_t; - out page_info : upl_page_info_array_t, CountInOut; - inout flags : integer_t; - force_data_sync : integer_t); - -routine vm_upl_map( - target_task : vm_map_t; - upl : upl_t; - inout address : vm_address_t); - -routine vm_upl_unmap( - target_task : vm_map_t; - upl : upl_t); -#else -skip; /* was vm_map_get_upl */ -skip; /* was vm_upl_map */ -skip; /* was vm_upl_unmap */ -#endif - -/* - * Control behavior and investigate state of a "purgable" object in - * the virtual address space of the target task. A purgable object is - * created via a call to vm_allocate() with VM_FLAGS_PURGABLE - * specified. See the routine implementation for a complete - * definition of the routine. - */ -routine vm_purgable_control( - target_task : vm_map_t; - address : vm_address_t; - control : vm_purgable_t; - inout state : int); - -/* vim: set ft=c : */ diff --git a/i386/include/mach/vm_map.h b/i386/include/mach/vm_map.h deleted file mode 100644 index 1ed28fb..0000000 --- a/i386/include/mach/vm_map.h +++ /dev/null @@ -1,1378 +0,0 @@ -#ifndef _vm_map_user_ -#define _vm_map_user_ - -/* Module vm_map */ - -#include <string.h> -#include <mach/ndr.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/notify.h> -#include <mach/mach_types.h> -#include <mach/message.h> -#include <mach/mig_errors.h> -#include <mach/port.h> - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef vm_map_MSG_COUNT -#define vm_map_MSG_COUNT 31 -#endif /* vm_map_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mach_types.h> -#include <mach_debug/mach_debug_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine vm_region */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_region -( - vm_map_t target_task, - vm_address_t *address, - vm_size_t *size, - vm_region_flavor_t flavor, - vm_region_info_t info, - mach_msg_type_number_t *infoCnt, - mach_port_t *object_name -); - -/* Routine vm_allocate */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_allocate -( - vm_map_t target_task, - vm_address_t *address, - vm_size_t size, - int flags -); - -/* Routine vm_deallocate */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_deallocate -( - vm_map_t target_task, - vm_address_t address, - vm_size_t size -); - -/* Routine vm_protect */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_protect -( - vm_map_t target_task, - vm_address_t address, - vm_size_t size, - boolean_t set_maximum, - vm_prot_t new_protection -); - -/* Routine vm_inherit */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_inherit -( - vm_map_t target_task, - vm_address_t address, - vm_size_t size, - vm_inherit_t new_inheritance -); - -/* Routine vm_read */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_read -( - vm_map_t target_task, - vm_address_t address, - vm_size_t size, - vm_offset_t *data, - mach_msg_type_number_t *dataCnt -); - -/* Routine vm_read_list */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_read_list -( - vm_map_t target_task, - vm_read_entry_t data_list, - natural_t count -); - -/* Routine vm_write */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_write -( - vm_map_t target_task, - vm_address_t address, - vm_offset_t data, - mach_msg_type_number_t dataCnt -); - -/* Routine vm_copy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_copy -( - vm_map_t target_task, - vm_address_t source_address, - vm_size_t size, - vm_address_t dest_address -); - -/* Routine vm_read_overwrite */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_read_overwrite -( - vm_map_t target_task, - vm_address_t address, - vm_size_t size, - vm_address_t data, - vm_size_t *outsize -); - -/* Routine vm_msync */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_msync -( - vm_map_t target_task, - vm_address_t address, - vm_size_t size, - vm_sync_t sync_flags -); - -/* Routine vm_behavior_set */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_behavior_set -( - vm_map_t target_task, - vm_address_t address, - vm_size_t size, - vm_behavior_t new_behavior -); - -/* Routine vm_map */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_map -( - vm_map_t target_task, - vm_address_t *address, - vm_size_t size, - vm_address_t mask, - int flags, - mem_entry_name_port_t object, - vm_offset_t offset, - boolean_t copy, - vm_prot_t cur_protection, - vm_prot_t max_protection, - vm_inherit_t inheritance -); - -/* Routine vm_machine_attribute */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_machine_attribute -( - vm_map_t target_task, - vm_address_t address, - vm_size_t size, - vm_machine_attribute_t attribute, - vm_machine_attribute_val_t *value -); - -/* Routine vm_remap */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_remap -( - vm_map_t target_task, - vm_address_t *target_address, - vm_size_t size, - vm_address_t mask, - boolean_t anywhere, - vm_map_t src_task, - vm_address_t src_address, - boolean_t copy, - vm_prot_t *cur_protection, - vm_prot_t *max_protection, - vm_inherit_t inheritance -); - -/* Routine task_wire */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t task_wire -( - vm_map_t target_task, - boolean_t must_wire -); - -/* Routine mach_make_memory_entry */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_make_memory_entry -( - vm_map_t target_task, - vm_size_t *size, - vm_offset_t offset, - vm_prot_t permission, - mem_entry_name_port_t *object_handle, - mem_entry_name_port_t parent_entry -); - -/* Routine vm_map_page_query */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_map_page_query -( - vm_map_t target_map, - vm_offset_t offset, - integer_t *disposition, - integer_t *ref_count -); - -/* Routine mach_vm_region_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_region_info -( - vm_map_t task, - vm_address_t address, - vm_info_region_t *region, - vm_info_object_array_t *objects, - mach_msg_type_number_t *objectsCnt -); - -/* Routine vm_mapped_pages_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_mapped_pages_info -( - vm_map_t task, - page_address_array_t *pages, - mach_msg_type_number_t *pagesCnt -); - -/* Routine vm_region_recurse */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_region_recurse -( - vm_map_t target_task, - vm_address_t *address, - vm_size_t *size, - natural_t *nesting_depth, - vm_region_recurse_info_t info, - mach_msg_type_number_t *infoCnt -); - -/* Routine vm_region_recurse_64 */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_region_recurse_64 -( - vm_map_t target_task, - vm_address_t *address, - vm_size_t *size, - natural_t *nesting_depth, - vm_region_recurse_info_t info, - mach_msg_type_number_t *infoCnt -); - -/* Routine mach_vm_region_info_64 */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_region_info_64 -( - vm_map_t task, - vm_address_t address, - vm_info_region_64_t *region, - vm_info_object_array_t *objects, - mach_msg_type_number_t *objectsCnt -); - -/* Routine vm_region_64 */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_region_64 -( - vm_map_t target_task, - vm_address_t *address, - vm_size_t *size, - vm_region_flavor_t flavor, - vm_region_info_t info, - mach_msg_type_number_t *infoCnt, - mach_port_t *object_name -); - -/* Routine mach_make_memory_entry_64 */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_make_memory_entry_64 -( - vm_map_t target_task, - memory_object_size_t *size, - memory_object_offset_t offset, - vm_prot_t permission, - mach_port_t *object_handle, - mem_entry_name_port_t parent_entry -); - -/* Routine vm_map_64 */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_map_64 -( - vm_map_t target_task, - vm_address_t *address, - vm_size_t size, - vm_address_t mask, - int flags, - mem_entry_name_port_t object, - memory_object_offset_t offset, - boolean_t copy, - vm_prot_t cur_protection, - vm_prot_t max_protection, - vm_inherit_t inheritance -); - -/* Routine vm_purgable_control */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_purgable_control -( - vm_map_t target_task, - vm_address_t address, - vm_purgable_t control, - int *state -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__vm_map_subsystem__defined -#define __Request__vm_map_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - vm_region_flavor_t flavor; - mach_msg_type_number_t infoCnt; - } __Request__vm_region_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - int flags; - } __Request__vm_allocate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - } __Request__vm_deallocate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - boolean_t set_maximum; - vm_prot_t new_protection; - } __Request__vm_protect_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - vm_inherit_t new_inheritance; - } __Request__vm_inherit_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - } __Request__vm_read_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_read_entry_t data_list; - natural_t count; - } __Request__vm_read_list_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t data; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_address_t address; - mach_msg_type_number_t dataCnt; - } __Request__vm_write_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t source_address; - vm_size_t size; - vm_address_t dest_address; - } __Request__vm_copy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - vm_address_t data; - } __Request__vm_read_overwrite_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - vm_sync_t sync_flags; - } __Request__vm_msync_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - vm_behavior_t new_behavior; - } __Request__vm_behavior_set_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t object; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - vm_address_t mask; - int flags; - vm_offset_t offset; - boolean_t copy; - vm_prot_t cur_protection; - vm_prot_t max_protection; - vm_inherit_t inheritance; - } __Request__vm_map_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - vm_machine_attribute_t attribute; - vm_machine_attribute_val_t value; - } __Request__vm_machine_attribute_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t src_task; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_address_t target_address; - vm_size_t size; - vm_address_t mask; - boolean_t anywhere; - vm_address_t src_address; - boolean_t copy; - vm_inherit_t inheritance; - } __Request__vm_remap_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - boolean_t must_wire; - } __Request__task_wire_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t parent_entry; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_size_t size; - vm_offset_t offset; - vm_prot_t permission; - } __Request__mach_make_memory_entry_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_offset_t offset; - } __Request__vm_map_page_query_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - } __Request__mach_vm_region_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__vm_mapped_pages_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - natural_t nesting_depth; - mach_msg_type_number_t infoCnt; - } __Request__vm_region_recurse_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - natural_t nesting_depth; - mach_msg_type_number_t infoCnt; - } __Request__vm_region_recurse_64_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - } __Request__mach_vm_region_info_64_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - vm_region_flavor_t flavor; - mach_msg_type_number_t infoCnt; - } __Request__vm_region_64_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t parent_entry; - /* end of the kernel processed data */ - NDR_record_t NDR; - memory_object_size_t size; - memory_object_offset_t offset; - vm_prot_t permission; - } __Request__mach_make_memory_entry_64_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t object; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - vm_address_t mask; - int flags; - memory_object_offset_t offset; - boolean_t copy; - vm_prot_t cur_protection; - vm_prot_t max_protection; - vm_inherit_t inheritance; - } __Request__vm_map_64_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - vm_purgable_t control; - int state; - } __Request__vm_purgable_control_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__vm_map_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__vm_map_subsystem__defined -#define __RequestUnion__vm_map_subsystem__defined -union __RequestUnion__vm_map_subsystem { - __Request__vm_region_t Request_vm_region; - __Request__vm_allocate_t Request_vm_allocate; - __Request__vm_deallocate_t Request_vm_deallocate; - __Request__vm_protect_t Request_vm_protect; - __Request__vm_inherit_t Request_vm_inherit; - __Request__vm_read_t Request_vm_read; - __Request__vm_read_list_t Request_vm_read_list; - __Request__vm_write_t Request_vm_write; - __Request__vm_copy_t Request_vm_copy; - __Request__vm_read_overwrite_t Request_vm_read_overwrite; - __Request__vm_msync_t Request_vm_msync; - __Request__vm_behavior_set_t Request_vm_behavior_set; - __Request__vm_map_t Request_vm_map; - __Request__vm_machine_attribute_t Request_vm_machine_attribute; - __Request__vm_remap_t Request_vm_remap; - __Request__task_wire_t Request_task_wire; - __Request__mach_make_memory_entry_t Request_mach_make_memory_entry; - __Request__vm_map_page_query_t Request_vm_map_page_query; - __Request__mach_vm_region_info_t Request_mach_vm_region_info; - __Request__vm_mapped_pages_info_t Request_vm_mapped_pages_info; - __Request__vm_region_recurse_t Request_vm_region_recurse; - __Request__vm_region_recurse_64_t Request_vm_region_recurse_64; - __Request__mach_vm_region_info_64_t Request_mach_vm_region_info_64; - __Request__vm_region_64_t Request_vm_region_64; - __Request__mach_make_memory_entry_64_t Request_mach_make_memory_entry_64; - __Request__vm_map_64_t Request_vm_map_64; - __Request__vm_purgable_control_t Request_vm_purgable_control; -}; -#endif /* !__RequestUnion__vm_map_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__vm_map_subsystem__defined -#define __Reply__vm_map_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t object_name; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - mach_msg_type_number_t infoCnt; - int info[10]; - } __Reply__vm_region_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - vm_address_t address; - } __Reply__vm_allocate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__vm_deallocate_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__vm_protect_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__vm_inherit_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t data; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t dataCnt; - } __Reply__vm_read_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - vm_read_entry_t data_list; - } __Reply__vm_read_list_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__vm_write_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__vm_copy_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - vm_size_t outsize; - } __Reply__vm_read_overwrite_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__vm_msync_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__vm_behavior_set_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - vm_address_t address; - } __Reply__vm_map_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - vm_machine_attribute_val_t value; - } __Reply__vm_machine_attribute_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - vm_address_t target_address; - vm_prot_t cur_protection; - vm_prot_t max_protection; - } __Reply__vm_remap_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__task_wire_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t object_handle; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_size_t size; - } __Reply__mach_make_memory_entry_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - integer_t disposition; - integer_t ref_count; - } __Reply__vm_map_page_query_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t objects; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_info_region_t region; - mach_msg_type_number_t objectsCnt; - } __Reply__mach_vm_region_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t pages; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t pagesCnt; - } __Reply__vm_mapped_pages_info_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - vm_address_t address; - vm_size_t size; - natural_t nesting_depth; - mach_msg_type_number_t infoCnt; - int info[19]; - } __Reply__vm_region_recurse_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - vm_address_t address; - vm_size_t size; - natural_t nesting_depth; - mach_msg_type_number_t infoCnt; - int info[19]; - } __Reply__vm_region_recurse_64_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_ool_descriptor_t objects; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_info_region_64_t region; - mach_msg_type_number_t objectsCnt; - } __Reply__mach_vm_region_info_64_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t object_name; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - mach_msg_type_number_t infoCnt; - int info[10]; - } __Reply__vm_region_64_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t object_handle; - /* end of the kernel processed data */ - NDR_record_t NDR; - memory_object_size_t size; - } __Reply__mach_make_memory_entry_64_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - vm_address_t address; - } __Reply__vm_map_64_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int state; - } __Reply__vm_purgable_control_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__vm_map_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__vm_map_subsystem__defined -#define __ReplyUnion__vm_map_subsystem__defined -union __ReplyUnion__vm_map_subsystem { - __Reply__vm_region_t Reply_vm_region; - __Reply__vm_allocate_t Reply_vm_allocate; - __Reply__vm_deallocate_t Reply_vm_deallocate; - __Reply__vm_protect_t Reply_vm_protect; - __Reply__vm_inherit_t Reply_vm_inherit; - __Reply__vm_read_t Reply_vm_read; - __Reply__vm_read_list_t Reply_vm_read_list; - __Reply__vm_write_t Reply_vm_write; - __Reply__vm_copy_t Reply_vm_copy; - __Reply__vm_read_overwrite_t Reply_vm_read_overwrite; - __Reply__vm_msync_t Reply_vm_msync; - __Reply__vm_behavior_set_t Reply_vm_behavior_set; - __Reply__vm_map_t Reply_vm_map; - __Reply__vm_machine_attribute_t Reply_vm_machine_attribute; - __Reply__vm_remap_t Reply_vm_remap; - __Reply__task_wire_t Reply_task_wire; - __Reply__mach_make_memory_entry_t Reply_mach_make_memory_entry; - __Reply__vm_map_page_query_t Reply_vm_map_page_query; - __Reply__mach_vm_region_info_t Reply_mach_vm_region_info; - __Reply__vm_mapped_pages_info_t Reply_vm_mapped_pages_info; - __Reply__vm_region_recurse_t Reply_vm_region_recurse; - __Reply__vm_region_recurse_64_t Reply_vm_region_recurse_64; - __Reply__mach_vm_region_info_64_t Reply_mach_vm_region_info_64; - __Reply__vm_region_64_t Reply_vm_region_64; - __Reply__mach_make_memory_entry_64_t Reply_mach_make_memory_entry_64; - __Reply__vm_map_64_t Reply_vm_map_64; - __Reply__vm_purgable_control_t Reply_vm_purgable_control; -}; -#endif /* !__RequestUnion__vm_map_subsystem__defined */ - -#ifndef subsystem_to_name_map_vm_map -#define subsystem_to_name_map_vm_map \ - { "vm_region", 3800 },\ - { "vm_allocate", 3801 },\ - { "vm_deallocate", 3802 },\ - { "vm_protect", 3803 },\ - { "vm_inherit", 3804 },\ - { "vm_read", 3805 },\ - { "vm_read_list", 3806 },\ - { "vm_write", 3807 },\ - { "vm_copy", 3808 },\ - { "vm_read_overwrite", 3809 },\ - { "vm_msync", 3810 },\ - { "vm_behavior_set", 3811 },\ - { "vm_map", 3812 },\ - { "vm_machine_attribute", 3813 },\ - { "vm_remap", 3814 },\ - { "task_wire", 3815 },\ - { "mach_make_memory_entry", 3816 },\ - { "vm_map_page_query", 3817 },\ - { "mach_vm_region_info", 3818 },\ - { "vm_mapped_pages_info", 3819 },\ - { "vm_region_recurse", 3821 },\ - { "vm_region_recurse_64", 3822 },\ - { "mach_vm_region_info_64", 3823 },\ - { "vm_region_64", 3824 },\ - { "mach_make_memory_entry_64", 3825 },\ - { "vm_map_64", 3826 },\ - { "vm_purgable_control", 3830 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _vm_map_user_ */ diff --git a/i386/include/mach/vm_param.h b/i386/include/mach/vm_param.h deleted file mode 100644 index 9a87873..0000000 --- a/i386/include/mach/vm_param.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/vm_param.h - * Author: Avadis Tevanian, Jr., Michael Wayne Young - * Date: 1985 - * - * Machine independent virtual memory parameters. - * - */ - -#ifndef _MACH_VM_PARAM_H_ -#define _MACH_VM_PARAM_H_ - -#include <mach/machine/vm_param.h> - - -#endif /* _MACH_VM_PARAM_H_ */ diff --git a/i386/include/mach/vm_prot.h b/i386/include/mach/vm_prot.h deleted file mode 100644 index 6fe17d4..0000000 --- a/i386/include/mach/vm_prot.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/vm_prot.h - * Author: Avadis Tevanian, Jr., Michael Wayne Young - * - * Virtual memory protection definitions. - * - */ - -#ifndef _MACH_VM_PROT_H_ -#define _MACH_VM_PROT_H_ - -/* - * Types defined: - * - * vm_prot_t VM protection values. - */ - -typedef int vm_prot_t; - -/* - * Protection values, defined as bits within the vm_prot_t type - */ - -#define VM_PROT_NONE ((vm_prot_t) 0x00) - -#define VM_PROT_READ ((vm_prot_t) 0x01) /* read permission */ -#define VM_PROT_WRITE ((vm_prot_t) 0x02) /* write permission */ -#define VM_PROT_EXECUTE ((vm_prot_t) 0x04) /* execute permission */ - -/* - * The default protection for newly-created virtual memory - */ - -#define VM_PROT_DEFAULT (VM_PROT_READ|VM_PROT_WRITE) - -/* - * The maximum privileges possible, for parameter checking. - */ - -#define VM_PROT_ALL (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE) - -/* - * An invalid protection value. - * Used only by memory_object_lock_request to indicate no change - * to page locks. Using -1 here is a bad idea because it - * looks like VM_PROT_ALL and then some. - */ - -#define VM_PROT_NO_CHANGE ((vm_prot_t) 0x08) - -/* - * When a caller finds that he cannot obtain write permission on a - * mapped entry, the following flag can be used. The entry will - * be made "needs copy" effectively copying the object (using COW), - * and write permission will be added to the maximum protections - * for the associated entry. - */ - -#define VM_PROT_COPY ((vm_prot_t) 0x10) - - -/* - * Another invalid protection value. - * Used only by memory_object_data_request upon an object - * which has specified a copy_call copy strategy. It is used - * when the kernel wants a page belonging to a copy of the - * object, and is only asking the object as a result of - * following a shadow chain. This solves the race between pages - * being pushed up by the memory manager and the kernel - * walking down the shadow chain. - */ - -#define VM_PROT_WANTS_COPY ((vm_prot_t) 0x10) - - -/* - * The caller wants this memory region treated as if it had a valid - * code signature. - */ - -#define VM_PROT_TRUSTED ((vm_prot_t) 0x20) - - -#endif /* _MACH_VM_PROT_H_ */ diff --git a/i386/include/mach/vm_purgable.h b/i386/include/mach/vm_purgable.h deleted file mode 100644 index 2d8ca30..0000000 --- a/i386/include/mach/vm_purgable.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2003-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -/* - * Virtual memory map purgeable object definitions. - * Objects that will be needed in the future (forward cached objects) should be queued LIFO. - * Objects that have been used and are cached for reuse (backward cached) should be queued FIFO. - * Every user of purgeable memory is entitled to using the highest volatile group (7). - * Only if a client wants some of its objects to definitely be purged earlier, it can put those in - * another group. This could be used to make all FIFO objects (in the lower group) go away before - * any LIFO objects (in the higher group) go away. - * Objects that should not get any chance to stay around can be marked as "obsolete". They will - * be emptied before any other objects or pages are reclaimed. Obsolete objects are not emptied - * in any particular order. - * 'purgeable' is recognized as the correct spelling. For historical reasons, definitions - * in this file are spelled 'purgable'. - */ - -#ifndef _MACH_VM_PURGABLE_H_ -#define _MACH_VM_PURGABLE_H_ - -/* - * Types defined: - * - * vm_purgable_t purgeable object control codes. - */ - -typedef int vm_purgable_t; - -/* - * Enumeration of valid values for vm_purgable_t. - */ -#define VM_PURGABLE_SET_STATE ((vm_purgable_t) 0) /* set state of purgeable object */ -#define VM_PURGABLE_GET_STATE ((vm_purgable_t) 1) /* get state of purgeable object */ -#define VM_PURGABLE_PURGE_ALL ((vm_purgable_t) 2) /* purge all volatile objects now */ - -#define VM_PURGABLE_DEBUG_SHIFT 12 -#define VM_PURGABLE_DEBUG_MASK (0x3 << VM_PURGABLE_DEBUG_SHIFT) -#define VM_PURGABLE_DEBUG_EMPTY (0x1 << VM_PURGABLE_DEBUG_SHIFT) -#define VM_PURGABLE_DEBUG_FAULT (0x2 << VM_PURGABLE_DEBUG_SHIFT) - -/* - * Volatile memory ordering groups (group zero objects are purged before group 1, etc... - * It is implementation dependent as to whether these groups are global or per-address space. - * (for the moment, they are global). - */ -#define VM_VOLATILE_GROUP_SHIFT 8 -#define VM_VOLATILE_GROUP_MASK (7 << VM_VOLATILE_GROUP_SHIFT) -#define VM_VOLATILE_GROUP_DEFAULT VM_VOLATILE_GROUP_7 - -#define VM_VOLATILE_GROUP_0 (0 << VM_VOLATILE_GROUP_SHIFT) -#define VM_VOLATILE_GROUP_1 (1 << VM_VOLATILE_GROUP_SHIFT) -#define VM_VOLATILE_GROUP_2 (2 << VM_VOLATILE_GROUP_SHIFT) -#define VM_VOLATILE_GROUP_3 (3 << VM_VOLATILE_GROUP_SHIFT) -#define VM_VOLATILE_GROUP_4 (4 << VM_VOLATILE_GROUP_SHIFT) -#define VM_VOLATILE_GROUP_5 (5 << VM_VOLATILE_GROUP_SHIFT) -#define VM_VOLATILE_GROUP_6 (6 << VM_VOLATILE_GROUP_SHIFT) -#define VM_VOLATILE_GROUP_7 (7 << VM_VOLATILE_GROUP_SHIFT) - -/* - * Purgeable behavior - * Within the same group, FIFO objects will be emptied before objects that are added later. - * LIFO objects will be emptied after objects that are added later. - * - Input only, not returned on state queries. - */ -#define VM_PURGABLE_BEHAVIOR_SHIFT 6 -#define VM_PURGABLE_BEHAVIOR_MASK (1 << VM_PURGABLE_BEHAVIOR_SHIFT) -#define VM_PURGABLE_BEHAVIOR_FIFO (0 << VM_PURGABLE_BEHAVIOR_SHIFT) -#define VM_PURGABLE_BEHAVIOR_LIFO (1 << VM_PURGABLE_BEHAVIOR_SHIFT) - -/* - * Obsolete object. - * Disregard volatile group, and put object into obsolete queue instead, so it is the next object - * to be purged. - * - Input only, not returned on state queries. - */ -#define VM_PURGABLE_ORDERING_SHIFT 5 -#define VM_PURGABLE_ORDERING_MASK (1 << VM_PURGABLE_ORDERING_SHIFT) -#define VM_PURGABLE_ORDERING_OBSOLETE (1 << VM_PURGABLE_ORDERING_SHIFT) -#define VM_PURGABLE_ORDERING_NORMAL (0 << VM_PURGABLE_ORDERING_SHIFT) - - -/* - * Obsolete parameter - do not use - */ -#define VM_VOLATILE_ORDER_SHIFT 4 -#define VM_VOLATILE_ORDER_MASK (1 << VM_VOLATILE_ORDER_SHIFT) -#define VM_VOLATILE_MAKE_FIRST_IN_GROUP (1 << VM_VOLATILE_ORDER_SHIFT) -#define VM_VOLATILE_MAKE_LAST_IN_GROUP (0 << VM_VOLATILE_ORDER_SHIFT) - -/* - * Valid states of a purgeable object. - */ -#define VM_PURGABLE_STATE_MIN 0 /* minimum purgeable object state value */ -#define VM_PURGABLE_STATE_MAX 3 /* maximum purgeable object state value */ -#define VM_PURGABLE_STATE_MASK 3 /* mask to separate state from group */ - -#define VM_PURGABLE_NONVOLATILE 0 /* purgeable object is non-volatile */ -#define VM_PURGABLE_VOLATILE 1 /* purgeable object is volatile */ -#define VM_PURGABLE_EMPTY 2 /* purgeable object is volatile and empty */ -#define VM_PURGABLE_DENY 3 /* (mark) object not purgeable */ - -#define VM_PURGABLE_ALL_MASKS (VM_PURGABLE_STATE_MASK | \ - VM_VOLATILE_ORDER_MASK | \ - VM_PURGABLE_ORDERING_MASK | \ - VM_PURGABLE_BEHAVIOR_MASK | \ - VM_VOLATILE_GROUP_MASK | \ - VM_PURGABLE_DEBUG_MASK) -#endif /* _MACH_VM_PURGABLE_H_ */ diff --git a/i386/include/mach/vm_region.h b/i386/include/mach/vm_region.h deleted file mode 100644 index ceb42b7..0000000 --- a/i386/include/mach/vm_region.h +++ /dev/null @@ -1,320 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * File: mach/vm_region.h - * - * Define the attributes of a task's memory region - * - */ - -#ifndef _MACH_VM_REGION_H_ -#define _MACH_VM_REGION_H_ - -#include <mach/boolean.h> -#include <mach/vm_prot.h> -#include <mach/vm_inherit.h> -#include <mach/vm_behavior.h> -#include <mach/vm_types.h> -#include <mach/message.h> -#include <mach/machine/vm_param.h> -#include <mach/machine/vm_types.h> -#include <mach/memory_object_types.h> - -#include <sys/cdefs.h> - -#pragma pack(4) - -// LP64todo: all the current tools are 32bit, obviously never worked for 64b -// so probably should be a real 32b ID vs. ptr. -// Current users just check for equality -typedef uint32_t vm32_object_id_t; - -/* - * Types defined: - * - * vm_region_info_t memory region attributes - */ - -#define VM_REGION_INFO_MAX (1024) -typedef int *vm_region_info_t; -typedef int *vm_region_info_64_t; -typedef int *vm_region_recurse_info_t; -typedef int *vm_region_recurse_info_64_t; -typedef int vm_region_flavor_t; -typedef int vm_region_info_data_t[VM_REGION_INFO_MAX]; - -#define VM_REGION_BASIC_INFO_64 9 -struct vm_region_basic_info_64 { - vm_prot_t protection; - vm_prot_t max_protection; - vm_inherit_t inheritance; - boolean_t shared; - boolean_t reserved; - memory_object_offset_t offset; - vm_behavior_t behavior; - unsigned short user_wired_count; -}; -typedef struct vm_region_basic_info_64 *vm_region_basic_info_64_t; -typedef struct vm_region_basic_info_64 vm_region_basic_info_data_64_t; - -#define VM_REGION_BASIC_INFO_COUNT_64 ((mach_msg_type_number_t) \ - (sizeof(vm_region_basic_info_data_64_t)/sizeof(int))) - -/* - * Passing VM_REGION_BASIC_INFO to vm_region_64 - * automatically converts it to a VM_REGION_BASIC_INFO_64. - * Please use that explicitly instead. - */ -#define VM_REGION_BASIC_INFO 10 - -/* - * This is the legacy basic info structure. It is - * deprecated because it passes only a 32-bit memory object - * offset back - too small for many larger objects (e.g. files). - */ -struct vm_region_basic_info { - vm_prot_t protection; - vm_prot_t max_protection; - vm_inherit_t inheritance; - boolean_t shared; - boolean_t reserved; - uint32_t offset; /* too small for a real offset */ - vm_behavior_t behavior; - unsigned short user_wired_count; -}; - -typedef struct vm_region_basic_info *vm_region_basic_info_t; -typedef struct vm_region_basic_info vm_region_basic_info_data_t; - -#define VM_REGION_BASIC_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(vm_region_basic_info_data_t)/sizeof(int))) - -#define VM_REGION_EXTENDED_INFO 11 - -#define SM_COW 1 -#define SM_PRIVATE 2 -#define SM_EMPTY 3 -#define SM_SHARED 4 -#define SM_TRUESHARED 5 -#define SM_PRIVATE_ALIASED 6 -#define SM_SHARED_ALIASED 7 - -/* - * For submap info, the SM flags above are overlayed when a submap - * is encountered. The field denotes whether or not machine level mapping - * information is being shared. PTE's etc. When such sharing is taking - * place the value returned is SM_TRUESHARED otherwise SM_PRIVATE is passed - * back. - */ - -struct vm_region_extended_info { - vm_prot_t protection; - unsigned int user_tag; - unsigned int pages_resident; - unsigned int pages_shared_now_private; - unsigned int pages_swapped_out; - unsigned int pages_dirtied; - unsigned int ref_count; - unsigned short shadow_depth; - unsigned char external_pager; - unsigned char share_mode; -}; - -typedef struct vm_region_extended_info *vm_region_extended_info_t; -typedef struct vm_region_extended_info vm_region_extended_info_data_t; - -#define VM_REGION_EXTENDED_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(vm_region_extended_info_data_t)/sizeof(int))) - - -#define VM_REGION_TOP_INFO 12 - -struct vm_region_top_info { - unsigned int obj_id; - unsigned int ref_count; - unsigned int private_pages_resident; - unsigned int shared_pages_resident; - unsigned char share_mode; -}; - -typedef struct vm_region_top_info *vm_region_top_info_t; -typedef struct vm_region_top_info vm_region_top_info_data_t; - -#define VM_REGION_TOP_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(vm_region_top_info_data_t)/sizeof(int))) - - - -/* - * vm_region_submap_info will return information on a submap or object. - * The user supplies a nesting level on the call. When a walk of the - * user's map is done and a submap is encountered, the nesting count is - * checked. If the nesting count is greater than 1 the submap is entered and - * the offset relative to the address in the base map is examined. If the - * nesting count is zero, the information on the submap is returned. - * The caller may thus learn about a submap and its contents by judicious - * choice of the base map address and nesting count. The nesting count - * allows penetration of recursively mapped submaps. If a submap is - * encountered as a mapped entry of another submap, the caller may bump - * the nesting count and call vm_region_recurse again on the target address - * range. The "is_submap" field tells the caller whether or not a submap - * has been encountered. - * - * Object only fields are filled in through a walking of the object shadow - * chain (where one is present), and a walking of the resident page queue. - * - */ - -struct vm_region_submap_info { - vm_prot_t protection; /* present access protection */ - vm_prot_t max_protection; /* max avail through vm_prot */ - vm_inherit_t inheritance;/* behavior of map/obj on fork */ - uint32_t offset; /* offset into object/map */ - unsigned int user_tag; /* user tag on map entry */ - unsigned int pages_resident; /* only valid for objects */ - unsigned int pages_shared_now_private; /* only for objects */ - unsigned int pages_swapped_out; /* only for objects */ - unsigned int pages_dirtied; /* only for objects */ - unsigned int ref_count; /* obj/map mappers, etc */ - unsigned short shadow_depth; /* only for obj */ - unsigned char external_pager; /* only for obj */ - unsigned char share_mode; /* see enumeration */ - boolean_t is_submap; /* submap vs obj */ - vm_behavior_t behavior; /* access behavior hint */ - vm32_object_id_t object_id; /* obj/map name, not a handle */ - unsigned short user_wired_count; -}; - -typedef struct vm_region_submap_info *vm_region_submap_info_t; -typedef struct vm_region_submap_info vm_region_submap_info_data_t; - -#define VM_REGION_SUBMAP_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(vm_region_submap_info_data_t)/sizeof(int))) - -struct vm_region_submap_info_64 { - vm_prot_t protection; /* present access protection */ - vm_prot_t max_protection; /* max avail through vm_prot */ - vm_inherit_t inheritance;/* behavior of map/obj on fork */ - memory_object_offset_t offset; /* offset into object/map */ - unsigned int user_tag; /* user tag on map entry */ - unsigned int pages_resident; /* only valid for objects */ - unsigned int pages_shared_now_private; /* only for objects */ - unsigned int pages_swapped_out; /* only for objects */ - unsigned int pages_dirtied; /* only for objects */ - unsigned int ref_count; /* obj/map mappers, etc */ - unsigned short shadow_depth; /* only for obj */ - unsigned char external_pager; /* only for obj */ - unsigned char share_mode; /* see enumeration */ - boolean_t is_submap; /* submap vs obj */ - vm_behavior_t behavior; /* access behavior hint */ - vm32_object_id_t object_id; /* obj/map name, not a handle */ - unsigned short user_wired_count; -}; - -typedef struct vm_region_submap_info_64 *vm_region_submap_info_64_t; -typedef struct vm_region_submap_info_64 vm_region_submap_info_data_64_t; - -#define VM_REGION_SUBMAP_INFO_COUNT_64 ((mach_msg_type_number_t) \ - (sizeof(vm_region_submap_info_data_64_t)/sizeof(int))) - -struct vm_region_submap_short_info_64 { - vm_prot_t protection; /* present access protection */ - vm_prot_t max_protection; /* max avail through vm_prot */ - vm_inherit_t inheritance;/* behavior of map/obj on fork */ - memory_object_offset_t offset; /* offset into object/map */ - unsigned int user_tag; /* user tag on map entry */ - unsigned int ref_count; /* obj/map mappers, etc */ - unsigned short shadow_depth; /* only for obj */ - unsigned char external_pager; /* only for obj */ - unsigned char share_mode; /* see enumeration */ - boolean_t is_submap; /* submap vs obj */ - vm_behavior_t behavior; /* access behavior hint */ - vm32_object_id_t object_id; /* obj/map name, not a handle */ - unsigned short user_wired_count; -}; - -typedef struct vm_region_submap_short_info_64 *vm_region_submap_short_info_64_t; -typedef struct vm_region_submap_short_info_64 vm_region_submap_short_info_data_64_t; - -#define VM_REGION_SUBMAP_SHORT_INFO_COUNT_64 ((mach_msg_type_number_t) \ - (sizeof(vm_region_submap_short_info_data_64_t)/sizeof(int))) - - -struct mach_vm_read_entry { - mach_vm_address_t address; - mach_vm_size_t size; -}; - -struct vm_read_entry { - vm_address_t address; - vm_size_t size; -}; - -#if VM32_SUPPORT -struct vm32_read_entry { - vm32_address_t address; - vm32_size_t size; -}; -#endif - - -#define VM_MAP_ENTRY_MAX (256) - -typedef struct mach_vm_read_entry mach_vm_read_entry_t[VM_MAP_ENTRY_MAX]; -typedef struct vm_read_entry vm_read_entry_t[VM_MAP_ENTRY_MAX]; -#if VM32_SUPPORT -typedef struct vm32_read_entry vm32_read_entry_t[VM_MAP_ENTRY_MAX]; -#endif - -#pragma pack() - - -#define VM_PAGE_INFO_MAX -typedef int *vm_page_info_t; -typedef int vm_page_info_data_t[VM_PAGE_INFO_MAX]; -typedef int vm_page_info_flavor_t; - -#define VM_PAGE_INFO_BASIC 1 -struct vm_page_info_basic { - int disposition; - int ref_count; - vm_object_id_t object_id; - memory_object_offset_t offset; - int depth; -}; -typedef struct vm_page_info_basic *vm_page_info_basic_t; -typedef struct vm_page_info_basic vm_page_info_basic_data_t; - -#define VM_PAGE_INFO_BASIC_COUNT ((mach_msg_type_number_t) \ - (sizeof(vm_page_info_basic_data_t)/sizeof(int))) - - -#endif /*_MACH_VM_REGION_H_*/ diff --git a/i386/include/mach/vm_statistics.h b/i386/include/mach/vm_statistics.h deleted file mode 100644 index 016a1c2..0000000 --- a/i386/include/mach/vm_statistics.h +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright (c) 2000-2009 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - */ -/* - * File: mach/vm_statistics.h - * Author: Avadis Tevanian, Jr., Michael Wayne Young, David Golub - * - * Virtual memory statistics structure. - * - */ - -#ifndef _MACH_VM_STATISTICS_H_ -#define _MACH_VM_STATISTICS_H_ - -#include <mach/machine/vm_types.h> - - -/* - * vm_statistics - * - * History: - * rev0 - original structure. - * rev1 - added purgable info (purgable_count and purges). - * rev2 - added speculative_count. - * - * Note: you cannot add any new fields to this structure. Add them below in - * vm_statistics64. - */ - -struct vm_statistics { - natural_t free_count; /* # of pages free */ - natural_t active_count; /* # of pages active */ - natural_t inactive_count; /* # of pages inactive */ - natural_t wire_count; /* # of pages wired down */ - natural_t zero_fill_count; /* # of zero fill pages */ - natural_t reactivations; /* # of pages reactivated */ - natural_t pageins; /* # of pageins */ - natural_t pageouts; /* # of pageouts */ - natural_t faults; /* # of faults */ - natural_t cow_faults; /* # of copy-on-writes */ - natural_t lookups; /* object cache lookups */ - natural_t hits; /* object cache hits */ - - /* added for rev1 */ - natural_t purgeable_count; /* # of pages purgeable */ - natural_t purges; /* # of pages purged */ - - /* added for rev2 */ - /* - * NB: speculative pages are already accounted for in "free_count", - * so "speculative_count" is the number of "free" pages that are - * used to hold data that was read speculatively from disk but - * haven't actually been used by anyone so far. - */ - natural_t speculative_count; /* # of pages speculative */ -}; - -/* Used by all architectures */ -typedef struct vm_statistics *vm_statistics_t; -typedef struct vm_statistics vm_statistics_data_t; - -#if defined(__ppc__) /* On ppc, vm statistics are still 32-bit */ - -typedef struct vm_statistics *vm_statistics64_t; -typedef struct vm_statistics vm_statistics64_data_t; - -#define VM_STATISTICS_TRUNCATE_TO_32_BIT(value) value - -#else /* !(defined(__ppc__)) */ - -/* - * vm_statistics64 - * - * History: - * rev0 - original structure. - * rev1 - added purgable info (purgable_count and purges). - * rev2 - added speculative_count. - * ---- - * rev3 - changed name to vm_statistics64. - * changed some fields in structure to 64-bit on - * arm, i386 and x86_64 architectures. - * - */ - -struct vm_statistics64 { - natural_t free_count; /* # of pages free */ - natural_t active_count; /* # of pages active */ - natural_t inactive_count; /* # of pages inactive */ - natural_t wire_count; /* # of pages wired down */ - uint64_t zero_fill_count; /* # of zero fill pages */ - uint64_t reactivations; /* # of pages reactivated */ - uint64_t pageins; /* # of pageins */ - uint64_t pageouts; /* # of pageouts */ - uint64_t faults; /* # of faults */ - uint64_t cow_faults; /* # of copy-on-writes */ - uint64_t lookups; /* object cache lookups */ - uint64_t hits; /* object cache hits */ - - /* added for rev1 */ - uint64_t purges; /* # of pages purged */ - natural_t purgeable_count; /* # of pages purgeable */ - - /* added for rev2 */ - /* - * NB: speculative pages are already accounted for in "free_count", - * so "speculative_count" is the number of "free" pages that are - * used to hold data that was read speculatively from disk but - * haven't actually been used by anyone so far. - */ - natural_t speculative_count; /* # of pages speculative */ - -} -#ifdef __arm__ -__attribute__((aligned(8))) -#endif -; - -typedef struct vm_statistics64 *vm_statistics64_t; -typedef struct vm_statistics64 vm_statistics64_data_t; - -/* - * VM_STATISTICS_TRUNCATE_TO_32_BIT - * - * This is used by host_statistics() to truncate and peg the 64-bit in-kernel values from - * vm_statistics64 to the 32-bit values of the older structure above (vm_statistics). - */ -#define VM_STATISTICS_TRUNCATE_TO_32_BIT(value) ((uint32_t)(((value) > UINT32_MAX ) ? UINT32_MAX : (value))) - -#endif /* !(defined(__ppc__)) */ - - -/* included for the vm_map_page_query call */ - -#define VM_PAGE_QUERY_PAGE_PRESENT 0x1 -#define VM_PAGE_QUERY_PAGE_FICTITIOUS 0x2 -#define VM_PAGE_QUERY_PAGE_REF 0x4 -#define VM_PAGE_QUERY_PAGE_DIRTY 0x8 -#define VM_PAGE_QUERY_PAGE_PAGED_OUT 0x10 -#define VM_PAGE_QUERY_PAGE_COPIED 0x20 -#define VM_PAGE_QUERY_PAGE_SPECULATIVE 0x40 -#define VM_PAGE_QUERY_PAGE_EXTERNAL 0x80 -#define VM_PAGE_QUERY_PAGE_CS_VALIDATED 0x100 -#define VM_PAGE_QUERY_PAGE_CS_TAINTED 0x200 - - -/* - * VM allocation flags: - * - * VM_FLAGS_FIXED - * (really the absence of VM_FLAGS_ANYWHERE) - * Allocate new VM region at the specified virtual address, if possible. - * - * VM_FLAGS_ANYWHERE - * Allocate new VM region anywhere it would fit in the address space. - * - * VM_FLAGS_PURGABLE - * Create a purgable VM object for that new VM region. - * - * VM_FLAGS_NO_PMAP_CHECK - * (for DEBUG kernel config only, ignored for other configs) - * Do not check that there is no stale pmap mapping for the new VM region. - * This is useful for kernel memory allocations at bootstrap when building - * the initial kernel address space while some memory is already in use. - * - * VM_FLAGS_OVERWRITE - * The new VM region can replace existing VM regions if necessary - * (to be used in combination with VM_FLAGS_FIXED). - * - * VM_FLAGS_NO_CACHE - * Pages brought in to this VM region are placed on the speculative - * queue instead of the active queue. In other words, they are not - * cached so that they will be stolen first if memory runs low. - */ -#define VM_FLAGS_FIXED 0x0000 -#define VM_FLAGS_ANYWHERE 0x0001 -#define VM_FLAGS_PURGABLE 0x0002 -#define VM_FLAGS_NO_CACHE 0x0010 - -/* - * VM_FLAGS_SUPERPAGE_MASK - * 3 bits that specify whether large pages should be used instead of - * base pages (!=0), as well as the requested page size. - */ -#define VM_FLAGS_SUPERPAGE_MASK 0x70000 /* bits 0x10000, 0x20000, 0x40000 */ -#define VM_FLAGS_SUPERPAGE_SHIFT 16 - -#define SUPERPAGE_NONE 0 /* no superpages, if all bits are 0 */ -#define VM_FLAGS_SUPERPAGE_NONE (SUPERPAGE_NONE<<VM_FLAGS_SUPERPAGE_SHIFT) -#if defined(__x86_64__) || !defined(KERNEL) -#define SUPERPAGE_SIZE_2MB 1 -#define VM_FLAGS_SUPERPAGE_SIZE_2MB (SUPERPAGE_SIZE_2MB<<VM_FLAGS_SUPERPAGE_SHIFT) -#endif - -#define VM_FLAGS_ALIAS_MASK 0xFF000000 -#define VM_GET_FLAGS_ALIAS(flags, alias) \ - (alias) = ((flags) & VM_FLAGS_ALIAS_MASK) >> 24 -#define VM_SET_FLAGS_ALIAS(flags, alias) \ - (flags) = (((flags) & ~VM_FLAGS_ALIAS_MASK) | \ - (((alias) & ~VM_FLAGS_ALIAS_MASK) << 24)) - -/* These are the flags that we accept from user-space */ -#define VM_FLAGS_USER_ALLOCATE (VM_FLAGS_FIXED | \ - VM_FLAGS_ANYWHERE | \ - VM_FLAGS_PURGABLE | \ - VM_FLAGS_NO_CACHE | \ - VM_FLAGS_SUPERPAGE_MASK | \ - VM_FLAGS_ALIAS_MASK) -#define VM_FLAGS_USER_MAP VM_FLAGS_USER_ALLOCATE - -#define VM_MEMORY_MALLOC 1 -#define VM_MEMORY_MALLOC_SMALL 2 -#define VM_MEMORY_MALLOC_LARGE 3 -#define VM_MEMORY_MALLOC_HUGE 4 -#define VM_MEMORY_SBRK 5// uninteresting -- no one should call -#define VM_MEMORY_REALLOC 6 -#define VM_MEMORY_MALLOC_TINY 7 -#define VM_MEMORY_MALLOC_LARGE_REUSABLE 8 -#define VM_MEMORY_MALLOC_LARGE_REUSED 9 - -#define VM_MEMORY_ANALYSIS_TOOL 10 - -#define VM_MEMORY_MACH_MSG 20 -#define VM_MEMORY_IOKIT 21 -#define VM_MEMORY_STACK 30 -#define VM_MEMORY_GUARD 31 -#define VM_MEMORY_SHARED_PMAP 32 -/* memory containing a dylib */ -#define VM_MEMORY_DYLIB 33 -#define VM_MEMORY_OBJC_DISPATCHERS 34 - -// Placeholders for now -- as we analyze the libraries and find how they -// use memory, we can make these labels more specific. -#define VM_MEMORY_APPKIT 40 -#define VM_MEMORY_FOUNDATION 41 -#define VM_MEMORY_COREGRAPHICS 42 -#define VM_MEMORY_CARBON 43 -#define VM_MEMORY_JAVA 44 -#define VM_MEMORY_ATS 50 -#define VM_MEMORY_LAYERKIT 51 -#define VM_MEMORY_CGIMAGE 52 -#define VM_MEMORY_TCMALLOC 53 - -/* private raster data (i.e. layers, some images, QGL allocator) */ -#define VM_MEMORY_COREGRAPHICS_DATA 54 - -/* shared image and font caches */ -#define VM_MEMORY_COREGRAPHICS_SHARED 55 - -/* Memory used for virtual framebuffers, shadowing buffers, etc... */ -#define VM_MEMORY_COREGRAPHICS_FRAMEBUFFERS 56 - -/* Window backing stores, custom shadow data, and compressed backing stores */ -#define VM_MEMORY_COREGRAPHICS_BACKINGSTORES 57 - -/* catch-all for other uses, such as the read-only shared data page */ -#define VM_MEMORY_COREGRAPHICS_MISC VM_MEMORY_COREGRAPHICS - -/* memory allocated by the dynamic loader for itself */ -#define VM_MEMORY_DYLD 60 -/* malloc'd memory created by dyld */ -#define VM_MEMORY_DYLD_MALLOC 61 - -/* Used for sqlite page cache */ -#define VM_MEMORY_SQLITE 62 - -/* JavaScriptCore heaps */ -#define VM_MEMORY_JAVASCRIPT_CORE 63 -/* memory allocated for the JIT */ -#define VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR 64 -#define VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE 65 - -/* memory allocated for GLSL */ -#define VM_MEMORY_GLSL 66 - -/* Reserve 240-255 for application */ -#define VM_MEMORY_APPLICATION_SPECIFIC_1 240 -#define VM_MEMORY_APPLICATION_SPECIFIC_16 255 - -#define VM_MAKE_TAG(tag) ((tag) << 24) - -#endif /* _MACH_VM_STATISTICS_H_ */ diff --git a/i386/include/mach/vm_sync.h b/i386/include/mach/vm_sync.h deleted file mode 100644 index dfb948b..0000000 --- a/i386/include/mach/vm_sync.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - * File: mach/vm_sync.h - * - * Virtual memory synchronisation definitions. - * - */ - -#ifndef _MACH_VM_SYNC_H_ -#define _MACH_VM_SYNC_H_ - -typedef unsigned vm_sync_t; - -/* - * Synchronization flags, defined as bits within the vm_sync_t type - */ - -#define VM_SYNC_ASYNCHRONOUS ((vm_sync_t) 0x01) -#define VM_SYNC_SYNCHRONOUS ((vm_sync_t) 0x02) -#define VM_SYNC_INVALIDATE ((vm_sync_t) 0x04) -#define VM_SYNC_KILLPAGES ((vm_sync_t) 0x08) -#define VM_SYNC_DEACTIVATE ((vm_sync_t) 0x10) -#define VM_SYNC_CONTIGUOUS ((vm_sync_t) 0x20) -#define VM_SYNC_REUSABLEPAGES ((vm_sync_t) 0x40) - -#endif /* _MACH_VM_SYNC_H_ */ diff --git a/i386/include/mach/vm_task.h b/i386/include/mach/vm_task.h deleted file mode 100644 index d2401ac..0000000 --- a/i386/include/mach/vm_task.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* -** This file contains compatibilty wrapper header for things that are -** generated from mach/vm_map.defs into mach/vm_map.h. -** -** This file will go away eventually - please switch. -*/ -#include <mach/vm_map.h> diff --git a/i386/include/mach/vm_types.h b/i386/include/mach/vm_types.h deleted file mode 100644 index 37f4bd5..0000000 --- a/i386/include/mach/vm_types.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * @OSF_COPYRIGHT@ - * - */ -#ifndef _MACH_VM_TYPES_H_ -#define _MACH_VM_TYPES_H_ - -#include <mach/port.h> -#include <mach/machine/vm_types.h> - -#include <stdint.h> - -typedef vm_offset_t pointer_t; -typedef vm_offset_t vm_address_t; - -/* - * We use addr64_t for 64-bit addresses that are used on both - * 32 and 64-bit machines. On PPC, they are passed and returned as - * two adjacent 32-bit GPRs. We use addr64_t in places where - * common code must be useable both on 32 and 64-bit machines. - */ -typedef uint64_t addr64_t; /* Basic effective address */ - -/* - * We use reg64_t for addresses that are 32 bits on a 32-bit - * machine, and 64 bits on a 64-bit machine, but are always - * passed and returned in a single GPR on PPC. This type - * cannot be used in generic 32-bit c, since on a 64-bit - * machine the upper half of the register will be ignored - * by the c compiler in 32-bit mode. In c, we can only use the - * type in prototypes of functions that are written in and called - * from assembly language. This type is basically a comment. - */ -typedef uint32_t reg64_t; - -/* - * To minimize the use of 64-bit fields, we keep some physical - * addresses (that are page aligned) as 32-bit page numbers. - * This limits the physical address space to 16TB of RAM. - */ -typedef uint32_t ppnum_t; /* Physical page number */ -#define PPNUM_MAX UINT32_MAX - - - -typedef mach_port_t vm_map_t; - - -#define VM_MAP_NULL ((vm_map_t) 0) - -/* - * Evolving definitions, likely to change. - */ - -typedef uint64_t vm_object_offset_t; -typedef uint64_t vm_object_size_t; - - -typedef mach_port_t upl_t; -typedef mach_port_t vm_named_entry_t; - - -#define UPL_NULL ((upl_t) 0) -#define VM_NAMED_ENTRY_NULL ((vm_named_entry_t) 0) - -#endif /* _MACH_VM_TYPES_H_ */ diff --git a/i386/include/machine/_limits.h b/i386/include/machine/_limits.h deleted file mode 100644 index 373e726..0000000 --- a/i386/include/machine/_limits.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2004-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _BSD_MACHINE__LIMITS_H_ -#define _BSD_MACHINE__LIMITS_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _BSD_MACHINE__LIMITS_H_ */ diff --git a/i386/include/machine/_param.h b/i386/include/machine/_param.h deleted file mode 100644 index 4171fd0..0000000 --- a/i386/include/machine/_param.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2004-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#if defined (__ppc__) || defined (__ppc64__) -#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 diff --git a/i386/include/machine/_structs.h b/i386/include/machine/_structs.h deleted file mode 100644 index 0e35938..0000000 --- a/i386/include/machine/_structs.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2004-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#if defined (__ppc__) || defined (__ppc64__) -#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 diff --git a/i386/include/machine/_types.h b/i386/include/machine/_types.h deleted file mode 100644 index 9f2d6d2..0000000 --- a/i386/include/machine/_types.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2003-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _BSD_MACHINE__TYPES_H_ -#define _BSD_MACHINE__TYPES_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _BSD_MACHINE__TYPES_H_ */ diff --git a/i386/include/machine/byte_order.h b/i386/include/machine/byte_order.h deleted file mode 100644 index 4008142..0000000 --- a/i386/include/machine/byte_order.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1995 NeXT Computer, Inc. - */ - -#ifndef _BSD_MACHINE_BYTE_ORDER_H_ -#define _BSD_MACHINE_BYTE_ORDER_H_ - -#include <architecture/byte_order.h> - -#endif /* _BSD_MACHINE_BYTE_ORDER_H_ */ diff --git a/i386/include/machine/endian.h b/i386/include/machine/endian.h deleted file mode 100644 index a49d52a..0000000 --- a/i386/include/machine/endian.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright 1995 NeXT Computer, Inc. All rights reserved. - */ -#ifndef _BSD_MACHINE_ENDIAN_H_ -#define _BSD_MACHINE_ENDIAN_H_ - -#if defined (__ppc__) || defined(__ppc64__) -#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 - -#endif /* _BSD_MACHINE_ENDIAN_H_ */ diff --git a/i386/include/machine/fasttrap_isa.h b/i386/include/machine/fasttrap_isa.h deleted file mode 100644 index fa881d3..0000000 --- a/i386/include/machine/fasttrap_isa.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _BSD_MACHINE_FASTTRAP_ISA_H_ -#define _BSD_MACHINE_FASTTRAP_ISA_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _BSD_MACHINE_FASTTRAP_ISA_H_ */ diff --git a/i386/include/machine/limits.h b/i386/include/machine/limits.h deleted file mode 100644 index d52080f..0000000 --- a/i386/include/machine/limits.h +++ /dev/null @@ -1,13 +0,0 @@ -/* This is the `system' limits.h, independent of any particular - compiler. GCC provides its own limits.h which can be found in - /usr/lib/gcc, although it is not very informative. - This file is public domain. */ -#if defined (__ppc__) || defined (__ppc64__) -#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 diff --git a/i386/include/machine/param.h b/i386/include/machine/param.h deleted file mode 100644 index 0b2a2ad..0000000 --- a/i386/include/machine/param.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright 1995 NeXT Computer, Inc. All rights reserved. - */ -#ifndef _BSD_MACHINE_PARAM_H_ -#define _BSD_MACHINE_PARAM_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _BSD_MACHINE_PARAM_H_ */ diff --git a/i386/include/machine/profile.h b/i386/include/machine/profile.h deleted file mode 100644 index 45e4de8..0000000 --- a/i386/include/machine/profile.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 1997-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * History : - * 29-Sep-1997 Umesh Vaishampayan - * Created. - */ -#ifndef _BSD_MACHINE_PROFILE_H_ -#define _BSD_MACHINE_PROFILE_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _BSD_MACHINE_PROFILE_H_ */ diff --git a/i386/include/machine/setjmp.h b/i386/include/machine/setjmp.h deleted file mode 100644 index 9aa71b5..0000000 --- a/i386/include/machine/setjmp.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved - */ -#ifndef _MACHINE_SETJMP_H_ -#define _MACHINE_SETJMP_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _MACHINE_SETJMP_H_ */ diff --git a/i386/include/machine/signal.h b/i386/include/machine/signal.h deleted file mode 100644 index 7457d1c..0000000 --- a/i386/include/machine/signal.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _BSD_MACHINE_SIGNAL_H_ -#define _BSD_MACHINE_SIGNAL_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _BSD_MACHINE_SIGNAL_H_ */ diff --git a/i386/include/machine/types.h b/i386/include/machine/types.h deleted file mode 100644 index 2bff809..0000000 --- a/i386/include/machine/types.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright 1995 NeXT Computer, Inc. All rights reserved. - */ -#ifndef _BSD_MACHINE_TYPES_H_ -#define _BSD_MACHINE_TYPES_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _BSD_MACHINE_TYPES_H_ */ diff --git a/i386/include/machine/vmparam.h b/i386/include/machine/vmparam.h deleted file mode 100644 index d9d0d74..0000000 --- a/i386/include/machine/vmparam.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _BSD_MACHINE_VMPARAM_H_ -#define _BSD_MACHINE_VMPARAM_H_ - -#if defined (__ppc__) || defined (__ppc64__) -#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 - -#endif /* _BSD_MACHINE_VMPARAM_H_ */ diff --git a/i386/include/math.h b/i386/include/math.h deleted file mode 100644 index 6b2172f..0000000 --- a/i386/include/math.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef __MATH_H__ -#define __MATH_H__ - -#if (defined(__ppc__) || defined(__ppc64__)) -#include "architecture/ppc/math.h" -#elif (defined (__i386__) || defined( __x86_64__ )) -#include "architecture/i386/math.h" -#elif defined(__arm__) -#include "architecture/arm/math.h" -#else -#error Unknown architecture -#endif - -#endif /* __MATH_H__ */ diff --git a/i386/include/pexpert/boot.h b/i386/include/pexpert/boot.h deleted file mode 100644 index f26ec4a..0000000 --- a/i386/include/pexpert/boot.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _PEXPERT_BOOT_H_ -#define _PEXPERT_BOOT_H_ - -#include <pexpert/machine/boot.h> - -#endif /* _PEXPERT_BOOT_H_ */ diff --git a/i386/include/pexpert/i386/boot.h b/i386/include/pexpert/i386/boot.h deleted file mode 100644 index 369c2c4..0000000 --- a/i386/include/pexpert/i386/boot.h +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _PEXPERT_I386_BOOT_H -#define _PEXPERT_I386_BOOT_H - -#include <stdint.h> - -/* - * What the booter leaves behind for the kernel. - */ - -/* - * Types of boot driver that may be loaded by the booter. - */ -enum { - kBootDriverTypeInvalid = 0, - kBootDriverTypeKEXT = 1, - kBootDriverTypeMKEXT = 2 -}; - -enum { - kEfiReservedMemoryType = 0, - kEfiLoaderCode = 1, - kEfiLoaderData = 2, - kEfiBootServicesCode = 3, - kEfiBootServicesData = 4, - kEfiRuntimeServicesCode = 5, - kEfiRuntimeServicesData = 6, - kEfiConventionalMemory = 7, - kEfiUnusableMemory = 8, - kEfiACPIReclaimMemory = 9, - kEfiACPIMemoryNVS = 10, - kEfiMemoryMappedIO = 11, - kEfiMemoryMappedIOPortSpace = 12, - kEfiPalCode = 13, - kEfiMaxMemoryType = 14 -}; - -/* - * Memory range descriptor. - */ -typedef struct EfiMemoryRange { - uint32_t Type; - uint32_t Pad; - uint64_t PhysicalStart; - uint64_t VirtualStart; - uint64_t NumberOfPages; - uint64_t Attribute; -} EfiMemoryRange; - -#define BOOT_LINE_LENGTH 1024 -#define BOOT_STRING_LEN BOOT_LINE_LENGTH - -/* - * Video information.. - */ - -struct Boot_Video { - uint32_t v_baseAddr; /* Base address of video memory */ - uint32_t v_display; /* Display Code (if Applicable */ - uint32_t v_rowBytes; /* Number of bytes per pixel row */ - uint32_t v_width; /* Width */ - uint32_t v_height; /* Height */ - uint32_t v_depth; /* Pixel Depth */ -}; - -typedef struct Boot_Video Boot_Video; - -/* Values for v_display */ - -#define GRAPHICS_MODE 1 -#define FB_TEXT_MODE 2 - -/* Struct describing an image passed in by the booter */ -struct boot_icon_element { - unsigned int width; - unsigned int height; - int y_offset_from_center; - unsigned int data_size; - unsigned int __reserved1[4]; - unsigned char data[0]; -}; -typedef struct boot_icon_element boot_icon_element; - -/* Boot argument structure - passed into Mach kernel at boot time. - * "Revision" can be incremented for compatible changes - */ -#define kBootArgsRevision 0 -#define kBootArgsVersion 2 - -/* Snapshot constants of previous revisions that are supported */ -#define kBootArgsVersion1 1 -#define kBootArgsVersion2 2 -#define kBootArgsRevision2_0 0 - -#define kBootArgsEfiMode32 32 -#define kBootArgsEfiMode64 64 - -/* Bitfields for boot_args->flags */ -#define kBootArgsFlagRebootOnPanic (1 << 0) -#define kBootArgsFlagHiDPI (1 << 1) - -typedef struct boot_args { - uint16_t Revision; /* Revision of boot_args structure */ - uint16_t Version; /* Version of boot_args structure */ - - uint8_t efiMode; /* 32 = 32-bit, 64 = 64-bit */ - uint8_t debugMode; /* Bit field with behavior changes */ - uint16_t flags; - - char CommandLine[BOOT_LINE_LENGTH]; /* Passed in command line */ - - uint32_t MemoryMap; /* Physical address of memory map */ - uint32_t MemoryMapSize; - uint32_t MemoryMapDescriptorSize; - uint32_t MemoryMapDescriptorVersion; - - Boot_Video Video; /* Video Information */ - - uint32_t deviceTreeP; /* Physical address of flattened device tree */ - uint32_t deviceTreeLength; /* Length of flattened tree */ - - uint32_t kaddr; /* Physical address of beginning of kernel text */ - uint32_t ksize; /* Size of combined kernel text+data+efi */ - - uint32_t efiRuntimeServicesPageStart; /* physical address of defragmented runtime pages */ - uint32_t efiRuntimeServicesPageCount; - uint64_t efiRuntimeServicesVirtualPageStart; /* virtual address of defragmented runtime pages */ - - uint32_t efiSystemTable; /* physical address of system table in runtime area */ - uint32_t kslide; - - uint32_t performanceDataStart; /* physical address of log */ - uint32_t performanceDataSize; - - uint32_t keyStoreDataStart; /* physical address of key store data */ - uint32_t keyStoreDataSize; - uint64_t bootMemStart; - uint64_t bootMemSize; - uint64_t PhysicalMemorySize; - uint64_t FSBFrequency; - uint64_t pciConfigSpaceBaseAddress; - uint32_t pciConfigSpaceStartBusNumber; - uint32_t pciConfigSpaceEndBusNumber; - uint32_t __reserved4[730]; - -} boot_args; - -extern char assert_boot_args_size_is_4096[sizeof(boot_args) == 4096 ? 1 : -1]; - -#endif /* _PEXPERT_I386_BOOT_H */ - diff --git a/i386/include/pexpert/i386/efi.h b/i386/include/pexpert/i386/efi.h deleted file mode 100644 index 5ef5015..0000000 --- a/i386/include/pexpert/i386/efi.h +++ /dev/null @@ -1,558 +0,0 @@ -/* - * Copyright (c) 2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _PEXPERT_I386_EFI_H -#define _PEXPERT_I386_EFI_H - -#include <stdint.h> - -typedef uint8_t EFI_UINT8; -typedef uint16_t EFI_UINT16; -typedef uint32_t EFI_UINT32; -typedef uint64_t EFI_UINT64; - -typedef uint32_t EFI_UINTN; /* natural size for firmware, not kernel */ - -typedef int8_t EFI_INT8; -typedef int16_t EFI_INT16; -typedef int32_t EFI_INT32; -typedef int64_t EFI_INT64; - -typedef int8_t EFI_CHAR8; -typedef int16_t EFI_CHAR16; -typedef int32_t EFI_CHAR32; -typedef int64_t EFI_CHAR64; - -typedef uint32_t EFI_STATUS; -typedef uint8_t EFI_BOOLEAN; -typedef void VOID; - -typedef uint32_t EFI_PTR32; -typedef uint32_t EFI_HANDLE32; - -typedef uint64_t EFI_PTR64; -typedef uint64_t EFI_HANDLE64; -/* - -Portions Copyright 2004, Intel Corporation -All rights reserved. This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -*/ - - -// -// Modifiers for EFI Runtime and Boot Services -// -#define EFI_RUNTIMESERVICE -#define EFIAPI -#define IN -#define OUT -#define OPTIONAL - -#define EFI_MAX_BIT 0x80000000 - -// -// Set the upper bit to indicate EFI Error. -// -#define EFIERR(a) (EFI_MAX_BIT | (a)) - -#define EFIWARN(a) (a) -#define EFI_ERROR(a) (((INTN) (a)) < 0) - -#define EFI_SUCCESS 0 -#define EFI_LOAD_ERROR EFIERR (1) -#define EFI_INVALID_PARAMETER EFIERR (2) -#define EFI_UNSUPPORTED EFIERR (3) -#define EFI_BAD_BUFFER_SIZE EFIERR (4) -#define EFI_BUFFER_TOO_SMALL EFIERR (5) -#define EFI_NOT_READY EFIERR (6) -#define EFI_DEVICE_ERROR EFIERR (7) -#define EFI_WRITE_PROTECTED EFIERR (8) -#define EFI_OUT_OF_RESOURCES EFIERR (9) -#define EFI_VOLUME_CORRUPTED EFIERR (10) -#define EFI_VOLUME_FULL EFIERR (11) -#define EFI_NO_MEDIA EFIERR (12) -#define EFI_MEDIA_CHANGED EFIERR (13) -#define EFI_NOT_FOUND EFIERR (14) -#define EFI_ACCESS_DENIED EFIERR (15) -#define EFI_NO_RESPONSE EFIERR (16) -#define EFI_NO_MAPPING EFIERR (17) -#define EFI_TIMEOUT EFIERR (18) -#define EFI_NOT_STARTED EFIERR (19) -#define EFI_ALREADY_STARTED EFIERR (20) -#define EFI_ABORTED EFIERR (21) -#define EFI_ICMP_ERROR EFIERR (22) -#define EFI_TFTP_ERROR EFIERR (23) -#define EFI_PROTOCOL_ERROR EFIERR (24) -#define EFI_INCOMPATIBLE_VERSION EFIERR (25) -#define EFI_SECURITY_VIOLATION EFIERR (26) -#define EFI_CRC_ERROR EFIERR (27) - -#define EFI_WARN_UNKNOWN_GLYPH EFIWARN (1) -#define EFI_WARN_DELETE_FAILURE EFIWARN (2) -#define EFI_WARN_WRITE_FAILURE EFIWARN (3) -#define EFI_WARN_BUFFER_TOO_SMALL EFIWARN (4) - -// -// EFI Specification Revision information -// -#define EFI_SPECIFICATION_MAJOR_REVISION 1 -#define EFI_SPECIFICATION_MINOR_REVISION 10 - -typedef struct { - EFI_UINT32 Data1; - EFI_UINT16 Data2; - EFI_UINT16 Data3; - EFI_UINT8 Data4[8]; -} EFI_GUID; - -#define APPLE_VENDOR_GUID \ - {0xAC39C713, 0x7E50, 0x423D, {0x88, 0x9D, 0x27,0x8F, 0xCC, 0x34, 0x22, 0xB6} } - -#define EFI_GLOBAL_VARIABLE_GUID \ - {0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C} } - -typedef union { - EFI_GUID Guid; - EFI_UINT8 Raw[16]; -} EFI_GUID_UNION; - -// -// EFI Time Abstraction: -// Year: 2000 - 20XX -// Month: 1 - 12 -// Day: 1 - 31 -// Hour: 0 - 23 -// Minute: 0 - 59 -// Second: 0 - 59 -// Nanosecond: 0 - 999,999,999 -// TimeZone: -1440 to 1440 or 2047 -// -typedef struct { - EFI_UINT16 Year; - EFI_UINT8 Month; - EFI_UINT8 Day; - EFI_UINT8 Hour; - EFI_UINT8 Minute; - EFI_UINT8 Second; - EFI_UINT8 Pad1; - EFI_UINT32 Nanosecond; - EFI_INT16 TimeZone; - EFI_UINT8 Daylight; - EFI_UINT8 Pad2; -} EFI_TIME; - -// -// Bit definitions for EFI_TIME.Daylight -// -#define EFI_TIME_ADJUST_DAYLIGHT 0x01 -#define EFI_TIME_IN_DAYLIGHT 0x02 - -// -// Value definition for EFI_TIME.TimeZone -// -#define EFI_UNSPECIFIED_TIMEZONE 0x07FF - -typedef enum { - EfiReservedMemoryType, - EfiLoaderCode, - EfiLoaderData, - EfiBootServicesCode, - EfiBootServicesData, - EfiRuntimeServicesCode, - EfiRuntimeServicesData, - EfiConventionalMemory, - EfiUnusableMemory, - EfiACPIReclaimMemory, - EfiACPIMemoryNVS, - EfiMemoryMappedIO, - EfiMemoryMappedIOPortSpace, - EfiPalCode, - EfiMaxMemoryType -} EFI_MEMORY_TYPE; - -typedef struct { - EFI_UINT64 Signature; - EFI_UINT32 Revision; - EFI_UINT32 HeaderSize; - EFI_UINT32 CRC32; - EFI_UINT32 Reserved; -} __attribute__((aligned(8))) EFI_TABLE_HEADER; - -// -// possible caching types for the memory range -// -#define EFI_MEMORY_UC 0x0000000000000001ULL -#define EFI_MEMORY_WC 0x0000000000000002ULL -#define EFI_MEMORY_WT 0x0000000000000004ULL -#define EFI_MEMORY_WB 0x0000000000000008ULL -#define EFI_MEMORY_UCE 0x0000000000000010ULL - -// -// physical memory protection on range -// -#define EFI_MEMORY_WP 0x0000000000001000ULL -#define EFI_MEMORY_RP 0x0000000000002000ULL -#define EFI_MEMORY_XP 0x0000000000004000ULL - -// -// range requires a runtime mapping -// -#define EFI_MEMORY_RUNTIME 0x8000000000000000ULL -#define EFI_MEMORY_KERN_RESERVED (1ULL << 59) -typedef EFI_UINT64 EFI_PHYSICAL_ADDRESS; -typedef EFI_UINT64 EFI_VIRTUAL_ADDRESS; - -#define EFI_MEMORY_DESCRIPTOR_VERSION 1 -typedef struct { - EFI_UINT32 Type; - EFI_UINT32 Pad; - EFI_PHYSICAL_ADDRESS PhysicalStart; - EFI_VIRTUAL_ADDRESS VirtualStart; - EFI_UINT64 NumberOfPages; - EFI_UINT64 Attribute; -} __attribute__((aligned(8))) EFI_MEMORY_DESCRIPTOR; - - -typedef -EFI_RUNTIMESERVICE -EFI_STATUS -(EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP) ( - IN EFI_UINTN MemoryMapSize, - IN EFI_UINTN DescriptorSize, - IN EFI_UINT32 DescriptorVersion, - IN EFI_MEMORY_DESCRIPTOR * VirtualMap - ); - -typedef -EFI_RUNTIMESERVICE -EFI_STATUS -(EFIAPI *EFI_CONVERT_POINTER) ( - IN EFI_UINTN DebugDisposition, - IN OUT VOID **Address - ); - -// -// Variable attributes -// -#define EFI_VARIABLE_NON_VOLATILE 0x00000001 -#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 -#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 -#define EFI_VARIABLE_READ_ONLY 0x00000008 - -typedef -EFI_RUNTIMESERVICE -EFI_STATUS -(EFIAPI *EFI_GET_VARIABLE) ( - IN EFI_CHAR16 * VariableName, - IN EFI_GUID * VendorGuid, - OUT EFI_UINT32 * Attributes OPTIONAL, - IN OUT EFI_UINTN * DataSize, - OUT VOID * Data - ); - -typedef -EFI_RUNTIMESERVICE -EFI_STATUS -(EFIAPI *EFI_GET_NEXT_VARIABLE_NAME) ( - IN OUT EFI_UINTN * VariableNameSize, - IN OUT EFI_CHAR16 * VariableName, - IN OUT EFI_GUID * VendorGuid - ); - -typedef -EFI_RUNTIMESERVICE -EFI_STATUS -(EFIAPI *EFI_SET_VARIABLE) ( - IN EFI_CHAR16 * VariableName, - IN EFI_GUID * VendorGuid, - IN EFI_UINT32 Attributes, - IN EFI_UINTN DataSize, - IN VOID * Data - ); - -// -// EFI Time -// -typedef struct { - EFI_UINT32 Resolution; - EFI_UINT32 Accuracy; - EFI_BOOLEAN SetsToZero; -} __attribute__((aligned(4))) EFI_TIME_CAPABILITIES; - -typedef -EFI_RUNTIMESERVICE -EFI_STATUS -(EFIAPI *EFI_GET_TIME) ( - OUT EFI_TIME * Time, - OUT EFI_TIME_CAPABILITIES * Capabilities OPTIONAL - ); - -typedef -EFI_RUNTIMESERVICE -EFI_STATUS -(EFIAPI *EFI_SET_TIME) ( - IN EFI_TIME * Time - ); - -typedef -EFI_RUNTIMESERVICE -EFI_STATUS -(EFIAPI *EFI_GET_WAKEUP_TIME) ( - OUT EFI_BOOLEAN * Enabled, - OUT EFI_BOOLEAN * Pending, - OUT EFI_TIME * Time - ); - -typedef -EFI_RUNTIMESERVICE -EFI_STATUS -(EFIAPI *EFI_SET_WAKEUP_TIME) ( - IN EFI_BOOLEAN Enable, - IN EFI_TIME * Time OPTIONAL - ); - -typedef enum { - EfiResetCold, - EfiResetWarm, - EfiResetShutdown, - -#ifdef TIANO_EXTENSION_FLAG - EfiResetUpdate -#endif - -} EFI_RESET_TYPE; - -typedef -EFI_RUNTIMESERVICE -VOID -(EFIAPI *EFI_RESET_SYSTEM) ( - IN EFI_RESET_TYPE ResetType, - IN EFI_STATUS ResetStatus, - IN EFI_UINTN DataSize, - IN EFI_CHAR16 * ResetData OPTIONAL - ); - -typedef -EFI_RUNTIMESERVICE -EFI_STATUS -(EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT) ( - OUT EFI_UINT32 * HighCount - ); - -// -// Definition of Status Code extended data header -// -// HeaderSize The size of the architecture. This is specified to enable -// the future expansion -// -// Size The size of the data in bytes. This does not include the size -// of the header structure. -// -// Type A GUID defining the type of the data -// -// -#ifdef TIANO_EXTENSION_FLAG - -typedef -EFI_RUNTIMESERVICE -EFI_STATUS -(EFIAPI *EFI_REPORT_STATUS_CODE) ( - IN EFI_STATUS_CODE_TYPE Type, - IN EFI_STATUS_CODE_VALUE Value, - IN EFI_UINT32 Instance, - IN EFI_GUID * CallerId OPTIONAL, - IN EFI_STATUS_CODE_DATA * Data OPTIONAL - ); - -#endif -// -// EFI Runtime Services Table -// -#define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552ULL -#define EFI_RUNTIME_SERVICES_REVISION ((EFI_SPECIFICATION_MAJOR_REVISION << 16) | (EFI_SPECIFICATION_MINOR_REVISION)) - -typedef struct { - EFI_TABLE_HEADER Hdr; - - // - // Time services - // - EFI_PTR32 GetTime; - EFI_PTR32 SetTime; - EFI_PTR32 GetWakeupTime; - EFI_PTR32 SetWakeupTime; - - // - // Virtual memory services - // - EFI_PTR32 SetVirtualAddressMap; - EFI_PTR32 ConvertPointer; - - // - // Variable services - // - EFI_PTR32 GetVariable; - EFI_PTR32 GetNextVariableName; - EFI_PTR32 SetVariable; - - // - // Misc - // - EFI_PTR32 GetNextHighMonotonicCount; - EFI_PTR32 ResetSystem; - -#ifdef TIANO_EXTENSION_FLAG - // - // //////////////////////////////////////////////////// - // Extended EFI Services - ////////////////////////////////////////////////////// - // - EFI_PTR32 ReportStatusCode; -#endif - -} __attribute__((aligned(8))) EFI_RUNTIME_SERVICES_32; - -typedef struct { - EFI_TABLE_HEADER Hdr; - - // - // Time services - // - EFI_PTR64 GetTime; - EFI_PTR64 SetTime; - EFI_PTR64 GetWakeupTime; - EFI_PTR64 SetWakeupTime; - - // - // Virtual memory services - // - EFI_PTR64 SetVirtualAddressMap; - EFI_PTR64 ConvertPointer; - - // - // Variable services - // - EFI_PTR64 GetVariable; - EFI_PTR64 GetNextVariableName; - EFI_PTR64 SetVariable; - - // - // Misc - // - EFI_PTR64 GetNextHighMonotonicCount; - EFI_PTR64 ResetSystem; - -#ifdef TIANO_EXTENSION_FLAG - // - // //////////////////////////////////////////////////// - // Extended EFI Services - ////////////////////////////////////////////////////// - // - EFI_PTR64 ReportStatusCode; -#endif - -} __attribute__((aligned(8))) EFI_RUNTIME_SERVICES_64; - -// -// EFI Configuration Table -// -typedef struct { - EFI_GUID VendorGuid; - EFI_PTR32 VendorTable; -} EFI_CONFIGURATION_TABLE_32; - -typedef struct { - EFI_GUID VendorGuid; - EFI_PTR64 VendorTable; -} __attribute__((aligned(8))) EFI_CONFIGURATION_TABLE_64; - -// -// EFI System Table -// -#define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249ULL -#define EFI_SYSTEM_TABLE_REVISION ((EFI_SPECIFICATION_MAJOR_REVISION << 16) | (EFI_SPECIFICATION_MINOR_REVISION)) -#define EFI_2_00_SYSTEM_TABLE_REVISION ((2 << 16) | 00) -#define EFI_1_02_SYSTEM_TABLE_REVISION ((1 << 16) | 02) -#define EFI_1_10_SYSTEM_TABLE_REVISION ((1 << 16) | 10) - -typedef struct EFI_SYSTEM_TABLE_32 { - EFI_TABLE_HEADER Hdr; - - EFI_PTR32 FirmwareVendor; - EFI_UINT32 FirmwareRevision; - - EFI_HANDLE32 ConsoleInHandle; - EFI_PTR32 ConIn; - - EFI_HANDLE32 ConsoleOutHandle; - EFI_PTR32 ConOut; - - EFI_HANDLE32 StandardErrorHandle; - EFI_PTR32 StdErr; - - EFI_PTR32 RuntimeServices; - EFI_PTR32 BootServices; - - EFI_UINT32 NumberOfTableEntries; - EFI_PTR32 ConfigurationTable; - -} __attribute__((aligned(8))) EFI_SYSTEM_TABLE_32; - -typedef struct EFI_SYSTEM_TABLE_64 { - EFI_TABLE_HEADER Hdr; - - EFI_PTR64 FirmwareVendor; - EFI_UINT32 FirmwareRevision; - - EFI_UINT32 __pad; - - EFI_HANDLE64 ConsoleInHandle; - EFI_PTR64 ConIn; - - EFI_HANDLE64 ConsoleOutHandle; - EFI_PTR64 ConOut; - - EFI_HANDLE64 StandardErrorHandle; - EFI_PTR64 StdErr; - - EFI_PTR64 RuntimeServices; - EFI_PTR64 BootServices; - - EFI_UINT64 NumberOfTableEntries; - EFI_PTR64 ConfigurationTable; - -} __attribute__((aligned(8))) EFI_SYSTEM_TABLE_64; - -#endif /* _PEXPERT_I386_EFI_H */ diff --git a/i386/include/pexpert/i386/protos.h b/i386/include/pexpert/i386/protos.h deleted file mode 100644 index 854f8c4..0000000 --- a/i386/include/pexpert/i386/protos.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _PEXPERT_I386_PROTOS_H -#define _PEXPERT_I386_PROTOS_H - -//------------------------------------------------------------------------ -// x86 IN/OUT I/O inline functions. -// -// IN : inb, inw, inl -// IN(port) -// -// OUT: outb, outw, outl -// OUT(port, data) - -typedef unsigned short i386_ioport_t; - -#define __IN(s, u) \ -static __inline__ unsigned u \ -in##s(i386_ioport_t port) \ -{ \ - unsigned u data; \ - asm volatile ( \ - "in" #s " %1,%0" \ - : "=a" (data) \ - : "d" (port)); \ - return (data); \ -} - -#define __OUT(s, u) \ -static __inline__ void \ -out##s(i386_ioport_t port, unsigned u data) \ -{ \ - asm volatile ( \ - "out" #s " %1,%0" \ - : \ - : "d" (port), "a" (data)); \ -} - -__IN(b, char) -__IN(w, short) -__IN(l, long) - -__OUT(b, char) -__OUT(w, short) -__OUT(l, long) - -extern void cninit(void); -extern int sprintf(char * str, const char * format, ...); - -//------------------------------------------------------------------------ -// from osfmk/console/panic_dialog.c -extern void panic_ui_initialize(const unsigned char * clut); - -/* ------------------------------------------------------------------------ - * from osfmk/i386/serial_io.h - */ -int switch_to_serial_console(void); -void switch_to_old_console(int); -boolean_t console_is_serial(void); -int serial_init(void); -void serial_putc(char); -int serial_getc(void); - -/* ------------------------------------------------------------------------ - * from osfmk/kern/misc_protos.h - */ -void cnputc(char); -int cngetc(void); - -#endif /* _PEXPERT_I386_PROTOS_H */ diff --git a/i386/include/pexpert/machine/boot.h b/i386/include/pexpert/machine/boot.h deleted file mode 100644 index d078b39..0000000 --- a/i386/include/pexpert/machine/boot.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _PEXPERT_MACHINE_BOOT_H -#define _PEXPERT_MACHINE_BOOT_H - -#if defined (__i386__) || defined(__x86_64__) -#include "pexpert/i386/boot.h" -#elif defined (__arm__) -#include "pexpert/arm/boot.h" -#else -#error architecture not supported -#endif - -#endif /* _PEXPERT_MACHINE_BOOT_H */ diff --git a/i386/include/pexpert/machine/protos.h b/i386/include/pexpert/machine/protos.h deleted file mode 100644 index 441a924..0000000 --- a/i386/include/pexpert/machine/protos.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _PEXPERT_MACHINE_PROTOS_H -#define _PEXPERT_MACHINE_PROTOS_H - -#if defined (__i386__) || defined(__x86_64__) -#include "pexpert/i386/protos.h" -#elif defined (__arm__) -#include "pexpert/arm/protos.h" -#else -#error architecture not supported -#endif - -#endif /* _PEXPERT_MACHINE_PROTOS_H */ diff --git a/i386/include/pexpert/pexpert.h b/i386/include/pexpert/pexpert.h deleted file mode 100644 index d661b10..0000000 --- a/i386/include/pexpert/pexpert.h +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Copyright (c) 2000-2009 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _PEXPERT_PEXPERT_H_ -#define _PEXPERT_PEXPERT_H_ - -#include <sys/cdefs.h> - -#include <IOKit/IOInterrupts.h> -#include <kern/kern_types.h> - -__BEGIN_DECLS -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/machine/vm_types.h> - -#include <pexpert/boot.h> - -typedef void *cpu_id_t; - -#if defined(__arm__) -#endif - -void PE_enter_debugger( - const char *cause); - -void PE_init_platform( - boolean_t vm_initialized, - void *args); - -#if defined(__arm__) -uint32_t PE_get_security_epoch( - void); -uint32_t PE_i_can_has_debugger( - uint32_t *); - -/* - * If invoked with NULL first argument, return the max buffer size that can - * be saved in the second argument - */ -void PE_save_buffer_to_vram( - unsigned char *, - unsigned int *); -#endif - -void PE_init_kprintf( - boolean_t vm_initialized); - -extern int32_t gPESerialBaud; - -unsigned int PE_init_taproot(vm_offset_t *taddr); - -extern void (*PE_kputc)(char c); - -void PE_init_printf( - boolean_t vm_initialized); - -extern void (*PE_putc)(char c); - -void PE_init_iokit( - void); - -struct clock_frequency_info_t { - unsigned long bus_clock_rate_hz; - unsigned long cpu_clock_rate_hz; - unsigned long dec_clock_rate_hz; - unsigned long bus_clock_rate_num; - unsigned long bus_clock_rate_den; - unsigned long bus_to_cpu_rate_num; - unsigned long bus_to_cpu_rate_den; - unsigned long bus_to_dec_rate_num; - unsigned long bus_to_dec_rate_den; - unsigned long timebase_frequency_hz; - unsigned long timebase_frequency_num; - unsigned long timebase_frequency_den; - unsigned long long bus_frequency_hz; - unsigned long long bus_frequency_min_hz; - unsigned long long bus_frequency_max_hz; - unsigned long long cpu_frequency_hz; - unsigned long long cpu_frequency_min_hz; - unsigned long long cpu_frequency_max_hz; - unsigned long long prf_frequency_hz; - unsigned long long prf_frequency_min_hz; - unsigned long long prf_frequency_max_hz; - unsigned long long mem_frequency_hz; - unsigned long long mem_frequency_min_hz; - unsigned long long mem_frequency_max_hz; - unsigned long long fix_frequency_hz; -}; - -typedef struct clock_frequency_info_t clock_frequency_info_t; - -extern clock_frequency_info_t gPEClockFrequencyInfo; - -struct timebase_freq_t { - unsigned long timebase_num; - unsigned long timebase_den; -}; - -typedef void (*timebase_callback_func)(struct timebase_freq_t *timebase_freq); - -void PE_register_timebase_callback(timebase_callback_func callback); - -void PE_call_timebase_callback(void); - -void PE_install_interrupt_handler( - void *nub, int source, - void *target, IOInterruptHandler handler, void *refCon); - -#ifndef _FN_KPRINTF -#define _FN_KPRINTF -void kprintf(const char *fmt, ...) __printflike(1,2); -#endif - - -#if CONFIG_NO_KPRINTF_STRINGS -#define kprintf(x, ...) do {} while (0) -#endif - -void init_display_putc(unsigned char *baseaddr, int rowbytes, int height); -void display_putc(char c); - -enum { - kPEReadTOD, - kPEWriteTOD -}; -extern int (*PE_read_write_time_of_day)( - unsigned int options, - long * secs); - -enum { - kPEWaitForInput = 0x00000001, - kPERawInput = 0x00000002 -}; -extern int (*PE_poll_input)( - unsigned int options, - char * c); - -extern int (*PE_write_IIC)( - unsigned char addr, - unsigned char reg, - unsigned char data); - -/* Private Stuff - eventually put in pexpertprivate.h */ -enum { - kDebugTypeNone = 0, - kDebugTypeDisplay = 1, - kDebugTypeSerial = 2 -}; - -/* Scale factor values for PE_Video.v_scale */ -enum { - kPEScaleFactorUnknown = 0, - kPEScaleFactor1x = 1, - kPEScaleFactor2x = 2 -}; - -struct PE_Video { - unsigned long v_baseAddr; /* Base address of video memory */ - unsigned long v_rowBytes; /* Number of bytes per pixel row */ - unsigned long v_width; /* Width */ - unsigned long v_height; /* Height */ - unsigned long v_depth; /* Pixel Depth */ - unsigned long v_display; /* Text or Graphics */ - char v_pixelFormat[64]; - unsigned long v_offset; /* offset into video memory to start at */ - unsigned long v_length; /* length of video memory (0 for v_rowBytes * v_height) */ - unsigned char v_rotate; /* Rotation: 0:normal, 1:right 90, 2:left 180, 3:left 90 */ - unsigned char v_scale; /* Scale Factor for both X & Y */ - char reserved1[2]; -#ifdef __LP64__ - long reserved2; -#else - long v_baseAddrHigh; -#endif -}; - -typedef struct PE_Video PE_Video; - -extern void initialize_screen(PE_Video *, unsigned int); - -extern void dim_screen(void); - -extern int PE_current_console( - PE_Video *info); - -extern void PE_create_console( - void); - -extern int PE_initialize_console( - PE_Video *newInfo, - int op); - -#define kPEGraphicsMode 1 -#define kPETextMode 2 -#define kPETextScreen 3 -#define kPEAcquireScreen 4 -#define kPEReleaseScreen 5 -#define kPEEnableScreen 6 -#define kPEDisableScreen 7 -#define kPEBaseAddressChange 8 - -extern void PE_display_icon( unsigned int flags, - const char * name ); - -typedef struct PE_state { - boolean_t initialized; - PE_Video video; - void *deviceTreeHead; - void *bootArgs; -} PE_state_t; - -extern PE_state_t PE_state; - -extern char * PE_boot_args( - void); - -#if !defined(__LP64__) && !defined(__arm__) -extern boolean_t PE_parse_boot_arg( - const char *arg_string, - void *arg_ptr) __deprecated; -#endif - -extern boolean_t PE_parse_boot_argn( - const char *arg_string, - void *arg_ptr, - int max_arg); - -extern boolean_t PE_get_default( - const char *property_name, - void *property_ptr, - unsigned int max_property); - -#define PE_default_value(_key, _variable, _default) \ - do { \ - if (!PE_get_default((_key), &(_variable), sizeof(_variable))) \ - _variable = _default; \ - } while(0) - -enum { - kPEOptionKey = 0x3a, - kPECommandKey = 0x37, - kPEControlKey = 0x36, - kPEShiftKey = 0x38 -}; - -extern boolean_t PE_get_hotkey( - unsigned char key); - -extern kern_return_t PE_cpu_start( - cpu_id_t target, - vm_offset_t start_paddr, - vm_offset_t arg_paddr); - -extern void PE_cpu_halt( - cpu_id_t target); - -extern void PE_cpu_signal( - cpu_id_t source, - cpu_id_t target); - -extern void PE_cpu_machine_init( - cpu_id_t target, - boolean_t bootb); - -extern void PE_cpu_machine_quiesce( - cpu_id_t target); - -extern void pe_init_debug(void); - -extern boolean_t PE_imgsrc_mount_supported(void); - -#if defined(__arm__) -typedef void (*perfmon_interrupt_handler_func)(cpu_id_t source); -extern kern_return_t PE_cpu_perfmon_interrupt_install_handler(perfmon_interrupt_handler_func handler); -extern void PE_cpu_perfmon_interrupt_enable(cpu_id_t target, boolean_t enable); -#endif - - -__END_DECLS - -#endif /* _PEXPERT_PEXPERT_H_ */ diff --git a/i386/include/pexpert/protos.h b/i386/include/pexpert/protos.h deleted file mode 100644 index 78b7a8b..0000000 --- a/i386/include/pexpert/protos.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _PEXPERT_PROTOS_H_ -#define _PEXPERT_PROTOS_H_ - - -#endif /* _PEXPERT_PROTOS_H_ */ diff --git a/i386/include/runetype.h b/i386/include/runetype.h deleted file mode 100644 index fd16b82..0000000 --- a/i386/include/runetype.h +++ /dev/null @@ -1,136 +0,0 @@ -/*- - * Copyright (c) 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Paul Borman at Krystal Technologies. - * - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)runetype.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _RUNETYPE_H_ -#define _RUNETYPE_H_ - -#include <_types.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) - -#ifndef _SIZE_T -#define _SIZE_T -typedef __darwin_size_t size_t; -#endif - -#ifndef _CT_RUNE_T -#define _CT_RUNE_T -typedef __darwin_ct_rune_t ct_rune_t; -#endif - -#ifndef _RUNE_T -#define _RUNE_T -typedef __darwin_rune_t rune_t; -#endif - -#ifndef __cplusplus -#ifndef _WCHAR_T -#define _WCHAR_T -typedef __darwin_wchar_t wchar_t; -#endif /* _WCHAR_T */ -#endif /* __cplusplus */ - -#ifndef _WINT_T -#define _WINT_T -typedef __darwin_wint_t wint_t; -#endif - -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -#define _CACHED_RUNES (1 <<8 ) /* Must be a power of 2 */ -#define _CRMASK (~(_CACHED_RUNES - 1)) - -/* - * The lower 8 bits of runetype[] contain the digit value of the rune. - */ -typedef struct { - __darwin_rune_t __min; /* First rune of the range */ - __darwin_rune_t __max; /* Last rune (inclusive) of the range */ - __darwin_rune_t __map; /* What first maps to in maps */ - __uint32_t *__types; /* Array of types in range */ -} _RuneEntry; - -typedef struct { - int __nranges; /* Number of ranges stored */ - _RuneEntry *__ranges; /* Pointer to the ranges */ -} _RuneRange; - -typedef struct { - char __name[14]; /* CHARCLASS_NAME_MAX = 14 */ - __uint32_t __mask; /* charclass mask */ -} _RuneCharClass; - -typedef struct { - char __magic[8]; /* Magic saying what version we are */ - char __encoding[32]; /* ASCII name of this encoding */ - - __darwin_rune_t (*__sgetrune)(const char *, __darwin_size_t, char const **); - int (*__sputrune)(__darwin_rune_t, char *, __darwin_size_t, char **); - __darwin_rune_t __invalid_rune; - - __uint32_t __runetype[_CACHED_RUNES]; - __darwin_rune_t __maplower[_CACHED_RUNES]; - __darwin_rune_t __mapupper[_CACHED_RUNES]; - - /* - * The following are to deal with Runes larger than _CACHED_RUNES - 1. - * Their data is actually contiguous with this structure so as to make - * it easier to read/write from/to disk. - */ - _RuneRange __runetype_ext; - _RuneRange __maplower_ext; - _RuneRange __mapupper_ext; - - void *__variable; /* Data which depends on the encoding */ - int __variable_len; /* how long that data is */ - - /* - * extra fields to deal with arbitrary character classes - */ - int __ncharclasses; - _RuneCharClass *__charclasses; -} _RuneLocale; - -#define _RUNE_MAGIC_A "RuneMagA" /* Indicates version A of RuneLocale */ - -__BEGIN_DECLS -extern _RuneLocale _DefaultRuneLocale; -extern _RuneLocale *_CurrentRuneLocale; -__END_DECLS - -#endif /* !_RUNETYPE_H_ */ diff --git a/i386/include/setjmp.h b/i386/include/setjmp.h deleted file mode 100644 index 4fced23..0000000 --- a/i386/include/setjmp.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#ifndef _BSD_SETJMP_H -#define _BSD_SETJMP_H - -#include <machine/setjmp.h> - -#endif /* _BSD_SETJMP_H */ diff --git a/i386/include/signal.h b/i386/include/signal.h deleted file mode 100644 index 08ad77e..0000000 --- a/i386/include/signal.h +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/*- - * Copyright (c) 1991, 1993 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)signal.h 8.3 (Berkeley) 3/30/94 - */ - -#ifndef _USER_SIGNAL_H -#define _USER_SIGNAL_H - -#include <sys/cdefs.h> -#include <_types.h> -#include <sys/signal.h> - -#ifndef _PTHREAD_T -typedef __darwin_pthread_t pthread_t; -#define _PTHREAD_T -#endif - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -extern __const char *__const sys_signame[NSIG]; -extern __const char *__const sys_siglist[NSIG]; -#endif - -__BEGIN_DECLS -int raise(int); -__END_DECLS - -#ifndef _ANSI_SOURCE -__BEGIN_DECLS -void (*bsd_signal(int, void (*)(int)))(int); -//Begin-Libc -#ifndef LIBC_ALIAS_KILL -//End-Libc -int kill(pid_t, int) __DARWIN_ALIAS(kill); -//Begin-Libc -#else /* LIBC_ALIAS_KILL */ -int kill(pid_t, int) LIBC_ALIAS(kill); -#endif /* !LIBC_ALIAS_KILL */ -//End-Libc -//Begin-Libc -#ifndef LIBC_ALIAS_KILLPG -//End-Libc -int killpg(pid_t, int) __DARWIN_ALIAS(killpg); -//Begin-Libc -#else /* LIBC_ALIAS_KILLPG */ -int killpg(pid_t, int) LIBC_ALIAS(killpg); -#endif /* !LIBC_ALIAS_KILLPG */ -//End-Libc -int pthread_kill(pthread_t, int); -//Begin-Libc -#ifndef LIBC_ALIAS_PTHREAD_SIGMASK -//End-Libc -int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIAS(pthread_sigmask); -//Begin-Libc -#else /* LIBC_ALIAS_PTHREAD_SIGMASK */ -int pthread_sigmask(int, const sigset_t *, sigset_t *) LIBC_ALIAS(pthread_sigmask); -#endif /* !LIBC_ALIAS_PTHREAD_SIGMASK */ -//End-Libc -int sigaction(int, const struct sigaction * __restrict, - struct sigaction * __restrict); -int sigaddset(sigset_t *, int); -//Begin-Libc -#ifndef LIBC_ALIAS_SIGALTSTACK -//End-Libc -int sigaltstack(const stack_t * __restrict, stack_t * __restrict) __DARWIN_ALIAS(sigaltstack); -//Begin-Libc -#else /* LIBC_ALIAS_SIGALTSTACK */ -int sigaltstack(const stack_t * __restrict, stack_t * __restrict) LIBC_ALIAS(sigaltstack); -#endif /* !LIBC_ALIAS_SIGALTSTACK */ -//End-Libc -int sigdelset(sigset_t *, int); -int sigemptyset(sigset_t *); -int sigfillset(sigset_t *); -int sighold(int); -int sigignore(int); -int siginterrupt(int, int); -int sigismember(const sigset_t *, int); -//Begin-Libc -#ifndef LIBC_ALIAS_SIGPAUSE -//End-Libc -int sigpause(int) __DARWIN_ALIAS_C(sigpause); -//Begin-Libc -#else /* LIBC_ALIAS_SIGPAUSE */ -int sigpause(int) LIBC_ALIAS_C(sigpause); -#endif /* !LIBC_ALIAS_SIGPAUSE */ -//End-Libc -int sigpending(sigset_t *); -int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict); -int sigrelse(int); -void (*sigset(int, void (*)(int)))(int); -//Begin-Libc -#ifndef LIBC_ALIAS_SIGSUSPEND -//End-Libc -int sigsuspend(const sigset_t *) __DARWIN_ALIAS_C(sigsuspend); -//Begin-Libc -#else /* LIBC_ALIAS_SIGSUSPEND */ -int sigsuspend(const sigset_t *) LIBC_ALIAS_C(sigsuspend); -#endif /* !LIBC_ALIAS_SIGSUSPEND */ -//End-Libc -//Begin-Libc -#ifndef LIBC_ALIAS_SIGWAIT -//End-Libc -int sigwait(const sigset_t * __restrict, int * __restrict) __DARWIN_ALIAS_C(sigwait); -//Begin-Libc -#else /* LIBC_ALIAS_SIGWAIT */ -int sigwait(const sigset_t * __restrict, int * __restrict) LIBC_ALIAS_C(sigwait); -#endif /* !LIBC_ALIAS_SIGWAIT */ -//End-Libc -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -void psignal(unsigned int, const char *); -int sigblock(int); -int sigsetmask(int); -int sigvec(int, struct sigvec *, struct sigvec *); -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -__END_DECLS - -/* List definitions after function declarations, or Reiser cpp gets upset. */ -#if defined(__i386__) || defined(__x86_64__) -/* The left shift operator on intel is modulo 32 */ -static __inline int -__sigbits(int __signo) -{ - return __signo > __DARWIN_NSIG ? 0 : (1 << (__signo - 1)); -} -#else /* !__i386__ && !__x86_64__ */ -#define __sigbits(signo) (1 << ((signo) - 1)) -#endif /* __i386__ || __x86_64__ */ - -#define sigaddset(set, signo) (*(set) |= __sigbits(signo), 0) -#define sigdelset(set, signo) (*(set) &= ~__sigbits(signo), 0) -#define sigismember(set, signo) ((*(set) & __sigbits(signo)) != 0) -#define sigemptyset(set) (*(set) = 0, 0) -#define sigfillset(set) (*(set) = ~(sigset_t)0, 0) -#endif /* !_ANSI_SOURCE */ - -#endif /* !_USER_SIGNAL_H */ diff --git a/i386/include/stdarg.h b/i386/include/stdarg.h deleted file mode 100644 index ede00f0..0000000 --- a/i386/include/stdarg.h +++ /dev/null @@ -1,133 +0,0 @@ -/* Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GCC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, if you include this header file into source - files compiled by GCC, this header file does not by itself cause - the resulting executable to be covered by the GNU General Public - License. This exception does not however invalidate any other - reasons why the executable file might be covered by the GNU General - Public License. */ - -/* - * ISO C Standard: 7.15 Variable arguments <stdarg.h> - */ - -#ifndef _STDARG_H -#ifndef _ANSI_STDARG_H_ -#ifndef __need___va_list -#define _STDARG_H -#define _ANSI_STDARG_H_ -#endif /* not __need___va_list */ -#undef __need___va_list - -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -typedef __builtin_va_list __gnuc_va_list; -#endif - -/* Define the standard macros for the user, - if this invocation was from the user program. */ -#ifdef _STDARG_H - -#define va_start(v,l) __builtin_va_start(v,l) -#define va_end(v) __builtin_va_end(v) -#define va_arg(v,l) __builtin_va_arg(v,l) -#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L -#define va_copy(d,s) __builtin_va_copy(d,s) -#endif -#define __va_copy(d,s) __builtin_va_copy(d,s) - -/* Define va_list, if desired, from __gnuc_va_list. */ -/* We deliberately do not define va_list when called from - stdio.h, because ANSI C says that stdio.h is not supposed to define - va_list. stdio.h needs to have access to that data type, - but must not use that name. It should use the name __gnuc_va_list, - which is safe because it is reserved for the implementation. */ - -#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */ -#undef _VA_LIST -#endif - -#ifdef _BSD_VA_LIST -#undef _BSD_VA_LIST -#endif - -#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST)) -/* SVR4.2 uses _VA_LIST for an internal alias for va_list, - so we must avoid testing it and setting it here. - SVR4 uses _VA_LIST as a flag in stdarg.h, but we should - have no conflict with that. */ -#ifndef _VA_LIST_ -#define _VA_LIST_ -#ifdef __i860__ -#ifndef _VA_LIST -#define _VA_LIST va_list -#endif -#endif /* __i860__ */ -typedef __gnuc_va_list va_list; -#ifdef _SCO_DS -#define __VA_LIST -#endif -#endif /* _VA_LIST_ */ -#else /* not __svr4__ || _SCO_DS */ - -/* The macro _VA_LIST_ is the same thing used by this file in Ultrix. - But on BSD NET2 we must not test or define or undef it. - (Note that the comments in NET 2's ansi.h - are incorrect for _VA_LIST_--see stdio.h!) */ -#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT) -/* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */ -#ifndef _VA_LIST_DEFINED -/* The macro _VA_LIST is used in SCO Unix 3.2. */ -#ifndef _VA_LIST -/* The macro _VA_LIST_T_H is used in the Bull dpx2 */ -#ifndef _VA_LIST_T_H -/* The macro __va_list__ is used by BeOS. */ -#ifndef __va_list__ -typedef __gnuc_va_list va_list; -#endif /* not __va_list__ */ -#endif /* not _VA_LIST_T_H */ -#endif /* not _VA_LIST */ -#endif /* not _VA_LIST_DEFINED */ -#if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__)) -#define _VA_LIST_ -#endif -#ifndef _VA_LIST -#define _VA_LIST -#endif -#ifndef _VA_LIST_DEFINED -#define _VA_LIST_DEFINED -#endif -#ifndef _VA_LIST_T_H -#define _VA_LIST_T_H -#endif -#ifndef __va_list__ -#define __va_list__ -#endif - -#endif /* not _VA_LIST_, except on certain systems */ - -#endif /* not __svr4__ */ - -#endif /* _STDARG_H */ - -#endif /* not _ANSI_STDARG_H_ */ -#endif /* not _STDARG_H */ diff --git a/i386/include/stdbool.h b/i386/include/stdbool.h deleted file mode 100644 index 994cee8..0000000 --- a/i386/include/stdbool.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2000 Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org> - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * $FreeBSD: src/include/stdbool.h,v 1.6 2002/08/16 07:33:14 alfred Exp $ - */ - -#ifndef _STDBOOL_H_ -#define _STDBOOL_H_ - -#define __bool_true_false_are_defined 1 - -#ifndef __cplusplus - -#define bool _Bool -#if __STDC_VERSION__ < 199901L && __GNUC__ < 3 -typedef int _Bool; -#endif - -#define false (bool)0 -#define true (bool)1 - -#endif /* !__cplusplus */ - -#endif /* !_STDBOOL_H_ */ diff --git a/i386/include/stddef.h b/i386/include/stddef.h deleted file mode 100644 index 9fc87ee..0000000 --- a/i386/include/stddef.h +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* $OpenBSD: stddef.h,v 1.2 1997/09/21 10:45:52 niklas Exp $ */ -/* $NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)stddef.h 5.5 (Berkeley) 4/3/91 - */ - -#if !defined(__STDDEF_H__) - -#if !defined(__need_wchar_t) && !defined(__need_size_t) \ - && !defined(__need_ptrdiff_t) && !defined(__need_NULL) \ - && !defined(__need_wint_t) -#define __STDDEF_H__ -#endif /* none of __need_* defined */ - -#include <sys/_types.h> - -#if defined(__STDDEF_H__) || defined(__need_ptrdiff_t) -#ifndef _PTRDIFF_T -#define _PTRDIFF_T -typedef __darwin_ptrdiff_t ptrdiff_t; -#endif /* _PTRDIFF_T */ -#endif /* __STDDEF_H__ || __need_ptrdiff_t */ - -#if defined(__STDDEF_H__) || defined(__need_size_t) -#ifndef _SIZE_T -#define _SIZE_T -/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: - * _GCC_SIZE_T */ -typedef __darwin_size_t size_t; -#endif /* _SIZE_T */ -#endif /* __STDDEF_H__ || __need_size_t */ - -#if defined(__STDDEF_H__) || defined(__need_wchar_t) -#ifndef __cplusplus -#ifndef _WCHAR_T -#define _WCHAR_T -typedef __darwin_wchar_t wchar_t; -#endif /* _WCHAR_T */ -#endif /* __cplusplus */ -#endif /* __STDDEF_H__ || __need_wchar_t */ - -#if (defined(__STDDEF_H__) && !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))) \ - || defined(__need_wint_t) -#ifndef _WINT_T -#define _WINT_T -typedef __darwin_wint_t wint_t; -#endif /* _WINT_T */ -#endif /* __STDDEF_H__ && !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) || __need_wchar_t */ - -#if defined(__STDDEF_H__) || defined(__need_NULL) -#ifndef NULL -#define NULL __DARWIN_NULL -#endif /* ! NULL */ -#endif /* __STDDEF_H__ || __need_NULL */ - -#ifdef __STDDEF_H__ -#if defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 5 || __GNUC__ > 3) -#ifndef __offsetof /* Deprecated: for source compatability only */ -#define __offsetof(type, field) __builtin_offsetof(type, field) -#endif -#define offsetof(type, field) __builtin_offsetof(type, field) -#else /* ! (gcc >= 3.5) */ -#ifndef __offsetof /* Deprecated: for source compatability only */ -#define __offsetof(type, field) ((size_t)(&((type *)0)->field)) -#endif -#define offsetof(type, field) ((size_t)(&((type *)0)->field)) -#endif /* (gcc >= 3.5) */ -#endif /* __STDDEF_H__ */ - -#endif /* __STDDEF_H__ */ - -#undef __need_ptrdiff_t -#undef __need_size_t -#undef __need_wchar_t -#undef __need_wint_t -#undef __need_NULL diff --git a/i386/include/stdint.h b/i386/include/stdint.h deleted file mode 100644 index 1126b56..0000000 --- a/i386/include/stdint.h +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright (c) 2000, 2001, 2003, 2004, 2008 Apple Computer, Inc. - * All rights reserved. - */ - -#ifndef _STDINT_H_ -#define _STDINT_H_ - -#if __LP64__ -#define __WORDSIZE 64 -#else -#define __WORDSIZE 32 -#endif - -/* from ISO/IEC 988:1999 spec */ - -/* 7.18.1.1 Exact-width integer types */ -#ifndef _INT8_T -#define _INT8_T -typedef signed char int8_t; -#endif /*_INT8_T */ - -#ifndef _INT16_T -#define _INT16_T -typedef short int16_t; -#endif /* _INT16_T */ - -#ifndef _INT32_T -#define _INT32_T -typedef int int32_t; -#endif /* _INT32_T */ - -#ifndef _INT64_T -#define _INT64_T -typedef long long int64_t; -#endif /* _INT64_T */ - -#ifndef _UINT8_T -#define _UINT8_T -typedef unsigned char uint8_t; -#endif /*_UINT8_T */ - -#ifndef _UINT16_T -#define _UINT16_T -typedef unsigned short uint16_t; -#endif /* _UINT16_T */ - -#ifndef _UINT32_T -#define _UINT32_T -typedef unsigned int uint32_t; -#endif /* _UINT32_T */ - -#ifndef _UINT64_T -#define _UINT64_T -typedef unsigned long long uint64_t; -#endif /* _UINT64_T */ - -/* 7.18.1.2 Minimum-width integer types */ -typedef int8_t int_least8_t; -typedef int16_t int_least16_t; -typedef int32_t int_least32_t; -typedef int64_t int_least64_t; -typedef uint8_t uint_least8_t; -typedef uint16_t uint_least16_t; -typedef uint32_t uint_least32_t; -typedef uint64_t uint_least64_t; - - -/* 7.18.1.3 Fastest-width integer types */ -typedef int8_t int_fast8_t; -typedef int16_t int_fast16_t; -typedef int32_t int_fast32_t; -typedef int64_t int_fast64_t; -typedef uint8_t uint_fast8_t; -typedef uint16_t uint_fast16_t; -typedef uint32_t uint_fast32_t; -typedef uint64_t uint_fast64_t; - - -/* 7.18.1.4 Integer types capable of holding object pointers */ - -#ifndef _INTPTR_T -#define _INTPTR_T -typedef long intptr_t; -#endif /* _INTPTR_T */ - -#ifndef _UINTPTR_T -#define _UINTPTR_T -typedef unsigned long uintptr_t; -#endif /* _UINTPTR_T */ - - -/* 7.18.1.5 Greatest-width integer types */ -#ifndef _INTMAX_T -#define _INTMAX_T -#ifdef __INTMAX_TYPE__ -typedef __INTMAX_TYPE__ intmax_t; -#else /* __INTMAX_TYPE__ */ -typedef long long intmax_t; -#endif /* __INTMAX_TYPE__ */ -#endif /* _INTMAX_T */ - -#ifndef _UINTMAX_T -#define _UINTMAX_T -#ifdef __UINTMAX_TYPE__ -typedef __UINTMAX_TYPE__ uintmax_t; -#else /* __UINTMAX_TYPE__ */ -typedef unsigned long long uintmax_t; -#endif /* __UINTMAX_TYPE__ */ -#endif /* _UINTMAX_T */ - -/* 7.18.2 Limits of specified-width integer types: - * These #defines specify the minimum and maximum limits - * of each of the types declared above. - */ - - -/* 7.18.2.1 Limits of exact-width integer types */ -#define INT8_MAX 127 -#define INT16_MAX 32767 -#define INT32_MAX 2147483647 -#define INT64_MAX 9223372036854775807LL - -#define INT8_MIN -128 -#define INT16_MIN -32768 - /* - Note: the literal "most negative int" cannot be written in C -- - the rules in the standard (section 6.4.4.1 in C99) will give it - an unsigned type, so INT32_MIN (and the most negative member of - any larger signed type) must be written via a constant expression. - */ -#define INT32_MIN (-INT32_MAX-1) -#define INT64_MIN (-INT64_MAX-1) - -#define UINT8_MAX 255 -#define UINT16_MAX 65535 -#define UINT32_MAX 4294967295U -#define UINT64_MAX 18446744073709551615ULL - -/* 7.18.2.2 Limits of minimum-width integer types */ -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST64_MIN INT64_MIN - -#define INT_LEAST8_MAX INT8_MAX -#define INT_LEAST16_MAX INT16_MAX -#define INT_LEAST32_MAX INT32_MAX -#define INT_LEAST64_MAX INT64_MAX - -#define UINT_LEAST8_MAX UINT8_MAX -#define UINT_LEAST16_MAX UINT16_MAX -#define UINT_LEAST32_MAX UINT32_MAX -#define UINT_LEAST64_MAX UINT64_MAX - -/* 7.18.2.3 Limits of fastest minimum-width integer types */ -#define INT_FAST8_MIN INT8_MIN -#define INT_FAST16_MIN INT16_MIN -#define INT_FAST32_MIN INT32_MIN -#define INT_FAST64_MIN INT64_MIN - -#define INT_FAST8_MAX INT8_MAX -#define INT_FAST16_MAX INT16_MAX -#define INT_FAST32_MAX INT32_MAX -#define INT_FAST64_MAX INT64_MAX - -#define UINT_FAST8_MAX UINT8_MAX -#define UINT_FAST16_MAX UINT16_MAX -#define UINT_FAST32_MAX UINT32_MAX -#define UINT_FAST64_MAX UINT64_MAX - -/* 7.18.2.4 Limits of integer types capable of holding object pointers */ - -#if __WORDSIZE == 64 -#define INTPTR_MIN INT64_MIN -#define INTPTR_MAX INT64_MAX -#else -#define INTPTR_MIN INT32_MIN -#define INTPTR_MAX INT32_MAX -#endif - -#if __WORDSIZE == 64 -#define UINTPTR_MAX UINT64_MAX -#else -#define UINTPTR_MAX UINT32_MAX -#endif - -/* 7.18.2.5 Limits of greatest-width integer types */ -#define INTMAX_MIN INT64_MIN -#define INTMAX_MAX INT64_MAX - -#define UINTMAX_MAX UINT64_MAX - -/* 7.18.3 "Other" */ -#if __WORDSIZE == 64 -#define PTRDIFF_MIN INT64_MIN -#define PTRDIFF_MAX INT64_MAX -#else -#define PTRDIFF_MIN INT32_MIN -#define PTRDIFF_MAX INT32_MAX -#endif - -/* We have no sig_atomic_t yet, so no SIG_ATOMIC_{MIN,MAX}. - Should end up being {-127,127} or {0,255} ... or bigger. - My bet would be on one of {U}INT32_{MIN,MAX}. */ - -#if __WORDSIZE == 64 -#define SIZE_MAX UINT64_MAX -#else -#define SIZE_MAX UINT32_MAX -#endif - -#ifndef WCHAR_MAX -# ifdef __WCHAR_MAX__ -# define WCHAR_MAX __WCHAR_MAX__ -# else -# define WCHAR_MAX 0x7fffffff -# endif -#endif - -/* WCHAR_MIN should be 0 if wchar_t is an unsigned type and - (-WCHAR_MAX-1) if wchar_t is a signed type. Unfortunately, - it turns out that -fshort-wchar changes the signedness of - the type. */ -#ifndef WCHAR_MIN -# if WCHAR_MAX == 0xffff -# define WCHAR_MIN 0 -# else -# define WCHAR_MIN (-WCHAR_MAX-1) -# endif -#endif - -#define WINT_MIN INT32_MIN -#define WINT_MAX INT32_MAX - -#define SIG_ATOMIC_MIN INT32_MIN -#define SIG_ATOMIC_MAX INT32_MAX - -/* 7.18.4 Macros for integer constants */ -#define INT8_C(v) (v) -#define INT16_C(v) (v) -#define INT32_C(v) (v) -#define INT64_C(v) (v ## LL) - -#define UINT8_C(v) (v ## U) -#define UINT16_C(v) (v ## U) -#define UINT32_C(v) (v ## U) -#define UINT64_C(v) (v ## ULL) - -#define INTMAX_C(v) (v ## LL) -#define UINTMAX_C(v) (v ## ULL) - -#endif /* _STDINT_H_ */ diff --git a/i386/include/stdio.h b/i386/include/stdio.h deleted file mode 100644 index 455960c..0000000 --- a/i386/include/stdio.h +++ /dev/null @@ -1,503 +0,0 @@ -/* - * Copyright (c) 2000, 2005, 2007, 2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Chris Torek. - * - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)stdio.h 8.5 (Berkeley) 4/29/95 - */ - -#ifndef _STDIO_H_ -#define _STDIO_H_ - -#include <_types.h> - -#ifndef _VA_LIST -#define _VA_LIST -/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: - * __gnuc_va_list and include <stdarg.h> */ -typedef __darwin_va_list va_list; -#endif - -#ifndef _OFF_T -#define _OFF_T -typedef __darwin_off_t off_t; -#endif - -#ifndef _SIZE_T -#define _SIZE_T -typedef __darwin_size_t size_t; -#endif - -#ifndef NULL -#define NULL __DARWIN_NULL -#endif /* ! NULL */ - -typedef __darwin_off_t fpos_t; - -#define _FSTDIO /* Define for new stdio with functions. */ - -/* - * NB: to fit things in six character monocase externals, the stdio - * code uses the prefix `__s' for stdio objects, typically followed - * by a three-character attempt at a mnemonic. - */ - -/* stdio buffers */ -struct __sbuf { - unsigned char *_base; - int _size; -}; - -/* hold a buncha junk that would grow the ABI */ -struct __sFILEX; - -/* - * stdio state variables. - * - * The following always hold: - * - * if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), - * _lbfsize is -_bf._size, else _lbfsize is 0 - * if _flags&__SRD, _w is 0 - * if _flags&__SWR, _r is 0 - * - * This ensures that the getc and putc macros (or inline functions) never - * try to write or read from a file that is in `read' or `write' mode. - * (Moreover, they can, and do, automatically switch from read mode to - * write mode, and back, on "r+" and "w+" files.) - * - * _lbfsize is used only to make the inline line-buffered output stream - * code as compact as possible. - * - * _ub, _up, and _ur are used when ungetc() pushes back more characters - * than fit in the current _bf, or when ungetc() pushes back a character - * that does not match the previous one in _bf. When this happens, - * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff - * _ub._base!=NULL) and _up and _ur save the current values of _p and _r. - * - * NB: see WARNING above before changing the layout of this structure! - */ -typedef struct __sFILE { - unsigned char *_p; /* current position in (some) buffer */ - int _r; /* read space left for getc() */ - int _w; /* write space left for putc() */ - short _flags; /* flags, below; this FILE is free if 0 */ - short _file; /* fileno, if Unix descriptor, else -1 */ - struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */ - int _lbfsize; /* 0 or -_bf._size, for inline putc */ - - /* operations */ - void *_cookie; /* cookie passed to io functions */ - int (*_close)(void *); - int (*_read) (void *, char *, int); - fpos_t (*_seek) (void *, fpos_t, int); - int (*_write)(void *, const char *, int); - - /* separate buffer for long sequences of ungetc() */ - struct __sbuf _ub; /* ungetc buffer */ - struct __sFILEX *_extra; /* additions to FILE to not break ABI */ - int _ur; /* saved _r when _r is counting ungetc data */ - - /* tricks to meet minimum requirements even when malloc() fails */ - unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */ - unsigned char _nbuf[1]; /* guarantee a getc() buffer */ - - /* separate buffer for fgetln() when line crosses buffer boundary */ - struct __sbuf _lb; /* buffer for fgetln() */ - - /* Unix stdio files get aligned to block boundaries on fseek() */ - int _blksize; /* stat.st_blksize (may be != _bf._size) */ - fpos_t _offset; /* current lseek offset (see WARNING) */ -} FILE; - -__BEGIN_DECLS -#if __DARWIN_UNIX03 -extern FILE *__stdinp; -extern FILE *__stdoutp; -extern FILE *__stderrp; -#else /* !__DARWIN_UNIX03 */ -extern FILE __sF[]; -#endif /* __DARWIN_UNIX03 */ -__END_DECLS - -#define __SLBF 0x0001 /* line buffered */ -#define __SNBF 0x0002 /* unbuffered */ -#define __SRD 0x0004 /* OK to read */ -#define __SWR 0x0008 /* OK to write */ - /* RD and WR are never simultaneously asserted */ -#define __SRW 0x0010 /* open for reading & writing */ -#define __SEOF 0x0020 /* found EOF */ -#define __SERR 0x0040 /* found error */ -#define __SMBF 0x0080 /* _buf is from malloc */ -#define __SAPP 0x0100 /* fdopen()ed in append mode */ -#define __SSTR 0x0200 /* this is an sprintf/snprintf string */ -#define __SOPT 0x0400 /* do fseek() optimisation */ -#define __SNPT 0x0800 /* do not do fseek() optimisation */ -#define __SOFF 0x1000 /* set iff _offset is in fact correct */ -#define __SMOD 0x2000 /* true => fgetln modified _p text */ -#define __SALC 0x4000 /* allocate string space dynamically */ -#define __SIGN 0x8000 /* ignore this file in _fwalk */ - -/* - * The following three definitions are for ANSI C, which took them - * from System V, which brilliantly took internal interface macros and - * made them official arguments to setvbuf(), without renaming them. - * Hence, these ugly _IOxxx names are *supposed* to appear in user code. - * - * Although numbered as their counterparts above, the implementation - * does not rely on this. - */ -#define _IOFBF 0 /* setvbuf should set fully buffered */ -#define _IOLBF 1 /* setvbuf should set line buffered */ -#define _IONBF 2 /* setvbuf should set unbuffered */ - -#define BUFSIZ 1024 /* size of buffer used by setbuf */ -#define EOF (-1) - -/* - * FOPEN_MAX is a minimum maximum, and is the number of streams that - * stdio can provide without attempting to allocate further resources - * (which could fail). Do not use this for anything. - */ - /* must be == _POSIX_STREAM_MAX <limits.h> */ -#define FOPEN_MAX 20 /* must be <= OPEN_MAX <sys/syslimits.h> */ -#define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */ - -/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */ -#ifndef _ANSI_SOURCE -#define P_tmpdir "/var/tmp/" -#endif -#define L_tmpnam 1024 /* XXX must be == PATH_MAX */ -#define TMP_MAX 308915776 - -#ifndef SEEK_SET -#define SEEK_SET 0 /* set file offset to offset */ -#endif -#ifndef SEEK_CUR -#define SEEK_CUR 1 /* set file offset to current plus offset */ -#endif -#ifndef SEEK_END -#define SEEK_END 2 /* set file offset to EOF plus offset */ -#endif - -#if __DARWIN_UNIX03 -#define stdin __stdinp -#define stdout __stdoutp -#define stderr __stderrp -#else /* !__DARWIN_UNIX03 */ -#define stdin (&__sF[0]) -#define stdout (&__sF[1]) -#define stderr (&__sF[2]) -#endif /* __DARWIN_UNIX03 */ - -/* - * Functions defined in ANSI C standard. - */ -__BEGIN_DECLS -void clearerr(FILE *); -int fclose(FILE *); -int feof(FILE *); -int ferror(FILE *); -int fflush(FILE *); -int fgetc(FILE *); -int fgetpos(FILE * __restrict, fpos_t *); -char *fgets(char * __restrict, int, FILE *); -#if defined(__DARWIN_10_6_AND_LATER) && (defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE)) -FILE *fopen(const char * __restrict, const char * __restrict) __DARWIN_EXTSN(fopen); -#else /* < 10.6 || !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */ -//Begin-Libc -#ifndef LIBC_ALIAS_FOPEN -//End-Libc -FILE *fopen(const char * __restrict, const char * __restrict) __DARWIN_10_6_AND_LATER_ALIAS(__DARWIN_ALIAS(fopen)); -//Begin-Libc -#else /* LIBC_ALIAS_FOPEN */ -FILE *fopen(const char * __restrict, const char * __restrict) LIBC_ALIAS(fopen); -#endif /* !LIBC_ALIAS_FOPEN */ -//End-Libc -#endif /* >= 10.6 &&_(DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */ -int fprintf(FILE * __restrict, const char * __restrict, ...) __DARWIN_LDBL_COMPAT(fprintf); -int fputc(int, FILE *); -//Begin-Libc -#ifndef LIBC_ALIAS_FPUTS -//End-Libc -int fputs(const char * __restrict, FILE * __restrict) __DARWIN_ALIAS(fputs); -//Begin-Libc -#else /* LIBC_ALIAS_FPUTS */ -int fputs(const char * __restrict, FILE * __restrict) LIBC_ALIAS(fputs); -#endif /* !LIBC_ALIAS_FPUTS */ -//End-Libc -size_t fread(void * __restrict, size_t, size_t, FILE * __restrict); -//Begin-Libc -#ifndef LIBC_ALIAS_FREOPEN -//End-Libc -FILE *freopen(const char * __restrict, const char * __restrict, - FILE * __restrict) __DARWIN_ALIAS(freopen); -//Begin-Libc -#else /* LIBC_ALIAS_FREOPEN */ -FILE *freopen(const char * __restrict, const char * __restrict, - FILE * __restrict) LIBC_ALIAS(freopen); -#endif /* !LIBC_ALIAS_FREOPEN */ -//End-Libc -int fscanf(FILE * __restrict, const char * __restrict, ...) __DARWIN_LDBL_COMPAT(fscanf); -int fseek(FILE *, long, int); -int fsetpos(FILE *, const fpos_t *); -long ftell(FILE *); -//Begin-Libc -#ifndef LIBC_ALIAS_FWRITE -//End-Libc -size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict) __DARWIN_ALIAS(fwrite); -//Begin-Libc -#else /* LIBC_ALIAS_FWRITE */ -size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict) LIBC_ALIAS(fwrite); -#endif /* !LIBC_ALIAS_FWRITE */ -//End-Libc -int getc(FILE *); -int getchar(void); -char *gets(char *); -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -extern __const int sys_nerr; /* perror(3) external variables */ -extern __const char *__const sys_errlist[]; -#endif -void perror(const char *); -int printf(const char * __restrict, ...) __DARWIN_LDBL_COMPAT(printf); -int putc(int, FILE *); -int putchar(int); -int puts(const char *); -int remove(const char *); -int rename (const char *, const char *); -void rewind(FILE *); -int scanf(const char * __restrict, ...) __DARWIN_LDBL_COMPAT(scanf); -void setbuf(FILE * __restrict, char * __restrict); -int setvbuf(FILE * __restrict, char * __restrict, int, size_t); -int sprintf(char * __restrict, const char * __restrict, ...) __DARWIN_LDBL_COMPAT(sprintf); -int sscanf(const char * __restrict, const char * __restrict, ...) __DARWIN_LDBL_COMPAT(sscanf); -FILE *tmpfile(void); -char *tmpnam(char *); -int ungetc(int, FILE *); -int vfprintf(FILE * __restrict, const char * __restrict, va_list) __DARWIN_LDBL_COMPAT(vfprintf); -int vprintf(const char * __restrict, va_list) __DARWIN_LDBL_COMPAT(vprintf); -int vsprintf(char * __restrict, const char * __restrict, va_list) __DARWIN_LDBL_COMPAT(vsprintf); -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -int asprintf(char **, const char *, ...) __DARWIN_LDBL_COMPAT(asprintf); -int vasprintf(char **, const char *, va_list) __DARWIN_LDBL_COMPAT(vasprintf); -#endif -__END_DECLS - -/* - * Functions defined in POSIX 1003.1. - */ -#ifndef _ANSI_SOURCE -#define L_ctermid 1024 /* size for ctermid(); PATH_MAX */ - -__BEGIN_DECLS -char *ctermid(char *); -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -char *ctermid_r(char *); -#endif /* not POSIX */ -#if defined(__DARWIN_10_6_AND_LATER) && (defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE)) -FILE *fdopen(int, const char *) __DARWIN_EXTSN(fdopen); -#else /* < 10.6 || !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */ -//Begin-Libc -#ifndef LIBC_ALIAS_FDOPEN -//End-Libc -FILE *fdopen(int, const char *) __DARWIN_10_6_AND_LATER_ALIAS(__DARWIN_ALIAS(fdopen)); -//Begin-Libc -#else /* LIBC_ALIAS_FDOPEN */ -FILE *fdopen(int, const char *) LIBC_ALIAS(fdopen); -#endif /* !LIBC_ALIAS_FDOPEN */ -//End-Libc -#endif /* >= 10.6 &&_(DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -char *fgetln(FILE *, size_t *); -#endif /* not POSIX */ -int fileno(FILE *); -void flockfile(FILE *); -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -__const char - *fmtcheck(const char *, const char *); -int fpurge(FILE *); -#endif /* not POSIX */ -int fseeko(FILE *, off_t, int); -off_t ftello(FILE *); -int ftrylockfile(FILE *); -void funlockfile(FILE *); -int getc_unlocked(FILE *); -int getchar_unlocked(void); -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -int getw(FILE *); -#endif /* not POSIX */ -int pclose(FILE *); -#if defined(__DARWIN_10_6_AND_LATER) && (defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE)) -FILE *popen(const char *, const char *) __DARWIN_EXTSN(popen); -#else /* < 10.6 || !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */ -//Begin-Libc -#ifndef LIBC_ALIAS_POPEN -//End-Libc -FILE *popen(const char *, const char *) __DARWIN_10_6_AND_LATER_ALIAS(__DARWIN_ALIAS(popen)); -//Begin-Libc -#else /* LIBC_ALIAS_POPEN */ -FILE *popen(const char *, const char *) LIBC_ALIAS(popen); -#endif /* !LIBC_ALIAS_POPEN */ -//End-Libc -#endif /* >= 10.6 &&_(DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */ -int putc_unlocked(int, FILE *); -int putchar_unlocked(int); -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -int putw(int, FILE *); -void setbuffer(FILE *, char *, int); -int setlinebuf(FILE *); -#endif /* not POSIX */ -int snprintf(char * __restrict, size_t, const char * __restrict, ...) __DARWIN_LDBL_COMPAT(snprintf); -//Begin-Libc -#ifndef LIBC_ALIAS_TEMPNAM -//End-Libc -char *tempnam(const char *, const char *) __DARWIN_ALIAS(tempnam); -//Begin-Libc -#else /* LIBC_ALIAS_TEMPNAM */ -char *tempnam(const char *, const char *) LIBC_ALIAS(tempnam); -#endif /* !LIBC_ALIAS_TEMPNAM */ -//End-Libc -int vfscanf(FILE * __restrict, const char * __restrict, va_list) __DARWIN_LDBL_COMPAT(vfscanf); -int vscanf(const char * __restrict, va_list) __DARWIN_LDBL_COMPAT(vscanf); -int vsnprintf(char * __restrict, size_t, const char * __restrict, va_list) __DARWIN_LDBL_COMPAT(vsnprintf); -int vsscanf(const char * __restrict, const char * __restrict, va_list) __DARWIN_LDBL_COMPAT(vsscanf); -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -FILE *zopen(const char *, const char *, int); -#endif /* not POSIX */ -__END_DECLS - -/* - * Stdio function-access interface. - */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -__BEGIN_DECLS -FILE *funopen(const void *, - int (*)(void *, char *, int), - int (*)(void *, const char *, int), - fpos_t (*)(void *, fpos_t, int), - int (*)(void *)); -__END_DECLS -#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0) -#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) -#endif /* not POSIX */ -#endif /* not ANSI */ - -/* - * Functions internal to the implementation. - */ -__BEGIN_DECLS -int __srget(FILE *); -int __svfscanf(FILE *, const char *, va_list) __DARWIN_LDBL_COMPAT(__svfscanf); -int __swbuf(int, FILE *); -__END_DECLS - -/* - * The __sfoo macros are here so that we can - * define function versions in the C library. - */ -#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++)) -#if defined(__GNUC__) && defined(__STDC__) -static __inline int __sputc(int _c, FILE *_p) { - if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) - return (*_p->_p++ = _c); - else - return (__swbuf(_c, _p)); -} -#else -/* - * This has been tuned to generate reasonable code on the vax using pcc. - */ -#define __sputc(c, p) \ - (--(p)->_w < 0 ? \ - (p)->_w >= (p)->_lbfsize ? \ - (*(p)->_p = (c)), *(p)->_p != '\n' ? \ - (int)*(p)->_p++ : \ - __swbuf('\n', p) : \ - __swbuf((int)(c), p) : \ - (*(p)->_p = (c), (int)*(p)->_p++)) -#endif - -#define __sfeof(p) (((p)->_flags & __SEOF) != 0) -#define __sferror(p) (((p)->_flags & __SERR) != 0) -#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) -#define __sfileno(p) ((p)->_file) - -#ifndef _ANSI_SOURCE -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define feof_unlocked(p) __sfeof(p) -#define ferror_unlocked(p) __sferror(p) -#define clearerr_unlocked(p) __sclearerr(p) -#define fileno_unlocked(p) __sfileno(p) -#endif /* not POSIX */ - -#ifndef lint -#define getc_unlocked(fp) __sgetc(fp) -#define putc_unlocked(x, fp) __sputc(x, fp) -#endif /* lint */ - -#define getchar_unlocked() getc_unlocked(stdin) -#define putchar_unlocked(x) putc_unlocked(x, stdout) -#endif /* not ANSI */ - -#ifdef _USE_EXTENDED_LOCALES_ -#include <xlocale/_stdio.h> -#endif /* _USE_EXTENDED_LOCALES_ */ - -#if defined (__GNUC__) && _FORTIFY_SOURCE > 0 && !defined (__cplusplus) -/* Security checking functions. */ -#include <secure/_stdio.h> -#endif - -#endif /* _STDIO_H_ */ diff --git a/i386/include/stdlib.h b/i386/include/stdlib.h deleted file mode 100644 index a177dbb..0000000 --- a/i386/include/stdlib.h +++ /dev/null @@ -1,320 +0,0 @@ -/* - * Copyright (c) 2000, 2002 - 2008 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)stdlib.h 8.5 (Berkeley) 5/19/95 - */ - -#ifndef _STDLIB_H_ -#define _STDLIB_H_ - -#include <sys/types.h> - -#ifndef _SIZE_T -#define _SIZE_T -/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: - * _GCC_SIZE_T */ -typedef __darwin_size_t size_t; -#endif - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -#ifndef _CT_RUNE_T -#define _CT_RUNE_T -typedef __darwin_ct_rune_t ct_rune_t; -#endif - -#ifndef _RUNE_T -#define _RUNE_T -typedef __darwin_rune_t rune_t; -#endif -#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -#ifndef __cplusplus -#ifndef _WCHAR_T -#define _WCHAR_T -typedef __darwin_wchar_t wchar_t; -#endif /* _WCHAR_T */ -#endif /* __cplusplus */ - -typedef struct { - int quot; /* quotient */ - int rem; /* remainder */ -} div_t; - -typedef struct { - long quot; /* quotient */ - long rem; /* remainder */ -} ldiv_t; - -#if !__DARWIN_NO_LONG_LONG -typedef struct { - long long quot; - long long rem; -} lldiv_t; -#endif /* !__DARWIN_NO_LONG_LONG */ - -#ifndef NULL -#define NULL __DARWIN_NULL -#endif /* ! NULL */ - -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 - -#define RAND_MAX 0x7fffffff - -#ifdef _USE_EXTENDED_LOCALES_ -#include <_xlocale.h> -#endif /* _USE_EXTENDED_LOCALES_ */ - -#ifndef MB_CUR_MAX -#ifdef _USE_EXTENDED_LOCALES_ -#define MB_CUR_MAX (___mb_cur_max()) -#ifndef MB_CUR_MAX_L -#define MB_CUR_MAX_L(x) (___mb_cur_max_l(x)) -#endif /* !MB_CUR_MAX_L */ -#else /* !_USE_EXTENDED_LOCALES_ */ -extern int __mb_cur_max; -#define MB_CUR_MAX __mb_cur_max -#endif /* _USE_EXTENDED_LOCALES_ */ -#endif /* MB_CUR_MAX */ - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) \ - && defined(_USE_EXTENDED_LOCALES_) && !defined(MB_CUR_MAX_L) -#define MB_CUR_MAX_L(x) (___mb_cur_max_l(x)) -#endif -//Begin-Libc -/* f must be a literal string */ -#define LIBC_ABORT(f,...) abort_report_np("%s:%s:%u: " f, __FILE__, __func__, __LINE__, ## __VA_ARGS__) -//End-Libc - -__BEGIN_DECLS -void abort(void) __dead2; -//Begin-Libc -__private_extern__ -void abort_report_np(const char *, ...) __dead2 __printflike(1, 2); -//End-Libc -int abs(int) __pure2; -int atexit(void (*)(void)); -double atof(const char *); -int atoi(const char *); -long atol(const char *); -#if !__DARWIN_NO_LONG_LONG -long long - atoll(const char *); -#endif /* !__DARWIN_NO_LONG_LONG */ -void *bsearch(const void *, const void *, size_t, - size_t, int (*)(const void *, const void *)); -void *calloc(size_t, size_t); -div_t div(int, int) __pure2; -void exit(int) __dead2; -void free(void *); -char *getenv(const char *); -long labs(long) __pure2; -ldiv_t ldiv(long, long) __pure2; -#if !__DARWIN_NO_LONG_LONG -long long - llabs(long long); -lldiv_t lldiv(long long, long long); -#endif /* !__DARWIN_NO_LONG_LONG */ -void *malloc(size_t); -int mblen(const char *, size_t); -size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); -int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); -int posix_memalign(void **, size_t, size_t); -void qsort(void *, size_t, size_t, - int (*)(const void *, const void *)); -int rand(void); -void *realloc(void *, size_t); -void srand(unsigned); -double strtod(const char *, char **) __DARWIN_ALIAS(strtod); -float strtof(const char *, char **) __DARWIN_ALIAS(strtof); -long strtol(const char *, char **, int); -long double - strtold(const char *, char **) __DARWIN_LDBL_COMPAT(strtold); -#if !__DARWIN_NO_LONG_LONG -long long - strtoll(const char *, char **, int); -#endif /* !__DARWIN_NO_LONG_LONG */ -unsigned long - strtoul(const char *, char **, int); -#if !__DARWIN_NO_LONG_LONG -unsigned long long - strtoull(const char *, char **, int); -#endif /* !__DARWIN_NO_LONG_LONG */ -//Begin-Libc -#ifndef LIBC_ALIAS_SYSTEM -//End-Libc -int system(const char *) __DARWIN_ALIAS_C(system); -//Begin-Libc -#else /* LIBC_ALIAS_SYSTEM */ -int system(const char *) LIBC_ALIAS_C(system); -#endif /* !LIBC_ALIAS_SYSTEM */ -//End-Libc -size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t); -int wctomb(char *, wchar_t); - -#ifndef _ANSI_SOURCE -void _Exit(int) __dead2; -long a64l(const char *); -double drand48(void); -char *ecvt(double, int, int *__restrict, int *__restrict); /* LEGACY */ -double erand48(unsigned short[3]); -char *fcvt(double, int, int *__restrict, int *__restrict); /* LEGACY */ -char *gcvt(double, int, char *); /* LEGACY */ -int getsubopt(char **, char * const *, char **); -int grantpt(int); -#if __DARWIN_UNIX03 -char *initstate(unsigned, char *, size_t); /* no __DARWIN_ALIAS needed */ -#else /* !__DARWIN_UNIX03 */ -char *initstate(unsigned long, char *, long); -#endif /* __DARWIN_UNIX03 */ -long jrand48(unsigned short[3]); -char *l64a(long); -void lcong48(unsigned short[7]); -long lrand48(void); -char *mktemp(char *); -int mkstemp(char *); -long mrand48(void); -long nrand48(unsigned short[3]); -int posix_openpt(int); -char *ptsname(int); -//Begin-Libc -#ifndef LIBC_ALIAS_PUTENV -//End-Libc -int putenv(char *) __DARWIN_ALIAS(putenv); -//Begin-Libc -#else /* LIBC_ALIAS_PUTENV */ -int putenv(char *) LIBC_ALIAS(putenv); -#endif /* !LIBC_ALIAS_PUTENV */ -//End-Libc -long random(void); -int rand_r(unsigned *); -//Begin-Libc -#ifdef __LIBC__ -#ifndef LIBC_ALIAS_REALPATH -char *realpath(const char * __restrict, char * __restrict) __DARWIN_EXTSN(realpath); -#else /* LIBC_ALIAS_REALPATH */ -#ifdef VARIANT_DARWINEXTSN -char *realpath(const char * __restrict, char * __restrict) LIBC_EXTSN(realpath); -#else /* !VARIANT_DARWINEXTSN */ -char *realpath(const char * __restrict, char * __restrict) LIBC_ALIAS(realpath); -#endif /* VARIANT_DARWINEXTSN */ -#endif /* !LIBC_ALIAS_REALPATH */ -#else /* !__LIBC__ */ -//End-Libc -#if (__DARWIN_UNIX03 && !defined(_POSIX_C_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(_DARWIN_BETTER_REALPATH) -char *realpath(const char * __restrict, char * __restrict) __DARWIN_EXTSN(realpath); -#else /* (!__DARWIN_UNIX03 || _POSIX_C_SOURCE) && !_DARWIN_C_SOURCE && !_DARWIN_BETTER_REALPATH */ -char *realpath(const char * __restrict, char * __restrict) __DARWIN_ALIAS(realpath); -#endif /* (__DARWIN_UNIX03 && _POSIX_C_SOURCE) || _DARWIN_C_SOURCE || _DARWIN_BETTER_REALPATH */ -//Begin-Libc -#endif /* __LIBC__ */ -//End-Libc -unsigned short - *seed48(unsigned short[3]); -//Begin-Libc -#ifndef LIBC_ALIAS_SETENV -//End-Libc -int setenv(const char *, const char *, int) __DARWIN_ALIAS(setenv); -//Begin-Libc -#else /* LIBC_ALIAS_SETENV */ -int setenv(const char *, const char *, int) LIBC_ALIAS(setenv); -#endif /* !LIBC_ALIAS_SETENV */ -//End-Libc -#if __DARWIN_UNIX03 -//Begin-Libc -#ifndef LIBC_ALIAS_SETKEY -//End-Libc -void setkey(const char *) __DARWIN_ALIAS(setkey); -//Begin-Libc -#else /* LIBC_ALIAS_SETKEY */ -void setkey(const char *) LIBC_ALIAS(setkey); -#endif /* !LIBC_ALIAS_SETKEY */ -//End-Libc -#else /* !__DARWIN_UNIX03 */ -int setkey(const char *); -#endif /* __DARWIN_UNIX03 */ -char *setstate(const char *); -void srand48(long); -#if __DARWIN_UNIX03 -void srandom(unsigned); -#else /* !__DARWIN_UNIX03 */ -void srandom(unsigned long); -#endif /* __DARWIN_UNIX03 */ -int unlockpt(int); -#if __DARWIN_UNIX03 -//Begin-Libc -#ifndef LIBC_ALIAS_UNSETENV -//End-Libc -int unsetenv(const char *) __DARWIN_ALIAS(unsetenv); -//Begin-Libc -#else /* LIBC_ALIAS_UNSETENV */ -int unsetenv(const char *) LIBC_ALIAS(unsetenv); -#endif /* !LIBC_ALIAS_UNSETENV */ -//End-Libc -#else /* !__DARWIN_UNIX03 */ -void unsetenv(const char *); -#endif /* __DARWIN_UNIX03 */ -#endif /* !_ANSI_SOURCE */ - -/* Poison the following routines if -fshort-wchar is set */ -#if !defined(__cplusplus) && defined(__WCHAR_MAX__) && __WCHAR_MAX__ <= 0xffffU -#pragma GCC poison mbstowcs mbtowc wcstombs wctomb -#endif -__END_DECLS - -#ifdef _USE_EXTENDED_LOCALES_ -#include <xlocale/_stdlib.h> -#endif /* _USE_EXTENDED_LOCALES_ */ - -#endif /* _STDLIB_H_ */ diff --git a/i386/include/string.h b/i386/include/string.h deleted file mode 100644 index 6c16441..0000000 --- a/i386/include/string.h +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) 2000, 2007 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)string.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _STRING_H_ -#define _STRING_H_ -#include <_types.h> - -#ifndef _SIZE_T -#define _SIZE_T -typedef __darwin_size_t size_t; -#endif - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) /* For swab */ -#ifndef _SSIZE_T -#define _SSIZE_T -typedef __darwin_ssize_t ssize_t; -#endif -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -#ifndef NULL -#define NULL __DARWIN_NULL -#endif /* ! NULL */ - -#include <sys/cdefs.h> - -__BEGIN_DECLS -void *memchr(const void *, int, size_t); -int memcmp(const void *, const void *, size_t); -void *memcpy(void *, const void *, size_t); -void *memmove(void *, const void *, size_t); -void *memset(void *, int, size_t); -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -char *stpcpy(char *, const char *); -char *strcasestr(const char *, const char *); -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -char *strcat(char *, const char *); -char *strchr(const char *, int); -int strcmp(const char *, const char *); -int strcoll(const char *, const char *); -char *strcpy(char *, const char *); -size_t strcspn(const char *, const char *); -//Begin-Libc -#ifndef LIBC_ALIAS_STRERROR -//End-Libc -char *strerror(int) __DARWIN_ALIAS(strerror); -//Begin-Libc -#else /* LIBC_ALIAS_STRERROR */ -char *strerror(int) LIBC_ALIAS(strerror); -#endif /* !LIBC_ALIAS_STRERROR */ -//End-Libc -int strerror_r(int, char *, size_t); -size_t strlen(const char *); -char *strncat(char *, const char *, size_t); -int strncmp(const char *, const char *, size_t); -char *strncpy(char *, const char *, size_t); -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -char *strnstr(const char *, const char *, size_t); -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -char *strpbrk(const char *, const char *); -char *strrchr(const char *, int); -size_t strspn(const char *, const char *); -char *strstr(const char *, const char *); -char *strtok(char *, const char *); -size_t strxfrm(char *, const char *, size_t); - -/* Nonstandard routines */ -#ifndef _ANSI_SOURCE -void *memccpy(void *, const void *, int, size_t); -char *strtok_r(char *, const char *, char **); -char *strdup(const char *); -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -int bcmp(const void *, const void *, size_t); -void bcopy(const void *, void *, size_t); -void bzero(void *, size_t); -int ffs(int); -int ffsl(long); -int fls(int); -int flsl(long); -char *index(const char *, int); -void memset_pattern4(void *, const void *, size_t); -void memset_pattern8(void *, const void *, size_t); -void memset_pattern16(void *, const void *, size_t); -char *rindex(const char *, int); -int strcasecmp(const char *, const char *); -size_t strlcat(char *, const char *, size_t); -size_t strlcpy(char *, const char *, size_t); -void strmode(int, char *); -int strncasecmp(const char *, const char *, size_t); -char *strsep(char **, const char *); -char *strsignal(int sig); -void swab(const void * __restrict, void * __restrict, ssize_t); -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#endif /* !_ANSI_SOURCE */ -__END_DECLS - -#ifdef _USE_EXTENDED_LOCALES_ -#include <xlocale/_string.h> -#endif /* _USE_EXTENDED_LOCALES_ */ - -#endif /* _STRING_H_ */ diff --git a/i386/include/sys/_endian.h b/i386/include/sys/_endian.h deleted file mode 100644 index 3fb0f06..0000000 --- a/i386/include/sys/_endian.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2004, 2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -/* - * Copyright (c) 1995 NeXT Computer, Inc. All rights reserved. - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1987, 1991, 1993 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - */ - -#ifndef _SYS__ENDIAN_H_ -#define _SYS__ENDIAN_H_ - -#include <sys/cdefs.h> - -/* - * Macros for network/external number representation conversion. - */ - -#if defined(lint) - -__BEGIN_DECLS -__uint16_t ntohs(__uint16_t); -__uint16_t htons(__uint16_t); -__uint32_t ntohl(__uint32_t); -__uint32_t htonl(__uint32_t); -__END_DECLS - -#elif __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN - -#define ntohl(x) ((__uint32_t)(x)) -#define ntohs(x) ((__uint16_t)(x)) -#define htonl(x) ((__uint32_t)(x)) -#define htons(x) ((__uint16_t)(x)) - -#if defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -#define NTOHL(x) (x) -#define NTOHS(x) (x) -#define HTONL(x) (x) -#define HTONS(x) (x) -#endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ - -#else /* __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN */ - -#include <libkern/_OSByteOrder.h> - -#define ntohs(x) __DARWIN_OSSwapInt16(x) -#define htons(x) __DARWIN_OSSwapInt16(x) - -#define ntohl(x) __DARWIN_OSSwapInt32(x) -#define htonl(x) __DARWIN_OSSwapInt32(x) - -#if defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -#define NTOHL(x) (x) = ntohl((__uint32_t)x) -#define NTOHS(x) (x) = ntohs((__uint16_t)x) -#define HTONL(x) (x) = htonl((__uint32_t)x) -#define HTONS(x) (x) = htons((__uint16_t)x) -#endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ -#endif /* __DARWIN_BYTE_ORDER */ -#endif /* !_SYS__ENDIAN_H_ */ diff --git a/i386/include/sys/_select.h b/i386/include/sys/_select.h deleted file mode 100644 index 6f70921..0000000 --- a/i386/include/sys/_select.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2005, 2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -/* - * This is called from sys/select.h and sys/time.h for the common prototype - * of select(). Setting _DARWIN_C_SOURCE or _DARWIN_UNLIMITED_SELECT uses - * the version of select() that does not place a limit on the first argument - * (nfds). In the UNIX conformance case, values of nfds greater than - * FD_SETSIZE will return an error of EINVAL. - */ -#ifndef _SYS__SELECT_H_ -#define _SYS__SELECT_H_ - -int select(int, fd_set * __restrict, fd_set * __restrict, - fd_set * __restrict, struct timeval * __restrict) -#if defined(_DARWIN_C_SOURCE) || defined(_DARWIN_UNLIMITED_SELECT) - __DARWIN_EXTSN_C(select) -#else /* !_DARWIN_C_SOURCE && !_DARWIN_UNLIMITED_SELECT */ -# if defined(__LP64__) && !__DARWIN_NON_CANCELABLE - __DARWIN_1050(select) -# else /* !__LP64__ || __DARWIN_NON_CANCELABLE */ - __DARWIN_ALIAS_C(select) -# endif /* __LP64__ && !__DARWIN_NON_CANCELABLE */ -#endif /* _DARWIN_C_SOURCE || _DARWIN_UNLIMITED_SELECT */ - ; - -#endif /* !_SYS__SELECT_H_ */ diff --git a/i386/include/sys/_structs.h b/i386/include/sys/_structs.h deleted file mode 100644 index 5c9db95..0000000 --- a/i386/include/sys/_structs.h +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#include <sys/cdefs.h> - -#ifdef __need_ucontext_t -#ifndef __need_struct_ucontext -#define __need_struct_ucontext -#endif /* __need_struct_ucontext */ -#endif /* __need_ucontext_t */ - -#ifdef __need_ucontext64_t -#ifndef __need_struct_ucontext64 -#define __need_struct_ucontext64 -#endif /* __need_struct_ucontext64 */ -#endif /* __need_ucontext64_t */ - -#ifdef __need_struct_ucontext -#ifndef __need_struct_mcontext -#define __need_struct_mcontext -#endif /* __need_struct_mcontext */ -#endif /* __need_struct_ucontext */ - -#ifdef __need_struct_ucontext64 -#ifndef __need_struct_mcontext64 -#define __need_struct_mcontext64 -#endif /* __need_struct_mcontext64 */ -#endif /* __need_struct_ucontext64 */ - -#if defined(__need_struct_mcontext) || defined(__need_struct_mcontext64) -#include <machine/_structs.h> -#endif /* __need_struct_mcontext || __need_struct_mcontext64 */ - -#if defined(__need_stack_t) || defined(__need_struct_ucontext) || defined(__need_struct_ucontext64) -#ifndef __need_struct_sigaltstack -#define __need_struct_sigaltstack -#endif /* __need_struct_sigaltstack */ -#endif /* __need_stack_t || __need_struct_ucontext || __need_struct_ucontext64 */ - -#ifdef __need_struct_sigaltstack -#undef __need_struct_sigaltstack -/* Structure used in sigaltstack call. */ -#ifndef _STRUCT_SIGALTSTACK -#if __DARWIN_UNIX03 -#define _STRUCT_SIGALTSTACK struct __darwin_sigaltstack -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_SIGALTSTACK struct sigaltstack -#endif /* __DARWIN_UNIX03 */ -_STRUCT_SIGALTSTACK -{ - void *ss_sp; /* signal stack base */ - __darwin_size_t ss_size; /* signal stack length */ - int ss_flags; /* SA_DISABLE and/or SA_ONSTACK */ -}; -#endif /* _STRUCT_SIGALTSTACK */ -#endif /* __need_struct_sigaltstack */ - -#ifdef __need_struct_timespec -#undef __need_struct_timespec -#ifndef _STRUCT_TIMESPEC -#define _STRUCT_TIMESPEC struct timespec -_STRUCT_TIMESPEC -{ - __darwin_time_t tv_sec; - long tv_nsec; -}; -#endif /* _STRUCT_TIMESPEC */ -#endif /* __need_struct_timespec */ - -#ifdef __need_struct_timeval -#undef __need_struct_timeval -#ifndef _STRUCT_TIMEVAL -#define _STRUCT_TIMEVAL struct timeval -_STRUCT_TIMEVAL -{ - __darwin_time_t tv_sec; /* seconds */ - __darwin_suseconds_t tv_usec; /* and microseconds */ -}; -#endif /* _STRUCT_TIMEVAL */ -#endif /* __need_struct_timeval */ - -#ifdef __need_struct_timeval32 -#undef __need_struct_timeval32 -#ifndef _STRUCT_TIMEVAL32 -#define _STRUCT_TIMEVAL32 struct timeval32 -_STRUCT_TIMEVAL32 -{ - __int32_t tv_sec; /* seconds */ - __int32_t tv_usec; /* and microseconds */ -}; -#endif /* _STRUCT_TIMEVAL32 */ -#endif /* __need_struct_timeval32 */ - -#ifdef __need_struct_ucontext -#undef __need_struct_ucontext -#ifndef _STRUCT_UCONTEXT -#if __DARWIN_UNIX03 -#define _STRUCT_UCONTEXT struct __darwin_ucontext -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_UCONTEXT struct ucontext -#endif /* __DARWIN_UNIX03 */ -_STRUCT_UCONTEXT -{ - int uc_onstack; - __darwin_sigset_t uc_sigmask; /* signal mask used by this context */ - _STRUCT_SIGALTSTACK uc_stack; /* stack used by this context */ - _STRUCT_UCONTEXT *uc_link; /* pointer to resuming context */ - __darwin_size_t uc_mcsize; /* size of the machine context passed in */ - _STRUCT_MCONTEXT *uc_mcontext; /* pointer to machine specific context */ -#ifdef _XOPEN_SOURCE - _STRUCT_MCONTEXT __mcontext_data; -#endif /* _XOPEN_SOURCE */ -}; -#endif /* _STRUCT_UCONTEXT */ -#endif /* __need_struct_ucontext */ - -#ifdef __need_struct_ucontext64 -#undef __need_struct_ucontext64 -#ifndef _STRUCT_UCONTEXT64 -#if __DARWIN_UNIX03 -#define _STRUCT_UCONTEXT64 struct __darwin_ucontext64 -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_UCONTEXT64 struct ucontext64 -#endif /* __DARWIN_UNIX03 */ -_STRUCT_UCONTEXT64 -{ - int uc_onstack; - __darwin_sigset_t uc_sigmask; /* signal mask used by this context */ - _STRUCT_SIGALTSTACK uc_stack; /* stack used by this context */ - _STRUCT_UCONTEXT64 *uc_link; /* pointer to resuming context */ - __darwin_size_t uc_mcsize; /* size of the machine context passed in */ - _STRUCT_MCONTEXT64 *uc_mcontext64; /* pointer to machine specific context */ -}; -#endif /* _STRUCT_UCONTEXT64 */ -#endif /* __need_struct_ucontext64 */ - - -#ifdef __need_fd_set -#undef __need_fd_set -#ifndef _FD_SET -#define _FD_SET -/* - * Select uses bit masks of file descriptors in longs. These macros - * manipulate such bit fields (the filesystem macros use chars). The - * extra protection here is to permit application redefinition above - * the default size. - */ -#ifdef FD_SETSIZE -#define __DARWIN_FD_SETSIZE FD_SETSIZE -#else /* !FD_SETSIZE */ -#define __DARWIN_FD_SETSIZE 1024 -#endif /* FD_SETSIZE */ -#define __DARWIN_NBBY 8 /* bits in a byte */ -#define __DARWIN_NFDBITS (sizeof(__int32_t) * __DARWIN_NBBY) /* bits per mask */ -#define __DARWIN_howmany(x, y) ((((x) % (y)) == 0) ? ((x) / (y)) : (((x) / (y)) + 1)) /* # y's == x bits? */ - -__BEGIN_DECLS -typedef struct fd_set { - __int32_t fds_bits[__DARWIN_howmany(__DARWIN_FD_SETSIZE, __DARWIN_NFDBITS)]; -} fd_set; -__END_DECLS - -/* This inline avoids argument side-effect issues with FD_ISSET() */ -static __inline int -__darwin_fd_isset(int _n, const struct fd_set *_p) -{ - return (_p->fds_bits[_n/__DARWIN_NFDBITS] & (1<<(_n % __DARWIN_NFDBITS))); -} - -#define __DARWIN_FD_SET(n, p) do { int __fd = (n); ((p)->fds_bits[__fd/__DARWIN_NFDBITS] |= (1<<(__fd % __DARWIN_NFDBITS))); } while(0) -#define __DARWIN_FD_CLR(n, p) do { int __fd = (n); ((p)->fds_bits[__fd/__DARWIN_NFDBITS] &= ~(1<<(__fd % __DARWIN_NFDBITS))); } while(0) -#define __DARWIN_FD_ISSET(n, p) __darwin_fd_isset((n), (p)) - -#if __GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 3 -/* - * Use the built-in bzero function instead of the library version so that - * we do not pollute the namespace or introduce prototype warnings. - */ -#define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p))) -#else -#define __DARWIN_FD_ZERO(p) bzero(p, sizeof(*(p))) -#endif - -#define __DARWIN_FD_COPY(f, t) bcopy(f, t, sizeof(*(f))) -#endif /* _FD_SET */ -#endif /* __need_fd_set */ - -#ifdef __need_stack_t -#undef __need_stack_t -#ifndef _STACK_T -#define _STACK_T -typedef _STRUCT_SIGALTSTACK stack_t; /* [???] signal stack */ -#endif /* _STACK_T */ -#endif /* __need_stack_t */ - -#ifdef __need_ucontext_t -#undef __need_ucontext_t -/* user context */ -#ifndef _UCONTEXT_T -#define _UCONTEXT_T -typedef _STRUCT_UCONTEXT ucontext_t; /* [???] user context */ -#endif /* _UCONTEXT_T */ -#endif /* __need_ucontext_t */ - -#ifdef __need_ucontext64_t -#undef __need_ucontext64_t -#ifndef _UCONTEXT64_T -#define _UCONTEXT64_T -typedef _STRUCT_UCONTEXT64 ucontext64_t; /* [???] user context */ -#endif /* _UCONTEXT64_T */ -#endif /* __need_ucontext64_t */ diff --git a/i386/include/sys/_types.h b/i386/include/sys/_types.h deleted file mode 100644 index 9047dc2..0000000 --- a/i386/include/sys/_types.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2003-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _SYS__TYPES_H_ -#define _SYS__TYPES_H_ - -#include <sys/cdefs.h> -#include <machine/_types.h> - -/* - * Type definitions; takes common type definitions that must be used - * in multiple header files due to [XSI], removes them from the system - * space, and puts them in the implementation space. - */ - -#ifdef __cplusplus -#ifdef __GNUG__ -#define __DARWIN_NULL __null -#else /* ! __GNUG__ */ -#ifdef __LP64__ -#define __DARWIN_NULL (0L) -#else /* !__LP64__ */ -#define __DARWIN_NULL 0 -#endif /* __LP64__ */ -#endif /* __GNUG__ */ -#else /* ! __cplusplus */ -#define __DARWIN_NULL ((void *)0) -#endif /* __cplusplus */ - -typedef __int64_t __darwin_blkcnt_t; /* total blocks */ -typedef __int32_t __darwin_blksize_t; /* preferred block size */ -typedef __int32_t __darwin_dev_t; /* dev_t */ -typedef unsigned int __darwin_fsblkcnt_t; /* Used by statvfs and fstatvfs */ -typedef unsigned int __darwin_fsfilcnt_t; /* Used by statvfs and fstatvfs */ -typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */ -typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/ -typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */ -#if __DARWIN_64_BIT_INO_T -typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */ -#else /* !__DARWIN_64_BIT_INO_T */ -typedef __uint32_t __darwin_ino_t; /* [???] Used for inodes */ -#endif /* __DARWIN_64_BIT_INO_T */ -typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */ -typedef __darwin_mach_port_name_t __darwin_mach_port_t; /* Used by mach */ -typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */ -typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */ -#ifndef _OFF_T -#define _OFF_T -typedef __darwin_off_t off_t; -#endif -typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */ -typedef __uint32_t __darwin_sigset_t; /* [???] signal set */ -typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */ -typedef __uint32_t __darwin_uid_t; /* [???] user IDs */ -typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */ -typedef unsigned char __darwin_uuid_t[16]; -typedef char __darwin_uuid_string_t[37]; - -#endif /* _SYS__TYPES_H_ */ diff --git a/i386/include/sys/appleapiopts.h b/i386/include/sys/appleapiopts.h deleted file mode 100644 index 2055701..0000000 --- a/i386/include/sys/appleapiopts.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef __SYS_APPLEAPIOPTS_H__ -#define __SYS_APPLEAPIOPTS_H__ - - -#ifndef __APPLE_API_STANDARD -#define __APPLE_API_STANDARD -#endif /* __APPLE_API_STANDARD */ - -#ifndef __APPLE_API_STABLE -#define __APPLE_API_STABLE -#endif /* __APPLE_API_STABLE */ - -#ifndef __APPLE_API_STRICT_CONFORMANCE - -#ifndef __APPLE_API_EVOLVING -#define __APPLE_API_EVOLVING -#endif /* __APPLE_API_EVOLVING */ - -#ifndef __APPLE_API_UNSTABLE -#define __APPLE_API_UNSTABLE -#endif /* __APPLE_API_UNSTABLE */ - -#ifndef __APPLE_API_PRIVATE -#define __APPLE_API_PRIVATE -#endif /* __APPLE_API_PRIVATE */ - -#ifndef __APPLE_API_OBSOLETE -#define __APPLE_API_OBSOLETE -#endif /* __APPLE_API_OBSOLETE */ - -#endif /* __APPLE_API_STRICT_CONFORMANCE */ - -#endif /* __SYS_APPLEAPIOPTS_H__ */ - diff --git a/i386/include/sys/buf.h b/i386/include/sys/buf.h deleted file mode 100644 index 6f0db77..0000000 --- a/i386/include/sys/buf.h +++ /dev/null @@ -1,859 +0,0 @@ -/* - * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ -/* - * Copyright (c) 1982, 1986, 1989, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)buf.h 8.9 (Berkeley) 3/30/95 - */ - -#ifndef _SYS_BUF_H_ -#define _SYS_BUF_H_ - -#include <sys/cdefs.h> -#include <sys/kernel_types.h> -#include <mach/memory_object_types.h> - - -#define B_WRITE 0x00000000 /* Write buffer (pseudo flag). */ -#define B_READ 0x00000001 /* Read buffer. */ -#define B_ASYNC 0x00000002 /* Start I/O, do not wait. */ -#define B_NOCACHE 0x00000004 /* Do not cache block after use. */ -#define B_DELWRI 0x00000008 /* Delay I/O until buffer reused. */ -#define B_LOCKED 0x00000010 /* Locked in core (not reusable). */ -#define B_PHYS 0x00000020 /* I/O to user memory. */ -#define B_CLUSTER 0x00000040 /* UPL based I/O generated by cluster layer */ -#define B_PAGEIO 0x00000080 /* Page in/out */ -#define B_META 0x00000100 /* buffer contains meta-data. */ -#define B_RAW 0x00000200 /* Set by physio for raw transfers. */ -#define B_FUA 0x00000400 /* Write-through disk cache(if supported) */ -#define B_PASSIVE 0x00000800 /* PASSIVE I/Os are ignored by THROTTLE I/O */ -#define B_IOSTREAMING 0x00001000 /* sequential access pattern detected */ -#define B_THROTTLED_IO 0x00002000 /* low priority I/O */ -/* - * make sure to check when adding flags that - * that the new flags don't overlap the definitions - * in buf_internal.h - */ - -__BEGIN_DECLS - -/*! - @function buf_markaged - @abstract Mark a buffer as "aged," i.e. as a good candidate to be discarded and reused after buf_brelse(). - @param bp Buffer to mark. - */ -void buf_markaged(buf_t); - -/*! - @function buf_markinvalid - @abstract Mark a buffer as not having valid data and being ready for immediate reuse after buf_brelse(). - @param bp Buffer to mark. - */ -void buf_markinvalid(buf_t); - -/*! - @function buf_markdelayed - @abstract Mark a buffer as a delayed write: mark it dirty without actually scheduling I/O. - @discussion Data will be flushed to disk at some later time, not with brelse(). A sync()/fsync() - or pressure necessitating reuse of the buffer will cause it to be written back to disk. - @param bp Buffer to mark. - */ -void buf_markdelayed(buf_t); - -/*! - @function buf_markeintr - @abstract Mark a buffer as having been interrupted during I/O. - @discussion Waiters for I/O to complete (buf_biowait()) will return with EINTR when woken up. - buf_markeintr does not itself do a wakeup. - @param bp Buffer to mark. - */ -void buf_markeintr(buf_t); - -/*! - @function buf_markfua - @abstract Mark a buffer for write through disk cache, if disk supports it. - @param bp Buffer to mark. - */ -void buf_markfua(buf_t); - -/*! - @function buf_fua - @abstract Check if a buffer is marked for write through disk caches. - @param bp Buffer to test. - @return Nonzero if buffer is marked for write-through, 0 if not. - */ -int buf_fua(buf_t); - -/*! - @function buf_valid - @abstract Check if a buffer contains valid data. - @param bp Buffer to test. - @return Nonzero if buffer has valid data, 0 if not. - */ -int buf_valid(buf_t); - -/*! - @function buf_fromcache - @abstract Check if a buffer's data was found in core. - @discussion Will return truth after a buf_getblk that finds a valid buffer in the cache or the relevant - data in core (but not in a buffer). - @param bp Buffer to test. - @return Nonzero if we got this buffer's data without doing I/O, 0 if not. - */ -int buf_fromcache(buf_t); - -/*! - @function buf_upl - @abstract Get the upl (Universal Page List) associated with a buffer. - @discussion Buffers allocated with buf_alloc() are not returned with a upl, and - traditional buffers only have a upl while an I/O is in progress. - @param bp Buffer whose upl to grab. - @return Buffer's upl if it has one, else NULL. - */ -void * buf_upl(buf_t); - -/*! - @function buf_uploffset - @abstract Get the offset into a UPL at which this buffer begins. - @discussion This function should only be called on iobufs, i.e. buffers allocated with buf_alloc(). - @param bp Buffer whose uploffset to grab. - @return Buffer's uploffset--does not check whether that value makes sense for this buffer. - */ -uint32_t buf_uploffset(buf_t); - - - -/*! - @function buf_proc - @abstract Get the process associated with this buffer. - @discussion buf_proc() will generally return NULL; a process is currently only associated with - a buffer in the event of a physio() call. - @param bp Buffer whose associated process to find. - @return Associated process, possibly NULL. - */ -proc_t buf_proc(buf_t); - -/*! - @function buf_dirtyoff - @abstract Get the starting offset of the dirty region associated with a buffer. - @discussion The dirty offset is zero unless someone explicitly calls buf_setdirtyoff() (which the kernel does not). - @param bp Buffer whose dirty offset to get. - @return Dirty offset (0 if not explicitly changed). - */ -uint32_t buf_dirtyoff(buf_t); - -/*! - @function buf_dirtyend - @abstract Get the ending offset of the dirty region associated with a buffer. - @discussion If the buffer's data was found incore and dirty, the dirty end is the size of the block; otherwise, unless - someone outside of xnu explicitly changes it by calling buf_setdirtyend(), it will be zero. - @param bp Buffer whose dirty end to get. - @return 0 if buffer is found clean; size of buffer if found dirty. Can be set to any value by callers of buf_setdirtyend(). - */ -uint32_t buf_dirtyend(buf_t); - -/*! - @function buf_setdirtyoff - @abstract Set the starting offset of the dirty region associated with a buffer. - @discussion This value is zero unless someone set it explicitly. - @param bp Buffer whose dirty end to set. - @return void. - */ -void buf_setdirtyoff(buf_t, uint32_t); - -/*! - @function buf_setdirtyend - @abstract Set the ending offset of the dirty region associated with a buffer. - @discussion If the buffer's data was found incore and dirty, the dirty end is the size of the block; otherwise, unless - someone outside of xnu explicitly changes it by calling buf_setdirtyend(), it will be zero. - @param bp Buffer whose dirty end to set. - @return void. - */ -void buf_setdirtyend(buf_t, uint32_t); - -/*! - @function buf_error - @abstract Get the error value associated with a buffer. - @discussion Errors are set with buf_seterror(). - @param bp Buffer whose error value to retrieve. - @return Error value, directly. - */ -errno_t buf_error(buf_t); - -/*! - @function buf_seterror - @abstract Set an error value on a buffer. - @param bp Buffer whose error value to set. - @return void. - */ -void buf_seterror(buf_t, errno_t); - -/*! - @function buf_setflags - @abstract Set flags on a buffer. - @discussion: buffer_flags |= flags - @param bp Buffer whose flags to set. - @param flags Flags to add to buffer's mask. B_LOCKED/B_NOCACHE/B_ASYNC/B_READ/B_WRITE/B_PAGEIO/B_FUA - @return void. - */ -void buf_setflags(buf_t, int32_t); - -/*! - @function buf_clearflags - @abstract Clear flags on a buffer. - @discussion: buffer_flags &= ~flags - @param bp Buffer whose flags to clear. - @param flags Flags to remove from buffer's mask. B_LOCKED/B_NOCACHE/B_ASYNC/B_READ/B_WRITE/B_PAGEIO/B_FUA - @return void. - */ -void buf_clearflags(buf_t, int32_t); - -/*! - @function buf_flags - @abstract Get flags set on a buffer. - @discussion Valid flags are B_LOCKED/B_NOCACHE/B_ASYNC/B_READ/B_WRITE/B_PAGEIO/B_FUA. - @param bp Buffer whose flags to grab. - @return flags. - */ -int32_t buf_flags(buf_t); - -/*! - @function buf_reset - @abstract Reset I/O flag state on a buffer. - @discussion Clears current flags on a buffer (internal and external) and allows some new flags to be set. - Used perhaps to prepare an iobuf for reuse. - @param bp Buffer whose flags to grab. - @param flags Flags to set on buffer: B_READ, B_WRITE, B_ASYNC, B_NOCACHE. - @return void. - */ -void buf_reset(buf_t, int32_t); - -/*! - @function buf_map - @abstract Get virtual mappings for buffer data. - @discussion For buffers created through buf_getblk() (i.e. traditional buffer cache usage), - buf_map() just returns the address at which data was mapped by but_getblk(). For a B_CLUSTER buffer, i.e. an iobuf - whose upl state is managed manually, there are two possibilities. If the buffer was created - with an underlying "real" buffer through cluster_bp(), the mapping of the "real" buffer is returned. - Otherwise, the buffer was created with buf_alloc() and buf_setupl() was subsequently called; buf_map() - will call ubc_upl_map() to get a mapping for the buffer's upl and return the start of that mapping - plus the buffer's upl offset (set in buf_setupl()). In the last case, buf_unmap() must later be called - to tear down the mapping. NOTE: buf_map() does not set the buffer data pointer; this must be done with buf_setdataptr(). - @param bp Buffer whose mapping to find or create. - @param io_addr Destination for mapping address. - @return 0 for success, ENOMEM if unable to map the buffer. - */ -errno_t buf_map(buf_t, caddr_t *); - -/*! - @function buf_unmap - @abstract Release mappings for buffer data. - @discussion For buffers created through buf_getblk() (i.e. traditional buffer cache usage), - buf_unmap() does nothing; buf_brelse() will take care of unmapping. For a B_CLUSTER buffer, i.e. an iobuf - whose upl state is managed manually, there are two possibilities. If the buffer was created - with an underlying "real" buffer through cluster_bp(), buf_unmap() does nothing; buf_brelse() on the - underlying buffer will tear down the mapping. Otherwise, the buffer was created with buf_alloc() and - buf_setupl() was subsequently called; buf_map() created the mapping. In this case, buf_unmap() will - unmap the buffer. - @param bp Buffer whose mapping to find or create. - @param io_addr Destination for mapping address. - @return 0 for success, EINVAL if unable to unmap buffer. - */ -errno_t buf_unmap(buf_t); - -/*! - @function buf_setdrvdata - @abstract Set driver-specific data on a buffer. - @param bp Buffer whose driver-data to set. - @param drvdata Opaque driver data. - @return void. - */ -void buf_setdrvdata(buf_t, void *); - -/*! - @function buf_setdrvdata - @abstract Get driver-specific data from a buffer. - @param bp Buffer whose driver data to get. - @return Opaque driver data. - */ -void * buf_drvdata(buf_t); - -/*! - @function buf_setfsprivate - @abstract Set filesystem-specific data on a buffer. - @param bp Buffer whose filesystem data to set. - @param fsprivate Opaque filesystem data. - @return void. - */ -void buf_setfsprivate(buf_t, void *); - -/*! - @function buf_fsprivate - @abstract Get filesystem-specific data from a buffer. - @param bp Buffer whose filesystem data to get. - @return Opaque filesystem data. - */ -void * buf_fsprivate(buf_t); - -/*! - @function buf_blkno - @abstract Get physical block number associated with a buffer, in the sense of VNOP_BLOCKMAP. - @discussion When a buffer's physical block number is the same is its logical block number, then the physical - block number is considered uninitialized. A physical block number of -1 indicates that there is no valid - physical mapping (e.g. the logical block is invalid or corresponds to a sparse region in a file). Physical - block number is normally set by the cluster layer or by buf_getblk(). - @param bp Buffer whose physical block number to get. - @return Block number. - */ -daddr64_t buf_blkno(buf_t); - -/*! - @function buf_lblkno - @abstract Get logical block number associated with a buffer. - @discussion Logical block number is set on traditionally-used buffers by an argument passed to buf_getblk(), - for example by buf_bread(). - @param bp Buffer whose logical block number to get. - @return Block number. - */ -daddr64_t buf_lblkno(buf_t); - -/*! - @function buf_setblkno - @abstract Set physical block number associated with a buffer. - @discussion Physical block number is generally set by the cluster layer or by buf_getblk(). - @param bp Buffer whose physical block number to set. - @param blkno Block number to set. - @return void. - */ -void buf_setblkno(buf_t, daddr64_t); - -/*! - @function buf_setlblkno - @abstract Set logical block number associated with a buffer. - @discussion Logical block number is set on traditionally-used buffers by an argument passed to buf_getblk(), - for example by buf_bread(). - @param bp Buffer whose logical block number to set. - @param lblkno Block number to set. - @return void. - */ -void buf_setlblkno(buf_t, daddr64_t); - -/*! - @function buf_count - @abstract Get count of valid bytes in a buffer. This may be less than the space allocated to the buffer. - @param bp Buffer whose byte count to get. - @return Byte count. - */ -uint32_t buf_count(buf_t); - -/*! - @function buf_size - @abstract Get size of data region allocated to a buffer. - @discussion May be larger than amount of valid data in buffer. - @param bp Buffer whose size to get. - @return Size. - */ -uint32_t buf_size(buf_t); - -/*! - @function buf_resid - @abstract Get a count of bytes which were not consumed by an I/O on a buffer. - @discussion Set when an I/O operations completes. - @param bp Buffer whose outstanding count to get. - @return Count of unwritten/unread bytes. - */ -uint32_t buf_resid(buf_t); - -/*! - @function buf_setcount - @abstract Set count of valid bytes in a buffer. This may be less than the space allocated to the buffer. - @param bp Buffer whose byte count to set. - @param bcount Count to set. - @return void. - */ -void buf_setcount(buf_t, uint32_t); - -/*! - @function buf_setsize - @abstract Set size of data region allocated to a buffer. - @discussion May be larger than amount of valid data in buffer. Should be used by - code which is manually providing storage for an iobuf, one allocated with buf_alloc(). - @param bp Buffer whose size to set. - @return void. - */ -void buf_setsize(buf_t, uint32_t); - -/*! - @function buf_setresid - @abstract Set a count of bytes outstanding for I/O in a buffer. - @discussion Set when an I/O operations completes. Examples: called by IOStorageFamily when I/O - completes, often called on an "original" buffer when using a manipulated buffer to perform I/O - on behalf of the first. - @param bp Buffer whose outstanding count to set. - @return Count of unwritten/unread bytes. - */ -void buf_setresid(buf_t, uint32_t); - -/*! - @function buf_setdataptr - @abstract Set the address at which a buffer's data will be stored. - @discussion In traditional buffer use, the data pointer will be set automatically. This routine is - useful with iobufs (allocated with buf_alloc()). - @param bp Buffer whose data pointer to set. - @param data Pointer to data region. - @return void. - */ -void buf_setdataptr(buf_t, uintptr_t); - -/*! - @function buf_dataptr - @abstract Get the address at which a buffer's data is stored; for iobufs, this must - be set with buf_setdataptr(). See buf_map(). - @param bp Buffer whose data pointer to retrieve. - @return Data pointer; NULL if unset. - */ -uintptr_t buf_dataptr(buf_t); - -/*! - @function buf_vnode - @abstract Get the vnode associated with a buffer. - @discussion Every buffer is associated with a file. Because there is an I/O in flight, - there is an iocount on this vnode; it is returned WITHOUT an extra iocount, and vnode_put() - need NOT be called. - @param bp Buffer whose vnode to retrieve. - @return Buffer's vnode. - */ -vnode_t buf_vnode(buf_t); - -/*! - @function buf_setvnode - @abstract Set the vnode associated with a buffer. - @discussion This call need not be used on traditional buffers; it is for use with iobufs. - @param bp Buffer whose vnode to set. - @param vp The vnode to attach to the buffer. - @return void. - */ -void buf_setvnode(buf_t, vnode_t); - -/*! - @function buf_setdevice - @abstract Set the device associated with a buffer. - @discussion A buffer's device is set in buf_strategy() (or in buf_getblk() if the file is a device). - It is also set on an iobuf if buf_alloc() is passed a device vnode. - @param bp Buffer whose device ID to set. - @param vp Device to set on the buffer. - @return 0 for success, EINVAL if vp is not a device file. - */ -errno_t buf_setdevice(buf_t, vnode_t); - -/*! - @function buf_strategy - @abstract Pass an I/O request for a buffer down to the device layer. - @discussion This is one of the most important routines in the buffer cache layer. For buffers obtained - through buf_getblk, it handles finding physical block numbers for the I/O (with VNOP_BLKTOOFF and - VNOP_BLOCKMAP), packaging the I/O into page-sized chunks, and initiating I/O on the disk by calling - the device's strategy routine. If a buffer's UPL has been set manually with buf_setupl(), it assumes - that the request is already correctly configured with a block number and a size divisible by page size - and will just call directly to the device. - @param devvp Device on which to perform I/O - @param ap vnop_strategy_args structure (most importantly, a buffer). - @return 0 for success, or errors from filesystem or device layers. - */ -errno_t buf_strategy(vnode_t, void *); - -/* - * Flags for buf_invalblkno() - */ -#define BUF_WAIT 0x01 - -/*! - @function buf_invalblkno - @abstract Invalidate a filesystem logical block in a file. - @discussion buf_invalblkno() tries to make the data for a given block in a file - invalid; if the buffer for that block is found in core and is not busy, we mark it - invalid and call buf_brelse() (see "flags" param for what happens if the buffer is busy). - buf_brelse(), noticing that it is invalid, will - will return the buffer to the empty-buffer list and tell the VM subsystem to abandon - the relevant pages. Data will not be written to backing store--it will be cast aside. - Note that this function will only work if the block in question has been - obtained with a buf_getblk(). If data has been read into core without using - traditional buffer cache routines, buf_invalblkno() will not be able to invalidate it--this - includes the use of iobufs. - @param bp Buffer whose block to invalidate. - @param lblkno Logical block number. - @param flags BUF_WAIT: wait for busy buffers to become unbusy and invalidate them then. Otherwise, - just return EBUSY for busy blocks. - @return 0 for success, EINVAL if vp is not a device file. - */ -errno_t buf_invalblkno(vnode_t, daddr64_t, int); - -/*! - @function buf_callback - @abstract Get the function set to be called when I/O on a buffer completes. - @discussion A function returned by buf_callback was originally set with buf_setcallback(). - @param bp Buffer whose callback to get. - @return 0 for success, or errors from filesystem or device layers. - */ -void * buf_callback(buf_t); - -/*! - @function buf_setcallback - @abstract Set a function to be called once when I/O on a buffer completes. - @discussion A one-shot callout set with buf_setcallback() will be called from buf_biodone() - when I/O completes. It will be passed the "transaction" argument as well as the buffer. - buf_setcallback() also marks the buffer as B_ASYNC. - @param bp Buffer whose callback to set. - @param callback function to use as callback. - @param transaction Additional argument to callback function. - @return 0; always succeeds. - */ -errno_t buf_setcallback(buf_t, void (*)(buf_t, void *), void *); - -/*! - @function buf_setupl - @abstract Set the UPL (Universal Page List), and offset therein, on a buffer. - @discussion buf_setupl() should only be called on buffers allocated with buf_alloc(). - A subsequent call to buf_map() will map the UPL and give back the address at which data - begins. After buf_setupl() is called, a buffer is marked B_CLUSTER; when this is the case, - buf_strategy() assumes that a buffer is correctly configured to be passed to the device - layer without modification. Passing a NULL upl will clear the upl and the B_CLUSTER flag on the - buffer. - @param bp Buffer whose upl to set. - @param upl UPL to set in the buffer. - @parma offset Offset within upl at which relevant data begin. - @return 0 for success, EINVAL if the buffer was not allocated with buf_alloc(). - */ -errno_t buf_setupl(buf_t, upl_t, uint32_t); - -/*! - @function buf_clone - @abstract Clone a buffer with a restricted range and an optional callback. - @discussion Generates a buffer which is identical to its "bp" argument except that - it spans a subset of the data of the original. The buffer to be cloned should - have been allocated with buf_alloc(). Checks its arguments to make sure - that the data subset is coherent. Optionally, adds a callback function and argument to it - to be called when I/O completes (as with buf_setcallback(), but B_ASYNC is not set). If the original buffer had - a upl set through buf_setupl(), this upl is copied to the new buffer; otherwise, the original's - data pointer is used raw. The buffer must be released with buf_free(). - @param bp Buffer to clone. - @param io_offset Offset, relative to start of data in original buffer, at which new buffer's data will begin. - @param io_size Size of buffer region in new buffer, in the sense of buf_count(). - @param iodone Callback to be called from buf_biodone() when I/O completes, in the sense of buf_setcallback(). - @param arg Argument to pass to iodone() callback. - @return NULL if io_offset/io_size combination is invalid for the buffer to be cloned; otherwise, the new buffer. - */ -buf_t buf_clone(buf_t, int, int, void (*)(buf_t, void *), void *); - -/*! - @function buf_alloc - @abstract Allocate an uninitialized buffer. - @discussion A buffer returned by buf_alloc() is marked as busy and as an iobuf; it has no storage set up and must be - set up using buf_setdataptr() or buf_setupl()/buf_map(). - @param vp vnode to associate with the buffer: optionally NULL. If vp is a device file, then - the buffer's associated device will be set. If vp is NULL, it can be set later with buf_setvnode(). - @return New buffer. - */ -buf_t buf_alloc(vnode_t); - -/*! - @function buf_free - @abstract Free a buffer that was allocated with buf_alloc(). - @discussion The storage (UPL, data pointer) associated with an iobuf must be freed manually. - @param bp The buffer to free. - @return void. - */ -void buf_free(buf_t); - -/* - * flags for buf_invalidateblks - */ -#define BUF_WRITE_DATA 0x0001 /* write data blocks first */ -#define BUF_SKIP_META 0x0002 /* skip over metadata blocks */ - -/*! - @function buf_invalidateblks - @abstract Invalidate all the blocks associated with a vnode. - @discussion This function does for all blocks associated with a vnode what buf_invalblkno does for one block. - Again, it will only be able to invalidate data which were populated with traditional buffer cache routines, - i.e. by buf_getblk() and callers thereof. Unlike buf_invalblkno(), it can be made to write dirty data to disk - rather than casting it aside. - @param bp The buffer whose data to invalidate. - @param flags BUF_WRITE_DATA: write dirty data to disk with VNOP_BWRITE() before kicking buffer cache entries out. - BUF_SKIP_META: do not invalidate metadata blocks. - @param slpflag Flags to pass to "msleep" while waiting to acquire busy buffers. - @param slptimeo Timeout in "hz" (1/100 second) to wait for a buffer to become unbusy before waking from sleep - and re-starting the scan. - @return 0 for success, error values from msleep(). - */ -int buf_invalidateblks(vnode_t, int, int, int); - -/* - * flags for buf_flushdirtyblks and buf_iterate - */ -#define BUF_SKIP_NONLOCKED 0x01 -#define BUF_SKIP_LOCKED 0x02 -#define BUF_SCAN_CLEAN 0x04 /* scan the clean buffers */ -#define BUF_SCAN_DIRTY 0x08 /* scan the dirty buffers */ -#define BUF_NOTIFY_BUSY 0x10 /* notify the caller about the busy pages during the scan */ - - -#define BUF_RETURNED 0 -#define BUF_RETURNED_DONE 1 -#define BUF_CLAIMED 2 -#define BUF_CLAIMED_DONE 3 -/*! - @function buf_flushdirtyblks - @abstract Write dirty file blocks to disk. - @param vp The vnode whose blocks to flush. - @param wait Wait for writes to complete before returning. - @param flags Can pass zero, meaning "flush all dirty buffers." - BUF_SKIP_NONLOCKED: Skip buffers which are not busy when we encounter them. - BUF_SKIP_LOCKED: Skip buffers which are busy when we encounter them. - @param msg String to pass to msleep(). - @return void. - */ -void buf_flushdirtyblks(vnode_t, int, int, const char *); - -/*! - @function buf_iterate - @abstract Perform some operation on all buffers associated with a vnode. - @param vp The vnode whose buffers to scan. - @param callout Function to call on each buffer. Should return one of: - BUF_RETURNED: buf_iterate() should call buf_brelse() on the buffer. - BUF_RETURNED_DONE: buf_iterate() should call buf_brelse() on the buffer and then stop iterating. - BUF_CLAIMED: buf_iterate() should continue iterating (and not call buf_brelse()). - BUF_CLAIMED_DONE: buf_iterate() should stop iterating (and not call buf_brelse()). - @param flag - BUF_SKIP_NONLOCKED: Skip buffers which are not busy when we encounter them. BUF_SKIP_LOCKED: Skip buffers which are busy when we encounter them. - BUF_SCAN_CLEAN: Call out on clean buffers. - BUF_SCAN_DIRTY: Call out on dirty buffers. - BUF_NOTIFY_BUSY: If a buffer cannot be acquired, pass a NULL buffer to callout; otherwise, - that buffer will be silently skipped. - @param arg Argument to pass to callout in addition to buffer. - @return void. - */ -void buf_iterate(vnode_t, int (*)(buf_t, void *), int, void *); - -/*! - @function buf_clear - @abstract Zero out the storage associated with a buffer. - @discussion Calls buf_map() to get the buffer's data address; for a B_CLUSTER - buffer (one which has had buf_setupl() called on it), it tries to map the buffer's - UPL into memory; should only be called once during the life cycle of an iobuf (one allocated - with buf_alloc()). - @param bp The buffer to zero out. - @return void. - */ -void buf_clear(buf_t); - -/*! - @function buf_bawrite - @abstract Start an asychronous write on a buffer. - @discussion Calls VNOP_BWRITE to start the process of propagating an asynchronous write down to the device layer. - Callers can wait for writes to complete at their discretion using buf_biowait(). When this function is called, - data should already have been written to the buffer's data region. - @param bp The buffer on which to initiate I/O. - @param throttle If "throttle" is nonzero and more than VNODE_ASYNC_THROTTLE writes are in progress on this file, - buf_bawrite() will block until the write count drops below VNODE_ASYNC_THROTTLE. If "throttle" is zero and the write - count is high, it will fail with EWOULDBLOCK; the caller can decide whether to make a blocking call or pursue - other opportunities. - @return EWOULDBLOCK if write count is high and "throttle" is zero; otherwise, errors from VNOP_BWRITE. - */ -errno_t buf_bawrite(buf_t); - -/*! - @function buf_bdwrite - @abstract Mark a buffer for delayed write. - @discussion Marks a buffer as waiting for delayed write and the current I/O as complete; data will be written to backing store - before the buffer is reused, but it will not be queued for I/O immediately. Note that for buffers allocated - with buf_alloc(), there are no such guarantees; you must take care of your own flushing to disk. If - the number of delayed writes pending on the system is greater than an internal limit and the caller has not - requested otherwise [see return_error] , buf_bdwrite() will unilaterally launch an asynchronous I/O with buf_bawrite() to keep the pile of - delayed writes from getting too large. - @param bp The buffer to mark for delayed write. - @param return_error If the number of pending delayed writes systemwide is larger than an internal limit, - return EAGAIN rather than doing an asynchronous write. - @return EAGAIN for return_error != 0 case, 0 for succeess, errors from buf_bawrite. - */ -errno_t buf_bdwrite(buf_t); - -/*! - @function buf_bwrite - @abstract Write a buffer's data to backing store. - @discussion Once the data in a buffer has been modified, buf_bwrite() starts sending it to disk by calling - VNOP_STRATEGY. Unless B_ASYNC has been set on the buffer (by buf_setflags() or otherwise), data will have - been written to disk when buf_bwrite() returns. See Bach (p 56). - @param bp The buffer to write to disk. - @return 0 for success; errors from buf_biowait(). - */ -errno_t buf_bwrite(buf_t); - -/*! - @function buf_biodone - @abstract Mark an I/O as completed. - @discussion buf_biodone() should be called by whosoever decides that an I/O on a buffer is complete; for example, - IOStorageFamily. It clears the dirty flag on a buffer and signals on the vnode that a write has completed - with vnode_writedone(). If a callout or filter has been set on the buffer, that function is called. In the case - of a callout, that function is expected to take care of cleaning up and freeing the buffer. - Otherwise, if the buffer is marked B_ASYNC (e.g. it was passed to buf_bawrite()), then buf_biodone() - considers itself justified in calling buf_brelse() to return it to free lists--no one is waiting for it. Finally, - waiters on the bp (e.g. in buf_biowait()) are woken up. - @param bp The buffer to mark as done with I/O. - @return void. - */ -void buf_biodone(buf_t); - -/*! - @function buf_biowait - @abstract Wait for I/O on a buffer to complete. - @discussion Waits for I/O on a buffer to finish, as marked by a buf_biodone() call. - @param bp The buffer to wait on. - @return 0 for a successful wait; nonzero the buffer has been marked as EINTR or had an error set on it. - */ -errno_t buf_biowait(buf_t); - -/*! - @function buf_brelse - @abstract Release any claim to a buffer, sending it back to free lists. - @discussion buf_brelse() cleans up buffer state and releases a buffer to the free lists. If the buffer - is not marked invalid and its pages are dirty (e.g. a delayed write was made), its data will be commited - to backing store. If it is marked invalid, its data will be discarded completely. - A valid, cacheable buffer will be put on a list and kept in the buffer hash so it - can be found again; otherwise, it will be dissociated from its vnode and treated as empty. Which list a valid - buffer is placed on depends on the use of buf_markaged(), whether it is metadata, and the B_LOCKED flag. A - B_LOCKED buffer will not be available for reuse by other files, though its data may be paged out. - Note that buf_brelse() is intended for use with traditionally allocated buffers. - @param bp The buffer to release. - @retrn void. - */ -void buf_brelse(buf_t); - -/*! - @function minphys - @abstract Adjust a buffer's count to be no more than maximum physical I/O transfer size for the host architecture. - @discussion physio() takes as a parameter a function to bound transfer sizes for each VNOP_STRATEGY() call. minphys() - is a default implementation. It calls buf_setcount() to make the buffer's count the min() of its current count - and the max I/O size for the host architecture. - @param bp The buffer whose byte count to modify. - @return New byte count. - */ -u_int minphys(buf_t bp); - -/* - * Flags for operation type in getblk() - */ -#define BLK_READ 0x01 /* buffer for read */ -#define BLK_WRITE 0x02 /* buffer for write */ -#define BLK_META 0x10 /* buffer for metadata */ -/* - * modifier for above flags... if set, getblk will only return - * a bp that is already valid... i.e. found in the cache - */ -#define BLK_ONLYVALID 0x80000000 - -/*! - @function buf_getblk - @abstract Traditional buffer cache routine to get a buffer corresponding to a logical block in a file. - @discussion buf_getblk() gets a buffer, not necessarily containing valid data, representing a block in a file. - A metadata buffer will be returned with its own zone-allocated storage, managed by the traditional buffer-cache - layer, whereas data buffers will be returned hooked into backing by the UBC (which in fact controls the caching of data). - buf_getblk() first looks for the buffer header in cache; if the buffer is in-core but busy, buf_getblk() will wait for it to become - unbusy, depending on the slpflag and slptimeo parameters. If the buffer is found unbusy and is a metadata buffer, - it must already contain valid data and will be returned directly; data buffers will have a UPL configured to - prepare for interaction with the underlying UBC. If the buffer is found in core, it will be marked as such - and buf_fromcache() will return truth. A buffer is allocated and initialized (but not filled with data) - if none is found in core. buf_bread(), buf_breadn(), buf_meta_bread(), and buf_meta_breadn() all - return buffers obtained with buf_getblk(). - @param vp File for which to get block. - @param blkno Logical block number. - @param size Size of block. - @param slpflag Flag to pass to msleep() while waiting for buffer to become unbusy. - @param slptimeo Time, in milliseconds, to wait for buffer to become unbusy. 0 means to wait indefinitely. - @param operation BLK_READ: want a read buffer. BLK_WRITE: want a write buffer. BLK_META: want a metadata buffer. BLK_ONLYVALID: - only return buffers which are found in core (do not allocate anew), and do not change buffer size. The last remark means - that if a given logical block is found in core with a different size than what is requested, the buffer size will not be modified. - @return Buffer found in core or newly allocated, either containing valid data or ready for I/O. - */ -buf_t buf_getblk(vnode_t, daddr64_t, int, int, int, int); - -/*! - @function buf_geteblk - @abstract Get a metadata buffer which is marked invalid and not associated with any vnode. - @discussion A buffer is returned with zone-allocated storage of the specified size, marked B_META and invalid. - It has no vnode and is not visible in the buffer hash. - @param size Size of buffer. - @return Always returns a new buffer. - */ -buf_t buf_geteblk(int); - - -__END_DECLS - - -/* Macros to clear/set/test flags. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~(f) -#define ISSET(t, f) ((t) & (f)) - - -#endif /* !_SYS_BUF_H_ */ diff --git a/i386/include/sys/cdefs.h b/i386/include/sys/cdefs.h deleted file mode 100644 index 3240187..0000000 --- a/i386/include/sys/cdefs.h +++ /dev/null @@ -1,583 +0,0 @@ -/* - * Copyright (c) 2000-2009 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* Copyright 1995 NeXT Computer, Inc. All rights reserved. */ -/* - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Berkeley Software Design, Inc. - * - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)cdefs.h 8.8 (Berkeley) 1/9/95 - */ - -#ifndef _CDEFS_H_ -#define _CDEFS_H_ - -#if defined(__cplusplus) -#define __BEGIN_DECLS extern "C" { -#define __END_DECLS } -#else -#define __BEGIN_DECLS -#define __END_DECLS -#endif - -/* - * The __CONCAT macro is used to concatenate parts of symbol names, e.g. - * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. - * The __CONCAT macro is a bit tricky -- make sure you don't put spaces - * in between its arguments. __CONCAT can also concatenate double-quoted - * strings produced by the __STRING macro, but this only works with ANSI C. - */ -#if defined(__STDC__) || defined(__cplusplus) -#define __P(protos) protos /* full-blown ANSI C */ -#define __CONCAT(x,y) x ## y -#define __STRING(x) #x - -#define __const const /* define reserved names to standard */ -#define __signed signed -#define __volatile volatile -#if defined(__cplusplus) -#define __inline inline /* convert to C++ keyword */ -#else -#ifndef __GNUC__ -#define __inline /* delete GCC keyword */ -#endif /* !__GNUC__ */ -#endif /* !__cplusplus */ - -#else /* !(__STDC__ || __cplusplus) */ -#define __P(protos) () /* traditional C preprocessor */ -#define __CONCAT(x,y) x/**/y -#define __STRING(x) "x" - -#ifndef __GNUC__ -#define __const /* delete pseudo-ANSI C keywords */ -#define __inline -#define __signed -#define __volatile -#endif /* !__GNUC__ */ - -/* - * In non-ANSI C environments, new programs will want ANSI-only C keywords - * deleted from the program and old programs will want them left alone. - * When using a compiler other than gcc, programs using the ANSI C keywords - * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS. - * When using "gcc -traditional", we assume that this is the intent; if - * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone. - */ -#ifndef NO_ANSI_KEYWORDS -#define const __const /* convert ANSI C keywords */ -#define inline __inline -#define signed __signed -#define volatile __volatile -#endif /* !NO_ANSI_KEYWORDS */ -#endif /* !(__STDC__ || __cplusplus) */ - -/* - * GCC1 and some versions of GCC2 declare dead (non-returning) and - * pure (no side effects) functions using "volatile" and "const"; - * unfortunately, these then cause warnings under "-ansi -pedantic". - * GCC2 uses a new, peculiar __attribute__((attrs)) style. All of - * these work for GNU C++ (modulo a slight glitch in the C++ grammar - * in the distribution version of 2.5.5). - */ -#if defined(__MWERKS__) && (__MWERKS__ > 0x2400) - /* newer Metrowerks compilers support __attribute__() */ -#elif __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 5 -#define __dead2 __attribute__((__noreturn__)) -#define __pure2 __attribute__((__const__)) -#if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 7 -#define __unused /* no attribute */ -#else -#define __unused __attribute__((__unused__)) -#endif -#else -#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -/* __dead and __pure are depreciated. Use __dead2 and __pure2 instead */ -#define __dead __volatile -#define __pure __const -#endif -#endif - -/* Delete pseudo-keywords wherever they are not available or needed. */ -#ifndef __dead -#define __dead -#define __pure -#endif -#ifndef __dead2 -#define __dead2 -#define __pure2 -#define __unused -#endif - -/* - * GCC 2.95 provides `__restrict' as an extension to C90 to support the - * C99-specific `restrict' type qualifier. We happen to use `__restrict' as - * a way to define the `restrict' type qualifier without disturbing older - * software that is unaware of C99 keywords. - */ -#if !(__GNUC__ == 2 && __GNUC_MINOR__ == 95) -#if __STDC_VERSION__ < 199901 -#define __restrict -#else -#define __restrict restrict -#endif -#endif - -/* - * Compiler-dependent macros to declare that functions take printf-like - * or scanf-like arguments. They are null except for versions of gcc - * that are known to support the features properly. Functions declared - * with these attributes will cause compilation warnings if there is a - * mismatch between the format string and subsequent function parameter - * types. - */ -#if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7 -#define __printflike(fmtarg, firstvararg) \ - __attribute__((__format__ (__printf__, fmtarg, firstvararg))) -#define __scanflike(fmtarg, firstvararg) \ - __attribute__((__format__ (__scanf__, fmtarg, firstvararg))) -#else -#define __printflike(fmtarg, firstvararg) -#define __scanflike(fmtarg, firstvararg) -#endif - -#define __IDSTRING(name,string) static const char name[] __unused = string - -#ifndef __COPYRIGHT -#define __COPYRIGHT(s) __IDSTRING(copyright,s) -#endif - -#ifndef __RCSID -#define __RCSID(s) __IDSTRING(rcsid,s) -#endif - -#ifndef __SCCSID -#define __SCCSID(s) __IDSTRING(sccsid,s) -#endif - -#ifndef __PROJECT_VERSION -#define __PROJECT_VERSION(s) __IDSTRING(project_version,s) -#endif - -/* - * COMPILATION ENVIRONMENTS - * - * DEFAULT By default newly complied code will get POSIX APIs plus - * Apple API extensions in scope. - * - * Most users will use this compilation environment to avoid - * behavioral differences between 32 and 64 bit code. - * - * LEGACY Defining _NONSTD_SOURCE will get pre-POSIX APIs plus Apple - * API extensions in scope. - * - * This is generally equivalent to the Tiger release compilation - * environment, except that it cannot be applied to 64 bit code; - * its use is discouraged. - * - * We expect this environment to be deprecated in the future. - * - * STRICT Defining _POSIX_C_SOURCE or _XOPEN_SOURCE restricts the - * available APIs to exactly the set of APIs defined by the - * corresponding standard, based on the value defined. - * - * A correct, portable definition for _POSIX_C_SOURCE is 200112L. - * A correct, portable definition for _XOPEN_SOURCE is 600L. - * - * Apple API extensions are not visible in this environment, - * which can cause Apple specific code to fail to compile, - * or behave incorrectly if prototypes are not in scope or - * warnings about missing prototypes are not enabled or ignored. - * - * In any compilation environment, for correct symbol resolution to occur, - * function prototypes must be in scope. It is recommended that all Apple - * tools users add either the "-Wall" or "-Wimplicit-function-declaration" - * compiler flags to their projects to be warned when a function is being - * used without a prototype in scope. - */ - -/* These settings are particular to each product. */ -/* Product: MacOSX */ -#define __DARWIN_ONLY_64_BIT_INO_T 0 -/* #undef __DARWIN_ONLY_UNIX_CONFORMANCE (automatically set for 64-bit) */ -#define __DARWIN_ONLY_VERS_1050 0 - -/* - * The __DARWIN_ALIAS macros are used to do symbol renaming; they allow - * legacy code to use the old symbol, thus maintaining binary compatibility - * while new code can use a standards compliant version of the same function. - * - * __DARWIN_ALIAS is used by itself if the function signature has not - * changed, it is used along with a #ifdef check for __DARWIN_UNIX03 - * if the signature has changed. Because the __LP64__ environment - * only supports UNIX03 semantics it causes __DARWIN_UNIX03 to be - * defined, but causes __DARWIN_ALIAS to do no symbol mangling. - * - * As a special case, when XCode is used to target a specific version of the - * OS, the manifest constant __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - * will be defined by the compiler, with the digits representing major version - * time 100 + minor version times 10 (e.g. 10.5 := 1050). If we are targeting - * pre-10.5, and it is the default compilation environment, revert the - * compilation environment to pre-__DARWIN_UNIX03. - */ -#if !defined(__DARWIN_ONLY_UNIX_CONFORMANCE) -# if defined(__LP64__) -# define __DARWIN_ONLY_UNIX_CONFORMANCE 1 -# else /* !__LP64__ */ -# define __DARWIN_ONLY_UNIX_CONFORMANCE 0 -# endif /* __LP64__ */ -#endif /* !__DARWIN_ONLY_UNIX_CONFORMANCE */ - -#if !defined(__DARWIN_UNIX03) -# if __DARWIN_ONLY_UNIX_CONFORMANCE -# if defined(_NONSTD_SOURCE) -# error "Can't define _NONSTD_SOURCE when only UNIX conformance is available." -# endif /* _NONSTD_SOURCE */ -# define __DARWIN_UNIX03 1 -# elif defined(_DARWIN_C_SOURCE) || defined(_XOPEN_SOURCE) || defined(_POSIX_C_SOURCE) -# if defined(_NONSTD_SOURCE) -# error "Can't define both _NONSTD_SOURCE and any of _DARWIN_C_SOURCE, _XOPEN_SOURCE or _POSIX_C_SOURCE." -# endif /* _NONSTD_SOURCE */ -# define __DARWIN_UNIX03 1 -# elif defined(_NONSTD_SOURCE) -# define __DARWIN_UNIX03 0 -# else /* default */ -# if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1050) -# define __DARWIN_UNIX03 0 -# else /* __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 */ -# define __DARWIN_UNIX03 1 -# endif /* __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 */ -# endif /* _DARWIN_C_SOURCE || _XOPEN_SOURCE || _POSIX_C_SOURCE || __LP64__ */ -#endif /* !__DARWIN_UNIX03 */ - -#if !defined(__DARWIN_64_BIT_INO_T) -# if defined(_DARWIN_USE_64_BIT_INODE) -# if defined(_DARWIN_NO_64_BIT_INODE) -# error "Can't define both _DARWIN_USE_64_BIT_INODE and _DARWIN_NO_64_BIT_INODE." -# endif /* _DARWIN_NO_64_BIT_INODE */ -# define __DARWIN_64_BIT_INO_T 1 -# elif defined(_DARWIN_NO_64_BIT_INODE) -# if __DARWIN_ONLY_64_BIT_INO_T -# error "Can't define _DARWIN_NO_64_BIT_INODE when only 64-bit inodes are available." -# endif /* __DARWIN_ONLY_64_BIT_INO_T */ -# define __DARWIN_64_BIT_INO_T 0 -# else /* default */ -# if __DARWIN_ONLY_64_BIT_INO_T -# define __DARWIN_64_BIT_INO_T 1 -# elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1060) || __DARWIN_UNIX03 == 0 -# define __DARWIN_64_BIT_INO_T 0 -# else /* default */ -# define __DARWIN_64_BIT_INO_T 1 -# endif /* __DARWIN_ONLY_64_BIT_INO_T */ -# endif -#endif /* !__DARWIN_64_BIT_INO_T */ - -#if !defined(__DARWIN_VERS_1050) -# if __DARWIN_ONLY_VERS_1050 -# define __DARWIN_VERS_1050 1 -# elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1050) || __DARWIN_UNIX03 == 0 -# define __DARWIN_VERS_1050 0 -# else /* default */ -# define __DARWIN_VERS_1050 1 -# endif -#endif /* !__DARWIN_VERS_1050 */ - -#if !defined(__DARWIN_NON_CANCELABLE) -# define __DARWIN_NON_CANCELABLE 0 -#endif /* !__DARWIN_NON_CANCELABLE */ - -/* - * symbol suffixes used for symbol versioning - */ -#if __DARWIN_UNIX03 -# if __DARWIN_ONLY_UNIX_CONFORMANCE -# define __DARWIN_SUF_UNIX03 /* nothing */ -# else /* !__DARWIN_ONLY_UNIX_CONFORMANCE */ -# define __DARWIN_SUF_UNIX03 "$UNIX2003" -# endif /* __DARWIN_ONLY_UNIX_CONFORMANCE */ - -# if __DARWIN_64_BIT_INO_T -# if __DARWIN_ONLY_64_BIT_INO_T -# define __DARWIN_SUF_64_BIT_INO_T /* nothing */ -# else /* !__DARWIN_ONLY_64_BIT_INO_T */ -# define __DARWIN_SUF_64_BIT_INO_T "$INODE64" -# endif /* __DARWIN_ONLY_64_BIT_INO_T */ -# else /* !__DARWIN_64_BIT_INO_T */ -# define __DARWIN_SUF_64_BIT_INO_T /* nothing */ -# endif /* __DARWIN_64_BIT_INO_T */ - -# if __DARWIN_VERS_1050 -# if __DARWIN_ONLY_VERS_1050 -# define __DARWIN_SUF_1050 /* nothing */ -# else /* !__DARWIN_ONLY_VERS_1050 */ -# define __DARWIN_SUF_1050 "$1050" -# endif /* __DARWIN_ONLY_VERS_1050 */ -# else /* !__DARWIN_VERS_1050 */ -# define __DARWIN_SUF_1050 /* nothing */ -# endif /* __DARWIN_VERS_1050 */ - -# if __DARWIN_NON_CANCELABLE -# define __DARWIN_SUF_NON_CANCELABLE "$NOCANCEL" -# else /* !__DARWIN_NON_CANCELABLE */ -# define __DARWIN_SUF_NON_CANCELABLE /* nothing */ -# endif /* __DARWIN_NON_CANCELABLE */ - -#else /* !__DARWIN_UNIX03 */ -# define __DARWIN_SUF_UNIX03 /* nothing */ -# define __DARWIN_SUF_64_BIT_INO_T /* nothing */ -# define __DARWIN_SUF_NON_CANCELABLE /* nothing */ -# define __DARWIN_SUF_1050 /* nothing */ -#endif /* __DARWIN_UNIX03 */ - -#define __DARWIN_SUF_EXTSN "$DARWIN_EXTSN" - -/* - * symbol versioning macros - */ -#define __DARWIN_ALIAS(sym) __asm("_" __STRING(sym) __DARWIN_SUF_UNIX03) -#define __DARWIN_ALIAS_C(sym) __asm("_" __STRING(sym) __DARWIN_SUF_NON_CANCELABLE __DARWIN_SUF_UNIX03) -#define __DARWIN_ALIAS_I(sym) __asm("_" __STRING(sym) __DARWIN_SUF_64_BIT_INO_T __DARWIN_SUF_UNIX03) -#define __DARWIN_INODE64(sym) __asm("_" __STRING(sym) __DARWIN_SUF_64_BIT_INO_T) - -#define __DARWIN_1050(sym) __asm("_" __STRING(sym) __DARWIN_SUF_1050) -#define __DARWIN_1050ALIAS(sym) __asm("_" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_UNIX03) -#define __DARWIN_1050ALIAS_C(sym) __asm("_" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_NON_CANCELABLE __DARWIN_SUF_UNIX03) -#define __DARWIN_1050ALIAS_I(sym) __asm("_" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_64_BIT_INO_T __DARWIN_SUF_UNIX03) -#define __DARWIN_1050INODE64(sym) __asm("_" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_64_BIT_INO_T) - -#define __DARWIN_EXTSN(sym) __asm("_" __STRING(sym) __DARWIN_SUF_EXTSN) -#define __DARWIN_EXTSN_C(sym) __asm("_" __STRING(sym) __DARWIN_SUF_EXTSN __DARWIN_SUF_NON_CANCELABLE) - -/* - * symbol release macros - */ -#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1060) -#undef __DARWIN_10_6_AND_LATER -#define __DARWIN_10_6_AND_LATER_ALIAS(x) /* nothing */ -#else /* 10.6 and beyond */ -#define __DARWIN_10_6_AND_LATER -#define __DARWIN_10_6_AND_LATER_ALIAS(x) x -#endif - - -/* - * POSIX.1 requires that the macros we test be defined before any standard - * header file is included. This permits us to convert values for feature - * testing, as necessary, using only _POSIX_C_SOURCE. - * - * Here's a quick run-down of the versions: - * defined(_POSIX_SOURCE) 1003.1-1988 - * _POSIX_C_SOURCE == 1L 1003.1-1990 - * _POSIX_C_SOURCE == 2L 1003.2-1992 C Language Binding Option - * _POSIX_C_SOURCE == 199309L 1003.1b-1993 - * _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, - * and the omnibus ISO/IEC 9945-1: 1996 - * _POSIX_C_SOURCE == 200112L 1003.1-2001 - * - * In addition, the X/Open Portability Guide, which is now the Single UNIX - * Specification, defines a feature-test macro which indicates the version of - * that specification, and which subsumes _POSIX_C_SOURCE. - */ - -/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1L. */ -#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1L -#undef _POSIX_C_SOURCE -#define _POSIX_C_SOURCE 199009L -#endif - -/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2L. */ -#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2L -#undef _POSIX_C_SOURCE -#define _POSIX_C_SOURCE 199209L -#endif - -/* Deal with various X/Open Portability Guides and Single UNIX Spec. */ -#ifdef _XOPEN_SOURCE -#if _XOPEN_SOURCE - 0L >= 600L -#undef _POSIX_C_SOURCE -#define _POSIX_C_SOURCE 200112L -#elif _XOPEN_SOURCE - 0L >= 500L -#undef _POSIX_C_SOURCE -#define _POSIX_C_SOURCE 199506L -#endif -#endif - -/* - * Deal with all versions of POSIX. The ordering relative to the tests above is - * important. - */ -#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) -#define _POSIX_C_SOURCE 198808L -#endif - -/* - * long long is not supported in c89 (__STRICT_ANSI__), but g++ -ansi and - * c99 still want long longs. While not perfect, we allow long longs for - * g++. - */ -#define __DARWIN_NO_LONG_LONG (defined(__STRICT_ANSI__) \ - && (__STDC_VERSION__-0 < 199901L) \ - && !defined(__GNUG__)) - -/* - * Long double compatibility macro allow selecting variant symbols based - * on the old (compatible) 64-bit long doubles, or the new 128-bit - * long doubles. This applies only to ppc; i386 already has long double - * support, while ppc64 doesn't have any backwards history. - */ -#if defined(__arm__) -# define __DARWIN_LDBL_COMPAT(x) /* nothing */ -# define __DARWIN_LDBL_COMPAT2(x) /* nothing */ -# define __DARWIN_LONG_DOUBLE_IS_DOUBLE 1 -#elif defined(__ppc__) -# if defined(__LDBL_MANT_DIG__) && defined(__DBL_MANT_DIG__) && \ - __LDBL_MANT_DIG__ > __DBL_MANT_DIG__ -# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 < 1040 -# define __DARWIN_LDBL_COMPAT(x) __asm("_" __STRING(x) "$LDBLStub") -# else -# define __DARWIN_LDBL_COMPAT(x) __asm("_" __STRING(x) "$LDBL128") -# endif -# define __DARWIN_LDBL_COMPAT2(x) __asm("_" __STRING(x) "$LDBL128") -# define __DARWIN_LONG_DOUBLE_IS_DOUBLE 0 -# else -# define __DARWIN_LDBL_COMPAT(x) /* nothing */ -# define __DARWIN_LDBL_COMPAT2(x) /* nothing */ -# define __DARWIN_LONG_DOUBLE_IS_DOUBLE 1 -# endif -#elif defined(__i386__) || defined(__ppc64__) || defined(__x86_64__) -# define __DARWIN_LDBL_COMPAT(x) /* nothing */ -# define __DARWIN_LDBL_COMPAT2(x) /* nothing */ -# define __DARWIN_LONG_DOUBLE_IS_DOUBLE 0 -#else -# error Unknown architecture -#endif - -/* - * Deprecation macro - */ -#if __GNUC__ >= 3 -#define __deprecated __attribute__((deprecated)) -#else -#define __deprecated /* nothing */ -#endif - -/***************************************** - * Public darwin-specific feature macros - *****************************************/ - -/* - * _DARWIN_FEATURE_64_BIT_INODE indicates that the ino_t type is 64-bit, and - * structures modified for 64-bit inodes (like struct stat) will be used. - */ -#if __DARWIN_64_BIT_INO_T -#define _DARWIN_FEATURE_64_BIT_INODE 1 -#endif - -/* - * _DARWIN_FEATURE_LONG_DOUBLE_IS_DOUBLE indicates when the long double type - * is the same as the double type (ppc and arm only) - */ -#if __DARWIN_LONG_DOUBLE_IS_DOUBLE -#define _DARWIN_FEATURE_LONG_DOUBLE_IS_DOUBLE 1 -#endif - -/* - * _DARWIN_FEATURE_64_ONLY_BIT_INODE indicates that the ino_t type may only - * be 64-bit; there is no support for 32-bit ino_t when this macro is defined - * (and non-zero). There is no struct stat64 either, as the regular - * struct stat will already be the 64-bit version. - */ -#if __DARWIN_ONLY_64_BIT_INO_T -#define _DARWIN_FEATURE_ONLY_64_BIT_INODE 1 -#endif - -/* - * _DARWIN_FEATURE_ONLY_VERS_1050 indicates that only those APIs updated - * in 10.5 exists; no pre-10.5 variants are available. - */ -#if __DARWIN_ONLY_VERS_1050 -#define _DARWIN_FEATURE_ONLY_VERS_1050 1 -#endif - -/* - * _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE indicates only UNIX conforming API - * are available (the legacy BSD APIs are not available) - */ -#if __DARWIN_ONLY_UNIX_CONFORMANCE -#define _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE 1 -#endif - -/* - * _DARWIN_FEATURE_UNIX_CONFORMANCE indicates whether UNIX conformance is on, - * and specifies the conformance level (3 is SUSv3) - */ -#if __DARWIN_UNIX03 -#define _DARWIN_FEATURE_UNIX_CONFORMANCE 3 -#endif - -/* - * This macro casts away the qualifier from the variable - * - * Note: use at your own risk, removing qualifiers can result in - * catastrophic run-time failures. - */ -#ifndef __CAST_AWAY_QUALIFIER -#define __CAST_AWAY_QUALIFIER(variable, qualifier, type) (type) ((char *)0 + ((qualifier char *)(variable) - (qualifier char *)0) ) -#endif - -#endif /* !_CDEFS_H_ */ diff --git a/i386/include/sys/disk.h b/i386/include/sys/disk.h deleted file mode 100644 index bd61eb6..0000000 --- a/i386/include/sys/disk.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _SYS_DISK_H_ -#define _SYS_DISK_H_ - -#include <stdint.h> -//#include <sys/ioctl.h> - -/* - * Definitions - * - * ioctl description - * ------------------------------------- --------------------------------------- - * DKIOCEJECT eject media - * DKIOCSYNCHRONIZECACHE flush media - * - * DKIOCFORMAT format media - * DKIOCGETFORMATCAPACITIES get media's formattable capacities - * - * DKIOCGETBLOCKSIZE get media's block size - * DKIOCGETBLOCKCOUNT get media's block count - * DKIOCGETFIRMWAREPATH get media's firmware path - * - * DKIOCISFORMATTED is media formatted? - * DKIOCISWRITABLE is media writable? - * - * DKIOCREQUESTIDLE idle media - * DKIOCDISCARD delete unused data - * - * DKIOCGETMAXBLOCKCOUNTREAD get maximum block count for reads - * DKIOCGETMAXBLOCKCOUNTWRITE get maximum block count for writes - * DKIOCGETMAXBYTECOUNTREAD get maximum byte count for reads - * DKIOCGETMAXBYTECOUNTWRITE get maximum byte count for writes - * - * DKIOCGETMAXSEGMENTCOUNTREAD get maximum segment count for reads - * DKIOCGETMAXSEGMENTCOUNTWRITE get maximum segment count for writes - * DKIOCGETMAXSEGMENTBYTECOUNTREAD get maximum segment byte count for reads - * DKIOCGETMAXSEGMENTBYTECOUNTWRITE get maximum segment byte count for writes - * - * DKIOCGETMINSEGMENTALIGNMENTBYTECOUNT get minimum segment alignment in bytes - * DKIOCGETMAXSEGMENTADDRESSABLEBITCOUNT get maximum segment width in bits - * - * DKIOCGETPHYSICALBLOCKSIZE get device's block size - * DKIOCGETCOMMANDPOOLSIZE get device's queue depth - */ - -typedef struct -{ - uint64_t offset; - uint64_t length; - - uint8_t reserved0128[16]; /* reserved, clear to zero */ -} dk_discard_t; - -typedef struct -{ - char path[128]; -} dk_firmware_path_t; - -typedef struct -{ - uint64_t blockCount; - uint32_t blockSize; - - uint8_t reserved0096[4]; /* reserved, clear to zero */ -} dk_format_capacity_t; - -typedef struct -{ - dk_format_capacity_t * capacities; - uint32_t capacitiesCount; /* use zero to probe count */ - -#ifdef __LP64__ - uint8_t reserved0096[4]; /* reserved, clear to zero */ -#else /* !__LP64__ */ - uint8_t reserved0064[8]; /* reserved, clear to zero */ -#endif /* !__LP64__ */ -} dk_format_capacities_t; - -#define DKIOCEJECT _IO('d', 21) -#define DKIOCSYNCHRONIZECACHE _IO('d', 22) - -#define DKIOCFORMAT _IOW('d', 26, dk_format_capacity_t) -#define DKIOCGETFORMATCAPACITIES _IOWR('d', 26, dk_format_capacities_t) - -#define DKIOCGETBLOCKSIZE _IOR('d', 24, uint32_t) -#define DKIOCGETBLOCKCOUNT _IOR('d', 25, uint64_t) -#define DKIOCGETFIRMWAREPATH _IOR('d', 28, dk_firmware_path_t) - -#define DKIOCISFORMATTED _IOR('d', 23, uint32_t) -#define DKIOCISWRITABLE _IOR('d', 29, uint32_t) - -#define DKIOCREQUESTIDLE _IO('d', 30) -#define DKIOCDISCARD _IOW('d', 31, dk_discard_t) - -#define DKIOCGETMAXBLOCKCOUNTREAD _IOR('d', 64, uint64_t) -#define DKIOCGETMAXBLOCKCOUNTWRITE _IOR('d', 65, uint64_t) -#define DKIOCGETMAXBYTECOUNTREAD _IOR('d', 70, uint64_t) -#define DKIOCGETMAXBYTECOUNTWRITE _IOR('d', 71, uint64_t) - -#define DKIOCGETMAXSEGMENTCOUNTREAD _IOR('d', 66, uint64_t) -#define DKIOCGETMAXSEGMENTCOUNTWRITE _IOR('d', 67, uint64_t) -#define DKIOCGETMAXSEGMENTBYTECOUNTREAD _IOR('d', 68, uint64_t) -#define DKIOCGETMAXSEGMENTBYTECOUNTWRITE _IOR('d', 69, uint64_t) - -#define DKIOCGETMINSEGMENTALIGNMENTBYTECOUNT _IOR('d', 74, uint64_t) -#define DKIOCGETMAXSEGMENTADDRESSABLEBITCOUNT _IOR('d', 75, uint64_t) - -#define DKIOCGETPHYSICALBLOCKSIZE _IOR('d', 77, uint32_t) -#define DKIOCGETCOMMANDPOOLSIZE _IOR('d', 78, uint32_t) - - -#endif /* _SYS_DISK_H_ */ diff --git a/i386/include/sys/kernel_types.h b/i386/include/sys/kernel_types.h deleted file mode 100644 index 7d7d709..0000000 --- a/i386/include/sys/kernel_types.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 2004-2010 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ - -#ifndef _KERN_SYS_KERNELTYPES_H_ -#define _KERN_SYS_KERNELTYPES_H_ - -#include <sys/cdefs.h> -#include <sys/types.h> -#include <stdint.h> - -#ifdef BSD_BUILD -/* Macros(?) to clear/set/test flags. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~(f) -#define ISSET(t, f) ((t) & (f)) -#endif - - -typedef int errno_t; -typedef int64_t daddr64_t; - -#ifndef BSD_BUILD -struct buf; -typedef struct buf * buf_t; - -struct file; -typedef struct file * file_t; - -#ifndef __LP64__ -struct ucred; -typedef struct ucred * ucred_t; -#endif - -struct mount; -typedef struct mount * mount_t; - -struct vnode; -typedef struct vnode * vnode_t; - -struct proc; -typedef struct proc * proc_t; - -struct uio; -typedef struct uio * uio_t; - -struct vfs_context; -typedef struct vfs_context * vfs_context_t; - -struct vfstable; -typedef struct vfstable * vfstable_t; - -struct __ifnet; -struct __mbuf; -struct __pkthdr; -struct __socket; -struct __sockopt; -struct __ifaddr; -struct __ifmultiaddr; -struct __ifnet_filter; -struct __rtentry; -struct __if_clone; - -typedef struct __ifnet* ifnet_t; -typedef struct __mbuf* mbuf_t; -typedef struct __pkthdr* pkthdr_t; -typedef struct __socket* socket_t; -typedef struct __sockopt* sockopt_t; -typedef struct __ifaddr* ifaddr_t; -typedef struct __ifmultiaddr* ifmultiaddr_t; -typedef struct __ifnet_filter* interface_filter_t; -typedef struct __rtentry* route_t; -typedef struct __if_clone* if_clone_t; - -#else /* BSD_BUILD */ - -typedef struct buf * buf_t; -typedef struct file * file_t; -#ifndef __LP64__ -typedef struct ucred * ucred_t; -#endif -typedef struct mount * mount_t; -typedef struct vnode * vnode_t; -typedef struct proc * proc_t; -typedef struct uio * uio_t; -typedef struct user_iovec * user_iovec_t; -typedef struct vfs_context * vfs_context_t; -typedef struct vfstable * vfstable_t; - - -#endif /* !BSD_BUILD */ - -#ifndef _KAUTH_GUID -#define _KAUTH_GUID -/* Apple-style globally unique identifier */ -typedef struct { -#define KAUTH_GUID_SIZE 16 /* 128-bit identifier */ - unsigned char g_guid[KAUTH_GUID_SIZE]; -} guid_t; -#define _GUID_T -#endif /* _KAUTH_GUID */ - -#ifndef _KAUTH_ACE -#define _KAUTH_ACE -struct kauth_ace; -typedef struct kauth_ace * kauth_ace_t; -#endif -#ifndef _KAUTH_ACL -#define _KAUTH_ACL -struct kauth_acl; -typedef struct kauth_acl * kauth_acl_t; -#endif -#ifndef _KAUTH_FILESEC -#define _KAUTH_FILESEC -struct kauth_filesec; -typedef struct kauth_filesec * kauth_filesec_t; -#endif - -#endif /* !_KERN_SYS_KERNELTYPES_H_ */ diff --git a/i386/include/sys/param.h b/i386/include/sys/param.h deleted file mode 100644 index 395fdf5..0000000 --- a/i386/include/sys/param.h +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1995, 1997 Apple Computer, Inc. All Rights Reserved */ -/*- - * Copyright (c) 1982, 1986, 1989, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)param.h 8.3 (Berkeley) 4/4/95 - */ - -#ifndef _SYS_PARAM_H_ -#define _SYS_PARAM_H_ - -#define BSD 199506 /* System version (year & month). */ -#define BSD4_3 1 -#define BSD4_4 1 - -#define NeXTBSD 1995064 /* NeXTBSD version (year, month, release) */ -#define NeXTBSD4_0 0 /* NeXTBSD 4.0 */ - -#ifndef NULL -#define NULL __DARWIN_NULL -#endif /* ! NULL */ - -#ifndef LOCORE -#include <sys/types.h> -#endif - -/* - * Machine-independent constants (some used in following include files). - * Redefined constants are from POSIX 1003.1 limits file. - * - * MAXCOMLEN should be >= sizeof(ac_comm) (see <acct.h>) - * MAXLOGNAME should be >= UT_NAMESIZE (see <utmp.h>) - */ -#include <sys/syslimits.h> - -#define MAXCOMLEN 16 /* max command name remembered */ -#define MAXINTERP 64 /* max interpreter file name length */ -#define MAXLOGNAME 255 /* max login name length */ -#define MAXUPRC CHILD_MAX /* max simultaneous processes */ -#define NCARGS ARG_MAX /* max bytes for an exec function */ -#define NGROUPS NGROUPS_MAX /* max number groups */ -#define NOFILE 256 /* default max open files per process */ -#define NOGROUP 65535 /* marker for empty group set member */ -#define MAXHOSTNAMELEN 256 /* max hostname size */ -#define MAXDOMNAMELEN 256 /* maximum domain name length */ - -/* Machine type dependent parameters. */ -#include <i386/param.h> - -/* More types and definitions used throughout the kernel. */ -#include <limits.h> - -/* - * Priorities. Note that with 32 run queues, differences less than 4 are - * insignificant. - */ -#define PSWP 0 -#define PVM 4 -#define PINOD 8 -#define PRIBIO 16 -#define PVFS 20 -#define PZERO 22 /* No longer magic, shouldn't be here. XXX */ -#define PSOCK 24 -#define PWAIT 32 -#define PLOCK 36 -#define PPAUSE 40 -#define PUSER 50 -#define MAXPRI 127 /* Priorities range from 0 through MAXPRI. */ - -#define PRIMASK 0x0ff -#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */ -#define PTTYBLOCK 0x200 /* for tty SIGTTOU and SIGTTIN blocking */ -#define PDROP 0x400 /* OR'd with pri to stop re-aquistion of mutex upon wakeup */ -#define PSPIN 0x800 /* OR'd with pri to require mutex in spin mode upon wakeup */ - -#define NBPW sizeof(int) /* number of bytes per word (integer) */ - -#define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */ -#define NODEV (dev_t)(-1) /* non-existent device */ - -/* - * Clustering of hardware pages on machines with ridiculously small - * page sizes is done here. The paging subsystem deals with units of - * CLSIZE pte's describing NBPG (from machine/param.h) pages each. - */ -#define CLBYTES (CLSIZE*NBPG) -#define CLOFSET (CLSIZE*NBPG-1) /* for clusters, like PGOFSET */ -#define claligned(x) ((((int)(x))&CLOFSET)==0) -#define CLOFF CLOFSET -#define CLSHIFT (PGSHIFT+CLSIZELOG2) - -#if CLSIZE==1 -#define clbase(i) (i) -#define clrnd(i) (i) -#else -/* Give the base virtual address (first of CLSIZE). */ -#define clbase(i) ((i) &~ (CLSIZE-1)) -/* Round a number of clicks up to a whole cluster. */ -#define clrnd(i) (((i) + (CLSIZE-1)) &~ (CLSIZE-1)) -#endif - -#define CBLOCK 64 /* Clist block size, must be a power of 2. */ -#define CBQSIZE (CBLOCK/NBBY) /* Quote bytes/cblock - can do better. */ - /* Data chars/clist. */ -#define CBSIZE (CBLOCK - sizeof(struct cblock *) - CBQSIZE) -#define CROUND (CBLOCK - 1) /* Clist rounding. */ - -/* - * File system parameters and macros. - * - * The file system is made out of blocks of at most MAXPHYS units, with - * smaller units (fragments) only in the last direct block. MAXBSIZE - * primarily determines the size of buffers in the buffer pool. It may be - * made larger than MAXPHYS without any effect on existing file systems; - * however making it smaller may make some file systems unmountable. - * We set this to track the value of (MAX_UPL_TRANSFER*PAGE_SIZE) from - * osfmk/mach/memory_object_types.h to bound it at the maximum UPL size. - */ -#define MAXBSIZE (256 * 4096) -#define MAXPHYSIO MAXPHYS -#define MAXFRAG 8 - -#define MAXPHYSIO_WIRED (16 * 1024 * 1024) - -/* - * MAXPATHLEN defines the longest permissable path length after expanding - * symbolic links. It is used to allocate a temporary buffer from the buffer - * pool in which to do the name expansion, hence should be a power of two, - * and must be less than or equal to MAXBSIZE. MAXSYMLINKS defines the - * maximum number of symbolic links that may be expanded in a path name. - * It should be set high enough to allow all legitimate uses, but halt - * infinite loops reasonably quickly. - */ -#define MAXPATHLEN PATH_MAX -#define MAXSYMLINKS 32 - -/* Bit map related macros. */ -#define setbit(a,i) (((char *)(a))[(i)/NBBY] |= 1<<((i)%NBBY)) -#define clrbit(a,i) (((char *)(a))[(i)/NBBY] &= ~(1<<((i)%NBBY))) -#define isset(a,i) (((char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) -#define isclr(a,i) ((((char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) == 0) - -/* Macros for counting and rounding. */ -#ifndef howmany -#define howmany(x, y) ((((x) % (y)) == 0) ? ((x) / (y)) : (((x) / (y)) + 1)) -#endif -#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) -#define powerof2(x) ((((x)-1)&(x))==0) - -/* Macros for min/max. */ -#ifndef MIN -#define MIN(a,b) (((a)<(b))?(a):(b)) -#endif /* MIN */ -#ifndef MAX -#define MAX(a,b) (((a)>(b))?(a):(b)) -#endif /* MAX */ - -/* - * Constants for setting the parameters of the kernel memory allocator. - * - * 2 ** MINBUCKET is the smallest unit of memory that will be - * allocated. It must be at least large enough to hold a pointer. - * - * Units of memory less or equal to MAXALLOCSAVE will permanently - * allocate physical memory; requests for these size pieces of - * memory are quite fast. Allocations greater than MAXALLOCSAVE must - * always allocate and free physical memory; requests for these - * size allocations should be done infrequently as they will be slow. - * - * Constraints: CLBYTES <= MAXALLOCSAVE <= 2 ** (MINBUCKET + 14), and - * MAXALLOCSIZE must be a power of two. - */ -#define MINBUCKET 4 /* 4 => min allocation of 16 bytes */ -#define MAXALLOCSAVE (2 * CLBYTES) - -/* - * Scale factor for scaled integers used to count %cpu time and load avgs. - * - * The number of CPU `tick's that map to a unique `%age' can be expressed - * by the formula (1 / (2 ^ (FSHIFT - 11))). The maximum load average that - * can be calculated (assuming 32 bits) can be closely approximated using - * the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15). - * - * For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age', - * FSHIFT must be at least 11; this gives us a maximum load avg of ~1024. - */ -#define FSHIFT 11 /* bits to right of fixed binary point */ -#define FSCALE (1<<FSHIFT) - -#endif /* _SYS_PARAM_H_ */ diff --git a/i386/include/sys/reboot.h b/i386/include/sys/reboot.h deleted file mode 100644 index 147a209..0000000 --- a/i386/include/sys/reboot.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ -/* - * Copyright (c) 1982, 1986, 1988, 1993, 1994 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)reboot.h 8.3 (Berkeley) 12/13/94 - */ - -#ifndef _SYS_REBOOT_H_ -#define _SYS_REBOOT_H_ - -/* - * Arguments to reboot system call. - */ - -#ifdef __APPLE_API_PRIVATE -#define RB_AUTOBOOT 0 /* flags for system auto-booting itself */ - -#define RB_ASKNAME 0x01 /* ask for file name to reboot from */ -#define RB_SINGLE 0x02 /* reboot to single user only */ -#define RB_NOSYNC 0x04 /* dont sync before reboot */ -#define RB_HALT 0x08 /* don't reboot, just halt */ -#define RB_INITNAME 0x10 /* name given for /etc/init */ -#define RB_DFLTROOT 0x20 /* use compiled-in rootdev */ -#define RB_ALTBOOT 0x40 /* use /boot.old vs /boot */ -#define RB_UNIPROC 0x80 /* don't start slaves */ -#define RB_SAFEBOOT 0x100 /* booting safe */ -#define RB_UPSDELAY 0x200 /* Delays restart by 5 minutes */ -#define RB_QUICK 0x400 /* quick and ungraceful reboot with file system caches flushed*/ -#define RB_PANIC 0 /* reboot due to panic */ -#define RB_BOOT 1 /* reboot due to boot() */ - -#endif /* __APPLE_API_PRIVATE */ - -#ifdef __APPLE_API_OBSOLETE -/* - * Constants for converting boot-style device number to type, - * adaptor (uba, mba, etc), unit number and partition number. - * Type (== major device number) is in the low byte - * for backward compatibility. Except for that of the "magic - * number", each mask applies to the shifted value. - * Format: - * (4) (4) (4) (4) (8) (8) - * -------------------------------- - * |MA | AD| CT| UN| PART | TYPE | - * -------------------------------- - */ -#define B_ADAPTORSHIFT 24 -#define B_ADAPTORMASK 0x0f -#define B_ADAPTOR(val) (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK) -#define B_CONTROLLERSHIFT 20 -#define B_CONTROLLERMASK 0xf -#define B_CONTROLLER(val) (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK) -#define B_UNITSHIFT 16 -#define B_UNITMASK 0xff -#define B_UNIT(val) (((val) >> B_UNITSHIFT) & B_UNITMASK) -#define B_PARTITIONSHIFT 8 -#define B_PARTITIONMASK 0xff -#define B_PARTITION(val) (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK) -#define B_TYPESHIFT 0 -#define B_TYPEMASK 0xff -#define B_TYPE(val) (((val) >> B_TYPESHIFT) & B_TYPEMASK) -#define B_MAGICMASK 0xf0000000 -#define B_DEVMAGIC 0xa0000000 - -#define MAKEBOOTDEV(type, adaptor, controller, unit, partition) \ - (((type) << B_TYPESHIFT) | ((adaptor) << B_ADAPTORSHIFT) | \ - ((controller) << B_CONTROLLERSHIFT) | ((unit) << B_UNITSHIFT) | \ - ((partition) << B_PARTITIONSHIFT) | B_DEVMAGIC) - -#endif /* __APPLE_API_OBSOLETE */ - - -#endif /* _SYS_REBOOT_H_ */ diff --git a/i386/include/sys/select.h b/i386/include/sys/select.h deleted file mode 100644 index 49a4572..0000000 --- a/i386/include/sys/select.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1992, 1993 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)select.h 8.2 (Berkeley) 1/4/94 - */ - -#ifndef _SYS_SELECT_H_ -#define _SYS_SELECT_H_ - -#include <sys/appleapiopts.h> -#include <sys/cdefs.h> -#include <sys/_types.h> - -/* - * [XSI] The <sys/select.h> header shall define the fd_set type as a structure. - * The timespec structure shall be defined as described in <time.h> - * The <sys/select.h> header shall define the timeval structure. - */ -#define __need_fd_set -#define __need_struct_timespec -#define __need_struct_timeval -#include <sys/_structs.h> - -/* - * The time_t and suseconds_t types shall be defined as described in - * <sys/types.h> - * The sigset_t type shall be defined as described in <signal.h> - */ -#ifndef _TIME_T -#define _TIME_T -typedef __darwin_time_t time_t; -#endif - -#ifndef _SUSECONDS_T -#define _SUSECONDS_T -typedef __darwin_suseconds_t suseconds_t; -#endif - -#ifndef _SIGSET_T -#define _SIGSET_T -typedef __darwin_sigset_t sigset_t; -#endif - -/* - * [XSI] FD_CLR, FD_ISSET, FD_SET, FD_ZERO may be declared as a function, or - * defined as a macro, or both - * [XSI] FD_SETSIZE shall be defined as a macro - */ - -/* - * Select uses bit masks of file descriptors in longs. These macros - * manipulate such bit fields (the filesystem macros use chars). The - * extra protection here is to permit application redefinition above - * the default size. - */ -#ifndef FD_SETSIZE -#define FD_SETSIZE __DARWIN_FD_SETSIZE -#endif /* FD_SETSIZE */ -#ifndef FD_SET -#define FD_SET(n, p) __DARWIN_FD_SET(n, p) -#endif /* FD_SET */ -#ifndef FD_CLR -#define FD_CLR(n, p) __DARWIN_FD_CLR(n, p) -#endif /* FD_CLR */ -#ifndef FD_ISSET -#define FD_ISSET(n, p) __DARWIN_FD_ISSET(n, p) -#endif /* FD_ISSET */ -#ifndef FD_ZERO -#define FD_ZERO(p) __DARWIN_FD_ZERO(p) -#endif /* FD_ZERO */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#ifndef FD_COPY -#define FD_COPY(f, t) __DARWIN_FD_COPY(f, t) -#endif /* FD_COPY */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - - -__BEGIN_DECLS - -#ifndef __MWERKS__ -int pselect(int, fd_set * __restrict, fd_set * __restrict, - fd_set * __restrict, const struct timespec * __restrict, - const sigset_t * __restrict) -#if defined(_DARWIN_C_SOURCE) || defined(_DARWIN_UNLIMITED_SELECT) - __DARWIN_EXTSN_C(pselect) -#else /* !_DARWIN_C_SOURCE && !_DARWIN_UNLIMITED_SELECT */ -# if defined(__LP64__) && !__DARWIN_NON_CANCELABLE - __DARWIN_1050(pselect) -# else /* !__LP64__ || __DARWIN_NON_CANCELABLE */ - __DARWIN_ALIAS_C(pselect) -# endif /* __LP64__ && !__DARWIN_NON_CANCELABLE */ -#endif /* _DARWIN_C_SOURCE || _DARWIN_UNLIMITED_SELECT */ - ; -#endif /* __MWERKS__ */ - -#include <sys/_select.h> /* select() prototype */ - -__END_DECLS - - -#endif /* !_SYS_SELECT_H_ */ diff --git a/i386/include/sys/socket.h b/i386/include/sys/socket.h deleted file mode 100644 index a19105a..0000000 --- a/i386/include/sys/socket.h +++ /dev/null @@ -1,629 +0,0 @@ -/* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1998, 1999 Apple Computer, Inc. All Rights Reserved */ -/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ -/* - * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)socket.h 8.4 (Berkeley) 2/21/94 - * $FreeBSD: src/sys/sys/socket.h,v 1.39.2.7 2001/07/03 11:02:01 ume Exp $ - */ -/* - * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce - * support for mandatory and extensible security protections. This notice - * is included in support of clause 2.2 (b) of the Apple Public License, - * Version 2.0. - */ - -#ifndef _SYS_SOCKET_H_ -#define _SYS_SOCKET_H_ - -#include <sys/types.h> -#include <sys/cdefs.h> -#include <machine/_param.h> - -/* - * Definitions related to sockets: types, address families, options. - */ - -/* - * Data types. - */ -#ifndef _GID_T -typedef __darwin_gid_t gid_t; -#define _GID_T -#endif - -#ifndef _OFF_T -typedef __darwin_off_t off_t; -#define _OFF_T -#endif - -#ifndef _PID_T -typedef __darwin_pid_t pid_t; -#define _PID_T -#endif - -#ifndef _SA_FAMILY_T -#define _SA_FAMILY_T -typedef __uint8_t sa_family_t; -#endif - -#ifndef _SOCKLEN_T -#define _SOCKLEN_T -typedef __darwin_socklen_t socklen_t; -#endif - -/* XXX Not explicitly defined by POSIX, but function return types are */ -#ifndef _SIZE_T -#define _SIZE_T -typedef __darwin_size_t size_t; -#endif - -/* XXX Not explicitly defined by POSIX, but function return types are */ -#ifndef _SSIZE_T -#define _SSIZE_T -typedef __darwin_ssize_t ssize_t; -#endif - -/* - * [XSI] The iovec structure shall be defined as described in <sys/uio.h>. - */ -#ifndef _STRUCT_IOVEC -#define _STRUCT_IOVEC -struct iovec { - void * iov_base; /* [XSI] Base address of I/O memory region */ - size_t iov_len; /* [XSI] Size of region iov_base points to */ -}; -#endif - -/* - * Types - */ -#define SOCK_STREAM 1 /* stream socket */ -#define SOCK_DGRAM 2 /* datagram socket */ -#define SOCK_RAW 3 /* raw-protocol interface */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define SOCK_RDM 4 /* reliably-delivered message */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#define SOCK_SEQPACKET 5 /* sequenced packet stream */ - -/* - * Option flags per-socket. - */ -#define SO_DEBUG 0x0001 /* turn on debugging info recording */ -#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ -#define SO_REUSEADDR 0x0004 /* allow local address reuse */ -#define SO_KEEPALIVE 0x0008 /* keep connections alive */ -#define SO_DONTROUTE 0x0010 /* just use interface addresses */ -#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */ -#define SO_LINGER 0x0080 /* linger on close if data present (in ticks) */ -#else -#define SO_LINGER 0x1080 /* linger on close if data present (in seconds) */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define SO_REUSEPORT 0x0200 /* allow local address & port reuse */ -#define SO_TIMESTAMP 0x0400 /* timestamp received dgram traffic */ -#ifndef __APPLE__ -#define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */ -#else -#define SO_DONTTRUNC 0x2000 /* APPLE: Retain unread data */ - /* (ATOMIC proto) */ -#define SO_WANTMORE 0x4000 /* APPLE: Give hint when more data ready */ -#define SO_WANTOOBFLAG 0x8000 /* APPLE: Want OOB in MSG_FLAG on receive */ -#endif -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -/* - * Additional options, not kept in so_options. - */ -#define SO_SNDBUF 0x1001 /* send buffer size */ -#define SO_RCVBUF 0x1002 /* receive buffer size */ -#define SO_SNDLOWAT 0x1003 /* send low-water mark */ -#define SO_RCVLOWAT 0x1004 /* receive low-water mark */ -#define SO_SNDTIMEO 0x1005 /* send timeout */ -#define SO_RCVTIMEO 0x1006 /* receive timeout */ -#define SO_ERROR 0x1007 /* get error status and clear */ -#define SO_TYPE 0x1008 /* get socket type */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -/*efine SO_PRIVSTATE 0x1009 get/deny privileged state */ -#ifdef __APPLE__ -#define SO_NREAD 0x1020 /* APPLE: get 1st-packet byte count */ -#define SO_NKE 0x1021 /* APPLE: Install socket-level NKE */ -#define SO_NOSIGPIPE 0x1022 /* APPLE: No SIGPIPE on EPIPE */ -#define SO_NOADDRERR 0x1023 /* APPLE: Returns EADDRNOTAVAIL when src is not available anymore */ -#define SO_NWRITE 0x1024 /* APPLE: Get number of bytes currently in send socket buffer */ -#define SO_REUSESHAREUID 0x1025 /* APPLE: Allow reuse of port/socket by different userids */ -#ifdef __APPLE_API_PRIVATE -#define SO_NOTIFYCONFLICT 0x1026 /* APPLE: send notification if there is a bind on a port which is already in use */ -#define SO_UPCALLCLOSEWAIT 0x1027 /* APPLE: block on close until an upcall returns */ -#endif -#define SO_LINGER_SEC 0x1080 /* linger on close if data present (in seconds) */ -#define SO_RESTRICTIONS 0x1081 /* APPLE: deny inbound/outbound/both/flag set */ -#define SO_RESTRICT_DENYIN 0x00000001 /* flag for SO_RESTRICTIONS - deny inbound */ -#define SO_RESTRICT_DENYOUT 0x00000002 /* flag for SO_RESTRICTIONS - deny outbound */ -#define SO_RESTRICT_DENYSET 0x80000000 /* flag for SO_RESTRICTIONS - deny has been set */ -#define SO_RANDOMPORT 0x1082 /* APPLE: request local port randomization */ -#define SO_NP_EXTENSIONS 0x1083 /* To turn off some POSIX behavior */ -#endif -#define SO_LABEL 0x1010 /* socket's MAC label */ -#define SO_PEERLABEL 0x1011 /* socket's peer MAC label */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -/* - * Structure used for manipulating linger option. - */ -struct linger { - int l_onoff; /* option on/off */ - int l_linger; /* linger time */ -}; - -#ifndef __APPLE__ -struct accept_filter_arg { - char af_name[16]; - char af_arg[256-16]; -}; -#endif - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#ifdef __APPLE__ - -/* - * Structure to control non-portable Sockets extension to POSIX - */ -struct so_np_extensions { - u_int32_t npx_flags; - u_int32_t npx_mask; -}; - -#define SONPX_SETOPTSHUT 0x000000001 /* flag for allowing setsockopt after shutdown */ - - - -#endif -#endif - -/* - * Level number for (get/set)sockopt() to apply to socket itself. - */ -#define SOL_SOCKET 0xffff /* options for socket level */ - - -/* - * Address families. - */ -#define AF_UNSPEC 0 /* unspecified */ -#define AF_UNIX 1 /* local to host (pipes) */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define AF_LOCAL AF_UNIX /* backward compatibility */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#define AF_INET 2 /* internetwork: UDP, TCP, etc. */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define AF_IMPLINK 3 /* arpanet imp addresses */ -#define AF_PUP 4 /* pup protocols: e.g. BSP */ -#define AF_CHAOS 5 /* mit CHAOS protocols */ -#define AF_NS 6 /* XEROX NS protocols */ -#define AF_ISO 7 /* ISO protocols */ -#define AF_OSI AF_ISO -#define AF_ECMA 8 /* European computer manufacturers */ -#define AF_DATAKIT 9 /* datakit protocols */ -#define AF_CCITT 10 /* CCITT protocols, X.25 etc */ -#define AF_SNA 11 /* IBM SNA */ -#define AF_DECnet 12 /* DECnet */ -#define AF_DLI 13 /* DEC Direct data link interface */ -#define AF_LAT 14 /* LAT */ -#define AF_HYLINK 15 /* NSC Hyperchannel */ -#define AF_APPLETALK 16 /* Apple Talk */ -#define AF_ROUTE 17 /* Internal Routing Protocol */ -#define AF_LINK 18 /* Link layer interface */ -#define pseudo_AF_XTP 19 /* eXpress Transfer Protocol (no AF) */ -#define AF_COIP 20 /* connection-oriented IP, aka ST II */ -#define AF_CNT 21 /* Computer Network Technology */ -#define pseudo_AF_RTIP 22 /* Help Identify RTIP packets */ -#define AF_IPX 23 /* Novell Internet Protocol */ -#define AF_SIP 24 /* Simple Internet Protocol */ -#define pseudo_AF_PIP 25 /* Help Identify PIP packets */ -#ifdef __APPLE__ -/*define pseudo_AF_BLUE 26 Identify packets for Blue Box - Not used */ -#define AF_NDRV 27 /* Network Driver 'raw' access */ -#endif -#define AF_ISDN 28 /* Integrated Services Digital Network*/ -#define AF_E164 AF_ISDN /* CCITT E.164 recommendation */ -#define pseudo_AF_KEY 29 /* Internal key-management function */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#define AF_INET6 30 /* IPv6 */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define AF_NATM 31 /* native ATM access */ -#ifdef __APPLE__ -#define AF_SYSTEM 32 /* Kernel event messages */ -#define AF_NETBIOS 33 /* NetBIOS */ -#define AF_PPP 34 /* PPP communication protocol */ -#else -#define AF_ATM 30 /* ATM */ -#endif -#define pseudo_AF_HDRCMPLT 35 /* Used by BPF to not rewrite headers - * in interface output routine - */ -#define AF_RESERVED_36 36 /* Reserved for internal usage */ - -#ifndef __APPLE__ -#define AF_NETGRAPH 32 /* Netgraph sockets */ -#endif -#define AF_IEEE80211 37 /* IEEE 802.11 protocol */ -#define AF_MAX 38 -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -/* - * [XSI] Structure used by kernel to store most addresses. - */ -struct sockaddr { - __uint8_t sa_len; /* total length */ - sa_family_t sa_family; /* [XSI] address family */ - char sa_data[14]; /* [XSI] addr value (actually larger) */ -}; - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define SOCK_MAXADDRLEN 255 /* longest possible addresses */ - -/* - * Structure used by kernel to pass protocol - * information in raw sockets. - */ -struct sockproto { - __uint16_t sp_family; /* address family */ - __uint16_t sp_protocol; /* protocol */ -}; -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE)*/ - -/* - * RFC 2553: protocol-independent placeholder for socket addresses - */ -#define _SS_MAXSIZE 128 -#define _SS_ALIGNSIZE (sizeof(__int64_t)) -#define _SS_PAD1SIZE \ - (_SS_ALIGNSIZE - sizeof(__uint8_t) - sizeof(sa_family_t)) -#define _SS_PAD2SIZE \ - (_SS_MAXSIZE - sizeof(__uint8_t) - sizeof(sa_family_t) - \ - _SS_PAD1SIZE - _SS_ALIGNSIZE) - -/* - * [XSI] sockaddr_storage - */ -struct sockaddr_storage { - __uint8_t ss_len; /* address length */ - sa_family_t ss_family; /* [XSI] address family */ - char __ss_pad1[_SS_PAD1SIZE]; - __int64_t __ss_align; /* force structure storage alignment */ - char __ss_pad2[_SS_PAD2SIZE]; -}; - -/* - * Protocol families, same as address families for now. - */ -#define PF_UNSPEC AF_UNSPEC -#define PF_LOCAL AF_LOCAL -#define PF_UNIX PF_LOCAL /* backward compatibility */ -#define PF_INET AF_INET -#define PF_IMPLINK AF_IMPLINK -#define PF_PUP AF_PUP -#define PF_CHAOS AF_CHAOS -#define PF_NS AF_NS -#define PF_ISO AF_ISO -#define PF_OSI AF_ISO -#define PF_ECMA AF_ECMA -#define PF_DATAKIT AF_DATAKIT -#define PF_CCITT AF_CCITT -#define PF_SNA AF_SNA -#define PF_DECnet AF_DECnet -#define PF_DLI AF_DLI -#define PF_LAT AF_LAT -#define PF_HYLINK AF_HYLINK -#define PF_APPLETALK AF_APPLETALK -#define PF_ROUTE AF_ROUTE -#define PF_LINK AF_LINK -#define PF_XTP pseudo_AF_XTP /* really just proto family, no AF */ -#define PF_COIP AF_COIP -#define PF_CNT AF_CNT -#define PF_SIP AF_SIP -#define PF_IPX AF_IPX /* same format as AF_NS */ -#define PF_RTIP pseudo_AF_RTIP /* same format as AF_INET */ -#define PF_PIP pseudo_AF_PIP -#ifdef __APPLE__ -#define PF_NDRV AF_NDRV -#endif -#define PF_ISDN AF_ISDN -#define PF_KEY pseudo_AF_KEY -#define PF_INET6 AF_INET6 -#define PF_NATM AF_NATM -#ifdef __APPLE__ -#define PF_SYSTEM AF_SYSTEM -#define PF_NETBIOS AF_NETBIOS -#define PF_PPP AF_PPP -#define PF_RESERVED_36 AF_RESERVED_36 - -#else -#define PF_ATM AF_ATM -#define PF_NETGRAPH AF_NETGRAPH -#endif - -#define PF_MAX AF_MAX - -/* - * These do not have socket-layer support: - */ -#define PF_VLAN ((uint32_t)0x766c616e) /* 'vlan' */ -#define PF_BOND ((uint32_t)0x626f6e64) /* 'bond' */ - -/* - * Definitions for network related sysctl, CTL_NET. - * - * Second level is protocol family. - * Third level is protocol number. - * - * Further levels are defined by the individual families below. - */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define NET_MAXID AF_MAX -#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ - - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -/* - * PF_ROUTE - Routing table - * - * Three additional levels are defined: - * Fourth: address family, 0 is wildcard - * Fifth: type of info, defined below - * Sixth: flag(s) to mask with for NET_RT_FLAGS - */ -#define NET_RT_DUMP 1 /* dump; may limit to a.f. */ -#define NET_RT_FLAGS 2 /* by flags, e.g. RESOLVING */ -#define NET_RT_IFLIST 3 /* survey interface list */ -#define NET_RT_STAT 4 /* routing statistics */ -#define NET_RT_TRASH 5 /* routes not in table but not freed */ -#define NET_RT_IFLIST2 6 /* interface list with addresses */ -#define NET_RT_DUMP2 7 /* dump; may limit to a.f. */ -#define NET_RT_MAXID 8 -#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ - - -/* - * Maximum queue length specifiable by listen. - */ -#define SOMAXCONN 128 - -/* - * [XSI] Message header for recvmsg and sendmsg calls. - * Used value-result for recvmsg, value only for sendmsg. - */ -struct msghdr { - void *msg_name; /* [XSI] optional address */ - socklen_t msg_namelen; /* [XSI] size of address */ - struct iovec *msg_iov; /* [XSI] scatter/gather array */ - int msg_iovlen; /* [XSI] # elements in msg_iov */ - void *msg_control; /* [XSI] ancillary data, see below */ - socklen_t msg_controllen; /* [XSI] ancillary data buffer len */ - int msg_flags; /* [XSI] flags on received message */ -}; - - -#define MSG_OOB 0x1 /* process out-of-band data */ -#define MSG_PEEK 0x2 /* peek at incoming message */ -#define MSG_DONTROUTE 0x4 /* send without using routing tables */ -#define MSG_EOR 0x8 /* data completes record */ -#define MSG_TRUNC 0x10 /* data discarded before delivery */ -#define MSG_CTRUNC 0x20 /* control data lost before delivery */ -#define MSG_WAITALL 0x40 /* wait for full request or error */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define MSG_DONTWAIT 0x80 /* this message should be nonblocking */ -#define MSG_EOF 0x100 /* data completes connection */ -#ifdef __APPLE__ -#define MSG_WAITSTREAM 0x200 /* wait up to full request.. may return partial */ -#define MSG_FLUSH 0x400 /* Start of 'hold' seq; dump so_temp */ -#define MSG_HOLD 0x800 /* Hold frag in so_temp */ -#define MSG_SEND 0x1000 /* Send the packet in so_temp */ -#define MSG_HAVEMORE 0x2000 /* Data ready to be read */ -#define MSG_RCVMORE 0x4000 /* Data remains in current pkt */ -#endif -#define MSG_NEEDSA 0x10000 /* Fail receive if socket address cannot be allocated */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -/* - * Header for ancillary data objects in msg_control buffer. - * Used for additional information with/about a datagram - * not expressible by flags. The format is a sequence - * of message elements headed by cmsghdr structures. - */ -struct cmsghdr { - socklen_t cmsg_len; /* [XSI] data byte count, including hdr */ - int cmsg_level; /* [XSI] originating protocol */ - int cmsg_type; /* [XSI] protocol-specific type */ -/* followed by unsigned char cmsg_data[]; */ -}; - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#ifndef __APPLE__ -/* - * While we may have more groups than this, the cmsgcred struct must - * be able to fit in an mbuf, and NGROUPS_MAX is too large to allow - * this. -*/ -#define CMGROUP_MAX 16 - -/* - * Credentials structure, used to verify the identity of a peer - * process that has sent us a message. This is allocated by the - * peer process but filled in by the kernel. This prevents the - * peer from lying about its identity. (Note that cmcred_groups[0] - * is the effective GID.) - */ -struct cmsgcred { - pid_t cmcred_pid; /* PID of sending process */ - uid_t cmcred_uid; /* real UID of sending process */ - uid_t cmcred_euid; /* effective UID of sending process */ - gid_t cmcred_gid; /* real GID of sending process */ - short cmcred_ngroups; /* number or groups */ - gid_t cmcred_groups[CMGROUP_MAX]; /* groups */ -}; -#endif -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -/* given pointer to struct cmsghdr, return pointer to data */ -#define CMSG_DATA(cmsg) ((unsigned char *)(cmsg) + \ - __DARWIN_ALIGN32(sizeof(struct cmsghdr))) - -/* - * RFC 2292 requires to check msg_controllen, in case that the kernel returns - * an empty list for some reasons. - */ -#define CMSG_FIRSTHDR(mhdr) \ - ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ - (struct cmsghdr *)(mhdr)->msg_control : \ - (struct cmsghdr *)0L) - - -/* - * Given pointer to struct cmsghdr, return pointer to next cmsghdr - * RFC 2292 says that CMSG_NXTHDR(mhdr, NULL) is equivalent to CMSG_FIRSTHDR(mhdr) - */ -#define CMSG_NXTHDR(mhdr, cmsg) \ - ((char *)(cmsg) == (char *)0L ? CMSG_FIRSTHDR(mhdr) : \ - ((((unsigned char *)(cmsg) + \ - __DARWIN_ALIGN32((__uint32_t)(cmsg)->cmsg_len) + \ - __DARWIN_ALIGN32(sizeof(struct cmsghdr))) > \ - ((unsigned char *)(mhdr)->msg_control + \ - (mhdr)->msg_controllen)) ? \ - (struct cmsghdr *)0L /* NULL */ : \ - (struct cmsghdr *)((unsigned char *)(cmsg) + \ - __DARWIN_ALIGN32((__uint32_t)(cmsg)->cmsg_len)))) - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -/* RFC 2292 additions */ -#define CMSG_SPACE(l) (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + __DARWIN_ALIGN32(l)) -#define CMSG_LEN(l) (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + (l)) - -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -/* "Socket"-level control message types: */ -#define SCM_RIGHTS 0x01 /* access rights (array of int) */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define SCM_TIMESTAMP 0x02 /* timestamp (struct timeval) */ -#define SCM_CREDS 0x03 /* process creds (struct cmsgcred) */ - -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -/* - * howto arguments for shutdown(2), specified by Posix.1g. - */ -#define SHUT_RD 0 /* shut down the reading side */ -#define SHUT_WR 1 /* shut down the writing side */ -#define SHUT_RDWR 2 /* shut down both sides */ - -#if !defined(_POSIX_C_SOURCE) -/* - * sendfile(2) header/trailer struct - */ -struct sf_hdtr { - struct iovec *headers; /* pointer to an array of header struct iovec's */ - int hdr_cnt; /* number of header iovec's */ - struct iovec *trailers; /* pointer to an array of trailer struct iovec's */ - int trl_cnt; /* number of trailer iovec's */ -}; - - -#endif /* !_POSIX_C_SOURCE */ - -__BEGIN_DECLS -int accept(int, struct sockaddr * __restrict, socklen_t * __restrict) - __DARWIN_ALIAS_C(accept); -int bind(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS(bind); -int connect(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS_C( connect); -int getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict) - __DARWIN_ALIAS(getpeername); -int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict) - __DARWIN_ALIAS(getsockname); -int getsockopt(int, int, int, void * __restrict, socklen_t * __restrict); -int listen(int, int) __DARWIN_ALIAS(listen); -ssize_t recv(int, void *, size_t, int) __DARWIN_ALIAS_C(recv); -ssize_t recvfrom(int, void *, size_t, int, struct sockaddr * __restrict, - socklen_t * __restrict) __DARWIN_ALIAS_C(recvfrom); -ssize_t recvmsg(int, struct msghdr *, int) __DARWIN_ALIAS_C(recvmsg); -ssize_t send(int, const void *, size_t, int) __DARWIN_ALIAS_C(send); -ssize_t sendmsg(int, const struct msghdr *, int) __DARWIN_ALIAS_C(sendmsg); -ssize_t sendto(int, const void *, size_t, - int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS_C(sendto); -int setsockopt(int, int, int, const void *, socklen_t); -int shutdown(int, int); -int sockatmark(int); -int socket(int, int, int); -int socketpair(int, int, int, int *) __DARWIN_ALIAS(socketpair); - -#if !defined(_POSIX_C_SOURCE) -int sendfile(int, int, off_t, off_t *, struct sf_hdtr *, int); -#endif /* !_POSIX_C_SOURCE */ - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -void pfctlinput(int, struct sockaddr *); -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -__END_DECLS - - - -#endif /* !_SYS_SOCKET_H_ */ diff --git a/i386/include/sys/syscall.h b/i386/include/sys/syscall.h deleted file mode 100644 index 1f5aeb7..0000000 --- a/i386/include/sys/syscall.h +++ /dev/null @@ -1,477 +0,0 @@ -/* - * Copyright (c) 2004-2008 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - * - * - * System call switch table. - * - * DO NOT EDIT-- this file is automatically generated. - * created from /SourceCache/xnu/xnu-1504.7.4/bsd/kern/syscalls.master - */ - -#ifndef _SYS_SYSCALL_H_ -#define _SYS_SYSCALL_H_ - -#include <sys/appleapiopts.h> -#ifdef __APPLE_API_PRIVATE -#define SYS_syscall 0 -#define SYS_exit 1 -#define SYS_fork 2 -#define SYS_read 3 -#define SYS_write 4 -#define SYS_open 5 -#define SYS_close 6 -#define SYS_wait4 7 - /* 8 old creat */ -#define SYS_link 9 -#define SYS_unlink 10 - /* 11 old execv */ -#define SYS_chdir 12 -#define SYS_fchdir 13 -#define SYS_mknod 14 -#define SYS_chmod 15 -#define SYS_chown 16 - /* 17 old break */ -#define SYS_getfsstat 18 - /* 19 old lseek */ -#define SYS_getpid 20 - /* 21 old mount */ - /* 22 old umount */ -#define SYS_setuid 23 -#define SYS_getuid 24 -#define SYS_geteuid 25 -#define SYS_ptrace 26 -#define SYS_recvmsg 27 -#define SYS_sendmsg 28 -#define SYS_recvfrom 29 -#define SYS_accept 30 -#define SYS_getpeername 31 -#define SYS_getsockname 32 -#define SYS_access 33 -#define SYS_chflags 34 -#define SYS_fchflags 35 -#define SYS_sync 36 -#define SYS_kill 37 - /* 38 old stat */ -#define SYS_getppid 39 - /* 40 old lstat */ -#define SYS_dup 41 -#define SYS_pipe 42 -#define SYS_getegid 43 -#define SYS_profil 44 - /* 45 old ktrace */ -#define SYS_sigaction 46 -#define SYS_getgid 47 -#define SYS_sigprocmask 48 -#define SYS_getlogin 49 -#define SYS_setlogin 50 -#define SYS_acct 51 -#define SYS_sigpending 52 -#define SYS_sigaltstack 53 -#define SYS_ioctl 54 -#define SYS_reboot 55 -#define SYS_revoke 56 -#define SYS_symlink 57 -#define SYS_readlink 58 -#define SYS_execve 59 -#define SYS_umask 60 -#define SYS_chroot 61 - /* 62 old fstat */ - /* 63 used internally , reserved */ - /* 64 old getpagesize */ -#define SYS_msync 65 -#define SYS_vfork 66 - /* 67 old vread */ - /* 68 old vwrite */ - /* 69 old sbrk */ - /* 70 old sstk */ - /* 71 old mmap */ - /* 72 old vadvise */ -#define SYS_munmap 73 -#define SYS_mprotect 74 -#define SYS_madvise 75 - /* 76 old vhangup */ - /* 77 old vlimit */ -#define SYS_mincore 78 -#define SYS_getgroups 79 -#define SYS_setgroups 80 -#define SYS_getpgrp 81 -#define SYS_setpgid 82 -#define SYS_setitimer 83 - /* 84 old wait */ -#define SYS_swapon 85 -#define SYS_getitimer 86 - /* 87 old gethostname */ - /* 88 old sethostname */ -#define SYS_getdtablesize 89 -#define SYS_dup2 90 - /* 91 old getdopt */ -#define SYS_fcntl 92 -#define SYS_select 93 - /* 94 old setdopt */ -#define SYS_fsync 95 -#define SYS_setpriority 96 -#define SYS_socket 97 -#define SYS_connect 98 - /* 99 old accept */ -#define SYS_getpriority 100 - /* 101 old send */ - /* 102 old recv */ - /* 103 old sigreturn */ -#define SYS_bind 104 -#define SYS_setsockopt 105 -#define SYS_listen 106 - /* 107 old vtimes */ - /* 108 old sigvec */ - /* 109 old sigblock */ - /* 110 old sigsetmask */ -#define SYS_sigsuspend 111 - /* 112 old sigstack */ - /* 113 old recvmsg */ - /* 114 old sendmsg */ - /* 115 old vtrace */ -#define SYS_gettimeofday 116 -#define SYS_getrusage 117 -#define SYS_getsockopt 118 - /* 119 old resuba */ -#define SYS_readv 120 -#define SYS_writev 121 -#define SYS_settimeofday 122 -#define SYS_fchown 123 -#define SYS_fchmod 124 - /* 125 old recvfrom */ -#define SYS_setreuid 126 -#define SYS_setregid 127 -#define SYS_rename 128 - /* 129 old truncate */ - /* 130 old ftruncate */ -#define SYS_flock 131 -#define SYS_mkfifo 132 -#define SYS_sendto 133 -#define SYS_shutdown 134 -#define SYS_socketpair 135 -#define SYS_mkdir 136 -#define SYS_rmdir 137 -#define SYS_utimes 138 -#define SYS_futimes 139 -#define SYS_adjtime 140 - /* 141 old getpeername */ -#define SYS_gethostuuid 142 - /* 143 old sethostid */ - /* 144 old getrlimit */ - /* 145 old setrlimit */ - /* 146 old killpg */ -#define SYS_setsid 147 - /* 148 old setquota */ - /* 149 old qquota */ - /* 150 old getsockname */ -#define SYS_getpgid 151 -#define SYS_setprivexec 152 -#define SYS_pread 153 -#define SYS_pwrite 154 -#define SYS_nfssvc 155 - /* 156 old getdirentries */ -#define SYS_statfs 157 -#define SYS_fstatfs 158 -#define SYS_unmount 159 - /* 160 old async_daemon */ -#define SYS_getfh 161 - /* 162 old getdomainname */ - /* 163 old setdomainname */ - /* 164 */ -#define SYS_quotactl 165 - /* 166 old exportfs */ -#define SYS_mount 167 - /* 168 old ustat */ -#define SYS_csops 169 - /* 170 old table */ - /* 171 old wait3 */ - /* 172 old rpause */ -#define SYS_waitid 173 - /* 174 old getdents */ - /* 175 old gc_control */ -#define SYS_add_profil 176 - /* 177 */ - /* 178 */ - /* 179 */ -#define SYS_kdebug_trace 180 -#define SYS_setgid 181 -#define SYS_setegid 182 -#define SYS_seteuid 183 -#define SYS_sigreturn 184 -#define SYS_chud 185 - /* 186 */ -#define SYS_fdatasync 187 -#define SYS_stat 188 -#define SYS_fstat 189 -#define SYS_lstat 190 -#define SYS_pathconf 191 -#define SYS_fpathconf 192 - /* 193 */ -#define SYS_getrlimit 194 -#define SYS_setrlimit 195 -#define SYS_getdirentries 196 -#define SYS_mmap 197 - /* 198 __syscall */ -#define SYS_lseek 199 -#define SYS_truncate 200 -#define SYS_ftruncate 201 -#define SYS___sysctl 202 -#define SYS_mlock 203 -#define SYS_munlock 204 -#define SYS_undelete 205 -#define SYS_ATsocket 206 -#define SYS_ATgetmsg 207 -#define SYS_ATputmsg 208 -#define SYS_ATPsndreq 209 -#define SYS_ATPsndrsp 210 -#define SYS_ATPgetreq 211 -#define SYS_ATPgetrsp 212 - /* 213 Reserved for AppleTalk */ - /* 214 */ - /* 215 */ -#define SYS_mkcomplex 216 -#define SYS_statv 217 -#define SYS_lstatv 218 -#define SYS_fstatv 219 -#define SYS_getattrlist 220 -#define SYS_setattrlist 221 -#define SYS_getdirentriesattr 222 -#define SYS_exchangedata 223 - /* 224 old checkuseraccess / fsgetpath ( which moved to 427 ) */ -#define SYS_searchfs 225 -#define SYS_delete 226 -#define SYS_copyfile 227 -#define SYS_fgetattrlist 228 -#define SYS_fsetattrlist 229 -#define SYS_poll 230 -#define SYS_watchevent 231 -#define SYS_waitevent 232 -#define SYS_modwatch 233 -#define SYS_getxattr 234 -#define SYS_fgetxattr 235 -#define SYS_setxattr 236 -#define SYS_fsetxattr 237 -#define SYS_removexattr 238 -#define SYS_fremovexattr 239 -#define SYS_listxattr 240 -#define SYS_flistxattr 241 -#define SYS_fsctl 242 -#define SYS_initgroups 243 -#define SYS_posix_spawn 244 -#define SYS_ffsctl 245 - /* 246 */ -#define SYS_nfsclnt 247 -#define SYS_fhopen 248 - /* 249 */ -#define SYS_minherit 250 -#define SYS_semsys 251 -#define SYS_msgsys 252 -#define SYS_shmsys 253 -#define SYS_semctl 254 -#define SYS_semget 255 -#define SYS_semop 256 - /* 257 */ -#define SYS_msgctl 258 -#define SYS_msgget 259 -#define SYS_msgsnd 260 -#define SYS_msgrcv 261 -#define SYS_shmat 262 -#define SYS_shmctl 263 -#define SYS_shmdt 264 -#define SYS_shmget 265 -#define SYS_shm_open 266 -#define SYS_shm_unlink 267 -#define SYS_sem_open 268 -#define SYS_sem_close 269 -#define SYS_sem_unlink 270 -#define SYS_sem_wait 271 -#define SYS_sem_trywait 272 -#define SYS_sem_post 273 -#define SYS_sem_getvalue 274 -#define SYS_sem_init 275 -#define SYS_sem_destroy 276 -#define SYS_open_extended 277 -#define SYS_umask_extended 278 -#define SYS_stat_extended 279 -#define SYS_lstat_extended 280 -#define SYS_fstat_extended 281 -#define SYS_chmod_extended 282 -#define SYS_fchmod_extended 283 -#define SYS_access_extended 284 -#define SYS_settid 285 -#define SYS_gettid 286 -#define SYS_setsgroups 287 -#define SYS_getsgroups 288 -#define SYS_setwgroups 289 -#define SYS_getwgroups 290 -#define SYS_mkfifo_extended 291 -#define SYS_mkdir_extended 292 -#define SYS_identitysvc 293 -#define SYS_shared_region_check_np 294 -#define SYS_shared_region_map_np 295 -#define SYS_vm_pressure_monitor 296 -#define SYS_psynch_rw_longrdlock 297 -#define SYS_psynch_rw_yieldwrlock 298 -#define SYS_psynch_rw_downgrade 299 -#define SYS_psynch_rw_upgrade 300 -#define SYS_psynch_mutexwait 301 -#define SYS_psynch_mutexdrop 302 -#define SYS_psynch_cvbroad 303 -#define SYS_psynch_cvsignal 304 -#define SYS_psynch_cvwait 305 -#define SYS_psynch_rw_rdlock 306 -#define SYS_psynch_rw_wrlock 307 -#define SYS_psynch_rw_unlock 308 -#define SYS_psynch_rw_unlock2 309 -#define SYS_getsid 310 -#define SYS_settid_with_pid 311 - /* 312 old __pthread_cond_timedwait */ -#define SYS_aio_fsync 313 -#define SYS_aio_return 314 -#define SYS_aio_suspend 315 -#define SYS_aio_cancel 316 -#define SYS_aio_error 317 -#define SYS_aio_read 318 -#define SYS_aio_write 319 -#define SYS_lio_listio 320 - /* 321 old __pthread_cond_wait */ -#define SYS_iopolicysys 322 - /* 323 */ -#define SYS_mlockall 324 -#define SYS_munlockall 325 - /* 326 */ -#define SYS_issetugid 327 -#define SYS___pthread_kill 328 -#define SYS___pthread_sigmask 329 -#define SYS___sigwait 330 -#define SYS___disable_threadsignal 331 -#define SYS___pthread_markcancel 332 -#define SYS___pthread_canceled 333 -#define SYS___semwait_signal 334 - /* 335 old utrace */ -#define SYS_proc_info 336 -#define SYS_sendfile 337 -#define SYS_stat64 338 -#define SYS_fstat64 339 -#define SYS_lstat64 340 -#define SYS_stat64_extended 341 -#define SYS_lstat64_extended 342 -#define SYS_fstat64_extended 343 -#define SYS_getdirentries64 344 -#define SYS_statfs64 345 -#define SYS_fstatfs64 346 -#define SYS_getfsstat64 347 -#define SYS___pthread_chdir 348 -#define SYS___pthread_fchdir 349 -#define SYS_audit 350 -#define SYS_auditon 351 - /* 352 */ -#define SYS_getauid 353 -#define SYS_setauid 354 -#define SYS_getaudit 355 -#define SYS_setaudit 356 -#define SYS_getaudit_addr 357 -#define SYS_setaudit_addr 358 -#define SYS_auditctl 359 -#define SYS_bsdthread_create 360 -#define SYS_bsdthread_terminate 361 -#define SYS_kqueue 362 -#define SYS_kevent 363 -#define SYS_lchown 364 -#define SYS_stack_snapshot 365 -#define SYS_bsdthread_register 366 -#define SYS_workq_open 367 -#define SYS_workq_kernreturn 368 -#define SYS_kevent64 369 -#define SYS___old_semwait_signal 370 -#define SYS___old_semwait_signal_nocancel 371 -#define SYS_thread_selfid 372 - /* 373 */ - /* 374 */ - /* 375 */ - /* 376 */ - /* 377 */ - /* 378 */ - /* 379 */ -#define SYS___mac_execve 380 -#define SYS___mac_syscall 381 -#define SYS___mac_get_file 382 -#define SYS___mac_set_file 383 -#define SYS___mac_get_link 384 -#define SYS___mac_set_link 385 -#define SYS___mac_get_proc 386 -#define SYS___mac_set_proc 387 -#define SYS___mac_get_fd 388 -#define SYS___mac_set_fd 389 -#define SYS___mac_get_pid 390 -#define SYS___mac_get_lcid 391 -#define SYS___mac_get_lctx 392 -#define SYS___mac_set_lctx 393 -#define SYS_setlcid 394 -#define SYS_getlcid 395 -#define SYS_read_nocancel 396 -#define SYS_write_nocancel 397 -#define SYS_open_nocancel 398 -#define SYS_close_nocancel 399 -#define SYS_wait4_nocancel 400 -#define SYS_recvmsg_nocancel 401 -#define SYS_sendmsg_nocancel 402 -#define SYS_recvfrom_nocancel 403 -#define SYS_accept_nocancel 404 -#define SYS_msync_nocancel 405 -#define SYS_fcntl_nocancel 406 -#define SYS_select_nocancel 407 -#define SYS_fsync_nocancel 408 -#define SYS_connect_nocancel 409 -#define SYS_sigsuspend_nocancel 410 -#define SYS_readv_nocancel 411 -#define SYS_writev_nocancel 412 -#define SYS_sendto_nocancel 413 -#define SYS_pread_nocancel 414 -#define SYS_pwrite_nocancel 415 -#define SYS_waitid_nocancel 416 -#define SYS_poll_nocancel 417 -#define SYS_msgsnd_nocancel 418 -#define SYS_msgrcv_nocancel 419 -#define SYS_sem_wait_nocancel 420 -#define SYS_aio_suspend_nocancel 421 -#define SYS___sigwait_nocancel 422 -#define SYS___semwait_signal_nocancel 423 -#define SYS___mac_mount 424 -#define SYS___mac_get_mount 425 -#define SYS___mac_getfsstat 426 -#define SYS_fsgetpath 427 -#define SYS_audit_session_self 428 -#define SYS_audit_session_join 429 -#define SYS_pid_suspend 430 -#define SYS_pid_resume 431 -#define SYS_fileport_makeport 432 -#define SYS_fileport_makefd 433 -#define SYS_MAXSYSCALL 434 - -#endif /* __APPLE_API_PRIVATE */ -#endif /* !_SYS_SYSCALL_H_ */ diff --git a/i386/include/sys/syslimits.h b/i386/include/sys/syslimits.h deleted file mode 100644 index a020b39..0000000 --- a/i386/include/sys/syslimits.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* $NetBSD: syslimits.h,v 1.15 1997/06/25 00:48:09 lukem Exp $ */ - -/* - * Copyright (c) 1988, 1993 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)syslimits.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _SYS_SYSLIMITS_H_ -#define _SYS_SYSLIMITS_H_ - -#include <sys/cdefs.h> - -#if !defined(_ANSI_SOURCE) -/* - * Note: CHILD_MAX *must* be less than hard_maxproc, which is set at - * compile time; you *cannot* set it higher than the hard limit!! - */ -#define ARG_MAX (256 * 1024) /* max bytes for an exec function */ -#define CHILD_MAX 266 /* max simultaneous processes */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define GID_MAX 2147483647U /* max value for a gid_t (2^31-2) */ -#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ -#define LINK_MAX 32767 /* max file link count */ -#define MAX_CANON 1024 /* max bytes in term canon input line */ -#define MAX_INPUT 1024 /* max bytes in terminal input */ -#define NAME_MAX 255 /* max bytes in a file name */ -#define NGROUPS_MAX 16 /* max supplemental group id's */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define UID_MAX 2147483647U /* max value for a uid_t (2^31-2) */ - -#define OPEN_MAX 10240 /* max open files per process - todo, make a config option? */ - -#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ -#define PATH_MAX 1024 /* max bytes in pathname */ -#define PIPE_BUF 512 /* max bytes for atomic pipe writes */ - -#define BC_BASE_MAX 99 /* max ibase/obase values in bc(1) */ -#define BC_DIM_MAX 2048 /* max array elements in bc(1) */ -#define BC_SCALE_MAX 99 /* max scale value in bc(1) */ -#define BC_STRING_MAX 1000 /* max const string length in bc(1) */ -#define CHARCLASS_NAME_MAX 14 /* max character class name size */ -#define COLL_WEIGHTS_MAX 2 /* max weights for order keyword */ -#define EQUIV_CLASS_MAX 2 -#define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */ -#define LINE_MAX 2048 /* max bytes in an input line */ -#define RE_DUP_MAX 255 /* max RE's in interval notation */ - -#if __DARWIN_UNIX03 -#define NZERO 20 /* default priority [XSI] */ - /* = ((PRIO_MAX - PRIO_MIN) / 2) + 1 */ - /* range: 0 - 39 [(2 * NZERO) - 1] */ - /* 0 is not actually used */ -#else /* !__DARWIN_UNIX03 */ -#define NZERO 0 /* default priority */ - /* range: -20 - 20 */ - /* (PRIO_MIN - PRIO_MAX) */ -#endif /* __DARWIN_UNIX03 */ -#endif /* !_ANSI_SOURCE */ - -#endif /* !_SYS_SYSLIMITS_H_ */ diff --git a/i386/include/sys/time.h b/i386/include/sys/time.h deleted file mode 100644 index 4b2d999..0000000 --- a/i386/include/sys/time.h +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ -/* - * Copyright (c) 1982, 1986, 1993 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)time.h 8.2 (Berkeley) 7/10/94 - */ - -#ifndef _SYS_TIME_H_ -#define _SYS_TIME_H_ - -#include <sys/cdefs.h> -#include <sys/_types.h> - -/* - * [XSI] The fd_set type shall be defined as described in <sys/select.h>. - * The timespec structure shall be defined as described in <time.h> - */ -#define __need_fd_set -#define __need_struct_timespec -#define __need_struct_timeval -#include <sys/_structs.h> - -#ifndef _TIME_T -#define _TIME_T -typedef __darwin_time_t time_t; -#endif - -#ifndef _SUSECONDS_T -#define _SUSECONDS_T -typedef __darwin_suseconds_t suseconds_t; -#endif - -/* - * Structure used as a parameter by getitimer(2) and setitimer(2) system - * calls. - */ -struct itimerval { - struct timeval it_interval; /* timer interval */ - struct timeval it_value; /* current value */ -}; - -/* - * Names of the interval timers, and structure - * defining a timer setting. - */ -#define ITIMER_REAL 0 -#define ITIMER_VIRTUAL 1 -#define ITIMER_PROF 2 - -/* - * Select uses bit masks of file descriptors in longs. These macros - * manipulate such bit fields (the filesystem macros use chars). The - * extra protection here is to permit application redefinition above - * the default size. - */ -#ifndef FD_SETSIZE -#define FD_SETSIZE __DARWIN_FD_SETSIZE -#endif /* FD_SETSIZE */ -#ifndef FD_SET -#define FD_SET(n, p) __DARWIN_FD_SET(n, p) -#endif /* FD_SET */ -#ifndef FD_CLR -#define FD_CLR(n,p) __DARWIN_FD_CLR(n, p) -#endif /* FD_CLR */ -#ifndef FD_ISSET -#define FD_ISSET(n, p) __DARWIN_FD_ISSET(n, p) -#endif /* FD_ISSET */ -#ifndef FD_ZERO -#define FD_ZERO(p) __DARWIN_FD_ZERO(p) -#endif /* FD_ZERO */ - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) - -#ifndef FD_COPY -#define FD_COPY(f, t) __DARWIN_FD_COPY(f, t) -#endif /* FD_COPY */ - -#define TIMEVAL_TO_TIMESPEC(tv, ts) { \ - (ts)->tv_sec = (tv)->tv_sec; \ - (ts)->tv_nsec = (tv)->tv_usec * 1000; \ -} -#define TIMESPEC_TO_TIMEVAL(tv, ts) { \ - (tv)->tv_sec = (ts)->tv_sec; \ - (tv)->tv_usec = (ts)->tv_nsec / 1000; \ -} - -struct timezone { - int tz_minuteswest; /* minutes west of Greenwich */ - int tz_dsttime; /* type of dst correction */ -}; -#define DST_NONE 0 /* not on dst */ -#define DST_USA 1 /* USA style dst */ -#define DST_AUST 2 /* Australian style dst */ -#define DST_WET 3 /* Western European dst */ -#define DST_MET 4 /* Middle European dst */ -#define DST_EET 5 /* Eastern European dst */ -#define DST_CAN 6 /* Canada */ - -/* Operations on timevals. */ -#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 -#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) -#define timercmp(tvp, uvp, cmp) \ - (((tvp)->tv_sec == (uvp)->tv_sec) ? \ - ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ - ((tvp)->tv_sec cmp (uvp)->tv_sec)) -#define timeradd(tvp, uvp, vvp) \ - do { \ - (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ - (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ - if ((vvp)->tv_usec >= 1000000) { \ - (vvp)->tv_sec++; \ - (vvp)->tv_usec -= 1000000; \ - } \ - } while (0) -#define timersub(tvp, uvp, vvp) \ - do { \ - (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ - (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ - if ((vvp)->tv_usec < 0) { \ - (vvp)->tv_sec--; \ - (vvp)->tv_usec += 1000000; \ - } \ - } while (0) - -#define timevalcmp(l, r, cmp) timercmp(l, r, cmp) /* freebsd */ - -/* - * Getkerninfo clock information structure - */ -struct clockinfo { - int hz; /* clock frequency */ - int tick; /* micro-seconds per hz tick */ - int tickadj; /* clock skew rate for adjtime() */ - int stathz; /* statistics clock frequency */ - int profhz; /* profiling clock frequency */ -}; -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#include <time.h> -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -__BEGIN_DECLS - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -int adjtime(const struct timeval *, struct timeval *); -int futimes(int, const struct timeval *); -int lutimes(const char *, const struct timeval *); -int settimeofday(const struct timeval *, const struct timezone *); -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -int getitimer(int, struct itimerval *); -int gettimeofday(struct timeval * __restrict, void * __restrict); - -#include <sys/_select.h> /* select() prototype */ - -int setitimer(int, const struct itimerval * __restrict, - struct itimerval * __restrict); -int utimes(const char *, const struct timeval *); - -__END_DECLS - - -#endif /* !_SYS_TIME_H_ */ diff --git a/i386/include/sys/types.h b/i386/include/sys/types.h deleted file mode 100644 index 01d4f2b..0000000 --- a/i386/include/sys/types.h +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Copyright (c) 2000-2008 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ -/* - * Copyright (c) 1982, 1986, 1991, 1993, 1994 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)types.h 8.4 (Berkeley) 1/21/94 - */ - -#ifndef _SYS_TYPES_H_ -#define _SYS_TYPES_H_ - -#ifndef __ASSEMBLER__ -#include <sys/cdefs.h> - -/* Machine type dependent parameters. */ -#include <machine/types.h> -#include <sys/_types.h> -#include <machine/endian.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -typedef unsigned char u_char; -typedef unsigned short u_short; -typedef unsigned int u_int; -#ifndef _U_LONG -typedef unsigned long u_long; -#define _U_LONG -#endif -typedef unsigned short ushort; /* Sys V compatibility */ -typedef unsigned int uint; /* Sys V compatibility */ -#endif - -typedef u_int64_t u_quad_t; /* quads */ -typedef int64_t quad_t; -typedef quad_t * qaddr_t; - -typedef char * caddr_t; /* core address */ -typedef int32_t daddr_t; /* disk address */ - -typedef u_int32_t fixpt_t; /* fixed point number */ - - -#ifndef _IN_ADDR_T -#define _IN_ADDR_T -typedef __uint32_t in_addr_t; /* base type for internet address */ -#endif - -#ifndef _IN_PORT_T -#define _IN_PORT_T -typedef __uint16_t in_port_t; -#endif - - -#ifndef _KEY_T -#define _KEY_T -typedef __int32_t key_t; /* IPC key (for Sys V IPC) */ -#endif - -#ifndef _NLINK_T -typedef __uint16_t nlink_t; /* link count */ -#define _NLINK_T -#endif - -typedef int32_t segsz_t; /* segment size */ -typedef int32_t swblk_t; /* swap offset */ - - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -/* Major, minor numbers, dev_t's. */ -#if defined(__cplusplus) -/* - * These lowercase macros tend to match member functions in some C++ code, - * so for C++, we must use inline functions instead. - */ - -static inline __int32_t major(__uint32_t _x) -{ - return (__int32_t)(((__uint32_t)_x >> 24) & 0xff); -} - -static inline __int32_t minor(__uint32_t _x) -{ - return (__int32_t)((_x) & 0xffffff); -} -#else /* !__cplusplus */ - -#define major(x) ((int32_t)(((u_int32_t)(x) >> 24) & 0xff)) -#define minor(x) ((int32_t)((x) & 0xffffff)) - -#endif /* !__cplusplus */ -#endif /* !_POSIX_C_SOURCE */ - -#ifndef _CLOCK_T -#define _CLOCK_T -typedef __darwin_clock_t clock_t; -#endif - -#ifndef _SIZE_T -#define _SIZE_T -/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see - * _GCC_SIZE_T */ -typedef __darwin_size_t size_t; -#endif - -#ifndef _SSIZE_T -#define _SSIZE_T -typedef __darwin_ssize_t ssize_t; -#endif - -#ifndef _TIME_T -#define _TIME_T -typedef __darwin_time_t time_t; -#endif - - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -/* - * This code is present here in order to maintain historical backward - * compatability, and is intended to be removed at some point in the - * future; please include <sys/select.h> instead. - */ -#define __need_fd_set -#include <sys/_structs.h> - -#define NBBY __DARWIN_NBBY /* bits in a byte */ -#define NFDBITS __DARWIN_NFDBITS /* bits per mask */ -#define howmany(x, y) __DARWIN_howmany(x, y) /* # y's == x bits? */ -typedef __int32_t fd_mask; - -/* - * Select uses bit masks of file descriptors in longs. These macros - * manipulate such bit fields (the filesystem macros use chars). The - * extra protection here is to permit application redefinition above - * the default size. - */ -#ifndef FD_SETSIZE -#define FD_SETSIZE __DARWIN_FD_SETSIZE -#endif /* FD_SETSIZE */ -#ifndef FD_SET -#define FD_SET(n, p) __DARWIN_FD_SET(n, p) -#endif /* FD_SET */ -#ifndef FD_CLR -#define FD_CLR(n, p) __DARWIN_FD_CLR(n, p) -#endif /* FD_CLR */ -#ifndef FD_ISSET -#define FD_ISSET(n, p) __DARWIN_FD_ISSET(n, p) -#endif /* FD_ISSET */ -#ifndef FD_ZERO -#define FD_ZERO(p) __DARWIN_FD_ZERO(p) -#endif /* FD_ZERO */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#ifndef FD_COPY -#define FD_COPY(f, t) __DARWIN_FD_COPY(f, t) -#endif /* FD_COPY */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - - -#if defined(__STDC__) && defined(KERNEL) -/* - * Forward structure declarations for function prototypes. We include the - * common structures that cross subsystem boundaries here; others are mostly - * used in the same place that the structure is defined. - */ -struct proc; -struct pgrp; -struct ucred; -struct rusage; -struct file; -struct buf; -struct tty; -struct uio; -#endif - -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#endif /* __ASSEMBLER__ */ - - - - -#endif /* !_SYS_TYPES_H_ */ diff --git a/i386/include/sys/unistd.h b/i386/include/sys/unistd.h deleted file mode 100644 index d80b3bb..0000000 --- a/i386/include/sys/unistd.h +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)unistd.h 8.2 (Berkeley) 1/7/94 - */ - -#ifndef _SYS_UNISTD_H_ -#define _SYS_UNISTD_H_ - -#include <sys/cdefs.h> - -/* - * Although we have saved user/group IDs, we do not use them in setuid - * as described in POSIX 1003.1, because the feature does not work for - * root. We use the saved IDs in seteuid/setegid, which are not currently - * part of the POSIX 1003.1 specification. - */ -#ifdef _NOT_AVAILABLE -#define _POSIX_SAVED_IDS /* saved set-user-ID and set-group-ID */ -#endif - -#define _POSIX_VERSION 200112L -#define _POSIX2_VERSION 200112L - -/* execution-time symbolic constants */ - /* may disable terminal special characters */ -#ifndef _POSIX_VDISABLE -#define _POSIX_VDISABLE ((unsigned char)'\377') -#endif - -#define _POSIX_THREAD_KEYS_MAX 128 - -/* access function */ -#define F_OK 0 /* test for existence of file */ -#define X_OK (1<<0) /* test for execute or search permission */ -#define W_OK (1<<1) /* test for write permission */ -#define R_OK (1<<2) /* test for read permission */ - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -/* - * Extended access functions. - * Note that we depend on these matching the definitions in sys/kauth.h, - * but with the bits shifted left by 8. - */ -#define _READ_OK (1<<9) /* read file data / read directory */ -#define _WRITE_OK (1<<10) /* write file data / add file to directory */ -#define _EXECUTE_OK (1<<11) /* execute file / search in directory*/ -#define _DELETE_OK (1<<12) /* delete file / delete directory */ -#define _APPEND_OK (1<<13) /* append to file / add subdirectory to directory */ -#define _RMFILE_OK (1<<14) /* - / remove file from directory */ -#define _RATTR_OK (1<<15) /* read basic attributes */ -#define _WATTR_OK (1<<16) /* write basic attributes */ -#define _REXT_OK (1<<17) /* read extended attributes */ -#define _WEXT_OK (1<<18) /* write extended attributes */ -#define _RPERM_OK (1<<19) /* read permissions */ -#define _WPERM_OK (1<<20) /* write permissions */ -#define _CHOWN_OK (1<<21) /* change ownership */ - -#define _ACCESS_EXTENDED_MASK (_READ_OK | _WRITE_OK | _EXECUTE_OK | \ - _DELETE_OK | _APPEND_OK | \ - _RMFILE_OK | _REXT_OK | \ - _WEXT_OK | _RATTR_OK | _WATTR_OK | _RPERM_OK | \ - _WPERM_OK | _CHOWN_OK) -#endif - -/* whence values for lseek(2) */ -#ifndef SEEK_SET -#define SEEK_SET 0 /* set file offset to offset */ -#define SEEK_CUR 1 /* set file offset to current plus offset */ -#define SEEK_END 2 /* set file offset to EOF plus offset */ -#endif /* !SEEK_SET */ - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -/* whence values for lseek(2); renamed by POSIX 1003.1 */ -#define L_SET SEEK_SET -#define L_INCR SEEK_CUR -#define L_XTND SEEK_END -#endif - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -struct accessx_descriptor { - unsigned int ad_name_offset; - int ad_flags; - int ad_pad[2]; -}; -#define ACCESSX_MAX_DESCRIPTORS 100 -#define ACCESSX_MAX_TABLESIZE (16 * 1024) -#endif - -/* configurable pathname variables */ -#define _PC_LINK_MAX 1 -#define _PC_MAX_CANON 2 -#define _PC_MAX_INPUT 3 -#define _PC_NAME_MAX 4 -#define _PC_PATH_MAX 5 -#define _PC_PIPE_BUF 6 -#define _PC_CHOWN_RESTRICTED 7 -#define _PC_NO_TRUNC 8 -#define _PC_VDISABLE 9 - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define _PC_NAME_CHARS_MAX 10 -#define _PC_CASE_SENSITIVE 11 -#define _PC_CASE_PRESERVING 12 -#define _PC_EXTENDED_SECURITY_NP 13 -#define _PC_AUTH_OPAQUE_NP 14 -#endif - -#define _PC_2_SYMLINKS 15 /* Symlink supported in directory */ -#define _PC_ALLOC_SIZE_MIN 16 /* Minimum storage actually allocated */ -#define _PC_ASYNC_IO 17 /* Async I/O [AIO] supported? */ -#define _PC_FILESIZEBITS 18 /* # of bits to represent file size */ -#define _PC_PRIO_IO 19 /* Priority I/O [PIO] supported? */ -#define _PC_REC_INCR_XFER_SIZE 20 /* Recommended increment for next two */ -#define _PC_REC_MAX_XFER_SIZE 21 /* Recommended max file transfer size */ -#define _PC_REC_MIN_XFER_SIZE 22 /* Recommended min file transfer size */ -#define _PC_REC_XFER_ALIGN 23 /* Recommended buffer alignment */ -#define _PC_SYMLINK_MAX 24 /* Max # of bytes in symlink name */ -#define _PC_SYNC_IO 25 /* Sync I/O [SIO] supported? */ - -/* configurable system strings */ -#define _CS_PATH 1 - -#endif /* !_SYS_UNISTD_H_ */ diff --git a/i386/include/sys/vnode.h b/i386/include/sys/vnode.h deleted file mode 100644 index 9e1a0c7..0000000 --- a/i386/include/sys/vnode.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2000-2010 Apple Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)vnode.h 8.17 (Berkeley) 5/20/95 - */ - -#ifndef _VNODE_H_ -#define _VNODE_H_ - -#include <sys/appleapiopts.h> -#include <sys/cdefs.h> - -/* - * The vnode is the focus of all file activity in UNIX. There is a - * unique vnode allocated for each active file, each current directory, - * each mounted-on file, text file, and the root. - */ - -/* - * Vnode types. VNON means no type. - */ -enum vtype { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO, VBAD, VSTR, - VCPLX }; - -/* - * Vnode tag types. - * These are for the benefit of external programs only (e.g., pstat) - * and should NEVER be inspected by the kernel. - */ -enum vtagtype { - VT_NON, VT_UFS, VT_NFS, VT_MFS, VT_MSDOSFS, VT_LFS, VT_LOFS, VT_FDESC, - VT_PORTAL, VT_NULL, VT_UMAP, VT_KERNFS, VT_PROCFS, VT_AFS, VT_ISOFS, - VT_UNION, VT_HFS, VT_ZFS, VT_DEVFS, VT_WEBDAV, VT_UDF, VT_AFP, - VT_CDDA, VT_CIFS, VT_OTHER}; - - -/* - * flags for VNOP_BLOCKMAP - */ -#define VNODE_READ 0x01 -#define VNODE_WRITE 0x02 - - - -/* flags for VNOP_ALLOCATE */ -#define PREALLOCATE 0x00000001 /* preallocate allocation blocks */ -#define ALLOCATECONTIG 0x00000002 /* allocate contigious space */ -#define ALLOCATEALL 0x00000004 /* allocate all requested space */ - /* or no space at all */ -#define FREEREMAINDER 0x00000008 /* deallocate allocated but */ - /* unfilled blocks */ -#define ALLOCATEFROMPEOF 0x00000010 /* allocate from the physical eof */ -#define ALLOCATEFROMVOL 0x00000020 /* allocate from the volume offset */ - -/* - * Token indicating no attribute value yet assigned. some user source uses this - */ -#define VNOVAL (-1) - - - -#endif /* !_VNODE_H_ */ diff --git a/i386/include/time.h b/i386/include/time.h deleted file mode 100644 index 2914d40..0000000 --- a/i386/include/time.h +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)time.h 8.3 (Berkeley) 1/21/94 - */ - -#ifndef _TIME_H_ -#define _TIME_H_ - -#include <_types.h> - -#define __need_struct_timespec -#include <_structs.h> - -#ifndef NULL -#define NULL __DARWIN_NULL -#endif /* ! NULL */ - -#ifndef _CLOCK_T -#define _CLOCK_T -typedef __darwin_clock_t clock_t; -#endif - -#ifndef _SIZE_T -#define _SIZE_T -typedef __darwin_size_t size_t; -#endif - -#ifndef _TIME_T -#define _TIME_T -typedef __darwin_time_t time_t; -#endif - -struct tm { - int tm_sec; /* seconds after the minute [0-60] */ - int tm_min; /* minutes after the hour [0-59] */ - int tm_hour; /* hours since midnight [0-23] */ - int tm_mday; /* day of the month [1-31] */ - int tm_mon; /* months since January [0-11] */ - int tm_year; /* years since 1900 */ - int tm_wday; /* days since Sunday [0-6] */ - int tm_yday; /* days since January 1 [0-365] */ - int tm_isdst; /* Daylight Savings Time flag */ - long tm_gmtoff; /* offset from CUT in seconds */ - char *tm_zone; /* timezone abbreviation */ -}; - -#if __DARWIN_UNIX03 -#define CLOCKS_PER_SEC 1000000 /* [XSI] */ -#else /* !__DARWIN_UNIX03 */ -#include <machine/_limits.h> /* Include file containing CLK_TCK. */ - -#define CLOCKS_PER_SEC (__DARWIN_CLK_TCK) -#endif /* __DARWIN_UNIX03 */ - -#ifndef _ANSI_SOURCE -extern char *tzname[]; -#endif - -extern int getdate_err; -#if __DARWIN_UNIX03 -//Begin-Libc -#ifndef LIBC_ALIAS_TIMEZONE -//End-Libc -extern long timezone __DARWIN_ALIAS(timezone); -//Begin-Libc -#else /* LIBC_ALIAS_TIMEZONE */ -extern long timezone LIBC_ALIAS(timezone); -#endif /* !LIBC_ALIAS_TIMEZONE */ -//End-Libc -#endif /* __DARWIN_UNIX03 */ -extern int daylight; - -__BEGIN_DECLS -char *asctime(const struct tm *); -//Begin-Libc -#ifndef LIBC_ALIAS_CLOCK -//End-Libc -clock_t clock(void) __DARWIN_ALIAS(clock); -//Begin-Libc -#else /* LIBC_ALIAS_CLOCK */ -clock_t clock(void) LIBC_ALIAS(clock); -#endif /* !LIBC_ALIAS_CLOCK */ -//End-Libc -char *ctime(const time_t *); -double difftime(time_t, time_t); -struct tm *getdate(const char *); -struct tm *gmtime(const time_t *); -struct tm *localtime(const time_t *); -//Begin-Libc -#ifndef LIBC_ALIAS_MKTIME -//End-Libc -time_t mktime(struct tm *) __DARWIN_ALIAS(mktime); -//Begin-Libc -#else /* LIBC_ALIAS_MKTIME */ -time_t mktime(struct tm *) LIBC_ALIAS(mktime); -#endif /* !LIBC_ALIAS_MKTIME */ -//End-Libc -//Begin-Libc -#ifndef LIBC_ALIAS_STRFTIME -//End-Libc -size_t strftime(char * __restrict, size_t, const char * __restrict, const struct tm * __restrict) __DARWIN_ALIAS(strftime); -//Begin-Libc -#else /* LIBC_ALIAS_STRFTIME */ -size_t strftime(char * __restrict, size_t, const char * __restrict, const struct tm * __restrict) LIBC_ALIAS(strftime); -#endif /* !LIBC_ALIAS_STRFTIME */ -//End-Libc -//Begin-Libc -#ifndef LIBC_ALIAS_STRPTIME -//End-Libc -char *strptime(const char * __restrict, const char * __restrict, struct tm * __restrict) __DARWIN_ALIAS(strptime); -//Begin-Libc -#else /* LIBC_ALIAS_STRPTIME */ -char *strptime(const char * __restrict, const char * __restrict, struct tm * __restrict) LIBC_ALIAS(strptime); -#endif /* !LIBC_ALIAS_STRPTIME */ -//End-Libc -time_t time(time_t *); - -#ifndef _ANSI_SOURCE -void tzset(void); -#endif /* not ANSI */ - -/* [TSF] Thread safe functions */ -char *asctime_r(const struct tm * __restrict, char * __restrict); -char *ctime_r(const time_t *, char *); -struct tm *gmtime_r(const time_t * __restrict, struct tm * __restrict); -struct tm *localtime_r(const time_t * __restrict, struct tm * __restrict); - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -time_t posix2time(time_t); -#if !__DARWIN_UNIX03 -char *timezone(int, int); -#endif /* !__DARWIN_UNIX03 */ -void tzsetwall(void); -time_t time2posix(time_t); -time_t timelocal(struct tm * const); -time_t timegm(struct tm * const); -#endif /* neither ANSI nor POSIX */ - -#if !defined(_ANSI_SOURCE) -//Begin-Libc -#ifndef LIBC_ALIAS_NANOSLEEP -//End-Libc -int nanosleep(const struct timespec *, struct timespec *) __DARWIN_ALIAS_C(nanosleep); -//Begin-Libc -#else /* LIBC_ALIAS_NANOSLEEP */ -int nanosleep(const struct timespec *, struct timespec *) LIBC_ALIAS_C(nanosleep); -#endif /* !LIBC_ALIAS_NANOSLEEP */ -//End-Libc -#endif -__END_DECLS - -#ifdef _USE_EXTENDED_LOCALES_ -#include <xlocale/_time.h> -#endif /* _USE_EXTENDED_LOCALES_ */ - -#endif /* !_TIME_H_ */ diff --git a/i386/include/unistd.h b/i386/include/unistd.h deleted file mode 100644 index a15eee6..0000000 --- a/i386/include/unistd.h +++ /dev/null @@ -1,623 +0,0 @@ -/* - * Copyright (c) 2000, 2002-2006, 2008, 2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/*- - * Copyright (c) 1998-1999 Apple Computer, Inc. All Rights Reserved - * Copyright (c) 1991, 1993, 1994 - * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)unistd.h 8.12 (Berkeley) 4/27/95 - * - * Copyright (c) 1998 Apple Compter, Inc. - * All Rights Reserved - */ - -/* History: - 7/14/99 EKN at Apple fixed getdirentriesattr from getdirentryattr - 3/26/98 CHW at Apple added real interface to searchfs call - 3/5/98 CHW at Apple added hfs semantic system calls headers -*/ - -#ifndef _UNISTD_H_ -#define _UNISTD_H_ - -#include <_types.h> -#include <sys/unistd.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#ifndef _DEV_T -#define _DEV_T -typedef __darwin_dev_t dev_t; -#endif -#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ - -#ifndef _GID_T -#define _GID_T -typedef __darwin_gid_t gid_t; -#endif - -#ifndef _INTPTR_T -#define _INTPTR_T -typedef __darwin_intptr_t intptr_t; -#endif - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#ifndef _MODE_T -#define _MODE_T -typedef __darwin_mode_t mode_t; -#endif -#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ - -#ifndef _OFF_T -#define _OFF_T -typedef __darwin_off_t off_t; -#endif - -#ifndef _PID_T -#define _PID_T -typedef __darwin_pid_t pid_t; -#endif - -#ifndef _SIZE_T -#define _SIZE_T -/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: - * _GCC_SIZE_T */ -typedef __darwin_size_t size_t; -#endif - -#ifndef _SSIZE_T -#define _SSIZE_T -typedef __darwin_ssize_t ssize_t; -#endif - -#ifndef _UID_T -#define _UID_T -typedef __darwin_uid_t uid_t; /* user id */ -#endif - -#ifndef _USECONDS_T -#define _USECONDS_T -typedef __darwin_useconds_t useconds_t; -#endif - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#ifndef _UUID_T -#define _UUID_T -typedef __darwin_uuid_t uuid_t; -#endif /* _UUID_T */ -#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ - -#define STDIN_FILENO 0 /* standard input file descriptor */ -#define STDOUT_FILENO 1 /* standard output file descriptor */ -#define STDERR_FILENO 2 /* standard error file descriptor */ - -#ifndef NULL -#define NULL __DARWIN_NULL -#endif /* ! NULL */ - -/* Version test macros */ -/* _POSIX_VERSION and _POSIX2_VERSION from sys/unistd.h */ -#define _XOPEN_VERSION 600 /* [XSI] */ -#define _XOPEN_XCU_VERSION 4 /* Older standard */ - - -/* Please keep this list in the same order as the applicable standard */ -#define _POSIX_ADVISORY_INFO (-1) /* [ADV] */ -#define _POSIX_ASYNCHRONOUS_IO (-1) /* [AIO] */ -#define _POSIX_BARRIERS (-1) /* [BAR] */ -#define _POSIX_CHOWN_RESTRICTED 200112L -#define _POSIX_CLOCK_SELECTION (-1) /* [CS] */ -#define _POSIX_CPUTIME (-1) /* [CPT] */ -#define _POSIX_FSYNC 200112L /* [FSC] */ -#define _POSIX_IPV6 200112L -#define _POSIX_JOB_CONTROL 200112L -#define _POSIX_MAPPED_FILES 200112L /* [MF] */ -#define _POSIX_MEMLOCK (-1) /* [ML] */ -#define _POSIX_MEMLOCK_RANGE (-1) /* [MR] */ -#define _POSIX_MEMORY_PROTECTION 200112L /* [MPR] */ -#define _POSIX_MESSAGE_PASSING (-1) /* [MSG] */ -#define _POSIX_MONOTONIC_CLOCK (-1) /* [MON] */ -#define _POSIX_NO_TRUNC 200112L -#define _POSIX_PRIORITIZED_IO (-1) /* [PIO] */ -#define _POSIX_PRIORITY_SCHEDULING (-1) /* [PS] */ -#define _POSIX_RAW_SOCKETS (-1) /* [RS] */ -#define _POSIX_READER_WRITER_LOCKS 200112L /* [THR] */ -#define _POSIX_REALTIME_SIGNALS (-1) /* [RTS] */ -#define _POSIX_REGEXP 200112L -#define _POSIX_SAVED_IDS 200112L /* XXX required */ -#define _POSIX_SEMAPHORES (-1) /* [SEM] */ -#define _POSIX_SHARED_MEMORY_OBJECTS (-1) /* [SHM] */ -#define _POSIX_SHELL 200112L -#define _POSIX_SPAWN (-1) /* [SPN] */ -#define _POSIX_SPIN_LOCKS (-1) /* [SPI] */ -#define _POSIX_SPORADIC_SERVER (-1) /* [SS] */ -#define _POSIX_SYNCHRONIZED_IO (-1) /* [SIO] */ -#define _POSIX_THREAD_ATTR_STACKADDR 200112L /* [TSA] */ -#define _POSIX_THREAD_ATTR_STACKSIZE 200112L /* [TSS] */ -#define _POSIX_THREAD_CPUTIME (-1) /* [TCT] */ -#define _POSIX_THREAD_PRIO_INHERIT (-1) /* [TPI] */ -#define _POSIX_THREAD_PRIO_PROTECT (-1) /* [TPP] */ -#define _POSIX_THREAD_PRIORITY_SCHEDULING (-1) /* [TPS] */ -#define _POSIX_THREAD_PROCESS_SHARED 200112L /* [TSH] */ -#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L /* [TSF] */ -#define _POSIX_THREAD_SPORADIC_SERVER (-1) /* [TSP] */ -#define _POSIX_THREADS 200112L /* [THR] */ -#define _POSIX_TIMEOUTS (-1) /* [TMO] */ -#define _POSIX_TIMERS (-1) /* [TMR] */ -#define _POSIX_TRACE (-1) /* [TRC] */ -#define _POSIX_TRACE_EVENT_FILTER (-1) /* [TEF] */ -#define _POSIX_TRACE_INHERIT (-1) /* [TRI] */ -#define _POSIX_TRACE_LOG (-1) /* [TRL] */ -#define _POSIX_TYPED_MEMORY_OBJECTS (-1) /* [TYM] */ -#ifndef _POSIX_VDISABLE -#define _POSIX_VDISABLE 0xff /* same as sys/termios.h */ -#endif /* _POSIX_VDISABLE */ - -#define _POSIX2_C_BIND 200112L -#define _POSIX2_C_DEV 200112L /* c99 command */ -#define _POSIX2_CHAR_TERM 200112L -#define _POSIX2_FORT_DEV (-1) /* fort77 command */ -#define _POSIX2_FORT_RUN 200112L -#define _POSIX2_LOCALEDEF 200112L /* localedef command */ -#define _POSIX2_PBS (-1) -#define _POSIX2_PBS_ACCOUNTING (-1) -#define _POSIX2_PBS_CHECKPOINT (-1) -#define _POSIX2_PBS_LOCATE (-1) -#define _POSIX2_PBS_MESSAGE (-1) -#define _POSIX2_PBS_TRACK (-1) -#define _POSIX2_SW_DEV 200112L -#define _POSIX2_UPE 200112L /* XXXX no fc, newgrp, tabs */ - -#define _V6_ILP32_OFF32 (-1) -#define _V6_ILP32_OFFBIG (1) -#define _V6_LP64_OFF64 (-1) -#define _V6_LPBIG_OFFBIG (-1) - -#define _XBS5_ILP32_OFF32 _V6_ILP32_OFF32 /* legacy */ -#define _XBS5_ILP32_OFFBIG _V6_ILP32_OFFBIG /* legacy */ -#define _XBS5_LP64_OFF64 _V6_LP64_OFF64 /* legacy */ -#define _XBS5_LPBIG_OFFBIG _V6_LPBIG_OFFBIG /* legacy */ - -#define _XOPEN_CRYPT (1) -#define _XOPEN_ENH_I18N (1) /* XXX required */ -#define _XOPEN_LEGACY (-1) /* no ftime gcvt, wcswcs */ -#define _XOPEN_REALTIME (-1) /* no q'ed signals, mq_* */ -#define _XOPEN_REALTIME_THREADS (-1) /* no posix_spawn, et. al. */ -#define _XOPEN_SHM (1) -#define _XOPEN_STREAMS (-1) -#define _XOPEN_UNIX (1) - - -#define F_ULOCK 0 /* unlock locked section */ -#define F_LOCK 1 /* lock a section for exclusive use */ -#define F_TLOCK 2 /* test and lock a section for exclusive use */ -#define F_TEST 3 /* test a section for locks by other procs */ - -/* configurable system variables */ -#define _SC_ARG_MAX 1 -#define _SC_CHILD_MAX 2 -#define _SC_CLK_TCK 3 -#define _SC_NGROUPS_MAX 4 -#define _SC_OPEN_MAX 5 -#define _SC_JOB_CONTROL 6 -#define _SC_SAVED_IDS 7 -#define _SC_VERSION 8 -#define _SC_BC_BASE_MAX 9 -#define _SC_BC_DIM_MAX 10 -#define _SC_BC_SCALE_MAX 11 -#define _SC_BC_STRING_MAX 12 -#define _SC_COLL_WEIGHTS_MAX 13 -#define _SC_EXPR_NEST_MAX 14 -#define _SC_LINE_MAX 15 -#define _SC_RE_DUP_MAX 16 -#define _SC_2_VERSION 17 -#define _SC_2_C_BIND 18 -#define _SC_2_C_DEV 19 -#define _SC_2_CHAR_TERM 20 -#define _SC_2_FORT_DEV 21 -#define _SC_2_FORT_RUN 22 -#define _SC_2_LOCALEDEF 23 -#define _SC_2_SW_DEV 24 -#define _SC_2_UPE 25 -#define _SC_STREAM_MAX 26 -#define _SC_TZNAME_MAX 27 -#define _SC_ASYNCHRONOUS_IO 28 -#define _SC_PAGESIZE 29 -#define _SC_MEMLOCK 30 -#define _SC_MEMLOCK_RANGE 31 -#define _SC_MEMORY_PROTECTION 32 -#define _SC_MESSAGE_PASSING 33 -#define _SC_PRIORITIZED_IO 34 -#define _SC_PRIORITY_SCHEDULING 35 -#define _SC_REALTIME_SIGNALS 36 -#define _SC_SEMAPHORES 37 -#define _SC_FSYNC 38 -#define _SC_SHARED_MEMORY_OBJECTS 39 -#define _SC_SYNCHRONIZED_IO 40 -#define _SC_TIMERS 41 -#define _SC_AIO_LISTIO_MAX 42 -#define _SC_AIO_MAX 43 -#define _SC_AIO_PRIO_DELTA_MAX 44 -#define _SC_DELAYTIMER_MAX 45 -#define _SC_MQ_OPEN_MAX 46 -#define _SC_MAPPED_FILES 47 /* swap _SC_PAGESIZE vs. BSD */ -#define _SC_RTSIG_MAX 48 -#define _SC_SEM_NSEMS_MAX 49 -#define _SC_SEM_VALUE_MAX 50 -#define _SC_SIGQUEUE_MAX 51 -#define _SC_TIMER_MAX 52 -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define _SC_NPROCESSORS_CONF 57 -#define _SC_NPROCESSORS_ONLN 58 -#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */ -#define _SC_2_PBS 59 -#define _SC_2_PBS_ACCOUNTING 60 -#define _SC_2_PBS_CHECKPOINT 61 -#define _SC_2_PBS_LOCATE 62 -#define _SC_2_PBS_MESSAGE 63 -#define _SC_2_PBS_TRACK 64 -#define _SC_ADVISORY_INFO 65 -#define _SC_BARRIERS 66 -#define _SC_CLOCK_SELECTION 67 -#define _SC_CPUTIME 68 -#define _SC_FILE_LOCKING 69 -#define _SC_GETGR_R_SIZE_MAX 70 -#define _SC_GETPW_R_SIZE_MAX 71 -#define _SC_HOST_NAME_MAX 72 -#define _SC_LOGIN_NAME_MAX 73 -#define _SC_MONOTONIC_CLOCK 74 -#define _SC_MQ_PRIO_MAX 75 -#define _SC_READER_WRITER_LOCKS 76 -#define _SC_REGEXP 77 -#define _SC_SHELL 78 -#define _SC_SPAWN 79 -#define _SC_SPIN_LOCKS 80 -#define _SC_SPORADIC_SERVER 81 -#define _SC_THREAD_ATTR_STACKADDR 82 -#define _SC_THREAD_ATTR_STACKSIZE 83 -#define _SC_THREAD_CPUTIME 84 -#define _SC_THREAD_DESTRUCTOR_ITERATIONS 85 -#define _SC_THREAD_KEYS_MAX 86 -#define _SC_THREAD_PRIO_INHERIT 87 -#define _SC_THREAD_PRIO_PROTECT 88 -#define _SC_THREAD_PRIORITY_SCHEDULING 89 -#define _SC_THREAD_PROCESS_SHARED 90 -#define _SC_THREAD_SAFE_FUNCTIONS 91 -#define _SC_THREAD_SPORADIC_SERVER 92 -#define _SC_THREAD_STACK_MIN 93 -#define _SC_THREAD_THREADS_MAX 94 -#define _SC_TIMEOUTS 95 -#define _SC_THREADS 96 -#define _SC_TRACE 97 -#define _SC_TRACE_EVENT_FILTER 98 -#define _SC_TRACE_INHERIT 99 -#define _SC_TRACE_LOG 100 -#define _SC_TTY_NAME_MAX 101 -#define _SC_TYPED_MEMORY_OBJECTS 102 -#define _SC_V6_ILP32_OFF32 103 -#define _SC_V6_ILP32_OFFBIG 104 -#define _SC_V6_LP64_OFF64 105 -#define _SC_V6_LPBIG_OFFBIG 106 -#define _SC_IPV6 118 -#define _SC_RAW_SOCKETS 119 -#define _SC_SYMLOOP_MAX 120 -#define _SC_ATEXIT_MAX 107 -#define _SC_IOV_MAX 56 -#define _SC_PAGE_SIZE _SC_PAGESIZE -#define _SC_XOPEN_CRYPT 108 -#define _SC_XOPEN_ENH_I18N 109 -#define _SC_XOPEN_LEGACY 110 -#define _SC_XOPEN_REALTIME 111 -#define _SC_XOPEN_REALTIME_THREADS 112 -#define _SC_XOPEN_SHM 113 -#define _SC_XOPEN_STREAMS 114 -#define _SC_XOPEN_UNIX 115 -#define _SC_XOPEN_VERSION 116 -#define _SC_XOPEN_XCU_VERSION 121 -#define _SC_XBS5_ILP32_OFF32 122 -#define _SC_XBS5_ILP32_OFFBIG 123 -#define _SC_XBS5_LP64_OFF64 124 -#define _SC_XBS5_LPBIG_OFFBIG 125 -#define _SC_SS_REPL_MAX 126 -#define _SC_TRACE_EVENT_NAME_MAX 127 -#define _SC_TRACE_NAME_MAX 128 -#define _SC_TRACE_SYS_MAX 129 -#define _SC_TRACE_USER_EVENT_MAX 130 -#define _SC_PASS_MAX 131 - -#ifndef _CS_PATH /* XXX temporary #ifdef'ed for <sys/unistd.h> */ -#define _CS_PATH 1 -#endif -#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 2 -#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 3 -#define _CS_POSIX_V6_ILP32_OFF32_LIBS 4 -#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 5 -#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 6 -#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 7 -#define _CS_POSIX_V6_LP64_OFF64_CFLAGS 8 -#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 9 -#define _CS_POSIX_V6_LP64_OFF64_LIBS 10 -#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 11 -#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 12 -#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 13 -#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 14 - -/* reserved for compatibility with Issue 5 */ -#define _CS_XBS5_ILP32_OFF32_CFLAGS 20 -#define _CS_XBS5_ILP32_OFF32_LDFLAGS 21 -#define _CS_XBS5_ILP32_OFF32_LIBS 22 -#define _CS_XBS5_ILP32_OFF32_LINTFLAGS 23 -#define _CS_XBS5_ILP32_OFFBIG_CFLAGS 24 -#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS 25 -#define _CS_XBS5_ILP32_OFFBIG_LIBS 26 -#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS 27 -#define _CS_XBS5_LP64_OFF64_CFLAGS 28 -#define _CS_XBS5_LP64_OFF64_LDFLAGS 29 -#define _CS_XBS5_LP64_OFF64_LIBS 30 -#define _CS_XBS5_LP64_OFF64_LINTFLAGS 31 -#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS 32 -#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS 33 -#define _CS_XBS5_LPBIG_OFFBIG_LIBS 34 -#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS 35 - -#define _CS_DARWIN_USER_DIR 65536 -#define _CS_DARWIN_USER_TEMP_DIR 65537 -#define _CS_DARWIN_USER_CACHE_DIR 65538 - -__BEGIN_DECLS - -void _exit(int) __dead2; -int access(const char *, int); -unsigned int - alarm(unsigned int); -int chdir(const char *); -int chown(const char *, uid_t, gid_t); -int close(int) __DARWIN_ALIAS_C(close); -size_t confstr(int, char *, size_t) __DARWIN_ALIAS(confstr); -char *crypt(const char *, const char *); -char *ctermid(char *); -int dup(int); -int dup2(int, int); -#if __DARWIN_UNIX03 -void encrypt(char *, int) __DARWIN_ALIAS(encrypt); -#else /* !__DARWIN_UNIX03 */ -int encrypt(char *, int); -#endif /* __DARWIN_UNIX03 */ -int execl(const char *, const char *, ...); -int execle(const char *, const char *, ...); -int execlp(const char *, const char *, ...); -int execv(const char *, char * const *); -int execve(const char *, char * const *, char * const *); -int execvp(const char *, char * const *); -int fchown(int, uid_t, gid_t); -int fchdir(int); -pid_t fork(void); -long fpathconf(int, int); -int fsync(int) __DARWIN_ALIAS_C(fsync); -int ftruncate(int, off_t); -char *getcwd(char *, size_t); -gid_t getegid(void); -uid_t geteuid(void); -gid_t getgid(void); -#if defined(_DARWIN_UNLIMITED_GETGROUPS) || defined(_DARWIN_C_SOURCE) -int getgroups(int, gid_t []) __DARWIN_EXTSN(getgroups); -#else /* !_DARWIN_UNLIMITED_GETGROUPS && !_DARWIN_C_SOURCE */ -int getgroups(int, gid_t []); -#endif /* _DARWIN_UNLIMITED_GETGROUPS || _DARWIN_C_SOURCE */ -long gethostid(void); -int gethostname(char *, size_t); -char *getlogin(void); -int getlogin_r(char *, size_t); -int getopt(int, char * const [], const char *) __DARWIN_ALIAS(getopt); -pid_t getpgid(pid_t); -pid_t getpgrp(void); -pid_t getpid(void); -pid_t getppid(void); -pid_t getsid(pid_t); -uid_t getuid(void); -char *getwd(char *); /* obsoleted by getcwd() */ -int isatty(int); -int lchown(const char *, uid_t, gid_t) __DARWIN_ALIAS(lchown); -int link(const char *, const char *); -int lockf(int, int, off_t) __DARWIN_ALIAS_C(lockf); -off_t lseek(int, off_t, int); -int nice(int) __DARWIN_ALIAS(nice); -long pathconf(const char *, int); -int pause(void) __DARWIN_ALIAS_C(pause); -int pipe(int [2]); -ssize_t pread(int, void *, size_t, off_t) __DARWIN_ALIAS_C(pread); -ssize_t pwrite(int, const void *, size_t, off_t) __DARWIN_ALIAS_C(pwrite); -ssize_t read(int, void *, size_t) __DARWIN_ALIAS_C(read); -ssize_t readlink(const char * __restrict, char * __restrict, size_t); -int rmdir(const char *); -int setegid(gid_t); -int seteuid(uid_t); -int setgid(gid_t); -int setpgid(pid_t, pid_t); -#if __DARWIN_UNIX03 -pid_t setpgrp(void) __DARWIN_ALIAS(setpgrp); -#else /* !__DARWIN_UNIX03 */ -int setpgrp(pid_t pid, pid_t pgrp); /* obsoleted by setpgid() */ -#endif /* __DARWIN_UNIX03 */ -int setregid(gid_t, gid_t) __DARWIN_ALIAS(setregid); -int setreuid(uid_t, uid_t) __DARWIN_ALIAS(setreuid); -pid_t setsid(void); -int setuid(uid_t); -unsigned int - sleep(unsigned int) __DARWIN_ALIAS_C(sleep); -void swab(const void * __restrict, void * __restrict, ssize_t); -int symlink(const char *, const char *); -void sync(void); -long sysconf(int); -pid_t tcgetpgrp(int); -int tcsetpgrp(int, pid_t); -int truncate(const char *, off_t); -char *ttyname(int); -#if __DARWIN_UNIX03 -int ttyname_r(int, char *, size_t) __DARWIN_ALIAS(ttyname_r); -#else /* !__DARWIN_UNIX03 */ -char *ttyname_r(int, char *, size_t); -#endif /* __DARWIN_UNIX03 */ -useconds_t - ualarm(useconds_t, useconds_t); -int unlink(const char *); -int usleep(useconds_t) __DARWIN_ALIAS_C(usleep); -pid_t vfork(void); -ssize_t write(int, const void *, size_t) __DARWIN_ALIAS_C(write); - -extern char *optarg; /* getopt(3) external variables */ -extern int optind, opterr, optopt; - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#include <sys/select.h> - -void _Exit(int) __dead2; -int accessx_np(const struct accessx_descriptor *, size_t, int *, uid_t); -int acct(const char *); -int add_profil(char *, size_t, unsigned long, unsigned int); -void *brk(const void *); -int chroot(const char *); -void endusershell(void); -int execvP(const char *, const char *, char * const *); -char *fflagstostr(unsigned long); -int getdtablesize(void); -int getdomainname(char *, int); -int getgrouplist(const char *, int, int *, int *); -int gethostuuid(uuid_t, const struct timespec *); -mode_t getmode(const void *, mode_t); -int getpagesize(void) __pure2; -char *getpass(const char *); -int getpeereid(int, uid_t *, gid_t *); -int getpgid(pid_t _pid); -int getsgroups_np(int *, uuid_t); -int getsid(pid_t _pid); -char *getusershell(void); -int getwgroups_np(int *, uuid_t); -int initgroups(const char *, int); -int iruserok(unsigned long, int, const char *, const char *); -int iruserok_sa(const void *, int, int, const char *, const char *); -int issetugid(void); -char *mkdtemp(char *); -int mknod(const char *, mode_t, dev_t); -int mkstemp(char *); -int mkstemps(char *, int); -char *mktemp(char *); -int nfssvc(int, void *); -int profil(char *, size_t, unsigned long, unsigned int); -int pthread_setugid_np(uid_t, gid_t); -int pthread_getugid_np( uid_t *, gid_t *); -int rcmd(char **, int, const char *, const char *, const char *, int *); -int rcmd_af(char **, int, const char *, const char *, const char *, int *, - int); -int reboot(int); -int revoke(const char *); -int rresvport(int *); -int rresvport_af(int *, int); -int ruserok(const char *, int, const char *, const char *); -void *sbrk(int); -int setdomainname(const char *, int); -int setgroups(int, const gid_t *); -void sethostid(long); -int sethostname(const char *, int); -#if __DARWIN_UNIX03 -void setkey(const char *) __DARWIN_ALIAS(setkey); -#else /* !__DARWIN_UNIX03 */ -int setkey(const char *); -#endif /* __DARWIN_UNIX03 */ -int setlogin(const char *); -void *setmode(const char *) __DARWIN_ALIAS(setmode); -int setrgid(gid_t); -int setruid(uid_t); -int setsgroups_np(int, const uuid_t); -void setusershell(void); -int setwgroups_np(int, const uuid_t); -int strtofflags(char **, unsigned long *, unsigned long *); -int swapon(const char *); -int syscall(int, ...); -int ttyslot(void); -int undelete(const char *); -int unwhiteout(const char *); -void *valloc(size_t); - -extern char *suboptarg; /* getsubopt(3) external variable */ -int getsubopt(char **, char * const *, char **); - -/* HFS & HFS Plus semantics system calls go here */ -#ifdef __LP64__ -int fgetattrlist(int,void*,void*,size_t,unsigned int); -int fsetattrlist(int,void*,void*,size_t,unsigned int); -int getattrlist(const char*,void*,void*,size_t,unsigned int) __DARWIN_ALIAS(getattrlist); -int setattrlist(const char*,void*,void*,size_t,unsigned int) __DARWIN_ALIAS(setattrlist); -int exchangedata(const char*,const char*,unsigned int); -int getdirentriesattr(int,void*,void*,size_t,unsigned int*,unsigned int*,unsigned int*,unsigned int); - -#else /* __LP64__ */ -int fgetattrlist(int,void*,void*,size_t,unsigned long); -int fsetattrlist(int,void*,void*,size_t,unsigned long); -int getattrlist(const char*,void*,void*,size_t,unsigned long) __DARWIN_ALIAS(getattrlist); -int setattrlist(const char*,void*,void*,size_t,unsigned long) __DARWIN_ALIAS(setattrlist); -int exchangedata(const char*,const char*,unsigned long); -int getdirentriesattr(int,void*,void*,size_t,unsigned long*,unsigned long*,unsigned long*,unsigned long); - -#endif /* __LP64__ */ - -struct fssearchblock; -struct searchstate; - -int searchfs(const char *, struct fssearchblock *, unsigned long *, unsigned int, unsigned int, struct searchstate *); -int fsctl(const char *,unsigned long,void*,unsigned int); -int ffsctl(int,unsigned long,void*,unsigned int); - -extern int optreset; - -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -__END_DECLS - -#endif /* !_UNISTD_H_ */ diff --git a/i386/include/unwind.h b/i386/include/unwind.h deleted file mode 100644 index 24cb87e..0000000 --- a/i386/include/unwind.h +++ /dev/null @@ -1,245 +0,0 @@ -/* Exception handling and frame unwind runtime interface routines. - Copyright (C) 2001, 2003, 2004, 2006 Free Software Foundation, Inc. - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ - -/* As a special exception, if you include this header file into source - files compiled by GCC, this header file does not by itself cause - the resulting executable to be covered by the GNU General Public - License. This exception does not however invalidate any other - reasons why the executable file might be covered by the GNU General - Public License. */ - -/* This is derived from the C++ ABI for IA-64. Where we diverge - for cross-architecture compatibility are noted with "@@@". */ - -#ifndef _UNWIND_H -#define _UNWIND_H - -#ifndef HIDE_EXPORTS -#ifdef __GCC__ -#pragma GCC visibility push(default) -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* Level 1: Base ABI */ - -/* @@@ The IA-64 ABI uses uint64 throughout. Most places this is - inefficient for 32-bit and smaller machines. */ -typedef unsigned _Unwind_Word __attribute__((__mode__(__word__))); -typedef signed _Unwind_Sword __attribute__((__mode__(__word__))); -#if defined(__ia64__) && defined(__hpux__) -typedef unsigned _Unwind_Ptr __attribute__((__mode__(__word__))); -#else -typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__))); -#endif -typedef unsigned _Unwind_Internal_Ptr __attribute__((__mode__(__pointer__))); - -/* @@@ The IA-64 ABI uses a 64-bit word to identify the producer and - consumer of an exception. We'll go along with this for now even on - 32-bit machines. We'll need to provide some other option for - 16-bit machines and for machines with > 8 bits per byte. */ -typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__))); - -/* The unwind interface uses reason codes in several contexts to - identify the reasons for failures or other actions. */ -typedef enum -{ - _URC_NO_REASON = 0, - _URC_FOREIGN_EXCEPTION_CAUGHT = 1, - _URC_FATAL_PHASE2_ERROR = 2, - _URC_FATAL_PHASE1_ERROR = 3, - _URC_NORMAL_STOP = 4, - _URC_END_OF_STACK = 5, - _URC_HANDLER_FOUND = 6, - _URC_INSTALL_CONTEXT = 7, - _URC_CONTINUE_UNWIND = 8 -} _Unwind_Reason_Code; - - -/* The unwind interface uses a pointer to an exception header object - as its representation of an exception being thrown. In general, the - full representation of an exception object is language- and - implementation-specific, but it will be prefixed by a header - understood by the unwind interface. */ - -struct _Unwind_Exception; - -typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code, - struct _Unwind_Exception *); - -struct _Unwind_Exception -{ - _Unwind_Exception_Class exception_class; - _Unwind_Exception_Cleanup_Fn exception_cleanup; - _Unwind_Word private_1; - _Unwind_Word private_2; - - /* @@@ The IA-64 ABI says that this structure must be double-word aligned. - Taking that literally does not make much sense generically. Instead we - provide the maximum alignment required by any type for the machine. */ -} __attribute__((__aligned__)); - - -/* The ACTIONS argument to the personality routine is a bitwise OR of one - or more of the following constants. */ -typedef int _Unwind_Action; - -#define _UA_SEARCH_PHASE 1 -#define _UA_CLEANUP_PHASE 2 -#define _UA_HANDLER_FRAME 4 -#define _UA_FORCE_UNWIND 8 -#define _UA_END_OF_STACK 16 - -/* This is an opaque type used to refer to a system-specific data - structure used by the system unwinder. This context is created and - destroyed by the system, and passed to the personality routine - during unwinding. */ -struct _Unwind_Context; - -/* Raise an exception, passing along the given exception object. */ -extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *); - -/* Raise an exception for forced unwinding. */ - -typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) - (int, _Unwind_Action, _Unwind_Exception_Class, - struct _Unwind_Exception *, struct _Unwind_Context *, void *); - -extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *, - _Unwind_Stop_Fn, - void *); - -/* Helper to invoke the exception_cleanup routine. */ -extern void _Unwind_DeleteException (struct _Unwind_Exception *); - -/* Resume propagation of an existing exception. This is used after - e.g. executing cleanup code, and not to implement rethrowing. */ -extern void _Unwind_Resume (struct _Unwind_Exception *); - -/* @@@ Resume propagation of an FORCE_UNWIND exception, or to rethrow - a normal exception that was handled. */ -extern _Unwind_Reason_Code _Unwind_Resume_or_Rethrow (struct _Unwind_Exception *); - -/* @@@ Use unwind data to perform a stack backtrace. The trace callback - is called for every stack frame in the call chain, but no cleanup - actions are performed. */ -typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn) - (struct _Unwind_Context *, void *); - -extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *); - -/* These functions are used for communicating information about the unwind - context (i.e. the unwind descriptors and the user register state) between - the unwind library and the personality routine and landing pad. Only - selected registers maybe manipulated. */ - -extern _Unwind_Word _Unwind_GetGR (struct _Unwind_Context *, int); -extern void _Unwind_SetGR (struct _Unwind_Context *, int, _Unwind_Word); - -extern _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *); -extern _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *); -extern void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr); - -/* @@@ Retrieve the CFA of the given context. */ -extern _Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *); - -extern void *_Unwind_GetLanguageSpecificData (struct _Unwind_Context *); - -extern _Unwind_Ptr _Unwind_GetRegionStart (struct _Unwind_Context *); - - -/* The personality routine is the function in the C++ (or other language) - runtime library which serves as an interface between the system unwind - library and language-specific exception handling semantics. It is - specific to the code fragment described by an unwind info block, and - it is always referenced via the pointer in the unwind info block, and - hence it has no ABI-specified name. - - Note that this implies that two different C++ implementations can - use different names, and have different contents in the language - specific data area. Moreover, that the language specific data - area contains no version info because name of the function invoked - provides more effective versioning by detecting at link time the - lack of code to handle the different data format. */ - -typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn) - (int, _Unwind_Action, _Unwind_Exception_Class, - struct _Unwind_Exception *, struct _Unwind_Context *); - -/* @@@ The following alternate entry points are for setjmp/longjmp - based unwinding. */ - -struct SjLj_Function_Context; -extern void _Unwind_SjLj_Register (struct SjLj_Function_Context *); -extern void _Unwind_SjLj_Unregister (struct SjLj_Function_Context *); - -extern _Unwind_Reason_Code _Unwind_SjLj_RaiseException - (struct _Unwind_Exception *); -extern _Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind - (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *); -extern void _Unwind_SjLj_Resume (struct _Unwind_Exception *); -extern _Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow (struct _Unwind_Exception *); - -/* @@@ The following provide access to the base addresses for text - and data-relative addressing in the LDSA. In order to stay link - compatible with the standard ABI for IA-64, we inline these. */ - -#ifdef __ia64__ -#include <stdlib.h> - -static inline _Unwind_Ptr -_Unwind_GetDataRelBase (struct _Unwind_Context *_C) -{ - /* The GP is stored in R1. */ - return _Unwind_GetGR (_C, 1); -} - -static inline _Unwind_Ptr -_Unwind_GetTextRelBase (struct _Unwind_Context *_C __attribute__ ((__unused__))) -{ - abort (); - return 0; -} - -/* @@@ Retrieve the Backing Store Pointer of the given context. */ -extern _Unwind_Word _Unwind_GetBSP (struct _Unwind_Context *); -#else -extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *); -extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *); -#endif - -/* @@@ Given an address, return the entry point of the function that - contains it. */ -extern void * _Unwind_FindEnclosingFunction (void *pc); - -#ifdef __cplusplus -} -#endif - -#ifndef HIDE_EXPORTS -#ifdef __GCC__ -#pragma GCC visibility pop -#endif -#endif - -#endif /* unwind.h */ diff --git a/i386/util/segaddr b/i386/util/segaddr new file mode 100755 index 0000000..e436bcc --- /dev/null +++ b/i386/util/segaddr @@ -0,0 +1,56 @@ +# +# Name : RevoBoot/i386/util/segaddr +# Type : Command line tool (script to replace segsize.c) +# Author : PikerAlpha@yahoo.com (Copyright (c) 2012) +# Version: 1.0 +# Release: Initial release on Monday 12 November 2012 +# +# Updates: +# + +# The following value is decimal for 0x20200 Used to simplify +# stripping unwanted data from the output of size -m boot.sys +BOOT2ADDR=131584 + +# Run for segment address of __INIT (start of /boot file) +if [[ $1 =~ "__INIT" ]]; + then + # Decimal values in, Hexadecimal value out + echo ibase=10\; obase=16\; $BOOT2ADDR | bc + # Check if boot.sys exists + else if [ -f ../../sym/i386/boot.sys ]; + then + # Example output of: 'size boot.sys' + # + #__TEXT __DATA __OBJC others dec hex + #49376 4544 0 640 54560 d520 + + # Start by stripping all unwanted stuff (creates a list): + SIZE_INFO=`size ../../sym/i386/boot.sys | tr -cs "[:digit:]" " "` + + # Giving us: + # 49376 4544 0 640 54560 520 + # ^ + # | + # Yes, the missing 'd' here is expected behaviour + + # Now we assign values (49376, 4544 and 640) to our locals + TEXT=`echo $SIZE_INFO | awk '{ print $1 }'` + INIT=`echo $SIZE_INFO | awk '{ print $4 }'` + + # Run for segment address of __TEXT (right after __INIT segment in /boot file) + if [[ $1 =~ "__TEXT" ]]; + then + # Returns 20480 (131584/0x20200 + 640/0x280) + # Decimal values in, Hexadecimal value out + echo ibase=10\; obase=16\; $BOOT2ADDR + $INIT | bc + else + # Run for segment address of __DATA (right after __TEXT segment in /boot file) + # Returns 2C560 (131584/0x20200 + 4544/0x11C0 + 640/0x280) + # Decimal values in, Hexadecimal value out + echo ibase=10\; obase=16\; $BOOT2ADDR + $INIT + $TEXT | bc + fi + else + echo "Error: boot.sys not found!\n" + fi +fi \ No newline at end of file diff --git a/i386/util/segsize.c b/i386/util/segsize.c deleted file mode 100644 index 2608bfd..0000000 --- a/i386/util/segsize.c +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (c) 1999-2003 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 2.0 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. - * - * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - * - * Updates: - * - Reformated and cleanups (PikerAlpha, November 2012) - * - Single pass runs for all target segment names (PikerAlpha, November 2012) - * - * - * Note: RevoBoot/i386/boot2/Makefile calls this tool to calculate segment sizes, example: - * -segaddr __INIT 20200 -segaddr __TEXT 20480 -segaddr __DATA 2C6E0 - */ - -#include <stdio.h> -#include <stdlib.h> -#include <stdbool.h> -#include <mach/mach.h> -#include <mach/mach_error.h> -#include <sys/file.h> -#include <mach-o/loader.h> -#include <libkern/OSByteOrder.h> -#include <unistd.h> - -int infile; - -struct mach_header mh; - -void * cmds; - -static bool swap_ends; - -//========================================================================== - -static unsigned long swap(unsigned long x) -{ - if (swap_ends) - { - return OSSwapInt32(x); - } - else - { - return x; - } -} - -//========================================================================== - -int main(int argc, char *argv[]) -{ - int nc, ncmds; - char *cp; - long boot2Address = 0x20200L; - - if (argc != 2) - { - fprintf(stderr, "Usage: ./segsize [__INIT/__TEXT/__DATA]\n"); - exit(1); - } - else if (strcmp(argv[1], "__INIT") == 0) - { - printf("%lX\n", boot2Address); - exit(0); - } - - infile = open("../../sym/i386/boot.sys", O_RDONLY); - - if (infile < 0) - { - fprintf(stderr, "Error: boot.sys Not Found\n"); - exit(1); - } - - nc = read(infile, &mh, sizeof (mh)); - - if (nc < 0) - { - perror("read mach header"); - exit(1); - } - - if (nc < (int)sizeof (mh)) - { - fprintf(stderr, "read mach header: premature EOF %d\n", nc); - exit(1); - } - - if (mh.magic == MH_MAGIC) - { - swap_ends = false; - } - else if (mh.magic == MH_CIGAM) - { - swap_ends = true; - } - else - { - fprintf(stderr, "bad magic number %lx\n", (unsigned long)mh.magic); - exit(1); - } - - cmds = calloc(swap(mh.sizeofcmds), sizeof (char)); - - if (cmds == 0) - { - fprintf(stderr, "alloc load commands: no memory\n"); - exit(1); - } - - nc = read(infile, cmds, swap(mh.sizeofcmds)); - - if (nc < 0) - { - perror("read load commands"); - exit(1); - } - - if (nc < (int)swap(mh.sizeofcmds)) - { - fprintf(stderr, "read load commands: premature EOF %d\n", nc); - exit(1); - } - - long text = 0L; - - #define lcp ((struct load_command *)cp) - #define scp ((struct segment_command *)cp) - - for (ncmds = swap(mh.ncmds), cp = cmds; ncmds > 0; ncmds--) - { - switch(swap(lcp->cmd)) - { - case LC_SEGMENT: - if (strcmp(scp->segname, "__TEXT") == 0) - { - text = swap(scp->vmsize); - } - else if (strcmp(scp->segname, "__INIT") == 0) - { - if (strcmp(argv[1], "__TEXT") == 0) - { - printf("%lX\n", boot2Address + swap(scp->vmsize)); - } - else // __DATA - { - printf("%lX\n", boot2Address + swap(scp->vmsize) + text); - } - } - - break; - } - - cp += swap(lcp->cmdsize); - } - - exit(0); -} From af6c27908557d53c8426d4b6d613edd32d728891 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 21 Nov 2012 13:28:33 +0100 Subject: [PATCH 172/623] Getting ready for NVRAM->efi-boot-device-data reading --- i386/libsaio/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/i386/libsaio/Makefile b/i386/libsaio/Makefile index 8f8b991..a89f67f 100644 --- a/i386/libsaio/Makefile +++ b/i386/libsaio/Makefile @@ -10,7 +10,7 @@ # - Output added for rm/ar/ranlib actions (PikerAlpha, November 2012). # - Enabled clang compilation (dgsga, PikerAlpha, November 2012. Credits to Evan Lojewski for original work). # - Output change and now using libtool instead of ar/ranlib (PikerAlpha, November 2012). -# +# - SAIO_OBJS changed / base64.o added (PikerAlpha, November 2012). include ../MakePaths.dir @@ -38,10 +38,10 @@ INC = -I. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) VPATH = $(OBJROOT):$(SYMROOT) -SAIO_OBJS = table.o asm.o bios.o biosfn.o disk.o sys.o cache.o bootstruct.o \ - stringTable.o load.o pci.o allocate.o vbe.o hfs.o hfs_compare.o \ - xml.o md5c.o device_tree.o cpu.o platform.o acpi.o smbios.o \ - efi.o console.o +SAIO_OBJS = table.o asm.o bios.o biosfn.o disk.o sys.o cache.o bootstruct.o \ + base64.o stringTable.o load.o pci.o allocate.o vbe.o hfs.o \ + hfs_compare.o xml.o md5c.o device_tree.o cpu.o platform.o \ + acpi.o smbios.o efi.o console.o LIBS = libsaio.a From 8d8128d8492ae57df4e5f87af71ffb6ab0080d35 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 21 Nov 2012 13:32:10 +0100 Subject: [PATCH 173/623] Function getGUIDFromDevicePath() added --- i386/libsa/efi_tables.c | 109 +++++++++++++++++++++++++++++----------- 1 file changed, 80 insertions(+), 29 deletions(-) diff --git a/i386/libsa/efi_tables.c b/i386/libsa/efi_tables.c index b6d5113..fc7b132 100755 --- a/i386/libsa/efi_tables.c +++ b/i386/libsa/efi_tables.c @@ -51,7 +51,8 @@ * CRC32 code derived from work by Gary S. Brown. */ -static uint32_t crc32_tab[] = { +static uint32_t crc32_tab[] = +{ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, @@ -97,6 +98,9 @@ static uint32_t crc32_tab[] = { 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; + +//========================================================================== + uint32_t crc32(uint32_t crc, const void *buf, size_t size) { const uint8_t *p; @@ -105,7 +109,9 @@ uint32_t crc32(uint32_t crc, const void *buf, size_t size) crc = crc ^ ~0U; while (size--) + { crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8); + } return crc ^ ~0U; } @@ -113,7 +119,10 @@ uint32_t crc32(uint32_t crc, const void *buf, size_t size) /*========================================================================== * Utility function to make a device tree string from an EFI_GUID - */ + * + * FIXME: Everything below this line should be moved to: guid.c + * + *========================================================================*/ void efi_guid_unparse_upper(EFI_GUID const *pGuid, char *out) { @@ -127,40 +136,82 @@ void efi_guid_unparse_upper(EFI_GUID const *pGuid, char *out) pGuid->Data4[6], pGuid->Data4[7]); } + +//========================================================================== + bool efi_guid_is_null(EFI_GUID const *pGuid) { - if (pGuid->Data1 == 0 && pGuid->Data2 == 0 && pGuid->Data3 == 0) - { - int i; - - for (i = 0; i < 8; ++i) - { - if (pGuid->Data4[i] != 0) - return false; - } - return true; - } - - return false; + if (pGuid->Data1 == 0 && pGuid->Data2 == 0 && pGuid->Data3 == 0) + { + int i; + + for (i = 0; i < 8; ++i) + { + if (pGuid->Data4[i] != 0) + { + return false; + } + } + + return true; + } + + return false; } #define COMPARE_MEMBER_AND_RETURN_IF_NE(a,b,mem) \ - if( ((a)->mem) < ((b)->mem) ) \ - return -1; \ - else if( ((a)->mem) > ((b)->mem) ) \ - return 1; + if( ((a)->mem) < ((b)->mem) ) \ + return -1; \ + else if( ((a)->mem) > ((b)->mem) ) \ + return 1; + +//========================================================================= int efi_guid_compare(EFI_GUID const *pG1, EFI_GUID const *pG2) { - COMPARE_MEMBER_AND_RETURN_IF_NE(pG1, pG2, Data1); - COMPARE_MEMBER_AND_RETURN_IF_NE(pG1, pG2, Data2); - COMPARE_MEMBER_AND_RETURN_IF_NE(pG1, pG2, Data3); - int i; - - for(i = 0; i < 8; ++i) - { - COMPARE_MEMBER_AND_RETURN_IF_NE(pG1, pG2, Data4[i]); - } - return 0; + COMPARE_MEMBER_AND_RETURN_IF_NE(pG1, pG2, Data1); + COMPARE_MEMBER_AND_RETURN_IF_NE(pG1, pG2, Data2); + COMPARE_MEMBER_AND_RETURN_IF_NE(pG1, pG2, Data3); + + int i; + + for(i = 0; i < 8; ++i) + { + COMPARE_MEMBER_AND_RETURN_IF_NE(pG1, pG2, Data4[i]); + } + + return 0; } + +//========================================================================= + +char *getGUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath) +{ + if (devicePath != NULL) + { + while (!IsDevicePathEndType(devicePath) && + !(DevicePathType(devicePath) == MEDIA_DEVICE_PATH && DevicePathSubType(devicePath) == MEDIA_HARDDRIVE_DP)) + { + devicePath = NextDevicePathNode(devicePath); + } + + if (DevicePathType(devicePath) == MEDIA_DEVICE_PATH && DevicePathSubType(devicePath) == MEDIA_HARDDRIVE_DP) + { + HARDDRIVE_DEVICE_PATH * HDDevicePath = (HARDDRIVE_DEVICE_PATH *) devicePath; + + if (HDDevicePath->SignatureType == SIGNATURE_TYPE_GUID) // 0x02 + { + EFI_GUID const * uuid = (EFI_GUID*)HDDevicePath->Signature; + + char * guid = (char *)malloc(37); + + efi_guid_unparse_upper(uuid, guid); + + return guid; + } + } + } + + return NULL; +} From 386f6a8eadb54e0106e6b763562bf810a3788c67 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 21 Nov 2012 13:34:30 +0100 Subject: [PATCH 174/623] New experimental 'Startup Disk' support --- i386/boot2/boot.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 1ebeb08..a863d16 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -218,6 +218,46 @@ void boot(int biosdev) initPartitionChain(); #endif +#define DISK_TARGET_EXPERIMENT 0 + +#if DISK_TARGET_EXPERIMENT + config_file_t nvramStorage; + const char * path = "/Extra/NVRAM/nvramStorage.plist"; + + if (loadConfigFile(path, &nvramStorage) == STATE_SUCCESS) + { + _BOOT_DEBUG_DUMP("nvramStorage.plist located\n"); + + if (getValueForConfigTableKey(&nvramStorage, "efi-boot-device-data", &val, &length)) + { + _BOOT_DEBUG_DUMP("Key 'efi-boot-device-data' located %d\n", length); + + int len = ((length / 4) * 3); + unsigned char * decodedData = (unsigned char *)malloc(len); + int rc = base64Decode(val, decodedData); + + if (rc && decodedData) + { + EFI_DEVICE_PATH_PROTOCOL * dp = (EFI_DEVICE_PATH_PROTOCOL *) decodedData; + + // FIXME: This doesn't belong here! + extern void *getGUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath); + + void * uuid = getGUIDFromDevicePath(dp); + + _BOOT_DEBUG_DUMP("GUID: %s\n", uuid); + _BOOT_DEBUG_SLEEP(1); + + strlcpy(rootUUID, uuid, 37); + } + } + } + else + { + _BOOT_DEBUG_DUMP("Warning: unable to locate nvramStorage.plist\n"); + } +#endif // #if DISK_TARGET_EXPERIMENT + #define loadCABootPlist() loadSystemConfig(&bootInfo->bootConfig) // Loading: /Library/Preferences/SystemConfiguration/com.apple.Boot.plist From 10084cd8f4dd0234e63a0016f5f0755766afd170 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 21 Nov 2012 13:39:21 +0100 Subject: [PATCH 175/623] EDK2's EfiDevicePath.h stuff --- i386/libsaio/efi/essentials.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/efi/essentials.h b/i386/libsaio/efi/essentials.h index 001d181..8c06c48 100755 --- a/i386/libsaio/efi/essentials.h +++ b/i386/libsaio/efi/essentials.h @@ -183,6 +183,26 @@ typedef struct // 0x02 - GUID signature. // EFI_UINT8 SignatureType; -} EFI_BOOT_DEVICE_PATH; // HARDDRIVE_DEVICE_PATH +} HARDDRIVE_DEVICE_PATH; + + +// Stuff from EDK2's EfiDevicePath.h + +#define MEDIA_HARDDRIVE_DP 0x01 +#define MEDIA_DEVICE_PATH 0x04 + +#define SIGNATURE_TYPE_MBR 0x01 +#define SIGNATURE_TYPE_GUID 0x02 + +#define END_DEVICE_PATH_TYPE 0x7f +#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff +#define EFI_DP_TYPE_MASK 0x7f + +#define DevicePathType(a) ( ((a)->Type) & EFI_DP_TYPE_MASK ) +#define DevicePathSubType(a) ( (a)->SubType ) +#define IsDevicePathEndType(a) ( DevicePathType(a) == END_DEVICE_PATH_TYPE ) +#define DevicePathNodeLength(a) ( ((a)->Length[0]) | ((a)->Length[1] << 8) ) +#define NextDevicePathNode(a) ( (EFI_DEVICE_PATH_PROTOCOL *) ( ((EFI_INT8 *) (a)) + DevicePathNodeLength(a))) #endif /* !__LIBSAIO_EFI_ESSENTIALS_H */ + From b68a1759fb2624485b32941905ba4e313c7facb0 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 21 Nov 2012 13:41:06 +0100 Subject: [PATCH 176/623] STATE_SUCCESS moved over from boot.h --- i386/libsaio/libsaio.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/libsaio.h b/i386/libsaio/libsaio.h index 6eee4d1..bfe2c0e 100755 --- a/i386/libsaio/libsaio.h +++ b/i386/libsaio/libsaio.h @@ -20,12 +20,17 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ + * + * Updates: + * - STATE_SUCCESS moved from boot.h (PikerAlpha, November 2012) + * */ -/* libsaio.h */ #ifndef __LIBSAIO_LIBSAIO_H #define __LIBSAIO_LIBSAIO_H +#define STATE_SUCCESS 0 + #include "libsa.h" #include "memory.h" #include "io_inline.h" From 70a84d6ab2b6bd28fa028b8b7b4e935c0a2a2c57 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 21 Nov 2012 13:42:17 +0100 Subject: [PATCH 177/623] Moving STATE_SUCCESS to libsaio.h --- i386/boot2/boot.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/i386/boot2/boot.h b/i386/boot2/boot.h index bb3c6c8..6a30a21 100755 --- a/i386/boot2/boot.h +++ b/i386/boot2/boot.h @@ -25,6 +25,7 @@ * * Updates: * - Unused sysConfigValid removed (PikerAlpha, November 2012). +* - STATE_SUCCESS moved to libsaio.h (PikerAlpha, November 2012). * */ @@ -33,8 +34,6 @@ #include "platform.h" -#define STATE_SUCCESS 0 // Move this to a more appropriate header file. - #if USE_STATIC_DISPLAY_RESOLUTION #define DEFAULT_SCREEN_WIDTH STATIC_SCREEN_WIDTH #define DEFAULT_SCREEN_HEIGHT STATIC_SCREEN_HEIGHT From 28189344a78a41e0a2e40b40854eaaad07727cce Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 21 Nov 2012 13:44:09 +0100 Subject: [PATCH 178/623] Base64.c functions added --- i386/libsaio/saio_internal.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i386/libsaio/saio_internal.h b/i386/libsaio/saio_internal.h index 518887c..dd637ee 100755 --- a/i386/libsaio/saio_internal.h +++ b/i386/libsaio/saio_internal.h @@ -25,6 +25,7 @@ * * - loadBinaryData(load.c) and toLowerCase(string.c) added (PikerAlpha, October 2012). * - Tidied up (spaces -> tabs) (PikerAlpha, October 2012). + * - decodeQuantum and base64Decode added (PikerAlpha, October 2012). * */ @@ -150,6 +151,8 @@ extern int loadHelperConfig(config_file_t *configBuff); extern int loadOverrideConfig(config_file_t *configBuff); extern char * getNextArg(char ** ptr, char * val); extern long ParseXMLFile(char * buffer, TagPtr * dict); +extern void decodeQuantum(const char *input, unsigned char *output); +extern int base64Decode(const char *input, unsigned char *decodedData); /* sys.c */ From f6b28370a96dce804c52dc2712c9e0193df0f5aa Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 21 Nov 2012 13:48:04 +0100 Subject: [PATCH 179/623] Updating file for next release --- i386/libsaio/stringTable.c | 64 ++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/i386/libsaio/stringTable.c b/i386/libsaio/stringTable.c index d74585e..d069e89 100755 --- a/i386/libsaio/stringTable.c +++ b/i386/libsaio/stringTable.c @@ -24,11 +24,13 @@ * Copyright 1993 NeXT, Inc. All rights reserved. * * Updates: - * - White space changes (PikerAlpha, November 2012) - * - Check malloc returns (PikerAlpha, November 2012) + * - White space changes (PikerAlpha, November 2012). + * - Now checking malloc returns (PikerAlpha, November 2012). + * - Cleanups, kTagTypeData support and NVRAMstorage reading changes (PikerAlpha, November 2012). * */ + #include "bootstruct.h" #include "libsaio.h" #include "xml.h" @@ -52,19 +54,18 @@ bool getValueForConfigTableKey(config_file_t *config, const char *key, const cha if (config->dictionary != 0) { // Look up key in XML dictionary - TagPtr value; - value = XMLGetProperty(config->dictionary, key); + TagPtr value = XMLGetProperty(config->dictionary, key); if (value != 0) { - if (value->type != kTagTypeString) + if ((value->type != kTagTypeString) && (value->type != kTagTypeData)) { #if DEBUG_XML_PARSER - error("Non-string tag '%s' found in config file\n", key); + error("Unsupported tag '%s' found in config file\n", key); #endif - return false; } + *val = value->string; *size = strlen(value->string); @@ -81,8 +82,8 @@ bool getValueForConfigTableKey(config_file_t *config, const char *key, const cha char * newStringForKey(char *key, config_file_t *config) { - const char *val; int size; + const char *val; if (getValueForKey(key, &val, &size, config) && size) { @@ -253,9 +254,7 @@ bool getValueForKey(const char *key, const char **val, int *size, config_file_t return true; } - bool ret = getValueForConfigTableKey(config, key, val, size); - - return ret; + return getValueForConfigTableKey(config, key, val, size); } @@ -338,12 +337,37 @@ long ParseXMLFile(char * buffer, TagPtr * dictionaryPtr) } +//============================================================================== +// Returns TRUE on success and FALSE when it is fails to locate / open the file. + +bool loadConfigFile(const char * configFile, config_file_t *config) +{ + int fd = 0; + + if ((fd = open(configFile, 0)) >= 0) + { + // IO_CONFIG_DATA_SIZE is defined as 4096 in bios.h and which should + // be sufficient enough for RevoBoot (size was 4K for years already). + read(fd, config->plist, IO_CONFIG_DATA_SIZE); + close(fd); + + // Build XML dictionary. + ParseXMLFile(config->plist, &config->dictionary); + + return 0; + } + + return 1; +} + //============================================================================== // Returns 0 on success and -1 when it is fails to locate / open the file. int loadSystemConfig(config_file_t *config) { + short retValue = -1; + static char * dirspec[] = { #if LION_RECOVERY_SUPPORT @@ -374,28 +398,20 @@ int loadSystemConfig(config_file_t *config) if (path) { int i = 0; - int fd = 0; int len = (sizeof(dirspec) / sizeof(dirspec[0])); for (; i < len; i++) { sprintf(path, "/%s/%s", dirspec[i], "com.apple.Boot.plist"); - if ((fd = open(path, 0)) >= 0) + if (loadConfigFile(path, config) == STATE_SUCCESS) { - // IO_CONFIG_DATA_SIZE is defined as 4096 in bios.h and which should - // be sufficient enough for RevoBoot (size was 4K for years already). - read(fd, config->plist, IO_CONFIG_DATA_SIZE); - close(fd); - - // Build XML dictionary. - ParseXMLFile(config->plist, &config->dictionary); - - free (path); - return 0; + retValue = 0; } } + + free (path); } - return -1; + return retValue; } From feed6c70b770609b4e1990449d9bbd63d1e37d93 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 21 Nov 2012 13:53:16 +0100 Subject: [PATCH 180/623] New/improved kXMLTagData support --- i386/libsaio/xml.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/i386/libsaio/xml.c b/i386/libsaio/xml.c index a4a0c65..56af399 100755 --- a/i386/libsaio/xml.c +++ b/i386/libsaio/xml.c @@ -403,7 +403,7 @@ static long ParseTagInteger(char * buffer, TagPtr * tag) if (tmpTag) { - long integer = 0L; + int integer = 0; tmpTag->type = kTagTypeInteger; tmpTag->string = (char *)integer; @@ -430,18 +430,18 @@ static long ParseTagData(char * buffer, TagPtr * tag) if (tmpTag) { + char * string = NewSymbol(buffer); + tmpTag->type = kTagTypeData; - tmpTag->string = 0; - tmpTag->tag = 0; + tmpTag->string = string; + tmpTag->tag = 0; tmpTag->tagNext = 0; *tag = tmpTag; - - return length; } } - return length; // -1 + return length; } From a3ecfa96523f51d865f3c0ba6324284bba74556a Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 21 Nov 2012 13:55:34 +0100 Subject: [PATCH 181/623] Adding comment --- i386/libsaio/xml.c | 1 + 1 file changed, 1 insertion(+) diff --git a/i386/libsaio/xml.c b/i386/libsaio/xml.c index 56af399..9de00d4 100755 --- a/i386/libsaio/xml.c +++ b/i386/libsaio/xml.c @@ -23,6 +23,7 @@ * * Updates: * - Cleanups, white space and layout changes (PikerAlpha, November 2012) + * - New/improved kXMLTagData support (PikerAlpha, November 2012) * */ From 9aa1c3ae2676b9528fcf44df3ad7580c6dca9ad5 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 21 Nov 2012 13:59:58 +0100 Subject: [PATCH 182/623] Stand alone support for base64.c added --- i386/libsaio/efi/essentials.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/efi/essentials.h b/i386/libsaio/efi/essentials.h index 8c06c48..c4067f9 100755 --- a/i386/libsaio/efi/essentials.h +++ b/i386/libsaio/efi/essentials.h @@ -24,13 +24,16 @@ * EFI implementation for Revolution Copyright (c) 2010 by DHP. * All rights reserved. * + * Updates: + * - Stand alone support for base64.c added (PikerAlpha, November 2012) */ #ifndef __LIBSAIO_EFI_ESSENTIALS_H #define __LIBSAIO_EFI_ESSENTIALS_H -// #include "../config/settings.h" -#include "../boot2/debug.h" +#ifdef REVOBOOT_VERSION_INFO + #include "../boot2/debug.h" +#endif typedef void VOID; From 5f449594f8ab127b025d4b5912bc272e0b8dbac3 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 21 Nov 2012 14:04:16 +0100 Subject: [PATCH 183/623] Removed unused functions --- i386/libsaio/saio_internal.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/i386/libsaio/saio_internal.h b/i386/libsaio/saio_internal.h index dd637ee..597185c 100755 --- a/i386/libsaio/saio_internal.h +++ b/i386/libsaio/saio_internal.h @@ -26,6 +26,7 @@ * - loadBinaryData(load.c) and toLowerCase(string.c) added (PikerAlpha, October 2012). * - Tidied up (spaces -> tabs) (PikerAlpha, October 2012). * - decodeQuantum and base64Decode added (PikerAlpha, October 2012). + * - Removed unused functions (PikerAlpha, October 2012). * */ @@ -139,20 +140,18 @@ extern void enableA20(void); /* stringTable.c */ +extern void decodeQuantum(const char *input, unsigned char *output); +extern int base64Decode(const char *input, unsigned char *decodedData); + extern bool getValueForConfigTableKey(config_file_t *config, const char *key, const char **val, int *size); extern char * newStringForKey(char *key, config_file_t *configBuff); extern bool getValueForBootKey(const char *line, const char *match, const char **matchval, int *len); extern bool getValueForKey(const char *key, const char **val, int *size, config_file_t *configBuff); extern bool getBoolForKey(const char *key, bool *val, config_file_t *configBuff); extern bool getIntForKey(const char *key, int *val, config_file_t *configBuff); -extern int loadConfigFile(const char *configFile, config_file_t *configBuff); -extern int loadSystemConfig(config_file_t *configBuff); -extern int loadHelperConfig(config_file_t *configBuff); -extern int loadOverrideConfig(config_file_t *configBuff); +extern bool loadConfigFile(const char *configFile, config_file_t *configBuff); extern char * getNextArg(char ** ptr, char * val); extern long ParseXMLFile(char * buffer, TagPtr * dict); -extern void decodeQuantum(const char *input, unsigned char *output); -extern int base64Decode(const char *input, unsigned char *decodedData); /* sys.c */ From f2ad5a68a2f1c917055991e2af5f756113b46f7d Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 21 Nov 2012 14:08:56 +0100 Subject: [PATCH 184/623] Oops we need loadSystemConfig() --- i386/libsaio/saio_internal.h | 1 + 1 file changed, 1 insertion(+) diff --git a/i386/libsaio/saio_internal.h b/i386/libsaio/saio_internal.h index 597185c..576daf0 100755 --- a/i386/libsaio/saio_internal.h +++ b/i386/libsaio/saio_internal.h @@ -150,6 +150,7 @@ extern bool getValueForKey(const char *key, const char **val, int *size, config extern bool getBoolForKey(const char *key, bool *val, config_file_t *configBuff); extern bool getIntForKey(const char *key, int *val, config_file_t *configBuff); extern bool loadConfigFile(const char *configFile, config_file_t *configBuff); +extern int loadSystemConfig(config_file_t *configBuff); extern char * getNextArg(char ** ptr, char * val); extern long ParseXMLFile(char * buffer, TagPtr * dict); From e1a433e3f12c0417ba649019e26925062585b2c2 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 21 Nov 2012 14:09:39 +0100 Subject: [PATCH 185/623] Fixing a compiler error --- i386/libsaio/efi/essentials.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/efi/essentials.h b/i386/libsaio/efi/essentials.h index c4067f9..9ab523c 100755 --- a/i386/libsaio/efi/essentials.h +++ b/i386/libsaio/efi/essentials.h @@ -31,7 +31,7 @@ #ifndef __LIBSAIO_EFI_ESSENTIALS_H #define __LIBSAIO_EFI_ESSENTIALS_H -#ifdef REVOBOOT_VERSION_INFO +#ifdef TARGET_MODEL #include "../boot2/debug.h" #endif From e9a1223dc9d7170285dc82ab057cbc6e2a9fb329 Mon Sep 17 00:00:00 2001 From: Dave Griffin <davegriffin@stainedglass1.plus.com> Date: Wed, 21 Nov 2012 19:27:27 +0000 Subject: [PATCH 186/623] Commit base64.c --- i386/libsaio/base64.c | 293 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 293 insertions(+) create mode 100755 i386/libsaio/base64.c diff --git a/i386/libsaio/base64.c b/i386/libsaio/base64.c new file mode 100755 index 0000000..4b4fbe6 --- /dev/null +++ b/i386/libsaio/base64.c @@ -0,0 +1,293 @@ +/* + * + * Name : guidTest.c + * Version : 0.3 + * Type : Command line test tool + * Copyright : Sam aka RevoGirl (c) 18 March 2011 + * + * Compile with : cc base64.c -o base64 -Wall -framework IOKit -framework CoreFoundation + * + * See also : http://www.projectosx.com/forum/index.php?showtopic=2008&st=120&p=13378&#entry13378 + * + * Updates - guidTest.c included as RevoBootr/i386/libsaio/base64.c (PikerAlpha, November 2012) + * - DEBUG renamed to DEBUG_BASE64_DECODE (PikerAlpha, November 2012) + * - STAND_ALONE check added (PikerAlpha, November 2012) + * - Workaround for "___bzero" undefined error in RevoBoot (PikerAlpha, November 2012) + * - base64Charset moved to function decodeQuantum (PikerAlpha, November 2012) + * + */ + +#ifdef REVOBOOT_VERSION_INFO + #define STAND_ALONE 0 +#else + #define STAND_ALONE 1 +#endif + +#if STAND_ALONE + #include <IOKit/IOKitLib.h> + #include <CoreFoundation/CoreFoundation.h> +#else + #include "libsaio.h" +#endif + +#define DEBUG_BASE64_DECODE 1 + +#if DEBUG_BASE64_DECODE + int quickLookups = 0; +#endif + +#define PADDINGCHAR '=' + +#define TABLELEN 64 + + +//============================================================================== + +void decodeQuantum(const char *input, unsigned char *output) +{ +#if DEBUG_BASE64_DECODE + bool found = false; +#endif + int j = 0; + + unsigned int x = 0; // We need a 32 bit wide variable for pur bit shifting. + + const char * base64Charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + for (int i = 0; i < 4; i++) + { +#if DEBUG_BASE64_DECODE + found = false; +#endif + if (input[i] == PADDINGCHAR) + { + x = (x << 6); +#if DEBUG_BASE64_DECODE + found = true; +#endif + } + else if (input[(i - 1)] == input[i]) // Same character as last one? + { +#if DEBUG_BASE64_DECODE + found = true; + quickLookups++; +#endif + x = (x << 6) + j; + } + else // Dig for target character. + { + for (j = 0; j < TABLELEN; j++) + { + if (base64Charset[j] == input[i]) + { + x = (x << 6) + j; +#if DEBUG_BASE64_DECODE + found = true; +#endif + break; + } + } + } + } +#if DEBUG_BASE64_DECODE + if (!found) + { + printf("ERROR\n"); + } +#endif + + output[2] = x; + output[1] = (x >>= 8); + output[0] = (x >>= 8); +} + + +//============================================================================== + +int base64Decode(const char *input, unsigned char *decodedData) +{ + int i = 0; + int j = 0; + int numQuantums = 0; + int paddingChars = 0; + + size_t bytes = 0; + size_t length = 0; + + // These will be initialized later on + unsigned char *buffer = NULL; + unsigned char *bufferStart = NULL; + unsigned char *lastQuantum = NULL; + + while ((input[length] != PADDINGCHAR) && input[length]) + { + length++; + } + + // A maximum of two padding characters is allowed. + if (input[length] == PADDINGCHAR) + { + paddingChars++; + + if (input[length + paddingChars] == PADDINGCHAR) + { + paddingChars++; + } + } + + numQuantums = ((length + paddingChars) / 4); + +#if DEBUG_BASE64_DECODE + printf("\nnumQuantums: %d\n\n", numQuantums); +#endif + + // Is there anything to decode? + if (numQuantums) + { + buffer = malloc(numQuantums * 3); + + if (buffer) + { + bufferStart = buffer; + lastQuantum = (unsigned char *)malloc(4); + + while (*input) + { + // Decode all but the last quantum (which may not decode to a multiple of 3 bytes). + for (i = 0; i < (numQuantums - 1); i++) + { + decodeQuantum(input, buffer); +#if DEBUG_BASE64_DECODE + printf("%2ld : %02x %02x %02x\n", (bytes / 3), *buffer++, *buffer++, *buffer++); +#else + buffer += 3; +#endif + input += 4; + bytes += 3; + } + + // The final decoding phase. + decodeQuantum(input, lastQuantum); + + for (j = 0; j < (3 - paddingChars); j++) + { + buffer[j] = lastQuantum[j]; + bytes++; + } + + input += 4; +#if DEBUG_BASE64_DECODE + printf("%2ld : %02x %02x %02x\n", (bytes / 3), lastQuantum[0], lastQuantum[1], lastQuantum[2]); +#endif + buffer[(numQuantums * 3)] = 0xAA; + } + + free (lastQuantum); + + if ((decodedData = memcpy(decodedData, bufferStart, bytes)) != NULL) + { +#if DEBUG_BASE64_DECODE + printf("\nSuccesfully copied %zd bytes\n", bytes); +#endif + } + } + } + +#if DEBUG_BASE64_DECODE + printf("\nbuffer: %ld bytes (0 - %d)\n", bytes, (numQuantums - 1)); +#endif + + return bytes; +} + + +#if STAND_ALONE +//============================================================================== + +#define BUFFFERLEN 128 + +#include "efi/essentials.h" + + +void *getGUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath) +{ + char * guid = NULL; + + if (devicePath != NULL) + { + while (!IsDevicePathEndType(devicePath) && + !(DevicePathType(devicePath) == MEDIA_DEVICE_PATH && DevicePathSubType(devicePath) == MEDIA_HARDDRIVE_DP)) + { + devicePath = NextDevicePathNode(devicePath); + } + + if (DevicePathType(devicePath) == MEDIA_DEVICE_PATH && DevicePathSubType(devicePath) == MEDIA_HARDDRIVE_DP) + { + HARDDRIVE_DEVICE_PATH * HDDevicePath = (HARDDRIVE_DEVICE_PATH *) devicePath; + + if (HDDevicePath->SignatureType == SIGNATURE_TYPE_GUID) // 0x02 + { + EFI_GUID * uuid = (EFI_GUID*)HDDevicePath->Signature; + + guid = (void *)malloc(37); + + // Function efi_guid_unparse_upper() in efi/efi_tables.c + sprintf(guid, "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", + uuid->Data1, + uuid->Data2, + uuid->Data3, + uuid->Data4[0], uuid->Data4[1], + uuid->Data4[2], uuid->Data4[3], + uuid->Data4[4], uuid->Data4[5], + uuid->Data4[6], uuid->Data4[7]); + } + } + } + + return guid; +} + +//============================================================================== + +int main(void) +{ + // Test example: DE91E8DA-30B6-4B11-B8DC-76DC067BB57A (taken from a Macmini) + + const char * input = "AgEMANBBAwoAAAAAAQEGAAIfAxIKAAIAAAAAAAQBKgACAAAAKEAGAAAAAABASyklAAAAANrokd62MBFLuNx23AZ7tXoCAn//BAA="; + + // 02 01 0c 00 d0 41 03 0a 00 00 00 00 + // 01 01 06 00 02 1f 03 12 0a 00 02 00 00 00 00 00 + // 04 01 2a 00 02 00 00 00 28 40 06 00 00 00 00 00 40 4b 29 25 00 00 00 00 da e8 91 de b6 30 11 4b b8 dc 76 dc 06 7b b5 7a 02 02 + // 7f ff 04 00 + + int len = ((strlen(input) / 4) * 3); + + unsigned char * decodedData = malloc(len); + + // Fill buffer with 0xdd (making errors visible) + for (int i = 0; i <= len; i++) + { + decodedData[i] = 0xdd; + } + + int rc = base64Decode(input, decodedData); + + // This of course should never happen + if ((rc == 0) || (decodedData == NULL)) + { + printf("FAIL\n"); + } + +#if DEBUG_BASE64_DECODE + printf("\nquickLookups: %d\n\n", quickLookups); +#endif + + EFI_DEVICE_PATH_PROTOCOL * dp = (EFI_DEVICE_PATH_PROTOCOL *) decodedData; + + void * guid = getGUIDFromDevicePath(dp); + + printf("GUID: %s\n", guid); + + exit(0); +} +#endif // #if STAND_ALONE From 9ea4294e370dde59cc54830358f6b32dc7da908e Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 24 Nov 2012 14:11:52 +0100 Subject: [PATCH 187/623] Cleanups/adding note --- i386/libsaio/xml.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/i386/libsaio/xml.c b/i386/libsaio/xml.c index 9de00d4..79ae65d 100755 --- a/i386/libsaio/xml.c +++ b/i386/libsaio/xml.c @@ -23,7 +23,7 @@ * * Updates: * - Cleanups, white space and layout changes (PikerAlpha, November 2012) - * - New/improved kXMLTagData support (PikerAlpha, November 2012) + * - New/improved kXMLTagData support (PikerAlpha, November 2012) * */ @@ -354,7 +354,7 @@ static long ParseTagKey(char * buffer, TagPtr * tag) } } - return length; // -1; + return length; } @@ -388,7 +388,7 @@ static long ParseTagString(char * buffer, TagPtr * tag) } } - return length; // -1; + return length; } @@ -415,7 +415,7 @@ static long ParseTagInteger(char * buffer, TagPtr * tag) } } - return length; // -1 + return length; } @@ -434,8 +434,13 @@ static long ParseTagData(char * buffer, TagPtr * tag) char * string = NewSymbol(buffer); tmpTag->type = kTagTypeData; + /* + * We don't strip layout character and/or decode the data at this + * point. We do that later on, and only the data fields that we are + * interested in. Not all of them, because that would slow us down. + */ tmpTag->string = string; - tmpTag->tag = 0; + tmpTag->tag = 0; tmpTag->tagNext = 0; *tag = tmpTag; @@ -464,12 +469,10 @@ static long ParseTagDate(char * buffer, TagPtr * tag) tmpTag->tagNext = 0; *tag = tmpTag; - - return length; } } - return -1; + return length; } From 5a591e4b2fd12a60b1e1ffa53ecb3f73f09d05ea Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 24 Nov 2012 14:14:03 +0100 Subject: [PATCH 188/623] Length and character checking added --- i386/libsaio/base64.c | 349 ++++++++++++++++++++++++++---------------- 1 file changed, 215 insertions(+), 134 deletions(-) diff --git a/i386/libsaio/base64.c b/i386/libsaio/base64.c index 4b4fbe6..197bc77 100755 --- a/i386/libsaio/base64.c +++ b/i386/libsaio/base64.c @@ -1,7 +1,7 @@ /* * * Name : guidTest.c - * Version : 0.3 + * Version : 0.4 * Type : Command line test tool * Copyright : Sam aka RevoGirl (c) 18 March 2011 * @@ -14,13 +14,14 @@ * - STAND_ALONE check added (PikerAlpha, November 2012) * - Workaround for "___bzero" undefined error in RevoBoot (PikerAlpha, November 2012) * - base64Charset moved to function decodeQuantum (PikerAlpha, November 2012) + * - Length and character checking added (PikerAlpha, November 2012) * */ #ifdef REVOBOOT_VERSION_INFO - #define STAND_ALONE 0 + #define STAND_ALONE 0 #else - #define STAND_ALONE 1 + #define STAND_ALONE 1 #endif #if STAND_ALONE @@ -30,46 +31,160 @@ #include "libsaio.h" #endif -#define DEBUG_BASE64_DECODE 1 +#define DEBUG_BASE64_DECODE 0 + +#define FULL_BASE64_DATA_CHECK 0 #if DEBUG_BASE64_DECODE int quickLookups = 0; #endif -#define PADDINGCHAR '=' +#define PADDINGCHAR '=' // 61 - 0x3d -#define TABLELEN 64 +#define TABLELEN 64 //============================================================================== +// Helper function for base64Decode -void decodeQuantum(const char *input, unsigned char *output) +bool validBase64Length(char * aDataPtr) { + size_t length = (strlen(aDataPtr) - 1); + + if (length && (length % 4)) + { + return true; + } + + return false; +} + + +//============================================================================== +// Helper function for base64Decode + +char *cleanupBase64Data(char *aDataPtr) +{ + int index = 0; #if DEBUG_BASE64_DECODE - bool found = false; + int junkChars = 0; #endif - int j = 0; - unsigned int x = 0; // We need a 32 bit wide variable for pur bit shifting. + size_t length = strlen(aDataPtr); - const char * base64Charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + char *cleanedUpData = malloc(length); + bzero(cleanedUpData, length); - for (int i = 0; i < 4; i++) + // Main loop + while (*aDataPtr) + { + /* + * This check acts as a first pass filter. Its purpose is to strip invalid + * characters from the base64 encoded data, but we are mainly using it to + * get rid of the layout enhancement characters (think line feeds and tabs). + */ + if (*aDataPtr > 42 && *aDataPtr < 123) + { +#if FULL_BASE64_DATA_CHECK + /* + * Additional checking is normally not required, but may help people + * getting past messed up plist data fields (think hand editing). + */ + if (*aDataPtr > 43 && *aDataPtr < 47) // ,-. + { + aDataPtr++; +#if DEBUG_BASE64_DECODE + junkChars++; +#endif + } + else if (*aDataPtr > 57 && *aDataPtr < 65) // :'<=>?@ + { + if (*aDataPtr == PADDINGCHAR) + { + cleanedUpData[index++] = *aDataPtr; +#if DEBUG_BASE64_DECODE + printf("%c", cleanedUpData[length]); +#endif + } + else + { + aDataPtr++; +#if DEBUG_BASE64_DECODE + junkChars++; +#endif + } + } + else if (*aDataPtr > 90 && *aDataPtr < 97) // [\]^_` + { + aDataPtr++; +#if DEBUG_BASE64_DECODE + junkChars++; +#endif + } + else + { +#endif + cleanedUpData[index++] = *aDataPtr; +#if DEBUG_BASE64_DECODE + printf("%c", cleanedUpData[index]); +#endif +#if FULL_BASE64_DATA_CHECK + } +#endif + } +#if DEBUG_BASE64_DECODE + else + { + junkChars++; + } +#endif + aDataPtr++; + } + + cleanedUpData[index] = 0; + +#if DEBUG_BASE64_DECODE + printf("\njunkChars : %d\n", junkChars); + + length = strlen(cleanedUpData); + + for (int i = 0; i < length; i++) { + printf("%c", cleanedUpData[i]); + } +#endif + + return cleanedUpData; +} + + +//============================================================================== +// Helper function for base64Decode + +void decodeQuantum(char *input, unsigned char *output) +{ + int j = 0; #if DEBUG_BASE64_DECODE - found = false; + int found = 0; #endif + + unsigned int x = 0; // We need a 32 bit wide variable for our bit shifting. + + const char * base64Charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + for (int i = 0; i < 4; i++) + { if (input[i] == PADDINGCHAR) { x = (x << 6); #if DEBUG_BASE64_DECODE - found = true; + found++; #endif } else if (input[(i - 1)] == input[i]) // Same character as last one? { #if DEBUG_BASE64_DECODE - found = true; + found++; quickLookups++; #endif x = (x << 6) + j; @@ -82,7 +197,7 @@ void decodeQuantum(const char *input, unsigned char *output) { x = (x << 6) + j; #if DEBUG_BASE64_DECODE - found = true; + found++; #endif break; } @@ -90,12 +205,12 @@ void decodeQuantum(const char *input, unsigned char *output) } } #if DEBUG_BASE64_DECODE - if (!found) + if (found < 4) { - printf("ERROR\n"); + printf("ERROR "); } #endif - + output[2] = x; output[1] = (x >>= 8); output[0] = (x >>= 8); @@ -103,98 +218,52 @@ void decodeQuantum(const char *input, unsigned char *output) //============================================================================== - -int base64Decode(const char *input, unsigned char *decodedData) -{ - int i = 0; - int j = 0; - int numQuantums = 0; - int paddingChars = 0; - - size_t bytes = 0; - size_t length = 0; - // These will be initialized later on - unsigned char *buffer = NULL; - unsigned char *bufferStart = NULL; - unsigned char *lastQuantum = NULL; - - while ((input[length] != PADDINGCHAR) && input[length]) - { - length++; - } +int base64Decode(char *input, unsigned char **decodedData) +{ + size_t bytes = 0; - // A maximum of two padding characters is allowed. - if (input[length] == PADDINGCHAR) + unsigned char *buffer = NULL; + + input = cleanupBase64Data(input); + + if (validBase64Length(input)) { - paddingChars++; - - if (input[length + paddingChars] == PADDINGCHAR) + int numQuantums = (strlen(input) / 4); + + if (numQuantums) { - paddingChars++; - } - } - - numQuantums = ((length + paddingChars) / 4); - #if DEBUG_BASE64_DECODE - printf("\nnumQuantums: %d\n\n", numQuantums); + printf("\nnumQuantums : %d\n\n", numQuantums); #endif + buffer = (unsigned char *)malloc(numQuantums * 3); - // Is there anything to decode? - if (numQuantums) - { - buffer = malloc(numQuantums * 3); - - if (buffer) - { - bufferStart = buffer; - lastQuantum = (unsigned char *)malloc(4); - - while (*input) + if (buffer) { - // Decode all but the last quantum (which may not decode to a multiple of 3 bytes). - for (i = 0; i < (numQuantums - 1); i++) + *decodedData = buffer; + + while (bytes < (numQuantums / 3)) { - decodeQuantum(input, buffer); + for (int i = 0; i < numQuantums; i++) + { + decodeQuantum(input, buffer); #if DEBUG_BASE64_DECODE - printf("%2ld : %02x %02x %02x\n", (bytes / 3), *buffer++, *buffer++, *buffer++); + printf("%2ld : %02x %02x %02x\n", (bytes / 3), *buffer++, *buffer++, *buffer++); #else - buffer += 3; + buffer += 3; #endif - input += 4; - bytes += 3; + input += 4; + bytes += 3; + } } - - // The final decoding phase. - decodeQuantum(input, lastQuantum); - - for (j = 0; j < (3 - paddingChars); j++) - { - buffer[j] = lastQuantum[j]; - bytes++; - } - - input += 4; -#if DEBUG_BASE64_DECODE - printf("%2ld : %02x %02x %02x\n", (bytes / 3), lastQuantum[0], lastQuantum[1], lastQuantum[2]); -#endif - buffer[(numQuantums * 3)] = 0xAA; - } - - free (lastQuantum); - - if ((decodedData = memcpy(decodedData, bufferStart, bytes)) != NULL) - { -#if DEBUG_BASE64_DECODE - printf("\nSuccesfully copied %zd bytes\n", bytes); -#endif } } } - #if DEBUG_BASE64_DECODE - printf("\nbuffer: %ld bytes (0 - %d)\n", bytes, (numQuantums - 1)); + else + { + printf("\nError: Invalid length of base64 data!\n"); + } #endif return bytes; @@ -204,14 +273,11 @@ int base64Decode(const char *input, unsigned char *decodedData) #if STAND_ALONE //============================================================================== -#define BUFFFERLEN 128 - #include "efi/essentials.h" - -void *getGUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath) +void *getUUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath) { - char * guid = NULL; + char * uuid = NULL; if (devicePath != NULL) { @@ -227,24 +293,55 @@ void *getGUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath) if (HDDevicePath->SignatureType == SIGNATURE_TYPE_GUID) // 0x02 { - EFI_GUID * uuid = (EFI_GUID*)HDDevicePath->Signature; + EFI_GUID * guid = (EFI_GUID*)HDDevicePath->Signature; - guid = (void *)malloc(37); + uuid = (void *)malloc(37); // Function efi_guid_unparse_upper() in efi/efi_tables.c - sprintf(guid, "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", - uuid->Data1, - uuid->Data2, - uuid->Data3, - uuid->Data4[0], uuid->Data4[1], - uuid->Data4[2], uuid->Data4[3], - uuid->Data4[4], uuid->Data4[5], - uuid->Data4[6], uuid->Data4[7]); + sprintf(uuid, "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", + guid->Data1, + guid->Data2, + guid->Data3, + guid->Data4[0], guid->Data4[1], + guid->Data4[2], guid->Data4[3], + guid->Data4[4], guid->Data4[5], + guid->Data4[6], guid->Data4[7]); } } } - return guid; + return uuid; +} + + +//============================================================================== +// Used in RevoBoot/i386/boot2/boot.c + +char * getStartupDiskUUID(char * aDataPtr) +{ + char * targetDiskUUID = NULL; + + unsigned char * decodedData = NULL; + + int rc = base64Decode(aDataPtr, &decodedData); + + if ((rc == 75) && (decodedData != NULL)) + { + EFI_DEVICE_PATH_PROTOCOL * dp = (EFI_DEVICE_PATH_PROTOCOL *) decodedData; + + char * uuid = getUUIDFromDevicePath(dp); + + if (uuid) + { + targetDiskUUID = uuid; + } + + dp = NULL; + } + + free(decodedData); + + return targetDiskUUID; } //============================================================================== @@ -253,40 +350,24 @@ int main(void) { // Test example: DE91E8DA-30B6-4B11-B8DC-76DC067BB57A (taken from a Macmini) - const char * input = "AgEMANBBAwoAAAAAAQEGAAIfAxIKAAIAAAAAAAQBKgACAAAAKEAGAAAAAABASyklAAAAANrokd62MBFLuNx23AZ7tXoCAn//BAA="; + char * input = " AgEMANBBAwoAAAAAAQEGAAIfA\n\r\t\ + xIKAAIAAAAAAAQBKgACAAAAKE\n\v\ + AGAAAAAABASyklAAAAANrokd6\n\ + 2MBFLuNx23AZ7tXoCAn//BAA="; // 02 01 0c 00 d0 41 03 0a 00 00 00 00 // 01 01 06 00 02 1f 03 12 0a 00 02 00 00 00 00 00 // 04 01 2a 00 02 00 00 00 28 40 06 00 00 00 00 00 40 4b 29 25 00 00 00 00 da e8 91 de b6 30 11 4b b8 dc 76 dc 06 7b b5 7a 02 02 // 7f ff 04 00 - int len = ((strlen(input) / 4) * 3); - - unsigned char * decodedData = malloc(len); - - // Fill buffer with 0xdd (making errors visible) - for (int i = 0; i <= len; i++) - { - decodedData[i] = 0xdd; - } - - int rc = base64Decode(input, decodedData); + char * uuid = getStartupDiskUUID(input); - // This of course should never happen - if ((rc == 0) || (decodedData == NULL)) + if (uuid) { - printf("FAIL\n"); - } - #if DEBUG_BASE64_DECODE - printf("\nquickLookups: %d\n\n", quickLookups); + printf("\nUUID: %s\n", uuid); #endif - - EFI_DEVICE_PATH_PROTOCOL * dp = (EFI_DEVICE_PATH_PROTOCOL *) decodedData; - - void * guid = getGUIDFromDevicePath(dp); - - printf("GUID: %s\n", guid); + } exit(0); } From 231b51d0c626b3d497d06e600b7dab6d02926555 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 24 Nov 2012 14:15:42 +0100 Subject: [PATCH 189/623] Cleanups --- i386/libsaio/saio_internal.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/i386/libsaio/saio_internal.h b/i386/libsaio/saio_internal.h index 576daf0..c5553e6 100755 --- a/i386/libsaio/saio_internal.h +++ b/i386/libsaio/saio_internal.h @@ -23,10 +23,8 @@ * * Updates: * - * - loadBinaryData(load.c) and toLowerCase(string.c) added (PikerAlpha, October 2012). + * - loadBinaryData(load.c) and toLowerCase(string.c) added (PikerAlpha, October 2012). * - Tidied up (spaces -> tabs) (PikerAlpha, October 2012). - * - decodeQuantum and base64Decode added (PikerAlpha, October 2012). - * - Removed unused functions (PikerAlpha, October 2012). * */ @@ -34,6 +32,8 @@ #define __LIBSAIO_SAIO_INTERNAL_H #include "saio_types.h" +#include "efi/essentials.h" + /* asm.s */ extern void real_to_prot(void); @@ -117,6 +117,14 @@ extern void turnOffFloppy(void); extern int testFAT32EFIBootSector(int biosdev, unsigned int secno, void * buffer); +/* guid.c */ +extern void convertEFIGUIDToString(EFI_GUID const *aGuid, char *out); +extern bool isEFIGUIDNull(EFI_GUID const *aGuid); +extern int compareEFIGUID(EFI_GUID const *pG1, EFI_GUID const *pG2); +extern char *getUUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath); +extern char * getStartupDiskUUID(char * aDataPtr); + + /* hfs_compare.c */ extern int32_t FastUnicodeCompare(u_int16_t *uniStr1, u_int32_t len1, u_int16_t *uniStr2, u_int32_t len2); extern void utf_encodestr(const u_int16_t * ucsp, int ucslen, u_int8_t * utf8p, u_int32_t bufsize); @@ -140,8 +148,7 @@ extern void enableA20(void); /* stringTable.c */ -extern void decodeQuantum(const char *input, unsigned char *output); -extern int base64Decode(const char *input, unsigned char *decodedData); +extern int base64Decode(char *input, unsigned char **decodedData); extern bool getValueForConfigTableKey(config_file_t *config, const char *key, const char **val, int *size); extern char * newStringForKey(char *key, config_file_t *configBuff); @@ -150,7 +157,7 @@ extern bool getValueForKey(const char *key, const char **val, int *size, config extern bool getBoolForKey(const char *key, bool *val, config_file_t *configBuff); extern bool getIntForKey(const char *key, int *val, config_file_t *configBuff); extern bool loadConfigFile(const char *configFile, config_file_t *configBuff); -extern int loadSystemConfig(config_file_t *configBuff); +extern int loadSystemConfig(config_file_t *configBuff); extern char * getNextArg(char ** ptr, char * val); extern long ParseXMLFile(char * buffer, TagPtr * dict); From 52914ccfc99c027607ca537bacde69ded7816d65 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 24 Nov 2012 14:17:29 +0100 Subject: [PATCH 190/623] Cleanups --- i386/boot2/boot.c | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index a863d16..763f3ee 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -218,9 +218,7 @@ void boot(int biosdev) initPartitionChain(); #endif -#define DISK_TARGET_EXPERIMENT 0 - -#if DISK_TARGET_EXPERIMENT +#if DISK_TARGET_SUPPORT config_file_t nvramStorage; const char * path = "/Extra/NVRAM/nvramStorage.plist"; @@ -232,19 +230,10 @@ void boot(int biosdev) { _BOOT_DEBUG_DUMP("Key 'efi-boot-device-data' located %d\n", length); - int len = ((length / 4) * 3); - unsigned char * decodedData = (unsigned char *)malloc(len); - int rc = base64Decode(val, decodedData); + char * uuid = getStartupDiskUUID((char *)val); - if (rc && decodedData) + if (uuid) { - EFI_DEVICE_PATH_PROTOCOL * dp = (EFI_DEVICE_PATH_PROTOCOL *) decodedData; - - // FIXME: This doesn't belong here! - extern void *getGUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath); - - void * uuid = getGUIDFromDevicePath(dp); - _BOOT_DEBUG_DUMP("GUID: %s\n", uuid); _BOOT_DEBUG_SLEEP(1); @@ -256,7 +245,7 @@ void boot(int biosdev) { _BOOT_DEBUG_DUMP("Warning: unable to locate nvramStorage.plist\n"); } -#endif // #if DISK_TARGET_EXPERIMENT +#endif // #if DISK_TARGET_SUPPORT #define loadCABootPlist() loadSystemConfig(&bootInfo->bootConfig) @@ -297,9 +286,9 @@ void boot(int biosdev) if (gVerboseMode) { -/*#if DEBUG_BOOT == false +#if (DEBUG_BOOT == false) setVideoMode(VGA_TEXT_MODE); -#endif*/ +#endif } // Check for -x (safe) and -f (flush cache) flags. @@ -310,18 +299,13 @@ void boot(int biosdev) } // Is 'boot-uuid=<value>' specified as kernel flag? - if (getValueForBootKey(kernelFlags, kBootUUIDKey, &val, &length) && length == 36) + if (!rootUUID && (getValueForBootKey(kernelFlags, kBootUUIDKey, &val, &length) && length == 36)) { _BOOT_DEBUG_DUMP("Target boot-uuid=<%s>\n", val); // Yes. Copy its value into rootUUID. strlcpy(rootUUID, val, 37); } - /* else - { - strlcpy(rootUUID, "3453E0E5-017B-38AD-A0AA-D0BBD8565D6", 37); - _BOOT_DEBUG_DUMP("Target boot-uuid=<%s>\n", rootUUID); - } */ } } From e5b03bc9ca29333eb61adfe729b5e1eeaa2c2bdb Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 24 Nov 2012 14:18:54 +0100 Subject: [PATCH 191/623] Updating version info for RevoBoot v1.5.36 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index ff4e38d..599410a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.35 +1.5.36 From 2fc959cc0ff0ff560b9b8d4cab9e31273fcc6bca Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 24 Nov 2012 14:20:57 +0100 Subject: [PATCH 192/623] Option DISK_TARGET_SUPPORT added --- i386/config/settings-template.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 1136591..1cda489 100644 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -1,7 +1,7 @@ /* * Copyright (c) 2009 Master Chief. All rights reserved. * - * Note: This is an essential part of the build process for RevoBoot v1.5.35 and greater. + * Note: This is an essential part of the build process for RevoBoot v1.5.36 and greater. * * Updates: * @@ -27,6 +27,7 @@ * - LOAD_STATIC_SMBIOS_DATA_FROM_EXTRA renamed to LOAD_MODEL_SPECIFIC_SMBIOS_DATA (PikerAlpha, October 2012). * - LOAD_MODEL_SPECIFIC_STATIC_DATA added (PikerAlpha, October 2012). * - Option SET_MAX_STRUCTURE_LENGTH added (PikerAlpha, November 2012). + * - Option DISK_TARGET_SUPPORT added (PikerAlpha, November 2012). */ @@ -209,6 +210,8 @@ #define LION_RECOVERY_SUPPORT 0 // Set to 0 by default. Change this to 1 to make RevoBoot search for the 'Recovery HD' // partition and, when available, boot from it. +#define DISK_TARGET_SUPPORT 1 // Set to 0 by default. Change this to 1 for System Preference/Startup Disk support. + #define DEBUG_BOOT 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. From f91061b1eb96bf2f06dd2f2c52a982b41331ba6e Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 24 Nov 2012 14:22:34 +0100 Subject: [PATCH 193/623] DISK_TARGET_SUPPORT -> 0 (default value) --- i386/config/settings-template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 1cda489..86c7969 100644 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -210,7 +210,7 @@ #define LION_RECOVERY_SUPPORT 0 // Set to 0 by default. Change this to 1 to make RevoBoot search for the 'Recovery HD' // partition and, when available, boot from it. -#define DISK_TARGET_SUPPORT 1 // Set to 0 by default. Change this to 1 for System Preference/Startup Disk support. +#define DISK_TARGET_SUPPORT 0 // Set to 0 by default. Change this to 1 for System Preference/Startup Disk support. #define DEBUG_BOOT 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. From 50daf06a4467bf41b10fe00a047a7fe9bea94678 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 24 Nov 2012 14:32:08 +0100 Subject: [PATCH 194/623] Updating file for RevoBoot v1.5.36 --- i386/libsa/efi_tables.c | 126 +++++++++++++++++++++++----------------- 1 file changed, 73 insertions(+), 53 deletions(-) diff --git a/i386/libsa/efi_tables.c b/i386/libsa/efi_tables.c index fc7b132..6f1569d 100755 --- a/i386/libsa/efi_tables.c +++ b/i386/libsa/efi_tables.c @@ -1,15 +1,4 @@ -/*! @file efi_tables.c - Copyright 2007 David F. Elliott. All rights reserved. - */ -#include "libsa.h" -#include "efi_tables.h" - - -/*========================================================================== - * CRC32 implementation copied from xnu in turn copied from Gary S. Brown. - */ - -/*- +/* * COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or * code or tables extracted from it, as desired without restriction. * @@ -47,11 +36,16 @@ * using byte-swap instructions * polynomial $edb88320 * + * Updates: + * - All but crc32 code moved to guid.c (PikerAlpha, November 2012) + * - File renamed from efi_tables.c to crc32.c (PikerAlpha, November 2012) + * - Copyright restored to original developer (PikerAlpha, November 2012) * - * CRC32 code derived from work by Gary S. Brown. */ -static uint32_t crc32_tab[] = +#include "libsaio.h" + +static uint32_t crc32Table[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, @@ -110,7 +104,7 @@ uint32_t crc32(uint32_t crc, const void *buf, size_t size) while (size--) { - crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8); + crc = crc32Table[(crc ^ *p++) & 0xFF] ^ (crc >> 8); } return crc ^ ~0U; @@ -121,72 +115,73 @@ uint32_t crc32(uint32_t crc, const void *buf, size_t size) * Utility function to make a device tree string from an EFI_GUID * * FIXME: Everything below this line should be moved to: guid.c - * - *========================================================================*/ + */ -void efi_guid_unparse_upper(EFI_GUID const *pGuid, char *out) + +//========================================================================== +// Used in RevoBoot/i386/libsaio/disk.c + +void convertEFIGUIDToString(EFI_GUID const *aGuid, char *out) { sprintf(out, "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", - pGuid->Data1, /* - */ - pGuid->Data2, /* - */ - pGuid->Data3, /* - */ - pGuid->Data4[0], pGuid->Data4[1], /* - */ - pGuid->Data4[2], pGuid->Data4[3], - pGuid->Data4[4], pGuid->Data4[5], - pGuid->Data4[6], pGuid->Data4[7]); + aGuid->Data1, /* - */ + aGuid->Data2, /* - */ + aGuid->Data3, /* - */ + aGuid->Data4[0], aGuid->Data4[1], /* - */ + aGuid->Data4[2], aGuid->Data4[3], + aGuid->Data4[4], aGuid->Data4[5], + aGuid->Data4[6], aGuid->Data4[7]); } //========================================================================== - -bool efi_guid_is_null(EFI_GUID const *pGuid) +// Used in RevoBoot/i386/libsaio/disk.c + +bool isEFIGUIDNull(EFI_GUID const *aGuid) { - if (pGuid->Data1 == 0 && pGuid->Data2 == 0 && pGuid->Data3 == 0) + if (aGuid->Data1 == 0 && aGuid->Data2 == 0 && aGuid->Data3 == 0) { - int i; - - for (i = 0; i < 8; ++i) + for (int i = 0; i < 8; ++i) { - if (pGuid->Data4[i] != 0) + if (aGuid->Data4[i] != 0) { return false; } } - + return true; } - + return false; } -#define COMPARE_MEMBER_AND_RETURN_IF_NE(a,b,mem) \ - if( ((a)->mem) < ((b)->mem) ) \ - return -1; \ - else if( ((a)->mem) > ((b)->mem) ) \ - return 1; //========================================================================= +// Used in RevoBoot/i386/libsaio/disk.c -int efi_guid_compare(EFI_GUID const *pG1, EFI_GUID const *pG2) +int compareEFIGUID(EFI_GUID const *aSourceGuid, EFI_GUID const *aCompareGuid) { - COMPARE_MEMBER_AND_RETURN_IF_NE(pG1, pG2, Data1); - COMPARE_MEMBER_AND_RETURN_IF_NE(pG1, pG2, Data2); - COMPARE_MEMBER_AND_RETURN_IF_NE(pG1, pG2, Data3); - - int i; - - for(i = 0; i < 8; ++i) + if (aSourceGuid->Data1 == aCompareGuid->Data1) // Comparing two EFI_UINT32's { - COMPARE_MEMBER_AND_RETURN_IF_NE(pG1, pG2, Data4[i]); + if (aSourceGuid->Data2 == aCompareGuid->Data2) // Comparing two EFI_UINT16's + { + if (aSourceGuid->Data3 == aCompareGuid->Data3) // Comparing two EFI_UINT16's + { + // Returns 0 when equal or -1 when not + return memcmp((const void *)aSourceGuid->Data4, (const void *)aSourceGuid->Data4, 8); + } + } } - - return 0; + + return -1; } +#if DISK_TARGET_SUPPORT //========================================================================= +// Helper function for getStartupDiskUUID() -char *getGUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath) +char * getUUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath) { if (devicePath != NULL) { @@ -206,8 +201,8 @@ char *getGUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath) char * guid = (char *)malloc(37); - efi_guid_unparse_upper(uuid, guid); - + convertEFIGUIDToString(uuid, guid); + return guid; } } @@ -215,3 +210,28 @@ char *getGUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath) return NULL; } + + +//============================================================================== +// Used in RevoBoot/i386/boot2/boot.c + +char * getStartupDiskUUID(char * aDataPtr) +{ + char * targetDiskUUID = NULL; + + unsigned char * decodedData = NULL; + + int rc = base64Decode(aDataPtr, &decodedData); + + if ((rc == 75) && (decodedData != NULL)) + { + EFI_DEVICE_PATH_PROTOCOL * dp = (EFI_DEVICE_PATH_PROTOCOL *) decodedData; + + targetDiskUUID = getUUIDFromDevicePath(dp); + + free(decodedData); + } + + return targetDiskUUID; +} +#endif // #if DISK_TARGET_SUPPORT From 3237803ad54ab58e2640ae4571755d104012f0b9 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 24 Nov 2012 14:33:16 +0100 Subject: [PATCH 195/623] Updating file for RevoBoot v1.6.36 --- i386/libsaio/disk.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/i386/libsaio/disk.c b/i386/libsaio/disk.c index a1ed781..2a077f8 100644 --- a/i386/libsaio/disk.c +++ b/i386/libsaio/disk.c @@ -68,8 +68,6 @@ typedef struct gpt_hdr gpt_hdr; typedef struct gpt_ent gpt_ent; -#include "efi_tables.h" - #define BPS 512 // sector size of the device. #define PROBEFS_SIZE BPS * 4 // buffer size for filesystem probe. @@ -500,7 +498,7 @@ static BVRef newGPTBVRef(int biosdev, int partno, unsigned int blkoff, const gpt static bool isPartitionUsed(gpt_ent * partition) { - return efi_guid_is_null((EFI_GUID const*)partition->ent_type) ? false : true; + return isEFIGUIDNull((EFI_GUID const*)partition->ent_type) ? false : true; } @@ -574,13 +572,13 @@ BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr) int bvrFlags = -1; #if DEBUG_DISK char stringuuid[100]; - efi_guid_unparse_upper((EFI_GUID*)gptMap->ent_type, stringuuid); + convertEFIGUIDToString((EFI_GUID*)gptMap->ent_type, stringuuid); printf("Reading GPT partition %d, type %s\n", gptID, stringuuid); sleep(1); #endif #if EFI_SYSTEM_PARTITION_SUPPORT // First check for the EFI partition. - if (efi_guid_compare(&GPT_EFISYS_GUID, (EFI_GUID const *)gptMap->ent_type) == 0) + if (compareEFIGUID(&GPT_EFISYS_GUID, (EFI_GUID const *)gptMap->ent_type) == 0) { _DISK_DEBUG_DUMP("Matched: EFI GUID, probing for HFS format...\n"); @@ -616,7 +614,7 @@ BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr) #endif #if CORE_STORAGE_SUPPORT // Is this a CoreStorage partition? - if (efi_guid_compare(&GPT_CORESTORAGE_GUID, (EFI_GUID const *)gptMap->ent_type) == 0) + if (compareEFIGUID(&GPT_CORESTORAGE_GUID, (EFI_GUID const *)gptMap->ent_type) == 0) { _DISK_DEBUG_DUMP("Matched: CoreStorage GUID\n"); @@ -629,14 +627,14 @@ BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr) // Check for HFS+ partitions. if ( #endif - !gPlatform.BootRecoveryHD && (efi_guid_compare(&GPT_HFS_GUID, (EFI_GUID const *)gptMap->ent_type) == 0)) + !gPlatform.BootRecoveryHD && (compareEFIGUID(&GPT_HFS_GUID, (EFI_GUID const *)gptMap->ent_type) == 0)) { _DISK_DEBUG_DUMP("Matched: HFS+ GUID\n"); bvrFlags = kBVFlagZero; } #if APPLE_RAID_SUPPORT - else if (efi_guid_compare(&GPT_RAID_GUID, (EFI_GUID const *)gptMap->ent_type) == 0) + else if (compareEFIGUID(&GPT_RAID_GUID, (EFI_GUID const *)gptMap->ent_type) == 0) { _DISK_DEBUG_DUMP("Skipping: GPT_RAID_GUID\n"); @@ -645,7 +643,7 @@ BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr) #endif #if CORE_STORAGE_SUPPORT || APPLE_RAID_SUPPORT - else if (efi_guid_compare(&GPT_BOOT_GUID, (EFI_GUID const *)gptMap->ent_type) == 0) + else if (compareEFIGUID(&GPT_BOOT_GUID, (EFI_GUID const *)gptMap->ent_type) == 0) { _DISK_DEBUG_DUMP("Matched: GPT_BOOT_GUID\n"); From 385bdd41eb1e09d4836575aa978545effdd29656 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 24 Nov 2012 14:44:21 +0100 Subject: [PATCH 196/623] efi_guid_unparse_upper -> convertEFIGUIDToString --- i386/libsaio/efi/fake_efi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/i386/libsaio/efi/fake_efi.h b/i386/libsaio/efi/fake_efi.h index 94c18a9..63e1381 100755 --- a/i386/libsaio/efi/fake_efi.h +++ b/i386/libsaio/efi/fake_efi.h @@ -29,6 +29,7 @@ * * Updates: * - Check malloc return (PikerAlpha, November 2012). + * - Renamed efi_guid_unparse_upper to convertEFIGUIDToString (PikerAlpha, November 2012). * */ From 2bce66782a8e59d72f31ca39786c5b37dd431af3 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 24 Nov 2012 14:53:33 +0100 Subject: [PATCH 197/623] Take two --- i386/libsaio/efi/fake_efi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/efi/fake_efi.h b/i386/libsaio/efi/fake_efi.h index 63e1381..f6b86af 100755 --- a/i386/libsaio/efi/fake_efi.h +++ b/i386/libsaio/efi/fake_efi.h @@ -64,7 +64,7 @@ static inline char * mallocStringForGuid(EFI_GUID const *pGuid) if (string) { - efi_guid_unparse_upper(pGuid, string); + convertEFIGUIDToString(pGuid, string); return string; } From e300ec7520a96ba088ddce75dc0c200f9b6a0c22 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 24 Nov 2012 14:55:52 +0100 Subject: [PATCH 198/623] Updating file for RevoBoot v1.5.36 --- i386/libsa/libsa.h | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/i386/libsa/libsa.h b/i386/libsa/libsa.h index d2ae491..b164c19 100755 --- a/i386/libsa/libsa.h +++ b/i386/libsa/libsa.h @@ -42,10 +42,34 @@ /* * boot.c */ - extern int fastEnableA20(void); +/* + * crc32.c + */ +uint32_t crc32(uint32_t crc, const void *buf, size_t size); + + +/* + * getsegbyname.c + */ +extern struct segment_command * getsegbynamefromheader(struct mach_header * mhp, char * segname); + + +/* + * prf.c + */ +extern void prf(const char * fmt, va_list ap, void (*putfn_p)(), void * putfn_arg); + + +/* + * printf.c + */ +extern int sprintf(char *s, const char * format, ...); +extern int slvprintf(char * buffer, int len, const char * fmt, va_list arg); + + /* * string.c */ @@ -85,6 +109,7 @@ extern size_t strlen(const char * str); extern uint8_t checksum8( void * start, unsigned int length); char * removeChar(char *aSourceString, char aTargetChar); + /* * strtol.c */ @@ -92,16 +117,6 @@ extern long strtol(const char * nptr, char ** endptr, int base); extern unsigned long strtoul(const char * nptr, char ** endptr, int base); extern unsigned long long strtouq(const char *nptr, char ** endptr, int base); -/* - * prf.c - */ -extern void prf(const char * fmt, va_list ap, void (*putfn_p)(), void * putfn_arg); - -/* - * printf.c - */ -extern int sprintf(char *s, const char * format, ...); -extern int slvprintf(char * buffer, int len, const char * fmt, va_list arg); /* * zalloc.c @@ -120,9 +135,4 @@ extern int slvprintf(char * buffer, int len, const char * fmt, va_list arg); extern void free(void * start); extern void * realloc(void * ptr, size_t size); -/* - * getsegbyname.c - */ -extern struct segment_command * getsegbynamefromheader(struct mach_header * mhp, char * segname); - #endif /* !__BOOT_LIBSA_H */ From 18a54907348747e33d0e007894b7d3af50336029 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 27 Nov 2012 15:32:59 +0100 Subject: [PATCH 199/623] RevoBoot v1.5.37 --- .gitignore | 1 + CHANGES | 30 +++ VERSION | 2 +- i386/MakeInc.dir | 5 +- i386/MakePaths.dir | 0 i386/boot2/boot.c | 17 +- i386/boot2/boot.h | 2 +- i386/config/settings-template.h | 5 +- i386/libsa/Makefile | 3 +- i386/libsa/{efi_tables.c => crc32.c} | 159 ++------------- i386/libsa/efi_tables.h | 16 -- i386/libsa/string.c | 2 +- i386/libsa/strtol.c | 283 +++++++++++++++++++-------- i386/libsaio/Makefile | 8 +- i386/libsaio/base64.c | 114 +++++++---- i386/libsaio/disk.c | 9 +- i386/libsaio/efi/essentials.h | 6 +- i386/libsaio/efi/fake_efi.h | 13 +- i386/libsaio/guid.c | 151 ++++++++++++++ i386/libsaio/hfs.c | 2 +- i386/libsaio/libsaio.h | 2 +- i386/libsaio/saio_internal.h | 12 +- i386/libsaio/vbe.c | 1 + 23 files changed, 528 insertions(+), 315 deletions(-) mode change 100755 => 100644 i386/MakeInc.dir mode change 100755 => 100644 i386/MakePaths.dir mode change 100644 => 100755 i386/config/settings-template.h rename i386/libsa/{efi_tables.c => crc32.c} (57%) mode change 100755 => 100644 delete mode 100755 i386/libsa/efi_tables.h create mode 100755 i386/libsaio/guid.c diff --git a/.gitignore b/.gitignore index 17d5f72..8681039 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store +.git out.log obj/* diff --git a/CHANGES b/CHANGES index c96a333..e423223 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,33 @@ +RevoBoot v1.5.40 (Next Major Release) +================ +- Improved CPU detection (with new/additional CPU's). +- Improved P-State generation (less settings). + + +RevoBoot v1.5.37 +================ +- DISK_TARGET_SUPPORT in settings-template.h renamed to STARTUP_DISK_SUPPORT (PikerAlpha, November 2012). +- Restored copyright of efi_tables.c to original developer (PikerAlpha, November 2012). +- Renamed RevoBoot/i386/libsa/efi_tables.c to crc32.c (PikerAlpha, November 2012). +- Moved GUID function from efi_tables.c to RevoBoot/i386/libsaio/guid.c (PikerAlpha, November 2012). +- Fixed some minor C99 issues / restoring gcc compatibility (PikerAlpha, November 2012). +- Cleanups and other minor improvements. +- VERSION updated to v1.5.37 + + +RevoBoot v1.5.36 +================ +- Now reading efi-boot-device-data from /Extra/NVRAM/nvramStorage.plist to select the Startup Disk (PikerAlpha, November 2012). +- New DISK_TARGET_SUPPORT setting in settings-template.h (PikerAlpha, November 2012). +- New file RevoBoot/i386/libsaio/base64.c (written by Sam) added (PikerAlpha, November 2012). +- Support for data fields added (PikerAlpha, November 2012). +- Copied macro's from EDK2's EfiDevicePath.h to RevoBoot/i386/libsaio/efi/essentials.h (PikerAlpha, November 2012). +- Port of EDK2's function (getGUIDFromDevicePath written by Sam) added (PikerAlpha, November 2012). +- Function loadSystemConfig now calls new function loadConfigFile (PikerAlpha, November 2012). +- Cleanups and other minor improvements. +- VERSION updated to v1.5.36 + + RevoBoot v1.5.35 ================ - SMBIOS related enhancements for RevoBoot v1.5.35 (PikerAlpha, November 2012). diff --git a/VERSION b/VERSION index 599410a..dc848ff 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.36 +1.5.37 diff --git a/i386/MakeInc.dir b/i386/MakeInc.dir old mode 100755 new mode 100644 index bdaf6ca..6a87e1c --- a/i386/MakeInc.dir +++ b/i386/MakeInc.dir @@ -6,6 +6,7 @@ # - Major cleanup (PikerAlpha, October 2012). # - Fixed clang compilation (dgsga, November 2012). # - Single pass compilation (PikerAlpha, November 2012). +# - Removed unused CPPFLAGS (PikerAlpha, November 2012). # @@ -34,7 +35,7 @@ $(OBJROOT)/%.o: %.m .s.o: @echo "\t[AS] $<" - @$(CC) $(CPPFLAGS) -c $(INC) -arch i386 $< -o $(OBJROOT)/$@ + @$(CC) -c $(INC) -arch i386 $< -o $(OBJROOT)/$@ $(OBJROOT)/boot2.o: @echo "\t[AS] boot2.s" @@ -42,7 +43,7 @@ $(OBJROOT)/boot2.o: $(OBJROOT)/%.o: %.s @echo "\t[AS] $<" - @$(CC) $(CPPFLAGS) -c $(INC) -arch i386 $< -o $(OBJROOT)/$@ + @$(CC) -c $(INC) -arch i386 $< -o $(OBJROOT)/$@ $(DIRS_NEEDED): @/bin/mkdir -p $@ diff --git a/i386/MakePaths.dir b/i386/MakePaths.dir old mode 100755 new mode 100644 diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 763f3ee..6864f60 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -218,17 +218,22 @@ void boot(int biosdev) initPartitionChain(); #endif -#if DISK_TARGET_SUPPORT +#if STARTUP_DISK_SUPPORT + /* + * sudo nano /etc/rc.shutdown.local + * #!/bin/sh + * /usr/sbin/nvram -x -p > /Extra/NVRAM/nvramStorage.plist + */ config_file_t nvramStorage; const char * path = "/Extra/NVRAM/nvramStorage.plist"; if (loadConfigFile(path, &nvramStorage) == STATE_SUCCESS) { - _BOOT_DEBUG_DUMP("nvramStorage.plist located\n"); + _BOOT_DEBUG_DUMP("nvramStorage.plist found\n"); if (getValueForConfigTableKey(&nvramStorage, "efi-boot-device-data", &val, &length)) { - _BOOT_DEBUG_DUMP("Key 'efi-boot-device-data' located %d\n", length); + _BOOT_DEBUG_DUMP("Key 'efi-boot-device-data' found %d\n", length); char * uuid = getStartupDiskUUID((char *)val); @@ -298,8 +303,8 @@ void boot(int biosdev) gBootMode = kBootModeSafe; } - // Is 'boot-uuid=<value>' specified as kernel flag? - if (!rootUUID && (getValueForBootKey(kernelFlags, kBootUUIDKey, &val, &length) && length == 36)) + // Is rootUUID still empty and 'boot-uuid=<value>' specified as kernel flag? + if (rootUUID[0] == '\0' && (getValueForBootKey(kernelFlags, kBootUUIDKey, &val, &length) && length == 36)) { _BOOT_DEBUG_DUMP("Target boot-uuid=<%s>\n", val); @@ -346,7 +351,7 @@ void boot(int biosdev) // Was a target drive (per UUID) specified in com.apple.Boot.plist? if (rootUUID[0] == '\0') { - _BOOT_DEBUG_DUMP("No UUID specified in com.apple.Boot.plist\n"); + _BOOT_DEBUG_DUMP("No NVRAM-Startup Disk / rd=uuid bootuuid= in com.apple.Boot.plist\n"); // No, so are we booting from a System Volume? if (gPlatform.BootVolume->flags & kBVFlagSystemVolume) diff --git a/i386/boot2/boot.h b/i386/boot2/boot.h index 6a30a21..b710e8e 100755 --- a/i386/boot2/boot.h +++ b/i386/boot2/boot.h @@ -25,7 +25,7 @@ * * Updates: * - Unused sysConfigValid removed (PikerAlpha, November 2012). -* - STATE_SUCCESS moved to libsaio.h (PikerAlpha, November 2012). + * - STATE_SUCCESS moved to libsaio.h (PikerAlpha, November 2012). * */ diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h old mode 100644 new mode 100755 index 86c7969..8e4f166 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -1,7 +1,7 @@ /* * Copyright (c) 2009 Master Chief. All rights reserved. * - * Note: This is an essential part of the build process for RevoBoot v1.5.36 and greater. + * Note: This is an essential part of the build process for RevoBoot v1.5.35 and greater. * * Updates: * @@ -28,6 +28,7 @@ * - LOAD_MODEL_SPECIFIC_STATIC_DATA added (PikerAlpha, October 2012). * - Option SET_MAX_STRUCTURE_LENGTH added (PikerAlpha, November 2012). * - Option DISK_TARGET_SUPPORT added (PikerAlpha, November 2012). + * - DISK_TARGET_SUPPORT renamed to STARTUP_DISK_SUPPORT (PikerAlpha, November 2012). */ @@ -210,7 +211,7 @@ #define LION_RECOVERY_SUPPORT 0 // Set to 0 by default. Change this to 1 to make RevoBoot search for the 'Recovery HD' // partition and, when available, boot from it. -#define DISK_TARGET_SUPPORT 0 // Set to 0 by default. Change this to 1 for System Preference/Startup Disk support. +#define STARTUP_DISK_SUPPORT 0 // Set to 0 by default. Change this to 1 for System Preference/Startup Disk support. #define DEBUG_BOOT 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. diff --git a/i386/libsa/Makefile b/i386/libsa/Makefile index ce11708..70a5b85 100644 --- a/i386/libsa/Makefile +++ b/i386/libsa/Makefile @@ -7,6 +7,7 @@ # - Output added for rm/ar/ranlib actions (PikerAlpha, November 2012). # - Enabled clang compilation (dgsga, November 2012. Credits to Evan Lojewski for original work). # - Output change and now using libtool instead of ar/ranlib (PikerAlpha, November 2012). +# - efi_table.c renamed to crc32.c (PikerAlpha, November 2012). # include ../MakePaths.dir @@ -25,7 +26,7 @@ INC = -I. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSAIODIR) VPATH = $(OBJROOT):$(SYMROOT) -SA_OBJS = prf.o printf.o zalloc.o string.o strtol.o setjmp.o efi_tables.o +SA_OBJS = prf.o printf.o zalloc.o string.o strtol.o setjmp.o crc32.o LIBS = libsa.a diff --git a/i386/libsa/efi_tables.c b/i386/libsa/crc32.c old mode 100755 new mode 100644 similarity index 57% rename from i386/libsa/efi_tables.c rename to i386/libsa/crc32.c index 6f1569d..c906054 --- a/i386/libsa/efi_tables.c +++ b/i386/libsa/crc32.c @@ -43,21 +43,25 @@ * */ -#include "libsaio.h" + +#include "libsa.h" + +//========================================================================== +// This data block can also be found in boot.efi static uint32_t crc32Table[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, - 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, + 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, - 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, - 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, - 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, - 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, - 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, + 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, + 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, + 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, + 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, @@ -95,143 +99,16 @@ static uint32_t crc32Table[] = //========================================================================== -uint32_t crc32(uint32_t crc, const void *buf, size_t size) -{ - const uint8_t *p; - - p = buf; - crc = crc ^ ~0U; - - while (size--) - { - crc = crc32Table[(crc ^ *p++) & 0xFF] ^ (crc >> 8); - } - - return crc ^ ~0U; -} - - -/*========================================================================== - * Utility function to make a device tree string from an EFI_GUID - * - * FIXME: Everything below this line should be moved to: guid.c - */ - - -//========================================================================== -// Used in RevoBoot/i386/libsaio/disk.c - -void convertEFIGUIDToString(EFI_GUID const *aGuid, char *out) -{ - sprintf(out, "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", - aGuid->Data1, /* - */ - aGuid->Data2, /* - */ - aGuid->Data3, /* - */ - aGuid->Data4[0], aGuid->Data4[1], /* - */ - aGuid->Data4[2], aGuid->Data4[3], - aGuid->Data4[4], aGuid->Data4[5], - aGuid->Data4[6], aGuid->Data4[7]); -} - - -//========================================================================== -// Used in RevoBoot/i386/libsaio/disk.c - -bool isEFIGUIDNull(EFI_GUID const *aGuid) +uint32_t crc32(uint32_t aCRC, const void *aBuffer, size_t aSize) { - if (aGuid->Data1 == 0 && aGuid->Data2 == 0 && aGuid->Data3 == 0) - { - for (int i = 0; i < 8; ++i) - { - if (aGuid->Data4[i] != 0) - { - return false; - } - } - - return true; - } - - return false; -} + const uint8_t *p = aBuffer; + aCRC = aCRC ^ ~0U; -//========================================================================= -// Used in RevoBoot/i386/libsaio/disk.c - -int compareEFIGUID(EFI_GUID const *aSourceGuid, EFI_GUID const *aCompareGuid) -{ - if (aSourceGuid->Data1 == aCompareGuid->Data1) // Comparing two EFI_UINT32's + while (aSize--) { - if (aSourceGuid->Data2 == aCompareGuid->Data2) // Comparing two EFI_UINT16's - { - if (aSourceGuid->Data3 == aCompareGuid->Data3) // Comparing two EFI_UINT16's - { - // Returns 0 when equal or -1 when not - return memcmp((const void *)aSourceGuid->Data4, (const void *)aSourceGuid->Data4, 8); - } - } + aCRC = crc32Table[(aCRC ^ *p++) & 0xFF] ^ (aCRC >> 8); } - - return -1; -} - - -#if DISK_TARGET_SUPPORT -//========================================================================= -// Helper function for getStartupDiskUUID() -char * getUUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath) -{ - if (devicePath != NULL) - { - while (!IsDevicePathEndType(devicePath) && - !(DevicePathType(devicePath) == MEDIA_DEVICE_PATH && DevicePathSubType(devicePath) == MEDIA_HARDDRIVE_DP)) - { - devicePath = NextDevicePathNode(devicePath); - } - - if (DevicePathType(devicePath) == MEDIA_DEVICE_PATH && DevicePathSubType(devicePath) == MEDIA_HARDDRIVE_DP) - { - HARDDRIVE_DEVICE_PATH * HDDevicePath = (HARDDRIVE_DEVICE_PATH *) devicePath; - - if (HDDevicePath->SignatureType == SIGNATURE_TYPE_GUID) // 0x02 - { - EFI_GUID const * uuid = (EFI_GUID*)HDDevicePath->Signature; - - char * guid = (char *)malloc(37); - - convertEFIGUIDToString(uuid, guid); - - return guid; - } - } - } - - return NULL; -} - - -//============================================================================== -// Used in RevoBoot/i386/boot2/boot.c - -char * getStartupDiskUUID(char * aDataPtr) -{ - char * targetDiskUUID = NULL; - - unsigned char * decodedData = NULL; - - int rc = base64Decode(aDataPtr, &decodedData); - - if ((rc == 75) && (decodedData != NULL)) - { - EFI_DEVICE_PATH_PROTOCOL * dp = (EFI_DEVICE_PATH_PROTOCOL *) decodedData; - - targetDiskUUID = getUUIDFromDevicePath(dp); - - free(decodedData); - } - - return targetDiskUUID; + return (aCRC ^ ~0U); } -#endif // #if DISK_TARGET_SUPPORT diff --git a/i386/libsa/efi_tables.h b/i386/libsa/efi_tables.h deleted file mode 100755 index 7976437..0000000 --- a/i386/libsa/efi_tables.h +++ /dev/null @@ -1,16 +0,0 @@ -/*! @file efi_tables.h - @abstract Utility functions for dealing with EFI tables - Copyright 2007 David F. Elliott. All rights reserved. - */ -#ifndef _LIBSA_EFI_TABLES_H__ -#define _LIBSA_EFI_TABLES_H__ - -#include "efi/essentials.h" - -uint32_t crc32(uint32_t crc, const void *buf, size_t size); - -void efi_guid_unparse_upper(EFI_GUID const *pGuid, char *out); -bool efi_guid_is_null(EFI_GUID const *pGuid); -int efi_guid_compare(EFI_GUID const *pG1, EFI_GUID const *pG2); - -#endif //ndef _LIBSA_EFI_TABLES_H__ diff --git a/i386/libsa/string.c b/i386/libsa/string.c index 0f2c9bc..fcd2b64 100755 --- a/i386/libsa/string.c +++ b/i386/libsa/string.c @@ -386,7 +386,7 @@ int strncasecmp(const char *s1, const char *s2, size_t len) //========================================================================== /* COPYRIGHT NOTICE: checksum8 from AppleSMBIOS */ -uint8_t checksum8( void * start, unsigned int length ) +uint8_t checksum8(void * start, unsigned int length) { uint8_t csum = 0; uint8_t * cp = (uint8_t *) start; diff --git a/i386/libsa/strtol.c b/i386/libsa/strtol.c index 7ea6d3b..f6c724f 100755 --- a/i386/libsa/strtol.c +++ b/i386/libsa/strtol.c @@ -65,90 +65,123 @@ * Removed dependency on _ctype_ by static versions of isupper()... * Added support for "0b101..." binary constants. * Commented out references to errno. + * + * Updates: + * - Layout and other readability improvements (PikerAlpha, November 2012). + * - Commented out references to errno removed (PikerAlpha, November 2012). + * - Unused #include libsa.h removed (PikerAlpha, November 2012). + * - Dependancy on <limits.h> removed (PikerAlpha, November 2012). + * */ -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)strtol.c 5.4 (Berkeley) 2/23/91"; -#endif /* LIBC_SCCS and not lint */ -#include "libsa.h" -#include <limits.h> +#define LONG_MAX 2147483647L /* max signed long */ +#define LONG_MIN (-2147483647L-1) /* min signed long */ + +#define ULONG_MAX 0xffffffffUL /* max unsigned long */ +#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */ + +#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */ + +#define UQUAD_MAX ULLONG_MAX +#define QUAD_MAX LLONG_MAX + + +//========================================================================== -static inline int -isupper(char c) +static inline int isupper(char c) { - return (c >= 'A' && c <= 'Z'); + return (c >= 'A' && c <= 'Z'); } -static inline int -islower(char c) + +//========================================================================== + +static inline int islower(char c) { - return (c >= 'a' && c <= 'z'); + return (c >= 'a' && c <= 'z'); } -static inline int -isalpha(char c) + +//========================================================================== + +static inline int isalpha(char c) { - return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); + return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); } -static inline int -isspace(char c) + +//========================================================================== + +static inline int isspace(char c) { - return (c == ' ' || c == '\t' || c == '\n' || c == '\12'); + return (c == ' ' || c == '\t' || c == '\n' || c == '\12'); } -static inline int -isdigit(char c) + +//========================================================================== + +static inline int isdigit(char c) { - return (c >= '0' && c <= '9'); + return (c >= '0' && c <= '9'); } -/* +/*========================================================================== * Convert a string to a long integer. * * Ignores `locale' stuff. Assumes that the upper and lower case * alphabets and digits are each contiguous. */ -long -strtol(nptr, endptr, base) - const char *nptr; - char **endptr; - register int base; + +long strtol(const char *nptr, char **endptr, register int base) { register const char *s = nptr; - register unsigned long acc; + register int c; - register unsigned long cutoff; register int neg = 0, any, cutlim; + register unsigned long acc; + register unsigned long cutoff; + /* * Skip white space and pick up leading +/- sign if any. * If base is 0, allow 0x for hex and 0 for octal, else * assume decimal; if base is already 16, allow 0x. */ - do { + + do + { c = *s++; } while (isspace(c)); - if (c == '-') { + + if (c == '-') + { neg = 1; c = *s++; - } else if (c == '+') + } + else if (c == '+') + { c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) { + } + + if ((base == 0 || base == 16) && c == '0' && (*s == 'x' || *s == 'X')) + { c = s[1]; s += 2; base = 16; - } else if ((base == 0 || base == 2) && - c == '0' && (*s == 'b' || *s == 'B')) { + } + else if ((base == 0 || base == 2) && c == '0' && (*s == 'b' || *s == 'B')) + { c = s[1]; s += 2; base = 2; } + if (base == 0) + { base = c == '0' ? 8 : 10; + } /* * Compute the cutoff value between legal numbers and illegal @@ -167,175 +200,269 @@ strtol(nptr, endptr, base) * Set any if any `digits' consumed; make it negative to indicate * overflow. */ + cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX; cutlim = cutoff % (unsigned long)base; cutoff /= (unsigned long)base; - for (acc = 0, any = 0;; c = *s++) { + + for (acc = 0, any = 0;; c = *s++) + { if (isdigit(c)) + { c -= '0'; + } else if (isalpha(c)) + { c -= isupper(c) ? 'A' - 10 : 'a' - 10; + } else + { break; + } + if (c >= base) + { break; + } + if ((any < 0 || acc > cutoff) || (acc == cutoff && c > cutlim)) + { any = -1; - else { + } + else + { any = 1; acc *= base; acc += c; } } - if (any < 0) { + + if (any < 0) + { acc = neg ? LONG_MIN : LONG_MAX; -// errno = ERANGE; - } else if (neg) + } + else if (neg) + { acc = -acc; + } + if (endptr != 0) + { *endptr = (char *)(any ? s - 1 : nptr); + } + return (acc); } -/* +/*========================================================================== * Convert a string to an unsigned long integer. * * Ignores `locale' stuff. Assumes that the upper and lower case * alphabets and digits are each contiguous. */ -unsigned long -strtoul(nptr, endptr, base) - const char *nptr; - char **endptr; - register int base; +unsigned long strtoul(const char *nptr, char **endptr, register int base) { register const char *s = nptr; - register unsigned long acc; + register int c; - register unsigned long cutoff; register int neg = 0, any, cutlim; + register unsigned long acc; + register unsigned long cutoff; + /* * See strtol for comments as to the logic used. */ - do { + do + { c = *s++; } while (isspace(c)); - if (c == '-') { + + if (c == '-') + { neg = 1; c = *s++; - } else if (c == '+') + } + else if (c == '+') + { c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) { + } + + if ((base == 0 || base == 16) && c == '0' && (*s == 'x' || *s == 'X')) + { c = s[1]; s += 2; base = 16; - } else if ((base == 0 || base == 2) && - c == '0' && (*s == 'b' || *s == 'B')) { + } + else if ((base == 0 || base == 2) && c == '0' && (*s == 'b' || *s == 'B')) + { c = s[1]; s += 2; base = 2; } + if (base == 0) + { base = c == '0' ? 8 : 10; + } + cutoff = (unsigned long)ULONG_MAX / (unsigned long)base; cutlim = (unsigned long)ULONG_MAX % (unsigned long)base; - for (acc = 0, any = 0;; c = *s++) { + + for (acc = 0, any = 0;; c = *s++) + { if (isdigit(c)) + { c -= '0'; + } else if (isalpha(c)) + { c -= isupper(c) ? 'A' - 10 : 'a' - 10; + } else + { break; + } + if (c >= base) + { break; + } + if ((any < 0 || acc > cutoff) || (acc == cutoff && c > cutlim)) + { any = -1; - else { + } + else + { any = 1; acc *= base; acc += c; } } - if (any < 0) { + + if (any < 0) + { acc = ULONG_MAX; -// errno = ERANGE; - } else if (neg) + } + else if (neg) + { acc = -acc; + } + if (endptr != 0) + { *endptr = (char *)(any ? s - 1 : nptr); + } + return (acc); } -/* + +/*========================================================================== * Convert a string to an unsigned quad integer. * * Ignores `locale' stuff. Assumes that the upper and lower case * alphabets and digits are each contiguous. */ -unsigned long long -strtouq(nptr, endptr, base) - const char *nptr; - char **endptr; - register int base; + +unsigned long long strtouq(const char *nptr, char **endptr, register int base) { register const char *s = nptr; - register unsigned long long acc; + register int c; - register unsigned long long qbase, cutoff; register int neg, any, cutlim; + register unsigned long long acc; + register unsigned long long qbase, cutoff; + /* * See strtoq for comments as to the logic used. */ s = nptr; - do { + + do + { c = *s++; } while (isspace(c)); - if (c == '-') { + + if (c == '-') + { neg = 1; c = *s++; - } else { + } + else + { neg = 0; + if (c == '+') + { c = *s++; + } } - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) { + + if ((base == 0 || base == 16) && c == '0' && (*s == 'x' || *s == 'X')) + { c = s[1]; s += 2; base = 16; } + if (base == 0) + { base = c == '0' ? 8 : 10; + } + qbase = (unsigned)base; cutoff = (unsigned long long)UQUAD_MAX / qbase; cutlim = (unsigned long long)UQUAD_MAX % qbase; - for (acc = 0, any = 0;; c = *s++) { + + for (acc = 0, any = 0;; c = *s++) + { if (isdigit(c)) + { c -= '0'; + } else if (isalpha(c)) + { c -= isupper(c) ? 'A' - 10 : 'a' - 10; + } else + { break; + } + if (c >= base) + { break; + } + if ((any < 0 || acc > cutoff) || (acc == cutoff && c > cutlim)) + { any = -1; - else { + } + else + { any = 1; acc *= qbase; acc += c; } } - if (any < 0) { + + if (any < 0) + { acc = UQUAD_MAX; -// errno = ERANGE; - } else if (neg) + } + else if (neg) + { acc = -acc; + } + if (endptr != 0) + { *endptr = (char *)(any ? s - 1 : nptr); + } + return (acc); } diff --git a/i386/libsaio/Makefile b/i386/libsaio/Makefile index a89f67f..49c531e 100644 --- a/i386/libsaio/Makefile +++ b/i386/libsaio/Makefile @@ -38,10 +38,10 @@ INC = -I. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) VPATH = $(OBJROOT):$(SYMROOT) -SAIO_OBJS = table.o asm.o bios.o biosfn.o disk.o sys.o cache.o bootstruct.o \ - base64.o stringTable.o load.o pci.o allocate.o vbe.o hfs.o \ - hfs_compare.o xml.o md5c.o device_tree.o cpu.o platform.o \ - acpi.o smbios.o efi.o console.o +SAIO_OBJS = table.o asm.o bios.o biosfn.o guid.o disk.o sys.o cache.o \ + bootstruct.o base64.o stringTable.o load.o pci.o allocate.o \ + vbe.o hfs.o hfs_compare.o xml.o md5c.o device_tree.o cpu.o \ + platform.o acpi.o smbios.o efi.o console.o LIBS = libsaio.a diff --git a/i386/libsaio/base64.c b/i386/libsaio/base64.c index 197bc77..ea73c2d 100755 --- a/i386/libsaio/base64.c +++ b/i386/libsaio/base64.c @@ -14,14 +14,16 @@ * - STAND_ALONE check added (PikerAlpha, November 2012) * - Workaround for "___bzero" undefined error in RevoBoot (PikerAlpha, November 2012) * - base64Charset moved to function decodeQuantum (PikerAlpha, November 2012) - * - Length and character checking added (PikerAlpha, November 2012) + * - base64 length check and character checking added (PikerAlpha, November 2012) * */ #ifdef REVOBOOT_VERSION_INFO - #define STAND_ALONE 0 + #define STAND_ALONE 0 + #define DEBUG_BASE64_DECODE 0 #else - #define STAND_ALONE 1 + #define STAND_ALONE 1 + #define DEBUG_BASE64_DECODE 1 #endif #if STAND_ALONE @@ -31,8 +33,6 @@ #include "libsaio.h" #endif -#define DEBUG_BASE64_DECODE 0 - #define FULL_BASE64_DATA_CHECK 0 #if DEBUG_BASE64_DECODE @@ -67,6 +67,7 @@ char *cleanupBase64Data(char *aDataPtr) { int index = 0; #if DEBUG_BASE64_DECODE + int i = 0; int junkChars = 0; #endif @@ -88,7 +89,7 @@ char *cleanupBase64Data(char *aDataPtr) #if FULL_BASE64_DATA_CHECK /* * Additional checking is normally not required, but may help people - * getting past messed up plist data fields (think hand editing). + * getting passed messed up plist data fields (think hand editing). */ if (*aDataPtr > 43 && *aDataPtr < 47) // ,-. { @@ -148,7 +149,7 @@ char *cleanupBase64Data(char *aDataPtr) length = strlen(cleanedUpData); - for (int i = 0; i < length; i++) + for (i = 0; i < length; i++) { printf("%c", cleanedUpData[i]); } @@ -163,16 +164,16 @@ char *cleanupBase64Data(char *aDataPtr) void decodeQuantum(char *input, unsigned char *output) { + int i = 0; int j = 0; #if DEBUG_BASE64_DECODE int found = 0; #endif - - unsigned int x = 0; // We need a 32 bit wide variable for our bit shifting. - + + unsigned int x = 0; // We use a 32 bit wide variable for our bit shifting. const char * base64Charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - - for (int i = 0; i < 4; i++) + + for (i = 0; i < 4; i++) { if (input[i] == PADDINGCHAR) { @@ -189,7 +190,7 @@ void decodeQuantum(char *input, unsigned char *output) #endif x = (x << 6) + j; } - else // Dig for target character. + else // Dig for next valid target character. { for (j = 0; j < TABLELEN; j++) { @@ -240,11 +241,13 @@ int base64Decode(char *input, unsigned char **decodedData) if (buffer) { + int i = 0; + *decodedData = buffer; while (bytes < (numQuantums / 3)) { - for (int i = 0; i < numQuantums; i++) + for (i = 0; i < numQuantums; i++) { decodeQuantum(input, buffer); #if DEBUG_BASE64_DECODE @@ -275,10 +278,43 @@ int base64Decode(char *input, unsigned char **decodedData) #include "efi/essentials.h" +void convertEFIGUIDToString(EFI_GUID const *aGuid, char **aUUIDString) +{ + // Do we need to allocate memory? + if (*aUUIDString == NULL) + { + // 1 2 3 + // 123456789 123456789 123456789 123456 + // 00000000-0000-0000-0000-000000000000 + *aUUIDString = (char *)malloc(36); + } + + if (*aUUIDString) + { + bzero(*aUUIDString, 36); + sprintf(*aUUIDString, "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", + aGuid->Data1, /* - */ + aGuid->Data2, /* - */ + aGuid->Data3, /* - */ + aGuid->Data4[0], aGuid->Data4[1], /* - */ + aGuid->Data4[2], aGuid->Data4[3], + aGuid->Data4[4], aGuid->Data4[5], + aGuid->Data4[6], aGuid->Data4[7]); + } +} + + +//============================================================================== + +#if USE_DEVICE_PATH void *getUUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath) +#else +void *getUUIDFromDevicePath(EFI_GUID *aGUID) +#endif { char * uuid = NULL; +#if USE_DEVICE_PATH if (devicePath != NULL) { while (!IsDevicePathEndType(devicePath) && @@ -293,23 +329,16 @@ void *getUUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath) if (HDDevicePath->SignatureType == SIGNATURE_TYPE_GUID) // 0x02 { - EFI_GUID * guid = (EFI_GUID*)HDDevicePath->Signature; + EFI_GUID * aGUID = (EFI_GUID*)HDDevicePath->Signature; - uuid = (void *)malloc(37); - - // Function efi_guid_unparse_upper() in efi/efi_tables.c - sprintf(uuid, "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", - guid->Data1, - guid->Data2, - guid->Data3, - guid->Data4[0], guid->Data4[1], - guid->Data4[2], guid->Data4[3], - guid->Data4[4], guid->Data4[5], - guid->Data4[6], guid->Data4[7]); + convertEFIGUIDToString(aGUID, &uuid); } } } - +#else + convertEFIGUIDToString(aGUID, &uuid); +#endif + return uuid; } @@ -319,29 +348,28 @@ void *getUUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath) char * getStartupDiskUUID(char * aDataPtr) { - char * targetDiskUUID = NULL; - + char * startupDiskUUID = NULL; + unsigned char * decodedData = NULL; - + int rc = base64Decode(aDataPtr, &decodedData); - + if ((rc == 75) && (decodedData != NULL)) { +#if USE_DEVICE_PATH EFI_DEVICE_PATH_PROTOCOL * dp = (EFI_DEVICE_PATH_PROTOCOL *) decodedData; - - char * uuid = getUUIDFromDevicePath(dp); - - if (uuid) - { - targetDiskUUID = uuid; - } - - dp = NULL; + + startupDiskUUID = getUUIDFromDevicePath(dp); +#else + EFI_GUID * guid = (EFI_GUID *) (decodedData + 52); + + convertEFIGUIDToString(guid, &startupDiskUUID); +#endif } - + free(decodedData); - - return targetDiskUUID; + + return startupDiskUUID; } //============================================================================== diff --git a/i386/libsaio/disk.c b/i386/libsaio/disk.c index 2a077f8..5567853 100644 --- a/i386/libsaio/disk.c +++ b/i386/libsaio/disk.c @@ -50,6 +50,7 @@ * - Renamed LION_FILEVAULT_SUPPORT to CORE_STARAGE_SUPPORT (PikerAlpha, November 2012). * - Renamed encryptedBootPartition to coreStoragePartition (PikerAlpha, November 2012). * - OSBigEndian removed and some minor style nits (PikerAlpha, November 2012). + * - Unused #include <limits.h> removed (PikerAlpha, November 2012). * */ @@ -58,8 +59,6 @@ #include "fdisk.h" #include "hfs.h" -#include <limits.h> - #define DPISTRLEN 32 // Defined in: IOKit/storage/IOApplePartitionScheme.h @@ -571,9 +570,9 @@ BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr) BVRef bvr = NULL; int bvrFlags = -1; #if DEBUG_DISK - char stringuuid[100]; - convertEFIGUIDToString((EFI_GUID*)gptMap->ent_type, stringuuid); - printf("Reading GPT partition %d, type %s\n", gptID, stringuuid); + char uuidString = NULL; + convertEFIGUIDToString((EFI_GUID*)gptMap->ent_type, &uuidString); + printf("Reading GPT partition %d, type %s\n", gptID, uuidString); sleep(1); #endif diff --git a/i386/libsaio/efi/essentials.h b/i386/libsaio/efi/essentials.h index 9ab523c..a2ff079 100755 --- a/i386/libsaio/efi/essentials.h +++ b/i386/libsaio/efi/essentials.h @@ -25,16 +25,19 @@ * All rights reserved. * * Updates: - * - Stand alone support for base64.c added (PikerAlpha, November 2012) + * - Stand alone support for base64.c added (PikerAlpha, November 2012). + * */ #ifndef __LIBSAIO_EFI_ESSENTIALS_H #define __LIBSAIO_EFI_ESSENTIALS_H + #ifdef TARGET_MODEL #include "../boot2/debug.h" #endif + typedef void VOID; typedef uint32_t EFI_STATUS; @@ -208,4 +211,3 @@ typedef struct #define NextDevicePathNode(a) ( (EFI_DEVICE_PATH_PROTOCOL *) ( ((EFI_INT8 *) (a)) + DevicePathNodeLength(a))) #endif /* !__LIBSAIO_EFI_ESSENTIALS_H */ - diff --git a/i386/libsaio/efi/fake_efi.h b/i386/libsaio/efi/fake_efi.h index f6b86af..2f4ea76 100755 --- a/i386/libsaio/efi/fake_efi.h +++ b/i386/libsaio/efi/fake_efi.h @@ -29,12 +29,11 @@ * * Updates: * - Check malloc return (PikerAlpha, November 2012). - * - Renamed efi_guid_unparse_upper to convertEFIGUIDToString (PikerAlpha, November 2012). * */ -#include "bootstruct.h" // For bootArgs. -#include "efi_tables.h" +#include "bootstruct.h" // For bootArgs. + //------------------------------------------------------------------------------ @@ -58,14 +57,14 @@ static EFI_UINT32 const FIRMWARE_REVISION = EFI_SYSTEM_TABLE_REVISION; //============================================================================== // Utility function to make a device tree string from an EFI_GUID -static inline char * mallocStringForGuid(EFI_GUID const *pGuid) +static inline char * mallocStringForGuid(EFI_GUID const *aGuid) { - char *string = malloc(37); + char *string = NULL; + + convertEFIGUIDToString(aGuid, &string); if (string) { - convertEFIGUIDToString(pGuid, string); - return string; } diff --git a/i386/libsaio/guid.c b/i386/libsaio/guid.c new file mode 100755 index 0000000..3ac4ed8 --- /dev/null +++ b/i386/libsaio/guid.c @@ -0,0 +1,151 @@ + + +#include "libsaio.h" + +#include "efi/essentials.h" +#include "efi/efi.h" + + +//========================================================================== +// Used in RevoBoot/i386/libsaio/disk.c + +void convertEFIGUIDToString(EFI_GUID const *aGuid, char **aUUIDString) +{ + // Do we need to allocate memory? + if (*aUUIDString == NULL) + { + // 1 2 3 + // 123456789 123456789 123456789 123456 + // 00000000-0000-0000-0000-000000000000 + *aUUIDString = (char *)malloc(36); + } + + if (*aUUIDString) + { + bzero(*aUUIDString, 36); + sprintf(*aUUIDString, "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", + aGuid->Data1, /* - */ + aGuid->Data2, /* - */ + aGuid->Data3, /* - */ + aGuid->Data4[0], aGuid->Data4[1], /* - */ + aGuid->Data4[2], aGuid->Data4[3], + aGuid->Data4[4], aGuid->Data4[5], + aGuid->Data4[6], aGuid->Data4[7]); + } +} + + +//========================================================================== +// Used in RevoBoot/i386/libsaio/disk.c + +bool isEFIGUIDNull(EFI_GUID const *aGuid) +{ + if (aGuid->Data1 == 0 && aGuid->Data2 == 0 && aGuid->Data3 == 0) + { + int i = 0; + + for (i = 0; i < 8; ++i) + { + if (aGuid->Data4[i] != 0) + { + return false; + } + } + + return true; + } + + return false; +} + + +//========================================================================= +// Used in RevoBoot/i386/libsaio/disk.c + +int compareEFIGUID(EFI_GUID const *aSourceGuid, EFI_GUID const *aCompareGuid) +{ + if (aSourceGuid->Data1 == aCompareGuid->Data1) // Comparing two EFI_UINT32's + { + if (aSourceGuid->Data2 == aCompareGuid->Data2) // Comparing two EFI_UINT16's + { + if (aSourceGuid->Data3 == aCompareGuid->Data3) // Comparing two EFI_UINT16's + { + // Returns 0 when equal or -1 when not + return memcmp((const void *)aSourceGuid->Data4, (const void *)aSourceGuid->Data4, 8); + } + } + } + + return -1; +} + + +#if STARTUP_DISK_SUPPORT +//========================================================================= +// Helper function for getStartupDiskUUID() + +#if USE_DEVICE_PATH +void *getUUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath) +#else +void *getUUIDFromDevicePath(EFI_GUID *aGUID) +#endif +{ + char * uuid = NULL; + +#if USE_DEVICE_PATH + if (devicePath != NULL) + { + while (!IsDevicePathEndType(devicePath) && + !(DevicePathType(devicePath) == MEDIA_DEVICE_PATH && DevicePathSubType(devicePath) == MEDIA_HARDDRIVE_DP)) + { + devicePath = NextDevicePathNode(devicePath); + } + + if (DevicePathType(devicePath) == MEDIA_DEVICE_PATH && DevicePathSubType(devicePath) == MEDIA_HARDDRIVE_DP) + { + HARDDRIVE_DEVICE_PATH * HDDevicePath = (HARDDRIVE_DEVICE_PATH *) devicePath; + + if (HDDevicePath->SignatureType == SIGNATURE_TYPE_GUID) // 0x02 + { + EFI_GUID const * aGUID = (EFI_GUID*)HDDevicePath->Signature; + + convertEFIGUIDToString(aGUID, &uuid); + } + } + } +#else + convertEFIGUIDToString(aGUID, &uuid); +#endif + + return uuid; +} + + +//============================================================================== +// Used in RevoBoot/i386/boot2/boot.c + +char * getStartupDiskUUID(char * aDataPtr) +{ + char * startupDiskUUID = NULL; + + unsigned char * decodedData = NULL; + + int rc = base64Decode(aDataPtr, &decodedData); + + if ((rc == 75) && (decodedData != NULL)) + { +#if USE_DEVICE_PATH + EFI_DEVICE_PATH_PROTOCOL * dp = (EFI_DEVICE_PATH_PROTOCOL *) decodedData; + + startupDiskUUID = getUUIDFromDevicePath(dp); +#else + EFI_GUID * uuid = (EFI_GUID *) (decodedData + 52); + + convertEFIGUIDToString(uuid, &startupDiskUUID); +#endif + free(decodedData); + } + + return startupDiskUUID; +} +#endif // #if DISK_TARGET_SUPPORT diff --git a/i386/libsaio/hfs.c b/i386/libsaio/hfs.c index 8a94a5d..b04f54e 100755 --- a/i386/libsaio/hfs.c +++ b/i386/libsaio/hfs.c @@ -113,7 +113,7 @@ static void SwapFinderInfo(FndrFileInfo *dst, FndrFileInfo *src) void HFSFree(CICell ih) { - if(gCurrentIH == ih) + if (gCurrentIH == ih) { gCurrentIH = 0; } diff --git a/i386/libsaio/libsaio.h b/i386/libsaio/libsaio.h index bfe2c0e..ede89d6 100755 --- a/i386/libsaio/libsaio.h +++ b/i386/libsaio/libsaio.h @@ -22,7 +22,7 @@ * @APPLE_LICENSE_HEADER_END@ * * Updates: - * - STATE_SUCCESS moved from boot.h (PikerAlpha, November 2012) + * - STATE_SUCCESS moved from boot.h (PikerAlpha, November 2012) * */ diff --git a/i386/libsaio/saio_internal.h b/i386/libsaio/saio_internal.h index c5553e6..8766f89 100755 --- a/i386/libsaio/saio_internal.h +++ b/i386/libsaio/saio_internal.h @@ -23,7 +23,7 @@ * * Updates: * - * - loadBinaryData(load.c) and toLowerCase(string.c) added (PikerAlpha, October 2012). + * - loadBinaryData(load.c) and toLowerCase(string.c) added (PikerAlpha, October 2012). * - Tidied up (spaces -> tabs) (PikerAlpha, October 2012). * */ @@ -118,10 +118,16 @@ extern int testFAT32EFIBootSector(int biosdev, unsigned int secno, void * buffe /* guid.c */ -extern void convertEFIGUIDToString(EFI_GUID const *aGuid, char *out); +extern void convertEFIGUIDToString(EFI_GUID const *aGuid, char **aUUIDString); extern bool isEFIGUIDNull(EFI_GUID const *aGuid); extern int compareEFIGUID(EFI_GUID const *pG1, EFI_GUID const *pG2); -extern char *getUUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath); + +#if USE_DEVICE_PATH +void *getUUIDFromDevicePath(EFI_DEVICE_PATH_PROTOCOL *devicePath); +#else +void *getUUIDFromDevicePath(EFI_GUID *aGUID); +#endif + extern char * getStartupDiskUUID(char * aDataPtr); diff --git a/i386/libsaio/vbe.c b/i386/libsaio/vbe.c index f59f419..713e301 100755 --- a/i386/libsaio/vbe.c +++ b/i386/libsaio/vbe.c @@ -43,6 +43,7 @@ static inline void outi(int port, int index, int val) //============================================================================== + static inline void outib(int port, int index, int val) { outb (port, index); From 050c042077d1eeb9a7c73f12e3de88414ed211a8 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 27 Nov 2012 15:46:37 +0100 Subject: [PATCH 200/623] Last minute change --- i386/config/settings-template.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 8e4f166..e2555d9 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -1,7 +1,7 @@ /* * Copyright (c) 2009 Master Chief. All rights reserved. * - * Note: This is an essential part of the build process for RevoBoot v1.5.35 and greater. + * Note: This is an essential part of the build process for RevoBoot v1.5.37 and greater. * * Updates: * @@ -29,6 +29,8 @@ * - Option SET_MAX_STRUCTURE_LENGTH added (PikerAlpha, November 2012). * - Option DISK_TARGET_SUPPORT added (PikerAlpha, November 2012). * - DISK_TARGET_SUPPORT renamed to STARTUP_DISK_SUPPORT (PikerAlpha, November 2012). + * - New compiler directive USE_DEVICE_PATH in boot section (PikerAlpha, November 2012). + * */ @@ -213,6 +215,13 @@ #define STARTUP_DISK_SUPPORT 0 // Set to 0 by default. Change this to 1 for System Preference/Startup Disk support. +#if STARTUP_DISK_SUPPORT + #define USE_DEVICE_PATH 0 // Set to 0 by default. Change this to 1 when the Startup Disk feature fails to work. + // + // Note: This experimental switch will be removed in a next update/release. It is here + // only to give us feedback for a future release of RevoBoot. +#endif + #define DEBUG_BOOT 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. From 4f5593bf38753dc43f0278a2d253d604c796629c Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 29 Dec 2012 06:27:34 +0100 Subject: [PATCH 201/623] Print partition GUID instead of type GUID Documentation added about struct gpt_hdr and struct gpt_ent --- i386/libsaio/disk.c | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/disk.c b/i386/libsaio/disk.c index 5567853..839c372 100644 --- a/i386/libsaio/disk.c +++ b/i386/libsaio/disk.c @@ -64,7 +64,39 @@ #include <IOKit/storage/IOGUIDPartitionScheme.h> +/* Partition map from: IOGUIDPartitionScheme.h +struct gpt_hdr +{ + uint8_t hdr_sig[8]; + uint32_t hdr_revision; + uint32_t hdr_size; + uint32_t hdr_crc_self; + uint32_t __reserved; + uint64_t hdr_lba_self; + uint64_t hdr_lba_alt; + uint64_t hdr_lba_start; + uint64_t hdr_lba_end; + uuid_t hdr_uuid; + uint64_t hdr_lba_table; + uint32_t hdr_entries; + uint32_t hdr_entsz; + uint32_t hdr_crc_table; + uint32_t padding; +}; */ + typedef struct gpt_hdr gpt_hdr; + +/* Partition map entry from: IOGUIDPartitionScheme.h +struct gpt_ent +{ + uuid_t ent_type; + uuid_t ent_uuid; + uint64_t ent_lba_start; + uint64_t ent_lba_end; + uint64_t ent_attr; + uint16_t ent_name[36]; +}; */ + typedef struct gpt_ent gpt_ent; @@ -560,7 +592,6 @@ BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr) #if CORE_STORAGE_SUPPORT bool coreStoragePartition = false; #endif - for (; gptID <= gptCount; gptID++) { gptMap = (gpt_ent *) (buffer + ((gptID - 1) * gptSize)); @@ -570,9 +601,9 @@ BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr) BVRef bvr = NULL; int bvrFlags = -1; #if DEBUG_DISK - char uuidString = NULL; - convertEFIGUIDToString((EFI_GUID*)gptMap->ent_type, &uuidString); - printf("Reading GPT partition %d, type %s\n", gptID, uuidString); + char *uuidString = NULL; + convertEFIGUIDToString((EFI_GUID*)gptMap->ent_uuid, &uuidString); + printf("Partition[%d] UUID: %s\n", gptID, uuidString); sleep(1); #endif From 7e63b9c02b72c42350a691ddb1c3d1be2135200e Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 29 Dec 2012 06:30:37 +0100 Subject: [PATCH 202/623] Fix for broken release-date format release-data should be <"01/24/2012"> and not <30 31 ...> --- i386/libsaio/smbios/getters.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/smbios/getters.h b/i386/libsaio/smbios/getters.h index 54aade3..6ec296b 100755 --- a/i386/libsaio/smbios/getters.h +++ b/i386/libsaio/smbios/getters.h @@ -182,7 +182,9 @@ static SMBWord getRAMSize(void) static SMBByte getRAMType(void) { +#if (DEBUG_SMBIOS == 2) _SMBIOS_DEBUG_DUMP("In getRAMType() = %s\n", SMBMemoryDeviceTypes[DYNAMIC_RAM_OVERRIDE_TYPE]); +#endif return DYNAMIC_RAM_OVERRIDE_TYPE; } @@ -309,6 +311,7 @@ static const char * getBIOSDate(void) size_t len = strlen(smbBIOSVersion); char biosDate[len]; + bzero(biosDate, len); strncpy(biosDate, smbBIOSVersion + (len - 8), 2); strncpy(biosDate + 2, "/", 1); @@ -316,7 +319,7 @@ static const char * getBIOSDate(void) strncpy(biosDate + 5, "/20", 3); strncpy(biosDate + 8, smbBIOSVersion + (len - 10), 2); - biosDate[10] = 0; + // biosDate[10] = 0; _SMBIOS_DEBUG_DUMP("biosData = %s\n", biosDate); _SMBIOS_DEBUG_SLEEP(5); From 6a435b71c04ac536e32d2f0da4571fcedab8b406 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 29 Dec 2012 06:34:56 +0100 Subject: [PATCH 203/623] Fix struct SMBOemStrings The next update of RevoBoot will add two SMBIOS table entries so that AppleSMBIOS.kext can do its job (by adding platform-feature and apple-rom-info). --- i386/libsaio/smbios/smbios.h | 43 +++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/i386/libsaio/smbios/smbios.h b/i386/libsaio/smbios/smbios.h index 121f433..c146474 100755 --- a/i386/libsaio/smbios/smbios.h +++ b/i386/libsaio/smbios/smbios.h @@ -98,6 +98,7 @@ enum { kSMBTypePhysicalMemoryArray = 16, kSMBTypeMemoryDevice = 17, kSMBType32BitMemoryErrorInfo = 18, + kSMBTypeMemoryArrayMappedAddress = 19, kSMBType64BitMemoryErrorInfo = 33, kSMBTypeEndOfTable = 127, @@ -107,8 +108,9 @@ enum { kSMBTypeMemorySPD = 130, kSMBTypeOemProcessorType = 131, kSMBTypeOemProcessorBusSpeed = 132, + kSMBTypeOemPlatformFeature = 133, - // Structures dropped by Revolution. + // Structures dropped by RevoBoot. kSMBUnused = 255 }; @@ -306,13 +308,12 @@ typedef struct SMBSystemSlot // // OEM Strings - Type 11 (AppleSMBIOS-43) // +// Note: Used to add IODeviceTree:/rom@0/apple-rom-version (Data) +// typedef struct SMBOemStrings { - SMB_STRUCT_HEADER - SMBByte type; - SMBByte length; - SMBWord handle; + SMB_STRUCT_HEADER // Length is a fixed value (5) SMBByte count; } __attribute__((packed)) SMBOemStrings; @@ -385,6 +386,26 @@ typedef struct SMBMemoryDevice SMBByte attributes; } __attribute__((packed)) SMBMemoryDevice; +/// +/// Memory Array Mapped Address (Type 19). +/// +/// This structure provides the address mapping for a Physical Memory Array. +/// One structure is present for each contiguous address range described. +/// +typedef struct SMBMemoryArrayMappedAddress +{ + SMB_STRUCT_HEADER // Type 19 + SMBDWord StartingAddress; + SMBDWord EndingAddress; + SMBWord MemoryArrayHandle; + SMBByte PartitionWidth; + // + // Added for SMBIOS v2.7 + // + // SMBQWord ExtendedStartingAddress; + // SMBQWord ExtendedEndingAddress; +} __attribute__((packed)) SMBMemoryArrayMappedAddress; + // // Firmware Volume Description (Apple Specific - Type 128) // @@ -409,7 +430,7 @@ typedef struct FW_REGION_INFO typedef struct SMBFirmwareVolume { - SMB_STRUCT_HEADER // Type 128 + SMB_STRUCT_HEADER // Type 0x80/128 SMBByte RegionCount; SMBByte Reserved[3]; SMBDWord FirmwareFeatures; @@ -424,7 +445,7 @@ typedef struct SMBFirmwareVolume typedef struct SMBMemorySPD { - SMB_STRUCT_HEADER // Type 130 + SMB_STRUCT_HEADER // Type 0x82/130 SMBWord Type17Handle; SMBWord Offset; SMBWord Size; @@ -432,7 +453,7 @@ typedef struct SMBMemorySPD } __attribute__((packed)) SMBMemorySPD; -#if DEBUG_SMBIOS +#if (DEBUG_SMBIOS == 4) static const char * SMBMemoryDeviceTypes[] = { "RAM", /* 00h Undefined */ @@ -467,7 +488,7 @@ static const int kSMBMemoryDeviceTypeCount = sizeof(SMBMemoryDeviceTypes) / size // -// OEM Processor Type (Apple Specific - Type 131) +// OEM Processor Type (Apple Specific - Type 0x83/131) // struct SMBOemProcessorType @@ -478,7 +499,7 @@ struct SMBOemProcessorType // -// OEM Processor Bus Speed (Apple Specific - Type 132) +// OEM Processor Bus Speed (Apple Specific - Type 0x84/132) // struct SMBOemProcessorBusSpeed { @@ -488,7 +509,7 @@ struct SMBOemProcessorBusSpeed // -// OEM Platform Feature (Apple Specific - Type 133 / AppleSMBIOS-43) +// OEM Platform Feature (Apple Specific - Type 0x85/133 / AppleSMBIOS-43) // struct SMBOemPlatformFeature { From 8ba09a448db6027ab08b1473ca07206c32bdccff Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 29 Dec 2012 06:35:52 +0100 Subject: [PATCH 204/623] Device path can be an URL NetBoot preparations --- i386/libsaio/efi/essentials.h | 66 ++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/efi/essentials.h b/i386/libsaio/efi/essentials.h index a2ff079..e82986f 100755 --- a/i386/libsaio/efi/essentials.h +++ b/i386/libsaio/efi/essentials.h @@ -192,7 +192,71 @@ typedef struct } HARDDRIVE_DEVICE_PATH; -// Stuff from EDK2's EfiDevicePath.h +/* + * Stuff from EDK2's EfiDevicePath.h + */ + +// +// Networking Definitions +// + +typedef struct +{ + EFI_UINT8 Addr[4]; +} EFI_IPv4_ADDRESS; + +typedef struct +{ + EFI_UINT8 Addr[16]; +} EFI_IPv6_ADDRESS; + +typedef struct +{ + EFI_UINT8 Addr[32]; +} EFI_MAC_ADDRESS; + +typedef struct +{ + EFI_DEVICE_PATH_PROTOCOL Header; + EFI_UINT16 HBAPortNumber; + EFI_UINT16 PortMultiplierPortNumber; + EFI_UINT16 Lun; +} SATA_DEVICE_PATH; + +typedef struct +{ + EFI_DEVICE_PATH_PROTOCOL Header; + EFI_MAC_ADDRESS MacAddress; + EFI_UINT8 IfType; +} MAC_ADDR_DEVICE_PATH; + +typedef struct +{ + EFI_DEVICE_PATH_PROTOCOL Header; + EFI_IPv4_ADDRESS LocalIpAddress; + EFI_IPv4_ADDRESS RemoteIpAddress; + EFI_UINT16 LocalPort; + EFI_UINT16 RemotePort; + EFI_UINT16 Protocol; + EFI_BOOLEAN StaticIpAddress; +} IPv4_DEVICE_PATH; + +typedef struct +{ + EFI_DEVICE_PATH_PROTOCOL Header; + EFI_IPv6_ADDRESS LocalIpAddress; + EFI_IPv6_ADDRESS RemoteIpAddress; + EFI_UINT16 LocalPort; + EFI_UINT16 RemotePort; + EFI_UINT16 Protocol; + EFI_BOOLEAN StaticIpAddress; +} IPv6_DEVICE_PATH; + + +#define MSG_SATA_DP 0x12 +#define MSG_MAC_ADDR_DP 0x0b +#define MSG_IPv4_DP 0x0c +#define MSG_IPv6_DP 0x0d #define MEDIA_HARDDRIVE_DP 0x01 #define MEDIA_DEVICE_PATH 0x04 From 8c1e4533d5ee059e5d8b26d0b6ede181d46cfe1e Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 29 Dec 2012 06:36:35 +0100 Subject: [PATCH 205/623] NetBoot example added --- i386/libsaio/base64.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/base64.c b/i386/libsaio/base64.c index ea73c2d..2ffd0b6 100755 --- a/i386/libsaio/base64.c +++ b/i386/libsaio/base64.c @@ -384,10 +384,20 @@ int main(void) 2MBFLuNx23AZ7tXoCAn//BAA="; // 02 01 0c 00 d0 41 03 0a 00 00 00 00 - // 01 01 06 00 02 1f 03 12 0a 00 02 00 00 00 00 00 + // 01 01 06 00 02 1f + // 03 12 0a 00 02 00 00 00 00 00 // 04 01 2a 00 02 00 00 00 28 40 06 00 00 00 00 00 40 4b 29 25 00 00 00 00 da e8 91 de b6 30 11 4b b8 dc 76 dc 06 7b b5 7a 02 02 // 7f ff 04 00 + // 02 01 0c 00 d0 41 03 0a 00 00 00 00 + // 01 01 06 00 00 19 + // 03 0b 25 00 c8 2a 14 01 02 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + // 03 0c 13 00 00 00 00 00 c0 a8 c0 01 00 00 00 00 00 00 00 + // 7f ff 04 00 + // + // c8 2a 14 01 02 03 = Mac Address (example) + // c0 a8 c0 01 = IP address 192.168.192.1 (example) + char * uuid = getStartupDiskUUID(input); if (uuid) From ab2b1f26be15bbad248ac95cc31d36786a9cdf70 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 29 Dec 2012 06:38:27 +0100 Subject: [PATCH 206/623] Cleanup STARTUP_DISK_SUPPORT support Adding checks, comments and (changed) debug output. --- i386/boot2/boot.c | 50 +++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 6864f60..832bb74 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -211,38 +211,42 @@ void boot(int biosdev) #if (LOAD_MODEL_SPECIFIC_EFI_DATA == 0) /* - * We can only make this call here when static EFI is included from - * RevoBoot/i386/config/EFI/[MacModelNN.h] Not when the data is read - * from: /Extra/ because then: RevoBoot/i386/libsaio/platform.c calls it. + * We can only make this call here when static EFI is included from: + * RevoBoot/i386/config/EFI/[MacModelNN.h] Not when the data is read from: + * /Extra/EFI/ because then RevoBoot/i386/libsaio/platform.c makes the call. */ initPartitionChain(); #endif #if STARTUP_DISK_SUPPORT - /* - * sudo nano /etc/rc.shutdown.local - * #!/bin/sh - * /usr/sbin/nvram -x -p > /Extra/NVRAM/nvramStorage.plist - */ - config_file_t nvramStorage; - const char * path = "/Extra/NVRAM/nvramStorage.plist"; - - if (loadConfigFile(path, &nvramStorage) == STATE_SUCCESS) + // Booting from a Recovery HD ignores the Startup Disk setting (as it should). + if (gPlatform.BootRecoveryHD == false) { - _BOOT_DEBUG_DUMP("nvramStorage.plist found\n"); - - if (getValueForConfigTableKey(&nvramStorage, "efi-boot-device-data", &val, &length)) + /* + * sudo nano /etc/rc.shutdown.local + * #!/bin/sh + * /usr/sbin/nvram -x -p > /Extra/NVRAM/nvramStorage.plist + */ + config_file_t nvramStorage; + const char * path = "/Extra/NVRAM/nvramStorage.plist"; + + if (loadConfigFile(path, &nvramStorage) == STATE_SUCCESS) { - _BOOT_DEBUG_DUMP("Key 'efi-boot-device-data' found %d\n", length); - - char * uuid = getStartupDiskUUID((char *)val); + _BOOT_DEBUG_DUMP("nvramStorage.plist found\n"); - if (uuid) + if (getValueForConfigTableKey(&nvramStorage, "efi-boot-device-data", &val, &length)) { - _BOOT_DEBUG_DUMP("GUID: %s\n", uuid); - _BOOT_DEBUG_SLEEP(1); + _BOOT_DEBUG_DUMP("Key 'efi-boot-device-data' found %d\n", length); + + char * uuid = getStartupDiskUUID((char *)val); - strlcpy(rootUUID, uuid, 37); + if (uuid) + { + _BOOT_DEBUG_DUMP("GUID: %s\n", uuid); + _BOOT_DEBUG_SLEEP(1); + + strlcpy(rootUUID, uuid, 37); + } } } } @@ -250,7 +254,7 @@ void boot(int biosdev) { _BOOT_DEBUG_DUMP("Warning: unable to locate nvramStorage.plist\n"); } -#endif // #if DISK_TARGET_SUPPORT +#endif // #if STARTUP_DISK_SUPPORT #define loadCABootPlist() loadSystemConfig(&bootInfo->bootConfig) From e98115f16aa5181de8887fc95921fd0cb87180ab Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 29 Dec 2012 06:38:45 +0100 Subject: [PATCH 207/623] Follow ACPI specs --- i386/libsaio/acpi/patcher.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/acpi/patcher.h b/i386/libsaio/acpi/patcher.h index acc9233..72f9dc0 100644 --- a/i386/libsaio/acpi/patcher.h +++ b/i386/libsaio/acpi/patcher.h @@ -284,10 +284,22 @@ bool patchFACPTable(ENTRIES * xsdtEntries, int tableIndex, int dropOffset) #if STATIC_FACS_TABLE_INJECTION // Replace the factory FACS table. _ACPI_DEBUG_DUMP("patchedFADT->FIRMWARE_CTRL: 0x%08x\n", patchedFADT->FIRMWARE_CTRL); - - patchedFADT->FIRMWARE_CTRL = (uint32_t)customTables[FACS].tableAddress; - // Zero out this field conform the ACPI specification. - patchedFADT->X_FIRMWARE_CTRL = (uint64_t) 0; + + /* + * factoryFADT->FIRMWARE_CTRL is usually non zero on systems with less than 4GB. + */ + if (factoryFADT->FIRMWARE_CTRL > 0) + { + // In which case we must use this value + patchedFADT->FIRMWARE_CTRL = (uint32_t) customTables[FACS].tableAddress; + // And we must zero out this field (conform the ACPI specification). + patchedFADT->X_FIRMWARE_CTRL = (uint64_t) 0; + } + else + { + patchedFADT->FIRMWARE_CTRL = (uint32_t) 0; + patchedFADT->X_FIRMWARE_CTRL = (uint64_t) customTables[FACS].tableAddress; + } customTables[FACS].table = NULL; #endif // STATIC_FACS_TABLE_INJECTION From 61482f57b8d5a79f31f613ab705157b2695c5be6 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 29 Dec 2012 06:39:05 +0100 Subject: [PATCH 208/623] Relaxing debug delays --- i386/libsaio/platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/platform.c b/i386/libsaio/platform.c index 5de5caa..fb970fe 100644 --- a/i386/libsaio/platform.c +++ b/i386/libsaio/platform.c @@ -276,9 +276,10 @@ void initPlatform(int biosDevice) } _PLATFORM_DEBUG_DUMP("Static data for %d RAM BANKS used.\n", gPlatform.RAM.SlotCount); + _PLATFORM_DEBUG_SLEEP(10); #endif - _PLATFORM_DEBUG_SLEEP(15); + _PLATFORM_DEBUG_SLEEP(5); initKernelBootConfig(); From b5aabb7bdaa82d9334dbc451c15ae70babb1f84f Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 29 Dec 2012 06:46:21 +0100 Subject: [PATCH 209/623] SMBIOS update We can now use a double -1 value for SMBProperties[x].start and SMBProperties[x].stop to signal that there isn;'t anything we like to add/override, but the complete structure from the factory table is copied. The memory overrides are expanded. Notably the error handle feature. We now add a type 11 (kSMBTypeOemPlatformFeature) table so that AppleSMBIOS.kext can use this data and add IOService:/platform-feature. --- i386/libsaio/smbios/dynamic_data.h | 93 +++++++++++++++++++++--------- 1 file changed, 66 insertions(+), 27 deletions(-) diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index 9f9bff6..f23be7d 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -53,6 +53,8 @@ #define PROBOARD 0 #endif +#define IOSERVICE_PLATFORM_FEATURE 0x0000000000000001 + //------------------------------------------------------------------------------ struct SMBStructure @@ -69,24 +71,26 @@ struct SMBStructure struct SMBStructure requiredStructures[] = { - { kSMBTypeBIOSInformation /* 0 */ , 0, 5, false, 0 }, - { kSMBTypeSystemInformation /* 1 */ , 6, 10, false, 0 }, - { kSMBTypeBaseBoard /* 2 */ , (11 + PROBOARD), (12 + PROBOARD), false, 0 }, - { kSMBUnused /* 3 */ , 0, 0, false, 0 }, - { kSMBTypeProcessorInformation /* 4 */ , (13 + PROBOARD), (14 + PROBOARD), true, 0 }, - { kSMBUnused /* 5 */ , 0, 0, false, 0 }, - { kSMBUnused /* 6 */ , 0, 0, false, 0 }, - { kSMBUnused /* 7 */ , 0, 0, false, 0 }, - { kSMBUnused /* 8 */ , 0, 0, false, 0 }, - { kSMBUnused /* 9 */ , 0, 0, false, 0 }, - { kSMBUnused /* 10 */ , 0, 0, false, 0 }, - { kSMBUnused /* 11 */ , 0, 0, false, 0 }, - { kSMBUnused /* 12 */ , 0, 0, false, 0 }, - { kSMBUnused /* 13 */ , 0, 0, false, 0 }, - { kSMBUnused /* 14 */ , 0, 0, false, 0 }, - { kSMBUnused /* 15 */ , 0, 0, false, 0 }, - { kSMBUnused /* 16 */ , 0, 0, false, 0 }, - { kSMBTypeMemoryDevice /* 17 */ , (15 + PROBOARD), (19 + PROBOARD), true, 0 } + { kSMBTypeBIOSInformation /* 0 */ , 0, 5, false, 0 }, + { kSMBTypeSystemInformation /* 1 */ , 6, 10, false, 0 }, + { kSMBTypeBaseBoard /* 2 */ , (11 + PROBOARD), (12 + PROBOARD), false, 0 }, + { kSMBUnused /* 3 */ , 0, 0, false, 0 }, + { kSMBTypeProcessorInformation /* 4 */ , (13 + PROBOARD), (14 + PROBOARD), true, 0 }, + { kSMBUnused /* 5 */ , 0, 0, false, 0 }, + { kSMBUnused /* 6 */ , 0, 0, false, 0 }, + { kSMBUnused /* 7 */ , 0, 0, false, 0 }, + { kSMBUnused /* 8 */ , 0, 0, false, 0 }, + { kSMBUnused /* 9 */ , 0, 0, false, 0 }, + { kSMBUnused /* 10 */ , 0, 0, false, 0 }, + { kSMBUnused /* 11 */ , 0, 0, false, 0 }, + { kSMBUnused /* 12 */ , 0, 0, false, 0 }, + { kSMBUnused /* 13 */ , 0, 0, false, 0 }, + { kSMBUnused /* 14 */ , 0, 0, false, 0 }, + { kSMBUnused /* 15 */ , 0, 0, false, 0 }, + { kSMBUnused /* 16 */ , 0, 0, false, 0 }, + { kSMBTypeMemoryDevice /* 17 */ , (15 + PROBOARD), (20 + PROBOARD), true, 0 }, + { kSMBUnused /* 18 */ , 0, 0, false, 0 }, + { kSMBTypeMemoryArrayMappedAddress /* 19 */ , -1, -1, false, 0 } }; @@ -158,7 +162,15 @@ struct SMBProperty SMBProperties[] = { kSMBTypeProcessorInformation, 0x14, kSMBWord, .getSMBWord = getCPUFrequency }, //---------------------------------------------------------------------------------------------------- - + +#if DYNAMIC_RAM_OVERRIDE_ERROR_HANDLE + // Handle or instance number associated with any error that was previously detected for the device. + // If the system does not provide the error information structure, then this field contains FFFEh; + // otherwise this field contains either FFFFh (if no error was detected) or the handle (number) of + // the error information structure. See 7.18.4 and 7.34 of the SMBIOS specification. + { kSMBTypeMemoryDevice, 0x06, kSMBWord, .plainData = 0xFFFE }, +#endif + #if DYNAMIC_RAM_OVERRIDE_SIZE { kSMBTypeMemoryDevice, 0x0c, kSMBWord, .getSMBWord = getRAMSize }, #endif @@ -280,8 +292,8 @@ void setupSMBIOS(void) newtablesPtr += 8; } -#if (DYNAMIC_RAM_OVERRIDE_SIZE || DYNAMIC_RAM_OVERRIDE_TYPE || DYNAMIC_RAM_OVERRIDE_FREQUENCY) - requiredStructures[17].stop = (sizeof(SMBProperties) / sizeof(SMBProperties[0])) -1; +#if (DYNAMIC_RAM_OVERRIDE_ERROR_HANDLE || DYNAMIC_RAM_OVERRIDE_SIZE || DYNAMIC_RAM_OVERRIDE_TYPE || DYNAMIC_RAM_OVERRIDE_FREQUENCY) + requiredStructures[17].stop = PROBOARD + (sizeof(SMBProperties) / sizeof(SMBProperties[0])) -1; #endif //------------------------------------------------------------------------------ @@ -292,7 +304,7 @@ void setupSMBIOS(void) struct SMBStructHeader * factoryHeader = (struct SMBStructHeader *) structurePtr; SMBByte currentStructureType = factoryHeader->type; - if ((currentStructureType > 17) || (requiredStructures[currentStructureType].type == kSMBUnused)) + if ((currentStructureType > 19) || (requiredStructures[currentStructureType].type == kSMBUnused)) { // _SMBIOS_DEBUG_DUMP("Dropping SMBIOS structure: %d\n", currentStructureType); @@ -408,13 +420,21 @@ void setupSMBIOS(void) { const char * str = ""; -#if (DEBUG_SMBIOS & 2) if (SMBProperties[j].type != currentStructureType) { - printf("SMBIOS Patcher Error: Turbo Index [%d != %d] Mismatch!\n", SMBProperties[j].type, currentStructureType); +#if (DEBUG_SMBIOS & 2) + /* + * When SMBProperties[j].start and SMBProperties[j].stop are set to -1 + * then there isn't anything to add/replace, but that is not an error. + */ + if ((SMBProperties[j].start > -1) && (SMBProperties[j].stop > -1)) + { + printf("SMBIOS Patcher Error: Turbo Index [%d != %d] Mismatch!\n", SMBProperties[j].type, currentStructureType); + } +#endif continue; } -#endif + switch (SMBProperties[j].valueType) { case kSMBByte: @@ -450,7 +470,7 @@ void setupSMBIOS(void) { memcpy(newtablesPtr, str, size); newtablesPtr[size] = 0; - newtablesPtr += size + 1; + newtablesPtr += (size + 1); *((uint8_t *)(((char *)newHeader) + SMBProperties[j].offset)) = ++numberOfStrings; } break; @@ -468,6 +488,25 @@ void setupSMBIOS(void) requiredStructures[currentStructureType].hits++; } + //------------------------------------------------------------------------------ + // Add Platform Feature structure (Apple Specific Type 0x85/133). + // + // Note: AppleSMBIOS.kext will use this data for: IOService:/platform-feature + + newHeader = (struct SMBStructHeader *) newtablesPtr; + + newHeader->type = kSMBTypeOemPlatformFeature; + newHeader->length = 0x0C; + newHeader->handle = ++handle; + + *((uint64_t *)(((char *)newHeader) + 4)) = IOSERVICE_PLATFORM_FEATURE; + + // Update EPS + newEPS->dmi.tableLength += 0x0E; // 0x0C + two (00 00) + newEPS->dmi.structureCount++; + + newtablesPtr += 0x0E; + //------------------------------------------------------------------------------ // Add EndOfTable structure. @@ -475,7 +514,7 @@ void setupSMBIOS(void) newHeader->type = kSMBTypeEndOfTable; newHeader->length = 4; - newHeader->handle = ++handle; + newHeader->handle = 0xFFFD; // ++handle; newtablesPtr += 6; From e128dd28d5442f055a589b99b0d045ff456ba46f Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 29 Dec 2012 06:49:33 +0100 Subject: [PATCH 210/623] Fix CPU detection This change was documented by Sam, but never made it to her Github repo. --- i386/libsaio/cpu/Intel/dynamic_data.h | 53 ++++++++++++++++----------- i386/libsaio/cpu/essentials.h | 4 ++ 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index d8c4c8c..45c40f3 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -162,8 +162,9 @@ unsigned long getQPISpeed(uint64_t aFSBFrequency) void initCPUStruct(void) { - bool SandyBridge = false; - bool IvyBridge = false; + // bool SandyBridge = false; + // bool IvyBridge = false; + uint8_t CoreBridgeType = 0; uint8_t maxcoef, maxdiv, currcoef, currdiv; @@ -301,11 +302,11 @@ void initCPUStruct(void) //-------------------------------------------------------------------------- // Setup features. - gPlatform.CPU.Features |= getCachedCPUID(LEAF_1, ecx); - gPlatform.CPU.Features |= getCachedCPUID(LEAF_1, edx); + // gPlatform.CPU.Features |= getCachedCPUID(LEAF_1, ecx); + // gPlatform.CPU.Features |= getCachedCPUID(LEAF_1, edx); // Add extended features. - gPlatform.CPU.Features |= getCachedCPUID(LEAF_81, ecx); - gPlatform.CPU.Features |= getCachedCPUID(LEAF_81, edx); + // gPlatform.CPU.Features |= getCachedCPUID(LEAF_81, ecx); + // gPlatform.CPU.Features |= getCachedCPUID(LEAF_81, edx); fsbFrequency = 0; cpuFrequency = 0; @@ -322,24 +323,32 @@ void initCPUStruct(void) switch (gPlatform.CPU.Model) { - case CPU_MODEL_SB_CORE: - case CPU_MODEL_SB_JAKETOWN: - SandyBridge = true; - case CPU_MODEL_DALES_32NM: - case CPU_MODEL_WESTMERE: - case CPU_MODEL_WESTMERE_EX: + CoreBridgeType = DALES_BRIDGE; /* * This should be the same as Nehalem but an A0 silicon bug returns * invalid data in the top 12 bits. Hence, we use only bits [19..16] - * rather than [31..16] for core count - which actually can't exceed 8. - */ + * rather than [31..16] for core count - which actually can't exceed 8. + */ + hiBit = 19; + break; + + case CPU_MODEL_SB_CORE: + case CPU_MODEL_SB_JAKETOWN: + CoreBridgeType = SANDY_BRIDGE; + hiBit = 19; + break; + + case CPU_MODEL_WESTMERE: + case CPU_MODEL_WESTMERE_EX: hiBit = 19; break; case CPU_MODEL_IB_CORE: case CPU_MODEL_IB_CORE_EX: - IvyBridge = true; + CoreBridgeType = IVY_BRIDGE; + hiBit = 31; + break; case CPU_MODEL_NEHALEM: case CPU_MODEL_NEHALEM_EX: @@ -366,15 +375,15 @@ void initCPUStruct(void) // Get 'cpu-type' for our SMBIOS patcher. if (strstr(gPlatform.CPU.BrandString, "Core(TM) i7")) { - gPlatform.CPU.Type = 0x701; // Core i7 + gPlatform.CPU.Type = (0x700 + CoreBridgeType); // Core i7 } else if (strstr(gPlatform.CPU.BrandString, "Core(TM) i5")) { - gPlatform.CPU.Type = 0x601; // Core i5 + gPlatform.CPU.Type = (0x600 + CoreBridgeType); // Core i5 } else if (strstr(gPlatform.CPU.BrandString, "Core(TM) i3")) { - gPlatform.CPU.Type = 0x901; // Core i3 + gPlatform.CPU.Type = (0x900 + CoreBridgeType); // Core i3 } msr = rdmsr64(MSR_PLATFORM_INFO); @@ -388,9 +397,9 @@ void initCPUStruct(void) requestMaxTurbo(maxBusRatio); } - if (SandyBridge || IvyBridge) + if (CoreBridgeType) // (SandyBridge || IvyBridge) { - gPlatform.CPU.Type |= 0x02; // Note: Use 0x01 here for the new Macmini5,1 (to get cpu-type = 0x602). + // gPlatform.CPU.Type += CoreBridgeType; #if AUTOMATIC_SSDT_PR_CREATION || DEBUG_CPU_TDP gPlatform.CPU.TDP = getTDP(); @@ -476,7 +485,7 @@ void initCPUStruct(void) } } - if (!fsbFrequency && !SandyBridge && !IvyBridge) + if (!fsbFrequency && !CoreBridgeType) // !SandyBridge && !IvyBridge) { fsbFrequency = (DEFAULT_FSB * 1000); cpuFrequency = tscFrequency; @@ -523,7 +532,7 @@ void initCPUStruct(void) _CPU_DEBUG_DUMP("CPU: NumCores/NumThreads : %d/%d\n", gPlatform.CPU.NumCores, gPlatform.CPU.NumThreads); - if (SandyBridge) + if (CoreBridgeType) // SandyBridge) { _CPU_DEBUG_DUMP("CPU: Min/Max busratio : %d/%d\n", gPlatform.CPU.MinBusRatio, gPlatform.CPU.MaxBusRatio); } diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index 1a9cd01..f955ad5 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -128,4 +128,8 @@ #define CPU_MODEL_IB_CORE 0x3A // Ivy Bridge Core Processors (LGA 1155) #define CPU_MODEL_IB_CORE_EX 0x3B // Ivy Bridge Core Processors (LGA 2011) +#define DALES_BRIDGE 1 +#define SANDY_BRIDGE 2 +#define IVY_BRIDGE 4 + #endif /* !__LIBSAIO_CPU_ESSENTIALS_H */ From 164940d1c98c99c6fea915c1f0cfc521118fc1da Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 29 Dec 2012 06:50:06 +0100 Subject: [PATCH 211/623] Removing unused file. --- i386/libsaio/smbios/tools/smbios.h | 472 ----------------------------- 1 file changed, 472 deletions(-) delete mode 100644 i386/libsaio/smbios/tools/smbios.h diff --git a/i386/libsaio/smbios/tools/smbios.h b/i386/libsaio/smbios/tools/smbios.h deleted file mode 100644 index 2982e02..0000000 --- a/i386/libsaio/smbios/tools/smbios.h +++ /dev/null @@ -1,472 +0,0 @@ -/* - * Copyright (c) 1998-2009 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -// #include <IOKit/IOLib.h> - -// -// Based on System Management BIOS Reference Specification v2.5 -// - -typedef bool SMBBool; -typedef UInt8 SMBString; -typedef UInt8 SMBByte; -typedef UInt16 SMBWord; -typedef UInt32 SMBDWord; -typedef UInt64 SMBQWord; - -typedef struct DMIEntryPoint -{ - SMBByte anchor[5]; - SMBByte checksum; - SMBWord tableLength; - SMBDWord tableAddress; - SMBWord structureCount; - SMBByte bcdRevision; -} __attribute__((packed)) DMIEntryPoint; - -typedef struct SMBEntryPoint -{ - SMBByte anchor[4]; - SMBByte checksum; - SMBByte entryPointLength; - SMBByte majorVersion; - SMBByte minorVersion; - SMBWord maxStructureSize; - SMBByte entryPointRevision; - SMBByte formattedArea[5]; - struct DMIEntryPoint dmi; -} __attribute__((packed)) SMBEntryPoint; - -// -// Header common to all SMBIOS structures -// - -typedef struct SMBStructHeader -{ - SMBByte type; - SMBByte length; - SMBWord handle; -} __attribute__((packed)) SMBStructHeader; - -#define SMB_STRUCT_HEADER SMBStructHeader header; - -typedef struct SMBAnchor -{ - const SMBStructHeader * header; - const UInt8 * next; - const UInt8 * end; -} SMBAnchor; - -#define SMB_ANCHOR_IS_VALID(x) \ - ((x) && ((x)->header) && ((x)->next) && ((x)->end)) - -#define SMB_ANCHOR_RESET(x) \ - bzero(x, sizeof(struct SMBAnchor)); - -// -// SMBIOS structure types. -// - -enum { - kSMBTypeBIOSInformation = 0, - kSMBTypeSystemInformation = 1, - kSMBTypeBaseBoard = 2, - kSMBTypeSystemEnclosure = 3, - kSMBTypeProcessorInformation = 4, - kSMBTypeMemoryModule = 6, - kSMBTypeCacheInformation = 7, - kSMBTypeSystemSlot = 9, - kSMBTypePhysicalMemoryArray = 16, - kSMBTypeMemoryDevice = 17, - kSMBType32BitMemoryErrorInfo = 18, - kSMBType64BitMemoryErrorInfo = 33, - - kSMBTypeEndOfTable = 127, - - // Apple Specific Structures. - kSMBTypeFirmwareVolume = 128, - kSMBTypeMemorySPD = 130, - kSMBTypeOemProcessorType = 131, - kSMBTypeOemProcessorBusSpeed = 132, - - // Structures dropped by Revolution. - kSMBUnused = 255 -}; - -// -// BIOS Information (Type 0) -// -typedef struct SMBBIOSInformation -{ - SMB_STRUCT_HEADER // Type 0 - SMBString vendor; // BIOS vendor name - SMBString version; // BIOS version - SMBWord startSegment; // BIOS segment start - SMBString releaseDate; // BIOS release date - SMBByte romSize; // (n); 64K * (n+1) bytes - SMBQWord characteristics; // supported BIOS functions -} __attribute__((packed)) SMBBIOSInformation; - -// -// System Information (Type 1) -// - -typedef struct SMBSystemInformation -{ - // 2.0+ spec (8 bytes) - SMB_STRUCT_HEADER // Type 1 - SMBString manufacturer; - SMBString productName; - SMBString version; - SMBString serialNumber; - // 2.1+ spec (25 bytes) - SMBByte uuid[16]; // can be all 0 or all 1's - SMBByte wakeupReason; // reason for system wakeup -} __attribute__((packed)) SMBSystemInformation; - -// -// Base Board (Type 2) -// - -typedef struct SMBBaseBoard -{ - SMB_STRUCT_HEADER // Type 2 - SMBString manufacturer; - SMBString product; - SMBString version; - SMBString serialNumber; - SMBString assetTagNumber; - SMBByte featureFlags; - SMBString locationInChassis; - SMBWord chassisHandle; - SMBByte boardType; - SMBByte numberOfContainedHandles; - // 0 - 255 contained handles go here but we do not include - // them in our structure. Be careful to use numberOfContainedHandles - // times sizeof(SMBWord) when computing the actual record size, - // if you need it. -} __attribute__((packed)) SMBBaseBoard; - -// Values for boardType in Type 2 records -enum -{ - kSMBBaseBoardUnknown = 0x01, - kSMBBaseBoardOther = 0x02, - kSMBBaseBoardServerBlade = 0x03, - kSMBBaseBoardConnectivitySwitch = 0x04, - kSMBBaseBoardSystemMgmtModule = 0x05, - kSMBBaseBoardProcessorModule = 0x06, - kSMBBaseBoardIOModule = 0x07, - kSMBBaseBoardMemoryModule = 0x08, - kSMBBaseBoardDaughter = 0x09, - kSMBBaseBoardMotherboard = 0x0A, - kSMBBaseBoardProcessorMemoryModule = 0x0B, - kSMBBaseBoardProcessorIOModule = 0x0C, - kSMBBaseBoardInterconnect = 0x0D, -}; - - -// -// System Enclosure (Type 3) -// - -typedef struct SMBSystemEnclosure -{ - SMB_STRUCT_HEADER // Type 3 - SMBString manufacturer; - SMBByte type; - SMBString version; - SMBString serialNumber; - SMBString assetTagNumber; - SMBByte bootupState; - SMBByte powerSupplyState; - SMBByte thermalState; - SMBByte securityStatus; - SMBDWord oemDefined; -} __attribute__((packed)) SMBSystemEnclosure; - -// -// Processor Information (Type 4) -// - -typedef struct SMBProcessorInformation -{ - // 2.0+ spec (26 bytes) - SMB_STRUCT_HEADER // Type 4 - SMBString socketDesignation; - SMBByte processorType; // CPU = 3 - SMBByte processorFamily; // processor family enum - SMBString manufacturer; - SMBQWord processorID; // based on CPUID - SMBString processorVersion; - SMBByte voltage; // bit7 cleared indicate legacy mode - SMBWord externalClock; // external clock in MHz - SMBWord maximumClock; // max internal clock in MHz - SMBWord currentClock; // current internal clock in MHz - SMBByte status; - SMBByte processorUpgrade; // processor upgrade enum - // 2.1+ spec (32 bytes) - SMBWord L1CacheHandle; - SMBWord L2CacheHandle; - SMBWord L3CacheHandle; - // 2.3+ spec (35 bytes) - SMBString serialNumber; - SMBString assetTag; - SMBString partNumber; - // 2.5+ spec (40 bytes) - SMBByte coreCount; // Number of cores detected by the BIOS. - SMBByte coreEnabled; // Number of cores that are enabled by the BIOS. - SMBByte threadCount; // Number of threads that are supported by this CPU (not per core). - SMBWord processorFuncSupport; // Defines which functions the processor supports. - /* 2.6+ spec (42 bytes) - SMBWord processorFamily; */ -} __attribute__((packed)) SMBProcessorInformation; - -#define kSMBProcessorInformationMinSize 26 - -// -// Memory Module Information (Type 6) -// Obsoleted since SMBIOS version 2.1 -// - -typedef struct SMBMemoryModule -{ - SMB_STRUCT_HEADER // Type 6 - SMBString socketDesignation; - SMBByte bankConnections; - SMBByte currentSpeed; - SMBWord currentMemoryType; - SMBByte installedSize; - SMBByte enabledSize; - SMBByte errorStatus; -} __attribute__((packed)) SMBMemoryModule; - -#define kSMBMemoryModuleSizeNotDeterminable 0x7D -#define kSMBMemoryModuleSizeNotEnabled 0x7E -#define kSMBMemoryModuleSizeNotInstalled 0x7F - -// -// Cache Information (Type 7) -// - -typedef struct SMBCacheInformation -{ - SMB_STRUCT_HEADER // Type 7 - SMBString socketDesignation; - SMBWord cacheConfiguration; - SMBWord maximumCacheSize; - SMBWord installedSize; - SMBWord supportedSRAMType; - SMBWord currentSRAMType; - // 2.1+ spec (12 ??? bytes) - SMBByte cacheSpeed; - SMBByte errorCorrectionType; - SMBByte systemCacheType; - SMBByte associativity; -} __attribute__((packed)) SMBCacheInformation; - -typedef struct SMBSystemSlot -{ - // 2.0+ spec (12 bytes) - SMB_STRUCT_HEADER // Type 9 - SMBString slotDesignation; - SMBByte slotType; - SMBByte slotDataBusWidth; - SMBByte currentUsage; - SMBByte slotLength; - SMBWord slotID; - SMBByte slotCharacteristics1; - // 2.1+ spec (13 bytes) - SMBByte slotCharacteristics2; - // 2.6+ spec (17 bytes) - SMBWord segmentGroupNumber; - SMBByte busNumber; - SMBByte deviceFunctionNumber; -} __attribute__((packed)) SMBSystemSlot; - -// -// Physical Memory Array (Type 16) -// - -typedef struct SMBPhysicalMemoryArray -{ - // 2.1+ spec (15 bytes) - SMB_STRUCT_HEADER // Type 16 - SMBByte physicalLocation; // physical location - SMBByte arrayUse; // the use for the memory array - SMBByte errorCorrection; // error correction/detection method - SMBDWord maximumCapacity; // maximum memory capacity in kilobytes - SMBWord errorHandle; // handle of a previously detected error - SMBWord numMemoryDevices; // number of memory slots or sockets -} __attribute__((packed)) SMBPhysicalMemoryArray; - -// Memory Array - Use -enum -{ - kSMBMemoryArrayUseOther = 0x01, - kSMBMemoryArrayUseUnknown = 0x02, - kSMBMemoryArrayUseSystemMemory = 0x03, - kSMBMemoryArrayUseVideoMemory = 0x04, - kSMBMemoryArrayUseFlashMemory = 0x05, - kSMBMemoryArrayUseNonVolatileMemory = 0x06, - kSMBMemoryArrayUseCacheMemory = 0x07 -}; - -// Memory Array - Error Correction Types -enum -{ - kSMBMemoryArrayErrorCorrectionTypeOther = 0x01, - kSMBMemoryArrayErrorCorrectionTypeUnknown = 0x02, - kSMBMemoryArrayErrorCorrectionTypeNone = 0x03, - kSMBMemoryArrayErrorCorrectionTypeParity = 0x04, - kSMBMemoryArrayErrorCorrectionTypeSingleBitECC = 0x05, - kSMBMemoryArrayErrorCorrectionTypeMultiBitECC = 0x06, - kSMBMemoryArrayErrorCorrectionTypeCRC = 0x07 -}; - -// -// Memory Device (Type 17) -// - -typedef struct SMBMemoryDevice -{ - // 2.1+ spec (21 bytes) - SMB_STRUCT_HEADER // Type 17 - SMBWord arrayHandle; // handle of the parent memory array - SMBWord errorHandle; // handle of a previously detected error - SMBWord totalWidth; // total width in bits; including ECC bits - SMBWord dataWidth; // data width in bits - SMBWord memorySize; // bit15 is scale, 0 = MB, 1 = KB - SMBByte formFactor; // memory device form factor - SMBByte deviceSet; // parent set of identical memory devices - SMBString deviceLocator; // labeled socket; e.g. "SIMM 3" - SMBString bankLocator; // labeled bank; e.g. "Bank 0" or "A" - SMBByte memoryType; // type of memory - SMBWord memoryTypeDetail; // additional detail on memory type - // 2.3+ spec (27 bytes) - SMBWord memorySpeed; // speed of device in MHz (0 for unknown) - SMBString manufacturer; - SMBString serialNumber; - SMBString assetTag; - SMBString partNumber; - // 2.6+ spec (28 bytes) - SMBByte attributes; -} __attribute__((packed)) SMBMemoryDevice; - -// -// Firmware Volume Description (Apple Specific - Type 128) -// - -enum -{ - FW_REGION_RESERVED = 0, - FW_REGION_RECOVERY = 1, - FW_REGION_MAIN = 2, - FW_REGION_NVRAM = 3, - FW_REGION_CONFIG = 4, - FW_REGION_DIAGVAULT = 5, - - NUM_FLASHMAP_ENTRIES = 8 -}; - -typedef struct FW_REGION_INFO -{ - SMBDWord StartAddress; - SMBDWord EndAddress; -} __attribute__((packed)) FW_REGION_INFO; - -typedef struct SMBFirmwareVolume -{ - SMB_STRUCT_HEADER // Type 128 - SMBByte RegionCount; - SMBByte Reserved[3]; - SMBDWord FirmwareFeatures; - SMBDWord FirmwareFeaturesMask; - SMBByte RegionType[ NUM_FLASHMAP_ENTRIES ]; - FW_REGION_INFO FlashMap[ NUM_FLASHMAP_ENTRIES ]; -} __attribute__((packed)) SMBFirmwareVolume; - -// -// Memory SPD Data (Apple Specific - Type 130) -// - -typedef struct SMBMemorySPD -{ - SMB_STRUCT_HEADER // Type 130 - SMBWord Type17Handle; - SMBWord Offset; - SMBWord Size; - SMBWord Data[]; -} __attribute__((packed)) SMBMemorySPD; - -static const char * SMBMemoryDeviceTypes[] = -{ - "RAM", /* 00h Undefined */ - "RAM", /* 01h Other */ - "RAM", /* 02h Unknown */ - "DRAM", /* 03h DRAM */ - "EDRAM", /* 04h EDRAM */ - "VRAM", /* 05h VRAM */ - "SRAM", /* 06h SRAM */ - "RAM", /* 07h RAM */ - "ROM", /* 08h ROM */ - "FLASH", /* 09h FLASH */ - "EEPROM", /* 0Ah EEPROM */ - "FEPROM", /* 0Bh FEPROM */ - "EPROM", /* 0Ch EPROM */ - "CDRAM", /* 0Dh CDRAM */ - "3DRAM", /* 0Eh 3DRAM */ - "SDRAM", /* 0Fh SDRAM */ - "SGRAM", /* 10h SGRAM */ - "RDRAM", /* 11h RDRAM */ - "DDR SDRAM", /* 12h DDR */ - "DDR2 SDRAM", /* 13h DDR2 */ - "DDR2 FB-DIMM", /* 14h DDR2 FB-DIMM */ - "RAM", /* 15h unused */ - "RAM", /* 16h unused */ - "RAM", /* 17h unused */ - "DDR3", /* 18h DDR3, chosen in [5776134] */ -}; - -static const int kSMBMemoryDeviceTypeCount = sizeof(SMBMemoryDeviceTypes) / sizeof(SMBMemoryDeviceTypes[0]); - -// -// OEM Processor Type (Apple Specific - Type 131) -// - -struct SMBOemProcessorType -{ - SMB_STRUCT_HEADER - SMBWord ProcessorType; -} __attribute__((packed)) SMBOemProcessorType; - -// -// OEM Processor Bus Speed (Apple Specific - Type 132) -// -struct SMBOemProcessorBusSpeed -{ - SMB_STRUCT_HEADER - SMBWord ProcessorBusSpeed; // MT/s unit -} __attribute__((packed)) SMBOemProcessorBusSpeed; - - - From 755b8749b5075c117694e690fdef5f6383315767 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 29 Dec 2012 06:59:08 +0100 Subject: [PATCH 212/623] Adding support for table type 11, 19 and 133 The current version of RevoBoot adds type 11 and 19, but type 133 is not yet implemented. However. We will add support for it in our next update. --- i386/libsaio/smbios/smbios.h | 1 + i386/libsaio/smbios/tools/smbios2struct3.c | 37 ++++++++++++---------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/i386/libsaio/smbios/smbios.h b/i386/libsaio/smbios/smbios.h index c146474..f9b89c0 100755 --- a/i386/libsaio/smbios/smbios.h +++ b/i386/libsaio/smbios/smbios.h @@ -95,6 +95,7 @@ enum { kSMBTypeMemoryModule = 6, kSMBTypeCacheInformation = 7, kSMBTypeSystemSlot = 9, + kSMBTypeOemStrings = 11, kSMBTypePhysicalMemoryArray = 16, kSMBTypeMemoryDevice = 17, kSMBType32BitMemoryErrorInfo = 18, diff --git a/i386/libsaio/smbios/tools/smbios2struct3.c b/i386/libsaio/smbios/tools/smbios2struct3.c index 297be55..3be8a8a 100755 --- a/i386/libsaio/smbios/tools/smbios2struct3.c +++ b/i386/libsaio/smbios/tools/smbios2struct3.c @@ -29,7 +29,7 @@ #include "../smbios.h" #define DEBUG 0 // Set to 1 for additional (debug) output -#define VERBOSE 0 +#define VERBOSE 1 #if VERBOSE #define VERBOSE_DUMP(x...) printf(x) @@ -42,7 +42,7 @@ //============================================================================== -char tableDescriptions[133][36] = +char tableDescriptions[134][36] = { /* 0 */ "BIOS Information", /* 1 */ "System Information", @@ -102,6 +102,7 @@ char tableDescriptions[133][36] = /* 130 */ "Memory SPD Data", /* 131 */ "OEM Processor Type", /* 132 */ "OEM Processor Bus Speed" + /* 133 */ "OEM Platform Feature" }; @@ -351,19 +352,22 @@ int main(int argc, char * argv[]) switch (header->type) { - case kSMBTypeBIOSInformation: // Type 0 - case kSMBTypeSystemInformation: // Type 1 - case kSMBTypeBaseBoard: // Type 2 - case kSMBTypeProcessorInformation: // Type 4 - // case kSMBTypeMemoryModule: // Type 6 - // case kSMBTypeSystemSlot: // Type 9 - case kSMBTypePhysicalMemoryArray: // Type 16 - case kSMBTypeMemoryDevice: // Type 17 - case kSMBTypeEndOfTable: // Type 127 - case kSMBTypeFirmwareVolume: // Type 128 - case kSMBTypeMemorySPD: // Type 130 - case kSMBTypeOemProcessorType: // Type 131 - case kSMBTypeOemProcessorBusSpeed: // Type 132 + case kSMBTypeBIOSInformation: // Type 0 + case kSMBTypeSystemInformation: // Type 1 + case kSMBTypeBaseBoard: // Type 2 + case kSMBTypeProcessorInformation: // Type 4 + // case kSMBTypeMemoryModule: // Type 6 + // case kSMBTypeSystemSlot: // Type 9 + case kSMBTypeOemStrings: // Type 11 + case kSMBTypePhysicalMemoryArray: // Type 16 + case kSMBTypeMemoryDevice: // Type 17 + case kSMBTypeMemoryArrayMappedAddress: // Type 19 + case kSMBTypeEndOfTable: // Type 127 + case kSMBTypeFirmwareVolume: // Type 128 + case kSMBTypeMemorySPD: // Type 130 + case kSMBTypeOemProcessorType: // Type 131 + case kSMBTypeOemProcessorBusSpeed: // Type 132 + case kSMBTypeOemPlatformFeature: // Type 133 newStructureCount++; tableStructureStart = tablePtr; @@ -382,7 +386,8 @@ int main(int argc, char * argv[]) tablePtr += header->length; // Skip the unformatted structure area at the end (strings). - for (; tableEndPtr > tablePtr + sizeof(SMBStructHeader); tablePtr++) + // for (; tableEndPtr > tablePtr + sizeof(SMBStructHeader); tablePtr++) + for (; tableEndPtr > tablePtr; tablePtr++) { // Look for a terminating double NULL. if (tablePtr[0] == 0 && tablePtr[1] == 0) From 6e5b030398bb321ec09d698e504c31d268b760b1 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 4 Jan 2013 12:11:38 +0100 Subject: [PATCH 213/623] Use a 64-bit return value for Mountain Lion --- i386/libsaio/efi/fake_efi.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/efi/fake_efi.h b/i386/libsaio/efi/fake_efi.h index 2f4ea76..45c5686 100755 --- a/i386/libsaio/efi/fake_efi.h +++ b/i386/libsaio/efi/fake_efi.h @@ -136,7 +136,11 @@ void setupEFITables(void) static uint8_t const VOIDRET_INSTRUCTIONS[] = { 0xc3 }; // movl $0x80000003,%eax; ret - static uint8_t const UNSUPPORTEDRET_INSTRUCTIONS[] = { 0xb8, 0x03, 0x00, 0x00, 0x80, 0xc3 }; + // static uint8_t const UNSUPPORTEDRET_INSTRUCTIONS[] = { 0xb8, 0x03, 0x00, 0x00, 0x80, 0xc3 }; + + // movabs $0x8000000000000003,%rax + // ret + static uint8_t const UNSUPPORTEDRET_INSTRUCTIONS[] = { 0x48, 0xb8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc3 }; // Occupying a single 4 KB memory block (wired page) to prevent multiple smaller allocations. struct EFI_Container From 95cc2108a9c8acb95c67fcd212ae78d246f429d9 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 4 Jan 2013 12:12:10 +0100 Subject: [PATCH 214/623] Comment only change --- i386/libsaio/acpi/essentials.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/essentials.h b/i386/libsaio/acpi/essentials.h index 0b66f09..255e179 100644 --- a/i386/libsaio/acpi/essentials.h +++ b/i386/libsaio/acpi/essentials.h @@ -261,7 +261,7 @@ typedef struct acpi_2_fadt { char Signature[4]; // FADT uint32_t Length; // Length varies per revision. - uint8_t Revision; // 1-4. + uint8_t Revision; // 1-5. uint8_t Checksum; char OEMID[6]; char OEMTableID[8]; From 59ec4fa3cfbee7325bfaf42fa07fda5a7238bada Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 4 Jan 2013 12:12:49 +0100 Subject: [PATCH 215/623] Add Apple TV GUID (for reference only) --- i386/libsaio/disk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i386/libsaio/disk.c b/i386/libsaio/disk.c index 839c372..c763210 100644 --- a/i386/libsaio/disk.c +++ b/i386/libsaio/disk.c @@ -146,6 +146,9 @@ static struct disk_blk0 * gBootSector = NULL; // Apple_HFS EFI_GUID const GPT_HFS_GUID = { 0x48465300, 0x0000, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; +// Apple TV +EFI_GUID const GPT_HFSX_GUID = { 0x5265636F, 0x7665, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; + #if CORE_STORAGE_SUPPORT || APPLE_RAID_SUPPORT // Apple_Boot (RAID helper partition and the 650 MB 'Recovery HD' partition). EFI_GUID const GPT_BOOT_GUID = { 0x426F6F74, 0x0000, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; From 9600237488a8ffbc4743d8546908a7f803ad2520 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 4 Jan 2013 18:41:51 +0100 Subject: [PATCH 216/623] Moving stuff from, fake_efi.h to efi.h --- i386/libsaio/efi/efi.h | 42 +++++++++++++++++++++++++++++++++++-- i386/libsaio/efi/fake_efi.h | 11 +++------- 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/i386/libsaio/efi/efi.h b/i386/libsaio/efi/efi.h index 01422c4..a4d1fa9 100755 --- a/i386/libsaio/efi/efi.h +++ b/i386/libsaio/efi/efi.h @@ -33,13 +33,51 @@ // Set up space for up to 5 tables but we currently only add two. #define EFI_MAX_CONFIG_TABLES 5 -#define EFI_MAX_BIT 0x80000000 +#if EFI_64_BIT + // Mountain Lion + // + // movabs $0x8000000000000003,%rax + // ret + static uint8_t const UNSUPPORTEDRET_INSTRUCTIONS[] = { 0x48, 0xb8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc3 }; +#else + // Lion, Snow Leopard and Leopard + // + // movl $0x80000003,%eax + // ret + static uint8_t const UNSUPPORTEDRET_INSTRUCTIONS[] = { 0xb8, 0x03, 0x00, 0x00, 0x80, 0xc3 }; +#endif + +/// +/// 32/64-bit native width with the highest bit set. +/// +#if EFI_64_BIT + #define EFI_MAX_BIT 0x8000000000000000ULL +#else + #define EFI_MAX_BIT 0x80000000 +#endif + +/// +/// Macro's to encode the status code. +/// // Set the upper bit to indicate EFI Error. -#define EFIERR(a) (EFI_MAX_BIT | (a)) +#define ENCODE_ERROR(_a) (EFI_MAX_BIT | (_a)) + +#define EFIERR(_a) ENCODE_ERROR(_a) +/// +/// The operation completed successfully. +/// #define EFI_SUCCESS 0 + +/// +/// The parameter was incorrect. +/// #define EFI_INVALID_PARAMETER EFIERR (2) + +/// +/// The operation is not supported. +/// #define EFI_UNSUPPORTED EFIERR (3) // EFI Revision info. diff --git a/i386/libsaio/efi/fake_efi.h b/i386/libsaio/efi/fake_efi.h index 45c5686..76af6b0 100755 --- a/i386/libsaio/efi/fake_efi.h +++ b/i386/libsaio/efi/fake_efi.h @@ -121,6 +121,8 @@ extern EFI_STATUS addConfigurationTable(EFI_GUID const *pGuid, void * table, cha { DT__AddProperty(tableNode, "alias", strlen(tableAlias) + 1, (char *)tableAlias); } + + gPlatform.EFI.SystemTable->NumberOfTableEntries++; } return EFI_SUCCESS; @@ -135,13 +137,6 @@ void setupEFITables(void) // return instruction. static uint8_t const VOIDRET_INSTRUCTIONS[] = { 0xc3 }; - // movl $0x80000003,%eax; ret - // static uint8_t const UNSUPPORTEDRET_INSTRUCTIONS[] = { 0xb8, 0x03, 0x00, 0x00, 0x80, 0xc3 }; - - // movabs $0x8000000000000003,%rax - // ret - static uint8_t const UNSUPPORTEDRET_INSTRUCTIONS[] = { 0x48, 0xb8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc3 }; - // Occupying a single 4 KB memory block (wired page) to prevent multiple smaller allocations. struct EFI_Container { @@ -250,7 +245,7 @@ void setupEFITables(void) * things like efiRuntimeServices* and what not. * * In fact, the only code that seems to use that is the hibernate code so it - * knows not to save the pages. It even checks to make sure its nonzero. + * knows not to save the pages. It even checks to make sure that it is non-zero. */ bootArgs->efiSystemTable = (uint32_t)efiSystemTable; From 5840427472fd7def3ba66711ee96cb53613bee40 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 4 Jan 2013 18:42:35 +0100 Subject: [PATCH 217/623] Adding clean/uninitialized config files --- i386/config/ACPI/clean.h | 97 ++++++++++++++++++++++++++++++++++++++ i386/config/EFI/clean.h | 16 +++++++ i386/config/SMBIOS/clean.h | 31 ++++++++++++ 3 files changed, 144 insertions(+) create mode 100755 i386/config/ACPI/clean.h create mode 100755 i386/config/EFI/clean.h create mode 100755 i386/config/SMBIOS/clean.h diff --git a/i386/config/ACPI/clean.h b/i386/config/ACPI/clean.h new file mode 100755 index 0000000..6a80eac --- /dev/null +++ b/i386/config/ACPI/clean.h @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2009 Master Chief. All rights reserved. + * + * Note: This is an essential part of the build process for Revolution v0.6.43 and greater. + * + * + * Latest cleanups and additional directives added by DHP in 2011 + */ + + +//--------------------------------------------------------- ESSENTIAL ACPI TABLES ------------------------------------------------------------- + + +#if STATIC_APIC_TABLE_INJECTION + #define STATIC_APIC_TABLE_DATA \ + /* 0x0000 */ // Insert your APIC table replacement here (optional). +#endif + + +#if STATIC_ECDT_TABLE_INJECTION + #define STATIC_ECDT_TABLE_DATA \ + /* 0x0000 */ // Insert your ECDT table replacement here (optional). +#endif + + +#if STATIC_HPET_TABLE_INJECTION + #define STATIC_HPET_TABLE_DATA \ + /* 0x0000 */ // Insert your HPET table replacement here (optional). +#endif + + +#if STATIC_MCFG_TABLE_INJECTION + #define STATIC_MCFG_TABLE_DATA \ + /* 0x0000 */ // Insert your MCFG table replacement here (optional). +#endif + + +#if STATIC_SBST_TABLE_INJECTION + #define STATIC_SBST_TABLE_DATA \ + /* 0x0000 */ // Insert your SBST table replacement here (optional). +#endif + + +#if STATIC_SSDT_TABLE_INJECTION + #define STATIC_SSDT_TABLE_DATA \ + /* 0x0000 */ // Insert your SSDT table replacement here (optional). +#endif + + +//--------------------------------------------------------- SECONDARY ACPI TABLES ------------------------------------------------------------- + + +#if STATIC_DSDT_TABLE_INJECTION + #define STATIC_DSDT_TABLE_DATA \ + /* 0x0000 */ // Insert your DSDT table replacement here (optional). +#endif + + +#if STATIC_FACS_TABLE_INJECTION + #define STATIC_FACS_TABLE_DATA \ + /* 0x0000 */ // Insert your FACS table replacement here (optional). +#endif + + +//---------------------------------------------------------- OPTIONAL ACPI TABLES ------------------------------------------------------------- + + +#if STATIC_APIC2_TABLE_INJECTION + #define STATIC_APIC2_TABLE_DATA \ + /* 0x0000 */ // Insert a second APIC table (replacement) here (optional). +#endif + + +#if STATIC_SSDT_GPU_TABLE_INJECTION + #define STATIC_SSDT_GPU_TABLE_DATA \ + /* 0x0000 */ // Insert your SSDT_GPU table replacement here (optional). +#endif + + +#if STATIC_SSDT_PR_TABLE_INJECTION + #define STATIC_SSDT_PR_TABLE_DATA \ + /* 0x0000 */ // Insert your SSDT_PR table replacement here (optional). +#endif + + +#if STATIC_SSDT_SATA_TABLE_INJECTION + #define STATIC_SSDT_SATA_TABLE_DATA \ + /* 0x0000 */ // Insert your SSDT_SATA table replacement here (optional). +#endif + + +#if STATIC_SSDT_USB_TABLE_INJECTION + #define STATIC_SSDT_USB_TABLE_DATA \ + /* 0x0000 */ // Insert your SSDT_USB table replacement here (optional). +#endif + +//================================================================= END ==================================================================== diff --git a/i386/config/EFI/clean.h b/i386/config/EFI/clean.h new file mode 100755 index 0000000..9807da6 --- /dev/null +++ b/i386/config/EFI/clean.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2009 Master Chief. All rights reserved. + * + * Note: This is an essential part of the build process for Revolution v0.6.43 and greater. + * + * + * Latest cleanups and additional directives added by DHP in 2011 + */ + + +//----------------------------------------------------------------- EFI -------------------------------------------------------------------- + +#define STATIC_EFI_DEVICE_PROPERTIES \ +/* 0x0000 */ // Insert your EFI device-property data here (optional). + +//================================================================= END ==================================================================== diff --git a/i386/config/SMBIOS/clean.h b/i386/config/SMBIOS/clean.h new file mode 100755 index 0000000..d388f10 --- /dev/null +++ b/i386/config/SMBIOS/clean.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2009 Master Chief. All rights reserved. + * + * Note: This is an essential part of the build process for Revolution v0.6.44 and greater. + * + * + * Update: - Cleanups and additional directives added by DHP in 2011. + * - Tip / Note added by DHP (march 2012). + * + * Tip: The idea is to use dynamic SMBIOS generation in RevoBoot only to + * let it strip your factory table, after which you should do this: + * + * 1.) Extract the new OS X compatible SMBIOS table with: tools/smbios2struct + * 2.) Add the data structure to: RevoBoot/i386/config/SMBIOS/data.h + * 3.) Recompile RevoBoot, and be happy with your quicker boot time. + * + * Note: Repeat this procedure after adding memory or other SMBIOS relevant + * hardware changes, like replacing the motherboard and/or processor. + * + */ + +//--------------------------------------------------------------- SMBIOS ------------------------------------------------------------------- + +#define STATIC_SMBIOS_SM_MAX_STRUCTURE_SIZE 0 + +#define STATIC_SMBIOS_DMI_STRUCTURE_COUNT 0 + +#define STATIC_SMBIOS_DATA \ +/* 0x0000 */ // Insert your SMBIOS data here. + +//================================================================= END ==================================================================== From d490cce70a09b91f21bf6d7337dff6aefcb47da9 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 4 Jan 2013 18:44:50 +0100 Subject: [PATCH 218/623] No compiled software should ever be comitted --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 8681039..9465950 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,5 @@ i386/config/SMBIOS/*Mac*.h i386/util/libcc_kext.a MODEL + +i386/libsaio/smbios/tools/smbios2struct3 From d4d1b190a1f50dfcc03bb6470eb277f385727361 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 10 Jan 2013 14:35:39 +0100 Subject: [PATCH 219/623] Preparations for Sam's incredible iMessage fix!!! Sam blogged about why iCloud/iMessage didn't work with a self compiled kernel. She did this, long before anyone even had a clue, after she figured out that the Apple kernel includes undocumented changes. Not only that. She also figured out how we can make it work again, and this is step one of her findings. --- i386/config/settings-template.h | 6 ++-- i386/libsaio/smbios/dynamic_data.h | 55 ++++++++++++------------------ 2 files changed, 24 insertions(+), 37 deletions(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index e2555d9..2bac173 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -383,9 +383,9 @@ #define SMB_SYSTEM_SERIAL_NUMBER "SOMESRLNUMBR" // Example only! -#if (TARGET_MODEL & MACPRO) - #define SMB_BOARD_SERIAL_NUMBER "SOMESRLNUMBR" // Example only! -#endif +#define SMB_BOARD_SERIAL_NUMBER "SOMESRLNUMBR" // Example only! + // + // Note: Board serial injection is required for iMessage support! #define SET_MAX_STRUCTURE_LENGTH 0 // Set to 0 by default. Only change this to 1 when boot hangs without it. // diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index f23be7d..4104937 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -16,6 +16,7 @@ * - Removed some unused experimental code snippets (PikerAlpha, November 2012). * - Option SET_MAX_STRUCTURE_LENGTH to verify/fix newEPS->maxStructureSize (PikerAlpha, November 2012). * - Allow DEBUG_SMBIOS = 2 to filter out some of the output (PikerAlpha, November 2012). + * - Pre-compiler directive PROBOARD removed, which is required for iMessage (PikerAlpha, January 2013). * * Credits: * - Kabyl (see notes in source code) @@ -41,18 +42,6 @@ #include "smbios.h" #include "model_data.h" -#if (TARGET_MODEL & MACPRO) - /* - * Number of additional properties for MacPro models. - */ - #define PROBOARD 2 -#else - /* - * No additional properties for other Mac models. - */ - #define PROBOARD 0 -#endif - #define IOSERVICE_PLATFORM_FEATURE 0x0000000000000001 //------------------------------------------------------------------------------ @@ -71,26 +60,26 @@ struct SMBStructure struct SMBStructure requiredStructures[] = { - { kSMBTypeBIOSInformation /* 0 */ , 0, 5, false, 0 }, + { kSMBTypeBIOSInformation /* 0 */ , 0, 5, false, 0 }, { kSMBTypeSystemInformation /* 1 */ , 6, 10, false, 0 }, - { kSMBTypeBaseBoard /* 2 */ , (11 + PROBOARD), (12 + PROBOARD), false, 0 }, - { kSMBUnused /* 3 */ , 0, 0, false, 0 }, - { kSMBTypeProcessorInformation /* 4 */ , (13 + PROBOARD), (14 + PROBOARD), true, 0 }, - { kSMBUnused /* 5 */ , 0, 0, false, 0 }, - { kSMBUnused /* 6 */ , 0, 0, false, 0 }, - { kSMBUnused /* 7 */ , 0, 0, false, 0 }, - { kSMBUnused /* 8 */ , 0, 0, false, 0 }, - { kSMBUnused /* 9 */ , 0, 0, false, 0 }, - { kSMBUnused /* 10 */ , 0, 0, false, 0 }, - { kSMBUnused /* 11 */ , 0, 0, false, 0 }, - { kSMBUnused /* 12 */ , 0, 0, false, 0 }, - { kSMBUnused /* 13 */ , 0, 0, false, 0 }, - { kSMBUnused /* 14 */ , 0, 0, false, 0 }, - { kSMBUnused /* 15 */ , 0, 0, false, 0 }, - { kSMBUnused /* 16 */ , 0, 0, false, 0 }, - { kSMBTypeMemoryDevice /* 17 */ , (15 + PROBOARD), (20 + PROBOARD), true, 0 }, - { kSMBUnused /* 18 */ , 0, 0, false, 0 }, - { kSMBTypeMemoryArrayMappedAddress /* 19 */ , -1, -1, false, 0 } + { kSMBTypeBaseBoard /* 2 */ , 13, 14, false, 0 }, + { kSMBUnused /* 3 */ , 0, 0, false, 0 }, + { kSMBTypeProcessorInformation /* 4 */ , 15, 16, true, 0 }, + { kSMBUnused /* 5 */ , 0, 0, false, 0 }, + { kSMBUnused /* 6 */ , 0, 0, false, 0 }, + { kSMBUnused /* 7 */ , 0, 0, false, 0 }, + { kSMBUnused /* 8 */ , 0, 0, false, 0 }, + { kSMBUnused /* 9 */ , 0, 0, false, 0 }, + { kSMBUnused /* 10 */ , 0, 0, false, 0 }, + { kSMBUnused /* 11 */ , 0, 0, false, 0 }, + { kSMBUnused /* 12 */ , 0, 0, false, 0 }, + { kSMBUnused /* 13 */ , 0, 0, false, 0 }, + { kSMBUnused /* 14 */ , 0, 0, false, 0 }, + { kSMBUnused /* 15 */ , 0, 0, false, 0 }, + { kSMBUnused /* 16 */ , 0, 0, false, 0 }, + { kSMBTypeMemoryDevice /* 17 */ , 17, 22, true, 0 }, + { kSMBUnused /* 18 */ , 0, 0, false, 0 }, + { kSMBTypeMemoryArrayMappedAddress /* 19 */ , -1, -1, false, 0 } }; @@ -151,10 +140,8 @@ struct SMBProperty SMBProperties[] = { kSMBTypeBaseBoard, 0x04, kSMBString, .plainData = APPLE_INC }, { kSMBTypeBaseBoard, 0x05, kSMBString, .plainData = SMB_BOARD_PRODUCT }, -#if (TARGET_MODEL & MACPRO) { kSMBTypeBaseBoard, 0x07, kSMBString, .plainData = SMB_BOARD_SERIAL_NUMBER }, { kSMBTypeBaseBoard, 0x0d, kSMBByte, .getSMBByte = getBoardType }, -#endif //---------------------------------------------------------------------------------------------------- @@ -293,7 +280,7 @@ void setupSMBIOS(void) } #if (DYNAMIC_RAM_OVERRIDE_ERROR_HANDLE || DYNAMIC_RAM_OVERRIDE_SIZE || DYNAMIC_RAM_OVERRIDE_TYPE || DYNAMIC_RAM_OVERRIDE_FREQUENCY) - requiredStructures[17].stop = PROBOARD + (sizeof(SMBProperties) / sizeof(SMBProperties[0])) -1; + requiredStructures[17].stop = (sizeof(SMBProperties) / sizeof(SMBProperties[0])) -1; #endif //------------------------------------------------------------------------------ From 40d8218ebd6df9e99a38faf4f863b1f1517cf69e Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 10 Jan 2013 16:57:46 +0100 Subject: [PATCH 220/623] Always inject a board serial/type, which is required to fix iMessage breakage --- i386/libsaio/efi.c | 11 ++++++++++- i386/libsaio/smbios/getters.h | 9 ++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index 3d88f18..4cb15ac 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -35,10 +35,10 @@ * - Get static EFI data (optional) from /Extra/EFI/[MacModelNN].bin (PikerAlpha, October 2012). * - STATIC_SYSTEM_SERIAL_NUMBER renamed to EFI_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). * - Check return of malloc call (PikerAlpha, November 2012). + * - Sam's workaround for iMessage breakage added (PikerAlpha, January 2013). * */ - #include "efi/fake_efi.h" @@ -193,6 +193,15 @@ void initEFITree(void) #endif + // FIXME: We should either rename this or put the data somewhere else! + Node *optionsNode = DT__AddChild(gPlatform.DT.RootNode, "RevoEFI"); + + static EFI_UINT8 const NVRAM_ROM_DATA[] = STATIC_NVRAM_ROM; + DT__AddProperty(optionsNode, "NVRAM:ROM", sizeof(NVRAM_ROM_DATA), (EFI_UINT8*) &NVRAM_ROM_DATA); + + static EFI_UINT8 const NVRAM_MLB_DATA[] = STATIC_NVRAM_MLB; + DT__AddProperty(optionsNode, "NVRAM:MLB", sizeof(NVRAM_MLB_DATA), (EFI_UINT8*) &NVRAM_MLB_DATA); + // DT__AddProperty(chosenNode, "boot-kernelcache-adler32", sizeof(uint64_t), adler32); gPlatform.EFI.Nodes.Chosen = chosenNode; diff --git a/i386/libsaio/smbios/getters.h b/i386/libsaio/smbios/getters.h index 6ec296b..1ce0b59 100755 --- a/i386/libsaio/smbios/getters.h +++ b/i386/libsaio/smbios/getters.h @@ -11,6 +11,7 @@ * - Function getOverrideString removed (PikerAlpha, October 2012). * - Function getBIOSDate added (PikerAlpha, October 2012). * - Unused arguments removed (PikerAlpha, October 2012). + * - Pre-compiler directive PROBOARD removed, which is required for iMessage (PikerAlpha, January 2013). * * Credits: * - macerintel (see note in source code) @@ -352,9 +353,11 @@ static SMBDWord getBIOSFeaturesEX(void) //============================================================================== -#if TARGET_MODEL & MACPRO static SMBByte getBoardType(void) { - return 0x0b; // Some logic here or just return 11/0x0b. -} +#if TARGET_MODEL & MACPRO + return 0x0b; +#else + return 0x0a; #endif +} From 1aee5ac4a11da30dfca81a54f9239691e24e0dc4 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 10 Jan 2013 17:10:48 +0100 Subject: [PATCH 221/623] iMessage workaround cleanups --- VERSION | 2 +- i386/config/settings-template.h | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index dc848ff..c7966c0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.37 +1.5.38 diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 2bac173..0db58fa 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -1,7 +1,7 @@ /* * Copyright (c) 2009 Master Chief. All rights reserved. * - * Note: This is an essential part of the build process for RevoBoot v1.5.37 and greater. + * Note: This is an essential part of the build process for RevoBoot v1.5.38 and greater. * * Updates: * @@ -30,6 +30,8 @@ * - Option DISK_TARGET_SUPPORT added (PikerAlpha, November 2012). * - DISK_TARGET_SUPPORT renamed to STARTUP_DISK_SUPPORT (PikerAlpha, November 2012). * - New compiler directive USE_DEVICE_PATH in boot section (PikerAlpha, November 2012). + * - Always inject SMB_BOARD_SERIAL_NUMBER, required for iMessage (PikerAlpha, January 2013). + * - New compiler directives in EFI section added (PikerAlpha, January 2013). * */ @@ -324,7 +326,13 @@ #define EFI_SYSTEM_SERIAL_NUMBER { 'S', 'O', 'M', 'E', 'S', 'R', 'L', 'N', 'U', 'M', 'B', 'R' } -#define STATIC_SYSTEM_ID { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F } // Example only! +#define STATIC_SYSTEM_ID { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10 } // Example only! + +#define STATIC_NVRAM_ROM { 0x00, 0x0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xNN, 0xNN, 0xNN, 0xNN, 0xNN, 0xNN } // Example only! + // + // Note: Use your MAC address for the last nibbles! + +#define STATIC_NVRAM_MLB { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11 } // Example only! #define DEBUG_EFI 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. From 07bd1e216e0b1f83bf2f2184e518658404be8b65 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 10 Jan 2013 17:19:39 +0100 Subject: [PATCH 222/623] Updating release notes for RevoBoot v1.5.38 --- CHANGES | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES b/CHANGES index e423223..5649f0c 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,14 @@ RevoBoot v1.5.40 (Next Major Release) - Improved P-State generation (less settings). +RevoBoot v1.5.38 +================ +- RevoBoot/i386/libsaio/efi.c modified to workaround iMessage login/registration problems (PikerAlpha, January 2013). +- getBoardType in RevoBoot/i386/libsaio/SMBIOS/getters.h now always returns a board type (PikerAlpha, January 2013). +- STATIC_NVRAM_ROM/STATIC_NVRAM_MLB added (used in efi.c) to settings-template.h (PikerAlpha, January 2013). +- VERSION updated to v1.5.38 + + RevoBoot v1.5.37 ================ - DISK_TARGET_SUPPORT in settings-template.h renamed to STARTUP_DISK_SUPPORT (PikerAlpha, November 2012). From 38ce9bd8d287bc459e21b9695e1d8c417e4a6464 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 10 Jan 2013 18:40:16 +0100 Subject: [PATCH 223/623] Adding examples --- i386/config/settings-template.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 0db58fa..dd39989 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -328,11 +328,12 @@ #define STATIC_SYSTEM_ID { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10 } // Example only! -#define STATIC_NVRAM_ROM { 0x00, 0x0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xNN, 0xNN, 0xNN, 0xNN, 0xNN, 0xNN } // Example only! - // +#define STATIC_NVRAM_ROM { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xNN, 0xNN, 0xNN, 0xNN, 0xNN, 0xNN } // Example only! + // sudo nvram 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:ROM=%01%02%03%04%05%06%07%08%09%0A%0B%NN%NN%NN%NN%NN%NN // Note: Use your MAC address for the last nibbles! #define STATIC_NVRAM_MLB { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11 } // Example only! + // sudo nvram 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:MLB=%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11 #define DEBUG_EFI 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. From 80fbfbbe1e83dcb0f8621f0fe1bcc3c71b4ccef7 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 10 Jan 2013 18:49:59 +0100 Subject: [PATCH 224/623] Typo --- i386/config/settings-template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index dd39989..377b31f 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -330,7 +330,7 @@ #define STATIC_NVRAM_ROM { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xNN, 0xNN, 0xNN, 0xNN, 0xNN, 0xNN } // Example only! // sudo nvram 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:ROM=%01%02%03%04%05%06%07%08%09%0A%0B%NN%NN%NN%NN%NN%NN - // Note: Use your MAC address for the last nibbles! + // Note: Use your MAC address for the last six bytes! #define STATIC_NVRAM_MLB { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11 } // Example only! // sudo nvram 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:MLB=%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11 From 51a404abbeba6a36ac6569950d0d133183828d88 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sun, 13 Jan 2013 16:11:26 +0100 Subject: [PATCH 225/623] Index error fixed --- i386/libsaio/smbios/dynamic_data.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index 4104937..6d9a49e 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -17,6 +17,7 @@ * - Option SET_MAX_STRUCTURE_LENGTH to verify/fix newEPS->maxStructureSize (PikerAlpha, November 2012). * - Allow DEBUG_SMBIOS = 2 to filter out some of the output (PikerAlpha, November 2012). * - Pre-compiler directive PROBOARD removed, which is required for iMessage (PikerAlpha, January 2013). + * - SMBStructure.start[2] was 13 but should have been 11 (PikerAlpha, January 2013). * * Credits: * - Kabyl (see notes in source code) @@ -62,7 +63,7 @@ struct SMBStructure requiredStructures[] = { { kSMBTypeBIOSInformation /* 0 */ , 0, 5, false, 0 }, { kSMBTypeSystemInformation /* 1 */ , 6, 10, false, 0 }, - { kSMBTypeBaseBoard /* 2 */ , 13, 14, false, 0 }, + { kSMBTypeBaseBoard /* 2 */ , 11, 14, false, 0 }, { kSMBUnused /* 3 */ , 0, 0, false, 0 }, { kSMBTypeProcessorInformation /* 4 */ , 15, 16, true, 0 }, { kSMBUnused /* 5 */ , 0, 0, false, 0 }, From 0b7ef56b561e80a21210777ed77d141b59eb6db7 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Fri, 18 Jan 2013 04:14:25 +0100 Subject: [PATCH 226/623] SMBIOS update to make it more Apple like --- i386/libsaio/smbios/dynamic_data.h | 43 +++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index 6d9a49e..99d7d5d 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -17,7 +17,11 @@ * - Option SET_MAX_STRUCTURE_LENGTH to verify/fix newEPS->maxStructureSize (PikerAlpha, November 2012). * - Allow DEBUG_SMBIOS = 2 to filter out some of the output (PikerAlpha, November 2012). * - Pre-compiler directive PROBOARD removed, which is required for iMessage (PikerAlpha, January 2013). +<<<<<<< HEAD * - SMBStructure.start[2] was 13 but should have been 11 (PikerAlpha, January 2013). +======= + * - Override factory SystemID when (PikerAlpha, January 2013). +>>>>>>> Make SMBIOS more Apple like * * Credits: * - Kabyl (see notes in source code) @@ -62,10 +66,10 @@ struct SMBStructure struct SMBStructure requiredStructures[] = { { kSMBTypeBIOSInformation /* 0 */ , 0, 5, false, 0 }, - { kSMBTypeSystemInformation /* 1 */ , 6, 10, false, 0 }, - { kSMBTypeBaseBoard /* 2 */ , 11, 14, false, 0 }, + { kSMBTypeSystemInformation /* 1 */ , 6, 11, false, 0 }, + { kSMBTypeBaseBoard /* 2 */ , 12, 18, false, 0 }, { kSMBUnused /* 3 */ , 0, 0, false, 0 }, - { kSMBTypeProcessorInformation /* 4 */ , 15, 16, true, 0 }, + { kSMBTypeProcessorInformation /* 4 */ , 19, 20, true, 0 }, { kSMBUnused /* 5 */ , 0, 0, false, 0 }, { kSMBUnused /* 6 */ , 0, 0, false, 0 }, { kSMBUnused /* 7 */ , 0, 0, false, 0 }, @@ -78,7 +82,7 @@ struct SMBStructure requiredStructures[] = { kSMBUnused /* 14 */ , 0, 0, false, 0 }, { kSMBUnused /* 15 */ , 0, 0, false, 0 }, { kSMBUnused /* 16 */ , 0, 0, false, 0 }, - { kSMBTypeMemoryDevice /* 17 */ , 17, 22, true, 0 }, + { kSMBTypeMemoryDevice /* 17 */ , 21, 25, true, 0 }, { kSMBUnused /* 18 */ , 0, 0, false, 0 }, { kSMBTypeMemoryArrayMappedAddress /* 19 */ , -1, -1, false, 0 } }; @@ -113,7 +117,10 @@ struct SMBProperty const char *plainData; }; -#define APPLE_INC "Apple Inc." +#define APPLE_INC "Apple Inc." +#define SMB_SYSTEM_SKU "System SKU#" +#define SMB_BOARD_ASSET_TAG "Base Board Asset Tag#" +#define SMB_BOARD_LOCATION "Part Component" //------------------------------------------------------------------------------ @@ -134,14 +141,20 @@ struct SMBProperty SMBProperties[] = { kSMBTypeSystemInformation, 0x05, kSMBString, .plainData = SMB_PRODUCT_NAME }, { kSMBTypeSystemInformation, 0x06, kSMBString, .plainData = "1.0" }, { kSMBTypeSystemInformation, 0x07, kSMBString, .plainData = SMB_SYSTEM_SERIAL_NUMBER }, + + { kSMBTypeSystemInformation, 0x19, kSMBString, .plainData = SMB_SYSTEM_SKU }, { kSMBTypeSystemInformation, 0x1a, kSMBString, .plainData = SMB_FAMILY }, //---------------------------------------------------------------------------------------------------- { kSMBTypeBaseBoard, 0x04, kSMBString, .plainData = APPLE_INC }, { kSMBTypeBaseBoard, 0x05, kSMBString, .plainData = SMB_BOARD_PRODUCT }, - + { kSMBTypeBaseBoard, 0x06, kSMBString, .plainData = SMB_FAMILY }, { kSMBTypeBaseBoard, 0x07, kSMBString, .plainData = SMB_BOARD_SERIAL_NUMBER }, + { kSMBTypeBaseBoard, 0x08, kSMBString, .plainData = SMB_BOARD_ASSET_TAG }, + + { kSMBTypeBaseBoard, 0x0a, kSMBString, .plainData = SMB_BOARD_LOCATION }, + { kSMBTypeBaseBoard, 0x0d, kSMBByte, .getSMBByte = getBoardType }, //---------------------------------------------------------------------------------------------------- @@ -318,6 +331,24 @@ void setupSMBIOS(void) // Copy structure data from factory table to new table (not the strings). memcpy(newHeader, factoryHeader, factoryHeader->length); + if (currentStructureType == kSMBTypeSystemInformation) + { + // gPlatform.UUID is set to NULL in platform.c so that we can check for NULL to see if we + // located the (per spec) required SMBIOS type 1 structure (allocating memory signals OK). + gPlatform.UUID = malloc(16); + +#ifdef SMB_STATIC_SYSTEM_UUID + static unsigned char SMB_SYSTEM_UUID[] = SMB_STATIC_SYSTEM_UUID; + + // Replace factory UUID with the one specified in: RevoBoot/i386/config/SETTINGS/MacModelNN.h + memcpy(((SMBSystemInformation *)newHeader)->uuid, SMB_SYSTEM_UUID, 16); + memcpy(gPlatform.UUID, SMB_SYSTEM_UUID, 16); +#else + // Get factory UUID from SMBIOS. + memcpy(gPlatform.UUID, ((SMBSystemInformation *)factoryHeader)->uuid, 16); +#endif + } + // Init handle in the new header. newHeader->handle = ++handle; From 32e275f41e2deab585e797ba57f9e998565e3677 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Fri, 18 Jan 2013 04:15:34 +0100 Subject: [PATCH 227/623] Fix commit clash --- i386/libsaio/smbios/dynamic_data.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index 99d7d5d..de02604 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -17,11 +17,8 @@ * - Option SET_MAX_STRUCTURE_LENGTH to verify/fix newEPS->maxStructureSize (PikerAlpha, November 2012). * - Allow DEBUG_SMBIOS = 2 to filter out some of the output (PikerAlpha, November 2012). * - Pre-compiler directive PROBOARD removed, which is required for iMessage (PikerAlpha, January 2013). -<<<<<<< HEAD * - SMBStructure.start[2] was 13 but should have been 11 (PikerAlpha, January 2013). -======= * - Override factory SystemID when (PikerAlpha, January 2013). ->>>>>>> Make SMBIOS more Apple like * * Credits: * - Kabyl (see notes in source code) From 9dc2b0be2a3530313f676881a6caeeff8dda42d2 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Fri, 18 Jan 2013 04:22:43 +0100 Subject: [PATCH 228/623] STATIC_SYSTEM_ID renamed to SMB_STATIC_SYSTEM_UUID MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit  and moved to SMBIOS section --- i386/config/settings-template.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 377b31f..891a227 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -32,6 +32,7 @@ * - New compiler directive USE_DEVICE_PATH in boot section (PikerAlpha, November 2012). * - Always inject SMB_BOARD_SERIAL_NUMBER, required for iMessage (PikerAlpha, January 2013). * - New compiler directives in EFI section added (PikerAlpha, January 2013). + * - STATIC_SYSTEM_ID renamed to SMB_STATIC_SYSTEM_UUID and moved to SMBIOS section (PikerAlpha, January 2013). * */ @@ -326,8 +327,6 @@ #define EFI_SYSTEM_SERIAL_NUMBER { 'S', 'O', 'M', 'E', 'S', 'R', 'L', 'N', 'U', 'M', 'B', 'R' } -#define STATIC_SYSTEM_ID { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10 } // Example only! - #define STATIC_NVRAM_ROM { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xNN, 0xNN, 0xNN, 0xNN, 0xNN, 0xNN } // Example only! // sudo nvram 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:ROM=%01%02%03%04%05%06%07%08%09%0A%0B%NN%NN%NN%NN%NN%NN // Note: Use your MAC address for the last six bytes! @@ -396,6 +395,8 @@ // // Note: Board serial injection is required for iMessage support! +#define SMB_STATIC_SYSTEM_UUID { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10 } // Example only! + #define SET_MAX_STRUCTURE_LENGTH 0 // Set to 0 by default. Only change this to 1 when boot hangs without it. // // Note: Safe to keep at 0 since it is only available since RevoBoot v1.5.35 From 2091ad36b3c00a1655ae69b9d8619381935190fa Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 18 Jan 2013 03:56:18 +0100 Subject: [PATCH 229/623] Removing unused function call --- i386/libsaio/efi/fake_efi.h | 1 - 1 file changed, 1 deletion(-) diff --git a/i386/libsaio/efi/fake_efi.h b/i386/libsaio/efi/fake_efi.h index 76af6b0..a471d88 100755 --- a/i386/libsaio/efi/fake_efi.h +++ b/i386/libsaio/efi/fake_efi.h @@ -39,7 +39,6 @@ extern void setupACPI(void); extern void setupSMBIOS(void); -extern bool setRootUUID(Node *chosenNode, char * rootUUID); //------------------------------------------------------------------------------ From 4d497f7a9d251977bc20e7b3cff22934c012c4ee Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 18 Jan 2013 03:58:23 +0100 Subject: [PATCH 230/623] Adding experimental code for boot-kernelcache-adler32 --- i386/boot2/boot.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 832bb74..f726d08 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -421,6 +421,8 @@ void boot(int biosdev) int retStatus = -1; + uint32_t adler32 = 0; + getAndProcessBootArguments(kernelFlags); // Initialize bootFile (defaults to: mach_kernel). @@ -476,6 +478,26 @@ void boot(int biosdev) else if (GetFileInfo(NULL, gPlatform.KernelCachePath, &flags, &cachetime) == 0) { + static char preLinkedKernelPath[128]; + static char adler32Key[PLATFORM_NAME_LEN + ROOT_PATH_LEN]; + + // unsigned long adler32 = 0; + + preLinkedKernelPath[0] = '\0'; + + _BOOT_DEBUG_DUMP("Checking for pre-linked kernel...\n"); + + // Zero out platform info (name and kernel root path). + bzero(adler32Key, sizeof(adler32Key)); + + // Construct key for the pre-linked kernel checksum (generated by adler32). + sprintf(adler32Key, gPlatform.ModelID); + sprintf(adler32Key + PLATFORM_NAME_LEN, "%s", BOOT_DEVICE_PATH); + sprintf(adler32Key + (PLATFORM_NAME_LEN + 38), "%s", bootInfo->bootFile); + + adler32 = Adler32((unsigned char *)adler32Key, sizeof(adler32Key)); + + _BOOT_DEBUG_DUMP("adler32: %08X\n", adler32); #if ((MAKE_TARGET_OS & LION) == LION) // Also for Mountain Lion, which has bit 2 set like Lion. @@ -495,7 +517,7 @@ void boot(int biosdev) } #else // Not for (Mountain) Lion, go easy with the Snow Leopard. - static char preLinkedKernelPath[128]; + /* static char preLinkedKernelPath[128]; static char adler32Key[PLATFORM_NAME_LEN + ROOT_PATH_LEN]; unsigned long adler32 = 0; @@ -514,7 +536,7 @@ void boot(int biosdev) adler32 = Adler32((unsigned char *)adler32Key, sizeof(adler32Key)); - _BOOT_DEBUG_DUMP("adler32: %08X\n", adler32); + _BOOT_DEBUG_DUMP("adler32: %08X\n", adler32); */ // Create path to pre-linked kernel. sprintf(preLinkedKernelPath, "%s/%s_%s.%08lX", gPlatform.KernelCachePath, kKernelCache, @@ -608,7 +630,7 @@ void boot(int biosdev) _BOOT_DEBUG_DUMP("execKernel-4\n"); - finalizeEFITree(); // rootUUID); + finalizeEFITree(adler32); // rootUUID); _BOOT_DEBUG_DUMP("execKernel-5\n"); From e0bb37e0a23665f714e18af925459adb2577e84b Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 18 Jan 2013 03:58:51 +0100 Subject: [PATCH 231/623] Kernel patch for iMessage implented --- i386/libsaio/load.c | 81 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 67 insertions(+), 14 deletions(-) diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index d727f3c..266ac22 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -25,6 +25,7 @@ * * Updates: * - White space changes (PikerAlpha, November 2012) + * - Mountain Lion kernel patch for iMessage implemented (PikerAlpha, January 2013) * */ @@ -197,8 +198,8 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) switch (cmd) { - case LC_SEGMENT_64: case LC_SEGMENT: + case LC_SEGMENT_64: ret = DecodeSegment(cmdBase, &load_addr, &load_size); if (ret == 0 && load_size != 0 && load_addr >= KERNEL_ADDR) @@ -256,6 +257,14 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) return ret; } +#define UINT64_LE_FROM_CHARS(a,b,c,d,e,f,g,h) ( \ +((uint64_t)h << 56) | ((uint64_t)g << 48) | \ +((uint64_t)f << 40) | ((uint64_t)e << 32) | \ +((uint64_t)d << 24) | ((uint64_t)c << 16) | \ +((uint64_t)b << 8) | ((uint64_t)a << 0) ) + +#define NVRAM_GUID_UINT64 UINT64_LE_FROM_CHARS('4','D','1','E','D','E','0','5') +#define NVRAM_OPTIONS_UINT64 UINT64_LE_FROM_CHARS('/','o','p','t','i','o','n','s') //============================================================================== // Private function. Called from DecodeMachO() @@ -272,10 +281,66 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l struct segment_command_64 *segCmd = (struct segment_command_64 *)cmdBase; vmaddr = (segCmd->vmaddr & 0x3fffffff); - vmsize = segCmd->vmsize; + vmsize = segCmd->vmsize; fileaddr = (gBinaryAddress + segCmd->fileoff); filesize = segCmd->filesize; segname = segCmd->segname; + + // + // iMessage kernel patch + // + if (strncmp(segname, "__KLD", 5) == 0) + { + uint32_t index = 0; + uint32_t offset = sizeof(struct segment_command_64); + + while(offset < segCmd->cmdsize) + { + struct section_64 *section = (struct section_64 *)((char *)segCmd + offset); + offset += sizeof(struct section_64); + + if (strncmp((char *)section->sectname, "__cstring", 9) == 0) + { + bool guidReplaced = FALSE; + uint64_t sectionStart = (fileaddr + index); + uint64_t sectionEnd = (fileaddr + filesize); + + unsigned char * baseAddress = (unsigned char *)sectionStart; + + for (; baseAddress <= (unsigned char *)sectionEnd; baseAddress += 1) + { + // Quick lookup + if (*(uint64_t *)baseAddress == NVRAM_GUID_UINT64) + { + // Full lookup + if (strncmp((char *)baseAddress, "4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14", 36) == 0) + { + // Zero out NVRAM GUID + bzero((char *)baseAddress, 36); + // Replace inject GUID replacement + memcpy((char *)baseAddress, "NVRAM", 5); + // Point to the end of the (now former) GUID string + baseAddress += 36; + // Signal that phase one is done + guidReplaced = TRUE; + } + } + // Wait for the GUID to be replaced, then do phase two + if (guidReplaced && (*(uint64_t *)baseAddress == NVRAM_OPTIONS_UINT64)) + { + // Replacing /option with /RevoEFI + memcpy((unsigned char *)baseAddress, "/RevoEFI", 8); + // Where done here. Bail out. + break; + } + } + } + else + { + index += section->size; + } + } + } } else { @@ -291,18 +356,6 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l // Pre-flight checks. if (vmsize && filesize) { -#if DEBUG - printf("segname: %s, vmaddr: %x, vmsize: %x, fileoff: %x, filesize: %x\n", - segname, (unsigned)vmaddr, (unsigned)vmsize, (unsigned)fileaddr, (unsigned)filesize); - - if (gArchCPUType == CPU_TYPE_X86_64) - { - printf("nsects: %d, flags: %x.\n", (unsigned) segCmd->nsects, (unsigned)segCmd->flags); - } - - getchar(); -#endif - if (! ((vmaddr >= KERNEL_ADDR && (vmaddr + vmsize) <= (KERNEL_ADDR + KERNEL_LEN)) || (vmaddr >= HIB_ADDR && (vmaddr + vmsize) <= (HIB_ADDR + HIB_LEN)))) { From 5499383df59d8a57c4da05ba59dd76a27673b0b0 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 18 Jan 2013 04:00:33 +0100 Subject: [PATCH 232/623] New global var added for SMBIOS type 1 uuid --- i386/libsaio/platform.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/platform.c b/i386/libsaio/platform.c index fb970fe..a80ee3b 100644 --- a/i386/libsaio/platform.c +++ b/i386/libsaio/platform.c @@ -217,16 +217,18 @@ void initPlatform(int biosDevice) _PLATFORM_DEBUG_DUMP("gPlatform.OSVersion: %s\n", gPlatform.OSVersion); + gPlatform.KernelCachePath = strdup(kKernelCachePath); // Used in boot.c and driver.c + + _PLATFORM_DEBUG_DUMP("Kernel cache path: %s\n", gPlatform.KernelCachePath); + gPlatform.BIOSDevice = (biosDevice & kBIOSDevMask); // Device number masked with 0xFF. gPlatform.BootVolume = NULL; // Will be initialized in disk.c gPlatform.BootPartitionChain = NULL; // Will be initialized in sys.c gPlatform.RootVolume = NULL; // Will be initialized in disk.c (used in sys.c) - gPlatform.RAM.SlotCount = 0; // Will be initialized further down (used in smbios/dynamic_data.h) + gPlatform.UUID = NULL; // Will be initialized in RevoBoot/i386/libsaio/smbios/[dynamic/static]_data.h - gPlatform.KernelCachePath = strdup(kKernelCachePath); // Used in boot.c and driver.c - - _PLATFORM_DEBUG_DUMP("Kernel cache path: %s\n", gPlatform.KernelCachePath); + gPlatform.RAM.SlotCount = 0; // Will be initialized further down (used in smbios/dynamic_data.h) #if USE_STATIC_SMBIOS_DATA // We don't have to do anything when static SMBIOS data is used. From 08066f866576c4d40ade5af0cd0260b86895b773 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 18 Jan 2013 04:01:13 +0100 Subject: [PATCH 233/623] New global var added for SMBIOS type 1 uuid --- i386/libsaio/platform.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index e2dca81..3b1cae2 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -173,7 +173,9 @@ typedef struct _PlatformInfo_t bool BootRecoveryHD; // uint32_t allocatedVRAM; // Amount of allocated graphics memory (UEFI-BIOS settings). - + + uint8_t * UUID; // Allocated/set in RevoBoot/i386/libsaio/smbios/[dynamic/static]_data.h + struct ACPI // Used in acpi_patcher.h { uint8_t Type; // System type. Referring to FACP->PM_Profile. From 01f39860fa29a224448edef0408600912aa5ffd2 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 18 Jan 2013 04:01:48 +0100 Subject: [PATCH 234/623] Adding two SMBIOS 2.7 items --- i386/libsaio/smbios/smbios.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/i386/libsaio/smbios/smbios.h b/i386/libsaio/smbios/smbios.h index f9b89c0..f7ddf95 100755 --- a/i386/libsaio/smbios/smbios.h +++ b/i386/libsaio/smbios/smbios.h @@ -137,13 +137,16 @@ typedef struct SMBSystemInformation { // 2.0+ spec (8 bytes) SMB_STRUCT_HEADER // Type 1 - SMBString manufacturer; - SMBString productName; - SMBString version; - SMBString serialNumber; + SMBString manufacturer; + SMBString productName; + SMBString version; + SMBString serialNumber; // 2.1+ spec (25 bytes) - SMBByte uuid[16]; // can be all 0 or all 1's - SMBByte wakeupReason; // reason for system wakeup + SMBByte uuid[16]; // can be all 0 or all 1's + SMBByte wakeupReason; // reason for system wakeup + // 2.4+ spec (27 bytes) + SMBString SKUNumber; // System SKU# + SMBString family; // Mac, Macmini etc } __attribute__((packed)) SMBSystemInformation; // From bc2aec2de1cbdcd1561edd7a90d72b7fbeea849f Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 18 Jan 2013 04:06:34 +0100 Subject: [PATCH 235/623] Kernel adler32 support --- i386/libsaio/saio_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/saio_internal.h b/i386/libsaio/saio_internal.h index 8766f89..660dbcb 100755 --- a/i386/libsaio/saio_internal.h +++ b/i386/libsaio/saio_internal.h @@ -75,7 +75,7 @@ extern void sleep(int n); /* efi.c */ extern void initEFITree(void); extern void updateEFITree(char *rootUUID); -extern void finalizeEFITree(void); +extern void finalizeEFITree(uint32_t kernelAdler32); /* bootstruct.c */ extern void initKernelBootConfig(void); From 56a66723402922aaf92140584ee9ad0f9699ebb5 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 18 Jan 2013 04:08:14 +0100 Subject: [PATCH 236/623] Unused code removed and other cleanups --- i386/libsaio/efi.c | 228 ++++++++++++--------------------------------- 1 file changed, 60 insertions(+), 168 deletions(-) diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index 4cb15ac..658bb8c 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -63,6 +63,7 @@ void useStaticEFIProperties(Node * aEFINode) #endif */ //============================================================================== +// Called from RevoBoot/i386/libsaio/platform.c void initEFITree(void) { @@ -193,17 +194,6 @@ void initEFITree(void) #endif - // FIXME: We should either rename this or put the data somewhere else! - Node *optionsNode = DT__AddChild(gPlatform.DT.RootNode, "RevoEFI"); - - static EFI_UINT8 const NVRAM_ROM_DATA[] = STATIC_NVRAM_ROM; - DT__AddProperty(optionsNode, "NVRAM:ROM", sizeof(NVRAM_ROM_DATA), (EFI_UINT8*) &NVRAM_ROM_DATA); - - static EFI_UINT8 const NVRAM_MLB_DATA[] = STATIC_NVRAM_MLB; - DT__AddProperty(optionsNode, "NVRAM:MLB", sizeof(NVRAM_MLB_DATA), (EFI_UINT8*) &NVRAM_MLB_DATA); - - // DT__AddProperty(chosenNode, "boot-kernelcache-adler32", sizeof(uint64_t), adler32); - gPlatform.EFI.Nodes.Chosen = chosenNode; #if INJECT_EFI_DEVICE_PROPERTIES @@ -256,126 +246,35 @@ void initEFITree(void) } -#if UNUSED_EFI_CODE -//============================================================================== +#ifndef SMB_STATIC_SYSTEM_UUID +/*============================================================================== -void *convertHexStr2Binary(const char *hexStr, int *outLength) +static EFI_CHAR8 * getSmbiosUUID() { - int len; - char hexNibble; - char hexByte[2] = ""; - uint8_t binChar; - uint8_t *binStr = NULL; - int hexStrIdx, binStrIdx, hexNibbleIdx; + bool error = TRUE; - len = strlen(hexStr); + UInt8 *p = (UInt8 *)gPlatform.UUID; - if (len > 1) + for (int i = 0; i < 16; i++) { - // the resulting binary will be the half size of the input hex string - binStr = malloc(len / 2); - - if (binStr) + if (p[i] != 0x00 || p[i] != 0xff) { - binStrIdx = 0; - hexNibbleIdx = 0; - - for (hexStrIdx = 0; hexStrIdx < len; hexStrIdx++) - { - hexNibble = hexStr[hexStrIdx]; - - // ignore all chars except valid hex numbers - if ((hexNibble >= '0' && hexNibble <= '9') || (hexNibble >= 'A' && hexNibble <= 'F') || (hexNibble >= 'a' && hexNibble <= 'f')) - { - hexByte[hexNibbleIdx++] = hexNibble; - - // found both two nibbles, convert to binary - if (hexNibbleIdx == 2) - { - binChar = 0; - - for (hexNibbleIdx = 0; hexNibbleIdx < sizeof(hexByte); hexNibbleIdx++) - { - if (hexNibbleIdx > 0) - { - binChar = binChar << 4; - } - - if (hexByte[hexNibbleIdx] <= '9') - { - binChar += hexByte[hexNibbleIdx] - '0'; - } - else if (hexByte[hexNibbleIdx] <= 'F') - { - binChar += hexByte[hexNibbleIdx] - ('A' - 10); - } - else if (hexByte[hexNibbleIdx] <= 'f') - { - binChar += hexByte[hexNibbleIdx] - ('a' - 10); - } - } - - binStr[binStrIdx++] = binChar; - hexNibbleIdx = 0; - } - } - } - - *outLength = binStrIdx; - - return binStr; + error = FALSE; } } - *outLength = 0; - - return NULL; -} -//============================================================================== - - -static EFI_UINT32* getUUIDFromString(const char * givenUUID) // Patch by: rekursor (rewrite by Master Chief). -{ - if (givenUUID) // Sanity check. + if (error) { - static char errStr[] = "getUUIDFromString: Invalid SystemID - "; - - if (strlen(givenUUID) == 36) // Real UUID's only please. - { - int size = 0; - char szUUID[37]; // 0-35 (36) + 1 - char *p = szUUID; - - while (*givenUUID) - { - if (*givenUUID != '-') - { - *p++ = *givenUUID++; - } - else - { - givenUUID++; - } - } - *p = '\0'; - void* binaryString = convertHexStr2Binary(szUUID, &size); - - if (binaryString && size == 16) - { - return (EFI_UINT32*) binaryString; - } - - verbose("%swrong format maybe?\n", errStr); - } - else - { - verbose("%slength should be 36.\n", errStr); - } + printf("No proper UUID found in the System Information Table\n"); + return NULL; } - return (EFI_UINT32*) 0; + + return (EFI_CHAR8 *)gPlatform.UUID; } + */ #endif + //============================================================================== // Stage two EFI initialization (after getting data from com.apple.Boot.plist). @@ -383,37 +282,14 @@ void updateEFITree(char *rootUUID) { _EFI_DEBUG_DUMP("In updateEFITree(%s)\n", rootUUID); - static EFI_CHAR8 const SYSTEM_ID[] = STATIC_SYSTEM_ID; - - // This is your hardcoded SYSTEM_ID (see: config/settings.h). - EFI_UINT32 * targetUUID = (EFI_UINT32 *) &SYSTEM_ID; - -#if UNUSED_EFI_CODE - // Feature to set your own, uuidgen generated string in com.apple.Boot.plist - // Note: Unsupported feature in Revolution (you need to compile it anyway). - - const char* userDefinedUUID = newStringForKey("SystemID", &bootInfo->bootConfig); - - if (userDefinedUUID) + // Only accept a UUID with the correct length. + if (strlen(rootUUID) == 36) { - targetUUID = getUUIDFromString(userDefinedUUID); - - if (targetUUID) - { - _EFI_DEBUG_DUMP("Customizing SystemID with: %s\n", userDefinedUUID); - } - - free ((void*) userDefinedUUID); + _EFI_DEBUG_DUMP("Initializing property boot-uuid (%s)\n", rootUUID); + + DT__AddProperty(gPlatform.EFI.Nodes.Chosen, "boot-uuid", 37, rootUUID); } -#endif - - DT__AddProperty(gPlatform.EFI.Nodes.Platform, "system-id", 16, targetUUID); - // gPlatform.EFI.Nodes.Platform = NULL; - - setRootUUID(gPlatform.EFI.Nodes.Chosen, rootUUID); - // gPlatform.EFI.Nodes.Chosen = NULL; - /* * Check the architectures' target (boot) mode against the chosen setting of * EFI_64_BIT, which may not fit well and throw the dreadful @@ -431,25 +307,6 @@ void updateEFITree(char *rootUUID) } -//============================================================================== -// Called from initEFITree() and execKernel() in boot.c - -bool setRootUUID(Node *chosenNode, char *rootUUID) -{ - // Only accept a UUID with the correct length. - if (strlen(rootUUID) == 36) - { - _EFI_DEBUG_DUMP("Initializing property boot-uuid (%s)\n", rootUUID); - - DT__AddProperty(chosenNode, "boot-uuid", 37, rootUUID); - - return 0; - } - - return -1; -} - - #if INCLUDE_MPS_TABLE //============================================================================== @@ -494,13 +351,13 @@ bool initMultiProcessorTableAdress(void) //============================================================================== // Called from execKernel() in boot.c -void finalizeEFITree(void) +void finalizeEFITree(EFI_UINT32 kernelAdler32) { - _EFI_DEBUG_DUMP("Calling setupEFITables("); + _EFI_DEBUG_DUMP("done).Calling setupEFITables("); setupEFITables(); - - _EFI_DEBUG_DUMP("done).\nCalling setupSMBIOS("); + + DT__AddProperty(gPlatform.EFI.Nodes.Chosen, "boot-kernelcache-adler32", sizeof(EFI_UINT32), (EFI_UINT32*)kernelAdler32); setupSMBIOS(); @@ -508,6 +365,41 @@ void finalizeEFITree(void) addConfigurationTable(&gPlatform.SMBIOS.Guid, &gPlatform.SMBIOS.BaseAddress, NULL); +#ifdef SMB_STATIC_SYSTEM_UUID + // Static UUID from: RevoBoot/i386/config/SETTINGS/MacModelNN.h + static EFI_CHAR8 const SYSTEM_ID[] = SMB_STATIC_SYSTEM_UUID; + + DT__AddProperty(gPlatform.EFI.Nodes.Platform, "system-id", 16, (EFI_CHAR8 *) &SYSTEM_ID); +#else + // DT__AddProperty(gPlatform.EFI.Nodes.Platform, "system-id", 16, getSmbiosUUID()); + DT__AddProperty(gPlatform.EFI.Nodes.Platform, "system-id", 16, (EFI_CHAR8 *)gPlatform.UUID); +#endif + + // + // Start of experimental code + // + + Node *revoEFINode = DT__AddChild(gPlatform.DT.RootNode, "RevoEFI"); + +#ifdef STATIC_NVRAM_ROM + static EFI_UINT8 const NVRAM_ROM_DATA[] = STATIC_NVRAM_ROM; +#else +#ifdef SMB_STATIC_SYSTEM_UIID + static EFI_UINT8 const NVRAM_ROM_DATA[] = SMB_STATIC_SYSTEM_UUID; +#else + static EFI_UINT8 const NVRAM_ROM_DATA[] = gPlatform.UUID; +#endif +#endif + + DT__AddProperty(revoEFINode, "NVRAM:ROM", sizeof(NVRAM_ROM_DATA), (EFI_UINT8 *) &NVRAM_ROM_DATA); + + static EFI_UINT8 const NVRAM_MLB_DATA[] = STATIC_NVRAM_MLB; + DT__AddProperty(revoEFINode, "NVRAM:MLB", sizeof(NVRAM_MLB_DATA), (EFI_UINT8 *) &NVRAM_MLB_DATA); + + // + // End of experimental code + // + #if INCLUDE_MPS_TABLE // This BIOS includes a MP table? if (initMultiProcessorTableAdress()) From 83430f6de55fa7475241923d0fad73c532c46f0f Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 23 Jan 2013 07:37:05 +0100 Subject: [PATCH 237/623] Data for iMac13,2 and MacBookPro9,2 added Also updated some BIOS versions of other models --- i386/libsaio/smbios/model_data.h | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index bd8cc19..66c9bae 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -21,6 +21,7 @@ * - SMB_PRODUCT_NAME renamed/moved over from settings.h (PikerAlpha, October 2012). * - EFI_MODEL_NAME renamed/moved over from settings.h (PikerAlpha, October 2012). * - Data for new MacBookPro and Macmini added (PikerAlpha, October 2012). + * - Data for iMac13,2 and MacBookPro9,2 added (PikerAlpha, October 2013). * * Credits: * - blackosx, DB1, dgsga, FKA, humph, scrax and STLVNUB (testers). @@ -31,11 +32,15 @@ // ------------------------------------------------------------------------------------- #define SMB_FAMILY "Mac" - #if (TARGET_MODEL == IMAC_131) - // Intel Core i7-3770 @ 3.40 GHz - 4 Cores / 8 Threads. + #if (TARGET_MODEL == IMAC_132) #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" - #define SMB_PRODUCT_NAME "iMac13,1" + #define SMB_PRODUCT_NAME "iMac13,2" #define SMB_BOARD_PRODUCT "Mac-FC02E91DDD3FA6A4" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '2' } + #elif (TARGET_MODEL == IMAC_131) + #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" + #define SMB_PRODUCT_NAME "iMac13,1" + #define SMB_BOARD_PRODUCT "Mac-00BE6ED71E35EB86" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '1' } #elif (TARGET_MODEL == IMAC_122) #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" @@ -110,22 +115,28 @@ #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '0', ',', '1' } #elif (TARGET_MODEL == MACBOOK_PRO_91) // Intel Core i7-3820QM @ 2.70 GHz - 4 cores / 8 threads. - #define SMB_BIOS_VERSION "MBP91.88Z.00D3.B00.1203211536" + #define SMB_BIOS_VERSION "MBP91.88Z.00D3.B02.1203281326" #define SMB_PRODUCT_NAME "MacBookPro9,1" #define SMB_BOARD_PRODUCT "Mac-4B7AC7E43945597E" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '9', ',', '1' } + #elif (TARGET_MODEL == MACBOOK_PRO_92) + // Intel Core i7-3820QM @ 2.70 GHz - 4 cores / 8 threads. + #define SMB_BIOS_VERSION "MBP91.88Z.00D3.B02.1203281326" + #define SMB_PRODUCT_NAME "MacBookPro9,2" + #define SMB_BOARD_PRODUCT "Mac-6F01561E16C75D06" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '9', ',', '2' } #elif (TARGET_MODEL == MACBOOK_PRO_83) - #define SMB_BIOS_VERSION "MBP81.88Z.0047.B24.1110141131" + #define SMB_BIOS_VERSION "MBP81.88Z.0047.B27.1201241646" #define SMB_PRODUCT_NAME "MacBookPro8,3" #define SMB_BOARD_PRODUCT "Mac-942459F5819B171B" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '8', ',', '3' } #elif (TARGET_MODEL == MACBOOK_PRO_82) - #define SMB_BIOS_VERSION "MBP81.88Z.0047.B24.1110141131" + #define SMB_BIOS_VERSION "MBP81.88Z.0047.B27.1201241646" #define SMB_PRODUCT_NAME "MacBookPro8,2" #define SMB_BOARD_PRODUCT "Mac-94245A3940C91C80" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '8', ',', '2' } #elif (TARGET_MODEL == MACBOOK_PRO_81) - #define SMB_BIOS_VERSION "MBP81.88Z.0047.B24.1110141131" + #define SMB_BIOS_VERSION "MBP81.88Z.0047.B27.1201241646" #define SMB_PRODUCT_NAME "MacBookPro8,1" #define SMB_BOARD_PRODUCT "Mac-94245B3640C91C81" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '8', ',', '1' } From ae397ab67ef0f422b88a40e5af1550e5bda31db6 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 23 Jan 2013 07:38:30 +0100 Subject: [PATCH 238/623] Comment added --- i386/libsaio/cpu/Intel/static_data.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/cpu/Intel/static_data.h b/i386/libsaio/cpu/Intel/static_data.h index 483f4e7..69d28db 100644 --- a/i386/libsaio/cpu/Intel/static_data.h +++ b/i386/libsaio/cpu/Intel/static_data.h @@ -17,7 +17,8 @@ void initCPUStruct(void) { gPlatform.CPU.Vendor = CPU_VENDOR_ID; // Used in ACPI/patcher.h - gPlatform.CPU.Type = STATIC_CPU_Type; // Used in SMBIOS/dynamic_data.h, 'About This Mac' and System Profiler. + gPlatform.CPU.Type = STATIC_CPU_Type; // Used in SMBIOS/dynamic_data.h and ACPI/SSDT_PR + // Affects CPU type in 'About This Mac' and System Profiler. gPlatform.CPU.NumCores = STATIC_CPU_NumCores; // machdep.cpu.cores_per_package - used in: ACPI/ssdt_pm_generator.h gPlatform.CPU.NumThreads = STATIC_CPU_NumThreads; // machdep.cpu.logical_per_package - used in: ACPI/ssdt_pm_generator.h From 13484752024a8e8dbcf3857051dd14ebc26de9b1 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 23 Jan 2013 07:38:41 +0100 Subject: [PATCH 239/623] Whitespace only change --- i386/libsaio/cpu/Intel/dynamic_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index 45c40f3..fc63c5f 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -520,7 +520,7 @@ void initCPUStruct(void) _CPU_DEBUG_DUMP(" 123456789 123456789 123456789 123456789 12345678\n"); _CPU_DEBUG_DUMP("CPU: Brandstring : %s\n", gPlatform.CPU.BrandString); - _CPU_DEBUG_DUMP("CPU: Vendor/Model/ExtModel : 0x%x/0x%x/0x%x\n", gPlatform.CPU.Vendor, gPlatform.CPU.Model, gPlatform.CPU.ExtModel); + _CPU_DEBUG_DUMP("CPU: Vendor/Model/ExtModel : 0x%x/0x%x/0x%x\n", gPlatform.CPU.Vendor, gPlatform.CPU.Model, gPlatform.CPU.ExtModel); _CPU_DEBUG_DUMP("CPU: Stepping / Signature : 0x%x/0x%x\n", gPlatform.CPU.Stepping, gPlatform.CPU.Signature); _CPU_DEBUG_DUMP("CPU: Family/ExtFamily : 0x%x/0x%x\n", gPlatform.CPU.Family, gPlatform.CPU.ExtFamily); _CPU_DEBUG_DUMP("CPU: Type : 0x%x\n", gPlatform.CPU.Type); From 1d7b59cfadd30ad15ee33c797b0f74e1038aa738 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 23 Jan 2013 07:39:25 +0100 Subject: [PATCH 240/623] Smaller/faster workaround for iMessage --- i386/libsaio/load.c | 64 ++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index 266ac22..4d6bd85 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -43,6 +43,10 @@ #define LC_MAIN (0x28|LC_REQ_DYLD) /* replacement for LC_UNIXTHREAD */ #endif +#define NVRAM_GUID_UINT64 0x3530454445314434 +#define OPTIONS_STRING_UINT64 0x736e6f6974706f2f + + // Load MKext(s) or separate kexts (default behaviour / behavior). bool gLoadKernelDrivers = true; @@ -257,14 +261,6 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) return ret; } -#define UINT64_LE_FROM_CHARS(a,b,c,d,e,f,g,h) ( \ -((uint64_t)h << 56) | ((uint64_t)g << 48) | \ -((uint64_t)f << 40) | ((uint64_t)e << 32) | \ -((uint64_t)d << 24) | ((uint64_t)c << 16) | \ -((uint64_t)b << 8) | ((uint64_t)a << 0) ) - -#define NVRAM_GUID_UINT64 UINT64_LE_FROM_CHARS('4','D','1','E','D','E','0','5') -#define NVRAM_OPTIONS_UINT64 UINT64_LE_FROM_CHARS('/','o','p','t','i','o','n','s') //============================================================================== // Private function. Called from DecodeMachO() @@ -286,13 +282,16 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l filesize = segCmd->filesize; segname = segCmd->segname; +#if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) // - // iMessage kernel patch + // Kernel patch routine for iMessage // + // This segment will be replaced by random data (since 18 April 2011) and released + // when the kernel is done with it. Meaning that our data is short lived as well. if (strncmp(segname, "__KLD", 5) == 0) { - uint32_t index = 0; - uint32_t offset = sizeof(struct segment_command_64); + uint32_t index = 0; + uint32_t offset = sizeof(struct segment_command_64); while(offset < segCmd->cmdsize) { @@ -301,46 +300,47 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l if (strncmp((char *)section->sectname, "__cstring", 9) == 0) { - bool guidReplaced = FALSE; uint64_t sectionStart = (fileaddr + index); uint64_t sectionEnd = (fileaddr + filesize); unsigned char * baseAddress = (unsigned char *)sectionStart; - for (; baseAddress <= (unsigned char *)sectionEnd; baseAddress += 1) + // Search for the NVRAM GUID. + for (; baseAddress <= (unsigned char *)sectionEnd; baseAddress++) { - // Quick lookup if (*(uint64_t *)baseAddress == NVRAM_GUID_UINT64) { - // Full lookup - if (strncmp((char *)baseAddress, "4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14", 36) == 0) + // Zero out NVRAM GUID + bzero((char *)baseAddress, 36); + // Replace/inject GUID replacement + memcpy((char *)baseAddress, "NVRAM", 5); + // Point to the end of the (former) NVRAM GUID string + baseAddress += 36; + + // Search for "/options" after the GUID. + for (; baseAddress <= (unsigned char *)sectionEnd; baseAddress++) { - // Zero out NVRAM GUID - bzero((char *)baseAddress, 36); - // Replace inject GUID replacement - memcpy((char *)baseAddress, "NVRAM", 5); - // Point to the end of the (now former) GUID string - baseAddress += 36; - // Signal that phase one is done - guidReplaced = TRUE; + if (*(uint64_t *)baseAddress == OPTIONS_STRING_UINT64) + { + // Rename /option to /RevoEFI (just temporarily) + memcpy((unsigned char *)baseAddress, "/RevoEFI", 8); + // Prepare to break out early. + baseAddress = (unsigned char *)(sectionEnd + 1); + // Done. + break; + } } } - // Wait for the GUID to be replaced, then do phase two - if (guidReplaced && (*(uint64_t *)baseAddress == NVRAM_OPTIONS_UINT64)) - { - // Replacing /option with /RevoEFI - memcpy((unsigned char *)baseAddress, "/RevoEFI", 8); - // Where done here. Bail out. - break; - } } } else { + // Skip unwanted sections (which makes us a little faster). index += section->size; } } } +#endif } else { From 2175809a2a07850c798242c95444ebd221e205d3 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 23 Jan 2013 07:42:08 +0100 Subject: [PATCH 241/623] Removing unused code --- i386/libsaio/efi.c | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index 658bb8c..91ea9a2 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -42,26 +42,6 @@ #include "efi/fake_efi.h" -/* #if LOAD_MODEL_SPECIFIC_EFI_DATA -//============================================================================== - -void useStaticEFIProperties(Node * aEFINode) -{ - // The STRING (macro) is defined in RevoBoot/i386/config/settings.h - #include STRING(EFI_DATA_FILE) - - static EFI_UINT8 const EFI_DEVICE_PROPERTIES[] = - { - // Replaced with data from: RevoBoot/i386/config/EFI/[data-template/MacModelNN].h - STATIC_EFI_DEVICE_PROPERTIES - }; - - DT__AddProperty(aEFINode, "device-properties", sizeof(EFI_DEVICE_PROPERTIES), (EFI_CHAR8*) &EFI_DEVICE_PROPERTIES); - - // _EFI_DEBUG_DUMP("Using statically linked EFI device-properties\n"); -} -#endif */ - //============================================================================== // Called from RevoBoot/i386/libsaio/platform.c @@ -191,7 +171,6 @@ void initEFITree(void) // Adding the options node breaks AppleEFINVRAM (missing hardware UUID). // Node *optionsNode = DT__AddChild(gPlatform.DT.RootNode, "options"); // DT__AddProperty(optionsNode, "EFICapsuleResult", 4, "STAR"); // 53 54 41 52 - #endif gPlatform.EFI.Nodes.Chosen = chosenNode; @@ -384,11 +363,11 @@ void finalizeEFITree(EFI_UINT32 kernelAdler32) #ifdef STATIC_NVRAM_ROM static EFI_UINT8 const NVRAM_ROM_DATA[] = STATIC_NVRAM_ROM; #else -#ifdef SMB_STATIC_SYSTEM_UIID - static EFI_UINT8 const NVRAM_ROM_DATA[] = SMB_STATIC_SYSTEM_UUID; -#else - static EFI_UINT8 const NVRAM_ROM_DATA[] = gPlatform.UUID; -#endif + #ifdef SMB_STATIC_SYSTEM_UIID + static EFI_UINT8 const NVRAM_ROM_DATA[] = SMB_STATIC_SYSTEM_UUID; + #else + static EFI_UINT8 const NVRAM_ROM_DATA[] = gPlatform.UUID; + #endif #endif DT__AddProperty(revoEFINode, "NVRAM:ROM", sizeof(NVRAM_ROM_DATA), (EFI_UINT8 *) &NVRAM_ROM_DATA); From 4f3eee1608813a59713ad51e30972f6b7b5a47cb Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 23 Jan 2013 07:48:25 +0100 Subject: [PATCH 242/623] Sam's ssdtPRGen.sh --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 357 +++++++++++++++++++++++++++ 1 file changed, 357 insertions(+) create mode 100755 i386/libsaio/acpi/Tools/ssdtPRGen.sh diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh new file mode 100755 index 0000000..03577f4 --- /dev/null +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -0,0 +1,357 @@ +#!/bin/sh +# +# Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. +# +# Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> +# + +# set -x # Used for tracing errors (can be put anywhere in the script). + +#================================= GLOBAL VARS ================================== + +ssdtPR=/tmp/ssdt-pr.dsl + +ssdtID=ssdt-pr + +# +# Lowest possible idle frequency (800 for mobile processors). +# + +baseFrequency=1500 + +#CPU='i5-2410M','i5-2510E','i5-2515E','i5-2520M','i5-2537M','i5-2540M','i5-2557M',\ +#'i5-3210M','i5-3317U','i5-3320M','i5-3360M','i5-3427U','i5-3610ME' + +#TDP= 35,35,35,35,17,35,17,35,17,35,35,17,25 + +#CLOCKSPEED= 23,25,25,25,14,26,17,25,17,26,28,18,27 + +#MAXTURBO= 29,31,31,32,23,33,27,31,26,33,35,28,33 + +#THREADS= 04,04,04,04,04,04,04,04,04,04,04,04,04 + + +#-------------------------------------------------------------------------------- + +function _printHeader() +{ + echo '/*' > $ssdtPR + echo ' * Intel ACPI Component Architecture' >> $ssdtPR + echo ' * AML Disassembler version 20120620-64 [Jun 20 2012]' >> $ssdtPR + echo ' * Copyright (c) 2000 - 2012 Intel Corporation' >> $ssdtPR + echo ' * ' >> $ssdtPR + echo ' * Original Table Header:' >> $ssdtPR + echo ' * Signature "SSDT"' >> $ssdtPR + echo ' * Length 0x0000036A (874)' >> $ssdtPR + echo ' * Revision 0x01' >> $ssdtPR + echo ' * Checksum 0x98' >> $ssdtPR + echo ' * OEM ID "APPLE "' >> $ssdtPR + echo ' * OEM Table ID "CpuPm"' >> $ssdtPR + echo ' * OEM Revision 0x00001000 (4096)' >> $ssdtPR + echo ' * Compiler ID "INTL"' >> $ssdtPR + echo ' * Compiler Version 0x20120620 (537985814)' >> $ssdtPR + echo ' */' >> $ssdtPR + echo '' >> $ssdtPR + echo 'DefinitionBlock ("'$ssdtID'.aml", "SSDT", 1, "APPLE ", "CpuPm", 0x00001000)'>> $ssdtPR + echo '{' >> $ssdtPR +} + + +#-------------------------------------------------------------------------------- + +function _printExternals() +{ + currentCPU=0; + + while [ $currentCPU -lt $1 ]; do + echo ' External (\_PR_.CPU'$currentCPU', DeviceObj)' >> $ssdtPR + let currentCPU+=1 + done + + echo '' >> $ssdtPR +} + + +#-------------------------------------------------------------------------------- + +function _printProcessorDefinitions() +{ + currentCPU=0; + + while [ $currentCPU -lt $1 ]; do + echo ' External (\_PR_.CPU'$currentCPU', DeviceObj)' >> $ssdtPR + let currentCPU+=1 + done + + echo '' >> $ssdtPR +} + +#-------------------------------------------------------------------------------- + +function _printScopeStart() +{ + echo ' Scope (_PR.CPU0)' >> $ssdtPR + echo ' {' >> $ssdtPR + + # + # Check number of Turbo states (for IASL optimization). + # + + if [ $1 -eq 0 ]; + then + echo ' Name (APSN, Zero)' >> $ssdtPR + else + printf " Name (APSN, 0x%02X" $1 >> $ssdtPR + echo ')' >> $ssdtPR + fi + + printf " Name (APSS, Package (0x%02X" $2 >> $ssdtPR + + echo ')' >> $ssdtPR + echo ' {' >> $ssdtPR +} + + +#-------------------------------------------------------------------------------- + +function _printPackages() +{ + let tdp=($1*1000) + let maxNonTurboFrequency=$2 + let frequency=$3 + let max_ratio=($frequency/100) + + while [ $frequency -gt $baseFrequency ]; do + echo '' >> $ssdtPR + echo ' Package (0x06)' >> $ssdtPR + echo ' {' >> $ssdtPR + + printf " 0x%04X" $frequency >> $ssdtPR + + echo ',' >> $ssdtPR + + let ratio=$frequency/100 + + if [ $frequency -lt $maxNonTurboFrequency ]; + then + power=$(echo "scale=6;m=((1.1-(($max_ratio-$ratio)*0.00625))/1.1);(($ratio/$max_ratio)*(m*m)*$tdp);" | bc | sed -e 's/.[0-9A-F]*$//') + else + power=$tdp + fi + + printf " 0x%08X" $power >> $ssdtPR + + echo ',' >> $ssdtPR + + echo ' 0x0A,' >> $ssdtPR + echo ' 0x0A,' >> $ssdtPR + + printf " 0x%02X" $ratio >> $ssdtPR + + echo '00,' >> $ssdtPR + + printf " 0x%02X" $ratio >> $ssdtPR + + echo '00' >> $ssdtPR + + let frequency-=100 + + if [ $frequency -eq $baseFrequency ]; + then + echo ' }' >> $ssdtPR + else + echo ' },' >> $ssdtPR + fi + done + + echo ' })' >> $ssdtPR +} + + +#-------------------------------------------------------------------------------- + +function _printCSTScope() +{ + echo '' >> $ssdtPR + echo ' Method (ACST, 0, NotSerialized)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Return (Package (0x06)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' One,' >> $ssdtPR + echo ' 0x04,' >> $ssdtPR + echo ' Package (0x04)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' ResourceTemplate ()' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Register (FFixedHW,' >> $ssdtPR + echo ' 0x01, // Bit Width' >> $ssdtPR + echo ' 0x02, // Bit Offset' >> $ssdtPR + echo ' 0x0000000000000000, // Address' >> $ssdtPR + echo ' 0x01, // Access Size' >> $ssdtPR + echo ' )' >> $ssdtPR + echo ' },' >> $ssdtPR + echo '' >> $ssdtPR + echo ' One,' >> $ssdtPR + echo ' 0x03,' >> $ssdtPR + echo ' 0x03E8' >> $ssdtPR + echo ' },' >> $ssdtPR + echo '' >> $ssdtPR + echo ' Package (0x04)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' ResourceTemplate ()' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Register (FFixedHW,' >> $ssdtPR + echo ' 0x01, // Bit Width' >> $ssdtPR + echo ' 0x02, // Bit Offset' >> $ssdtPR + echo ' 0x0000000000000010, // Address' >> $ssdtPR + echo ' 0x03, // Access Size' >> $ssdtPR + echo ' )' >> $ssdtPR + echo ' },' >> $ssdtPR + echo '' >> $ssdtPR + echo ' 0x03,' >> $ssdtPR + echo ' 0xCD,' >> $ssdtPR + echo ' 0x01F4' >> $ssdtPR + echo ' },' >> $ssdtPR + echo '' >> $ssdtPR + echo ' Package (0x04)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' ResourceTemplate ()' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Register (FFixedHW,' >> $ssdtPR + echo ' 0x01, // Bit Width' >> $ssdtPR + echo ' 0x02, // Bit Offset' >> $ssdtPR + echo ' 0x0000000000000020, // Address' >> $ssdtPR + echo ' 0x03, // Access Size' >> $ssdtPR + echo ' )' >> $ssdtPR + echo ' },' >> $ssdtPR + echo '' >> $ssdtPR + echo ' 0x06,' >> $ssdtPR + echo ' 0xF5,' >> $ssdtPR + echo ' 0x015E' >> $ssdtPR + echo ' },' >> $ssdtPR + echo '' >> $ssdtPR + echo ' Package (0x04)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' ResourceTemplate ()' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Register (FFixedHW,' >> $ssdtPR + echo ' 0x01, // Bit Width' >> $ssdtPR + echo ' 0x02, // Bit Offset' >> $ssdtPR + echo ' 0x0000000000000030, // Address' >> $ssdtPR + echo ' 0x03, // Access Size' >> $ssdtPR + echo ' )' >> $ssdtPR + echo ' },' >> $ssdtPR + echo '' >> $ssdtPR + echo ' 0x07,' >> $ssdtPR + echo ' 0xF5,' >> $ssdtPR + echo ' 0xC8' >> $ssdtPR + echo ' }' >> $ssdtPR + echo ' })' >> $ssdtPR + echo ' }' >> $ssdtPR + echo ' }' >> $ssdtPR +} + + +#-------------------------------------------------------------------------------- + +function _printCPUScopes() +{ + currentCPU=1; + + while [ $currentCPU -lt $1 ]; do + echo '' >> $ssdtPR + echo ' Scope (\_PR.CPU'$currentCPU')' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Method (APSS, 0, NotSerialized)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Return (\_PR.CPU0.APSS)' >> $ssdtPR + echo ' }' >> $ssdtPR + echo ' }' >> $ssdtPR + let currentCPU+=1 + done + + echo '}' >> $ssdtPR +} + + +#-------------------------------------------------------------------------------- +# +# Only administrators (root) are allowed to run this script. +# +#-------------------------------------------------------------------------------- + +function _isRoot() +{ + if [ $(id -u) != 0 ]; then + echo "This script must be run as root" 1>&2 + exit 1 + fi + + echo 1 +} + + +#-------------------------------------------------------------------------------- + +function main() +{ + # + # Command line arguments. + # + + let tdp=$1 + let maxTurboFrequency=$2 + + # + # Do not change anything below this line! + # + + #let logicalCPUs=$(echo `sysctl hw.logicalcpu` | sed -e 's/^hw.logicalcpu: //') + let logicalCPUs=$(echo `sysctl machdep.cpu.thread_count` | sed -e 's/^machdep.cpu.thread_count: //') + + let frequency=$(echo `sysctl hw.cpufrequency` | sed -e 's/^hw.cpufrequency: //') + let frequency=($frequency / 1000000) + + # + # Get number of Turbo states. + # + + let turboStates=$(echo "(($maxTurboFrequency - $frequency) / 100)" | bc) + + # + # Check number of Turbo states. + # + + if [ $turboStates -lt 0 ]; + then + let turboStates=0 + fi + + let packageLength=$(echo "(($maxTurboFrequency - $baseFrequency) / 100)" | bc) + + _printHeader + _printExternals $logicalCPUs + _printScopeStart $turboStates $packageLength + _printPackages $tdp $frequency $maxTurboFrequency + _printCSTScope + _printCPUScopes $logicalCPUs +} + + +#==================================== START ===================================== + +# +# Check number of arguments. +# + +if [ $# -eq 2 ]; + then + main $1 $2 + else + echo "Usage: $0 TDP MaxTurboFrequency" + exit 1 +fi + +#================================================================================ + +exit 0 From 2f7e79b8cb6bce37617046585c5caf2c194002bc Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 23 Jan 2013 07:51:35 +0100 Subject: [PATCH 243/623] Adding Ivybridge support Filename fixed thanks to Dave, Namescape error fixed thanks to toleda --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 164 +++++++++++++++++++-------- 1 file changed, 117 insertions(+), 47 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 03577f4..2c886af 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,6 +3,12 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> +# Version 1.0 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# +# Updates: +# - Added support for Ivybridge (Pike, January, 2013) +# - Filename error fixed (Pike, January, 2013) +# - Namespace error fixed in _printScopeStart (Pike, January, 2013) # # set -x # Used for tracing errors (can be put anywhere in the script). @@ -11,26 +17,14 @@ ssdtPR=/tmp/ssdt-pr.dsl -ssdtID=ssdt-pr +ssdtID=ssdt_pr # -# Lowest possible idle frequency (800 for mobile processors). +# Lowest possible idle frequency minus 100. # baseFrequency=1500 -#CPU='i5-2410M','i5-2510E','i5-2515E','i5-2520M','i5-2537M','i5-2540M','i5-2557M',\ -#'i5-3210M','i5-3317U','i5-3320M','i5-3360M','i5-3427U','i5-3610ME' - -#TDP= 35,35,35,35,17,35,17,35,17,35,35,17,25 - -#CLOCKSPEED= 23,25,25,25,14,26,17,25,17,26,28,18,27 - -#MAXTURBO= 29,31,31,32,23,33,27,31,26,33,35,28,33 - -#THREADS= 04,04,04,04,04,04,04,04,04,04,04,04,04 - - #-------------------------------------------------------------------------------- function _printHeader() @@ -90,22 +84,38 @@ function _printProcessorDefinitions() function _printScopeStart() { - echo ' Scope (_PR.CPU0)' >> $ssdtPR + echo ' Scope (\_PR.CPU0)' >> $ssdtPR echo ' {' >> $ssdtPR - # - # Check number of Turbo states (for IASL optimization). - # + let packageLength=$2 - if [ $1 -eq 0 ]; - then - echo ' Name (APSN, Zero)' >> $ssdtPR - else - printf " Name (APSN, 0x%02X" $1 >> $ssdtPR - echo ')' >> $ssdtPR - fi + # + # Do we need to create additional (Low Frequency) P-States for Ivybridge? + # - printf " Name (APSS, Package (0x%02X" $2 >> $ssdtPR + if [ $3 -eq 1 ]; + then + let lowestFrequency=($baseFrequency+100) + let lowFrequencyPStates=($lowestFrequency/100)-8 + let packageLength=($2+$lowFrequencyPStates) + + printf " Name (APLF, 0x%02x" $lowFrequencyPStates >> $ssdtPR + echo ')' >> $ssdtPR + fi + + # + # Check number of Turbo states (for IASL optimization). + # + + if [ $1 -eq 0 ]; + then + echo ' Name (APSN, Zero)' >> $ssdtPR + else + printf " Name (APSN, 0x%02X" $1 >> $ssdtPR + echo ')' >> $ssdtPR + fi + + printf " Name (APSS, Package (0x%02X" $packageLength >> $ssdtPR echo ')' >> $ssdtPR echo ' {' >> $ssdtPR @@ -119,10 +129,21 @@ function _printPackages() let tdp=($1*1000) let maxNonTurboFrequency=$2 let frequency=$3 + let min_ratio=($baseFrequency/100) let max_ratio=($frequency/100) + let lowFrequencyPStates=$4 + let lowestFrequency=$baseFrequency - while [ $frequency -gt $baseFrequency ]; do - echo '' >> $ssdtPR + # + # Do we need to create additional (Low Frequency) P-States for Ivybridge? + # + + if [ $lowFrequencyPStates -eq 1 ] + then + let lowestFrequency=(800-100) + fi + + while [ $frequency -gt $lowestFrequency ]; do echo ' Package (0x06)' >> $ssdtPR echo ' {' >> $ssdtPR @@ -131,17 +152,21 @@ function _printPackages() echo ',' >> $ssdtPR let ratio=$frequency/100 - - if [ $frequency -lt $maxNonTurboFrequency ]; - then - power=$(echo "scale=6;m=((1.1-(($max_ratio-$ratio)*0.00625))/1.1);(($ratio/$max_ratio)*(m*m)*$tdp);" | bc | sed -e 's/.[0-9A-F]*$//') - else - power=$tdp - fi - - printf " 0x%08X" $power >> $ssdtPR - echo ',' >> $ssdtPR + if [ $ratio -gt $min_ratio ] + then + if [ $frequency -lt $maxNonTurboFrequency ]; + then + power=$(echo "scale=6;m=((1.1-(($max_ratio-$ratio)*0.00625))/1.1);(($ratio/$max_ratio)*(m*m)*$tdp);" | bc | sed -e 's/.[0-9A-F]*$//') + else + power=$tdp + fi + + printf " 0x%08X" $power >> $ssdtPR + echo ',' >> $ssdtPR + else + echo ' Zero,' >> $ssdtPR + fi echo ' 0x0A,' >> $ssdtPR echo ' 0x0A,' >> $ssdtPR @@ -156,18 +181,48 @@ function _printPackages() let frequency-=100 - if [ $frequency -eq $baseFrequency ]; + if [ $frequency -eq $lowestFrequency ]; then echo ' }' >> $ssdtPR else echo ' },' >> $ssdtPR - fi + echo '' >> $ssdtPR + fi done - echo ' })' >> $ssdtPR + echo ' })' >> $ssdtPR } +#-------------------------------------------------------------------------------- + +function _printIvybridgeMethods() +{ + echo '' >> $ssdtPR + echo ' Method (MCDP, 2, NotSerialized)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' If (LEqual (Arg0, Zero))' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Store (Buffer (One)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' 0x03' >> $ssdtPR + echo ' }, Arg1)' >> $ssdtPR + echo ' }' >> $ssdtPR + echo ' }' >> $ssdtPR + echo '' >> $ssdtPR + echo ' Method (_DSM, 4, NotSerialized)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Store (Package (0x02)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' "plugin-type",' >> $ssdtPR + echo ' One' >> $ssdtPR + echo ' }, Local0)' >> $ssdtPR + echo ' MCDP (Arg2, RefOf (Local0))' >> $ssdtPR + echo ' Return (Local0)' >> $ssdtPR + echo ' }' >> $ssdtPR + echo ' }' >> $ssdtPR +} + #-------------------------------------------------------------------------------- function _printCSTScope() @@ -248,7 +303,15 @@ function _printCSTScope() echo ' }' >> $ssdtPR echo ' })' >> $ssdtPR echo ' }' >> $ssdtPR - echo ' }' >> $ssdtPR + + # + # We don't want a closing bracket here when we add methods for Ivybridge. + # + + if [ $lowFrequencyPStates -eq 0 ] + then + echo ' }' >> $ssdtPR + fi } @@ -301,6 +364,7 @@ function main() let tdp=$1 let maxTurboFrequency=$2 + # let lowFrequencyPStates=$3 # # Do not change anything below this line! @@ -331,9 +395,15 @@ function main() _printHeader _printExternals $logicalCPUs - _printScopeStart $turboStates $packageLength - _printPackages $tdp $frequency $maxTurboFrequency + _printScopeStart $turboStates $packageLength $3 + _printPackages $tdp $frequency $maxTurboFrequency $3 _printCSTScope + + if [ $3 -eq 1 ] + then + _printIvybridgeMethods + fi + _printCPUScopes $logicalCPUs } @@ -344,11 +414,11 @@ function main() # Check number of arguments. # -if [ $# -eq 2 ]; +if [ $# -eq 3 ]; then - main $1 $2 + main $1 $2 $3 else - echo "Usage: $0 TDP MaxTurboFrequency" + echo "Usage: $0 TDP MaxTurboFrequency (0 for SandyBridge / 1 for IvyBridge)" exit 1 fi From a032e0bb2155aa2c69961993aab01a954dd4b869 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 23 Jan 2013 07:57:36 +0100 Subject: [PATCH 244/623] Version number updated --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 2c886af..d918cb1 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 1.0 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 1.1 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January, 2013) From d01f6eca064e587b5373311136db5c8e01f7199f Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 23 Jan 2013 09:32:46 +0100 Subject: [PATCH 245/623] Model and board-id validation checks added --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 154 ++++++++++++++++++++++++++- 1 file changed, 150 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index d918cb1..9fbd8ca 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,12 +3,13 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 1.1 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 1.2 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January, 2013) # - Filename error fixed (Pike, January, 2013) # - Namespace error fixed in _printScopeStart (Pike, January, 2013) +# - Model and board-id checks added (Pike, January, 2013) # # set -x # Used for tracing errors (can be put anywhere in the script). @@ -336,6 +337,123 @@ function _printCPUScopes() echo '}' >> $ssdtPR } +#-------------------------------------------------------------------------------- + +function _getModelName() +{ + echo `ioreg -p IODeviceTree -d 2 -k compatible | grep compatible | sed -e 's/ *"*=*<*>*//g' -e 's/compatible*//'` +} + +#-------------------------------------------------------------------------------- + +function _getBoardID() +{ + echo `ioreg -p IODeviceTree -d 2 -k board-id | grep board-id | sed -e 's/ *"*=*<*>*//g' -e 's/board-id*//'` +} + +#-------------------------------------------------------------------------------- + +function _getSandyMacModelByBoardID() +{ + local boardID=$(_getBoardID) + local macModelIdentifier="" + + case $boardID in + Mac-942B59F58194171B) + local macModelIdentifier="iMac12,1" + ;; + + Mac-942B5BF58194151B) + local macModelIdentifier="iMac12,2" + ;; + + Mac-8ED6AF5B48C039E1) + local macModelIdentifier="Macmini5,1" + ;; + + Mac-4BC72D62AD45599E) + local macModelIdentifier="Macmini5,2" + ;; + + Mac-7BA5B2794B2CDB12) + local macModelIdentifier="Macmini5,3" + ;; + + Mac-94245B3640C91C81) + local macModelIdentifier="MacBookPro8,1" + ;; + + Mac-94245A3940C91C80) + local macModelIdentifier="MacBookPro8,2" + ;; + + Mac-942459F5819B171B) + local macModelIdentifier="MacBookPro8,3" + ;; + + Mac-C08A6BB70A942AC2) + local macModelIdentifier="MacBookAir4,1" + ;; + + Mac-742912EFDBEE19B3) + local macModelIdentifier="MacBookAir4,2" + ;; + esac + + echo $macModelIdentifier +} + +#-------------------------------------------------------------------------------- + +function _getIvyMacModelByBoardID() +{ + local boardID=$(_getBoardID) + local macModelIdentifier="" + + case $boardID in + Mac-00BE6ED71E35EB86) + local macModelIdentifier="iMac13,1" + ;; + + Mac-FC02E91DDD3FA6A4) + local macModelIdentifier="iMac13,2" + ;; + + Mac-031AEE4D24BFF0B15819B171B) + local macModelIdentifier="Macmini6,1" + ;; + + Mac-F65AE981FFA204ED) + local macModelIdentifier="Macmini6,2" + ;; + + Mac-4B7AC7E43945597E) + local macModelIdentifier="MacBookPro9,1" + ;; + + Mac-6F01561E16C75D06) + local macModelIdentifier="MacBookPro9,2" + ;; + + Mac-C3EC7CD22292981F) + local macModelIdentifier="MacBookPro10,1" + ;; + + Mac-AFD8A9D944EA4843) + local macModelIdentifier="MacBookPro10,2" + ;; + + Mac-66F35F19FE2A0D05) + local macModelIdentifier="MacBookAir5,1" + ;; + + Mac-2E6FAB96566FE58C) + local macModelIdentifier="MacBookAir5,2" + ;; + esac + + echo $macModelIdentifier +} #-------------------------------------------------------------------------------- # @@ -399,12 +517,40 @@ function main() _printPackages $tdp $frequency $maxTurboFrequency $3 _printCSTScope + local modelID=$(_getModelName) + local usedBoardID=$(_getBoardID) + if [ $3 -eq 1 ] then - _printIvybridgeMethods + local targetModelID=$(_getIvyMacModelByBoardID) + + _printIvybridgeMethods $usedBoardID $targetModelID + _printCPUScopes $logicalCPUs + + if [ "$targetModelID" == "" ] + then + echo "Warning: Used board-id [$usedBoardID] is not supported by Ivybridge PM" + else + if [ "$targetModelID" != "$modelID" ] + then + echo "Error: board-id [$usedBoardID] and model [$modelID] mismatch" + fi + fi + else + local targetModelID=$(_getSandyMacModelByBoardID) + + _printCPUScopes $logicalCPUs + + if [ "$targetModelID" == "" ] + then + echo "Warning: Used board-id [$usedBoardID] is not supported by Sandybridge PM" + else + if [ "$targetModelID" != "$modelID" ] + then + echo "Error: board-id [$usedBoardID] and model [$modelID] mismatch" + fi + fi fi - - _printCPUScopes $logicalCPUs } From 844a1d32fe80d2e4f15002c1ddfa4fd0a758f3bf Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 24 Jan 2013 02:37:35 +0100 Subject: [PATCH 246/623] Compiler error fixed (use of undeclared identifier) Thanks to Dave for reporting this. --- i386/libsaio/cpu.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/i386/libsaio/cpu.c b/i386/libsaio/cpu.c index a4e3dad..f81cd76 100644 --- a/i386/libsaio/cpu.c +++ b/i386/libsaio/cpu.c @@ -1,12 +1,14 @@ /* * Copyright (c) 2009 by Master Chief. * - * Refactoring for Revolution done by DHP in 2010/2011. - * Expanded (requestMaxTurbo added) by DHP in May 2011. - * Simplified by DHP in Juni 2011 (thanks to MC and flAked for the idea). - * Code copied from Intel/dynamic_data.h by DHP in juni 2011. - * New compiler directive (BOOT_TURBO_RATIO) added by Jeroen (June 2011). - * Function checkFlexRatioMSR added by DHP (August 2011). + * Updates: + * - Refactoring for Revolution done by DHP in 2010/2011. + * - Expanded (requestMaxTurbo added) by DHP in May 2011. + * - Simplified by DHP in Juni 2011 (thanks to MC and flAked for the idea). + * - Code copied from Intel/dynamic_data.h by DHP in juni 2011. + * - New compiler directive (BOOT_TURBO_RATIO) added by Jeroen (June 2011). + * - Function checkFlexRatioMSR added by DHP (August 2011). + * - Fixed error: use of undeclared identifier 'NUMBER_OF_TURBO_STATES' (Pike, January 2013). */ @@ -90,10 +92,11 @@ void initTurboRatios() // We need to have something to work with so check for it, and the // way we do that (trying to be smart) supports any number of cores. + uint8_t numberOfCores = gPlatform.CPU.NumCores; + if (gPlatform.CPU.CoreTurboRatio[0] != 0) { uint8_t i, duplicatedRatios = 0; - uint8_t numberOfCores = gPlatform.CPU.NumCores; // Simple check to see if all ratios are the same. for (i = 0; i < numberOfCores; i++) @@ -107,15 +110,20 @@ void initTurboRatios() duplicatedRatios++; } +#ifdef NUMBER_OF_TURBO_STATES + uint8_t numberOfTurboStates = NUMBER_OF_TURBO_STATES; +#else + uint8_t numberOfTurboStates = numberOfCores; +#endif // Should we add only one turbo P-State? if (duplicatedRatios == 0) { - gPlatform.CPU.NumberOfTurboRatios = NUMBER_OF_TURBO_STATES; // Default for AICPUPM. + gPlatform.CPU.NumberOfTurboRatios = numberOfTurboStates; // Default for AICPUPM. } else // Meaning that we found duplicated ratios. { // Do we need to inject one Turbo P-State only? - if (duplicatedRatios == NUMBER_OF_TURBO_STATES) + if (duplicatedRatios == numberOfTurboStates) { // Yes. Wipe the rest (keeping the one with the highest multiplier). for (i = 1; i < numberOfCores; i++) // i set to 1 to preserve the first one. @@ -133,7 +141,7 @@ void initTurboRatios() } // Jeroen: Used in ACPI/ssdt_pr_generator.h / for DEBUG_CPU_TURBO_RATIOS. - gPlatform.CPU.NumberOfTurboRatios = (NUMBER_OF_TURBO_STATES - duplicatedRatios); + gPlatform.CPU.NumberOfTurboRatios = (numberOfTurboStates - duplicatedRatios); /* if (duplicatedRatios == 4) { From 3c03978f98391c288117ccfbe7dc5373713b9ef2 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 24 Jan 2013 03:33:32 +0100 Subject: [PATCH 247/623] SMBIOS cpu-type check added The additional check, along with the first two in version 1.2, should help people detect possible configuration errors. --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 35 +++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 9fbd8ca..c8c4dfc 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,13 +3,14 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 1.2 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 1.3 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January, 2013) # - Filename error fixed (Pike, January, 2013) # - Namespace error fixed in _printScopeStart (Pike, January, 2013) # - Model and board-id checks added (Pike, January, 2013) +# - SMBIOS cpu-type check added (Pike, January, 2013) # # set -x # Used for tracing errors (can be put anywhere in the script). @@ -341,6 +342,9 @@ function _printCPUScopes() function _getModelName() { + # + # Grab 'compatible' property from ioreg (stripped with sed / RegEX magic). + # echo `ioreg -p IODeviceTree -d 2 -k compatible | grep compatible | sed -e 's/ *"*=*<*>*//g' -e 's/compatible*//'` } @@ -348,11 +352,28 @@ function _getModelName() function _getBoardID() { + # + # Grab 'board-id' property from ioreg (stripped with sed / RegEX magic). + # echo `ioreg -p IODeviceTree -d 2 -k board-id | grep board-id | sed -e 's/ *"*=*<*>*//g' -e 's/board-id*//'` } #-------------------------------------------------------------------------------- +function _getCPUtype() +{ + # + # Grab 'cpu-type' property from ioreg (stripped with sed / RegEX magic). + # + local grepStr=`ioreg -p IODeviceTree -n CPU0@0 -k cpu-type | grep cpu-type | sed -e 's/.*[<]//' -e 's/0\{0\}>$//'` + # + # Swap bytes with help of ${str:pos:num} + # + echo ${grepStr:2:2}${grepStr:0:2} +} + +#-------------------------------------------------------------------------------- + function _getSandyMacModelByBoardID() { local boardID=$(_getBoardID) @@ -522,6 +543,7 @@ function main() if [ $3 -eq 1 ] then + local typeCPU=$(_getCPUtype) local targetModelID=$(_getIvyMacModelByBoardID) _printIvybridgeMethods $usedBoardID $targetModelID @@ -536,6 +558,11 @@ function main() echo "Error: board-id [$usedBoardID] and model [$modelID] mismatch" fi fi + + if [ "${typeCPU}:2:2" != "04" ] + then + echo "Warning: cpu-type may be set improperly (0x$typeCPU instead of 0x${typeCPU:0:2}04)" + fi else local targetModelID=$(_getSandyMacModelByBoardID) @@ -550,6 +577,12 @@ function main() echo "Error: board-id [$usedBoardID] and model [$modelID] mismatch" fi fi + + if [ "${typeCPU}:2:2" != "02" ] + then + echo "Warning: cpu-type may be set improperly (0x$typeCPU instead of 0x${typeCPU:0:2}02)" + fi + fi } From cf15460ebcc55ee74d7596103d2001b9955abd5e Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 24 Jan 2013 03:50:09 +0100 Subject: [PATCH 248/623] Done testing --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index c8c4dfc..377a772 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -540,10 +540,10 @@ function main() local modelID=$(_getModelName) local usedBoardID=$(_getBoardID) + local typeCPU=$(_getCPUtype) if [ $3 -eq 1 ] then - local typeCPU=$(_getCPUtype) local targetModelID=$(_getIvyMacModelByBoardID) _printIvybridgeMethods $usedBoardID $targetModelID @@ -559,7 +559,7 @@ function main() fi fi - if [ "${typeCPU}:2:2" != "04" ] + if [ "${typeCPU:2:2}" != "04" ] then echo "Warning: cpu-type may be set improperly (0x$typeCPU instead of 0x${typeCPU:0:2}04)" fi @@ -578,7 +578,7 @@ function main() fi fi - if [ "${typeCPU}:2:2" != "02" ] + if [ "${typeCPU:2:2}" != "02" ] then echo "Warning: cpu-type may be set improperly (0x$typeCPU instead of 0x${typeCPU:0:2}02)" fi From 7d61dbc92fa047f3f6090261bccb41318c011f98 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 24 Jan 2013 08:33:12 +0100 Subject: [PATCH 249/623] Namespace path typo fixed --- i386/libsaio/acpi/ssdt_pr_generator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/acpi/ssdt_pr_generator.h b/i386/libsaio/acpi/ssdt_pr_generator.h index 6bd183d..2969249 100644 --- a/i386/libsaio/acpi/ssdt_pr_generator.h +++ b/i386/libsaio/acpi/ssdt_pr_generator.h @@ -116,8 +116,8 @@ void generateSSDT_PR(void) uint8_t SCOPE_PR_CPU0[] = // Scope (\_PR.CPU0) { } { - /* 0000 */ 0x10, 0xFF, 0xFF, 0x2E, 0x5F, 0x50, 0x52, 0x5F, - /* 0008 */ _CPU_LABEL_REPLACEMENT + /* 0000 */ 0x10, 0xFF, 0xFF, 0x5C, 0x2E, 0x5F, 0x50, 0x52, + /* 0008 */ 0x5F, _CPU_LABEL_REPLACEMENT }; uint8_t NAME_APSN[] = // Name (APSN, 0xFF) From 3420e6fd7a5acf2c3865aa914b142029a8fc9826 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 24 Jan 2013 08:46:12 +0100 Subject: [PATCH 250/623] Copy/paste error fixed Thanks to nanomac for spotting the error. --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 377a772..94d8fee 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 1.3 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 1.4 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January, 2013) @@ -11,6 +11,7 @@ # - Namespace error fixed in _printScopeStart (Pike, January, 2013) # - Model and board-id checks added (Pike, January, 2013) # - SMBIOS cpu-type check added (Pike, January, 2013) +# - Copy/paste error fixed (Pike, January, 2013) # # set -x # Used for tracing errors (can be put anywhere in the script). @@ -440,7 +441,7 @@ function _getIvyMacModelByBoardID() local macModelIdentifier="iMac13,2" ;; - Mac-031AEE4D24BFF0B15819B171B) + Mac-031AEE4D24BFF0B1) local macModelIdentifier="Macmini6,1" ;; From 4efe9d0c21195dd2eb15141fd7374c9fba424790 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 25 Jan 2013 00:07:05 +0100 Subject: [PATCH 251/623] Method ACST added to CPU scopes for IB CPUPM Thanks to Christian Jesberger for providing debug data --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 94d8fee..052ce27 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 1.4 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 1.5 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January, 2013) @@ -12,6 +12,7 @@ # - Model and board-id checks added (Pike, January, 2013) # - SMBIOS cpu-type check added (Pike, January, 2013) # - Copy/paste error fixed (Pike, January, 2013) +# - Method ACST added to CPU scopes for IB CPUPM (Pike, January, 2013) # # set -x # Used for tracing errors (can be put anywhere in the script). @@ -332,6 +333,20 @@ function _printCPUScopes() echo ' {' >> $ssdtPR echo ' Return (\_PR.CPU0.APSS)' >> $ssdtPR echo ' }' >> $ssdtPR + echo '' >> $ssdtPR + + # + # IB CPUPM tries to parse/execute Method ACST (see debug data) and thus we add + # this method, conditionally, since SB CPUPM doesn't seem to care about it. + # + if [ $lowFrequencyPStates -eq 1 ] + then + echo ' Method (ACST, 0, NotSerialized)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Return (\_PR.CPU0.ACST)' >> $ssdtPR + echo ' }' >> $ssdtPR + fi + echo ' }' >> $ssdtPR let currentCPU+=1 done From b50b68261c02226e529dcef5ccc81b2440dd232e Mon Sep 17 00:00:00 2001 From: Dave Griffin <davegriffin@stainedglass1.plus.com> Date: Sat, 26 Jan 2013 16:11:57 +0000 Subject: [PATCH 252/623] Updated ssdt_pr script for ease of use and to make it compliant with latest iasl --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 052ce27..ef7cf6a 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -19,9 +19,9 @@ #================================= GLOBAL VARS ================================== -ssdtPR=/tmp/ssdt-pr.dsl +ssdtPR=~/Desktop/SSDT_PR.dsl -ssdtID=ssdt_pr +ssdtID=SSDT_PR # # Lowest possible idle frequency minus 100. @@ -343,7 +343,7 @@ function _printCPUScopes() then echo ' Method (ACST, 0, NotSerialized)' >> $ssdtPR echo ' {' >> $ssdtPR - echo ' Return (\_PR.CPU0.ACST)' >> $ssdtPR + echo ' Return (\_PR.CPU0.ACST ())' >> $ssdtPR echo ' }' >> $ssdtPR fi From adf74b3d651b3769fa0010c75d9f8a9d399a88f4 Mon Sep 17 00:00:00 2001 From: Dave Griffin <davegriffin@stainedglass1.plus.com> Date: Sat, 26 Jan 2013 18:50:43 +0000 Subject: [PATCH 253/623] Tweak for default IMAC build --- i386/libsaio/platform.h | 12 ++++++----- i386/libsaio/smbios/model_data.h | 34 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 3b1cae2..9a797f7 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -54,12 +54,14 @@ // Additional model selectors to select a specific target model. //------------------------------------------------------------------------------ -#define IMAC_131 IMAC | (3 << 15) -#define IMAC_111 IMAC | (2 << 15) -#define IMAC_122 IMAC | (1 << 15) -#define IMAC_121 IMAC // Defaults to iMac12,1 -#define MACBOOK_41 MACBOOK // Defaults to MacBook,1 +#define IMAC_131 (IMAC | (4 << 15)) +#define IMAC_122 (IMAC | (3 << 15)) +#define IMAC_121 (IMAC | (2 << 15)) +#define IMAC_111 (IMAC | (1 << 15)) +#define IMAC_132 IMAC // Defaults to iMac13,2 + +#define MACBOOK_41 MACBOOK // Defaults to MacBook4,1 #define MACBOOK_AIR_42 MACBOOK_AIR | (1 << 15) #define MACBOOK_AIR_41 MACBOOK_AIR // Defaults to MacBookAir4,1 diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 66c9bae..f39d953 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -30,14 +30,9 @@ #if TARGET_MODEL & IMAC // 1 // ------------------------------------------------------------------------------------- - #define SMB_FAMILY "Mac" + #define SMB_FAMILY "iMac" - #if (TARGET_MODEL == IMAC_132) - #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" - #define SMB_PRODUCT_NAME "iMac13,2" - #define SMB_BOARD_PRODUCT "Mac-FC02E91DDD3FA6A4" - #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '2' } - #elif (TARGET_MODEL == IMAC_131) + #if (TARGET_MODEL == IMAC_131) #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" #define SMB_PRODUCT_NAME "iMac13,1" #define SMB_BOARD_PRODUCT "Mac-00BE6ED71E35EB86" @@ -47,16 +42,21 @@ #define SMB_PRODUCT_NAME "iMac12,2" #define SMB_BOARD_PRODUCT "Mac-942B5BF58194151B" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '2' } - #elif (TARGET_MODEL == IMAC_111) - #define SMB_BIOS_VERSION "IM111.88Z.0034.B00.0910301727" - #define SMB_PRODUCT_NAME "iMac11,1" - #define SMB_BOARD_PRODUCT "Mac-F2268DAE" - #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '1', ',', '1' } - #else // Defaults to iMac12,1 - #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" - #define SMB_PRODUCT_NAME "iMac12,1" - #define SMB_BOARD_PRODUCT "Mac-942B59F58194171B" - #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '1' } + #elif (TARGET_MODEL == IMAC_121) + #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" + #define SMB_PRODUCT_NAME "iMac12,1" + #define SMB_BOARD_PRODUCT "Mac-942B59F58194171B" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '1' } + #elif (TARGET_MODEL == IMAC_111) + #define SMB_BIOS_VERSION "IM111.88Z.0034.B00.0910301727" + #define SMB_PRODUCT_NAME "iMac11,1" + #define SMB_BOARD_PRODUCT "Mac-F2268DAE" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '1', ',', '1' } + #else // Defaults to iMac13,2 + #define SMB_BIOS_VERSION "IM131.88Z.010A.B05.1211151146" + #define SMB_PRODUCT_NAME "iMac13,2" + #define SMB_BOARD_PRODUCT "Mac-FC02E91DDD3FA6A4" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '2' } #endif // ------------------------------------------------------------------------------------- #endif From 7c3aa2bd66c43787fe447f2055021d3ff2598f74 Mon Sep 17 00:00:00 2001 From: Dave Griffin <davegriffin@stainedglass1.plus.com> Date: Sat, 2 Feb 2013 14:09:21 +0000 Subject: [PATCH 254/623] Silence compilation warning on Xcode 4.6 --- i386/libsaio/sys.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/sys.c b/i386/libsaio/sys.c index ff60af6..624ee9c 100755 --- a/i386/libsaio/sys.c +++ b/i386/libsaio/sys.c @@ -842,7 +842,8 @@ BVRef getBootVolumeRef(const char * path, const char ** outPath) { // Bad device specifier, skip past the right paren. - for (cp++; *cp && *cp != RP; cp++) /* LOOP */; + for (cp++; *cp && *cp != RP; cp++) /* LOOP */ + ; { if (*cp == RP) { From f61de6e37a630bfc377e5b66b979b17cbad3b387 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sun, 3 Feb 2013 12:20:20 +0100 Subject: [PATCH 255/623] Updating script with (almost) forgotten changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Note: This Update was done remove/via Github web interface and may not be properly formatted (no idea how this works).  --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 756 ++++++++++++++++++--------- 1 file changed, 521 insertions(+), 235 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index ef7cf6a..faf8369 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -1,9 +1,9 @@ -#!/bin/sh +#!/bin/bash # # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 1.5 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 2.0 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January, 2013) @@ -13,21 +13,59 @@ # - SMBIOS cpu-type check added (Pike, January, 2013) # - Copy/paste error fixed (Pike, January, 2013) # - Method ACST added to CPU scopes for IB CPUPM (Pike, January, 2013) +# - Method ACST corrected for latest version of iasl (Dave, January, 2013) +# - Changed path/filename to ~/Desktop/SSDT_PR.dsl (Dave, January, 2013) +# - P-States are now one-liners instead of blocks (Pike, January, 2013) +# - Support for flexible ProcessorNames added (Pike, Februari, 2013) +# - Better feedback and Debug() injection added (Pike, Februari, 2013) +# - Automatic processor type detection (Pike, Februari, 2013) +# - TDP and processor type are now optional arguments (Pike, Februari, 2013) +# - system-type check (used by X86PlatformPlugin) added (Pike, Februari, 2013) +# - ACST injection for all logical processors (Pike, Februari, 2013) +# +# Contributors: +# - Thanks to Dave and Toleda for their help (bug fixes and other improvements). # -# set -x # Used for tracing errors (can be put anywhere in the script). +# set -x # Used for tracing errors (can be used anywhere in the script). #================================= GLOBAL VARS ================================== -ssdtPR=~/Desktop/SSDT_PR.dsl +scriptVersion=2.0 + +# +# Path and filename setup. +# +path=~/Desktop ssdtID=SSDT_PR +ssdtPR=${path}/${ssdtID}.dsl + +# +# Lowest possible idle frequency (user configurable). +# + +baseFrequency=1600 + +# +# Here are the other global variables defined. +# + +systemType=0 + +gACST_CPU0=13 +gACST_CPU1=7 + +macModelIdentifier="" # -# Lowest possible idle frequency minus 100. +# Change this label to "P00" when your tables use P000 instead oc CPU0. # -baseFrequency=1500 +gProcLabel="CPU" + +IVY_BRIDGE=4 +SANDY_BRIDGE=2 #-------------------------------------------------------------------------------- @@ -62,7 +100,7 @@ function _printExternals() currentCPU=0; while [ $currentCPU -lt $1 ]; do - echo ' External (\_PR_.CPU'$currentCPU', DeviceObj)' >> $ssdtPR + echo ' External (\_PR_.'$gProcLabel$currentCPU', DeviceObj)' >> $ssdtPR let currentCPU+=1 done @@ -70,6 +108,21 @@ function _printExternals() } +#-------------------------------------------------------------------------------- + +function _printDebugInfo() +{ + echo ' Store ("ssdtPRGen.sh version '$scriptVersion'", Debug)' >> $ssdtPR + echo ' Store ("baseFrequency : '$baseFrequency'", Debug)' >> $ssdtPR + echo ' Store ("frequency : '$frequency'", Debug)' >> $ssdtPR + echo ' Store ("logicalCPUs : '$logicalCPUs'", Debug)' >> $ssdtPR + echo ' Store ("tdp : '$tdp'", Debug)' >> $ssdtPR + echo ' Store ("packageLength : '$packageLength'", Debug)' >> $ssdtPR + echo ' Store ("turboStates : '$turboStates'", Debug)' >> $ssdtPR + echo ' Store ("maxTurboFrequency: '$maxTurboFrequency'", Debug)' >> $ssdtPR + echo '' >> $ssdtPR +} + #-------------------------------------------------------------------------------- function _printProcessorDefinitions() @@ -77,7 +130,7 @@ function _printProcessorDefinitions() currentCPU=0; while [ $currentCPU -lt $1 ]; do - echo ' External (\_PR_.CPU'$currentCPU', DeviceObj)' >> $ssdtPR + echo ' External (\_PR_.'$gProcLabel$currentCPU', DeviceObj)' >> $ssdtPR let currentCPU+=1 done @@ -88,18 +141,18 @@ function _printProcessorDefinitions() function _printScopeStart() { - echo ' Scope (\_PR.CPU0)' >> $ssdtPR + echo ' Scope (\_PR.'$gProcLabel'0)' >> $ssdtPR echo ' {' >> $ssdtPR let packageLength=$2 # - # Do we need to create additional (Low Frequency) P-States for Ivybridge? + # Do we need to create additional (Low Frequency) P-States? # - if [ $3 -eq 1 ]; + if [ $bridgeType -eq $IVY_BRIDGE ]; then - let lowestFrequency=($baseFrequency+100) + let lowestFrequency=$baseFrequency let lowFrequencyPStates=($lowestFrequency/100)-8 let packageLength=($2+$lowFrequencyPStates) @@ -130,66 +183,51 @@ function _printScopeStart() function _printPackages() { - let tdp=($1*1000) - let maxNonTurboFrequency=$2 - let frequency=$3 + local frequency=$3 + local maxNonTurboFrequency=$2 + local lowestFrequency=$baseFrequency + + let maxTDP=($1*1000) let min_ratio=($baseFrequency/100) let max_ratio=($frequency/100) - let lowFrequencyPStates=$4 - let lowestFrequency=$baseFrequency # # Do we need to create additional (Low Frequency) P-States for Ivybridge? # - if [ $lowFrequencyPStates -eq 1 ] + if [ $bridgeType -eq $IVY_BRIDGE ] then - let lowestFrequency=(800-100) + let lowestFrequency=800 fi - while [ $frequency -gt $lowestFrequency ]; do - echo ' Package (0x06)' >> $ssdtPR - echo ' {' >> $ssdtPR - - printf " 0x%04X" $frequency >> $ssdtPR - - echo ',' >> $ssdtPR + while [ $frequency -ge $lowestFrequency ]; + do + printf " Package (0x06) { 0x%04X, " $frequency >> $ssdtPR let ratio=$frequency/100 - if [ $ratio -gt $min_ratio ] + if [ $ratio -ge $min_ratio ] then if [ $frequency -lt $maxNonTurboFrequency ]; then - power=$(echo "scale=6;m=((1.1-(($max_ratio-$ratio)*0.00625))/1.1);(($ratio/$max_ratio)*(m*m)*$tdp);" | bc | sed -e 's/.[0-9A-F]*$//') + power=$(echo "scale=6;m=((1.1-(($max_ratio-$ratio)*0.00625))/1.1);(($ratio/$max_ratio)*(m*m)*$maxTDP);" | bc | sed -e 's/.[0-9A-F]*$//') else - power=$tdp + power=$maxTDP fi - printf " 0x%08X" $power >> $ssdtPR - echo ',' >> $ssdtPR + printf "0x%08X, " $power >> $ssdtPR else - echo ' Zero,' >> $ssdtPR + printf ' Zero, ' >> $ssdtPR fi - echo ' 0x0A,' >> $ssdtPR - echo ' 0x0A,' >> $ssdtPR - - printf " 0x%02X" $ratio >> $ssdtPR - - echo '00,' >> $ssdtPR - - printf " 0x%02X" $ratio >> $ssdtPR - - echo '00' >> $ssdtPR + printf "0x0A, 0x0A, 0x%02X00, 0x%02X00 }" $ratio $ratio >> $ssdtPR let frequency-=100 - if [ $frequency -eq $lowestFrequency ]; + if [ $frequency -ge $lowestFrequency ]; then - echo ' }' >> $ssdtPR + echo ',' >> $ssdtPR else - echo ' },' >> $ssdtPR echo '' >> $ssdtPR fi done @@ -231,90 +269,188 @@ function _printIvybridgeMethods() function _printCSTScope() { - echo '' >> $ssdtPR - echo ' Method (ACST, 0, NotSerialized)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Return (Package (0x06)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' One,' >> $ssdtPR - echo ' 0x04,' >> $ssdtPR - echo ' Package (0x04)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' ResourceTemplate ()' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Register (FFixedHW,' >> $ssdtPR - echo ' 0x01, // Bit Width' >> $ssdtPR - echo ' 0x02, // Bit Offset' >> $ssdtPR - echo ' 0x0000000000000000, // Address' >> $ssdtPR - echo ' 0x01, // Access Size' >> $ssdtPR - echo ' )' >> $ssdtPR - echo ' },' >> $ssdtPR - echo '' >> $ssdtPR - echo ' One,' >> $ssdtPR - echo ' 0x03,' >> $ssdtPR - echo ' 0x03E8' >> $ssdtPR - echo ' },' >> $ssdtPR - echo '' >> $ssdtPR - echo ' Package (0x04)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' ResourceTemplate ()' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Register (FFixedHW,' >> $ssdtPR - echo ' 0x01, // Bit Width' >> $ssdtPR - echo ' 0x02, // Bit Offset' >> $ssdtPR - echo ' 0x0000000000000010, // Address' >> $ssdtPR - echo ' 0x03, // Access Size' >> $ssdtPR - echo ' )' >> $ssdtPR - echo ' },' >> $ssdtPR - echo '' >> $ssdtPR - echo ' 0x03,' >> $ssdtPR - echo ' 0xCD,' >> $ssdtPR - echo ' 0x01F4' >> $ssdtPR - echo ' },' >> $ssdtPR - echo '' >> $ssdtPR - echo ' Package (0x04)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' ResourceTemplate ()' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Register (FFixedHW,' >> $ssdtPR - echo ' 0x01, // Bit Width' >> $ssdtPR - echo ' 0x02, // Bit Offset' >> $ssdtPR - echo ' 0x0000000000000020, // Address' >> $ssdtPR - echo ' 0x03, // Access Size' >> $ssdtPR - echo ' )' >> $ssdtPR - echo ' },' >> $ssdtPR - echo '' >> $ssdtPR - echo ' 0x06,' >> $ssdtPR - echo ' 0xF5,' >> $ssdtPR - echo ' 0x015E' >> $ssdtPR - echo ' },' >> $ssdtPR - echo '' >> $ssdtPR - echo ' Package (0x04)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' ResourceTemplate ()' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Register (FFixedHW,' >> $ssdtPR - echo ' 0x01, // Bit Width' >> $ssdtPR - echo ' 0x02, // Bit Offset' >> $ssdtPR - echo ' 0x0000000000000030, // Address' >> $ssdtPR - echo ' 0x03, // Access Size' >> $ssdtPR - echo ' )' >> $ssdtPR - echo ' },' >> $ssdtPR - echo '' >> $ssdtPR - echo ' 0x07,' >> $ssdtPR - echo ' 0xF5,' >> $ssdtPR - echo ' 0xC8' >> $ssdtPR - echo ' }' >> $ssdtPR - echo ' })' >> $ssdtPR - echo ' }' >> $ssdtPR + let C1=0 + let C2=0 + let C3=0 + let C6=0 + let C7=0 + local pkgLength=2 + local numberOfCStates=0 + + echo '' >> $ssdtPR + echo ' Method (ACST, 0, NotSerialized)' >> $ssdtPR + echo ' {' >> $ssdtPR # - # We don't want a closing bracket here when we add methods for Ivybridge. + # Are we injecting C-States for CPU1? # + if [ $1 -eq 1 ]; + then + # Yes (also used by CPU2, CPU3 and greater). + let targetCStates=$gACST_CPU1 + latency_C1=0x03E8 + latency_C2=0x94 + latency_C3=0xA9 + echo ' Store ("CPU1 C-States : '$gACST_CPU1'", Debug)'>> $ssdtPR + + else + # No (only used by CPU0). + let targetCStates=$gACST_CPU0 + latency_C1=Zero + latency_C3=0xCD + latency_C6=0xF5 + latency_C7=0xF5 + echo ' Store ("CPU0 C-States : '$gACST_CPU0'", Debug)'>> $ssdtPR + fi + + # + # Checks to determine which C-State(s) we should inject. + # + if (($targetCStates & 1)); then + let C1=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi - if [ $lowFrequencyPStates -eq 0 ] + if (($targetCStates & 2)); then + let C2=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi + + if (($targetCStates & 4)); then + let C3=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi + + if (($targetCStates & 8)); then + let C6=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi + + if (($targetCStates & 16)); then + let C7=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi + + echo '' >> $ssdtPR + printf " Return (Package (0x%02x)\n" $pkgLength >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' One,' >> $ssdtPR + printf " 0x%02x,\n" $numberOfCStates >> $ssdtPR + + echo ' Package (0x04)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' ResourceTemplate ()' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Register (FFixedHW,' >> $ssdtPR + echo ' 0x01, // Bit Width' >> $ssdtPR + echo ' 0x02, // Bit Offset' >> $ssdtPR + echo ' 0x0000000000000000, // Address' >> $ssdtPR + echo ' 0x01, // Access Size' >> $ssdtPR + echo ' )' >> $ssdtPR + echo ' },' >> $ssdtPR + echo ' One,' >> $ssdtPR + echo ' '$latency_C1',' >> $ssdtPR + echo ' 0x03E8' >> $ssdtPR + + if [ $C2 -eq 1 ]; then + echo ' },' >> $ssdtPR + echo '' >> $ssdtPR + echo ' Package (0x04)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' ResourceTemplate ()' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Register (FFixedHW,' >> $ssdtPR + echo ' 0x01, // Bit Width' >> $ssdtPR + echo ' 0x02, // Bit Offset' >> $ssdtPR + echo ' 0x0000000000000010, // Address' >> $ssdtPR + echo ' 0x03, // Access Size' >> $ssdtPR + echo ' )' >> $ssdtPR + echo ' },' >> $ssdtPR + echo ' 0x02,' >> $ssdtPR + echo ' '$latency_C2',' >> $ssdtPR + echo ' 0x01F4' >> $ssdtPR + fi + + if (($C3)); then + echo ' },' >> $ssdtPR + echo '' >> $ssdtPR + echo ' Package (0x04)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' ResourceTemplate ()' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Register (FFixedHW,' >> $ssdtPR + echo ' 0x01, // Bit Width' >> $ssdtPR + echo ' 0x02, // Bit Offset' >> $ssdtPR + echo ' 0x0000000000000010, // Address' >> $ssdtPR + echo ' 0x03, // Access Size' >> $ssdtPR + echo ' )' >> $ssdtPR + echo ' },' >> $ssdtPR + echo ' 0x03,' >> $ssdtPR + echo ' '$latency_C3',' >> $ssdtPR + echo ' 0x01F4' >> $ssdtPR + fi + + if [ $C6 -eq 1 ]; then + echo ' },' >> $ssdtPR + echo '' >> $ssdtPR + echo ' Package (0x04)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' ResourceTemplate ()' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Register (FFixedHW,' >> $ssdtPR + echo ' 0x01, // Bit Width' >> $ssdtPR + echo ' 0x02, // Bit Offset' >> $ssdtPR + echo ' 0x0000000000000020, // Address' >> $ssdtPR + echo ' 0x03, // Access Size' >> $ssdtPR + echo ' )' >> $ssdtPR + echo ' },' >> $ssdtPR + echo ' 0x06,' >> $ssdtPR + echo ' '$latency_C6',' >> $ssdtPR + echo ' 0x015E' >> $ssdtPR + fi + + if [ $C7 -eq 1 ]; then + echo ' },' >> $ssdtPR + echo '' >> $ssdtPR + echo ' Package (0x04)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' ResourceTemplate ()' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Register (FFixedHW,' >> $ssdtPR + echo ' 0x01, // Bit Width' >> $ssdtPR + echo ' 0x02, // Bit Offset' >> $ssdtPR + echo ' 0x0000000000000030, // Address' >> $ssdtPR + echo ' 0x03, // Access Size' >> $ssdtPR + echo ' )' >> $ssdtPR + echo ' },' >> $ssdtPR + echo ' 0x07,' >> $ssdtPR + echo ' '$latency_C7',' >> $ssdtPR + echo ' 0xC8' >> $ssdtPR + fi + + echo ' }' >> $ssdtPR + echo ' })' >> $ssdtPR + echo ' }' >> $ssdtPR + + if [ $1 -eq 1 ]; then - echo ' }' >> $ssdtPR + gACST_CPU1=$numberOfCStates + else + gACST_CPU0=$numberOfCStates + fi + + # + # We don't want a closing bracket here when we add methods for Ivy Bridge. + # + + if [ $bridgeType -eq $SANDY_BRIDGE ] + then + echo ' }' >> $ssdtPR fi } @@ -327,24 +463,22 @@ function _printCPUScopes() while [ $currentCPU -lt $1 ]; do echo '' >> $ssdtPR - echo ' Scope (\_PR.CPU'$currentCPU')' >> $ssdtPR + echo ' Scope (\_PR.'$gProcLabel$currentCPU')' >> $ssdtPR echo ' {' >> $ssdtPR - echo ' Method (APSS, 0, NotSerialized)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Return (\_PR.CPU0.APSS)' >> $ssdtPR - echo ' }' >> $ssdtPR - echo '' >> $ssdtPR + echo ' Method (APSS, 0, NotSerialized) { Return (\_PR.'$gProcLabel'0.APSS) }' >> $ssdtPR # # IB CPUPM tries to parse/execute Method ACST (see debug data) and thus we add # this method, conditionally, since SB CPUPM doesn't seem to care about it. # - if [ $lowFrequencyPStates -eq 1 ] + if [ $bridgeType -eq $IVY_BRIDGE ] then - echo ' Method (ACST, 0, NotSerialized)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Return (\_PR.CPU0.ACST ())' >> $ssdtPR - echo ' }' >> $ssdtPR + if [ $currentCPU -eq 1 ]; + then + _printCSTScope 1 + else + echo ' Method (ACST, 0, NotSerialized) { Return (\_PR.'$gProcLabel'1.ACST ()) }' >> $ssdtPR + fi fi echo ' }' >> $ssdtPR @@ -361,7 +495,7 @@ function _getModelName() # # Grab 'compatible' property from ioreg (stripped with sed / RegEX magic). # - echo `ioreg -p IODeviceTree -d 2 -k compatible | grep compatible | sed -e 's/ *"*=*<*>*//g' -e 's/compatible*//'` + echo `ioreg -p IODeviceTree -d 2 -k compatible | grep compatible | sed -e 's/ *["=<>]//g' -e 's/compatible//'` } #-------------------------------------------------------------------------------- @@ -371,7 +505,7 @@ function _getBoardID() # # Grab 'board-id' property from ioreg (stripped with sed / RegEX magic). # - echo `ioreg -p IODeviceTree -d 2 -k board-id | grep board-id | sed -e 's/ *"*=*<*>*//g' -e 's/board-id*//'` + boardID=`ioreg -p IODeviceTree -d 2 -k board-id | grep board-id | sed -e 's/ *["=<>]//g' -e 's/board-id//'` } #-------------------------------------------------------------------------------- @@ -381,7 +515,7 @@ function _getCPUtype() # # Grab 'cpu-type' property from ioreg (stripped with sed / RegEX magic). # - local grepStr=`ioreg -p IODeviceTree -n CPU0@0 -k cpu-type | grep cpu-type | sed -e 's/.*[<]//' -e 's/0\{0\}>$//'` + local grepStr=`ioreg -p IODeviceTree -n CPU0@0 -k cpu-type | grep cpu-type | sed -e 's/ *[-|="<a-z>]//g'` # # Swap bytes with help of ${str:pos:num} # @@ -390,106 +524,203 @@ function _getCPUtype() #-------------------------------------------------------------------------------- -function _getSandyMacModelByBoardID() +function _getCPUModel() { - local boardID=$(_getBoardID) - local macModelIdentifier="" + # + # Returns the hexadecimal value of machdep.cpu.model + # + echo 0x$(echo "obase=16; `sysctl machdep.cpu.model | sed -e 's/^machdep.cpu.model: //'`" | bc) +} +#-------------------------------------------------------------------------------- + +function _getSystemType() +{ + # + # Grab 'system-type' property from ioreg (stripped with sed / RegEX magic). + # + echo `ioreg -p IODeviceTree -d 2 -k system-type | grep system-type | sed -e 's/ *[-="<0a-z>]//g'` +} + +#-------------------------------------------------------------------------------- + +function _checkSMCKeys() +{ + # + # TODO: Check SMC keys to see if they are there and properly initialized! + # + # Note: Do <i>not</i> dump SMC keys with HWSensors/iStat or other SMC plug-ins installed! + # + local filename="/System/Library/Extensions/FakeSMC.kext/Contents/Info.plist" + local data=`grep -so '<key>[a-zA-Z]*</key>' $filename | sed -e 's/<key>//' -e 's/<\/key>//g'` + + local status=`echo $data | grep -oe 'DPLM'` + + if [ $status == 'XPLM' ]; then + # DPLM [{lim] (bytes 00 00 00 00 00) + echo "SMC key 'DPLM' found (OK)" + fi +set -x + local status=`echo $data | grep -oe 'MSAL'` + + if [ $status == 'MSAL' ]; then + # MSAL [hex_] (bytes 4b) + echo "SMC key 'MSAL' found (OK)" + fi +} + +#-------------------------------------------------------------------------------- + +function _initSandyBridgeSetup() +{ case $boardID in Mac-942B59F58194171B) - local macModelIdentifier="iMac12,1" + systemType=1 + macModelIdentifier="iMac12,1" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 ;; Mac-942B5BF58194151B) - local macModelIdentifier="iMac12,2" + systemType=1 + macModelIdentifier="iMac12,2" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 ;; Mac-8ED6AF5B48C039E1) - local macModelIdentifier="Macmini5,1" + systemType=1 + macModelIdentifier="Macmini5,1" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 ;; Mac-4BC72D62AD45599E) - local macModelIdentifier="Macmini5,2" + systemType=1 + macModelIdentifier="Macmini5,2" + gACST_CPU0=13 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 ;; Mac-7BA5B2794B2CDB12) - local macModelIdentifier="Macmini5,3" + systemType=1 + macModelIdentifier="Macmini5,3" + gACST_CPU0=13 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 ;; Mac-94245B3640C91C81) - local macModelIdentifier="MacBookPro8,1" + systemType=2 + macModelIdentifier="MacBookPro8,1" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 ;; Mac-94245A3940C91C80) - local macModelIdentifier="MacBookPro8,2" + systemType=2 + macModelIdentifier="MacBookPro8,2" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 ;; Mac-942459F5819B171B) - local macModelIdentifier="MacBookPro8,3" + systemType=2 + macModelIdentifier="MacBookPro8,3" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 ;; Mac-C08A6BB70A942AC2) - local macModelIdentifier="MacBookAir4,1" + systemType=2 + macModelIdentifier="MacBookAir4,1" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 ;; Mac-742912EFDBEE19B3) - local macModelIdentifier="MacBookAir4,2" + systemType=2 + macModelIdentifier="MacBookAir4,2" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 ;; esac - - echo $macModelIdentifier } #-------------------------------------------------------------------------------- -function _getIvyMacModelByBoardID() +function _initIvyBridgeSetup() { - local boardID=$(_getBoardID) - local macModelIdentifier="" - - case $boardID in - Mac-00BE6ED71E35EB86) - local macModelIdentifier="iMac13,1" - ;; - - Mac-FC02E91DDD3FA6A4) - local macModelIdentifier="iMac13,2" - ;; + case $boardID in + Mac-00BE6ED71E35EB86) + systemType=1 + macModelIdentifier="iMac13,1" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; - Mac-031AEE4D24BFF0B1) - local macModelIdentifier="Macmini6,1" - ;; + Mac-FC02E91DDD3FA6A4) + systemType=1 + macModelIdentifier="iMac13,2" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; - Mac-F65AE981FFA204ED) - local macModelIdentifier="Macmini6,2" - ;; + Mac-031AEE4D24BFF0B1) + systemType=1 + macModelIdentifier="Macmini6,1" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; - Mac-4B7AC7E43945597E) - local macModelIdentifier="MacBookPro9,1" - ;; + Mac-F65AE981FFA204ED) + systemType=1 + macModelIdentifier="Macmini6,2" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; - Mac-6F01561E16C75D06) - local macModelIdentifier="MacBookPro9,2" - ;; + Mac-4B7AC7E43945597E) + systemType=2 + macModelIdentifier="MacBookPro9,1" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; - Mac-C3EC7CD22292981F) - local macModelIdentifier="MacBookPro10,1" - ;; + Mac-6F01561E16C75D06) + systemType=2 + macModelIdentifier="MacBookPro9,2" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; - Mac-AFD8A9D944EA4843) - local macModelIdentifier="MacBookPro10,2" - ;; + Mac-C3EC7CD22292981F) + systemType=2 + macModelIdentifier="MacBookPro10,1" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; - Mac-66F35F19FE2A0D05) - local macModelIdentifier="MacBookAir5,1" - ;; + Mac-AFD8A9D944EA4843) + systemType=2 + macModelIdentifier="MacBookPro10,2" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; - Mac-2E6FAB96566FE58C) - local macModelIdentifier="MacBookAir5,2" - ;; - esac + Mac-66F35F19FE2A0D05) + systemType=2 + macModelIdentifier="MacBookAir5,1" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; - echo $macModelIdentifier + Mac-2E6FAB96566FE58C) + systemType=2 + macModelIdentifier="MacBookAir5,2" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + esac } #-------------------------------------------------------------------------------- @@ -513,25 +744,78 @@ function _isRoot() function main() { + echo '' + + # + # Get CPU type and model. + # + + local model=$(_getCPUModel) + + case $model in + 0x2A) + echo "Sandy Bridge Core processor detected" + let tdp=95 + let bridgeType=2 + ;; + + 0x2D) + echo "Sandy Bridge Core processor detected" + let tdp=95 + let bridgeType=2 + ;; + + 0x3A) + echo "Ivy Bridge Core processor detected" + let tdp=77 + let bridgeType=4 + ;; + + 0x3B) + echo "Ivy Bridge Core processor detected" + let tdp=77 + let bridgeType=4 + ;; + esac + # # Command line arguments. # - let tdp=$1 - let maxTurboFrequency=$2 - # let lowFrequencyPStates=$3 + let maxTurboFrequency=$1 + + if [ $# -eq 2 ]; + then + let tdp=$2 + echo "Max TDP override, now using: $tdp Watt" + else + echo "Using the default max TDP of: $tdp Watt" + fi + + if [ $# -eq 3 ]; + then + if [ $3 -eq 0 ]; + then + let bridgeType=2 + echo "CPU type override, now using: Sandy Bridge" + else + let bridgeType=4 + echo "CPU type override, now using: Ivy Bridge" + fi + fi # # Do not change anything below this line! # #let logicalCPUs=$(echo `sysctl hw.logicalcpu` | sed -e 's/^hw.logicalcpu: //') - let logicalCPUs=$(echo `sysctl machdep.cpu.thread_count` | sed -e 's/^machdep.cpu.thread_count: //') - + local logicalCPUs=$(echo `sysctl machdep.cpu.thread_count` | sed -e 's/^machdep.cpu.thread_count: //') let frequency=$(echo `sysctl hw.cpufrequency` | sed -e 's/^hw.cpufrequency: //') let frequency=($frequency / 1000000) - # + echo "$logicalCPUs logical CPU's detected with a Core Frequency of $frequency MHz" + + # # Get number of Turbo states. # @@ -546,59 +830,60 @@ function main() let turboStates=0 fi - let packageLength=$(echo "(($maxTurboFrequency - $baseFrequency) / 100)" | bc) + echo "Number of Turbo States: $turboStates ($frequency-$maxTurboFrequency MHz)" + + local packageLength=$(echo "((($maxTurboFrequency - $baseFrequency)+100) / 100)" | bc) + + echo "Number of P-States: $packageLength ($baseFrequency-$maxTurboFrequency)" _printHeader _printExternals $logicalCPUs - _printScopeStart $turboStates $packageLength $3 - _printPackages $tdp $frequency $maxTurboFrequency $3 - _printCSTScope + _printDebugInfo $logicalCPUs $tdp $packageLength $turboStates $maxTurboFrequency + _printScopeStart $turboStates $packageLength + _printPackages $tdp $frequency $maxTurboFrequency + + _getBoardID local modelID=$(_getModelName) - local usedBoardID=$(_getBoardID) local typeCPU=$(_getCPUtype) + local currentSystemType=$(_getSystemType) - if [ $3 -eq 1 ] + if [ $bridgeType -eq $IVY_BRIDGE ]; then - local targetModelID=$(_getIvyMacModelByBoardID) + local cpuTypeString="04" + local bridgeTypeString="Ivy Bridge" - _printIvybridgeMethods $usedBoardID $targetModelID + _initIvyBridgeSetup + _printCSTScope 0 + _printIvybridgeMethods _printCPUScopes $logicalCPUs - - if [ "$targetModelID" == "" ] - then - echo "Warning: Used board-id [$usedBoardID] is not supported by Ivybridge PM" - else - if [ "$targetModelID" != "$modelID" ] - then - echo "Error: board-id [$usedBoardID] and model [$modelID] mismatch" - fi - fi - - if [ "${typeCPU:2:2}" != "04" ] - then - echo "Warning: cpu-type may be set improperly (0x$typeCPU instead of 0x${typeCPU:0:2}04)" - fi else - local targetModelID=$(_getSandyMacModelByBoardID) + local cpuTypeString="02" + local bridgeTypeString="Sandy Bridge" + _initSandyBridgeSetup + _printCSTScope 0 _printCPUScopes $logicalCPUs + fi - if [ "$targetModelID" == "" ] - then - echo "Warning: Used board-id [$usedBoardID] is not supported by Sandybridge PM" - else - if [ "$targetModelID" != "$modelID" ] - then - echo "Error: board-id [$usedBoardID] and model [$modelID] mismatch" - fi - fi + printf "Number of C-States for "$gProcLabel"0: $gACST_CPU0\n" + printf "Number of C-States for "$gProcLabel"1: $gACST_CPU1\n" - if [ "${typeCPU:2:2}" != "02" ] - then - echo "Warning: cpu-type may be set improperly (0x$typeCPU instead of 0x${typeCPU:0:2}02)" + if [ ${typeCPU:2:2} -ne $cpuTypeString ]; then + echo "Warning: cpu-type may be set improperly (0x$typeCPU instead of 0x${typeCPU:0:2}$cpuTypeString)" + fi + + if [ $systemType -eq 0 ]; + then + echo "Warning: Used board-id [$boardID] is not supported by $bridgeTypeString PM" + else + if [ "$macModelIdentifier" != "$modelID" ]; then + echo "Error: board-id [$boardID] and model [$modelID] mismatch" fi + if [ $currentSystemType -ne $systemType ]; then + echo "Warning: system-type may be set improperly ($currentSystemType instead of $systemType)" + fi fi } @@ -609,11 +894,12 @@ function main() # Check number of arguments. # -if [ $# -eq 3 ]; +if [ $# -gt 0 ]; then main $1 $2 $3 + open $ssdtPR else - echo "Usage: $0 TDP MaxTurboFrequency (0 for SandyBridge / 1 for IvyBridge)" + echo "Usage: $0 MaxTurboFrequency [TDP (Watts) CPU (0=SandyBridge, 1=IvyBridge)]" exit 1 fi From 875e1434cfaef13d97e9f0dc427f3c19bc12f717 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sun, 3 Feb 2013 12:23:53 +0100 Subject: [PATCH 256/623] Typos Another bloody expensive 3G update from Spain --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index faf8369..6c55d5f 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -24,7 +24,7 @@ # - ACST injection for all logical processors (Pike, Februari, 2013) # # Contributors: -# - Thanks to Dave and Toleda for their help (bug fixes and other improvements). +# - Thanks to Dave and toleda for their help (bug fixes and other improvements). # # set -x # Used for tracing errors (can be used anywhere in the script). @@ -59,7 +59,7 @@ gACST_CPU1=7 macModelIdentifier="" # -# Change this label to "P00" when your tables use P000 instead oc CPU0. +# Change this label to "P00" when your tables use P00n instead of CPUn. # gProcLabel="CPU" From 6d70ccceba75048f153b823e134875f5db1e006d Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 6 Feb 2013 08:36:18 +0100 Subject: [PATCH 257/623] ACST hintcode error fixed --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 350 ++++++++++++++------------- 1 file changed, 181 insertions(+), 169 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 6c55d5f..89c2b54 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 2.0 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 2.1 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January, 2013) @@ -22,6 +22,7 @@ # - TDP and processor type are now optional arguments (Pike, Februari, 2013) # - system-type check (used by X86PlatformPlugin) added (Pike, Februari, 2013) # - ACST injection for all logical processors (Pike, Februari, 2013) +# - ACST hintcode error fixed (Pike, Februari, 2013) # # Contributors: # - Thanks to Dave and toleda for their help (bug fixes and other improvements). @@ -269,192 +270,203 @@ function _printIvybridgeMethods() function _printCSTScope() { - let C1=0 - let C2=0 - let C3=0 - let C6=0 - let C7=0 - local pkgLength=2 - local numberOfCStates=0 - - echo '' >> $ssdtPR - echo ' Method (ACST, 0, NotSerialized)' >> $ssdtPR - echo ' {' >> $ssdtPR + let C1=0 + let C2=0 + let C3=0 + let C6=0 + let C7=0 + local pkgLength=2 + local numberOfCStates=0 + + echo '' >> $ssdtPR + echo ' Method (ACST, 0, NotSerialized)' >> $ssdtPR + echo ' {' >> $ssdtPR - # - # Are we injecting C-States for CPU1? - # - if [ $1 -eq 1 ]; - then - # Yes (also used by CPU2, CPU3 and greater). - let targetCStates=$gACST_CPU1 - latency_C1=0x03E8 - latency_C2=0x94 - latency_C3=0xA9 - echo ' Store ("CPU1 C-States : '$gACST_CPU1'", Debug)'>> $ssdtPR - - else + # + # Are we injecting C-States for CPU1? + # + if [ $1 -eq 1 ]; + then + # Yes (also used by CPU2, CPU3 and greater). + let targetCStates=$gACST_CPU1 + latency_C1=0x03E8 + latency_C2=0x94 + latency_C3=0xA9 + echo ' Store ("CPU1 C-States : '$gACST_CPU1'", Debug)' >> $ssdtPR + + else # No (only used by CPU0). - let targetCStates=$gACST_CPU0 - latency_C1=Zero - latency_C3=0xCD - latency_C6=0xF5 - latency_C7=0xF5 - echo ' Store ("CPU0 C-States : '$gACST_CPU0'", Debug)'>> $ssdtPR - fi + let targetCStates=$gACST_CPU0 + latency_C1=Zero + latency_C3=0xCD + latency_C6=0xF5 + latency_C7=0xF5 + echo ' Store ("CPU0 C-States : '$gACST_CPU0'", Debug)' >> $ssdtPR + fi - # - # Checks to determine which C-State(s) we should inject. - # - if (($targetCStates & 1)); then - let C1=1 - let numberOfCStates+=1 - let pkgLength+=1 - fi + # + # Checks to determine which C-State(s) we should inject. + # + if (($targetCStates & 1)); then + let C1=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi - if (($targetCStates & 2)); then - let C2=1 - let numberOfCStates+=1 - let pkgLength+=1 - fi + if (($targetCStates & 2)); then + let C2=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi - if (($targetCStates & 4)); then - let C3=1 - let numberOfCStates+=1 - let pkgLength+=1 - fi + if (($targetCStates & 4)); then + let C3=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi - if (($targetCStates & 8)); then - let C6=1 - let numberOfCStates+=1 - let pkgLength+=1 - fi + if (($targetCStates & 8)); then + let C6=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi - if (($targetCStates & 16)); then - let C7=1 - let numberOfCStates+=1 - let pkgLength+=1 - fi + if (($targetCStates & 16)); then + let C7=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi - echo '' >> $ssdtPR - printf " Return (Package (0x%02x)\n" $pkgLength >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' One,' >> $ssdtPR - printf " 0x%02x,\n" $numberOfCStates >> $ssdtPR - - echo ' Package (0x04)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' ResourceTemplate ()' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Register (FFixedHW,' >> $ssdtPR - echo ' 0x01, // Bit Width' >> $ssdtPR - echo ' 0x02, // Bit Offset' >> $ssdtPR - echo ' 0x0000000000000000, // Address' >> $ssdtPR - echo ' 0x01, // Access Size' >> $ssdtPR - echo ' )' >> $ssdtPR - echo ' },' >> $ssdtPR - echo ' One,' >> $ssdtPR - echo ' '$latency_C1',' >> $ssdtPR - echo ' 0x03E8' >> $ssdtPR - - if [ $C2 -eq 1 ]; then - echo ' },' >> $ssdtPR - echo '' >> $ssdtPR - echo ' Package (0x04)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' ResourceTemplate ()' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Register (FFixedHW,' >> $ssdtPR - echo ' 0x01, // Bit Width' >> $ssdtPR - echo ' 0x02, // Bit Offset' >> $ssdtPR - echo ' 0x0000000000000010, // Address' >> $ssdtPR - echo ' 0x03, // Access Size' >> $ssdtPR - echo ' )' >> $ssdtPR - echo ' },' >> $ssdtPR - echo ' 0x02,' >> $ssdtPR - echo ' '$latency_C2',' >> $ssdtPR - echo ' 0x01F4' >> $ssdtPR - fi + let hintCode=0x00 + + echo '' >> $ssdtPR + printf " Return (Package (0x%02x)\n" $pkgLength >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' One,' >> $ssdtPR + printf " 0x%02x,\n" $numberOfCStates >> $ssdtPR + echo ' Package (0x04)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' ResourceTemplate ()' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Register (FFixedHW,' >> $ssdtPR + echo ' 0x01, // Bit Width' >> $ssdtPR + echo ' 0x02, // Bit Offset' >> $ssdtPR + printf " 0x%016x, // Address\n" $hintCode >> $ssdtPR + echo ' 0x01, // Access Size' >> $ssdtPR + echo ' )' >> $ssdtPR + echo ' },' >> $ssdtPR + echo ' One,' >> $ssdtPR + echo ' '$latency_C1',' >> $ssdtPR + echo ' 0x03E8' >> $ssdtPR + + if (($C2)); then + let hintCode+=0x10 + echo ' },' >> $ssdtPR + echo '' >> $ssdtPR + echo ' Package (0x04)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' ResourceTemplate ()' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Register (FFixedHW,' >> $ssdtPR + echo ' 0x01, // Bit Width' >> $ssdtPR + echo ' 0x02, // Bit Offset' >> $ssdtPR + printf " 0x%016x, // Address\n" $hintCode >> $ssdtPR + echo ' 0x03, // Access Size' >> $ssdtPR + echo ' )' >> $ssdtPR + echo ' },' >> $ssdtPR + echo ' 0x02,' >> $ssdtPR + echo ' '$latency_C2',' >> $ssdtPR + echo ' 0x01F4' >> $ssdtPR + fi - if (($C3)); then - echo ' },' >> $ssdtPR - echo '' >> $ssdtPR - echo ' Package (0x04)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' ResourceTemplate ()' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Register (FFixedHW,' >> $ssdtPR - echo ' 0x01, // Bit Width' >> $ssdtPR - echo ' 0x02, // Bit Offset' >> $ssdtPR - echo ' 0x0000000000000010, // Address' >> $ssdtPR - echo ' 0x03, // Access Size' >> $ssdtPR - echo ' )' >> $ssdtPR - echo ' },' >> $ssdtPR - echo ' 0x03,' >> $ssdtPR - echo ' '$latency_C3',' >> $ssdtPR - echo ' 0x01F4' >> $ssdtPR - fi + if (($C3)); then + let hintCode+=0x10 + echo ' },' >> $ssdtPR + echo '' >> $ssdtPR + echo ' Package (0x04)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' ResourceTemplate ()' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Register (FFixedHW,' >> $ssdtPR + echo ' 0x01, // Bit Width' >> $ssdtPR + echo ' 0x02, // Bit Offset' >> $ssdtPR + printf " 0x%016x, // Address\n" $hintCode >> $ssdtPR + echo ' 0x03, // Access Size' >> $ssdtPR + echo ' )' >> $ssdtPR + echo ' },' >> $ssdtPR + echo ' 0x03,' >> $ssdtPR + echo ' '$latency_C3',' >> $ssdtPR + echo ' 0x01F4' >> $ssdtPR + fi - if [ $C6 -eq 1 ]; then - echo ' },' >> $ssdtPR - echo '' >> $ssdtPR - echo ' Package (0x04)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' ResourceTemplate ()' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Register (FFixedHW,' >> $ssdtPR - echo ' 0x01, // Bit Width' >> $ssdtPR - echo ' 0x02, // Bit Offset' >> $ssdtPR - echo ' 0x0000000000000020, // Address' >> $ssdtPR - echo ' 0x03, // Access Size' >> $ssdtPR - echo ' )' >> $ssdtPR - echo ' },' >> $ssdtPR - echo ' 0x06,' >> $ssdtPR - echo ' '$latency_C6',' >> $ssdtPR - echo ' 0x015E' >> $ssdtPR - fi + if (($C6)); then + let hintCode+=0x10 + echo ' },' >> $ssdtPR + echo '' >> $ssdtPR + echo ' Package (0x04)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' ResourceTemplate ()' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Register (FFixedHW,' >> $ssdtPR + echo ' 0x01, // Bit Width' >> $ssdtPR + echo ' 0x02, // Bit Offset' >> $ssdtPR + printf " 0x%016x, // Address\n" $hintCode >> $ssdtPR + echo ' 0x03, // Access Size' >> $ssdtPR + echo ' )' >> $ssdtPR + echo ' },' >> $ssdtPR + echo ' 0x06,' >> $ssdtPR + echo ' '$latency_C6',' >> $ssdtPR + echo ' 0x015E' >> $ssdtPR + fi - if [ $C7 -eq 1 ]; then - echo ' },' >> $ssdtPR - echo '' >> $ssdtPR - echo ' Package (0x04)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' ResourceTemplate ()' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Register (FFixedHW,' >> $ssdtPR - echo ' 0x01, // Bit Width' >> $ssdtPR - echo ' 0x02, // Bit Offset' >> $ssdtPR - echo ' 0x0000000000000030, // Address' >> $ssdtPR - echo ' 0x03, // Access Size' >> $ssdtPR - echo ' )' >> $ssdtPR - echo ' },' >> $ssdtPR - echo ' 0x07,' >> $ssdtPR - echo ' '$latency_C7',' >> $ssdtPR - echo ' 0xC8' >> $ssdtPR - fi + if (($C7)); then + # + # If $hintCode is already 0x30 then use 0x31 otherwise 0x30 + # + if [ $hintCode -eq 48 ]; + then + let hintCode+=0x01 + else + let hintCode+=0x10 + fi + echo ' },' >> $ssdtPR + echo '' >> $ssdtPR + echo ' Package (0x04)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' ResourceTemplate ()' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Register (FFixedHW,' >> $ssdtPR + echo ' 0x01, // Bit Width' >> $ssdtPR + echo ' 0x02, // Bit Offset' >> $ssdtPR + printf " 0x%016x, // Address\n" $hintCode >> $ssdtPR + echo ' 0x03, // Access Size' >> $ssdtPR + echo ' )' >> $ssdtPR + echo ' },' >> $ssdtPR + echo ' 0x07,' >> $ssdtPR + echo ' '$latency_C7',' >> $ssdtPR + echo ' 0xC8' >> $ssdtPR + fi - echo ' }' >> $ssdtPR - echo ' })' >> $ssdtPR - echo ' }' >> $ssdtPR + echo ' }' >> $ssdtPR + echo ' })' >> $ssdtPR + echo ' }' >> $ssdtPR - if [ $1 -eq 1 ]; - then - gACST_CPU1=$numberOfCStates - else + if [ $1 -eq 1 ]; + then + gACST_CPU1=$numberOfCStates + else gACST_CPU0=$numberOfCStates - fi + fi - # - # We don't want a closing bracket here when we add methods for Ivy Bridge. - # + # + # We don't want a closing bracket here when we add methods for Ivy Bridge. + # - if [ $bridgeType -eq $SANDY_BRIDGE ] - then - echo ' }' >> $ssdtPR - fi + if [ $bridgeType -eq $SANDY_BRIDGE ]; then + echo ' }' >> $ssdtPR + fi } - #-------------------------------------------------------------------------------- function _printCPUScopes() From 0188f448da4d5b17a1f5ba1355850be9c1bff412 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 6 Feb 2013 14:16:23 +0100 Subject: [PATCH 258/623] Introducing a stand-alone version of method _DSM Thanks to the old man aka Master Chief --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 45 +++++++++++++--------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 89c2b54..ecfacfc 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 2.1 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 2.2 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January, 2013) @@ -23,6 +23,7 @@ # - system-type check (used by X86PlatformPlugin) added (Pike, Februari, 2013) # - ACST injection for all logical processors (Pike, Februari, 2013) # - ACST hintcode error fixed (Pike, Februari, 2013) +# - Introducing a stand-alone version of method _DSM (Pike, Februari, 2013) # # Contributors: # - Thanks to Dave and toleda for their help (bug fixes and other improvements). @@ -241,29 +242,25 @@ function _printPackages() function _printIvybridgeMethods() { - echo '' >> $ssdtPR - echo ' Method (MCDP, 2, NotSerialized)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' If (LEqual (Arg0, Zero))' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Store (Buffer (One)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' 0x03' >> $ssdtPR - echo ' }, Arg1)' >> $ssdtPR - echo ' }' >> $ssdtPR - echo ' }' >> $ssdtPR - echo '' >> $ssdtPR - echo ' Method (_DSM, 4, NotSerialized)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Store (Package (0x02)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' "plugin-type",' >> $ssdtPR - echo ' One' >> $ssdtPR - echo ' }, Local0)' >> $ssdtPR - echo ' MCDP (Arg2, RefOf (Local0))' >> $ssdtPR - echo ' Return (Local0)' >> $ssdtPR - echo ' }' >> $ssdtPR - echo ' }' >> $ssdtPR + // New stand-alone version of Method _DSM - Copyright (c) 2009 by Master Chief + echo '' >> $ssdtPR + echo ' Method (_DSM, 4, NotSerialized)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' If (LEqual (Arg2, Zero))' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' Return (Buffer (One)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' 0x03' >> $ssdtPR + echo ' })' >> $ssdtPR + echo ' }' >> $ssdtPR + echo '' >> $ssdtPR + echo ' Return (Package (0x02)' >> $ssdtPR + echo ' {' >> $ssdtPR + echo ' "plugin-type",' >> $ssdtPR + echo ' One' >> $ssdtPR + echo ' })' >> $ssdtPR + echo ' }' >> $ssdtPR + echo ' }' >> $ssdtPR } #-------------------------------------------------------------------------------- From e9d0d0ee5a2f0854cdd1b4405cf850d24db88059 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 6 Feb 2013 14:24:27 +0100 Subject: [PATCH 259/623] Test version for Jeroen --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 417 +++++++++++++++++++-------- 1 file changed, 295 insertions(+), 122 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index ecfacfc..4c5d377 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 2.2 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 2.3 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January, 2013) @@ -33,7 +33,8 @@ #================================= GLOBAL VARS ================================== -scriptVersion=2.0 +scriptVersion=2.3 + # # Path and filename setup. @@ -55,7 +56,7 @@ baseFrequency=1600 systemType=0 -gACST_CPU0=13 +gACST_CPU0=29 gACST_CPU1=7 macModelIdentifier="" @@ -69,6 +70,108 @@ gProcLabel="CPU" IVY_BRIDGE=4 SANDY_BRIDGE=2 +typeCPU=0 +processorData="Unknown CPU" +processorNumber="" + +# +# Processor Number, Max TDP, Clock Speed, Max Turbo Frequency, Number of Cores, Number of Threads +# + +desktopIvyBridgeCPUList=( +# i7-3700 Desktop Processor Series +i7-3770T,45,2500,3700,4,8 +i7-3770S,65,3100,3900,4,8 +i7-3770K,77,3500,3900,4,8 +i7-3770,77,3400,3900,4,8 +# i5-3500 Desktop Processor Series +i5-3570T,45,2300,3300,4,4 +i5-3570K,77,3400,3800,4,4 +i5-3570S,65,3100,3800,4,4 +i5-3570,77,3400,3800,4,4 +i5-3550S,65,3000,3700,4,4 +i5-3550,77,3300,3700,4,4 +# i5-3400 Desktop Processor Series +i5-3475S,65,2900,3600,4,4 +i5-3470S,65,2900,3600,4,4 +i5-3470,77,3200,3600,4,4 +i5-3470T,35,2900,3600,2,4 +i5-3450S,65,2800,3500,4,4 +i5-3450,77,3100,3500,4,4 +# i5-3300 Desktop Processor Series +i5-3350P,69,3100,3300,4,4 +i5-3330S,65,2700,3200,4,4 +i5-3330,77,3000,3200,4,4 +# i3-3200 Desktop Processor Series +i3-3240,55,3400,0,2,4 +i3-3240T,35,2900,0,2,4 +i3-3225,55,3300,0,2,4 +i3-3220,55,3300,0,2,4 +i3-3220T,35,2800,0,2,4 +i3-3210,55,3200,0,2,4 +) + +# +# Processor Number, Max TDP, Clock Speed, Max Turbo Frequency, Number of Cores, Number of Threads +# + +mobileIvyBridgeCPUList=( +# i7-3800 Mobile Processor Series +i7-3840QM,45,2800,3800,4,8 +i7-3820QM,45,2700,3700,4,8 +# i7-3700 Mobile Processor Series +i7-3740QM,45,2700,3700,4,8 +i7-3720QE,45,2600,3600,4,8 +# i7-3600 Mobile Processor Series +i7-3689Y,13,1500,2600,2,4 +i7-3687U,17,2100,3300,2,4 +i7-3667U,17,2000,3200,2,4 +i7-3635QM,45,2400,3400,4,8 +i7-3620QM,35,2200,3200,4,8 +i7-3632QM,35,2200,3200,4,8 +i7-3630QM,45,2400,3400,4,8 +i7-3615QM,45,2300,3300,4,8 +i7-3615QE,45,2300,3300,4,8 +i7-3612QM,35,2100,3100,4,8 +i7-3612QE,35,2100,3100,4,8 +i7-3610QM,45,2300,3300,4,8 +i7-3610QE,45,2300,3300,4,8 +# i7-3500 Mobile Processor Series +i7-3555LE,25,2500,3200,2,4 +i7-3540M,35,3000,3700,2,4 +i7-3537U,17,2000,3100,2,4 +i7-3520M,35,2900,3600,2,4 +i7-3517UE,17,1700,2800,2,4 +i7-3517U,17,1900,3000,2,4 +# i5-3600 Mobile Processor Series +i5-3610ME,35,2700,3300,2,4 +# i5-3400 Mobile Processor Series +i5-3439Y,13,1500,2300,2,4 +i5-3437U,17,1900,2900,2,4 +i5-3427U,17,1800,2800,2,4 +# i5-3300 Mobile Processor Series +i5-3380M,35,2900,3600,2,4 +i5-3360M,35,2800,3500,2,4 +i5-3340M,35,2700,3400,2,4 +i5-3339Y,13,1500,2000,2,4 +i5-3337U,17,1800,2700,2,4 +i5-3320M,35,2600,3300,2,4 +i5-3317U,17,1700,2600,2,4 +# i5-3200 Mobile Processor Series +i5-3230M,35,2600,3200,2,4 +i5-3210M,35,2500,3100,2,4 +# i3-3200 Mobile Processor Series +i3-3239Y,13,1400,0,2,4 +i3-3227U,17,1900,0,2,4 +i3-3217UE,17,1600,0,2,4 +i3-3217U,17,1800,0,2,4 +# i3-3100 Mobile Processor Series +i3-3130M,35,2600,0,2,4 +i3-3120ME,35,2400,0,2,4 +i3-3120M,35,2500,0,2,4 +i3-3110M,35,2400,0,2,4 +) + #-------------------------------------------------------------------------------- function _printHeader() @@ -501,54 +604,126 @@ function _printCPUScopes() function _getModelName() { - # - # Grab 'compatible' property from ioreg (stripped with sed / RegEX magic). - # - echo `ioreg -p IODeviceTree -d 2 -k compatible | grep compatible | sed -e 's/ *["=<>]//g' -e 's/compatible//'` + # + # Grab 'compatible' property from ioreg (stripped with sed / RegEX magic). + # + echo `ioreg -p IODeviceTree -d 2 -k compatible | grep compatible | sed -e 's/ *["=<>]//g' -e 's/compatible//'` } #-------------------------------------------------------------------------------- function _getBoardID() { - # - # Grab 'board-id' property from ioreg (stripped with sed / RegEX magic). - # - boardID=`ioreg -p IODeviceTree -d 2 -k board-id | grep board-id | sed -e 's/ *["=<>]//g' -e 's/board-id//'` + # + # Grab 'board-id' property from ioreg (stripped with sed / RegEX magic). + # + boardID=`ioreg -p IODeviceTree -d 2 -k board-id | grep board-id | sed -e 's/ *["=<>]//g' -e 's/board-id//'` } #-------------------------------------------------------------------------------- function _getCPUtype() { - # - # Grab 'cpu-type' property from ioreg (stripped with sed / RegEX magic). - # - local grepStr=`ioreg -p IODeviceTree -n CPU0@0 -k cpu-type | grep cpu-type | sed -e 's/ *[-|="<a-z>]//g'` - # - # Swap bytes with help of ${str:pos:num} - # - echo ${grepStr:2:2}${grepStr:0:2} + # + # Grab 'cpu-type' property from ioreg (stripped with sed / RegEX magic). + # + local grepStr=`ioreg -p IODeviceTree -n CPU0@0 -k cpu-type | grep cpu-type | sed -e 's/ *[-|="<a-z>]//g'` + # + # Swap bytes with help of ${str:pos:num} + # + echo ${grepStr:2:2}${grepStr:0:2} } #-------------------------------------------------------------------------------- function _getCPUModel() { - # - # Returns the hexadecimal value of machdep.cpu.model - # - echo 0x$(echo "obase=16; `sysctl machdep.cpu.model | sed -e 's/^machdep.cpu.model: //'`" | bc) + # + # Returns the hexadecimal value of machdep.cpu.model + # + echo 0x$(echo "obase=16; `sysctl machdep.cpu.model | sed -e 's/^machdep.cpu.model: //'`" | bc) } #-------------------------------------------------------------------------------- function _getSystemType() { - # - # Grab 'system-type' property from ioreg (stripped with sed / RegEX magic). - # - echo `ioreg -p IODeviceTree -d 2 -k system-type | grep system-type | sed -e 's/ *[-="<0a-z>]//g'` + # + # Grab 'system-type' property from ioreg (stripped with sed / RegEX magic). + # + echo `ioreg -p IODeviceTree -d 2 -k system-type | grep system-type | sed -e 's/ *[-="<0a-z>]//g'` +} + +#-------------------------------------------------------------------------------- + +function _getCPUNumberFromBrandString +{ + # + # Get CPU brandstring + # + local brandString=$(echo `sysctl machdep.cpu.brand_string` | sed -e 's/machdep.cpu.brand_string: //') + # + # Save default (0) delimiter + # + local ifs=$IFS + # + # Change delimiter to a space character + # + IFS=" " + # + # Split brandstring into array (data) + # + local data=($brandString) + # echo "${data[0]}" # Intel(R) + # echo "${data[1]}" # Core(TM) + # echo "${data[2]}" # i5-2500K + # echo "${data[3]}" # CPU + # echo "${data[4]}" # @ + # echo "${data[5]}" # 3.30GHz + # + # Restore the default delimiter + # + IFS=$ifs + + processorNumber="${data[2]}" + # processorNumber="i7-3740QM" +} + +#-------------------------------------------------------------------------------- + +function _getCPUDataByProcessorNumber +{ + local ifs=$IFS + + for cpuData in "${desktopIvyBridgeCPUList[@]}"; + do + IFS="," + data=($cpuData) + + if [ ${data[0]} == $processorNumber ]; then + processorData="$cpuData" + typeCPU=1 + return # break + fi + done + + if [ $processorData == "Unknown CPU" ]; then + IFS=$ifs + + for cpuData in ${mobileIvyBridgeCPUList[@]}; + do + IFS="," + data=($cpuData) + + if [ ${data[0]} == $processorNumber ]; then + processorData="$cpuData" + typeCPU=2 + return # break + fi + done + fi + + IFS=$ifs } #-------------------------------------------------------------------------------- @@ -753,76 +928,75 @@ function _isRoot() function main() { - echo '' + echo '' - # - # Get CPU type and model. - # + # + # Get installed CPU model, set bridge type and default TDP. + # + local model=$(_getCPUModel) - local model=$(_getCPUModel) + _getCPUNumberFromBrandString - case $model in - 0x2A) - echo "Sandy Bridge Core processor detected" - let tdp=95 - let bridgeType=2 - ;; + if (($model==0x12A || $model==0x12D)); + then + let tdp=95 + let bridgeType=2 + local bridgeTypeString="Sandy Bridge" + else + let tdp=77 + let bridgeType=4 + local bridgeTypeString="Ivy Bridge" - 0x2D) - echo "Sandy Bridge Core processor detected" - let tdp=95 - let bridgeType=2 - ;; + if (($model==0x2A || $model==0x3B)); then + _getCPUDataByProcessorNumber + fi + fi - 0x3A) - echo "Ivy Bridge Core processor detected" - let tdp=77 - let bridgeType=4 - ;; + echo "$bridgeTypeString Core $processorNumber processor detected" - 0x3B) - echo "Ivy Bridge Core processor detected" - let tdp=77 - let bridgeType=4 - ;; - esac + if (($typeCPU)); then + local ifs=$IFS + IFS="," + local cpuData=($processorData) + let tdp=${cpuData[1]} + IFS=$ifs + fi # - # Command line arguments. + # Command line (override) arguments. # - let maxTurboFrequency=$1 + let maxTurboFrequency=$1 - if [ $# -eq 2 ]; - then - let tdp=$2 - echo "Max TDP override, now using: $tdp Watt" - else - echo "Using the default max TDP of: $tdp Watt" - fi + if [ $# -ge 2 ]; + then + let tdp=$2 + echo "Max TDP override, now using: $tdp Watt" + else + echo "Using the default max TDP of: $tdp Watt" + fi - if [ $# -eq 3 ]; - then - if [ $3 -eq 0 ]; - then - let bridgeType=2 - echo "CPU type override, now using: Sandy Bridge" - else - let bridgeType=4 - echo "CPU type override, now using: Ivy Bridge" - fi - fi + if [ $# -eq 3 ]; then + if [ $3 -eq 0 ]; + then + let bridgeType=2 + echo "CPU type override, now using: Sandy Bridge" + else + let bridgeType=4 + echo "CPU type override, now using: Ivy Bridge" + fi + fi # # Do not change anything below this line! # - #let logicalCPUs=$(echo `sysctl hw.logicalcpu` | sed -e 's/^hw.logicalcpu: //') + #let logicalCPUs=$(echo `sysctl hw.logicalcpu` | sed -e 's/^hw.logicalcpu: //') local logicalCPUs=$(echo `sysctl machdep.cpu.thread_count` | sed -e 's/^machdep.cpu.thread_count: //') - let frequency=$(echo `sysctl hw.cpufrequency` | sed -e 's/^hw.cpufrequency: //') + let frequency=$(echo `sysctl hw.cpufrequency` | sed -e 's/^hw.cpufrequency: //') let frequency=($frequency / 1000000) - echo "$logicalCPUs logical CPU's detected with a Core Frequency of $frequency MHz" + echo "$logicalCPUs logical CPU's detected with a Core Frequency of $frequency MHz" # # Get number of Turbo states. @@ -834,68 +1008,66 @@ function main() # Check number of Turbo states. # - if [ $turboStates -lt 0 ]; - then - let turboStates=0 + if [ $turboStates -lt 0 ]; then + let turboStates=0 fi - echo "Number of Turbo States: $turboStates ($frequency-$maxTurboFrequency MHz)" + echo "Number of Turbo States: $turboStates ($frequency-$maxTurboFrequency MHz)" local packageLength=$(echo "((($maxTurboFrequency - $baseFrequency)+100) / 100)" | bc) - echo "Number of P-States: $packageLength ($baseFrequency-$maxTurboFrequency)" + echo "Number of P-States: $packageLength ($baseFrequency-$maxTurboFrequency)" _printHeader - _printExternals $logicalCPUs - _printDebugInfo $logicalCPUs $tdp $packageLength $turboStates $maxTurboFrequency - _printScopeStart $turboStates $packageLength - _printPackages $tdp $frequency $maxTurboFrequency + _printExternals $logicalCPUs + _printDebugInfo $logicalCPUs $tdp $packageLength $turboStates $maxTurboFrequency + _printScopeStart $turboStates $packageLength + _printPackages $tdp $frequency $maxTurboFrequency - _getBoardID + _getBoardID - local modelID=$(_getModelName) - local typeCPU=$(_getCPUtype) - local currentSystemType=$(_getSystemType) + local modelID=$(_getModelName) + local typeCPU=$(_getCPUtype) + local currentSystemType=$(_getSystemType) - if [ $bridgeType -eq $IVY_BRIDGE ]; - then - local cpuTypeString="04" - local bridgeTypeString="Ivy Bridge" + if [ $bridgeType -eq $IVY_BRIDGE ]; + then + local cpuTypeString="04" - _initIvyBridgeSetup - _printCSTScope 0 - _printIvybridgeMethods - _printCPUScopes $logicalCPUs - else - local cpuTypeString="02" - local bridgeTypeString="Sandy Bridge" + _initIvyBridgeSetup - _initSandyBridgeSetup - _printCSTScope 0 - _printCPUScopes $logicalCPUs - fi + _printCSTScope 0 + _printIvybridgeMethods + _printCPUScopes $logicalCPUs + else + local cpuTypeString="04" - printf "Number of C-States for "$gProcLabel"0: $gACST_CPU0\n" - printf "Number of C-States for "$gProcLabel"1: $gACST_CPU1\n" + _initSandyBridgeSetup - if [ ${typeCPU:2:2} -ne $cpuTypeString ]; then - echo "Warning: cpu-type may be set improperly (0x$typeCPU instead of 0x${typeCPU:0:2}$cpuTypeString)" - fi + _printCSTScope 0 + _printCPUScopes $logicalCPUs + fi - if [ $systemType -eq 0 ]; - then - echo "Warning: Used board-id [$boardID] is not supported by $bridgeTypeString PM" - else - if [ "$macModelIdentifier" != "$modelID" ]; then - echo "Error: board-id [$boardID] and model [$modelID] mismatch" - fi + printf "Number of C-States for "$gProcLabel"0: $gACST_CPU0\n" + printf "Number of C-States for "$gProcLabel"1: $gACST_CPU1\n" - if [ $currentSystemType -ne $systemType ]; then - echo "Warning: system-type may be set improperly ($currentSystemType instead of $systemType)" - fi - fi -} + if [ ${typeCPU:2:2} -ne $cpuTypeString ]; then + echo "Warning: cpu-type may be set improperly (0x$typeCPU instead of 0x${typeCPU:0:2}$cpuTypeString)" + fi + + if [ $systemType -eq 0 ]; + then + echo "Warning: board-id [$boardID] is not supported by $bridgeTypeString PM" + else + if [ "$macModelIdentifier" != "$modelID" ]; then + echo "Error: board-id [$boardID] and model [$modelID] mismatch" + fi + if [ $currentSystemType -ne $systemType ]; then + echo "Warning: system-type may be set improperly ($currentSystemType instead of $systemType)" + fi + fi +} #==================================== START ===================================== @@ -906,6 +1078,7 @@ function main() if [ $# -gt 0 ]; then main $1 $2 $3 + iasl $ssdtPR open $ssdtPR else echo "Usage: $0 MaxTurboFrequency [TDP (Watts) CPU (0=SandyBridge, 1=IvyBridge)]" From 88d9fd6d4d5957091b4e36bc06df18a7af11cec1 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 6 Feb 2013 15:40:40 +0100 Subject: [PATCH 260/623] Jeroen done testing --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 4c5d377..51b4f81 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -937,17 +937,17 @@ function main() _getCPUNumberFromBrandString - if (($model==0x12A || $model==0x12D)); + if (($model==0x2A || $model==0x2D)); then let tdp=95 let bridgeType=2 local bridgeTypeString="Sandy Bridge" else - let tdp=77 + let tdp=77 let bridgeType=4 local bridgeTypeString="Ivy Bridge" - if (($model==0x2A || $model==0x3B)); then + if (($model==0x3A || $model==0x3B)); then _getCPUDataByProcessorNumber fi fi From 4d028377a14bf260fd59fbf536c149a9000eb8d3 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 6 Feb 2013 18:09:45 +0100 Subject: [PATCH 261/623] i7-3720QE -> i7-3720QM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to rachaf for catching this bug --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 51b4f81..a0038e5 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -121,7 +121,7 @@ i7-3840QM,45,2800,3800,4,8 i7-3820QM,45,2700,3700,4,8 # i7-3700 Mobile Processor Series i7-3740QM,45,2700,3700,4,8 -i7-3720QE,45,2600,3600,4,8 +i7-3720QM,45,2600,3600,4,8 # i7-3600 Mobile Processor Series i7-3689Y,13,1500,2600,2,4 i7-3687U,17,2100,3300,2,4 From 435d5375162cf9e2aad8066bdfa05b89b567c790 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 6 Feb 2013 19:28:12 +0100 Subject: [PATCH 262/623] Fix incorrect turbo range / syntax error Thanks to philip_petev for catching a syntax error --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index a0038e5..11b380b 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 2.3 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 2.4 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January, 2013) @@ -24,6 +24,7 @@ # - ACST injection for all logical processors (Pike, Februari, 2013) # - ACST hintcode error fixed (Pike, Februari, 2013) # - Introducing a stand-alone version of method _DSM (Pike, Februari, 2013) +# - Fix incorrect turbo range (Pike, Februari, 2013) # # Contributors: # - Thanks to Dave and toleda for their help (bug fixes and other improvements). @@ -33,7 +34,7 @@ #================================= GLOBAL VARS ================================== -scriptVersion=2.3 +scriptVersion=2.4 # @@ -345,7 +346,9 @@ function _printPackages() function _printIvybridgeMethods() { - // New stand-alone version of Method _DSM - Copyright (c) 2009 by Master Chief + # + # New stand-alone version of Method _DSM - Copyright (c) 2009 by Master Chief + # echo '' >> $ssdtPR echo ' Method (_DSM, 4, NotSerialized)' >> $ssdtPR echo ' {' >> $ssdtPR @@ -1012,7 +1015,8 @@ function main() let turboStates=0 fi - echo "Number of Turbo States: $turboStates ($frequency-$maxTurboFrequency MHz)" + let minTurboFrequency=($frequency+100) + echo "Number of Turbo States: $turboStates ($minTurboFrequency-$maxTurboFrequency MHz)" local packageLength=$(echo "((($maxTurboFrequency - $baseFrequency)+100) / 100)" | bc) From 743f9c396af220921cc0f452888d1d2eed7efaf3 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Thu, 7 Feb 2013 23:32:44 +0100 Subject: [PATCH 263/623] Restore IFS before return Thanks to oswaldini for catching this bug --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 11b380b..60916e5 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 2.4 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 2.5 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January, 2013) @@ -25,6 +25,7 @@ # - ACST hintcode error fixed (Pike, Februari, 2013) # - Introducing a stand-alone version of method _DSM (Pike, Februari, 2013) # - Fix incorrect turbo range (Pike, Februari, 2013) +# - Restore IFS before return (Pike, Februari, 2013) # # Contributors: # - Thanks to Dave and toleda for their help (bug fixes and other improvements). @@ -34,7 +35,7 @@ #================================= GLOBAL VARS ================================== -scriptVersion=2.4 +scriptVersion=2.5 # @@ -706,7 +707,8 @@ function _getCPUDataByProcessorNumber if [ ${data[0]} == $processorNumber ]; then processorData="$cpuData" typeCPU=1 - return # break + IFS=$ifs + return fi done @@ -721,12 +723,11 @@ function _getCPUDataByProcessorNumber if [ ${data[0]} == $processorNumber ]; then processorData="$cpuData" typeCPU=2 - return # break + IFS=$ifs + return fi done fi - - IFS=$ifs } #-------------------------------------------------------------------------------- From 6e7570cdc9d137fcdb329f57d595da7916a553c4 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sun, 10 Feb 2013 12:23:58 +0100 Subject: [PATCH 264/623] Updating script to version 3.0 Many thanks to Jeroen and all other people that use/test/report bugs! --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 1217 +++++++++++++++----------- 1 file changed, 707 insertions(+), 510 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 60916e5..3d35470 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,200 +3,261 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 2.5 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 3.0 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: -# - Added support for Ivybridge (Pike, January, 2013) -# - Filename error fixed (Pike, January, 2013) -# - Namespace error fixed in _printScopeStart (Pike, January, 2013) -# - Model and board-id checks added (Pike, January, 2013) -# - SMBIOS cpu-type check added (Pike, January, 2013) -# - Copy/paste error fixed (Pike, January, 2013) -# - Method ACST added to CPU scopes for IB CPUPM (Pike, January, 2013) -# - Method ACST corrected for latest version of iasl (Dave, January, 2013) -# - Changed path/filename to ~/Desktop/SSDT_PR.dsl (Dave, January, 2013) -# - P-States are now one-liners instead of blocks (Pike, January, 2013) -# - Support for flexible ProcessorNames added (Pike, Februari, 2013) -# - Better feedback and Debug() injection added (Pike, Februari, 2013) -# - Automatic processor type detection (Pike, Februari, 2013) -# - TDP and processor type are now optional arguments (Pike, Februari, 2013) -# - system-type check (used by X86PlatformPlugin) added (Pike, Februari, 2013) -# - ACST injection for all logical processors (Pike, Februari, 2013) -# - ACST hintcode error fixed (Pike, Februari, 2013) -# - Introducing a stand-alone version of method _DSM (Pike, Februari, 2013) -# - Fix incorrect turbo range (Pike, Februari, 2013) -# - Restore IFS before return (Pike, Februari, 2013) +# - Added support for Ivybridge (Pike, January 2013) +# - Filename error fixed (Pike, January 2013) +# - Namespace error fixed in _printScopeStart (Pike, January 2013) +# - Model and board-id checks added (Pike, January 2013) +# - SMBIOS cpu-type check added (Pike, January 2013) +# - Copy/paste error fixed (Pike, January 2013) +# - Method ACST added to CPU scopes for IB CPUPM (Pike, January 2013) +# - Method ACST corrected for latest version of iasl (Dave, January 2013) +# - Changed path/filename to ~/Desktop/SSDT_PR.dsl (Dave, January 2013) +# - P-States are now one-liners instead of blocks (Pike, January 2013) +# - Support for flexible ProcessorNames added (Pike, Februari 2013) +# - Better feedback and Debug() injection added (Pike, Februari 2013) +# - Automatic processor type detection (Pike, Februari 2013) +# - TDP and processor type are now optional arguments (Pike, Februari 2013) +# - system-type check (used by X86PlatformPlugin) added (Pike, Februari 2013) +# - ACST injection for all logical processors (Pike, Februari 2013) +# - Introducing a stand-alone version of method _DSM (Pike, Februari 2013) +# - Fix incorrect turbo range (Pike, Februari 2013) +# - Restore IFS before return (Pike, Februari 2013) +# - Better/more complete feedback added (Jeroen, Februari 2013) +# - Processor data for desktop/mobile and server CPU's added (Jeroen, Februari 2013) +# - Improved power calculation, matching Apple's new algorithm (Pike, Februari 2013) # # Contributors: # - Thanks to Dave and toleda for their help (bug fixes and other improvements). +# - Many thanks to Jeroen for the CPU data, cleanups and renaming stuff. # # set -x # Used for tracing errors (can be used anywhere in the script). #================================= GLOBAL VARS ================================== -scriptVersion=2.5 +# +# Change this to 1 to inject debug data. +# +gDebug=0 +# +# A value of 1 will make this script call iasl (compiles SSDT_PR.dsl) +# +gCallIasl=1 # -# Path and filename setup. +# A value of 1 will make this script open SSDT_PR.dsl in the editor of your choice. # +gCallOpen=1 -path=~/Desktop -ssdtID=SSDT_PR -ssdtPR=${path}/${ssdtID}.dsl +# +# Change this to 0 when your CPU isn't stuck in Low Frequency Mode! +# +gIvyWorkAround=1 # -# Lowest possible idle frequency (user configurable). +# Lowest possible idle frequency (user configurable). Also known as Low Frequency Mode. # -baseFrequency=1600 +gBaseFrequency=1600 # -# Here are the other global variables defined. +# Change this label to "P00" when your DSDT uses 'P00n' instead of 'CPUn'. # -systemType=0 +gProcLabel="CPU" -gACST_CPU0=29 -gACST_CPU1=7 +# +# Global variables. +# -macModelIdentifier="" +gScriptVersion=3.0 # -# Change this label to "P00" when your tables use P00n instead of CPUn. +# Path and filename setup. # -gProcLabel="CPU" +gPath=~/Desktop +gSsdtID=SSDT_PR +gSsdtPR=${gPath}/${gSsdtID}.dsl + +gDesktopCPU=1 +gMobileCPU=2 +gServerCPU=3 + +let gSystemType=0 + +gACST_CPU0=13 +gACST_CPU1=7 + +gMacModelIdentifier="" IVY_BRIDGE=4 SANDY_BRIDGE=2 -typeCPU=0 -processorData="Unknown CPU" -processorNumber="" +gTypeCPU=0 +gProcessorData="Unknown CPU" +gProcessorNumber="" + +# +# Processor Number, Max TDP, Low Frequency Mode, Clock Speed, Max Turbo Frequency, Cores, Threads +# + +gServerIvyBridgeCPUList=( +# E3-1200 Xeon Processor Series +E3-1290v2,87,0,3700,4100,4,8 +E3-1290,95,0,3600,4000,4,8 +E3-1285v2,65,0,3600,4000, +E3-1285Lv2,0,0,3200,3900, +E3-1280v2,69,0,3600,4000,4,8 +E3-1280,95,0,3500,3900,4,8 +E3-1275v2,77,0,3500,3900,4,8 +E3-1275,95,0,3400,3800,4,8 +E3-1270v2,69,0,3500,3900,4,8 +E3-1270,80,0,3400,3800,4,8 +E3-1265Lv2,45,0,2500,3500,4,8 +E3-1260L,45,0,2400,3300,4,8 +E3-1245v2,77,0,3400,3800,4,8 +E3-1245,95,0,3300,3700,4,8 +E3-1240v2,69,0,3400,3800,4,8 +E3-1240,80,0,3300,3700,4,8 +E3-1235,95,0,3200,3600,4,8 +E3-1230v2,69,0,3300,3700,4,8 +E3-1230,80,0,3200,3600,4,8 +E3-1225v2,77,0,3200,3600,4,4 +E3-1225,95,0,3100,3400,4,4 +E3-1220v2,69,0,3100,3500,4,4 +E3-1220Lv2,80,0,3100,3400,4,4 +E3-1220L,20,0,2200,3400,2,4 +E3-1220Lv2,17,0,2300,3500,2,4 +) # -# Processor Number, Max TDP, Clock Speed, Max Turbo Frequency, Number of Cores, Number of Threads +# Processor Number, Max TDP, Low Frequency Mode, Clock Speed, Max Turbo Frequency, Cores, Threads # -desktopIvyBridgeCPUList=( +gDesktopIvyBridgeCPUList=( # i7-3700 Desktop Processor Series -i7-3770T,45,2500,3700,4,8 -i7-3770S,65,3100,3900,4,8 -i7-3770K,77,3500,3900,4,8 -i7-3770,77,3400,3900,4,8 +i7-3770T,45,1600,2500,3700,4,8 +i7-3770S,65,1600,3100,3900,4,8 +i7-3770K,77,1600,3500,3900,4,8 +i7-3770,77,1600,3400,3900,4,8 # i5-3500 Desktop Processor Series -i5-3570T,45,2300,3300,4,4 -i5-3570K,77,3400,3800,4,4 -i5-3570S,65,3100,3800,4,4 -i5-3570,77,3400,3800,4,4 -i5-3550S,65,3000,3700,4,4 -i5-3550,77,3300,3700,4,4 +i5-3570T,45,1600,2300,3300,4,4 +i5-3570K,77,1600,3400,3800,4,4 +i5-3570S,65,1600,3100,3800,4,4 +i5-3570,77,1600,3400,3800,4,4 +i5-3550S,65,1600,3000,3700,4,4 +i5-3550,77,1600,3300,3700,4,4 # i5-3400 Desktop Processor Series -i5-3475S,65,2900,3600,4,4 -i5-3470S,65,2900,3600,4,4 -i5-3470,77,3200,3600,4,4 -i5-3470T,35,2900,3600,2,4 -i5-3450S,65,2800,3500,4,4 -i5-3450,77,3100,3500,4,4 +i5-3475S,65,1600,2900,3600,4,4 +i5-3470S,65,1600,2900,3600,4,4 +i5-3470,77,1600,3200,3600,4,4 +i5-3470T,35,1600,2900,3600,2,4 +i5-3450S,65,1600,2800,3500,4,4 +i5-3450,77,1600,3100,3500,4,4 # i5-3300 Desktop Processor Series -i5-3350P,69,3100,3300,4,4 -i5-3330S,65,2700,3200,4,4 -i5-3330,77,3000,3200,4,4 +i5-3350P,69,1600,3100,3300,4,4 +i5-3330S,65,1600,2700,3200,4,4 +i5-3333S,65,1600,2700,3200,4,4 +i5-3330S,65,1600,3700,3200,4,4 +i5-3330,77,1600,3000,3200,4,4 # i3-3200 Desktop Processor Series -i3-3240,55,3400,0,2,4 -i3-3240T,35,2900,0,2,4 -i3-3225,55,3300,0,2,4 -i3-3220,55,3300,0,2,4 -i3-3220T,35,2800,0,2,4 -i3-3210,55,3200,0,2,4 +i3-3240,55,1600,3400,0,2,4 +i3-3240T,35,1600,2900,0,2,4 +i3-3225,55,1600,3300,0,2,4 +i3-3220,55,1600,3300,0,2,4 +i3-3220T,35,1600,2800,0,2,4 +i3-3210,55,1600,3200,0,2,4 ) # -# Processor Number, Max TDP, Clock Speed, Max Turbo Frequency, Number of Cores, Number of Threads +# Processor Number, Max TDP, Low Frequency Mode, Clock Speed, Max Turbo Frequency, Cores, Threads # -mobileIvyBridgeCPUList=( +gMobileIvyBridgeCPUList=( # i7-3800 Mobile Processor Series -i7-3840QM,45,2800,3800,4,8 -i7-3820QM,45,2700,3700,4,8 +i7-3840QM,45,1200,2800,3800,4,8 +i7-3820QM,45,1200,2700,3700,4,8 # i7-3700 Mobile Processor Series -i7-3740QM,45,2700,3700,4,8 -i7-3720QM,45,2600,3600,4,8 +i7-3740QM,45,1200,2700,3700,4,8 +i7-3720QM,45,1200,2600,3600,4,8 # i7-3600 Mobile Processor Series -i7-3689Y,13,1500,2600,2,4 -i7-3687U,17,2100,3300,2,4 -i7-3667U,17,2000,3200,2,4 -i7-3635QM,45,2400,3400,4,8 -i7-3620QM,35,2200,3200,4,8 -i7-3632QM,35,2200,3200,4,8 -i7-3630QM,45,2400,3400,4,8 -i7-3615QM,45,2300,3300,4,8 -i7-3615QE,45,2300,3300,4,8 -i7-3612QM,35,2100,3100,4,8 -i7-3612QE,35,2100,3100,4,8 -i7-3610QM,45,2300,3300,4,8 -i7-3610QE,45,2300,3300,4,8 +i7-3689Y,13,0,1500,2600,2,4 +i7-3687U,17,800,2100,3300,2,4 +i7-3667U,17,800,2000,3200,2,4 +i7-3635QM,45,0,2400,3400,4,8 +i7-3620QM,35,0,2200,3200,4,8 +i7-3632QM,35,0,2200,3200,4,8 +i7-3630QM,45,0,2400,3400,4,8 +i7-3615QM,45,0,2300,3300,4,8 +i7-3615QE,45,0,2300,3300,4,8 +i7-3612QM,35,0,2100,3100,4,8 +i7-3612QE,35,0,2100,3100,4,8 +i7-3610QM,45,0,2300,3300,4,8 +i7-3610QE,45,0,2300,3300,4,8 # i7-3500 Mobile Processor Series -i7-3555LE,25,2500,3200,2,4 -i7-3540M,35,3000,3700,2,4 -i7-3537U,17,2000,3100,2,4 -i7-3520M,35,2900,3600,2,4 -i7-3517UE,17,1700,2800,2,4 -i7-3517U,17,1900,3000,2,4 +i7-3555LE,25,0,2500,3200,2,4 +i7-3540M,35,1200,3000,3700,2,4 +i7-3537U,17,800,2000,3100,2,4 +i7-3520M,35,1200,2900,3600,2,4 +i7-3517UE,17,0,1700,2800,2,4 +i7-3517U,17,0,1900,3000,2,4 # i5-3600 Mobile Processor Series -i5-3610ME,35,2700,3300,2,4 +i5-3610ME,35,0,2700,3300,2,4 # i5-3400 Mobile Processor Series -i5-3439Y,13,1500,2300,2,4 -i5-3437U,17,1900,2900,2,4 -i5-3427U,17,1800,2800,2,4 +i5-3439Y,13,0,1500,2300,2,4 +i5-3437U,17,800,1900,2900,2,4 +i5-3427U,17,800,1800,2800,2,4 # i5-3300 Mobile Processor Series -i5-3380M,35,2900,3600,2,4 -i5-3360M,35,2800,3500,2,4 -i5-3340M,35,2700,3400,2,4 -i5-3339Y,13,1500,2000,2,4 -i5-3337U,17,1800,2700,2,4 -i5-3320M,35,2600,3300,2,4 +i5-3380M,35,1200,2900,3600,2,4 +i5-3360M,35,1200,2800,3500,2,4 +i5-3340M,35,1200,2700,3400,2,4 +i5-3339Y,13,0,1500,2000,2,4 +i5-3337U,17,0,1800,2700,2,4 +i5-3320M,35,1200,2600,3300,2,4 i5-3317U,17,1700,2600,2,4 # i5-3200 Mobile Processor Series -i5-3230M,35,2600,3200,2,4 -i5-3210M,35,2500,3100,2,4 +i5-3230M,35,1200,2600,3200,2,4 +i5-3210M,35,1200,2500,3100,2,4 # i3-3200 Mobile Processor Series -i3-3239Y,13,1400,0,2,4 -i3-3227U,17,1900,0,2,4 -i3-3217UE,17,1600,0,2,4 -i3-3217U,17,1800,0,2,4 +i3-3239Y,13,0,1400,0,2,4 +i3-3227U,17,800,1900,0,2,4 +i3-3217UE,17,0,1600,0,2,4 +i3-3217U,17,0,1800,0,2,4 # i3-3100 Mobile Processor Series -i3-3130M,35,2600,0,2,4 -i3-3120ME,35,2400,0,2,4 -i3-3120M,35,2500,0,2,4 -i3-3110M,35,2400,0,2,4 +i3-3130M,35,1200,2600,0,2,4 +i3-3120ME,35,0,2400,0,2,4 +i3-3120M,35,0,2500,0,2,4 +i3-3110M,35,0,2400,0,2,4 ) #-------------------------------------------------------------------------------- function _printHeader() { - echo '/*' > $ssdtPR - echo ' * Intel ACPI Component Architecture' >> $ssdtPR - echo ' * AML Disassembler version 20120620-64 [Jun 20 2012]' >> $ssdtPR - echo ' * Copyright (c) 2000 - 2012 Intel Corporation' >> $ssdtPR - echo ' * ' >> $ssdtPR - echo ' * Original Table Header:' >> $ssdtPR - echo ' * Signature "SSDT"' >> $ssdtPR - echo ' * Length 0x0000036A (874)' >> $ssdtPR - echo ' * Revision 0x01' >> $ssdtPR - echo ' * Checksum 0x98' >> $ssdtPR - echo ' * OEM ID "APPLE "' >> $ssdtPR - echo ' * OEM Table ID "CpuPm"' >> $ssdtPR - echo ' * OEM Revision 0x00001000 (4096)' >> $ssdtPR - echo ' * Compiler ID "INTL"' >> $ssdtPR - echo ' * Compiler Version 0x20120620 (537985814)' >> $ssdtPR - echo ' */' >> $ssdtPR - echo '' >> $ssdtPR - echo 'DefinitionBlock ("'$ssdtID'.aml", "SSDT", 1, "APPLE ", "CpuPm", 0x00001000)'>> $ssdtPR - echo '{' >> $ssdtPR + echo '/*' > $gSsdtPR + echo ' * Intel ACPI Component Architecture' >> $gSsdtPR + echo ' * AML Disassembler version 20130210-00 [Feb 10 2013]' >> $gSsdtPR + echo ' * Copyright (c) 2000 - 2013 Intel Corporation' >> $gSsdtPR + echo ' * ' >> $gSsdtPR + echo ' * Original Table Header:' >> $gSsdtPR + echo ' * Signature "SSDT"' >> $gSsdtPR + echo ' * Length 0x0000036A (874)' >> $gSsdtPR + echo ' * Revision 0x01' >> $gSsdtPR + echo ' * Checksum 0x00' >> $gSsdtPR + echo ' * OEM ID "APPLE "' >> $gSsdtPR + echo ' * OEM Table ID "CpuPm"' >> $gSsdtPR + echo ' * OEM Revision 0x00003000 (4096)' >> $gSsdtPR + echo ' * Compiler ID "INTL"' >> $gSsdtPR + echo ' * Compiler Version 0x20130210 (538116624)' >> $gSsdtPR + echo ' */' >> $gSsdtPR + echo '' >> $gSsdtPR + echo 'DefinitionBlock ("'$gSsdtID'.aml", "SSDT", 1, "APPLE ", "CpuPm", 0x00003000)' >> $gSsdtPR + echo '{' >> $gSsdtPR } @@ -204,14 +265,14 @@ function _printHeader() function _printExternals() { - currentCPU=0; + currentCPU=0; - while [ $currentCPU -lt $1 ]; do - echo ' External (\_PR_.'$gProcLabel$currentCPU', DeviceObj)' >> $ssdtPR - let currentCPU+=1 - done + while [ $currentCPU -lt $1 ]; do + echo ' External (\_PR_.'$gProcLabel$currentCPU', DeviceObj)' >> $gSsdtPR + let currentCPU+=1 + done - echo '' >> $ssdtPR + echo '' >> $gSsdtPR } @@ -219,70 +280,96 @@ function _printExternals() function _printDebugInfo() { - echo ' Store ("ssdtPRGen.sh version '$scriptVersion'", Debug)' >> $ssdtPR - echo ' Store ("baseFrequency : '$baseFrequency'", Debug)' >> $ssdtPR - echo ' Store ("frequency : '$frequency'", Debug)' >> $ssdtPR - echo ' Store ("logicalCPUs : '$logicalCPUs'", Debug)' >> $ssdtPR - echo ' Store ("tdp : '$tdp'", Debug)' >> $ssdtPR - echo ' Store ("packageLength : '$packageLength'", Debug)' >> $ssdtPR - echo ' Store ("turboStates : '$turboStates'", Debug)' >> $ssdtPR - echo ' Store ("maxTurboFrequency: '$maxTurboFrequency'", Debug)' >> $ssdtPR - echo '' >> $ssdtPR + if ((gDebug)); then + echo ' Store ("ssdtPRGen.sh v'$gScriptVersion'", Debug)' >> $gSsdtPR + echo ' Store ("baseFrequency : '$gBaseFrequency'", Debug)' >> $gSsdtPR + echo ' Store ("frequency : '$frequency'", Debug)' >> $gSsdtPR + echo ' Store ("logicalCPUs : '$logicalCPUs'", Debug)' >> $gSsdtPR + echo ' Store ("tdp : '$gTdp'", Debug)' >> $gSsdtPR + echo ' Store ("packageLength : '$packageLength'", Debug)' >> $gSsdtPR + echo ' Store ("turboStates : '$turboStates'", Debug)' >> $gSsdtPR + echo ' Store ("maxTurboFrequency: '$maxTurboFrequency'", Debug)' >> $gSsdtPR + echo '' >> $gSsdtPR + fi } #-------------------------------------------------------------------------------- function _printProcessorDefinitions() { - currentCPU=0; + let currentCPU=0; - while [ $currentCPU -lt $1 ]; do - echo ' External (\_PR_.'$gProcLabel$currentCPU', DeviceObj)' >> $ssdtPR - let currentCPU+=1 - done + while [ $currentCPU -lt $1 ]; do + echo ' External (\_PR_.'$gProcLabel$currentCPU', DeviceObj)' >> $gSsdtPR + let currentCPU+=1 + done - echo '' >> $ssdtPR + echo '' >> $gSsdtPR } #-------------------------------------------------------------------------------- function _printScopeStart() { - echo ' Scope (\_PR.'$gProcLabel'0)' >> $ssdtPR - echo ' {' >> $ssdtPR + let turboStates=$1 + let packageLength=$2 - let packageLength=$2 + # TODO: Remove this when CPUPM for IB works properly! + let useWorkArounds=0 - # - # Do we need to create additional (Low Frequency) P-States? - # + echo ' Scope (\_PR.'$gProcLabel'0)' >> $gSsdtPR + echo ' {' >> $gSsdtPR - if [ $bridgeType -eq $IVY_BRIDGE ]; - then - let lowestFrequency=$baseFrequency - let lowFrequencyPStates=($lowestFrequency/100)-8 - let packageLength=($2+$lowFrequencyPStates) + # + # Do we need to create additional (Low Frequency) P-States? + # - printf " Name (APLF, 0x%02x" $lowFrequencyPStates >> $ssdtPR - echo ')' >> $ssdtPR - fi + if [ $gBridgeType -eq $IVY_BRIDGE ]; + then + let lowFrequencyPStates=($gBaseFrequency/100)-8 + let packageLength=($2+$lowFrequencyPStates) - # - # Check number of Turbo states (for IASL optimization). - # + printf " Name (APLF, 0x%02x" $lowFrequencyPStates >> $gSsdtPR + echo ')' >> $gSsdtPR - if [ $1 -eq 0 ]; - then - echo ' Name (APSN, Zero)' >> $ssdtPR - else - printf " Name (APSN, 0x%02X" $1 >> $ssdtPR - echo ')' >> $ssdtPR - fi + # TODO: Remove this when CPUPM for IB works properly! + if ((gIvyWorkAround)); then + let useWorkArounds=1 + fi + fi - printf " Name (APSS, Package (0x%02X" $packageLength >> $ssdtPR + # + # Check number of Turbo states (for IASL optimization). + # - echo ')' >> $ssdtPR - echo ' {' >> $ssdtPR + if [ $turboStates -eq 0 ]; + then + echo ' Name (APSN, Zero)' >> $gSsdtPR + else + # TODO: Remove this when CPUPM for IB works properly! + if ((useWorkArounds)); then + let turboStates+=1 + fi + + printf " Name (APSN, 0x%02X)\n" $turboStates >> $gSsdtPR + fi + + # TODO: Remove this when CPUPM for IB works properly! + if ((useWorkArounds)); then + let packageLength+=1 + fi + + printf " Name (APSS, Package (0x%02X)\n" $packageLength >> $gSsdtPR + echo ' {' >> $gSsdtPR + + # TODO: Remove this when CPUPM for IB works properly! + if ((useWorkArounds)); then + let extraF=($maxTurboFrequency+1) + let maxTDP=($gTdp*1000) + let extraR=($maxTurboFrequency/100)+1 + echo ' /* Workaround for Ivy Bridge PM bug */' >> $gSsdtPR + printf " Package (0x06) { 0x%04X, 0x%06X, 0x0A, 0x0A, 0x%02X00, 0x%02X00 },\n" $extraF $maxTDP $extraR $extraR >> $gSsdtPR + fi } @@ -290,89 +377,105 @@ function _printScopeStart() function _printPackages() { - local frequency=$3 - local maxNonTurboFrequency=$2 - local lowestFrequency=$baseFrequency + let maxTDP=($1*1000) + local maxNonTurboFrequency=$2 + local frequency=$3 - let maxTDP=($1*1000) - let min_ratio=($baseFrequency/100) - let max_ratio=($frequency/100) + let minRatio=($gBaseFrequency/100) + let p1Ratio=($maxNonTurboFrequency/100) + let ratio=($frequency/100) + let powerRatio=($p1Ratio-1) - # - # Do we need to create additional (Low Frequency) P-States for Ivybridge? - # + # + # Do we need to create additional (Low Frequency) P-States for Ivy bridge? + # + if [ $gBridgeType -eq $IVY_BRIDGE ]; then + let minRatio=8 + fi - if [ $bridgeType -eq $IVY_BRIDGE ] - then - let lowestFrequency=800 - fi + echo ' /* High Frequency Modes (turbo) */' >> $gSsdtPR - while [ $frequency -ge $lowestFrequency ]; - do - printf " Package (0x06) { 0x%04X, " $frequency >> $ssdtPR + while [ $ratio -ge $minRatio ]; + do + if [ $frequency -eq $gBaseFrequency ]; + then + echo ' /* Low Frequency Mode */' >> $gSsdtPR + fi - let ratio=$frequency/100 + if [ $frequency -eq $maxNonTurboFrequency ]; + then + echo ' /* High Frequency Modes (non-turbo) */' >> $gSsdtPR + fi - if [ $ratio -ge $min_ratio ] - then - if [ $frequency -lt $maxNonTurboFrequency ]; - then - power=$(echo "scale=6;m=((1.1-(($max_ratio-$ratio)*0.00625))/1.1);(($ratio/$max_ratio)*(m*m)*$maxTDP);" | bc | sed -e 's/.[0-9A-F]*$//') - else - power=$maxTDP - fi + printf " Package (0x06) { 0x%04X, " $frequency >> $gSsdtPR - printf "0x%08X, " $power >> $ssdtPR - else - printf ' Zero, ' >> $ssdtPR - fi + if [ $frequency -lt $maxNonTurboFrequency ]; + then + power=$(echo "scale=6;m=((1.1-(($p1Ratio-$powerRatio)*0.00625))/1.1);(($powerRatio/$p1Ratio)*(m*m)*$maxTDP);" | bc | sed -e 's/.[0-9A-F]*$//') + let powerRatio-=1 + else + power=$maxTDP + fi - printf "0x0A, 0x0A, 0x%02X00, 0x%02X00 }" $ratio $ratio >> $ssdtPR + if [ $frequency -ge $gBaseFrequency ]; + then + printf "0x%06X, " $power >> $gSsdtPR + else + printf ' Zero, ' >> $gSsdtPR + fi - let frequency-=100 + printf "0x0A, 0x0A, 0x%02X00, 0x%02X00 }" $ratio $ratio >> $gSsdtPR - if [ $frequency -ge $lowestFrequency ]; - then - echo ',' >> $ssdtPR - else - echo '' >> $ssdtPR - fi - done + let ratio-=1 + let frequency-=100 - echo ' })' >> $ssdtPR + if [ $ratio -ge $minRatio ]; + then + echo ',' >> $gSsdtPR + else + echo '' >> $gSsdtPR + fi + + done + + echo ' })' >> $gSsdtPR + echo '' >> $gSsdtPR } #-------------------------------------------------------------------------------- -function _printIvybridgeMethods() +function _printMethodDSM() { # # New stand-alone version of Method _DSM - Copyright (c) 2009 by Master Chief # - echo '' >> $ssdtPR - echo ' Method (_DSM, 4, NotSerialized)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' If (LEqual (Arg2, Zero))' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Return (Buffer (One)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' 0x03' >> $ssdtPR - echo ' })' >> $ssdtPR - echo ' }' >> $ssdtPR - echo '' >> $ssdtPR - echo ' Return (Package (0x02)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' "plugin-type",' >> $ssdtPR - echo ' One' >> $ssdtPR - echo ' })' >> $ssdtPR - echo ' }' >> $ssdtPR - echo ' }' >> $ssdtPR + echo '' >> $gSsdtPR + echo ' Method (_DSM, 4, NotSerialized)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' If (LEqual (Arg2, Zero))' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Return (Buffer (One)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' 0x03' >> $gSsdtPR + echo ' })' >> $gSsdtPR + echo ' }' >> $gSsdtPR + echo '' >> $gSsdtPR + # + # This property is required to get X86Platform[Plugin/Shim].kext loaded. + # + echo ' Return (Package (0x02)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' "plugin-type",' >> $gSsdtPR + echo ' One' >> $gSsdtPR + echo ' })' >> $gSsdtPR + echo ' }' >> $gSsdtPR + echo ' }' >> $gSsdtPR } #-------------------------------------------------------------------------------- -function _printCSTScope() +function _printScopeACST() { let C1=0 let C2=0 @@ -382,9 +485,9 @@ function _printCSTScope() local pkgLength=2 local numberOfCStates=0 - echo '' >> $ssdtPR - echo ' Method (ACST, 0, NotSerialized)' >> $ssdtPR - echo ' {' >> $ssdtPR +# echo '' >> $gSsdtPR + echo ' Method (ACST, 0, NotSerialized)' >> $gSsdtPR + echo ' {' >> $gSsdtPR # # Are we injecting C-States for CPU1? @@ -396,16 +499,31 @@ function _printCSTScope() latency_C1=0x03E8 latency_C2=0x94 latency_C3=0xA9 - echo ' Store ("CPU1 C-States : '$gACST_CPU1'", Debug)' >> $ssdtPR + if ((gDebug)); then + echo ' Store ("CPU1 C-States : '$targetCStates'", Debug)' >> $gSsdtPR + echo '' >> $gSsdtPR + fi else - # No (only used by CPU0). + # + # C-States override for Mobile processors (CPU0 only) + # + if (($gTypeCPU == $gMobileCPU)); + then + echo 'Adjusting C-States for detected (mobile) processor' + gACST_CPU0=29 + fi + let targetCStates=$gACST_CPU0 latency_C1=Zero latency_C3=0xCD latency_C6=0xF5 latency_C7=0xF5 - echo ' Store ("CPU0 C-States : '$gACST_CPU0'", Debug)' >> $ssdtPR + + if ((gDebug)); then + echo ' Store ("CPU0 C-States : '$targetCStates'", Debug)' >> $gSsdtPR + echo '' >> $gSsdtPR + fi fi # @@ -443,84 +561,84 @@ function _printCSTScope() let hintCode=0x00 - echo '' >> $ssdtPR - printf " Return (Package (0x%02x)\n" $pkgLength >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' One,' >> $ssdtPR - printf " 0x%02x,\n" $numberOfCStates >> $ssdtPR - echo ' Package (0x04)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' ResourceTemplate ()' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Register (FFixedHW,' >> $ssdtPR - echo ' 0x01, // Bit Width' >> $ssdtPR - echo ' 0x02, // Bit Offset' >> $ssdtPR - printf " 0x%016x, // Address\n" $hintCode >> $ssdtPR - echo ' 0x01, // Access Size' >> $ssdtPR - echo ' )' >> $ssdtPR - echo ' },' >> $ssdtPR - echo ' One,' >> $ssdtPR - echo ' '$latency_C1',' >> $ssdtPR - echo ' 0x03E8' >> $ssdtPR + echo ' /* Low Power Modes for '$gProcLabel$1' */' >> $gSsdtPR + printf " Return (Package (0x%02x)\n" $pkgLength >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' One,' >> $gSsdtPR + printf " 0x%02x,\n" $numberOfCStates >> $gSsdtPR + echo ' Package (0x04)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' ResourceTemplate ()' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Register (FFixedHW,' >> $gSsdtPR + echo ' 0x01, // Bit Width' >> $gSsdtPR + echo ' 0x02, // Bit Offset' >> $gSsdtPR + printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR + echo ' 0x01, // Access Size' >> $gSsdtPR + echo ' )' >> $gSsdtPR + echo ' },' >> $gSsdtPR + echo ' One,' >> $gSsdtPR + echo ' '$latency_C1',' >> $gSsdtPR + echo ' 0x03E8' >> $gSsdtPR if (($C2)); then let hintCode+=0x10 - echo ' },' >> $ssdtPR - echo '' >> $ssdtPR - echo ' Package (0x04)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' ResourceTemplate ()' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Register (FFixedHW,' >> $ssdtPR - echo ' 0x01, // Bit Width' >> $ssdtPR - echo ' 0x02, // Bit Offset' >> $ssdtPR - printf " 0x%016x, // Address\n" $hintCode >> $ssdtPR - echo ' 0x03, // Access Size' >> $ssdtPR - echo ' )' >> $ssdtPR - echo ' },' >> $ssdtPR - echo ' 0x02,' >> $ssdtPR - echo ' '$latency_C2',' >> $ssdtPR - echo ' 0x01F4' >> $ssdtPR + echo ' },' >> $gSsdtPR + echo '' >> $gSsdtPR + echo ' Package (0x04)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' ResourceTemplate ()' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Register (FFixedHW,' >> $gSsdtPR + echo ' 0x01, // Bit Width' >> $gSsdtPR + echo ' 0x02, // Bit Offset' >> $gSsdtPR + printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR + echo ' 0x03, // Access Size' >> $gSsdtPR + echo ' )' >> $gSsdtPR + echo ' },' >> $gSsdtPR + echo ' 0x02,' >> $gSsdtPR + echo ' '$latency_C2',' >> $gSsdtPR + echo ' 0x01F4' >> $gSsdtPR fi if (($C3)); then let hintCode+=0x10 - echo ' },' >> $ssdtPR - echo '' >> $ssdtPR - echo ' Package (0x04)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' ResourceTemplate ()' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Register (FFixedHW,' >> $ssdtPR - echo ' 0x01, // Bit Width' >> $ssdtPR - echo ' 0x02, // Bit Offset' >> $ssdtPR - printf " 0x%016x, // Address\n" $hintCode >> $ssdtPR - echo ' 0x03, // Access Size' >> $ssdtPR - echo ' )' >> $ssdtPR - echo ' },' >> $ssdtPR - echo ' 0x03,' >> $ssdtPR - echo ' '$latency_C3',' >> $ssdtPR - echo ' 0x01F4' >> $ssdtPR + echo ' },' >> $gSsdtPR + echo '' >> $gSsdtPR + echo ' Package (0x04)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' ResourceTemplate ()' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Register (FFixedHW,' >> $gSsdtPR + echo ' 0x01, // Bit Width' >> $gSsdtPR + echo ' 0x02, // Bit Offset' >> $gSsdtPR + printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR + echo ' 0x03, // Access Size' >> $gSsdtPR + echo ' )' >> $gSsdtPR + echo ' },' >> $gSsdtPR + echo ' 0x03,' >> $gSsdtPR + echo ' '$latency_C3',' >> $gSsdtPR + echo ' 0x01F4' >> $gSsdtPR fi if (($C6)); then let hintCode+=0x10 - echo ' },' >> $ssdtPR - echo '' >> $ssdtPR - echo ' Package (0x04)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' ResourceTemplate ()' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Register (FFixedHW,' >> $ssdtPR - echo ' 0x01, // Bit Width' >> $ssdtPR - echo ' 0x02, // Bit Offset' >> $ssdtPR - printf " 0x%016x, // Address\n" $hintCode >> $ssdtPR - echo ' 0x03, // Access Size' >> $ssdtPR - echo ' )' >> $ssdtPR - echo ' },' >> $ssdtPR - echo ' 0x06,' >> $ssdtPR - echo ' '$latency_C6',' >> $ssdtPR - echo ' 0x015E' >> $ssdtPR + echo ' },' >> $gSsdtPR + echo '' >> $gSsdtPR + echo ' Package (0x04)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' ResourceTemplate ()' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Register (FFixedHW,' >> $gSsdtPR + echo ' 0x01, // Bit Width' >> $gSsdtPR + echo ' 0x02, // Bit Offset' >> $gSsdtPR + printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR + echo ' 0x03, // Access Size' >> $gSsdtPR + echo ' )' >> $gSsdtPR + echo ' },' >> $gSsdtPR + echo ' 0x06,' >> $gSsdtPR + echo ' '$latency_C6',' >> $gSsdtPR + echo ' 0x015E' >> $gSsdtPR fi if (($C7)); then @@ -533,75 +651,69 @@ function _printCSTScope() else let hintCode+=0x10 fi - echo ' },' >> $ssdtPR - echo '' >> $ssdtPR - echo ' Package (0x04)' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' ResourceTemplate ()' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Register (FFixedHW,' >> $ssdtPR - echo ' 0x01, // Bit Width' >> $ssdtPR - echo ' 0x02, // Bit Offset' >> $ssdtPR - printf " 0x%016x, // Address\n" $hintCode >> $ssdtPR - echo ' 0x03, // Access Size' >> $ssdtPR - echo ' )' >> $ssdtPR - echo ' },' >> $ssdtPR - echo ' 0x07,' >> $ssdtPR - echo ' '$latency_C7',' >> $ssdtPR - echo ' 0xC8' >> $ssdtPR + echo ' },' >> $gSsdtPR + echo '' >> $gSsdtPR + echo ' Package (0x04)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' ResourceTemplate ()' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Register (FFixedHW,' >> $gSsdtPR + echo ' 0x01, // Bit Width' >> $gSsdtPR + echo ' 0x02, // Bit Offset' >> $gSsdtPR + printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR + echo ' 0x03, // Access Size' >> $gSsdtPR + echo ' )' >> $gSsdtPR + echo ' },' >> $gSsdtPR + echo ' 0x07,' >> $gSsdtPR + echo ' '$latency_C7',' >> $gSsdtPR + echo ' 0xC8' >> $gSsdtPR fi - echo ' }' >> $ssdtPR - echo ' })' >> $ssdtPR - echo ' }' >> $ssdtPR - - if [ $1 -eq 1 ]; - then - gACST_CPU1=$numberOfCStates - else - gACST_CPU0=$numberOfCStates - fi + echo ' }' >> $gSsdtPR + echo ' })' >> $gSsdtPR + echo ' }' >> $gSsdtPR # - # We don't want a closing bracket here when we add methods for Ivy Bridge. + # We don't need a closing bracket here when we add method _DSM for Ivy Bridge. # - if [ $bridgeType -eq $SANDY_BRIDGE ]; then - echo ' }' >> $ssdtPR - fi + if [ $gBridgeType -eq $SANDY_BRIDGE ]; then + echo ' }' >> $gSsdtPR + fi } + #-------------------------------------------------------------------------------- -function _printCPUScopes() +function _printScopeCPUn() { - currentCPU=1; + let currentCPU=1; while [ $currentCPU -lt $1 ]; do - echo '' >> $ssdtPR - echo ' Scope (\_PR.'$gProcLabel$currentCPU')' >> $ssdtPR - echo ' {' >> $ssdtPR - echo ' Method (APSS, 0, NotSerialized) { Return (\_PR.'$gProcLabel'0.APSS) }' >> $ssdtPR + echo '' >> $gSsdtPR + echo ' Scope (\_PR.'$gProcLabel$currentCPU')' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Method (APSS, 0, NotSerialized) { Return (\_PR.'$gProcLabel'0.APSS) }' >> $gSsdtPR # - # IB CPUPM tries to parse/execute Method ACST (see debug data) and thus we add + # IB CPUPM tries to parse/execute CPUn.ACST (see debug data) and thus we add # this method, conditionally, since SB CPUPM doesn't seem to care about it. # - if [ $bridgeType -eq $IVY_BRIDGE ] + if [ $gBridgeType -eq $IVY_BRIDGE ] then if [ $currentCPU -eq 1 ]; then - _printCSTScope 1 + _printScopeACST 1 else - echo ' Method (ACST, 0, NotSerialized) { Return (\_PR.'$gProcLabel'1.ACST ()) }' >> $ssdtPR + echo ' Method (ACST, 0, NotSerialized) { Return (\_PR.'$gProcLabel'1.ACST ()) }' >> $gSsdtPR fi fi - echo ' }' >> $ssdtPR + echo ' }' >> $gSsdtPR let currentCPU+=1 done - echo '}' >> $ssdtPR + echo '}' >> $gSsdtPR } #-------------------------------------------------------------------------------- @@ -655,6 +767,8 @@ function _getSystemType() # # Grab 'system-type' property from ioreg (stripped with sed / RegEX magic). # + # Note: This property is checked (cmpb $0x02) in X86PlatformPlugin::configResourceCallback + # echo `ioreg -p IODeviceTree -d 2 -k system-type | grep system-type | sed -e 's/ *[-="<0a-z>]//g'` } @@ -678,55 +792,102 @@ function _getCPUNumberFromBrandString # Split brandstring into array (data) # local data=($brandString) + # + # Example from a MacBookPro10,2 + # # echo "${data[0]}" # Intel(R) # echo "${data[1]}" # Core(TM) - # echo "${data[2]}" # i5-2500K + # echo "${data[2]}" # i5-3210M # echo "${data[3]}" # CPU # echo "${data[4]}" # @ - # echo "${data[5]}" # 3.30GHz + # echo "${data[5]}" # 2.50GHz # # Restore the default delimiter # IFS=$ifs - processorNumber="${data[2]}" - # processorNumber="i7-3740QM" + gProcessorNumber="${data[2]}" } #-------------------------------------------------------------------------------- function _getCPUDataByProcessorNumber { - local ifs=$IFS - - for cpuData in "${desktopIvyBridgeCPUList[@]}"; - do - IFS="," - data=($cpuData) - - if [ ${data[0]} == $processorNumber ]; then - processorData="$cpuData" - typeCPU=1 - IFS=$ifs - return - fi - done - - if [ $processorData == "Unknown CPU" ]; then - IFS=$ifs + # + # Local function definition + # + function __searchList() + { + local ifs=$IFS + local targetCPUList=("${!1}") - for cpuData in ${mobileIvyBridgeCPUList[@]}; + for cpuData in ${targetCPUList[@]} do IFS="," data=($cpuData) - if [ ${data[0]} == $processorNumber ]; then - processorData="$cpuData" - typeCPU=2 + if [[ ${data[0]} == $gProcessorNumber ]]; then + gProcessorData="$cpuData" + let gTypeCPU=$2 IFS=$ifs return fi done + + IFS=$ifs + } + + # + # Local function callers (passing array and cpu type) + # + __searchList gDesktopIvyBridgeCPUList[@] $gDesktopCPU + + if (!(($gTypeCPU))); then + __searchList gMobileIvyBridgeCPUList[@] $gMobileCPU + fi + + if (!(($gTypeCPU))); then + __searchList gServerIvyBridgeCPUList[@] $gServerCPU + fi +} + +#-------------------------------------------------------------------------------- + +function _showLowPowerStates() +{ + # + # Local function definition + # + function __print() + { + local mask=1 + local cStates=$1 + + printf "Injected C-States for ${gProcLabel}${2} (" + + for state in C1 C2 C3 C6 C7 + do + if (($cStates & $mask)); then + if (($mask > 1)); then + printf "," + fi + + printf "$state" + fi + + let mask=$(($mask << 1)) + done + + echo ')' + } + + # + # Local function callers + # + __print $gACST_CPU0 0 + + if ((gBridgeType == $IVY_BRIDGE)); then + __print $gACST_CPU1 1 fi } @@ -734,27 +895,28 @@ function _getCPUDataByProcessorNumber function _checkSMCKeys() { - # - # TODO: Check SMC keys to see if they are there and properly initialized! - # - # Note: Do <i>not</i> dump SMC keys with HWSensors/iStat or other SMC plug-ins installed! - # - local filename="/System/Library/Extensions/FakeSMC.kext/Contents/Info.plist" - local data=`grep -so '<key>[a-zA-Z]*</key>' $filename | sed -e 's/<key>//' -e 's/<\/key>//g'` + # + # TODO: Check SMC keys to see if they are there and properly initialized! + # + # Note: Do <i>not</i> dump SMC keys with HWSensors/iStat or other SMC plug-ins installed! + # + local filename="/System/Library/Extensions/FakeSMC.kext/Contents/Info.plist" + local data=`grep -so '<key>[a-zA-Z]*</key>' $filename | sed -e 's/<key>//' -e 's/<\/key>//g'` - local status=`echo $data | grep -oe 'DPLM'` + local status=`echo $data | grep -oe 'DPLM'` - if [ $status == 'XPLM' ]; then - # DPLM [{lim] (bytes 00 00 00 00 00) - echo "SMC key 'DPLM' found (OK)" - fi + if [ $status == 'DPLM' ]; then + # DPLM [{lim] (bytes 00 00 00 00 00) + # CPU, Idle, IGPU, EGPU and Memory P-State limits + echo "SMC key 'DPLM' found (OK)" + fi set -x - local status=`echo $data | grep -oe 'MSAL'` + local status=`echo $data | grep -oe 'MSAL'` - if [ $status == 'MSAL' ]; then - # MSAL [hex_] (bytes 4b) - echo "SMC key 'MSAL' found (OK)" - fi + if [ $status == 'MSAL' ]; then + # MSAL [hex_] (bytes 4b) + echo "SMC key 'MSAL' found (OK)" + fi } #-------------------------------------------------------------------------------- @@ -763,71 +925,71 @@ function _initSandyBridgeSetup() { case $boardID in Mac-942B59F58194171B) - systemType=1 - macModelIdentifier="iMac12,1" + gSystemType=1 + gMacModelIdentifier="iMac12,1" gACST_CPU0=13 # C1, C3 and C6 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-942B5BF58194151B) - systemType=1 - macModelIdentifier="iMac12,2" + gSystemType=1 + gMacModelIdentifier="iMac12,2" gACST_CPU0=13 # C1, C3 and C6 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-8ED6AF5B48C039E1) - systemType=1 - macModelIdentifier="Macmini5,1" + gSystemType=1 + gMacModelIdentifier="Macmini5,1" gACST_CPU0=13 # C1, C3 and C6 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-4BC72D62AD45599E) - systemType=1 - macModelIdentifier="Macmini5,2" + gSystemType=1 + gMacModelIdentifier="Macmini5,2" gACST_CPU0=13 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-7BA5B2794B2CDB12) - systemType=1 - macModelIdentifier="Macmini5,3" + gSystemType=1 + gMacModelIdentifier="Macmini5,3" gACST_CPU0=13 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-94245B3640C91C81) - systemType=2 - macModelIdentifier="MacBookPro8,1" + gSystemType=2 + gMacModelIdentifier="MacBookPro8,1" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-94245A3940C91C80) - systemType=2 - macModelIdentifier="MacBookPro8,2" + gSystemType=2 + gMacModelIdentifier="MacBookPro8,2" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-942459F5819B171B) - systemType=2 - macModelIdentifier="MacBookPro8,3" + gSystemType=2 + gMacModelIdentifier="MacBookPro8,3" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-C08A6BB70A942AC2) - systemType=2 - macModelIdentifier="MacBookAir4,1" + gSystemType=2 + gMacModelIdentifier="MacBookAir4,1" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-742912EFDBEE19B3) - systemType=2 - macModelIdentifier="MacBookAir4,2" + gSystemType=2 + gMacModelIdentifier="MacBookAir4,2" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; @@ -840,71 +1002,71 @@ function _initIvyBridgeSetup() { case $boardID in Mac-00BE6ED71E35EB86) - systemType=1 - macModelIdentifier="iMac13,1" + gSystemType=1 + gMacModelIdentifier="iMac13,1" gACST_CPU0=13 # C1, C3 and C6 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-FC02E91DDD3FA6A4) - systemType=1 - macModelIdentifier="iMac13,2" + gSystemType=1 + gMacModelIdentifier="iMac13,2" gACST_CPU0=13 # C1, C3 and C6 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-031AEE4D24BFF0B1) - systemType=1 - macModelIdentifier="Macmini6,1" + gSystemType=1 + gMacModelIdentifier="Macmini6,1" gACST_CPU0=13 # C1, C3 and C6 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-F65AE981FFA204ED) - systemType=1 - macModelIdentifier="Macmini6,2" + gSystemType=1 + gMacModelIdentifier="Macmini6,2" gACST_CPU0=13 # C1, C3 and C6 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-4B7AC7E43945597E) - systemType=2 - macModelIdentifier="MacBookPro9,1" + gSystemType=2 + gMacModelIdentifier="MacBookPro9,1" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-6F01561E16C75D06) - systemType=2 - macModelIdentifier="MacBookPro9,2" + gSystemType=2 + gMacModelIdentifier="MacBookPro9,2" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-C3EC7CD22292981F) - systemType=2 - macModelIdentifier="MacBookPro10,1" + gSystemType=2 + gMacModelIdentifier="MacBookPro10,1" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-AFD8A9D944EA4843) - systemType=2 - macModelIdentifier="MacBookPro10,2" + gSystemType=2 + gMacModelIdentifier="MacBookPro10,2" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-66F35F19FE2A0D05) - systemType=2 - macModelIdentifier="MacBookAir5,1" + gSystemType=2 + gMacModelIdentifier="MacBookAir5,1" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-2E6FAB96566FE58C) - systemType=2 - macModelIdentifier="MacBookAir5,2" + gSystemType=2 + gMacModelIdentifier="MacBookAir5,2" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; @@ -919,36 +1081,44 @@ function _initIvyBridgeSetup() function _isRoot() { - if [ $(id -u) != 0 ]; then - echo "This script must be run as root" 1>&2 - exit 1 - fi + if [ $(id -u) != 0 ]; then + echo "This script must be run as root" 1>&2 + exit 1 + fi - echo 1 + echo 1 } - #-------------------------------------------------------------------------------- function main() { - echo '' + printf "\nsdtPRGen.sh v$gScriptVersion Copyright (c) 2013 by Pike R. Alpha\n" + echo '-----------------------------------------------------' - # - # Get installed CPU model, set bridge type and default TDP. - # - local model=$(_getCPUModel) + let modelSpecified=0 - _getCPUNumberFromBrandString + if (((${1:0:1} == "i") || (${1:0:1} == "E"))); + then + let model=0x3A + let modelSpecified=1 + gProcessorNumber=$1 + else + # + # Get installed CPU model, set bridge type and default TDP. + # + local model=$(_getCPUModel) + _getCPUNumberFromBrandString + fi if (($model==0x2A || $model==0x2D)); then - let tdp=95 - let bridgeType=2 + let gTdp=95 + let gBridgeType=2 local bridgeTypeString="Sandy Bridge" else - let tdp=77 - let bridgeType=4 + let gTdp=77 + let gBridgeType=4 local bridgeTypeString="Ivy Bridge" if (($model==0x3A || $model==0x3B)); then @@ -956,49 +1126,70 @@ function main() fi fi - echo "$bridgeTypeString Core $processorNumber processor detected" - - if (($typeCPU)); then - local ifs=$IFS - IFS="," - local cpuData=($processorData) - let tdp=${cpuData[1]} - IFS=$ifs - fi + echo "$bridgeTypeString Core $gProcessorNumber processor installed" # - # Command line (override) arguments. + # gTypeCPU is greater than 0 when the processor is found in one of the CPU lists # - - let maxTurboFrequency=$1 - - if [ $# -ge 2 ]; + if (($gTypeCPU)); then - let tdp=$2 - echo "Max TDP override, now using: $tdp Watt" + local ifs=$IFS + IFS="," + local cpuData=($gProcessorData) + let gTdp=${cpuData[1]} + let lfm=${cpuData[2]} + let frequency=${cpuData[3]} + let maxTurboFrequency=${cpuData[4]} + let logicalCPUs=${cpuData[6]} + IFS=$ifs + + echo 'Using a maximum TDP of '$gTdp' Watt, as specified by Intel' + + # + # Check Low Frequency Mode (may be 0 aka still unknown) + # + if (($lfm == 0)); then + echo 'Warning: Low Frequency Mode is 0 (unknown)' + + if (($gTypeCPU == gMobileCPU)); + then + echo 'Now using 1200 MHz for Mobile processor' + let gBaseFrequency=1200 + else + echo 'Now using 1600 MHz for Server/Desktop processor' + let gBaseFrequency=1600 + fi + fi else - echo "Using the default max TDP of: $tdp Watt" + let logicalCPUs=$(echo `sysctl machdep.cpu.thread_count` | sed -e 's/^machdep.cpu.thread_count: //') + let frequency=$(echo `sysctl hw.cpufrequency` | sed -e 's/^hw.cpufrequency: //') + let frequency=($frequency / 1000000) fi - if [ $# -eq 3 ]; then - if [ $3 -eq 0 ]; - then - let bridgeType=2 - echo "CPU type override, now using: Sandy Bridge" - else - let bridgeType=4 - echo "CPU type override, now using: Ivy Bridge" - fi - fi + if (!(($modelSpecified))); then + # + # Command line arguments (used as override values). + # + if [ $# -ge 1 ]; then + let maxTurboFrequency=$1 + fi - # - # Do not change anything below this line! - # + if [ $# -ge 2 ]; then + let gTdp=$2 + echo "Max TDP override, now using: $gTdp Watt" + fi - #let logicalCPUs=$(echo `sysctl hw.logicalcpu` | sed -e 's/^hw.logicalcpu: //') - local logicalCPUs=$(echo `sysctl machdep.cpu.thread_count` | sed -e 's/^machdep.cpu.thread_count: //') - let frequency=$(echo `sysctl hw.cpufrequency` | sed -e 's/^hw.cpufrequency: //') - let frequency=($frequency / 1000000) + if [ $# -eq 3 ]; then + if [ $3 -eq 0 ]; + then + let gBridgeType=2 + echo "CPU type override, now using: Sandy Bridge" + else + let gBridgeType=4 + echo "CPU type override, now using: Ivy Bridge" + fi + fi + fi echo "$logicalCPUs logical CPU's detected with a Core Frequency of $frequency MHz" @@ -1016,75 +1207,81 @@ function main() let turboStates=0 fi - let minTurboFrequency=($frequency+100) + let minTurboFrequency=($frequency+100) echo "Number of Turbo States: $turboStates ($minTurboFrequency-$maxTurboFrequency MHz)" - local packageLength=$(echo "((($maxTurboFrequency - $baseFrequency)+100) / 100)" | bc) + local packageLength=$(echo "((($maxTurboFrequency - $gBaseFrequency)+100) / 100)" | bc) - echo "Number of P-States: $packageLength ($baseFrequency-$maxTurboFrequency)" + echo "Number of P-States: $packageLength ($gBaseFrequency-$maxTurboFrequency MHz)" _printHeader _printExternals $logicalCPUs - _printDebugInfo $logicalCPUs $tdp $packageLength $turboStates $maxTurboFrequency + _printDebugInfo $logicalCPUs $gTdp $packageLength $turboStates $maxTurboFrequency _printScopeStart $turboStates $packageLength - _printPackages $tdp $frequency $maxTurboFrequency + _printPackages $gTdp $frequency $maxTurboFrequency _getBoardID local modelID=$(_getModelName) - local typeCPU=$(_getCPUtype) + + local cpu_type=$(_getCPUtype) local currentSystemType=$(_getSystemType) - if [ $bridgeType -eq $IVY_BRIDGE ]; + if [ $gBridgeType -eq $IVY_BRIDGE ]; then - local cpuTypeString="04" + local cpuTypeString="07" _initIvyBridgeSetup - _printCSTScope 0 - _printIvybridgeMethods - _printCPUScopes $logicalCPUs + _printScopeACST 0 + _printMethodDSM + _printScopeCPUn $logicalCPUs else - local cpuTypeString="04" + local cpuTypeString="06" _initSandyBridgeSetup - _printCSTScope 0 - _printCPUScopes $logicalCPUs + _printScopeACST 0 + _printScopeCPUn $logicalCPUs fi - printf "Number of C-States for "$gProcLabel"0: $gACST_CPU0\n" - printf "Number of C-States for "$gProcLabel"1: $gACST_CPU1\n" + _showLowPowerStates - if [ ${typeCPU:2:2} -ne $cpuTypeString ]; then - echo "Warning: cpu-type may be set improperly (0x$typeCPU instead of 0x${typeCPU:0:2}$cpuTypeString)" + if [ ${cpu_type:2:2} -ne $cpuTypeString ]; then + echo "Warning: 'cpu-type' may be set improperly (0x$cpu_type instead of 0x$cpuTypeString${cpu_type:2:2})" fi - if [ $systemType -eq 0 ]; + if [ $gSystemType -eq 0 ]; then - echo "Warning: board-id [$boardID] is not supported by $bridgeTypeString PM" + echo "Warning: 'board-id' [$boardID] is not supported by $bridgeTypeString PM" else - if [ "$macModelIdentifier" != "$modelID" ]; then + if [ "$gMacModelIdentifier" != "$modelID" ]; then echo "Error: board-id [$boardID] and model [$modelID] mismatch" fi - if [ $currentSystemType -ne $systemType ]; then - echo "Warning: system-type may be set improperly ($currentSystemType instead of $systemType)" + if [ $currentSystemType -ne $gSystemType ]; then + echo "Warning: 'system-type' may be set improperly ($currentSystemType instead of $gSystemType)" fi fi } #==================================== START ===================================== - + # # Check number of arguments. # -if [ $# -gt 0 ]; +if [ $# -ge 0 ]; then main $1 $2 $3 - iasl $ssdtPR - open $ssdtPR + + if ((gCallIasl)); then + iasl $gSsdtPR + fi + + if ((gCallOpen)); then + open $gSsdtPR + fi else echo "Usage: $0 MaxTurboFrequency [TDP (Watts) CPU (0=SandyBridge, 1=IvyBridge)]" exit 1 From 912079e5ad6c53da50d28d6381fe74a37ff2cfa5 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sun, 10 Feb 2013 13:44:53 +0100 Subject: [PATCH 265/623] Helping Jeroen to get things sorted Thanks to Francis for pointing out the E2 differences. --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 73 ++++++++++++++-------------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 3d35470..88507fb 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 3.0 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 3.1 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -74,7 +74,7 @@ gProcLabel="CPU" # Global variables. # -gScriptVersion=3.0 +gScriptVersion=3.1 # # Path and filename setup. @@ -106,38 +106,38 @@ gProcessorNumber="" # Processor Number, Max TDP, Low Frequency Mode, Clock Speed, Max Turbo Frequency, Cores, Threads # -gServerIvyBridgeCPUList=( +gServerSandyBridgeCPUList=( # E3-1200 Xeon Processor Series -E3-1290v2,87,0,3700,4100,4,8 E3-1290,95,0,3600,4000,4,8 -E3-1285v2,65,0,3600,4000, -E3-1285Lv2,0,0,3200,3900, -E3-1280v2,69,0,3600,4000,4,8 E3-1280,95,0,3500,3900,4,8 -E3-1275v2,77,0,3500,3900,4,8 E3-1275,95,0,3400,3800,4,8 -E3-1270v2,69,0,3500,3900,4,8 E3-1270,80,0,3400,3800,4,8 -E3-1265Lv2,45,0,2500,3500,4,8 E3-1260L,45,0,2400,3300,4,8 -E3-1245v2,77,0,3400,3800,4,8 E3-1245,95,0,3300,3700,4,8 -E3-1240v2,69,0,3400,3800,4,8 E3-1240,80,0,3300,3700,4,8 E3-1235,95,0,3200,3600,4,8 -E3-1230v2,69,0,3300,3700,4,8 E3-1230,80,0,3200,3600,4,8 -E3-1225v2,77,0,3200,3600,4,4 E3-1225,95,0,3100,3400,4,4 -E3-1220v2,69,0,3100,3500,4,4 -E3-1220Lv2,80,0,3100,3400,4,4 E3-1220L,20,0,2200,3400,2,4 -E3-1220Lv2,17,0,2300,3500,2,4 +E3-1220,80,0,3100,3400,4,4 ) -# -# Processor Number, Max TDP, Low Frequency Mode, Clock Speed, Max Turbo Frequency, Cores, Threads -# +gServerIvyBridgeCPUList=( +# E3-1200 Xeon Processor Series +E3-1290 V2,87,0,3700,4100,4,8 +E3-1285 V2,65,0,3600,4000, +E3-1285L V2,0,0,3200,3900, +E3-1280 V2,69,0,3600,4000,4,8 +E3-1275 V2,77,0,3500,3900,4,8 +E3-1270 V2,69,0,3500,3900,4,8 +E3-1265L V2,45,0,2500,3500,4,8 +E3-1245 V2,77,0,3400,3800,4,8 +E3-1240 V2,69,0,3400,3800,4,8 +E3-1230 V2,69,0,3300,3700,4,8 +E3-1225 V2,77,0,3200,3600,4,4 +E3-1220 V2,69,0,3100,3500,4,4 +E3-1220L V2,17,0,2300,3500,2,4 +) gDesktopIvyBridgeCPUList=( # i7-3700 Desktop Processor Series @@ -174,10 +174,6 @@ i3-3220T,35,1600,2800,0,2,4 i3-3210,55,1600,3200,0,2,4 ) -# -# Processor Number, Max TDP, Low Frequency Mode, Clock Speed, Max Turbo Frequency, Cores, Threads -# - gMobileIvyBridgeCPUList=( # i7-3800 Mobile Processor Series i7-3840QM,45,1200,2800,3800,4,8 @@ -801,6 +797,11 @@ function _getCPUNumberFromBrandString # echo "${data[3]}" # CPU # echo "${data[4]}" # @ # echo "${data[5]}" # 2.50GHz + + if ((${#data[@]} == 7)); then + echo "TODO: Jeroen, look at what Francis said about V2 and fix this a.s.a.p!" + fi + # # Restore the default delimiter # @@ -1096,19 +1097,19 @@ function main() printf "\nsdtPRGen.sh v$gScriptVersion Copyright (c) 2013 by Pike R. Alpha\n" echo '-----------------------------------------------------' + # + # Get installed CPU model, set bridge type and default TDP. + # let modelSpecified=0 + local model=$(_getCPUModel) + _getCPUNumberFromBrandString - if (((${1:0:1} == "i") || (${1:0:1} == "E"))); - then + if [[ $# -eq 1 ]]; then + if (((${1:0:1} == "i") || (${1:0:1} == "E"))); then let model=0x3A let modelSpecified=1 gProcessorNumber=$1 - else - # - # Get installed CPU model, set bridge type and default TDP. - # - local model=$(_getCPUModel) - _getCPUNumberFromBrandString + fi fi if (($model==0x2A || $model==0x2D)); @@ -1135,10 +1136,10 @@ function main() then local ifs=$IFS IFS="," - local cpuData=($gProcessorData) - let gTdp=${cpuData[1]} - let lfm=${cpuData[2]} - let frequency=${cpuData[3]} + local cpuData=($gProcessorData) + let gTdp=${cpuData[1]} + let lfm=${cpuData[2]} + let frequency=${cpuData[3]} let maxTurboFrequency=${cpuData[4]} let logicalCPUs=${cpuData[6]} IFS=$ifs From 4b9cad2052b9b53d0b96b48209a5a6049e43a3b0 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sun, 10 Feb 2013 13:47:21 +0100 Subject: [PATCH 266/623] Adding example for Jeroen --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 88507fb..ef43f2d 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -798,6 +798,15 @@ function _getCPUNumberFromBrandString # echo "${data[4]}" # @ # echo "${data[5]}" # 2.50GHz + # or: + # echo "${data[0]}" # Intel(R) + # echo "${data[1]}" # Core(TM) + # echo "${data[2]}" # CPU + # echo "${data[3]}" # E3-12XX + # echo "${data[4]}" # V2 + # echo "${data[5]}" # @ + # echo "${data[6]}" # 3.30GHz + if ((${#data[@]} == 7)); then echo "TODO: Jeroen, look at what Francis said about V2 and fix this a.s.a.p!" fi From ed89e041fa192778eeb3b6c0b141ad6dd5dd2a53 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sun, 10 Feb 2013 19:28:32 +0100 Subject: [PATCH 267/623] Bug fixes Thanks to Francis for his help with Xeon processor support! --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 136 ++++++++++++++++++--------- 1 file changed, 93 insertions(+), 43 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index ef43f2d..7353fe7 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 3.1 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 3.2 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -46,7 +46,7 @@ gDebug=0 # # A value of 1 will make this script call iasl (compiles SSDT_PR.dsl) # -gCallIasl=1 +gCallIasl=0 # # A value of 1 will make this script open SSDT_PR.dsl in the editor of your choice. @@ -74,7 +74,7 @@ gProcLabel="CPU" # Global variables. # -gScriptVersion=3.1 +gScriptVersion=3.2 # # Path and filename setup. @@ -106,7 +106,7 @@ gProcessorNumber="" # Processor Number, Max TDP, Low Frequency Mode, Clock Speed, Max Turbo Frequency, Cores, Threads # -gServerSandyBridgeCPUList=( +gSandyBridgeCPUList=( # E3-1200 Xeon Processor Series E3-1290,95,0,3600,4000,4,8 E3-1280,95,0,3500,3900,4,8 @@ -122,21 +122,25 @@ E3-1220L,20,0,2200,3400,2,4 E3-1220,80,0,3100,3400,4,4 ) +# +# Processor Number, Max TDP, Low Frequency Mode, Clock Speed, Max Turbo Frequency, Cores, Threads +# + gServerIvyBridgeCPUList=( # E3-1200 Xeon Processor Series -E3-1290 V2,87,0,3700,4100,4,8 -E3-1285 V2,65,0,3600,4000, -E3-1285L V2,0,0,3200,3900, -E3-1280 V2,69,0,3600,4000,4,8 -E3-1275 V2,77,0,3500,3900,4,8 -E3-1270 V2,69,0,3500,3900,4,8 -E3-1265L V2,45,0,2500,3500,4,8 -E3-1245 V2,77,0,3400,3800,4,8 -E3-1240 V2,69,0,3400,3800,4,8 -E3-1230 V2,69,0,3300,3700,4,8 -E3-1225 V2,77,0,3200,3600,4,4 -E3-1220 V2,69,0,3100,3500,4,4 -E3-1220L V2,17,0,2300,3500,2,4 +'E3-1290 V2',87,0,3700,4100,4,8 +'E3-1285 V2',65,0,3600,4000, +'E3-1285L V2',0,0,3200,3900, +'E3-1280 V2',69,0,3600,4000,4,8 +'E3-1275 V2',77,0,3500,3900,4,8 +'E3-1270 V2',69,0,3500,3900,4,8 +'E3-1265L V2',45,0,2500,3500,4,8 +'E3-1245 V2',77,0,3400,3800,4,8 +'E3-1240 V2',69,0,3400,3800,4,8 +'E3-1230 V2',69,0,3300,3700,4,8 +'E3-1225 V2',77,0,3200,3600,4,4 +'E3-1220 V2',69,0,3100,3500,4,4 +'E3-1220L V2',17,0,2300,3500,2,4 ) gDesktopIvyBridgeCPUList=( @@ -770,6 +774,19 @@ function _getSystemType() #-------------------------------------------------------------------------------- +function _findIasl() +{ + if ((gCallIasl)); then + iasl=`find /Applications -name iasl -print -quit` + + if [ $iasl == "" ]; then + gCallIasl=0 + fi + fi +} + +#-------------------------------------------------------------------------------- + function _getCPUNumberFromBrandString { # @@ -788,6 +805,8 @@ function _getCPUNumberFromBrandString # Split brandstring into array (data) # local data=($brandString) +# local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "V2" "@" "2.5GHz") +# local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "@" "2.5GHz") # # Example from a MacBookPro10,2 # @@ -797,26 +816,36 @@ function _getCPUNumberFromBrandString # echo "${data[3]}" # CPU # echo "${data[4]}" # @ # echo "${data[5]}" # 2.50GHz - - # or: + # + # or: "Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz" + # # echo "${data[0]}" # Intel(R) - # echo "${data[1]}" # Core(TM) + # echo "${data[1]}" # Xeon(R) # echo "${data[2]}" # CPU # echo "${data[3]}" # E3-12XX # echo "${data[4]}" # V2 # echo "${data[5]}" # @ # echo "${data[6]}" # 3.30GHz - if ((${#data[@]} == 7)); then - echo "TODO: Jeroen, look at what Francis said about V2 and fix this a.s.a.p!" - fi - # # Restore the default delimiter # IFS=$ifs - gProcessorNumber="${data[2]}" + let length=${#data[@]} + + if ((length > 6)); then + echo 'Warning: Unexpected brandstring > "'${data[@]}'"' + fi + + if [[ ${data[1]} == "Xeon(R)" && ${data[4]} == "V2" ]]; + then + gProcessorNumber="${data[3]} ${data[4]}" + else + gProcessorNumber="${data[2]}" + fi + +# echo $gProcessorNumber } #-------------------------------------------------------------------------------- @@ -831,7 +860,7 @@ function _getCPUDataByProcessorNumber local ifs=$IFS local targetCPUList=("${!1}") - for cpuData in ${targetCPUList[@]} + for cpuData in "${targetCPUList[@]}" do IFS="," data=($cpuData) @@ -857,8 +886,10 @@ function _getCPUDataByProcessorNumber fi if (!(($gTypeCPU))); then - __searchList gServerIvyBridgeCPUList[@] $gServerCPU + __searchList "gServerIvyBridgeCPUList[@]" $gServerCPU fi + +# echo "gTypeCPU is $gTypeCPU" } #-------------------------------------------------------------------------------- @@ -1106,18 +1137,28 @@ function main() printf "\nsdtPRGen.sh v$gScriptVersion Copyright (c) 2013 by Pike R. Alpha\n" echo '-----------------------------------------------------' + let modelSpecified=0 + let maxTurboFrequency=0 + # # Get installed CPU model, set bridge type and default TDP. # - let modelSpecified=0 local model=$(_getCPUModel) + _getCPUNumberFromBrandString if [[ $# -eq 1 ]]; then - if (((${1:0:1} == "i") || (${1:0:1} == "E"))); then - let model=0x3A - let modelSpecified=1 - gProcessorNumber=$1 + if [[ $1 == "" ]]; + then + if [[ $gProcessorNumber != 0 ]]; then + let model=0x3A + fi + else + if (( ("${1:0:4}" == "i3-3") || (${1:0:4} == "i5-3") || (${1:0:4} == "i7-3") || (${1:0:1} == "E") )); then + let model=0x3A + let modelSpecified=1 + gProcessorNumber=$1 + fi fi fi @@ -1127,7 +1168,7 @@ function main() let gBridgeType=2 local bridgeTypeString="Sandy Bridge" else - let gTdp=77 + let gTdp=77 let gBridgeType=4 local bridgeTypeString="Ivy Bridge" @@ -1145,10 +1186,10 @@ function main() then local ifs=$IFS IFS="," - local cpuData=($gProcessorData) - let gTdp=${cpuData[1]} - let lfm=${cpuData[2]} - let frequency=${cpuData[3]} + local cpuData=($gProcessorData) + let gTdp=${cpuData[1]} + let lfm=${cpuData[2]} + let frequency=${cpuData[3]} let maxTurboFrequency=${cpuData[4]} let logicalCPUs=${cpuData[6]} IFS=$ifs @@ -1180,7 +1221,7 @@ function main() # # Command line arguments (used as override values). # - if [ $# -ge 1 ]; then + if [[ $# -ge 1 && $1 != "" ]]; then let maxTurboFrequency=$1 fi @@ -1203,21 +1244,28 @@ function main() echo "$logicalCPUs logical CPU's detected with a Core Frequency of $frequency MHz" + # + # Check maxTurboFrequency + # + if [ $maxTurboFrequency == 0 ]; then + printf "\nError: Unknown processor number... exiting\n" + echo "Try: $0 MaxTurboFrequency [TDP (Watts) CPU (0=SandyBridge, 1=IvyBridge)]" + exit 1 + fi + # # Get number of Turbo states. # - let turboStates=$(echo "(($maxTurboFrequency - $frequency) / 100)" | bc) # # Check number of Turbo states. # - if [ $turboStates -lt 0 ]; then let turboStates=0 fi - let minTurboFrequency=($frequency+100) + let minTurboFrequency=($frequency+100) echo "Number of Turbo States: $turboStates ($minTurboFrequency-$maxTurboFrequency MHz)" local packageLength=$(echo "((($maxTurboFrequency - $gBaseFrequency)+100) / 100)" | bc) @@ -1283,10 +1331,12 @@ function main() if [ $# -ge 0 ]; then - main $1 $2 $3 + main "$1" $2 $3 + + _findIasl if ((gCallIasl)); then - iasl $gSsdtPR + $iasl $gSsdtPR fi if ((gCallOpen)); then From fcff422eedcc765eb41e9233a2aeb03af392c16b Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Mon, 11 Feb 2013 12:30:58 +0100 Subject: [PATCH 268/623] Updating script to v3.3 C3 power/latency for iMac13,N fixed IASL failed to launch when path included spaces --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 52 +++++++++++++++++++--------- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 7353fe7..cc9c82c 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 3.2 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 3.3 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -28,9 +28,11 @@ # - Better/more complete feedback added (Jeroen, Februari 2013) # - Processor data for desktop/mobile and server CPU's added (Jeroen, Februari 2013) # - Improved power calculation, matching Apple's new algorithm (Pike, Februari 2013) +# - Fix iMac13,N latency and power values for C3 (Jeroen/Pike, Februari 2013) +# - IASL failed to launch when path included spaces (Pike, Februari 2013) # # Contributors: -# - Thanks to Dave and toleda for their help (bug fixes and other improvements). +# - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). # - Many thanks to Jeroen for the CPU data, cleanups and renaming stuff. # @@ -39,19 +41,19 @@ #================================= GLOBAL VARS ================================== # -# Change this to 1 to inject debug data. +# Change this to 0 to stop it from injecting debug data. # -gDebug=0 +gDebug=1 # # A value of 1 will make this script call iasl (compiles SSDT_PR.dsl) # -gCallIasl=0 +gCallIasl=1 # # A value of 1 will make this script open SSDT_PR.dsl in the editor of your choice. # -gCallOpen=1 +gCallOpen=0 # # Change this to 0 when your CPU isn't stuck in Low Frequency Mode! @@ -74,7 +76,7 @@ gProcLabel="CPU" # Global variables. # -gScriptVersion=3.2 +gScriptVersion=3.3 # # Path and filename setup. @@ -498,7 +500,7 @@ function _printScopeACST() let targetCStates=$gACST_CPU1 latency_C1=0x03E8 latency_C2=0x94 - latency_C3=0xA9 + latency_C3=0xC6 if ((gDebug)); then echo ' Store ("CPU1 C-States : '$targetCStates'", Debug)' >> $gSsdtPR @@ -603,6 +605,21 @@ function _printScopeACST() if (($C3)); then let hintCode+=0x10 + local power_C3=0x01F4 + # + # Is this for CPU1? + # + if (($1)); then + if [[ ${modelID:0:7} == "iMac13," ]]; + then + local power_C3=0x15E + latency_C3=0xA9 + else + local power_C3=0xC8 + let hintCode+=0x10 + fi + fi + echo ' },' >> $gSsdtPR echo '' >> $gSsdtPR echo ' Package (0x04)' >> $gSsdtPR @@ -618,7 +635,7 @@ function _printScopeACST() echo ' },' >> $gSsdtPR echo ' 0x03,' >> $gSsdtPR echo ' '$latency_C3',' >> $gSsdtPR - echo ' 0x01F4' >> $gSsdtPR + echo ' '$power_C3 >> $gSsdtPR fi if (($C6)); then @@ -724,6 +741,7 @@ function _getModelName() # Grab 'compatible' property from ioreg (stripped with sed / RegEX magic). # echo `ioreg -p IODeviceTree -d 2 -k compatible | grep compatible | sed -e 's/ *["=<>]//g' -e 's/compatible//'` +# echo "iMac13,2" } #-------------------------------------------------------------------------------- @@ -779,7 +797,7 @@ function _findIasl() if ((gCallIasl)); then iasl=`find /Applications -name iasl -print -quit` - if [ $iasl == "" ]; then + if [ "$iasl" == "" ]; then gCallIasl=0 fi fi @@ -1186,10 +1204,10 @@ function main() then local ifs=$IFS IFS="," - local cpuData=($gProcessorData) - let gTdp=${cpuData[1]} - let lfm=${cpuData[2]} - let frequency=${cpuData[3]} + local cpuData=($gProcessorData) + let gTdp=${cpuData[1]} + let lfm=${cpuData[2]} + let frequency=${cpuData[3]} let maxTurboFrequency=${cpuData[4]} let logicalCPUs=${cpuData[6]} IFS=$ifs @@ -1245,8 +1263,8 @@ function main() echo "$logicalCPUs logical CPU's detected with a Core Frequency of $frequency MHz" # - # Check maxTurboFrequency - # + # Check maxTurboFrequency + # if [ $maxTurboFrequency == 0 ]; then printf "\nError: Unknown processor number... exiting\n" echo "Try: $0 MaxTurboFrequency [TDP (Watts) CPU (0=SandyBridge, 1=IvyBridge)]" @@ -1336,7 +1354,7 @@ if [ $# -ge 0 ]; _findIasl if ((gCallIasl)); then - $iasl $gSsdtPR + "$iasl" $gSsdtPR fi if ((gCallOpen)); then From 6baa930ffae21213ac5199e9fbae5b67ab19e7c3 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Tue, 12 Feb 2013 07:12:08 +0100 Subject: [PATCH 269/623] Updating script to v3.4 Typo in cpu-type check fixed Error in CPU data (i5-3317U) fixed --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index cc9c82c..3553cd3 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 3.3 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 3.4 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -30,6 +30,8 @@ # - Improved power calculation, matching Apple's new algorithm (Pike, Februari 2013) # - Fix iMac13,N latency and power values for C3 (Jeroen/Pike, Februari 2013) # - IASL failed to launch when path included spaces (Pike, Februari 2013) +# - Typo in cpu-type check fixed (Jeroen, Februari 2013) +# - Error in CPU data (i5-3317U) fixed (Pike, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -76,7 +78,7 @@ gProcLabel="CPU" # Global variables. # -gScriptVersion=3.3 +gScriptVersion=3.4 # # Path and filename setup. @@ -221,7 +223,7 @@ i5-3340M,35,1200,2700,3400,2,4 i5-3339Y,13,0,1500,2000,2,4 i5-3337U,17,0,1800,2700,2,4 i5-3320M,35,1200,2600,3300,2,4 -i5-3317U,17,1700,2600,2,4 +i5-3317U,17,0,1700,2600,2,4 # i5-3200 Mobile Processor Series i5-3230M,35,1200,2600,3200,2,4 i5-3210M,35,1200,2500,3100,2,4 @@ -1323,7 +1325,7 @@ function main() _showLowPowerStates - if [ ${cpu_type:2:2} -ne $cpuTypeString ]; then + if [ ${cpu_type:0:2} -ne $cpuTypeString ]; then echo "Warning: 'cpu-type' may be set improperly (0x$cpu_type instead of 0x$cpuTypeString${cpu_type:2:2})" fi From 2d58473da08a81dd80f140903117720b81e22d0d Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Tue, 12 Feb 2013 10:10:07 +0100 Subject: [PATCH 270/623] Updating script to v3.4 New setting to copy the compiled AML file after IASL is done New setting to set the destination path/filename Additional checking to trap cpu data/turbo mode errors --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 131 ++++++++++++++++++++------- 1 file changed, 97 insertions(+), 34 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 3553cd3..7e74cbc 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 3.4 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 3.5 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -32,6 +32,9 @@ # - IASL failed to launch when path included spaces (Pike, Februari 2013) # - Typo in cpu-type check fixed (Jeroen, Februari 2013) # - Error in CPU data (i5-3317U) fixed (Pike, Februari 2013) +# - Setting added for the target path/filename (Jeroen, Februari 2013) +# - Initial implementation of auto-copy (Jeroen, Februari 2013) +# - Additional checks added for cpu data/turbo modes (Jeroen, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -43,13 +46,32 @@ #================================= GLOBAL VARS ================================== # -# Change this to 0 to stop it from injecting debug data. +# Change this to 0 when your CPU isn't stuck in Low Frequency Mode! # -gDebug=1 +gIvyWorkAround=1 + +# +# Change this to 1 when you want SSDT.aml to get copied to the target location. +# +gAutoCopy=0 + +# +# This is the target location that SSDT.aml will be copied to. +# +# Note: Do no change this - will be updated automatically for Clover/RevoBoot! +# +gDestinationPath="/Extra/" + +# +# This is the filename used for the copy process +# +gDestinationFile="SSDT.aml" # # A value of 1 will make this script call iasl (compiles SSDT_PR.dsl) # +# Note: Will be set to 0 when we failed to locate a copy of iasl! +# gCallIasl=1 # @@ -58,34 +80,32 @@ gCallIasl=1 gCallOpen=0 # -# Change this to 0 when your CPU isn't stuck in Low Frequency Mode! +# Change this to 0 to stop it from injecting debug data. # -gIvyWorkAround=1 +gDebug=1 # # Lowest possible idle frequency (user configurable). Also known as Low Frequency Mode. # - gBaseFrequency=1600 # # Change this label to "P00" when your DSDT uses 'P00n' instead of 'CPUn'. # - gProcLabel="CPU" # -# Global variables. +# Other global variables. # -gScriptVersion=3.4 +gScriptVersion=3.5 # # Path and filename setup. # gPath=~/Desktop -gSsdtID=SSDT_PR +gSsdtID=SSDT gSsdtPR=${gPath}/${gSsdtID}.dsl gDesktopCPU=1 @@ -348,7 +368,13 @@ function _printScopeStart() if [ $turboStates -eq 0 ]; then - echo ' Name (APSN, Zero)' >> $gSsdtPR + # TODO: Remove this when CPUPM for IB works properly! + if (($useWorkArounds)); + then + echo ' Name (APSN, One)' >> $gSsdtPR + else + echo ' Name (APSN, Zero)' >> $gSsdtPR + fi else # TODO: Remove this when CPUPM for IB works properly! if ((useWorkArounds)); then @@ -359,7 +385,7 @@ function _printScopeStart() fi # TODO: Remove this when CPUPM for IB works properly! - if ((useWorkArounds)); then + if (($useWorkArounds)); then let packageLength+=1 fi @@ -367,7 +393,7 @@ function _printScopeStart() echo ' {' >> $gSsdtPR # TODO: Remove this when CPUPM for IB works properly! - if ((useWorkArounds)); then + if (($useWorkArounds)); then let extraF=($maxTurboFrequency+1) let maxTDP=($gTdp*1000) let extraR=($maxTurboFrequency/100)+1 @@ -397,7 +423,9 @@ function _printPackages() let minRatio=8 fi - echo ' /* High Frequency Modes (turbo) */' >> $gSsdtPR + if (($turboStates)); then + echo ' /* High Frequency Modes (turbo) */' >> $gSsdtPR + fi while [ $ratio -ge $minRatio ]; do @@ -807,6 +835,25 @@ function _findIasl() #-------------------------------------------------------------------------------- +function _setDestinationPath +{ + # + # Checking for RevoBoot + # + if [ -d /EFI/ACPI ]; then + gDestinationPath="/Extra/ACPI/" + fi + + # + # Checking for Clover + # + if [ -d /EFI/ACPI/patched ]; then + gDestinationPath="/EFI/ACPI/patched/" + fi +} + +#-------------------------------------------------------------------------------- + function _getCPUNumberFromBrandString { # @@ -1211,6 +1258,11 @@ function main() let lfm=${cpuData[2]} let frequency=${cpuData[3]} let maxTurboFrequency=${cpuData[4]} + + if [ $maxTurboFrequency == 0 ]; then + let maxTurboFrequency=$frequency + fi + let logicalCPUs=${cpuData[6]} IFS=$ifs @@ -1269,7 +1321,7 @@ function main() # if [ $maxTurboFrequency == 0 ]; then printf "\nError: Unknown processor number... exiting\n" - echo "Try: $0 MaxTurboFrequency [TDP (Watts) CPU (0=SandyBridge, 1=IvyBridge)]" + echo "Try: $0 MaxTurboFrequency [TDP (Watts) CPU (0=SandyBridge, 1=IvyBridge)]" exit 1 fi @@ -1285,8 +1337,17 @@ function main() let turboStates=0 fi - let minTurboFrequency=($frequency+100) - echo "Number of Turbo States: $turboStates ($minTurboFrequency-$maxTurboFrequency MHz)" + # + # Report number of Turbo States + # + if [ $turboStates -gt 0 ]; + then + let minTurboFrequency=($frequency+100) + echo "Number of Turbo States: $turboStates ($minTurboFrequency-$maxTurboFrequency MHz)" + + else + echo "Number of Turbo States: 0" + fi local packageLength=$(echo "((($maxTurboFrequency - $gBaseFrequency)+100) / 100)" | bc) @@ -1345,28 +1406,30 @@ function main() #==================================== START ===================================== -# -# Check number of arguments. -# +main "$1" $2 $3 -if [ $# -ge 0 ]; - then - main "$1" $2 $3 +_findIasl - _findIasl +if ((gCallIasl)); then + # + # Compile SSDT.dsl + # + "$iasl" $gSsdtPR - if ((gCallIasl)); then - "$iasl" $gSsdtPR - fi + # + # Copy SSDT_PR.aml to target location + # + if (($gAutoCopy)); then + _setDestinationPath + cp $gSsdtPR ${gDestinationPath}${gDestinationFile} + fi - if ((gCallOpen)); then - open $gSsdtPR - fi - else - echo "Usage: $0 MaxTurboFrequency [TDP (Watts) CPU (0=SandyBridge, 1=IvyBridge)]" - exit 1 fi -#================================================================================ +if ((gCallOpen)); then + open $gSsdtPR +fi exit 0 + +#================================================================================ From 5fdb3edd30f63c654b194325aa52cd316a1aaa38 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Tue, 12 Feb 2013 10:13:27 +0100 Subject: [PATCH 271/623] Updating script to v3.5 Oops typo --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 7e74cbc..d5df128 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -1261,7 +1261,7 @@ function main() if [ $maxTurboFrequency == 0 ]; then let maxTurboFrequency=$frequency - fi + fi let logicalCPUs=${cpuData[6]} IFS=$ifs From 78d124cf77b5702ed44934db041ce092cb8fbd3b Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Tue, 12 Feb 2013 17:23:49 +0100 Subject: [PATCH 272/623] Updating script to v3.6 Undo filename change done by Jeroen in version 3.5 --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index d5df128..bc02112 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 3.5 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 3.6 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -35,6 +35,7 @@ # - Setting added for the target path/filename (Jeroen, Februari 2013) # - Initial implementation of auto-copy (Jeroen, Februari 2013) # - Additional checks added for cpu data/turbo modes (Jeroen, Februari 2013) +# - Undo filename change done by Jeroen (Pike, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -98,14 +99,14 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=3.5 +gScriptVersion=3.6 # # Path and filename setup. # gPath=~/Desktop -gSsdtID=SSDT +gSsdtID=SSDT_PR gSsdtPR=${gPath}/${gSsdtID}.dsl gDesktopCPU=1 From 894da5e6b1ab2696501b3877ad9964fb9689bd75 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Thu, 14 Feb 2013 11:30:03 +0100 Subject: [PATCH 273/623] Updating script to v3.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improved search algorithm for iasl. We now also copy iasl to a location that we check. This reduces the time it takes to locate the file. --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 41 ++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index bc02112..b8b09b0 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 3.6 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 3.7 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -36,6 +36,7 @@ # - Initial implementation of auto-copy (Jeroen, Februari 2013) # - Additional checks added for cpu data/turbo modes (Jeroen, Februari 2013) # - Undo filename change done by Jeroen (Pike, Februari 2013) +# - Improved/faster search algorithm to locate iasl (Jeroen, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -99,7 +100,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=3.6 +gScriptVersion=3.7 # # Path and filename setup. @@ -826,10 +827,40 @@ function _getSystemType() function _findIasl() { if ((gCallIasl)); then - iasl=`find /Applications -name iasl -print -quit` + # + # First we do a quick lookup of iasl (should be there after the first run) + # + if [ -f == /usr/local/bin/iasl ]; + then + iasl=/usr/local/bin/iasl + else + # + # Search for 'iasl5' (used by MaciASL) in the /Applications folder + # + iasl=`find /Applications -name iasl5 -print -quit` - if [ "$iasl" == "" ]; then - gCallIasl=0 + if [ "$iasl" == "" ]; + then + # + # Not found. Now search for 'iasl' in the /Applications folder + # + iasl=`find /Applications -name iasl -print -quit` + + if [ "$iasl" == "" ]; then + # + # No IASL found. Disable compiler feature + # + gCallIasl=0 + fi + fi + + if ((gCallIasl)); then + # + # File found. Copy it to our target location + # + cp "$iasl" /usr/local/bin/iasl + iasl=/usr/local/bin/iasl + fi fi fi } From e1945417f4b2e2f98732a8776d8086d4ea0aeffc Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Thu, 14 Feb 2013 17:38:51 +0100 Subject: [PATCH 274/623] Updating script to v3.8 Bug fix (==) automatic revision update and better feedback for iasl search --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 65 +++++++++++++--------------- 1 file changed, 31 insertions(+), 34 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index b8b09b0..4a59597 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 3.7 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 3.8 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -37,6 +37,7 @@ # - Additional checks added for cpu data/turbo modes (Jeroen, Februari 2013) # - Undo filename change done by Jeroen (Pike, Februari 2013) # - Improved/faster search algorithm to locate iasl (Jeroen, Februari 2013) +# - Bug fix, automatic revision update and better feedback (Pike, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -100,7 +101,9 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=3.7 +gScriptVersion=3.8 + +gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' # # Path and filename setup. @@ -265,25 +268,25 @@ i3-3110M,35,0,2400,0,2,4 function _printHeader() { - echo '/*' > $gSsdtPR - echo ' * Intel ACPI Component Architecture' >> $gSsdtPR - echo ' * AML Disassembler version 20130210-00 [Feb 10 2013]' >> $gSsdtPR - echo ' * Copyright (c) 2000 - 2013 Intel Corporation' >> $gSsdtPR - echo ' * ' >> $gSsdtPR - echo ' * Original Table Header:' >> $gSsdtPR - echo ' * Signature "SSDT"' >> $gSsdtPR - echo ' * Length 0x0000036A (874)' >> $gSsdtPR - echo ' * Revision 0x01' >> $gSsdtPR - echo ' * Checksum 0x00' >> $gSsdtPR - echo ' * OEM ID "APPLE "' >> $gSsdtPR - echo ' * OEM Table ID "CpuPm"' >> $gSsdtPR - echo ' * OEM Revision 0x00003000 (4096)' >> $gSsdtPR - echo ' * Compiler ID "INTL"' >> $gSsdtPR - echo ' * Compiler Version 0x20130210 (538116624)' >> $gSsdtPR - echo ' */' >> $gSsdtPR - echo '' >> $gSsdtPR - echo 'DefinitionBlock ("'$gSsdtID'.aml", "SSDT", 1, "APPLE ", "CpuPm", 0x00003000)' >> $gSsdtPR - echo '{' >> $gSsdtPR + echo '/*' > $gSsdtPR + echo ' * Intel ACPI Component Architecture' >> $gSsdtPR + echo ' * AML Disassembler version 20130210-00 [Feb 10 2013]' >> $gSsdtPR + echo ' * Copyright (c) 2000 - 2013 Intel Corporation' >> $gSsdtPR + echo ' * ' >> $gSsdtPR + echo ' * Original Table Header:' >> $gSsdtPR + echo ' * Signature "SSDT"' >> $gSsdtPR + echo ' * Length 0x0000036A (874)' >> $gSsdtPR + echo ' * Revision 0x01' >> $gSsdtPR + echo ' * Checksum 0x00' >> $gSsdtPR + echo ' * OEM ID "APPLE "' >> $gSsdtPR + echo ' * OEM Table ID "CpuPm"' >> $gSsdtPR + printf ' * OEM Revision '$gRevision' (%d)\n' $gRevision >> $gSsdtPR + echo ' * Compiler ID "INTL"' >> $gSsdtPR + echo ' * Compiler Version 0x20130210 (538116624)' >> $gSsdtPR + echo ' */' >> $gSsdtPR + echo '' >> $gSsdtPR + echo 'DefinitionBlock ("'$gSsdtID'.aml", "SSDT", 1, "APPLE ", "CpuPm", '$gRevision')' >> $gSsdtPR + echo '{' >> $gSsdtPR } @@ -830,35 +833,29 @@ function _findIasl() # # First we do a quick lookup of iasl (should be there after the first run) # - if [ -f == /usr/local/bin/iasl ]; + if [ -f /usr/local/bin/iasl ]; then iasl=/usr/local/bin/iasl else - # - # Search for 'iasl5' (used by MaciASL) in the /Applications folder - # + # Note: iasl5 is the name used by MaciASL + printf '\nSearching for iasl5 in the /Applications folder... ' iasl=`find /Applications -name iasl5 -print -quit` if [ "$iasl" == "" ]; then - # - # Not found. Now search for 'iasl' in the /Applications folder - # + printf 'Not found.\nSearching for iasl in the /Applications folder... ' iasl=`find /Applications -name iasl -print -quit` if [ "$iasl" == "" ]; then - # - # No IASL found. Disable compiler feature - # + printf 'Not found. Disabling compiler feature' gCallIasl=0 fi fi if ((gCallIasl)); then - # - # File found. Copy it to our target location - # + printf 'IASL found. Copying file... ' cp "$iasl" /usr/local/bin/iasl + printf 'Done.' iasl=/usr/local/bin/iasl fi fi From 602e6ab9dafe5c720f17f301215902838ca95e9b Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Thu, 14 Feb 2013 22:26:53 +0100 Subject: [PATCH 275/623] Updating script to 3.9 Auto copy is now on by default --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 4a59597..fc67ed1 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 3.8 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 3.9 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -38,6 +38,7 @@ # - Undo filename change done by Jeroen (Pike, Februari 2013) # - Improved/faster search algorithm to locate iasl (Jeroen, Februari 2013) # - Bug fix, automatic revision update and better feedback (Pike, Februari 2013) +# - Turned auto copy on (Jeroen, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -54,9 +55,9 @@ gIvyWorkAround=1 # -# Change this to 1 when you want SSDT.aml to get copied to the target location. +# Asks for your confirmation to copy SSDT_PR.aml to /Extra/SSDT.aml (example) # -gAutoCopy=0 +gAutoCopy=1 # # This is the target location that SSDT.aml will be copied to. @@ -101,7 +102,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=3.8 +gScriptVersion=3.9 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -1446,11 +1447,16 @@ if ((gCallIasl)); then "$iasl" $gSsdtPR # - # Copy SSDT_PR.aml to target location + # Copy SSDT_PR.aml to /Extra/SSDT.aml (example) # if (($gAutoCopy)); then - _setDestinationPath - cp $gSsdtPR ${gDestinationPath}${gDestinationFile} + if [ -f ${gPath}/${gSsdtID}.aml ]; then + read -p "Do you want to copy ${gPath}/${gSsdtID}.aml to ${gDestinationPath}${gDestinationFile}? (y/n)?" choice + case "$choice" in + y|Y ) _setDestinationPath + cp ${gPath}/${gSsdtID}.aml ${gDestinationPath}${gDestinationFile};; + esac + fi fi fi @@ -1460,5 +1466,4 @@ if ((gCallOpen)); then fi exit 0 - #================================================================================ From 68d722ed2abc467d8df2b9839e92db10e0398e6c Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 15 Feb 2013 07:39:42 +0100 Subject: [PATCH 276/623] Jeroen testing with Pike's account --- i386/libsaio/cpu.c | 2 +- i386/libsaio/cpu/Intel/dynamic_data.h | 22 ++++++++++++++-------- i386/libsaio/cpu/essentials.h | 2 +- i386/libsaio/platform.h | 9 +++++++++ i386/libsaio/smbios/model_data.h | 26 ++++++++++++++++++++++++++ 5 files changed, 51 insertions(+), 10 deletions(-) diff --git a/i386/libsaio/cpu.c b/i386/libsaio/cpu.c index f81cd76..5cdeefb 100644 --- a/i386/libsaio/cpu.c +++ b/i386/libsaio/cpu.c @@ -25,7 +25,7 @@ uint8_t getTDP(void) { uint8_t powerUnit = bitfield32(rdmsr64(MSR_RAPL_POWER_UNIT), 3, 0); - uint32_t powerLimit = bitfield32(rdmsr64(MSR_PKG_RAPL_POWER_LIMIT), 14, 0); + uint32_t powerLimit = bitfield32(rdmsr64(MSR_PKG_POWER_LIMIT), 14, 0); uint8_t tdp = (powerLimit / (1 << powerUnit)); diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index fc63c5f..8223f6a 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -187,12 +187,11 @@ void initCPUStruct(void) printf("C-State limit : %d\n", (msr & 7)); - printf("C1-State enabled: %s\n", ((getCachedCPUID(LEAF_5, edx) >> 4) & 0xf) ? "true" : "false"); // C1 - printf("C3-State enabled: %s\n", ((getCachedCPUID(LEAF_5, edx) >> 8) & 0xf) ? "true" : "false"); // C3 - printf("C6-State enabled: %s\n", ((getCachedCPUID(LEAF_5, edx) >> 12) & 0xf) ? "true" : "false"); // C6 - printf("C7-State enabled: %s\n", ((getCachedCPUID(LEAF_5, edx) >> 16) & 0xf) ? "true" : "false"); // C7 - - printf("MWAIT supported : %s\n", (getCachedCPUID(LEAF_5, ecx) & 1) ? "true" : "false"); + printf("Number of C0 sub C-states supported using MWAIT: %d\n", ( getCachedCPUID(LEAF_5, edx) & 0xf)); + printf("Number of C1 sub C-states supported using MWAIT: %d\n", ((getCachedCPUID(LEAF_5, edx) >> 4) & 0xf)); + printf("Number of C2 sub C-states supported using MWAIT: %d\n", ((getCachedCPUID(LEAF_5, edx) >> 8) & 0xf)); + printf("Number of C3 sub C-states supported using MWAIT: %d\n", ((getCachedCPUID(LEAF_5, edx) >> 12) & 0xf)); + printf("Number of C4 sub C-states supported using MWAIT: %d\n", ((getCachedCPUID(LEAF_5, edx) >> 16) & 0xf)); _CPU_DEBUG_SLEEP(5); #endif @@ -406,11 +405,18 @@ void initCPUStruct(void) #endif qpiSpeed = 0; // No QPI but DMI for Sandy Bridge processors. + // Disable C1/C3 state auto demotion i.e. it won't change C3/C6/C7 requests to C1/C3. + wrmsr64(MSR_PKG_CST_CONFIG_CONTROL, 0x18000003ULL); + // Disable EIST Hardware coordination (letting AICPUPM.kext handle it). msr = rdmsr64(MSR_MISC_PWR_MGMT); - wrmsr64(MSR_MISC_PWR_MGMT, msr | 1); + wrmsr64(MSR_MISC_PWR_MGMT, (msr | 1)); + + // Disable I/O MWAIT Redirection. + // msr = rdmsr64(MSR_PKG_CST_CONFIG_CONTROL); + // wrmsr64(MSR_MISC_PWR_MGMT, (msr & 0xFFFEFBFF)); - checkFlexRatioMSR(); + checkFlexRatioMSR(); } #endif // #if INTEL_CORE_TECHNOLOGY fsbFrequency = ((tscFrequency / maxBusRatio) - OC_BUSRATIO_CORRECTION); diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index f955ad5..7ad17c1 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -73,7 +73,7 @@ // Sandy Bridge & JakeTown specific 'Running Average Power Limit' MSR's. #define MSR_RAPL_POWER_UNIT 0x606 -#define MSR_PKG_RAPL_POWER_LIMIT 0x610 +#define MSR_PKG_POWER_LIMIT 0x610 #define MSR_PKG_ENERGY_STATUS 0x611 #define MSR_PKG_PERF_STATUS 0x613 #define MSR_PKG_POWER_INFO 0x614 diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 9a797f7..2845d91 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -54,12 +54,21 @@ // Additional model selectors to select a specific target model. //------------------------------------------------------------------------------ +<<<<<<< HEAD #define IMAC_131 (IMAC | (4 << 15)) #define IMAC_122 (IMAC | (3 << 15)) #define IMAC_121 (IMAC | (2 << 15)) #define IMAC_111 (IMAC | (1 << 15)) #define IMAC_132 IMAC // Defaults to iMac13,2 +======= +#define IMAC_111 IMAC | (1 << 15) +#define IMAC_121 IMAC | (2 << 15) +#define IMAC_122 IMAC | (3 << 15) +#define IMAC_131 IMAC | (4 << 15) +#define IMAC_132 IMAC | (5 << 15) +// #define IMAC_132 IMAC // Defaults to iMac13,2 +>>>>>>> Jeroen testing with Pike's account #define MACBOOK_41 MACBOOK // Defaults to MacBook4,1 diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index f39d953..7336411 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -32,16 +32,30 @@ // ------------------------------------------------------------------------------------- #define SMB_FAMILY "iMac" +<<<<<<< HEAD #if (TARGET_MODEL == IMAC_131) #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" #define SMB_PRODUCT_NAME "iMac13,1" #define SMB_BOARD_PRODUCT "Mac-00BE6ED71E35EB86" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '1' } +======= + #if (TARGET_MODEL == IMAC_111) + #define SMB_BIOS_VERSION "IM111.88Z.0034.B00.0910301727" + #define SMB_PRODUCT_NAME "iMac11,1" + #define SMB_BOARD_PRODUCT "Mac-F2268DAE" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '1', ',', '1' } + #elif // Defaults to iMac12,1 + #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" + #define SMB_PRODUCT_NAME "iMac12,1" + #define SMB_BOARD_PRODUCT "Mac-942B59F58194171B" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '1' } +>>>>>>> Jeroen testing with Pike's account #elif (TARGET_MODEL == IMAC_122) #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" #define SMB_PRODUCT_NAME "iMac12,2" #define SMB_BOARD_PRODUCT "Mac-942B5BF58194151B" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '2' } +<<<<<<< HEAD #elif (TARGET_MODEL == IMAC_121) #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" #define SMB_PRODUCT_NAME "iMac12,1" @@ -57,6 +71,18 @@ #define SMB_PRODUCT_NAME "iMac13,2" #define SMB_BOARD_PRODUCT "Mac-FC02E91DDD3FA6A4" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '2' } +======= + #elif (TARGET_MODEL == IMAC_131) + #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" + #define SMB_PRODUCT_NAME "iMac13,1" + #define SMB_BOARD_PRODUCT "Mac-00BE6ED71E35EB86" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '1' } + #else // Defaults to iMac13,2 + #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" + #define SMB_PRODUCT_NAME "iMac13,2" + #define SMB_BOARD_PRODUCT "Mac-FC02E91DDD3FA6A4" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '2' } +>>>>>>> Jeroen testing with Pike's account #endif // ------------------------------------------------------------------------------------- #endif From 5840a21cb64fd7aa8f8181d2fb047a69385c7725 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 15 Feb 2013 07:42:55 +0100 Subject: [PATCH 277/623] Jeroen fixing his commit errors with Pike's account --- i386/libsaio/platform.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 2845d91..16225f1 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -54,21 +54,11 @@ // Additional model selectors to select a specific target model. //------------------------------------------------------------------------------ -<<<<<<< HEAD - #define IMAC_131 (IMAC | (4 << 15)) #define IMAC_122 (IMAC | (3 << 15)) #define IMAC_121 (IMAC | (2 << 15)) #define IMAC_111 (IMAC | (1 << 15)) #define IMAC_132 IMAC // Defaults to iMac13,2 -======= -#define IMAC_111 IMAC | (1 << 15) -#define IMAC_121 IMAC | (2 << 15) -#define IMAC_122 IMAC | (3 << 15) -#define IMAC_131 IMAC | (4 << 15) -#define IMAC_132 IMAC | (5 << 15) -// #define IMAC_132 IMAC // Defaults to iMac13,2 ->>>>>>> Jeroen testing with Pike's account #define MACBOOK_41 MACBOOK // Defaults to MacBook4,1 From 183eb85261b1870ae366d204b297a84715694d13 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 15 Feb 2013 07:49:16 +0100 Subject: [PATCH 278/623] Jeroen fixing his commit errors with Pike's account --- i386/libsaio/smbios/model_data.h | 41 ++++++++------------------------ 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 7336411..ab5cb4c 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -32,13 +32,6 @@ // ------------------------------------------------------------------------------------- #define SMB_FAMILY "iMac" -<<<<<<< HEAD - #if (TARGET_MODEL == IMAC_131) - #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" - #define SMB_PRODUCT_NAME "iMac13,1" - #define SMB_BOARD_PRODUCT "Mac-00BE6ED71E35EB86" - #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '1' } -======= #if (TARGET_MODEL == IMAC_111) #define SMB_BIOS_VERSION "IM111.88Z.0034.B00.0910301727" #define SMB_PRODUCT_NAME "iMac11,1" @@ -49,40 +42,26 @@ #define SMB_PRODUCT_NAME "iMac12,1" #define SMB_BOARD_PRODUCT "Mac-942B59F58194171B" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '1' } ->>>>>>> Jeroen testing with Pike's account #elif (TARGET_MODEL == IMAC_122) #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" #define SMB_PRODUCT_NAME "iMac12,2" #define SMB_BOARD_PRODUCT "Mac-942B5BF58194151B" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '2' } -<<<<<<< HEAD - #elif (TARGET_MODEL == IMAC_121) - #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" - #define SMB_PRODUCT_NAME "iMac12,1" - #define SMB_BOARD_PRODUCT "Mac-942B59F58194171B" - #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '1' } - #elif (TARGET_MODEL == IMAC_111) - #define SMB_BIOS_VERSION "IM111.88Z.0034.B00.0910301727" - #define SMB_PRODUCT_NAME "iMac11,1" - #define SMB_BOARD_PRODUCT "Mac-F2268DAE" - #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '1', ',', '1' } - #else // Defaults to iMac13,2 - #define SMB_BIOS_VERSION "IM131.88Z.010A.B05.1211151146" - #define SMB_PRODUCT_NAME "iMac13,2" - #define SMB_BOARD_PRODUCT "Mac-FC02E91DDD3FA6A4" - #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '2' } -======= - #elif (TARGET_MODEL == IMAC_131) - #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" - #define SMB_PRODUCT_NAME "iMac13,1" - #define SMB_BOARD_PRODUCT "Mac-00BE6ED71E35EB86" - #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '1' } + #elif (TARGET_MODEL == IMAC_121) + #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" + #define SMB_PRODUCT_NAME "iMac12,1" + #define SMB_BOARD_PRODUCT "Mac-942B59F58194171B" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '1' } + #elif (TARGET_MODEL == IMAC_111) + #define SMB_BIOS_VERSION "IM111.88Z.0034.B00.0910301727" + #define SMB_PRODUCT_NAME "iMac11,1" + #define SMB_BOARD_PRODUCT "Mac-F2268DAE" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '1', ',', '1' } #else // Defaults to iMac13,2 #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" #define SMB_PRODUCT_NAME "iMac13,2" #define SMB_BOARD_PRODUCT "Mac-FC02E91DDD3FA6A4" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '2' } ->>>>>>> Jeroen testing with Pike's account #endif // ------------------------------------------------------------------------------------- #endif From 709b112891d4205122ead4677afca877a2bcf019 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 15 Feb 2013 07:54:35 +0100 Subject: [PATCH 279/623] Fixing path typo --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index fc67ed1..a233384 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -870,7 +870,7 @@ function _setDestinationPath # # Checking for RevoBoot # - if [ -d /EFI/ACPI ]; then + if [ -d /Extra/ACPI ]; then gDestinationPath="/Extra/ACPI/" fi From 4de4cf9b5c6daf9bd4d6fa0c6118b83f9577c67f Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 15 Feb 2013 07:55:11 +0100 Subject: [PATCH 280/623] Adding iasl for curl updates --- i386/libsaio/acpi/Tools/iasl | Bin 0 -> 1159340 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100755 i386/libsaio/acpi/Tools/iasl diff --git a/i386/libsaio/acpi/Tools/iasl b/i386/libsaio/acpi/Tools/iasl new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@VzyAfTADwUj literal 0 HcmV?d00001 From 6971545990da611f141ec0a0c63f40facab18a61 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 15 Feb 2013 09:18:23 +0100 Subject: [PATCH 281/623] Updating script to v4.0 Sandy Bridge CPU's added Download IASL if we can't find it in /usr/local/bin/ --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 46 +++++++++++----------------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index a233384..e13523e 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 3.9 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 4.0 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -39,6 +39,7 @@ # - Improved/faster search algorithm to locate iasl (Jeroen, Februari 2013) # - Bug fix, automatic revision update and better feedback (Pike, Februari 2013) # - Turned auto copy on (Jeroen, Februari 2013) +# - IASL search in ~/ssdtPRGen.app added (Jeroen, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -102,7 +103,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=3.9 +gScriptVersion=4.0 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -137,6 +138,9 @@ gProcessorNumber="" # gSandyBridgeCPUList=( +i5-2500K,95,1600,3300,3700,4,4 +i7-2600K,95,1600,3400,3800,4,8 +i7-2700K,95,1600,3500,3900,4,8 # E3-1200 Xeon Processor Series E3-1290,95,0,3600,4000,4,8 E3-1280,95,0,3500,3900,4,8 @@ -834,32 +838,15 @@ function _findIasl() # # First we do a quick lookup of iasl (should be there after the first run) # - if [ -f /usr/local/bin/iasl ]; - then - iasl=/usr/local/bin/iasl - else - # Note: iasl5 is the name used by MaciASL - printf '\nSearching for iasl5 in the /Applications folder... ' - iasl=`find /Applications -name iasl5 -print -quit` - - if [ "$iasl" == "" ]; - then - printf 'Not found.\nSearching for iasl in the /Applications folder... ' - iasl=`find /Applications -name iasl -print -quit` - - if [ "$iasl" == "" ]; then - printf 'Not found. Disabling compiler feature' - gCallIasl=0 - fi - fi - - if ((gCallIasl)); then - printf 'IASL found. Copying file... ' - cp "$iasl" /usr/local/bin/iasl - printf 'Done.' - iasl=/usr/local/bin/iasl - fi + if [ ! -f /usr/local/bin/iasl ]; then + echo -e + echo 'IASL not found. Downloading iasl...' + curl -o /usr/local/bin/iasl https://raw.github.com/Piker-Alpha/RevoBoot/clang/i386/libsaio/acpi/Tools/iasl + chmod +x /usr/local/bin/iasl + echo 'Done.' fi + + iasl=/usr/local/bin/iasl fi } @@ -986,7 +973,9 @@ function _getCPUDataByProcessorNumber __searchList "gServerIvyBridgeCPUList[@]" $gServerCPU fi -# echo "gTypeCPU is $gTypeCPU" + if (!(($gTypeCPU))); then + __searchList "gSandyBridgeCPUList[@]" $gServerCPU + fi } #-------------------------------------------------------------------------------- @@ -1451,6 +1440,7 @@ if ((gCallIasl)); then # if (($gAutoCopy)); then if [ -f ${gPath}/${gSsdtID}.aml ]; then + echo -e read -p "Do you want to copy ${gPath}/${gSsdtID}.aml to ${gDestinationPath}${gDestinationFile}? (y/n)?" choice case "$choice" in y|Y ) _setDestinationPath From bfe18b986d573272b08e1b0bbdae7ed699982a10 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 15 Feb 2013 09:22:10 +0100 Subject: [PATCH 282/623] Fix typo --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index e13523e..d14b14c 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -39,7 +39,7 @@ # - Improved/faster search algorithm to locate iasl (Jeroen, Februari 2013) # - Bug fix, automatic revision update and better feedback (Pike, Februari 2013) # - Turned auto copy on (Jeroen, Februari 2013) -# - IASL search in ~/ssdtPRGen.app added (Jeroen, Februari 2013) +# - Download IASL if it isn't there where we expect it (Pike, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). From 1514baead693e55056d26271810b93971f39d82f Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 15 Feb 2013 17:48:11 +0100 Subject: [PATCH 283/623] Taking care of permissions errors in ssdtPRGen.command --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index d14b14c..51a5369 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -841,8 +841,8 @@ function _findIasl() if [ ! -f /usr/local/bin/iasl ]; then echo -e echo 'IASL not found. Downloading iasl...' - curl -o /usr/local/bin/iasl https://raw.github.com/Piker-Alpha/RevoBoot/clang/i386/libsaio/acpi/Tools/iasl - chmod +x /usr/local/bin/iasl + sudo curl -o /usr/local/bin/iasl https://raw.github.com/Piker-Alpha/RevoBoot/clang/i386/libsaio/acpi/Tools/iasl + sudo chmod +x /usr/local/bin/iasl echo 'Done.' fi @@ -1444,7 +1444,7 @@ if ((gCallIasl)); then read -p "Do you want to copy ${gPath}/${gSsdtID}.aml to ${gDestinationPath}${gDestinationFile}? (y/n)?" choice case "$choice" in y|Y ) _setDestinationPath - cp ${gPath}/${gSsdtID}.aml ${gDestinationPath}${gDestinationFile};; + sudo cp ${gPath}/${gSsdtID}.aml ${gDestinationPath}${gDestinationFile};; esac fi fi From 073b68721010cc5dc0debefd94f56abac04a98e5 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 15 Feb 2013 17:48:48 +0100 Subject: [PATCH 284/623] Initial installation script for ssdtPRGen.app --- i386/libsaio/acpi/Tools/install.sh | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 i386/libsaio/acpi/Tools/install.sh diff --git a/i386/libsaio/acpi/Tools/install.sh b/i386/libsaio/acpi/Tools/install.sh new file mode 100755 index 0000000..f4a9f3e --- /dev/null +++ b/i386/libsaio/acpi/Tools/install.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# +# Installation script for ssdtPRGen.command +# +# Version 0.1 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# +# Updates: +# - +# +# Contributors: +# + +#-------------------------------------------------------------------------------- + +if [ -f ~/ssdtPRGen.command ]; + then + open ~/ssdtPRGen.command + else + # + # Download script + # + curl -o ~/ssdtPRGen.command https://raw.github.com/Piker-Alpha/RevoBoot/clang/i386/libsaio/acpi/Tools/ssdtPRGen.sh + + # + # Add execute rights + # + chmod +x ~/ssdtPRGen.command + + # + # Maintain backward compatibility with older versions + # + ln -sf ~/ssdtPRGen.command ~/ssdtPRGen.sh + + # + # Put a symbolic link to the script on the Desktop + # + ln -sf ~/ssdtPRGen.command ~/Desktop/ssdtPRGen.command +fi + +exit 0 From fc4706a7fb646e6cebe9e284fff90742d1355d60 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 15 Feb 2013 17:56:41 +0100 Subject: [PATCH 285/623] ssdtPRGen.app --- .../ssdtPRGen.app/Contents/MacOS/ssdtPRGen | Bin 0 -> 9176 bytes "i386/libsaio/acpi/Tools/ssdtPRGen.app/Icon\r" | 0 i386/libsaio/acpi/Tools/ssdtPRGen.zip | Bin 0 -> 716637 bytes 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100755 i386/libsaio/acpi/Tools/ssdtPRGen.app/Contents/MacOS/ssdtPRGen create mode 100644 "i386/libsaio/acpi/Tools/ssdtPRGen.app/Icon\r" create mode 100644 i386/libsaio/acpi/Tools/ssdtPRGen.zip diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.app/Contents/MacOS/ssdtPRGen b/i386/libsaio/acpi/Tools/ssdtPRGen.app/Contents/MacOS/ssdtPRGen new file mode 100755 index 0000000000000000000000000000000000000000..499c981cb16684e6c2196bfc0b913141c43b6130 GIT binary patch literal 9176 zcmeHNdsLH07M}nrRaC56*W<bc6=9V{tgB*uEQnb@j-s~0sd~=(8A6n3c$^Rf+I1H} zkr0AGTV;I_TUSNJ2G}YUm6sK;tH@I*SR)S&4=XALMM(DEFJB<UNB6%ydrs~-Gxz>x z?%cU^XXZPTnUwWB(hVboV@*hm6(PhP5*bR!ZsLFvnFxu3MAK`$mUB07KV6NbgNZX3 zz7e4v7wCYd{kZG=2CFdbnT}1$Sq#3BA&|f&hG<$Mh?1}Xn7KWr9SjD_J6Wd?+YG29 zh%tpU9WIFo2=6a4x2G6ous4s@Fk)i^Th`uye`t>m5{SYCVo)--SHjxc${Ik7aqp+s z{Nsm9#KMp*tb)0{k478(!x$kUHl;zfp@OC(LL!ABfwVAWb0~uc&&Pb$-Wt{j;&%~E z3xep)VqUPopk?k~0&6ddHG&w{+FJ?NNiEDBO)vBE^D<F`^}tN2ah;fPTqkJP7zdgT z6NhdAzv%5eF--5<?70}b0DJH9i>5<Fba-@dK&XfglZaol=fe7DbPKVmJzO8}8T$fG z(<0ux?0K;EaPJ`@HnoT29l_KXGMWzLNq7SV=HrcF?VVwbAU4Kopw)mx)BMoj;Ls3b ziMc)ZafbPDFe(5y^^ch=le&TL$V#78E4a&ijNbq-Flb%@Bh|9TaGa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g>TSR!DFfF%N!2v{OuiGU>nmIzoP@c$NpF;j^DQn=+9<B5+|%wsqm0Pn-_ zc>RgkMM1<KV?1d-Pb3QE6F{DbM4{mV1QdY4h_H`PUIVfqO28L|AzH^Ep#<ekAa4#8 zZ$mi<WwC&19R_lkFpQC-K#mj(B?wruqKRF&geR5|J{d-nB~hVbS`fk~LBTv>2npUM zh$iB2zE~J0A(5-rd5O1>zY0RO3&rqc3HK&e!9k2W5fTBs#q)4Dh8N)we5wA5gZDJn zL^%;MHD;<wkii?FHOY5`2Q@y4=WHi3_*aC=1<G<T%g3w)-s2cjPV~Hu_a8k!+u<|n zB1j04#z7f!RK+s9n!)}?m^{e=1ZzN8F$y0!;n5A1--9$79wCkQF=JS4yqB5CV&lDx z6Jid&*csX{Kn(4T_cu!s!_#66YkxUn=m_5vu|K@(!uou+-k+^k!w|53Ba87;3o*WD z0!NV{5#**A|4Ctrqs{P6GrY$P%gyk9GyD%TtTe+gbhu=L3o%G=6@}MO%zGxr@qI{R zA;FavlIMS;>p<u*<{tz!v&i_wz_-J4V*X*ktS6d&!*VmOMjDqY&8%9QU9hxqF&h@R haeuKp%dn@6y9qe#Bf}0d>>b0dVfV{xyVfu^@*f<Vp`8E# literal 0 HcmV?d00001 diff --git "a/i386/libsaio/acpi/Tools/ssdtPRGen.app/Icon\r" "b/i386/libsaio/acpi/Tools/ssdtPRGen.app/Icon\r" new file mode 100644 index 0000000..e69de29 diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.zip b/i386/libsaio/acpi/Tools/ssdtPRGen.zip new file mode 100644 index 0000000000000000000000000000000000000000..83f943913d2d212a84954615d49bc59670e455b6 GIT binary patch literal 716637 zcmagF1#sO^v{-9qNX+b*nc<o-wqtgT*UZe!OffSvGc&VeW@fx*W^P{p@0<3uok}B( zq|sh;wzPG$=8U8u4GDz+_8*g5w7kfF-}wJmC}7{f9373E6ci<lZ5Z|K?3h%5NMN6) zM86CFEf3%rU<&^kOYvV~vH!PNQCk})V;d*O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y& zyuOBO5PzMGq<*Z@43b@YIR{nyAJ>SB6Ki3;&~U93+;dw@f=}5gZj+BgIU&y9j%R+` zQGuETAs~<;Ae18SA&QpoH>143Lh9eYJi)FAwFh1FhDL!(3QmrXGZux;y&%5G!o81I zugczBLx5n={_yq;1&s;u{%yHNDu_b-ap6LsLg?$uiHIpEYp^iuJ35*GzbHwX+A<s3 z+pB6ILcEw0E9SoKYe-B8V*@N>a|0uTGdY0T8H!r)7w>mJaiM5X2_UQ9q59p4AWC@$ zK=MKSO*-eb>MiY?9HqDYMHccM78JtYr2e~nWC+B+Ya@It^4IOZsKBDC@%|q={K=vE zH#>0tg~R_J95Fjvps6j;@gG2#H>3VHAkn`7ef~R8&d^vv`ES_2kpIN~AAkR)r~fm} zcsD!*!~z8b1ofX-pOOC`_8-ppyC43^|9|@v;}3qW&*j@o|3Lf|QWj}rJ6oi`U<Lm- zuz&iX=--?Q{|D?@<l_g3f2PXc_4zA5{x`&*ad{T8`V;Z5iv1_>p9%YCDii;qQ?5_t xe+M$_{})^T$^A1)asP#Ta)|IxTmR#;_%kJ8VBca00spp^-$6iFAN>`U{{fqQkqiI; literal 0 HcmV?d00001 From 51eddd62af5e3f15bc7a06470b44b8f46ce92dc4 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 15 Feb 2013 18:38:49 +0100 Subject: [PATCH 286/623] no zip --- i386/libsaio/acpi/Tools/ssdtPRGen.zip | Bin 716637 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 i386/libsaio/acpi/Tools/ssdtPRGen.zip diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.zip b/i386/libsaio/acpi/Tools/ssdtPRGen.zip deleted file mode 100644 index 83f943913d2d212a84954615d49bc59670e455b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 716637 zcmagF1#sO^v{-9qNX+b*nc<o-wqtgT*UZe!OffSvGc&VeW@fx*W^P{p@0<3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Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 16 Feb 2013 02:42:08 +0100 Subject: [PATCH 287/623] Updating script to v4.1 Better feedback for Pike --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 51a5369..13a33ff 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 4.0 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 4.1 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -40,6 +40,7 @@ # - Bug fix, automatic revision update and better feedback (Pike, Februari 2013) # - Turned auto copy on (Jeroen, Februari 2013) # - Download IASL if it isn't there where we expect it (Pike, Februari 2013) +# - A sweet dreams update for Pike who wants better feedback (Jeroen, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -103,7 +104,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=4.0 +gScriptVersion=4.1 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -1221,7 +1222,7 @@ function _isRoot() function main() { printf "\nsdtPRGen.sh v$gScriptVersion Copyright (c) 2013 by Pike R. Alpha\n" - echo '-----------------------------------------------------' + echo '----------------------------------------------------------------' let modelSpecified=0 let maxTurboFrequency=0 @@ -1263,7 +1264,14 @@ function main() fi fi - echo "$bridgeTypeString Core $gProcessorNumber processor installed" + _getBoardID + + local modelID=$(_getModelName) + local cpu_type=$(_getCPUtype) + local currentSystemType=$(_getSystemType) + + echo "Generating SSDT.dsl for a $modelID [$boardID]" + echo "$bridgeTypeString Core $gProcessorNumber processor [0x$cpu_type] setup" # # gTypeCPU is greater than 0 when the processor is found in one of the CPU lists @@ -1333,7 +1341,7 @@ function main() fi fi - echo "$logicalCPUs logical CPU's detected with a Core Frequency of $frequency MHz" + echo "Number logical CPU's: $logicalCPUs (Core Frequency: $frequency MHz)" # # Check maxTurboFrequency @@ -1378,13 +1386,6 @@ function main() _printScopeStart $turboStates $packageLength _printPackages $gTdp $frequency $maxTurboFrequency - _getBoardID - - local modelID=$(_getModelName) - - local cpu_type=$(_getCPUtype) - local currentSystemType=$(_getSystemType) - if [ $gBridgeType -eq $IVY_BRIDGE ]; then local cpuTypeString="07" From 7f0d3b9f4de8476547208752d6b9310d78d4883a Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 16 Feb 2013 03:17:27 +0100 Subject: [PATCH 288/623] No more IB specific warnings for SB setups --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 51 +++++++++++++++------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 13a33ff..81acc82 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -116,9 +116,10 @@ gPath=~/Desktop gSsdtID=SSDT_PR gSsdtPR=${gPath}/${gSsdtID}.dsl -gDesktopCPU=1 -gMobileCPU=2 -gServerCPU=3 +gSandyCPU=1 +gDesktopCPU=2 +gMobileCPU=3 +gServerCPU=4 let gSystemType=0 @@ -975,7 +976,7 @@ function _getCPUDataByProcessorNumber fi if (!(($gTypeCPU))); then - __searchList "gSandyBridgeCPUList[@]" $gServerCPU + __searchList "gSandyBridgeCPUList[@]" $gSandyCPU fi } @@ -1234,19 +1235,15 @@ function main() _getCPUNumberFromBrandString - if [[ $# -eq 1 ]]; then - if [[ $1 == "" ]]; - then - if [[ $gProcessorNumber != 0 ]]; then - let model=0x3A - fi - else + if [[ $# -eq 1 ]]; + then + if [[ $1 != "" ]]; then if (( ("${1:0:4}" == "i3-3") || (${1:0:4} == "i5-3") || (${1:0:4} == "i7-3") || (${1:0:1} == "E") )); then let model=0x3A let modelSpecified=1 gProcessorNumber=$1 fi - fi + fi fi if (($model==0x2A || $model==0x2D)); @@ -1254,6 +1251,8 @@ function main() let gTdp=95 let gBridgeType=2 local bridgeTypeString="Sandy Bridge" + + _getCPUDataByProcessorNumber else let gTdp=77 let gBridgeType=4 @@ -1406,20 +1405,26 @@ function main() _showLowPowerStates - if [ ${cpu_type:0:2} -ne $cpuTypeString ]; then - echo "Warning: 'cpu-type' may be set improperly (0x$cpu_type instead of 0x$cpuTypeString${cpu_type:2:2})" - fi - - if [ $gSystemType -eq 0 ]; + # + # Some IB CPUPM specific configuration checks + # + if [ $gBridgeType -eq $IVY_BRIDGE ]; then - echo "Warning: 'board-id' [$boardID] is not supported by $bridgeTypeString PM" - else - if [ "$gMacModelIdentifier" != "$modelID" ]; then - echo "Error: board-id [$boardID] and model [$modelID] mismatch" + if [ ${cpu_type:0:2} -ne $cpuTypeString ]; then + echo "Warning: 'cpu-type' may be set improperly (0x$cpu_type instead of 0x$cpuTypeString${cpu_type:2:2})" fi - if [ $currentSystemType -ne $gSystemType ]; then - echo "Warning: 'system-type' may be set improperly ($currentSystemType instead of $gSystemType)" + if [ $gSystemType -eq 0 ]; + then + echo "Warning: 'board-id' [$boardID] is not supported by $bridgeTypeString PM" + else + if [ "$gMacModelIdentifier" != "$modelID" ]; then + echo "Error: board-id [$boardID] and model [$modelID] mismatch" + fi + + if [ $currentSystemType -ne $gSystemType ]; then + echo "Warning: 'system-type' may be set improperly ($currentSystemType instead of $gSystemType)" + fi fi fi } From b1a3f2b13d7bafda1c189336648c073f51f830e9 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 17 Feb 2013 16:48:14 +0100 Subject: [PATCH 289/623] AppleVTD wants DMAR --- i386/libsaio/acpi/essentials.h | 16 ++++++++++------ i386/libsaio/acpi/static_data.h | 6 ++++++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/i386/libsaio/acpi/essentials.h b/i386/libsaio/acpi/essentials.h index 255e179..a68a031 100644 --- a/i386/libsaio/acpi/essentials.h +++ b/i386/libsaio/acpi/essentials.h @@ -64,6 +64,7 @@ static ACPITable customTables[] = #if LOAD_MODEL_SPECIFIC_ACPI_DATA // Essential tables. { "APIC", APIC_Table, sizeof(APIC_Table), false, 0, "" }, + { "DMAR", DMAR_Table, sizeof(DMAR_Table), false, 0, "" }, { "ECDT", ECDT_Table, sizeof(ECDT_Table), false, 0, "" }, { "HPET", HPET_Table, sizeof(HPET_Table), false, 0, "" }, { "MCFG", MCFG_Table, sizeof(MCFG_Table), false, 0, "" }, @@ -84,6 +85,7 @@ static ACPITable customTables[] = #else // Essential tables. { "APIC", APIC_Table, sizeof(APIC_Table), false, 0 }, + { "DMAR", DMAR_Table, sizeof(DMAR_Table), false, 0 }, { "ECDT", ECDT_Table, sizeof(ECDT_Table), false, 0 }, { "HPET", HPET_Table, sizeof(HPET_Table), false, 0 }, { "MCFG", MCFG_Table, sizeof(MCFG_Table), false, 0 }, @@ -112,6 +114,7 @@ typedef enum // Essential tables. APIC, + DMAR, ECDT, HPET, MCFG, @@ -143,19 +146,19 @@ typedef enum // ACPI table signatures in little endian format. -#define RSDP_TABLE_SIGNATURE 0x50445352 -#define RSDT_TABLE_SIGNATURE 0x54445352 -#define XSDT_TABLE_SIGNATURE 0x54445358 #define APIC_TABLE_SIGNATURE 0x43495041 -#define ECDT_TABLE_SIGNATURE 0x54444345 +#define DMAR_TABLE_SIGNATURE 0x52414d44 #define DSDT_TABLE_SIGNATURE 0x54445344 +#define ECDT_TABLE_SIGNATURE 0x54444345 #define FACP_TABLE_SIGNATURE 0x50434146 #define FACS_TABLE_SIGNATURE 0x53434146 #define HPET_TABLE_SIGNATURE 0x54455048 -#define SBST_TABLE_SIGNATURE 0x54534253 #define MCFG_TABLE_SIGNATURE 0x4746434d +#define RSDP_TABLE_SIGNATURE 0x50445352 +#define RSDT_TABLE_SIGNATURE 0x54445352 +#define SBST_TABLE_SIGNATURE 0x54534253 #define SSDT_TABLE_SIGNATURE 0x54445353 - +#define XSDT_TABLE_SIGNATURE 0x54445358 typedef struct acpi_2_tables { @@ -169,6 +172,7 @@ typedef struct acpi_2_tables static ACPITables essentialTables[] = { { APIC, APIC_TABLE_SIGNATURE, replaceTable, kReplaceTable | kAddTable }, + { DMAR, DMAR_TABLE_SIGNATURE, NULL, kReplaceTable | kAddTable }, { NONE, FACP_TABLE_SIGNATURE, patchFACPTable, kPatchTable }, { HPET, HPET_TABLE_SIGNATURE, replaceTable, kReplaceTable }, { MCFG, MCFG_TABLE_SIGNATURE, NULL, kReplaceTable }, diff --git a/i386/libsaio/acpi/static_data.h b/i386/libsaio/acpi/static_data.h index e9bb4e7..8aa3ce0 100755 --- a/i386/libsaio/acpi/static_data.h +++ b/i386/libsaio/acpi/static_data.h @@ -21,6 +21,12 @@ static uint32_t APIC_Table[] = #endif }; +static uint32_t DMAR_Table[] = +{ +#if STATIC_DMAR_TABLE_INJECTION + STATIC_DMAR_TABLE_DATA +#endif +}; static uint32_t ECDT_Table[] = { From 87b774518fe16476fce90a839c727f45ea6eabb6 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 17 Feb 2013 16:53:00 +0100 Subject: [PATCH 290/623] Fix for compiler error no member named 'fileName' in 'struct static_acpi_2_table' with DEBUG_ACPI set to 1 --- i386/libsaio/acpi/patcher.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/patcher.h b/i386/libsaio/acpi/patcher.h index 72f9dc0..52e1503 100644 --- a/i386/libsaio/acpi/patcher.h +++ b/i386/libsaio/acpi/patcher.h @@ -263,7 +263,7 @@ bool patchFACPTable(ENTRIES * xsdtEntries, int tableIndex, int dropOffset) { #if STATIC_DSDT_TABLE_INJECTION _ACPI_DEBUG_DUMP("static DSDT data"); -#else // STATIC_DSDT_TABLE_INJECTION +#elif LOAD_MODEL_SPECIFIC_ACPI_DATA _ACPI_DEBUG_DUMP("%s", customTables[DSDT].fileName); #endif // STATIC_DSDT_TABLE_INJECTION _ACPI_DEBUG_DUMP(" @ 0x%x\n", customTables[DSDT].tableAddress); From e5b02da6f312611f53277a456b72e99ea9544775 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 17 Feb 2013 16:53:16 +0100 Subject: [PATCH 291/623] Experiment --- i386/libsaio/cpu/Intel/dynamic_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index 8223f6a..65a493c 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -406,7 +406,7 @@ void initCPUStruct(void) qpiSpeed = 0; // No QPI but DMI for Sandy Bridge processors. // Disable C1/C3 state auto demotion i.e. it won't change C3/C6/C7 requests to C1/C3. - wrmsr64(MSR_PKG_CST_CONFIG_CONTROL, 0x18000003ULL); + wrmsr64(MSR_PKG_CST_CONFIG_CONTROL, 0x1E000003ULL); // Disable EIST Hardware coordination (letting AICPUPM.kext handle it). msr = rdmsr64(MSR_MISC_PWR_MGMT); From 59efc98b52a6a3412565825236dc3fae5d15996f Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 18 Feb 2013 05:14:27 +0100 Subject: [PATCH 292/623] First set of Haswell processors added --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 81acc82..32aacd2 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -41,6 +41,7 @@ # - Turned auto copy on (Jeroen, Februari 2013) # - Download IASL if it isn't there where we expect it (Pike, Februari 2013) # - A sweet dreams update for Pike who wants better feedback (Jeroen, Februari 2013) +# - First set of Haswell processors added (Pike/Jeroen, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -120,6 +121,7 @@ gSandyCPU=1 gDesktopCPU=2 gMobileCPU=3 gServerCPU=4 +gHaswellCPU=5 let gSystemType=0 @@ -271,6 +273,29 @@ i3-3120M,35,0,2500,0,2,4 i3-3110M,35,0,2400,0,2,4 ) +# +# New Haswell processors with HD-4600 graphics +# + +gDesktopHaswellCPUList=( +# Socket 1150 (Standard Power) +i7-4770K,84,00,3500,3900,4,8 +i7-4770,84,0,3400,3900,4,8 +i5-4670K,84,0,3400,3800,4,4 +i5-4670,84,0,3400,3800,4,4 +i5-4570,84,0,3200,3600,4,4 +i5-4430,84,0,3000,3200,4,4 +# Socket 1150 (Low Power) +i7-4770S,65,0,3100,3900,4,8 +i7-4770T,45,0,2500,3700,4,8 +i7-4765T,35,0,2000,3000,4,8 +i5-4670S,65,0,3100,3800,4,4 +i5-4670T,45,0,2300,3300,4,4 +i5-4570S,65,0,2900,3600,4,4 +i5-4570T,35,0,2900,3600,2,4 +i5-4430S,65,0,2700,3200,4,4 +) + #-------------------------------------------------------------------------------- function _printHeader() @@ -978,6 +1003,10 @@ function _getCPUDataByProcessorNumber if (!(($gTypeCPU))); then __searchList "gSandyBridgeCPUList[@]" $gSandyCPU fi + + if (!(($gTypeCPU))); then + __searchList "gDesktopHaswellCPUList[@]" $gHaswellCPU + fi } #-------------------------------------------------------------------------------- From 71687183ffa571f8e956fdece6dbbcaaaa0fcd5b Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 18 Feb 2013 16:33:59 +0100 Subject: [PATCH 293/623] Updating script to v4.2 More rigid testing for user errors Getting ready for new Haswell setups --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 257 ++++++++++++++++----------- 1 file changed, 156 insertions(+), 101 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 32aacd2..c3316d9 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 4.1 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 4.2 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -42,6 +42,8 @@ # - Download IASL if it isn't there where we expect it (Pike, Februari 2013) # - A sweet dreams update for Pike who wants better feedback (Jeroen, Februari 2013) # - First set of Haswell processors added (Pike/Jeroen, Februari 2013) +# - More rigid testing for user errors (Pike/Jeroen, Februari 2013) +# - Getting ready for new Haswell setups (Pike/Jeroen, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -55,12 +57,12 @@ # # Change this to 0 when your CPU isn't stuck in Low Frequency Mode! # -gIvyWorkAround=1 +let gIvyWorkAround=1 # # Asks for your confirmation to copy SSDT_PR.aml to /Extra/SSDT.aml (example) # -gAutoCopy=1 +let gAutoCopy=1 # # This is the target location that SSDT.aml will be copied to. @@ -79,22 +81,22 @@ gDestinationFile="SSDT.aml" # # Note: Will be set to 0 when we failed to locate a copy of iasl! # -gCallIasl=1 +let gCallIasl=1 # # A value of 1 will make this script open SSDT_PR.dsl in the editor of your choice. # -gCallOpen=0 +let gCallOpen=0 # # Change this to 0 to stop it from injecting debug data. # -gDebug=1 +let gDebug=1 # # Lowest possible idle frequency (user configurable). Also known as Low Frequency Mode. # -gBaseFrequency=1600 +let gBaseFrequency=1600 # # Change this label to "P00" when your DSDT uses 'P00n' instead of 'CPUn'. @@ -105,7 +107,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=4.1 +gScriptVersion=4.2 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -120,23 +122,34 @@ gSsdtPR=${gPath}/${gSsdtID}.dsl gSandyCPU=1 gDesktopCPU=2 gMobileCPU=3 -gServerCPU=4 -gHaswellCPU=5 +let gServerCPU=4 +let gHaswellCPU=5 let gSystemType=0 -gACST_CPU0=13 -gACST_CPU1=7 +let gACST_CPU0=13 +let gACST_CPU1=7 gMacModelIdentifier="" -IVY_BRIDGE=4 -SANDY_BRIDGE=2 +let HASWELL=8 +let IVY_BRIDGE=4 +let SANDY_BRIDGE=2 -gTypeCPU=0 +let gTypeCPU=0 gProcessorData="Unknown CPU" gProcessorNumber="" +# +# Maximum Turbo Clock Speed (user configurable) +# +let gMaxOCFrequency=5000 + +let MAX_TURBO_FREQUENCY_ERROR=2 +let MAX_TDP_ERROR=3 +let TARGET_CPU_ERROR=4 +let PROCESSOR_NUMBER_ERROR=5 + # # Processor Number, Max TDP, Low Frequency Mode, Clock Speed, Max Turbo Frequency, Cores, Threads # @@ -771,33 +784,32 @@ function _printScopeACST() function _printScopeCPUn() { - let currentCPU=1; - - while [ $currentCPU -lt $1 ]; do - echo '' >> $gSsdtPR - echo ' Scope (\_PR.'$gProcLabel$currentCPU')' >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' Method (APSS, 0, NotSerialized) { Return (\_PR.'$gProcLabel'0.APSS) }' >> $gSsdtPR - - # - # IB CPUPM tries to parse/execute CPUn.ACST (see debug data) and thus we add - # this method, conditionally, since SB CPUPM doesn't seem to care about it. - # - if [ $gBridgeType -eq $IVY_BRIDGE ] - then - if [ $currentCPU -eq 1 ]; - then - _printScopeACST 1 - else - echo ' Method (ACST, 0, NotSerialized) { Return (\_PR.'$gProcLabel'1.ACST ()) }' >> $gSsdtPR - fi - fi - - echo ' }' >> $gSsdtPR - let currentCPU+=1 - done - - echo '}' >> $gSsdtPR + let currentCPU=1; + + while [ $currentCPU -lt $1 ]; do + echo '' >> $gSsdtPR + echo ' Scope (\_PR.'$gProcLabel$currentCPU')' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Method (APSS, 0, NotSerialized) { Return (\_PR.'$gProcLabel'0.APSS) }' >> $gSsdtPR + + # + # IB CPUPM tries to parse/execute CPUn.ACST (see debug data) and thus we add + # this method, conditionally, since SB CPUPM doesn't seem to care about it. + # + if [ $gBridgeType -ge $IVY_BRIDGE ]; then + if [ $currentCPU -eq 1 ]; + then + _printScopeACST 1 + else + echo ' Method (ACST, 0, NotSerialized) { Return (\_PR.'$gProcLabel'1.ACST ()) }' >> $gSsdtPR + fi + fi + + echo ' }' >> $gSsdtPR + let currentCPU+=1 + done + + echo '}' >> $gSsdtPR } #-------------------------------------------------------------------------------- @@ -1044,7 +1056,7 @@ function _showLowPowerStates() # __print $gACST_CPU0 0 - if ((gBridgeType == $IVY_BRIDGE)); then + if [ $gBridgeType -ge $IVY_BRIDGE ]; then __print $gACST_CPU1 1 fi } @@ -1231,20 +1243,26 @@ function _initIvyBridgeSetup() esac } -#-------------------------------------------------------------------------------- -# -# Only administrators (root) are allowed to run this script. -# #-------------------------------------------------------------------------------- -function _isRoot() +function _exitWithError() { - if [ $(id -u) != 0 ]; then - echo "This script must be run as root" 1>&2 - exit 1 - fi - - echo 1 + case "$1" in + 2) echo -e "\nError: 'MaxTurboFrequency' must be in the range of $frequency-gMaxOCFrequency... exiting\n" 1>&2 + exit 2 + ;; + 3) echo -e "\nError: 'TDP' must be in the range of 10-150 Watts... exiting\n" 1>&2 + exit 3 + ;; + 4) echo -e "\nError: 'BridgeType' must be 0, 1 or 2... exiting\n" 1>&2 + exit 4 + ;; + 5) echo -e "\nError: Unknown processor number... exiting\n" 1>&2 + exit 5 + ;; + *) exit 1 + ;; + esac } #-------------------------------------------------------------------------------- @@ -1264,32 +1282,45 @@ function main() _getCPUNumberFromBrandString - if [[ $# -eq 1 ]]; - then - if [[ $1 != "" ]]; then - if (( ("${1:0:4}" == "i3-3") || (${1:0:4} == "i5-3") || (${1:0:4} == "i7-3") || (${1:0:1} == "E") )); then - let model=0x3A - let modelSpecified=1 - gProcessorNumber=$1 - fi + if [[ $# -eq 1 ]]; then + if [[ $1 != "" ]]; then + # Ivy Bridge checks + if [[ ${1:0:4} == "i3-3" || ${1:0:4} == "i5-3" || ${1:0:4} == "i7-3" || ${1:2:2} == "E3" ]]; then + let model=0x3A + let modelSpecified=1 + gProcessorNumber=$1 fi + # Haswell checks + if [[ ${1:0:4} == "i3-4" || ${1:0:4} == "i5-4" || ${1:0:4} == "i7-4" || ${1:2:2} == "E4" ]]; then + let model=0x4A + let modelSpecified=1 + gProcessorNumber=$1 + fi + fi fi - if (($model==0x2A || $model==0x2D)); - then - let gTdp=95 - let gBridgeType=2 - local bridgeTypeString="Sandy Bridge" + if (($model==0x2A || $model==0x2D)); then + let gTdp=95 + let gBridgeType=2 + local bridgeTypeString="Sandy Bridge" - _getCPUDataByProcessorNumber - else - let gTdp=77 - let gBridgeType=4 - local bridgeTypeString="Ivy Bridge" + _getCPUDataByProcessorNumber + fi - if (($model==0x3A || $model==0x3B)); then - _getCPUDataByProcessorNumber - fi + if (($model==0x3A || $model==0x3B)); then + let gTdp=77 + let gBridgeType=4 + local bridgeTypeString="Ivy Bridge" + + _getCPUDataByProcessorNumber + fi + + if (($model==0x4A || $model==0x4B)); then + let gTdp=84 + let gBridgeType=8 + local bridgeTypeString="Haswell" + + _getCPUDataByProcessorNumber fi _getBoardID @@ -1321,7 +1352,7 @@ function main() let logicalCPUs=${cpuData[6]} IFS=$ifs - echo 'Using a maximum TDP of '$gTdp' Watt, as specified by Intel' + echo 'With a maximum TDP of '$gTdp' Watt, as specified by Intel' # # Check Low Frequency Mode (may be 0 aka still unknown) @@ -1334,7 +1365,7 @@ function main() echo 'Now using 1200 MHz for Mobile processor' let gBaseFrequency=1200 else - echo 'Now using 1600 MHz for Server/Desktop processor' + echo 'Now using 1600 MHz for Server/Desktop processors' let gBaseFrequency=1600 fi fi @@ -1346,26 +1377,50 @@ function main() if (!(($modelSpecified))); then # - # Command line arguments (used as override values). + # One arguments given (should be a number) # - if [[ $# -ge 1 && $1 != "" ]]; then - let maxTurboFrequency=$1 + if [[ $# -ge 1 && "$1" =~ ^[0-9]+$ ]]; + then + if [[ $1 -lt $frequency || $1 -gt $gMaxOCFrequency ]]; + then + _exitWithError $MAX_TURBO_FREQUENCY_ERROR + else + let maxTurboFrequency=$1 + fi + else + _exitWithError $MAX_TURBO_FREQUENCY_ERROR fi - if [ $# -ge 2 ]; then - let gTdp=$2 - echo "Max TDP override, now using: $gTdp Watt" + if [[ $# -ge 2 && "$2" =~ ^[0-9]+$ ]]; + then + if [[ $2 -lt 10 || -gt 150 ]]; + then + _exitWithError $MAX_TDP_ERROR + else + let gTdp=$2 + echo "Override value: Max TDP, now using: $gTdp Watt!" + fi + else + _exitWithError $MAX_TDP_ERROR fi - if [ $# -eq 3 ]; then - if [ $3 -eq 0 ]; - then - let gBridgeType=2 - echo "CPU type override, now using: Sandy Bridge" - else - let gBridgeType=4 - echo "CPU type override, now using: Ivy Bridge" - fi + if [[ $# -eq 3 && "$3" =~ ^[0-9]+$ ]]; + then + case "$3" in + 0) let gBridgeType=2 + echo "Override value: CPU type, now using: Sandy Bridge!" + ;; + 1) let gBridgeType=4 + echo "Override value: CPU type, now using: Ivy Bridge!" + ;; + 2) let gBridgeType=8 + echo "Override value: CPU type, now using: Haswell!" + ;; + *) _exitWithError $TARGET_CPU_ERROR + ;; + esac + else + _exitWithError $TARGET_CPU_ERROR fi fi @@ -1375,9 +1430,7 @@ function main() # Check maxTurboFrequency # if [ $maxTurboFrequency == 0 ]; then - printf "\nError: Unknown processor number... exiting\n" - echo "Try: $0 MaxTurboFrequency [TDP (Watts) CPU (0=SandyBridge, 1=IvyBridge)]" - exit 1 + _exitWithError $PROCESSOR_NUMBER_ERROR fi # @@ -1414,21 +1467,21 @@ function main() _printScopeStart $turboStates $packageLength _printPackages $gTdp $frequency $maxTurboFrequency - if [ $gBridgeType -eq $IVY_BRIDGE ]; + if [ $gBridgeType -eq $SANDY_BRIDGE ]; then - local cpuTypeString="07" + local cpuTypeString="06" - _initIvyBridgeSetup + _initSandyBridgeSetup _printScopeACST 0 - _printMethodDSM _printScopeCPUn $logicalCPUs else - local cpuTypeString="06" + local cpuTypeString="07" - _initSandyBridgeSetup + _initIvyBridgeSetup _printScopeACST 0 + _printMethodDSM _printScopeCPUn $logicalCPUs fi @@ -1460,6 +1513,8 @@ function main() #==================================== START ===================================== +clear + main "$1" $2 $3 _findIasl From c03ce1647d89adfcb77923c6987b41aa849253df Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 18 Feb 2013 17:33:00 +0100 Subject: [PATCH 294/623] Updating script to v4.3 Typo and ssdtPRGen.command breakage fixed --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 89 +++++++++++++++------------- 1 file changed, 48 insertions(+), 41 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index c3316d9..63490c5 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 4.2 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 4.3 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -44,6 +44,7 @@ # - First set of Haswell processors added (Pike/Jeroen, Februari 2013) # - More rigid testing for user errors (Pike/Jeroen, Februari 2013) # - Getting ready for new Haswell setups (Pike/Jeroen, Februari 2013) +# - Typo and ssdtPRGen.command breakage fixed (Jeroen, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -107,7 +108,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=4.2 +gScriptVersion=4.3 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -1248,7 +1249,7 @@ function _initIvyBridgeSetup() function _exitWithError() { case "$1" in - 2) echo -e "\nError: 'MaxTurboFrequency' must be in the range of $frequency-gMaxOCFrequency... exiting\n" 1>&2 + 2) echo -e "\nError: 'MaxTurboFrequency' must be in the range of $frequency-$gMaxOCFrequency... exiting\n" 1>&2 exit 2 ;; 3) echo -e "\nError: 'TDP' must be in the range of 10-150 Watts... exiting\n" 1>&2 @@ -1379,48 +1380,54 @@ function main() # # One arguments given (should be a number) # - if [[ $# -ge 1 && "$1" =~ ^[0-9]+$ ]]; - then - if [[ $1 -lt $frequency || $1 -gt $gMaxOCFrequency ]]; - then - _exitWithError $MAX_TURBO_FREQUENCY_ERROR - else - let maxTurboFrequency=$1 - fi - else - _exitWithError $MAX_TURBO_FREQUENCY_ERROR + if [[ $# -ge 1 && $1 != "" ]]; then + if [[ "$1" =~ ^[0-9]+$ ]]; + then + if [[ $1 -lt $frequency || $1 -gt $gMaxOCFrequency ]]; + then + _exitWithError $MAX_TURBO_FREQUENCY_ERROR + else + let maxTurboFrequency=$1 + fi + else + _exitWithError $MAX_TURBO_FREQUENCY_ERROR + fi fi - if [[ $# -ge 2 && "$2" =~ ^[0-9]+$ ]]; - then - if [[ $2 -lt 10 || -gt 150 ]]; - then - _exitWithError $MAX_TDP_ERROR - else - let gTdp=$2 - echo "Override value: Max TDP, now using: $gTdp Watt!" - fi - else - _exitWithError $MAX_TDP_ERROR + if [ $# -ge 2 ]; then + if [[ "$2" =~ ^[0-9]+$ ]]; + then + if [[ $2 -lt 10 || -gt 150 ]]; + then + _exitWithError $MAX_TDP_ERROR + else + let gTdp=$2 + echo "Override value: Max TDP, now using: $gTdp Watt!" + fi + else + _exitWithError $MAX_TDP_ERROR + fi fi - if [[ $# -eq 3 && "$3" =~ ^[0-9]+$ ]]; - then - case "$3" in - 0) let gBridgeType=2 - echo "Override value: CPU type, now using: Sandy Bridge!" - ;; - 1) let gBridgeType=4 - echo "Override value: CPU type, now using: Ivy Bridge!" - ;; - 2) let gBridgeType=8 - echo "Override value: CPU type, now using: Haswell!" - ;; - *) _exitWithError $TARGET_CPU_ERROR - ;; - esac - else - _exitWithError $TARGET_CPU_ERROR + if [ $# -eq 3 ]; then + if [[ "$3" =~ ^[0-9]+$ ]]; + then + case "$3" in + 0) let gBridgeType=2 + echo "Override value: CPU type, now using: Sandy Bridge!" + ;; + 1) let gBridgeType=4 + echo "Override value: CPU type, now using: Ivy Bridge!" + ;; + 2) let gBridgeType=8 + echo "Override value: CPU type, now using: Haswell!" + ;; + *) _exitWithError $TARGET_CPU_ERROR + ;; + esac + else + _exitWithError $TARGET_CPU_ERROR + fi fi fi From a691efbb9814837be0d635c4f83744760f2ffbde Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 19 Feb 2013 13:22:49 +0100 Subject: [PATCH 295/623] Fixing a few silly typos --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 63490c5..c6b3f1d 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -874,13 +874,12 @@ function _getSystemType() function _findIasl() { - if ((gCallIasl)); then + if (($gCallIasl)); then # # First we do a quick lookup of iasl (should be there after the first run) # if [ ! -f /usr/local/bin/iasl ]; then - echo -e - echo 'IASL not found. Downloading iasl...' + echo -e "\nIASL not found. Downloading iasl..." sudo curl -o /usr/local/bin/iasl https://raw.github.com/Piker-Alpha/RevoBoot/clang/i386/libsaio/acpi/Tools/iasl sudo chmod +x /usr/local/bin/iasl echo 'Done.' @@ -1330,7 +1329,7 @@ function main() local cpu_type=$(_getCPUtype) local currentSystemType=$(_getSystemType) - echo "Generating SSDT.dsl for a $modelID [$boardID]" + echo "Generating ${gSsdtID}.dsl for a $modelID [$boardID]" echo "$bridgeTypeString Core $gProcessorNumber processor [0x$cpu_type] setup" # @@ -1526,7 +1525,7 @@ main "$1" $2 $3 _findIasl -if ((gCallIasl)); then +if (($gCallIasl)); then # # Compile SSDT.dsl # @@ -1541,7 +1540,8 @@ if ((gCallIasl)); then read -p "Do you want to copy ${gPath}/${gSsdtID}.aml to ${gDestinationPath}${gDestinationFile}? (y/n)?" choice case "$choice" in y|Y ) _setDestinationPath - sudo cp ${gPath}/${gSsdtID}.aml ${gDestinationPath}${gDestinationFile};; + sudo cp ${gPath}/${gSsdtID}.aml ${gDestinationPath}${gDestinationFile} + ;; esac fi fi From 6083f258ada2348cb8ceef17ee7094f1a88ff939 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 19 Feb 2013 19:24:49 +0100 Subject: [PATCH 296/623] Updating script to v4.5 Target folder check added for _findIASL --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index c6b3f1d..c24d167 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 4.3 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 4.5 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -45,6 +45,7 @@ # - More rigid testing for user errors (Pike/Jeroen, Februari 2013) # - Getting ready for new Haswell setups (Pike/Jeroen, Februari 2013) # - Typo and ssdtPRGen.command breakage fixed (Jeroen, Februari 2013) +# - Target folder check added for _findIASL (Pike, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -108,7 +109,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=4.3 +gScriptVersion=4.5 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -876,10 +877,19 @@ function _findIasl() { if (($gCallIasl)); then # - # First we do a quick lookup of iasl (should be there after the first run) + # Then we do a quick lookup of iasl (should also be there after the first run) # if [ ! -f /usr/local/bin/iasl ]; then - echo -e "\nIASL not found. Downloading iasl..." + printf "\nIASL not found. " + # + # First we check the target directory (should be there after the first run) + # + if [ ! -d /usr/local/bin ]; then + printf "Creating target directory... " + sudo mkdir /usr/local/bin/ + fi + + printf "Downloading iasl...\n" sudo curl -o /usr/local/bin/iasl https://raw.github.com/Piker-Alpha/RevoBoot/clang/i386/libsaio/acpi/Tools/iasl sudo chmod +x /usr/local/bin/iasl echo 'Done.' From 9352ed71a5f3ed5f786938bddee78abd22f30cc7 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 21 Feb 2013 07:39:40 +0100 Subject: [PATCH 297/623] Updating script to 4.6 Set $baseFreqyency to $lfm when the latter isn't zero --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 32 +++++++++++++++++----------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index c24d167..5fbb4c8 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 4.5 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 4.6 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -46,6 +46,7 @@ # - Getting ready for new Haswell setups (Pike/Jeroen, Februari 2013) # - Typo and ssdtPRGen.command breakage fixed (Jeroen, Februari 2013) # - Target folder check added for _findIASL (Pike, Februari 2013) +# - Set $baseFreqyency to $lfm when the latter isn't zero (Pike, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -109,7 +110,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=4.5 +gScriptVersion=4.6 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -884,6 +885,7 @@ function _findIasl() # # First we check the target directory (should be there after the first run) # + # XXX: Jeroen, try curl --create-dirs without the mkdir here ;) if [ ! -d /usr/local/bin ]; then printf "Creating target directory... " sudo mkdir /usr/local/bin/ @@ -891,6 +893,7 @@ function _findIasl() printf "Downloading iasl...\n" sudo curl -o /usr/local/bin/iasl https://raw.github.com/Piker-Alpha/RevoBoot/clang/i386/libsaio/acpi/Tools/iasl +# sudo curl https://raw.github.com/Piker-Alpha/RevoBoot/clang/i386/libsaio/acpi/Tools/iasl -o /usr/local/bin/iasl --create-dirs sudo chmod +x /usr/local/bin/iasl echo 'Done.' fi @@ -1367,17 +1370,20 @@ function main() # # Check Low Frequency Mode (may be 0 aka still unknown) # - if (($lfm == 0)); then - echo 'Warning: Low Frequency Mode is 0 (unknown)' - - if (($gTypeCPU == gMobileCPU)); - then - echo 'Now using 1200 MHz for Mobile processor' - let gBaseFrequency=1200 - else - echo 'Now using 1600 MHz for Server/Desktop processors' - let gBaseFrequency=1600 - fi + if (($lfm > 0)); + then + let gBaseFrequency=$lfm + else + echo 'Warning: Low Frequency Mode is 0 (unknown)' + + if (($gTypeCPU == gMobileCPU)); + then + echo 'Now using 1200 MHz for Mobile processor' + let gBaseFrequency=1200 + else + echo 'Now using 1600 MHz for Server/Desktop processors' + let gBaseFrequency=1600 + fi fi else let logicalCPUs=$(echo `sysctl machdep.cpu.thread_count` | sed -e 's/^machdep.cpu.thread_count: //') From 285d26d28f10794e257d18ab1fede4036bcbb45a Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 21 Feb 2013 10:39:16 +0100 Subject: [PATCH 298/623] Updating script to v4.7 Check PlatformSupport.plist for supported model/board-id added --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 43 ++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 5fbb4c8..e0de8cb 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 4.6 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 4.7 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -47,6 +47,7 @@ # - Typo and ssdtPRGen.command breakage fixed (Jeroen, Februari 2013) # - Target folder check added for _findIASL (Pike, Februari 2013) # - Set $baseFreqyency to $lfm when the latter isn't zero (Pike, Februari 2013) +# - Check PlatformSupport.plist for supported model/board-id added (Jeroen, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -110,7 +111,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=4.6 +gScriptVersion=4.7 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -1076,6 +1077,43 @@ function _showLowPowerStates() #-------------------------------------------------------------------------------- +function _checkPlatformSupport() +{ + # + # Local function definition + # + function __searchList() + { + local data=`awk '/<key>'${1}'<\/key>.*/,/<\/array>/' /System/Library/CoreServices/PlatformSupport.plist` + local targetList=(`echo $data | egrep -o '(<string>.*</string>)' | sed -e 's/<\/*string>//g'`) + + for item in "${targetList[@]}" + do + + if [ "$item" == "$2" ]; then + return 1 + fi + done + + return 0 + } + + __searchList 'SupportedModelProperties' $1 + + if (($? == 0)); then + echo 'Warning: Model identifier ['$1'] is missing from: /S*/L*/CoreServices/PlatformSupport.plist' + fi + + __searchList 'SupportedBoardIds' $2 + + if (($? == 0)); then + echo 'Warning: boardID ['$2'] is missing from: /S*/L*/CoreServices/PlatformSupport.plist' + + fi +} + +#-------------------------------------------------------------------------------- + function _checkSMCKeys() { # @@ -1508,6 +1546,7 @@ function main() fi _showLowPowerStates + _checkPlatformSupport $modelID $boardID # # Some IB CPUPM specific configuration checks From 9bf4c34a04d63139277f2a87f438dd493622c32c Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 23 Feb 2013 07:14:53 +0100 Subject: [PATCH 299/623] Updating script to v4.9 New/expanded Sandy Bridge CPU lists, thanks to Francis More preparations for the official Haswell launch Fix for home directory with space characters --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 209 ++++++++++++++++++++------- 1 file changed, 157 insertions(+), 52 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index e0de8cb..f768fee 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 4.7 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 4.9 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -48,6 +48,9 @@ # - Target folder check added for _findIASL (Pike, Februari 2013) # - Set $baseFreqyency to $lfm when the latter isn't zero (Pike, Februari 2013) # - Check PlatformSupport.plist for supported model/board-id added (Jeroen, Februari 2013) +# - New/expanded Sandy Bridge CPU lists, thanks to Francis (Jeroen, Februari 2013) +# - More preparations for the official Haswell launch (Pike, Februari 2013) +# - Fix for home directory with space characters (Pike, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -111,7 +114,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=4.7 +gScriptVersion=4.9 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -120,14 +123,12 @@ gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' # gPath=~/Desktop -gSsdtID=SSDT_PR -gSsdtPR=${gPath}/${gSsdtID}.dsl +gSsdtID="SSDT_PR" +gSsdtPR="${gPath}/${gSsdtID}.dsl" -gSandyCPU=1 -gDesktopCPU=2 -gMobileCPU=3 -let gServerCPU=4 -let gHaswellCPU=5 +let gDesktopCPU=1 +let gMobileCPU=2 +let gServerCPU=3 let gSystemType=0 @@ -158,10 +159,7 @@ let PROCESSOR_NUMBER_ERROR=5 # Processor Number, Max TDP, Low Frequency Mode, Clock Speed, Max Turbo Frequency, Cores, Threads # -gSandyBridgeCPUList=( -i5-2500K,95,1600,3300,3700,4,4 -i7-2600K,95,1600,3400,3800,4,8 -i7-2700K,95,1600,3500,3900,4,8 +gServerSandyBridgeCPUList=( # E3-1200 Xeon Processor Series E3-1290,95,0,3600,4000,4,8 E3-1280,95,0,3500,3900,4,8 @@ -177,6 +175,96 @@ E3-1220L,20,0,2200,3400,2,4 E3-1220,80,0,3100,3400,4,4 ) +gDesktopSandyBridgeCPUList=( +# i7 Desktop series +i7-2600S,65,1600,2800,3800,4,8 +i7-2600,95,1600,3400,3800,4,8 +i7-2600K,95,1600,3400,3800,4,8 +i7-2700K,95,1600,3500,3900,4,8 +i7-3930K,130,1600,3200,3800,6,12 +i7-3820,130,1600,3600,3800,4,8 +# i5 Desktop Series +i5-2300,95,1600,2800,3100,4,4 +i5-2310,95,1600,2900,3200,4,4 +i5-2320,95,1600,3000,3300,4,4 +i5-2380P,95,1600,3100,3400,4,4 +i5-2390T,35,1600,2700,3500,2,4 +i5-2400S,65,1600,2500,3300,4,4 +i5-2405S,65,1600,2500,3300,4,4 +i5-2400,95,1600,3100,3400,4,4 +i5-2450P,95,1600,3200,3500,4,4 +i5-2500T,45,1600,2300,3300,4,4 +i5-2500S,65,1600,2700,3700,4,4 +i5-2500,95,1600,3300,3700,4,4 +i5-2500K,95,1600,3300,3700,4,4 +i5-2550K,95,1600,3400,3800,4,4 +# i3 1200 Desktop Series +i3-2130,65,1600,3400,0,2,4 +i3-2125,65,1600,3300,0,2,4 +i3-2120T,35,1600,2600,0,2,4 +i3-2120,65,1600,3300,0,2,4 +i3-2115C,25,1600,2000,0,2,4 +i3-2105,65,1600,3100,0,2,4 +i3-2102,65,1600,3100,0,2,4 +i3-2100T,35,1600,2500,0,2,4 +i3-2100,65,1600,3100,0,2,4 +) + +gMobileSandyBridgeCPUList=( +# i7 Mobile Extreme Series +i7-2960XM,55,0,2700,3700,4,8 +i7-2920XM,55,0,2500,3500,4,8 +# i7 Mobile Series +i7-2860QM,45,0,2500,3600,4,8 +i7-2820QM,45,0,2300,3400,4,8 +i7-2760QM,45,0,2400,3500,4,8 +i7-2720QM,45,0,2200,3300,4,8 +i7-2715QE,45,0,2100,3000,4,8 +i7-2710QE,45,0,2100,3000,4,8 +i7-2677M,17,0,1800,2900,2,4 +i7-2675QM,45,0,2200,3100,4,8 +i7-2670QM,45,0,2200,3100,4,8 +i7-2675M,17,0,1600,2700,2,4 +i7-2655LE,25,0,2200,2900,2,4 +i7-2649M,25,0,2300,3200,2,4 +i7-26740M,32,0,2800,3500,2,4 +i7-2637M,17,0,1700,2800,2,4 +i7-2635QM,45,0,2000,2900,4,8 +i7-2630QM,45,0,2000,2900,4,8 +i7-2629M,25,0,2100,3000,2,4 +i7-2620M,35,0,2700,3400,2,4 +i7-2617M,17,0,1500,2600,2,4 +i7-2610UE,17,0,1500,2400,2,4 +# i5 Mobile Series +i5-2467M,17,0,1600,2300,2,4 +i5-2450M,35,0,2300,3100,2,4 +i5-2435M,35,0,2400,3000,2,4 +i5-2430M,35,0,2400,3000,2,4 +i5-2410M,35,0,2300,2900,2,4 +i5-2557M,17,0,1700,2700,2,4 +i5-2540M,35,0,2600,3300,2,4 +i5-2537M,17,0,1400,2300,2,4 +i5-2520M,35,0,2500,3200,2,4 +i5-2515E,35,0,2500,3100,2,4 +i5-2510E,35,0,2500,3100,2,4 +# i3 2300 Mobile Series +i3-2377M,17,0,1500,0,2,4 +i3-2370M,35,0,2400,0,2,4 +i3-2367M,17,0,1400,0,2,4 +i3-2365M,17,0,1400,0,2,4 +i3-2357M,17,0,1300,0,2,4 +i3-2350M,35,0,2300,0,2,4 +i3-2348M,35,0,2300,0,2,4 +i3-2340UE,17,0,1300,0,2,4 +i3-2330M,35,0,2200,0,2,4 +i3-2330E,35,0,2200,0,2,4 +i3-2328M,35,0,2200,0,2,4 +i3-2312M,35,0,2100,0,2,4 +i3-2310M,35,0,2100,0,2,4 +i3-2310E,35,0,2100,0,2,4 +) + + # # Processor Number, Max TDP, Low Frequency Mode, Clock Speed, Max Turbo Frequency, Cores, Threads # @@ -199,6 +287,9 @@ gServerIvyBridgeCPUList=( ) gDesktopIvyBridgeCPUList=( +# i7 Desktop Extreme Series +i7-3970X,150,1600,3500,4000,6,12 +i7-3960X,130,1600,3300,3900,6,12 # i7-3700 Desktop Processor Series i7-3770T,45,1600,2500,3700,4,8 i7-3770S,65,1600,3100,3900,4,8 @@ -291,8 +382,10 @@ i3-3110M,35,0,2400,0,2,4 ) # -# New Haswell processors with HD-4600 graphics +# New Haswell processors (with HD-4600 graphics) # +gServerHaswellCPUList=( +) gDesktopHaswellCPUList=( # Socket 1150 (Standard Power) @@ -313,6 +406,9 @@ i5-4570T,35,0,2900,3600,2,4 i5-4430S,65,0,2700,3200,4,4 ) +gMobileHaswellCPUList=( +) + #-------------------------------------------------------------------------------- function _printHeader() @@ -594,10 +690,9 @@ function _printScopeACST() # # C-States override for Mobile processors (CPU0 only) # - if (($gTypeCPU == $gMobileCPU)); - then - echo 'Adjusting C-States for detected (mobile) processor' - gACST_CPU0=29 + if (($gTypeCPU == $gMobileCPU)); then + echo 'Adjusting C-States for detected (mobile) processor' + gACST_CPU0=29 fi let targetCStates=$gACST_CPU0 @@ -995,43 +1090,50 @@ function _getCPUDataByProcessorNumber function __searchList() { local ifs=$IFS - local targetCPUList=("${!1}") - - for cpuData in "${targetCPUList[@]}" + let targetType=0 + + case $1 in + 2) local cpuSpecLists=("gDesktopSandyBridgeCPUList[@]" "gMobileSandyBridgeCPUList[@]" "gServerSandyBridgeCPUList[@]") + ;; + 4) local cpuSpecLists=("gDesktopIvyBridgeCPUList[@]" "gMobileIvyBridgeCPUList[@]" "gServerIvyBridgeCPUList[@]") + ;; + 8) local cpuSpecLists=("gDesktopHaswellCPUList[@]" "gMobileHaswellCPUList[@]" "gHaswellCPUList[@]") + ;; + esac + + for cpuList in ${cpuSpecLists[@]} do - IFS="," - data=($cpuData) - - if [[ ${data[0]} == $gProcessorNumber ]]; then - gProcessorData="$cpuData" - let gTypeCPU=$2 - IFS=$ifs - return - fi + let targetType+=1 + local targetCPUList=("${!cpuList}") + + for cpuData in "${targetCPUList[@]}" + do + IFS="," + data=($cpuData) + + if [[ ${data[0]} == $gProcessorNumber ]]; then + gProcessorData="$cpuData" + let gTypeCPU=$targetType + IFS=$ifs + return + fi + done done IFS=$ifs } # - # Local function callers (passing array and cpu type) + # Local function callers # - __searchList gDesktopIvyBridgeCPUList[@] $gDesktopCPU - - if (!(($gTypeCPU))); then - __searchList gMobileIvyBridgeCPUList[@] $gMobileCPU - fi - - if (!(($gTypeCPU))); then - __searchList "gServerIvyBridgeCPUList[@]" $gServerCPU - fi + __searchList $SANDY_BRIDGE if (!(($gTypeCPU))); then - __searchList "gSandyBridgeCPUList[@]" $gSandyCPU + __searchList $IVY_BRIDGE fi if (!(($gTypeCPU))); then - __searchList "gDesktopHaswellCPUList[@]" $gHaswellCPU + __searchList $HASWELL fi } @@ -1335,6 +1437,12 @@ function main() if [[ $# -eq 1 ]]; then if [[ $1 != "" ]]; then + # Sandy Bridge checks + if [[ ${1:0:4} == "i3-2" || ${1:0:4} == "i5-2" || ${1:0:4} == "i7-2" || ${1:2:2} == "E2" ]]; then + let model=0x2A + let modelSpecified=1 + gProcessorNumber=$1 + fi # Ivy Bridge checks if [[ ${1:0:4} == "i3-3" || ${1:0:4} == "i5-3" || ${1:0:4} == "i7-3" || ${1:2:2} == "E3" ]]; then let model=0x3A @@ -1434,16 +1542,13 @@ function main() # One arguments given (should be a number) # if [[ $# -ge 1 && $1 != "" ]]; then - if [[ "$1" =~ ^[0-9]+$ ]]; - then - if [[ $1 -lt $frequency || $1 -gt $gMaxOCFrequency ]]; - then - _exitWithError $MAX_TURBO_FREQUENCY_ERROR - else - let maxTurboFrequency=$1 - fi - else - _exitWithError $MAX_TURBO_FREQUENCY_ERROR + if [[ "$1" =~ ^[0-9]+$ ]]; then + if [[ $1 -lt $frequency || $1 -gt $gMaxOCFrequency ]]; + then + _exitWithError $MAX_TURBO_FREQUENCY_ERROR + else + let maxTurboFrequency=$1 + fi fi fi From 2f7c9caaa404c281063c2a0a6a75d3e1406be511 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 24 Feb 2013 12:08:48 +0100 Subject: [PATCH 300/623] Updating script to v5.0 Sandy Bridge CPU lists rearranged/extended, thanks to 'stinga11' Now supporting up to 16 logical cores Improved argument checks, now supporting a fourth argument --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 263 ++++++++++++++++----------- 1 file changed, 160 insertions(+), 103 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index f768fee..6d565d7 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 4.9 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 5.0 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -51,10 +51,35 @@ # - New/expanded Sandy Bridge CPU lists, thanks to Francis (Jeroen, Februari 2013) # - More preparations for the official Haswell launch (Pike, Februari 2013) # - Fix for home directory with space characters (Pike, Februari 2013) +# - Sandy Bridge CPU lists rearranged/extended, thanks to 'stinga11' (Jeroen, Februari 2013) +# - Now supporting up to 16 logical cores (Jeroen, Februari 2013) +# - Improved argument checking, now supporting a fourth argument (Jeroen/Pike, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). -# - Many thanks to Jeroen for the CPU data, cleanups and renaming stuff. +# - Thanks to 'stinga11' for Sandy Bridge (E5) data and processor list errors. +# - Many thanks to Jeroen for the CPU data, cleanups, renaming stuff and other improvements. +# +# Usage (v1.0 - v4.9): +# +# - ./ssdtPRGen.sh [max turbo frequency] [TDP] [CPU type] +# +# - ./ssdtPRGen.sh +# - ./ssdtPRGen.sh 3600 +# - ./ssdtPRGen.sh 3600 70 +# - ./ssdtPRGen.sh 3600 70 1 +# +# Usage (v5.0 and greater): +# +# - ./ssdtPRGen.sh [processor number] [max turbo frequency] [TDP] [CPU type] +# +# - ./ssdtPRGen.sh E5-1650 +# +# - ./ssdtPRGen.sh 'E3-1220 V2' +# - ./ssdtPRGen.sh 'E3-1220 V2' 3600 +# - ./ssdtPRGen.sh 'E3-1220 V2' 3600 70 +# - ./ssdtPRGen.sh 'E3-1220 V2' 3600 70 1 +# # # set -x # Used for tracing errors (can be used anywhere in the script). @@ -114,7 +139,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=4.9 +gScriptVersion=5.0 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -160,6 +185,10 @@ let PROCESSOR_NUMBER_ERROR=5 # gServerSandyBridgeCPUList=( +# E5-1600 Xeon Processor Series +E5-1660,130,0,3300,3900,6,12 +E5-1650,130,0,3200,3800,6,12 +E5-1620,130,0,3600,3800,4,8 # E3-1200 Xeon Processor Series E3-1290,95,0,3600,4000,4,8 E3-1280,95,0,3500,3900,4,8 @@ -176,13 +205,16 @@ E3-1220,80,0,3100,3400,4,4 ) gDesktopSandyBridgeCPUList=( +# i7 Desktop Extreme Series +i7-3970X,150,0,3500,4000,6,12 +i7-3960X,130,0,3300,3900,6,12 +i7-3930X,130,0,3200,3800,6,12 +i7-3820,130,0,3600,3800,4,8 # i7 Desktop series i7-2600S,65,1600,2800,3800,4,8 i7-2600,95,1600,3400,3800,4,8 i7-2600K,95,1600,3400,3800,4,8 i7-2700K,95,1600,3500,3900,4,8 -i7-3930K,130,1600,3200,3800,6,12 -i7-3820,130,1600,3600,3800,4,8 # i5 Desktop Series i5-2300,95,1600,2800,3100,4,4 i5-2310,95,1600,2900,3200,4,4 @@ -287,9 +319,6 @@ gServerIvyBridgeCPUList=( ) gDesktopIvyBridgeCPUList=( -# i7 Desktop Extreme Series -i7-3970X,150,1600,3500,4000,6,12 -i7-3960X,130,1600,3300,3900,6,12 # i7-3700 Desktop Processor Series i7-3770T,45,1600,2500,3700,4,8 i7-3770S,65,1600,3100,3900,4,8 @@ -442,7 +471,7 @@ function _printExternals() currentCPU=0; while [ $currentCPU -lt $1 ]; do - echo ' External (\_PR_.'$gProcLabel$currentCPU', DeviceObj)' >> $gSsdtPR + printf " External (\_PR_.$gProcLabel%X, DeviceObj)\n" $currentCPU >> $gSsdtPR let currentCPU+=1 done @@ -471,14 +500,15 @@ function _printDebugInfo() function _printProcessorDefinitions() { +echo "IN" let currentCPU=0; while [ $currentCPU -lt $1 ]; do - echo ' External (\_PR_.'$gProcLabel$currentCPU', DeviceObj)' >> $gSsdtPR + printf " External (\_PR_.$gProcLabel$currentCPU%x, DeviceObj)\n" $currentCPU >> $gSsdtPR let currentCPU+=1 done - echo '' >> $gSsdtPR + echo '' >> $gSsdtPR } #-------------------------------------------------------------------------------- @@ -886,9 +916,9 @@ function _printScopeCPUn() let currentCPU=1; while [ $currentCPU -lt $1 ]; do - echo '' >> $gSsdtPR - echo ' Scope (\_PR.'$gProcLabel$currentCPU')' >> $gSsdtPR - echo ' {' >> $gSsdtPR + echo '' >> $gSsdtPR + printf " Scope (\_PR.$gProcLabel%X)" $currentCPU >> $gSsdtPR + echo ' {' >> $gSsdtPR echo ' Method (APSS, 0, NotSerialized) { Return (\_PR.'$gProcLabel'0.APSS) }' >> $gSsdtPR # @@ -904,11 +934,11 @@ function _printScopeCPUn() fi fi - echo ' }' >> $gSsdtPR + echo ' }' >> $gSsdtPR let currentCPU+=1 done - echo '}' >> $gSsdtPR + echo '}' >> $gSsdtPR } #-------------------------------------------------------------------------------- @@ -1114,6 +1144,7 @@ function _getCPUDataByProcessorNumber if [[ ${data[0]} == $gProcessorNumber ]]; then gProcessorData="$cpuData" let gTypeCPU=$targetType + let gBridgeType=$1 IFS=$ifs return fi @@ -1425,63 +1456,79 @@ function main() printf "\nsdtPRGen.sh v$gScriptVersion Copyright (c) 2013 by Pike R. Alpha\n" echo '----------------------------------------------------------------' + let assumedTDP=0 let modelSpecified=0 let maxTurboFrequency=0 - # - # Get installed CPU model, set bridge type and default TDP. - # - local model=$(_getCPUModel) - _getCPUNumberFromBrandString - if [[ $# -eq 1 ]]; then - if [[ $1 != "" ]]; then - # Sandy Bridge checks - if [[ ${1:0:4} == "i3-2" || ${1:0:4} == "i5-2" || ${1:0:4} == "i7-2" || ${1:2:2} == "E2" ]]; then - let model=0x2A - let modelSpecified=1 - gProcessorNumber=$1 - fi - # Ivy Bridge checks - if [[ ${1:0:4} == "i3-3" || ${1:0:4} == "i5-3" || ${1:0:4} == "i7-3" || ${1:2:2} == "E3" ]]; then - let model=0x3A - let modelSpecified=1 - gProcessorNumber=$1 - fi - # Haswell checks - if [[ ${1:0:4} == "i3-4" || ${1:0:4} == "i5-4" || ${1:0:4} == "i7-4" || ${1:2:2} == "E4" ]]; then - let model=0x4A - let modelSpecified=1 - gProcessorNumber=$1 - fi + if [[ "$1" != "" ]]; then + # Sandy Bridge checks + if [[ ${1:0:4} == "i3-2" || ${1:0:4} == "i5-2" || ${1:0:4} == "i7-2" ]]; then + let modelSpecified=1 + gProcessorNumber=$1 + fi + # Ivy Bridge checks + if [[ ${1:0:4} == "i3-3" || ${1:0:4} == "i5-3" || ${1:0:4} == "i7-3" ]]; then + let modelSpecified=1 + gProcessorNumber=$1 + fi + # Haswell checks + if [[ ${1:0:4} == "i3-4" || ${1:0:4} == "i5-4" || ${1:0:4} == "i7-4" ]]; then + let modelSpecified=1 + gProcessorNumber=$1 + fi + # Xeon check + if [[ ${1:0:1} == "E" ]]; then + let modelSpecified=1 + gProcessorNumber=$1 fi fi - if (($model==0x2A || $model==0x2D)); then - let gTdp=95 - let gBridgeType=2 - local bridgeTypeString="Sandy Bridge" + _getCPUDataByProcessorNumber - _getCPUDataByProcessorNumber + if [[ $modelSpecified -eq 1 && $gTypeCPU -eq 0 ]]; then + _exitWithError $PROCESSOR_NUMBER_ERROR fi - if (($model==0x3A || $model==0x3B)); then - let gTdp=77 - let gBridgeType=4 - local bridgeTypeString="Ivy Bridge" + if [[ $gBridgeType -eq 0 ]]; then + local model=$(_getCPUModel) - _getCPUDataByProcessorNumber - fi + if (($model==0x2A)); then + let gTdp=95 + let gBridgeType=2 + fi + + if (($model==0x2D)); then + let assumedTDP=1 + let gTdp=130 + let gBridgeType=2 + fi - if (($model==0x4A || $model==0x4B)); then - let gTdp=84 - let gBridgeType=8 - local bridgeTypeString="Haswell" + if (($model==0x3A || $model==0x3B)); then + let assumedTDP=1 + let gTdp=77 + let gBridgeType=4 + fi - _getCPUDataByProcessorNumber + if (($model==0x4A || $model==0x4B)); then + let assumedTDP=1 + let gTdp=84 + let gBridgeType=8 + fi fi + case $gBridgeType in + 2) local bridgeTypeString="Sandy Bridge" + ;; + 4) local bridgeTypeString="Ivy Bridge" + ;; + 8) local bridgeTypeString="Haswell" + ;; + *) local bridgeTypeString="Unknown" + ;; + esac + _getBoardID local modelID=$(_getModelName) @@ -1535,57 +1582,60 @@ function main() let logicalCPUs=$(echo `sysctl machdep.cpu.thread_count` | sed -e 's/^machdep.cpu.thread_count: //') let frequency=$(echo `sysctl hw.cpufrequency` | sed -e 's/^hw.cpufrequency: //') let frequency=($frequency / 1000000) - fi - if (!(($modelSpecified))); then - # - # One arguments given (should be a number) - # - if [[ $# -ge 1 && $1 != "" ]]; then - if [[ "$1" =~ ^[0-9]+$ ]]; then - if [[ $1 -lt $frequency || $1 -gt $gMaxOCFrequency ]]; - then - _exitWithError $MAX_TURBO_FREQUENCY_ERROR - else - let maxTurboFrequency=$1 - fi + if [[ $assumedTDP -eq 1 ]]; then + echo 'With a maximum TDP of '$gTdp' Watt - assumed, may require override value!' fi - fi + fi - if [ $# -ge 2 ]; then - if [[ "$2" =~ ^[0-9]+$ ]]; + # + # Script argument checks + # + + if [[ $# -ge 2 ]]; then + if [[ "$2" =~ ^[0-9]+$ ]]; then + if [[ $2 -lt $frequency || $2 -gt $gMaxOCFrequency ]]; then - if [[ $2 -lt 10 || -gt 150 ]]; - then - _exitWithError $MAX_TDP_ERROR - else - let gTdp=$2 - echo "Override value: Max TDP, now using: $gTdp Watt!" - fi + _exitWithError $MAX_TURBO_FREQUENCY_ERROR else - _exitWithError $MAX_TDP_ERROR + let maxTurboFrequency=$2 fi fi + fi - if [ $# -eq 3 ]; then - if [[ "$3" =~ ^[0-9]+$ ]]; - then - case "$3" in - 0) let gBridgeType=2 - echo "Override value: CPU type, now using: Sandy Bridge!" - ;; - 1) let gBridgeType=4 - echo "Override value: CPU type, now using: Ivy Bridge!" - ;; - 2) let gBridgeType=8 - echo "Override value: CPU type, now using: Haswell!" - ;; - *) _exitWithError $TARGET_CPU_ERROR - ;; - esac - else - _exitWithError $TARGET_CPU_ERROR - fi + if [ $# -ge 3 ]; then + if [[ "$3" =~ ^[0-9]+$ ]]; + then + if [[ $3 -lt 10 || $3 -gt 150 ]]; + then + _exitWithError $MAX_TDP_ERROR + else + let gTdp=$3 + echo "Override value: Max TDP, now using: $gTdp Watt!" + fi + else + _exitWithError $MAX_TDP_ERROR + fi + fi + + if [ $# -eq 4 ]; then + if [[ "$4" =~ ^[0-9]+$ ]]; + then + case "$4" in + 0) let gBridgeType=2 + echo "Override value: CPU type, now using: Sandy Bridge!" + ;; + 1) let gBridgeType=4 + echo "Override value: CPU type, now using: Ivy Bridge!" + ;; + 2) let gBridgeType=8 + echo "Override value: CPU type, now using: Haswell!" + ;; + *) _exitWithError $TARGET_CPU_ERROR + ;; + esac + else + _exitWithError $TARGET_CPU_ERROR fi fi @@ -1594,8 +1644,8 @@ function main() # # Check maxTurboFrequency # - if [ $maxTurboFrequency == 0 ]; then - _exitWithError $PROCESSOR_NUMBER_ERROR + if [ $maxTurboFrequency -eq 0 ]; then + _exitWithError $MAX_TURBO_FREQUENCY_ERROR fi # @@ -1681,7 +1731,14 @@ function main() clear -main "$1" $2 $3 +if [ $# -ge 1 ]; then + if [[ "$1" =~ ^[0-9]+$ ]]; + then + main "" $1 $2 $3 + else + main "$1" $2 $3 $4 + fi +fi _findIasl From a189afa9b1150eaa3fc22ba64f098429970163df Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 24 Feb 2013 14:44:04 +0100 Subject: [PATCH 301/623] Updating script to v5.1 Suppress override output when possible --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 6d565d7..a5b7587 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 5.0 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 5.1 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -54,6 +54,7 @@ # - Sandy Bridge CPU lists rearranged/extended, thanks to 'stinga11' (Jeroen, Februari 2013) # - Now supporting up to 16 logical cores (Jeroen, Februari 2013) # - Improved argument checking, now supporting a fourth argument (Jeroen/Pike, Februari 2013) +# - Suppress override output when possible (Jeroen, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -139,7 +140,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=5.0 +gScriptVersion=5.1 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -1598,7 +1599,10 @@ function main() then _exitWithError $MAX_TURBO_FREQUENCY_ERROR else - let maxTurboFrequency=$2 + if [[ $2 -gt $maxTurboFrequency ]]; then + echo "Override value: Max Turbo Frequency, now using: $2 MHz!" + let maxTurboFrequency=$2 + fi fi fi fi @@ -1610,8 +1614,10 @@ function main() then _exitWithError $MAX_TDP_ERROR else - let gTdp=$3 - echo "Override value: Max TDP, now using: $gTdp Watt!" + if [[ $gTdp != $3 ]]; then + let gTdp=$3 + echo "Override value: Max TDP, now using: $gTdp Watt!" + fi fi else _exitWithError $MAX_TDP_ERROR @@ -1621,19 +1627,25 @@ function main() if [ $# -eq 4 ]; then if [[ "$4" =~ ^[0-9]+$ ]]; then + local detectedBridgeType=$gBridgeType + case "$4" in 0) let gBridgeType=2 - echo "Override value: CPU type, now using: Sandy Bridge!" + local cpuTypeString="Override value: CPU type, now using: Sandy Bridge!" ;; 1) let gBridgeType=4 - echo "Override value: CPU type, now using: Ivy Bridge!" + local cpuTypeString="Override value: CPU type, now using: Ivy Bridge!" ;; 2) let gBridgeType=8 - echo "Override value: CPU type, now using: Haswell!" + local cpuTypeString="Override value: CPU type, now using: Haswell!" ;; *) _exitWithError $TARGET_CPU_ERROR ;; esac + + if [[ $detectedBridgeType -ne $((2 << $4)) ]]; then + echo $cpuTypeString + fi else _exitWithError $TARGET_CPU_ERROR fi From 29ae31d0a2be563143333c3117de7e12f9ae5073 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 25 Feb 2013 15:59:08 +0100 Subject: [PATCH 302/623] Hide PMinfo tool (not ready for public use) --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 9465950..3180408 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,8 @@ i386/config/SMBIOS/default.h i386/config/SMBIOS/*Mac*.h i386/util/libcc_kext.a + MODEL +i386/libsaio/cpu/tools/PMinfo i386/libsaio/smbios/tools/smbios2struct3 From e97caab4868f09b6ddd0140294cc0fce205d04c2 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 25 Feb 2013 15:59:27 +0100 Subject: [PATCH 303/623] Oops Jeroen --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index a5b7587..c5aaf78 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -1743,13 +1743,16 @@ function main() clear -if [ $# -ge 1 ]; then - if [[ "$1" =~ ^[0-9]+$ ]]; - then - main "" $1 $2 $3 - else - main "$1" $2 $3 $4 - fi +if [ $# -eq 0 ]; + then + main "" $1 $2 $3 + else + if [[ "$1" =~ ^[0-9]+$ ]]; + then + main "" $1 $2 $3 + else + main "$1" $2 $3 $4 + fi fi _findIasl From cfb04beaac133d71b8175b17e2cc7ac0b883a2c3 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 25 Feb 2013 15:59:51 +0100 Subject: [PATCH 304/623] Getting ready for PMinfo release --- i386/libsaio/cpu/essentials.h | 37 ++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index 7ad17c1..9b7313e 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -50,14 +50,23 @@ // Copied from xnu/osfmk/proc_reg.h #define MSR_IA32_PLATFORM_ID 0x17 #define MSR_CORE_THREAD_COUNT 0x35 -#define MSR_PLATFORM_INFO 0xCE + +#ifndef MSR_PLATFORM_INFO + #define MSR_PLATFORM_INFO 0xCE +#endif + #define MSR_PKG_CST_CONFIG_CONTROL 0xE2 // MSR_PKG_CST_CONFIG_CONTROL #define MSR_PMG_IO_CAPTURE_BASE 0xE4 +#define IA32_MPERF 0xE7 +#define IA32_APERF 0xE8 #define MSR_IA32_PERF_STATUS 0x0198 // MSR_IA32_PERF_STS in XNU #define MSR_IA32_PERF_CONTROL 0x0199 // IA32_PERF_CTL -#define MSR_FLEX_RATIO 0x0194 +#ifndef MSR_FLEX_RATIO + #define MSR_FLEX_RATIO 0x0194 +#endif + #define IA32_CLOCK_MODULATION 0x019A #define IA32_THERM_STATUS 0x019C @@ -69,6 +78,14 @@ #define IA32_ENERGY_PERF_BIAS 0x01B0 #define IA32_PLATFORM_DCA_CAP 0x01F8 +#define MSR_PKG_C2_RESIDENCY 0x60D +#define MSR_PKG_C3_RESIDENCY 0x3F8 +#define MSR_PKG_C6_RESIDENCY 0x3F9 +#define MSR_PKG_C7_RESIDENCY 0x3FA + +#define MSR_CORE_C3_RESIDENCY 0x3FC +#define MSR_CORE_C6_RESIDENCY 0x3FD +#define MSR_CORE_C7_RESIDENCY 0x3FE // Sandy Bridge & JakeTown specific 'Running Average Power Limit' MSR's. #define MSR_RAPL_POWER_UNIT 0x606 @@ -89,13 +106,19 @@ #define MSR_PP1_ENERGY_STATUS 0x641 #define MSR_PP1_POLICY 0x642 +// Ivy Bridge Specific MSR's +#define MSR_CONFIG_TDP_NOMINAL 0x648 +#define MSR_CONFIG_TDP_LEVEL1 0x649 +#define MSR_CONFIG_TDP_LEVEL2 0x64A +#define MSR_CONFIG_TDP_CONTROL 0x64B +#define MSR_TURBO_ACTIVATION_RATIO 0x64C + // JakeTown only Memory MSR's. #define MSR_DRAM_POWER_LIMIT 0x618 #define MSR_DRAM_ENERGY_STATUS 0x619 #define MSR_DRAM_PERF_STATUS 0x61B #define MSR_DRAM_POWER_INFO 0x61C - // CPUID leaf index values (pointing to the right spot in CPUID/LEAF array). #define LEAF_0 0 // DHP: Formerly known as CPUID_n @@ -110,7 +133,6 @@ #define MAX_CPUID_LEAVES 9 // DHP: Formerly known as MAX_CPUID - /* Copied from: xnu/osfmk/i386/cpuid.h */ #define CPU_MODEL_YONAH 0x0E #define CPU_MODEL_MEROM 0x0F @@ -128,8 +150,9 @@ #define CPU_MODEL_IB_CORE 0x3A // Ivy Bridge Core Processors (LGA 1155) #define CPU_MODEL_IB_CORE_EX 0x3B // Ivy Bridge Core Processors (LGA 2011) -#define DALES_BRIDGE 1 -#define SANDY_BRIDGE 2 -#define IVY_BRIDGE 4 +#define DALES_BRIDGE 1 +#define SANDY_BRIDGE 2 +#define IVY_BRIDGE 4 +#define HASWELL 8 #endif /* !__LIBSAIO_CPU_ESSENTIALS_H */ From ed783d2f2183cdb5efb79be725a8397cf7d9c579 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 28 Feb 2013 10:39:29 +0100 Subject: [PATCH 305/623] Updating script to v5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Get processor label from ioreg – updates $gProcLabel Thanks to alexlov for reporting this bug! --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 24 +++++++++++++++++------- i386/libsaio/cpu/essentials.h | 1 + 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index c5aaf78..2a8e7db 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 5.1 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 5.2 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -55,6 +55,7 @@ # - Now supporting up to 16 logical cores (Jeroen, Februari 2013) # - Improved argument checking, now supporting a fourth argument (Jeroen/Pike, Februari 2013) # - Suppress override output when possible (Jeroen, Februari 2013) +# - Get processor label from ioreg (Jeroen/Pike, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -132,7 +133,7 @@ let gDebug=1 let gBaseFrequency=1600 # -# Change this label to "P00" when your DSDT uses 'P00n' instead of 'CPUn'. +# This is the default processor label (verified by _setProcessorLabel). # gProcLabel="CPU" @@ -140,7 +141,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=5.1 +gScriptVersion=5.2 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -501,7 +502,6 @@ function _printDebugInfo() function _printProcessorDefinitions() { -echo "IN" let currentCPU=0; while [ $currentCPU -lt $1 ]; do @@ -960,18 +960,28 @@ function _getBoardID() # # Grab 'board-id' property from ioreg (stripped with sed / RegEX magic). # - boardID=`ioreg -p IODeviceTree -d 2 -k board-id | grep board-id | sed -e 's/ *["=<>]//g' -e 's/board-id//'` + boardID=$(ioreg -p IODeviceTree -d 2 -k board-id | grep board-id | sed -e 's/ *["=<>]//g' -e 's/board-id//') +} + +#-------------------------------------------------------------------------------- + +function _setProcessorLabel() +{ + local data=$(ioreg -p IODeviceTree -c IOACPIPlatformDevice -k cpu-type | egrep name | sed -e 's/ *[-|="<a-z>]//g') + let gProcLabel=${cpuLabel[0]} } #-------------------------------------------------------------------------------- function _getCPUtype() { + _setProcessorLabel + # # Grab 'cpu-type' property from ioreg (stripped with sed / RegEX magic). # - local grepStr=`ioreg -p IODeviceTree -n CPU0@0 -k cpu-type | grep cpu-type | sed -e 's/ *[-|="<a-z>]//g'` - # + local grepStr=$(ioreg -p IODeviceTree -n "$gProcLabel"0@0 -k cpu-type | grep cpu-type | sed -e 's/ *[-|="<a-z>]//g') + # Swap bytes with help of ${str:pos:num} # echo ${grepStr:2:2}${grepStr:0:2} diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index 9b7313e..04feeec 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -77,6 +77,7 @@ #define IA32_ENERGY_PERF_BIAS 0x01B0 #define IA32_PLATFORM_DCA_CAP 0x01F8 +#define MSR_POWER_CTL 0x01FC #define MSR_PKG_C2_RESIDENCY 0x60D #define MSR_PKG_C3_RESIDENCY 0x3F8 From 1dbf4b97e43bc26e931deb8122941da1da490a54 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 1 Mar 2013 16:31:23 +0100 Subject: [PATCH 306/623] Bug fix for processor labels with double/triple digits This is part one (too busy with something else) --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 2a8e7db..8f1957b 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -968,7 +968,14 @@ function _getBoardID() function _setProcessorLabel() { local data=$(ioreg -p IODeviceTree -c IOACPIPlatformDevice -k cpu-type | egrep name | sed -e 's/ *[-|="<a-z>]//g') - let gProcLabel=${cpuLabel[0]} + local cpuLabels=($data) + + if [[ ${#cpuLabels[@]} -gt 0 ]]; + then + gFirstProcessorLabel=${cpuLabels[0]} + else + _exitWithError 6 + fi } #-------------------------------------------------------------------------------- @@ -980,7 +987,7 @@ function _getCPUtype() # # Grab 'cpu-type' property from ioreg (stripped with sed / RegEX magic). # - local grepStr=$(ioreg -p IODeviceTree -n "$gProcLabel"0@0 -k cpu-type | grep cpu-type | sed -e 's/ *[-|="<a-z>]//g') + local grepStr=$(ioreg -p IODeviceTree -n "$gFirstProcessorLabel"@0 -k cpu-type | grep cpu-type | sed -e 's/ *[-|="<a-z>]//g') # Swap bytes with help of ${str:pos:num} # @@ -1455,6 +1462,9 @@ function _exitWithError() 5) echo -e "\nError: Unknown processor number... exiting\n" 1>&2 exit 5 ;; + 6) echo -e "\nError: Processor label not found... exiting\n" 1>&2 + exit 6 + ;; *) exit 1 ;; esac From 111a82b3ad9caf2f3e55ab11553759edb3721ba9 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 1 Mar 2013 16:36:02 +0100 Subject: [PATCH 307/623] Initial commit for AppleIntelCPUPowerManagementInfo.kext AppleIntelCPUPowerManagementInfo.kext is the successor of MSRdumper.kext Soon to be expanded with C-State and Graphics PM info (secret code update) --- .gitignore | 8 +- .../project.pbxproj | 303 ++++++++++++++++++ .../AppleIntelCPUPowerManagementInfo.cpp | 193 +++++++++++ .../AppleIntelCPUPowerManagementInfo.h | 52 +++ ...nfo-AppleIntelCPUPowerManagementInfo.plist | 55 ++++ .../InfoPlist.strings | 2 + 6 files changed, 612 insertions(+), 1 deletion(-) create mode 100644 i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo.xcodeproj/project.pbxproj create mode 100644 i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp create mode 100644 i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h create mode 100644 i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist create mode 100644 i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/InfoPlist.strings diff --git a/.gitignore b/.gitignore index 3180408..5a21fba 100644 --- a/.gitignore +++ b/.gitignore @@ -20,5 +20,11 @@ i386/util/libcc_kext.a MODEL -i386/libsaio/cpu/tools/PMinfo +xcuserdata +project.xcworkspace + +i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/secretCode.h +i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo.xcodeproj/xcuserdata +i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo.xcodeproj/project.xcworkspace + i386/libsaio/smbios/tools/smbios2struct3 diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo.xcodeproj/project.pbxproj b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo.xcodeproj/project.pbxproj new file mode 100644 index 0000000..64dbaed --- /dev/null +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo.xcodeproj/project.pbxproj @@ -0,0 +1,303 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 5600B62D138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 5600B62C138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo.h */; }; + 5600B62F138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5600B62E138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 5600B620138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo.kext */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AppleIntelCPUPowerManagementInfo.kext; sourceTree = BUILT_PRODUCTS_DIR; }; + 5600B624138A9BC80001A2BC /* Kernel.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kernel.framework; path = System/Library/Frameworks/Kernel.framework; sourceTree = SDKROOT; }; + 5600B627138A9BC80001A2BC /* Info-AppleIntelCPUPowerManagementInfo.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-AppleIntelCPUPowerManagementInfo.plist"; sourceTree = "<group>"; }; + 5600B62B138A9BC80001A2BC /* InfoPlist.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = InfoPlist.strings; sourceTree = "<group>"; }; + 5600B62C138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppleIntelCPUPowerManagementInfo.h; sourceTree = "<group>"; }; + 5600B62E138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AppleIntelCPUPowerManagementInfo.cpp; sourceTree = "<group>"; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 5600B61B138A9BC80001A2BC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 5600B613138A9BC80001A2BC = { + isa = PBXGroup; + children = ( + 5600B625138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo */, + 5600B621138A9BC80001A2BC /* Products */, + 5600B624138A9BC80001A2BC /* Kernel.framework */, + ); + sourceTree = "<group>"; + }; + 5600B621138A9BC80001A2BC /* Products */ = { + isa = PBXGroup; + children = ( + 5600B620138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo.kext */, + ); + name = Products; + sourceTree = "<group>"; + }; + 5600B625138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo */ = { + isa = PBXGroup; + children = ( + 9015B9A516DCCD8700FCE81D /* Headers */, + 9015B9A416DCCD7800FCE81D /* Source */, + 5600B626138A9BC80001A2BC /* Resources */, + ); + name = AppleIntelCPUPowerManagementInfo; + path = AppleIntelCPUPowerManagementInfo; + sourceTree = "<group>"; + }; + 5600B626138A9BC80001A2BC /* Resources */ = { + isa = PBXGroup; + children = ( + 5600B627138A9BC80001A2BC /* Info-AppleIntelCPUPowerManagementInfo.plist */, + 5600B62B138A9BC80001A2BC /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = "<group>"; + }; + 9015B9A416DCCD7800FCE81D /* Source */ = { + isa = PBXGroup; + children = ( + 5600B62E138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo.cpp */, + ); + name = Source; + sourceTree = "<group>"; + }; + 9015B9A516DCCD8700FCE81D /* Headers */ = { + isa = PBXGroup; + children = ( + 5600B62C138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo.h */, + ); + name = Headers; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 5600B61C138A9BC80001A2BC /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 5600B62D138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 5600B61F138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5600B632138A9BC80001A2BC /* Build configuration list for PBXNativeTarget "AppleIntelCPUPowerManagementInfo" */; + buildPhases = ( + 5600B61A138A9BC80001A2BC /* Sources */, + 5600B61B138A9BC80001A2BC /* Frameworks */, + 5600B61C138A9BC80001A2BC /* Headers */, + 5600B61D138A9BC80001A2BC /* Resources */, + 5600B61E138A9BC80001A2BC /* Rez */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AppleIntelCPUPowerManagementInfo; + productName = AppleIntelCPUPowerManagementInfo; + productReference = 5600B620138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo.kext */; + productType = "com.apple.product-type.kernel-extension"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 5600B615138A9BC80001A2BC /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0460; + }; + buildConfigurationList = 5600B618138A9BC80001A2BC /* Build configuration list for PBXProject "AppleIntelCPUPowerManagementInfo" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 5600B613138A9BC80001A2BC; + productRefGroup = 5600B621138A9BC80001A2BC /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 5600B61F138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 5600B61D138A9BC80001A2BC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXRezBuildPhase section */ + 5600B61E138A9BC80001A2BC /* Rez */ = { + isa = PBXRezBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXRezBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 5600B61A138A9BC80001A2BC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5600B62F138A9BC80001A2BC /* AppleIntelCPUPowerManagementInfo.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 5600B630138A9BC80001A2BC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALTERNATE_GROUP = wheel; + ALTERNATE_OWNER = root; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = NO; + GCC_C_LANGUAGE_STANDARD = "compiler-default"; + GCC_OPTIMIZATION_LEVEL = s; + GCC_PREPROCESSOR_DEFINITIONS = DEBUG; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INSTALL_GROUP = wheel; + INSTALL_OWNER = root; + MACOSX_DEPLOYMENT_TARGET = 10.8; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + VALID_ARCHS = x86_64; + }; + name = Debug; + }; + 5600B631138A9BC80001A2BC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALTERNATE_GROUP = wheel; + ALTERNATE_OWNER = root; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = NO; + GCC_C_LANGUAGE_STANDARD = "compiler-default"; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INSTALL_GROUP = wheel; + INSTALL_OWNER = root; + MACOSX_DEPLOYMENT_TARGET = 10.8; + SDKROOT = macosx; + VALID_ARCHS = x86_64; + }; + name = Release; + }; + 5600B633138A9BC80001A2BC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALTERNATE_GROUP = wheel; + ALTERNATE_OWNER = root; + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1.0.0d1; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + GCC_VERSION = ""; + INFOPLIST_FILE = "AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist"; + MODULE_NAME = com.apple.kext.AppleIntelCPUPowerManagementInfo; + MODULE_VERSION = 1.0.0d1; + PRODUCT_NAME = AppleIntelCPUPowerManagementInfo; + VALID_ARCHS = x86_64; + VERSION_INFO_BUILDER = root; + WRAPPER_EXTENSION = kext; + }; + name = Debug; + }; + 5600B634138A9BC80001A2BC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALTERNATE_GROUP = wheel; + ALTERNATE_OWNER = root; + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = YES; + CURRENT_PROJECT_VERSION = 1.0.0d1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + GCC_VERSION = ""; + INFOPLIST_FILE = "AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist"; + MODULE_NAME = com.apple.kext.AppleIntelCPUPowerManagementInfo; + MODULE_VERSION = 1.0.0d1; + PRODUCT_NAME = AppleIntelCPUPowerManagementInfo; + VALID_ARCHS = x86_64; + VERSION_INFO_BUILDER = root; + WRAPPER_EXTENSION = kext; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 5600B618138A9BC80001A2BC /* Build configuration list for PBXProject "AppleIntelCPUPowerManagementInfo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5600B630138A9BC80001A2BC /* Debug */, + 5600B631138A9BC80001A2BC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 5600B632138A9BC80001A2BC /* Build configuration list for PBXNativeTarget "AppleIntelCPUPowerManagementInfo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5600B633138A9BC80001A2BC /* Debug */, + 5600B634138A9BC80001A2BC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 5600B615138A9BC80001A2BC /* Project object */; +} diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp new file mode 100644 index 0000000..72aedc8 --- /dev/null +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -0,0 +1,193 @@ +/* + * Copyright (c) 2012-2013 Pike R. Alpha. All rights reserved. + * + * Original idea and initial development of MSRDumper.kext (c) 2011 by RevoGirl. + * + * Thanks to George for his help and continuation of Sam's work, but it is + * time for us to push the envelope and add some really interesting stuff. + * + */ + +#include "AppleIntelCPUPowerManagementInfo.h" + +//============================================================================== + +void AppleIntelCPUPowerManagementInfo::reportMSRs(uint8_t aModel) +{ + IOLog("MSR_CORE_THREAD_COUNT......(0x35) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_THREAD_COUNT)); + + IOLog("MSR_PLATFORM_INFO..........(0xCE) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PLATFORM_INFO)); + + IOLog("MSR_PMG_CST_CONFIG_CONTROL.(0xE2) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PMG_CST_CONFIG_CONTROL)); + IOLog("MSR_PMG_IO_CAPTURE_BASE....(0xE4) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PMG_IO_CAPTURE_BASE)); + IOLog("IA32_MPERF.................(0xE7) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_MPERF)); + IOLog("IA32_APERF.................(0xE8) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_APERF)); + + IOLog("MSR_IA32_PERF_STATUS.......(0x198) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_IA32_PERF_STATUS)); + IOLog("MSR_IA32_PERF_CONTROL......(0x199) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_IA32_PERF_CONTROL)); + IOLog("IA32_CLOCK_MODULATION......(0x19A) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_CLOCK_MODULATION)); + IOLog("IA32_THERM_STATUS..........(0x19C) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_THERM_STATUS)); + + IOLog("IA32_MISC_ENABLES..........(0x1A0) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_MISC_ENABLES)); + IOLog("MSR_MISC_PWR_MGMT..........(0x1AA) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_MISC_PWR_MGMT)); + IOLog("MSR_TURBO_RATIO_LIMIT......(0x1AD) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_RATIO_LIMIT)); + + IOLog("IA32_ENERGY_PERF_BIAS......(0x1B0) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_ENERGY_PERF_BIAS)); + + IOLog("MSR_POWER_CTL..............(0x1FC) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_POWER_CTL)); + + IOLog("rdmsr64....................(0x602) : 0x%llX\n", (unsigned long long)rdmsr64(0x602)); + IOLog("MSR_RAPL_POWER_UNIT........(0x606) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_RAPL_POWER_UNIT)); + IOLog("MSR_PKG_POWER_LIMIT........(0x610) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_POWER_LIMIT)); + IOLog("MSR_PKG_ENERGY_STATUS......(0x611) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_ENERGY_STATUS)); + + IOLog("MSR_PP0_POWER_LIMIT........(0x638) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POWER_LIMIT)); + IOLog("MSR_PP0_ENERGY_STATUS......(0x639) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_ENERGY_STATUS)); + IOLog("MSR_PP0_POLICY.............(0x63a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POLICY)); + + if ((aModel == CPU_MODEL_SB_CORE) || aModel == (CPU_MODEL_IB_CORE)) + { + IOLog("MSR_PP1_POWER_LIMIT........(0x640) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POWER_LIMIT)); + IOLog("MSR_PP1_ENERGY_STATUS......(0x641) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_ENERGY_STATUS)); + IOLog("MSR_PP1_POLICY.............(0x642) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POLICY)); + } + + if ((aModel == CPU_MODEL_IB_CORE) || (aModel == CPU_MODEL_IB_CORE_EX)) + { + IOLog("MSR_CONFIG_TDP_NOMINAL.....(0x648) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_NOMINAL)); + IOLog("MSR_CONFIG_TDP_LEVEL1......(0x649) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL1)); + IOLog("MSR_CONFIG_TDP_LEVEL2......(0x64a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL2)); + IOLog("MSR_CONFIG_TDP_CONTROL.....(0x64b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_CONTROL)); + IOLog("MSR_TURBO_ACTIVATION_RATIO.(0x64c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_ACTIVATION_RATIO)); + } +} + +//============================================================================== + +IOReturn AppleIntelCPUPowerManagementInfo::getMultiplier(void) +{ + timerEventSource->setTimeoutTicks(gInterval); + gCoreMultipliers |= (1ULL << (rdmsr64(MSR_IA32_PERF_STS) >> 8)); + + if (!loopLock) + { + loopLock = true; + + if (gCoreMultipliers != gTriggeredPStates) + { + gTriggeredPStates = gCoreMultipliers; + IOLog("AICPUPMI: P-States [ "); + + for (int currentBit = gMinRatio; currentBit <= gMaxRatio; currentBit++) + { + UInt64 value = (1ULL << currentBit); + + if ((gTriggeredPStates & value) == value) + { + IOLog("%d ", currentBit); + } + } + + IOLog("]\n"); + } + + loopLock = false; + + return kIOReturnSuccess; + } + + return kIOReturnTimeout; +} + +//============================================================================== + +bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) +{ + if (IOService::start(provider)) + { + timerEventSource = IOTimerEventSource::timerEventSource(this, OSMemberFunctionCast(IOTimerEventSource::Action, this, &AppleIntelCPUPowerManagementInfo::getMultiplier)); + workLoop = getWorkLoop(); + + if (timerEventSource && workLoop && (kIOReturnSuccess == workLoop->addEventSource(timerEventSource))) + { + this->registerService(0); + + uint32_t cpuid_reg[4]; + do_cpuid(0x00000001, cpuid_reg); + + uint8_t cpuModel = bitfield32(cpuid_reg[eax], 7, 4) + (bitfield32(cpuid_reg[eax], 19, 16) << 4); + reportMSRs(cpuModel); + + UInt64 msr = rdmsr64(MSR_PLATFORM_INFO); + gMinRatio = (UInt8)((msr >> 40) & 0xff); + IOLog("Low Frequency Mode : %d00 MHz\n", gMinRatio); + + gClockRatio = (UInt8)((msr >> 8) & 0xff); + IOLog("Clock Speed : %d00 MHz\n", gClockRatio); + + if (turboEnabled) + { + msr = rdmsr64(MSR_TURBO_RATIO_LIMIT); + gMaxRatio = (UInt8)(msr & 0xff); + IOLog("Max Turbo Frequency: %d00 MHz\n", gMaxRatio); + } + else + { + gMaxRatio = gClockRatio; + IOLog("Max Frequency : %d00 MHz\n", gMaxRatio); + } + + timerEventSource->enable(); + timerEventSource->setTimeoutMS(500); + + return true; + } + } + + return false; +} + +//============================================================================== + +void AppleIntelCPUPowerManagementInfo::stop(IOService *provider) +{ + if (timerEventSource) + { + timerEventSource->disable(); + timerEventSource->cancelTimeout(); + + if (workLoop) + { + workLoop->removeEventSource(timerEventSource); + workLoop->release(); + workLoop = NULL; + } + + timerEventSource->release(); + timerEventSource = NULL; + } + + super::stop(provider); +} + +//============================================================================== + +void AppleIntelCPUPowerManagementInfo::free() +{ + if (timerEventSource) + { + timerEventSource->cancelTimeout(); + + if (workLoop) + { + workLoop->removeEventSource(timerEventSource); + workLoop->release(); + workLoop = NULL; + } + + timerEventSource->release(); + timerEventSource = NULL; + } + + super::free(); +} diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h new file mode 100644 index 0000000..f580639 --- /dev/null +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2012-2013 Pike R. Alpha. All rights reserved. + * + * Original idea and initial development of MSRDumper.kext (c) 2011 by RevoGirl. + * + * Thanks to George for his help and continuation of Sam's work, but it is + * time for us to push the envelope and add some really interesting stuff. + * + */ + +#include <IOKit/IOLib.h> +#include <IOKit/IOService.h> +#include <IOKit/IOWorkLoop.h> +#include <IOKit/IOMemoryDescriptor.h> +#include <IOKit/IOTimerEventSource.h> + +#include <i386/cpuid.h> +#include <i386/proc_reg.h> + +#include "../../../essentials.h" + +#define super IOService + +class AppleIntelCPUPowerManagementInfo : public IOService +{ + OSDeclareDefaultStructors (AppleIntelCPUPowerManagementInfo); + +private: + IOWorkLoop *workLoop; + IOTimerEventSource *timerEventSource; + + virtual IOReturn getMultiplier(void); + + void reportMSRs(uint8_t aModel); + + bool loopLock = false; + + UInt16 gInterval = 50; + UInt8 gMinRatio = 0; + UInt8 gClockRatio = 0; + UInt8 gMaxRatio = 0; + + UInt64 gCoreMultipliers; + UInt64 gTriggeredPStates; + +public: + virtual bool start(IOService * provider); + virtual void stop(IOService * provider); + virtual void free(void); +}; + +OSDefineMetaClassAndStructors(AppleIntelCPUPowerManagementInfo, IOService) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist new file mode 100644 index 0000000..dfdd07c --- /dev/null +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>com.apple.driver.${PRODUCT_NAME:identifier}</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>${PRODUCT_NAME}</string> + <key>CFBundlePackageType</key> + <string>KEXT</string> + <key>CFBundleShortVersionString</key> + <string>4.0.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>OSBundleRequired</key> + <string>Root</string> + <key>CFBundleVersion</key> + <string>1</string> + <key>IOKitPersonalities</key> + <dict> + <key>AppleIntelCPUPowerManagementInfo</key> + <dict> + <key>CFBundleIdentifier</key> + <string>com.apple.driver.${PRODUCT_NAME:identifier}</string> + <key>IOClass</key> + <string>${PRODUCT_NAME:identifier}</string> + <key>IOMatchCategory</key> + <string>${PRODUCT_NAME:identifier}</string> + <key>IOProviderClass</key> + <string>IOResources</string> + <key>IOResourceMatch</key> + <string>IOKit</string> + </dict> + </dict> + <key>OSBundleLibraries</key> + <dict> + <key>com.apple.kpi.bsd</key> + <string>10.4</string> + <key>com.apple.kpi.iokit</key> + <string>10.4</string> + <key>com.apple.kpi.libkern</key> + <string>10.4</string> + <key>com.apple.kpi.mach</key> + <string>10.4</string> + <key>com.apple.kpi.unsupported</key> + <string>10.4</string> + </dict> +</dict> +</plist> diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/InfoPlist.strings b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/InfoPlist.strings new file mode 100644 index 0000000..19f3055 --- /dev/null +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ +NSHumanReadableCopyright = "Copyright © 2012-2013 Pike R. Alpha. All rights reserved"; \ No newline at end of file From 9b4a2323e57d0cdf37db7f7ac3c236303db45920 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 1 Mar 2013 16:57:00 +0100 Subject: [PATCH 308/623] Oops Fixing my copy/paste error --- .../AppleIntelCPUPowerManagementInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 72aedc8..cc76bb3 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -125,7 +125,7 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) gClockRatio = (UInt8)((msr >> 8) & 0xff); IOLog("Clock Speed : %d00 MHz\n", gClockRatio); - if (turboEnabled) + if (!((rdmsr64(IA32_MISC_ENABLES) >> 32) & 0x40)) // Turbo Mode Enabled? { msr = rdmsr64(MSR_TURBO_RATIO_LIMIT); gMaxRatio = (UInt8)(msr & 0xff); From d328a4fdbdbfc142fcdff008d8e148e169160417 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 1 Mar 2013 20:06:39 +0100 Subject: [PATCH 309/623] Fix Haswell and IB Xeon CPU detection --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 8f1957b..7399ff2 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -1526,13 +1526,13 @@ function main() let gBridgeType=2 fi - if (($model==0x3A || $model==0x3B)); then + if (($model==0x3A || $model==0x3B || $model==0x3E)); then let assumedTDP=1 let gTdp=77 let gBridgeType=4 fi - if (($model==0x4A || $model==0x4B)); then + if (($model==0x3C || $model==0x3F || $model==0x45)); then let assumedTDP=1 let gTdp=84 let gBridgeType=8 From ec0c40313be9290231bc5eb58f398f3fb03f7761 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 1 Mar 2013 20:07:35 +0100 Subject: [PATCH 310/623] Fix Haswell and IB Xeon CPU detection --- i386/libsaio/cpu/essentials.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index 04feeec..aed1072 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -150,6 +150,11 @@ #define CPU_MODEL_WESTMERE_EX 0x2F #define CPU_MODEL_IB_CORE 0x3A // Ivy Bridge Core Processors (LGA 1155) #define CPU_MODEL_IB_CORE_EX 0x3B // Ivy Bridge Core Processors (LGA 2011) +#define CPU_MODEL_IB_CORE_XEON 0x3E + +#define CPU_MODEL_HASWELL_CORE_EX 0x3C +#define CPU_MODEL_HASWELL_CORE_EX 0x3F +#define CPU_MODEL_HASWELL_CORE_EX 0x45 #define DALES_BRIDGE 1 #define SANDY_BRIDGE 2 From 28aefa16e152a6cee726aa5fb11d0e1c875cbb48 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 1 Mar 2013 20:08:34 +0100 Subject: [PATCH 311/623] Demo code for Jeroen/Dave --- .../AppleIntelCPUPowerManagementInfo.cpp | 163 ++++++++++-------- .../AppleIntelCPUPowerManagementInfo.h | 34 ++-- 2 files changed, 115 insertions(+), 82 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index cc76bb3..98942b8 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -10,6 +10,7 @@ #include "AppleIntelCPUPowerManagementInfo.h" + //============================================================================== void AppleIntelCPUPowerManagementInfo::reportMSRs(uint8_t aModel) @@ -60,43 +61,79 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(uint8_t aModel) IOLog("MSR_CONFIG_TDP_CONTROL.....(0x64b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_CONTROL)); IOLog("MSR_TURBO_ACTIVATION_RATIO.(0x64c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_ACTIVATION_RATIO)); } + + IOLog("MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C2_RESIDENCY)); + IOLog("MSR_PKG_C3_RESIDENCY.......(0x3f8) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C3_RESIDENCY)); + IOLog("MSR_PKG_C6_RESIDENCY.......(0x3f9) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C6_RESIDENCY)); + IOLog("MSR_PKG_C7_RESIDENCY.......(0x3fa) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); +} + +//============================================================================== + +inline void getCStates(void *arg) +{ + UInt8 logicalCoreNumber = cpu_number(); + + IOLog("MSR_CORE[%d]_C3_RESIDENCY......(0x3fc) : 0x%llX\n", logicalCoreNumber, (unsigned long long)rdmsr64(MSR_CORE_C3_RESIDENCY)); + IOLog("MSR_CORE[%d]_C6_RESIDENCY......(0x3fd) : 0x%llX\n", logicalCoreNumber, (unsigned long long)rdmsr64(MSR_CORE_C6_RESIDENCY)); + IOLog("MSR_CORE[%d]_C7_RESIDENCY......(0x3fe) : 0x%llX\n", logicalCoreNumber, (unsigned long long)rdmsr64(MSR_CORE_C7_RESIDENCY)); } //============================================================================== -IOReturn AppleIntelCPUPowerManagementInfo::getMultiplier(void) +IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) { - timerEventSource->setTimeoutTicks(gInterval); gCoreMultipliers |= (1ULL << (rdmsr64(MSR_IA32_PERF_STS) >> 8)); - if (!loopLock) + timerEventSource->setTimeoutTicks(Interval); + + if (loopLock) { - loopLock = true; + return kIOReturnTimeout; + } + + loopLock = true; - if (gCoreMultipliers != gTriggeredPStates) - { - gTriggeredPStates = gCoreMultipliers; - IOLog("AICPUPMI: P-States [ "); + UInt32 magic = 0; + IOSimpleLockLock(simpleLock); + mp_rendezvous_no_intrs(getCStates, (void *)&magic); + IOSimpleLockUnlock(simpleLock); - for (int currentBit = gMinRatio; currentBit <= gMaxRatio; currentBit++) + if (gCoreMultipliers != gTriggeredPStates) + { + gTriggeredPStates = gCoreMultipliers; + IOLog("AICPUPMI: P-States [ "); + + for (int currentBit = gMinRatio; currentBit <= gMaxRatio; currentBit++) + { + UInt64 value = (1ULL << currentBit); + + if ((gTriggeredPStates & value) == value) { - UInt64 value = (1ULL << currentBit); - - if ((gTriggeredPStates & value) == value) - { - IOLog("%d ", currentBit); - } + IOLog("%d ", currentBit); } - - IOLog("]\n"); } + + IOLog("]\n"); + } - loopLock = false; + loopLock = false; - return kIOReturnSuccess; - } + return kIOReturnSuccess; +} - return kIOReturnTimeout; +//============================================================================== + +IOService* AppleIntelCPUPowerManagementInfo::probe(IOService *provider, SInt32 *score) +{ + IOService *ret = super::probe(provider, score); + + if (ret != this) + { + return 0; + } + + return ret; } //============================================================================== @@ -105,42 +142,46 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) { if (IOService::start(provider)) { - timerEventSource = IOTimerEventSource::timerEventSource(this, OSMemberFunctionCast(IOTimerEventSource::Action, this, &AppleIntelCPUPowerManagementInfo::getMultiplier)); - workLoop = getWorkLoop(); + simpleLock = IOSimpleLockAlloc(); - if (timerEventSource && workLoop && (kIOReturnSuccess == workLoop->addEventSource(timerEventSource))) + if (simpleLock) { - this->registerService(0); + timerEventSource = IOTimerEventSource::timerEventSource(this, OSMemberFunctionCast(IOTimerEventSource::Action, this, &AppleIntelCPUPowerManagementInfo::loopTimerEvent)); + workLoop = getWorkLoop(); + + if (timerEventSource && workLoop && (kIOReturnSuccess == workLoop->addEventSource(timerEventSource))) + { + this->registerService(0); - uint32_t cpuid_reg[4]; - do_cpuid(0x00000001, cpuid_reg); + uint32_t cpuid_reg[4]; + do_cpuid(0x00000001, cpuid_reg); - uint8_t cpuModel = bitfield32(cpuid_reg[eax], 7, 4) + (bitfield32(cpuid_reg[eax], 19, 16) << 4); - reportMSRs(cpuModel); + uint8_t cpuModel = bitfield32(cpuid_reg[eax], 7, 4) + (bitfield32(cpuid_reg[eax], 19, 16) << 4); + reportMSRs(cpuModel); - UInt64 msr = rdmsr64(MSR_PLATFORM_INFO); - gMinRatio = (UInt8)((msr >> 40) & 0xff); - IOLog("Low Frequency Mode : %d00 MHz\n", gMinRatio); + UInt64 msr = rdmsr64(MSR_PLATFORM_INFO); + gMinRatio = (UInt8)((msr >> 40) & 0xff); + IOLog("Low Frequency Mode : %d00 MHz\n", gMinRatio); - gClockRatio = (UInt8)((msr >> 8) & 0xff); - IOLog("Clock Speed : %d00 MHz\n", gClockRatio); + gClockRatio = (UInt8)((msr >> 8) & 0xff); + IOLog("Clock Speed : %d00 MHz\n", gClockRatio); - if (!((rdmsr64(IA32_MISC_ENABLES) >> 32) & 0x40)) // Turbo Mode Enabled? - { - msr = rdmsr64(MSR_TURBO_RATIO_LIMIT); - gMaxRatio = (UInt8)(msr & 0xff); - IOLog("Max Turbo Frequency: %d00 MHz\n", gMaxRatio); - } - else - { - gMaxRatio = gClockRatio; - IOLog("Max Frequency : %d00 MHz\n", gMaxRatio); - } + if (!((rdmsr64(IA32_MISC_ENABLES) >> 32) & 0x40)) // Turbo Mode Enabled? + { + msr = rdmsr64(MSR_TURBO_RATIO_LIMIT); + gMaxRatio = (UInt8)(msr & 0xff); + IOLog("Max Turbo Frequency: %d00 MHz\n", gMaxRatio); + } + else + { + gMaxRatio = gClockRatio; + IOLog("Max Frequency : %d00 MHz\n", gMaxRatio); + } - timerEventSource->enable(); - timerEventSource->setTimeoutMS(500); + timerEventSource->setTimeoutMS(1000); - return true; + return true; + } } } @@ -151,16 +192,17 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) void AppleIntelCPUPowerManagementInfo::stop(IOService *provider) { - if (timerEventSource) + if (simpleLock) { - timerEventSource->disable(); - timerEventSource->cancelTimeout(); + IOSimpleLockFree(simpleLock); + } + if (timerEventSource) + { if (workLoop) { + timerEventSource->cancelTimeout(); workLoop->removeEventSource(timerEventSource); - workLoop->release(); - workLoop = NULL; } timerEventSource->release(); @@ -174,20 +216,5 @@ void AppleIntelCPUPowerManagementInfo::stop(IOService *provider) void AppleIntelCPUPowerManagementInfo::free() { - if (timerEventSource) - { - timerEventSource->cancelTimeout(); - - if (workLoop) - { - workLoop->removeEventSource(timerEventSource); - workLoop->release(); - workLoop = NULL; - } - - timerEventSource->release(); - timerEventSource = NULL; - } - super::free(); } diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index f580639..3f1f385 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -21,32 +21,38 @@ #define super IOService +extern "C" void mp_rendezvous_no_intrs(void (*action_func)(void *), void * arg); +extern "C" int cpu_number(void); + class AppleIntelCPUPowerManagementInfo : public IOService { - OSDeclareDefaultStructors (AppleIntelCPUPowerManagementInfo); + OSDeclareDefaultStructors (AppleIntelCPUPowerManagementInfo); private: - IOWorkLoop *workLoop; - IOTimerEventSource *timerEventSource; + IOSimpleLock *simpleLock; + IOWorkLoop *workLoop; + IOTimerEventSource *timerEventSource; - virtual IOReturn getMultiplier(void); + virtual IOReturn loopTimerEvent(void); void reportMSRs(uint8_t aModel); bool loopLock = false; - UInt16 gInterval = 50; - UInt8 gMinRatio = 0; - UInt8 gClockRatio = 0; - UInt8 gMaxRatio = 0; - - UInt64 gCoreMultipliers; - UInt64 gTriggeredPStates; + UInt16 Interval = 50; public: - virtual bool start(IOService * provider); - virtual void stop(IOService * provider); - virtual void free(void); + virtual IOService * probe(IOService * provider, SInt32 * score); + virtual bool start(IOService * provider); + virtual void stop(IOService * provider); + virtual void free(void); }; OSDefineMetaClassAndStructors(AppleIntelCPUPowerManagementInfo, IOService) + +UInt64 gCoreMultipliers; +UInt64 gTriggeredPStates; + +UInt8 gMinRatio = 0; +UInt8 gClockRatio = 0; +UInt8 gMaxRatio = 0; From 1dd067cf7eed213fcbfde14b1cf5d5dc5104bfef Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 2 Mar 2013 01:01:15 +0100 Subject: [PATCH 312/623] Create /usr/local/bin and set ownership when required Thanks to Apple_Tree for reporting this bug! --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 7399ff2..05bf5ff 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -1032,7 +1032,8 @@ function _findIasl() # XXX: Jeroen, try curl --create-dirs without the mkdir here ;) if [ ! -d /usr/local/bin ]; then printf "Creating target directory... " - sudo mkdir /usr/local/bin/ + sudo mkdir -p /usr/local/bin/ + sudo chown -R root:wheel /usr/local/bin/ fi printf "Downloading iasl...\n" From b33d42b44218aa6deecf3f64c88878328dbdd334 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 2 Mar 2013 01:14:01 +0100 Subject: [PATCH 313/623] Fix Haswell definitions --- i386/libsaio/cpu/essentials.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index aed1072..73c44be 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -152,8 +152,8 @@ #define CPU_MODEL_IB_CORE_EX 0x3B // Ivy Bridge Core Processors (LGA 2011) #define CPU_MODEL_IB_CORE_XEON 0x3E -#define CPU_MODEL_HASWELL_CORE_EX 0x3C -#define CPU_MODEL_HASWELL_CORE_EX 0x3F +#define CPU_MODEL_HASWELL 0x3C +#define CPU_MODEL_HASWELL_CORE 0x3F #define CPU_MODEL_HASWELL_CORE_EX 0x45 #define DALES_BRIDGE 1 From c8fd7014f5535573a3966ea81961c317ce46f417 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 2 Mar 2013 01:14:39 +0100 Subject: [PATCH 314/623] Use a global instead of a function argument --- .../AppleIntelCPUPowerManagementInfo.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index 3f1f385..00b532d 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -56,3 +56,5 @@ UInt64 gTriggeredPStates; UInt8 gMinRatio = 0; UInt8 gClockRatio = 0; UInt8 gMaxRatio = 0; + +UInt8 gCPUModel = 0x2A; \ No newline at end of file From 41df1f0eea2d339a04ffaf5f737aea46560383b9 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 2 Mar 2013 01:19:31 +0100 Subject: [PATCH 315/623] Use a global instead of a function argument MSR 0x60d, 0x3fa and 0x3fe are (mobile?) Sandy Bridge only. --- .../AppleIntelCPUPowerManagementInfo.cpp | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 98942b8..ebc1c75 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -13,7 +13,7 @@ //============================================================================== -void AppleIntelCPUPowerManagementInfo::reportMSRs(uint8_t aModel) +void AppleIntelCPUPowerManagementInfo::reportMSRs(void) { IOLog("MSR_CORE_THREAD_COUNT......(0x35) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_THREAD_COUNT)); @@ -46,14 +46,14 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(uint8_t aModel) IOLog("MSR_PP0_ENERGY_STATUS......(0x639) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_ENERGY_STATUS)); IOLog("MSR_PP0_POLICY.............(0x63a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POLICY)); - if ((aModel == CPU_MODEL_SB_CORE) || aModel == (CPU_MODEL_IB_CORE)) + if ((gCPUModel == CPU_MODEL_SB_CORE) || (gCPUModel == CPU_MODEL_IB_CORE)) { IOLog("MSR_PP1_POWER_LIMIT........(0x640) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POWER_LIMIT)); IOLog("MSR_PP1_ENERGY_STATUS......(0x641) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_ENERGY_STATUS)); IOLog("MSR_PP1_POLICY.............(0x642) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POLICY)); } - if ((aModel == CPU_MODEL_IB_CORE) || (aModel == CPU_MODEL_IB_CORE_EX)) + if ((gCPUModel != CPU_MODEL_SB_CORE) && (gCPUModel != CPU_MODEL_SB_JAKETOWN)) { IOLog("MSR_CONFIG_TDP_NOMINAL.....(0x648) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_NOMINAL)); IOLog("MSR_CONFIG_TDP_LEVEL1......(0x649) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL1)); @@ -61,11 +61,19 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(uint8_t aModel) IOLog("MSR_CONFIG_TDP_CONTROL.....(0x64b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_CONTROL)); IOLog("MSR_TURBO_ACTIVATION_RATIO.(0x64c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_ACTIVATION_RATIO)); } - - IOLog("MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C2_RESIDENCY)); + + if ((gCPUModel == CPU_MODEL_SB_CORE) || (gCPUModel == CPU_MODEL_SB_JAKETOWN)) + { + IOLog("MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C2_RESIDENCY)); + } + IOLog("MSR_PKG_C3_RESIDENCY.......(0x3f8) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C3_RESIDENCY)); IOLog("MSR_PKG_C6_RESIDENCY.......(0x3f9) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C6_RESIDENCY)); - IOLog("MSR_PKG_C7_RESIDENCY.......(0x3fa) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + + if ((gCPUModel != CPU_MODEL_IB_CORE) && (gCPUModel != CPU_MODEL_IB_CORE_EX)) + { + IOLog("MSR_PKG_C7_RESIDENCY.......(0x3fa) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + } } //============================================================================== @@ -76,7 +84,11 @@ inline void getCStates(void *arg) IOLog("MSR_CORE[%d]_C3_RESIDENCY......(0x3fc) : 0x%llX\n", logicalCoreNumber, (unsigned long long)rdmsr64(MSR_CORE_C3_RESIDENCY)); IOLog("MSR_CORE[%d]_C6_RESIDENCY......(0x3fd) : 0x%llX\n", logicalCoreNumber, (unsigned long long)rdmsr64(MSR_CORE_C6_RESIDENCY)); - IOLog("MSR_CORE[%d]_C7_RESIDENCY......(0x3fe) : 0x%llX\n", logicalCoreNumber, (unsigned long long)rdmsr64(MSR_CORE_C7_RESIDENCY)); + + if ((gCPUModel == CPU_MODEL_SB_CORE) || (gCPUModel == CPU_MODEL_SB_JAKETOWN)) + { + IOLog("MSR_CORE[%d]_C7_RESIDENCY......(0x3fe) : 0x%llX\n", logicalCoreNumber, (unsigned long long)rdmsr64(MSR_CORE_C7_RESIDENCY)); + } } //============================================================================== @@ -156,8 +168,8 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) uint32_t cpuid_reg[4]; do_cpuid(0x00000001, cpuid_reg); - uint8_t cpuModel = bitfield32(cpuid_reg[eax], 7, 4) + (bitfield32(cpuid_reg[eax], 19, 16) << 4); - reportMSRs(cpuModel); + gCPUModel = bitfield32(cpuid_reg[eax], 7, 4) + (bitfield32(cpuid_reg[eax], 19, 16) << 4); + reportMSRs(); UInt64 msr = rdmsr64(MSR_PLATFORM_INFO); gMinRatio = (UInt8)((msr >> 40) & 0xff); From 70f7739ebaaca0ffaa9708ab00ec57d9f88c3af9 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 2 Mar 2013 01:19:37 +0100 Subject: [PATCH 316/623] Use a global instead of a function argument --- .../AppleIntelCPUPowerManagementInfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index 00b532d..0616e9e 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -35,7 +35,7 @@ class AppleIntelCPUPowerManagementInfo : public IOService virtual IOReturn loopTimerEvent(void); - void reportMSRs(uint8_t aModel); + void reportMSRs(void); bool loopLock = false; From 2204aa034f900d1c6fc5c7faa4210d1426e668ad Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 2 Mar 2013 01:35:54 +0100 Subject: [PATCH 317/623] Updating script to v5.3 Create /usr/local/bin when missing (Jeroen, Februari 2013) --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 05bf5ff..7353186 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 5.2 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 5.3 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -56,6 +56,7 @@ # - Improved argument checking, now supporting a fourth argument (Jeroen/Pike, Februari 2013) # - Suppress override output when possible (Jeroen, Februari 2013) # - Get processor label from ioreg (Jeroen/Pike, Februari 2013) +# - Create /usr/local/bin when missing (Jeroen, Februari 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -141,7 +142,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=5.2 +gScriptVersion=5.3 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' From 5ad03b3cb880cc0b7d07007f407cc1443956b080 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 2 Mar 2013 01:40:00 +0100 Subject: [PATCH 318/623] Adding E5-2687W CPU data Thanks to 'stinga11' for the data! --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 7353186..476204c 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -188,6 +188,8 @@ let PROCESSOR_NUMBER_ERROR=5 # gServerSandyBridgeCPUList=( +# E5-2600 Xeon Processor Series +E5-2687W,150,0,3100,3800,8,16 # E5-1600 Xeon Processor Series E5-1660,130,0,3300,3900,6,12 E5-1650,130,0,3200,3800,6,12 From 7e67bf9445a7703d10a94dcc22835fb878b52e54 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 3 Mar 2013 19:47:24 +0100 Subject: [PATCH 319/623] Updating script to v5.5 Changed warnings to make them pop out in the on-screen log Now using the ACPI processor names of the running system Now supporting up to 256/0xff logical processors Command line argument for processor labels added --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 166 +++++++++++++++++++-------- 1 file changed, 115 insertions(+), 51 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 476204c..7e20dec 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 5.3 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 5.5 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -57,6 +57,10 @@ # - Suppress override output when possible (Jeroen, Februari 2013) # - Get processor label from ioreg (Jeroen/Pike, Februari 2013) # - Create /usr/local/bin when missing (Jeroen, Februari 2013) +# - Changed warnings to make them pop out in the on-screen log (Pike, March 2013) +# - Now using the ACPI processor names of the running system (Pike, March 2013) +# - Now supporting up to 256/0xff logical processors (Pike, March 2013) +# - Command line argument for processor labels added (Pike, March 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -83,6 +87,17 @@ # - ./ssdtPRGen.sh 'E3-1220 V2' 3600 70 # - ./ssdtPRGen.sh 'E3-1220 V2' 3600 70 1 # +# Usage (v5.5 and greater): +# +# - ./ssdtPRGen.sh [processor number] [max turbo frequency] [TDP] [CPU type] [ACPI Processor Name] +# +# - ./ssdtPRGen.sh E5-1650 +# +# - ./ssdtPRGen.sh 'E3-1220 V2' +# - ./ssdtPRGen.sh 'E3-1220 V2' 3600 +# - ./ssdtPRGen.sh 'E3-1220 V2' 3600 70 +# - ./ssdtPRGen.sh 'E3-1220 V2' 3600 70 1 +# - ./ssdtPRGen.sh 'E3-1220 V2' 3600 70 1 CPU # # set -x # Used for tracing errors (can be used anywhere in the script). @@ -142,7 +157,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=5.3 +gScriptVersion=5.5 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -182,6 +197,8 @@ let MAX_TURBO_FREQUENCY_ERROR=2 let MAX_TDP_ERROR=3 let TARGET_CPU_ERROR=4 let PROCESSOR_NUMBER_ERROR=5 +let PROCESSOR_LABEL_LENGTH_ERROR=6 +let PROCESSOR_NAMES_ERROR=7 # # Processor Number, Max TDP, Low Frequency Mode, Clock Speed, Max Turbo Frequency, Cores, Threads @@ -468,31 +485,29 @@ function _printHeader() echo '{' >> $gSsdtPR } - #-------------------------------------------------------------------------------- function _printExternals() { - currentCPU=0; + let currentCPU=0; - while [ $currentCPU -lt $1 ]; do - printf " External (\_PR_.$gProcLabel%X, DeviceObj)\n" $currentCPU >> $gSsdtPR + while [ $currentCPU -lt $gLogicalCPUs ]; do + echo " External (\_PR_.${gProcessorNames[$currentCPU]}, DeviceObj)" >> $gSsdtPR let currentCPU+=1 done echo '' >> $gSsdtPR } - #-------------------------------------------------------------------------------- function _printDebugInfo() { if ((gDebug)); then - echo ' Store ("ssdtPRGen.sh v'$gScriptVersion'", Debug)' >> $gSsdtPR + echo ' Store ("ssdtPRGen version: '$gScriptVersion'", Debug)' >> $gSsdtPR echo ' Store ("baseFrequency : '$gBaseFrequency'", Debug)' >> $gSsdtPR echo ' Store ("frequency : '$frequency'", Debug)' >> $gSsdtPR - echo ' Store ("logicalCPUs : '$logicalCPUs'", Debug)' >> $gSsdtPR + echo ' Store ("logicalCPUs : '$gLogicalCPUs'", Debug)' >> $gSsdtPR echo ' Store ("tdp : '$gTdp'", Debug)' >> $gSsdtPR echo ' Store ("packageLength : '$packageLength'", Debug)' >> $gSsdtPR echo ' Store ("turboStates : '$turboStates'", Debug)' >> $gSsdtPR @@ -508,11 +523,11 @@ function _printProcessorDefinitions() let currentCPU=0; while [ $currentCPU -lt $1 ]; do - printf " External (\_PR_.$gProcLabel$currentCPU%x, DeviceObj)\n" $currentCPU >> $gSsdtPR + echo " External (\_PR_.${gProcessorNames[$currentCPU]}, DeviceObj)" >> $gSsdtPR let currentCPU+=1 done - echo '' >> $gSsdtPR + echo '' >> $gSsdtPR } #-------------------------------------------------------------------------------- @@ -525,7 +540,7 @@ function _printScopeStart() # TODO: Remove this when CPUPM for IB works properly! let useWorkArounds=0 - echo ' Scope (\_PR.'$gProcLabel'0)' >> $gSsdtPR + echo ' Scope (\_PR.'${gProcessorNames[0]}')' >> $gSsdtPR echo ' {' >> $gSsdtPR # @@ -717,7 +732,7 @@ function _printScopeACST() latency_C3=0xC6 if ((gDebug)); then - echo ' Store ("CPU1 C-States : '$targetCStates'", Debug)' >> $gSsdtPR + echo ' Store ("'${gProcessorNames[1]}' C-States : '$targetCStates'", Debug)' >> $gSsdtPR echo '' >> $gSsdtPR fi else @@ -736,7 +751,7 @@ function _printScopeACST() latency_C7=0xF5 if ((gDebug)); then - echo ' Store ("CPU0 C-States : '$targetCStates'", Debug)' >> $gSsdtPR + echo ' Store ("'${gProcessorNames[0]}' C-States : '$targetCStates'", Debug)' >> $gSsdtPR echo '' >> $gSsdtPR fi fi @@ -776,7 +791,7 @@ function _printScopeACST() let hintCode=0x00 - echo ' /* Low Power Modes for '$gProcLabel$1' */' >> $gSsdtPR + echo " /* Low Power Modes for ${gProcessorNames[$1]} */" >> $gSsdtPR printf " Return (Package (0x%02x)\n" $pkgLength >> $gSsdtPR echo ' {' >> $gSsdtPR echo ' One,' >> $gSsdtPR @@ -919,11 +934,11 @@ function _printScopeCPUn() { let currentCPU=1; - while [ $currentCPU -lt $1 ]; do - echo '' >> $gSsdtPR - printf " Scope (\_PR.$gProcLabel%X)" $currentCPU >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' Method (APSS, 0, NotSerialized) { Return (\_PR.'$gProcLabel'0.APSS) }' >> $gSsdtPR + while [ $currentCPU -lt $gLogicalCPUs ]; do + echo '' >> $gSsdtPR + echo " Scope (\_PR.${gProcessorNames[$currentCPU]})" >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo " Method (APSS, 0, NotSerialized) { Return (\_PR.${gProcessorNames[0]}.APSS) }" >> $gSsdtPR # # IB CPUPM tries to parse/execute CPUn.ACST (see debug data) and thus we add @@ -934,15 +949,15 @@ function _printScopeCPUn() then _printScopeACST 1 else - echo ' Method (ACST, 0, NotSerialized) { Return (\_PR.'$gProcLabel'1.ACST ()) }' >> $gSsdtPR + echo " Method (ACST, 0, NotSerialized) { Return (\_PR.${gProcessorNames[1]}.ACST ()) }" >> $gSsdtPR fi fi - echo ' }' >> $gSsdtPR + echo ' }' >> $gSsdtPR let currentCPU+=1 done - echo '}' >> $gSsdtPR + echo '}' >> $gSsdtPR } #-------------------------------------------------------------------------------- @@ -968,29 +983,58 @@ function _getBoardID() #-------------------------------------------------------------------------------- -function _setProcessorLabel() +function _getProcessorNames() { - local data=$(ioreg -p IODeviceTree -c IOACPIPlatformDevice -k cpu-type | egrep name | sed -e 's/ *[-|="<a-z>]//g') - local cpuLabels=($data) + local acpiNames=$(ioreg -p IODeviceTree -c IOACPIPlatformDevice -k cpu-type | egrep name | sed -e 's/ *[-|="<a-z>]//g') + gProcessorNames=($acpiNames) + + if [[ ${#gProcessorNames[@]} -lt 2 ]]; then + _exitWithError $PROCESSOR_NAMES_ERROR + fi +} + +#-------------------------------------------------------------------------------- - if [[ ${#cpuLabels[@]} -gt 0 ]]; +function _updateProcessorNames() +{ + if [[ $gLogicalCPUs -le 0x0f ]]; then - gFirstProcessorLabel=${cpuLabels[0]} + local label=${gProcLabel:0:3} else - _exitWithError 6 + local label=${gProcLabel:0:2} fi + + if [[ $1 -gt ${#gProcessorNames[@]} ]]; then + echo -e "\nWarning: Target CPU has $gLogicalCPUs logical cores, the running system only ${#gProcessorNames[@]}" + echo " Now using '$label' to extent the current range to $gLogicalCPUs..." + echo -e " You may want to check/verify the generated DSDT_PR.dsl\n" + fi + + let currentCPU=0 + + while [ $currentCPU -lt $1 ]; + do + if [[ $1 -gt 0x0f && $currentCPU -le 0x0f ]]; + then + local filler='0' + else + local filler='' + fi + + gProcessorNames[$currentCPU]=${label}${filler}$(echo "obase=16; ${currentCPU}" | bc) + + let currentCPU+=1 + done } #-------------------------------------------------------------------------------- function _getCPUtype() { - _setProcessorLabel - # # Grab 'cpu-type' property from ioreg (stripped with sed / RegEX magic). # - local grepStr=$(ioreg -p IODeviceTree -n "$gFirstProcessorLabel"@0 -k cpu-type | grep cpu-type | sed -e 's/ *[-|="<a-z>]//g') + local grepStr=$(ioreg -p IODeviceTree -n "${gProcessorNames[0]}"@0 -k cpu-type | grep cpu-type | sed -e 's/ *[-|="<a-z>]//g') # Swap bytes with help of ${str:pos:num} # @@ -1202,7 +1246,7 @@ function _showLowPowerStates() local mask=1 local cStates=$1 - printf "Injected C-States for ${gProcLabel}${2} (" + printf "Injected C-States for ${gProcessorNames[$2]} (" for state in C1 C2 C3 C6 C7 do @@ -1466,9 +1510,12 @@ function _exitWithError() 5) echo -e "\nError: Unknown processor number... exiting\n" 1>&2 exit 5 ;; - 6) echo -e "\nError: Processor label not found... exiting\n" 1>&2 + 6) echo -e "\nError: Processor label length is less than 3... exiting\n" 1>&2 exit 6 ;; + 7) echo -e "\nError: Processor label not found... exiting\n" 1>&2 + exit 7 + ;; *) exit 1 ;; esac @@ -1555,6 +1602,7 @@ function main() esac _getBoardID + _getProcessorNames local modelID=$(_getModelName) local cpu_type=$(_getCPUtype) @@ -1580,7 +1628,8 @@ function main() let maxTurboFrequency=$frequency fi - let logicalCPUs=${cpuData[6]} + let gLogicalCPUs=${cpuData[6]} + IFS=$ifs echo 'With a maximum TDP of '$gTdp' Watt, as specified by Intel' @@ -1592,19 +1641,19 @@ function main() then let gBaseFrequency=$lfm else - echo 'Warning: Low Frequency Mode is 0 (unknown)' + echo -e "\nWarning: Low Frequency Mode is 0 (unknown)" if (($gTypeCPU == gMobileCPU)); then - echo 'Now using 1200 MHz for Mobile processor' + echo -e " Now using 1200 MHz for Mobile processor\n" let gBaseFrequency=1200 else - echo 'Now using 1600 MHz for Server/Desktop processors' + echo -e " Now using 1600 MHz for Server/Desktop processors\n" let gBaseFrequency=1600 fi fi else - let logicalCPUs=$(echo `sysctl machdep.cpu.thread_count` | sed -e 's/^machdep.cpu.thread_count: //') + let gLogicalCPUs=$(echo `sysctl machdep.cpu.thread_count` | sed -e 's/^machdep.cpu.thread_count: //') let frequency=$(echo `sysctl hw.cpufrequency` | sed -e 's/^hw.cpufrequency: //') let frequency=($frequency / 1000000) @@ -1648,7 +1697,7 @@ function main() fi fi - if [ $# -eq 4 ]; then + if [ $# -ge 4 ]; then if [[ "$4" =~ ^[0-9]+$ ]]; then local detectedBridgeType=$gBridgeType @@ -1675,7 +1724,22 @@ function main() fi fi - echo "Number logical CPU's: $logicalCPUs (Core Frequency: $frequency MHz)" + if [ $# -eq 5 ]; then + if [ ${#5} -eq 3 ]; + then + gProcLabel=$(echo "$5" | tr '[:lower:]' '[:upper:]') + echo "Override value: Now using '$gProcLabel' for ACPI processor names!" + _updateProcessorNames ${#gProcessorNames[@]} + else + _exitWithError $PROCESSOR_LABEL_LENGTH_ERROR + fi + fi + + echo "Number logical CPU's: $gLogicalCPUs (Core Frequency: $frequency MHz)" + + if [ $gLogicalCPUs -gt ${#gProcessorNames[@]} ]; then + _updateProcessorNames $gLogicalCPUs + fi # # Check maxTurboFrequency @@ -1713,8 +1777,8 @@ function main() echo "Number of P-States: $packageLength ($gBaseFrequency-$maxTurboFrequency MHz)" _printHeader - _printExternals $logicalCPUs - _printDebugInfo $logicalCPUs $gTdp $packageLength $turboStates $maxTurboFrequency + _printExternals + _printDebugInfo _printScopeStart $turboStates $packageLength _printPackages $gTdp $frequency $maxTurboFrequency @@ -1725,7 +1789,7 @@ function main() _initSandyBridgeSetup _printScopeACST 0 - _printScopeCPUn $logicalCPUs + _printScopeCPUn else local cpuTypeString="07" @@ -1733,7 +1797,7 @@ function main() _printScopeACST 0 _printMethodDSM - _printScopeCPUn $logicalCPUs + _printScopeCPUn fi _showLowPowerStates @@ -1745,19 +1809,19 @@ function main() if [ $gBridgeType -eq $IVY_BRIDGE ]; then if [ ${cpu_type:0:2} -ne $cpuTypeString ]; then - echo "Warning: 'cpu-type' may be set improperly (0x$cpu_type instead of 0x$cpuTypeString${cpu_type:2:2})" + echo -e "\nWarning: 'cpu-type' may be set improperly (0x$cpu_type instead of 0x$cpuTypeString${cpu_type:2:2})" fi if [ $gSystemType -eq 0 ]; then - echo "Warning: 'board-id' [$boardID] is not supported by $bridgeTypeString PM" + echo -e "\nWarning: 'board-id' [$boardID] is not supported by $bridgeTypeString PM" else if [ "$gMacModelIdentifier" != "$modelID" ]; then echo "Error: board-id [$boardID] and model [$modelID] mismatch" fi if [ $currentSystemType -ne $gSystemType ]; then - echo "Warning: 'system-type' may be set improperly ($currentSystemType instead of $gSystemType)" + echo -e "\nWarning: 'system-type' may be set improperly ($currentSystemType instead of $gSystemType)" fi fi fi @@ -1769,13 +1833,13 @@ clear if [ $# -eq 0 ]; then - main "" $1 $2 $3 + main "" $1 $2 $3 $4 else if [[ "$1" =~ ^[0-9]+$ ]]; then - main "" $1 $2 $3 + main "" $1 $2 $3 $4 else - main "$1" $2 $3 $4 + main "$1" $2 $3 $4 $5 fi fi From 5ecb9927bba686033016925ddbbba765157be539 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 3 Mar 2013 19:48:23 +0100 Subject: [PATCH 320/623] Limiting output --- .../AppleIntelCPUPowerManagementInfo.cpp | 26 ++++++++++++------- .../AppleIntelCPUPowerManagementInfo.h | 18 +++++++------ 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index ebc1c75..a5c5d32 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -82,12 +82,17 @@ inline void getCStates(void *arg) { UInt8 logicalCoreNumber = cpu_number(); - IOLog("MSR_CORE[%d]_C3_RESIDENCY......(0x3fc) : 0x%llX\n", logicalCoreNumber, (unsigned long long)rdmsr64(MSR_CORE_C3_RESIDENCY)); - IOLog("MSR_CORE[%d]_C6_RESIDENCY......(0x3fd) : 0x%llX\n", logicalCoreNumber, (unsigned long long)rdmsr64(MSR_CORE_C6_RESIDENCY)); - - if ((gCPUModel == CPU_MODEL_SB_CORE) || (gCPUModel == CPU_MODEL_SB_JAKETOWN)) + if ((gCoreStates & logicalCoreNumber) == 0) { - IOLog("MSR_CORE[%d]_C7_RESIDENCY......(0x3fe) : 0x%llX\n", logicalCoreNumber, (unsigned long long)rdmsr64(MSR_CORE_C7_RESIDENCY)); + gCoreStates |= (1ULL << logicalCoreNumber); + IOLog("Core (logical): %d\n", logicalCoreNumber); + IOLog("MSR_CORE_C3_RESIDENCY......(0x3fc) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_C3_RESIDENCY)); + IOLog("MSR_CORE_C6_RESIDENCY......(0x3fd) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_C6_RESIDENCY)); + + if ((gCPUModel == CPU_MODEL_SB_CORE) || (gCPUModel == CPU_MODEL_SB_JAKETOWN)) + { + IOLog("MSR_CORE_C7_RESIDENCY......(0x3fe) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_C7_RESIDENCY)); + } } } @@ -106,10 +111,13 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) loopLock = true; - UInt32 magic = 0; - IOSimpleLockLock(simpleLock); - mp_rendezvous_no_intrs(getCStates, (void *)&magic); - IOSimpleLockUnlock(simpleLock); + if (dumpCStates) + { + UInt32 magic = 0; + IOSimpleLockLock(simpleLock); + mp_rendezvous_no_intrs(getCStates, (void *)&magic); + IOSimpleLockUnlock(simpleLock); + } if (gCoreMultipliers != gTriggeredPStates) { diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index 0616e9e..8bc1e39 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -38,23 +38,25 @@ class AppleIntelCPUPowerManagementInfo : public IOService void reportMSRs(void); bool loopLock = false; + bool dumpCStates = false; UInt16 Interval = 50; + UInt64 gCoreMultipliers = 0ULL; + UInt64 gTriggeredPStates = 0ULL; + public: virtual IOService * probe(IOService * provider, SInt32 * score); virtual bool start(IOService * provider); virtual void stop(IOService * provider); virtual void free(void); + + UInt8 gMinRatio = 0; + UInt8 gClockRatio = 0; + UInt8 gMaxRatio = 0; }; OSDefineMetaClassAndStructors(AppleIntelCPUPowerManagementInfo, IOService) -UInt64 gCoreMultipliers; -UInt64 gTriggeredPStates; - -UInt8 gMinRatio = 0; -UInt8 gClockRatio = 0; -UInt8 gMaxRatio = 0; - -UInt8 gCPUModel = 0x2A; \ No newline at end of file +UInt8 gCPUModel = 0x2A; +UInt8 gCoreStates = 0ULL; From 4bd0259d54b62b78f8056aa0160c30276db8c4f4 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 5 Mar 2013 13:46:04 +0100 Subject: [PATCH 321/623] Updating script to v5.6 Whitespace change Bug fix, overriding the cpu type displayed the wrong PM name Thanks to 'alexlov' for eporting this bug! --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 7e20dec..13ebef6 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 5.5 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 5.6 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -61,6 +61,7 @@ # - Now using the ACPI processor names of the running system (Pike, March 2013) # - Now supporting up to 256/0xff logical processors (Pike, March 2013) # - Command line argument for processor labels added (Pike, March 2013) +# - Bug fix, overriding the cpu type displayed the wrong name (Jeroen, March 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -157,7 +158,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=5.5 +gScriptVersion=5.6 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -504,7 +505,7 @@ function _printExternals() function _printDebugInfo() { if ((gDebug)); then - echo ' Store ("ssdtPRGen version: '$gScriptVersion'", Debug)' >> $gSsdtPR + echo ' Store ("ssdtPRGen version: '$gScriptVersion'", Debug)' >> $gSsdtPR echo ' Store ("baseFrequency : '$gBaseFrequency'", Debug)' >> $gSsdtPR echo ' Store ("frequency : '$frequency'", Debug)' >> $gSsdtPR echo ' Store ("logicalCPUs : '$gLogicalCPUs'", Debug)' >> $gSsdtPR @@ -1704,20 +1705,20 @@ function main() case "$4" in 0) let gBridgeType=2 - local cpuTypeString="Override value: CPU type, now using: Sandy Bridge!" + local bridgeTypeString='Sandy Bridge' ;; 1) let gBridgeType=4 - local cpuTypeString="Override value: CPU type, now using: Ivy Bridge!" + local bridgeTypeString='Ivy Bridge' ;; 2) let gBridgeType=8 - local cpuTypeString="Override value: CPU type, now using: Haswell!" + local bridgeTypeString='Haswell' ;; *) _exitWithError $TARGET_CPU_ERROR ;; esac if [[ $detectedBridgeType -ne $((2 << $4)) ]]; then - echo $cpuTypeString + echo "Override value: CPU type, now using: $bridgeTypeString" fi else _exitWithError $TARGET_CPU_ERROR From 6e3f17534704249f5f974fc7620ab1c3fe01bfe4 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 5 Mar 2013 13:56:47 +0100 Subject: [PATCH 322/623] Adding some of our experimental code (from secret.h) --- .../AppleIntelCPUPowerManagementInfo.cpp | 51 ++++++++++++++++++- .../AppleIntelCPUPowerManagementInfo.h | 5 ++ 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index a5c5d32..81a4309 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -122,7 +122,7 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) if (gCoreMultipliers != gTriggeredPStates) { gTriggeredPStates = gCoreMultipliers; - IOLog("AICPUPMI: P-States [ "); + IOLog("AICPUPMI: CPU P-States [ "); for (int currentBit = gMinRatio; currentBit <= gMaxRatio; currentBit++) { @@ -134,7 +134,7 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) } } - IOLog("]\n"); + IOLog("] GPU P-State [ %d ]\n", (UInt8)gMchbar[1]); } loopLock = false; @@ -198,6 +198,41 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) IOLog("Max Frequency : %d00 MHz\n", gMaxRatio); } + /* + * TODO: Pike, add check a to see if there is a GPU and if it is is enabled! + */ + IOPhysicalAddress address = (IOPhysicalAddress)(0xFED10000 + 0x5948); + memDescriptor = IOMemoryDescriptor::withPhysicalAddress(address, 0x53, kIODirectionIn); + + if (memDescriptor != NULL) + { + if ((result = memDescriptor->prepare()) == kIOReturnSuccess) + { + memoryMap = memDescriptor->map(); + + if (memoryMap != NULL) + { + gMchbar = (UInt8 *)memoryMap->getVirtualAddress(); + IOLog("Graphics Core Ratios:\n"); + IOLog("Current Ratio : 0x%02x\n", (UInt8)gMchbar[1]); + IOLog("Max Non-Turbo Ratio : 0x%02x\n", (UInt8)gMchbar[0x51]); + IOLog("Max Turbo Ratio : 0x%02x\n", (UInt8)gMchbar[0x50]); + } + else + { + IOLog("Error: memoryMap == NULL\n"); + } + } + else + { + IOLog("Error: memDescriptor->prepare() failed!\n"); + } + } + else + { + IOLog("Error: memDescriptor == NULL\n"); + } + timerEventSource->setTimeoutMS(1000); return true; @@ -236,5 +271,17 @@ void AppleIntelCPUPowerManagementInfo::stop(IOService *provider) void AppleIntelCPUPowerManagementInfo::free() { + if (memoryMap) + { + memoryMap->release(); + memoryMap = NULL; + } + + if (memDescriptor) + { + memDescriptor->release(); + memDescriptor = NULL; + } + super::free(); } diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index 8bc1e39..d6c04f3 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -32,6 +32,10 @@ class AppleIntelCPUPowerManagementInfo : public IOService IOSimpleLock *simpleLock; IOWorkLoop *workLoop; IOTimerEventSource *timerEventSource; + IOMemoryDescriptor *memDescriptor; + IOMemoryMap *memoryMap; + + IOReturn result = kIOReturnSuccess; virtual IOReturn loopTimerEvent(void); @@ -60,3 +64,4 @@ OSDefineMetaClassAndStructors(AppleIntelCPUPowerManagementInfo, IOService) UInt8 gCPUModel = 0x2A; UInt8 gCoreStates = 0ULL; +UInt8 * gMchbar = NULL; From 7ec9b591a877bdf2ef12145d3fbb29937beaaefb Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Fri, 8 Mar 2013 13:09:42 +0100 Subject: [PATCH 323/623] Fix broken model selection --- i386/libsaio/platform.h | 56 ++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 16225f1..de058dd 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -54,34 +54,34 @@ // Additional model selectors to select a specific target model. //------------------------------------------------------------------------------ -#define IMAC_131 (IMAC | (4 << 15)) -#define IMAC_122 (IMAC | (3 << 15)) -#define IMAC_121 (IMAC | (2 << 15)) -#define IMAC_111 (IMAC | (1 << 15)) -#define IMAC_132 IMAC // Defaults to iMac13,2 - -#define MACBOOK_41 MACBOOK // Defaults to MacBook4,1 - -#define MACBOOK_AIR_42 MACBOOK_AIR | (1 << 15) -#define MACBOOK_AIR_41 MACBOOK_AIR // Defaults to MacBookAir4,1 - -#define MACBOOK_PRO_102 MACBOOK_PRO | (6 << 15) -#define MACBOOK_PRO_101 MACBOOK_PRO | (5 << 15) -#define MACBOOK_PRO_91 MACBOOK_PRO | (4 << 15) -#define MACBOOK_PRO_83 MACBOOK_PRO | (3 << 15) -#define MACBOOK_PRO_82 MACBOOK_PRO | (2 << 15) -#define MACBOOK_PRO_81 MACBOOK_PRO | (1 << 15) -#define MACBOOK_PRO_61 MACBOOK_PRO // Defaults to MacBookPro8,1 - -#define MACMINI_62 (MACMINI | (4 << 15)) -#define MACMINI_61 (MACMINI | (3 << 15)) -#define MACMINI_53 (MACMINI | (2 << 15)) -#define MACMINI_52 (MACMINI | (1 << 15)) -#define MACMINI_51 MACMINI // Defaults to Macmini5,1 - -#define MACPRO_51 MACPRO | (2 << 15) -#define MACPRO_41 MACPRO | (1 << 15) -#define MACPRO_31 MACPRO // Defaults to MacPro3,1 +#define IMAC_131 (IMAC | (4 << 15)) +#define IMAC_122 (IMAC | (3 << 15)) +#define IMAC_121 (IMAC | (2 << 15)) +#define IMAC_111 (IMAC | (1 << 15)) +#define IMAC_132 IMAC // Defaults to iMac13,2 + +#define MACBOOK_41 MACBOOK // Defaults to MacBook4,1 + +#define MACBOOK_AIR_42 (MACBOOK_AIR | (1 << 15)) +#define MACBOOK_AIR_41 MACBOOK_AIR // Defaults to MacBookAir4,1 + +#define MACBOOK_PRO_102 (MACBOOK_PRO | (6 << 15)) +#define MACBOOK_PRO_101 (MACBOOK_PRO | (5 << 15)) +#define MACBOOK_PRO_91 (MACBOOK_PRO | (4 << 15)) +#define MACBOOK_PRO_83 (MACBOOK_PRO | (3 << 15)) +#define MACBOOK_PRO_82 (MACBOOK_PRO | (2 << 15)) +#define MACBOOK_PRO_81 (MACBOOK_PRO | (1 << 15)) +#define MACBOOK_PRO_61 MACBOOK_PRO // Defaults to MacBookPro8,1 + +#define MACMINI_62 (MACMINI | (4 << 15)) +#define MACMINI_61 (MACMINI | (3 << 15)) +#define MACMINI_53 (MACMINI | (2 << 15)) +#define MACMINI_52 (MACMINI | (1 << 15)) +#define MACMINI_51 MACMINI // Defaults to Macmini5,1 + +#define MACPRO_51 (MACPRO | (2 << 15)) +#define MACPRO_41 (MACPRO | (1 << 15)) +#define MACPRO_31 MACPRO // Defaults to MacPro3,1 //------------------------------------------------------------------------------ From 49652c4385a98c2169ef3de0924c1d5df5bc8463 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sun, 10 Mar 2013 14:02:22 +0100 Subject: [PATCH 324/623] For for broken kernelcache (pre-linked kernel) Thanks to Jeroen for testing this! --- i386/libsaio/xml.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/xml.c b/i386/libsaio/xml.c index 79ae65d..72a32f0 100755 --- a/i386/libsaio/xml.c +++ b/i386/libsaio/xml.c @@ -707,10 +707,10 @@ static void FreeSymbol(char * string) { gSymbolsHead = symbol->next; } - } - // Free the symbol's memory. - free (symbol); + // Free the symbol's memory. + free (symbol); + } } } From ffce8605dc09f5bf9c4042c1d3ee5575743706f8 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Tue, 19 Mar 2013 05:24:35 +0100 Subject: [PATCH 325/623] Adding link to Pike's blog --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index b0266b4..f46e642 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ About this project: ------------------- -This Open Source hobby project is maintained by Pike and dgsga. Two long time supporters of the RevoBoot project. +This Open Source hobby project is maintained by Pike (http://pikeralpha.wordpress.com) and dgsga. Two long time supporters of the RevoBoot project. Note that we do not tolerate/share any (links to) copyrighted material. We only use purchased software and we won't share any of it. Just get your copy of OS X in the Apple store. Should be affordable for everyone. From 604d77ca5999a32eec9a83dd1325a56ccc60e871 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 17 Mar 2013 18:33:07 +0100 Subject: [PATCH 326/623] STATE_SUCCESS > EFI_SUCCESS --- i386/boot2/boot.c | 6 +++--- i386/boot2/drivers.c | 12 ++++++------ i386/boot2/graphics.c | 28 +++++++++++++-------------- i386/libsaio/efi/efi.h | 43 ++++++++++-------------------------------- i386/libsaio/libsaio.h | 2 -- i386/libsaio/sys.c | 2 +- i386/libsaio/vbe.h | 5 ----- 7 files changed, 33 insertions(+), 65 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index f726d08..a10333a 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -230,7 +230,7 @@ void boot(int biosdev) config_file_t nvramStorage; const char * path = "/Extra/NVRAM/nvramStorage.plist"; - if (loadConfigFile(path, &nvramStorage) == STATE_SUCCESS) + if (loadConfigFile(path, &nvramStorage) == EFI_SUCCESS) { _BOOT_DEBUG_DUMP("nvramStorage.plist found\n"); @@ -260,7 +260,7 @@ void boot(int biosdev) // Loading: /Library/Preferences/SystemConfiguration/com.apple.Boot.plist // TODO: Check if everything works <i>without</i> having this plist. - if (loadCABootPlist() == STATE_SUCCESS) + if (loadCABootPlist() == EFI_SUCCESS) { _BOOT_DEBUG_DUMP("com.apple.Boot.plist located.\n"); @@ -363,7 +363,7 @@ void boot(int biosdev) _BOOT_DEBUG_DUMP("Booting from a System Volume, getting UUID.\n"); // Yes, then let's get the UUID. - if (HFSGetUUID(gPlatform.BootVolume, rootUUID) == STATE_SUCCESS) + if (HFSGetUUID(gPlatform.BootVolume, rootUUID) == EFI_SUCCESS) { _BOOT_DEBUG_DUMP("Success [%s]\n", rootUUID); } diff --git a/i386/boot2/drivers.c b/i386/boot2/drivers.c index 620e9a3..cb5a24a 100755 --- a/i386/boot2/drivers.c +++ b/i386/boot2/drivers.c @@ -168,7 +168,7 @@ static long initDriverSupport(void) long loadDrivers(char * dirSpec) { - if (initDriverSupport() != STATE_SUCCESS) + if (initDriverSupport() != EFI_SUCCESS) { return -1; } @@ -180,7 +180,7 @@ long loadDrivers(char * dirSpec) if (shouldLoadMKext) // Skipped in "Safe Boot" mode. { - if (loadMultiKext(gPlatform.KernelCachePath) == STATE_SUCCESS) + if (loadMultiKext(gPlatform.KernelCachePath) == EFI_SUCCESS) { gKextLoadStatus |= 1; @@ -201,7 +201,7 @@ long loadDrivers(char * dirSpec) { _DRIVERS_DEBUG_DUMP("\nCalling loadKexts(\"/System/Library/Extensions\");\n"); - if (loadKexts("/System/Library/Extensions", 0) == STATE_SUCCESS) + if (loadKexts("/System/Library/Extensions", 0) == EFI_SUCCESS) { _DRIVERS_DEBUG_DUMP("loadKexts(1) OK.\n"); } @@ -215,7 +215,7 @@ long loadDrivers(char * dirSpec) _DRIVERS_DEBUG_SLEEP(15); - return STATE_SUCCESS; + return EFI_SUCCESS; } @@ -243,7 +243,7 @@ static int loadMultiKext(char * path) long ret = GetFileInfo(path, fileName, &flags, &time); // Pre-flight checks; Does the file exists, and is it something we can use? - if ((ret == STATE_SUCCESS) && ((flags & kFileTypeMask) == kFileTypeFlat)) + if ((ret == EFI_SUCCESS) && ((flags & kFileTypeMask) == kFileTypeFlat)) { unsigned long driversAddr, driversLength; char segName[32]; @@ -305,7 +305,7 @@ static int loadMultiKext(char * path) _DRIVERS_DEBUG_DUMP("loadMultiKext(Success : 0) @ 0x%08x\n", driversAddr); - return STATE_SUCCESS; + return EFI_SUCCESS; } _DRIVERS_DEBUG_DUMP("loadMultiKext(File Not Found Error: -1)\n"); diff --git a/i386/boot2/graphics.c b/i386/boot2/graphics.c index d07f353..c42c451 100755 --- a/i386/boot2/graphics.c +++ b/i386/boot2/graphics.c @@ -28,10 +28,8 @@ #include "boot.h" #include "vbe.h" - #include "bootstruct.h" - //============================================================================== bool inGraphicsMode(void) @@ -65,7 +63,7 @@ static unsigned short getVESAModeWithProperties(unsigned short width, unsigned s strcpy((char*)&vbeInfo, "VBE2"); status = getVBEInfo(&vbeInfo); - if (status != STATE_SUCCESS) + if (status != EFI_SUCCESS) { return modeEndOfList; } @@ -86,7 +84,7 @@ static unsigned short getVESAModeWithProperties(unsigned short width, unsigned s bzero(&modeInfo, sizeof(modeInfo)); status = getVBEModeInfo(*modePtr, &modeInfo); - if (status != STATE_SUCCESS) + if (status != EFI_SUCCESS) { continue; } @@ -187,7 +185,7 @@ static int setVESATextMode(unsigned short cols, unsigned short rows, unsigned ch getc(); #endif - if ((mode == modeEndOfList) || (setVBEMode(mode, NULL) != STATE_SUCCESS)) + if ((mode == modeEndOfList) || (setVBEMode(mode, NULL) != EFI_SUCCESS)) { video_mode(2); // VGA BIOS, 80x25 text mode. minfo.XResolution = 80; @@ -203,20 +201,20 @@ static int setVESATextMode(unsigned short cols, unsigned short rows, unsigned ch bootArgs->Video.v_baseAddr = 0xb8000; bootArgs->Video.v_rowBytes = 0x8000; - return STATE_SUCCESS; // always return success + return EFI_SUCCESS; // always return success } //============================================================================== -static int setVESAGraphicsMode(unsigned short width, unsigned short height, unsigned char bitsPerPixel, unsigned short refreshRate) +long setVESAGraphicsMode(unsigned short width, unsigned short height, unsigned char bitsPerPixel, unsigned short refreshRate) { VBEModeInfoBlock minfo; - unsigned short mode = 280; // Default to 1024 * 768 * 32 (1920 * 1200 * 32 would be 330) - unsigned short vesaVersion; + unsigned short mode = 280; // Default to 1024 * 768 * 32 (1920 * 1200 * 32 would be 330) + unsigned short vesaVersion; - int status = STATE_FUNCTION_NOT_SUPPORTED; + long status = (long)EFI_UNSUPPORTED; do { @@ -236,7 +234,7 @@ static int setVESAGraphicsMode(unsigned short width, unsigned short height, unsi status = setVBEMode(mode | kLinearFrameBufferBit, NULL); - if (status != STATE_SUCCESS) + if (status != EFI_SUCCESS) { break; } @@ -305,7 +303,7 @@ static int getNumberArrayFromProperty(const char * propKey, unsigned long numbe //============================================================================== -int initGraphicsMode() +long initGraphicsMode() { unsigned long params[4]; @@ -341,19 +339,19 @@ int initGraphicsMode() void setVideoMode(int mode) { - int status = STATE_SUCCESS; + long status = EFI_SUCCESS; unsigned long params[4]; if (mode == GRAPHICS_MODE) { - if ((status = initGraphicsMode()) == STATE_SUCCESS) + if ((status = initGraphicsMode()) == EFI_SUCCESS) { bootArgs->Video.v_display = (gVerboseMode) ? FB_TEXT_MODE : GRAPHICS_MODE; } } - if (mode == VGA_TEXT_MODE || status != STATE_SUCCESS) + if (mode == VGA_TEXT_MODE || status != EFI_SUCCESS) { params[0] = 80; // Default text mode is 80x25. params[1] = 25; diff --git a/i386/libsaio/efi/efi.h b/i386/libsaio/efi/efi.h index a4d1fa9..f5f834c 100755 --- a/i386/libsaio/efi/efi.h +++ b/i386/libsaio/efi/efi.h @@ -29,6 +29,16 @@ #ifndef _LIBSAIO_EFI_EFI_H #define _LIBSAIO_EFI_EFI_H +/// +/// 32/64-bit native width with the highest bit set. +/// +#if EFI_64_BIT + #define EFI_MAX_BIT 0x8000000000000000ULL +#else + #define EFI_MAX_BIT 0x80000000 +#endif + +#include "EfiError.h" // Set up space for up to 5 tables but we currently only add two. #define EFI_MAX_CONFIG_TABLES 5 @@ -47,39 +57,6 @@ static uint8_t const UNSUPPORTEDRET_INSTRUCTIONS[] = { 0xb8, 0x03, 0x00, 0x00, 0x80, 0xc3 }; #endif -/// -/// 32/64-bit native width with the highest bit set. -/// -#if EFI_64_BIT - #define EFI_MAX_BIT 0x8000000000000000ULL -#else - #define EFI_MAX_BIT 0x80000000 -#endif - -/// -/// Macro's to encode the status code. -/// - -// Set the upper bit to indicate EFI Error. -#define ENCODE_ERROR(_a) (EFI_MAX_BIT | (_a)) - -#define EFIERR(_a) ENCODE_ERROR(_a) - -/// -/// The operation completed successfully. -/// -#define EFI_SUCCESS 0 - -/// -/// The parameter was incorrect. -/// -#define EFI_INVALID_PARAMETER EFIERR (2) - -/// -/// The operation is not supported. -/// -#define EFI_UNSUPPORTED EFIERR (3) - // EFI Revision info. // #if EFI_64_BIT diff --git a/i386/libsaio/libsaio.h b/i386/libsaio/libsaio.h index ede89d6..f669a27 100755 --- a/i386/libsaio/libsaio.h +++ b/i386/libsaio/libsaio.h @@ -29,8 +29,6 @@ #ifndef __LIBSAIO_LIBSAIO_H #define __LIBSAIO_LIBSAIO_H -#define STATE_SUCCESS 0 - #include "libsa.h" #include "memory.h" #include "io_inline.h" diff --git a/i386/libsaio/sys.c b/i386/libsaio/sys.c index 624ee9c..d1bd2bf 100755 --- a/i386/libsaio/sys.c +++ b/i386/libsaio/sys.c @@ -936,7 +936,7 @@ BVRef getTargetRootVolume(char *rootUUID) if ((bvr->biosdev == hdIndex) && (bvr->flags & kBVFlagSystemVolume)) { if ((bvr->flags & kBVFlagSystemVolume) && - (bvr->fs_getuuid(bvr, rootUUID) == 0)) // STATE_SUCCESS)) + (bvr->fs_getuuid(bvr, rootUUID) == EFI_SUCCESS)) { return bvr; } diff --git a/i386/libsaio/vbe.h b/i386/libsaio/vbe.h index cdf6464..e825bae 100755 --- a/i386/libsaio/vbe.h +++ b/i386/libsaio/vbe.h @@ -90,11 +90,6 @@ enum { errFuncInvalid = 3 }; */ -#define STATE_SUCCESS 0 // graphics.c -// #define STATE_FUNCTION_FAILED 1 -#define STATE_FUNCTION_NOT_SUPPORTED 2 // graphics.c -// #define STATE_FUNCTION_INVALID 3 - /* * Per-controller info, returned in function 4f00. */ From 53b7c727cb43ed8b0aeaeec99007173bc2ebbb01 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 17 Mar 2013 18:33:27 +0100 Subject: [PATCH 327/623] STATE_SUCCESS > EFI_SUCCESS --- i386/libsaio/efi/EfiError.h | 70 +++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 i386/libsaio/efi/EfiError.h diff --git a/i386/libsaio/efi/EfiError.h b/i386/libsaio/efi/EfiError.h new file mode 100644 index 0000000..5e15e1a --- /dev/null +++ b/i386/libsaio/efi/EfiError.h @@ -0,0 +1,70 @@ +/*++ + +Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR> +This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Module Name: + + EfiError.h + +Abstract: + + EFI error levels and their associated defines + +--*/ + +#ifndef _EFI_ERROR_H_ +#define _EFI_ERROR_H_ + +// +// Set the upper bit to indicate EFI Error. +// +#define EFIERR(a) (EFI_MAX_BIT | (a)) + +#define EFIWARN(a) (a) +#define EFI_ERROR(a) (((INTN) (a)) < 0) + +#define EFI_SUCCESS 0 +#define EFI_LOAD_ERROR EFIERR (1) +#define EFI_INVALID_PARAMETER EFIERR (2) +#define EFI_UNSUPPORTED EFIERR (3) +#define EFI_BAD_BUFFER_SIZE EFIERR (4) +#define EFI_BUFFER_TOO_SMALL EFIERR (5) +#define EFI_NOT_READY EFIERR (6) +#define EFI_DEVICE_ERROR EFIERR (7) +#define EFI_WRITE_PROTECTED EFIERR (8) +#define EFI_OUT_OF_RESOURCES EFIERR (9) +#define EFI_VOLUME_CORRUPTED EFIERR (10) +#define EFI_VOLUME_FULL EFIERR (11) +#define EFI_NO_MEDIA EFIERR (12) +#define EFI_MEDIA_CHANGED EFIERR (13) +#define EFI_NOT_FOUND EFIERR (14) +#define EFI_ACCESS_DENIED EFIERR (15) +#define EFI_NO_RESPONSE EFIERR (16) +#define EFI_NO_MAPPING EFIERR (17) +#define EFI_TIMEOUT EFIERR (18) +#define EFI_NOT_STARTED EFIERR (19) +#define EFI_ALREADY_STARTED EFIERR (20) +#define EFI_ABORTED EFIERR (21) +#define EFI_ICMP_ERROR EFIERR (22) +#define EFI_TFTP_ERROR EFIERR (23) +#define EFI_PROTOCOL_ERROR EFIERR (24) +#define EFI_INCOMPATIBLE_VERSION EFIERR (25) +#define EFI_SECURITY_VIOLATION EFIERR (26) +#define EFI_CRC_ERROR EFIERR (27) +#define EFI_END_OF_MEDIA EFIERR (28) +#define EFI_END_OF_FILE EFIERR (31) +#define EFI_INVALID_LANGUAGE EFIERR (32) + +#define EFI_WARN_UNKNOWN_GLYPH EFIWARN (1) +#define EFI_WARN_DELETE_FAILURE EFIWARN (2) +#define EFI_WARN_WRITE_FAILURE EFIWARN (3) +#define EFI_WARN_BUFFER_TOO_SMALL EFIWARN (4) + +#endif From e9cb1fa8c5b3fca1ac2df7be93f06c3728377ebd Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 17 Mar 2013 18:34:19 +0100 Subject: [PATCH 328/623] Reordering model identifier data --- i386/libsaio/platform.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index de058dd..c8e87a1 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -54,6 +54,7 @@ // Additional model selectors to select a specific target model. //------------------------------------------------------------------------------ +<<<<<<< HEAD #define IMAC_131 (IMAC | (4 << 15)) #define IMAC_122 (IMAC | (3 << 15)) #define IMAC_121 (IMAC | (2 << 15)) @@ -61,10 +62,20 @@ #define IMAC_132 IMAC // Defaults to iMac13,2 #define MACBOOK_41 MACBOOK // Defaults to MacBook4,1 +======= +#define IMAC_111 (IMAC | (1 << 15)) +#define IMAC_121 (IMAC | (2 << 15)) +#define IMAC_122 (IMAC | (3 << 15)) +#define IMAC_131 (IMAC | (4 << 15)) +#define IMAC_132 IMAC // Defaults to iMac13,2 + +#define MACBOOK_41 MACBOOK // Defaults to MacBook4,1 +>>>>>>> Reordering model identifier data #define MACBOOK_AIR_42 (MACBOOK_AIR | (1 << 15)) #define MACBOOK_AIR_41 MACBOOK_AIR // Defaults to MacBookAir4,1 +<<<<<<< HEAD #define MACBOOK_PRO_102 (MACBOOK_PRO | (6 << 15)) #define MACBOOK_PRO_101 (MACBOOK_PRO | (5 << 15)) #define MACBOOK_PRO_91 (MACBOOK_PRO | (4 << 15)) @@ -82,6 +93,27 @@ #define MACPRO_51 (MACPRO | (2 << 15)) #define MACPRO_41 (MACPRO | (1 << 15)) #define MACPRO_31 MACPRO // Defaults to MacPro3,1 +======= +#define MACBOOK_PRO_61 (MACBOOK_PRO | (1 << 15)) +#define MACBOOK_PRO_81 (MACBOOK_PRO | (2 << 15)) +#define MACBOOK_PRO_82 (MACBOOK_PRO | (3 << 15)) +#define MACBOOK_PRO_83 (MACBOOK_PRO | (4 << 15)) +#define MACBOOK_PRO_91 (MACBOOK_PRO | (5 << 15)) +#define MACBOOK_PRO_92 (MACBOOK_PRO | (6 << 15)) +#define MACBOOK_PRO_101 (MACBOOK_PRO | (7 << 15)) +#define MACBOOK_PRO_102 MACBOOK_PRO // Defaults to MacBookPro10,2 + +#define MACMINI_41 (MACMINI | (1 << 15)) +#define MACMINI_51 (MACMINI | (2 << 15)) +#define MACMINI_52 (MACMINI | (3 << 15)) +#define MACMINI_53 (MACMINI | (4 << 15)) +#define MACMINI_61 (MACMINI | (5 << 15)) +#define MACMINI_62 MACMINI // Defaults to Macmini5,1 + +#define MACPRO_31 (MACPRO | (1 << 15)) +#define MACPRO_41 (MACPRO | (2 << 15)) +#define MACPRO_51 MACPRO // Defaults to MacPro5,1 +>>>>>>> Reordering model identifier data //------------------------------------------------------------------------------ From 9f10384db292541f6f20423bc77d7657cd9fa8ab Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 17 Mar 2013 18:35:29 +0100 Subject: [PATCH 329/623] Reordering model identifier data Early 2013 MacBook Pro update --- i386/libsaio/smbios/model_data.h | 170 ++++++++++++++++--------------- 1 file changed, 87 insertions(+), 83 deletions(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index ab5cb4c..8e9ca4c 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -37,7 +37,7 @@ #define SMB_PRODUCT_NAME "iMac11,1" #define SMB_BOARD_PRODUCT "Mac-F2268DAE" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '1', ',', '1' } - #elif // Defaults to iMac12,1 + #elif (TARGET_MODEL == IMAC_121) #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" #define SMB_PRODUCT_NAME "iMac12,1" #define SMB_BOARD_PRODUCT "Mac-942B59F58194171B" @@ -47,16 +47,11 @@ #define SMB_PRODUCT_NAME "iMac12,2" #define SMB_BOARD_PRODUCT "Mac-942B5BF58194151B" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '2' } - #elif (TARGET_MODEL == IMAC_121) - #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" - #define SMB_PRODUCT_NAME "iMac12,1" - #define SMB_BOARD_PRODUCT "Mac-942B59F58194171B" - #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '1' } - #elif (TARGET_MODEL == IMAC_111) - #define SMB_BIOS_VERSION "IM111.88Z.0034.B00.0910301727" - #define SMB_PRODUCT_NAME "iMac11,1" - #define SMB_BOARD_PRODUCT "Mac-F2268DAE" - #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '1', ',', '1' } + #elif (TARGET_MODEL == IMAC_131) + #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" + #define SMB_PRODUCT_NAME "iMac13,1" + #define SMB_BOARD_PRODUCT "Mac-00BE6ED71E35EB86" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '1' } #else // Defaults to iMac13,2 #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" #define SMB_PRODUCT_NAME "iMac13,2" @@ -83,20 +78,20 @@ // ------------------------------------------------------------------------------------- #define SMB_FAMILY "MacBookAir" - #if (TARGET_MODEL == MACBOOK_AIR_42) - // Intel Core i5-2557M @ 1.7GHz (2 cores - 4 threads) - // Intel Core i7-2677M @ 1.8GHz (2 cores - 4 threads) - #define SMB_BIOS_VERSION "MBA41.88Z.0077.B08.1109011050" - #define SMB_PRODUCT_NAME "MacBookAir4,2" - #define SMB_BOARD_PRODUCT "Mac-742912EFDBEE19B3" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '4', ',', '2' } - #else // Defaults to MacBookAir4,1 + #if (TARGET_MODEL == MACBOOK_AIR_41) // Intel Core i5-2467M @ 1.6GHz (2 cores - 4 threads) // Intel Core i7-2677M @ 1.8GHz (2 cores - 4 threads) #define SMB_BIOS_VERSION "MBA41.88Z.0077.B08.1109011050" #define SMB_PRODUCT_NAME "MacBookAir4,1" #define SMB_BOARD_PRODUCT "Mac-C08A6BB70A942AC2" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '4', ',', '1' } + #else // Defaults to MacBookAir4,2 + // Intel Core i5-2557M @ 1.7GHz (2 cores - 4 threads) + // Intel Core i7-2677M @ 1.8GHz (2 cores - 4 threads) + #define SMB_BIOS_VERSION "MBA41.88Z.0077.B08.1109011050" + #define SMB_PRODUCT_NAME "MacBookAir4,2" + #define SMB_BOARD_PRODUCT "Mac-742912EFDBEE19B3" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '4', ',', '2' } #endif // ------------------------------------------------------------------------------------- #endif @@ -106,18 +101,26 @@ // ------------------------------------------------------------------------------------- #define SMB_FAMILY "MacBookPro" - #if (TARGET_MODEL == MACBOOK_PRO_102) - // Intel Core i7-3520QM @ 2.90 GHz - 2 cores / 4 threads. - #define SMB_BIOS_VERSION "MBP102.88Z.00FE.B00.1207181057" - #define SMB_PRODUCT_NAME "MacBookPro10,2" - #define SMB_BOARD_PRODUCT "Mac-AFD8A9D944EA4843" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '0', ',', '2' } - #elif (TARGET_MODEL == MACBOOK_PRO_101) - // Intel Core i7-3720QM @ 2.60 GHz - 4 cores / 8 threads. - #define SMB_BIOS_VERSION "MBP101.88Z.00EE.B00.1205101839" - #define SMB_PRODUCT_NAME "MacBookPro10,1" - #define SMB_BOARD_PRODUCT "Mac-C3EC7CD22292981F" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '0', ',', '1' } + #if(TARGET_MODEL == MACBOOK_PRO_61) + #define SMB_BIOS_VERSION "MBP61.88Z.0057.B0C.1007261552" + #define SMB_PRODUCT_NAME "MacBookPro6,1" + #define SMB_BOARD_PRODUCT "Mac-F22589C8" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '6', ',', '1' } + #elif (TARGET_MODEL == MACBOOK_PRO_81) + #define SMB_BIOS_VERSION "MBP81.88Z.0047.B27.1201241646" + #define SMB_PRODUCT_NAME "MacBookPro8,1" + #define SMB_BOARD_PRODUCT "Mac-94245B3640C91C81" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '8', ',', '1' } + #elif (TARGET_MODEL == MACBOOK_PRO_82) + #define SMB_BIOS_VERSION "MBP81.88Z.0047.B27.1201241646" + #define SMB_PRODUCT_NAME "MacBookPro8,2" + #define SMB_BOARD_PRODUCT "Mac-94245A3940C91C80" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '8', ',', '2' } + #elif (TARGET_MODEL == MACBOOK_PRO_83) + #define SMB_BIOS_VERSION "MBP81.88Z.0047.B27.1201241646" + #define SMB_PRODUCT_NAME "MacBookPro8,3" + #define SMB_BOARD_PRODUCT "Mac-942459F5819B171B" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '8', ',', '3' } #elif (TARGET_MODEL == MACBOOK_PRO_91) // Intel Core i7-3820QM @ 2.70 GHz - 4 cores / 8 threads. #define SMB_BIOS_VERSION "MBP91.88Z.00D3.B02.1203281326" @@ -130,26 +133,21 @@ #define SMB_PRODUCT_NAME "MacBookPro9,2" #define SMB_BOARD_PRODUCT "Mac-6F01561E16C75D06" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '9', ',', '2' } - #elif (TARGET_MODEL == MACBOOK_PRO_83) - #define SMB_BIOS_VERSION "MBP81.88Z.0047.B27.1201241646" - #define SMB_PRODUCT_NAME "MacBookPro8,3" - #define SMB_BOARD_PRODUCT "Mac-942459F5819B171B" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '8', ',', '3' } - #elif (TARGET_MODEL == MACBOOK_PRO_82) - #define SMB_BIOS_VERSION "MBP81.88Z.0047.B27.1201241646" - #define SMB_PRODUCT_NAME "MacBookPro8,2" - #define SMB_BOARD_PRODUCT "Mac-94245A3940C91C80" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '8', ',', '2' } - #elif (TARGET_MODEL == MACBOOK_PRO_81) - #define SMB_BIOS_VERSION "MBP81.88Z.0047.B27.1201241646" - #define SMB_PRODUCT_NAME "MacBookPro8,1" - #define SMB_BOARD_PRODUCT "Mac-94245B3640C91C81" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '8', ',', '1' } - #else (TARGET_MODEL == MACBOOK_PRO_61) - #define SMB_BIOS_VERSION "MBP61.88Z.0057.B0C.1007261552" - #define SMB_PRODUCT_NAME "MacBookPro6,1" - #define SMB_BOARD_PRODUCT "Mac-F22589C8" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '6', ',', '1' } + #elif (TARGET_MODEL == MACBOOK_PRO_101) + // Intel Core i7-3635QM @ 2.40 GHz - 4 cores / 8 threads. + // Intel Core i7-3740QM @ 2.70 GHz - 4 cores / 8 threads. + // Intel Core i7-3840QM @ 2.80 GHz - 4 cores / 8 threads. + #define SMB_BIOS_VERSION "MBP101.88Z.00EE.B03.1212211437" + #define SMB_PRODUCT_NAME "MacBookPro10,1" + #define SMB_BOARD_PRODUCT "Mac-C3EC7CD22292981F" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '0', ',', '1' } + #else // Defaults to MacBookPro10,2 + // Intel Core i5-3230QM @ 2.60 GHz - 2 cores / 4 threads. + // Intel Core i7-3540QM @ 3.00 GHz - 2 cores / 4 threads. + #define SMB_BIOS_VERSION "MBP102.88Z.0106.B03.1211161133" + #define SMB_PRODUCT_NAME "MacBookPro10,2" + #define SMB_BOARD_PRODUCT "Mac-AFD8A9D944EA4843" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '0', ',', '2' } #endif // ------------------------------------------------------------------------------------- #endif @@ -159,36 +157,42 @@ // ------------------------------------------------------------------------------------- #define SMB_FAMILY "Macmini" - #if (TARGET_MODEL == MACMINI_62) - // Intel Core i7-3615QM @ 2.30 GHz (4 cores - 8 threads) - #define SMB_BIOS_VERSION "MM61.88Z.0106.B00.1208091121" - #define SMB_PRODUCT_NAME "Macmini6,2" - #define SMB_BOARD_PRODUCT "Mac-F65AE981FFA204ED" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '2' } - #elif (TARGET_MODEL == MACMINI_61) - // Intel Core i5-3210M @ 2.50 GH (2 cores - 4 theeads) - #define SMB_BIOS_VERSION "MM61.88Z.0106.B00.1208091121" - #define SMB_PRODUCT_NAME "Macmini6,1" - #define SMB_BOARD_PRODUCT "Mac-031AEE4D24BFF0B1" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '1' } - #elif (TARGET_MODEL == MACMINI_53) - // Intel Core i7-2635QM @ 2.0GHz (4 cores - 8 threads) + #if (TARGET_MODEL == MACMINI_41) + // Intel Core P8800 @ 2.4/2.66 GHz (2 cores - 2 threads) + #define SMB_BIOS_VERSION "MM41.88Z.0042.B03.1111072100" + #define SMB_PRODUCT_NAME "Macmini4,1" + #define SMB_BOARD_PRODUCT "Mac-F2208EC8" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '4', ',', '1' } + #elif (TARGET_MODEL == MACMINI_51) + // Intel Core i5-2415M @ 2.3 GHz (2 cores - 4 threads) #define SMB_BIOS_VERSION "MM51.88Z.0077.B10.1201241549" - #define SMB_PRODUCT_NAME "Macmini5,3" - #define SMB_BOARD_PRODUCT "Mac-7BA5B2794B2CDB12" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '5', ',', '3' } + #define SMB_PRODUCT_NAME "Macmini5,1" + #define SMB_BOARD_PRODUCT "Mac-8ED6AF5B48C039E1" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '5', ',', '1' } #elif (TARGET_MODEL == MACMINI_52) // Intel Core i5-2520M @ 2.5GHz (2 cores - 4 threads) #define SMB_BIOS_VERSION "MM51.88Z.0077.B10.1201241549" #define SMB_PRODUCT_NAME "Macmini5,2" #define SMB_BOARD_PRODUCT "Mac-4BC72D62AD45599E" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '5', ',', '2' } - #else // Defaults to Macmini5,1 - // Intel Core i5-2415M @ 2.3 GHz (2 cores - 4 theeads) + #elif (TARGET_MODEL == MACMINI_53) + // Intel Core i7-2635QM @ 2.0GHz (4 cores - 8 threads) #define SMB_BIOS_VERSION "MM51.88Z.0077.B10.1201241549" - #define SMB_PRODUCT_NAME "Macmini5,1" - #define SMB_BOARD_PRODUCT "Mac-8ED6AF5B48C039E1" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '5', ',', '1' } + #define SMB_PRODUCT_NAME "Macmini5,3" + #define SMB_BOARD_PRODUCT "Mac-7BA5B2794B2CDB12" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '5', ',', '3' } + #elif (TARGET_MODEL == MACMINI_61) + // Intel Core i5-3210M @ 2.50 GH (2 cores - 4 theeads) + #define SMB_BIOS_VERSION "MM61.88Z.0106.B00.1208091121" + #define SMB_PRODUCT_NAME "Macmini6,1" + #define SMB_BOARD_PRODUCT "Mac-031AEE4D24BFF0B1" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '1' } + #else // Defaults to Macmini6,2 + // Intel Core i7-3615QM @ 2.30 GHz (4 cores - 8 threads) + #define SMB_BIOS_VERSION "MM61.88Z.0106.B00.1208091121" + #define SMB_PRODUCT_NAME "Macmini6,2" + #define SMB_BOARD_PRODUCT "Mac-F65AE981FFA204ED" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '2' } #endif // ------------------------------------------------------------------------------------- #endif @@ -198,21 +202,21 @@ // ------------------------------------------------------------------------------------- #define SMB_FAMILY "MacPro" - #if (TARGET_MODEL == MACPRO_51) - #define SMB_BIOS_VERSION "MP51.88Z.007F.B03.1010071432" - #define SMB_PRODUCT_NAME "MacPro5,1" - #define SMB_BOARD_PRODUCT "Mac-F221BEC8" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '5', ',', '1' } + #if (TARGET_MODEL == MACPRO_31) + #define SMB_BIOS_VERSION "MP31.88Z.006C.B05.0802291410" + #define SMB_PRODUCT_NAME "MacPro3,1" + #define SMB_BOARD_PRODUCT "Mac-F4208DC8" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '3', ',', '1' } #elif (TARGET_MODEL == MACPRO_41) #define SMB_BIOS_VERSION "MP41.88Z.0081.B04.0903051113" #define SMB_PRODUCT_NAME "MacPro4,1" #define SMB_BOARD_PRODUCT "Mac-F221BEC8" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '4', ',', '1' } - #else // Defaults to MacPro3,1 - #define SMB_BIOS_VERSION "MP31.88Z.006C.B05.0802291410" - #define SMB_PRODUCT_NAME "MacPro3,1" - #define SMB_BOARD_PRODUCT "Mac-F4208DC8" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '3', ',', '1' } + #else // Defaults to MacPro5,1 + #define SMB_BIOS_VERSION "MP51.88Z.007F.B03.1010071432" + #define SMB_PRODUCT_NAME "MacPro5,1" + #define SMB_BOARD_PRODUCT "Mac-F221BEC8" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '5', ',', '1' } #endif // ------------------------------------------------------------------------------------- #endif From 3cb214ad67310b96e29152354e9dc11576915815 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 17 Mar 2013 18:35:50 +0100 Subject: [PATCH 330/623] STATE_SUCCESS > EFI_SUCCESS --- i386/libsaio/saio_internal.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/saio_internal.h b/i386/libsaio/saio_internal.h index 660dbcb..ad0c33e 100755 --- a/i386/libsaio/saio_internal.h +++ b/i386/libsaio/saio_internal.h @@ -72,21 +72,25 @@ extern unsigned long getExtendedMemorySize(); extern unsigned long getConventionalMemorySize(); extern void sleep(int n); + /* efi.c */ extern void initEFITree(void); extern void updateEFITree(char *rootUUID); extern void finalizeEFITree(uint32_t kernelAdler32); + /* bootstruct.c */ extern void initKernelBootConfig(void); extern void finalizeKernelBootConfig(void); extern void moveKernelBootArgs(void); + /* cache.c */ extern void CacheReset(); extern void CacheInit(CICell ih, long blockSize); extern long CacheRead(CICell ih, char *buffer, long long offset, long length, long cache); + /* console.c */ extern bool gVerboseMode; extern bool gErrors; @@ -162,8 +166,8 @@ extern bool getValueForBootKey(const char *line, const char *match, const char extern bool getValueForKey(const char *key, const char **val, int *size, config_file_t *configBuff); extern bool getBoolForKey(const char *key, bool *val, config_file_t *configBuff); extern bool getIntForKey(const char *key, int *val, config_file_t *configBuff); -extern bool loadConfigFile(const char *configFile, config_file_t *configBuff); -extern int loadSystemConfig(config_file_t *configBuff); +extern long loadConfigFile(const char *configFile, config_file_t *configBuff); +extern long loadSystemConfig(config_file_t *configBuff); extern char * getNextArg(char ** ptr, char * val); extern long ParseXMLFile(char * buffer, TagPtr * dict); From e7f5d7fd8402145c4644d76c3809fd30b8e27531 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 19 Mar 2013 17:02:33 +0100 Subject: [PATCH 331/623] STATE_SUCCESS -> EFI_SUCCESS --- i386/libsaio/stringTable.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/i386/libsaio/stringTable.c b/i386/libsaio/stringTable.c index d069e89..fa87d5e 100755 --- a/i386/libsaio/stringTable.c +++ b/i386/libsaio/stringTable.c @@ -333,14 +333,13 @@ long ParseXMLFile(char * buffer, TagPtr * dictionaryPtr) } #endif - return 0; + return (long)(EFI_INVALID_PARAMETER | EFI_OUT_OF_RESOURCES); } //============================================================================== -// Returns TRUE on success and FALSE when it is fails to locate / open the file. -bool loadConfigFile(const char * configFile, config_file_t *config) +long loadConfigFile(const char * configFile, config_file_t *config) { int fd = 0; @@ -352,21 +351,21 @@ bool loadConfigFile(const char * configFile, config_file_t *config) close(fd); // Build XML dictionary. - ParseXMLFile(config->plist, &config->dictionary); - - return 0; + if (ParseXMLFile(config->plist, &config->dictionary) > 0) + { + return EFI_SUCCESS; + } } - return 1; + return (long)(EFI_INVALID_PARAMETER | EFI_NOT_FOUND); } //============================================================================== -// Returns 0 on success and -1 when it is fails to locate / open the file. -int loadSystemConfig(config_file_t *config) +long loadSystemConfig(config_file_t *config) { - short retValue = -1; + long retValue = (long) EFI_OUT_OF_RESOURCES; static char * dirspec[] = { @@ -403,11 +402,7 @@ int loadSystemConfig(config_file_t *config) for (; i < len; i++) { sprintf(path, "/%s/%s", dirspec[i], "com.apple.Boot.plist"); - - if (loadConfigFile(path, config) == STATE_SUCCESS) - { - retValue = 0; - } + retValue = loadConfigFile(path, config); } free (path); From c2390f42fda1b048b12ecb61f0b4dc8e8b018b5f Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 19 Mar 2013 17:12:03 +0100 Subject: [PATCH 332/623] Flexible CPU scope Boards that are not backward compatible with the ACPI 1.0 specification use _SB.CPUn/P00n instead of _PR.CPUn/P00n --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 49 +++++++++++++++++++++------- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 13ebef6..d03da14 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 5.6 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 5.7 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -62,6 +62,7 @@ # - Now supporting up to 256/0xff logical processors (Pike, March 2013) # - Command line argument for processor labels added (Pike, March 2013) # - Bug fix, overriding the cpu type displayed the wrong name (Jeroen, March 2013) +# - Automatic detection of CPU scopes added (Pike, March 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -158,7 +159,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=5.6 +gScriptVersion=5.7 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -493,7 +494,7 @@ function _printExternals() let currentCPU=0; while [ $currentCPU -lt $gLogicalCPUs ]; do - echo " External (\_PR_.${gProcessorNames[$currentCPU]}, DeviceObj)" >> $gSsdtPR + echo ' External ('${gScope}'.'${gProcessorNames[$currentCPU]}', DeviceObj)' >> $gSsdtPR let currentCPU+=1 done @@ -524,7 +525,7 @@ function _printProcessorDefinitions() let currentCPU=0; while [ $currentCPU -lt $1 ]; do - echo " External (\_PR_.${gProcessorNames[$currentCPU]}, DeviceObj)" >> $gSsdtPR + echo ' External ('${gScope}'.'${gProcessorNames[$currentCPU]}', DeviceObj)' >> $gSsdtPR let currentCPU+=1 done @@ -541,7 +542,7 @@ function _printScopeStart() # TODO: Remove this when CPUPM for IB works properly! let useWorkArounds=0 - echo ' Scope (\_PR.'${gProcessorNames[0]}')' >> $gSsdtPR + echo ' Scope ('${gScope}'.'${gProcessorNames[0]}')' >> $gSsdtPR echo ' {' >> $gSsdtPR # @@ -936,10 +937,10 @@ function _printScopeCPUn() let currentCPU=1; while [ $currentCPU -lt $gLogicalCPUs ]; do - echo '' >> $gSsdtPR - echo " Scope (\_PR.${gProcessorNames[$currentCPU]})" >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo " Method (APSS, 0, NotSerialized) { Return (\_PR.${gProcessorNames[0]}.APSS) }" >> $gSsdtPR + echo '' >> $gSsdtPR + echo ' Scope ('${gScope}'.'${gProcessorNames[$currentCPU]}')' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Method (APSS, 0, NotSerialized) { Return ('${gScope}'.'${gProcessorNames[0]}'.APSS) }' >> $gSsdtPR # # IB CPUPM tries to parse/execute CPUn.ACST (see debug data) and thus we add @@ -950,15 +951,15 @@ function _printScopeCPUn() then _printScopeACST 1 else - echo " Method (ACST, 0, NotSerialized) { Return (\_PR.${gProcessorNames[1]}.ACST ()) }" >> $gSsdtPR + echo ' Method (ACST, 0, NotSerialized) { Return ('${gScope}'.'${gProcessorNames[1]}'.ACST ()) }' >> $gSsdtPR fi fi - echo ' }' >> $gSsdtPR + echo ' }' >> $gSsdtPR let currentCPU+=1 done - echo '}' >> $gSsdtPR + echo '}' >> $gSsdtPR } #-------------------------------------------------------------------------------- @@ -1030,6 +1031,29 @@ function _updateProcessorNames() #-------------------------------------------------------------------------------- +function _getScope() +{ + let procNameFound=0 + local names=($(ioreg -p IOACPIPlane -d 3 | sed -e 's/<.*>//g' -e 's/.*o //g')) + + for name in ${names[@]} + do + if [[ $name == "_SB" && $procNameFound -eq 0 ]]; then +# echo 'Using: Scope (\_SB.'${gProcessorNames[0]}') etc.' + gScope="\_SB" + return + fi + + if [[ "${name:0:3}" == ${gProcessorNames[0]:0:3} ]]; then +# echo 'Using: Scope (\_PR.'${gProcessorNames[0]}') etc.' + gScope="\_PR" + let procNameFound=1 + fi + done +} + +#-------------------------------------------------------------------------------- + function _getCPUtype() { # @@ -1604,6 +1628,7 @@ function main() _getBoardID _getProcessorNames + _getScope local modelID=$(_getModelName) local cpu_type=$(_getCPUtype) From 8fd3a91d194f1e26a7b3ff854fe70bc688bc7875 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 19 Mar 2013 17:22:43 +0100 Subject: [PATCH 333/623] Whitespace changes only --- i386/libsaio/xml.c | 49 +++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/i386/libsaio/xml.c b/i386/libsaio/xml.c index 72a32f0..a373393 100755 --- a/i386/libsaio/xml.c +++ b/i386/libsaio/xml.c @@ -2,15 +2,15 @@ * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * Portions Copyright (c) 2003 Apple Computer, Inc. All Rights - * Reserved. + * Reserved. * The contents of this file constitute Original Code as defined in and * are subject to the Apple Public Source License Version 2.0 (the * "License"). You may not use this file except in compliance with the * License. Please obtain a copy of the License at * http://www.apple.com/publicsource and read it before using this file. - * + * * This Original Code and all software distributed under the License are * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -18,7 +18,7 @@ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the * License for the specific language governing rights and limitations * under the License. - * + * * @APPLE_LICENSE_HEADER_END@ * * Updates: @@ -106,12 +106,12 @@ TagPtr XMLGetProperty(TagPtr dict, const char * key) { TagPtr tag = 0; TagPtr tagList = dict->tag; - + while (tagList) { tag = tagList; tagList = tag->tagNext; - + if ((tag->type != kTagTypeKey) || (tag->string == 0)) { continue; @@ -122,7 +122,7 @@ TagPtr XMLGetProperty(TagPtr dict, const char * key) } } } - + return 0; } @@ -142,7 +142,7 @@ long XMLParseFile(char * buffer, TagPtr * dict) while (TRUE) { length = XMLParseNextTag(buffer + pos, &tag); - + if (length == -1) { break; @@ -159,7 +159,7 @@ long XMLParseFile(char * buffer, TagPtr * dict) { break; } - + XMLFreeTag(tag); } @@ -169,7 +169,7 @@ long XMLParseFile(char * buffer, TagPtr * dict) } *dict = tag; - + return 0L; } #endif /* UNUSED */ @@ -182,11 +182,11 @@ long XMLParseNextTag(char * buffer, TagPtr * tag) char * tagName; long pos = 0L; long length = GetNextTag(buffer, &tagName, 0); - + if (length != -1L) { pos = length; - + if (!strncmp(tagName, kXMLTagPList, 6)) { length = 0L; @@ -240,12 +240,11 @@ long XMLParseNextTag(char * buffer, TagPtr * tag) *tag = 0; length = 0L; } - + if (length == -1) { pos = 0L; } - } return pos + length; @@ -285,7 +284,7 @@ static long ParseTagList(char * buffer, TagPtr * tag, long type, long empty) if (length == -1) { XMLFreeTag(tagList); - + return -1L; } } @@ -378,7 +377,7 @@ static long ParseTagString(char * buffer, TagPtr * tag) tmpTag->string = string; tmpTag->tag = 0; tmpTag->tagNext = 0; - + *tag = tmpTag; } else @@ -506,38 +505,38 @@ static long GetNextTag(char * buffer, char ** tag, long * start) { // Find the start of the tag. long cnt = 0L; - + while ((buffer[cnt] != '\0') && (buffer[cnt] != '<')) { cnt++; } - + if (buffer[cnt] != '\0') { // Find the end of the tag. long cnt2 = cnt + 1L; - + while ((buffer[cnt2] != '\0') && (buffer[cnt2] != '>')) { cnt2++; } - + if (buffer[cnt2] != '\0') { // Fix the tag data. *tag = buffer + cnt + 1; buffer[cnt2] = '\0'; - + if (start) { *start = cnt; } - + return cnt2 + 1; } } } - + return -1L; } @@ -658,7 +657,7 @@ static char * NewSymbol(char * string) // Set the symbol's data. symbol->refCount = 0; strcpy(symbol->string, string); - + // Add the symbol to the list. symbol->next = gSymbolsHead; gSymbolsHead = symbol; @@ -739,4 +738,4 @@ static SymbolPtr FindSymbol(char * string, SymbolPtr * prevSymbol) } return symbol; -} +} \ No newline at end of file From 1b6902a1d19f445bd8c1075182ea2e501c658779 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 19 Mar 2013 17:30:19 +0100 Subject: [PATCH 334/623] Resolving commit conflicts --- i386/libsaio/platform.h | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index c8e87a1..28c582d 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -54,15 +54,6 @@ // Additional model selectors to select a specific target model. //------------------------------------------------------------------------------ -<<<<<<< HEAD -#define IMAC_131 (IMAC | (4 << 15)) -#define IMAC_122 (IMAC | (3 << 15)) -#define IMAC_121 (IMAC | (2 << 15)) -#define IMAC_111 (IMAC | (1 << 15)) -#define IMAC_132 IMAC // Defaults to iMac13,2 - -#define MACBOOK_41 MACBOOK // Defaults to MacBook4,1 -======= #define IMAC_111 (IMAC | (1 << 15)) #define IMAC_121 (IMAC | (2 << 15)) #define IMAC_122 (IMAC | (3 << 15)) @@ -70,30 +61,10 @@ #define IMAC_132 IMAC // Defaults to iMac13,2 #define MACBOOK_41 MACBOOK // Defaults to MacBook4,1 ->>>>>>> Reordering model identifier data - -#define MACBOOK_AIR_42 (MACBOOK_AIR | (1 << 15)) -#define MACBOOK_AIR_41 MACBOOK_AIR // Defaults to MacBookAir4,1 - -<<<<<<< HEAD -#define MACBOOK_PRO_102 (MACBOOK_PRO | (6 << 15)) -#define MACBOOK_PRO_101 (MACBOOK_PRO | (5 << 15)) -#define MACBOOK_PRO_91 (MACBOOK_PRO | (4 << 15)) -#define MACBOOK_PRO_83 (MACBOOK_PRO | (3 << 15)) -#define MACBOOK_PRO_82 (MACBOOK_PRO | (2 << 15)) -#define MACBOOK_PRO_81 (MACBOOK_PRO | (1 << 15)) -#define MACBOOK_PRO_61 MACBOOK_PRO // Defaults to MacBookPro8,1 - -#define MACMINI_62 (MACMINI | (4 << 15)) -#define MACMINI_61 (MACMINI | (3 << 15)) -#define MACMINI_53 (MACMINI | (2 << 15)) -#define MACMINI_52 (MACMINI | (1 << 15)) -#define MACMINI_51 MACMINI // Defaults to Macmini5,1 - -#define MACPRO_51 (MACPRO | (2 << 15)) -#define MACPRO_41 (MACPRO | (1 << 15)) -#define MACPRO_31 MACPRO // Defaults to MacPro3,1 -======= + +#define MACBOOK_AIR_41 (MACBOOK_AIR | (1 << 15)) +#define MACBOOK_AIR_42 MACBOOK_AIR // Defaults to MacBookAir4,1 + #define MACBOOK_PRO_61 (MACBOOK_PRO | (1 << 15)) #define MACBOOK_PRO_81 (MACBOOK_PRO | (2 << 15)) #define MACBOOK_PRO_82 (MACBOOK_PRO | (3 << 15)) @@ -113,7 +84,6 @@ #define MACPRO_31 (MACPRO | (1 << 15)) #define MACPRO_41 (MACPRO | (2 << 15)) #define MACPRO_51 MACPRO // Defaults to MacPro5,1 ->>>>>>> Reordering model identifier data //------------------------------------------------------------------------------ From 26472251fd7f81e2f6ef2f7bef6b14301e6af9f5 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 22 Mar 2013 23:33:59 +0100 Subject: [PATCH 335/623] Factory DSDT with 32MB IGPU memory selected --- .../acpi/examples/P8Z68-V PRO/dsdt.dsl | 12962 ++++++++++++++++ 1 file changed, 12962 insertions(+) create mode 100644 i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl diff --git a/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl b/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl new file mode 100644 index 0000000..1ad45bd --- /dev/null +++ b/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl @@ -0,0 +1,12962 @@ +/* + * Intel ACPI Component Architecture + * AML Disassembler version 20110316-64 [Mar 16 2011] + * Copyright (c) 2000 - 2011 Intel Corporation + * + * Disassembly of dsdt-factory-32mb-igpu.aml, Wed Mar 20 12:38:18 2013 + * + * Original Table Header: + * Signature "DSDT" + * Length 0x0000BAFE (47870) + * Revision 0x02 + * Checksum 0x72 + * OEM ID "ALASKA" + * OEM Table ID "A M I" + * OEM Revision 0x00000015 (21) + * Compiler ID "INTL" + * Compiler Version 0x20051117 (537202967) + */ + +DefinitionBlock ("dsdt-factory-32mb-igpu.aml", "DSDT", 2, "ALASKA", "A M I", 0x00000015) +{ + External (TNOT, MethodObj) // 0 Arguments + External (PDC7) + External (PDC6) + External (PDC5) + External (PDC4) + External (PDC3) + External (PDC2) + External (PDC1) + External (PDC0) + External (CFGD) + External (HNOT, MethodObj) // 1 Arguments + External (SNXD) + External (HWID, IntObj) + External (IDAB, MethodObj) // 0 Arguments + External (HDOS, MethodObj) // 0 Arguments + External (ECST, MethodObj) // 1 Arguments + External (\_PR_.APSV) + External (\_PR_.AAC0) + External (\_PR_.ACRT) + External (\_PR_.CPU0._PPC) + External (\_SB_.PCI0.IEIT.EITV, MethodObj) // 0 Arguments + + Name (SP1O, 0x2E) + Name (IO1B, Zero) + Name (IO1L, Zero) + Name (IO2B, Zero) + Name (IO2L, Zero) + Name (IO3B, 0x0290) + Name (IO3L, 0x10) + Name (IOES, Zero) + Name (WKTP, Zero) + Name (SPIO, 0x2E) + Name (IOHW, 0x0290) + Name (IOSB, Zero) + Name (IOSL, 0x10) + Name (IOHB, 0x0290) + Name (IOHL, 0x10) + Name (SMBS, 0x0580) + Name (SMBL, 0x20) + Name (PMBS, 0x0400) + Name (PMLN, 0x80) + Name (GPBS, 0x0500) + Name (GPLN, 0x80) + Name (SMIP, 0xB2) + Name (APCB, 0xFEC00000) + Name (APCL, 0x1000) + Name (SMCR, 0x0430) + Name (HPTB, 0xFED00000) + Name (HPTC, 0xFED1F404) + Name (FLSZ, 0x00800000) + Name (SRCB, 0xFED1C000) + Name (RCLN, 0x4000) + Name (TCBR, 0xFED08000) + Name (TCLT, 0x1000) + Name (PEBS, 0xF8000000) + Name (PELN, 0x04000000) + Name (LAPB, 0xFEE00000) + Name (EGPB, 0xFED19000) + Name (MCHB, 0xFED10000) + Name (VTBS, 0xFED90000) + Name (VTLN, 0x4000) + Name (ACPH, 0xDE) + Name (ASSB, Zero) + Name (AOTB, Zero) + Name (AAXB, Zero) + Name (PEHP, One) + Name (SHPC, Zero) + Name (PEPM, One) + Name (PEER, One) + Name (PECS, One) + Name (ITKE, Zero) + Name (MBEC, 0xFFFF) + Name (AMWV, 0x09) + Name (FMBL, One) + Name (FDTP, 0x02) + Name (FUPS, 0x03) + Name (FUWS, 0x04) + Name (BSH, Zero) + Name (BEL, One) + Name (BEH, 0x02) + Name (BRH, 0x03) + Name (BTF, 0x04) + Name (BHC, 0x05) + Name (BYB, 0x06) + Name (BPH, 0x07) + Name (BSHS, 0x08) + Name (BELC, 0x09) + Name (BRHP, 0x0A) + Name (BTFC, 0x0B) + Name (BEHP, 0x0C) + Name (BPHS, 0x0D) + Name (BELP, 0x0E) + Name (BTL, 0x10) + Name (BTFP, 0x11) + Name (BSR, 0x14) + Name (BOF, 0x20) + Name (BEF, 0x21) + Name (BLLE, 0x22) + Name (BLLC, 0x23) + Name (BLCA, 0x24) + Name (BLLS, 0x25) + Name (BLLP, 0x26) + Name (BLLD, 0x27) + Name (BHBE, 0x30) + Name (BHBC, 0x31) + Name (BHBN, 0x32) + Name (BHBM, 0x33) + Name (TRTP, One) + Name (WDTE, One) + Name (TRTD, 0x02) + Name (TRTI, 0x03) + Name (GCDD, One) + Name (DSTA, 0x0A) + Name (DSLO, 0x0C) + Name (DSLC, 0x0E) + Name (PITS, 0x10) + Name (SBCS, 0x12) + Name (SALS, 0x13) + Name (LSSS, 0x2A) + Name (SOOT, 0x35) + Name (PDBR, 0x4D) + Name (SS1, One) + Name (SS2, Zero) + Name (SS3, One) + Name (SS4, One) + Name (IOST, 0x0000) + Name (TOPM, 0x00000000) + Name (ROMS, 0xFFE00000) + Name (VGAF, One) + OperationRegion (GNVS, SystemMemory, 0xDCBB2E18, 0x01CB) + Field (GNVS, AnyAcc, Lock, Preserve) + { + OSYS, 16, + SMIF, 8, + PRM0, 8, + PRM1, 8, + SCIF, 8, + PRM2, 8, + PRM3, 8, + LCKF, 8, + PRM4, 8, + PRM5, 8, + P80D, 32, + LIDS, 8, + PWRS, 8, + DBGS, 8, + THOF, 8, + ACT1, 8, + ACTT, 8, + PSVT, 8, + TC1V, 8, + TC2V, 8, + TSPV, 8, + CRTT, 8, + DTSE, 8, + DTS1, 8, + DTS2, 8, + DTSF, 8, + Offset (0x25), + REVN, 8, + RES3, 8, + Offset (0x28), + APIC, 8, + TCNT, 8, + PCP0, 8, + PCP1, 8, + PPCM, 8, + PPMF, 32, + C67L, 8, + NATP, 8, + CMAP, 8, + CMBP, 8, + LPTP, 8, + FDCP, 8, + CMCP, 8, + CIRP, 8, + SMSC, 8, + W381, 8, + SMC1, 8, + IGDS, 8, + TLST, 8, + CADL, 8, + PADL, 8, + CSTE, 16, + NSTE, 16, + SSTE, 16, + NDID, 8, + DID1, 32, + DID2, 32, + DID3, 32, + DID4, 32, + DID5, 32, + KSV0, 32, + KSV1, 8, + Offset (0x67), + BLCS, 8, + BRTL, 8, + ALSE, 8, + ALAF, 8, + LLOW, 8, + LHIH, 8, + Offset (0x6E), + EMAE, 8, + EMAP, 16, + EMAL, 16, + Offset (0x74), + MEFE, 8, + DSTS, 8, + Offset (0x78), + TPMP, 8, + TPME, 8, + MORD, 8, + TCGP, 8, + PPRP, 32, + PPRQ, 8, + LPPR, 8, + GTF0, 56, + GTF2, 56, + IDEM, 8, + GTF1, 56, + BID, 8, + PLID, 8, + Offset (0xAA), + ASLB, 32, + IBTT, 8, + IPAT, 8, + ITVF, 8, + ITVM, 8, + IPSC, 8, + IBLC, 8, + IBIA, 8, + ISSC, 8, + I409, 8, + I509, 8, + I609, 8, + I709, 8, + IPCF, 8, + IDMS, 8, + IF1E, 8, + HVCO, 8, + NXD1, 32, + NXD2, 32, + NXD3, 32, + NXD4, 32, + NXD5, 32, + NXD6, 32, + NXD7, 32, + NXD8, 32, + GSMI, 8, + PAVP, 8, + Offset (0xE1), + OSCC, 8, + NEXP, 8, + SBV1, 8, + SBV2, 8, + Offset (0xEB), + DSEN, 8, + ECON, 8, + GPIC, 8, + CTYP, 8, + L01C, 8, + VFN0, 8, + VFN1, 8, + VFN2, 8, + VFN3, 8, + VFN4, 8, + Offset (0x100), + NVGA, 32, + NVHA, 32, + AMDA, 32, + DID6, 32, + DID7, 32, + DID8, 32, + EBAS, 32, + CPSP, 32, + EECP, 32, + EVCP, 32, + XBAS, 32, + OBS1, 32, + OBS2, 32, + OBS3, 32, + OBS4, 32, + OBS5, 32, + OBS6, 32, + OBS7, 32, + OBS8, 32, + Offset (0x157), + ATMC, 8, + PTMC, 8, + ATRA, 8, + PTRA, 8, + PNHM, 32, + TBAB, 32, + TBAH, 32, + RTIP, 8, + TSOD, 8, + ATPC, 8, + PTPC, 8, + PFLV, 8, + BREV, 8, + SGMD, 8, + SGFL, 8, + PWOK, 8, + HLRS, 8, + DSEL, 8, + ESEL, 8, + PSEL, 8, + PWEN, 8, + PRST, 8, + MXD1, 32, + MXD2, 32, + MXD3, 32, + MXD4, 32, + MXD5, 32, + MXD6, 32, + MXD7, 32, + MXD8, 32, + GBAS, 16, + SGGP, 8, + PXFX, 8, + PXDY, 8, + PXFD, 8, + Offset (0x19D), + ALFP, 8, + IMON, 8, + PDTS, 8, + PKGA, 8, + PAMT, 8, + AC0F, 8, + AC1F, 8, + DTS3, 8, + DTS4, 8, + Offset (0x1B2), + XHCI, 8, + XHPM, 8, + Offset (0x1B7), + XTUB, 32, + XTUS, 32, + XMPB, 32, + Offset (0x1C4), + LPMV, 8, + AOAC, 8, + SLDR, 32, + E4GM, 8 + } + + Scope (_SB) + { + Name (PR00, Package (0x24) + { + Package (0x04) + { + 0x001FFFFF, + Zero, + LNKF, + Zero + }, + + Package (0x04) + { + 0x001FFFFF, + One, + LNKD, + Zero + }, + + Package (0x04) + { + 0x001FFFFF, + 0x02, + LNKC, + Zero + }, + + Package (0x04) + { + 0x001FFFFF, + 0x03, + LNKA, + Zero + }, + + Package (0x04) + { + 0x0014FFFF, + Zero, + LNKA, + Zero + }, + + Package (0x04) + { + 0x001DFFFF, + One, + LNKD, + Zero + }, + + Package (0x04) + { + 0x001DFFFF, + 0x02, + LNKA, + Zero + }, + + Package (0x04) + { + 0x001DFFFF, + 0x03, + LNKC, + Zero + }, + + Package (0x04) + { + 0x001DFFFF, + Zero, + LNKH, + Zero + }, + + Package (0x04) + { + 0x001AFFFF, + Zero, + LNKA, + Zero + }, + + Package (0x04) + { + 0x001AFFFF, + One, + LNKF, + Zero + }, + + Package (0x04) + { + 0x001AFFFF, + 0x02, + LNKC, + Zero + }, + + Package (0x04) + { + 0x001AFFFF, + 0x03, + LNKD, + Zero + }, + + Package (0x04) + { + 0x001BFFFF, + Zero, + LNKG, + Zero + }, + + Package (0x04) + { + 0x0016FFFF, + Zero, + LNKA, + Zero + }, + + Package (0x04) + { + 0x0016FFFF, + One, + LNKD, + Zero + }, + + Package (0x04) + { + 0x0016FFFF, + 0x02, + LNKC, + Zero + }, + + Package (0x04) + { + 0x0016FFFF, + 0x03, + LNKB, + Zero + }, + + Package (0x04) + { + 0x001CFFFF, + Zero, + LNKA, + Zero + }, + + Package (0x04) + { + 0x001CFFFF, + One, + LNKB, + Zero + }, + + Package (0x04) + { + 0x001CFFFF, + 0x02, + LNKC, + Zero + }, + + Package (0x04) + { + 0x001CFFFF, + 0x03, + LNKD, + Zero + }, + + Package (0x04) + { + 0x0001FFFF, + Zero, + LNKA, + Zero + }, + + Package (0x04) + { + 0x0001FFFF, + One, + LNKB, + Zero + }, + + Package (0x04) + { + 0x0001FFFF, + 0x02, + LNKC, + Zero + }, + + Package (0x04) + { + 0x0001FFFF, + 0x03, + LNKD, + Zero + }, + + Package (0x04) + { + 0x0006FFFF, + Zero, + LNKD, + Zero + }, + + Package (0x04) + { + 0x0006FFFF, + One, + LNKA, + Zero + }, + + Package (0x04) + { + 0x0006FFFF, + 0x02, + LNKB, + Zero + }, + + Package (0x04) + { + 0x0006FFFF, + 0x03, + LNKC, + Zero + }, + + Package (0x04) + { + 0x0004FFFF, + Zero, + LNKA, + Zero + }, + + Package (0x04) + { + 0x0004FFFF, + One, + LNKB, + Zero + }, + + Package (0x04) + { + 0x0004FFFF, + 0x02, + LNKC, + Zero + }, + + Package (0x04) + { + 0x0004FFFF, + 0x03, + LNKD, + Zero + }, + + Package (0x04) + { + 0x0002FFFF, + Zero, + LNKA, + Zero + }, + + Package (0x04) + { + 0x0019FFFF, + Zero, + LNKE, + Zero + } + }) + Name (AR00, Package (0x24) + { + Package (0x04) + { + 0x001FFFFF, + Zero, + Zero, + 0x15 + }, + + Package (0x04) + { + 0x001FFFFF, + One, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x001FFFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x001FFFFF, + 0x03, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x0014FFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x001DFFFF, + One, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x001DFFFF, + 0x02, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x001DFFFF, + 0x03, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x001DFFFF, + Zero, + Zero, + 0x17 + }, + + Package (0x04) + { + 0x001AFFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x001AFFFF, + One, + Zero, + 0x15 + }, + + Package (0x04) + { + 0x001AFFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x001AFFFF, + 0x03, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x001BFFFF, + Zero, + Zero, + 0x16 + }, + + Package (0x04) + { + 0x0016FFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x0016FFFF, + One, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x0016FFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x0016FFFF, + 0x03, + Zero, + 0x11 + }, + + Package (0x04) + { + 0x001CFFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x001CFFFF, + One, + Zero, + 0x11 + }, + + Package (0x04) + { + 0x001CFFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x001CFFFF, + 0x03, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x0001FFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x0001FFFF, + One, + Zero, + 0x11 + }, + + Package (0x04) + { + 0x0001FFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x0001FFFF, + 0x03, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x0006FFFF, + Zero, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x0006FFFF, + One, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x0006FFFF, + 0x02, + Zero, + 0x11 + }, + + Package (0x04) + { + 0x0006FFFF, + 0x03, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x0004FFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x0004FFFF, + One, + Zero, + 0x11 + }, + + Package (0x04) + { + 0x0004FFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x0004FFFF, + 0x03, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x0002FFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x0019FFFF, + Zero, + Zero, + 0x14 + } + }) + Name (PR04, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + LNKA, + Zero + }, + + Package (0x04) + { + 0xFFFF, + One, + LNKB, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + LNKC, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + LNKD, + Zero + } + }) + Name (AR04, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x11 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x13 + } + }) + Name (PR05, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + LNKB, + Zero + }, + + Package (0x04) + { + 0xFFFF, + One, + LNKC, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + LNKD, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + LNKA, + Zero + } + }) + Name (AR05, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x11 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x12 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x13 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x10 + } + }) + Name (PR06, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + LNKC, + Zero + }, + + Package (0x04) + { + 0xFFFF, + One, + LNKD, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + LNKA, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + LNKB, + Zero + } + }) + Name (AR06, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x12 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x13 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x10 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x11 + } + }) + Name (PR07, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + LNKD, + Zero + }, + + Package (0x04) + { + 0xFFFF, + One, + LNKA, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + LNKB, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + LNKC, + Zero + } + }) + Name (AR07, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x13 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x10 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x11 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x12 + } + }) + Name (PR08, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + LNKA, + Zero + }, + + Package (0x04) + { + 0xFFFF, + One, + LNKB, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + LNKC, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + LNKD, + Zero + } + }) + Name (AR08, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x11 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x13 + } + }) + Name (PR09, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + LNKB, + Zero + }, + + Package (0x04) + { + 0xFFFF, + One, + LNKC, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + LNKD, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + LNKA, + Zero + } + }) + Name (AR09, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x11 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x12 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x13 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x10 + } + }) + Name (PR0E, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + LNKC, + Zero + }, + + Package (0x04) + { + 0xFFFF, + One, + LNKD, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + LNKA, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + LNKB, + Zero + } + }) + Name (AR0E, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x12 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x13 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x10 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x11 + } + }) + Name (PR0F, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + LNKD, + Zero + }, + + Package (0x04) + { + 0xFFFF, + One, + LNKA, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + LNKB, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + LNKC, + Zero + } + }) + Name (AR0F, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x13 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x10 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x11 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x12 + } + }) + Name (PR01, Package (0x08) + { + Package (0x04) + { + 0x0002FFFF, + Zero, + LNKC, + Zero + }, + + Package (0x04) + { + 0x0002FFFF, + One, + LNKD, + Zero + }, + + Package (0x04) + { + 0x0002FFFF, + 0x02, + LNKB, + Zero + }, + + Package (0x04) + { + 0x0002FFFF, + 0x03, + LNKA, + Zero + }, + + Package (0x04) + { + 0x0003FFFF, + Zero, + LNKD, + Zero + }, + + Package (0x04) + { + 0x0003FFFF, + One, + LNKC, + Zero + }, + + Package (0x04) + { + 0x0003FFFF, + 0x02, + LNKF, + Zero + }, + + Package (0x04) + { + 0x0003FFFF, + 0x03, + LNKG, + Zero + } + }) + Name (AR01, Package (0x08) + { + Package (0x04) + { + 0x0002FFFF, + Zero, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x0002FFFF, + One, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x0002FFFF, + 0x02, + Zero, + 0x11 + }, + + Package (0x04) + { + 0x0002FFFF, + 0x03, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x0003FFFF, + Zero, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x0003FFFF, + One, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x0003FFFF, + 0x02, + Zero, + 0x15 + }, + + Package (0x04) + { + 0x0003FFFF, + 0x03, + Zero, + 0x16 + } + }) + Name (PR02, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + LNKA, + Zero + }, + + Package (0x04) + { + 0xFFFF, + One, + LNKB, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + LNKC, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + LNKD, + Zero + } + }) + Name (AR02, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x11 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x13 + } + }) + Name (PR0A, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + LNKB, + Zero + }, + + Package (0x04) + { + 0xFFFF, + One, + LNKC, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + LNKD, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + LNKA, + Zero + } + }) + Name (AR0A, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x11 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x12 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x13 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x10 + } + }) + Name (PR0B, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + LNKC, + Zero + }, + + Package (0x04) + { + 0xFFFF, + One, + LNKD, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + LNKA, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + LNKB, + Zero + } + }) + Name (AR0B, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x12 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x13 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x10 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x11 + } + }) + Name (PR0C, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + LNKD, + Zero + }, + + Package (0x04) + { + 0xFFFF, + One, + LNKA, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + LNKB, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + LNKC, + Zero + } + }) + Name (AR0C, Package (0x04) + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x13 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x10 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x11 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x12 + } + }) + Name (PR31, Package (0x0C) + { + Package (0x04) + { + 0xFFFF, + Zero, + LNKC, + Zero + }, + + Package (0x04) + { + 0xFFFF, + One, + LNKD, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + LNKA, + Zero + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + LNKB, + Zero + }, + + Package (0x04) + { + 0x0001FFFF, + Zero, + LNKD, + Zero + }, + + Package (0x04) + { + 0x0001FFFF, + One, + LNKA, + Zero + }, + + Package (0x04) + { + 0x0001FFFF, + 0x02, + LNKB, + Zero + }, + + Package (0x04) + { + 0x0001FFFF, + 0x03, + LNKC, + Zero + }, + + Package (0x04) + { + 0x0002FFFF, + Zero, + LNKB, + Zero + }, + + Package (0x04) + { + 0x0002FFFF, + One, + LNKC, + Zero + }, + + Package (0x04) + { + 0x0002FFFF, + 0x02, + LNKD, + Zero + }, + + Package (0x04) + { + 0x0002FFFF, + 0x03, + LNKA, + Zero + } + }) + Name (AR31, Package (0x0C) + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x12 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x13 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x10 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x11 + }, + + Package (0x04) + { + 0x0001FFFF, + Zero, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x0001FFFF, + One, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x0001FFFF, + 0x02, + Zero, + 0x11 + }, + + Package (0x04) + { + 0x0001FFFF, + 0x03, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x0002FFFF, + Zero, + Zero, + 0x11 + }, + + Package (0x04) + { + 0x0002FFFF, + One, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x0002FFFF, + 0x02, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x0002FFFF, + 0x03, + Zero, + 0x10 + } + }) + Name (PRSA, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, ) + {3,4,5,6,10,11,12,14,15} + }) + Alias (PRSA, PRSB) + Alias (PRSA, PRSC) + Alias (PRSA, PRSD) + Alias (PRSA, PRSE) + Alias (PRSA, PRSF) + Alias (PRSA, PRSG) + Alias (PRSA, PRSH) + Device (PCI0) + { + Name (_HID, EisaId ("PNP0A08")) + Name (_CID, EisaId ("PNP0A03")) + Name (_ADR, Zero) + Method (^BN00, 0, NotSerialized) + { + Return (Zero) + } + + Method (_BBN, 0, NotSerialized) + { + Return (BN00 ()) + } + + Name (_UID, Zero) + Method (_PRT, 0, NotSerialized) + { + If (PICM) + { + Return (AR00 ()) + } + + Return (PR00 ()) + } + + OperationRegion (HBUS, PCI_Config, Zero, 0x0100) + Field (HBUS, DWordAcc, NoLock, Preserve) + { + Offset (0x40), + EPEN, 1, + , 11, + EPBR, 20, + Offset (0x48), + MHEN, 1, + , 14, + MHBR, 17, + Offset (0x50), + GCLK, 1, + Offset (0x54), + D0EN, 1, + Offset (0x60), + PXEN, 1, + PXSZ, 2, + , 23, + PXBR, 6, + Offset (0x68), + DIEN, 1, + , 11, + DIBR, 20, + Offset (0x70), + , 20, + MEBR, 12, + Offset (0x80), + , 4, + PM0H, 2, + Offset (0x81), + PM1L, 2, + , 2, + PM1H, 2, + Offset (0x82), + PM2L, 2, + , 2, + PM2H, 2, + Offset (0x83), + PM3L, 2, + , 2, + PM3H, 2, + Offset (0x84), + PM4L, 2, + , 2, + PM4H, 2, + Offset (0x85), + PM5L, 2, + , 2, + PM5H, 2, + Offset (0x86), + PM6L, 2, + , 2, + PM6H, 2, + Offset (0x87), + Offset (0xA8), + , 20, + TUUD, 19, + Offset (0xBC), + , 20, + TLUD, 12, + Offset (0xC8), + , 7, + HTSE, 1 + } + + OperationRegion (MCHT, SystemMemory, 0xFED10000, 0x1100) + Field (MCHT, ByteAcc, NoLock, Preserve) + { + } + + Name (BUF0, ResourceTemplate () + { + WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, + 0x0000, // Granularity + 0x0000, // Range Minimum + 0x00FF, // Range Maximum + 0x0000, // Translation Offset + 0x0100, // Length + ,, ) + DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, + 0x00000000, // Granularity + 0x00000000, // Range Minimum + 0x00000CF7, // Range Maximum + 0x00000000, // Translation Offset + 0x00000CF8, // Length + ,, , TypeStatic) + IO (Decode16, + 0x0CF8, // Range Minimum + 0x0CF8, // Range Maximum + 0x01, // Alignment + 0x08, // Length + ) + DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, + 0x00000000, // Granularity + 0x00000D00, // Range Minimum + 0x0000FFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x0000F300, // Length + ,, , TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000A0000, // Range Minimum + 0x000BFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00020000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000C0000, // Range Minimum + 0x000C3FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000C4000, // Range Minimum + 0x000C7FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000C8000, // Range Minimum + 0x000CBFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000CC000, // Range Minimum + 0x000CFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000D0000, // Range Minimum + 0x000D3FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000D4000, // Range Minimum + 0x000D7FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000D8000, // Range Minimum + 0x000DBFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000DC000, // Range Minimum + 0x000DFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000E0000, // Range Minimum + 0x000E3FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000E4000, // Range Minimum + 0x000E7FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000E8000, // Range Minimum + 0x000EBFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000EC000, // Range Minimum + 0x000EFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000F0000, // Range Minimum + 0x000FFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00010000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x00000000, // Range Minimum + 0xFEAFFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0xFEB00000, // Length + ,, , AddressRangeMemory, TypeStatic) + QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x0000000000000000, // Granularity + 0x0000000000010000, // Range Minimum + 0x000000000001FFFF, // Range Maximum + 0x0000000000000000, // Translation Offset + 0x0000000000010000, // Length + ,, , AddressRangeMemory, TypeStatic) + }) + Method (_CRS, 0, Serialized) + { + CreateWordField (BUF0, 0x0A, PBMX) + Store (Subtract (ShiftRight (PELN, 0x14), 0x02), PBMX) + CreateWordField (BUF0, 0x0E, PBLN) + Store (Subtract (ShiftRight (PELN, 0x14), One), PBLN) + If (PM1L) + { + CreateDWordField (BUF0, 0x7C, C0LN) + Store (Zero, C0LN) + } + + If (LEqual (PM1L, One)) + { + CreateBitField (BUF0, 0x0358, C0RW) + Store (Zero, C0RW) + } + + If (PM1H) + { + CreateDWordField (BUF0, 0x96, C4LN) + Store (Zero, C4LN) + } + + If (LEqual (PM1H, One)) + { + CreateBitField (BUF0, 0x0428, C4RW) + Store (Zero, C4RW) + } + + If (PM2L) + { + CreateDWordField (BUF0, 0xB0, C8LN) + Store (Zero, C8LN) + } + + If (LEqual (PM2L, One)) + { + CreateBitField (BUF0, 0x04F8, C8RW) + Store (Zero, C8RW) + } + + If (PM2H) + { + CreateDWordField (BUF0, 0xCA, CCLN) + Store (Zero, CCLN) + } + + If (LEqual (PM2H, One)) + { + CreateBitField (BUF0, 0x05C8, CCRW) + Store (Zero, CCRW) + } + + If (PM3L) + { + CreateDWordField (BUF0, 0xE4, D0LN) + Store (Zero, D0LN) + } + + If (LEqual (PM3L, One)) + { + CreateBitField (BUF0, 0x0698, D0RW) + Store (Zero, D0RW) + } + + If (PM3H) + { + CreateDWordField (BUF0, 0xFE, D4LN) + Store (Zero, D4LN) + } + + If (LEqual (PM3H, One)) + { + CreateBitField (BUF0, 0x0768, D4RW) + Store (Zero, D4RW) + } + + If (PM4L) + { + CreateDWordField (BUF0, 0x0118, D8LN) + Store (Zero, D8LN) + } + + If (LEqual (PM4L, One)) + { + CreateBitField (BUF0, 0x0838, D8RW) + Store (Zero, D8RW) + } + + If (PM4H) + { + CreateDWordField (BUF0, 0x0132, DCLN) + Store (Zero, DCLN) + } + + If (LEqual (PM4H, One)) + { + CreateBitField (BUF0, 0x0908, DCRW) + Store (Zero, DCRW) + } + + If (PM5L) + { + CreateDWordField (BUF0, 0x014C, E0LN) + Store (Zero, E0LN) + } + + If (LEqual (PM5L, One)) + { + CreateBitField (BUF0, 0x09D8, E0RW) + Store (Zero, E0RW) + } + + If (PM5H) + { + CreateDWordField (BUF0, 0x0166, E4LN) + Store (Zero, E4LN) + } + + If (LEqual (PM5H, One)) + { + CreateBitField (BUF0, 0x0AA8, E4RW) + Store (Zero, E4RW) + } + + If (PM6L) + { + CreateDWordField (BUF0, 0x0180, E8LN) + Store (Zero, E8LN) + } + + If (LEqual (PM6L, One)) + { + CreateBitField (BUF0, 0x0B78, E8RW) + Store (Zero, E8RW) + } + + If (PM6H) + { + CreateDWordField (BUF0, 0x019A, ECLN) + Store (Zero, ECLN) + } + + If (LEqual (PM6H, One)) + { + CreateBitField (BUF0, 0x0C48, ECRW) + Store (Zero, ECRW) + } + + If (PM0H) + { + CreateDWordField (BUF0, 0x01B4, F0LN) + Store (Zero, F0LN) + } + + If (LEqual (PM0H, One)) + { + CreateBitField (BUF0, 0x0D18, F0RW) + Store (Zero, F0RW) + } + + CreateDWordField (BUF0, 0x01C2, M1MN) + CreateDWordField (BUF0, 0x01C6, M1MX) + CreateDWordField (BUF0, 0x01CE, M1LN) + ShiftLeft (TLUD, 0x14, M1MN) + Add (Subtract (M1MX, M1MN), One, M1LN) + If (LLessEqual (OSYS, 0x07D3)) + { + CreateDWordField (BUF0, 0x01F8, MSLN) + Store (Zero, MSLN) + } + Else + { + If (E4GM) + { + CreateQWordField (BUF0, 0x01F8, M2LN) + CreateQWordField (BUF0, 0x01E0, M2MN) + CreateQWordField (BUF0, 0x01E8, M2MX) + If (LGreaterEqual (TUUD, 0x1000)) + { + ShiftLeft (TUUD, 0x14, M2MN) + Store (Subtract (0x0000001000000000, ShiftLeft (TUUD, 0x14)), M2LN) + } + Else + { + Store (0x0000000100000000, M2MN) + Store (0x0000000F00000000, M2LN) + } + + Subtract (Add (M2MN, M2LN), One, M2MX) + } + Else + { + CreateDWordField (BUF0, 0x01F8, M4LN) + Store (Zero, M4LN) + } + } + + Return (BUF0) + } + + Name (GUID, Buffer (0x10) + { + /* 0000 */ 0x5B, 0x4D, 0xDB, 0x33, 0xF7, 0x1F, 0x1C, 0x40, + /* 0008 */ 0x96, 0x57, 0x74, 0x41, 0xC0, 0x3D, 0xD7, 0x66 + }) + Name (SUPP, Zero) + Name (CTRL, Zero) + Name (XCNT, Zero) + Method (_OSC, 4, Serialized) + { + Store (Arg3, Local0) + CreateDWordField (Local0, Zero, CDW1) + CreateDWordField (Local0, 0x04, CDW2) + CreateDWordField (Local0, 0x08, CDW3) + If (^XHC.CUID (Arg0)) + { + Return (^XHC.POSC (Arg1, Arg2, Arg3)) + } + Else + { + If (_OSI ("Windows 2012")) + { + If (LEqual (XCNT, Zero)) + { + ^XHC.XSEL () + Increment (XCNT) + } + } + } + + If (LAnd (LEqual (Arg0, GUID), NEXP)) + { + Store (CDW2, SUPP) + Store (CDW3, CTRL) + If (Not (And (CDW1, One))) + { + If (And (CTRL, One)) + { + NHPG () + } + + If (And (CTRL, 0x04)) + { + NPME () + } + } + + If (LNotEqual (Arg1, One)) + { + Or (CDW1, 0x08, CDW1) + } + + If (LNotEqual (CDW3, CTRL)) + { + Or (CDW1, 0x10, CDW1) + } + + Store (CTRL, CDW3) + Store (CTRL, OSCC) + Return (Local0) + } + Else + { + Or (CDW1, 0x04, CDW1) + Return (Local0) + } + } + + Scope (\_SB.PCI0) + { + Method (AR00, 0, NotSerialized) + { + Return (^^AR00) + } + + Method (PR00, 0, NotSerialized) + { + Return (^^PR00) + } + + Method (AR01, 0, NotSerialized) + { + Return (^^AR01) + } + + Method (PR01, 0, NotSerialized) + { + Return (^^PR01) + } + + Method (AR02, 0, NotSerialized) + { + Return (^^AR02) + } + + Method (PR02, 0, NotSerialized) + { + Return (^^PR02) + } + + Method (AR04, 0, NotSerialized) + { + Return (^^AR04) + } + + Method (PR04, 0, NotSerialized) + { + Return (^^PR04) + } + + Method (AR05, 0, NotSerialized) + { + Return (^^AR05) + } + + Method (PR05, 0, NotSerialized) + { + Return (^^PR05) + } + + Method (AR06, 0, NotSerialized) + { + Return (^^AR06) + } + + Method (PR06, 0, NotSerialized) + { + Return (^^PR06) + } + + Method (AR07, 0, NotSerialized) + { + Return (^^AR07) + } + + Method (PR07, 0, NotSerialized) + { + Return (^^PR07) + } + + Method (AR08, 0, NotSerialized) + { + Return (^^AR08) + } + + Method (PR08, 0, NotSerialized) + { + Return (^^PR08) + } + + Method (AR09, 0, NotSerialized) + { + Return (^^AR09) + } + + Method (PR09, 0, NotSerialized) + { + Return (^^PR09) + } + + Method (AR0E, 0, NotSerialized) + { + Return (^^AR0E) + } + + Method (PR0E, 0, NotSerialized) + { + Return (^^PR0E) + } + + Method (AR0F, 0, NotSerialized) + { + Return (^^AR0F) + } + + Method (PR0F, 0, NotSerialized) + { + Return (^^PR0F) + } + + Method (AR0A, 0, NotSerialized) + { + Return (^^AR0A) + } + + Method (PR0A, 0, NotSerialized) + { + Return (^^PR0A) + } + + Method (AR0B, 0, NotSerialized) + { + Return (^^AR0B) + } + + Method (PR0B, 0, NotSerialized) + { + Return (^^PR0B) + } + + Method (AR0C, 0, NotSerialized) + { + Return (^^AR0C) + } + + Method (PR0C, 0, NotSerialized) + { + Return (^^PR0C) + } + } + + Device (TPMX) + { + Name (_HID, EisaId ("PNP0C01")) + Name (_UID, One) + Name (CRS, ResourceTemplate () + { + Memory32Fixed (ReadOnly, + 0xFED40000, // Address Base + 0x00005000, // Address Length + ) + }) + Method (_CRS, 0, NotSerialized) + { + If (TPMF) + { + Return (Zero) + } + + Return (CRS) + } + } + + Device (LPCB) + { + Name (_ADR, 0x001F0000) + Scope (\_SB) + { + OperationRegion (PCI0.LPCB.LPC1, PCI_Config, 0x40, 0xC0) + Field (PCI0.LPCB.LPC1, AnyAcc, NoLock, Preserve) + { + Offset (0x20), + PARC, 8, + PBRC, 8, + PCRC, 8, + PDRC, 8, + Offset (0x28), + PERC, 8, + PFRC, 8, + PGRC, 8, + PHRC, 8, + Offset (0x6C), + Offset (0x6D), + Offset (0x6E), + XUSB, 1 + } + + Device (LNKA) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, One) + Method (_DIS, 0, Serialized) + { + Or (PARC, 0x80, PARC) + } + + Method (_PRS, 0, Serialized) + { + Return (PRSA) + } + + Method (_CRS, 0, Serialized) + { + Name (RTLA, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, ) + {} + }) + CreateWordField (RTLA, One, IRQ0) + Store (Zero, IRQ0) + ShiftLeft (One, And (PARC, 0x0F), IRQ0) + Return (RTLA) + } + + Method (_SRS, 1, Serialized) + { + CreateWordField (Arg0, One, IRQ0) + FindSetRightBit (IRQ0, Local0) + Decrement (Local0) + Store (Local0, PARC) + } + + Method (_STA, 0, Serialized) + { + If (And (PARC, 0x80)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + } + + Device (LNKB) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x02) + Method (_DIS, 0, Serialized) + { + Or (PBRC, 0x80, PBRC) + } + + Method (_PRS, 0, Serialized) + { + Return (PRSB) + } + + Method (_CRS, 0, Serialized) + { + Name (RTLB, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, ) + {} + }) + CreateWordField (RTLB, One, IRQ0) + Store (Zero, IRQ0) + ShiftLeft (One, And (PBRC, 0x0F), IRQ0) + Return (RTLB) + } + + Method (_SRS, 1, Serialized) + { + CreateWordField (Arg0, One, IRQ0) + FindSetRightBit (IRQ0, Local0) + Decrement (Local0) + Store (Local0, PBRC) + } + + Method (_STA, 0, Serialized) + { + If (And (PBRC, 0x80)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + } + + Device (LNKC) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x03) + Method (_DIS, 0, Serialized) + { + Or (PCRC, 0x80, PCRC) + } + + Method (_PRS, 0, Serialized) + { + Return (PRSC) + } + + Method (_CRS, 0, Serialized) + { + Name (RTLC, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, ) + {} + }) + CreateWordField (RTLC, One, IRQ0) + Store (Zero, IRQ0) + ShiftLeft (One, And (PCRC, 0x0F), IRQ0) + Return (RTLC) + } + + Method (_SRS, 1, Serialized) + { + CreateWordField (Arg0, One, IRQ0) + FindSetRightBit (IRQ0, Local0) + Decrement (Local0) + Store (Local0, PCRC) + } + + Method (_STA, 0, Serialized) + { + If (And (PCRC, 0x80)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + } + + Device (LNKD) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x04) + Method (_DIS, 0, Serialized) + { + Or (PDRC, 0x80, PDRC) + } + + Method (_PRS, 0, Serialized) + { + Return (PRSD) + } + + Method (_CRS, 0, Serialized) + { + Name (RTLD, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, ) + {} + }) + CreateWordField (RTLD, One, IRQ0) + Store (Zero, IRQ0) + ShiftLeft (One, And (PDRC, 0x0F), IRQ0) + Return (RTLD) + } + + Method (_SRS, 1, Serialized) + { + CreateWordField (Arg0, One, IRQ0) + FindSetRightBit (IRQ0, Local0) + Decrement (Local0) + Store (Local0, PDRC) + } + + Method (_STA, 0, Serialized) + { + If (And (PDRC, 0x80)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + } + + Device (LNKE) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x05) + Method (_DIS, 0, Serialized) + { + Or (PERC, 0x80, PERC) + } + + Method (_PRS, 0, Serialized) + { + Return (PRSE) + } + + Method (_CRS, 0, Serialized) + { + Name (RTLE, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, ) + {} + }) + CreateWordField (RTLE, One, IRQ0) + Store (Zero, IRQ0) + ShiftLeft (One, And (PERC, 0x0F), IRQ0) + Return (RTLE) + } + + Method (_SRS, 1, Serialized) + { + CreateWordField (Arg0, One, IRQ0) + FindSetRightBit (IRQ0, Local0) + Decrement (Local0) + Store (Local0, PERC) + } + + Method (_STA, 0, Serialized) + { + If (And (PERC, 0x80)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + } + + Device (LNKF) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x06) + Method (_DIS, 0, Serialized) + { + Or (PFRC, 0x80, PFRC) + } + + Method (_PRS, 0, Serialized) + { + Return (PRSF) + } + + Method (_CRS, 0, Serialized) + { + Name (RTLF, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, ) + {} + }) + CreateWordField (RTLF, One, IRQ0) + Store (Zero, IRQ0) + ShiftLeft (One, And (PFRC, 0x0F), IRQ0) + Return (RTLF) + } + + Method (_SRS, 1, Serialized) + { + CreateWordField (Arg0, One, IRQ0) + FindSetRightBit (IRQ0, Local0) + Decrement (Local0) + Store (Local0, PFRC) + } + + Method (_STA, 0, Serialized) + { + If (And (PFRC, 0x80)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + } + + Device (LNKG) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x07) + Method (_DIS, 0, Serialized) + { + Or (PGRC, 0x80, PGRC) + } + + Method (_PRS, 0, Serialized) + { + Return (PRSG) + } + + Method (_CRS, 0, Serialized) + { + Name (RTLG, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, ) + {} + }) + CreateWordField (RTLG, One, IRQ0) + Store (Zero, IRQ0) + ShiftLeft (One, And (PGRC, 0x0F), IRQ0) + Return (RTLG) + } + + Method (_SRS, 1, Serialized) + { + CreateWordField (Arg0, One, IRQ0) + FindSetRightBit (IRQ0, Local0) + Decrement (Local0) + Store (Local0, PGRC) + } + + Method (_STA, 0, Serialized) + { + If (And (PGRC, 0x80)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + } + + Device (LNKH) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x08) + Method (_DIS, 0, Serialized) + { + Or (PHRC, 0x80, PHRC) + } + + Method (_PRS, 0, Serialized) + { + Return (PRSH) + } + + Method (_CRS, 0, Serialized) + { + Name (RTLH, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, ) + {} + }) + CreateWordField (RTLH, One, IRQ0) + Store (Zero, IRQ0) + ShiftLeft (One, And (PHRC, 0x0F), IRQ0) + Return (RTLH) + } + + Method (_SRS, 1, Serialized) + { + CreateWordField (Arg0, One, IRQ0) + FindSetRightBit (IRQ0, Local0) + Decrement (Local0) + Store (Local0, PHRC) + } + + Method (_STA, 0, Serialized) + { + If (And (PHRC, 0x80)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + } + } + + OperationRegion (LPC0, PCI_Config, 0x40, 0xC0) + Field (LPC0, AnyAcc, NoLock, Preserve) + { + Offset (0x40), + IOD0, 8, + IOD1, 8, + Offset (0xB0), + RAEN, 1, + , 13, + RCBA, 18 + } + + Device (DMAC) + { + Name (_HID, EisaId ("PNP0200")) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, + 0x0000, // Range Minimum + 0x0000, // Range Maximum + 0x01, // Alignment + 0x20, // Length + ) + IO (Decode16, + 0x0081, // Range Minimum + 0x0081, // Range Maximum + 0x01, // Alignment + 0x11, // Length + ) + IO (Decode16, + 0x0093, // Range Minimum + 0x0093, // Range Maximum + 0x01, // Alignment + 0x0D, // Length + ) + IO (Decode16, + 0x00C0, // Range Minimum + 0x00C0, // Range Maximum + 0x01, // Alignment + 0x20, // Length + ) + DMA (Compatibility, NotBusMaster, Transfer8_16, ) + {4} + }) + } + + Device (FWHD) + { + Name (_HID, EisaId ("INT0800")) + Name (_CRS, ResourceTemplate () + { + Memory32Fixed (ReadOnly, + 0xFF000000, // Address Base + 0x01000000, // Address Length + ) + }) + } + + Device (HPET) + { + Name (_HID, EisaId ("PNP0103")) + Name (_UID, Zero) + Name (BUF0, ResourceTemplate () + { + Memory32Fixed (ReadWrite, + 0xFED00000, // Address Base + 0x00000400, // Address Length + ) + }) + Method (_STA, 0, NotSerialized) + { + If (LGreaterEqual (OSYS, 0x07D1)) + { + If (HPAE) + { + Return (0x0F) + } + } + Else + { + If (HPAE) + { + Return (0x0B) + } + } + + Return (Zero) + } + + Method (_CRS, 0, Serialized) + { + If (HPAE) + { + CreateDWordField (BUF0, 0x04, HPT0) + If (LEqual (HPAS, One)) + { + Store (0xFED01000, HPT0) + } + + If (LEqual (HPAS, 0x02)) + { + Store (0xFED02000, HPT0) + } + + If (LEqual (HPAS, 0x03)) + { + Store (0xFED03000, HPT0) + } + } + + Return (BUF0) + } + } + + Device (IPIC) + { + Name (_HID, EisaId ("PNP0000")) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, + 0x0020, // Range Minimum + 0x0020, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0024, // Range Minimum + 0x0024, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0028, // Range Minimum + 0x0028, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x002C, // Range Minimum + 0x002C, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0030, // Range Minimum + 0x0030, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0034, // Range Minimum + 0x0034, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0038, // Range Minimum + 0x0038, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x003C, // Range Minimum + 0x003C, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00A0, // Range Minimum + 0x00A0, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00A4, // Range Minimum + 0x00A4, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00A8, // Range Minimum + 0x00A8, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00AC, // Range Minimum + 0x00AC, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00B0, // Range Minimum + 0x00B0, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00B4, // Range Minimum + 0x00B4, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00B8, // Range Minimum + 0x00B8, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00BC, // Range Minimum + 0x00BC, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x04D0, // Range Minimum + 0x04D0, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IRQNoFlags () + {2} + }) + } + + Device (LDRC) + { + Name (_HID, EisaId ("PNP0C02")) + Name (_UID, 0x02) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, + 0x002E, // Range Minimum + 0x002E, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x004E, // Range Minimum + 0x004E, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0061, // Range Minimum + 0x0061, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0063, // Range Minimum + 0x0063, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0065, // Range Minimum + 0x0065, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0067, // Range Minimum + 0x0067, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0070, // Range Minimum + 0x0070, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0080, // Range Minimum + 0x0080, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0092, // Range Minimum + 0x0092, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x00B2, // Range Minimum + 0x00B2, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0680, // Range Minimum + 0x0680, // Range Maximum + 0x01, // Alignment + 0x20, // Length + ) + IO (Decode16, + 0x0200, // Range Minimum + 0x0200, // Range Maximum + 0x01, // Alignment + 0x10, // Length + ) + IO (Decode16, + 0xFFFF, // Range Minimum + 0xFFFF, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0xFFFF, // Range Minimum + 0xFFFF, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0400, // Range Minimum + 0x0400, // Range Maximum + 0x01, // Alignment + 0x54, // Length + ) + IO (Decode16, + 0x0458, // Range Minimum + 0x0458, // Range Maximum + 0x01, // Alignment + 0x28, // Length + ) + IO (Decode16, + 0x0500, // Range Minimum + 0x0500, // Range Maximum + 0x01, // Alignment + 0x80, // Length + ) + IO (Decode16, + 0x164E, // Range Minimum + 0x164E, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + }) + } + + Device (RTC) + { + Name (_HID, EisaId ("PNP0B00")) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, + 0x0070, // Range Minimum + 0x0070, // Range Maximum + 0x01, // Alignment + 0x08, // Length + ) + IRQNoFlags () + {8} + }) + } + + Device (TIMR) + { + Name (_HID, EisaId ("PNP0100")) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, + 0x0040, // Range Minimum + 0x0040, // Range Maximum + 0x01, // Alignment + 0x04, // Length + ) + IO (Decode16, + 0x0050, // Range Minimum + 0x0050, // Range Maximum + 0x10, // Alignment + 0x04, // Length + ) + IRQNoFlags () + {0} + }) + } + + Device (CWDT) + { + Name (_HID, EisaId ("INT3F0D")) + Name (_CID, EisaId ("PNP0C02")) + Name (BUF0, ResourceTemplate () + { + IO (Decode16, + 0x0454, // Range Minimum + 0x0454, // Range Maximum + 0x04, // Alignment + 0x04, // Length + ) + }) + Method (_STA, 0, Serialized) + { + If (LEqual (WDTE, One)) + { + Return (0x0F) + } + Else + { + Return (Zero) + } + } + + Method (_CRS, 0, Serialized) + { + Return (BUF0) + } + } + + Device (EC0) + { + Name (_HID, EisaId ("PNP0C09")) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, + 0x0062, // Range Minimum + 0x0062, // Range Maximum + 0x00, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0066, // Range Minimum + 0x0066, // Range Maximum + 0x00, // Alignment + 0x01, // Length + ) + }) + CreateWordField (_CRS, 0x02, DPRT) + CreateWordField (_CRS, 0x0A, CPRT) + Name (_GPE, 0x18) + Name (REGC, Zero) + Method (_Q80, 0, NotSerialized) + { + \AMW0.AMWN (0x05) + } + + Method (_Q81, 0, NotSerialized) + { + \AMW0.AMWN (0x00010005) + } + + Method (_Q82, 0, NotSerialized) + { + \AMW0.AMWN (0x00020005) + } + + Method (_Q83, 0, NotSerialized) + { + \AMW0.AMWN (0x00030005) + } + } + + Device (SIO1) + { + Name (_HID, EisaId ("PNP0C02")) + Name (_UID, 0x0111) + Name (CRS, ResourceTemplate () + { + IO (Decode16, + 0x0000, // Range Minimum + 0x0000, // Range Maximum + 0x00, // Alignment + 0x00, // Length + ) + IO (Decode16, + 0x0000, // Range Minimum + 0x0000, // Range Maximum + 0x00, // Alignment + 0x00, // Length + ) + IO (Decode16, + 0x0000, // Range Minimum + 0x0000, // Range Maximum + 0x00, // Alignment + 0x00, // Length + ) + IO (Decode16, + 0x0000, // Range Minimum + 0x0000, // Range Maximum + 0x00, // Alignment + 0x00, // Length + ) + }) + Method (_CRS, 0, NotSerialized) + { + If (LAnd (LLess (SP1O, 0x03F0), LGreater (SP1O, 0xF0))) + { + CreateWordField (CRS, 0x02, GPI0) + CreateWordField (CRS, 0x04, GPI1) + CreateByteField (CRS, 0x07, GPIL) + Store (SP1O, GPI0) + Store (SP1O, GPI1) + Store (0x02, GPIL) + } + + If (IO1B) + { + CreateWordField (CRS, 0x0A, GP10) + CreateWordField (CRS, 0x0C, GP11) + CreateByteField (CRS, 0x0F, GPL1) + Store (IO1B, GP10) + Store (IO1B, GP11) + Store (IO1L, GPL1) + } + + If (IO3B) + { + CreateWordField (CRS, 0x12, GP20) + CreateWordField (CRS, 0x14, GP21) + CreateByteField (CRS, 0x17, GPL2) + Store (IO3B, GP20) + Store (IO3B, GP21) + Store (IO3L, GPL2) + } + + If (IO2B) + { + CreateWordField (CRS, 0x1A, GP30) + CreateWordField (CRS, 0x1C, GP31) + CreateByteField (CRS, 0x1F, GPL3) + Store (IO2B, GP30) + Store (IO2B, GP31) + Store (IO2L, GPL3) + } + + Return (CRS) + } + + Name (DCAT, Package (0x15) + { + 0x02, + 0x03, + One, + Zero, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0x05, + 0xFF, + 0xFF, + 0xFF, + 0x05, + 0xFF, + 0xFF, + 0xFF, + 0x06, + 0xFF, + 0xFF + }) + Mutex (MUT0, 0x00) + Method (ENFG, 1, NotSerialized) + { + Acquire (MUT0, 0x0FFF) + Store (0x87, INDX) + Store (0x87, INDX) + Store (Arg0, LDN) + } + + Method (EXFG, 0, NotSerialized) + { + Store (0xAA, INDX) + Release (MUT0) + } + + Method (LPTM, 1, NotSerialized) + { + ENFG (CGLD (Arg0)) + And (OPT0, 0x02, Local0) + EXFG () + Return (Local0) + } + + Method (UHID, 1, NotSerialized) + { + ENFG (CGLD (Arg0)) + And (OPT0, 0x38, Local0) + EXFG () + If (Local0) + { + Return (0x1005D041) + } + Else + { + Return (0x0105D041) + } + } + + OperationRegion (IOID, SystemIO, SP1O, 0x02) + Field (IOID, ByteAcc, NoLock, Preserve) + { + INDX, 8, + DATA, 8 + } + + IndexField (INDX, DATA, ByteAcc, NoLock, Preserve) + { + Offset (0x07), + LDN, 8, + Offset (0x21), + SCF1, 8, + SCF2, 8, + SCF3, 8, + SCF4, 8, + SCF5, 8, + SCF6, 8, + Offset (0x29), + CKCF, 8, + Offset (0x30), + ACTR, 8, + Offset (0x60), + IOAH, 8, + IOAL, 8, + IOH2, 8, + IOL2, 8, + Offset (0x70), + INTR, 8, + Offset (0x74), + DMCH, 8, + Offset (0xE0), + RGE0, 8, + RGE1, 8, + RGE2, 8, + RGE3, 8, + RGE4, 8, + RGE5, 8, + RGE6, 8, + RGE7, 8, + RGE8, 8, + RGE9, 8, + Offset (0xF0), + OPT0, 8, + OPT1, 8, + OPT2, 8, + OPT3, 8, + OPT4, 8, + OPT5, 8, + OPT6, 8, + OPT7, 8, + OPT8, 8, + OPT9, 8 + } + + Method (CGLD, 1, NotSerialized) + { + Return (DerefOf (Index (DCAT, Arg0))) + } + + Method (DSTA, 1, NotSerialized) + { + ENFG (CGLD (Arg0)) + Store (ACTR, Local0) + EXFG () + If (LEqual (Local0, 0xFF)) + { + Return (Zero) + } + + And (Local0, One, Local0) + If (LGreaterEqual (Arg0, 0x10)) + { + Or (IOES, ShiftLeft (Local0, And (Arg0, 0x0F)), IOES) + } + Else + { + Or (IOST, ShiftLeft (Local0, Arg0), IOST) + } + + If (Local0) + { + Return (0x0F) + } + Else + { + If (LGreaterEqual (Arg0, 0x10)) + { + Store (IOES, Local0) + } + Else + { + Store (IOST, Local0) + } + + And (Arg0, 0x0F, Local1) + If (And (ShiftLeft (One, Local1), Local0)) + { + Return (0x0D) + } + Else + { + Return (Zero) + } + } + } + + Method (DCNT, 2, NotSerialized) + { + ENFG (CGLD (Arg0)) + If (LAnd (LLess (DMCH, 0x04), LNotEqual (And (DMCH, 0x03, + Local1), Zero))) + { + RDMA (Arg0, Arg1, Increment (Local1)) + } + + Store (Arg1, ACTR) + ShiftLeft (IOAH, 0x08, Local1) + Or (IOAL, Local1, Local1) + RRIO (Arg0, Arg1, Local1, 0x08) + EXFG () + } + + Name (CRS1, ResourceTemplate () + { + IO (Decode16, + 0x0000, // Range Minimum + 0x0000, // Range Maximum + 0x01, // Alignment + 0x00, // Length + ) + IRQNoFlags () + {} + DMA (Compatibility, NotBusMaster, Transfer8, ) + {} + }) + CreateWordField (CRS1, 0x09, IRQM) + CreateByteField (CRS1, 0x0C, DMAM) + CreateWordField (CRS1, 0x02, IO11) + CreateWordField (CRS1, 0x04, IO12) + CreateByteField (CRS1, 0x07, LEN1) + Name (CRS2, ResourceTemplate () + { + IO (Decode16, + 0x0000, // Range Minimum + 0x0000, // Range Maximum + 0x01, // Alignment + 0x00, // Length + ) + IO (Decode16, + 0x0000, // Range Minimum + 0x0000, // Range Maximum + 0x01, // Alignment + 0x00, // Length + ) + IRQNoFlags () + {} + DMA (Compatibility, NotBusMaster, Transfer8, ) + {2} + }) + CreateWordField (CRS2, 0x11, IRQE) + CreateByteField (CRS2, 0x14, DMAE) + CreateWordField (CRS2, 0x02, IO21) + CreateWordField (CRS2, 0x04, IO22) + CreateByteField (CRS2, 0x07, LEN2) + CreateWordField (CRS2, 0x0A, IO31) + CreateWordField (CRS2, 0x0C, IO32) + CreateByteField (CRS2, 0x0F, LEN3) + Name (CRS4, ResourceTemplate () + { + IO (Decode16, + 0x0000, // Range Minimum + 0x0000, // Range Maximum + 0x01, // Alignment + 0x00, // Length + ) + IRQ (Edge, ActiveLow, Shared, ) + {} + }) + CreateWordField (CRS4, 0x09, IRQL) + CreateWordField (CRS4, 0x02, IOHL) + CreateWordField (CRS4, 0x04, IORL) + CreateByteField (CRS4, 0x06, ALMN) + CreateByteField (CRS4, 0x07, LENG) + Method (DCRS, 2, NotSerialized) + { + ENFG (CGLD (Arg0)) + ShiftLeft (IOAH, 0x08, IO11) + Or (IOAL, IO11, IO11) + Store (IO11, IO12) + Store (0x08, LEN1) + If (INTR) + { + ShiftLeft (One, INTR, IRQM) + } + Else + { + Store (Zero, IRQM) + } + + If (LOr (LGreater (DMCH, 0x03), LEqual (Arg1, Zero))) + { + Store (Zero, DMAM) + } + Else + { + And (DMCH, 0x03, Local1) + ShiftLeft (One, Local1, DMAM) + } + + EXFG () + Return (CRS1) + } + + Method (DCR2, 2, NotSerialized) + { + ENFG (CGLD (Arg0)) + ShiftLeft (IOAH, 0x08, IO21) + Or (IOAL, IO21, IO21) + Store (IO21, IO22) + Store (0x08, LEN2) + ShiftLeft (IOH2, 0x08, IO31) + Or (IOL2, IO31, IO31) + Store (IO21, IO32) + Store (0x08, LEN3) + If (INTR) + { + ShiftLeft (One, INTR, IRQE) + } + Else + { + Store (Zero, IRQE) + } + + If (LOr (LGreater (DMCH, 0x03), LEqual (Arg1, Zero))) + { + Store (Zero, DMAE) + } + Else + { + And (DMCH, 0x03, Local1) + ShiftLeft (One, Local1, DMAE) + } + + EXFG () + Return (CRS2) + } + + Method (DCR4, 2, NotSerialized) + { + ENFG (CGLD (Arg0)) + ShiftLeft (IOAH, 0x08, IOHL) + Or (IOAL, IOHL, IOHL) + Store (IOHL, IORL) + Store (0x08, LENG) + If (INTR) + { + And (INTR, 0x0F, INTR) + ShiftLeft (One, INTR, IRQL) + } + Else + { + Store (Zero, IRQL) + } + + EXFG () + Return (CRS4) + } + + Method (DSRS, 2, NotSerialized) + { + If (LEqual (Arg1, 0x02)) + { + If (LPTM (CGLD (Arg1))) + { + DSR2 (Arg0, Arg1) + } + } + Else + { + CreateWordField (Arg0, 0x09, IRQM) + CreateByteField (Arg0, 0x0C, DMAM) + CreateWordField (Arg0, 0x02, IO11) + ENFG (CGLD (Arg1)) + ShiftLeft (IOAH, 0x08, Local1) + Or (IOAL, Local1, Local1) + RRIO (Arg1, Zero, Local1, 0x08) + RRIO (Arg1, One, IO11, 0x08) + And (IO11, 0xFF, IOAL) + ShiftRight (IO11, 0x08, IOAH) + If (IRQM) + { + FindSetRightBit (IRQM, Local0) + Subtract (Local0, One, INTR) + } + Else + { + Store (Zero, INTR) + } + + If (DMAM) + { + FindSetRightBit (DMAM, Local0) + Subtract (Local0, One, DMCH) + } + Else + { + Store (0x04, DMCH) + } + + EXFG () + DCNT (Arg1, One) + Store (Arg1, Local2) + If (LGreater (Local2, Zero)) + { + Subtract (Local2, One, Local2) + } + } + } + + Method (DSR2, 2, NotSerialized) + { + CreateWordField (Arg0, 0x11, IRQT) + CreateByteField (Arg0, 0x14, DMAT) + CreateWordField (Arg0, 0x02, IOT1) + CreateWordField (Arg0, 0x0A, IOT2) + ENFG (CGLD (Arg1)) + And (IOT1, 0xFF, IOAL) + ShiftRight (IOT1, 0x08, IOAH) + And (IOT2, 0xFF, IOL2) + ShiftRight (IOT2, 0x08, IOH2) + If (IRQT) + { + FindSetRightBit (IRQT, Local0) + Subtract (Local0, One, INTR) + } + Else + { + Store (Zero, INTR) + } + + If (DMAT) + { + FindSetRightBit (DMAT, Local0) + Subtract (Local0, One, DMCH) + } + Else + { + Store (0x04, DMCH) + } + + EXFG () + DCNT (Arg1, One) + Store (Arg1, Local2) + If (LGreater (Local2, Zero)) + { + Subtract (Local2, One, Local2) + } + } + + Method (DSR4, 2, NotSerialized) + { + CreateWordField (Arg0, 0x02, IOHL) + CreateWordField (Arg0, 0x09, IRQL) + ENFG (CGLD (Arg1)) + And (IOHL, 0xFF, IOAL) + ShiftRight (IOHL, 0x08, IOAH) + If (IRQL) + { + FindSetRightBit (IRQL, Local0) + Subtract (Local0, One, INTR) + } + Else + { + Store (Zero, INTR) + } + + EXFG () + DCNT (Arg1, One) + Store (Arg1, Local2) + If (LGreater (Local2, Zero)) + { + Subtract (Local2, One, Local2) + } + } + } + + Name (PMFG, Zero) + Method (SIOS, 1, NotSerialized) + { + Store ("SIOS", Debug) + If (LEqual (One, Arg0)) + { + ^SIO1.ENFG (0x0A) + And (^SIO1.RGE0, 0x9F, ^SIO1.RGE0) + If (KBFG) + { + Or (^SIO1.OPT6, 0x10, ^SIO1.OPT6) + } + Else + { + And (^SIO1.OPT6, 0xEF, ^SIO1.OPT6) + } + + If (MSFG) + { + Or (^SIO1.OPT6, 0x20, ^SIO1.OPT6) + } + Else + { + And (^SIO1.OPT6, 0xDF, ^SIO1.OPT6) + } + + Store (0xFF, ^SIO1.OPT3) + Store (0xFF, ^SIO1.OPT4) + Or (One, ^SIO1.OPT2, ^SIO1.OPT2) + ^SIO1.EXFG () + Return (Zero) + } + + If (LNotEqual (0x05, Arg0)) + { + ^SIO1.ENFG (0x0A) + Store (0xFF, ^SIO1.OPT3) + Store (0xFF, ^SIO1.OPT4) + Store (^SIO1.RGE3, Local0) + If (KBFG) + { + Or (^SIO1.RGE0, 0x41, ^SIO1.RGE0) + } + Else + { + And (^SIO1.RGE0, 0xBF, ^SIO1.RGE0) + } + + If (MSFG) + { + Or (^SIO1.RGE0, 0x22, ^SIO1.RGE0) + And (^SIO1.RGE0, 0xFD, ^SIO1.RGE0) + Or (^SIO1.RGE6, 0x80, ^SIO1.RGE6) + } + Else + { + And (^SIO1.RGE0, 0xDF, ^SIO1.RGE0) + } + + And (0xFE, ^SIO1.OPT2, ^SIO1.OPT2) + ^SIO1.EXFG () + } + } + + Method (SIOW, 1, NotSerialized) + { + Store ("SIOW", Debug) + ^SIO1.ENFG (0x0A) + Store (^SIO1.OPT3, PMFG) + Store (0xFF, ^SIO1.OPT3) + And (^SIO1.OPT0, 0xE7, ^SIO1.OPT0) + And (0xFE, ^SIO1.OPT2, ^SIO1.OPT2) + ^SIO1.EXFG () + } + + OperationRegion (RX80, PCI_Config, Zero, 0xFF) + Field (RX80, ByteAcc, NoLock, Preserve) + { + Offset (0x80), + LPCD, 16, + LPCE, 16 + } + + Name (DBPT, Package (0x04) + { + Package (0x08) + { + 0x03F8, + 0x02F8, + 0x0220, + 0x0228, + 0x0238, + 0x02E8, + 0x0338, + 0x03E8 + }, + + Package (0x08) + { + 0x03F8, + 0x02F8, + 0x0220, + 0x0228, + 0x0238, + 0x02E8, + 0x0338, + 0x03E8 + }, + + Package (0x03) + { + 0x0378, + 0x0278, + 0x03BC + }, + + Package (0x02) + { + 0x03F0, + 0x0370 + } + }) + Name (DDLT, Package (0x04) + { + Package (0x02) + { + Zero, + 0xFFF8 + }, + + Package (0x02) + { + 0x04, + 0xFF8F + }, + + Package (0x02) + { + 0x08, + 0xFCFF + }, + + Package (0x02) + { + 0x0C, + 0xEFFF + } + }) + Method (RRIO, 4, NotSerialized) + { + If (LAnd (LLessEqual (Arg0, 0x03), LGreaterEqual (Arg0, Zero))) + { + Store (Match (DerefOf (Index (DBPT, Arg0)), MEQ, Arg2, MTR, + Zero, Zero), Local0) + If (LNotEqual (Local0, Ones)) + { + Store (DerefOf (Index (DerefOf (Index (DDLT, Arg0)), Zero)), + Local1) + Store (DerefOf (Index (DerefOf (Index (DDLT, Arg0)), One)), + Local2) + ShiftLeft (Local0, Local1, Local0) + And (LPCD, Local2, LPCD) + Or (LPCD, Local0, LPCD) + WX82 (Arg0, Arg1) + } + } + + If (LEqual (Arg0, 0x08)) + { + If (LEqual (Arg2, 0x0200)) + { + WX82 (0x08, Arg0) + } + Else + { + If (LEqual (Arg2, 0x0208)) + { + WX82 (0x09, Arg0) + } + } + } + + If (LAnd (LLessEqual (Arg0, 0x0D), LGreaterEqual (Arg0, 0x0A))) + { + WX82 (Arg0, Arg1) + } + } + + Method (WX82, 2, NotSerialized) + { + ShiftLeft (One, Arg0, Local0) + If (Arg1) + { + Or (LPCE, Local0, LPCE) + } + Else + { + Not (Local0, Local0) + And (LPCE, Local0, LPCE) + } + } + + Method (RDMA, 3, NotSerialized) + { + } + + Device (RMSC) + { + Name (_HID, EisaId ("PNP0C02")) + Name (_UID, 0x10) + Name (CRS1, ResourceTemplate () + { + IO (Decode16, + 0x0010, // Range Minimum + 0x0010, // Range Maximum + 0x00, // Alignment + 0x10, // Length + ) + IO (Decode16, + 0x0022, // Range Minimum + 0x0022, // Range Maximum + 0x00, // Alignment + 0x1E, // Length + ) + IO (Decode16, + 0x0044, // Range Minimum + 0x0044, // Range Maximum + 0x00, // Alignment + 0x1C, // Length + ) + IO (Decode16, + 0x0062, // Range Minimum + 0x0062, // Range Maximum + 0x00, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0065, // Range Minimum + 0x0065, // Range Maximum + 0x00, // Alignment + 0x0B, // Length + ) + IO (Decode16, + 0x0072, // Range Minimum + 0x0072, // Range Maximum + 0x00, // Alignment + 0x0E, // Length + ) + IO (Decode16, + 0x0080, // Range Minimum + 0x0080, // Range Maximum + 0x00, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0084, // Range Minimum + 0x0084, // Range Maximum + 0x00, // Alignment + 0x03, // Length + ) + IO (Decode16, + 0x0088, // Range Minimum + 0x0088, // Range Maximum + 0x00, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x008C, // Range Minimum + 0x008C, // Range Maximum + 0x00, // Alignment + 0x03, // Length + ) + IO (Decode16, + 0x0090, // Range Minimum + 0x0090, // Range Maximum + 0x00, // Alignment + 0x10, // Length + ) + IO (Decode16, + 0x00A2, // Range Minimum + 0x00A2, // Range Maximum + 0x00, // Alignment + 0x1E, // Length + ) + IO (Decode16, + 0x00E0, // Range Minimum + 0x00E0, // Range Maximum + 0x00, // Alignment + 0x10, // Length + ) + IO (Decode16, + 0x04D0, // Range Minimum + 0x04D0, // Range Maximum + 0x00, // Alignment + 0x02, // Length + ) + }) + Name (CRS2, ResourceTemplate () + { + IO (Decode16, + 0x0010, // Range Minimum + 0x0010, // Range Maximum + 0x00, // Alignment + 0x10, // Length + ) + IO (Decode16, + 0x0022, // Range Minimum + 0x0022, // Range Maximum + 0x00, // Alignment + 0x1E, // Length + ) + IO (Decode16, + 0x0044, // Range Minimum + 0x0044, // Range Maximum + 0x00, // Alignment + 0x1C, // Length + ) + IO (Decode16, + 0x0072, // Range Minimum + 0x0072, // Range Maximum + 0x00, // Alignment + 0x0E, // Length + ) + IO (Decode16, + 0x0080, // Range Minimum + 0x0080, // Range Maximum + 0x00, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0084, // Range Minimum + 0x0084, // Range Maximum + 0x00, // Alignment + 0x03, // Length + ) + IO (Decode16, + 0x0088, // Range Minimum + 0x0088, // Range Maximum + 0x00, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x008C, // Range Minimum + 0x008C, // Range Maximum + 0x00, // Alignment + 0x03, // Length + ) + IO (Decode16, + 0x0090, // Range Minimum + 0x0090, // Range Maximum + 0x00, // Alignment + 0x10, // Length + ) + IO (Decode16, + 0x00A2, // Range Minimum + 0x00A2, // Range Maximum + 0x00, // Alignment + 0x1E, // Length + ) + IO (Decode16, + 0x00E0, // Range Minimum + 0x00E0, // Range Maximum + 0x00, // Alignment + 0x10, // Length + ) + IO (Decode16, + 0x04D0, // Range Minimum + 0x04D0, // Range Maximum + 0x00, // Alignment + 0x02, // Length + ) + }) + Method (_CRS, 0, NotSerialized) + { + If (And (MBEC, 0xFFFF)) + { + Return (CRS1) + } + Else + { + Return (CRS2) + } + } + } + + Device (COPR) + { + Name (_HID, EisaId ("PNP0C04")) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, + 0x00F0, // Range Minimum + 0x00F0, // Range Maximum + 0x00, // Alignment + 0x10, // Length + ) + IRQNoFlags () + {13} + }) + } + + Device (PS2K) + { + Name (_HID, EisaId ("PNP0303")) + Name (_CID, EisaId ("PNP030B")) + Method (_STA, 0, NotSerialized) + { + If (And (IOST, 0x0400)) + { + Return (0x0F) + } + Else + { + Return (Zero) + } + } + + Name (_CRS, ResourceTemplate () + { + IO (Decode16, + 0x0060, // Range Minimum + 0x0060, // Range Maximum + 0x00, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0064, // Range Minimum + 0x0064, // Range Maximum + 0x00, // Alignment + 0x01, // Length + ) + IRQNoFlags () + {1} + }) + Name (_PRS, ResourceTemplate () + { + StartDependentFn (0x00, 0x00) + { + FixedIO ( + 0x0060, // Address + 0x01, // Length + ) + FixedIO ( + 0x0064, // Address + 0x01, // Length + ) + IRQNoFlags () + {1} + } + EndDependentFn () + }) + Method (_PSW, 1, NotSerialized) + { + Store (Arg0, KBFG) + } + } + + Scope (\) + { + Name (KBFG, One) + } + + Method (PS2K._PRW, 0, NotSerialized) + { + Return (GPRW (0x1D, 0x04)) + } + + Device (PS2M) + { + Name (_HID, EisaId ("PNP0F03")) + Name (_CID, EisaId ("PNP0F13")) + Method (_STA, 0, NotSerialized) + { + If (And (IOST, 0x4000)) + { + Return (0x0F) + } + Else + { + Return (Zero) + } + } + + Name (CRS1, ResourceTemplate () + { + IRQNoFlags () + {12} + }) + Name (CRS2, ResourceTemplate () + { + IO (Decode16, + 0x0060, // Range Minimum + 0x0060, // Range Maximum + 0x00, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0064, // Range Minimum + 0x0064, // Range Maximum + 0x00, // Alignment + 0x01, // Length + ) + IRQNoFlags () + {12} + }) + Method (_CRS, 0, NotSerialized) + { + If (And (IOST, 0x0400)) + { + Return (CRS1) + } + Else + { + Return (CRS2) + } + } + + Name (_PRS, ResourceTemplate () + { + StartDependentFn (0x00, 0x00) + { + IRQNoFlags () + {12} + } + EndDependentFn () + }) + Method (_PSW, 1, NotSerialized) + { + Store (Arg0, MSFG) + } + } + + Scope (\) + { + Name (MSFG, One) + } + + Method (PS2M._PRW, 0, NotSerialized) + { + Return (GPRW (0x1D, 0x04)) + } + + Scope (^^PCI0) + { + Name (SLIC, Buffer (0x9E) + { + "374937846529Genuine NVIDIA Certified SLI Ready Motherboard for ASUS P8Z68-V PRO 56e7-Copyright 2010 NVIDIA Corporation All Rights Reserved-458103946203(R)" + }) + Device (WMI1) + { + Name (_HID, "pnp0c14") + Name (_UID, "MXM2") + Name (_WDG, Buffer (0x14) + { + /* 0000 */ 0x3C, 0x5C, 0xCB, 0xF6, 0xAE, 0x9C, 0xBD, 0x4E, + /* 0008 */ 0xB5, 0x77, 0x93, 0x1E, 0xA3, 0x2A, 0x2C, 0xC0, + /* 0010 */ 0x4D, 0x58, 0x01, 0x02 + }) + Method (WMMX, 3, NotSerialized) + { + CreateDWordField (Arg2, Zero, FUNC) + If (LEqual (FUNC, 0x41494C53)) + { + Return (SLIC) + } + + Return (Zero) + } + } + } + + Scope (\_SB) + { + Name (LUCD, Buffer (0x7D) + { + /* 0000 */ 0x4C, 0x75, 0x63, 0x69, 0x64, 0x4C, 0x6F, 0x67, + /* 0008 */ 0x69, 0x78, 0x00, 0x68, 0x00, 0x01, 0x00, 0x01, + /* 0010 */ 0x00, 0x00, 0x00, 0x1A, 0x8D, 0x65, 0x61, 0x30, + /* 0018 */ 0x62, 0x64, 0x64, 0x30, 0x63, 0x34, 0x30, 0x66, + /* 0020 */ 0x35, 0x32, 0x33, 0x36, 0x66, 0x66, 0x65, 0x65, + /* 0028 */ 0x31, 0x30, 0x66, 0x63, 0x35, 0x37, 0x32, 0x34, + /* 0030 */ 0x65, 0x38, 0x31, 0x36, 0x36, 0x37, 0x38, 0x65, + /* 0038 */ 0x64, 0x35, 0x39, 0x34, 0x65, 0x64, 0x65, 0x65, + /* 0040 */ 0x65, 0x37, 0x61, 0x35, 0x32, 0x38, 0x64, 0x32, + /* 0048 */ 0x64, 0x31, 0x65, 0x36, 0x36, 0x32, 0x37, 0x61, + /* 0050 */ 0x65, 0x65, 0x64, 0x32, 0x63, 0x30, 0x30, 0x30, + /* 0058 */ 0x30, 0x32, 0x35, 0x36, 0x39, 0x63, 0x65, 0x64, + /* 0060 */ 0x31, 0x36, 0x35, 0x31, 0x36, 0x33, 0x65, 0x35, + /* 0068 */ 0x31, 0x65, 0x30, 0x36, 0x65, 0x30, 0x31, 0x64, + /* 0070 */ 0x63, 0x34, 0x34, 0x63, 0x33, 0x35, 0x66, 0x65, + /* 0078 */ 0x61, 0x33, 0x65, 0x61, 0x66 + }) + } + } + + Device (P0P1) + { + Name (_ADR, 0x001E0000) + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x0B, 0x04)) + } + + Method (_PRT, 0, NotSerialized) + { + If (PICM) + { + Return (AR01 ()) + } + + Return (PR01 ()) + } + } + + Device (USB1) + { + Name (_ADR, 0x001D0001) + } + + Device (USB2) + { + Name (_ADR, 0x001D0002) + } + + Device (USB3) + { + Name (_ADR, 0x001D0003) + } + + Device (USB4) + { + Name (_ADR, 0x001D0004) + } + + Device (USB5) + { + Name (_ADR, 0x001A0001) + } + + Device (USB6) + { + Name (_ADR, 0x001A0002) + } + + Device (USB7) + { + Name (_ADR, 0x001A0003) + } + + Device (RP01) + { + Name (_ADR, 0x001C0000) + OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) + Field (PXCS, AnyAcc, NoLock, Preserve) + { + Offset (0x10), + L0SE, 1, + Offset (0x11), + Offset (0x12), + , 13, + LASX, 1, + Offset (0x1A), + ABPX, 1, + , 2, + PDCX, 1, + , 2, + PDSX, 1, + Offset (0x1B), + Offset (0x20), + Offset (0x22), + PSPX, 1, + Offset (0x98), + , 30, + HPEX, 1, + PMEX, 1 + } + + Field (PXCS, AnyAcc, NoLock, WriteAsZeros) + { + Offset (0x9C), + , 30, + HPSX, 1, + PMSX, 1 + } + + Device (PXSX) + { + Name (_ADR, Zero) + Name (_PRW, Package (0x02) + { + 0x09, + 0x04 + }) + } + + Method (HPME, 0, Serialized) + { + If (PMSX) + { + Store (0xC8, Local0) + While (Local0) + { + Store (One, PMSX) + If (PMSX) + { + Decrement (Local0) + } + Else + { + Store (Zero, Local0) + } + } + + Notify (PXSX, 0x02) + } + } + + Method (_PRT, 0, NotSerialized) + { + If (PICM) + { + Return (AR04 ()) + } + + Return (PR04 ()) + } + } + + Device (RP02) + { + Name (_ADR, 0x001C0001) + OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) + Field (PXCS, AnyAcc, NoLock, Preserve) + { + Offset (0x10), + L0SE, 1, + Offset (0x11), + Offset (0x12), + , 13, + LASX, 1, + Offset (0x1A), + ABPX, 1, + , 2, + PDCX, 1, + , 2, + PDSX, 1, + Offset (0x1B), + Offset (0x20), + Offset (0x22), + PSPX, 1, + Offset (0x98), + , 30, + HPEX, 1, + PMEX, 1 + } + + Field (PXCS, AnyAcc, NoLock, WriteAsZeros) + { + Offset (0x9C), + , 30, + HPSX, 1, + PMSX, 1 + } + + Device (PXSX) + { + Name (_ADR, Zero) + Name (_PRW, Package (0x02) + { + 0x09, + 0x04 + }) + } + + Method (HPME, 0, Serialized) + { + If (PMSX) + { + Store (0xC8, Local0) + While (Local0) + { + Store (One, PMSX) + If (PMSX) + { + Decrement (Local0) + } + Else + { + Store (Zero, Local0) + } + } + + Notify (PXSX, 0x02) + } + } + + Method (_PRT, 0, NotSerialized) + { + If (PICM) + { + Return (AR05 ()) + } + + Return (PR05 ()) + } + } + + Device (RP03) + { + Name (_ADR, 0x001C0002) + OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) + Field (PXCS, AnyAcc, NoLock, Preserve) + { + Offset (0x10), + L0SE, 1, + Offset (0x11), + Offset (0x12), + , 13, + LASX, 1, + Offset (0x1A), + ABPX, 1, + , 2, + PDCX, 1, + , 2, + PDSX, 1, + Offset (0x1B), + Offset (0x20), + Offset (0x22), + PSPX, 1, + Offset (0x98), + , 30, + HPEX, 1, + PMEX, 1 + } + + Field (PXCS, AnyAcc, NoLock, WriteAsZeros) + { + Offset (0x9C), + , 30, + HPSX, 1, + PMSX, 1 + } + + Device (PXSX) + { + Name (_ADR, Zero) + Name (_PRW, Package (0x02) + { + 0x09, + 0x04 + }) + } + + Method (HPME, 0, Serialized) + { + If (PMSX) + { + Store (0xC8, Local0) + While (Local0) + { + Store (One, PMSX) + If (PMSX) + { + Decrement (Local0) + } + Else + { + Store (Zero, Local0) + } + } + + Notify (PXSX, 0x02) + } + } + + Method (_PRT, 0, NotSerialized) + { + If (PICM) + { + Return (AR06 ()) + } + + Return (PR06 ()) + } + } + + Device (RP04) + { + Name (_ADR, 0x001C0003) + OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) + Field (PXCS, AnyAcc, NoLock, Preserve) + { + Offset (0x10), + L0SE, 1, + Offset (0x11), + Offset (0x12), + , 13, + LASX, 1, + Offset (0x1A), + ABPX, 1, + , 2, + PDCX, 1, + , 2, + PDSX, 1, + Offset (0x1B), + Offset (0x20), + Offset (0x22), + PSPX, 1, + Offset (0x98), + , 30, + HPEX, 1, + PMEX, 1 + } + + Field (PXCS, AnyAcc, NoLock, WriteAsZeros) + { + Offset (0x9C), + , 30, + HPSX, 1, + PMSX, 1 + } + + Device (PXSX) + { + Name (_ADR, Zero) + Name (_PRW, Package (0x02) + { + 0x09, + 0x04 + }) + } + + Method (HPME, 0, Serialized) + { + If (PMSX) + { + Store (0xC8, Local0) + While (Local0) + { + Store (One, PMSX) + If (PMSX) + { + Decrement (Local0) + } + Else + { + Store (Zero, Local0) + } + } + + Notify (PXSX, 0x02) + } + } + + Method (_PRT, 0, NotSerialized) + { + If (PICM) + { + Return (AR07 ()) + } + + Return (PR07 ()) + } + + Device (JMB0) + { + Name (_ADR, Zero) + OperationRegion (CF40, PCI_Config, 0x40, 0x04) + Field (CF40, ByteAcc, NoLock, Preserve) + { + CHE0, 1, + MULT, 1, + , 1, + CAB0, 1, + CHE1, 1, + Offset (0x01), + AHEN, 1, + , 3, + PRT0, 1, + AHM0, 1, + PRT1, 1, + AHM1, 1, + CF42, 6, + SWAP, 1, + PATA, 1, + , 6, + WTEN, 1, + Offset (0x04) + } + + Name (PIOT, Package (0x05) + { + 0x0258, + 0x0186, + 0x014A, + 0xB4, + 0x78 + }) + Name (UDMA, Package (0x07) + { + 0x78, + 0x50, + 0x3C, + 0x28, + 0x1E, + 0x14, + 0x0F + }) + Name (MDMA, Package (0x03) + { + 0x01E0, + 0x96, + 0x78 + }) + Name (IDEB, Buffer (0x14) {}) + CreateDWordField (IDEB, Zero, GTM0) + CreateDWordField (IDEB, 0x04, GTM1) + CreateDWordField (IDEB, 0x08, GTM2) + CreateDWordField (IDEB, 0x0C, GTM3) + CreateDWordField (IDEB, 0x10, GTM4) + Name (PIO0, 0x04) + Name (DMA0, 0x06) + Name (MDA0, 0x02) + Name (PIO1, 0x04) + Name (DMA1, 0x06) + Name (MDA1, 0x02) + Name (PIO2, 0x04) + Name (DMA2, 0x06) + Name (MDA2, 0x02) + Name (PIO3, 0x04) + Name (DMA3, 0x06) + Name (MDA3, 0x02) + Name (FLGP, 0x1F) + Name (FLGS, 0x1F) + Device (IDE0) + { + Name (_ADR, Zero) + Method (_GTM, 0, NotSerialized) + { + Store (DerefOf (Index (PIOT, PIO0)), Local0) + Store (DerefOf (Index (PIOT, PIO1)), Local2) + Store (0x1A, Local4) + If (LAnd (FLGP, One)) + { + If (LNot (MULT)) + { + If (LAnd (CAB0, SWAP)) + { + Store (0x02, DMA0) + } + } + + Store (DerefOf (Index (UDMA, DMA0)), Local1) + Or (Local4, One, Local4) + } + Else + { + Store (DerefOf (Index (MDMA, MDA0)), Local1) + } + + If (LAnd (FLGP, 0x04)) + { + If (LAnd (CAB0, SWAP)) + { + Store (0x02, DMA1) + } + + Store (DerefOf (Index (UDMA, DMA1)), Local3) + Or (Local4, 0x04, Local4) + } + Else + { + Store (DerefOf (Index (MDMA, MDA1)), Local3) + } + + Store (Local0, GTM0) + Store (Local1, GTM1) + Store (Local2, GTM2) + Store (Local3, GTM3) + Store (Local4, GTM4) + Return (IDEB) + } + + Method (_STM, 3, NotSerialized) + { + Store (Arg0, IDEB) + Store (GTM0, Local0) + Store (GTM1, Local1) + Store (GTM2, Local2) + Store (GTM3, Local3) + Store (GTM4, Local4) + Store (Local4, FLGP) + If (LAnd (LNotEqual (Local0, 0xFFFFFFFF), LNotEqual (Local0, Zero))) + { + Store (Match (PIOT, MEQ, Local0, MTR, Zero, Zero), PIO0) + } + + If (LAnd (LNotEqual (Local1, 0xFFFFFFFF), LNotEqual (Local1, Zero))) + { + If (LAnd (FLGP, One)) + { + Store (Match (UDMA, MEQ, Local1, MTR, Zero, Zero), DMA0) + } + Else + { + Store (Match (MDMA, MEQ, Local1, MTR, Zero, Zero), MDA0) + } + } + + If (LAnd (LNotEqual (Local2, 0xFFFFFFFF), LNotEqual (Local2, Zero))) + { + Store (Match (PIOT, MEQ, Local2, MTR, Zero, Zero), PIO1) + } + + If (LAnd (LNotEqual (Local3, 0xFFFFFFFF), LNotEqual (Local3, Zero))) + { + If (LAnd (FLGP, 0x04)) + { + Store (Match (UDMA, MEQ, Local3, MTR, Zero, Zero), DMA1) + } + Else + { + Store (Match (MDMA, MEQ, Local3, MTR, Zero, Zero), MDA1) + } + } + } + + Device (DRV0) + { + Name (_ADR, Zero) + Method (_GTF, 0, NotSerialized) + { + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF + }, Local0) + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF + }, Local1) + CreateByteField (Local0, One, PIOM) + CreateByteField (Local1, One, DMAM) + Store (PIO0, PIOM) + Or (PIOM, 0x08, PIOM) + If (LAnd (FLGP, One)) + { + Store (DMA0, DMAM) + Or (DMAM, 0x40, DMAM) + } + Else + { + Store (MDA0, DMAM) + Or (DMAM, 0x20, DMAM) + } + + Concatenate (Local0, Local1, Local2) + Return (Local2) + } + } + + Device (DRV1) + { + Name (_ADR, One) + Method (_GTF, 0, NotSerialized) + { + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF + }, Local0) + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF + }, Local1) + CreateByteField (Local0, One, PIOM) + CreateByteField (Local1, One, DMAM) + Store (PIO1, PIOM) + Or (PIOM, 0x08, PIOM) + If (LAnd (FLGP, 0x04)) + { + Store (DMA1, DMAM) + Or (DMAM, 0x40, DMAM) + } + Else + { + Store (MDA1, DMAM) + Or (DMAM, 0x20, DMAM) + } + + Concatenate (Local0, Local1, Local2) + Return (Local2) + } + } + } + + Device (IDE1) + { + Name (_ADR, One) + Method (_GTM, 0, NotSerialized) + { + Store (DerefOf (Index (PIOT, PIO2)), Local0) + Store (DerefOf (Index (PIOT, PIO3)), Local2) + Store (0x1A, Local4) + If (LAnd (FLGS, One)) + { + If (LNot (MULT)) + { + If (LAnd (CAB0, LNot (SWAP))) + { + Store (0x02, DMA2) + } + } + + Store (DerefOf (Index (UDMA, DMA2)), Local1) + Or (Local4, One, Local4) + } + Else + { + Store (DerefOf (Index (MDMA, MDA2)), Local1) + } + + If (LAnd (FLGS, 0x04)) + { + If (LAnd (CAB0, LNot (SWAP))) + { + Store (0x02, DMA3) + } + + Store (DerefOf (Index (UDMA, DMA3)), Local3) + Or (Local4, 0x04, Local4) + } + Else + { + Store (DerefOf (Index (MDMA, MDA3)), Local3) + } + + Store (Local0, GTM0) + Store (Local1, GTM1) + Store (Local2, GTM2) + Store (Local3, GTM3) + Store (Local4, GTM4) + Return (IDEB) + } + + Method (_STM, 3, NotSerialized) + { + Store (Arg0, IDEB) + Store (GTM0, Local0) + Store (GTM1, Local1) + Store (GTM2, Local2) + Store (GTM3, Local3) + Store (GTM4, Local4) + Store (Local4, FLGS) + If (LAnd (LNotEqual (Local0, 0xFFFFFFFF), LNotEqual (Local0, Zero))) + { + Store (Match (PIOT, MEQ, Local0, MTR, Zero, Zero), PIO2) + } + + If (LAnd (LNotEqual (Local1, 0xFFFFFFFF), LNotEqual (Local1, Zero))) + { + If (LAnd (FLGS, One)) + { + Store (Match (UDMA, MEQ, Local1, MTR, Zero, Zero), DMA2) + } + Else + { + Store (Match (MDMA, MEQ, Local1, MTR, Zero, Zero), MDA2) + } + } + + If (LAnd (LNotEqual (Local2, 0xFFFFFFFF), LNotEqual (Local2, Zero))) + { + Store (Match (PIOT, MEQ, Local2, MTR, Zero, Zero), PIO3) + } + + If (LAnd (LNotEqual (Local3, 0xFFFFFFFF), LNotEqual (Local3, Zero))) + { + If (LAnd (FLGS, 0x04)) + { + Store (Match (UDMA, MEQ, Local3, MTR, Zero, Zero), DMA3) + } + Else + { + Store (Match (MDMA, MEQ, Local3, MTR, Zero, Zero), MDA3) + } + } + } + + Device (DRV0) + { + Name (_ADR, Zero) + Method (_GTF, 0, NotSerialized) + { + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF + }, Local0) + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF + }, Local1) + CreateByteField (Local0, One, PIOM) + CreateByteField (Local1, One, DMAM) + Store (PIO2, PIOM) + Or (PIOM, 0x08, PIOM) + If (LAnd (FLGS, One)) + { + Store (DMA2, DMAM) + Or (DMAM, 0x40, DMAM) + } + Else + { + Store (MDA2, DMAM) + Or (DMAM, 0x20, DMAM) + } + + Concatenate (Local0, Local1, Local2) + Return (Local2) + } + } + + Device (DRV1) + { + Name (_ADR, One) + Method (_GTF, 0, NotSerialized) + { + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF + }, Local0) + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF + }, Local1) + CreateByteField (Local0, One, PIOM) + CreateByteField (Local1, One, DMAM) + Store (PIO3, PIOM) + Or (PIOM, 0x08, PIOM) + If (LAnd (FLGS, 0x04)) + { + Store (DMA3, DMAM) + Or (DMAM, 0x40, DMAM) + } + Else + { + Store (MDA3, DMAM) + Or (DMAM, 0x20, DMAM) + } + + Concatenate (Local0, Local1, Local2) + Return (Local2) + } + } + } + } + + Device (JMB1) + { + Name (_ADR, One) + OperationRegion (CF40, PCI_Config, 0x40, 0x04) + Field (CF40, ByteAcc, NoLock, Preserve) + { + CHE0, 1, + MULT, 1, + , 1, + CAB0, 1, + CHE1, 1, + Offset (0x01), + AHEN, 1, + , 3, + PRT0, 1, + AHM0, 1, + PRT1, 1, + AHM1, 1, + CF42, 6, + SWAP, 1, + PATA, 1, + , 6, + WTEN, 1, + Offset (0x04) + } + + Name (PIOT, Package (0x05) + { + 0x0258, + 0x0186, + 0x014A, + 0xB4, + 0x78 + }) + Name (UDMA, Package (0x07) + { + 0x78, + 0x50, + 0x3C, + 0x28, + 0x1E, + 0x14, + 0x0F + }) + Name (MDMA, Package (0x03) + { + 0x01E0, + 0x96, + 0x78 + }) + Name (IDEB, Buffer (0x14) {}) + CreateDWordField (IDEB, Zero, GTM0) + CreateDWordField (IDEB, 0x04, GTM1) + CreateDWordField (IDEB, 0x08, GTM2) + CreateDWordField (IDEB, 0x0C, GTM3) + CreateDWordField (IDEB, 0x10, GTM4) + Name (PIO0, 0x04) + Name (DMA0, 0x06) + Name (MDA0, 0x02) + Name (PIO1, 0x04) + Name (DMA1, 0x06) + Name (MDA1, 0x02) + Name (PIO2, 0x04) + Name (DMA2, 0x06) + Name (MDA2, 0x02) + Name (PIO3, 0x04) + Name (DMA3, 0x06) + Name (MDA3, 0x02) + Name (FLGP, 0x1F) + Name (FLGS, 0x1F) + Device (IDE0) + { + Name (_ADR, Zero) + Method (_GTM, 0, NotSerialized) + { + Store (DerefOf (Index (PIOT, PIO0)), Local0) + Store (DerefOf (Index (PIOT, PIO1)), Local2) + Store (0x1A, Local4) + If (LAnd (FLGP, One)) + { + If (LAnd (CAB0, SWAP)) + { + Store (0x02, DMA0) + } + + Store (DerefOf (Index (UDMA, DMA0)), Local1) + Or (Local4, One, Local4) + } + Else + { + Store (DerefOf (Index (MDMA, MDA0)), Local1) + } + + If (LAnd (FLGP, 0x04)) + { + If (LAnd (CAB0, SWAP)) + { + Store (0x02, DMA1) + } + + Store (DerefOf (Index (UDMA, DMA1)), Local3) + Or (Local4, 0x04, Local4) + } + Else + { + Store (DerefOf (Index (MDMA, MDA1)), Local3) + } + + Store (Local0, GTM0) + Store (Local1, GTM1) + Store (Local2, GTM2) + Store (Local3, GTM3) + Store (Local4, GTM4) + Return (IDEB) + } + + Method (_STM, 3, NotSerialized) + { + Store (Arg0, IDEB) + Store (GTM0, Local0) + Store (GTM1, Local1) + Store (GTM2, Local2) + Store (GTM3, Local3) + Store (GTM4, Local4) + Store (Local4, FLGP) + If (LAnd (LNotEqual (Local0, 0xFFFFFFFF), LNotEqual (Local0, Zero))) + { + Store (Match (PIOT, MEQ, Local0, MTR, Zero, Zero), PIO0) + } + + If (LAnd (LNotEqual (Local1, 0xFFFFFFFF), LNotEqual (Local1, Zero))) + { + If (LAnd (FLGP, One)) + { + Store (Match (UDMA, MEQ, Local1, MTR, Zero, Zero), DMA0) + } + Else + { + Store (Match (MDMA, MEQ, Local1, MTR, Zero, Zero), MDA0) + } + } + + If (LAnd (LNotEqual (Local2, 0xFFFFFFFF), LNotEqual (Local2, Zero))) + { + Store (Match (PIOT, MEQ, Local2, MTR, Zero, Zero), PIO1) + } + + If (LAnd (LNotEqual (Local3, 0xFFFFFFFF), LNotEqual (Local3, Zero))) + { + If (LAnd (FLGP, 0x04)) + { + Store (Match (UDMA, MEQ, Local3, MTR, Zero, Zero), DMA1) + } + Else + { + Store (Match (MDMA, MEQ, Local3, MTR, Zero, Zero), MDA1) + } + } + } + + Device (DRV0) + { + Name (_ADR, Zero) + Method (_GTF, 0, NotSerialized) + { + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF + }, Local0) + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF + }, Local1) + CreateByteField (Local0, One, PIOM) + CreateByteField (Local1, One, DMAM) + Store (PIO0, PIOM) + Or (PIOM, 0x08, PIOM) + If (LAnd (FLGP, One)) + { + Store (DMA0, DMAM) + Or (DMAM, 0x40, DMAM) + } + Else + { + Store (MDA0, DMAM) + Or (DMAM, 0x20, DMAM) + } + + Concatenate (Local0, Local1, Local2) + Return (Local2) + } + } + + Device (DRV1) + { + Name (_ADR, One) + Method (_GTF, 0, NotSerialized) + { + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF + }, Local0) + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF + }, Local1) + CreateByteField (Local0, One, PIOM) + CreateByteField (Local1, One, DMAM) + Store (PIO1, PIOM) + Or (PIOM, 0x08, PIOM) + If (LAnd (FLGP, 0x04)) + { + Store (DMA1, DMAM) + Or (DMAM, 0x40, DMAM) + } + Else + { + Store (MDA1, DMAM) + Or (DMAM, 0x20, DMAM) + } + + Concatenate (Local0, Local1, Local2) + Return (Local2) + } + } + } + + Device (IDE1) + { + Name (_ADR, One) + Method (_GTM, 0, NotSerialized) + { + Store (DerefOf (Index (PIOT, PIO2)), Local0) + Store (DerefOf (Index (PIOT, PIO3)), Local2) + Store (0x1A, Local4) + If (LAnd (FLGS, One)) + { + If (LAnd (CAB0, LNot (SWAP))) + { + Store (0x02, DMA2) + } + + Store (DerefOf (Index (UDMA, DMA2)), Local1) + Or (Local4, One, Local4) + } + Else + { + Store (DerefOf (Index (MDMA, MDA2)), Local1) + } + + If (LAnd (FLGS, 0x04)) + { + If (LAnd (CAB0, LNot (SWAP))) + { + Store (0x02, DMA3) + } + + Store (DerefOf (Index (UDMA, DMA3)), Local3) + Or (Local4, 0x04, Local4) + } + Else + { + Store (DerefOf (Index (MDMA, MDA3)), Local3) + } + + Store (Local0, GTM0) + Store (Local1, GTM1) + Store (Local2, GTM2) + Store (Local3, GTM3) + Store (Local4, GTM4) + Return (IDEB) + } + + Method (_STM, 3, NotSerialized) + { + Store (Arg0, IDEB) + Store (GTM0, Local0) + Store (GTM1, Local1) + Store (GTM2, Local2) + Store (GTM3, Local3) + Store (GTM4, Local4) + Store (Local4, FLGS) + If (LAnd (LNotEqual (Local0, 0xFFFFFFFF), LNotEqual (Local0, Zero))) + { + Store (Match (PIOT, MEQ, Local0, MTR, Zero, Zero), PIO2) + } + + If (LAnd (LNotEqual (Local1, 0xFFFFFFFF), LNotEqual (Local1, Zero))) + { + If (LAnd (FLGS, One)) + { + Store (Match (UDMA, MEQ, Local1, MTR, Zero, Zero), DMA2) + } + Else + { + Store (Match (MDMA, MEQ, Local1, MTR, Zero, Zero), MDA2) + } + } + + If (LAnd (LNotEqual (Local2, 0xFFFFFFFF), LNotEqual (Local2, Zero))) + { + Store (Match (PIOT, MEQ, Local2, MTR, Zero, Zero), PIO3) + } + + If (LAnd (LNotEqual (Local3, 0xFFFFFFFF), LNotEqual (Local3, Zero))) + { + If (LAnd (FLGS, 0x04)) + { + Store (Match (UDMA, MEQ, Local3, MTR, Zero, Zero), DMA3) + } + Else + { + Store (Match (MDMA, MEQ, Local3, MTR, Zero, Zero), MDA3) + } + } + } + + Device (DRV0) + { + Name (_ADR, Zero) + Method (_GTF, 0, NotSerialized) + { + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF + }, Local0) + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF + }, Local1) + CreateByteField (Local0, One, PIOM) + CreateByteField (Local1, One, DMAM) + Store (PIO2, PIOM) + Or (PIOM, 0x08, PIOM) + If (LAnd (FLGS, One)) + { + Store (DMA2, DMAM) + Or (DMAM, 0x40, DMAM) + } + Else + { + Store (MDA2, DMAM) + Or (DMAM, 0x20, DMAM) + } + + Concatenate (Local0, Local1, Local2) + Return (Local2) + } + } + + Device (DRV1) + { + Name (_ADR, One) + Method (_GTF, 0, NotSerialized) + { + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF + }, Local0) + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF + }, Local1) + CreateByteField (Local0, One, PIOM) + CreateByteField (Local1, One, DMAM) + Store (PIO3, PIOM) + Or (PIOM, 0x08, PIOM) + If (LAnd (FLGS, 0x04)) + { + Store (DMA3, DMAM) + Or (DMAM, 0x40, DMAM) + } + Else + { + Store (MDA3, DMAM) + Or (DMAM, 0x20, DMAM) + } + + Concatenate (Local0, Local1, Local2) + Return (Local2) + } + } + } + } + } + + Device (RP05) + { + Name (_ADR, 0x001C0004) + OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) + Field (PXCS, AnyAcc, NoLock, Preserve) + { + Offset (0x10), + L0SE, 1, + Offset (0x11), + Offset (0x12), + , 13, + LASX, 1, + Offset (0x1A), + ABPX, 1, + , 2, + PDCX, 1, + , 2, + PDSX, 1, + Offset (0x1B), + Offset (0x20), + Offset (0x22), + PSPX, 1, + Offset (0x98), + , 30, + HPEX, 1, + PMEX, 1 + } + + Field (PXCS, AnyAcc, NoLock, WriteAsZeros) + { + Offset (0x9C), + , 30, + HPSX, 1, + PMSX, 1 + } + + Device (PXSX) + { + Name (_ADR, Zero) + Name (_PRW, Package (0x02) + { + 0x09, + 0x04 + }) + } + + Method (HPME, 0, Serialized) + { + If (PMSX) + { + Store (0xC8, Local0) + While (Local0) + { + Store (One, PMSX) + If (PMSX) + { + Decrement (Local0) + } + Else + { + Store (Zero, Local0) + } + } + + Notify (PXSX, 0x02) + } + } + + Method (_PRT, 0, NotSerialized) + { + If (PICM) + { + Return (AR08 ()) + } + + Return (PR08 ()) + } + } + + Device (RP06) + { + Name (_ADR, 0x001C0005) + OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) + Field (PXCS, AnyAcc, NoLock, Preserve) + { + Offset (0x10), + L0SE, 1, + Offset (0x11), + Offset (0x12), + , 13, + LASX, 1, + Offset (0x1A), + ABPX, 1, + , 2, + PDCX, 1, + , 2, + PDSX, 1, + Offset (0x1B), + Offset (0x20), + Offset (0x22), + PSPX, 1, + Offset (0x98), + , 30, + HPEX, 1, + PMEX, 1 + } + + Field (PXCS, AnyAcc, NoLock, WriteAsZeros) + { + Offset (0x9C), + , 30, + HPSX, 1, + PMSX, 1 + } + + Device (PXSX) + { + Name (_ADR, Zero) + Name (_PRW, Package (0x02) + { + 0x09, + 0x04 + }) + } + + Method (HPME, 0, Serialized) + { + If (PMSX) + { + Store (0xC8, Local0) + While (Local0) + { + Store (One, PMSX) + If (PMSX) + { + Decrement (Local0) + } + Else + { + Store (Zero, Local0) + } + } + + Notify (PXSX, 0x02) + } + } + + Method (_PRT, 0, NotSerialized) + { + If (PICM) + { + Return (AR09 ()) + } + + Return (PR09 ()) + } + } + + Device (RP08) + { + Name (_ADR, 0x001C0007) + OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) + Field (PXCS, AnyAcc, NoLock, Preserve) + { + Offset (0x10), + L0SE, 1, + Offset (0x11), + Offset (0x12), + , 13, + LASX, 1, + Offset (0x1A), + ABPX, 1, + , 2, + PDCX, 1, + , 2, + PDSX, 1, + Offset (0x1B), + Offset (0x20), + Offset (0x22), + PSPX, 1, + Offset (0x98), + , 30, + HPEX, 1, + PMEX, 1 + } + + Field (PXCS, AnyAcc, NoLock, WriteAsZeros) + { + Offset (0x9C), + , 30, + HPSX, 1, + PMSX, 1 + } + + Device (PXSX) + { + Name (_ADR, Zero) + Name (_PRW, Package (0x02) + { + 0x09, + 0x04 + }) + } + + Method (HPME, 0, Serialized) + { + If (PMSX) + { + Store (0xC8, Local0) + While (Local0) + { + Store (One, PMSX) + If (PMSX) + { + Decrement (Local0) + } + Else + { + Store (Zero, Local0) + } + } + + Notify (PXSX, 0x02) + } + } + + Method (_PRT, 0, NotSerialized) + { + If (PICM) + { + Return (AR0F ()) + } + + Return (PR0F ()) + } + } + + Device (PEG0) + { + Name (_ADR, 0x00010000) + Method (_PRT, 0, NotSerialized) + { + If (PICM) + { + Return (AR02 ()) + } + + Return (PR02 ()) + } + + Device (PEGP) + { + Name (_ADR, 0xFFFF) + } + } + + Device (PEG1) + { + Name (_ADR, 0x00010001) + Method (_PRT, 0, NotSerialized) + { + If (PICM) + { + Return (AR0A ()) + } + + Return (PR0A ()) + } + } + + Device (PEG2) + { + Name (_ADR, 0x00010002) + Method (_PRT, 0, NotSerialized) + { + If (PICM) + { + Return (AR0B ()) + } + + Return (PR0B ()) + } + } + + Device (PEG3) + { + Name (_ADR, 0x00060000) + Method (_PRT, 0, NotSerialized) + { + If (PICM) + { + Return (AR0C ()) + } + + Return (PR0C ()) + } + } + + Device (B0D4) + { + Name (_ADR, 0x00040000) + } + + Device (EUSB) + { + Name (_ADR, 0x001D0000) + Name (_S4D, 0x02) + Name (_S3D, 0x02) + Name (_S2D, 0x02) + Name (_S1D, 0x02) + Device (HUBN) + { + Name (_ADR, Zero) + Device (PR10) + { + Name (_ADR, One) + Name (_UPC, Package (0x04) + { + 0xFF, + Zero, + Zero, + Zero + }) + Name (_PLD, Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x30, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }) + Device (PR30) + { + Name (_ADR, One) + Name (_UPC, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }) + } + + Device (PR31) + { + Name (_ADR, 0x02) + Name (_UPC, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }) + } + + Device (PR32) + { + Name (_ADR, 0x03) + Name (_UPC, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }) + } + + Device (PR33) + { + Name (_ADR, 0x04) + Name (_UPC, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }) + } + + Device (PR34) + { + Name (_ADR, 0x05) + Name (_UPC, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }) + } + + Device (PR35) + { + Name (_ADR, 0x06) + Name (_UPC, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }) + } + + Device (PR36) + { + Name (_ADR, 0x07) + Name (_UPC, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xB0, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }) + } + + Device (PR37) + { + Name (_ADR, 0x08) + Name (_UPC, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }) + } + } + } + } + + Device (RP07) + { + Name (_ADR, 0x001C0006) + OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) + Field (PXCS, AnyAcc, NoLock, Preserve) + { + Offset (0x10), + L0SE, 1, + Offset (0x11), + Offset (0x12), + , 13, + LASX, 1, + Offset (0x1A), + ABPX, 1, + , 2, + PDCX, 1, + , 2, + PDSX, 1, + Offset (0x1B), + Offset (0x20), + Offset (0x22), + PSPX, 1, + Offset (0x98), + , 30, + HPEX, 1, + PMEX, 1 + } + + Field (PXCS, AnyAcc, NoLock, WriteAsZeros) + { + Offset (0x9C), + , 30, + HPSX, 1, + PMSX, 1 + } + + Method (HPME, 0, Serialized) + { + If (PMSX) + { + Store (0xC8, Local0) + While (Local0) + { + Store (One, PMSX) + If (PMSX) + { + Decrement (Local0) + } + Else + { + Store (Zero, Local0) + } + } + + Notify (PXSX, 0x02) + } + } + + Method (_PRT, 0, NotSerialized) + { + If (PICM) + { + Return (AR0E ()) + } + + Return (PR0E ()) + } + + Device (PXSX) + { + Name (_ADR, Zero) + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x0B, 0x04)) + } + + Method (_PRT, 0, NotSerialized) + { + If (PICM) + { + Return (AR31) + } + + Return (PR31) + } + } + } + } + + Scope (\_GPE) + { + Method (_L1D, 0, NotSerialized) + { + \_SB.PCI0.LPCB.SIOH () + Notify (\_SB.PWRB, 0x02) + } + + Method (_L0B, 0, NotSerialized) + { + Notify (\_SB.PCI0.P0P1, 0x02) + Notify (\_SB.PCI0.RP07.PXSX, 0x02) + Notify (\_SB.PWRB, 0x02) + } + } + + Device (PWRB) + { + Name (_HID, EisaId ("PNP0C0C")) + Name (_UID, 0xAA) + Name (_STA, 0x0B) + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x1D, 0x04)) + } + } + } + + Scope (\) + { + OperationRegion (IO_T, SystemIO, 0x0200, 0x10) + Field (IO_T, ByteAcc, NoLock, Preserve) + { + TRPI, 16, + Offset (0x04), + Offset (0x06), + Offset (0x08), + TRP0, 8, + Offset (0x0A), + Offset (0x0B), + Offset (0x0C), + Offset (0x0D), + Offset (0x0E), + Offset (0x0F), + Offset (0x10) + } + + OperationRegion (IO_D, SystemIO, 0x0810, 0x04) + Field (IO_D, ByteAcc, NoLock, Preserve) + { + TRPD, 8 + } + + OperationRegion (IO_H, SystemIO, 0x1000, 0x04) + Field (IO_H, ByteAcc, NoLock, Preserve) + { + TRPH, 8 + } + + OperationRegion (PMIO, SystemIO, PMBS, 0x80) + Field (PMIO, ByteAcc, NoLock, Preserve) + { + Offset (0x28), + Offset (0x2A), + , 3, + GPE3, 1, + Offset (0x3C), + , 1, + UPRW, 1, + Offset (0x42), + , 1, + GPEC, 1 + } + + Field (PMIO, ByteAcc, NoLock, WriteAsZeros) + { + Offset (0x20), + Offset (0x22), + , 3, + GPS3, 1, + Offset (0x64), + , 9, + SCIS, 1, + Offset (0x66) + } + + OperationRegion (GPIO, SystemIO, GPBS, 0x64) + Field (GPIO, ByteAcc, NoLock, Preserve) + { + GU00, 8, + GU01, 8, + GU02, 8, + GU03, 8, + GIO0, 8, + GIO1, 8, + GIO2, 8, + GIO3, 8, + Offset (0x0C), + GL00, 8, + GL01, 8, + GL02, 8, + GP24, 1, + , 2, + GP27, 1, + GP28, 1, + Offset (0x10), + Offset (0x18), + GB00, 8, + GB01, 8, + GB02, 8, + GB03, 8, + Offset (0x2C), + GIV0, 8, + GIV1, 8, + GIV2, 8, + GIV3, 8, + GU04, 8, + GU05, 8, + GU06, 8, + GU07, 8, + GIO4, 8, + GIO5, 8, + GIO6, 8, + GIO7, 8, + GL04, 8, + GL05, 8, + GL06, 8, + GL07, 8, + Offset (0x40), + GU08, 8, + GU09, 8, + GU0A, 8, + GU0B, 8, + GIO8, 8, + GIO9, 8, + GIOA, 8, + GIOB, 8, + GL08, 8, + GL09, 8, + GL0A, 8, + GL0B, 8 + } + + OperationRegion (RCRB, SystemMemory, SRCB, 0x4000) + Field (RCRB, DWordAcc, Lock, Preserve) + { + Offset (0x1000), + Offset (0x3000), + Offset (0x3404), + HPAS, 2, + , 5, + HPAE, 1, + Offset (0x3418), + , 1, + , 1, + SATD, 1, + SMBD, 1, + HDAD, 1, + Offset (0x341A), + RP1D, 1, + RP2D, 1, + RP3D, 1, + RP4D, 1, + RP5D, 1, + RP6D, 1, + RP7D, 1, + RP8D, 1, + Offset (0x359C), + UP0D, 1, + UP1D, 1, + UP2D, 1, + UP3D, 1, + UP4D, 1, + UP5D, 1, + UP6D, 1, + UP7D, 1, + UP8D, 1, + UP9D, 1, + UPAD, 1, + UPBD, 1, + UPCD, 1, + UPDD, 1, + , 1, + Offset (0x359E) + } + } + + Scope (_SB.PCI0) + { + Device (GLAN) + { + Name (_ADR, 0x00190000) + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x0D, 0x04)) + } + } + + Device (EHC1) + { + Name (_ADR, 0x001D0000) + OperationRegion (PWKE, PCI_Config, 0x62, 0x04) + Field (PWKE, DWordAcc, NoLock, Preserve) + { + , 1, + PWUC, 8 + } + + Method (_PSW, 1, NotSerialized) + { + If (Arg0) + { + Store (Ones, PWUC) + } + Else + { + Store (Zero, PWUC) + } + } + + Method (_S3D, 0, NotSerialized) + { + Return (0x02) + } + + Method (_S4D, 0, NotSerialized) + { + Return (0x02) + } + + Device (HUBN) + { + Name (_ADR, Zero) + Device (PR01) + { + Name (_ADR, One) + Method (_UPC, 0, Serialized) + { + Name (UPCA, Package (0x04) + { + 0xFF, + Zero, + Zero, + Zero + }) + Return (UPCA) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x30, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Return (PLDP) + } + + Device (PR11) + { + Name (_ADR, One) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Return (PLDP) + } + } + + Device (PR12) + { + Name (_ADR, 0x02) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Return (PLDP) + } + } + + Device (PR13) + { + Name (_ADR, 0x03) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Return (PLDP) + } + } + + Device (PR14) + { + Name (_ADR, 0x04) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Return (PLDP) + } + + Alias (SBV1, SDGV) + Method (_DSM, 4, Serialized) + { + If (LEqual (Arg0, Buffer (0x10) + { + /* 0000 */ 0x8F, 0x70, 0xFC, 0xA5, 0x75, 0x87, 0xA6, 0x4B, + /* 0008 */ 0xBD, 0x0C, 0xBA, 0x90, 0xA1, 0xEC, 0x72, 0xF8 + })) + { + Name (_T_0, Zero) + Store (ToInteger (Arg2), _T_0) + If (LEqual (_T_0, Zero)) + { + If (LEqual (Arg1, One)) + { + Return (Buffer (One) + { + 0x07 + }) + } + Else + { + Return (Buffer (One) + { + 0x00 + }) + } + } + Else + { + If (LEqual (_T_0, One)) + { + If (LEqual (SDGV, 0xFF)) + { + Return (Zero) + } + Else + { + Return (One) + } + } + Else + { + If (LEqual (_T_0, 0x02)) + { + Return (SDGV) + } + } + } + } + + Return (Zero) + } + } + + Device (PR15) + { + Name (_ADR, 0x05) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Return (PLDP) + } + + Alias (SBV2, SDGV) + Method (_DSM, 4, Serialized) + { + If (LEqual (Arg0, Buffer (0x10) + { + /* 0000 */ 0x8F, 0x70, 0xFC, 0xA5, 0x75, 0x87, 0xA6, 0x4B, + /* 0008 */ 0xBD, 0x0C, 0xBA, 0x90, 0xA1, 0xEC, 0x72, 0xF8 + })) + { + Name (_T_0, Zero) + Store (ToInteger (Arg2), _T_0) + If (LEqual (_T_0, Zero)) + { + If (LEqual (Arg1, One)) + { + Return (Buffer (One) + { + 0x07 + }) + } + Else + { + Return (Buffer (One) + { + 0x00 + }) + } + } + Else + { + If (LEqual (_T_0, One)) + { + If (LEqual (SDGV, 0xFF)) + { + Return (Zero) + } + Else + { + Return (One) + } + } + Else + { + If (LEqual (_T_0, 0x02)) + { + Return (SDGV) + } + } + } + } + + Return (Zero) + } + } + + Device (PR16) + { + Name (_ADR, 0x06) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Return (PLDP) + } + + Alias (SBV1, SDGV) + Method (_DSM, 4, Serialized) + { + If (LEqual (Arg0, Buffer (0x10) + { + /* 0000 */ 0x8F, 0x70, 0xFC, 0xA5, 0x75, 0x87, 0xA6, 0x4B, + /* 0008 */ 0xBD, 0x0C, 0xBA, 0x90, 0xA1, 0xEC, 0x72, 0xF8 + })) + { + Name (_T_0, Zero) + Store (ToInteger (Arg2), _T_0) + If (LEqual (_T_0, Zero)) + { + If (LEqual (Arg1, One)) + { + Return (Buffer (One) + { + 0x07 + }) + } + Else + { + Return (Buffer (One) + { + 0x00 + }) + } + } + Else + { + If (LEqual (_T_0, One)) + { + If (LEqual (SDGV, 0xFF)) + { + Return (Zero) + } + Else + { + Return (One) + } + } + Else + { + If (LEqual (_T_0, 0x02)) + { + Return (SDGV) + } + } + } + } + + Return (Zero) + } + } + + Device (PR17) + { + Name (_ADR, 0x07) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Return (PLDP) + } + + Alias (SBV2, SDGV) + Method (_DSM, 4, Serialized) + { + If (LEqual (Arg0, Buffer (0x10) + { + /* 0000 */ 0x8F, 0x70, 0xFC, 0xA5, 0x75, 0x87, 0xA6, 0x4B, + /* 0008 */ 0xBD, 0x0C, 0xBA, 0x90, 0xA1, 0xEC, 0x72, 0xF8 + })) + { + Name (_T_0, Zero) + Store (ToInteger (Arg2), _T_0) + If (LEqual (_T_0, Zero)) + { + If (LEqual (Arg1, One)) + { + Return (Buffer (One) + { + 0x07 + }) + } + Else + { + Return (Buffer (One) + { + 0x00 + }) + } + } + Else + { + If (LEqual (_T_0, One)) + { + If (LEqual (SDGV, 0xFF)) + { + Return (Zero) + } + Else + { + Return (One) + } + } + Else + { + If (LEqual (_T_0, 0x02)) + { + Return (SDGV) + } + } + } + } + + Return (Zero) + } + } + + Device (PR18) + { + Name (_ADR, 0x08) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Return (PLDP) + } + } + } + } + + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x0D, 0x04)) + } + } + + Device (EHC2) + { + Name (_ADR, 0x001A0000) + OperationRegion (PWKE, PCI_Config, 0x62, 0x04) + Field (PWKE, DWordAcc, NoLock, Preserve) + { + , 1, + PWUC, 6 + } + + Method (_PSW, 1, NotSerialized) + { + If (Arg0) + { + Store (Ones, PWUC) + } + Else + { + Store (Zero, PWUC) + } + } + + Method (_S3D, 0, NotSerialized) + { + Return (0x02) + } + + Method (_S4D, 0, NotSerialized) + { + Return (0x02) + } + + Device (HUBN) + { + Name (_ADR, Zero) + Device (PR01) + { + Name (_ADR, One) + Method (_UPC, 0, Serialized) + { + Name (UPCA, Package (0x04) + { + 0xFF, + Zero, + Zero, + Zero + }) + Return (UPCA) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x30, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Return (PLDP) + } + + Device (PR11) + { + Name (_ADR, One) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Return (PLDP) + } + } + + Device (PR12) + { + Name (_ADR, 0x02) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Return (PLDP) + } + + Alias (SBV1, SDGV) + Method (_DSM, 4, Serialized) + { + If (LEqual (Arg0, Buffer (0x10) + { + /* 0000 */ 0x8F, 0x70, 0xFC, 0xA5, 0x75, 0x87, 0xA6, 0x4B, + /* 0008 */ 0xBD, 0x0C, 0xBA, 0x90, 0xA1, 0xEC, 0x72, 0xF8 + })) + { + Name (_T_0, Zero) + Store (ToInteger (Arg2), _T_0) + If (LEqual (_T_0, Zero)) + { + If (LEqual (Arg1, One)) + { + Return (Buffer (One) + { + 0x07 + }) + } + Else + { + Return (Buffer (One) + { + 0x00 + }) + } + } + Else + { + If (LEqual (_T_0, One)) + { + If (LEqual (SDGV, 0xFF)) + { + Return (Zero) + } + Else + { + Return (One) + } + } + Else + { + If (LEqual (_T_0, 0x02)) + { + Return (SDGV) + } + } + } + } + + Return (Zero) + } + } + + Device (PR13) + { + Name (_ADR, 0x03) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Return (PLDP) + } + + Alias (SBV2, SDGV) + Method (_DSM, 4, Serialized) + { + If (LEqual (Arg0, Buffer (0x10) + { + /* 0000 */ 0x8F, 0x70, 0xFC, 0xA5, 0x75, 0x87, 0xA6, 0x4B, + /* 0008 */ 0xBD, 0x0C, 0xBA, 0x90, 0xA1, 0xEC, 0x72, 0xF8 + })) + { + Name (_T_0, Zero) + Store (ToInteger (Arg2), _T_0) + If (LEqual (_T_0, Zero)) + { + If (LEqual (Arg1, One)) + { + Return (Buffer (One) + { + 0x07 + }) + } + Else + { + Return (Buffer (One) + { + 0x00 + }) + } + } + Else + { + If (LEqual (_T_0, One)) + { + If (LEqual (SDGV, 0xFF)) + { + Return (Zero) + } + Else + { + Return (One) + } + } + Else + { + If (LEqual (_T_0, 0x02)) + { + Return (SDGV) + } + } + } + } + + Return (Zero) + } + } + + Device (PR14) + { + Name (_ADR, 0x04) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Return (PLDP) + } + } + + Device (PR15) + { + Name (_ADR, 0x05) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Return (PLDP) + } + } + + Device (PR16) + { + Name (_ADR, 0x06) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Return (PLDP) + } + } + } + } + + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x0D, 0x04)) + } + } + + Device (XHC) + { + Name (_ADR, 0x00140000) + OperationRegion (XPRT, PCI_Config, 0xD0, 0x10) + Field (XPRT, DWordAcc, NoLock, Preserve) + { + PR2, 32, + PR2M, 32, + PR3, 32, + PR3M, 32 + } + + Method (CUID, 1, Serialized) + { + If (LEqual (Arg0, Buffer (0x10) + { + /* 0000 */ 0xA9, 0x12, 0x95, 0x7C, 0x05, 0x17, 0xB4, 0x4C, + /* 0008 */ 0xAF, 0x7D, 0x50, 0x6A, 0x24, 0x23, 0xAB, 0x71 + })) + { + Return (One) + } + + Return (Zero) + } + + Method (POSC, 3, Serialized) + { + CreateDWordField (Arg2, Zero, CDW1) + If (LNotEqual (Arg1, One)) + { + Or (CDW1, 0x08, CDW1) + } + + If (LEqual (XHCI, Zero)) + { + Or (CDW1, 0x02, CDW1) + } + + If (LNot (And (CDW1, One))) + { + XSEL () + } + + Return (Arg2) + } + + Method (XSEL, 0, Serialized) + { + If (LOr (LEqual (XHCI, 0x02), LEqual (XHCI, 0x03))) + { + Store (Zero, Local0) + And (PR3, 0xFFFFFFF0, Local0) + Or (Local0, XHPM, Local0) + And (Local0, PR3M, PR3) + Store (Zero, Local0) + And (PR2, 0xFFFFFFF0, Local0) + Or (Local0, XHPM, Local0) + And (Local0, PR2M, PR2) + Store (One, XUSB) + } + } + + Method (_S3D, 0, NotSerialized) + { + Return (0x02) + } + + Method (_S4D, 0, NotSerialized) + { + Return (0x02) + } + + Device (RHUB) + { + Name (_ADR, Zero) + Device (HSP1) + { + Name (_ADR, One) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0x03, + Zero, + Zero + }) + If (LNot (And (PR2, One))) + { + Store (Zero, Index (UPCP, Zero)) + } + + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x69, 0x0C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS) + If (LNot (And (PR2, One))) + { + And (VIS, Zero, VIS) + } + + Return (PLDP) + } + } + + Device (HSP2) + { + Name (_ADR, 0x02) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0x03, + Zero, + Zero + }) + If (LNot (And (PR2, 0x02))) + { + Store (Zero, Index (UPCP, Zero)) + } + + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x69, 0x0C, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + } + }) + CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS) + If (LNot (And (PR2, 0x02))) + { + And (VIS, Zero, VIS) + } + + Return (PLDP) + } + } + + Device (HSP3) + { + Name (_ADR, 0x03) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0x03, + Zero, + Zero + }) + If (LNot (And (PR2, 0x04))) + { + Store (Zero, Index (UPCP, Zero)) + } + + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x69, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00 + } + }) + CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS) + If (LNot (And (PR2, 0x04))) + { + And (VIS, Zero, VIS) + } + + Return (PLDP) + } + } + + Device (HSP4) + { + Name (_ADR, 0x04) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0x03, + Zero, + Zero + }) + If (LNot (And (PR2, 0x08))) + { + Store (Zero, Index (UPCP, Zero)) + } + + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x69, 0x0C, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 + } + }) + CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS) + If (LNot (And (PR2, 0x08))) + { + And (VIS, Zero, VIS) + } + + Return (PLDP) + } + } + + Device (SSP1) + { + Name (_ADR, 0x05) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0x03, + Zero, + Zero + }) + If (LNot (And (PR3, One))) + { + Store (Zero, Index (UPCP, Zero)) + } + + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x69, 0x0C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS) + If (LNot (And (PR3, One))) + { + And (VIS, Zero, VIS) + } + + Return (PLDP) + } + } + + Device (SSP2) + { + Name (_ADR, 0x06) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0x03, + Zero, + Zero + }) + If (LNot (And (PR3, 0x02))) + { + Store (Zero, Index (UPCP, Zero)) + } + + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x69, 0x0C, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + } + }) + CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS) + If (LNot (And (PR3, 0x02))) + { + And (VIS, Zero, VIS) + } + + Return (PLDP) + } + } + + Device (SSP3) + { + Name (_ADR, 0x07) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0x03, + Zero, + Zero + }) + If (LNot (And (PR3, 0x04))) + { + Store (Zero, Index (UPCP, Zero)) + } + + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x69, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00 + } + }) + CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS) + If (LNot (And (PR3, 0x04))) + { + And (VIS, Zero, VIS) + } + + Return (PLDP) + } + } + + Device (SSP4) + { + Name (_ADR, 0x08) + Method (_UPC, 0, Serialized) + { + Name (UPCP, Package (0x04) + { + 0xFF, + 0x03, + Zero, + Zero + }) + If (LNot (And (PR3, 0x08))) + { + Store (Zero, Index (UPCP, Zero)) + } + + Return (UPCP) + } + + Method (_PLD, 0, Serialized) + { + Name (PLDP, Package (0x01) + { + Buffer (0x10) + { + /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x69, 0x0C, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 + } + }) + CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS) + If (LNot (And (PR3, 0x08))) + { + And (VIS, Zero, VIS) + } + + Return (PLDP) + } + } + } + + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x0D, 0x04)) + } + } + + Device (HDEF) + { + Name (_ADR, 0x001B0000) + OperationRegion (HDAR, PCI_Config, 0x4C, 0x10) + Field (HDAR, WordAcc, NoLock, Preserve) + { + DCKA, 1, + Offset (0x01), + DCKM, 1, + , 6, + DCKS, 1, + Offset (0x08), + , 15, + PMES, 1 + } + + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x0D, 0x04)) + } + } + + Device (SAT0) + { + Name (_ADR, 0x001F0002) + } + + Device (SAT1) + { + Name (_ADR, 0x001F0005) + } + + Device (SBUS) + { + Name (_ADR, 0x001F0003) + OperationRegion (SMBP, PCI_Config, 0x40, 0xC0) + Field (SMBP, DWordAcc, NoLock, Preserve) + { + , 2, + I2CE, 1 + } + + OperationRegion (SMPB, PCI_Config, 0x20, 0x04) + Field (SMPB, DWordAcc, NoLock, Preserve) + { + , 5, + SBAR, 11 + } + + OperationRegion (SMBI, SystemIO, ShiftLeft (SBAR, 0x05), 0x10) + Field (SMBI, ByteAcc, NoLock, Preserve) + { + HSTS, 8, + Offset (0x02), + HCON, 8, + HCOM, 8, + TXSA, 8, + DAT0, 8, + DAT1, 8, + HBDR, 8, + PECR, 8, + RXSA, 8, + SDAT, 16 + } + + Method (SSXB, 2, Serialized) + { + If (STRT ()) + { + Return (Zero) + } + + Store (Zero, I2CE) + Store (0xBF, HSTS) + Store (Arg0, TXSA) + Store (Arg1, HCOM) + Store (0x48, HCON) + If (COMP ()) + { + Or (HSTS, 0xFF, HSTS) + Return (One) + } + + Return (Zero) + } + + Method (SRXB, 1, Serialized) + { + If (STRT ()) + { + Return (0xFFFF) + } + + Store (Zero, I2CE) + Store (0xBF, HSTS) + Store (Or (Arg0, One), TXSA) + Store (0x44, HCON) + If (COMP ()) + { + Or (HSTS, 0xFF, HSTS) + Return (DAT0) + } + + Return (0xFFFF) + } + + Method (SWRB, 3, Serialized) + { + If (STRT ()) + { + Return (Zero) + } + + Store (Zero, I2CE) + Store (0xBF, HSTS) + Store (Arg0, TXSA) + Store (Arg1, HCOM) + Store (Arg2, DAT0) + Store (0x48, HCON) + If (COMP ()) + { + Or (HSTS, 0xFF, HSTS) + Return (One) + } + + Return (Zero) + } + + Method (SRDB, 2, Serialized) + { + If (STRT ()) + { + Return (0xFFFF) + } + + Store (Zero, I2CE) + Store (0xBF, HSTS) + Store (Or (Arg0, One), TXSA) + Store (Arg1, HCOM) + Store (0x48, HCON) + If (COMP ()) + { + Or (HSTS, 0xFF, HSTS) + Return (DAT0) + } + + Return (0xFFFF) + } + + Method (SWRW, 3, Serialized) + { + If (STRT ()) + { + Return (Zero) + } + + Store (Zero, I2CE) + Store (0xBF, HSTS) + Store (Arg0, TXSA) + Store (Arg1, HCOM) + And (Arg2, 0xFF, DAT1) + And (ShiftRight (Arg2, 0x08), 0xFF, DAT0) + Store (0x4C, HCON) + If (COMP ()) + { + Or (HSTS, 0xFF, HSTS) + Return (One) + } + + Return (Zero) + } + + Method (SRDW, 2, Serialized) + { + If (STRT ()) + { + Return (0xFFFF) + } + + Store (Zero, I2CE) + Store (0xBF, HSTS) + Store (Or (Arg0, One), TXSA) + Store (Arg1, HCOM) + Store (0x4C, HCON) + If (COMP ()) + { + Or (HSTS, 0xFF, HSTS) + Return (Or (ShiftLeft (DAT0, 0x08), DAT1)) + } + + Return (0xFFFFFFFF) + } + + Method (SBLW, 4, Serialized) + { + If (STRT ()) + { + Return (Zero) + } + + Store (Arg3, I2CE) + Store (0xBF, HSTS) + Store (Arg0, TXSA) + Store (Arg1, HCOM) + Store (SizeOf (Arg2), DAT0) + Store (Zero, Local1) + Store (DerefOf (Index (Arg2, Zero)), HBDR) + Store (0x54, HCON) + While (LGreater (SizeOf (Arg2), Local1)) + { + Store (0x0FA0, Local0) + While (LAnd (LNot (And (HSTS, 0x80)), Local0)) + { + Decrement (Local0) + Stall (0x32) + } + + If (LNot (Local0)) + { + KILL () + Return (Zero) + } + + Store (0x80, HSTS) + Increment (Local1) + If (LGreater (SizeOf (Arg2), Local1)) + { + Store (DerefOf (Index (Arg2, Local1)), HBDR) + } + } + + If (COMP ()) + { + Or (HSTS, 0xFF, HSTS) + Return (One) + } + + Return (Zero) + } + + Method (SBLR, 3, Serialized) + { + Name (TBUF, Buffer (0x0100) {}) + If (STRT ()) + { + Return (Zero) + } + + Store (Arg2, I2CE) + Store (0xBF, HSTS) + Store (Or (Arg0, One), TXSA) + Store (Arg1, HCOM) + Store (0x54, HCON) + Store (0x0FA0, Local0) + While (LAnd (LNot (And (HSTS, 0x80)), Local0)) + { + Decrement (Local0) + Stall (0x32) + } + + If (LNot (Local0)) + { + KILL () + Return (Zero) + } + + Store (DAT0, Index (TBUF, Zero)) + Store (0x80, HSTS) + Store (One, Local1) + While (LLess (Local1, DerefOf (Index (TBUF, Zero)))) + { + Store (0x0FA0, Local0) + While (LAnd (LNot (And (HSTS, 0x80)), Local0)) + { + Decrement (Local0) + Stall (0x32) + } + + If (LNot (Local0)) + { + KILL () + Return (Zero) + } + + Store (HBDR, Index (TBUF, Local1)) + Store (0x80, HSTS) + Increment (Local1) + } + + If (COMP ()) + { + Or (HSTS, 0xFF, HSTS) + Return (TBUF) + } + + Return (Zero) + } + + Method (STRT, 0, Serialized) + { + Store (0xC8, Local0) + While (Local0) + { + If (And (HSTS, 0x40)) + { + Decrement (Local0) + Sleep (One) + If (LEqual (Local0, Zero)) + { + Return (One) + } + } + Else + { + Store (Zero, Local0) + } + } + + Store (0x0FA0, Local0) + While (Local0) + { + If (And (HSTS, One)) + { + Decrement (Local0) + Stall (0x32) + If (LEqual (Local0, Zero)) + { + KILL () + } + } + Else + { + Return (Zero) + } + } + + Return (One) + } + + Method (COMP, 0, Serialized) + { + Store (0x0FA0, Local0) + While (Local0) + { + If (And (HSTS, 0x02)) + { + Return (One) + } + Else + { + Decrement (Local0) + Stall (0x32) + If (LEqual (Local0, Zero)) + { + KILL () + } + } + } + + Return (Zero) + } + + Method (KILL, 0, Serialized) + { + Or (HCON, 0x02, HCON) + Or (HSTS, 0xFF, HSTS) + } + } + } + + Scope (_SB.PCI0.LPCB) + { + OperationRegion (CPSB, SystemMemory, 0xDCBC5F98, 0x10) + Field (CPSB, AnyAcc, NoLock, Preserve) + { + RTCX, 1, + SBB0, 7, + SBB1, 8, + SBB2, 8, + SBB3, 8, + SBB4, 8, + SBB5, 8, + SBB6, 8, + SBB7, 8, + SBB8, 8, + SBB9, 8, + SBBA, 8, + SBBB, 8, + SBBC, 8, + SBBD, 8, + SBBE, 8, + SBBF, 8 + } + + Method (SPTS, 1, NotSerialized) + { + Store (One, SLPX) + Store (One, SLPE) + } + + Method (SWAK, 1, NotSerialized) + { + Store (Zero, SLPE) + If (RTCX) {} + Else + { + Notify (PWRB, 0x02) + } + } + + OperationRegion (SMIE, SystemIO, PMBS, 0x04) + Field (SMIE, ByteAcc, NoLock, Preserve) + { + , 10, + RTCS, 1, + , 3, + PEXS, 1, + WAKS, 1, + Offset (0x03), + PWBT, 1, + Offset (0x04) + } + + OperationRegion (SLPR, SystemIO, SMCR, 0x08) + Field (SLPR, ByteAcc, NoLock, Preserve) + { + , 4, + SLPE, 1, + , 31, + SLPX, 1, + Offset (0x08) + } + } + + Scope (_SB.PCI0.RP01) + { + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x09, 0x04)) + } + } + + Scope (_SB.PCI0.RP02) + { + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x09, 0x04)) + } + } + + Scope (_SB.PCI0.RP03) + { + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x09, 0x04)) + } + } + + Scope (_SB.PCI0.RP04) + { + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x09, 0x04)) + } + } + + Scope (_SB.PCI0.RP05) + { + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x09, 0x04)) + } + } + + Scope (_SB.PCI0.RP06) + { + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x09, 0x04)) + } + } + + Scope (_SB.PCI0.RP07) + { + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x09, 0x04)) + } + } + + Scope (_SB.PCI0.RP08) + { + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x09, 0x04)) + } + } + + OperationRegion (_SB.PCI0.LPCB.LPCR, PCI_Config, 0x80, 0x04) + Field (\_SB.PCI0.LPCB.LPCR, ByteAcc, NoLock, Preserve) + { + CADR, 3, + , 1, + CBDR, 3, + Offset (0x01), + LTDR, 2, + , 2, + FDDR, 1, + Offset (0x02), + CALE, 1, + CBLE, 1, + LTLE, 1, + FDLE, 1, + Offset (0x03), + GLLE, 1, + GHLE, 1, + KCLE, 1, + MCLE, 1, + C1LE, 1, + C2LE, 1, + Offset (0x04) + } + + Method (UXDV, 1, NotSerialized) + { + Store (0xFF, Local0) + Name (_T_0, Zero) + Store (Add (Arg0, Zero), _T_0) + If (LEqual (_T_0, 0x03F8)) + { + Store (Zero, Local0) + } + Else + { + If (LEqual (_T_0, 0x02F8)) + { + Store (One, Local0) + } + Else + { + If (LEqual (_T_0, 0x0220)) + { + Store (0x02, Local0) + } + Else + { + If (LEqual (_T_0, 0x0228)) + { + Store (0x03, Local0) + } + Else + { + If (LEqual (_T_0, 0x0238)) + { + Store (0x04, Local0) + } + Else + { + If (LEqual (_T_0, 0x02E8)) + { + Store (0x05, Local0) + } + Else + { + If (LEqual (_T_0, 0x0338)) + { + Store (0x06, Local0) + } + Else + { + If (LEqual (_T_0, 0x03E8)) + { + Store (0x07, Local0) + } + } + } + } + } + } + } + } + + Return (Local0) + } + + Method (RRIO, 4, NotSerialized) + { + Name (_T_0, Zero) + Store (Add (Arg0, Zero), _T_0) + If (LEqual (_T_0, Zero)) + { + Store (Zero, CALE) + Store (UXDV (Arg2), Local0) + If (LNotEqual (Local0, 0xFF)) + { + Store (Local0, CADR) + } + + If (Arg1) + { + Store (One, CALE) + } + } + Else + { + If (LEqual (_T_0, One)) + { + Store (Zero, CBLE) + Store (UXDV (Arg2), Local0) + If (LNotEqual (Local0, 0xFF)) + { + Store (Local0, CBDR) + } + + If (Arg1) + { + Store (One, CBLE) + } + } + Else + { + If (LEqual (_T_0, 0x02)) + { + Store (Zero, LTLE) + If (LEqual (Arg2, 0x0378)) + { + Store (Zero, LTDR) + } + + If (LEqual (Arg2, 0x0278)) + { + Store (One, LTDR) + } + + If (LEqual (Arg2, 0x03BC)) + { + Store (0x02, LTDR) + } + + If (Arg1) + { + Store (One, LTLE) + } + } + Else + { + If (LEqual (_T_0, 0x03)) + { + Store (Zero, FDLE) + If (LEqual (Arg2, 0x03F0)) + { + Store (Zero, FDDR) + } + + If (LEqual (Arg2, 0x0370)) + { + Store (One, FDDR) + } + + If (Arg1) + { + Store (One, FDLE) + } + } + Else + { + If (LEqual (_T_0, 0x08)) + { + If (LEqual (Arg2, 0x0200)) + { + If (Arg1) + { + Store (One, GLLE) + } + Else + { + Store (Zero, GLLE) + } + } + + If (LEqual (Arg2, 0x0208)) + { + If (Arg1) + { + Store (One, GHLE) + } + Else + { + Store (Zero, GHLE) + } + } + } + Else + { + If (LEqual (_T_0, 0x09)) + { + If (LEqual (Arg2, 0x0200)) + { + If (Arg1) + { + Store (One, GLLE) + } + Else + { + Store (Zero, GLLE) + } + } + + If (LEqual (Arg2, 0x0208)) + { + If (Arg1) + { + Store (One, GHLE) + } + Else + { + Store (Zero, GHLE) + } + } + } + Else + { + If (LEqual (_T_0, 0x0A)) + { + If (LOr (LEqual (Arg2, 0x60), LEqual (Arg2, 0x64))) + { + If (Arg1) + { + Store (One, KCLE) + } + Else + { + Store (Zero, KCLE) + } + } + } + Else + { + If (LEqual (_T_0, 0x0B)) + { + If (LOr (LEqual (Arg2, 0x62), LEqual (Arg2, 0x66))) + { + If (Arg1) + { + Store (One, MCLE) + } + Else + { + Store (Zero, MCLE) + } + } + } + Else + { + If (LEqual (_T_0, 0x0C)) + { + If (LEqual (Arg2, 0x2E)) + { + If (Arg1) + { + Store (One, C1LE) + } + Else + { + Store (Zero, C1LE) + } + } + + If (LEqual (Arg2, 0x4E)) + { + If (Arg1) + { + Store (One, C2LE) + } + Else + { + Store (Zero, C2LE) + } + } + } + Else + { + If (LEqual (_T_0, 0x0D)) + { + If (LEqual (Arg2, 0x2E)) + { + If (Arg1) + { + Store (One, C1LE) + } + Else + { + Store (Zero, C1LE) + } + } + + If (LEqual (Arg2, 0x4E)) + { + If (Arg1) + { + Store (One, C2LE) + } + Else + { + Store (Zero, C2LE) + } + } + } + } + } + } + } + } + } + } + } + } + } + + Method (RDMA, 3, NotSerialized) + { + } + + Scope (_SB.PCI0) + { + Method (NPTS, 1, NotSerialized) + { + } + + Method (NWAK, 1, NotSerialized) + { + } + } + + Scope (_SB.PCI0.PEG0) + { + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x09, 0x04)) + } + } + + Scope (_SB.PCI0.PEG0.PEGP) + { + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x09, 0x04)) + } + } + + Scope (_SB.PCI0.PEG1) + { + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x09, 0x04)) + } + } + + Scope (_SB.PCI0.PEG2) + { + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x09, 0x04)) + } + } + + Scope (_SB.PCI0.PEG3) + { + Method (_PRW, 0, NotSerialized) + { + Return (GPRW (0x09, 0x04)) + } + } + + Scope (_SB.PCI0) + { + Device (GFX0) + { + Name (_ADR, 0x00020000) + Method (PCPC, 0, NotSerialized) + { + If (ECON) + { + Store (0x02, ^^LPCB.H_EC.SLPC) + } + + ECST (0x6F) + } + + Method (PAPR, 0, NotSerialized) + { + If (ECON) + { + Return (Divide (^^LPCB.H_EC.MCAP, 0x64, )) + } + Else + { + Return (Zero) + } + } + + Method (_DOS, 1, NotSerialized) + { + Store (And (Arg0, 0x07), DSEN) + If (LEqual (And (Arg0, 0x03), Zero)) + { + If (CondRefOf (HDOS)) + { + HDOS () + } + } + } + + Method (_DOD, 0, NotSerialized) + { + If (CondRefOf (IDAB)) + { + IDAB () + } + Else + { + Store (Zero, NDID) + If (LNotEqual (DIDL, Zero)) + { + Store (SDDL (DIDL), DID1) + } + + If (LNotEqual (DDL2, Zero)) + { + Store (SDDL (DDL2), DID2) + } + + If (LNotEqual (DDL3, Zero)) + { + Store (SDDL (DDL3), DID3) + } + + If (LNotEqual (DDL4, Zero)) + { + Store (SDDL (DDL4), DID4) + } + + If (LNotEqual (DDL5, Zero)) + { + Store (SDDL (DDL5), DID5) + } + + If (LNotEqual (DDL6, Zero)) + { + Store (SDDL (DDL6), DID6) + } + + If (LNotEqual (DDL7, Zero)) + { + Store (SDDL (DDL7), DID7) + } + + If (LNotEqual (DDL8, Zero)) + { + Store (SDDL (DDL8), DID8) + } + } + + If (LEqual (NDID, One)) + { + Name (TMP1, Package (0x01) + { + 0xFFFFFFFF + }) + Store (Or (0x00010000, DID1), Index (TMP1, Zero)) + Return (TMP1) + } + + If (LEqual (NDID, 0x02)) + { + Name (TMP2, Package (0x02) + { + 0xFFFFFFFF, + 0xFFFFFFFF + }) + Store (Or (0x00010000, DID1), Index (TMP2, Zero)) + Store (Or (0x00010000, DID2), Index (TMP2, One)) + Return (TMP2) + } + + If (LEqual (NDID, 0x03)) + { + Name (TMP3, Package (0x03) + { + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF + }) + Store (Or (0x00010000, DID1), Index (TMP3, Zero)) + Store (Or (0x00010000, DID2), Index (TMP3, One)) + Store (Or (0x00010000, DID3), Index (TMP3, 0x02)) + Return (TMP3) + } + + If (LEqual (NDID, 0x04)) + { + Name (TMP4, Package (0x04) + { + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF + }) + Store (Or (0x00010000, DID1), Index (TMP4, Zero)) + Store (Or (0x00010000, DID2), Index (TMP4, One)) + Store (Or (0x00010000, DID3), Index (TMP4, 0x02)) + Store (Or (0x00010000, DID4), Index (TMP4, 0x03)) + Return (TMP4) + } + + If (LEqual (NDID, 0x05)) + { + Name (TMP5, Package (0x05) + { + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF + }) + Store (Or (0x00010000, DID1), Index (TMP5, Zero)) + Store (Or (0x00010000, DID2), Index (TMP5, One)) + Store (Or (0x00010000, DID3), Index (TMP5, 0x02)) + Store (Or (0x00010000, DID4), Index (TMP5, 0x03)) + Store (Or (0x00010000, DID5), Index (TMP5, 0x04)) + Return (TMP5) + } + + If (LEqual (NDID, 0x06)) + { + Name (TMP6, Package (0x06) + { + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF + }) + Store (Or (0x00010000, DID1), Index (TMP6, Zero)) + Store (Or (0x00010000, DID2), Index (TMP6, One)) + Store (Or (0x00010000, DID3), Index (TMP6, 0x02)) + Store (Or (0x00010000, DID4), Index (TMP6, 0x03)) + Store (Or (0x00010000, DID5), Index (TMP6, 0x04)) + Store (Or (0x00010000, DID6), Index (TMP6, 0x05)) + Return (TMP6) + } + + If (LEqual (NDID, 0x07)) + { + Name (TMP7, Package (0x07) + { + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF + }) + Store (Or (0x00010000, DID1), Index (TMP7, Zero)) + Store (Or (0x00010000, DID2), Index (TMP7, One)) + Store (Or (0x00010000, DID3), Index (TMP7, 0x02)) + Store (Or (0x00010000, DID4), Index (TMP7, 0x03)) + Store (Or (0x00010000, DID5), Index (TMP7, 0x04)) + Store (Or (0x00010000, DID6), Index (TMP7, 0x05)) + Store (Or (0x00010000, DID7), Index (TMP7, 0x06)) + Return (TMP7) + } + + If (LEqual (NDID, 0x08)) + { + Name (TMP8, Package (0x08) + { + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF + }) + Store (Or (0x00010000, DID1), Index (TMP8, Zero)) + Store (Or (0x00010000, DID2), Index (TMP8, One)) + Store (Or (0x00010000, DID3), Index (TMP8, 0x02)) + Store (Or (0x00010000, DID4), Index (TMP8, 0x03)) + Store (Or (0x00010000, DID5), Index (TMP8, 0x04)) + Store (Or (0x00010000, DID6), Index (TMP8, 0x05)) + Store (Or (0x00010000, DID7), Index (TMP8, 0x06)) + Store (Or (0x00010000, DID8), Index (TMP8, 0x07)) + Return (TMP8) + } + + If (LEqual (NDID, 0x09)) + { + If (CondRefOf (HWID)) + { + Return (HWID) + } + } + + Return (Package (0x01) + { + 0x0400 + }) + } + + Device (DD01) + { + Method (_ADR, 0, Serialized) + { + If (LEqual (DID1, Zero)) + { + Return (One) + } + Else + { + Return (And (0xFFFF, DID1)) + } + } + + Method (_DCS, 0, NotSerialized) + { + Return (CDDS (DID1)) + } + + Method (_DGS, 0, NotSerialized) + { + If (LAnd (LEqual (And (SGMD, 0x7F), One), CondRefOf (SNXD + ))) + { + Return (NXD1) + } + + Return (NDDS (DID1)) + } + + Method (_DSS, 1, NotSerialized) + { + If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) + { + Store (NSTE, CSTE) + } + } + } + + Device (DD02) + { + Method (_ADR, 0, Serialized) + { + If (LEqual (DID2, Zero)) + { + Return (0x02) + } + Else + { + Return (And (0xFFFF, DID2)) + } + } + + Method (_DCS, 0, NotSerialized) + { + If (LEqual (LIDS, Zero)) + { + Return (Zero) + } + + Return (CDDS (DID2)) + } + + Method (_DGS, 0, NotSerialized) + { + If (LAnd (LEqual (And (SGMD, 0x7F), One), CondRefOf (SNXD + ))) + { + Return (NXD2) + } + + Return (NDDS (DID2)) + } + + Method (_DSS, 1, NotSerialized) + { + If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) + { + Store (NSTE, CSTE) + } + } + + Method (_BCL, 0, NotSerialized) + { + Return (Package (0x17) + { + 0x50, + 0x32, + Zero, + 0x05, + 0x0A, + 0x0F, + 0x14, + 0x19, + 0x1E, + 0x23, + 0x28, + 0x2D, + 0x32, + 0x37, + 0x3C, + 0x41, + 0x46, + 0x4B, + 0x50, + 0x55, + 0x5A, + 0x5F, + 0x64 + }) + } + + Method (_BCM, 1, NotSerialized) + { + If (LAnd (LGreaterEqual (Arg0, Zero), LLessEqual (Arg0, 0x64))) + { + AINT (One, Arg0) + Store (Arg0, BRTL) + } + } + + Method (_BQC, 0, NotSerialized) + { + Return (BRTL) + } + } + + Device (DD03) + { + Method (_ADR, 0, Serialized) + { + If (LEqual (DID3, Zero)) + { + Return (0x03) + } + Else + { + Return (And (0xFFFF, DID3)) + } + } + + Method (_DCS, 0, NotSerialized) + { + If (LEqual (DID3, Zero)) + { + Return (0x0B) + } + Else + { + Return (CDDS (DID3)) + } + } + + Method (_DGS, 0, NotSerialized) + { + If (LAnd (LEqual (And (SGMD, 0x7F), One), CondRefOf (SNXD + ))) + { + Return (NXD3) + } + + Return (NDDS (DID3)) + } + + Method (_DSS, 1, NotSerialized) + { + If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) + { + Store (NSTE, CSTE) + } + } + } + + Device (DD04) + { + Method (_ADR, 0, Serialized) + { + If (LEqual (DID4, Zero)) + { + Return (0x04) + } + Else + { + Return (And (0xFFFF, DID4)) + } + } + + Method (_DCS, 0, NotSerialized) + { + If (LEqual (DID4, Zero)) + { + Return (0x0B) + } + Else + { + Return (CDDS (DID4)) + } + } + + Method (_DGS, 0, NotSerialized) + { + If (LAnd (LEqual (And (SGMD, 0x7F), One), CondRefOf (SNXD + ))) + { + Return (NXD4) + } + + Return (NDDS (DID4)) + } + + Method (_DSS, 1, NotSerialized) + { + If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) + { + Store (NSTE, CSTE) + } + } + } + + Device (DD05) + { + Method (_ADR, 0, Serialized) + { + If (LEqual (DID5, Zero)) + { + Return (0x05) + } + Else + { + Return (And (0xFFFF, DID5)) + } + } + + Method (_DCS, 0, NotSerialized) + { + If (LEqual (DID5, Zero)) + { + Return (0x0B) + } + Else + { + Return (CDDS (DID5)) + } + } + + Method (_DGS, 0, NotSerialized) + { + If (LAnd (LEqual (And (SGMD, 0x7F), One), CondRefOf (SNXD + ))) + { + Return (NXD5) + } + + Return (NDDS (DID5)) + } + + Method (_DSS, 1, NotSerialized) + { + If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) + { + Store (NSTE, CSTE) + } + } + } + + Device (DD06) + { + Method (_ADR, 0, Serialized) + { + If (LEqual (DID6, Zero)) + { + Return (0x06) + } + Else + { + Return (And (0xFFFF, DID6)) + } + } + + Method (_DCS, 0, NotSerialized) + { + If (LEqual (DID6, Zero)) + { + Return (0x0B) + } + Else + { + Return (CDDS (DID6)) + } + } + + Method (_DGS, 0, NotSerialized) + { + If (LAnd (LEqual (And (SGMD, 0x7F), One), CondRefOf (SNXD + ))) + { + Return (NXD6) + } + + Return (NDDS (DID6)) + } + + Method (_DSS, 1, NotSerialized) + { + If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) + { + Store (NSTE, CSTE) + } + } + } + + Device (DD07) + { + Method (_ADR, 0, Serialized) + { + If (LEqual (DID7, Zero)) + { + Return (0x07) + } + Else + { + Return (And (0xFFFF, DID7)) + } + } + + Method (_DCS, 0, NotSerialized) + { + If (LEqual (DID7, Zero)) + { + Return (0x0B) + } + Else + { + Return (CDDS (DID7)) + } + } + + Method (_DGS, 0, NotSerialized) + { + If (LAnd (LEqual (And (SGMD, 0x7F), One), CondRefOf (SNXD + ))) + { + Return (NXD7) + } + + Return (NDDS (DID7)) + } + + Method (_DSS, 1, NotSerialized) + { + If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) + { + Store (NSTE, CSTE) + } + } + } + + Device (DD08) + { + Method (_ADR, 0, Serialized) + { + If (LEqual (DID8, Zero)) + { + Return (0x08) + } + Else + { + Return (And (0xFFFF, DID8)) + } + } + + Method (_DCS, 0, NotSerialized) + { + If (LEqual (DID8, Zero)) + { + Return (0x0B) + } + Else + { + Return (CDDS (DID8)) + } + } + + Method (_DGS, 0, NotSerialized) + { + If (LAnd (LEqual (And (SGMD, 0x7F), One), CondRefOf (SNXD + ))) + { + Return (NXD8) + } + + Return (NDDS (DID8)) + } + + Method (_DSS, 1, NotSerialized) + { + If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) + { + Store (NSTE, CSTE) + } + } + } + + Method (SDDL, 1, NotSerialized) + { + Increment (NDID) + Store (And (Arg0, 0x0F0F), Local0) + Or (0x80000000, Local0, Local1) + If (LEqual (DIDL, Local0)) + { + Return (Local1) + } + + If (LEqual (DDL2, Local0)) + { + Return (Local1) + } + + If (LEqual (DDL3, Local0)) + { + Return (Local1) + } + + If (LEqual (DDL4, Local0)) + { + Return (Local1) + } + + If (LEqual (DDL5, Local0)) + { + Return (Local1) + } + + If (LEqual (DDL6, Local0)) + { + Return (Local1) + } + + If (LEqual (DDL7, Local0)) + { + Return (Local1) + } + + If (LEqual (DDL8, Local0)) + { + Return (Local1) + } + + Return (Zero) + } + + Method (CDDS, 1, NotSerialized) + { + Store (And (Arg0, 0x0F0F), Local0) + If (LEqual (Zero, Local0)) + { + Return (0x1D) + } + + If (LEqual (CADL, Local0)) + { + Return (0x1F) + } + + If (LEqual (CAL2, Local0)) + { + Return (0x1F) + } + + If (LEqual (CAL3, Local0)) + { + Return (0x1F) + } + + If (LEqual (CAL4, Local0)) + { + Return (0x1F) + } + + If (LEqual (CAL5, Local0)) + { + Return (0x1F) + } + + If (LEqual (CAL6, Local0)) + { + Return (0x1F) + } + + If (LEqual (CAL7, Local0)) + { + Return (0x1F) + } + + If (LEqual (CAL8, Local0)) + { + Return (0x1F) + } + + Return (0x1D) + } + + Method (NDDS, 1, NotSerialized) + { + Store (And (Arg0, 0x0F0F), Local0) + If (LEqual (Zero, Local0)) + { + Return (Zero) + } + + If (LEqual (NADL, Local0)) + { + Return (One) + } + + If (LEqual (NDL2, Local0)) + { + Return (One) + } + + If (LEqual (NDL3, Local0)) + { + Return (One) + } + + If (LEqual (NDL4, Local0)) + { + Return (One) + } + + If (LEqual (NDL5, Local0)) + { + Return (One) + } + + If (LEqual (NDL6, Local0)) + { + Return (One) + } + + If (LEqual (NDL7, Local0)) + { + Return (One) + } + + If (LEqual (NDL8, Local0)) + { + Return (One) + } + + Return (Zero) + } + + Scope (^^PCI0) + { + OperationRegion (MCHP, PCI_Config, 0x40, 0xC0) + Field (MCHP, AnyAcc, NoLock, Preserve) + { + Offset (0x60), + TASM, 10, + Offset (0x62) + } + } + + OperationRegion (IGDP, PCI_Config, 0x40, 0xC0) + Field (IGDP, AnyAcc, NoLock, Preserve) + { + Offset (0x12), + , 1, + GIVD, 1, + , 2, + GUMA, 3, + Offset (0x14), + , 4, + GMFN, 1, + Offset (0x18), + Offset (0xA4), + ASLE, 8, + Offset (0xA8), + GSSE, 1, + GSSB, 14, + GSES, 1, + Offset (0xB0), + , 12, + CDVL, 1, + Offset (0xB2), + Offset (0xB5), + LBPC, 8, + Offset (0xBC), + ASLS, 32 + } + + OperationRegion (IGDM, SystemMemory, ASLB, 0x2000) + Field (IGDM, AnyAcc, NoLock, Preserve) + { + SIGN, 128, + SIZE, 32, + OVER, 32, + SVER, 256, + VVER, 128, + GVER, 128, + MBOX, 32, + DMOD, 32, + Offset (0x100), + DRDY, 32, + CSTS, 32, + CEVT, 32, + Offset (0x120), + DIDL, 32, + DDL2, 32, + DDL3, 32, + DDL4, 32, + DDL5, 32, + DDL6, 32, + DDL7, 32, + DDL8, 32, + CPDL, 32, + CPL2, 32, + CPL3, 32, + CPL4, 32, + CPL5, 32, + CPL6, 32, + CPL7, 32, + CPL8, 32, + CADL, 32, + CAL2, 32, + CAL3, 32, + CAL4, 32, + CAL5, 32, + CAL6, 32, + CAL7, 32, + CAL8, 32, + NADL, 32, + NDL2, 32, + NDL3, 32, + NDL4, 32, + NDL5, 32, + NDL6, 32, + NDL7, 32, + NDL8, 32, + ASLP, 32, + TIDX, 32, + CHPD, 32, + CLID, 32, + CDCK, 32, + SXSW, 32, + EVTS, 32, + CNOT, 32, + NRDY, 32, + Offset (0x200), + SCIE, 1, + GEFC, 4, + GXFC, 3, + GESF, 8, + Offset (0x204), + PARM, 32, + DSLP, 32, + Offset (0x300), + ARDY, 32, + ASLC, 32, + TCHE, 32, + ALSI, 32, + BCLP, 32, + PFIT, 32, + CBLV, 32, + BCLM, 320, + CPFM, 32, + EPFM, 32, + PLUT, 592, + PFMB, 32, + CCDV, 32, + PCFT, 32, + Offset (0x400), + GVD1, 49152, + PHED, 32, + BDDC, 2048 + } + + Name (DBTB, Package (0x15) + { + Zero, + 0x07, + 0x38, + 0x01C0, + 0x0E00, + 0x3F, + 0x01C7, + 0x0E07, + 0x01F8, + 0x0E38, + 0x0FC0, + Zero, + Zero, + Zero, + Zero, + Zero, + 0x7000, + 0x7007, + 0x7038, + 0x71C0, + 0x7E00 + }) + Name (CDCT, Package (0x05) + { + Package (0x02) + { + 0xE4, + 0x0140 + }, + + Package (0x02) + { + 0xDE, + 0x014D + }, + + Package (0x02) + { + 0xDE, + 0x014D + }, + + Package (0x02) + { + Zero, + Zero + }, + + Package (0x02) + { + 0xDE, + 0x014D + } + }) + Name (SUCC, One) + Name (NVLD, 0x02) + Name (CRIT, 0x04) + Name (NCRT, 0x06) + Method (GSCI, 0, Serialized) + { + Method (GBDA, 0, Serialized) + { + If (LEqual (GESF, Zero)) + { + Store (0x0679, PARM) + Store (Zero, GESF) + Return (SUCC) + } + + If (LEqual (GESF, One)) + { + Store (0x0240, PARM) + Store (Zero, GESF) + Return (SUCC) + } + + If (LEqual (GESF, 0x04)) + { + And (PARM, 0xEFFF0000, PARM) + And (PARM, ShiftLeft (DerefOf (Index (DBTB, IBTT)), 0x10), + PARM) + Or (IBTT, PARM, PARM) + Store (Zero, GESF) + Return (SUCC) + } + + If (LEqual (GESF, 0x05)) + { + Store (IPSC, PARM) + Or (PARM, ShiftLeft (IPAT, 0x08), PARM) + Add (PARM, 0x0100, PARM) + Or (PARM, ShiftLeft (LIDS, 0x10), PARM) + Add (PARM, 0x00010000, PARM) + Or (PARM, ShiftLeft (IBIA, 0x14), PARM) + Store (Zero, GESF) + Return (SUCC) + } + + If (LEqual (GESF, 0x06)) + { + Store (ITVF, PARM) + Or (PARM, ShiftLeft (ITVM, 0x04), PARM) + Store (Zero, GESF) + Return (SUCC) + } + + If (LEqual (GESF, 0x07)) + { + Store (GIVD, PARM) + XOr (PARM, One, PARM) + Or (PARM, ShiftLeft (GMFN, One), PARM) + Or (PARM, 0x1800, PARM) + Or (PARM, ShiftLeft (IDMS, 0x11), PARM) + Or (ShiftLeft (DerefOf (Index (DerefOf (Index (CDCT, HVCO)), CDVL + )), 0x15), PARM, PARM) + Store (One, GESF) + Return (SUCC) + } + + If (LEqual (GESF, 0x0A)) + { + Store (Zero, PARM) + If (ISSC) + { + Or (PARM, 0x03, PARM) + } + + Store (Zero, GESF) + Return (SUCC) + } + + If (LEqual (GESF, 0x0B)) + { + Store (KSV0, PARM) + Store (KSV1, GESF) + Return (SUCC) + } + + Store (Zero, GESF) + Return (CRIT) + } + + Method (SBCB, 0, Serialized) + { + If (LEqual (GESF, Zero)) + { + Store (Zero, PARM) + Store (0x000F87FD, PARM) + Store (Zero, GESF) + Return (SUCC) + } + + If (LEqual (GESF, One)) + { + Store (Zero, GESF) + Store (Zero, PARM) + Return (SUCC) + } + + If (LEqual (GESF, 0x03)) + { + Store (Zero, GESF) + Store (Zero, PARM) + Return (SUCC) + } + + If (LEqual (GESF, 0x04)) + { + Store (Zero, GESF) + Store (Zero, PARM) + Return (SUCC) + } + + If (LEqual (GESF, 0x05)) + { + Store (Zero, GESF) + Store (Zero, PARM) + Return (SUCC) + } + + If (LEqual (GESF, 0x06)) + { + Store (And (PARM, 0x0F), ITVF) + Store (ShiftRight (And (PARM, 0xF0), 0x04), ITVM) + Store (Zero, GESF) + Store (Zero, PARM) + Return (SUCC) + } + + If (LEqual (GESF, 0x07)) + { + If (LEqual (PARM, Zero)) + { + Store (CLID, Local0) + If (And (0x80000000, Local0)) + { + And (CLID, 0x0F, CLID) + GLID (CLID) + } + } + + Store (Zero, GESF) + Store (Zero, PARM) + Return (SUCC) + } + + If (LEqual (GESF, 0x08)) + { + Store (Zero, GESF) + Store (Zero, PARM) + Return (SUCC) + } + + If (LEqual (GESF, 0x09)) + { + And (PARM, 0xFF, IBTT) + Store (Zero, GESF) + Store (Zero, PARM) + Return (SUCC) + } + + If (LEqual (GESF, 0x0A)) + { + And (PARM, 0xFF, IPSC) + If (And (ShiftRight (PARM, 0x08), 0xFF)) + { + And (ShiftRight (PARM, 0x08), 0xFF, IPAT) + Decrement (IPAT) + } + + And (ShiftRight (PARM, 0x14), 0x07, IBIA) + Store (Zero, GESF) + Store (Zero, PARM) + Return (SUCC) + } + + If (LEqual (GESF, 0x0B)) + { + And (ShiftRight (PARM, One), One, IF1E) + If (And (PARM, 0x0001E000)) + { + And (ShiftRight (PARM, 0x0D), 0x0F, IDMS) + } + Else + { + And (ShiftRight (PARM, 0x11), 0x0F, IDMS) + } + + Store (Zero, GESF) + Store (Zero, PARM) + Return (SUCC) + } + + If (LEqual (GESF, 0x10)) + { + Store (Zero, GESF) + Store (Zero, PARM) + Return (SUCC) + } + + If (LEqual (GESF, 0x11)) + { + Store (ShiftLeft (LIDS, 0x08), PARM) + Add (PARM, 0x0100, PARM) + Store (Zero, GESF) + Return (SUCC) + } + + If (LEqual (GESF, 0x12)) + { + If (And (PARM, One)) + { + If (LEqual (ShiftRight (PARM, One), One)) + { + Store (One, ISSC) + } + Else + { + Store (Zero, GESF) + Return (CRIT) + } + } + Else + { + Store (Zero, ISSC) + } + + Store (Zero, GESF) + Store (Zero, PARM) + Return (SUCC) + } + + If (LEqual (GESF, 0x13)) + { + Store (Zero, GESF) + Store (Zero, PARM) + Return (SUCC) + } + + If (LEqual (GESF, 0x14)) + { + And (PARM, 0x0F, PAVP) + Store (Zero, GESF) + Store (Zero, PARM) + Return (SUCC) + } + + Store (Zero, GESF) + Return (SUCC) + } + + If (LEqual (GEFC, 0x04)) + { + Store (GBDA (), GXFC) + } + + If (LEqual (GEFC, 0x06)) + { + Store (SBCB (), GXFC) + } + + Store (Zero, GEFC) + Store (One, SCIS) + Store (Zero, GSSE) + Store (Zero, SCIE) + Return (Zero) + } + + Method (PDRD, 0, NotSerialized) + { + If (LNot (DRDY)) + { + Sleep (ASLP) + } + + Return (LNot (DRDY)) + } + + Method (PSTS, 0, NotSerialized) + { + If (LGreater (CSTS, 0x02)) + { + Sleep (ASLP) + } + + Return (LEqual (CSTS, 0x03)) + } + + Method (GNOT, 2, NotSerialized) + { + If (PDRD ()) + { + Return (One) + } + + Store (Arg0, CEVT) + Store (0x03, CSTS) + If (LAnd (LEqual (CHPD, Zero), LEqual (Arg1, Zero))) + { + If (LOr (LGreater (OSYS, 0x07D0), LLess (OSYS, 0x07D6))) + { + Notify (PCI0, Arg1) + } + Else + { + Notify (GFX0, Arg1) + } + } + + If (CondRefOf (HNOT)) + { + HNOT (Arg0) + } + Else + { + Notify (GFX0, 0x80) + } + + Return (Zero) + } + + Method (GHDS, 1, NotSerialized) + { + Store (Arg0, TIDX) + Return (GNOT (One, Zero)) + } + + Method (GLID, 1, NotSerialized) + { + If (LEqual (Arg0, One)) + { + Store (0x03, CLID) + } + Else + { + Store (Arg0, CLID) + } + + Return (GNOT (0x02, Zero)) + } + + Method (GDCK, 1, NotSerialized) + { + Store (Arg0, CDCK) + Return (GNOT (0x04, Zero)) + } + + Method (PARD, 0, NotSerialized) + { + If (LNot (ARDY)) + { + Sleep (ASLP) + } + + Return (LNot (ARDY)) + } + + Method (AINT, 2, NotSerialized) + { + If (LNot (And (TCHE, ShiftLeft (One, Arg0)))) + { + Return (One) + } + + If (PARD ()) + { + Return (One) + } + + If (LEqual (Arg0, 0x02)) + { + If (CPFM) + { + And (CPFM, 0x0F, Local0) + And (EPFM, 0x0F, Local1) + If (LEqual (Local0, One)) + { + If (And (Local1, 0x06)) + { + Store (0x06, PFIT) + } + Else + { + If (And (Local1, 0x08)) + { + Store (0x08, PFIT) + } + Else + { + Store (One, PFIT) + } + } + } + + If (LEqual (Local0, 0x06)) + { + If (And (Local1, 0x08)) + { + Store (0x08, PFIT) + } + Else + { + If (And (Local1, One)) + { + Store (One, PFIT) + } + Else + { + Store (0x06, PFIT) + } + } + } + + If (LEqual (Local0, 0x08)) + { + If (And (Local1, One)) + { + Store (One, PFIT) + } + Else + { + If (And (Local1, 0x06)) + { + Store (0x06, PFIT) + } + Else + { + Store (0x08, PFIT) + } + } + } + } + Else + { + XOr (PFIT, 0x07, PFIT) + } + + Or (PFIT, 0x80000000, PFIT) + Store (0x04, ASLC) + } + Else + { + If (LEqual (Arg0, One)) + { + Store (Divide (Multiply (Arg1, 0xFF), 0x64, ), BCLP) + Or (BCLP, 0x80000000, BCLP) + Store (0x02, ASLC) + } + Else + { + If (LEqual (Arg0, Zero)) + { + Store (Arg1, ALSI) + Store (One, ASLC) + } + Else + { + Return (One) + } + } + } + + Store (One, ASLE) + Return (Zero) + } + + Method (SCIP, 0, NotSerialized) + { + If (LNotEqual (OVER, Zero)) + { + Return (LNot (GSMI)) + } + + Return (Zero) + } + + Device (^^MEM2) + { + Name (_HID, EisaId ("PNP0C01")) + Name (_UID, 0x02) + Name (CRS1, ResourceTemplate () + { + Memory32Fixed (ReadWrite, + 0x20000000, // Address Base + 0x00200000, // Address Length + ) + Memory32Fixed (ReadWrite, + 0x40000000, // Address Base + 0x00200000, // Address Length + ) + }) + Name (CRS2, ResourceTemplate () + { + Memory32Fixed (ReadWrite, + 0x20000000, // Address Base + 0x00200000, // Address Length + ) + Memory32Fixed (ReadWrite, + 0x40004000, // Address Base + 0x00001000, // Address Length + ) + }) + Method (_STA, 0, NotSerialized) + { + If (IGDS) + { + Return (0x0F) + } + + Return (Zero) + } + + Method (_CRS, 0, NotSerialized) + { + If (LOr (LEqual (And (PNHM, 0x0FFF0FF0), 0x000206A0), LEqual (And ( + PNHM, 0x0FFF0FFF), 0x000306A0))) + { + Return (CRS1) + } + + Return (CRS2) + } + } + } + } + + Scope (_PR) + { + Processor (CPU0, 0x01, 0x00000410, 0x06) {} + Processor (CPU1, 0x02, 0x00000410, 0x06) {} + Processor (CPU2, 0x03, 0x00000410, 0x06) {} + Processor (CPU3, 0x04, 0x00000410, 0x06) {} + Processor (CPU4, 0x05, 0x00000410, 0x06) {} + Processor (CPU5, 0x06, 0x00000410, 0x06) {} + Processor (CPU6, 0x07, 0x00000410, 0x06) {} + Processor (CPU7, 0x08, 0x00000410, 0x06) {} + } + + Mutex (MUTX, 0x00) + OperationRegion (DEB0, SystemIO, 0x80, One) + Field (DEB0, ByteAcc, NoLock, Preserve) + { + DBG8, 8 + } + + OperationRegion (DEB1, SystemIO, 0x90, 0x02) + Field (DEB1, WordAcc, NoLock, Preserve) + { + DBG9, 16 + } + + OperationRegion (PRT0, SystemIO, 0x80, 0x04) + Field (PRT0, DWordAcc, Lock, Preserve) + { + P80H, 32 + } + + Method (P8XH, 2, Serialized) + { + If (LEqual (Arg0, Zero)) + { + Store (Or (And (P80D, 0xFFFFFF00), Arg1), P80D) + } + + If (LEqual (Arg0, One)) + { + Store (Or (And (P80D, 0xFFFF00FF), ShiftLeft (Arg1, 0x08) + ), P80D) + } + + If (LEqual (Arg0, 0x02)) + { + Store (Or (And (P80D, 0xFF00FFFF), ShiftLeft (Arg1, 0x10) + ), P80D) + } + + If (LEqual (Arg0, 0x03)) + { + Store (Or (And (P80D, 0x00FFFFFF), ShiftLeft (Arg1, 0x18) + ), P80D) + } + + Store (P80D, P80H) + } + + OperationRegion (SPRT, SystemIO, 0xB2, 0x02) + Field (SPRT, ByteAcc, Lock, Preserve) + { + SSMP, 8 + } + + Method (_PIC, 1, NotSerialized) + { + Store (Arg0, GPIC) + Store (Arg0, PICM) + } + + Method (_PTS, 1, NotSerialized) + { + Store (Zero, P80D) + P8XH (Zero, Arg0) + PTS (Arg0) + If (LEqual (Arg0, 0x03)) + { + If (LAnd (DTSE, LGreater (TCNT, One))) + { + TRAP (TRTD, 0x1E) + } + } + + If (LOr (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04)), LEqual ( + Arg0, 0x05))) + { + If (LEqual (PFLV, FDTP)) + { + Store (One, GP27) + } + } + } + + Method (_WAK, 1, Serialized) + { + ShiftLeft (Arg0, 0x04, DBG8) + WAK (Arg0) + If (NEXP) + { + If (And (OSCC, 0x02)) + { + \_SB.PCI0.NHPG () + } + + If (And (OSCC, 0x04)) + { + \_SB.PCI0.NPME () + } + } + + If (LEqual (Arg0, 0x03)) + { + If (LEqual (Zero, ACTT)) + { + If (LEqual (ECON, One)) + { + Store (Zero, \_SB.PCI0.LPCB.H_EC.CFAN) + } + } + } + + If (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04))) + { + If (LAnd (DTSE, LGreater (TCNT, One))) + { + TRAP (TRTD, 0x14) + } + + If (LEqual (OSYS, 0x07D2)) + { + If (And (CFGD, One)) + { + If (LGreater (\_PR.CPU0._PPC, Zero)) + { + Subtract (\_PR.CPU0._PPC, One, \_PR.CPU0._PPC) + PNOT () + Add (\_PR.CPU0._PPC, One, \_PR.CPU0._PPC) + PNOT () + } + Else + { + Add (\_PR.CPU0._PPC, One, \_PR.CPU0._PPC) + PNOT () + Subtract (\_PR.CPU0._PPC, One, \_PR.CPU0._PPC) + PNOT () + } + } + } + + If (LEqual (ECON, One)) + { + If (LNotEqual (LIDS, \_SB.PCI0.LPCB.H_EC.LSTE)) + { + Store (\_SB.PCI0.LPCB.H_EC.LSTE, LIDS) + If (IGDS) + { + If (\_SB.PCI0.GFX0.GLID (LIDS)) + { + Or (0x80000000, \_SB.PCI0.GFX0.CLID, \_SB.PCI0.GFX0.CLID) + } + } + + Notify (\_SB.LID0, 0x80) + } + + If (LNotEqual (\_SB.PCI0.LPCB.H_EC.DOCK, DSTS)) + { + Store (\_SB.PCI0.LPCB.H_EC.DOCK, DSTS) + If (LAnd (\_SB.PCI0.HDEF.DCKS, One)) + { + Store (DSTS, \_SB.PCI0.HDEF.DCKA) + } + + If (LEqual (DSTS, One)) + { + If (LEqual (Arg0, 0x03)) + { + Sleep (0x03E8) + Store (PDBR, SSMP) + Sleep (0x03E8) + } + + Notify (\_SB.PCI0.DOCK, Zero) + } + Else + { + Notify (\_SB.PCI0.DOCK, One) + } + } + + If (LEqual (BNUM, Zero)) + { + If (LNotEqual (\_SB.PCI0.LPCB.H_EC.VPWR, PWRS)) + { + Store (\_SB.PCI0.LPCB.H_EC.VPWR, PWRS) + PNOT () + } + } + Else + { + If (LNotEqual (\_SB.PCI0.LPCB.H_EC.RPWR, PWRS)) + { + Store (\_SB.PCI0.LPCB.H_EC.RPWR, PWRS) + PNOT () + } + } + } + + If (LEqual (RP1D, Zero)) + { + Notify (\_SB.PCI0.RP01, Zero) + } + + If (LEqual (RP2D, Zero)) + { + Notify (\_SB.PCI0.RP02, Zero) + } + + If (LEqual (RP3D, Zero)) + { + Notify (\_SB.PCI0.RP03, Zero) + } + + If (LEqual (RP4D, Zero)) + { + Notify (\_SB.PCI0.RP04, Zero) + } + + If (LEqual (RP5D, Zero)) + { + Notify (\_SB.PCI0.RP05, Zero) + } + + If (LEqual (RP6D, Zero)) + { + Notify (\_SB.PCI0.RP06, Zero) + } + + If (LEqual (RP7D, Zero)) + { + If (LEqual (DSTS, Zero)) + { + Notify (\_SB.PCI0.RP07, Zero) + } + } + + If (LEqual (RP8D, Zero)) + { + If (LEqual (DSTS, Zero)) + { + Notify (\_SB.PCI0.RP08, Zero) + } + } + } + + Return (Package (0x02) + { + Zero, + Zero + }) + } + + Method (GETB, 3, Serialized) + { + Multiply (Arg0, 0x08, Local0) + Multiply (Arg1, 0x08, Local1) + CreateField (Arg2, Local0, Local1, TBF3) + Return (TBF3) + } + + Method (PNOT, 0, Serialized) + { + If (LGreater (TCNT, One)) + { + If (And (PDC0, 0x08)) + { + Notify (\_PR.CPU0, 0x80) + If (And (PDC0, 0x10)) + { + Sleep (0x64) + Notify (\_PR.CPU0, 0x81) + } + } + + If (And (PDC1, 0x08)) + { + Notify (\_PR.CPU1, 0x80) + If (And (PDC1, 0x10)) + { + Sleep (0x64) + Notify (\_PR.CPU1, 0x81) + } + } + + If (And (PDC2, 0x08)) + { + Notify (\_PR.CPU2, 0x80) + If (And (PDC2, 0x10)) + { + Sleep (0x64) + Notify (\_PR.CPU2, 0x81) + } + } + + If (And (PDC3, 0x08)) + { + Notify (\_PR.CPU3, 0x80) + If (And (PDC3, 0x10)) + { + Sleep (0x64) + Notify (\_PR.CPU3, 0x81) + } + } + + If (And (PDC4, 0x08)) + { + Notify (\_PR.CPU4, 0x80) + If (And (PDC4, 0x10)) + { + Sleep (0x64) + Notify (\_PR.CPU4, 0x81) + } + } + + If (And (PDC5, 0x08)) + { + Notify (\_PR.CPU5, 0x80) + If (And (PDC5, 0x10)) + { + Sleep (0x64) + Notify (\_PR.CPU5, 0x81) + } + } + + If (And (PDC6, 0x08)) + { + Notify (\_PR.CPU6, 0x80) + If (And (PDC6, 0x10)) + { + Sleep (0x64) + Notify (\_PR.CPU6, 0x81) + } + } + + If (And (PDC7, 0x08)) + { + Notify (\_PR.CPU7, 0x80) + If (And (PDC7, 0x10)) + { + Sleep (0x64) + Notify (\_PR.CPU7, 0x81) + } + } + } + Else + { + Notify (\_PR.CPU0, 0x80) + Sleep (0x64) + Notify (\_PR.CPU0, 0x81) + } + + If (LEqual (ECON, One)) + { + Store (\_SB.PCI0.LPCB.H_EC.B1CC, B1SC) + Store (\_SB.PCI0.LPCB.H_EC.B1ST, B1SS) + Store (\_SB.PCI0.LPCB.H_EC.B2CC, B2SC) + Store (\_SB.PCI0.LPCB.H_EC.B2ST, B2SS) + If (LGreaterEqual (OSYS, 0x07D6)) + { + Notify (\_SB.PCI0.LPCB.H_EC.BAT0, 0x81) + Notify (\_SB.PCI0.LPCB.H_EC.BAT1, 0x81) + Notify (\_SB.PCI0.LPCB.H_EC.BAT2, 0x81) + } + Else + { + Notify (\_SB.PCI0.LPCB.H_EC.BAT0, 0x80) + Notify (\_SB.PCI0.LPCB.H_EC.BAT1, 0x80) + Notify (\_SB.PCI0.LPCB.H_EC.BAT2, 0x80) + } + } + } + + Method (TRAP, 2, Serialized) + { + Store (Arg1, SMIF) + If (LEqual (Arg0, TRTP)) + { + Store (Zero, TRP0) + } + + If (LEqual (Arg0, TRTD)) + { + Store (Arg1, DTSF) + Store (Zero, TRPD) + Return (DTSF) + } + + If (LEqual (Arg0, TRTI)) + { + Store (Zero, TRPH) + } + + Return (SMIF) + } + + Scope (_SB.PCI0) + { + Method (_INI, 0, NotSerialized) + { + Store (0x07D0, OSYS) + If (CondRefOf (_OSI, Local0)) + { + If (_OSI ("Windows 2001")) + { + Store (0x07D1, OSYS) + } + + If (_OSI ("Windows 2001 SP1")) + { + Store (0x07D1, OSYS) + } + + If (_OSI ("Windows 2001 SP2")) + { + Store (0x07D2, OSYS) + } + + If (_OSI ("Windows 2001.1")) + { + Store (0x07D3, OSYS) + } + + If (_OSI ("Windows 2006")) + { + Store (0x07D6, OSYS) + } + + If (_OSI ("Windows 2009")) + { + Store (0x07D9, OSYS) + } + } + } + + Method (NHPG, 0, Serialized) + { + Store (Zero, ^RP01.HPEX) + Store (Zero, ^RP02.HPEX) + Store (Zero, ^RP03.HPEX) + Store (Zero, ^RP04.HPEX) + Store (One, ^RP01.HPSX) + Store (One, ^RP02.HPSX) + Store (One, ^RP03.HPSX) + Store (One, ^RP04.HPSX) + } + + Method (NPME, 0, Serialized) + { + Store (Zero, ^RP01.PMEX) + Store (Zero, ^RP02.PMEX) + Store (Zero, ^RP03.PMEX) + Store (Zero, ^RP04.PMEX) + Store (Zero, ^RP05.PMEX) + Store (Zero, ^RP06.PMEX) + Store (Zero, ^RP07.PMEX) + Store (Zero, ^RP08.PMEX) + Store (One, ^RP01.PMSX) + Store (One, ^RP02.PMSX) + Store (One, ^RP03.PMSX) + Store (One, ^RP04.PMSX) + Store (One, ^RP05.PMSX) + Store (One, ^RP06.PMSX) + Store (One, ^RP07.PMSX) + Store (One, ^RP08.PMSX) + } + } + + Scope (\) + { + Name (PICM, Zero) + Name (PRWP, Package (0x02) + { + Zero, + Zero + }) + Method (GPRW, 2, NotSerialized) + { + Store (Arg0, Index (PRWP, Zero)) + Store (ShiftLeft (SS1, One), Local0) + Or (Local0, ShiftLeft (SS2, 0x02), Local0) + Or (Local0, ShiftLeft (SS3, 0x03), Local0) + Or (Local0, ShiftLeft (SS4, 0x04), Local0) + If (And (ShiftLeft (One, Arg1), Local0)) + { + Store (Arg1, Index (PRWP, One)) + } + Else + { + ShiftRight (Local0, One, Local0) + FindSetLeftBit (Local0, Index (PRWP, One)) + } + + Return (PRWP) + } + } + + Scope (_SB.PCI0) + { + Device (PDRC) + { + Name (_HID, EisaId ("PNP0C02")) + Name (_UID, One) + Name (BUF0, ResourceTemplate () + { + Memory32Fixed (ReadWrite, + 0x00000000, // Address Base + 0x00004000, // Address Length + ) + Memory32Fixed (ReadWrite, + 0x00000000, // Address Base + 0x00008000, // Address Length + ) + Memory32Fixed (ReadWrite, + 0x00000000, // Address Base + 0x00001000, // Address Length + ) + Memory32Fixed (ReadWrite, + 0x00000000, // Address Base + 0x00001000, // Address Length + ) + Memory32Fixed (ReadWrite, + 0x00000000, // Address Base + 0x00000000, // Address Length + ) + Memory32Fixed (ReadWrite, + 0xFED20000, // Address Base + 0x00020000, // Address Length + ) + Memory32Fixed (ReadOnly, + 0xFED90000, // Address Base + 0x00004000, // Address Length + ) + Memory32Fixed (ReadWrite, + 0xFED45000, // Address Base + 0x0004B000, // Address Length + ) + Memory32Fixed (ReadOnly, + 0xFF000000, // Address Base + 0x01000000, // Address Length + ) + Memory32Fixed (ReadOnly, + 0xFEE00000, // Address Base + 0x00100000, // Address Length + ) + Memory32Fixed (ReadWrite, + 0x00000000, // Address Base + 0x00001000, // Address Length + ) + }) + Method (_CRS, 0, Serialized) + { + CreateDWordField (BUF0, 0x04, RBR0) + ShiftLeft (^^LPCB.RCBA, 0x0E, RBR0) + CreateDWordField (BUF0, 0x7C, TBR0) + Store (TBAB, TBR0) + CreateDWordField (BUF0, 0x80, TBLN) + If (LEqual (TBAB, Zero)) + { + Store (Zero, TBLN) + } + + CreateDWordField (BUF0, 0x10, MBR0) + ShiftLeft (MHBR, 0x0F, MBR0) + CreateDWordField (BUF0, 0x1C, DBR0) + ShiftLeft (DIBR, 0x0C, DBR0) + CreateDWordField (BUF0, 0x28, EBR0) + ShiftLeft (EPBR, 0x0C, EBR0) + CreateDWordField (BUF0, 0x34, XBR0) + ShiftLeft (PXBR, 0x1A, XBR0) + CreateDWordField (BUF0, 0x38, XSZ0) + ShiftRight (0x10000000, PXSZ, XSZ0) + Return (BUF0) + } + } + } + + Method (BRTN, 1, Serialized) + { + If (LEqual (And (DID1, 0x0F00), 0x0400)) + { + Notify (\_SB.PCI0.GFX0.DD01, Arg0) + } + + If (LEqual (And (DID2, 0x0F00), 0x0400)) + { + Notify (\_SB.PCI0.GFX0.DD02, Arg0) + } + + If (LEqual (And (DID3, 0x0F00), 0x0400)) + { + Notify (\_SB.PCI0.GFX0.DD03, Arg0) + } + + If (LEqual (And (DID4, 0x0F00), 0x0400)) + { + Notify (\_SB.PCI0.GFX0.DD04, Arg0) + } + + If (LEqual (And (DID5, 0x0F00), 0x0400)) + { + Notify (\_SB.PCI0.GFX0.DD05, Arg0) + } + + If (LEqual (And (DID6, 0x0F00), 0x0400)) + { + Notify (\_SB.PCI0.GFX0.DD06, Arg0) + } + + If (LEqual (And (DID7, 0x0F00), 0x0400)) + { + Notify (\_SB.PCI0.GFX0.DD07, Arg0) + } + + If (LEqual (And (DID8, 0x0F00), 0x0400)) + { + Notify (\_SB.PCI0.GFX0.DD08, Arg0) + } + } + + Scope (_GPE) + { + Method (_L09, 0, NotSerialized) + { + If (LEqual (RP1D, Zero)) + { + \_SB.PCI0.RP01.HPME () + Notify (\_SB.PCI0.RP01, 0x02) + } + + If (LEqual (RP2D, Zero)) + { + \_SB.PCI0.RP02.HPME () + Notify (\_SB.PCI0.RP02, 0x02) + } + + If (LEqual (RP3D, Zero)) + { + \_SB.PCI0.RP03.HPME () + Notify (\_SB.PCI0.RP03, 0x02) + } + + If (LEqual (RP4D, Zero)) + { + \_SB.PCI0.RP04.HPME () + Notify (\_SB.PCI0.RP04, 0x02) + } + + If (LEqual (RP5D, Zero)) + { + \_SB.PCI0.RP05.HPME () + Notify (\_SB.PCI0.RP05, 0x02) + } + + If (LEqual (RP6D, Zero)) + { + \_SB.PCI0.RP06.HPME () + Notify (\_SB.PCI0.RP06, 0x02) + } + + If (LEqual (RP7D, Zero)) + { + \_SB.PCI0.RP07.HPME () + Notify (\_SB.PCI0.RP07, 0x02) + } + + If (LEqual (RP8D, Zero)) + { + \_SB.PCI0.RP08.HPME () + Notify (\_SB.PCI0.RP08, 0x02) + } + + Notify (\_SB.PCI0.PEG0, 0x02) + Notify (\_SB.PCI0.PEG0.PEGP, 0x02) + Notify (\_SB.PCI0.PEG1, 0x02) + Notify (\_SB.PCI0.PEG2, 0x02) + Notify (\_SB.PCI0.PEG3, 0x02) + } + + Method (_L0D, 0, NotSerialized) + { + Notify (\_SB.PCI0.EHC1, 0x02) + Notify (\_SB.PCI0.EHC2, 0x02) + Notify (\_SB.PCI0.HDEF, 0x02) + Notify (\_SB.PCI0.GLAN, 0x02) + } + + Method (_L01, 0, NotSerialized) + { + Add (L01C, One, L01C) + P8XH (Zero, One) + P8XH (One, L01C) + If (LAnd (LEqual (RP1D, Zero), \_SB.PCI0.RP01.HPSX)) + { + Sleep (0x64) + If (\_SB.PCI0.RP01.PDCX) + { + Store (One, \_SB.PCI0.RP01.PDCX) + Store (One, \_SB.PCI0.RP01.HPSX) + If (LNot (\_SB.PCI0.RP01.PDSX)) + { + Store (Zero, \_SB.PCI0.RP01.L0SE) + } + + Notify (\_SB.PCI0.RP01, Zero) + } + Else + { + Store (One, \_SB.PCI0.RP01.HPSX) + } + } + + If (LAnd (LEqual (RP2D, Zero), \_SB.PCI0.RP02.HPSX)) + { + Sleep (0x64) + If (\_SB.PCI0.RP02.PDCX) + { + Store (One, \_SB.PCI0.RP02.PDCX) + Store (One, \_SB.PCI0.RP02.HPSX) + If (LNot (\_SB.PCI0.RP02.PDSX)) + { + Store (Zero, \_SB.PCI0.RP02.L0SE) + } + + Notify (\_SB.PCI0.RP02, Zero) + } + Else + { + Store (One, \_SB.PCI0.RP02.HPSX) + } + } + + If (LAnd (LEqual (RP3D, Zero), \_SB.PCI0.RP03.HPSX)) + { + Sleep (0x64) + If (\_SB.PCI0.RP03.PDCX) + { + Store (One, \_SB.PCI0.RP03.PDCX) + Store (One, \_SB.PCI0.RP03.HPSX) + If (LNot (\_SB.PCI0.RP03.PDSX)) + { + Store (Zero, \_SB.PCI0.RP03.L0SE) + } + + Notify (\_SB.PCI0.RP03, Zero) + } + Else + { + Store (One, \_SB.PCI0.RP03.HPSX) + } + } + + If (LAnd (LEqual (RP4D, Zero), \_SB.PCI0.RP04.HPSX)) + { + Sleep (0x64) + If (\_SB.PCI0.RP04.PDCX) + { + Store (One, \_SB.PCI0.RP04.PDCX) + Store (One, \_SB.PCI0.RP04.HPSX) + If (LNot (\_SB.PCI0.RP04.PDSX)) + { + Store (Zero, \_SB.PCI0.RP04.L0SE) + } + + Notify (\_SB.PCI0.RP04, Zero) + } + Else + { + Store (One, \_SB.PCI0.RP04.HPSX) + } + } + + If (LAnd (LEqual (RP5D, Zero), \_SB.PCI0.RP05.HPSX)) + { + Sleep (0x64) + If (\_SB.PCI0.RP05.PDCX) + { + Store (One, \_SB.PCI0.RP05.PDCX) + Store (One, \_SB.PCI0.RP05.HPSX) + If (LNot (\_SB.PCI0.RP05.PDSX)) + { + Store (Zero, \_SB.PCI0.RP05.L0SE) + } + + Notify (\_SB.PCI0.RP05, Zero) + } + Else + { + Store (One, \_SB.PCI0.RP05.HPSX) + } + } + + If (LAnd (LEqual (RP6D, Zero), \_SB.PCI0.RP06.HPSX)) + { + Sleep (0x64) + If (\_SB.PCI0.RP06.PDCX) + { + Store (One, \_SB.PCI0.RP06.PDCX) + Store (One, \_SB.PCI0.RP06.HPSX) + If (LNot (\_SB.PCI0.RP06.PDSX)) + { + Store (Zero, \_SB.PCI0.RP06.L0SE) + } + + Notify (\_SB.PCI0.RP06, Zero) + } + Else + { + Store (One, \_SB.PCI0.RP06.HPSX) + } + } + + If (LAnd (LEqual (RP7D, Zero), \_SB.PCI0.RP07.HPSX)) + { + Sleep (0x64) + If (\_SB.PCI0.RP07.PDCX) + { + Store (One, \_SB.PCI0.RP07.PDCX) + Store (One, \_SB.PCI0.RP07.HPSX) + If (LNot (\_SB.PCI0.RP07.PDSX)) + { + Store (Zero, \_SB.PCI0.RP07.L0SE) + } + + If (ECON) + { + If (LEqual (\_SB.PCI0.LPCB.H_EC.DOCK, Zero)) + { + Notify (\_SB.PCI0.RP07, Zero) + } + } + } + Else + { + Store (One, \_SB.PCI0.RP07.HPSX) + } + } + + If (LAnd (LEqual (RP8D, Zero), \_SB.PCI0.RP08.HPSX)) + { + Sleep (0x64) + If (\_SB.PCI0.RP08.PDCX) + { + Store (One, \_SB.PCI0.RP08.PDCX) + Store (One, \_SB.PCI0.RP08.HPSX) + If (LNot (\_SB.PCI0.RP08.PDSX)) + { + Store (Zero, \_SB.PCI0.RP08.L0SE) + } + + If (ECON) + { + If (LEqual (\_SB.PCI0.LPCB.H_EC.DOCK, Zero)) + { + Notify (\_SB.PCI0.RP08, Zero) + } + } + } + Else + { + Store (One, \_SB.PCI0.RP08.HPSX) + } + } + } + + Method (_L02, 0, NotSerialized) + { + Store (Zero, GPEC) + If (CondRefOf (\_SB.PCI0.IEIT.EITV)) + { + \_SB.PCI0.IEIT.EITV () + } + + Notify (\_TZ.TZ00, 0x80) + Notify (\_TZ.TZ01, 0x80) + If (CondRefOf (TNOT)) + { + TNOT () + } + } + + Method (_L06, 0, NotSerialized) + { + If (LAnd (\_SB.PCI0.GFX0.GSSE, LNot (GSMI))) + { + \_SB.PCI0.GFX0.GSCI () + } + } + + Method (_L07, 0, NotSerialized) + { + Store (0x20, \_SB.PCI0.SBUS.HSTS) + } + } + + Scope (_TZ) + { + Name (ETMD, One) + Name (THLD, 0x78) + PowerResource (FN00, 0x00, 0x0000) + { + Method (_STA, 0, Serialized) + { + Return (VFN0) + } + + Method (_ON, 0, Serialized) + { + Store (One, VFN0) + If (LAnd (ECON, ETMD)) + { + Store (AC0F, \_SB.PCI0.LPCB.H_EC.PENV) + \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) + } + } + + Method (_OFF, 0, Serialized) + { + Store (Zero, VFN0) + If (LAnd (ECON, ETMD)) + { + If (LEqual (VFN1, Zero)) + { + Store (Zero, \_SB.PCI0.LPCB.H_EC.PENV) + } + Else + { + Store (AC1F, \_SB.PCI0.LPCB.H_EC.PENV) + } + + \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) + } + } + } + + Device (FAN0) + { + Name (_HID, EisaId ("PNP0C0B")) + Name (_UID, Zero) + Name (_PR0, Package (0x01) + { + FN00 + }) + } + + PowerResource (FN01, 0x00, 0x0000) + { + Method (_STA, 0, Serialized) + { + Return (VFN1) + } + + Method (_ON, 0, Serialized) + { + Store (One, VFN1) + If (LAnd (ECON, ETMD)) + { + Store (AC1F, \_SB.PCI0.LPCB.H_EC.PENV) + \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) + } + } + + Method (_OFF, 0, Serialized) + { + Store (Zero, VFN1) + If (LAnd (ECON, ETMD)) + { + Store (Zero, \_SB.PCI0.LPCB.H_EC.PENV) + \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) + } + } + } + + Device (FAN1) + { + Name (_HID, EisaId ("PNP0C0B")) + Name (_UID, One) + Name (_PR0, Package (0x01) + { + FN01 + }) + } + + PowerResource (FN02, 0x00, 0x0000) + { + Method (_STA, 0, Serialized) + { + Return (VFN2) + } + + Method (_ON, 0, Serialized) + { + Store (One, VFN2) + If (LAnd (ECON, ETMD)) + { + Store (Zero, \_SB.PCI0.LPCB.H_EC.PENV) + \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) + } + } + + Method (_OFF, 0, Serialized) + { + Store (Zero, VFN2) + If (LAnd (ECON, ETMD)) + { + Store (Zero, \_SB.PCI0.LPCB.H_EC.PENV) + \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) + } + } + } + + Device (FAN2) + { + Name (_HID, EisaId ("PNP0C0B")) + Name (_UID, 0x02) + Name (_PR0, Package (0x01) + { + FN02 + }) + } + + PowerResource (FN03, 0x00, 0x0000) + { + Method (_STA, 0, Serialized) + { + Return (VFN3) + } + + Method (_ON, 0, Serialized) + { + Store (One, VFN3) + If (LAnd (ECON, ETMD)) + { + Store (Zero, \_SB.PCI0.LPCB.H_EC.PENV) + \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) + } + } + + Method (_OFF, 0, Serialized) + { + Store (Zero, VFN3) + If (LAnd (ECON, ETMD)) + { + Store (Zero, \_SB.PCI0.LPCB.H_EC.PENV) + \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) + } + } + } + + Device (FAN3) + { + Name (_HID, EisaId ("PNP0C0B")) + Name (_UID, 0x03) + Name (_PR0, Package (0x01) + { + FN03 + }) + } + + PowerResource (FN04, 0x00, 0x0000) + { + Method (_STA, 0, Serialized) + { + Return (VFN4) + } + + Method (_ON, 0, Serialized) + { + Store (One, VFN4) + If (LAnd (ECON, ETMD)) + { + Store (Zero, \_SB.PCI0.LPCB.H_EC.PENV) + \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) + } + } + + Method (_OFF, 0, Serialized) + { + Store (Zero, VFN4) + If (LAnd (ECON, ETMD)) + { + Store (Zero, \_SB.PCI0.LPCB.H_EC.PENV) + \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) + } + } + } + + Device (FAN4) + { + Name (_HID, EisaId ("PNP0C0B")) + Name (_UID, 0x04) + Name (_PR0, Package (0x01) + { + FN04 + }) + } + + ThermalZone (TZ00) + { + Name (PTMP, 0x0BB8) + Method (_SCP, 1, Serialized) + { + Store (Arg0, CTYP) + } + + Method (_CRT, 0, Serialized) + { + If (CondRefOf (\_PR.ACRT)) + { + If (LNotEqual (\_PR.ACRT, Zero)) + { + Return (Add (0x0AAC, Multiply (\_PR.ACRT, 0x0A))) + } + } + + Return (Add (0x0AAC, Multiply (CRTT, 0x0A))) + } + + Method (_AC0, 0, Serialized) + { + If (CondRefOf (\_PR.AAC0)) + { + If (LNotEqual (\_PR.AAC0, Zero)) + { + Return (Add (0x0AAC, Multiply (\_PR.AAC0, 0x0A))) + } + } + + Return (Add (0x0AAC, Multiply (ACTT, 0x0A))) + } + + Method (_AC1, 0, Serialized) + { + Return (Add (0x0AAC, Multiply (ACT1, 0x0A))) + } + + Method (_AC2, 0, Serialized) + { + Return (0x0AAC) + } + + Method (_AC3, 0, Serialized) + { + Return (0x0AAC) + } + + Method (_AC4, 0, Serialized) + { + Return (0x0AAC) + } + + Name (_AL0, Package (0x01) + { + FAN0 + }) + Name (_AL1, Package (0x01) + { + FAN1 + }) + Name (_AL2, Package (0x01) + { + FAN2 + }) + Name (_AL3, Package (0x01) + { + FAN3 + }) + Name (_AL4, Package (0x01) + { + FAN4 + }) + Method (_TMP, 0, Serialized) + { + If (LNot (ETMD)) + { + Return (0x0BB8) + } + + If (LEqual (DTSE, 0x03)) + { + Return (Add (0x0B10, Multiply (CRTT, 0x0A))) + } + + If (LEqual (DTSE, One)) + { + If (LEqual (PKGA, One)) + { + Store (PDTS, Local0) + Return (Add (0x0AAC, Multiply (Local0, 0x0A))) + } + + Store (DTS1, Local0) + If (LGreater (DTS2, Local0)) + { + Store (DTS2, Local0) + } + + If (LGreater (DTS3, Local0)) + { + Store (DTS3, Local0) + } + + If (LGreater (DTS4, Local0)) + { + Store (DTS4, Local0) + } + + Return (Add (0x0AAC, Multiply (Local0, 0x0A))) + } + + If (ECON) + { + Store (\_SB.PCI0.LPCB.H_EC.PLMX, Local0) + Add (0x0AAC, Multiply (Local0, 0x0A), Local0) + Store (Local0, PTMP) + Return (Local0) + } + + Return (0x0BC2) + } + } + + ThermalZone (TZ01) + { + Name (PTMP, 0x0BB8) + Method (_SCP, 1, Serialized) + { + Store (Arg0, CTYP) + } + + Method (_CRT, 0, Serialized) + { + If (CondRefOf (\_PR.ACRT)) + { + If (LNotEqual (\_PR.ACRT, Zero)) + { + Return (Add (0x0AAC, Multiply (\_PR.ACRT, 0x0A))) + } + } + + Return (Add (0x0AAC, Multiply (CRTT, 0x0A))) + } + + Method (_TMP, 0, Serialized) + { + If (LNot (ETMD)) + { + Return (0x0BCC) + } + + If (LEqual (DTSE, 0x03)) + { + Return (Add (0x0B10, Multiply (CRTT, 0x0A))) + } + + If (LEqual (DTSE, One)) + { + If (LEqual (PKGA, One)) + { + Store (PDTS, Local0) + Return (Add (0x0AAC, Multiply (Local0, 0x0A))) + } + + Store (DTS1, Local0) + If (LGreater (DTS2, Local0)) + { + Store (DTS2, Local0) + } + + If (LGreater (DTS3, Local0)) + { + Store (DTS3, Local0) + } + + If (LGreater (DTS4, Local0)) + { + Store (DTS4, Local0) + } + + Return (Add (0x0AAC, Multiply (Local0, 0x0A))) + } + + If (ECON) + { + Store (\_SB.PCI0.LPCB.H_EC.PECH, Local0) + Multiply (Local0, 0x0A, Local0) + Store (\_SB.PCI0.LPCB.H_EC.PECL, Local1) + ShiftRight (Local1, 0x02, Local1) + Store (Divide (Multiply (Local1, 0x0A), 0x40, ), Local1) + Add (Local0, Local1, Local0) + Add (0x0AAC, Local0, Local0) + Store (Local0, PTMP) + Return (Local0) + } + + Return (0x0BD6) + } + + Method (_PSL, 0, Serialized) + { + If (LEqual (TCNT, 0x08)) + { + Return (Package (0x08) + { + \_PR.CPU0, + \_PR.CPU1, + \_PR.CPU2, + \_PR.CPU3, + \_PR.CPU4, + \_PR.CPU5, + \_PR.CPU6, + \_PR.CPU7 + }) + } + + If (LEqual (TCNT, 0x04)) + { + Return (Package (0x04) + { + \_PR.CPU0, + \_PR.CPU1, + \_PR.CPU2, + \_PR.CPU3 + }) + } + + If (LEqual (TCNT, 0x02)) + { + Return (Package (0x02) + { + \_PR.CPU0, + \_PR.CPU1 + }) + } + + Return (Package (0x01) + { + \_PR.CPU0 + }) + } + + Method (_PSV, 0, Serialized) + { + If (CondRefOf (\_PR.APSV)) + { + If (LNotEqual (\_PR.APSV, Zero)) + { + Return (Add (0x0AAC, Multiply (\_PR.APSV, 0x0A))) + } + } + + Return (Add (0x0AAC, Multiply (PSVT, 0x0A))) + } + + Method (_TC1, 0, Serialized) + { + Return (TC1V) + } + + Method (_TC2, 0, Serialized) + { + Return (TC2V) + } + + Method (_TSP, 0, Serialized) + { + Return (TSPV) + } + } + } + + Scope (_SB.PCI0.LPCB) + { + Method (SIOH, 0, NotSerialized) + { + If (And (PMFG, 0x10)) + { + Notify (PS2K, 0x02) + } + + If (And (PMFG, 0x20)) + { + Notify (PS2M, 0x02) + } + } + } + + Name (TPMF, Zero) + Scope (\) + { + Device (AMW0) + { + Name (_HID, EisaId ("PNP0C14")) + Name (_UID, "ASUSWMI") + Name (_WDG, Buffer (0x50) + { + /* 0000 */ 0xD0, 0x5E, 0x84, 0x97, 0x6D, 0x4E, 0xDE, 0x11, + /* 0008 */ 0x8A, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66, + /* 0010 */ 0x42, 0x43, 0x01, 0x02, 0xA0, 0x47, 0x67, 0x46, + /* 0018 */ 0xEC, 0x70, 0xDE, 0x11, 0x8A, 0x39, 0x08, 0x00, + /* 0020 */ 0x20, 0x0C, 0x9A, 0x66, 0x42, 0x44, 0x01, 0x02, + /* 0028 */ 0x72, 0x0F, 0xBC, 0xAB, 0xA1, 0x8E, 0xD1, 0x11, + /* 0030 */ 0x00, 0xA0, 0xC9, 0x06, 0x29, 0x10, 0x00, 0x00, + /* 0038 */ 0xD2, 0x00, 0x01, 0x08, 0x21, 0x12, 0x90, 0x05, + /* 0040 */ 0x66, 0xD5, 0xD1, 0x11, 0xB2, 0xF0, 0x00, 0xA0, + /* 0048 */ 0xC9, 0x06, 0x29, 0x10, 0x4D, 0x4F, 0x01, 0x00 + }) + Name (CCAC, Zero) + Name (ECD2, Zero) + Name (EID2, Zero) + Method (WED2, 1, NotSerialized) + { + Store (Arg0, ECD2) + } + + Method (WMBC, 3, NotSerialized) + { + Store (One, Local0) + Name (_T_0, Zero) + Store (Arg1, _T_0) + If (LEqual (_T_0, 0x43455053)) + { + Return (SPEC (Arg2)) + } + Else + { + If (LEqual (_T_0, 0x50564544)) + { + Return (DEVP (Arg2)) + } + Else + { + If (LEqual (_T_0, 0x50534453)) + { + Return (SDSP (Arg2)) + } + Else + { + If (LEqual (_T_0, 0x50534447)) + { + Return (GDSP (Arg2)) + } + Else + { + If (LEqual (_T_0, 0x53564544)) + { + Return (DEVS (Arg2)) + } + Else + { + If (LEqual (_T_0, 0x53544344)) + { + Return (DSTS (Arg2)) + } + Else + { + If (LEqual (_T_0, 0x44495047)) + { + Return (GPID ()) + } + Else + { + If (LEqual (_T_0, 0x5446424B)) + { + Return (KBFT (Arg2)) + } + Else + { + If (LEqual (_T_0, 0x59454B48)) + { + Return (HKEY ()) + } + Else + { + Return (Zero) + } + } + } + } + } + } + } + } + } + + Return (Local0) + } + + Method (RSMB, 1, Serialized) + { + Return (Zero) + } + + Method (WSMB, 1, Serialized) + { + Return (Zero) + } + + Method (RSMW, 1, Serialized) + { + Return (Zero) + } + + Method (WSMW, 1, Serialized) + { + Return (Zero) + } + + Method (RSMK, 1, Serialized) + { + Return (Zero) + } + + Method (WSMK, 1, Serialized) + { + Return (Zero) + } + + Method (WMBD, 3, NotSerialized) + { + Store (One, Local0) + Name (_T_0, Zero) + Store (Arg1, _T_0) + If (LEqual (_T_0, 0x424D5352)) + { + Return (RSMB (Arg2)) + } + Else + { + If (LEqual (_T_0, 0x424D5357)) + { + Return (WSMB (Arg2)) + } + Else + { + If (LEqual (_T_0, 0x574D5352)) + { + Return (RSMW (Arg2)) + } + Else + { + If (LEqual (_T_0, 0x574D5357)) + { + Return (WSMW (Arg2)) + } + Else + { + If (LEqual (_T_0, 0x4B4D5352)) + { + Return (RSMK (Arg2)) + } + Else + { + If (LEqual (_T_0, 0x4B4D5357)) + { + Return (WSMK (Arg2)) + } + Else + { + Return (Zero) + } + } + } + } + } + } + + Return (Local0) + } + + Method (_WED, 1, NotSerialized) + { + If (LEqual (Arg0, 0xD2)) + { + Return (EID2) + } + + Return (Zero) + } + + Method (AMWR, 1, Serialized) + { + Store (Zero, Local1) + If (ECD2) + { + Store (Arg0, EID2) + Notify (AMW0, 0xD2) + Store (One, Local1) + } + Else + { + } + + Return (Local1) + } + + Method (AMWN, 1, Serialized) + { + Store (AMWR (Arg0), Local0) + Return (Local0) + } + + Name (WQMO, Buffer (0x09A6) + { + /* 0000 */ 0x46, 0x4F, 0x4D, 0x42, 0x01, 0x00, 0x00, 0x00, + /* 0008 */ 0x96, 0x09, 0x00, 0x00, 0x42, 0x38, 0x00, 0x00, + /* 0010 */ 0x44, 0x53, 0x00, 0x01, 0x1A, 0x7D, 0xDA, 0x54, + /* 0018 */ 0xA8, 0xD1, 0x9A, 0x00, 0x01, 0x06, 0x18, 0x42, + /* 0020 */ 0x10, 0x07, 0x10, 0x4A, 0x29, 0x86, 0x42, 0x04, + /* 0028 */ 0x0A, 0x0D, 0xA1, 0x38, 0x0A, 0x60, 0x30, 0x12, + /* 0030 */ 0x20, 0x24, 0x07, 0x42, 0x2E, 0x98, 0x98, 0x00, + /* 0038 */ 0x11, 0x10, 0xF2, 0x2A, 0xC0, 0xA6, 0x00, 0x93, + /* 0040 */ 0x20, 0xEA, 0xDF, 0x1F, 0xA2, 0x24, 0x38, 0x94, + /* 0048 */ 0x10, 0x08, 0x49, 0x14, 0x60, 0x5E, 0x80, 0x6E, + /* 0050 */ 0x01, 0x86, 0x05, 0xD8, 0x16, 0x60, 0x5A, 0x80, + /* 0058 */ 0x63, 0x48, 0x2A, 0x0D, 0x9C, 0x12, 0x58, 0x0A, + /* 0060 */ 0x84, 0x84, 0x0A, 0x50, 0x2E, 0xC0, 0xB7, 0x00, + /* 0068 */ 0xED, 0x88, 0x92, 0x2C, 0xC0, 0x32, 0x8C, 0x08, + /* 0070 */ 0x3C, 0x8A, 0xC8, 0x46, 0xE3, 0x04, 0x65, 0x43, + /* 0078 */ 0xA3, 0x64, 0x40, 0xC8, 0xB3, 0x00, 0xEB, 0xC0, + /* 0080 */ 0x84, 0xC0, 0xEE, 0x05, 0x98, 0x13, 0xE0, 0x4D, + /* 0088 */ 0x80, 0xB8, 0x61, 0x68, 0x85, 0x07, 0x10, 0xAA, + /* 0090 */ 0x30, 0x01, 0xB6, 0x60, 0x84, 0x52, 0x1B, 0x8C, + /* 0098 */ 0x50, 0x1A, 0x43, 0xD0, 0x30, 0x8C, 0x12, 0xF1, + /* 00A0 */ 0x90, 0x3A, 0x83, 0x15, 0x4A, 0xC4, 0x30, 0x21, + /* 00A8 */ 0x22, 0x54, 0x86, 0x41, 0x86, 0x15, 0x2A, 0x5A, + /* 00B0 */ 0xDC, 0x08, 0xED, 0x0F, 0x82, 0x44, 0x5B, 0xB1, + /* 00B8 */ 0x86, 0xEA, 0x48, 0xA3, 0x41, 0x0D, 0x2F, 0xC1, + /* 00C0 */ 0xE1, 0x7A, 0xA8, 0xE7, 0xD8, 0xB9, 0x00, 0xE9, + /* 00C8 */ 0xC0, 0x02, 0x09, 0x7E, 0x16, 0x75, 0x8E, 0x93, + /* 00D0 */ 0x80, 0x24, 0x30, 0xD6, 0xF1, 0xB3, 0x81, 0xE3, + /* 00D8 */ 0x5D, 0x03, 0x6A, 0xC6, 0xC7, 0xCB, 0x04, 0xC1, + /* 00E0 */ 0xA1, 0x86, 0xE8, 0x81, 0x86, 0x3B, 0x81, 0x43, + /* 00E8 */ 0x64, 0x80, 0x9E, 0xD3, 0xD1, 0x60, 0x0E, 0x00, + /* 00F0 */ 0x76, 0x38, 0x19, 0xDD, 0x03, 0x4A, 0x15, 0x60, + /* 00F8 */ 0x76, 0xCC, 0xB2, 0x08, 0xA4, 0xF1, 0x18, 0xFA, + /* 0100 */ 0x74, 0xCF, 0xE7, 0x84, 0x13, 0x58, 0xFE, 0x20, + /* 0108 */ 0x50, 0x23, 0x33, 0xB4, 0x0D, 0x4E, 0x4B, 0x98, + /* 0110 */ 0x21, 0x0F, 0xFF, 0xB0, 0x98, 0x58, 0x08, 0x7D, + /* 0118 */ 0x10, 0x3C, 0x1E, 0x78, 0xFF, 0xFF, 0xF1, 0x80, + /* 0120 */ 0x47, 0xF1, 0x99, 0x40, 0x08, 0xAF, 0x04, 0xB1, + /* 0128 */ 0x3D, 0xA0, 0xE7, 0x04, 0x03, 0x63, 0x07, 0x64, + /* 0130 */ 0xBF, 0x02, 0x10, 0x82, 0x97, 0x39, 0x22, 0x39, + /* 0138 */ 0x45, 0xD0, 0x98, 0x8C, 0xD1, 0x2A, 0x84, 0x86, + /* 0140 */ 0x10, 0xDA, 0x10, 0x67, 0x17, 0xFF, 0xE0, 0x0D, + /* 0148 */ 0x73, 0xEE, 0x26, 0x28, 0x72, 0x04, 0xA8, 0xCF, + /* 0150 */ 0x84, 0x47, 0xC0, 0x8F, 0x01, 0xD1, 0x43, 0x9F, + /* 0158 */ 0x4D, 0xF4, 0xE3, 0x89, 0x72, 0x12, 0x07, 0xE4, + /* 0160 */ 0x33, 0x83, 0x11, 0x82, 0x97, 0x7B, 0x48, 0x20, + /* 0168 */ 0x9A, 0xE7, 0xA0, 0x13, 0xC3, 0x39, 0x1D, 0x02, + /* 0170 */ 0x53, 0xA3, 0x05, 0xA2, 0x09, 0x10, 0x45, 0x59, + /* 0178 */ 0xAA, 0x6C, 0x2C, 0xD5, 0x83, 0xA0, 0x82, 0x80, + /* 0180 */ 0x34, 0x77, 0x43, 0x9C, 0xB4, 0x91, 0x03, 0xC7, + /* 0188 */ 0xA8, 0x7E, 0xD8, 0x54, 0x04, 0x9C, 0x0E, 0x1B, + /* 0190 */ 0x1E, 0xB7, 0xE3, 0x93, 0x28, 0xFA, 0x80, 0x28, + /* 0198 */ 0x9C, 0xC3, 0x9E, 0x39, 0x28, 0x88, 0x01, 0x9D, + /* 01A0 */ 0x04, 0x42, 0x4E, 0x8E, 0x02, 0xA8, 0xBD, 0x68, + /* 01A8 */ 0x58, 0x1A, 0xD7, 0xA9, 0xBD, 0x09, 0x78, 0x5A, + /* 01B0 */ 0x8F, 0x05, 0x87, 0x71, 0x5C, 0x67, 0x6D, 0xD1, + /* 01B8 */ 0x37, 0x06, 0x3A, 0x1F, 0xDF, 0x05, 0xB8, 0x06, + /* 01C0 */ 0x08, 0xCD, 0xC8, 0xF0, 0x56, 0x03, 0x48, 0xC1, + /* 01C8 */ 0xF8, 0x49, 0xE0, 0x11, 0xC0, 0x04, 0xD6, 0x75, + /* 01D0 */ 0x20, 0x80, 0x7E, 0xD9, 0xF0, 0xF0, 0x7D, 0xC2, + /* 01D8 */ 0x78, 0xBC, 0x48, 0x50, 0xDF, 0x7D, 0x00, 0x14, + /* 01E0 */ 0x40, 0x3E, 0x00, 0x58, 0xE9, 0x1D, 0x80, 0x8E, + /* 01E8 */ 0x21, 0x44, 0x98, 0x68, 0x46, 0xE7, 0x12, 0x56, + /* 01F0 */ 0xAA, 0xFF, 0xFF, 0x68, 0xF9, 0x41, 0xC5, 0xA3, + /* 01F8 */ 0x35, 0x88, 0x47, 0xEB, 0x40, 0xA3, 0x45, 0x1F, + /* 0200 */ 0x33, 0xAC, 0x70, 0x54, 0xF2, 0x39, 0x01, 0x0D, + /* 0208 */ 0x17, 0x06, 0x41, 0xE1, 0x07, 0x0E, 0x68, 0x80, + /* 0210 */ 0xA7, 0xF7, 0x66, 0xE0, 0x99, 0x18, 0xCE, 0xF3, + /* 0218 */ 0xE5, 0x70, 0x9E, 0x2F, 0x1F, 0x8E, 0x0F, 0x14, + /* 0220 */ 0xF0, 0x07, 0x8C, 0x25, 0x28, 0x70, 0xC2, 0x20, + /* 0228 */ 0x87, 0xC7, 0x08, 0x1E, 0x2C, 0x95, 0x35, 0x2E, + /* 0230 */ 0xD4, 0xFD, 0xC0, 0x27, 0x1A, 0x86, 0x7D, 0xA8, + /* 0238 */ 0x47, 0xF3, 0x96, 0x70, 0x86, 0x6F, 0x13, 0x07, + /* 0240 */ 0xF5, 0xEE, 0x61, 0xA7, 0x42, 0x2D, 0x3A, 0x84, + /* 0248 */ 0xF5, 0x48, 0x39, 0xAC, 0xD1, 0xC2, 0x1E, 0xF0, + /* 0250 */ 0x73, 0x87, 0xEF, 0x19, 0xFC, 0x4A, 0xE3, 0x63, + /* 0258 */ 0x08, 0x5D, 0x85, 0x4E, 0x15, 0x5C, 0x14, 0x84, + /* 0260 */ 0xE2, 0xAD, 0x45, 0xC3, 0x3F, 0x0B, 0x8F, 0xEB, + /* 0268 */ 0x15, 0xC3, 0x57, 0x80, 0x87, 0x13, 0x9F, 0x01, + /* 0270 */ 0xE2, 0x07, 0x3A, 0x82, 0x17, 0x11, 0x9F, 0x7D, + /* 0278 */ 0x7C, 0x79, 0xF1, 0x21, 0x83, 0x9D, 0x2C, 0x78, + /* 0280 */ 0x08, 0x0A, 0xC5, 0x38, 0x1C, 0xA0, 0x84, 0xC3, + /* 0288 */ 0x08, 0xCE, 0x20, 0x1E, 0x9E, 0x83, 0x1C, 0x0E, + /* 0290 */ 0xD0, 0xE7, 0x20, 0x0F, 0x84, 0x0D, 0xC2, 0x20, + /* 0298 */ 0xE7, 0xF1, 0xF2, 0xC3, 0x2E, 0x16, 0xF8, 0xFF, + /* 02A0 */ 0xFF, 0xC5, 0x02, 0x78, 0xA5, 0x19, 0x14, 0x5A, + /* 02A8 */ 0xCF, 0xA0, 0x20, 0x60, 0x3C, 0x3F, 0x78, 0xBC, + /* 02B0 */ 0x9E, 0xAD, 0xA7, 0x05, 0xDE, 0x11, 0xFB, 0xFC, + /* 02B8 */ 0x01, 0x9C, 0xC3, 0x1F, 0x5E, 0x50, 0x71, 0x87, + /* 02C0 */ 0x44, 0x41, 0x7C, 0x36, 0x70, 0x94, 0xF1, 0xA2, + /* 02C8 */ 0x67, 0xE2, 0xC3, 0x90, 0x8F, 0x0B, 0x4F, 0x37, + /* 02D0 */ 0x98, 0xC3, 0x07, 0xB8, 0x47, 0xE2, 0xC3, 0x07, + /* 02D8 */ 0xF0, 0xF8, 0xFF, 0x1F, 0x3E, 0x80, 0x9F, 0x44, + /* 02E0 */ 0x8B, 0x5A, 0x85, 0x1E, 0x3E, 0xC0, 0x15, 0xE4, + /* 02E8 */ 0x84, 0x84, 0x96, 0x73, 0xF8, 0x40, 0x4E, 0x24, + /* 02F0 */ 0x4C, 0x74, 0x9F, 0x91, 0x5E, 0x3C, 0x2C, 0xE1, + /* 02F8 */ 0xE0, 0x81, 0x0A, 0x4F, 0xA2, 0xF8, 0xA7, 0x02, + /* 0300 */ 0x54, 0xE0, 0x53, 0x01, 0x05, 0x31, 0xA0, 0x0F, + /* 0308 */ 0x15, 0x70, 0x66, 0xF0, 0xEC, 0x85, 0x99, 0x07, + /* 0310 */ 0x8C, 0x33, 0x12, 0x60, 0xEB, 0x50, 0x01, 0xDE, + /* 0318 */ 0xFF, 0xFF, 0xA1, 0x02, 0x38, 0x1C, 0x90, 0x00, + /* 0320 */ 0x59, 0x12, 0x2F, 0x48, 0x0F, 0x15, 0xE0, 0x3A, + /* 0328 */ 0x70, 0xFA, 0x50, 0xC1, 0x0F, 0x9A, 0x16, 0x05, + /* 0330 */ 0xA4, 0x23, 0x9E, 0x0F, 0x15, 0x30, 0x2E, 0x42, + /* 0338 */ 0x86, 0x7F, 0xAD, 0x3B, 0x96, 0xE7, 0x30, 0x72, + /* 0340 */ 0xAE, 0x40, 0xC7, 0x3E, 0x18, 0xA0, 0x82, 0x8E, + /* 0348 */ 0x9E, 0x82, 0x18, 0xD0, 0x29, 0x0E, 0x06, 0x68, + /* 0350 */ 0x1D, 0xE7, 0x0A, 0xD4, 0x31, 0x0E, 0xF8, 0xFD, + /* 0358 */ 0xFF, 0xCF, 0x14, 0xC0, 0x49, 0xC4, 0xD1, 0x0A, + /* 0360 */ 0x35, 0x5C, 0x8F, 0xD5, 0x20, 0x1E, 0xAB, 0x8F, + /* 0368 */ 0xA1, 0x1E, 0x2B, 0xEE, 0x1B, 0xE0, 0x23, 0x00, + /* 0370 */ 0xFE, 0xE8, 0x84, 0x03, 0x7B, 0xAE, 0x00, 0x4C, + /* 0378 */ 0x7B, 0x3C, 0x57, 0x80, 0x4E, 0xDA, 0xD9, 0x07, + /* 0380 */ 0x1D, 0x70, 0xAD, 0x3A, 0x89, 0xE1, 0xCF, 0x71, + /* 0388 */ 0x8C, 0x60, 0xA8, 0xC3, 0x1B, 0x85, 0x70, 0x1C, + /* 0390 */ 0x0A, 0x85, 0x39, 0x19, 0xD0, 0xFF, 0xFF, 0x11, + /* 0398 */ 0x96, 0xC0, 0x51, 0x10, 0x0F, 0xCD, 0x61, 0xCE, + /* 03A0 */ 0x70, 0xA0, 0x39, 0x16, 0xC0, 0xBB, 0x55, 0xB0, + /* 03A8 */ 0x63, 0x01, 0x6C, 0x02, 0x1F, 0x0B, 0xC0, 0x17, + /* 03B0 */ 0x67, 0x58, 0xE8, 0xD1, 0xFA, 0xFE, 0x87, 0xBB, + /* 03B8 */ 0x3F, 0x44, 0x79, 0x29, 0xF6, 0x21, 0x07, 0xEE, + /* 03C0 */ 0xB8, 0xC0, 0x71, 0x7A, 0x00, 0x5C, 0x1D, 0xC4, + /* 03C8 */ 0xE4, 0xF4, 0xF4, 0x00, 0xAE, 0x24, 0xA7, 0x07, + /* 03D0 */ 0xD4, 0x80, 0xFD, 0xFF, 0xD7, 0x03, 0xA4, 0x73, + /* 03D8 */ 0x02, 0xF6, 0xA2, 0xCD, 0x20, 0x4E, 0xF4, 0x79, + /* 03E0 */ 0xC4, 0x0A, 0x8E, 0x38, 0xA8, 0xEC, 0x24, 0x4A, + /* 03E8 */ 0x7E, 0xC4, 0x41, 0x65, 0x1D, 0x3B, 0x05, 0x31, + /* 03F0 */ 0xA0, 0x4F, 0x94, 0x80, 0x8F, 0x3B, 0x0E, 0xB0, + /* 03F8 */ 0xD8, 0xA8, 0x27, 0xCB, 0x23, 0x4F, 0x96, 0x82, + /* 0400 */ 0x78, 0xB2, 0xBE, 0x54, 0x00, 0x87, 0x1B, 0x0E, + /* 0408 */ 0xB0, 0xFF, 0xFF, 0x5F, 0x2A, 0x80, 0x92, 0x43, + /* 0410 */ 0xA9, 0x97, 0x0A, 0x90, 0xC9, 0xBB, 0xE1, 0xA0, + /* 0418 */ 0x43, 0xAE, 0x55, 0xF7, 0x3A, 0x76, 0x6C, 0xF5, + /* 0420 */ 0xB8, 0x7D, 0x93, 0xC6, 0x04, 0xBB, 0xE1, 0xA0, + /* 0428 */ 0x22, 0x51, 0x28, 0xD0, 0xB9, 0x00, 0x15, 0x01, + /* 0430 */ 0x8E, 0x82, 0x78, 0x68, 0x3E, 0x17, 0x58, 0xC9, + /* 0438 */ 0xB9, 0x00, 0xED, 0xFD, 0x42, 0x41, 0x06, 0xE7, + /* 0440 */ 0x7B, 0x81, 0x61, 0x8A, 0x1F, 0x8A, 0xEE, 0x3D, + /* 0448 */ 0x3E, 0x17, 0x80, 0xFB, 0x8A, 0x03, 0x2E, 0x63, + /* 0450 */ 0x02, 0xB4, 0x41, 0x92, 0x7B, 0xB8, 0xC7, 0x85, + /* 0458 */ 0x1B, 0x87, 0x47, 0x75, 0x4C, 0x31, 0x9F, 0xE3, + /* 0460 */ 0x82, 0x3C, 0xC7, 0x79, 0x5E, 0xB8, 0xF3, 0x03, + /* 0468 */ 0x70, 0xFB, 0xFF, 0x0F, 0x0C, 0xD6, 0x85, 0x0B, + /* 0470 */ 0x88, 0x0B, 0x35, 0x29, 0xF1, 0xFC, 0x00, 0xAE, + /* 0478 */ 0x5B, 0xB7, 0xEF, 0x85, 0x38, 0x29, 0x77, 0x57, + /* 0480 */ 0x14, 0xC6, 0x2B, 0x49, 0x0C, 0xDF, 0x53, 0x8D, + /* 0488 */ 0x6D, 0x98, 0x03, 0x38, 0x15, 0xE3, 0x24, 0x18, + /* 0490 */ 0xFC, 0xEC, 0x40, 0xC7, 0xE5, 0xC8, 0x24, 0xBA, + /* 0498 */ 0xED, 0xFB, 0x08, 0xC1, 0x63, 0x8E, 0x9E, 0x82, + /* 04A0 */ 0x18, 0xD0, 0x19, 0x4E, 0x2A, 0x68, 0x15, 0x20, + /* 04A8 */ 0x9A, 0x02, 0xE6, 0xE6, 0x0A, 0xF8, 0xFB, 0xFF, + /* 04B0 */ 0xDF, 0x5C, 0x01, 0x56, 0xB8, 0x54, 0xA8, 0x51, + /* 04B8 */ 0xEA, 0x91, 0x02, 0x5C, 0x77, 0x40, 0xDF, 0xC2, + /* 04C0 */ 0x70, 0x92, 0x80, 0x74, 0x65, 0x3D, 0x8D, 0x07, + /* 04C8 */ 0x00, 0x5F, 0x29, 0x60, 0x5C, 0x3C, 0xD9, 0x11, + /* 04D0 */ 0x87, 0xDF, 0xAE, 0x7D, 0x2C, 0x00, 0xE6, 0xFF, + /* 04D8 */ 0xFF, 0x2B, 0x21, 0x58, 0x8F, 0x05, 0xC0, 0x5B, + /* 04E0 */ 0xA4, 0x4B, 0x8B, 0x66, 0x8F, 0x05, 0xE0, 0x12, + /* 04E8 */ 0xBF, 0x0A, 0x7A, 0x50, 0xB1, 0x5C, 0x18, 0x94, + /* 04F0 */ 0x84, 0xB1, 0x43, 0x19, 0xCD, 0xC1, 0x1C, 0x43, + /* 04F8 */ 0x70, 0x76, 0x86, 0x31, 0x1C, 0x1F, 0xA8, 0xA7, + /* 0500 */ 0xFE, 0x58, 0x7B, 0x1A, 0xAF, 0x68, 0xBE, 0xE2, + /* 0508 */ 0xF9, 0x3E, 0x4A, 0x87, 0x88, 0xBA, 0xEA, 0x79, + /* 0510 */ 0xAC, 0x6F, 0x05, 0xA7, 0xF6, 0xAC, 0xE7, 0x6B, + /* 0518 */ 0x8B, 0x61, 0x12, 0x78, 0x88, 0x0C, 0x8D, 0x13, + /* 0520 */ 0xBC, 0x23, 0x19, 0x9A, 0xCB, 0x80, 0xD0, 0x5D, + /* 0528 */ 0xE9, 0x35, 0xC0, 0x73, 0x33, 0x41, 0xF7, 0x43, + /* 0530 */ 0x97, 0x42, 0x04, 0x9D, 0x00, 0xDE, 0x09, 0x6A, + /* 0538 */ 0x14, 0xE0, 0xED, 0x2A, 0x20, 0x5B, 0x02, 0xC4, + /* 0540 */ 0x8D, 0x5E, 0x58, 0x6F, 0x45, 0x51, 0x42, 0x44, + /* 0548 */ 0x08, 0x1A, 0xC5, 0x78, 0x11, 0x42, 0x85, 0x88, + /* 0550 */ 0x12, 0xB5, 0x39, 0x10, 0x5D, 0x8E, 0xA2, 0x06, + /* 0558 */ 0x89, 0x16, 0xCC, 0x08, 0xCC, 0xFE, 0x20, 0x88, + /* 0560 */ 0xF4, 0x67, 0x80, 0x2E, 0x33, 0xBE, 0x0C, 0x7B, + /* 0568 */ 0x34, 0xFC, 0x2C, 0xC5, 0x87, 0x7A, 0x8E, 0x8F, + /* 0570 */ 0x8A, 0xEC, 0xFF, 0x0F, 0xF2, 0x5A, 0x68, 0x9D, + /* 0578 */ 0xE3, 0x24, 0x87, 0x1C, 0x83, 0xEB, 0x0C, 0x01, + /* 0580 */ 0xCD, 0x35, 0xA0, 0x8E, 0xFD, 0x1E, 0xAF, 0xBF, + /* 0588 */ 0x1A, 0x86, 0xE3, 0x43, 0xF4, 0xA1, 0xC2, 0x13, + /* 0590 */ 0x38, 0x44, 0x06, 0xE8, 0x43, 0x04, 0xFC, 0xF1, + /* 0598 */ 0x18, 0xFA, 0x29, 0xC2, 0x13, 0x7E, 0xA1, 0x25, + /* 05A0 */ 0x83, 0x40, 0x9D, 0x34, 0xF8, 0x48, 0x5F, 0xB8, + /* 05A8 */ 0xD9, 0xED, 0xC3, 0x04, 0x16, 0x7B, 0x76, 0xA0, + /* 05B0 */ 0xE3, 0x01, 0xBF, 0xE2, 0x33, 0x81, 0xAE, 0x71, + /* 05B8 */ 0xC6, 0xF6, 0xC9, 0xC8, 0x11, 0x0E, 0x22, 0x50, + /* 05C0 */ 0x40, 0x9F, 0x4D, 0xF8, 0xCD, 0x83, 0x1D, 0x2D, + /* 05C8 */ 0xB8, 0xA8, 0xA3, 0x05, 0xEA, 0xB4, 0xE0, 0x83, + /* 05D0 */ 0x02, 0x43, 0x7C, 0xF8, 0x34, 0xC4, 0x93, 0x05, + /* 05D8 */ 0x3B, 0xEA, 0x80, 0x53, 0xDE, 0x21, 0x04, 0x14, + /* 05E0 */ 0x20, 0x3E, 0x59, 0xB0, 0x79, 0x61, 0x08, 0x2C, + /* 05E8 */ 0x12, 0x1E, 0x75, 0xE8, 0x30, 0x3C, 0x3F, 0x25, + /* 05F0 */ 0x3C, 0x8E, 0x30, 0xEC, 0x37, 0x12, 0x4F, 0xE1, + /* 05F8 */ 0x70, 0x7C, 0xA4, 0x30, 0x42, 0xF0, 0x72, 0x4F, + /* 0600 */ 0x16, 0xE4, 0x62, 0x73, 0x74, 0xFF, 0xFF, 0x27, + /* 0608 */ 0x18, 0xCC, 0x50, 0x3D, 0x04, 0x7E, 0x5E, 0xF0, + /* 0610 */ 0x10, 0xF8, 0x00, 0x5A, 0x9D, 0x1D, 0x39, 0x9F, + /* 0618 */ 0x9C, 0x13, 0x6E, 0xBC, 0x7C, 0x4C, 0xD8, 0x01, + /* 0620 */ 0xF0, 0xE0, 0x4B, 0xF2, 0x59, 0x84, 0xC6, 0x58, + /* 0628 */ 0xBE, 0x8F, 0x23, 0x80, 0x9C, 0x49, 0x3C, 0x81, + /* 0630 */ 0x44, 0x78, 0x19, 0x09, 0x12, 0xE2, 0x58, 0x5E, + /* 0638 */ 0x43, 0x0C, 0x12, 0xE3, 0xED, 0xC8, 0xC7, 0x11, + /* 0640 */ 0x0E, 0xF3, 0x4C, 0x62, 0xB8, 0x87, 0x83, 0x57, + /* 0648 */ 0x91, 0x17, 0x12, 0xC3, 0x3C, 0x8A, 0xF8, 0x7C, + /* 0650 */ 0x10, 0xC3, 0x98, 0xA1, 0xA2, 0x9D, 0x80, 0x8F, + /* 0658 */ 0x23, 0xEC, 0x58, 0xE9, 0xA1, 0xFA, 0x38, 0x02, + /* 0660 */ 0x58, 0xFA, 0xFF, 0x1F, 0x47, 0x80, 0xF9, 0x11, + /* 0668 */ 0x01, 0x77, 0xDA, 0x80, 0x7B, 0x9F, 0x08, 0xF1, + /* 0670 */ 0xA4, 0xF1, 0x92, 0xF0, 0xAC, 0x01, 0x5C, 0x84, + /* 0678 */ 0x6A, 0x39, 0xF7, 0xB0, 0x34, 0x8F, 0x01, 0x1D, + /* 0680 */ 0xCF, 0x38, 0x87, 0x35, 0x01, 0x69, 0x98, 0xFC, + /* 0688 */ 0xCA, 0xED, 0x73, 0xC1, 0xD9, 0x3D, 0x72, 0x1B, + /* 0690 */ 0x26, 0xC8, 0x13, 0xC1, 0x6B, 0x94, 0xC1, 0x05, + /* 0698 */ 0xA9, 0xF3, 0x23, 0x4F, 0x4F, 0x21, 0xDD, 0x27, + /* 06A0 */ 0x5A, 0x94, 0xD2, 0x63, 0x1A, 0x05, 0xF1, 0x19, + /* 06A8 */ 0xC1, 0x21, 0xCE, 0x31, 0xE8, 0xE1, 0x7B, 0x0E, + /* 06B0 */ 0x67, 0x74, 0x20, 0xEF, 0x01, 0xEC, 0xFE, 0x08, + /* 06B8 */ 0x3C, 0x4F, 0x3A, 0x78, 0x74, 0xDF, 0x14, 0xCE, + /* 06C0 */ 0xF3, 0x4C, 0xFF, 0xFF, 0x47, 0x04, 0xDE, 0x99, + /* 06C8 */ 0xFA, 0x82, 0x09, 0x9C, 0x43, 0xDC, 0x05, 0x50, + /* 06D0 */ 0xB2, 0xEF, 0x02, 0x14, 0xC4, 0x13, 0xF3, 0xD5, + /* 06D8 */ 0x0F, 0x0E, 0xFE, 0xAB, 0x1F, 0x30, 0xB9, 0x2C, + /* 06E0 */ 0xF8, 0x9A, 0x04, 0xBE, 0x53, 0x3F, 0xFE, 0xC2, + /* 06E8 */ 0xE0, 0xDB, 0xC0, 0xC3, 0x13, 0x1B, 0x14, 0xF8, + /* 06F0 */ 0xA1, 0x7C, 0x3D, 0x04, 0xFF, 0xFF, 0xFF, 0x7A, + /* 06F8 */ 0x08, 0x3C, 0x95, 0x3A, 0xB5, 0xA9, 0xF0, 0x7A, + /* 0700 */ 0x08, 0xAE, 0x28, 0xD7, 0x12, 0xD4, 0xAD, 0xC9, + /* 0708 */ 0x82, 0x80, 0x74, 0x3F, 0x7F, 0xBE, 0x31, 0xA6, + /* 0710 */ 0xCF, 0x25, 0xF0, 0xEE, 0xA0, 0x5A, 0x95, 0xEE, + /* 0718 */ 0x25, 0x3C, 0x38, 0x85, 0xA2, 0x1F, 0x1E, 0x50, + /* 0720 */ 0x61, 0x0F, 0x0F, 0x14, 0xC4, 0x17, 0x23, 0xDF, + /* 0728 */ 0x4B, 0x00, 0x0E, 0xFC, 0xFF, 0x47, 0xC4, 0x6F, + /* 0730 */ 0xDA, 0x70, 0x8E, 0x16, 0x98, 0x19, 0x81, 0xF5, + /* 0738 */ 0x44, 0xE0, 0x9B, 0x36, 0xE0, 0xE8, 0xE4, 0x02, + /* 0740 */ 0x5C, 0x4E, 0x25, 0x80, 0x2B, 0xAF, 0xA7, 0x12, + /* 0748 */ 0xFD, 0xFF, 0x4F, 0x25, 0xE0, 0xBA, 0x7B, 0x81, + /* 0750 */ 0xE9, 0x6A, 0x72, 0x26, 0xD1, 0x82, 0xFB, 0xEE, + /* 0758 */ 0x05, 0xF0, 0xF3, 0xFF, 0x7F, 0xF7, 0x02, 0x88, + /* 0760 */ 0xE9, 0xF5, 0xEE, 0x05, 0xBC, 0xCE, 0x25, 0x98, + /* 0768 */ 0xBB, 0x97, 0xFF, 0xFF, 0x77, 0x2F, 0x80, 0xFF, + /* 0770 */ 0xFF, 0xFF, 0xBB, 0x17, 0x40, 0x96, 0x53, 0x09, + /* 0778 */ 0xC8, 0xB2, 0x9D, 0x4A, 0xD0, 0x0A, 0xCF, 0xD1, + /* 0780 */ 0x50, 0x27, 0x70, 0x28, 0x4F, 0x18, 0xAF, 0xEA, + /* 0788 */ 0x09, 0xAC, 0xE7, 0xF2, 0x85, 0x52, 0x02, 0xA3, + /* 0790 */ 0xCB, 0x17, 0xB0, 0xFB, 0xFF, 0x5F, 0xBE, 0x00, + /* 0798 */ 0x3E, 0x04, 0xBA, 0x0B, 0xA0, 0x22, 0xDC, 0x05, + /* 07A0 */ 0x28, 0x88, 0x2F, 0x5F, 0x80, 0x97, 0x50, 0x10, + /* 07A8 */ 0x32, 0x72, 0x93, 0xA0, 0x97, 0x2F, 0x38, 0x17, + /* 07B0 */ 0x07, 0xDF, 0x8F, 0x3C, 0x28, 0x78, 0xFF, 0xFF, + /* 07B8 */ 0x41, 0xC1, 0x19, 0xCC, 0x79, 0x17, 0x7B, 0x52, + /* 07C0 */ 0xA4, 0xD7, 0x13, 0xB8, 0x77, 0x0E, 0x8F, 0x0D, + /* 07C8 */ 0x1C, 0xE2, 0xAE, 0x60, 0xC0, 0xDE, 0xE5, 0xED, + /* 07D0 */ 0x04, 0x5C, 0xDA, 0xD6, 0xAE, 0xDB, 0x09, 0x2E, + /* 07D8 */ 0xE1, 0x71, 0x1A, 0xF2, 0xF1, 0x04, 0x93, 0xE7, + /* 07E0 */ 0x76, 0x82, 0x4A, 0x02, 0xA3, 0x2C, 0x24, 0x3A, + /* 07E8 */ 0x42, 0x70, 0xF5, 0x37, 0x31, 0x0A, 0x62, 0x0B, + /* 07F0 */ 0xB7, 0x13, 0x40, 0xC7, 0xFF, 0xFF, 0x76, 0x02, + /* 07F8 */ 0xFC, 0xC7, 0x0C, 0x67, 0x44, 0xEF, 0x15, 0x86, + /* 0800 */ 0xF4, 0x19, 0x0C, 0x98, 0x06, 0x3A, 0x82, 0xA0, + /* 0808 */ 0x2F, 0x69, 0xD8, 0x04, 0x37, 0x10, 0x3A, 0x23, + /* 0810 */ 0x78, 0x17, 0x10, 0xB8, 0x13, 0x83, 0x75, 0x00, + /* 0818 */ 0x01, 0xDF, 0x59, 0x0D, 0x78, 0xFD, 0xFF, 0xCF, + /* 0820 */ 0x6A, 0xC0, 0xF4, 0x00, 0xE0, 0xB3, 0x1A, 0xA0, + /* 0828 */ 0xEA, 0xF6, 0x02, 0x32, 0x85, 0x36, 0x7D, 0x6A, + /* 0830 */ 0x34, 0x6A, 0xD5, 0xA0, 0x4C, 0x8D, 0x32, 0x0D, + /* 0838 */ 0x6A, 0xF5, 0xA9, 0xD4, 0x98, 0x31, 0xBB, 0x60, + /* 0840 */ 0x8A, 0x71, 0x7B, 0xA2, 0x22, 0x96, 0x23, 0x10, + /* 0848 */ 0xEB, 0xA6, 0x90, 0x91, 0xCB, 0x86, 0x41, 0x04, + /* 0850 */ 0x64, 0xD9, 0x8B, 0x16, 0x10, 0x01, 0x11, 0x90, + /* 0858 */ 0x85, 0xBC, 0x1B, 0x04, 0x64, 0x55, 0x20, 0x02, + /* 0860 */ 0x72, 0x2A, 0x20, 0x1A, 0x11, 0x88, 0xC6, 0xF1, + /* 0868 */ 0x00, 0xC4, 0xC2, 0x81, 0x08, 0xC8, 0xEA, 0x4C, + /* 0870 */ 0x00, 0x31, 0xA9, 0x20, 0xBA, 0x43, 0x90, 0xCF, + /* 0878 */ 0x85, 0x80, 0x2C, 0x12, 0x44, 0x40, 0xCE, 0xB8, + /* 0880 */ 0x3E, 0x01, 0x39, 0x30, 0x88, 0x80, 0x1C, 0xF2, + /* 0888 */ 0x1B, 0x22, 0x20, 0x47, 0x06, 0x11, 0x90, 0x05, + /* 0890 */ 0xEB, 0x00, 0xF2, 0xFF, 0x9F, 0xA0, 0x7C, 0x10, + /* 0898 */ 0x01, 0x39, 0x3E, 0x10, 0x15, 0xE3, 0xE3, 0xAE, + /* 08A0 */ 0x45, 0x1F, 0x03, 0x02, 0x72, 0x2E, 0x10, 0x01, + /* 08A8 */ 0x39, 0x07, 0x8D, 0x80, 0x9C, 0x8A, 0x42, 0x40, + /* 08B0 */ 0x56, 0xF5, 0x76, 0x10, 0x90, 0x35, 0x82, 0x08, + /* 08B8 */ 0xC8, 0x29, 0x81, 0x68, 0x66, 0x20, 0x2A, 0xD8, + /* 08C0 */ 0x0A, 0x10, 0x53, 0x0F, 0x22, 0x20, 0x2B, 0xD5, + /* 08C8 */ 0x02, 0xC4, 0x74, 0x83, 0x08, 0xC8, 0xA9, 0xBD, + /* 08D0 */ 0x00, 0x31, 0x0D, 0xEF, 0x00, 0x01, 0x59, 0xEB, + /* 08D8 */ 0xD3, 0x43, 0x20, 0x4E, 0x0A, 0x42, 0xB5, 0xBA, + /* 08E0 */ 0x01, 0x61, 0x39, 0xED, 0x80, 0x30, 0x95, 0x7A, + /* 08E8 */ 0x40, 0x58, 0x1E, 0x3F, 0x43, 0xA6, 0x20, 0x02, + /* 08F0 */ 0xB2, 0xA2, 0x97, 0x88, 0x80, 0x2C, 0x0F, 0x44, + /* 08F8 */ 0x40, 0x96, 0x62, 0x08, 0x88, 0x09, 0x03, 0x11, + /* 0900 */ 0x90, 0x23, 0x01, 0xD1, 0x80, 0x40, 0x54, 0x9E, + /* 0908 */ 0x23, 0x20, 0xA6, 0x15, 0x44, 0x40, 0x0E, 0x08, + /* 0910 */ 0x44, 0xD3, 0x02, 0x51, 0x8D, 0xBF, 0x25, 0x01, + /* 0918 */ 0x59, 0x30, 0x88, 0x80, 0x2C, 0xCE, 0xD2, 0x51, + /* 0920 */ 0x80, 0x82, 0x08, 0xC8, 0x31, 0x35, 0x0D, 0x95, + /* 0928 */ 0x82, 0x08, 0xC8, 0x42, 0x3D, 0x01, 0x31, 0xD5, + /* 0930 */ 0x20, 0x02, 0xB2, 0x42, 0x51, 0x40, 0x4C, 0x2F, + /* 0938 */ 0x88, 0x06, 0x49, 0x80, 0x68, 0x6E, 0x20, 0xAA, + /* 0940 */ 0x5A, 0x15, 0x10, 0x8B, 0x00, 0x22, 0x20, 0xE7, + /* 0948 */ 0x06, 0xA2, 0x22, 0x5C, 0x01, 0x31, 0xE9, 0x20, + /* 0950 */ 0x02, 0x72, 0x0E, 0x20, 0xAA, 0xF9, 0x49, 0x21, + /* 0958 */ 0x20, 0x27, 0x00, 0x11, 0x90, 0xF3, 0xDB, 0x3A, + /* 0960 */ 0x1A, 0xD0, 0x87, 0x8E, 0x80, 0x9C, 0x00, 0x44, + /* 0968 */ 0x40, 0x8E, 0x03, 0x44, 0xA5, 0xFB, 0x02, 0x62, + /* 0970 */ 0x41, 0x40, 0x04, 0x64, 0x41, 0xAF, 0x11, 0x0D, + /* 0978 */ 0x9C, 0x80, 0x08, 0xC8, 0xD1, 0x8C, 0x01, 0xB1, + /* 0980 */ 0x9C, 0x20, 0x02, 0xFA, 0xFF, 0x1F, 0xA8, 0xBE, + /* 0988 */ 0x22, 0x02, 0xB2, 0x52, 0x10, 0x0D, 0x9A, 0x00, + /* 0990 */ 0xD1, 0xB4, 0x40, 0x54, 0xF1, 0x9B, 0xE4, 0xD1, + /* 0998 */ 0x81, 0x81, 0xE8, 0x88, 0x40, 0xA4, 0x1D, 0x11, + /* 09A0 */ 0x28, 0x88, 0x80, 0xFC, 0xFF, 0x07 + }) + Method (SPEC, 1, Serialized) + { + Return (AMWV) + } + + Method (DEVP, 1, Serialized) + { + CreateDWordField (Arg0, Zero, DVID) + CreateDWordField (Arg0, 0x04, PARA) + If (LEqual (PARA, One)) + { + Name (_T_0, Zero) + Store (DVID, _T_0) + If (LEqual (_T_0, 0x00010011)) + { + Or (\_SB.DSAF, One, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00010013)) + { + Or (\_SB.DSAF, 0x02, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00010023)) + { + Or (\_SB.DSAF, 0x04, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00060013)) + { + Or (\_SB.DSAF, 0x08, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00060015)) + { + Or (\_SB.DSAF, 0x10, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00010015)) + { + Or (\_SB.DSAF, 0x20, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00090011)) + { + Or (\_SB.DSAF, 0x40, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00070011)) + { + Or (\_SB.DSAF, 0x80, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00080013)) + { + Or (\_SB.DSAF, 0x0100, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00010019)) + { + Or (\_SB.DSAF, 0x0200, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00010017)) + { + Or (\_SB.DSAF, 0x0400, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00050011)) + { + Or (\_SB.DSAF, 0x0800, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00050012)) + { + Or (\_SB.DSAF, 0x1000, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00060017)) + { + Or (\_SB.DSAF, 0x2000, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00080021)) + { + Or (\_SB.DSAF, 0x4000, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00100011)) + { + Or (\_SB.DSAF, 0x8000, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00050001)) + { + Or (\_SB.DSAF, 0x00010000, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00120000)) + { + Or (\_SB.DSAF, 0x00020000, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00120021)) + { + Or (\_SB.DSAF, 0x00040000, \_SB.DSAF) + } + Else + { + If (LEqual (_T_0, 0x00120011)) + { + Or (\_SB.DSAF, 0x00080000, \_SB.DSAF) + } + Else + { + Return (Zero) + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + Else + { + If (LEqual (PARA, Zero)) + { + Name (_T_1, Zero) + Store (DVID, _T_1) + If (LEqual (_T_1, 0x00010011)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFFFFFE, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00010013)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFFFFFD, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00010023)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFFFFFB, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00060013)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFFFFF7, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00060015)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFFFFEF, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00010015)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFFFFDF, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00090011)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFFFFBF, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00070011)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFFFF7F, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00080013)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFFFEFF, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00010019)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFFFDFF, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00010017)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFFFBFF, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00050011)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFFF7FF, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00050012)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFFEFFF, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00060017)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFFDFFF, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00080021)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFFBFFF, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00100011)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFF7FFF, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00050001)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFEFFFF, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00120000)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFDFFFF, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00120021)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFFBFFFF, \_SB.DSAF) + } + Else + { + If (LEqual (_T_1, 0x00120011)) + { + And (\_SB.DSAF, 0xFFFFFFFFFFF7FFFF, \_SB.DSAF) + } + Else + { + Return (Zero) + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + + Return (One) + } + + Method (SDSP, 1, Serialized) + { + CreateDWordField (Arg0, Zero, ACTN) + Return (Zero) + } + + Method (GDSP, 1, Serialized) + { + CreateDWordField (Arg0, Zero, ACTN) + Return (Zero) + } + + Method (DEVS, 1, Serialized) + { + CreateDWordField (Arg0, Zero, DVID) + CreateDWordField (Arg0, 0x04, CPAR) + Name (_T_0, Zero) + Store (DVID, _T_0) + If (LEqual (_T_0, Zero)) + { + Return (Zero) + } + Else + { + Return (Zero) + } + } + + Method (DSTS, 1, Serialized) + { + CreateDWordField (Arg0, Zero, DVID) + Name (_T_0, Zero) + Store (DVID, _T_0) + If (LEqual (_T_0, 0xA0000000)) + { + Store (One, Local0) + } + Else + { + If (LEqual (_T_0, Zero)) + { + Return (Zero) + } + Else + { + Store (Zero, Local0) + } + } + + And (Local0, 0x0007FFFF, Local0) + Return (Local0) + } + + Method (GPID, 0, Serialized) + { + Return (Zero) + } + + Method (KBFT, 1, Serialized) + { + Return (Zero) + } + + Method (HKEY, 0, Serialized) + { + Return (Zero) + } + + Method (CFVS, 1, Serialized) + { + } + + Method (CFVG, 0, Serialized) + { + } + } + } + + Scope (_SB) + { + Name (RAMB, 0xDCB94018) + OperationRegion (\RAMW, SystemMemory, RAMB, 0x00010000) + Field (RAMW, ByteAcc, NoLock, Preserve) + { + DSAF, 256, + PAR0, 32, + PAR1, 32, + PAR2, 32, + PINX, 32, + PADD, 2048 + } + + Mutex (MPAR, 0x00) + Name (ARBF, Buffer (0x10) {}) + CreateDWordField (ARBF, Zero, REAX) + CreateDWordField (ARBF, 0x04, REBX) + CreateDWordField (ARBF, 0x08, RECX) + CreateDWordField (ARBF, 0x0C, REDX) + OperationRegion (IOB2, SystemIO, SMIP, 0x02) + Field (IOB2, ByteAcc, NoLock, Preserve) + { + SMIC, 8, + SMIS, 8 + } + + Method (ISMI, 1, Serialized) + { + Store (Arg0, SMIC) + } + + Method (GMSR, 1, Serialized) + { + If (LEqual (Acquire (MPAR, 0xFFFF), Zero)) + { + Store (0x80000000, PINX) + Store (Arg0, PAR0) + ISMI (0x90) + Store (Arg0, RECX) + Store (PAR1, REAX) + Store (PAR2, REDX) + Release (MPAR) + Return (ARBF) + } + + Return (Ones) + } + + Method (SMSR, 1, Serialized) + { + If (LEqual (Acquire (MPAR, 0xFFFF), Zero)) + { + CreateDWordField (Arg0, Zero, AEAX) + CreateDWordField (Arg0, 0x04, AEBX) + CreateDWordField (Arg0, 0x08, AECX) + CreateDWordField (Arg0, 0x0C, AEDX) + Store (0x80000001, PINX) + Store (AECX, PAR0) + Store (AEAX, PAR1) + Store (AEDX, PAR2) + ISMI (0x90) + Release (MPAR) + } + + Return (Ones) + } + + Method (PRID, 1, Serialized) + { + If (LEqual (Acquire (MPAR, 0xFFFF), Zero)) + { + Store (0x80000002, PINX) + Store (Arg0, PAR0) + ISMI (0x90) + Store (PAR1, REAX) + Store (PAR2, REDX) + Release (MPAR) + Return (ARBF) + } + + Return (Ones) + } + + Method (GPRE, 1, Serialized) + { + Store (Arg0, PAR0) + Store (0x80000005, PINX) + ISMI (0x90) + Return (PAR0) + } + + Method (GNVS, 1, Serialized) + { + Store (Arg0, PAR0) + Store (0x80000003, PINX) + ISMI (0x90) + Return (PAR1) + } + + Method (SNVS, 2, Serialized) + { + Store (Arg0, PAR0) + Store (Arg1, PAR1) + Store (0x80000004, PINX) + ISMI (0x90) + } + + Method (SARM, 1, Serialized) + { + If (LAnd (LGreater (Arg0, 0x03), LLess (Arg0, 0x06))) + { + ISMI (0x92) + } + } + + Method (GAMM, 0, Serialized) + { + ISMI (0x91) + } + + Method (SAMM, 0, Serialized) + { + ISMI (0x92) + } + } + + Scope (_SB.PCI0.LPCB) + { + Method (S1RS, 1, NotSerialized) + { + Store (Zero, PLED) + } + + OperationRegion (GPBX, SystemIO, GPBS, GPLN) + Field (GPBX, ByteAcc, NoLock, Preserve) + { + Offset (0x18), + , 27, + PLED, 1 + } + } + + Scope (_SB.PCI0.LPCB) + { + Device (H_EC) + { + Name (_HID, EisaId ("PNP0C09")) + Name (_UID, One) + Method (_STA, 0, NotSerialized) + { + Store (0x03, ^^^GFX0.CLID) + Return (Zero) + } + + Name (B1CC, Zero) + Name (B1ST, Zero) + Name (B2CC, Zero) + Name (B2ST, Zero) + Name (CFAN, Zero) + Name (CMDR, Zero) + Name (DOCK, Zero) + Name (EJET, Zero) + Name (MCAP, Zero) + Name (PLMX, Zero) + Name (PECH, Zero) + Name (PECL, Zero) + Name (PENV, Zero) + Name (PINV, Zero) + Name (PPSH, Zero) + Name (PPSL, Zero) + Name (PSTP, Zero) + Name (RPWR, Zero) + Name (LSTE, Zero) + Name (SLPC, Zero) + Name (VPWR, Zero) + Method (ECMD, 1, Serialized) + { + If (ECON) + { + While (CMDR) + { + Stall (0x14) + } + + Store (Arg0, CMDR) + } + } + + Device (BAT0) + { + Name (_HID, EisaId ("PNP0C0A")) + Name (_UID, Zero) + Method (_STA, 0, NotSerialized) + { + Return (Zero) + } + } + + Scope (\) + { + Field (GNVS, AnyAcc, Lock, Preserve) + { + Offset (0x1E), + BNUM, 8, + Offset (0x20), + B1SC, 8, + Offset (0x23), + B1SS, 8 + } + } + + Device (BAT1) + { + Name (_HID, EisaId ("PNP0C0A")) + Name (_UID, One) + Method (_STA, 0, NotSerialized) + { + Return (Zero) + } + } + + Scope (\) + { + Field (GNVS, AnyAcc, Lock, Preserve) + { + Offset (0x21), + B2SC, 8, + Offset (0x24), + B2SS, 8 + } + } + + Device (BAT2) + { + Name (_HID, EisaId ("PNP0C0A")) + Name (_UID, 0x02) + Method (_STA, 0, NotSerialized) + { + Return (Zero) + } + } + } + } + + Device (_SB.PCI0.DOCK) + { + Name (_HID, "ABCDEFGH") + Name (_CID, EisaId ("PNP0C15")) + Name (_UID, 0x02) + Method (_STA, 0, NotSerialized) + { + Return (Zero) + } + } + + Scope (_SB) + { + Device (LID0) + { + Name (_HID, EisaId ("PNP0C0D")) + Method (_STA, 0, NotSerialized) + { + Return (Zero) + } + } + } + + Name (_S0, Package (0x04) + { + Zero, + Zero, + Zero, + Zero + }) + If (SS1) + { + Name (_S1, Package (0x04) + { + One, + Zero, + Zero, + Zero + }) + } + + If (SS3) + { + Name (_S3, Package (0x04) + { + 0x05, + Zero, + Zero, + Zero + }) + } + + If (SS4) + { + Name (_S4, Package (0x04) + { + 0x06, + Zero, + Zero, + Zero + }) + } + + Name (_S5, Package (0x04) + { + 0x07, + Zero, + Zero, + Zero + }) + Method (PTS, 1, NotSerialized) + { + If (Arg0) + { + \_SB.PCI0.LPCB.SPTS (Arg0) + \_SB.PCI0.NPTS (Arg0) + \_SB.SARM (Arg0) + \_SB.PCI0.LPCB.SIOS (Arg0) + } + } + + Method (WAK, 1, NotSerialized) + { + \_SB.PCI0.LPCB.SWAK (Arg0) + \_SB.PCI0.NWAK (Arg0) + \_SB.PCI0.LPCB.S1RS (Arg0) + \_SB.PCI0.LPCB.SIOW (Arg0) + } +} + From 2b45d5803d68b82462fd5418566a6cc1c96690cc Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 22 Mar 2013 23:36:16 +0100 Subject: [PATCH 336/623] Factory DSDT with 64MB IGPU memory selected --- i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl b/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl index 1ad45bd..29bf61a 100644 --- a/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl +++ b/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl @@ -3,13 +3,13 @@ * AML Disassembler version 20110316-64 [Mar 16 2011] * Copyright (c) 2000 - 2011 Intel Corporation * - * Disassembly of dsdt-factory-32mb-igpu.aml, Wed Mar 20 12:38:18 2013 + * Disassembly of dsdt-factory-64mb-igpu.aml, Wed Mar 20 12:29:46 2013 * * Original Table Header: * Signature "DSDT" * Length 0x0000BAFE (47870) * Revision 0x02 - * Checksum 0x72 + * Checksum 0x78 * OEM ID "ALASKA" * OEM Table ID "A M I" * OEM Revision 0x00000015 (21) @@ -17,7 +17,7 @@ * Compiler Version 0x20051117 (537202967) */ -DefinitionBlock ("dsdt-factory-32mb-igpu.aml", "DSDT", 2, "ALASKA", "A M I", 0x00000015) +DefinitionBlock ("dsdt-factory-64mb-igpu.aml", "DSDT", 2, "ALASKA", "A M I", 0x00000015) { External (TNOT, MethodObj) // 0 Arguments External (PDC7) @@ -148,7 +148,7 @@ DefinitionBlock ("dsdt-factory-32mb-igpu.aml", "DSDT", 2, "ALASKA", "A M I", 0x0 Name (TOPM, 0x00000000) Name (ROMS, 0xFFE00000) Name (VGAF, One) - OperationRegion (GNVS, SystemMemory, 0xDCBB2E18, 0x01CB) + OperationRegion (GNVS, SystemMemory, 0xDABB2E18, 0x01CB) Field (GNVS, AnyAcc, Lock, Preserve) { OSYS, 16, @@ -8308,7 +8308,7 @@ DefinitionBlock ("dsdt-factory-32mb-igpu.aml", "DSDT", 2, "ALASKA", "A M I", 0x0 Scope (_SB.PCI0.LPCB) { - OperationRegion (CPSB, SystemMemory, 0xDCBC5F98, 0x10) + OperationRegion (CPSB, SystemMemory, 0xDABC5F98, 0x10) Field (CPSB, AnyAcc, NoLock, Preserve) { RTCX, 1, @@ -12627,7 +12627,7 @@ DefinitionBlock ("dsdt-factory-32mb-igpu.aml", "DSDT", 2, "ALASKA", "A M I", 0x0 Scope (_SB) { - Name (RAMB, 0xDCB94018) + Name (RAMB, 0xDAB94018) OperationRegion (\RAMW, SystemMemory, RAMB, 0x00010000) Field (RAMW, ByteAcc, NoLock, Preserve) { From 0ae44573ffb436408e8e7db5a30fb5b6b011ace3 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 22 Mar 2013 23:43:25 +0100 Subject: [PATCH 337/623] And now with all cruft removed, down from 47870 bytes to 6765 bytes (dsdt.aml) down from 429475 bytes to 48,215 bytes (dsdt.dsl) down from 12962 lines to 1240 lines --- .../acpi/examples/P8Z68-V PRO/dsdt.dsl | 13664 ++-------------- 1 file changed, 970 insertions(+), 12694 deletions(-) diff --git a/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl b/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl index 29bf61a..9a0bd03 100644 --- a/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl +++ b/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl @@ -3,12960 +3,1236 @@ * AML Disassembler version 20110316-64 [Mar 16 2011] * Copyright (c) 2000 - 2011 Intel Corporation * - * Disassembly of dsdt-factory-64mb-igpu.aml, Wed Mar 20 12:29:46 2013 - * * Original Table Header: * Signature "DSDT" - * Length 0x0000BAFE (47870) + * Length 0x00001EE2 (7906) * Revision 0x02 - * Checksum 0x78 - * OEM ID "ALASKA" - * OEM Table ID "A M I" - * OEM Revision 0x00000015 (21) + * Checksum 0x7F + * OEM ID "APPLE" + * OEM Table ID "Macmini" + * OEM Revision 0x00050001 (327681) * Compiler ID "INTL" - * Compiler Version 0x20051117 (537202967) + * Compiler Version 0x20110316 (537985814) */ -DefinitionBlock ("dsdt-factory-64mb-igpu.aml", "DSDT", 2, "ALASKA", "A M I", 0x00000015) +DefinitionBlock ("dsdt.aml", "DSDT", 2, "APPLE", "Macmini", 0x00050001) { - External (TNOT, MethodObj) // 0 Arguments - External (PDC7) - External (PDC6) - External (PDC5) - External (PDC4) - External (PDC3) - External (PDC2) - External (PDC1) - External (PDC0) - External (CFGD) - External (HNOT, MethodObj) // 1 Arguments - External (SNXD) - External (HWID, IntObj) - External (IDAB, MethodObj) // 0 Arguments - External (HDOS, MethodObj) // 0 Arguments - External (ECST, MethodObj) // 1 Arguments - External (\_PR_.APSV) - External (\_PR_.AAC0) - External (\_PR_.ACRT) - External (\_PR_.CPU0._PPC) - External (\_SB_.PCI0.IEIT.EITV, MethodObj) // 0 Arguments - - Name (SP1O, 0x2E) - Name (IO1B, Zero) - Name (IO1L, Zero) - Name (IO2B, Zero) - Name (IO2L, Zero) - Name (IO3B, 0x0290) - Name (IO3L, 0x10) - Name (IOES, Zero) - Name (WKTP, Zero) - Name (SPIO, 0x2E) - Name (IOHW, 0x0290) - Name (IOSB, Zero) - Name (IOSL, 0x10) - Name (IOHB, 0x0290) - Name (IOHL, 0x10) - Name (SMBS, 0x0580) - Name (SMBL, 0x20) - Name (PMBS, 0x0400) - Name (PMLN, 0x80) - Name (GPBS, 0x0500) - Name (GPLN, 0x80) - Name (SMIP, 0xB2) - Name (APCB, 0xFEC00000) - Name (APCL, 0x1000) - Name (SMCR, 0x0430) Name (HPTB, 0xFED00000) - Name (HPTC, 0xFED1F404) - Name (FLSZ, 0x00800000) Name (SRCB, 0xFED1C000) - Name (RCLN, 0x4000) - Name (TCBR, 0xFED08000) - Name (TCLT, 0x1000) + Name (HPTC, 0xFED1F404) + Name (MCHB, 0xFED10000) + Name (EGPB, 0xFED19000) Name (PEBS, 0xF8000000) Name (PELN, 0x04000000) - Name (LAPB, 0xFEE00000) - Name (EGPB, 0xFED19000) - Name (MCHB, 0xFED10000) Name (VTBS, 0xFED90000) Name (VTLN, 0x4000) - Name (ACPH, 0xDE) - Name (ASSB, Zero) - Name (AOTB, Zero) - Name (AAXB, Zero) - Name (PEHP, One) - Name (SHPC, Zero) - Name (PEPM, One) - Name (PEER, One) - Name (PECS, One) - Name (ITKE, Zero) - Name (MBEC, 0xFFFF) - Name (AMWV, 0x09) - Name (FMBL, One) - Name (FDTP, 0x02) - Name (FUPS, 0x03) - Name (FUWS, 0x04) - Name (BSH, Zero) - Name (BEL, One) - Name (BEH, 0x02) - Name (BRH, 0x03) - Name (BTF, 0x04) - Name (BHC, 0x05) - Name (BYB, 0x06) - Name (BPH, 0x07) - Name (BSHS, 0x08) - Name (BELC, 0x09) - Name (BRHP, 0x0A) - Name (BTFC, 0x0B) - Name (BEHP, 0x0C) - Name (BPHS, 0x0D) - Name (BELP, 0x0E) - Name (BTL, 0x10) - Name (BTFP, 0x11) - Name (BSR, 0x14) - Name (BOF, 0x20) - Name (BEF, 0x21) - Name (BLLE, 0x22) - Name (BLLC, 0x23) - Name (BLCA, 0x24) - Name (BLLS, 0x25) - Name (BLLP, 0x26) - Name (BLLD, 0x27) - Name (BHBE, 0x30) - Name (BHBC, 0x31) - Name (BHBN, 0x32) - Name (BHBM, 0x33) - Name (TRTP, One) - Name (WDTE, One) - Name (TRTD, 0x02) - Name (TRTI, 0x03) - Name (GCDD, One) - Name (DSTA, 0x0A) - Name (DSLO, 0x0C) - Name (DSLC, 0x0E) - Name (PITS, 0x10) - Name (SBCS, 0x12) - Name (SALS, 0x13) - Name (LSSS, 0x2A) - Name (SOOT, 0x35) - Name (PDBR, 0x4D) - Name (SS1, One) - Name (SS2, Zero) - Name (SS3, One) - Name (SS4, One) - Name (IOST, 0x0000) - Name (TOPM, 0x00000000) - Name (ROMS, 0xFFE00000) - Name (VGAF, One) - OperationRegion (GNVS, SystemMemory, 0xDABB2E18, 0x01CB) + Name (LAPB, 0xFEE00000) + Name (APCB, 0xFEC00000) + Name (TCBR, 0xFED08000) + Name (PMBS, 0x0400) + Name (SMCR, 0x0430) + Name (GPBS, 0x0500) + Name (RCLN, 0x4000) + Name (TCLT, 0x1000) + Name (OPRE, 0xDCBB2E18) + + OperationRegion (GNVS, SystemMemory, OPRE, 0x01CB) Field (GNVS, AnyAcc, Lock, Preserve) { - OSYS, 16, - SMIF, 8, - PRM0, 8, - PRM1, 8, - SCIF, 8, - PRM2, 8, - PRM3, 8, - LCKF, 8, - PRM4, 8, - PRM5, 8, - P80D, 32, - LIDS, 8, - PWRS, 8, - DBGS, 8, - THOF, 8, - ACT1, 8, - ACTT, 8, - PSVT, 8, - TC1V, 8, - TC2V, 8, - TSPV, 8, - CRTT, 8, - DTSE, 8, - DTS1, 8, - DTS2, 8, - DTSF, 8, - Offset (0x25), - REVN, 8, - RES3, 8, - Offset (0x28), - APIC, 8, - TCNT, 8, - PCP0, 8, - PCP1, 8, - PPCM, 8, - PPMF, 32, - C67L, 8, - NATP, 8, - CMAP, 8, - CMBP, 8, - LPTP, 8, - FDCP, 8, - CMCP, 8, - CIRP, 8, - SMSC, 8, - W381, 8, - SMC1, 8, - IGDS, 8, - TLST, 8, - CADL, 8, - PADL, 8, - CSTE, 16, - NSTE, 16, - SSTE, 16, - NDID, 8, - DID1, 32, - DID2, 32, - DID3, 32, - DID4, 32, - DID5, 32, - KSV0, 32, - KSV1, 8, - Offset (0x67), - BLCS, 8, - BRTL, 8, - ALSE, 8, - ALAF, 8, - LLOW, 8, - LHIH, 8, - Offset (0x6E), - EMAE, 8, - EMAP, 16, - EMAL, 16, - Offset (0x74), - MEFE, 8, - DSTS, 8, - Offset (0x78), - TPMP, 8, - TPME, 8, - MORD, 8, - TCGP, 8, - PPRP, 32, - PPRQ, 8, - LPPR, 8, - GTF0, 56, - GTF2, 56, - IDEM, 8, - GTF1, 56, - BID, 8, - PLID, 8, + Offset (0x0B), + P80D, 32, + Offset (0x3C), + IGDS, 8, Offset (0xAA), ASLB, 32, - IBTT, 8, - IPAT, 8, - ITVF, 8, - ITVM, 8, - IPSC, 8, - IBLC, 8, - IBIA, 8, - ISSC, 8, - I409, 8, - I509, 8, - I609, 8, - I709, 8, - IPCF, 8, - IDMS, 8, - IF1E, 8, - HVCO, 8, - NXD1, 32, - NXD2, 32, - NXD3, 32, - NXD4, 32, - NXD5, 32, - NXD6, 32, - NXD7, 32, - NXD8, 32, - GSMI, 8, - PAVP, 8, - Offset (0xE1), - OSCC, 8, - NEXP, 8, - SBV1, 8, - SBV2, 8, - Offset (0xEB), - DSEN, 8, - ECON, 8, - GPIC, 8, - CTYP, 8, - L01C, 8, - VFN0, 8, - VFN1, 8, - VFN2, 8, - VFN3, 8, - VFN4, 8, - Offset (0x100), - NVGA, 32, - NVHA, 32, - AMDA, 32, - DID6, 32, - DID7, 32, - DID8, 32, - EBAS, 32, - CPSP, 32, - EECP, 32, - EVCP, 32, - XBAS, 32, - OBS1, 32, - OBS2, 32, - OBS3, 32, - OBS4, 32, - OBS5, 32, - OBS6, 32, - OBS7, 32, - OBS8, 32, - Offset (0x157), - ATMC, 8, - PTMC, 8, - ATRA, 8, - PTRA, 8, - PNHM, 32, + Offset (0xEF), + L01C, 8, + Offset (0x15F), TBAB, 32, - TBAH, 32, - RTIP, 8, - TSOD, 8, - ATPC, 8, - PTPC, 8, - PFLV, 8, - BREV, 8, - SGMD, 8, - SGFL, 8, - PWOK, 8, - HLRS, 8, - DSEL, 8, - ESEL, 8, - PSEL, 8, - PWEN, 8, - PRST, 8, - MXD1, 32, - MXD2, 32, - MXD3, 32, - MXD4, 32, - MXD5, 32, - MXD6, 32, - MXD7, 32, - MXD8, 32, - GBAS, 16, - SGGP, 8, - PXFX, 8, - PXDY, 8, - PXFD, 8, - Offset (0x19D), - ALFP, 8, - IMON, 8, - PDTS, 8, - PKGA, 8, - PAMT, 8, - AC0F, 8, - AC1F, 8, - DTS3, 8, - DTS4, 8, - Offset (0x1B2), - XHCI, 8, - XHPM, 8, - Offset (0x1B7), - XTUB, 32, - XTUS, 32, - XMPB, 32, - Offset (0x1C4), - LPMV, 8, - AOAC, 8, - SLDR, 32, - E4GM, 8 } - Scope (_SB) + OperationRegion (PMIO, SystemIO, PMBS, 0x43) + Field (PMIO, ByteAcc, NoLock, Preserve) { - Name (PR00, Package (0x24) - { - Package (0x04) - { - 0x001FFFFF, - Zero, - LNKF, - Zero - }, - - Package (0x04) - { - 0x001FFFFF, - One, - LNKD, - Zero - }, - - Package (0x04) - { - 0x001FFFFF, - 0x02, - LNKC, - Zero - }, - - Package (0x04) - { - 0x001FFFFF, - 0x03, - LNKA, - Zero - }, - - Package (0x04) - { - 0x0014FFFF, - Zero, - LNKA, - Zero - }, - - Package (0x04) - { - 0x001DFFFF, - One, - LNKD, - Zero - }, - - Package (0x04) - { - 0x001DFFFF, - 0x02, - LNKA, - Zero - }, - - Package (0x04) - { - 0x001DFFFF, - 0x03, - LNKC, - Zero - }, - - Package (0x04) - { - 0x001DFFFF, - Zero, - LNKH, - Zero - }, - - Package (0x04) - { - 0x001AFFFF, - Zero, - LNKA, - Zero - }, - - Package (0x04) - { - 0x001AFFFF, - One, - LNKF, - Zero - }, - - Package (0x04) - { - 0x001AFFFF, - 0x02, - LNKC, - Zero - }, - - Package (0x04) - { - 0x001AFFFF, - 0x03, - LNKD, - Zero - }, - - Package (0x04) - { - 0x001BFFFF, - Zero, - LNKG, - Zero - }, - - Package (0x04) - { - 0x0016FFFF, - Zero, - LNKA, - Zero - }, - - Package (0x04) - { - 0x0016FFFF, - One, - LNKD, - Zero - }, - - Package (0x04) - { - 0x0016FFFF, - 0x02, - LNKC, - Zero - }, - - Package (0x04) - { - 0x0016FFFF, - 0x03, - LNKB, - Zero - }, - - Package (0x04) - { - 0x001CFFFF, - Zero, - LNKA, - Zero - }, - - Package (0x04) - { - 0x001CFFFF, - One, - LNKB, - Zero - }, - - Package (0x04) - { - 0x001CFFFF, - 0x02, - LNKC, - Zero - }, - - Package (0x04) - { - 0x001CFFFF, - 0x03, - LNKD, - Zero - }, - - Package (0x04) - { - 0x0001FFFF, - Zero, - LNKA, - Zero - }, - - Package (0x04) - { - 0x0001FFFF, - One, - LNKB, - Zero - }, - - Package (0x04) - { - 0x0001FFFF, - 0x02, - LNKC, - Zero - }, - - Package (0x04) - { - 0x0001FFFF, - 0x03, - LNKD, - Zero - }, - - Package (0x04) - { - 0x0006FFFF, - Zero, - LNKD, - Zero - }, - - Package (0x04) - { - 0x0006FFFF, - One, - LNKA, - Zero - }, - - Package (0x04) - { - 0x0006FFFF, - 0x02, - LNKB, - Zero - }, - - Package (0x04) - { - 0x0006FFFF, - 0x03, - LNKC, - Zero - }, + Offset (0x42), + , 1, + GPEC, 1 + } - Package (0x04) - { - 0x0004FFFF, - Zero, - LNKA, - Zero - }, + OperationRegion (GPIO, SystemIO, GPBS, 0x10) + Field (GPIO, ByteAcc, NoLock, Preserve) + { + Offset (0x0F), + GP24, 1, + , 2, + GP27, 1 + } - Package (0x04) - { - 0x0004FFFF, - One, - LNKB, - Zero - }, + OperationRegion (DEB0, SystemIO, 0x80, One) + Field (DEB0, ByteAcc, NoLock, Preserve) + { + DBG8, 8 + } - Package (0x04) - { - 0x0004FFFF, - 0x02, - LNKC, - Zero - }, + OperationRegion (PRT0, SystemIO, 0x80, 0x04) + Field (PRT0, DWordAcc, Lock, Preserve) + { + P80H, 32 + } - Package (0x04) - { - 0x0004FFFF, - 0x03, - LNKD, - Zero - }, + Method (_PIC, 1, NotSerialized) + { + } - Package (0x04) - { - 0x0002FFFF, - Zero, - LNKA, - Zero - }, + Scope (_PR) + { + Processor (CPU0, 0x01, 0x00000410, 0x06) {} + Processor (CPU1, 0x02, 0x00000410, 0x06) {} + Processor (CPU2, 0x03, 0x00000410, 0x06) {} + Processor (CPU3, 0x04, 0x00000410, 0x06) {} + } - Package (0x04) - { - 0x0019FFFF, - Zero, - LNKE, - Zero - } - }) - Name (AR00, Package (0x24) + Scope (_SB) + { + OperationRegion (IOB2, SystemIO, 0xB2, One) + Field (IOB2, ByteAcc, NoLock, Preserve) { - Package (0x04) - { - 0x001FFFFF, - Zero, - Zero, - 0x15 - }, - - Package (0x04) - { - 0x001FFFFF, - One, - Zero, - 0x13 - }, - - Package (0x04) - { - 0x001FFFFF, - 0x02, - Zero, - 0x12 - }, - - Package (0x04) - { - 0x001FFFFF, - 0x03, - Zero, - 0x10 - }, - - Package (0x04) - { - 0x0014FFFF, - Zero, - Zero, - 0x10 - }, - - Package (0x04) - { - 0x001DFFFF, - One, - Zero, - 0x13 - }, - - Package (0x04) - { - 0x001DFFFF, - 0x02, - Zero, - 0x10 - }, - - Package (0x04) - { - 0x001DFFFF, - 0x03, - Zero, - 0x12 - }, - - Package (0x04) - { - 0x001DFFFF, - Zero, - Zero, - 0x17 - }, - - Package (0x04) - { - 0x001AFFFF, - Zero, - Zero, - 0x10 - }, - - Package (0x04) - { - 0x001AFFFF, - One, - Zero, - 0x15 - }, - - Package (0x04) - { - 0x001AFFFF, - 0x02, - Zero, - 0x12 - }, - - Package (0x04) - { - 0x001AFFFF, - 0x03, - Zero, - 0x13 - }, - - Package (0x04) - { - 0x001BFFFF, - Zero, - Zero, - 0x16 - }, - - Package (0x04) - { - 0x0016FFFF, - Zero, - Zero, - 0x10 - }, - - Package (0x04) - { - 0x0016FFFF, - One, - Zero, - 0x13 - }, - - Package (0x04) - { - 0x0016FFFF, - 0x02, - Zero, - 0x12 - }, - - Package (0x04) - { - 0x0016FFFF, - 0x03, - Zero, - 0x11 - }, - - Package (0x04) - { - 0x001CFFFF, - Zero, - Zero, - 0x10 - }, - - Package (0x04) - { - 0x001CFFFF, - One, - Zero, - 0x11 - }, - - Package (0x04) - { - 0x001CFFFF, - 0x02, - Zero, - 0x12 - }, - - Package (0x04) - { - 0x001CFFFF, - 0x03, - Zero, - 0x13 - }, - - Package (0x04) - { - 0x0001FFFF, - Zero, - Zero, - 0x10 - }, - - Package (0x04) - { - 0x0001FFFF, - One, - Zero, - 0x11 - }, - - Package (0x04) - { - 0x0001FFFF, - 0x02, - Zero, - 0x12 - }, - - Package (0x04) - { - 0x0001FFFF, - 0x03, - Zero, - 0x13 - }, - - Package (0x04) - { - 0x0006FFFF, - Zero, - Zero, - 0x13 - }, - - Package (0x04) - { - 0x0006FFFF, - One, - Zero, - 0x10 - }, - - Package (0x04) - { - 0x0006FFFF, - 0x02, - Zero, - 0x11 - }, - - Package (0x04) - { - 0x0006FFFF, - 0x03, - Zero, - 0x12 - }, + SMIC, 8 + } - Package (0x04) + Device (PCI0) + { + Name (_ADR, Zero) + Name (_UID, Zero) + Name (_BBN, Zero) + Name (_CID, EisaId ("PNP0A03")) + Name (_HID, EisaId ("PNP0A08")) + Name (_PRT, Package (0x24) + { + Package (0x04) { 0x001FFFFF, Zero, Zero, 0x15 }, + Package (0x04) { 0x001FFFFF, One, Zero, 0x13 }, + Package (0x04) { 0x001FFFFF, 0x02, Zero, 0x12 }, + Package (0x04) { 0x001FFFFF, 0x03, Zero, 0x10 }, + Package (0x04) { 0x0014FFFF, Zero, Zero, 0x10 }, + Package (0x04) { 0x001DFFFF, One, Zero, 0x13 }, + Package (0x04) { 0x001DFFFF, 0x02, Zero, 0x10 }, + Package (0x04) { 0x001DFFFF, 0x03, Zero, 0x12 }, + Package (0x04) { 0x001DFFFF, Zero, Zero, 0x17 }, + Package (0x04) { 0x001AFFFF, Zero, Zero, 0x10 }, + Package (0x04) { 0x001AFFFF, One, Zero, 0x15 }, + Package (0x04) { 0x001AFFFF, 0x02, Zero, 0x12 }, + Package (0x04) { 0x001AFFFF, 0x03, Zero, 0x13 }, + Package (0x04) { 0x001BFFFF, Zero, Zero, 0x16 }, + Package (0x04) { 0x0016FFFF, Zero, Zero, 0x10 }, + Package (0x04) { 0x0016FFFF, One, Zero, 0x13 }, + Package (0x04) { 0x0016FFFF, 0x02, Zero, 0x12 }, + Package (0x04) { 0x0016FFFF, 0x03, Zero, 0x11 }, + Package (0x04) { 0x001CFFFF, Zero, Zero, 0x10 }, + Package (0x04) { 0x001CFFFF, One, Zero, 0x11 }, + Package (0x04) { 0x001CFFFF, 0x02, Zero, 0x12 }, + Package (0x04) { 0x001CFFFF, 0x03, Zero, 0x13 }, + Package (0x04) { 0x0001FFFF, Zero, Zero, 0x10 }, + Package (0x04) { 0x0001FFFF, One, Zero, 0x11 }, + Package (0x04) { 0x0001FFFF, 0x02, Zero, 0x12 }, + Package (0x04) { 0x0001FFFF, 0x03, Zero, 0x13 }, + Package (0x04) { 0x0006FFFF, Zero, Zero, 0x13 }, + Package (0x04) { 0x0006FFFF, One, Zero, 0x10 }, + Package (0x04) { 0x0006FFFF, 0x02, Zero, 0x11 }, + Package (0x04) { 0x0006FFFF, 0x03, Zero, 0x12 }, + Package (0x04) { 0x0004FFFF, Zero, Zero, 0x10 }, + Package (0x04) { 0x0004FFFF, One, Zero, 0x11 }, + Package (0x04) { 0x0004FFFF, 0x02, Zero, 0x12 }, + Package (0x04) { 0x0004FFFF, 0x03, Zero, 0x13 }, + Package (0x04) { 0x0002FFFF, Zero, Zero, 0x10 }, + Package (0x04) { 0x0019FFFF, Zero, Zero, 0x14 } + }) + OperationRegion (HBUS, PCI_Config, Zero, 0x0100) + Field (HBUS, DWordAcc, NoLock, Preserve) { - 0x0004FFFF, - Zero, - Zero, - 0x10 - }, + Offset (0x40), + EPEN, 1, + , 11, + EPBR, 20, + Offset (0x48), + MHEN, 1, + , 14, + MHBR, 17, + Offset (0x50), + GCLK, 1, + Offset (0x54), + D0EN, 1, + Offset (0x60), + PXEN, 1, + PXSZ, 2, + , 23, + PXBR, 6, + Offset (0x68), + DIEN, 1, + , 11, + DIBR, 20, + Offset (0x70), + , 20, + MEBR, 12, + Offset (0x80), + , 4, + PM0H, 2, + Offset (0x81), + PM1L, 2, + , 2, + PM1H, 2, + Offset (0x82), + PM2L, 2, + , 2, + PM2H, 2, + Offset (0x83), + PM3L, 2, + , 2, + PM3H, 2, + Offset (0x84), + PM4L, 2, + , 2, + PM4H, 2, + Offset (0x85), + PM5L, 2, + , 2, + PM5H, 2, + Offset (0x86), + PM6L, 2, + , 2, + PM6H, 2, + Offset (0x87), + Offset (0xA8), + , 20, + TUUD, 19, + Offset (0xBC), + , 20, + TLUD, 12, + Offset (0xC8), + , 7, + HTSE, 1 + } - Package (0x04) + OperationRegion (MCHT, SystemMemory, 0xFED10000, 0x1100) + Field (MCHT, ByteAcc, NoLock, Preserve) { - 0x0004FFFF, - One, - Zero, - 0x11 - }, + } - Package (0x04) + Name (BUF0, ResourceTemplate () { - 0x0004FFFF, - 0x02, - Zero, - 0x12 - }, - - Package (0x04) - { - 0x0004FFFF, - 0x03, - Zero, - 0x13 - }, - - Package (0x04) - { - 0x0002FFFF, - Zero, - Zero, - 0x10 - }, - - Package (0x04) - { - 0x0019FFFF, - Zero, - Zero, - 0x14 - } - }) - Name (PR04, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - LNKA, - Zero - }, - - Package (0x04) - { - 0xFFFF, - One, - LNKB, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - LNKC, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - LNKD, - Zero - } - }) - Name (AR04, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - Zero, - 0x10 - }, - - Package (0x04) - { - 0xFFFF, - One, - Zero, - 0x11 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - Zero, - 0x12 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - Zero, - 0x13 - } - }) - Name (PR05, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - LNKB, - Zero - }, - - Package (0x04) - { - 0xFFFF, - One, - LNKC, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - LNKD, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - LNKA, - Zero - } - }) - Name (AR05, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - Zero, - 0x11 - }, - - Package (0x04) - { - 0xFFFF, - One, - Zero, - 0x12 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - Zero, - 0x13 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - Zero, - 0x10 - } - }) - Name (PR06, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - LNKC, - Zero - }, - - Package (0x04) - { - 0xFFFF, - One, - LNKD, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - LNKA, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - LNKB, - Zero - } - }) - Name (AR06, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - Zero, - 0x12 - }, - - Package (0x04) - { - 0xFFFF, - One, - Zero, - 0x13 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - Zero, - 0x10 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - Zero, - 0x11 - } - }) - Name (PR07, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - LNKD, - Zero - }, - - Package (0x04) - { - 0xFFFF, - One, - LNKA, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - LNKB, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - LNKC, - Zero - } - }) - Name (AR07, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - Zero, - 0x13 - }, - - Package (0x04) - { - 0xFFFF, - One, - Zero, - 0x10 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - Zero, - 0x11 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - Zero, - 0x12 - } - }) - Name (PR08, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - LNKA, - Zero - }, - - Package (0x04) - { - 0xFFFF, - One, - LNKB, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - LNKC, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - LNKD, - Zero - } - }) - Name (AR08, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - Zero, - 0x10 - }, - - Package (0x04) - { - 0xFFFF, - One, - Zero, - 0x11 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - Zero, - 0x12 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - Zero, - 0x13 - } - }) - Name (PR09, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - LNKB, - Zero - }, - - Package (0x04) - { - 0xFFFF, - One, - LNKC, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - LNKD, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - LNKA, - Zero - } - }) - Name (AR09, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - Zero, - 0x11 - }, - - Package (0x04) - { - 0xFFFF, - One, - Zero, - 0x12 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - Zero, - 0x13 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - Zero, - 0x10 - } - }) - Name (PR0E, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - LNKC, - Zero - }, - - Package (0x04) - { - 0xFFFF, - One, - LNKD, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - LNKA, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - LNKB, - Zero - } - }) - Name (AR0E, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - Zero, - 0x12 - }, - - Package (0x04) - { - 0xFFFF, - One, - Zero, - 0x13 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - Zero, - 0x10 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - Zero, - 0x11 - } - }) - Name (PR0F, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - LNKD, - Zero - }, - - Package (0x04) - { - 0xFFFF, - One, - LNKA, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - LNKB, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - LNKC, - Zero - } - }) - Name (AR0F, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - Zero, - 0x13 - }, - - Package (0x04) - { - 0xFFFF, - One, - Zero, - 0x10 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - Zero, - 0x11 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - Zero, - 0x12 - } - }) - Name (PR01, Package (0x08) - { - Package (0x04) - { - 0x0002FFFF, - Zero, - LNKC, - Zero - }, - - Package (0x04) - { - 0x0002FFFF, - One, - LNKD, - Zero - }, - - Package (0x04) - { - 0x0002FFFF, - 0x02, - LNKB, - Zero - }, - - Package (0x04) - { - 0x0002FFFF, - 0x03, - LNKA, - Zero - }, - - Package (0x04) - { - 0x0003FFFF, - Zero, - LNKD, - Zero - }, - - Package (0x04) - { - 0x0003FFFF, - One, - LNKC, - Zero - }, - - Package (0x04) - { - 0x0003FFFF, - 0x02, - LNKF, - Zero - }, - - Package (0x04) - { - 0x0003FFFF, - 0x03, - LNKG, - Zero - } - }) - Name (AR01, Package (0x08) - { - Package (0x04) - { - 0x0002FFFF, - Zero, - Zero, - 0x12 - }, - - Package (0x04) - { - 0x0002FFFF, - One, - Zero, - 0x13 - }, - - Package (0x04) - { - 0x0002FFFF, - 0x02, - Zero, - 0x11 - }, - - Package (0x04) - { - 0x0002FFFF, - 0x03, - Zero, - 0x10 - }, - - Package (0x04) - { - 0x0003FFFF, - Zero, - Zero, - 0x13 - }, - - Package (0x04) - { - 0x0003FFFF, - One, - Zero, - 0x12 - }, - - Package (0x04) - { - 0x0003FFFF, - 0x02, - Zero, - 0x15 - }, - - Package (0x04) - { - 0x0003FFFF, - 0x03, - Zero, - 0x16 - } - }) - Name (PR02, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - LNKA, - Zero - }, - - Package (0x04) - { - 0xFFFF, - One, - LNKB, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - LNKC, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - LNKD, - Zero - } - }) - Name (AR02, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - Zero, - 0x10 - }, - - Package (0x04) - { - 0xFFFF, - One, - Zero, - 0x11 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - Zero, - 0x12 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - Zero, - 0x13 - } - }) - Name (PR0A, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - LNKB, - Zero - }, - - Package (0x04) - { - 0xFFFF, - One, - LNKC, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - LNKD, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - LNKA, - Zero - } - }) - Name (AR0A, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - Zero, - 0x11 - }, - - Package (0x04) - { - 0xFFFF, - One, - Zero, - 0x12 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - Zero, - 0x13 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - Zero, - 0x10 - } - }) - Name (PR0B, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - LNKC, - Zero - }, - - Package (0x04) - { - 0xFFFF, - One, - LNKD, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - LNKA, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - LNKB, - Zero - } - }) - Name (AR0B, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - Zero, - 0x12 - }, - - Package (0x04) - { - 0xFFFF, - One, - Zero, - 0x13 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - Zero, - 0x10 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - Zero, - 0x11 - } - }) - Name (PR0C, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - LNKD, - Zero - }, - - Package (0x04) - { - 0xFFFF, - One, - LNKA, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - LNKB, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - LNKC, - Zero - } - }) - Name (AR0C, Package (0x04) - { - Package (0x04) - { - 0xFFFF, - Zero, - Zero, - 0x13 - }, - - Package (0x04) - { - 0xFFFF, - One, - Zero, - 0x10 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - Zero, - 0x11 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - Zero, - 0x12 - } - }) - Name (PR31, Package (0x0C) - { - Package (0x04) - { - 0xFFFF, - Zero, - LNKC, - Zero - }, - - Package (0x04) - { - 0xFFFF, - One, - LNKD, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - LNKA, - Zero - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - LNKB, - Zero - }, - - Package (0x04) - { - 0x0001FFFF, - Zero, - LNKD, - Zero - }, - - Package (0x04) - { - 0x0001FFFF, - One, - LNKA, - Zero - }, - - Package (0x04) - { - 0x0001FFFF, - 0x02, - LNKB, - Zero - }, - - Package (0x04) - { - 0x0001FFFF, - 0x03, - LNKC, - Zero - }, - - Package (0x04) - { - 0x0002FFFF, - Zero, - LNKB, - Zero - }, - - Package (0x04) - { - 0x0002FFFF, - One, - LNKC, - Zero - }, - - Package (0x04) - { - 0x0002FFFF, - 0x02, - LNKD, - Zero - }, - - Package (0x04) - { - 0x0002FFFF, - 0x03, - LNKA, - Zero - } - }) - Name (AR31, Package (0x0C) - { - Package (0x04) - { - 0xFFFF, - Zero, - Zero, - 0x12 - }, - - Package (0x04) - { - 0xFFFF, - One, - Zero, - 0x13 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - Zero, - 0x10 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - Zero, - 0x11 - }, - - Package (0x04) - { - 0x0001FFFF, - Zero, - Zero, - 0x13 - }, - - Package (0x04) - { - 0x0001FFFF, - One, - Zero, - 0x10 - }, - - Package (0x04) - { - 0x0001FFFF, - 0x02, - Zero, - 0x11 - }, - - Package (0x04) - { - 0x0001FFFF, - 0x03, - Zero, - 0x12 - }, - - Package (0x04) - { - 0x0002FFFF, - Zero, - Zero, - 0x11 - }, - - Package (0x04) - { - 0x0002FFFF, - One, - Zero, - 0x12 - }, - - Package (0x04) - { - 0x0002FFFF, - 0x02, - Zero, - 0x13 - }, - - Package (0x04) - { - 0x0002FFFF, - 0x03, - Zero, - 0x10 - } - }) - Name (PRSA, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, ) - {3,4,5,6,10,11,12,14,15} - }) - Alias (PRSA, PRSB) - Alias (PRSA, PRSC) - Alias (PRSA, PRSD) - Alias (PRSA, PRSE) - Alias (PRSA, PRSF) - Alias (PRSA, PRSG) - Alias (PRSA, PRSH) - Device (PCI0) - { - Name (_HID, EisaId ("PNP0A08")) - Name (_CID, EisaId ("PNP0A03")) - Name (_ADR, Zero) - Method (^BN00, 0, NotSerialized) - { - Return (Zero) - } - - Method (_BBN, 0, NotSerialized) - { - Return (BN00 ()) - } - - Name (_UID, Zero) - Method (_PRT, 0, NotSerialized) - { - If (PICM) - { - Return (AR00 ()) - } - - Return (PR00 ()) - } - - OperationRegion (HBUS, PCI_Config, Zero, 0x0100) - Field (HBUS, DWordAcc, NoLock, Preserve) - { - Offset (0x40), - EPEN, 1, - , 11, - EPBR, 20, - Offset (0x48), - MHEN, 1, - , 14, - MHBR, 17, - Offset (0x50), - GCLK, 1, - Offset (0x54), - D0EN, 1, - Offset (0x60), - PXEN, 1, - PXSZ, 2, - , 23, - PXBR, 6, - Offset (0x68), - DIEN, 1, - , 11, - DIBR, 20, - Offset (0x70), - , 20, - MEBR, 12, - Offset (0x80), - , 4, - PM0H, 2, - Offset (0x81), - PM1L, 2, - , 2, - PM1H, 2, - Offset (0x82), - PM2L, 2, - , 2, - PM2H, 2, - Offset (0x83), - PM3L, 2, - , 2, - PM3H, 2, - Offset (0x84), - PM4L, 2, - , 2, - PM4H, 2, - Offset (0x85), - PM5L, 2, - , 2, - PM5H, 2, - Offset (0x86), - PM6L, 2, - , 2, - PM6H, 2, - Offset (0x87), - Offset (0xA8), - , 20, - TUUD, 19, - Offset (0xBC), - , 20, - TLUD, 12, - Offset (0xC8), - , 7, - HTSE, 1 - } - - OperationRegion (MCHT, SystemMemory, 0xFED10000, 0x1100) - Field (MCHT, ByteAcc, NoLock, Preserve) - { - } - - Name (BUF0, ResourceTemplate () - { - WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, - 0x0000, // Granularity - 0x0000, // Range Minimum - 0x00FF, // Range Maximum - 0x0000, // Translation Offset - 0x0100, // Length - ,, ) - DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, - 0x00000000, // Granularity - 0x00000000, // Range Minimum - 0x00000CF7, // Range Maximum - 0x00000000, // Translation Offset - 0x00000CF8, // Length - ,, , TypeStatic) - IO (Decode16, - 0x0CF8, // Range Minimum - 0x0CF8, // Range Maximum - 0x01, // Alignment - 0x08, // Length - ) - DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, - 0x00000000, // Granularity - 0x00000D00, // Range Minimum - 0x0000FFFF, // Range Maximum - 0x00000000, // Translation Offset - 0x0000F300, // Length - ,, , TypeStatic) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, - 0x00000000, // Granularity - 0x000A0000, // Range Minimum - 0x000BFFFF, // Range Maximum - 0x00000000, // Translation Offset - 0x00020000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, - 0x00000000, // Granularity - 0x000C0000, // Range Minimum - 0x000C3FFF, // Range Maximum - 0x00000000, // Translation Offset - 0x00004000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, - 0x00000000, // Granularity - 0x000C4000, // Range Minimum - 0x000C7FFF, // Range Maximum - 0x00000000, // Translation Offset - 0x00004000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, - 0x00000000, // Granularity - 0x000C8000, // Range Minimum - 0x000CBFFF, // Range Maximum - 0x00000000, // Translation Offset - 0x00004000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, - 0x00000000, // Granularity - 0x000CC000, // Range Minimum - 0x000CFFFF, // Range Maximum - 0x00000000, // Translation Offset - 0x00004000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, - 0x00000000, // Granularity - 0x000D0000, // Range Minimum - 0x000D3FFF, // Range Maximum - 0x00000000, // Translation Offset - 0x00004000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, - 0x00000000, // Granularity - 0x000D4000, // Range Minimum - 0x000D7FFF, // Range Maximum - 0x00000000, // Translation Offset - 0x00004000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, - 0x00000000, // Granularity - 0x000D8000, // Range Minimum - 0x000DBFFF, // Range Maximum - 0x00000000, // Translation Offset - 0x00004000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, - 0x00000000, // Granularity - 0x000DC000, // Range Minimum - 0x000DFFFF, // Range Maximum - 0x00000000, // Translation Offset - 0x00004000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, - 0x00000000, // Granularity - 0x000E0000, // Range Minimum - 0x000E3FFF, // Range Maximum - 0x00000000, // Translation Offset - 0x00004000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, - 0x00000000, // Granularity - 0x000E4000, // Range Minimum - 0x000E7FFF, // Range Maximum - 0x00000000, // Translation Offset - 0x00004000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, - 0x00000000, // Granularity - 0x000E8000, // Range Minimum - 0x000EBFFF, // Range Maximum - 0x00000000, // Translation Offset - 0x00004000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, - 0x00000000, // Granularity - 0x000EC000, // Range Minimum - 0x000EFFFF, // Range Maximum - 0x00000000, // Translation Offset - 0x00004000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, - 0x00000000, // Granularity - 0x000F0000, // Range Minimum - 0x000FFFFF, // Range Maximum - 0x00000000, // Translation Offset - 0x00010000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, - 0x00000000, // Granularity - 0x00000000, // Range Minimum - 0xFEAFFFFF, // Range Maximum - 0x00000000, // Translation Offset - 0xFEB00000, // Length - ,, , AddressRangeMemory, TypeStatic) - QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, - 0x0000000000000000, // Granularity - 0x0000000000010000, // Range Minimum - 0x000000000001FFFF, // Range Maximum - 0x0000000000000000, // Translation Offset - 0x0000000000010000, // Length - ,, , AddressRangeMemory, TypeStatic) - }) - Method (_CRS, 0, Serialized) - { - CreateWordField (BUF0, 0x0A, PBMX) - Store (Subtract (ShiftRight (PELN, 0x14), 0x02), PBMX) - CreateWordField (BUF0, 0x0E, PBLN) - Store (Subtract (ShiftRight (PELN, 0x14), One), PBLN) - If (PM1L) - { - CreateDWordField (BUF0, 0x7C, C0LN) - Store (Zero, C0LN) - } - - If (LEqual (PM1L, One)) - { - CreateBitField (BUF0, 0x0358, C0RW) - Store (Zero, C0RW) - } - - If (PM1H) - { - CreateDWordField (BUF0, 0x96, C4LN) - Store (Zero, C4LN) - } - - If (LEqual (PM1H, One)) - { - CreateBitField (BUF0, 0x0428, C4RW) - Store (Zero, C4RW) - } - - If (PM2L) - { - CreateDWordField (BUF0, 0xB0, C8LN) - Store (Zero, C8LN) - } - - If (LEqual (PM2L, One)) - { - CreateBitField (BUF0, 0x04F8, C8RW) - Store (Zero, C8RW) - } - - If (PM2H) - { - CreateDWordField (BUF0, 0xCA, CCLN) - Store (Zero, CCLN) - } - - If (LEqual (PM2H, One)) - { - CreateBitField (BUF0, 0x05C8, CCRW) - Store (Zero, CCRW) - } - - If (PM3L) - { - CreateDWordField (BUF0, 0xE4, D0LN) - Store (Zero, D0LN) - } - - If (LEqual (PM3L, One)) - { - CreateBitField (BUF0, 0x0698, D0RW) - Store (Zero, D0RW) - } - - If (PM3H) - { - CreateDWordField (BUF0, 0xFE, D4LN) - Store (Zero, D4LN) - } - - If (LEqual (PM3H, One)) - { - CreateBitField (BUF0, 0x0768, D4RW) - Store (Zero, D4RW) - } - - If (PM4L) - { - CreateDWordField (BUF0, 0x0118, D8LN) - Store (Zero, D8LN) - } - - If (LEqual (PM4L, One)) - { - CreateBitField (BUF0, 0x0838, D8RW) - Store (Zero, D8RW) - } - - If (PM4H) - { - CreateDWordField (BUF0, 0x0132, DCLN) - Store (Zero, DCLN) - } - - If (LEqual (PM4H, One)) - { - CreateBitField (BUF0, 0x0908, DCRW) - Store (Zero, DCRW) - } - - If (PM5L) - { - CreateDWordField (BUF0, 0x014C, E0LN) - Store (Zero, E0LN) - } - - If (LEqual (PM5L, One)) - { - CreateBitField (BUF0, 0x09D8, E0RW) - Store (Zero, E0RW) - } - - If (PM5H) - { - CreateDWordField (BUF0, 0x0166, E4LN) - Store (Zero, E4LN) - } - - If (LEqual (PM5H, One)) - { - CreateBitField (BUF0, 0x0AA8, E4RW) - Store (Zero, E4RW) - } - - If (PM6L) - { - CreateDWordField (BUF0, 0x0180, E8LN) - Store (Zero, E8LN) - } - - If (LEqual (PM6L, One)) - { - CreateBitField (BUF0, 0x0B78, E8RW) - Store (Zero, E8RW) - } - - If (PM6H) - { - CreateDWordField (BUF0, 0x019A, ECLN) - Store (Zero, ECLN) - } - - If (LEqual (PM6H, One)) - { - CreateBitField (BUF0, 0x0C48, ECRW) - Store (Zero, ECRW) - } - - If (PM0H) - { - CreateDWordField (BUF0, 0x01B4, F0LN) - Store (Zero, F0LN) - } - - If (LEqual (PM0H, One)) - { - CreateBitField (BUF0, 0x0D18, F0RW) - Store (Zero, F0RW) - } - - CreateDWordField (BUF0, 0x01C2, M1MN) - CreateDWordField (BUF0, 0x01C6, M1MX) - CreateDWordField (BUF0, 0x01CE, M1LN) - ShiftLeft (TLUD, 0x14, M1MN) - Add (Subtract (M1MX, M1MN), One, M1LN) - If (LLessEqual (OSYS, 0x07D3)) - { - CreateDWordField (BUF0, 0x01F8, MSLN) - Store (Zero, MSLN) - } - Else - { - If (E4GM) - { - CreateQWordField (BUF0, 0x01F8, M2LN) - CreateQWordField (BUF0, 0x01E0, M2MN) - CreateQWordField (BUF0, 0x01E8, M2MX) - If (LGreaterEqual (TUUD, 0x1000)) - { - ShiftLeft (TUUD, 0x14, M2MN) - Store (Subtract (0x0000001000000000, ShiftLeft (TUUD, 0x14)), M2LN) - } - Else - { - Store (0x0000000100000000, M2MN) - Store (0x0000000F00000000, M2LN) - } - - Subtract (Add (M2MN, M2LN), One, M2MX) - } - Else - { - CreateDWordField (BUF0, 0x01F8, M4LN) - Store (Zero, M4LN) - } - } - - Return (BUF0) - } - - Name (GUID, Buffer (0x10) - { - /* 0000 */ 0x5B, 0x4D, 0xDB, 0x33, 0xF7, 0x1F, 0x1C, 0x40, - /* 0008 */ 0x96, 0x57, 0x74, 0x41, 0xC0, 0x3D, 0xD7, 0x66 - }) - Name (SUPP, Zero) - Name (CTRL, Zero) - Name (XCNT, Zero) - Method (_OSC, 4, Serialized) - { - Store (Arg3, Local0) - CreateDWordField (Local0, Zero, CDW1) - CreateDWordField (Local0, 0x04, CDW2) - CreateDWordField (Local0, 0x08, CDW3) - If (^XHC.CUID (Arg0)) - { - Return (^XHC.POSC (Arg1, Arg2, Arg3)) - } - Else - { - If (_OSI ("Windows 2012")) - { - If (LEqual (XCNT, Zero)) - { - ^XHC.XSEL () - Increment (XCNT) - } - } - } - - If (LAnd (LEqual (Arg0, GUID), NEXP)) - { - Store (CDW2, SUPP) - Store (CDW3, CTRL) - If (Not (And (CDW1, One))) - { - If (And (CTRL, One)) - { - NHPG () - } - - If (And (CTRL, 0x04)) - { - NPME () - } - } - - If (LNotEqual (Arg1, One)) - { - Or (CDW1, 0x08, CDW1) - } - - If (LNotEqual (CDW3, CTRL)) - { - Or (CDW1, 0x10, CDW1) - } - - Store (CTRL, CDW3) - Store (CTRL, OSCC) - Return (Local0) - } - Else - { - Or (CDW1, 0x04, CDW1) - Return (Local0) - } - } - - Scope (\_SB.PCI0) - { - Method (AR00, 0, NotSerialized) - { - Return (^^AR00) - } - - Method (PR00, 0, NotSerialized) - { - Return (^^PR00) - } - - Method (AR01, 0, NotSerialized) - { - Return (^^AR01) - } - - Method (PR01, 0, NotSerialized) - { - Return (^^PR01) - } - - Method (AR02, 0, NotSerialized) - { - Return (^^AR02) - } - - Method (PR02, 0, NotSerialized) - { - Return (^^PR02) - } - - Method (AR04, 0, NotSerialized) - { - Return (^^AR04) - } - - Method (PR04, 0, NotSerialized) - { - Return (^^PR04) - } - - Method (AR05, 0, NotSerialized) - { - Return (^^AR05) - } - - Method (PR05, 0, NotSerialized) - { - Return (^^PR05) - } - - Method (AR06, 0, NotSerialized) - { - Return (^^AR06) - } - - Method (PR06, 0, NotSerialized) - { - Return (^^PR06) - } - - Method (AR07, 0, NotSerialized) - { - Return (^^AR07) - } - - Method (PR07, 0, NotSerialized) - { - Return (^^PR07) - } - - Method (AR08, 0, NotSerialized) - { - Return (^^AR08) - } - - Method (PR08, 0, NotSerialized) - { - Return (^^PR08) - } - - Method (AR09, 0, NotSerialized) - { - Return (^^AR09) - } - - Method (PR09, 0, NotSerialized) - { - Return (^^PR09) - } - - Method (AR0E, 0, NotSerialized) - { - Return (^^AR0E) - } - - Method (PR0E, 0, NotSerialized) - { - Return (^^PR0E) - } - - Method (AR0F, 0, NotSerialized) - { - Return (^^AR0F) - } - - Method (PR0F, 0, NotSerialized) - { - Return (^^PR0F) - } - - Method (AR0A, 0, NotSerialized) - { - Return (^^AR0A) - } - - Method (PR0A, 0, NotSerialized) - { - Return (^^PR0A) - } - - Method (AR0B, 0, NotSerialized) - { - Return (^^AR0B) - } - - Method (PR0B, 0, NotSerialized) - { - Return (^^PR0B) - } - - Method (AR0C, 0, NotSerialized) - { - Return (^^AR0C) - } - - Method (PR0C, 0, NotSerialized) - { - Return (^^PR0C) - } - } - - Device (TPMX) - { - Name (_HID, EisaId ("PNP0C01")) - Name (_UID, One) - Name (CRS, ResourceTemplate () - { - Memory32Fixed (ReadOnly, - 0xFED40000, // Address Base - 0x00005000, // Address Length - ) - }) - Method (_CRS, 0, NotSerialized) - { - If (TPMF) - { - Return (Zero) - } - - Return (CRS) - } - } - - Device (LPCB) - { - Name (_ADR, 0x001F0000) - Scope (\_SB) - { - OperationRegion (PCI0.LPCB.LPC1, PCI_Config, 0x40, 0xC0) - Field (PCI0.LPCB.LPC1, AnyAcc, NoLock, Preserve) - { - Offset (0x20), - PARC, 8, - PBRC, 8, - PCRC, 8, - PDRC, 8, - Offset (0x28), - PERC, 8, - PFRC, 8, - PGRC, 8, - PHRC, 8, - Offset (0x6C), - Offset (0x6D), - Offset (0x6E), - XUSB, 1 - } - - Device (LNKA) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, One) - Method (_DIS, 0, Serialized) - { - Or (PARC, 0x80, PARC) - } - - Method (_PRS, 0, Serialized) - { - Return (PRSA) - } - - Method (_CRS, 0, Serialized) - { - Name (RTLA, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, ) - {} - }) - CreateWordField (RTLA, One, IRQ0) - Store (Zero, IRQ0) - ShiftLeft (One, And (PARC, 0x0F), IRQ0) - Return (RTLA) - } - - Method (_SRS, 1, Serialized) - { - CreateWordField (Arg0, One, IRQ0) - FindSetRightBit (IRQ0, Local0) - Decrement (Local0) - Store (Local0, PARC) - } - - Method (_STA, 0, Serialized) - { - If (And (PARC, 0x80)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - } - - Device (LNKB) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x02) - Method (_DIS, 0, Serialized) - { - Or (PBRC, 0x80, PBRC) - } - - Method (_PRS, 0, Serialized) - { - Return (PRSB) - } - - Method (_CRS, 0, Serialized) - { - Name (RTLB, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, ) - {} - }) - CreateWordField (RTLB, One, IRQ0) - Store (Zero, IRQ0) - ShiftLeft (One, And (PBRC, 0x0F), IRQ0) - Return (RTLB) - } - - Method (_SRS, 1, Serialized) - { - CreateWordField (Arg0, One, IRQ0) - FindSetRightBit (IRQ0, Local0) - Decrement (Local0) - Store (Local0, PBRC) - } - - Method (_STA, 0, Serialized) - { - If (And (PBRC, 0x80)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - } - - Device (LNKC) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x03) - Method (_DIS, 0, Serialized) - { - Or (PCRC, 0x80, PCRC) - } - - Method (_PRS, 0, Serialized) - { - Return (PRSC) - } - - Method (_CRS, 0, Serialized) - { - Name (RTLC, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, ) - {} - }) - CreateWordField (RTLC, One, IRQ0) - Store (Zero, IRQ0) - ShiftLeft (One, And (PCRC, 0x0F), IRQ0) - Return (RTLC) - } - - Method (_SRS, 1, Serialized) - { - CreateWordField (Arg0, One, IRQ0) - FindSetRightBit (IRQ0, Local0) - Decrement (Local0) - Store (Local0, PCRC) - } - - Method (_STA, 0, Serialized) - { - If (And (PCRC, 0x80)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - } - - Device (LNKD) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x04) - Method (_DIS, 0, Serialized) - { - Or (PDRC, 0x80, PDRC) - } - - Method (_PRS, 0, Serialized) - { - Return (PRSD) - } - - Method (_CRS, 0, Serialized) - { - Name (RTLD, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, ) - {} - }) - CreateWordField (RTLD, One, IRQ0) - Store (Zero, IRQ0) - ShiftLeft (One, And (PDRC, 0x0F), IRQ0) - Return (RTLD) - } - - Method (_SRS, 1, Serialized) - { - CreateWordField (Arg0, One, IRQ0) - FindSetRightBit (IRQ0, Local0) - Decrement (Local0) - Store (Local0, PDRC) - } - - Method (_STA, 0, Serialized) - { - If (And (PDRC, 0x80)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - } - - Device (LNKE) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x05) - Method (_DIS, 0, Serialized) - { - Or (PERC, 0x80, PERC) - } - - Method (_PRS, 0, Serialized) - { - Return (PRSE) - } - - Method (_CRS, 0, Serialized) - { - Name (RTLE, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, ) - {} - }) - CreateWordField (RTLE, One, IRQ0) - Store (Zero, IRQ0) - ShiftLeft (One, And (PERC, 0x0F), IRQ0) - Return (RTLE) - } - - Method (_SRS, 1, Serialized) - { - CreateWordField (Arg0, One, IRQ0) - FindSetRightBit (IRQ0, Local0) - Decrement (Local0) - Store (Local0, PERC) - } - - Method (_STA, 0, Serialized) - { - If (And (PERC, 0x80)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - } - - Device (LNKF) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x06) - Method (_DIS, 0, Serialized) - { - Or (PFRC, 0x80, PFRC) - } - - Method (_PRS, 0, Serialized) - { - Return (PRSF) - } - - Method (_CRS, 0, Serialized) - { - Name (RTLF, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, ) - {} - }) - CreateWordField (RTLF, One, IRQ0) - Store (Zero, IRQ0) - ShiftLeft (One, And (PFRC, 0x0F), IRQ0) - Return (RTLF) - } - - Method (_SRS, 1, Serialized) - { - CreateWordField (Arg0, One, IRQ0) - FindSetRightBit (IRQ0, Local0) - Decrement (Local0) - Store (Local0, PFRC) - } - - Method (_STA, 0, Serialized) - { - If (And (PFRC, 0x80)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - } - - Device (LNKG) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x07) - Method (_DIS, 0, Serialized) - { - Or (PGRC, 0x80, PGRC) - } - - Method (_PRS, 0, Serialized) - { - Return (PRSG) - } - - Method (_CRS, 0, Serialized) - { - Name (RTLG, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, ) - {} - }) - CreateWordField (RTLG, One, IRQ0) - Store (Zero, IRQ0) - ShiftLeft (One, And (PGRC, 0x0F), IRQ0) - Return (RTLG) - } - - Method (_SRS, 1, Serialized) - { - CreateWordField (Arg0, One, IRQ0) - FindSetRightBit (IRQ0, Local0) - Decrement (Local0) - Store (Local0, PGRC) - } - - Method (_STA, 0, Serialized) - { - If (And (PGRC, 0x80)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - } - - Device (LNKH) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x08) - Method (_DIS, 0, Serialized) - { - Or (PHRC, 0x80, PHRC) - } - - Method (_PRS, 0, Serialized) - { - Return (PRSH) - } - - Method (_CRS, 0, Serialized) - { - Name (RTLH, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, ) - {} - }) - CreateWordField (RTLH, One, IRQ0) - Store (Zero, IRQ0) - ShiftLeft (One, And (PHRC, 0x0F), IRQ0) - Return (RTLH) - } - - Method (_SRS, 1, Serialized) - { - CreateWordField (Arg0, One, IRQ0) - FindSetRightBit (IRQ0, Local0) - Decrement (Local0) - Store (Local0, PHRC) - } - - Method (_STA, 0, Serialized) - { - If (And (PHRC, 0x80)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - } - } - - OperationRegion (LPC0, PCI_Config, 0x40, 0xC0) - Field (LPC0, AnyAcc, NoLock, Preserve) - { - Offset (0x40), - IOD0, 8, - IOD1, 8, - Offset (0xB0), - RAEN, 1, - , 13, - RCBA, 18 - } - - Device (DMAC) - { - Name (_HID, EisaId ("PNP0200")) - Name (_CRS, ResourceTemplate () - { - IO (Decode16, - 0x0000, // Range Minimum - 0x0000, // Range Maximum - 0x01, // Alignment - 0x20, // Length - ) - IO (Decode16, - 0x0081, // Range Minimum - 0x0081, // Range Maximum - 0x01, // Alignment - 0x11, // Length - ) - IO (Decode16, - 0x0093, // Range Minimum - 0x0093, // Range Maximum - 0x01, // Alignment - 0x0D, // Length - ) - IO (Decode16, - 0x00C0, // Range Minimum - 0x00C0, // Range Maximum - 0x01, // Alignment - 0x20, // Length - ) - DMA (Compatibility, NotBusMaster, Transfer8_16, ) - {4} - }) - } - - Device (FWHD) - { - Name (_HID, EisaId ("INT0800")) - Name (_CRS, ResourceTemplate () - { - Memory32Fixed (ReadOnly, - 0xFF000000, // Address Base - 0x01000000, // Address Length - ) - }) - } - - Device (HPET) - { - Name (_HID, EisaId ("PNP0103")) - Name (_UID, Zero) - Name (BUF0, ResourceTemplate () - { - Memory32Fixed (ReadWrite, - 0xFED00000, // Address Base - 0x00000400, // Address Length - ) - }) - Method (_STA, 0, NotSerialized) - { - If (LGreaterEqual (OSYS, 0x07D1)) - { - If (HPAE) - { - Return (0x0F) - } - } - Else - { - If (HPAE) - { - Return (0x0B) - } - } - - Return (Zero) - } - - Method (_CRS, 0, Serialized) - { - If (HPAE) - { - CreateDWordField (BUF0, 0x04, HPT0) - If (LEqual (HPAS, One)) - { - Store (0xFED01000, HPT0) - } - - If (LEqual (HPAS, 0x02)) - { - Store (0xFED02000, HPT0) - } - - If (LEqual (HPAS, 0x03)) - { - Store (0xFED03000, HPT0) - } - } - - Return (BUF0) - } - } - - Device (IPIC) - { - Name (_HID, EisaId ("PNP0000")) - Name (_CRS, ResourceTemplate () - { - IO (Decode16, - 0x0020, // Range Minimum - 0x0020, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x0024, // Range Minimum - 0x0024, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x0028, // Range Minimum - 0x0028, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x002C, // Range Minimum - 0x002C, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x0030, // Range Minimum - 0x0030, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x0034, // Range Minimum - 0x0034, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x0038, // Range Minimum - 0x0038, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x003C, // Range Minimum - 0x003C, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x00A0, // Range Minimum - 0x00A0, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x00A4, // Range Minimum - 0x00A4, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x00A8, // Range Minimum - 0x00A8, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x00AC, // Range Minimum - 0x00AC, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x00B0, // Range Minimum - 0x00B0, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x00B4, // Range Minimum - 0x00B4, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x00B8, // Range Minimum - 0x00B8, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x00BC, // Range Minimum - 0x00BC, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x04D0, // Range Minimum - 0x04D0, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IRQNoFlags () - {2} - }) - } - - Device (LDRC) - { - Name (_HID, EisaId ("PNP0C02")) - Name (_UID, 0x02) - Name (_CRS, ResourceTemplate () - { - IO (Decode16, - 0x002E, // Range Minimum - 0x002E, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x004E, // Range Minimum - 0x004E, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x0061, // Range Minimum - 0x0061, // Range Maximum - 0x01, // Alignment - 0x01, // Length - ) - IO (Decode16, - 0x0063, // Range Minimum - 0x0063, // Range Maximum - 0x01, // Alignment - 0x01, // Length - ) - IO (Decode16, - 0x0065, // Range Minimum - 0x0065, // Range Maximum - 0x01, // Alignment - 0x01, // Length - ) - IO (Decode16, - 0x0067, // Range Minimum - 0x0067, // Range Maximum - 0x01, // Alignment - 0x01, // Length - ) - IO (Decode16, - 0x0070, // Range Minimum - 0x0070, // Range Maximum - 0x01, // Alignment - 0x01, // Length - ) - IO (Decode16, - 0x0080, // Range Minimum - 0x0080, // Range Maximum - 0x01, // Alignment - 0x01, // Length - ) - IO (Decode16, - 0x0092, // Range Minimum - 0x0092, // Range Maximum - 0x01, // Alignment - 0x01, // Length - ) - IO (Decode16, - 0x00B2, // Range Minimum - 0x00B2, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x0680, // Range Minimum - 0x0680, // Range Maximum - 0x01, // Alignment - 0x20, // Length - ) - IO (Decode16, - 0x0200, // Range Minimum - 0x0200, // Range Maximum - 0x01, // Alignment - 0x10, // Length - ) - IO (Decode16, - 0xFFFF, // Range Minimum - 0xFFFF, // Range Maximum - 0x01, // Alignment - 0x01, // Length - ) - IO (Decode16, - 0xFFFF, // Range Minimum - 0xFFFF, // Range Maximum - 0x01, // Alignment - 0x01, // Length - ) - IO (Decode16, - 0x0400, // Range Minimum - 0x0400, // Range Maximum - 0x01, // Alignment - 0x54, // Length - ) - IO (Decode16, - 0x0458, // Range Minimum - 0x0458, // Range Maximum - 0x01, // Alignment - 0x28, // Length - ) - IO (Decode16, - 0x0500, // Range Minimum - 0x0500, // Range Maximum - 0x01, // Alignment - 0x80, // Length - ) - IO (Decode16, - 0x164E, // Range Minimum - 0x164E, // Range Maximum - 0x01, // Alignment - 0x02, // Length - ) - }) - } - - Device (RTC) - { - Name (_HID, EisaId ("PNP0B00")) - Name (_CRS, ResourceTemplate () - { - IO (Decode16, - 0x0070, // Range Minimum - 0x0070, // Range Maximum - 0x01, // Alignment - 0x08, // Length - ) - IRQNoFlags () - {8} - }) - } - - Device (TIMR) - { - Name (_HID, EisaId ("PNP0100")) - Name (_CRS, ResourceTemplate () - { - IO (Decode16, - 0x0040, // Range Minimum - 0x0040, // Range Maximum - 0x01, // Alignment - 0x04, // Length - ) - IO (Decode16, - 0x0050, // Range Minimum - 0x0050, // Range Maximum - 0x10, // Alignment - 0x04, // Length - ) - IRQNoFlags () - {0} - }) - } - - Device (CWDT) - { - Name (_HID, EisaId ("INT3F0D")) - Name (_CID, EisaId ("PNP0C02")) - Name (BUF0, ResourceTemplate () - { - IO (Decode16, - 0x0454, // Range Minimum - 0x0454, // Range Maximum - 0x04, // Alignment - 0x04, // Length - ) - }) - Method (_STA, 0, Serialized) - { - If (LEqual (WDTE, One)) - { - Return (0x0F) - } - Else - { - Return (Zero) - } - } - - Method (_CRS, 0, Serialized) - { - Return (BUF0) - } - } - - Device (EC0) - { - Name (_HID, EisaId ("PNP0C09")) - Name (_CRS, ResourceTemplate () - { - IO (Decode16, - 0x0062, // Range Minimum - 0x0062, // Range Maximum - 0x00, // Alignment - 0x01, // Length - ) - IO (Decode16, - 0x0066, // Range Minimum - 0x0066, // Range Maximum - 0x00, // Alignment - 0x01, // Length - ) - }) - CreateWordField (_CRS, 0x02, DPRT) - CreateWordField (_CRS, 0x0A, CPRT) - Name (_GPE, 0x18) - Name (REGC, Zero) - Method (_Q80, 0, NotSerialized) - { - \AMW0.AMWN (0x05) - } - - Method (_Q81, 0, NotSerialized) - { - \AMW0.AMWN (0x00010005) - } - - Method (_Q82, 0, NotSerialized) - { - \AMW0.AMWN (0x00020005) - } - - Method (_Q83, 0, NotSerialized) - { - \AMW0.AMWN (0x00030005) - } - } - - Device (SIO1) - { - Name (_HID, EisaId ("PNP0C02")) - Name (_UID, 0x0111) - Name (CRS, ResourceTemplate () - { - IO (Decode16, - 0x0000, // Range Minimum - 0x0000, // Range Maximum - 0x00, // Alignment - 0x00, // Length - ) - IO (Decode16, - 0x0000, // Range Minimum - 0x0000, // Range Maximum - 0x00, // Alignment - 0x00, // Length - ) - IO (Decode16, - 0x0000, // Range Minimum - 0x0000, // Range Maximum - 0x00, // Alignment - 0x00, // Length - ) - IO (Decode16, - 0x0000, // Range Minimum - 0x0000, // Range Maximum - 0x00, // Alignment - 0x00, // Length - ) - }) - Method (_CRS, 0, NotSerialized) - { - If (LAnd (LLess (SP1O, 0x03F0), LGreater (SP1O, 0xF0))) - { - CreateWordField (CRS, 0x02, GPI0) - CreateWordField (CRS, 0x04, GPI1) - CreateByteField (CRS, 0x07, GPIL) - Store (SP1O, GPI0) - Store (SP1O, GPI1) - Store (0x02, GPIL) - } - - If (IO1B) - { - CreateWordField (CRS, 0x0A, GP10) - CreateWordField (CRS, 0x0C, GP11) - CreateByteField (CRS, 0x0F, GPL1) - Store (IO1B, GP10) - Store (IO1B, GP11) - Store (IO1L, GPL1) - } - - If (IO3B) - { - CreateWordField (CRS, 0x12, GP20) - CreateWordField (CRS, 0x14, GP21) - CreateByteField (CRS, 0x17, GPL2) - Store (IO3B, GP20) - Store (IO3B, GP21) - Store (IO3L, GPL2) - } - - If (IO2B) - { - CreateWordField (CRS, 0x1A, GP30) - CreateWordField (CRS, 0x1C, GP31) - CreateByteField (CRS, 0x1F, GPL3) - Store (IO2B, GP30) - Store (IO2B, GP31) - Store (IO2L, GPL3) - } - - Return (CRS) - } - - Name (DCAT, Package (0x15) - { - 0x02, - 0x03, - One, - Zero, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0x05, - 0xFF, - 0xFF, - 0xFF, - 0x05, - 0xFF, - 0xFF, - 0xFF, - 0x06, - 0xFF, - 0xFF - }) - Mutex (MUT0, 0x00) - Method (ENFG, 1, NotSerialized) - { - Acquire (MUT0, 0x0FFF) - Store (0x87, INDX) - Store (0x87, INDX) - Store (Arg0, LDN) - } - - Method (EXFG, 0, NotSerialized) - { - Store (0xAA, INDX) - Release (MUT0) - } - - Method (LPTM, 1, NotSerialized) - { - ENFG (CGLD (Arg0)) - And (OPT0, 0x02, Local0) - EXFG () - Return (Local0) - } - - Method (UHID, 1, NotSerialized) - { - ENFG (CGLD (Arg0)) - And (OPT0, 0x38, Local0) - EXFG () - If (Local0) - { - Return (0x1005D041) - } - Else - { - Return (0x0105D041) - } - } - - OperationRegion (IOID, SystemIO, SP1O, 0x02) - Field (IOID, ByteAcc, NoLock, Preserve) - { - INDX, 8, - DATA, 8 - } - - IndexField (INDX, DATA, ByteAcc, NoLock, Preserve) - { - Offset (0x07), - LDN, 8, - Offset (0x21), - SCF1, 8, - SCF2, 8, - SCF3, 8, - SCF4, 8, - SCF5, 8, - SCF6, 8, - Offset (0x29), - CKCF, 8, - Offset (0x30), - ACTR, 8, - Offset (0x60), - IOAH, 8, - IOAL, 8, - IOH2, 8, - IOL2, 8, - Offset (0x70), - INTR, 8, - Offset (0x74), - DMCH, 8, - Offset (0xE0), - RGE0, 8, - RGE1, 8, - RGE2, 8, - RGE3, 8, - RGE4, 8, - RGE5, 8, - RGE6, 8, - RGE7, 8, - RGE8, 8, - RGE9, 8, - Offset (0xF0), - OPT0, 8, - OPT1, 8, - OPT2, 8, - OPT3, 8, - OPT4, 8, - OPT5, 8, - OPT6, 8, - OPT7, 8, - OPT8, 8, - OPT9, 8 - } - - Method (CGLD, 1, NotSerialized) - { - Return (DerefOf (Index (DCAT, Arg0))) - } - - Method (DSTA, 1, NotSerialized) - { - ENFG (CGLD (Arg0)) - Store (ACTR, Local0) - EXFG () - If (LEqual (Local0, 0xFF)) - { - Return (Zero) - } - - And (Local0, One, Local0) - If (LGreaterEqual (Arg0, 0x10)) - { - Or (IOES, ShiftLeft (Local0, And (Arg0, 0x0F)), IOES) - } - Else - { - Or (IOST, ShiftLeft (Local0, Arg0), IOST) - } - - If (Local0) - { - Return (0x0F) - } - Else - { - If (LGreaterEqual (Arg0, 0x10)) - { - Store (IOES, Local0) - } - Else - { - Store (IOST, Local0) - } - - And (Arg0, 0x0F, Local1) - If (And (ShiftLeft (One, Local1), Local0)) - { - Return (0x0D) - } - Else - { - Return (Zero) - } - } - } - - Method (DCNT, 2, NotSerialized) - { - ENFG (CGLD (Arg0)) - If (LAnd (LLess (DMCH, 0x04), LNotEqual (And (DMCH, 0x03, - Local1), Zero))) - { - RDMA (Arg0, Arg1, Increment (Local1)) - } - - Store (Arg1, ACTR) - ShiftLeft (IOAH, 0x08, Local1) - Or (IOAL, Local1, Local1) - RRIO (Arg0, Arg1, Local1, 0x08) - EXFG () - } - - Name (CRS1, ResourceTemplate () - { - IO (Decode16, - 0x0000, // Range Minimum - 0x0000, // Range Maximum - 0x01, // Alignment - 0x00, // Length - ) - IRQNoFlags () - {} - DMA (Compatibility, NotBusMaster, Transfer8, ) - {} - }) - CreateWordField (CRS1, 0x09, IRQM) - CreateByteField (CRS1, 0x0C, DMAM) - CreateWordField (CRS1, 0x02, IO11) - CreateWordField (CRS1, 0x04, IO12) - CreateByteField (CRS1, 0x07, LEN1) - Name (CRS2, ResourceTemplate () - { - IO (Decode16, - 0x0000, // Range Minimum - 0x0000, // Range Maximum - 0x01, // Alignment - 0x00, // Length - ) - IO (Decode16, - 0x0000, // Range Minimum - 0x0000, // Range Maximum - 0x01, // Alignment - 0x00, // Length - ) - IRQNoFlags () - {} - DMA (Compatibility, NotBusMaster, Transfer8, ) - {2} - }) - CreateWordField (CRS2, 0x11, IRQE) - CreateByteField (CRS2, 0x14, DMAE) - CreateWordField (CRS2, 0x02, IO21) - CreateWordField (CRS2, 0x04, IO22) - CreateByteField (CRS2, 0x07, LEN2) - CreateWordField (CRS2, 0x0A, IO31) - CreateWordField (CRS2, 0x0C, IO32) - CreateByteField (CRS2, 0x0F, LEN3) - Name (CRS4, ResourceTemplate () - { - IO (Decode16, - 0x0000, // Range Minimum - 0x0000, // Range Maximum - 0x01, // Alignment - 0x00, // Length - ) - IRQ (Edge, ActiveLow, Shared, ) - {} - }) - CreateWordField (CRS4, 0x09, IRQL) - CreateWordField (CRS4, 0x02, IOHL) - CreateWordField (CRS4, 0x04, IORL) - CreateByteField (CRS4, 0x06, ALMN) - CreateByteField (CRS4, 0x07, LENG) - Method (DCRS, 2, NotSerialized) - { - ENFG (CGLD (Arg0)) - ShiftLeft (IOAH, 0x08, IO11) - Or (IOAL, IO11, IO11) - Store (IO11, IO12) - Store (0x08, LEN1) - If (INTR) - { - ShiftLeft (One, INTR, IRQM) - } - Else - { - Store (Zero, IRQM) - } - - If (LOr (LGreater (DMCH, 0x03), LEqual (Arg1, Zero))) - { - Store (Zero, DMAM) - } - Else - { - And (DMCH, 0x03, Local1) - ShiftLeft (One, Local1, DMAM) - } - - EXFG () - Return (CRS1) - } - - Method (DCR2, 2, NotSerialized) - { - ENFG (CGLD (Arg0)) - ShiftLeft (IOAH, 0x08, IO21) - Or (IOAL, IO21, IO21) - Store (IO21, IO22) - Store (0x08, LEN2) - ShiftLeft (IOH2, 0x08, IO31) - Or (IOL2, IO31, IO31) - Store (IO21, IO32) - Store (0x08, LEN3) - If (INTR) - { - ShiftLeft (One, INTR, IRQE) - } - Else - { - Store (Zero, IRQE) - } - - If (LOr (LGreater (DMCH, 0x03), LEqual (Arg1, Zero))) - { - Store (Zero, DMAE) - } - Else - { - And (DMCH, 0x03, Local1) - ShiftLeft (One, Local1, DMAE) - } - - EXFG () - Return (CRS2) - } - - Method (DCR4, 2, NotSerialized) - { - ENFG (CGLD (Arg0)) - ShiftLeft (IOAH, 0x08, IOHL) - Or (IOAL, IOHL, IOHL) - Store (IOHL, IORL) - Store (0x08, LENG) - If (INTR) - { - And (INTR, 0x0F, INTR) - ShiftLeft (One, INTR, IRQL) - } - Else - { - Store (Zero, IRQL) - } - - EXFG () - Return (CRS4) - } - - Method (DSRS, 2, NotSerialized) - { - If (LEqual (Arg1, 0x02)) - { - If (LPTM (CGLD (Arg1))) - { - DSR2 (Arg0, Arg1) - } - } - Else - { - CreateWordField (Arg0, 0x09, IRQM) - CreateByteField (Arg0, 0x0C, DMAM) - CreateWordField (Arg0, 0x02, IO11) - ENFG (CGLD (Arg1)) - ShiftLeft (IOAH, 0x08, Local1) - Or (IOAL, Local1, Local1) - RRIO (Arg1, Zero, Local1, 0x08) - RRIO (Arg1, One, IO11, 0x08) - And (IO11, 0xFF, IOAL) - ShiftRight (IO11, 0x08, IOAH) - If (IRQM) - { - FindSetRightBit (IRQM, Local0) - Subtract (Local0, One, INTR) - } - Else - { - Store (Zero, INTR) - } - - If (DMAM) - { - FindSetRightBit (DMAM, Local0) - Subtract (Local0, One, DMCH) - } - Else - { - Store (0x04, DMCH) - } - - EXFG () - DCNT (Arg1, One) - Store (Arg1, Local2) - If (LGreater (Local2, Zero)) - { - Subtract (Local2, One, Local2) - } - } - } - - Method (DSR2, 2, NotSerialized) - { - CreateWordField (Arg0, 0x11, IRQT) - CreateByteField (Arg0, 0x14, DMAT) - CreateWordField (Arg0, 0x02, IOT1) - CreateWordField (Arg0, 0x0A, IOT2) - ENFG (CGLD (Arg1)) - And (IOT1, 0xFF, IOAL) - ShiftRight (IOT1, 0x08, IOAH) - And (IOT2, 0xFF, IOL2) - ShiftRight (IOT2, 0x08, IOH2) - If (IRQT) - { - FindSetRightBit (IRQT, Local0) - Subtract (Local0, One, INTR) - } - Else - { - Store (Zero, INTR) - } - - If (DMAT) - { - FindSetRightBit (DMAT, Local0) - Subtract (Local0, One, DMCH) - } - Else - { - Store (0x04, DMCH) - } - - EXFG () - DCNT (Arg1, One) - Store (Arg1, Local2) - If (LGreater (Local2, Zero)) - { - Subtract (Local2, One, Local2) - } - } - - Method (DSR4, 2, NotSerialized) - { - CreateWordField (Arg0, 0x02, IOHL) - CreateWordField (Arg0, 0x09, IRQL) - ENFG (CGLD (Arg1)) - And (IOHL, 0xFF, IOAL) - ShiftRight (IOHL, 0x08, IOAH) - If (IRQL) - { - FindSetRightBit (IRQL, Local0) - Subtract (Local0, One, INTR) - } - Else - { - Store (Zero, INTR) - } - - EXFG () - DCNT (Arg1, One) - Store (Arg1, Local2) - If (LGreater (Local2, Zero)) - { - Subtract (Local2, One, Local2) - } - } - } - - Name (PMFG, Zero) - Method (SIOS, 1, NotSerialized) - { - Store ("SIOS", Debug) - If (LEqual (One, Arg0)) - { - ^SIO1.ENFG (0x0A) - And (^SIO1.RGE0, 0x9F, ^SIO1.RGE0) - If (KBFG) - { - Or (^SIO1.OPT6, 0x10, ^SIO1.OPT6) - } - Else - { - And (^SIO1.OPT6, 0xEF, ^SIO1.OPT6) - } - - If (MSFG) - { - Or (^SIO1.OPT6, 0x20, ^SIO1.OPT6) - } - Else - { - And (^SIO1.OPT6, 0xDF, ^SIO1.OPT6) - } - - Store (0xFF, ^SIO1.OPT3) - Store (0xFF, ^SIO1.OPT4) - Or (One, ^SIO1.OPT2, ^SIO1.OPT2) - ^SIO1.EXFG () - Return (Zero) - } - - If (LNotEqual (0x05, Arg0)) - { - ^SIO1.ENFG (0x0A) - Store (0xFF, ^SIO1.OPT3) - Store (0xFF, ^SIO1.OPT4) - Store (^SIO1.RGE3, Local0) - If (KBFG) - { - Or (^SIO1.RGE0, 0x41, ^SIO1.RGE0) - } - Else - { - And (^SIO1.RGE0, 0xBF, ^SIO1.RGE0) - } - - If (MSFG) - { - Or (^SIO1.RGE0, 0x22, ^SIO1.RGE0) - And (^SIO1.RGE0, 0xFD, ^SIO1.RGE0) - Or (^SIO1.RGE6, 0x80, ^SIO1.RGE6) - } - Else - { - And (^SIO1.RGE0, 0xDF, ^SIO1.RGE0) - } - - And (0xFE, ^SIO1.OPT2, ^SIO1.OPT2) - ^SIO1.EXFG () - } - } - - Method (SIOW, 1, NotSerialized) - { - Store ("SIOW", Debug) - ^SIO1.ENFG (0x0A) - Store (^SIO1.OPT3, PMFG) - Store (0xFF, ^SIO1.OPT3) - And (^SIO1.OPT0, 0xE7, ^SIO1.OPT0) - And (0xFE, ^SIO1.OPT2, ^SIO1.OPT2) - ^SIO1.EXFG () - } - - OperationRegion (RX80, PCI_Config, Zero, 0xFF) - Field (RX80, ByteAcc, NoLock, Preserve) - { - Offset (0x80), - LPCD, 16, - LPCE, 16 - } - - Name (DBPT, Package (0x04) - { - Package (0x08) - { - 0x03F8, - 0x02F8, - 0x0220, - 0x0228, - 0x0238, - 0x02E8, - 0x0338, - 0x03E8 - }, - - Package (0x08) - { - 0x03F8, - 0x02F8, - 0x0220, - 0x0228, - 0x0238, - 0x02E8, - 0x0338, - 0x03E8 - }, - - Package (0x03) - { - 0x0378, - 0x0278, - 0x03BC - }, - - Package (0x02) - { - 0x03F0, - 0x0370 - } - }) - Name (DDLT, Package (0x04) - { - Package (0x02) - { - Zero, - 0xFFF8 - }, - - Package (0x02) - { - 0x04, - 0xFF8F - }, - - Package (0x02) - { - 0x08, - 0xFCFF - }, - - Package (0x02) - { - 0x0C, - 0xEFFF - } - }) - Method (RRIO, 4, NotSerialized) - { - If (LAnd (LLessEqual (Arg0, 0x03), LGreaterEqual (Arg0, Zero))) - { - Store (Match (DerefOf (Index (DBPT, Arg0)), MEQ, Arg2, MTR, - Zero, Zero), Local0) - If (LNotEqual (Local0, Ones)) - { - Store (DerefOf (Index (DerefOf (Index (DDLT, Arg0)), Zero)), - Local1) - Store (DerefOf (Index (DerefOf (Index (DDLT, Arg0)), One)), - Local2) - ShiftLeft (Local0, Local1, Local0) - And (LPCD, Local2, LPCD) - Or (LPCD, Local0, LPCD) - WX82 (Arg0, Arg1) - } - } - - If (LEqual (Arg0, 0x08)) - { - If (LEqual (Arg2, 0x0200)) - { - WX82 (0x08, Arg0) - } - Else - { - If (LEqual (Arg2, 0x0208)) - { - WX82 (0x09, Arg0) - } - } - } - - If (LAnd (LLessEqual (Arg0, 0x0D), LGreaterEqual (Arg0, 0x0A))) - { - WX82 (Arg0, Arg1) - } - } - - Method (WX82, 2, NotSerialized) - { - ShiftLeft (One, Arg0, Local0) - If (Arg1) - { - Or (LPCE, Local0, LPCE) - } - Else - { - Not (Local0, Local0) - And (LPCE, Local0, LPCE) - } - } - - Method (RDMA, 3, NotSerialized) - { - } - - Device (RMSC) - { - Name (_HID, EisaId ("PNP0C02")) - Name (_UID, 0x10) - Name (CRS1, ResourceTemplate () - { - IO (Decode16, - 0x0010, // Range Minimum - 0x0010, // Range Maximum - 0x00, // Alignment - 0x10, // Length - ) - IO (Decode16, - 0x0022, // Range Minimum - 0x0022, // Range Maximum - 0x00, // Alignment - 0x1E, // Length - ) - IO (Decode16, - 0x0044, // Range Minimum - 0x0044, // Range Maximum - 0x00, // Alignment - 0x1C, // Length - ) - IO (Decode16, - 0x0062, // Range Minimum - 0x0062, // Range Maximum - 0x00, // Alignment - 0x02, // Length - ) - IO (Decode16, - 0x0065, // Range Minimum - 0x0065, // Range Maximum - 0x00, // Alignment - 0x0B, // Length - ) - IO (Decode16, - 0x0072, // Range Minimum - 0x0072, // Range Maximum - 0x00, // Alignment - 0x0E, // Length - ) - IO (Decode16, - 0x0080, // Range Minimum - 0x0080, // Range Maximum - 0x00, // Alignment - 0x01, // Length - ) - IO (Decode16, - 0x0084, // Range Minimum - 0x0084, // Range Maximum - 0x00, // Alignment - 0x03, // Length - ) - IO (Decode16, - 0x0088, // Range Minimum - 0x0088, // Range Maximum - 0x00, // Alignment - 0x01, // Length - ) - IO (Decode16, - 0x008C, // Range Minimum - 0x008C, // Range Maximum - 0x00, // Alignment - 0x03, // Length - ) - IO (Decode16, - 0x0090, // Range Minimum - 0x0090, // Range Maximum - 0x00, // Alignment - 0x10, // Length - ) - IO (Decode16, - 0x00A2, // Range Minimum - 0x00A2, // Range Maximum - 0x00, // Alignment - 0x1E, // Length - ) - IO (Decode16, - 0x00E0, // Range Minimum - 0x00E0, // Range Maximum - 0x00, // Alignment - 0x10, // Length - ) - IO (Decode16, - 0x04D0, // Range Minimum - 0x04D0, // Range Maximum - 0x00, // Alignment - 0x02, // Length - ) - }) - Name (CRS2, ResourceTemplate () - { - IO (Decode16, - 0x0010, // Range Minimum - 0x0010, // Range Maximum - 0x00, // Alignment - 0x10, // Length - ) - IO (Decode16, - 0x0022, // Range Minimum - 0x0022, // Range Maximum - 0x00, // Alignment - 0x1E, // Length - ) - IO (Decode16, - 0x0044, // Range Minimum - 0x0044, // Range Maximum - 0x00, // Alignment - 0x1C, // Length - ) - IO (Decode16, - 0x0072, // Range Minimum - 0x0072, // Range Maximum - 0x00, // Alignment - 0x0E, // Length - ) - IO (Decode16, - 0x0080, // Range Minimum - 0x0080, // Range Maximum - 0x00, // Alignment - 0x01, // Length - ) - IO (Decode16, - 0x0084, // Range Minimum - 0x0084, // Range Maximum - 0x00, // Alignment - 0x03, // Length - ) - IO (Decode16, - 0x0088, // Range Minimum - 0x0088, // Range Maximum - 0x00, // Alignment - 0x01, // Length - ) - IO (Decode16, - 0x008C, // Range Minimum - 0x008C, // Range Maximum - 0x00, // Alignment - 0x03, // Length - ) - IO (Decode16, - 0x0090, // Range Minimum - 0x0090, // Range Maximum - 0x00, // Alignment - 0x10, // Length - ) - IO (Decode16, - 0x00A2, // Range Minimum - 0x00A2, // Range Maximum - 0x00, // Alignment - 0x1E, // Length - ) - IO (Decode16, - 0x00E0, // Range Minimum - 0x00E0, // Range Maximum - 0x00, // Alignment - 0x10, // Length - ) - IO (Decode16, - 0x04D0, // Range Minimum - 0x04D0, // Range Maximum - 0x00, // Alignment - 0x02, // Length - ) - }) - Method (_CRS, 0, NotSerialized) - { - If (And (MBEC, 0xFFFF)) - { - Return (CRS1) - } - Else - { - Return (CRS2) - } - } - } - - Device (COPR) - { - Name (_HID, EisaId ("PNP0C04")) - Name (_CRS, ResourceTemplate () - { - IO (Decode16, - 0x00F0, // Range Minimum - 0x00F0, // Range Maximum - 0x00, // Alignment - 0x10, // Length - ) - IRQNoFlags () - {13} - }) - } - - Device (PS2K) - { - Name (_HID, EisaId ("PNP0303")) - Name (_CID, EisaId ("PNP030B")) - Method (_STA, 0, NotSerialized) - { - If (And (IOST, 0x0400)) - { - Return (0x0F) - } - Else - { - Return (Zero) - } - } - - Name (_CRS, ResourceTemplate () - { - IO (Decode16, - 0x0060, // Range Minimum - 0x0060, // Range Maximum - 0x00, // Alignment - 0x01, // Length - ) - IO (Decode16, - 0x0064, // Range Minimum - 0x0064, // Range Maximum - 0x00, // Alignment - 0x01, // Length - ) - IRQNoFlags () - {1} - }) - Name (_PRS, ResourceTemplate () - { - StartDependentFn (0x00, 0x00) - { - FixedIO ( - 0x0060, // Address - 0x01, // Length - ) - FixedIO ( - 0x0064, // Address - 0x01, // Length - ) - IRQNoFlags () - {1} - } - EndDependentFn () - }) - Method (_PSW, 1, NotSerialized) - { - Store (Arg0, KBFG) - } - } - - Scope (\) - { - Name (KBFG, One) - } - - Method (PS2K._PRW, 0, NotSerialized) - { - Return (GPRW (0x1D, 0x04)) - } - - Device (PS2M) - { - Name (_HID, EisaId ("PNP0F03")) - Name (_CID, EisaId ("PNP0F13")) - Method (_STA, 0, NotSerialized) - { - If (And (IOST, 0x4000)) - { - Return (0x0F) - } - Else - { - Return (Zero) - } - } - - Name (CRS1, ResourceTemplate () - { - IRQNoFlags () - {12} - }) - Name (CRS2, ResourceTemplate () - { - IO (Decode16, - 0x0060, // Range Minimum - 0x0060, // Range Maximum - 0x00, // Alignment - 0x01, // Length - ) - IO (Decode16, - 0x0064, // Range Minimum - 0x0064, // Range Maximum - 0x00, // Alignment - 0x01, // Length - ) - IRQNoFlags () - {12} - }) - Method (_CRS, 0, NotSerialized) - { - If (And (IOST, 0x0400)) - { - Return (CRS1) - } - Else - { - Return (CRS2) - } - } - - Name (_PRS, ResourceTemplate () - { - StartDependentFn (0x00, 0x00) - { - IRQNoFlags () - {12} - } - EndDependentFn () - }) - Method (_PSW, 1, NotSerialized) - { - Store (Arg0, MSFG) - } - } - - Scope (\) - { - Name (MSFG, One) - } - - Method (PS2M._PRW, 0, NotSerialized) - { - Return (GPRW (0x1D, 0x04)) - } - - Scope (^^PCI0) - { - Name (SLIC, Buffer (0x9E) - { - "374937846529Genuine NVIDIA Certified SLI Ready Motherboard for ASUS P8Z68-V PRO 56e7-Copyright 2010 NVIDIA Corporation All Rights Reserved-458103946203(R)" - }) - Device (WMI1) - { - Name (_HID, "pnp0c14") - Name (_UID, "MXM2") - Name (_WDG, Buffer (0x14) - { - /* 0000 */ 0x3C, 0x5C, 0xCB, 0xF6, 0xAE, 0x9C, 0xBD, 0x4E, - /* 0008 */ 0xB5, 0x77, 0x93, 0x1E, 0xA3, 0x2A, 0x2C, 0xC0, - /* 0010 */ 0x4D, 0x58, 0x01, 0x02 - }) - Method (WMMX, 3, NotSerialized) - { - CreateDWordField (Arg2, Zero, FUNC) - If (LEqual (FUNC, 0x41494C53)) - { - Return (SLIC) - } - - Return (Zero) - } - } - } - - Scope (\_SB) - { - Name (LUCD, Buffer (0x7D) - { - /* 0000 */ 0x4C, 0x75, 0x63, 0x69, 0x64, 0x4C, 0x6F, 0x67, - /* 0008 */ 0x69, 0x78, 0x00, 0x68, 0x00, 0x01, 0x00, 0x01, - /* 0010 */ 0x00, 0x00, 0x00, 0x1A, 0x8D, 0x65, 0x61, 0x30, - /* 0018 */ 0x62, 0x64, 0x64, 0x30, 0x63, 0x34, 0x30, 0x66, - /* 0020 */ 0x35, 0x32, 0x33, 0x36, 0x66, 0x66, 0x65, 0x65, - /* 0028 */ 0x31, 0x30, 0x66, 0x63, 0x35, 0x37, 0x32, 0x34, - /* 0030 */ 0x65, 0x38, 0x31, 0x36, 0x36, 0x37, 0x38, 0x65, - /* 0038 */ 0x64, 0x35, 0x39, 0x34, 0x65, 0x64, 0x65, 0x65, - /* 0040 */ 0x65, 0x37, 0x61, 0x35, 0x32, 0x38, 0x64, 0x32, - /* 0048 */ 0x64, 0x31, 0x65, 0x36, 0x36, 0x32, 0x37, 0x61, - /* 0050 */ 0x65, 0x65, 0x64, 0x32, 0x63, 0x30, 0x30, 0x30, - /* 0058 */ 0x30, 0x32, 0x35, 0x36, 0x39, 0x63, 0x65, 0x64, - /* 0060 */ 0x31, 0x36, 0x35, 0x31, 0x36, 0x33, 0x65, 0x35, - /* 0068 */ 0x31, 0x65, 0x30, 0x36, 0x65, 0x30, 0x31, 0x64, - /* 0070 */ 0x63, 0x34, 0x34, 0x63, 0x33, 0x35, 0x66, 0x65, - /* 0078 */ 0x61, 0x33, 0x65, 0x61, 0x66 - }) - } - } - - Device (P0P1) - { - Name (_ADR, 0x001E0000) - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x0B, 0x04)) - } - - Method (_PRT, 0, NotSerialized) - { - If (PICM) - { - Return (AR01 ()) - } - - Return (PR01 ()) - } - } - - Device (USB1) - { - Name (_ADR, 0x001D0001) - } - - Device (USB2) - { - Name (_ADR, 0x001D0002) - } - - Device (USB3) - { - Name (_ADR, 0x001D0003) - } - - Device (USB4) - { - Name (_ADR, 0x001D0004) - } - - Device (USB5) - { - Name (_ADR, 0x001A0001) - } - - Device (USB6) - { - Name (_ADR, 0x001A0002) - } - - Device (USB7) - { - Name (_ADR, 0x001A0003) - } - - Device (RP01) - { - Name (_ADR, 0x001C0000) - OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) - Field (PXCS, AnyAcc, NoLock, Preserve) - { - Offset (0x10), - L0SE, 1, - Offset (0x11), - Offset (0x12), - , 13, - LASX, 1, - Offset (0x1A), - ABPX, 1, - , 2, - PDCX, 1, - , 2, - PDSX, 1, - Offset (0x1B), - Offset (0x20), - Offset (0x22), - PSPX, 1, - Offset (0x98), - , 30, - HPEX, 1, - PMEX, 1 - } - - Field (PXCS, AnyAcc, NoLock, WriteAsZeros) - { - Offset (0x9C), - , 30, - HPSX, 1, - PMSX, 1 - } - - Device (PXSX) - { - Name (_ADR, Zero) - Name (_PRW, Package (0x02) - { - 0x09, - 0x04 - }) - } - - Method (HPME, 0, Serialized) - { - If (PMSX) - { - Store (0xC8, Local0) - While (Local0) - { - Store (One, PMSX) - If (PMSX) - { - Decrement (Local0) - } - Else - { - Store (Zero, Local0) - } - } - - Notify (PXSX, 0x02) - } - } - - Method (_PRT, 0, NotSerialized) - { - If (PICM) - { - Return (AR04 ()) - } - - Return (PR04 ()) - } - } - - Device (RP02) - { - Name (_ADR, 0x001C0001) - OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) - Field (PXCS, AnyAcc, NoLock, Preserve) - { - Offset (0x10), - L0SE, 1, - Offset (0x11), - Offset (0x12), - , 13, - LASX, 1, - Offset (0x1A), - ABPX, 1, - , 2, - PDCX, 1, - , 2, - PDSX, 1, - Offset (0x1B), - Offset (0x20), - Offset (0x22), - PSPX, 1, - Offset (0x98), - , 30, - HPEX, 1, - PMEX, 1 - } - - Field (PXCS, AnyAcc, NoLock, WriteAsZeros) - { - Offset (0x9C), - , 30, - HPSX, 1, - PMSX, 1 - } - - Device (PXSX) - { - Name (_ADR, Zero) - Name (_PRW, Package (0x02) - { - 0x09, - 0x04 - }) - } - - Method (HPME, 0, Serialized) - { - If (PMSX) - { - Store (0xC8, Local0) - While (Local0) - { - Store (One, PMSX) - If (PMSX) - { - Decrement (Local0) - } - Else - { - Store (Zero, Local0) - } - } - - Notify (PXSX, 0x02) - } - } - - Method (_PRT, 0, NotSerialized) - { - If (PICM) - { - Return (AR05 ()) - } - - Return (PR05 ()) - } - } - - Device (RP03) - { - Name (_ADR, 0x001C0002) - OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) - Field (PXCS, AnyAcc, NoLock, Preserve) - { - Offset (0x10), - L0SE, 1, - Offset (0x11), - Offset (0x12), - , 13, - LASX, 1, - Offset (0x1A), - ABPX, 1, - , 2, - PDCX, 1, - , 2, - PDSX, 1, - Offset (0x1B), - Offset (0x20), - Offset (0x22), - PSPX, 1, - Offset (0x98), - , 30, - HPEX, 1, - PMEX, 1 - } - - Field (PXCS, AnyAcc, NoLock, WriteAsZeros) - { - Offset (0x9C), - , 30, - HPSX, 1, - PMSX, 1 - } - - Device (PXSX) - { - Name (_ADR, Zero) - Name (_PRW, Package (0x02) - { - 0x09, - 0x04 - }) - } - - Method (HPME, 0, Serialized) - { - If (PMSX) - { - Store (0xC8, Local0) - While (Local0) - { - Store (One, PMSX) - If (PMSX) - { - Decrement (Local0) - } - Else - { - Store (Zero, Local0) - } - } - - Notify (PXSX, 0x02) - } - } - - Method (_PRT, 0, NotSerialized) - { - If (PICM) - { - Return (AR06 ()) - } - - Return (PR06 ()) - } - } - - Device (RP04) - { - Name (_ADR, 0x001C0003) - OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) - Field (PXCS, AnyAcc, NoLock, Preserve) - { - Offset (0x10), - L0SE, 1, - Offset (0x11), - Offset (0x12), - , 13, - LASX, 1, - Offset (0x1A), - ABPX, 1, - , 2, - PDCX, 1, - , 2, - PDSX, 1, - Offset (0x1B), - Offset (0x20), - Offset (0x22), - PSPX, 1, - Offset (0x98), - , 30, - HPEX, 1, - PMEX, 1 - } - - Field (PXCS, AnyAcc, NoLock, WriteAsZeros) - { - Offset (0x9C), - , 30, - HPSX, 1, - PMSX, 1 - } - - Device (PXSX) - { - Name (_ADR, Zero) - Name (_PRW, Package (0x02) - { - 0x09, - 0x04 - }) - } - - Method (HPME, 0, Serialized) - { - If (PMSX) - { - Store (0xC8, Local0) - While (Local0) - { - Store (One, PMSX) - If (PMSX) - { - Decrement (Local0) - } - Else - { - Store (Zero, Local0) - } - } - - Notify (PXSX, 0x02) - } - } - - Method (_PRT, 0, NotSerialized) - { - If (PICM) - { - Return (AR07 ()) - } - - Return (PR07 ()) - } - - Device (JMB0) - { - Name (_ADR, Zero) - OperationRegion (CF40, PCI_Config, 0x40, 0x04) - Field (CF40, ByteAcc, NoLock, Preserve) - { - CHE0, 1, - MULT, 1, - , 1, - CAB0, 1, - CHE1, 1, - Offset (0x01), - AHEN, 1, - , 3, - PRT0, 1, - AHM0, 1, - PRT1, 1, - AHM1, 1, - CF42, 6, - SWAP, 1, - PATA, 1, - , 6, - WTEN, 1, - Offset (0x04) - } - - Name (PIOT, Package (0x05) - { - 0x0258, - 0x0186, - 0x014A, - 0xB4, - 0x78 - }) - Name (UDMA, Package (0x07) - { - 0x78, - 0x50, - 0x3C, - 0x28, - 0x1E, - 0x14, - 0x0F - }) - Name (MDMA, Package (0x03) - { - 0x01E0, - 0x96, - 0x78 - }) - Name (IDEB, Buffer (0x14) {}) - CreateDWordField (IDEB, Zero, GTM0) - CreateDWordField (IDEB, 0x04, GTM1) - CreateDWordField (IDEB, 0x08, GTM2) - CreateDWordField (IDEB, 0x0C, GTM3) - CreateDWordField (IDEB, 0x10, GTM4) - Name (PIO0, 0x04) - Name (DMA0, 0x06) - Name (MDA0, 0x02) - Name (PIO1, 0x04) - Name (DMA1, 0x06) - Name (MDA1, 0x02) - Name (PIO2, 0x04) - Name (DMA2, 0x06) - Name (MDA2, 0x02) - Name (PIO3, 0x04) - Name (DMA3, 0x06) - Name (MDA3, 0x02) - Name (FLGP, 0x1F) - Name (FLGS, 0x1F) - Device (IDE0) - { - Name (_ADR, Zero) - Method (_GTM, 0, NotSerialized) - { - Store (DerefOf (Index (PIOT, PIO0)), Local0) - Store (DerefOf (Index (PIOT, PIO1)), Local2) - Store (0x1A, Local4) - If (LAnd (FLGP, One)) - { - If (LNot (MULT)) - { - If (LAnd (CAB0, SWAP)) - { - Store (0x02, DMA0) - } - } - - Store (DerefOf (Index (UDMA, DMA0)), Local1) - Or (Local4, One, Local4) - } - Else - { - Store (DerefOf (Index (MDMA, MDA0)), Local1) - } - - If (LAnd (FLGP, 0x04)) - { - If (LAnd (CAB0, SWAP)) - { - Store (0x02, DMA1) - } - - Store (DerefOf (Index (UDMA, DMA1)), Local3) - Or (Local4, 0x04, Local4) - } - Else - { - Store (DerefOf (Index (MDMA, MDA1)), Local3) - } - - Store (Local0, GTM0) - Store (Local1, GTM1) - Store (Local2, GTM2) - Store (Local3, GTM3) - Store (Local4, GTM4) - Return (IDEB) - } - - Method (_STM, 3, NotSerialized) - { - Store (Arg0, IDEB) - Store (GTM0, Local0) - Store (GTM1, Local1) - Store (GTM2, Local2) - Store (GTM3, Local3) - Store (GTM4, Local4) - Store (Local4, FLGP) - If (LAnd (LNotEqual (Local0, 0xFFFFFFFF), LNotEqual (Local0, Zero))) - { - Store (Match (PIOT, MEQ, Local0, MTR, Zero, Zero), PIO0) - } - - If (LAnd (LNotEqual (Local1, 0xFFFFFFFF), LNotEqual (Local1, Zero))) - { - If (LAnd (FLGP, One)) - { - Store (Match (UDMA, MEQ, Local1, MTR, Zero, Zero), DMA0) - } - Else - { - Store (Match (MDMA, MEQ, Local1, MTR, Zero, Zero), MDA0) - } - } - - If (LAnd (LNotEqual (Local2, 0xFFFFFFFF), LNotEqual (Local2, Zero))) - { - Store (Match (PIOT, MEQ, Local2, MTR, Zero, Zero), PIO1) - } - - If (LAnd (LNotEqual (Local3, 0xFFFFFFFF), LNotEqual (Local3, Zero))) - { - If (LAnd (FLGP, 0x04)) - { - Store (Match (UDMA, MEQ, Local3, MTR, Zero, Zero), DMA1) - } - Else - { - Store (Match (MDMA, MEQ, Local3, MTR, Zero, Zero), MDA1) - } - } - } - - Device (DRV0) - { - Name (_ADR, Zero) - Method (_GTF, 0, NotSerialized) - { - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF - }, Local0) - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF - }, Local1) - CreateByteField (Local0, One, PIOM) - CreateByteField (Local1, One, DMAM) - Store (PIO0, PIOM) - Or (PIOM, 0x08, PIOM) - If (LAnd (FLGP, One)) - { - Store (DMA0, DMAM) - Or (DMAM, 0x40, DMAM) - } - Else - { - Store (MDA0, DMAM) - Or (DMAM, 0x20, DMAM) - } - - Concatenate (Local0, Local1, Local2) - Return (Local2) - } - } - - Device (DRV1) - { - Name (_ADR, One) - Method (_GTF, 0, NotSerialized) - { - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF - }, Local0) - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF - }, Local1) - CreateByteField (Local0, One, PIOM) - CreateByteField (Local1, One, DMAM) - Store (PIO1, PIOM) - Or (PIOM, 0x08, PIOM) - If (LAnd (FLGP, 0x04)) - { - Store (DMA1, DMAM) - Or (DMAM, 0x40, DMAM) - } - Else - { - Store (MDA1, DMAM) - Or (DMAM, 0x20, DMAM) - } - - Concatenate (Local0, Local1, Local2) - Return (Local2) - } - } - } - - Device (IDE1) - { - Name (_ADR, One) - Method (_GTM, 0, NotSerialized) - { - Store (DerefOf (Index (PIOT, PIO2)), Local0) - Store (DerefOf (Index (PIOT, PIO3)), Local2) - Store (0x1A, Local4) - If (LAnd (FLGS, One)) - { - If (LNot (MULT)) - { - If (LAnd (CAB0, LNot (SWAP))) - { - Store (0x02, DMA2) - } - } - - Store (DerefOf (Index (UDMA, DMA2)), Local1) - Or (Local4, One, Local4) - } - Else - { - Store (DerefOf (Index (MDMA, MDA2)), Local1) - } - - If (LAnd (FLGS, 0x04)) - { - If (LAnd (CAB0, LNot (SWAP))) - { - Store (0x02, DMA3) - } - - Store (DerefOf (Index (UDMA, DMA3)), Local3) - Or (Local4, 0x04, Local4) - } - Else - { - Store (DerefOf (Index (MDMA, MDA3)), Local3) - } - - Store (Local0, GTM0) - Store (Local1, GTM1) - Store (Local2, GTM2) - Store (Local3, GTM3) - Store (Local4, GTM4) - Return (IDEB) - } - - Method (_STM, 3, NotSerialized) - { - Store (Arg0, IDEB) - Store (GTM0, Local0) - Store (GTM1, Local1) - Store (GTM2, Local2) - Store (GTM3, Local3) - Store (GTM4, Local4) - Store (Local4, FLGS) - If (LAnd (LNotEqual (Local0, 0xFFFFFFFF), LNotEqual (Local0, Zero))) - { - Store (Match (PIOT, MEQ, Local0, MTR, Zero, Zero), PIO2) - } - - If (LAnd (LNotEqual (Local1, 0xFFFFFFFF), LNotEqual (Local1, Zero))) - { - If (LAnd (FLGS, One)) - { - Store (Match (UDMA, MEQ, Local1, MTR, Zero, Zero), DMA2) - } - Else - { - Store (Match (MDMA, MEQ, Local1, MTR, Zero, Zero), MDA2) - } - } - - If (LAnd (LNotEqual (Local2, 0xFFFFFFFF), LNotEqual (Local2, Zero))) - { - Store (Match (PIOT, MEQ, Local2, MTR, Zero, Zero), PIO3) - } - - If (LAnd (LNotEqual (Local3, 0xFFFFFFFF), LNotEqual (Local3, Zero))) - { - If (LAnd (FLGS, 0x04)) - { - Store (Match (UDMA, MEQ, Local3, MTR, Zero, Zero), DMA3) - } - Else - { - Store (Match (MDMA, MEQ, Local3, MTR, Zero, Zero), MDA3) - } - } - } - - Device (DRV0) - { - Name (_ADR, Zero) - Method (_GTF, 0, NotSerialized) - { - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF - }, Local0) - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF - }, Local1) - CreateByteField (Local0, One, PIOM) - CreateByteField (Local1, One, DMAM) - Store (PIO2, PIOM) - Or (PIOM, 0x08, PIOM) - If (LAnd (FLGS, One)) - { - Store (DMA2, DMAM) - Or (DMAM, 0x40, DMAM) - } - Else - { - Store (MDA2, DMAM) - Or (DMAM, 0x20, DMAM) - } - - Concatenate (Local0, Local1, Local2) - Return (Local2) - } - } - - Device (DRV1) - { - Name (_ADR, One) - Method (_GTF, 0, NotSerialized) - { - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF - }, Local0) - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF - }, Local1) - CreateByteField (Local0, One, PIOM) - CreateByteField (Local1, One, DMAM) - Store (PIO3, PIOM) - Or (PIOM, 0x08, PIOM) - If (LAnd (FLGS, 0x04)) - { - Store (DMA3, DMAM) - Or (DMAM, 0x40, DMAM) - } - Else - { - Store (MDA3, DMAM) - Or (DMAM, 0x20, DMAM) - } - - Concatenate (Local0, Local1, Local2) - Return (Local2) - } - } - } - } - - Device (JMB1) - { - Name (_ADR, One) - OperationRegion (CF40, PCI_Config, 0x40, 0x04) - Field (CF40, ByteAcc, NoLock, Preserve) - { - CHE0, 1, - MULT, 1, - , 1, - CAB0, 1, - CHE1, 1, - Offset (0x01), - AHEN, 1, - , 3, - PRT0, 1, - AHM0, 1, - PRT1, 1, - AHM1, 1, - CF42, 6, - SWAP, 1, - PATA, 1, - , 6, - WTEN, 1, - Offset (0x04) - } - - Name (PIOT, Package (0x05) - { - 0x0258, - 0x0186, - 0x014A, - 0xB4, - 0x78 - }) - Name (UDMA, Package (0x07) - { - 0x78, - 0x50, - 0x3C, - 0x28, - 0x1E, - 0x14, - 0x0F - }) - Name (MDMA, Package (0x03) - { - 0x01E0, - 0x96, - 0x78 - }) - Name (IDEB, Buffer (0x14) {}) - CreateDWordField (IDEB, Zero, GTM0) - CreateDWordField (IDEB, 0x04, GTM1) - CreateDWordField (IDEB, 0x08, GTM2) - CreateDWordField (IDEB, 0x0C, GTM3) - CreateDWordField (IDEB, 0x10, GTM4) - Name (PIO0, 0x04) - Name (DMA0, 0x06) - Name (MDA0, 0x02) - Name (PIO1, 0x04) - Name (DMA1, 0x06) - Name (MDA1, 0x02) - Name (PIO2, 0x04) - Name (DMA2, 0x06) - Name (MDA2, 0x02) - Name (PIO3, 0x04) - Name (DMA3, 0x06) - Name (MDA3, 0x02) - Name (FLGP, 0x1F) - Name (FLGS, 0x1F) - Device (IDE0) - { - Name (_ADR, Zero) - Method (_GTM, 0, NotSerialized) - { - Store (DerefOf (Index (PIOT, PIO0)), Local0) - Store (DerefOf (Index (PIOT, PIO1)), Local2) - Store (0x1A, Local4) - If (LAnd (FLGP, One)) - { - If (LAnd (CAB0, SWAP)) - { - Store (0x02, DMA0) - } - - Store (DerefOf (Index (UDMA, DMA0)), Local1) - Or (Local4, One, Local4) - } - Else - { - Store (DerefOf (Index (MDMA, MDA0)), Local1) - } - - If (LAnd (FLGP, 0x04)) - { - If (LAnd (CAB0, SWAP)) - { - Store (0x02, DMA1) - } - - Store (DerefOf (Index (UDMA, DMA1)), Local3) - Or (Local4, 0x04, Local4) - } - Else - { - Store (DerefOf (Index (MDMA, MDA1)), Local3) - } - - Store (Local0, GTM0) - Store (Local1, GTM1) - Store (Local2, GTM2) - Store (Local3, GTM3) - Store (Local4, GTM4) - Return (IDEB) - } - - Method (_STM, 3, NotSerialized) - { - Store (Arg0, IDEB) - Store (GTM0, Local0) - Store (GTM1, Local1) - Store (GTM2, Local2) - Store (GTM3, Local3) - Store (GTM4, Local4) - Store (Local4, FLGP) - If (LAnd (LNotEqual (Local0, 0xFFFFFFFF), LNotEqual (Local0, Zero))) - { - Store (Match (PIOT, MEQ, Local0, MTR, Zero, Zero), PIO0) - } - - If (LAnd (LNotEqual (Local1, 0xFFFFFFFF), LNotEqual (Local1, Zero))) - { - If (LAnd (FLGP, One)) - { - Store (Match (UDMA, MEQ, Local1, MTR, Zero, Zero), DMA0) - } - Else - { - Store (Match (MDMA, MEQ, Local1, MTR, Zero, Zero), MDA0) - } - } - - If (LAnd (LNotEqual (Local2, 0xFFFFFFFF), LNotEqual (Local2, Zero))) - { - Store (Match (PIOT, MEQ, Local2, MTR, Zero, Zero), PIO1) - } - - If (LAnd (LNotEqual (Local3, 0xFFFFFFFF), LNotEqual (Local3, Zero))) - { - If (LAnd (FLGP, 0x04)) - { - Store (Match (UDMA, MEQ, Local3, MTR, Zero, Zero), DMA1) - } - Else - { - Store (Match (MDMA, MEQ, Local3, MTR, Zero, Zero), MDA1) - } - } - } - - Device (DRV0) - { - Name (_ADR, Zero) - Method (_GTF, 0, NotSerialized) - { - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF - }, Local0) - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF - }, Local1) - CreateByteField (Local0, One, PIOM) - CreateByteField (Local1, One, DMAM) - Store (PIO0, PIOM) - Or (PIOM, 0x08, PIOM) - If (LAnd (FLGP, One)) - { - Store (DMA0, DMAM) - Or (DMAM, 0x40, DMAM) - } - Else - { - Store (MDA0, DMAM) - Or (DMAM, 0x20, DMAM) - } - - Concatenate (Local0, Local1, Local2) - Return (Local2) - } - } - - Device (DRV1) - { - Name (_ADR, One) - Method (_GTF, 0, NotSerialized) - { - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF - }, Local0) - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF - }, Local1) - CreateByteField (Local0, One, PIOM) - CreateByteField (Local1, One, DMAM) - Store (PIO1, PIOM) - Or (PIOM, 0x08, PIOM) - If (LAnd (FLGP, 0x04)) - { - Store (DMA1, DMAM) - Or (DMAM, 0x40, DMAM) - } - Else - { - Store (MDA1, DMAM) - Or (DMAM, 0x20, DMAM) - } - - Concatenate (Local0, Local1, Local2) - Return (Local2) - } - } - } - - Device (IDE1) - { - Name (_ADR, One) - Method (_GTM, 0, NotSerialized) - { - Store (DerefOf (Index (PIOT, PIO2)), Local0) - Store (DerefOf (Index (PIOT, PIO3)), Local2) - Store (0x1A, Local4) - If (LAnd (FLGS, One)) - { - If (LAnd (CAB0, LNot (SWAP))) - { - Store (0x02, DMA2) - } - - Store (DerefOf (Index (UDMA, DMA2)), Local1) - Or (Local4, One, Local4) - } - Else - { - Store (DerefOf (Index (MDMA, MDA2)), Local1) - } - - If (LAnd (FLGS, 0x04)) - { - If (LAnd (CAB0, LNot (SWAP))) - { - Store (0x02, DMA3) - } - - Store (DerefOf (Index (UDMA, DMA3)), Local3) - Or (Local4, 0x04, Local4) - } - Else - { - Store (DerefOf (Index (MDMA, MDA3)), Local3) - } - - Store (Local0, GTM0) - Store (Local1, GTM1) - Store (Local2, GTM2) - Store (Local3, GTM3) - Store (Local4, GTM4) - Return (IDEB) - } - - Method (_STM, 3, NotSerialized) - { - Store (Arg0, IDEB) - Store (GTM0, Local0) - Store (GTM1, Local1) - Store (GTM2, Local2) - Store (GTM3, Local3) - Store (GTM4, Local4) - Store (Local4, FLGS) - If (LAnd (LNotEqual (Local0, 0xFFFFFFFF), LNotEqual (Local0, Zero))) - { - Store (Match (PIOT, MEQ, Local0, MTR, Zero, Zero), PIO2) - } - - If (LAnd (LNotEqual (Local1, 0xFFFFFFFF), LNotEqual (Local1, Zero))) - { - If (LAnd (FLGS, One)) - { - Store (Match (UDMA, MEQ, Local1, MTR, Zero, Zero), DMA2) - } - Else - { - Store (Match (MDMA, MEQ, Local1, MTR, Zero, Zero), MDA2) - } - } - - If (LAnd (LNotEqual (Local2, 0xFFFFFFFF), LNotEqual (Local2, Zero))) - { - Store (Match (PIOT, MEQ, Local2, MTR, Zero, Zero), PIO3) - } - - If (LAnd (LNotEqual (Local3, 0xFFFFFFFF), LNotEqual (Local3, Zero))) - { - If (LAnd (FLGS, 0x04)) - { - Store (Match (UDMA, MEQ, Local3, MTR, Zero, Zero), DMA3) - } - Else - { - Store (Match (MDMA, MEQ, Local3, MTR, Zero, Zero), MDA3) - } - } - } - - Device (DRV0) - { - Name (_ADR, Zero) - Method (_GTF, 0, NotSerialized) - { - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF - }, Local0) - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF - }, Local1) - CreateByteField (Local0, One, PIOM) - CreateByteField (Local1, One, DMAM) - Store (PIO2, PIOM) - Or (PIOM, 0x08, PIOM) - If (LAnd (FLGS, One)) - { - Store (DMA2, DMAM) - Or (DMAM, 0x40, DMAM) - } - Else - { - Store (MDA2, DMAM) - Or (DMAM, 0x20, DMAM) - } - - Concatenate (Local0, Local1, Local2) - Return (Local2) - } - } - - Device (DRV1) - { - Name (_ADR, One) - Method (_GTF, 0, NotSerialized) - { - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF - }, Local0) - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF - }, Local1) - CreateByteField (Local0, One, PIOM) - CreateByteField (Local1, One, DMAM) - Store (PIO3, PIOM) - Or (PIOM, 0x08, PIOM) - If (LAnd (FLGS, 0x04)) - { - Store (DMA3, DMAM) - Or (DMAM, 0x40, DMAM) - } - Else - { - Store (MDA3, DMAM) - Or (DMAM, 0x20, DMAM) - } - - Concatenate (Local0, Local1, Local2) - Return (Local2) - } - } - } - } - } - - Device (RP05) - { - Name (_ADR, 0x001C0004) - OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) - Field (PXCS, AnyAcc, NoLock, Preserve) - { - Offset (0x10), - L0SE, 1, - Offset (0x11), - Offset (0x12), - , 13, - LASX, 1, - Offset (0x1A), - ABPX, 1, - , 2, - PDCX, 1, - , 2, - PDSX, 1, - Offset (0x1B), - Offset (0x20), - Offset (0x22), - PSPX, 1, - Offset (0x98), - , 30, - HPEX, 1, - PMEX, 1 - } - - Field (PXCS, AnyAcc, NoLock, WriteAsZeros) - { - Offset (0x9C), - , 30, - HPSX, 1, - PMSX, 1 - } - - Device (PXSX) - { - Name (_ADR, Zero) - Name (_PRW, Package (0x02) - { - 0x09, - 0x04 - }) - } - - Method (HPME, 0, Serialized) - { - If (PMSX) - { - Store (0xC8, Local0) - While (Local0) - { - Store (One, PMSX) - If (PMSX) - { - Decrement (Local0) - } - Else - { - Store (Zero, Local0) - } - } - - Notify (PXSX, 0x02) - } - } - - Method (_PRT, 0, NotSerialized) - { - If (PICM) - { - Return (AR08 ()) - } - - Return (PR08 ()) - } - } - - Device (RP06) - { - Name (_ADR, 0x001C0005) - OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) - Field (PXCS, AnyAcc, NoLock, Preserve) - { - Offset (0x10), - L0SE, 1, - Offset (0x11), - Offset (0x12), - , 13, - LASX, 1, - Offset (0x1A), - ABPX, 1, - , 2, - PDCX, 1, - , 2, - PDSX, 1, - Offset (0x1B), - Offset (0x20), - Offset (0x22), - PSPX, 1, - Offset (0x98), - , 30, - HPEX, 1, - PMEX, 1 - } - - Field (PXCS, AnyAcc, NoLock, WriteAsZeros) - { - Offset (0x9C), - , 30, - HPSX, 1, - PMSX, 1 - } - - Device (PXSX) - { - Name (_ADR, Zero) - Name (_PRW, Package (0x02) - { - 0x09, - 0x04 - }) - } - - Method (HPME, 0, Serialized) - { - If (PMSX) - { - Store (0xC8, Local0) - While (Local0) - { - Store (One, PMSX) - If (PMSX) - { - Decrement (Local0) - } - Else - { - Store (Zero, Local0) - } - } - - Notify (PXSX, 0x02) - } - } - - Method (_PRT, 0, NotSerialized) - { - If (PICM) - { - Return (AR09 ()) - } - - Return (PR09 ()) - } - } - - Device (RP08) - { - Name (_ADR, 0x001C0007) - OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) - Field (PXCS, AnyAcc, NoLock, Preserve) - { - Offset (0x10), - L0SE, 1, - Offset (0x11), - Offset (0x12), - , 13, - LASX, 1, - Offset (0x1A), - ABPX, 1, - , 2, - PDCX, 1, - , 2, - PDSX, 1, - Offset (0x1B), - Offset (0x20), - Offset (0x22), - PSPX, 1, - Offset (0x98), - , 30, - HPEX, 1, - PMEX, 1 - } - - Field (PXCS, AnyAcc, NoLock, WriteAsZeros) - { - Offset (0x9C), - , 30, - HPSX, 1, - PMSX, 1 - } - - Device (PXSX) - { - Name (_ADR, Zero) - Name (_PRW, Package (0x02) - { - 0x09, - 0x04 - }) - } - - Method (HPME, 0, Serialized) - { - If (PMSX) - { - Store (0xC8, Local0) - While (Local0) - { - Store (One, PMSX) - If (PMSX) - { - Decrement (Local0) - } - Else - { - Store (Zero, Local0) - } - } - - Notify (PXSX, 0x02) - } - } - - Method (_PRT, 0, NotSerialized) - { - If (PICM) - { - Return (AR0F ()) - } - - Return (PR0F ()) - } - } - - Device (PEG0) - { - Name (_ADR, 0x00010000) - Method (_PRT, 0, NotSerialized) - { - If (PICM) - { - Return (AR02 ()) - } - - Return (PR02 ()) - } - - Device (PEGP) - { - Name (_ADR, 0xFFFF) - } - } - - Device (PEG1) - { - Name (_ADR, 0x00010001) - Method (_PRT, 0, NotSerialized) - { - If (PICM) - { - Return (AR0A ()) - } - - Return (PR0A ()) - } - } - - Device (PEG2) - { - Name (_ADR, 0x00010002) - Method (_PRT, 0, NotSerialized) - { - If (PICM) - { - Return (AR0B ()) - } - - Return (PR0B ()) - } - } - - Device (PEG3) - { - Name (_ADR, 0x00060000) - Method (_PRT, 0, NotSerialized) - { - If (PICM) - { - Return (AR0C ()) - } - - Return (PR0C ()) - } - } - - Device (B0D4) - { - Name (_ADR, 0x00040000) - } - - Device (EUSB) - { - Name (_ADR, 0x001D0000) - Name (_S4D, 0x02) - Name (_S3D, 0x02) - Name (_S2D, 0x02) - Name (_S1D, 0x02) - Device (HUBN) - { - Name (_ADR, Zero) - Device (PR10) - { - Name (_ADR, One) - Name (_UPC, Package (0x04) - { - 0xFF, - Zero, - Zero, - Zero - }) - Name (_PLD, Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0x30, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }) - Device (PR30) - { - Name (_ADR, One) - Name (_UPC, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Name (_PLD, Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xE1, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }) - } - - Device (PR31) - { - Name (_ADR, 0x02) - Name (_UPC, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Name (_PLD, Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }) - } - - Device (PR32) - { - Name (_ADR, 0x03) - Name (_UPC, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Name (_PLD, Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }) - } - - Device (PR33) - { - Name (_ADR, 0x04) - Name (_UPC, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Name (_PLD, Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xE1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }) - } - - Device (PR34) - { - Name (_ADR, 0x05) - Name (_UPC, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Name (_PLD, Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }) - } - - Device (PR35) - { - Name (_ADR, 0x06) - Name (_UPC, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Name (_PLD, Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }) - } - - Device (PR36) - { - Name (_ADR, 0x07) - Name (_UPC, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Name (_PLD, Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xB0, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }) - } - - Device (PR37) - { - Name (_ADR, 0x08) - Name (_UPC, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Name (_PLD, Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }) - } - } - } - } - - Device (RP07) - { - Name (_ADR, 0x001C0006) - OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) - Field (PXCS, AnyAcc, NoLock, Preserve) - { - Offset (0x10), - L0SE, 1, - Offset (0x11), - Offset (0x12), - , 13, - LASX, 1, - Offset (0x1A), - ABPX, 1, - , 2, - PDCX, 1, - , 2, - PDSX, 1, - Offset (0x1B), - Offset (0x20), - Offset (0x22), - PSPX, 1, - Offset (0x98), - , 30, - HPEX, 1, - PMEX, 1 - } - - Field (PXCS, AnyAcc, NoLock, WriteAsZeros) - { - Offset (0x9C), - , 30, - HPSX, 1, - PMSX, 1 - } - - Method (HPME, 0, Serialized) - { - If (PMSX) - { - Store (0xC8, Local0) - While (Local0) - { - Store (One, PMSX) - If (PMSX) - { - Decrement (Local0) - } - Else - { - Store (Zero, Local0) - } - } - - Notify (PXSX, 0x02) - } - } - - Method (_PRT, 0, NotSerialized) - { - If (PICM) - { - Return (AR0E ()) - } - - Return (PR0E ()) - } - - Device (PXSX) - { - Name (_ADR, Zero) - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x0B, 0x04)) - } - - Method (_PRT, 0, NotSerialized) - { - If (PICM) - { - Return (AR31) - } - - Return (PR31) - } - } - } - } - - Scope (\_GPE) - { - Method (_L1D, 0, NotSerialized) - { - \_SB.PCI0.LPCB.SIOH () - Notify (\_SB.PWRB, 0x02) - } - - Method (_L0B, 0, NotSerialized) - { - Notify (\_SB.PCI0.P0P1, 0x02) - Notify (\_SB.PCI0.RP07.PXSX, 0x02) - Notify (\_SB.PWRB, 0x02) - } - } - - Device (PWRB) - { - Name (_HID, EisaId ("PNP0C0C")) - Name (_UID, 0xAA) - Name (_STA, 0x0B) - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x1D, 0x04)) - } - } - } - - Scope (\) - { - OperationRegion (IO_T, SystemIO, 0x0200, 0x10) - Field (IO_T, ByteAcc, NoLock, Preserve) - { - TRPI, 16, - Offset (0x04), - Offset (0x06), - Offset (0x08), - TRP0, 8, - Offset (0x0A), - Offset (0x0B), - Offset (0x0C), - Offset (0x0D), - Offset (0x0E), - Offset (0x0F), - Offset (0x10) - } - - OperationRegion (IO_D, SystemIO, 0x0810, 0x04) - Field (IO_D, ByteAcc, NoLock, Preserve) - { - TRPD, 8 - } - - OperationRegion (IO_H, SystemIO, 0x1000, 0x04) - Field (IO_H, ByteAcc, NoLock, Preserve) - { - TRPH, 8 - } - - OperationRegion (PMIO, SystemIO, PMBS, 0x80) - Field (PMIO, ByteAcc, NoLock, Preserve) - { - Offset (0x28), - Offset (0x2A), - , 3, - GPE3, 1, - Offset (0x3C), - , 1, - UPRW, 1, - Offset (0x42), - , 1, - GPEC, 1 - } - - Field (PMIO, ByteAcc, NoLock, WriteAsZeros) - { - Offset (0x20), - Offset (0x22), - , 3, - GPS3, 1, - Offset (0x64), - , 9, - SCIS, 1, - Offset (0x66) - } - - OperationRegion (GPIO, SystemIO, GPBS, 0x64) - Field (GPIO, ByteAcc, NoLock, Preserve) - { - GU00, 8, - GU01, 8, - GU02, 8, - GU03, 8, - GIO0, 8, - GIO1, 8, - GIO2, 8, - GIO3, 8, - Offset (0x0C), - GL00, 8, - GL01, 8, - GL02, 8, - GP24, 1, - , 2, - GP27, 1, - GP28, 1, - Offset (0x10), - Offset (0x18), - GB00, 8, - GB01, 8, - GB02, 8, - GB03, 8, - Offset (0x2C), - GIV0, 8, - GIV1, 8, - GIV2, 8, - GIV3, 8, - GU04, 8, - GU05, 8, - GU06, 8, - GU07, 8, - GIO4, 8, - GIO5, 8, - GIO6, 8, - GIO7, 8, - GL04, 8, - GL05, 8, - GL06, 8, - GL07, 8, - Offset (0x40), - GU08, 8, - GU09, 8, - GU0A, 8, - GU0B, 8, - GIO8, 8, - GIO9, 8, - GIOA, 8, - GIOB, 8, - GL08, 8, - GL09, 8, - GL0A, 8, - GL0B, 8 - } - - OperationRegion (RCRB, SystemMemory, SRCB, 0x4000) - Field (RCRB, DWordAcc, Lock, Preserve) - { - Offset (0x1000), - Offset (0x3000), - Offset (0x3404), - HPAS, 2, - , 5, - HPAE, 1, - Offset (0x3418), - , 1, - , 1, - SATD, 1, - SMBD, 1, - HDAD, 1, - Offset (0x341A), - RP1D, 1, - RP2D, 1, - RP3D, 1, - RP4D, 1, - RP5D, 1, - RP6D, 1, - RP7D, 1, - RP8D, 1, - Offset (0x359C), - UP0D, 1, - UP1D, 1, - UP2D, 1, - UP3D, 1, - UP4D, 1, - UP5D, 1, - UP6D, 1, - UP7D, 1, - UP8D, 1, - UP9D, 1, - UPAD, 1, - UPBD, 1, - UPCD, 1, - UPDD, 1, - , 1, - Offset (0x359E) - } - } - - Scope (_SB.PCI0) - { - Device (GLAN) - { - Name (_ADR, 0x00190000) - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x0D, 0x04)) - } - } - - Device (EHC1) - { - Name (_ADR, 0x001D0000) - OperationRegion (PWKE, PCI_Config, 0x62, 0x04) - Field (PWKE, DWordAcc, NoLock, Preserve) - { - , 1, - PWUC, 8 - } - - Method (_PSW, 1, NotSerialized) - { - If (Arg0) - { - Store (Ones, PWUC) - } - Else - { - Store (Zero, PWUC) - } - } - - Method (_S3D, 0, NotSerialized) - { - Return (0x02) - } - - Method (_S4D, 0, NotSerialized) - { - Return (0x02) - } - - Device (HUBN) - { - Name (_ADR, Zero) - Device (PR01) - { - Name (_ADR, One) - Method (_UPC, 0, Serialized) - { - Name (UPCA, Package (0x04) - { - 0xFF, - Zero, - Zero, - Zero - }) - Return (UPCA) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0x30, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Return (PLDP) - } - - Device (PR11) - { - Name (_ADR, One) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xE1, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Return (PLDP) - } - } - - Device (PR12) - { - Name (_ADR, 0x02) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Return (PLDP) - } - } - - Device (PR13) - { - Name (_ADR, 0x03) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Return (PLDP) - } - } - - Device (PR14) - { - Name (_ADR, 0x04) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xE1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Return (PLDP) - } - - Alias (SBV1, SDGV) - Method (_DSM, 4, Serialized) - { - If (LEqual (Arg0, Buffer (0x10) - { - /* 0000 */ 0x8F, 0x70, 0xFC, 0xA5, 0x75, 0x87, 0xA6, 0x4B, - /* 0008 */ 0xBD, 0x0C, 0xBA, 0x90, 0xA1, 0xEC, 0x72, 0xF8 - })) - { - Name (_T_0, Zero) - Store (ToInteger (Arg2), _T_0) - If (LEqual (_T_0, Zero)) - { - If (LEqual (Arg1, One)) - { - Return (Buffer (One) - { - 0x07 - }) - } - Else - { - Return (Buffer (One) - { - 0x00 - }) - } - } - Else - { - If (LEqual (_T_0, One)) - { - If (LEqual (SDGV, 0xFF)) - { - Return (Zero) - } - Else - { - Return (One) - } - } - Else - { - If (LEqual (_T_0, 0x02)) - { - Return (SDGV) - } - } - } - } - - Return (Zero) - } - } - - Device (PR15) - { - Name (_ADR, 0x05) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Return (PLDP) - } - - Alias (SBV2, SDGV) - Method (_DSM, 4, Serialized) - { - If (LEqual (Arg0, Buffer (0x10) - { - /* 0000 */ 0x8F, 0x70, 0xFC, 0xA5, 0x75, 0x87, 0xA6, 0x4B, - /* 0008 */ 0xBD, 0x0C, 0xBA, 0x90, 0xA1, 0xEC, 0x72, 0xF8 - })) - { - Name (_T_0, Zero) - Store (ToInteger (Arg2), _T_0) - If (LEqual (_T_0, Zero)) - { - If (LEqual (Arg1, One)) - { - Return (Buffer (One) - { - 0x07 - }) - } - Else - { - Return (Buffer (One) - { - 0x00 - }) - } - } - Else - { - If (LEqual (_T_0, One)) - { - If (LEqual (SDGV, 0xFF)) - { - Return (Zero) - } - Else - { - Return (One) - } - } - Else - { - If (LEqual (_T_0, 0x02)) - { - Return (SDGV) - } - } - } - } - - Return (Zero) - } - } - - Device (PR16) - { - Name (_ADR, 0x06) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Return (PLDP) - } - - Alias (SBV1, SDGV) - Method (_DSM, 4, Serialized) - { - If (LEqual (Arg0, Buffer (0x10) - { - /* 0000 */ 0x8F, 0x70, 0xFC, 0xA5, 0x75, 0x87, 0xA6, 0x4B, - /* 0008 */ 0xBD, 0x0C, 0xBA, 0x90, 0xA1, 0xEC, 0x72, 0xF8 - })) - { - Name (_T_0, Zero) - Store (ToInteger (Arg2), _T_0) - If (LEqual (_T_0, Zero)) - { - If (LEqual (Arg1, One)) - { - Return (Buffer (One) - { - 0x07 - }) - } - Else - { - Return (Buffer (One) - { - 0x00 - }) - } - } - Else - { - If (LEqual (_T_0, One)) - { - If (LEqual (SDGV, 0xFF)) - { - Return (Zero) - } - Else - { - Return (One) - } - } - Else - { - If (LEqual (_T_0, 0x02)) - { - Return (SDGV) - } - } - } - } - - Return (Zero) - } - } - - Device (PR17) - { - Name (_ADR, 0x07) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Return (PLDP) - } - - Alias (SBV2, SDGV) - Method (_DSM, 4, Serialized) - { - If (LEqual (Arg0, Buffer (0x10) - { - /* 0000 */ 0x8F, 0x70, 0xFC, 0xA5, 0x75, 0x87, 0xA6, 0x4B, - /* 0008 */ 0xBD, 0x0C, 0xBA, 0x90, 0xA1, 0xEC, 0x72, 0xF8 - })) - { - Name (_T_0, Zero) - Store (ToInteger (Arg2), _T_0) - If (LEqual (_T_0, Zero)) - { - If (LEqual (Arg1, One)) - { - Return (Buffer (One) - { - 0x07 - }) - } - Else - { - Return (Buffer (One) - { - 0x00 - }) - } - } - Else - { - If (LEqual (_T_0, One)) - { - If (LEqual (SDGV, 0xFF)) - { - Return (Zero) - } - Else - { - Return (One) - } - } - Else - { - If (LEqual (_T_0, 0x02)) - { - Return (SDGV) - } - } - } - } - - Return (Zero) - } - } - - Device (PR18) - { - Name (_ADR, 0x08) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Return (PLDP) - } - } - } - } - - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x0D, 0x04)) - } - } - - Device (EHC2) - { - Name (_ADR, 0x001A0000) - OperationRegion (PWKE, PCI_Config, 0x62, 0x04) - Field (PWKE, DWordAcc, NoLock, Preserve) - { - , 1, - PWUC, 6 - } - - Method (_PSW, 1, NotSerialized) - { - If (Arg0) - { - Store (Ones, PWUC) - } - Else - { - Store (Zero, PWUC) - } - } - - Method (_S3D, 0, NotSerialized) - { - Return (0x02) - } - - Method (_S4D, 0, NotSerialized) - { - Return (0x02) - } - - Device (HUBN) - { - Name (_ADR, Zero) - Device (PR01) - { - Name (_ADR, One) - Method (_UPC, 0, Serialized) - { - Name (UPCA, Package (0x04) - { - 0xFF, - Zero, - Zero, - Zero - }) - Return (UPCA) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0x30, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Return (PLDP) - } - - Device (PR11) - { - Name (_ADR, One) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xE1, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Return (PLDP) - } - } - - Device (PR12) - { - Name (_ADR, 0x02) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Return (PLDP) - } - - Alias (SBV1, SDGV) - Method (_DSM, 4, Serialized) - { - If (LEqual (Arg0, Buffer (0x10) - { - /* 0000 */ 0x8F, 0x70, 0xFC, 0xA5, 0x75, 0x87, 0xA6, 0x4B, - /* 0008 */ 0xBD, 0x0C, 0xBA, 0x90, 0xA1, 0xEC, 0x72, 0xF8 - })) - { - Name (_T_0, Zero) - Store (ToInteger (Arg2), _T_0) - If (LEqual (_T_0, Zero)) - { - If (LEqual (Arg1, One)) - { - Return (Buffer (One) - { - 0x07 - }) - } - Else - { - Return (Buffer (One) - { - 0x00 - }) - } - } - Else - { - If (LEqual (_T_0, One)) - { - If (LEqual (SDGV, 0xFF)) - { - Return (Zero) - } - Else - { - Return (One) - } - } - Else - { - If (LEqual (_T_0, 0x02)) - { - Return (SDGV) - } - } - } - } - - Return (Zero) - } - } - - Device (PR13) - { - Name (_ADR, 0x03) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Return (PLDP) - } - - Alias (SBV2, SDGV) - Method (_DSM, 4, Serialized) - { - If (LEqual (Arg0, Buffer (0x10) - { - /* 0000 */ 0x8F, 0x70, 0xFC, 0xA5, 0x75, 0x87, 0xA6, 0x4B, - /* 0008 */ 0xBD, 0x0C, 0xBA, 0x90, 0xA1, 0xEC, 0x72, 0xF8 - })) - { - Name (_T_0, Zero) - Store (ToInteger (Arg2), _T_0) - If (LEqual (_T_0, Zero)) - { - If (LEqual (Arg1, One)) - { - Return (Buffer (One) - { - 0x07 - }) - } - Else - { - Return (Buffer (One) - { - 0x00 - }) - } - } - Else - { - If (LEqual (_T_0, One)) - { - If (LEqual (SDGV, 0xFF)) - { - Return (Zero) - } - Else - { - Return (One) - } - } - Else - { - If (LEqual (_T_0, 0x02)) - { - Return (SDGV) - } - } - } - } - - Return (Zero) - } - } - - Device (PR14) - { - Name (_ADR, 0x04) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xE1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Return (PLDP) - } - } - - Device (PR15) - { - Name (_ADR, 0x05) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Return (PLDP) - } - } - - Device (PR16) - { - Name (_ADR, 0x06) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0xFF, - Zero, - Zero - }) - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Return (PLDP) - } - } - } - } - - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x0D, 0x04)) - } - } - - Device (XHC) - { - Name (_ADR, 0x00140000) - OperationRegion (XPRT, PCI_Config, 0xD0, 0x10) - Field (XPRT, DWordAcc, NoLock, Preserve) - { - PR2, 32, - PR2M, 32, - PR3, 32, - PR3M, 32 - } - - Method (CUID, 1, Serialized) - { - If (LEqual (Arg0, Buffer (0x10) - { - /* 0000 */ 0xA9, 0x12, 0x95, 0x7C, 0x05, 0x17, 0xB4, 0x4C, - /* 0008 */ 0xAF, 0x7D, 0x50, 0x6A, 0x24, 0x23, 0xAB, 0x71 - })) - { - Return (One) - } - - Return (Zero) - } - - Method (POSC, 3, Serialized) - { - CreateDWordField (Arg2, Zero, CDW1) - If (LNotEqual (Arg1, One)) - { - Or (CDW1, 0x08, CDW1) - } - - If (LEqual (XHCI, Zero)) - { - Or (CDW1, 0x02, CDW1) - } - - If (LNot (And (CDW1, One))) - { - XSEL () - } - - Return (Arg2) - } - - Method (XSEL, 0, Serialized) - { - If (LOr (LEqual (XHCI, 0x02), LEqual (XHCI, 0x03))) - { - Store (Zero, Local0) - And (PR3, 0xFFFFFFF0, Local0) - Or (Local0, XHPM, Local0) - And (Local0, PR3M, PR3) - Store (Zero, Local0) - And (PR2, 0xFFFFFFF0, Local0) - Or (Local0, XHPM, Local0) - And (Local0, PR2M, PR2) - Store (One, XUSB) - } - } - - Method (_S3D, 0, NotSerialized) - { - Return (0x02) - } - - Method (_S4D, 0, NotSerialized) - { - Return (0x02) - } - - Device (RHUB) - { - Name (_ADR, Zero) - Device (HSP1) - { - Name (_ADR, One) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0x03, - Zero, - Zero - }) - If (LNot (And (PR2, One))) - { - Store (Zero, Index (UPCP, Zero)) - } - - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0x69, 0x0C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS) - If (LNot (And (PR2, One))) - { - And (VIS, Zero, VIS) - } - - Return (PLDP) - } - } - - Device (HSP2) - { - Name (_ADR, 0x02) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0x03, - Zero, - Zero - }) - If (LNot (And (PR2, 0x02))) - { - Store (Zero, Index (UPCP, Zero)) - } - - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0x69, 0x0C, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 - } - }) - CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS) - If (LNot (And (PR2, 0x02))) - { - And (VIS, Zero, VIS) - } - - Return (PLDP) - } - } - - Device (HSP3) - { - Name (_ADR, 0x03) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0x03, - Zero, - Zero - }) - If (LNot (And (PR2, 0x04))) - { - Store (Zero, Index (UPCP, Zero)) - } - - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0x69, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00 - } - }) - CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS) - If (LNot (And (PR2, 0x04))) - { - And (VIS, Zero, VIS) - } - - Return (PLDP) - } - } - - Device (HSP4) - { - Name (_ADR, 0x04) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0x03, - Zero, - Zero - }) - If (LNot (And (PR2, 0x08))) - { - Store (Zero, Index (UPCP, Zero)) - } - - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0x69, 0x0C, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 - } - }) - CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS) - If (LNot (And (PR2, 0x08))) - { - And (VIS, Zero, VIS) - } - - Return (PLDP) - } - } - - Device (SSP1) - { - Name (_ADR, 0x05) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0x03, - Zero, - Zero - }) - If (LNot (And (PR3, One))) - { - Store (Zero, Index (UPCP, Zero)) - } - - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0x69, 0x0C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS) - If (LNot (And (PR3, One))) - { - And (VIS, Zero, VIS) - } - - Return (PLDP) - } - } - - Device (SSP2) - { - Name (_ADR, 0x06) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0x03, - Zero, - Zero - }) - If (LNot (And (PR3, 0x02))) - { - Store (Zero, Index (UPCP, Zero)) - } - - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0x69, 0x0C, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 - } - }) - CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS) - If (LNot (And (PR3, 0x02))) - { - And (VIS, Zero, VIS) - } - - Return (PLDP) - } - } - - Device (SSP3) - { - Name (_ADR, 0x07) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0x03, - Zero, - Zero - }) - If (LNot (And (PR3, 0x04))) - { - Store (Zero, Index (UPCP, Zero)) - } - - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0x69, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00 - } - }) - CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS) - If (LNot (And (PR3, 0x04))) - { - And (VIS, Zero, VIS) - } - - Return (PLDP) - } - } - - Device (SSP4) - { - Name (_ADR, 0x08) - Method (_UPC, 0, Serialized) - { - Name (UPCP, Package (0x04) - { - 0xFF, - 0x03, - Zero, - Zero - }) - If (LNot (And (PR3, 0x08))) - { - Store (Zero, Index (UPCP, Zero)) - } - - Return (UPCP) - } - - Method (_PLD, 0, Serialized) - { - Name (PLDP, Package (0x01) - { - Buffer (0x10) - { - /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, - /* 0008 */ 0x69, 0x0C, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 - } - }) - CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS) - If (LNot (And (PR3, 0x08))) - { - And (VIS, Zero, VIS) - } - - Return (PLDP) - } - } - } - - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x0D, 0x04)) - } - } - - Device (HDEF) - { - Name (_ADR, 0x001B0000) - OperationRegion (HDAR, PCI_Config, 0x4C, 0x10) - Field (HDAR, WordAcc, NoLock, Preserve) - { - DCKA, 1, - Offset (0x01), - DCKM, 1, - , 6, - DCKS, 1, - Offset (0x08), - , 15, - PMES, 1 - } - - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x0D, 0x04)) - } - } - - Device (SAT0) - { - Name (_ADR, 0x001F0002) - } - - Device (SAT1) - { - Name (_ADR, 0x001F0005) - } - - Device (SBUS) - { - Name (_ADR, 0x001F0003) - OperationRegion (SMBP, PCI_Config, 0x40, 0xC0) - Field (SMBP, DWordAcc, NoLock, Preserve) - { - , 2, - I2CE, 1 - } - - OperationRegion (SMPB, PCI_Config, 0x20, 0x04) - Field (SMPB, DWordAcc, NoLock, Preserve) - { - , 5, - SBAR, 11 - } - - OperationRegion (SMBI, SystemIO, ShiftLeft (SBAR, 0x05), 0x10) - Field (SMBI, ByteAcc, NoLock, Preserve) - { - HSTS, 8, - Offset (0x02), - HCON, 8, - HCOM, 8, - TXSA, 8, - DAT0, 8, - DAT1, 8, - HBDR, 8, - PECR, 8, - RXSA, 8, - SDAT, 16 - } - - Method (SSXB, 2, Serialized) - { - If (STRT ()) - { - Return (Zero) - } - - Store (Zero, I2CE) - Store (0xBF, HSTS) - Store (Arg0, TXSA) - Store (Arg1, HCOM) - Store (0x48, HCON) - If (COMP ()) - { - Or (HSTS, 0xFF, HSTS) - Return (One) - } - - Return (Zero) - } - - Method (SRXB, 1, Serialized) - { - If (STRT ()) - { - Return (0xFFFF) - } - - Store (Zero, I2CE) - Store (0xBF, HSTS) - Store (Or (Arg0, One), TXSA) - Store (0x44, HCON) - If (COMP ()) - { - Or (HSTS, 0xFF, HSTS) - Return (DAT0) - } - - Return (0xFFFF) - } - - Method (SWRB, 3, Serialized) - { - If (STRT ()) - { - Return (Zero) - } - - Store (Zero, I2CE) - Store (0xBF, HSTS) - Store (Arg0, TXSA) - Store (Arg1, HCOM) - Store (Arg2, DAT0) - Store (0x48, HCON) - If (COMP ()) - { - Or (HSTS, 0xFF, HSTS) - Return (One) - } - - Return (Zero) - } - - Method (SRDB, 2, Serialized) - { - If (STRT ()) - { - Return (0xFFFF) - } - - Store (Zero, I2CE) - Store (0xBF, HSTS) - Store (Or (Arg0, One), TXSA) - Store (Arg1, HCOM) - Store (0x48, HCON) - If (COMP ()) - { - Or (HSTS, 0xFF, HSTS) - Return (DAT0) - } - - Return (0xFFFF) - } - - Method (SWRW, 3, Serialized) - { - If (STRT ()) - { - Return (Zero) - } - - Store (Zero, I2CE) - Store (0xBF, HSTS) - Store (Arg0, TXSA) - Store (Arg1, HCOM) - And (Arg2, 0xFF, DAT1) - And (ShiftRight (Arg2, 0x08), 0xFF, DAT0) - Store (0x4C, HCON) - If (COMP ()) - { - Or (HSTS, 0xFF, HSTS) - Return (One) - } - - Return (Zero) - } - - Method (SRDW, 2, Serialized) - { - If (STRT ()) - { - Return (0xFFFF) - } - - Store (Zero, I2CE) - Store (0xBF, HSTS) - Store (Or (Arg0, One), TXSA) - Store (Arg1, HCOM) - Store (0x4C, HCON) - If (COMP ()) - { - Or (HSTS, 0xFF, HSTS) - Return (Or (ShiftLeft (DAT0, 0x08), DAT1)) - } - - Return (0xFFFFFFFF) - } - - Method (SBLW, 4, Serialized) - { - If (STRT ()) - { - Return (Zero) - } - - Store (Arg3, I2CE) - Store (0xBF, HSTS) - Store (Arg0, TXSA) - Store (Arg1, HCOM) - Store (SizeOf (Arg2), DAT0) - Store (Zero, Local1) - Store (DerefOf (Index (Arg2, Zero)), HBDR) - Store (0x54, HCON) - While (LGreater (SizeOf (Arg2), Local1)) - { - Store (0x0FA0, Local0) - While (LAnd (LNot (And (HSTS, 0x80)), Local0)) - { - Decrement (Local0) - Stall (0x32) - } - - If (LNot (Local0)) - { - KILL () - Return (Zero) - } - - Store (0x80, HSTS) - Increment (Local1) - If (LGreater (SizeOf (Arg2), Local1)) - { - Store (DerefOf (Index (Arg2, Local1)), HBDR) - } - } - - If (COMP ()) - { - Or (HSTS, 0xFF, HSTS) - Return (One) - } - - Return (Zero) - } - - Method (SBLR, 3, Serialized) - { - Name (TBUF, Buffer (0x0100) {}) - If (STRT ()) - { - Return (Zero) - } - - Store (Arg2, I2CE) - Store (0xBF, HSTS) - Store (Or (Arg0, One), TXSA) - Store (Arg1, HCOM) - Store (0x54, HCON) - Store (0x0FA0, Local0) - While (LAnd (LNot (And (HSTS, 0x80)), Local0)) - { - Decrement (Local0) - Stall (0x32) - } - - If (LNot (Local0)) - { - KILL () - Return (Zero) - } - - Store (DAT0, Index (TBUF, Zero)) - Store (0x80, HSTS) - Store (One, Local1) - While (LLess (Local1, DerefOf (Index (TBUF, Zero)))) - { - Store (0x0FA0, Local0) - While (LAnd (LNot (And (HSTS, 0x80)), Local0)) - { - Decrement (Local0) - Stall (0x32) - } - - If (LNot (Local0)) - { - KILL () - Return (Zero) - } - - Store (HBDR, Index (TBUF, Local1)) - Store (0x80, HSTS) - Increment (Local1) - } - - If (COMP ()) - { - Or (HSTS, 0xFF, HSTS) - Return (TBUF) - } - - Return (Zero) - } - - Method (STRT, 0, Serialized) - { - Store (0xC8, Local0) - While (Local0) - { - If (And (HSTS, 0x40)) - { - Decrement (Local0) - Sleep (One) - If (LEqual (Local0, Zero)) - { - Return (One) - } - } - Else - { - Store (Zero, Local0) - } - } - - Store (0x0FA0, Local0) - While (Local0) - { - If (And (HSTS, One)) - { - Decrement (Local0) - Stall (0x32) - If (LEqual (Local0, Zero)) - { - KILL () - } - } - Else - { - Return (Zero) - } - } - - Return (One) - } - - Method (COMP, 0, Serialized) - { - Store (0x0FA0, Local0) - While (Local0) - { - If (And (HSTS, 0x02)) - { - Return (One) - } - Else - { - Decrement (Local0) - Stall (0x32) - If (LEqual (Local0, Zero)) - { - KILL () - } - } - } - - Return (Zero) - } - - Method (KILL, 0, Serialized) - { - Or (HCON, 0x02, HCON) - Or (HSTS, 0xFF, HSTS) - } - } - } - - Scope (_SB.PCI0.LPCB) - { - OperationRegion (CPSB, SystemMemory, 0xDABC5F98, 0x10) - Field (CPSB, AnyAcc, NoLock, Preserve) - { - RTCX, 1, - SBB0, 7, - SBB1, 8, - SBB2, 8, - SBB3, 8, - SBB4, 8, - SBB5, 8, - SBB6, 8, - SBB7, 8, - SBB8, 8, - SBB9, 8, - SBBA, 8, - SBBB, 8, - SBBC, 8, - SBBD, 8, - SBBE, 8, - SBBF, 8 - } - - Method (SPTS, 1, NotSerialized) - { - Store (One, SLPX) - Store (One, SLPE) - } - - Method (SWAK, 1, NotSerialized) - { - Store (Zero, SLPE) - If (RTCX) {} - Else - { - Notify (PWRB, 0x02) - } - } - - OperationRegion (SMIE, SystemIO, PMBS, 0x04) - Field (SMIE, ByteAcc, NoLock, Preserve) - { - , 10, - RTCS, 1, - , 3, - PEXS, 1, - WAKS, 1, - Offset (0x03), - PWBT, 1, - Offset (0x04) - } - - OperationRegion (SLPR, SystemIO, SMCR, 0x08) - Field (SLPR, ByteAcc, NoLock, Preserve) - { - , 4, - SLPE, 1, - , 31, - SLPX, 1, - Offset (0x08) - } - } - - Scope (_SB.PCI0.RP01) - { - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x09, 0x04)) - } - } - - Scope (_SB.PCI0.RP02) - { - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x09, 0x04)) - } - } - - Scope (_SB.PCI0.RP03) - { - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x09, 0x04)) - } - } - - Scope (_SB.PCI0.RP04) - { - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x09, 0x04)) - } - } - - Scope (_SB.PCI0.RP05) - { - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x09, 0x04)) - } - } - - Scope (_SB.PCI0.RP06) - { - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x09, 0x04)) - } - } - - Scope (_SB.PCI0.RP07) - { - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x09, 0x04)) - } - } - - Scope (_SB.PCI0.RP08) - { - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x09, 0x04)) - } - } - - OperationRegion (_SB.PCI0.LPCB.LPCR, PCI_Config, 0x80, 0x04) - Field (\_SB.PCI0.LPCB.LPCR, ByteAcc, NoLock, Preserve) - { - CADR, 3, - , 1, - CBDR, 3, - Offset (0x01), - LTDR, 2, - , 2, - FDDR, 1, - Offset (0x02), - CALE, 1, - CBLE, 1, - LTLE, 1, - FDLE, 1, - Offset (0x03), - GLLE, 1, - GHLE, 1, - KCLE, 1, - MCLE, 1, - C1LE, 1, - C2LE, 1, - Offset (0x04) - } - - Method (UXDV, 1, NotSerialized) - { - Store (0xFF, Local0) - Name (_T_0, Zero) - Store (Add (Arg0, Zero), _T_0) - If (LEqual (_T_0, 0x03F8)) - { - Store (Zero, Local0) - } - Else - { - If (LEqual (_T_0, 0x02F8)) - { - Store (One, Local0) - } - Else - { - If (LEqual (_T_0, 0x0220)) - { - Store (0x02, Local0) - } - Else - { - If (LEqual (_T_0, 0x0228)) - { - Store (0x03, Local0) - } - Else - { - If (LEqual (_T_0, 0x0238)) - { - Store (0x04, Local0) - } - Else - { - If (LEqual (_T_0, 0x02E8)) - { - Store (0x05, Local0) - } - Else - { - If (LEqual (_T_0, 0x0338)) - { - Store (0x06, Local0) - } - Else - { - If (LEqual (_T_0, 0x03E8)) - { - Store (0x07, Local0) - } - } - } - } - } - } - } - } - - Return (Local0) - } - - Method (RRIO, 4, NotSerialized) - { - Name (_T_0, Zero) - Store (Add (Arg0, Zero), _T_0) - If (LEqual (_T_0, Zero)) - { - Store (Zero, CALE) - Store (UXDV (Arg2), Local0) - If (LNotEqual (Local0, 0xFF)) - { - Store (Local0, CADR) - } - - If (Arg1) - { - Store (One, CALE) - } - } - Else - { - If (LEqual (_T_0, One)) - { - Store (Zero, CBLE) - Store (UXDV (Arg2), Local0) - If (LNotEqual (Local0, 0xFF)) - { - Store (Local0, CBDR) - } - - If (Arg1) - { - Store (One, CBLE) - } - } - Else - { - If (LEqual (_T_0, 0x02)) - { - Store (Zero, LTLE) - If (LEqual (Arg2, 0x0378)) - { - Store (Zero, LTDR) - } - - If (LEqual (Arg2, 0x0278)) - { - Store (One, LTDR) - } - - If (LEqual (Arg2, 0x03BC)) - { - Store (0x02, LTDR) - } - - If (Arg1) - { - Store (One, LTLE) - } - } - Else - { - If (LEqual (_T_0, 0x03)) - { - Store (Zero, FDLE) - If (LEqual (Arg2, 0x03F0)) - { - Store (Zero, FDDR) - } - - If (LEqual (Arg2, 0x0370)) - { - Store (One, FDDR) - } - - If (Arg1) - { - Store (One, FDLE) - } - } - Else - { - If (LEqual (_T_0, 0x08)) - { - If (LEqual (Arg2, 0x0200)) - { - If (Arg1) - { - Store (One, GLLE) - } - Else - { - Store (Zero, GLLE) - } - } - - If (LEqual (Arg2, 0x0208)) - { - If (Arg1) - { - Store (One, GHLE) - } - Else - { - Store (Zero, GHLE) - } - } - } - Else - { - If (LEqual (_T_0, 0x09)) - { - If (LEqual (Arg2, 0x0200)) - { - If (Arg1) - { - Store (One, GLLE) - } - Else - { - Store (Zero, GLLE) - } - } - - If (LEqual (Arg2, 0x0208)) - { - If (Arg1) - { - Store (One, GHLE) - } - Else - { - Store (Zero, GHLE) - } - } - } - Else - { - If (LEqual (_T_0, 0x0A)) - { - If (LOr (LEqual (Arg2, 0x60), LEqual (Arg2, 0x64))) - { - If (Arg1) - { - Store (One, KCLE) - } - Else - { - Store (Zero, KCLE) - } - } - } - Else - { - If (LEqual (_T_0, 0x0B)) - { - If (LOr (LEqual (Arg2, 0x62), LEqual (Arg2, 0x66))) - { - If (Arg1) - { - Store (One, MCLE) - } - Else - { - Store (Zero, MCLE) - } - } - } - Else - { - If (LEqual (_T_0, 0x0C)) - { - If (LEqual (Arg2, 0x2E)) - { - If (Arg1) - { - Store (One, C1LE) - } - Else - { - Store (Zero, C1LE) - } - } - - If (LEqual (Arg2, 0x4E)) - { - If (Arg1) - { - Store (One, C2LE) - } - Else - { - Store (Zero, C2LE) - } - } - } - Else - { - If (LEqual (_T_0, 0x0D)) - { - If (LEqual (Arg2, 0x2E)) - { - If (Arg1) - { - Store (One, C1LE) - } - Else - { - Store (Zero, C1LE) - } - } - - If (LEqual (Arg2, 0x4E)) - { - If (Arg1) - { - Store (One, C2LE) - } - Else - { - Store (Zero, C2LE) - } - } - } - } - } - } - } - } - } - } - } - } - } - - Method (RDMA, 3, NotSerialized) - { - } - - Scope (_SB.PCI0) - { - Method (NPTS, 1, NotSerialized) - { - } - - Method (NWAK, 1, NotSerialized) - { - } - } - - Scope (_SB.PCI0.PEG0) - { - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x09, 0x04)) - } - } - - Scope (_SB.PCI0.PEG0.PEGP) - { - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x09, 0x04)) - } - } - - Scope (_SB.PCI0.PEG1) - { - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x09, 0x04)) - } - } - - Scope (_SB.PCI0.PEG2) - { - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x09, 0x04)) - } - } - - Scope (_SB.PCI0.PEG3) - { - Method (_PRW, 0, NotSerialized) - { - Return (GPRW (0x09, 0x04)) - } - } - - Scope (_SB.PCI0) - { - Device (GFX0) - { - Name (_ADR, 0x00020000) - Method (PCPC, 0, NotSerialized) - { - If (ECON) - { - Store (0x02, ^^LPCB.H_EC.SLPC) - } - - ECST (0x6F) - } - - Method (PAPR, 0, NotSerialized) - { - If (ECON) - { - Return (Divide (^^LPCB.H_EC.MCAP, 0x64, )) - } - Else - { - Return (Zero) - } - } - - Method (_DOS, 1, NotSerialized) - { - Store (And (Arg0, 0x07), DSEN) - If (LEqual (And (Arg0, 0x03), Zero)) - { - If (CondRefOf (HDOS)) - { - HDOS () - } - } - } - - Method (_DOD, 0, NotSerialized) - { - If (CondRefOf (IDAB)) - { - IDAB () - } - Else - { - Store (Zero, NDID) - If (LNotEqual (DIDL, Zero)) - { - Store (SDDL (DIDL), DID1) - } - - If (LNotEqual (DDL2, Zero)) - { - Store (SDDL (DDL2), DID2) - } - - If (LNotEqual (DDL3, Zero)) - { - Store (SDDL (DDL3), DID3) - } - - If (LNotEqual (DDL4, Zero)) - { - Store (SDDL (DDL4), DID4) - } - - If (LNotEqual (DDL5, Zero)) - { - Store (SDDL (DDL5), DID5) - } - - If (LNotEqual (DDL6, Zero)) - { - Store (SDDL (DDL6), DID6) - } - - If (LNotEqual (DDL7, Zero)) - { - Store (SDDL (DDL7), DID7) - } - - If (LNotEqual (DDL8, Zero)) - { - Store (SDDL (DDL8), DID8) - } - } - - If (LEqual (NDID, One)) - { - Name (TMP1, Package (0x01) - { - 0xFFFFFFFF - }) - Store (Or (0x00010000, DID1), Index (TMP1, Zero)) - Return (TMP1) - } - - If (LEqual (NDID, 0x02)) - { - Name (TMP2, Package (0x02) - { - 0xFFFFFFFF, - 0xFFFFFFFF - }) - Store (Or (0x00010000, DID1), Index (TMP2, Zero)) - Store (Or (0x00010000, DID2), Index (TMP2, One)) - Return (TMP2) - } - - If (LEqual (NDID, 0x03)) - { - Name (TMP3, Package (0x03) - { - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF - }) - Store (Or (0x00010000, DID1), Index (TMP3, Zero)) - Store (Or (0x00010000, DID2), Index (TMP3, One)) - Store (Or (0x00010000, DID3), Index (TMP3, 0x02)) - Return (TMP3) - } - - If (LEqual (NDID, 0x04)) - { - Name (TMP4, Package (0x04) - { - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF - }) - Store (Or (0x00010000, DID1), Index (TMP4, Zero)) - Store (Or (0x00010000, DID2), Index (TMP4, One)) - Store (Or (0x00010000, DID3), Index (TMP4, 0x02)) - Store (Or (0x00010000, DID4), Index (TMP4, 0x03)) - Return (TMP4) - } - - If (LEqual (NDID, 0x05)) - { - Name (TMP5, Package (0x05) - { - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF - }) - Store (Or (0x00010000, DID1), Index (TMP5, Zero)) - Store (Or (0x00010000, DID2), Index (TMP5, One)) - Store (Or (0x00010000, DID3), Index (TMP5, 0x02)) - Store (Or (0x00010000, DID4), Index (TMP5, 0x03)) - Store (Or (0x00010000, DID5), Index (TMP5, 0x04)) - Return (TMP5) - } - - If (LEqual (NDID, 0x06)) - { - Name (TMP6, Package (0x06) - { - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF - }) - Store (Or (0x00010000, DID1), Index (TMP6, Zero)) - Store (Or (0x00010000, DID2), Index (TMP6, One)) - Store (Or (0x00010000, DID3), Index (TMP6, 0x02)) - Store (Or (0x00010000, DID4), Index (TMP6, 0x03)) - Store (Or (0x00010000, DID5), Index (TMP6, 0x04)) - Store (Or (0x00010000, DID6), Index (TMP6, 0x05)) - Return (TMP6) - } - - If (LEqual (NDID, 0x07)) - { - Name (TMP7, Package (0x07) - { - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF - }) - Store (Or (0x00010000, DID1), Index (TMP7, Zero)) - Store (Or (0x00010000, DID2), Index (TMP7, One)) - Store (Or (0x00010000, DID3), Index (TMP7, 0x02)) - Store (Or (0x00010000, DID4), Index (TMP7, 0x03)) - Store (Or (0x00010000, DID5), Index (TMP7, 0x04)) - Store (Or (0x00010000, DID6), Index (TMP7, 0x05)) - Store (Or (0x00010000, DID7), Index (TMP7, 0x06)) - Return (TMP7) - } - - If (LEqual (NDID, 0x08)) - { - Name (TMP8, Package (0x08) - { - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF, - 0xFFFFFFFF - }) - Store (Or (0x00010000, DID1), Index (TMP8, Zero)) - Store (Or (0x00010000, DID2), Index (TMP8, One)) - Store (Or (0x00010000, DID3), Index (TMP8, 0x02)) - Store (Or (0x00010000, DID4), Index (TMP8, 0x03)) - Store (Or (0x00010000, DID5), Index (TMP8, 0x04)) - Store (Or (0x00010000, DID6), Index (TMP8, 0x05)) - Store (Or (0x00010000, DID7), Index (TMP8, 0x06)) - Store (Or (0x00010000, DID8), Index (TMP8, 0x07)) - Return (TMP8) - } - - If (LEqual (NDID, 0x09)) - { - If (CondRefOf (HWID)) - { - Return (HWID) - } - } - - Return (Package (0x01) - { - 0x0400 - }) - } - - Device (DD01) - { - Method (_ADR, 0, Serialized) - { - If (LEqual (DID1, Zero)) - { - Return (One) - } - Else - { - Return (And (0xFFFF, DID1)) - } - } - - Method (_DCS, 0, NotSerialized) - { - Return (CDDS (DID1)) - } - - Method (_DGS, 0, NotSerialized) - { - If (LAnd (LEqual (And (SGMD, 0x7F), One), CondRefOf (SNXD - ))) - { - Return (NXD1) - } - - Return (NDDS (DID1)) - } - - Method (_DSS, 1, NotSerialized) - { - If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) - { - Store (NSTE, CSTE) - } - } - } - - Device (DD02) - { - Method (_ADR, 0, Serialized) - { - If (LEqual (DID2, Zero)) - { - Return (0x02) - } - Else - { - Return (And (0xFFFF, DID2)) - } - } - - Method (_DCS, 0, NotSerialized) - { - If (LEqual (LIDS, Zero)) - { - Return (Zero) - } - - Return (CDDS (DID2)) - } - - Method (_DGS, 0, NotSerialized) - { - If (LAnd (LEqual (And (SGMD, 0x7F), One), CondRefOf (SNXD - ))) - { - Return (NXD2) - } - - Return (NDDS (DID2)) - } - - Method (_DSS, 1, NotSerialized) - { - If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) - { - Store (NSTE, CSTE) - } - } - - Method (_BCL, 0, NotSerialized) - { - Return (Package (0x17) - { - 0x50, - 0x32, - Zero, - 0x05, - 0x0A, - 0x0F, - 0x14, - 0x19, - 0x1E, - 0x23, - 0x28, - 0x2D, - 0x32, - 0x37, - 0x3C, - 0x41, - 0x46, - 0x4B, - 0x50, - 0x55, - 0x5A, - 0x5F, - 0x64 - }) - } - - Method (_BCM, 1, NotSerialized) - { - If (LAnd (LGreaterEqual (Arg0, Zero), LLessEqual (Arg0, 0x64))) - { - AINT (One, Arg0) - Store (Arg0, BRTL) - } - } - - Method (_BQC, 0, NotSerialized) - { - Return (BRTL) - } - } - - Device (DD03) - { - Method (_ADR, 0, Serialized) - { - If (LEqual (DID3, Zero)) - { - Return (0x03) - } - Else - { - Return (And (0xFFFF, DID3)) - } - } - - Method (_DCS, 0, NotSerialized) - { - If (LEqual (DID3, Zero)) - { - Return (0x0B) - } - Else - { - Return (CDDS (DID3)) - } - } - - Method (_DGS, 0, NotSerialized) - { - If (LAnd (LEqual (And (SGMD, 0x7F), One), CondRefOf (SNXD - ))) - { - Return (NXD3) - } - - Return (NDDS (DID3)) - } - - Method (_DSS, 1, NotSerialized) - { - If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) - { - Store (NSTE, CSTE) - } - } - } - - Device (DD04) - { - Method (_ADR, 0, Serialized) - { - If (LEqual (DID4, Zero)) - { - Return (0x04) - } - Else - { - Return (And (0xFFFF, DID4)) - } - } - - Method (_DCS, 0, NotSerialized) - { - If (LEqual (DID4, Zero)) - { - Return (0x0B) - } - Else - { - Return (CDDS (DID4)) - } - } - - Method (_DGS, 0, NotSerialized) - { - If (LAnd (LEqual (And (SGMD, 0x7F), One), CondRefOf (SNXD - ))) - { - Return (NXD4) - } - - Return (NDDS (DID4)) - } - - Method (_DSS, 1, NotSerialized) - { - If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) - { - Store (NSTE, CSTE) - } - } - } - - Device (DD05) - { - Method (_ADR, 0, Serialized) - { - If (LEqual (DID5, Zero)) - { - Return (0x05) - } - Else - { - Return (And (0xFFFF, DID5)) - } - } - - Method (_DCS, 0, NotSerialized) - { - If (LEqual (DID5, Zero)) - { - Return (0x0B) - } - Else - { - Return (CDDS (DID5)) - } - } - - Method (_DGS, 0, NotSerialized) - { - If (LAnd (LEqual (And (SGMD, 0x7F), One), CondRefOf (SNXD - ))) - { - Return (NXD5) - } - - Return (NDDS (DID5)) - } - - Method (_DSS, 1, NotSerialized) - { - If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) - { - Store (NSTE, CSTE) - } - } - } - - Device (DD06) - { - Method (_ADR, 0, Serialized) - { - If (LEqual (DID6, Zero)) - { - Return (0x06) - } - Else - { - Return (And (0xFFFF, DID6)) - } - } - - Method (_DCS, 0, NotSerialized) - { - If (LEqual (DID6, Zero)) - { - Return (0x0B) - } - Else - { - Return (CDDS (DID6)) - } - } - - Method (_DGS, 0, NotSerialized) - { - If (LAnd (LEqual (And (SGMD, 0x7F), One), CondRefOf (SNXD - ))) - { - Return (NXD6) - } - - Return (NDDS (DID6)) - } - - Method (_DSS, 1, NotSerialized) - { - If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) - { - Store (NSTE, CSTE) - } - } - } - - Device (DD07) - { - Method (_ADR, 0, Serialized) - { - If (LEqual (DID7, Zero)) - { - Return (0x07) - } - Else - { - Return (And (0xFFFF, DID7)) - } - } - - Method (_DCS, 0, NotSerialized) - { - If (LEqual (DID7, Zero)) - { - Return (0x0B) - } - Else - { - Return (CDDS (DID7)) - } - } - - Method (_DGS, 0, NotSerialized) - { - If (LAnd (LEqual (And (SGMD, 0x7F), One), CondRefOf (SNXD - ))) - { - Return (NXD7) - } - - Return (NDDS (DID7)) - } - - Method (_DSS, 1, NotSerialized) - { - If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) - { - Store (NSTE, CSTE) - } - } - } - - Device (DD08) - { - Method (_ADR, 0, Serialized) - { - If (LEqual (DID8, Zero)) - { - Return (0x08) - } - Else - { - Return (And (0xFFFF, DID8)) - } - } - - Method (_DCS, 0, NotSerialized) - { - If (LEqual (DID8, Zero)) - { - Return (0x0B) - } - Else - { - Return (CDDS (DID8)) - } - } - - Method (_DGS, 0, NotSerialized) - { - If (LAnd (LEqual (And (SGMD, 0x7F), One), CondRefOf (SNXD - ))) - { - Return (NXD8) - } - - Return (NDDS (DID8)) - } - - Method (_DSS, 1, NotSerialized) - { - If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) - { - Store (NSTE, CSTE) - } - } - } - - Method (SDDL, 1, NotSerialized) - { - Increment (NDID) - Store (And (Arg0, 0x0F0F), Local0) - Or (0x80000000, Local0, Local1) - If (LEqual (DIDL, Local0)) - { - Return (Local1) - } - - If (LEqual (DDL2, Local0)) - { - Return (Local1) - } - - If (LEqual (DDL3, Local0)) - { - Return (Local1) - } - - If (LEqual (DDL4, Local0)) - { - Return (Local1) - } - - If (LEqual (DDL5, Local0)) - { - Return (Local1) - } - - If (LEqual (DDL6, Local0)) - { - Return (Local1) - } - - If (LEqual (DDL7, Local0)) - { - Return (Local1) - } - - If (LEqual (DDL8, Local0)) - { - Return (Local1) - } - - Return (Zero) - } - - Method (CDDS, 1, NotSerialized) - { - Store (And (Arg0, 0x0F0F), Local0) - If (LEqual (Zero, Local0)) - { - Return (0x1D) - } - - If (LEqual (CADL, Local0)) - { - Return (0x1F) - } - - If (LEqual (CAL2, Local0)) - { - Return (0x1F) - } - - If (LEqual (CAL3, Local0)) - { - Return (0x1F) - } - - If (LEqual (CAL4, Local0)) - { - Return (0x1F) - } - - If (LEqual (CAL5, Local0)) - { - Return (0x1F) - } - - If (LEqual (CAL6, Local0)) - { - Return (0x1F) - } - - If (LEqual (CAL7, Local0)) - { - Return (0x1F) - } - - If (LEqual (CAL8, Local0)) - { - Return (0x1F) - } - - Return (0x1D) - } - - Method (NDDS, 1, NotSerialized) - { - Store (And (Arg0, 0x0F0F), Local0) - If (LEqual (Zero, Local0)) - { - Return (Zero) - } - - If (LEqual (NADL, Local0)) - { - Return (One) - } - - If (LEqual (NDL2, Local0)) - { - Return (One) - } - - If (LEqual (NDL3, Local0)) - { - Return (One) - } - - If (LEqual (NDL4, Local0)) - { - Return (One) - } - - If (LEqual (NDL5, Local0)) - { - Return (One) - } - - If (LEqual (NDL6, Local0)) - { - Return (One) - } - - If (LEqual (NDL7, Local0)) - { - Return (One) - } - - If (LEqual (NDL8, Local0)) - { - Return (One) - } - - Return (Zero) - } - - Scope (^^PCI0) - { - OperationRegion (MCHP, PCI_Config, 0x40, 0xC0) - Field (MCHP, AnyAcc, NoLock, Preserve) - { - Offset (0x60), - TASM, 10, - Offset (0x62) - } - } - - OperationRegion (IGDP, PCI_Config, 0x40, 0xC0) - Field (IGDP, AnyAcc, NoLock, Preserve) - { - Offset (0x12), - , 1, - GIVD, 1, - , 2, - GUMA, 3, - Offset (0x14), - , 4, - GMFN, 1, - Offset (0x18), - Offset (0xA4), - ASLE, 8, - Offset (0xA8), - GSSE, 1, - GSSB, 14, - GSES, 1, - Offset (0xB0), - , 12, - CDVL, 1, - Offset (0xB2), - Offset (0xB5), - LBPC, 8, - Offset (0xBC), - ASLS, 32 - } - - OperationRegion (IGDM, SystemMemory, ASLB, 0x2000) - Field (IGDM, AnyAcc, NoLock, Preserve) - { - SIGN, 128, - SIZE, 32, - OVER, 32, - SVER, 256, - VVER, 128, - GVER, 128, - MBOX, 32, - DMOD, 32, - Offset (0x100), - DRDY, 32, - CSTS, 32, - CEVT, 32, - Offset (0x120), - DIDL, 32, - DDL2, 32, - DDL3, 32, - DDL4, 32, - DDL5, 32, - DDL6, 32, - DDL7, 32, - DDL8, 32, - CPDL, 32, - CPL2, 32, - CPL3, 32, - CPL4, 32, - CPL5, 32, - CPL6, 32, - CPL7, 32, - CPL8, 32, - CADL, 32, - CAL2, 32, - CAL3, 32, - CAL4, 32, - CAL5, 32, - CAL6, 32, - CAL7, 32, - CAL8, 32, - NADL, 32, - NDL2, 32, - NDL3, 32, - NDL4, 32, - NDL5, 32, - NDL6, 32, - NDL7, 32, - NDL8, 32, - ASLP, 32, - TIDX, 32, - CHPD, 32, - CLID, 32, - CDCK, 32, - SXSW, 32, - EVTS, 32, - CNOT, 32, - NRDY, 32, - Offset (0x200), - SCIE, 1, - GEFC, 4, - GXFC, 3, - GESF, 8, - Offset (0x204), - PARM, 32, - DSLP, 32, - Offset (0x300), - ARDY, 32, - ASLC, 32, - TCHE, 32, - ALSI, 32, - BCLP, 32, - PFIT, 32, - CBLV, 32, - BCLM, 320, - CPFM, 32, - EPFM, 32, - PLUT, 592, - PFMB, 32, - CCDV, 32, - PCFT, 32, - Offset (0x400), - GVD1, 49152, - PHED, 32, - BDDC, 2048 - } - - Name (DBTB, Package (0x15) - { - Zero, - 0x07, - 0x38, - 0x01C0, - 0x0E00, - 0x3F, - 0x01C7, - 0x0E07, - 0x01F8, - 0x0E38, - 0x0FC0, - Zero, - Zero, - Zero, - Zero, - Zero, - 0x7000, - 0x7007, - 0x7038, - 0x71C0, - 0x7E00 - }) - Name (CDCT, Package (0x05) - { - Package (0x02) - { - 0xE4, - 0x0140 - }, - - Package (0x02) - { - 0xDE, - 0x014D - }, - - Package (0x02) - { - 0xDE, - 0x014D - }, - - Package (0x02) - { - Zero, - Zero - }, - - Package (0x02) - { - 0xDE, - 0x014D - } - }) - Name (SUCC, One) - Name (NVLD, 0x02) - Name (CRIT, 0x04) - Name (NCRT, 0x06) - Method (GSCI, 0, Serialized) - { - Method (GBDA, 0, Serialized) - { - If (LEqual (GESF, Zero)) - { - Store (0x0679, PARM) - Store (Zero, GESF) - Return (SUCC) - } - - If (LEqual (GESF, One)) - { - Store (0x0240, PARM) - Store (Zero, GESF) - Return (SUCC) - } - - If (LEqual (GESF, 0x04)) - { - And (PARM, 0xEFFF0000, PARM) - And (PARM, ShiftLeft (DerefOf (Index (DBTB, IBTT)), 0x10), - PARM) - Or (IBTT, PARM, PARM) - Store (Zero, GESF) - Return (SUCC) - } - - If (LEqual (GESF, 0x05)) - { - Store (IPSC, PARM) - Or (PARM, ShiftLeft (IPAT, 0x08), PARM) - Add (PARM, 0x0100, PARM) - Or (PARM, ShiftLeft (LIDS, 0x10), PARM) - Add (PARM, 0x00010000, PARM) - Or (PARM, ShiftLeft (IBIA, 0x14), PARM) - Store (Zero, GESF) - Return (SUCC) - } - - If (LEqual (GESF, 0x06)) - { - Store (ITVF, PARM) - Or (PARM, ShiftLeft (ITVM, 0x04), PARM) - Store (Zero, GESF) - Return (SUCC) - } - - If (LEqual (GESF, 0x07)) - { - Store (GIVD, PARM) - XOr (PARM, One, PARM) - Or (PARM, ShiftLeft (GMFN, One), PARM) - Or (PARM, 0x1800, PARM) - Or (PARM, ShiftLeft (IDMS, 0x11), PARM) - Or (ShiftLeft (DerefOf (Index (DerefOf (Index (CDCT, HVCO)), CDVL - )), 0x15), PARM, PARM) - Store (One, GESF) - Return (SUCC) - } - - If (LEqual (GESF, 0x0A)) - { - Store (Zero, PARM) - If (ISSC) - { - Or (PARM, 0x03, PARM) - } - - Store (Zero, GESF) - Return (SUCC) - } - - If (LEqual (GESF, 0x0B)) - { - Store (KSV0, PARM) - Store (KSV1, GESF) - Return (SUCC) - } - - Store (Zero, GESF) - Return (CRIT) - } - - Method (SBCB, 0, Serialized) - { - If (LEqual (GESF, Zero)) - { - Store (Zero, PARM) - Store (0x000F87FD, PARM) - Store (Zero, GESF) - Return (SUCC) - } - - If (LEqual (GESF, One)) - { - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) - } - - If (LEqual (GESF, 0x03)) - { - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) - } - - If (LEqual (GESF, 0x04)) - { - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) - } - - If (LEqual (GESF, 0x05)) - { - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) - } - - If (LEqual (GESF, 0x06)) - { - Store (And (PARM, 0x0F), ITVF) - Store (ShiftRight (And (PARM, 0xF0), 0x04), ITVM) - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) - } - - If (LEqual (GESF, 0x07)) - { - If (LEqual (PARM, Zero)) - { - Store (CLID, Local0) - If (And (0x80000000, Local0)) - { - And (CLID, 0x0F, CLID) - GLID (CLID) - } - } - - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) - } - - If (LEqual (GESF, 0x08)) - { - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) - } - - If (LEqual (GESF, 0x09)) - { - And (PARM, 0xFF, IBTT) - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) - } - - If (LEqual (GESF, 0x0A)) - { - And (PARM, 0xFF, IPSC) - If (And (ShiftRight (PARM, 0x08), 0xFF)) - { - And (ShiftRight (PARM, 0x08), 0xFF, IPAT) - Decrement (IPAT) - } - - And (ShiftRight (PARM, 0x14), 0x07, IBIA) - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) - } - - If (LEqual (GESF, 0x0B)) - { - And (ShiftRight (PARM, One), One, IF1E) - If (And (PARM, 0x0001E000)) - { - And (ShiftRight (PARM, 0x0D), 0x0F, IDMS) - } - Else - { - And (ShiftRight (PARM, 0x11), 0x0F, IDMS) - } - - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) - } - - If (LEqual (GESF, 0x10)) - { - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) - } - - If (LEqual (GESF, 0x11)) - { - Store (ShiftLeft (LIDS, 0x08), PARM) - Add (PARM, 0x0100, PARM) - Store (Zero, GESF) - Return (SUCC) - } - - If (LEqual (GESF, 0x12)) - { - If (And (PARM, One)) - { - If (LEqual (ShiftRight (PARM, One), One)) - { - Store (One, ISSC) - } - Else - { - Store (Zero, GESF) - Return (CRIT) - } - } - Else - { - Store (Zero, ISSC) - } - - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) - } - - If (LEqual (GESF, 0x13)) - { - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) - } - - If (LEqual (GESF, 0x14)) - { - And (PARM, 0x0F, PAVP) - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) - } - - Store (Zero, GESF) - Return (SUCC) - } - - If (LEqual (GEFC, 0x04)) - { - Store (GBDA (), GXFC) - } - - If (LEqual (GEFC, 0x06)) - { - Store (SBCB (), GXFC) - } - - Store (Zero, GEFC) - Store (One, SCIS) - Store (Zero, GSSE) - Store (Zero, SCIE) - Return (Zero) - } - - Method (PDRD, 0, NotSerialized) - { - If (LNot (DRDY)) - { - Sleep (ASLP) - } - - Return (LNot (DRDY)) - } - - Method (PSTS, 0, NotSerialized) - { - If (LGreater (CSTS, 0x02)) - { - Sleep (ASLP) - } - - Return (LEqual (CSTS, 0x03)) - } - - Method (GNOT, 2, NotSerialized) - { - If (PDRD ()) - { - Return (One) - } - - Store (Arg0, CEVT) - Store (0x03, CSTS) - If (LAnd (LEqual (CHPD, Zero), LEqual (Arg1, Zero))) - { - If (LOr (LGreater (OSYS, 0x07D0), LLess (OSYS, 0x07D6))) - { - Notify (PCI0, Arg1) - } - Else - { - Notify (GFX0, Arg1) - } - } - - If (CondRefOf (HNOT)) - { - HNOT (Arg0) - } - Else - { - Notify (GFX0, 0x80) - } - - Return (Zero) - } - - Method (GHDS, 1, NotSerialized) - { - Store (Arg0, TIDX) - Return (GNOT (One, Zero)) - } - - Method (GLID, 1, NotSerialized) - { - If (LEqual (Arg0, One)) - { - Store (0x03, CLID) - } - Else - { - Store (Arg0, CLID) - } - - Return (GNOT (0x02, Zero)) - } - - Method (GDCK, 1, NotSerialized) - { - Store (Arg0, CDCK) - Return (GNOT (0x04, Zero)) - } - - Method (PARD, 0, NotSerialized) - { - If (LNot (ARDY)) - { - Sleep (ASLP) - } - - Return (LNot (ARDY)) - } - - Method (AINT, 2, NotSerialized) - { - If (LNot (And (TCHE, ShiftLeft (One, Arg0)))) - { - Return (One) - } - - If (PARD ()) - { - Return (One) - } - - If (LEqual (Arg0, 0x02)) - { - If (CPFM) - { - And (CPFM, 0x0F, Local0) - And (EPFM, 0x0F, Local1) - If (LEqual (Local0, One)) - { - If (And (Local1, 0x06)) - { - Store (0x06, PFIT) - } - Else - { - If (And (Local1, 0x08)) - { - Store (0x08, PFIT) - } - Else - { - Store (One, PFIT) - } - } - } - - If (LEqual (Local0, 0x06)) - { - If (And (Local1, 0x08)) - { - Store (0x08, PFIT) - } - Else - { - If (And (Local1, One)) - { - Store (One, PFIT) - } - Else - { - Store (0x06, PFIT) - } - } - } - - If (LEqual (Local0, 0x08)) - { - If (And (Local1, One)) - { - Store (One, PFIT) - } - Else - { - If (And (Local1, 0x06)) - { - Store (0x06, PFIT) - } - Else - { - Store (0x08, PFIT) - } - } - } - } - Else - { - XOr (PFIT, 0x07, PFIT) - } - - Or (PFIT, 0x80000000, PFIT) - Store (0x04, ASLC) - } - Else - { - If (LEqual (Arg0, One)) - { - Store (Divide (Multiply (Arg1, 0xFF), 0x64, ), BCLP) - Or (BCLP, 0x80000000, BCLP) - Store (0x02, ASLC) - } - Else - { - If (LEqual (Arg0, Zero)) - { - Store (Arg1, ALSI) - Store (One, ASLC) - } - Else - { - Return (One) - } - } - } - - Store (One, ASLE) - Return (Zero) - } - - Method (SCIP, 0, NotSerialized) - { - If (LNotEqual (OVER, Zero)) - { - Return (LNot (GSMI)) - } - - Return (Zero) - } - - Device (^^MEM2) - { - Name (_HID, EisaId ("PNP0C01")) - Name (_UID, 0x02) - Name (CRS1, ResourceTemplate () - { - Memory32Fixed (ReadWrite, - 0x20000000, // Address Base - 0x00200000, // Address Length - ) - Memory32Fixed (ReadWrite, - 0x40000000, // Address Base - 0x00200000, // Address Length - ) - }) - Name (CRS2, ResourceTemplate () - { - Memory32Fixed (ReadWrite, - 0x20000000, // Address Base - 0x00200000, // Address Length - ) - Memory32Fixed (ReadWrite, - 0x40004000, // Address Base - 0x00001000, // Address Length - ) - }) - Method (_STA, 0, NotSerialized) - { - If (IGDS) - { - Return (0x0F) - } - - Return (Zero) - } - - Method (_CRS, 0, NotSerialized) - { - If (LOr (LEqual (And (PNHM, 0x0FFF0FF0), 0x000206A0), LEqual (And ( - PNHM, 0x0FFF0FFF), 0x000306A0))) - { - Return (CRS1) - } - - Return (CRS2) - } - } - } - } - - Scope (_PR) - { - Processor (CPU0, 0x01, 0x00000410, 0x06) {} - Processor (CPU1, 0x02, 0x00000410, 0x06) {} - Processor (CPU2, 0x03, 0x00000410, 0x06) {} - Processor (CPU3, 0x04, 0x00000410, 0x06) {} - Processor (CPU4, 0x05, 0x00000410, 0x06) {} - Processor (CPU5, 0x06, 0x00000410, 0x06) {} - Processor (CPU6, 0x07, 0x00000410, 0x06) {} - Processor (CPU7, 0x08, 0x00000410, 0x06) {} - } - - Mutex (MUTX, 0x00) - OperationRegion (DEB0, SystemIO, 0x80, One) - Field (DEB0, ByteAcc, NoLock, Preserve) - { - DBG8, 8 - } - - OperationRegion (DEB1, SystemIO, 0x90, 0x02) - Field (DEB1, WordAcc, NoLock, Preserve) - { - DBG9, 16 - } - - OperationRegion (PRT0, SystemIO, 0x80, 0x04) - Field (PRT0, DWordAcc, Lock, Preserve) - { - P80H, 32 - } - - Method (P8XH, 2, Serialized) - { - If (LEqual (Arg0, Zero)) - { - Store (Or (And (P80D, 0xFFFFFF00), Arg1), P80D) - } - - If (LEqual (Arg0, One)) - { - Store (Or (And (P80D, 0xFFFF00FF), ShiftLeft (Arg1, 0x08) - ), P80D) - } - - If (LEqual (Arg0, 0x02)) - { - Store (Or (And (P80D, 0xFF00FFFF), ShiftLeft (Arg1, 0x10) - ), P80D) - } - - If (LEqual (Arg0, 0x03)) - { - Store (Or (And (P80D, 0x00FFFFFF), ShiftLeft (Arg1, 0x18) - ), P80D) - } - - Store (P80D, P80H) - } - - OperationRegion (SPRT, SystemIO, 0xB2, 0x02) - Field (SPRT, ByteAcc, Lock, Preserve) - { - SSMP, 8 - } - - Method (_PIC, 1, NotSerialized) - { - Store (Arg0, GPIC) - Store (Arg0, PICM) - } - - Method (_PTS, 1, NotSerialized) - { - Store (Zero, P80D) - P8XH (Zero, Arg0) - PTS (Arg0) - If (LEqual (Arg0, 0x03)) - { - If (LAnd (DTSE, LGreater (TCNT, One))) - { - TRAP (TRTD, 0x1E) - } - } - - If (LOr (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04)), LEqual ( - Arg0, 0x05))) - { - If (LEqual (PFLV, FDTP)) - { - Store (One, GP27) - } - } - } - - Method (_WAK, 1, Serialized) - { - ShiftLeft (Arg0, 0x04, DBG8) - WAK (Arg0) - If (NEXP) - { - If (And (OSCC, 0x02)) - { - \_SB.PCI0.NHPG () - } - - If (And (OSCC, 0x04)) - { - \_SB.PCI0.NPME () - } - } - - If (LEqual (Arg0, 0x03)) - { - If (LEqual (Zero, ACTT)) - { - If (LEqual (ECON, One)) - { - Store (Zero, \_SB.PCI0.LPCB.H_EC.CFAN) - } - } - } - - If (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04))) - { - If (LAnd (DTSE, LGreater (TCNT, One))) - { - TRAP (TRTD, 0x14) - } - - If (LEqual (OSYS, 0x07D2)) - { - If (And (CFGD, One)) - { - If (LGreater (\_PR.CPU0._PPC, Zero)) - { - Subtract (\_PR.CPU0._PPC, One, \_PR.CPU0._PPC) - PNOT () - Add (\_PR.CPU0._PPC, One, \_PR.CPU0._PPC) - PNOT () - } - Else - { - Add (\_PR.CPU0._PPC, One, \_PR.CPU0._PPC) - PNOT () - Subtract (\_PR.CPU0._PPC, One, \_PR.CPU0._PPC) - PNOT () - } - } - } - - If (LEqual (ECON, One)) - { - If (LNotEqual (LIDS, \_SB.PCI0.LPCB.H_EC.LSTE)) - { - Store (\_SB.PCI0.LPCB.H_EC.LSTE, LIDS) - If (IGDS) - { - If (\_SB.PCI0.GFX0.GLID (LIDS)) - { - Or (0x80000000, \_SB.PCI0.GFX0.CLID, \_SB.PCI0.GFX0.CLID) - } - } - - Notify (\_SB.LID0, 0x80) - } - - If (LNotEqual (\_SB.PCI0.LPCB.H_EC.DOCK, DSTS)) - { - Store (\_SB.PCI0.LPCB.H_EC.DOCK, DSTS) - If (LAnd (\_SB.PCI0.HDEF.DCKS, One)) - { - Store (DSTS, \_SB.PCI0.HDEF.DCKA) - } - - If (LEqual (DSTS, One)) - { - If (LEqual (Arg0, 0x03)) - { - Sleep (0x03E8) - Store (PDBR, SSMP) - Sleep (0x03E8) - } - - Notify (\_SB.PCI0.DOCK, Zero) - } - Else - { - Notify (\_SB.PCI0.DOCK, One) - } - } - - If (LEqual (BNUM, Zero)) - { - If (LNotEqual (\_SB.PCI0.LPCB.H_EC.VPWR, PWRS)) - { - Store (\_SB.PCI0.LPCB.H_EC.VPWR, PWRS) - PNOT () - } - } - Else - { - If (LNotEqual (\_SB.PCI0.LPCB.H_EC.RPWR, PWRS)) - { - Store (\_SB.PCI0.LPCB.H_EC.RPWR, PWRS) - PNOT () - } - } - } - - If (LEqual (RP1D, Zero)) - { - Notify (\_SB.PCI0.RP01, Zero) - } - - If (LEqual (RP2D, Zero)) - { - Notify (\_SB.PCI0.RP02, Zero) - } - - If (LEqual (RP3D, Zero)) - { - Notify (\_SB.PCI0.RP03, Zero) - } - - If (LEqual (RP4D, Zero)) - { - Notify (\_SB.PCI0.RP04, Zero) - } - - If (LEqual (RP5D, Zero)) - { - Notify (\_SB.PCI0.RP05, Zero) - } - - If (LEqual (RP6D, Zero)) - { - Notify (\_SB.PCI0.RP06, Zero) - } - - If (LEqual (RP7D, Zero)) - { - If (LEqual (DSTS, Zero)) - { - Notify (\_SB.PCI0.RP07, Zero) - } - } - - If (LEqual (RP8D, Zero)) - { - If (LEqual (DSTS, Zero)) - { - Notify (\_SB.PCI0.RP08, Zero) - } - } - } - - Return (Package (0x02) - { - Zero, - Zero - }) - } - - Method (GETB, 3, Serialized) - { - Multiply (Arg0, 0x08, Local0) - Multiply (Arg1, 0x08, Local1) - CreateField (Arg2, Local0, Local1, TBF3) - Return (TBF3) - } - - Method (PNOT, 0, Serialized) - { - If (LGreater (TCNT, One)) - { - If (And (PDC0, 0x08)) - { - Notify (\_PR.CPU0, 0x80) - If (And (PDC0, 0x10)) - { - Sleep (0x64) - Notify (\_PR.CPU0, 0x81) - } - } - - If (And (PDC1, 0x08)) - { - Notify (\_PR.CPU1, 0x80) - If (And (PDC1, 0x10)) - { - Sleep (0x64) - Notify (\_PR.CPU1, 0x81) - } - } - - If (And (PDC2, 0x08)) - { - Notify (\_PR.CPU2, 0x80) - If (And (PDC2, 0x10)) - { - Sleep (0x64) - Notify (\_PR.CPU2, 0x81) - } - } - - If (And (PDC3, 0x08)) - { - Notify (\_PR.CPU3, 0x80) - If (And (PDC3, 0x10)) - { - Sleep (0x64) - Notify (\_PR.CPU3, 0x81) - } - } - - If (And (PDC4, 0x08)) - { - Notify (\_PR.CPU4, 0x80) - If (And (PDC4, 0x10)) - { - Sleep (0x64) - Notify (\_PR.CPU4, 0x81) - } - } - - If (And (PDC5, 0x08)) - { - Notify (\_PR.CPU5, 0x80) - If (And (PDC5, 0x10)) - { - Sleep (0x64) - Notify (\_PR.CPU5, 0x81) - } - } - - If (And (PDC6, 0x08)) - { - Notify (\_PR.CPU6, 0x80) - If (And (PDC6, 0x10)) - { - Sleep (0x64) - Notify (\_PR.CPU6, 0x81) - } - } - - If (And (PDC7, 0x08)) - { - Notify (\_PR.CPU7, 0x80) - If (And (PDC7, 0x10)) - { - Sleep (0x64) - Notify (\_PR.CPU7, 0x81) - } - } - } - Else - { - Notify (\_PR.CPU0, 0x80) - Sleep (0x64) - Notify (\_PR.CPU0, 0x81) - } - - If (LEqual (ECON, One)) - { - Store (\_SB.PCI0.LPCB.H_EC.B1CC, B1SC) - Store (\_SB.PCI0.LPCB.H_EC.B1ST, B1SS) - Store (\_SB.PCI0.LPCB.H_EC.B2CC, B2SC) - Store (\_SB.PCI0.LPCB.H_EC.B2ST, B2SS) - If (LGreaterEqual (OSYS, 0x07D6)) - { - Notify (\_SB.PCI0.LPCB.H_EC.BAT0, 0x81) - Notify (\_SB.PCI0.LPCB.H_EC.BAT1, 0x81) - Notify (\_SB.PCI0.LPCB.H_EC.BAT2, 0x81) - } - Else - { - Notify (\_SB.PCI0.LPCB.H_EC.BAT0, 0x80) - Notify (\_SB.PCI0.LPCB.H_EC.BAT1, 0x80) - Notify (\_SB.PCI0.LPCB.H_EC.BAT2, 0x80) - } - } - } - - Method (TRAP, 2, Serialized) - { - Store (Arg1, SMIF) - If (LEqual (Arg0, TRTP)) - { - Store (Zero, TRP0) - } - - If (LEqual (Arg0, TRTD)) - { - Store (Arg1, DTSF) - Store (Zero, TRPD) - Return (DTSF) - } - - If (LEqual (Arg0, TRTI)) - { - Store (Zero, TRPH) - } - - Return (SMIF) - } - - Scope (_SB.PCI0) - { - Method (_INI, 0, NotSerialized) - { - Store (0x07D0, OSYS) - If (CondRefOf (_OSI, Local0)) - { - If (_OSI ("Windows 2001")) - { - Store (0x07D1, OSYS) - } - - If (_OSI ("Windows 2001 SP1")) - { - Store (0x07D1, OSYS) - } - - If (_OSI ("Windows 2001 SP2")) - { - Store (0x07D2, OSYS) - } - - If (_OSI ("Windows 2001.1")) - { - Store (0x07D3, OSYS) - } - - If (_OSI ("Windows 2006")) - { - Store (0x07D6, OSYS) - } - - If (_OSI ("Windows 2009")) - { - Store (0x07D9, OSYS) - } - } - } - - Method (NHPG, 0, Serialized) - { - Store (Zero, ^RP01.HPEX) - Store (Zero, ^RP02.HPEX) - Store (Zero, ^RP03.HPEX) - Store (Zero, ^RP04.HPEX) - Store (One, ^RP01.HPSX) - Store (One, ^RP02.HPSX) - Store (One, ^RP03.HPSX) - Store (One, ^RP04.HPSX) - } - - Method (NPME, 0, Serialized) - { - Store (Zero, ^RP01.PMEX) - Store (Zero, ^RP02.PMEX) - Store (Zero, ^RP03.PMEX) - Store (Zero, ^RP04.PMEX) - Store (Zero, ^RP05.PMEX) - Store (Zero, ^RP06.PMEX) - Store (Zero, ^RP07.PMEX) - Store (Zero, ^RP08.PMEX) - Store (One, ^RP01.PMSX) - Store (One, ^RP02.PMSX) - Store (One, ^RP03.PMSX) - Store (One, ^RP04.PMSX) - Store (One, ^RP05.PMSX) - Store (One, ^RP06.PMSX) - Store (One, ^RP07.PMSX) - Store (One, ^RP08.PMSX) - } - } - - Scope (\) - { - Name (PICM, Zero) - Name (PRWP, Package (0x02) - { - Zero, - Zero - }) - Method (GPRW, 2, NotSerialized) - { - Store (Arg0, Index (PRWP, Zero)) - Store (ShiftLeft (SS1, One), Local0) - Or (Local0, ShiftLeft (SS2, 0x02), Local0) - Or (Local0, ShiftLeft (SS3, 0x03), Local0) - Or (Local0, ShiftLeft (SS4, 0x04), Local0) - If (And (ShiftLeft (One, Arg1), Local0)) - { - Store (Arg1, Index (PRWP, One)) - } - Else - { - ShiftRight (Local0, One, Local0) - FindSetLeftBit (Local0, Index (PRWP, One)) - } - - Return (PRWP) - } - } - - Scope (_SB.PCI0) - { - Device (PDRC) - { - Name (_HID, EisaId ("PNP0C02")) - Name (_UID, One) - Name (BUF0, ResourceTemplate () - { - Memory32Fixed (ReadWrite, - 0x00000000, // Address Base - 0x00004000, // Address Length - ) - Memory32Fixed (ReadWrite, - 0x00000000, // Address Base - 0x00008000, // Address Length - ) - Memory32Fixed (ReadWrite, - 0x00000000, // Address Base - 0x00001000, // Address Length - ) - Memory32Fixed (ReadWrite, - 0x00000000, // Address Base - 0x00001000, // Address Length - ) - Memory32Fixed (ReadWrite, - 0x00000000, // Address Base - 0x00000000, // Address Length - ) - Memory32Fixed (ReadWrite, - 0xFED20000, // Address Base - 0x00020000, // Address Length - ) - Memory32Fixed (ReadOnly, - 0xFED90000, // Address Base - 0x00004000, // Address Length - ) - Memory32Fixed (ReadWrite, - 0xFED45000, // Address Base - 0x0004B000, // Address Length - ) - Memory32Fixed (ReadOnly, - 0xFF000000, // Address Base - 0x01000000, // Address Length - ) - Memory32Fixed (ReadOnly, - 0xFEE00000, // Address Base - 0x00100000, // Address Length - ) - Memory32Fixed (ReadWrite, - 0x00000000, // Address Base - 0x00001000, // Address Length - ) - }) - Method (_CRS, 0, Serialized) - { - CreateDWordField (BUF0, 0x04, RBR0) - ShiftLeft (^^LPCB.RCBA, 0x0E, RBR0) - CreateDWordField (BUF0, 0x7C, TBR0) - Store (TBAB, TBR0) - CreateDWordField (BUF0, 0x80, TBLN) - If (LEqual (TBAB, Zero)) - { - Store (Zero, TBLN) - } - - CreateDWordField (BUF0, 0x10, MBR0) - ShiftLeft (MHBR, 0x0F, MBR0) - CreateDWordField (BUF0, 0x1C, DBR0) - ShiftLeft (DIBR, 0x0C, DBR0) - CreateDWordField (BUF0, 0x28, EBR0) - ShiftLeft (EPBR, 0x0C, EBR0) - CreateDWordField (BUF0, 0x34, XBR0) - ShiftLeft (PXBR, 0x1A, XBR0) - CreateDWordField (BUF0, 0x38, XSZ0) - ShiftRight (0x10000000, PXSZ, XSZ0) - Return (BUF0) - } - } - } - - Method (BRTN, 1, Serialized) - { - If (LEqual (And (DID1, 0x0F00), 0x0400)) - { - Notify (\_SB.PCI0.GFX0.DD01, Arg0) - } - - If (LEqual (And (DID2, 0x0F00), 0x0400)) - { - Notify (\_SB.PCI0.GFX0.DD02, Arg0) - } - - If (LEqual (And (DID3, 0x0F00), 0x0400)) - { - Notify (\_SB.PCI0.GFX0.DD03, Arg0) - } - - If (LEqual (And (DID4, 0x0F00), 0x0400)) - { - Notify (\_SB.PCI0.GFX0.DD04, Arg0) - } - - If (LEqual (And (DID5, 0x0F00), 0x0400)) - { - Notify (\_SB.PCI0.GFX0.DD05, Arg0) - } - - If (LEqual (And (DID6, 0x0F00), 0x0400)) - { - Notify (\_SB.PCI0.GFX0.DD06, Arg0) - } - - If (LEqual (And (DID7, 0x0F00), 0x0400)) - { - Notify (\_SB.PCI0.GFX0.DD07, Arg0) - } - - If (LEqual (And (DID8, 0x0F00), 0x0400)) - { - Notify (\_SB.PCI0.GFX0.DD08, Arg0) - } - } - - Scope (_GPE) - { - Method (_L09, 0, NotSerialized) - { - If (LEqual (RP1D, Zero)) - { - \_SB.PCI0.RP01.HPME () - Notify (\_SB.PCI0.RP01, 0x02) - } - - If (LEqual (RP2D, Zero)) - { - \_SB.PCI0.RP02.HPME () - Notify (\_SB.PCI0.RP02, 0x02) - } - - If (LEqual (RP3D, Zero)) - { - \_SB.PCI0.RP03.HPME () - Notify (\_SB.PCI0.RP03, 0x02) - } - - If (LEqual (RP4D, Zero)) - { - \_SB.PCI0.RP04.HPME () - Notify (\_SB.PCI0.RP04, 0x02) - } - - If (LEqual (RP5D, Zero)) - { - \_SB.PCI0.RP05.HPME () - Notify (\_SB.PCI0.RP05, 0x02) - } - - If (LEqual (RP6D, Zero)) - { - \_SB.PCI0.RP06.HPME () - Notify (\_SB.PCI0.RP06, 0x02) - } - - If (LEqual (RP7D, Zero)) - { - \_SB.PCI0.RP07.HPME () - Notify (\_SB.PCI0.RP07, 0x02) - } - - If (LEqual (RP8D, Zero)) - { - \_SB.PCI0.RP08.HPME () - Notify (\_SB.PCI0.RP08, 0x02) - } - - Notify (\_SB.PCI0.PEG0, 0x02) - Notify (\_SB.PCI0.PEG0.PEGP, 0x02) - Notify (\_SB.PCI0.PEG1, 0x02) - Notify (\_SB.PCI0.PEG2, 0x02) - Notify (\_SB.PCI0.PEG3, 0x02) - } - - Method (_L0D, 0, NotSerialized) - { - Notify (\_SB.PCI0.EHC1, 0x02) - Notify (\_SB.PCI0.EHC2, 0x02) - Notify (\_SB.PCI0.HDEF, 0x02) - Notify (\_SB.PCI0.GLAN, 0x02) - } - - Method (_L01, 0, NotSerialized) - { - Add (L01C, One, L01C) - P8XH (Zero, One) - P8XH (One, L01C) - If (LAnd (LEqual (RP1D, Zero), \_SB.PCI0.RP01.HPSX)) - { - Sleep (0x64) - If (\_SB.PCI0.RP01.PDCX) - { - Store (One, \_SB.PCI0.RP01.PDCX) - Store (One, \_SB.PCI0.RP01.HPSX) - If (LNot (\_SB.PCI0.RP01.PDSX)) - { - Store (Zero, \_SB.PCI0.RP01.L0SE) - } - - Notify (\_SB.PCI0.RP01, Zero) - } - Else - { - Store (One, \_SB.PCI0.RP01.HPSX) - } - } - - If (LAnd (LEqual (RP2D, Zero), \_SB.PCI0.RP02.HPSX)) - { - Sleep (0x64) - If (\_SB.PCI0.RP02.PDCX) - { - Store (One, \_SB.PCI0.RP02.PDCX) - Store (One, \_SB.PCI0.RP02.HPSX) - If (LNot (\_SB.PCI0.RP02.PDSX)) - { - Store (Zero, \_SB.PCI0.RP02.L0SE) - } - - Notify (\_SB.PCI0.RP02, Zero) - } - Else - { - Store (One, \_SB.PCI0.RP02.HPSX) - } - } - - If (LAnd (LEqual (RP3D, Zero), \_SB.PCI0.RP03.HPSX)) - { - Sleep (0x64) - If (\_SB.PCI0.RP03.PDCX) - { - Store (One, \_SB.PCI0.RP03.PDCX) - Store (One, \_SB.PCI0.RP03.HPSX) - If (LNot (\_SB.PCI0.RP03.PDSX)) - { - Store (Zero, \_SB.PCI0.RP03.L0SE) - } - - Notify (\_SB.PCI0.RP03, Zero) - } - Else - { - Store (One, \_SB.PCI0.RP03.HPSX) - } - } - - If (LAnd (LEqual (RP4D, Zero), \_SB.PCI0.RP04.HPSX)) - { - Sleep (0x64) - If (\_SB.PCI0.RP04.PDCX) - { - Store (One, \_SB.PCI0.RP04.PDCX) - Store (One, \_SB.PCI0.RP04.HPSX) - If (LNot (\_SB.PCI0.RP04.PDSX)) - { - Store (Zero, \_SB.PCI0.RP04.L0SE) - } - - Notify (\_SB.PCI0.RP04, Zero) - } - Else - { - Store (One, \_SB.PCI0.RP04.HPSX) - } - } - - If (LAnd (LEqual (RP5D, Zero), \_SB.PCI0.RP05.HPSX)) - { - Sleep (0x64) - If (\_SB.PCI0.RP05.PDCX) - { - Store (One, \_SB.PCI0.RP05.PDCX) - Store (One, \_SB.PCI0.RP05.HPSX) - If (LNot (\_SB.PCI0.RP05.PDSX)) - { - Store (Zero, \_SB.PCI0.RP05.L0SE) - } - - Notify (\_SB.PCI0.RP05, Zero) - } - Else - { - Store (One, \_SB.PCI0.RP05.HPSX) - } - } - - If (LAnd (LEqual (RP6D, Zero), \_SB.PCI0.RP06.HPSX)) - { - Sleep (0x64) - If (\_SB.PCI0.RP06.PDCX) - { - Store (One, \_SB.PCI0.RP06.PDCX) - Store (One, \_SB.PCI0.RP06.HPSX) - If (LNot (\_SB.PCI0.RP06.PDSX)) - { - Store (Zero, \_SB.PCI0.RP06.L0SE) - } - - Notify (\_SB.PCI0.RP06, Zero) - } - Else - { - Store (One, \_SB.PCI0.RP06.HPSX) - } - } - - If (LAnd (LEqual (RP7D, Zero), \_SB.PCI0.RP07.HPSX)) - { - Sleep (0x64) - If (\_SB.PCI0.RP07.PDCX) - { - Store (One, \_SB.PCI0.RP07.PDCX) - Store (One, \_SB.PCI0.RP07.HPSX) - If (LNot (\_SB.PCI0.RP07.PDSX)) - { - Store (Zero, \_SB.PCI0.RP07.L0SE) - } - - If (ECON) - { - If (LEqual (\_SB.PCI0.LPCB.H_EC.DOCK, Zero)) - { - Notify (\_SB.PCI0.RP07, Zero) - } - } - } - Else - { - Store (One, \_SB.PCI0.RP07.HPSX) - } - } - - If (LAnd (LEqual (RP8D, Zero), \_SB.PCI0.RP08.HPSX)) - { - Sleep (0x64) - If (\_SB.PCI0.RP08.PDCX) - { - Store (One, \_SB.PCI0.RP08.PDCX) - Store (One, \_SB.PCI0.RP08.HPSX) - If (LNot (\_SB.PCI0.RP08.PDSX)) - { - Store (Zero, \_SB.PCI0.RP08.L0SE) - } - - If (ECON) - { - If (LEqual (\_SB.PCI0.LPCB.H_EC.DOCK, Zero)) - { - Notify (\_SB.PCI0.RP08, Zero) - } - } - } - Else - { - Store (One, \_SB.PCI0.RP08.HPSX) - } - } - } - - Method (_L02, 0, NotSerialized) - { - Store (Zero, GPEC) - If (CondRefOf (\_SB.PCI0.IEIT.EITV)) - { - \_SB.PCI0.IEIT.EITV () - } - - Notify (\_TZ.TZ00, 0x80) - Notify (\_TZ.TZ01, 0x80) - If (CondRefOf (TNOT)) - { - TNOT () - } - } - - Method (_L06, 0, NotSerialized) - { - If (LAnd (\_SB.PCI0.GFX0.GSSE, LNot (GSMI))) - { - \_SB.PCI0.GFX0.GSCI () - } - } - - Method (_L07, 0, NotSerialized) - { - Store (0x20, \_SB.PCI0.SBUS.HSTS) - } - } - - Scope (_TZ) - { - Name (ETMD, One) - Name (THLD, 0x78) - PowerResource (FN00, 0x00, 0x0000) - { - Method (_STA, 0, Serialized) - { - Return (VFN0) - } - - Method (_ON, 0, Serialized) - { - Store (One, VFN0) - If (LAnd (ECON, ETMD)) - { - Store (AC0F, \_SB.PCI0.LPCB.H_EC.PENV) - \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) - } - } - - Method (_OFF, 0, Serialized) - { - Store (Zero, VFN0) - If (LAnd (ECON, ETMD)) - { - If (LEqual (VFN1, Zero)) - { - Store (Zero, \_SB.PCI0.LPCB.H_EC.PENV) - } - Else - { - Store (AC1F, \_SB.PCI0.LPCB.H_EC.PENV) - } - - \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) - } - } - } - - Device (FAN0) - { - Name (_HID, EisaId ("PNP0C0B")) - Name (_UID, Zero) - Name (_PR0, Package (0x01) - { - FN00 - }) - } - - PowerResource (FN01, 0x00, 0x0000) - { - Method (_STA, 0, Serialized) - { - Return (VFN1) - } - - Method (_ON, 0, Serialized) - { - Store (One, VFN1) - If (LAnd (ECON, ETMD)) - { - Store (AC1F, \_SB.PCI0.LPCB.H_EC.PENV) - \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) - } - } - - Method (_OFF, 0, Serialized) - { - Store (Zero, VFN1) - If (LAnd (ECON, ETMD)) - { - Store (Zero, \_SB.PCI0.LPCB.H_EC.PENV) - \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) - } - } - } - - Device (FAN1) - { - Name (_HID, EisaId ("PNP0C0B")) - Name (_UID, One) - Name (_PR0, Package (0x01) - { - FN01 - }) - } - - PowerResource (FN02, 0x00, 0x0000) - { - Method (_STA, 0, Serialized) - { - Return (VFN2) - } - - Method (_ON, 0, Serialized) - { - Store (One, VFN2) - If (LAnd (ECON, ETMD)) - { - Store (Zero, \_SB.PCI0.LPCB.H_EC.PENV) - \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) - } - } - - Method (_OFF, 0, Serialized) - { - Store (Zero, VFN2) - If (LAnd (ECON, ETMD)) - { - Store (Zero, \_SB.PCI0.LPCB.H_EC.PENV) - \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) - } - } - } - - Device (FAN2) - { - Name (_HID, EisaId ("PNP0C0B")) - Name (_UID, 0x02) - Name (_PR0, Package (0x01) - { - FN02 + WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, + 0x0000, // Granularity + 0x0000, // Range Minimum + 0x00FF, // Range Maximum + 0x0000, // Translation Offset + 0x0100, // Length + ,, _Y00) + DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, + 0x00000000, // Granularity + 0x00000000, // Range Minimum + 0x00000CF7, // Range Maximum + 0x00000000, // Translation Offset + 0x00000CF8, // Length + ,, , TypeStatic) + IO (Decode16, + 0x0CF8, // Range Minimum + 0x0CF8, // Range Maximum + 0x01, // Alignment + 0x08, // Length + ) + DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, + 0x00000000, // Granularity + 0x00000D00, // Range Minimum + 0x0000FFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x0000F300, // Length + ,, , TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000A0000, // Range Minimum + 0x000BFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00020000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000C0000, // Range Minimum + 0x000C3FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y01, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000C4000, // Range Minimum + 0x000C7FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y02, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000C8000, // Range Minimum + 0x000CBFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y03, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000CC000, // Range Minimum + 0x000CFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y04, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000D0000, // Range Minimum + 0x000D3FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y05, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000D4000, // Range Minimum + 0x000D7FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y06, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000D8000, // Range Minimum + 0x000DBFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y07, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000DC000, // Range Minimum + 0x000DFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y08, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000E0000, // Range Minimum + 0x000E3FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y09, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000E4000, // Range Minimum + 0x000E7FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y0A, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000E8000, // Range Minimum + 0x000EBFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y0B, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000EC000, // Range Minimum + 0x000EFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y0C, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000F0000, // Range Minimum + 0x000FFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00010000, // Length + ,, _Y0D, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x00000000, // Range Minimum + 0xFEAFFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0xFEB00000, // Length + ,, _Y0E, AddressRangeMemory, TypeStatic) + QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x0000000000000000, // Granularity + 0x0000000000010000, // Range Minimum + 0x000000000001FFFF, // Range Maximum + 0x0000000000000000, // Translation Offset + 0x0000000000010000, // Length + ,, _Y0F, AddressRangeMemory, TypeStatic) }) - } - - PowerResource (FN03, 0x00, 0x0000) - { - Method (_STA, 0, Serialized) - { - Return (VFN3) - } - - Method (_ON, 0, Serialized) - { - Store (One, VFN3) - If (LAnd (ECON, ETMD)) - { - Store (Zero, \_SB.PCI0.LPCB.H_EC.PENV) - \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) - } - } - - Method (_OFF, 0, Serialized) + Method (_CRS, 0, Serialized) { - Store (Zero, VFN3) - If (LAnd (ECON, ETMD)) + CreateWordField (BUF0, ^_Y00._MAX, PBMX) + Store (Subtract (ShiftRight (PELN, 0x14), 0x02), PBMX) + CreateWordField (BUF0, ^_Y00._LEN, PBLN) + Store (Subtract (ShiftRight (PELN, 0x14), One), PBLN) + If (PM1L) { - Store (Zero, \_SB.PCI0.LPCB.H_EC.PENV) - \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) + CreateDWordField (BUF0, ^_Y01._LEN, C0LN) + Store (Zero, C0LN) } - } - } - - Device (FAN3) - { - Name (_HID, EisaId ("PNP0C0B")) - Name (_UID, 0x03) - Name (_PR0, Package (0x01) - { - FN03 - }) - } - - PowerResource (FN04, 0x00, 0x0000) - { - Method (_STA, 0, Serialized) - { - Return (VFN4) - } - Method (_ON, 0, Serialized) - { - Store (One, VFN4) - If (LAnd (ECON, ETMD)) + If (LEqual (PM1L, One)) { - Store (Zero, \_SB.PCI0.LPCB.H_EC.PENV) - \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) + CreateBitField (BUF0, ^_Y01._RW, C0RW) + Store (Zero, C0RW) } - } - Method (_OFF, 0, Serialized) - { - Store (Zero, VFN4) - If (LAnd (ECON, ETMD)) + If (PM1H) { - Store (Zero, \_SB.PCI0.LPCB.H_EC.PENV) - \_SB.PCI0.LPCB.H_EC.ECMD (0x1A) + CreateDWordField (BUF0, ^_Y02._LEN, C4LN) + Store (Zero, C4LN) } - } - } - Device (FAN4) - { - Name (_HID, EisaId ("PNP0C0B")) - Name (_UID, 0x04) - Name (_PR0, Package (0x01) - { - FN04 - }) - } - - ThermalZone (TZ00) - { - Name (PTMP, 0x0BB8) - Method (_SCP, 1, Serialized) - { - Store (Arg0, CTYP) - } - - Method (_CRT, 0, Serialized) - { - If (CondRefOf (\_PR.ACRT)) + If (LEqual (PM1H, One)) { - If (LNotEqual (\_PR.ACRT, Zero)) - { - Return (Add (0x0AAC, Multiply (\_PR.ACRT, 0x0A))) - } + CreateBitField (BUF0, ^_Y02._RW, C4RW) + Store (Zero, C4RW) } - Return (Add (0x0AAC, Multiply (CRTT, 0x0A))) - } - - Method (_AC0, 0, Serialized) - { - If (CondRefOf (\_PR.AAC0)) + If (PM2L) { - If (LNotEqual (\_PR.AAC0, Zero)) - { - Return (Add (0x0AAC, Multiply (\_PR.AAC0, 0x0A))) - } + CreateDWordField (BUF0, ^_Y03._LEN, C8LN) + Store (Zero, C8LN) } - Return (Add (0x0AAC, Multiply (ACTT, 0x0A))) - } - - Method (_AC1, 0, Serialized) - { - Return (Add (0x0AAC, Multiply (ACT1, 0x0A))) - } - - Method (_AC2, 0, Serialized) - { - Return (0x0AAC) - } - - Method (_AC3, 0, Serialized) - { - Return (0x0AAC) - } - - Method (_AC4, 0, Serialized) - { - Return (0x0AAC) - } - - Name (_AL0, Package (0x01) - { - FAN0 - }) - Name (_AL1, Package (0x01) - { - FAN1 - }) - Name (_AL2, Package (0x01) - { - FAN2 - }) - Name (_AL3, Package (0x01) - { - FAN3 - }) - Name (_AL4, Package (0x01) - { - FAN4 - }) - Method (_TMP, 0, Serialized) - { - If (LNot (ETMD)) + If (LEqual (PM2L, One)) { - Return (0x0BB8) + CreateBitField (BUF0, ^_Y03._RW, C8RW) + Store (Zero, C8RW) } - If (LEqual (DTSE, 0x03)) + If (PM2H) { - Return (Add (0x0B10, Multiply (CRTT, 0x0A))) + CreateDWordField (BUF0, ^_Y04._LEN, CCLN) + Store (Zero, CCLN) } - If (LEqual (DTSE, One)) + If (LEqual (PM2H, One)) { - If (LEqual (PKGA, One)) - { - Store (PDTS, Local0) - Return (Add (0x0AAC, Multiply (Local0, 0x0A))) - } - - Store (DTS1, Local0) - If (LGreater (DTS2, Local0)) - { - Store (DTS2, Local0) - } - - If (LGreater (DTS3, Local0)) - { - Store (DTS3, Local0) - } - - If (LGreater (DTS4, Local0)) - { - Store (DTS4, Local0) - } - - Return (Add (0x0AAC, Multiply (Local0, 0x0A))) + CreateBitField (BUF0, ^_Y04._RW, CCRW) + Store (Zero, CCRW) } - If (ECON) + If (PM3L) { - Store (\_SB.PCI0.LPCB.H_EC.PLMX, Local0) - Add (0x0AAC, Multiply (Local0, 0x0A), Local0) - Store (Local0, PTMP) - Return (Local0) + CreateDWordField (BUF0, ^_Y05._LEN, D0LN) + Store (Zero, D0LN) } - Return (0x0BC2) - } - } - - ThermalZone (TZ01) - { - Name (PTMP, 0x0BB8) - Method (_SCP, 1, Serialized) - { - Store (Arg0, CTYP) - } - - Method (_CRT, 0, Serialized) - { - If (CondRefOf (\_PR.ACRT)) + If (LEqual (PM3L, One)) { - If (LNotEqual (\_PR.ACRT, Zero)) - { - Return (Add (0x0AAC, Multiply (\_PR.ACRT, 0x0A))) - } + CreateBitField (BUF0, ^_Y05._RW, D0RW) + Store (Zero, D0RW) } - Return (Add (0x0AAC, Multiply (CRTT, 0x0A))) - } - - Method (_TMP, 0, Serialized) - { - If (LNot (ETMD)) + If (PM3H) { - Return (0x0BCC) + CreateDWordField (BUF0, ^_Y06._LEN, D4LN) + Store (Zero, D4LN) } - If (LEqual (DTSE, 0x03)) + If (LEqual (PM3H, One)) { - Return (Add (0x0B10, Multiply (CRTT, 0x0A))) + CreateBitField (BUF0, ^_Y06._RW, D4RW) + Store (Zero, D4RW) } - If (LEqual (DTSE, One)) + If (PM4L) { - If (LEqual (PKGA, One)) - { - Store (PDTS, Local0) - Return (Add (0x0AAC, Multiply (Local0, 0x0A))) - } + CreateDWordField (BUF0, ^_Y07._LEN, D8LN) + Store (Zero, D8LN) + } - Store (DTS1, Local0) - If (LGreater (DTS2, Local0)) - { - Store (DTS2, Local0) - } + If (LEqual (PM4L, One)) + { + CreateBitField (BUF0, ^_Y07._RW, D8RW) + Store (Zero, D8RW) + } - If (LGreater (DTS3, Local0)) - { - Store (DTS3, Local0) - } + If (PM4H) + { + CreateDWordField (BUF0, ^_Y08._LEN, DCLN) + Store (Zero, DCLN) + } - If (LGreater (DTS4, Local0)) - { - Store (DTS4, Local0) - } + If (LEqual (PM4H, One)) + { + CreateBitField (BUF0, ^_Y08._RW, DCRW) + Store (Zero, DCRW) + } - Return (Add (0x0AAC, Multiply (Local0, 0x0A))) + If (PM5L) + { + CreateDWordField (BUF0, ^_Y09._LEN, E0LN) + Store (Zero, E0LN) } - If (ECON) + If (LEqual (PM5L, One)) { - Store (\_SB.PCI0.LPCB.H_EC.PECH, Local0) - Multiply (Local0, 0x0A, Local0) - Store (\_SB.PCI0.LPCB.H_EC.PECL, Local1) - ShiftRight (Local1, 0x02, Local1) - Store (Divide (Multiply (Local1, 0x0A), 0x40, ), Local1) - Add (Local0, Local1, Local0) - Add (0x0AAC, Local0, Local0) - Store (Local0, PTMP) - Return (Local0) + CreateBitField (BUF0, ^_Y09._RW, E0RW) + Store (Zero, E0RW) } - Return (0x0BD6) - } + If (PM5H) + { + CreateDWordField (BUF0, ^_Y0A._LEN, E4LN) + Store (Zero, E4LN) + } - Method (_PSL, 0, Serialized) - { - If (LEqual (TCNT, 0x08)) + If (LEqual (PM5H, One)) { - Return (Package (0x08) - { - \_PR.CPU0, - \_PR.CPU1, - \_PR.CPU2, - \_PR.CPU3, - \_PR.CPU4, - \_PR.CPU5, - \_PR.CPU6, - \_PR.CPU7 - }) + CreateBitField (BUF0, ^_Y0A._RW, E4RW) + Store (Zero, E4RW) } - If (LEqual (TCNT, 0x04)) + If (PM6L) { - Return (Package (0x04) - { - \_PR.CPU0, - \_PR.CPU1, - \_PR.CPU2, - \_PR.CPU3 - }) + CreateDWordField (BUF0, ^_Y0B._LEN, E8LN) + Store (Zero, E8LN) } - If (LEqual (TCNT, 0x02)) + If (LEqual (PM6L, One)) { - Return (Package (0x02) - { - \_PR.CPU0, - \_PR.CPU1 - }) + CreateBitField (BUF0, ^_Y0B._RW, E8RW) + Store (Zero, E8RW) } - Return (Package (0x01) + If (PM6H) { - \_PR.CPU0 - }) - } + CreateDWordField (BUF0, ^_Y0C._LEN, ECLN) + Store (Zero, ECLN) + } - Method (_PSV, 0, Serialized) - { - If (CondRefOf (\_PR.APSV)) + If (LEqual (PM6H, One)) { - If (LNotEqual (\_PR.APSV, Zero)) - { - Return (Add (0x0AAC, Multiply (\_PR.APSV, 0x0A))) - } + CreateBitField (BUF0, ^_Y0C._RW, ECRW) + Store (Zero, ECRW) } - Return (Add (0x0AAC, Multiply (PSVT, 0x0A))) - } + If (PM0H) + { + CreateDWordField (BUF0, ^_Y0D._LEN, F0LN) + Store (Zero, F0LN) + } - Method (_TC1, 0, Serialized) - { - Return (TC1V) - } + If (LEqual (PM0H, One)) + { + CreateBitField (BUF0, ^_Y0D._RW, F0RW) + Store (Zero, F0RW) + } - Method (_TC2, 0, Serialized) - { - Return (TC2V) - } + CreateDWordField (BUF0, ^_Y0E._MIN, M1MN) + CreateDWordField (BUF0, ^_Y0E._MAX, M1MX) + CreateDWordField (BUF0, ^_Y0E._LEN, M1LN) + ShiftLeft (TLUD, 0x14, M1MN) + Add (Subtract (M1MX, M1MN), One, M1LN) + CreateDWordField (BUF0, ^_Y0F._LEN, MSLN) + Store (Zero, MSLN) - Method (_TSP, 0, Serialized) - { - Return (TSPV) + Return (BUF0) } - } - } - Scope (_SB.PCI0.LPCB) - { - Method (SIOH, 0, NotSerialized) - { - If (And (PMFG, 0x10)) + Device (PEG0) { - Notify (PS2K, 0x02) + Name (_ADR, 0x00010000) + Name (_PRW, Package (0x02) { 0x0D, 0x04 }) + Name (_PRT, Package (0x04) + { + Package (0x04) { 0xFFFF, Zero, Zero, 0x10 }, + Package (0x04) { 0xFFFF, One, Zero, 0x11 }, + Package (0x04) { 0xFFFF, 0x02, Zero, 0x12 }, + Package (0x04) { 0xFFFF, 0x03, Zero, 0x13 } + }) + Device (PEGP) + { + Name (_ADR, 0xFFFF) + } } - If (And (PMFG, 0x20)) + Device (PEG1) { - Notify (PS2M, 0x02) + Name (_ADR, 0x00010001) + Name (_PRW, Package (0x02) { 0x0D, 0x04 }) + Name (_PRT, Package (0x04) + { + Package (0x04) { 0xFFFF, Zero, Zero, 0x11 }, + Package (0x04) { 0xFFFF, One, Zero, 0x12 }, + Package (0x04) { 0xFFFF, 0x02, Zero, 0x13 }, + Package (0x04) { 0xFFFF, 0x03, Zero, 0x10 } + }) } - } - } - Name (TPMF, Zero) - Scope (\) - { - Device (AMW0) - { - Name (_HID, EisaId ("PNP0C14")) - Name (_UID, "ASUSWMI") - Name (_WDG, Buffer (0x50) - { - /* 0000 */ 0xD0, 0x5E, 0x84, 0x97, 0x6D, 0x4E, 0xDE, 0x11, - /* 0008 */ 0x8A, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66, - /* 0010 */ 0x42, 0x43, 0x01, 0x02, 0xA0, 0x47, 0x67, 0x46, - /* 0018 */ 0xEC, 0x70, 0xDE, 0x11, 0x8A, 0x39, 0x08, 0x00, - /* 0020 */ 0x20, 0x0C, 0x9A, 0x66, 0x42, 0x44, 0x01, 0x02, - /* 0028 */ 0x72, 0x0F, 0xBC, 0xAB, 0xA1, 0x8E, 0xD1, 0x11, - /* 0030 */ 0x00, 0xA0, 0xC9, 0x06, 0x29, 0x10, 0x00, 0x00, - /* 0038 */ 0xD2, 0x00, 0x01, 0x08, 0x21, 0x12, 0x90, 0x05, - /* 0040 */ 0x66, 0xD5, 0xD1, 0x11, 0xB2, 0xF0, 0x00, 0xA0, - /* 0048 */ 0xC9, 0x06, 0x29, 0x10, 0x4D, 0x4F, 0x01, 0x00 - }) - Name (CCAC, Zero) - Name (ECD2, Zero) - Name (EID2, Zero) - Method (WED2, 1, NotSerialized) + Device (PEG2) { - Store (Arg0, ECD2) + Name (_ADR, 0x00010002) + Name (_PRW, Package (0x02) { 0x0D, 0x04 }) + Name (_PRT, Package (0x04) + { + Package (0x04) { 0xFFFF, Zero, Zero, 0x12 }, + Package (0x04) { 0xFFFF, One, Zero, 0x13 }, + Package (0x04) { 0xFFFF, 0x02, Zero, 0x10 }, + Package (0x04) { 0xFFFF, 0x03, Zero, 0x11 } + }) } - Method (WMBC, 3, NotSerialized) + Device (IGPU) { - Store (One, Local0) - Name (_T_0, Zero) - Store (Arg1, _T_0) - If (LEqual (_T_0, 0x43455053)) + Name (_ADR, 0x00020000) + Device (^^MEM2) { - Return (SPEC (Arg2)) - } - Else - { - If (LEqual (_T_0, 0x50564544)) + Name (_HID, EisaId ("PNP0C01")) + Name (_UID, 0x02) + Name (_CRS, ResourceTemplate () { - Return (DEVP (Arg2)) - } - Else + Memory32Fixed (ReadWrite, 0x20000000, 0x00200000, ) + Memory32Fixed (ReadWrite, 0x40000000, 0x00200000, ) + }) + Method (_STA, 0, NotSerialized) { - If (LEqual (_T_0, 0x50534453)) - { - Return (SDSP (Arg2)) - } - Else + If (IGDS) // Uncore enabled? { - If (LEqual (_T_0, 0x50534447)) - { - Return (GDSP (Arg2)) - } - Else - { - If (LEqual (_T_0, 0x53564544)) - { - Return (DEVS (Arg2)) - } - Else - { - If (LEqual (_T_0, 0x53544344)) - { - Return (DSTS (Arg2)) - } - Else - { - If (LEqual (_T_0, 0x44495047)) - { - Return (GPID ()) - } - Else - { - If (LEqual (_T_0, 0x5446424B)) - { - Return (KBFT (Arg2)) - } - Else - { - If (LEqual (_T_0, 0x59454B48)) - { - Return (HKEY ()) - } - Else - { - Return (Zero) - } - } - } - } - } - } + Return (0x0F) } + + Return (Zero) } } + } + + Device (PEG3) + { + Name (_ADR, 0x00060000) + Name (_PRW, Package (0x02) { 0x0D, 0x04 }) + Name (_PRT, Package (0x04) + { + Package (0x04) { 0xFFFF, Zero, Zero, 0x13 }, + Package (0x04) { 0xFFFF, One, Zero, 0x10 }, + Package (0x04) { 0xFFFF, 0x02, Zero, 0x11 }, + Package (0x04) { 0xFFFF, 0x03, Zero, 0x12 } + }) + } - Return (Local0) + Device (GIGE) + { + Name (_ADR, 0x00190000) + Name (_PRW, Package (0x02) { 0x0D, 0x04 }) } - Method (RSMB, 1, Serialized) + Device (RP01) { - Return (Zero) + Name (_ADR, 0x001C0000) + Name (_PRW, Package (0x02) { 0x09, 0x04 }) + Name (_PRT, Package (0x04) + { + Package (0x04) { 0xFFFF, Zero, Zero, 0x10 }, + Package (0x04) { 0xFFFF, One, Zero, 0x11 }, + Package (0x04) { 0xFFFF, 0x02, Zero, 0x12 }, + Package (0x04) { 0xFFFF, 0x03, Zero, 0x13 } + }) } - Method (WSMB, 1, Serialized) + Device (RP02) { - Return (Zero) + Name (_ADR, 0x001C0001) + Name (_PRW, Package (0x02) { 0x09, 0x04 }) + Name (_PRT, Package (0x04) + { + Package (0x04) { 0xFFFF, Zero, Zero, 0x11 }, + Package (0x04) { 0xFFFF, One, Zero, 0x12 }, + Package (0x04) { 0xFFFF, 0x02, Zero, 0x13 }, + Package (0x04) { 0xFFFF, 0x03, Zero, 0x10 } + }) } - Method (RSMW, 1, Serialized) + Device (RP03) { - Return (Zero) + Name (_ADR, 0x001C0002) + Name (_PRW, Package (0x02) { 0x09, 0x04 }) + Name (_PRT, Package (0x04) + { + Package (0x04) { 0xFFFF, Zero, Zero, 0x12 }, + Package (0x04) { 0xFFFF, One, Zero, 0x13 }, + Package (0x04) { 0xFFFF, 0x02, Zero, 0x10 }, + Package (0x04) { 0xFFFF, 0x03, Zero, 0x11 } + }) } - Method (WSMW, 1, Serialized) + Device (RP04) { - Return (Zero) + Name (_ADR, 0x001C0003) + Name (_PRW, Package (0x02) { 0x09, 0x04 }) + Name (_PRT, Package (0x04) + { + Package (0x04) { 0xFFFF, Zero, Zero, 0x13 }, + Package (0x04) { 0xFFFF, One, Zero, 0x10 }, + Package (0x04) { 0xFFFF, 0x02, Zero, 0x11 }, + Package (0x04) { 0xFFFF, 0x03, Zero, 0x12 } + }) } - Method (RSMK, 1, Serialized) + Device (RP05) { - Return (Zero) + Name (_ADR, 0x001C0004) + Name (_PRW, Package (0x02) { 0x09, 0x04 }) + Name (_PRT, Package (0x04) + { + Package (0x04) { 0xFFFF, Zero, Zero, 0x10 }, + Package (0x04) { 0xFFFF, One, Zero, 0x11 }, + Package (0x04) { 0xFFFF, 0x02, Zero, 0x12 }, + Package (0x04) { 0xFFFF, 0x03, Zero, 0x13} + }) } - Method (WSMK, 1, Serialized) + Device (RP06) { - Return (Zero) + Name (_ADR, 0x001C0005) + Name (_PRW, Package (0x02) { 0x09, 0x04 }) + Name (_PRT, Package (0x04) + { + Package (0x04) { 0xFFFF, Zero, Zero, 0x11 }, + Package (0x04) { 0xFFFF, One, Zero, 0x12 }, + Package (0x04) { 0xFFFF, 0x02, Zero, 0x13 }, + Package (0x04) { 0xFFFF, 0x03, Zero, 0x10 } + }) } - Method (WMBD, 3, NotSerialized) + Device (EHC2) { - Store (One, Local0) - Name (_T_0, Zero) - Store (Arg1, _T_0) - If (LEqual (_T_0, 0x424D5352)) + Name (_ADR, 0x001A0000) + Name (_S3D, 0x02) + Name (_S4D, 0x02) + + OperationRegion (PWKE, PCI_Config, 0x62, One) // PWAKE_CAP—Port Wake Capability Register (datasheet 324645-006, page 652) + Field (PWKE, ByteAcc, NoLock, Preserve) { - Return (RSMB (Arg2)) + PWI, 1, // Port Wake Implemented + PWUC, 7 // Port Wake Up Capability Mask } - Else + + Method (_PSW, 1, NotSerialized) { - If (LEqual (_T_0, 0x424D5357)) - { - Return (WSMB (Arg2)) - } - Else + Multiply (0x7E, Arg0, PWUC) // Set bit 0-8 based on Arg0 (0 disable- or 1 enable wake capabilities). + } + + Device (HUBN) + { + Name (_ADR, Zero) + Device (PR01) { - If (LEqual (_T_0, 0x574D5352)) + Name (_ADR, One) + Name (_UPC, Package (0x04) { 0xFF, Zero, Zero, Zero }) + Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0x30, 0x1C, Zero, Zero, Zero, Zero, Zero, Zero }) + Device (PR11) + { + Name (_ADR, One) + Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) + Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1C, Zero, Zero, Zero, Zero, Zero, Zero }) + } + + Device (PR12) + { + Name (_ADR, 0x02) + Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) + Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1D, Zero, Zero, Zero, Zero, Zero, Zero }) + } + + Device (PR13) + { + Name (_ADR, 0x03) + Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) + Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1D, Zero, Zero, Zero, Zero, Zero, Zero }) + } + + Device (PR14) + { + Name (_ADR, 0x04) + Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) + Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }) + } + + Device (PR15) { - Return (RSMW (Arg2)) + Name (_ADR, 0x05) + Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) + Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }) } - Else + + Device (PR16) { - If (LEqual (_T_0, 0x574D5357)) - { - Return (WSMW (Arg2)) - } - Else - { - If (LEqual (_T_0, 0x4B4D5352)) - { - Return (RSMK (Arg2)) - } - Else - { - If (LEqual (_T_0, 0x4B4D5357)) - { - Return (WSMK (Arg2)) - } - Else - { - Return (Zero) - } - } - } + Name (_ADR, 0x06) + Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) + Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }) } } } - Return (Local0) + Name (_PRW, Package (0x02) { 0x0D, 0x04 }) } - Method (_WED, 1, NotSerialized) + Device (HDEF) { - If (LEqual (Arg0, 0xD2)) - { - Return (EID2) - } - - Return (Zero) + Name (_ADR, 0x001B0000) + Name (_PRW, Package (0x02) { 0x0D, 0x04 }) } - Method (AMWR, 1, Serialized) + Device (RP07) { - Store (Zero, Local1) - If (ECD2) - { - Store (Arg0, EID2) - Notify (AMW0, 0xD2) - Store (One, Local1) - } - Else + Name (_ADR, 0x001C0006) + Name (_PRT, Package (0x04) { - } - - Return (Local1) + Package (0x04) { 0xFFFF, Zero, Zero, 0x12 }, + Package (0x04) { 0xFFFF, One, Zero, 0x13 }, + Package (0x04) { 0xFFFF, 0x02, Zero, 0x10 }, + Package (0x04) { 0xFFFF, 0x03, Zero, 0x11 } + }) } - Method (AMWN, 1, Serialized) + Device (RP08) { - Store (AMWR (Arg0), Local0) - Return (Local0) + Name (_ADR, 0x001C0007) + Name (_PRW, Package (0x02) { 0x09, 0x04 }) + Name (_PRT, Package (0x04) + { + Package (0x04) { 0xFFFF, Zero, Zero, 0x13 }, + Package (0x04) { 0xFFFF, One, Zero, 0x10 }, + Package (0x04) { 0xFFFF, 0x02, Zero, 0x11 }, + Package (0x04) { 0xFFFF, 0x03, Zero, 0x12 } + }) } - Name (WQMO, Buffer (0x09A6) + Device (EHC1) { - /* 0000 */ 0x46, 0x4F, 0x4D, 0x42, 0x01, 0x00, 0x00, 0x00, - /* 0008 */ 0x96, 0x09, 0x00, 0x00, 0x42, 0x38, 0x00, 0x00, - /* 0010 */ 0x44, 0x53, 0x00, 0x01, 0x1A, 0x7D, 0xDA, 0x54, - /* 0018 */ 0xA8, 0xD1, 0x9A, 0x00, 0x01, 0x06, 0x18, 0x42, - /* 0020 */ 0x10, 0x07, 0x10, 0x4A, 0x29, 0x86, 0x42, 0x04, - /* 0028 */ 0x0A, 0x0D, 0xA1, 0x38, 0x0A, 0x60, 0x30, 0x12, - /* 0030 */ 0x20, 0x24, 0x07, 0x42, 0x2E, 0x98, 0x98, 0x00, - /* 0038 */ 0x11, 0x10, 0xF2, 0x2A, 0xC0, 0xA6, 0x00, 0x93, - /* 0040 */ 0x20, 0xEA, 0xDF, 0x1F, 0xA2, 0x24, 0x38, 0x94, - /* 0048 */ 0x10, 0x08, 0x49, 0x14, 0x60, 0x5E, 0x80, 0x6E, - /* 0050 */ 0x01, 0x86, 0x05, 0xD8, 0x16, 0x60, 0x5A, 0x80, - /* 0058 */ 0x63, 0x48, 0x2A, 0x0D, 0x9C, 0x12, 0x58, 0x0A, - /* 0060 */ 0x84, 0x84, 0x0A, 0x50, 0x2E, 0xC0, 0xB7, 0x00, - /* 0068 */ 0xED, 0x88, 0x92, 0x2C, 0xC0, 0x32, 0x8C, 0x08, - /* 0070 */ 0x3C, 0x8A, 0xC8, 0x46, 0xE3, 0x04, 0x65, 0x43, - /* 0078 */ 0xA3, 0x64, 0x40, 0xC8, 0xB3, 0x00, 0xEB, 0xC0, - /* 0080 */ 0x84, 0xC0, 0xEE, 0x05, 0x98, 0x13, 0xE0, 0x4D, - /* 0088 */ 0x80, 0xB8, 0x61, 0x68, 0x85, 0x07, 0x10, 0xAA, - /* 0090 */ 0x30, 0x01, 0xB6, 0x60, 0x84, 0x52, 0x1B, 0x8C, - /* 0098 */ 0x50, 0x1A, 0x43, 0xD0, 0x30, 0x8C, 0x12, 0xF1, - /* 00A0 */ 0x90, 0x3A, 0x83, 0x15, 0x4A, 0xC4, 0x30, 0x21, - /* 00A8 */ 0x22, 0x54, 0x86, 0x41, 0x86, 0x15, 0x2A, 0x5A, - /* 00B0 */ 0xDC, 0x08, 0xED, 0x0F, 0x82, 0x44, 0x5B, 0xB1, - /* 00B8 */ 0x86, 0xEA, 0x48, 0xA3, 0x41, 0x0D, 0x2F, 0xC1, - /* 00C0 */ 0xE1, 0x7A, 0xA8, 0xE7, 0xD8, 0xB9, 0x00, 0xE9, - /* 00C8 */ 0xC0, 0x02, 0x09, 0x7E, 0x16, 0x75, 0x8E, 0x93, - /* 00D0 */ 0x80, 0x24, 0x30, 0xD6, 0xF1, 0xB3, 0x81, 0xE3, - /* 00D8 */ 0x5D, 0x03, 0x6A, 0xC6, 0xC7, 0xCB, 0x04, 0xC1, - /* 00E0 */ 0xA1, 0x86, 0xE8, 0x81, 0x86, 0x3B, 0x81, 0x43, - /* 00E8 */ 0x64, 0x80, 0x9E, 0xD3, 0xD1, 0x60, 0x0E, 0x00, - /* 00F0 */ 0x76, 0x38, 0x19, 0xDD, 0x03, 0x4A, 0x15, 0x60, - /* 00F8 */ 0x76, 0xCC, 0xB2, 0x08, 0xA4, 0xF1, 0x18, 0xFA, - /* 0100 */ 0x74, 0xCF, 0xE7, 0x84, 0x13, 0x58, 0xFE, 0x20, - /* 0108 */ 0x50, 0x23, 0x33, 0xB4, 0x0D, 0x4E, 0x4B, 0x98, - /* 0110 */ 0x21, 0x0F, 0xFF, 0xB0, 0x98, 0x58, 0x08, 0x7D, - /* 0118 */ 0x10, 0x3C, 0x1E, 0x78, 0xFF, 0xFF, 0xF1, 0x80, - /* 0120 */ 0x47, 0xF1, 0x99, 0x40, 0x08, 0xAF, 0x04, 0xB1, - /* 0128 */ 0x3D, 0xA0, 0xE7, 0x04, 0x03, 0x63, 0x07, 0x64, - /* 0130 */ 0xBF, 0x02, 0x10, 0x82, 0x97, 0x39, 0x22, 0x39, - /* 0138 */ 0x45, 0xD0, 0x98, 0x8C, 0xD1, 0x2A, 0x84, 0x86, - /* 0140 */ 0x10, 0xDA, 0x10, 0x67, 0x17, 0xFF, 0xE0, 0x0D, - /* 0148 */ 0x73, 0xEE, 0x26, 0x28, 0x72, 0x04, 0xA8, 0xCF, - /* 0150 */ 0x84, 0x47, 0xC0, 0x8F, 0x01, 0xD1, 0x43, 0x9F, - /* 0158 */ 0x4D, 0xF4, 0xE3, 0x89, 0x72, 0x12, 0x07, 0xE4, - /* 0160 */ 0x33, 0x83, 0x11, 0x82, 0x97, 0x7B, 0x48, 0x20, - /* 0168 */ 0x9A, 0xE7, 0xA0, 0x13, 0xC3, 0x39, 0x1D, 0x02, - /* 0170 */ 0x53, 0xA3, 0x05, 0xA2, 0x09, 0x10, 0x45, 0x59, - /* 0178 */ 0xAA, 0x6C, 0x2C, 0xD5, 0x83, 0xA0, 0x82, 0x80, - /* 0180 */ 0x34, 0x77, 0x43, 0x9C, 0xB4, 0x91, 0x03, 0xC7, - /* 0188 */ 0xA8, 0x7E, 0xD8, 0x54, 0x04, 0x9C, 0x0E, 0x1B, - /* 0190 */ 0x1E, 0xB7, 0xE3, 0x93, 0x28, 0xFA, 0x80, 0x28, - /* 0198 */ 0x9C, 0xC3, 0x9E, 0x39, 0x28, 0x88, 0x01, 0x9D, - /* 01A0 */ 0x04, 0x42, 0x4E, 0x8E, 0x02, 0xA8, 0xBD, 0x68, - /* 01A8 */ 0x58, 0x1A, 0xD7, 0xA9, 0xBD, 0x09, 0x78, 0x5A, - /* 01B0 */ 0x8F, 0x05, 0x87, 0x71, 0x5C, 0x67, 0x6D, 0xD1, - /* 01B8 */ 0x37, 0x06, 0x3A, 0x1F, 0xDF, 0x05, 0xB8, 0x06, - /* 01C0 */ 0x08, 0xCD, 0xC8, 0xF0, 0x56, 0x03, 0x48, 0xC1, - /* 01C8 */ 0xF8, 0x49, 0xE0, 0x11, 0xC0, 0x04, 0xD6, 0x75, - /* 01D0 */ 0x20, 0x80, 0x7E, 0xD9, 0xF0, 0xF0, 0x7D, 0xC2, - /* 01D8 */ 0x78, 0xBC, 0x48, 0x50, 0xDF, 0x7D, 0x00, 0x14, - /* 01E0 */ 0x40, 0x3E, 0x00, 0x58, 0xE9, 0x1D, 0x80, 0x8E, - /* 01E8 */ 0x21, 0x44, 0x98, 0x68, 0x46, 0xE7, 0x12, 0x56, - /* 01F0 */ 0xAA, 0xFF, 0xFF, 0x68, 0xF9, 0x41, 0xC5, 0xA3, - /* 01F8 */ 0x35, 0x88, 0x47, 0xEB, 0x40, 0xA3, 0x45, 0x1F, - /* 0200 */ 0x33, 0xAC, 0x70, 0x54, 0xF2, 0x39, 0x01, 0x0D, - /* 0208 */ 0x17, 0x06, 0x41, 0xE1, 0x07, 0x0E, 0x68, 0x80, - /* 0210 */ 0xA7, 0xF7, 0x66, 0xE0, 0x99, 0x18, 0xCE, 0xF3, - /* 0218 */ 0xE5, 0x70, 0x9E, 0x2F, 0x1F, 0x8E, 0x0F, 0x14, - /* 0220 */ 0xF0, 0x07, 0x8C, 0x25, 0x28, 0x70, 0xC2, 0x20, - /* 0228 */ 0x87, 0xC7, 0x08, 0x1E, 0x2C, 0x95, 0x35, 0x2E, - /* 0230 */ 0xD4, 0xFD, 0xC0, 0x27, 0x1A, 0x86, 0x7D, 0xA8, - /* 0238 */ 0x47, 0xF3, 0x96, 0x70, 0x86, 0x6F, 0x13, 0x07, - /* 0240 */ 0xF5, 0xEE, 0x61, 0xA7, 0x42, 0x2D, 0x3A, 0x84, - /* 0248 */ 0xF5, 0x48, 0x39, 0xAC, 0xD1, 0xC2, 0x1E, 0xF0, - /* 0250 */ 0x73, 0x87, 0xEF, 0x19, 0xFC, 0x4A, 0xE3, 0x63, - /* 0258 */ 0x08, 0x5D, 0x85, 0x4E, 0x15, 0x5C, 0x14, 0x84, - /* 0260 */ 0xE2, 0xAD, 0x45, 0xC3, 0x3F, 0x0B, 0x8F, 0xEB, - /* 0268 */ 0x15, 0xC3, 0x57, 0x80, 0x87, 0x13, 0x9F, 0x01, - /* 0270 */ 0xE2, 0x07, 0x3A, 0x82, 0x17, 0x11, 0x9F, 0x7D, - /* 0278 */ 0x7C, 0x79, 0xF1, 0x21, 0x83, 0x9D, 0x2C, 0x78, - /* 0280 */ 0x08, 0x0A, 0xC5, 0x38, 0x1C, 0xA0, 0x84, 0xC3, - /* 0288 */ 0x08, 0xCE, 0x20, 0x1E, 0x9E, 0x83, 0x1C, 0x0E, - /* 0290 */ 0xD0, 0xE7, 0x20, 0x0F, 0x84, 0x0D, 0xC2, 0x20, - /* 0298 */ 0xE7, 0xF1, 0xF2, 0xC3, 0x2E, 0x16, 0xF8, 0xFF, - /* 02A0 */ 0xFF, 0xC5, 0x02, 0x78, 0xA5, 0x19, 0x14, 0x5A, - /* 02A8 */ 0xCF, 0xA0, 0x20, 0x60, 0x3C, 0x3F, 0x78, 0xBC, - /* 02B0 */ 0x9E, 0xAD, 0xA7, 0x05, 0xDE, 0x11, 0xFB, 0xFC, - /* 02B8 */ 0x01, 0x9C, 0xC3, 0x1F, 0x5E, 0x50, 0x71, 0x87, - /* 02C0 */ 0x44, 0x41, 0x7C, 0x36, 0x70, 0x94, 0xF1, 0xA2, - /* 02C8 */ 0x67, 0xE2, 0xC3, 0x90, 0x8F, 0x0B, 0x4F, 0x37, - /* 02D0 */ 0x98, 0xC3, 0x07, 0xB8, 0x47, 0xE2, 0xC3, 0x07, - /* 02D8 */ 0xF0, 0xF8, 0xFF, 0x1F, 0x3E, 0x80, 0x9F, 0x44, - /* 02E0 */ 0x8B, 0x5A, 0x85, 0x1E, 0x3E, 0xC0, 0x15, 0xE4, - /* 02E8 */ 0x84, 0x84, 0x96, 0x73, 0xF8, 0x40, 0x4E, 0x24, - /* 02F0 */ 0x4C, 0x74, 0x9F, 0x91, 0x5E, 0x3C, 0x2C, 0xE1, - /* 02F8 */ 0xE0, 0x81, 0x0A, 0x4F, 0xA2, 0xF8, 0xA7, 0x02, - /* 0300 */ 0x54, 0xE0, 0x53, 0x01, 0x05, 0x31, 0xA0, 0x0F, - /* 0308 */ 0x15, 0x70, 0x66, 0xF0, 0xEC, 0x85, 0x99, 0x07, - /* 0310 */ 0x8C, 0x33, 0x12, 0x60, 0xEB, 0x50, 0x01, 0xDE, - /* 0318 */ 0xFF, 0xFF, 0xA1, 0x02, 0x38, 0x1C, 0x90, 0x00, - /* 0320 */ 0x59, 0x12, 0x2F, 0x48, 0x0F, 0x15, 0xE0, 0x3A, - /* 0328 */ 0x70, 0xFA, 0x50, 0xC1, 0x0F, 0x9A, 0x16, 0x05, - /* 0330 */ 0xA4, 0x23, 0x9E, 0x0F, 0x15, 0x30, 0x2E, 0x42, - /* 0338 */ 0x86, 0x7F, 0xAD, 0x3B, 0x96, 0xE7, 0x30, 0x72, - /* 0340 */ 0xAE, 0x40, 0xC7, 0x3E, 0x18, 0xA0, 0x82, 0x8E, - /* 0348 */ 0x9E, 0x82, 0x18, 0xD0, 0x29, 0x0E, 0x06, 0x68, - /* 0350 */ 0x1D, 0xE7, 0x0A, 0xD4, 0x31, 0x0E, 0xF8, 0xFD, - /* 0358 */ 0xFF, 0xCF, 0x14, 0xC0, 0x49, 0xC4, 0xD1, 0x0A, - /* 0360 */ 0x35, 0x5C, 0x8F, 0xD5, 0x20, 0x1E, 0xAB, 0x8F, - /* 0368 */ 0xA1, 0x1E, 0x2B, 0xEE, 0x1B, 0xE0, 0x23, 0x00, - /* 0370 */ 0xFE, 0xE8, 0x84, 0x03, 0x7B, 0xAE, 0x00, 0x4C, - /* 0378 */ 0x7B, 0x3C, 0x57, 0x80, 0x4E, 0xDA, 0xD9, 0x07, - /* 0380 */ 0x1D, 0x70, 0xAD, 0x3A, 0x89, 0xE1, 0xCF, 0x71, - /* 0388 */ 0x8C, 0x60, 0xA8, 0xC3, 0x1B, 0x85, 0x70, 0x1C, - /* 0390 */ 0x0A, 0x85, 0x39, 0x19, 0xD0, 0xFF, 0xFF, 0x11, - /* 0398 */ 0x96, 0xC0, 0x51, 0x10, 0x0F, 0xCD, 0x61, 0xCE, - /* 03A0 */ 0x70, 0xA0, 0x39, 0x16, 0xC0, 0xBB, 0x55, 0xB0, - /* 03A8 */ 0x63, 0x01, 0x6C, 0x02, 0x1F, 0x0B, 0xC0, 0x17, - /* 03B0 */ 0x67, 0x58, 0xE8, 0xD1, 0xFA, 0xFE, 0x87, 0xBB, - /* 03B8 */ 0x3F, 0x44, 0x79, 0x29, 0xF6, 0x21, 0x07, 0xEE, - /* 03C0 */ 0xB8, 0xC0, 0x71, 0x7A, 0x00, 0x5C, 0x1D, 0xC4, - /* 03C8 */ 0xE4, 0xF4, 0xF4, 0x00, 0xAE, 0x24, 0xA7, 0x07, - /* 03D0 */ 0xD4, 0x80, 0xFD, 0xFF, 0xD7, 0x03, 0xA4, 0x73, - /* 03D8 */ 0x02, 0xF6, 0xA2, 0xCD, 0x20, 0x4E, 0xF4, 0x79, - /* 03E0 */ 0xC4, 0x0A, 0x8E, 0x38, 0xA8, 0xEC, 0x24, 0x4A, - /* 03E8 */ 0x7E, 0xC4, 0x41, 0x65, 0x1D, 0x3B, 0x05, 0x31, - /* 03F0 */ 0xA0, 0x4F, 0x94, 0x80, 0x8F, 0x3B, 0x0E, 0xB0, - /* 03F8 */ 0xD8, 0xA8, 0x27, 0xCB, 0x23, 0x4F, 0x96, 0x82, - /* 0400 */ 0x78, 0xB2, 0xBE, 0x54, 0x00, 0x87, 0x1B, 0x0E, - /* 0408 */ 0xB0, 0xFF, 0xFF, 0x5F, 0x2A, 0x80, 0x92, 0x43, - /* 0410 */ 0xA9, 0x97, 0x0A, 0x90, 0xC9, 0xBB, 0xE1, 0xA0, - /* 0418 */ 0x43, 0xAE, 0x55, 0xF7, 0x3A, 0x76, 0x6C, 0xF5, - /* 0420 */ 0xB8, 0x7D, 0x93, 0xC6, 0x04, 0xBB, 0xE1, 0xA0, - /* 0428 */ 0x22, 0x51, 0x28, 0xD0, 0xB9, 0x00, 0x15, 0x01, - /* 0430 */ 0x8E, 0x82, 0x78, 0x68, 0x3E, 0x17, 0x58, 0xC9, - /* 0438 */ 0xB9, 0x00, 0xED, 0xFD, 0x42, 0x41, 0x06, 0xE7, - /* 0440 */ 0x7B, 0x81, 0x61, 0x8A, 0x1F, 0x8A, 0xEE, 0x3D, - /* 0448 */ 0x3E, 0x17, 0x80, 0xFB, 0x8A, 0x03, 0x2E, 0x63, - /* 0450 */ 0x02, 0xB4, 0x41, 0x92, 0x7B, 0xB8, 0xC7, 0x85, - /* 0458 */ 0x1B, 0x87, 0x47, 0x75, 0x4C, 0x31, 0x9F, 0xE3, - /* 0460 */ 0x82, 0x3C, 0xC7, 0x79, 0x5E, 0xB8, 0xF3, 0x03, - /* 0468 */ 0x70, 0xFB, 0xFF, 0x0F, 0x0C, 0xD6, 0x85, 0x0B, - /* 0470 */ 0x88, 0x0B, 0x35, 0x29, 0xF1, 0xFC, 0x00, 0xAE, - /* 0478 */ 0x5B, 0xB7, 0xEF, 0x85, 0x38, 0x29, 0x77, 0x57, - /* 0480 */ 0x14, 0xC6, 0x2B, 0x49, 0x0C, 0xDF, 0x53, 0x8D, - /* 0488 */ 0x6D, 0x98, 0x03, 0x38, 0x15, 0xE3, 0x24, 0x18, - /* 0490 */ 0xFC, 0xEC, 0x40, 0xC7, 0xE5, 0xC8, 0x24, 0xBA, - /* 0498 */ 0xED, 0xFB, 0x08, 0xC1, 0x63, 0x8E, 0x9E, 0x82, - /* 04A0 */ 0x18, 0xD0, 0x19, 0x4E, 0x2A, 0x68, 0x15, 0x20, - /* 04A8 */ 0x9A, 0x02, 0xE6, 0xE6, 0x0A, 0xF8, 0xFB, 0xFF, - /* 04B0 */ 0xDF, 0x5C, 0x01, 0x56, 0xB8, 0x54, 0xA8, 0x51, - /* 04B8 */ 0xEA, 0x91, 0x02, 0x5C, 0x77, 0x40, 0xDF, 0xC2, - /* 04C0 */ 0x70, 0x92, 0x80, 0x74, 0x65, 0x3D, 0x8D, 0x07, - /* 04C8 */ 0x00, 0x5F, 0x29, 0x60, 0x5C, 0x3C, 0xD9, 0x11, - /* 04D0 */ 0x87, 0xDF, 0xAE, 0x7D, 0x2C, 0x00, 0xE6, 0xFF, - /* 04D8 */ 0xFF, 0x2B, 0x21, 0x58, 0x8F, 0x05, 0xC0, 0x5B, - /* 04E0 */ 0xA4, 0x4B, 0x8B, 0x66, 0x8F, 0x05, 0xE0, 0x12, - /* 04E8 */ 0xBF, 0x0A, 0x7A, 0x50, 0xB1, 0x5C, 0x18, 0x94, - /* 04F0 */ 0x84, 0xB1, 0x43, 0x19, 0xCD, 0xC1, 0x1C, 0x43, - /* 04F8 */ 0x70, 0x76, 0x86, 0x31, 0x1C, 0x1F, 0xA8, 0xA7, - /* 0500 */ 0xFE, 0x58, 0x7B, 0x1A, 0xAF, 0x68, 0xBE, 0xE2, - /* 0508 */ 0xF9, 0x3E, 0x4A, 0x87, 0x88, 0xBA, 0xEA, 0x79, - /* 0510 */ 0xAC, 0x6F, 0x05, 0xA7, 0xF6, 0xAC, 0xE7, 0x6B, - /* 0518 */ 0x8B, 0x61, 0x12, 0x78, 0x88, 0x0C, 0x8D, 0x13, - /* 0520 */ 0xBC, 0x23, 0x19, 0x9A, 0xCB, 0x80, 0xD0, 0x5D, - /* 0528 */ 0xE9, 0x35, 0xC0, 0x73, 0x33, 0x41, 0xF7, 0x43, - /* 0530 */ 0x97, 0x42, 0x04, 0x9D, 0x00, 0xDE, 0x09, 0x6A, - /* 0538 */ 0x14, 0xE0, 0xED, 0x2A, 0x20, 0x5B, 0x02, 0xC4, - /* 0540 */ 0x8D, 0x5E, 0x58, 0x6F, 0x45, 0x51, 0x42, 0x44, - /* 0548 */ 0x08, 0x1A, 0xC5, 0x78, 0x11, 0x42, 0x85, 0x88, - /* 0550 */ 0x12, 0xB5, 0x39, 0x10, 0x5D, 0x8E, 0xA2, 0x06, - /* 0558 */ 0x89, 0x16, 0xCC, 0x08, 0xCC, 0xFE, 0x20, 0x88, - /* 0560 */ 0xF4, 0x67, 0x80, 0x2E, 0x33, 0xBE, 0x0C, 0x7B, - /* 0568 */ 0x34, 0xFC, 0x2C, 0xC5, 0x87, 0x7A, 0x8E, 0x8F, - /* 0570 */ 0x8A, 0xEC, 0xFF, 0x0F, 0xF2, 0x5A, 0x68, 0x9D, - /* 0578 */ 0xE3, 0x24, 0x87, 0x1C, 0x83, 0xEB, 0x0C, 0x01, - /* 0580 */ 0xCD, 0x35, 0xA0, 0x8E, 0xFD, 0x1E, 0xAF, 0xBF, - /* 0588 */ 0x1A, 0x86, 0xE3, 0x43, 0xF4, 0xA1, 0xC2, 0x13, - /* 0590 */ 0x38, 0x44, 0x06, 0xE8, 0x43, 0x04, 0xFC, 0xF1, - /* 0598 */ 0x18, 0xFA, 0x29, 0xC2, 0x13, 0x7E, 0xA1, 0x25, - /* 05A0 */ 0x83, 0x40, 0x9D, 0x34, 0xF8, 0x48, 0x5F, 0xB8, - /* 05A8 */ 0xD9, 0xED, 0xC3, 0x04, 0x16, 0x7B, 0x76, 0xA0, - /* 05B0 */ 0xE3, 0x01, 0xBF, 0xE2, 0x33, 0x81, 0xAE, 0x71, - /* 05B8 */ 0xC6, 0xF6, 0xC9, 0xC8, 0x11, 0x0E, 0x22, 0x50, - /* 05C0 */ 0x40, 0x9F, 0x4D, 0xF8, 0xCD, 0x83, 0x1D, 0x2D, - /* 05C8 */ 0xB8, 0xA8, 0xA3, 0x05, 0xEA, 0xB4, 0xE0, 0x83, - /* 05D0 */ 0x02, 0x43, 0x7C, 0xF8, 0x34, 0xC4, 0x93, 0x05, - /* 05D8 */ 0x3B, 0xEA, 0x80, 0x53, 0xDE, 0x21, 0x04, 0x14, - /* 05E0 */ 0x20, 0x3E, 0x59, 0xB0, 0x79, 0x61, 0x08, 0x2C, - /* 05E8 */ 0x12, 0x1E, 0x75, 0xE8, 0x30, 0x3C, 0x3F, 0x25, - /* 05F0 */ 0x3C, 0x8E, 0x30, 0xEC, 0x37, 0x12, 0x4F, 0xE1, - /* 05F8 */ 0x70, 0x7C, 0xA4, 0x30, 0x42, 0xF0, 0x72, 0x4F, - /* 0600 */ 0x16, 0xE4, 0x62, 0x73, 0x74, 0xFF, 0xFF, 0x27, - /* 0608 */ 0x18, 0xCC, 0x50, 0x3D, 0x04, 0x7E, 0x5E, 0xF0, - /* 0610 */ 0x10, 0xF8, 0x00, 0x5A, 0x9D, 0x1D, 0x39, 0x9F, - /* 0618 */ 0x9C, 0x13, 0x6E, 0xBC, 0x7C, 0x4C, 0xD8, 0x01, - /* 0620 */ 0xF0, 0xE0, 0x4B, 0xF2, 0x59, 0x84, 0xC6, 0x58, - /* 0628 */ 0xBE, 0x8F, 0x23, 0x80, 0x9C, 0x49, 0x3C, 0x81, - /* 0630 */ 0x44, 0x78, 0x19, 0x09, 0x12, 0xE2, 0x58, 0x5E, - /* 0638 */ 0x43, 0x0C, 0x12, 0xE3, 0xED, 0xC8, 0xC7, 0x11, - /* 0640 */ 0x0E, 0xF3, 0x4C, 0x62, 0xB8, 0x87, 0x83, 0x57, - /* 0648 */ 0x91, 0x17, 0x12, 0xC3, 0x3C, 0x8A, 0xF8, 0x7C, - /* 0650 */ 0x10, 0xC3, 0x98, 0xA1, 0xA2, 0x9D, 0x80, 0x8F, - /* 0658 */ 0x23, 0xEC, 0x58, 0xE9, 0xA1, 0xFA, 0x38, 0x02, - /* 0660 */ 0x58, 0xFA, 0xFF, 0x1F, 0x47, 0x80, 0xF9, 0x11, - /* 0668 */ 0x01, 0x77, 0xDA, 0x80, 0x7B, 0x9F, 0x08, 0xF1, - /* 0670 */ 0xA4, 0xF1, 0x92, 0xF0, 0xAC, 0x01, 0x5C, 0x84, - /* 0678 */ 0x6A, 0x39, 0xF7, 0xB0, 0x34, 0x8F, 0x01, 0x1D, - /* 0680 */ 0xCF, 0x38, 0x87, 0x35, 0x01, 0x69, 0x98, 0xFC, - /* 0688 */ 0xCA, 0xED, 0x73, 0xC1, 0xD9, 0x3D, 0x72, 0x1B, - /* 0690 */ 0x26, 0xC8, 0x13, 0xC1, 0x6B, 0x94, 0xC1, 0x05, - /* 0698 */ 0xA9, 0xF3, 0x23, 0x4F, 0x4F, 0x21, 0xDD, 0x27, - /* 06A0 */ 0x5A, 0x94, 0xD2, 0x63, 0x1A, 0x05, 0xF1, 0x19, - /* 06A8 */ 0xC1, 0x21, 0xCE, 0x31, 0xE8, 0xE1, 0x7B, 0x0E, - /* 06B0 */ 0x67, 0x74, 0x20, 0xEF, 0x01, 0xEC, 0xFE, 0x08, - /* 06B8 */ 0x3C, 0x4F, 0x3A, 0x78, 0x74, 0xDF, 0x14, 0xCE, - /* 06C0 */ 0xF3, 0x4C, 0xFF, 0xFF, 0x47, 0x04, 0xDE, 0x99, - /* 06C8 */ 0xFA, 0x82, 0x09, 0x9C, 0x43, 0xDC, 0x05, 0x50, - /* 06D0 */ 0xB2, 0xEF, 0x02, 0x14, 0xC4, 0x13, 0xF3, 0xD5, - /* 06D8 */ 0x0F, 0x0E, 0xFE, 0xAB, 0x1F, 0x30, 0xB9, 0x2C, - /* 06E0 */ 0xF8, 0x9A, 0x04, 0xBE, 0x53, 0x3F, 0xFE, 0xC2, - /* 06E8 */ 0xE0, 0xDB, 0xC0, 0xC3, 0x13, 0x1B, 0x14, 0xF8, - /* 06F0 */ 0xA1, 0x7C, 0x3D, 0x04, 0xFF, 0xFF, 0xFF, 0x7A, - /* 06F8 */ 0x08, 0x3C, 0x95, 0x3A, 0xB5, 0xA9, 0xF0, 0x7A, - /* 0700 */ 0x08, 0xAE, 0x28, 0xD7, 0x12, 0xD4, 0xAD, 0xC9, - /* 0708 */ 0x82, 0x80, 0x74, 0x3F, 0x7F, 0xBE, 0x31, 0xA6, - /* 0710 */ 0xCF, 0x25, 0xF0, 0xEE, 0xA0, 0x5A, 0x95, 0xEE, - /* 0718 */ 0x25, 0x3C, 0x38, 0x85, 0xA2, 0x1F, 0x1E, 0x50, - /* 0720 */ 0x61, 0x0F, 0x0F, 0x14, 0xC4, 0x17, 0x23, 0xDF, - /* 0728 */ 0x4B, 0x00, 0x0E, 0xFC, 0xFF, 0x47, 0xC4, 0x6F, - /* 0730 */ 0xDA, 0x70, 0x8E, 0x16, 0x98, 0x19, 0x81, 0xF5, - /* 0738 */ 0x44, 0xE0, 0x9B, 0x36, 0xE0, 0xE8, 0xE4, 0x02, - /* 0740 */ 0x5C, 0x4E, 0x25, 0x80, 0x2B, 0xAF, 0xA7, 0x12, - /* 0748 */ 0xFD, 0xFF, 0x4F, 0x25, 0xE0, 0xBA, 0x7B, 0x81, - /* 0750 */ 0xE9, 0x6A, 0x72, 0x26, 0xD1, 0x82, 0xFB, 0xEE, - /* 0758 */ 0x05, 0xF0, 0xF3, 0xFF, 0x7F, 0xF7, 0x02, 0x88, - /* 0760 */ 0xE9, 0xF5, 0xEE, 0x05, 0xBC, 0xCE, 0x25, 0x98, - /* 0768 */ 0xBB, 0x97, 0xFF, 0xFF, 0x77, 0x2F, 0x80, 0xFF, - /* 0770 */ 0xFF, 0xFF, 0xBB, 0x17, 0x40, 0x96, 0x53, 0x09, - /* 0778 */ 0xC8, 0xB2, 0x9D, 0x4A, 0xD0, 0x0A, 0xCF, 0xD1, - /* 0780 */ 0x50, 0x27, 0x70, 0x28, 0x4F, 0x18, 0xAF, 0xEA, - /* 0788 */ 0x09, 0xAC, 0xE7, 0xF2, 0x85, 0x52, 0x02, 0xA3, - /* 0790 */ 0xCB, 0x17, 0xB0, 0xFB, 0xFF, 0x5F, 0xBE, 0x00, - /* 0798 */ 0x3E, 0x04, 0xBA, 0x0B, 0xA0, 0x22, 0xDC, 0x05, - /* 07A0 */ 0x28, 0x88, 0x2F, 0x5F, 0x80, 0x97, 0x50, 0x10, - /* 07A8 */ 0x32, 0x72, 0x93, 0xA0, 0x97, 0x2F, 0x38, 0x17, - /* 07B0 */ 0x07, 0xDF, 0x8F, 0x3C, 0x28, 0x78, 0xFF, 0xFF, - /* 07B8 */ 0x41, 0xC1, 0x19, 0xCC, 0x79, 0x17, 0x7B, 0x52, - /* 07C0 */ 0xA4, 0xD7, 0x13, 0xB8, 0x77, 0x0E, 0x8F, 0x0D, - /* 07C8 */ 0x1C, 0xE2, 0xAE, 0x60, 0xC0, 0xDE, 0xE5, 0xED, - /* 07D0 */ 0x04, 0x5C, 0xDA, 0xD6, 0xAE, 0xDB, 0x09, 0x2E, - /* 07D8 */ 0xE1, 0x71, 0x1A, 0xF2, 0xF1, 0x04, 0x93, 0xE7, - /* 07E0 */ 0x76, 0x82, 0x4A, 0x02, 0xA3, 0x2C, 0x24, 0x3A, - /* 07E8 */ 0x42, 0x70, 0xF5, 0x37, 0x31, 0x0A, 0x62, 0x0B, - /* 07F0 */ 0xB7, 0x13, 0x40, 0xC7, 0xFF, 0xFF, 0x76, 0x02, - /* 07F8 */ 0xFC, 0xC7, 0x0C, 0x67, 0x44, 0xEF, 0x15, 0x86, - /* 0800 */ 0xF4, 0x19, 0x0C, 0x98, 0x06, 0x3A, 0x82, 0xA0, - /* 0808 */ 0x2F, 0x69, 0xD8, 0x04, 0x37, 0x10, 0x3A, 0x23, - /* 0810 */ 0x78, 0x17, 0x10, 0xB8, 0x13, 0x83, 0x75, 0x00, - /* 0818 */ 0x01, 0xDF, 0x59, 0x0D, 0x78, 0xFD, 0xFF, 0xCF, - /* 0820 */ 0x6A, 0xC0, 0xF4, 0x00, 0xE0, 0xB3, 0x1A, 0xA0, - /* 0828 */ 0xEA, 0xF6, 0x02, 0x32, 0x85, 0x36, 0x7D, 0x6A, - /* 0830 */ 0x34, 0x6A, 0xD5, 0xA0, 0x4C, 0x8D, 0x32, 0x0D, - /* 0838 */ 0x6A, 0xF5, 0xA9, 0xD4, 0x98, 0x31, 0xBB, 0x60, - /* 0840 */ 0x8A, 0x71, 0x7B, 0xA2, 0x22, 0x96, 0x23, 0x10, - /* 0848 */ 0xEB, 0xA6, 0x90, 0x91, 0xCB, 0x86, 0x41, 0x04, - /* 0850 */ 0x64, 0xD9, 0x8B, 0x16, 0x10, 0x01, 0x11, 0x90, - /* 0858 */ 0x85, 0xBC, 0x1B, 0x04, 0x64, 0x55, 0x20, 0x02, - /* 0860 */ 0x72, 0x2A, 0x20, 0x1A, 0x11, 0x88, 0xC6, 0xF1, - /* 0868 */ 0x00, 0xC4, 0xC2, 0x81, 0x08, 0xC8, 0xEA, 0x4C, - /* 0870 */ 0x00, 0x31, 0xA9, 0x20, 0xBA, 0x43, 0x90, 0xCF, - /* 0878 */ 0x85, 0x80, 0x2C, 0x12, 0x44, 0x40, 0xCE, 0xB8, - /* 0880 */ 0x3E, 0x01, 0x39, 0x30, 0x88, 0x80, 0x1C, 0xF2, - /* 0888 */ 0x1B, 0x22, 0x20, 0x47, 0x06, 0x11, 0x90, 0x05, - /* 0890 */ 0xEB, 0x00, 0xF2, 0xFF, 0x9F, 0xA0, 0x7C, 0x10, - /* 0898 */ 0x01, 0x39, 0x3E, 0x10, 0x15, 0xE3, 0xE3, 0xAE, - /* 08A0 */ 0x45, 0x1F, 0x03, 0x02, 0x72, 0x2E, 0x10, 0x01, - /* 08A8 */ 0x39, 0x07, 0x8D, 0x80, 0x9C, 0x8A, 0x42, 0x40, - /* 08B0 */ 0x56, 0xF5, 0x76, 0x10, 0x90, 0x35, 0x82, 0x08, - /* 08B8 */ 0xC8, 0x29, 0x81, 0x68, 0x66, 0x20, 0x2A, 0xD8, - /* 08C0 */ 0x0A, 0x10, 0x53, 0x0F, 0x22, 0x20, 0x2B, 0xD5, - /* 08C8 */ 0x02, 0xC4, 0x74, 0x83, 0x08, 0xC8, 0xA9, 0xBD, - /* 08D0 */ 0x00, 0x31, 0x0D, 0xEF, 0x00, 0x01, 0x59, 0xEB, - /* 08D8 */ 0xD3, 0x43, 0x20, 0x4E, 0x0A, 0x42, 0xB5, 0xBA, - /* 08E0 */ 0x01, 0x61, 0x39, 0xED, 0x80, 0x30, 0x95, 0x7A, - /* 08E8 */ 0x40, 0x58, 0x1E, 0x3F, 0x43, 0xA6, 0x20, 0x02, - /* 08F0 */ 0xB2, 0xA2, 0x97, 0x88, 0x80, 0x2C, 0x0F, 0x44, - /* 08F8 */ 0x40, 0x96, 0x62, 0x08, 0x88, 0x09, 0x03, 0x11, - /* 0900 */ 0x90, 0x23, 0x01, 0xD1, 0x80, 0x40, 0x54, 0x9E, - /* 0908 */ 0x23, 0x20, 0xA6, 0x15, 0x44, 0x40, 0x0E, 0x08, - /* 0910 */ 0x44, 0xD3, 0x02, 0x51, 0x8D, 0xBF, 0x25, 0x01, - /* 0918 */ 0x59, 0x30, 0x88, 0x80, 0x2C, 0xCE, 0xD2, 0x51, - /* 0920 */ 0x80, 0x82, 0x08, 0xC8, 0x31, 0x35, 0x0D, 0x95, - /* 0928 */ 0x82, 0x08, 0xC8, 0x42, 0x3D, 0x01, 0x31, 0xD5, - /* 0930 */ 0x20, 0x02, 0xB2, 0x42, 0x51, 0x40, 0x4C, 0x2F, - /* 0938 */ 0x88, 0x06, 0x49, 0x80, 0x68, 0x6E, 0x20, 0xAA, - /* 0940 */ 0x5A, 0x15, 0x10, 0x8B, 0x00, 0x22, 0x20, 0xE7, - /* 0948 */ 0x06, 0xA2, 0x22, 0x5C, 0x01, 0x31, 0xE9, 0x20, - /* 0950 */ 0x02, 0x72, 0x0E, 0x20, 0xAA, 0xF9, 0x49, 0x21, - /* 0958 */ 0x20, 0x27, 0x00, 0x11, 0x90, 0xF3, 0xDB, 0x3A, - /* 0960 */ 0x1A, 0xD0, 0x87, 0x8E, 0x80, 0x9C, 0x00, 0x44, - /* 0968 */ 0x40, 0x8E, 0x03, 0x44, 0xA5, 0xFB, 0x02, 0x62, - /* 0970 */ 0x41, 0x40, 0x04, 0x64, 0x41, 0xAF, 0x11, 0x0D, - /* 0978 */ 0x9C, 0x80, 0x08, 0xC8, 0xD1, 0x8C, 0x01, 0xB1, - /* 0980 */ 0x9C, 0x20, 0x02, 0xFA, 0xFF, 0x1F, 0xA8, 0xBE, - /* 0988 */ 0x22, 0x02, 0xB2, 0x52, 0x10, 0x0D, 0x9A, 0x00, - /* 0990 */ 0xD1, 0xB4, 0x40, 0x54, 0xF1, 0x9B, 0xE4, 0xD1, - /* 0998 */ 0x81, 0x81, 0xE8, 0x88, 0x40, 0xA4, 0x1D, 0x11, - /* 09A0 */ 0x28, 0x88, 0x80, 0xFC, 0xFF, 0x07 - }) - Method (SPEC, 1, Serialized) - { - Return (AMWV) - } + Name (_ADR, 0x001D0000) + Name (_S4D, 0x02) + Name (_S3D, 0x02) - Method (DEVP, 1, Serialized) - { - CreateDWordField (Arg0, Zero, DVID) - CreateDWordField (Arg0, 0x04, PARA) - If (LEqual (PARA, One)) + Device (HUBN) { - Name (_T_0, Zero) - Store (DVID, _T_0) - If (LEqual (_T_0, 0x00010011)) - { - Or (\_SB.DSAF, One, \_SB.DSAF) - } - Else + Name (_ADR, Zero) + Device (PR01) { - If (LEqual (_T_0, 0x00010013)) + Name (_ADR, One) + Name (_UPC, Package (0x04) { 0xFF, Zero, Zero, Zero }) + Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0x30, 0x1C, Zero, Zero, Zero, Zero, Zero, Zero }) + Device (PR11) { - Or (\_SB.DSAF, 0x02, \_SB.DSAF) + Name (_ADR, One) + Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) + Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1C, Zero, Zero, Zero, Zero, Zero, Zero }) } - Else + + Device (PR12) { - If (LEqual (_T_0, 0x00010023)) - { - Or (\_SB.DSAF, 0x04, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00060013)) - { - Or (\_SB.DSAF, 0x08, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00060015)) - { - Or (\_SB.DSAF, 0x10, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00010015)) - { - Or (\_SB.DSAF, 0x20, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00090011)) - { - Or (\_SB.DSAF, 0x40, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00070011)) - { - Or (\_SB.DSAF, 0x80, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00080013)) - { - Or (\_SB.DSAF, 0x0100, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00010019)) - { - Or (\_SB.DSAF, 0x0200, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00010017)) - { - Or (\_SB.DSAF, 0x0400, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00050011)) - { - Or (\_SB.DSAF, 0x0800, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00050012)) - { - Or (\_SB.DSAF, 0x1000, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00060017)) - { - Or (\_SB.DSAF, 0x2000, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00080021)) - { - Or (\_SB.DSAF, 0x4000, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00100011)) - { - Or (\_SB.DSAF, 0x8000, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00050001)) - { - Or (\_SB.DSAF, 0x00010000, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00120000)) - { - Or (\_SB.DSAF, 0x00020000, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00120021)) - { - Or (\_SB.DSAF, 0x00040000, \_SB.DSAF) - } - Else - { - If (LEqual (_T_0, 0x00120011)) - { - Or (\_SB.DSAF, 0x00080000, \_SB.DSAF) - } - Else - { - Return (Zero) - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } + Name (_ADR, 0x02) + Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) + Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1D, Zero, Zero, Zero, Zero, Zero, Zero }) } - } - } - Else - { - If (LEqual (PARA, Zero)) - { - Name (_T_1, Zero) - Store (DVID, _T_1) - If (LEqual (_T_1, 0x00010011)) + + Device (PR13) + { + Name (_ADR, 0x03) + Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) + Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1D, Zero, Zero, Zero, Zero, Zero, Zero }) + } + + Device (PR14) + { + Name (_ADR, 0x04) + Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) + Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }) + } + + Device (PR15) + { + Name (_ADR, 0x05) + Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) + Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }) + } + + Device (PR16) { - And (\_SB.DSAF, 0xFFFFFFFFFFFFFFFE, \_SB.DSAF) + Name (_ADR, 0x06) + Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) + Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }) + } + + Device (PR17) + { + Name (_ADR, 0x07) + Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) + Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }) } - Else + + Device (PR18) { - If (LEqual (_T_1, 0x00010013)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFFFFFD, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00010023)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFFFFFB, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00060013)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFFFFF7, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00060015)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFFFFEF, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00010015)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFFFFDF, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00090011)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFFFFBF, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00070011)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFFFF7F, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00080013)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFFFEFF, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00010019)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFFFDFF, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00010017)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFFFBFF, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00050011)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFFF7FF, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00050012)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFFEFFF, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00060017)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFFDFFF, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00080021)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFFBFFF, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00100011)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFF7FFF, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00050001)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFEFFFF, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00120000)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFDFFFF, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00120021)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFFBFFFF, \_SB.DSAF) - } - Else - { - If (LEqual (_T_1, 0x00120011)) - { - And (\_SB.DSAF, 0xFFFFFFFFFFF7FFFF, \_SB.DSAF) - } - Else - { - Return (Zero) - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } + Name (_ADR, 0x08) + Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) + Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }) } } } - - Return (One) } - Method (SDSP, 1, Serialized) + Device (P0P1) { - CreateDWordField (Arg0, Zero, ACTN) - Return (Zero) + Name (_ADR, 0x001E0000) + Name (_PRW, Package (0x02) { 0x0B, 0x04 }) + Name (_PRT, Package (0x08) + { + Package (0x04) { 0x0002FFFF, Zero, Zero, 0x12 }, + Package (0x04) { 0x0002FFFF, One, Zero, 0x13 }, + Package (0x04) { 0x0002FFFF, 0x02, Zero, 0x11 }, + Package (0x04) { 0x0002FFFF, 0x03, Zero, 0x10 }, + Package (0x04) { 0x0003FFFF, Zero, Zero, 0x13 }, + Package (0x04) { 0x0003FFFF, One, Zero, 0x12 }, + Package (0x04) { 0x0003FFFF, 0x02, Zero, 0x15 }, + Package (0x04) { 0x0003FFFF, 0x03, Zero, 0x16 } + }) } - Method (GDSP, 1, Serialized) + Device (LPCB) { - CreateDWordField (Arg0, Zero, ACTN) - Return (Zero) - } + Name (_ADR, 0x001F0000) + OperationRegion (LPC1, PCI_Config, 0xAE, One) + Field (LPC1, AnyAcc, NoLock, Preserve) + { + XUSB, 1 + } - Method (DEVS, 1, Serialized) - { - CreateDWordField (Arg0, Zero, DVID) - CreateDWordField (Arg0, 0x04, CPAR) - Name (_T_0, Zero) - Store (DVID, _T_0) - If (LEqual (_T_0, Zero)) + OperationRegion (LPC0, PCI_Config, 0xF0, 0xC0) + Field (LPC0, AnyAcc, NoLock, Preserve) { - Return (Zero) + RAEN, 1, + , 13, + RCBA, 18 } - Else + + OperationRegion (SMIE, SystemIO, PMBS, 0x02) // PM1_STS—Power Management 1 Status Register (). + Field (SMIE, ByteAcc, NoLock, Preserve) { - Return (Zero) + , 10, + RTCS, 1 // Bit 10 - RTC Status (see page 520). } - } - Method (DSTS, 1, Serialized) - { - CreateDWordField (Arg0, Zero, DVID) - Name (_T_0, Zero) - Store (DVID, _T_0) - If (LEqual (_T_0, 0xA0000000)) + OperationRegion (SLPR, SystemIO, SMCR, 0x08) + Field (SLPR, ByteAcc, NoLock, Preserve) { - Store (One, Local0) + , 4, + SLPE, 1, + , 31, + SLPX, 1 } - Else + + OperationRegion (GPBX, SystemIO, GPBS, 0x1C) + Field (GPBX, ByteAcc, NoLock, Preserve) { - If (LEqual (_T_0, Zero)) - { - Return (Zero) + Offset (0x18), + , 27, + PLED, 1 + } + + Method (SWAK, 1, NotSerialized) + { + Store (Zero, SLPE) + If (LNot (RTCS)) + { + Notify (PWRB, 0x02) } - Else + } + + Device (FWHD) + { + Name (_HID, EisaId ("INT0800")) + Name (_CRS, ResourceTemplate () { - Store (Zero, Local0) - } + Memory32Fixed (ReadOnly, 0xFF000000, 0x01000000, ) + }) } - And (Local0, 0x0007FFFF, Local0) - Return (Local0) - } + Device (HPET) + { + Name (_HID, EisaId ("PNP0103")) + Name (_UID, Zero) + Name (_STA, 0x0F) + Name (_CRS, ResourceTemplate () + { + Memory32Fixed (ReadWrite, 0xFED00000, 0x00000400, ) + }) + } - Method (GPID, 0, Serialized) - { - Return (Zero) - } + Device (IPIC) + { + Name (_HID, EisaId ("PNP0000")) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, 0x0020, 0x0020, 0x01, 0x02, ) + IO (Decode16, 0x0024, 0x0024, 0x01, 0x02, ) + IO (Decode16, 0x0028, 0x0028, 0x01, 0x02, ) + IO (Decode16, 0x002C, 0x002C, 0x01, 0x02, ) + IO (Decode16, 0x0030, 0x0030, 0x01, 0x02, ) + IO (Decode16, 0x0034, 0x0034, 0x01, 0x02, ) + IO (Decode16, 0x0038, 0x0038, 0x01, 0x02, ) + IO (Decode16, 0x003C, 0x003C, 0x01, 0x02, ) + IO (Decode16, 0x00A0, 0x00A0, 0x01, 0x02, ) + IO (Decode16, 0x00A4, 0x00A4, 0x01, 0x02, ) + IO (Decode16, 0x00A8, 0x00A8, 0x01, 0x02, ) + IO (Decode16, 0x00AC, 0x00AC, 0x01, 0x02, ) + IO (Decode16, 0x00B0, 0x00B0, 0x01, 0x02, ) + IO (Decode16, 0x00B4, 0x00B4, 0x01, 0x02, ) + IO (Decode16, 0x00B8, 0x00B8, 0x01, 0x02, ) + IO (Decode16, 0x00BC, 0x00BC, 0x01, 0x02, ) + IO (Decode16, 0x04D0, 0x04D0, 0x01, 0x02, ) + IRQNoFlags () {2} + }) + } - Method (KBFT, 1, Serialized) - { - Return (Zero) - } + Device (LDRC) + { + Name (_HID, EisaId ("PNP0C02")) + Name (_UID, 0x02) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, 0x002E, 0x002E, 0x01, 0x02, ) + IO (Decode16, 0x004E, 0x004E, 0x01, 0x02, ) + IO (Decode16, 0x0061, 0x0061, 0x01, 0x01, ) + IO (Decode16, 0x0063, 0x0063, 0x01, 0x01, ) + IO (Decode16, 0x0065, 0x0065, 0x01, 0x01, ) + IO (Decode16, 0x0067, 0x0067, 0x01, 0x01, ) + IO (Decode16, 0x0070, 0x0070, 0x01, 0x01, ) + IO (Decode16, 0x0080, 0x0080, 0x01, 0x01, ) + IO (Decode16, 0x0092, 0x0092, 0x01, 0x01, ) + IO (Decode16, 0x00B2, 0x00B2, 0x01, 0x02, ) + IO (Decode16, 0x0680, 0x0680, 0x01, 0x20, ) + IO (Decode16, 0x0200, 0x0200, 0x01, 0x10, ) + IO (Decode16, 0xFFFF, 0xFFFF, 0x01, 0x01, ) + IO (Decode16, 0xFFFF, 0xFFFF, 0x01, 0x01, ) + IO (Decode16, 0x0400, 0x0400, 0x01, 0x54, ) + IO (Decode16, 0x0458, 0x0458, 0x01, 0x28, ) + IO (Decode16, 0x0500, 0x0500, 0x01, 0x80, ) + IO (Decode16, 0x164E, 0x164E, 0x01, 0x02, ) + }) + } - Method (HKEY, 0, Serialized) - { - Return (Zero) - } + Device (PDRC) + { + Name (_HID, EisaId ("PNP0C02")) + Name (_UID, One) + Name (BUF0, ResourceTemplate () + { + Memory32Fixed (ReadWrite, 0x00000000, 0x00004000, _Y10) + Memory32Fixed (ReadWrite, 0x00000000, 0x00001000, _Y11) + Memory32Fixed (ReadWrite, 0x00000000, 0x00008000, _Y12) + Memory32Fixed (ReadWrite, 0x00000000, 0x00001000, _Y13) + Memory32Fixed (ReadWrite, 0x00000000, 0x00001000, _Y14) + Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, _Y15) - Method (CFVS, 1, Serialized) - { - } + Memory32Fixed (ReadWrite, 0xFED20000, 0x00020000, ) + Memory32Fixed (ReadOnly, 0xFED90000, 0x00004000, ) + Memory32Fixed (ReadWrite, 0xFED45000, 0x0004B000, ) + Memory32Fixed (ReadOnly, 0xFF000000, 0x01000000, ) + Memory32Fixed (ReadOnly, 0xFEE00000, 0x00100000, ) - Method (CFVG, 0, Serialized) - { - } - } - } + }) + Method (_CRS, 0, Serialized) + { + CreateDWordField (BUF0, ^_Y10._BAS, RBR0) + ShiftLeft (RCBA, 0x0E, RBR0) + CreateDWordField (BUF0, ^_Y11._BAS, TBR0) + Store (TBAB, TBR0) + CreateDWordField (BUF0, ^_Y11._LEN, TBLN) + If (LEqual (TBAB, Zero)) + { + Store (Zero, TBLN) + } + + CreateDWordField (BUF0, ^_Y12._BAS, MBR0) + ShiftLeft (MHBR, 0x0F, MBR0) + CreateDWordField (BUF0, ^_Y13._BAS, DBR0) + ShiftLeft (DIBR, 0x0C, DBR0) + CreateDWordField (BUF0, ^_Y14._BAS, EBR0) + ShiftLeft (EPBR, 0x0C, EBR0) + CreateDWordField (BUF0, ^_Y15._BAS, XBR0) + ShiftLeft (PXBR, 0x1A, XBR0) + CreateDWordField (BUF0, ^_Y15._LEN, XSZ0) + ShiftRight (0x10000000, PXSZ, XSZ0) + Return (BUF0) + } + } - Scope (_SB) - { - Name (RAMB, 0xDAB94018) - OperationRegion (\RAMW, SystemMemory, RAMB, 0x00010000) - Field (RAMW, ByteAcc, NoLock, Preserve) - { - DSAF, 256, - PAR0, 32, - PAR1, 32, - PAR2, 32, - PINX, 32, - PADD, 2048 - } + Device (RTC) + { + Name (_HID, EisaId ("PNP0B00")) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, 0x0070, 0x0070, 0x01, 0x08, ) + IRQNoFlags () {8} + }) + } - Mutex (MPAR, 0x00) - Name (ARBF, Buffer (0x10) {}) - CreateDWordField (ARBF, Zero, REAX) - CreateDWordField (ARBF, 0x04, REBX) - CreateDWordField (ARBF, 0x08, RECX) - CreateDWordField (ARBF, 0x0C, REDX) - OperationRegion (IOB2, SystemIO, SMIP, 0x02) - Field (IOB2, ByteAcc, NoLock, Preserve) - { - SMIC, 8, - SMIS, 8 - } + Device (TIMR) + { + Name (_HID, EisaId ("PNP0100")) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, 0x0040, 0x0040, 0x01, 0x04, ) + IO (Decode16, 0x0050, 0x0050, 0x10, 0x04, ) + IRQNoFlags () {0} + }) + } - Method (ISMI, 1, Serialized) - { - Store (Arg0, SMIC) - } + Device (EC) + { + Name (_HID, EisaId ("PNP0C09")) + Name (_GPE, 0x18) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, 0x0062, 0x0062, 0x00, 0x01, ) + IO (Decode16, 0x0066, 0x0066, 0x00, 0x01, ) + }) + } - Method (GMSR, 1, Serialized) - { - If (LEqual (Acquire (MPAR, 0xFFFF), Zero)) - { - Store (0x80000000, PINX) - Store (Arg0, PAR0) - ISMI (0x90) - Store (Arg0, RECX) - Store (PAR1, REAX) - Store (PAR2, REDX) - Release (MPAR) - Return (ARBF) + Device (MATH) + { + Name (_HID, EisaId ("PNP0C04")) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, 0x00F0, 0x00F0, 0x00, 0x10, ) + IRQNoFlags () {13} + }) + } } - Return (Ones) - } - - Method (SMSR, 1, Serialized) - { - If (LEqual (Acquire (MPAR, 0xFFFF), Zero)) + Device (SATA) { - CreateDWordField (Arg0, Zero, AEAX) - CreateDWordField (Arg0, 0x04, AEBX) - CreateDWordField (Arg0, 0x08, AECX) - CreateDWordField (Arg0, 0x0C, AEDX) - Store (0x80000001, PINX) - Store (AECX, PAR0) - Store (AEAX, PAR1) - Store (AEDX, PAR2) - ISMI (0x90) - Release (MPAR) + Name (_ADR, 0x001F0002) } - Return (Ones) - } - - Method (PRID, 1, Serialized) - { - If (LEqual (Acquire (MPAR, 0xFFFF), Zero)) + Device (SBUS) { - Store (0x80000002, PINX) - Store (Arg0, PAR0) - ISMI (0x90) - Store (PAR1, REAX) - Store (PAR2, REDX) - Release (MPAR) - Return (ARBF) + Name (_ADR, 0x001F0003) + Device (BUS0) + { + Name (_CID, "smbus") + Name (_ADR, Zero) + Device (DVL0) + { + Name (_ADR, 0x57) + Name (_CID, "diagsvault") + } + } } + } - Return (Ones) + Device (PWRB) + { + Name (_HID, EisaId ("PNP0C0C")) + Name (_UID, 0xAA) + Name (_STA, 0x0B) + Name (_PRW, Package (0x02) { 0x1D, 0x04 }) } + } - Method (GPRE, 1, Serialized) + Scope (_GPE) + { + Method (_L01, 0, NotSerialized) { - Store (Arg0, PAR0) - Store (0x80000005, PINX) - ISMI (0x90) - Return (PAR0) + Add (L01C, One, L01C) + P8XH (Zero, One) + P8XH (One, L01C) } - Method (GNVS, 1, Serialized) + Method (_L02, 0, NotSerialized) { - Store (Arg0, PAR0) - Store (0x80000003, PINX) - ISMI (0x90) - Return (PAR1) + Store (Zero, GPEC) } - Method (SNVS, 2, Serialized) + Method (_L09, 0, NotSerialized) { - Store (Arg0, PAR0) - Store (Arg1, PAR1) - Store (0x80000004, PINX) - ISMI (0x90) + Notify (\_SB.PCI0.PEG0, 0x02) + Notify (\_SB.PCI0.PEG0.PEGP, 0x02) + Notify (\_SB.PCI0.PEG1, 0x02) + Notify (\_SB.PCI0.PEG2, 0x02) + Notify (\_SB.PCI0.PEG3, 0x02) } - Method (SARM, 1, Serialized) + Method (_L0B, 0, NotSerialized) { - If (LAnd (LGreater (Arg0, 0x03), LLess (Arg0, 0x06))) - { - ISMI (0x92) - } + Notify (\_SB.PCI0.P0P1, 0x02) + Notify (\_SB.PWRB, 0x02) } - Method (GAMM, 0, Serialized) + Method (_L0D, 0, NotSerialized) { - ISMI (0x91) + Notify (\_SB.PCI0.EHC1, 0x02) + Notify (\_SB.PCI0.EHC2, 0x02) + Notify (\_SB.PCI0.HDEF, 0x02) + Notify (\_SB.PCI0.GIGE, 0x02) } - Method (SAMM, 0, Serialized) + Method (_L1D, 0, NotSerialized) { - ISMI (0x92) + Notify (\_SB.PWRB, 0x02) } } - Scope (_SB.PCI0.LPCB) + Name (_S0, Package (0x03) { Zero, Zero, Zero }) + Name (_S3, Package (0x03) { 0x05, 0x05, Zero }) + Name (_S4, Package (0x03) { 0x06, 0x06, Zero }) + Name (_S5, Package (0x03) { 0x07, 0x07, Zero }) + + Method (P8XH, 2, Serialized) { - Method (S1RS, 1, NotSerialized) + If (LEqual (Arg0, Zero)) { - Store (Zero, PLED) + Store (Or (And (P80D, 0xFFFFFF00), Arg1), P80D) } - OperationRegion (GPBX, SystemIO, GPBS, GPLN) - Field (GPBX, ByteAcc, NoLock, Preserve) + If (LEqual (Arg0, One)) { - Offset (0x18), - , 27, - PLED, 1 + Store (Or (And (P80D, 0xFFFF00FF), ShiftLeft (Arg1, 0x08) + ), P80D) } - } - Scope (_SB.PCI0.LPCB) - { - Device (H_EC) + If (LEqual (Arg0, 0x02)) { - Name (_HID, EisaId ("PNP0C09")) - Name (_UID, One) - Method (_STA, 0, NotSerialized) - { - Store (0x03, ^^^GFX0.CLID) - Return (Zero) - } - - Name (B1CC, Zero) - Name (B1ST, Zero) - Name (B2CC, Zero) - Name (B2ST, Zero) - Name (CFAN, Zero) - Name (CMDR, Zero) - Name (DOCK, Zero) - Name (EJET, Zero) - Name (MCAP, Zero) - Name (PLMX, Zero) - Name (PECH, Zero) - Name (PECL, Zero) - Name (PENV, Zero) - Name (PINV, Zero) - Name (PPSH, Zero) - Name (PPSL, Zero) - Name (PSTP, Zero) - Name (RPWR, Zero) - Name (LSTE, Zero) - Name (SLPC, Zero) - Name (VPWR, Zero) - Method (ECMD, 1, Serialized) - { - If (ECON) - { - While (CMDR) - { - Stall (0x14) - } - - Store (Arg0, CMDR) - } - } - - Device (BAT0) - { - Name (_HID, EisaId ("PNP0C0A")) - Name (_UID, Zero) - Method (_STA, 0, NotSerialized) - { - Return (Zero) - } - } - - Scope (\) - { - Field (GNVS, AnyAcc, Lock, Preserve) - { - Offset (0x1E), - BNUM, 8, - Offset (0x20), - B1SC, 8, - Offset (0x23), - B1SS, 8 - } - } - - Device (BAT1) - { - Name (_HID, EisaId ("PNP0C0A")) - Name (_UID, One) - Method (_STA, 0, NotSerialized) - { - Return (Zero) - } - } - - Scope (\) - { - Field (GNVS, AnyAcc, Lock, Preserve) - { - Offset (0x21), - B2SC, 8, - Offset (0x24), - B2SS, 8 - } - } - - Device (BAT2) - { - Name (_HID, EisaId ("PNP0C0A")) - Name (_UID, 0x02) - Method (_STA, 0, NotSerialized) - { - Return (Zero) - } - } + Store (Or (And (P80D, 0xFF00FFFF), ShiftLeft (Arg1, 0x10) + ), P80D) } - } - Device (_SB.PCI0.DOCK) - { - Name (_HID, "ABCDEFGH") - Name (_CID, EisaId ("PNP0C15")) - Name (_UID, 0x02) - Method (_STA, 0, NotSerialized) + If (LEqual (Arg0, 0x03)) { - Return (Zero) + Store (Or (And (P80D, 0x00FFFFFF), ShiftLeft (Arg1, 0x18) + ), P80D) } + + Store (P80D, P80H) } - Scope (_SB) + Method (_PTS, 1, NotSerialized) { - Device (LID0) + Store (Zero, P80D) + P8XH (Zero, Arg0) + If (Arg0) { - Name (_HID, EisaId ("PNP0C0D")) - Method (_STA, 0, NotSerialized) + Store (One, \_SB.PCI0.LPCB.SLPX) + Store (One, \_SB.PCI0.LPCB.SLPE) + If (LAnd (LGreater (Arg0, 0x03), LLess (Arg0, 0x06))) { - Return (Zero) + Store (Arg0, \_SB.SMIC) + Store (One, GP27) } } } - Name (_S0, Package (0x04) - { - Zero, - Zero, - Zero, - Zero - }) - If (SS1) - { - Name (_S1, Package (0x04) - { - One, - Zero, - Zero, - Zero - }) - } - - If (SS3) - { - Name (_S3, Package (0x04) - { - 0x05, - Zero, - Zero, - Zero - }) - } - - If (SS4) + Method (_WAK, 1, Serialized) { - Name (_S4, Package (0x04) + ShiftLeft (Arg0, 0x04, DBG8) + \_SB.PCI0.LPCB.SWAK (Arg0) + Store (Zero, \_SB.PCI0.LPCB.PLED) + Return (Package (0x02) { - 0x06, - Zero, Zero, Zero }) } - - Name (_S5, Package (0x04) - { - 0x07, - Zero, - Zero, - Zero - }) - Method (PTS, 1, NotSerialized) - { - If (Arg0) - { - \_SB.PCI0.LPCB.SPTS (Arg0) - \_SB.PCI0.NPTS (Arg0) - \_SB.SARM (Arg0) - \_SB.PCI0.LPCB.SIOS (Arg0) - } - } - - Method (WAK, 1, NotSerialized) - { - \_SB.PCI0.LPCB.SWAK (Arg0) - \_SB.PCI0.NWAK (Arg0) - \_SB.PCI0.LPCB.S1RS (Arg0) - \_SB.PCI0.LPCB.SIOW (Arg0) - } } - From 486c8dc209ae75c13c44257594620f23cb829b9c Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 23 Mar 2013 17:41:05 +0100 Subject: [PATCH 338/623] Show warnings for Sandy Bridge systems --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index d03da14..4e4fad0 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 5.7 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 5.8 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -63,6 +63,7 @@ # - Command line argument for processor labels added (Pike, March 2013) # - Bug fix, overriding the cpu type displayed the wrong name (Jeroen, March 2013) # - Automatic detection of CPU scopes added (Pike, March 2013) +# - Show warnings for Sandy Bridge systems as well (Jeroen, March 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -159,7 +160,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=5.7 +gScriptVersion=5.8 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -1832,7 +1833,7 @@ function main() # # Some IB CPUPM specific configuration checks # - if [ $gBridgeType -eq $IVY_BRIDGE ]; + if [ $gBridgeType -ne $HASWELL ]; then if [ ${cpu_type:0:2} -ne $cpuTypeString ]; then echo -e "\nWarning: 'cpu-type' may be set improperly (0x$cpu_type instead of 0x$cpuTypeString${cpu_type:2:2})" From c0c8313897bab4b9fbe869307dc5649dd3c16b99 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 23 Mar 2013 18:55:27 +0100 Subject: [PATCH 339/623] Example SSDT --- .../acpi/examples/P8Z68-V PRO/ssdt.dsl | 313 ++++++++++++++++++ 1 file changed, 313 insertions(+) create mode 100644 i386/libsaio/acpi/examples/P8Z68-V PRO/ssdt.dsl diff --git a/i386/libsaio/acpi/examples/P8Z68-V PRO/ssdt.dsl b/i386/libsaio/acpi/examples/P8Z68-V PRO/ssdt.dsl new file mode 100644 index 0000000..f2f4ab4 --- /dev/null +++ b/i386/libsaio/acpi/examples/P8Z68-V PRO/ssdt.dsl @@ -0,0 +1,313 @@ +/* + * Intel ACPI Component Architecture + * AML Disassembler version 20110316-64 [Mar 16 2011] + * Copyright (c) 2000 - 2011 Intel Corporation + * + * Disassembly of /ssdt.aml, Mon Jan 21 08:31:48 2013 + * + * Original Table Header: + * Signature "SSDT" + * Length 0x0000031A (794) + * Revision 0x01 + * Checksum 0x77 + * OEM ID "APPLE " + * OEM Table ID "general" + * OEM Revision 0x00001000 (4096) + * Compiler ID "INTL" + * Compiler Version 0x20110316 (537985814) + */ + +DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) +{ + External (HPTC, IntObj) + External (SBV1, IntObj) + External (SBV2, IntObj) + + External (\_SB_.PCI0, DeviceObj) + External (\_SB_.PCI0.RP02, DeviceObj) + External (\_SB_.PCI0.RP04, DeviceObj) + External (\_SB_.PCI0.RP05, DeviceObj) + External (\_SB_.PCI0.RP07, DeviceObj) + + External (\_SB_.PCI0.EHC1, DeviceObj) + External (\_SB_.PCI0.EHC1.HUBN, DeviceObj) + External (\_SB_.PCI0.EHC1.HUBN.PR01, DeviceObj) + External (\_SB_.PCI0.EHC1.HUBN.PR01.PR14, DeviceObj) + External (\_SB_.PCI0.EHC1.HUBN.PR01.PR15, DeviceObj) + External (\_SB_.PCI0.EHC1.HUBN.PR01.PR16, DeviceObj) + External (\_SB_.PCI0.EHC1.HUBN.PR01.PR17, DeviceObj) + + External (\_SB_.PCI0.EHC2, DeviceObj) + External (\_SB_.PCI0.EHC2.HUBN, DeviceObj) + External (\_SB_.PCI0.EHC2.HUBN.PR01, DeviceObj) + External (\_SB_.PCI0.EHC2.HUBN.PR01.PR12, DeviceObj) + External (\_SB_.PCI0.EHC2.HUBN.PR01.PR13, DeviceObj) + + External (\_SB_.PCI0.LPCB, DeviceObj) + External (\_SB_.PCI0.LPCB.HPET, DeviceObj) + + Scope (\) + { + Scope (_SB) + { + Scope (PCI0) + { + Scope (EHC2) + { + Name (AAPL, Package (0x0B) + { + "AAPL,current-available", + 0x0834, + "AAPL,current-extra", + 0x0898, + "AAPL,current-extra-in-sleep", + 0x0640, + "AAPL,max-port-current-in-sleep", + 0x0834, + "AAPL,device-internal", + 0x02, + Buffer (One) { 0x00 } + }) + + Method (_DSM, 4, NotSerialized) + { + If (LEqual (Arg2, Zero)) + { + Return (Buffer (One) { 0x03 }) + } + + Return (RefOf (AAPL)) + } + + Scope (HUBN) + { + Scope (PR01) + { + Scope (PR12) + { + Alias (SBV1, SDGV) + + Method (_DSM, 4, Serialized) + { + Name (T_0, Zero) + Store (ToInteger (Arg2), T_0) + + If (LEqual (T_0, Zero)) + { + Return (Buffer (One) + { + 0x07 + }) + } + ElseIf (LEqual (T_0, One)) + { + If (LNotEqual (SDGV, 0xFF)) + { + Return (One) + } + } + ElseIf (LEqual (T_0, 0x02)) + { + Return (SDGV) + } + + Return (Zero) + } + } + + Scope (PR13) + { + Alias (SBV2, SDGV) + + Method (_DSM, 4, Serialized) + { + Return (^^PR12._DSM (Arg0, Arg1, Arg2, Arg3)) + } + } + } + } + } + + Scope (RP02) + { + Device (XHC1) + { + Name (_ADR, Zero) + } + } + + Scope (RP04) + { + Device (JMB0) + { + Name (_ADR, Zero) + OperationRegion (CF40, PCI_Config, 0x40, 0x04) + Field (CF40, ByteAcc, NoLock, Preserve) + { + CHE0, 1, + MULT, 1, + , 1, + CAB0, 1, + CHE1, 1, + Offset (0x01), + AHEN, 1, + , 3, + PRT0, 1, + AHM0, 1, + PRT1, 1, + AHM1, 1, + CF42, 6, + SWAP, 1, + PATA, 1, + , 6, + WTEN, 1, + Offset (0x04) + } + } + + Device (JMB1) + { + Name (_ADR, One) + OperationRegion (CF40, PCI_Config, 0x40, 0x04) + Field (CF40, ByteAcc, NoLock, Preserve) + { + CHE0, 1, + MULT, 1, + , 1, + CAB0, 1, + CHE1, 1, + Offset (0x01), + AHEN, 1, + , 3, + PRT0, 1, + AHM0, 1, + PRT1, 1, + AHM1, 1, + CF42, 6, + SWAP, 1, + PATA, 1, + , 6, + WTEN, 1, + Offset (0x04) + } + } + } + + Scope (RP05) + { + Device (XHC2) + { + Name (_ADR, Zero) + } + } + + Scope (RP07) + { + Device (FWBR) + { + Name (_ADR, Zero) + Name (_PRW, Package (0x02) { 0x0B, 0x04 }) + Name (_PRT, Package (0x0C) + { + Package (0x04) { 0xFFFF, Zero, Zero, 0x12 }, + Package (0x04) { 0xFFFF, One, Zero, 0x13 }, + Package (0x04) { 0xFFFF, 0x02, Zero, 0x10 }, + Package (0x04) { 0xFFFF, 0x03, Zero, 0x11 }, + Package (0x04) { 0x0001FFFF, Zero, Zero, 0x13 }, + Package (0x04) { 0x0001FFFF, One, Zero, 0x10 }, + Package (0x04) { 0x0001FFFF, 0x02, Zero, 0x11 }, + Package (0x04) { 0x0001FFFF, 0x03, Zero, 0x12 }, + Package (0x04) { 0x0002FFFF, Zero, Zero, 0x11 }, + Package (0x04) { 0x0002FFFF, One, Zero, 0x12 }, + Package (0x04) { 0x0002FFFF, 0x02, Zero, 0x13 }, + Package (0x04) { 0x0002FFFF, 0x03, Zero, 0x10 } + }) + + Device (FRWR) + { + Name (_ADR, 0x00020000) + } + } + } + + Scope (EHC1) + { + Method (_DSM, 4, NotSerialized) + { + If (LEqual (Arg2, Zero)) + { + Return (Buffer (One) { 0x03 }) + } + + Return (RefOf (^^EHC2.AAPL)) + } + + Scope (HUBN) + { + Scope (PR01) + { + Scope (PR14) + { + Alias (SBV1, SDGV) + + Method (_DSM, 4, Serialized) + { + Return (\_SB.PCI0.EHC2.HUBN.PR01.PR12._DSM (Arg0, Arg1, Arg2, Arg3)) + } + } + + Scope (PR15) + { + Alias (SBV2, SDGV) + + Method (_DSM, 4, Serialized) + { + Return (\_SB.PCI0.EHC2.HUBN.PR01.PR12._DSM (Arg0, Arg1, Arg2, Arg3)) + } + } + + Scope (PR16) + { + Alias (SBV1, SDGV) + + Method (_DSM, 4, Serialized) + { + Return (\_SB.PCI0.EHC2.HUBN.PR01.PR12._DSM (Arg0, Arg1, Arg2, Arg3)) + } + } + + Scope (PR17) + { + Alias (SBV2, SDGV) + + Method (_DSM, 4, Serialized) + { + Return (\_SB.PCI0.EHC2.HUBN.PR01.PR12._DSM (Arg0, Arg1, Arg2, Arg3)) + } + } + } + } + } + + Scope (LPCB) + { + Scope (HPET) + { + OperationRegion (RCRB, SystemMemory, HPTC, One) + Field (RCRB, ByteAcc, Lock, Preserve) + { + , 7, + HPAE, 1 + } + + Method (_INI, 0, NotSerialized) + { + Store (One, HPAE) + } + } + } + } + } + } +} + From a667d99bd97438332fad5b3f25e383dc59eca330 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 23 Mar 2013 19:51:31 +0100 Subject: [PATCH 340/623] Oops --- i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl b/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl index 9a0bd03..5b5f4fd 100644 --- a/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl +++ b/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl @@ -44,7 +44,10 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "APPLE", "Macmini", 0x00050001) Offset (0x3C), IGDS, 8, Offset (0xAA), - ASLB, 32, + ASLB, 32, + Offset (0xE3), + SBV1, 8, + SBV2, 8, Offset (0xEF), L01C, 8, Offset (0x15F), From dd7a2bc9fc1c16f99b086623b5b7f70667e0311c Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 25 Mar 2013 08:20:02 +0100 Subject: [PATCH 341/623] Scope changes iasl -e /Extra/ACPI/dsdt.aml ssdt.dsl --- .../acpi/examples/P8Z68-V PRO/ssdt.dsl | 502 ++++++++---------- 1 file changed, 232 insertions(+), 270 deletions(-) diff --git a/i386/libsaio/acpi/examples/P8Z68-V PRO/ssdt.dsl b/i386/libsaio/acpi/examples/P8Z68-V PRO/ssdt.dsl index f2f4ab4..04ad8b8 100644 --- a/i386/libsaio/acpi/examples/P8Z68-V PRO/ssdt.dsl +++ b/i386/libsaio/acpi/examples/P8Z68-V PRO/ssdt.dsl @@ -1,312 +1,274 @@ /* * Intel ACPI Component Architecture - * AML Disassembler version 20110316-64 [Mar 16 2011] - * Copyright (c) 2000 - 2011 Intel Corporation + * AML Disassembler version 20130214-64 [Mar 24 2013] + * Copyright (c) 2000 - 2013 Intel Corporation * - * Disassembly of /ssdt.aml, Mon Jan 21 08:31:48 2013 + * Disassembly of ssdt.aml, Mon Mar 25 08:07:55 2013 * * Original Table Header: * Signature "SSDT" - * Length 0x0000031A (794) + * Length 0x000004FF (1279) * Revision 0x01 - * Checksum 0x77 + * Checksum 0x72 * OEM ID "APPLE " * OEM Table ID "general" * OEM Revision 0x00001000 (4096) * Compiler ID "INTL" - * Compiler Version 0x20110316 (537985814) + * Compiler Version 0x20130214 (538116628) */ - DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) { + External (_SB_.PCI0, DeviceObj) + External (_SB_.PCI0.EHC1, DeviceObj) + External (_SB_.PCI0.EHC1.HUBN.PR01.PR14, DeviceObj) + External (_SB_.PCI0.EHC1.HUBN.PR01.PR15, DeviceObj) + External (_SB_.PCI0.EHC1.HUBN.PR01.PR16, DeviceObj) + External (_SB_.PCI0.EHC1.HUBN.PR01.PR17, DeviceObj) + External (_SB_.PCI0.EHC2, DeviceObj) + External (_SB_.PCI0.EHC2.HUBN.PR01.PR12, DeviceObj) + External (_SB_.PCI0.EHC2.HUBN.PR01.PR13, DeviceObj) + External (_SB_.PCI0.LPCB.HPET, DeviceObj) + External (_SB_.PCI0.RP02, DeviceObj) + External (_SB_.PCI0.RP04, DeviceObj) + External (_SB_.PCI0.RP05, DeviceObj) + External (_SB_.PCI0.RP07, DeviceObj) External (HPTC, IntObj) - External (SBV1, IntObj) - External (SBV2, IntObj) - - External (\_SB_.PCI0, DeviceObj) - External (\_SB_.PCI0.RP02, DeviceObj) - External (\_SB_.PCI0.RP04, DeviceObj) - External (\_SB_.PCI0.RP05, DeviceObj) - External (\_SB_.PCI0.RP07, DeviceObj) - - External (\_SB_.PCI0.EHC1, DeviceObj) - External (\_SB_.PCI0.EHC1.HUBN, DeviceObj) - External (\_SB_.PCI0.EHC1.HUBN.PR01, DeviceObj) - External (\_SB_.PCI0.EHC1.HUBN.PR01.PR14, DeviceObj) - External (\_SB_.PCI0.EHC1.HUBN.PR01.PR15, DeviceObj) - External (\_SB_.PCI0.EHC1.HUBN.PR01.PR16, DeviceObj) - External (\_SB_.PCI0.EHC1.HUBN.PR01.PR17, DeviceObj) - - External (\_SB_.PCI0.EHC2, DeviceObj) - External (\_SB_.PCI0.EHC2.HUBN, DeviceObj) - External (\_SB_.PCI0.EHC2.HUBN.PR01, DeviceObj) - External (\_SB_.PCI0.EHC2.HUBN.PR01.PR12, DeviceObj) - External (\_SB_.PCI0.EHC2.HUBN.PR01.PR13, DeviceObj) + External (SBV1, FieldUnitObj) + External (SBV2, FieldUnitObj) - External (\_SB_.PCI0.LPCB, DeviceObj) - External (\_SB_.PCI0.LPCB.HPET, DeviceObj) - - Scope (\) + Scope (\_SB.PCI0) { - Scope (_SB) + Method (EHCN, 2, NotSerialized) { - Scope (PCI0) + Name (T_0, Zero) + Store (ToInteger (Arg1), T_0) + + If (LEqual (T_0, Zero)) { - Scope (EHC2) + Return (Buffer (One) { - Name (AAPL, Package (0x0B) - { - "AAPL,current-available", - 0x0834, - "AAPL,current-extra", - 0x0898, - "AAPL,current-extra-in-sleep", - 0x0640, - "AAPL,max-port-current-in-sleep", - 0x0834, - "AAPL,device-internal", - 0x02, - Buffer (One) { 0x00 } - }) - - Method (_DSM, 4, NotSerialized) - { - If (LEqual (Arg2, Zero)) - { - Return (Buffer (One) { 0x03 }) - } - - Return (RefOf (AAPL)) - } - - Scope (HUBN) - { - Scope (PR01) - { - Scope (PR12) - { - Alias (SBV1, SDGV) - - Method (_DSM, 4, Serialized) - { - Name (T_0, Zero) - Store (ToInteger (Arg2), T_0) - - If (LEqual (T_0, Zero)) - { - Return (Buffer (One) - { - 0x07 - }) - } - ElseIf (LEqual (T_0, One)) - { - If (LNotEqual (SDGV, 0xFF)) - { - Return (One) - } - } - ElseIf (LEqual (T_0, 0x02)) - { - Return (SDGV) - } - - Return (Zero) - } - } - - Scope (PR13) - { - Alias (SBV2, SDGV) - - Method (_DSM, 4, Serialized) - { - Return (^^PR12._DSM (Arg0, Arg1, Arg2, Arg3)) - } - } - } - } - } - - Scope (RP02) + 0x07 + }) + } + ElseIf (LEqual (T_0, One)) + { + If (LNotEqual (Arg0, 0xFF)) { - Device (XHC1) - { - Name (_ADR, Zero) - } + Return (One) } + } + ElseIf (LEqual (T_0, 0x02)) + { + Return (Arg0) + } - Scope (RP04) - { - Device (JMB0) - { - Name (_ADR, Zero) - OperationRegion (CF40, PCI_Config, 0x40, 0x04) - Field (CF40, ByteAcc, NoLock, Preserve) - { - CHE0, 1, - MULT, 1, - , 1, - CAB0, 1, - CHE1, 1, - Offset (0x01), - AHEN, 1, - , 3, - PRT0, 1, - AHM0, 1, - PRT1, 1, - AHM1, 1, - CF42, 6, - SWAP, 1, - PATA, 1, - , 6, - WTEN, 1, - Offset (0x04) - } - } + Return (Zero) + } + } - Device (JMB1) - { - Name (_ADR, One) - OperationRegion (CF40, PCI_Config, 0x40, 0x04) - Field (CF40, ByteAcc, NoLock, Preserve) - { - CHE0, 1, - MULT, 1, - , 1, - CAB0, 1, - CHE1, 1, - Offset (0x01), - AHEN, 1, - , 3, - PRT0, 1, - AHM0, 1, - PRT1, 1, - AHM1, 1, - CF42, 6, - SWAP, 1, - PATA, 1, - , 6, - WTEN, 1, - Offset (0x04) - } - } - } + Scope (\_SB.PCI0.EHC2) + { + Name (AAPL, Package (0x0B) + { + "AAPL,current-available", + 0x0834, + "AAPL,current-extra", + 0x0898, + "AAPL,current-extra-in-sleep", + 0x0640, + "AAPL,max-port-current-in-sleep", + 0x0834, + "AAPL,device-internal", + 0x02, + Buffer (One) { 0x00 } + }) + + Method (_DSM, 4, NotSerialized) + { + If (LEqual (Arg2, Zero)) + { + Return (Buffer (One) { 0x03 }) + } - Scope (RP05) - { - Device (XHC2) - { - Name (_ADR, Zero) - } - } + Return (RefOf (AAPL)) + } + } - Scope (RP07) - { - Device (FWBR) - { - Name (_ADR, Zero) - Name (_PRW, Package (0x02) { 0x0B, 0x04 }) - Name (_PRT, Package (0x0C) - { - Package (0x04) { 0xFFFF, Zero, Zero, 0x12 }, - Package (0x04) { 0xFFFF, One, Zero, 0x13 }, - Package (0x04) { 0xFFFF, 0x02, Zero, 0x10 }, - Package (0x04) { 0xFFFF, 0x03, Zero, 0x11 }, - Package (0x04) { 0x0001FFFF, Zero, Zero, 0x13 }, - Package (0x04) { 0x0001FFFF, One, Zero, 0x10 }, - Package (0x04) { 0x0001FFFF, 0x02, Zero, 0x11 }, - Package (0x04) { 0x0001FFFF, 0x03, Zero, 0x12 }, - Package (0x04) { 0x0002FFFF, Zero, Zero, 0x11 }, - Package (0x04) { 0x0002FFFF, One, Zero, 0x12 }, - Package (0x04) { 0x0002FFFF, 0x02, Zero, 0x13 }, - Package (0x04) { 0x0002FFFF, 0x03, Zero, 0x10 } - }) + Scope (\_SB.PCI0.EHC2.HUBN.PR01.PR12) + { + Method (_DSM, 4, Serialized) + { + Return (\_SB.PCI0.EHCN (SBV1, Arg2)) + } + } - Device (FRWR) - { - Name (_ADR, 0x00020000) - } - } - } + Scope (\_SB.PCI0.EHC2.HUBN.PR01.PR13) + { + Method (_DSM, 4, Serialized) + { + Return (\_SB.PCI0.EHCN (SBV2, Arg2)) + } + } - Scope (EHC1) - { - Method (_DSM, 4, NotSerialized) - { - If (LEqual (Arg2, Zero)) - { - Return (Buffer (One) { 0x03 }) - } + Scope (\_SB.PCI0.RP02) + { + Device (XHC1) + { + Name (_ADR, Zero) + } + } - Return (RefOf (^^EHC2.AAPL)) - } + Scope (\_SB.PCI0.RP04) + { + Device (JMB0) + { + Name (_ADR, Zero) + OperationRegion (CF40, PCI_Config, 0x40, 0x04) + Field (CF40, ByteAcc, NoLock, Preserve) + { + CHE0, 1, + MULT, 1, + , 1, + CAB0, 1, + CHE1, 1, + Offset (0x01), + AHEN, 1, + , 3, + PRT0, 1, + AHM0, 1, + PRT1, 1, + AHM1, 1, + CF42, 6, + SWAP, 1, + PATA, 1, + , 6, + WTEN, 1, + Offset (0x04) + } + } - Scope (HUBN) - { - Scope (PR01) - { - Scope (PR14) - { - Alias (SBV1, SDGV) + Device (JMB1) + { + Name (_ADR, One) + OperationRegion (CF40, PCI_Config, 0x40, 0x04) + Field (CF40, ByteAcc, NoLock, Preserve) + { + CHE0, 1, + MULT, 1, + , 1, + CAB0, 1, + CHE1, 1, + Offset (0x01), + AHEN, 1, + , 3, + PRT0, 1, + AHM0, 1, + PRT1, 1, + AHM1, 1, + CF42, 6, + SWAP, 1, + PATA, 1, + , 6, + WTEN, 1, + Offset (0x04) + } + } + } - Method (_DSM, 4, Serialized) - { - Return (\_SB.PCI0.EHC2.HUBN.PR01.PR12._DSM (Arg0, Arg1, Arg2, Arg3)) - } - } + Scope (\_SB.PCI0.RP05) + { + Device (XHC2) + { + Name (_ADR, Zero) + } + } - Scope (PR15) - { - Alias (SBV2, SDGV) + Scope (\_SB.PCI0.RP07) + { + Device (FWBR) + { + Name (_ADR, Zero) + Name (_PRW, Package (0x02) { 0x0B, 0x04 }) + Name (_PRT, Package (0x0C) + { + Package (0x04) { 0xFFFF, Zero, Zero, 0x12 }, + Package (0x04) { 0xFFFF, One, Zero, 0x13 }, + Package (0x04) { 0xFFFF, 0x02, Zero, 0x10 }, + Package (0x04) { 0xFFFF, 0x03, Zero, 0x11 }, + Package (0x04) { 0x0001FFFF, Zero, Zero, 0x13 }, + Package (0x04) { 0x0001FFFF, One, Zero, 0x10 }, + Package (0x04) { 0x0001FFFF, 0x02, Zero, 0x11 }, + Package (0x04) { 0x0001FFFF, 0x03, Zero, 0x12 }, + Package (0x04) { 0x0002FFFF, Zero, Zero, 0x11 }, + Package (0x04) { 0x0002FFFF, One, Zero, 0x12 }, + Package (0x04) { 0x0002FFFF, 0x02, Zero, 0x13 }, + Package (0x04) { 0x0002FFFF, 0x03, Zero, 0x10 } + }) + + Device (FRWR) + { + Name (_ADR, 0x00020000) + } + } + } - Method (_DSM, 4, Serialized) - { - Return (\_SB.PCI0.EHC2.HUBN.PR01.PR12._DSM (Arg0, Arg1, Arg2, Arg3)) - } - } + Scope (\_SB.PCI0.EHC1) + { + Method (_DSM, 4, NotSerialized) + { + If (LEqual (Arg2, Zero)) + { + Return (Buffer (One) { 0x03 }) + } + + Return (RefOf (\_SB.PCI0.EHC2.AAPL)) + } + } - Scope (PR16) - { - Alias (SBV1, SDGV) + Scope (\_SB.PCI0.EHC1.HUBN.PR01.PR14) + { + Method (_DSM, 4, Serialized) + { + Return (\_SB.PCI0.EHCN (SBV1, Arg2)) + } + } - Method (_DSM, 4, Serialized) - { - Return (\_SB.PCI0.EHC2.HUBN.PR01.PR12._DSM (Arg0, Arg1, Arg2, Arg3)) - } - } + Scope (\_SB.PCI0.EHC1.HUBN.PR01.PR15) + { + Method (_DSM, 4, Serialized) + { + Return (\_SB.PCI0.EHCN (SBV2, Arg2)) + } + } - Scope (PR17) - { - Alias (SBV2, SDGV) + Scope (\_SB.PCI0.EHC1.HUBN.PR01.PR16) + { + Method (_DSM, 4, Serialized) + { + Return (\_SB.PCI0.EHCN (SBV1, Arg2)) + } + } - Method (_DSM, 4, Serialized) - { - Return (\_SB.PCI0.EHC2.HUBN.PR01.PR12._DSM (Arg0, Arg1, Arg2, Arg3)) - } - } - } - } - } + Scope (\_SB.PCI0.EHC1.HUBN.PR01.PR17) + { + Method (_DSM, 4, Serialized) + { + Return (\_SB.PCI0.EHCN (SBV2, Arg2)) + } + } - Scope (LPCB) - { - Scope (HPET) - { - OperationRegion (RCRB, SystemMemory, HPTC, One) - Field (RCRB, ByteAcc, Lock, Preserve) - { - , 7, - HPAE, 1 - } + Scope (\_SB.PCI0.LPCB.HPET) + { + OperationRegion (RCRB, SystemMemory, HPTC, One) + Field (RCRB, ByteAcc, Lock, Preserve) + { + , 7, + HPAE, 1 + } - Method (_INI, 0, NotSerialized) - { - Store (One, HPAE) - } - } - } - } + Method (_INI, 0, NotSerialized) + { + Store (One, HPAE) } } } From f80f94bfa303dfa21547765cfbc4b9e57a073274 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 26 Mar 2013 23:07:01 +0100 Subject: [PATCH 342/623] Before code removal Having \_SB.PCI0.EHCn.HUBN.PR01.PRnn._DSM in your ACPI tables on OS X is pointless because the UUID doesn't match! --- .../acpi/examples/P8Z68-V PRO/ssdt.dsl | 96 ++++++++++++++++++- 1 file changed, 91 insertions(+), 5 deletions(-) diff --git a/i386/libsaio/acpi/examples/P8Z68-V PRO/ssdt.dsl b/i386/libsaio/acpi/examples/P8Z68-V PRO/ssdt.dsl index 04ad8b8..62b2990 100644 --- a/i386/libsaio/acpi/examples/P8Z68-V PRO/ssdt.dsl +++ b/i386/libsaio/acpi/examples/P8Z68-V PRO/ssdt.dsl @@ -38,6 +38,7 @@ DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) Scope (\_SB.PCI0) { + /* Example code (soon to be removed) */ Method (EHCN, 2, NotSerialized) { Name (T_0, Zero) @@ -85,15 +86,38 @@ DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) Method (_DSM, 4, NotSerialized) { - If (LEqual (Arg2, Zero)) - { - Return (Buffer (One) { 0x03 }) + /* Arg0 = 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9b + + If (LEqual (Arg0, Buffer (0x10) + { + / * 0000 * / 0x8F, 0x70, 0xFC, 0xA5, 0x75, 0x87, 0xA6, 0x4B, + / * 0008 * / 0xBD, 0x0C, 0xBA, 0x90, 0xA1, 0xEC, 0x72, 0xF8 + })) + { */ + If (LEqual (Arg2, Zero)) + { + Return (Buffer (One) { 0x03 }) + } + + Return (RefOf (AAPL)) + /* } + Else + { + If (LEqual (Arg2, Zero)) + { + Return (Buffer (One) { 0x03 }) + } + + Name (UUID, Zero) + ToBuffer (Arg0, UUID) + Return ( Package (0x02) { "UUID", UUID }) } - Return (RefOf (AAPL)) + Return (Zero) */ } } + /* Example code (soon to be removed) */ Scope (\_SB.PCI0.EHC2.HUBN.PR01.PR12) { Method (_DSM, 4, Serialized) @@ -102,6 +126,7 @@ DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) } } + /* Example code (soon to be removed) */ Scope (\_SB.PCI0.EHC2.HUBN.PR01.PR13) { Method (_DSM, 4, Serialized) @@ -115,6 +140,34 @@ DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) Device (XHC1) { Name (_ADR, Zero) + Name (_PRW, Package(0x02) { 0x0D, 0x04 }) + Name (_S4D, 0x03) + Name (_S3D, 0x03) + Name (MBSD, One) + Name (XHCN, One) + + /* Experimental code + Method (_DSM, 4, Serialized) + { + If (LEqual (Arg2, Zero)) + { + Return (Buffer (One) { 0x03 }) + } + + Return (Package (0x0A) + { + "name", + "pci8086,1e31", + "device-id", + Buffer(0x04) { 0x31, 0x1e, 0x00, 0x00 }, + "vendor-id", + Buffer(0x04) { 0x86, 0x80, 0x00, 0x00 }, + "subsystem-id", + Buffer(0x04) { 0x72, 0x70, 0x00, 0x00 }, + "subsystem-vendor-id", + Buffer(0x04) { 0x86, 0x80, 0x00, 0x00 } + }) + } */ } } @@ -177,9 +230,37 @@ DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) Scope (\_SB.PCI0.RP05) { - Device (XHC2) + Device (XHC1) { Name (_ADR, Zero) + Name (_PRW, Package (0x02) { 0x0D, 0x04 }) + Name (_S4D, 0x03) + Name (_S3D, 0x03) + Name (MBSD, One) + Name (XHCN, One) + + /* Experimental code + Method (_DSM, 4, Serialized) + { + If (LEqual (Arg2, Zero)) + { + Return (Buffer (One) { 0x03 }) + } + + Return (Package (0x0A) + { + "name", + "pci8086,1e31", + "device-id", + Buffer(0x04) { 0x31, 0x1e, 0x00, 0x00 }, + "vendor-id", + Buffer(0x04) { 0x86, 0x80, 0x00, 0x00 }, + "subsystem-id", + Buffer(0x04) { 0x72, 0x70, 0x00, 0x00 }, + "subsystem-vendor-id", + Buffer(0x04) { 0x86, 0x80, 0x00, 0x00 } + }) + } */ } } @@ -225,6 +306,7 @@ DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) } } + /* Example code (soon to be removed) */ Scope (\_SB.PCI0.EHC1.HUBN.PR01.PR14) { Method (_DSM, 4, Serialized) @@ -233,6 +315,7 @@ DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) } } + /* Example code (soon to be removed) */ Scope (\_SB.PCI0.EHC1.HUBN.PR01.PR15) { Method (_DSM, 4, Serialized) @@ -241,6 +324,7 @@ DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) } } + /* Example code (soon to be removed) */ Scope (\_SB.PCI0.EHC1.HUBN.PR01.PR16) { Method (_DSM, 4, Serialized) @@ -249,6 +333,7 @@ DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) } } + /* Example code (soon to be removed) */ Scope (\_SB.PCI0.EHC1.HUBN.PR01.PR17) { Method (_DSM, 4, Serialized) @@ -257,6 +342,7 @@ DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) } } + /* Optional code to activate the HPET */ Scope (\_SB.PCI0.LPCB.HPET) { OperationRegion (RCRB, SystemMemory, HPTC, One) From fef620851e388efb0c382ab05a8fab477363c6b0 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 26 Mar 2013 23:12:47 +0100 Subject: [PATCH 343/623] Code removal --- .../acpi/examples/P8Z68-V PRO/dsdt.dsl | 5 +- .../acpi/examples/P8Z68-V PRO/ssdt.dsl | 170 +----------------- 2 files changed, 5 insertions(+), 170 deletions(-) diff --git a/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl b/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl index 5b5f4fd..9b2c048 100644 --- a/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl +++ b/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl @@ -36,7 +36,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "APPLE", "Macmini", 0x00050001) Name (TCLT, 0x1000) Name (OPRE, 0xDCBB2E18) - OperationRegion (GNVS, SystemMemory, OPRE, 0x01CB) + OperationRegion (GNVS, SystemMemory, OPRE, 0x0164) Field (GNVS, AnyAcc, Lock, Preserve) { Offset (0x0B), @@ -45,9 +45,6 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "APPLE", "Macmini", 0x00050001) IGDS, 8, Offset (0xAA), ASLB, 32, - Offset (0xE3), - SBV1, 8, - SBV2, 8, Offset (0xEF), L01C, 8, Offset (0x15F), diff --git a/i386/libsaio/acpi/examples/P8Z68-V PRO/ssdt.dsl b/i386/libsaio/acpi/examples/P8Z68-V PRO/ssdt.dsl index 62b2990..3a92b59 100644 --- a/i386/libsaio/acpi/examples/P8Z68-V PRO/ssdt.dsl +++ b/i386/libsaio/acpi/examples/P8Z68-V PRO/ssdt.dsl @@ -18,54 +18,14 @@ */ DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) { - External (_SB_.PCI0, DeviceObj) External (_SB_.PCI0.EHC1, DeviceObj) - External (_SB_.PCI0.EHC1.HUBN.PR01.PR14, DeviceObj) - External (_SB_.PCI0.EHC1.HUBN.PR01.PR15, DeviceObj) - External (_SB_.PCI0.EHC1.HUBN.PR01.PR16, DeviceObj) - External (_SB_.PCI0.EHC1.HUBN.PR01.PR17, DeviceObj) External (_SB_.PCI0.EHC2, DeviceObj) - External (_SB_.PCI0.EHC2.HUBN.PR01.PR12, DeviceObj) - External (_SB_.PCI0.EHC2.HUBN.PR01.PR13, DeviceObj) External (_SB_.PCI0.LPCB.HPET, DeviceObj) External (_SB_.PCI0.RP02, DeviceObj) External (_SB_.PCI0.RP04, DeviceObj) External (_SB_.PCI0.RP05, DeviceObj) External (_SB_.PCI0.RP07, DeviceObj) External (HPTC, IntObj) - External (SBV1, FieldUnitObj) - External (SBV2, FieldUnitObj) - - Scope (\_SB.PCI0) - { - /* Example code (soon to be removed) */ - Method (EHCN, 2, NotSerialized) - { - Name (T_0, Zero) - Store (ToInteger (Arg1), T_0) - - If (LEqual (T_0, Zero)) - { - Return (Buffer (One) - { - 0x07 - }) - } - ElseIf (LEqual (T_0, One)) - { - If (LNotEqual (Arg0, 0xFF)) - { - Return (One) - } - } - ElseIf (LEqual (T_0, 0x02)) - { - Return (Arg0) - } - - Return (Zero) - } - } Scope (\_SB.PCI0.EHC2) { @@ -86,52 +46,12 @@ DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) Method (_DSM, 4, NotSerialized) { - /* Arg0 = 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9b - - If (LEqual (Arg0, Buffer (0x10) - { - / * 0000 * / 0x8F, 0x70, 0xFC, 0xA5, 0x75, 0x87, 0xA6, 0x4B, - / * 0008 * / 0xBD, 0x0C, 0xBA, 0x90, 0xA1, 0xEC, 0x72, 0xF8 - })) - { */ - If (LEqual (Arg2, Zero)) - { - Return (Buffer (One) { 0x03 }) - } - - Return (RefOf (AAPL)) - /* } - Else - { - If (LEqual (Arg2, Zero)) - { - Return (Buffer (One) { 0x03 }) - } - - Name (UUID, Zero) - ToBuffer (Arg0, UUID) - Return ( Package (0x02) { "UUID", UUID }) + If (LEqual (Arg2, Zero)) + { + Return (Buffer (One) { 0x03 }) } - Return (Zero) */ - } - } - - /* Example code (soon to be removed) */ - Scope (\_SB.PCI0.EHC2.HUBN.PR01.PR12) - { - Method (_DSM, 4, Serialized) - { - Return (\_SB.PCI0.EHCN (SBV1, Arg2)) - } - } - - /* Example code (soon to be removed) */ - Scope (\_SB.PCI0.EHC2.HUBN.PR01.PR13) - { - Method (_DSM, 4, Serialized) - { - Return (\_SB.PCI0.EHCN (SBV2, Arg2)) + Return (RefOf (AAPL)) } } @@ -145,29 +65,6 @@ DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) Name (_S3D, 0x03) Name (MBSD, One) Name (XHCN, One) - - /* Experimental code - Method (_DSM, 4, Serialized) - { - If (LEqual (Arg2, Zero)) - { - Return (Buffer (One) { 0x03 }) - } - - Return (Package (0x0A) - { - "name", - "pci8086,1e31", - "device-id", - Buffer(0x04) { 0x31, 0x1e, 0x00, 0x00 }, - "vendor-id", - Buffer(0x04) { 0x86, 0x80, 0x00, 0x00 }, - "subsystem-id", - Buffer(0x04) { 0x72, 0x70, 0x00, 0x00 }, - "subsystem-vendor-id", - Buffer(0x04) { 0x86, 0x80, 0x00, 0x00 } - }) - } */ } } @@ -238,29 +135,6 @@ DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) Name (_S3D, 0x03) Name (MBSD, One) Name (XHCN, One) - - /* Experimental code - Method (_DSM, 4, Serialized) - { - If (LEqual (Arg2, Zero)) - { - Return (Buffer (One) { 0x03 }) - } - - Return (Package (0x0A) - { - "name", - "pci8086,1e31", - "device-id", - Buffer(0x04) { 0x31, 0x1e, 0x00, 0x00 }, - "vendor-id", - Buffer(0x04) { 0x86, 0x80, 0x00, 0x00 }, - "subsystem-id", - Buffer(0x04) { 0x72, 0x70, 0x00, 0x00 }, - "subsystem-vendor-id", - Buffer(0x04) { 0x86, 0x80, 0x00, 0x00 } - }) - } */ } } @@ -306,42 +180,6 @@ DefinitionBlock ("ssdt.aml", "SSDT", 1, "APPLE ", "general", 0x00001000) } } - /* Example code (soon to be removed) */ - Scope (\_SB.PCI0.EHC1.HUBN.PR01.PR14) - { - Method (_DSM, 4, Serialized) - { - Return (\_SB.PCI0.EHCN (SBV1, Arg2)) - } - } - - /* Example code (soon to be removed) */ - Scope (\_SB.PCI0.EHC1.HUBN.PR01.PR15) - { - Method (_DSM, 4, Serialized) - { - Return (\_SB.PCI0.EHCN (SBV2, Arg2)) - } - } - - /* Example code (soon to be removed) */ - Scope (\_SB.PCI0.EHC1.HUBN.PR01.PR16) - { - Method (_DSM, 4, Serialized) - { - Return (\_SB.PCI0.EHCN (SBV1, Arg2)) - } - } - - /* Example code (soon to be removed) */ - Scope (\_SB.PCI0.EHC1.HUBN.PR01.PR17) - { - Method (_DSM, 4, Serialized) - { - Return (\_SB.PCI0.EHCN (SBV2, Arg2)) - } - } - /* Optional code to activate the HPET */ Scope (\_SB.PCI0.LPCB.HPET) { From 1db06cedcb52e02c27fe6ad94e0a5104a0c5f453 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 26 Mar 2013 23:31:55 +0100 Subject: [PATCH 344/623] Fixing compiler errors and warning --- .../acpi/examples/P8Z68-V PRO/dsdt.dsl | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl b/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl index 9b2c048..4ce894f 100644 --- a/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl +++ b/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl @@ -36,7 +36,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "APPLE", "Macmini", 0x00050001) Name (TCLT, 0x1000) Name (OPRE, 0xDCBB2E18) - OperationRegion (GNVS, SystemMemory, OPRE, 0x0164) + OperationRegion (GNVS, SystemMemory, OPRE, 0x0163) Field (GNVS, AnyAcc, Lock, Preserve) { Offset (0x0B), @@ -45,7 +45,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "APPLE", "Macmini", 0x00050001) IGDS, 8, Offset (0xAA), ASLB, 32, - Offset (0xEF), + Offset (0xEF), L01C, 8, Offset (0x15F), TBAB, 32, @@ -526,7 +526,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "APPLE", "Macmini", 0x00050001) CreateDWordField (BUF0, ^_Y0E._LEN, M1LN) ShiftLeft (TLUD, 0x14, M1MN) Add (Subtract (M1MX, M1MN), One, M1LN) - CreateDWordField (BUF0, ^_Y0F._LEN, MSLN) + CreateQWordField (BUF0, ^_Y0F._LEN, MSLN) Store (Zero, MSLN) Return (BUF0) @@ -721,47 +721,47 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "APPLE", "Macmini", 0x00050001) { Name (_ADR, One) Name (_UPC, Package (0x04) { 0xFF, Zero, Zero, Zero }) - Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0x30, 0x1C, Zero, Zero, Zero, Zero, Zero, Zero }) + Name (_PLD, Package (One) { Buffer (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0x30, 0x1C, Zero, Zero, Zero, Zero, Zero, Zero }}) Device (PR11) { Name (_ADR, One) Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) - Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1C, Zero, Zero, Zero, Zero, Zero, Zero }) + Name (_PLD, Package (One) { Buffer (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1C, Zero, Zero, Zero, Zero, Zero, Zero }}) } Device (PR12) { Name (_ADR, 0x02) Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) - Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1D, Zero, Zero, Zero, Zero, Zero, Zero }) + Name (_PLD, Package (One) { Buffer (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1D, Zero, Zero, Zero, Zero, Zero, Zero }}) } Device (PR13) { Name (_ADR, 0x03) Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) - Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1D, Zero, Zero, Zero, Zero, Zero, Zero }) + Name (_PLD, Package (One) { Buffer (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1D, Zero, Zero, Zero, Zero, Zero, Zero }}) } Device (PR14) { Name (_ADR, 0x04) Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) - Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }) + Name (_PLD, Package (One) { Buffer (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }}) } Device (PR15) { Name (_ADR, 0x05) Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) - Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }) + Name (_PLD, Package (One) { Buffer (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }}) } Device (PR16) { Name (_ADR, 0x06) Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) - Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }) + Name (_PLD, Package (One) { Buffer (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }}) } } } @@ -813,61 +813,61 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "APPLE", "Macmini", 0x00050001) { Name (_ADR, One) Name (_UPC, Package (0x04) { 0xFF, Zero, Zero, Zero }) - Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0x30, 0x1C, Zero, Zero, Zero, Zero, Zero, Zero }) + Name (_PLD, Package (One) { Buffer (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0x30, 0x1C, Zero, Zero, Zero, Zero, Zero, Zero }}) Device (PR11) { Name (_ADR, One) Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) - Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1C, Zero, Zero, Zero, Zero, Zero, Zero }) + Name (_PLD, Package (One) { Buffer (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1C, Zero, Zero, Zero, Zero, Zero, Zero }}) } Device (PR12) { Name (_ADR, 0x02) Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) - Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1D, Zero, Zero, Zero, Zero, Zero, Zero }) + Name (_PLD, Package (One) { Buffer (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1D, Zero, Zero, Zero, Zero, Zero, Zero }}) } Device (PR13) { Name (_ADR, 0x03) Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) - Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1D, Zero, Zero, Zero, Zero, Zero, Zero }) + Name (_PLD, Package (One) { Buffer (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1D, Zero, Zero, Zero, Zero, Zero, Zero }}) } Device (PR14) { Name (_ADR, 0x04) Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) - Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }) + Name (_PLD, Package (One) { Buffer (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xE1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }}) } Device (PR15) { Name (_ADR, 0x05) Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) - Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }) + Name (_PLD, Package (One) { Buffer (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }}) } Device (PR16) { Name (_ADR, 0x06) Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) - Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }) + Name (_PLD, Package (One) { Buffer (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }}) } Device (PR17) { Name (_ADR, 0x07) Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) - Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }) + Name (_PLD, Package (One) { Buffer (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }}) } Device (PR18) { Name (_ADR, 0x08) Name (_UPC, Package (0x04) { 0xFF, 0xFF, Zero, Zero }) - Name (_PLD, Package (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }) + Name (_PLD, Package (One) { Buffer (0x10) { 0x81, Zero, Zero, Zero, Zero, Zero, Zero, Zero, 0xB1, 0x1E, Zero, Zero, Zero, Zero, Zero, Zero }}) } } } From aa297168775314fb981285672141af78ba6ebc1b Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 27 Mar 2013 07:14:06 +0100 Subject: [PATCH 345/623] Adding a device name --- i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl b/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl index 4ce894f..e5096f0 100644 --- a/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl +++ b/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl @@ -532,6 +532,11 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "APPLE", "Macmini", 0x00050001) Return (BUF0) } + Device (MCHC) + { + Name (_ADR, Zero) + } + Device (PEG0) { Name (_ADR, 0x00010000) From 61fb8036482d2eaf143dacec276a5cd1b86fb6a3 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 28 Mar 2013 06:57:07 +0100 Subject: [PATCH 346/623] GPU stats are now optional --- .../AppleIntelCPUPowerManagementInfo.cpp | 19 +++++++++++++++---- .../AppleIntelCPUPowerManagementInfo.h | 11 ++++++++++- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 81a4309..4df6928 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -133,8 +133,11 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) IOLog("%d ", currentBit); } } - +#if REPORT_GPU_STATS IOLog("] GPU P-State [ %d ]\n", (UInt8)gMchbar[1]); +#else + IOLog("]\n"); +#endif } loopLock = false; @@ -173,13 +176,18 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) { this->registerService(0); + UInt64 msr = rdmsr64(MSR_IA32_PERF_STS); + gCoreMultipliers |= (1ULL << (msr >> 8)); + uint32_t cpuid_reg[4]; do_cpuid(0x00000001, cpuid_reg); gCPUModel = bitfield32(cpuid_reg[eax], 7, 4) + (bitfield32(cpuid_reg[eax], 19, 16) << 4); - reportMSRs(); - UInt64 msr = rdmsr64(MSR_PLATFORM_INFO); +#if REPORT_MSRS + reportMSRs(); +#endif + msr = rdmsr64(MSR_PLATFORM_INFO); gMinRatio = (UInt8)((msr >> 40) & 0xff); IOLog("Low Frequency Mode : %d00 MHz\n", gMinRatio); @@ -198,6 +206,7 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) IOLog("Max Frequency : %d00 MHz\n", gMaxRatio); } +#if REPORT_GPU_STATS /* * TODO: Pike, add check a to see if there is a GPU and if it is is enabled! */ @@ -232,7 +241,7 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) { IOLog("Error: memDescriptor == NULL\n"); } - +#endif timerEventSource->setTimeoutMS(1000); return true; @@ -271,6 +280,7 @@ void AppleIntelCPUPowerManagementInfo::stop(IOService *provider) void AppleIntelCPUPowerManagementInfo::free() { +#if REPORT_GPU_STATS if (memoryMap) { memoryMap->release(); @@ -282,6 +292,7 @@ void AppleIntelCPUPowerManagementInfo::free() memDescriptor->release(); memDescriptor = NULL; } +#endif super::free(); } diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index d6c04f3..6e6f939 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -21,6 +21,9 @@ #define super IOService +#define REPORT_MSRS 0 +#define REPORT_GPU_STATS 0 + extern "C" void mp_rendezvous_no_intrs(void (*action_func)(void *), void * arg); extern "C" int cpu_number(void); @@ -32,8 +35,11 @@ class AppleIntelCPUPowerManagementInfo : public IOService IOSimpleLock *simpleLock; IOWorkLoop *workLoop; IOTimerEventSource *timerEventSource; + +#if REPORT_GPU_STATS IOMemoryDescriptor *memDescriptor; IOMemoryMap *memoryMap; +#endif IOReturn result = kIOReturnSuccess; @@ -64,4 +70,7 @@ OSDefineMetaClassAndStructors(AppleIntelCPUPowerManagementInfo, IOService) UInt8 gCPUModel = 0x2A; UInt8 gCoreStates = 0ULL; -UInt8 * gMchbar = NULL; + +#if REPORT_GPU_STATS + UInt8 * gMchbar = NULL; +#endif From 3974b1200559303453e14e05795d105ee81251b0 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 29 Mar 2013 03:39:41 +0100 Subject: [PATCH 347/623] Typo Thanks to Justin Evans for the tip! --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 4e4fad0..227c25b 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -233,7 +233,7 @@ gDesktopSandyBridgeCPUList=( # i7 Desktop Extreme Series i7-3970X,150,0,3500,4000,6,12 i7-3960X,130,0,3300,3900,6,12 -i7-3930X,130,0,3200,3800,6,12 +i7-3930K,130,0,3200,3800,6,12 i7-3820,130,0,3600,3800,4,8 # i7 Desktop series i7-2600S,65,1600,2800,3800,4,8 From 9344a37014c57218a6952c430dc5033bccefc9af Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 30 Mar 2013 09:11:33 +0100 Subject: [PATCH 348/623] Typo in board-id for iMac's fixed Thanks to 4D3K for the tip! --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 227c25b..ac4ad53 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -1370,14 +1370,14 @@ set -x function _initSandyBridgeSetup() { case $boardID in - Mac-942B59F58194171B) + Mac-942B59F58194151B) gSystemType=1 gMacModelIdentifier="iMac12,1" gACST_CPU0=13 # C1, C3 and C6 gACST_CPU1=7 # C1, C2 and C3 ;; - Mac-942B5BF58194151B) + Mac-942B5BF58194171B) gSystemType=1 gMacModelIdentifier="iMac12,2" gACST_CPU0=13 # C1, C3 and C6 From cd83c021f8c9725163c5e469e095a2f3000391da Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 30 Mar 2013 09:14:38 +0100 Subject: [PATCH 349/623] Fixed a typo in board-id's for iMac's Thanks to 4D3K for the tip! --- i386/libsaio/smbios/model_data.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 8e9ca4c..4d5ac74 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -40,12 +40,12 @@ #elif (TARGET_MODEL == IMAC_121) #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" #define SMB_PRODUCT_NAME "iMac12,1" - #define SMB_BOARD_PRODUCT "Mac-942B59F58194171B" + #define SMB_BOARD_PRODUCT "Mac-942B59F58194151B" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '1' } #elif (TARGET_MODEL == IMAC_122) #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" #define SMB_PRODUCT_NAME "iMac12,2" - #define SMB_BOARD_PRODUCT "Mac-942B5BF58194151B" + #define SMB_BOARD_PRODUCT "Mac-942B5BF58194171B" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '2' } #elif (TARGET_MODEL == IMAC_131) #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" From 035bf0a0bb7bdecb8f4fb5cff96ded08bc73589c Mon Sep 17 00:00:00 2001 From: Dave Griffin <davegriffin@stainedglass1.plus.com> Date: Sat, 30 Mar 2013 13:49:18 +0000 Subject: [PATCH 350/623] Added second DSDT example --- i386/libsaio/acpi/Tools/ssdtPRGen copy.sh | 1436 +++++++ .../acpi/examples/MAXIMUS V GENE/DSDT.dsl | 3483 +++++++++++++++++ ...owerManagementInfo-all-target-headers.hmap | Bin 0 -> 981 bytes ...PUPowerManagementInfo-generated-files.hmap | Bin 0 -> 450 bytes ...owerManagementInfo-own-target-headers.hmap | Bin 0 -> 981 bytes ...PUPowerManagementInfo-project-headers.hmap | Bin 0 -> 913 bytes .../AppleIntelCPUPowerManagementInfo.dep | 5 + .../AppleIntelCPUPowerManagementInfo.hmap | Bin 0 -> 2078 bytes .../AppleIntelCPUPowerManagementInfo_info.c | 9 + ...leIntelCPUPowerManagementInfo.LinkFileList | 1 + .../x86_64/AppleIntelCPUPowerManagementInfo.d | 178 + .../AppleIntelCPUPowerManagementInfo.dia | Bin 0 -> 220 bytes .../x86_64/AppleIntelCPUPowerManagementInfo.o | Bin 0 -> 131408 bytes .../AppleIntelCPUPowerManagementInfo_info.d | 63 + .../AppleIntelCPUPowerManagementInfo_info.dia | Bin 0 -> 220 bytes .../AppleIntelCPUPowerManagementInfo_info.o | Bin 0 -> 5076 bytes .../build-state.dat | 996 +++++ ...-9E9E-41C9-966B-1B327D5EC5DC.xcactivitylog | Bin 0 -> 2039 bytes .../Logs/Build/Cache.db | Bin 0 -> 950 bytes ...-DF4F-4F8E-9FCF-211E10D22EAE.xcactivitylog | Bin 0 -> 1970 bytes .../Logs/Issues/Cache.db | Bin 0 -> 707 bytes .../info.plist | 8 + 22 files changed, 6179 insertions(+) create mode 100755 i386/libsaio/acpi/Tools/ssdtPRGen copy.sh create mode 100644 i386/libsaio/acpi/examples/MAXIMUS V GENE/DSDT.dsl create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-all-target-headers.hmap create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-generated-files.hmap create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-own-target-headers.hmap create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-project-headers.hmap create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo.dep create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo.hmap create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources/AppleIntelCPUPowerManagementInfo_info.c create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.LinkFileList create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.d create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.dia create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.o create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.d create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.dia create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.o create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/build-state.dat create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Logs/Build/AC062B99-9E9E-41C9-966B-1B327D5EC5DC.xcactivitylog create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Logs/Build/Cache.db create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Logs/Issues/8BE2DAD6-DF4F-4F8E-9FCF-211E10D22EAE.xcactivitylog create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Logs/Issues/Cache.db create mode 100644 i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/info.plist diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen copy.sh b/i386/libsaio/acpi/Tools/ssdtPRGen copy.sh new file mode 100755 index 0000000..28ae711 --- /dev/null +++ b/i386/libsaio/acpi/Tools/ssdtPRGen copy.sh @@ -0,0 +1,1436 @@ +#!/bin/bash +# +# Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. +# +# Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> +# Version 3.6 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# +# Updates: +# - Added support for Ivybridge (Pike, January 2013) +# - Filename error fixed (Pike, January 2013) +# - Namespace error fixed in _printScopeStart (Pike, January 2013) +# - Model and board-id checks added (Pike, January 2013) +# - SMBIOS cpu-type check added (Pike, January 2013) +# - Copy/paste error fixed (Pike, January 2013) +# - Method ACST added to CPU scopes for IB CPUPM (Pike, January 2013) +# - Method ACST corrected for latest version of iasl (Dave, January 2013) +# - Changed path/filename to ~/Desktop/SSDT_PR.dsl (Dave, January 2013) +# - P-States are now one-liners instead of blocks (Pike, January 2013) +# - Support for flexible ProcessorNames added (Pike, Februari 2013) +# - Better feedback and Debug() injection added (Pike, Februari 2013) +# - Automatic processor type detection (Pike, Februari 2013) +# - TDP and processor type are now optional arguments (Pike, Februari 2013) +# - system-type check (used by X86PlatformPlugin) added (Pike, Februari 2013) +# - ACST injection for all logical processors (Pike, Februari 2013) +# - Introducing a stand-alone version of method _DSM (Pike, Februari 2013) +# - Fix incorrect turbo range (Pike, Februari 2013) +# - Restore IFS before return (Pike, Februari 2013) +# - Better/more complete feedback added (Jeroen, Februari 2013) +# - Processor data for desktop/mobile and server CPU's added (Jeroen, Februari 2013) +# - Improved power calculation, matching Apple's new algorithm (Pike, Februari 2013) +# - Fix iMac13,N latency and power values for C3 (Jeroen/Pike, Februari 2013) +# - IASL failed to launch when path included spaces (Pike, Februari 2013) +# - Typo in cpu-type check fixed (Jeroen, Februari 2013) +# - Error in CPU data (i5-3317U) fixed (Pike, Februari 2013) +# - Setting added for the target path/filename (Jeroen, Februari 2013) +# - Initial implementation of auto-copy (Jeroen, Februari 2013) +# - Additional checks added for cpu data/turbo modes (Jeroen, Februari 2013) +# - Undo filename change done by Jeroen (Pike, Februari 2013) +# +# Contributors: +# - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). +# - Many thanks to Jeroen for the CPU data, cleanups and renaming stuff. +# + +# set -x # Used for tracing errors (can be used anywhere in the script). + +#================================= GLOBAL VARS ================================== + +# +# Change this to 0 when your CPU isn't stuck in Low Frequency Mode! +# +gIvyWorkAround=1 + +# +# Change this to 1 when you want SSDT.aml to get copied to the target location. +# +gAutoCopy=0 + +# +# This is the target location that SSDT.aml will be copied to. +# +# Note: Do no change this - will be updated automatically for Clover/RevoBoot! +# +gDestinationPath="/Extra/" + +# +# This is the filename used for the copy process +# +gDestinationFile="SSDT.aml" + +# +# A value of 1 will make this script call iasl (compiles SSDT_PR.dsl) +# +# Note: Will be set to 0 when we failed to locate a copy of iasl! +# +gCallIasl=1 + +# +# A value of 1 will make this script open SSDT_PR.dsl in the editor of your choice. +# +gCallOpen=0 + +# +# Change this to 0 to stop it from injecting debug data. +# +gDebug=1 + +# +# Lowest possible idle frequency (user configurable). Also known as Low Frequency Mode. +# +gBaseFrequency=1600 + +# +# Change this label to "P00" when your DSDT uses 'P00n' instead of 'CPUn'. +# +gProcLabel="CPU" + +# +# Other global variables. +# + +gScriptVersion=3.6 + +# +# Path and filename setup. +# + +gPath=~/Desktop +gSsdtID=SSDT_PR +gSsdtPR=${gPath}/${gSsdtID}.dsl + +gDesktopCPU=1 +gMobileCPU=2 +gServerCPU=3 + +let gSystemType=0 + +gACST_CPU0=13 +gACST_CPU1=7 + +gMacModelIdentifier="" + +IVY_BRIDGE=4 +SANDY_BRIDGE=2 + +gTypeCPU=0 +gProcessorData="Unknown CPU" +gProcessorNumber="" + +# +# Processor Number, Max TDP, Low Frequency Mode, Clock Speed, Max Turbo Frequency, Cores, Threads +# + +gSandyBridgeCPUList=( +# E3-1200 Xeon Processor Series +E3-1290,95,0,3600,4000,4,8 +E3-1280,95,0,3500,3900,4,8 +E3-1275,95,0,3400,3800,4,8 +E3-1270,80,0,3400,3800,4,8 +E3-1260L,45,0,2400,3300,4,8 +E3-1245,95,0,3300,3700,4,8 +E3-1240,80,0,3300,3700,4,8 +E3-1235,95,0,3200,3600,4,8 +E3-1230,80,0,3200,3600,4,8 +E3-1225,95,0,3100,3400,4,4 +E3-1220L,20,0,2200,3400,2,4 +E3-1220,80,0,3100,3400,4,4 +) + +# +# Processor Number, Max TDP, Low Frequency Mode, Clock Speed, Max Turbo Frequency, Cores, Threads +# + +gServerIvyBridgeCPUList=( +# E3-1200 Xeon Processor Series +'E3-1290 V2',87,0,3700,4100,4,8 +'E3-1285 V2',65,0,3600,4000, +'E3-1285L V2',0,0,3200,3900, +'E3-1280 V2',69,0,3600,4000,4,8 +'E3-1275 V2',77,0,3500,3900,4,8 +'E3-1270 V2',69,0,3500,3900,4,8 +'E3-1265L V2',45,0,2500,3500,4,8 +'E3-1245 V2',77,0,3400,3800,4,8 +'E3-1240 V2',69,0,3400,3800,4,8 +'E3-1230 V2',69,0,3300,3700,4,8 +'E3-1225 V2',77,0,3200,3600,4,4 +'E3-1220 V2',69,0,3100,3500,4,4 +'E3-1220L V2',17,0,2300,3500,2,4 +) + +gDesktopIvyBridgeCPUList=( +# i7-3700 Desktop Processor Series +i7-3770T,45,1600,2500,3700,4,8 +i7-3770S,65,1600,3100,3900,4,8 +i7-3770K,77,1600,3500,4600,4,8 +i7-3770,77,1600,3400,3900,4,8 +# i5-3500 Desktop Processor Series +i5-3570T,45,1600,2300,3300,4,4 +i5-3570K,77,1600,3400,3800,4,4 +i5-3570S,65,1600,3100,3800,4,4 +i5-3570,77,1600,3400,3800,4,4 +i5-3550S,65,1600,3000,3700,4,4 +i5-3550,77,1600,3300,3700,4,4 +# i5-3400 Desktop Processor Series +i5-3475S,65,1600,2900,3600,4,4 +i5-3470S,65,1600,2900,3600,4,4 +i5-3470,77,1600,3200,3600,4,4 +i5-3470T,35,1600,2900,3600,2,4 +i5-3450S,65,1600,2800,3500,4,4 +i5-3450,77,1600,3100,3500,4,4 +# i5-3300 Desktop Processor Series +i5-3350P,69,1600,3100,3300,4,4 +i5-3330S,65,1600,2700,3200,4,4 +i5-3333S,65,1600,2700,3200,4,4 +i5-3330S,65,1600,3700,3200,4,4 +i5-3330,77,1600,3000,3200,4,4 +# i3-3200 Desktop Processor Series +i3-3240,55,1600,3400,0,2,4 +i3-3240T,35,1600,2900,0,2,4 +i3-3225,55,1600,3300,0,2,4 +i3-3220,55,1600,3300,0,2,4 +i3-3220T,35,1600,2800,0,2,4 +i3-3210,55,1600,3200,0,2,4 +) + +gMobileIvyBridgeCPUList=( +# i7-3800 Mobile Processor Series +i7-3840QM,45,1200,2800,3800,4,8 +i7-3820QM,45,1200,2700,3700,4,8 +# i7-3700 Mobile Processor Series +i7-3740QM,45,1200,2700,3700,4,8 +i7-3720QM,45,1200,2600,3600,4,8 +# i7-3600 Mobile Processor Series +i7-3689Y,13,0,1500,2600,2,4 +i7-3687U,17,800,2100,3300,2,4 +i7-3667U,17,800,2000,3200,2,4 +i7-3635QM,45,0,2400,3400,4,8 +i7-3620QM,35,0,2200,3200,4,8 +i7-3632QM,35,0,2200,3200,4,8 +i7-3630QM,45,0,2400,3400,4,8 +i7-3615QM,45,0,2300,3300,4,8 +i7-3615QE,45,0,2300,3300,4,8 +i7-3612QM,35,0,2100,3100,4,8 +i7-3612QE,35,0,2100,3100,4,8 +i7-3610QM,45,0,2300,3300,4,8 +i7-3610QE,45,0,2300,3300,4,8 +# i7-3500 Mobile Processor Series +i7-3555LE,25,0,2500,3200,2,4 +i7-3540M,35,1200,3000,3700,2,4 +i7-3537U,17,800,2000,3100,2,4 +i7-3520M,35,1200,2900,3600,2,4 +i7-3517UE,17,0,1700,2800,2,4 +i7-3517U,17,0,1900,3000,2,4 +# i5-3600 Mobile Processor Series +i5-3610ME,35,0,2700,3300,2,4 +# i5-3400 Mobile Processor Series +i5-3439Y,13,0,1500,2300,2,4 +i5-3437U,17,800,1900,2900,2,4 +i5-3427U,17,800,1800,2800,2,4 +# i5-3300 Mobile Processor Series +i5-3380M,35,1200,2900,3600,2,4 +i5-3360M,35,1200,2800,3500,2,4 +i5-3340M,35,1200,2700,3400,2,4 +i5-3339Y,13,0,1500,2000,2,4 +i5-3337U,17,0,1800,2700,2,4 +i5-3320M,35,1200,2600,3300,2,4 +i5-3317U,17,0,1700,2600,2,4 +# i5-3200 Mobile Processor Series +i5-3230M,35,1200,2600,3200,2,4 +i5-3210M,35,1200,2500,3100,2,4 +# i3-3200 Mobile Processor Series +i3-3239Y,13,0,1400,0,2,4 +i3-3227U,17,800,1900,0,2,4 +i3-3217UE,17,0,1600,0,2,4 +i3-3217U,17,0,1800,0,2,4 +# i3-3100 Mobile Processor Series +i3-3130M,35,1200,2600,0,2,4 +i3-3120ME,35,0,2400,0,2,4 +i3-3120M,35,0,2500,0,2,4 +i3-3110M,35,0,2400,0,2,4 +) + +#-------------------------------------------------------------------------------- + +function _printHeader() +{ + echo '/*' > $gSsdtPR + echo ' * Intel ACPI Component Architecture' >> $gSsdtPR + echo ' * AML Disassembler version 20130210-00 [Feb 10 2013]' >> $gSsdtPR + echo ' * Copyright (c) 2000 - 2013 Intel Corporation' >> $gSsdtPR + echo ' * ' >> $gSsdtPR + echo ' * Original Table Header:' >> $gSsdtPR + echo ' * Signature "SSDT"' >> $gSsdtPR + echo ' * Length 0x0000036A (874)' >> $gSsdtPR + echo ' * Revision 0x01' >> $gSsdtPR + echo ' * Checksum 0x00' >> $gSsdtPR + echo ' * OEM ID "APPLE "' >> $gSsdtPR + echo ' * OEM Table ID "CpuPm"' >> $gSsdtPR + echo ' * OEM Revision 0x00003000 (4096)' >> $gSsdtPR + echo ' * Compiler ID "INTL"' >> $gSsdtPR + echo ' * Compiler Version 0x20130210 (538116624)' >> $gSsdtPR + echo ' */' >> $gSsdtPR + echo '' >> $gSsdtPR + echo 'DefinitionBlock ("'$gSsdtID'.aml", "SSDT", 1, "APPLE ", "CpuPm", 0x00003000)' >> $gSsdtPR + echo '{' >> $gSsdtPR +} + + +#-------------------------------------------------------------------------------- + +function _printExternals() +{ + currentCPU=0; + + while [ $currentCPU -lt $1 ]; do + echo ' External (\_PR_.'$gProcLabel$currentCPU', DeviceObj)' >> $gSsdtPR + let currentCPU+=1 + done + + echo '' >> $gSsdtPR +} + + +#-------------------------------------------------------------------------------- + +function _printDebugInfo() +{ + if ((gDebug)); then + echo ' Store ("ssdtPRGen.sh v'$gScriptVersion'", Debug)' >> $gSsdtPR + echo ' Store ("baseFrequency : '$gBaseFrequency'", Debug)' >> $gSsdtPR + echo ' Store ("frequency : '$frequency'", Debug)' >> $gSsdtPR + echo ' Store ("logicalCPUs : '$logicalCPUs'", Debug)' >> $gSsdtPR + echo ' Store ("tdp : '$gTdp'", Debug)' >> $gSsdtPR + echo ' Store ("packageLength : '$packageLength'", Debug)' >> $gSsdtPR + echo ' Store ("turboStates : '$turboStates'", Debug)' >> $gSsdtPR + echo ' Store ("maxTurboFrequency: '$maxTurboFrequency'", Debug)' >> $gSsdtPR + echo '' >> $gSsdtPR + fi +} + +#-------------------------------------------------------------------------------- + +function _printProcessorDefinitions() +{ + let currentCPU=0; + + while [ $currentCPU -lt $1 ]; do + echo ' External (\_PR_.'$gProcLabel$currentCPU', DeviceObj)' >> $gSsdtPR + let currentCPU+=1 + done + + echo '' >> $gSsdtPR +} + +#-------------------------------------------------------------------------------- + +function _printScopeStart() +{ + let turboStates=$1 + let packageLength=$2 + + # TODO: Remove this when CPUPM for IB works properly! + let useWorkArounds=0 + + echo ' Scope (\_PR.'$gProcLabel'0)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + + # + # Do we need to create additional (Low Frequency) P-States? + # + + if [ $gBridgeType -eq $IVY_BRIDGE ]; + then + let lowFrequencyPStates=($gBaseFrequency/100)-8 + let packageLength=($2+$lowFrequencyPStates) + + printf " Name (APLF, 0x%02x" $lowFrequencyPStates >> $gSsdtPR + echo ')' >> $gSsdtPR + + # TODO: Remove this when CPUPM for IB works properly! + if ((gIvyWorkAround)); then + let useWorkArounds=1 + fi + fi + + # + # Check number of Turbo states (for IASL optimization). + # + + if [ $turboStates -eq 0 ]; + then + # TODO: Remove this when CPUPM for IB works properly! + if (($useWorkArounds)); + then + echo ' Name (APSN, One)' >> $gSsdtPR + else + echo ' Name (APSN, Zero)' >> $gSsdtPR + fi + else + # TODO: Remove this when CPUPM for IB works properly! + if ((useWorkArounds)); then + let turboStates+=1 + fi + + printf " Name (APSN, 0x%02X)\n" $turboStates >> $gSsdtPR + fi + + # TODO: Remove this when CPUPM for IB works properly! + if (($useWorkArounds)); then + let packageLength+=1 + fi + + printf " Name (APSS, Package (0x%02X)\n" $packageLength >> $gSsdtPR + echo ' {' >> $gSsdtPR + + # TODO: Remove this when CPUPM for IB works properly! + if (($useWorkArounds)); then + let extraF=($maxTurboFrequency+1) + let maxTDP=($gTdp*1000) + let extraR=($maxTurboFrequency/100)+1 + echo ' /* Workaround for Ivy Bridge PM bug */' >> $gSsdtPR + printf " Package (0x06) { 0x%04X, 0x%06X, 0x0A, 0x0A, 0x%02X00, 0x%02X00 },\n" $extraF $maxTDP $extraR $extraR >> $gSsdtPR + fi +} + + +#-------------------------------------------------------------------------------- + +function _printPackages() +{ + let maxTDP=($1*1000) + local maxNonTurboFrequency=$2 + local frequency=$3 + + let minRatio=($gBaseFrequency/100) + let p1Ratio=($maxNonTurboFrequency/100) + let ratio=($frequency/100) + let powerRatio=($p1Ratio-1) + + # + # Do we need to create additional (Low Frequency) P-States for Ivy bridge? + # + if [ $gBridgeType -eq $IVY_BRIDGE ]; then + let minRatio=8 + fi + + if (($turboStates)); then + echo ' /* High Frequency Modes (turbo) */' >> $gSsdtPR + fi + + while [ $ratio -ge $minRatio ]; + do + if [ $frequency -eq $gBaseFrequency ]; + then + echo ' /* Low Frequency Mode */' >> $gSsdtPR + fi + + if [ $frequency -eq $maxNonTurboFrequency ]; + then + echo ' /* High Frequency Modes (non-turbo) */' >> $gSsdtPR + fi + + printf " Package (0x06) { 0x%04X, " $frequency >> $gSsdtPR + + if [ $frequency -lt $maxNonTurboFrequency ]; + then + power=$(echo "scale=6;m=((1.1-(($p1Ratio-$powerRatio)*0.00625))/1.1);(($powerRatio/$p1Ratio)*(m*m)*$maxTDP);" | bc | sed -e 's/.[0-9A-F]*$//') + let powerRatio-=1 + else + power=$maxTDP + fi + + if [ $frequency -ge $gBaseFrequency ]; + then + printf "0x%06X, " $power >> $gSsdtPR + else + printf ' Zero, ' >> $gSsdtPR + fi + + printf "0x0A, 0x0A, 0x%02X00, 0x%02X00 }" $ratio $ratio >> $gSsdtPR + + let ratio-=1 + let frequency-=100 + + if [ $ratio -ge $minRatio ]; + then + echo ',' >> $gSsdtPR + else + echo '' >> $gSsdtPR + fi + + done + + echo ' })' >> $gSsdtPR + echo '' >> $gSsdtPR +} + + +#-------------------------------------------------------------------------------- + +function _printMethodDSM() +{ + # + # New stand-alone version of Method _DSM - Copyright (c) 2009 by Master Chief + # + echo '' >> $gSsdtPR + echo ' Method (_DSM, 4, NotSerialized)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' If (LEqual (Arg2, Zero))' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Return (Buffer (One)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' 0x03' >> $gSsdtPR + echo ' })' >> $gSsdtPR + echo ' }' >> $gSsdtPR + echo '' >> $gSsdtPR + # + # This property is required to get X86Platform[Plugin/Shim].kext loaded. + # + echo ' Return (Package (0x02)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' "plugin-type",' >> $gSsdtPR + echo ' One' >> $gSsdtPR + echo ' })' >> $gSsdtPR + echo ' }' >> $gSsdtPR + echo ' }' >> $gSsdtPR +} + +#-------------------------------------------------------------------------------- + +function _printScopeACST() +{ + let C1=0 + let C2=0 + let C3=0 + let C6=0 + let C7=0 + local pkgLength=2 + local numberOfCStates=0 + +# echo '' >> $gSsdtPR + echo ' Method (ACST, 0, NotSerialized)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + + # + # Are we injecting C-States for CPU1? + # + if [ $1 -eq 1 ]; + then + # Yes (also used by CPU2, CPU3 and greater). + let targetCStates=$gACST_CPU1 + latency_C1=0x03E8 + latency_C2=0x94 + latency_C3=0xC6 + + if ((gDebug)); then + echo ' Store ("CPU1 C-States : '$targetCStates'", Debug)' >> $gSsdtPR + echo '' >> $gSsdtPR + fi + else + # + # C-States override for Mobile processors (CPU0 only) + # + if (($gTypeCPU == $gMobileCPU)); + then + echo 'Adjusting C-States for detected (mobile) processor' + gACST_CPU0=29 + fi + + let targetCStates=$gACST_CPU0 + latency_C1=Zero + latency_C3=0xCD + latency_C6=0xF5 + latency_C7=0xF5 + + if ((gDebug)); then + echo ' Store ("CPU0 C-States : '$targetCStates'", Debug)' >> $gSsdtPR + echo '' >> $gSsdtPR + fi + fi + + # + # Checks to determine which C-State(s) we should inject. + # + if (($targetCStates & 1)); then + let C1=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi + + if (($targetCStates & 2)); then + let C2=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi + + if (($targetCStates & 4)); then + let C3=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi + + if (($targetCStates & 8)); then + let C6=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi + + if (($targetCStates & 16)); then + let C7=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi + + let hintCode=0x00 + + echo ' /* Low Power Modes for '$gProcLabel$1' */' >> $gSsdtPR + printf " Return (Package (0x%02x)\n" $pkgLength >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' One,' >> $gSsdtPR + printf " 0x%02x,\n" $numberOfCStates >> $gSsdtPR + echo ' Package (0x04)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' ResourceTemplate ()' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Register (FFixedHW,' >> $gSsdtPR + echo ' 0x01, // Bit Width' >> $gSsdtPR + echo ' 0x02, // Bit Offset' >> $gSsdtPR + printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR + echo ' 0x01, // Access Size' >> $gSsdtPR + echo ' )' >> $gSsdtPR + echo ' },' >> $gSsdtPR + echo ' One,' >> $gSsdtPR + echo ' '$latency_C1',' >> $gSsdtPR + echo ' 0x03E8' >> $gSsdtPR + + if (($C2)); then + let hintCode+=0x10 + echo ' },' >> $gSsdtPR + echo '' >> $gSsdtPR + echo ' Package (0x04)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' ResourceTemplate ()' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Register (FFixedHW,' >> $gSsdtPR + echo ' 0x01, // Bit Width' >> $gSsdtPR + echo ' 0x02, // Bit Offset' >> $gSsdtPR + printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR + echo ' 0x03, // Access Size' >> $gSsdtPR + echo ' )' >> $gSsdtPR + echo ' },' >> $gSsdtPR + echo ' 0x02,' >> $gSsdtPR + echo ' '$latency_C2',' >> $gSsdtPR + echo ' 0x01F4' >> $gSsdtPR + fi + + if (($C3)); then + let hintCode+=0x10 + local power_C3=0x01F4 + # + # Is this for CPU1? + # + if (($1)); then + if [[ ${modelID:0:7} == "iMac13," ]]; + then + local power_C3=0x15E + latency_C3=0xA9 + else + local power_C3=0xC8 + let hintCode+=0x10 + fi + fi + + echo ' },' >> $gSsdtPR + echo '' >> $gSsdtPR + echo ' Package (0x04)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' ResourceTemplate ()' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Register (FFixedHW,' >> $gSsdtPR + echo ' 0x01, // Bit Width' >> $gSsdtPR + echo ' 0x02, // Bit Offset' >> $gSsdtPR + printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR + echo ' 0x03, // Access Size' >> $gSsdtPR + echo ' )' >> $gSsdtPR + echo ' },' >> $gSsdtPR + echo ' 0x03,' >> $gSsdtPR + echo ' '$latency_C3',' >> $gSsdtPR + echo ' '$power_C3 >> $gSsdtPR + fi + + if (($C6)); then + let hintCode+=0x10 + echo ' },' >> $gSsdtPR + echo '' >> $gSsdtPR + echo ' Package (0x04)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' ResourceTemplate ()' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Register (FFixedHW,' >> $gSsdtPR + echo ' 0x01, // Bit Width' >> $gSsdtPR + echo ' 0x02, // Bit Offset' >> $gSsdtPR + printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR + echo ' 0x03, // Access Size' >> $gSsdtPR + echo ' )' >> $gSsdtPR + echo ' },' >> $gSsdtPR + echo ' 0x06,' >> $gSsdtPR + echo ' '$latency_C6',' >> $gSsdtPR + echo ' 0x015E' >> $gSsdtPR + fi + + if (($C7)); then + # + # If $hintCode is already 0x30 then use 0x31 otherwise 0x30 + # + if [ $hintCode -eq 48 ]; + then + let hintCode+=0x01 + else + let hintCode+=0x10 + fi + echo ' },' >> $gSsdtPR + echo '' >> $gSsdtPR + echo ' Package (0x04)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' ResourceTemplate ()' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Register (FFixedHW,' >> $gSsdtPR + echo ' 0x01, // Bit Width' >> $gSsdtPR + echo ' 0x02, // Bit Offset' >> $gSsdtPR + printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR + echo ' 0x03, // Access Size' >> $gSsdtPR + echo ' )' >> $gSsdtPR + echo ' },' >> $gSsdtPR + echo ' 0x07,' >> $gSsdtPR + echo ' '$latency_C7',' >> $gSsdtPR + echo ' 0xC8' >> $gSsdtPR + fi + + echo ' }' >> $gSsdtPR + echo ' })' >> $gSsdtPR + echo ' }' >> $gSsdtPR + + # + # We don't need a closing bracket here when we add method _DSM for Ivy Bridge. + # + + if [ $gBridgeType -eq $SANDY_BRIDGE ]; then + echo ' }' >> $gSsdtPR + fi +} + + +#-------------------------------------------------------------------------------- + +function _printScopeCPUn() +{ + let currentCPU=1; + + while [ $currentCPU -lt $1 ]; do + echo '' >> $gSsdtPR + echo ' Scope (\_PR.'$gProcLabel$currentCPU')' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Method (APSS, 0, NotSerialized) { Return (\_PR.'$gProcLabel'0.APSS) }' >> $gSsdtPR + + # + # IB CPUPM tries to parse/execute CPUn.ACST (see debug data) and thus we add + # this method, conditionally, since SB CPUPM doesn't seem to care about it. + # + if [ $gBridgeType -eq $IVY_BRIDGE ] + then + if [ $currentCPU -eq 1 ]; + then + _printScopeACST 1 + else + echo ' Method (ACST, 0, NotSerialized) { Return (\_PR.'$gProcLabel'1.ACST ()) }' >> $gSsdtPR + fi + fi + + echo ' }' >> $gSsdtPR + let currentCPU+=1 + done + + echo '}' >> $gSsdtPR +} + +#-------------------------------------------------------------------------------- + +function _getModelName() +{ + # + # Grab 'compatible' property from ioreg (stripped with sed / RegEX magic). + # + echo `ioreg -p IODeviceTree -d 2 -k compatible | grep compatible | sed -e 's/ *["=<>]//g' -e 's/compatible//'` +# echo "iMac13,2" +} + +#-------------------------------------------------------------------------------- + +function _getBoardID() +{ + # + # Grab 'board-id' property from ioreg (stripped with sed / RegEX magic). + # + boardID=`ioreg -p IODeviceTree -d 2 -k board-id | grep board-id | sed -e 's/ *["=<>]//g' -e 's/board-id//'` +} + +#-------------------------------------------------------------------------------- + +function _getCPUtype() +{ + # + # Grab 'cpu-type' property from ioreg (stripped with sed / RegEX magic). + # + local grepStr=`ioreg -p IODeviceTree -n CPU0@0 -k cpu-type | grep cpu-type | sed -e 's/ *[-|="<a-z>]//g'` + # + # Swap bytes with help of ${str:pos:num} + # + echo ${grepStr:2:2}${grepStr:0:2} +} + +#-------------------------------------------------------------------------------- + +function _getCPUModel() +{ + # + # Returns the hexadecimal value of machdep.cpu.model + # + echo 0x$(echo "obase=16; `sysctl machdep.cpu.model | sed -e 's/^machdep.cpu.model: //'`" | bc) +} + +#-------------------------------------------------------------------------------- + +function _getSystemType() +{ + # + # Grab 'system-type' property from ioreg (stripped with sed / RegEX magic). + # + # Note: This property is checked (cmpb $0x02) in X86PlatformPlugin::configResourceCallback + # + echo `ioreg -p IODeviceTree -d 2 -k system-type | grep system-type | sed -e 's/ *[-="<0a-z>]//g'` +} + +#-------------------------------------------------------------------------------- + +function _findIasl() +{ + if ((gCallIasl)); then + iasl=`find /Applications -name iasl -print -quit` + + if [ "$iasl" == "" ]; then + gCallIasl=0 + fi + fi +} + +#-------------------------------------------------------------------------------- + +function _setDestinationPath +{ + # + # Checking for RevoBoot + # + if [ -d /EFI/ACPI ]; then + gDestinationPath="/Extra/ACPI/" + fi + + # + # Checking for Clover + # + if [ -d /EFI/ACPI/patched ]; then + gDestinationPath="/EFI/ACPI/patched/" + fi +} + +#-------------------------------------------------------------------------------- + +function _getCPUNumberFromBrandString +{ + # + # Get CPU brandstring + # + local brandString=$(echo `sysctl machdep.cpu.brand_string` | sed -e 's/machdep.cpu.brand_string: //') + # + # Save default (0) delimiter + # + local ifs=$IFS + # + # Change delimiter to a space character + # + IFS=" " + # + # Split brandstring into array (data) + # + local data=($brandString) +# local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "V2" "@" "2.5GHz") +# local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "@" "2.5GHz") + # + # Example from a MacBookPro10,2 + # + # echo "${data[0]}" # Intel(R) + # echo "${data[1]}" # Core(TM) + # echo "${data[2]}" # i5-3210M + # echo "${data[3]}" # CPU + # echo "${data[4]}" # @ + # echo "${data[5]}" # 2.50GHz + # + # or: "Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz" + # + # echo "${data[0]}" # Intel(R) + # echo "${data[1]}" # Xeon(R) + # echo "${data[2]}" # CPU + # echo "${data[3]}" # E3-12XX + # echo "${data[4]}" # V2 + # echo "${data[5]}" # @ + # echo "${data[6]}" # 3.30GHz + + # + # Restore the default delimiter + # + IFS=$ifs + + let length=${#data[@]} + + if ((length > 6)); then + echo 'Warning: Unexpected brandstring > "'${data[@]}'"' + fi + + if [[ ${data[1]} == "Xeon(R)" && ${data[4]} == "V2" ]]; + then + gProcessorNumber="${data[3]} ${data[4]}" + else + gProcessorNumber="${data[2]}" + fi + +# echo $gProcessorNumber +} + +#-------------------------------------------------------------------------------- + +function _getCPUDataByProcessorNumber +{ + # + # Local function definition + # + function __searchList() + { + local ifs=$IFS + local targetCPUList=("${!1}") + + for cpuData in "${targetCPUList[@]}" + do + IFS="," + data=($cpuData) + + if [[ ${data[0]} == $gProcessorNumber ]]; then + gProcessorData="$cpuData" + let gTypeCPU=$2 + IFS=$ifs + return + fi + done + + IFS=$ifs + } + + # + # Local function callers (passing array and cpu type) + # + __searchList gDesktopIvyBridgeCPUList[@] $gDesktopCPU + + if (!(($gTypeCPU))); then + __searchList gMobileIvyBridgeCPUList[@] $gMobileCPU + fi + + if (!(($gTypeCPU))); then + __searchList "gServerIvyBridgeCPUList[@]" $gServerCPU + fi + +# echo "gTypeCPU is $gTypeCPU" +} + +#-------------------------------------------------------------------------------- + +function _showLowPowerStates() +{ + # + # Local function definition + # + function __print() + { + local mask=1 + local cStates=$1 + + printf "Injected C-States for ${gProcLabel}${2} (" + + for state in C1 C2 C3 C6 C7 + do + if (($cStates & $mask)); then + if (($mask > 1)); then + printf "," + fi + + printf "$state" + fi + + let mask=$(($mask << 1)) + done + + echo ')' + } + + # + # Local function callers + # + __print $gACST_CPU0 0 + + if ((gBridgeType == $IVY_BRIDGE)); then + __print $gACST_CPU1 1 + fi +} + +#-------------------------------------------------------------------------------- + +function _checkSMCKeys() +{ + # + # TODO: Check SMC keys to see if they are there and properly initialized! + # + # Note: Do <i>not</i> dump SMC keys with HWSensors/iStat or other SMC plug-ins installed! + # + local filename="/System/Library/Extensions/FakeSMC.kext/Contents/Info.plist" + local data=`grep -so '<key>[a-zA-Z]*</key>' $filename | sed -e 's/<key>//' -e 's/<\/key>//g'` + + local status=`echo $data | grep -oe 'DPLM'` + + if [ $status == 'DPLM' ]; then + # DPLM [{lim] (bytes 00 00 00 00 00) + # CPU, Idle, IGPU, EGPU and Memory P-State limits + echo "SMC key 'DPLM' found (OK)" + fi +set -x + local status=`echo $data | grep -oe 'MSAL'` + + if [ $status == 'MSAL' ]; then + # MSAL [hex_] (bytes 4b) + echo "SMC key 'MSAL' found (OK)" + fi +} + +#-------------------------------------------------------------------------------- + +function _initSandyBridgeSetup() +{ + case $boardID in + Mac-942B59F58194171B) + gSystemType=1 + gMacModelIdentifier="iMac12,1" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-942B5BF58194151B) + gSystemType=1 + gMacModelIdentifier="iMac12,2" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-8ED6AF5B48C039E1) + gSystemType=1 + gMacModelIdentifier="Macmini5,1" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-4BC72D62AD45599E) + gSystemType=1 + gMacModelIdentifier="Macmini5,2" + gACST_CPU0=13 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-7BA5B2794B2CDB12) + gSystemType=1 + gMacModelIdentifier="Macmini5,3" + gACST_CPU0=13 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-94245B3640C91C81) + gSystemType=2 + gMacModelIdentifier="MacBookPro8,1" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-94245A3940C91C80) + gSystemType=2 + gMacModelIdentifier="MacBookPro8,2" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-942459F5819B171B) + gSystemType=2 + gMacModelIdentifier="MacBookPro8,3" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-C08A6BB70A942AC2) + gSystemType=2 + gMacModelIdentifier="MacBookAir4,1" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-742912EFDBEE19B3) + gSystemType=2 + gMacModelIdentifier="MacBookAir4,2" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + esac +} + +#-------------------------------------------------------------------------------- + +function _initIvyBridgeSetup() +{ + case $boardID in + Mac-00BE6ED71E35EB86) + gSystemType=1 + gMacModelIdentifier="iMac13,1" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-FC02E91DDD3FA6A4) + gSystemType=1 + gMacModelIdentifier="iMac13,2" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-031AEE4D24BFF0B1) + gSystemType=1 + gMacModelIdentifier="Macmini6,1" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-F65AE981FFA204ED) + gSystemType=1 + gMacModelIdentifier="Macmini6,2" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-4B7AC7E43945597E) + gSystemType=2 + gMacModelIdentifier="MacBookPro9,1" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-6F01561E16C75D06) + gSystemType=2 + gMacModelIdentifier="MacBookPro9,2" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-C3EC7CD22292981F) + gSystemType=2 + gMacModelIdentifier="MacBookPro10,1" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-AFD8A9D944EA4843) + gSystemType=2 + gMacModelIdentifier="MacBookPro10,2" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-66F35F19FE2A0D05) + gSystemType=2 + gMacModelIdentifier="MacBookAir5,1" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-2E6FAB96566FE58C) + gSystemType=2 + gMacModelIdentifier="MacBookAir5,2" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + esac +} + +#-------------------------------------------------------------------------------- +# +# Only administrators (root) are allowed to run this script. +# +#-------------------------------------------------------------------------------- + +function _isRoot() +{ + if [ $(id -u) != 0 ]; then + echo "This script must be run as root" 1>&2 + exit 1 + fi + + echo 1 +} + +#-------------------------------------------------------------------------------- + +function main() +{ + printf "\nsdtPRGen.sh v$gScriptVersion Copyright (c) 2013 by Pike R. Alpha\n" + echo '-----------------------------------------------------' + + let modelSpecified=0 + let maxTurboFrequency=0 + + # + # Get installed CPU model, set bridge type and default TDP. + # + local model=$(_getCPUModel) + + _getCPUNumberFromBrandString + + if [[ $# -eq 1 ]]; then + if [[ $1 == "" ]]; + then + if [[ $gProcessorNumber != 0 ]]; then + let model=0x3A + fi + else + if (( ("${1:0:4}" == "i3-3") || (${1:0:4} == "i5-3") || (${1:0:4} == "i7-3") || (${1:0:1} == "E") )); then + let model=0x3A + let modelSpecified=1 + gProcessorNumber=$1 + fi + fi + fi + + if (($model==0x2A || $model==0x2D)); + then + let gTdp=95 + let gBridgeType=2 + local bridgeTypeString="Sandy Bridge" + else + let gTdp=77 + let gBridgeType=4 + local bridgeTypeString="Ivy Bridge" + + if (($model==0x3A || $model==0x3B)); then + _getCPUDataByProcessorNumber + fi + fi + + echo "$bridgeTypeString Core $gProcessorNumber processor installed" + + # + # gTypeCPU is greater than 0 when the processor is found in one of the CPU lists + # + if (($gTypeCPU)); + then + local ifs=$IFS + IFS="," + local cpuData=($gProcessorData) + let gTdp=${cpuData[1]} + let lfm=${cpuData[2]} + let frequency=${cpuData[3]} + let maxTurboFrequency=${cpuData[4]} + + if [ $maxTurboFrequency == 0 ]; then + let maxTurboFrequency=$frequency + fi + + let logicalCPUs=${cpuData[6]} + IFS=$ifs + + echo 'Using a maximum TDP of '$gTdp' Watt, as specified by Intel' + + # + # Check Low Frequency Mode (may be 0 aka still unknown) + # + if (($lfm == 0)); then + echo 'Warning: Low Frequency Mode is 0 (unknown)' + + if (($gTypeCPU == gMobileCPU)); + then + echo 'Now using 1200 MHz for Mobile processor' + let gBaseFrequency=1200 + else + echo 'Now using 1600 MHz for Server/Desktop processor' + let gBaseFrequency=1600 + fi + fi + else + let logicalCPUs=$(echo `sysctl machdep.cpu.thread_count` | sed -e 's/^machdep.cpu.thread_count: //') + let frequency=$(echo `sysctl hw.cpufrequency` | sed -e 's/^hw.cpufrequency: //') + let frequency=($frequency / 1000000) + fi + + if (!(($modelSpecified))); then + # + # Command line arguments (used as override values). + # + if [[ $# -ge 1 && $1 != "" ]]; then + let maxTurboFrequency=$1 + fi + + if [ $# -ge 2 ]; then + let gTdp=$2 + echo "Max TDP override, now using: $gTdp Watt" + fi + + if [ $# -eq 3 ]; then + if [ $3 -eq 0 ]; + then + let gBridgeType=2 + echo "CPU type override, now using: Sandy Bridge" + else + let gBridgeType=4 + echo "CPU type override, now using: Ivy Bridge" + fi + fi + fi + + echo "$logicalCPUs logical CPU's detected with a Core Frequency of $frequency MHz" + + # + # Check maxTurboFrequency + # + if [ $maxTurboFrequency == 0 ]; then + printf "\nError: Unknown processor number... exiting\n" + echo "Try: $0 MaxTurboFrequency [TDP (Watts) CPU (0=SandyBridge, 1=IvyBridge)]" + exit 1 + fi + + # + # Get number of Turbo states. + # + let turboStates=$(echo "(($maxTurboFrequency - $frequency) / 100)" | bc) + + # + # Check number of Turbo states. + # + if [ $turboStates -lt 0 ]; then + let turboStates=0 + fi + + # + # Report number of Turbo States + # + if [ $turboStates -gt 0 ]; + then + let minTurboFrequency=($frequency+100) + echo "Number of Turbo States: $turboStates ($minTurboFrequency-$maxTurboFrequency MHz)" + + else + echo "Number of Turbo States: 0" + fi + + local packageLength=$(echo "((($maxTurboFrequency - $gBaseFrequency)+100) / 100)" | bc) + + echo "Number of P-States: $packageLength ($gBaseFrequency-$maxTurboFrequency MHz)" + + _printHeader + _printExternals $logicalCPUs + _printDebugInfo $logicalCPUs $gTdp $packageLength $turboStates $maxTurboFrequency + _printScopeStart $turboStates $packageLength + _printPackages $gTdp $frequency $maxTurboFrequency + + _getBoardID + + local modelID=$(_getModelName) + + local cpu_type=$(_getCPUtype) + local currentSystemType=$(_getSystemType) + + if [ $gBridgeType -eq $IVY_BRIDGE ]; + then + local cpuTypeString="07" + + _initIvyBridgeSetup + + _printScopeACST 0 + _printMethodDSM + _printScopeCPUn $logicalCPUs + else + local cpuTypeString="06" + + _initSandyBridgeSetup + + _printScopeACST 0 + _printScopeCPUn $logicalCPUs + fi + + _showLowPowerStates + + if [ ${cpu_type:0:2} -ne $cpuTypeString ]; then + echo "Warning: 'cpu-type' may be set improperly (0x$cpu_type instead of 0x$cpuTypeString${cpu_type:2:2})" + fi + + if [ $gSystemType -eq 0 ]; + then + echo "Warning: 'board-id' [$boardID] is not supported by $bridgeTypeString PM" + else + if [ "$gMacModelIdentifier" != "$modelID" ]; then + echo "Error: board-id [$boardID] and model [$modelID] mismatch" + fi + + if [ $currentSystemType -ne $gSystemType ]; then + echo "Warning: 'system-type' may be set improperly ($currentSystemType instead of $gSystemType)" + fi + fi +} + +#==================================== START ===================================== + +main "$1" $2 $3 + +_findIasl + +if ((gCallIasl)); then + # + # Compile SSDT.dsl + # + "$iasl" $gSsdtPR + + # + # Copy SSDT_PR.aml to target location + # + if (($gAutoCopy)); then + _setDestinationPath + cp $gSsdtPR ${gDestinationPath}${gDestinationFile} + fi + +fi + +if ((gCallOpen)); then + open $gSsdtPR +fi + +exit 0 + +#================================================================================ diff --git a/i386/libsaio/acpi/examples/MAXIMUS V GENE/DSDT.dsl b/i386/libsaio/acpi/examples/MAXIMUS V GENE/DSDT.dsl new file mode 100644 index 0000000..0649962 --- /dev/null +++ b/i386/libsaio/acpi/examples/MAXIMUS V GENE/DSDT.dsl @@ -0,0 +1,3483 @@ +DefinitionBlock ("DSDT.aml", "DSDT", 3, "APPLE ", "iMac", 0x00310001) +{ + Scope (_PR) + { + Processor (CPU0, 0x01, 0x00000410, 0x06) {} + Processor (CPU1, 0x02, 0x00000410, 0x06) {} + Processor (CPU2, 0x03, 0x00000410, 0x06) {} + Processor (CPU3, 0x04, 0x00000410, 0x06) {} + Processor (CPU4, 0x05, 0x00000410, 0x06) {} + Processor (CPU5, 0x06, 0x00000410, 0x06) {} + Processor (CPU6, 0x07, 0x00000410, 0x06) {} + Processor (CPU7, 0x08, 0x00000410, 0x06) {} + } + + OperationRegion (GNVS, SystemMemory, 0xC8B89E18, 0x01D1) + Field (GNVS, AnyAcc, Lock, Preserve) + { + Offset (0x02), + SMIF, 8, + Offset (0x0B), + P80D, 32, + Offset (0x1A), + DTSE, 8, + Offset (0x1D), + DTSF, 8, + Offset (0x29), + TCNT, 8, + Offset (0x3C), + IGDS, 8, + Offset (0x75), + DSTS, 8, + Offset (0xEF), + L01C, 8, + Offset (0x15F), + TBAB, 32, + Offset (0x16B), + PFLV, 8, + Offset (0x172), + ESEL, 8, + Offset (0x1B2), + XHCI, 8, + XHPM, 8, + Offset (0x1C8), + AOAC, 8, + Offset (0x1CD), + ECTM, 32 + } + + OperationRegion (DEB0, SystemIO, 0x80, One) + Field (DEB0, ByteAcc, NoLock, Preserve) + { + DBG8, 8 + } + + OperationRegion (DEB1, SystemIO, 0x90, 0x02) + Field (DEB1, WordAcc, NoLock, Preserve) + { + DBG9, 16 + } + + OperationRegion (PRT0, SystemIO, 0x80, 0x04) + Field (PRT0, DWordAcc, Lock, Preserve) + { + P80H, 32 + } + + Method (DTGP, 2, NotSerialized) + { + If (LEqual (Arg0, Zero)) + { + Store (Buffer (One) + { + 0x03 + }, Arg1) + } + } + + Method (P8XH, 2, Serialized) + { + If (LEqual (Arg0, Zero)) + { + Store (Or (And (P80D, 0xFFFFFF00), Arg1), P80D) + } + + If (LEqual (Arg0, One)) + { + Store (Or (And (P80D, 0xFFFF00FF), ShiftLeft (Arg1, 0x08) + ), P80D) + } + + If (LEqual (Arg0, 0x02)) + { + Store (Or (And (P80D, 0xFF00FFFF), ShiftLeft (Arg1, 0x10) + ), P80D) + } + + If (LEqual (Arg0, 0x03)) + { + Store (Or (And (P80D, 0x00FFFFFF), ShiftLeft (Arg1, 0x18) + ), P80D) + } + + Store (P80D, P80H) + } + + OperationRegion (SPRT, SystemIO, 0xB2, 0x02) + Field (SPRT, ByteAcc, Lock, Preserve) + { + SSMP, 8 + } + + Method (_PIC, 1, NotSerialized) // _PIC: Interrupt Model + { + } + + OperationRegion (IO_T, SystemIO, 0x1000, 0x10) + Field (IO_T, ByteAcc, NoLock, Preserve) + { + Offset (0x08), + TRP0, 8 + } + + OperationRegion (IO_D, SystemIO, 0x0810, 0x04) + Field (IO_D, ByteAcc, NoLock, Preserve) + { + TRPD, 8 + } + + OperationRegion (IO_H, SystemIO, 0x1000, 0x04) + Field (IO_H, ByteAcc, NoLock, Preserve) + { + TRPH, 8 + } + + OperationRegion (PMIO, SystemIO, 0x0400, 0x80) + Field (PMIO, ByteAcc, NoLock, Preserve) + { + Offset (0x42), + , 1, + GPEC, 1 + } + + OperationRegion (GPIO, SystemIO, 0x0500, 0x64) + Field (GPIO, ByteAcc, NoLock, Preserve) + { + Offset (0x0F), + , 1, + , 2, + GP27, 1 + } + + OperationRegion (RCRB, SystemMemory, 0xFED1C000, 0x4000) + Field (RCRB, DWordAcc, Lock, Preserve) + { + Offset (0x341A), + RP1D, 1, + RP2D, 1, + RP3D, 1, + RP4D, 1, + RP5D, 1, + RP6D, 1, + RP7D, 1, + RP8D, 1 + } + + Scope (_SB) + { + Name (PW94, Package (0x02) + { + 0x09, + 0x04 + }) + Name (PWD4, Package (0x02) + { + 0x0D, + 0x04 + }) + Device (PCI0) + { + Name (_HID, EisaId ("PNP0A08")) // _HID: Hardware ID + Name (_CID, EisaId ("PNP0A03")) // _CID: Compatible ID + Name (_ADR, Zero) // _ADR: Address + Name (_BBN, Zero) // _BBN: BIOS Bus Number + Name (_UID, Zero) // _UID: Unique ID + Name (_PRT, Package (0x24) // _PRT: PCI Routing Table + { + Package (0x04) + { + 0x001FFFFF, + Zero, + Zero, + 0x15 + }, + + Package (0x04) + { + 0x001FFFFF, + One, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x001FFFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x001FFFFF, + 0x03, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x0014FFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x001DFFFF, + Zero, + Zero, + 0x17 + }, + + Package (0x04) + { + 0x001DFFFF, + One, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x001DFFFF, + 0x02, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x001DFFFF, + 0x03, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x001AFFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x001AFFFF, + One, + Zero, + 0x15 + }, + + Package (0x04) + { + 0x001AFFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x001AFFFF, + 0x03, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x001BFFFF, + Zero, + Zero, + 0x16 + }, + + Package (0x04) + { + 0x0019FFFF, + Zero, + Zero, + 0x14 + }, + + Package (0x04) + { + 0x0016FFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x0016FFFF, + One, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x0016FFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x0016FFFF, + 0x03, + Zero, + 0x11 + }, + + Package (0x04) + { + 0x001CFFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x001CFFFF, + One, + Zero, + 0x11 + }, + + Package (0x04) + { + 0x001CFFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x001CFFFF, + 0x03, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x0001FFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x0001FFFF, + One, + Zero, + 0x11 + }, + + Package (0x04) + { + 0x0001FFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x0001FFFF, + 0x03, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x0006FFFF, + Zero, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x0006FFFF, + One, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x0006FFFF, + 0x02, + Zero, + 0x11 + }, + + Package (0x04) + { + 0x0006FFFF, + 0x03, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x0004FFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x0004FFFF, + One, + Zero, + 0x11 + }, + + Package (0x04) + { + 0x0004FFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x0004FFFF, + 0x03, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x0002FFFF, + Zero, + Zero, + 0x10 + } + }) + OperationRegion (HBUS, PCI_Config, Zero, 0x0100) + Field (HBUS, DWordAcc, NoLock, Preserve) + { + Offset (0x40), + , 1, + , 11, + EPBR, 20, + Offset (0x48), + , 1, + , 14, + MHBR, 17, + Offset (0x60), + , 1, + PXSZ, 2, + , 23, + PXBR, 6, + Offset (0x68), + , 1, + , 11, + DIBR, 20, + Offset (0x70), + , 20, + MEBR, 12, + Offset (0x80), + , 4, + PM0H, 2, + Offset (0x81), + PM1L, 2, + , 2, + PM1H, 2, + Offset (0x82), + PM2L, 2, + , 2, + PM2H, 2, + Offset (0x83), + PM3L, 2, + , 2, + PM3H, 2, + Offset (0x84), + PM4L, 2, + , 2, + PM4H, 2, + Offset (0x85), + PM5L, 2, + , 2, + PM5H, 2, + Offset (0x86), + PM6L, 2, + , 2, + PM6H, 2, + Offset (0xA8), + , 20, + TUUD, 19, + Offset (0xBC), + , 20, + TLUD, 12 + } + + Name (BUF0, ResourceTemplate () + { + WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, + 0x0000, // Granularity + 0x0000, // Range Minimum + 0x00FF, // Range Maximum + 0x0000, // Translation Offset + 0x0100, // Length + ,, _Y00) + DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, + 0x00000000, // Granularity + 0x00000000, // Range Minimum + 0x00000CF7, // Range Maximum + 0x00000000, // Translation Offset + 0x00000CF8, // Length + ,, , TypeStatic) + IO (Decode16, + 0x0CF8, // Range Minimum + 0x0CF8, // Range Maximum + 0x01, // Alignment + 0x08, // Length + ) + DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, + 0x00000000, // Granularity + 0x00000D00, // Range Minimum + 0x0000FFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x0000F300, // Length + ,, , TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000A0000, // Range Minimum + 0x000BFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00020000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000C0000, // Range Minimum + 0x000C3FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y01, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000C4000, // Range Minimum + 0x000C7FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y02, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000C8000, // Range Minimum + 0x000CBFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y03, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000CC000, // Range Minimum + 0x000CFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y04, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000D0000, // Range Minimum + 0x000D3FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y05, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000D4000, // Range Minimum + 0x000D7FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y06, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000D8000, // Range Minimum + 0x000DBFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y07, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000DC000, // Range Minimum + 0x000DFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y08, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000E0000, // Range Minimum + 0x000E3FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y09, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000E4000, // Range Minimum + 0x000E7FFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y0A, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000E8000, // Range Minimum + 0x000EBFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y0B, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000EC000, // Range Minimum + 0x000EFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00004000, // Length + ,, _Y0C, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x000F0000, // Range Minimum + 0x000FFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00010000, // Length + ,, _Y0D, AddressRangeMemory, TypeStatic) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0xFEAFFFFE, // Range Minimum + 0xFEAFFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x00000002, // Length + ,, _Y0E, AddressRangeMemory, TypeStatic) + QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x0000000000000000, // Granularity + 0x0000000000010000, // Range Minimum + 0x000000000001FFFF, // Range Maximum + 0x0000000000000000, // Translation Offset + 0x0000000000010000, // Length + ,, _Y0F, AddressRangeMemory, TypeStatic) + }) + Method (_CRS, 0, Serialized) // _CRS: Current Resource Settings + { + CreateWordField (BUF0, \_SB.PCI0._Y00._MAX, PBMX) // _MAX: Maximum Base Address + Store (0x3E, PBMX) + CreateWordField (BUF0, \_SB.PCI0._Y00._LEN, PBLN) // _LEN: Length + Store (0x3F, PBLN) + If (PM1L) + { + CreateDWordField (BUF0, \_SB.PCI0._Y01._LEN, C0LN) // _LEN: Length + Store (Zero, C0LN) + } + + If (LEqual (PM1L, One)) + { + CreateBitField (BUF0, \_SB.PCI0._Y01._RW, C0RW) // _RW_: Read-Write Status + Store (Zero, C0RW) + } + + If (PM1H) + { + CreateDWordField (BUF0, \_SB.PCI0._Y02._LEN, C4LN) // _LEN: Length + Store (Zero, C4LN) + } + + If (LEqual (PM1H, One)) + { + CreateBitField (BUF0, \_SB.PCI0._Y02._RW, C4RW) // _RW_: Read-Write Status + Store (Zero, C4RW) + } + + If (PM2L) + { + CreateDWordField (BUF0, \_SB.PCI0._Y03._LEN, C8LN) // _LEN: Length + Store (Zero, C8LN) + } + + If (LEqual (PM2L, One)) + { + CreateBitField (BUF0, \_SB.PCI0._Y03._RW, C8RW) // _RW_: Read-Write Status + Store (Zero, C8RW) + } + + If (PM2H) + { + CreateDWordField (BUF0, \_SB.PCI0._Y04._LEN, CCLN) // _LEN: Length + Store (Zero, CCLN) + } + + If (LEqual (PM2H, One)) + { + CreateBitField (BUF0, \_SB.PCI0._Y04._RW, CCRW) // _RW_: Read-Write Status + Store (Zero, CCRW) + } + + If (PM3L) + { + CreateDWordField (BUF0, \_SB.PCI0._Y05._LEN, D0LN) // _LEN: Length + Store (Zero, D0LN) + } + + If (LEqual (PM3L, One)) + { + CreateBitField (BUF0, \_SB.PCI0._Y05._RW, D0RW) // _RW_: Read-Write Status + Store (Zero, D0RW) + } + + If (PM3H) + { + CreateDWordField (BUF0, \_SB.PCI0._Y06._LEN, D4LN) // _LEN: Length + Store (Zero, D4LN) + } + + If (LEqual (PM3H, One)) + { + CreateBitField (BUF0, \_SB.PCI0._Y06._RW, D4RW) // _RW_: Read-Write Status + Store (Zero, D4RW) + } + + If (PM4L) + { + CreateDWordField (BUF0, \_SB.PCI0._Y07._LEN, D8LN) // _LEN: Length + Store (Zero, D8LN) + } + + If (LEqual (PM4L, One)) + { + CreateBitField (BUF0, \_SB.PCI0._Y07._RW, D8RW) // _RW_: Read-Write Status + Store (Zero, D8RW) + } + + If (PM4H) + { + CreateDWordField (BUF0, \_SB.PCI0._Y08._LEN, DCLN) // _LEN: Length + Store (Zero, DCLN) + } + + If (LEqual (PM4H, One)) + { + CreateBitField (BUF0, \_SB.PCI0._Y08._RW, DCRW) // _RW_: Read-Write Status + Store (Zero, DCRW) + } + + If (PM5L) + { + CreateDWordField (BUF0, \_SB.PCI0._Y09._LEN, E0LN) // _LEN: Length + Store (Zero, E0LN) + } + + If (LEqual (PM5L, One)) + { + CreateBitField (BUF0, \_SB.PCI0._Y09._RW, E0RW) // _RW_: Read-Write Status + Store (Zero, E0RW) + } + + If (PM5H) + { + CreateDWordField (BUF0, \_SB.PCI0._Y0A._LEN, E4LN) // _LEN: Length + Store (Zero, E4LN) + } + + If (LEqual (PM5H, One)) + { + CreateBitField (BUF0, \_SB.PCI0._Y0A._RW, E4RW) // _RW_: Read-Write Status + Store (Zero, E4RW) + } + + If (PM6L) + { + CreateDWordField (BUF0, \_SB.PCI0._Y0B._LEN, E8LN) // _LEN: Length + Store (Zero, E8LN) + } + + If (LEqual (PM6L, One)) + { + CreateBitField (BUF0, \_SB.PCI0._Y0B._RW, E8RW) // _RW_: Read-Write Status + Store (Zero, E8RW) + } + + If (PM6H) + { + CreateDWordField (BUF0, \_SB.PCI0._Y0C._LEN, ECLN) // _LEN: Length + Store (Zero, ECLN) + } + + If (LEqual (PM6H, One)) + { + CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, ECRW) // _RW_: Read-Write Status + Store (Zero, ECRW) + } + + If (PM0H) + { + CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, F0LN) // _LEN: Length + Store (Zero, F0LN) + } + + If (LEqual (PM0H, One)) + { + CreateBitField (BUF0, \_SB.PCI0._Y0D._RW, F0RW) // _RW_: Read-Write Status + Store (Zero, F0RW) + } + + CreateDWordField (BUF0, \_SB.PCI0._Y0E._MIN, M1MN) // _MIN: Minimum Base Address + CreateDWordField (BUF0, \_SB.PCI0._Y0E._MAX, M1MX) // _MAX: Maximum Base Address + CreateDWordField (BUF0, \_SB.PCI0._Y0E._LEN, M1LN) // _LEN: Length + ShiftLeft (TLUD, 0x14, M1MN) + Add (Subtract (M1MX, M1MN), One, M1LN) + CreateQWordField (BUF0, \_SB.PCI0._Y0F._LEN, MSLN) // _LEN: Length + Store (Zero, MSLN) + Return (BUF0) + } + + Name (GUID, Buffer (0x10) + { + /* 0000 */ 0x5B, 0x4D, 0xDB, 0x33, 0xF7, 0x1F, 0x1C, 0x40, + /* 0008 */ 0x96, 0x57, 0x74, 0x41, 0xC0, 0x3D, 0xD7, 0x66 + }) + Name (PA0H, Zero) + Name (PA1H, Zero) + Name (PA2H, Zero) + Name (PA3H, Zero) + Name (PA4H, Zero) + Name (PA5H, Zero) + Name (PA6H, Zero) + Method (NPTS, 1, NotSerialized) + { + Store (PM0H, PA0H) + Store (PM1H, PA1H) + Store (PM2H, PA2H) + Store (PM3H, PA3H) + Store (PM4H, PA4H) + Store (PM5H, PA5H) + Store (PM6H, PA6H) + } + + Method (NWAK, 1, NotSerialized) + { + Store (PA0H, PM0H) + Store (PA1H, PM1H) + Store (PA2H, PM2H) + Store (PA3H, PM3H) + Store (PA4H, PM4H) + Store (PA5H, PM5H) + Store (PA6H, PM6H) + } + + Device (MCHC) + { + Name (_ADR, Zero) // _ADR: Address + } + + Device (PDRC) + { + Name (_HID, EisaId ("PNP0C02")) // _HID: Hardware ID + Name (_UID, One) // _UID: Unique ID + Name (BUF0, ResourceTemplate () + { + Memory32Fixed (ReadWrite, + 0x00000000, // Address Base + 0x00004000, // Address Length + _Y10) + Memory32Fixed (ReadWrite, + 0x00000000, // Address Base + 0x00008000, // Address Length + _Y12) + Memory32Fixed (ReadWrite, + 0x00000000, // Address Base + 0x00001000, // Address Length + _Y13) + Memory32Fixed (ReadWrite, + 0x00000000, // Address Base + 0x00001000, // Address Length + _Y14) + Memory32Fixed (ReadWrite, + 0x00000000, // Address Base + 0x00000000, // Address Length + _Y15) + Memory32Fixed (ReadWrite, + 0xFED20000, // Address Base + 0x00020000, // Address Length + ) + Memory32Fixed (ReadOnly, + 0xFED90000, // Address Base + 0x00004000, // Address Length + ) + Memory32Fixed (ReadWrite, + 0xFED45000, // Address Base + 0x0004B000, // Address Length + ) + Memory32Fixed (ReadOnly, + 0xFF000000, // Address Base + 0x01000000, // Address Length + ) + Memory32Fixed (ReadOnly, + 0xFEE00000, // Address Base + 0x00100000, // Address Length + ) + Memory32Fixed (ReadWrite, + 0x00000000, // Address Base + 0x00001000, // Address Length + _Y11) + }) + Method (_CRS, 0, Serialized) // _CRS: Current Resource Settings + { + CreateDWordField (BUF0, \_SB.PCI0.PDRC._Y10._BAS, RBR0) // _BAS: Base Address + ShiftLeft (^^LPCB.RCBA, 0x0E, RBR0) + CreateDWordField (BUF0, \_SB.PCI0.PDRC._Y11._BAS, TBR0) // _BAS: Base Address + Store (TBAB, TBR0) + CreateDWordField (BUF0, \_SB.PCI0.PDRC._Y11._LEN, TBLN) // _LEN: Length + If (LEqual (TBAB, Zero)) + { + Store (Zero, TBLN) + } + + CreateDWordField (BUF0, \_SB.PCI0.PDRC._Y12._BAS, MBR0) // _BAS: Base Address + ShiftLeft (MHBR, 0x0F, MBR0) + CreateDWordField (BUF0, \_SB.PCI0.PDRC._Y13._BAS, DBR0) // _BAS: Base Address + ShiftLeft (DIBR, 0x0C, DBR0) + CreateDWordField (BUF0, \_SB.PCI0.PDRC._Y14._BAS, EBR0) // _BAS: Base Address + ShiftLeft (EPBR, 0x0C, EBR0) + CreateDWordField (BUF0, \_SB.PCI0.PDRC._Y15._BAS, XBR0) // _BAS: Base Address + ShiftLeft (PXBR, 0x1A, XBR0) + CreateDWordField (BUF0, \_SB.PCI0.PDRC._Y15._LEN, XSZ0) // _LEN: Length + ShiftRight (0x10000000, PXSZ, XSZ0) + Return (BUF0) + } + } + + Device (GIGE) + { + Name (_ADR, 0x00190000) // _ADR: Address + Alias (PWD4, _PRW) + } + + Device (EHC1) + { + Name (_ADR, 0x001D0000) // _ADR: Address + Name (_S3D, 0x03) // _S3D: S3 Device State + Name (_S4D, 0x03) // _S4D: S4 Device State + Name (AAPL, Package (0x0B) + { + "AAPL,current-available", + 0x0834, + "AAPL,current-extra", + 0x0898, + "AAPL,current-extra-in-sleep", + 0x0640, + "AAPL,max-port-current-in-sleep", + 0x0834, + "AAPL,device-internal", + 0x02, + Buffer (One) + { + 0x00 + } + }) + OperationRegion (PWKE, PCI_Config, 0x62, 0x04) + Field (PWKE, DWordAcc, NoLock, Preserve) + { + , 1, + PWUC, 8 + } + + Method (_PSW, 1, NotSerialized) // _PSW: Power State Wake + { + If (Arg0) + { + Store (Ones, PWUC) + } + Else + { + Store (Zero, PWUC) + } + } + + Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method + { + If (LEqual (Arg2, Zero)) + { + Return (Buffer (One) + { + 0x03 + }) + } + + Return (RefOf (AAPL)) + } + + Device (RHUB) + { + Name (_ADR, Zero) // _ADR: Address + Device (PRT1) + { + Name (_ADR, One) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + Zero, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x30, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 01 */ + /* Color : 000000 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 00 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 06 */ + /* VerticalPosition : 00 */ + /* HorizontalPosition : 00 */ + /* Shape : 07 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 00 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + Device (PRT1) + { + Name (_ADR, One) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 01 */ + /* Color : 000000 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 04 */ + /* VerticalPosition : 03 */ + /* HorizontalPosition : 00 */ + /* Shape : 07 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 00 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (PRT2) + { + Name (_ADR, 0x02) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 01 */ + /* Color : 000000 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 04 */ + /* VerticalPosition : 03 */ + /* HorizontalPosition : 01 */ + /* Shape : 07 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 00 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (PRT3) + { + Name (_ADR, 0x03) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 01 */ + /* Color : 000000 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 04 */ + /* VerticalPosition : 03 */ + /* HorizontalPosition : 01 */ + /* Shape : 07 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 00 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (PRT4) + { + Name (_ADR, 0x04) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 01 */ + /* Color : 000000 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 04 */ + /* VerticalPosition : 03 */ + /* HorizontalPosition : 02 */ + /* Shape : 07 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 00 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (PRT5) + { + Name (_ADR, 0x05) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 01 */ + /* Color : 000000 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 06 */ + /* VerticalPosition : 02 */ + /* HorizontalPosition : 02 */ + /* Shape : 07 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 00 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (PRT6) + { + Name (_ADR, 0x06) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 01 */ + /* Color : 000000 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 06 */ + /* VerticalPosition : 02 */ + /* HorizontalPosition : 02 */ + /* Shape : 07 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 00 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (PRT7) + { + Name (_ADR, 0x07) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 01 */ + /* Color : 000000 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 06 */ + /* VerticalPosition : 02 */ + /* HorizontalPosition : 02 */ + /* Shape : 07 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 00 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (PRT8) + { + Name (_ADR, 0x08) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 01 */ + /* Color : 000000 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 06 */ + /* VerticalPosition : 02 */ + /* HorizontalPosition : 02 */ + /* Shape : 07 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 00 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + } + } + + Alias (PWD4, _PRW) + } + + Device (EHC2) + { + Name (_ADR, 0x001A0000) // _ADR: Address + Name (_S3D, 0x03) // _S3D: S3 Device State + Name (_S4D, 0x03) // _S4D: S4 Device State + OperationRegion (PWKE, PCI_Config, 0x62, 0x04) + Field (PWKE, DWordAcc, NoLock, Preserve) + { + , 1, + PWUC, 6 + } + + Method (_PSW, 1, NotSerialized) // _PSW: Power State Wake + { + If (Arg0) + { + Store (Ones, PWUC) + } + Else + { + Store (Zero, PWUC) + } + } + + Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method + { + If (LEqual (Arg2, Zero)) + { + Return (Buffer (One) + { + 0x03 + }) + } + + Return (RefOf (^^EHC1.AAPL)) + } + + Device (RHUB) + { + Name (_ADR, Zero) // _ADR: Address + Device (PRT1) + { + Name (_ADR, One) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + Zero, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x30, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 01 */ + /* Color : 000000 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 00 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 06 */ + /* VerticalPosition : 00 */ + /* HorizontalPosition : 00 */ + /* Shape : 07 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 00 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + Device (PRT1) + { + Name (_ADR, One) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 01 */ + /* Color : 000000 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 04 */ + /* VerticalPosition : 03 */ + /* HorizontalPosition : 00 */ + /* Shape : 07 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 00 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (PRT2) + { + Name (_ADR, 0x02) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 01 */ + /* Color : 000000 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 04 */ + /* VerticalPosition : 03 */ + /* HorizontalPosition : 01 */ + /* Shape : 07 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 00 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (PRT3) + { + Name (_ADR, 0x03) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 01 */ + /* Color : 000000 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 04 */ + /* VerticalPosition : 03 */ + /* HorizontalPosition : 01 */ + /* Shape : 07 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 00 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (PRT4) + { + Name (_ADR, 0x04) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xE1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 01 */ + /* Color : 000000 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 04 */ + /* VerticalPosition : 03 */ + /* HorizontalPosition : 02 */ + /* Shape : 07 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 00 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (PRT5) + { + Name (_ADR, 0x05) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 01 */ + /* Color : 000000 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 06 */ + /* VerticalPosition : 02 */ + /* HorizontalPosition : 02 */ + /* Shape : 07 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 00 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (PRT6) + { + Name (_ADR, 0x06) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0xFF, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0xB1, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 01 */ + /* Color : 000000 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 06 */ + /* VerticalPosition : 02 */ + /* HorizontalPosition : 02 */ + /* Shape : 07 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 00 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + } + } + + Alias (PWD4, _PRW) + } + + Device (XHC1) + { + Name (_ADR, 0x00140000) // _ADR: Address + OperationRegion (XPRT, PCI_Config, 0x74, 0x6C) + Field (XPRT, DWordAcc, NoLock, Preserve) + { + Offset (0x01), + PMEE, 1, + , 6, + PMES, 1, + Offset (0x5C), + PR2, 32, + PR2M, 32, + PR3, 32, + PR3M, 32 + } + + Name (_S3D, 0x03) // _S3D: S3 Device State + Name (_S4D, 0x03) // _S4D: S4 Device State + Name (XRST, Zero) + Method (CUID, 1, Serialized) + { + If (LEqual (Arg0, Buffer (0x10) + { + /* 0000 */ 0xA9, 0x12, 0x95, 0x7C, 0x05, 0x17, 0xB4, 0x4C, + /* 0008 */ 0xAF, 0x7D, 0x50, 0x6A, 0x24, 0x23, 0xAB, 0x71 + })) + { + Return (One) + } + + Return (Zero) + } + + Method (POSC, 3, Serialized) + { + CreateDWordField (Arg2, Zero, CDW1) + CreateDWordField (Arg2, 0x08, CDW3) + If (LNotEqual (Arg1, One)) + { + Or (CDW1, 0x08, CDW1) + } + + If (LEqual (XHCI, Zero)) + { + Or (CDW1, 0x02, CDW1) + } + + If (LNot (And (CDW1, One))) + { + If (And (CDW3, One)) + { + ESEL () + } + Else + { + XSEL () + } + } + + Return (Arg2) + } + + Method (XSEL, 0, Serialized) + { + If (LOr (LEqual (XHCI, 0x02), LEqual (XHCI, 0x03))) + { + Store (One, ^^LPCB.XUSB) + Store (One, XRST) + Store (Zero, Local0) + And (PR3, 0xFFFFFFF0, Local0) + Or (Local0, XHPM, Local0) + And (Local0, PR3M, PR3) + Store (Zero, Local0) + And (PR2, 0xFFFFFFF0, Local0) + Or (Local0, XHPM, Local0) + And (Local0, PR2M, PR2) + } + } + + Method (ESEL, 0, Serialized) + { + If (LOr (LEqual (XHCI, 0x02), LEqual (XHCI, 0x03))) + { + And (PR3, 0xFFFFFFF0, PR3) + And (PR2, 0xFFFFFFF0, PR2) + Store (Zero, ^^LPCB.XUSB) + Store (Zero, XRST) + } + } + + Method (XWAK, 0, Serialized) + { + If (LOr (LEqual (^^LPCB.XUSB, One), LEqual (XRST, One))) + { + XSEL () + } + } + + Device (RHUB) + { + Name (_ADR, Zero) // _ADR: Address + Device (HSP1) + { + Name (_ADR, One) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0x03, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x69, 0x0C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 00 */ + /* Color : 0072C6 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 05 */ + /* VerticalPosition : 01 */ + /* HorizontalPosition : 00 */ + /* Shape : 03 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 01 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (HSP2) + { + Name (_ADR, 0x02) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0x03, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x69, 0x0C, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 00 */ + /* Color : 0072C6 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 05 */ + /* VerticalPosition : 01 */ + /* HorizontalPosition : 00 */ + /* Shape : 03 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 02 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (HSP3) + { + Name (_ADR, 0x03) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0x03, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x69, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 00 */ + /* Color : 0072C6 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 05 */ + /* VerticalPosition : 01 */ + /* HorizontalPosition : 00 */ + /* Shape : 03 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 03 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (HSP4) + { + Name (_ADR, 0x04) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0x03, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x69, 0x0C, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 00 */ + /* Color : 0072C6 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 05 */ + /* VerticalPosition : 01 */ + /* HorizontalPosition : 00 */ + /* Shape : 03 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 04 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (SSP1) + { + Name (_ADR, 0x05) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0x03, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x69, 0x0C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 00 */ + /* Color : 0072C6 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 05 */ + /* VerticalPosition : 01 */ + /* HorizontalPosition : 00 */ + /* Shape : 03 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 01 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (SSP2) + { + Name (_ADR, 0x06) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0x03, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x69, 0x0C, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 00 */ + /* Color : 0072C6 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 05 */ + /* VerticalPosition : 01 */ + /* HorizontalPosition : 00 */ + /* Shape : 03 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 02 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (SSP3) + { + Name (_ADR, 0x07) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0x03, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x69, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 00 */ + /* Color : 0072C6 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 05 */ + /* VerticalPosition : 01 */ + /* HorizontalPosition : 00 */ + /* Shape : 03 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 03 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + + Device (SSP4) + { + Name (_ADR, 0x08) // _ADR: Address + Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities + { + 0xFF, + 0x03, + Zero, + Zero + }) + Name (_PLD, Package (0x01) // _PLD: Physical Location of Device + { + Buffer (0x10) + { + /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x69, 0x0C, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 + /* Revision : 01 */ + /* IgnoreColor : 00 */ + /* Color : 0072C6 */ + /* Width : 0000 */ + /* Height : 0000 */ + /* UserVisible : 01 */ + /* Dock : 00 */ + /* Lid : 00 */ + /* Panel : 05 */ + /* VerticalPosition : 01 */ + /* HorizontalPosition : 00 */ + /* Shape : 03 */ + /* GroupOrientation : 00 */ + /* GroupToken : 00 */ + /* GroupPosition : 04 */ + /* Bay : 00 */ + /* Ejectable : 00 */ + /* OspmEjectRequired : 00 */ + /* CabinetNumber : 00 */ + /* CardCageNumber : 00 */ + /* Reference : 00 */ + /* Rotation : 00 */ + /* Order : 00 */ + /* VerticalOffset : 0000 */ + /* HorizontalOffset : 0000 */ + } + }) + } + } + + Alias (PWD4, _PRW) + } + + Device (HDEF) + { + Name (_ADR, 0x001B0000) // _ADR: Address + OperationRegion (HDAR, PCI_Config, Zero, 0x60) + Field (HDAR, WordAcc, NoLock, Preserve) + { + VID0, 16, + DID0, 16, + Offset (0x4C), + DCKA, 1, + Offset (0x4D), + DCKM, 1, + , 6, + DCKS, 1, + Offset (0x54), + , 15, + PMES, 1 + } + + Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method + { + If (LEqual (Arg0, Buffer (0x10) + { + /* 0000 */ 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, + /* 0008 */ 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B + })) + { + If (LNotEqual (And (VID0, 0xFFFF), 0xFFFF)) + { + Store (Package (0x02) + { + "hda-gfx", + Buffer (0x0A) + { + "onboard-1" + } + }, Local0) + DTGP (Arg2, RefOf (Local0)) + Return (Local0) + } + } + + Return (Zero) + } + + Alias (PWD4, _PRW) + } + + Device (SATA) + { + Name (_ADR, 0x001F0002) // _ADR: Address + } + + Device (SBUS) + { + Name (_ADR, 0x001F0003) // _ADR: Address + Device (BUS0) + { + Name (_CID, "smbus") // _CID: Compatible ID + Name (_ADR, Zero) // _ADR: Address + Device (DVL0) + { + Name (_ADR, 0x57) // _ADR: Address + Name (_CID, "diagsvault") // _CID: Compatible ID + } + } + } + + Device (IGPU) + { + Name (_ADR, 0x00020000) // _ADR: Address + Device (^^MEM2) + { + Name (_HID, EisaId ("PNP0C01")) // _HID: Hardware ID + Name (_UID, 0x02) // _UID: Unique ID + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + Memory32Fixed (ReadWrite, + 0x20000000, // Address Base + 0x00200000, // Address Length + ) + Memory32Fixed (ReadWrite, + 0x40000000, // Address Base + 0x00200000, // Address Length + ) + }) + Method (_STA, 0, NotSerialized) // _STA: Status + { + If (IGDS) + { + Return (0x0F) + } + + Return (Zero) + } + } + + OperationRegion (GFXH, PCI_Config, Zero, 0x40) + Field (GFXH, ByteAcc, NoLock, Preserve) + { + VID0, 16, + DID0, 16 + } + + Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method + { + If (LEqual (Arg0, Buffer (0x10) + { + /* 0000 */ 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, + /* 0008 */ 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B + })) + { + If (LNotEqual (And (VID0, 0xFFFF), 0xFFFF)) + { + Store (Package (0x02) + { + "hda-gfx", + Buffer (0x0A) + { + "onboard-1" + } + }, Local0) + DTGP (Arg2, RefOf (Local0)) + Return (Local0) + } + } + + Return (Zero) + } + } + + Device (LPCB) + { + Name (_ADR, 0x001F0000) // _ADR: Address + OperationRegion (LPC0, PCI_Config, 0x40, 0xC0) + Field (LPC0, AnyAcc, NoLock, Preserve) + { + Offset (0x40), + IOD0, 8, + IOD1, 8, + Offset (0xB0), + RAEN, 1, + , 13, + RCBA, 18 + } + + OperationRegion (LPC1, PCI_Config, 0x40, 0xC0) + Field (LPC1, AnyAcc, NoLock, Preserve) + { + Offset (0x6E), + XUSB, 1 + } + + OperationRegion (CPSB, SystemMemory, 0xDDA55E18, 0x10) + Field (CPSB, AnyAcc, NoLock, Preserve) + { + RTCX, 1 + } + + Method (SPTS, 1, NotSerialized) + { + Store (One, SLPX) + Store (One, SLPE) + } + + Method (SWAK, 1, NotSerialized) + { + Store (Zero, SLPE) + If (RTCX) {} + Else + { + Notify (PWRB, 0x02) + } + } + + OperationRegion (SMIE, SystemIO, 0x0400, 0x04) + Field (SMIE, ByteAcc, NoLock, Preserve) + { + , 10, + RTCS, 1, + , 3, + PEXS, 1, + WAKS, 1, + Offset (0x03), + PWBT, 1, + Offset (0x04) + } + + OperationRegion (SLPR, SystemIO, 0x0430, 0x08) + Field (SLPR, ByteAcc, NoLock, Preserve) + { + , 4, + SLPE, 1, + , 31, + SLPX, 1, + Offset (0x08) + } + + Method (S1RS, 1, NotSerialized) + { + Store (Zero, PLED) + If (LEqual (Arg0, One)) + { + ECWB (0xFF, 0x02) + ECWB (0x62, 0x06) + ECWB (0xFF, Zero) + } + } + + OperationRegion (GPBX, SystemIO, 0x0500, 0x80) + Field (GPBX, ByteAcc, NoLock, Preserve) + { + Offset (0x18), + , 27, + PLED, 1 + } + + Mutex (MUEC, 0x00) + OperationRegion (DLYP, SystemIO, 0xE1, One) + Field (DLYP, ByteAcc, NoLock, Preserve) + { + DELY, 8 + } + + OperationRegion (KBCP, SystemIO, Zero, 0xFF) + Field (KBCP, ByteAcc, Lock, Preserve) + { + Offset (0x62), + EC62, 8, + Offset (0x66), + EC66, 8 + } + + Field (KBCP, ByteAcc, Lock, Preserve) + { + Offset (0x66), + ECOF, 1, + ECIE, 1, + Offset (0x67) + } + + OperationRegion (ECOR, EmbeddedControl, Zero, 0x0100) + Field (ECOR, ByteAcc, Lock, Preserve) + { + Offset (0x4A), + TWKT, 8, + Offset (0xFF), + BNKD, 8 + } + + Method (IBFX, 0, Serialized) + { + Store (0x1000, Local0) + While (LAnd (Decrement (Local0), ECIE)) + { + Store (Zero, DELY) + } + } + + Method (ECWB, 2, Serialized) + { + If (LNot (Acquire (MUEC, 0xFFFF))) + { + IBFX () + Store (0x81, EC66) + IBFX () + Store (Arg0, EC62) + IBFX () + Store (Arg1, EC62) + IBFX () + Release (MUEC) + } + } + + Device (DMAC) + { + Name (_HID, EisaId ("PNP0200")) // _HID: Hardware ID + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + IO (Decode16, + 0x0000, // Range Minimum + 0x0000, // Range Maximum + 0x01, // Alignment + 0x20, // Length + ) + IO (Decode16, + 0x0081, // Range Minimum + 0x0081, // Range Maximum + 0x01, // Alignment + 0x11, // Length + ) + IO (Decode16, + 0x0093, // Range Minimum + 0x0093, // Range Maximum + 0x01, // Alignment + 0x0D, // Length + ) + IO (Decode16, + 0x00C0, // Range Minimum + 0x00C0, // Range Maximum + 0x01, // Alignment + 0x20, // Length + ) + DMA (Compatibility, NotBusMaster, Transfer8_16, ) + {4} + }) + } + + Device (FWHD) + { + Name (_HID, EisaId ("INT0800")) // _HID: Hardware ID + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + Memory32Fixed (ReadOnly, + 0xFF000000, // Address Base + 0x01000000, // Address Length + ) + }) + } + + Device (HPET) + { + Name (_HID, EisaId ("PNP0103")) // _HID: Hardware ID + Name (_CID, EisaId ("PNP0C01")) // _CID: Compatible ID + Name (_STA, 0x0F) // _STA: Status + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + IRQNoFlags () + {0} + IRQNoFlags () + {8} + Memory32Fixed (ReadWrite, + 0xFED00000, // Address Base + 0x00000400, // Address Length + ) + }) + } + + Device (IPIC) + { + Name (_HID, EisaId ("PNP0000")) // _HID: Hardware ID + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + IO (Decode16, + 0x0020, // Range Minimum + 0x0020, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0024, // Range Minimum + 0x0024, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0028, // Range Minimum + 0x0028, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x002C, // Range Minimum + 0x002C, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0030, // Range Minimum + 0x0030, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0034, // Range Minimum + 0x0034, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0038, // Range Minimum + 0x0038, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x003C, // Range Minimum + 0x003C, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00A0, // Range Minimum + 0x00A0, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00A4, // Range Minimum + 0x00A4, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00A8, // Range Minimum + 0x00A8, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00AC, // Range Minimum + 0x00AC, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00B0, // Range Minimum + 0x00B0, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00B4, // Range Minimum + 0x00B4, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00B8, // Range Minimum + 0x00B8, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00BC, // Range Minimum + 0x00BC, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x04D0, // Range Minimum + 0x04D0, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IRQNoFlags () + {2} + }) + } + + Device (LDRC) + { + Name (_HID, EisaId ("PNP0C02")) // _HID: Hardware ID + Name (_UID, 0x02) // _UID: Unique ID + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + IO (Decode16, + 0x002E, // Range Minimum + 0x002E, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x004E, // Range Minimum + 0x004E, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0061, // Range Minimum + 0x0061, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0063, // Range Minimum + 0x0063, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0065, // Range Minimum + 0x0065, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0067, // Range Minimum + 0x0067, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0070, // Range Minimum + 0x0070, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0080, // Range Minimum + 0x0080, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0092, // Range Minimum + 0x0092, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x00B2, // Range Minimum + 0x00B2, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0680, // Range Minimum + 0x0680, // Range Maximum + 0x01, // Alignment + 0x20, // Length + ) + IO (Decode16, + 0x1000, // Range Minimum + 0x1000, // Range Maximum + 0x01, // Alignment + 0x10, // Length + ) + IO (Decode16, + 0xFFFF, // Range Minimum + 0xFFFF, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0xFFFF, // Range Minimum + 0xFFFF, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0400, // Range Minimum + 0x0400, // Range Maximum + 0x01, // Alignment + 0x54, // Length + ) + IO (Decode16, + 0x0458, // Range Minimum + 0x0458, // Range Maximum + 0x01, // Alignment + 0x28, // Length + ) + IO (Decode16, + 0x0500, // Range Minimum + 0x0500, // Range Maximum + 0x01, // Alignment + 0x80, // Length + ) + IO (Decode16, + 0x164E, // Range Minimum + 0x164E, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + }) + } + + Device (RTC) + { + Name (_HID, EisaId ("PNP0B00")) // _HID: Hardware ID + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + IO (Decode16, + 0x0070, // Range Minimum + 0x0070, // Range Maximum + 0x01, // Alignment + 0x08, // Length + ) + }) + } + + Device (TIMR) + { + Name (_HID, EisaId ("PNP0100")) // _HID: Hardware ID + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + IO (Decode16, + 0x0040, // Range Minimum + 0x0040, // Range Maximum + 0x01, // Alignment + 0x04, // Length + ) + IO (Decode16, + 0x0050, // Range Minimum + 0x0050, // Range Maximum + 0x10, // Alignment + 0x04, // Length + ) + }) + } + + Device (EC) + { + Name (_HID, EisaId ("PNP0C09")) // _HID: Hardware ID + Name (_UID, Zero) // _UID: Unique ID + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + IO (Decode16, + 0x0062, // Range Minimum + 0x0062, // Range Maximum + 0x00, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0066, // Range Minimum + 0x0066, // Range Maximum + 0x00, // Alignment + 0x01, // Length + ) + }) + Name (_GPE, 0x18) // _GPE: General Purpose Events + } + + Device (MATH) + { + Name (_HID, EisaId ("PNP0C04")) // _HID: Hardware ID + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + IO (Decode16, + 0x00F0, // Range Minimum + 0x00F0, // Range Maximum + 0x00, // Alignment + 0x10, // Length + ) + IRQNoFlags () + {13} + }) + } + } + + Device (P0P1) + { + Name (_ADR, 0x001E0000) // _ADR: Address + Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake + { + 0x0B, + 0x04 + }) + Name (_PRT, Package (0x10) // _PRT: PCI Routing Table + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x15 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x16 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x17 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x14 + }, + + Package (0x04) + { + 0x0001FFFF, + Zero, + Zero, + 0x16 + }, + + Package (0x04) + { + 0x0001FFFF, + One, + Zero, + 0x15 + }, + + Package (0x04) + { + 0x0001FFFF, + 0x02, + Zero, + 0x14 + }, + + Package (0x04) + { + 0x0001FFFF, + 0x03, + Zero, + 0x17 + }, + + Package (0x04) + { + 0x0002FFFF, + Zero, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x0002FFFF, + One, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x0002FFFF, + 0x02, + Zero, + 0x11 + }, + + Package (0x04) + { + 0x0002FFFF, + 0x03, + Zero, + 0x10 + }, + + Package (0x04) + { + 0x0003FFFF, + Zero, + Zero, + 0x13 + }, + + Package (0x04) + { + 0x0003FFFF, + One, + Zero, + 0x12 + }, + + Package (0x04) + { + 0x0003FFFF, + 0x02, + Zero, + 0x15 + }, + + Package (0x04) + { + 0x0003FFFF, + 0x03, + Zero, + 0x16 + } + }) + } + + Device (RP01) + { + Name (_ADR, 0x001C0000) // _ADR: Address + Device (ARPT) + { + Name (_ADR, Zero) // _ADR: Address + Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake + { + 0x09, + 0x04 + }) + } + + Name (_PRT, Package (0x04) // _PRT: PCI Routing Table + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x11 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x13 + } + }) + Alias (PW94, _PRW) + } + + Device (RP08) + { + Name (_ADR, 0x001C0007) // _ADR: Address + Name (_PRT, Package (0x04) // _PRT: PCI Routing Table + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x13 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x10 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x11 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x12 + } + }) + Alias (PW94, _PRW) + } + + Device (PEG0) + { + Name (_ADR, 0x00010000) // _ADR: Address + Name (_PRT, Package (0x04) // _PRT: PCI Routing Table + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x10 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x11 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x12 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x13 + } + }) + Alias (PW94, _PRW) + Device (GFX0) + { + Name (_ADR, Zero) // _ADR: Address + OperationRegion (DGFX, PCI_Config, Zero, 0xF0) + Field (DGFX, DWordAcc, Lock, Preserve) + { + Offset (0x0B), + LNKV, 8 + } + + OperationRegion (PEGH, PCI_Config, Zero, 0x40) + Field (PEGH, ByteAcc, NoLock, Preserve) + { + VID0, 16, + DID0, 16 + } + + Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method + { + If (LEqual (Arg0, Buffer (0x10) + { + /* 0000 */ 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, + /* 0008 */ 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B + })) + { + If (LNotEqual (And (VID0, 0xFFFF), 0xFFFF)) + { + Store (Package (0x02) + { + "hda-gfx", + Buffer (0x0A) + { + "onboard-2" + } + }, Local0) + DTGP (Arg2, RefOf (Local0)) + Return (Local0) + } + } + + Return (0x80000002) + } + + Alias (PW94, _PRW) + } + + Device (HDAU) + { + Name (_ADR, One) // _ADR: Address + OperationRegion (HDAH, PCI_Config, Zero, 0x40) + Field (HDAH, ByteAcc, NoLock, Preserve) + { + VID0, 16, + DID0, 16 + } + + Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method + { + If (LEqual (Arg0, Buffer (0x10) + { + /* 0000 */ 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, + /* 0008 */ 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B + })) + { + If (LNotEqual (And (VID0, 0xFFFF), 0xFFFF)) + { + Store (Package (0x02) + { + "hda-gfx", + Buffer (0x0A) + { + "onboard-2" + } + }, Local0) + DTGP (Arg2, RefOf (Local0)) + Return (Local0) + } + } + + Return (0x80000002) + } + + Alias (PW94, _PRW) + } + } + + Device (PEG1) + { + Name (_ADR, 0x00010001) // _ADR: Address + Name (_PRT, Package (0x04) // _PRT: PCI Routing Table + { + Package (0x04) + { + 0xFFFF, + Zero, + Zero, + 0x11 + }, + + Package (0x04) + { + 0xFFFF, + One, + Zero, + 0x12 + }, + + Package (0x04) + { + 0xFFFF, + 0x02, + Zero, + 0x13 + }, + + Package (0x04) + { + 0xFFFF, + 0x03, + Zero, + 0x10 + } + }) + Alias (PW94, _PRW) + } + } + + Device (PWRB) + { + Name (_HID, EisaId ("PNP0C0C")) // _HID: Hardware ID + Name (_UID, 0xAA) // _UID: Unique ID + Name (_STA, 0x0B) // _STA: Status + Alias (PWD4, _PRW) + } + + Device (SLPB) + { + Name (_HID, EisaId ("PNP0C0E")) // _HID: Hardware ID + Name (_STA, 0x0B) // _STA: Status + } + } + + Scope (_GPE) + { + Method (_L01, 0, NotSerialized) // _Lxx: Level-Triggered GPE + { + Add (L01C, One, L01C) + P8XH (Zero, One) + P8XH (One, L01C) + } + + Method (_L02, 0, NotSerialized) // _Lxx: Level-Triggered GPE + { + Store (Zero, GPEC) + } + + Method (_L09, 0, NotSerialized) // _Lxx: Level-Triggered GPE + { + Notify (\_SB.PCI0.RP01, 0x02) + Notify (\_SB.PCI0.RP08, 0x02) + Notify (\_SB.PCI0.PEG0, 0x02) + Notify (\_SB.PCI0.PEG0.GFX0, 0x02) + Notify (\_SB.PCI0.PEG1, 0x02) + } + + Method (_L0B, 0, NotSerialized) // _Lxx: Level-Triggered GPE + { + Notify (\_SB.PCI0.P0P1, 0x02) + } + + Method (_L0D, 0, NotSerialized) // _Lxx: Level-Triggered GPE + { + Notify (\_SB.PCI0.EHC1, 0x02) + Notify (\_SB.PCI0.EHC2, 0x02) + Notify (\_SB.PCI0.HDEF, 0x02) + Notify (\_SB.PCI0.GIGE, 0x02) + Notify (\_SB.PCI0.XHC1, 0x02) + If (LAnd (\_SB.PCI0.XHC1.PMES, \_SB.PCI0.XHC1.PMES)) + { + Store (One, \_SB.PCI0.XHC1.PMES) + } + } + } + + Method (TRAP, 2, Serialized) + { + Store (Arg1, SMIF) + If (LEqual (Arg0, One)) + { + Store (Zero, TRP0) + } + + If (LEqual (Arg0, 0x02)) + { + Store (Arg1, DTSF) + Store (Zero, TRPD) + Return (DTSF) + } + + If (LEqual (Arg0, 0x03)) + { + Store (Zero, TRPH) + } + + Return (SMIF) + } + + Method (PTS, 1, NotSerialized) + { + If (Arg0) + { + \_SB.PCI0.LPCB.SPTS (Arg0) + \_SB.PCI0.NPTS (Arg0) + } + } + + Method (WAK, 1, NotSerialized) + { + \_SB.PCI0.LPCB.SWAK (Arg0) + \_SB.PCI0.NWAK (Arg0) + \_SB.PCI0.LPCB.S1RS (Arg0) + } + + Method (_PTS, 1, NotSerialized) // _PTS: Prepare To Sleep + { + Store (Zero, P80D) + P8XH (Zero, Arg0) + PTS (Arg0) + If (And (AOAC, One)) {} + If (LEqual (Arg0, 0x03)) + { + If (LAnd (DTSE, LGreater (TCNT, One))) + { + TRAP (0x02, 0x1E) + } + } + + If (LOr (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04)), LEqual ( + Arg0, 0x05))) + { + If (LEqual (PFLV, 0x02)) + { + Store (One, GP27) + } + } + } + + Method (_WAK, 1, Serialized) // _WAK: Wake + { + ShiftLeft (Arg0, 0x04, DBG8) + WAK (Arg0) + If (LEqual (AOAC, 0x11)) + { + If (CondRefOf (ECTM)) + { + Store (Zero, ECTM) + } + } + + If (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04))) + { + If (LAnd (DTSE, LGreater (TCNT, One))) + { + TRAP (0x02, 0x14) + } + + If (LEqual (RP1D, Zero)) + { + Notify (\_SB.PCI0.RP01, Zero) + } + + If (LEqual (RP8D, Zero)) + { + If (LEqual (DSTS, Zero)) + { + Notify (\_SB.PCI0.RP08, Zero) + } + } + } + + If (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04))) + { + \_SB.PCI0.XHC1.XWAK () + } + + Return (Package (0x02) + { + Zero, + Zero + }) + } + + Name (_S0, Package (0x03) // _S0_: S0 System State + { + Zero, + Zero, + Zero + }) + Name (_S3, Package (0x03) // _S3_: S3 System State + { + 0x05, + 0x05, + Zero + }) + Name (_S4, Package (0x03) // _S4_: S4 System State + { + 0x06, + 0x06, + Zero + }) + Name (_S5, Package (0x03) // _S5_: S5 System State + { + 0x07, + 0x07, + Zero + }) +} + diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-all-target-headers.hmap b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-all-target-headers.hmap new file mode 100644 index 0000000000000000000000000000000000000000..2616108fb2a1aa8a14a9ae184fe51e8478918fe4 GIT binary patch literal 981 zcmXR&%*|kAU|^77W?%r(4nSN6#G_y|1cpiofYPli5YM8fgB=SBa#B6>N>X#2140Ax z%TtSd6Y~<&Q*%@EN<8z@^7RQR(92-Z4=qkDD%MX)EKAi7N-fKG%Fi#+&os6$)6dCF eDo)JI*H11e)i24<&neaq@XaK~RDA{_>;(WO(MZey literal 0 HcmV?d00001 diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-generated-files.hmap b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-generated-files.hmap new file mode 100644 index 0000000000000000000000000000000000000000..94e5e7e08429f23699b86c96e002d49bad7b06f8 GIT binary patch literal 450 zcmb_Yy$ZrG5Kf(Z6_?&1h^w_rheA<0OWK?@kmf>us!uPbMP1|I!FLD8eLtMx<1J&1 zJt9^S>xgH>yxY8I9Dk`SiheZ@#we_`M|Eu4hVE!<uK9o?YG3IqU1V%|&!BZ^9SA-l zoN%Io$b;POcc5hFxFqOJ08gYGH1$k^60Mw2l-zSj*+3Db5-<m`BMQkqx+E#@7E*~_ V7=AxqLY*ntK3cG3u++ilK`#Jyexm>Y literal 0 HcmV?d00001 diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-own-target-headers.hmap b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-own-target-headers.hmap new file mode 100644 index 0000000000000000000000000000000000000000..9be379b0320f12ed5f81bc154ad3386cd2f1beb3 GIT binary patch literal 981 zcmXR&%*|kAU|^77W?*0f(hfje2E?O)ybzcL)aDArAbJ$gCj>z0m+E2eSWu9Y>X}!P zn&TW08jxR}TI8FUmzbWKo0?bRnU|KYPe_4Y27`WRacWVqeoA6ls(w&vS-w+#eu;jj kv4xp_PG(YZVrIU6azUwnNq&A#v3`JWCNZY!GZ0}f0NTJxMgRZ+ literal 0 HcmV?d00001 diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-project-headers.hmap b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-project-headers.hmap new file mode 100644 index 0000000000000000000000000000000000000000..06a2f13f361cc070b52655206a11850704e87c83 GIT binary patch literal 913 zcmXR&%*|kAU|^77W?%r(4nSN6#G`<`5CDat3J`<nQ80u<z_FkpC)G2rBsIr5AT%Jq zJhjL-F)uMaH8(Y{#4|4~UoV3}KeRZts8~NGu`E?TD77r#DL=nNKhxO4Og|?xsW>q+ aUq88^RKFxYKc`qfz&8`9NuQ9Z`V0Vq!7g<G literal 0 HcmV?d00001 diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo.dep b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo.dep new file mode 100644 index 0000000..2448927 --- /dev/null +++ b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo.dep @@ -0,0 +1,5 @@ +ffffffffffffffffffffffffffffffff 0a61d4086202b8aa99802dd5a07619a2 ffffffffffffffffffffffffffffffff 0 /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext +ffffffffffffffffffffffffffffffff 4b0a69eb869f94de6761d3cbb0fc8dca ffffffffffffffffffffffffffffffff 0 /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext/Contents/MacOS/AppleIntelCPUPowerManagementInfo +00000000000ac43a000000000000e9a6 314954ecc1dd4fb7a62e8166e69d217a ffffffffffffffffffffffffffffffff 0 /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.o +00000000501047ea000000000001a941 f53fdd286d6471c23068262ffb3e025c ffffffffffffffffffffffffffffffff 0 /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.o +00000000000000000000000000000000 9a5b9dc0f3dffe1c13b61e6a2886150c ffffffffffffffffffffffffffffffff 0 /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext/Contents/Info.plist diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo.hmap b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo.hmap new file mode 100644 index 0000000000000000000000000000000000000000..8394b61f2c2fbde0a796b58c3f20c139dd58a0ab GIT binary patch literal 2078 zcmeHH!3x4K4DCSt27kfJauCF;x{HD^l%1v9qAPUEXuEm!3;ap{L(BxhTSWvx7D!V{ z9(j2Qtz}sRLWt2&hylkl`;EP~&lI?_m>2dg_SP%#szAUyG3JMUHC|Qu&Apq!zszFI z&3ygOnb)<(Rpn4G<0PgNnvJaF5lgJxsyfhK@eyVM5{t${E?a~xwzME}peC~^Xq8&2 z2(r2XN2D#pn+^mK8r5PRNhiTq1{RIdIdnu!iMf&vtrrxg4^V_@b9_JfL25^h$+(2@ X67wZI1@h(j2^OD->@Dl<Ff7C!9s9^i literal 0 HcmV?d00001 diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources/AppleIntelCPUPowerManagementInfo_info.c b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources/AppleIntelCPUPowerManagementInfo_info.c new file mode 100644 index 0000000..d3c9c40 --- /dev/null +++ b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources/AppleIntelCPUPowerManagementInfo_info.c @@ -0,0 +1,9 @@ +#include <mach/mach_types.h> + +extern kern_return_t _start(kmod_info_t *ki, void *data); +extern kern_return_t _stop(kmod_info_t *ki, void *data); + +__attribute__((visibility("default"))) KMOD_EXPLICIT_DECL(com.apple.kext.AppleIntelCPUPowerManagementInfo, "1.0.0d1", _start, _stop) +__private_extern__ kmod_start_func_t *_realmain = 0; +__private_extern__ kmod_stop_func_t *_antimain = 0; +__private_extern__ int _kext_apple_cc = __APPLE_CC__ ; diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.LinkFileList b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.LinkFileList new file mode 100644 index 0000000..569a184 --- /dev/null +++ b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.LinkFileList @@ -0,0 +1 @@ +/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.o diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.d b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.d new file mode 100644 index 0000000..74eeadd --- /dev/null +++ b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.d @@ -0,0 +1,178 @@ +dependencies: \ + /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp \ + /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOLib.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/stdarg.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/sys/cdefs.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/sys/appleapiopts.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/system.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/stdint.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/machine/types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/host_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/message.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/port.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/boolean.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/boolean.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/boolean.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/vm_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/vm_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/vm_param.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/kern_return.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/kern_return.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/kern_return.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_statistics.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/time_value.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/host_notify.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/host_special_ports.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/memory_object_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_prot.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_sync.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/exception_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/exception.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/exception.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_status.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/thread_status.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/thread_status.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/_structs.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/fp_reg.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/thread_state.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/eflags.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/thread_state.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/processor_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/processor_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/processor_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/task_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/policy.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/Availability.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/AvailabilityInternal.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/task_policy.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/task_special_ports.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_policy.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_special_ports.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/clock_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_attributes.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_inherit.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_purgable.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_behavior.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_region.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/vm_param.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/kmod.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_param.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/std_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_interface.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/clock.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/string.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/sys/types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/sys/_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/machine/_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/machine/endian.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/endian.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/sys/_endian.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/_OSByteOrder.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/i386/_OSByteOrder.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/sys/_structs.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/ndr.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/OSByteOrder.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/i386/OSByteOrder.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/notify.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mig_errors.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mig.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/clock_priv.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/clock_reply_server.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/exc_server.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/host_priv.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach_debug/mach_debug_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach_debug/ipc_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach_debug/vm_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach_debug/zone_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach_debug/page_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach_debug/hash_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach_debug/lockgroup_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/host_security.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/lock_set.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_exc_server.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_host.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_port.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/notify_server.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/processor.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/processor_set.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/semaphore.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/sync_policy.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/task.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_act.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_map.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/assert.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/assert.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/macro_help.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/kern_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/thread.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/debug.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/task.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/sched_prim.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/clock.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_time.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/locks.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/machine/locks.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/locks.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/queue.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/ipc_mig.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/libkern.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOReturn.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/error.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOTypes.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/stdbool.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/OSTypes.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/OSBase.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/device/device_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOLocks.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/locks.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/machine/machine_routines.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/machine_routines.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/pexpert/pexpert.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOInterrupts.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/pexpert/boot.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/pexpert/machine/boot.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/pexpert/i386/boot.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/OSAtomic.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/thread_call.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOService.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IORegistryEntry.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSContainers.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSObject.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSMetaClass.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/OSReturn.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/TargetConditionals.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSBoolean.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSString.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSSymbol.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSData.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSNumber.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSArray.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSCollection.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSSet.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSOrderedSet.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSCollectionIterator.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSIterator.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSDictionary.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSSerialize.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSUnserialize.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IODeviceMemory.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOMemoryDescriptor.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IONotifier.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOKitDebug.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/pwr_mgt/IOPMpowerState.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/pwr_mgt/IOPM.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOMessage.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOServicePM.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOWorkLoop.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOTimerEventSource.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOEventSource.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/cpuid.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/proc_reg.h \ + /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/../../../essentials.h diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.dia b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.dia new file mode 100644 index 0000000000000000000000000000000000000000..bb0ec51b2047b4a032afb5d9dd79a4d1afd74885 GIT binary patch literal 220 zcmZ?qbaZFrVPG&|U|`^8N@2Rl_0)m?;RZ&|oP{z^66G#El)aPa*x<n<pdrR`lBG%H zlA_GHL}#T5PF5|4EtfP|&p2$I<Ixs5p}lZIYe7MKu|_+uhauNP2mW;ed~XBzq=g__ z4vO3WYfPHqWVONBa)*<}7H7*G1HNDn_8Je?st5s<Al8%)Aq^I;MyDwnjgGEj96U`S zFB>!(ofZgaxNwRvwK^zHa+q>pfe|m5cVIyjKUCNYr~;_Zkx>!o4<?{LfD{-20RLJ+ AR{#J2 literal 0 HcmV?d00001 diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.o b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.o new file mode 100644 index 0000000000000000000000000000000000000000..d0871ee510e513438d47939f1bf10bf33d7374e9 GIT binary patch literal 131408 zcmd442YeLO`UX6+n@K_fsl+T<zzB$-l913s6GAhQ771067{UUfBryd<0hK0*AlM5k zqFyVCS4F@E78HBO-mdqmSG{&cRQ#UjoH^5WHsJUBec$gN-Pv>A=Xu}L-&1C0dHLWs zhY~bR4{EsJ!|x3cXu0^{uMIw37?1H6T172Q+h%e;UMb^@@^chH{8dymM$T@OVHqDk zeDZiZu0rW8Wr+6T5Ztg%*S1g;r=8C)^;c0bBQm{dRz-Eq%v#DSDuzue9ydb4nzFO^ zA}QLFDZe*gs%yJtFd)C=RoSbYKD|D&AllykD<$t_Lw;X)gHv0C{q5CP*361DMCGsj zCb#}eH@oAA`P!RbStW|>E${zZd-JMmB1}1!y}TruFO|Q|SL>pm#LC~i+A5*owKwV? z(oTZePyW~{<F~`!IWp*5-nypgjf?6c4PJZYrvBNoyJ^7(r4h%~*Iq+oy`XsQJ%5kX zy#H?beeQOLB^mU!XEtwC{VhFRW-QmtUtX0AoV`icLjLwD8!PQJk-y^c#diFLsZw8F zHEqlc6|y<bP(?*m?fm(*HA?2Sr^acKBH){2U;TNl(_T%3J%GLTHk<jI-9lO@L;g5^ zi>}wT<GjWohdne!b<Hd@!HNpEKS-P@m5LH2VaI&85m#dfd-H2&z#CLIR?KXwsbYJ$ z>Tht3)Hls(-!<u?ymkMO{n^a6nH%Ph_8KGg^Zo6Wc<dc8?VWAfGlz}CUS(a~yhue& z<$QR9=<!x&+M5?|sw|NCJs<XFN|CF`6&2E6?esZfz@fY@|My6v)bC`Po443qe-QiH z6ZxyFtn%9X*kf<Q5!w@j7m0c8#i73Vcb-{M51970-JxsdQ1s+a`Fnb-8Bz9@pC|1d zZFb@w7s`0<y}H&{q~tBHv^TRJ4FcSozuT8d{UX!e<cnl~`C^-{<}_FS7~#0S`aWG- z1l2D4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ls>Y%}Ko literal 0 HcmV?d00001 diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.d b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.d new file mode 100644 index 0000000..27e90c5 --- /dev/null +++ b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.d @@ -0,0 +1,63 @@ +dependencies: \ + /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources/AppleIntelCPUPowerManagementInfo_info.c \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/stdint.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/machine/types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/sys/cdefs.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/host_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/message.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/port.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/boolean.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/boolean.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/boolean.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/vm_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/vm_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/vm_param.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/kern_return.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/kern_return.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/kern_return.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/sys/appleapiopts.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_statistics.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/time_value.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/host_notify.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/host_special_ports.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/memory_object_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_prot.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_sync.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/exception_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/exception.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/exception.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_status.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/thread_status.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/thread_status.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/_structs.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/fp_reg.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/thread_state.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/eflags.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/thread_state.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/processor_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/processor_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/processor_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/task_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/policy.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/Availability.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/AvailabilityInternal.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/task_policy.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/task_special_ports.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_info.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_policy.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_special_ports.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/clock_types.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_attributes.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_inherit.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_purgable.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_behavior.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_region.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/vm_param.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/kmod.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_param.h \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/std_types.h diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.dia b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.dia new file mode 100644 index 0000000000000000000000000000000000000000..bb0ec51b2047b4a032afb5d9dd79a4d1afd74885 GIT binary patch literal 220 zcmZ?qbaZFrVPG&|U|`^8N@2Rl_0)m?;RZ&|oP{z^66G#El)aPa*x<n<pdrR`lBG%H zlA_GHL}#T5PF5|4EtfP|&p2$I<Ixs5p}lZIYe7MKu|_+uhauNP2mW;ed~XBzq=g__ z4vO3WYfPHqWVONBa)*<}7H7*G1HNDn_8Je?st5s<Al8%)Aq^I;MyDwnjgGEj96U`S zFB>!(ofZgaxNwRvwK^zHa+q>pfe|m5cVIyjKUCNYr~;_Zkx>!o4<?{LfD{-20RLJ+ AR{#J2 literal 0 HcmV?d00001 diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.o b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.o new file mode 100644 index 0000000000000000000000000000000000000000..c55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&IZ)&=viBF+lt^GEy|KPYiL0@dZ>xf&a$j7SgFwRDcc zF>qXl>cAgfFBHxl!{N_qzEu3#z*L%gzHNVc^$&0KrqbUZTzD|aF+cObEpOlOnZGs; z+_7iZhdZBH{nY8<Bk#R*@cjpWaNy#_$;|nY^@mG8|HAffA1e&J_{v|#9zXKR<eEbI zix2!BzWxl-F}Ss$4WMnH10Wj|fIbWQGUyEG9Oze|KZ5=a>Oqj}K}?+h)kV;CAe1nf z0B0s4Dkg@s+5{Q^p~RETJG(!+!<oI&is_qJF=?cVS)=%3Vn-D-J5ezOq>4G9sF<Zu z#WYP+%qgjAfTTy}fK)Mo5-VniR58aA74t``m_Uk(c`a2;Y$a6YiBvIB6sr?r#avKS zOnqs^y(+5nqGA#(zPK~=@ORU8cx4uJBRKY7XP@v(Xhi*4Sax8Ga5hZvad7OJDdFZ` z!NSc^!NSd5f`ywe0{5Z4aP!xKg`3X{7H<AbuyFG^!NSc8f`yys1PeDAKl>AIen+tI zFjHqe#|LhHOX`K2rv(c)pA;<IJSAAT`GjEM=1IZA&Bp`_Hy;r!+`JKZeUDOc#>-oB zJr*L)b+4EDI8WwUuSR{GO`~bJ{$OFb7GK&dmfYgykKc&VBSMa6BG>d3G`$76Wskvs E02x?UMF0Q* literal 0 HcmV?d00001 diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/build-state.dat b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/build-state.dat new file mode 100644 index 0000000..1490c37 --- /dev/null +++ b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/build-state.dat @@ -0,0 +1,996 @@ +TAppleIntelCPUPowerManagementInfo +v5 +r1 +cCheck dependencies +cProcessInfoPlistFile /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext/Contents/Info.plist AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist +cCompileC DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.o /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources/AppleIntelCPUPowerManagementInfo_info.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler +cCompileC DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.o /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler +cLd /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext/Contents/MacOS/AppleIntelCPUPowerManagementInfo normal x86_64 +cTouch /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk +c00000000510D0CDA00000000000000AA +t1359809754 +s170 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/Availability.h +c00000000501047EA0000000000001B50 +t1343244266 +s6992 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/AvailabilityInternal.h +c00000000501047EA000000000001E923 +t1343244266 +s125219 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IODeviceMemory.h +c00000000501047EA0000000000001287 +t1343244266 +s4743 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOEventSource.h +c00000000501047EA0000000000002991 +t1343244266 +s10641 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOInterrupts.h +c00000000501047EA00000000000007AA +t1343244266 +s1962 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOKitDebug.h +c00000000501047EA00000000000012D3 +t1343244266 +s4819 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOLib.h +c00000000501047EA0000000000004C71 +t1343244266 +s19569 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOLocks.h +c00000000501047EA00000000000045C6 +t1343244266 +s17862 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOMemoryDescriptor.h +c00000000505CB8B3000000000000BF23 +t1348253875 +s48931 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOMessage.h +c00000000501047EA000000000000250D +t1343244266 +s9485 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IONotifier.h +c00000000501047EA0000000000000CC1 +t1343244266 +s3265 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IORegistryEntry.h +c00000000501047EA0000000000010602 +t1343244266 +s67074 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOReturn.h +c00000000501047EA0000000000001D9C +t1343244266 +s7580 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOService.h +c00000000501047EA000000000001F776 +t1343244266 +s128886 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOServicePM.h +c00000000501047EA0000000000000652 +t1343244266 +s1618 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOTimerEventSource.h +c00000000501047EA0000000000002A4C +t1343244266 +s10828 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOTypes.h +c00000000501047EA0000000000001759 +t1343244266 +s5977 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/IOWorkLoop.h +c00000000501047EA0000000000003B4C +t1343244266 +s15180 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/assert.h +c00000000501047EA00000000000006CC +t1343244266 +s1740 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/pwr_mgt/IOPM.h +c00000000505CB8B30000000000008B53 +t1348253875 +s35667 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/pwr_mgt/IOPMpowerState.h +c00000000501047EA0000000000000EB0 +t1343244266 +s3760 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/system.h +c00000000501047EA000000000000085B +t1343244266 +s2139 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/TargetConditionals.h +c00000000501047EC00000000000031E9 +t1343244268 +s12777 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/device/device_types.h +c00000000501047EA0000000000000F5E +t1343244266 +s3934 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/_types.h +c00000000501047EA0000000000001197 +t1343244266 +s4503 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/cpuid.h +c00000000501047EA00000000000034DA +t1343244266 +s13530 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/eflags.h +c00000000501047EA0000000000000E1E +t1343244266 +s3614 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/endian.h +c00000000501047EA0000000000001031 +t1343244266 +s4145 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/locks.h +c00000000501047EA0000000000000666 +t1343244266 +s1638 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/machine_routines.h +c00000000501047EA00000000000008A0 +t1343244266 +s2208 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/proc_reg.h +c00000000501047EA00000000000046F7 +t1343244266 +s18167 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/i386/types.h +c00000000501047EA00000000000018BD +t1343244266 +s6333 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/assert.h +c00000000501047EA0000000000000C13 +t1343244266 +s3091 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/clock.h +c00000000501047EA0000000000000C0C +t1343244266 +s3084 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/debug.h +c00000000501047EA000000000000104A +t1343244266 +s4170 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/ipc_mig.h +c00000000501047EA00000000000008AA +t1343244266 +s2218 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/kern_types.h +c00000000501047EA00000000000009EA +t1343244266 +s2538 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/locks.h +c00000000501047EA0000000000001B86 +t1343244266 +s7046 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/macro_help.h +c00000000501047EA0000000000000B23 +t1343244266 +s2851 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/queue.h +c00000000501047EA0000000000003B1C +t1343244266 +s15132 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/sched_prim.h +c00000000501047EA000000000000109A +t1343244266 +s4250 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/task.h +c00000000501047EA0000000000001007 +t1343244266 +s4103 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/thread.h +c00000000501047EA00000000000013A4 +t1343244266 +s5028 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/kern/thread_call.h +c00000000501047EA0000000000002522 +t1343244266 +s9506 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/OSAtomic.h +c00000000501047EA000000000000662A +t1343244266 +s26154 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/OSBase.h +c00000000501047EA000000000000063D +t1343244266 +s1597 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/OSByteOrder.h +c00000000501047EA0000000000002938 +t1343244266 +s10552 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/OSReturn.h +c00000000501047EA000000000000189B +t1343244266 +s6299 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/OSTypes.h +c00000000501047EA0000000000000E59 +t1343244266 +s3673 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/_OSByteOrder.h +c00000000501047EA00000000000010FF +t1343244266 +s4351 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSArray.h +c00000000501047EA0000000000005BEE +t1343244266 +s23534 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSBoolean.h +c00000000501047EA0000000000001E3A +t1343244266 +s7738 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSCollection.h +c00000000501047EA0000000000003885 +t1343244266 +s14469 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSCollectionIterator.h +c00000000501047EA000000000000191A +t1343244266 +s6426 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSContainers.h +c00000000501047EA000000000000079F +t1343244266 +s1951 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSData.h +c00000000501047EA00000000000058EA +t1343244266 +s22762 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSDictionary.h +c00000000501047EA000000000000791E +t1343244266 +s31006 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSIterator.h +c00000000501047EA00000000000010F2 +t1343244266 +s4338 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSMetaClass.h +c00000000501047EA0000000000010F15 +t1343244266 +s69397 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSNumber.h +c00000000501047EA0000000000003218 +t1343244266 +s12824 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSObject.h +c00000000501047EA0000000000003950 +t1343244266 +s14672 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSOrderedSet.h +c00000000501047EA0000000000006595 +t1343244266 +s26005 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSSerialize.h +c00000000501047EA0000000000002633 +t1343244266 +s9779 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSSet.h +c00000000501047EA00000000000063F0 +t1343244266 +s25584 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSString.h +c00000000501047EA000000000000345F +t1343244266 +s13407 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSSymbol.h +c00000000501047EA0000000000002F5E +t1343244266 +s12126 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/c++/OSUnserialize.h +c00000000501047EA0000000000000A1E +t1343244266 +s2590 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/i386/OSByteOrder.h +c00000000501047EA0000000000000B8D +t1343244266 +s2957 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/i386/_OSByteOrder.h +c00000000501047EA0000000000000AA7 +t1343244266 +s2727 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/libkern.h +c00000000501047EA0000000000001C53 +t1343244266 +s7251 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/libkern/locks.h +c00000000501047EA00000000000005D7 +t1343244266 +s1495 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/boolean.h +c00000000501047EA0000000000000B08 +t1343244266 +s2824 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/clock.h +c00000000501047EA000000000000147C +t1343244266 +s5244 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/clock_priv.h +c00000000501047EA0000000000001110 +t1343244266 +s4368 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/clock_reply_server.h +c00000000501047EA0000000000000E53 +t1343244266 +s3667 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/clock_types.h +c00000000501047EA0000000000001019 +t1343244266 +s4121 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/error.h +c00000000501047EA0000000000000F22 +t1343244266 +s3874 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/exc_server.h +c00000000501047EA00000000000019A7 +t1343244266 +s6567 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/exception_types.h +c00000000501047EA0000000000001913 +t1343244266 +s6419 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/host_info.h +c00000000501047EA0000000000001FD7 +t1343244266 +s8151 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/host_notify.h +c00000000501047EA0000000000000608 +t1343244266 +s1544 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/host_priv.h +c00000000501047EA0000000000006CFA +t1343244266 +s27898 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/host_security.h +c00000000501047EA000000000000152D +t1343244266 +s5421 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/host_special_ports.h +c00000000501047EA0000000000001C61 +t1343244266 +s7265 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/_structs.h +c00000000501047EA00000000000062D1 +t1343244266 +s25297 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/boolean.h +c00000000501047EA0000000000000A1C +t1343244266 +s2588 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/exception.h +c00000000501047EA00000000000010EE +t1343244266 +s4334 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/fp_reg.h +c00000000501047EA00000000000011B3 +t1343244266 +s4531 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/kern_return.h +c00000000501047EA0000000000000AAC +t1343244266 +s2732 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/processor_info.h +c00000000501047EA000000000000061C +t1343244266 +s1564 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/thread_state.h +c00000000501047EA00000000000006AC +t1343244266 +s1708 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/thread_status.h +c00000000501047EA0000000000002745 +t1343244266 +s10053 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/vm_param.h +c00000000501047EA0000000000001727 +t1343244266 +s5927 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/i386/vm_types.h +c00000000501047EA0000000000001266 +t1343244266 +s4710 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/kern_return.h +c00000000501047EA00000000000023B2 +t1343244266 +s9138 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/kmod.h +c00000000501047EA0000000000001A2E +t1343244266 +s6702 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/lock_set.h +c00000000501047EA0000000000001B1A +t1343244266 +s6938 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_exc_server.h +c00000000501047EA0000000000001ABE +t1343244266 +s6846 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_host.h +c00000000501047EA0000000000005294 +t1343244266 +s21140 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_interface.h +c00000000501047EA0000000000000782 +t1343244266 +s1922 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_port.h +c00000000501047EA00000000000077E0 +t1343244266 +s30688 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_time.h +c00000000501047EA00000000000006C3 +t1343244266 +s1731 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_types.h +c00000000501047EA0000000000002059 +t1343244266 +s8281 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine.h +c00000000501047EA0000000000003085 +t1343244266 +s12421 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/boolean.h +c00000000501047EA000000000000064E +t1343244266 +s1614 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/exception.h +c00000000501047EA0000000000000658 +t1343244266 +s1624 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/kern_return.h +c00000000501047EA0000000000000662 +t1343244266 +s1634 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/processor_info.h +c00000000501047EA0000000000000671 +t1343244266 +s1649 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/thread_state.h +c00000000501047EA0000000000000667 +t1343244266 +s1639 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/thread_status.h +c00000000501047EA000000000000066C +t1343244266 +s1644 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/vm_param.h +c00000000501047EA0000000000000653 +t1343244266 +s1619 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/machine/vm_types.h +c00000000501047EA0000000000000653 +t1343244266 +s1619 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/memory_object_types.h +c00000000501047EA0000000000003997 +t1343244266 +s14743 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/message.h +c00000000501047EA0000000000006311 +t1343244266 +s25361 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mig.h +c00000000501047EA000000000000150D +t1343244266 +s5389 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/mig_errors.h +c00000000501047EA0000000000001192 +t1343244266 +s4498 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/ndr.h +c00000000501047EA00000000000019EC +t1343244266 +s6636 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/notify.h +c00000000501047EA00000000000013EC +t1343244266 +s5100 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/notify_server.h +c00000000501047EA0000000000001AB5 +t1343244266 +s6837 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/policy.h +c00000000501047EA0000000000001BCF +t1343244266 +s7119 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/port.h +c00000000501047EA0000000000003264 +t1343244266 +s12900 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/processor.h +c00000000501047EA0000000000001E9E +t1343244266 +s7838 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/processor_info.h +c00000000501047EA00000000000016A8 +t1343244266 +s5800 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/processor_set.h +c00000000501047EA0000000000003005 +t1343244266 +s12293 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/semaphore.h +c00000000501047EA00000000000009EC +t1343244266 +s2540 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/std_types.h +c00000000501047EA0000000000000A85 +t1343244266 +s2693 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/sync_policy.h +c00000000501047EA0000000000000704 +t1343244266 +s1796 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/task.h +c00000000501047EA0000000000008BC5 +t1343244266 +s35781 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/task_info.h +c00000000501047EA00000000000033B3 +t1343244266 +s13235 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/task_policy.h +c00000000501047EA00000000000010C1 +t1343244266 +s4289 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/task_special_ports.h +c00000000501047EA0000000000001072 +t1343244266 +s4210 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_act.h +c00000000501047EA0000000000006436 +t1343244266 +s25654 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_info.h +c00000000501047EA0000000000001566 +t1343244266 +s5478 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_policy.h +c00000000501047EA0000000000001CDD +t1343244266 +s7389 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_special_ports.h +c00000000501047EA0000000000000C35 +t1343244266 +s3125 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_status.h +c00000000501047EA0000000000000DA4 +t1343244266 +s3492 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/time_value.h +c00000000501047EA0000000000000D00 +t1343244266 +s3328 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_attributes.h +c00000000501047EA0000000000000E52 +t1343244266 +s3666 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_behavior.h +c00000000501047EA0000000000000B62 +t1343244266 +s2914 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_inherit.h +c00000000501047EA0000000000000C84 +t1343244266 +s3204 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_map.h +c00000000501047EA000000000000721E +t1343244266 +s29214 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_param.h +c00000000501047EA0000000000002223 +t1343244266 +s8739 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_prot.h +c00000000501047EA0000000000001211 +t1343244266 +s4625 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_purgable.h +c00000000501047EA00000000000016F0 +t1343244266 +s5872 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_region.h +c00000000501047EA0000000000002DFD +t1343244266 +s11773 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_statistics.h +c00000000501047EA0000000000003238 +t1343244266 +s12856 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_sync.h +c00000000501047EA0000000000000BD5 +t1343244266 +s3029 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_types.h +c00000000501047EA0000000000000C02 +t1343244266 +s3074 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach_debug/hash_info.h +c00000000501047EA0000000000000AE6 +t1343244266 +s2790 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach_debug/ipc_info.h +c00000000501047EA0000000000000F87 +t1343244266 +s3975 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach_debug/lockgroup_info.h +c00000000501047EA00000000000009BB +t1343244266 +s2491 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach_debug/mach_debug_types.h +c00000000501047EA0000000000000B14 +t1343244266 +s2836 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach_debug/page_info.h +c00000000501047EA0000000000000A18 +t1343244266 +s2584 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach_debug/vm_info.h +c00000000501047EA00000000000016C7 +t1343244266 +s5831 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/mach_debug/zone_info.h +c00000000501047EA00000000000013E9 +t1343244266 +s5097 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/machine/_types.h +c00000000501047EA000000000000063B +t1343244266 +s1595 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/machine/endian.h +c00000000501047EA000000000000067D +t1343244266 +s1661 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/machine/locks.h +c00000000501047EA000000000000062B +t1343244266 +s1579 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/machine/machine_routines.h +c00000000501047EA000000000000065E +t1343244266 +s1630 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/machine/types.h +c00000000501047EA0000000000000678 +t1343244266 +s1656 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/pexpert/boot.h +c00000000501047EA00000000000005AA +t1343244266 +s1450 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/pexpert/i386/boot.h +c00000000501047EA0000000000001628 +t1343244266 +s5672 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/pexpert/machine/boot.h +c00000000501047EA000000000000064A +t1343244266 +s1610 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/pexpert/pexpert.h +c00000000501047EA0000000000001ECE +t1343244266 +s7886 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/stdarg.h +c00000000501047EA00000000000007CD +t1343244266 +s1997 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/stdbool.h +c00000000501047EA00000000000006D8 +t1343244266 +s1752 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/stdint.h +c00000000501047EA0000000000001A29 +t1343244266 +s6697 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/string.h +c00000000501047EA0000000000000C73 +t1343244266 +s3187 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/sys/_endian.h +c00000000501047EA000000000000165C +t1343244266 +s5724 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/sys/_structs.h +c00000000501047EA0000000000002AAE +t1343244266 +s10926 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/sys/_types.h +c00000000501047EA00000000000018AC +t1343244266 +s6316 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/sys/appleapiopts.h +c00000000501047EA0000000000000816 +t1343244266 +s2070 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/sys/cdefs.h +c00000000501047EA0000000000004975 +t1343244266 +s18805 + +N/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/sys/types.h +c00000000501047EA0000000000002905 +t1343244266 +s10501 + +N/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/../../../essentials.h +c000000005131D4050000000000001533 +t1362220037 +s5427 + +N/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +c00000000513B103900000000000025A0 +t1362825273 +s9632 +i"AppleIntelCPUPowerManagementInfo.h" + +N/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +c00000000513B1039000000000000066C +t1362825273 +s1644 + +N/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources/AppleIntelCPUPowerManagementInfo_info.c +c00000000513B10A400000000000001B9 +t1362825380 +s441 + +N/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.LinkFileList +c00000000513B10A40000000000000101 +t1362825380 +s257 + +N/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.o +t2 +s0 + +N/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.o +t2 +s0 + +N/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext +t2 +s0 + +N/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext/Contents/Info.plist +t2 +s0 + +N/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext/Contents/MacOS/AppleIntelCPUPowerManagementInfo +t2 +s0 + +NAppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist +c000000005131D4050000000000000652 +t1362220037 +s1618 + +CBuild AST from /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +r0 + +CCheck dependencies +r0 +lSLF05#21%IDEActivityLogSection1@2#32"com.apple.dt.IDE.BuildLogSection18"Check dependencies5fb53e2448ebb641^56d8402448ebb641^---0#1#0#--18"Check dependencies36"4BBBCCFD-71FD-4E14-BB47-E3A68AE10C87- + +CCompileC DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.o /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler +s384518180.271168 +e384518180.386185 +r1 +xCompileC +xDerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.o +x/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +xnormal +xx86_64 +xc++ +xcom.apple.compilers.llvm.clang.1_0.compiler +lSLF05#21%IDEActivityLogSection1@2#32"com.apple.dt.IDE.BuildLogSection128"Compile /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cppa393452448ebb641^a0dc622448ebb641^---0#0#0#-19%DVTDocumentLocation2@136"file://localhost/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp0000000000000000^4669"CompileC DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.o AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler cd /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo setenv LANG en_US.US-ASCII /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -nostdinc -fno-builtin -Wno-trigraphs -fno-exceptions -fno-rtti -msoft-float -Os -fno-common -mkernel -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wenum-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DDEBUG -DKERNEL -DKERNEL_PRIVATE -DDRIVER_PRIVATE -DAPPLE -DNeXT -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -fapple-kext -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.8 -g -Wno-sign-conversion -iquote /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-generated-files.hmap -I/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-own-target-headers.hmap -I/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-all-target-headers.hmap -iquote /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-project-headers.hmap -I/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/System/Library/Frameworks/Kernel.framework/PrivateHeaders -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers -I/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources/x86_64 -I/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources -F/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug -MMD -MT dependencies -MF /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.d --serialize-diagnostics /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.dia -c /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp -o /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.o 36"F635FAD4-0E31-4C90-B178-F5F53333FC8B- + +CCompileC DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.o /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources/AppleIntelCPUPowerManagementInfo_info.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler +s384518180.271157 +e384518180.291712 +r1 +xCompileC +xDerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.o +x/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources/AppleIntelCPUPowerManagementInfo_info.c +xnormal +xx86_64 +xc +xcom.apple.compilers.llvm.clang.1_0.compiler +lSLF05#21%IDEActivityLogSection1@2#32"com.apple.dt.IDE.BuildLogSection262"Compile /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources/AppleIntelCPUPowerManagementInfo_info.c5f7c452448ebb641^43ac4a2448ebb641^---0#0#0#-19%DVTDocumentLocation2@270"file://localhost/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources/AppleIntelCPUPowerManagementInfo_info.c0000000000000000^4815"CompileC DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.o DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources/AppleIntelCPUPowerManagementInfo_info.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler cd /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo setenv LANG en_US.US-ASCII /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch x86_64 -fmessage-length=0 -nostdinc -fno-builtin -Wno-trigraphs -msoft-float -Os -fno-common -mkernel -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -DDEBUG -DKERNEL -DKERNEL_PRIVATE -DDRIVER_PRIVATE -DAPPLE -DNeXT -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -mmacosx-version-min=10.8 -g -Wno-sign-conversion -iquote /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-generated-files.hmap -I/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-own-target-headers.hmap -I/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-all-target-headers.hmap -iquote /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/AppleIntelCPUPowerManagementInfo-project-headers.hmap -I/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/System/Library/Frameworks/Kernel.framework/PrivateHeaders -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers -I/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources/x86_64 -I/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources -F/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug -MMD -MT dependencies -MF /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.d --serialize-diagnostics /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.dia -c /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/DerivedSources/AppleIntelCPUPowerManagementInfo_info.c -o /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.o 36"8C3C8E36-9716-4A76-A07E-9F25E38F513C- + +CLd /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext/Contents/MacOS/AppleIntelCPUPowerManagementInfo normal x86_64 +s384518180.392332 +e384518180.403175 +r1 +xLd +x/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext/Contents/MacOS/AppleIntelCPUPowerManagementInfo +xnormal +xx86_64 +lSLF05#21%IDEActivityLogSection1@2#32"com.apple.dt.IDE.BuildLogSection207"Link /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext/Contents/MacOS/AppleIntelCPUPowerManagementInfo187a642448ebb641^3736672448ebb641^---0#0#0#--1551"Ld DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext/Contents/MacOS/AppleIntelCPUPowerManagementInfo normal x86_64 cd /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo setenv MACOSX_DEPLOYMENT_TARGET 10.8 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug -F/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug -filelist /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo.LinkFileList -mmacosx-version-min=10.8 -Xlinker -kext -nostdlib -lkmodc++ /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Intermediates/AppleIntelCPUPowerManagementInfo.build/Debug/AppleIntelCPUPowerManagementInfo.build/Objects-normal/x86_64/AppleIntelCPUPowerManagementInfo_info.o -lkmod -lcc_kext -o /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext/Contents/MacOS/AppleIntelCPUPowerManagementInfo 36"2202B136-B2BE-467F-B634-E73E67DD3F6B- + +CProcessInfoPlistFile /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext/Contents/Info.plist AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist +s384518180.257482 +e384518180.259892 +r1 +xProcessInfoPlistFile +x/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext/Contents/Info.plist +xAppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist +lSLF05#21%IDEActivityLogSection1@2#32"com.apple.dt.IDE.BuildLogSection84"Process AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plistc3f4412448ebb641^0588422448ebb641^---0#0#0#-19%DVTDocumentLocation2@143"file://localhost/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist0000000000000000^602"ProcessInfoPlistFile DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext/Contents/Info.plist AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist cd /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo builtin-infoPlistUtility AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist -expandbuildsettings -platform macosx -o /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext/Contents/Info.plist 36"BCBA7FDC-11DE-4A8B-A76F-66D11EE98742- + +CTouch /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext +s384518180.411069 +e384518180.415237 +r1 +xTouch +x/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext +lSLF05#21%IDEActivityLogSection1@2#32"com.apple.dt.IDE.BuildLogSection160"Touch /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext5b43692448ebb641^c74c6a2448ebb641^---0#0#0#--345"Touch DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext cd /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo /usr/bin/touch -c /Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Build/Products/Debug/AppleIntelCPUPowerManagementInfo.kext 36"1020B3C7-5E5E-40D6-B89C-B816F744FFDC- + diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Logs/Build/AC062B99-9E9E-41C9-966B-1B327D5EC5DC.xcactivitylog b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Logs/Build/AC062B99-9E9E-41C9-966B-1B327D5EC5DC.xcactivitylog new file mode 100644 index 0000000000000000000000000000000000000000..07a4dab99e208bcf21389452bd9b17d06b86a2fc GIT binary patch literal 2039 zcmV<T2MG8diwFP!000001MORDZsRx-KEd2Ua4^6E4O*h!USNP&uil`YjuAVv**_D| z5^ZxMiC&R%lEwVkJM0bjBwLj1j+4&7?j)0RC$<4SiY2M)W06(*B#j1%;T)Lw=c6d@ zr;;t1yczJ>h{856@u6{G^*ZM%&uI6qM#Kxk%JI#Dc7vMb8Hg;u(`;(}#UiIirKEW{ zJR9;WS{;*;%xFPNc~nlhP0gM)F>TwYlZk8N--z3rc*ceR{{<i71IOETX-TRXmEA?f zvpSVX-pXueWlX!f)h5@USQgzdVVb6nn{EhPu*p2I%udRSE>WlJW>T5<1%NebekYvM z^is>{f|eOAQ$~d|oj7;S@3@(7Z~BZ7G7j*8ae&Z+XRzFk9RxubCK2*5EbJKDC<ts1 z#a7?-`!O~`-$OfE>D!%Q#ZxN8R%~>&K-;vsi<}9WT2tG`8*Ukn@7v~mKh+=M-p|pm z<A|rVI>&&gL>XotV%zFWSx*0|>p2MXITunt6SNX~MwV1RrAr=gE_G)4uAZ}rAdKtj zqShtnxzLBlOj-S$ZW;G}zqy9F#!qPtl~MvWYZ0y3l4cQ+WV;1TpXkFje1#s-Nj=+o zRQHlzOFiVEQNlsDMm}pt{-nV#&9rX^zBzINo=H|Bwg%@+vK+?mv)ZU3dc7cJrY@EV zD&c}Np`k@i<dj#1R*;m7YYp*7c%i>yNB#t3JqUxomqa1LIEs<o_XE`T+yuF9gmE1A ze9ty_9qXoRc0yh(RD8Y+5=x^gXvT=7VmlB`2kwg6TDdW5#Oo^E;Sv|hlWy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upD<GUg!$1YY6+%r2IH%{aPl?@cm}UB3O{ z$S#Q8r};j7ct=DZIQvXgpK7DmDP64S6SZGS$zGTQRBRP5(UMiNCOOI^uUaWz(h5w- z6g}5At_ZqoCXr+Xq<Jc21tk)1F1KeBpNCDnPaifH`|tr{Kps>@8!bN^si<ZLq#j5< zfnfwhp>J7+_;d;rfkJ0bI_^owJ?Xe79rvW;o^;%kj(gH^PdffsI6v}McF#Bd5ipOY z8lQ(7c=se<%kL$w<s|*cMn-I5WQRQi1=#aZ;v|j*za;d7o!_oByv~4?mp{ZyrcI9A zdJy(K;@TVRpygSv>pe&pBJ4Q0Gss^4&F9^Gxl4yV550BV524byh~nYk<R8cJ=kdk3 zfBG>VYpVG8(}}LHIIb6^3I?x}X<sS9t9$b1Rr7Z~YpMxOecv!>Uc3KeR_8niMMeL$ zR8m8=0zewdFAJV2diH$-xqhv<#RFDpdeK7lV|=8r+nlRXtZ5o%fGrmVW)LIW^%4}g zmW^W1id`>?ti;_p#bVd!jCl=H-uH`<GqEkVw~-=K&raQkKP^C(?W`PnA?u!)_r4?` z*%<v|56d6rDg+-kOe3&D4>_>|!DmDehJG)E1$Gn9wiESb&AL0V;j3@C)NtPV1Wx;1 zgRwAWv$|!ywKh-u4r{o-DO=g`jRxaHbM62A=f4vsp%pTzb~4h=n*ss4-|hH8Y({;s zD@yDH*@>?nE{6#+F^;hjnP%LNHv&c-(hm*S40=7(i+kV{4q?kxgD9{}FLL70i9)>o V?orffN@+&3{{#F_obBT|001fe;@JQI literal 0 HcmV?d00001 diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Logs/Build/Cache.db b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Logs/Build/Cache.db new file mode 100644 index 0000000000000000000000000000000000000000..2375615689dec9baac0dda6ae1210f59551c2003 GIT binary patch literal 950 zcmchT&1(}u7{+%dt*!QJO{>=LG)Wt4owDEAs1#;rHyW(cHjP+4gf$t{h0X4|nN$j1 z{R6y-UPQs01yOqNs$M*bP()8&^&oh&C~mj3=&fFSFYm)MFVDkot_QBuVuJ7vzyz9i z{YI<G^U*5$Vbf-pY1ndn?|nz-uCDI=*%MVhtIMh>Nkth6nk66wn>xalgpr075lci+ zCCP}+^15IZMO{Ryffc0WbqQffm60MS#3F`a<#lBvO)@pTC`yRnf{GMFE}{Zfib$6U zQ4FHw1x=35FcCD#C=^h^Dp*JnNu)H*K%yZ_c~iBBYLd0xdwP2N`Um*E$-%*)eN}#l zIZaw-cF1Ubj@JCJ?s$!D+Yf?2?5lOZX*=HhazHE0VJ=;0IStQd?T}XaWZkc|o77_) z&t(?IF$0TEV{w`;Q8%h!?N$b_e(rht<8C<?D;E}qs(kKB&9BqRl4;=@bCw*oJnc8k z?WRei?YQ;Gs`6v8OyMAKX~|>MB{P*7{}v4|+MeB@8|5YMhF>}BIquYKdF{aP!9$0S z96feCH8PUUY(xD&)-UIK(MJ%mMgogJ|B02j)b@7DYHhKOj-_(BbSAFse@&jpVt`-2 zx8vX2N*X_znwUtRiUYD|#xHG(;K7p}C(V}mPOh8l<C5GcH_27F+uURBE%$-@2D(5J z41+YtgA$kn*T5aH0$zYs@CJMW-@z}~0sCPFs&ERPgE!%Q_z*sV&)`e=3Vwy_iH<~H SLQCjeJP>T|sNt_koc;|81tX~d literal 0 HcmV?d00001 diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Logs/Issues/8BE2DAD6-DF4F-4F8E-9FCF-211E10D22EAE.xcactivitylog b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Logs/Issues/8BE2DAD6-DF4F-4F8E-9FCF-211E10D22EAE.xcactivitylog new file mode 100644 index 0000000000000000000000000000000000000000..b0088af8a174dea1247116986e752ed727284163 GIT binary patch literal 1970 zcmV;j2Tk}NiwFP!000001MOS=PUA=te}a7nD`=&YM(yt}PFjihYYt5qA`<qve-?G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-PWmBK8kbQ#9Gw2+B>p_U9QV&Y#$!bmAAdU0^%ckUqEx})bu#TMC3v|eZ(lWk z=TTDzIQf0UpndKBk6E3I0t6-f*HK9=)d~P9sJJRwCh6Jt4dm*z;tmhkrRik{)sOL! z!fr8FrdZR|&A_l+6qrGbY}ZRr;953{Ju7y-D6$fF=M-zWdT-1c2zlQxM$W{x+{3jL znR<5WKKy9`vTSE*&<knz#Ju+<0f|=W7kgO#C{w}t4BgZNEA)^PJK%hJ1a9abhOjZ* z#Ix;0ep#~`4nz0lw_I{MZ+!x%{I0-U$mz7{SZ}4v6TibA);Cqxc5<u0JW*WxfB*UK zgbL_|OsbrYl#8}NfZ=z0eh`~cAM}b6J3)5h%ZJNhf=t7R4Lvf=xF4hc17~t)4kS4M E04Su=lK=n! literal 0 HcmV?d00001 diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Logs/Issues/Cache.db b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/Logs/Issues/Cache.db new file mode 100644 index 0000000000000000000000000000000000000000..538b23a57b2d12e48dfaf318a10b318c96ac9ea5 GIT binary patch literal 707 zcmchTPixdb7{+I!)vmS8w8sBdiWWR&NwV9TfG%V=2`*G@-L6<KA)8E-kx3>@W_P=O z1Ho_Lw@~mKcvuj`KOlJW;6=Q76FiviuEm=-=kmNf^W%M=_wD7B6hhNJK<U`=E33Pd z#f6VhDIVi#ARb^|5SIB!&N(hHAK-g5+A5*<b0<!o^U=E5bPdOLHdV)~durV?UDfhh zo@(g2t80#7xVBqjx>?gr*VNROTPrcMW~kPN=BTbyZ#qtMbE9=r`!ruUwQzcINk+>n zXOy!(QUpnHM+98p=spe^k4P3D*(}fhvL8h(4M?^-%5hf^LGfNe;w%t-j(xNev9O=w zOdNi91fR5#6A~v|cz|g+LiCI4_N(uA)*COAX+dBA@{#p0WD%~m9oG&884xilcXy5^ zRm*HK7S)`ys2>Vdl<jApkJM(L&}eOntl4=^aXS;3wzj+5Y>4^YAPZuAn5v!aGaudl z7orBe(J;+p8q#4h>_waw34eSrI7rEpuzM>bw6W9qbHwu(mM>mXE>Ct@8dt1IAuqle z|L<TsE}E-=c_0G?+yEA601Tdi=imhxgOA`d_zHf)1*pJPxCfuYF?<W(!7uO|{2^VF UdQv3qgUOTNRKeAm&P0lT15d`|*8l(j literal 0 HcmV?d00001 diff --git a/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/info.plist b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/info.plist new file mode 100644 index 0000000..cfcf71f --- /dev/null +++ b/i386/libsaio/cpu/tools/PMinfo/DerivedData/AppleIntelCPUPowerManagementInfo/info.plist @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>WorkspacePath</key> + <string>/Users/dave/RevoBoot/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo.xcodeproj</string> +</dict> +</plist> From 9bce98433d703157b3dab60250f2857dd216f480 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 31 Mar 2013 10:12:11 +0200 Subject: [PATCH 351/623] Fixed index /Extra/ACPI/SSDT_USB.aml wouldn't load. --- i386/libsaio/acpi/patcher.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/patcher.h b/i386/libsaio/acpi/patcher.h index 52e1503..479f0e5 100644 --- a/i386/libsaio/acpi/patcher.h +++ b/i386/libsaio/acpi/patcher.h @@ -503,7 +503,7 @@ void setupACPI(void) int newTableEntries = 0; // Now wade through the custom table entries to see if they have been assigned already. - for (cti = 0; cti < 13; cti++) + for (cti = 0; cti < 14; cti++) { // We need an address so check it. if (customTables[cti].table) From 4894d44e5f50f058482bd3735cceb2645babc51c Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 31 Mar 2013 10:13:56 +0200 Subject: [PATCH 352/623] Changed output to make it show the current multiplier. --- .../AppleIntelCPUPowerManagementInfo.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 4df6928..26715a0 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -100,7 +100,8 @@ inline void getCStates(void *arg) IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) { - gCoreMultipliers |= (1ULL << (rdmsr64(MSR_IA32_PERF_STS) >> 8)); + UInt8 currentMultiplier = (rdmsr64(MSR_IA32_PERF_STS) >> 8); + gCoreMultipliers |= (1ULL << currentMultiplier); timerEventSource->setTimeoutTicks(Interval); @@ -130,7 +131,14 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) if ((gTriggeredPStates & value) == value) { - IOLog("%d ", currentBit); + if (currentBit == currentMultiplier) + { + IOLog("(%d) ", currentBit); + } + else + { + IOLog("%d ", currentBit); + } } } #if REPORT_GPU_STATS From 2fe741746ee41f782cb3bb6606449d2ebee761ca Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 31 Mar 2013 10:16:32 +0200 Subject: [PATCH 353/623] Changed a compiler directive (we need the MSR values). --- .../AppleIntelCPUPowerManagementInfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index 6e6f939..ebd5a79 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -21,7 +21,7 @@ #define super IOService -#define REPORT_MSRS 0 +#define REPORT_MSRS 1 #define REPORT_GPU_STATS 0 extern "C" void mp_rendezvous_no_intrs(void (*action_func)(void *), void * arg); From 2855c4362c159f0a1eb437dae5f213ad81c18f65 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 1 Apr 2013 16:22:27 +0200 Subject: [PATCH 354/623] Typo --- .../AppleIntelCPUPowerManagementInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 26715a0..8c4d3fa 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -216,7 +216,7 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) #if REPORT_GPU_STATS /* - * TODO: Pike, add check a to see if there is a GPU and if it is is enabled! + * TODO: Pike, add check a to see if there is a GPU and if it is enabled! */ IOPhysicalAddress address = (IOPhysicalAddress)(0xFED10000 + 0x5948); memDescriptor = IOMemoryDescriptor::withPhysicalAddress(address, 0x53, kIODirectionIn); From ff3afdcf1750daa1f24d355ca55a0c63757cb22e Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 1 Apr 2013 16:23:15 +0200 Subject: [PATCH 355/623] Typo in SMB_BOARD_PRODUCT for iMac12,n fixed Thanks to 4D3K for the tip. --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 4 ++-- i386/libsaio/smbios/model_data.h | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index ac4ad53..346a10e 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -1370,14 +1370,14 @@ set -x function _initSandyBridgeSetup() { case $boardID in - Mac-942B59F58194151B) + Mac-942B5BF58194151B) gSystemType=1 gMacModelIdentifier="iMac12,1" gACST_CPU0=13 # C1, C3 and C6 gACST_CPU1=7 # C1, C2 and C3 ;; - Mac-942B5BF58194171B) + Mac-942B59F58194171B) gSystemType=1 gMacModelIdentifier="iMac12,2" gACST_CPU0=13 # C1, C3 and C6 diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 4d5ac74..ea84e8f 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -22,9 +22,11 @@ * - EFI_MODEL_NAME renamed/moved over from settings.h (PikerAlpha, October 2012). * - Data for new MacBookPro and Macmini added (PikerAlpha, October 2012). * - Data for iMac13,2 and MacBookPro9,2 added (PikerAlpha, October 2013). + * - Typo in SMB_BOARD_PRODUCT for iMac12,n fixed (PikerAlpha, April 2013). * * Credits: * - blackosx, DB1, dgsga, FKA, humph, scrax and STLVNUB (testers). + * - 4D3K for iMac12,n SMB_BOARD_PRODUCT typos. */ @@ -40,12 +42,12 @@ #elif (TARGET_MODEL == IMAC_121) #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" #define SMB_PRODUCT_NAME "iMac12,1" - #define SMB_BOARD_PRODUCT "Mac-942B59F58194151B" + #define SMB_BOARD_PRODUCT "Mac-942B5BF58194151B" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '1' } #elif (TARGET_MODEL == IMAC_122) #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" #define SMB_PRODUCT_NAME "iMac12,2" - #define SMB_BOARD_PRODUCT "Mac-942B5BF58194171B" + #define SMB_BOARD_PRODUCT "Mac-942B59F58194171B" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '2' } #elif (TARGET_MODEL == IMAC_131) #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" From 56cfdcf79afb9a4643ac13877ecafa68b5b93bad Mon Sep 17 00:00:00 2001 From: Chief <Chief@www.vumc.nl> Date: Sun, 7 Apr 2013 03:58:32 +0200 Subject: [PATCH 356/623] Whitespace changes only by Jeroen --- i386/libsa/memory.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/i386/libsa/memory.h b/i386/libsa/memory.h index 13365e6..f561709 100755 --- a/i386/libsa/memory.h +++ b/i386/libsa/memory.h @@ -86,13 +86,14 @@ #define HIB_LEN 0x00060000L // Size: 384 KB. // 0x000A0000L -#define VIDEO_ADDR (HIB_ADDR + HIB_LEN) // Unusable space. +#define VIDEO_ADDR (HIB_ADDR + HIB_LEN) // Unusable space. #define VIDEO_LEN 0x00060000L // Size: 384 KB. // 0x00100000L -#define KERNEL_ADDR (VIDEO_ADDR + VIDEO_LEN) // Kernel and MKexts/drivers. +#define KERNEL_ADDR (VIDEO_ADDR + VIDEO_LEN) // Kernel and MKexts/drivers. #define KERNEL_LEN 0x04000000L // Size: 64 MB (128 MB for Chameleon). - + // + // Note: Can cause a stop("Kernel overflows available space") // Based on KERNEL_LEN 0x04100000L #define ZALLOC_ADDR (KERNEL_ADDR + KERNEL_LEN) // Zalloc area. #define ZALLOC_LEN 0x10000000L // Size: 256 MB. @@ -106,7 +107,7 @@ #define PREBOOT_DATA (LOAD_ADDR + LOAD_LEN) // Room for a 195 MB RAM disk image (with 512 MB System Memory). -#define TFTP_ADDR LOAD_ADDR // TFTP download buffer (not used in Revolution). +#define TFTP_ADDR LOAD_ADDR // TFTP download buffer (not used in RevoBoot). #define TFTP_LEN LOAD_LEN @@ -120,17 +121,17 @@ #define vtop(vaddr) ((vaddr) + MEMBASE) // Extract segment/offset from a linear address. -#define OFFSET16(addr) ((addr) - BASE_ADDR) -#define OFFSET(addr) ((addr) & 0xFFFF) -#define SEGMENT(addr) (((addr) & 0xF0000) >> 4) +#define OFFSET16(addr) ((addr) - BASE_ADDR) +#define OFFSET(addr) ((addr) & 0xFFFF) +#define SEGMENT(addr) (((addr) & 0xF0000) >> 4) /* * Extract segment/offset in normalized form so that the resulting far pointer * will point to something that is very unlikely to straddle a segment. * This is sometimes known as a "huge" pointer. */ -#define NORMALIZED_OFFSET(addr) ((addr) & 0x000F) -#define NORMALIZED_SEGMENT(addr) (((addr) & 0xFFFF0) >> 4) +#define NORMALIZED_OFFSET(addr) ((addr) & 0x000F) +#define NORMALIZED_SEGMENT(addr) (((addr) & 0xFFFF0) >> 4) // We need a minimum of 32MB of system memory. #define MIN_SYS_MEM_KB (32 * 1024) From a627a73e16bd49de4aa7cfba48c91c4544fec5dd Mon Sep 17 00:00:00 2001 From: Chief <Chief@www.vumc.nl> Date: Sun, 7 Apr 2013 03:59:03 +0200 Subject: [PATCH 357/623] Renamed loadSystemConfig to loadCABootPlist --- i386/libsaio/bios.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/bios.h b/i386/libsaio/bios.h index 7391450..ff49ad5 100755 --- a/i386/libsaio/bios.h +++ b/i386/libsaio/bios.h @@ -90,7 +90,7 @@ typedef struct #define BASE_HD_DRIVE 0x80 /* - * Used in saio_types.h and in StringTable.c (function loadSystemConfig). + * Used in saio_types.h and in StringTable.c (function loadCABootPlist). */ #define IO_CONFIG_DATA_SIZE 4096 From 7caf607b191c22258fa51b1365d903458c3a12e1 Mon Sep 17 00:00:00 2001 From: Chief <Chief@www.vumc.nl> Date: Sun, 7 Apr 2013 03:59:23 +0200 Subject: [PATCH 358/623] Renamed loadSystemConfig to loadCABootPlist --- i386/libsaio/saio_internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/saio_internal.h b/i386/libsaio/saio_internal.h index ad0c33e..ecdb389 100755 --- a/i386/libsaio/saio_internal.h +++ b/i386/libsaio/saio_internal.h @@ -25,6 +25,7 @@ * * - loadBinaryData(load.c) and toLowerCase(string.c) added (PikerAlpha, October 2012). * - Tidied up (spaces -> tabs) (PikerAlpha, October 2012). + * - Stripped (unnecessary) argument from loadSystemConfig (PikerAlpha, April 2013). * */ @@ -167,7 +168,7 @@ extern bool getValueForKey(const char *key, const char **val, int *size, config extern bool getBoolForKey(const char *key, bool *val, config_file_t *configBuff); extern bool getIntForKey(const char *key, int *val, config_file_t *configBuff); extern long loadConfigFile(const char *configFile, config_file_t *configBuff); -extern long loadSystemConfig(config_file_t *configBuff); +extern long loadCABootPlist(void); extern char * getNextArg(char ** ptr, char * val); extern long ParseXMLFile(char * buffer, TagPtr * dict); From 1eda1c9f3f76284705fcccf0b325be0a52663ee8 Mon Sep 17 00:00:00 2001 From: Chief <Chief@www.vumc.nl> Date: Sun, 7 Apr 2013 03:59:36 +0200 Subject: [PATCH 359/623] Adding new flag --- i386/libsaio/saio_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/saio_types.h b/i386/libsaio/saio_types.h index 0d2ba5b..90e67c3 100755 --- a/i386/libsaio/saio_types.h +++ b/i386/libsaio/saio_types.h @@ -211,7 +211,8 @@ enum kBVFlagBootable = 0x08, kBVFlagEFISystem = 0x10, kBVFlagBooter = 0x20, - kBVFlagSystemVolume = 0x40 + kBVFlagSystemVolume = 0x40, + kBVFlagInstallVolume = 0x80 }; enum From 09c3f51e58ae9ab704137348ead89cb9c8aee3a8 Mon Sep 17 00:00:00 2001 From: Chief <Chief@www.vumc.nl> Date: Sun, 7 Apr 2013 04:08:23 +0200 Subject: [PATCH 360/623] Get BVRef only once --- i386/libsaio/sys.c | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/i386/libsaio/sys.c b/i386/libsaio/sys.c index d1bd2bf..66595a2 100755 --- a/i386/libsaio/sys.c +++ b/i386/libsaio/sys.c @@ -437,25 +437,21 @@ int open(const char * path, int flags) const char * filePath; BVRef bvr; - // Locate a free descriptor slot. - - for (fdesc = 0; fdesc < NFILES; fdesc++) + // Resolve the boot volume (once per call) from the file spec. + if ((bvr = getBootVolumeRef(path, &filePath)) != NULL) { - if (iob[fdesc].i_flgs == 0) + // Locate a free descriptor slot. + for (fdesc = 0; fdesc < NFILES; fdesc++) { - io = &iob[fdesc]; - bzero(io, sizeof(*io)); - - // Mark the descriptor as taken. - - io->i_flgs = F_ALLOC; - - // Resolve the boot volume from the file spec. - - if ((bvr = getBootVolumeRef(path, &filePath)) != NULL) + if (iob[fdesc].i_flgs == 0) { - // Find the next available memory block in the download buffer. + io = &iob[fdesc]; + bzero(io, sizeof(*io)); + // Mark the descriptor as taken. + io->i_flgs = F_ALLOC; + + // Find the next available memory block in the download buffer. io->i_buf = (char *) LOAD_ADDR; for (i = 0; i < NFILES; i++) @@ -469,7 +465,6 @@ int open(const char * path, int flags) } // Load entire file into memory. Unnecessary open() calls must be avoided. - gFSLoadAddress = io->i_buf; io->i_filesize = bvr->fs_loadfile(bvr, (char *)filePath); @@ -478,15 +473,16 @@ int open(const char * path, int flags) return fdesc; } } + + close(fdesc); } - } #if DEBUG - if (fdesc == NFILES) - { - stop("Out of file descriptors"); - } + if (fdesc == NFILES) + { + stop("Out of file descriptors"); + } #endif - close(fdesc); + } return -1; } @@ -933,10 +929,9 @@ BVRef getTargetRootVolume(char *rootUUID) // Traverse back from the last to the first partition in the chain. for (bvr = chain; bvr; bvr = bvr->next) { - if ((bvr->biosdev == hdIndex) && (bvr->flags & kBVFlagSystemVolume)) + if ((bvr->biosdev == hdIndex)) && ((bvr->flags & kBVFlagSystemVolume) || (bvr->flags & kBVFlagInstallVolume)) { - if ((bvr->flags & kBVFlagSystemVolume) && - (bvr->fs_getuuid(bvr, rootUUID) == EFI_SUCCESS)) + if ((bvr->flags & kBVFlagSystemVolume) && (bvr->fs_getuuid(bvr, rootUUID) == EFI_SUCCESS)) { return bvr; } From b3e469d41a75cdf83ae3218729944922bb592b0f Mon Sep 17 00:00:00 2001 From: Chief <Chief@www.vumc.nl> Date: Sun, 7 Apr 2013 04:10:57 +0200 Subject: [PATCH 361/623] Renamed stuff and additional check added - Renamed loadSystemConfig to loadCABootPlist - Renamed LION_INSTALL_SUPPORT to INSTALL_ESD_SUPPORT --- i386/libsaio/stringTable.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/stringTable.c b/i386/libsaio/stringTable.c index fa87d5e..a6072d8 100755 --- a/i386/libsaio/stringTable.c +++ b/i386/libsaio/stringTable.c @@ -27,6 +27,8 @@ * - White space changes (PikerAlpha, November 2012). * - Now checking malloc returns (PikerAlpha, November 2012). * - Cleanups, kTagTypeData support and NVRAMstorage reading changes (PikerAlpha, November 2012). + * - Renamed LION_INSTALL_SUPPORT to INSTALL_ESD_SUPPORT (PikerAlpha, April 2013). + * - Stripped (unnecessary) argument from loadSystemConfig (PikerAlpha, April 2013). * */ @@ -363,7 +365,7 @@ long loadConfigFile(const char * configFile, config_file_t *config) //============================================================================== -long loadSystemConfig(config_file_t *config) +long loadCABootPlist(void) { long retValue = (long) EFI_OUT_OF_RESOURCES; @@ -373,7 +375,7 @@ long loadSystemConfig(config_file_t *config) "com.apple.recovery.boot", #endif -#if LION_INSTALL_SUPPORT +#if INSTALL_ESD_SUPPORT ".IABootFiles", "OS X Install Data", "Mac OS X Install Data", @@ -398,11 +400,31 @@ long loadSystemConfig(config_file_t *config) { int i = 0; int len = (sizeof(dirspec) / sizeof(dirspec[0])); - +#if INSTALL_ESD_SUPPORT + int start = 0; + int end = 3; + #if LION_RECOVERY_SUPPORT + start++; + end++; + #endif +#endif for (; i < len; i++) { + bzero(path, 80); sprintf(path, "/%s/%s", dirspec[i], "com.apple.Boot.plist"); - retValue = loadConfigFile(path, config); + retValue = loadConfigFile(path, &bootInfo->bootConfig); + + if (retValue == EFI_SUCCESS) + { +#if INSTALL_ESD_SUPPORT + if (i > start && i < end) + { + // Installation data directory located + gPlatform.BootVolume->flags = kBVFlagInstallVolume; + } +#endif + break; + } } free (path); From 714aad5cdc99c570310ff989f6a94c9929d3c26a Mon Sep 17 00:00:00 2001 From: Chief <Chief@www.vumc.nl> Date: Sun, 7 Apr 2013 04:12:26 +0200 Subject: [PATCH 362/623] Changed debug text 'B/RootVolume' to 'Boot/RootVolume' --- i386/libsaio/disk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/disk.c b/i386/libsaio/disk.c index c763210..944e7f3 100644 --- a/i386/libsaio/disk.c +++ b/i386/libsaio/disk.c @@ -708,7 +708,7 @@ BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr) // Initialize with the first bootable volume. gPlatform.BootVolume = gPlatform.RootVolume = bvr; - _DISK_DEBUG_DUMP("Init B/RootVolume - partition: %d, flags: %d, gptID: %d\n", bvr->part_no, bvr->flags, gptID); + _DISK_DEBUG_DUMP("Init Boot/RootVolume - partition: %d, flags: %d, gptID: %d\n", bvr->part_no, bvr->flags, gptID); } // Bail out after finding the first System Volume. From 9435fd6cf7e2670df171806626944af695db5cff Mon Sep 17 00:00:00 2001 From: Chief <Chief@www.vumc.nl> Date: Sun, 7 Apr 2013 04:14:56 +0200 Subject: [PATCH 363/623] Fixed boot from InstallESD/BaseSystem.dmg - whitespace changes. - moved some code. - additional check added. --- i386/boot2/boot.c | 97 +++++++++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 42 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index a10333a..8518d4e 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -48,6 +48,8 @@ * - Optionally include Recovery HD support code (PikerAlpha, November 2012). * - Fixed clang compilation (PikerAlpha, November 2012). * - Unused sysConfigValid removed and white space fix (PikerAlpha, November 2012). + * - Fixed boot failure for InstallESD/BaseSystem.dmg/patched kernelcache (PikerAlpha, April 2013). + * - Renamed LION_INSTALL_SUPPORT to INSTALL_ESD_SUPPORT (PikerAlpha, April 2013). * */ @@ -88,7 +90,7 @@ unsigned long Adler32(unsigned char *buf, long len) k = len < NMAX ? len : NMAX; len -= k; - while (k >= 16) + while (k >= 16) { DO16(buf); buf += 16; @@ -122,7 +124,7 @@ static void zeroBSS() extern int _DATA_bss__end __asm("section$end$__DATA$__bss"); extern int _DATA_common__start __asm("section$start$__DATA$__common"); extern int _DATA_common__end __asm("section$end$__DATA$__common"); - + bzero(&_DATA_bss__start, (&_DATA_bss__end - &_DATA_bss__start)); bzero(&_DATA_common__start, (&_DATA_common__end - &_DATA_common__start)); } @@ -135,13 +137,13 @@ static void zeroBSS() #if SAFE_MALLOC static void mallocError(char *addr, size_t size, const char *file, int line) { - stop("\nMemory allocation error! Addr=0x%x, Size=0x%x, File=%s, Line=%d\n", (unsigned)addr, (unsigned)size, file, line); + stop("\nMemory allocation error! Addr=0x%x, Size=0x%x, File=%s, Line=%d\n", (unsigned)addr, (unsigned)size, file, line); } #else static void mallocError(char *addr, size_t size) { - printf("\nMemory allocation error (0x%x, 0x%x)\n", (unsigned)addr, (unsigned)size); - asm volatile ("hlt"); + printf("\nMemory allocation error (0x%x, 0x%x)\n", (unsigned)addr, (unsigned)size); + asm volatile ("hlt"); } #endif @@ -151,11 +153,11 @@ static void mallocError(char *addr, size_t size) void boot(int biosdev) { - zeroBSS(); - mallocInit(0, 0, 0, mallocError); + zeroBSS(); + mallocInit(0, 0, 0, mallocError); #if MUST_ENABLE_A20 - // Enable A20 gate before accessing memory above 1 MB. + // Enable A20 gate before accessing memory above 1 MB. if (fastEnableA20() != 0) { enableA20(); // Fast enable failed. Try legacy method. @@ -256,10 +258,6 @@ void boot(int biosdev) } #endif // #if STARTUP_DISK_SUPPORT - #define loadCABootPlist() loadSystemConfig(&bootInfo->bootConfig) - - // Loading: /Library/Preferences/SystemConfiguration/com.apple.Boot.plist - // TODO: Check if everything works <i>without</i> having this plist. if (loadCABootPlist() == EFI_SUCCESS) { _BOOT_DEBUG_DUMP("com.apple.Boot.plist located.\n"); @@ -315,32 +313,22 @@ void boot(int biosdev) // Yes. Copy its value into rootUUID. strlcpy(rootUUID, val, 37); } - } - } - -#if PRE_LINKED_KERNEL_SUPPORT - /* Look for 'Kernel Cache' key. */ - if (getValueForKey(kKernelCacheKey, &val, &length, &bootInfo->bootConfig)) - { - _BOOT_DEBUG_DUMP("Kernel Cache set to: %s\n", val); - - // Key found. Check if the given filepath/name exists. - if (length && GetFileInfo(NULL, val, &flags, &cachetime) == 0) - { - // File located. Init kernelCacheFile so that we can use it as boot file. - gPlatform.KernelCachePath = strdup(val); - - // Set flag to inform the load process to skip parts of the code. - gPlatform.KernelCacheSpecified = true; +#if INSTALL_ESD_SUPPORT + if (getValueForBootKey(kernelFlags, "container-dmg", &val, &length) && + getValueForBootKey(kernelFlags, "root-dmg", &val, &length)) + { + _BOOT_DEBUG_DUMP("Target container-dmg/root-dmg=%s\n", val); - _BOOT_DEBUG_DUMP("kernelcache file found.\n"); + gPlatform.BootVolume->flags |= kBVFlagInstallVolume; + } + else + { + gPlatform.BootVolume->flags = ~kBVFlagInstallVolume; + } +#endif } - - _BOOT_DEBUG_ELSE_DUMP("Error: kernelcache file not found.\n"); } - // _BOOT_DEBUG_ELSE_DUMP("No 'Kernel Cache' key given.\n"); -#endif /* Enable touching of a single BIOS device by setting 'Scan Single Drive' to yes. if (getBoolForKey(kScanSingleDriveKey, &gScanSingleDrive, &bootInfo->bootConfig) && gScanSingleDrive) { @@ -351,7 +339,7 @@ void boot(int biosdev) { _BOOT_DEBUG_DUMP("No com.apple.Boot.plist found.\n"); } - + // Was a target drive (per UUID) specified in com.apple.Boot.plist? if (rootUUID[0] == '\0') { @@ -368,7 +356,16 @@ void boot(int biosdev) _BOOT_DEBUG_DUMP("Success [%s]\n", rootUUID); } } - else // Booting from USB-stick or SDboot media. + else if (gPlatform.BootVolume->flags & kBVFlagInstallVolume) + { + _BOOT_DEBUG_DUMP("Booting from a disk image in the installation directory\n"); + + if (HFSGetUUID(gPlatform.BootVolume, rootUUID) == EFI_SUCCESS) + { + _BOOT_DEBUG_DUMP("Success [%s]\n", rootUUID); + } + } + else // Booting from USB-stick or SDboot media { _BOOT_DEBUG_DUMP("Booting from a Non System Volume, getting UUID.\n"); @@ -403,23 +400,39 @@ void boot(int biosdev) * non-default system setting and thus is this the place to update our EFI tree. */ - updateEFITree(rootUUID); + updateEFITree(rootUUID); if (haveCABootPlist) // Check boolean before doing more time consuming tasks. { +#if PRE_LINKED_KERNEL_SUPPORT + if (getValueForKey(kKernelCacheKey, &val, &length, &bootInfo->bootConfig)) + { + if (length && GetFileInfo(NULL, val, &flags, &cachetime) == 0) + { + _BOOT_DEBUG_DUMP("Kernel Cache set to: %s\n", val); + + // File located. Init kernelCacheFile so that we can use it as boot file. + gPlatform.KernelCachePath = strdup(val); + + // Set flag to inform the load process to skip parts of the code. + gPlatform.KernelCacheSpecified = true; + } + } + // _BOOT_DEBUG_ELSE_DUMP("No 'Kernel Cache' key given.\n"); +#endif if (getBoolForKey(kQuietBootKey, &quietBootMode, &bootInfo->bootConfig) && !quietBootMode) { gBootMode = kBootModeNormal; // Reversed from: gBootMode |= kBootModeQuiet; } } - // Parse args, load and start kernel. - while (1) - { + // Parse args, load and start kernel. + while (1) + { // Initialize globals. - gErrors = 0; + gErrors = 0; - int retStatus = -1; + int retStatus = -1; uint32_t adler32 = 0; From c56996fbb23227edf7eeaeec4d7575b4ede9a098 Mon Sep 17 00:00:00 2001 From: Chief <Chief@www.vumc.nl> Date: Sun, 7 Apr 2013 04:18:48 +0200 Subject: [PATCH 364/623] Proposed change by Jeroen --- i386/libsaio/acpi/ssdt_pr_generator.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/ssdt_pr_generator.h b/i386/libsaio/acpi/ssdt_pr_generator.h index 2969249..417ad3e 100644 --- a/i386/libsaio/acpi/ssdt_pr_generator.h +++ b/i386/libsaio/acpi/ssdt_pr_generator.h @@ -94,9 +94,12 @@ void generateSSDT_PR(void) #endif #if AUTOMATIC_PROCESSOR_BLOCK_CREATION - uint8_t SCOPE_PR[] = // Scope (\_PR) { } + uint8_t SCOPE_PR[] = // Scope (\_PR_) { } { /* 0000 */ 0x10, 0xFF, 0xFF, 0x5C, 0x5F, 0x50, 0x52, 0x5F + + /* 0000 * / 0x10, 0xFF, 0xFF, 0x5C, 0x2E, 0x5F, 0x50, 0x52 + / *0008 * / 0x5F */ }; uint8_t PROCESSOR_DEF_BLOCK[] = From 3907967cf8056b42b4910c7a662abec7bb5228bc Mon Sep 17 00:00:00 2001 From: Chief <Chief@www.vumc.nl> Date: Sun, 7 Apr 2013 15:10:00 +0200 Subject: [PATCH 365/623] restoring v5.8 --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 i386/libsaio/acpi/Tools/ssdtPRGen.sh diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh old mode 100755 new mode 100644 From 760dbd917d15224fcbd55e1351d7b3837dd5427d Mon Sep 17 00:00:00 2001 From: Chief <Chief@www.vumc.nl> Date: Sun, 7 Apr 2013 15:25:54 +0200 Subject: [PATCH 366/623] New Haswell processors added cleanups and other minor stuff done --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 346a10e..39d8e32 100644 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -64,6 +64,7 @@ # - Bug fix, overriding the cpu type displayed the wrong name (Jeroen, March 2013) # - Automatic detection of CPU scopes added (Pike, March 2013) # - Show warnings for Sandy Bridge systems as well (Jeroen, March 2013) +# - New Intel Haswell processors added (Jeroen, April 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -127,7 +128,7 @@ gDestinationPath="/Extra/" # # This is the filename used for the copy process # -gDestinationFile="SSDT.aml" +gDestinationFile="ssdt.aml" # # A value of 1 will make this script call iasl (compiles SSDT_PR.dsl) @@ -169,7 +170,7 @@ gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' # gPath=~/Desktop -gSsdtID="SSDT_PR" +gSsdtID="ssdt_pr" gSsdtPR="${gPath}/${gSsdtID}.dsl" let gDesktopCPU=1 @@ -442,6 +443,10 @@ gServerHaswellCPUList=( ) gDesktopHaswellCPUList=( +# Socket 2011 (Premium Power) +i7-4960K,130,0,3600,4000,6,12 +i7-4930K,130,0,3400,3900,6,12 +i5-4820K,130,0,3700,3900,4,8 # Socket 1150 (Standard Power) i7-4770K,84,00,3500,3900,4,8 i7-4770,84,0,3400,3900,4,8 @@ -461,6 +466,9 @@ i5-4430S,65,0,2700,3200,4,4 ) gMobileHaswellCPUList=( +i7-4930MX,57,0,3000,3900,4,8 +i7-4900MQ,47,0,2800,3800,4,8 +i7-4800MQ,47,0,2700,3700,4,8 ) #-------------------------------------------------------------------------------- @@ -599,7 +607,7 @@ function _printScopeStart() let extraF=($maxTurboFrequency+1) let maxTDP=($gTdp*1000) let extraR=($maxTurboFrequency/100)+1 - echo ' /* Workaround for Ivy Bridge PM bug */' >> $gSsdtPR + echo " /* Workaround for the Ivy Bridge PM 'bug' */" >> $gSsdtPR printf " Package (0x06) { 0x%04X, 0x%06X, 0x0A, 0x0A, 0x%02X00, 0x%02X00 },\n" $extraF $maxTDP $extraR $extraR >> $gSsdtPR fi } @@ -971,7 +979,6 @@ function _getModelName() # Grab 'compatible' property from ioreg (stripped with sed / RegEX magic). # echo `ioreg -p IODeviceTree -d 2 -k compatible | grep compatible | sed -e 's/ *["=<>]//g' -e 's/compatible//'` -# echo "iMac13,2" } #-------------------------------------------------------------------------------- @@ -1010,7 +1017,7 @@ function _updateProcessorNames() if [[ $1 -gt ${#gProcessorNames[@]} ]]; then echo -e "\nWarning: Target CPU has $gLogicalCPUs logical cores, the running system only ${#gProcessorNames[@]}" echo " Now using '$label' to extent the current range to $gLogicalCPUs..." - echo -e " You may want to check/verify the generated DSDT_PR.dsl\n" + echo -e " You may want to check/verify the generated $gSsdtID.dsl\n" fi let currentCPU=0 @@ -1032,7 +1039,7 @@ function _updateProcessorNames() #-------------------------------------------------------------------------------- -function _getScope() +function _getProcessorScope() { let procNameFound=0 local names=($(ioreg -p IOACPIPlane -d 3 | sed -e 's/<.*>//g' -e 's/.*o //g')) @@ -1629,7 +1636,9 @@ function main() _getBoardID _getProcessorNames - _getScope + # + # _getProcessorScope (work in progress) + # local modelID=$(_getModelName) local cpu_type=$(_getCPUtype) From 8f830ec610005a7de65ecac9d3d068b65efbc8f8 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 7 Apr 2013 16:49:58 +0200 Subject: [PATCH 367/623] Updating settings template --- i386/config/settings-template.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 891a227..f6333dd 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -33,6 +33,7 @@ * - Always inject SMB_BOARD_SERIAL_NUMBER, required for iMessage (PikerAlpha, January 2013). * - New compiler directives in EFI section added (PikerAlpha, January 2013). * - STATIC_SYSTEM_ID renamed to SMB_STATIC_SYSTEM_UUID and moved to SMBIOS section (PikerAlpha, January 2013). + * - Renamed LION_INSTALL_SUPPORT to INSTALL_ESD_SUPPORT (PikerAlpha, April 2013). * */ @@ -355,7 +356,7 @@ //------------------------------------------------------------ STRINGTABLE.H ---------------------------------------------------------------- -#define LION_INSTALL_SUPPORT 0 // Set to 0 by default. Setting this to 1 will make RevoBoot search in specific directories +#define INSTALL_ESD_SUPPORT 0 // Set to 0 by default. Setting this to 1 will make RevoBoot search in specific directories // for com.apple.Boot.plist – required for Mac like Lion OS X installations. //-------------------------------------------------------------- SMBIOS.C ------------------------------------------------------------------ From 1f46fdb57216e5b445c19d388c4120b2fce25990 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 7 Apr 2013 18:20:36 +0200 Subject: [PATCH 368/623] Updating settings template --- i386/config/settings-template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index f6333dd..683aa7f 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -1,7 +1,7 @@ /* * Copyright (c) 2009 Master Chief. All rights reserved. * - * Note: This is an essential part of the build process for RevoBoot v1.5.38 and greater. + * Note: This is an essential part of the build process for RevoBoot v1.5.39 and greater. * * Updates: * From ef1886cbc8d12d805c58d3b3f6da7bbf156a7699 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 7 Apr 2013 18:30:47 +0200 Subject: [PATCH 369/623] Updating version number --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 39d8e32..d6e2639 100644 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 5.8 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 5.9 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -131,14 +131,14 @@ gDestinationPath="/Extra/" gDestinationFile="ssdt.aml" # -# A value of 1 will make this script call iasl (compiles SSDT_PR.dsl) +# A value of 1 will make this script call iasl (compiles ssdt_pr.dsl) # # Note: Will be set to 0 when we failed to locate a copy of iasl! # let gCallIasl=1 # -# A value of 1 will make this script open SSDT_PR.dsl in the editor of your choice. +# A value of 1 will make this script open ssdt_pr.dsl in the editor of your choice. # let gCallOpen=0 @@ -161,7 +161,7 @@ gProcLabel="CPU" # Other global variables. # -gScriptVersion=5.8 +gScriptVersion=5.9 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -1883,12 +1883,12 @@ _findIasl if (($gCallIasl)); then # - # Compile SSDT.dsl + # Compile ssdt.dsl # "$iasl" $gSsdtPR # - # Copy SSDT_PR.aml to /Extra/SSDT.aml (example) + # Copy ssdt_pr.aml to /Extra/ssdt.aml (example) # if (($gAutoCopy)); then if [ -f ${gPath}/${gSsdtID}.aml ]; then From 6480a76bad71e729e57c33ccc2ebd2f89d67d3ce Mon Sep 17 00:00:00 2001 From: Dave Griffin <davegriffin@stainedglass1.plus.com> Date: Sun, 7 Apr 2013 19:22:52 +0100 Subject: [PATCH 370/623] Fixed a typo to silence compilation error --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 0 i386/libsaio/sys.c | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 i386/libsaio/acpi/Tools/ssdtPRGen.sh diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh old mode 100644 new mode 100755 diff --git a/i386/libsaio/sys.c b/i386/libsaio/sys.c index 66595a2..ab5fcd2 100755 --- a/i386/libsaio/sys.c +++ b/i386/libsaio/sys.c @@ -929,7 +929,7 @@ BVRef getTargetRootVolume(char *rootUUID) // Traverse back from the last to the first partition in the chain. for (bvr = chain; bvr; bvr = bvr->next) { - if ((bvr->biosdev == hdIndex)) && ((bvr->flags & kBVFlagSystemVolume) || (bvr->flags & kBVFlagInstallVolume)) + if ((bvr->biosdev == hdIndex) && ((bvr->flags & kBVFlagSystemVolume) || (bvr->flags & kBVFlagInstallVolume))) { if ((bvr->flags & kBVFlagSystemVolume) && (bvr->fs_getuuid(bvr, rootUUID) == EFI_SUCCESS)) { From 63de26fc99359e41850f67d32dfa2aaa151cd334 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 8 Apr 2013 03:49:54 +0200 Subject: [PATCH 371/623] Setting LFM for i5-2450M Confirmed by Zoltan --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index d6e2639..3be17d9 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -295,7 +295,7 @@ i7-2617M,17,0,1500,2600,2,4 i7-2610UE,17,0,1500,2400,2,4 # i5 Mobile Series i5-2467M,17,0,1600,2300,2,4 -i5-2450M,35,0,2300,3100,2,4 +i5-2450M,35,800,2300,3100,2,4 i5-2435M,35,0,2400,3000,2,4 i5-2430M,35,0,2400,3000,2,4 i5-2410M,35,0,2300,2900,2,4 From 7e17a9ff968511f9503d0fdd6b82850994b0cf69 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 8 Apr 2013 06:19:34 +0200 Subject: [PATCH 372/623] Improved Processor declaration detection --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 48 +++++++++++++++------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 3be17d9..5944aee 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 5.9 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 6.0 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -65,6 +65,7 @@ # - Automatic detection of CPU scopes added (Pike, March 2013) # - Show warnings for Sandy Bridge systems as well (Jeroen, March 2013) # - New Intel Haswell processors added (Jeroen, April 2013) +# - Improved Processor declaration detection (Jeroen/Pike, April 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -114,12 +115,12 @@ let gIvyWorkAround=1 # -# Asks for your confirmation to copy SSDT_PR.aml to /Extra/SSDT.aml (example) +# Asks for your confirmation to copy ssdt_pr.aml to /Extra/ssdt.aml (example) # let gAutoCopy=1 # -# This is the target location that SSDT.aml will be copied to. +# This is the target location that ssdt.aml will be copied to. # # Note: Do no change this - will be updated automatically for Clover/RevoBoot! # @@ -157,11 +158,16 @@ let gBaseFrequency=1600 # gProcLabel="CPU" +# +# This is the default (ACPI 1.0 compliant) processor scope (verified by _getProcessorScope). +# +gScope="\_PR_" + # # Other global variables. # -gScriptVersion=5.9 +gScriptVersion=6.0 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -203,6 +209,7 @@ let TARGET_CPU_ERROR=4 let PROCESSOR_NUMBER_ERROR=5 let PROCESSOR_LABEL_LENGTH_ERROR=6 let PROCESSOR_NAMES_ERROR=7 +let PROCESSOR_DECLARATION_ERROR=8 # # Processor Number, Max TDP, Low Frequency Mode, Clock Speed, Max Turbo Frequency, Cores, Threads @@ -1041,23 +1048,17 @@ function _updateProcessorNames() function _getProcessorScope() { - let procNameFound=0 - local names=($(ioreg -p IOACPIPlane -d 3 | sed -e 's/<.*>//g' -e 's/.*o //g')) - - for name in ${names[@]} - do - if [[ $name == "_SB" && $procNameFound -eq 0 ]]; then -# echo 'Using: Scope (\_SB.'${gProcessorNames[0]}') etc.' - gScope="\_SB" - return - fi + if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 | egrep -o 'DSDT"=<[0-9a-f]+5b830b') ]]; then + printf 'Processor Declaration(s) Found in DSDT' + fi - if [[ "${name:0:3}" == ${gProcessorNames[0]:0:3} ]]; then -# echo 'Using: Scope (\_PR.'${gProcessorNames[0]}') etc.' - gScope="\_PR" - let procNameFound=1 - fi - done + if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 | egrep -o 'DSDT"=<[0-9a-f]+5f50525f') ]]; + then + gScope="\_PR_" + echo ' (ACPI 1.0 compliant)' + else + gScope="\_SB_" + fi } #-------------------------------------------------------------------------------- @@ -1549,6 +1550,9 @@ function _exitWithError() 7) echo -e "\nError: Processor label not found... exiting\n" 1>&2 exit 7 ;; + 8) echo -e "\nError: Processor Declaration not found... exiting\n" 1>&2 + exit 8 + ;; *) exit 1 ;; esac @@ -1636,9 +1640,7 @@ function main() _getBoardID _getProcessorNames - # - # _getProcessorScope (work in progress) - # + _getProcessorScope local modelID=$(_getModelName) local cpu_type=$(_getCPUtype) From 9bdf5baf3f4bfd332fd2e375d025f0d18f56f61a Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 8 Apr 2013 08:04:17 +0200 Subject: [PATCH 373/623] grep -e 'AICPUPMI:' should show more/everything --- .../AppleIntelCPUPowerManagementInfo.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 8c4d3fa..4eef367 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -197,21 +197,21 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) #endif msr = rdmsr64(MSR_PLATFORM_INFO); gMinRatio = (UInt8)((msr >> 40) & 0xff); - IOLog("Low Frequency Mode : %d00 MHz\n", gMinRatio); + IOLog("AICPUPMI: Low Frequency Mode : %d00 MHz\n", gMinRatio); gClockRatio = (UInt8)((msr >> 8) & 0xff); - IOLog("Clock Speed : %d00 MHz\n", gClockRatio); + IOLog("AICPUPMI: Clock Speed : %d00 MHz\n", gClockRatio); if (!((rdmsr64(IA32_MISC_ENABLES) >> 32) & 0x40)) // Turbo Mode Enabled? { msr = rdmsr64(MSR_TURBO_RATIO_LIMIT); gMaxRatio = (UInt8)(msr & 0xff); - IOLog("Max Turbo Frequency: %d00 MHz\n", gMaxRatio); + IOLog("AICPUPMI: Max Turbo Frequency: %d00 MHz\n", gMaxRatio); } else { gMaxRatio = gClockRatio; - IOLog("Max Frequency : %d00 MHz\n", gMaxRatio); + IOLog("AICPUPMI: Max Frequency : %d00 MHz\n", gMaxRatio); } #if REPORT_GPU_STATS @@ -230,14 +230,14 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) if (memoryMap != NULL) { gMchbar = (UInt8 *)memoryMap->getVirtualAddress(); - IOLog("Graphics Core Ratios:\n"); - IOLog("Current Ratio : 0x%02x\n", (UInt8)gMchbar[1]); - IOLog("Max Non-Turbo Ratio : 0x%02x\n", (UInt8)gMchbar[0x51]); - IOLog("Max Turbo Ratio : 0x%02x\n", (UInt8)gMchbar[0x50]); + IOLog("AICPUPMI: Graphics Core Ratios:\n"); + IOLog("AICPUPMI: Current Ratio : 0x%02x\n", (UInt8)gMchbar[1]); + IOLog("AICPUPMI: Max Non-Turbo Ratio : 0x%02x\n", (UInt8)gMchbar[0x51]); + IOLog("AICPUPMI: Max Turbo Ratio : 0x%02x\n", (UInt8)gMchbar[0x50]); } else { - IOLog("Error: memoryMap == NULL\n"); + IOLog("AICPUPMI: Error: memoryMap == NULL\n"); } } else From 1370d390954d951e8a5f14324124f5c0a43a41b5 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 8 Apr 2013 08:05:12 +0200 Subject: [PATCH 374/623] Updating version info for RevoBoot v1.5.39 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index c7966c0..9caff18 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.38 +1.5.39 From 182160b195066a68ea813f925ef13a3d781a2d1d Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 8 Apr 2013 08:05:44 +0200 Subject: [PATCH 375/623] Updating release notes for RevoBoot v1.5.39 --- CHANGES | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGES b/CHANGES index 5649f0c..30fe0dc 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,18 @@ RevoBoot v1.5.40 (Next Major Release) - Improved P-State generation (less settings). +RevoBoot v1.5.39 +================ +- Fixed boot failure for InstallESD/BaseSystem.dmg/patched kernelcache (Piker, April 2013). +- LION_INSTALL_SUPPORT renamed to INSTALL_ESD_SUPPORT (Piker, April 2013). +- Stripped (unnecessary) argument from loadSystemConfig (Pike, April 2013). +- Renamed function loadSystemConfig to loadCABootPlist (Pike, April 2013). +- Simplified search for and read of com.apple.Boot.plist (Pike, April 2013). +- Board ID's for iMac12,n fixed (Jeroen, April 2013). +- Settings template updated (Pike, April 2013). +- VERSION updated to v1.5.39 + + RevoBoot v1.5.38 ================ - RevoBoot/i386/libsaio/efi.c modified to workaround iMessage login/registration problems (PikerAlpha, January 2013). From cf90aed1243d95e09f42cfa8113d9a57de2e3e5b Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 8 Apr 2013 18:37:45 +0200 Subject: [PATCH 376/623] Adding a lost comma --- i386/libsaio/smbios/tools/smbios2struct3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/smbios/tools/smbios2struct3.c b/i386/libsaio/smbios/tools/smbios2struct3.c index 3be8a8a..bafa881 100755 --- a/i386/libsaio/smbios/tools/smbios2struct3.c +++ b/i386/libsaio/smbios/tools/smbios2struct3.c @@ -101,7 +101,7 @@ char tableDescriptions[134][36] = /* 129 */ "", /* 130 */ "Memory SPD Data", /* 131 */ "OEM Processor Type", - /* 132 */ "OEM Processor Bus Speed" + /* 132 */ "OEM Processor Bus Speed", /* 133 */ "OEM Platform Feature" }; From c43273406d8b63ec04d37e19f00fc3912014dc11 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 8 Apr 2013 19:39:41 +0200 Subject: [PATCH 377/623] EDID resolution readout fixed --- i386/boot2/graphics.c | 27 +++++++++++++-------------- i386/libsaio/vbe.c | 12 +++++++----- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/i386/boot2/graphics.c b/i386/boot2/graphics.c index c42c451..bcc89bf 100755 --- a/i386/boot2/graphics.c +++ b/i386/boot2/graphics.c @@ -307,30 +307,29 @@ long initGraphicsMode() { unsigned long params[4]; - int count = getNumberArrayFromProperty(kGraphicsModeKey, params, 4); - -#if DEBUG - printf("\nwidth: %d height: %d depth: %d\n", params[0], params[1], params[2]); -#endif + params[2] = 32; // Default depth + params[3] = 0; // Do we have a "Graphics Mode" property in com.apple.Boot.plist? - if (count < 3) + if (getNumberArrayFromProperty(kGraphicsModeKey, params, 4) < 3) { #if USE_STATIC_DISPLAY_RESOLUTION params[0] = DEFAULT_SCREEN_WIDTH; params[1] = DEFAULT_SCREEN_HEIGHT; #else - unsigned long resolutionCombo = getResolutionFromEDID(); - printf("EDID width :%l\n", resolutionCombo); - /* params[0] = */ printf("EDID width :%l\n", (resolutionCombo << 16)); - /* params[1] = */ printf("EDID height:%l\n", (resolutionCombo & 0xFFF)); - // sleep(15); + UInt32 resolutionCombo = getResolutionFromEDID(); + #if DEBUG_BOOT_GRAPHICS + printf("EDID resolution (0x%04x)\n", resolutionCombo); + #endif + params[0] = (resolutionCombo >> 16); + params[1] = (resolutionCombo & 0xFFFF); + #if DEBUG_BOOT_GRAPHICS + printf("Width: %d, Height: %d, Depth: %d\n", params[0], params[1], params[2]); + sleep(10); + #endif #endif } - params[2] = 32; // Don't bother. Use the de facto standard. - params[3] = 0; - return setVESAGraphicsMode(params[0], params[1], params[2], 0); } diff --git a/i386/libsaio/vbe.c b/i386/libsaio/vbe.c index 713e301..0334610 100755 --- a/i386/libsaio/vbe.c +++ b/i386/libsaio/vbe.c @@ -134,7 +134,7 @@ int setVBEPalette(void *palette) } -#if USE_STATIC_DISPLAY_RESOLUTION == 0 +#if (USE_STATIC_DISPLAY_RESOLUTION == 0) //============================================================================== // Called from initGraphicsMode() in graphics.c @@ -149,18 +149,20 @@ unsigned long getResolutionFromEDID(void) bb.intno = 0x10; bb.eax.rr = 0x4F15; bb.ebx.r.l = 0x01; - bb.edx.rr = ++targetBlock; + bb.edx.rr = targetBlock++; bb.es = SEG((void *)data); bb.edi.rr = OFF((void *)data); bios(&bb); // BIOS / display supports Display Data Channel (EDID) reading? - if (bb.eax.r.l == 0 && bb.eax.r.h == 79) + if ( ((bb.eax.rr & 0xff00) == 0) && ((bb.eax.rr & 0xff) == 0x4f) ) { // Yes, supported. Check EDID header against known headers. if (memcmp(data, header, sizeof(header)) != 0) { +#if DEBUG_BOOT_GRAPHICS printf("targetBlock: %d\n", targetBlock); +#endif continue; } @@ -181,14 +183,14 @@ unsigned long getResolutionFromEDID(void) } } - sleep(5); + sleep(1); #endif if (data[126] == 0) { targetBlock = 0; } - return ( ( (data[56] | ((data[58] & 0xF0) << 4)) << 16) | (data[59] | ((data[61] & 0xF0) << 4)) ); + return (((data[56] | ((data[58] & 0xF0) << 4)) << 16) | (data[59] | ((data[61] & 0xF0) << 4))); } else { From f06449a3ed749fc2479443de778b22c5fde6c1af Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 9 Apr 2013 20:24:03 +0200 Subject: [PATCH 378/623] Cleanup, removed unused function --- i386/libsaio/efi.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index 91ea9a2..5cb4669 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -225,35 +225,6 @@ void initEFITree(void) } -#ifndef SMB_STATIC_SYSTEM_UUID -/*============================================================================== - -static EFI_CHAR8 * getSmbiosUUID() -{ - bool error = TRUE; - - UInt8 *p = (UInt8 *)gPlatform.UUID; - - for (int i = 0; i < 16; i++) - { - if (p[i] != 0x00 || p[i] != 0xff) - { - error = FALSE; - } - } - - if (error) - { - printf("No proper UUID found in the System Information Table\n"); - return NULL; - } - - return (EFI_CHAR8 *)gPlatform.UUID; -} - */ -#endif - - //============================================================================== // Stage two EFI initialization (after getting data from com.apple.Boot.plist). @@ -350,7 +321,7 @@ void finalizeEFITree(EFI_UINT32 kernelAdler32) DT__AddProperty(gPlatform.EFI.Nodes.Platform, "system-id", 16, (EFI_CHAR8 *) &SYSTEM_ID); #else - // DT__AddProperty(gPlatform.EFI.Nodes.Platform, "system-id", 16, getSmbiosUUID()); + // gPlatform.UUID is set in: RevoBoot/i386/libsaio/SMBIOS/[dynamic/static]_data.h DT__AddProperty(gPlatform.EFI.Nodes.Platform, "system-id", 16, (EFI_CHAR8 *)gPlatform.UUID); #endif From fafe72628dae0e28b57e34947bfc91b2a4d87be2 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 9 Apr 2013 20:25:39 +0200 Subject: [PATCH 379/623] Cleanups and iMessage fix for static SMBIOS data --- i386/libsaio/smbios/static_data.h | 96 ++++++++++++++++--------------- 1 file changed, 51 insertions(+), 45 deletions(-) diff --git a/i386/libsaio/smbios/static_data.h b/i386/libsaio/smbios/static_data.h index 27601f1..4f39f51 100755 --- a/i386/libsaio/smbios/static_data.h +++ b/i386/libsaio/smbios/static_data.h @@ -6,6 +6,8 @@ * - New path for static EFI data (PikerAlpha, October 2012). * - Optionally check /Extra/SMBIOS/[MacModelNN.bin] for static SMBIOS data (PikerAlpha, October 2012). * - Get maxStructureSize/structureCount from factory EPS (PikerAlpha, October 2012). + * - Cleanups/simplification of code (Pike, April 2013). + * - iMessage fix for static SMBIOS data / init gPlatform.UUID from static data (Pike, April 2013). * * Credits: * - blackosx, DB1, dgsga, FKA, humph, scrax and STLVNUB (testers). @@ -14,65 +16,69 @@ #ifndef __LIBSAIO_SMBIOS_STATIC_DATA_H #define __LIBSAIO_SMBIOS_STATIC_DATA_H - #include "essentials.h" +#include "essentials.h" - int tableLength = 0; - long fileSize = 0; // FIXME: This variable <i>is used</i> but conditionally! +int offset = 0; +int tableLength = 0; - #if LOAD_MODEL_SPECIFIC_SMBIOS_DATA - char dirSpec[32] = ""; - void * staticSMBIOSData = (void *)kLoadAddr; +long fileSize = 0L; - sprintf(dirSpec, "/Extra/SMBIOS/%s.bin", COMMA_STRIPPED_MODEL_ID); +void * staticSMBIOSData = (void *)kLoadAddr; - _SMBIOS_DEBUG_DUMP("Loading: %s", dirSpec); +#if LOAD_MODEL_SPECIFIC_SMBIOS_DATA + char dirSpec[32] = ""; - fileSize = loadBinaryData(dirSpec, &staticSMBIOSData); + sprintf(dirSpec, "/Extra/SMBIOS/%s.bin", COMMA_STRIPPED_MODEL_ID); + _SMBIOS_DEBUG_DUMP("Loading: %s", dirSpec); + fileSize = loadBinaryData(dirSpec, &staticSMBIOSData); - if (fileSize > 0) - { - memcpy((kernelMemory + sizeof(* newEPS)), staticSMBIOSData, fileSize); - - // factoryEPS = (struct SMBEntryPoint *) baseAddress; - - tableLength = fileSize; - - _SMBIOS_DEBUG_DUMP("\n"); - } - else // File not found. Use static data defined in RevoBoot/i386/config/SMBIOS/ - { - // The STRING (macro) is defined in RevoBoot/i386/config/settings.h - #include STRING(SMBIOS_DATA_FILE) - - static uint32_t SMBIOS_Table[] = - { - // Replaced with data from: RevoBoot/i386/config/SMBIOS/[data-template/MacModelNN].h - STATIC_SMBIOS_DATA - }; - - tableLength = sizeof(SMBIOS_Table); - - _SMBIOS_DEBUG_DUMP("Error: File not found!\nNow trying statically linked SMBIOS data: %d bytes\n", tableLength); + if (fileSize > 0) + { + tableLength = fileSize; + _SMBIOS_DEBUG_DUMP("\n"); + } + else // File not found. Use static data defined in: RevoBoot/i386/config/SMBIOS/MacModelNN.h + { + _SMBIOS_DEBUG_DUMP("Error: File not found!\n"); + } +#endif /* LOAD_MODEL_SPECIFIC_SMBIOS_DATA */ - // Copy the static SMBIOS data into the newly allocated memory page. Right after the new EPS. - memcpy((kernelMemory + sizeof(* newEPS)), SMBIOS_Table, tableLength); - } - #else + if (fileSize == 0) + { // The STRING (macro) is defined in RevoBoot/i386/config/settings.h #include STRING(SMBIOS_DATA_FILE) static uint32_t SMBIOS_Table[] = { - // Replaced with data from: RevoBoot/i386/config/SMBIOS/[data-template/MacModelNN].h + // Replaced with data from: RevoBoot/i386/config/SMBIOS/MacModelNN.h STATIC_SMBIOS_DATA }; - - _SMBIOS_DEBUG_DUMP("Using statically linked SMBIOS data\n"); - + tableLength = sizeof(SMBIOS_Table); - - // Copy the static SMBIOS data into the newly allocated memory page. Right after the new EPS. - memcpy((kernelMemory + sizeof(* newEPS)), SMBIOS_Table, tableLength); - #endif /* LOAD_MODEL_SPECIFIC_SMBIOS_DATA */ + staticSMBIOSData = SMBIOS_Table; + _SMBIOS_DEBUG_DUMP("Using statically linked SMBIOS data: %d bytes\n", tableLength); + } + + if (*(uint32_t *) staticSMBIOSData == 0x44495555) // "UUID" in little endian. + { + offset = 20; // "UUID" + 16 bytes data + } + + // Copy the static SMBIOS data into the newly allocated memory page. Right after the new EPS. + memcpy((kernelMemory + sizeof(* newEPS)), staticSMBIOSData + offset, (tableLength - offset)); + +#ifdef SMB_STATIC_SYSTEM_UUID + // This enables you to override the factory UUID from the settings file. + static unsigned char SMB_SYSTEM_UUID[] = SMB_STATIC_SYSTEM_UUID; + + // Replace factory UUID with the one specified in: RevoBoot/i386/config/SETTINGS/MacModelNN.h + memcpy(gPlatform.UUID, SMB_SYSTEM_UUID, 16); +#else + if (offset) + { + // Get UUID from (dynamically loaded) SMBIOS data (/Extra/SMBIOS/MacModelNN.bin) + memcpy(gPlatform.UUID, staticSMBIOSData + 4, 16); + } +#endif #endif /* !__LIBSAIO_SMBIOS_STATIC_DATA_H */ From e63d088db219135dea19a44d44d7dc1a6fb5e368 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 9 Apr 2013 20:27:28 +0200 Subject: [PATCH 380/623] Ignore executable --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 5a21fba..a787c99 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,5 @@ i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo.xcodeproj/xcuserd i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo.xcodeproj/project.xcworkspace i386/libsaio/smbios/tools/smbios2struct3 +i386/libsaio/smbios/tools/smbios2struct4 + From eb086c16b72e567491335650304a22262396c7d3 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 9 Apr 2013 21:11:25 +0200 Subject: [PATCH 381/623] Cleanups and iMessage fix for static SMBIOS data --- i386/libsaio/smbios/tools/smbios2struct3.c | 35 +++++++++++++++------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/i386/libsaio/smbios/tools/smbios2struct3.c b/i386/libsaio/smbios/tools/smbios2struct3.c index bafa881..1605831 100755 --- a/i386/libsaio/smbios/tools/smbios2struct3.c +++ b/i386/libsaio/smbios/tools/smbios2struct3.c @@ -1,9 +1,9 @@ /* * * Name : smbios2struct4 - * Version : 1.1.1 + * Version : 1.1.2 * Type : Command line tool - * Copyright : Sam aka RevoGirl (c) 2011 + * Copyright : Sam aka RevoGirl (c) 2011 / Pike R. Alpha (c) 2012, 2013 * Description : SMBIOS extractor / converter (resulting in a smaller and more Apple like table). * * Usage : sudo ./smbios2struct4 (output to terminal window) @@ -15,6 +15,7 @@ * Updates : Interim solution for writing stripped SMBIOS table data to MacModelNN.bin (PikerAlpha, November 2012) * : Check root priveledges for writing to: /Extra/SMBIOS/MacModelNN.bin (PikerAlpha, November 2012) * : Now also saves /EFI-device-properties (PikerAlpha, November 2012) + * : Cleanups and iMessage fix for static SMBIOS data (Pike, April 2013) * */ @@ -160,7 +161,7 @@ int main(int argc, char * argv[]) #if DEBUG printf("UID: %u EUID: %u\n", real_uid, euid); #endif - // Under sudo, getuid and geteuid return 0. + // Under sudo, getuid and geteuid returns 0. if (real_uid != 0 || euid != 0) { printf("Error: Not root. Use sudo ./smbios2struct4 [filename without extension]\n"); @@ -322,21 +323,20 @@ int main(int argc, char * argv[]) UInt16 numBytes = (int) CFDataGetLength(dataRef); printf("\nNumber of bytes: %d (Original SMBIOS table)\n", numBytes); #endif - + SMBWord newHandle = 0; SMBStructHeader * header; + SMBSystemInformation * systemInfo; + const UInt8 * tablePtr = (const UInt8 *) tableData; const UInt8 * tableEndPtr = tablePtr + tableLength; const UInt8 * tableStructureStart = 0; const UInt8 * droppedTableStructureStart = 0; - const UInt8 * tableBuffer = malloc(tableLength); + const UInt8 * tableBuffer = malloc(tableLength + 20); - // int index = 0; int maxStructureSize = 0; int newStructureCount = 0; int structureLength = 0; - SMBWord newHandle = 0; - bzero((void *)tableBuffer, sizeof(tableBuffer)); while (structureCount-- && (tableEndPtr > tablePtr + sizeof(SMBStructHeader))) @@ -349,11 +349,26 @@ int main(int argc, char * argv[]) { break; } - + switch (header->type) { - case kSMBTypeBIOSInformation: // Type 0 case kSMBTypeSystemInformation: // Type 1 + + bcopy((void *)tableBuffer, (void *)tableBuffer + 20, (tableLength - 20)); + + static SMBByte const data[] = { + 0x55, 0x55, 0x49, 0x44, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 + }; + + bcopy(data, (void *)tableBuffer, 20); + + systemInfo = (SMBSystemInformation *) tablePtr; + bcopy((SMBByte *)systemInfo->uuid, (void *)tableBuffer + 4, 16); + newTableLength += 20; + + case kSMBTypeBIOSInformation: // Type 0 case kSMBTypeBaseBoard: // Type 2 case kSMBTypeProcessorInformation: // Type 4 // case kSMBTypeMemoryModule: // Type 6 From 87e45a22f369d029555b73e76cd76835f29bd146 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 10 Apr 2013 11:57:35 +0200 Subject: [PATCH 382/623] Comment change only --- i386/libsaio/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/cpu.c b/i386/libsaio/cpu.c index 5cdeefb..7452c72 100644 --- a/i386/libsaio/cpu.c +++ b/i386/libsaio/cpu.c @@ -195,7 +195,7 @@ void checkFlexRatioMSR(void) // The processor’s maximum non-turbo core frequency is configured during power-on reset // by using its manufacturing default value. This value is the highest non-turbo core // multiplier at which the processor can operate. If lower maximum speeds are desired, - // the appropriate ratio can be configured using the FLEX_RATIO MSR. + // then the appropriate ratio can be configured using the FLEX_RATIO MSR. uint64_t msr = rdmsr64(MSR_FLEX_RATIO); From 5fa9087ad4ca4db0200f64df4280d7f4f98882ed Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 10 Apr 2013 11:57:48 +0200 Subject: [PATCH 383/623] Adding missing MSR's --- i386/libsaio/cpu/essentials.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index 73c44be..cd4bd33 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -88,6 +88,9 @@ #define MSR_CORE_C6_RESIDENCY 0x3FD #define MSR_CORE_C7_RESIDENCY 0x3FE +#define MSR_PP0_CURRENT_CONFIG 0x601 +#define MSR_PP1_CURRENT_CONFIG 0x602 + // Sandy Bridge & JakeTown specific 'Running Average Power Limit' MSR's. #define MSR_RAPL_POWER_UNIT 0x606 From 686f47efb03f725488e2a52c59ec2d5644ea5c0c Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 10 Apr 2013 11:59:03 +0200 Subject: [PATCH 384/623] Output change (MSR added) --- .../AppleIntelCPUPowerManagementInfo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 4eef367..eaa7455 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -37,17 +37,18 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(void) IOLog("MSR_POWER_CTL..............(0x1FC) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_POWER_CTL)); - IOLog("rdmsr64....................(0x602) : 0x%llX\n", (unsigned long long)rdmsr64(0x602)); IOLog("MSR_RAPL_POWER_UNIT........(0x606) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_RAPL_POWER_UNIT)); IOLog("MSR_PKG_POWER_LIMIT........(0x610) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_POWER_LIMIT)); IOLog("MSR_PKG_ENERGY_STATUS......(0x611) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_ENERGY_STATUS)); + IOLog("MSR_PP0_CURRENT_CONFIG.....(0x601) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_CURRENT_CONFIG)); IOLog("MSR_PP0_POWER_LIMIT........(0x638) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POWER_LIMIT)); IOLog("MSR_PP0_ENERGY_STATUS......(0x639) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_ENERGY_STATUS)); IOLog("MSR_PP0_POLICY.............(0x63a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POLICY)); if ((gCPUModel == CPU_MODEL_SB_CORE) || (gCPUModel == CPU_MODEL_IB_CORE)) { + IOLog("MSR_PP1_CURRENT_CONFIG.....(0x602) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_CURRENT_CONFIG)); IOLog("MSR_PP1_POWER_LIMIT........(0x640) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POWER_LIMIT)); IOLog("MSR_PP1_ENERGY_STATUS......(0x641) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_ENERGY_STATUS)); IOLog("MSR_PP1_POLICY.............(0x642) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POLICY)); From 5a53f5834f80e1878c4e4db6c61a8dee98fb4c1a Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 12 Apr 2013 12:13:26 +0200 Subject: [PATCH 385/623] Some additional Haswell bits and pieces --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 27 +++++++++++++++++-- i386/libsaio/cpu/Intel/dynamic_data.h | 8 +++++- i386/libsaio/cpu/essentials.h | 38 +++++++++++++++++++++------ 3 files changed, 62 insertions(+), 11 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 5944aee..2cd130e 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -726,6 +726,18 @@ function _printMethodDSM() function _printScopeACST() { +# +# Intel values for Sandy / Ivy Bridge processors +# +# C-state : Power : SB Latency : IB Latency +#---------:---------:------------:------------ +# C1 : 0x3e8 : 0x01 : 0x03 +# C3 : 0x1f4 : 0x50 : 0xcd +# C6 : 0x15e : 0x68 : 0xf5 +# C7 : 0xc8 : 0x6d : 0xf5 +# +# Note: C-state latency in uS and C-state power in mW. + let C1=0 let C2=0 let C3=0 @@ -1281,7 +1293,10 @@ function _showLowPowerStates() local cStates=$1 printf "Injected C-States for ${gProcessorNames[$2]} (" - + # + # Haswell : C0, C1, C1E, C2E, C3, C4, C6 and C7 + # Haswell-ULT: C0, C1, C1E, C2E, C3, C4, C6, C7, C8, C9 and C10 + # for state in C1 C2 C3 C6 C7 do if (($cStates & $mask)); then @@ -1620,11 +1635,19 @@ function main() let gBridgeType=4 fi - if (($model==0x3C || $model==0x3F || $model==0x45)); then + # Haswell + if (($model==0x30)); then let assumedTDP=1 let gTdp=84 let gBridgeType=8 fi + + # Haswell ULT + if (($model==0x40)); then + let assumedTDP=1 + let gTdp=15 + let gBridgeType=8 + fi fi case $gBridgeType in diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index 65a493c..c794c44 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -349,6 +349,12 @@ void initCPUStruct(void) hiBit = 31; break; + case CPU_MODEL_HASWELL: + case CPU_MODEL_HASWELL_ULT: + CoreBridgeType = HASWELL; + hiBit = 31; + break; + case CPU_MODEL_NEHALEM: case CPU_MODEL_NEHALEM_EX: case CPU_MODEL_FIELDS: @@ -396,7 +402,7 @@ void initCPUStruct(void) requestMaxTurbo(maxBusRatio); } - if (CoreBridgeType) // (SandyBridge || IvyBridge) + if (CoreBridgeType) // (SandyBridge || IvyBridge || Haswell) { // gPlatform.CPU.Type += CoreBridgeType; diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index cd4bd33..7aa67ba 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -24,9 +24,12 @@ * limitations under the License. * * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -/* + * * @OSF_COPYRIGHT@ + * + * Updates: + * + * - New Haswell (ULT) specific MSR's added (Pike, April 2013). */ #ifndef __LIBSAIO_CPU_ESSENTIALS_H @@ -99,6 +102,28 @@ #define MSR_PKG_PERF_STATUS 0x613 #define MSR_PKG_POWER_INFO 0x614 +// JakeTown only Memory MSR's. +#define MSR_DRAM_POWER_LIMIT 0x618 +#define MSR_DRAM_ENERGY_STATUS 0x619 +#define MSR_DRAM_PERF_STATUS 0x61B +#define MSR_DRAM_POWER_INFO 0x61C + +// Haswell-ULT Package residency +#define MSR_PKG_C8_RESIDENCY 0x630 +#define MSR_PKG_C9_RESIDENCY 0x631 +#define MSR_PKG_C10_RESIDENCY 0x632 + +// Haswell-ULT C state latency control. +#define MSR_PKG_C8_LATENCY 0x633 +#define MSR_PKG_C9_LATENCY 0x634 +#define MSR_PKG_C10_LATENCY 0x635 + +// Haswell-ULT VR configurations. +#define VR_MISC_CONFIG2 0x636 + +// Haswell-ULT Alternate BCLK in deep Package C states. +#define MSR_COUNTER_24_MHZ 0x637 + // Sandy Bridge IA (Core) domain MSR's. #define MSR_PP0_POWER_LIMIT 0x638 #define MSR_PP0_ENERGY_STATUS 0x639 @@ -117,12 +142,6 @@ #define MSR_CONFIG_TDP_CONTROL 0x64B #define MSR_TURBO_ACTIVATION_RATIO 0x64C -// JakeTown only Memory MSR's. -#define MSR_DRAM_POWER_LIMIT 0x618 -#define MSR_DRAM_ENERGY_STATUS 0x619 -#define MSR_DRAM_PERF_STATUS 0x61B -#define MSR_DRAM_POWER_INFO 0x61C - // CPUID leaf index values (pointing to the right spot in CPUID/LEAF array). #define LEAF_0 0 // DHP: Formerly known as CPUID_n @@ -155,6 +174,9 @@ #define CPU_MODEL_IB_CORE_EX 0x3B // Ivy Bridge Core Processors (LGA 2011) #define CPU_MODEL_IB_CORE_XEON 0x3E +#define CPU_MODEL_HASWELL 0x30 +#define CPU_MODEL_HASWELL_ULT 0x40 + #define CPU_MODEL_HASWELL 0x3C #define CPU_MODEL_HASWELL_CORE 0x3F #define CPU_MODEL_HASWELL_CORE_EX 0x45 From 63b822c9e27d102a75c359b46b414eebefd3f3f7 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 13 Apr 2013 19:16:59 +0200 Subject: [PATCH 386/623] Fixing a duplicated value --- i386/libsaio/cpu/essentials.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index 7aa67ba..37fb355 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -177,9 +177,9 @@ #define CPU_MODEL_HASWELL 0x30 #define CPU_MODEL_HASWELL_ULT 0x40 -#define CPU_MODEL_HASWELL 0x3C -#define CPU_MODEL_HASWELL_CORE 0x3F -#define CPU_MODEL_HASWELL_CORE_EX 0x45 +// #define CPU_MODEL_HASWELL 0x3C +// #define CPU_MODEL_HASWELL_CORE 0x3F +// #define CPU_MODEL_HASWELL_CORE_EX 0x45 #define DALES_BRIDGE 1 #define SANDY_BRIDGE 2 From c39385d48e99b5042b757b98fc82c81b6a35ff25 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 13 Apr 2013 19:17:26 +0200 Subject: [PATCH 387/623] Hiding a backup directory --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index a787c99..b1b2a88 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,8 @@ i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/secretCode.h i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo.xcodeproj/xcuserdata i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo.xcodeproj/project.xcworkspace +i386/libsaio/cpu/tools/PMinfoBackup + i386/libsaio/smbios/tools/smbios2struct3 i386/libsaio/smbios/tools/smbios2struct4 From 721c931265b72e4b9d81503cf618ad80fcd859ac Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 13 Apr 2013 19:18:44 +0200 Subject: [PATCH 388/623] Adding IGPU P-States --- .../AppleIntelCPUPowerManagementInfo.cpp | 119 ++++++++++++------ .../AppleIntelCPUPowerManagementInfo.h | 64 +++++++++- 2 files changed, 144 insertions(+), 39 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index eaa7455..f701306 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -104,6 +104,16 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) UInt8 currentMultiplier = (rdmsr64(MSR_IA32_PERF_STS) >> 8); gCoreMultipliers |= (1ULL << currentMultiplier); +#if REPORT_GPU_STATS + UInt8 currentIgpuMultiplier = 0; + + if (igpuEnabled) + { + currentIgpuMultiplier = (UInt8)gMchbar[1]; + gIGPUMultipliers |= (1ULL << currentIgpuMultiplier); + } +#endif + timerEventSource->setTimeoutTicks(Interval); if (loopLock) @@ -121,14 +131,21 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) IOSimpleLockUnlock(simpleLock); } +#if REPORT_GPU_STATS + if ((gCoreMultipliers != gTriggeredPStates) || (gIGPUMultipliers != gTriggeredIGPUPStates)) +#else if (gCoreMultipliers != gTriggeredPStates) +#endif { + int currentBit = 0; + UInt64 value = 0ULL; + gTriggeredPStates = gCoreMultipliers; IOLog("AICPUPMI: CPU P-States [ "); - - for (int currentBit = gMinRatio; currentBit <= gMaxRatio; currentBit++) + + for (currentBit = gMinRatio; currentBit <= gMaxRatio; currentBit++) { - UInt64 value = (1ULL << currentBit); + value = (1ULL << currentBit); if ((gTriggeredPStates & value) == value) { @@ -142,11 +159,32 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) } } } + #if REPORT_GPU_STATS - IOLog("] GPU P-State [ %d ]\n", (UInt8)gMchbar[1]); -#else - IOLog("]\n"); + if (igpuEnabled) + { + gTriggeredIGPUPStates = gIGPUMultipliers; + IOLog("] GPU P-States [ "); + + for (currentBit = 17; currentBit <= 27; currentBit++) + { + value = (1ULL << currentBit); + + if ((gTriggeredIGPUPStates & value) == value) + { + if (currentBit == currentIgpuMultiplier) + { + IOLog("(%d) ", currentBit); + } + else + { + IOLog("%d ", currentBit); + } + } + } + } #endif + IOLog("]\n"); } loopLock = false; @@ -216,40 +254,46 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) } #if REPORT_GPU_STATS - /* - * TODO: Pike, add check a to see if there is a GPU and if it is enabled! - */ - IOPhysicalAddress address = (IOPhysicalAddress)(0xFED10000 + 0x5948); - memDescriptor = IOMemoryDescriptor::withPhysicalAddress(address, 0x53, kIODirectionIn); - - if (memDescriptor != NULL) + if ((READ_PCI8_NB(DEVEN) & DEVEN_D2EN_MASK)) { - if ((result = memDescriptor->prepare()) == kIOReturnSuccess) + IOPhysicalAddress address = (IOPhysicalAddress)(0xFED10000 + 0x5948); + memDescriptor = IOMemoryDescriptor::withPhysicalAddress(address, 0x53, kIODirectionInOut); + + if (memDescriptor != NULL) { - memoryMap = memDescriptor->map(); - - if (memoryMap != NULL) + if ((result = memDescriptor->prepare()) == kIOReturnSuccess) { - gMchbar = (UInt8 *)memoryMap->getVirtualAddress(); - IOLog("AICPUPMI: Graphics Core Ratios:\n"); - IOLog("AICPUPMI: Current Ratio : 0x%02x\n", (UInt8)gMchbar[1]); - IOLog("AICPUPMI: Max Non-Turbo Ratio : 0x%02x\n", (UInt8)gMchbar[0x51]); - IOLog("AICPUPMI: Max Turbo Ratio : 0x%02x\n", (UInt8)gMchbar[0x50]); + memoryMap = memDescriptor->map(); + + if (memoryMap != NULL) + { + igpuEnabled = true; // IGPU Enabled and Visible + gMchbar = (UInt8 *)memoryMap->getVirtualAddress(); + + IOLog("AICPUPMI: IGPU Current Freq..: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x01])); + IOLog("AICPUPMI: IGPU Max Frequency.: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x51])); + IOLog("AICPUPMI: IGPU Max Turbo Freq: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x50])); + // + // Example-1: 17 (multiplier) * 50 (frequency in MHz) = 850 MHz + // Example-2: 22 (multiplier) * 50 (frequency in MHz) = 1100 MHz + // 6 P-States: 850, 900, 950, 1000, 1050 and 1100 MHz + // + } + else + { + IOLog("AICPUPMI: Error: memoryMap == NULL\n"); + } } else { - IOLog("AICPUPMI: Error: memoryMap == NULL\n"); + IOLog("AICPUPMI: Error: memDescriptor->prepare() failed!\n"); } } else { - IOLog("Error: memDescriptor->prepare() failed!\n"); + IOLog("AICPUPMI: Error: memDescriptor == NULL\n"); } } - else - { - IOLog("Error: memDescriptor == NULL\n"); - } #endif timerEventSource->setTimeoutMS(1000); @@ -290,16 +334,19 @@ void AppleIntelCPUPowerManagementInfo::stop(IOService *provider) void AppleIntelCPUPowerManagementInfo::free() { #if REPORT_GPU_STATS - if (memoryMap) + if (igpuEnabled) { - memoryMap->release(); - memoryMap = NULL; - } + if (memoryMap) + { + memoryMap->release(); + memoryMap = NULL; + } - if (memDescriptor) - { - memDescriptor->release(); - memDescriptor = NULL; + if (memDescriptor) + { + memDescriptor->release(); + memDescriptor = NULL; + } } #endif diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index ebd5a79..f161451 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -22,7 +22,61 @@ #define super IOService #define REPORT_MSRS 1 -#define REPORT_GPU_STATS 0 +#define REPORT_GPU_STATS 1 + +#define NB_BUS 0x00 +#define NB_DEV 0x00 +#define NB_FUN 0x00 + +#define DEVEN (0x54) +#define DEVEN_D2EN_MASK (0x10) + +#define NB_PCICFG_SPACE_INDEX_REG 0xcf8 +#define NB_PCICFG_SPACE_DATA_REG 0xcfc + +#define BIT31 0x80000000 + +#define PCIEX_BASE_ADDRESS 0xF8000000 +#define NB_MCH_BASE_ADDRESS 0xFED10000 // (G)MCH Memory Mapped Register Range Base Address (D0:F0:Rx48). + +#define READ_PCI8(Bx, Dx, Fx, Rx) ReadPci8(Bx, Dx, Fx, Rx) +#define READ_PCI8_NB(Rx) READ_PCI8(NB_BUS, NB_DEV, NB_FUN, Rx) +#define MMIO_READ8(Address) (*(volatile UInt8 *)(Address)) + +#define IGPU_RATIO_TO_FREQUENCY(ratio) ((ratio * 100) / 2) + +#define NB_PCI_CFG_ADDRESS(bus, dev, func, reg) \ + (UInt64) ((((UInt8)(bus) << 24) + ((UInt8)(dev) << 16) + \ + ((UInt8)(func) << 8) + ((UInt8)(reg))) & 0xffffffff) + +#define NB_PCIE_CFG_ADDRESS(bus, dev, func, reg) \ + ((UInt32)(PCIEX_BASE_ADDRESS + ((UInt8)(bus) << 20) + \ + ((UInt8)(dev) << 15) + ((UInt8)(func) << 12) + (reg))) + +static __inline__ unsigned char inb(UInt16 port) +{ + UInt8 value; + __asm__ volatile("inb %w1, %b0" : "=a" (value) : "Nd" (port)); + return (value); +} + +static __inline__ void outl(UInt16 port, UInt32 value) +{ + __asm__ volatile("outl %0, %w1" : : "a" (value), "Nd" (port)); +} + +UInt8 ReadPci8(UInt8 Bus, UInt8 Dev, UInt8 Fun, UInt16 Reg) +{ + if (Reg >= 0x100) + { + return MMIO_READ8(NB_PCIE_CFG_ADDRESS(Bus, Dev, Fun, Reg)); + } + else + { + outl(NB_PCICFG_SPACE_INDEX_REG, BIT31 | (Bus << 16) | (Dev << 11) | (Fun << 8) | (Reg & 0xfc)); + return inb(NB_PCICFG_SPACE_DATA_REG | (UInt8)(Reg & 3)); + } +} extern "C" void mp_rendezvous_no_intrs(void (*action_func)(void *), void * arg); extern "C" int cpu_number(void); @@ -49,11 +103,15 @@ class AppleIntelCPUPowerManagementInfo : public IOService bool loopLock = false; bool dumpCStates = false; + bool igpuEnabled = false; UInt16 Interval = 50; - UInt64 gCoreMultipliers = 0ULL; - UInt64 gTriggeredPStates = 0ULL; + UInt64 gCoreMultipliers = 0ULL; + UInt64 gTriggeredPStates = 0ULL; + + UInt64 gIGPUMultipliers = 0ULL; + UInt64 gTriggeredIGPUPStates = 0ULL; public: virtual IOService * probe(IOService * provider, SInt32 * score); From 8d0ee17fb43145c60417f87fe4e016f8ac3a2341 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 17 Apr 2013 07:07:54 +0200 Subject: [PATCH 389/623] Removing all DEBUG port related code --- .../acpi/examples/P8Z68-V PRO/dsdt.dsl | 49 +------------------ 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl b/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl index e5096f0..19edd67 100644 --- a/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl +++ b/i386/libsaio/acpi/examples/P8Z68-V PRO/dsdt.dsl @@ -39,8 +39,6 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "APPLE", "Macmini", 0x00050001) OperationRegion (GNVS, SystemMemory, OPRE, 0x0163) Field (GNVS, AnyAcc, Lock, Preserve) { - Offset (0x0B), - P80D, 32, Offset (0x3C), IGDS, 8, Offset (0xAA), @@ -68,23 +66,11 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "APPLE", "Macmini", 0x00050001) GP27, 1 } - OperationRegion (DEB0, SystemIO, 0x80, One) - Field (DEB0, ByteAcc, NoLock, Preserve) - { - DBG8, 8 - } - - OperationRegion (PRT0, SystemIO, 0x80, 0x04) - Field (PRT0, DWordAcc, Lock, Preserve) - { - P80H, 32 - } - Method (_PIC, 1, NotSerialized) { } - Scope (_PR) + Scope (\_PR) { Processor (CPU0, 0x01, 0x00000410, 0x06) {} Processor (CPU1, 0x02, 0x00000410, 0x06) {} @@ -1142,8 +1128,6 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "APPLE", "Macmini", 0x00050001) Method (_L01, 0, NotSerialized) { Add (L01C, One, L01C) - P8XH (Zero, One) - P8XH (One, L01C) } Method (_L02, 0, NotSerialized) @@ -1185,38 +1169,8 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "APPLE", "Macmini", 0x00050001) Name (_S4, Package (0x03) { 0x06, 0x06, Zero }) Name (_S5, Package (0x03) { 0x07, 0x07, Zero }) - Method (P8XH, 2, Serialized) - { - If (LEqual (Arg0, Zero)) - { - Store (Or (And (P80D, 0xFFFFFF00), Arg1), P80D) - } - - If (LEqual (Arg0, One)) - { - Store (Or (And (P80D, 0xFFFF00FF), ShiftLeft (Arg1, 0x08) - ), P80D) - } - - If (LEqual (Arg0, 0x02)) - { - Store (Or (And (P80D, 0xFF00FFFF), ShiftLeft (Arg1, 0x10) - ), P80D) - } - - If (LEqual (Arg0, 0x03)) - { - Store (Or (And (P80D, 0x00FFFFFF), ShiftLeft (Arg1, 0x18) - ), P80D) - } - - Store (P80D, P80H) - } - Method (_PTS, 1, NotSerialized) { - Store (Zero, P80D) - P8XH (Zero, Arg0) If (Arg0) { Store (One, \_SB.PCI0.LPCB.SLPX) @@ -1231,7 +1185,6 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "APPLE", "Macmini", 0x00050001) Method (_WAK, 1, Serialized) { - ShiftLeft (Arg0, 0x04, DBG8) \_SB.PCI0.LPCB.SWAK (Arg0) Store (Zero, \_SB.PCI0.LPCB.PLED) Return (Package (0x02) From a3df7a08766170d9218df713cd4caf9dd99e0bf7 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 17 Apr 2013 16:51:57 +0200 Subject: [PATCH 390/623] New path for Clover revision 1277 --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 2cd130e..959de69 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 6.0 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 6.1 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -66,6 +66,7 @@ # - Show warnings for Sandy Bridge systems as well (Jeroen, March 2013) # - New Intel Haswell processors added (Jeroen, April 2013) # - Improved Processor declaration detection (Jeroen/Pike, April 2013) +# - New path for Clover revision 1277 (Jeroen, April 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -167,7 +168,7 @@ gScope="\_PR_" # Other global variables. # -gScriptVersion=6.0 +gScriptVersion=6.1 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -1152,7 +1153,14 @@ function _setDestinationPath fi # - # Checking for Clover + # Checking for Clover rev 1277 (projectosx.com/forum/index.php?showtopic=2656&p=29129&#entry29129) + # + if [ -d /EFI/Clover/ACPI/patched ]; then + gDestinationPath="/EFI/Clover/ACPI/patched/" + fi + + # + # Checking for Clover (older versions) # if [ -d /EFI/ACPI/patched ]; then gDestinationPath="/EFI/ACPI/patched/" @@ -1917,11 +1925,11 @@ if (($gCallIasl)); then # if (($gAutoCopy)); then if [ -f ${gPath}/${gSsdtID}.aml ]; then + _setDestinationPath echo -e read -p "Do you want to copy ${gPath}/${gSsdtID}.aml to ${gDestinationPath}${gDestinationFile}? (y/n)?" choice case "$choice" in - y|Y ) _setDestinationPath - sudo cp ${gPath}/${gSsdtID}.aml ${gDestinationPath}${gDestinationFile} + y|Y ) sudo cp ${gPath}/${gSsdtID}.aml ${gDestinationPath}${gDestinationFile} ;; esac fi From a40a6637e4adf8ff25890db2cd535c59235fa72c Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 26 May 2013 13:20:47 +0200 Subject: [PATCH 391/623] Securing version 6.4 Jeroen accedentally rm'ed my local RevoBoot directory while I was working in it. We lost all Haswell updates (: --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 254 +++++++++++++++++---------- 1 file changed, 165 insertions(+), 89 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 959de69..daf0c00 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 6.1 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 6.4 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -67,11 +67,17 @@ # - New Intel Haswell processors added (Jeroen, April 2013) # - Improved Processor declaration detection (Jeroen/Pike, April 2013) # - New path for Clover revision 1277 (Jeroen, April 2013) +# - Haswell's minimum core frequency is 800 MHz (Jeroen, April 2013) +# - CPU signature output added (Jeroen/Pike, April 2013) +# - Updating to v6.4 after Jeroen's accidental RM of my local RevoBoot directory (Pike, May 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). # - Thanks to 'stinga11' for Sandy Bridge (E5) data and processor list errors. # - Many thanks to Jeroen for the CPU data, cleanups, renaming stuff and other improvements. +# - Thanks to 'philip_petev' for his help with Snow Leopard/egrep incompatibility. +# - Thanks to 'RehabMan' for his help with Snow Leopard/egrep incompatibility. +# - Thanks to 'BigDonkey' for his help with LFM (800 MHz) for Sandy Bridge mobility models. # # Usage (v1.0 - v4.9): # @@ -130,7 +136,7 @@ gDestinationPath="/Extra/" # # This is the filename used for the copy process # -gDestinationFile="ssdt.aml" +gDestinationFile="ssdt_pr.aml" # # A value of 1 will make this script call iasl (compiles ssdt_pr.dsl) @@ -168,7 +174,7 @@ gScope="\_PR_" # Other global variables. # -gScriptVersion=6.1 +gScriptVersion=6.5 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -198,11 +204,13 @@ let SANDY_BRIDGE=2 let gTypeCPU=0 gProcessorData="Unknown CPU" gProcessorNumber="" +gBusFrequency=100 +gUnmountEFIPartition=false # # Maximum Turbo Clock Speed (user configurable) # -let gMaxOCFrequency=5000 +let gMaxOCFrequency=6300 let MAX_TURBO_FREQUENCY_ERROR=2 let MAX_TDP_ERROR=3 @@ -239,6 +247,7 @@ E3-1220,80,0,3100,3400,4,4 ) gDesktopSandyBridgeCPUList=( +i7-35355,120,1600,2666,2666,4,4 # i7 Desktop Extreme Series i7-3970X,150,0,3500,4000,6,12 i7-3960X,130,0,3300,3900,6,12 @@ -278,56 +287,56 @@ i3-2100,65,1600,3100,0,2,4 gMobileSandyBridgeCPUList=( # i7 Mobile Extreme Series -i7-2960XM,55,0,2700,3700,4,8 -i7-2920XM,55,0,2500,3500,4,8 +i7-2960XM,55,800,2700,3700,4,8 +i7-2920XM,55,800,2500,3500,4,8 # i7 Mobile Series -i7-2860QM,45,0,2500,3600,4,8 -i7-2820QM,45,0,2300,3400,4,8 -i7-2760QM,45,0,2400,3500,4,8 -i7-2720QM,45,0,2200,3300,4,8 -i7-2715QE,45,0,2100,3000,4,8 -i7-2710QE,45,0,2100,3000,4,8 -i7-2677M,17,0,1800,2900,2,4 -i7-2675QM,45,0,2200,3100,4,8 -i7-2670QM,45,0,2200,3100,4,8 -i7-2675M,17,0,1600,2700,2,4 -i7-2655LE,25,0,2200,2900,2,4 -i7-2649M,25,0,2300,3200,2,4 -i7-26740M,32,0,2800,3500,2,4 -i7-2637M,17,0,1700,2800,2,4 -i7-2635QM,45,0,2000,2900,4,8 -i7-2630QM,45,0,2000,2900,4,8 -i7-2629M,25,0,2100,3000,2,4 -i7-2620M,35,0,2700,3400,2,4 -i7-2617M,17,0,1500,2600,2,4 -i7-2610UE,17,0,1500,2400,2,4 +i7-2860QM,45,800,2500,3600,4,8 +i7-2820QM,45,800,2300,3400,4,8 +i7-2760QM,45,800,2400,3500,4,8 +i7-2720QM,45,800,2200,3300,4,8 +i7-2715QE,45,800,2100,3000,4,8 +i7-2710QE,45,800,2100,3000,4,8 +i7-2677M,17,800,1800,2900,2,4 +i7-2675QM,45,800,2200,3100,4,8 +i7-2670QM,45,800,2200,3100,4,8 +i7-2675M,17,800,1600,2700,2,4 +i7-2655LE,25,800,2200,2900,2,4 +i7-2649M,25,800,2300,3200,2,4 +i7-26740M,32,800,2800,3500,2,4 +i7-2637M,17,800,1700,2800,2,4 +i7-2635QM,45,800,2000,2900,4,8 +i7-2630QM,45,800,2000,2900,4,8 +i7-2629M,25,800,2100,3000,2,4 +i7-2620M,35,800,2700,3400,2,4 +i7-2617M,17,800,1500,2600,2,4 +i7-2610UE,17,800,1500,2400,2,4 # i5 Mobile Series -i5-2467M,17,0,1600,2300,2,4 +i5-2467M,17,800,1600,2300,2,4 i5-2450M,35,800,2300,3100,2,4 -i5-2435M,35,0,2400,3000,2,4 -i5-2430M,35,0,2400,3000,2,4 -i5-2410M,35,0,2300,2900,2,4 -i5-2557M,17,0,1700,2700,2,4 -i5-2540M,35,0,2600,3300,2,4 -i5-2537M,17,0,1400,2300,2,4 -i5-2520M,35,0,2500,3200,2,4 -i5-2515E,35,0,2500,3100,2,4 -i5-2510E,35,0,2500,3100,2,4 +i5-2435M,35,800,2400,3000,2,4 +i5-2430M,35,800,2400,3000,2,4 +i5-2410M,35,800,2300,2900,2,4 +i5-2557M,17,800,1700,2700,2,4 +i5-2540M,35,800,2600,3300,2,4 +i5-2537M,17,800,1400,2300,2,4 +i5-2520M,35,800,2500,3200,2,4 +i5-2515E,35,800,2500,3100,2,4 +i5-2510E,35,800,2500,3100,2,4 # i3 2300 Mobile Series -i3-2377M,17,0,1500,0,2,4 -i3-2370M,35,0,2400,0,2,4 -i3-2367M,17,0,1400,0,2,4 -i3-2365M,17,0,1400,0,2,4 -i3-2357M,17,0,1300,0,2,4 -i3-2350M,35,0,2300,0,2,4 -i3-2348M,35,0,2300,0,2,4 -i3-2340UE,17,0,1300,0,2,4 -i3-2330M,35,0,2200,0,2,4 -i3-2330E,35,0,2200,0,2,4 -i3-2328M,35,0,2200,0,2,4 -i3-2312M,35,0,2100,0,2,4 -i3-2310M,35,0,2100,0,2,4 -i3-2310E,35,0,2100,0,2,4 +i3-2377M,17,800,1500,0,2,4 +i3-2370M,35,800,2400,0,2,4 +i3-2367M,17,800,1400,0,2,4 +i3-2365M,17,800,1400,0,2,4 +i3-2357M,17,800,1300,0,2,4 +i3-2350M,35,800,2300,0,2,4 +i3-2348M,35,800,2300,0,2,4 +i3-2340UE,17,800,1300,0,2,4 +i3-2330M,35,800,2200,0,2,4 +i3-2330E,35,800,2200,0,2,4 +i3-2328M,35,800,2200,0,2,4 +i3-2312M,35,800,2100,0,2,4 +i3-2310M,35,800,2100,0,2,4 +i3-2310E,35,800,2100,0,2,4 ) @@ -452,31 +461,31 @@ gServerHaswellCPUList=( gDesktopHaswellCPUList=( # Socket 2011 (Premium Power) -i7-4960K,130,0,3600,4000,6,12 -i7-4930K,130,0,3400,3900,6,12 -i5-4820K,130,0,3700,3900,4,8 +i7-4960K,130,800,3600,4000,6,12 +i7-4930K,130,800,3400,3900,6,12 +i5-4820K,130,800,3700,3900,4,8 # Socket 1150 (Standard Power) -i7-4770K,84,00,3500,3900,4,8 -i7-4770,84,0,3400,3900,4,8 -i5-4670K,84,0,3400,3800,4,4 -i5-4670,84,0,3400,3800,4,4 -i5-4570,84,0,3200,3600,4,4 -i5-4430,84,0,3000,3200,4,4 +i7-4770K,84,800,3500,3900,4,8 +i7-4770,84,800,3400,3900,4,8 +i5-4670K,84,800,3400,3800,4,4 +i5-4670,84,800,3400,3800,4,4 +i5-4570,84,800,3200,3600,4,4 +i5-4430,84,800,3000,3200,4,4 # Socket 1150 (Low Power) -i7-4770S,65,0,3100,3900,4,8 -i7-4770T,45,0,2500,3700,4,8 -i7-4765T,35,0,2000,3000,4,8 -i5-4670S,65,0,3100,3800,4,4 -i5-4670T,45,0,2300,3300,4,4 -i5-4570S,65,0,2900,3600,4,4 -i5-4570T,35,0,2900,3600,2,4 -i5-4430S,65,0,2700,3200,4,4 +i7-4770S,65,800,3100,3900,4,8 +i7-4770T,45,800,2500,3700,4,8 +i7-4765T,35,800,2000,3000,4,8 +i5-4670S,65,800,3100,3800,4,4 +i5-4670T,45,800,2300,3300,4,4 +i5-4570S,65,800,2900,3600,4,4 +i5-4570T,35,800,2900,3600,2,4 +i5-4430S,65,800,2700,3200,4,4 ) gMobileHaswellCPUList=( -i7-4930MX,57,0,3000,3900,4,8 -i7-4900MQ,47,0,2800,3800,4,8 -i7-4800MQ,47,0,2700,3700,4,8 +i7-4930MX,57,800,3000,3900,4,8 +i7-4900MQ,47,800,2800,3800,4,8 +i7-4800MQ,47,800,2700,3700,4,8 ) #-------------------------------------------------------------------------------- @@ -526,6 +535,7 @@ function _printDebugInfo() echo ' Store ("ssdtPRGen version: '$gScriptVersion'", Debug)' >> $gSsdtPR echo ' Store ("baseFrequency : '$gBaseFrequency'", Debug)' >> $gSsdtPR echo ' Store ("frequency : '$frequency'", Debug)' >> $gSsdtPR + echo ' Store ("busFrequency : '$gBusFrequency'", Debug)' >> $gSsdtPR echo ' Store ("logicalCPUs : '$gLogicalCPUs'", Debug)' >> $gSsdtPR echo ' Store ("tdp : '$gTdp'", Debug)' >> $gSsdtPR echo ' Store ("packageLength : '$packageLength'", Debug)' >> $gSsdtPR @@ -629,9 +639,9 @@ function _printPackages() local maxNonTurboFrequency=$2 local frequency=$3 - let minRatio=($gBaseFrequency/100) - let p1Ratio=($maxNonTurboFrequency/100) - let ratio=($frequency/100) + let minRatio=($gBaseFrequency/$gBusFrequency) + let p1Ratio=($maxNonTurboFrequency/$gBusFrequency) + let ratio=($frequency/$gBusFrequency) let powerRatio=($p1Ratio-1) # @@ -677,7 +687,7 @@ function _printPackages() printf "0x0A, 0x0A, 0x%02X00, 0x%02X00 }" $ratio $ratio >> $gSsdtPR let ratio-=1 - let frequency-=100 + let frequency-=$gBusFrequency if [ $ratio -ge $minRatio ]; then @@ -1061,11 +1071,14 @@ function _updateProcessorNames() function _getProcessorScope() { - if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 | egrep -o 'DSDT"=<[0-9a-f]+5b830b') ]]; then + # + # We run egrep twice here for Snow Leopard compatibility, otherwise it fails. + # + if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 -w0 | egrep -o 'DSDT"=<[0-9a-f]+' | egrep -o '5b830b') ]]; then printf 'Processor Declaration(s) Found in DSDT' fi - if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 | egrep -o 'DSDT"=<[0-9a-f]+5f50525f') ]]; + if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 -w0 | egrep -o 'DSDT"=<[0-9a-f]+' | egrep -o '5f50525f') ]]; then gScope="\_PR_" echo ' (ACPI 1.0 compliant)' @@ -1100,6 +1113,16 @@ function _getCPUModel() #-------------------------------------------------------------------------------- +function _getCPUSignature() +{ + # + # Returns the hexadecimal value of machdep.cpu.signature + # + echo 0x$(echo "obase=16; `sysctl machdep.cpu.signature | sed -e 's/^machdep.cpu.signature: //'`" | bc) +} + +#-------------------------------------------------------------------------------- + function _getSystemType() { # @@ -1150,13 +1173,50 @@ function _setDestinationPath # if [ -d /Extra/ACPI ]; then gDestinationPath="/Extra/ACPI/" + echo 'ACPI target directory changed to: $gDestinationPath' + return fi # - # Checking for Clover rev 1277 (projectosx.com/forum/index.php?showtopic=2656&p=29129&#entry29129) + # Checking for Clover rev 1277 and greater (projectosx.com/forum/index.php?showtopic=2656&p=29129&#entry29129) # - if [ -d /EFI/Clover/ACPI/patched ]; then - gDestinationPath="/EFI/Clover/ACPI/patched/" + if [ -d /EFI/Clover/ACPI/patched ]; + then + gDestinationPath="/EFI/Clover/ACPI/patched/" + echo 'ACPI target directory changed to: $gDestinationPath' + return + else + if [ -d /Volumes/EFI ]; + then + if [ -d /Volumes/EFI/Clover/ACPI/patched ]; then + gDestinationPath="/Volumes/EFI/Clover/ACPI/patched/" + echo 'ACPI target directory changed to: $gDestinationPath' + return + fi + else + # + # http://www.tonymacx86.com/ssdt/86906-ssdt-generation-script-ivybridge-pm-40.html#post604496 + # + if [ -f /Library/Logs/CloverEFI/boot.log ]; + then + echo 'Clover boot.log found' + return + else + echo 'Warning: Failed to locate the Clover boot.log' + echo 'Creating temporarily mount point: /Volumes/EFI' + sudo mkdir /Volumes/EFI + echo 'Mounting EFI partition...' + sudo mount_hfs /dev/disk0s1 /Volumes/EFI + + if [ -d /Volumes/EFI/Clover/ACPI/patched ]; then + gUnmountEFIPartition=true; + gDestinationPath="/Volumes/EFI/Clover/ACPI/patched/" + echo 'ACPI target directory changed to: $gDestinationPath' + return + fi + fi + + fi fi # @@ -1164,6 +1224,8 @@ function _setDestinationPath # if [ -d /EFI/ACPI/patched ]; then gDestinationPath="/EFI/ACPI/patched/" + echo 'ACPI target directory changed to: $gDestinationPath' + return fi } @@ -1354,17 +1416,22 @@ function _checkPlatformSupport() return 0 } - __searchList 'SupportedModelProperties' $1 - - if (($? == 0)); then - echo 'Warning: Model identifier ['$1'] is missing from: /S*/L*/CoreServices/PlatformSupport.plist' - fi + # + # This check is required for Snow Leopard compatibility! + # + if [ -f /System/Library/CoreServices/PlatformSupport.plist ]; + then + __searchList 'SupportedModelProperties' $1 - __searchList 'SupportedBoardIds' $2 + if (($? == 0)); then + echo 'Warning: Model identifier ['$1'] is missing from: /S*/L*/CoreServices/PlatformSupport.plist' + fi - if (($? == 0)); then - echo 'Warning: boardID ['$2'] is missing from: /S*/L*/CoreServices/PlatformSupport.plist' + __searchList 'SupportedBoardIds' $2 + if (($? == 0)); then + echo 'Warning: boardID ['$2'] is missing from: /S*/L*/CoreServices/PlatformSupport.plist' + fi fi } @@ -1644,10 +1711,11 @@ function main() fi # Haswell - if (($model==0x30)); then + if (($model==0x3C)); then let assumedTDP=1 let gTdp=84 let gBridgeType=8 + let gMaxOCFrequency=8000 fi # Haswell ULT @@ -1676,9 +1744,10 @@ function main() local modelID=$(_getModelName) local cpu_type=$(_getCPUtype) local currentSystemType=$(_getSystemType) + local cpuSignature=$(_getCPUSignature) echo "Generating ${gSsdtID}.dsl for a $modelID [$boardID]" - echo "$bridgeTypeString Core $gProcessorNumber processor [0x$cpu_type] setup" + echo "$bridgeTypeString Core $gProcessorNumber processor [$cpuSignature] setup [0x$cpu_type]" # # gTypeCPU is greater than 0 when the processor is found in one of the CPU lists @@ -1930,6 +1999,13 @@ if (($gCallIasl)); then read -p "Do you want to copy ${gPath}/${gSsdtID}.aml to ${gDestinationPath}${gDestinationFile}? (y/n)?" choice case "$choice" in y|Y ) sudo cp ${gPath}/${gSsdtID}.aml ${gDestinationPath}${gDestinationFile} + + if (($gUnmountEFIPartition)); then + echo 'Unmounting EFI partition...' + # sudo unmount -f /Volumes/EFI + echo 'Removing temporarily mount point...' + # sudo rm -rf /Volumes/EFI + fi ;; esac fi From f66f9f99318db1b585054cb4a7303c03538e49e6 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 26 May 2013 14:23:54 +0200 Subject: [PATCH 392/623] Updating script to version 6.5 Some bugs fixes and EFI partition checking for Clover compatibility --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 138 +++++++++++++++++++++------ 1 file changed, 111 insertions(+), 27 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index daf0c00..cfd13c8 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 6.4 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 6.5 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -70,6 +70,7 @@ # - Haswell's minimum core frequency is 800 MHz (Jeroen, April 2013) # - CPU signature output added (Jeroen/Pike, April 2013) # - Updating to v6.4 after Jeroen's accidental RM of my local RevoBoot directory (Pike, May 2013) +# - Updating to v6.5 with bugs fixes and EFI partition checking for Clover compatibility (Pike, May 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -78,6 +79,7 @@ # - Thanks to 'philip_petev' for his help with Snow Leopard/egrep incompatibility. # - Thanks to 'RehabMan' for his help with Snow Leopard/egrep incompatibility. # - Thanks to 'BigDonkey' for his help with LFM (800 MHz) for Sandy Bridge mobility models. +# - Thanks to 'xpamamadeus' for the Clover boot.log tip. # # Usage (v1.0 - v4.9): # @@ -205,7 +207,7 @@ let gTypeCPU=0 gProcessorData="Unknown CPU" gProcessorNumber="" gBusFrequency=100 -gUnmountEFIPartition=false +let gUnmountEFIPartition=0 # # Maximum Turbo Clock Speed (user configurable) @@ -1173,7 +1175,7 @@ function _setDestinationPath # if [ -d /Extra/ACPI ]; then gDestinationPath="/Extra/ACPI/" - echo 'ACPI target directory changed to: $gDestinationPath' + echo -e '\nACPI target directory changed to: '$gDestinationPath return fi @@ -1183,14 +1185,14 @@ function _setDestinationPath if [ -d /EFI/Clover/ACPI/patched ]; then gDestinationPath="/EFI/Clover/ACPI/patched/" - echo 'ACPI target directory changed to: $gDestinationPath' + echo -e '\nACPI target directory changed to: $gDestinationPath' return else if [ -d /Volumes/EFI ]; then if [ -d /Volumes/EFI/Clover/ACPI/patched ]; then gDestinationPath="/Volumes/EFI/Clover/ACPI/patched/" - echo 'ACPI target directory changed to: $gDestinationPath' + echo -e '\nACPI target directory changed to: $gDestinationPath' return fi else @@ -1202,14 +1204,17 @@ function _setDestinationPath echo 'Clover boot.log found' return else - echo 'Warning: Failed to locate the Clover boot.log' + echo -e '\nWarning: Failed to locate the Clover boot.log' echo 'Creating temporarily mount point: /Volumes/EFI' sudo mkdir /Volumes/EFI - echo 'Mounting EFI partition...' + printf 'Mounting EFI partition...\n' + # + # TODO: Get target disk from diskutil list + # sudo mount_hfs /dev/disk0s1 /Volumes/EFI + let gUnmountEFIPartition=1 - if [ -d /Volumes/EFI/Clover/ACPI/patched ]; then - gUnmountEFIPartition=true; + if [ -f /Volumes/EFI/Clover/ACPI/patched ]; then gDestinationPath="/Volumes/EFI/Clover/ACPI/patched/" echo 'ACPI target directory changed to: $gDestinationPath' return @@ -1367,7 +1372,7 @@ function _showLowPowerStates() # Haswell : C0, C1, C1E, C2E, C3, C4, C6 and C7 # Haswell-ULT: C0, C1, C1E, C2E, C3, C4, C6, C7, C8, C9 and C10 # - for state in C1 C2 C3 C6 C7 + for state in C1 C2 C3 C6 C7 C8 C9 C10 do if (($cStates & $mask)); then if (($mask > 1)); then @@ -1432,6 +1437,8 @@ function _checkPlatformSupport() if (($? == 0)); then echo 'Warning: boardID ['$2'] is missing from: /S*/L*/CoreServices/PlatformSupport.plist' fi + else + echo 'Warning: /S*/L*/C*/PlatformSupport.plist not found (normal for Snow Leopard)!' fi } @@ -1550,70 +1557,147 @@ function _initIvyBridgeSetup() gMacModelIdentifier="iMac13,1" gACST_CPU0=13 # C1, C3 and C6 gACST_CPU1=7 # C1, C2 and C3 - ;; + ;; Mac-FC02E91DDD3FA6A4) gSystemType=1 gMacModelIdentifier="iMac13,2" gACST_CPU0=13 # C1, C3 and C6 gACST_CPU1=7 # C1, C2 and C3 - ;; + ;; Mac-031AEE4D24BFF0B1) gSystemType=1 gMacModelIdentifier="Macmini6,1" gACST_CPU0=13 # C1, C3 and C6 gACST_CPU1=7 # C1, C2 and C3 - ;; + ;; Mac-F65AE981FFA204ED) gSystemType=1 gMacModelIdentifier="Macmini6,2" gACST_CPU0=13 # C1, C3 and C6 gACST_CPU1=7 # C1, C2 and C3 - ;; + ;; Mac-4B7AC7E43945597E) gSystemType=2 gMacModelIdentifier="MacBookPro9,1" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 - ;; + ;; Mac-6F01561E16C75D06) gSystemType=2 gMacModelIdentifier="MacBookPro9,2" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 - ;; + ;; Mac-C3EC7CD22292981F) gSystemType=2 gMacModelIdentifier="MacBookPro10,1" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 - ;; + ;; Mac-AFD8A9D944EA4843) gSystemType=2 gMacModelIdentifier="MacBookPro10,2" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 - ;; + ;; Mac-66F35F19FE2A0D05) gSystemType=2 gMacModelIdentifier="MacBookAir5,1" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 - ;; + ;; Mac-2E6FAB96566FE58C) gSystemType=2 gMacModelIdentifier="MacBookAir5,2" gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 - ;; + ;; + esac +} + +#-------------------------------------------------------------------------------- + +function _initHaswellSetup() +{ + case $boardID in + Mac-) + gSystemType=1 + gMacModelIdentifier="iMac14,1" + gACST_CPU0=13 # C1, C2, C3, C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-) + gSystemType=1 + gMacModelIdentifier="iMac14,2" + gACST_CPU0=13 # C1, C2, C3, C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-) + gSystemType=1 + gMacModelIdentifier="Macmini7,1" + gACST_CPU0=13 # C1, C2, C3, C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-) + gSystemType=1 + gMacModelIdentifier="Macmini7,2" + gACST_CPU0=13 # C1, C2, C3, C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-) + gSystemType=2 + gMacModelIdentifier="MacBookPro11,1" + gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 + gACST_CPU1=31 # C1, C2, C3, C6 and C7 + ;; + + Mac-) + gSystemType=2 + gMacModelIdentifier="MacBookPro11,2" + gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 + gACST_CPU1=31 # C1, C2, C3, C6 and C7 + ;; + + Mac-) + gSystemType=2 + gMacModelIdentifier="MacBookPro12,1" + gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 + gACST_CPU1=31 # C1, C2, C3, C6 and C7 + ;; + + Mac-) + gSystemType=2 + gMacModelIdentifier="MacBookPro12,2" + gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 + gACST_CPU1=31 # C1, C2, C3, C6 and C7 + ;; + + Mac-) + gSystemType=2 + gMacModelIdentifier="MacBookAir6,1" + gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 + gACST_CPU1=31 # C1, C2, C3, C6 and C7 + ;; + + Mac-) + gSystemType=2 + gMacModelIdentifier="MacBookAir6,2" + gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 + gACST_CPU1=31 # C1, C2, C3, C6 and C7 + ;; esac } @@ -1999,15 +2083,15 @@ if (($gCallIasl)); then read -p "Do you want to copy ${gPath}/${gSsdtID}.aml to ${gDestinationPath}${gDestinationFile}? (y/n)?" choice case "$choice" in y|Y ) sudo cp ${gPath}/${gSsdtID}.aml ${gDestinationPath}${gDestinationFile} - - if (($gUnmountEFIPartition)); then - echo 'Unmounting EFI partition...' - # sudo unmount -f /Volumes/EFI - echo 'Removing temporarily mount point...' - # sudo rm -rf /Volumes/EFI - fi ;; esac + + if (($gUnmountEFIPartition)); then + echo -e '\nUnmounting EFI partition...' + sudo umount -f /Volumes/EFI + echo 'Removing temporarily mount point...' + sudo rm -r /Volumes/EFI + fi fi fi From 06a8ee111f95365c5fa513897dde66c265a67589 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 11 Jun 2013 09:17:50 +0200 Subject: [PATCH 393/623] Haswell cleanups --- i386/libsaio/cpu/essentials.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index 37fb355..ff093e6 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -174,12 +174,8 @@ #define CPU_MODEL_IB_CORE_EX 0x3B // Ivy Bridge Core Processors (LGA 2011) #define CPU_MODEL_IB_CORE_XEON 0x3E -#define CPU_MODEL_HASWELL 0x30 -#define CPU_MODEL_HASWELL_ULT 0x40 - -// #define CPU_MODEL_HASWELL 0x3C -// #define CPU_MODEL_HASWELL_CORE 0x3F -// #define CPU_MODEL_HASWELL_CORE_EX 0x45 +#define CPU_MODEL_HASWELL 0x3C +#define CPU_MODEL_HASWELL_ULT 0x45 #define DALES_BRIDGE 1 #define SANDY_BRIDGE 2 From bd70688c330b72096f61e5d13de41f331e825903 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 11 Jun 2013 09:18:30 +0200 Subject: [PATCH 394/623] Adding MacBookAir6,2 data --- i386/libsaio/platform.h | 3 ++- i386/libsaio/smbios/model_data.h | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 28c582d..5d4bb59 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -63,7 +63,8 @@ #define MACBOOK_41 MACBOOK // Defaults to MacBook4,1 #define MACBOOK_AIR_41 (MACBOOK_AIR | (1 << 15)) -#define MACBOOK_AIR_42 MACBOOK_AIR // Defaults to MacBookAir4,1 +#define MACBOOK_AIR_42 (MACBOOK_AIR | (2 << 15)) +#define MACBOOK_AIR_62 MACBOOK_AIR // Defaults to MacBookAir6,2 #define MACBOOK_PRO_61 (MACBOOK_PRO | (1 << 15)) #define MACBOOK_PRO_81 (MACBOOK_PRO | (2 << 15)) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index ea84e8f..42f82bc 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -87,13 +87,20 @@ #define SMB_PRODUCT_NAME "MacBookAir4,1" #define SMB_BOARD_PRODUCT "Mac-C08A6BB70A942AC2" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '4', ',', '1' } - #else // Defaults to MacBookAir4,2 + #elif (TARGET_MODEL == MACBOOK_AIR_42) // Intel Core i5-2557M @ 1.7GHz (2 cores - 4 threads) // Intel Core i7-2677M @ 1.8GHz (2 cores - 4 threads) #define SMB_BIOS_VERSION "MBA41.88Z.0077.B08.1109011050" #define SMB_PRODUCT_NAME "MacBookAir4,2" #define SMB_BOARD_PRODUCT "Mac-742912EFDBEE19B3" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '4', ',', '2' } + #else // Defaults to MacBookAir6,2 + // Intel Core i5-4250U @ 1.30 GHz (2 cores - 4 threads) + // Intel Core i7-4650U @ 1.70 GHz (2 cores - 4 threads) + #define SMB_BIOS_VERSION "MBA61.88Z.0099.B00.1305241529" + #define SMB_PRODUCT_NAME "MacBookAir6,2" + #define SMB_BOARD_PRODUCT "Mac-7DF21CB3ED6977E5" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '6', ',', '2' } #endif // ------------------------------------------------------------------------------------- #endif From 8967a2f0a086aa0e6511a189e97ffe22761ed5f3 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 11 Jun 2013 17:52:08 +0200 Subject: [PATCH 395/623] Adding MacBookAir6,1 data --- i386/libsaio/platform.h | 1 + i386/libsaio/smbios/model_data.h | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 5d4bb59..829c24d 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -64,6 +64,7 @@ #define MACBOOK_AIR_41 (MACBOOK_AIR | (1 << 15)) #define MACBOOK_AIR_42 (MACBOOK_AIR | (2 << 15)) +#define MACBOOK_AIR_61 (MACBOOK_AIR | (3 << 15)) #define MACBOOK_AIR_62 MACBOOK_AIR // Defaults to MacBookAir6,2 #define MACBOOK_PRO_61 (MACBOOK_PRO | (1 << 15)) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 42f82bc..341a9af 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -94,6 +94,13 @@ #define SMB_PRODUCT_NAME "MacBookAir4,2" #define SMB_BOARD_PRODUCT "Mac-742912EFDBEE19B3" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '4', ',', '2' } + #elif (TARGET_MODEL == MACBOOK_AIR_61) + // Intel Core i5-4250U @ 1.30 GHz (2 cores - 4 threads) + // Intel Core i7-4650U @ 1.70 GHz (2 cores - 4 threads) + #define SMB_BIOS_VERSION "MBA61.88Z.0099.B00.1305241529" + #define SMB_PRODUCT_NAME "MacBookAir6,1" + #define SMB_BOARD_PRODUCT "Mac-35C1E88140C3E6CF" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '6', ',', '1' } #else // Defaults to MacBookAir6,2 // Intel Core i5-4250U @ 1.30 GHz (2 cores - 4 threads) // Intel Core i7-4650U @ 1.70 GHz (2 cores - 4 threads) From 3c3dcfecea11165e8b5164721d943fbf7ef4b39f Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 11 Jun 2013 17:53:44 +0200 Subject: [PATCH 396/623] Updating script to version 6.6 - Output of Clover ACPI directory detection fixed. - More Haswell CPUs added. - board-id's for new MacBook Air's added. --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 66 +++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 12 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index cfd13c8..21c63c4 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 6.5 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 6.6 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -71,6 +71,9 @@ # - CPU signature output added (Jeroen/Pike, April 2013) # - Updating to v6.4 after Jeroen's accidental RM of my local RevoBoot directory (Pike, May 2013) # - Updating to v6.5 with bugs fixes and EFI partition checking for Clover compatibility (Pike, May 2013) +# - Output of Clover ACPI directory detection fixed (Pike, June 2013) +# - Haswell CPUs added (Jeroen, June 2013) +# - board-id's for new MacBookAir6,[1/2] added (Pike, June 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -176,7 +179,7 @@ gScope="\_PR_" # Other global variables. # -gScriptVersion=6.5 +gScriptVersion=6.6 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -459,6 +462,20 @@ i3-3110M,35,0,2400,0,2,4 # New Haswell processors (with HD-4600 graphics) # gServerHaswellCPUList=( +# E3-1200 V3 Xeon Processor Series +'E3-1285L V3',65,800,3100,3900,4,8 +'E3-1285 V3',84,800,3600,4000,4,8 +'E3-1280 V3',82,800,3600,4000,4,8 +'E3-1275 V3',84,800,3500,3900,4,8 +'E3-1270 V3',80,800,3500,3900,4,8 +'E3-1268L V3',45,800,2300,3300,4,8 +'E3-1265L V3',45,800,2500,3700,4,8 +'E3-1245 V3',84,800,3400,3800,4,8 +'E3-1240 V3',80,800,3400,3800,4,8 +'E3-1230L V3',25,800,1800,2800,4,8 +'E3-1230 V3',80,800,3300,3700,4,8 +'E3-1225 V3',80,800,3200,3600,4,4 +'E3-1220 V3',80,800,3100,3500,4,4 ) gDesktopHaswellCPUList=( @@ -482,12 +499,30 @@ i5-4670T,45,800,2300,3300,4,4 i5-4570S,65,800,2900,3600,4,4 i5-4570T,35,800,2900,3600,2,4 i5-4430S,65,800,2700,3200,4,4 +# BGA +i7-4770R,65,800,3200,3900,4,8 +# Haswell ULT +i5-4288U,28,800,2600,3100,2,4 +i5-4258U,28,800,2400,2900,2,4 +i5-4250U,15,800,1300,2600,2,4 +i5-4200Y,12,800,1400,1900,2,4 +i5-4200U,15,800,1600,2600,2,4 ) gMobileHaswellCPUList=( +i7-4950HQ,47,800,2400,3600,4,8 +i7-4850HQ,47,800,2300,3500,4,8 +i7-4750HQ,47,800,2000,3200,4,8 +# Extreme Edition Series - socket FCPGA946 i7-4930MX,57,800,3000,3900,4,8 +# Socket FCPGA946 i7-4900MQ,47,800,2800,3800,4,8 i7-4800MQ,47,800,2700,3700,4,8 +i7-4702MQ,37,800,2200,3200,4,8 +i7-4700MQ,47,800,2400,3600,4,8 +# Socket FCBGA1364 +i7-4700HQ,47,800,2400,3600,4,8 +i7-4702HQ,37,800,2200,3200,4,8 ) #-------------------------------------------------------------------------------- @@ -1191,8 +1226,8 @@ function _setDestinationPath if [ -d /Volumes/EFI ]; then if [ -d /Volumes/EFI/Clover/ACPI/patched ]; then - gDestinationPath="/Volumes/EFI/Clover/ACPI/patched/" - echo -e '\nACPI target directory changed to: $gDestinationPath' + gDestinationPath="/Volumes/EFI/CLOVER/ACPI/patched/" + echo -e '\nACPI target directory changed to: '$gDestinationPath return fi else @@ -1212,12 +1247,19 @@ function _setDestinationPath # TODO: Get target disk from diskutil list # sudo mount_hfs /dev/disk0s1 /Volumes/EFI - let gUnmountEFIPartition=1 - if [ -f /Volumes/EFI/Clover/ACPI/patched ]; then - gDestinationPath="/Volumes/EFI/Clover/ACPI/patched/" - echo 'ACPI target directory changed to: $gDestinationPath' - return + if [ -f /Volumes/EFI/Clover/ACPI/patched ]; + then + let gUnmountEFIPartition=1 + gDestinationPath="/Volumes/EFI/CLOVER/ACPI/patched/" + echo 'ACPI target directory changed to: '$gDestinationPath + return + else + echo -e '\nUnmounting EFI partition...' + sudo umount -f /Volumes/EFI + echo 'Removing temporarily mount point...' +# sudo rm -r /Volumes/EFI + return fi fi @@ -1229,7 +1271,7 @@ function _setDestinationPath # if [ -d /EFI/ACPI/patched ]; then gDestinationPath="/EFI/ACPI/patched/" - echo 'ACPI target directory changed to: $gDestinationPath' + echo 'ACPI target directory changed to: '$gDestinationPath return fi } @@ -1685,14 +1727,14 @@ function _initHaswellSetup() gACST_CPU1=31 # C1, C2, C3, C6 and C7 ;; - Mac-) + Mac-35C1E88140C3E6CF) gSystemType=2 gMacModelIdentifier="MacBookAir6,1" gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 gACST_CPU1=31 # C1, C2, C3, C6 and C7 ;; - Mac-) + Mac-7DF21CB3ED6977E5) gSystemType=2 gMacModelIdentifier="MacBookAir6,2" gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 From 90ce11f9f04843c622a5f54c875a3861511f5219 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 12 Jun 2013 00:36:55 +0200 Subject: [PATCH 397/623] Preliminary support for OS X 10.9 aka Mavericks --- CHANGES | 8 +++++++- Makefile | 7 +++++-- VERSION | 2 +- i386/boot2/boot.c | 4 ++-- i386/libsaio/asm.s | 4 ++-- i386/libsaio/bootstruct.c | 6 +++--- i386/libsaio/bootstruct.h | 6 +++--- i386/libsaio/efi.c | 2 +- i386/libsaio/platform.c | 4 +++- 9 files changed, 27 insertions(+), 16 deletions(-) diff --git a/CHANGES b/CHANGES index 30fe0dc..ed274d1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,15 @@ -RevoBoot v1.5.40 (Next Major Release) +RevoBoot v1.5.50 (Next Major Release) ================ - Improved CPU detection (with new/additional CPU's). - Improved P-State generation (less settings). +RevoBoot v1.5.40 +================ +- Support for OS X 10.9 aka Mavericks added (Piker, June 2013). +- VERSION updated to v1.5.40 + + RevoBoot v1.5.39 ================ - Fixed boot failure for InstallESD/BaseSystem.dmg/patched kernelcache (Piker, April 2013). diff --git a/Makefile b/Makefile index 79682ea..6a01726 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,10 @@ else MAKE_TARGET_OS = 6; MAKEGOAL = mountain-lion else - ifeq ($(MAKECMDGOALS), lion) + ifeq ($(MAKECMDGOALS), mavericks) + MAKE_TARGET_OS = 12; + MAKEGOAL = mavericks + else ifeq ($(MAKECMDGOALS), lion) MAKE_TARGET_OS = 2; MAKEGOAL = lion else ifeq ($(MAKECMDGOALS), legacy) @@ -73,7 +76,7 @@ else endif # -# Export our make goal i.e. mountain-lion, lion or legacy (snow-leopard or leopard). +# Export our make goal i.e. mavericks, mountain-lion, lion or legacy (snow-leopard or leopard). # export MAKEGOAL diff --git a/VERSION b/VERSION index 9caff18..adecc24 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.39 +1.5.40 diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 8518d4e..2582af7 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -512,7 +512,7 @@ void boot(int biosdev) _BOOT_DEBUG_DUMP("adler32: %08X\n", adler32); -#if ((MAKE_TARGET_OS & LION) == LION) // Also for Mountain Lion, which has bit 2 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 2 set like Lion. _BOOT_DEBUG_DUMP("Checking for kernelcache...\n"); @@ -528,7 +528,7 @@ void boot(int biosdev) _BOOT_DEBUG_ELSE_DUMP("Failed to locate the kernelcache (directory)!\n"); } -#else // Not for (Mountain) Lion, go easy with the Snow Leopard. +#else // Not for Mavericks/Mountain Lion/Lion, go easy with the Snow Leopard. /* static char preLinkedKernelPath[128]; static char adler32Key[PLATFORM_NAME_LEN + ROOT_PATH_LEN]; diff --git a/i386/libsaio/asm.s b/i386/libsaio/asm.s index 768ba43..a6312cf 100755 --- a/i386/libsaio/asm.s +++ b/i386/libsaio/asm.s @@ -334,7 +334,7 @@ LABEL(_halt) call _bgetc jmp _halt -#if ((MAKE_TARGET_OS & LION) == LION) +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks, Mountain Lion and Lion // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // disableIRQs() // @@ -365,7 +365,7 @@ LABEL(_disableIRQs) // Passes boot arguments in %eax. // LABEL(_startMachKernel) -#if ((MAKE_TARGET_OS & LION) == LION) +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks, Mountain Lion and Lion call _disableIRQs // Taking care of a ACPI bug. #endif push %ebp diff --git a/i386/libsaio/bootstruct.c b/i386/libsaio/bootstruct.c index 664d33d..c50f689 100755 --- a/i386/libsaio/bootstruct.c +++ b/i386/libsaio/bootstruct.c @@ -87,7 +87,7 @@ void initKernelBootConfig(void) // EFI selection is based on the CPU type. bootArgs->efiMode = (gPlatform.ArchCPUType == CPU_TYPE_X86_64) ? kBootArgsEfiMode64 : kBootArgsEfiMode32; -#if ((MAKE_TARGET_OS & LION) == LION) +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 2 set like Lion. // Lion's new debug output (replacing a couple of former boot arguments). bootArgs->debugMode = EFI_DEBUG_MODE; // Defined in config/settings.h #endif @@ -171,7 +171,7 @@ void finalizeKernelBootConfig(void) bootArgs->deviceTreeP = (uint32_t)addr; bootArgs->deviceTreeLength = size; -#if ((MAKE_TARGET_OS & LION) == LION) +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 2 set like Lion. // Adding a 16 KB log space. bootArgs->performanceDataSize = 0; bootArgs->performanceDataStart = 0; @@ -184,7 +184,7 @@ void finalizeKernelBootConfig(void) bootArgs->bootMemStart = 0; #endif -#if ((MAKE_TARGET_OS & LION) == LION) +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 2 set like Lion. bootArgs->FSBFrequency = gPlatform.CPU.FSBFrequency; #endif } diff --git a/i386/libsaio/bootstruct.h b/i386/libsaio/bootstruct.h index 282a674..0074c42 100755 --- a/i386/libsaio/bootstruct.h +++ b/i386/libsaio/bootstruct.h @@ -144,7 +144,7 @@ typedef struct boot_args_new uint16_t Revision; // Revision of boot_args structure. uint16_t Version; // Version of boot_args structure. -#if ((MAKE_TARGET_OS & LION) == LION) +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 2 set like Lion. uint8_t efiMode; // 32 = 32-bit, 64 = 64-bit. uint8_t debugMode; // Bit field with behavior changes. @@ -175,13 +175,13 @@ typedef struct boot_args_new uint32_t efiRuntimeServicesPageStart; // Physical address of defragmented runtime pages. uint32_t efiRuntimeServicesPageCount; -#if ((MAKE_TARGET_OS & LION) == LION) +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 2 set like Lion. uint64_t efiRuntimeServicesVirtualPageStart; // Virtual address of defragmented runtime pages. #endif uint32_t efiSystemTable; // Physical address of system table in runtime area. -#if ((MAKE_TARGET_OS & LION) == LION) +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 2 set like Lion. uint32_t __reserved2; uint32_t performanceDataStart; // Physical address of log. diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index 5cb4669..b6bb845 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -157,7 +157,7 @@ void initEFITree(void) DT__AddProperty(chosenNode, "machine-signature", sizeof(MACHINE_SIGNATURE), (EFI_UINT8*) &MACHINE_SIGNATURE); -#if ((MAKE_TARGET_OS & LION) == LION) +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 2 set like Lion. // Used by boot.efi - cosmetic only node/properties on hacks. Node * kernelCompatNode = DT__AddChild(efiNode, "kernel-compatibility"); diff --git a/i386/libsaio/platform.c b/i386/libsaio/platform.c index a80ee3b..974bbba 100644 --- a/i386/libsaio/platform.c +++ b/i386/libsaio/platform.c @@ -198,7 +198,9 @@ void initPlatform(int biosDevice) gPlatform.CPU.Mobile = true; // Will be initialized in cpu/cpu_dynamic.h (used in smbios/dynamic_data.h) } -#if (MAKE_TARGET_OS == LION) +#if (MAKE_TARGET_OS == MAVERICKS) + gPlatform.OSVersion = strdup("10.9"); +#elif (MAKE_TARGET_OS == LION) gPlatform.OSVersion = strdup("10.7"); #elif (MAKE_TARGET_OS == MOUNTAIN_LION) gPlatform.OSVersion = strdup("10.8"); From 3d83fa1b7f48ba16f61dabb2c07091e3f065c090 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 12 Jun 2013 02:17:22 +0200 Subject: [PATCH 398/623] Fixing comments --- i386/boot2/boot.c | 2 +- i386/libsaio/bootstruct.c | 6 +++--- i386/libsaio/bootstruct.h | 6 +++--- i386/libsaio/efi.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 2582af7..5d62fe2 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -512,7 +512,7 @@ void boot(int biosdev) _BOOT_DEBUG_DUMP("adler32: %08X\n", adler32); -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 2 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 1 set like Lion. _BOOT_DEBUG_DUMP("Checking for kernelcache...\n"); diff --git a/i386/libsaio/bootstruct.c b/i386/libsaio/bootstruct.c index c50f689..171fa06 100755 --- a/i386/libsaio/bootstruct.c +++ b/i386/libsaio/bootstruct.c @@ -87,7 +87,7 @@ void initKernelBootConfig(void) // EFI selection is based on the CPU type. bootArgs->efiMode = (gPlatform.ArchCPUType == CPU_TYPE_X86_64) ? kBootArgsEfiMode64 : kBootArgsEfiMode32; -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 2 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 1 set like Lion. // Lion's new debug output (replacing a couple of former boot arguments). bootArgs->debugMode = EFI_DEBUG_MODE; // Defined in config/settings.h #endif @@ -171,7 +171,7 @@ void finalizeKernelBootConfig(void) bootArgs->deviceTreeP = (uint32_t)addr; bootArgs->deviceTreeLength = size; -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 2 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 1 set like Lion. // Adding a 16 KB log space. bootArgs->performanceDataSize = 0; bootArgs->performanceDataStart = 0; @@ -184,7 +184,7 @@ void finalizeKernelBootConfig(void) bootArgs->bootMemStart = 0; #endif -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 2 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 1 set like Lion. bootArgs->FSBFrequency = gPlatform.CPU.FSBFrequency; #endif } diff --git a/i386/libsaio/bootstruct.h b/i386/libsaio/bootstruct.h index 0074c42..77e42cb 100755 --- a/i386/libsaio/bootstruct.h +++ b/i386/libsaio/bootstruct.h @@ -144,7 +144,7 @@ typedef struct boot_args_new uint16_t Revision; // Revision of boot_args structure. uint16_t Version; // Version of boot_args structure. -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 2 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 1 set like Lion. uint8_t efiMode; // 32 = 32-bit, 64 = 64-bit. uint8_t debugMode; // Bit field with behavior changes. @@ -175,13 +175,13 @@ typedef struct boot_args_new uint32_t efiRuntimeServicesPageStart; // Physical address of defragmented runtime pages. uint32_t efiRuntimeServicesPageCount; -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 2 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 1 set like Lion. uint64_t efiRuntimeServicesVirtualPageStart; // Virtual address of defragmented runtime pages. #endif uint32_t efiSystemTable; // Physical address of system table in runtime area. -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 2 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 1 set like Lion. uint32_t __reserved2; uint32_t performanceDataStart; // Physical address of log. diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index b6bb845..d8ff442 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -157,7 +157,7 @@ void initEFITree(void) DT__AddProperty(chosenNode, "machine-signature", sizeof(MACHINE_SIGNATURE), (EFI_UINT8*) &MACHINE_SIGNATURE); -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 2 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 1 set like Lion. // Used by boot.efi - cosmetic only node/properties on hacks. Node * kernelCompatNode = DT__AddChild(efiNode, "kernel-compatibility"); From 732ffe2cfb69d86021503d6ed80ede87908f2629 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 12 Jun 2013 02:18:58 +0200 Subject: [PATCH 399/623] Using bit-1 here instead of bit-2 - thanks to a silly comment error --- Makefile | 2 +- i386/libsaio/platform.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6a01726..5db3dc2 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ else MAKEGOAL = mountain-lion else ifeq ($(MAKECMDGOALS), mavericks) - MAKE_TARGET_OS = 12; + MAKE_TARGET_OS = 10; MAKEGOAL = mavericks else ifeq ($(MAKECMDGOALS), lion) MAKE_TARGET_OS = 2; diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 829c24d..569bf7d 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -22,6 +22,7 @@ #define SNOW_LEOPARD 1 // Snow Leopard. #define LION 2 // Lion (the default). #define MOUNTAIN_LION 6 // Mountain Lion (includes Lion changes). +#define MAVERICKS 10 // Mavericks (includes Lion changes). //------------------------------------------------------------------------------ From e1f4f69d5da17ece128656628aaa7d8f07503c0c Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 12 Jun 2013 02:19:59 +0200 Subject: [PATCH 400/623] Expanding memory for Mavericks - do we really need this? --- i386/libsa/memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsa/memory.h b/i386/libsa/memory.h index f561709..a769f12 100755 --- a/i386/libsa/memory.h +++ b/i386/libsa/memory.h @@ -91,7 +91,7 @@ // 0x00100000L #define KERNEL_ADDR (VIDEO_ADDR + VIDEO_LEN) // Kernel and MKexts/drivers. -#define KERNEL_LEN 0x04000000L // Size: 64 MB (128 MB for Chameleon). +#define KERNEL_LEN 0x06000000L // Size: 96 MB (128 MB for Chameleon). // // Note: Can cause a stop("Kernel overflows available space") // Based on KERNEL_LEN 0x04100000L From 8e1702cc402604cba0b15ad8f202ee8ab932f36b Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 13 Jun 2013 16:24:38 +0200 Subject: [PATCH 401/623] Mavericks specific kext loading - signed kexts only --- i386/boot2/drivers.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/i386/boot2/drivers.c b/i386/boot2/drivers.c index cb5a24a..cd90650 100755 --- a/i386/boot2/drivers.c +++ b/i386/boot2/drivers.c @@ -95,7 +95,7 @@ enum // Private functions. static unsigned long localAdler32(unsigned char * buffer, long length); -#if (MAKE_TARGET_OS == 1) // Snow Leopard only! +#if (MAKE_TARGET_OS == SNOW_LEOPARD) static int loadMultiKext(char *fileSpec); #endif @@ -173,7 +173,7 @@ long loadDrivers(char * dirSpec) return -1; } -#if (MAKE_TARGET_OS == 1) // Snow Leopard only! +#if (MAKE_TARGET_OS == SNOW_LEOPARD) bool shouldLoadMKext = ((gBootMode & kBootModeSafe) == 0); _DRIVERS_DEBUG_DUMP("shouldLoadMKext: %s\n", shouldLoadMKext ? "true" : "false"); @@ -200,12 +200,18 @@ long loadDrivers(char * dirSpec) if ((gKextLoadStatus & 1) == 0) { _DRIVERS_DEBUG_DUMP("\nCalling loadKexts(\"/System/Library/Extensions\");\n"); - + // System kexts if (loadKexts("/System/Library/Extensions", 0) == EFI_SUCCESS) { _DRIVERS_DEBUG_DUMP("loadKexts(1) OK.\n"); } - +#if (MAKE_TARGET_OS == MAVERICKS) + // Signed kexts for Mavericks only! + if (loadKexts("/Library/Extensions", 0) == EFI_SUCCESS) + { + _DRIVERS_DEBUG_DUMP("loadKexts(2) OK.\n"); + } +#endif _DRIVERS_DEBUG_DUMP("\n"); } } @@ -219,7 +225,7 @@ long loadDrivers(char * dirSpec) } -#if (MAKE_TARGET_OS == 1) // Snow Leopard only! +#if (MAKE_TARGET_OS == SNOW_LEOPARD) //============================================================================== // Returns 0 on success, -1 when not found, -2 on load failures and -3 on // verification (signatures, length, adler32) errors. From 85bb35b30f63f843150bd023ec2797b18806228b Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 19 Jun 2013 19:06:45 +0200 Subject: [PATCH 402/623] Adding some of the new 2013 models --- i386/libsaio/smbios/model_data.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 341a9af..c2f33d2 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -157,13 +157,19 @@ #define SMB_PRODUCT_NAME "MacBookPro10,1" #define SMB_BOARD_PRODUCT "Mac-C3EC7CD22292981F" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '0', ',', '1' } - #else // Defaults to MacBookPro10,2 + #elif (TARGET_MODEL == MACBOOK_PRO_102) // Intel Core i5-3230QM @ 2.60 GHz - 2 cores / 4 threads. // Intel Core i7-3540QM @ 3.00 GHz - 2 cores / 4 threads. #define SMB_BIOS_VERSION "MBP102.88Z.0106.B03.1211161133" #define SMB_PRODUCT_NAME "MacBookPro10,2" #define SMB_BOARD_PRODUCT "Mac-AFD8A9D944EA4843" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '0', ',', '2' } + #else // Defaults to MacBookPro11,1 + // Intel Core i5-4258U @ 2.90 GHz - 2 cores / 4 threads. + #define SMB_BIOS_VERSION "MBP111.88Z.0098.B00.1306051054" + #define SMB_PRODUCT_NAME "MacBookPro11,1" + #define SMB_BOARD_PRODUCT "Mac-189A3D4F975D5FFC" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '1', ',', '1' } #endif // ------------------------------------------------------------------------------------- #endif @@ -203,12 +209,17 @@ #define SMB_PRODUCT_NAME "Macmini6,1" #define SMB_BOARD_PRODUCT "Mac-031AEE4D24BFF0B1" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '1' } - #else // Defaults to Macmini6,2 + #elif (TARGET_MODEL == MACMINI_62) // Defaults to Macmini6,2 // Intel Core i7-3615QM @ 2.30 GHz (4 cores - 8 threads) #define SMB_BIOS_VERSION "MM61.88Z.0106.B00.1208091121" #define SMB_PRODUCT_NAME "Macmini6,2" #define SMB_BOARD_PRODUCT "Mac-F65AE981FFA204ED" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '2' } + #else // Defaults to Macmini7,1 + #define SMB_BIOS_VERSION "MM71.88Z.0106.B00.1307301121" + #define SMB_PRODUCT_NAME "Macmini7,1" + #define SMB_BOARD_PRODUCT "Mac-031B6874CF7F642A" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '7', ',', '1' } #endif // ------------------------------------------------------------------------------------- #endif @@ -228,11 +239,16 @@ #define SMB_PRODUCT_NAME "MacPro4,1" #define SMB_BOARD_PRODUCT "Mac-F221BEC8" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '4', ',', '1' } - #else // Defaults to MacPro5,1 + #elif (TARGET_MODEL == MACPRO_51) #define SMB_BIOS_VERSION "MP51.88Z.007F.B03.1010071432" #define SMB_PRODUCT_NAME "MacPro5,1" #define SMB_BOARD_PRODUCT "Mac-F221BEC8" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '5', ',', '1' } + #else // Defaults to MacPro6,1 + #define SMB_BIOS_VERSION "MP61.88Z.007F.B03.1010071432" // TODO: Verify this! + #define SMB_PRODUCT_NAME "MacPro6,1" + #define SMB_BOARD_PRODUCT "Mac-F60DEB81FF30ACF6" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '6', ',', '1' } #endif // ------------------------------------------------------------------------------------- #endif From 5a1308fa3cb8dea2e81be3c7d59b87ae35882cf2 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 19 Jun 2013 19:07:05 +0200 Subject: [PATCH 403/623] Updating SMBIOS to v2.6 --- i386/libsaio/smbios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/smbios.c b/i386/libsaio/smbios.c index deb8ae0..ea22a46 100755 --- a/i386/libsaio/smbios.c +++ b/i386/libsaio/smbios.c @@ -38,7 +38,7 @@ void setupSMBIOS(void) newEPS->checksum = 0; newEPS->entryPointLength = 0x1f; // sizeof(* newEPS) newEPS->majorVersion = 2; - newEPS->minorVersion = 4; + newEPS->minorVersion = 6; newEPS->maxStructureSize = STATIC_SMBIOS_SM_MAX_STRUCTURE_SIZE; // Defined in RevoBoot/i386/config/SMBIOS/data-template.h newEPS->entryPointRevision = 0; From 6598d1c4d002b42d44a81e13e432fab99a2c45d0 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 19 Jun 2013 19:15:45 +0200 Subject: [PATCH 404/623] Getting ready for new 2013 models --- i386/libsaio/platform.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 569bf7d..216997c 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -59,13 +59,17 @@ #define IMAC_121 (IMAC | (2 << 15)) #define IMAC_122 (IMAC | (3 << 15)) #define IMAC_131 (IMAC | (4 << 15)) -#define IMAC_132 IMAC // Defaults to iMac13,2 +#define IMAC_132 (IMAC | (5 << 15)) +#define IMAC_142 (IMAC | (6 << 15)) +#define IMAC_141 IMAC // Defaults to iMac14,1 #define MACBOOK_41 MACBOOK // Defaults to MacBook4,1 #define MACBOOK_AIR_41 (MACBOOK_AIR | (1 << 15)) #define MACBOOK_AIR_42 (MACBOOK_AIR | (2 << 15)) -#define MACBOOK_AIR_61 (MACBOOK_AIR | (3 << 15)) +#define MACBOOK_AIR_51 (MACBOOK_AIR | (3 << 15)) +#define MACBOOK_AIR_52 (MACBOOK_AIR | (4 << 15)) +#define MACBOOK_AIR_61 (MACBOOK_AIR | (5 << 15)) #define MACBOOK_AIR_62 MACBOOK_AIR // Defaults to MacBookAir6,2 #define MACBOOK_PRO_61 (MACBOOK_PRO | (1 << 15)) @@ -75,18 +79,23 @@ #define MACBOOK_PRO_91 (MACBOOK_PRO | (5 << 15)) #define MACBOOK_PRO_92 (MACBOOK_PRO | (6 << 15)) #define MACBOOK_PRO_101 (MACBOOK_PRO | (7 << 15)) -#define MACBOOK_PRO_102 MACBOOK_PRO // Defaults to MacBookPro10,2 +#define MACBOOK_PRO_102 (MACBOOK_PRO | (8 << 15)) +#define MACBOOK_PRO_112 (MACBOOK_PRO | (9 << 15)) +#define MACBOOK_PRO_111 MACBOOK_PRO // Defaults to MacBookPro11,1 #define MACMINI_41 (MACMINI | (1 << 15)) #define MACMINI_51 (MACMINI | (2 << 15)) #define MACMINI_52 (MACMINI | (3 << 15)) #define MACMINI_53 (MACMINI | (4 << 15)) #define MACMINI_61 (MACMINI | (5 << 15)) -#define MACMINI_62 MACMINI // Defaults to Macmini5,1 +#define MACMINI_62 (MACMINI | (6 << 15)) +#define MACMINI_72 (MACMINI | (7 << 15)) +#define MACMINI_71 MACMINI // Defaults to Macmini7,1 #define MACPRO_31 (MACPRO | (1 << 15)) #define MACPRO_41 (MACPRO | (2 << 15)) -#define MACPRO_51 MACPRO // Defaults to MacPro5,1 +#define MACPRO_51 (MACPRO | (3 << 15)) +#define MACPRO_61 MACPRO // Defaults to MacPro6,1 //------------------------------------------------------------------------------ From 267d4d8645b612e735d474334460aea93b0be484 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 19 Jun 2013 19:16:24 +0200 Subject: [PATCH 405/623] Haswell i3 processor data --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 21c63c4..001d32d 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -507,6 +507,11 @@ i5-4258U,28,800,2400,2900,2,4 i5-4250U,15,800,1300,2600,2,4 i5-4200Y,12,800,1400,1900,2,4 i5-4200U,15,800,1600,2600,2,4 +i3-4130T,35,800,2900,2900,2,4 +i3-4330T,35,800,3000,3000,2,4 +i3-4130,54,800,3400,3400,2,4 +i3-4330,54,800,3500,3500,2,4 +i3-4340,54,800,3600,3600,2,4 ) gMobileHaswellCPUList=( From 5040e0a49e189e0994885bc3f92a23a18a19ed87 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 20 Jun 2013 22:36:33 +0200 Subject: [PATCH 406/623] Added more Haswell processors data - thanks to Jeroen for doing the hard work! --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 001d32d..c2b5ee2 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -501,12 +501,14 @@ i5-4570T,35,800,2900,3600,2,4 i5-4430S,65,800,2700,3200,4,4 # BGA i7-4770R,65,800,3200,3900,4,8 +i5-4670R,65,800,3000,3700,4,4 # Haswell ULT i5-4288U,28,800,2600,3100,2,4 i5-4258U,28,800,2400,2900,2,4 i5-4250U,15,800,1300,2600,2,4 i5-4200Y,12,800,1400,1900,2,4 i5-4200U,15,800,1600,2600,2,4 +# i3-4130T,35,800,2900,2900,2,4 i3-4330T,35,800,3000,3000,2,4 i3-4130,54,800,3400,3400,2,4 @@ -528,6 +530,18 @@ i7-4700MQ,47,800,2400,3600,4,8 # Socket FCBGA1364 i7-4700HQ,47,800,2400,3600,4,8 i7-4702HQ,37,800,2200,3200,4,8 +# Socket FCBGA1168 +i5-4350U,15,800,1400,2900,2,4 +i5-4288U,28,800,2600,3100,2,4 +i5-4258U,28,800,2400,2900,2,4 +i5-4250U,15,800,1300,2600,2,4 +i5-4200U,15,800,1600,2600,2,4 +i5-4200Y,12,800,1400,1900,2,4 +# Socket FCBGA1168 +i3-4158U,28,800,2000,2000,2,4 +i3-4100U,15,800,1800,1800,2,4 +i3-4010U,15,800,1700,1700,2,4 +i3-4010Y,12,800,1300,1300,2,4 ) #-------------------------------------------------------------------------------- From b2af69f76f422311b324810ca438db8ff1228052 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 20 Jun 2013 22:36:51 +0200 Subject: [PATCH 407/623] SMBIOS version update --- i386/libsaio/smbios/model_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index c2f33d2..7673c84 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -245,7 +245,7 @@ #define SMB_BOARD_PRODUCT "Mac-F221BEC8" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '5', ',', '1' } #else // Defaults to MacPro6,1 - #define SMB_BIOS_VERSION "MP61.88Z.007F.B03.1010071432" // TODO: Verify this! + #define SMB_BIOS_VERSION "MP61.88Z.0099.B00.1306121724" // TODO: Verify this! #define SMB_PRODUCT_NAME "MacPro6,1" #define SMB_BOARD_PRODUCT "Mac-F60DEB81FF30ACF6" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '6', ',', '1' } From 46ccaeece23d3bd23c86b633f196bcc6acbbe131 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Tue, 10 Sep 2013 16:30:38 +0200 Subject: [PATCH 408/623] RIP Jeroen --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index c2b5ee2..5b7f9c0 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -78,7 +78,7 @@ # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). # - Thanks to 'stinga11' for Sandy Bridge (E5) data and processor list errors. -# - Many thanks to Jeroen for the CPU data, cleanups, renaming stuff and other improvements. +# - Many thanks to Jeroen († 2013) for the CPU data, cleanups, renaming stuff and other improvements. # - Thanks to 'philip_petev' for his help with Snow Leopard/egrep incompatibility. # - Thanks to 'RehabMan' for his help with Snow Leopard/egrep incompatibility. # - Thanks to 'BigDonkey' for his help with LFM (800 MHz) for Sandy Bridge mobility models. From 5944bb7d30a534532cdb6aa599bc74b407fb9b13 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Thu, 24 Oct 2013 06:24:51 +0200 Subject: [PATCH 409/623] Updating script to version 6.7 New board-id's added: iMac14,[1/2/3] MacBookPro11,[1/2/3] MacPro6,1 --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 45 +++++++++++++--------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 5b7f9c0..9b3b542 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -2,8 +2,8 @@ # # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # -# Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 6.6 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 0.9 - Copyright (c) 2012 by † RevoGirl +# Version 6.7 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -74,6 +74,8 @@ # - Output of Clover ACPI directory detection fixed (Pike, June 2013) # - Haswell CPUs added (Jeroen, June 2013) # - board-id's for new MacBookAir6,[1/2] added (Pike, June 2013) +# - board-id's for new MacBookPro11,[1/2/3] added (Pike, October 2013) +# - Cleanups and board-id for new MacPro6,1 added (Pike, October 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -179,7 +181,7 @@ gScope="\_PR_" # Other global variables. # -gScriptVersion=6.6 +gScriptVersion=6.7 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -1690,58 +1692,44 @@ function _initIvyBridgeSetup() function _initHaswellSetup() { case $boardID in - Mac-) + Mac-031B6874CF7F642A) gSystemType=1 gMacModelIdentifier="iMac14,1" gACST_CPU0=13 # C1, C2, C3, C6 gACST_CPU1=7 # C1, C2 and C3 ;; - Mac-) + Mac-27ADBB7B4CEE8E61) gSystemType=1 gMacModelIdentifier="iMac14,2" gACST_CPU0=13 # C1, C2, C3, C6 gACST_CPU1=7 # C1, C2 and C3 ;; - Mac-) + Mac-77EB7D7DAF985) gSystemType=1 - gMacModelIdentifier="Macmini7,1" + gMacModelIdentifier="iMac14,3" gACST_CPU0=13 # C1, C2, C3, C6 gACST_CPU1=7 # C1, C2 and C3 ;; - Mac-) - gSystemType=1 - gMacModelIdentifier="Macmini7,2" - gACST_CPU0=13 # C1, C2, C3, C6 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-) + Mac-189A3D4F975D5FFC) gSystemType=2 gMacModelIdentifier="MacBookPro11,1" gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 gACST_CPU1=31 # C1, C2, C3, C6 and C7 ;; - Mac-) + Mac-3CBD00234E554E41) gSystemType=2 gMacModelIdentifier="MacBookPro11,2" gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 gACST_CPU1=31 # C1, C2, C3, C6 and C7 ;; - Mac-) + Mac-2BD1B31983FE1663) gSystemType=2 - gMacModelIdentifier="MacBookPro12,1" - gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 - gACST_CPU1=31 # C1, C2, C3, C6 and C7 - ;; - - Mac-) - gSystemType=2 - gMacModelIdentifier="MacBookPro12,2" + gMacModelIdentifier="MacBookPro11,3" gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 gACST_CPU1=31 # C1, C2, C3, C6 and C7 ;; @@ -1759,6 +1747,13 @@ function _initHaswellSetup() gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 gACST_CPU1=31 # C1, C2, C3, C6 and C7 ;; + + Mac-F60DEB81FF30ACF6) + gSystemType=1 + gMacModelIdentifier="MacPro6,1" + gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 + gACST_CPU1=31 # C1, C2, C3, C6 and C7 + ;; esac } From 75af7bf960fbde73173c9407942ba9435e42d5fa Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Thu, 24 Oct 2013 06:30:32 +0200 Subject: [PATCH 410/623] Typo --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 9b3b542..8deba8c 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -74,6 +74,7 @@ # - Output of Clover ACPI directory detection fixed (Pike, June 2013) # - Haswell CPUs added (Jeroen, June 2013) # - board-id's for new MacBookAir6,[1/2] added (Pike, June 2013) +# - board-id's for new iMac14,[1/2/3] added (Pike, October 2013) # - board-id's for new MacBookPro11,[1/2/3] added (Pike, October 2013) # - Cleanups and board-id for new MacPro6,1 added (Pike, October 2013) # @@ -1706,7 +1707,7 @@ function _initHaswellSetup() gACST_CPU1=7 # C1, C2 and C3 ;; - Mac-77EB7D7DAF985) + Mac-77EB7D7DAF985301) gSystemType=1 gMacModelIdentifier="iMac14,3" gACST_CPU0=13 # C1, C2, C3, C6 From 6746e33a2326e4bc8d5763be420bf44dfd9ac580 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Wed, 20 Nov 2013 03:04:25 +0100 Subject: [PATCH 411/623] Updating script to version 6.8 Frequency error in i7-4700MQ data fixed, thanks to RehabMan --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 8deba8c..7e9536f 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by † RevoGirl -# Version 6.7 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 6.8 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -77,6 +77,7 @@ # - board-id's for new iMac14,[1/2/3] added (Pike, October 2013) # - board-id's for new MacBookPro11,[1/2/3] added (Pike, October 2013) # - Cleanups and board-id for new MacPro6,1 added (Pike, October 2013) +# - Frequency error in i7-4700MQ data fixed, thanks to RehabMan (Pike, November 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -182,7 +183,7 @@ gScope="\_PR_" # Other global variables. # -gScriptVersion=6.7 +gScriptVersion=6.8 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -529,7 +530,7 @@ i7-4930MX,57,800,3000,3900,4,8 i7-4900MQ,47,800,2800,3800,4,8 i7-4800MQ,47,800,2700,3700,4,8 i7-4702MQ,37,800,2200,3200,4,8 -i7-4700MQ,47,800,2400,3600,4,8 +i7-4700MQ,47,800,2400,3400,4,8 # Socket FCBGA1364 i7-4700HQ,47,800,2400,3600,4,8 i7-4702HQ,37,800,2200,3200,4,8 From eaa9bc2037da8a8bfeaf676339b65a1bbefb03a5 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Fri, 20 Dec 2013 03:17:35 +0100 Subject: [PATCH 412/623] Update README --- README | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README b/README index f46e642..251f26a 100644 --- a/README +++ b/README @@ -1,16 +1,16 @@ About this project: ------------------- -This Open Source hobby project is maintained by Pike (http://pikeralpha.wordpress.com) and dgsga. Two long time supporters of the RevoBoot project. +This Open Source hobby project is maintained by Pike (http://pikeralpha.wordpress.com). A long time supporter of the RevoBoot project. Note that we do not tolerate/share any (links to) copyrighted material. We only use purchased software and we won't share any of it. Just get your copy of OS X in the Apple store. Should be affordable for everyone. Mountain Lion Server: --------------------- -RevoBoot has been confirmed to work with the Server app for Mountain Lion (12C60). +RevoBoot has been confirmed to work with the Server app for Mountain Lion and Mavaricks. Fusion Drive Support: --------------------- -Apple's new Fusion Drive* is a software implementation to speedup the boot and load process for frequently used applications, without limiting the storage capacity in a bad way. See also: http://support.apple.com/kb/HT5446 +Apple's Fusion Drive* is a software implementation to speedup the boot and load process for frequently used applications, without limiting the storage capacity in a bad way. See also: http://support.apple.com/kb/HT5446 The new Mac's that come with a Fusion Drive boot from the third (Recovery HD like) partition on the SSD. This partition is 134.2 MB in size and is called "Boot OS X". The Recovery HD partition can be found as third partition on the HDD. Setting up a Fusion Drive on a Mac need to be done with Internet Recovery. @@ -20,17 +20,17 @@ RevoBoot detects CoreStorage partitions and will boot from the boot helper parti NetBoot/NetInstall: ------------------- People who have Mountain Lion Server setup and like to install their hack from it... sorry that won't work. The source -code snippets for it have been stripped out (by Master Chief in 2009) but we will fix this in a next update of RevoBoot. +code snippets for it have been stripped out (by Master Chief in 2009) but we might fix this in future update of RevoBoot. Xcode Support for Mountain Lion: -------------------------------- -RevoBoot can be built on Snow Leopard, Lion and Mountain Lion. The latter requires Xcode 4.5.1 (and greater) and the latest 'command line tools' need to be installed. See change log for instructions. +RevoBoot can be built on Snow Leopard, Lion, Mountain Lion (requires Xcode 4.5.1 or greater) and Mavericks, and the latest 'command line tools' need to be installed. See change log for instructions. Configuration: -------------- Please note that RevoBoot must be configured for your hardware so start reading our WiKi. See also: -https://github.com/blackosx/RevoBuilder/wiki/Using-RevoBuilder +https://github.com/blackosx/RevoBuilder/wiki/Using-RevoBuilder – sorry folks, no longer available! We also have a configuration README available at: @@ -38,6 +38,6 @@ https://github.com/RevoGirl/RevoBoot/blob/master/i386/config/README There's also RevoBuilder (a great tool for first starters) over at: -https://github.com/blackosx/RevoBuilder/wiki/Using-RevoBuilder +https://github.com/blackosx/RevoBuilder/wiki/Using-RevoBuilder – sorry folks, no longer available! Note: RevoBuilder is most likeky broken for RevoBoot v.1.5.00 and greater! From 76eb63dbc2f4e51dacd24b02932b19e1b3a6076e Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sun, 22 Dec 2013 21:04:04 +0100 Subject: [PATCH 413/623] Updating script to version 6.8 --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 7e9536f..ab92cb0 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by † RevoGirl -# Version 6.8 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 6.9 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -78,6 +78,7 @@ # - board-id's for new MacBookPro11,[1/2/3] added (Pike, October 2013) # - Cleanups and board-id for new MacPro6,1 added (Pike, October 2013) # - Frequency error in i7-4700MQ data fixed, thanks to RehabMan (Pike, November 2013) +# - Intel i5-4200M added (Pike, December 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -183,7 +184,7 @@ gScope="\_PR_" # Other global variables. # -gScriptVersion=6.8 +gScriptVersion=6.9 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -531,6 +532,7 @@ i7-4900MQ,47,800,2800,3800,4,8 i7-4800MQ,47,800,2700,3700,4,8 i7-4702MQ,37,800,2200,3200,4,8 i7-4700MQ,47,800,2400,3400,4,8 +i5-4200M,37,800,2500,3100,2,4 # Socket FCBGA1364 i7-4700HQ,47,800,2400,3600,4,8 i7-4702HQ,37,800,2200,3200,4,8 From 950366e77dc1431663507c7059651d012828cb44 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Tue, 24 Dec 2013 15:30:22 +0100 Subject: [PATCH 414/623] Updating script to version 7.0 --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index ab92cb0..241d11d 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by † RevoGirl -# Version 6.9 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 7.0 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -79,6 +79,7 @@ # - Cleanups and board-id for new MacPro6,1 added (Pike, October 2013) # - Frequency error in i7-4700MQ data fixed, thanks to RehabMan (Pike, November 2013) # - Intel i5-4200M added (Pike, December 2013) +# - LFM fixed in the Intel i7-3930K data (Pike, December 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -88,6 +89,7 @@ # - Thanks to 'RehabMan' for his help with Snow Leopard/egrep incompatibility. # - Thanks to 'BigDonkey' for his help with LFM (800 MHz) for Sandy Bridge mobility models. # - Thanks to 'xpamamadeus' for the Clover boot.log tip. +# - Thanks to 'rileyfreeman' for the Intel i7-3930K LFM value. # # Usage (v1.0 - v4.9): # @@ -184,7 +186,7 @@ gScope="\_PR_" # Other global variables. # -gScriptVersion=6.9 +gScriptVersion=7.0 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -261,7 +263,7 @@ i7-35355,120,1600,2666,2666,4,4 # i7 Desktop Extreme Series i7-3970X,150,0,3500,4000,6,12 i7-3960X,130,0,3300,3900,6,12 -i7-3930K,130,0,3200,3800,6,12 +i7-3930K,130,1200,3200,3800,6,12 i7-3820,130,0,3600,3800,4,8 # i7 Desktop series i7-2600S,65,1600,2800,3800,4,8 From 23c6887480da15eec29d3fdad9afe4cf03ff34b6 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Sat, 28 Dec 2013 17:42:27 +0100 Subject: [PATCH 415/623] Data for Intel i7-4558U added --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 241d11d..b117772 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -539,6 +539,7 @@ i5-4200M,37,800,2500,3100,2,4 i7-4700HQ,47,800,2400,3600,4,8 i7-4702HQ,37,800,2200,3200,4,8 # Socket FCBGA1168 +i7-4558U,28,800,2800,3300,2,4 i5-4350U,15,800,1400,2900,2,4 i5-4288U,28,800,2600,3100,2,4 i5-4258U,28,800,2400,2900,2,4 From 078ca0a16896ae5a824bb19e4a39e1f9b497b95c Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Mon, 30 Dec 2013 10:29:56 +0100 Subject: [PATCH 416/623] C-State code changes --- .../AppleIntelCPUPowerManagementInfo.cpp | 392 +++++------------- 1 file changed, 95 insertions(+), 297 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index f701306..a0c43b9 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -8,347 +8,145 @@ * */ -#include "AppleIntelCPUPowerManagementInfo.h" +#include <IOKit/IOLib.h> +#include <IOKit/IOService.h> +#include <IOKit/IOWorkLoop.h> +#include <IOKit/IOMemoryDescriptor.h> +#include <IOKit/IOTimerEventSource.h> +#include <i386/cpuid.h> +#include <i386/proc_reg.h> -//============================================================================== +#include "../../../essentials.h" -void AppleIntelCPUPowerManagementInfo::reportMSRs(void) -{ - IOLog("MSR_CORE_THREAD_COUNT......(0x35) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_THREAD_COUNT)); - - IOLog("MSR_PLATFORM_INFO..........(0xCE) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PLATFORM_INFO)); +#define super IOService - IOLog("MSR_PMG_CST_CONFIG_CONTROL.(0xE2) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PMG_CST_CONFIG_CONTROL)); - IOLog("MSR_PMG_IO_CAPTURE_BASE....(0xE4) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PMG_IO_CAPTURE_BASE)); - IOLog("IA32_MPERF.................(0xE7) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_MPERF)); - IOLog("IA32_APERF.................(0xE8) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_APERF)); +#define REPORT_MSRS 1 +#define REPORT_GPU_STATS 1 +#define REPORT_C_STATES 1 - IOLog("MSR_IA32_PERF_STATUS.......(0x198) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_IA32_PERF_STATUS)); - IOLog("MSR_IA32_PERF_CONTROL......(0x199) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_IA32_PERF_CONTROL)); - IOLog("IA32_CLOCK_MODULATION......(0x19A) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_CLOCK_MODULATION)); - IOLog("IA32_THERM_STATUS..........(0x19C) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_THERM_STATUS)); +#define NB_BUS 0x00 +#define NB_DEV 0x00 +#define NB_FUN 0x00 - IOLog("IA32_MISC_ENABLES..........(0x1A0) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_MISC_ENABLES)); - IOLog("MSR_MISC_PWR_MGMT..........(0x1AA) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_MISC_PWR_MGMT)); - IOLog("MSR_TURBO_RATIO_LIMIT......(0x1AD) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_RATIO_LIMIT)); +#define DEVEN (0x54) +#define DEVEN_D2EN_MASK (0x10) - IOLog("IA32_ENERGY_PERF_BIAS......(0x1B0) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_ENERGY_PERF_BIAS)); +#define NB_PCICFG_SPACE_INDEX_REG 0xcf8 +#define NB_PCICFG_SPACE_DATA_REG 0xcfc - IOLog("MSR_POWER_CTL..............(0x1FC) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_POWER_CTL)); +#define BIT31 0x80000000 - IOLog("MSR_RAPL_POWER_UNIT........(0x606) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_RAPL_POWER_UNIT)); - IOLog("MSR_PKG_POWER_LIMIT........(0x610) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_POWER_LIMIT)); - IOLog("MSR_PKG_ENERGY_STATUS......(0x611) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_ENERGY_STATUS)); +#define PCIEX_BASE_ADDRESS 0xF8000000 +#define NB_MCH_BASE_ADDRESS 0xFED10000 // (G)MCH Memory Mapped Register Range Base Address (D0:F0:Rx48). - IOLog("MSR_PP0_CURRENT_CONFIG.....(0x601) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_CURRENT_CONFIG)); - IOLog("MSR_PP0_POWER_LIMIT........(0x638) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POWER_LIMIT)); - IOLog("MSR_PP0_ENERGY_STATUS......(0x639) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_ENERGY_STATUS)); - IOLog("MSR_PP0_POLICY.............(0x63a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POLICY)); +#define READ_PCI8(Bx, Dx, Fx, Rx) ReadPci8(Bx, Dx, Fx, Rx) +#define READ_PCI8_NB(Rx) READ_PCI8(NB_BUS, NB_DEV, NB_FUN, Rx) +#define MMIO_READ8(Address) (*(volatile UInt8 *)(Address)) - if ((gCPUModel == CPU_MODEL_SB_CORE) || (gCPUModel == CPU_MODEL_IB_CORE)) - { - IOLog("MSR_PP1_CURRENT_CONFIG.....(0x602) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_CURRENT_CONFIG)); - IOLog("MSR_PP1_POWER_LIMIT........(0x640) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POWER_LIMIT)); - IOLog("MSR_PP1_ENERGY_STATUS......(0x641) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_ENERGY_STATUS)); - IOLog("MSR_PP1_POLICY.............(0x642) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POLICY)); - } +#define IGPU_RATIO_TO_FREQUENCY(ratio) ((ratio * 100) / 2) - if ((gCPUModel != CPU_MODEL_SB_CORE) && (gCPUModel != CPU_MODEL_SB_JAKETOWN)) - { - IOLog("MSR_CONFIG_TDP_NOMINAL.....(0x648) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_NOMINAL)); - IOLog("MSR_CONFIG_TDP_LEVEL1......(0x649) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL1)); - IOLog("MSR_CONFIG_TDP_LEVEL2......(0x64a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL2)); - IOLog("MSR_CONFIG_TDP_CONTROL.....(0x64b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_CONTROL)); - IOLog("MSR_TURBO_ACTIVATION_RATIO.(0x64c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_ACTIVATION_RATIO)); - } +#define NB_PCI_CFG_ADDRESS(bus, dev, func, reg) \ + (UInt64) ((((UInt8)(bus) << 24) + ((UInt8)(dev) << 16) + \ + ((UInt8)(func) << 8) + ((UInt8)(reg))) & 0xffffffff) - if ((gCPUModel == CPU_MODEL_SB_CORE) || (gCPUModel == CPU_MODEL_SB_JAKETOWN)) - { - IOLog("MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C2_RESIDENCY)); - } +#define NB_PCIE_CFG_ADDRESS(bus, dev, func, reg) \ + ((UInt32)(PCIEX_BASE_ADDRESS + ((UInt8)(bus) << 20) + \ + ((UInt8)(dev) << 15) + ((UInt8)(func) << 12) + (reg))) - IOLog("MSR_PKG_C3_RESIDENCY.......(0x3f8) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C3_RESIDENCY)); - IOLog("MSR_PKG_C6_RESIDENCY.......(0x3f9) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C6_RESIDENCY)); - - if ((gCPUModel != CPU_MODEL_IB_CORE) && (gCPUModel != CPU_MODEL_IB_CORE_EX)) - { - IOLog("MSR_PKG_C7_RESIDENCY.......(0x3fa) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); - } +static __inline__ unsigned char inb(UInt16 port) +{ + UInt8 value; + __asm__ volatile("inb %w1, %b0" : "=a" (value) : "Nd" (port)); + return (value); } -//============================================================================== - -inline void getCStates(void *arg) +static __inline__ void outl(UInt16 port, UInt32 value) { - UInt8 logicalCoreNumber = cpu_number(); - - if ((gCoreStates & logicalCoreNumber) == 0) - { - gCoreStates |= (1ULL << logicalCoreNumber); - IOLog("Core (logical): %d\n", logicalCoreNumber); - IOLog("MSR_CORE_C3_RESIDENCY......(0x3fc) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_C3_RESIDENCY)); - IOLog("MSR_CORE_C6_RESIDENCY......(0x3fd) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_C6_RESIDENCY)); - - if ((gCPUModel == CPU_MODEL_SB_CORE) || (gCPUModel == CPU_MODEL_SB_JAKETOWN)) - { - IOLog("MSR_CORE_C7_RESIDENCY......(0x3fe) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_C7_RESIDENCY)); - } - } + __asm__ volatile("outl %0, %w1" : : "a" (value), "Nd" (port)); } -//============================================================================== - -IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) +UInt8 ReadPci8(UInt8 Bus, UInt8 Dev, UInt8 Fun, UInt16 Reg) { - UInt8 currentMultiplier = (rdmsr64(MSR_IA32_PERF_STS) >> 8); - gCoreMultipliers |= (1ULL << currentMultiplier); - -#if REPORT_GPU_STATS - UInt8 currentIgpuMultiplier = 0; - - if (igpuEnabled) + if (Reg >= 0x100) { - currentIgpuMultiplier = (UInt8)gMchbar[1]; - gIGPUMultipliers |= (1ULL << currentIgpuMultiplier); + // return MMIO_READ8(NB_PCIE_CFG_ADDRESS(Bus, Dev, Fun, Reg)); + return MMIO_READ8((UInt64)NB_PCIE_CFG_ADDRESS(Bus, Dev, Fun, Reg)); } -#endif + else + { + outl(NB_PCICFG_SPACE_INDEX_REG, BIT31 | (Bus << 16) | (Dev << 11) | (Fun << 8) | (Reg & 0xfc)); + return inb(NB_PCICFG_SPACE_DATA_REG | (UInt8)(Reg & 3)); + } +} - timerEventSource->setTimeoutTicks(Interval); +extern "C" void mp_rendezvous_no_intrs(void (*action_func)(void *), void * arg); +extern "C" int cpu_number(void); - if (loopLock) - { - return kIOReturnTimeout; - } - - loopLock = true; +class AppleIntelCPUPowerManagementInfo : public IOService +{ + OSDeclareDefaultStructors (AppleIntelCPUPowerManagementInfo); - if (dumpCStates) - { - UInt32 magic = 0; - IOSimpleLockLock(simpleLock); - mp_rendezvous_no_intrs(getCStates, (void *)&magic); - IOSimpleLockUnlock(simpleLock); - } +private: + IOSimpleLock *simpleLock; + IOWorkLoop *workLoop; + IOTimerEventSource *timerEventSource; #if REPORT_GPU_STATS - if ((gCoreMultipliers != gTriggeredPStates) || (gIGPUMultipliers != gTriggeredIGPUPStates)) -#else - if (gCoreMultipliers != gTriggeredPStates) + IOMemoryDescriptor *memDescriptor; + IOMemoryMap *memoryMap; #endif - { - int currentBit = 0; - UInt64 value = 0ULL; - - gTriggeredPStates = gCoreMultipliers; - IOLog("AICPUPMI: CPU P-States [ "); - - for (currentBit = gMinRatio; currentBit <= gMaxRatio; currentBit++) - { - value = (1ULL << currentBit); - - if ((gTriggeredPStates & value) == value) - { - if (currentBit == currentMultiplier) - { - IOLog("(%d) ", currentBit); - } - else - { - IOLog("%d ", currentBit); - } - } - } -#if REPORT_GPU_STATS - if (igpuEnabled) - { - gTriggeredIGPUPStates = gIGPUMultipliers; - IOLog("] GPU P-States [ "); - - for (currentBit = 17; currentBit <= 27; currentBit++) - { - value = (1ULL << currentBit); - - if ((gTriggeredIGPUPStates & value) == value) - { - if (currentBit == currentIgpuMultiplier) - { - IOLog("(%d) ", currentBit); - } - else - { - IOLog("%d ", currentBit); - } - } - } - } -#endif - IOLog("]\n"); - } + IOReturn result = kIOReturnSuccess; - loopLock = false; + virtual IOReturn loopTimerEvent(void); - return kIOReturnSuccess; -} + void reportMSRs(void); -//============================================================================== + bool loopLock = false; + bool dumpCStates = true; + bool igpuEnabled = true; -IOService* AppleIntelCPUPowerManagementInfo::probe(IOService *provider, SInt32 *score) -{ - IOService *ret = super::probe(provider, score); - - if (ret != this) - { - return 0; - } - - return ret; -} + UInt16 Interval = 50; -//============================================================================== + UInt64 gCoreMultipliers = 0ULL; + UInt64 gTriggeredPStates = 0ULL; -bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) -{ - if (IOService::start(provider)) - { - simpleLock = IOSimpleLockAlloc(); + UInt64 gIGPUMultipliers = 0ULL; + UInt64 gTriggeredIGPUPStates = 0ULL; - if (simpleLock) - { - timerEventSource = IOTimerEventSource::timerEventSource(this, OSMemberFunctionCast(IOTimerEventSource::Action, this, &AppleIntelCPUPowerManagementInfo::loopTimerEvent)); - workLoop = getWorkLoop(); +public: + virtual IOService * probe(IOService * provider, SInt32 * score); + virtual bool start(IOService * provider); + virtual void stop(IOService * provider); + virtual void free(void); - if (timerEventSource && workLoop && (kIOReturnSuccess == workLoop->addEventSource(timerEventSource))) - { - this->registerService(0); + UInt8 gMinRatio = 0; + UInt8 gClockRatio = 0; + UInt8 gMaxRatio = 0; +}; - UInt64 msr = rdmsr64(MSR_IA32_PERF_STS); - gCoreMultipliers |= (1ULL << (msr >> 8)); +OSDefineMetaClassAndStructors(AppleIntelCPUPowerManagementInfo, IOService) - uint32_t cpuid_reg[4]; - do_cpuid(0x00000001, cpuid_reg); +UInt8 gCPUModel = 0x2A; +UInt8 gCoreStates = 0ULL; - gCPUModel = bitfield32(cpuid_reg[eax], 7, 4) + (bitfield32(cpuid_reg[eax], 19, 16) << 4); +#if REPORT_C_STATES +bool gCheckC3 = true; +bool gCheckC6 = true; +bool gCheckC7 = false; -#if REPORT_MSRS - reportMSRs(); -#endif - msr = rdmsr64(MSR_PLATFORM_INFO); - gMinRatio = (UInt8)((msr >> 40) & 0xff); - IOLog("AICPUPMI: Low Frequency Mode : %d00 MHz\n", gMinRatio); - - gClockRatio = (UInt8)((msr >> 8) & 0xff); - IOLog("AICPUPMI: Clock Speed : %d00 MHz\n", gClockRatio); - - if (!((rdmsr64(IA32_MISC_ENABLES) >> 32) & 0x40)) // Turbo Mode Enabled? - { - msr = rdmsr64(MSR_TURBO_RATIO_LIMIT); - gMaxRatio = (UInt8)(msr & 0xff); - IOLog("AICPUPMI: Max Turbo Frequency: %d00 MHz\n", gMaxRatio); - } - else - { - gMaxRatio = gClockRatio; - IOLog("AICPUPMI: Max Frequency : %d00 MHz\n", gMaxRatio); - } +UInt32 gC3Cores = 0; +UInt32 gC6Cores = 0; +UInt32 gC7Cores = 0; -#if REPORT_GPU_STATS - if ((READ_PCI8_NB(DEVEN) & DEVEN_D2EN_MASK)) - { - IOPhysicalAddress address = (IOPhysicalAddress)(0xFED10000 + 0x5948); - memDescriptor = IOMemoryDescriptor::withPhysicalAddress(address, 0x53, kIODirectionInOut); - - if (memDescriptor != NULL) - { - if ((result = memDescriptor->prepare()) == kIOReturnSuccess) - { - memoryMap = memDescriptor->map(); - - if (memoryMap != NULL) - { - igpuEnabled = true; // IGPU Enabled and Visible - gMchbar = (UInt8 *)memoryMap->getVirtualAddress(); - - IOLog("AICPUPMI: IGPU Current Freq..: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x01])); - IOLog("AICPUPMI: IGPU Max Frequency.: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x51])); - IOLog("AICPUPMI: IGPU Max Turbo Freq: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x50])); - // - // Example-1: 17 (multiplier) * 50 (frequency in MHz) = 850 MHz - // Example-2: 22 (multiplier) * 50 (frequency in MHz) = 1100 MHz - // 6 P-States: 850, 900, 950, 1000, 1050 and 1100 MHz - // - } - else - { - IOLog("AICPUPMI: Error: memoryMap == NULL\n"); - } - } - else - { - IOLog("AICPUPMI: Error: memDescriptor->prepare() failed!\n"); - } - } - else - { - IOLog("AICPUPMI: Error: memDescriptor == NULL\n"); - } - } +UInt32 gTriggeredC3Cores = 0; +UInt32 gTriggeredC6Cores = 0; +UInt32 gTriggeredC7Cores = 0; #endif - timerEventSource->setTimeoutMS(1000); - - return true; - } - } - } - - return false; -} -//============================================================================== +UInt64 gCoreMultipliers = 0ULL; -void AppleIntelCPUPowerManagementInfo::stop(IOService *provider) -{ - if (simpleLock) - { - IOSimpleLockFree(simpleLock); - } - - if (timerEventSource) - { - if (workLoop) - { - timerEventSource->cancelTimeout(); - workLoop->removeEventSource(timerEventSource); - } - - timerEventSource->release(); - timerEventSource = NULL; - } - - super::stop(provider); -} - -//============================================================================== - -void AppleIntelCPUPowerManagementInfo::free() -{ #if REPORT_GPU_STATS - if (igpuEnabled) - { - if (memoryMap) - { - memoryMap->release(); - memoryMap = NULL; - } - - if (memDescriptor) - { - memDescriptor->release(); - memDescriptor = NULL; - } - } + UInt8 * gMchbar = NULL; #endif - - super::free(); -} From b135b1f4b48444891f9e6b5dc9e1429d6b011ab1 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Mon, 30 Dec 2013 10:31:05 +0100 Subject: [PATCH 417/623] C-State code changes --- .../AppleIntelCPUPowerManagementInfo.cpp | 505 ++++++++++++++---- 1 file changed, 406 insertions(+), 99 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index a0c43b9..24bd2fd 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -8,145 +8,452 @@ * */ -#include <IOKit/IOLib.h> -#include <IOKit/IOService.h> -#include <IOKit/IOWorkLoop.h> -#include <IOKit/IOMemoryDescriptor.h> -#include <IOKit/IOTimerEventSource.h> +#include "AppleIntelCPUPowerManagementInfo.h" -#include <i386/cpuid.h> -#include <i386/proc_reg.h> -#include "../../../essentials.h" +//============================================================================== -#define super IOService +void AppleIntelCPUPowerManagementInfo::reportMSRs(void) +{ + IOLog("AICPUPMI: MSR_CORE_THREAD_COUNT......(0x35) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_THREAD_COUNT)); + + IOLog("AICPUPMI: MSR_PLATFORM_INFO..........(0xCE) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PLATFORM_INFO)); + + IOLog("AICPUPMI: MSR_PMG_CST_CONFIG_CONTROL.(0xE2) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_CST_CONFIG_CONTROL)); + IOLog("AICPUPMI: MSR_PMG_IO_CAPTURE_BASE....(0xE4) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PMG_IO_CAPTURE_BASE)); + IOLog("AICPUPMI: IA32_MPERF.................(0xE7) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_MPERF)); + IOLog("AICPUPMI: IA32_APERF.................(0xE8) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_APERF)); + + IOLog("AICPUPMI: MSR_FLEX_RATIO.............(0x194) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_FLEX_RATIO)); + IOLog("AICPUPMI: MSR_IA32_PERF_STATUS.......(0x198) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_IA32_PERF_STATUS)); + IOLog("AICPUPMI: MSR_IA32_PERF_CONTROL......(0x199) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_IA32_PERF_CONTROL)); + IOLog("AICPUPMI: IA32_CLOCK_MODULATION......(0x19A) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_CLOCK_MODULATION)); + IOLog("AICPUPMI: IA32_THERM_STATUS..........(0x19C) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_THERM_STATUS)); + + IOLog("AICPUPMI: IA32_MISC_ENABLES..........(0x1A0) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_MISC_ENABLES)); + IOLog("AICPUPMI: MSR_MISC_PWR_MGMT..........(0x1AA) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_MISC_PWR_MGMT)); + IOLog("AICPUPMI: MSR_TURBO_RATIO_LIMIT......(0x1AD) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_RATIO_LIMIT)); + + IOLog("AICPUPMI: IA32_ENERGY_PERF_BIAS......(0x1B0) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_ENERGY_PERF_BIAS)); + + IOLog("AICPUPMI: MSR_POWER_CTL..............(0x1FC) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_POWER_CTL)); + + IOLog("AICPUPMI: MSR_RAPL_POWER_UNIT........(0x606) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_RAPL_POWER_UNIT)); + IOLog("AICPUPMI: MSR_PKG_POWER_LIMIT........(0x610) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_POWER_LIMIT)); + IOLog("AICPUPMI: MSR_PKG_ENERGY_STATUS......(0x611) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_ENERGY_STATUS)); + + IOLog("AICPUPMI: MSR_PKGC3_IRTL.............(0x60a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC3_IRTL)); + IOLog("AICPUPMI: MSR_PKGC6_IRTL.............(0x60b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC6_IRTL)); + IOLog("AICPUPMI: MSR_PKGC7_IRTL.............(0x60c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC7_IRTL)); + + IOLog("AICPUPMI: MSR_PP0_CURRENT_CONFIG.....(0x601) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_CURRENT_CONFIG)); + IOLog("AICPUPMI: MSR_PP0_POWER_LIMIT........(0x638) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POWER_LIMIT)); + IOLog("AICPUPMI: MSR_PP0_ENERGY_STATUS......(0x639) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_ENERGY_STATUS)); + IOLog("AICPUPMI: MSR_PP0_POLICY.............(0x63a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POLICY)); + + /* IOLog("AICPUPMI: MSR_PP1_CURRENT_CONFIG.....(0x602) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_CURRENT_CONFIG)); + IOLog("AICPUPMI: MSR_PP1_POWER_LIMIT........(0x640) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POWER_LIMIT)); + IOLog("AICPUPMI: MSR_PP1_ENERGY_STATUS......(0x641) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_ENERGY_STATUS)); + IOLog("AICPUPMI: MSR_PP1_POLICY.............(0x642) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POLICY)); */ + + IOLog("AICPUPMI: MSR_CONFIG_TDP_NOMINAL.....(0x648) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_NOMINAL)); + IOLog("AICPUPMI: MSR_CONFIG_TDP_LEVEL1......(0x649) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL1)); + IOLog("AICPUPMI: MSR_CONFIG_TDP_LEVEL2......(0x64a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL2)); + IOLog("AICPUPMI: MSR_CONFIG_TDP_CONTROL.....(0x64b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_CONTROL)); + IOLog("AICPUPMI: MSR_TURBO_ACTIVATION_RATIO.(0x64c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_ACTIVATION_RATIO)); + + IOLog("AICPUPMI: MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C2_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C3_RESIDENCY.......(0x3f8) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C3_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C6_RESIDENCY.......(0x3f9) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C6_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C7_RESIDENCY.......(0x3fa) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + + if (gCPUModel == CPU_MODEL_HASWELL_ULT) + { + IOLog("AICPUPMI: MSR_PKG_C8_RESIDENCY.......(0x630) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C9_RESIDENCY.......(0x631) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C10_RESIDENCY......(0x632) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + + IOLog("AICPUPMI: MSR_PKG_C8_LATENCY.........(0x633) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C9_LATENCY.........(0x634) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C10_LATENCY........(0x635) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + } +} -#define REPORT_MSRS 1 -#define REPORT_GPU_STATS 1 -#define REPORT_C_STATES 1 +//============================================================================== -#define NB_BUS 0x00 -#define NB_DEV 0x00 -#define NB_FUN 0x00 +inline void getCStates(void *magic) +{ + UInt32 logicalCoreNumber = cpu_number(); -#define DEVEN (0x54) -#define DEVEN_D2EN_MASK (0x10) + if (gCheckC3 && rdmsr64(MSR_CORE_C3_RESIDENCY) > 0) + { + gC3Cores |= (1 << logicalCoreNumber); + } -#define NB_PCICFG_SPACE_INDEX_REG 0xcf8 -#define NB_PCICFG_SPACE_DATA_REG 0xcfc + if (gCheckC6 && rdmsr64(MSR_CORE_C6_RESIDENCY) > 0) + { + gC6Cores |= (1 << logicalCoreNumber); + } -#define BIT31 0x80000000 + if (gCheckC7 && rdmsr64(MSR_CORE_C7_RESIDENCY) > 0) + { + gC7Cores |= (1 << logicalCoreNumber); + } +} -#define PCIEX_BASE_ADDRESS 0xF8000000 -#define NB_MCH_BASE_ADDRESS 0xFED10000 // (G)MCH Memory Mapped Register Range Base Address (D0:F0:Rx48). +//============================================================================== -#define READ_PCI8(Bx, Dx, Fx, Rx) ReadPci8(Bx, Dx, Fx, Rx) -#define READ_PCI8_NB(Rx) READ_PCI8(NB_BUS, NB_DEV, NB_FUN, Rx) -#define MMIO_READ8(Address) (*(volatile UInt8 *)(Address)) +IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) +{ + UInt8 currentMultiplier = (rdmsr64(MSR_IA32_PERF_STS) >> 8); + gCoreMultipliers |= (1ULL << currentMultiplier); -#define IGPU_RATIO_TO_FREQUENCY(ratio) ((ratio * 100) / 2) +#if REPORT_GPU_STATS + UInt8 currentIgpuMultiplier = 0; -#define NB_PCI_CFG_ADDRESS(bus, dev, func, reg) \ - (UInt64) ((((UInt8)(bus) << 24) + ((UInt8)(dev) << 16) + \ - ((UInt8)(func) << 8) + ((UInt8)(reg))) & 0xffffffff) + if (igpuEnabled) + { + currentIgpuMultiplier = (UInt8)gMchbar[1]; + gIGPUMultipliers |= (1ULL << currentIgpuMultiplier); + } +#endif -#define NB_PCIE_CFG_ADDRESS(bus, dev, func, reg) \ - ((UInt32)(PCIEX_BASE_ADDRESS + ((UInt8)(bus) << 20) + \ - ((UInt8)(dev) << 15) + ((UInt8)(func) << 12) + (reg))) + timerEventSource->setTimeoutTicks(Interval); -static __inline__ unsigned char inb(UInt16 port) -{ - UInt8 value; - __asm__ volatile("inb %w1, %b0" : "=a" (value) : "Nd" (port)); - return (value); -} + if (loopLock) + { + return kIOReturnTimeout; + } + + loopLock = true; -static __inline__ void outl(UInt16 port, UInt32 value) -{ - __asm__ volatile("outl %0, %w1" : : "a" (value), "Nd" (port)); -} +#if REPORT_C_STATES + if (dumpCStates) + { + UInt32 magic = 0; + // IOSimpleLockLock(simpleLock); + mp_rendezvous_no_intrs(getCStates, &magic); + IOSleep(1); + // IOSimpleLockUnlock(simpleLock); + } +#endif -UInt8 ReadPci8(UInt8 Bus, UInt8 Dev, UInt8 Fun, UInt16 Reg) -{ - if (Reg >= 0x100) + int currentBit = 0; + UInt64 value = 0ULL; + +#if REPORT_GPU_STATS + if ((gCoreMultipliers != gTriggeredPStates) || (gIGPUMultipliers != gTriggeredIGPUPStates)) +#else + if (gCoreMultipliers != gTriggeredPStates) +#endif { - // return MMIO_READ8(NB_PCIE_CFG_ADDRESS(Bus, Dev, Fun, Reg)); - return MMIO_READ8((UInt64)NB_PCIE_CFG_ADDRESS(Bus, Dev, Fun, Reg)); + // int currentBit = 0; + // UInt64 value = 0ULL; + + gTriggeredPStates = gCoreMultipliers; + IOLog("AICPUPMI: CPU P-States [ "); + + for (currentBit = gMinRatio; currentBit <= gMaxRatio; currentBit++) + { + value = (1ULL << currentBit); + + if ((gTriggeredPStates & value) == value) + { + if (currentBit == currentMultiplier) + { + IOLog("(%d) ", currentBit); + } + else + { + IOLog("%d ", currentBit); + } + } + } + +#if REPORT_GPU_STATS + if (igpuEnabled) + { + gTriggeredIGPUPStates = gIGPUMultipliers; + IOLog("] iGPU P-States [ "); + + for (currentBit = 1; currentBit <= 32; currentBit++) + { + value = (1ULL << currentBit); + + if ((gTriggeredIGPUPStates & value) == value) + { + if (currentBit == currentIgpuMultiplier) + { + IOLog("(%d) ", currentBit); + } + else + { + IOLog("%d ", currentBit); + } + } + } + } +#endif + IOLog("]\n"); } - else + +#if REPORT_C_STATES + if (gTriggeredC3Cores != gC3Cores) { - outl(NB_PCICFG_SPACE_INDEX_REG, BIT31 | (Bus << 16) | (Dev << 11) | (Fun << 8) | (Reg & 0xfc)); - return inb(NB_PCICFG_SPACE_DATA_REG | (UInt8)(Reg & 3)); - } + gTriggeredC3Cores = gC3Cores; + IOLog("AICPUPMI: CPU C3-Cores [ "); + + for (currentBit = 0; currentBit <= 16; currentBit++) + { + value = (1ULL << currentBit); + + if ((gTriggeredC3Cores & value) == value) + { + IOLog("%d ", currentBit); + } + } + + IOLog("]\n"); + } + + if (gTriggeredC6Cores != gC6Cores) + { + gTriggeredC6Cores = gC6Cores; + IOLog("AICPUPMI: CPU C6-Cores [ "); + + for (currentBit = 0; currentBit <= 16; currentBit++) + { + value = (1ULL << currentBit); + + if ((gTriggeredC6Cores & value) == value) + { + IOLog("%d ", currentBit); + } + } + + IOLog("]\n"); + } + + if (gTriggeredC7Cores != gC7Cores) + { + gTriggeredC7Cores = gC7Cores; + IOLog("AICPUPMI: CPU C7-Cores [ "); + + for (currentBit = 0; currentBit <= 16; currentBit++) + { + value = (1ULL << currentBit); + + if ((gTriggeredC7Cores & value) == value) + { + IOLog("%d ", currentBit); + } + } + + IOLog("]\n"); + } +#endif + + loopLock = false; + + return kIOReturnSuccess; } -extern "C" void mp_rendezvous_no_intrs(void (*action_func)(void *), void * arg); -extern "C" int cpu_number(void); +//============================================================================== -class AppleIntelCPUPowerManagementInfo : public IOService +IOService* AppleIntelCPUPowerManagementInfo::probe(IOService *provider, SInt32 *score) { - OSDeclareDefaultStructors (AppleIntelCPUPowerManagementInfo); + IOService *ret = super::probe(provider, score); + + if (ret != this) + { + return 0; + } + + return ret; +} -private: - IOSimpleLock *simpleLock; - IOWorkLoop *workLoop; - IOTimerEventSource *timerEventSource; +//============================================================================== -#if REPORT_GPU_STATS - IOMemoryDescriptor *memDescriptor; - IOMemoryMap *memoryMap; -#endif +bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) +{ + if (IOService::start(provider)) + { + simpleLock = IOSimpleLockAlloc(); - IOReturn result = kIOReturnSuccess; + if (simpleLock) + { + timerEventSource = IOTimerEventSource::timerEventSource(this, OSMemberFunctionCast(IOTimerEventSource::Action, this, &AppleIntelCPUPowerManagementInfo::loopTimerEvent)); + workLoop = getWorkLoop(); - virtual IOReturn loopTimerEvent(void); + if (timerEventSource && workLoop && (kIOReturnSuccess == workLoop->addEventSource(timerEventSource))) + { + this->registerService(0); - void reportMSRs(void); + UInt64 msr = rdmsr64(MSR_IA32_PERF_STS); + gCoreMultipliers |= (1ULL << (msr >> 8)); - bool loopLock = false; - bool dumpCStates = true; - bool igpuEnabled = true; + // wrmsr64(IA32_ENERGY_PERF_BIAS, 15); + // wrmsr64(MSR_IA32_PERF_CONTROL, 0x2000); + + uint32_t cpuid_reg[4]; + do_cpuid(0x00000001, cpuid_reg); - UInt16 Interval = 50; + gCPUModel = bitfield32(cpuid_reg[eax], 7, 4) + (bitfield32(cpuid_reg[eax], 19, 16) << 4); - UInt64 gCoreMultipliers = 0ULL; - UInt64 gTriggeredPStates = 0ULL; + // MWAIT information + do_cpuid(0x00000005, cpuid_reg); + uint32_t supportedMwaitCStates = bitfield32(cpuid_reg[edx], 31, 0); + + IOLog("AICPUPMI: MWAIT C-States : %d\n", supportedMwaitCStates); - UInt64 gIGPUMultipliers = 0ULL; - UInt64 gTriggeredIGPUPStates = 0ULL; +#if REPORT_MSRS + reportMSRs(); +#endif + msr = rdmsr64(MSR_PLATFORM_INFO); + gMinRatio = (UInt8)((msr >> 40) & 0xff); + IOLog("AICPUPMI: Low Frequency Mode : %d00 MHz\n", gMinRatio); + + gClockRatio = (UInt8)((msr >> 8) & 0xff); + IOLog("AICPUPMI: Clock Speed : %d00 MHz\n", gClockRatio); + + if (!((rdmsr64(IA32_MISC_ENABLES) >> 32) & 0x40)) // Turbo Mode Enabled? + { + msr = rdmsr64(MSR_TURBO_RATIO_LIMIT); + gMaxRatio = (UInt8)(msr & 0xff); + IOLog("AICPUPMI: Max Turbo Frequency: %d00 MHz\n", gMaxRatio); + } + else + { + gMaxRatio = gClockRatio; + IOLog("AICPUPMI: Max Frequency : %d00 MHz\n", gMaxRatio); + } -public: - virtual IOService * probe(IOService * provider, SInt32 * score); - virtual bool start(IOService * provider); - virtual void stop(IOService * provider); - virtual void free(void); +#if REPORT_GPU_STATS + if ((READ_PCI8_NB(DEVEN) & DEVEN_D2EN_MASK)) + { + IOPhysicalAddress address = (IOPhysicalAddress)(0xFED10000 + 0x5948); + memDescriptor = IOMemoryDescriptor::withPhysicalAddress(address, 0x53, kIODirectionInOut); + + if (memDescriptor != NULL) + { + if ((result = memDescriptor->prepare()) == kIOReturnSuccess) + { + memoryMap = memDescriptor->map(); + + if (memoryMap != NULL) + { + igpuEnabled = true; // IGPU Enabled and Visible + gMchbar = (UInt8 *)memoryMap->getVirtualAddress(); + + // Preventing a stupid (UEFI) BIOS limit. + if (gMchbar[0x4C] < gMchbar[0x50]) + { + gMchbar[0x4C] = gMchbar[0x50]; + } + + // + // Examples: + // 17 (multiplier) * 50 (frequency in MHz) = 850 MHz + // 22 (multiplier) * 50 (frequency in MHz) = 1100 MHz + // 6 P-States: 850, 900, 950, 1000, 1050 and 1100 MHz + // + // + // Current RP-State, when the graphics engine is in RC6, this reflects the last used ratio. + IOLog("AICPUPMI: IGPU Current Frequency..: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x01])); // RP_STATE_RATIO (CURRENT_FREQUENCY) + // Maximum RPN base frequency capability for the Integrated GFX Engine (GT). + IOLog("AICPUPMI: IGPU Min Frequency......: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x52])); // RPN_CAP (MIN_FREQUENCY) + // Maximum RP1 base frequency capability for the Integrated GFX Engine (GT). + IOLog("AICPUPMI: IGPU Max Non-Turbo Freq.: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x51])); // RP1_CAP (MAX_NON_TURBO) + // Maximum RP0 base frequency capability for the Integrated GFX Engine (GT). + IOLog("AICPUPMI: IGPU Max Turbo Frequency: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x50])); // RP0_CAP (MAX_TURBO)) + + // Maximum base frequency limit for the Integrated GFX Engine (GT) allowed during run-time. + if (gMchbar[0x4C] == 255) + { + IOLog("AICPUPMI: IGPU Maximum limit......: No Limit\n"); // RPSTT_LIM + } + else + { + IOLog("AICPUPMI: IGPU Maximum limit......: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x4C])); // RPSTT_LIM + } + } + else + { + IOLog("AICPUPMI: Error: memoryMap == NULL\n"); + } + } + else + { + IOLog("AICPUPMI: Error: memDescriptor->prepare() failed!\n"); + } + } + else + { + IOLog("AICPUPMI: Error: memDescriptor == NULL\n"); + } + } +#endif + +#if REPORT_C_STATES + if ((gCPUModel == CPU_MODEL_SB_CORE) || (gCPUModel == CPU_MODEL_SB_JAKETOWN) || (gCPUModel == CPU_MODEL_HASWELL)) + { + gCheckC7 = true; + } +#endif + timerEventSource->setTimeoutMS(1000); - UInt8 gMinRatio = 0; - UInt8 gClockRatio = 0; - UInt8 gMaxRatio = 0; -}; + return true; + } + } + } -OSDefineMetaClassAndStructors(AppleIntelCPUPowerManagementInfo, IOService) + return false; +} -UInt8 gCPUModel = 0x2A; -UInt8 gCoreStates = 0ULL; +//============================================================================== -#if REPORT_C_STATES -bool gCheckC3 = true; -bool gCheckC6 = true; -bool gCheckC7 = false; +void AppleIntelCPUPowerManagementInfo::stop(IOService *provider) +{ + if (simpleLock) + { + IOSimpleLockFree(simpleLock); + } -UInt32 gC3Cores = 0; -UInt32 gC6Cores = 0; -UInt32 gC7Cores = 0; + if (timerEventSource) + { + if (workLoop) + { + timerEventSource->cancelTimeout(); + workLoop->removeEventSource(timerEventSource); + } + + timerEventSource->release(); + timerEventSource = NULL; + } -UInt32 gTriggeredC3Cores = 0; -UInt32 gTriggeredC6Cores = 0; -UInt32 gTriggeredC7Cores = 0; -#endif + super::stop(provider); +} -UInt64 gCoreMultipliers = 0ULL; +//============================================================================== +void AppleIntelCPUPowerManagementInfo::free() +{ #if REPORT_GPU_STATS - UInt8 * gMchbar = NULL; + if (igpuEnabled) + { + if (memoryMap) + { + memoryMap->release(); + memoryMap = NULL; + } + + if (memDescriptor) + { + memDescriptor->release(); + memDescriptor = NULL; + } + } #endif + + super::free(); +} From b63d26dc0461c15e6e71e06ff69472a0fbc9ee43 Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Mon, 30 Dec 2013 10:37:07 +0100 Subject: [PATCH 418/623] Updating file for AppleIntelCPUPowerManagementInfo.kext --- i386/libsaio/cpu/essentials.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index ff093e6..e99d40b 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -82,6 +82,10 @@ #define IA32_PLATFORM_DCA_CAP 0x01F8 #define MSR_POWER_CTL 0x01FC +#define MSR_PKGC3_IRTL 0x60A +#define MSR_PKGC6_IRTL 0x60B +#define MSR_PKGC7_IRTL 0x60C + #define MSR_PKG_C2_RESIDENCY 0x60D #define MSR_PKG_C3_RESIDENCY 0x3F8 #define MSR_PKG_C6_RESIDENCY 0x3F9 From adf1580ba2280519b6bdd2c37d73c0d1c84541ff Mon Sep 17 00:00:00 2001 From: Pike <PikerAlpha@yahoo.com> Date: Mon, 30 Dec 2013 10:40:08 +0100 Subject: [PATCH 419/623] . --- .../AppleIntelCPUPowerManagementInfo.h | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index f161451..a0c43b9 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -23,6 +23,7 @@ #define REPORT_MSRS 1 #define REPORT_GPU_STATS 1 +#define REPORT_C_STATES 1 #define NB_BUS 0x00 #define NB_DEV 0x00 @@ -69,7 +70,8 @@ UInt8 ReadPci8(UInt8 Bus, UInt8 Dev, UInt8 Fun, UInt16 Reg) { if (Reg >= 0x100) { - return MMIO_READ8(NB_PCIE_CFG_ADDRESS(Bus, Dev, Fun, Reg)); + // return MMIO_READ8(NB_PCIE_CFG_ADDRESS(Bus, Dev, Fun, Reg)); + return MMIO_READ8((UInt64)NB_PCIE_CFG_ADDRESS(Bus, Dev, Fun, Reg)); } else { @@ -102,8 +104,8 @@ class AppleIntelCPUPowerManagementInfo : public IOService void reportMSRs(void); bool loopLock = false; - bool dumpCStates = false; - bool igpuEnabled = false; + bool dumpCStates = true; + bool igpuEnabled = true; UInt16 Interval = 50; @@ -129,6 +131,22 @@ OSDefineMetaClassAndStructors(AppleIntelCPUPowerManagementInfo, IOService) UInt8 gCPUModel = 0x2A; UInt8 gCoreStates = 0ULL; +#if REPORT_C_STATES +bool gCheckC3 = true; +bool gCheckC6 = true; +bool gCheckC7 = false; + +UInt32 gC3Cores = 0; +UInt32 gC6Cores = 0; +UInt32 gC7Cores = 0; + +UInt32 gTriggeredC3Cores = 0; +UInt32 gTriggeredC6Cores = 0; +UInt32 gTriggeredC7Cores = 0; +#endif + +UInt64 gCoreMultipliers = 0ULL; + #if REPORT_GPU_STATS UInt8 * gMchbar = NULL; #endif From 1b31162757e067d8b27c4a5093625f3c4e2b7b04 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 30 Dec 2013 11:13:05 +0100 Subject: [PATCH 420/623] Uodating files Comitting files from Vector One. --- i386/boot2/boot.c | 10 ++- i386/boot2/drivers.c | 16 ++-- i386/config/settings-template.h | 2 +- i386/libsaio/acpi.c | 2 +- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 61 ++++++++++----- i386/libsaio/acpi/patcher.h | 1 + i386/libsaio/cpu/Intel/dynamic_data.h | 8 +- i386/libsaio/cpu/essentials.h | 6 ++ .../AppleIntelCPUPowerManagementInfo.cpp | 75 ++++++++++++------- i386/libsaio/efi.c | 5 ++ i386/libsaio/platform.h | 4 +- i386/libsaio/smbios/dynamic_data.h | 6 +- i386/libsaio/smbios/model_data.h | 41 +++++++--- 13 files changed, 161 insertions(+), 76 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 5d62fe2..179a387 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -59,6 +59,8 @@ #include "sl.h" #include "libsa.h" +#include "cpu/proc_reg.h" + // DHP: Dump all global junk a.s.a.p. long gBootMode = kBootModeQuiet; // no longer defaults to 0 aka kBootModeNormal @@ -314,6 +316,12 @@ void boot(int biosdev) strlcpy(rootUUID, val, 37); } #if INSTALL_ESD_SUPPORT + /* + * boot-arg scheme: + * + * container-dmg: optional DMG that contains the root-dmg. + * root-dmg: the DMG that will be the root filesystem. + */ if (getValueForBootKey(kernelFlags, "container-dmg", &val, &length) && getValueForBootKey(kernelFlags, "root-dmg", &val, &length)) { @@ -661,7 +669,7 @@ void boot(int biosdev) finalizeKernelBootConfig(); _BOOT_DEBUG_DUMP("execKernel-7 / gVerboseMode is %s\n", gVerboseMode ? "true" : "false"); - + // Did we switch to graphics mode yet (think verbose mode)? if (gVerboseMode || bootArgs->Video.v_display == VGA_TEXT_MODE) { diff --git a/i386/boot2/drivers.c b/i386/boot2/drivers.c index cd90650..75860b8 100755 --- a/i386/boot2/drivers.c +++ b/i386/boot2/drivers.c @@ -199,19 +199,21 @@ long loadDrivers(char * dirSpec) if ((gKextLoadStatus & 1) == 0) { - _DRIVERS_DEBUG_DUMP("\nCalling loadKexts(\"/System/Library/Extensions\");\n"); - // System kexts - if (loadKexts("/System/Library/Extensions", 0) == EFI_SUCCESS) +#if (MAKE_TARGET_OS == MAVERICKS) + _DRIVERS_DEBUG_DUMP("\nCalling loadKexts(\"/Library/Extensions\");\n"); + + // For Mavericks we first load the signed kexts. + if (loadKexts("/Library/Extensions", 0) == EFI_SUCCESS) { _DRIVERS_DEBUG_DUMP("loadKexts(1) OK.\n"); } -#if (MAKE_TARGET_OS == MAVERICKS) - // Signed kexts for Mavericks only! - if (loadKexts("/Library/Extensions", 0) == EFI_SUCCESS) +#endif + _DRIVERS_DEBUG_DUMP("\nCalling loadKexts(\"/System/Library/Extensions\");\n"); + // System kexts + if (loadKexts("/System/Library/Extensions", 0) == EFI_SUCCESS) { _DRIVERS_DEBUG_DUMP("loadKexts(2) OK.\n"); } -#endif _DRIVERS_DEBUG_DUMP("\n"); } } diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 683aa7f..f59030a 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -208,7 +208,7 @@ //--------------------------------------------------------------- BOOT.C ------------------------------------------------------------------- -#define PRE_LINKED_KERNEL_SUPPORT 1 // Set to 1 by default. Change this to 0 to disable the use of pre-linked kernels. +#define PRE_LINKED_KERNEL_SUPPORT 0 // Set to 1 by default. Change this to 0 to disable the use of pre-linked kernels. #define MUST_ENABLE_A20 0 // Set to 0 by default. Change this to 1 when your hardware requires it. diff --git a/i386/libsaio/acpi.c b/i386/libsaio/acpi.c index baaa8fd..c57ec93 100755 --- a/i386/libsaio/acpi.c +++ b/i386/libsaio/acpi.c @@ -78,7 +78,7 @@ void updateACPITableData(struct acpi_2_rsdp * rsdp, struct acpi_2_xsdt * xsdt, i //------------------------- Used in acpi/patcher.h ------------------------- #define _ACPI_SET(target, str, len) strncpy(target, str, len) #define _ACPI_SET_APPLE_OEMID(target) _ACPI_SET((target)->OEMID, "Apple ", 6) - #define _ACPI_SET_APPLE_OEMTargetID(target) _ACPI_SET((target)->OEMTableID, "Apple00", 8) + #define _ACPI_SET_APPLE_OEMTargetID(target) _ACPI_SET((target)->OEMTableID, gPlatform.CommaLessModelID, 8) //-------------------------------------------------------------------------- #else //--------------------------- Void replacements ---------------------------- diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index c2b5ee2..ec3069e 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> -# Version 6.6 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 7.0 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -74,6 +74,12 @@ # - Output of Clover ACPI directory detection fixed (Pike, June 2013) # - Haswell CPUs added (Jeroen, June 2013) # - board-id's for new MacBookAir6,[1/2] added (Pike, June 2013) +# - board-id's for new iMac14,[1/2/3] added (Pike, October 2013) +# - board-id's for new MacBookPro11,[1/2/3] added (Pike, October 2013) +# - Cleanups and board-id for new MacPro6,1 added (Pike, October 2013) +# – Frequency error in i7-4700MQ data fixed, thanks to RehabMan (Pike, November 2013) +# - Intel i5-4200M added (Pike, December 2013) +# - LFM fixed in the Intel i7-3930K data (Pike, December 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -83,6 +89,7 @@ # - Thanks to 'RehabMan' for his help with Snow Leopard/egrep incompatibility. # - Thanks to 'BigDonkey' for his help with LFM (800 MHz) for Sandy Bridge mobility models. # - Thanks to 'xpamamadeus' for the Clover boot.log tip. +# - Thanks to 'rileyfreeman' for the Intel i7-3930K LFM value. # # Usage (v1.0 - v4.9): # @@ -179,7 +186,7 @@ gScope="\_PR_" # Other global variables. # -gScriptVersion=6.6 +gScriptVersion=7.0 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -256,7 +263,7 @@ i7-35355,120,1600,2666,2666,4,4 # i7 Desktop Extreme Series i7-3970X,150,0,3500,4000,6,12 i7-3960X,130,0,3300,3900,6,12 -i7-3930K,130,0,3200,3800,6,12 +i7-3930K,130,1200,3200,3800,6,12 i7-3820,130,0,3600,3800,4,8 # i7 Desktop series i7-2600S,65,1600,2800,3800,4,8 @@ -531,6 +538,7 @@ i7-4700MQ,47,800,2400,3600,4,8 i7-4700HQ,47,800,2400,3600,4,8 i7-4702HQ,37,800,2200,3200,4,8 # Socket FCBGA1168 +i7-4558U,28,800,2800,3300,2,4 i5-4350U,15,800,1400,2900,2,4 i5-4288U,28,800,2600,3100,2,4 i5-4258U,28,800,2400,2900,2,4 @@ -632,7 +640,7 @@ function _printScopeStart() # Do we need to create additional (Low Frequency) P-States? # - if [ $gBridgeType -eq $IVY_BRIDGE ]; + if [ $gBridgeType -ne $SANDY_BRIDGE ]; then let lowFrequencyPStates=($gBaseFrequency/100)-8 let packageLength=($2+$lowFrequencyPStates) @@ -641,7 +649,7 @@ function _printScopeStart() echo ')' >> $gSsdtPR # TODO: Remove this when CPUPM for IB works properly! - if ((gIvyWorkAround)); then + if [[ gIvyWorkAround && $gBridgeType -eq $IVY_BRIDGE ]]; then let useWorkArounds=1 fi fi @@ -822,6 +830,7 @@ function _printScopeACST() # if [ $1 -eq 1 ]; then + echo "1: $1" # Yes (also used by CPU2, CPU3 and greater). let targetCStates=$gACST_CPU1 latency_C1=0x03E8 @@ -838,10 +847,10 @@ function _printScopeACST() # if (($gTypeCPU == $gMobileCPU)); then echo 'Adjusting C-States for detected (mobile) processor' - gACST_CPU0=29 + let gACST_CPU0=29 fi - - let targetCStates=$gACST_CPU0 + echo "gACST_CPU0: $gACST_CPU0" + let targetCStates=253 # $gACST_CPU0 latency_C1=Zero latency_C3=0xCD latency_C6=0xF5 @@ -853,34 +862,41 @@ function _printScopeACST() fi fi + echo "targetCStates: $targetCStates" + # # Checks to determine which C-State(s) we should inject. # if (($targetCStates & 1)); then + echo "Adding C1" let C1=1 let numberOfCStates+=1 let pkgLength+=1 fi if (($targetCStates & 2)); then + echo "Adding C2" let C2=1 let numberOfCStates+=1 let pkgLength+=1 fi if (($targetCStates & 4)); then + echo "Adding C3" let C3=1 let numberOfCStates+=1 let pkgLength+=1 fi if (($targetCStates & 8)); then + echo "Adding C6" let C6=1 let numberOfCStates+=1 let pkgLength+=1 fi - if (($targetCStates & 16)); then + if ((($targetCStates & 16) == 16)); then + echo "Adding C7" let C7=1 let numberOfCStates+=1 let pkgLength+=1 @@ -1134,6 +1150,7 @@ function _getProcessorScope() printf 'Processor Declaration(s) Found in DSDT' fi + # Search for "_PR_" if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 -w0 | egrep -o 'DSDT"=<[0-9a-f]+' | egrep -o '5f50525f') ]]; then gScope="\_PR_" @@ -1754,6 +1771,7 @@ function _initHaswellSetup() ;; Mac-7DF21CB3ED6977E5) + echo "YES" gSystemType=2 gMacModelIdentifier="MacBookAir6,2" gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 @@ -1864,7 +1882,7 @@ function main() fi # Haswell ULT - if (($model==0x40)); then + if (($model==0x45)); then let assumedTDP=1 let gTdp=15 let gBridgeType=8 @@ -2065,23 +2083,28 @@ function main() _printScopeStart $turboStates $packageLength _printPackages $gTdp $frequency $maxTurboFrequency - if [ $gBridgeType -eq $SANDY_BRIDGE ]; - then + case "$gBridgeType" in + $SANDY_BRIDGE) local cpuTypeString="06" - _initSandyBridgeSetup - _printScopeACST 0 _printScopeCPUn - else + ;; + $IVY_BRIDGE) local cpuTypeString="07" - _initIvyBridgeSetup - _printScopeACST 0 _printMethodDSM _printScopeCPUn - fi + ;; + $HASWELL) + local cpuTypeString="08" + _initHaswellSetup + _printScopeACST 0 + _printMethodDSM + _printScopeCPUn + ;; + esac _showLowPowerStates _checkPlatformSupport $modelID $boardID @@ -2132,7 +2155,7 @@ if (($gCallIasl)); then # # Compile ssdt.dsl # - "$iasl" $gSsdtPR + sudo "$iasl" $gSsdtPR # # Copy ssdt_pr.aml to /Extra/ssdt.aml (example) diff --git a/i386/libsaio/acpi/patcher.h b/i386/libsaio/acpi/patcher.h index 479f0e5..4fe1470 100644 --- a/i386/libsaio/acpi/patcher.h +++ b/i386/libsaio/acpi/patcher.h @@ -87,6 +87,7 @@ void loadACPITables(void) #endif // LOAD_DSDT_TABLE_FROM_EXTRA_ACPI #if LOAD_SSDT_TABLE_FROM_EXTRA_ACPI + // loadACPITable(APIC); Table load example! loadACPITable(SSDT); loadACPITable(SSDT_PR); // Overrides STATIC_SSDT_PR_TABLE_DATA / AUTOMATIC_SSDT_PR_CREATION when found! loadACPITable(SSDT_USB); diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index c794c44..a7bb118 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -384,7 +384,7 @@ void initCPUStruct(void) } else if (strstr(gPlatform.CPU.BrandString, "Core(TM) i5")) { - gPlatform.CPU.Type = (0x600 + CoreBridgeType); // Core i5 + gPlatform.CPU.Type = (0x600 + 5); // CoreBridgeType); // Core i5 } else if (strstr(gPlatform.CPU.BrandString, "Core(TM) i3")) { @@ -412,11 +412,11 @@ void initCPUStruct(void) qpiSpeed = 0; // No QPI but DMI for Sandy Bridge processors. // Disable C1/C3 state auto demotion i.e. it won't change C3/C6/C7 requests to C1/C3. - wrmsr64(MSR_PKG_CST_CONFIG_CONTROL, 0x1E000003ULL); + // wrmsr64(MSR_PKG_CST_CONFIG_CONTROL, 0x1E000003ULL); // Disable EIST Hardware coordination (letting AICPUPM.kext handle it). - msr = rdmsr64(MSR_MISC_PWR_MGMT); - wrmsr64(MSR_MISC_PWR_MGMT, (msr | 1)); + // msr = rdmsr64(MSR_MISC_PWR_MGMT); + // wrmsr64(MSR_MISC_PWR_MGMT, (msr | 1)); // Disable I/O MWAIT Redirection. // msr = rdmsr64(MSR_PKG_CST_CONFIG_CONTROL); diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index ff093e6..6ef5ada 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -82,6 +82,10 @@ #define IA32_PLATFORM_DCA_CAP 0x01F8 #define MSR_POWER_CTL 0x01FC +#define MSR_PKGC3_IRTL 0x60A +#define MSR_PKGC6_IRTL 0x60B +#define MSR_PKGC7_IRTL 0x60C + #define MSR_PKG_C2_RESIDENCY 0x60D #define MSR_PKG_C3_RESIDENCY 0x3F8 #define MSR_PKG_C6_RESIDENCY 0x3F9 @@ -175,7 +179,9 @@ #define CPU_MODEL_IB_CORE_XEON 0x3E #define CPU_MODEL_HASWELL 0x3C +#define CPU_MODEL_HASWELL_SVR 0x3F #define CPU_MODEL_HASWELL_ULT 0x45 +#define CPU_MODEL_CRYSTALWELL 0x46 #define DALES_BRIDGE 1 #define SANDY_BRIDGE 2 diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index f701306..ec76af1 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -24,6 +24,7 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(void) IOLog("IA32_MPERF.................(0xE7) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_MPERF)); IOLog("IA32_APERF.................(0xE8) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_APERF)); + IOLog("MSR_FLEX_RATIO.............(0x194) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_FLEX_RATIO)); IOLog("MSR_IA32_PERF_STATUS.......(0x198) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_IA32_PERF_STATUS)); IOLog("MSR_IA32_PERF_CONTROL......(0x199) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_IA32_PERF_CONTROL)); IOLog("IA32_CLOCK_MODULATION......(0x19A) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_CLOCK_MODULATION)); @@ -41,39 +42,40 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(void) IOLog("MSR_PKG_POWER_LIMIT........(0x610) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_POWER_LIMIT)); IOLog("MSR_PKG_ENERGY_STATUS......(0x611) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_ENERGY_STATUS)); + IOLog("MSR_PKGC3_IRTL.............(0x60a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC3_IRTL)); + IOLog("MSR_PKGC6_IRTL.............(0x60b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC6_IRTL)); + IOLog("MSR_PKGC7_IRTL.............(0x60c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC7_IRTL)); + IOLog("MSR_PP0_CURRENT_CONFIG.....(0x601) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_CURRENT_CONFIG)); IOLog("MSR_PP0_POWER_LIMIT........(0x638) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POWER_LIMIT)); IOLog("MSR_PP0_ENERGY_STATUS......(0x639) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_ENERGY_STATUS)); IOLog("MSR_PP0_POLICY.............(0x63a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POLICY)); - if ((gCPUModel == CPU_MODEL_SB_CORE) || (gCPUModel == CPU_MODEL_IB_CORE)) - { - IOLog("MSR_PP1_CURRENT_CONFIG.....(0x602) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_CURRENT_CONFIG)); - IOLog("MSR_PP1_POWER_LIMIT........(0x640) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POWER_LIMIT)); - IOLog("MSR_PP1_ENERGY_STATUS......(0x641) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_ENERGY_STATUS)); - IOLog("MSR_PP1_POLICY.............(0x642) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POLICY)); - } + /* IOLog("MSR_PP1_CURRENT_CONFIG.....(0x602) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_CURRENT_CONFIG)); + IOLog("MSR_PP1_POWER_LIMIT........(0x640) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POWER_LIMIT)); + IOLog("MSR_PP1_ENERGY_STATUS......(0x641) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_ENERGY_STATUS)); + IOLog("MSR_PP1_POLICY.............(0x642) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POLICY)); */ - if ((gCPUModel != CPU_MODEL_SB_CORE) && (gCPUModel != CPU_MODEL_SB_JAKETOWN)) - { - IOLog("MSR_CONFIG_TDP_NOMINAL.....(0x648) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_NOMINAL)); - IOLog("MSR_CONFIG_TDP_LEVEL1......(0x649) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL1)); - IOLog("MSR_CONFIG_TDP_LEVEL2......(0x64a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL2)); - IOLog("MSR_CONFIG_TDP_CONTROL.....(0x64b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_CONTROL)); - IOLog("MSR_TURBO_ACTIVATION_RATIO.(0x64c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_ACTIVATION_RATIO)); - } - - if ((gCPUModel == CPU_MODEL_SB_CORE) || (gCPUModel == CPU_MODEL_SB_JAKETOWN)) - { - IOLog("MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C2_RESIDENCY)); - } + IOLog("MSR_CONFIG_TDP_NOMINAL.....(0x648) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_NOMINAL)); + IOLog("MSR_CONFIG_TDP_LEVEL1......(0x649) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL1)); + IOLog("MSR_CONFIG_TDP_LEVEL2......(0x64a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL2)); + IOLog("MSR_CONFIG_TDP_CONTROL.....(0x64b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_CONTROL)); + IOLog("MSR_TURBO_ACTIVATION_RATIO.(0x64c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_ACTIVATION_RATIO)); + IOLog("MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C2_RESIDENCY)); IOLog("MSR_PKG_C3_RESIDENCY.......(0x3f8) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C3_RESIDENCY)); IOLog("MSR_PKG_C6_RESIDENCY.......(0x3f9) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C6_RESIDENCY)); - - if ((gCPUModel != CPU_MODEL_IB_CORE) && (gCPUModel != CPU_MODEL_IB_CORE_EX)) + IOLog("MSR_PKG_C7_RESIDENCY.......(0x3fa) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + + if (gCPUModel == CPU_MODEL_HASWELL_ULT) { - IOLog("MSR_PKG_C7_RESIDENCY.......(0x3fa) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("MSR_PKG_C8_RESIDENCY.......(0x630) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("MSR_PKG_C9_RESIDENCY.......(0x631) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("MSR_PKG_C10_RESIDENCY......(0x632) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + + IOLog("MSR_PKG_C8_LATENCY.........(0x633) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("MSR_PKG_C9_LATENCY.........(0x634) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("MSR_PKG_C10_LATENCY........(0x635) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); } } @@ -164,9 +166,9 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) if (igpuEnabled) { gTriggeredIGPUPStates = gIGPUMultipliers; - IOLog("] GPU P-States [ "); + IOLog("] iGPU P-States [ "); - for (currentBit = 17; currentBit <= 27; currentBit++) + for (currentBit = 1; currentBit <= 32; currentBit++) { value = (1ULL << currentBit); @@ -226,11 +228,19 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) UInt64 msr = rdmsr64(MSR_IA32_PERF_STS); gCoreMultipliers |= (1ULL << (msr >> 8)); + wrmsr64(IA32_ENERGY_PERF_BIAS, 15); + uint32_t cpuid_reg[4]; do_cpuid(0x00000001, cpuid_reg); gCPUModel = bitfield32(cpuid_reg[eax], 7, 4) + (bitfield32(cpuid_reg[eax], 19, 16) << 4); + // MWAIT information + do_cpuid(0x00000005, cpuid_reg); + uint32_t supportedMwaitCStates = bitfield32(cpuid_reg[edx], 31, 0); + + IOLog("AICPUPMI: MWAIT C-States : %d\n", supportedMwaitCStates); + #if REPORT_MSRS reportMSRs(); #endif @@ -269,10 +279,17 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) { igpuEnabled = true; // IGPU Enabled and Visible gMchbar = (UInt8 *)memoryMap->getVirtualAddress(); - - IOLog("AICPUPMI: IGPU Current Freq..: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x01])); - IOLog("AICPUPMI: IGPU Max Frequency.: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x51])); - IOLog("AICPUPMI: IGPU Max Turbo Freq: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x50])); + + // Current RP-state, when the graphics engine is in RC6, this reflects the last used ratio. + IOLog("AICPUPMI: IGPU Current Freq..: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x01])); // RP_STATE_RAT IO + // Maximum RPN base frequency capability for the Integrated GFX Engine (GT). + IOLog("AICPUPMI: IGPU Max Frequency.: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x52])); // RPN_CAP + // Maximum RP1 base frequency capability for the Integrated GFX Engine (GT). + IOLog("AICPUPMI: IGPU Max Frequency.: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x51])); // RP1_CAP + // Maximum RP0 base frequency capability for the Integrated GFX Engine (GT). + IOLog("AICPUPMI: IGPU Max Turbo Freq: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x50])); // RP0_CAP + // Maximum base frequency limit for the Integrated GFX Engine (GT) allowed during run-time. + IOLog("AICPUPMI: IGPU Maximum limit.: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x4C])); // RPSTT_LIM // // Example-1: 17 (multiplier) * 50 (frequency in MHz) = 850 MHz // Example-2: 22 (multiplier) * 50 (frequency in MHz) = 1100 MHz diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index d8ff442..32f873e 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -91,6 +91,11 @@ void initEFITree(void) // The use of sizeof() here is mandatory (to prevent breakage). DT__AddProperty(platformNode, "Model", sizeof(MODEL_NAME), (EFI_CHAR16*) MODEL_NAME); + + // Satisfying X86PlatformPlugin.kext + static EFI_UINT8 const STARTUP_POWER_EVENTS[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + DT__AddProperty(platformNode, "StartupPowerEvents", sizeof(STARTUP_POWER_EVENTS), (EFI_UINT8*) &STARTUP_POWER_EVENTS); + DT__AddProperty(platformNode, "SystemSerialNumber", sizeof(SYSTEM_SERIAL_NUMBER), (EFI_CHAR16*) SYSTEM_SERIAL_NUMBER); if (gPlatform.CPU.FSBFrequency) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 216997c..d982352 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -80,8 +80,8 @@ #define MACBOOK_PRO_92 (MACBOOK_PRO | (6 << 15)) #define MACBOOK_PRO_101 (MACBOOK_PRO | (7 << 15)) #define MACBOOK_PRO_102 (MACBOOK_PRO | (8 << 15)) -#define MACBOOK_PRO_112 (MACBOOK_PRO | (9 << 15)) -#define MACBOOK_PRO_111 MACBOOK_PRO // Defaults to MacBookPro11,1 +#define MACBOOK_PRO_111 (MACBOOK_PRO | (9 << 15)) +#define MACBOOK_PRO_112 MACBOOK_PRO // Defaults to MacBookPro11,2 #define MACMINI_41 (MACMINI | (1 << 15)) #define MACMINI_51 (MACMINI | (2 << 15)) diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index de02604..991c529 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -222,8 +222,8 @@ void setupSMBIOS(void) newEPS->anchor[3] = 0x5f; // _ newEPS->checksum = 0; // Updated at the end of this run. newEPS->entryPointLength = 0x1f; // sizeof(* newEPS) - newEPS->majorVersion = 2; // SMBIOS version 2.4 - newEPS->minorVersion = 4; + newEPS->majorVersion = 2; // SMBIOS version 2.7 + newEPS->minorVersion = 7; newEPS->maxStructureSize = factoryEPS->maxStructureSize; // Optionally checked and updated later on. newEPS->entryPointRevision = 0; @@ -242,7 +242,7 @@ void setupSMBIOS(void) newEPS->dmi.tableLength = 0; // Updated at the end of this run. newEPS->dmi.tableAddress = (uint32_t) (kernelMemory + sizeof(struct SMBEntryPoint)); newEPS->dmi.structureCount = 0; // Updated during this run. - newEPS->dmi.bcdRevision = 0x24; // SMBIOS version 2.4 + newEPS->dmi.bcdRevision = 0x27; // SMBIOS version 2.7 char * stringsPtr = NULL; char * newtablesPtr = (char *)newEPS->dmi.tableAddress; diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 7673c84..3b5c4d5 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -54,11 +54,26 @@ #define SMB_PRODUCT_NAME "iMac13,1" #define SMB_BOARD_PRODUCT "Mac-00BE6ED71E35EB86" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '1' } - #else // Defaults to iMac13,2 + #elif (TARGET_MODEL == IMAC_132) #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" #define SMB_PRODUCT_NAME "iMac13,2" #define SMB_BOARD_PRODUCT "Mac-FC02E91DDD3FA6A4" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '2' } + #elif (TARGET_MODEL == IMAC_141) + #define SMB_BIOS_VERSION "IM141.88Z.0118.B00.1309031248" + #define SMB_PRODUCT_NAME "iMac14,1" + #define SMB_BOARD_PRODUCT "Mac-031B6874CF7F642A" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '1' } + #elif (TARGET_MODEL == IMAC_141) + #define SMB_BIOS_VERSION "IM141.88Z.0118.B00.1309031249" + #define SMB_PRODUCT_NAME "iMac14,2" + #define SMB_BOARD_PRODUCT "Mac-27ADBB7B4CEE8E61" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '2' } + #else // Defaults to iMac 14,3 + #define SMB_BIOS_VERSION "IM143.88Z.0118.B00.1309031249" + #define SMB_PRODUCT_NAME "iMac14,3" + #define SMB_BOARD_PRODUCT "Mac-77EB7D7DAF985301" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '3' } #endif // ------------------------------------------------------------------------------------- #endif @@ -97,14 +112,14 @@ #elif (TARGET_MODEL == MACBOOK_AIR_61) // Intel Core i5-4250U @ 1.30 GHz (2 cores - 4 threads) // Intel Core i7-4650U @ 1.70 GHz (2 cores - 4 threads) - #define SMB_BIOS_VERSION "MBA61.88Z.0099.B00.1305241529" + #define SMB_BIOS_VERSION "MBA61.88Z.0099.B04.1309271229" #define SMB_PRODUCT_NAME "MacBookAir6,1" #define SMB_BOARD_PRODUCT "Mac-35C1E88140C3E6CF" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '6', ',', '1' } #else // Defaults to MacBookAir6,2 // Intel Core i5-4250U @ 1.30 GHz (2 cores - 4 threads) // Intel Core i7-4650U @ 1.70 GHz (2 cores - 4 threads) - #define SMB_BIOS_VERSION "MBA61.88Z.0099.B00.1305241529" + #define SMB_BIOS_VERSION "MBA61.88Z.0099.B04.1309271229" #define SMB_PRODUCT_NAME "MacBookAir6,2" #define SMB_BOARD_PRODUCT "Mac-7DF21CB3ED6977E5" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '6', ',', '2' } @@ -164,17 +179,25 @@ #define SMB_PRODUCT_NAME "MacBookPro10,2" #define SMB_BOARD_PRODUCT "Mac-AFD8A9D944EA4843" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '0', ',', '2' } - #else // Defaults to MacBookPro11,1 + #elif (TARGET_MODEL == MACBOOK_PRO_111) // Intel Core i5-4258U @ 2.90 GHz - 2 cores / 4 threads. - #define SMB_BIOS_VERSION "MBP111.88Z.0098.B00.1306051054" + #define SMB_BIOS_VERSION "MBP111.88Z.0138.B03.1310291227" #define SMB_PRODUCT_NAME "MacBookPro11,1" #define SMB_BOARD_PRODUCT "Mac-189A3D4F975D5FFC" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '1', ',', '1' } + #else // Defaults to MacBookPro11,2 (with NVIDIA graphics) + // Intel Core i5-4258U @ 2.90 GHz - 2 cores / 4 threads. + #define SMB_BIOS_VERSION "MBP112.88Z.0138.B03.1310291227" + #define SMB_PRODUCT_NAME "MacBookPro11,2" + #define SMB_BOARD_PRODUCT "Mac-3CBD00234E554E41" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '1', ',', '2' } #endif // ------------------------------------------------------------------------------------- #endif + + #if TARGET_MODEL & MACMINI // 16 // ------------------------------------------------------------------------------------- #define SMB_FAMILY "Macmini" @@ -205,13 +228,13 @@ #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '5', ',', '3' } #elif (TARGET_MODEL == MACMINI_61) // Intel Core i5-3210M @ 2.50 GH (2 cores - 4 theeads) - #define SMB_BIOS_VERSION "MM61.88Z.0106.B00.1208091121" + #define SMB_BIOS_VERSION "MM61.88Z.0106.B03.1211161202" #define SMB_PRODUCT_NAME "Macmini6,1" #define SMB_BOARD_PRODUCT "Mac-031AEE4D24BFF0B1" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '1' } #elif (TARGET_MODEL == MACMINI_62) // Defaults to Macmini6,2 // Intel Core i7-3615QM @ 2.30 GHz (4 cores - 8 threads) - #define SMB_BIOS_VERSION "MM61.88Z.0106.B00.1208091121" + #define SMB_BIOS_VERSION "MM61.88Z.0106.B03.1211161202" #define SMB_PRODUCT_NAME "Macmini6,2" #define SMB_BOARD_PRODUCT "Mac-F65AE981FFA204ED" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '2' } @@ -245,10 +268,10 @@ #define SMB_BOARD_PRODUCT "Mac-F221BEC8" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '5', ',', '1' } #else // Defaults to MacPro6,1 - #define SMB_BIOS_VERSION "MP61.88Z.0099.B00.1306121724" // TODO: Verify this! + #define SMB_BIOS_VERSION "MP61.88Z.0116.B04.1312061508" #define SMB_PRODUCT_NAME "MacPro6,1" #define SMB_BOARD_PRODUCT "Mac-F60DEB81FF30ACF6" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '6', ',', '1' } #endif // ------------------------------------------------------------------------------------- -#endif +#endif \ No newline at end of file From 4e26eef310ec998d7f15f459f8eceba658867f0d Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 30 Dec 2013 11:21:23 +0100 Subject: [PATCH 421/623] Updating script to v7.0 (from Vector One) --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 2801 +++++++++++++------------- 1 file changed, 1390 insertions(+), 1411 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index ec3069e..61af213 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -2,7 +2,7 @@ # # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # -# Version 0.9 - Copyright (c) 2012 by RevoGirl <RevoGirl@rocketmail.com> +# Version 0.9 - Copyright (c) 2012 by † RevoGirl # Version 7.0 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: @@ -77,14 +77,14 @@ # - board-id's for new iMac14,[1/2/3] added (Pike, October 2013) # - board-id's for new MacBookPro11,[1/2/3] added (Pike, October 2013) # - Cleanups and board-id for new MacPro6,1 added (Pike, October 2013) -# – Frequency error in i7-4700MQ data fixed, thanks to RehabMan (Pike, November 2013) +# - Frequency error in i7-4700MQ data fixed, thanks to RehabMan (Pike, November 2013) # - Intel i5-4200M added (Pike, December 2013) # - LFM fixed in the Intel i7-3930K data (Pike, December 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). # - Thanks to 'stinga11' for Sandy Bridge (E5) data and processor list errors. -# - Many thanks to Jeroen for the CPU data, cleanups, renaming stuff and other improvements. +# - Many thanks to Jeroen († 2013) for the CPU data, cleanups, renaming stuff and other improvements. # - Thanks to 'philip_petev' for his help with Snow Leopard/egrep incompatibility. # - Thanks to 'RehabMan' for his help with Snow Leopard/egrep incompatibility. # - Thanks to 'BigDonkey' for his help with LFM (800 MHz) for Sandy Bridge mobility models. @@ -533,7 +533,8 @@ i7-4930MX,57,800,3000,3900,4,8 i7-4900MQ,47,800,2800,3800,4,8 i7-4800MQ,47,800,2700,3700,4,8 i7-4702MQ,37,800,2200,3200,4,8 -i7-4700MQ,47,800,2400,3600,4,8 +i7-4700MQ,47,800,2400,3400,4,8 +i5-4200M,37,800,2500,3100,2,4 # Socket FCBGA1364 i7-4700HQ,47,800,2400,3600,4,8 i7-4702HQ,37,800,2200,3200,4,8 @@ -556,142 +557,142 @@ i3-4010Y,12,800,1300,1300,2,4 function _printHeader() { - echo '/*' > $gSsdtPR - echo ' * Intel ACPI Component Architecture' >> $gSsdtPR - echo ' * AML Disassembler version 20130210-00 [Feb 10 2013]' >> $gSsdtPR - echo ' * Copyright (c) 2000 - 2013 Intel Corporation' >> $gSsdtPR - echo ' * ' >> $gSsdtPR - echo ' * Original Table Header:' >> $gSsdtPR - echo ' * Signature "SSDT"' >> $gSsdtPR - echo ' * Length 0x0000036A (874)' >> $gSsdtPR - echo ' * Revision 0x01' >> $gSsdtPR - echo ' * Checksum 0x00' >> $gSsdtPR - echo ' * OEM ID "APPLE "' >> $gSsdtPR - echo ' * OEM Table ID "CpuPm"' >> $gSsdtPR - printf ' * OEM Revision '$gRevision' (%d)\n' $gRevision >> $gSsdtPR - echo ' * Compiler ID "INTL"' >> $gSsdtPR - echo ' * Compiler Version 0x20130210 (538116624)' >> $gSsdtPR - echo ' */' >> $gSsdtPR - echo '' >> $gSsdtPR - echo 'DefinitionBlock ("'$gSsdtID'.aml", "SSDT", 1, "APPLE ", "CpuPm", '$gRevision')' >> $gSsdtPR - echo '{' >> $gSsdtPR +echo '/*' > $gSsdtPR +echo ' * Intel ACPI Component Architecture' >> $gSsdtPR +echo ' * AML Disassembler version 20130210-00 [Feb 10 2013]' >> $gSsdtPR +echo ' * Copyright (c) 2000 - 2013 Intel Corporation' >> $gSsdtPR +echo ' * ' >> $gSsdtPR +echo ' * Original Table Header:' >> $gSsdtPR +echo ' * Signature "SSDT"' >> $gSsdtPR +echo ' * Length 0x0000036A (874)' >> $gSsdtPR +echo ' * Revision 0x01' >> $gSsdtPR +echo ' * Checksum 0x00' >> $gSsdtPR +echo ' * OEM ID "APPLE "' >> $gSsdtPR +echo ' * OEM Table ID "CpuPm"' >> $gSsdtPR +printf ' * OEM Revision '$gRevision' (%d)\n' $gRevision >> $gSsdtPR +echo ' * Compiler ID "INTL"' >> $gSsdtPR +echo ' * Compiler Version 0x20130210 (538116624)' >> $gSsdtPR +echo ' */' >> $gSsdtPR +echo '' >> $gSsdtPR +echo 'DefinitionBlock ("'$gSsdtID'.aml", "SSDT", 1, "APPLE ", "CpuPm", '$gRevision')' >> $gSsdtPR +echo '{' >> $gSsdtPR } #-------------------------------------------------------------------------------- function _printExternals() { - let currentCPU=0; +let currentCPU=0; - while [ $currentCPU -lt $gLogicalCPUs ]; do - echo ' External ('${gScope}'.'${gProcessorNames[$currentCPU]}', DeviceObj)' >> $gSsdtPR - let currentCPU+=1 - done +while [ $currentCPU -lt $gLogicalCPUs ]; do +echo ' External ('${gScope}'.'${gProcessorNames[$currentCPU]}', DeviceObj)' >> $gSsdtPR +let currentCPU+=1 +done - echo '' >> $gSsdtPR +echo '' >> $gSsdtPR } #-------------------------------------------------------------------------------- function _printDebugInfo() { - if ((gDebug)); then - echo ' Store ("ssdtPRGen version: '$gScriptVersion'", Debug)' >> $gSsdtPR - echo ' Store ("baseFrequency : '$gBaseFrequency'", Debug)' >> $gSsdtPR - echo ' Store ("frequency : '$frequency'", Debug)' >> $gSsdtPR - echo ' Store ("busFrequency : '$gBusFrequency'", Debug)' >> $gSsdtPR - echo ' Store ("logicalCPUs : '$gLogicalCPUs'", Debug)' >> $gSsdtPR - echo ' Store ("tdp : '$gTdp'", Debug)' >> $gSsdtPR - echo ' Store ("packageLength : '$packageLength'", Debug)' >> $gSsdtPR - echo ' Store ("turboStates : '$turboStates'", Debug)' >> $gSsdtPR - echo ' Store ("maxTurboFrequency: '$maxTurboFrequency'", Debug)' >> $gSsdtPR - echo '' >> $gSsdtPR - fi +if ((gDebug)); then +echo ' Store ("ssdtPRGen version: '$gScriptVersion'", Debug)' >> $gSsdtPR +echo ' Store ("baseFrequency : '$gBaseFrequency'", Debug)' >> $gSsdtPR +echo ' Store ("frequency : '$frequency'", Debug)' >> $gSsdtPR +echo ' Store ("busFrequency : '$gBusFrequency'", Debug)' >> $gSsdtPR +echo ' Store ("logicalCPUs : '$gLogicalCPUs'", Debug)' >> $gSsdtPR +echo ' Store ("tdp : '$gTdp'", Debug)' >> $gSsdtPR +echo ' Store ("packageLength : '$packageLength'", Debug)' >> $gSsdtPR +echo ' Store ("turboStates : '$turboStates'", Debug)' >> $gSsdtPR +echo ' Store ("maxTurboFrequency: '$maxTurboFrequency'", Debug)' >> $gSsdtPR +echo '' >> $gSsdtPR +fi } #-------------------------------------------------------------------------------- function _printProcessorDefinitions() { - let currentCPU=0; +let currentCPU=0; - while [ $currentCPU -lt $1 ]; do - echo ' External ('${gScope}'.'${gProcessorNames[$currentCPU]}', DeviceObj)' >> $gSsdtPR - let currentCPU+=1 - done +while [ $currentCPU -lt $1 ]; do +echo ' External ('${gScope}'.'${gProcessorNames[$currentCPU]}', DeviceObj)' >> $gSsdtPR +let currentCPU+=1 +done - echo '' >> $gSsdtPR +echo '' >> $gSsdtPR } #-------------------------------------------------------------------------------- function _printScopeStart() { - let turboStates=$1 - let packageLength=$2 - - # TODO: Remove this when CPUPM for IB works properly! - let useWorkArounds=0 - - echo ' Scope ('${gScope}'.'${gProcessorNames[0]}')' >> $gSsdtPR - echo ' {' >> $gSsdtPR - - # - # Do we need to create additional (Low Frequency) P-States? - # - - if [ $gBridgeType -ne $SANDY_BRIDGE ]; - then - let lowFrequencyPStates=($gBaseFrequency/100)-8 - let packageLength=($2+$lowFrequencyPStates) - - printf " Name (APLF, 0x%02x" $lowFrequencyPStates >> $gSsdtPR - echo ')' >> $gSsdtPR - - # TODO: Remove this when CPUPM for IB works properly! - if [[ gIvyWorkAround && $gBridgeType -eq $IVY_BRIDGE ]]; then - let useWorkArounds=1 - fi - fi - - # - # Check number of Turbo states (for IASL optimization). - # - - if [ $turboStates -eq 0 ]; - then - # TODO: Remove this when CPUPM for IB works properly! - if (($useWorkArounds)); - then - echo ' Name (APSN, One)' >> $gSsdtPR - else - echo ' Name (APSN, Zero)' >> $gSsdtPR - fi - else - # TODO: Remove this when CPUPM for IB works properly! - if ((useWorkArounds)); then - let turboStates+=1 - fi - - printf " Name (APSN, 0x%02X)\n" $turboStates >> $gSsdtPR - fi - - # TODO: Remove this when CPUPM for IB works properly! - if (($useWorkArounds)); then - let packageLength+=1 - fi - - printf " Name (APSS, Package (0x%02X)\n" $packageLength >> $gSsdtPR - echo ' {' >> $gSsdtPR - - # TODO: Remove this when CPUPM for IB works properly! - if (($useWorkArounds)); then - let extraF=($maxTurboFrequency+1) - let maxTDP=($gTdp*1000) - let extraR=($maxTurboFrequency/100)+1 - echo " /* Workaround for the Ivy Bridge PM 'bug' */" >> $gSsdtPR - printf " Package (0x06) { 0x%04X, 0x%06X, 0x0A, 0x0A, 0x%02X00, 0x%02X00 },\n" $extraF $maxTDP $extraR $extraR >> $gSsdtPR - fi +let turboStates=$1 +let packageLength=$2 + +# TODO: Remove this when CPUPM for IB works properly! +let useWorkArounds=0 + +echo ' Scope ('${gScope}'.'${gProcessorNames[0]}')' >> $gSsdtPR +echo ' {' >> $gSsdtPR + +# +# Do we need to create additional (Low Frequency) P-States? +# + +if [ $gBridgeType -eq $IVY_BRIDGE ]; +then +let lowFrequencyPStates=($gBaseFrequency/100)-8 +let packageLength=($2+$lowFrequencyPStates) + +printf " Name (APLF, 0x%02x" $lowFrequencyPStates >> $gSsdtPR +echo ')' >> $gSsdtPR + +# TODO: Remove this when CPUPM for IB works properly! +if ((gIvyWorkAround)); then +let useWorkArounds=1 +fi +fi + +# +# Check number of Turbo states (for IASL optimization). +# + +if [ $turboStates -eq 0 ]; +then +# TODO: Remove this when CPUPM for IB works properly! +if (($useWorkArounds)); +then +echo ' Name (APSN, One)' >> $gSsdtPR +else +echo ' Name (APSN, Zero)' >> $gSsdtPR +fi +else +# TODO: Remove this when CPUPM for IB works properly! +if ((useWorkArounds)); then +let turboStates+=1 +fi + +printf " Name (APSN, 0x%02X)\n" $turboStates >> $gSsdtPR +fi + +# TODO: Remove this when CPUPM for IB works properly! +if (($useWorkArounds)); then +let packageLength+=1 +fi + +printf " Name (APSS, Package (0x%02X)\n" $packageLength >> $gSsdtPR +echo ' {' >> $gSsdtPR + +# TODO: Remove this when CPUPM for IB works properly! +if (($useWorkArounds)); then +let extraF=($maxTurboFrequency+1) +let maxTDP=($gTdp*1000) +let extraR=($maxTurboFrequency/100)+1 +echo " /* Workaround for the Ivy Bridge PM 'bug' */" >> $gSsdtPR +printf " Package (0x06) { 0x%04X, 0x%06X, 0x0A, 0x0A, 0x%02X00, 0x%02X00 },\n" $extraF $maxTDP $extraR $extraR >> $gSsdtPR +fi } @@ -699,71 +700,71 @@ function _printScopeStart() function _printPackages() { - let maxTDP=($1*1000) - local maxNonTurboFrequency=$2 - local frequency=$3 - - let minRatio=($gBaseFrequency/$gBusFrequency) - let p1Ratio=($maxNonTurboFrequency/$gBusFrequency) - let ratio=($frequency/$gBusFrequency) - let powerRatio=($p1Ratio-1) - - # - # Do we need to create additional (Low Frequency) P-States for Ivy bridge? - # - if [ $gBridgeType -eq $IVY_BRIDGE ]; then - let minRatio=8 - fi - - if (($turboStates)); then - echo ' /* High Frequency Modes (turbo) */' >> $gSsdtPR - fi - - while [ $ratio -ge $minRatio ]; - do - if [ $frequency -eq $gBaseFrequency ]; - then - echo ' /* Low Frequency Mode */' >> $gSsdtPR - fi - - if [ $frequency -eq $maxNonTurboFrequency ]; - then - echo ' /* High Frequency Modes (non-turbo) */' >> $gSsdtPR - fi - - printf " Package (0x06) { 0x%04X, " $frequency >> $gSsdtPR - - if [ $frequency -lt $maxNonTurboFrequency ]; - then - power=$(echo "scale=6;m=((1.1-(($p1Ratio-$powerRatio)*0.00625))/1.1);(($powerRatio/$p1Ratio)*(m*m)*$maxTDP);" | bc | sed -e 's/.[0-9A-F]*$//') - let powerRatio-=1 - else - power=$maxTDP - fi - - if [ $frequency -ge $gBaseFrequency ]; - then - printf "0x%06X, " $power >> $gSsdtPR - else - printf ' Zero, ' >> $gSsdtPR - fi - - printf "0x0A, 0x0A, 0x%02X00, 0x%02X00 }" $ratio $ratio >> $gSsdtPR - - let ratio-=1 - let frequency-=$gBusFrequency - - if [ $ratio -ge $minRatio ]; - then - echo ',' >> $gSsdtPR - else - echo '' >> $gSsdtPR - fi - - done - - echo ' })' >> $gSsdtPR - echo '' >> $gSsdtPR +let maxTDP=($1*1000) +local maxNonTurboFrequency=$2 +local frequency=$3 + +let minRatio=($gBaseFrequency/$gBusFrequency) +let p1Ratio=($maxNonTurboFrequency/$gBusFrequency) +let ratio=($frequency/$gBusFrequency) +let powerRatio=($p1Ratio-1) + +# +# Do we need to create additional (Low Frequency) P-States for Ivy bridge? +# +if [ $gBridgeType -eq $IVY_BRIDGE ]; then +let minRatio=8 +fi + +if (($turboStates)); then +echo ' /* High Frequency Modes (turbo) */' >> $gSsdtPR +fi + +while [ $ratio -ge $minRatio ]; +do +if [ $frequency -eq $gBaseFrequency ]; +then +echo ' /* Low Frequency Mode */' >> $gSsdtPR +fi + +if [ $frequency -eq $maxNonTurboFrequency ]; +then +echo ' /* High Frequency Modes (non-turbo) */' >> $gSsdtPR +fi + +printf " Package (0x06) { 0x%04X, " $frequency >> $gSsdtPR + +if [ $frequency -lt $maxNonTurboFrequency ]; +then +power=$(echo "scale=6;m=((1.1-(($p1Ratio-$powerRatio)*0.00625))/1.1);(($powerRatio/$p1Ratio)*(m*m)*$maxTDP);" | bc | sed -e 's/.[0-9A-F]*$//') +let powerRatio-=1 +else +power=$maxTDP +fi + +if [ $frequency -ge $gBaseFrequency ]; +then +printf "0x%06X, " $power >> $gSsdtPR +else +printf ' Zero, ' >> $gSsdtPR +fi + +printf "0x0A, 0x0A, 0x%02X00, 0x%02X00 }" $ratio $ratio >> $gSsdtPR + +let ratio-=1 +let frequency-=$gBusFrequency + +if [ $ratio -ge $minRatio ]; +then +echo ',' >> $gSsdtPR +else +echo '' >> $gSsdtPR +fi + +done + +echo ' })' >> $gSsdtPR +echo '' >> $gSsdtPR } @@ -771,30 +772,30 @@ function _printPackages() function _printMethodDSM() { - # - # New stand-alone version of Method _DSM - Copyright (c) 2009 by Master Chief - # - echo '' >> $gSsdtPR - echo ' Method (_DSM, 4, NotSerialized)' >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' If (LEqual (Arg2, Zero))' >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' Return (Buffer (One)' >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' 0x03' >> $gSsdtPR - echo ' })' >> $gSsdtPR - echo ' }' >> $gSsdtPR - echo '' >> $gSsdtPR - # - # This property is required to get X86Platform[Plugin/Shim].kext loaded. - # - echo ' Return (Package (0x02)' >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' "plugin-type",' >> $gSsdtPR - echo ' One' >> $gSsdtPR - echo ' })' >> $gSsdtPR - echo ' }' >> $gSsdtPR - echo ' }' >> $gSsdtPR +# +# New stand-alone version of Method _DSM - Copyright (c) 2009 by Master Chief +# +echo '' >> $gSsdtPR +echo ' Method (_DSM, 4, NotSerialized)' >> $gSsdtPR +echo ' {' >> $gSsdtPR +echo ' If (LEqual (Arg2, Zero))' >> $gSsdtPR +echo ' {' >> $gSsdtPR +echo ' Return (Buffer (One)' >> $gSsdtPR +echo ' {' >> $gSsdtPR +echo ' 0x03' >> $gSsdtPR +echo ' })' >> $gSsdtPR +echo ' }' >> $gSsdtPR +echo '' >> $gSsdtPR +# +# This property is required to get X86Platform[Plugin/Shim].kext loaded. +# +echo ' Return (Package (0x02)' >> $gSsdtPR +echo ' {' >> $gSsdtPR +echo ' "plugin-type",' >> $gSsdtPR +echo ' One' >> $gSsdtPR +echo ' })' >> $gSsdtPR +echo ' }' >> $gSsdtPR +echo ' }' >> $gSsdtPR } #-------------------------------------------------------------------------------- @@ -813,231 +814,223 @@ function _printScopeACST() # # Note: C-state latency in uS and C-state power in mW. - let C1=0 - let C2=0 - let C3=0 - let C6=0 - let C7=0 - local pkgLength=2 - local numberOfCStates=0 +let C1=0 +let C2=0 +let C3=0 +let C6=0 +let C7=0 +local pkgLength=2 +local numberOfCStates=0 # echo '' >> $gSsdtPR - echo ' Method (ACST, 0, NotSerialized)' >> $gSsdtPR - echo ' {' >> $gSsdtPR - - # - # Are we injecting C-States for CPU1? - # - if [ $1 -eq 1 ]; - then - echo "1: $1" - # Yes (also used by CPU2, CPU3 and greater). - let targetCStates=$gACST_CPU1 - latency_C1=0x03E8 - latency_C2=0x94 - latency_C3=0xC6 - - if ((gDebug)); then - echo ' Store ("'${gProcessorNames[1]}' C-States : '$targetCStates'", Debug)' >> $gSsdtPR - echo '' >> $gSsdtPR - fi - else - # - # C-States override for Mobile processors (CPU0 only) - # - if (($gTypeCPU == $gMobileCPU)); then - echo 'Adjusting C-States for detected (mobile) processor' - let gACST_CPU0=29 - fi - echo "gACST_CPU0: $gACST_CPU0" - let targetCStates=253 # $gACST_CPU0 - latency_C1=Zero - latency_C3=0xCD - latency_C6=0xF5 - latency_C7=0xF5 - - if ((gDebug)); then - echo ' Store ("'${gProcessorNames[0]}' C-States : '$targetCStates'", Debug)' >> $gSsdtPR - echo '' >> $gSsdtPR - fi - fi - - echo "targetCStates: $targetCStates" - - # - # Checks to determine which C-State(s) we should inject. - # - if (($targetCStates & 1)); then - echo "Adding C1" - let C1=1 - let numberOfCStates+=1 - let pkgLength+=1 - fi - - if (($targetCStates & 2)); then - echo "Adding C2" - let C2=1 - let numberOfCStates+=1 - let pkgLength+=1 - fi - - if (($targetCStates & 4)); then - echo "Adding C3" - let C3=1 - let numberOfCStates+=1 - let pkgLength+=1 - fi - - if (($targetCStates & 8)); then - echo "Adding C6" - let C6=1 - let numberOfCStates+=1 - let pkgLength+=1 - fi - - if ((($targetCStates & 16) == 16)); then - echo "Adding C7" - let C7=1 - let numberOfCStates+=1 - let pkgLength+=1 - fi - - let hintCode=0x00 - - echo " /* Low Power Modes for ${gProcessorNames[$1]} */" >> $gSsdtPR - printf " Return (Package (0x%02x)\n" $pkgLength >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' One,' >> $gSsdtPR - printf " 0x%02x,\n" $numberOfCStates >> $gSsdtPR - echo ' Package (0x04)' >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' ResourceTemplate ()' >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' Register (FFixedHW,' >> $gSsdtPR - echo ' 0x01, // Bit Width' >> $gSsdtPR - echo ' 0x02, // Bit Offset' >> $gSsdtPR - printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR - echo ' 0x01, // Access Size' >> $gSsdtPR - echo ' )' >> $gSsdtPR - echo ' },' >> $gSsdtPR - echo ' One,' >> $gSsdtPR - echo ' '$latency_C1',' >> $gSsdtPR - echo ' 0x03E8' >> $gSsdtPR - - if (($C2)); then - let hintCode+=0x10 - echo ' },' >> $gSsdtPR - echo '' >> $gSsdtPR - echo ' Package (0x04)' >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' ResourceTemplate ()' >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' Register (FFixedHW,' >> $gSsdtPR - echo ' 0x01, // Bit Width' >> $gSsdtPR - echo ' 0x02, // Bit Offset' >> $gSsdtPR - printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR - echo ' 0x03, // Access Size' >> $gSsdtPR - echo ' )' >> $gSsdtPR - echo ' },' >> $gSsdtPR - echo ' 0x02,' >> $gSsdtPR - echo ' '$latency_C2',' >> $gSsdtPR - echo ' 0x01F4' >> $gSsdtPR - fi - - if (($C3)); then - let hintCode+=0x10 - local power_C3=0x01F4 - # - # Is this for CPU1? - # - if (($1)); then - if [[ ${modelID:0:7} == "iMac13," ]]; - then - local power_C3=0x15E - latency_C3=0xA9 - else - local power_C3=0xC8 - let hintCode+=0x10 - fi - fi - - echo ' },' >> $gSsdtPR - echo '' >> $gSsdtPR - echo ' Package (0x04)' >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' ResourceTemplate ()' >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' Register (FFixedHW,' >> $gSsdtPR - echo ' 0x01, // Bit Width' >> $gSsdtPR - echo ' 0x02, // Bit Offset' >> $gSsdtPR - printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR - echo ' 0x03, // Access Size' >> $gSsdtPR - echo ' )' >> $gSsdtPR - echo ' },' >> $gSsdtPR - echo ' 0x03,' >> $gSsdtPR - echo ' '$latency_C3',' >> $gSsdtPR - echo ' '$power_C3 >> $gSsdtPR - fi - - if (($C6)); then - let hintCode+=0x10 - echo ' },' >> $gSsdtPR - echo '' >> $gSsdtPR - echo ' Package (0x04)' >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' ResourceTemplate ()' >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' Register (FFixedHW,' >> $gSsdtPR - echo ' 0x01, // Bit Width' >> $gSsdtPR - echo ' 0x02, // Bit Offset' >> $gSsdtPR - printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR - echo ' 0x03, // Access Size' >> $gSsdtPR - echo ' )' >> $gSsdtPR - echo ' },' >> $gSsdtPR - echo ' 0x06,' >> $gSsdtPR - echo ' '$latency_C6',' >> $gSsdtPR - echo ' 0x015E' >> $gSsdtPR - fi - - if (($C7)); then - # - # If $hintCode is already 0x30 then use 0x31 otherwise 0x30 - # - if [ $hintCode -eq 48 ]; - then - let hintCode+=0x01 - else - let hintCode+=0x10 - fi - echo ' },' >> $gSsdtPR - echo '' >> $gSsdtPR - echo ' Package (0x04)' >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' ResourceTemplate ()' >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' Register (FFixedHW,' >> $gSsdtPR - echo ' 0x01, // Bit Width' >> $gSsdtPR - echo ' 0x02, // Bit Offset' >> $gSsdtPR - printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR - echo ' 0x03, // Access Size' >> $gSsdtPR - echo ' )' >> $gSsdtPR - echo ' },' >> $gSsdtPR - echo ' 0x07,' >> $gSsdtPR - echo ' '$latency_C7',' >> $gSsdtPR - echo ' 0xC8' >> $gSsdtPR - fi - - echo ' }' >> $gSsdtPR - echo ' })' >> $gSsdtPR - echo ' }' >> $gSsdtPR - - # - # We don't need a closing bracket here when we add method _DSM for Ivy Bridge. - # - - if [ $gBridgeType -eq $SANDY_BRIDGE ]; then - echo ' }' >> $gSsdtPR - fi +echo ' Method (ACST, 0, NotSerialized)' >> $gSsdtPR +echo ' {' >> $gSsdtPR + +# +# Are we injecting C-States for CPU1? +# +if [ $1 -eq 1 ]; +then +# Yes (also used by CPU2, CPU3 and greater). +let targetCStates=$gACST_CPU1 +latency_C1=0x03E8 +latency_C2=0x94 +latency_C3=0xC6 + +if ((gDebug)); then +echo ' Store ("'${gProcessorNames[1]}' C-States : '$targetCStates'", Debug)' >> $gSsdtPR +echo '' >> $gSsdtPR +fi +else +# +# C-States override for Mobile processors (CPU0 only) +# +if (($gTypeCPU == $gMobileCPU)); then +echo 'Adjusting C-States for detected (mobile) processor' +gACST_CPU0=29 +fi + +let targetCStates=$gACST_CPU0 +latency_C1=Zero +latency_C3=0xCD +latency_C6=0xF5 +latency_C7=0xF5 + +if ((gDebug)); then +echo ' Store ("'${gProcessorNames[0]}' C-States : '$targetCStates'", Debug)' >> $gSsdtPR +echo '' >> $gSsdtPR +fi +fi + +# +# Checks to determine which C-State(s) we should inject. +# +if (($targetCStates & 1)); then +let C1=1 +let numberOfCStates+=1 +let pkgLength+=1 +fi + +if (($targetCStates & 2)); then +let C2=1 +let numberOfCStates+=1 +let pkgLength+=1 +fi + +if (($targetCStates & 4)); then +let C3=1 +let numberOfCStates+=1 +let pkgLength+=1 +fi + +if (($targetCStates & 8)); then +let C6=1 +let numberOfCStates+=1 +let pkgLength+=1 +fi + +if (($targetCStates & 16)); then +let C7=1 +let numberOfCStates+=1 +let pkgLength+=1 +fi + +let hintCode=0x00 + +echo " /* Low Power Modes for ${gProcessorNames[$1]} */" >> $gSsdtPR +printf " Return (Package (0x%02x)\n" $pkgLength >> $gSsdtPR +echo ' {' >> $gSsdtPR +echo ' One,' >> $gSsdtPR +printf " 0x%02x,\n" $numberOfCStates >> $gSsdtPR +echo ' Package (0x04)' >> $gSsdtPR +echo ' {' >> $gSsdtPR +echo ' ResourceTemplate ()' >> $gSsdtPR +echo ' {' >> $gSsdtPR +echo ' Register (FFixedHW,' >> $gSsdtPR +echo ' 0x01, // Bit Width' >> $gSsdtPR +echo ' 0x02, // Bit Offset' >> $gSsdtPR +printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR +echo ' 0x01, // Access Size' >> $gSsdtPR +echo ' )' >> $gSsdtPR +echo ' },' >> $gSsdtPR +echo ' One,' >> $gSsdtPR +echo ' '$latency_C1',' >> $gSsdtPR +echo ' 0x03E8' >> $gSsdtPR + +if (($C2)); then +let hintCode+=0x10 +echo ' },' >> $gSsdtPR +echo '' >> $gSsdtPR +echo ' Package (0x04)' >> $gSsdtPR +echo ' {' >> $gSsdtPR +echo ' ResourceTemplate ()' >> $gSsdtPR +echo ' {' >> $gSsdtPR +echo ' Register (FFixedHW,' >> $gSsdtPR +echo ' 0x01, // Bit Width' >> $gSsdtPR +echo ' 0x02, // Bit Offset' >> $gSsdtPR +printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR +echo ' 0x03, // Access Size' >> $gSsdtPR +echo ' )' >> $gSsdtPR +echo ' },' >> $gSsdtPR +echo ' 0x02,' >> $gSsdtPR +echo ' '$latency_C2',' >> $gSsdtPR +echo ' 0x01F4' >> $gSsdtPR +fi + +if (($C3)); then +let hintCode+=0x10 +local power_C3=0x01F4 +# +# Is this for CPU1? +# +if (($1)); then +if [[ ${modelID:0:7} == "iMac13," ]]; +then +local power_C3=0x15E +latency_C3=0xA9 +else +local power_C3=0xC8 +let hintCode+=0x10 +fi +fi + +echo ' },' >> $gSsdtPR +echo '' >> $gSsdtPR +echo ' Package (0x04)' >> $gSsdtPR +echo ' {' >> $gSsdtPR +echo ' ResourceTemplate ()' >> $gSsdtPR +echo ' {' >> $gSsdtPR +echo ' Register (FFixedHW,' >> $gSsdtPR +echo ' 0x01, // Bit Width' >> $gSsdtPR +echo ' 0x02, // Bit Offset' >> $gSsdtPR +printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR +echo ' 0x03, // Access Size' >> $gSsdtPR +echo ' )' >> $gSsdtPR +echo ' },' >> $gSsdtPR +echo ' 0x03,' >> $gSsdtPR +echo ' '$latency_C3',' >> $gSsdtPR +echo ' '$power_C3 >> $gSsdtPR +fi + +if (($C6)); then +let hintCode+=0x10 +echo ' },' >> $gSsdtPR +echo '' >> $gSsdtPR +echo ' Package (0x04)' >> $gSsdtPR +echo ' {' >> $gSsdtPR +echo ' ResourceTemplate ()' >> $gSsdtPR +echo ' {' >> $gSsdtPR +echo ' Register (FFixedHW,' >> $gSsdtPR +echo ' 0x01, // Bit Width' >> $gSsdtPR +echo ' 0x02, // Bit Offset' >> $gSsdtPR +printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR +echo ' 0x03, // Access Size' >> $gSsdtPR +echo ' )' >> $gSsdtPR +echo ' },' >> $gSsdtPR +echo ' 0x06,' >> $gSsdtPR +echo ' '$latency_C6',' >> $gSsdtPR +echo ' 0x015E' >> $gSsdtPR +fi + +if (($C7)); then +# +# If $hintCode is already 0x30 then use 0x31 otherwise 0x30 +# +if [ $hintCode -eq 48 ]; +then +let hintCode+=0x01 +else +let hintCode+=0x10 +fi +echo ' },' >> $gSsdtPR +echo '' >> $gSsdtPR +echo ' Package (0x04)' >> $gSsdtPR +echo ' {' >> $gSsdtPR +echo ' ResourceTemplate ()' >> $gSsdtPR +echo ' {' >> $gSsdtPR +echo ' Register (FFixedHW,' >> $gSsdtPR +echo ' 0x01, // Bit Width' >> $gSsdtPR +echo ' 0x02, // Bit Offset' >> $gSsdtPR +printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR +echo ' 0x03, // Access Size' >> $gSsdtPR +echo ' )' >> $gSsdtPR +echo ' },' >> $gSsdtPR +echo ' 0x07,' >> $gSsdtPR +echo ' '$latency_C7',' >> $gSsdtPR +echo ' 0xC8' >> $gSsdtPR +fi + +echo ' }' >> $gSsdtPR +echo ' })' >> $gSsdtPR +echo ' }' >> $gSsdtPR + +# +# We don't need a closing bracket here when we add method _DSM for Ivy Bridge. +# + +if [ $gBridgeType -eq $SANDY_BRIDGE ]; then +echo ' }' >> $gSsdtPR +fi } @@ -1045,332 +1038,331 @@ function _printScopeACST() function _printScopeCPUn() { - let currentCPU=1; - - while [ $currentCPU -lt $gLogicalCPUs ]; do - echo '' >> $gSsdtPR - echo ' Scope ('${gScope}'.'${gProcessorNames[$currentCPU]}')' >> $gSsdtPR - echo ' {' >> $gSsdtPR - echo ' Method (APSS, 0, NotSerialized) { Return ('${gScope}'.'${gProcessorNames[0]}'.APSS) }' >> $gSsdtPR - - # - # IB CPUPM tries to parse/execute CPUn.ACST (see debug data) and thus we add - # this method, conditionally, since SB CPUPM doesn't seem to care about it. - # - if [ $gBridgeType -ge $IVY_BRIDGE ]; then - if [ $currentCPU -eq 1 ]; - then - _printScopeACST 1 - else - echo ' Method (ACST, 0, NotSerialized) { Return ('${gScope}'.'${gProcessorNames[1]}'.ACST ()) }' >> $gSsdtPR - fi - fi - - echo ' }' >> $gSsdtPR - let currentCPU+=1 - done - - echo '}' >> $gSsdtPR +let currentCPU=1; + +while [ $currentCPU -lt $gLogicalCPUs ]; do +echo '' >> $gSsdtPR +echo ' Scope ('${gScope}'.'${gProcessorNames[$currentCPU]}')' >> $gSsdtPR +echo ' {' >> $gSsdtPR +echo ' Method (APSS, 0, NotSerialized) { Return ('${gScope}'.'${gProcessorNames[0]}'.APSS) }' >> $gSsdtPR + +# +# IB CPUPM tries to parse/execute CPUn.ACST (see debug data) and thus we add +# this method, conditionally, since SB CPUPM doesn't seem to care about it. +# +if [ $gBridgeType -ge $IVY_BRIDGE ]; then +if [ $currentCPU -eq 1 ]; +then +_printScopeACST 1 +else +echo ' Method (ACST, 0, NotSerialized) { Return ('${gScope}'.'${gProcessorNames[1]}'.ACST ()) }' >> $gSsdtPR +fi +fi + +echo ' }' >> $gSsdtPR +let currentCPU+=1 +done + +echo '}' >> $gSsdtPR } #-------------------------------------------------------------------------------- function _getModelName() { - # - # Grab 'compatible' property from ioreg (stripped with sed / RegEX magic). - # - echo `ioreg -p IODeviceTree -d 2 -k compatible | grep compatible | sed -e 's/ *["=<>]//g' -e 's/compatible//'` +# +# Grab 'compatible' property from ioreg (stripped with sed / RegEX magic). +# +echo `ioreg -p IODeviceTree -d 2 -k compatible | grep compatible | sed -e 's/ *["=<>]//g' -e 's/compatible//'` } #-------------------------------------------------------------------------------- function _getBoardID() { - # - # Grab 'board-id' property from ioreg (stripped with sed / RegEX magic). - # - boardID=$(ioreg -p IODeviceTree -d 2 -k board-id | grep board-id | sed -e 's/ *["=<>]//g' -e 's/board-id//') +# +# Grab 'board-id' property from ioreg (stripped with sed / RegEX magic). +# +boardID=$(ioreg -p IODeviceTree -d 2 -k board-id | grep board-id | sed -e 's/ *["=<>]//g' -e 's/board-id//') } #-------------------------------------------------------------------------------- function _getProcessorNames() { - local acpiNames=$(ioreg -p IODeviceTree -c IOACPIPlatformDevice -k cpu-type | egrep name | sed -e 's/ *[-|="<a-z>]//g') - gProcessorNames=($acpiNames) +local acpiNames=$(ioreg -p IODeviceTree -c IOACPIPlatformDevice -k cpu-type | egrep name | sed -e 's/ *[-|="<a-z>]//g') +gProcessorNames=($acpiNames) - if [[ ${#gProcessorNames[@]} -lt 2 ]]; then - _exitWithError $PROCESSOR_NAMES_ERROR - fi +if [[ ${#gProcessorNames[@]} -lt 2 ]]; then +_exitWithError $PROCESSOR_NAMES_ERROR +fi } #-------------------------------------------------------------------------------- function _updateProcessorNames() { - if [[ $gLogicalCPUs -le 0x0f ]]; - then - local label=${gProcLabel:0:3} - else - local label=${gProcLabel:0:2} - fi - - if [[ $1 -gt ${#gProcessorNames[@]} ]]; then - echo -e "\nWarning: Target CPU has $gLogicalCPUs logical cores, the running system only ${#gProcessorNames[@]}" - echo " Now using '$label' to extent the current range to $gLogicalCPUs..." - echo -e " You may want to check/verify the generated $gSsdtID.dsl\n" - fi - - let currentCPU=0 - - while [ $currentCPU -lt $1 ]; - do - if [[ $1 -gt 0x0f && $currentCPU -le 0x0f ]]; - then - local filler='0' - else - local filler='' - fi - - gProcessorNames[$currentCPU]=${label}${filler}$(echo "obase=16; ${currentCPU}" | bc) - - let currentCPU+=1 - done +if [[ $gLogicalCPUs -le 0x0f ]]; +then +local label=${gProcLabel:0:3} +else +local label=${gProcLabel:0:2} +fi + +if [[ $1 -gt ${#gProcessorNames[@]} ]]; then +echo -e "\nWarning: Target CPU has $gLogicalCPUs logical cores, the running system only ${#gProcessorNames[@]}" +echo " Now using '$label' to extent the current range to $gLogicalCPUs..." +echo -e " You may want to check/verify the generated $gSsdtID.dsl\n" +fi + +let currentCPU=0 + +while [ $currentCPU -lt $1 ]; +do +if [[ $1 -gt 0x0f && $currentCPU -le 0x0f ]]; +then +local filler='0' +else +local filler='' +fi + +gProcessorNames[$currentCPU]=${label}${filler}$(echo "obase=16; ${currentCPU}" | bc) + +let currentCPU+=1 +done } #-------------------------------------------------------------------------------- function _getProcessorScope() { - # - # We run egrep twice here for Snow Leopard compatibility, otherwise it fails. - # - if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 -w0 | egrep -o 'DSDT"=<[0-9a-f]+' | egrep -o '5b830b') ]]; then - printf 'Processor Declaration(s) Found in DSDT' - fi - - # Search for "_PR_" - if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 -w0 | egrep -o 'DSDT"=<[0-9a-f]+' | egrep -o '5f50525f') ]]; - then - gScope="\_PR_" - echo ' (ACPI 1.0 compliant)' - else - gScope="\_SB_" - fi +# +# We run egrep twice here for Snow Leopard compatibility, otherwise it fails. +# +if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 -w0 | egrep -o 'DSDT"=<[0-9a-f]+' | egrep -o '5b830b') ]]; then +printf 'Processor Declaration(s) Found in DSDT' +fi + +if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 -w0 | egrep -o 'DSDT"=<[0-9a-f]+' | egrep -o '5f50525f') ]]; +then +gScope="\_PR_" +echo ' (ACPI 1.0 compliant)' +else +gScope="\_SB_" +fi } #-------------------------------------------------------------------------------- function _getCPUtype() { - # - # Grab 'cpu-type' property from ioreg (stripped with sed / RegEX magic). - # - local grepStr=$(ioreg -p IODeviceTree -n "${gProcessorNames[0]}"@0 -k cpu-type | grep cpu-type | sed -e 's/ *[-|="<a-z>]//g') - - # Swap bytes with help of ${str:pos:num} - # - echo ${grepStr:2:2}${grepStr:0:2} +# +# Grab 'cpu-type' property from ioreg (stripped with sed / RegEX magic). +# +local grepStr=$(ioreg -p IODeviceTree -n "${gProcessorNames[0]}"@0 -k cpu-type | grep cpu-type | sed -e 's/ *[-|="<a-z>]//g') + +# Swap bytes with help of ${str:pos:num} +# +echo ${grepStr:2:2}${grepStr:0:2} } #-------------------------------------------------------------------------------- function _getCPUModel() { - # - # Returns the hexadecimal value of machdep.cpu.model - # - echo 0x$(echo "obase=16; `sysctl machdep.cpu.model | sed -e 's/^machdep.cpu.model: //'`" | bc) +# +# Returns the hexadecimal value of machdep.cpu.model +# +echo 0x$(echo "obase=16; `sysctl machdep.cpu.model | sed -e 's/^machdep.cpu.model: //'`" | bc) } #-------------------------------------------------------------------------------- function _getCPUSignature() { - # - # Returns the hexadecimal value of machdep.cpu.signature - # - echo 0x$(echo "obase=16; `sysctl machdep.cpu.signature | sed -e 's/^machdep.cpu.signature: //'`" | bc) +# +# Returns the hexadecimal value of machdep.cpu.signature +# +echo 0x$(echo "obase=16; `sysctl machdep.cpu.signature | sed -e 's/^machdep.cpu.signature: //'`" | bc) } #-------------------------------------------------------------------------------- function _getSystemType() { - # - # Grab 'system-type' property from ioreg (stripped with sed / RegEX magic). - # - # Note: This property is checked (cmpb $0x02) in X86PlatformPlugin::configResourceCallback - # - echo `ioreg -p IODeviceTree -d 2 -k system-type | grep system-type | sed -e 's/ *[-="<0a-z>]//g'` +# +# Grab 'system-type' property from ioreg (stripped with sed / RegEX magic). +# +# Note: This property is checked (cmpb $0x02) in X86PlatformPlugin::configResourceCallback +# +echo `ioreg -p IODeviceTree -d 2 -k system-type | grep system-type | sed -e 's/ *[-="<0a-z>]//g'` } #-------------------------------------------------------------------------------- function _findIasl() { - if (($gCallIasl)); then - # - # Then we do a quick lookup of iasl (should also be there after the first run) - # - if [ ! -f /usr/local/bin/iasl ]; then - printf "\nIASL not found. " - # - # First we check the target directory (should be there after the first run) - # - # XXX: Jeroen, try curl --create-dirs without the mkdir here ;) - if [ ! -d /usr/local/bin ]; then - printf "Creating target directory... " - sudo mkdir -p /usr/local/bin/ - sudo chown -R root:wheel /usr/local/bin/ - fi - - printf "Downloading iasl...\n" - sudo curl -o /usr/local/bin/iasl https://raw.github.com/Piker-Alpha/RevoBoot/clang/i386/libsaio/acpi/Tools/iasl +if (($gCallIasl)); then +# +# Then we do a quick lookup of iasl (should also be there after the first run) +# +if [ ! -f /usr/local/bin/iasl ]; then +printf "\nIASL not found. " +# +# First we check the target directory (should be there after the first run) +# +# XXX: Jeroen, try curl --create-dirs without the mkdir here ;) +if [ ! -d /usr/local/bin ]; then +printf "Creating target directory... " +sudo mkdir -p /usr/local/bin/ +sudo chown -R root:wheel /usr/local/bin/ +fi + +printf "Downloading iasl...\n" +sudo curl -o /usr/local/bin/iasl https://raw.github.com/Piker-Alpha/RevoBoot/clang/i386/libsaio/acpi/Tools/iasl # sudo curl https://raw.github.com/Piker-Alpha/RevoBoot/clang/i386/libsaio/acpi/Tools/iasl -o /usr/local/bin/iasl --create-dirs - sudo chmod +x /usr/local/bin/iasl - echo 'Done.' - fi +sudo chmod +x /usr/local/bin/iasl +echo 'Done.' +fi - iasl=/usr/local/bin/iasl - fi +iasl=/usr/local/bin/iasl +fi } #-------------------------------------------------------------------------------- function _setDestinationPath { - # - # Checking for RevoBoot - # - if [ -d /Extra/ACPI ]; then - gDestinationPath="/Extra/ACPI/" - echo -e '\nACPI target directory changed to: '$gDestinationPath - return - fi - - # - # Checking for Clover rev 1277 and greater (projectosx.com/forum/index.php?showtopic=2656&p=29129&#entry29129) - # - if [ -d /EFI/Clover/ACPI/patched ]; - then - gDestinationPath="/EFI/Clover/ACPI/patched/" - echo -e '\nACPI target directory changed to: $gDestinationPath' - return - else - if [ -d /Volumes/EFI ]; - then - if [ -d /Volumes/EFI/Clover/ACPI/patched ]; then - gDestinationPath="/Volumes/EFI/CLOVER/ACPI/patched/" - echo -e '\nACPI target directory changed to: '$gDestinationPath - return - fi - else - # - # http://www.tonymacx86.com/ssdt/86906-ssdt-generation-script-ivybridge-pm-40.html#post604496 - # - if [ -f /Library/Logs/CloverEFI/boot.log ]; - then - echo 'Clover boot.log found' - return - else - echo -e '\nWarning: Failed to locate the Clover boot.log' - echo 'Creating temporarily mount point: /Volumes/EFI' - sudo mkdir /Volumes/EFI - printf 'Mounting EFI partition...\n' - # - # TODO: Get target disk from diskutil list - # - sudo mount_hfs /dev/disk0s1 /Volumes/EFI - - if [ -f /Volumes/EFI/Clover/ACPI/patched ]; - then - let gUnmountEFIPartition=1 - gDestinationPath="/Volumes/EFI/CLOVER/ACPI/patched/" - echo 'ACPI target directory changed to: '$gDestinationPath - return - else - echo -e '\nUnmounting EFI partition...' - sudo umount -f /Volumes/EFI - echo 'Removing temporarily mount point...' +# +# Checking for RevoBoot +# +if [ -d /Extra/ACPI ]; then +gDestinationPath="/Extra/ACPI/" +echo -e '\nACPI target directory changed to: '$gDestinationPath +return +fi + +# +# Checking for Clover rev 1277 and greater (projectosx.com/forum/index.php?showtopic=2656&p=29129&#entry29129) +# +if [ -d /EFI/Clover/ACPI/patched ]; +then +gDestinationPath="/EFI/Clover/ACPI/patched/" +echo -e '\nACPI target directory changed to: $gDestinationPath' +return +else +if [ -d /Volumes/EFI ]; +then +if [ -d /Volumes/EFI/Clover/ACPI/patched ]; then +gDestinationPath="/Volumes/EFI/CLOVER/ACPI/patched/" +echo -e '\nACPI target directory changed to: '$gDestinationPath +return +fi +else +# +# http://www.tonymacx86.com/ssdt/86906-ssdt-generation-script-ivybridge-pm-40.html#post604496 +# +if [ -f /Library/Logs/CloverEFI/boot.log ]; +then +echo 'Clover boot.log found' +return +else +echo -e '\nWarning: Failed to locate the Clover boot.log' +echo 'Creating temporarily mount point: /Volumes/EFI' +sudo mkdir /Volumes/EFI +printf 'Mounting EFI partition...\n' +# +# TODO: Get target disk from diskutil list +# +sudo mount_hfs /dev/disk0s1 /Volumes/EFI + +if [ -f /Volumes/EFI/Clover/ACPI/patched ]; +then +let gUnmountEFIPartition=1 +gDestinationPath="/Volumes/EFI/CLOVER/ACPI/patched/" +echo 'ACPI target directory changed to: '$gDestinationPath +return +else +echo -e '\nUnmounting EFI partition...' +sudo umount -f /Volumes/EFI +echo 'Removing temporarily mount point...' # sudo rm -r /Volumes/EFI - return - fi - fi - - fi - fi - - # - # Checking for Clover (older versions) - # - if [ -d /EFI/ACPI/patched ]; then - gDestinationPath="/EFI/ACPI/patched/" - echo 'ACPI target directory changed to: '$gDestinationPath - return - fi +return +fi +fi + +fi +fi + +# +# Checking for Clover (older versions) +# +if [ -d /EFI/ACPI/patched ]; then +gDestinationPath="/EFI/ACPI/patched/" +echo 'ACPI target directory changed to: '$gDestinationPath +return +fi } #-------------------------------------------------------------------------------- function _getCPUNumberFromBrandString { - # - # Get CPU brandstring - # - local brandString=$(echo `sysctl machdep.cpu.brand_string` | sed -e 's/machdep.cpu.brand_string: //') - # - # Save default (0) delimiter - # - local ifs=$IFS - # - # Change delimiter to a space character - # - IFS=" " - # - # Split brandstring into array (data) - # - local data=($brandString) +# +# Get CPU brandstring +# +local brandString=$(echo `sysctl machdep.cpu.brand_string` | sed -e 's/machdep.cpu.brand_string: //') +# +# Save default (0) delimiter +# +local ifs=$IFS +# +# Change delimiter to a space character +# +IFS=" " +# +# Split brandstring into array (data) +# +local data=($brandString) # local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "V2" "@" "2.5GHz") # local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "@" "2.5GHz") - # - # Example from a MacBookPro10,2 - # - # echo "${data[0]}" # Intel(R) - # echo "${data[1]}" # Core(TM) - # echo "${data[2]}" # i5-3210M - # echo "${data[3]}" # CPU - # echo "${data[4]}" # @ - # echo "${data[5]}" # 2.50GHz - # - # or: "Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz" - # - # echo "${data[0]}" # Intel(R) - # echo "${data[1]}" # Xeon(R) - # echo "${data[2]}" # CPU - # echo "${data[3]}" # E3-12XX - # echo "${data[4]}" # V2 - # echo "${data[5]}" # @ - # echo "${data[6]}" # 3.30GHz - - # - # Restore the default delimiter - # - IFS=$ifs - - let length=${#data[@]} - - if ((length > 6)); then - echo 'Warning: Unexpected brandstring > "'${data[@]}'"' - fi - - if [[ ${data[1]} == "Xeon(R)" && ${data[4]} == "V2" ]]; - then - gProcessorNumber="${data[3]} ${data[4]}" - else - gProcessorNumber="${data[2]}" - fi +# +# Example from a MacBookPro10,2 +# +# echo "${data[0]}" # Intel(R) +# echo "${data[1]}" # Core(TM) +# echo "${data[2]}" # i5-3210M +# echo "${data[3]}" # CPU +# echo "${data[4]}" # @ +# echo "${data[5]}" # 2.50GHz +# +# or: "Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz" +# +# echo "${data[0]}" # Intel(R) +# echo "${data[1]}" # Xeon(R) +# echo "${data[2]}" # CPU +# echo "${data[3]}" # E3-12XX +# echo "${data[4]}" # V2 +# echo "${data[5]}" # @ +# echo "${data[6]}" # 3.30GHz + +# +# Restore the default delimiter +# +IFS=$ifs + +let length=${#data[@]} + +if ((length > 6)); then +echo 'Warning: Unexpected brandstring > "'${data[@]}'"' +fi + +if [[ ${data[1]} == "Xeon(R)" && ${data[4]} == "V2" ]]; +then +gProcessorNumber="${data[3]} ${data[4]}" +else +gProcessorNumber="${data[2]}" +fi # echo $gProcessorNumber } @@ -1379,758 +1371,745 @@ function _getCPUNumberFromBrandString function _getCPUDataByProcessorNumber { - # - # Local function definition - # - function __searchList() - { - local ifs=$IFS - let targetType=0 - - case $1 in - 2) local cpuSpecLists=("gDesktopSandyBridgeCPUList[@]" "gMobileSandyBridgeCPUList[@]" "gServerSandyBridgeCPUList[@]") - ;; - 4) local cpuSpecLists=("gDesktopIvyBridgeCPUList[@]" "gMobileIvyBridgeCPUList[@]" "gServerIvyBridgeCPUList[@]") - ;; - 8) local cpuSpecLists=("gDesktopHaswellCPUList[@]" "gMobileHaswellCPUList[@]" "gHaswellCPUList[@]") - ;; - esac - - for cpuList in ${cpuSpecLists[@]} - do - let targetType+=1 - local targetCPUList=("${!cpuList}") - - for cpuData in "${targetCPUList[@]}" - do - IFS="," - data=($cpuData) - - if [[ ${data[0]} == $gProcessorNumber ]]; then - gProcessorData="$cpuData" - let gTypeCPU=$targetType - let gBridgeType=$1 - IFS=$ifs - return - fi - done - done - - IFS=$ifs - } - - # - # Local function callers - # - __searchList $SANDY_BRIDGE - - if (!(($gTypeCPU))); then - __searchList $IVY_BRIDGE - fi - - if (!(($gTypeCPU))); then - __searchList $HASWELL - fi +# +# Local function definition +# +function __searchList() +{ +local ifs=$IFS +let targetType=0 + +case $1 in +2) local cpuSpecLists=("gDesktopSandyBridgeCPUList[@]" "gMobileSandyBridgeCPUList[@]" "gServerSandyBridgeCPUList[@]") +;; +4) local cpuSpecLists=("gDesktopIvyBridgeCPUList[@]" "gMobileIvyBridgeCPUList[@]" "gServerIvyBridgeCPUList[@]") +;; +8) local cpuSpecLists=("gDesktopHaswellCPUList[@]" "gMobileHaswellCPUList[@]" "gHaswellCPUList[@]") +;; +esac + +for cpuList in ${cpuSpecLists[@]} +do +let targetType+=1 +local targetCPUList=("${!cpuList}") + +for cpuData in "${targetCPUList[@]}" +do +IFS="," +data=($cpuData) + +if [[ ${data[0]} == $gProcessorNumber ]]; then +gProcessorData="$cpuData" +let gTypeCPU=$targetType +let gBridgeType=$1 +IFS=$ifs +return +fi +done +done + +IFS=$ifs +} + +# +# Local function callers +# +__searchList $SANDY_BRIDGE + +if (!(($gTypeCPU))); then +__searchList $IVY_BRIDGE +fi + +if (!(($gTypeCPU))); then +__searchList $HASWELL +fi } #-------------------------------------------------------------------------------- function _showLowPowerStates() { - # - # Local function definition - # - function __print() - { - local mask=1 - local cStates=$1 - - printf "Injected C-States for ${gProcessorNames[$2]} (" - # - # Haswell : C0, C1, C1E, C2E, C3, C4, C6 and C7 - # Haswell-ULT: C0, C1, C1E, C2E, C3, C4, C6, C7, C8, C9 and C10 - # - for state in C1 C2 C3 C6 C7 C8 C9 C10 - do - if (($cStates & $mask)); then - if (($mask > 1)); then - printf "," - fi - - printf "$state" - fi - - let mask=$(($mask << 1)) - done - - echo ')' - } - - # - # Local function callers - # - __print $gACST_CPU0 0 - - if [ $gBridgeType -ge $IVY_BRIDGE ]; then - __print $gACST_CPU1 1 - fi +# +# Local function definition +# +function __print() +{ +local mask=1 +local cStates=$1 + +printf "Injected C-States for ${gProcessorNames[$2]} (" +# +# Haswell : C0, C1, C1E, C2E, C3, C4, C6 and C7 +# Haswell-ULT: C0, C1, C1E, C2E, C3, C4, C6, C7, C8, C9 and C10 +# +for state in C1 C2 C3 C6 C7 C8 C9 C10 +do +if (($cStates & $mask)); then +if (($mask > 1)); then +printf "," +fi + +printf "$state" +fi + +let mask=$(($mask << 1)) +done + +echo ')' +} + +# +# Local function callers +# +__print $gACST_CPU0 0 + +if [ $gBridgeType -ge $IVY_BRIDGE ]; then +__print $gACST_CPU1 1 +fi } #-------------------------------------------------------------------------------- function _checkPlatformSupport() { - # - # Local function definition - # - function __searchList() - { - local data=`awk '/<key>'${1}'<\/key>.*/,/<\/array>/' /System/Library/CoreServices/PlatformSupport.plist` - local targetList=(`echo $data | egrep -o '(<string>.*</string>)' | sed -e 's/<\/*string>//g'`) - - for item in "${targetList[@]}" - do - - if [ "$item" == "$2" ]; then - return 1 - fi - done - - return 0 - } - - # - # This check is required for Snow Leopard compatibility! - # - if [ -f /System/Library/CoreServices/PlatformSupport.plist ]; - then - __searchList 'SupportedModelProperties' $1 - - if (($? == 0)); then - echo 'Warning: Model identifier ['$1'] is missing from: /S*/L*/CoreServices/PlatformSupport.plist' - fi - - __searchList 'SupportedBoardIds' $2 - - if (($? == 0)); then - echo 'Warning: boardID ['$2'] is missing from: /S*/L*/CoreServices/PlatformSupport.plist' - fi - else - echo 'Warning: /S*/L*/C*/PlatformSupport.plist not found (normal for Snow Leopard)!' - fi +# +# Local function definition +# +function __searchList() +{ +local data=`awk '/<key>'${1}'<\/key>.*/,/<\/array>/' /System/Library/CoreServices/PlatformSupport.plist` +local targetList=(`echo $data | egrep -o '(<string>.*</string>)' | sed -e 's/<\/*string>//g'`) + +for item in "${targetList[@]}" +do + +if [ "$item" == "$2" ]; then +return 1 +fi +done + +return 0 +} + +# +# This check is required for Snow Leopard compatibility! +# +if [ -f /System/Library/CoreServices/PlatformSupport.plist ]; +then +__searchList 'SupportedModelProperties' $1 + +if (($? == 0)); then +echo 'Warning: Model identifier ['$1'] is missing from: /S*/L*/CoreServices/PlatformSupport.plist' +fi + +__searchList 'SupportedBoardIds' $2 + +if (($? == 0)); then +echo 'Warning: boardID ['$2'] is missing from: /S*/L*/CoreServices/PlatformSupport.plist' +fi +else +echo 'Warning: /S*/L*/C*/PlatformSupport.plist not found (normal for Snow Leopard)!' +fi } #-------------------------------------------------------------------------------- function _checkSMCKeys() { - # - # TODO: Check SMC keys to see if they are there and properly initialized! - # - # Note: Do <i>not</i> dump SMC keys with HWSensors/iStat or other SMC plug-ins installed! - # - local filename="/System/Library/Extensions/FakeSMC.kext/Contents/Info.plist" - local data=`grep -so '<key>[a-zA-Z]*</key>' $filename | sed -e 's/<key>//' -e 's/<\/key>//g'` - - local status=`echo $data | grep -oe 'DPLM'` - - if [ $status == 'DPLM' ]; then - # DPLM [{lim] (bytes 00 00 00 00 00) - # CPU, Idle, IGPU, EGPU and Memory P-State limits - echo "SMC key 'DPLM' found (OK)" - fi +# +# TODO: Check SMC keys to see if they are there and properly initialized! +# +# Note: Do <i>not</i> dump SMC keys with HWSensors/iStat or other SMC plug-ins installed! +# +local filename="/System/Library/Extensions/FakeSMC.kext/Contents/Info.plist" +local data=`grep -so '<key>[a-zA-Z]*</key>' $filename | sed -e 's/<key>//' -e 's/<\/key>//g'` + +local status=`echo $data | grep -oe 'DPLM'` + +if [ $status == 'DPLM' ]; then +# DPLM [{lim] (bytes 00 00 00 00 00) +# CPU, Idle, IGPU, EGPU and Memory P-State limits +echo "SMC key 'DPLM' found (OK)" +fi set -x - local status=`echo $data | grep -oe 'MSAL'` +local status=`echo $data | grep -oe 'MSAL'` - if [ $status == 'MSAL' ]; then - # MSAL [hex_] (bytes 4b) - echo "SMC key 'MSAL' found (OK)" - fi +if [ $status == 'MSAL' ]; then +# MSAL [hex_] (bytes 4b) +echo "SMC key 'MSAL' found (OK)" +fi } #-------------------------------------------------------------------------------- function _initSandyBridgeSetup() { - case $boardID in - Mac-942B5BF58194151B) - gSystemType=1 - gMacModelIdentifier="iMac12,1" - gACST_CPU0=13 # C1, C3 and C6 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-942B59F58194171B) - gSystemType=1 - gMacModelIdentifier="iMac12,2" - gACST_CPU0=13 # C1, C3 and C6 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-8ED6AF5B48C039E1) - gSystemType=1 - gMacModelIdentifier="Macmini5,1" - gACST_CPU0=13 # C1, C3 and C6 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-4BC72D62AD45599E) - gSystemType=1 - gMacModelIdentifier="Macmini5,2" - gACST_CPU0=13 # C1, C3, C6 and C7 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-7BA5B2794B2CDB12) - gSystemType=1 - gMacModelIdentifier="Macmini5,3" - gACST_CPU0=13 # C1, C3, C6 and C7 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-94245B3640C91C81) - gSystemType=2 - gMacModelIdentifier="MacBookPro8,1" - gACST_CPU0=29 # C1, C3, C6 and C7 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-94245A3940C91C80) - gSystemType=2 - gMacModelIdentifier="MacBookPro8,2" - gACST_CPU0=29 # C1, C3, C6 and C7 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-942459F5819B171B) - gSystemType=2 - gMacModelIdentifier="MacBookPro8,3" - gACST_CPU0=29 # C1, C3, C6 and C7 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-C08A6BB70A942AC2) - gSystemType=2 - gMacModelIdentifier="MacBookAir4,1" - gACST_CPU0=29 # C1, C3, C6 and C7 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-742912EFDBEE19B3) - gSystemType=2 - gMacModelIdentifier="MacBookAir4,2" - gACST_CPU0=29 # C1, C3, C6 and C7 - gACST_CPU1=7 # C1, C2 and C3 - ;; - esac +case $boardID in +Mac-942B5BF58194151B) +gSystemType=1 +gMacModelIdentifier="iMac12,1" +gACST_CPU0=13 # C1, C3 and C6 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-942B59F58194171B) +gSystemType=1 +gMacModelIdentifier="iMac12,2" +gACST_CPU0=13 # C1, C3 and C6 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-8ED6AF5B48C039E1) +gSystemType=1 +gMacModelIdentifier="Macmini5,1" +gACST_CPU0=13 # C1, C3 and C6 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-4BC72D62AD45599E) +gSystemType=1 +gMacModelIdentifier="Macmini5,2" +gACST_CPU0=13 # C1, C3, C6 and C7 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-7BA5B2794B2CDB12) +gSystemType=1 +gMacModelIdentifier="Macmini5,3" +gACST_CPU0=13 # C1, C3, C6 and C7 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-94245B3640C91C81) +gSystemType=2 +gMacModelIdentifier="MacBookPro8,1" +gACST_CPU0=29 # C1, C3, C6 and C7 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-94245A3940C91C80) +gSystemType=2 +gMacModelIdentifier="MacBookPro8,2" +gACST_CPU0=29 # C1, C3, C6 and C7 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-942459F5819B171B) +gSystemType=2 +gMacModelIdentifier="MacBookPro8,3" +gACST_CPU0=29 # C1, C3, C6 and C7 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-C08A6BB70A942AC2) +gSystemType=2 +gMacModelIdentifier="MacBookAir4,1" +gACST_CPU0=29 # C1, C3, C6 and C7 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-742912EFDBEE19B3) +gSystemType=2 +gMacModelIdentifier="MacBookAir4,2" +gACST_CPU0=29 # C1, C3, C6 and C7 +gACST_CPU1=7 # C1, C2 and C3 +;; +esac } #-------------------------------------------------------------------------------- function _initIvyBridgeSetup() { - case $boardID in - Mac-00BE6ED71E35EB86) - gSystemType=1 - gMacModelIdentifier="iMac13,1" - gACST_CPU0=13 # C1, C3 and C6 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-FC02E91DDD3FA6A4) - gSystemType=1 - gMacModelIdentifier="iMac13,2" - gACST_CPU0=13 # C1, C3 and C6 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-031AEE4D24BFF0B1) - gSystemType=1 - gMacModelIdentifier="Macmini6,1" - gACST_CPU0=13 # C1, C3 and C6 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-F65AE981FFA204ED) - gSystemType=1 - gMacModelIdentifier="Macmini6,2" - gACST_CPU0=13 # C1, C3 and C6 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-4B7AC7E43945597E) - gSystemType=2 - gMacModelIdentifier="MacBookPro9,1" - gACST_CPU0=29 # C1, C3, C6 and C7 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-6F01561E16C75D06) - gSystemType=2 - gMacModelIdentifier="MacBookPro9,2" - gACST_CPU0=29 # C1, C3, C6 and C7 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-C3EC7CD22292981F) - gSystemType=2 - gMacModelIdentifier="MacBookPro10,1" - gACST_CPU0=29 # C1, C3, C6 and C7 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-AFD8A9D944EA4843) - gSystemType=2 - gMacModelIdentifier="MacBookPro10,2" - gACST_CPU0=29 # C1, C3, C6 and C7 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-66F35F19FE2A0D05) - gSystemType=2 - gMacModelIdentifier="MacBookAir5,1" - gACST_CPU0=29 # C1, C3, C6 and C7 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-2E6FAB96566FE58C) - gSystemType=2 - gMacModelIdentifier="MacBookAir5,2" - gACST_CPU0=29 # C1, C3, C6 and C7 - gACST_CPU1=7 # C1, C2 and C3 - ;; - esac +case $boardID in +Mac-00BE6ED71E35EB86) +gSystemType=1 +gMacModelIdentifier="iMac13,1" +gACST_CPU0=13 # C1, C3 and C6 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-FC02E91DDD3FA6A4) +gSystemType=1 +gMacModelIdentifier="iMac13,2" +gACST_CPU0=13 # C1, C3 and C6 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-031AEE4D24BFF0B1) +gSystemType=1 +gMacModelIdentifier="Macmini6,1" +gACST_CPU0=13 # C1, C3 and C6 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-F65AE981FFA204ED) +gSystemType=1 +gMacModelIdentifier="Macmini6,2" +gACST_CPU0=13 # C1, C3 and C6 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-4B7AC7E43945597E) +gSystemType=2 +gMacModelIdentifier="MacBookPro9,1" +gACST_CPU0=29 # C1, C3, C6 and C7 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-6F01561E16C75D06) +gSystemType=2 +gMacModelIdentifier="MacBookPro9,2" +gACST_CPU0=29 # C1, C3, C6 and C7 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-C3EC7CD22292981F) +gSystemType=2 +gMacModelIdentifier="MacBookPro10,1" +gACST_CPU0=29 # C1, C3, C6 and C7 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-AFD8A9D944EA4843) +gSystemType=2 +gMacModelIdentifier="MacBookPro10,2" +gACST_CPU0=29 # C1, C3, C6 and C7 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-66F35F19FE2A0D05) +gSystemType=2 +gMacModelIdentifier="MacBookAir5,1" +gACST_CPU0=29 # C1, C3, C6 and C7 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-2E6FAB96566FE58C) +gSystemType=2 +gMacModelIdentifier="MacBookAir5,2" +gACST_CPU0=29 # C1, C3, C6 and C7 +gACST_CPU1=7 # C1, C2 and C3 +;; +esac } #-------------------------------------------------------------------------------- function _initHaswellSetup() { - case $boardID in - Mac-) - gSystemType=1 - gMacModelIdentifier="iMac14,1" - gACST_CPU0=13 # C1, C2, C3, C6 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-) - gSystemType=1 - gMacModelIdentifier="iMac14,2" - gACST_CPU0=13 # C1, C2, C3, C6 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-) - gSystemType=1 - gMacModelIdentifier="Macmini7,1" - gACST_CPU0=13 # C1, C2, C3, C6 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-) - gSystemType=1 - gMacModelIdentifier="Macmini7,2" - gACST_CPU0=13 # C1, C2, C3, C6 - gACST_CPU1=7 # C1, C2 and C3 - ;; - - Mac-) - gSystemType=2 - gMacModelIdentifier="MacBookPro11,1" - gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 - gACST_CPU1=31 # C1, C2, C3, C6 and C7 - ;; - - Mac-) - gSystemType=2 - gMacModelIdentifier="MacBookPro11,2" - gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 - gACST_CPU1=31 # C1, C2, C3, C6 and C7 - ;; - - Mac-) - gSystemType=2 - gMacModelIdentifier="MacBookPro12,1" - gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 - gACST_CPU1=31 # C1, C2, C3, C6 and C7 - ;; - - Mac-) - gSystemType=2 - gMacModelIdentifier="MacBookPro12,2" - gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 - gACST_CPU1=31 # C1, C2, C3, C6 and C7 - ;; - - Mac-35C1E88140C3E6CF) - gSystemType=2 - gMacModelIdentifier="MacBookAir6,1" - gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 - gACST_CPU1=31 # C1, C2, C3, C6 and C7 - ;; - - Mac-7DF21CB3ED6977E5) - echo "YES" - gSystemType=2 - gMacModelIdentifier="MacBookAir6,2" - gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 - gACST_CPU1=31 # C1, C2, C3, C6 and C7 - ;; - esac +case $boardID in +Mac-031B6874CF7F642A) +gSystemType=1 +gMacModelIdentifier="iMac14,1" +gACST_CPU0=13 # C1, C2, C3, C6 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-27ADBB7B4CEE8E61) +gSystemType=1 +gMacModelIdentifier="iMac14,2" +gACST_CPU0=13 # C1, C2, C3, C6 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-77EB7D7DAF985301) +gSystemType=1 +gMacModelIdentifier="iMac14,3" +gACST_CPU0=13 # C1, C2, C3, C6 +gACST_CPU1=7 # C1, C2 and C3 +;; + +Mac-189A3D4F975D5FFC) +gSystemType=2 +gMacModelIdentifier="MacBookPro11,1" +gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 +gACST_CPU1=31 # C1, C2, C3, C6 and C7 +;; + +Mac-3CBD00234E554E41) +gSystemType=2 +gMacModelIdentifier="MacBookPro11,2" +gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 +gACST_CPU1=31 # C1, C2, C3, C6 and C7 +;; + +Mac-2BD1B31983FE1663) +gSystemType=2 +gMacModelIdentifier="MacBookPro11,3" +gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 +gACST_CPU1=31 # C1, C2, C3, C6 and C7 +;; + +Mac-35C1E88140C3E6CF) +gSystemType=2 +gMacModelIdentifier="MacBookAir6,1" +gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 +gACST_CPU1=31 # C1, C2, C3, C6 and C7 +;; + +Mac-7DF21CB3ED6977E5) +gSystemType=2 +gMacModelIdentifier="MacBookAir6,2" +gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 +gACST_CPU1=31 # C1, C2, C3, C6 and C7 +;; + +Mac-F60DEB81FF30ACF6) +gSystemType=1 +gMacModelIdentifier="MacPro6,1" +gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 +gACST_CPU1=31 # C1, C2, C3, C6 and C7 +;; +esac } #-------------------------------------------------------------------------------- function _exitWithError() { - case "$1" in - 2) echo -e "\nError: 'MaxTurboFrequency' must be in the range of $frequency-$gMaxOCFrequency... exiting\n" 1>&2 - exit 2 - ;; - 3) echo -e "\nError: 'TDP' must be in the range of 10-150 Watts... exiting\n" 1>&2 - exit 3 - ;; - 4) echo -e "\nError: 'BridgeType' must be 0, 1 or 2... exiting\n" 1>&2 - exit 4 - ;; - 5) echo -e "\nError: Unknown processor number... exiting\n" 1>&2 - exit 5 - ;; - 6) echo -e "\nError: Processor label length is less than 3... exiting\n" 1>&2 - exit 6 - ;; - 7) echo -e "\nError: Processor label not found... exiting\n" 1>&2 - exit 7 - ;; - 8) echo -e "\nError: Processor Declaration not found... exiting\n" 1>&2 - exit 8 - ;; - *) exit 1 - ;; - esac +case "$1" in +2) echo -e "\nError: 'MaxTurboFrequency' must be in the range of $frequency-$gMaxOCFrequency... exiting\n" 1>&2 +exit 2 +;; +3) echo -e "\nError: 'TDP' must be in the range of 10-150 Watts... exiting\n" 1>&2 +exit 3 +;; +4) echo -e "\nError: 'BridgeType' must be 0, 1 or 2... exiting\n" 1>&2 +exit 4 +;; +5) echo -e "\nError: Unknown processor number... exiting\n" 1>&2 +exit 5 +;; +6) echo -e "\nError: Processor label length is less than 3... exiting\n" 1>&2 +exit 6 +;; +7) echo -e "\nError: Processor label not found... exiting\n" 1>&2 +exit 7 +;; +8) echo -e "\nError: Processor Declaration not found... exiting\n" 1>&2 +exit 8 +;; +*) exit 1 +;; +esac } #-------------------------------------------------------------------------------- function main() { - printf "\nsdtPRGen.sh v$gScriptVersion Copyright (c) 2013 by Pike R. Alpha\n" - echo '----------------------------------------------------------------' - - let assumedTDP=0 - let modelSpecified=0 - let maxTurboFrequency=0 - - _getCPUNumberFromBrandString - - if [[ "$1" != "" ]]; then - # Sandy Bridge checks - if [[ ${1:0:4} == "i3-2" || ${1:0:4} == "i5-2" || ${1:0:4} == "i7-2" ]]; then - let modelSpecified=1 - gProcessorNumber=$1 - fi - # Ivy Bridge checks - if [[ ${1:0:4} == "i3-3" || ${1:0:4} == "i5-3" || ${1:0:4} == "i7-3" ]]; then - let modelSpecified=1 - gProcessorNumber=$1 - fi - # Haswell checks - if [[ ${1:0:4} == "i3-4" || ${1:0:4} == "i5-4" || ${1:0:4} == "i7-4" ]]; then - let modelSpecified=1 - gProcessorNumber=$1 - fi - # Xeon check - if [[ ${1:0:1} == "E" ]]; then - let modelSpecified=1 - gProcessorNumber=$1 - fi - fi - - _getCPUDataByProcessorNumber - - if [[ $modelSpecified -eq 1 && $gTypeCPU -eq 0 ]]; then - _exitWithError $PROCESSOR_NUMBER_ERROR - fi - - if [[ $gBridgeType -eq 0 ]]; then - local model=$(_getCPUModel) - - if (($model==0x2A)); then - let gTdp=95 - let gBridgeType=2 - fi - - if (($model==0x2D)); then - let assumedTDP=1 - let gTdp=130 - let gBridgeType=2 - fi - - if (($model==0x3A || $model==0x3B || $model==0x3E)); then - let assumedTDP=1 - let gTdp=77 - let gBridgeType=4 - fi - - # Haswell - if (($model==0x3C)); then - let assumedTDP=1 - let gTdp=84 - let gBridgeType=8 - let gMaxOCFrequency=8000 - fi - - # Haswell ULT - if (($model==0x45)); then - let assumedTDP=1 - let gTdp=15 - let gBridgeType=8 - fi - fi - - case $gBridgeType in - 2) local bridgeTypeString="Sandy Bridge" - ;; - 4) local bridgeTypeString="Ivy Bridge" - ;; - 8) local bridgeTypeString="Haswell" - ;; - *) local bridgeTypeString="Unknown" - ;; - esac - - _getBoardID - _getProcessorNames - _getProcessorScope - - local modelID=$(_getModelName) - local cpu_type=$(_getCPUtype) - local currentSystemType=$(_getSystemType) - local cpuSignature=$(_getCPUSignature) - - echo "Generating ${gSsdtID}.dsl for a $modelID [$boardID]" - echo "$bridgeTypeString Core $gProcessorNumber processor [$cpuSignature] setup [0x$cpu_type]" - - # - # gTypeCPU is greater than 0 when the processor is found in one of the CPU lists - # - if (($gTypeCPU)); - then - local ifs=$IFS - IFS="," - local cpuData=($gProcessorData) - let gTdp=${cpuData[1]} - let lfm=${cpuData[2]} - let frequency=${cpuData[3]} - let maxTurboFrequency=${cpuData[4]} - - if [ $maxTurboFrequency == 0 ]; then - let maxTurboFrequency=$frequency - fi - - let gLogicalCPUs=${cpuData[6]} - - IFS=$ifs - - echo 'With a maximum TDP of '$gTdp' Watt, as specified by Intel' - - # - # Check Low Frequency Mode (may be 0 aka still unknown) - # - if (($lfm > 0)); - then - let gBaseFrequency=$lfm - else - echo -e "\nWarning: Low Frequency Mode is 0 (unknown)" - - if (($gTypeCPU == gMobileCPU)); - then - echo -e " Now using 1200 MHz for Mobile processor\n" - let gBaseFrequency=1200 - else - echo -e " Now using 1600 MHz for Server/Desktop processors\n" - let gBaseFrequency=1600 - fi - fi - else - let gLogicalCPUs=$(echo `sysctl machdep.cpu.thread_count` | sed -e 's/^machdep.cpu.thread_count: //') - let frequency=$(echo `sysctl hw.cpufrequency` | sed -e 's/^hw.cpufrequency: //') - let frequency=($frequency / 1000000) - - if [[ $assumedTDP -eq 1 ]]; then - echo 'With a maximum TDP of '$gTdp' Watt - assumed, may require override value!' - fi - fi - - # - # Script argument checks - # - - if [[ $# -ge 2 ]]; then - if [[ "$2" =~ ^[0-9]+$ ]]; then - if [[ $2 -lt $frequency || $2 -gt $gMaxOCFrequency ]]; - then - _exitWithError $MAX_TURBO_FREQUENCY_ERROR - else - if [[ $2 -gt $maxTurboFrequency ]]; then - echo "Override value: Max Turbo Frequency, now using: $2 MHz!" - let maxTurboFrequency=$2 - fi - fi - fi - fi - - if [ $# -ge 3 ]; then - if [[ "$3" =~ ^[0-9]+$ ]]; - then - if [[ $3 -lt 10 || $3 -gt 150 ]]; - then - _exitWithError $MAX_TDP_ERROR - else - if [[ $gTdp != $3 ]]; then - let gTdp=$3 - echo "Override value: Max TDP, now using: $gTdp Watt!" - fi - fi - else - _exitWithError $MAX_TDP_ERROR - fi - fi - - if [ $# -ge 4 ]; then - if [[ "$4" =~ ^[0-9]+$ ]]; - then - local detectedBridgeType=$gBridgeType - - case "$4" in - 0) let gBridgeType=2 - local bridgeTypeString='Sandy Bridge' - ;; - 1) let gBridgeType=4 - local bridgeTypeString='Ivy Bridge' - ;; - 2) let gBridgeType=8 - local bridgeTypeString='Haswell' - ;; - *) _exitWithError $TARGET_CPU_ERROR - ;; - esac - - if [[ $detectedBridgeType -ne $((2 << $4)) ]]; then - echo "Override value: CPU type, now using: $bridgeTypeString" - fi - else - _exitWithError $TARGET_CPU_ERROR - fi - fi - - if [ $# -eq 5 ]; then - if [ ${#5} -eq 3 ]; - then - gProcLabel=$(echo "$5" | tr '[:lower:]' '[:upper:]') - echo "Override value: Now using '$gProcLabel' for ACPI processor names!" - _updateProcessorNames ${#gProcessorNames[@]} - else - _exitWithError $PROCESSOR_LABEL_LENGTH_ERROR - fi - fi - - echo "Number logical CPU's: $gLogicalCPUs (Core Frequency: $frequency MHz)" - - if [ $gLogicalCPUs -gt ${#gProcessorNames[@]} ]; then - _updateProcessorNames $gLogicalCPUs - fi - - # - # Check maxTurboFrequency - # - if [ $maxTurboFrequency -eq 0 ]; then - _exitWithError $MAX_TURBO_FREQUENCY_ERROR - fi - - # - # Get number of Turbo states. - # - let turboStates=$(echo "(($maxTurboFrequency - $frequency) / 100)" | bc) - - # - # Check number of Turbo states. - # - if [ $turboStates -lt 0 ]; then - let turboStates=0 - fi - - # - # Report number of Turbo States - # - if [ $turboStates -gt 0 ]; - then - let minTurboFrequency=($frequency+100) - echo "Number of Turbo States: $turboStates ($minTurboFrequency-$maxTurboFrequency MHz)" - - else - echo "Number of Turbo States: 0" - fi - - local packageLength=$(echo "((($maxTurboFrequency - $gBaseFrequency)+100) / 100)" | bc) - - echo "Number of P-States: $packageLength ($gBaseFrequency-$maxTurboFrequency MHz)" - - _printHeader - _printExternals - _printDebugInfo - _printScopeStart $turboStates $packageLength - _printPackages $gTdp $frequency $maxTurboFrequency - - case "$gBridgeType" in - $SANDY_BRIDGE) - local cpuTypeString="06" - _initSandyBridgeSetup - _printScopeACST 0 - _printScopeCPUn - ;; - $IVY_BRIDGE) - local cpuTypeString="07" - _initIvyBridgeSetup - _printScopeACST 0 - _printMethodDSM - _printScopeCPUn - ;; - $HASWELL) - local cpuTypeString="08" - _initHaswellSetup - _printScopeACST 0 - _printMethodDSM - _printScopeCPUn - ;; - esac - - _showLowPowerStates - _checkPlatformSupport $modelID $boardID - - # - # Some IB CPUPM specific configuration checks - # - if [ $gBridgeType -ne $HASWELL ]; - then - if [ ${cpu_type:0:2} -ne $cpuTypeString ]; then - echo -e "\nWarning: 'cpu-type' may be set improperly (0x$cpu_type instead of 0x$cpuTypeString${cpu_type:2:2})" - fi - - if [ $gSystemType -eq 0 ]; - then - echo -e "\nWarning: 'board-id' [$boardID] is not supported by $bridgeTypeString PM" - else - if [ "$gMacModelIdentifier" != "$modelID" ]; then - echo "Error: board-id [$boardID] and model [$modelID] mismatch" - fi - - if [ $currentSystemType -ne $gSystemType ]; then - echo -e "\nWarning: 'system-type' may be set improperly ($currentSystemType instead of $gSystemType)" - fi - fi - fi +printf "\nsdtPRGen.sh v$gScriptVersion Copyright (c) 2013 by Pike R. Alpha\n" +echo '----------------------------------------------------------------' + +let assumedTDP=0 +let modelSpecified=0 +let maxTurboFrequency=0 + +_getCPUNumberFromBrandString + +if [[ "$1" != "" ]]; then +# Sandy Bridge checks +if [[ ${1:0:4} == "i3-2" || ${1:0:4} == "i5-2" || ${1:0:4} == "i7-2" ]]; then +let modelSpecified=1 +gProcessorNumber=$1 +fi +# Ivy Bridge checks +if [[ ${1:0:4} == "i3-3" || ${1:0:4} == "i5-3" || ${1:0:4} == "i7-3" ]]; then +let modelSpecified=1 +gProcessorNumber=$1 +fi +# Haswell checks +if [[ ${1:0:4} == "i3-4" || ${1:0:4} == "i5-4" || ${1:0:4} == "i7-4" ]]; then +let modelSpecified=1 +gProcessorNumber=$1 +fi +# Xeon check +if [[ ${1:0:1} == "E" ]]; then +let modelSpecified=1 +gProcessorNumber=$1 +fi +fi + +_getCPUDataByProcessorNumber + +if [[ $modelSpecified -eq 1 && $gTypeCPU -eq 0 ]]; then +_exitWithError $PROCESSOR_NUMBER_ERROR +fi + +if [[ $gBridgeType -eq 0 ]]; then +local model=$(_getCPUModel) + +if (($model==0x2A)); then +let gTdp=95 +let gBridgeType=2 +fi + +if (($model==0x2D)); then +let assumedTDP=1 +let gTdp=130 +let gBridgeType=2 +fi + +if (($model==0x3A || $model==0x3B || $model==0x3E)); then +let assumedTDP=1 +let gTdp=77 +let gBridgeType=4 +fi + +# Haswell +if (($model==0x3C)); then +let assumedTDP=1 +let gTdp=84 +let gBridgeType=8 +let gMaxOCFrequency=8000 +fi + +# Haswell ULT +if (($model==0x40)); then +let assumedTDP=1 +let gTdp=15 +let gBridgeType=8 +fi +fi + +case $gBridgeType in +2) local bridgeTypeString="Sandy Bridge" +;; +4) local bridgeTypeString="Ivy Bridge" +;; +8) local bridgeTypeString="Haswell" +;; +*) local bridgeTypeString="Unknown" +;; +esac + +_getBoardID +_getProcessorNames +_getProcessorScope + +local modelID=$(_getModelName) +local cpu_type=$(_getCPUtype) +local currentSystemType=$(_getSystemType) +local cpuSignature=$(_getCPUSignature) + +echo "Generating ${gSsdtID}.dsl for a $modelID [$boardID]" +echo "$bridgeTypeString Core $gProcessorNumber processor [$cpuSignature] setup [0x$cpu_type]" + +# +# gTypeCPU is greater than 0 when the processor is found in one of the CPU lists +# +if (($gTypeCPU)); +then +local ifs=$IFS +IFS="," +local cpuData=($gProcessorData) +let gTdp=${cpuData[1]} +let lfm=${cpuData[2]} +let frequency=${cpuData[3]} +let maxTurboFrequency=${cpuData[4]} + +if [ $maxTurboFrequency == 0 ]; then +let maxTurboFrequency=$frequency +fi + +let gLogicalCPUs=${cpuData[6]} + +IFS=$ifs + +echo 'With a maximum TDP of '$gTdp' Watt, as specified by Intel' + +# +# Check Low Frequency Mode (may be 0 aka still unknown) +# +if (($lfm > 0)); +then +let gBaseFrequency=$lfm +else +echo -e "\nWarning: Low Frequency Mode is 0 (unknown)" + +if (($gTypeCPU == gMobileCPU)); +then +echo -e " Now using 1200 MHz for Mobile processor\n" +let gBaseFrequency=1200 +else +echo -e " Now using 1600 MHz for Server/Desktop processors\n" +let gBaseFrequency=1600 +fi +fi +else +let gLogicalCPUs=$(echo `sysctl machdep.cpu.thread_count` | sed -e 's/^machdep.cpu.thread_count: //') +let frequency=$(echo `sysctl hw.cpufrequency` | sed -e 's/^hw.cpufrequency: //') +let frequency=($frequency / 1000000) + +if [[ $assumedTDP -eq 1 ]]; then +echo 'With a maximum TDP of '$gTdp' Watt - assumed, may require override value!' +fi +fi + +# +# Script argument checks +# + +if [[ $# -ge 2 ]]; then +if [[ "$2" =~ ^[0-9]+$ ]]; then +if [[ $2 -lt $frequency || $2 -gt $gMaxOCFrequency ]]; +then +_exitWithError $MAX_TURBO_FREQUENCY_ERROR +else +if [[ $2 -gt $maxTurboFrequency ]]; then +echo "Override value: Max Turbo Frequency, now using: $2 MHz!" +let maxTurboFrequency=$2 +fi +fi +fi +fi + +if [ $# -ge 3 ]; then +if [[ "$3" =~ ^[0-9]+$ ]]; +then +if [[ $3 -lt 10 || $3 -gt 150 ]]; +then +_exitWithError $MAX_TDP_ERROR +else +if [[ $gTdp != $3 ]]; then +let gTdp=$3 +echo "Override value: Max TDP, now using: $gTdp Watt!" +fi +fi +else +_exitWithError $MAX_TDP_ERROR +fi +fi + +if [ $# -ge 4 ]; then +if [[ "$4" =~ ^[0-9]+$ ]]; +then +local detectedBridgeType=$gBridgeType + +case "$4" in +0) let gBridgeType=2 +local bridgeTypeString='Sandy Bridge' +;; +1) let gBridgeType=4 +local bridgeTypeString='Ivy Bridge' +;; +2) let gBridgeType=8 +local bridgeTypeString='Haswell' +;; +*) _exitWithError $TARGET_CPU_ERROR +;; +esac + +if [[ $detectedBridgeType -ne $((2 << $4)) ]]; then +echo "Override value: CPU type, now using: $bridgeTypeString" +fi +else +_exitWithError $TARGET_CPU_ERROR +fi +fi + +if [ $# -eq 5 ]; then +if [ ${#5} -eq 3 ]; +then +gProcLabel=$(echo "$5" | tr '[:lower:]' '[:upper:]') +echo "Override value: Now using '$gProcLabel' for ACPI processor names!" +_updateProcessorNames ${#gProcessorNames[@]} +else +_exitWithError $PROCESSOR_LABEL_LENGTH_ERROR +fi +fi + +echo "Number logical CPU's: $gLogicalCPUs (Core Frequency: $frequency MHz)" + +if [ $gLogicalCPUs -gt ${#gProcessorNames[@]} ]; then +_updateProcessorNames $gLogicalCPUs +fi + +# +# Check maxTurboFrequency +# +if [ $maxTurboFrequency -eq 0 ]; then +_exitWithError $MAX_TURBO_FREQUENCY_ERROR +fi + +# +# Get number of Turbo states. +# +let turboStates=$(echo "(($maxTurboFrequency - $frequency) / 100)" | bc) + +# +# Check number of Turbo states. +# +if [ $turboStates -lt 0 ]; then +let turboStates=0 +fi + +# +# Report number of Turbo States +# +if [ $turboStates -gt 0 ]; +then +let minTurboFrequency=($frequency+100) +echo "Number of Turbo States: $turboStates ($minTurboFrequency-$maxTurboFrequency MHz)" + +else +echo "Number of Turbo States: 0" +fi + +local packageLength=$(echo "((($maxTurboFrequency - $gBaseFrequency)+100) / 100)" | bc) + +echo "Number of P-States: $packageLength ($gBaseFrequency-$maxTurboFrequency MHz)" + +_printHeader +_printExternals +_printDebugInfo +_printScopeStart $turboStates $packageLength +_printPackages $gTdp $frequency $maxTurboFrequency + +if [ $gBridgeType -eq $SANDY_BRIDGE ]; +then +local cpuTypeString="06" + +_initSandyBridgeSetup + +_printScopeACST 0 +_printScopeCPUn +else +local cpuTypeString="07" + +_initIvyBridgeSetup + +_printScopeACST 0 +_printMethodDSM +_printScopeCPUn +fi + +_showLowPowerStates +_checkPlatformSupport $modelID $boardID + +# +# Some IB CPUPM specific configuration checks +# +if [ $gBridgeType -ne $HASWELL ]; +then +if [ ${cpu_type:0:2} -ne $cpuTypeString ]; then +echo -e "\nWarning: 'cpu-type' may be set improperly (0x$cpu_type instead of 0x$cpuTypeString${cpu_type:2:2})" +fi + +if [ $gSystemType -eq 0 ]; +then +echo -e "\nWarning: 'board-id' [$boardID] is not supported by $bridgeTypeString PM" +else +if [ "$gMacModelIdentifier" != "$modelID" ]; then +echo "Error: board-id [$boardID] and model [$modelID] mismatch" +fi + +if [ $currentSystemType -ne $gSystemType ]; then +echo -e "\nWarning: 'system-type' may be set improperly ($currentSystemType instead of $gSystemType)" +fi +fi +fi } #==================================== START ===================================== @@ -2138,52 +2117,52 @@ function main() clear if [ $# -eq 0 ]; - then - main "" $1 $2 $3 $4 - else - if [[ "$1" =~ ^[0-9]+$ ]]; - then - main "" $1 $2 $3 $4 - else - main "$1" $2 $3 $4 $5 - fi +then +main "" $1 $2 $3 $4 +else +if [[ "$1" =~ ^[0-9]+$ ]]; +then +main "" $1 $2 $3 $4 +else +main "$1" $2 $3 $4 $5 +fi fi _findIasl if (($gCallIasl)); then - # - # Compile ssdt.dsl - # - sudo "$iasl" $gSsdtPR - - # - # Copy ssdt_pr.aml to /Extra/ssdt.aml (example) - # - if (($gAutoCopy)); then - if [ -f ${gPath}/${gSsdtID}.aml ]; then - _setDestinationPath - echo -e - read -p "Do you want to copy ${gPath}/${gSsdtID}.aml to ${gDestinationPath}${gDestinationFile}? (y/n)?" choice - case "$choice" in - y|Y ) sudo cp ${gPath}/${gSsdtID}.aml ${gDestinationPath}${gDestinationFile} - ;; - esac - - if (($gUnmountEFIPartition)); then - echo -e '\nUnmounting EFI partition...' - sudo umount -f /Volumes/EFI - echo 'Removing temporarily mount point...' - sudo rm -r /Volumes/EFI - fi - fi - fi +# +# Compile ssdt.dsl +# +"$iasl" $gSsdtPR + +# +# Copy ssdt_pr.aml to /Extra/ssdt.aml (example) +# +if (($gAutoCopy)); then +if [ -f ${gPath}/${gSsdtID}.aml ]; then +_setDestinationPath +echo -e +read -p "Do you want to copy ${gPath}/${gSsdtID}.aml to ${gDestinationPath}${gDestinationFile}? (y/n)?" choice +case "$choice" in +y|Y ) sudo cp ${gPath}/${gSsdtID}.aml ${gDestinationPath}${gDestinationFile} +;; +esac + +if (($gUnmountEFIPartition)); then +echo -e '\nUnmounting EFI partition...' +sudo umount -f /Volumes/EFI +echo 'Removing temporarily mount point...' +sudo rm -r /Volumes/EFI +fi +fi +fi fi if ((gCallOpen)); then - open $gSsdtPR +open $gSsdtPR fi exit 0 -#================================================================================ +#================================================================================ \ No newline at end of file From c6240cec71ef03f29c830d32335683a4c321427e Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 30 Dec 2013 11:23:17 +0100 Subject: [PATCH 422/623] Updating files from Vector One --- .../AppleIntelCPUPowerManagementInfo.cpp | 380 +++++++++++------- .../AppleIntelCPUPowerManagementInfo.h | 58 ++- 2 files changed, 272 insertions(+), 166 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index ec76af1..9c62709 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -15,87 +15,89 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(void) { - IOLog("MSR_CORE_THREAD_COUNT......(0x35) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_THREAD_COUNT)); - - IOLog("MSR_PLATFORM_INFO..........(0xCE) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PLATFORM_INFO)); - - IOLog("MSR_PMG_CST_CONFIG_CONTROL.(0xE2) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PMG_CST_CONFIG_CONTROL)); - IOLog("MSR_PMG_IO_CAPTURE_BASE....(0xE4) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PMG_IO_CAPTURE_BASE)); - IOLog("IA32_MPERF.................(0xE7) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_MPERF)); - IOLog("IA32_APERF.................(0xE8) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_APERF)); - - IOLog("MSR_FLEX_RATIO.............(0x194) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_FLEX_RATIO)); - IOLog("MSR_IA32_PERF_STATUS.......(0x198) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_IA32_PERF_STATUS)); - IOLog("MSR_IA32_PERF_CONTROL......(0x199) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_IA32_PERF_CONTROL)); - IOLog("IA32_CLOCK_MODULATION......(0x19A) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_CLOCK_MODULATION)); - IOLog("IA32_THERM_STATUS..........(0x19C) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_THERM_STATUS)); - - IOLog("IA32_MISC_ENABLES..........(0x1A0) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_MISC_ENABLES)); - IOLog("MSR_MISC_PWR_MGMT..........(0x1AA) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_MISC_PWR_MGMT)); - IOLog("MSR_TURBO_RATIO_LIMIT......(0x1AD) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_RATIO_LIMIT)); - - IOLog("IA32_ENERGY_PERF_BIAS......(0x1B0) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_ENERGY_PERF_BIAS)); - - IOLog("MSR_POWER_CTL..............(0x1FC) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_POWER_CTL)); - - IOLog("MSR_RAPL_POWER_UNIT........(0x606) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_RAPL_POWER_UNIT)); - IOLog("MSR_PKG_POWER_LIMIT........(0x610) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_POWER_LIMIT)); - IOLog("MSR_PKG_ENERGY_STATUS......(0x611) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_ENERGY_STATUS)); - - IOLog("MSR_PKGC3_IRTL.............(0x60a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC3_IRTL)); - IOLog("MSR_PKGC6_IRTL.............(0x60b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC6_IRTL)); - IOLog("MSR_PKGC7_IRTL.............(0x60c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC7_IRTL)); - - IOLog("MSR_PP0_CURRENT_CONFIG.....(0x601) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_CURRENT_CONFIG)); - IOLog("MSR_PP0_POWER_LIMIT........(0x638) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POWER_LIMIT)); - IOLog("MSR_PP0_ENERGY_STATUS......(0x639) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_ENERGY_STATUS)); - IOLog("MSR_PP0_POLICY.............(0x63a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POLICY)); - - /* IOLog("MSR_PP1_CURRENT_CONFIG.....(0x602) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_CURRENT_CONFIG)); - IOLog("MSR_PP1_POWER_LIMIT........(0x640) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POWER_LIMIT)); - IOLog("MSR_PP1_ENERGY_STATUS......(0x641) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_ENERGY_STATUS)); - IOLog("MSR_PP1_POLICY.............(0x642) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POLICY)); */ - - IOLog("MSR_CONFIG_TDP_NOMINAL.....(0x648) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_NOMINAL)); - IOLog("MSR_CONFIG_TDP_LEVEL1......(0x649) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL1)); - IOLog("MSR_CONFIG_TDP_LEVEL2......(0x64a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL2)); - IOLog("MSR_CONFIG_TDP_CONTROL.....(0x64b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_CONTROL)); - IOLog("MSR_TURBO_ACTIVATION_RATIO.(0x64c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_ACTIVATION_RATIO)); - - IOLog("MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C2_RESIDENCY)); - IOLog("MSR_PKG_C3_RESIDENCY.......(0x3f8) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C3_RESIDENCY)); - IOLog("MSR_PKG_C6_RESIDENCY.......(0x3f9) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C6_RESIDENCY)); - IOLog("MSR_PKG_C7_RESIDENCY.......(0x3fa) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("AICPUPMI: MSR_CORE_THREAD_COUNT......(0x35) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_THREAD_COUNT)); + + IOLog("AICPUPMI: MSR_PLATFORM_INFO..........(0xCE) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PLATFORM_INFO)); + + IOLog("AICPUPMI: MSR_PMG_CST_CONFIG_CONTROL.(0xE2) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_CST_CONFIG_CONTROL)); + IOLog("AICPUPMI: MSR_PMG_IO_CAPTURE_BASE....(0xE4) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PMG_IO_CAPTURE_BASE)); + IOLog("AICPUPMI: IA32_MPERF.................(0xE7) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_MPERF)); + IOLog("AICPUPMI: IA32_APERF.................(0xE8) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_APERF)); + + IOLog("AICPUPMI: MSR_FLEX_RATIO.............(0x194) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_FLEX_RATIO)); + IOLog("AICPUPMI: MSR_IA32_PERF_STATUS.......(0x198) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_IA32_PERF_STATUS)); + IOLog("AICPUPMI: MSR_IA32_PERF_CONTROL......(0x199) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_IA32_PERF_CONTROL)); + IOLog("AICPUPMI: IA32_CLOCK_MODULATION......(0x19A) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_CLOCK_MODULATION)); + IOLog("AICPUPMI: IA32_THERM_STATUS..........(0x19C) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_THERM_STATUS)); + + IOLog("AICPUPMI: IA32_MISC_ENABLES..........(0x1A0) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_MISC_ENABLES)); + IOLog("AICPUPMI: MSR_MISC_PWR_MGMT..........(0x1AA) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_MISC_PWR_MGMT)); + IOLog("AICPUPMI: MSR_TURBO_RATIO_LIMIT......(0x1AD) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_RATIO_LIMIT)); + + IOLog("AICPUPMI: IA32_ENERGY_PERF_BIAS......(0x1B0) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_ENERGY_PERF_BIAS)); + + IOLog("AICPUPMI: MSR_POWER_CTL..............(0x1FC) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_POWER_CTL)); + + IOLog("AICPUPMI: MSR_RAPL_POWER_UNIT........(0x606) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_RAPL_POWER_UNIT)); + IOLog("AICPUPMI: MSR_PKG_POWER_LIMIT........(0x610) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_POWER_LIMIT)); + IOLog("AICPUPMI: MSR_PKG_ENERGY_STATUS......(0x611) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_ENERGY_STATUS)); + + IOLog("AICPUPMI: MSR_PKGC3_IRTL.............(0x60a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC3_IRTL)); + IOLog("AICPUPMI: MSR_PKGC6_IRTL.............(0x60b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC6_IRTL)); + IOLog("AICPUPMI: MSR_PKGC7_IRTL.............(0x60c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC7_IRTL)); + + IOLog("AICPUPMI: MSR_PP0_CURRENT_CONFIG.....(0x601) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_CURRENT_CONFIG)); + IOLog("AICPUPMI: MSR_PP0_POWER_LIMIT........(0x638) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POWER_LIMIT)); + IOLog("AICPUPMI: MSR_PP0_ENERGY_STATUS......(0x639) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_ENERGY_STATUS)); + IOLog("AICPUPMI: MSR_PP0_POLICY.............(0x63a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POLICY)); + + /* IOLog("AICPUPMI: MSR_PP1_CURRENT_CONFIG.....(0x602) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_CURRENT_CONFIG)); + IOLog("AICPUPMI: MSR_PP1_POWER_LIMIT........(0x640) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POWER_LIMIT)); + IOLog("AICPUPMI: MSR_PP1_ENERGY_STATUS......(0x641) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_ENERGY_STATUS)); + IOLog("AICPUPMI: MSR_PP1_POLICY.............(0x642) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POLICY)); */ + + IOLog("AICPUPMI: MSR_CONFIG_TDP_NOMINAL.....(0x648) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_NOMINAL)); + IOLog("AICPUPMI: MSR_CONFIG_TDP_LEVEL1......(0x649) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL1)); + IOLog("AICPUPMI: MSR_CONFIG_TDP_LEVEL2......(0x64a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL2)); + IOLog("AICPUPMI: MSR_CONFIG_TDP_CONTROL.....(0x64b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_CONTROL)); + IOLog("AICPUPMI: MSR_TURBO_ACTIVATION_RATIO.(0x64c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_ACTIVATION_RATIO)); + + IOLog("AICPUPMI: MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C2_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C3_RESIDENCY.......(0x3f8) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C3_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C6_RESIDENCY.......(0x3f9) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C6_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C7_RESIDENCY.......(0x3fa) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); if (gCPUModel == CPU_MODEL_HASWELL_ULT) { - IOLog("MSR_PKG_C8_RESIDENCY.......(0x630) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); - IOLog("MSR_PKG_C9_RESIDENCY.......(0x631) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); - IOLog("MSR_PKG_C10_RESIDENCY......(0x632) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C8_RESIDENCY.......(0x630) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C9_RESIDENCY.......(0x631) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C10_RESIDENCY......(0x632) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); - IOLog("MSR_PKG_C8_LATENCY.........(0x633) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); - IOLog("MSR_PKG_C9_LATENCY.........(0x634) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); - IOLog("MSR_PKG_C10_LATENCY........(0x635) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C8_LATENCY.........(0x633) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C9_LATENCY.........(0x634) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C10_LATENCY........(0x635) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); } } //============================================================================== -inline void getCStates(void *arg) +inline void getCStates(void *magic) { - UInt8 logicalCoreNumber = cpu_number(); - - if ((gCoreStates & logicalCoreNumber) == 0) + UInt32 logicalCoreNumber = cpu_number(); + + if (gCheckC3 && rdmsr64(MSR_CORE_C3_RESIDENCY) > 0) { - gCoreStates |= (1ULL << logicalCoreNumber); - IOLog("Core (logical): %d\n", logicalCoreNumber); - IOLog("MSR_CORE_C3_RESIDENCY......(0x3fc) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_C3_RESIDENCY)); - IOLog("MSR_CORE_C6_RESIDENCY......(0x3fd) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_C6_RESIDENCY)); - - if ((gCPUModel == CPU_MODEL_SB_CORE) || (gCPUModel == CPU_MODEL_SB_JAKETOWN)) - { - IOLog("MSR_CORE_C7_RESIDENCY......(0x3fe) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_C7_RESIDENCY)); - } + gC3Cores |= (1 << logicalCoreNumber); + } + + if (gCheckC6 && rdmsr64(MSR_CORE_C6_RESIDENCY) > 0) + { + gC6Cores |= (1 << logicalCoreNumber); + } + + if (gCheckC7 && rdmsr64(MSR_CORE_C7_RESIDENCY) > 0) + { + gC7Cores |= (1 << logicalCoreNumber); } } @@ -105,76 +107,59 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) { UInt8 currentMultiplier = (rdmsr64(MSR_IA32_PERF_STS) >> 8); gCoreMultipliers |= (1ULL << currentMultiplier); - + #if REPORT_GPU_STATS UInt8 currentIgpuMultiplier = 0; - + if (igpuEnabled) { currentIgpuMultiplier = (UInt8)gMchbar[1]; gIGPUMultipliers |= (1ULL << currentIgpuMultiplier); } #endif - + timerEventSource->setTimeoutTicks(Interval); - + if (loopLock) { return kIOReturnTimeout; } loopLock = true; - + +#if REPORT_C_STATES if (dumpCStates) { UInt32 magic = 0; - IOSimpleLockLock(simpleLock); - mp_rendezvous_no_intrs(getCStates, (void *)&magic); - IOSimpleLockUnlock(simpleLock); + // IOSimpleLockLock(simpleLock); + mp_rendezvous_no_intrs(getCStates, &magic); + IOSleep(1); + // IOSimpleLockUnlock(simpleLock); } - +#endif + + int currentBit = 0; + UInt64 value = 0ULL; + #if REPORT_GPU_STATS if ((gCoreMultipliers != gTriggeredPStates) || (gIGPUMultipliers != gTriggeredIGPUPStates)) #else - if (gCoreMultipliers != gTriggeredPStates) + if (gCoreMultipliers != gTriggeredPStates) #endif - { - int currentBit = 0; - UInt64 value = 0ULL; - - gTriggeredPStates = gCoreMultipliers; - IOLog("AICPUPMI: CPU P-States [ "); - - for (currentBit = gMinRatio; currentBit <= gMaxRatio; currentBit++) { - value = (1ULL << currentBit); + // int currentBit = 0; + // UInt64 value = 0ULL; - if ((gTriggeredPStates & value) == value) - { - if (currentBit == currentMultiplier) - { - IOLog("(%d) ", currentBit); - } - else - { - IOLog("%d ", currentBit); - } - } - } - -#if REPORT_GPU_STATS - if (igpuEnabled) - { - gTriggeredIGPUPStates = gIGPUMultipliers; - IOLog("] iGPU P-States [ "); + gTriggeredPStates = gCoreMultipliers; + IOLog("AICPUPMI: CPU P-States [ "); - for (currentBit = 1; currentBit <= 32; currentBit++) + for (currentBit = gMinRatio; currentBit <= gMaxRatio; currentBit++) { value = (1ULL << currentBit); - if ((gTriggeredIGPUPStates & value) == value) + if ((gTriggeredPStates & value) == value) { - if (currentBit == currentIgpuMultiplier) + if (currentBit == currentMultiplier) { IOLog("(%d) ", currentBit); } @@ -184,13 +169,92 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) } } } - } + +#if REPORT_GPU_STATS + if (igpuEnabled) + { + gTriggeredIGPUPStates = gIGPUMultipliers; + IOLog("] iGPU P-States [ "); + + for (currentBit = 1; currentBit <= 32; currentBit++) + { + value = (1ULL << currentBit); + + if ((gTriggeredIGPUPStates & value) == value) + { + if (currentBit == currentIgpuMultiplier) + { + IOLog("(%d) ", currentBit); + } + else + { + IOLog("%d ", currentBit); + } + } + } + } #endif + IOLog("]\n"); + } + +#if REPORT_C_STATES + if (gTriggeredC3Cores != gC3Cores) + { + gTriggeredC3Cores = gC3Cores; + IOLog("AICPUPMI: CPU C3-Cores [ "); + + for (currentBit = 0; currentBit <= 16; currentBit++) + { + value = (1ULL << currentBit); + + if ((gTriggeredC3Cores & value) == value) + { + IOLog("%d ", currentBit); + } + } + IOLog("]\n"); } - + + if (gTriggeredC6Cores != gC6Cores) + { + gTriggeredC6Cores = gC6Cores; + IOLog("AICPUPMI: CPU C6-Cores [ "); + + for (currentBit = 0; currentBit <= 16; currentBit++) + { + value = (1ULL << currentBit); + + if ((gTriggeredC6Cores & value) == value) + { + IOLog("%d ", currentBit); + } + } + + IOLog("]\n"); + } + + if (gTriggeredC7Cores != gC7Cores) + { + gTriggeredC7Cores = gC7Cores; + IOLog("AICPUPMI: CPU C7-Cores [ "); + + for (currentBit = 0; currentBit <= 16; currentBit++) + { + value = (1ULL << currentBit); + + if ((gTriggeredC7Cores & value) == value) + { + IOLog("%d ", currentBit); + } + } + + IOLog("]\n"); + } +#endif + loopLock = false; - + return kIOReturnSuccess; } @@ -215,42 +279,43 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) if (IOService::start(provider)) { simpleLock = IOSimpleLockAlloc(); - + if (simpleLock) { timerEventSource = IOTimerEventSource::timerEventSource(this, OSMemberFunctionCast(IOTimerEventSource::Action, this, &AppleIntelCPUPowerManagementInfo::loopTimerEvent)); workLoop = getWorkLoop(); - + if (timerEventSource && workLoop && (kIOReturnSuccess == workLoop->addEventSource(timerEventSource))) { this->registerService(0); - + UInt64 msr = rdmsr64(MSR_IA32_PERF_STS); gCoreMultipliers |= (1ULL << (msr >> 8)); - - wrmsr64(IA32_ENERGY_PERF_BIAS, 15); + + // wrmsr64(IA32_ENERGY_PERF_BIAS, 15); + // wrmsr64(MSR_IA32_PERF_CONTROL, 0x2000); uint32_t cpuid_reg[4]; do_cpuid(0x00000001, cpuid_reg); - + gCPUModel = bitfield32(cpuid_reg[eax], 7, 4) + (bitfield32(cpuid_reg[eax], 19, 16) << 4); - + // MWAIT information do_cpuid(0x00000005, cpuid_reg); uint32_t supportedMwaitCStates = bitfield32(cpuid_reg[edx], 31, 0); - + IOLog("AICPUPMI: MWAIT C-States : %d\n", supportedMwaitCStates); - + #if REPORT_MSRS reportMSRs(); #endif msr = rdmsr64(MSR_PLATFORM_INFO); gMinRatio = (UInt8)((msr >> 40) & 0xff); IOLog("AICPUPMI: Low Frequency Mode : %d00 MHz\n", gMinRatio); - + gClockRatio = (UInt8)((msr >> 8) & 0xff); IOLog("AICPUPMI: Clock Speed : %d00 MHz\n", gClockRatio); - + if (!((rdmsr64(IA32_MISC_ENABLES) >> 32) & 0x40)) // Turbo Mode Enabled? { msr = rdmsr64(MSR_TURBO_RATIO_LIMIT); @@ -262,39 +327,55 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) gMaxRatio = gClockRatio; IOLog("AICPUPMI: Max Frequency : %d00 MHz\n", gMaxRatio); } - + #if REPORT_GPU_STATS if ((READ_PCI8_NB(DEVEN) & DEVEN_D2EN_MASK)) { IOPhysicalAddress address = (IOPhysicalAddress)(0xFED10000 + 0x5948); memDescriptor = IOMemoryDescriptor::withPhysicalAddress(address, 0x53, kIODirectionInOut); - + if (memDescriptor != NULL) { if ((result = memDescriptor->prepare()) == kIOReturnSuccess) { memoryMap = memDescriptor->map(); - + if (memoryMap != NULL) { igpuEnabled = true; // IGPU Enabled and Visible gMchbar = (UInt8 *)memoryMap->getVirtualAddress(); - // Current RP-state, when the graphics engine is in RC6, this reflects the last used ratio. - IOLog("AICPUPMI: IGPU Current Freq..: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x01])); // RP_STATE_RAT IO + // Preventing a stupid (UEFI) BIOS limit. + if (gMchbar[0x4C] < gMchbar[0x50]) + { + gMchbar[0x4C] = gMchbar[0x50]; + } + + // + // Examples: + // 17 (multiplier) * 50 (frequency in MHz) = 850 MHz + // 22 (multiplier) * 50 (frequency in MHz) = 1100 MHz + // 6 P-States: 850, 900, 950, 1000, 1050 and 1100 MHz + // + // + // Current RP-State, when the graphics engine is in RC6, this reflects the last used ratio. + IOLog("AICPUPMI: IGPU Current Frequency..: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x01])); // RP_STATE_RATIO (CURRENT_FREQUENCY) // Maximum RPN base frequency capability for the Integrated GFX Engine (GT). - IOLog("AICPUPMI: IGPU Max Frequency.: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x52])); // RPN_CAP + IOLog("AICPUPMI: IGPU Min Frequency......: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x52])); // RPN_CAP (MIN_FREQUENCY) // Maximum RP1 base frequency capability for the Integrated GFX Engine (GT). - IOLog("AICPUPMI: IGPU Max Frequency.: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x51])); // RP1_CAP + IOLog("AICPUPMI: IGPU Max Non-Turbo Freq.: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x51])); // RP1_CAP (MAX_NON_TURBO) // Maximum RP0 base frequency capability for the Integrated GFX Engine (GT). - IOLog("AICPUPMI: IGPU Max Turbo Freq: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x50])); // RP0_CAP + IOLog("AICPUPMI: IGPU Max Turbo Frequency: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x50])); // RP0_CAP (MAX_TURBO)) + // Maximum base frequency limit for the Integrated GFX Engine (GT) allowed during run-time. - IOLog("AICPUPMI: IGPU Maximum limit.: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x4C])); // RPSTT_LIM - // - // Example-1: 17 (multiplier) * 50 (frequency in MHz) = 850 MHz - // Example-2: 22 (multiplier) * 50 (frequency in MHz) = 1100 MHz - // 6 P-States: 850, 900, 950, 1000, 1050 and 1100 MHz - // + if (gMchbar[0x4C] == 255) + { + IOLog("AICPUPMI: IGPU Maximum limit......: No Limit\n"); // RPSTT_LIM + } + else + { + IOLog("AICPUPMI: IGPU Maximum limit......: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x4C])); // RPSTT_LIM + } } else { @@ -312,13 +393,20 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) } } #endif + +#if REPORT_C_STATES + if ((gCPUModel == CPU_MODEL_SB_CORE) || (gCPUModel == CPU_MODEL_SB_JAKETOWN) || (gCPUModel == CPU_MODEL_HASWELL)) + { + gCheckC7 = true; + } +#endif timerEventSource->setTimeoutMS(1000); - + return true; } } } - + return false; } @@ -330,7 +418,7 @@ void AppleIntelCPUPowerManagementInfo::stop(IOService *provider) { IOSimpleLockFree(simpleLock); } - + if (timerEventSource) { if (workLoop) @@ -338,11 +426,11 @@ void AppleIntelCPUPowerManagementInfo::stop(IOService *provider) timerEventSource->cancelTimeout(); workLoop->removeEventSource(timerEventSource); } - + timerEventSource->release(); timerEventSource = NULL; } - + super::stop(provider); } @@ -358,7 +446,7 @@ void AppleIntelCPUPowerManagementInfo::free() memoryMap->release(); memoryMap = NULL; } - + if (memDescriptor) { memDescriptor->release(); @@ -366,6 +454,6 @@ void AppleIntelCPUPowerManagementInfo::free() } } #endif - + super::free(); -} +} \ No newline at end of file diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index f161451..034489e 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -23,6 +23,7 @@ #define REPORT_MSRS 1 #define REPORT_GPU_STATS 1 +#define REPORT_C_STATES 1 #define NB_BUS 0x00 #define NB_DEV 0x00 @@ -46,12 +47,12 @@ #define IGPU_RATIO_TO_FREQUENCY(ratio) ((ratio * 100) / 2) #define NB_PCI_CFG_ADDRESS(bus, dev, func, reg) \ - (UInt64) ((((UInt8)(bus) << 24) + ((UInt8)(dev) << 16) + \ - ((UInt8)(func) << 8) + ((UInt8)(reg))) & 0xffffffff) +(UInt64) ((((UInt8)(bus) << 24) + ((UInt8)(dev) << 16) + \ +((UInt8)(func) << 8) + ((UInt8)(reg))) & 0xffffffff) #define NB_PCIE_CFG_ADDRESS(bus, dev, func, reg) \ - ((UInt32)(PCIEX_BASE_ADDRESS + ((UInt8)(bus) << 20) + \ - ((UInt8)(dev) << 15) + ((UInt8)(func) << 12) + (reg))) +((UInt32)(PCIEX_BASE_ADDRESS + ((UInt8)(bus) << 20) + \ +((UInt8)(dev) << 15) + ((UInt8)(func) << 12) + (reg))) static __inline__ unsigned char inb(UInt16 port) { @@ -69,7 +70,8 @@ UInt8 ReadPci8(UInt8 Bus, UInt8 Dev, UInt8 Fun, UInt16 Reg) { if (Reg >= 0x100) { - return MMIO_READ8(NB_PCIE_CFG_ADDRESS(Bus, Dev, Fun, Reg)); + // return MMIO_READ8(NB_PCIE_CFG_ADDRESS(Bus, Dev, Fun, Reg)); + return MMIO_READ8((UInt64)NB_PCIE_CFG_ADDRESS(Bus, Dev, Fun, Reg)); } else { @@ -84,41 +86,41 @@ extern "C" int cpu_number(void); class AppleIntelCPUPowerManagementInfo : public IOService { OSDeclareDefaultStructors (AppleIntelCPUPowerManagementInfo); - + private: IOSimpleLock *simpleLock; IOWorkLoop *workLoop; IOTimerEventSource *timerEventSource; - + #if REPORT_GPU_STATS IOMemoryDescriptor *memDescriptor; IOMemoryMap *memoryMap; #endif - + IOReturn result = kIOReturnSuccess; - + virtual IOReturn loopTimerEvent(void); - + void reportMSRs(void); - + bool loopLock = false; - bool dumpCStates = false; - bool igpuEnabled = false; - + bool dumpCStates = true; + bool igpuEnabled = true; + UInt16 Interval = 50; - + UInt64 gCoreMultipliers = 0ULL; UInt64 gTriggeredPStates = 0ULL; - + UInt64 gIGPUMultipliers = 0ULL; UInt64 gTriggeredIGPUPStates = 0ULL; - + public: virtual IOService * probe(IOService * provider, SInt32 * score); virtual bool start(IOService * provider); virtual void stop(IOService * provider); virtual void free(void); - + UInt8 gMinRatio = 0; UInt8 gClockRatio = 0; UInt8 gMaxRatio = 0; @@ -129,6 +131,22 @@ OSDefineMetaClassAndStructors(AppleIntelCPUPowerManagementInfo, IOService) UInt8 gCPUModel = 0x2A; UInt8 gCoreStates = 0ULL; -#if REPORT_GPU_STATS - UInt8 * gMchbar = NULL; +#if REPORT_C_STATES +bool gCheckC3 = true; +bool gCheckC6 = true; +bool gCheckC7 = false; + +UInt32 gC3Cores = 0; +UInt32 gC6Cores = 0; +UInt32 gC7Cores = 0; + +UInt32 gTriggeredC3Cores = 0; +UInt32 gTriggeredC6Cores = 0; +UInt32 gTriggeredC7Cores = 0; #endif + +UInt64 gCoreMultipliers = 0ULL; + +#if REPORT_GPU_STATS +UInt8 * gMchbar = NULL; +#endif \ No newline at end of file From cf20c2cf2b827c3168d841309d5080cd8f71bac6 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 30 Dec 2013 11:29:18 +0100 Subject: [PATCH 423/623] Updating script to v7.3 (from Lexar) This is a major update and may not work for you. Please report all bugs per e-mail. Thank you! --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 2873 +++++++++++++------------- 1 file changed, 1478 insertions(+), 1395 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 61af213..c6a68f4 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -2,8 +2,8 @@ # # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # -# Version 0.9 - Copyright (c) 2012 by † RevoGirl -# Version 7.0 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 0.9 - Copyright (c) 2012 by RevoGirl +# Version 7.3 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -77,7 +77,7 @@ # - board-id's for new iMac14,[1/2/3] added (Pike, October 2013) # - board-id's for new MacBookPro11,[1/2/3] added (Pike, October 2013) # - Cleanups and board-id for new MacPro6,1 added (Pike, October 2013) -# - Frequency error in i7-4700MQ data fixed, thanks to RehabMan (Pike, November 2013) +# – Frequency error in i7-4700MQ data fixed, thanks to RehabMan (Pike, November 2013) # - Intel i5-4200M added (Pike, December 2013) # - LFM fixed in the Intel i7-3930K data (Pike, December 2013) # @@ -162,8 +162,9 @@ let gCallIasl=1 # let gCallOpen=0 -# -# Change this to 0 to stop it from injecting debug data. +# 0 = no debug injection/debug statements executed. +# 1 = inject debug data. +# 3 = inject debug data and execute _debugPrint statements. # let gDebug=1 @@ -186,7 +187,7 @@ gScope="\_PR_" # Other global variables. # -gScriptVersion=7.0 +gScriptVersion=7.3 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -219,6 +220,10 @@ gProcessorNumber="" gBusFrequency=100 let gUnmountEFIPartition=0 +gProductName=$(sw_vers -productName) +gProductVersion="$(sw_vers -productVersion)" +gBuildVersion=$(sw_vers -buildVersion) + # # Maximum Turbo Clock Speed (user configurable) # @@ -261,8 +266,8 @@ E3-1220,80,0,3100,3400,4,4 gDesktopSandyBridgeCPUList=( i7-35355,120,1600,2666,2666,4,4 # i7 Desktop Extreme Series -i7-3970X,150,0,3500,4000,6,12 -i7-3960X,130,0,3300,3900,6,12 +i7-3970X,150,1200,3500,4000,6,12 +i7-3960X,130,1200,3300,3900,6,12 i7-3930K,130,1200,3200,3800,6,12 i7-3820,130,0,3600,3800,4,8 # i7 Desktop series @@ -557,142 +562,157 @@ i3-4010Y,12,800,1300,1300,2,4 function _printHeader() { -echo '/*' > $gSsdtPR -echo ' * Intel ACPI Component Architecture' >> $gSsdtPR -echo ' * AML Disassembler version 20130210-00 [Feb 10 2013]' >> $gSsdtPR -echo ' * Copyright (c) 2000 - 2013 Intel Corporation' >> $gSsdtPR -echo ' * ' >> $gSsdtPR -echo ' * Original Table Header:' >> $gSsdtPR -echo ' * Signature "SSDT"' >> $gSsdtPR -echo ' * Length 0x0000036A (874)' >> $gSsdtPR -echo ' * Revision 0x01' >> $gSsdtPR -echo ' * Checksum 0x00' >> $gSsdtPR -echo ' * OEM ID "APPLE "' >> $gSsdtPR -echo ' * OEM Table ID "CpuPm"' >> $gSsdtPR -printf ' * OEM Revision '$gRevision' (%d)\n' $gRevision >> $gSsdtPR -echo ' * Compiler ID "INTL"' >> $gSsdtPR -echo ' * Compiler Version 0x20130210 (538116624)' >> $gSsdtPR -echo ' */' >> $gSsdtPR -echo '' >> $gSsdtPR -echo 'DefinitionBlock ("'$gSsdtID'.aml", "SSDT", 1, "APPLE ", "CpuPm", '$gRevision')' >> $gSsdtPR -echo '{' >> $gSsdtPR + echo '/*' > $gSsdtPR + echo ' * Intel ACPI Component Architecture' >> $gSsdtPR + echo ' * AML Disassembler version 20130210-00 [Feb 10 2013]' >> $gSsdtPR + echo ' * Copyright (c) 2000 - 2013 Intel Corporation' >> $gSsdtPR + echo ' * ' >> $gSsdtPR + echo ' * Original Table Header:' >> $gSsdtPR + echo ' * Signature "SSDT"' >> $gSsdtPR + echo ' * Length 0x0000036A (874)' >> $gSsdtPR + echo ' * Revision 0x01' >> $gSsdtPR + echo ' * Checksum 0x00' >> $gSsdtPR + echo ' * OEM ID "APPLE "' >> $gSsdtPR + echo ' * OEM Table ID "CpuPm"' >> $gSsdtPR + printf ' * OEM Revision '$gRevision' (%d)\n' $gRevision >> $gSsdtPR + echo ' * Compiler ID "INTL"' >> $gSsdtPR + echo ' * Compiler Version 0x20130210 (538116624)' >> $gSsdtPR + echo ' */' >> $gSsdtPR + echo '' >> $gSsdtPR + echo 'DefinitionBlock ("'$gSsdtID'.aml", "SSDT", 1, "APPLE ", "CpuPm", '$gRevision')' >> $gSsdtPR + echo '{' >> $gSsdtPR } #-------------------------------------------------------------------------------- function _printExternals() { -let currentCPU=0; + let currentCPU=0; -while [ $currentCPU -lt $gLogicalCPUs ]; do -echo ' External ('${gScope}'.'${gProcessorNames[$currentCPU]}', DeviceObj)' >> $gSsdtPR -let currentCPU+=1 -done + while [ $currentCPU -lt $gLogicalCPUs ]; do + echo ' External ('${gScope}'.'${gProcessorNames[$currentCPU]}', DeviceObj)' >> $gSsdtPR + let currentCPU+=1 + done -echo '' >> $gSsdtPR + echo '' >> $gSsdtPR } #-------------------------------------------------------------------------------- -function _printDebugInfo() +function _injectDebugInfo() { -if ((gDebug)); then -echo ' Store ("ssdtPRGen version: '$gScriptVersion'", Debug)' >> $gSsdtPR -echo ' Store ("baseFrequency : '$gBaseFrequency'", Debug)' >> $gSsdtPR -echo ' Store ("frequency : '$frequency'", Debug)' >> $gSsdtPR -echo ' Store ("busFrequency : '$gBusFrequency'", Debug)' >> $gSsdtPR -echo ' Store ("logicalCPUs : '$gLogicalCPUs'", Debug)' >> $gSsdtPR -echo ' Store ("tdp : '$gTdp'", Debug)' >> $gSsdtPR -echo ' Store ("packageLength : '$packageLength'", Debug)' >> $gSsdtPR -echo ' Store ("turboStates : '$turboStates'", Debug)' >> $gSsdtPR -echo ' Store ("maxTurboFrequency: '$maxTurboFrequency'", Debug)' >> $gSsdtPR -echo '' >> $gSsdtPR -fi + xcpm=0 + + # + # 'machdep.xcpm' is introduced in 10.8.5 + # + if [[ $productVersion > "10.8.4" ]]; then + xcpm=$(/usr/sbin/sysctl -n machdep.xcpm.mode) + fi + + echo ' Method (_INI, 0, NotSerialized)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Store ("ssdtPRGen version: '$gScriptVersion' / '$gProductName' '$gProductVersion' ('$gBuildVersion')", Debug)' >> $gSsdtPR + echo ' Store ("baseFrequency : '$gBaseFrequency'", Debug)' >> $gSsdtPR + echo ' Store ("frequency : '$frequency'", Debug)' >> $gSsdtPR + echo ' Store ("busFrequency : '$gBusFrequency'", Debug)' >> $gSsdtPR + echo ' Store ("logicalCPUs : '$gLogicalCPUs'", Debug)' >> $gSsdtPR + echo ' Store ("tdp : '$gTdp'", Debug)' >> $gSsdtPR + echo ' Store ("packageLength : '$packageLength'", Debug)' >> $gSsdtPR + echo ' Store ("turboStates : '$turboStates'", Debug)' >> $gSsdtPR + echo ' Store ("maxTurboFrequency: '$maxTurboFrequency'", Debug)' >> $gSsdtPR + echo ' Store ("machdep.xcpm.mode: '$xcpm'", Debug)' >> $gSsdtPR + echo ' }' >> $gSsdtPR + echo '' >> $gSsdtPR } #-------------------------------------------------------------------------------- function _printProcessorDefinitions() { -let currentCPU=0; + let currentCPU=0; -while [ $currentCPU -lt $1 ]; do -echo ' External ('${gScope}'.'${gProcessorNames[$currentCPU]}', DeviceObj)' >> $gSsdtPR -let currentCPU+=1 -done + while [ $currentCPU -lt $1 ]; do + echo ' External ('${gScope}'.'${gProcessorNames[$currentCPU]}', DeviceObj)' >> $gSsdtPR + let currentCPU+=1 + done -echo '' >> $gSsdtPR + echo '' >> $gSsdtPR } #-------------------------------------------------------------------------------- function _printScopeStart() { -let turboStates=$1 -let packageLength=$2 - -# TODO: Remove this when CPUPM for IB works properly! -let useWorkArounds=0 - -echo ' Scope ('${gScope}'.'${gProcessorNames[0]}')' >> $gSsdtPR -echo ' {' >> $gSsdtPR - -# -# Do we need to create additional (Low Frequency) P-States? -# - -if [ $gBridgeType -eq $IVY_BRIDGE ]; -then -let lowFrequencyPStates=($gBaseFrequency/100)-8 -let packageLength=($2+$lowFrequencyPStates) - -printf " Name (APLF, 0x%02x" $lowFrequencyPStates >> $gSsdtPR -echo ')' >> $gSsdtPR - -# TODO: Remove this when CPUPM for IB works properly! -if ((gIvyWorkAround)); then -let useWorkArounds=1 -fi -fi - -# -# Check number of Turbo states (for IASL optimization). -# - -if [ $turboStates -eq 0 ]; -then -# TODO: Remove this when CPUPM for IB works properly! -if (($useWorkArounds)); -then -echo ' Name (APSN, One)' >> $gSsdtPR -else -echo ' Name (APSN, Zero)' >> $gSsdtPR -fi -else -# TODO: Remove this when CPUPM for IB works properly! -if ((useWorkArounds)); then -let turboStates+=1 -fi - -printf " Name (APSN, 0x%02X)\n" $turboStates >> $gSsdtPR -fi - -# TODO: Remove this when CPUPM for IB works properly! -if (($useWorkArounds)); then -let packageLength+=1 -fi - -printf " Name (APSS, Package (0x%02X)\n" $packageLength >> $gSsdtPR -echo ' {' >> $gSsdtPR - -# TODO: Remove this when CPUPM for IB works properly! -if (($useWorkArounds)); then -let extraF=($maxTurboFrequency+1) -let maxTDP=($gTdp*1000) -let extraR=($maxTurboFrequency/100)+1 -echo " /* Workaround for the Ivy Bridge PM 'bug' */" >> $gSsdtPR -printf " Package (0x06) { 0x%04X, 0x%06X, 0x0A, 0x0A, 0x%02X00, 0x%02X00 },\n" $extraF $maxTDP $extraR $extraR >> $gSsdtPR -fi + let turboStates=$1 + let packageLength=$2 + + # TODO: Remove this when CPUPM for IB works properly! + let useWorkArounds=0 + + echo ' Scope ('${gScope}'.'${gProcessorNames[0]}')' >> $gSsdtPR + echo ' {' >> $gSsdtPR + + if (( gDebug & 1 )); then + _injectDebugInfo + fi + + # + # Do we need to create additional (Low Frequency) P-States? + # + + if [ $gBridgeType -ne $SANDY_BRIDGE ]; + then + let lowFrequencyPStates=($gBaseFrequency/100)-8 + let packageLength=($2+$lowFrequencyPStates) + + printf " Name (APLF, 0x%02x" $lowFrequencyPStates >> $gSsdtPR + echo ')' >> $gSsdtPR + + # TODO: Remove this when CPUPM for IB works properly! + if [[ gIvyWorkAround && $gBridgeType -eq $IVY_BRIDGE ]]; then + let useWorkArounds=1 + fi + fi + + # + # Check number of Turbo states (for IASL optimization). + # + + if [ $turboStates -eq 0 ]; + then + # TODO: Remove this when CPUPM for IB works properly! + if (($useWorkArounds)); + then + echo ' Name (APSN, One)' >> $gSsdtPR + else + echo ' Name (APSN, Zero)' >> $gSsdtPR + fi + else + # TODO: Remove this when CPUPM for IB works properly! + if ((useWorkArounds)); then + let turboStates+=1 + fi + + printf " Name (APSN, 0x%02X)\n" $turboStates >> $gSsdtPR + fi + + # TODO: Remove this when CPUPM for IB works properly! + if (($useWorkArounds)); then + let packageLength+=1 + fi + + printf " Name (APSS, Package (0x%02X)\n" $packageLength >> $gSsdtPR + echo ' {' >> $gSsdtPR + + # TODO: Remove this when CPUPM for IB works properly! + if (($useWorkArounds)); then + let extraF=($maxTurboFrequency+1) + let maxTDP=($gTdp*1000) + let extraR=($maxTurboFrequency/100)+1 + echo " /* Workaround for the Ivy Bridge PM 'bug' */" >> $gSsdtPR + printf " Package (0x06) { 0x%04X, 0x%06X, 0x0A, 0x0A, 0x%02X00, 0x%02X00 },\n" $extraF $maxTDP $extraR $extraR >> $gSsdtPR + fi } @@ -700,102 +720,119 @@ fi function _printPackages() { -let maxTDP=($1*1000) -local maxNonTurboFrequency=$2 -local frequency=$3 - -let minRatio=($gBaseFrequency/$gBusFrequency) -let p1Ratio=($maxNonTurboFrequency/$gBusFrequency) -let ratio=($frequency/$gBusFrequency) -let powerRatio=($p1Ratio-1) - -# -# Do we need to create additional (Low Frequency) P-States for Ivy bridge? -# -if [ $gBridgeType -eq $IVY_BRIDGE ]; then -let minRatio=8 -fi - -if (($turboStates)); then -echo ' /* High Frequency Modes (turbo) */' >> $gSsdtPR -fi - -while [ $ratio -ge $minRatio ]; -do -if [ $frequency -eq $gBaseFrequency ]; -then -echo ' /* Low Frequency Mode */' >> $gSsdtPR -fi - -if [ $frequency -eq $maxNonTurboFrequency ]; -then -echo ' /* High Frequency Modes (non-turbo) */' >> $gSsdtPR -fi - -printf " Package (0x06) { 0x%04X, " $frequency >> $gSsdtPR - -if [ $frequency -lt $maxNonTurboFrequency ]; -then -power=$(echo "scale=6;m=((1.1-(($p1Ratio-$powerRatio)*0.00625))/1.1);(($powerRatio/$p1Ratio)*(m*m)*$maxTDP);" | bc | sed -e 's/.[0-9A-F]*$//') -let powerRatio-=1 -else -power=$maxTDP -fi - -if [ $frequency -ge $gBaseFrequency ]; -then -printf "0x%06X, " $power >> $gSsdtPR -else -printf ' Zero, ' >> $gSsdtPR -fi - -printf "0x0A, 0x0A, 0x%02X00, 0x%02X00 }" $ratio $ratio >> $gSsdtPR - -let ratio-=1 -let frequency-=$gBusFrequency + let maxTDP=($1*1000) + local maxNonTurboFrequency=$2 + local frequency=$3 + + let minRatio=($gBaseFrequency/$gBusFrequency) + let p1Ratio=($maxNonTurboFrequency/$gBusFrequency) + let ratio=($frequency/$gBusFrequency) + let powerRatio=($p1Ratio-1) + + # + # Do we need to create additional (Low Frequency) P-States for Ivy bridge? + # + if [ $gBridgeType -eq $IVY_BRIDGE ]; then + let minRatio=8 + fi + + if (($turboStates)); then + echo ' /* High Frequency Modes (turbo) */' >> $gSsdtPR + fi + + while [ $ratio -ge $minRatio ]; + do + if [ $frequency -eq $gBaseFrequency ]; + then + echo ' /* Low Frequency Mode */' >> $gSsdtPR + fi + + if [ $frequency -eq $maxNonTurboFrequency ]; + then + echo ' /* High Frequency Modes (non-turbo) */' >> $gSsdtPR + fi + + printf " Package (0x06) { 0x%04X, " $frequency >> $gSsdtPR + + if [ $frequency -lt $maxNonTurboFrequency ]; + then + power=$(echo "scale=6;m=((1.1-(($p1Ratio-$powerRatio)*0.00625))/1.1);(($powerRatio/$p1Ratio)*(m*m)*$maxTDP);" | bc | sed -e 's/.[0-9A-F]*$//') + let powerRatio-=1 + else + power=$maxTDP + fi + + if [ $frequency -ge $gBaseFrequency ]; + then + printf "0x%06X, " $power >> $gSsdtPR + else + printf ' Zero, ' >> $gSsdtPR + fi + + printf "0x0A, 0x0A, 0x%02X00, 0x%02X00 }" $ratio $ratio >> $gSsdtPR + + let ratio-=1 + let frequency-=$gBusFrequency + + if [ $ratio -ge $minRatio ]; + then + echo ',' >> $gSsdtPR + else + echo '' >> $gSsdtPR + fi + + done + + echo ' })' >> $gSsdtPR +} -if [ $ratio -ge $minRatio ]; -then -echo ',' >> $gSsdtPR -else -echo '' >> $gSsdtPR -fi -done +#-------------------------------------------------------------------------------- -echo ' })' >> $gSsdtPR -echo '' >> $gSsdtPR +function _printMethodDSM() +{ + # + # New stand-alone version of Method _DSM - Copyright (c) 2009 by Master Chief + # + echo '' >> $gSsdtPR + echo ' Method (_DSM, 4, NotSerialized)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + + if ((gDebug)); then + # + # Note: This will be called twice! + # + echo ' Store ("Method '${gProcessorNames[0]}'._DSM Called", Debug)' >> $gSsdtPR + echo '' >> $gSsdtPR + fi + + echo ' If (LEqual (Arg2, Zero))' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Return (Buffer (One)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' 0x03' >> $gSsdtPR + echo ' })' >> $gSsdtPR + echo ' }' >> $gSsdtPR + echo '' >> $gSsdtPR + # + # This property is required to get X86Platform[Plugin/Shim].kext loaded. + # + echo ' Return (Package (0x02)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' "plugin-type",' >> $gSsdtPR + echo ' One' >> $gSsdtPR + echo ' })' >> $gSsdtPR + echo ' }' >> $gSsdtPR + echo ' }' >> $gSsdtPR } - #-------------------------------------------------------------------------------- -function _printMethodDSM() +function _debugPrint() { -# -# New stand-alone version of Method _DSM - Copyright (c) 2009 by Master Chief -# -echo '' >> $gSsdtPR -echo ' Method (_DSM, 4, NotSerialized)' >> $gSsdtPR -echo ' {' >> $gSsdtPR -echo ' If (LEqual (Arg2, Zero))' >> $gSsdtPR -echo ' {' >> $gSsdtPR -echo ' Return (Buffer (One)' >> $gSsdtPR -echo ' {' >> $gSsdtPR -echo ' 0x03' >> $gSsdtPR -echo ' })' >> $gSsdtPR -echo ' }' >> $gSsdtPR -echo '' >> $gSsdtPR -# -# This property is required to get X86Platform[Plugin/Shim].kext loaded. -# -echo ' Return (Package (0x02)' >> $gSsdtPR -echo ' {' >> $gSsdtPR -echo ' "plugin-type",' >> $gSsdtPR -echo ' One' >> $gSsdtPR -echo ' })' >> $gSsdtPR -echo ' }' >> $gSsdtPR -echo ' }' >> $gSsdtPR + if (( gDebug & 2 )); then + echo "$1" + fi } #-------------------------------------------------------------------------------- @@ -814,223 +851,240 @@ function _printScopeACST() # # Note: C-state latency in uS and C-state power in mW. -let C1=0 -let C2=0 -let C3=0 -let C6=0 -let C7=0 -local pkgLength=2 -local numberOfCStates=0 - -# echo '' >> $gSsdtPR -echo ' Method (ACST, 0, NotSerialized)' >> $gSsdtPR -echo ' {' >> $gSsdtPR - -# -# Are we injecting C-States for CPU1? -# -if [ $1 -eq 1 ]; -then -# Yes (also used by CPU2, CPU3 and greater). -let targetCStates=$gACST_CPU1 -latency_C1=0x03E8 -latency_C2=0x94 -latency_C3=0xC6 - -if ((gDebug)); then -echo ' Store ("'${gProcessorNames[1]}' C-States : '$targetCStates'", Debug)' >> $gSsdtPR -echo '' >> $gSsdtPR -fi -else -# -# C-States override for Mobile processors (CPU0 only) -# -if (($gTypeCPU == $gMobileCPU)); then -echo 'Adjusting C-States for detected (mobile) processor' -gACST_CPU0=29 -fi - -let targetCStates=$gACST_CPU0 -latency_C1=Zero -latency_C3=0xCD -latency_C6=0xF5 -latency_C7=0xF5 - -if ((gDebug)); then -echo ' Store ("'${gProcessorNames[0]}' C-States : '$targetCStates'", Debug)' >> $gSsdtPR -echo '' >> $gSsdtPR -fi -fi - -# -# Checks to determine which C-State(s) we should inject. -# -if (($targetCStates & 1)); then -let C1=1 -let numberOfCStates+=1 -let pkgLength+=1 -fi - -if (($targetCStates & 2)); then -let C2=1 -let numberOfCStates+=1 -let pkgLength+=1 -fi - -if (($targetCStates & 4)); then -let C3=1 -let numberOfCStates+=1 -let pkgLength+=1 -fi - -if (($targetCStates & 8)); then -let C6=1 -let numberOfCStates+=1 -let pkgLength+=1 -fi - -if (($targetCStates & 16)); then -let C7=1 -let numberOfCStates+=1 -let pkgLength+=1 -fi - -let hintCode=0x00 - -echo " /* Low Power Modes for ${gProcessorNames[$1]} */" >> $gSsdtPR -printf " Return (Package (0x%02x)\n" $pkgLength >> $gSsdtPR -echo ' {' >> $gSsdtPR -echo ' One,' >> $gSsdtPR -printf " 0x%02x,\n" $numberOfCStates >> $gSsdtPR -echo ' Package (0x04)' >> $gSsdtPR -echo ' {' >> $gSsdtPR -echo ' ResourceTemplate ()' >> $gSsdtPR -echo ' {' >> $gSsdtPR -echo ' Register (FFixedHW,' >> $gSsdtPR -echo ' 0x01, // Bit Width' >> $gSsdtPR -echo ' 0x02, // Bit Offset' >> $gSsdtPR -printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR -echo ' 0x01, // Access Size' >> $gSsdtPR -echo ' )' >> $gSsdtPR -echo ' },' >> $gSsdtPR -echo ' One,' >> $gSsdtPR -echo ' '$latency_C1',' >> $gSsdtPR -echo ' 0x03E8' >> $gSsdtPR - -if (($C2)); then -let hintCode+=0x10 -echo ' },' >> $gSsdtPR -echo '' >> $gSsdtPR -echo ' Package (0x04)' >> $gSsdtPR -echo ' {' >> $gSsdtPR -echo ' ResourceTemplate ()' >> $gSsdtPR -echo ' {' >> $gSsdtPR -echo ' Register (FFixedHW,' >> $gSsdtPR -echo ' 0x01, // Bit Width' >> $gSsdtPR -echo ' 0x02, // Bit Offset' >> $gSsdtPR -printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR -echo ' 0x03, // Access Size' >> $gSsdtPR -echo ' )' >> $gSsdtPR -echo ' },' >> $gSsdtPR -echo ' 0x02,' >> $gSsdtPR -echo ' '$latency_C2',' >> $gSsdtPR -echo ' 0x01F4' >> $gSsdtPR -fi - -if (($C3)); then -let hintCode+=0x10 -local power_C3=0x01F4 -# -# Is this for CPU1? -# -if (($1)); then -if [[ ${modelID:0:7} == "iMac13," ]]; -then -local power_C3=0x15E -latency_C3=0xA9 -else -local power_C3=0xC8 -let hintCode+=0x10 -fi -fi - -echo ' },' >> $gSsdtPR -echo '' >> $gSsdtPR -echo ' Package (0x04)' >> $gSsdtPR -echo ' {' >> $gSsdtPR -echo ' ResourceTemplate ()' >> $gSsdtPR -echo ' {' >> $gSsdtPR -echo ' Register (FFixedHW,' >> $gSsdtPR -echo ' 0x01, // Bit Width' >> $gSsdtPR -echo ' 0x02, // Bit Offset' >> $gSsdtPR -printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR -echo ' 0x03, // Access Size' >> $gSsdtPR -echo ' )' >> $gSsdtPR -echo ' },' >> $gSsdtPR -echo ' 0x03,' >> $gSsdtPR -echo ' '$latency_C3',' >> $gSsdtPR -echo ' '$power_C3 >> $gSsdtPR -fi - -if (($C6)); then -let hintCode+=0x10 -echo ' },' >> $gSsdtPR -echo '' >> $gSsdtPR -echo ' Package (0x04)' >> $gSsdtPR -echo ' {' >> $gSsdtPR -echo ' ResourceTemplate ()' >> $gSsdtPR -echo ' {' >> $gSsdtPR -echo ' Register (FFixedHW,' >> $gSsdtPR -echo ' 0x01, // Bit Width' >> $gSsdtPR -echo ' 0x02, // Bit Offset' >> $gSsdtPR -printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR -echo ' 0x03, // Access Size' >> $gSsdtPR -echo ' )' >> $gSsdtPR -echo ' },' >> $gSsdtPR -echo ' 0x06,' >> $gSsdtPR -echo ' '$latency_C6',' >> $gSsdtPR -echo ' 0x015E' >> $gSsdtPR -fi - -if (($C7)); then -# -# If $hintCode is already 0x30 then use 0x31 otherwise 0x30 -# -if [ $hintCode -eq 48 ]; -then -let hintCode+=0x01 -else -let hintCode+=0x10 -fi -echo ' },' >> $gSsdtPR -echo '' >> $gSsdtPR -echo ' Package (0x04)' >> $gSsdtPR -echo ' {' >> $gSsdtPR -echo ' ResourceTemplate ()' >> $gSsdtPR -echo ' {' >> $gSsdtPR -echo ' Register (FFixedHW,' >> $gSsdtPR -echo ' 0x01, // Bit Width' >> $gSsdtPR -echo ' 0x02, // Bit Offset' >> $gSsdtPR -printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR -echo ' 0x03, // Access Size' >> $gSsdtPR -echo ' )' >> $gSsdtPR -echo ' },' >> $gSsdtPR -echo ' 0x07,' >> $gSsdtPR -echo ' '$latency_C7',' >> $gSsdtPR -echo ' 0xC8' >> $gSsdtPR -fi - -echo ' }' >> $gSsdtPR -echo ' })' >> $gSsdtPR -echo ' }' >> $gSsdtPR - -# -# We don't need a closing bracket here when we add method _DSM for Ivy Bridge. -# - -if [ $gBridgeType -eq $SANDY_BRIDGE ]; then -echo ' }' >> $gSsdtPR -fi + let C1=0 + let C2=0 + let C3=0 + let C6=0 + let C7=0 + local pkgLength=2 + local numberOfCStates=0 + + # + # Are we injecting C-States for CPU1? + # + if [ $1 -eq 1 ]; + then + let targetCPU=1 + else + let targetCPU=0 + fi + + echo '' >> $gSsdtPR + echo ' Method (ACST, 0, NotSerialized)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + + if ((gDebug)); then + echo ' Store ("Method '${gProcessorNames[$targetCPU]}'.ACST Called", Debug)' >> $gSsdtPR + fi + + # + # Are we injecting C-States for CPU1? + # + if [ $targetCPU -eq 1 ]; + then + # Yes (also used by CPU2, CPU3 and greater). + let targetCStates=$gACST_CPU1 + latency_C1=0x03E8 + latency_C2=0x94 + latency_C3=0xC6 + else + # + # C-States override for Mobile processors (CPU0 only) + # + if (($gTypeCPU == $gMobileCPU)); then + echo 'Adjusting C-States for detected (mobile) processor' + let gACST_CPU0=29 + fi + + let targetCStates=$gACST_CPU0 + latency_C1=Zero + latency_C3=0xCD + latency_C6=0xF5 + latency_C7=0xF5 + fi + + if ((gDebug)); then + echo ' Store ("'${gProcessorNames[$targetCPU]}' C-States : '$targetCStates'", Debug)' >> $gSsdtPR + echo '' >> $gSsdtPR + fi + + + _debugPrint "targetCStates: $targetCStates" + + # + # Checks to determine which C-State(s) we should inject. + # + if (($targetCStates & 1)); then + _debugPrint "Adding C1" + let C1=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi + + if (($targetCStates & 2)); then + _debugPrint "Adding C2" + let C2=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi + + if (($targetCStates & 4)); then + _debugPrint "Adding C3" + let C3=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi + + if (($targetCStates & 8)); then + _debugPrint "Adding C6" + let C6=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi + + if ((($targetCStates & 16) == 16)); then + _debugPrint "Adding C7" + let C7=1 + let numberOfCStates+=1 + let pkgLength+=1 + fi + + let hintCode=0x00 + + echo " /* Low Power Modes for ${gProcessorNames[$1]} */" >> $gSsdtPR + printf " Return (Package (0x%02x)\n" $pkgLength >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' One,' >> $gSsdtPR + printf " 0x%02x,\n" $numberOfCStates >> $gSsdtPR + echo ' Package (0x04)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' ResourceTemplate ()' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Register (FFixedHW,' >> $gSsdtPR + echo ' 0x01, // Bit Width' >> $gSsdtPR + echo ' 0x02, // Bit Offset' >> $gSsdtPR + printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR + echo ' 0x01, // Access Size' >> $gSsdtPR + echo ' )' >> $gSsdtPR + echo ' },' >> $gSsdtPR + echo ' One,' >> $gSsdtPR + echo ' '$latency_C1',' >> $gSsdtPR + echo ' 0x03E8' >> $gSsdtPR + + if (($C2)); then + let hintCode+=0x10 + echo ' },' >> $gSsdtPR + echo '' >> $gSsdtPR + echo ' Package (0x04)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' ResourceTemplate ()' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Register (FFixedHW,' >> $gSsdtPR + echo ' 0x01, // Bit Width' >> $gSsdtPR + echo ' 0x02, // Bit Offset' >> $gSsdtPR + printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR + echo ' 0x03, // Access Size' >> $gSsdtPR + echo ' )' >> $gSsdtPR + echo ' },' >> $gSsdtPR + echo ' 0x02,' >> $gSsdtPR + echo ' '$latency_C2',' >> $gSsdtPR + echo ' 0x01F4' >> $gSsdtPR + fi + + if (($C3)); then + let hintCode+=0x10 + local power_C3=0x01F4 + # + # Is this for CPU1? + # + if (($1)); then + if [[ ${modelID:0:7} == "iMac13," ]]; + then + local power_C3=0x15E + latency_C3=0xA9 + else + local power_C3=0xC8 + let hintCode+=0x10 + fi + fi + + echo ' },' >> $gSsdtPR + echo '' >> $gSsdtPR + echo ' Package (0x04)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' ResourceTemplate ()' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Register (FFixedHW,' >> $gSsdtPR + echo ' 0x01, // Bit Width' >> $gSsdtPR + echo ' 0x02, // Bit Offset' >> $gSsdtPR + printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR + echo ' 0x03, // Access Size' >> $gSsdtPR + echo ' )' >> $gSsdtPR + echo ' },' >> $gSsdtPR + echo ' 0x03,' >> $gSsdtPR + echo ' '$latency_C3',' >> $gSsdtPR + echo ' '$power_C3 >> $gSsdtPR + fi + + if (($C6)); then + let hintCode+=0x10 + echo ' },' >> $gSsdtPR + echo '' >> $gSsdtPR + echo ' Package (0x04)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' ResourceTemplate ()' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Register (FFixedHW,' >> $gSsdtPR + echo ' 0x01, // Bit Width' >> $gSsdtPR + echo ' 0x02, // Bit Offset' >> $gSsdtPR + printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR + echo ' 0x03, // Access Size' >> $gSsdtPR + echo ' )' >> $gSsdtPR + echo ' },' >> $gSsdtPR + echo ' 0x06,' >> $gSsdtPR + echo ' '$latency_C6',' >> $gSsdtPR + echo ' 0x015E' >> $gSsdtPR + fi + + if (($C7)); then + # + # If $hintCode is already 0x30 then use 0x31 otherwise 0x30 + # + if [ $hintCode -eq 48 ]; + then + let hintCode+=0x01 + else + let hintCode+=0x10 + fi + echo ' },' >> $gSsdtPR + echo '' >> $gSsdtPR + echo ' Package (0x04)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' ResourceTemplate ()' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Register (FFixedHW,' >> $gSsdtPR + echo ' 0x01, // Bit Width' >> $gSsdtPR + echo ' 0x02, // Bit Offset' >> $gSsdtPR + printf " 0x%016x, // Address\n" $hintCode >> $gSsdtPR + echo ' 0x03, // Access Size' >> $gSsdtPR + echo ' )' >> $gSsdtPR + echo ' },' >> $gSsdtPR + echo ' 0x07,' >> $gSsdtPR + echo ' '$latency_C7',' >> $gSsdtPR + echo ' 0xC8' >> $gSsdtPR + fi + + echo ' }' >> $gSsdtPR + echo ' })' >> $gSsdtPR + echo ' }' >> $gSsdtPR + + # + # We don't need a closing bracket here when we add method _DSM for Ivy Bridge. + # + + if [ $gBridgeType -eq $SANDY_BRIDGE ]; then + echo ' }' >> $gSsdtPR + fi } @@ -1038,331 +1092,351 @@ fi function _printScopeCPUn() { -let currentCPU=1; - -while [ $currentCPU -lt $gLogicalCPUs ]; do -echo '' >> $gSsdtPR -echo ' Scope ('${gScope}'.'${gProcessorNames[$currentCPU]}')' >> $gSsdtPR -echo ' {' >> $gSsdtPR -echo ' Method (APSS, 0, NotSerialized) { Return ('${gScope}'.'${gProcessorNames[0]}'.APSS) }' >> $gSsdtPR - -# -# IB CPUPM tries to parse/execute CPUn.ACST (see debug data) and thus we add -# this method, conditionally, since SB CPUPM doesn't seem to care about it. -# -if [ $gBridgeType -ge $IVY_BRIDGE ]; then -if [ $currentCPU -eq 1 ]; -then -_printScopeACST 1 -else -echo ' Method (ACST, 0, NotSerialized) { Return ('${gScope}'.'${gProcessorNames[1]}'.ACST ()) }' >> $gSsdtPR -fi -fi - -echo ' }' >> $gSsdtPR -let currentCPU+=1 -done - -echo '}' >> $gSsdtPR + let currentCPU=1; + + while [ $currentCPU -lt $gLogicalCPUs ]; do + echo '' >> $gSsdtPR + echo ' Scope ('${gScope}'.'${gProcessorNames[$currentCPU]}')' >> $gSsdtPR + echo ' {' >> $gSsdtPR + echo ' Method (APSS, 0, NotSerialized)' >> $gSsdtPR + echo ' {' >> $gSsdtPR + + if ((gDebug)); then + echo ' Store ("Method '${gProcessorNames[$currentCPU]}'.APSS Called", Debug)' >> $gSsdtPR + echo '' >> $gSsdtPR + fi + + echo ' Return ('${gScope}'.'${gProcessorNames[0]}'.APSS)' >> $gSsdtPR + echo ' }' >> $gSsdtPR + + # + # IB CPUPM tries to parse/execute CPUn.ACST (see debug data) and thus we add + # this method, conditionally, since SB CPUPM doesn't seem to care about it. + # + if [ $gBridgeType -ge $IVY_BRIDGE ]; then + if [ $currentCPU -eq 1 ]; + then + _printScopeACST 1 + else + echo '' >> $gSsdtPR + echo ' Method (ACST, 0, NotSerialized) { Return ('${gScope}'.'${gProcessorNames[1]}'.ACST ()) }' >> $gSsdtPR + fi + fi + + echo ' }' >> $gSsdtPR + let currentCPU+=1 + done + + echo '}' >> $gSsdtPR } #-------------------------------------------------------------------------------- function _getModelName() { -# -# Grab 'compatible' property from ioreg (stripped with sed / RegEX magic). -# -echo `ioreg -p IODeviceTree -d 2 -k compatible | grep compatible | sed -e 's/ *["=<>]//g' -e 's/compatible//'` + # + # Grab 'compatible' property from ioreg (stripped with sed / RegEX magic). + # + echo `ioreg -p IODeviceTree -d 2 -k compatible | grep compatible | sed -e 's/ *["=<>]//g' -e 's/compatible//'` } #-------------------------------------------------------------------------------- function _getBoardID() { -# -# Grab 'board-id' property from ioreg (stripped with sed / RegEX magic). -# -boardID=$(ioreg -p IODeviceTree -d 2 -k board-id | grep board-id | sed -e 's/ *["=<>]//g' -e 's/board-id//') + # + # Grab 'board-id' property from ioreg (stripped with sed / RegEX magic). + # + boardID=$(ioreg -p IODeviceTree -d 2 -k board-id | grep board-id | sed -e 's/ *["=<>]//g' -e 's/board-id//') } #-------------------------------------------------------------------------------- function _getProcessorNames() { -local acpiNames=$(ioreg -p IODeviceTree -c IOACPIPlatformDevice -k cpu-type | egrep name | sed -e 's/ *[-|="<a-z>]//g') -gProcessorNames=($acpiNames) + local acpiNames=$(ioreg -p IODeviceTree -c IOACPIPlatformDevice -k cpu-type | egrep name | sed -e 's/ *[-|="<a-z>]//g') + gProcessorNames=($acpiNames) -if [[ ${#gProcessorNames[@]} -lt 2 ]]; then -_exitWithError $PROCESSOR_NAMES_ERROR -fi + if [[ ${#gProcessorNames[@]} -lt 2 ]]; then + _exitWithError $PROCESSOR_NAMES_ERROR + fi } #-------------------------------------------------------------------------------- function _updateProcessorNames() { -if [[ $gLogicalCPUs -le 0x0f ]]; -then -local label=${gProcLabel:0:3} -else -local label=${gProcLabel:0:2} -fi - -if [[ $1 -gt ${#gProcessorNames[@]} ]]; then -echo -e "\nWarning: Target CPU has $gLogicalCPUs logical cores, the running system only ${#gProcessorNames[@]}" -echo " Now using '$label' to extent the current range to $gLogicalCPUs..." -echo -e " You may want to check/verify the generated $gSsdtID.dsl\n" -fi - -let currentCPU=0 - -while [ $currentCPU -lt $1 ]; -do -if [[ $1 -gt 0x0f && $currentCPU -le 0x0f ]]; -then -local filler='0' -else -local filler='' -fi - -gProcessorNames[$currentCPU]=${label}${filler}$(echo "obase=16; ${currentCPU}" | bc) - -let currentCPU+=1 -done + if [[ $gLogicalCPUs -le 0x0f ]]; + then + local label=${gProcLabel:0:3} + else + local label=${gProcLabel:0:2} + fi + + if [[ $1 -gt ${#gProcessorNames[@]} ]]; then + echo -e "\nWarning: Target CPU has $gLogicalCPUs logical cores, the running system only ${#gProcessorNames[@]}" + echo " Now using '$label' to extent the current range to $gLogicalCPUs..." + echo -e " You may want to check/verify the generated $gSsdtID.dsl\n" + fi + + let currentCPU=0 + + while [ $currentCPU -lt $1 ]; + do + if [[ $1 -gt 0x0f && $currentCPU -le 0x0f ]]; + then + local filler='0' + else + local filler='' + fi + + gProcessorNames[$currentCPU]=${label}${filler}$(echo "obase=16; ${currentCPU}" | bc) + + let currentCPU+=1 + done } #-------------------------------------------------------------------------------- function _getProcessorScope() { -# -# We run egrep twice here for Snow Leopard compatibility, otherwise it fails. -# -if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 -w0 | egrep -o 'DSDT"=<[0-9a-f]+' | egrep -o '5b830b') ]]; then -printf 'Processor Declaration(s) Found in DSDT' -fi - -if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 -w0 | egrep -o 'DSDT"=<[0-9a-f]+' | egrep -o '5f50525f') ]]; -then -gScope="\_PR_" -echo ' (ACPI 1.0 compliant)' -else -gScope="\_SB_" -fi + # + # We run egrep twice here for Snow Leopard compatibility, otherwise it fails. + # + if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 -w0 | egrep -o 'DSDT"=<[0-9a-f]+' | egrep -o '5b830b') ]]; then + printf 'Processor Declaration(s) Found in DSDT' + fi + + if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 -w0 | egrep -o 'DSDT"=<[0-9a-f]+' | egrep -o '5f50525f') ]]; + then + gScope="\_PR_" + echo ' (ACPI 1.0 compliant)' + return + else + gScope="\_SB_" + return + fi + # + # Additional/experimental code for support of broken ACPI tables. + # + if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 -w0 | egrep -o 'DSDT"=<[0-9a-f]+' | egrep -o '5f5052') ]]; + then + gScope="\_PR_" + echo ' (ACPI 1.0 compliant)' + fi } #-------------------------------------------------------------------------------- function _getCPUtype() { -# -# Grab 'cpu-type' property from ioreg (stripped with sed / RegEX magic). -# -local grepStr=$(ioreg -p IODeviceTree -n "${gProcessorNames[0]}"@0 -k cpu-type | grep cpu-type | sed -e 's/ *[-|="<a-z>]//g') - -# Swap bytes with help of ${str:pos:num} -# -echo ${grepStr:2:2}${grepStr:0:2} + # + # Grab 'cpu-type' property from ioreg (stripped with sed / RegEX magic). + # + local grepStr=$(ioreg -p IODeviceTree -n "${gProcessorNames[0]}"@0 -k cpu-type | grep cpu-type | sed -e 's/ *[-|="<a-z>]//g') + + # Swap bytes with help of ${str:pos:num} + # + echo ${grepStr:2:2}${grepStr:0:2} } #-------------------------------------------------------------------------------- function _getCPUModel() { -# -# Returns the hexadecimal value of machdep.cpu.model -# -echo 0x$(echo "obase=16; `sysctl machdep.cpu.model | sed -e 's/^machdep.cpu.model: //'`" | bc) + # + # Returns the hexadecimal value of machdep.cpu.model + # + echo 0x$(echo "obase=16; `sysctl machdep.cpu.model | sed -e 's/^machdep.cpu.model: //'`" | bc) } #-------------------------------------------------------------------------------- function _getCPUSignature() { -# -# Returns the hexadecimal value of machdep.cpu.signature -# -echo 0x$(echo "obase=16; `sysctl machdep.cpu.signature | sed -e 's/^machdep.cpu.signature: //'`" | bc) + # + # Returns the hexadecimal value of machdep.cpu.signature + # + echo 0x$(echo "obase=16; `sysctl machdep.cpu.signature | sed -e 's/^machdep.cpu.signature: //'`" | bc) } #-------------------------------------------------------------------------------- function _getSystemType() { -# -# Grab 'system-type' property from ioreg (stripped with sed / RegEX magic). -# -# Note: This property is checked (cmpb $0x02) in X86PlatformPlugin::configResourceCallback -# -echo `ioreg -p IODeviceTree -d 2 -k system-type | grep system-type | sed -e 's/ *[-="<0a-z>]//g'` + # + # Grab 'system-type' property from ioreg (stripped with sed / RegEX magic). + # + # Note: This property is checked (cmpb $0x02) in X86PlatformPlugin::configResourceCallback + # + echo `ioreg -p IODeviceTree -d 2 -k system-type | grep system-type | sed -e 's/ *[-="<0a-z>]//g'` } #-------------------------------------------------------------------------------- function _findIasl() { -if (($gCallIasl)); then -# -# Then we do a quick lookup of iasl (should also be there after the first run) -# -if [ ! -f /usr/local/bin/iasl ]; then -printf "\nIASL not found. " -# -# First we check the target directory (should be there after the first run) -# -# XXX: Jeroen, try curl --create-dirs without the mkdir here ;) -if [ ! -d /usr/local/bin ]; then -printf "Creating target directory... " -sudo mkdir -p /usr/local/bin/ -sudo chown -R root:wheel /usr/local/bin/ -fi - -printf "Downloading iasl...\n" -sudo curl -o /usr/local/bin/iasl https://raw.github.com/Piker-Alpha/RevoBoot/clang/i386/libsaio/acpi/Tools/iasl + if (($gCallIasl)); then + # + # Then we do a quick lookup of iasl (should also be there after the first run) + # + if [ ! -f /usr/local/bin/iasl ]; then + printf "\nIASL not found. " + # + # First we check the target directory (should be there after the first run) + # + # XXX: Jeroen, try curl --create-dirs without the mkdir here ;) + if [ ! -d /usr/local/bin ]; then + printf "Creating target directory... " + sudo mkdir -p /usr/local/bin/ + sudo chown -R root:wheel /usr/local/bin/ + fi + + printf "Downloading iasl...\n" + sudo curl -o /usr/local/bin/iasl https://raw.github.com/Piker-Alpha/RevoBoot/clang/i386/libsaio/acpi/Tools/iasl # sudo curl https://raw.github.com/Piker-Alpha/RevoBoot/clang/i386/libsaio/acpi/Tools/iasl -o /usr/local/bin/iasl --create-dirs -sudo chmod +x /usr/local/bin/iasl -echo 'Done.' -fi + sudo chmod +x /usr/local/bin/iasl + echo 'Done.' + fi -iasl=/usr/local/bin/iasl -fi + iasl=/usr/local/bin/iasl + fi } #-------------------------------------------------------------------------------- function _setDestinationPath { -# -# Checking for RevoBoot -# -if [ -d /Extra/ACPI ]; then -gDestinationPath="/Extra/ACPI/" -echo -e '\nACPI target directory changed to: '$gDestinationPath -return -fi - -# -# Checking for Clover rev 1277 and greater (projectosx.com/forum/index.php?showtopic=2656&p=29129&#entry29129) -# -if [ -d /EFI/Clover/ACPI/patched ]; -then -gDestinationPath="/EFI/Clover/ACPI/patched/" -echo -e '\nACPI target directory changed to: $gDestinationPath' -return -else -if [ -d /Volumes/EFI ]; -then -if [ -d /Volumes/EFI/Clover/ACPI/patched ]; then -gDestinationPath="/Volumes/EFI/CLOVER/ACPI/patched/" -echo -e '\nACPI target directory changed to: '$gDestinationPath -return -fi -else -# -# http://www.tonymacx86.com/ssdt/86906-ssdt-generation-script-ivybridge-pm-40.html#post604496 -# -if [ -f /Library/Logs/CloverEFI/boot.log ]; -then -echo 'Clover boot.log found' -return -else -echo -e '\nWarning: Failed to locate the Clover boot.log' -echo 'Creating temporarily mount point: /Volumes/EFI' -sudo mkdir /Volumes/EFI -printf 'Mounting EFI partition...\n' -# -# TODO: Get target disk from diskutil list -# -sudo mount_hfs /dev/disk0s1 /Volumes/EFI - -if [ -f /Volumes/EFI/Clover/ACPI/patched ]; -then -let gUnmountEFIPartition=1 -gDestinationPath="/Volumes/EFI/CLOVER/ACPI/patched/" -echo 'ACPI target directory changed to: '$gDestinationPath -return -else -echo -e '\nUnmounting EFI partition...' -sudo umount -f /Volumes/EFI -echo 'Removing temporarily mount point...' + # + # Checking for RevoBoot + # + if [ -d /Extra/ACPI ]; then + gDestinationPath="/Extra/ACPI/" + echo -e '\nACPI target directory changed to: '$gDestinationPath + return + fi + + # + # Checking for Clover rev 1277 and greater (projectosx.com/forum/index.php?showtopic=2656&p=29129&#entry29129) + # + if [ -d /EFI/Clover/ACPI/patched ]; + then + gDestinationPath="/EFI/Clover/ACPI/patched/" + echo -e '\nACPI target directory changed to: $gDestinationPath' + return + else + if [ -d /Volumes/EFI ]; + then + if [ -d /Volumes/EFI/Clover/ACPI/patched ]; then + gDestinationPath="/Volumes/EFI/CLOVER/ACPI/patched/" + echo -e '\nACPI target directory changed to: '$gDestinationPath + return + fi + else + # + # http://www.tonymacx86.com/ssdt/86906-ssdt-generation-script-ivybridge-pm-40.html#post604496 + # + if [ -f /Library/Logs/CloverEFI/boot.log ]; + then + echo 'Clover boot.log found' + return + else + echo -e '\nWarning: Failed to locate the Clover boot.log' + echo 'Creating temporarily mount point: /Volumes/EFI' + sudo mkdir /Volumes/EFI + printf 'Mounting EFI partition...\n' + # + # TODO: Get target disk from diskutil list + # + sudo mount_hfs /dev/disk0s1 /Volumes/EFI + + if [ -f /Volumes/EFI/Clover/ACPI/patched ]; + then + let gUnmountEFIPartition=1 + gDestinationPath="/Volumes/EFI/CLOVER/ACPI/patched/" + echo 'ACPI target directory changed to: '$gDestinationPath + return + else + echo -e '\nUnmounting EFI partition...' + sudo umount -f /Volumes/EFI + echo 'Removing temporarily mount point...' # sudo rm -r /Volumes/EFI -return -fi -fi - -fi -fi - -# -# Checking for Clover (older versions) -# -if [ -d /EFI/ACPI/patched ]; then -gDestinationPath="/EFI/ACPI/patched/" -echo 'ACPI target directory changed to: '$gDestinationPath -return -fi + return + fi + fi + + fi + fi + + # + # Checking for Clover (older versions) + # + if [ -d /EFI/ACPI/patched ]; then + gDestinationPath="/EFI/ACPI/patched/" + echo 'ACPI target directory changed to: '$gDestinationPath + return + fi } #-------------------------------------------------------------------------------- function _getCPUNumberFromBrandString { -# -# Get CPU brandstring -# -local brandString=$(echo `sysctl machdep.cpu.brand_string` | sed -e 's/machdep.cpu.brand_string: //') -# -# Save default (0) delimiter -# -local ifs=$IFS -# -# Change delimiter to a space character -# -IFS=" " -# -# Split brandstring into array (data) -# -local data=($brandString) + # + # Get CPU brandstring + # + local brandString=$(echo `sysctl machdep.cpu.brand_string` | sed -e 's/machdep.cpu.brand_string: //') + # + # Save default (0) delimiter + # + local ifs=$IFS + # + # Change delimiter to a space character + # + IFS=" " + # + # Split brandstring into array (data) + # + local data=($brandString) # local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "V2" "@" "2.5GHz") # local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "@" "2.5GHz") -# -# Example from a MacBookPro10,2 -# -# echo "${data[0]}" # Intel(R) -# echo "${data[1]}" # Core(TM) -# echo "${data[2]}" # i5-3210M -# echo "${data[3]}" # CPU -# echo "${data[4]}" # @ -# echo "${data[5]}" # 2.50GHz -# -# or: "Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz" -# -# echo "${data[0]}" # Intel(R) -# echo "${data[1]}" # Xeon(R) -# echo "${data[2]}" # CPU -# echo "${data[3]}" # E3-12XX -# echo "${data[4]}" # V2 -# echo "${data[5]}" # @ -# echo "${data[6]}" # 3.30GHz - -# -# Restore the default delimiter -# -IFS=$ifs - -let length=${#data[@]} - -if ((length > 6)); then -echo 'Warning: Unexpected brandstring > "'${data[@]}'"' -fi - -if [[ ${data[1]} == "Xeon(R)" && ${data[4]} == "V2" ]]; -then -gProcessorNumber="${data[3]} ${data[4]}" -else -gProcessorNumber="${data[2]}" -fi + # + # Example from a MacBookPro10,2 + # + # echo "${data[0]}" # Intel(R) + # echo "${data[1]}" # Core(TM) + # echo "${data[2]}" # i5-3210M + # echo "${data[3]}" # CPU + # echo "${data[4]}" # @ + # echo "${data[5]}" # 2.50GHz + # + # or: "Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz" + # + # echo "${data[0]}" # Intel(R) + # echo "${data[1]}" # Xeon(R) + # echo "${data[2]}" # CPU + # echo "${data[3]}" # E3-12XX + # echo "${data[4]}" # V2 + # echo "${data[5]}" # @ + # echo "${data[6]}" # 3.30GHz + + # + # Restore the default delimiter + # + IFS=$ifs + + let length=${#data[@]} + + if ((length > 6)); then + echo 'Warning: Unexpected brandstring > "'${data[@]}'"' + fi + + if [[ ${data[1]} == "Xeon(R)" && ${data[4]} == "V2" ]]; + then + gProcessorNumber="${data[3]} ${data[4]}" + else + gProcessorNumber="${data[2]}" + fi # echo $gProcessorNumber } @@ -1371,745 +1445,754 @@ fi function _getCPUDataByProcessorNumber { -# -# Local function definition -# -function __searchList() -{ -local ifs=$IFS -let targetType=0 - -case $1 in -2) local cpuSpecLists=("gDesktopSandyBridgeCPUList[@]" "gMobileSandyBridgeCPUList[@]" "gServerSandyBridgeCPUList[@]") -;; -4) local cpuSpecLists=("gDesktopIvyBridgeCPUList[@]" "gMobileIvyBridgeCPUList[@]" "gServerIvyBridgeCPUList[@]") -;; -8) local cpuSpecLists=("gDesktopHaswellCPUList[@]" "gMobileHaswellCPUList[@]" "gHaswellCPUList[@]") -;; -esac - -for cpuList in ${cpuSpecLists[@]} -do -let targetType+=1 -local targetCPUList=("${!cpuList}") - -for cpuData in "${targetCPUList[@]}" -do -IFS="," -data=($cpuData) - -if [[ ${data[0]} == $gProcessorNumber ]]; then -gProcessorData="$cpuData" -let gTypeCPU=$targetType -let gBridgeType=$1 -IFS=$ifs -return -fi -done -done - -IFS=$ifs -} - -# -# Local function callers -# -__searchList $SANDY_BRIDGE - -if (!(($gTypeCPU))); then -__searchList $IVY_BRIDGE -fi - -if (!(($gTypeCPU))); then -__searchList $HASWELL -fi + # + # Local function definition + # + function __searchList() + { + local ifs=$IFS + let targetType=0 + + case $1 in + 2) local cpuSpecLists=("gDesktopSandyBridgeCPUList[@]" "gMobileSandyBridgeCPUList[@]" "gServerSandyBridgeCPUList[@]") + ;; + 4) local cpuSpecLists=("gDesktopIvyBridgeCPUList[@]" "gMobileIvyBridgeCPUList[@]" "gServerIvyBridgeCPUList[@]") + ;; + 8) local cpuSpecLists=("gDesktopHaswellCPUList[@]" "gMobileHaswellCPUList[@]" "gHaswellCPUList[@]") + ;; + esac + + for cpuList in ${cpuSpecLists[@]} + do + let targetType+=1 + local targetCPUList=("${!cpuList}") + + for cpuData in "${targetCPUList[@]}" + do + IFS="," + data=($cpuData) + + if [[ ${data[0]} == $gProcessorNumber ]]; then + gProcessorData="$cpuData" + let gTypeCPU=$targetType + let gBridgeType=$1 + IFS=$ifs + return + fi + done + done + + IFS=$ifs + } + + # + # Local function callers + # + __searchList $SANDY_BRIDGE + + if (!(($gTypeCPU))); then + __searchList $IVY_BRIDGE + fi + + if (!(($gTypeCPU))); then + __searchList $HASWELL + fi } #-------------------------------------------------------------------------------- function _showLowPowerStates() { -# -# Local function definition -# -function __print() -{ -local mask=1 -local cStates=$1 - -printf "Injected C-States for ${gProcessorNames[$2]} (" -# -# Haswell : C0, C1, C1E, C2E, C3, C4, C6 and C7 -# Haswell-ULT: C0, C1, C1E, C2E, C3, C4, C6, C7, C8, C9 and C10 -# -for state in C1 C2 C3 C6 C7 C8 C9 C10 -do -if (($cStates & $mask)); then -if (($mask > 1)); then -printf "," -fi - -printf "$state" -fi - -let mask=$(($mask << 1)) -done - -echo ')' -} - -# -# Local function callers -# -__print $gACST_CPU0 0 - -if [ $gBridgeType -ge $IVY_BRIDGE ]; then -__print $gACST_CPU1 1 -fi + # + # Local function definition + # + function __print() + { + local mask=1 + local cStates=$1 + + printf "Injected C-States for ${gProcessorNames[$2]} (" + # + # Haswell : C0, C1, C1E, C2E, C3, C4, C6 and C7 + # Haswell-ULT: C0, C1, C1E, C2E, C3, C4, C6, C7, C8, C9 and C10 + # + for state in C1 C2 C3 C6 C7 C8 C9 C10 + do + if (($cStates & $mask)); then + if (($mask > 1)); then + printf "," + fi + + printf "$state" + fi + + let mask=$(($mask << 1)) + done + + echo ')' + } + + # + # Local function callers + # + __print $gACST_CPU0 0 + + if [ $gBridgeType -ge $IVY_BRIDGE ]; then + __print $gACST_CPU1 1 + fi } #-------------------------------------------------------------------------------- function _checkPlatformSupport() { -# -# Local function definition -# -function __searchList() -{ -local data=`awk '/<key>'${1}'<\/key>.*/,/<\/array>/' /System/Library/CoreServices/PlatformSupport.plist` -local targetList=(`echo $data | egrep -o '(<string>.*</string>)' | sed -e 's/<\/*string>//g'`) - -for item in "${targetList[@]}" -do - -if [ "$item" == "$2" ]; then -return 1 -fi -done - -return 0 -} - -# -# This check is required for Snow Leopard compatibility! -# -if [ -f /System/Library/CoreServices/PlatformSupport.plist ]; -then -__searchList 'SupportedModelProperties' $1 - -if (($? == 0)); then -echo 'Warning: Model identifier ['$1'] is missing from: /S*/L*/CoreServices/PlatformSupport.plist' -fi - -__searchList 'SupportedBoardIds' $2 - -if (($? == 0)); then -echo 'Warning: boardID ['$2'] is missing from: /S*/L*/CoreServices/PlatformSupport.plist' -fi -else -echo 'Warning: /S*/L*/C*/PlatformSupport.plist not found (normal for Snow Leopard)!' -fi + # + # Local function definition + # + function __searchList() + { + local data=`awk '/<key>'${1}'<\/key>.*/,/<\/array>/' /System/Library/CoreServices/PlatformSupport.plist` + local targetList=(`echo $data | egrep -o '(<string>.*</string>)' | sed -e 's/<\/*string>//g'`) + + for item in "${targetList[@]}" + do + if [ "$item" == "$2" ]; then + return 1 + fi + done + + return 0 + } + + # + # This check is required for Snow Leopard compatibility! + # + if [ -f /System/Library/CoreServices/PlatformSupport.plist ]; + then + __searchList 'SupportedModelProperties' $1 + + if (($? == 0)); then + __searchList 'SupportedBoardIds' $2 + + if (($? == 0)); then + echo 'Warning: Model identifier ['$1'] and board-id ['$2'] missing in: /S*/L*/CoreServices/PlatformSupport.plist' + fi + fi + else + echo 'Warning: /S*/L*/C*/PlatformSupport.plist not found (normal for Snow Leopard)!' + fi } #-------------------------------------------------------------------------------- function _checkSMCKeys() { -# -# TODO: Check SMC keys to see if they are there and properly initialized! -# -# Note: Do <i>not</i> dump SMC keys with HWSensors/iStat or other SMC plug-ins installed! -# -local filename="/System/Library/Extensions/FakeSMC.kext/Contents/Info.plist" -local data=`grep -so '<key>[a-zA-Z]*</key>' $filename | sed -e 's/<key>//' -e 's/<\/key>//g'` - -local status=`echo $data | grep -oe 'DPLM'` - -if [ $status == 'DPLM' ]; then -# DPLM [{lim] (bytes 00 00 00 00 00) -# CPU, Idle, IGPU, EGPU and Memory P-State limits -echo "SMC key 'DPLM' found (OK)" -fi + # + # TODO: Check SMC keys to see if they are there and properly initialized! + # + # Note: Do <i>not</i> dump SMC keys with HWSensors/iStat or other SMC plug-ins installed! + # + local filename="/System/Library/Extensions/FakeSMC.kext/Contents/Info.plist" + local data=`grep -so '<key>[a-zA-Z]*</key>' $filename | sed -e 's/<key>//' -e 's/<\/key>//g'` + + local status=`echo $data | grep -oe 'DPLM'` + + if [ $status == 'DPLM' ]; then + # DPLM [{lim] (bytes 00 00 00 00 00) + # CPU, Idle, IGPU, EGPU and Memory P-State limits + echo "SMC key 'DPLM' found (OK)" + fi set -x -local status=`echo $data | grep -oe 'MSAL'` + local status=`echo $data | grep -oe 'MSAL'` -if [ $status == 'MSAL' ]; then -# MSAL [hex_] (bytes 4b) -echo "SMC key 'MSAL' found (OK)" -fi + if [ $status == 'MSAL' ]; then + # MSAL [hex_] (bytes 4b) + echo "SMC key 'MSAL' found (OK)" + fi } #-------------------------------------------------------------------------------- function _initSandyBridgeSetup() { -case $boardID in -Mac-942B5BF58194151B) -gSystemType=1 -gMacModelIdentifier="iMac12,1" -gACST_CPU0=13 # C1, C3 and C6 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-942B59F58194171B) -gSystemType=1 -gMacModelIdentifier="iMac12,2" -gACST_CPU0=13 # C1, C3 and C6 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-8ED6AF5B48C039E1) -gSystemType=1 -gMacModelIdentifier="Macmini5,1" -gACST_CPU0=13 # C1, C3 and C6 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-4BC72D62AD45599E) -gSystemType=1 -gMacModelIdentifier="Macmini5,2" -gACST_CPU0=13 # C1, C3, C6 and C7 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-7BA5B2794B2CDB12) -gSystemType=1 -gMacModelIdentifier="Macmini5,3" -gACST_CPU0=13 # C1, C3, C6 and C7 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-94245B3640C91C81) -gSystemType=2 -gMacModelIdentifier="MacBookPro8,1" -gACST_CPU0=29 # C1, C3, C6 and C7 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-94245A3940C91C80) -gSystemType=2 -gMacModelIdentifier="MacBookPro8,2" -gACST_CPU0=29 # C1, C3, C6 and C7 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-942459F5819B171B) -gSystemType=2 -gMacModelIdentifier="MacBookPro8,3" -gACST_CPU0=29 # C1, C3, C6 and C7 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-C08A6BB70A942AC2) -gSystemType=2 -gMacModelIdentifier="MacBookAir4,1" -gACST_CPU0=29 # C1, C3, C6 and C7 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-742912EFDBEE19B3) -gSystemType=2 -gMacModelIdentifier="MacBookAir4,2" -gACST_CPU0=29 # C1, C3, C6 and C7 -gACST_CPU1=7 # C1, C2 and C3 -;; -esac + case $boardID in + Mac-942B5BF58194151B) + gSystemType=1 + gMacModelIdentifier="iMac12,1" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-942B59F58194171B) + gSystemType=1 + gMacModelIdentifier="iMac12,2" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-8ED6AF5B48C039E1) + gSystemType=1 + gMacModelIdentifier="Macmini5,1" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-4BC72D62AD45599E) + gSystemType=1 + gMacModelIdentifier="Macmini5,2" + gACST_CPU0=13 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-7BA5B2794B2CDB12) + gSystemType=1 + gMacModelIdentifier="Macmini5,3" + gACST_CPU0=13 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-94245B3640C91C81) + gSystemType=2 + gMacModelIdentifier="MacBookPro8,1" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-94245A3940C91C80) + gSystemType=2 + gMacModelIdentifier="MacBookPro8,2" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-942459F5819B171B) + gSystemType=2 + gMacModelIdentifier="MacBookPro8,3" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-C08A6BB70A942AC2) + gSystemType=2 + gMacModelIdentifier="MacBookAir4,1" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-742912EFDBEE19B3) + gSystemType=2 + gMacModelIdentifier="MacBookAir4,2" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + esac } #-------------------------------------------------------------------------------- function _initIvyBridgeSetup() { -case $boardID in -Mac-00BE6ED71E35EB86) -gSystemType=1 -gMacModelIdentifier="iMac13,1" -gACST_CPU0=13 # C1, C3 and C6 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-FC02E91DDD3FA6A4) -gSystemType=1 -gMacModelIdentifier="iMac13,2" -gACST_CPU0=13 # C1, C3 and C6 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-031AEE4D24BFF0B1) -gSystemType=1 -gMacModelIdentifier="Macmini6,1" -gACST_CPU0=13 # C1, C3 and C6 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-F65AE981FFA204ED) -gSystemType=1 -gMacModelIdentifier="Macmini6,2" -gACST_CPU0=13 # C1, C3 and C6 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-4B7AC7E43945597E) -gSystemType=2 -gMacModelIdentifier="MacBookPro9,1" -gACST_CPU0=29 # C1, C3, C6 and C7 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-6F01561E16C75D06) -gSystemType=2 -gMacModelIdentifier="MacBookPro9,2" -gACST_CPU0=29 # C1, C3, C6 and C7 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-C3EC7CD22292981F) -gSystemType=2 -gMacModelIdentifier="MacBookPro10,1" -gACST_CPU0=29 # C1, C3, C6 and C7 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-AFD8A9D944EA4843) -gSystemType=2 -gMacModelIdentifier="MacBookPro10,2" -gACST_CPU0=29 # C1, C3, C6 and C7 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-66F35F19FE2A0D05) -gSystemType=2 -gMacModelIdentifier="MacBookAir5,1" -gACST_CPU0=29 # C1, C3, C6 and C7 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-2E6FAB96566FE58C) -gSystemType=2 -gMacModelIdentifier="MacBookAir5,2" -gACST_CPU0=29 # C1, C3, C6 and C7 -gACST_CPU1=7 # C1, C2 and C3 -;; -esac + case $boardID in + Mac-00BE6ED71E35EB86) + gSystemType=1 + gMacModelIdentifier="iMac13,1" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-FC02E91DDD3FA6A4) + gSystemType=1 + gMacModelIdentifier="iMac13,2" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-031AEE4D24BFF0B1) + gSystemType=1 + gMacModelIdentifier="Macmini6,1" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-F65AE981FFA204ED) + gSystemType=1 + gMacModelIdentifier="Macmini6,2" + gACST_CPU0=13 # C1, C3 and C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-4B7AC7E43945597E) + gSystemType=2 + gMacModelIdentifier="MacBookPro9,1" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-6F01561E16C75D06) + gSystemType=2 + gMacModelIdentifier="MacBookPro9,2" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-C3EC7CD22292981F) + gSystemType=2 + gMacModelIdentifier="MacBookPro10,1" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-AFD8A9D944EA4843) + gSystemType=2 + gMacModelIdentifier="MacBookPro10,2" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-66F35F19FE2A0D05) + gSystemType=2 + gMacModelIdentifier="MacBookAir5,1" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-2E6FAB96566FE58C) + gSystemType=2 + gMacModelIdentifier="MacBookAir5,2" + gACST_CPU0=29 # C1, C3, C6 and C7 + gACST_CPU1=7 # C1, C2 and C3 + ;; + esac } #-------------------------------------------------------------------------------- function _initHaswellSetup() { -case $boardID in -Mac-031B6874CF7F642A) -gSystemType=1 -gMacModelIdentifier="iMac14,1" -gACST_CPU0=13 # C1, C2, C3, C6 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-27ADBB7B4CEE8E61) -gSystemType=1 -gMacModelIdentifier="iMac14,2" -gACST_CPU0=13 # C1, C2, C3, C6 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-77EB7D7DAF985301) -gSystemType=1 -gMacModelIdentifier="iMac14,3" -gACST_CPU0=13 # C1, C2, C3, C6 -gACST_CPU1=7 # C1, C2 and C3 -;; - -Mac-189A3D4F975D5FFC) -gSystemType=2 -gMacModelIdentifier="MacBookPro11,1" -gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 -gACST_CPU1=31 # C1, C2, C3, C6 and C7 -;; - -Mac-3CBD00234E554E41) -gSystemType=2 -gMacModelIdentifier="MacBookPro11,2" -gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 -gACST_CPU1=31 # C1, C2, C3, C6 and C7 -;; - -Mac-2BD1B31983FE1663) -gSystemType=2 -gMacModelIdentifier="MacBookPro11,3" -gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 -gACST_CPU1=31 # C1, C2, C3, C6 and C7 -;; - -Mac-35C1E88140C3E6CF) -gSystemType=2 -gMacModelIdentifier="MacBookAir6,1" -gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 -gACST_CPU1=31 # C1, C2, C3, C6 and C7 -;; - -Mac-7DF21CB3ED6977E5) -gSystemType=2 -gMacModelIdentifier="MacBookAir6,2" -gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 -gACST_CPU1=31 # C1, C2, C3, C6 and C7 -;; - -Mac-F60DEB81FF30ACF6) -gSystemType=1 -gMacModelIdentifier="MacPro6,1" -gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 -gACST_CPU1=31 # C1, C2, C3, C6 and C7 -;; -esac + case $boardID in + Mac-031B6874CF7F642A) + gSystemType=1 + gMacModelIdentifier="iMac14,1" + gACST_CPU0=13 # C1, C2, C3, C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-27ADBB7B4CEE8E61) + gSystemType=1 + gMacModelIdentifier="iMac14,2" + gACST_CPU0=15 # C1, C2, C3, C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-77EB7D7DAF985301) + gSystemType=1 + gMacModelIdentifier="iMac14,3" + gACST_CPU0=15 # C1, C2, C3, C6 + gACST_CPU1=7 # C1, C2 and C3 + ;; + + Mac-189A3D4F975D5FFC) + gSystemType=2 + gMacModelIdentifier="MacBookPro11,1" + gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 + gACST_CPU1=31 # C1, C2, C3, C6 and C7 + ;; + + Mac-3CBD00234E554E41) + gSystemType=2 + gMacModelIdentifier="MacBookPro11,2" + gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 + gACST_CPU1=31 # C1, C2, C3, C6 and C7 + ;; + + Mac-2BD1B31983FE1663) + gSystemType=2 + gMacModelIdentifier="MacBookPro11,3" + gACST_CPU0=253 # C1, C3, C6, C7, C8, C9 and C10 + gACST_CPU1=31 # C1, C2, C3, C6 and C7 + ;; + + Mac-35C1E88140C3E6CF) + gSystemType=2 + gMacModelIdentifier="MacBookAir6,1" + gACST_CPU0=29 # C1, C3, C6, C7 + gACST_CPU1=7 # C1, C2, C3 + ;; + + Mac-7DF21CB3ED6977E5) + gSystemType=2 + gMacModelIdentifier="MacBookAir6,2" + gACST_CPU0=29 # C1, C3, C6, C7 + gACST_CPU1=7 # C1, C2, C3 + ;; + + Mac-F60DEB81FF30ACF6) + gSystemType=3 + gMacModelIdentifier="MacPro6,1" + gACST_CPU0=13 # C1, C3, C6 + gACST_CPU1=13 # C1, C3, C6 + esac } #-------------------------------------------------------------------------------- function _exitWithError() { -case "$1" in -2) echo -e "\nError: 'MaxTurboFrequency' must be in the range of $frequency-$gMaxOCFrequency... exiting\n" 1>&2 -exit 2 -;; -3) echo -e "\nError: 'TDP' must be in the range of 10-150 Watts... exiting\n" 1>&2 -exit 3 -;; -4) echo -e "\nError: 'BridgeType' must be 0, 1 or 2... exiting\n" 1>&2 -exit 4 -;; -5) echo -e "\nError: Unknown processor number... exiting\n" 1>&2 -exit 5 -;; -6) echo -e "\nError: Processor label length is less than 3... exiting\n" 1>&2 -exit 6 -;; -7) echo -e "\nError: Processor label not found... exiting\n" 1>&2 -exit 7 -;; -8) echo -e "\nError: Processor Declaration not found... exiting\n" 1>&2 -exit 8 -;; -*) exit 1 -;; -esac + case "$1" in + 2) echo -e "\nError: 'MaxTurboFrequency' must be in the range of $frequency-$gMaxOCFrequency... exiting\n" 1>&2 + exit 2 + ;; + 3) echo -e "\nError: 'TDP' must be in the range of 10-150 Watts... exiting\n" 1>&2 + exit 3 + ;; + 4) echo -e "\nError: 'BridgeType' must be 0, 1 or 2... exiting\n" 1>&2 + exit 4 + ;; + 5) echo -e "\nError: Unknown processor number... exiting\n" 1>&2 + exit 5 + ;; + 6) echo -e "\nError: Processor label length is less than 3... exiting\n" 1>&2 + exit 6 + ;; + 7) echo -e "\nError: Processor label not found... exiting\n" 1>&2 + exit 7 + ;; + 8) echo -e "\nError: Processor Declaration not found... exiting\n" 1>&2 + exit 8 + ;; + *) exit 1 + ;; + esac } #-------------------------------------------------------------------------------- function main() { -printf "\nsdtPRGen.sh v$gScriptVersion Copyright (c) 2013 by Pike R. Alpha\n" -echo '----------------------------------------------------------------' - -let assumedTDP=0 -let modelSpecified=0 -let maxTurboFrequency=0 - -_getCPUNumberFromBrandString - -if [[ "$1" != "" ]]; then -# Sandy Bridge checks -if [[ ${1:0:4} == "i3-2" || ${1:0:4} == "i5-2" || ${1:0:4} == "i7-2" ]]; then -let modelSpecified=1 -gProcessorNumber=$1 -fi -# Ivy Bridge checks -if [[ ${1:0:4} == "i3-3" || ${1:0:4} == "i5-3" || ${1:0:4} == "i7-3" ]]; then -let modelSpecified=1 -gProcessorNumber=$1 -fi -# Haswell checks -if [[ ${1:0:4} == "i3-4" || ${1:0:4} == "i5-4" || ${1:0:4} == "i7-4" ]]; then -let modelSpecified=1 -gProcessorNumber=$1 -fi -# Xeon check -if [[ ${1:0:1} == "E" ]]; then -let modelSpecified=1 -gProcessorNumber=$1 -fi -fi - -_getCPUDataByProcessorNumber - -if [[ $modelSpecified -eq 1 && $gTypeCPU -eq 0 ]]; then -_exitWithError $PROCESSOR_NUMBER_ERROR -fi - -if [[ $gBridgeType -eq 0 ]]; then -local model=$(_getCPUModel) - -if (($model==0x2A)); then -let gTdp=95 -let gBridgeType=2 -fi - -if (($model==0x2D)); then -let assumedTDP=1 -let gTdp=130 -let gBridgeType=2 -fi - -if (($model==0x3A || $model==0x3B || $model==0x3E)); then -let assumedTDP=1 -let gTdp=77 -let gBridgeType=4 -fi - -# Haswell -if (($model==0x3C)); then -let assumedTDP=1 -let gTdp=84 -let gBridgeType=8 -let gMaxOCFrequency=8000 -fi - -# Haswell ULT -if (($model==0x40)); then -let assumedTDP=1 -let gTdp=15 -let gBridgeType=8 -fi -fi - -case $gBridgeType in -2) local bridgeTypeString="Sandy Bridge" -;; -4) local bridgeTypeString="Ivy Bridge" -;; -8) local bridgeTypeString="Haswell" -;; -*) local bridgeTypeString="Unknown" -;; -esac - -_getBoardID -_getProcessorNames -_getProcessorScope - -local modelID=$(_getModelName) -local cpu_type=$(_getCPUtype) -local currentSystemType=$(_getSystemType) -local cpuSignature=$(_getCPUSignature) - -echo "Generating ${gSsdtID}.dsl for a $modelID [$boardID]" -echo "$bridgeTypeString Core $gProcessorNumber processor [$cpuSignature] setup [0x$cpu_type]" - -# -# gTypeCPU is greater than 0 when the processor is found in one of the CPU lists -# -if (($gTypeCPU)); -then -local ifs=$IFS -IFS="," -local cpuData=($gProcessorData) -let gTdp=${cpuData[1]} -let lfm=${cpuData[2]} -let frequency=${cpuData[3]} -let maxTurboFrequency=${cpuData[4]} - -if [ $maxTurboFrequency == 0 ]; then -let maxTurboFrequency=$frequency -fi - -let gLogicalCPUs=${cpuData[6]} - -IFS=$ifs - -echo 'With a maximum TDP of '$gTdp' Watt, as specified by Intel' - -# -# Check Low Frequency Mode (may be 0 aka still unknown) -# -if (($lfm > 0)); -then -let gBaseFrequency=$lfm -else -echo -e "\nWarning: Low Frequency Mode is 0 (unknown)" - -if (($gTypeCPU == gMobileCPU)); -then -echo -e " Now using 1200 MHz for Mobile processor\n" -let gBaseFrequency=1200 -else -echo -e " Now using 1600 MHz for Server/Desktop processors\n" -let gBaseFrequency=1600 -fi -fi -else -let gLogicalCPUs=$(echo `sysctl machdep.cpu.thread_count` | sed -e 's/^machdep.cpu.thread_count: //') -let frequency=$(echo `sysctl hw.cpufrequency` | sed -e 's/^hw.cpufrequency: //') -let frequency=($frequency / 1000000) - -if [[ $assumedTDP -eq 1 ]]; then -echo 'With a maximum TDP of '$gTdp' Watt - assumed, may require override value!' -fi -fi - -# -# Script argument checks -# - -if [[ $# -ge 2 ]]; then -if [[ "$2" =~ ^[0-9]+$ ]]; then -if [[ $2 -lt $frequency || $2 -gt $gMaxOCFrequency ]]; -then -_exitWithError $MAX_TURBO_FREQUENCY_ERROR -else -if [[ $2 -gt $maxTurboFrequency ]]; then -echo "Override value: Max Turbo Frequency, now using: $2 MHz!" -let maxTurboFrequency=$2 -fi -fi -fi -fi - -if [ $# -ge 3 ]; then -if [[ "$3" =~ ^[0-9]+$ ]]; -then -if [[ $3 -lt 10 || $3 -gt 150 ]]; -then -_exitWithError $MAX_TDP_ERROR -else -if [[ $gTdp != $3 ]]; then -let gTdp=$3 -echo "Override value: Max TDP, now using: $gTdp Watt!" -fi -fi -else -_exitWithError $MAX_TDP_ERROR -fi -fi - -if [ $# -ge 4 ]; then -if [[ "$4" =~ ^[0-9]+$ ]]; -then -local detectedBridgeType=$gBridgeType - -case "$4" in -0) let gBridgeType=2 -local bridgeTypeString='Sandy Bridge' -;; -1) let gBridgeType=4 -local bridgeTypeString='Ivy Bridge' -;; -2) let gBridgeType=8 -local bridgeTypeString='Haswell' -;; -*) _exitWithError $TARGET_CPU_ERROR -;; -esac - -if [[ $detectedBridgeType -ne $((2 << $4)) ]]; then -echo "Override value: CPU type, now using: $bridgeTypeString" -fi -else -_exitWithError $TARGET_CPU_ERROR -fi -fi - -if [ $# -eq 5 ]; then -if [ ${#5} -eq 3 ]; -then -gProcLabel=$(echo "$5" | tr '[:lower:]' '[:upper:]') -echo "Override value: Now using '$gProcLabel' for ACPI processor names!" -_updateProcessorNames ${#gProcessorNames[@]} -else -_exitWithError $PROCESSOR_LABEL_LENGTH_ERROR -fi -fi - -echo "Number logical CPU's: $gLogicalCPUs (Core Frequency: $frequency MHz)" - -if [ $gLogicalCPUs -gt ${#gProcessorNames[@]} ]; then -_updateProcessorNames $gLogicalCPUs -fi - -# -# Check maxTurboFrequency -# -if [ $maxTurboFrequency -eq 0 ]; then -_exitWithError $MAX_TURBO_FREQUENCY_ERROR -fi - -# -# Get number of Turbo states. -# -let turboStates=$(echo "(($maxTurboFrequency - $frequency) / 100)" | bc) - -# -# Check number of Turbo states. -# -if [ $turboStates -lt 0 ]; then -let turboStates=0 -fi - -# -# Report number of Turbo States -# -if [ $turboStates -gt 0 ]; -then -let minTurboFrequency=($frequency+100) -echo "Number of Turbo States: $turboStates ($minTurboFrequency-$maxTurboFrequency MHz)" - -else -echo "Number of Turbo States: 0" -fi - -local packageLength=$(echo "((($maxTurboFrequency - $gBaseFrequency)+100) / 100)" | bc) - -echo "Number of P-States: $packageLength ($gBaseFrequency-$maxTurboFrequency MHz)" - -_printHeader -_printExternals -_printDebugInfo -_printScopeStart $turboStates $packageLength -_printPackages $gTdp $frequency $maxTurboFrequency - -if [ $gBridgeType -eq $SANDY_BRIDGE ]; -then -local cpuTypeString="06" - -_initSandyBridgeSetup - -_printScopeACST 0 -_printScopeCPUn -else -local cpuTypeString="07" - -_initIvyBridgeSetup - -_printScopeACST 0 -_printMethodDSM -_printScopeCPUn -fi - -_showLowPowerStates -_checkPlatformSupport $modelID $boardID - -# -# Some IB CPUPM specific configuration checks -# -if [ $gBridgeType -ne $HASWELL ]; -then -if [ ${cpu_type:0:2} -ne $cpuTypeString ]; then -echo -e "\nWarning: 'cpu-type' may be set improperly (0x$cpu_type instead of 0x$cpuTypeString${cpu_type:2:2})" -fi - -if [ $gSystemType -eq 0 ]; -then -echo -e "\nWarning: 'board-id' [$boardID] is not supported by $bridgeTypeString PM" -else -if [ "$gMacModelIdentifier" != "$modelID" ]; then -echo "Error: board-id [$boardID] and model [$modelID] mismatch" -fi - -if [ $currentSystemType -ne $gSystemType ]; then -echo -e "\nWarning: 'system-type' may be set improperly ($currentSystemType instead of $gSystemType)" -fi -fi -fi + printf "\nssdtPRGen.sh v0.9 Copyright (c) 2011-2012 by † RevoGirl\n" + echo ' v6.6 Copyright (c) 2013 by † Jeroen' + printf " v$gScriptVersion Copyright (c) 2013-$(date "+%Y") by Pike R. Alpha\n" + echo '----------------------------------------------------------------' + printf "System information: $gProductName $gProductVersion ($gBuildVersion)\n" + + let assumedTDP=0 + let modelSpecified=0 + let maxTurboFrequency=0 + + _getCPUNumberFromBrandString + + if [[ "$1" != "" ]]; then + # Sandy Bridge checks + if [[ ${1:0:4} == "i3-2" || ${1:0:4} == "i5-2" || ${1:0:4} == "i7-2" ]]; then + let modelSpecified=1 + gProcessorNumber=$1 + fi + # Ivy Bridge checks + if [[ ${1:0:4} == "i3-3" || ${1:0:4} == "i5-3" || ${1:0:4} == "i7-3" ]]; then + let modelSpecified=1 + gProcessorNumber=$1 + fi + # Haswell checks + if [[ ${1:0:4} == "i3-4" || ${1:0:4} == "i5-4" || ${1:0:4} == "i7-4" ]]; then + let modelSpecified=1 + gProcessorNumber=$1 + fi + # Xeon check + if [[ ${1:0:1} == "E" ]]; then + let modelSpecified=1 + gProcessorNumber=$1 + fi + fi + + _getCPUDataByProcessorNumber + + if [[ $modelSpecified -eq 1 && $gTypeCPU -eq 0 ]]; then + _exitWithError $PROCESSOR_NUMBER_ERROR + fi + + if [[ $gBridgeType -eq 0 ]]; then + local model=$(_getCPUModel) + + if (($model==0x2A)); then + let gTdp=95 + let gBridgeType=2 + fi + + if (($model==0x2D)); then + let assumedTDP=1 + let gTdp=130 + let gBridgeType=2 + fi + + if (($model==0x3A || $model==0x3B || $model==0x3E)); then + let assumedTDP=1 + let gTdp=77 + let gBridgeType=4 + fi + + # Haswell + if (($model==0x3C)); then + let assumedTDP=1 + let gTdp=84 + let gBridgeType=8 + let gMaxOCFrequency=8000 + fi + + # Haswell SVR + if (($model==0x3F)); then + let assumedTDP=1 + let gTdp=130 + let gBridgeType=8 + fi + + # Haswell ULT + if (($model==0x45)); then + let assumedTDP=1 + let gTdp=15 + let gBridgeType=8 + fi + fi + + case $gBridgeType in + 2) local bridgeTypeString="Sandy Bridge" + ;; + 4) local bridgeTypeString="Ivy Bridge" + ;; + 8) local bridgeTypeString="Haswell" + ;; + *) local bridgeTypeString="Unknown" + ;; + esac + + _getBoardID + _getProcessorNames + _getProcessorScope + + local modelID=$(_getModelName) + local cpu_type=$(_getCPUtype) + local currentSystemType=$(_getSystemType) + local cpuSignature=$(_getCPUSignature) + + echo "Generating ${gSsdtID}.dsl for a $modelID [$boardID]" + echo "$bridgeTypeString Core $gProcessorNumber processor [$cpuSignature] setup [0x$cpu_type]" + + # + # gTypeCPU is greater than 0 when the processor is found in one of the CPU lists + # + if (($gTypeCPU)); + then + local ifs=$IFS + IFS="," + local cpuData=($gProcessorData) + let gTdp=${cpuData[1]} + let lfm=${cpuData[2]} + let frequency=${cpuData[3]} + let maxTurboFrequency=${cpuData[4]} + + if [ $maxTurboFrequency == 0 ]; then + let maxTurboFrequency=$frequency + fi + + let gLogicalCPUs=${cpuData[6]} + + IFS=$ifs + + echo 'With a maximum TDP of '$gTdp' Watt, as specified by Intel' + + # + # Check Low Frequency Mode (may be 0 aka still unknown) + # + if (($lfm > 0)); + then + let gBaseFrequency=$lfm + else + echo -e "\nWarning: Low Frequency Mode is 0 (unknown/unconfirmed)" + + if (($gTypeCPU == gMobileCPU)); + then + echo -e " Now using 1200 MHz for Mobile processor\n" + let gBaseFrequency=1200 + else + echo -e " Now using 1600 MHz for Server/Desktop processors\n" + let gBaseFrequency=1600 + fi + fi + else + let gLogicalCPUs=$(echo `sysctl machdep.cpu.thread_count` | sed -e 's/^machdep.cpu.thread_count: //') + let frequency=$(echo `sysctl hw.cpufrequency` | sed -e 's/^hw.cpufrequency: //') + let frequency=($frequency / 1000000) + + if [[ $assumedTDP -eq 1 ]]; then + echo 'With a maximum TDP of '$gTdp' Watt - assumed, may require override value!' + fi + fi + + # + # Script argument checks + # + + if [[ $# -ge 2 ]]; then + if [[ "$2" =~ ^[0-9]+$ ]]; then + if [[ $2 -lt $frequency || $2 -gt $gMaxOCFrequency ]]; + then + _exitWithError $MAX_TURBO_FREQUENCY_ERROR + else + if [[ $2 -gt $maxTurboFrequency ]]; then + echo "Override value: Max Turbo Frequency, now using: $2 MHz!" + let maxTurboFrequency=$2 + fi + fi + fi + fi + + if [ $# -ge 3 ]; then + if [[ "$3" =~ ^[0-9]+$ ]]; + then + if [[ $3 -lt 10 || $3 -gt 150 ]]; + then + _exitWithError $MAX_TDP_ERROR + else + if [[ $gTdp != $3 ]]; then + let gTdp=$3 + echo "Override value: Max TDP, now using: $gTdp Watt!" + fi + fi + else + _exitWithError $MAX_TDP_ERROR + fi + fi + + if [ $# -ge 4 ]; then + if [[ "$4" =~ ^[0-9]+$ ]]; + then + local detectedBridgeType=$gBridgeType + + case "$4" in + 0) let gBridgeType=2 + local bridgeTypeString='Sandy Bridge' + ;; + 1) let gBridgeType=4 + local bridgeTypeString='Ivy Bridge' + ;; + 2) let gBridgeType=8 + local bridgeTypeString='Haswell' + ;; + *) _exitWithError $TARGET_CPU_ERROR + ;; + esac + + if [[ $detectedBridgeType -ne $((2 << $4)) ]]; then + echo "Override value: CPU type, now using: $bridgeTypeString" + fi + else + _exitWithError $TARGET_CPU_ERROR + fi + fi + + if [ $# -eq 5 ]; then + if [ ${#5} -eq 3 ]; + then + gProcLabel=$(echo "$5" | tr '[:lower:]' '[:upper:]') + echo "Override value: Now using '$gProcLabel' for ACPI processor names!" + _updateProcessorNames ${#gProcessorNames[@]} + else + _exitWithError $PROCESSOR_LABEL_LENGTH_ERROR + fi + fi + + echo "Number logical CPU's: $gLogicalCPUs (Core Frequency: $frequency MHz)" + + if [ $gLogicalCPUs -gt ${#gProcessorNames[@]} ]; then + _updateProcessorNames $gLogicalCPUs + fi + + # + # Check maxTurboFrequency + # + if [ $maxTurboFrequency -eq 0 ]; then + _exitWithError $MAX_TURBO_FREQUENCY_ERROR + fi + + # + # Get number of Turbo states. + # + let turboStates=$(echo "(($maxTurboFrequency - $frequency) / 100)" | bc) + + # + # Check number of Turbo states. + # + if [ $turboStates -lt 0 ]; then + let turboStates=0 + fi + + # + # Report number of Turbo States + # + if [ $turboStates -gt 0 ]; + then + let minTurboFrequency=($frequency+100) + echo "Number of Turbo States: $turboStates ($minTurboFrequency-$maxTurboFrequency MHz)" + + else + echo "Number of Turbo States: 0" + fi + + local packageLength=$(echo "((($maxTurboFrequency - $gBaseFrequency)+100) / 100)" | bc) + + echo "Number of P-States: $packageLength ($gBaseFrequency-$maxTurboFrequency MHz)" + + _printHeader + _printExternals + _printScopeStart $turboStates $packageLength + _printPackages $gTdp $frequency $maxTurboFrequency + + case "$gBridgeType" in + $SANDY_BRIDGE) + local cpuTypeString="06" + _initSandyBridgeSetup + _printScopeACST 0 + _printScopeCPUn + ;; + $IVY_BRIDGE) + local cpuTypeString="07" + _initIvyBridgeSetup + _printScopeACST 0 + _printMethodDSM + _printScopeCPUn + ;; + $HASWELL) + local cpuTypeString="08" + _initHaswellSetup + _printScopeACST 0 + _printMethodDSM + _printScopeCPUn + ;; + esac + + _showLowPowerStates + _checkPlatformSupport $modelID $boardID + + # + # Some Sandy Bridge/Ivy Bridge CPUPM specific configuration checks + # + if [ $gBridgeType -ne $HASWELL ]; then + if [ ${cpu_type:0:2} -ne $cpuTypeString ]; then + echo -e "\nWarning: 'cpu-type' may be set improperly (0x$cpu_type instead of 0x$cpuTypeString${cpu_type:2:2})" + fi + + if [ $gSystemType -eq 0 ]; + then + echo -e "\nWarning: 'board-id' [$boardID] is not supported by $bridgeTypeString PM" + else + if [ "$gMacModelIdentifier" != "$modelID" ]; then + echo "Error: board-id [$boardID] and model [$modelID] mismatch" + fi + fi + fi + + if [ $currentSystemType -ne $gSystemType ]; then + echo -e "\nWarning: 'system-type' may be set improperly ($currentSystemType instead of $gSystemType)" + fi } #==================================== START ===================================== @@ -2117,52 +2200,52 @@ fi clear if [ $# -eq 0 ]; -then -main "" $1 $2 $3 $4 -else -if [[ "$1" =~ ^[0-9]+$ ]]; -then -main "" $1 $2 $3 $4 -else -main "$1" $2 $3 $4 $5 -fi + then + main "" $1 $2 $3 $4 + else + if [[ "$1" =~ ^[0-9]+$ ]]; + then + main "" $1 $2 $3 $4 + else + main "$1" $2 $3 $4 $5 + fi fi _findIasl if (($gCallIasl)); then -# -# Compile ssdt.dsl -# -"$iasl" $gSsdtPR - -# -# Copy ssdt_pr.aml to /Extra/ssdt.aml (example) -# -if (($gAutoCopy)); then -if [ -f ${gPath}/${gSsdtID}.aml ]; then -_setDestinationPath -echo -e -read -p "Do you want to copy ${gPath}/${gSsdtID}.aml to ${gDestinationPath}${gDestinationFile}? (y/n)?" choice -case "$choice" in -y|Y ) sudo cp ${gPath}/${gSsdtID}.aml ${gDestinationPath}${gDestinationFile} -;; -esac - -if (($gUnmountEFIPartition)); then -echo -e '\nUnmounting EFI partition...' -sudo umount -f /Volumes/EFI -echo 'Removing temporarily mount point...' -sudo rm -r /Volumes/EFI -fi -fi -fi + # + # Compile ssdt.dsl + # + sudo "$iasl" $gSsdtPR + + # + # Copy ssdt_pr.aml to /Extra/ssdt.aml (example) + # + if (($gAutoCopy)); then + if [ -f ${gPath}/${gSsdtID}.aml ]; then + _setDestinationPath + echo -e + read -p "Do you want to copy ${gPath}/${gSsdtID}.aml to ${gDestinationPath}${gDestinationFile}? (y/n)?" choice + case "$choice" in + y|Y ) sudo cp ${gPath}/${gSsdtID}.aml ${gDestinationPath}${gDestinationFile} + ;; + esac + + if (($gUnmountEFIPartition)); then + echo -e '\nUnmounting EFI partition...' + sudo umount -f /Volumes/EFI + echo 'Removing temporarily mount point...' + sudo rm -r /Volumes/EFI + fi + fi + fi fi if ((gCallOpen)); then -open $gSsdtPR + open $gSsdtPR fi exit 0 -#================================================================================ \ No newline at end of file +#================================================================================ From 9cb8a02aec7531ecda06fe12eb6fbe1b58c53fbd Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 31 Dec 2013 08:00:56 +0100 Subject: [PATCH 424/623] Intel E5-2695 V2 added --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index c6a68f4..47656f7 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 7.3 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 7.4 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -80,6 +80,7 @@ # – Frequency error in i7-4700MQ data fixed, thanks to RehabMan (Pike, November 2013) # - Intel i5-4200M added (Pike, December 2013) # - LFM fixed in the Intel i7-3930K data (Pike, December 2013) +# - Intel E5-2695 V2 added (Pike, December 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -187,7 +188,7 @@ gScope="\_PR_" # Other global variables. # -gScriptVersion=7.3 +gScriptVersion=7.4 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -376,6 +377,7 @@ gServerIvyBridgeCPUList=( 'E3-1225 V2',77,0,3200,3600,4,4 'E3-1220 V2',69,0,3100,3500,4,4 'E3-1220L V2',17,0,2300,3500,2,4 +'E5-2695 V2',115,1200,2400,3200,12,24 ) gDesktopIvyBridgeCPUList=( From 618edb00f59c2901a1e33eb6d05a48b370688a0a Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 31 Dec 2013 12:51:13 +0100 Subject: [PATCH 425/623] Intel i3-3250 added --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 47656f7..a17972e 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 7.4 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 7.5 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -81,6 +81,7 @@ # - Intel i5-4200M added (Pike, December 2013) # - LFM fixed in the Intel i7-3930K data (Pike, December 2013) # - Intel E5-2695 V2 added (Pike, December 2013) +# - Intel i3-3250 added (Pike, December 2013) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -188,7 +189,7 @@ gScope="\_PR_" # Other global variables. # -gScriptVersion=7.4 +gScriptVersion=7.5 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -407,6 +408,7 @@ i5-3333S,65,1600,2700,3200,4,4 i5-3330S,65,1600,3700,3200,4,4 i5-3330,77,1600,3000,3200,4,4 # i3-3200 Desktop Processor Series +i3-3250,55,1600,3500,0,2,4 i3-3240,55,1600,3400,0,2,4 i3-3240T,35,1600,2900,0,2,4 i3-3225,55,1600,3300,0,2,4 From f7c6e3d309c0eefe68772eab84e1e7d86030a558 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 1 Jan 2014 03:47:25 +0100 Subject: [PATCH 426/623] Resolving KP --- .../AppleIntelCPUPowerManagementInfo.cpp | 61 +++++++++++++------ .../AppleIntelCPUPowerManagementInfo.h | 8 +-- 2 files changed, 48 insertions(+), 21 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 9c62709..a193215 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -13,7 +13,7 @@ //============================================================================== -void AppleIntelCPUPowerManagementInfo::reportMSRs(void) +void AppleIntelCPUPowerManagementInfo::reportMSRs(UInt8 aCPUModel) { IOLog("AICPUPMI: MSR_CORE_THREAD_COUNT......(0x35) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_THREAD_COUNT)); @@ -50,24 +50,44 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(void) IOLog("AICPUPMI: MSR_PP0_POWER_LIMIT........(0x638) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POWER_LIMIT)); IOLog("AICPUPMI: MSR_PP0_ENERGY_STATUS......(0x639) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_ENERGY_STATUS)); IOLog("AICPUPMI: MSR_PP0_POLICY.............(0x63a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POLICY)); - - /* IOLog("AICPUPMI: MSR_PP1_CURRENT_CONFIG.....(0x602) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_CURRENT_CONFIG)); - IOLog("AICPUPMI: MSR_PP1_POWER_LIMIT........(0x640) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POWER_LIMIT)); - IOLog("AICPUPMI: MSR_PP1_ENERGY_STATUS......(0x641) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_ENERGY_STATUS)); - IOLog("AICPUPMI: MSR_PP1_POLICY.............(0x642) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POLICY)); */ - - IOLog("AICPUPMI: MSR_CONFIG_TDP_NOMINAL.....(0x648) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_NOMINAL)); - IOLog("AICPUPMI: MSR_CONFIG_TDP_LEVEL1......(0x649) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL1)); - IOLog("AICPUPMI: MSR_CONFIG_TDP_LEVEL2......(0x64a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL2)); - IOLog("AICPUPMI: MSR_CONFIG_TDP_CONTROL.....(0x64b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_CONTROL)); - IOLog("AICPUPMI: MSR_TURBO_ACTIVATION_RATIO.(0x64c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_ACTIVATION_RATIO)); + + switch (aCPUModel) + { + case CPU_MODEL_SB_CORE: // 0x2A - Intel 325462.pdf Vol.3C 35-120 + case CPU_MODEL_HASWELL: // 0x3C - Intel 325462.pdf Vol.3C 35-140 + case CPU_MODEL_HASWELL_ULT: // 0x45 - Intel 325462.pdf Vol.3C 35-140 + case CPU_MODEL_CRYSTALWELL: // 0x46 - Intel 325462.pdf Vol.3C 35-140 + + IOLog("AICPUPMI: MSR_PP1_CURRENT_CONFIG.....(0x602) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_CURRENT_CONFIG)); + IOLog("AICPUPMI: MSR_PP1_POWER_LIMIT........(0x640) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POWER_LIMIT)); + IOLog("AICPUPMI: MSR_PP1_ENERGY_STATUS......(0x641) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_ENERGY_STATUS)); + IOLog("AICPUPMI: MSR_PP1_POLICY.............(0x642) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POLICY)); + break; + } + + switch (aCPUModel) + { + case CPU_MODEL_IB_CORE: // 0x3A - Intel 325462.pdf Vol.3C 35-126 + case CPU_MODEL_IB_CORE_EX: // 0x3B - Intel 325462.pdf Vol.3C 35-126 + case CPU_MODEL_IB_CORE_XEON: // 0x3E - Intel 325462.pdf Vol.3C 35-126 + case CPU_MODEL_HASWELL: // 0x3C - Intel 325462.pdf Vol.3C 35-133 + case CPU_MODEL_HASWELL_ULT: // 0x45 - Intel 325462.pdf Vol.3C 35-133 + case CPU_MODEL_CRYSTALWELL: // 0x46 - Intel 325462.pdf Vol.3C 35-133 + + IOLog("AICPUPMI: MSR_CONFIG_TDP_NOMINAL.....(0x648) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_NOMINAL)); + IOLog("AICPUPMI: MSR_CONFIG_TDP_LEVEL1......(0x649) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL1)); + IOLog("AICPUPMI: MSR_CONFIG_TDP_LEVEL2......(0x64a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_LEVEL2)); + IOLog("AICPUPMI: MSR_CONFIG_TDP_CONTROL.....(0x64b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CONFIG_TDP_CONTROL)); + IOLog("AICPUPMI: MSR_TURBO_ACTIVATION_RATIO.(0x64c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_ACTIVATION_RATIO)); + break; + } IOLog("AICPUPMI: MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C2_RESIDENCY)); IOLog("AICPUPMI: MSR_PKG_C3_RESIDENCY.......(0x3f8) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C3_RESIDENCY)); IOLog("AICPUPMI: MSR_PKG_C6_RESIDENCY.......(0x3f9) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C6_RESIDENCY)); IOLog("AICPUPMI: MSR_PKG_C7_RESIDENCY.......(0x3fa) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); - if (gCPUModel == CPU_MODEL_HASWELL_ULT) + if (aCPUModel == CPU_MODEL_HASWELL_ULT) // 0x45 - Intel 325462.pdf Vol.3C 35-136 { IOLog("AICPUPMI: MSR_PKG_C8_RESIDENCY.......(0x630) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); IOLog("AICPUPMI: MSR_PKG_C9_RESIDENCY.......(0x631) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); @@ -298,7 +318,7 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) uint32_t cpuid_reg[4]; do_cpuid(0x00000001, cpuid_reg); - gCPUModel = bitfield32(cpuid_reg[eax], 7, 4) + (bitfield32(cpuid_reg[eax], 19, 16) << 4); + UInt8 cpuModel = bitfield32(cpuid_reg[eax], 7, 4) + (bitfield32(cpuid_reg[eax], 19, 16) << 4); // MWAIT information do_cpuid(0x00000005, cpuid_reg); @@ -307,7 +327,7 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) IOLog("AICPUPMI: MWAIT C-States : %d\n", supportedMwaitCStates); #if REPORT_MSRS - reportMSRs(); + reportMSRs(cpuModel); #endif msr = rdmsr64(MSR_PLATFORM_INFO); gMinRatio = (UInt8)((msr >> 40) & 0xff); @@ -395,9 +415,16 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) #endif #if REPORT_C_STATES - if ((gCPUModel == CPU_MODEL_SB_CORE) || (gCPUModel == CPU_MODEL_SB_JAKETOWN) || (gCPUModel == CPU_MODEL_HASWELL)) + switch (cpuModel) // TODO: Verify me! { - gCheckC7 = true; + case CPU_MODEL_SB_CORE: // 0x2A + case CPU_MODEL_SB_JAKETOWN: // 0x2D + case CPU_MODEL_HASWELL: // 0x3C + case CPU_MODEL_HASWELL_ULT: // 0x45 + case CPU_MODEL_CRYSTALWELL: // 0x46 + + gCheckC7 = true; + break; } #endif timerEventSource->setTimeoutMS(1000); diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index 034489e..6999713 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -101,11 +101,11 @@ class AppleIntelCPUPowerManagementInfo : public IOService virtual IOReturn loopTimerEvent(void); - void reportMSRs(void); + void reportMSRs(UInt8 aCPUModel); - bool loopLock = false; - bool dumpCStates = true; - bool igpuEnabled = true; + bool loopLock = false; // TODO: Use Info.plist + bool dumpCStates = true; // TODO: Use Info.plist + bool igpuEnabled = true; // TODO: Use Info.plist UInt16 Interval = 50; From 9dbae13fca03b2c20cfdc4411f0b7ed7e5ec12f6 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 1 Jan 2014 17:54:02 +0100 Subject: [PATCH 427/623] Cleanups --- .../AppleIntelCPUPowerManagementInfo.cpp | 76 +++++++++---------- .../AppleIntelCPUPowerManagementInfo.h | 11 ++- 2 files changed, 41 insertions(+), 46 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index a193215..bc8f868 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -51,18 +51,22 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(UInt8 aCPUModel) IOLog("AICPUPMI: MSR_PP0_ENERGY_STATUS......(0x639) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_ENERGY_STATUS)); IOLog("AICPUPMI: MSR_PP0_POLICY.............(0x63a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POLICY)); - switch (aCPUModel) + if (igpuEnabled) { - case CPU_MODEL_SB_CORE: // 0x2A - Intel 325462.pdf Vol.3C 35-120 - case CPU_MODEL_HASWELL: // 0x3C - Intel 325462.pdf Vol.3C 35-140 - case CPU_MODEL_HASWELL_ULT: // 0x45 - Intel 325462.pdf Vol.3C 35-140 - case CPU_MODEL_CRYSTALWELL: // 0x46 - Intel 325462.pdf Vol.3C 35-140 + switch (aCPUModel) + { + case CPU_MODEL_SB_CORE: // 0x2A - Intel 325462.pdf Vol.3C 35-120 + case CPU_MODEL_IB_CORE: // 0x3A - Intel 325462.pdf Vol.3C 35-125 (Referring to Table 35-13) + case CPU_MODEL_HASWELL: // 0x3C - Intel 325462.pdf Vol.3C 35-140 + case CPU_MODEL_HASWELL_ULT: // 0x45 - Intel 325462.pdf Vol.3C 35-140 + case CPU_MODEL_CRYSTALWELL: // 0x46 - Intel 325462.pdf Vol.3C 35-140 - IOLog("AICPUPMI: MSR_PP1_CURRENT_CONFIG.....(0x602) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_CURRENT_CONFIG)); - IOLog("AICPUPMI: MSR_PP1_POWER_LIMIT........(0x640) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POWER_LIMIT)); - IOLog("AICPUPMI: MSR_PP1_ENERGY_STATUS......(0x641) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_ENERGY_STATUS)); - IOLog("AICPUPMI: MSR_PP1_POLICY.............(0x642) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POLICY)); - break; + IOLog("AICPUPMI: MSR_PP1_CURRENT_CONFIG.....(0x602) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_CURRENT_CONFIG)); + IOLog("AICPUPMI: MSR_PP1_POWER_LIMIT........(0x640) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POWER_LIMIT)); + IOLog("AICPUPMI: MSR_PP1_ENERGY_STATUS......(0x641) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_ENERGY_STATUS)); + IOLog("AICPUPMI: MSR_PP1_POLICY.............(0x642) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POLICY)); + break; + } } switch (aCPUModel) @@ -81,12 +85,12 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(UInt8 aCPUModel) IOLog("AICPUPMI: MSR_TURBO_ACTIVATION_RATIO.(0x64c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_ACTIVATION_RATIO)); break; } - + IOLog("AICPUPMI: MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C2_RESIDENCY)); IOLog("AICPUPMI: MSR_PKG_C3_RESIDENCY.......(0x3f8) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C3_RESIDENCY)); IOLog("AICPUPMI: MSR_PKG_C6_RESIDENCY.......(0x3f9) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C6_RESIDENCY)); IOLog("AICPUPMI: MSR_PKG_C7_RESIDENCY.......(0x3fa) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); - + if (aCPUModel == CPU_MODEL_HASWELL_ULT) // 0x45 - Intel 325462.pdf Vol.3C 35-136 { IOLog("AICPUPMI: MSR_PKG_C8_RESIDENCY.......(0x630) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); @@ -167,9 +171,6 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) if (gCoreMultipliers != gTriggeredPStates) #endif { - // int currentBit = 0; - // UInt64 value = 0ULL; - gTriggeredPStates = gCoreMultipliers; IOLog("AICPUPMI: CPU P-States [ "); @@ -312,9 +313,6 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) UInt64 msr = rdmsr64(MSR_IA32_PERF_STS); gCoreMultipliers |= (1ULL << (msr >> 8)); - // wrmsr64(IA32_ENERGY_PERF_BIAS, 15); - // wrmsr64(MSR_IA32_PERF_CONTROL, 0x2000); - uint32_t cpuid_reg[4]; do_cpuid(0x00000001, cpuid_reg); @@ -325,31 +323,32 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) uint32_t supportedMwaitCStates = bitfield32(cpuid_reg[edx], 31, 0); IOLog("AICPUPMI: MWAIT C-States : %d\n", supportedMwaitCStates); - + + bool isIGPUEnabled = ((READ_PCI8_NB(DEVEN) & DEVEN_D2EN_MASK)); // IGPU Enabled and Visible? #if REPORT_MSRS reportMSRs(cpuModel); #endif msr = rdmsr64(MSR_PLATFORM_INFO); gMinRatio = (UInt8)((msr >> 40) & 0xff); - IOLog("AICPUPMI: Low Frequency Mode : %d00 MHz\n", gMinRatio); + IOLog("AICPUPMI: Low Frequency Mode.................: %d00 MHz\n", gMinRatio); gClockRatio = (UInt8)((msr >> 8) & 0xff); - IOLog("AICPUPMI: Clock Speed : %d00 MHz\n", gClockRatio); + IOLog("AICPUPMI: Clock Speed (Max. Non-Turbo Freq.).: %d00 MHz\n", gClockRatio); if (!((rdmsr64(IA32_MISC_ENABLES) >> 32) & 0x40)) // Turbo Mode Enabled? { msr = rdmsr64(MSR_TURBO_RATIO_LIMIT); gMaxRatio = (UInt8)(msr & 0xff); - IOLog("AICPUPMI: Max Turbo Frequency: %d00 MHz\n", gMaxRatio); + IOLog("AICPUPMI: Maximum Turbo Frequency............: %d00 MHz\n", gMaxRatio); } else { gMaxRatio = gClockRatio; - IOLog("AICPUPMI: Max Frequency : %d00 MHz\n", gMaxRatio); + IOLog("AICPUPMI: Maximum Frequency..................: %d00 MHz\n", gMaxRatio); } #if REPORT_GPU_STATS - if ((READ_PCI8_NB(DEVEN) & DEVEN_D2EN_MASK)) + if (isIGPUEnabled) { IOPhysicalAddress address = (IOPhysicalAddress)(0xFED10000 + 0x5948); memDescriptor = IOMemoryDescriptor::withPhysicalAddress(address, 0x53, kIODirectionInOut); @@ -362,7 +361,6 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) if (memoryMap != NULL) { - igpuEnabled = true; // IGPU Enabled and Visible gMchbar = (UInt8 *)memoryMap->getVirtualAddress(); // Preventing a stupid (UEFI) BIOS limit. @@ -372,29 +370,27 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) } // - // Examples: - // 17 (multiplier) * 50 (frequency in MHz) = 850 MHz - // 22 (multiplier) * 50 (frequency in MHz) = 1100 MHz - // 6 P-States: 850, 900, 950, 1000, 1050 and 1100 MHz - // + // Examples IGPU multiplier: 17 (multiplier) * 50 (frequency in MHz) = 850 MHz + // 22 (multiplier) * 50 (frequency in MHz) = 1100 MHz + // 6 P-States: 850, 900, 950, 1000, 1050 and 1100 MHz // // Current RP-State, when the graphics engine is in RC6, this reflects the last used ratio. - IOLog("AICPUPMI: IGPU Current Frequency..: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x01])); // RP_STATE_RATIO (CURRENT_FREQUENCY) + IOLog("AICPUPMI: IGPU Current Frequency.............: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x01])); // RP_STATE_RATIO (CURRENT_FREQUENCY) // Maximum RPN base frequency capability for the Integrated GFX Engine (GT). - IOLog("AICPUPMI: IGPU Min Frequency......: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x52])); // RPN_CAP (MIN_FREQUENCY) + IOLog("AICPUPMI: IGPU Minimum Frequency.............: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x52])); // RPN_CAP (MIN_FREQUENCY) // Maximum RP1 base frequency capability for the Integrated GFX Engine (GT). - IOLog("AICPUPMI: IGPU Max Non-Turbo Freq.: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x51])); // RP1_CAP (MAX_NON_TURBO) + IOLog("AICPUPMI: IGPU Maximum Non-Turbo Frequency...: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x51])); // RP1_CAP (MAX_NON_TURBO) // Maximum RP0 base frequency capability for the Integrated GFX Engine (GT). - IOLog("AICPUPMI: IGPU Max Turbo Frequency: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x50])); // RP0_CAP (MAX_TURBO)) + IOLog("AICPUPMI: IGPU Maximum Turbo Frequency.......: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x50])); // RP0_CAP (MAX_TURBO)) // Maximum base frequency limit for the Integrated GFX Engine (GT) allowed during run-time. if (gMchbar[0x4C] == 255) { - IOLog("AICPUPMI: IGPU Maximum limit......: No Limit\n"); // RPSTT_LIM + IOLog("AICPUPMI: IGPU Maximum limit.................: No Limit\n"); // RPSTT_LIM } else { - IOLog("AICPUPMI: IGPU Maximum limit......: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x4C])); // RPSTT_LIM + IOLog("AICPUPMI: IGPU Maximum limit.................: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x4C])); // RPSTT_LIM } } else @@ -417,10 +413,10 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) #if REPORT_C_STATES switch (cpuModel) // TODO: Verify me! { - case CPU_MODEL_SB_CORE: // 0x2A - case CPU_MODEL_SB_JAKETOWN: // 0x2D - case CPU_MODEL_HASWELL: // 0x3C - case CPU_MODEL_HASWELL_ULT: // 0x45 + case CPU_MODEL_SB_CORE: // 0x2A - Intel 325462.pdf Vol.3C 35-111 + case CPU_MODEL_SB_JAKETOWN: // 0x2D - Intel 325462.pdf Vol.3C 35-111 + case CPU_MODEL_HASWELL: // 0x3C - Intel 325462.pdf Vol.3C 35-136 + case CPU_MODEL_HASWELL_ULT: // 0x45 - Intel 325462.pdf Vol.3C 35-136 case CPU_MODEL_CRYSTALWELL: // 0x46 gCheckC7 = true; diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index 6999713..8db6441 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -70,7 +70,6 @@ UInt8 ReadPci8(UInt8 Bus, UInt8 Dev, UInt8 Fun, UInt16 Reg) { if (Reg >= 0x100) { - // return MMIO_READ8(NB_PCIE_CFG_ADDRESS(Bus, Dev, Fun, Reg)); return MMIO_READ8((UInt64)NB_PCIE_CFG_ADDRESS(Bus, Dev, Fun, Reg)); } else @@ -103,10 +102,11 @@ class AppleIntelCPUPowerManagementInfo : public IOService void reportMSRs(UInt8 aCPUModel); - bool loopLock = false; // TODO: Use Info.plist - bool dumpCStates = true; // TODO: Use Info.plist - bool igpuEnabled = true; // TODO: Use Info.plist - + bool loopLock = false; + bool igpuEnabled = true; + + bool dumpCStates = true; // TODO: Use Info.plist + UInt16 Interval = 50; UInt64 gCoreMultipliers = 0ULL; @@ -128,7 +128,6 @@ class AppleIntelCPUPowerManagementInfo : public IOService OSDefineMetaClassAndStructors(AppleIntelCPUPowerManagementInfo, IOService) -UInt8 gCPUModel = 0x2A; UInt8 gCoreStates = 0ULL; #if REPORT_C_STATES From 083992c28d9454d66c710c030dfc1e72278c0bc0 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 1 Jan 2014 18:19:18 +0100 Subject: [PATCH 428/623] And Sandy Bridge also (lost somehow) --- .../AppleIntelCPUPowerManagementInfo.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index bc8f868..60e049d 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -71,6 +71,7 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(UInt8 aCPUModel) switch (aCPUModel) { + case CPU_MODEL_SB_CORE: // 0x2A - Intel 325462.pdf Vol.3C 35-120 case CPU_MODEL_IB_CORE: // 0x3A - Intel 325462.pdf Vol.3C 35-126 case CPU_MODEL_IB_CORE_EX: // 0x3B - Intel 325462.pdf Vol.3C 35-126 case CPU_MODEL_IB_CORE_XEON: // 0x3E - Intel 325462.pdf Vol.3C 35-126 From ea7fc37d27469e210075db14cd3fd55e2e8aed12 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 1 Jan 2014 18:33:31 +0100 Subject: [PATCH 429/623] Let's enable Ivy Bridge C-State logging again --- .../AppleIntelCPUPowerManagementInfo.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 60e049d..0199917 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -416,6 +416,9 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) { case CPU_MODEL_SB_CORE: // 0x2A - Intel 325462.pdf Vol.3C 35-111 case CPU_MODEL_SB_JAKETOWN: // 0x2D - Intel 325462.pdf Vol.3C 35-111 + case CPU_MODEL_IB_CORE: // 0x3A - Intel 325462.pdf Vol.3C 35-125 (Refering to Table 35-12) + case CPU_MODEL_IB_CORE_EX: // 0x3B - Intel 325462.pdf Vol.3C 35-125 (Refering to Table 35-12) + case CPU_MODEL_IB_CORE_XEON: // 0x3E - Intel 325462.pdf Vol.3C 35-125 (Refering to Table 35-12) case CPU_MODEL_HASWELL: // 0x3C - Intel 325462.pdf Vol.3C 35-136 case CPU_MODEL_HASWELL_ULT: // 0x45 - Intel 325462.pdf Vol.3C 35-136 case CPU_MODEL_CRYSTALWELL: // 0x46 From b1d417ea1a31c00261c3f86c42ca00d3c72b58dd Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 2 Jan 2014 00:28:15 +0100 Subject: [PATCH 430/623] Typo, optimisation and latency/system-type issues fixed --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index a17972e..2c2512c 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -610,7 +610,7 @@ function _injectDebugInfo() # # 'machdep.xcpm' is introduced in 10.8.5 # - if [[ $productVersion > "10.8.4" ]]; then + if [[ $gProductVersion > "10.8.4" ]]; then xcpm=$(/usr/sbin/sysctl -n machdep.xcpm.mode) fi @@ -670,8 +670,13 @@ function _printScopeStart() let lowFrequencyPStates=($gBaseFrequency/100)-8 let packageLength=($2+$lowFrequencyPStates) - printf " Name (APLF, 0x%02x" $lowFrequencyPStates >> $gSsdtPR - echo ')' >> $gSsdtPR + if [[ lowFrequencyPStates -gt 0 ]]; + then + printf " Name (APLF, 0x%02x)\n" $lowFrequencyPStates >> $gSsdtPR + else + # Prevent optimization warning. + echo " Name (APLF, Zero)" >> $gSsdtPR + fi # TODO: Remove this when CPUPM for IB works properly! if [[ gIvyWorkAround && $gBridgeType -eq $IVY_BRIDGE ]]; then @@ -902,6 +907,7 @@ function _printScopeACST() let targetCStates=$gACST_CPU0 latency_C1=Zero + latency_C2=0x43 latency_C3=0xCD latency_C6=0xF5 latency_C7=0xF5 @@ -1766,7 +1772,14 @@ function _initIvyBridgeSetup() gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; - esac + + Mac-F60DEB81FF30ACF6) + gSystemType=3 + gMacModelIdentifier="MacPro6,1" + gACST_CPU0=13 # C1, C3, C6 + gACST_CPU1=13 # C1, C3, C6 + ;; +esac } #-------------------------------------------------------------------------------- @@ -1777,21 +1790,21 @@ function _initHaswellSetup() Mac-031B6874CF7F642A) gSystemType=1 gMacModelIdentifier="iMac14,1" - gACST_CPU0=13 # C1, C2, C3, C6 + gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-27ADBB7B4CEE8E61) gSystemType=1 gMacModelIdentifier="iMac14,2" - gACST_CPU0=15 # C1, C2, C3, C6 + gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; Mac-77EB7D7DAF985301) gSystemType=1 gMacModelIdentifier="iMac14,3" - gACST_CPU0=15 # C1, C2, C3, C6 + gACST_CPU0=29 # C1, C3, C6 and C7 gACST_CPU1=7 # C1, C2 and C3 ;; @@ -1835,6 +1848,7 @@ function _initHaswellSetup() gMacModelIdentifier="MacPro6,1" gACST_CPU0=13 # C1, C3, C6 gACST_CPU1=13 # C1, C3, C6 + ;; esac } From 4d5dc7b8725507d67618e00e86f0bc605c9929a3 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 2 Jan 2014 01:15:30 +0100 Subject: [PATCH 431/623] Stop KP on SB/Haswell --- .../AppleIntelCPUPowerManagementInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 0199917..e4e985a 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -57,11 +57,12 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(UInt8 aCPUModel) { case CPU_MODEL_SB_CORE: // 0x2A - Intel 325462.pdf Vol.3C 35-120 case CPU_MODEL_IB_CORE: // 0x3A - Intel 325462.pdf Vol.3C 35-125 (Referring to Table 35-13) + IOLog("AICPUPMI: MSR_PP1_CURRENT_CONFIG.....(0x602) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_CURRENT_CONFIG)); + case CPU_MODEL_HASWELL: // 0x3C - Intel 325462.pdf Vol.3C 35-140 case CPU_MODEL_HASWELL_ULT: // 0x45 - Intel 325462.pdf Vol.3C 35-140 case CPU_MODEL_CRYSTALWELL: // 0x46 - Intel 325462.pdf Vol.3C 35-140 - IOLog("AICPUPMI: MSR_PP1_CURRENT_CONFIG.....(0x602) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_CURRENT_CONFIG)); IOLog("AICPUPMI: MSR_PP1_POWER_LIMIT........(0x640) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POWER_LIMIT)); IOLog("AICPUPMI: MSR_PP1_ENERGY_STATUS......(0x641) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_ENERGY_STATUS)); IOLog("AICPUPMI: MSR_PP1_POLICY.............(0x642) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP1_POLICY)); @@ -71,7 +72,6 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(UInt8 aCPUModel) switch (aCPUModel) { - case CPU_MODEL_SB_CORE: // 0x2A - Intel 325462.pdf Vol.3C 35-120 case CPU_MODEL_IB_CORE: // 0x3A - Intel 325462.pdf Vol.3C 35-126 case CPU_MODEL_IB_CORE_EX: // 0x3B - Intel 325462.pdf Vol.3C 35-126 case CPU_MODEL_IB_CORE_XEON: // 0x3E - Intel 325462.pdf Vol.3C 35-126 From d218aff6bde19429e9e9dbc53f826b55bdc95e73 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 2 Jan 2014 15:51:22 +0100 Subject: [PATCH 432/623] Fix KP on Xeon E5 The Intel datasheet states that it is supported on the E3-1200 but that probably makes us crash on E5's --- .../AppleIntelCPUPowerManagementInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index e4e985a..741384f 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -74,7 +74,7 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(UInt8 aCPUModel) { case CPU_MODEL_IB_CORE: // 0x3A - Intel 325462.pdf Vol.3C 35-126 case CPU_MODEL_IB_CORE_EX: // 0x3B - Intel 325462.pdf Vol.3C 35-126 - case CPU_MODEL_IB_CORE_XEON: // 0x3E - Intel 325462.pdf Vol.3C 35-126 + // case CPU_MODEL_IB_CORE_XEON: // 0x3E - Intel 325462.pdf Vol.3C 35-126 case CPU_MODEL_HASWELL: // 0x3C - Intel 325462.pdf Vol.3C 35-133 case CPU_MODEL_HASWELL_ULT: // 0x45 - Intel 325462.pdf Vol.3C 35-133 case CPU_MODEL_CRYSTALWELL: // 0x46 - Intel 325462.pdf Vol.3C 35-133 From ff4beac1d7ad02100aa17722c83206e6b1190dad Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 2 Jan 2014 16:03:49 +0100 Subject: [PATCH 433/623] =?UTF-8?q?No=20C7=20for=20Intel=C2=AE=20Xeon?= =?UTF-8?q?=C2=AE=20E5-1600=20v2/E5-2600=20v2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No C7 support for Intel® Xeon® Processor E5-1600 v2/E5-2600 v2 (Product Families Datasheet Volume One of Two page 19) --- .../AppleIntelCPUPowerManagementInfo.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 741384f..9959d7c 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -44,7 +44,14 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(UInt8 aCPUModel) IOLog("AICPUPMI: MSR_PKGC3_IRTL.............(0x60a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC3_IRTL)); IOLog("AICPUPMI: MSR_PKGC6_IRTL.............(0x60b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC6_IRTL)); - IOLog("AICPUPMI: MSR_PKGC7_IRTL.............(0x60c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC7_IRTL)); + + /* + * No C7 support for Intel® Xeon® Processor E5-1600 v2/E5-2600 v2 (Product Families Datasheet Volume One of Two page 19) + */ + if (aCPUModel != CPU_MODEL_IB_CORE_XEON) + { + IOLog("AICPUPMI: MSR_PKGC7_IRTL.............(0x60c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC7_IRTL)); + } IOLog("AICPUPMI: MSR_PP0_CURRENT_CONFIG.....(0x601) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_CURRENT_CONFIG)); IOLog("AICPUPMI: MSR_PP0_POWER_LIMIT........(0x638) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POWER_LIMIT)); @@ -418,7 +425,7 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) case CPU_MODEL_SB_JAKETOWN: // 0x2D - Intel 325462.pdf Vol.3C 35-111 case CPU_MODEL_IB_CORE: // 0x3A - Intel 325462.pdf Vol.3C 35-125 (Refering to Table 35-12) case CPU_MODEL_IB_CORE_EX: // 0x3B - Intel 325462.pdf Vol.3C 35-125 (Refering to Table 35-12) - case CPU_MODEL_IB_CORE_XEON: // 0x3E - Intel 325462.pdf Vol.3C 35-125 (Refering to Table 35-12) + // case CPU_MODEL_IB_CORE_XEON: // 0x3E - Intel 325462.pdf Vol.3C 35-125 (Refering to Table 35-12) case CPU_MODEL_HASWELL: // 0x3C - Intel 325462.pdf Vol.3C 35-136 case CPU_MODEL_HASWELL_ULT: // 0x45 - Intel 325462.pdf Vol.3C 35-136 case CPU_MODEL_CRYSTALWELL: // 0x46 From 23ca80364a95ad4f81d97912387e8f0f578bdb11 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 2 Jan 2014 16:43:59 +0100 Subject: [PATCH 434/623] Cleanups and additional checks --- .../AppleIntelCPUPowerManagementInfo.cpp | 18 ++++++++++++------ .../AppleIntelCPUPowerManagementInfo.h | 4 ++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 9959d7c..cc96e1b 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -163,10 +163,8 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) if (dumpCStates) { UInt32 magic = 0; - // IOSimpleLockLock(simpleLock); mp_rendezvous_no_intrs(getCStates, &magic); IOSleep(1); - // IOSimpleLockUnlock(simpleLock); } #endif @@ -227,7 +225,7 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) } #if REPORT_C_STATES - if (gTriggeredC3Cores != gC3Cores) + if (gCheckC3 && (gTriggeredC3Cores != gC3Cores)) { gTriggeredC3Cores = gC3Cores; IOLog("AICPUPMI: CPU C3-Cores [ "); @@ -245,7 +243,7 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) IOLog("]\n"); } - if (gTriggeredC6Cores != gC6Cores) + if (gCheckC6 && (gTriggeredC6Cores != gC6Cores)) { gTriggeredC6Cores = gC6Cores; IOLog("AICPUPMI: CPU C6-Cores [ "); @@ -263,7 +261,7 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) IOLog("]\n"); } - if (gTriggeredC7Cores != gC7Cores) + if (gCheckC7 && (gTriggeredC7Cores != gC7Cores)) { gTriggeredC7Cores = gC7Cores; IOLog("AICPUPMI: CPU C7-Cores [ "); @@ -326,13 +324,21 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) UInt8 cpuModel = bitfield32(cpuid_reg[eax], 7, 4) + (bitfield32(cpuid_reg[eax], 19, 16) << 4); +#if REPORT_GPU_STATS + bool isIGPUEnabled = ((READ_PCI8_NB(DEVEN) & DEVEN_D2EN_MASK)); // IGPU Enabled and Visible? + + if (!isIGPUEnabled && igpuEnabled) + { + igpuEnabled = false; + } +#endif + // MWAIT information do_cpuid(0x00000005, cpuid_reg); uint32_t supportedMwaitCStates = bitfield32(cpuid_reg[edx], 31, 0); IOLog("AICPUPMI: MWAIT C-States : %d\n", supportedMwaitCStates); - bool isIGPUEnabled = ((READ_PCI8_NB(DEVEN) & DEVEN_D2EN_MASK)); // IGPU Enabled and Visible? #if REPORT_MSRS reportMSRs(cpuModel); #endif diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index 8db6441..d5104ff 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -94,6 +94,8 @@ class AppleIntelCPUPowerManagementInfo : public IOService #if REPORT_GPU_STATS IOMemoryDescriptor *memDescriptor; IOMemoryMap *memoryMap; + + bool igpuEnabled = true; #endif IOReturn result = kIOReturnSuccess; @@ -103,8 +105,6 @@ class AppleIntelCPUPowerManagementInfo : public IOService void reportMSRs(UInt8 aCPUModel); bool loopLock = false; - bool igpuEnabled = true; - bool dumpCStates = true; // TODO: Use Info.plist UInt16 Interval = 50; From 293dc583ed515cf09673b6224d2002cb6fe16743 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 3 Jan 2014 02:26:53 +0100 Subject: [PATCH 435/623] Additional cleanups --- .../AppleIntelCPUPowerManagementInfo.cpp | 67 ++++++++++--------- .../AppleIntelCPUPowerManagementInfo.h | 8 +-- 2 files changed, 39 insertions(+), 36 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index cc96e1b..c7b8e78 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 Pike R. Alpha. All rights reserved. + * Copyright (c) 2012-2014 Pike R. Alpha. All rights reserved. * * Original idea and initial development of MSRDumper.kext (c) 2011 by RevoGirl. * @@ -45,10 +45,7 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(UInt8 aCPUModel) IOLog("AICPUPMI: MSR_PKGC3_IRTL.............(0x60a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC3_IRTL)); IOLog("AICPUPMI: MSR_PKGC6_IRTL.............(0x60b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC6_IRTL)); - /* - * No C7 support for Intel® Xeon® Processor E5-1600 v2/E5-2600 v2 (Product Families Datasheet Volume One of Two page 19) - */ - if (aCPUModel != CPU_MODEL_IB_CORE_XEON) + if (gCheckC7) { IOLog("AICPUPMI: MSR_PKGC7_IRTL.............(0x60c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC7_IRTL)); } @@ -58,6 +55,7 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(UInt8 aCPUModel) IOLog("AICPUPMI: MSR_PP0_ENERGY_STATUS......(0x639) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_ENERGY_STATUS)); IOLog("AICPUPMI: MSR_PP0_POLICY.............(0x63a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POLICY)); +#if REPORT_IGPU_P_STATES if (igpuEnabled) { switch (aCPUModel) @@ -76,6 +74,7 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(UInt8 aCPUModel) break; } } +#endif switch (aCPUModel) { @@ -97,7 +96,11 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(UInt8 aCPUModel) IOLog("AICPUPMI: MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C2_RESIDENCY)); IOLog("AICPUPMI: MSR_PKG_C3_RESIDENCY.......(0x3f8) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C3_RESIDENCY)); IOLog("AICPUPMI: MSR_PKG_C6_RESIDENCY.......(0x3f9) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C6_RESIDENCY)); - IOLog("AICPUPMI: MSR_PKG_C7_RESIDENCY.......(0x3fa) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + + if (gCheckC7) + { + IOLog("AICPUPMI: MSR_PKG_C7_RESIDENCY.......(0x3fa) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + } if (aCPUModel == CPU_MODEL_HASWELL_ULT) // 0x45 - Intel 325462.pdf Vol.3C 35-136 { @@ -140,7 +143,7 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) UInt8 currentMultiplier = (rdmsr64(MSR_IA32_PERF_STS) >> 8); gCoreMultipliers |= (1ULL << currentMultiplier); -#if REPORT_GPU_STATS +#if REPORT_IGPU_P_STATES UInt8 currentIgpuMultiplier = 0; if (igpuEnabled) @@ -171,7 +174,7 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) int currentBit = 0; UInt64 value = 0ULL; -#if REPORT_GPU_STATS +#if REPORT_IGPU_P_STATES if ((gCoreMultipliers != gTriggeredPStates) || (gIGPUMultipliers != gTriggeredIGPUPStates)) #else if (gCoreMultipliers != gTriggeredPStates) @@ -197,7 +200,7 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) } } -#if REPORT_GPU_STATS +#if REPORT_IGPU_P_STATES if (igpuEnabled) { gTriggeredIGPUPStates = gIGPUMultipliers; @@ -323,8 +326,26 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) do_cpuid(0x00000001, cpuid_reg); UInt8 cpuModel = bitfield32(cpuid_reg[eax], 7, 4) + (bitfield32(cpuid_reg[eax], 19, 16) << 4); - -#if REPORT_GPU_STATS + +#if REPORT_C_STATES + switch (cpuModel) // TODO: Verify me! + { + case CPU_MODEL_SB_CORE: // 0x2A - Intel 325462.pdf Vol.3C 35-111 + case CPU_MODEL_SB_JAKETOWN: // 0x2D - Intel 325462.pdf Vol.3C 35-111 + case CPU_MODEL_IB_CORE: // 0x3A - Intel 325462.pdf Vol.3C 35-125 (Refering to Table 35-12) + case CPU_MODEL_IB_CORE_EX: // 0x3B - Intel 325462.pdf Vol.3C 35-125 (Refering to Table 35-12) + // No C7 support for Intel® Xeon® Processor E5-1600 v2/E5-2600 v2 (Product Families Datasheet Volume One of Two page 19) + // case CPU_MODEL_IB_CORE_XEON: // 0x3E - Intel 325462.pdf Vol.3C 35-125 (Refering to Table 35-12) + case CPU_MODEL_HASWELL: // 0x3C - Intel 325462.pdf Vol.3C 35-136 + case CPU_MODEL_HASWELL_ULT: // 0x45 - Intel 325462.pdf Vol.3C 35-136 + case CPU_MODEL_CRYSTALWELL: // 0x46 + + gCheckC7 = true; + break; + } +#endif + +#if REPORT_IGPU_P_STATES bool isIGPUEnabled = ((READ_PCI8_NB(DEVEN) & DEVEN_D2EN_MASK)); // IGPU Enabled and Visible? if (!isIGPUEnabled && igpuEnabled) @@ -332,12 +353,11 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) igpuEnabled = false; } #endif - // MWAIT information do_cpuid(0x00000005, cpuid_reg); uint32_t supportedMwaitCStates = bitfield32(cpuid_reg[edx], 31, 0); - IOLog("AICPUPMI: MWAIT C-States : %d\n", supportedMwaitCStates); + IOLog("AICPUPMI: MWAIT C-States.....................: %d\n", supportedMwaitCStates); #if REPORT_MSRS reportMSRs(cpuModel); @@ -361,7 +381,7 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) IOLog("AICPUPMI: Maximum Frequency..................: %d00 MHz\n", gMaxRatio); } -#if REPORT_GPU_STATS +#if REPORT_IGPU_P_STATES if (isIGPUEnabled) { IOPhysicalAddress address = (IOPhysicalAddress)(0xFED10000 + 0x5948); @@ -423,23 +443,6 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) } } #endif - -#if REPORT_C_STATES - switch (cpuModel) // TODO: Verify me! - { - case CPU_MODEL_SB_CORE: // 0x2A - Intel 325462.pdf Vol.3C 35-111 - case CPU_MODEL_SB_JAKETOWN: // 0x2D - Intel 325462.pdf Vol.3C 35-111 - case CPU_MODEL_IB_CORE: // 0x3A - Intel 325462.pdf Vol.3C 35-125 (Refering to Table 35-12) - case CPU_MODEL_IB_CORE_EX: // 0x3B - Intel 325462.pdf Vol.3C 35-125 (Refering to Table 35-12) - // case CPU_MODEL_IB_CORE_XEON: // 0x3E - Intel 325462.pdf Vol.3C 35-125 (Refering to Table 35-12) - case CPU_MODEL_HASWELL: // 0x3C - Intel 325462.pdf Vol.3C 35-136 - case CPU_MODEL_HASWELL_ULT: // 0x45 - Intel 325462.pdf Vol.3C 35-136 - case CPU_MODEL_CRYSTALWELL: // 0x46 - - gCheckC7 = true; - break; - } -#endif timerEventSource->setTimeoutMS(1000); return true; @@ -478,7 +481,7 @@ void AppleIntelCPUPowerManagementInfo::stop(IOService *provider) void AppleIntelCPUPowerManagementInfo::free() { -#if REPORT_GPU_STATS +#if REPORT_IGPU_P_STATES if (igpuEnabled) { if (memoryMap) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index d5104ff..e4545ae 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 Pike R. Alpha. All rights reserved. + * Copyright (c) 2012-2014 Pike R. Alpha. All rights reserved. * * Original idea and initial development of MSRDumper.kext (c) 2011 by RevoGirl. * @@ -22,7 +22,7 @@ #define super IOService #define REPORT_MSRS 1 -#define REPORT_GPU_STATS 1 +#define REPORT_IGPU_P_STATES 1 #define REPORT_C_STATES 1 #define NB_BUS 0x00 @@ -91,7 +91,7 @@ class AppleIntelCPUPowerManagementInfo : public IOService IOWorkLoop *workLoop; IOTimerEventSource *timerEventSource; -#if REPORT_GPU_STATS +#if REPORT_IGPU_P_STATES IOMemoryDescriptor *memDescriptor; IOMemoryMap *memoryMap; @@ -146,6 +146,6 @@ UInt32 gTriggeredC7Cores = 0; UInt64 gCoreMultipliers = 0ULL; -#if REPORT_GPU_STATS +#if REPORT_IGPU_P_STATES UInt8 * gMchbar = NULL; #endif \ No newline at end of file From e50b0ea851983e87f4acc383c62d59dda5a573ff Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Fri, 3 Jan 2014 21:31:26 +0100 Subject: [PATCH 436/623] Adding note --- i386/config/README | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/i386/config/README b/i386/config/README index e9dc128..57fd990 100644 --- a/i386/config/README +++ b/i386/config/README @@ -52,6 +52,13 @@ People with working RevoBoot configurations can simply copy their settings.h to This will allow the RevoBoot build process to compile without errors, but make sure to use the latest preprocessor options. +Important: Open settings-template.h and search for: + +#define STATIC_NVRAM_ROM { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xNN, 0xNN, 0xNN, 0xNN, 0xNN, 0xNN } // Example only! + // sudo nvram 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:ROM=%01%02%03%04%05%06%07%08%09%0A%0B%NN%NN%NN%NN%NN%NN + // Note: Use your MAC address for the last six bytes! + +You must change this, or RevoBoot won't compile! ACPI/EFI/SMBIOS/data.h ---------------------- From 2091a18e74ca7bf6526105bae7721efad3f16b04 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 4 Jan 2014 18:07:10 +0100 Subject: [PATCH 437/623] Make Mavericks the default target --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5db3dc2..0c59c1f 100644 --- a/Makefile +++ b/Makefile @@ -50,10 +50,10 @@ VPATH = $(OBJROOT):$(SYMROOT) ifeq ($(MAKECMDGOALS),) # - # No OS build target given. Build for Mountain Lion (default). + # No OS build target given. Build for Mavericks (default). # - MAKE_TARGET_OS = 6; - MAKEGOAL = mountain-lion + MAKE_TARGET_OS = 10; + MAKEGOAL = mavericks else # # Setting MAKE_TARGET_OS and MAKEGOAL based on OS build target. From 2987f5d47295533dc62ff2da44a808571fd96c70 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 4 Jan 2014 18:07:58 +0100 Subject: [PATCH 438/623] Adding support for Xeon E5 / MacPro6,1 --- i386/libsaio/cpu/Intel/dynamic_data.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index a7bb118..51d81f5 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -345,6 +345,7 @@ void initCPUStruct(void) case CPU_MODEL_IB_CORE: case CPU_MODEL_IB_CORE_EX: + case CPU_MODEL_IB_CORE_XEON: CoreBridgeType = IVY_BRIDGE; hiBit = 31; break; @@ -390,6 +391,10 @@ void initCPUStruct(void) { gPlatform.CPU.Type = (0x900 + CoreBridgeType); // Core i3 } + else if (strstr(gPlatform.CPU.BrandString, "Xeon(R)")) + { + gPlatform.CPU.Type = (0xA00 + CoreBridgeType); + } msr = rdmsr64(MSR_PLATFORM_INFO); @@ -544,7 +549,7 @@ void initCPUStruct(void) _CPU_DEBUG_DUMP("CPU: NumCores/NumThreads : %d/%d\n", gPlatform.CPU.NumCores, gPlatform.CPU.NumThreads); - if (CoreBridgeType) // SandyBridge) + if (CoreBridgeType) { _CPU_DEBUG_DUMP("CPU: Min/Max busratio : %d/%d\n", gPlatform.CPU.MinBusRatio, gPlatform.CPU.MaxBusRatio); } From 7c6b8da1a7bfa98b792c7f5a2698982b81e262f7 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 4 Jan 2014 18:08:51 +0100 Subject: [PATCH 439/623] Renaming LION_RECOVERY_SUPPORT to RECOVERY_HD_SUPPORT --- i386/libsaio/stringTable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/stringTable.c b/i386/libsaio/stringTable.c index a6072d8..af42db0 100755 --- a/i386/libsaio/stringTable.c +++ b/i386/libsaio/stringTable.c @@ -371,7 +371,7 @@ long loadCABootPlist(void) static char * dirspec[] = { -#if LION_RECOVERY_SUPPORT +#if RECOVERY_HD_SUPPORT "com.apple.recovery.boot", #endif @@ -403,7 +403,7 @@ long loadCABootPlist(void) #if INSTALL_ESD_SUPPORT int start = 0; int end = 3; - #if LION_RECOVERY_SUPPORT + #if RECOVERY_HD_SUPPORT start++; end++; #endif From 16608af0a486b1daded293c5eabc64008ca7b863 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 4 Jan 2014 18:11:02 +0100 Subject: [PATCH 440/623] Adding latest model data / cleanups --- i386/libsaio/smbios/model_data.h | 37 +++++++++++++++++--------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 3b5c4d5..c445e01 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -64,16 +64,16 @@ #define SMB_PRODUCT_NAME "iMac14,1" #define SMB_BOARD_PRODUCT "Mac-031B6874CF7F642A" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '1' } - #elif (TARGET_MODEL == IMAC_141) + #elif (TARGET_MODEL == IMAC_142) #define SMB_BIOS_VERSION "IM141.88Z.0118.B00.1309031249" #define SMB_PRODUCT_NAME "iMac14,2" #define SMB_BOARD_PRODUCT "Mac-27ADBB7B4CEE8E61" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '2' } #else // Defaults to iMac 14,3 - #define SMB_BIOS_VERSION "IM143.88Z.0118.B00.1309031249" - #define SMB_PRODUCT_NAME "iMac14,3" - #define SMB_BOARD_PRODUCT "Mac-77EB7D7DAF985301" - #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '3' } + #define SMB_BIOS_VERSION "IM143.88Z.0118.B00.1309031249" + #define SMB_PRODUCT_NAME "iMac14,3" + #define SMB_BOARD_PRODUCT "Mac-77EB7D7DAF985301" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '3' } #endif // ------------------------------------------------------------------------------------- #endif @@ -180,24 +180,32 @@ #define SMB_BOARD_PRODUCT "Mac-AFD8A9D944EA4843" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '0', ',', '2' } #elif (TARGET_MODEL == MACBOOK_PRO_111) - // Intel Core i5-4258U @ 2.90 GHz - 2 cores / 4 threads. + // Intel Core i5-4258U @ 2.40 GHz - 2 cores / 4 threads. + // Intel Core i5-4288U @ 2.60 GHz - 2 cores / 4 threads. + // Intel Core i7-4558U @ 2.80 GHz - 2 cores / 4 threads. #define SMB_BIOS_VERSION "MBP111.88Z.0138.B03.1310291227" #define SMB_PRODUCT_NAME "MacBookPro11,1" #define SMB_BOARD_PRODUCT "Mac-189A3D4F975D5FFC" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '1', ',', '1' } - #else // Defaults to MacBookPro11,2 (with NVIDIA graphics) - // Intel Core i5-4258U @ 2.90 GHz - 2 cores / 4 threads. - #define SMB_BIOS_VERSION "MBP112.88Z.0138.B03.1310291227" + #elif (TARGET_MODEL == MACBOOK_PRO_112) + // Intel Core i7-4750HQ @ 2.00 GHz - 4 cores / 8 threads. + // Intel Core i7-4950HQ @ 2.40 GHz - 4 cores / 8 threads. + #define SMB_BIOS_VERSION "MBP112.88Z.0138.B02.1310181745" #define SMB_PRODUCT_NAME "MacBookPro11,2" #define SMB_BOARD_PRODUCT "Mac-3CBD00234E554E41" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '1', ',', '2' } + #else + // Intel Core i7-4850HQ @ 2.30 GHz - 4 cores / 8 threads. + // Intel Core i7-4960HQ @ 2.60 GHz - 4 cores / 8 threads. + #define SMB_BIOS_VERSION "MBP112.88Z.0138.B02.1310181745" + #define SMB_PRODUCT_NAME "MacBookPro11,3" + #define SMB_BOARD_PRODUCT "Mac-2BD1B31983FE1663" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '1', ',', '3' } #endif // ------------------------------------------------------------------------------------- #endif - - #if TARGET_MODEL & MACMINI // 16 // ------------------------------------------------------------------------------------- #define SMB_FAMILY "Macmini" @@ -232,17 +240,12 @@ #define SMB_PRODUCT_NAME "Macmini6,1" #define SMB_BOARD_PRODUCT "Mac-031AEE4D24BFF0B1" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '1' } - #elif (TARGET_MODEL == MACMINI_62) // Defaults to Macmini6,2 + #else // Defaults to Macmini6,2 // Intel Core i7-3615QM @ 2.30 GHz (4 cores - 8 threads) #define SMB_BIOS_VERSION "MM61.88Z.0106.B03.1211161202" #define SMB_PRODUCT_NAME "Macmini6,2" #define SMB_BOARD_PRODUCT "Mac-F65AE981FFA204ED" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '2' } - #else // Defaults to Macmini7,1 - #define SMB_BIOS_VERSION "MM71.88Z.0106.B00.1307301121" - #define SMB_PRODUCT_NAME "Macmini7,1" - #define SMB_BOARD_PRODUCT "Mac-031B6874CF7F642A" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '7', ',', '1' } #endif // ------------------------------------------------------------------------------------- #endif From aa3801dcc843a8987d36e9cd4b163e8a52ca0337 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 4 Jan 2014 18:12:01 +0100 Subject: [PATCH 441/623] Adding latest model data / MacPro6,1 system-type --- i386/libsaio/platform.h | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index d982352..454bf66 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -60,8 +60,9 @@ #define IMAC_122 (IMAC | (3 << 15)) #define IMAC_131 (IMAC | (4 << 15)) #define IMAC_132 (IMAC | (5 << 15)) -#define IMAC_142 (IMAC | (6 << 15)) -#define IMAC_141 IMAC // Defaults to iMac14,1 +#define IMAC_141 (IMAC | (6 << 15)) +#define IMAC_141 (IMAC | (7 << 15)) +#define IMAC_143 IMAC // Defaults to iMac14,3 #define MACBOOK_41 MACBOOK // Defaults to MacBook4,1 @@ -72,16 +73,17 @@ #define MACBOOK_AIR_61 (MACBOOK_AIR | (5 << 15)) #define MACBOOK_AIR_62 MACBOOK_AIR // Defaults to MacBookAir6,2 -#define MACBOOK_PRO_61 (MACBOOK_PRO | (1 << 15)) -#define MACBOOK_PRO_81 (MACBOOK_PRO | (2 << 15)) -#define MACBOOK_PRO_82 (MACBOOK_PRO | (3 << 15)) -#define MACBOOK_PRO_83 (MACBOOK_PRO | (4 << 15)) -#define MACBOOK_PRO_91 (MACBOOK_PRO | (5 << 15)) -#define MACBOOK_PRO_92 (MACBOOK_PRO | (6 << 15)) -#define MACBOOK_PRO_101 (MACBOOK_PRO | (7 << 15)) -#define MACBOOK_PRO_102 (MACBOOK_PRO | (8 << 15)) -#define MACBOOK_PRO_111 (MACBOOK_PRO | (9 << 15)) -#define MACBOOK_PRO_112 MACBOOK_PRO // Defaults to MacBookPro11,2 +#define MACBOOK_PRO_61 (MACBOOK_PRO | ( 1 << 15)) +#define MACBOOK_PRO_81 (MACBOOK_PRO | ( 2 << 15)) +#define MACBOOK_PRO_82 (MACBOOK_PRO | ( 3 << 15)) +#define MACBOOK_PRO_83 (MACBOOK_PRO | ( 4 << 15)) +#define MACBOOK_PRO_91 (MACBOOK_PRO | ( 5 << 15)) +#define MACBOOK_PRO_92 (MACBOOK_PRO | ( 6 << 15)) +#define MACBOOK_PRO_101 (MACBOOK_PRO | ( 7 << 15)) +#define MACBOOK_PRO_102 (MACBOOK_PRO | ( 8 << 15)) +#define MACBOOK_PRO_111 (MACBOOK_PRO | ( 9 << 15)) +#define MACBOOK_PRO_112 (MACBOOK_PRO | (10 << 15)) +#define MACBOOK_PRO_113 MACBOOK_PRO // Defaults to MacBookPro11,3 #define MACMINI_41 (MACMINI | (1 << 15)) #define MACMINI_51 (MACMINI | (2 << 15)) @@ -97,6 +99,12 @@ #define MACPRO_51 (MACPRO | (3 << 15)) #define MACPRO_61 MACPRO // Defaults to MacPro6,1 +#if ((TARGET_MODEL & MACPRO) == MACPRO) + #define PM_PROFILE_OVERRIDE 3 +#else + #define PM_PROFILE_OVERRIDE 1 +#endif + //------------------------------------------------------------------------------ // #define LOAD_MODEL_SPECIFIC_STATIC_DATA (LOAD_MODEL_SPECIFIC_ACPI_DATA || LOAD_MODEL_SPECIFIC_EFI_DATA || LOAD_MODEL_SPECIFIC_SMBIOS_DATA) @@ -165,10 +173,7 @@ typedef struct _PlatformInfo_t // later updated in boot.c with the actual version info. char * ModelID; // Initialized in platform.c and used in boot.c -#if LOAD_MODEL_SPECIFIC_STATIC_DATA char * CommaLessModelID; // Initialized in platform.c and used in i386/libsaio/ACPI/patcher.h, -#endif // i386/libsaio/efi.c and i386/libsaio/SMBIOS/static_data.h - char * KextFileName; // Initialized and used in drivers.c char * KextFileSpec; // Initialized and used in drivers.c char * KextPlistSpec; // Initialized and used in drivers.c @@ -334,7 +339,7 @@ extern cpu_type_t gArchCPUType; // DHP: Fix / remove me! extern PlatformInfo_t gPlatform; -extern void initPlatform(int biosDevice); +extern void initPlatform(int biosDevice, bool bootRecoveryHD); extern cpu_type_t getArchCPUType(void); From b9a915791f1db9a4bd96d6f642a457b163c43cf5 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 4 Jan 2014 18:12:58 +0100 Subject: [PATCH 442/623] Cleanups / MacPro6,1 system-type --- i386/libsaio/platform.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/platform.c b/i386/libsaio/platform.c index 974bbba..8ddea37 100644 --- a/i386/libsaio/platform.c +++ b/i386/libsaio/platform.c @@ -123,12 +123,14 @@ void enableHPET(void) //============================================================================== // Public function. Called from boot/common_boot only. -void initPlatform(int biosDevice) +void initPlatform(int biosDevice, bool bootRecoveryHD) { memset(&gPlatform, 0, sizeof(gPlatform)); + gPlatform.BootRecoveryHD = bootRecoveryHD; + // Copied from cpu/dynamic_data.h to make printf work this early on. -#if DEBUG_CPU || DEBUG_PLATFORM +#if DEBUG_STATE_ENABLED extern void setVideoMode(int mode); setVideoMode(0); // Switch to VGA_TEXT_MODE #endif @@ -188,7 +190,7 @@ void initPlatform(int biosDevice) // Determine system type based on product name. Used in // acpi/patcher.h to update FADT->Preferred_PM_Profile - gPlatform.Type = (strncmp(gPlatform.ModelID, "MacBook", 7) == 0) ? 2 : 1; + gPlatform.Type = (strncmp(gPlatform.ModelID, "MacBook", 7) == 0) ? 2 : PM_PROFILE_OVERRIDE; // Are we supposted to have a Mobile CPU? if (gPlatform.Type == 2 && gPlatform.CPU.Mobile == false) @@ -281,9 +283,13 @@ void initPlatform(int biosDevice) _PLATFORM_DEBUG_DUMP("Static data for %d RAM BANKS used.\n", gPlatform.RAM.SlotCount); _PLATFORM_DEBUG_SLEEP(10); +#else + _PLATFORM_DEBUG_SLEEP(5); #endif - _PLATFORM_DEBUG_SLEEP(5); +#if RECOVERY_HD_SUPPORT + _PLATFORM_DEBUG_DUMP("gPlatform.BootRecoveryHD: %s\n", gPlatform.BootRecoveryHD ? "True" : "False"); +#endif initKernelBootConfig(); From ba85a18fe70e17d4b52c4f932251a420a275c259 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 4 Jan 2014 18:14:42 +0100 Subject: [PATCH 443/623] Add back RECOVERY_HD_SUPPORT Also fixed a copy/paste error in my name --- i386/libsaio/disk.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/i386/libsaio/disk.c b/i386/libsaio/disk.c index 944e7f3..6a84793 100644 --- a/i386/libsaio/disk.c +++ b/i386/libsaio/disk.c @@ -46,11 +46,11 @@ * * Updates: * - Cleanups and refactoring by DHP in 2010 and 2011. - * - Renamed LION_RECOVERY_SUPPORT to CORE_STARAGE_SUPPORT (PikerAlpha, November 2012). - * - Renamed LION_FILEVAULT_SUPPORT to CORE_STARAGE_SUPPORT (PikerAlpha, November 2012). - * - Renamed encryptedBootPartition to coreStoragePartition (PikerAlpha, November 2012). - * - OSBigEndian removed and some minor style nits (PikerAlpha, November 2012). - * - Unused #include <limits.h> removed (PikerAlpha, November 2012). + * - Renamed LION_RECOVERY_SUPPORT to CORE_STORAGE_SUPPORT (Pike R. Alpha, November 2012). + * - Renamed LION_FILEVAULT_SUPPORT to CORE_STORAGE_SUPPORT (Pike R. Alpha, November 2012). + * - Renamed encryptedBootPartition to coreStoragePartition (Pike R. Alpha, November 2012). + * - OSBigEndian removed and some minor style nits (Pike R. Alpha, November 2012). + * - Unused #include <limits.h> removed (Pike R. Alpha, November 2012). * */ @@ -149,7 +149,7 @@ EFI_GUID const GPT_HFS_GUID = { 0x48465300, 0x0000, 0x11AA, { 0xAA, 0x11, 0x // Apple TV EFI_GUID const GPT_HFSX_GUID = { 0x5265636F, 0x7665, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; -#if CORE_STORAGE_SUPPORT || APPLE_RAID_SUPPORT +#if CORE_STORAGE_SUPPORT || APPLE_RAID_SUPPORT || RECOVERY_HD_SUPPORT // Apple_Boot (RAID helper partition and the 650 MB 'Recovery HD' partition). EFI_GUID const GPT_BOOT_GUID = { 0x426F6F74, 0x0000, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; #endif @@ -675,7 +675,7 @@ BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr) } #endif -#if CORE_STORAGE_SUPPORT || APPLE_RAID_SUPPORT +#if CORE_STORAGE_SUPPORT || APPLE_RAID_SUPPORT || RECOVERY_HD_SUPPORT else if (compareEFIGUID(&GPT_BOOT_GUID, (EFI_GUID const *)gptMap->ent_type) == 0) { _DISK_DEBUG_DUMP("Matched: GPT_BOOT_GUID\n"); @@ -758,7 +758,16 @@ bool hasBootEFI(BVRef bvr) sprintf(dirSpec, "hd(%d,%d)/System/Library/CoreServices/", BIOS_DEV_UNIT(bvr), bvr->part_no); +#if RECOVERY_HD_SUPPORT + if (gPlatform.BootRecoveryHD) + { + sprintf(dirSpec, "hd(%d,%d)/com.apple.recovery.boot/", BIOS_DEV_UNIT(bvr), bvr->part_no); + + _DISK_DEBUG_DUMP("Checking for boot.efi on Recovery HD\n"); + } +#else _DISK_DEBUG_DUMP("In hasBootEFI(%d,%d)\n", BIOS_DEV_UNIT(bvr), bvr->part_no); +#endif if (GetFileInfo(dirSpec, "boot.efi", &flags, &time) == 0) { From aff4f7bbefc41935dc467536b0e55328d40e51e2 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 4 Jan 2014 18:15:30 +0100 Subject: [PATCH 444/623] Add back RECOVERY_HD_SUPPORT --- i386/boot2/boot.c | 45 ++++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 179a387..c771e6b 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -190,27 +190,36 @@ void boot(int biosdev) long flags, cachetime; #endif - initPlatform(biosdev); // Passing on the boot drive. +#if RECOVERY_HD_SUPPORT + /* extern void setVideoMode(int mode); + setVideoMode(0); // Switch to VGA_TEXT_MODE + printf("RecoveryHD boot support enabled\n"); -#if DEBUG_STATE_ENABLED - // Don't switch graphics mode / show boot logo when DEBUG is set to 1. - printf("\ngArchCPUType (CPU): %s\n", (gArchCPUType == CPU_TYPE_X86_64) ? "x86_64" : "i386"); - sleep(3); // Silent sleep. -#else - showBootLogo(); -#endif + bool bootRecoveryHD = false; -#if LION_RECOVERY_SUPPORT - // A bit ugly maybe, but this will be changed sometime soon. while (readKeyboardStatus()) { int key = (bgetc() & 0xff); - + printf("key: %d\n", key); if ((key |= 0x20) == 'r') { - gPlatform.BootRecoveryHD = true; + bootRecoveryHD = true; + printf("RecoveryHD boot support is active\n"); } } + + printf("bootRecoveryHD: %s\n", bootRecoveryHD ? "True" : "False"); */ + initPlatform(biosdev, true); +#else + initPlatform(biosdev, false); +#endif + +#if DEBUG_STATE_ENABLED + // Don't switch graphics mode / show boot logo when DEBUG is set to 1. + printf("\ngArchCPUType (CPU): %s\n", (gArchCPUType == CPU_TYPE_X86_64) ? "x86_64" : "i386"); + sleep(3); // Silent sleep. +#else + showBootLogo(); #endif #if (LOAD_MODEL_SPECIFIC_EFI_DATA == 0) @@ -413,8 +422,19 @@ void boot(int biosdev) if (haveCABootPlist) // Check boolean before doing more time consuming tasks. { #if PRE_LINKED_KERNEL_SUPPORT + _BOOT_DEBUG_DUMP("Checking Kernel Cache key in com.apple.Boot.plist\n"); + if (getValueForKey(kKernelCacheKey, &val, &length, &bootInfo->bootConfig)) { +#if RECOVERY_HD_SUPPORT + _BOOT_DEBUG_DUMP("Kernel Cache key located in com.apple.Boot.plist\n"); + _BOOT_DEBUG_DUMP("length: %d, val: %s\n", length, val); + // XXX: Required for booting from the Recovery HD. + if (strncmp(val, "\\com.apple.recovery.boot\\kernelcache", length) == 0) + { + val = "/com.apple.recovery.boot/kernelcache"; + } +#endif if (length && GetFileInfo(NULL, val, &flags, &cachetime) == 0) { _BOOT_DEBUG_DUMP("Kernel Cache set to: %s\n", val); @@ -450,7 +470,6 @@ void boot(int biosdev) strcpy(bootFile, bootInfo->bootFile); #if PRE_LINKED_KERNEL_SUPPORT - _BOOT_DEBUG_DUMP("gBootMode = %d\n", gBootMode); // Preliminary checks to prevent us from doing useless things. From 05b58d2054f5d1effaf9028e2b83bd62f107afde Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 4 Jan 2014 18:50:13 +0100 Subject: [PATCH 445/623] Renaming LION_RECOVERY_SUPPORT to RECOVERY_HD_SUPPORT Cleanups and copy/paste error in my name fixed. --- i386/config/settings-template.h | 80 ++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 35 deletions(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index f59030a..3429afa 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -9,32 +9,32 @@ * - Static CPU data simplified by DHP in Juni 2011 (thanks to MC and flAked for the idea). * - Automatic creation / injection of SSDT_PR.aml added by DHP in June 2011. * - New compiler directive (BOOT_TURBO_BOOST_RATIO) added by Jeroen (June 2011). - * - SMBIOS data logic moved to preprocessor code (PikerAlpha, October 2012). - * - STATIC_MODEL_NAME moved to libsaio/i386/SMBIOS/model_data.h (PikerAlpha, October 2012). - * - STATIC_MAC_PRODUCT_NAME moved to libsaio/i386/SMBIOS/model_data.h (PikerAlpha, October 2012). - * - STATIC_SMBIOS_MODEL_ID renamed to TARGET_MODEL (PikerAlpha, October 2012). - * - OVERRIDE_DYNAMIC_PRODUCT_DETECTION removed/no longer supported (PikerAlpha, October 2012). - * - INTEL_CORE_TECHNOLOGY per default set to 1 (PikerAlpha, October 2012). - * - INJECT_EFI_DEVICE_PROPERTIES per default set to 1 (PikerAlpha, October 2012). + * - SMBIOS data logic moved to preprocessor code (Pike R. Alpha, October 2012). + * - STATIC_MODEL_NAME moved to libsaio/i386/SMBIOS/model_data.h (Pike R. Alpha, October 2012). + * - STATIC_MAC_PRODUCT_NAME moved to libsaio/i386/SMBIOS/model_data.h (Pike R. Alpha, October 2012). + * - STATIC_SMBIOS_MODEL_ID renamed to TARGET_MODEL (Pike R. Alpha, October 2012). + * - OVERRIDE_DYNAMIC_PRODUCT_DETECTION removed/no longer supported (Pike R. Alpha, October 2012). + * - INTEL_CORE_TECHNOLOGY per default set to 1 (Pike R. Alpha, October 2012). + * - INJECT_EFI_DEVICE_PROPERTIES per default set to 1 (Pike R. Alpha, October 2012). * - SMBIOS base board serial# (SMB_BOARD_SERIAL_NUMBER) feature added (dgsga, October 2012). - * - LOAD_STATIC_EFI_DATA_FROM_EXTRA feature added (PikerAlpha, October 2012). - * - LOAD_STATIC_SMBIOS_DATA_FROM_EXTRA feature added (PikerAlpha, October 2012). - * - STATIC_SYSTEM_SERIAL_NUMBER renamed to EFI_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). - * - Restored lost STATIC_SMSERIALNUMBER (PikerAlpha, October 2012). - * - STATIC_SMSERIALNUMBER renamed to SMB_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). - * - LOAD_STATIC_ACPI_DATA_FROM_EXTRA added (PikerAlpha, October 2012). - * - LOAD_STATIC_EFI_DATA_FROM_EXTRA renamed to LOAD_MODEL_SPECIFIC_EFI_DATA (PikerAlpha, October 2012). - * - LOAD_STATIC_SMBIOS_DATA_FROM_EXTRA renamed to LOAD_MODEL_SPECIFIC_SMBIOS_DATA (PikerAlpha, October 2012). - * - LOAD_MODEL_SPECIFIC_STATIC_DATA added (PikerAlpha, October 2012). - * - Option SET_MAX_STRUCTURE_LENGTH added (PikerAlpha, November 2012). - * - Option DISK_TARGET_SUPPORT added (PikerAlpha, November 2012). - * - DISK_TARGET_SUPPORT renamed to STARTUP_DISK_SUPPORT (PikerAlpha, November 2012). - * - New compiler directive USE_DEVICE_PATH in boot section (PikerAlpha, November 2012). - * - Always inject SMB_BOARD_SERIAL_NUMBER, required for iMessage (PikerAlpha, January 2013). - * - New compiler directives in EFI section added (PikerAlpha, January 2013). - * - STATIC_SYSTEM_ID renamed to SMB_STATIC_SYSTEM_UUID and moved to SMBIOS section (PikerAlpha, January 2013). - * - Renamed LION_INSTALL_SUPPORT to INSTALL_ESD_SUPPORT (PikerAlpha, April 2013). - * + * - LOAD_STATIC_EFI_DATA_FROM_EXTRA feature added (Pike R. Alpha, October 2012). + * - LOAD_STATIC_SMBIOS_DATA_FROM_EXTRA feature added (Pike R. Alpha, October 2012). + * - STATIC_SYSTEM_SERIAL_NUMBER renamed to EFI_SYSTEM_SERIAL_NUMBER (Pike R. Alpha, October 2012). + * - Restored lost STATIC_SMSERIALNUMBER (Pike R. Alpha, October 2012). + * - STATIC_SMSERIALNUMBER renamed to SMB_SYSTEM_SERIAL_NUMBER (Pike R. Alpha, October 2012). + * - LOAD_STATIC_ACPI_DATA_FROM_EXTRA added (Pike R. Alpha, October 2012). + * - LOAD_STATIC_EFI_DATA_FROM_EXTRA renamed to LOAD_MODEL_SPECIFIC_EFI_DATA (Pike R. Alpha, October 2012). + * - LOAD_STATIC_SMBIOS_DATA_FROM_EXTRA renamed to LOAD_MODEL_SPECIFIC_SMBIOS_DATA (Pike R. Alpha, October 2012). + * - LOAD_MODEL_SPECIFIC_STATIC_DATA added (Pike R. Alpha, October 2012). + * - Option SET_MAX_STRUCTURE_LENGTH added (Pike R. Alpha, November 2012). + * - Option DISK_TARGET_SUPPORT added (Pike R. Alpha, November 2012). + * - DISK_TARGET_SUPPORT renamed to STARTUP_DISK_SUPPORT (Pike R. Alpha, November 2012). + * - New compiler directive USE_DEVICE_PATH in boot section (Pike R. Alpha, November 2012). + * - Always inject SMB_BOARD_SERIAL_NUMBER, required for iMessage (Pike R. Alpha, January 2013). + * - New compiler directives in EFI section added (Pike R. Alpha, January 2013). + * - STATIC_SYSTEM_ID renamed to SMB_STATIC_SYSTEM_UUID and moved to SMBIOS section (Pike R. Alpha, January 2013). + * - Renamed LION_INSTALL_SUPPORT to INSTALL_ESD_SUPPORT (Pike R. Alpha, April 2013). + * - Renamed LION_RECOVERY_SUPPORT to RECOVERY_HD_SUPPORT (Pike R. Alpha, October 2013). */ @@ -145,7 +145,7 @@ // falls back to: /Extra/ACPI/[XXXX].aml when model specific data is not available. #endif -#define AUTOMATIC_SSDT_PR_CREATION 1 // Set to 1 by default (support for Sandy Bridge only). +#define AUTOMATIC_SSDT_PR_CREATION 0 // Set to 0 by default (support for Sandy Bridge only). // // This injects a custom SSDT (in configure mode) with: // @@ -161,7 +161,7 @@ // and use it as STATIC_SSDT_PR_TABLE_DATA in RevoBoot/i386/config/ACPI/data.h -#if AUTOMATIC_SSDT_PR_CREATION && STATIC_SSDT_PR_TABLE_INJECTION == 0 +#if (AUTOMATIC_SSDT_PR_CREATION == 1 && STATIC_SSDT_PR_TABLE_INJECTION == 0) #define MAX_NUMBER_OF_P_STATES 22 // The i5-2500K need 18 for the base-range (1600-3300) plus 4 for the Turbo modes. // The i7-2600K need 19 for the base-range (1600-3400) plus 4 for the Turbo modes. // The i7-2700K need 20 for the base-range (1600-3500) plus 4 for the Turbo modes. @@ -170,11 +170,11 @@ // // Note: AICPUPM wants a P-State for each 100 MHz bank or it will fail (see note below). - #define DROP_FACTORY_SSDT_TABLES 1 // Set to 1 by default (this setting is required). + #define DROP_FACTORY_SSDT_TABLES 1 // Set to 1 by default (this setting may be required on some boards). // // Note: Do not change this setting (must drop SSDT tables). - #define NUMBER_OF_TURBO_STATES 4 // Set to 4 by default. + #define NUMBER_OF_TURBO_STATES 4 // Set to 4 by default. Use any number to override the number of Turbo States. // // Note: Make sure to add a full range, one P-State for each 100 MHz when OC'ing // or AICPIPM will fail with: "P-State Stepper Error 18 at step N on CPU N" @@ -189,10 +189,10 @@ #else #define OVERRIDE_ACPI_METHODS 0 // Set to 0 by default (do nothing). - #define DROP_FACTORY_SSDT_TABLES 0 // Set to 0 by default. Use 1 with caution (might disable SpeedStep). + #define DROP_FACTORY_SSDT_TABLES 0 // Set to 0 by default. Use 1 with caution (might disable CPU Power Management). #endif -#define REPLACE_EXISTING_SSDT_TABLES 0 // Set to 0 by default. Use 1 with caution (might disable SpeedStep). +#define REPLACE_EXISTING_SSDT_TABLES 0 // Set to 0 by default. Use 1 with caution (might disable CPU Power Management). // // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. @@ -208,14 +208,17 @@ //--------------------------------------------------------------- BOOT.C ------------------------------------------------------------------- -#define PRE_LINKED_KERNEL_SUPPORT 0 // Set to 1 by default. Change this to 0 to disable the use of pre-linked kernels. +#define PRE_LINKED_KERNEL_SUPPORT 1 // Set to 1 by default. Change this to 0 to disable the use of pre-linked kernels. #define MUST_ENABLE_A20 0 // Set to 0 by default. Change this to 1 when your hardware requires it. #define SAFE_MALLOC 0 // Set to 0 by default. Change this to 1 when booting halts with a memory allocation error. -#define LION_RECOVERY_SUPPORT 0 // Set to 0 by default. Change this to 1 to make RevoBoot search for the 'Recovery HD' +#define RECOVERY_HD_SUPPORT 0 // Set to 0 by default. Change this to 1 to make RevoBoot search for the 'Recovery HD' // partition and, when available, boot from it. +#if (RECOVERY_HD_SUPPORT == 1 && PRE_LINKED_KERNEL_SUPPORT == 0) + #define PRE_LINKED_KERNEL_SUPPORT 1 +#endif #define STARTUP_DISK_SUPPORT 0 // Set to 0 by default. Change this to 1 for System Preference/Startup Disk support. @@ -248,6 +251,7 @@ // Example: 0x2800 for 4.0 GHz on a i7-2600. #define DEBUG_CPU 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. + // // Note: CPU info data will not be displayed when USE_STATIC_CPU_DATA is set to 1 #if DEBUG_CPU @@ -285,7 +289,7 @@ #define LEGACY_BIOS_READ_SUPPORT 0 // Set to 0 by default. Change this to 1 for crappy old BIOSes. -#if LION_RECOVERY_SUPPORT +#if RECOVERY_HD_SUPPORT #define CORE_STORAGE_SUPPORT 1 // Set to 1 by default since booting from a 'Recovery HD' partition may requires us to skip // (encrypted) CoreStorage partitions. #else @@ -328,6 +332,9 @@ #define EFI_SYSTEM_SERIAL_NUMBER { 'S', 'O', 'M', 'E', 'S', 'R', 'L', 'N', 'U', 'M', 'B', 'R' } + // Note: You can check your serial number by visiting the following link: + // https://selfsolve.apple.com/agreementWarrantyDynamic.do + #define STATIC_NVRAM_ROM { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xNN, 0xNN, 0xNN, 0xNN, 0xNN, 0xNN } // Example only! // sudo nvram 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:ROM=%01%02%03%04%05%06%07%08%09%0A%0B%NN%NN%NN%NN%NN%NN // Note: Use your MAC address for the last six bytes! @@ -358,7 +365,10 @@ #define INSTALL_ESD_SUPPORT 0 // Set to 0 by default. Setting this to 1 will make RevoBoot search in specific directories // for com.apple.Boot.plist – required for Mac like Lion OS X installations. - + +#if (RECOVERY_HD_SUPPORT == 1 && INSTALL_ESD_SUPPORT == 0) + #define INSTALL_ESD_SUPPORT 1 // This setting is mandatory for RECOVERY_HD_SUPPORT +#endif //-------------------------------------------------------------- SMBIOS.C ------------------------------------------------------------------ From a820784a6bb89c9960065a4430c87188061a0ecb Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 4 Jan 2014 20:11:46 +0100 Subject: [PATCH 446/623] Create MODEL file after the first run --- r | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/r b/r index 530f117..9f02db6 100755 --- a/r +++ b/r @@ -20,9 +20,14 @@ if [[ "$1" =~ [iMac|Mac] ]]; make MODEL=`cat MODEL` > out.log else # - # No default model found. Use the default (matches settings-template.h) - # + # No default model found. Create MODEL file for future use. + # + echo "Macmini" > MODEL + # + # Use Macmini as our default (matches settings-template.h) + # make MODEL=Macmini > out.log + fi; fi From 3ae5f30aad3af60eab3aa01501ee501a8f4911a8 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 5 Jan 2014 01:06:11 +0100 Subject: [PATCH 447/623] Typo --- i386/libsaio/platform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 454bf66..e2bd3a2 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -61,7 +61,7 @@ #define IMAC_131 (IMAC | (4 << 15)) #define IMAC_132 (IMAC | (5 << 15)) #define IMAC_141 (IMAC | (6 << 15)) -#define IMAC_141 (IMAC | (7 << 15)) +#define IMAC_142 (IMAC | (7 << 15)) #define IMAC_143 IMAC // Defaults to iMac14,3 #define MACBOOK_41 MACBOOK // Defaults to MacBook4,1 From 11394e4c5b01cbe7930c042d974f5548890d5db6 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 5 Jan 2014 14:13:01 +0100 Subject: [PATCH 448/623] Adding switches to enable/disable features in Info.plist logMSRs = enabled by default logIGPU = disabled by default logCStates = enabled by default --- .../AppleIntelCPUPowerManagementInfo.cpp | 61 +++++++++++++++---- .../AppleIntelCPUPowerManagementInfo.h | 15 +++-- ...nfo-AppleIntelCPUPowerManagementInfo.plist | 6 ++ .../InfoPlist.strings | 2 +- 4 files changed, 67 insertions(+), 17 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index c7b8e78..dc1cfe8 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -163,7 +163,7 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) loopLock = true; #if REPORT_C_STATES - if (dumpCStates) + if (logCStates) { UInt32 magic = 0; mp_rendezvous_no_intrs(getCStates, &magic); @@ -312,6 +312,33 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) if (simpleLock) { +#if REPORT_MSRS + OSBoolean * key_logMSRs = OSDynamicCast(OSBoolean, getProperty("logMSRs")); + + if (key_logMSRs) + { + logMSRs = (bool)key_logMSRs->getValue(); + } +#endif + +#if REPORT_IGPU_P_STATES + OSBoolean * key_logIGPU = OSDynamicCast(OSBoolean, getProperty("logIGPU")); + + if (key_logIGPU) + { + igpuEnabled = (bool)key_logIGPU->getValue(); + } +#endif + +#if REPORT_C_STATES + OSBoolean * key_logCStates = OSDynamicCast(OSBoolean, getProperty("logCStates")); + + if (key_logCStates) + { + logCStates = (bool)key_logCStates->getValue(); + } +#endif + timerEventSource = IOTimerEventSource::timerEventSource(this, OSMemberFunctionCast(IOTimerEventSource::Action, this, &AppleIntelCPUPowerManagementInfo::loopTimerEvent)); workLoop = getWorkLoop(); @@ -321,13 +348,28 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) UInt64 msr = rdmsr64(MSR_IA32_PERF_STS); gCoreMultipliers |= (1ULL << (msr >> 8)); + +#if REPORT_IGPU_P_STATES + bool isIGPUEnabled = ((READ_PCI8_NB(DEVEN) & DEVEN_D2EN_MASK)); // IGPU Enabled and Visible? + if (!isIGPUEnabled && igpuEnabled) + { + igpuEnabled = false; + } +#endif uint32_t cpuid_reg[4]; do_cpuid(0x00000001, cpuid_reg); UInt8 cpuModel = bitfield32(cpuid_reg[eax], 7, 4) + (bitfield32(cpuid_reg[eax], 19, 16) << 4); #if REPORT_C_STATES + OSBoolean * key_logCStates = OSDynamicCast(OSBoolean, getProperty("logCStates")); + + if (key_logCStates) + { + logCStates = (bool)key_logCStates->getValue(); + } + switch (cpuModel) // TODO: Verify me! { case CPU_MODEL_SB_CORE: // 0x2A - Intel 325462.pdf Vol.3C 35-111 @@ -345,22 +387,17 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) } #endif -#if REPORT_IGPU_P_STATES - bool isIGPUEnabled = ((READ_PCI8_NB(DEVEN) & DEVEN_D2EN_MASK)); // IGPU Enabled and Visible? - - if (!isIGPUEnabled && igpuEnabled) - { - igpuEnabled = false; - } -#endif +#if REPORT_MSRS // MWAIT information do_cpuid(0x00000005, cpuid_reg); uint32_t supportedMwaitCStates = bitfield32(cpuid_reg[edx], 31, 0); IOLog("AICPUPMI: MWAIT C-States.....................: %d\n", supportedMwaitCStates); -#if REPORT_MSRS - reportMSRs(cpuModel); + if (logMSRs) + { + reportMSRs(cpuModel); + } #endif msr = rdmsr64(MSR_PLATFORM_INFO); gMinRatio = (UInt8)((msr >> 40) & 0xff); @@ -382,7 +419,7 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) } #if REPORT_IGPU_P_STATES - if (isIGPUEnabled) + if (igpuEnabled) { IOPhysicalAddress address = (IOPhysicalAddress)(0xFED10000 + 0x5948); memDescriptor = IOMemoryDescriptor::withPhysicalAddress(address, 0x53, kIODirectionInOut); diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index e4545ae..4c4356a 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -95,17 +95,24 @@ class AppleIntelCPUPowerManagementInfo : public IOService IOMemoryDescriptor *memDescriptor; IOMemoryMap *memoryMap; - bool igpuEnabled = true; + bool igpuEnabled = false; // Set <key>logIGPU</key> to <true/> in Info.plist to enable this feature. #endif IOReturn result = kIOReturnSuccess; virtual IOReturn loopTimerEvent(void); - + +#if REPORT_MSRS void reportMSRs(UInt8 aCPUModel); - + + bool logMSRs = true; // Set <key>logIGPU</key> to <false/> in Info.plist to disable this feature. +#endif + bool loopLock = false; - bool dumpCStates = true; // TODO: Use Info.plist + +#if REPORT_C_STATES + bool logCStates = true; // Set <key>logCStates</key> to <false/> in Info.plist to disable this feature. +#endif UInt16 Interval = 50; diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist index dfdd07c..ff48fad 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist @@ -36,6 +36,12 @@ <string>IOResources</string> <key>IOResourceMatch</key> <string>IOKit</string> + <key>logMSRs</key> + <true/> + <key>logIGPU</key> + <false/> + <key>logCStates</key> + <true/> </dict> </dict> <key>OSBundleLibraries</key> diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/InfoPlist.strings b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/InfoPlist.strings index 19f3055..8788023 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/InfoPlist.strings +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/InfoPlist.strings @@ -1,2 +1,2 @@ /* Localized versions of Info.plist keys */ -NSHumanReadableCopyright = "Copyright © 2012-2013 Pike R. Alpha. All rights reserved"; \ No newline at end of file +NSHumanReadableCopyright = "Copyright © 2012-2014 Pike R. Alpha. All rights reserved"; \ No newline at end of file From a1d7a856ac2e6aa3559ad32752c256b008fe453d Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 6 Jan 2014 01:18:27 +0100 Subject: [PATCH 449/623] Sed RegEx error fixed in _getCPUtype Thanks to 'Klonkrieger2' aka Mark for the tip! --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 2c2512c..075c604 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 7.5 - Copyright (c) 2013 by Pike <PikeRAlpha@yahoo.com> +# Version 7.6 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -82,6 +82,7 @@ # - LFM fixed in the Intel i7-3930K data (Pike, December 2013) # - Intel E5-2695 V2 added (Pike, December 2013) # - Intel i3-3250 added (Pike, December 2013) +# - Sed RegEx error fixed in _getCPUtype (Pike, January 2014) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -92,6 +93,7 @@ # - Thanks to 'BigDonkey' for his help with LFM (800 MHz) for Sandy Bridge mobility models. # - Thanks to 'xpamamadeus' for the Clover boot.log tip. # - Thanks to 'rileyfreeman' for the Intel i7-3930K LFM value. +# - Thanks to 'Klonkrieger2' aka Mark for the tip about the sed RegEx error in _getCPUtype. # # Usage (v1.0 - v4.9): # @@ -189,7 +191,7 @@ gScope="\_PR_" # Other global variables. # -gScriptVersion=7.5 +gScriptVersion=7.6 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -1243,7 +1245,7 @@ function _getCPUtype() # # Grab 'cpu-type' property from ioreg (stripped with sed / RegEX magic). # - local grepStr=$(ioreg -p IODeviceTree -n "${gProcessorNames[0]}"@0 -k cpu-type | grep cpu-type | sed -e 's/ *[-|="<a-z>]//g') + local grepStr=$(ioreg -p IODeviceTree -n "${gProcessorNames[0]}"@0 -k cpu-type | grep cpu-type | sed -e 's/["cputype" ,<>|=-]//g') # Swap bytes with help of ${str:pos:num} # From 1f3605fec0c8939831142acbac27c241609c5578 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 8 Jan 2014 00:29:39 +0100 Subject: [PATCH 450/623] Fixed a typo 's/i7-26740M/i7-2674M' Thanks to 'dhnguyen92' on Github issues for the tip --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 075c604..60df98e 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -83,6 +83,7 @@ # - Intel E5-2695 V2 added (Pike, December 2013) # - Intel i3-3250 added (Pike, December 2013) # - Sed RegEx error fixed in _getCPUtype (Pike, January 2014) +# - Fixed a typo 's/i7-26740M/i7-2674M' (Pike, January 2014) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -94,6 +95,7 @@ # - Thanks to 'xpamamadeus' for the Clover boot.log tip. # - Thanks to 'rileyfreeman' for the Intel i7-3930K LFM value. # - Thanks to 'Klonkrieger2' aka Mark for the tip about the sed RegEx error in _getCPUtype. +# - Thanks to 'dhnguyen92' on Github issues for the tip about a typo in the i7-2674M data. # # Usage (v1.0 - v4.9): # @@ -323,7 +325,7 @@ i7-2670QM,45,800,2200,3100,4,8 i7-2675M,17,800,1600,2700,2,4 i7-2655LE,25,800,2200,2900,2,4 i7-2649M,25,800,2300,3200,2,4 -i7-26740M,32,800,2800,3500,2,4 +i7-2674M,32,800,2800,3500,2,4 i7-2637M,17,800,1700,2800,2,4 i7-2635QM,45,800,2000,2900,4,8 i7-2630QM,45,800,2000,2900,4,8 From dacd2dcceda8f168b7ad044595d96dfa3dcfd1e7 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Thu, 9 Jan 2014 00:14:00 +0100 Subject: [PATCH 451/623] Typo in Haswell CPU list --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 60df98e..aa4bd2d 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 7.6 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> +# Version 7.7 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -83,7 +83,8 @@ # - Intel E5-2695 V2 added (Pike, December 2013) # - Intel i3-3250 added (Pike, December 2013) # - Sed RegEx error fixed in _getCPUtype (Pike, January 2014) -# - Fixed a typo 's/i7-26740M/i7-2674M' (Pike, January 2014) +# - Fixed a typo 's/i7-26740M/i7-2674M/' (Pike, January 2014) +# - Fixed a typo 's/gHaswellCPUList/gServerHaswellCPUList/' (Pike, January 2014) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -193,7 +194,7 @@ gScope="\_PR_" # Other global variables. # -gScriptVersion=7.6 +gScriptVersion=7.7 gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' @@ -1472,7 +1473,7 @@ function _getCPUDataByProcessorNumber ;; 4) local cpuSpecLists=("gDesktopIvyBridgeCPUList[@]" "gMobileIvyBridgeCPUList[@]" "gServerIvyBridgeCPUList[@]") ;; - 8) local cpuSpecLists=("gDesktopHaswellCPUList[@]" "gMobileHaswellCPUList[@]" "gHaswellCPUList[@]") + 8) local cpuSpecLists=("gDesktopHaswellCPUList[@]" "gMobileHaswellCPUList[@]" "gServerHaswellCPUList[@]") ;; esac From c24fa04f7213a69f7657e9449a64625990a958ea Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 11 Jan 2014 13:39:24 +0100 Subject: [PATCH 452/623] Updating script to v7.8 Intel E5-26nn v2 Xeon Processors added --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 35 ++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index aa4bd2d..2939ecc 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 7.7 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> +# Version 7.8 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivybridge (Pike, January 2013) @@ -85,6 +85,7 @@ # - Sed RegEx error fixed in _getCPUtype (Pike, January 2014) # - Fixed a typo 's/i7-26740M/i7-2674M/' (Pike, January 2014) # - Fixed a typo 's/gHaswellCPUList/gServerHaswellCPUList/' (Pike, January 2014) +# - Intel E5-26nn v2 Xeon Processors added (Pike, January 2014) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -135,6 +136,11 @@ #================================= GLOBAL VARS ================================== +# +# Script version info. +# +gScriptVersion=7.8 + # # Change this to 0 when your CPU isn't stuck in Low Frequency Mode! # @@ -194,8 +200,6 @@ gScope="\_PR_" # Other global variables. # -gScriptVersion=7.7 - gRevision='0x0000'${gScriptVersion:0:1}${gScriptVersion:2:1}'00' # @@ -383,7 +387,29 @@ gServerIvyBridgeCPUList=( 'E3-1225 V2',77,0,3200,3600,4,4 'E3-1220 V2',69,0,3100,3500,4,4 'E3-1220L V2',17,0,2300,3500,2,4 -'E5-2695 V2',115,1200,2400,3200,12,24 +# E5-2600 Xeon Processor Series +'E5-2687W v2',150,1200,3400,4000,8,16 +'E5-2658 v2 ',95,1200,2400,3000,10,20 +'E5-2648L v2',70,1200,1900,2500,10,20 +'E5-2628L v2',70,1200,1900,2400,8,16 +'E5-2603 v2',80,1200,1800,1800,4,4 +'E5-2637 v2',130,1200,3500,3800,4,8 +'E5-2630L v2',60,1200,2400,2800,6,12 +'E5-2630 v2',80,1200,2600,3100,6,12 +'E5-2620 v2',80,1200,2100,2600,6,12 +'E5-2618L v2',50,1200,2000,2000,6,12 +'E5-2609 v2',80,1200,2500,2500,4,4 +'E5-2697 v2',130,1200,2700,3500,12,24 +'E5-2695 v2',115,1200,2400,3200,12,24 +'E5-2690 v2',130,1200,3000,3600,10,20 +'E5-2680 v2',115,1200,2800,3600,10,20 +'E5-2670 v2',115,1200,2500,3300,10,20 +'E5-2667 v2',130,1200,3300,4000,6,16 +'E5-2660 v2',95,1200,2200,3000,10,20 +'E5-2650L v2',70,1200,1700,2100,10,20 +'E5-2650 v2',95,1200,2600,3400,8,16 +'E5-2643 v2',130,1200,3500,3800,6,12 +'E5-2640 v2',95,1200,2000,2500,8,16 ) gDesktopIvyBridgeCPUList=( @@ -497,6 +523,7 @@ gServerHaswellCPUList=( 'E3-1230 V3',80,800,3300,3700,4,8 'E3-1225 V3',80,800,3200,3600,4,4 'E3-1220 V3',80,800,3100,3500,4,4 +'E3-1220L V3',13,800,1100,1500,2,4 ) gDesktopHaswellCPUList=( From 37b1832184bfe06af5e6646c568d745fa4bc9b60 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 11 Jan 2014 18:24:21 +0100 Subject: [PATCH 453/623] Updating script to v7.9 Xeon detection code changes --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 110 +++++++++++++++------------ 1 file changed, 61 insertions(+), 49 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 2939ecc..240cb4d 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,10 +3,10 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 7.8 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> +# Version 7.9 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> # # Updates: -# - Added support for Ivybridge (Pike, January 2013) +# - Added support for Ivy Bridge (Pike, January 2013) # - Filename error fixed (Pike, January 2013) # - Namespace error fixed in _printScopeStart (Pike, January 2013) # - Model and board-id checks added (Pike, January 2013) @@ -114,10 +114,10 @@ # # - ./ssdtPRGen.sh E5-1650 # -# - ./ssdtPRGen.sh 'E3-1220 V2' -# - ./ssdtPRGen.sh 'E3-1220 V2' 3600 -# - ./ssdtPRGen.sh 'E3-1220 V2' 3600 70 -# - ./ssdtPRGen.sh 'E3-1220 V2' 3600 70 1 +# - ./ssdtPRGen.sh 'E3-1220 v2' +# - ./ssdtPRGen.sh 'E3-1220 v2' 3600 +# - ./ssdtPRGen.sh 'E3-1220 v2' 3600 70 +# - ./ssdtPRGen.sh 'E3-1220 v2' 3600 70 1 # # Usage (v5.5 and greater): # @@ -125,11 +125,11 @@ # # - ./ssdtPRGen.sh E5-1650 # -# - ./ssdtPRGen.sh 'E3-1220 V2' -# - ./ssdtPRGen.sh 'E3-1220 V2' 3600 -# - ./ssdtPRGen.sh 'E3-1220 V2' 3600 70 -# - ./ssdtPRGen.sh 'E3-1220 V2' 3600 70 1 -# - ./ssdtPRGen.sh 'E3-1220 V2' 3600 70 1 CPU +# - ./ssdtPRGen.sh 'E3-1220 v2' +# - ./ssdtPRGen.sh 'E3-1220 v2' 3600 +# - ./ssdtPRGen.sh 'E3-1220 v2' 3600 70 +# - ./ssdtPRGen.sh 'E3-1220 v2' 3600 70 1 +# - ./ssdtPRGen.sh 'E3-1220 v2' 3600 70 1 CPU # # set -x # Used for tracing errors (can be used anywhere in the script). @@ -139,7 +139,7 @@ # # Script version info. # -gScriptVersion=7.8 +gScriptVersion=7.9 # # Change this to 0 when your CPU isn't stuck in Low Frequency Mode! @@ -374,19 +374,19 @@ i3-2310E,35,800,2100,0,2,4 gServerIvyBridgeCPUList=( # E3-1200 Xeon Processor Series -'E3-1290 V2',87,0,3700,4100,4,8 -'E3-1285 V2',65,0,3600,4000, -'E3-1285L V2',0,0,3200,3900, -'E3-1280 V2',69,0,3600,4000,4,8 -'E3-1275 V2',77,0,3500,3900,4,8 -'E3-1270 V2',69,0,3500,3900,4,8 -'E3-1265L V2',45,0,2500,3500,4,8 -'E3-1245 V2',77,0,3400,3800,4,8 -'E3-1240 V2',69,0,3400,3800,4,8 -'E3-1230 V2',69,0,3300,3700,4,8 -'E3-1225 V2',77,0,3200,3600,4,4 -'E3-1220 V2',69,0,3100,3500,4,4 -'E3-1220L V2',17,0,2300,3500,2,4 +'E3-1290 v2',87,0,3700,4100,4,8 +'E3-1285 v2',65,0,3600,4000, +'E3-1285L v2',0,0,3200,3900, +'E3-1280 v2',69,0,3600,4000,4,8 +'E3-1275 v2',77,0,3500,3900,4,8 +'E3-1270 v2',69,0,3500,3900,4,8 +'E3-1265L v2',45,0,2500,3500,4,8 +'E3-1245 v2',77,0,3400,3800,4,8 +'E3-1240 v2',69,0,3400,3800,4,8 +'E3-1230 v2',69,0,3300,3700,4,8 +'E3-1225 v2',77,0,3200,3600,4,4 +'E3-1220 v2',69,0,3100,3500,4,4 +'E3-1220L v2',17,0,2300,3500,2,4 # E5-2600 Xeon Processor Series 'E5-2687W v2',150,1200,3400,4000,8,16 'E5-2658 v2 ',95,1200,2400,3000,10,20 @@ -509,21 +509,21 @@ i3-3110M,35,0,2400,0,2,4 # New Haswell processors (with HD-4600 graphics) # gServerHaswellCPUList=( -# E3-1200 V3 Xeon Processor Series -'E3-1285L V3',65,800,3100,3900,4,8 -'E3-1285 V3',84,800,3600,4000,4,8 -'E3-1280 V3',82,800,3600,4000,4,8 -'E3-1275 V3',84,800,3500,3900,4,8 -'E3-1270 V3',80,800,3500,3900,4,8 -'E3-1268L V3',45,800,2300,3300,4,8 -'E3-1265L V3',45,800,2500,3700,4,8 -'E3-1245 V3',84,800,3400,3800,4,8 -'E3-1240 V3',80,800,3400,3800,4,8 -'E3-1230L V3',25,800,1800,2800,4,8 -'E3-1230 V3',80,800,3300,3700,4,8 -'E3-1225 V3',80,800,3200,3600,4,4 -'E3-1220 V3',80,800,3100,3500,4,4 -'E3-1220L V3',13,800,1100,1500,2,4 +# E3-1200 v3 Xeon Processor Series +'E3-1285L v3',65,800,3100,3900,4,8 +'E3-1285 v3',84,800,3600,4000,4,8 +'E3-1280 v3',82,800,3600,4000,4,8 +'E3-1275 v3',84,800,3500,3900,4,8 +'E3-1270 v3',80,800,3500,3900,4,8 +'E3-1268L v3',45,800,2300,3300,4,8 +'E3-1265L v3',45,800,2500,3700,4,8 +'E3-1245 v3',84,800,3400,3800,4,8 +'E3-1240 v3',80,800,3400,3800,4,8 +'E3-1230L v3',25,800,1800,2800,4,8 +'E3-1230 v3',80,800,3300,3700,4,8 +'E3-1225 v3',80,800,3200,3600,4,4 +'E3-1220 v3',80,800,3100,3500,4,4 +'E3-1220L v3',13,800,1100,1500,2,4 ) gDesktopHaswellCPUList=( @@ -1440,8 +1440,11 @@ function _getCPUNumberFromBrandString # Split brandstring into array (data) # local data=($brandString) -# local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "V2" "@" "2.5GHz") -# local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "@" "2.5GHz") + # local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "@" "2.5GHz") + # local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "v2" "@" "2.5GHz") + # local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "v3" "@" "2.5GHz") + # local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "0" "@" "2.5GHz") + # # Example from a MacBookPro10,2 # @@ -1469,15 +1472,24 @@ function _getCPUNumberFromBrandString let length=${#data[@]} - if ((length > 6)); then + if ((length > 7)); then echo 'Warning: Unexpected brandstring > "'${data[@]}'"' fi - if [[ ${data[1]} == "Xeon(R)" && ${data[4]} == "V2" ]]; - then - gProcessorNumber="${data[3]} ${data[4]}" - else - gProcessorNumber="${data[2]}" + # + # Is this a Xeon processor model? + # + if [[ "${data[1]}" == "Xeon(R)" ]]; + then + # + # Yes. Check for lower/upper case 'v' or '0' for OEM processors. + # + if [[ "${data[4]}" =~ "v" || "${data[4]}" =~ "V" || "${data[4]}" == "0" ]]; + then + gProcessorNumber="${data[3]} ${data[4]}" + else + gProcessorNumber="${data[2]}" + fi fi # echo $gProcessorNumber @@ -2073,7 +2085,7 @@ function main() let frequency=($frequency / 1000000) if [[ $assumedTDP -eq 1 ]]; then - echo 'With a maximum TDP of '$gTdp' Watt - assumed, may require override value!' + echo "With a maximum TDP of ${gTdp} Watt - assumed/undetected CPU may require override value!" fi fi From 6e0855696a620864bdc60ed10653aeac38849e08 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 12 Jan 2014 08:41:12 +0100 Subject: [PATCH 454/623] Updating script to 8.0 Brandstring detection changes. --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 36 ++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 240cb4d..075d0c7 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 7.9 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> +# Version 8.0 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivy Bridge (Pike, January 2013) @@ -86,6 +86,7 @@ # - Fixed a typo 's/i7-26740M/i7-2674M/' (Pike, January 2014) # - Fixed a typo 's/gHaswellCPUList/gServerHaswellCPUList/' (Pike, January 2014) # - Intel E5-26nn v2 Xeon Processors added (Pike, January 2014) +# - Show the CPU brandstring at all times (Pike, January 2014) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -139,7 +140,7 @@ # # Script version info. # -gScriptVersion=7.9 +gScriptVersion=8.0 # # Change this to 0 when your CPU isn't stuck in Low Frequency Mode! @@ -1429,6 +1430,10 @@ function _getCPUNumberFromBrandString # local brandString=$(echo `sysctl machdep.cpu.brand_string` | sed -e 's/machdep.cpu.brand_string: //') # + # Show brandstring (this helps me to debug stuff). + # + echo "Brandstring '${brandString}'" + # # Save default (0) delimiter # local ifs=$IFS @@ -1440,6 +1445,9 @@ function _getCPUNumberFromBrandString # Split brandstring into array (data) # local data=($brandString) + # + # Teststrings + # # local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "@" "2.5GHz") # local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "v2" "@" "2.5GHz") # local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "v3" "@" "2.5GHz") @@ -1473,7 +1481,7 @@ function _getCPUNumberFromBrandString let length=${#data[@]} if ((length > 7)); then - echo 'Warning: Unexpected brandstring > "'${data[@]}'"' + echo 'Warning: The brandstring has an unexpected length!' fi # @@ -1484,15 +1492,25 @@ function _getCPUNumberFromBrandString # # Yes. Check for lower/upper case 'v' or '0' for OEM processors. # - if [[ "${data[4]}" =~ "v" || "${data[4]}" =~ "V" || "${data[4]}" == "0" ]]; + if [[ "${data[4]}" =~ "v" || "${data[4]}" =~ "V" ]]; then - gProcessorNumber="${data[3]} ${data[4]}" + # + # Use a lowercase 'v' because that is what we use in our data. + # + gProcessorNumber="${data[3]} v${data[4]:1:1}" + elif [[ "${data[4]}" == "0" ]]; + # + # OEM CPU's have been reported to use a "0" instead of "v2" + # and thus let's use that to make our data match the CPU. + # + gProcessorNumber="${data[3]} v2" else + # + # All other non-Xeon processor models. + # gProcessorNumber="${data[2]}" fi fi - -# echo $gProcessorNumber } #-------------------------------------------------------------------------------- @@ -1943,6 +1961,10 @@ function main() _getCPUNumberFromBrandString + if ((gDebug)); then + echo $gProcessorNumber + fi + if [[ "$1" != "" ]]; then # Sandy Bridge checks if [[ ${1:0:4} == "i3-2" || ${1:0:4} == "i5-2" || ${1:0:4} == "i7-2" ]]; then From 0d17675d0407149707daa138f20e92beb7a41b41 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 12 Jan 2014 08:58:59 +0100 Subject: [PATCH 455/623] Updating script to 8.1 Error fixed in _getCPUNumberFromBrandString Fixed cpu-type suggestion for MacPro6,1 --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 38 ++++++++++++++++++---------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 075d0c7..8eab6a9 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 8.0 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> +# Version 8.1 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivy Bridge (Pike, January 2013) @@ -87,6 +87,7 @@ # - Fixed a typo 's/gHaswellCPUList/gServerHaswellCPUList/' (Pike, January 2014) # - Intel E5-26nn v2 Xeon Processors added (Pike, January 2014) # - Show the CPU brandstring at all times (Pike, January 2014) +# - Fixed cpu-type suggestion for MacPro6,1 (Pike, January 2014) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -140,7 +141,7 @@ # # Script version info. # -gScriptVersion=8.0 +gScriptVersion=8.1 # # Change this to 0 when your CPU isn't stuck in Low Frequency Mode! @@ -1432,7 +1433,7 @@ function _getCPUNumberFromBrandString # # Show brandstring (this helps me to debug stuff). # - echo "Brandstring '${brandString}'" + printf "Brandstring '${brandString}'" # # Save default (0) delimiter # @@ -1499,11 +1500,12 @@ function _getCPUNumberFromBrandString # gProcessorNumber="${data[3]} v${data[4]:1:1}" elif [[ "${data[4]}" == "0" ]]; - # - # OEM CPU's have been reported to use a "0" instead of "v2" - # and thus let's use that to make our data match the CPU. - # - gProcessorNumber="${data[3]} v2" + then + # + # OEM CPU's have been reported to use a "0" instead of "v2" + # and thus let's use that to make our data match the CPU. + # + gProcessorNumber="${data[3]} v2" else # # All other non-Xeon processor models. @@ -2252,6 +2254,16 @@ function main() _printScopeCPUn ;; esac + # + # Is this a MacPro6,1 model? + # + if [[ $modelID == 'MacPro6,1' ]]; + then + # + # Yes. Use the correct string/value for the cpu-type suggestion. + # + local cpuTypeString="0A" + fi _showLowPowerStates _checkPlatformSupport $modelID $boardID @@ -2259,12 +2271,12 @@ function main() # # Some Sandy Bridge/Ivy Bridge CPUPM specific configuration checks # - if [ $gBridgeType -ne $HASWELL ]; then - if [ ${cpu_type:0:2} -ne $cpuTypeString ]; then + if [ $gBridgeType -ne $HASWELL ]; + then + if [ ${cpu_type:0:2} -ne $cpuTypeString ]; + then echo -e "\nWarning: 'cpu-type' may be set improperly (0x$cpu_type instead of 0x$cpuTypeString${cpu_type:2:2})" - fi - - if [ $gSystemType -eq 0 ]; + elif [[ $gSystemType -eq 0 ]]; then echo -e "\nWarning: 'board-id' [$boardID] is not supported by $bridgeTypeString PM" else From 8732365750c2dcc371ef693eefe871ff69f5d93e Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 12 Jan 2014 13:46:24 +0100 Subject: [PATCH 456/623] Fixing a typo Thanks to 'fabiosun' on Github issues for the tip about a typo in the cpu-type check. --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 8eab6a9..3c2b3fd 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 8.1 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> +# Version 8.2 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivy Bridge (Pike, January 2013) @@ -100,6 +100,7 @@ # - Thanks to 'rileyfreeman' for the Intel i7-3930K LFM value. # - Thanks to 'Klonkrieger2' aka Mark for the tip about the sed RegEx error in _getCPUtype. # - Thanks to 'dhnguyen92' on Github issues for the tip about a typo in the i7-2674M data. +# - Thanks to 'fabiosun' on Github issues for the tip about a typo in the cpu-type check. # # Usage (v1.0 - v4.9): # @@ -141,7 +142,7 @@ # # Script version info. # -gScriptVersion=8.1 +gScriptVersion=8.2 # # Change this to 0 when your CPU isn't stuck in Low Frequency Mode! @@ -2262,7 +2263,7 @@ function main() # # Yes. Use the correct string/value for the cpu-type suggestion. # - local cpuTypeString="0A" + local cpuTypeString="0a" fi _showLowPowerStates @@ -2273,7 +2274,7 @@ function main() # if [ $gBridgeType -ne $HASWELL ]; then - if [ ${cpu_type:0:2} -ne $cpuTypeString ]; + if [ ${cpu_type:0:2} != $cpuTypeString ]; then echo -e "\nWarning: 'cpu-type' may be set improperly (0x$cpu_type instead of 0x$cpuTypeString${cpu_type:2:2})" elif [[ $gSystemType -eq 0 ]]; From 96e42f87434dbcd6cb0008e7c95cd0097ce04db7 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 13 Jan 2014 00:28:52 +0100 Subject: [PATCH 457/623] CPU detection fixed --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 3c2b3fd..aa5a259 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 8.2 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> +# Version 8.3 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivy Bridge (Pike, January 2013) @@ -142,7 +142,7 @@ # # Script version info. # -gScriptVersion=8.2 +gScriptVersion=8.3 # # Change this to 0 when your CPU isn't stuck in Low Frequency Mode! @@ -1507,12 +1507,12 @@ function _getCPUNumberFromBrandString # and thus let's use that to make our data match the CPU. # gProcessorNumber="${data[3]} v2" - else - # - # All other non-Xeon processor models. - # - gProcessorNumber="${data[2]}" fi + else + # + # All other non-Xeon processor models. + # + gProcessorNumber="${data[2]}" fi } From 572caff8e61d88292e67d62e6eb5742e5cc1994b Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 13 Jan 2014 00:39:23 +0100 Subject: [PATCH 458/623] _debugPrint should call printf instead of echo --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index aa5a259..0bf21c7 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -875,7 +875,7 @@ function _printMethodDSM() function _debugPrint() { if (( gDebug & 2 )); then - echo "$1" + printf "$1" fi } @@ -954,41 +954,41 @@ function _printScopeACST() fi - _debugPrint "targetCStates: $targetCStates" + _debugPrint "targetCStates: $targetCStates\n" # # Checks to determine which C-State(s) we should inject. # if (($targetCStates & 1)); then - _debugPrint "Adding C1" + _debugPrint "Adding C1\n" let C1=1 let numberOfCStates+=1 let pkgLength+=1 fi if (($targetCStates & 2)); then - _debugPrint "Adding C2" + _debugPrint "Adding C2\n" let C2=1 let numberOfCStates+=1 let pkgLength+=1 fi if (($targetCStates & 4)); then - _debugPrint "Adding C3" + _debugPrint "Adding C3\n" let C3=1 let numberOfCStates+=1 let pkgLength+=1 fi if (($targetCStates & 8)); then - _debugPrint "Adding C6" + _debugPrint "Adding C6\n" let C6=1 let numberOfCStates+=1 let pkgLength+=1 fi if ((($targetCStates & 16) == 16)); then - _debugPrint "Adding C7" + _debugPrint "Adding C7\n" let C7=1 let numberOfCStates+=1 let pkgLength+=1 @@ -1434,7 +1434,7 @@ function _getCPUNumberFromBrandString # # Show brandstring (this helps me to debug stuff). # - printf "Brandstring '${brandString}'" + printf "Brandstring '${brandString}'\n" # # Save default (0) delimiter # @@ -1454,6 +1454,7 @@ function _getCPUNumberFromBrandString # local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "v2" "@" "2.5GHz") # local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "v3" "@" "2.5GHz") # local data=("Intel(R)" "Xeon(R)" "CPU" "E3-1220" "0" "@" "2.5GHz") + # local data=("Intel(R)" "Core(TM)" "i5-4670K" "CPU" "@" "3.40GHz") # # Example from a MacBookPro10,2 @@ -1963,10 +1964,7 @@ function main() let maxTurboFrequency=0 _getCPUNumberFromBrandString - - if ((gDebug)); then - echo $gProcessorNumber - fi + _debugPrint "\ngProcessorNumber: $gProcessorNumber\n" if [[ "$1" != "" ]]; then # Sandy Bridge checks From cde97153d0ce1ede1b8a161c22d4ea487570ce5c Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 15 Jan 2014 00:04:01 +0100 Subject: [PATCH 459/623] Updating script to v8.4 Intel i7-4771 added --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 0bf21c7..e36a7ad 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 8.3 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> +# Version 8.4 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivy Bridge (Pike, January 2013) @@ -88,6 +88,7 @@ # - Intel E5-26nn v2 Xeon Processors added (Pike, January 2014) # - Show the CPU brandstring at all times (Pike, January 2014) # - Fixed cpu-type suggestion for MacPro6,1 (Pike, January 2014) +# - Intel i7-4771 added (Pike, January 2014) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -142,7 +143,7 @@ # # Script version info. # -gScriptVersion=8.3 +gScriptVersion=8.4 # # Change this to 0 when your CPU isn't stuck in Low Frequency Mode! @@ -536,6 +537,7 @@ i7-4930K,130,800,3400,3900,6,12 i5-4820K,130,800,3700,3900,4,8 # Socket 1150 (Standard Power) i7-4770K,84,800,3500,3900,4,8 +i7-4771,84,800,3500,3900,4,8 i7-4770,84,800,3400,3900,4,8 i5-4670K,84,800,3400,3800,4,4 i5-4670,84,800,3400,3800,4,4 From a2f1a71fbb370c952459c4137b4f1b302c514f4e Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 18 Jan 2014 12:42:54 +0100 Subject: [PATCH 460/623] Updating script to v8.5 Missing Intel Haswell/Crystal Well processor models added --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index e36a7ad..49e2ac6 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 8.4 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> +# Version 8.5 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivy Bridge (Pike, January 2013) @@ -89,6 +89,7 @@ # - Show the CPU brandstring at all times (Pike, January 2014) # - Fixed cpu-type suggestion for MacPro6,1 (Pike, January 2014) # - Intel i7-4771 added (Pike, January 2014) +# - A couple Intel Haswell/Crystal Well processor models added (Pike, January 2014) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -143,7 +144,7 @@ # # Script version info. # -gScriptVersion=8.4 +gScriptVersion=8.5 # # Change this to 0 when your CPU isn't stuck in Low Frequency Mode! @@ -570,9 +571,13 @@ i3-4340,54,800,3600,3600,2,4 ) gMobileHaswellCPUList=( +# Socket FCBGA1364 +i7-4960HQ,47,800,2600,3800,4,8 i7-4950HQ,47,800,2400,3600,4,8 i7-4850HQ,47,800,2300,3500,4,8 i7-4750HQ,47,800,2000,3200,4,8 +i7-4702HQ,37,800,2200,3200,4,8 +i7-4700HQ,47,800,2400,3600,4,8 # Extreme Edition Series - socket FCPGA946 i7-4930MX,57,800,3000,3900,4,8 # Socket FCPGA946 @@ -581,11 +586,13 @@ i7-4800MQ,47,800,2700,3700,4,8 i7-4702MQ,37,800,2200,3200,4,8 i7-4700MQ,47,800,2400,3400,4,8 i5-4200M,37,800,2500,3100,2,4 -# Socket FCBGA1364 -i7-4700HQ,47,800,2400,3600,4,8 -i7-4702HQ,37,800,2200,3200,4,8 # Socket FCBGA1168 +i7-4650U,15,800,1700,3300,2,4 +i7-4650U,15,800,1700,3300,2,4 +i7-4600U,15,800,2100,3300,2,4 i7-4558U,28,800,2800,3300,2,4 +i7-4550U,15,800,1500,3000,2,4 +i7-4500U,15,800,1800,3000,2,4 i5-4350U,15,800,1400,2900,2,4 i5-4288U,28,800,2600,3100,2,4 i5-4258U,28,800,2400,2900,2,4 From 731e3bb3bf3d99f141bb689bf5e90d9b76fce980 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sat, 18 Jan 2014 12:51:06 +0100 Subject: [PATCH 461/623] Updating script to v8.6 Fixed a typo and the Intel i5-4440 is now also added --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 49e2ac6..86f7483 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 8.5 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> +# Version 8.6 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivy Bridge (Pike, January 2013) @@ -83,7 +83,7 @@ # - Intel E5-2695 V2 added (Pike, December 2013) # - Intel i3-3250 added (Pike, December 2013) # - Sed RegEx error fixed in _getCPUtype (Pike, January 2014) -# - Fixed a typo 's/i7-26740M/i7-2674M/' (Pike, January 2014) +# - Fixed a typo 's/i7-2640M/i7-2674M/' (Pike, January 2014) # - Fixed a typo 's/gHaswellCPUList/gServerHaswellCPUList/' (Pike, January 2014) # - Intel E5-26nn v2 Xeon Processors added (Pike, January 2014) # - Show the CPU brandstring at all times (Pike, January 2014) @@ -101,7 +101,7 @@ # - Thanks to 'xpamamadeus' for the Clover boot.log tip. # - Thanks to 'rileyfreeman' for the Intel i7-3930K LFM value. # - Thanks to 'Klonkrieger2' aka Mark for the tip about the sed RegEx error in _getCPUtype. -# - Thanks to 'dhnguyen92' on Github issues for the tip about a typo in the i7-2674M data. +# - Thanks to 'dhnguyen92' on Github issues for the tip about a typo in the i7-2640M model data. # - Thanks to 'fabiosun' on Github issues for the tip about a typo in the cpu-type check. # # Usage (v1.0 - v4.9): @@ -144,7 +144,7 @@ # # Script version info. # -gScriptVersion=8.5 +gScriptVersion=8.6 # # Change this to 0 when your CPU isn't stuck in Low Frequency Mode! @@ -335,7 +335,7 @@ i7-2670QM,45,800,2200,3100,4,8 i7-2675M,17,800,1600,2700,2,4 i7-2655LE,25,800,2200,2900,2,4 i7-2649M,25,800,2300,3200,2,4 -i7-2674M,32,800,2800,3500,2,4 +i7-2640M,35,800,2800,3500,2,4 i7-2637M,17,800,1700,2800,2,4 i7-2635QM,45,800,2000,2900,4,8 i7-2630QM,45,800,2000,2900,4,8 @@ -543,6 +543,7 @@ i7-4770,84,800,3400,3900,4,8 i5-4670K,84,800,3400,3800,4,4 i5-4670,84,800,3400,3800,4,4 i5-4570,84,800,3200,3600,4,4 +i5-4440,84,800,3100,3300,4,4 i5-4430,84,800,3000,3200,4,4 # Socket 1150 (Low Power) i7-4770S,65,800,3100,3900,4,8 From d69a3a0735e95170b092b8282213cbce781d84fc Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 19 Jan 2014 15:32:19 +0100 Subject: [PATCH 462/623] Fixed a couple of MSR name mixups. --- .../AppleIntelCPUPowerManagementInfo.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index dc1cfe8..5054d2a 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -104,13 +104,13 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(UInt8 aCPUModel) if (aCPUModel == CPU_MODEL_HASWELL_ULT) // 0x45 - Intel 325462.pdf Vol.3C 35-136 { - IOLog("AICPUPMI: MSR_PKG_C8_RESIDENCY.......(0x630) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); - IOLog("AICPUPMI: MSR_PKG_C9_RESIDENCY.......(0x631) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); - IOLog("AICPUPMI: MSR_PKG_C10_RESIDENCY......(0x632) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C8_RESIDENCY.......(0x630) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C8_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C9_RESIDENCY.......(0x631) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C9_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C10_RESIDENCY......(0x632) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C10_RESIDENCY)); - IOLog("AICPUPMI: MSR_PKG_C8_LATENCY.........(0x633) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); - IOLog("AICPUPMI: MSR_PKG_C9_LATENCY.........(0x634) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); - IOLog("AICPUPMI: MSR_PKG_C10_LATENCY........(0x635) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C7_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C8_LATENCY.........(0x633) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C8_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C9_LATENCY.........(0x634) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C9_RESIDENCY)); + IOLog("AICPUPMI: MSR_PKG_C10_LATENCY........(0x635) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_C10_RESIDENCY)); } } From 3398399e942ea0ac66b6cb48f19b719bc0118de6 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 19 Jan 2014 15:39:53 +0100 Subject: [PATCH 463/623] Updating script to v8.7 Moved a couple of Ivy Bridge desktop model processors to the right spot Experimental code added for Gringo Vermelho --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 51 ++++++++++++++++------------ 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 86f7483..8703117 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 8.6 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> +# Version 8.7 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivy Bridge (Pike, January 2013) @@ -90,6 +90,8 @@ # - Fixed cpu-type suggestion for MacPro6,1 (Pike, January 2014) # - Intel i7-4771 added (Pike, January 2014) # - A couple Intel Haswell/Crystal Well processor models added (Pike, January 2014) +# - Moved a couple of Ivy Bridge desktop model processors to the right spot (Pike, January 2014) +# - Experimental code added for Gringo Vermelho (Pike, January 2014) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -98,6 +100,7 @@ # - Thanks to 'philip_petev' for his help with Snow Leopard/egrep incompatibility. # - Thanks to 'RehabMan' for his help with Snow Leopard/egrep incompatibility. # - Thanks to 'BigDonkey' for his help with LFM (800 MHz) for Sandy Bridge mobility models. +# - Thanks to 'rtcl777' on Github issues for the tip about a typo in the iMac12 board-id's. # - Thanks to 'xpamamadeus' for the Clover boot.log tip. # - Thanks to 'rileyfreeman' for the Intel i7-3930K LFM value. # - Thanks to 'Klonkrieger2' aka Mark for the tip about the sed RegEx error in _getCPUtype. @@ -144,7 +147,7 @@ # # Script version info. # -gScriptVersion=8.6 +gScriptVersion=8.7 # # Change this to 0 when your CPU isn't stuck in Low Frequency Mode! @@ -285,7 +288,7 @@ i7-35355,120,1600,2666,2666,4,4 i7-3970X,150,1200,3500,4000,6,12 i7-3960X,130,1200,3300,3900,6,12 i7-3930K,130,1200,3200,3800,6,12 -i7-3820,130,0,3600,3800,4,8 +i7-3820,130,1200,3600,3800,4,8 # i7 Desktop series i7-2600S,65,1600,2800,3800,4,8 i7-2600,95,1600,3400,3800,4,8 @@ -379,19 +382,17 @@ i3-2310E,35,800,2100,0,2,4 gServerIvyBridgeCPUList=( # E3-1200 Xeon Processor Series -'E3-1290 v2',87,0,3700,4100,4,8 -'E3-1285 v2',65,0,3600,4000, -'E3-1285L v2',0,0,3200,3900, -'E3-1280 v2',69,0,3600,4000,4,8 -'E3-1275 v2',77,0,3500,3900,4,8 -'E3-1270 v2',69,0,3500,3900,4,8 -'E3-1265L v2',45,0,2500,3500,4,8 -'E3-1245 v2',77,0,3400,3800,4,8 -'E3-1240 v2',69,0,3400,3800,4,8 -'E3-1230 v2',69,0,3300,3700,4,8 -'E3-1225 v2',77,0,3200,3600,4,4 -'E3-1220 v2',69,0,3100,3500,4,4 -'E3-1220L v2',17,0,2300,3500,2,4 +'E3-1290 v2',87,1200,3700,4100,4,8 +'E3-1280 v2',69,1200,3600,4000,4,8 +'E3-1275 v2',77,1200,3500,3900,4,8 +'E3-1270 v2',69,1200,3500,3900,4,8 +'E3-1265L v2',45,1200,2500,3500,4,8 +'E3-1245 v2',77,1200,3400,3800,4,8 +'E3-1240 v2',69,1200,3400,3800,4,8 +'E3-1230 v2',69,1200,3300,3700,4,8 +'E3-1225 v2',77,1200,3200,3600,4,4 +'E3-1220 v2',69,1200,3100,3500,4,4 +'E3-1220L v2',17,1200,2300,3500,2,4 # E5-2600 Xeon Processor Series 'E5-2687W v2',150,1200,3400,4000,8,16 'E5-2658 v2 ',95,1200,2400,3000,10,20 @@ -418,6 +419,10 @@ gServerIvyBridgeCPUList=( ) gDesktopIvyBridgeCPUList=( +# Socket 2011 (Premium Power) +i7-4960K,130,1200,3600,4000,6,12 +i7-4930K,130,1200,3400,3900,6,12 +i7-4820K,130,1200,3700,3900,4,8 # i7-3700 Desktop Processor Series i7-3770T,45,1600,2500,3700,4,8 i7-3770S,65,1600,3100,3900,4,8 @@ -532,10 +537,6 @@ gServerHaswellCPUList=( ) gDesktopHaswellCPUList=( -# Socket 2011 (Premium Power) -i7-4960K,130,800,3600,4000,6,12 -i7-4930K,130,800,3400,3900,6,12 -i5-4820K,130,800,3700,3900,4,8 # Socket 1150 (Standard Power) i7-4770K,84,800,3500,3900,4,8 i7-4771,84,800,3500,3900,4,8 @@ -786,8 +787,14 @@ function _printPackages() # # Do we need to create additional (Low Frequency) P-States for Ivy bridge? # - if [ $gBridgeType -eq $IVY_BRIDGE ]; then - let minRatio=8 + if [ $gBridgeType -eq $IVY_BRIDGE ]; + then +# if [[ $gBaseFrequency -eq 1200 ]]; +# then +# let minRatio=12 +# else + let minRatio=8 +# fi fi if (($turboStates)); then From 14e3a1a17f2a0251e0715502096a4a5de576bed6 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 20 Jan 2014 09:04:31 +0100 Subject: [PATCH 464/623] - fixed a typo so that checking gIvyWorkAround really works. - added extra OS checks (as a test) to filter out possibly unwanted LFM P-States. - changed gIvyWorkAround to 0 (was 1). - now also inject target/running processor models (to help me debug it). p.s. We might need to change LFM_REQUIRED_OS to 1092 because I don't know for sure when it change (additional testing required). --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 64 +++++++++++++++++----------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 8703117..b851831 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 8.7 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> +# Version 8.8 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivy Bridge (Pike, January 2013) @@ -92,6 +92,8 @@ # - A couple Intel Haswell/Crystal Well processor models added (Pike, January 2014) # - Moved a couple of Ivy Bridge desktop model processors to the right spot (Pike, January 2014) # - Experimental code added for Gringo Vermelho (Pike, January 2014) +# - Fixed a typo so that checking gIvyWorkAround really works (Pike, January 2014) +# - Added extra OS checks (as a test) to filter out possibly unwanted LFM P-States (Pike, January 2014) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -106,6 +108,7 @@ # - Thanks to 'Klonkrieger2' aka Mark for the tip about the sed RegEx error in _getCPUtype. # - Thanks to 'dhnguyen92' on Github issues for the tip about a typo in the i7-2640M model data. # - Thanks to 'fabiosun' on Github issues for the tip about a typo in the cpu-type check. +# - Thanks to 'Hackmodford ' on Github issues for testing/confirming that PM in Mavericks was changed. # # Usage (v1.0 - v4.9): # @@ -147,12 +150,14 @@ # # Script version info. # -gScriptVersion=8.7 +gScriptVersion=8.8 # -# Change this to 0 when your CPU isn't stuck in Low Frequency Mode! +# Change this to 1 when your CPU is stuck in Low Frequency Mode! # -let gIvyWorkAround=1 +# Note: Injects extra Turbo P-State at he top with max-Turbo frequency + 1 MHz. +# +let gIvyWorkAround=0 # # Asks for your confirmation to copy ssdt_pr.aml to /Extra/ssdt.aml (example) @@ -181,13 +186,13 @@ let gCallIasl=1 # # A value of 1 will make this script open ssdt_pr.dsl in the editor of your choice. # -let gCallOpen=0 +let gCallOpen=1 # 0 = no debug injection/debug statements executed. # 1 = inject debug data. # 3 = inject debug data and execute _debugPrint statements. # -let gDebug=1 +let gDebug=0 # # Lowest possible idle frequency (user configurable). Also known as Low Frequency Mode. @@ -242,6 +247,7 @@ let gUnmountEFIPartition=0 gProductName=$(sw_vers -productName) gProductVersion="$(sw_vers -productVersion)" gBuildVersion=$(sw_vers -buildVersion) +let gOSVersion=$(echo $gProductVersion | tr -d '.') # # Maximum Turbo Clock Speed (user configurable) @@ -256,6 +262,12 @@ let PROCESSOR_LABEL_LENGTH_ERROR=6 let PROCESSOR_NAMES_ERROR=7 let PROCESSOR_DECLARATION_ERROR=8 +# +# First OS version number (?) that no longer requires +# us to inject zeroed out Low Frequency Mode P-States. +# +let LFM_REQUIRED_OS=1091 + # # Processor Number, Max TDP, Low Frequency Mode, Clock Speed, Max Turbo Frequency, Cores, Threads # @@ -654,15 +666,17 @@ function _injectDebugInfo() xcpm=0 # - # 'machdep.xcpm' is introduced in 10.8.5 + # Check OS version ('machdep.xcpm' is introduced in 10.8.5) # - if [[ $gProductVersion > "10.8.4" ]]; then - xcpm=$(/usr/sbin/sysctl -n machdep.xcpm.mode) + if [[ $gOSVersion > 1084 ]]; then + xcpm=$(/usr/sbin/sysctl -n machdep.xcpm.mode) fi echo ' Method (_INI, 0, NotSerialized)' >> $gSsdtPR echo ' {' >> $gSsdtPR echo ' Store ("ssdtPRGen version: '$gScriptVersion' / '$gProductName' '$gProductVersion' ('$gBuildVersion')", Debug)' >> $gSsdtPR + echo ' Store ("target processor : '$gProcessorNumber'", Debug)' >> $gSsdtPR + echo ' Store ("running processor: '$gBrandString'", Debug)' >> $gSsdtPR echo ' Store ("baseFrequency : '$gBaseFrequency'", Debug)' >> $gSsdtPR echo ' Store ("frequency : '$frequency'", Debug)' >> $gSsdtPR echo ' Store ("busFrequency : '$gBusFrequency'", Debug)' >> $gSsdtPR @@ -710,10 +724,17 @@ function _printScopeStart() # # Do we need to create additional (Low Frequency) P-States? # - if [ $gBridgeType -ne $SANDY_BRIDGE ]; then - let lowFrequencyPStates=($gBaseFrequency/100)-8 + let lowFrequencyPStates=0 + + # + # Do we need to add additional (Low Frequency) P-States for Ivy Bridge? + # + if [[ $gBridgeType -eq $IVY_BRIDGE && $gOSVersion < $LFM_REQUIRED_OS ]]; then + let lowFrequencyPStates=($gBaseFrequency/100)-8 + fi + let packageLength=($2+$lowFrequencyPStates) if [[ lowFrequencyPStates -gt 0 ]]; @@ -725,7 +746,7 @@ function _printScopeStart() fi # TODO: Remove this when CPUPM for IB works properly! - if [[ gIvyWorkAround && $gBridgeType -eq $IVY_BRIDGE ]]; then + if [[ $gBridgeType -eq $IVY_BRIDGE && $gIvyWorkAround -eq 1 ]]; then let useWorkArounds=1 fi fi @@ -733,7 +754,6 @@ function _printScopeStart() # # Check number of Turbo states (for IASL optimization). # - if [ $turboStates -eq 0 ]; then # TODO: Remove this when CPUPM for IB works properly! @@ -785,16 +805,11 @@ function _printPackages() let powerRatio=($p1Ratio-1) # - # Do we need to create additional (Low Frequency) P-States for Ivy bridge? + # Do we need to add additional (Low Frequency) P-States for Ivy Bridge? # - if [ $gBridgeType -eq $IVY_BRIDGE ]; + if [[ $gBridgeType -eq $IVY_BRIDGE && $gOSVersion < $LFM_REQUIRED_OS ]]; then -# if [[ $gBaseFrequency -eq 1200 ]]; -# then -# let minRatio=12 -# else - let minRatio=8 -# fi + let minRatio=8 fi if (($turboStates)); then @@ -1447,11 +1462,11 @@ function _getCPUNumberFromBrandString # # Get CPU brandstring # - local brandString=$(echo `sysctl machdep.cpu.brand_string` | sed -e 's/machdep.cpu.brand_string: //') + gBrandString=$(echo `sysctl machdep.cpu.brand_string` | sed -e 's/machdep.cpu.brand_string: //') # # Show brandstring (this helps me to debug stuff). # - printf "Brandstring '${brandString}'\n" + printf "Brandstring '${gBrandString}'\n" # # Save default (0) delimiter # @@ -1463,7 +1478,7 @@ function _getCPUNumberFromBrandString # # Split brandstring into array (data) # - local data=($brandString) + local data=($gBrandString) # # Teststrings # @@ -1981,6 +1996,7 @@ function main() let maxTurboFrequency=0 _getCPUNumberFromBrandString + _debugPrint "\ngProcessorNumber: $gProcessorNumber\n" if [[ "$1" != "" ]]; then From 411cde2b7adf7dabf486dd4dad0f07730f4d2bfd Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 21 Jan 2014 02:25:00 +0100 Subject: [PATCH 465/623] Preparations for the next update - white space changes. - text changes. - duplicated pref read removed. --- .../AppleIntelCPUPowerManagementInfo.cpp | 162 +++++++++--------- 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 5054d2a..83171cf 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -16,40 +16,40 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(UInt8 aCPUModel) { IOLog("AICPUPMI: MSR_CORE_THREAD_COUNT......(0x35) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_CORE_THREAD_COUNT)); - + IOLog("AICPUPMI: MSR_PLATFORM_INFO..........(0xCE) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PLATFORM_INFO)); - + IOLog("AICPUPMI: MSR_PMG_CST_CONFIG_CONTROL.(0xE2) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_CST_CONFIG_CONTROL)); IOLog("AICPUPMI: MSR_PMG_IO_CAPTURE_BASE....(0xE4) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PMG_IO_CAPTURE_BASE)); IOLog("AICPUPMI: IA32_MPERF.................(0xE7) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_MPERF)); IOLog("AICPUPMI: IA32_APERF.................(0xE8) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_APERF)); - + IOLog("AICPUPMI: MSR_FLEX_RATIO.............(0x194) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_FLEX_RATIO)); IOLog("AICPUPMI: MSR_IA32_PERF_STATUS.......(0x198) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_IA32_PERF_STATUS)); IOLog("AICPUPMI: MSR_IA32_PERF_CONTROL......(0x199) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_IA32_PERF_CONTROL)); IOLog("AICPUPMI: IA32_CLOCK_MODULATION......(0x19A) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_CLOCK_MODULATION)); IOLog("AICPUPMI: IA32_THERM_STATUS..........(0x19C) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_THERM_STATUS)); - + IOLog("AICPUPMI: IA32_MISC_ENABLES..........(0x1A0) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_MISC_ENABLES)); IOLog("AICPUPMI: MSR_MISC_PWR_MGMT..........(0x1AA) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_MISC_PWR_MGMT)); IOLog("AICPUPMI: MSR_TURBO_RATIO_LIMIT......(0x1AD) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_TURBO_RATIO_LIMIT)); - + IOLog("AICPUPMI: IA32_ENERGY_PERF_BIAS......(0x1B0) : 0x%llX\n", (unsigned long long)rdmsr64(IA32_ENERGY_PERF_BIAS)); - + IOLog("AICPUPMI: MSR_POWER_CTL..............(0x1FC) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_POWER_CTL)); - + IOLog("AICPUPMI: MSR_RAPL_POWER_UNIT........(0x606) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_RAPL_POWER_UNIT)); IOLog("AICPUPMI: MSR_PKG_POWER_LIMIT........(0x610) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_POWER_LIMIT)); IOLog("AICPUPMI: MSR_PKG_ENERGY_STATUS......(0x611) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKG_ENERGY_STATUS)); - + IOLog("AICPUPMI: MSR_PKGC3_IRTL.............(0x60a) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC3_IRTL)); IOLog("AICPUPMI: MSR_PKGC6_IRTL.............(0x60b) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC6_IRTL)); - + if (gCheckC7) { IOLog("AICPUPMI: MSR_PKGC7_IRTL.............(0x60c) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PKGC7_IRTL)); } - + IOLog("AICPUPMI: MSR_PP0_CURRENT_CONFIG.....(0x601) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_CURRENT_CONFIG)); IOLog("AICPUPMI: MSR_PP0_POWER_LIMIT........(0x638) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_POWER_LIMIT)); IOLog("AICPUPMI: MSR_PP0_ENERGY_STATUS......(0x639) : 0x%llX\n", (unsigned long long)rdmsr64(MSR_PP0_ENERGY_STATUS)); @@ -119,17 +119,17 @@ void AppleIntelCPUPowerManagementInfo::reportMSRs(UInt8 aCPUModel) inline void getCStates(void *magic) { UInt32 logicalCoreNumber = cpu_number(); - + if (gCheckC3 && rdmsr64(MSR_CORE_C3_RESIDENCY) > 0) { gC3Cores |= (1 << logicalCoreNumber); } - + if (gCheckC6 && rdmsr64(MSR_CORE_C6_RESIDENCY) > 0) { gC6Cores |= (1 << logicalCoreNumber); } - + if (gCheckC7 && rdmsr64(MSR_CORE_C7_RESIDENCY) > 0) { gC7Cores |= (1 << logicalCoreNumber); @@ -142,26 +142,26 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) { UInt8 currentMultiplier = (rdmsr64(MSR_IA32_PERF_STS) >> 8); gCoreMultipliers |= (1ULL << currentMultiplier); - + #if REPORT_IGPU_P_STATES UInt8 currentIgpuMultiplier = 0; - + if (igpuEnabled) { currentIgpuMultiplier = (UInt8)gMchbar[1]; gIGPUMultipliers |= (1ULL << currentIgpuMultiplier); } #endif - + timerEventSource->setTimeoutTicks(Interval); - + if (loopLock) { return kIOReturnTimeout; } - + loopLock = true; - + #if REPORT_C_STATES if (logCStates) { @@ -170,10 +170,10 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) IOSleep(1); } #endif - + int currentBit = 0; UInt64 value = 0ULL; - + #if REPORT_IGPU_P_STATES if ((gCoreMultipliers != gTriggeredPStates) || (gIGPUMultipliers != gTriggeredIGPUPStates)) #else @@ -182,11 +182,11 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) { gTriggeredPStates = gCoreMultipliers; IOLog("AICPUPMI: CPU P-States [ "); - + for (currentBit = gMinRatio; currentBit <= gMaxRatio; currentBit++) { value = (1ULL << currentBit); - + if ((gTriggeredPStates & value) == value) { if (currentBit == currentMultiplier) @@ -199,17 +199,17 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) } } } - + #if REPORT_IGPU_P_STATES if (igpuEnabled) { gTriggeredIGPUPStates = gIGPUMultipliers; IOLog("] iGPU P-States [ "); - + for (currentBit = 1; currentBit <= 32; currentBit++) { value = (1ULL << currentBit); - + if ((gTriggeredIGPUPStates & value) == value) { if (currentBit == currentIgpuMultiplier) @@ -226,65 +226,65 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) #endif IOLog("]\n"); } - + #if REPORT_C_STATES if (gCheckC3 && (gTriggeredC3Cores != gC3Cores)) { gTriggeredC3Cores = gC3Cores; IOLog("AICPUPMI: CPU C3-Cores [ "); - + for (currentBit = 0; currentBit <= 16; currentBit++) { value = (1ULL << currentBit); - + if ((gTriggeredC3Cores & value) == value) { IOLog("%d ", currentBit); } } - + IOLog("]\n"); } - + if (gCheckC6 && (gTriggeredC6Cores != gC6Cores)) { gTriggeredC6Cores = gC6Cores; IOLog("AICPUPMI: CPU C6-Cores [ "); - + for (currentBit = 0; currentBit <= 16; currentBit++) { value = (1ULL << currentBit); - + if ((gTriggeredC6Cores & value) == value) { IOLog("%d ", currentBit); } } - + IOLog("]\n"); } - + if (gCheckC7 && (gTriggeredC7Cores != gC7Cores)) { gTriggeredC7Cores = gC7Cores; IOLog("AICPUPMI: CPU C7-Cores [ "); - + for (currentBit = 0; currentBit <= 16; currentBit++) { value = (1ULL << currentBit); - + if ((gTriggeredC7Cores & value) == value) { IOLog("%d ", currentBit); } } - + IOLog("]\n"); } #endif - + loopLock = false; - + return kIOReturnSuccess; } @@ -293,12 +293,12 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) IOService* AppleIntelCPUPowerManagementInfo::probe(IOService *provider, SInt32 *score) { IOService *ret = super::probe(provider, score); - + if (ret != this) { return 0; } - + return ret; } @@ -309,49 +309,56 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) if (IOService::start(provider)) { simpleLock = IOSimpleLockAlloc(); - + if (simpleLock) { + IOLog("AICPUPMI: v%s Copyright © 2012-2014 Pike R. Alpha. All rights reserved\n", VERSION); #if REPORT_MSRS OSBoolean * key_logMSRs = OSDynamicCast(OSBoolean, getProperty("logMSRs")); - + if (key_logMSRs) { logMSRs = (bool)key_logMSRs->getValue(); } + + IOLog("AICPUPMI: logMSRs............................: %d\n", logMSRs); #endif - + #if REPORT_IGPU_P_STATES OSBoolean * key_logIGPU = OSDynamicCast(OSBoolean, getProperty("logIGPU")); - + if (key_logIGPU) { igpuEnabled = (bool)key_logIGPU->getValue(); } + + IOLog("AICPUPMI: logIGPU............................: %d\n", igpuEnabled); #endif - + #if REPORT_C_STATES OSBoolean * key_logCStates = OSDynamicCast(OSBoolean, getProperty("logCStates")); - + if (key_logCStates) { logCStates = (bool)key_logCStates->getValue(); } + + IOLog("AICPUPMI: logCStates.........................: %d\n", logCStates); #endif timerEventSource = IOTimerEventSource::timerEventSource(this, OSMemberFunctionCast(IOTimerEventSource::Action, this, &AppleIntelCPUPowerManagementInfo::loopTimerEvent)); workLoop = getWorkLoop(); - + if (timerEventSource && workLoop && (kIOReturnSuccess == workLoop->addEventSource(timerEventSource))) { this->registerService(0); - + UInt64 msr = rdmsr64(MSR_IA32_PERF_STS); gCoreMultipliers |= (1ULL << (msr >> 8)); #if REPORT_IGPU_P_STATES bool isIGPUEnabled = ((READ_PCI8_NB(DEVEN) & DEVEN_D2EN_MASK)); // IGPU Enabled and Visible? - + if (!isIGPUEnabled && igpuEnabled) { igpuEnabled = false; @@ -359,17 +366,10 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) #endif uint32_t cpuid_reg[4]; do_cpuid(0x00000001, cpuid_reg); - + UInt8 cpuModel = bitfield32(cpuid_reg[eax], 7, 4) + (bitfield32(cpuid_reg[eax], 19, 16) << 4); #if REPORT_C_STATES - OSBoolean * key_logCStates = OSDynamicCast(OSBoolean, getProperty("logCStates")); - - if (key_logCStates) - { - logCStates = (bool)key_logCStates->getValue(); - } - switch (cpuModel) // TODO: Verify me! { case CPU_MODEL_SB_CORE: // 0x2A - Intel 325462.pdf Vol.3C 35-111 @@ -381,7 +381,7 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) case CPU_MODEL_HASWELL: // 0x3C - Intel 325462.pdf Vol.3C 35-136 case CPU_MODEL_HASWELL_ULT: // 0x45 - Intel 325462.pdf Vol.3C 35-136 case CPU_MODEL_CRYSTALWELL: // 0x46 - + gCheckC7 = true; break; } @@ -391,7 +391,7 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) // MWAIT information do_cpuid(0x00000005, cpuid_reg); uint32_t supportedMwaitCStates = bitfield32(cpuid_reg[edx], 31, 0); - + IOLog("AICPUPMI: MWAIT C-States.....................: %d\n", supportedMwaitCStates); if (logMSRs) @@ -401,45 +401,45 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) #endif msr = rdmsr64(MSR_PLATFORM_INFO); gMinRatio = (UInt8)((msr >> 40) & 0xff); - IOLog("AICPUPMI: Low Frequency Mode.................: %d00 MHz\n", gMinRatio); - + IOLog("AICPUPMI: CPU Low Frequency Mode.............: %d00 MHz\n", gMinRatio); + gClockRatio = (UInt8)((msr >> 8) & 0xff); - IOLog("AICPUPMI: Clock Speed (Max. Non-Turbo Freq.).: %d00 MHz\n", gClockRatio); - + IOLog("AICPUPMI: CPU Maximum non-Turbo Frequency....: %d00 MHz\n", gClockRatio); + if (!((rdmsr64(IA32_MISC_ENABLES) >> 32) & 0x40)) // Turbo Mode Enabled? { msr = rdmsr64(MSR_TURBO_RATIO_LIMIT); gMaxRatio = (UInt8)(msr & 0xff); - IOLog("AICPUPMI: Maximum Turbo Frequency............: %d00 MHz\n", gMaxRatio); + IOLog("AICPUPMI: CPU Maximum Turbo Frequency........: %d00 MHz\n", gMaxRatio); } else { gMaxRatio = gClockRatio; - IOLog("AICPUPMI: Maximum Frequency..................: %d00 MHz\n", gMaxRatio); + IOLog("AICPUPMI: CPU Maximum Frequency..............: %d00 MHz\n", gMaxRatio); } - + #if REPORT_IGPU_P_STATES if (igpuEnabled) { IOPhysicalAddress address = (IOPhysicalAddress)(0xFED10000 + 0x5948); memDescriptor = IOMemoryDescriptor::withPhysicalAddress(address, 0x53, kIODirectionInOut); - + if (memDescriptor != NULL) { if ((result = memDescriptor->prepare()) == kIOReturnSuccess) { memoryMap = memDescriptor->map(); - + if (memoryMap != NULL) { gMchbar = (UInt8 *)memoryMap->getVirtualAddress(); - + // Preventing a stupid (UEFI) BIOS limit. if (gMchbar[0x4C] < gMchbar[0x50]) { gMchbar[0x4C] = gMchbar[0x50]; } - + // // Examples IGPU multiplier: 17 (multiplier) * 50 (frequency in MHz) = 850 MHz // 22 (multiplier) * 50 (frequency in MHz) = 1100 MHz @@ -453,7 +453,7 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) IOLog("AICPUPMI: IGPU Maximum Non-Turbo Frequency...: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x51])); // RP1_CAP (MAX_NON_TURBO) // Maximum RP0 base frequency capability for the Integrated GFX Engine (GT). IOLog("AICPUPMI: IGPU Maximum Turbo Frequency.......: %4d MHz\n", IGPU_RATIO_TO_FREQUENCY((UInt8)gMchbar[0x50])); // RP0_CAP (MAX_TURBO)) - + // Maximum base frequency limit for the Integrated GFX Engine (GT) allowed during run-time. if (gMchbar[0x4C] == 255) { @@ -481,12 +481,12 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) } #endif timerEventSource->setTimeoutMS(1000); - + return true; } } } - + return false; } @@ -498,7 +498,7 @@ void AppleIntelCPUPowerManagementInfo::stop(IOService *provider) { IOSimpleLockFree(simpleLock); } - + if (timerEventSource) { if (workLoop) @@ -506,11 +506,11 @@ void AppleIntelCPUPowerManagementInfo::stop(IOService *provider) timerEventSource->cancelTimeout(); workLoop->removeEventSource(timerEventSource); } - + timerEventSource->release(); timerEventSource = NULL; } - + super::stop(provider); } @@ -526,7 +526,7 @@ void AppleIntelCPUPowerManagementInfo::free() memoryMap->release(); memoryMap = NULL; } - + if (memDescriptor) { memDescriptor->release(); @@ -534,6 +534,6 @@ void AppleIntelCPUPowerManagementInfo::free() } } #endif - + super::free(); -} \ No newline at end of file +} From dcb6fb5174f2b6a3dcf3ddd146b1d5235f40729e Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 21 Jan 2014 02:26:33 +0100 Subject: [PATCH 466/623] Preparations for the next update - version number added. --- .../AppleIntelCPUPowerManagementInfo.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index 4c4356a..724d2a0 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -21,9 +21,11 @@ #define super IOService -#define REPORT_MSRS 1 +#define VERSION "3.1" + +#define REPORT_MSRS 1 #define REPORT_IGPU_P_STATES 1 -#define REPORT_C_STATES 1 +#define REPORT_C_STATES #define NB_BUS 0x00 #define NB_DEV 0x00 From a775e933e1c889a16c7c37514175ea66c0aec5c0 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 21 Jan 2014 02:28:47 +0100 Subject: [PATCH 467/623] Preparations for the next update Fixing a copy/paste error --- .../AppleIntelCPUPowerManagementInfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index 724d2a0..3012bce 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -25,7 +25,7 @@ #define REPORT_MSRS 1 #define REPORT_IGPU_P_STATES 1 -#define REPORT_C_STATES +#define REPORT_C_STATES 1 #define NB_BUS 0x00 #define NB_DEV 0x00 From 52d737ba5e73914ba57246b3c4a2cfac0bd30685 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 21 Jan 2014 02:33:49 +0100 Subject: [PATCH 468/623] Different IGPU enabled/visibility check Note: When you get a KP after this change, then change it back and report it on Github issues. Thanks! --- .../AppleIntelCPUPowerManagementInfo.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 83171cf..8cce1fc 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -357,11 +357,12 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) gCoreMultipliers |= (1ULL << (msr >> 8)); #if REPORT_IGPU_P_STATES - bool isIGPUEnabled = ((READ_PCI8_NB(DEVEN) & DEVEN_D2EN_MASK)); // IGPU Enabled and Visible? - - if (!isIGPUEnabled && igpuEnabled) + if (igpuEnabled) { - igpuEnabled = false; + if ((READ_PCI8_NB(DEVEN) & DEVEN_D2EN_MASK) == 0) // Is the IGPU enabled and visible? + { + igpuEnabled = false; + } } #endif uint32_t cpuid_reg[4]; From addbe430699f3953ea5dbea70d5c754ed344e211 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 21 Jan 2014 02:51:57 +0100 Subject: [PATCH 469/623] Add Intel Power Gadget style logging Note: This does not show you the P-States that AppleIntelCPUPowerManagement.kext/mach_kernel activates, by writing to the MSR 0x199, but instead shows you the actual state of the processor! --- .../AppleIntelCPUPowerManagementInfo.cpp | 39 +++++++++++++++++++ .../AppleIntelCPUPowerManagementInfo.h | 5 +++ ...nfo-AppleIntelCPUPowerManagementInfo.plist | 2 + 3 files changed, 46 insertions(+) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 8cce1fc..698a38b 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -162,6 +162,30 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) loopLock = true; +#if REPORT_IPG_STYLE + if (logIPGStyle) + { + UInt64 mPerf = (rdmsr64(IA32_MPERF)); + UInt64 aPerf = (rdmsr64(IA32_APERF)); + wrmsr64(IA32_MPERF, 0ULL); + wrmsr64(IA32_APERF, 0ULL); + UInt16 busy = ((aPerf * 100) / mPerf); + UInt8 pState = (UInt8)(((34 + 0.5) * busy) / 100); + + if (pState != currentMultiplier) + { + gCoreMultipliers |= (1ULL << pState); + + if ((pState < currentMultiplier) && (pState < 8)) + { + pState = 8; + } + + wrmsr64(199, (pState << 8)); + } + } +#endif + #if REPORT_C_STATES if (logCStates) { @@ -177,7 +201,11 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) #if REPORT_IGPU_P_STATES if ((gCoreMultipliers != gTriggeredPStates) || (gIGPUMultipliers != gTriggeredIGPUPStates)) #else + #if REPORT_IPG_STYLE + if ((gCoreMultipliers != gTriggeredPStates) || (currentMultiplier != pState)) + #else if (gCoreMultipliers != gTriggeredPStates) + #endif #endif { gTriggeredPStates = gCoreMultipliers; @@ -346,6 +374,17 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) IOLog("AICPUPMI: logCStates.........................: %d\n", logCStates); #endif +#if REPORT_IPG_STYLE + OSBoolean * key_logIPGStyle = OSDynamicCast(OSBoolean, getProperty("logIPGStyle")); + + if (key_logIPGStyle) + { + logIPGStyle = (bool)key_logIPGStyle->getValue(); + } + + IOLog("AICPUPMI: logIPGStyle........................: %d\n", logIPGStyle); +#endif + timerEventSource = IOTimerEventSource::timerEventSource(this, OSMemberFunctionCast(IOTimerEventSource::Action, this, &AppleIntelCPUPowerManagementInfo::loopTimerEvent)); workLoop = getWorkLoop(); diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index 3012bce..f6db765 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -26,6 +26,7 @@ #define REPORT_MSRS 1 #define REPORT_IGPU_P_STATES 1 #define REPORT_C_STATES 1 +#define REPORT_IPG_STYLE 1 #define NB_BUS 0x00 #define NB_DEV 0x00 @@ -116,6 +117,10 @@ class AppleIntelCPUPowerManagementInfo : public IOService bool logCStates = true; // Set <key>logCStates</key> to <false/> in Info.plist to disable this feature. #endif +#if REPORT_IPG_STYLE + bool logIPGStyle = true; // Set <key>logIPGStyle</key> to <false/> in Info.plist to disable this feature. +#endif + UInt16 Interval = 50; UInt64 gCoreMultipliers = 0ULL; diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist index ff48fad..f40f1d7 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/Info-AppleIntelCPUPowerManagementInfo.plist @@ -42,6 +42,8 @@ <false/> <key>logCStates</key> <true/> + <key>logIPGStyle</key> + <true/> </dict> </dict> <key>OSBundleLibraries</key> From 2c2aa68fe4952bd1af3910e57865e0f2dde6ac56 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 21 Jan 2014 11:18:27 +0100 Subject: [PATCH 470/623] Updating script to v8.9 - Reenable DEBUG data. - Resetting gIvyWorkAround=1 - Adding a lost Return statement - gIvyWorkAround now also controls the additional LFM P-States --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 27 +++++++++++-------- .../AppleIntelCPUPowerManagementInfo.cpp | 15 ++++++----- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index b851831..1c4fd48 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 8.8 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> +# Version 8.9 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivy Bridge (Pike, January 2013) @@ -94,6 +94,7 @@ # - Experimental code added for Gringo Vermelho (Pike, January 2014) # - Fixed a typo so that checking gIvyWorkAround really works (Pike, January 2014) # - Added extra OS checks (as a test) to filter out possibly unwanted LFM P-States (Pike, January 2014) +# - Let gIvyWorkAround control the additional LFM P-States (Pike, January 2014) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -150,14 +151,16 @@ # # Script version info. # -gScriptVersion=8.8 +gScriptVersion=8.9 # # Change this to 1 when your CPU is stuck in Low Frequency Mode! # -# Note: Injects extra Turbo P-State at he top with max-Turbo frequency + 1 MHz. +# 1 - Injects one extra Turbo P-State at he top with max-Turbo frequency + 1 MHz. +# 2 - Injects N extra Turbo P-State at the bottom. +# 3 - Injects both of them. # -let gIvyWorkAround=0 +let gIvyWorkAround=2 # # Asks for your confirmation to copy ssdt_pr.aml to /Extra/ssdt.aml (example) @@ -192,7 +195,7 @@ let gCallOpen=1 # 1 = inject debug data. # 3 = inject debug data and execute _debugPrint statements. # -let gDebug=0 +let gDebug=1 # # Lowest possible idle frequency (user configurable). Also known as Low Frequency Mode. @@ -263,8 +266,9 @@ let PROCESSOR_NAMES_ERROR=7 let PROCESSOR_DECLARATION_ERROR=8 # -# First OS version number (?) that no longer requires -# us to inject zeroed out Low Frequency Mode P-States. +# First OS version number that no longer requires extra Low Frequency Mode P-States. +# +# Note: For future use (when we figured out what we need). # let LFM_REQUIRED_OS=1091 @@ -685,6 +689,7 @@ function _injectDebugInfo() echo ' Store ("packageLength : '$packageLength'", Debug)' >> $gSsdtPR echo ' Store ("turboStates : '$turboStates'", Debug)' >> $gSsdtPR echo ' Store ("maxTurboFrequency: '$maxTurboFrequency'", Debug)' >> $gSsdtPR + echo ' Store ("gIvyWorkAround : '$gIvyWorkAround'", Debug)' >> $gSsdtPR echo ' Store ("machdep.xcpm.mode: '$xcpm'", Debug)' >> $gSsdtPR echo ' }' >> $gSsdtPR echo '' >> $gSsdtPR @@ -731,7 +736,7 @@ function _printScopeStart() # # Do we need to add additional (Low Frequency) P-States for Ivy Bridge? # - if [[ $gBridgeType -eq $IVY_BRIDGE && $gOSVersion < $LFM_REQUIRED_OS ]]; then + if (( $gBridgeType == $IVY_BRIDGE && $gIvyWorkAround & 2 )); then let lowFrequencyPStates=($gBaseFrequency/100)-8 fi @@ -746,7 +751,7 @@ function _printScopeStart() fi # TODO: Remove this when CPUPM for IB works properly! - if [[ $gBridgeType -eq $IVY_BRIDGE && $gIvyWorkAround -eq 1 ]]; then + if (( $gBridgeType == $IVY_BRIDGE && $gIvyWorkAround & 1 )); then let useWorkArounds=1 fi fi @@ -807,8 +812,7 @@ function _printPackages() # # Do we need to add additional (Low Frequency) P-States for Ivy Bridge? # - if [[ $gBridgeType -eq $IVY_BRIDGE && $gOSVersion < $LFM_REQUIRED_OS ]]; - then + if (( $gBridgeType == $IVY_BRIDGE && $gIvyWorkAround & 2 )); then let minRatio=8 fi @@ -1282,6 +1286,7 @@ function _getProcessorScope() # if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 -w0 | egrep -o 'DSDT"=<[0-9a-f]+' | egrep -o '5b830b') ]]; then printf 'Processor Declaration(s) Found in DSDT' + return fi if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 -w0 | egrep -o 'DSDT"=<[0-9a-f]+' | egrep -o '5f50525f') ]]; diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 698a38b..d4c159a 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -169,11 +169,12 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) UInt64 aPerf = (rdmsr64(IA32_APERF)); wrmsr64(IA32_MPERF, 0ULL); wrmsr64(IA32_APERF, 0ULL); - UInt16 busy = ((aPerf * 100) / mPerf); - UInt8 pState = (UInt8)(((34 + 0.5) * busy) / 100); +// UInt16 busy = ((aPerf * 100) / mPerf); + float busy = ((aPerf * 100) / mPerf); + UInt8 pState = (UInt8)(((gClockRatio + 0.5) * busy) / 100); - if (pState != currentMultiplier) - { +/* if (pState != currentMultiplier) + { */ gCoreMultipliers |= (1ULL << pState); if ((pState < currentMultiplier) && (pState < 8)) @@ -182,7 +183,7 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) } wrmsr64(199, (pState << 8)); - } + // } } #endif @@ -384,6 +385,8 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) IOLog("AICPUPMI: logIPGStyle........................: %d\n", logIPGStyle); #endif + UInt64 msr = rdmsr64(MSR_PLATFORM_INFO); + gClockRatio = (UInt8)((msr >> 8) & 0xff); timerEventSource = IOTimerEventSource::timerEventSource(this, OSMemberFunctionCast(IOTimerEventSource::Action, this, &AppleIntelCPUPowerManagementInfo::loopTimerEvent)); workLoop = getWorkLoop(); @@ -392,7 +395,7 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) { this->registerService(0); - UInt64 msr = rdmsr64(MSR_IA32_PERF_STS); + msr = rdmsr64(MSR_IA32_PERF_STS); gCoreMultipliers |= (1ULL << (msr >> 8)); #if REPORT_IGPU_P_STATES From 5316b0f21780131e400dc434a0369840ffd96446 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 21 Jan 2014 19:23:19 +0100 Subject: [PATCH 471/623] Updating script to v9.0 - Fixed a typo. - Changed the default value of gIvyWorkAround back to its original state. --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 1c4fd48..d115ea1 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 8.9 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> +# Version 9.0 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivy Bridge (Pike, January 2013) @@ -151,16 +151,16 @@ # # Script version info. # -gScriptVersion=8.9 +gScriptVersion=9.0 # # Change this to 1 when your CPU is stuck in Low Frequency Mode! # # 1 - Injects one extra Turbo P-State at he top with max-Turbo frequency + 1 MHz. -# 2 - Injects N extra Turbo P-State at the bottom. +# 2 - Injects N extra Turbo P-States at the bottom. # 3 - Injects both of them. # -let gIvyWorkAround=2 +let gIvyWorkAround=3 # # Asks for your confirmation to copy ssdt_pr.aml to /Extra/ssdt.aml (example) From cac87e0313f6f37ce7aafe2cfac42526584e3f3d Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 26 Jan 2014 16:47:40 +0100 Subject: [PATCH 472/623] Style nit --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index d115ea1..5432eab 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -1285,7 +1285,7 @@ function _getProcessorScope() # We run egrep twice here for Snow Leopard compatibility, otherwise it fails. # if [[ $(ioreg -c AppleACPIPlatformExpert -rd1 -w0 | egrep -o 'DSDT"=<[0-9a-f]+' | egrep -o '5b830b') ]]; then - printf 'Processor Declaration(s) Found in DSDT' + echo 'Processor Declaration(s) Found in DSDT' return fi From 9df46a190cdcefa6ac9d11cd2be740bb926ea1b4 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 27 Jan 2014 08:52:50 +0100 Subject: [PATCH 473/623] Update to version 3.2 Trying to resolve a KP --- .../AppleIntelCPUPowerManagementInfo.cpp | 17 ++++++++--------- .../AppleIntelCPUPowerManagementInfo.h | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index d4c159a..6902f5f 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -361,6 +361,14 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) igpuEnabled = (bool)key_logIGPU->getValue(); } + if (igpuEnabled) + { + if ((READ_PCI8_NB(DEVEN) & DEVEN_D2EN_MASK) == 0) // Is the IGPU enabled and visible? + { + igpuEnabled = false; + } + } + IOLog("AICPUPMI: logIGPU............................: %d\n", igpuEnabled); #endif @@ -398,15 +406,6 @@ bool AppleIntelCPUPowerManagementInfo::start(IOService *provider) msr = rdmsr64(MSR_IA32_PERF_STS); gCoreMultipliers |= (1ULL << (msr >> 8)); -#if REPORT_IGPU_P_STATES - if (igpuEnabled) - { - if ((READ_PCI8_NB(DEVEN) & DEVEN_D2EN_MASK) == 0) // Is the IGPU enabled and visible? - { - igpuEnabled = false; - } - } -#endif uint32_t cpuid_reg[4]; do_cpuid(0x00000001, cpuid_reg); diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index f6db765..895b579 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -21,7 +21,7 @@ #define super IOService -#define VERSION "3.1" +#define VERSION "3.2" #define REPORT_MSRS 1 #define REPORT_IGPU_P_STATES 1 From bb81a024c06e06da336d33b0578d921e43471cbc Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 28 Jan 2014 21:20:15 +0100 Subject: [PATCH 474/623] Updating script to v9.1 Fixed a typo in processor data (i7-4960K should be i7-4960X) --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 5432eab..09cb918 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -3,7 +3,7 @@ # Script (ssdtPRGen.sh) to create ssdt-pr.dsl for Apple Power Management Support. # # Version 0.9 - Copyright (c) 2012 by RevoGirl -# Version 9.0 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> +# Version 9.1 - Copyright (c) 2014 by Pike <PikeRAlpha@yahoo.com> # # Updates: # - Added support for Ivy Bridge (Pike, January 2013) @@ -95,6 +95,7 @@ # - Fixed a typo so that checking gIvyWorkAround really works (Pike, January 2014) # - Added extra OS checks (as a test) to filter out possibly unwanted LFM P-States (Pike, January 2014) # - Let gIvyWorkAround control the additional LFM P-States (Pike, January 2014) +# - Fixed a typo in processor data (i7-4960K should be i7-4960X) (Pike, January 2014) # # Contributors: # - Thanks to Dave, toleda and Francis for their help (bug fixes and other improvements). @@ -151,7 +152,7 @@ # # Script version info. # -gScriptVersion=9.0 +gScriptVersion=9.1 # # Change this to 1 when your CPU is stuck in Low Frequency Mode! @@ -436,7 +437,7 @@ gServerIvyBridgeCPUList=( gDesktopIvyBridgeCPUList=( # Socket 2011 (Premium Power) -i7-4960K,130,1200,3600,4000,6,12 +i7-4960X,130,1200,3600,4000,6,12 i7-4930K,130,1200,3400,3900,6,12 i7-4820K,130,1200,3700,3900,4,8 # i7-3700 Desktop Processor Series From 1d13da4e5b8f4b10b896a7d0b43aac52ee7f097b Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 28 Jan 2014 21:27:47 +0100 Subject: [PATCH 475/623] Updating to v3.3 Removed another KP trigger. --- .../AppleIntelCPUPowerManagementInfo.cpp | 7 +++++-- .../AppleIntelCPUPowerManagementInfo.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp index 6902f5f..41ae48a 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.cpp @@ -181,8 +181,11 @@ IOReturn AppleIntelCPUPowerManagementInfo::loopTimerEvent(void) { pState = 8; } - - wrmsr64(199, (pState << 8)); + /* + * Commented out after fabio67 (fabiosun) confirmed that + * the wrmsr() below triggered a KP on his configuration + * wrmsr64(199, (pState << 8)); + */ // } } #endif diff --git a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h index 895b579..d3d35d4 100644 --- a/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h +++ b/i386/libsaio/cpu/tools/PMinfo/AppleIntelCPUPowerManagementInfo/AppleIntelCPUPowerManagementInfo.h @@ -21,7 +21,7 @@ #define super IOService -#define VERSION "3.2" +#define VERSION "3.3" #define REPORT_MSRS 1 #define REPORT_IGPU_P_STATES 1 From fc43ab134fde8f72a9fa599b7265b7a7b8fde6c0 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 2 Feb 2014 22:51:48 +0100 Subject: [PATCH 476/623] Link to Github issues added for new bug reports --- i386/libsaio/acpi/Tools/ssdtPRGen.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/i386/libsaio/acpi/Tools/ssdtPRGen.sh b/i386/libsaio/acpi/Tools/ssdtPRGen.sh index 09cb918..7ca0a48 100755 --- a/i386/libsaio/acpi/Tools/ssdtPRGen.sh +++ b/i386/libsaio/acpi/Tools/ssdtPRGen.sh @@ -112,6 +112,11 @@ # - Thanks to 'fabiosun' on Github issues for the tip about a typo in the cpu-type check. # - Thanks to 'Hackmodford ' on Github issues for testing/confirming that PM in Mavericks was changed. # +# Bugs: +# - Bug reports can be filed at https://github.com/Piker-Alpha/RevoBoot/issues +# Please provide clear steps to reproduce the bug, the output of the +# script and the resulting SSDT.dsl Thank you! +# # Usage (v1.0 - v4.9): # # - ./ssdtPRGen.sh [max turbo frequency] [TDP] [CPU type] From d7eb02f1532c07b3aa5b15fca17ae3d2d2ce2f2d Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 12 Oct 2014 16:47:43 +0200 Subject: [PATCH 477/623] Yosemite specific bits and pieces --- i386/boot2/lzvn.c | 556 +++++++++++++++++++++++++++++++++++++++++++++ i386/libsaio/asm.s | 45 +++- i386/libsaio/efi.c | 149 +++++++++--- 3 files changed, 716 insertions(+), 34 deletions(-) create mode 100644 i386/boot2/lzvn.c diff --git a/i386/boot2/lzvn.c b/i386/boot2/lzvn.c new file mode 100644 index 0000000..f9b3e14 --- /dev/null +++ b/i386/boot2/lzvn.c @@ -0,0 +1,556 @@ +/* + * Copyright (c) 2014 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Portions Copyright (c) 2003 Apple Computer, Inc. All Rights + * Reserved. This file contains Original Code and/or Modifications of + * Original Code as defined in and that are subject to the Apple Public + * Source License Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. Please obtain a copy of the + * License at http://www.apple.com/publicsource and read it before using + * this file. + * + * The Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + * + * The lzvn_decode function was first located and disassembled by Pike R. + * Alpha and later converted to flat C code by someone using the handle + * 'MinusZwei' over at insanelymac.com. This after Andy Vandijcke published + * a working version at the for mentioned website. + * + * Thanks to Andy Vandijcke and 'MinusZwei' for their work, but I (Pike + * R. Alpha) will not claim ownership of this work, other than the work + * that I have done, for educational purpose, to improve the readability + * so that it is understandable for everyone. + * + */ + +#include <stdio.h> +#include <string.h> + +#include <libkern/OSByteOrder.h> + +#define DEBUG_STATE_ENABLED 0 + + +#if DEBUG_STATE_ENABLED + #define _LZVN_DEBUG_DUMP(x...) printf(x) +#else + #define _LZVN_DEBUG_DUMP(x...) +#endif + +#define LZVN_0 0 +#define LZVN_1 1 +#define LZVN_2 2 +#define LZVN_3 3 +#define LZVN_4 4 +#define LZVN_5 5 +#define LZVN_6 6 +#define LZVN_7 7 +#define LZVN_8 8 +#define LZVN_9 9 +#define LZVN_10 10 +#define LZVN_11 11 + +#define CASE_TABLE 127 + +//============================================================================== + +size_t lzvn_decode(void * decompressedData, size_t decompressedSize, void * compressedData, size_t compressedSize) +{ + const uint64_t decompBuffer = (const uint64_t)decompressedData; + + size_t length = 0; // xor %rax,%rax + + uint64_t compBuffer = (uint64_t)compressedData; + + uint64_t compBufferPointer = 0; // use p(ointer)? + uint64_t caseTableIndex = 0; + uint64_t r10 = 0; + uint64_t currentLength = 0; // xor %r12,%r12 + uint64_t r12 = 0; + + uint64_t address = 0; // ((uint64_t)compBuffer + compBufferPointer) + unsigned char byte_data = 0; + + uint8_t jmpTo = CASE_TABLE; + + /* + * This jump table was developed by someone using the handle 'MnusZwei' + * over at insanelymac.com + */ + static short caseTable[ 256 ] = + { + 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 4, 3, + 1, 1, 1, 1, 1, 1, 4, 3, 1, 1, 1, 1, 1, 1, 5, 3, + 1, 1, 1, 1, 1, 1, 5, 3, 1, 1, 1, 1, 1, 1, 5, 3, + 1, 1, 1, 1, 1, 1, 5, 3, 1, 1, 1, 1, 1, 1, 5, 3, + 1, 1, 1, 1, 1, 1, 0, 3, 1, 1, 1, 1, 1, 1, 0, 3, + 1, 1, 1, 1, 1, 1, 0, 3, 1, 1, 1, 1, 1, 1, 0, 3, + 1, 1, 1, 1, 1, 1, 0, 3, 1, 1, 1, 1, 1, 1, 0, 3, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 1, 1, 1, 1, 1, 1, 0, 3, 1, 1, 1, 1, 1, 1, 0, 3, + 1, 1, 1, 1, 1, 1, 0, 3, 1, 1, 1, 1, 1, 1, 0, 3, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 1, 1, 1, 1, 1, 1, 0, 3, 1, 1, 1, 1, 1, 1, 0, 3, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 + }; + + decompressedSize -= 8; // sub $0x8,%rsi + + if (decompressedSize < 8) // jb Llzvn_exit + { + return 0; + } + + compressedSize = (compBuffer + compressedSize - 8); // lea -0x8(%rdx,%rcx,1),%rcx + + if (compBuffer > compressedSize) // cmp %rcx,%rdx + { + return 0; // ja Llzvn_exit + } + + compBufferPointer = *(uint64_t *)compBuffer; // mov (%rdx),%r8 + caseTableIndex = (compBufferPointer & 255); // movzbq (%rdx),%r9 + + do // jmpq *(%rbx,%r9,8) + { + switch (jmpTo) // our jump table + { + case CASE_TABLE: /******************************************************/ + + switch (caseTable[(uint8_t)caseTableIndex]) + { + case 0: _LZVN_DEBUG_DUMP("caseTable[0]\n"); + + caseTableIndex >>= 6; // shr $0x6,%r9 + compBuffer = (compBuffer + caseTableIndex + 1); // lea 0x1(%rdx,%r9,1),%rdx + + if (compBuffer > compressedSize) // cmp %rcx,%rdx + { + return 0; // ja Llzvn_exit + } + + r10 = 56; // mov $0x38,%r10 + r10 &= compBufferPointer; // and %r8,%r10 + compBufferPointer >>= 8; // shr $0x8,%r8 + r10 >>= 3; // shr $0x3,%r10 + r10 += 3; // add $0x3,%r10 + + jmpTo = LZVN_10; // jmp Llzvn_l10 + break; + + case 1: _LZVN_DEBUG_DUMP("caseTable[1]\n"); + + caseTableIndex >>= 6; // shr $0x6,%r9 + compBuffer = (compBuffer + caseTableIndex + 2); // lea 0x2(%rdx,%r9,1),%rdx + + if (compBuffer > compressedSize) // cmp %rcx,%rdx + { + return 0; // ja Llzvn_exit + } + + r12 = compBufferPointer; // mov %r8,%r12 + r12 = OSSwapInt64(r12); // bswap %r12 + r10 = r12; // mov %r12,%r10 + r12 <<= 5; // shl $0x5,%r12 + r10 <<= 2; // shl $0x2,%r10 + r12 >>= 53; // shr $0x35,%r12 + r10 >>= 61; // shr $0x3d,%r10 + compBufferPointer >>= 16; // shr $0x10,%r8 + r10 += 3; // add $0x3,%r10 + + jmpTo = LZVN_10; // jmp Llzvn_l10 + break; + + case 2: _LZVN_DEBUG_DUMP("caseTable[2]\n"); + + return length; + + case 3: _LZVN_DEBUG_DUMP("caseTable[3]\n"); + + caseTableIndex >>= 6; // shr $0x6,%r9 + compBuffer = (compBuffer + caseTableIndex + 3); // lea 0x3(%rdx,%r9,1),%rdx + + if (compBuffer > compressedSize) // cmp %rcx,%rdx + { + return 0; // ja Llzvn_exit + } + + r10 = 56; // mov $0x38,%r10 + r12 = 65535; // mov $0xffff,%r12 + r10 &= compBufferPointer; // and %r8,%r10 + compBufferPointer >>= 8; // shr $0x8,%r8 + r10 >>= 3; // shr $0x3,%r10 + r12 &= compBufferPointer; // and %r8,%r12 + compBufferPointer >>= 16; // shr $0x10,%r8 + r10 += 3; // add $0x3,%r10 + + jmpTo = LZVN_10; // jmp Llzvn_l10 + break; + + case 4: _LZVN_DEBUG_DUMP("caseTable[4]\n"); + + compBuffer += 1; // add $0x1,%rdx + + if (compBuffer > compressedSize) // cmp %rcx,%rdx + { + return 0; // ja Llzvn_exit + } + + compBufferPointer = *(uint64_t *)compBuffer; // mov (%rdx),%r8 + caseTableIndex = (compBufferPointer & 255); // movzbq (%rdx),%r9 + + jmpTo = CASE_TABLE; // continue; + break; // jmpq *(%rbx,%r9,8) + + case 5: _LZVN_DEBUG_DUMP("caseTable[5]\n"); + + return 0; // Llzvn_table5; + + case 6: _LZVN_DEBUG_DUMP("caseTable[6]\n"); + + caseTableIndex >>= 3; // shr $0x3,%r9 + caseTableIndex &= 3; // and $0x3,%r9 + compBuffer = (compBuffer + caseTableIndex + 3); // lea 0x3(%rdx,%r9,1),%rdx + + if (compBuffer > compressedSize) // cmp %rcx,%rdx + { + return 0; // ja Llzvn_exit + } + + r10 = compBufferPointer; // mov %r8,%r10 + r10 &= 775; // and $0x307,%r10 + compBufferPointer >>= 10; // shr $0xa,%r8 + r12 = (r10 & 255); // movzbq %r10b,%r12 + r10 >>= 8; // shr $0x8,%r10 + r12 <<= 2; // shl $0x2,%r12 + r10 |= r12; // or %r12,%r10 + r12 = 16383; // mov $0x3fff,%r12 + r10 += 3; // add $0x3,%r10 + r12 &= compBufferPointer; // and %r8,%r12 + compBufferPointer >>= 14; // shr $0xe,%r8 + + jmpTo = LZVN_10; // jmp Llzvn_l10 + break; + + case 7: _LZVN_DEBUG_DUMP("caseTable[7]\n"); + + compBufferPointer >>= 8; // shr $0x8,%r8 + compBufferPointer &= 255; // and $0xff,%r8 + compBufferPointer += 16; // add $0x10,%r8 + compBuffer = (compBuffer + compBufferPointer + 2); // lea 0x2(%rdx,%r8,1),%rdx + + jmpTo = LZVN_0; // jmp Llzvn_l0 + break; + + case 8: _LZVN_DEBUG_DUMP("caseTable[8]\n"); + + compBufferPointer &= 15; // and $0xf,%r8 + compBuffer = (compBuffer + compBufferPointer + 1); // lea 0x1(%rdx,%r8,1),%rdx + + jmpTo = LZVN_0; // jmp Llzvn_l0 + break; + + case 9: _LZVN_DEBUG_DUMP("caseTable[9]\n"); + + compBuffer += 2; // add $0x2,%rdx + + if (compBuffer > compressedSize) // cmp %rcx,%rdx + { + return 0; // ja Llzvn_exit + } + + r10 = compBufferPointer; // mov %r8,%r10 + r10 >>= 8; // shr $0x8,%r10 + r10 &= 255; // and $0xff,%r10 + r10 += 16; // add $0x10,%r10 + + jmpTo = LZVN_11; // jmp Llzvn_l11 + break; + + case 10:_LZVN_DEBUG_DUMP("caseTable[10]\n"); + + compBuffer += 1; // add $0x1,%rdx + + if (compBuffer > compressedSize) // cmp %rcx,%rdx + { + return 0; // ja Llzvn_exit + } + + r10 = compBufferPointer; // mov %r8,%r10 + r10 &= 15; // and $0xf,%r10 + + jmpTo = LZVN_11; // jmp Llzvn_l11 + break; +#if DEBUG_STATE_ENABLED + default:printf("default() caseTableIndex[%d]\n", (uint8_t)caseTableIndex); +#endif + } // switch (caseTable[caseTableIndex]) + + break; + + case LZVN_0: /**********************************************************/ + + _LZVN_DEBUG_DUMP("jmpTable(0)\n"); + + if (compBuffer > compressedSize) // cmp %rcx,%rdx + { + return 0; // ja Llzvn_exit + } + + currentLength = (length + compBufferPointer); // lea (%rax,%r8,1),%r11 + compBufferPointer = -compBufferPointer; // neg %r8 + + if (currentLength > decompressedSize) // cmp %rsi,%r11 + { + jmpTo = LZVN_2; // ja Llzvn_l2 + break; + } + + currentLength = (decompBuffer + currentLength); // lea (%rdi,%r11,1),%r11 + + case LZVN_1: /**********************************************************/ + + do // Llzvn_l1: + { + _LZVN_DEBUG_DUMP("jmpTable(1)\n"); + +// address = (compBuffer + compBufferPointer); // mov (%rdx,%r8,1),%r9 +// caseTableIndex = *(uint64_t *)address; + caseTableIndex = *(uint64_t *)((uint64_t)compBuffer + compBufferPointer); + +// address = (currentLength + compBufferPointer); // mov %r9,(%r11,%r8,1) +// *(uint64_t *)address = caseTableIndex; + *(uint64_t *)((uint64_t)currentLength + compBufferPointer) = caseTableIndex; + + compBufferPointer += 8; // add $0x8,%r8 + + } while ((UINT64_MAX - (compBufferPointer - 8)) >= 8); // jae Llzvn_l1 + + length = currentLength; // mov %r11,%rax + length -= decompBuffer; // sub %rdi,%rax + + compBufferPointer = *(uint64_t *)compBuffer; // mov (%rdx),%r8 + caseTableIndex = (compBufferPointer & 255); // movzbq (%rdx),%r9 + + jmpTo = CASE_TABLE; + break; // jmpq *(%rbx,%r9,8) + + case LZVN_2: /**********************************************************/ + + _LZVN_DEBUG_DUMP("jmpTable(2)\n"); + + currentLength = (decompressedSize + 8); // lea 0x8(%rsi),%r11 + + case LZVN_3: /***********************************************************/ + + do // Llzvn_l3: + { + _LZVN_DEBUG_DUMP("jmpTable(3)\n"); + + address = (compBuffer + compBufferPointer); // movzbq (%rdx,%r8,1),%r9 + caseTableIndex = *((uint64_t *)address); + caseTableIndex &= 255; + + address = (decompBuffer + length); // mov %r9b,(%rdi,%rax,1) + byte_data = (unsigned char)caseTableIndex; + memcpy((void *)address, &byte_data, sizeof(byte_data)); + + length += 1; // add $0x1,%rax + + if (currentLength == length) // cmp %rax,%r11 + { + return length; // je Llzvn_exit2 + } + + compBufferPointer += 1; // add $0x1,%r8 + + } while ((int64_t)compBufferPointer != 0); // jne Llzvn_l3 + + compBufferPointer = *(uint64_t *)compBuffer; // mov (%rdx),%r8 + caseTableIndex = (compBufferPointer & 255); // movzbq (%rdx),%r9 + + jmpTo = CASE_TABLE; + break; // jmpq *(%rbx,%r9,8) + + case LZVN_4: /**********************************************************/ + + _LZVN_DEBUG_DUMP("jmpTable(4)\n"); + + currentLength = (decompressedSize + 8); // lea 0x8(%rsi),%r11 + + case LZVN_9: /**********************************************************/ + + do // Llzvn_l9: + { + _LZVN_DEBUG_DUMP("jmpTable(9)\n"); + + address = (decompBuffer + compBufferPointer); // movzbq (%rdi,%r8,1),%r9 + byte_data = *((unsigned char *)address); + caseTableIndex = byte_data; + caseTableIndex &= 255; + compBufferPointer += 1; // add $0x1,%r8 + + address = (decompBuffer + length); // mov %r9,(%rdi,%rax,1) + byte_data = (unsigned char)caseTableIndex; + memcpy((void *)address, &byte_data, sizeof(byte_data)); + + length += 1; // add $0x1,%rax + + if (length == currentLength) // cmp %rax,%r11 + { + return length; // je Llzvn_exit2 + } + + r10 -= 1; // sub $0x1,%r10 + + } while (r10); // jne Llzvn_l9 + + compBufferPointer = *(uint64_t *)compBuffer; // mov (%rdx),%r8 + caseTableIndex = (compBufferPointer & 255); // movzbq (%rdx),%r9 + + jmpTo = CASE_TABLE; + break; // jmpq *(%rbx,%r9,8) + + case LZVN_5: /**********************************************************/ + + do + { + _LZVN_DEBUG_DUMP("jmpTable(5)\n"); + + address = (decompBuffer + compBufferPointer); // mov (%rdi,%r8,1),%r9 + caseTableIndex = *((uint64_t *)address); + compBufferPointer += 8; // add $0x8,%r8 + + address = (decompBuffer + length); // mov %r9,(%rdi,%rax,1) + memcpy((void *)address, &caseTableIndex, sizeof(caseTableIndex)); + + length += 8; // add $0x8,%rax + r10 -= 8; // sub $0x8,%r10 + + } while ((r10 + 8) > 8); // ja Llzvn_l5 + + length += r10; // add %r10,%rax + compBufferPointer = *(uint64_t *)compBuffer; // mov (%rdx),%r8 + caseTableIndex = (compBufferPointer & 255); // movzbq (%rdx),%r9 + + jmpTo = CASE_TABLE; + break; // jmpq *(%rbx,%r9,8) + + case LZVN_10: /*********************************************************/ + + _LZVN_DEBUG_DUMP("jmpTable(10)\n"); + + currentLength = (length + caseTableIndex); // lea (%rax,%r9,1),%r11 + currentLength += r10; // add %r10,%r11 + + if (currentLength < decompressedSize) // cmp %rsi,%r11 (block_end: jae Llzvn_l8) + { + address = decompBuffer + length; // mov %r8,(%rdi,%rax,1) + memcpy((void *)address, &compBufferPointer, sizeof(compBufferPointer)); + + length += caseTableIndex; // add %r9,%rax + compBufferPointer = length; // mov %rax,%r8 + + if (compBufferPointer < r12) // jb Llzvn_exit + { + return 0; + } + + compBufferPointer -= r12; // sub %r12,%r8 + + if (r12 < 8) // cmp $0x8,%r12 + { + jmpTo = LZVN_4; // jb Llzvn_l4 + break; + } + + jmpTo = LZVN_5; // jmpq *(%rbx,%r9,8) + break; + } + + case LZVN_8: /**********************************************************/ + + _LZVN_DEBUG_DUMP("jmpTable(8)\n"); + + if (caseTableIndex == 0) // test %r9,%r9 + { + jmpTo = LZVN_7; // jmpq *(%rbx,%r9,8) + break; + } + + currentLength = (decompressedSize + 8); // lea 0x8(%rsi),%r11 + + case LZVN_6: /**********************************************************/ + + do + { + _LZVN_DEBUG_DUMP("jmpTable(6)\n"); + + address = (decompBuffer + length); // mov %r8b,(%rdi,%rax,1) + byte_data = (unsigned char)(compBufferPointer & 255); + memcpy((void *)address, &byte_data, sizeof(byte_data)); + length += 1; // add $0x1,%rax + + if (length == currentLength) // cmp %rax,%r11 + { + return length; // je Llzvn_exit2 + } + + compBufferPointer >>= 8; // shr $0x8,%r8 + caseTableIndex -= 1; // sub $0x1,%r9 + + } while (caseTableIndex != 1); // jne Llzvn_l6 + + case LZVN_7: /**********************************************************/ + + _LZVN_DEBUG_DUMP("jmpTable(7)\n"); + + compBufferPointer = length; // mov %rax,%r8 + compBufferPointer -= r12; // sub %r12,%r8 + + if (compBufferPointer < r12) // jb Llzvn_exit + { + return 0; + } + + jmpTo = LZVN_4; + break; // jmpq *(%rbx,%r9,8) + + case LZVN_11: /*********************************************************/ + + _LZVN_DEBUG_DUMP("jmpTable(11)\n"); + + compBufferPointer = length; // mov %rax,%r8 + compBufferPointer -= r12; // sub %r12,%r8 + currentLength = (length + r10); // lea (%rax,%r10,1),%r11 + + if (currentLength < decompressedSize) // cmp %rsi,%r11 + { + if (r12 >= 8) // cmp $0x8,%r12 + { + jmpTo = LZVN_5; // jae Llzvn_l5 + break; + } + } + + jmpTo = LZVN_4; // jmp Llzvn_l4 + break; + } // switch (jmpq) + + } while (1); + + return 0; +} diff --git a/i386/libsaio/asm.s b/i386/libsaio/asm.s index a6312cf..e8c312b 100755 --- a/i386/libsaio/asm.s +++ b/i386/libsaio/asm.s @@ -334,24 +334,27 @@ LABEL(_halt) call _bgetc jmp _halt -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks, Mountain Lion and Lion +#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks, Mountain Lion and Lion // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // disableIRQs() // -// Port of a two liner hack in xnu/pexpert/i386/pe_init.c -> PE_init_platform() +// Port of a two liner hack in xnu-1504.15.3/pexpert/i386/pe_init.c -> PE_init_platform() // -// Note: Thanks to cparm for locating it and copying it to Chameleons' boot.c +// Note: Thanks to 'cparm' for locating it and copying it to Chameleons' boot.c // LABEL(_disableIRQs) // The ACPI specification dictates that the 8259 (PC-AT compatible) vectors // must be disabled (that is, masked) when enabling the ACPI APIC operation // but this isn't done (apparently) on all mobo's and thus we do that here. + // + // Vectors 0-7 are used in 16-bit real mode, vectors 0-31 in protected mode/ + // long mode (vectors 32-255 are available for software defined interrupts). push %eax // Saving register data movb $0xff, %al // Load mask - outb %al, $0x21 // Disable IRQ's 0-7 on Master PIC - outb %al, $0xa1 // Disable IRQ's 8-15 on Slave PIC + outb %al, $0x21 // Disable IRQ's 0-7 on Master PIC (0x21) + outb %al, $0xa1 // Disable IRQ's 8-15 on Slave PIC (0xa1) popl %eax // Restore register data @@ -365,13 +368,13 @@ LABEL(_disableIRQs) // Passes boot arguments in %eax. // LABEL(_startMachKernel) -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks, Mountain Lion and Lion - call _disableIRQs // Taking care of a ACPI bug. +#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks, Lion and Mountain Lion + call _disableIRQs // Taking care of an early reboot bug. #endif push %ebp mov %esp, %ebp - mov 0xc(%ebp), %eax // bootargs to mach_kernel + mov 0xc(%ebp), %eax // bootargs to (mach_)kernel mov 0x8(%ebp), %ecx // entry offset mov $0x28, %ebx // segment push %ebx @@ -424,3 +427,29 @@ LABEL(__switch_stack) xorl %edi, %edi ret + +#if (MAKE_TARGET_OS == YOSEMITE) +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// computeRand() +// + +LABEL(_computeRand) + pushl %edx + mov $0xa, %edx + +Repeat: + rdrand %eax + jae Ok + jmp Exit + +Ok: + dec %edx + pause + jne Repeat + mov $0x0, %eax + +Exit: + popl %edx + + ret +#endif diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index 32f873e..500256c 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -28,19 +28,29 @@ * * Updates: * - * - STATIC_MODEL_NAME moved over from settings.h (PikerAlpha, October 2012). - * - STATIC_MODEL_NAME renamed to EFI_MODEL_NAME (PikerAlpha, October 2012). - * - Now no longer includes platform.h (PikerAlpha, October 2012). - * - Data selector moved over from RevoBoot/i386/config/data.h (PikerAlpha, October 2012). - * - Get static EFI data (optional) from /Extra/EFI/[MacModelNN].bin (PikerAlpha, October 2012). - * - STATIC_SYSTEM_SERIAL_NUMBER renamed to EFI_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). - * - Check return of malloc call (PikerAlpha, November 2012). - * - Sam's workaround for iMessage breakage added (PikerAlpha, January 2013). + * - STATIC_MODEL_NAME moved over from settings.h (Pike R. Alpha, October 2012). + * - STATIC_MODEL_NAME renamed to EFI_MODEL_NAME (Pike R. Alpha, October 2012). + * - Now no longer includes platform.h (Pike R. Alpha, October 2012). + * - Data selector moved over from RevoBoot/i386/config/data.h (Pike R. Alpha, October 2012). + * - Get static EFI data (optional) from /Extra/EFI/[MacModelNN].bin (Pike R. Alpha, October 2012). + * - STATIC_SYSTEM_SERIAL_NUMBER renamed to EFI_SYSTEM_SERIAL_NUMBER (Pike R. Alpha, October 2012). + * - Check return of malloc call (Pike R. Alpha, November 2012). + * - Sam's workaround for iMessage breakage added (Pike R. Alpha, January 2013). * */ #include "efi/fake_efi.h" +//============================================================================== + +EFI_UINT32 getCPUTick(void) +{ + uint32_t value = 0; + + __asm__ volatile("rdtsc" : "=A" (value)); + + return value; +} //============================================================================== // Called from RevoBoot/i386/libsaio/platform.c @@ -94,8 +104,27 @@ void initEFITree(void) // Satisfying X86PlatformPlugin.kext static EFI_UINT8 const STARTUP_POWER_EVENTS[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - DT__AddProperty(platformNode, "StartupPowerEvents", sizeof(STARTUP_POWER_EVENTS), (EFI_UINT8*) &STARTUP_POWER_EVENTS); + + /* + * IOPPF - IODeviceTree:/efi/platform/StartupPowerEvents: [value below] + * 0x01 = Shutdown cause was a PWROK event (Same as GEN_PMCON_2 bit 0) + * 0x02 = Shutdown cause was a SYS_PWROK event (Same as GEN_PMCON_2 bit 1) + * 0x04 = Shutdown cause was a THRMTRIP# event (Same as GEN_PMCON_2 bit 3) + * 0x08 = Rebooted due to a SYS_RESET# event (Same as GEN_PMCON_2 bit 4) + * 0x10 = Power Failure (Same as GEN_PMCON_3 bit 1 PWR_FLR) + * 0x20 = Loss of RTC Well Power (Same as GEN_PMCON_3 bit 2 RTC_PWR_STS) + * 0x40 = General Reset Status (Same as GEN_PMCON_3 bit 9 GEN_RST_STS) + * 0xffffff80 = SUS Well Power Loss (Same as GEN_PMCON_3 bit 14) + * 0x10000 = Wake cause was a ME Wake event (Same as PRSTS bit 0, ME_WAKE_STS) + * 0x20000 = Cold Reboot was ME Induced event (Same as PRSTS bit 1 ME_HRST_COLD_STS) = { 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00 }; + * 0x40000 = Warm Reboot was ME Induced event (Same as PRSTS bit 2 ME_HRST_WARM_STS) + * 0x80000 = Shutdown was ME Induced event (Same as PRSTS bit 3 ME_HOST_PWRDN) + * 0x100000 = Global reset ME Wachdog Timer event (Same as PRSTS bit 6) + * 0x200000 = Global reset PowerManagment Wachdog Timer event (Same as PRSTS bit 15) + */ + DT__AddProperty(platformNode, "StartupPowerEvents", sizeof(STARTUP_POWER_EVENTS), (EFI_UINT8*) &STARTUP_POWER_EVENTS); + DT__AddProperty(platformNode, "InitialTSC", sizeof(uint64_t), &gPlatform.CPU.TSCFrequency); DT__AddProperty(platformNode, "SystemSerialNumber", sizeof(SYSTEM_SERIAL_NUMBER), (EFI_CHAR16*) SYSTEM_SERIAL_NUMBER); if (gPlatform.CPU.FSBFrequency) @@ -105,7 +134,7 @@ void initEFITree(void) } Node * chosenNode = DT__AddChild(gPlatform.DT.RootNode, "chosen"); - + if (chosenNode == 0) { stop("Couldn't create /chosen node"); // Mimics boot.efi @@ -143,16 +172,13 @@ void initEFITree(void) }; DT__AddProperty(chosenNode, "boot-file-path", sizeof(BOOT_FILE_PATH), (EFI_UINT8*) &BOOT_FILE_PATH); - - static EFI_UINT8 const BOOT_ARGS[] = { 0x00 }; - - DT__AddProperty(chosenNode, "boot-args", sizeof(BOOT_ARGS), (EFI_UINT8*) &BOOT_ARGS); - + DT__AddProperty(chosenNode, "boot-args", sizeof(bootArgs->CommandLine), (EFI_UINT8*)bootArgs->CommandLine); + /* Adding kIOHibernateMachineSignatureKey (IOHibernatePrivate.h). * * This 'Hardware Signature' (offset 8 in the FACS table) is calculated by the BIOS on a best effort * basis to indicate the base hardware configuration of the system such that different base hardware - * configurations can have different hardware signature values. OSPM uses this information in waking + * configurations can have different hardware signature values. OSPM uses this information in waking * from an S4 state, by comparing the current hardware signature to the signature values saved in the * non-volatile sleep image. If the values are not the same, OSPM assumes that the saved non-volatile * image is from a different hardware configuration and cannot be restored. @@ -162,17 +188,87 @@ void initEFITree(void) DT__AddProperty(chosenNode, "machine-signature", sizeof(MACHINE_SIGNATURE), (EFI_UINT8*) &MACHINE_SIGNATURE); -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 1 set like Lion. +#if (MAKE_TARGET_OS == YOSEMITE) + UInt8 index = 0; + EFI_UINT16 PMTimerValue = 0; + uint64_t randomValue, tempValue, cpuTick; + EFI_UINT32 ecx, esi, edi = 0; + EFI_UINT32 rcx, rdx, rsi, rdi; + + randomValue = tempValue = ecx = esi = edi = 0; // xor %ecx, %ecx + rcx = rdx = rsi = rdi = cpuTick = 0; + + // LEAF_1 - Feature Information (Function 01h). + if (gPlatform.CPU.ID[LEAF_1][2] & 0x40000000) // Checking ecx:bit-30 + { + EFI_UINT32 seedBuffer[16] = {0}; + // + // Main loop to get 16 qwords (four bytes each). + // + for (index = 0; index < 16; index++) // 0x17e12: + { + randomValue = computeRand(); // callq 0x18e20 + cpuTick = getCPUTick(); // callq 0x121a7 + randomValue = (randomValue ^ cpuTick); // xor %rdi, %rax + seedBuffer[index] = randomValue; // mov %rax,(%r15,%rsi,8) + } // jb 0x17e12 + + DT__AddProperty(chosenNode, "random-seed", sizeof(seedBuffer), (EFI_UINT32*) &seedBuffer); + } + else + { + EFI_UINT8 seedBuffer[64] = {0}; + // + // Main loop to get the 64 bytes. + // + do // 0x17e55: + { + PMTimerValue = inw(0x408); // in (%dx), %ax + esi = PMTimerValue; // movzwl %ax, %esi + + if (esi < ecx) // cmp %ecx, %esi + { + continue; // jb 0x17e55 (retry) + } + + cpuTick = getCPUTick(); // callq 0x121a7 + rcx = (cpuTick >> 8); // mov %rax, %rcx + // shr $0x8, %rcx + rdx = (cpuTick >> 10); // mov %rax, %rdx + // shr $0x10, %rdx + rdi = rsi; // mov %rsi, %rdi + rdi = (rdi ^ cpuTick); // xor %rax, %rdi + rdi = (rdi ^ rcx); // xor %rcx, %rdi + rdi = (rdi ^ rdx); // xor %rdx, %rdi + + seedBuffer[index] = (rdi & 0xff); // mov %dil, (%r15,%r12,1) + + edi = (edi & 0x2f); // and $0x2f, %edi + edi = (edi + esi); // add %esi, %edi + index++; // inc r12 + ecx = (edi & 0xffff); // movzwl %di, %ecx + + } while (index < 64); // cmp %r14d, %r12d + // jne 0x17e55 (next) + + DT__AddProperty(chosenNode, "random-seed", sizeof(seedBuffer), (EFI_UINT8*) &seedBuffer); + } +#endif + +#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. // Used by boot.efi - cosmetic only node/properties on hacks. Node * kernelCompatNode = DT__AddChild(efiNode, "kernel-compatibility"); static EFI_UINT8 const COMPAT_MODE[] = { 0x01, 0x00, 0x00, 0x00 }; - DT__AddProperty(kernelCompatNode, "i386", sizeof(COMPAT_MODE), (EFI_UINT8*) &COMPAT_MODE); - DT__AddProperty(kernelCompatNode, "x86_64", sizeof(COMPAT_MODE), (EFI_UINT8*) &COMPAT_MODE); + #if ((MAKE_TARGET_OS == MAVERICKS) || (MAKE_TARGET_OS == YOSEMITE)) + DT__AddProperty(kernelCompatNode, "x86_64", sizeof(COMPAT_MODE), (EFI_UINT8*) &COMPAT_MODE); + #else + DT__AddProperty(kernelCompatNode, "i386", sizeof(COMPAT_MODE), (EFI_UINT8*) &COMPAT_MODE); + DT__AddProperty(kernelCompatNode, "x86_64", sizeof(COMPAT_MODE), (EFI_UINT8*) &COMPAT_MODE); + #endif #endif - // Adding the options node breaks AppleEFINVRAM (missing hardware UUID). // Node *optionsNode = DT__AddChild(gPlatform.DT.RootNode, "options"); // DT__AddProperty(optionsNode, "EFICapsuleResult", 4, "STAR"); // 53 54 41 52 @@ -308,15 +404,17 @@ bool initMultiProcessorTableAdress(void) void finalizeEFITree(EFI_UINT32 kernelAdler32) { - _EFI_DEBUG_DUMP("done).Calling setupEFITables("); + _EFI_DEBUG_DUMP("Calling setupEFITables()\n"); setupEFITables(); - + + _EFI_DEBUG_DUMP("Add property: boot-kernelcache-adler32 = %d\n", kernelAdler32); DT__AddProperty(gPlatform.EFI.Nodes.Chosen, "boot-kernelcache-adler32", sizeof(EFI_UINT32), (EFI_UINT32*)kernelAdler32); + _EFI_DEBUG_DUMP("Calling setupSMBIOS()\n"); setupSMBIOS(); - _EFI_DEBUG_DUMP("done).\nAdding EFI configuration table for SMBIOS("); + _EFI_DEBUG_DUMP("Adding EFI configuration table for SMBIOS("); addConfigurationTable(&gPlatform.SMBIOS.Guid, &gPlatform.SMBIOS.BaseAddress, NULL); @@ -329,13 +427,12 @@ void finalizeEFITree(EFI_UINT32 kernelAdler32) // gPlatform.UUID is set in: RevoBoot/i386/libsaio/SMBIOS/[dynamic/static]_data.h DT__AddProperty(gPlatform.EFI.Nodes.Platform, "system-id", 16, (EFI_CHAR8 *)gPlatform.UUID); #endif - + // // Start of experimental code // - Node *revoEFINode = DT__AddChild(gPlatform.DT.RootNode, "RevoEFI"); - + #ifdef STATIC_NVRAM_ROM static EFI_UINT8 const NVRAM_ROM_DATA[] = STATIC_NVRAM_ROM; #else From d953fbd3fc1686b8ad19989d335b5dfb6a75a001 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 12 Oct 2014 17:30:21 +0200 Subject: [PATCH 478/623] June 2014 Yosemite update --- CHANGES | 129 +- Makefile | 66 +- README | 45 +- VERSION | 2 +- i386/boot2/Makefile | 12 +- i386/boot2/boot.c | 146 +- i386/boot2/boot.h | 10 +- i386/boot2/bootlogo.c | 240 ++- i386/boot2/bootlogo.h | 37 +- i386/boot2/drivers.c | 145 +- i386/boot2/graphics.c | 79 +- i386/boot2/picopng.c | 1796 ++++++++++++++++++++ i386/boot2/picopng.h | 33 + i386/libsa/memory.h | 2 +- i386/libsa/zalloc.c | 15 +- i386/libsaio/Makefile | 2 + i386/libsaio/acpi.c | 2 +- i386/libsaio/acpi/essentials.h | 4 + i386/libsaio/acpi/patcher.h | 2 +- i386/libsaio/allocate.c | 38 +- i386/libsaio/bootstruct.c | 48 +- i386/libsaio/bootstruct.h | 41 +- i386/libsaio/cpu.c | 6 +- i386/libsaio/cpu/Intel/dynamic_data.h | 18 +- i386/libsaio/cpu/essentials.h | 2 +- i386/libsaio/device_tree.c | 13 +- i386/libsaio/device_tree.h | 1 - i386/libsaio/efi/efi.h | 2 +- i386/libsaio/efi/fake_efi.h | 9 +- i386/libsaio/load.c | 177 +- i386/libsaio/platform.c | 18 +- i386/libsaio/platform.h | 13 +- i386/libsaio/saio_internal.h | 3 +- i386/libsaio/smbios/dynamic_data.h | 2 +- i386/libsaio/smbios/getters.h | 4 +- i386/libsaio/smbios/model_data.h | 29 +- i386/libsaio/smbios/tools/smbios2struct3.c | 10 +- i386/libsaio/sys.c | 8 +- 38 files changed, 2855 insertions(+), 354 deletions(-) create mode 100644 i386/boot2/picopng.c create mode 100644 i386/boot2/picopng.h diff --git a/CHANGES b/CHANGES index ed274d1..c08c6d5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,71 +1,76 @@ -RevoBoot v1.5.50 (Next Major Release) +RevoBoot v2.0.00 ================ -- Improved CPU detection (with new/additional CPU's). -- Improved P-State generation (less settings). +- Support for OS X 10.10 aka Yosemite added (Pike R. Alpha, June 2013). +- VERSION updated to v2.0.00 +- LZVN decompression added for Yosemite. +- IODeviceTree:/chosen/random-seed added for Yosemite. +- kernel and kernelcache path updated for Yosemite. +- boot2/picopng.c and boot2/picopng.c added (removed in v2.0.10). +- bootstruct.c and bootstruct.h updated for Yosemite. RevoBoot v1.5.40 ================ -- Support for OS X 10.9 aka Mavericks added (Piker, June 2013). +- Support for OS X 10.9 aka Mavericks added (Pike R. Alpha, June 2013). - VERSION updated to v1.5.40 RevoBoot v1.5.39 ================ -- Fixed boot failure for InstallESD/BaseSystem.dmg/patched kernelcache (Piker, April 2013). -- LION_INSTALL_SUPPORT renamed to INSTALL_ESD_SUPPORT (Piker, April 2013). -- Stripped (unnecessary) argument from loadSystemConfig (Pike, April 2013). -- Renamed function loadSystemConfig to loadCABootPlist (Pike, April 2013). -- Simplified search for and read of com.apple.Boot.plist (Pike, April 2013). +- Fixed boot failure for InstallESD/BaseSystem.dmg/patched kernelcache (Pike R. Alpha, April 2013). +- LION_INSTALL_SUPPORT renamed to INSTALL_ESD_SUPPORT (Pike R. Alpha, April 2013). +- Stripped (unnecessary) argument from loadSystemConfig (Pike R. Alpha, April 2013). +- Renamed function loadSystemConfig to loadCABootPlist (Pike R. Alpha, April 2013). +- Simplified search for and read of com.apple.Boot.plist (Pike R. Alpha, April 2013). - Board ID's for iMac12,n fixed (Jeroen, April 2013). -- Settings template updated (Pike, April 2013). +- Settings template updated (Pike R. Alpha, April 2013). - VERSION updated to v1.5.39 RevoBoot v1.5.38 ================ -- RevoBoot/i386/libsaio/efi.c modified to workaround iMessage login/registration problems (PikerAlpha, January 2013). -- getBoardType in RevoBoot/i386/libsaio/SMBIOS/getters.h now always returns a board type (PikerAlpha, January 2013). -- STATIC_NVRAM_ROM/STATIC_NVRAM_MLB added (used in efi.c) to settings-template.h (PikerAlpha, January 2013). +- RevoBoot/i386/libsaio/efi.c modified to workaround iMessage login/registration problems (Pike R. Alpha, January 2013). +- getBoardType in RevoBoot/i386/libsaio/SMBIOS/getters.h now always returns a board type (Pike R. Alpha, January 2013). +- STATIC_NVRAM_ROM/STATIC_NVRAM_MLB added (used in efi.c) to settings-template.h (Pike R. Alpha, January 2013). - VERSION updated to v1.5.38 RevoBoot v1.5.37 ================ -- DISK_TARGET_SUPPORT in settings-template.h renamed to STARTUP_DISK_SUPPORT (PikerAlpha, November 2012). -- Restored copyright of efi_tables.c to original developer (PikerAlpha, November 2012). -- Renamed RevoBoot/i386/libsa/efi_tables.c to crc32.c (PikerAlpha, November 2012). -- Moved GUID function from efi_tables.c to RevoBoot/i386/libsaio/guid.c (PikerAlpha, November 2012). -- Fixed some minor C99 issues / restoring gcc compatibility (PikerAlpha, November 2012). +- DISK_TARGET_SUPPORT in settings-template.h renamed to STARTUP_DISK_SUPPORT (Pike R. Alpha, November 2012). +- Restored copyright of efi_tables.c to original developer (Pike R. Alpha, November 2012). +- Renamed RevoBoot/i386/libsa/efi_tables.c to crc32.c (Pike R. Alpha, November 2012). +- Moved GUID function from efi_tables.c to RevoBoot/i386/libsaio/guid.c (Pike R. Alpha, November 2012). +- Fixed some minor C99 issues / restoring gcc compatibility (Pike R. Alpha, November 2012). - Cleanups and other minor improvements. - VERSION updated to v1.5.37 RevoBoot v1.5.36 ================ -- Now reading efi-boot-device-data from /Extra/NVRAM/nvramStorage.plist to select the Startup Disk (PikerAlpha, November 2012). -- New DISK_TARGET_SUPPORT setting in settings-template.h (PikerAlpha, November 2012). -- New file RevoBoot/i386/libsaio/base64.c (written by Sam) added (PikerAlpha, November 2012). -- Support for data fields added (PikerAlpha, November 2012). -- Copied macro's from EDK2's EfiDevicePath.h to RevoBoot/i386/libsaio/efi/essentials.h (PikerAlpha, November 2012). -- Port of EDK2's function (getGUIDFromDevicePath written by Sam) added (PikerAlpha, November 2012). -- Function loadSystemConfig now calls new function loadConfigFile (PikerAlpha, November 2012). +- Now reading efi-boot-device-data from /Extra/NVRAM/nvramStorage.plist to select the Startup Disk (Pike R. Alpha, November 2012). +- New DISK_TARGET_SUPPORT setting in settings-template.h (Pike R. Alpha, November 2012). +- New file RevoBoot/i386/libsaio/base64.c (written by Sam) added (Pike R. Alpha, November 2012). +- Support for data fields added (Pike R. Alpha, November 2012). +- Copied macro's from EDK2's EfiDevicePath.h to RevoBoot/i386/libsaio/efi/essentials.h (Pike R. Alpha, November 2012). +- Port of EDK2's function (getGUIDFromDevicePath written by Sam) added (Pike R. Alpha, November 2012). +- Function loadSystemConfig now calls new function loadConfigFile (Pike R. Alpha, November 2012). - Cleanups and other minor improvements. - VERSION updated to v1.5.36 RevoBoot v1.5.35 ================ -- SMBIOS related enhancements for RevoBoot v1.5.35 (PikerAlpha, November 2012). +- SMBIOS related enhancements for RevoBoot v1.5.35 (Pike R. Alpha, November 2012). - VERSION updated to v1.5.35 RevoBoot v1.5.34 ================ -- LOAD_STATIC_EFI_DATA_FROM_EXTRA in settings-template.h renamed to LOAD_MODEL_SPECIFIC_EFI_DATA (PikerAlpha, October 2012). -- LOAD_STATIC_SMBIOS_DATA_FROM_EXTRA in settings-template.h renamed to LOAD_MODEL_SPECIFIC_SMBIOS_DATA (PikerAlpha, October 2012). -- New LOAD_MODEL_SPECIFIC_ACPI_DATA setting in settings-template.h (PikerAlpha, October 2012). -- New LOAD_MODEL_SPECIFIC_STATIC_DATA setting in settings-template.h (PikerAlpha, October 2012). +- LOAD_STATIC_EFI_DATA_FROM_EXTRA in settings-template.h renamed to LOAD_MODEL_SPECIFIC_EFI_DATA (Pike R. Alpha, October 2012). +- LOAD_STATIC_SMBIOS_DATA_FROM_EXTRA in settings-template.h renamed to LOAD_MODEL_SPECIFIC_SMBIOS_DATA (Pike R. Alpha, October 2012). +- New LOAD_MODEL_SPECIFIC_ACPI_DATA setting in settings-template.h (Pike R. Alpha, October 2012). +- New LOAD_MODEL_SPECIFIC_STATIC_DATA setting in settings-template.h (Pike R. Alpha, October 2012). - VERSION updated to v1.5.34 Notes: @@ -77,77 +82,77 @@ You <i>must</i> use the latest version of RevoBoot/i386/config/settings-template RevoBoot v1.5.33 ================ -- Restored lost lines in RevoBoot/i386/libsaio/SMBIOS/static_data.h (PikerAlpha, November 2012). +- Restored lost lines in RevoBoot/i386/libsaio/SMBIOS/static_data.h (Pike R. Alpha, November 2012). - VERSION updated to v1.5.33 RevoBoot v1.5.32 ================ -- Optionally include Recovery HD support code in boot.c (PikerAlpha, October 2012). -- Renamed LION_RECOVERY_SUPPORT to CORE_STARAGE_SUPPORT in disk.c (PikerAlpha, October 2012). -- Renamed LION_FILEVAULT_SUPPORT to CORE_STARAGE_SUPPORT in disk.c (PikerAlpha, November 2012). -- Renamed encryptedBootPartition to coreStoragePartition in disk.c (PikerAlpha, October 2012). -- Cleaned up settings-template.h (PikerAlpha, October 2012). +- Optionally include Recovery HD support code in boot.c (Pike R. Alpha, October 2012). +- Renamed LION_RECOVERY_SUPPORT to CORE_STARAGE_SUPPORT in disk.c (Pike R. Alpha, October 2012). +- Renamed LION_FILEVAULT_SUPPORT to CORE_STARAGE_SUPPORT in disk.c (Pike R. Alpha, November 2012). +- Renamed encryptedBootPartition to coreStoragePartition in disk.c (Pike R. Alpha, October 2012). +- Cleaned up settings-template.h (Pike R. Alpha, October 2012). - VERSION updated to v1.5.32 RevoBoot v1.5.31 ================ -- STATIC_SYSTEM_SERIAL_NUMBER renamed to EFI_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). -- Restored lost STATIC_SMSERIALNUMBER in setings-template.h (PikerAlpha, October 2012). -- STATIC_SMSERIALNUMBER renamed to SMB_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). +- STATIC_SYSTEM_SERIAL_NUMBER renamed to EFI_SYSTEM_SERIAL_NUMBER (Pike R. Alpha, October 2012). +- Restored lost STATIC_SMSERIALNUMBER in setings-template.h (Pike R. Alpha, October 2012). +- STATIC_SMSERIALNUMBER renamed to SMB_SYSTEM_SERIAL_NUMBER (Pike R. Alpha, October 2012). - VERSION updated to v1.5.31 RevoBoot v1.5.30 ================ -- Move/update /Extra/ data reading to RevoBoot/i386/libsaio/load.c (PikerAlpha, October 2012). -- Option to read /Extra/EFI/[MacModelNN.bin] when static EFI data is used (PikerAlpha, October 2012). -- Option to read /Extra/SMBIOS/[MacModelNN.bin] when static SMBIOS data is used (PikerAlpha, October 2012). -- Makefile changes for above features(PikerAlpha, October 2012). +- Move/update /Extra/ data reading to RevoBoot/i386/libsaio/load.c (Pike R. Alpha, October 2012). +- Option to read /Extra/EFI/[MacModelNN.bin] when static EFI data is used (Pike R. Alpha, October 2012). +- Option to read /Extra/SMBIOS/[MacModelNN.bin] when static SMBIOS data is used (Pike R. Alpha, October 2012). +- Makefile changes for above features(Pike R. Alpha, October 2012). - VERSION updated to v1.5.30 RevoBoot v1.5.25 ================ -- RevoBoot/i386/config/data.h is no longer included with (PikerAlpha, October 2012). -- New static data paths in RevoBoot/i386/libsaio/Makefile (PikerAlpha, October 2012). -- Use model identifier as filename for static data (PikerAlpha, October 2012). +- RevoBoot/i386/config/data.h is no longer included with (Pike R. Alpha, October 2012). +- New static data paths in RevoBoot/i386/libsaio/Makefile (Pike R. Alpha, October 2012). +- Use model identifier as filename for static data (Pike R. Alpha, October 2012). - VERSION updated to v1.5.25 RevoBoot v1.5.23 ================ -- Bug fix and cleanups in RevoBoot/i386/libsaio/SMBIOS/dynamic_data.h (PikerAlpha, October 2012). +- Bug fix and cleanups in RevoBoot/i386/libsaio/SMBIOS/dynamic_data.h (Pike R. Alpha, October 2012). - VERSION updated to v1.5.23 RevoBoot v1.5.22 ================ -- Bug fix in RevoBoot/Makefile (PikerAlpha, October 2012). +- Bug fix in RevoBoot/Makefile (Pike R. Alpha, October 2012). - VERSION updated to v1.5.22 RevoBoot v1.5.21 ================ -- Model data for new Macmini6,N added (PikerAlpha, October 2012). +- Model data for new Macmini6,N added (Pike R. Alpha, October 2012). - VERSION updated to v1.5.21 RevoBoot v1.5.20 ================ -- Automatic data selection for ACPI/EFI and SMBIOS data (PikerAlpha, October 2012) -- Copies ACPI/EFI/SMBIOS/data-template.h to [your model.h] for new configurations (PikerAlpha, October 2012) +- Automatic data selection for ACPI/EFI and SMBIOS data (Pike R. Alpha, October 2012) +- Copies ACPI/EFI/SMBIOS/data-template.h to [your model.h] for new configurations (Pike R. Alpha, October 2012) RevoBoot v1.5.10 ================ -- Makefiles cleaned up/optimized (PikerAlpha, October 2012). -- make now defaults to Mountain Lion (PikerAlpha, October 2012). -- MODEL=[your model] argument added to makefiles (PikerAlpha, October 2012). -- MODEL=$1 added to RevoBoot/r for optional model identifier (PikerAlpha, October 2012). -- make now creates RevoBoot/i386/config/SETTINGS when missing (PikerAlpha, October 2012). -- Makefile now copies settings-template.h to SETTINGS/[your model.h] when missing (PikerAlpha, October 2012). +- Makefiles cleaned up/optimized (Pike R. Alpha, October 2012). +- make now defaults to Mountain Lion (Pike R. Alpha, October 2012). +- MODEL=[your model] argument added to makefiles (Pike R. Alpha, October 2012). +- MODEL=$1 added to RevoBoot/r for optional model identifier (Pike R. Alpha, October 2012). +- make now creates RevoBoot/i386/config/SETTINGS when missing (Pike R. Alpha, October 2012). +- Makefile now copies settings-template.h to SETTINGS/[your model.h] when missing (Pike R. Alpha, October 2012). RevoBoot v1.5.01 @@ -157,16 +162,16 @@ RevoBoot v1.5.01 RevoBoot v1.5.00 ================ -- RevoBoot project forked (PikerAlpha, October 2012). +- RevoBoot project forked (Pike R. Alpha, October 2012). - - Time to say goodbye to some of the legacy code. Something I will do with the help of Sam's notes, - but not everything is written in stone. Unfortenately. Meaning that I will have to experiment and - improvise. Hopefully achieving the same goals that she had in mind for you. - -- Support for self compiled libcc_kext.a (Xcode 4.5.1 compatibility) added (PikerAlpha, October 2012). -- SMBIOS legacy code removed (PikerAlpha, October 2012). -- EFI/SMBIOS data logic moved to preprocessor code (PikerAlpha, October 2012). -- RevoBoot/i386/config/settings.h stripped for simplicity (PikerAlpha, October 2012). +- Support for self compiled libcc_kext.a (Xcode 4.5.1 compatibility) added (Pike R. Alpha, October 2012). +- SMBIOS legacy code removed (Pike R. Alpha, October 2012). +- EFI/SMBIOS data logic moved to preprocessor code (Pike R. Alpha, October 2012). +- RevoBoot/i386/config/settings.h stripped for simplicity (Pike R. Alpha, October 2012). - - Note: If there is anything that doesn't work for you... let me know and I will look at it. - diff --git a/Makefile b/Makefile index 0c59c1f..c0b0927 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,8 @@ # - Output added for cp/mkdir/rm actions (PikerAlpha, November 2012). # - New build target 'help' added (PikerAlpha, November 2012). # - Cleanups and output changed (PikerAlpha, November 2012). +# - Yosemite support added (PikerAlpha, June 2014). +# - Changed default from Mavericks to Yosemite (PikerAlpha, June 2014). # # @@ -50,33 +52,40 @@ VPATH = $(OBJROOT):$(SYMROOT) ifeq ($(MAKECMDGOALS),) # - # No OS build target given. Build for Mavericks (default). + # No OS build target given. Build for Yosemite (default). # - MAKE_TARGET_OS = 10; - MAKEGOAL = mavericks + MAKEGOAL = yosemite + MAKE_TARGET_OS = 26; + MAKE_TARGET_OS_VER = 10.10 else # # Setting MAKE_TARGET_OS and MAKEGOAL based on OS build target. # - ifeq ($(MAKECMDGOALS), mountain-lion) - MAKE_TARGET_OS = 6; + ifeq ($(MAKECMDGOALS), yosemite) + MAKEGOAL = yosemite + MAKE_TARGET_OS = 26; + MAKE_TARGET_OS_VER = 10.10 + else ifeq ($(MAKECMDGOALS), mavericks) + MAKEGOAL = mavericks + MAKE_TARGET_OS = 10; + MAKE_TARGET_OS_VER = 10.9 + else ifeq ($(MAKECMDGOALS), mountain-lion) MAKEGOAL = mountain-lion - else - ifeq ($(MAKECMDGOALS), mavericks) - MAKE_TARGET_OS = 10; - MAKEGOAL = mavericks - else ifeq ($(MAKECMDGOALS), lion) - MAKE_TARGET_OS = 2; - MAKEGOAL = lion - else ifeq ($(MAKECMDGOALS), legacy) - MAKE_TARGET_OS = 1; - MAKEGOAL = legacy - endif + MAKE_TARGET_OS = 6; + MAKE_TARGET_OS_VER = 10.8 + else ifeq ($(MAKECMDGOALS), lion) + MAKEGOAL = lion + MAKE_TARGET_OS = 2; + MAKE_TARGET_OS_VER = 10.7 + else ifeq ($(MAKECMDGOALS), legacy) + MAKEGOAL = legacy + MAKE_TARGET_OS = 1; + MAKE_TARGET_OS_VER = 10.6 endif endif # -# Export our make goal i.e. mavericks, mountain-lion, lion or legacy (snow-leopard or leopard). +# Export our make goal i.e. yosemite, mavericks, mountain-lion, lion or legacy (snow-leopard or leopard). # export MAKEGOAL @@ -87,6 +96,12 @@ export MAKEGOAL export PRODUCT_OS_TARGET = `echo $(MAKE_TARGET_OS)` +# +# Export target OS version (picked up by: i386/libsaio/Makefile) for platform.c +# + +export PRODUCT_OS_TARGET_VERSION = `echo \"$(MAKE_TARGET_OS_VER)\"` + # # Check if a target model was specified (example: make MODEL=16 mountain-lion). # @@ -139,6 +154,23 @@ SETTINGS_DIR=$(CONFIG_DIR)/SETTINGS SETTINGS_FILE=$(SETTINGS_DIR)/$(MAKE_TARGET_MODEL).h $(MAKEGOAL): +# +# autoclean +# + @if [ -d "$(OBJROOT)" ]; then \ + echo "\t[RMDIR] $(OBJROOT)" > /dev/null; \ + fi; + + @if [ -d "$(SYMROOT)" ]; then \ + echo "\t[RMDIR] $(SYMROOT)" > /dev/null; \ + fi; + + @rm -rf sym obj dst out.log +# +# normal make goal +# + @printf "Compiling RevoBoot, setup for a $(MODEL) running OS X $(MAKE_TARGET_OS_VER) ($@)\n\n" >&2; + @if [ ! -f $(CONFIG_DIR)/$(MAKE_ACPI_DATA_FILE) ]; then \ echo "\t[CP] $(CONFIG_DIR)/ACPI/data-template.h $(CONFIG_DIR)/$(MAKE_ACPI_DATA_FILE)"; \ cp -n $(CONFIG_DIR)/ACPI/data-template.h $(CONFIG_DIR)/$(MAKE_ACPI_DATA_FILE); \ diff --git a/README b/README index 251f26a..106ac27 100644 --- a/README +++ b/README @@ -1,36 +1,37 @@ -About this project: -------------------- -This Open Source hobby project is maintained by Pike (http://pikeralpha.wordpress.com). A long time supporter of the RevoBoot project. +- About this project -Note that we do not tolerate/share any (links to) copyrighted material. We only use purchased software and we won't share any of it. Just get your copy of OS X in the Apple store. Should be affordable for everyone. +This Open Source hobby project was first started by Master Chief, then taken over by RevoGitl (Samantha) and is now maintained by Pike R. Alpha (http://pikeralpha.wordpress.com). A long time supporter of the RevoBoot project. + + +- Server.app + +RevoBoot works with the Server app for Mountain Lion (12C60) and Mavericks. + + +- Fusion Drive Support -Mountain Lion Server: ---------------------- -RevoBoot has been confirmed to work with the Server app for Mountain Lion and Mavaricks. -Fusion Drive Support: ---------------------- Apple's Fusion Drive* is a software implementation to speedup the boot and load process for frequently used applications, without limiting the storage capacity in a bad way. See also: http://support.apple.com/kb/HT5446 -The new Mac's that come with a Fusion Drive boot from the third (Recovery HD like) partition on the SSD. This partition is 134.2 MB in size and is called "Boot OS X". -The Recovery HD partition can be found as third partition on the HDD. Setting up a Fusion Drive on a Mac need to be done with Internet Recovery. +The new Mac's that come with a Fusion Drive, boot from the third (Recovery HD like) partition on the SSD. This partition is 134.2 MB in size and is called "Boot OS X". The Recovery HD partition can be found as third partition on the HDD. RevoBoot detects CoreStorage partitions and will boot from the boot helper partition on the SDD. -RevoBoot detects CoreStorage partitions and will boot from the boot helper partition on the SDD. -NetBoot/NetInstall: -------------------- +- NetBoot/NetInstall + People who have Mountain Lion Server setup and like to install their hack from it... sorry that won't work. The source -code snippets for it have been stripped out (by Master Chief in 2009) but we might fix this in future update of RevoBoot. +code snippets for it have been stripped out (by Master Chief in 2009). + + +- Xcode Support for Mountain Lion, Mavericks and Yosemite + +RevoBoot can be built on Snow Leopard, Lion and Mountain Lion. The latter requires Xcode 4.5.1 (and greater) and the latest 'command line tools' need to be installed. See change log for instructions. + -Xcode Support for Mountain Lion: --------------------------------- -RevoBoot can be built on Snow Leopard, Lion, Mountain Lion (requires Xcode 4.5.1 or greater) and Mavericks, and the latest 'command line tools' need to be installed. See change log for instructions. +- Configuration -Configuration: --------------- Please note that RevoBoot must be configured for your hardware so start reading our WiKi. See also: -https://github.com/blackosx/RevoBuilder/wiki/Using-RevoBuilder – sorry folks, no longer available! +https://github.com/blackosx/RevoBuilder/wiki/Using-RevoBuilder We also have a configuration README available at: @@ -38,6 +39,6 @@ https://github.com/RevoGirl/RevoBoot/blob/master/i386/config/README There's also RevoBuilder (a great tool for first starters) over at: -https://github.com/blackosx/RevoBuilder/wiki/Using-RevoBuilder – sorry folks, no longer available! +https://github.com/blackosx/RevoBuilder/wiki/Using-RevoBuilder Note: RevoBuilder is most likeky broken for RevoBoot v.1.5.00 and greater! diff --git a/VERSION b/VERSION index adecc24..f08cf98 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.40 +2.0.00 diff --git a/i386/boot2/Makefile b/i386/boot2/Makefile index 765fb6e..fbc3645 100644 --- a/i386/boot2/Makefile +++ b/i386/boot2/Makefile @@ -35,9 +35,15 @@ VPATH = $(OBJROOT):$(SYMROOT) # # The order of object filenames below is important; -# - -OBJS = boot2.o boot.o bootlogo.o graphics.o drivers.o options.o lzss.o +# +OBJS = boot2.o boot.o bootlogo.o graphics.o drivers.o options.o lzss.o lzvn.o + +ifeq ($(MAKECMDGOALS), yosemite) +# OBJS = boot2.o boot.o bootlogo.o graphics.o picopng.o drivers.o options.o lzss.o +OBJS+=picopng.o +#else +# OBJS = boot2.o boot.o bootlogo.o graphics.o drivers.o options.o lzss.o +endif DIRS_NEEDED = $(OBJROOT) $(SYMROOT) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index c771e6b..7fa4727 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -53,7 +53,6 @@ * */ - #include "boot.h" #include "bootstruct.h" #include "sl.h" @@ -168,6 +167,7 @@ void boot(int biosdev) bool haveCABootPlist = false; bool quietBootMode = true; + bool bootRecoveryHD = false; void *fileLoadBuffer = (void *)kLoadAddr; @@ -186,40 +186,55 @@ void boot(int biosdev) #if PRE_LINKED_KERNEL_SUPPORT bool mayUseKernelCache = false; + bool flushCaches = false; long flags, cachetime; #endif -#if RECOVERY_HD_SUPPORT - /* extern void setVideoMode(int mode); - setVideoMode(0); // Switch to VGA_TEXT_MODE - printf("RecoveryHD boot support enabled\n"); +#if DEBUG_STATE_ENABLED + extern void setVideoMode(int mode); + setVideoMode(VGA_TEXT_MODE); +#endif - bool bootRecoveryHD = false; +#if RECOVERY_HD_SUPPORT + #if DEBUG_BOOT + printf("RecoveryHD boot support enabled\n"); + #endif while (readKeyboardStatus()) { int key = (bgetc() & 0xff); - printf("key: %d\n", key); + #if DEBUG_BOOT + printf("key: %d\n", key); + #endif if ((key |= 0x20) == 'r') { bootRecoveryHD = true; - printf("RecoveryHD boot support is active\n"); + #if DEBUG_BOOT + printf("RecoveryHD boot support is active\n"); + #endif } } - - printf("bootRecoveryHD: %s\n", bootRecoveryHD ? "True" : "False"); */ +#if DEBUG_BOOT + printf("bootRecoveryHD: %s\n", bootRecoveryHD ? "True" : "False"); +#endif initPlatform(biosdev, true); #else initPlatform(biosdev, false); #endif -#if DEBUG_STATE_ENABLED - // Don't switch graphics mode / show boot logo when DEBUG is set to 1. - printf("\ngArchCPUType (CPU): %s\n", (gArchCPUType == CPU_TYPE_X86_64) ? "x86_64" : "i386"); - sleep(3); // Silent sleep. +#if DEBUG_BOOT + /* + * In DEBUG mode we don't switch to graphics mode and do not show the Apple boot logo. + */ + printf("\nModel: %s\n", gPlatform.ModelID); + + #if ((MAKE_TARGET_OS & LION) != LION) + printf("\ngArchCPUType (CPU): %s\n", (gArchCPUType == CPU_TYPE_X86_64) ? "x86_64" : "i386"); + sleep(3); // Silent sleep. + #endif #else - showBootLogo(); + showBootLogo(bootRecoveryHD); #endif #if (LOAD_MODEL_SPECIFIC_EFI_DATA == 0) @@ -302,20 +317,28 @@ void boot(int biosdev) gVerboseMode = getValueForBootKey(kernelFlags, kVerboseModeFlag, &val, &length) || getValueForBootKey(kernelFlags, kSingleUserModeFlag, &val, &length); - if (gVerboseMode) + /* if (gVerboseMode) { #if (DEBUG_BOOT == false) setVideoMode(VGA_TEXT_MODE); #endif - } + } */ - // Check for -x (safe) and -f (flush cache) flags. - if (getValueForBootKey(kernelFlags, kSafeModeFlag, &val, &length) || - getValueForBootKey(kernelFlags, kIgnoreCachesFlag, &val, &length)) + // Check for -x (safe) flag. + if (getValueForBootKey(kernelFlags, kSafeModeFlag, &val, &length)) { gBootMode = kBootModeSafe; } + // Check for -f (flush cache) flag. + if (getValueForBootKey(kernelFlags, kIgnoreCachesFlag, &val, &length)) + { + _BOOT_DEBUG_DUMP("Notice: -f (flush cache) specified!\n"); +#if PRE_LINKED_KERNEL_SUPPORT + flushCaches = true; +#endif + } + // Is rootUUID still empty and 'boot-uuid=<value>' specified as kernel flag? if (rootUUID[0] == '\0' && (getValueForBootKey(kernelFlags, kBootUUIDKey, &val, &length) && length == 36)) { @@ -422,31 +445,43 @@ void boot(int biosdev) if (haveCABootPlist) // Check boolean before doing more time consuming tasks. { #if PRE_LINKED_KERNEL_SUPPORT - _BOOT_DEBUG_DUMP("Checking Kernel Cache key in com.apple.Boot.plist\n"); - - if (getValueForKey(kKernelCacheKey, &val, &length, &bootInfo->bootConfig)) + /* + * We cannot use the kernelcache from the Yosemite installer, not yet, + * and thus we load: /System/Library/Caches/Startup/kernelcache instead + */ +#if (MAKE_TARGET_OS == YOSEMITE) + // Installation directory located? + if (flushCaches == false) // && (gPlatform.BootVolume->flags != kBVFlagInstallVolume)) { -#if RECOVERY_HD_SUPPORT - _BOOT_DEBUG_DUMP("Kernel Cache key located in com.apple.Boot.plist\n"); - _BOOT_DEBUG_DUMP("length: %d, val: %s\n", length, val); - // XXX: Required for booting from the Recovery HD. - if (strncmp(val, "\\com.apple.recovery.boot\\kernelcache", length) == 0) +#endif // #if (MAKE_TARGET_OS == YOSEMITE) + _BOOT_DEBUG_DUMP("Checking Kernel Cache key in com.apple.Boot.plist\n"); + + if (getValueForKey(kKernelCacheKey, &val, &length, &bootInfo->bootConfig)) { - val = "/com.apple.recovery.boot/kernelcache"; - } + _BOOT_DEBUG_DUMP("Kernel Cache key located in com.apple.Boot.plist\n"); + _BOOT_DEBUG_DUMP("length: %d, val: %s\n", length, val); +#if RECOVERY_HD_SUPPORT + // XXX: Required for booting from the Recovery HD. + if (strncmp(val, "\\com.apple.recovery.boot\\kernelcache", length) == 0) + { + val = "/com.apple.recovery.boot/kernelcache"; + } #endif - if (length && GetFileInfo(NULL, val, &flags, &cachetime) == 0) - { - _BOOT_DEBUG_DUMP("Kernel Cache set to: %s\n", val); + if (length && GetFileInfo(NULL, val, &flags, &cachetime) == 0) + { + _BOOT_DEBUG_DUMP("Kernel Cache set to: %s\n", val); - // File located. Init kernelCacheFile so that we can use it as boot file. - gPlatform.KernelCachePath = strdup(val); + // File located. Init kernelCacheFile so that we can use it as boot file. + gPlatform.KernelCachePath = strdup(val); - // Set flag to inform the load process to skip parts of the code. - gPlatform.KernelCacheSpecified = true; + // Set flag to inform the load process to skip parts of the code. + gPlatform.KernelCacheSpecified = true; + } } +#if (MAKE_TARGET_OS == YOSEMITE) } - // _BOOT_DEBUG_ELSE_DUMP("No 'Kernel Cache' key given.\n"); +#endif // #if (MAKE_TARGET_OS == YOSEMITE) + #endif if (getBoolForKey(kQuietBootKey, &quietBootMode, &bootInfo->bootConfig) && !quietBootMode) { @@ -466,14 +501,17 @@ void boot(int biosdev) getAndProcessBootArguments(kernelFlags); - // Initialize bootFile (defaults to: mach_kernel). + /* Initialize bootFile (defaults to: mach_kernel). strcpy(bootFile, bootInfo->bootFile); + _BOOT_DEBUG_DUMP("bootFile: %s\n", bootFile); + _BOOT_DEBUG_DUMP("bootInfo->bootFile: %s\n", bootInfo->bootFile); + _BOOT_DEBUG_SLEEP(5); */ #if PRE_LINKED_KERNEL_SUPPORT _BOOT_DEBUG_DUMP("gBootMode = %d\n", gBootMode); // Preliminary checks to prevent us from doing useless things. - mayUseKernelCache = ((gBootMode & kBootModeSafe) == 0); + mayUseKernelCache = ((flushCaches == false) && ((gBootMode & kBootModeSafe) == 0)); _BOOT_DEBUG_DUMP("mayUseKernelCache = %s\n", mayUseKernelCache ? "true" : "false"); @@ -490,18 +528,24 @@ void boot(int biosdev) { _BOOT_DEBUG_DUMP("Warning: kernelcache will be ignored!\n"); - // True when 'Kernel Cache' is set in com.apple.Boot.plist + /* True when 'Kernel Cache' is set in com.apple.Boot.plist if (gPlatform.KernelCacheSpecified == true) { sprintf(bootFile, "%s", bootInfo->bootFile); - } + } */ +#if (MAKE_TARGET_OS == YOSEMITE) +// else +// { + sprintf(bootFile, "/System/Library/Kernels/%s", bootInfo->bootFile); +// } +#endif } else { // True when 'Kernel Cache' is set in com.apple.Boot.plist if (gPlatform.KernelCacheSpecified == true) { - _BOOT_DEBUG_DUMP("kernelcache: %s\n", gPlatform.KernelCachePath); + _BOOT_DEBUG_DUMP("kernelcache path: %s\n", gPlatform.KernelCachePath); /* * Starting with Lion, we can take a shortcut by simply pointing @@ -539,7 +583,7 @@ void boot(int biosdev) _BOOT_DEBUG_DUMP("adler32: %08X\n", adler32); -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 1 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set (like Lion). _BOOT_DEBUG_DUMP("Checking for kernelcache...\n"); @@ -608,14 +652,17 @@ void boot(int biosdev) #endif // PRE_LINKED_KERNEL_SUPPORT /* - * The bootFile normally points to 'mach_kernel' but it will be empty when a + * The bootFile normally points to (mach_)kernel but it will be empty when a * pre-linked kernel was processed, and that is why we check the length here. */ if (strlen(bootFile)) { + _BOOT_DEBUG_DUMP("About to load: %s\n", bootFile); + retStatus = LoadThinFatFile(bootFile, &fileLoadBuffer); +#if SUPPORT_32BIT_MODE if (retStatus <= 0 && gArchCPUType == CPU_TYPE_X86_64) { _BOOT_DEBUG_DUMP("Load failed for arch=x86_64, trying arch=i386 now.\n"); @@ -626,6 +673,7 @@ void boot(int biosdev) } _BOOT_DEBUG_DUMP("LoadStatus(%d): %s\n", retStatus, bootFile); +#endif // SUPPORT_32BIT_MODE } _BOOT_DEBUG_ELSE_DUMP("bootFile empty!\n"); // Should not happen, but helped me once already. @@ -651,7 +699,7 @@ void boot(int biosdev) stop("DecodeKernel() failed!"); } - _BOOT_DEBUG_DUMP("execKernel-2\n"); + _BOOT_DEBUG_DUMP("execKernel-2 address: 0x%x\n", kernelEntry); // Allocate and copy boot args. moveKernelBootArgs(); @@ -690,13 +738,13 @@ void boot(int biosdev) _BOOT_DEBUG_DUMP("execKernel-7 / gVerboseMode is %s\n", gVerboseMode ? "true" : "false"); // Did we switch to graphics mode yet (think verbose mode)? - if (gVerboseMode || bootArgs->Video.v_display == VGA_TEXT_MODE) + if (gVerboseMode || bootArgs->Video.v_display != GRAPHICS_MODE) { - _BOOT_DEBUG_SLEEP(6); + // _BOOT_DEBUG_SLEEP(6); // Switch to graphics mode and show the Apple logo on a gray-ish background. - showBootLogo(); // formerly drawBootGraphics(); + showBootLogo(bootRecoveryHD); } _BOOT_DEBUG_DUMP("execKernel-8\n"); diff --git a/i386/boot2/boot.h b/i386/boot2/boot.h index b710e8e..c543955 100755 --- a/i386/boot2/boot.h +++ b/i386/boot2/boot.h @@ -34,6 +34,7 @@ #include "platform.h" + #if USE_STATIC_DISPLAY_RESOLUTION #define DEFAULT_SCREEN_WIDTH STATIC_SCREEN_WIDTH #define DEFAULT_SCREEN_HEIGHT STATIC_SCREEN_HEIGHT @@ -81,7 +82,6 @@ #define kACPIKey "acpi" #define kScanSingleDriveKey "Scan Single Drive" #define kInsantMenuKey "Instant Menu" -#define kDefaultKernel "mach_kernel" #define kWaitForKeypressKey "Wait" /* @@ -130,7 +130,7 @@ enum * bootlogo.c */ -extern void showBootLogo(); +extern void showBootLogo(bool aBootRecoveryHDFlag); /* * fake_efi.c @@ -177,6 +177,12 @@ extern long (*LoadExtraDrivers_p)(FileLoadDrivers_t FileLoadDrivers_p); extern int decompressLZSS(u_int8_t *dst, u_int8_t *src, u_int32_t srclen); +/* + * lzss.c + */ + +extern int lzvn_decode(void * decompressedData, uint32_t decompressedSize, void * compressedData, uint32_t compressedSize); + /* * options.c */ diff --git a/i386/boot2/bootlogo.c b/i386/boot2/bootlogo.c index 6244a67..f631fab 100755 --- a/i386/boot2/bootlogo.c +++ b/i386/boot2/bootlogo.c @@ -28,22 +28,202 @@ #include "boot.h" #include "bootlogo.h" -#include "appleClut8.h" #include "bootstruct.h" +#include "appleClut8.h" +#define DEBUG 0 //============================================================================== -unsigned long lookUpCLUTIndex(unsigned char index, unsigned char depth) +unsigned long lookUpCLUTIndex(unsigned char index) { long colorIndex = (index * 3); long red = appleClut8[ colorIndex ]; long green = appleClut8[ colorIndex++ ]; long blue = appleClut8[ colorIndex++ ]; - + return (red << 16) | (green << 8) | blue; } +//============================================================================== + +void * stosl(void * dst, long val, long len) +{ + asm volatile ("rep; stosl" + : "=c" (len), "=D" (dst) + : "0" (len), "1" (dst), "a" (val) + : "memory" ); + + return dst; +} + + +//============================================================================== + +void setBackgroundColor(uint32_t aBackGroundColor) +{ + long pixelBytes = VIDEO(depth) / 8; + + char * vram = (char *) VIDEO(baseAddr) + VIDEO(rowBytes) + pixelBytes; + + int width = VIDEO(width); + int height = VIDEO(height); + + int rem = (pixelBytes * width) % 4; + int length = pixelBytes * width / 4; + + while (height--) + { + bcopy(&aBackGroundColor, vram, rem); + stosl(vram + rem, aBackGroundColor, length); + vram += VIDEO(rowBytes); + } +} + +//============================================================================== + +void drawDataRectangle(unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char * data) +{ + unsigned short drawWidth; + + long pixelBytes = VIDEO(depth) / 8; + + unsigned char * vram = (unsigned char *) VIDEO(baseAddr) + VIDEO(rowBytes) * y + pixelBytes * x; + + drawWidth = MIN(width, VIDEO(width) - x); + height = MIN(height, VIDEO(height) - y); + + while (height--) + { + bcopy( data, vram, drawWidth * pixelBytes ); + vram += VIDEO(rowBytes); + data += width * pixelBytes; + } +} + +#if (MAKE_TARGET_OS == YOSEMITE) + +#include "picopng.h" + + +//============================================================================== + +void showBootLogo(bool aBootRecoveryHDFlag) +{ +#if DEBUG + printf("aBootRecoveryHDFlag: %s\n", aBootRecoveryHDFlag ? "true" : "false"); + sleep(1); +#else + setVideoMode(GRAPHICS_MODE); +#endif + + uint32_t backGroundColor = 0xbfbfbf; + + char filename[60] = ""; + char targetLogoName[30] = "appleLogo_apple"; + + // bootArgs->flags |= kBootArgsFlagBlack is set by boot.efi (EFI var 'BlackMode') + if (bootArgs->flags & kBootArgsFlagBlackTheme) // kBootArgsFlagBlack) + { + backGroundColor = 0x030000; +#if DEBUG + printf("Black mode active!\n"); + sleep(1); +#endif + } + else + { + sprintf(targetLogoName, "%s%s", targetLogoName, "_gray"); +#if DEBUG + printf("Gray mode active!\n"); + sleep(1); +#endif + } + + // bootArgs->flags |= kBootArgsFlagHiDPI is set by boot.efi (EFI var 'UIScale') + sprintf(targetLogoName, "%s%s.png", targetLogoName, (bootArgs->flags & kBootArgsFlagHiDPI) ? "@2x" : ""); +#if DEBUG + printf("targetLogoName: %s\n", targetLogoName); + sleep(1); +#endif + setBackgroundColor(backGroundColor); + + void *imageLoadBuffer = (void *)kLoadAddr; + + sprintf(filename, "%s%s", (aBootRecoveryHDFlag) ? "/com.apple.Boot.P" : "", "/usr/standalone/i386/EfiLoginUI/appleLogo.efires"); + + int EFIResourceFile = open(filename, 0); + + if (EFIResourceFile >= 0) + { + int filesize = file_size(EFIResourceFile); + + if (read(EFIResourceFile, (char *) kLoadAddr, filesize) == filesize) + { + EFIRES_HEADER * header = (EFIRES_HEADER *) imageLoadBuffer; +#if DEBUG + printf("\nheader->revision..: %d\n", header->revision); + printf("header->imageCount: %d\n", header->imageCount); +#endif + int pos = sizeof(header); + + for (int index = 0; index < header->imageCount; index++) + { + EFIRES_IMAGE_HEADER * imageHeader = (EFIRES_IMAGE_HEADER *) (imageLoadBuffer + pos); +#if DEBUG + printf("imageHeader->filename.: %s\n", imageHeader->filename); + printf("imageHeader->offset...: %d\n", imageHeader->offset); + printf("imageHeader->imageSize: %d\n", imageHeader->imageSize); + sleep(2); +#endif + if (strncmp((char *)imageHeader->filename, targetLogoName, strlen(targetLogoName)) == 0) + { + PNG_info_t *info = PNG_decode((imageLoadBuffer + imageHeader->offset), imageHeader->imageSize); +#if DEBUG + printf("Apple logo image found!\n"); + printf("Image width...........: %d\n", info->width); + printf("Image height..........: %d\n", info->height); + sleep(3); +#endif + uint8_t *bootImage = malloc((info->width * 4) * info->height); + memcpy(bootImage, info->image->data, ((info->width * 4) * info->height)); + + uint16_t x = (VIDEO(width) - MIN(info->width, VIDEO(width)) ) / 2; + uint16_t y = (VIDEO(height) - MIN(info->height, VIDEO(height)) ) / 2; + + blendImage(x, y, info->width, info->height, bootImage); + png_alloc_free_all(); + + free(bootImage); +#if INTEL_VGA_REG_DUMP + setVideoMode(VGA_TEXT_MODE); +#endif + // extern void vga(void); + // vga(); + + return; + } + else + { + pos += sizeof(EFIRES_IMAGE_HEADER); + } + } + } + + close(EFIResourceFile); + } +#if DEBUG + else + { + setVideoMode(VGA_TEXT_MODE); + error("showBootLogo(Error)"); + } +#endif + +} + +#else + //============================================================================== @@ -68,7 +248,7 @@ int convertImage(unsigned short width, unsigned short height, const unsigned cha for (; index < size; index++) { - img32[index] = lookUpCLUTIndex(imageData[index], depth); + img32[index] = lookUpCLUTIndex(imageData[index]); } img = (unsigned char *)img32; @@ -81,46 +261,9 @@ int convertImage(unsigned short width, unsigned short height, const unsigned cha } -//============================================================================== +/*============================================================================== -void * stosl(void * dst, long val, long len) -{ - asm volatile ("rep; stosl" - : "=c" (len), "=D" (dst) - : "0" (len), "1" (dst), "a" (val) - : "memory" ); - - return dst; -} - - -//============================================================================== - -void drawColorRectangle(unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char colorIndex) -{ - long color = lookUpCLUTIndex(colorIndex, VIDEO(depth)); - long pixelBytes = VIDEO(depth) / 8; - - char * vram = (char *) VIDEO(baseAddr) + VIDEO(rowBytes) * y + pixelBytes * x; - - width = MIN(width, VIDEO(width) - x); - height = MIN(height, VIDEO(height) - y); - - int rem = (pixelBytes * width) % 4; - int length = pixelBytes * width / 4; - - while (height--) - { - bcopy(&color, vram, rem); - stosl(vram + rem, color, length); - vram += VIDEO(rowBytes); - } -} - - -//============================================================================== - -void drawDataRectangle(unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char * data) +void drawDataRectangle(unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char * data) { unsigned short drawWidth; @@ -137,7 +280,7 @@ void drawDataRectangle(unsigned short x, unsigned short y, unsigned short widt vram += VIDEO(rowBytes); data += width * pixelBytes; } -} +} */ //============================================================================== @@ -169,18 +312,15 @@ char * decodeRLE(const void * rleData, int rleBlocks, int outBytes) return out; } - //============================================================================== -void showBootLogo() +void showBootLogo(bool aBootRecoveryHDFlag) { uint8_t *bootImageData = NULL; uint8_t *appleBootLogo = (uint8_t *) decodeRLE(appleLogoRLE, 686, 16384); setVideoMode(GRAPHICS_MODE); - - // Fill the background to 75% grey (same as BootX). - drawColorRectangle(0, 0, VIDEO(width), VIDEO(height), 0x01); + setBackgroundColor(0xbfbfbf); convertImage(APPLE_LOGO_WIDTH, APPLE_LOGO_HEIGHT, appleBootLogo, &bootImageData); @@ -189,3 +329,5 @@ void showBootLogo() free(bootImageData); free(appleBootLogo); } + +#endif diff --git a/i386/boot2/bootlogo.h b/i386/boot2/bootlogo.h index fbf18d4..0701596 100755 --- a/i386/boot2/bootlogo.h +++ b/i386/boot2/bootlogo.h @@ -5,7 +5,41 @@ #define VIDEO(x) (bootArgs->Video.v_ ## x) -const unsigned char appleLogoRLE[] = +#if (MAKE_TARGET_OS == YOSEMITE) + +typedef struct +{ + uint16_t revision; + uint16_t imageCount; +} __attribute__((packed)) EFIRES_HEADER; + +typedef struct +{ + char filename[64]; + uint32_t offset; + uint32_t imageSize; +} __attribute__((packed)) EFIRES_IMAGE_HEADER; + +typedef struct +{ + char signature[8]; + uint32_t length; + char chunkType[4]; + uint32_t width; + uint32_t height; + uint8_t bitDepth; + uint8_t colorType; + uint8_t compressionMethod; + uint8_t filterMethod; + uint8_t interlaceMethod; + uint32_t checksum; +} __attribute__((packed)) IMAGE_CHUNK_HEADER; + +extern void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *data); + +#else + +const unsigned char appleLogoRLE[1372] = { 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0x50, 0x01, 0x01, 0x02, 0x01, 0x17, 0x01, 0x34, 0x01, 0x47, 0x03, 0x50, 0x01, 0x13, 0x76, 0x01, 0x01, 0x03, @@ -123,3 +157,4 @@ const unsigned char appleLogoRLE[] = 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xb3, 0x01 }; +#endif diff --git a/i386/boot2/drivers.c b/i386/boot2/drivers.c index 75860b8..5df6cbc 100755 --- a/i386/boot2/drivers.c +++ b/i386/boot2/drivers.c @@ -199,14 +199,14 @@ long loadDrivers(char * dirSpec) if ((gKextLoadStatus & 1) == 0) { -#if (MAKE_TARGET_OS == MAVERICKS) +#if ((MAKE_TARGET_OS & MAVERICKS) == MAVERICKS) // Mavericks and Yosemite specifics. _DRIVERS_DEBUG_DUMP("\nCalling loadKexts(\"/Library/Extensions\");\n"); - // For Mavericks we first load the signed kexts. + /* For Mavericks we first load the signed kexts. if (loadKexts("/Library/Extensions", 0) == EFI_SUCCESS) { _DRIVERS_DEBUG_DUMP("loadKexts(1) OK.\n"); - } + } */ #endif _DRIVERS_DEBUG_DUMP("\nCalling loadKexts(\"/System/Library/Extensions\");\n"); // System kexts @@ -309,7 +309,7 @@ static int loadMultiKext(char * path) // Add the MKext to the memory map. sprintf(segName, "DriversPackage-%lx", driversAddr); - AllocateMemoryRange(segName, driversAddr, driversLength, kBootDriverTypeMKEXT); + AllocateMemoryRange(segName, driversAddr, driversLength); _DRIVERS_DEBUG_DUMP("loadMultiKext(Success : 0) @ 0x%08x\n", driversAddr); @@ -355,12 +355,12 @@ static int loadKexts(char * targetFolder, bool isPluginRun) { sprintf(gPlatform.KextFileName, "%s/%s", targetFolder, dirEntryName); -#if DEBUG_DRIVERS +// #if DEBUG_DRIVERS if (strlen(gPlatform.KextFileName) >= MAX_KEXT_PATH_LENGTH) { stop("Error: gPlatform.KextFileName >= %d chars. Change MAX_KEXT_PATH_LENGTH!", MAX_KEXT_PATH_LENGTH); } -#endif +// #endif // Determine bundle type. isBundleType2 = (GetFileInfo(gPlatform.KextFileName, "Contents", &dirEntryFlags, &dirEntryTime) == 0); @@ -372,12 +372,12 @@ static int loadKexts(char * targetFolder, bool isPluginRun) // Setup plug-ins path. sprintf(gPlatform.KextFileSpec, "%s/%sPlugIns", gPlatform.KextFileName, (isBundleType2) ? "Contents/" : ""); -#if DEBUG_DRIVERS +// #if DEBUG_DRIVERS if (strlen(gPlatform.KextFileSpec) >= MAX_KEXT_PATH_LENGTH) { stop("Error: gPlatform.KextFileSpec >= %d chars. Change MAX_KEXT_PATH_LENGTH!", MAX_KEXT_PATH_LENGTH); } -#endif +// #endif _DRIVERS_DEBUG_DUMP("R"); // Recursive call for kexts in the PlugIns folder. @@ -398,9 +398,9 @@ static int loadPlist(char * targetFolder, bool isBundleType2) ModulePtr module; TagPtr personalities; - char * plistBuffer = 0; - char * tmpExecutablePath = 0; - char * tmpBundlePath = 0; + char * plistBuffer = NULL; + char * tmpExecutablePath = NULL; + char * tmpBundlePath = NULL; long plistLength, bundlePathLength, result = -1; @@ -452,16 +452,20 @@ static int loadPlist(char * targetFolder, bool isBundleType2) if (plistLength > 0) { + _DRIVERS_DEBUG_DUMP("p"); + plistLength += 1; plistBuffer = malloc(plistLength); if (plistBuffer) { + _DRIVERS_DEBUG_DUMP("1"); strlcpy(plistBuffer, (char *)kLoadAddr, plistLength); // parseXML returns 0 on success so we check that here. if (parseXML(plistBuffer, &module, &personalities) == 0) { + _DRIVERS_DEBUG_DUMP("2"); // Allocate memory for the driver path and the plist. module->executablePath = tmpExecutablePath; module->bundlePath = tmpBundlePath; @@ -470,6 +474,7 @@ static int loadPlist(char * targetFolder, bool isBundleType2) if (module->plistAddr) { + _DRIVERS_DEBUG_DUMP("3"); // Tell free() to take no action for these two (by passing 0 as argument). tmpBundlePath = tmpExecutablePath = 0; @@ -523,6 +528,7 @@ static int loadPlist(char * targetFolder, bool isBundleType2) // Free on failure only. free(tmpBundlePath); } + // Free on failure only. free(tmpExecutablePath); } @@ -555,12 +561,12 @@ static long loadMatchedModules(void) fileName = prop->string; sprintf(gPlatform.KextFileSpec, "%s%s", module->executablePath, fileName); -#if DEBUG_DRIVERS +// #if DEBUG_DRIVERS if (strlen(gPlatform.KextFileSpec) >= MAX_KEXT_PATH_LENGTH) { stop("Error: gPlatform.KextFileSpec >= %d chars. Change MAX_KEXT_PATH_LENGTH!", MAX_KEXT_PATH_LENGTH); } -#endif +// #endif length = LoadThinFatFile(gPlatform.KextFileSpec, &executableAddr); if (length == 0) @@ -616,8 +622,8 @@ static long loadMatchedModules(void) strcpy(driver->bundlePathAddr, module->bundlePath); // Add an entry to the memory map. - sprintf(segName, "Driver-%lx", (unsigned long)driver); - AllocateMemoryRange(segName, driverAddr, driverLength, kBootDriverTypeKEXT); + sprintf(segName, "Driver-%lx", (unsigned long)driver); + AllocateMemoryRange(segName, driverAddr, driverLength); } } module = module->nextModule; @@ -743,17 +749,21 @@ const char * gRequiredKexts[] = static bool isLoadableInSafeBoot(char * OSBundleRequired) { - if (gBootMode == kBootModeNormal) +// if (gBootMode == kBootModeNormal) + if (gBootMode == kBootModeSafe) { return (strcmp(OSBundleRequired, kOSBundleRequiredSafeBoot) != 0); + // return (strcmp(OSBundleRequired, kOSBundleRequiredRoot) != 0); } - else if (gBootMode == kBootModeSafe) +// else if (gBootMode == kBootModeSafe) + else { if (strcmp(OSBundleRequired, kOSBundleRequiredRoot) == 0 || - strcmp(OSBundleRequired, kOSBundleRequiredLocalRoot) == 0 || + strcmp(OSBundleRequired, kOSBundleRequiredLocalRoot) == 0 / * || strcmp(OSBundleRequired, kOSBundleRequiredNetworkRoot) == 0 || strcmp(OSBundleRequired, kOSBundleRequiredSafeBoot) == 0 || - strcmp(OSBundleRequired, kOSBundleRequiredConsole)) + strcmp(OSBundleRequired, kOSBundleRequiredConsole) * / + ) { return true; @@ -801,16 +811,59 @@ static long parseXML(char * buffer, ModulePtr * module, TagPtr * personalities) return -1; } + /* #define kAppleKernelExternalComponentKey "AppleKernelExternalComponent" + #define kAppleSecurityExtensionKey "AppleSecurityExtension" + + TagPtr isKernelExternalComponent = XMLGetProperty(moduleDict, kAppleSecurityExtensionKey); + + if (isKernelExternalComponent->type == kTagTypeTrue) + { + XMLFreeTag(moduleDict); + //#if DEBUG_DRIVERS + printf("Dropping AppleKernelExternalComponent(1)\n"); + sleep(1); + //#endif + return -2; + } + + TagPtr isSecurityKext = XMLGetProperty(moduleDict, kAppleSecurityExtensionKey); + + if (isSecurityKext->type == kTagTypeTrue) + { + XMLFreeTag(moduleDict); +//#if DEBUG_DRIVERS + printf("Dropping AppleSecurityExtension\n"); + sleep(1); +//#endif + return -2; + } + + #define COM_APPLE_KEC "com.apple.kec." + + TagPtr bundle_id = XMLGetProperty(moduleDict, kPropCFBundleIdentifier); + + if (strncmp(bundle_id, COM_APPLE_KEC, strlen(COM_APPLE_KEC)) == 0)) + { +//#if DEBUG_DRIVERS + printf("Dropping AppleKernelExternalComponent(2)\n"); + sleep(1); +//#endif + return -2; + } */ + required = XMLGetProperty(moduleDict, kPropOSBundleRequired); if ((required == 0) || (required->type != kTagTypeString) || !strcmp(required->string, "Safe Boot")) + // if ((required == 0) || (required->type != kTagTypeString) || !strcmp(required->string, "Root")) // if ((required == 0) || (required->type != kTagTypeString) || !isLoadableInSafeBoot(required->string)) + // if ( (required != NULL) && (required->type == kTagTypeString) && !strcmp(required->string, "Safe Boot")) { XMLFreeTag(moduleDict); return -2; } - tmpModule = (ModulePtr)malloc(sizeof(Module)); + // tmpModule = (ModulePtr)malloc(sizeof(Module)); + tmpModule = malloc(sizeof(Module)); if (tmpModule == 0) { @@ -836,16 +889,14 @@ static long parseXML(char * buffer, ModulePtr * module, TagPtr * personalities) //============================================================================== -long decodeKernel(void *binary, entry_t *rentry, char **raddr, int *rsize) +long decodeKernel(void *fileLoadBuffer, entry_t *rentry, char **raddr, int *rsize) { // return DecodeMachO(binary, rentry, raddr, rsize); - - void *buffer; long ret; unsigned long len; - u_int32_t uncompressedSize, size; - compressed_kernel_header * kernel_header = (compressed_kernel_header *) binary; + u_int32_t compressedSize, uncompressedSize, size = 0; + compressed_kernel_header * kernel_header = (compressed_kernel_header *) fileLoadBuffer; #if DEBUG_DRIVERS printf("Kernel header data.\n"); @@ -858,12 +909,16 @@ long decodeKernel(void *binary, entry_t *rentry, char **raddr, int *rsize) printf("platformName : %s\n", kernel_header->platformName); printf("rootPath : %s\n", kernel_header->rootPath); printf("Sleeping for 5 seconds...\n"); - sleep(5); #endif if (kernel_header->signature == OSSwapBigToHostConstInt32('comp')) { - if (kernel_header->compressType != OSSwapBigToHostConstInt32('lzss')) + if (kernel_header->compressType != OSSwapBigToHostConstInt32('lzss') +#if (MAKE_TARGET_OS == YOSEMITE) + && kernel_header->compressType != OSSwapBigToHostConstInt32('lzvn') +#endif + ) + { error("kernel compression is bad\n"); return -1; @@ -880,40 +935,56 @@ long decodeKernel(void *binary, entry_t *rentry, char **raddr, int *rsize) return -1; } #endif - + compressedSize = OSSwapBigToHostInt32(kernel_header->compressedSize); uncompressedSize = OSSwapBigToHostInt32(kernel_header->uncompressedSize); - binary = buffer = malloc(uncompressedSize); + fileLoadBuffer = malloc(uncompressedSize); - size = decompressLZSS((u_int8_t *) binary, &kernel_header->data[0], OSSwapBigToHostInt32(kernel_header->compressedSize)); +#if (MAKE_TARGET_OS == YOSEMITE) + if (kernel_header->compressType == OSSwapBigToHostConstInt32('lzvn')) + { + void *tmpBuffer = malloc(uncompressedSize); + size = lzvn_decode(tmpBuffer, uncompressedSize, &kernel_header->data[0], compressedSize); + memcpy(fileLoadBuffer, tmpBuffer, uncompressedSize); + free(tmpBuffer); + } else +#endif + if (kernel_header->compressType == OSSwapBigToHostConstInt32('lzss')) + { + size = decompressLZSS((u_int8_t *) fileLoadBuffer, &kernel_header->data[0], compressedSize); + } if (uncompressedSize != size) { - error("Size mismatch from lzss: 0x08%x\n", size); + error("Size mismatch, is 0x%x but 0x%x is expected!\n", size, uncompressedSize); return -1; } - if (OSSwapBigToHostInt32(kernel_header->adler32) != localAdler32(binary, uncompressedSize)) + if (OSSwapBigToHostInt32(kernel_header->adler32) != localAdler32(fileLoadBuffer, uncompressedSize)) { - printf("Adler mismatch\n"); + printf("Adler mismatch, is 0x%x but 0x%x is expected\n", localAdler32(fileLoadBuffer, uncompressedSize)); return -1; } } - ret = ThinFatFile(&binary, &len); + ret = ThinFatFile(&fileLoadBuffer, &len); if (ret == 0 && len == 0 && gArchCPUType == CPU_TYPE_X86_64) { gArchCPUType = CPU_TYPE_I386; - ret = ThinFatFile(&binary, &len); + ret = ThinFatFile(&fileLoadBuffer, &len); } - ret = DecodeMachO(binary, rentry, raddr, rsize); + ret = DecodeMachO(fileLoadBuffer, rentry, raddr, rsize); if (ret < 0 && gArchCPUType == CPU_TYPE_X86_64) { gArchCPUType = CPU_TYPE_I386; - ret = DecodeMachO(binary, rentry, raddr, rsize); + ret = DecodeMachO(fileLoadBuffer, rentry, raddr, rsize); } +#if DEBUG_DRIVERS + printf("decodeKernel(ret = %d)\n", ret); + sleep(5); +#endif return ret; } diff --git a/i386/boot2/graphics.c b/i386/boot2/graphics.c index bcc89bf..1e26c78 100755 --- a/i386/boot2/graphics.c +++ b/i386/boot2/graphics.c @@ -30,6 +30,7 @@ #include "vbe.h" #include "bootstruct.h" + //============================================================================== bool inGraphicsMode(void) @@ -222,9 +223,8 @@ long setVESAGraphicsMode(unsigned short width, unsigned short height, unsigned c maColorModeBit | maModeIsSupportedBit | maGraphicsModeBit | maLinearFrameBufferAvailBit, 0, &minfo, &vesaVersion); #if DEBUG - printf("\nsetVESAGraphicsMode: %d\n%d\n%d\n%d\n%d\n%x\n%x\nPress a key...", mode, minfo.XResolution, + printf("\nsetVESAGraphicsMode: %d\n%d\n%d\n%d\n%d\n%x\n%x\nSleeping for 25 seconds...", mode, minfo.XResolution, minfo.YResolution, minfo.BitsPerPixel, minfo.BytesPerScanline, minfo.PhysBasePtr_low, minfo.PhysBasePtr_high); - getc(); #endif if (mode == modeEndOfList) @@ -247,13 +247,12 @@ long setVESAGraphicsMode(unsigned short width, unsigned short height, unsigned c } // Update bootArgs with the data provided by the selected VESA mode. - bootArgs->Video.v_display = GRAPHICS_MODE; - bootArgs->Video.v_width = minfo.XResolution; // 1920 or 1600 - bootArgs->Video.v_height = minfo.YResolution; // 1200 or 900 - bootArgs->Video.v_depth = minfo.BitsPerPixel; // 32 - bootArgs->Video.v_rowBytes = minfo.BytesPerScanline; // 7680 or 6400 - - bootArgs->Video.v_baseAddr = VBEMakeUInt32(minfo.PhysBasePtr); + bootArgs->Video.v_display = GRAPHICS_MODE; + bootArgs->Video.v_width = minfo.XResolution; /* 1920 or 1600 */ + bootArgs->Video.v_height = minfo.YResolution; /* 1200 or 900 */ + bootArgs->Video.v_depth = minfo.BitsPerPixel; /* 32 */ + bootArgs->Video.v_rowBytes = minfo.BytesPerScanline; /* 7680 or 6400 */ + bootArgs->Video.v_baseAddr = VBEMakeUInt32(minfo.PhysBasePtr); } while (0); @@ -346,7 +345,7 @@ void setVideoMode(int mode) { if ((status = initGraphicsMode()) == EFI_SUCCESS) { - bootArgs->Video.v_display = (gVerboseMode) ? FB_TEXT_MODE : GRAPHICS_MODE; + bootArgs->Video.v_display = (gVerboseMode) ? /* 2 */ FB_TEXT_MODE : /* 1 */ GRAPHICS_MODE; } } @@ -359,3 +358,63 @@ void setVideoMode(int mode) bootArgs->Video.v_display = VGA_TEXT_MODE; } } + +//============================================================================== + +#define MIN(x, y) ((x) < (y) ? (x) : (y)) +#define MAX(x, y) ((x) > (y) ? (x) : (y)) + +#define VIDEO(x) (bootArgs->Video.v_ ## x) + +void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *data) +{ + uint8_t *vram = (uint8_t *) VIDEO(baseAddr) + VIDEO(rowBytes) * y + 4 * x; + + uint16_t drawWidth = (MIN(width, VIDEO(width) - x) * 4); + + height = MIN(height, VIDEO(height) - y); + width = (width * 4); + + while (height--) + { + uint32_t s; uint32_t* d; // Source (img) and destination (bkgd) pixels + uint32_t a; // Alpha + uint32_t dstrb, dstg, srcrb, srcg, drb, dg, rb, g, tempB; // Intermediate variables + uint16_t pos = 0; + + for (; pos < drawWidth; pos += 4) + { + // Fast pseudo-vector alpha blending, adapted from: http://www.stereopsis.com/doubleblend.html + s = *((uint32_t*) (data + pos)); + d = (uint32_t*) (vram + pos); + + // Flip B and R in source + // TODO: use XCHG and inline assembly to do this in a faster, saner way + tempB = (s & 0xFF0000); // save B + s = (s & 0xFF00FFFF) | ((s & 0xFF) << 16); // put R in B + s = (s & 0xFFFFFF00) | (tempB >> 16); // put B in R + + a = (s >> 24) + 1; + + dstrb = *d & 0xFF00FF; + dstg = *d & 0xFF00; + srcrb = s & 0xFF00FF; + srcg = s & 0xFF00; + + drb = srcrb - dstrb; + dg = srcg - dstg; + drb *= a; + dg *= a; + drb >>= 8; + dg >>= 8; + + rb = (drb + dstrb) & 0xFF00FF; + g = (dg + dstg) & 0xFF00; + + *d = rb | g; + } + + vram += VIDEO(rowBytes); + data += width; + } +} diff --git a/i386/boot2/picopng.c b/i386/boot2/picopng.c new file mode 100644 index 0000000..733a7e2 --- /dev/null +++ b/i386/boot2/picopng.c @@ -0,0 +1,1796 @@ +// picoPNG version 20101224 +// Copyright (c) 2005-2010 Lode Vandevenne +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// +// Note: Ported from CPP to C by kaitek. +// + +#include <sys/types.h> +#include "libsa.h" +#include "picopng.h" + + +/*************************************************************************************************/ + +typedef struct png_alloc_node +{ + struct png_alloc_node *prev, *next; + void *addr; + size_t size; +} png_alloc_node_t; + +png_alloc_node_t *png_alloc_head = NULL; +png_alloc_node_t *png_alloc_tail = NULL; + +//============================================================================== + +png_alloc_node_t *png_alloc_find_node(void *addr) +{ + png_alloc_node_t *node; + + for (node = png_alloc_head; node; node = node->next) + { + if (node->addr == addr) + { + break; + } + } + + return node; +} + + +//============================================================================== + +void png_alloc_add_node(void *addr, size_t size) +{ + png_alloc_node_t *node; + + if (png_alloc_find_node(addr)) + { + return; + } + + node = malloc(sizeof(png_alloc_node_t)); + node->addr = addr; + node->size = size; + node->prev = png_alloc_tail; + node->next = NULL; + png_alloc_tail = node; + + if (node->prev) + { + node->prev->next = node; + } + + if (!png_alloc_head) + { + png_alloc_head = node; + } +} + + +//============================================================================== + +void png_alloc_remove_node(png_alloc_node_t *node) +{ + if (node->prev) + { + node->prev->next = node->next; + } + + if (node->next) + { + node->next->prev = node->prev; + } + + if (node == png_alloc_head) + { + png_alloc_head = node->next; + } + + if (node == png_alloc_tail) + { + png_alloc_tail = node->prev; + } + + node->prev = node->next = node->addr = NULL; + free(node); +} + + +//============================================================================== + +void *png_alloc_malloc(size_t size) +{ + void *addr = malloc(size); + png_alloc_add_node(addr, size); + + return addr; +} + + +//============================================================================== + +void *png_alloc_realloc(void *addr, size_t size) +{ + void *new_addr; + + if (!addr) + { + return png_alloc_malloc(size); + } + + new_addr = realloc(addr, size); + + if (new_addr != addr) + { + png_alloc_node_t *old_node; + old_node = png_alloc_find_node(addr); + png_alloc_remove_node(old_node); + png_alloc_add_node(new_addr, size); + } + + return new_addr; +} + + +//============================================================================== + +void png_alloc_free(void *addr) +{ + png_alloc_node_t *node = png_alloc_find_node(addr); + + if (!node) + { + return; + } + + png_alloc_remove_node(node); + free(addr); +} + + +//============================================================================== + +void png_alloc_free_all() +{ + while (png_alloc_tail) + { + void *addr = png_alloc_tail->addr; + png_alloc_remove_node(png_alloc_tail); + free(addr); + } +} + + +//============================================================================== + +uint32_t vector32_resize(vector32_t *p, size_t size) +{ + /* + * returns 1 if success, 0 if failure ==> nothing done + */ + if (size * sizeof(uint32_t) > p->allocsize) + { + size_t newsize = size * sizeof(uint32_t) * 2; + void *data = png_alloc_realloc(p->data, newsize); + + if (data) + { + p->allocsize = newsize; + p->data = (uint32_t *) data; + p->size = size; + } + else + { + return 0; + } + } + else + { + p->size = size; + } + + return 1; +} + + +//============================================================================== + +uint32_t vector32_resizev(vector32_t *p, size_t size, uint32_t value) +{ + /* + * resize and give all new elements the value + */ + size_t oldsize = p->size, i; + + if (!vector32_resize(p, size)) + { + return 0; + } + + for (i = oldsize; i < size; i++) + { + p->data[i] = value; + } + + return 1; +} + + +//============================================================================== + +vector32_t *vector32_new(size_t size, uint32_t value) +{ + vector32_t *p = png_alloc_malloc(sizeof(vector32_t)); + + p->data = NULL; + p->size = p->allocsize = 0; + + if (size && !vector32_resizev(p, size, value)) + { + return NULL; + } + + return p; +} + + +//============================================================================== + +uint32_t vector8_resize(vector8_t *p, size_t size) +{ + /* + * returns 1 if success, 0 if failure ==> nothing done + * xxx: the use of sizeof uint32_t here seems like a bug (this descends from the lodepng vector + * compatibility functions which do the same). without this there is corruption in certain cases, + * so this was probably done to cover up allocation bug(s) in the original picopng code! + */ + if (size * sizeof(uint32_t) > p->allocsize) + { + size_t newsize = size * sizeof(uint32_t) * 2; + void *data = png_alloc_realloc(p->data, newsize); + + if (data) + { + p->allocsize = newsize; + p->data = (uint8_t *) data; + p->size = size; + } + else + { + return 0; // error: not enough memory + } + } + else + { + p->size = size; + } + + return 1; +} + + +/*============================================================================== + * + * resize and give all new elements the value + */ + +uint32_t vector8_resizev(vector8_t *p, size_t size, uint8_t value) +{ + size_t oldsize = p->size, i; + + if (!vector8_resize(p, size)) + { + return 0; + } + + for (i = oldsize; i < size; i++) + { + p->data[i] = value; + } + + return 1; +} + + +//============================================================================== + +vector8_t *vector8_new(size_t size, uint8_t value) +{ + vector8_t *p = png_alloc_malloc(sizeof(vector8_t)); + + p->data = NULL; + p->size = p->allocsize = 0; + + if (size && !vector8_resizev(p, size, value)) + { + return NULL; + } + + return p; +} + + +//============================================================================== + +vector8_t *vector8_copy(vector8_t *p) +{ + vector8_t *q = vector8_new(p->size, 0); + uint32_t n; + + for (n = 0; n < q->size; n++) + { + q->data[n] = p->data[n]; + } + + return q; +} + +/*************************************************************************************************/ + +const uint32_t LENBASE[29] = { 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258 }; +const uint32_t LENEXTRA[29] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 }; +const uint32_t DISTBASE[30] = { 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577 }; +const uint32_t DISTEXTRA[30] = { 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13 }; +const uint32_t CLCL[19] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; // Code Length Code Lengths + +/*************************************************************************************************/ + +typedef struct +{ + // 2D representation of a huffman tree: The one dimension is "0" or "1", the other contains all + // nodes and leaves of the tree. + vector32_t *tree2d; +} HuffmanTree; + + +//============================================================================== + +HuffmanTree *HuffmanTree_new() +{ + HuffmanTree *tree = png_alloc_malloc(sizeof(HuffmanTree)); + tree->tree2d = NULL; + + return tree; +} + + +//============================================================================== + +int HuffmanTree_makeFromLengths(HuffmanTree *tree, const vector32_t *bitlen, uint32_t maxbitlen) +{ // make tree given the lengths + uint32_t bits, n, i; + uint32_t numcodes = (uint32_t) bitlen->size, treepos = 0, nodefilled = 0; + vector32_t *tree1d, *blcount, *nextcode; + tree1d = vector32_new(numcodes, 0); + blcount = vector32_new(maxbitlen + 1, 0); + nextcode = vector32_new(maxbitlen + 1, 0); + + for (bits = 0; bits < numcodes; bits++) + { + blcount->data[bitlen->data[bits]]++; // count number of instances of each code length + } + + for (bits = 1; bits <= maxbitlen; bits++) + { + nextcode->data[bits] = (nextcode->data[bits - 1] + blcount->data[bits - 1]) << 1; + } + + for (n = 0; n < numcodes; n++) + { + if (bitlen->data[n] != 0) + { + tree1d->data[n] = nextcode->data[bitlen->data[n]]++; // generate all the codes + } + } + + // 0x7fff here means the tree2d isn't filled there yet + vector32_t *tree2d = vector32_new(numcodes * 2, 0x7fff); + tree->tree2d = tree2d; + + for (n = 0; n < numcodes; n++) // the codes + { + for (i = 0; i < bitlen->data[n]; i++) // the bits for this code + { + uint32_t bit = (tree1d->data[n] >> (bitlen->data[n] - i - 1)) & 1; + + if (treepos > numcodes - 2) + { + return 55; + } + if (tree2d->data[2 * treepos + bit] == 0x7fff) // not yet filled in + { + if (i + 1 == bitlen->data[n]) // last bit + { + tree2d->data[2 * treepos + bit] = n; + treepos = 0; + } + else // addresses are encoded as values > numcodes + { + tree2d->data[2 * treepos + bit] = ++nodefilled + numcodes; + treepos = nodefilled; + } + } + else // subtract numcodes from address to get address value + { + treepos = tree2d->data[2 * treepos + bit] - numcodes; + } + } + } + + return 0; +} + + +//============================================================================== + +int HuffmanTree_decode(const HuffmanTree *tree, bool *decoded, uint32_t *result, size_t *treepos, uint32_t bit) +{ // Decodes a symbol from the tree + const vector32_t *tree2d = tree->tree2d; + uint32_t numcodes = (uint32_t) tree2d->size / 2; + + if (*treepos >= numcodes) + { + return 11; // error: you appeared outside the codetree + } + + *result = tree2d->data[2 * (*treepos) + bit]; + *decoded = (*result < numcodes); + *treepos = *decoded ? 0 : *result - numcodes; + + return 0; +} + + +//============================================================================== + +int Inflator_error; + +uint32_t Zlib_readBitFromStream(size_t *bitp, const uint8_t *bits) +{ + uint32_t result = (bits[*bitp >> 3] >> (*bitp & 0x7)) & 1; + (*bitp)++; + + return result; +} + + +//============================================================================== + +uint32_t Zlib_readBitsFromStream(size_t *bitp, const uint8_t *bits, size_t nbits) +{ + uint32_t i, result = 0; + + for (i = 0; i < nbits; i++) + { + result += (Zlib_readBitFromStream(bitp, bits)) << i; + } + + return result; +} + + +//============================================================================== + +void Inflator_generateFixedTrees(HuffmanTree *tree, HuffmanTree *treeD) +{ // get the tree of a deflated block with fixed tree + size_t i; + vector32_t *bitlen, *bitlenD; + bitlen = vector32_new(288, 8); + bitlenD = vector32_new(32, 5); + + for (i = 144; i <= 255; i++) + { + bitlen->data[i] = 9; + } + + for (i = 256; i <= 279; i++) + { + bitlen->data[i] = 7; + } + + HuffmanTree_makeFromLengths(tree, bitlen, 15); + HuffmanTree_makeFromLengths(treeD, bitlenD, 15); +} + + +//============================================================================== + +uint32_t Inflator_huffmanDecodeSymbol(const uint8_t *in, size_t *bp, const HuffmanTree *codetree, size_t inlength) +{ // decode a single symbol from given list of bits with given code tree. returns the symbol + bool decoded = false; + uint32_t ct = 0; + size_t treepos = 0; + + for (;;) + { + if ((*bp & 0x07) == 0 && (*bp >> 3) > inlength) + { + Inflator_error = 10; // error: end reached without endcode + + return 0; + } + + Inflator_error = HuffmanTree_decode(codetree, &decoded, &ct, &treepos, Zlib_readBitFromStream(bp, in)); + + if (Inflator_error) + { + return 0; // stop, an error happened + } + + if (decoded) + { + return ct; + } + } +} + + +//============================================================================== + +void Inflator_getTreeInflateDynamic(HuffmanTree *tree, HuffmanTree *treeD, const uint8_t *in, size_t *bp, size_t inlength) +{ // get the tree of a deflated block with dynamic tree, the tree itself is also Huffman + // compressed with a known tree + size_t i, n; + HuffmanTree *codelengthcodetree = HuffmanTree_new(); // the code tree for code length codes + vector32_t *bitlen, *bitlenD; + bitlen = vector32_new(288, 0); + bitlenD = vector32_new(32, 0); + + if (*bp >> 3 >= inlength - 2) + { + Inflator_error = 49; // the bit pointer is or will go past the memory + + return; + } + + size_t HLIT = Zlib_readBitsFromStream(bp, in, 5) + 257; // number of literal/length codes + 257 + size_t HDIST = Zlib_readBitsFromStream(bp, in, 5) + 1; // number of dist codes + 1 + size_t HCLEN = Zlib_readBitsFromStream(bp, in, 4) + 4; // number of code length codes + 4 + vector32_t *codelengthcode; // lengths of tree to decode the lengths of the dynamic tree + codelengthcode = vector32_new(19, 0); + + for (i = 0; i < 19; i++) + { + codelengthcode->data[CLCL[i]] = (i < HCLEN) ? Zlib_readBitsFromStream(bp, in, 3) : 0; + } + + Inflator_error = HuffmanTree_makeFromLengths(codelengthcodetree, codelengthcode, 7); + + if (Inflator_error) + { + return; + } + + size_t replength; + + for (i = 0; i < HLIT + HDIST; ) + { + uint32_t code = Inflator_huffmanDecodeSymbol(in, bp, codelengthcodetree, inlength); + + if (Inflator_error) + { + return; + } + + if (code <= 15) // a length code + { + if (i < HLIT) + { + bitlen->data[i++] = code; + } + else + { + bitlenD->data[i++ - HLIT] = code; + } + } + else if (code == 16) // repeat previous + { + if (*bp >> 3 >= inlength) + { + Inflator_error = 50; // error, bit pointer jumps past memory + + return; + } + + replength = 3 + Zlib_readBitsFromStream(bp, in, 2); + uint32_t value; // set value to the previous code + + if ((i - 1) < HLIT) + { + value = bitlen->data[i - 1]; + } + else + { + value = bitlenD->data[i - HLIT - 1]; + } + + for (n = 0; n < replength; n++) // repeat this value in the next lengths + { + if (i >= HLIT + HDIST) + { + Inflator_error = 13; // error: i is larger than the amount of codes + + return; + } + + if (i < HLIT) + { + bitlen->data[i++] = value; + } + else + { + bitlenD->data[i++ - HLIT] = value; + } + } + } + else if (code == 17) // repeat "0" 3-10 times + { + if (*bp >> 3 >= inlength) + { + Inflator_error = 50; // error, bit pointer jumps past memory + + return; + } + + replength = 3 + Zlib_readBitsFromStream(bp, in, 3); + + for (n = 0; n < replength; n++) // repeat this value in the next lengths + { + if (i >= HLIT + HDIST) { + Inflator_error = 14; // error: i is larger than the amount of codes + + return; + } + + if (i < HLIT) + { + bitlen->data[i++] = 0; + } + else + { + bitlenD->data[i++ - HLIT] = 0; + } + } + } + else if (code == 18) // repeat "0" 11-138 times + { + if (*bp >> 3 >= inlength) + { + Inflator_error = 50; // error, bit pointer jumps past memory + + return; + } + + replength = 11 + Zlib_readBitsFromStream(bp, in, 7); + + for (n = 0; n < replength; n++) // repeat this value in the next lengths + { + if (i >= HLIT + HDIST) + { + Inflator_error = 15; // error: i is larger than the amount of codes + + return; + } + + if (i < HLIT) + { + bitlen->data[i++] = 0; + } + else + { + bitlenD->data[i++ - HLIT] = 0; + } + } + } + else + { + Inflator_error = 16; // error: an nonexitent code appeared. This can never happen. + + return; + } + } + + if (bitlen->data[256] == 0) + { + Inflator_error = 64; // the length of the end code 256 must be larger than 0 + return; + } + + // now we've finally got HLIT and HDIST, so generate the code trees, and the function is done + Inflator_error = HuffmanTree_makeFromLengths(tree, bitlen, 15); + + if (Inflator_error) + { + return; + } + + Inflator_error = HuffmanTree_makeFromLengths(treeD, bitlenD, 15); + + if (Inflator_error) + { + return; + } +} + + +//============================================================================== + +void Inflator_inflateHuffmanBlock(vector8_t *out, const uint8_t *in, size_t *bp, size_t *pos, size_t inlength, uint32_t btype) +{ + HuffmanTree *codetree, *codetreeD; // the code tree for Huffman codes, dist codes + codetree = HuffmanTree_new(); + codetreeD = HuffmanTree_new(); + + if (btype == 1) + { + Inflator_generateFixedTrees(codetree, codetreeD); + } + else if (btype == 2) + { + Inflator_getTreeInflateDynamic(codetree, codetreeD, in, bp, inlength); + + if (Inflator_error) + { + return; + } + } + for (;;) + { + uint32_t code = Inflator_huffmanDecodeSymbol(in, bp, codetree, inlength); + + if (Inflator_error) + { + return; + } + + if (code == 256) // end code + { + return; + } + else if (code <= 255) // literal symbol + { + if (*pos >= out->size) + { + vector8_resize(out, (*pos + 1) * 2); // reserve more room + } + + out->data[(*pos)++] = (uint8_t) code; + } + else if (code >= 257 && code <= 285) // length code + { + size_t length = LENBASE[code - 257], numextrabits = LENEXTRA[code - 257]; + + if ((*bp >> 3) >= inlength) + { + Inflator_error = 51; // error, bit pointer will jump past memory + return; + } + + length += Zlib_readBitsFromStream(bp, in, numextrabits); + uint32_t codeD = Inflator_huffmanDecodeSymbol(in, bp, codetreeD, inlength); + + if (Inflator_error) + { + return; + } + + if (codeD > 29) + { + Inflator_error = 18; // error: invalid dist code (30-31 are never used) + + return; + } + + uint32_t dist = DISTBASE[codeD], numextrabitsD = DISTEXTRA[codeD]; + + if ((*bp >> 3) >= inlength) + { + Inflator_error = 51; // error, bit pointer will jump past memory + + return; + } + + dist += Zlib_readBitsFromStream(bp, in, numextrabitsD); + size_t start = *pos, back = start - dist; // backwards + + if (*pos + length >= out->size) + { + vector8_resize(out, (*pos + length) * 2); // reserve more room + } + + size_t i; + + for (i = 0; i < length; i++) + { + out->data[(*pos)++] = out->data[back++]; + + if (back >= start) + { + back = start - dist; + } + } + } + } +} + + +#ifdef USE_ALL_1 +//============================================================================== + +void Inflator_inflateNoCompression(vector8_t *out, const uint8_t *in, size_t *bp, size_t *pos, size_t inlength) +{ + while ((*bp & 0x7) != 0) + { + (*bp)++; // go to first boundary of byte + } + + size_t p = *bp / 8; + + if (p >= inlength - 4) + { + Inflator_error = 52; // error, bit pointer will jump past memory + + return; + } + + uint32_t LEN = in[p] + 256 * in[p + 1]; + uint32_t NLEN = in[p + 2] + 256 * in[p + 3]; + p += 4; + + if (LEN + NLEN != 65535) + { + Inflator_error = 21; // error: NLEN is not one's complement of LEN + + return; + } + + if (*pos + LEN >= out->size) + { + vector8_resize(out, *pos + LEN); + } + + if (p + LEN > inlength) + { + Inflator_error = 23; // error: reading outside of in buffer + + return; + } + + uint32_t n; + + for (n = 0; n < LEN; n++) + { + out->data[(*pos)++] = in[p++]; // read LEN bytes of literal data + } + + *bp = p * 8; +} +#endif + + +//============================================================================== + +void Inflator_inflate(vector8_t *out, const vector8_t *in, size_t inpos) +{ + size_t bp = 0, pos = 0; // bit pointer and byte pointer + Inflator_error = 0; + uint32_t BFINAL = 0; + + while (!BFINAL && !Inflator_error) + { + if (bp >> 3 >= in->size) + { + Inflator_error = 52; // error, bit pointer will jump past memory + + return; + } + + BFINAL = Zlib_readBitFromStream(&bp, &in->data[inpos]); + uint32_t BTYPE = Zlib_readBitFromStream(&bp, &in->data[inpos]); + BTYPE += 2 * Zlib_readBitFromStream(&bp, &in->data[inpos]); + +/* if (BTYPE == 3) + { + Inflator_error = 20; // error: invalid BTYPE + + return; + } + else if (BTYPE == 0) + { + Inflator_inflateNoCompression(out, &in->data[inpos], &bp, &pos, in->size); + } + else + {*/ + Inflator_inflateHuffmanBlock(out, &in->data[inpos], &bp, &pos, in->size, BTYPE); + //} + } + + if (!Inflator_error) + { + vector8_resize(out, pos); // Only now we know the true size of out, resize it to that + } +} + + +#ifdef USE_ALL_1 +//============================================================================== + +int Zlib_decompress(vector8_t *out, const vector8_t *in) // returns error value +{ + if (in->size < 2) + { + return 53; // error, size of zlib data too small + } + + if ((in->data[0] * 256 + in->data[1]) % 31 != 0) + { + // error: 256 * in->data[0] + in->data[1] must be a multiple of 31, the FCHECK value is + // supposed to be made that way + return 24; + } + + uint32_t CM = in->data[0] & 15; + uint32_t CINFO = (in->data[0] >> 4) & 15; + uint32_t FDICT = (in->data[1] >> 5) & 1; + + if (CM != 8 || CINFO > 7) + { + // Error: only compression method 8: inflate with sliding window of 32k is supported by the PNG spec + return 25; + } + + if (FDICT != 0) + { + // Error: the PNG specification states: "The additional flags shall not specify a preset dictionary." + return 26; + } + + Inflator_inflate(out, in, 2); + + return Inflator_error; // note: adler32 checksum was skipped and ignored +} +#endif + + +//============================================================================== + +#define PNG_SIGNATURE 0x0a1a0a0d474e5089ull + +#define CHUNK_IHDR 0x52444849 +#define CHUNK_IDAT 0x54414449 +#define CHUNK_IEND 0x444e4549 +#define CHUNK_PLTE 0x45544c50 +#define CHUNK_tRNS 0x534e5274 + +int PNG_error; + + +#ifdef USE_ALL_1 +//============================================================================== + +uint32_t PNG_readBitFromReversedStream(size_t *bitp, const uint8_t *bits) +{ + uint32_t result = (bits[*bitp >> 3] >> (7 - (*bitp & 0x7))) & 1; + (*bitp)++; + + return result; +} + + +//============================================================================== + +uint32_t PNG_readBitsFromReversedStream(size_t *bitp, const uint8_t *bits, uint32_t nbits) +{ + uint32_t i, result = 0; + + for (i = nbits - 1; i < nbits; i--) + { + result += ((PNG_readBitFromReversedStream(bitp, bits)) << i); + } + + return result; +} + + +//============================================================================== + +void PNG_setBitOfReversedStream(size_t *bitp, uint8_t *bits, uint32_t bit) +{ + bits[*bitp >> 3] |= (bit << (7 - (*bitp & 0x7))); + (*bitp)++; +} +#endif + + +/* typedef struct Pixel32 +{ + union + { + struct + { + uint8 b, g, r, a; + }; + uint32 u; + }; +}; */ + +//============================================================================== + +uint32_t PNG_read32bitInt(const uint8_t *buffer) +{ + return (buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3]; +} + + +#ifdef USE_ALL_1 +//============================================================================== + +int PNG_checkColorValidity(uint32_t colorType, uint32_t bd) // return type is a LodePNG error code +{ + if ((colorType == 2 || colorType == 4 || colorType == 6)) + { + if (!(bd == 8 || bd == 16)) + { + return 37; + } + else + { + return 0; + } + } + else if (colorType == 0) + { + if (!(bd == 1 || bd == 2 || bd == 4 || bd == 8 || bd == 16)) + { + return 37; + } + else + { + return 0; + } + } + else if (colorType == 3) + { + if (!(bd == 1 || bd == 2 || bd == 4 || bd == 8)) + { + return 37; + } + else + { + return 0; + } + } + else + { + return 31; // nonexistent color type + } +} + + +//============================================================================== + +uint32_t PNG_getBpp(const PNG_info_t *info) +{ + uint32_t bitDepth = info->bitDepth; + uint32_t colorType = info->colorType; + + if (colorType == 2) + { + return (3 * bitDepth); + } + else if (colorType >= 4) + { + return (colorType - 2) * bitDepth; + } + else + { + return bitDepth; + } +} +#endif + + +//============================================================================== + +void PNG_readPngHeader(PNG_info_t *info, const uint8_t *in, size_t inlength) +{ + // read the information from the header and store it in the Info + if (inlength < 29) + { + PNG_error = 27; // error: the data length is smaller than the length of the header + return; + } + + if (*(uint64_t *) in != PNG_SIGNATURE) + { + PNG_error = 28; // no PNG signature + return; + } + + if (*(uint32_t *) &in[12] != CHUNK_IHDR) + { + PNG_error = 29; // error: it doesn't start with a IHDR chunk! + return; + } + + info->width = PNG_read32bitInt(&in[16]); + info->height = PNG_read32bitInt(&in[20]); + info->bitDepth = in[24]; + info->colorType = in[25]; + info->compressionMethod = in[26]; + + if (in[26] != 0) + { + PNG_error = 32; // error: only compression method 0 is allowed in the specification + return; + } + + info->filterMethod = in[27]; + + if (in[27] != 0) + { + PNG_error = 33; // error: only filter method 0 is allowed in the specification + return; + } + + info->interlaceMethod = in[28]; + + if (in[28] > 1) + { + PNG_error = 34; // error: only interlace methods 0 and 1 exist in the specification + return; + } +#ifdef USE_ALL_1 + PNG_error = PNG_checkColorValidity(info->colorType, info->bitDepth); +#endif +} + + +//============================================================================== + +int paethPredictor(int a, int b, int c) // Paeth predicter, used by PNG filter type 4 +{ + int p = a + b - c; + int pa = p > a ? (p - a) : (a - p); + int pb = p > b ? (p - b) : (b - p); + int pc = p > c ? (p - c) : (c - p); + + return (pa <= pb && pa <= pc) ? a : (pb <= pc ? b : c); +} + + +//============================================================================== + +// void PNG_unFilterScanline(uint8_t *recon, const uint8_t *scanline, const uint8_t *precon, size_t bytewidth, uint32_t filterType, size_t length) +void PNG_unFilterScanline(uint8_t *recon, const uint8_t *scanline, const uint8_t *precon, size_t bytewidth, uint8_t filterType, size_t length) +{ + size_t i; + + switch (filterType) + { + case 0: + for (i = 0; i < length; i++) + { + recon[i] = scanline[i]; + } + break; + + case 1: for (i = 0; i < bytewidth; i++) + { + recon[i] = scanline[i]; + } + + for (i = bytewidth; i < length; i++) + { + recon[i] = scanline[i] + recon[i - bytewidth]; + } + break; + + case 2: if (precon) + { + for (i = 0; i < length; i++) + { + recon[i] = scanline[i] + precon[i]; + } + } + else + { + for (i = 0; i < length; i++) + { + recon[i] = scanline[i]; + } + } + break; + + case 3: if (precon) + { + for (i = 0; i < bytewidth; i++) + { + recon[i] = scanline[i] + precon[i] / 2; + } + + for (i = bytewidth; i < length; i++) + { + recon[i] = scanline[i] + ((recon[i - bytewidth] + precon[i]) / 2); + } + } + else + { + for (i = 0; i < bytewidth; i++) + { + recon[i] = scanline[i]; + } + + for (i = bytewidth; i < length; i++) + { + recon[i] = scanline[i] + recon[i - bytewidth] / 2; + } + } + break; + + case 4: if (precon) + { + for (i = 0; i < bytewidth; i++) + { + recon[i] = (uint8_t) (scanline[i] + paethPredictor(0, precon[i], 0)); + } + + for (i = bytewidth; i < length; i++) + { + recon[i] = (uint8_t) (scanline[i] + paethPredictor(recon[i - bytewidth], precon[i], precon[i - bytewidth])); + } + } + else + { + for (i = 0; i < bytewidth; i++) + { + recon[i] = scanline[i]; + } + + for (i = bytewidth; i < length; i++) + { + recon[i] = (uint8_t) (scanline[i] + paethPredictor(recon[i - bytewidth], 0, 0)); + } + } + break; + + default: PNG_error = 36; // error: nonexistent filter type given + return; + } +} + +#ifdef USE_ALL_1 +/*============================================================================== + * filter and reposition the pixels into the output when the image is Adam7 interlaced. This + * function can only do it after the full image is already decoded. The out buffer must have + * the correct allocated memory size already. + */ + +void PNG_adam7Pass(uint8_t *out, uint8_t *linen, uint8_t *lineo, const uint8_t *in, uint32_t w, + size_t passleft, size_t passtop, size_t spacex, size_t spacey, size_t passw, size_t passh, uint32_t bpp) +{ + if (passw) + { + size_t bytewidth = (bpp + 7) / 8, linelength = 1 + ((bpp * passw + 7) / 8); + uint32_t y = 0; + + for (; y < passh; y++) + { + size_t i, b; + uint8_t filterType = in[y * linelength]; + uint8_t *prevline = (y == 0) ? 0 : lineo; + PNG_unFilterScanline(linen, &in[y * linelength + 1], prevline, bytewidth, filterType, (w * bpp + 7) / 8); + + if (!PNG_error) + { + if (bpp >= 8) + { + for (i = 0; i < passw; i++) + { + for (b = 0; b < bytewidth; b++) // b = current byte of this pixel + { + out[bytewidth * w * (passtop + spacey * y) + bytewidth * (passleft + spacex * i) + b] = linen[bytewidth * i + b]; + } + } + } + else + { + for (i = 0; i < passw; i++) + { + size_t obp = bpp * w * (passtop + spacey * y) + bpp * (passleft + spacex * i); + size_t bp = i * bpp; + + for (b = 0; b < bpp; b++) + { + PNG_setBitOfReversedStream(&obp, out, PNG_readBitFromReversedStream(&bp, linen)); + } + } + } + } + + uint8_t *temp = linen; + linen = lineo; + lineo = temp; // swap the two buffer pointers "line old" and "line new" + } + } +} + + +/*============================================================================== + * Converts any color type to 32-bit. + * Returns a LodePNG error code + */ + +int PNG_convert(const PNG_info_t *info, vector8_t *out, const uint8_t *in) +{ + size_t c, i; + uint32_t bitDepth, colorType; + bitDepth = info->bitDepth; + colorType = info->colorType; + size_t numpixels = info->width * info->height; + vector8_resize(out, numpixels * 4); + uint8_t *out_data = out->size ? out->data : 0; + + size_t bp = 0; + + if (bitDepth == 8 && colorType == 0) // Greyscale + { + for (i = 0; i < numpixels; i++) + { + out_data[4 * i + 0] = out_data[4 * i + 1] = out_data[4 * i + 2] = in[i]; + out_data[4 * i + 3] = (info->key_defined && (in[i] == info->key_r)) ? 0 : 255; + } + } + else if (bitDepth == 8 && colorType == 2) // RGB color + { + for (i = 0; i < numpixels; i++) + { + for (c = 0; c < 3; c++) + { + out_data[4 * i + c] = in[3 * i + c]; + } + + out_data[4 * i + 3] = (info->key_defined && (in[3 * i + 0] == info->key_r) && (in[3 * i + 1] == info->key_g) && (in[3 * i + 2] == info->key_b)) ? 0 : 255; + } + } + else if (bitDepth == 8 && colorType == 3) // indexed color (palette) + { + for (i = 0; i < numpixels; i++) + { + if (4U * in[i] >= info->palette->size) + { + return 46; + } + + for (c = 0; c < 4; c++) // Get rgb colors from the palette + { + out_data[4 * i + c] = info->palette->data[4 * in[i] + c]; + } + } + } + else if (bitDepth == 8 && colorType == 4) // Greyscale with alpha + { + for (i = 0; i < numpixels; i++) + { + out_data[4 * i + 0] = out_data[4 * i + 1] = out_data[4 * i + 2] = in[2 * i + 0]; + out_data[4 * i + 3] = in[2 * i + 1]; + } + } + else if (bitDepth == 8 && colorType == 6) + { + for (i = 0; i < numpixels; i++) + { + for (c = 0; c < 4; c++) + { + out_data[4 * i + c] = in[4 * i + c]; // RGB with alpha + } + } + } + else if (bitDepth == 16 && colorType == 0) // Greyscale + { + for (i = 0; i < numpixels; i++) + { + out_data[4 * i + 0] = out_data[4 * i + 1] = out_data[4 * i + 2] = in[2 * i]; + out_data[4 * i + 3] = (info->key_defined && (256U * in[i] + in[i + 1] == info->key_r)) ? 0 : 255; + } + } + else if (bitDepth == 16 && colorType == 2) // RGB color + { + for (i = 0; i < numpixels; i++) + { + for (c = 0; c < 3; c++) + { + out_data[4 * i + c] = in[6 * i + 2 * c]; + } + + out_data[4 * i + 3] = (info->key_defined && + (256U * in[6 * i + 0] + in[6 * i + 1] == info->key_r) && + (256U * in[6 * i + 2] + in[6 * i + 3] == info->key_g) && + (256U * in[6 * i + 4] + in[6 * i + 5] == info->key_b)) ? 0 : 255; + } + } + else if (bitDepth == 16 && colorType == 4) // Greyscale with alpha + { + for (i = 0; i < numpixels; i++) + { + out_data[4 * i + 0] = out_data[4 * i + 1] = out_data[4 * i + 2] = in[4 * i]; // msb + out_data[4 * i + 3] = in[4 * i + 2]; + } + } + else if (bitDepth == 16 && colorType == 6) + { + for (i = 0; i < numpixels; i++) + { + for (c = 0; c < 4; c++) + { + out_data[4 * i + c] = in[8 * i + 2 * c]; // RGB with alpha + } + } + } + else if (bitDepth < 8 && colorType == 0) // Greyscale + { + for (i = 0; i < numpixels; i++) + { + uint32_t value = (PNG_readBitsFromReversedStream(&bp, in, bitDepth) * 255) / ((1 << bitDepth) - 1); // Scale value from 0 to 255 + out_data[4 * i + 0] = out_data[4 * i + 1] = out_data[4 * i + 2] = (uint8_t) value; + out_data[4 * i + 3] = (info->key_defined && value && (((1U << bitDepth) - 1U) == info->key_r) && ((1U << bitDepth) - 1U)) ? 0 : 255; + } + } + else if (bitDepth < 8 && colorType == 3) // Palette + { + for (i = 0; i < numpixels; i++) + { + uint32_t value = PNG_readBitsFromReversedStream(&bp, in, bitDepth); + + if (4 * value >= info->palette->size) + { + return 47; + } + + for (c = 0; c < 4; c++) // Get RGB colors from the palette + { + out_data[4 * i + c] = info->palette->data[4 * value + c]; + } + } + } + return 0; +} +#endif + + +//============================================================================== + +PNG_info_t *PNG_info_new() +{ + PNG_info_t *info = png_alloc_malloc(sizeof(PNG_info_t)); + uint32_t i; + + for (i = 0; i < sizeof(PNG_info_t); i++) + { + ((uint8_t *) info)[i] = 0; + } + + info->palette = vector8_new(0, 0); + info->image = vector8_new(0, 0); + + return info; +} + + +//============================================================================== + +PNG_info_t *PNG_decode(const uint8_t *in, uint32_t size) +{ + if (size == 0 || in == 0) + { + PNG_error = 48; // the given data is empty + return NULL; + } + + PNG_error = 0; + PNG_info_t *info = PNG_info_new(); + PNG_readPngHeader(info, in, size); + + if (PNG_error) + { + return NULL; + } + + size_t pos = 33; // first byte of the first chunk after the header + vector8_t *idat = NULL; // the data from IDAT chunks + bool IEND = false; + bool known_type = true; + info->key_defined = false; + + /* + * Loop through the chunks, ignoring unknown chunks and stopping at IEND chunk. + * IDAT data is put at the start of the in buffer + */ + while (!IEND) + { + size_t i; + + if (pos + 8 >= size) + { + PNG_error = 30; // error: size of the in buffer too small to contain next chunk + return NULL; + } + + size_t chunkLength = PNG_read32bitInt(&in[pos]); + pos += 4; + + if (chunkLength > 0x7fffffff) + { + PNG_error = 63; + return NULL; + } + + if (pos + chunkLength >= size) + { + PNG_error = 35; // error: size of the in buffer too small to contain next chunk + return NULL; + } + + uint32_t chunkType = *(uint32_t *) &in[pos]; + + if (chunkType == CHUNK_IDAT) // IDAT: compressed image data chunk + { + size_t offset = 0; + + if (idat) + { + offset = idat->size; + vector8_resize(idat, offset + chunkLength); + } + else + { + idat = vector8_new(chunkLength, 0); + } + + for (i = 0; i < chunkLength; i++) + { + idat->data[offset + i] = in[pos + 4 + i]; + } + + pos += (4 + chunkLength); + } + else if (chunkType == CHUNK_IEND) // IEND + { + pos += 4; + IEND = true; + } +#ifdef USE_ALL_1 + else if (chunkType == CHUNK_PLTE) // PLTE: palette chunk + { + size_t j; + pos += 4; // go after the 4 letters + vector8_resize(info->palette, 4 * (chunkLength / 3)); + + if (info->palette->size > (4 * 256)) + { + PNG_error = 38; // error: palette too big + return NULL; + } + + for (i = 0; i < info->palette->size; i += 4) + { + for (j = 0; j < 3; j++) + { + info->palette->data[i + j] = in[pos++]; // RGB + } + + info->palette->data[i + 3] = 255; // alpha + } + } + else if (chunkType == CHUNK_tRNS) // tRNS: palette transparency chunk + { + pos += 4; // go after the 4 letters + + if (info->colorType == 3) + { + if (4 * chunkLength > info->palette->size) + { + PNG_error = 39; // error: more alpha values given than there are palette entries + return NULL; + } + + for (i = 0; i < chunkLength; i++) + { + info->palette->data[4 * i + 3] = in[pos++]; + } + } + else if (info->colorType == 0) + { + if (chunkLength != 2) + { + PNG_error = 40; // error: this chunk must be 2 bytes for greyscale image + return NULL; + } + + info->key_defined = true; + info->key_r = info->key_g = info->key_b = 256 * in[pos] + in[pos + 1]; + pos += 2; + } + else if (info->colorType == 2) + { + if (chunkLength != 6) + { + PNG_error = 41; // error: this chunk must be 6 bytes for RGB image + return NULL; + } + + info->key_defined = true; + info->key_r = 256 * in[pos] + in[pos + 1]; + pos += 2; + info->key_g = 256 * in[pos] + in[pos + 1]; + pos += 2; + info->key_b = 256 * in[pos] + in[pos + 1]; + pos += 2; + } + else + { + PNG_error = 42; // error: tRNS chunk not allowed for other color models + return NULL; + } + } +#endif + else // it's not an implemented chunk type, so ignore it: skip over the data + { + if (!(in[pos + 0] & 32)) + { + // error: unknown critical chunk (5th bit of first byte of chunk type is 0) + PNG_error = 69; + return NULL; + } + + pos += (chunkLength + 4); // skip 4 letters and uninterpreted data of unimplemented chunk + known_type = false; + } + + pos += 4; // step over CRC (which is ignored) + } + +#if USE_ALL_1 + uint32_t bpp = PNG_getBpp(info); +#else + uint32_t bpp = 32; +#endif + vector8_t *scanlines; // now the out buffer will be filled + scanlines = vector8_new(((info->width * (info->height * bpp + 7)) / 8) + info->height, 0); +#if USE_ALL_1 + PNG_error = Zlib_decompress(scanlines, idat); +#else + Inflator_inflate(scanlines, idat, 2); + PNG_error = Inflator_error; +#endif + + if (PNG_error) + { + return NULL; // stop if the zlib decompressor returned an error + } + + size_t bytewidth = (bpp + 7) / 8, outlength = (info->height * info->width * bpp + 7) / 8; + vector8_resize(info->image, outlength); // time to fill the out buffer + uint8_t *out_data = outlength ? info->image->data : 0; + +#ifdef USE_ALL_1 + if (info->interlaceMethod == 0) // no interlace, just filter + { + size_t obp, bp; +#endif + size_t y = 0; + size_t linestart = 0; + // length in bytes of a scanline, excluding the filtertype byte + size_t linelength = (info->width * bpp + 7) / 8; +#ifdef USE_ALL_1 + if (bpp >= 8) // byte per byte + { +#endif + for (y = 0; y < info->height; y++) + { +// uint32_t filterType = scanlines->data[linestart]; + uint8_t filterType = scanlines->data[linestart]; + const uint8_t *prevline; + prevline = (y == 0) ? 0 : &out_data[(y - 1) * info->width * bytewidth]; + PNG_unFilterScanline(&out_data[linestart - y], &scanlines->data[linestart + 1], prevline, bytewidth, filterType, linelength); + + if (PNG_error) + { + return NULL; + } + + linestart += (1 + linelength); // go to start of next scanline + } +#ifdef USE_ALL_1 + } + else // less than 8 bits per pixel, so fill it up bit per bit + { + vector8_t *templine; // only used if bpp < 8 + templine = vector8_new((info->width * bpp + 7) >> 3, 0); + + for (y = 0, obp = 0; y < info->height; y++) + { + // uint32_t filterType = scanlines->data[linestart]; + uint8_t filterType = scanlines->data[linestart]; + const uint8_t *prevline; + prevline = (y == 0) ? 0 : &out_data[(y - 1) * info->width * bytewidth]; + PNG_unFilterScanline(templine->data, &scanlines->data[linestart + 1], prevline, bytewidth, filterType, linelength); + + if (PNG_error) + { + return NULL; + } + + for (bp = 0; bp < info->width * bpp;) + { + PNG_setBitOfReversedStream(&obp, out_data, PNG_readBitFromReversedStream(&bp, templine->data)); + } + + linestart += (1 + linelength); // go to start of next scanline + } + } + } + else // interlaceMethod is 1 (Adam7) + { + int i; + size_t passw[7] = + { + (info->width + 7) / 8, (info->width + 3) / 8, (info->width + 3) / 4, + (info->width + 1) / 4, (info->width + 1) / 2, (info->width + 0) / 2, + (info->width + 0) / 1 + }; + + size_t passh[7] = + { + (info->height + 7) / 8, (info->height + 7) / 8, (info->height + 3) / 8, + (info->height + 3) / 4, (info->height + 1) / 4, (info->height + 1) / 2, + (info->height + 0) / 2 + }; + + size_t passstart[7] = { 0 }; + size_t pattern[28] = { 0, 4, 0, 2, 0, 1, 0, 0, 0, 4, 0, 2, 0, 1, 8, 8, 4, 4, 2, 2, 1, 8, 8, + 8, 4, 4, 2, 2 }; // values for the adam7 passes + + for (i = 0; i < 6; i++) + { + passstart[i + 1] = passstart[i] + passh[i] * ((passw[i] ? 1 : 0) + (passw[i] * bpp + 7) / 8); + } + + vector8_t *scanlineo, *scanlinen; // "old" and "new" scanline + scanlineo = vector8_new((info->width * bpp + 7) / 8, 0); + scanlinen = vector8_new((info->width * bpp + 7) / 8, 0); + + for (i = 0; i < 7; i++) + { + PNG_adam7Pass(out_data, scanlinen->data, scanlineo->data, &scanlines->data[passstart[i]], + info->width, pattern[i], pattern[i + 7], pattern[i + 14], pattern[i + 21], + passw[i], passh[i], bpp); + } + } + + if (info->colorType != 6 || info->bitDepth != 8) // conversion needed + { + vector8_t *copy = vector8_copy(info->image); // xxx: is this copy necessary? + PNG_error = PNG_convert(info, info->image, copy->data); + } +#endif + return info; +} diff --git a/i386/boot2/picopng.h b/i386/boot2/picopng.h new file mode 100644 index 0000000..66c2c9e --- /dev/null +++ b/i386/boot2/picopng.h @@ -0,0 +1,33 @@ +#ifndef _PICOPNG_H +#define _PICOPNG_H + +#include <stdint.h> + +typedef struct { + uint32_t *data; + size_t size; + size_t allocsize; +} vector32_t; + +typedef struct { + uint8_t *data; + size_t size; + size_t allocsize; +} vector8_t; + +typedef struct { + uint32_t width, height; + uint32_t colorType, bitDepth; + uint32_t compressionMethod, filterMethod, interlaceMethod; + uint32_t key_r, key_g, key_b; + bool key_defined; // is a transparent color key given? + vector8_t *palette; + vector8_t *image; +} PNG_info_t; + +PNG_info_t *PNG_decode(const uint8_t *in, uint32_t size); +void png_alloc_free_all(); + +extern int PNG_error; + +#endif diff --git a/i386/libsa/memory.h b/i386/libsa/memory.h index a769f12..5d9fda6 100755 --- a/i386/libsa/memory.h +++ b/i386/libsa/memory.h @@ -91,7 +91,7 @@ // 0x00100000L #define KERNEL_ADDR (VIDEO_ADDR + VIDEO_LEN) // Kernel and MKexts/drivers. -#define KERNEL_LEN 0x06000000L // Size: 96 MB (128 MB for Chameleon). +#define KERNEL_LEN 0x08000000L // Size: 128 MB. // // Note: Can cause a stop("Kernel overflows available space") // Based on KERNEL_LEN 0x04100000L diff --git a/i386/libsa/zalloc.c b/i386/libsa/zalloc.c index 533ccf9..f9f4a92 100755 --- a/i386/libsa/zalloc.c +++ b/i386/libsa/zalloc.c @@ -52,9 +52,9 @@ static char * zalloc_base; static char * zalloc_end; #if SAFE_MALLOC - static void (*zerror)(char *, size_t, const char *, int); + static void (*zerror)(char *, size_t, const char *, int); #else - static void (*zerror)(char *, size_t); + static void (*zerror)(char *, size_t); #endif static void zallocate(char * start,int size); @@ -66,7 +66,7 @@ static void zcoalesce(void); size_t zalloced_size; #endif -#define ZALLOC_NODES 16384 +#define ZALLOC_NODES 32767 /* was 16384 */ #if SAFE_MALLOC static void mallocError(char *addr, size_t size, const char *file, int line) @@ -141,8 +141,9 @@ static void zcoalesce(void); for (i = 0; i < availableNodes; i++) { - // find node with equal size, or if not found, - // then smallest node that fits. + /* + * Find node with equal size, or if not found, then smallest node that fits. + */ if (zavailable[i].size == size) { zallocate(ret = zavailable[i].start, size); @@ -208,11 +209,13 @@ void free(void * pointer) "subl $4, %%eax\n\t" "movl 0(%%eax), %%eax" : "=a" (rp)); #else - rp = 0; + rp = 0; #endif if (!start) + { return; + } for (i = 0; i < allocedNodes; i++) { diff --git a/i386/libsaio/Makefile b/i386/libsaio/Makefile index 49c531e..5aec3e6 100644 --- a/i386/libsaio/Makefile +++ b/i386/libsaio/Makefile @@ -11,6 +11,7 @@ # - Enabled clang compilation (dgsga, PikerAlpha, November 2012. Credits to Evan Lojewski for original work). # - Output change and now using libtool instead of ar/ranlib (PikerAlpha, November 2012). # - SAIO_OBJS changed / base64.o added (PikerAlpha, November 2012). +# - MAKE_TARGET_OS_VER added (PikerAlpha, June 2014). include ../MakePaths.dir @@ -25,6 +26,7 @@ CFLAGS = $(RC_CFLAGS) $(OPTIM) -arch i386 -g -Wmost \ -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ -DREVOBOOT_VERSION_INFO=\"RevoBoot\ v$(PRODUCT_VERSION_NUMBER)\" \ -DMAKE_TARGET_OS=$(PRODUCT_OS_TARGET) \ + -DMAKE_TARGET_OS_VER=$(PRODUCT_OS_TARGET_VERSION) \ -DSETTINGS_FILE=SETTINGS/$(MAKE_TARGET_MODEL).h \ -DSTATIC_DATA_FILENAME=$(MAKE_TARGET_MODEL).bin \ -DACPI_DATA_FILE=../../config/$(MAKE_ACPI_DATA_FILE) \ diff --git a/i386/libsaio/acpi.c b/i386/libsaio/acpi.c index c57ec93..5be5df4 100755 --- a/i386/libsaio/acpi.c +++ b/i386/libsaio/acpi.c @@ -44,7 +44,7 @@ void updateACPITableData(struct acpi_2_rsdp * rsdp, struct acpi_2_xsdt * xsdt, i { #if ACPI_10_SUPPORT - _ACPI_DEBUG_DUMP("\nPatching RSDP and RSDT tables... "); + _ACPI_DEBUG_DUMP("\nPatching RSDP and XSDT tables... "); // Update revision info (fake ACPI 2.0). rsdp->Revision = 1; diff --git a/i386/libsaio/acpi/essentials.h b/i386/libsaio/acpi/essentials.h index a68a031..d6bfbcf 100644 --- a/i386/libsaio/acpi/essentials.h +++ b/i386/libsaio/acpi/essentials.h @@ -172,7 +172,11 @@ typedef struct acpi_2_tables static ACPITables essentialTables[] = { { APIC, APIC_TABLE_SIGNATURE, replaceTable, kReplaceTable | kAddTable }, +#if DROP_FACTORY_DMAR_TABLE + { DMAR, DMAR_TABLE_SIGNATURE, NULL, kDropTable }, +#else { DMAR, DMAR_TABLE_SIGNATURE, NULL, kReplaceTable | kAddTable }, +#endif { NONE, FACP_TABLE_SIGNATURE, patchFACPTable, kPatchTable }, { HPET, HPET_TABLE_SIGNATURE, replaceTable, kReplaceTable }, { MCFG, MCFG_TABLE_SIGNATURE, NULL, kReplaceTable }, diff --git a/i386/libsaio/acpi/patcher.h b/i386/libsaio/acpi/patcher.h index 4fe1470..8610c4a 100644 --- a/i386/libsaio/acpi/patcher.h +++ b/i386/libsaio/acpi/patcher.h @@ -545,7 +545,7 @@ void setupACPI(void) // Yes, fix length. patchedXSDT->Length -= (ADDRESS_WIDTH * dropOffset); - _ACPI_DEBUG_DUMP("patchedXSDT->Length (changed): %d\n", patchedXSDT->Length); + _ACPI_DEBUG_DUMP("patchedXSDT->Length (changed): %d/%d\n", patchedXSDT->Length, (patchedXSDT->Length / ADDRESS_WIDTH)); } _ACPI_DEBUG_DUMP("\nRecalculating checksums / "); diff --git a/i386/libsaio/allocate.c b/i386/libsaio/allocate.c index eb84fbc..fda989b 100755 --- a/i386/libsaio/allocate.c +++ b/i386/libsaio/allocate.c @@ -23,7 +23,7 @@ * * * Updates: - * - Layout change only (PikerAlpha, November 2012) + * - Layout only change (PikerAlpha, November 2012) * */ @@ -39,31 +39,31 @@ //============================================================================== -long AllocateMemoryRange(char * rangeName, long start, long length, long type) +long AllocateMemoryRange(char * rangeName, long start, long length) { - char *nameBuf = malloc(strlen(rangeName) + 1); - - if (nameBuf) + if (rangeName) { - strcpy(nameBuf, rangeName); - - uint32_t *buffer = malloc(2 * sizeof(uint32_t)); - - if (buffer) + char *nameBuf = malloc(strlen(rangeName) + 1); + + if (nameBuf) { - buffer[0] = start; - buffer[1] = length; + strcpy(nameBuf, rangeName); + uint32_t *buffer = malloc(2 * sizeof(uint32_t)); + if (buffer) + { + buffer[0] = start; + buffer[1] = length; #if DEBUG - printf("AllocateMemoryRange : %s - 0x%lx - 0x%lx\n", nameBuf, length, start); + printf("AllocateMemoryRange(%s) @0x%lx, length 0x%lx\n", rangeName, start, length); #endif + DT__AddProperty(gPlatform.EFI.Nodes.MemoryMap, nameBuf, 2 * sizeof(uint32_t), (char *)buffer); + + return 0; + } - DT__AddProperty(gPlatform.EFI.Nodes.MemoryMap, nameBuf, 2 * sizeof(uint32_t), (char *)buffer); - - return 0; + free(nameBuf); } - - free(nameBuf); } return -1; @@ -91,7 +91,7 @@ long AllocateKernelMemory(long inSize) #if DEBUG printf("AllocateKernelMemory: 0x%lx - 0x%lx\n", address, inSize); - getchar(); + sleep(3); #endif return address; diff --git a/i386/libsaio/bootstruct.c b/i386/libsaio/bootstruct.c index 171fa06..e4fb55b 100755 --- a/i386/libsaio/bootstruct.c +++ b/i386/libsaio/bootstruct.c @@ -34,7 +34,7 @@ PrivateBootInfo_t *bootInfo; //============================================================================== -// Called from: boot() (common_boot() in Chameleon) in boot.c +// Called from function initPlatform in platform.c void initKernelBootConfig(void) { @@ -49,8 +49,10 @@ void initKernelBootConfig(void) bzero(bootArgs, sizeof(boot_args)); bzero(bootInfo, sizeof(PrivateBootInfo_t)); - // Set the default kernel name to: 'mach_kernel'. - strcpy(bootInfo->bootFile, kDefaultKernel); + // Set kernel name to: '/System/Library/Kernels/kernel' for 10.10 and greater + // and 'mach_kernel' for all previous versions of OS X. + // strcpy(bootInfo->bootFile, kDefaultKernel); + sprintf(bootInfo->bootFile, "%s", kDefaultKernel); // Get system memory map. Also update the size of the // conventional/extended memory for backwards compatibility. @@ -69,7 +71,6 @@ void initKernelBootConfig(void) } bootInfo->configEnd = bootInfo->config; - bootArgs->Video.v_display = VGA_TEXT_MODE; // What Lion species is screaming here? @@ -87,10 +88,38 @@ void initKernelBootConfig(void) // EFI selection is based on the CPU type. bootArgs->efiMode = (gPlatform.ArchCPUType == CPU_TYPE_X86_64) ? kBootArgsEfiMode64 : kBootArgsEfiMode32; -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 1 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. // Lion's new debug output (replacing a couple of former boot arguments). bootArgs->debugMode = EFI_DEBUG_MODE; // Defined in config/settings.h #endif + +#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. + // Adding a 16 KB log space. + bootArgs->performanceDataSize = 0; + bootArgs->performanceDataStart = 0; + + // AppleKeyStore.kext + bootArgs->keyStoreDataSize = 0; + bootArgs->keyStoreDataStart = 0; + + bootArgs->bootMemSize = 0; + bootArgs->bootMemStart = 0; + bootArgs->flags = 0; + +#if REBOOT_ON_PANIC + bootArgs->flags = kBootArgsFlagRebootOnPanic; +#endif + +#if UISCALE_2X + bootArgs->flags |= kBootArgsFlagHiDPI; +#endif + +#if BLACKMODE + bootArgs->flags |= kBootArgsFlagBlackTheme; // (kBootArgsFlagBlack + kBootArgsFlagBlackTheme); +#endif + + bootArgs->kslide = 0; +#endif } @@ -171,7 +200,7 @@ void finalizeKernelBootConfig(void) bootArgs->deviceTreeP = (uint32_t)addr; bootArgs->deviceTreeLength = size; -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 1 set like Lion. +/* #if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. // Adding a 16 KB log space. bootArgs->performanceDataSize = 0; bootArgs->performanceDataStart = 0; @@ -182,9 +211,12 @@ void finalizeKernelBootConfig(void) bootArgs->bootMemSize = 0; bootArgs->bootMemStart = 0; -#endif + + bootArgs->flags = kBootArgsFlagBlack; + bootArgs->kslide = 0; +#endif */ -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 1 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. bootArgs->FSBFrequency = gPlatform.CPU.FSBFrequency; #endif } diff --git a/i386/libsaio/bootstruct.h b/i386/libsaio/bootstruct.h index 77e42cb..abc1864 100755 --- a/i386/libsaio/bootstruct.h +++ b/i386/libsaio/bootstruct.h @@ -30,7 +30,28 @@ #include "bios.h" #include "platform.h" -#define kDefaultKernel "mach_kernel" +#if (MAKE_TARGET_OS == YOSEMITE) + #define kDefaultKernel "kernel" +#else + #define kDefaultKernel "mach_kernel" +#endif + +// Bitfields for boot_args->flags +#ifndef kBootArgsFlagRebootOnPanic + #define kBootArgsFlagRebootOnPanic (1 << 0) +#endif + +#ifndef kBootArgsFlagHiDPI + #define kBootArgsFlagHiDPI (1 << 1) +#endif + +#ifndef kBootArgsFlagBlack + #define kBootArgsFlagBlack (1 << 2) +#endif + +#ifndef kBootArgsFlagBlackTheme + #define kBootArgsFlagBlackTheme (1 << 6) +#endif // Snapshot constants with supported version / revision info. #define kBootArgsVersion_SnowLeopard 1 @@ -138,20 +159,19 @@ typedef struct PrivateBootInfo extern PrivateBootInfo_t *bootInfo; - typedef struct boot_args_new { uint16_t Revision; // Revision of boot_args structure. uint16_t Version; // Version of boot_args structure. -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 1 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. uint8_t efiMode; // 32 = 32-bit, 64 = 64-bit. uint8_t debugMode; // Bit field with behavior changes. -#if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) - uint8_t __reserved0; - uint8_t __reserved1; +// #if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) +#if (MAKE_TARGET_OS & MOUNTAIN_LION) + uint16_t flags; #else uint8_t __reserved1[2]; #endif @@ -175,14 +195,14 @@ typedef struct boot_args_new uint32_t efiRuntimeServicesPageStart; // Physical address of defragmented runtime pages. uint32_t efiRuntimeServicesPageCount; -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 1 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. uint64_t efiRuntimeServicesVirtualPageStart; // Virtual address of defragmented runtime pages. #endif uint32_t efiSystemTable; // Physical address of system table in runtime area. -#if ((MAKE_TARGET_OS & LION) == LION) // Mavericks and Mountain Lion also have bit 1 set like Lion. - uint32_t __reserved2; +#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. + uint32_t kslide; uint32_t performanceDataStart; // Physical address of log. uint32_t performanceDataSize; @@ -196,7 +216,8 @@ typedef struct boot_args_new uint64_t PhysicalMemorySize; uint64_t FSBFrequency; -#if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) +// #if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) +#if (MAKE_TARGET_OS & MOUNTAIN_LION) uint64_t pciConfigSpaceBaseAddress; uint32_t pciConfigSpaceStartBusNumber; uint32_t pciConfigSpaceEndBusNumber; diff --git a/i386/libsaio/cpu.c b/i386/libsaio/cpu.c index 7452c72..219374f 100644 --- a/i386/libsaio/cpu.c +++ b/i386/libsaio/cpu.c @@ -16,6 +16,7 @@ #include "cpu/cpuid.h" #include "cpu/proc_reg.h" + #if INTEL_CORE_TECHNOLOGY #if AUTOMATIC_SSDT_PR_CREATION || DEBUG_CPU_TDP @@ -55,7 +56,7 @@ void initTurboRatios() { // Get turbo ratio(s). uint64_t msr = rdmsr64(MSR_TURBO_RATIO_LIMIT); - + #if AUTOMATIC_SSDT_PR_CREATION || DEBUG_CPU_TURBO_RATIOS // All CPU's have at least two cores (think mobility CPU here). gPlatform.CPU.CoreTurboRatio[0] = bitfield32(msr, 7, 0); @@ -216,7 +217,8 @@ void checkFlexRatioMSR(void) } } } -#endif +#endif // INTEL_CORE_TECHNOLOGY + #if USE_STATIC_CPU_DATA diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index 51d81f5..f25485b 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -21,10 +21,9 @@ #define DEFAULT_FSB 100000 // Hardcoded to 100MHz #define BASE_NHM_CLOCK_SOURCE 133333333ULL -#define DEBUG_CPU_EXTREME 0 //============================================================================== -// DFE: Measures the TSC frequency in Hz (64-bit) using the ACPI PM timer +// Measures TSC frequency using the i8254 Programmable Interval Timer counter 2 static uint64_t getTSCFrequency(void) { @@ -214,6 +213,14 @@ void initCPUStruct(void) if ((getCachedCPUID(LEAF_80, eax) & 0x0000000f) >= 1) { do_cpuid(0x80000001, gPlatform.CPU.ID[LEAF_81]); // Extended Feature Bits (Function 80000001h). + + #if DEBUG_CPU + // Test if the LongMode-bit is set or not. + if ((getCachedCPUID(LEAF_81, edx) & 0x20000000) == 0x20000000) + { + _CPU_DEBUG_DUMP("CPU: LongMode (64-bit) is support\n"); + } + #endif } #if DEBUG_CPU_EXTREME { @@ -414,7 +421,7 @@ void initCPUStruct(void) #if AUTOMATIC_SSDT_PR_CREATION || DEBUG_CPU_TDP gPlatform.CPU.TDP = getTDP(); #endif - qpiSpeed = 0; // No QPI but DMI for Sandy Bridge processors. + qpiSpeed = 0; // No QPI but DMI for Sandy Bridge and greater processors. // Disable C1/C3 state auto demotion i.e. it won't change C3/C6/C7 requests to C1/C3. // wrmsr64(MSR_PKG_CST_CONFIG_CONTROL, 0x1E000003ULL); @@ -427,6 +434,11 @@ void initCPUStruct(void) // msr = rdmsr64(MSR_PKG_CST_CONFIG_CONTROL); // wrmsr64(MSR_MISC_PWR_MGMT, (msr & 0xFFFEFBFF)); + wrmsr64(MSR_PKG_POWER_LIMIT, 0x4283E800DD8230); + // wrmsr64(MSR_PP0_CURRENT_CONFIG, 0x40101414000002F8); + wrmsr64(MSR_PP0_POWER_LIMIT, 0); + wrmsr64(MSR_PP1_POWER_LIMIT, 0); + checkFlexRatioMSR(); } #endif // #if INTEL_CORE_TECHNOLOGY diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index 6ef5ada..a62543c 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -171,7 +171,7 @@ #define CPU_MODEL_DALES_32NM 0x25 // Clarkdale, Arrandale #define CPU_MODEL_SB_CORE 0x2A // Sandy Bridge Core Processors (LGA 1155) #define CPU_MODEL_WESTMERE 0x2C // Gulftown, Westmere-EP, Westmere-WS -#define CPU_MODEL_SB_JAKETOWN 0x2D // Sandy Bridge Xeon Processors (LGA 2011) +#define CPU_MODEL_SB_JAKETOWN 0x2D // Sandy Bridge-EP, Sandy Bridge Xeon Processors (LGA 2011) #define CPU_MODEL_NEHALEM_EX 0x2E #define CPU_MODEL_WESTMERE_EX 0x2F #define CPU_MODEL_IB_CORE 0x3A // Ivy Bridge Core Processors (LGA 1155) diff --git a/i386/libsaio/device_tree.c b/i386/libsaio/device_tree.c index 9949fc2..4e8a252 100755 --- a/i386/libsaio/device_tree.c +++ b/i386/libsaio/device_tree.c @@ -79,10 +79,6 @@ Property * DT__AddProperty(Node *node, const char *name, uint32_t length, void * { Property *prop; -#if (DEBUG_EFI & 2) - _EFI_DEBUG_DUMP("DT__AddProperty([Node '%s'], '%s', %d, 0x%x)\n", DT__GetName(node), name, length, value); -#endif - if (freeProperties == NULL) { void *buf = malloc(kAllocSize); @@ -113,6 +109,10 @@ Property * DT__AddProperty(Node *node, const char *name, uint32_t length, void * } } +#if (DEBUG_EFI & 2) + _EFI_DEBUG_DUMP("DT__AddProperty([Node '%s'], '%s', %d, 0x%x)\n", DT__GetName(node), name, length, value); +#endif + prop = freeProperties; freeProperties = prop->next; @@ -206,6 +206,7 @@ Node * DT__AddChild(Node *parent, const char *name) } DTInfo.numNodes++; + DT__AddProperty(node, "name", strlen(name) + 1, (void *) name); return node; @@ -357,9 +358,7 @@ void DT__FlattenDeviceTree(void **buffer_p, uint32_t *length) } #endif - totalSize = DTInfo.numNodes * sizeof(DeviceTreeNode) + - DTInfo.numProperties * sizeof(DeviceTreeNodeProperty) + - DTInfo.totalPropertySize; + totalSize = DTInfo.numNodes * sizeof(DeviceTreeNode) + DTInfo.numProperties * sizeof(DeviceTreeNodeProperty) + DTInfo.totalPropertySize; #if (DEBUG_EFI & 2) _EFI_DEBUG_DUMP("Total size 0x%x\n", totalSize); diff --git a/i386/libsaio/device_tree.h b/i386/libsaio/device_tree.h index 0bfbf23..b33a6fb 100755 --- a/i386/libsaio/device_tree.h +++ b/i386/libsaio/device_tree.h @@ -50,7 +50,6 @@ typedef struct _Node struct _Node * next; } Node; - extern Property * DT__AddProperty(Node *node, const char *name, uint32_t length, void *value); extern Node * DT__AddChild(Node *parent, const char *name); diff --git a/i386/libsaio/efi/efi.h b/i386/libsaio/efi/efi.h index f5f834c..c19c789 100755 --- a/i386/libsaio/efi/efi.h +++ b/i386/libsaio/efi/efi.h @@ -44,7 +44,7 @@ #define EFI_MAX_CONFIG_TABLES 5 #if EFI_64_BIT - // Mountain Lion + // Mountain Lion, Mavericks and Yosemite // // movabs $0x8000000000000003,%rax // ret diff --git a/i386/libsaio/efi/fake_efi.h b/i386/libsaio/efi/fake_efi.h index a471d88..87a988e 100755 --- a/i386/libsaio/efi/fake_efi.h +++ b/i386/libsaio/efi/fake_efi.h @@ -34,7 +34,6 @@ #include "bootstruct.h" // For bootArgs. - //------------------------------------------------------------------------------ extern void setupACPI(void); @@ -120,6 +119,13 @@ extern EFI_STATUS addConfigurationTable(EFI_GUID const *pGuid, void * table, cha { DT__AddProperty(tableNode, "alias", strlen(tableAlias) + 1, (char *)tableAlias); } + + if (strcmp(tableAlias, "ACPI_20") == 0) + { + Node *acpiTablesNode = DT__AddChild(tableNode, "ACPI Tables"); + + gPlatform.EFI.Nodes.ACPI_Tables = acpiTablesNode; + } gPlatform.EFI.SystemTable->NumberOfTableEntries++; } @@ -127,7 +133,6 @@ extern EFI_STATUS addConfigurationTable(EFI_GUID const *pGuid, void * table, cha return EFI_SUCCESS; } - //============================================================================== // Allocate fake EFI system / runtime services table. diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index 4d6bd85..0c8f587 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -34,6 +34,7 @@ #include <mach/machine/thread_status.h> #include <sl.h> +#include "platform.h" /*** * Backward compatibility fix for the SDK 10.7 version of loader.h @@ -43,9 +44,18 @@ #define LC_MAIN (0x28|LC_REQ_DYLD) /* replacement for LC_UNIXTHREAD */ #endif -#define NVRAM_GUID_UINT64 0x3530454445314434 -#define OPTIONS_STRING_UINT64 0x736e6f6974706f2f +#define NVRAM_GUID_UINT64 0x3530454445314434 +#define OPTIONS_STRING_UINT64 0x736e6f6974706f2f +/*** + * Tip: Reverse bytes if you search for the IDs with grep/HexEdit. + */ +// #define APPLE_HDA_PATCH_ID 0x11D419843D107410 10.9.2 and 10.9.3 +// #define APPLE_HDA_PATCH_ID 0x11D419843D397410 +// #define APPLE_HDA_TARGET_ID 0x10EC08923D397410 + +// #define APPLE_HDA_CONTROLLER_PATCH_ID 0x30EB617500000C0C +// #define APPLE_HDA_CONTROLLER_TARGET_ID 0x0EEB617500000C0C // Load MKext(s) or separate kexts (default behaviour / behavior). bool gLoadKernelDrivers = true; @@ -53,7 +63,10 @@ bool gLoadKernelDrivers = true; // Private functions. static long DecodeSegment(long cmdBase, unsigned int*load_addr, unsigned int *load_size); static long DecodeUnixThread(long cmdBase, unsigned int *entry); + +#if ADD_SYMTAB static long DecodeSymbolTable(long cmdBase); +#endif static unsigned long gBinaryAddress; @@ -136,6 +149,7 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) mH = (struct mach_header *)(gBinaryAddress); #if DEBUG + printf("In DecodeMachO()\n"); printf("magic: %x\n", (unsigned)mH->magic); printf("cputype: %x\n", (unsigned)mH->cputype); printf("cpusubtype: %x\n", (unsigned)mH->cpusubtype); @@ -159,7 +173,7 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) if (mH->magic != MH_MAGIC) { - error("Mach-O file has bad magic number\n"); + error("Mach-O (i386) file has bad magic number\n"); return -1; } @@ -175,7 +189,7 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) if (mH->magic != MH_MAGIC_64) { - error("Mach-O file has bad magic number\n"); + error("Mach-O file (x86_64) has bad magic number\n"); return -1; } @@ -240,6 +254,7 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) *rsize = vmend - vmaddr; *raddr = (char *)vmaddr; +#if ADD_SYMTAB cmdBase = cmdstart; for (cnt = 0; cnt < ncmds; cnt++) @@ -257,11 +272,73 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) cmdBase += cmdsize; } - +#endif return ret; } +/* #if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION_NEW) +//============================================================================== +// +// Kernel patch routine for iMessage +// +// This segment will be replaced by random data (since 18 April 2011) and released +// when the kernel is done with it. Meaning that our data is short lived as well. +if (strncmp(segname, "__KLD", 5) == 0) +{ + uint32_t index = 0; + uint32_t offset = sizeof(struct segment_command_64); + + while(offset < segCmd->cmdsize) + { + struct section_64 *section = (struct section_64 *)((char *)segCmd + offset); + offset += sizeof(struct section_64); + + if (strncmp((char *)section->sectname, "__cstring", 9) == 0) + { + uint64_t sectionStart = (fileaddr + index); + uint64_t sectionEnd = (fileaddr + filesize); + + unsigned char * baseAddress = (unsigned char *)sectionStart; + + // Search for the NVRAM GUID. + for (; baseAddress <= (unsigned char *)sectionEnd; baseAddress++) + { + if (*(uint64_t *)baseAddress == NVRAM_GUID_UINT64) + { + // Zero out NVRAM GUID + bzero((char *)baseAddress, 36); + // Replace/inject GUID replacement + memcpy((char *)baseAddress, "NVRAM", 5); + // Point to the end of the (former) NVRAM GUID string + baseAddress += 36; + + // Search for "/options" after the GUID. + for (; baseAddress <= (unsigned char *)sectionEnd; baseAddress++) + { + if (*(uint64_t *)baseAddress == OPTIONS_STRING_UINT64) + { + // Rename /option to /RevoEFI (just temporarily) + memcpy((unsigned char *)baseAddress, "/RevoEFI", 8); + // Prepare to break out early. + baseAddress = (unsigned char *)(sectionEnd + 1); + // Done. + break; + } + } + } + } + } + else + { + // Skip unwanted sections (which makes us a little faster). + index += section->size; + } + } +} +#endif */ + + //============================================================================== // Private function. Called from DecodeMachO() // Refactoring and segment name fix for OS X 10.6+ by DHP in 2010. @@ -282,14 +359,19 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l filesize = segCmd->filesize; segname = segCmd->segname; -#if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) - // - // Kernel patch routine for iMessage +#if ((MAKE_TARGET_OS & LION) == LION) + // + // Kernel patch routine for iMessage (LION, MOUNTAIN_LION, MAVERICKS and YOSEMITE). + // + #if IMESSAGE_PATCH_ENABLED // // This segment will be replaced by random data (since 18 April 2011) and released // when the kernel is done with it. Meaning that our data is short lived as well. + // if (strncmp(segname, "__KLD", 5) == 0) { + // printf ("__KLD found!\n"); + uint32_t index = 0; uint32_t offset = sizeof(struct segment_command_64); @@ -300,6 +382,8 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l if (strncmp((char *)section->sectname, "__cstring", 9) == 0) { + // printf ("__KLD found!\n"); + uint64_t sectionStart = (fileaddr + index); uint64_t sectionEnd = (fileaddr + filesize); @@ -310,6 +394,8 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l { if (*(uint64_t *)baseAddress == NVRAM_GUID_UINT64) { + // printf ("NVRAM GUID found!\n"); + // Zero out NVRAM GUID bzero((char *)baseAddress, 36); // Replace/inject GUID replacement @@ -322,6 +408,8 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l { if (*(uint64_t *)baseAddress == OPTIONS_STRING_UINT64) { + // printf ("/option renamed to /RevoEFI!\n"); + // Rename /option to /RevoEFI (just temporarily) memcpy((unsigned char *)baseAddress, "/RevoEFI", 8); // Prepare to break out early. @@ -339,8 +427,75 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l index += section->size; } } +#if DEBUG + sleep(5); +#endif } + #endif // #if IMESSAGE_PATCH_ENABLED + +#if KERNELCACHE_PATCHING_ENABLED + #if IMESSAGE_PATCH_ENABLED + else + #endif + if (strncmp(segname, "__PRELINK_TEXT", 14) == 0) + { + // printf("Target segname found: __PRELINK_TEXT\n"); + + uint32_t index2 = 0; + uint32_t offset2 = sizeof(struct segment_command_64); + + while(offset2 < segCmd->cmdsize) + { + struct section_64 *section2 = (struct section_64 *)((char *)segCmd + offset2); + offset2 += sizeof(struct section_64); + + if (strncmp((char *)section2->sectname, "__text", 6) == 0) + { + // printf("Target section found: __PRELINK_TEXT\n"); + + uint64_t sectionStart2 = (fileaddr + index2); + uint64_t sectionEnd2 = (fileaddr + filesize); + + unsigned char * baseAddress2 = (unsigned char *)sectionStart2; + + // Search for APPLE_HDA_PATCH_ID byte sequence. + for (; baseAddress2 <= (unsigned char *)sectionEnd2; baseAddress2++) + { +#ifdef APPLE_HDA_PATCH_ID + if (*(uint64_t *)baseAddress2 == APPLE_HDA_PATCH_ID) + { + // printf("DO APPLE_HDA_PATCH_ID\n"); + // Replace APPLE_HDA_PATCH_ID with APPLE_HDA_TARGET_ID + *(uint64_t *)baseAddress2 = APPLE_HDA_TARGET_ID; + } +#endif + +#ifdef APPLE_HDA_CONTROLLER_PATCH_ID + #if APPLE_HDA_PATCH_ID + else if + #else + if + #endif + (*(uint64_t *)baseAddress2 == APPLE_HDA_CONTROLLER_PATCH_ID) + { + // printf("DO APPLE_HDA_CONTROLLER_PATCH_ID\n"); + // Replace APPLE_HDA_CONTROLLER_PATCH_ID with APPLE_HDA_CONTROLLER_TARGET_ID + *(uint64_t *)baseAddress2 = APPLE_HDA_CONTROLLER_TARGET_ID; + } #endif + } + } + else + { + // Skip unwanted sections. + index2 += section2->size; + } + } + // printf("sleeping for 2 seconds!\n"); + // sleep(2); + } +#endif // #if KERNELCACHE_PATCH_ENABLED +#endif // #if ((MAKE_TARGET_OS & LION) == LION) } else { @@ -443,7 +598,7 @@ static long DecodeUnixThread(long cmdBase, unsigned int *entry) } } - +#if ADD_SYMTAB //============================================================================== // Private function. Called from DecodeMachO() @@ -468,7 +623,7 @@ static long DecodeSymbolTable(long cmdBase) gSymbolTableSize = totalSize + sizeof(struct symtab_command); gSymbolTableAddr = AllocateKernelMemory(gSymbolTableSize); // Add the SymTab to the memory-map. - AllocateMemoryRange("Kernel-__SYMTAB", gSymbolTableAddr, gSymbolTableSize, -1); + AllocateMemoryRange("Kernel-__SYMTAB", gSymbolTableAddr, gSymbolTableSize); symTableSave = (struct symtab_command *)gSymbolTableAddr; tmpAddr = gSymbolTableAddr + sizeof(struct symtab_command); @@ -482,7 +637,7 @@ static long DecodeSymbolTable(long cmdBase) return 0; } - +#endif //============================================================================== // Public function (RevoBoot v1.5.30 and greater). Called from our ACPI patcher diff --git a/i386/libsaio/platform.c b/i386/libsaio/platform.c index 8ddea37..8910902 100644 --- a/i386/libsaio/platform.c +++ b/i386/libsaio/platform.c @@ -5,6 +5,8 @@ * Updates: * * - STATIC_SMBIOS_MODEL_ID renamed to SMB_PRODUCT_NAME (PikerAlpha, October 2012). + * - Yosemite support added (PikerAlpha, June 2014). + * - Replaced hard-coded OS version control with a flexible one (PikerAlpha, June 2014). * */ @@ -132,7 +134,7 @@ void initPlatform(int biosDevice, bool bootRecoveryHD) // Copied from cpu/dynamic_data.h to make printf work this early on. #if DEBUG_STATE_ENABLED extern void setVideoMode(int mode); - setVideoMode(0); // Switch to VGA_TEXT_MODE + setVideoMode(VGA_TEXT_MODE); #endif #if ENABLE_HPET @@ -200,16 +202,10 @@ void initPlatform(int biosDevice, bool bootRecoveryHD) gPlatform.CPU.Mobile = true; // Will be initialized in cpu/cpu_dynamic.h (used in smbios/dynamic_data.h) } -#if (MAKE_TARGET_OS == MAVERICKS) - gPlatform.OSVersion = strdup("10.9"); -#elif (MAKE_TARGET_OS == LION) - gPlatform.OSVersion = strdup("10.7"); -#elif (MAKE_TARGET_OS == MOUNTAIN_LION) - gPlatform.OSVersion = strdup("10.8"); -#else // Snow Leopard - gPlatform.OSVersion = strdup("10.6"); -#endif - + // MAKE_TARGET_OS_VER is defined in RevoBoot/i386/libsaio/Makefile + // and exported from the main RevoBoot/Makefile + gPlatform.OSVersion = MAKE_TARGET_OS_VER; + // _PLATFORM_DEBUG_DUMP("REVOBOOT_OS_TARGET: %d\n", REVOBOOT_OS_TARGET); gPlatform.OSType = (int) MAKE_TARGET_OS; diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index e2bd3a2..4b29079 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -5,30 +5,38 @@ * * - SMBIOS data logic moved to preprocessor code (PikerAlpha, October 2012). * - Now includes: RevoBoot/libsaoi/i386/SMBIOS/model_data.h (PikerAlpha, October 2012). + * - DDR4 support added (PikerAlpha, June 2014). + * - Yosemite support added (PikerAlpha, June 2014). * */ #ifndef __LIBSAIO_PLATFORM_H #define __LIBSAIO_PLATFORM_H +#define __LP64__ 1 + #include "libsaio.h" #include "cpu/essentials.h" #include "efi/essentials.h" #include "efi/efi.h" #include "device_tree.h" + + //------------------------------------------------------------------------------ #define SNOW_LEOPARD 1 // Snow Leopard. #define LION 2 // Lion (the default). #define MOUNTAIN_LION 6 // Mountain Lion (includes Lion changes). #define MAVERICKS 10 // Mavericks (includes Lion changes). +#define YOSEMITE 26 // Yosemite (incl. Lion/Mavericks changes). //------------------------------------------------------------------------------ #define SMB_MEM_TYPE_DDR2 19 #define SMB_MEM_TYPE_FBDIMM 20 #define SMB_MEM_TYPE_DDR3 24 +#define SMB_MEM_TYPE_DDR4 26 //------------------------------------------------------------------------------ @@ -39,6 +47,7 @@ #define SMB_MEM_SIZE_8GB (SMB_MEM_SIZE_1GB * 8) #define SMB_MEM_SIZE_16GB (SMB_MEM_SIZE_1GB * 16) #define SMB_MEM_SIZE_32GB (SMB_MEM_SIZE_1GB * 32) // May not be supported! +#define SMB_MEM_SIZE_64GB (SMB_MEM_SIZE_1GB * 64) // May not be supported! //------------------------------------------------------------------------------ // All currently supported models are defined below. @@ -284,7 +293,7 @@ typedef struct _PlatformInfo_t { Node * RootNode; // Path: / } DT; - + struct EFI { EFI_SYSTEM_TABLE * SystemTable; // Used to re-calculate the checksum at the end of the run. @@ -296,6 +305,7 @@ typedef struct _PlatformInfo_t // EFI specific stuff. Node * ConfigurationTable; // Path: /efi/configuration-table + Node * ACPI_Tables; // Path: /efi/configuration-table/ACPI Tables Node * RuntimeServices; // Path: /efi/runtime-services Node * Platform; // Path: /efi/platform } Nodes; @@ -329,6 +339,7 @@ typedef struct _PlatformInfo_t } PlatformInfo_t; + //------------------------------------------------------------------------------ /* cpu/static_data.h & cpu/dynamic_data.h */ diff --git a/i386/libsaio/saio_internal.h b/i386/libsaio/saio_internal.h index ecdb389..1a4f627 100755 --- a/i386/libsaio/saio_internal.h +++ b/i386/libsaio/saio_internal.h @@ -41,6 +41,7 @@ extern void real_to_prot(void); extern void prot_to_real(void); extern void halt(void); extern void startMachKernel(unsigned int address, void *arg); +extern uint64_t computeRand(void); /* bios.s */ @@ -151,7 +152,7 @@ extern long loadBinaryData(char *aFilePath, void **aMemoryAddress); /* memory.c */ long AllocateKernelMemory(long inSize); -long AllocateMemoryRange(char * rangeName, long start, long length, long type); +long AllocateMemoryRange(char * rangeName, long start, long length); /* platform.c */ diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index 991c529..54fcc90 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -208,7 +208,7 @@ void setupSMBIOS(void) //-------------------------------------------------------------------------- // Allocate 1 page of kernel memory (sufficient for a stripped SMBIOS table). - void * kernelMemory = (void *)AllocateKernelMemory(4096); + void * kernelMemory = (void *)AllocateKernelMemory(8192); // 4096); // Setup a new Entry Point Structure at the beginning of the newly allocated memory page. struct SMBEntryPoint * newEPS = (struct SMBEntryPoint *) kernelMemory; diff --git a/i386/libsaio/smbios/getters.h b/i386/libsaio/smbios/getters.h index 1ce0b59..09739a5 100755 --- a/i386/libsaio/smbios/getters.h +++ b/i386/libsaio/smbios/getters.h @@ -97,7 +97,7 @@ static SMBWord getFSBFrequency(void) /* * Returning zero (0) here is invalid, but we can get away with it because - * of XNU's check in tsc.init() which effectively catches the invalid value + * of XNU's check in tsc_init() which effectively catches the invalid value * and set it to 100 MHz for Sandy Bridge CPU's (133 MHz when quad pumped). * * Note: We don't want to lose the OC feedback in GeekBench et all and that @@ -322,7 +322,7 @@ static const char * getBIOSDate(void) // biosDate[10] = 0; - _SMBIOS_DEBUG_DUMP("biosData = %s\n", biosDate); + _SMBIOS_DEBUG_DUMP("biosDate = %s\n", biosDate); _SMBIOS_DEBUG_SLEEP(5); const char * retValue = biosDate; diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index c445e01..93a24df 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -69,11 +69,16 @@ #define SMB_PRODUCT_NAME "iMac14,2" #define SMB_BOARD_PRODUCT "Mac-27ADBB7B4CEE8E61" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '2' } - #else // Defaults to iMac 14,3 + #elif (TARGET_MODEL == IMAC_143) #define SMB_BIOS_VERSION "IM143.88Z.0118.B00.1309031249" #define SMB_PRODUCT_NAME "iMac14,3" #define SMB_BOARD_PRODUCT "Mac-77EB7D7DAF985301" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '3' } + #else // Defaults to iMac 14,4 + #define SMB_BIOS_VERSION "IM144.88Z.0179.B03.1405241029" + #define SMB_PRODUCT_NAME "iMac14,4" + #define SMB_BOARD_PRODUCT "Mac-81E3E92DD6088272" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '4' } #endif // ------------------------------------------------------------------------------------- #endif @@ -112,14 +117,14 @@ #elif (TARGET_MODEL == MACBOOK_AIR_61) // Intel Core i5-4250U @ 1.30 GHz (2 cores - 4 threads) // Intel Core i7-4650U @ 1.70 GHz (2 cores - 4 threads) - #define SMB_BIOS_VERSION "MBA61.88Z.0099.B04.1309271229" + #define SMB_BIOS_VERSION "MBA61.88Z.0099.B12.1405241030" #define SMB_PRODUCT_NAME "MacBookAir6,1" #define SMB_BOARD_PRODUCT "Mac-35C1E88140C3E6CF" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '6', ',', '1' } #else // Defaults to MacBookAir6,2 // Intel Core i5-4250U @ 1.30 GHz (2 cores - 4 threads) // Intel Core i7-4650U @ 1.70 GHz (2 cores - 4 threads) - #define SMB_BIOS_VERSION "MBA61.88Z.0099.B04.1309271229" + #define SMB_BIOS_VERSION "MBA61.88Z.0099.B12.1405241030" #define SMB_PRODUCT_NAME "MacBookAir6,2" #define SMB_BOARD_PRODUCT "Mac-7DF21CB3ED6977E5" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '6', ',', '2' } @@ -183,7 +188,7 @@ // Intel Core i5-4258U @ 2.40 GHz - 2 cores / 4 threads. // Intel Core i5-4288U @ 2.60 GHz - 2 cores / 4 threads. // Intel Core i7-4558U @ 2.80 GHz - 2 cores / 4 threads. - #define SMB_BIOS_VERSION "MBP111.88Z.0138.B03.1310291227" + #define SMB_BIOS_VERSION "MBP111.88Z.0138.B07.1402121134" #define SMB_PRODUCT_NAME "MacBookPro11,1" #define SMB_BOARD_PRODUCT "Mac-189A3D4F975D5FFC" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '1', ',', '1' } @@ -197,7 +202,7 @@ #else // Intel Core i7-4850HQ @ 2.30 GHz - 4 cores / 8 threads. // Intel Core i7-4960HQ @ 2.60 GHz - 4 cores / 8 threads. - #define SMB_BIOS_VERSION "MBP112.88Z.0138.B02.1310181745" + #define SMB_BIOS_VERSION "MBP112.88Z.0138.B08.1406081756" #define SMB_PRODUCT_NAME "MacBookPro11,3" #define SMB_BOARD_PRODUCT "Mac-2BD1B31983FE1663" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '1', ',', '3' } @@ -240,12 +245,24 @@ #define SMB_PRODUCT_NAME "Macmini6,1" #define SMB_BOARD_PRODUCT "Mac-031AEE4D24BFF0B1" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '1' } - #else // Defaults to Macmini6,2 + #elif (TARGET_MODEL == MACMINI_62) // Intel Core i7-3615QM @ 2.30 GHz (4 cores - 8 threads) #define SMB_BIOS_VERSION "MM61.88Z.0106.B03.1211161202" #define SMB_PRODUCT_NAME "Macmini6,2" #define SMB_BOARD_PRODUCT "Mac-F65AE981FFA204ED" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '2' } + #elif (TARGET_MODEL == MACMINI_71) + // + #define SMB_BIOS_VERSION "MM71.88Z.0106.B03.1411161202" + #define SMB_PRODUCT_NAME "Macmini7,1" + #define SMB_BOARD_PRODUCT "Mac-F65AE981FFA204ED" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '7', ',', '1' } + #else // Defaults to MacPro7,2 + // + #define SMB_BIOS_VERSION "MM71.88Z.0106.B03.1411161202" + #define SMB_PRODUCT_NAME "Macmini7,2" + #define SMB_BOARD_PRODUCT "Mac-F65AE981FFA204ED" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '7', ',', '2' } #endif // ------------------------------------------------------------------------------------- #endif diff --git a/i386/libsaio/smbios/tools/smbios2struct3.c b/i386/libsaio/smbios/tools/smbios2struct3.c index 1605831..659bcc9 100755 --- a/i386/libsaio/smbios/tools/smbios2struct3.c +++ b/i386/libsaio/smbios/tools/smbios2struct3.c @@ -394,7 +394,15 @@ int main(int argc, char * argv[]) droppedTables++; droppedTableStructureStart = tablePtr; } - + + if (header->type == kSMBTypeProcessorInformation) + { + SMBProcessorInformation * cpuInfo = (SMBProcessorInformation *) tablePtr; + VERBOSE_DUMP("cpu.externalClock: %d\n", cpuInfo->externalClock); + VERBOSE_DUMP("cpu.maximumClock : %d\n", cpuInfo->maximumClock); + VERBOSE_DUMP("cpu.currentClock :%d\n", cpuInfo->currentClock); + } + VERBOSE_DUMP("Table: %3d %37s @%p Formatted area: %2d bytes ", header->type, tableDescriptions[header->type], tablePtr, header->length); // Skip the formatted area of the structure. diff --git a/i386/libsaio/sys.c b/i386/libsaio/sys.c index ab5fcd2..985cefb 100755 --- a/i386/libsaio/sys.c +++ b/i386/libsaio/sys.c @@ -603,9 +603,9 @@ struct dirstuff * vol_opendir(BVRef bvr, const char * path) if (dirp->dir_path) { dirp->dir_bvr = bvr; - } - return dirp; + return dirp; + } } closedir(dirp); @@ -633,9 +633,9 @@ struct dirstuff * opendir(const char * path) if (dirp->dir_path) { dirp->dir_bvr = bvr; + + return dirp; } - - return dirp; } } From 20c87fbb3088803002d855ea5a95f3379b7468ac Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 12 Oct 2014 17:35:42 +0200 Subject: [PATCH 479/623] Typo --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 106ac27..e9956d1 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ - About this project -This Open Source hobby project was first started by Master Chief, then taken over by RevoGitl (Samantha) and is now maintained by Pike R. Alpha (http://pikeralpha.wordpress.com). A long time supporter of the RevoBoot project. +This Open Source hobby project was first started by Master Chief, then taken over by RevoGirl (Samantha) and is now maintained by Pike R. Alpha (http://pikeralpha.wordpress.com). A long time supporter of the RevoBoot project. - Server.app From 625305dfe61a510560eb9deb786f69a3cb079c1c Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 12 Oct 2014 17:42:19 +0200 Subject: [PATCH 480/623] README cleanups --- README | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/README b/README index e9956d1..8aadc67 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ - About this project -This Open Source hobby project was first started by Master Chief, then taken over by RevoGirl (Samantha) and is now maintained by Pike R. Alpha (http://pikeralpha.wordpress.com). A long time supporter of the RevoBoot project. +This Open Source hobby project was first started by Master Chief, then taken over by DHP/RevoGirl (Samantha †) and is now maintained by Pike R. Alpha (http://pikeralpha.wordpress.com). A long time supporter of the RevoBoot project. - Server.app @@ -29,16 +29,4 @@ RevoBoot can be built on Snow Leopard, Lion and Mountain Lion. The latter requir - Configuration -Please note that RevoBoot must be configured for your hardware so start reading our WiKi. See also: - -https://github.com/blackosx/RevoBuilder/wiki/Using-RevoBuilder - -We also have a configuration README available at: - -https://github.com/RevoGirl/RevoBoot/blob/master/i386/config/README - -There's also RevoBuilder (a great tool for first starters) over at: - -https://github.com/blackosx/RevoBuilder/wiki/Using-RevoBuilder - -Note: RevoBuilder is most likeky broken for RevoBoot v.1.5.00 and greater! +Please note that RevoBoot must be configured for your hardware specifically. This makes it on of, if not the most difficult boot loader to setup, but that's just what you have to do. And sorry, but don't expect any help from me, because I don't have the time for it. From 3b10fc2ae38e264fbca321e04b52449cae9c7630 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 12 Oct 2014 17:58:56 +0200 Subject: [PATCH 481/623] Compiling now defaults to Macmini62 --- Makefile | 34 ++++++++++++++++++--------------- i386/config/settings-template.h | 3 ++- r | 33 ++++++++++++++++---------------- 3 files changed, 37 insertions(+), 33 deletions(-) diff --git a/Makefile b/Makefile index c0b0927..ddecfda 100644 --- a/Makefile +++ b/Makefile @@ -3,19 +3,19 @@ # # Updates: # -# - Major cleanup (PikerAlpha, October 2012). -# - Output improvements (PikerAlpha, October 2012). -# - Default build target is now Mountain Lion (PikerAlpha, October 2012). -# - PRODUCT_MODEL_TARGET for target build model added (PikerAlpha, October 2012). -# - Creates RevoBoot/config/SETTINGS when missing (PikerAlpha, October 2012). -# - Copies settings-template.h to SETTINGS/ModelnameNN.h when missing (PikerAlpha, October 2012). -# - Automatic ACPI/EFI/SMBIOS data selection (PikerAlpha, October 2012). -# - Copies ACPI/EFI/SMBIOS/data-template.h for new conigurations (PikerAlpha, October 2012). -# - Output added for cp/mkdir/rm actions (PikerAlpha, November 2012). -# - New build target 'help' added (PikerAlpha, November 2012). -# - Cleanups and output changed (PikerAlpha, November 2012). -# - Yosemite support added (PikerAlpha, June 2014). -# - Changed default from Mavericks to Yosemite (PikerAlpha, June 2014). +# - Major cleanup (Pike R. Alpha, October 2012). +# - Output improvements (Pike R. Alpha, October 2012). +# - Default build target is now Mountain Lion (Pike R. Alpha, October 2012). +# - PRODUCT_MODEL_TARGET for target build model added (Pike R. Alpha, October 2012). +# - Creates RevoBoot/config/SETTINGS when missing (Pike R. Alpha, October 2012). +# - Copies settings-template.h to SETTINGS/ModelnameNN.h when missing (Pike R. Alpha, October 2012). +# - Automatic ACPI/EFI/SMBIOS data selection (Pike R. Alpha, October 2012). +# - Copies ACPI/EFI/SMBIOS/data-template.h for new conigurations (Pike R. Alpha, October 2012). +# - Output added for cp/mkdir/rm actions (Pike R. Alpha, November 2012). +# - New build target 'help' added (Pike R. Alpha, November 2012). +# - Cleanups and output changed (Pike R. Alpha, November 2012). +# - Yosemite support added (Pike R. Alpha, June 2014). +# - Changed default from Mavericks to Yosemite (Pike R. Alpha, June 2014). # # @@ -117,7 +117,7 @@ ifdef MODEL # DATA_FILE = $(MODEL) else - export MAKE_TARGET_MODEL = default + export MAKE_TARGET_MODEL = Macmini62 # # Include default/empty static data file (no model identifier specified). # @@ -127,7 +127,11 @@ else # # Include default settings template (no model identifier specified). # - export MAKE_TARGET_MODEL = default + export MAKE_TARGET_MODEL = Macmini62 + # + # + # + MODEL=Macmini62 # # Include default/empty static data file (no model identifier specified). # diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 3429afa..8426894 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -335,8 +335,9 @@ // Note: You can check your serial number by visiting the following link: // https://selfsolve.apple.com/agreementWarrantyDynamic.do -#define STATIC_NVRAM_ROM { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xNN, 0xNN, 0xNN, 0xNN, 0xNN, 0xNN } // Example only! +#define STATIC_NVRAM_ROM { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } // Example only! // sudo nvram 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:ROM=%01%02%03%04%05%06%07%08%09%0A%0B%NN%NN%NN%NN%NN%NN + // // Note: Use your MAC address for the last six bytes! #define STATIC_NVRAM_MLB { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11 } // Example only! diff --git a/r b/r index 9f02db6..eb1a405 100755 --- a/r +++ b/r @@ -1,5 +1,4 @@ clear -make clean # # Check argument for Mac model. # @@ -13,21 +12,21 @@ if [[ "$1" =~ [iMac|Mac] ]]; # # Check RevoBoot/MODEL for default model. # - if [ -f MODEL ]; then - # - # Get MacModelNN from MODEL (assuming it to be correct). - # - make MODEL=`cat MODEL` > out.log - else - # - # No default model found. Create MODEL file for future use. - # - echo "Macmini" > MODEL - # - # Use Macmini as our default (matches settings-template.h) - # - make MODEL=Macmini > out.log - - fi; + if [[ -f MODEL ]]; + then + # + # Get MacModelNN from MODEL (assuming it to be correct). + # + make MODEL=`cat MODEL` > out.log + else + # + # No default model found. Create MODEL file for future use. + # + echo "Macmini62" > MODEL + # + # Use Macmini62 as our default (matches settings-template.h) + # + make MODEL=Macmini62 > out.log + fi; fi From 716168d1c0353d15293a9a11381db58ebdd1d34d Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 13 Oct 2014 18:32:15 +0200 Subject: [PATCH 482/623] Cleanups and minor changes - White Apple logo didn't show when RevoBoot/i386/config/EFI/Macmodel[nn].h was used --- i386/boot2/boot.c | 9 +++++---- i386/boot2/bootlogo.c | 17 +++++++---------- i386/libsa/Makefile | 2 +- i386/libsaio/platform.c | 2 +- r | 8 ++++---- 5 files changed, 18 insertions(+), 20 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 7fa4727..957e026 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -58,8 +58,6 @@ #include "sl.h" #include "libsa.h" -#include "cpu/proc_reg.h" - // DHP: Dump all global junk a.s.a.p. long gBootMode = kBootModeQuiet; // no longer defaults to 0 aka kBootModeNormal @@ -237,12 +235,15 @@ void boot(int biosdev) showBootLogo(bootRecoveryHD); #endif -#if (LOAD_MODEL_SPECIFIC_EFI_DATA == 0) +#if (LOAD_MODEL_SPECIFIC_EFI_DATA == 0 && BLACKMODE == 0) /* * We can only make this call here when static EFI is included from: * RevoBoot/i386/config/EFI/[MacModelNN.h] Not when the data is read from: * /Extra/EFI/ because then RevoBoot/i386/libsaio/platform.c makes the call. - */ + * + * We can also <em>not</em> call it here if BLACKMODE is enabled, because + * then it fails to load: /usr/standalone/i386/EfiLoginUI/appleLogo.efires + */ initPartitionChain(); #endif diff --git a/i386/boot2/bootlogo.c b/i386/boot2/bootlogo.c index f631fab..09999b8 100755 --- a/i386/boot2/bootlogo.c +++ b/i386/boot2/bootlogo.c @@ -105,7 +105,6 @@ void drawDataRectangle(unsigned short x, unsigned short y, unsigned short width, #include "picopng.h" - //============================================================================== void showBootLogo(bool aBootRecoveryHDFlag) @@ -149,8 +148,10 @@ void showBootLogo(bool aBootRecoveryHDFlag) setBackgroundColor(backGroundColor); void *imageLoadBuffer = (void *)kLoadAddr; - - sprintf(filename, "%s%s", (aBootRecoveryHDFlag) ? "/com.apple.Boot.P" : "", "/usr/standalone/i386/EfiLoginUI/appleLogo.efires"); + // + // Rock, Paper, Scissors? + // + sprintf(filename, "%s", (aBootRecoveryHDFlag) ? "/com.apple.Boot.P" : "", "/usr/standalone/i386/EfiLoginUI/appleLogo.efires"); int EFIResourceFile = open(filename, 0); @@ -188,18 +189,14 @@ void showBootLogo(bool aBootRecoveryHDFlag) uint8_t *bootImage = malloc((info->width * 4) * info->height); memcpy(bootImage, info->image->data, ((info->width * 4) * info->height)); +#if DEBUG + setVideoMode(GRAPHICS_MODE); +#endif uint16_t x = (VIDEO(width) - MIN(info->width, VIDEO(width)) ) / 2; uint16_t y = (VIDEO(height) - MIN(info->height, VIDEO(height)) ) / 2; - blendImage(x, y, info->width, info->height, bootImage); png_alloc_free_all(); - free(bootImage); -#if INTEL_VGA_REG_DUMP - setVideoMode(VGA_TEXT_MODE); -#endif - // extern void vga(void); - // vga(); return; } diff --git a/i386/libsa/Makefile b/i386/libsa/Makefile index 70a5b85..d444af7 100644 --- a/i386/libsa/Makefile +++ b/i386/libsa/Makefile @@ -26,7 +26,7 @@ INC = -I. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSAIODIR) VPATH = $(OBJROOT):$(SYMROOT) -SA_OBJS = prf.o printf.o zalloc.o string.o strtol.o setjmp.o crc32.o +SA_OBJS = prf.o printf.o zalloc.o string.o strtol.o crc32.o LIBS = libsa.a diff --git a/i386/libsaio/platform.c b/i386/libsaio/platform.c index 8910902..61ea0ba 100644 --- a/i386/libsaio/platform.c +++ b/i386/libsaio/platform.c @@ -289,7 +289,7 @@ void initPlatform(int biosDevice, bool bootRecoveryHD) initKernelBootConfig(); -#if (LOAD_MODEL_SPECIFIC_EFI_DATA) +#if (LOAD_MODEL_SPECIFIC_EFI_DATA || BLACKMODE) /* * We need to call this much earlier in the boot process when static EFI data * is read from: /Extra/EFI[MacModelNN.bin]. Otherwise LoadFile (load.c) fails. diff --git a/r b/r index eb1a405..896392f 100755 --- a/r +++ b/r @@ -7,17 +7,17 @@ if [[ "$1" =~ [iMac|Mac] ]]; # # Use specified MacModelNN from argument. # - make MODEL=$1 > out.log + make MODEL=$1 else # # Check RevoBoot/MODEL for default model. # - if [[ -f MODEL ]]; + if [ -f MODEL ]; then # # Get MacModelNN from MODEL (assuming it to be correct). # - make MODEL=`cat MODEL` > out.log + make MODEL=`cat MODEL` else # # No default model found. Create MODEL file for future use. @@ -26,7 +26,7 @@ if [[ "$1" =~ [iMac|Mac] ]]; # # Use Macmini62 as our default (matches settings-template.h) # - make MODEL=Macmini62 > out.log + make MODEL=Macmini62 fi; fi From 61cb044ded6b718a764a6957522cf1fca16571bf Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 15 Oct 2014 00:40:45 +0200 Subject: [PATCH 483/623] Moving logo related bits and pieces --- i386/boot2/boot.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/i386/boot2/boot.h b/i386/boot2/boot.h index c543955..8bc41c5 100755 --- a/i386/boot2/boot.h +++ b/i386/boot2/boot.h @@ -43,19 +43,6 @@ #define DEFAULT_SCREEN_HEIGHT 1200 #endif -#define APPLE_LOGO_WIDTH 128 -#define APPLE_LOGO_HEIGHT 128 - -/* - * Used in showBootLogo. Now using the VIDEO() macro instead of the static - * values. This way the logo should be properly positioned. With or without - * specifying a "Graphics Mode" in com.apple.Boot.plist And no matter what - * values you've set in RevoBoot/i386/config/settings.h Should all be fine now. - */ - -#define APPLE_LOGO_X ((VIDEO(width) - APPLE_LOGO_WIDTH) / 2) -#define APPLE_LOGO_Y ((VIDEO(height) - APPLE_LOGO_HEIGHT) / 2) - /* * How long to wait (in seconds) to load the kernel after displaying the "boot:" prompt. */ From 528f084446becd2ca2db83fb1be57240f7fa7af6 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 15 Oct 2014 00:44:38 +0200 Subject: [PATCH 484/623] No more picopng - this change reduces the size with ~ 6KB --- i386/boot2/Makefile | 7 - i386/boot2/graphics.c | 60 -- i386/boot2/picopng.c | 1796 ----------------------------------------- i386/boot2/picopng.h | 33 - 4 files changed, 1896 deletions(-) delete mode 100644 i386/boot2/picopng.c delete mode 100644 i386/boot2/picopng.h diff --git a/i386/boot2/Makefile b/i386/boot2/Makefile index fbc3645..4e12262 100644 --- a/i386/boot2/Makefile +++ b/i386/boot2/Makefile @@ -38,13 +38,6 @@ VPATH = $(OBJROOT):$(SYMROOT) # OBJS = boot2.o boot.o bootlogo.o graphics.o drivers.o options.o lzss.o lzvn.o -ifeq ($(MAKECMDGOALS), yosemite) -# OBJS = boot2.o boot.o bootlogo.o graphics.o picopng.o drivers.o options.o lzss.o -OBJS+=picopng.o -#else -# OBJS = boot2.o boot.o bootlogo.o graphics.o drivers.o options.o lzss.o -endif - DIRS_NEEDED = $(OBJROOT) $(SYMROOT) # diff --git a/i386/boot2/graphics.c b/i386/boot2/graphics.c index 1e26c78..165e777 100755 --- a/i386/boot2/graphics.c +++ b/i386/boot2/graphics.c @@ -358,63 +358,3 @@ void setVideoMode(int mode) bootArgs->Video.v_display = VGA_TEXT_MODE; } } - -//============================================================================== - -#define MIN(x, y) ((x) < (y) ? (x) : (y)) -#define MAX(x, y) ((x) > (y) ? (x) : (y)) - -#define VIDEO(x) (bootArgs->Video.v_ ## x) - -void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *data) -{ - uint8_t *vram = (uint8_t *) VIDEO(baseAddr) + VIDEO(rowBytes) * y + 4 * x; - - uint16_t drawWidth = (MIN(width, VIDEO(width) - x) * 4); - - height = MIN(height, VIDEO(height) - y); - width = (width * 4); - - while (height--) - { - uint32_t s; uint32_t* d; // Source (img) and destination (bkgd) pixels - uint32_t a; // Alpha - uint32_t dstrb, dstg, srcrb, srcg, drb, dg, rb, g, tempB; // Intermediate variables - uint16_t pos = 0; - - for (; pos < drawWidth; pos += 4) - { - // Fast pseudo-vector alpha blending, adapted from: http://www.stereopsis.com/doubleblend.html - s = *((uint32_t*) (data + pos)); - d = (uint32_t*) (vram + pos); - - // Flip B and R in source - // TODO: use XCHG and inline assembly to do this in a faster, saner way - tempB = (s & 0xFF0000); // save B - s = (s & 0xFF00FFFF) | ((s & 0xFF) << 16); // put R in B - s = (s & 0xFFFFFF00) | (tempB >> 16); // put B in R - - a = (s >> 24) + 1; - - dstrb = *d & 0xFF00FF; - dstg = *d & 0xFF00; - srcrb = s & 0xFF00FF; - srcg = s & 0xFF00; - - drb = srcrb - dstrb; - dg = srcg - dstg; - drb *= a; - dg *= a; - drb >>= 8; - dg >>= 8; - - rb = (drb + dstrb) & 0xFF00FF; - g = (dg + dstg) & 0xFF00; - - *d = rb | g; - } - - vram += VIDEO(rowBytes); - data += width; - } -} diff --git a/i386/boot2/picopng.c b/i386/boot2/picopng.c deleted file mode 100644 index 733a7e2..0000000 --- a/i386/boot2/picopng.c +++ /dev/null @@ -1,1796 +0,0 @@ -// picoPNG version 20101224 -// Copyright (c) 2005-2010 Lode Vandevenne -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. -// -// Note: Ported from CPP to C by kaitek. -// - -#include <sys/types.h> -#include "libsa.h" -#include "picopng.h" - - -/*************************************************************************************************/ - -typedef struct png_alloc_node -{ - struct png_alloc_node *prev, *next; - void *addr; - size_t size; -} png_alloc_node_t; - -png_alloc_node_t *png_alloc_head = NULL; -png_alloc_node_t *png_alloc_tail = NULL; - -//============================================================================== - -png_alloc_node_t *png_alloc_find_node(void *addr) -{ - png_alloc_node_t *node; - - for (node = png_alloc_head; node; node = node->next) - { - if (node->addr == addr) - { - break; - } - } - - return node; -} - - -//============================================================================== - -void png_alloc_add_node(void *addr, size_t size) -{ - png_alloc_node_t *node; - - if (png_alloc_find_node(addr)) - { - return; - } - - node = malloc(sizeof(png_alloc_node_t)); - node->addr = addr; - node->size = size; - node->prev = png_alloc_tail; - node->next = NULL; - png_alloc_tail = node; - - if (node->prev) - { - node->prev->next = node; - } - - if (!png_alloc_head) - { - png_alloc_head = node; - } -} - - -//============================================================================== - -void png_alloc_remove_node(png_alloc_node_t *node) -{ - if (node->prev) - { - node->prev->next = node->next; - } - - if (node->next) - { - node->next->prev = node->prev; - } - - if (node == png_alloc_head) - { - png_alloc_head = node->next; - } - - if (node == png_alloc_tail) - { - png_alloc_tail = node->prev; - } - - node->prev = node->next = node->addr = NULL; - free(node); -} - - -//============================================================================== - -void *png_alloc_malloc(size_t size) -{ - void *addr = malloc(size); - png_alloc_add_node(addr, size); - - return addr; -} - - -//============================================================================== - -void *png_alloc_realloc(void *addr, size_t size) -{ - void *new_addr; - - if (!addr) - { - return png_alloc_malloc(size); - } - - new_addr = realloc(addr, size); - - if (new_addr != addr) - { - png_alloc_node_t *old_node; - old_node = png_alloc_find_node(addr); - png_alloc_remove_node(old_node); - png_alloc_add_node(new_addr, size); - } - - return new_addr; -} - - -//============================================================================== - -void png_alloc_free(void *addr) -{ - png_alloc_node_t *node = png_alloc_find_node(addr); - - if (!node) - { - return; - } - - png_alloc_remove_node(node); - free(addr); -} - - -//============================================================================== - -void png_alloc_free_all() -{ - while (png_alloc_tail) - { - void *addr = png_alloc_tail->addr; - png_alloc_remove_node(png_alloc_tail); - free(addr); - } -} - - -//============================================================================== - -uint32_t vector32_resize(vector32_t *p, size_t size) -{ - /* - * returns 1 if success, 0 if failure ==> nothing done - */ - if (size * sizeof(uint32_t) > p->allocsize) - { - size_t newsize = size * sizeof(uint32_t) * 2; - void *data = png_alloc_realloc(p->data, newsize); - - if (data) - { - p->allocsize = newsize; - p->data = (uint32_t *) data; - p->size = size; - } - else - { - return 0; - } - } - else - { - p->size = size; - } - - return 1; -} - - -//============================================================================== - -uint32_t vector32_resizev(vector32_t *p, size_t size, uint32_t value) -{ - /* - * resize and give all new elements the value - */ - size_t oldsize = p->size, i; - - if (!vector32_resize(p, size)) - { - return 0; - } - - for (i = oldsize; i < size; i++) - { - p->data[i] = value; - } - - return 1; -} - - -//============================================================================== - -vector32_t *vector32_new(size_t size, uint32_t value) -{ - vector32_t *p = png_alloc_malloc(sizeof(vector32_t)); - - p->data = NULL; - p->size = p->allocsize = 0; - - if (size && !vector32_resizev(p, size, value)) - { - return NULL; - } - - return p; -} - - -//============================================================================== - -uint32_t vector8_resize(vector8_t *p, size_t size) -{ - /* - * returns 1 if success, 0 if failure ==> nothing done - * xxx: the use of sizeof uint32_t here seems like a bug (this descends from the lodepng vector - * compatibility functions which do the same). without this there is corruption in certain cases, - * so this was probably done to cover up allocation bug(s) in the original picopng code! - */ - if (size * sizeof(uint32_t) > p->allocsize) - { - size_t newsize = size * sizeof(uint32_t) * 2; - void *data = png_alloc_realloc(p->data, newsize); - - if (data) - { - p->allocsize = newsize; - p->data = (uint8_t *) data; - p->size = size; - } - else - { - return 0; // error: not enough memory - } - } - else - { - p->size = size; - } - - return 1; -} - - -/*============================================================================== - * - * resize and give all new elements the value - */ - -uint32_t vector8_resizev(vector8_t *p, size_t size, uint8_t value) -{ - size_t oldsize = p->size, i; - - if (!vector8_resize(p, size)) - { - return 0; - } - - for (i = oldsize; i < size; i++) - { - p->data[i] = value; - } - - return 1; -} - - -//============================================================================== - -vector8_t *vector8_new(size_t size, uint8_t value) -{ - vector8_t *p = png_alloc_malloc(sizeof(vector8_t)); - - p->data = NULL; - p->size = p->allocsize = 0; - - if (size && !vector8_resizev(p, size, value)) - { - return NULL; - } - - return p; -} - - -//============================================================================== - -vector8_t *vector8_copy(vector8_t *p) -{ - vector8_t *q = vector8_new(p->size, 0); - uint32_t n; - - for (n = 0; n < q->size; n++) - { - q->data[n] = p->data[n]; - } - - return q; -} - -/*************************************************************************************************/ - -const uint32_t LENBASE[29] = { 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258 }; -const uint32_t LENEXTRA[29] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 }; -const uint32_t DISTBASE[30] = { 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577 }; -const uint32_t DISTEXTRA[30] = { 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13 }; -const uint32_t CLCL[19] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; // Code Length Code Lengths - -/*************************************************************************************************/ - -typedef struct -{ - // 2D representation of a huffman tree: The one dimension is "0" or "1", the other contains all - // nodes and leaves of the tree. - vector32_t *tree2d; -} HuffmanTree; - - -//============================================================================== - -HuffmanTree *HuffmanTree_new() -{ - HuffmanTree *tree = png_alloc_malloc(sizeof(HuffmanTree)); - tree->tree2d = NULL; - - return tree; -} - - -//============================================================================== - -int HuffmanTree_makeFromLengths(HuffmanTree *tree, const vector32_t *bitlen, uint32_t maxbitlen) -{ // make tree given the lengths - uint32_t bits, n, i; - uint32_t numcodes = (uint32_t) bitlen->size, treepos = 0, nodefilled = 0; - vector32_t *tree1d, *blcount, *nextcode; - tree1d = vector32_new(numcodes, 0); - blcount = vector32_new(maxbitlen + 1, 0); - nextcode = vector32_new(maxbitlen + 1, 0); - - for (bits = 0; bits < numcodes; bits++) - { - blcount->data[bitlen->data[bits]]++; // count number of instances of each code length - } - - for (bits = 1; bits <= maxbitlen; bits++) - { - nextcode->data[bits] = (nextcode->data[bits - 1] + blcount->data[bits - 1]) << 1; - } - - for (n = 0; n < numcodes; n++) - { - if (bitlen->data[n] != 0) - { - tree1d->data[n] = nextcode->data[bitlen->data[n]]++; // generate all the codes - } - } - - // 0x7fff here means the tree2d isn't filled there yet - vector32_t *tree2d = vector32_new(numcodes * 2, 0x7fff); - tree->tree2d = tree2d; - - for (n = 0; n < numcodes; n++) // the codes - { - for (i = 0; i < bitlen->data[n]; i++) // the bits for this code - { - uint32_t bit = (tree1d->data[n] >> (bitlen->data[n] - i - 1)) & 1; - - if (treepos > numcodes - 2) - { - return 55; - } - if (tree2d->data[2 * treepos + bit] == 0x7fff) // not yet filled in - { - if (i + 1 == bitlen->data[n]) // last bit - { - tree2d->data[2 * treepos + bit] = n; - treepos = 0; - } - else // addresses are encoded as values > numcodes - { - tree2d->data[2 * treepos + bit] = ++nodefilled + numcodes; - treepos = nodefilled; - } - } - else // subtract numcodes from address to get address value - { - treepos = tree2d->data[2 * treepos + bit] - numcodes; - } - } - } - - return 0; -} - - -//============================================================================== - -int HuffmanTree_decode(const HuffmanTree *tree, bool *decoded, uint32_t *result, size_t *treepos, uint32_t bit) -{ // Decodes a symbol from the tree - const vector32_t *tree2d = tree->tree2d; - uint32_t numcodes = (uint32_t) tree2d->size / 2; - - if (*treepos >= numcodes) - { - return 11; // error: you appeared outside the codetree - } - - *result = tree2d->data[2 * (*treepos) + bit]; - *decoded = (*result < numcodes); - *treepos = *decoded ? 0 : *result - numcodes; - - return 0; -} - - -//============================================================================== - -int Inflator_error; - -uint32_t Zlib_readBitFromStream(size_t *bitp, const uint8_t *bits) -{ - uint32_t result = (bits[*bitp >> 3] >> (*bitp & 0x7)) & 1; - (*bitp)++; - - return result; -} - - -//============================================================================== - -uint32_t Zlib_readBitsFromStream(size_t *bitp, const uint8_t *bits, size_t nbits) -{ - uint32_t i, result = 0; - - for (i = 0; i < nbits; i++) - { - result += (Zlib_readBitFromStream(bitp, bits)) << i; - } - - return result; -} - - -//============================================================================== - -void Inflator_generateFixedTrees(HuffmanTree *tree, HuffmanTree *treeD) -{ // get the tree of a deflated block with fixed tree - size_t i; - vector32_t *bitlen, *bitlenD; - bitlen = vector32_new(288, 8); - bitlenD = vector32_new(32, 5); - - for (i = 144; i <= 255; i++) - { - bitlen->data[i] = 9; - } - - for (i = 256; i <= 279; i++) - { - bitlen->data[i] = 7; - } - - HuffmanTree_makeFromLengths(tree, bitlen, 15); - HuffmanTree_makeFromLengths(treeD, bitlenD, 15); -} - - -//============================================================================== - -uint32_t Inflator_huffmanDecodeSymbol(const uint8_t *in, size_t *bp, const HuffmanTree *codetree, size_t inlength) -{ // decode a single symbol from given list of bits with given code tree. returns the symbol - bool decoded = false; - uint32_t ct = 0; - size_t treepos = 0; - - for (;;) - { - if ((*bp & 0x07) == 0 && (*bp >> 3) > inlength) - { - Inflator_error = 10; // error: end reached without endcode - - return 0; - } - - Inflator_error = HuffmanTree_decode(codetree, &decoded, &ct, &treepos, Zlib_readBitFromStream(bp, in)); - - if (Inflator_error) - { - return 0; // stop, an error happened - } - - if (decoded) - { - return ct; - } - } -} - - -//============================================================================== - -void Inflator_getTreeInflateDynamic(HuffmanTree *tree, HuffmanTree *treeD, const uint8_t *in, size_t *bp, size_t inlength) -{ // get the tree of a deflated block with dynamic tree, the tree itself is also Huffman - // compressed with a known tree - size_t i, n; - HuffmanTree *codelengthcodetree = HuffmanTree_new(); // the code tree for code length codes - vector32_t *bitlen, *bitlenD; - bitlen = vector32_new(288, 0); - bitlenD = vector32_new(32, 0); - - if (*bp >> 3 >= inlength - 2) - { - Inflator_error = 49; // the bit pointer is or will go past the memory - - return; - } - - size_t HLIT = Zlib_readBitsFromStream(bp, in, 5) + 257; // number of literal/length codes + 257 - size_t HDIST = Zlib_readBitsFromStream(bp, in, 5) + 1; // number of dist codes + 1 - size_t HCLEN = Zlib_readBitsFromStream(bp, in, 4) + 4; // number of code length codes + 4 - vector32_t *codelengthcode; // lengths of tree to decode the lengths of the dynamic tree - codelengthcode = vector32_new(19, 0); - - for (i = 0; i < 19; i++) - { - codelengthcode->data[CLCL[i]] = (i < HCLEN) ? Zlib_readBitsFromStream(bp, in, 3) : 0; - } - - Inflator_error = HuffmanTree_makeFromLengths(codelengthcodetree, codelengthcode, 7); - - if (Inflator_error) - { - return; - } - - size_t replength; - - for (i = 0; i < HLIT + HDIST; ) - { - uint32_t code = Inflator_huffmanDecodeSymbol(in, bp, codelengthcodetree, inlength); - - if (Inflator_error) - { - return; - } - - if (code <= 15) // a length code - { - if (i < HLIT) - { - bitlen->data[i++] = code; - } - else - { - bitlenD->data[i++ - HLIT] = code; - } - } - else if (code == 16) // repeat previous - { - if (*bp >> 3 >= inlength) - { - Inflator_error = 50; // error, bit pointer jumps past memory - - return; - } - - replength = 3 + Zlib_readBitsFromStream(bp, in, 2); - uint32_t value; // set value to the previous code - - if ((i - 1) < HLIT) - { - value = bitlen->data[i - 1]; - } - else - { - value = bitlenD->data[i - HLIT - 1]; - } - - for (n = 0; n < replength; n++) // repeat this value in the next lengths - { - if (i >= HLIT + HDIST) - { - Inflator_error = 13; // error: i is larger than the amount of codes - - return; - } - - if (i < HLIT) - { - bitlen->data[i++] = value; - } - else - { - bitlenD->data[i++ - HLIT] = value; - } - } - } - else if (code == 17) // repeat "0" 3-10 times - { - if (*bp >> 3 >= inlength) - { - Inflator_error = 50; // error, bit pointer jumps past memory - - return; - } - - replength = 3 + Zlib_readBitsFromStream(bp, in, 3); - - for (n = 0; n < replength; n++) // repeat this value in the next lengths - { - if (i >= HLIT + HDIST) { - Inflator_error = 14; // error: i is larger than the amount of codes - - return; - } - - if (i < HLIT) - { - bitlen->data[i++] = 0; - } - else - { - bitlenD->data[i++ - HLIT] = 0; - } - } - } - else if (code == 18) // repeat "0" 11-138 times - { - if (*bp >> 3 >= inlength) - { - Inflator_error = 50; // error, bit pointer jumps past memory - - return; - } - - replength = 11 + Zlib_readBitsFromStream(bp, in, 7); - - for (n = 0; n < replength; n++) // repeat this value in the next lengths - { - if (i >= HLIT + HDIST) - { - Inflator_error = 15; // error: i is larger than the amount of codes - - return; - } - - if (i < HLIT) - { - bitlen->data[i++] = 0; - } - else - { - bitlenD->data[i++ - HLIT] = 0; - } - } - } - else - { - Inflator_error = 16; // error: an nonexitent code appeared. This can never happen. - - return; - } - } - - if (bitlen->data[256] == 0) - { - Inflator_error = 64; // the length of the end code 256 must be larger than 0 - return; - } - - // now we've finally got HLIT and HDIST, so generate the code trees, and the function is done - Inflator_error = HuffmanTree_makeFromLengths(tree, bitlen, 15); - - if (Inflator_error) - { - return; - } - - Inflator_error = HuffmanTree_makeFromLengths(treeD, bitlenD, 15); - - if (Inflator_error) - { - return; - } -} - - -//============================================================================== - -void Inflator_inflateHuffmanBlock(vector8_t *out, const uint8_t *in, size_t *bp, size_t *pos, size_t inlength, uint32_t btype) -{ - HuffmanTree *codetree, *codetreeD; // the code tree for Huffman codes, dist codes - codetree = HuffmanTree_new(); - codetreeD = HuffmanTree_new(); - - if (btype == 1) - { - Inflator_generateFixedTrees(codetree, codetreeD); - } - else if (btype == 2) - { - Inflator_getTreeInflateDynamic(codetree, codetreeD, in, bp, inlength); - - if (Inflator_error) - { - return; - } - } - for (;;) - { - uint32_t code = Inflator_huffmanDecodeSymbol(in, bp, codetree, inlength); - - if (Inflator_error) - { - return; - } - - if (code == 256) // end code - { - return; - } - else if (code <= 255) // literal symbol - { - if (*pos >= out->size) - { - vector8_resize(out, (*pos + 1) * 2); // reserve more room - } - - out->data[(*pos)++] = (uint8_t) code; - } - else if (code >= 257 && code <= 285) // length code - { - size_t length = LENBASE[code - 257], numextrabits = LENEXTRA[code - 257]; - - if ((*bp >> 3) >= inlength) - { - Inflator_error = 51; // error, bit pointer will jump past memory - return; - } - - length += Zlib_readBitsFromStream(bp, in, numextrabits); - uint32_t codeD = Inflator_huffmanDecodeSymbol(in, bp, codetreeD, inlength); - - if (Inflator_error) - { - return; - } - - if (codeD > 29) - { - Inflator_error = 18; // error: invalid dist code (30-31 are never used) - - return; - } - - uint32_t dist = DISTBASE[codeD], numextrabitsD = DISTEXTRA[codeD]; - - if ((*bp >> 3) >= inlength) - { - Inflator_error = 51; // error, bit pointer will jump past memory - - return; - } - - dist += Zlib_readBitsFromStream(bp, in, numextrabitsD); - size_t start = *pos, back = start - dist; // backwards - - if (*pos + length >= out->size) - { - vector8_resize(out, (*pos + length) * 2); // reserve more room - } - - size_t i; - - for (i = 0; i < length; i++) - { - out->data[(*pos)++] = out->data[back++]; - - if (back >= start) - { - back = start - dist; - } - } - } - } -} - - -#ifdef USE_ALL_1 -//============================================================================== - -void Inflator_inflateNoCompression(vector8_t *out, const uint8_t *in, size_t *bp, size_t *pos, size_t inlength) -{ - while ((*bp & 0x7) != 0) - { - (*bp)++; // go to first boundary of byte - } - - size_t p = *bp / 8; - - if (p >= inlength - 4) - { - Inflator_error = 52; // error, bit pointer will jump past memory - - return; - } - - uint32_t LEN = in[p] + 256 * in[p + 1]; - uint32_t NLEN = in[p + 2] + 256 * in[p + 3]; - p += 4; - - if (LEN + NLEN != 65535) - { - Inflator_error = 21; // error: NLEN is not one's complement of LEN - - return; - } - - if (*pos + LEN >= out->size) - { - vector8_resize(out, *pos + LEN); - } - - if (p + LEN > inlength) - { - Inflator_error = 23; // error: reading outside of in buffer - - return; - } - - uint32_t n; - - for (n = 0; n < LEN; n++) - { - out->data[(*pos)++] = in[p++]; // read LEN bytes of literal data - } - - *bp = p * 8; -} -#endif - - -//============================================================================== - -void Inflator_inflate(vector8_t *out, const vector8_t *in, size_t inpos) -{ - size_t bp = 0, pos = 0; // bit pointer and byte pointer - Inflator_error = 0; - uint32_t BFINAL = 0; - - while (!BFINAL && !Inflator_error) - { - if (bp >> 3 >= in->size) - { - Inflator_error = 52; // error, bit pointer will jump past memory - - return; - } - - BFINAL = Zlib_readBitFromStream(&bp, &in->data[inpos]); - uint32_t BTYPE = Zlib_readBitFromStream(&bp, &in->data[inpos]); - BTYPE += 2 * Zlib_readBitFromStream(&bp, &in->data[inpos]); - -/* if (BTYPE == 3) - { - Inflator_error = 20; // error: invalid BTYPE - - return; - } - else if (BTYPE == 0) - { - Inflator_inflateNoCompression(out, &in->data[inpos], &bp, &pos, in->size); - } - else - {*/ - Inflator_inflateHuffmanBlock(out, &in->data[inpos], &bp, &pos, in->size, BTYPE); - //} - } - - if (!Inflator_error) - { - vector8_resize(out, pos); // Only now we know the true size of out, resize it to that - } -} - - -#ifdef USE_ALL_1 -//============================================================================== - -int Zlib_decompress(vector8_t *out, const vector8_t *in) // returns error value -{ - if (in->size < 2) - { - return 53; // error, size of zlib data too small - } - - if ((in->data[0] * 256 + in->data[1]) % 31 != 0) - { - // error: 256 * in->data[0] + in->data[1] must be a multiple of 31, the FCHECK value is - // supposed to be made that way - return 24; - } - - uint32_t CM = in->data[0] & 15; - uint32_t CINFO = (in->data[0] >> 4) & 15; - uint32_t FDICT = (in->data[1] >> 5) & 1; - - if (CM != 8 || CINFO > 7) - { - // Error: only compression method 8: inflate with sliding window of 32k is supported by the PNG spec - return 25; - } - - if (FDICT != 0) - { - // Error: the PNG specification states: "The additional flags shall not specify a preset dictionary." - return 26; - } - - Inflator_inflate(out, in, 2); - - return Inflator_error; // note: adler32 checksum was skipped and ignored -} -#endif - - -//============================================================================== - -#define PNG_SIGNATURE 0x0a1a0a0d474e5089ull - -#define CHUNK_IHDR 0x52444849 -#define CHUNK_IDAT 0x54414449 -#define CHUNK_IEND 0x444e4549 -#define CHUNK_PLTE 0x45544c50 -#define CHUNK_tRNS 0x534e5274 - -int PNG_error; - - -#ifdef USE_ALL_1 -//============================================================================== - -uint32_t PNG_readBitFromReversedStream(size_t *bitp, const uint8_t *bits) -{ - uint32_t result = (bits[*bitp >> 3] >> (7 - (*bitp & 0x7))) & 1; - (*bitp)++; - - return result; -} - - -//============================================================================== - -uint32_t PNG_readBitsFromReversedStream(size_t *bitp, const uint8_t *bits, uint32_t nbits) -{ - uint32_t i, result = 0; - - for (i = nbits - 1; i < nbits; i--) - { - result += ((PNG_readBitFromReversedStream(bitp, bits)) << i); - } - - return result; -} - - -//============================================================================== - -void PNG_setBitOfReversedStream(size_t *bitp, uint8_t *bits, uint32_t bit) -{ - bits[*bitp >> 3] |= (bit << (7 - (*bitp & 0x7))); - (*bitp)++; -} -#endif - - -/* typedef struct Pixel32 -{ - union - { - struct - { - uint8 b, g, r, a; - }; - uint32 u; - }; -}; */ - -//============================================================================== - -uint32_t PNG_read32bitInt(const uint8_t *buffer) -{ - return (buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3]; -} - - -#ifdef USE_ALL_1 -//============================================================================== - -int PNG_checkColorValidity(uint32_t colorType, uint32_t bd) // return type is a LodePNG error code -{ - if ((colorType == 2 || colorType == 4 || colorType == 6)) - { - if (!(bd == 8 || bd == 16)) - { - return 37; - } - else - { - return 0; - } - } - else if (colorType == 0) - { - if (!(bd == 1 || bd == 2 || bd == 4 || bd == 8 || bd == 16)) - { - return 37; - } - else - { - return 0; - } - } - else if (colorType == 3) - { - if (!(bd == 1 || bd == 2 || bd == 4 || bd == 8)) - { - return 37; - } - else - { - return 0; - } - } - else - { - return 31; // nonexistent color type - } -} - - -//============================================================================== - -uint32_t PNG_getBpp(const PNG_info_t *info) -{ - uint32_t bitDepth = info->bitDepth; - uint32_t colorType = info->colorType; - - if (colorType == 2) - { - return (3 * bitDepth); - } - else if (colorType >= 4) - { - return (colorType - 2) * bitDepth; - } - else - { - return bitDepth; - } -} -#endif - - -//============================================================================== - -void PNG_readPngHeader(PNG_info_t *info, const uint8_t *in, size_t inlength) -{ - // read the information from the header and store it in the Info - if (inlength < 29) - { - PNG_error = 27; // error: the data length is smaller than the length of the header - return; - } - - if (*(uint64_t *) in != PNG_SIGNATURE) - { - PNG_error = 28; // no PNG signature - return; - } - - if (*(uint32_t *) &in[12] != CHUNK_IHDR) - { - PNG_error = 29; // error: it doesn't start with a IHDR chunk! - return; - } - - info->width = PNG_read32bitInt(&in[16]); - info->height = PNG_read32bitInt(&in[20]); - info->bitDepth = in[24]; - info->colorType = in[25]; - info->compressionMethod = in[26]; - - if (in[26] != 0) - { - PNG_error = 32; // error: only compression method 0 is allowed in the specification - return; - } - - info->filterMethod = in[27]; - - if (in[27] != 0) - { - PNG_error = 33; // error: only filter method 0 is allowed in the specification - return; - } - - info->interlaceMethod = in[28]; - - if (in[28] > 1) - { - PNG_error = 34; // error: only interlace methods 0 and 1 exist in the specification - return; - } -#ifdef USE_ALL_1 - PNG_error = PNG_checkColorValidity(info->colorType, info->bitDepth); -#endif -} - - -//============================================================================== - -int paethPredictor(int a, int b, int c) // Paeth predicter, used by PNG filter type 4 -{ - int p = a + b - c; - int pa = p > a ? (p - a) : (a - p); - int pb = p > b ? (p - b) : (b - p); - int pc = p > c ? (p - c) : (c - p); - - return (pa <= pb && pa <= pc) ? a : (pb <= pc ? b : c); -} - - -//============================================================================== - -// void PNG_unFilterScanline(uint8_t *recon, const uint8_t *scanline, const uint8_t *precon, size_t bytewidth, uint32_t filterType, size_t length) -void PNG_unFilterScanline(uint8_t *recon, const uint8_t *scanline, const uint8_t *precon, size_t bytewidth, uint8_t filterType, size_t length) -{ - size_t i; - - switch (filterType) - { - case 0: - for (i = 0; i < length; i++) - { - recon[i] = scanline[i]; - } - break; - - case 1: for (i = 0; i < bytewidth; i++) - { - recon[i] = scanline[i]; - } - - for (i = bytewidth; i < length; i++) - { - recon[i] = scanline[i] + recon[i - bytewidth]; - } - break; - - case 2: if (precon) - { - for (i = 0; i < length; i++) - { - recon[i] = scanline[i] + precon[i]; - } - } - else - { - for (i = 0; i < length; i++) - { - recon[i] = scanline[i]; - } - } - break; - - case 3: if (precon) - { - for (i = 0; i < bytewidth; i++) - { - recon[i] = scanline[i] + precon[i] / 2; - } - - for (i = bytewidth; i < length; i++) - { - recon[i] = scanline[i] + ((recon[i - bytewidth] + precon[i]) / 2); - } - } - else - { - for (i = 0; i < bytewidth; i++) - { - recon[i] = scanline[i]; - } - - for (i = bytewidth; i < length; i++) - { - recon[i] = scanline[i] + recon[i - bytewidth] / 2; - } - } - break; - - case 4: if (precon) - { - for (i = 0; i < bytewidth; i++) - { - recon[i] = (uint8_t) (scanline[i] + paethPredictor(0, precon[i], 0)); - } - - for (i = bytewidth; i < length; i++) - { - recon[i] = (uint8_t) (scanline[i] + paethPredictor(recon[i - bytewidth], precon[i], precon[i - bytewidth])); - } - } - else - { - for (i = 0; i < bytewidth; i++) - { - recon[i] = scanline[i]; - } - - for (i = bytewidth; i < length; i++) - { - recon[i] = (uint8_t) (scanline[i] + paethPredictor(recon[i - bytewidth], 0, 0)); - } - } - break; - - default: PNG_error = 36; // error: nonexistent filter type given - return; - } -} - -#ifdef USE_ALL_1 -/*============================================================================== - * filter and reposition the pixels into the output when the image is Adam7 interlaced. This - * function can only do it after the full image is already decoded. The out buffer must have - * the correct allocated memory size already. - */ - -void PNG_adam7Pass(uint8_t *out, uint8_t *linen, uint8_t *lineo, const uint8_t *in, uint32_t w, - size_t passleft, size_t passtop, size_t spacex, size_t spacey, size_t passw, size_t passh, uint32_t bpp) -{ - if (passw) - { - size_t bytewidth = (bpp + 7) / 8, linelength = 1 + ((bpp * passw + 7) / 8); - uint32_t y = 0; - - for (; y < passh; y++) - { - size_t i, b; - uint8_t filterType = in[y * linelength]; - uint8_t *prevline = (y == 0) ? 0 : lineo; - PNG_unFilterScanline(linen, &in[y * linelength + 1], prevline, bytewidth, filterType, (w * bpp + 7) / 8); - - if (!PNG_error) - { - if (bpp >= 8) - { - for (i = 0; i < passw; i++) - { - for (b = 0; b < bytewidth; b++) // b = current byte of this pixel - { - out[bytewidth * w * (passtop + spacey * y) + bytewidth * (passleft + spacex * i) + b] = linen[bytewidth * i + b]; - } - } - } - else - { - for (i = 0; i < passw; i++) - { - size_t obp = bpp * w * (passtop + spacey * y) + bpp * (passleft + spacex * i); - size_t bp = i * bpp; - - for (b = 0; b < bpp; b++) - { - PNG_setBitOfReversedStream(&obp, out, PNG_readBitFromReversedStream(&bp, linen)); - } - } - } - } - - uint8_t *temp = linen; - linen = lineo; - lineo = temp; // swap the two buffer pointers "line old" and "line new" - } - } -} - - -/*============================================================================== - * Converts any color type to 32-bit. - * Returns a LodePNG error code - */ - -int PNG_convert(const PNG_info_t *info, vector8_t *out, const uint8_t *in) -{ - size_t c, i; - uint32_t bitDepth, colorType; - bitDepth = info->bitDepth; - colorType = info->colorType; - size_t numpixels = info->width * info->height; - vector8_resize(out, numpixels * 4); - uint8_t *out_data = out->size ? out->data : 0; - - size_t bp = 0; - - if (bitDepth == 8 && colorType == 0) // Greyscale - { - for (i = 0; i < numpixels; i++) - { - out_data[4 * i + 0] = out_data[4 * i + 1] = out_data[4 * i + 2] = in[i]; - out_data[4 * i + 3] = (info->key_defined && (in[i] == info->key_r)) ? 0 : 255; - } - } - else if (bitDepth == 8 && colorType == 2) // RGB color - { - for (i = 0; i < numpixels; i++) - { - for (c = 0; c < 3; c++) - { - out_data[4 * i + c] = in[3 * i + c]; - } - - out_data[4 * i + 3] = (info->key_defined && (in[3 * i + 0] == info->key_r) && (in[3 * i + 1] == info->key_g) && (in[3 * i + 2] == info->key_b)) ? 0 : 255; - } - } - else if (bitDepth == 8 && colorType == 3) // indexed color (palette) - { - for (i = 0; i < numpixels; i++) - { - if (4U * in[i] >= info->palette->size) - { - return 46; - } - - for (c = 0; c < 4; c++) // Get rgb colors from the palette - { - out_data[4 * i + c] = info->palette->data[4 * in[i] + c]; - } - } - } - else if (bitDepth == 8 && colorType == 4) // Greyscale with alpha - { - for (i = 0; i < numpixels; i++) - { - out_data[4 * i + 0] = out_data[4 * i + 1] = out_data[4 * i + 2] = in[2 * i + 0]; - out_data[4 * i + 3] = in[2 * i + 1]; - } - } - else if (bitDepth == 8 && colorType == 6) - { - for (i = 0; i < numpixels; i++) - { - for (c = 0; c < 4; c++) - { - out_data[4 * i + c] = in[4 * i + c]; // RGB with alpha - } - } - } - else if (bitDepth == 16 && colorType == 0) // Greyscale - { - for (i = 0; i < numpixels; i++) - { - out_data[4 * i + 0] = out_data[4 * i + 1] = out_data[4 * i + 2] = in[2 * i]; - out_data[4 * i + 3] = (info->key_defined && (256U * in[i] + in[i + 1] == info->key_r)) ? 0 : 255; - } - } - else if (bitDepth == 16 && colorType == 2) // RGB color - { - for (i = 0; i < numpixels; i++) - { - for (c = 0; c < 3; c++) - { - out_data[4 * i + c] = in[6 * i + 2 * c]; - } - - out_data[4 * i + 3] = (info->key_defined && - (256U * in[6 * i + 0] + in[6 * i + 1] == info->key_r) && - (256U * in[6 * i + 2] + in[6 * i + 3] == info->key_g) && - (256U * in[6 * i + 4] + in[6 * i + 5] == info->key_b)) ? 0 : 255; - } - } - else if (bitDepth == 16 && colorType == 4) // Greyscale with alpha - { - for (i = 0; i < numpixels; i++) - { - out_data[4 * i + 0] = out_data[4 * i + 1] = out_data[4 * i + 2] = in[4 * i]; // msb - out_data[4 * i + 3] = in[4 * i + 2]; - } - } - else if (bitDepth == 16 && colorType == 6) - { - for (i = 0; i < numpixels; i++) - { - for (c = 0; c < 4; c++) - { - out_data[4 * i + c] = in[8 * i + 2 * c]; // RGB with alpha - } - } - } - else if (bitDepth < 8 && colorType == 0) // Greyscale - { - for (i = 0; i < numpixels; i++) - { - uint32_t value = (PNG_readBitsFromReversedStream(&bp, in, bitDepth) * 255) / ((1 << bitDepth) - 1); // Scale value from 0 to 255 - out_data[4 * i + 0] = out_data[4 * i + 1] = out_data[4 * i + 2] = (uint8_t) value; - out_data[4 * i + 3] = (info->key_defined && value && (((1U << bitDepth) - 1U) == info->key_r) && ((1U << bitDepth) - 1U)) ? 0 : 255; - } - } - else if (bitDepth < 8 && colorType == 3) // Palette - { - for (i = 0; i < numpixels; i++) - { - uint32_t value = PNG_readBitsFromReversedStream(&bp, in, bitDepth); - - if (4 * value >= info->palette->size) - { - return 47; - } - - for (c = 0; c < 4; c++) // Get RGB colors from the palette - { - out_data[4 * i + c] = info->palette->data[4 * value + c]; - } - } - } - return 0; -} -#endif - - -//============================================================================== - -PNG_info_t *PNG_info_new() -{ - PNG_info_t *info = png_alloc_malloc(sizeof(PNG_info_t)); - uint32_t i; - - for (i = 0; i < sizeof(PNG_info_t); i++) - { - ((uint8_t *) info)[i] = 0; - } - - info->palette = vector8_new(0, 0); - info->image = vector8_new(0, 0); - - return info; -} - - -//============================================================================== - -PNG_info_t *PNG_decode(const uint8_t *in, uint32_t size) -{ - if (size == 0 || in == 0) - { - PNG_error = 48; // the given data is empty - return NULL; - } - - PNG_error = 0; - PNG_info_t *info = PNG_info_new(); - PNG_readPngHeader(info, in, size); - - if (PNG_error) - { - return NULL; - } - - size_t pos = 33; // first byte of the first chunk after the header - vector8_t *idat = NULL; // the data from IDAT chunks - bool IEND = false; - bool known_type = true; - info->key_defined = false; - - /* - * Loop through the chunks, ignoring unknown chunks and stopping at IEND chunk. - * IDAT data is put at the start of the in buffer - */ - while (!IEND) - { - size_t i; - - if (pos + 8 >= size) - { - PNG_error = 30; // error: size of the in buffer too small to contain next chunk - return NULL; - } - - size_t chunkLength = PNG_read32bitInt(&in[pos]); - pos += 4; - - if (chunkLength > 0x7fffffff) - { - PNG_error = 63; - return NULL; - } - - if (pos + chunkLength >= size) - { - PNG_error = 35; // error: size of the in buffer too small to contain next chunk - return NULL; - } - - uint32_t chunkType = *(uint32_t *) &in[pos]; - - if (chunkType == CHUNK_IDAT) // IDAT: compressed image data chunk - { - size_t offset = 0; - - if (idat) - { - offset = idat->size; - vector8_resize(idat, offset + chunkLength); - } - else - { - idat = vector8_new(chunkLength, 0); - } - - for (i = 0; i < chunkLength; i++) - { - idat->data[offset + i] = in[pos + 4 + i]; - } - - pos += (4 + chunkLength); - } - else if (chunkType == CHUNK_IEND) // IEND - { - pos += 4; - IEND = true; - } -#ifdef USE_ALL_1 - else if (chunkType == CHUNK_PLTE) // PLTE: palette chunk - { - size_t j; - pos += 4; // go after the 4 letters - vector8_resize(info->palette, 4 * (chunkLength / 3)); - - if (info->palette->size > (4 * 256)) - { - PNG_error = 38; // error: palette too big - return NULL; - } - - for (i = 0; i < info->palette->size; i += 4) - { - for (j = 0; j < 3; j++) - { - info->palette->data[i + j] = in[pos++]; // RGB - } - - info->palette->data[i + 3] = 255; // alpha - } - } - else if (chunkType == CHUNK_tRNS) // tRNS: palette transparency chunk - { - pos += 4; // go after the 4 letters - - if (info->colorType == 3) - { - if (4 * chunkLength > info->palette->size) - { - PNG_error = 39; // error: more alpha values given than there are palette entries - return NULL; - } - - for (i = 0; i < chunkLength; i++) - { - info->palette->data[4 * i + 3] = in[pos++]; - } - } - else if (info->colorType == 0) - { - if (chunkLength != 2) - { - PNG_error = 40; // error: this chunk must be 2 bytes for greyscale image - return NULL; - } - - info->key_defined = true; - info->key_r = info->key_g = info->key_b = 256 * in[pos] + in[pos + 1]; - pos += 2; - } - else if (info->colorType == 2) - { - if (chunkLength != 6) - { - PNG_error = 41; // error: this chunk must be 6 bytes for RGB image - return NULL; - } - - info->key_defined = true; - info->key_r = 256 * in[pos] + in[pos + 1]; - pos += 2; - info->key_g = 256 * in[pos] + in[pos + 1]; - pos += 2; - info->key_b = 256 * in[pos] + in[pos + 1]; - pos += 2; - } - else - { - PNG_error = 42; // error: tRNS chunk not allowed for other color models - return NULL; - } - } -#endif - else // it's not an implemented chunk type, so ignore it: skip over the data - { - if (!(in[pos + 0] & 32)) - { - // error: unknown critical chunk (5th bit of first byte of chunk type is 0) - PNG_error = 69; - return NULL; - } - - pos += (chunkLength + 4); // skip 4 letters and uninterpreted data of unimplemented chunk - known_type = false; - } - - pos += 4; // step over CRC (which is ignored) - } - -#if USE_ALL_1 - uint32_t bpp = PNG_getBpp(info); -#else - uint32_t bpp = 32; -#endif - vector8_t *scanlines; // now the out buffer will be filled - scanlines = vector8_new(((info->width * (info->height * bpp + 7)) / 8) + info->height, 0); -#if USE_ALL_1 - PNG_error = Zlib_decompress(scanlines, idat); -#else - Inflator_inflate(scanlines, idat, 2); - PNG_error = Inflator_error; -#endif - - if (PNG_error) - { - return NULL; // stop if the zlib decompressor returned an error - } - - size_t bytewidth = (bpp + 7) / 8, outlength = (info->height * info->width * bpp + 7) / 8; - vector8_resize(info->image, outlength); // time to fill the out buffer - uint8_t *out_data = outlength ? info->image->data : 0; - -#ifdef USE_ALL_1 - if (info->interlaceMethod == 0) // no interlace, just filter - { - size_t obp, bp; -#endif - size_t y = 0; - size_t linestart = 0; - // length in bytes of a scanline, excluding the filtertype byte - size_t linelength = (info->width * bpp + 7) / 8; -#ifdef USE_ALL_1 - if (bpp >= 8) // byte per byte - { -#endif - for (y = 0; y < info->height; y++) - { -// uint32_t filterType = scanlines->data[linestart]; - uint8_t filterType = scanlines->data[linestart]; - const uint8_t *prevline; - prevline = (y == 0) ? 0 : &out_data[(y - 1) * info->width * bytewidth]; - PNG_unFilterScanline(&out_data[linestart - y], &scanlines->data[linestart + 1], prevline, bytewidth, filterType, linelength); - - if (PNG_error) - { - return NULL; - } - - linestart += (1 + linelength); // go to start of next scanline - } -#ifdef USE_ALL_1 - } - else // less than 8 bits per pixel, so fill it up bit per bit - { - vector8_t *templine; // only used if bpp < 8 - templine = vector8_new((info->width * bpp + 7) >> 3, 0); - - for (y = 0, obp = 0; y < info->height; y++) - { - // uint32_t filterType = scanlines->data[linestart]; - uint8_t filterType = scanlines->data[linestart]; - const uint8_t *prevline; - prevline = (y == 0) ? 0 : &out_data[(y - 1) * info->width * bytewidth]; - PNG_unFilterScanline(templine->data, &scanlines->data[linestart + 1], prevline, bytewidth, filterType, linelength); - - if (PNG_error) - { - return NULL; - } - - for (bp = 0; bp < info->width * bpp;) - { - PNG_setBitOfReversedStream(&obp, out_data, PNG_readBitFromReversedStream(&bp, templine->data)); - } - - linestart += (1 + linelength); // go to start of next scanline - } - } - } - else // interlaceMethod is 1 (Adam7) - { - int i; - size_t passw[7] = - { - (info->width + 7) / 8, (info->width + 3) / 8, (info->width + 3) / 4, - (info->width + 1) / 4, (info->width + 1) / 2, (info->width + 0) / 2, - (info->width + 0) / 1 - }; - - size_t passh[7] = - { - (info->height + 7) / 8, (info->height + 7) / 8, (info->height + 3) / 8, - (info->height + 3) / 4, (info->height + 1) / 4, (info->height + 1) / 2, - (info->height + 0) / 2 - }; - - size_t passstart[7] = { 0 }; - size_t pattern[28] = { 0, 4, 0, 2, 0, 1, 0, 0, 0, 4, 0, 2, 0, 1, 8, 8, 4, 4, 2, 2, 1, 8, 8, - 8, 4, 4, 2, 2 }; // values for the adam7 passes - - for (i = 0; i < 6; i++) - { - passstart[i + 1] = passstart[i] + passh[i] * ((passw[i] ? 1 : 0) + (passw[i] * bpp + 7) / 8); - } - - vector8_t *scanlineo, *scanlinen; // "old" and "new" scanline - scanlineo = vector8_new((info->width * bpp + 7) / 8, 0); - scanlinen = vector8_new((info->width * bpp + 7) / 8, 0); - - for (i = 0; i < 7; i++) - { - PNG_adam7Pass(out_data, scanlinen->data, scanlineo->data, &scanlines->data[passstart[i]], - info->width, pattern[i], pattern[i + 7], pattern[i + 14], pattern[i + 21], - passw[i], passh[i], bpp); - } - } - - if (info->colorType != 6 || info->bitDepth != 8) // conversion needed - { - vector8_t *copy = vector8_copy(info->image); // xxx: is this copy necessary? - PNG_error = PNG_convert(info, info->image, copy->data); - } -#endif - return info; -} diff --git a/i386/boot2/picopng.h b/i386/boot2/picopng.h deleted file mode 100644 index 66c2c9e..0000000 --- a/i386/boot2/picopng.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef _PICOPNG_H -#define _PICOPNG_H - -#include <stdint.h> - -typedef struct { - uint32_t *data; - size_t size; - size_t allocsize; -} vector32_t; - -typedef struct { - uint8_t *data; - size_t size; - size_t allocsize; -} vector8_t; - -typedef struct { - uint32_t width, height; - uint32_t colorType, bitDepth; - uint32_t compressionMethod, filterMethod, interlaceMethod; - uint32_t key_r, key_g, key_b; - bool key_defined; // is a transparent color key given? - vector8_t *palette; - vector8_t *image; -} PNG_info_t; - -PNG_info_t *PNG_decode(const uint8_t *in, uint32_t size); -void png_alloc_free_all(); - -extern int PNG_error; - -#endif From bfe307945611e041527ccbbd9b0455f6f8dddf3d Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 15 Oct 2014 00:46:15 +0200 Subject: [PATCH 485/623] Removing unused CLUT data --- i386/boot2/appleClut8.h | 96 ----------------------------------------- 1 file changed, 96 deletions(-) delete mode 100755 i386/boot2/appleClut8.h diff --git a/i386/boot2/appleClut8.h b/i386/boot2/appleClut8.h deleted file mode 100755 index 50416f7..0000000 --- a/i386/boot2/appleClut8.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 1999-2003 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 2.0 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. - * - * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __BOOT2_APPLECLUT8_H -#define __BOOT2_APPLECLUT8_H - -static const unsigned char appleClut8[ 256 * 3 ] = -{ - 0xff,0xff,0xff, 0xbf,0xbf,0xbf, 0xbe,0xbe,0xbe, 0xbd,0xbd,0xbd, - 0xbc,0xbc,0xbc, 0xff,0xff,0x00, 0xba,0xba,0xba, 0xb9,0xb9,0xb9, - 0xb8,0xb8,0xb8, 0xb7,0xb7,0xb7, 0xb6,0xb6,0xb6, 0xb5,0xb5,0xb5, - 0xb4,0xb4,0xb4, 0xb3,0xb3,0xb3, 0xb2,0xb2,0xb2, 0x00,0x00,0x00, - 0xb1,0xb1,0xb1, 0xb0,0xb0,0xb0, 0xaf,0xaf,0xaf, 0xae,0xae,0xae, - 0xad,0xad,0xad, 0xac,0xac,0xac, 0xab,0xab,0xab, 0xaa,0xaa,0xaa, - 0xff,0x00,0xff, 0xa9,0xa9,0xa9, 0xa8,0xa8,0xa8, 0xa7,0xa7,0xa7, - 0xa6,0xa6,0xa6, 0xa5,0xa5,0xa5, 0xa4,0xa4,0xa4, 0xa3,0xa3,0xa3, - 0xa2,0xa2,0xa2, 0xa1,0xa1,0xa1, 0xa0,0xa0,0xa0, 0xff,0x00,0x00, - 0x9f,0x9f,0x9f, 0x9e,0x9e,0x9e, 0x9d,0x9d,0x9d, 0x9c,0x9c,0x9c, - 0x9b,0x9b,0x9b, 0x9a,0x9a,0x9a, 0xcc,0xcc,0xff, 0xcc,0xcc,0xcc, - 0x99,0x99,0x99, 0x98,0x98,0x98, 0x97,0x97,0x97, 0x96,0x96,0x96, - 0x95,0x95,0x95, 0x94,0x94,0x94, 0x93,0x93,0x93, 0x92,0x92,0x92, - 0x91,0x91,0x91, 0x90,0x90,0x90, 0x8f,0x8f,0x8f, 0x8e,0x8e,0x8e, - 0x8d,0x8d,0x8d, 0x8c,0x8c,0x8c, 0x8b,0x8b,0x8b, 0x8a,0x8a,0x8a, - 0x89,0x89,0x89, 0x87,0x87,0x87, 0x86,0x86,0x86, 0x85,0x85,0x85, - 0x84,0x84,0x84, 0x83,0x83,0x83, 0x82,0x82,0x82, 0x81,0x81,0x81, - 0x80,0x80,0x80, 0x7f,0x7f,0x7f, 0x7e,0x7e,0x7e, 0x7d,0x7d,0x7d, - 0x7c,0x7c,0x7c, 0x7b,0x7b,0x7b, 0x7a,0x7a,0x7a, 0x79,0x79,0x79, - 0x78,0x78,0x78, 0x76,0x76,0x76, 0x75,0x75,0x75, 0x74,0x74,0x74, - 0x73,0x73,0x73, 0x72,0x72,0x72, 0x71,0x71,0x71, 0x70,0x70,0x70, - 0x6f,0x6f,0x6f, 0x6e,0x6e,0x6e, 0x6d,0x6d,0x6d, 0x6c,0x6c,0x6c, - 0x6b,0x6b,0x6b, 0x6a,0x6a,0x6a, 0x69,0x69,0x69, 0x68,0x68,0x68, - 0x67,0x67,0x67, 0x66,0x66,0x66, 0x64,0x64,0x64, 0x63,0x63,0x63, - 0x62,0x62,0x62, 0x61,0x61,0x61, 0x60,0x60,0x60, 0x5f,0x5f,0x5f, - 0x5e,0x5e,0x5e, 0x5d,0x5d,0x5d, 0x5c,0x5c,0x5c, 0x5b,0x5b,0x5b, - 0x5a,0x5a,0x5a, 0x59,0x59,0x59, 0x58,0x58,0x58, 0x57,0x57,0x57, - 0x56,0x56,0x56, 0x54,0x54,0x54, 0x53,0x53,0x53, 0x52,0x52,0x52, - 0x51,0x51,0x51, 0x50,0x50,0x50, 0x4f,0x4f,0x4f, 0x4e,0x4e,0x4e, - 0x4d,0x4d,0x4d, 0x4c,0x4c,0x4c, 0x4b,0x4b,0x4b, 0x4a,0x4a,0x4a, - 0x49,0x49,0x49, 0x48,0x48,0x48, 0x47,0x47,0x47, 0x46,0x46,0x46, - 0x45,0x45,0x45, 0x43,0x43,0x43, 0x42,0x42,0x42, 0x41,0x41,0x41, - 0x40,0x40,0x40, 0x3f,0x3f,0x3f, 0x3e,0x3e,0x3e, 0x3d,0x3d,0x3d, - 0x3c,0x3c,0x3c, 0x3b,0x3b,0x3b, 0x3a,0x3a,0x3a, 0x39,0x39,0x39, - 0x38,0x38,0x38, 0x37,0x37,0x37, 0x36,0x36,0x36, 0x35,0x35,0x35, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x00,0xff,0xff, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x00,0xff,0x00, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x00,0x00,0xff, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0xdd,0x00,0x00, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x00,0xbb,0x00, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0xbb,0xbb,0xbb, - 0x65,0x65,0x65, 0x88,0x88,0x88, 0x77,0x77,0x77, 0x55,0x55,0x55, - 0x44,0x44,0x44, 0x22,0x22,0x22, 0x65,0x65,0x65, 0x00,0x00,0x00 -}; - -#endif /* !__BOOT2_APPLECLUT8_H */ From 0cecbbf5f372dd5d6fbd1a034cbfccbfb409f2bd Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 15 Oct 2014 00:46:48 +0200 Subject: [PATCH 486/623] Stop drawing the background/logo twice --- i386/boot2/boot.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 957e026..d177375 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -231,7 +231,9 @@ void boot(int biosdev) printf("\ngArchCPUType (CPU): %s\n", (gArchCPUType == CPU_TYPE_X86_64) ? "x86_64" : "i386"); sleep(3); // Silent sleep. #endif -#else +#endif + +#if (DEBUG_STATE_ENABLED == 0) showBootLogo(bootRecoveryHD); #endif @@ -747,7 +749,7 @@ void boot(int biosdev) // Switch to graphics mode and show the Apple logo on a gray-ish background. showBootLogo(bootRecoveryHD); } - + _BOOT_DEBUG_DUMP("execKernel-8\n"); startMachKernel(kernelEntry, bootArgs); // asm.s From 55f23f2cdccfcc65e271b4c33f7d658f0fe35279 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 15 Oct 2014 00:49:20 +0200 Subject: [PATCH 487/623] Use LZVN packed logo data instead of old RLE data --- i386/boot2/bootlogo.c | 220 +++++----------------------------- i386/boot2/bootlogo.h | 268 ++++++++++++++++++++---------------------- 2 files changed, 155 insertions(+), 333 deletions(-) diff --git a/i386/boot2/bootlogo.c b/i386/boot2/bootlogo.c index 09999b8..e5bfe87 100755 --- a/i386/boot2/bootlogo.c +++ b/i386/boot2/bootlogo.c @@ -29,7 +29,6 @@ #include "boot.h" #include "bootlogo.h" #include "bootstruct.h" -#include "appleClut8.h" #define DEBUG 0 @@ -38,16 +37,16 @@ unsigned long lookUpCLUTIndex(unsigned char index) { long colorIndex = (index * 3); - long red = appleClut8[ colorIndex ]; - long green = appleClut8[ colorIndex++ ]; - long blue = appleClut8[ colorIndex++ ]; + long red = AppleLogoBlackClut[ colorIndex ]; + long green = AppleLogoBlackClut[ colorIndex++ ]; + long blue = AppleLogoBlackClut[ colorIndex++ ]; return (red << 16) | (green << 8) | blue; } //============================================================================== -void * stosl(void * dst, long val, long len) +void * stosl(void *dst, long val, long len) { asm volatile ("rep; stosl" : "=c" (len), "=D" (dst) @@ -71,10 +70,11 @@ void setBackgroundColor(uint32_t aBackGroundColor) int rem = (pixelBytes * width) % 4; int length = pixelBytes * width / 4; - + + bcopy(&aBackGroundColor, vram, rem); + while (height--) { - bcopy(&aBackGroundColor, vram, rem); stosl(vram + rem, aBackGroundColor, length); vram += VIDEO(rowBytes); } @@ -82,7 +82,7 @@ void setBackgroundColor(uint32_t aBackGroundColor) //============================================================================== -void drawDataRectangle(unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char * data) +void drawDataRectangle(unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char *data) { unsigned short drawWidth; @@ -95,133 +95,12 @@ void drawDataRectangle(unsigned short x, unsigned short y, unsigned short width, while (height--) { - bcopy( data, vram, drawWidth * pixelBytes ); + bcopy( data, vram, width * pixelBytes ); vram += VIDEO(rowBytes); data += width * pixelBytes; } } -#if (MAKE_TARGET_OS == YOSEMITE) - -#include "picopng.h" - -//============================================================================== - -void showBootLogo(bool aBootRecoveryHDFlag) -{ -#if DEBUG - printf("aBootRecoveryHDFlag: %s\n", aBootRecoveryHDFlag ? "true" : "false"); - sleep(1); -#else - setVideoMode(GRAPHICS_MODE); -#endif - - uint32_t backGroundColor = 0xbfbfbf; - - char filename[60] = ""; - char targetLogoName[30] = "appleLogo_apple"; - - // bootArgs->flags |= kBootArgsFlagBlack is set by boot.efi (EFI var 'BlackMode') - if (bootArgs->flags & kBootArgsFlagBlackTheme) // kBootArgsFlagBlack) - { - backGroundColor = 0x030000; -#if DEBUG - printf("Black mode active!\n"); - sleep(1); -#endif - } - else - { - sprintf(targetLogoName, "%s%s", targetLogoName, "_gray"); -#if DEBUG - printf("Gray mode active!\n"); - sleep(1); -#endif - } - - // bootArgs->flags |= kBootArgsFlagHiDPI is set by boot.efi (EFI var 'UIScale') - sprintf(targetLogoName, "%s%s.png", targetLogoName, (bootArgs->flags & kBootArgsFlagHiDPI) ? "@2x" : ""); -#if DEBUG - printf("targetLogoName: %s\n", targetLogoName); - sleep(1); -#endif - setBackgroundColor(backGroundColor); - - void *imageLoadBuffer = (void *)kLoadAddr; - // - // Rock, Paper, Scissors? - // - sprintf(filename, "%s", (aBootRecoveryHDFlag) ? "/com.apple.Boot.P" : "", "/usr/standalone/i386/EfiLoginUI/appleLogo.efires"); - - int EFIResourceFile = open(filename, 0); - - if (EFIResourceFile >= 0) - { - int filesize = file_size(EFIResourceFile); - - if (read(EFIResourceFile, (char *) kLoadAddr, filesize) == filesize) - { - EFIRES_HEADER * header = (EFIRES_HEADER *) imageLoadBuffer; -#if DEBUG - printf("\nheader->revision..: %d\n", header->revision); - printf("header->imageCount: %d\n", header->imageCount); -#endif - int pos = sizeof(header); - - for (int index = 0; index < header->imageCount; index++) - { - EFIRES_IMAGE_HEADER * imageHeader = (EFIRES_IMAGE_HEADER *) (imageLoadBuffer + pos); -#if DEBUG - printf("imageHeader->filename.: %s\n", imageHeader->filename); - printf("imageHeader->offset...: %d\n", imageHeader->offset); - printf("imageHeader->imageSize: %d\n", imageHeader->imageSize); - sleep(2); -#endif - if (strncmp((char *)imageHeader->filename, targetLogoName, strlen(targetLogoName)) == 0) - { - PNG_info_t *info = PNG_decode((imageLoadBuffer + imageHeader->offset), imageHeader->imageSize); -#if DEBUG - printf("Apple logo image found!\n"); - printf("Image width...........: %d\n", info->width); - printf("Image height..........: %d\n", info->height); - sleep(3); -#endif - uint8_t *bootImage = malloc((info->width * 4) * info->height); - memcpy(bootImage, info->image->data, ((info->width * 4) * info->height)); - -#if DEBUG - setVideoMode(GRAPHICS_MODE); -#endif - uint16_t x = (VIDEO(width) - MIN(info->width, VIDEO(width)) ) / 2; - uint16_t y = (VIDEO(height) - MIN(info->height, VIDEO(height)) ) / 2; - blendImage(x, y, info->width, info->height, bootImage); - png_alloc_free_all(); - free(bootImage); - - return; - } - else - { - pos += sizeof(EFIRES_IMAGE_HEADER); - } - } - } - - close(EFIResourceFile); - } -#if DEBUG - else - { - setVideoMode(VGA_TEXT_MODE); - error("showBootLogo(Error)"); - } -#endif - -} - -#else - - //============================================================================== int convertImage(unsigned short width, unsigned short height, const unsigned char *imageData, unsigned char **newImageData) @@ -258,73 +137,34 @@ int convertImage(unsigned short width, unsigned short height, const unsigned cha } -/*============================================================================== - -void drawDataRectangle(unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char * data) -{ - unsigned short drawWidth; - - long pixelBytes = VIDEO(depth) / 8; - - unsigned char * vram = (unsigned char *) VIDEO(baseAddr) + VIDEO(rowBytes) * y + pixelBytes * x; - - drawWidth = MIN(width, VIDEO(width) - x); - height = MIN(height, VIDEO(height) - y); - - while (height--) - { - bcopy( data, vram, drawWidth * pixelBytes ); - vram += VIDEO(rowBytes); - data += width * pixelBytes; - } -} */ - - -//============================================================================== - -char * decodeRLE(const void * rleData, int rleBlocks, int outBytes) -{ - char *out, *cp; - - struct RLEBlock - { - unsigned char count; - unsigned char value; - } * bp = (struct RLEBlock *) rleData; - - out = cp = (char *) malloc(outBytes); - - if (out == NULL) - { - return NULL; - } - - while (rleBlocks--) - { - memset( cp, bp->value, bp->count ); - cp += bp->count; - bp++; - } - - return out; -} - //============================================================================== void showBootLogo(bool aBootRecoveryHDFlag) { - uint8_t *bootImageData = NULL; - uint8_t *appleBootLogo = (uint8_t *) decodeRLE(appleLogoRLE, 686, 16384); - setVideoMode(GRAPHICS_MODE); + +#if BLACKMODE + setBackgroundColor(0x030000); + uint32_t compressedSize = sizeof(AppleLogoBlackPacked); + void *logoData = (void *)AppleLogoBlackPacked; +#else setBackgroundColor(0xbfbfbf); + uint32_t compressedSize = sizeof(AppleLogoBlackPacked); + void *logoData = (void *)AppleLogoPacked; +#endif - convertImage(APPLE_LOGO_WIDTH, APPLE_LOGO_HEIGHT, appleBootLogo, &bootImageData); + int logoSize = (APPLE_LOGO_WIDTH * APPLE_LOGO_HEIGHT); + void * decompressedData = malloc(logoSize); - drawDataRectangle(APPLE_LOGO_X, APPLE_LOGO_Y, APPLE_LOGO_WIDTH, APPLE_LOGO_HEIGHT, bootImageData); + if (decompressedData) + { + if (lzvn_decode(decompressedData, logoSize, logoData, compressedSize) == logoSize) + { + uint8_t *bootImageData = NULL; + convertImage(APPLE_LOGO_WIDTH, APPLE_LOGO_HEIGHT, decompressedData, &bootImageData); + drawDataRectangle(APPLE_LOGO_X, APPLE_LOGO_Y, APPLE_LOGO_WIDTH, APPLE_LOGO_HEIGHT, bootImageData); + } - free(bootImageData); - free(appleBootLogo); + free(decompressedData); + } } - -#endif diff --git a/i386/boot2/bootlogo.h b/i386/boot2/bootlogo.h index 0701596..2fb9b65 100755 --- a/i386/boot2/bootlogo.h +++ b/i386/boot2/bootlogo.h @@ -1,160 +1,142 @@ +#define APPLE_LOGO_WIDTH 84 +#define APPLE_LOGO_HEIGHT 103 + +#define VIDEO(x) (bootArgs->Video.v_ ## x) + +/* + * Used in showBootLogo(). Now using the VIDEO() macro instead of the static + * values. This way the logo should be properly positioned. With or without + * specifying a "Graphics Mode" in com.apple.Boot.plist And no matter what + * values you've set in RevoBoot/i386/config/settings.h Should all be fine now. + */ + +#define APPLE_LOGO_X ((VIDEO(width) - APPLE_LOGO_WIDTH) / 2) +#define APPLE_LOGO_Y ((VIDEO(height) - APPLE_LOGO_HEIGHT) / 2) + #define MIN(x, y) ((x) < (y) ? (x) : (y)) #define MAX(x, y) ((x) > (y) ? (x) : (y)) -#define VIDEO(x) (bootArgs->Video.v_ ## x) +#if ((MAKE_TARGET_OS == YOSEMITE) && (BLACKMODE == 1)) -#if (MAKE_TARGET_OS == YOSEMITE) +// +// LZVN packed data for white Apple logo (blackmode). +// -typedef struct +static UInt8 AppleLogoBlackPacked[ 912 ] = { - uint16_t revision; - uint16_t imageCount; -} __attribute__((packed)) EFIRES_HEADER; + 0x68, 0x01, 0x00, 0xF0, 0xFF, 0xF0, 0xB7, 0xE4, 0x01, 0x02, 0x01, 0x00, 0xFA, 0xF0, 0x33, 0xE7, 0x03, 0x04,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x00, 0x01, 0x9D, 0xCB, 0x10, 0x07, 0xFF, 0xE4, 0x08, 0x0B, 0x04, 0x0F, 0x11, 0x09, 0xE4, 0x06, 0x0F, 0x04, 0x09, 0x3B, 0x50, 0xF0, + 0x0C, 0xC8, 0x01, 0x0B, 0x10, 0x06, 0xF6, 0x99, 0x93, 0x05, 0x04, 0xF9, 0xB1, 0x47, 0x1A, 0x08, 0x0B, 0x10, 0x01, 0x9D, 0xF0, 0x0C, 0x0E, 0xF0, 0x0A, 0x2F, 0x68, 0x07, 0x38, 0x01, 0xF1, 0x68, + 0x35, 0x05, 0xF3, 0x6C, 0x49, 0x02, 0xF6, 0x20, 0x01, 0x68, 0x56, 0x04, 0xF0, 0x05, 0x68, 0x52, 0x03, 0xF9, 0x10, 0x01, 0x88, 0x36, 0x0A, 0x0B, 0x9D, 0x95, 0x0D, 0x0E, 0xF8, 0x38, 0x01, 0xF1, + 0x3B, 0xFF, 0xF0, 0x00, 0x68, 0xF6, 0x08, 0xF4, 0x38, 0x01, 0xF5, 0x98, 0x6F, 0x0C, 0x0F, 0xF0, 0x00, 0x20, 0x01, 0x69, 0x58, 0x0A, 0xFF, 0x68, 0x87, 0x0D, 0xF0, 0x01, 0x38, 0x01, 0xF0, 0x09, + 0x68, 0x55, 0x05, 0xFD, 0x68, 0x89, 0x0D, 0xF0, 0x05, 0x38, 0x01, 0xF0, 0x07, 0x38, 0x55, 0xFA, 0x38, 0x53, 0xF0, 0x25, 0x38, 0x55, 0xFA, 0x68, 0x53, 0x01, 0xF0, 0x28, 0x3C, 0xAF, 0xF9, 0x3A, + 0x76, 0xF5, 0x38, 0x01, 0xF0, 0x1A, 0x6A, 0x53, 0x0C, 0xF7, 0x3C, 0xCB, 0xF1, 0x38, 0x01, 0xF0, 0x1E, 0x3D, 0x03, 0xF6, 0xA3, 0x04, 0x1B, 0x38, 0x01, 0xF0, 0x1A, 0x9E, 0x09, 0x00, 0xF9, 0x23, + 0xC0, 0x38, 0x01, 0xF0, 0x21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20, 0xAB, 0x92, 0x1B, 0x05, 0x38, 0x01, 0x3F, 0x9A, 0x06, 0xF0, 0x1E, 0x39, 0xF4, 0xFB, + 0x28, 0x01, 0x3A, 0xFA, 0xF0, 0x1C, 0xA7, 0x3C, 0x65, 0x39, 0x53, 0xF0, 0x1A, 0xA7, 0x6A, 0x5D, 0x3D, 0x4A, 0xF0, 0x18, 0xA7, 0x1F, 0x5C, 0x6F, 0x2B, 0x0E, 0x08, 0xF0, 0x18, 0x68, 0x53, 0x05, + 0xF0, 0x09, 0x00, 0x55, 0x38, 0xAA, 0xF9, 0xE8, 0x0F, 0x0E, 0x09, 0x02, 0x02, 0x02, 0x0B, 0x07, 0x38, 0x1B, 0xF9, 0x6A, 0xED, 0x0A, 0xFF, 0x38, 0x01, 0xF5, 0xA3, 0xC8, 0x1B, 0xAA, 0x69, 0x5A, + 0x0F, 0x68, 0x57, 0x0B, 0xF7, 0x68, 0xA6, 0x10, 0xF0, 0x0B, 0x10, 0x01, 0x6A, 0xA8, 0x03, 0xF2, 0xAB, 0x16, 0x56, 0x05, 0x9B, 0xC4, 0x01, 0x0E, 0xF4, 0x6A, 0x45, 0x0C, 0xF0, 0x05, 0x38, 0x01, + 0xF5, 0x88, 0x39, 0x0B, 0x10, 0x98, 0x34, 0x0A, 0x04, 0xF0, 0x00, 0x8F, 0x62, 0x15, 0x03, 0x0E, 0x98, 0x52, 0x0F, 0x04, 0xF0, 0x16, 0x38, 0x01, 0xF0, 0xFF, 0xF0, 0x63, 0xE1, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; -typedef struct -{ - char filename[64]; - uint32_t offset; - uint32_t imageSize; -} __attribute__((packed)) EFIRES_IMAGE_HEADER; +// +// CLUT (Color LookUp Table) for white Apple logo. +// -typedef struct +static UInt8 AppleLogoBlackClut[ 64 ] = { - char signature[8]; - uint32_t length; - char chunkType[4]; - uint32_t width; - uint32_t height; - uint8_t bitDepth; - uint8_t colorType; - uint8_t compressionMethod; - uint8_t filterMethod; - uint8_t interlaceMethod; - uint32_t checksum; -} __attribute__((packed)) IMAGE_CHUNK_HEADER; - -extern void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *data); + 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x50, 0x50, 0x50, 0x9F, 0x9F, 0x9F, 0xEF, 0xEF, 0xEF, 0xFF, 0xFF, 0xFF, 0x80, 0x80, 0x80, 0x10, 0x10, 0x10, 0x70, 0x70, 0x70, 0xCF, 0xCF, + 0xCF, 0x60, 0x60, 0x60, 0xDF, 0xDF, 0xDF, 0x30, 0x30, 0x30, 0x8F, 0x8F, 0x8F, 0xBF, 0xBF, 0xBF, 0xAF, 0xAF, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; #else -const unsigned char appleLogoRLE[1372] = +// +// LZVN packed data for grey Apple logo. +// + +static UInt8 AppleLogoPacked[ 1392 ] = { - 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0x50, 0x01, 0x01, 0x02, 0x01, 0x17, - 0x01, 0x34, 0x01, 0x47, 0x03, 0x50, 0x01, 0x13, 0x76, 0x01, 0x01, 0x03, - 0x01, 0x20, 0x01, 0x40, 0x06, 0x50, 0x01, 0x13, 0x75, 0x01, 0x01, 0x1a, - 0x01, 0x42, 0x07, 0x50, 0x01, 0xfa, 0x01, 0x0a, 0x73, 0x01, 0x01, 0x07, - 0x01, 0x34, 0x09, 0x50, 0x01, 0x43, 0x01, 0x02, 0x72, 0x01, 0x01, 0x0e, - 0x01, 0x43, 0x0a, 0x50, 0x01, 0x36, 0x72, 0x01, 0x01, 0x14, 0x01, 0x4a, - 0x0b, 0x50, 0x01, 0x20, 0x71, 0x01, 0x01, 0x12, 0x01, 0x4b, 0x0b, 0x50, - 0x01, 0x4d, 0x01, 0x0b, 0x70, 0x01, 0x01, 0x0b, 0x01, 0x48, 0x0c, 0x50, - 0x01, 0xf9, 0x70, 0x01, 0x01, 0x03, 0x01, 0x3e, 0x0d, 0x50, 0x01, 0x1f, - 0x70, 0x01, 0x01, 0x2f, 0x0d, 0x50, 0x01, 0x48, 0x01, 0x06, 0x6f, 0x01, - 0x01, 0x15, 0x01, 0x4f, 0x0d, 0x50, 0x01, 0x27, 0x6f, 0x01, 0x01, 0x02, - 0x01, 0x3f, 0x0d, 0x50, 0x01, 0x45, 0x01, 0xf7, 0x6f, 0x01, 0x01, 0x1d, - 0x0e, 0x50, 0x01, 0x19, 0x6f, 0x01, 0x01, 0x02, 0x01, 0x40, 0x0d, 0x50, - 0x01, 0x2f, 0x70, 0x01, 0x01, 0x15, 0x0d, 0x50, 0x01, 0x3b, 0x01, 0x03, - 0x70, 0x01, 0x01, 0x34, 0x0c, 0x50, 0x01, 0x3f, 0x01, 0x07, 0x70, 0x01, - 0x01, 0xf7, 0x01, 0x47, 0x0b, 0x50, 0x01, 0xf9, 0x01, 0x07, 0x71, 0x01, - 0x01, 0x14, 0x0b, 0x50, 0x01, 0x36, 0x01, 0xf7, 0x72, 0x01, 0x01, 0x24, - 0x09, 0x50, 0x01, 0x4d, 0x01, 0x28, 0x74, 0x01, 0x01, 0x33, 0x08, 0x50, - 0x01, 0x3f, 0x01, 0x14, 0x75, 0x01, 0x01, 0x3a, 0x06, 0x50, 0x01, 0x41, - 0x01, 0x1f, 0x01, 0x02, 0x76, 0x01, 0x01, 0x3a, 0x03, 0x50, 0x01, 0x48, - 0x01, 0x35, 0x01, 0x17, 0x01, 0x02, 0x78, 0x01, 0x01, 0x15, 0x01, 0x33, - 0x01, 0x27, 0x01, 0x15, 0x01, 0xf7, 0x67, 0x01, 0x01, 0x02, 0x01, 0x08, - 0x01, 0x0e, 0x01, 0x13, 0x01, 0x14, 0x01, 0x12, 0x01, 0x0d, 0x01, 0x06, - 0x01, 0x02, 0x1c, 0x01, 0x01, 0x04, 0x01, 0x0b, 0x01, 0x12, 0x01, 0x17, - 0x01, 0x19, 0x01, 0x15, 0x01, 0x11, 0x01, 0x08, 0x01, 0x02, 0x4e, 0x01, - 0x01, 0x02, 0x01, 0x11, 0x01, 0x26, 0x01, 0x39, 0x01, 0x44, 0x01, 0x4c, - 0x01, 0x4f, 0x02, 0x50, 0x01, 0x4f, 0x01, 0x4d, 0x01, 0x4a, 0x01, 0x3f, - 0x01, 0x31, 0x01, 0x19, 0x01, 0xf7, 0x15, 0x01, 0x01, 0x0b, 0x01, 0x1c, - 0x01, 0x2e, 0x01, 0xf9, 0x01, 0x46, 0x01, 0x4d, 0x04, 0x50, 0x01, 0x4f, - 0x01, 0x4b, 0x01, 0x42, 0x01, 0x34, 0x01, 0x1f, 0x01, 0x0a, 0x49, 0x01, - 0x01, 0xf7, 0x01, 0x21, 0x01, 0x3f, 0x01, 0x4f, 0x0d, 0x50, 0x01, 0x47, - 0x01, 0x2d, 0x01, 0x0d, 0x10, 0x01, 0x01, 0x0d, 0x01, 0x25, 0x01, 0x3d, - 0x01, 0xfa, 0x0e, 0x50, 0x01, 0x4c, 0x01, 0x37, 0x01, 0x15, 0x45, 0x01, - 0x01, 0x04, 0x01, 0x25, 0x01, 0x45, 0x12, 0x50, 0x01, 0x4d, 0x01, 0x39, - 0x01, 0x19, 0x01, 0x02, 0x0a, 0x01, 0x01, 0x09, 0x01, 0x21, 0x01, 0xf9, - 0x01, 0x4d, 0x14, 0x50, 0x01, 0xf9, 0x01, 0x15, 0x42, 0x01, 0x01, 0x17, - 0x01, 0x42, 0x17, 0x50, 0x01, 0x42, 0x01, 0x27, 0x01, 0x0e, 0x01, 0x02, - 0x03, 0x01, 0x01, 0x02, 0x01, 0x0b, 0x01, 0x1f, 0x01, 0x38, 0x01, 0x4b, - 0x19, 0x50, 0x01, 0x33, 0x01, 0x06, 0x3e, 0x01, 0x01, 0x03, 0x01, 0x2e, - 0x1b, 0x50, 0x01, 0x4d, 0x01, 0x43, 0x01, 0x3a, 0x01, 0x37, 0x01, 0x3a, - 0x01, 0x42, 0x01, 0x4d, 0x1d, 0x50, 0x01, 0x42, 0x01, 0x0e, 0x3c, 0x01, - 0x01, 0x0a, 0x01, 0xf9, 0x41, 0x50, 0x01, 0x48, 0x01, 0x13, 0x3a, 0x01, - 0x01, 0x0d, 0x01, 0x45, 0x43, 0x50, 0x01, 0x4b, 0x01, 0x12, 0x38, 0x01, - 0x01, 0x10, 0x01, 0x48, 0x45, 0x50, 0x01, 0x48, 0x01, 0x0b, 0x36, 0x01, - 0x01, 0x0c, 0x01, 0x48, 0x47, 0x50, 0x01, 0x3d, 0x01, 0x03, 0x34, 0x01, - 0x01, 0x07, 0x01, 0x42, 0x49, 0x50, 0x01, 0x21, 0x34, 0x01, 0x01, 0x37, - 0x49, 0x50, 0x01, 0x42, 0x01, 0x12, 0x33, 0x01, 0x01, 0x22, 0x49, 0x50, - 0x01, 0x34, 0x01, 0xf7, 0x33, 0x01, 0x01, 0x0b, 0x01, 0x4b, 0x48, 0x50, - 0x01, 0x2c, 0x35, 0x01, 0x01, 0x36, 0x48, 0x50, 0x01, 0x29, 0x35, 0x01, - 0x01, 0x11, 0x01, 0x4f, 0x47, 0x50, 0x01, 0x2e, 0x36, 0x01, 0x01, 0x36, - 0x47, 0x50, 0x01, 0x3a, 0x01, 0x02, 0x35, 0x01, 0x01, 0x0b, 0x01, 0xfa, - 0x46, 0x50, 0x01, 0x46, 0x01, 0x08, 0x36, 0x01, 0x01, 0x26, 0x46, 0x50, - 0x01, 0x4e, 0x01, 0x15, 0x36, 0x01, 0x01, 0x02, 0x01, 0x40, 0x46, 0x50, - 0x01, 0x31, 0x37, 0x01, 0x01, 0x0e, 0x01, 0x4e, 0x45, 0x50, 0x01, 0x49, - 0x01, 0x08, 0x37, 0x01, 0x01, 0x25, 0x46, 0x50, 0x01, 0x29, 0x38, 0x01, - 0x01, 0x39, 0x45, 0x50, 0x01, 0x4c, 0x01, 0x0a, 0x37, 0x01, 0x01, 0xf7, - 0x01, 0x47, 0x45, 0x50, 0x01, 0x3a, 0x38, 0x01, 0x01, 0x10, 0x01, 0x4f, - 0x45, 0x50, 0x01, 0x22, 0x38, 0x01, 0x01, 0x1d, 0x46, 0x50, 0x01, 0x12, - 0x38, 0x01, 0x01, 0x29, 0x45, 0x50, 0x01, 0x4b, 0x01, 0x07, 0x38, 0x01, - 0x01, 0x36, 0x45, 0x50, 0x01, 0x42, 0x01, 0x02, 0x38, 0x01, 0x01, 0xf9, - 0x45, 0x50, 0x01, 0x3e, 0x39, 0x01, 0x01, 0x42, 0x45, 0x50, 0x01, 0x3c, - 0x39, 0x01, 0x01, 0x46, 0x45, 0x50, 0x01, 0x3b, 0x39, 0x01, 0x01, 0x48, - 0x45, 0x50, 0x01, 0xf9, 0x39, 0x01, 0x01, 0x48, 0x45, 0x50, 0x01, 0x3f, - 0x01, 0x02, 0x38, 0x01, 0x01, 0x46, 0x45, 0x50, 0x01, 0x48, 0x01, 0xf7, - 0x38, 0x01, 0x01, 0x43, 0x45, 0x50, 0x01, 0x4e, 0x01, 0x0e, 0x38, 0x01, - 0x01, 0x3f, 0x46, 0x50, 0x01, 0x1c, 0x38, 0x01, 0x01, 0x3a, 0x46, 0x50, - 0x01, 0x33, 0x38, 0x01, 0x01, 0x34, 0x46, 0x50, 0x01, 0x46, 0x01, 0x04, - 0x37, 0x01, 0x01, 0x2c, 0x47, 0x50, 0x01, 0x19, 0x37, 0x01, 0x01, 0x1f, - 0x47, 0x50, 0x01, 0x3a, 0x37, 0x01, 0x01, 0x15, 0x47, 0x50, 0x01, 0x4e, - 0x01, 0x11, 0x36, 0x01, 0x01, 0x0a, 0x01, 0xfa, 0x47, 0x50, 0x01, 0x37, - 0x36, 0x01, 0x01, 0x02, 0x01, 0x42, 0x47, 0x50, 0x01, 0x4f, 0x01, 0x15, - 0x36, 0x01, 0x01, 0x37, 0x48, 0x50, 0x01, 0x42, 0x01, 0x04, 0x35, 0x01, - 0x01, 0x25, 0x49, 0x50, 0x01, 0x2c, 0x35, 0x01, 0x01, 0x13, 0x49, 0x50, - 0x01, 0x4e, 0x01, 0x15, 0x34, 0x01, 0x01, 0xf7, 0x01, 0x47, 0x49, 0x50, - 0x01, 0x48, 0x01, 0x0b, 0x34, 0x01, 0x01, 0x37, 0x4a, 0x50, 0x01, 0x44, - 0x01, 0x0a, 0x33, 0x01, 0x01, 0x1f, 0x4b, 0x50, 0x01, 0x44, 0x01, 0x0d, - 0x32, 0x01, 0x01, 0x0a, 0x01, 0xfa, 0x4b, 0x50, 0x01, 0x48, 0x01, 0x17, - 0x32, 0x01, 0x01, 0x3a, 0x4c, 0x50, 0x01, 0x4f, 0x01, 0x2c, 0x01, 0x04, - 0x30, 0x01, 0x01, 0x1f, 0x4e, 0x50, 0x01, 0x41, 0x01, 0x19, 0x2f, 0x01, - 0x01, 0x07, 0x01, 0x4a, 0x4e, 0x50, 0x01, 0x44, 0x30, 0x01, 0x01, 0x33, - 0x4e, 0x50, 0x01, 0x36, 0x30, 0x01, 0x01, 0x14, 0x4e, 0x50, 0x01, 0x1f, - 0x30, 0x01, 0x01, 0x02, 0x01, 0x3f, 0x4c, 0x50, 0x01, 0x4d, 0x01, 0x0b, - 0x31, 0x01, 0x01, 0x1e, 0x4c, 0x50, 0x01, 0x3c, 0x32, 0x01, 0x01, 0x04, - 0x01, 0x44, 0x4b, 0x50, 0x01, 0x20, 0x33, 0x01, 0x01, 0x20, 0x4a, 0x50, - 0x01, 0x4a, 0x01, 0x07, 0x33, 0x01, 0x01, 0x04, 0x01, 0x43, 0x49, 0x50, - 0x01, 0x30, 0x35, 0x01, 0x01, 0x1c, 0x48, 0x50, 0x01, 0x4d, 0x01, 0x0e, - 0x35, 0x01, 0x01, 0x02, 0x01, 0x3e, 0x47, 0x50, 0x01, 0x36, 0x37, 0x01, - 0x01, 0x14, 0x01, 0x4f, 0x45, 0x50, 0x01, 0x4d, 0x01, 0x0e, 0x38, 0x01, - 0x01, 0x32, 0x45, 0x50, 0x01, 0x33, 0x39, 0x01, 0x01, 0x07, 0x01, 0x47, - 0x43, 0x50, 0x01, 0x4b, 0x01, 0x0b, 0x3a, 0x01, 0x01, 0x1c, 0x43, 0x50, - 0x01, 0x26, 0x3c, 0x01, 0x01, 0x37, 0x41, 0x50, 0x01, 0x41, 0x01, 0x04, - 0x3c, 0x01, 0x01, 0x08, 0x01, 0x48, 0x3f, 0x50, 0x01, 0x4e, 0x01, 0x13, - 0x3e, 0x01, 0x01, 0x19, 0x3f, 0x50, 0x01, 0x2d, 0x40, 0x01, 0x01, 0x2e, - 0x3d, 0x50, 0x01, 0x3f, 0x01, 0x03, 0x40, 0x01, 0x01, 0x03, 0x01, 0xf9, - 0x3b, 0x50, 0x01, 0x4a, 0x01, 0x0d, 0x42, 0x01, 0x01, 0x09, 0x01, 0x46, - 0x39, 0x50, 0x01, 0x4e, 0x01, 0x19, 0x44, 0x01, 0x01, 0x11, 0x01, 0x4b, - 0x38, 0x50, 0x01, 0x25, 0x46, 0x01, 0x01, 0x17, 0x01, 0x4d, 0x36, 0x50, - 0x01, 0x2e, 0x48, 0x01, 0x01, 0x1b, 0x01, 0x4d, 0x34, 0x50, 0x01, 0x31, - 0x4a, 0x01, 0x01, 0x17, 0x01, 0x4a, 0x14, 0x50, 0x01, 0x4d, 0x01, 0x44, - 0x01, 0x3b, 0x01, 0x34, 0x01, 0x2e, 0x01, 0x2c, 0x01, 0x2e, 0x01, 0x35, - 0x01, 0x3e, 0x01, 0x4a, 0x14, 0x50, 0x01, 0x2e, 0x4c, 0x01, 0x01, 0x0e, - 0x01, 0x41, 0x10, 0x50, 0x01, 0x4a, 0x01, 0x37, 0x01, 0x1f, 0x01, 0x0c, - 0x01, 0x03, 0x07, 0x01, 0x01, 0x06, 0x01, 0x15, 0x01, 0x2d, 0x01, 0x41, - 0x0f, 0x50, 0x01, 0x4a, 0x01, 0x1f, 0x4e, 0x01, 0x01, 0xf7, 0x01, 0x2e, - 0x01, 0xfa, 0x0b, 0x50, 0x01, 0x4f, 0x01, 0xf9, 0x01, 0x1e, 0x01, 0x07, - 0x0e, 0x01, 0x01, 0x02, 0x01, 0x14, 0x01, 0x31, 0x01, 0x48, 0x0b, 0x50, - 0x01, 0x37, 0x01, 0x0c, 0x51, 0x01, 0x01, 0x0d, 0x01, 0x2f, 0x01, 0x45, - 0x01, 0x4f, 0x05, 0x50, 0x01, 0x4f, 0x01, 0x43, 0x01, 0x2e, 0x01, 0x11, - 0x14, 0x01, 0x01, 0x07, 0x01, 0x1f, 0x01, 0x3c, 0x01, 0x4c, 0x04, 0x50, - 0x01, 0x4f, 0x01, 0x46, 0x01, 0x33, 0x01, 0x13, 0x55, 0x01, 0x01, 0x04, - 0x01, 0x12, 0x01, 0x1f, 0x01, 0x26, 0x01, 0x28, 0x01, 0x26, 0x01, 0x1e, - 0x01, 0x10, 0x01, 0x02, 0x19, 0x01, 0x01, 0x09, 0x01, 0x16, 0x01, 0x1e, - 0x01, 0x1f, 0x01, 0x1c, 0x01, 0x11, 0x01, 0x04, 0xff, 0x01, 0xff, 0x01, - 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, - 0xff, 0x01, 0xb3, 0x01 + 0x68, 0x01, 0x00, 0xF0, 0xFF, 0xF0, 0xB7, 0xE4, 0x01, 0x02, 0x03, 0x00, 0xFA, 0xF0, 0x33, 0xE7, 0x04, 0x05, 0x06, 0x07, 0x07, 0x08, 0x00, 0xFA, 0xF0, 0x30, 0xEA, 0x09, 0x0A, 0x06, 0x0B, 0x0C, + 0x0D, 0x0D, 0x06, 0x0E, 0x00, 0xFA, 0xF0, 0x2F, 0xE9, 0x0F, 0x06, 0x10, 0x0D, 0x11, 0x12, 0x13, 0x13, 0x11, 0x38, 0x54, 0xF0, 0x2F, 0xEC, 0x01, 0x14, 0x0B, 0x0D, 0x15, 0x13, 0x16, 0x17, 0x17, + 0x18, 0x15, 0x19, 0xFA, 0xF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x32, 0x38, 0x53, + 0xF0, 0x2D, 0x90, 0x54, 0x00, 0x19, 0xE6, 0x18, 0x33, 0x1A, 0x34, 0x35, 0x00, 0x38, 0x01, 0xF0, 0x2E, 0xE9, 0x0E, 0x11, 0x13, 0x16, 0x33, 0x36, 0x37, 0x34, 0x2A, 0x38, 0xA5, 0xF0, 0x2E, 0x00, + 0x01, 0xE7, 0x38, 0x39, 0x39, 0x3A, 0x3B, 0x34, 0x26, 0x38, 0x52, 0xF0, 0x20, 0xE4, 0x02, 0x36, 0x05, 0x3C, 0x00, 0x01, 0xE4, 0x3D, 0x36, 0x02, 0x00, 0xF8, 0xC8, 0x50, 0x1E, 0x3E, 0x3E, 0xF4, + 0xE5, 0x09, 0x3F, 0x05, 0x3C, 0x07, 0x10, 0x01, 0xE5, 0x3C, 0x05, 0x30, 0x1F, 0x00, 0xFA, 0xF0, 0x0A, 0xE7, 0x3F, 0x21, 0x07, 0x40, 0x0B, 0x0C, 0x06, 0xF3, 0xE7, 0x0C, 0x0B, 0x40, 0x06, 0x05, + 0x04, 0x00, 0xFA, 0xF3, 0xE4, 0x09, 0x3F, 0x29, 0x41, 0x00, 0x1E, 0x80, 0x01, 0x0D, 0x1C, 0x48, 0x22, 0x0D, 0xE4, 0x13, 0x42, 0x01, 0x00, 0x38, 0x01, 0xF0, 0x04, 0x0F, 0x68, 0x07, 0xE6, 0x06, + 0x1C, 0x11, 0x15, 0x12, 0x13, 0x00, 0x01, 0xE7, 0x12, 0x15, 0x11, 0x0D, 0x0C, 0x0B, 0x06, 0x38, 0x35, 0xF1, 0xC8, 0x1F, 0x02, 0x43, 0x41, 0x00, 0x1E, 0x40, 0x01, 0x16, 0x10, 0x22, 0xE4, 0x06, + 0x10, 0x41, 0x43, 0x38, 0x56, 0xF0, 0x03, 0x5F, 0x68, 0x07, 0x1A, 0x62, 0x8C, 0x16, 0xEA, 0x18, 0x16, 0x13, 0x12, 0x11, 0x0D, 0x10, 0x40, 0x14, 0x3F, 0x08, 0x36, 0xE7, 0x1F, 0x42, 0x13, 0x0B, + 0x0C, 0x1C, 0x15, 0x30, 0x1E, 0x08, 0x01, 0x00, 0x22, 0xE6, 0x15, 0x1C, 0x0C, 0x41, 0x0A, 0x00, 0x38, 0x01, 0xFE, 0x8F, 0x68, 0x07, 0x09, 0x21, 0x38, 0x32, 0xF1, 0x08, 0x01, 0x00, 0x35, 0x80, + 0xE3, 0x11, 0x06, 0xC8, 0x70, 0x44, 0x06, 0x40, 0xF1, 0x38, 0x1F, 0xF5, 0x00, 0x57, 0xE5, 0x13, 0x12, 0x1C, 0x10, 0x14, 0x39, 0x58, 0xFD, 0xE4, 0x1F, 0x13, 0x0C, 0x11, 0x38, 0x33, 0xF8, 0x18, + 0x8C, 0xC8, 0xF3, 0x11, 0x1C, 0x0D, 0x33, 0xA0, 0x38, 0x01, 0xF3, 0xE5, 0x18, 0x13, 0x11, 0x06, 0x0D, 0x38, 0x55, 0xFB, 0xE4, 0x1F, 0x1C, 0x06, 0x15, 0x38, 0x34, 0xFC, 0x10, 0x57, 0x68, 0xF4, + 0x13, 0xF5, 0x38, 0x01, 0xF5, 0xE4, 0x16, 0x12, 0x0D, 0x1C, 0x38, 0x55, 0xF9, 0xE4, 0x1F, 0x1C, 0x0D, 0x12, 0x38, 0x35, 0xF0, 0x00, 0x38, 0x01, 0xF0, 0x06, 0x98, 0x55, 0x18, 0x13, 0xFD, 0xE4, + 0x01, 0x1C, 0x0D, 0x13, 0x38, 0x53, 0xF0, 0x20, 0x10, 0x55, 0x9E, 0x33, 0x09, 0xF9, 0x68, 0x53, 0x33, 0xF0, 0x26, 0x00, 0xFF, 0xC8, 0x53, 0x11, 0x29, 0x31, 0xFA, 0xCE, 0x08, 0x06, 0x12, 0xF0, + 0x2A, 0xE5, 0x17, 0x13, 0x45, 0x46, 0x1E, 0xFA, 0xF3, 0xE4, 0x01, 0x10, 0x11, 0x16, 0xFA, 0xF0, 0x25, 0x6D, 0x03, 0x47, 0xF8, 0xAA, 0x05,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x23, 0xCE, 0x17, 0x13, 0x33, 0xF0, 0x00, 0x6E, 0x1C, 0xF0, 0x26, 0x9E, 0x0D, 0x01, 0xFD, 0x6A, + 0xF4, 0x43, 0xF0, 0x25, 0x9A, 0xF5, 0x16, 0x11, 0xFE, 0x68, 0x54, 0x4A, 0xF0, 0x25, 0xCE, 0x18, 0x15, 0x29, 0xFF, 0x6E, 0x4E, 0xF0, 0x25, 0x00, 0xFD, 0x3B, 0xF2, 0xF9, 0x6F, 0x89, 0x07, 0x50, + 0xF0, 0x26, 0xE4, 0x18, 0x11, 0x51, 0x00, 0x38, 0x01, 0xF7, 0x6D, 0x94, 0x31, 0xF0, 0x26, 0x00, 0xA9, 0x6E, 0x08, 0xF9, 0x99, 0xF9, 0x22, 0x17, 0xF0, 0x27, 0x01, 0x52, 0x9E, 0x10, 0x1F, 0xFB, + 0x39, 0xF9, 0xF0, 0x24, 0x00, 0xA9, 0xCE, 0x11, 0x17, 0x09, 0xFC, 0x68, 0x54, 0x4D, 0xF0, 0x27, 0xA4, 0xF1, 0x29, 0x99, 0x51, 0x52, 0x15, 0xF0, 0x28, 0x03, 0xA1, 0x68, 0x55, 0x06, 0xF8, 0x99, + 0x51, 0x22, 0x4B, 0xF0, 0x28, 0x10, 0x55, 0x69, 0x54, 0x16, 0xF7, 0x68, 0xFD, 0x53, 0xF0, 0x27, 0x08, 0x55, 0xCE, 0x0D, 0x0B, 0x0A, 0xF9, 0x6F, 0x84, 0x09, 0x1F, 0xF0, 0x26, 0x08, 0x01, 0x07, + 0xD0, 0x0C, 0x9D, 0x4B, 0x10, 0x13, 0xF6, 0x98, 0xFD, 0x35, 0x51, 0xF0, 0x2A, 0x08, 0x55, 0xE4, 0x15, 0x06, 0x0B, 0x3D, 0xFA, 0xF1, 0x68, 0xFD, 0x19, 0xF0, 0x29, 0x19, 0x00, 0xA2, 0xC5, 0x3B, + 0x69, 0xFA, 0x2F, 0xF0, 0x28, 0x10, 0x01, 0xB2, 0x29, 0x4B, 0x16, 0x11, 0x98, 0xFD, 0x1E, 0x25, 0xF0, 0x2C, 0x00, 0x54, 0xAA, 0x3A, 0x26, 0x20, 0x68, 0xFD, 0x54, 0xF0, 0x2C, 0xC8, 0x01, 0x12, + 0x55, 0x00, 0xF8, 0x98, 0xA9, 0x26, 0x3C, 0xF0, 0x2C, 0xB3, 0x38, 0x26, 0x16, 0x3C, 0x68, 0xA9, 0x56, 0xF0, 0x2A, 0xC8, 0x01, 0x13, 0x56, 0x00, 0xFA, 0x38, 0xA9, 0xF0, 0x28, 0xB3, 0xF6, 0x31, + 0x16, 0x3C, 0x38, 0xA9, 0xF0, 0x27, 0x38, 0xA7, 0xF7, 0x38, 0xA9, 0xF0, 0x28, 0x38, 0xA7, 0xF9, 0x07, 0x2B, 0x0C, 0x38, 0xA9, 0xF0, 0x24, 0xAC, 0x81, 0x27, 0x13, 0x9E, 0x3E, 0x28, 0xF0, 0x26, + 0xB4, 0xD2, 0x4D, 0x16, 0x25, 0x9B, 0x4D, 0x49, 0x29, 0xF0, 0x24, 0xB4, 0xE7, 0x56, 0x18, 0x14, 0x98, 0xFE, 0x2F, 0x01, 0xF0, 0x24, 0xB4, 0x44, 0x33, 0x13, 0x02, 0x08, 0x01, 0x98, 0xFE, 0x35, + 0x45, 0xF0, 0x22, 0xB3, 0xAD, 0x3D, 0x16, 0x25, 0x30, 0x01, 0x98, 0xFE, 0x57, 0x44, 0xF0, 0x20, 0xB5, 0x37, 0x58, 0x18, 0x14, 0x9F, 0x15, 0x11, 0x2F, 0x2F, 0xF0, 0x20, 0xB6, 0xC0, 0x51, 0x13, + 0x01, 0x99, 0x53, 0x22, 0x37, 0xF0, 0x1E, 0xB6, 0xA2, 0x55, 0x13, 0x3F, 0x99, 0x53, 0x26, 0x30, 0xF0, 0x1C, 0xE4, 0x16, 0x25, 0x2E, 0x00, 0x38, 0x01, 0xF0, 0x03, 0x98, 0x55, 0x32, 0x58, 0xF0, + 0x1A, 0x3F, 0x5A, 0x17, 0xF0, 0x09, 0x98, 0x55, 0x2C, 0x2B, 0xFF, 0x50, 0x01, 0x18, 0x6E, 0x17, 0xFA, 0xB7, 0x1F, 0x5C, 0x18, 0x14, 0x98, 0xAA, 0x2F, 0x2E, 0xFB, 0xEB, 0x18, 0x16, 0x59, 0x1B, + 0x5A, 0x5B, 0x5B, 0x5B, 0x55, 0x1A, 0x59, 0xA3, 0xD2, 0x4E, 0x9F, 0x10, 0x16, 0x18, 0x5C, 0xF0, 0x0E, 0xC9, 0xA9, 0x2F, 0x5D, 0x3F, 0xF8, 0x00, 0x51, 0xED, 0x55, 0x3A, 0x5D, 0x2E, 0x49, 0x3E, + 0x3E, 0x3E, 0x26, 0x2A, 0x5D, 0x5E, 0x55, 0x38, 0x57, 0xF4, 0xCA, 0xED, 0x16, 0x5F, 0x2E, 0xF0, 0x03, 0x38, 0x01, 0xF5, 0xC8, 0xAB, 0x2E, 0x31, 0x60, 0xF3, 0xE6, 0x18, 0x16, 0x33, 0x30, 0x49, + 0x5D, 0x38, 0x8A, 0xF2, 0xE5, 0x26, 0x5D, 0x49, 0x3F, 0x33, 0x20, 0x57, 0xE5, 0x18, 0x16, 0x60, 0x31, 0x34, 0x38, 0xA6, 0xF0, 0x09, 0x10, 0x01, 0xED, 0x35, 0x61, 0x37, 0x36, 0x33, 0x13, 0x16, + 0x13, 0x62, 0x30, 0x31, 0x3B, 0x32, 0x38, 0x88, 0xF6, 0xED, 0x1E, 0x2E, 0x3B, 0x31, 0x3F, 0x59, 0x33, 0x13, 0x13, 0x59, 0x30, 0x31, 0x61, 0x3A, 0x45, 0xF0, 0x03, 0x38, 0x01, 0xF5, 0xE8, 0x26, + 0x34, 0x3B, 0x5E, 0x5E, 0x5E, 0x63, 0x32, 0x38, 0x34, 0xFC, 0xC0, 0x1F, 0x35, 0x2E, 0x5D, 0x98, 0x52, 0x5D, 0x32, 0xF0, 0x16, 0x38, 0x01, 0xF0, 0xFF, 0xF0, 0x0F, 0xE1, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + +// +// CLUT (Color LookUp Table) for grey Apple logo. +// + +static UInt8 AppleLogoClut[ 304 ] = +{ + 0xBF, 0xBF, 0xBF, 0xB3, 0xB3, 0xB3, 0xA6, 0xA6, 0xA6, 0xB2, 0xB2, 0xB2, 0xA0, 0xA0, 0xA0, 0x83, 0x83, 0x83, 0x67, 0x67, 0x67, 0x61, 0x61, 0x61, 0x90, 0x90, 0x90, 0xB9, 0xB9, 0xB9, 0x8F, 0x8F, + 0x8F, 0x64, 0x64, 0x64, 0x66, 0x66, 0x66, 0x68, 0x68, 0x68, 0x97, 0x97, 0x97, 0x95, 0x95, 0x95, 0x65, 0x65, 0x65, 0x6A, 0x6A, 0x6A, 0x6C, 0x6C, 0x6C, 0x6D, 0x6D, 0x6D, 0x73, 0x73, 0x73, 0x6B, + 0x6B, 0x6B, 0x6E, 0x6E, 0x6E, 0x70, 0x70, 0x70, 0x6F, 0x6F, 0x6F, 0x98, 0x98, 0x98, 0xA1, 0xA1, 0xA1, 0x9B, 0x9B, 0x9B, 0x69, 0x69, 0x69, 0x76, 0x76, 0x76, 0xC2, 0xC2, 0xC2, 0xAD, 0xAD, 0xAD, + 0x8B, 0x8B, 0x8B, 0x7E, 0x7E, 0x7E, 0xC3, 0xC3, 0xC3, 0xAA, 0xAA, 0xAA, 0x87, 0x87, 0x87, 0x85, 0x85, 0x85, 0xC8, 0xC8, 0xC8, 0xBD, 0xBD, 0xBD, 0x8C, 0x8C, 0x8C, 0x72, 0x72, 0x72, 0xCB, 0xCB, + 0xCB, 0x7F, 0x7F, 0x7F, 0xCA, 0xCA, 0xCA, 0xA4, 0xA4, 0xA4, 0xCC, 0xCC, 0xCC, 0xC0, 0xC0, 0xC0, 0x94, 0x94, 0x94, 0xB5, 0xB5, 0xB5, 0xCE, 0xCE, 0xCE, 0x74, 0x74, 0x74, 0xCF, 0xCF, 0xCF, 0xC6, + 0xC6, 0xC6, 0x8E, 0x8E, 0x8E, 0xAE, 0xAE, 0xAE, 0xBE, 0xBE, 0xBE, 0xBB, 0xBB, 0xBB, 0xD0, 0xD0, 0xD0, 0xD5, 0xD5, 0xD5, 0x78, 0x78, 0x78, 0x7D, 0x7D, 0x7D, 0xC5, 0xC5, 0xC5, 0x9A, 0x9A, 0x9A, + 0x63, 0x63, 0x63, 0x62, 0x62, 0x62, 0x89, 0x89, 0x89, 0x84, 0x84, 0x84, 0x79, 0x79, 0x79, 0x93, 0x93, 0x93, 0xCD, 0xCD, 0xCD, 0xA7, 0xA7, 0xA7, 0x7B, 0x7B, 0x7B, 0xC9, 0xC9, 0xC9, 0x82, 0x82, + 0x82, 0x77, 0x77, 0x77, 0xC1, 0xC1, 0xC1, 0xA3, 0xA3, 0xA3, 0x9C, 0x9C, 0x9C, 0xAC, 0xAC, 0xAC, 0xA5, 0xA5, 0xA5, 0x71, 0x71, 0x71, 0xB7, 0xB7, 0xB7, 0x91, 0x91, 0x91, 0xA9, 0xA9, 0xA9, 0xAF, + 0xAF, 0xAF, 0xAB, 0xAB, 0xAB, 0xC7, 0xC7, 0xC7, 0x86, 0x86, 0x86, 0x88, 0x88, 0x88, 0xA8, 0xA8, 0xA8, 0xBC, 0xBC, 0xBC, 0x80, 0x80, 0x80, 0xD1, 0xD1, 0xD1, 0xD7, 0xD7, 0xD7, 0x8D, 0x8D, 0x8D, + 0x7A, 0x7A, 0x7A, 0xD4, 0xD4, 0xD4, 0x81, 0x81, 0x81, 0xD2, 0xD2, 0xD2, 0x00, 0x00, 0x00, 0x00 +}; + #endif From 47b7319f78daf6e0f0bc51195655a96a7a66491f Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 15 Oct 2014 00:50:30 +0200 Subject: [PATCH 488/623] Streamlining make process - you can now just use "make" - defaults to Macmini62 --- Makefile | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index ddecfda..5826971 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,8 @@ PAX = /bin/pax OBJROOT = `pwd`/obj SYMROOT = `pwd`/sym +DEFAULT_MODEL=$(shell cat MODEL) + # # Export version number (picked up by i386/libsaio/Makefile) # @@ -103,12 +105,12 @@ export PRODUCT_OS_TARGET = `echo $(MAKE_TARGET_OS)` export PRODUCT_OS_TARGET_VERSION = `echo \"$(MAKE_TARGET_OS_VER)\"` # -# Check if a target model was specified (example: make MODEL=16 mountain-lion). +# Check if a target model was specified (example: make MODEL=MacPro61). # ifdef MODEL # - # MODEL=[MacModelNN] specified, export target model as PRODUCT_MODEL_TARGET. + # MODEL=[MacModelNN] specified, export target model. # ifneq ($(MODEL),) export MAKE_TARGET_MODEL = $(MODEL) @@ -117,25 +119,41 @@ ifdef MODEL # DATA_FILE = $(MODEL) else + # + # No. Use Macmini62 as a fallback default. + # + MODEL = Macmini62 export MAKE_TARGET_MODEL = Macmini62 # - # Include default/empty static data file (no model identifier specified). + # Include default/empty static data files (no model identifier specified). # DATA_FILE = data-template endif else # - # Include default settings template (no model identifier specified). - # - export MAKE_TARGET_MODEL = Macmini62 - # + # MODEL=[MacModelNN], check if DEFAULT_MODEL was set (first run only). # - # - MODEL=Macmini62 - # - # Include default/empty static data file (no model identifier specified). - # - DATA_FILE = data-template + ifdef DEFAULT_MODEL + # + # Yes it is. Use Macmodel[nn] from RevoBoot/MODEL + # + MODEL = $(DEFAULT_MODEL) + export MAKE_TARGET_MODEL = $(MODEL) + # + # Include static ACPI/EFI/SMBIOS data files per model identifier. + # + DATA_FILE = $(MODEL) + else + # + # No. Use Macmini62 as a fallback default. + # + MODEL = Macmini62 + export MAKE_TARGET_MODEL = $(MODEL) + # + # Include default/empty static data file (no model identifier specified). + # + DATA_FILE = data-template + endif endif # @@ -173,7 +191,7 @@ $(MAKEGOAL): # # normal make goal # - @printf "Compiling RevoBoot, setup for a $(MODEL) running OS X $(MAKE_TARGET_OS_VER) ($@)\n\n" >&2; + @printf "\nCompiling RevoBoot, setup for a $(MODEL) running OS X $(MAKE_TARGET_OS_VER) ($@)\n" >&2; @if [ ! -f $(CONFIG_DIR)/$(MAKE_ACPI_DATA_FILE) ]; then \ echo "\t[CP] $(CONFIG_DIR)/ACPI/data-template.h $(CONFIG_DIR)/$(MAKE_ACPI_DATA_FILE)"; \ From d6ca6bacd861c6cce341bf0961736109e7b222ee Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 15 Oct 2014 00:52:21 +0200 Subject: [PATCH 489/623] Better ignore patterns --- .gitignore | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index b1b2a88..f738622 100644 --- a/.gitignore +++ b/.gitignore @@ -7,14 +7,9 @@ sym/* i386/config/SETTINGS/*.h -i386/config/ACPI/default.h -i386/config/ACPI/*Mac*.h - -i386/config/EFI/default.h -i386/config/EFI/*Mac*.h - -i386/config/SMBIOS/default.h -i386/config/SMBIOS/*Mac*.h +i386/config/ACPI/*.h +i386/config/EFI/*.h +i386/config/SMBIOS/*.h i386/util/libcc_kext.a From 59b0240b9cfd07d4f25280870f283b1a4a93cdfd Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Wed, 15 Oct 2014 01:10:37 +0200 Subject: [PATCH 490/623] Add support for grey logo - Set BLACKMODE to 0 for pre-yosemite versions of OS X --- i386/boot2/bootlogo.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/i386/boot2/bootlogo.c b/i386/boot2/bootlogo.c index e5bfe87..a2ec585 100755 --- a/i386/boot2/bootlogo.c +++ b/i386/boot2/bootlogo.c @@ -37,9 +37,15 @@ unsigned long lookUpCLUTIndex(unsigned char index) { long colorIndex = (index * 3); +#if BLACKMODE long red = AppleLogoBlackClut[ colorIndex ]; long green = AppleLogoBlackClut[ colorIndex++ ]; long blue = AppleLogoBlackClut[ colorIndex++ ]; +#else + long red = AppleLogoClut[ colorIndex ]; + long green = AppleLogoClut[ colorIndex++ ]; + long blue = AppleLogoClut[ colorIndex++ ]; +#endif return (red << 16) | (green << 8) | blue; } @@ -56,7 +62,6 @@ void * stosl(void *dst, long val, long len) return dst; } - //============================================================================== void setBackgroundColor(uint32_t aBackGroundColor) @@ -149,7 +154,7 @@ void showBootLogo(bool aBootRecoveryHDFlag) void *logoData = (void *)AppleLogoBlackPacked; #else setBackgroundColor(0xbfbfbf); - uint32_t compressedSize = sizeof(AppleLogoBlackPacked); + uint32_t compressedSize = sizeof(AppleLogoPacked); void *logoData = (void *)AppleLogoPacked; #endif From 646be94e730b09d220539e271d915da38dea66ec Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Sun, 19 Oct 2014 23:47:31 +0200 Subject: [PATCH 491/623] Helper program for ssdtPRGen.sh --- i386/libsaio/acpi/Tools/extractACPITables | Bin 0 -> 9792 bytes i386/libsaio/acpi/Tools/extractACPITables.c | 78 ++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100755 i386/libsaio/acpi/Tools/extractACPITables create mode 100755 i386/libsaio/acpi/Tools/extractACPITables.c diff --git a/i386/libsaio/acpi/Tools/extractACPITables b/i386/libsaio/acpi/Tools/extractACPITables new file mode 100755 index 0000000000000000000000000000000000000000..adb1be020833c11c11cc2ef79fe4c4eec120b7eb GIT binary patch literal 9792 zcmeHNYit}>6~5~@iAj^%X$nmQg>9*e1C`e)R7ynwPu6yK6C1m>6Re18GG33fTkpe~ z9TU4!kg4O!qm9c7l`21w2m(a{70Ex4+NM&lAg>D40>6+zO@-QOT?G^<xjT<@@g3 zv1ezU0OIc)`QG!o_sp4dAHI9fymj;Mw>AqA*&xJhgAn2#l*vs(%!?=}A$Fl8P;`Aj zd$Rj*_h3JzwGgRg*X3xZ4G+-u;qH;)+9tApORY>O9=?f<C~!%FuG{9ctr(!7y``;q z8OXn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#j4DiJO|J?xpLzm~HB%DDFW|ij^u%CZ7z<=oStN!hB8+&6Q+5&tm!1JOT zf2;lXyF6+aj=21)z3~8_3-HY4egXwqaG9H@VRmjr;RNBJ^XhIJ3a<X-w-o%gh?mOh z4zrV^!EYk|A6rp;`A|QHbvcLYSM!=gtz!!6S8z~TyLO@VRxQZ&)@$7c2Em=TE;P9P lrnRPA-LC%gh8)-})IQ;E5bJK#>+k>WCZcway4_ode*+T7Wmf<I literal 0 HcmV?d00001 diff --git a/i386/libsaio/acpi/Tools/extractACPITables.c b/i386/libsaio/acpi/Tools/extractACPITables.c new file mode 100755 index 0000000..836dcca --- /dev/null +++ b/i386/libsaio/acpi/Tools/extractACPITables.c @@ -0,0 +1,78 @@ +/* + * Name : extractACPITables.c + * Version : 0.1 + * Type : Command line tool + * Copyright : Pike R. Alpha (c) September 2014 + * Description : ACPI table extractor. + * + * Usage : ./extractACPITables (writes table data to: /tmp/XXXX.aml) + * + * Compile with : cc -O2 extractACPITables.c -o extractACPITables -Wall -framework IOKit -framework CoreFoundation + * + * Updates: + * v0.1 initial version. + * v0.2 renamed from acpiTableExtract.c to extractAcpiTables.c + */ + +#include <stdio.h> + +#include <IOKit/IOKitLib.h> +#include <CoreFoundation/CoreFoundation.h> + +//============================================================================== + +int main(int argc, char * argv[]) +{ + char dirspec[32]; + int filedesc, status = 0; + + io_service_t service; + CFDictionaryRef tableDictionary; + + //================================================================================== + + if ((service = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleACPIPlatformExpert")))) + { + if ((tableDictionary = (CFDictionaryRef) IORegistryEntryCreateCFProperty(service, CFSTR("ACPI Tables"), kCFAllocatorDefault, kNilOptions))) + { + CFIndex tableCount = CFDictionaryGetCount(tableDictionary); + + CFStringRef tableNames[tableCount]; + CFDataRef tableData[tableCount]; + + CFDictionaryGetKeysAndValues(tableDictionary, (const void **)&tableNames, (const void **)&tableData); + + for (CFIndex i = 0; i < tableCount; i++) + { + UInt8 * buffer = (UInt8 *) CFDataGetBytePtr(tableData[i]); + UInt32 numBytes = (UInt32) CFDataGetLength(tableData[i]); + + sprintf(dirspec, "/tmp/%s.aml", CFStringGetCStringPtr(tableNames[i], kCFStringEncodingMacRoman)); + + if ((filedesc = open(dirspec, O_WRONLY|O_CREAT|O_TRUNC, 0644)) != -1) + { + write(filedesc, buffer, numBytes); + close(filedesc); + } + else + { + status = -3; + } + } + + CFRelease(tableDictionary); + } + else + { + status = -2; + } + + IOObjectRelease(service); + + exit(status); // 0 = success. + // -2 = tableDictionary is NULL. + // -3 = one or more writes failed. + } + + exit(-1); // error (service is NULL). +} From 9b9946ea754f7b72a8e5afde2b0f7c16738ecf47 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 20 Oct 2014 21:08:58 +0200 Subject: [PATCH 492/623] Late 2014 iMac data added - typo fixed. - Macmini7,1 board-id correction. --- i386/libsaio/smbios/model_data.h | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 93a24df..105d94b 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -74,11 +74,23 @@ #define SMB_PRODUCT_NAME "iMac14,3" #define SMB_BOARD_PRODUCT "Mac-77EB7D7DAF985301" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '3' } - #else // Defaults to iMac 14,4 + #elif (TARGET_MODEL == IMAC_144) #define SMB_BIOS_VERSION "IM144.88Z.0179.B03.1405241029" #define SMB_PRODUCT_NAME "iMac14,4" #define SMB_BOARD_PRODUCT "Mac-81E3E92DD6088272" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '4' } + #elif (TARGET_MODEL == IMAC_152) + // Intel Core i7-4790K @ 4 GHz + #define SMB_BIOS_VERSION "IM151.88Z.0207.B00.1409291931" + #define SMB_PRODUCT_NAME "iMac15,2" + #define SMB_BOARD_PRODUCT "Mac-FA842E06C61E91C5" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '5', ',', '2' } + #else // Defaults to iMac 15,1 + // Intel Core i5-4690 @ 3.50 GHz + #define SMB_BIOS_VERSION "IM151.88Z.0207.B00.1409291931" + #define SMB_PRODUCT_NAME "iMac15,1" + #define SMB_BOARD_PRODUCT "Mac-42FD25EABCABB274" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '5', ',', '1' } #endif // ------------------------------------------------------------------------------------- #endif @@ -251,18 +263,11 @@ #define SMB_PRODUCT_NAME "Macmini6,2" #define SMB_BOARD_PRODUCT "Mac-F65AE981FFA204ED" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '2' } - #elif (TARGET_MODEL == MACMINI_71) - // - #define SMB_BIOS_VERSION "MM71.88Z.0106.B03.1411161202" + #else // Defaults to Macmini7,1 + #define SMB_BIOS_VERSION "MM71.88Z.0220.B00.1409291751" #define SMB_PRODUCT_NAME "Macmini7,1" - #define SMB_BOARD_PRODUCT "Mac-F65AE981FFA204ED" + #define SMB_BOARD_PRODUCT "Mac-35C5E08120C7EEAF" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '7', ',', '1' } - #else // Defaults to MacPro7,2 - // - #define SMB_BIOS_VERSION "MM71.88Z.0106.B03.1411161202" - #define SMB_PRODUCT_NAME "Macmini7,2" - #define SMB_BOARD_PRODUCT "Mac-F65AE981FFA204ED" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '7', ',', '2' } #endif // ------------------------------------------------------------------------------------- #endif From 58f20379d378242f6cb593f2e258b659da9f6499 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 3 Nov 2014 16:50:04 +0100 Subject: [PATCH 493/623] Updating script to v0.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – check arguments, use argv[1] as target table --- i386/libsaio/acpi/Tools/extractACPITables.c | 43 ++++++++++++++------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/i386/libsaio/acpi/Tools/extractACPITables.c b/i386/libsaio/acpi/Tools/extractACPITables.c index 836dcca..9b33a92 100755 --- a/i386/libsaio/acpi/Tools/extractACPITables.c +++ b/i386/libsaio/acpi/Tools/extractACPITables.c @@ -1,17 +1,21 @@ /* * Name : extractACPITables.c - * Version : 0.1 + * Version : 0.3 * Type : Command line tool * Copyright : Pike R. Alpha (c) September 2014 * Description : ACPI table extractor. * - * Usage : ./extractACPITables (writes table data to: /tmp/XXXX.aml) + * Usage : ./extractACPITables (writes all tables to: /tmp/XXXX.aml) + * : ./extractACPITables DSDT (writes DSDT.aml to: /tmp/DSDT.aml) + * : ./extractACPITables SSDT (writes all SSDT tables to: /tmp/SSDT.aml) + * : ./extractACPITables SSDT-2 (writes SSDT-2.aml to: /tmp/SSDT-2.aml) * * Compile with : cc -O2 extractACPITables.c -o extractACPITables -Wall -framework IOKit -framework CoreFoundation * * Updates: * v0.1 initial version. * v0.2 renamed from acpiTableExtract.c to extractAcpiTables.c + * v0.3 check arguments, use argv[1] as target table. */ #include <stdio.h> @@ -24,13 +28,20 @@ int main(int argc, char * argv[]) { char dirspec[32]; + char tableName[8]; int filedesc, status = 0; + bool allTables = true; io_service_t service; CFDictionaryRef tableDictionary; //================================================================================== + if (argc == 2) + { + allTables = false; + } + if ((service = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleACPIPlatformExpert")))) { if ((tableDictionary = (CFDictionaryRef) IORegistryEntryCreateCFProperty(service, CFSTR("ACPI Tables"), kCFAllocatorDefault, kNilOptions))) @@ -47,16 +58,21 @@ int main(int argc, char * argv[]) UInt8 * buffer = (UInt8 *) CFDataGetBytePtr(tableData[i]); UInt32 numBytes = (UInt32) CFDataGetLength(tableData[i]); - sprintf(dirspec, "/tmp/%s.aml", CFStringGetCStringPtr(tableNames[i], kCFStringEncodingMacRoman)); + strcpy(tableName, CFStringGetCStringPtr(tableNames[i], kCFStringEncodingMacRoman)); - if ((filedesc = open(dirspec, O_WRONLY|O_CREAT|O_TRUNC, 0644)) != -1) + if (allTables || (strncasecmp(argv[1], (char *)tableName, strlen(argv[1])) == 0)) { - write(filedesc, buffer, numBytes); - close(filedesc); - } - else - { - status = -3; + sprintf(dirspec, "/tmp/%s.aml", tableName); + + if ((filedesc = open(dirspec, O_WRONLY|O_CREAT|O_TRUNC, 0644)) != -1) + { + write(filedesc, buffer, numBytes); + close(filedesc); + } + else + { + status = -3; + } } } @@ -69,9 +85,10 @@ int main(int argc, char * argv[]) IOObjectRelease(service); - exit(status); // 0 = success. - // -2 = tableDictionary is NULL. - // -3 = one or more writes failed. + // 0 = success. + // -2 = tableDictionary is NULL. + // -3 = one or more writes failed. + exit(status); } exit(-1); // error (service is NULL). From 1c7eebefe0db3a974a2d780eb93cac3fe1dcdecf Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 23 Dec 2014 11:41:24 +0100 Subject: [PATCH 494/623] Comment only change. --- i386/libsaio/sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/sys.c b/i386/libsaio/sys.c index 985cefb..4cc4a40 100755 --- a/i386/libsaio/sys.c +++ b/i386/libsaio/sys.c @@ -193,7 +193,7 @@ long LoadThinFatFile(const char *fileSpec, void **binary) *binary = (void *)kLoadAddr; // Read file into load buffer. The data in the load buffer will be - // overwritten by the next LoadFile() call. + // overwritten by the next call to LoadFile(). gFSLoadAddress = (void *) LOAD_ADDR; From 746a894475b3ca79f57f8ec2468d0c573e1c0dd3 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 23 Dec 2014 11:41:54 +0100 Subject: [PATCH 495/623] Whitespace only change. --- i386/libsaio/load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index 0c8f587..d91d1aa 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -50,7 +50,7 @@ /*** * Tip: Reverse bytes if you search for the IDs with grep/HexEdit. */ -// #define APPLE_HDA_PATCH_ID 0x11D419843D107410 10.9.2 and 10.9.3 +// #define APPLE_HDA_PATCH_ID 0x11D419843D107410 10.9.2 and 10.9.3 // #define APPLE_HDA_PATCH_ID 0x11D419843D397410 // #define APPLE_HDA_TARGET_ID 0x10EC08923D397410 From f030ec447edccf64367421efe807db697d5333fa Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 23 Dec 2014 11:42:18 +0100 Subject: [PATCH 496/623] Comment only change. --- i386/boot2/lzvn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/boot2/lzvn.c b/i386/boot2/lzvn.c index f9b3e14..2560c3b 100644 --- a/i386/boot2/lzvn.c +++ b/i386/boot2/lzvn.c @@ -84,7 +84,7 @@ size_t lzvn_decode(void * decompressedData, size_t decompressedSize, void * comp uint8_t jmpTo = CASE_TABLE; /* - * This jump table was developed by someone using the handle 'MnusZwei' + * This jump table was developed by someone using the handle 'MinusZwei' * over at insanelymac.com */ static short caseTable[ 256 ] = From d08bade9f1314b2dd2389420e93a5c7847090d20 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 23 Dec 2014 11:43:11 +0100 Subject: [PATCH 497/623] Comment only change. --- i386/MakeInc.dir | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i386/MakeInc.dir b/i386/MakeInc.dir index 6a87e1c..759c94b 100644 --- a/i386/MakeInc.dir +++ b/i386/MakeInc.dir @@ -3,10 +3,10 @@ # # Updates: # -# - Major cleanup (PikerAlpha, October 2012). +# - Major cleanup (Pike R. Alpha, October 2012). # - Fixed clang compilation (dgsga, November 2012). -# - Single pass compilation (PikerAlpha, November 2012). -# - Removed unused CPPFLAGS (PikerAlpha, November 2012). +# - Single pass compilation (Pike R. Alpha, November 2012). +# - Removed unused CPPFLAGS (Pike R. Alpha, November 2012). # From c2954112b532c6a402b12edffbe9e46557fe10bc Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 23 Dec 2014 11:43:20 +0100 Subject: [PATCH 498/623] Comment only change. --- i386/MakePaths.dir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/MakePaths.dir b/i386/MakePaths.dir index b4b04c5..5fe8cbd 100644 --- a/i386/MakePaths.dir +++ b/i386/MakePaths.dir @@ -3,7 +3,7 @@ # # Updates: # -# - Major cleanup (PikerAlpha, October 2012). +# - Major cleanup (Pike R. Alpha, October 2012). # From ee2e6e436e27f210e398a053f5c4e2aaf2003578 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 23 Dec 2014 11:45:23 +0100 Subject: [PATCH 499/623] Style nit. --- i386/boot2/debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/boot2/debug.h b/i386/boot2/debug.h index a015167..f298e41 100755 --- a/i386/boot2/debug.h +++ b/i386/boot2/debug.h @@ -9,9 +9,9 @@ #define __REVO_CONFIG_SETTINGS #include "../config/settings.h" -#define DEBUG_STATE_ENABLED DEBUG_ACPI || DEBUG_BOOT || DEBUG_CPU || DEBUG_DISK || \ +#define DEBUG_STATE_ENABLED (DEBUG_ACPI || DEBUG_BOOT || DEBUG_CPU || DEBUG_DISK || \ DEBUG_DRIVERS|| DEBUG_EFI || DEBUG_BOOT_GRAPHICS || \ - DEBUG_PLATFORM || DEBUG_SMBIOS + DEBUG_PLATFORM || DEBUG_SMBIOS) #endif // __REVO_CONFIG_SETTINGS From b899a630fc1dcee76413a6ddb27fb865b94b3616 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 23 Dec 2014 11:49:42 +0100 Subject: [PATCH 500/623] New HelperPath detection. --- i386/libsaio/stringTable.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/i386/libsaio/stringTable.c b/i386/libsaio/stringTable.c index af42db0..e8ac319 100755 --- a/i386/libsaio/stringTable.c +++ b/i386/libsaio/stringTable.c @@ -382,11 +382,8 @@ long loadCABootPlist(void) #endif "Library/Preferences/SystemConfiguration" // The default. -#if APPLE_RAID_SUPPORT - /* - * This is a temporarily change to test RAID support, but it - * will be rewritten right after Bryan confirms that it works. - */ +#if (APPLE_RAID_SUPPORT || CORE_STORAGE_SUPPORT) + // Helper Locations , "com.apple.boot.P/Library/Preferences/SystemConfiguration", "com.apple.boot.R/Library/Preferences/SystemConfiguration", @@ -422,6 +419,14 @@ long loadCABootPlist(void) // Installation data directory located gPlatform.BootVolume->flags = kBVFlagInstallVolume; } +#endif +#if (APPLE_RAID_SUPPORT || CORE_STORAGE_SUPPORT) + if (strncmp(path, "/com.apple.boot.", 16) == 0) + { + gPlatform.HelperPath = malloc(18); + bzero(gPlatform.HelperPath, 18); + strncpy(gPlatform.HelperPath, path, 17); + } #endif break; } From e9b2d8ad98eec0ee75cc7205349fd687238b687a Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 23 Dec 2014 11:49:55 +0100 Subject: [PATCH 501/623] New HelperPath detection. --- i386/libsaio/platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/platform.c b/i386/libsaio/platform.c index 61ea0ba..20f76bd 100644 --- a/i386/libsaio/platform.c +++ b/i386/libsaio/platform.c @@ -217,8 +217,9 @@ void initPlatform(int biosDevice, bool bootRecoveryHD) _PLATFORM_DEBUG_DUMP("gPlatform.OSVersion: %s\n", gPlatform.OSVersion); + gPlatform.HelperPath = NULL; // Will be initialized in stringTable.c + gPlatform.KernelCachePath = strdup(kKernelCachePath); // Used in boot.c and driver.c - _PLATFORM_DEBUG_DUMP("Kernel cache path: %s\n", gPlatform.KernelCachePath); gPlatform.BIOSDevice = (biosDevice & kBIOSDevMask); // Device number masked with 0xFF. From 4ac8db02a4e05fe27d83ca19b241a8e89a4c7415 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 23 Dec 2014 11:50:46 +0100 Subject: [PATCH 502/623] New HelperPath detection - latest iMac models added. --- i386/libsaio/platform.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 4b29079..c3025bd 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -64,14 +64,17 @@ // Additional model selectors to select a specific target model. //------------------------------------------------------------------------------ -#define IMAC_111 (IMAC | (1 << 15)) -#define IMAC_121 (IMAC | (2 << 15)) -#define IMAC_122 (IMAC | (3 << 15)) -#define IMAC_131 (IMAC | (4 << 15)) -#define IMAC_132 (IMAC | (5 << 15)) -#define IMAC_141 (IMAC | (6 << 15)) -#define IMAC_142 (IMAC | (7 << 15)) -#define IMAC_143 IMAC // Defaults to iMac14,3 +#define IMAC_111 (IMAC | ( 1 << 15)) +#define IMAC_121 (IMAC | ( 2 << 15)) +#define IMAC_122 (IMAC | ( 3 << 15)) +#define IMAC_131 (IMAC | ( 4 << 15)) +#define IMAC_132 (IMAC | ( 5 << 15)) +#define IMAC_141 (IMAC | ( 6 << 15)) +#define IMAC_142 (IMAC | ( 7 << 15)) +#define IMAC_143 (IMAC | ( 8 << 15)) +#define IMAC_144 (IMAC | ( 9 << 15)) +#define IMAC_152 (IMAC | (10 << 15)) +#define IMAC_151 IMAC // Defaults to iMac15,1 #define MACBOOK_41 MACBOOK // Defaults to MacBook4,1 @@ -100,7 +103,6 @@ #define MACMINI_53 (MACMINI | (4 << 15)) #define MACMINI_61 (MACMINI | (5 << 15)) #define MACMINI_62 (MACMINI | (6 << 15)) -#define MACMINI_72 (MACMINI | (7 << 15)) #define MACMINI_71 MACMINI // Defaults to Macmini7,1 #define MACPRO_31 (MACPRO | (1 << 15)) @@ -186,9 +188,8 @@ typedef struct _PlatformInfo_t char * KextFileName; // Initialized and used in drivers.c char * KextFileSpec; // Initialized and used in drivers.c char * KextPlistSpec; // Initialized and used in drivers.c - char * KernelCachePath; // Initialized in platform.c and used in boot.c, driver.c - + char * HelperPath; // Initialized in stringTable.c and used in boot.c #if PRE_LINKED_KERNEL_SUPPORT bool KernelCacheSpecified; // Set to indicate that a full path is specified. #endif From baa1f5cbafdc7390147dcdb14ceec11bee20799b Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 23 Dec 2014 11:52:36 +0100 Subject: [PATCH 503/623] New HelperPath detection - check for root UUID added. --- i386/boot2/boot.c | 88 ++++++++++++++++++++++++++++++----------------- 1 file changed, 57 insertions(+), 31 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index d177375..fa12191 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -371,6 +371,14 @@ void boot(int biosdev) #endif } } + // Check for Root UUID (required for Fusion Drives). + if (rootUUID[0] == '\0' && (getValueForKey(kHelperRootUUIDKey, &val, &length, &bootInfo->bootConfig) && length == 36)) + { + _BOOT_DEBUG_DUMP("Target boot-uuid=<%s>\n", val); + + // Yes. Copy its value into rootUUID. + strlcpy(rootUUID, val, 37); + } /* Enable touching of a single BIOS device by setting 'Scan Single Drive' to yes. if (getBoolForKey(kScanSingleDriveKey, &gScanSingleDrive, &bootInfo->bootConfig) && gScanSingleDrive) @@ -554,53 +562,71 @@ void boot(int biosdev) * Starting with Lion, we can take a shortcut by simply pointing * the 'bootFile' to the kernel cache and we are done. */ - sprintf(bootFile, "%s", gPlatform.KernelCachePath); } + else // Try to find a prelinked-kernel/kernelcache + { + char * preLinkedKernelPath = malloc(128); - /* - * We might have been fired up from a USB thumbdrive (kickstart boot) and - * thus we have to check the kernel cache path first (might not be there). - */ + if (gPlatform.HelperPath) // com.apple.boot.[RPS] + { + sprintf(preLinkedKernelPath, "%s%s", gPlatform.HelperPath, gPlatform.KernelCachePath); + } + else + { + sprintf(preLinkedKernelPath, "%s", gPlatform.KernelCachePath); + } - else if (GetFileInfo(NULL, gPlatform.KernelCachePath, &flags, &cachetime) == 0) - { - static char preLinkedKernelPath[128]; - static char adler32Key[PLATFORM_NAME_LEN + ROOT_PATH_LEN]; + // Check kernelcache directory + if (GetFileInfo(NULL, preLinkedKernelPath, &flags, &cachetime) == 0) + { + static char adler32Key[PLATFORM_NAME_LEN + ROOT_PATH_LEN]; - // unsigned long adler32 = 0; + _BOOT_DEBUG_DUMP("Checking for pre-linked kernel...\n"); - preLinkedKernelPath[0] = '\0'; + // Zero out platform info (name and kernel root path). + bzero(adler32Key, sizeof(adler32Key)); - _BOOT_DEBUG_DUMP("Checking for pre-linked kernel...\n"); + // Construct key for the pre-linked kernel checksum (generated by adler32). + sprintf(adler32Key, gPlatform.ModelID); + sprintf(adler32Key + PLATFORM_NAME_LEN, "%s", BOOT_DEVICE_PATH); + sprintf(adler32Key + (PLATFORM_NAME_LEN + 38), "%s", bootInfo->bootFile); - // Zero out platform info (name and kernel root path). - bzero(adler32Key, sizeof(adler32Key)); + adler32 = Adler32((unsigned char *)adler32Key, sizeof(adler32Key)); - // Construct key for the pre-linked kernel checksum (generated by adler32). - sprintf(adler32Key, gPlatform.ModelID); - sprintf(adler32Key + PLATFORM_NAME_LEN, "%s", BOOT_DEVICE_PATH); - sprintf(adler32Key + (PLATFORM_NAME_LEN + 38), "%s", bootInfo->bootFile); - - adler32 = Adler32((unsigned char *)adler32Key, sizeof(adler32Key)); - - _BOOT_DEBUG_DUMP("adler32: %08X\n", adler32); + _BOOT_DEBUG_DUMP("adler32: %08X\n", adler32); #if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set (like Lion). - _BOOT_DEBUG_DUMP("Checking for kernelcache...\n"); + _BOOT_DEBUG_DUMP("Checking for kernelcache...\n"); - if (GetFileInfo(gPlatform.KernelCachePath, (char *)kKernelCache, &flags, &cachetime) == 0) - { - sprintf(bootFile, "%s/%s", gPlatform.KernelCachePath, kKernelCache); + // if (GetFileInfo(gPlatform.KernelCachePath, (char *)kKernelCache, &flags, &cachetime) == 0) + if (GetFileInfo(preLinkedKernelPath, (char *)kKernelCache, &flags, &cachetime) == 0) + { + sprintf(bootFile, "%s/%s", preLinkedKernelPath, kKernelCache); - _BOOT_DEBUG_DUMP("Kernelcache located.\n"); + _BOOT_DEBUG_DUMP("Kernelcache located.\n"); + } + else + { + mayUseKernelCache = false; + _BOOT_DEBUG_DUMP("Failed to locate the kernelcache!\n"); + } + } + else + { + mayUseKernelCache = false; + _BOOT_DEBUG_DUMP("Failed to locate the kernelcache directory!\n"); + } + + if (mayUseKernelCache == false) + { + sprintf(bootFile, "/System/Library/Kernels/%s", bootInfo->bootFile); + _BOOT_DEBUG_DUMP("No kernelcache found, will load: %s!\n", bootInfo->bootFile); } - _BOOT_DEBUG_ELSE_DUMP("Failed to locate the kernelcache. Will load: %s!\n", bootInfo->bootFile); + free(preLinkedKernelPath); } - - _BOOT_DEBUG_ELSE_DUMP("Failed to locate the kernelcache (directory)!\n"); } #else // Not for Mavericks/Mountain Lion/Lion, go easy with the Snow Leopard. @@ -746,7 +772,7 @@ void boot(int biosdev) // _BOOT_DEBUG_SLEEP(6); - // Switch to graphics mode and show the Apple logo on a gray-ish background. + // Switch to graphics mode and show the (white) Apple logo on a black/gray background. showBootLogo(bootRecoveryHD); } From dbc62882fc825004efbba460b12b827885e4ca2d Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 23 Dec 2014 11:55:28 +0100 Subject: [PATCH 504/623] Adding boot0 and boot1h --- .gitignore | 3 + i386/boot0/boot0.s | 808 +++++++++++++++++++++++ i386/boot1/boot1h.s | 1487 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 2298 insertions(+) create mode 100644 i386/boot0/boot0.s create mode 100644 i386/boot1/boot1h.s diff --git a/.gitignore b/.gitignore index f738622..98d0a72 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,9 @@ out.log obj/* sym/* +i386/boot0/boot0 +i386/boot1/boot1h + i386/config/SETTINGS/*.h i386/config/ACPI/*.h diff --git a/i386/boot0/boot0.s b/i386/boot0/boot0.s new file mode 100644 index 0000000..7469671 --- /dev/null +++ b/i386/boot0/boot0.s @@ -0,0 +1,808 @@ +; Copyright (c) 1999-2003 Apple Computer, Inc. All rights reserved. +; +; @APPLE_LICENSE_HEADER_START@ +; +; Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights +; Reserved. This file contains Original Code and/or Modifications of +; Original Code as defined in and that are subject to the Apple Public +; Source License Version 2.0 (the "License"). You may not use this file +; except in compliance with the License. Please obtain a copy of the +; License at http://www.apple.com/publicsource and read it before using +; this file. +; +; The Original Code and all software distributed under the License are +; distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER +; EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, +; INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, +; FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the +; License for the specific language governing rights and limitations +; under the License. +; +; @APPLE_LICENSE_HEADER_END@ +; +; Boot Loader: boot0 +; +; A small boot sector program written in x86 assembly whose only +; responsibility is to locate the active partition, load the +; partition booter into memory, and jump to the booter's entry point. +; It leaves the boot drive in DL and a pointer to the partition entry in SI. +; +; This boot loader must be placed in the Master Boot Record. +; +; In order to coexist with a fdisk partition table (64 bytes), and +; leave room for a two byte signature (0xAA55) in the end, boot0 is +; restricted to 446 bytes (512 - 64 - 2). If boot0 did not have to +; live in the MBR, then we would have 510 bytes to work with. +; +; boot0 is always loaded by the BIOS or another booter to 0:7C00h. +; +; This code is written for the NASM assembler. +; nasm boot0.s -o boot0 + +; +; This version of boot0 implements hybrid GUID/MBR partition scheme support +; +; Written by Tam‡s Kos‡rszky on 2008-03-10 +; +; Turbo added EFI System Partition boot support +; +; Added KillerJK's switchPass2 modifications +; + +; +; Set to 1 to enable obscure debug messages. +; +DEBUG EQU 0 + +; +; Set to 1 to enable verbose mode +; +VERBOSE EQU 0 + +; +; Various constants. +; +kBoot0Segment EQU 0x0000 +kBoot0Stack EQU 0xFFF0 ; boot0 stack pointer +kBoot0LoadAddr EQU 0x7C00 ; boot0 load address +kBoot0RelocAddr EQU 0xE000 ; boot0 relocated address + +kMBRBuffer EQU 0x1000 ; MBR buffer address +kLBA1Buffer EQU 0x1200 ; LBA1 - GPT Partition Table Header buffer address +kGPTABuffer EQU 0x1400 ; GUID Partition Entry Array buffer address + +kPartTableOffset EQU 0x1be +kMBRPartTable EQU kMBRBuffer + kPartTableOffset + +kSectorBytes EQU 512 ; sector size in bytes +kBootSignature EQU 0xAA55 ; boot sector signature +kHFSPSignature EQU 'H+' ; HFS+ volume signature +kHFSPCaseSignature EQU 'HX' ; HFS+ volume case-sensitive signature +kFAT32BootCodeOffset EQU 0x5a ; offset of boot code in FAT32 boot sector +kBoot1FAT32Magic EQU 'BO' ; Magic string to detect our boot1f32 code + + +kGPTSignatureLow EQU 'EFI ' ; GUID Partition Table Header Signature +kGPTSignatureHigh EQU 'PART' +kGUIDLastDwordOffs EQU 12 ; last 4 byte offset of a GUID + +kPartCount EQU 4 ; number of paritions per table +kPartTypeHFS EQU 0xaf ; HFS+ Filesystem type +kPartTypeABHFS EQU 0xab ; Apple_Boot partition +kPartTypePMBR EQU 0xee ; On all GUID Partition Table disks a Protective MBR (PMBR) + ; in LBA 0 (that is, the first block) precedes the + ; GUID Partition Table Header to maintain compatibility + ; with existing tools that do not understand GPT partition structures. + ; The Protective MBR has the same format as a legacy MBR + ; and contains one partition entry with an OSType set to 0xEE + ; reserving the entire space used on the disk by the GPT partitions, + ; including all headers. + +kPartActive EQU 0x80 ; active flag enabled +kPartInactive EQU 0x00 ; active flag disabled +kHFSGUID EQU 0x48465300 ; first 4 bytes of Apple HFS Partition Type GUID. +kAppleGUID EQU 0xACEC4365 ; last 4 bytes of Apple type GUIDs. +kEFISystemGUID EQU 0x3BC93EC9 ; last 4 bytes of EFI System Partition Type GUID: + ; C12A7328-F81F-11D2-BA4B-00A0C93EC93B + +%ifdef FLOPPY +kDriveNumber EQU 0x00 +%else +kDriveNumber EQU 0x80 +%endif + +; +; Format of fdisk partition entry. +; +; The symbol 'part_size' is automatically defined as an `EQU' +; giving the size of the structure. +; + struc part +.bootid resb 1 ; bootable or not +.head resb 1 ; starting head, sector, cylinder +.sect resb 1 ; +.cyl resb 1 ; +.type resb 1 ; partition type +.endhead resb 1 ; ending head, sector, cylinder +.endsect resb 1 ; +.endcyl resb 1 ; +.lba resd 1 ; starting lba +.sectors resd 1 ; size in sectors + endstruc + +; +; Format of GPT Partition Table Header +; + struc gpth +.Signature resb 8 +.Revision resb 4 +.HeaderSize resb 4 +.HeaderCRC32 resb 4 +.Reserved resb 4 +.MyLBA resb 8 +.AlternateLBA resb 8 +.FirstUsableLBA resb 8 +.LastUsableLBA resb 8 +.DiskGUID resb 16 +.PartitionEntryLBA resb 8 +.NumberOfPartitionEntries resb 4 +.SizeOfPartitionEntry resb 4 +.PartitionEntryArrayCRC32 resb 4 + endstruc + +; +; Format of GUID Partition Entry Array +; + struc gpta +.PartitionTypeGUID resb 16 +.UniquePartitionGUID resb 16 +.StartingLBA resb 8 +.EndingLBA resb 8 +.Attributes resb 8 +.PartitionName resb 72 + endstruc + +; +; Macros. +; +%macro DebugCharMacro 1 + mov al, %1 + call print_char +%endmacro + +%macro LogString 1 + mov di, %1 + call log_string +%endmacro + +%if DEBUG +%define DebugChar(x) DebugCharMacro x +%else +%define DebugChar(x) +%endif + +;-------------------------------------------------------------------------- +; Start of text segment. + + SEGMENT .text + + ORG kBoot0RelocAddr + +;-------------------------------------------------------------------------- +; Boot code is loaded at 0:7C00h. +; +start: + ; + ; Set up the stack to grow down from kBoot0Segment:kBoot0Stack. + ; Interrupts should be off while the stack is being manipulated. + ; + cli ; interrupts off + xor ax, ax ; zero ax + mov ss, ax ; ss <- 0 + mov sp, kBoot0Stack ; sp <- top of stack + sti ; reenable interrupts + + mov es, ax ; es <- 0 + mov ds, ax ; ds <- 0 + + ; + ; Relocate boot0 code. + ; + mov si, kBoot0LoadAddr ; si <- source + mov di, kBoot0RelocAddr ; di <- destination + cld ; auto-increment SI and/or DI registers + mov cx, kSectorBytes/2 ; copy 256 words + repnz movsw ; repeat string move (word) operation + + ; + ; Code relocated, jump to start_reloc in relocated location. + ; + jmp kBoot0Segment:start_reloc + +;-------------------------------------------------------------------------- +; Start execution from the relocated location. +; +start_reloc: + + DebugChar('>') + +%if DEBUG + mov al, dl + call print_hex +%endif + + ; + ; Since this code may not always reside in the MBR, always start by + ; loading the MBR to kMBRBuffer and LBA1 to kGPTBuffer. + ; + + xor eax, eax + mov [my_lba], eax ; store LBA sector 0 for read_lba function + mov al, 2 ; load two sectors: MBR and LBA1 + mov bx, kMBRBuffer ; MBR load address + call load + jc error ; MBR load error + + ; + ; Look for the booter partition in the MBR partition table, + ; which is at offset kMBRPartTable. + ; + mov si, kMBRPartTable ; pointer to partition table + call find_boot ; will not return on success + +error: + LogString(boot_error_str) + +hang: + hlt + jmp hang + + +;-------------------------------------------------------------------------- +; Find the active (boot) partition and load the booter from the partition. +; +; Arguments: +; DL = drive number (0x80 + unit number) +; SI = pointer to fdisk partition table. +; +; Clobber list: +; EAX, BX, EBP +; +find_boot: + + ; + ; Check for boot block signature 0xAA55 following the 4 partition + ; entries. + ; + cmp WORD [si + part_size * kPartCount], kBootSignature + jne .exit ; boot signature not found. + + xor bx, bx ; BL will be set to 1 later in case of + ; Protective MBR has been found + + inc bh ; BH = 1. Giving a chance for a second pass + ; to boot an inactive but boot1h aware HFS+ partition + ; by scanning the MBR partition entries again. + +.start_scan: + mov cx, kPartCount ; number of partition entries per table + +.loop: + + ; + ; First scan through the partition table looking for the active + ; partition. + ; +%if DEBUG + mov al, [si + part.type] ; print partition type + call print_hex +%endif + + mov eax, [si + part.lba] ; save starting LBA of current + mov [my_lba], eax ; MBR partition entry for read_lba function + cmp BYTE [si + part.type], 0 ; unused partition? + je .continue ; skip to next entry + cmp BYTE [si + part.type], kPartTypePMBR ; check for Protective MBR + jne .testPass + + mov BYTE [si + part.bootid], kPartInactive ; found Protective MBR + ; clear active flag to make sure this protective + ; partition won't be used as a bootable partition. + mov bl, 1 ; Assume we can deal with GPT but try to scan + ; later if not found any other bootable partitions. + +.testPass: + cmp bh, 1 + jne .Pass2 + +.Pass1: + cmp BYTE [si + part.bootid], kPartActive ; In pass 1 we are walking on the standard path + ; by trying to hop on the active partition. + jne .continue + xor dh, dh ; Argument for loadBootSector to skip HFS+ partition + ; signature check. + jmp .tryToBoot + +.Pass2: + cmp BYTE [si + part.type], kPartTypeHFS ; In pass 2 we're going to find a HFS+ partition + ; equipped with boot1h in its boot record + ; regardless if it's active or not. + jne .continue + mov dh, 1 ; Argument for loadBootSector to check HFS+ partition signature. + + DebugChar('*') + + ; + ; Found boot partition, read boot sector to memory. + ; + +.tryToBoot: + + call loadBootSector + jne .continue + jmp SHORT initBootLoader + +.continue: + add si, BYTE part_size ; advance SI to next partition entry + loop .loop ; loop through all partition entries + + ; + ; Scanned all partitions but not found any with active flag enabled + ; Anyway if we found a protective MBR before we still have a chance + ; for a possible GPT Header at LBA 1 + ; + dec bl + jnz .switchPass2 ; didn't find Protective MBR before + call checkGPT + +.switchPass2: + ; + ; Switching to Pass 2 + ; try to find a boot1h aware HFS+ MBR partition + ; + dec bh + mov si, kMBRPartTable ; set SI to first entry of MBR Partition table + jz .start_scan ; scan again + +.exit: + ret ; Giving up. + + + ; + ; Jump to partition booter. The drive number is already in register DL. + ; SI is pointing to the modified partition entry. + ; +initBootLoader: + +DebugChar('J') + +%if VERBOSE + LogString(done_str) +%endif + + jmp kBoot0LoadAddr + + + ; + ; Found Protective MBR Partition Type: 0xEE + ; Check for 'EFI PART' string at the beginning + ; of LBA1 for possible GPT Table Header + ; +checkGPT: + push bx + + mov di, kLBA1Buffer ; address of GUID Partition Table Header + cmp DWORD [di], kGPTSignatureLow ; looking for 'EFI ' + jne .exit ; not found. Giving up. + cmp DWORD [di + 4], kGPTSignatureHigh ; looking for 'PART' + jne .exit ; not found. Giving up indeed. + mov si, di + + ; + ; Loading GUID Partition Table Array + ; + mov eax, [si + gpth.PartitionEntryLBA] ; starting LBA of GPT Array + mov [my_lba], eax ; save starting LBA for read_lba function + mov cx, [si + gpth.NumberOfPartitionEntries] ; number of GUID Partition Array entries + mov bx, [si + gpth.SizeOfPartitionEntry] ; size of GUID Partition Array entry + + push bx ; push size of GUID Partition entry + + ; + ; Calculating number of sectors we need to read for loading a GPT Array + ; +; push dx ; preserve DX (DL = BIOS drive unit number) +; mov ax, cx ; AX * BX = number of entries * size of one entry +; mul bx ; AX = total byte size of GPT Array +; pop dx ; restore DX +; shr ax, 9 ; convert to sectors + + ; + ; ... or: + ; Current GPT Arrays uses 128 partition entries each 128 bytes long + ; 128 entries * 128 bytes long GPT Array entries / 512 bytes per sector = 32 sectors + ; + mov al, 32 ; maximum sector size of GPT Array (hardcoded method) + + mov bx, kGPTABuffer + push bx ; push address of GPT Array + call load ; read GPT Array + pop si ; SI = address of GPT Array + pop bx ; BX = size of GUID Partition Array entry + jc error + + ; + ; Walk through GUID Partition Table Array + ; and load boot record from first available HFS+ partition. + ; + ; If it has boot signature (0xAA55) then jump to it + ; otherwise skip to next partition. + ; + +%if VERBOSE + LogString(gpt_str) +%endif + +.gpt_loop: + + mov eax, [si + gpta.PartitionTypeGUID + kGUIDLastDwordOffs] + + cmp eax, kAppleGUID ; check current GUID Partition for Apple's GUID type + je .gpt_ok + + ; + ; Turbo - also try EFI System Partition + ; + + cmp eax, kEFISystemGUID ; check current GUID Partition for EFI System Partition GUID type + jne .gpt_continue + +.gpt_ok: + ; + ; Found HFS Partition + ; + + mov eax, [si + gpta.StartingLBA] ; load boot sector from StartingLBA + mov [my_lba], eax + mov dh, 1 ; Argument for loadBootSector to check HFS+ partition signature. + call loadBootSector + jne .gpt_continue ; no boot loader signature + + mov si, kMBRPartTable ; fake the current GUID Partition + mov [si + part.lba], eax ; as MBR style partition for boot1h + mov BYTE [si + part.type], kPartTypeHFS ; with HFS+ filesystem type (0xAF) + jmp SHORT initBootLoader + +.gpt_continue: + + add si, bx ; advance SI to next partition entry + loop .gpt_loop ; loop through all partition entries + +.exit: + pop bx + ret ; no more GUID partitions. Giving up. + + +;-------------------------------------------------------------------------- +; loadBootSector - Load boot sector +; +; Arguments: +; DL = drive number (0x80 + unit number) +; DH = 0 skip HFS+ partition signature checking +; 1 enable HFS+ partition signature checking +; [my_lba] = starting LBA. +; +; Returns: +; ZF = 0 if boot sector hasn't kBootSignature +; 1 if boot sector has kBootSignature +; +loadBootSector: + pusha + + mov al, 3 + mov bx, kBoot0LoadAddr + call load + jc error + + or dh, dh + jz .checkBootSignature + +.checkHFSSignature: + +%if VERBOSE + LogString(test_str) +%endif + + ; + ; Looking for HFSPlus ('H+') or HFSPlus case-sensitive ('HX') signature. + ; + mov ax, [kBoot0LoadAddr + 2 * kSectorBytes] + cmp ax, kHFSPSignature ; 'H+' + je .checkBootSignature + cmp ax, kHFSPCaseSignature ; 'HX' + je .checkBootSignature + + ; + ; Looking for boot1f32 magic string. + ; + mov ax, [kBoot0LoadAddr + kFAT32BootCodeOffset] + cmp ax, kBoot1FAT32Magic + jne .exit + +.checkBootSignature: + ; + ; Check for boot block signature 0xAA55 + ; + mov di, bx + cmp WORD [di + kSectorBytes - 2], kBootSignature + +.exit: + + popa + + ret + + +;-------------------------------------------------------------------------- +; load - Load one or more sectors from a partition. +; +; Arguments: +; AL = number of 512-byte sectors to read. +; ES:BX = pointer to where the sectors should be stored. +; DL = drive number (0x80 + unit number) +; [my_lba] = starting LBA. +; +; Returns: +; CF = 0 success +; 1 error +; +load: + push cx + +.ebios: + mov cx, 5 ; load retry count +.ebios_loop: + call read_lba ; use INT13/F42 + jnc .exit + loop .ebios_loop + +.exit: + pop cx + ret + + +;-------------------------------------------------------------------------- +; read_lba - Read sectors from a partition using LBA addressing. +; +; Arguments: +; AL = number of 512-byte sectors to read (valid from 1-127). +; ES:BX = pointer to where the sectors should be stored. +; DL = drive number (0x80 + unit number) +; [my_lba] = starting LBA. +; +; Returns: +; CF = 0 success +; 1 error +; +read_lba: + pushad ; save all registers + mov bp, sp ; save current SP + + ; + ; Create the Disk Address Packet structure for the + ; INT13/F42 (Extended Read Sectors) on the stack. + ; + +; push DWORD 0 ; offset 12, upper 32-bit LBA + push ds ; For sake of saving memory, + push ds ; push DS register, which is 0. + mov ecx, [my_lba] ; offset 8, lower 32-bit LBA + push ecx + push es ; offset 6, memory segment + push bx ; offset 4, memory offset + xor ah, ah ; offset 3, must be 0 + push ax ; offset 2, number of sectors + + ; It pushes 2 bytes with a smaller opcode than if WORD was used + push BYTE 16 ; offset 0-1, packet size + + DebugChar('<') +%if DEBUG + mov eax, ecx + call print_hex +%endif + + ; + ; INT13 Func 42 - Extended Read Sectors + ; + ; Arguments: + ; AH = 0x42 + ; DL = drive number (80h + drive unit) + ; DS:SI = pointer to Disk Address Packet + ; + ; Returns: + ; AH = return status (sucess is 0) + ; carry = 0 success + ; 1 error + ; + ; Packet offset 2 indicates the number of sectors read + ; successfully. + ; + mov si, sp + mov ah, 0x42 + int 0x13 + + jnc .exit + + DebugChar('R') ; indicate INT13/F42 error + + ; + ; Issue a disk reset on error. + ; Should this be changed to Func 0xD to skip the diskette controller + ; reset? + ; + xor ax, ax ; Func 0 + int 0x13 ; INT 13 + stc ; set carry to indicate error + +.exit: + mov sp, bp ; restore SP + popad + ret + + +;-------------------------------------------------------------------------- +; Write a string with 'boot0: ' prefix to the console. +; +; Arguments: +; ES:DI pointer to a NULL terminated string. +; +; Clobber list: +; DI +; +log_string: + pusha + + push di + mov si, log_title_str + call print_string + + pop si + call print_string + + popa + + ret + + +;-------------------------------------------------------------------------- +; Write a string to the console. +; +; Arguments: +; DS:SI pointer to a NULL terminated string. +; +; Clobber list: +; AX, BX, SI +; +print_string: + mov bx, 1 ; BH=0, BL=1 (blue) + cld ; increment SI after each lodsb call +.loop: + lodsb ; load a byte from DS:SI into AL + cmp al, 0 ; Is it a NULL? + je .exit ; yes, all done + mov ah, 0xE ; INT10 Func 0xE + int 0x10 ; display byte in tty mode + jmp short .loop +.exit: + ret + + +%if DEBUG + +;-------------------------------------------------------------------------- +; Write a ASCII character to the console. +; +; Arguments: +; AL = ASCII character. +; +print_char: + pusha + mov bx, 1 ; BH=0, BL=1 (blue) + mov ah, 0x0e ; bios INT 10, Function 0xE + int 0x10 ; display byte in tty mode + popa + ret + + +;-------------------------------------------------------------------------- +; Write the 4-byte value to the console in hex. +; +; Arguments: +; EAX = Value to be displayed in hex. +; +print_hex: + pushad + mov cx, WORD 4 + bswap eax +.loop: + push ax + ror al, 4 + call print_nibble ; display upper nibble + pop ax + call print_nibble ; display lower nibble + ror eax, 8 + loop .loop + + mov al, 10 ; carriage return + call print_char + mov al, 13 + call print_char + + popad + ret + +print_nibble: + and al, 0x0f + add al, '0' + cmp al, '9' + jna .print_ascii + add al, 'A' - '9' - 1 +.print_ascii: + call print_char + ret + +getc: + pusha + mov ah, 0 + int 0x16 + popa + ret +%endif ;DEBUG + + +;-------------------------------------------------------------------------- +; NULL terminated strings. +; +log_title_str db 10, 13, 'boot0: ', 0 + +%if VERBOSE +gpt_str db 'GPT', 0 +test_str db 'test', 0 +done_str db 'done', 0 +%endif + +boot_error_str db 'error', 0 + +;-------------------------------------------------------------------------- +; Pad the rest of the 512 byte sized booter with zeroes. The last +; two bytes is the mandatory boot sector signature. +; +; If the booter code becomes too large, then nasm will complain +; that the 'times' argument is negative. + +; +; According to EFI specification, maximum boot code size is 440 bytes +; + +; +; XXX - compilation errors with debug enabled (see comment above about nasm) +; Azi: boot0.s:808: error: TIMES value -111 is negative +; boot0.s:811: error: TIMES value -41 is negative +; +pad_boot: + times 440-($-$$) db 0 + +pad_table_and_sig: + times 510-($-$$) db 0 + dw kBootSignature + + + ABSOLUTE 0xE400 + +; +; In memory variables. +; +my_lba resd 1 ; Starting LBA for read_lba function + +; END diff --git a/i386/boot1/boot1h.s b/i386/boot1/boot1h.s new file mode 100644 index 0000000..8932b86 --- /dev/null +++ b/i386/boot1/boot1h.s @@ -0,0 +1,1487 @@ +; Copyright (c) 1999-2003 Apple Computer, Inc. All rights reserved. +; +; @APPLE_LICENSE_HEADER_START@ +; +; Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights +; Reserved. This file contains Original Code and/or Modifications of +; Original Code as defined in and that are subject to the Apple Public +; Source License Version 2.0 (the "License"). You may not use this file +; except in compliance with the License. Please obtain a copy of the +; License at http://www.apple.com/publicsource and read it before using +; this file. +; +; The Original Code and all software distributed under the License are +; distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER +; EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, +; INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, +; FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the +; License for the specific language governing rights and limitations +; under the License. +; +; @APPLE_LICENSE_HEADER_END@ +; +; Partition Boot Loader: boot1h +; +; This program is designed to reside in sector 0+1 of an HFS+ partition. +; It expects that the MBR has left the drive number in DL +; and a pointer to the partition entry in SI. +; +; This version requires a BIOS with EBIOS (LBA) support. +; +; This code is written for the NASM assembler. +; nasm boot1.s -o boot1h + +; +; This version of boot1h tries to find a stage2 boot file in the root folder. +; +; NOTE: this is an experimental version with multiple extent support. +; +; Written by Tamás Kosárszky on 2008-04-14 +; + +; +; Set to 1 to enable obscure debug messages. +; +DEBUG EQU 0 + +; +; Set to 1 to enable unused code. +; +UNUSED EQU 0 + +; +; Set to 1 to enable verbose mode. +; +VERBOSE EQU 0 + +; +; Various constants. +; +NULL EQU 0 +CR EQU 0x0D +LF EQU 0x0A + +mallocStart EQU 0x1000 ; start address of local workspace area +maxSectorCount EQU 64 ; maximum sector count for readSectors +maxNodeSize EQU 16384 + +kSectorBytes EQU 512 ; sector size in bytes +kBootSignature EQU 0xAA55 ; boot sector signature + +kBoot1StackAddress EQU 0xFFF0 ; boot1 stack pointer +kBoot1LoadAddr EQU 0x7C00 ; boot1 load address +kBoot1RelocAddr EQU 0xE000 ; boot1 relocated address +kBoot1Sector1Addr EQU kBoot1RelocAddr + kSectorBytes ; boot1 load address for sector 1 +kHFSPlusBuffer EQU kBoot1Sector1Addr + kSectorBytes ; HFS+ Volume Header address + +kBoot2Sectors EQU (145 * 1024 - 512) / kSectorBytes ; max size of 'boot' file in sectors +kBoot2Segment EQU 0x2000 ; boot2 load segment +kBoot2Address EQU kSectorBytes ; boot2 load address + +; +; Format of fdisk partition entry. +; +; The symbol 'part_size' is automatically defined as an `EQU' +; giving the size of the structure. +; + struc part +.bootid resb 1 ; bootable or not +.head resb 1 ; starting head, sector, cylinder +.sect resb 1 ; +.cyl resb 1 ; +.type resb 1 ; partition type +.endhead resb 1 ; ending head, sector, cylinder +.endsect resb 1 ; +.endcyl resb 1 ; +.lba resd 1 ; starting lba +.sectors resd 1 ; size in sectors + endstruc + +;------------------------------------------------------------------------- +; HFS+ related structures and constants +; +kHFSPlusSignature EQU 'H+' ; HFS+ volume signature +kHFSPlusCaseSignature EQU 'HX' ; HFS+ volume case-sensitive signature +kHFSPlusCaseSigX EQU 'X' ; upper byte of HFS+ volume case-sensitive signature +kHFSPlusExtentDensity EQU 8 ; 8 extent descriptors / extent record + +; +; HFSUniStr255 +; + struc HFSUniStr255 +.length resw 1 +.unicode resw 255 + endstruc + +; +; HFSPlusExtentDescriptor +; + struc HFSPlusExtentDescriptor +.startBlock resd 1 +.blockCount resd 1 + endstruc + +; +; HFSPlusForkData +; + struc HFSPlusForkData +.logicalSize resq 1 +.clumpSize resd 1 +.totalBlocks resd 1 +.extents resb kHFSPlusExtentDensity * HFSPlusExtentDescriptor_size + endstruc + +; +; HFSPlusVolumeHeader +; + struc HFSPlusVolumeHeader +.signature resw 1 +.version resw 1 +.attributes resd 1 +.lastMountedVersion resd 1 +.journalInfoBlock resd 1 +.createDate resd 1 +.modifyDate resd 1 +.backupDate resd 1 +.checkedDate resd 1 +.fileCount resd 1 +.folderCount resd 1 +.blockSize resd 1 +.totalBlocks resd 1 +.freeBlocks resd 1 +.nextAllocation resd 1 +.rsrcClumpSize resd 1 +.dataClumpSize resd 1 +.nextCatalogID resd 1 +.writeCount resd 1 +.encodingsBitmap resq 1 +.finderInfo resd 8 +.allocationFile resb HFSPlusForkData_size +.extentsFile resb HFSPlusForkData_size +.catalogFile resb HFSPlusForkData_size +.attributesFile resb HFSPlusForkData_size +.startupFile resb HFSPlusForkData_size + endstruc + +; +; B-tree related structures and constants +; + +kBTIndexNode EQU 0 +kBTMaxRecordLength EQU 264 ; sizeof(kHFSPlusFileThreadRecord) +kHFSRootParentID EQU 1 ; Parent ID of the root folder +kHFSRootFolderID EQU 2 ; Folder ID of the root folder +kHFSExtentsFileID EQU 3 ; File ID of the extents overflow file +kHFSCatalogFileID EQU 4 ; File ID of the catalog file +kHFSPlusFileRecord EQU 0x200 +kForkTypeData EQU 0 +kForkTypeResource EQU 0xFF + +; +; BTNodeDescriptor +; + struc BTNodeDescriptor +.fLink resd 1 +.bLink resd 1 +.kind resb 1 +.height resb 1 +.numRecords resw 1 +.reserved resw 1 + endstruc + +; +; BTHeaderRec +; + struc BTHeaderRec +.treeDepth resw 1 +.rootNode resd 1 +.leafRecords resd 1 +.firstLeafNode resd 1 +.lastLeafNode resd 1 +.nodeSize resw 1 +.maxKeyLength resw 1 +.totalNodes resd 1 +.freeNodes resd 1 +.reserved1 resw 1 +.clumpSize resd 1 +.btreeType resb 1 +.keyCompareType resb 1 +.attributes resd 1 +.reserved3 resd 16 + endstruc + +; +; BTIndexRec +; + struc BTIndexRec +.childID resd 1 + endstruc + +; +; HFSPlusCatalogKey +; + struc HFSPlusCatalogKey +; +; won't use the keyLength field for easier addressing data inside this structure +; +;.keyLength resw 1 + +.parentID resd 1 +.nodeName resb HFSUniStr255_size + endstruc + +; +; HFSPlusExtentKey +; + struc HFSPlusExtentKey +; +; won't use the keyLength field for easier addressing data inside this structure +; +;.keyLength resw 1 + +.forkType resb 1 +.pad resb 1 +.fileID resd 1 +.startBlock resd 1 + endstruc + +; +; HFSPlusBSDInfo +; + struc HFSPlusBSDInfo +.ownerID resd 1 +.groupID resd 1 +.adminFlags resb 1 +.ownerFlags resb 1 +.fileMode resw 1 +.special resd 1 + endstruc + +; +; FileInfo +; + struc FileInfo +.fileType resd 1 +.fileCreator resd 1 +.finderFlags resw 1 +.location resw 2 +.reservedField resw 1 + endstruc + +; +; ExtendedFileInfo +; + struc ExtendedFileInfo +.reserved1 resw 4 +.extFinderFlags resw 1 +.reserved2 resw 1 +.putAwayFolderID resd 1 + endstruc + +; +; HFSPlusCatalogFile +; + struc HFSPlusCatalogFile +.recordType resw 1 +.flags resw 1 +.reserved1 resd 1 +.fileID resd 1 +.createDate resd 1 +.contentModDate resd 1 +.attributeModDate resd 1 +.accessDate resd 1 +.backupDate resd 1 +.permissions resb HFSPlusBSDInfo_size +.userInfo resb FileInfo_size +.finderInfo resb ExtendedFileInfo_size +.textEncoding resd 1 +.reserved2 resd 1 +.dataFork resb HFSPlusForkData_size +.resourceFork resb HFSPlusForkData_size + endstruc + +; +; Macros. +; +%macro jmpabs 1 + push WORD %1 + ret +%endmacro + +%macro DebugCharMacro 1 + pushad + mov al, %1 + call print_char + call getc + popad +%endmacro + +%macro PrintCharMacro 1 + pushad + mov al, %1 + call print_char + popad +%endmacro + +%macro PutCharMacro 1 + call print_char +%endmacro + +%macro PrintHexMacro 1 + call print_hex +%endmacro + +%macro PrintString 1 + mov si, %1 + call print_string +%endmacro + +%macro LogString 1 + mov di, %1 + call log_string +%endmacro + +%if DEBUG + %define DebugChar(x) DebugCharMacro x + %define PrintChar(x) PrintCharMacro x + %define PutChar(x) PutCharMacro + %define PrintHex(x) PrintHexMacro x +%else + %define DebugChar(x) + %define PrintChar(x) + %define PutChar(x) + %define PrintHex(x) +%endif + +;-------------------------------------------------------------------------- +; Start of text segment. + + SEGMENT .text + + ORG kBoot1RelocAddr + +;-------------------------------------------------------------------------- +; Boot code is loaded at 0:7C00h. +; +start: + ; + ; Set up the stack to grow down from kBoot1StackSegment:kBoot1StackAddress. + ; Interrupts should be off while the stack is being manipulated. + ; + + cli ; interrupts off + xor ax, ax ; zero ax + mov ss, ax ; ss <- 0 + mov sp, kBoot1StackAddress ; sp <- top of stack + sti ; reenable interrupts + + mov ds, ax ; ds <- 0 + mov es, ax ; es <- 0 + + ; + ; Relocate boot1 code. + ; + push si + mov si, kBoot1LoadAddr ; si <- source + mov di, kBoot1RelocAddr ; di <- destination + cld ; auto-increment SI and/or DI registers + mov cx, kSectorBytes ; copy 256 words + rep movsb ; repeat string move (word) operation + pop si + + ; + ; Code relocated, jump to startReloc in relocated location. + ; + ; FIXME: Is there any way to instruct NASM to compile a near jump + ; using absolute address instead of relative displacement? + ; + jmpabs startReloc + +;-------------------------------------------------------------------------- +; Start execution from the relocated location. +; +startReloc: + + ; + ; Initializing global variables. + ; + mov eax, [si + part.lba] + mov [gPartLBA], eax ; save the current partition LBA offset + mov [gBIOSDriveNumber], dl ; save BIOS drive number + mov WORD [gMallocPtr], mallocStart ; set free space pointer + + ; + ; Loading upper 512 bytes of boot1h and HFS+ Volume Header. + ; + xor ecx, ecx ; sector 1 of current partition + inc ecx + mov al, 2 ; read 2 sectors: sector 1 of boot1h + HFS+ Volume Header + mov edx, kBoot1Sector1Addr + call readLBA + + ; + ; Initializing more global variables. + ; + mov eax, [kHFSPlusBuffer + HFSPlusVolumeHeader.blockSize] + bswap eax ; convert to little-endian + shr eax, 9 ; convert to sector unit + mov [gBlockSize], eax ; save blockSize as little-endian sector unit! + + ; + ; Looking for HFSPlus ('H+') or HFSPlus case-sensitive ('HX') signature. + ; + mov ax, [kHFSPlusBuffer + HFSPlusVolumeHeader.signature] + cmp ax, kHFSPlusCaseSignature + je findRootBoot + cmp ax, kHFSPlusSignature + jne error + +;-------------------------------------------------------------------------- +; Find stage2 boot file in a HFS+ Volume's root folder. +; +findRootBoot: + mov al, kHFSCatalogFileID + lea si, [searchCatalogKey] + lea di, [kHFSPlusBuffer + HFSPlusVolumeHeader.catalogFile + HFSPlusForkData.extents] + call lookUpBTree + jne error + + lea si, [bp + BTree.recordDataPtr] + mov si, [si] + cmp WORD [si], kHFSPlusFileRecord + jne error + +; EAX = Catalog File ID +; BX = read size in sectors +; ECX = file offset in sectors +; EDX = address of read buffer +; DI = address of HFSPlusForkData + + ; + ; Use the second big-endian double-word as the file length in HFSPlusForkData.logicalSize + ; + mov ebx, [si + HFSPlusCatalogFile.dataFork + HFSPlusForkData.logicalSize + 4] + bswap ebx ; convert file size to little-endian + add ebx, kSectorBytes - 1 ; adjust size before unit conversion + shr ebx, 9 ; convert file size to sector unit + cmp bx, kBoot2Sectors ; check if bigger than max stage2 size + ja error + mov eax, [si + HFSPlusCatalogFile.fileID] + bswap eax ; convert fileID to little-endian + xor ecx, ecx + mov edx, (kBoot2Segment << 4) + kBoot2Address + lea di, [si + HFSPlusCatalogFile.dataFork + HFSPlusForkData.extents] + call readExtent + +%if VERBOSE + LogString(root_str) +%endif + +boot2: + +%if DEBUG + DebugChar ('!') +%endif + +%if UNUSED + ; + ; Waiting for a key press. + ; + + mov ah, 0 + int 0x16 +%endif + + mov dl, [gBIOSDriveNumber] ; load BIOS drive number + jmp kBoot2Segment:kBoot2Address + +error: + +%if VERBOSE + LogString(error_str) +%endif + +hang: + hlt + jmp hang + +;-------------------------------------------------------------------------- +; readSectors - Reads more than 127 sectors using LBA addressing. +; +; Arguments: +; AX = number of 512-byte sectors to read (valid from 1-1280). +; EDX = pointer to where the sectors should be stored. +; ECX = sector offset in partition +; +; Returns: +; CF = 0 success +; 1 error +; +readSectors: + pushad + mov bx, ax + +.loop: + xor eax, eax ; EAX = 0 + mov al, bl ; assume we reached the last block. + cmp bx, maxSectorCount ; check if we really reached the last block + jb .readBlock ; yes, BX < MaxSectorCount + mov al, maxSectorCount ; no, read MaxSectorCount + +.readBlock: + call readLBA + sub bx, ax ; decrease remaning sectors with the read amount + jz .exit ; exit if no more sectors left to be loaded + add ecx, eax ; adjust LBA sector offset + shl ax, 9 ; convert sectors to bytes + add edx, eax ; adjust target memory location + jmp .loop ; read remaining sectors + +.exit: + popad + ret + +;-------------------------------------------------------------------------- +; readLBA - Read sectors from a partition using LBA addressing. +; +; Arguments: +; AL = number of 512-byte sectors to read (valid from 1-127). +; EDX = pointer to where the sectors should be stored. +; ECX = sector offset in partition +; [bios_drive_number] = drive number (0x80 + unit number) +; +; Returns: +; CF = 0 success +; 1 error +; +readLBA: + pushad ; save all registers + push es ; save ES + mov bp, sp ; save current SP + + ; + ; Convert EDX to segment:offset model and set ES:BX + ; + ; Some BIOSes do not like offset to be negative while reading + ; from hard drives. This usually leads to "boot1: error" when trying + ; to boot from hard drive, while booting normally from USB flash. + ; The routines, responsible for this are apparently different. + ; Thus we split linear address slightly differently for these + ; capricious BIOSes to make sure offset is always positive. + ; + + mov bx, dx ; save offset to BX + and bh, 0x0f ; keep low 12 bits + shr edx, 4 ; adjust linear address to segment base + xor dl, dl ; mask low 8 bits + mov es, dx ; save segment to ES + + ; + ; Create the Disk Address Packet structure for the + ; INT13/F42 (Extended Read Sectors) on the stack. + ; + + ; push DWORD 0 ; offset 12, upper 32-bit LBA + push ds ; For sake of saving memory, + push ds ; push DS register, which is 0. + + add ecx, [gPartLBA] ; offset 8, lower 32-bit LBA + push ecx + + push es ; offset 6, memory segment + + push bx ; offset 4, memory offset + + xor ah, ah ; offset 3, must be 0 + push ax ; offset 2, number of sectors + + push WORD 16 ; offset 0-1, packet size + + ; + ; INT13 Func 42 - Extended Read Sectors + ; + ; Arguments: + ; AH = 0x42 + ; [bios_drive_number] = drive number (0x80 + unit number) + ; DS:SI = pointer to Disk Address Packet + ; + ; Returns: + ; AH = return status (sucess is 0) + ; carry = 0 success + ; 1 error + ; + ; Packet offset 2 indicates the number of sectors read + ; successfully. + ; + mov dl, [gBIOSDriveNumber] ; load BIOS drive number + mov si, sp + mov ah, 0x42 + int 0x13 + + jc error + + ; + ; Issue a disk reset on error. + ; Should this be changed to Func 0xD to skip the diskette controller + ; reset? + ; +; xor ax, ax ; Func 0 +; int 0x13 ; INT 13 +; stc ; set carry to indicate error + +.exit: + mov sp, bp ; restore SP + pop es ; restore ES + popad + ret + +%if VERBOSE + +;-------------------------------------------------------------------------- +; Write a string with 'boot1: ' prefix to the console. +; +; Arguments: +; ES:DI pointer to a NULL terminated string. +; +; Clobber list: +; DI +; +log_string: + pushad + + push di + mov si, log_title_str + call print_string + + pop si + call print_string + + popad + + ret + +;------------------------------------------------------------------------- +; Write a string to the console. +; +; Arguments: +; DS:SI pointer to a NULL terminated string. +; +; Clobber list: +; AX, BX, SI +; +print_string: + mov bx, 1 ; BH=0, BL=1 (blue) + +.loop: + lodsb ; load a byte from DS:SI into AL + cmp al, 0 ; Is it a NULL? + je .exit ; yes, all done + mov ah, 0xE ; INT10 Func 0xE + int 0x10 ; display byte in tty mode + jmp .loop + +.exit: + ret + +%endif ; VERBOSE + +%if DEBUG + +;-------------------------------------------------------------------------- +; Write the 4-byte value to the console in hex. +; +; Arguments: +; EAX = Value to be displayed in hex. +; +print_hex: + pushad + mov cx, WORD 4 + bswap eax +.loop: + push ax + ror al, 4 + call print_nibble ; display upper nibble + pop ax + call print_nibble ; display lower nibble + ror eax, 8 + loop .loop + +%if UNUSED + mov al, 10 ; carriage return + call print_char + mov al, 13 + call print_char +%endif ; UNUSED + + popad + ret + +print_nibble: + and al, 0x0f + add al, '0' + cmp al, '9' + jna .print_ascii + add al, 'A' - '9' - 1 +.print_ascii: + call print_char + ret + +;-------------------------------------------------------------------------- +; getc - wait for a key press +; +getc: + pushad + mov ah, 0 + int 0x16 + popad + ret + +;-------------------------------------------------------------------------- +; Write a ASCII character to the console. +; +; Arguments: +; AL = ASCII character. +; +print_char: + pushad + mov bx, 1 ; BH=0, BL=1 (blue) + mov ah, 0x0e ; bios INT 10, Function 0xE + int 0x10 ; display byte in tty mode + popad + ret + +%endif ; DEBUG + +%if UNUSED + +;-------------------------------------------------------------------------- +; Convert null terminated string to HFSUniStr255 +; +; Arguments: +; DS:DX pointer to a NULL terminated string. +; ES:DI pointer to result. +; +ConvertStrToUni: + pushad ; save registers + push di ; save DI for unicode string length pointer + mov si, dx ; use SI as source string pointer + xor ax, ax ; AX = unicode character + mov cl, al ; CL = string length + +.loop: + stosw ; store unicode character (length 0 at first run) + lodsb ; load next character to AL + inc cl ; increment string length count + cmp al, NULL ; check for string terminator + jne .loop + + pop di ; restore unicode string length pointer + dec cl ; ignoring terminator from length count + mov [di], cl ; save string length + popad ; restore registers + ret + +%endif ; UNUSED + +;-------------------------------------------------------------------------- +; Convert big-endian HFSUniStr255 to little-endian +; +; Arguments: +; DS:SI = pointer to big-endian HFSUniStr255 +; ES:DI = pointer to result buffer +; +ConvertHFSUniStr255ToLE: + pushad + lodsw + xchg ah, al + stosw + cmp al, 0 + je .exit + mov cx, ax + +.loop: + lodsw + xchg ah, al ; convert AX to little-endian + + ; + ; When working with a case-sensitive HFS+ (HX) filesystem, we shouldn't change the case. + ; + cmp BYTE [kHFSPlusBuffer + HFSPlusVolumeHeader.signature + 1], kHFSPlusCaseSigX + je .keepcase + + or ax, ax + jne .convertToLE + dec ax ; NULL must be the strongest char + +.convertToLE: + cmp ah, 0 + ja .keepcase + cmp al, 'A' + jb .keepcase + cmp al, 'Z' + ja .keepcase + add al, 32 ; convert to lower-case + +.keepcase: + stosw + loop .loop + +.exit: + popad + ret + +;-------------------------------------------------------------------------- +; compare HFSPlusExtentKey structures +; +; Arguments: +; DS:SI = search key +; ES:DI = trial key +; +; Returns: +; [BTree.searchResult] = result +; FLAGS = relation between search and trial keys +; +compareHFSPlusExtentKeys: + pushad + + mov dl, 0 ; DL = result of comparison, DH = bestGuess + mov eax, [si + HFSPlusExtentKey.fileID] + cmp eax, [di + HFSPlusExtentKey.fileID] + jne .checkFlags + + cmp BYTE [si + HFSPlusExtentKey.forkType], kForkTypeData + jne .checkFlags + + mov eax, [si + HFSPlusExtentKey.startBlock] + cmp eax, [di + HFSPlusExtentKey.startBlock] + je compareHFSPlusCatalogKeys.exit + +.checkFlags: + ja compareHFSPlusCatalogKeys.searchKeyGreater ; search key > trial key + jb compareHFSPlusCatalogKeys.trialKeyGreater ; search key < trial key + +;-------------------------------------------------------------------------- +; Compare HFSPlusCatalogKey structures +; +; Arguments: +; DS:SI = search key +; ES:DI = trial key +; +; Returns: +; [BTree.searchResult] = result +; FLAGS = relation between search and trial keys +; +compareHFSPlusCatalogKeys: + pushad + xor dx, dx ; DL = result of comparison, DH = bestGuess + xchg si, di + lodsd + mov ecx, eax ; ECX = trial parentID + xchg si, di + lodsd ; EAX = search parentID + cmp eax, ecx + ja .searchKeyGreater ; search parentID > trial parentID + jb .trialKeyGreater ; search parentID < trial parentID + +.compareNodeName: ; search parentID = trial parentID + xchg si, di + lodsw + mov cx, ax ; CX = trial nodeName.length + xchg si, di + lodsw ; AX = search nodeName.length + cmp cl, 0 ; trial nodeName.length = 0? + je .searchKeyGreater + + cmp ax, cx + je .strCompare + ja .searchStrLonger + +.trialStrLonger: + dec dh + mov cx, ax + jmp .strCompare + +.searchStrLonger: + inc dh + +.strCompare: + repe cmpsw + ja .searchKeyGreater + jb .trialKeyGreater + mov dl, dh + jmp .exit + +.trialKeyGreater: + dec dl + jmp .exit + +.searchKeyGreater: + inc dl + +.exit: + mov [bp + BTree.searchResult], dl + cmp dl, 0 ; set flags to check relation between keys + + popad + ret + +;-------------------------------------------------------------------------- +; Allocate memory +; +; Arguments: +; CX = size of requested memory +; +; Returns: +; BP = start address of allocated memory +; +; Clobber list: +; CX +; +malloc: + push ax ; save AX + push di ; save DI + mov di, [gMallocPtr] ; start address of free space + push di ; save free space start address + inc di ; + inc di ; keep the first word untouched + dec cx ; for the last memory block pointer. + dec cx ; + mov al, NULL ; fill with zero + rep stosb ; repeat fill + mov [gMallocPtr], di ; adjust free space pointer + pop bp ; BP = start address of allocated memory + mov [di], bp ; set start address of allocated memory at next + ; allocation block's free space address. + pop di ; restore DI + pop ax ; restore AX + ret + +%if UNUSED + +;-------------------------------------------------------------------------- +; Free allocated memory +; +; Returns: +; BP = start address of previously allocated memory +; +free: + lea bp, [gMallocPtr] + mov bp, [bp] + mov [gMallocPtr], bp + ret + +%endif ; UNUSED + +;-------------------------------------------------------------------------- +; Static data. +; + +%if VERBOSE +root_str db '/boot', CR, LF, NULL +%endif + +;-------------------------------------------------------------------------- +; Pad the rest of the 512 byte sized sector with zeroes. The last +; two bytes is the mandatory boot sector signature. +; +; If the booter code becomes too large, then nasm will complain +; that the 'times' argument is negative. + +; +; XXX - compilation errors with debug enabled (see comment above about nasm) +; Azi: boot1h.s:994: error: TIMES value -67 is negative +; +pad_table_and_sig: + times 510-($-$$) db 0 + dw kBootSignature + +; +; Sector 1 code area +; + +;-------------------------------------------------------------------------- +; lookUpBTree - initializes a new BTree instance and +; look up for HFSPlus Catalog File or Extent Overflow keys +; +; Arguments: +; AL = kHFSPlusFileID (Catalog or Extents Overflow) +; SI = address of searchKey +; DI = address of HFSPlusForkData.extents +; +; Returns: +; BP = address of BTree instance +; ECX = rootNode's logical offset in sectors +; +lookUpBTree: + mov cx, BTree_size ; allocate memory with BTree_size + call malloc ; BP = start address of allocated memory. + mov [bp + BTree.fileID], al ; save fileFileID + mov edx, [di] ; first extent of current file + call blockToSector ; ECX = converted to sector unit + mov al, 1 ; 1 sector is enough for + xor edx, edx ; reading current file's header. + lea dx, [bp + BTree.BTHeaderBuffer] ; load into BTreeHeaderBuffer + call readLBA ; read + mov ax, [bp + BTree.BTHeaderBuffer + BTNodeDescriptor_size + BTHeaderRec.nodeSize] + xchg ah, al ; convert to little-endian + mov [bp + BTree.nodeSize], ax ; save nodeSize + + ; + ; Always start the lookup process with the root node. + ; + mov edx, [bp + BTree.BTHeaderBuffer + BTNodeDescriptor_size + BTHeaderRec.rootNode] + +.readNode: + ; + ; Converting nodeID to sector unit + ; + mov ax, [bp + BTree.nodeSize] + shr ax, 9 ; convert nodeSize to sectors + mov bx, ax ; BX = read sector count + cwde + bswap edx ; convert node ID to little-endian + mul edx ; multiply with nodeSize converted to sector unit + mov ecx, eax ; ECX = file offset in BTree + + mov eax, [bp + BTree.fileID] + lea edx, [bp + BTree.nodeBuffer] + call readExtent + + ; + ; AX = lowerBound = 0 + ; + xor ax, ax + + ; + ; BX = upperBound = numRecords - 1 + ; + mov bx, [bp + BTree.nodeBuffer + BTNodeDescriptor.numRecords] + xchg bh, bl + dec bx + +.bsearch: + cmp ax, bx + ja .checkResult ; jump if lowerBound > upperBound + + mov cx, ax + add cx, bx + shr cx, 1 ; test index = (lowerBound + upperBound / 2) + + call getBTreeRecord + +%if UNUSED + pushad + jl .csearchLessThanTrial + jg .csearchGreaterThanTrial + PrintChar('=') + jmp .csearchCont +.csearchGreaterThanTrial: + PrintChar('>') + jmp .csearchCont +.csearchLessThanTrial: + PrintChar('<') +.csearchCont: + popad +%endif ; UNUSED + +.adjustBounds: + je .checkResult + jl .searchLessThanTrial + jg .searchGreaterThanTrial + jmp .bsearch + +.searchLessThanTrial: + mov bx, cx + dec bx ; upperBound = index - 1 + jmp .bsearch + +.searchGreaterThanTrial: + mov ax, cx + inc ax ; lowerBound = index + 1 + jmp .bsearch + +.checkResult: + cmp BYTE [bp + BTree.searchResult], 0 + jge .foundKey + + mov cx, bx + call getBTreeRecord + +.foundKey: + cmp BYTE [bp + BTree.nodeBuffer + BTNodeDescriptor.kind], kBTIndexNode + jne .exit + + lea bx, [bp + BTree.recordDataPtr] + mov bx, [bx] + mov edx, [bx] + jmp .readNode + +.exit: + cmp BYTE [bp + BTree.searchResult], 0 + ret + +;-------------------------------------------------------------------------- +; getBTreeRecord - read and compare BTree record +; +; Arguments: +; CX = record index +; SI = address of search key +; +; Returns: +; [BTree.searchResult] = result of key compare +; [BTree.recordDataPtr] = address of record data +; +getBTreeRecord: + pushad + push si ; save SI + lea di, [bp + BTree.nodeBuffer] ; DI = start of nodeBuffer + push di ; use later + mov ax, [bp + BTree.nodeSize] ; get nodeSize + add di, ax ; DI = beyond nodeBuffer + inc cx ; increment index + shl cx, 1 ; * 2 + sub di, cx ; DI = pointer to record + mov ax, [di] ; offset to record + xchg ah, al ; convert to little-endian + pop di ; start of nodeBuffer + add di, ax ; DI = address of record key + mov si, di ; save to SI + mov ax, [di] ; keyLength + xchg ah, al ; convert to little-endian + inc ax ; suppress keySize (2 bytes) + inc ax ; + add di, ax ; DI = address of record data + mov [bp + BTree.recordDataPtr], di ; save address of record data + lea di, [bp + BTree.trialKey] + push di ; save address of trialKey + lodsw ; suppress keySize (2 bytes) + ; + ; Don't need to compare as DWORD since all reserved CNIDs fits to a single byte + ; + cmp BYTE [bp + BTree.fileID], kHFSCatalogFileID + je .prepareTrialCatalogKey + +.prepareTrialExtentKey: + mov bx, compareHFSPlusExtentKeys + movsw ; copy forkType + pad + mov cx, 2 ; copy fileID + startBlock + +.extentLoop: + lodsd + bswap eax ; convert to little-endian + stosd + loop .extentLoop + jmp .exit + +.prepareTrialCatalogKey: + mov bx, compareHFSPlusCatalogKeys + lodsd + bswap eax ; convert ParentID to little-endian + stosd + call ConvertHFSUniStr255ToLE ; convert nodeName to little-endian + +.exit: + pop di ; restore address of trialKey + +%if UNUSED +; +; Print catalog trial key +; + pushad + mov si, di + lodsd + PrintChar('k') + PrintHex() + lodsw + cmp ax, 0 + je .printExit + mov cx, ax +.printLoop: + lodsw + call print_char + loop .printLoop +.printExit: + popad +; +; +; +%endif ; UNUSED + +%if UNUSED +; +; Print extent trial key +; + pushad + PrintChar('k') + mov si, di + xor eax, eax + lodsw + PrintHex() + lodsd + PrintHex() + lodsd + PrintHex() + popad +; +; +; +%endif ; UNUSED + + pop si ; restore SI + call bx ; call key compare proc + popad + ret + +;-------------------------------------------------------------------------- +; readExtent - read extents from a HFS+ file (multiple extent support) +; +; Arguments: +; EAX = Catalog File ID +; BX = read size in sectors +; ECX = file offset in sectors +; EDX = address of read buffer +; DI = address of HFSPlusForkData.extents +; +readExtent: + pushad + ; + ; Save Catalog File ID as part of a search HFSPlusExtentKey + ; for a possible Extents Overflow lookup. + ; + mov [bp + BTree.searchExtentKey + HFSPlusExtentKey.fileID], eax + mov [bp + BTree.readBufferPtr], edx + mov ax, bx + cwde + mov [bp + BTree.readSize], eax + mov ebx, ecx ; EBX = file offset + xor eax, eax + mov [bp + BTree.currentExtentOffs], eax + +.beginExtentBlock: + mov BYTE [bp + BTree.extentCount], 0 + +.extentSearch: + cmp BYTE [bp + BTree.extentCount], kHFSPlusExtentDensity + jb .continue + +.getNextExtentBlock: + push ebx + mov eax, [bp + BTree.currentExtentOffs] + + ; + ; Converting sector unit to HFS+ allocation block unit. + ; + xor edx, edx + div DWORD [gBlockSize] ; divide with blockSize + + ; + ; Preparing searchExtentKey's startBlock field. + ; + mov [bp + BTree.searchExtentKey + HFSPlusExtentKey.startBlock], eax + + mov al, kHFSExtentsFileID + lea si, [bp + BTree.searchExtentKey] + lea di, [kHFSPlusBuffer + HFSPlusVolumeHeader.extentsFile + HFSPlusForkData.extents] + call lookUpBTree + jnz NEAR .exit + + ; + ; BP points to the new workspace allocated by lookUpBTree. + ; + lea di, [bp + BTree.recordDataPtr] + mov di, [di] + + ; + ; Switch back to the previous workspace. + ; + lea bp, [gMallocPtr] + mov bp, [bp] + mov [gMallocPtr], bp + + pop ebx + jmp .beginExtentBlock + +.continue: + mov edx, [di + HFSPlusExtentDescriptor.blockCount] + call blockToSector ; ECX = converted current extent's blockCount to sectors + mov eax, [bp + BTree.currentExtentOffs] ; EAX = current extent's start offset (sector) + mov edx, eax + add edx, ecx ; EDX = next extent's start offset (sector) + cmp ebx, edx + mov [bp + BTree.currentExtentOffs], edx ; set currentExtentOffs as the next extent's start offset + jae .nextExtent ; jump to next extent if file offset > next extent's start offset + +.foundExtent: + mov edx, ebx + sub edx, eax ; EDX = relative offset within current extent + mov eax, edx ; will be used below to determine read size + mov esi, [bp + BTree.readSize] ; ESI = remaining sectors to be read + add edx, esi + cmp edx, ecx ; test if relative offset + readSize fits to this extent + jbe .read ; read all remaining sectors from this extent + +.splitRead: + sub ecx, eax ; read amount of sectors beginning at relative offset + mov esi, ecx ; of current extent up to the end of current extent + +.read: + mov edx, [di + HFSPlusExtentDescriptor.startBlock] + call blockToSector ; ECX = converted to sectors + add ecx, eax ; file offset converted to sectors + + push si + mov ax, si + mov edx, [bp + BTree.readBufferPtr] + call readSectors + pop si + + add ebx, esi + mov ax, si + cwde + shl ax, 9 ; convert SI (read sector count) to byte unit + add [bp + BTree.readBufferPtr], eax + sub [bp + BTree.readSize], esi + + jz .exit + +.nextExtent: + add di, kHFSPlusExtentDensity + inc BYTE [bp + BTree.extentCount] + jmp .extentSearch + +.exit: + popad + ret + +;-------------------------------------------------------------------------- +; Convert big-endian HFSPlus allocation block to sector unit +; +; Arguments: +; EDX = allocation block +; +; Returns: +; ECX = allocation block converted to sector unit +; +; Clobber list: +; EDX +; +blockToSector: + push eax + mov eax, [gBlockSize] + bswap edx ; convert allocation block to little-endian + mul edx ; multiply with block number + mov ecx, eax ; result in EAX + pop eax + ret + +%if UNUSED + +;-------------------------------------------------------------------------- +; Convert sector unit to HFSPlus allocation block unit +; +; Arguments: +; EDX = sector +; +; Returns: +; ECX = converted to allocation block unit +; +; Clobber list: +; EDX +; +sectorToBlock: + push eax + mov eax, edx + xor edx, edx + div DWORD [gBlockSize] ; divide with blockSize + mov ecx, eax ; result in EAX + pop eax + ret + +%endif ; UNUSED + +%if UNUSED + +;-------------------------------------------------------------------------- +; Convert big-endian BTree node ID to sector unit +; +; Arguments: +; EDX = node ID +; +; Returns: +; ECX = node ID converted to sector unit +; +; Clobber list: +; EDX +; +nodeToSector: + push eax + mov ax, [bp + BTree.nodeSize] + shr ax, 9 ; convert nodeSize to sectors + cwde + bswap edx ; convert node ID to little-endian + mul edx ; multiply with node ID + mov ecx, eax ; result in EAX + pop eax + ret + +%endif ; UNUSED + +;-------------------------------------------------------------------------- +; Static data. +; + +%if VERBOSE +log_title_str db 'boot1: ', NULL +error_str db 'error', NULL +%endif + +searchCatalogKey dd kHFSRootFolderID + dw searchCatKeyNameLen +searchCatKeyName dw 'b', 'o', 'o', 't' ; must be lower case +searchCatKeyNameLen EQU ($ - searchCatKeyName) / 2 + +;-------------------------------------------------------------------------- +; Pad the rest of the 512 byte sized sector with zeroes. The last +; two bytes is the mandatory boot sector signature. +; + +; +; XXX - compilation errors with debug enabled +; Azi: boot1h.s:1452: error: TIMES value -64 is negative +; +pad_sector_1: + times 1022-($-$$) db 0 + dw kBootSignature + +; +; Local BTree variables +; + struc BTree +.mallocLink resw 1 ; pointer to previously allocated memory block +.fileID resd 1 ; will use as BYTE +.nodeSize resd 1 ; will use as WORD +.searchExtentKey resb HFSPlusExtentKey_size +.searchResult resb 1 +.trialKey resb kBTMaxRecordLength +.recordDataPtr resw 1 +.readBufferPtr resd 1 +.currentExtentOffs resd 1 +.readSize resd 1 +.extentCount resb 1 + ALIGNB 2 +.BTHeaderBuffer resb kSectorBytes +.nodeBuffer resb maxNodeSize + endstruc + +; +; Global variables +; + + ABSOLUTE kHFSPlusBuffer + HFSPlusVolumeHeader_size + +gPartLBA resd 1 +gBIOSDriveNumber resw 1 +gBlockSize resd 1 +gMallocPtr resw 1 + +; END From c8c4bd5ceb4192069173a598712d350c7f5da3b5 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 13 Jan 2015 16:55:38 +0100 Subject: [PATCH 505/623] Broadwell ULT support --- i386/libsaio/cpu/Intel/dynamic_data.h | 14 +++++++++++--- i386/libsaio/cpu/essentials.h | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index f25485b..3b8a7d7 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -363,6 +363,12 @@ void initCPUStruct(void) hiBit = 31; break; +// case CPU_MODEL_BROADWELL: + case CPU_MODEL_BROADWELL_ULT: + CoreBridgeType = BROADWELL; + hiBit = 31; + break; + case CPU_MODEL_NEHALEM: case CPU_MODEL_NEHALEM_EX: case CPU_MODEL_FIELDS: @@ -434,10 +440,12 @@ void initCPUStruct(void) // msr = rdmsr64(MSR_PKG_CST_CONFIG_CONTROL); // wrmsr64(MSR_MISC_PWR_MGMT, (msr & 0xFFFEFBFF)); - wrmsr64(MSR_PKG_POWER_LIMIT, 0x4283E800DD8230); + // wrmsr64(MSR_PKG_POWER_LIMIT, 0x4283E800DD8230); // wrmsr64(MSR_PP0_CURRENT_CONFIG, 0x40101414000002F8); - wrmsr64(MSR_PP0_POWER_LIMIT, 0); - wrmsr64(MSR_PP1_POWER_LIMIT, 0); + // wrmsr64(MSR_PP0_POWER_LIMIT, 0); + // wrmsr64(MSR_PP1_POWER_LIMIT, 0); + + // wrmsr64(MSR_TURBO_RATIO_LIMIT, 0x25252525); checkFlexRatioMSR(); } diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index a62543c..9507287 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -183,6 +183,8 @@ #define CPU_MODEL_HASWELL_ULT 0x45 #define CPU_MODEL_CRYSTALWELL 0x46 +#define CPU_MODEL_BROADWELL_ULT 0x3D + #define DALES_BRIDGE 1 #define SANDY_BRIDGE 2 #define IVY_BRIDGE 4 From 2b7975f604b10187f827bfac52d78e4de31b5c32 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Tue, 13 Jan 2015 16:59:02 +0100 Subject: [PATCH 506/623] Broadwell (ULT) support --- i386/libsaio/cpu/essentials.h | 1 + 1 file changed, 1 insertion(+) diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index 9507287..75ff4c5 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -189,5 +189,6 @@ #define SANDY_BRIDGE 2 #define IVY_BRIDGE 4 #define HASWELL 8 +#define BROADWELL 16 #endif /* !__LIBSAIO_CPU_ESSENTIALS_H */ From 31acc665c1e1f56a5cae75d78e3a820a02481ca0 Mon Sep 17 00:00:00 2001 From: Piker-Alpha <PikerAlpha@yahoo.com> Date: Mon, 19 Jan 2015 20:03:43 +0100 Subject: [PATCH 507/623] Project X - update 1 (Broadwell based computer running traffic light OS) --- i386/boot2/boot.c | 15 +- i386/boot2/boot.h | 16 +- i386/boot2/options.c | 2 +- i386/libsaio/cpu/Intel/dynamic_data.h | 2 +- i386/libsaio/efi/fake_efi.h | 7 - i386/libsaio/load.c | 4 +- i386/libsaio/platform.c | 1 + i386/libsaio/platform.h | 17 ++- i386/libsaio/xhci.h | 201 ++++++++++++++++++++++++++ 9 files changed, 232 insertions(+), 33 deletions(-) create mode 100755 i386/libsaio/xhci.h diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index fa12191..4ec8e12 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -58,10 +58,6 @@ #include "sl.h" #include "libsa.h" -// DHP: Dump all global junk a.s.a.p. - -long gBootMode = kBootModeQuiet; // no longer defaults to 0 aka kBootModeNormal - //============================================================================== // Local adler32 function. @@ -330,7 +326,7 @@ void boot(int biosdev) // Check for -x (safe) flag. if (getValueForBootKey(kernelFlags, kSafeModeFlag, &val, &length)) { - gBootMode = kBootModeSafe; + gPlatform.BootMode = kBootModeSafe; } // Check for -f (flush cache) flag. @@ -496,7 +492,7 @@ void boot(int biosdev) #endif if (getBoolForKey(kQuietBootKey, &quietBootMode, &bootInfo->bootConfig) && !quietBootMode) { - gBootMode = kBootModeNormal; // Reversed from: gBootMode |= kBootModeQuiet; + gPlatform.BootMode = kBootModeNormal; // Reversed from: gPlatform.BootMode |= kBootModeQuiet; } } @@ -519,10 +515,10 @@ void boot(int biosdev) _BOOT_DEBUG_SLEEP(5); */ #if PRE_LINKED_KERNEL_SUPPORT - _BOOT_DEBUG_DUMP("gBootMode = %d\n", gBootMode); + _BOOT_DEBUG_DUMP("gPlatform.BootMode = %d\n", gPlatform.BootMode); // Preliminary checks to prevent us from doing useless things. - mayUseKernelCache = ((flushCaches == false) && ((gBootMode & kBootModeSafe) == 0)); + mayUseKernelCache = ((flushCaches == false) && ((gPlatform.BootMode & kBootModeSafe) == 0)); _BOOT_DEBUG_DUMP("mayUseKernelCache = %s\n", mayUseKernelCache ? "true" : "false"); @@ -766,6 +762,9 @@ void boot(int biosdev) _BOOT_DEBUG_DUMP("execKernel-7 / gVerboseMode is %s\n", gVerboseMode ? "true" : "false"); +#if DISABLE_LEGACY_XHCI + disableLegacyXHCI(); +#endif // Did we switch to graphics mode yet (think verbose mode)? if (gVerboseMode || bootArgs->Video.v_display != GRAPHICS_MODE) { diff --git a/i386/boot2/boot.h b/i386/boot2/boot.h index 8bc41c5..836f562 100755 --- a/i386/boot2/boot.h +++ b/i386/boot2/boot.h @@ -34,6 +34,10 @@ #include "platform.h" +#if DISABLE_LEGACY_XHCI + #include "pci.h" + #include "xhci.h" +#endif #if USE_STATIC_DISPLAY_RESOLUTION #define DEFAULT_SCREEN_WIDTH STATIC_SCREEN_WIDTH @@ -88,20 +92,8 @@ #define kBootTimeout -1 -// A global set by boot() to record the device that the booter was loaded from. - -extern long gBootMode; extern char bootPrompt[]; -// Kernel Boot Modes -enum -{ - kBootModeNormal = 0, - kBootModeSafe = 1, - kBootModeSecure = 2, - kBootModeQuiet = 4 -}; - /* * Note well that we take an easier approice, and this should not be * confused with /chosen/boot-file-path because this is what we want. diff --git a/i386/boot2/options.c b/i386/boot2/options.c index 6cd692a..5cb0c1d 100755 --- a/i386/boot2/options.c +++ b/i386/boot2/options.c @@ -140,7 +140,7 @@ void getAndProcessBootArguments(char * configKernelFlags) // printf("And action...\n"); if (gBootArgsPtr + 3 < gBootArgsEnd) { - gBootMode = currentMode; + gPlatform.BootMode = currentMode; copyArgument(0, bootFlags[index], 3, &argP, &cntRemaining); } diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index 3b8a7d7..af6309e 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -420,7 +420,7 @@ void initCPUStruct(void) requestMaxTurbo(maxBusRatio); } - if (CoreBridgeType) // (SandyBridge || IvyBridge || Haswell) + if (CoreBridgeType) // (SandyBridge || IvyBridge || Haswell || Broadwell) { // gPlatform.CPU.Type += CoreBridgeType; diff --git a/i386/libsaio/efi/fake_efi.h b/i386/libsaio/efi/fake_efi.h index 87a988e..3a4f6ac 100755 --- a/i386/libsaio/efi/fake_efi.h +++ b/i386/libsaio/efi/fake_efi.h @@ -119,13 +119,6 @@ extern EFI_STATUS addConfigurationTable(EFI_GUID const *pGuid, void * table, cha { DT__AddProperty(tableNode, "alias", strlen(tableAlias) + 1, (char *)tableAlias); } - - if (strcmp(tableAlias, "ACPI_20") == 0) - { - Node *acpiTablesNode = DT__AddChild(tableNode, "ACPI Tables"); - - gPlatform.EFI.Nodes.ACPI_Tables = acpiTablesNode; - } gPlatform.EFI.SystemTable->NumberOfTableEntries++; } diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index d91d1aa..0f537bb 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -408,9 +408,9 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l { if (*(uint64_t *)baseAddress == OPTIONS_STRING_UINT64) { - // printf ("/option renamed to /RevoEFI!\n"); + // printf ("/options renamed to /RevoEFI!\n"); - // Rename /option to /RevoEFI (just temporarily) + // Rename /options to /RevoEFI (just temporarily) memcpy((unsigned char *)baseAddress, "/RevoEFI", 8); // Prepare to break out early. baseAddress = (unsigned char *)(sectionEnd + 1); diff --git a/i386/libsaio/platform.c b/i386/libsaio/platform.c index 20f76bd..aa95208 100644 --- a/i386/libsaio/platform.c +++ b/i386/libsaio/platform.c @@ -129,6 +129,7 @@ void initPlatform(int biosDevice, bool bootRecoveryHD) { memset(&gPlatform, 0, sizeof(gPlatform)); + gPlatform.BootMode = kBootModeQuiet; // no longer defaults to 0 aka kBootModeNormal gPlatform.BootRecoveryHD = bootRecoveryHD; // Copied from cpu/dynamic_data.h to make printf work this early on. diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index c3025bd..74be0bb 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -146,6 +146,17 @@ #define MAX_SLOTS STATIC_RAM_SLOTS // Defined in config/settings.h #endif +//============================================================================== +// Kernel boot modes (moved from boot.h) + +enum +{ + kBootModeNormal = 0, + kBootModeSafe = 1, + kBootModeSecure = 2, + kBootModeQuiet = 4 +}; + //============================================================================== typedef struct _RamSlotInfo_t @@ -195,7 +206,9 @@ typedef struct _PlatformInfo_t #endif int BIOSDevice; // Initialized in platform.c (formely know as gBIOSDev). - + + long BootMode; // Initialized in platform.c + BVRef BootVolume; // Initialized in disk.c BVRef BootPartitionChain; // Initialized in sys.c BVRef RootVolume; // Initialized in disk.c (used in sys.c). @@ -306,7 +319,7 @@ typedef struct _PlatformInfo_t // EFI specific stuff. Node * ConfigurationTable; // Path: /efi/configuration-table - Node * ACPI_Tables; // Path: /efi/configuration-table/ACPI Tables + // Node * ACPI_Tables; // Path: /efi/configuration-table/ACPI Tables Node * RuntimeServices; // Path: /efi/runtime-services Node * Platform; // Path: /efi/platform } Nodes; diff --git a/i386/libsaio/xhci.h b/i386/libsaio/xhci.h new file mode 100755 index 0000000..e12eb61 --- /dev/null +++ b/i386/libsaio/xhci.h @@ -0,0 +1,201 @@ +/* + * Copyright 2014 by Pike R. Alpha. All rights reserved. + */ + +#define BIT31 0x80000000 + +#define PCI_BUS_NUMBER 0x0 +#define XHCI_DEVICE_NUMBER 0x14 +#define XHCI_FUNCTION_NUMBER 0x0 +#define XHCI_ADDRESS (BIT31 | (PCI_BUS_NUMBER << 16) | (XHCI_DEVICE_NUMBER << 11) | (XHCI_FUNCTION_NUMBER << 8)) + +#define PCI_ADDR_REG 0xcf8 +#define PCI_DATA_REG 0xcfc + +#define XHCI_BASE_ADDRESS_REGISTER_0 0x10 +#define XHCI_BASE_ADDRESS_REGISTER_1 0x14 + +#define XHCI_BIOS_OWNED 0x1 +#define XHCI_OS_OWNED 0x100 + +#define XHCI_LEGACY_CONTROL_OFFSET 0x4 +#define XHCI_HCC_CAPABILITY_PARAMS_OFFSET 0x10 + +#define XHCI_LEGACY_DISABLE_SMI 0xE1FE0 +#define XHCI_LEGACY_SMI_EVENTS 0xE0000000 + +#define USB_LEGACY_SUPPORT_ID 0x1 + +/*------------------------------------------------------------------------------ + * Format of xHCI Extended Capability Pointer Register (see table 146). + *------------------------------------------------------------------------------ + * Bit 31:16 Capability Specific – RO. The definition and attributes of these + * bits depends on the specific capability. + *------------------------------------------------------------------------------ + * Bit 15:8 Next xHCI Extended Capability Pointer – RO. This field points to + * the xHCI MMIO space offset of the next xHCI extended capability + * pointer. A value of 00h indicates the end of the extended + * capability list. A non-zero value in this register indicates a + * relative offset, in Dwords, from this Dword to the beginning of + * the next extended capability. For example, assuming an effective + * address of this data structure is 350h and assuming a pointer + * value of 068h, we can calculate the following effective address: + * 350h + (068h << 2) -> 350h + 1A0h -> 4F0h + *------------------------------------------------------------------------------ + * Bit 7:0 Capability ID – RO. This field identifies the xHCI Extended + * capability. Refer to table 146 in specification for a list of + * the valid xHCI extended capabilities. + *------------------------------------------------------------------------------*/ + +typedef struct xHCI_ExtendedCapabilityPointer +{ + // USBLEGSUP - USB Legacy Support Capability Register + uint8_t ID; + uint8_t Next; + uint16_t Capabilities; + // USBLEGCTLSTS - USB Legacy Support Control and Status Register + uint32_t Value; +} XHCI_EXTENDED_CAPABILITY_POINTER; + + +//============================================================================== + +void disableLegacyXHCI(void) +{ + uint8_t timeout = 60; + + // Get 32-bit xHCI MMIO address (no 64-bit support for legacy boot loaders). + outl(PCI_ADDR_REG, (XHCI_ADDRESS + XHCI_BASE_ADDRESS_REGISTER_0)); + uint32_t addressBAR0 = inl(PCI_DATA_REG); // Example: 0xd3c00004 + + // Mask the lower bits to fix the MMIO BAR address (need 4KB page-alignment). + addressBAR0 &= 0xFFFFFFF0; // Example: 0xd3c00004 -> 0xd3c00000 + + // Read Host Controller Capability Parameters. + uint32_t hccparams = *(uint32_t const volatile*) (addressBAR0 + XHCI_HCC_CAPABILITY_PARAMS_OFFSET); + uint32_t extendedCapabilitiesPointer = (hccparams >> 16); // Example: 0x2000 + + _BOOT_DEBUG_DUMP("hccparams: 0x%x\n", hccparams); // Example: 0x200077c1 + _BOOT_DEBUG_DUMP("extendedCapabilitiesPointer: 0x%x\n", extendedCapabilitiesPointer); + + // Shift value (basically multiply it by 4). + extendedCapabilitiesPointer = (extendedCapabilitiesPointer << 2); // Example: (0x2000 << 2) = 0x8000 + XHCI_EXTENDED_CAPABILITY_POINTER * xHCI_ECP = (XHCI_EXTENDED_CAPABILITY_POINTER *) (addressBAR0 + extendedCapabilitiesPointer); + + while (xHCI_ECP->ID) // Main loop. + { + /*------------------------------------------------------------------------------ + * Format of USB Legacy Support Extended Capabilities (see table 146). + * Note: Be aware that the bits here are shifted to the right (data >> 16). + *------------------------------------------------------------------------------ + * Bit 15:9 Reserved. + *------------------------------------------------------------------------------ + * Bit 8 HC OS Owned Semaphore – RW. Default = ‘0’. System software sets + * this bit to request ownership of the xHCI. Ownership is obtained + * when this bit reads as ‘1’ and the HC BIOS Owned Semaphore bit + * reads as ‘0’. + *------------------------------------------------------------------------------ + * Bit 7:1 Reserved. + *------------------------------------------------------------------------------ + * Bit 0 HC BIOS Owned Semaphore – RW. Default = ‘0’. The BIOS sets this + * bit to establish ownership of the xHC. System BIOS will set this + * bit to a ‘0’ in response to a request for ownership of the xHCI + * by system software. + *------------------------------------------------------------------------------*/ + + _BOOT_DEBUG_DUMP("Capabilities: 0x%04x\n", xHCI_ECP->Capabilities); // 0x0200, 0x0300, 0x0001, 0x0000, 0x0001 + _BOOT_DEBUG_DUMP("Next........: 0x%02x\n", xHCI_ECP->Next); // 0x08, 0x08, 0x0c, 0xff, 0x00 + _BOOT_DEBUG_DUMP("ID..........: 0x%02x\n", xHCI_ECP->ID); // 0x02, 0x02, 0xc1, 0xc0, 0x01 + + if (xHCI_ECP->ID == USB_LEGACY_SUPPORT_ID) + { + _BOOT_DEBUG_DUMP ("XHCI legacy mode enabled in BIOS!\n"); + + if (xHCI_ECP->Capabilities & XHCI_BIOS_OWNED) + { + _BOOT_DEBUG_DUMP ("XHCI is owned by BIOS!\n"); + + while (timeout--) + { + // Signal the BIOS that the Bootloader/OS wants control. + xHCI_ECP->Capabilities |= XHCI_OS_OWNED; + delay(1); + + if ((xHCI_ECP->Capabilities & (XHCI_OS_OWNED | XHCI_BIOS_OWNED)) == XHCI_OS_OWNED) // Done? + { + _BOOT_DEBUG_DUMP("XHCI now owned by Bootloader/OS (attempts %d)!\n", (60 - timeout)); + break; + } + } + } + /*------------------------------------------------------------------------------ + * Bit 31 SMI on BAR – RW1C. Default = ‘0’. This bit is set to ‘1’ whenever + * the Base Address Register (BAR) is written. + *------------------------------------------------------------------------------ + * Bit 30 SMI on PCI Command – RW1C. Default = ‘0’. This bit is set to ‘1’ + * whenever the PCI Command Register is written. + *------------------------------------------------------------------------------ + * Bit 29 SMI on OS Ownership Change – RW1C. Default = ‘0’. This bit is set + * to ‘1’ whenever the HC OS Owned Semaphore bit in the USBLEGSUP + * register transitions from ‘1’ to a ‘0’ or ‘0’ to a ‘1’. + *------------------------------------------------------------------------------ + * Bit 28:21 Reserved. + *------------------------------------------------------------------------------ + * Bit 20 SMI on Host System Error – RO. Default = ‘0’. Shadow bit of Host + * System Error (HSE) bit in the USBSTS register refer to Section + * 5.4.2 for definition and effects of the events associated with + * this bit being set to ‘1’. To clear this bit to a ‘0’, system + * software shall write a ‘1’ to the Host System Error (HSE) bit in + * the USBSTS register. + *------------------------------------------------------------------------------ + * Bit 19:17 Reserved. + *------------------------------------------------------------------------------ + * Bit 16 SMI on Event Interrupt – RO. Default = ‘0’. Shadow bit of Event + * Interrupt (EINT) bit in the USBSTS register. Refer to Section + * 5.4.2 for definition. This bit follows the state the Event + * Interrupt (EINT) bit in the USBSTS register, e.g. it automatically + * clears when EINT clears or set when EINT is set. + *------------------------------------------------------------------------------ + * Bit 15 SMI on BAR Enable – RW. Default = ‘0’. When this bit is ‘1’ and + * SMI on BAR is ‘1’, then the host controller will issue an SMI. + *------------------------------------------------------------------------------ + * Bit 14 SMI on PCI Command Enable – RW. Default = ‘0’. When this bit is + * ‘1’ and SMI on PCI Command is ‘1’, then the host controller will + * issue an SMI. + *------------------------------------------------------------------------------ + * Bit 13 SMI on OS Ownership Enable – RW. Default = ‘0’. When this bit is + * a ‘1’ AND the OS Ownership Change bit is ‘1’, the host controller + * will issue an SMI. + *------------------------------------------------------------------------------ + * Bit 12:5 Reserved. + *------------------------------------------------------------------------------ + * Bit 4 SMI on Host System Error Enable – RW. Default = ‘0’. When this + * bit is a ‘1’, and the SMI on Host System Error bit (below) in + * this register is a ‘1’, the host controller will issue an SMI + * immediately. + *------------------------------------------------------------------------------ + * Bit 3:1 Reserved. + *------------------------------------------------------------------------------ + * Bit 0 USB SMI Enable – RW. Default = ‘0’. When this bit is a ‘1’, and + * the SMI on Event Interrupt bit (below) in this register is a ‘1’, + * the host controller will issue an SMI immediately. + *------------------------------------------------------------------------------*/ + + _BOOT_DEBUG_DUMP("Before fix: 0x%x\n", xHCI_ECP->Value); // 0x00002000 (bit 13) + + xHCI_ECP->Value &= XHCI_LEGACY_DISABLE_SMI; + xHCI_ECP->Value |= XHCI_LEGACY_SMI_EVENTS; + + _BOOT_DEBUG_DUMP("After fix: 0x%x\n", xHCI_ECP->Value); // 0xe0000000 (bit 31:29) + break; + } + else + { + // Get next xHCI Extended Capabilities Structure. + extendedCapabilitiesPointer += (xHCI_ECP->Next << 2); + xHCI_ECP = (XHCI_EXTENDED_CAPABILITY_POINTER *) (addressBAR0 + extendedCapabilitiesPointer); + } + }; + + _BOOT_DEBUG_SLEEP(5); +} From 066d89cfe576d2f871fd200abecec9e38dd31c05 Mon Sep 17 00:00:00 2001 From: Chief <chief@Mac-mini.local> Date: Sat, 31 Jan 2015 10:30:10 +0100 Subject: [PATCH 508/623] Removing unused function - improved Yosemite compatibility. --- i386/libsa/strtol.c | 8 -------- i386/libsaio/vbe.c | 35 ----------------------------------- 2 files changed, 43 deletions(-) diff --git a/i386/libsa/strtol.c b/i386/libsa/strtol.c index f6c724f..e321a21 100755 --- a/i386/libsa/strtol.c +++ b/i386/libsa/strtol.c @@ -95,14 +95,6 @@ static inline int isupper(char c) } -//========================================================================== - -static inline int islower(char c) -{ - return (c >= 'a' && c <= 'z'); -} - - //========================================================================== static inline int isalpha(char c) diff --git a/i386/libsaio/vbe.c b/i386/libsaio/vbe.c index 0334610..412e3bf 100755 --- a/i386/libsaio/vbe.c +++ b/i386/libsaio/vbe.c @@ -34,41 +34,6 @@ static biosBuf_t bb; -//============================================================================== - -static inline void outi(int port, int index, int val) -{ - outw (port, (val << 8) | index); -} - - -//============================================================================== - -static inline void outib(int port, int index, int val) -{ - outb (port, index); - outb (port + 1, val); -} - - -//============================================================================== - -static inline int ini(int port, int index) -{ - outb (port, index); - return inb (port + 1); -} - - -//============================================================================== - -static inline void rmwi(int port, int index, int clear, int set) -{ - outb (port, index); - outb (port + 1, (inb (port + 1) & ~clear) | set); -} - - //============================================================================== int getVBEInfo(void * infoBlock) From 41132da0d951b151d1fd00addf4025bf88bd71a6 Mon Sep 17 00:00:00 2001 From: Chief <chief@Mac-mini.local> Date: Sat, 31 Jan 2015 10:41:08 +0100 Subject: [PATCH 509/623] Adding new feature - to patch the GNVS address. --- i386/libsaio/acpi/patcher.h | 61 +++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/i386/libsaio/acpi/patcher.h b/i386/libsaio/acpi/patcher.h index 8610c4a..16ca822 100644 --- a/i386/libsaio/acpi/patcher.h +++ b/i386/libsaio/acpi/patcher.h @@ -21,6 +21,29 @@ #endif +#if VERIFY_OPREGION_GNVS_ADDRESS +//============================================================================== + +unsigned int search64bitPattern(unsigned int aStartAddress, int aNumberOfBytes, uint64_t aSearchPattern) +{ + unsigned char * baseAddress = (unsigned char *) aStartAddress; + unsigned char * endAddress = (baseAddress + aNumberOfBytes); + + for (; baseAddress <= endAddress; baseAddress++) + { + if (*(uint64_t *)baseAddress == aSearchPattern) + { + _ACPI_DEBUG_DUMP("GNVS Address Found @ 0x%x\n", baseAddress); + + return (unsigned int)baseAddress; // Found! + } + } + + return 0; // Not found! +} +#endif // VERIFY_OPREGION_GNVS_ADDRESS + + #if (LOAD_EXTRA_ACPI_TABLES && (LOAD_DSDT_TABLE_FROM_EXTRA_ACPI || LOAD_SSDT_TABLE_FROM_EXTRA_ACPI)) //============================================================================== @@ -257,6 +280,44 @@ bool patchFACPTable(ENTRIES * xsdtEntries, int tableIndex, int dropOffset) overrideACPIMethods(patchedFADT); #elif STATIC_DSDT_TABLE_INJECTION || (LOAD_EXTRA_ACPI_TABLES && LOAD_DSDT_TABLE_FROM_EXTRA_ACPI) patchedFADT->DSDT = (uint32_t)customTables[DSDT].tableAddress; // The original DSDT without DSDT table injection! + +#if VERIFY_OPREGION_GNVS_ADDRESS + #define OP_REGION_GNVS_ADDRESS_LE 0x0C0053564E47805B + // First try to locate the OperationRegion (GNVS, SystemMemory, 0xNNNNNNNN, 0xNNNN) in the factory DSDT. + unsigned int opRegFactoryDSDTAddress = search64bitPattern(factoryFADT->DSDT + sizeof(ACPI_DSDT), 2000, OP_REGION_GNVS_ADDRESS_LE); + + if (opRegFactoryDSDTAddress) // Found? + { + // Yes. Get the GNVS address. + unsigned int factoryDSDT_GNVS_Address = (*(uint32_t *)(opRegFactoryDSDTAddress + 8)); + + _ACPI_DEBUG_DUMP("GNVS address (0x%x) found @: 0x%x\n", factoryDSDT_GNVS_Address, opRegFactoryDSDTAddress); + + // Now try to locate the OperationRegion (GNVS, SystemMemory, 0xNNNNNNNN, 0xNNNN) in the patched DSDT. + unsigned int opRegPatchedDSDTAddress = search64bitPattern(patchedFADT->DSDT + sizeof(ACPI_DSDT), 2000, OP_REGION_GNVS_ADDRESS_LE); + + if (opRegPatchedDSDTAddress) // Found? + { + // Yes. Get the GNVS address. + unsigned int patchedDSDT_GNVS_Address = (*(uint32_t *)(opRegPatchedDSDTAddress + 8)); + + _ACPI_DEBUG_DUMP("GNVS address (0x%x) found @: 0x%08x\n", patchedDSDT_GNVS_Address, opRegPatchedDSDTAddress); + + // Are both GNVS address values the same? + if (patchedDSDT_GNVS_Address != factoryDSDT_GNVS_Address) + { + _ACPI_DEBUG_DUMP("Patching GNVS address ... "); + // Copy the 4 address bytes from the factory DSDT into the patched DSDT. + // Note: We do not copy the length (may be different for a patched DSDT). + memcpy((void *)opRegPatchedDSDTAddress, (void *)opRegFactoryDSDTAddress, 4); + + _ACPI_DEBUG_DUMP("Done.\n"); + } + } + + _ACPI_DEBUG_SLEEP(1); + } +#endif // VERIFY_OPREGION_GNVS_ADDRESS _ACPI_DEBUG_DUMP("Replacing factory DSDT with "); From 0e843a8f2de09882ba4963d6de28abac31eb3fcb Mon Sep 17 00:00:00 2001 From: Chief <PikeRAlpha@yahoo.com> Date: Sat, 31 Jan 2015 10:47:46 +0100 Subject: [PATCH 510/623] Mandatory change for testers --- i386/libsaio/acpi/patcher.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/acpi/patcher.h b/i386/libsaio/acpi/patcher.h index 16ca822..6db8895 100644 --- a/i386/libsaio/acpi/patcher.h +++ b/i386/libsaio/acpi/patcher.h @@ -21,7 +21,7 @@ #endif -#if VERIFY_OPREGION_GNVS_ADDRESS +// #if VERIFY_OPREGION_GNVS_ADDRESS //============================================================================== unsigned int search64bitPattern(unsigned int aStartAddress, int aNumberOfBytes, uint64_t aSearchPattern) @@ -41,7 +41,7 @@ unsigned int search64bitPattern(unsigned int aStartAddress, int aNumberOfBytes, return 0; // Not found! } -#endif // VERIFY_OPREGION_GNVS_ADDRESS +// #endif // VERIFY_OPREGION_GNVS_ADDRESS #if (LOAD_EXTRA_ACPI_TABLES && (LOAD_DSDT_TABLE_FROM_EXTRA_ACPI || LOAD_SSDT_TABLE_FROM_EXTRA_ACPI)) @@ -281,7 +281,7 @@ bool patchFACPTable(ENTRIES * xsdtEntries, int tableIndex, int dropOffset) #elif STATIC_DSDT_TABLE_INJECTION || (LOAD_EXTRA_ACPI_TABLES && LOAD_DSDT_TABLE_FROM_EXTRA_ACPI) patchedFADT->DSDT = (uint32_t)customTables[DSDT].tableAddress; // The original DSDT without DSDT table injection! -#if VERIFY_OPREGION_GNVS_ADDRESS +// #if VERIFY_OPREGION_GNVS_ADDRESS #define OP_REGION_GNVS_ADDRESS_LE 0x0C0053564E47805B // First try to locate the OperationRegion (GNVS, SystemMemory, 0xNNNNNNNN, 0xNNNN) in the factory DSDT. unsigned int opRegFactoryDSDTAddress = search64bitPattern(factoryFADT->DSDT + sizeof(ACPI_DSDT), 2000, OP_REGION_GNVS_ADDRESS_LE); @@ -317,7 +317,7 @@ bool patchFACPTable(ENTRIES * xsdtEntries, int tableIndex, int dropOffset) _ACPI_DEBUG_SLEEP(1); } -#endif // VERIFY_OPREGION_GNVS_ADDRESS +// #endif // VERIFY_OPREGION_GNVS_ADDRESS _ACPI_DEBUG_DUMP("Replacing factory DSDT with "); From a5886d296d9a18359ee901429cb3d2e6000d4903 Mon Sep 17 00:00:00 2001 From: Chief <PikeRAlpha@yahoo.com> Date: Tue, 10 Mar 2015 18:56:39 +0100 Subject: [PATCH 511/623] New MacBook Air/MacBook Pro data added --- i386/libsaio/platform.h | 7 +++++-- i386/libsaio/smbios/model_data.h | 24 +++++++++++++++++++++--- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 74be0bb..83827fc 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -83,7 +83,9 @@ #define MACBOOK_AIR_51 (MACBOOK_AIR | (3 << 15)) #define MACBOOK_AIR_52 (MACBOOK_AIR | (4 << 15)) #define MACBOOK_AIR_61 (MACBOOK_AIR | (5 << 15)) -#define MACBOOK_AIR_62 MACBOOK_AIR // Defaults to MacBookAir6,2 +#define MACBOOK_AIR_62 (MACBOOK_AIR | (6 << 15)) +#define MACBOOK_AIR_71 (MACBOOK_AIR | (7 << 15)) +#define MACBOOK_AIR_72 MACBOOK_AIR // Defaults to MacBookAir7,2 #define MACBOOK_PRO_61 (MACBOOK_PRO | ( 1 << 15)) #define MACBOOK_PRO_81 (MACBOOK_PRO | ( 2 << 15)) @@ -95,7 +97,8 @@ #define MACBOOK_PRO_102 (MACBOOK_PRO | ( 8 << 15)) #define MACBOOK_PRO_111 (MACBOOK_PRO | ( 9 << 15)) #define MACBOOK_PRO_112 (MACBOOK_PRO | (10 << 15)) -#define MACBOOK_PRO_113 MACBOOK_PRO // Defaults to MacBookPro11,3 +#define MACBOOK_PRO_113 (MACBOOK_PRO | (11 << 15)) +#define MACBOOK_PRO_121 MACBOOK_PRO // Defaults to MacBookPro12,1 #define MACMINI_41 (MACMINI | (1 << 15)) #define MACMINI_51 (MACMINI | (2 << 15)) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 105d94b..d32a811 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -133,13 +133,25 @@ #define SMB_PRODUCT_NAME "MacBookAir6,1" #define SMB_BOARD_PRODUCT "Mac-35C1E88140C3E6CF" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '6', ',', '1' } - #else // Defaults to MacBookAir6,2 + #elif (TARGET_MODEL == MACBOOK_AIR_62) // Intel Core i5-4250U @ 1.30 GHz (2 cores - 4 threads) // Intel Core i7-4650U @ 1.70 GHz (2 cores - 4 threads) #define SMB_BIOS_VERSION "MBA61.88Z.0099.B12.1405241030" #define SMB_PRODUCT_NAME "MacBookAir6,2" #define SMB_BOARD_PRODUCT "Mac-7DF21CB3ED6977E5" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '6', ',', '2' } + #elif (TARGET_MODEL == MACBOOK_AIR_71) + // Intel Core i5-5250U @ 1.60 GHz (2 cores - 4 threads) + #define SMB_BIOS_VERSION "MBA71.88Z.0166.B00.1502131457" + #define SMB_PRODUCT_NAME "MacBookAir7,1" + #define SMB_BOARD_PRODUCT "Mac-9F18E312C5C2BF0B" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '7', ',', '1' } + #else // Defaults to MacBookAir7,2 + // Intel Core i5-5250U @ 1.60 GHz (2 cores - 4 threads) + #define SMB_BIOS_VERSION "MBA71.88Z.0166.B00.1502131457" + #define SMB_PRODUCT_NAME "MacBookAir7,2" + #define SMB_BOARD_PRODUCT "Mac-937CB26E2E02BB01" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '7', ',', '2' } #endif // ------------------------------------------------------------------------------------- #endif @@ -211,13 +223,19 @@ #define SMB_PRODUCT_NAME "MacBookPro11,2" #define SMB_BOARD_PRODUCT "Mac-3CBD00234E554E41" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '1', ',', '2' } - #else + #elif (TARGET_MODEL == MACBOOK_PRO_113) // Intel Core i7-4850HQ @ 2.30 GHz - 4 cores / 8 threads. // Intel Core i7-4960HQ @ 2.60 GHz - 4 cores / 8 threads. #define SMB_BIOS_VERSION "MBP112.88Z.0138.B08.1406081756" #define SMB_PRODUCT_NAME "MacBookPro11,3" #define SMB_BOARD_PRODUCT "Mac-2BD1B31983FE1663" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '1', ',', '3' } + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '2', ',', '1' } + #else + // Intel Core i5-5257U @ 2.70 GHz - 2 cores / 4 threads. + #define SMB_BIOS_VERSION "MBP121.88Z.0167.B00.1502132146" + #define SMB_PRODUCT_NAME "MacBookPro12,1" + #define SMB_BOARD_PRODUCT "Mac-E43C1C25D4880AD6" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '2', ',', '1' } #endif // ------------------------------------------------------------------------------------- #endif From a91dc5c6d80bdde2e8da79b3284a48d8f7624a48 Mon Sep 17 00:00:00 2001 From: Chief <PikeRAlpha@yahoo.com> Date: Fri, 19 Jun 2015 14:50:43 +0200 Subject: [PATCH 512/623] Comment only change --- i386/libsa/zalloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/libsa/zalloc.c b/i386/libsa/zalloc.c index f9f4a92..70afdd2 100755 --- a/i386/libsa/zalloc.c +++ b/i386/libsa/zalloc.c @@ -66,7 +66,8 @@ static void zcoalesce(void); size_t zalloced_size; #endif -#define ZALLOC_NODES 32767 /* was 16384 */ +#define ZALLOC_NODES 32767 /* This was 16384 */ + #if SAFE_MALLOC static void mallocError(char *addr, size_t size, const char *file, int line) From 9eb0ffb83578aba5c52b81ec2b784eade01188b9 Mon Sep 17 00:00:00 2001 From: Chief <PikeRAlpha@yahoo.com> Date: Fri, 19 Jun 2015 14:50:58 +0200 Subject: [PATCH 513/623] Typo --- i386/boot1/boot1h.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/boot1/boot1h.s b/i386/boot1/boot1h.s index 8932b86..2676767 100644 --- a/i386/boot1/boot1h.s +++ b/i386/boot1/boot1h.s @@ -29,7 +29,7 @@ ; This version requires a BIOS with EBIOS (LBA) support. ; ; This code is written for the NASM assembler. -; nasm boot1.s -o boot1h +; nasm boot1h.s -o boot1h ; ; This version of boot1h tries to find a stage2 boot file in the root folder. From 5774ac87599a7592562cefd3da41c492c745be38 Mon Sep 17 00:00:00 2001 From: Chief <PikeRAlpha@yahoo.com> Date: Fri, 19 Jun 2015 14:51:38 +0200 Subject: [PATCH 514/623] Additional MacBook data --- i386/libsaio/smbios/model_data.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index d32a811..92823c8 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -100,10 +100,18 @@ // ------------------------------------------------------------------------------------- #define SMB_FAMILY "MacBook" - #define SMB_BIOS_VERSION "MB41.88Z.0073.B00.0809221748" - #define SMB_PRODUCT_NAME "MacBook4,1" - #define SMB_BOARD_PRODUCT "Mac-F42D89C8" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', '4', ',', '1' } + #if (TARGET_MODEL == MACBOOK_41) + #define SMB_BIOS_VERSION "MB41.88Z.0073.B00.0809221748" + #define SMB_PRODUCT_NAME "MacBook4,1" + #define SMB_BOARD_PRODUCT "Mac-F42D89C8" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', '4', ',', '1' } + #elif (TARGET_MODEL == MACBOOK_81) + // Intel Core M-5Y31 @ 1.10 GHz (2 cores, 4 threads) + #define SMB_BIOS_VERSION "MB81.88Z.0164.B02.1503241252" + #define SMB_PRODUCT_NAME "MacBook8,1" + #define SMB_BOARD_PRODUCT "Mac-BE0E8AC46FE800CC" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', '8', ',', '1' } + #endif // ------------------------------------------------------------------------------------- #endif @@ -148,6 +156,7 @@ #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '7', ',', '1' } #else // Defaults to MacBookAir7,2 // Intel Core i5-5250U @ 1.60 GHz (2 cores - 4 threads) + // Intel Core i7-5650U @ 2.20 GHz (2 cores - 4 threads) #define SMB_BIOS_VERSION "MBA71.88Z.0166.B00.1502131457" #define SMB_PRODUCT_NAME "MacBookAir7,2" #define SMB_BOARD_PRODUCT "Mac-937CB26E2E02BB01" From a840236f598e4f7bd2a6d5c5f53412b919c8aa33 Mon Sep 17 00:00:00 2001 From: Chief <PikeRAlpha@yahoo.com> Date: Fri, 19 Jun 2015 14:52:33 +0200 Subject: [PATCH 515/623] Moving two include files --- i386/boot2/boot.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/i386/boot2/boot.h b/i386/boot2/boot.h index 836f562..a09b6da 100755 --- a/i386/boot2/boot.h +++ b/i386/boot2/boot.h @@ -34,11 +34,6 @@ #include "platform.h" -#if DISABLE_LEGACY_XHCI - #include "pci.h" - #include "xhci.h" -#endif - #if USE_STATIC_DISPLAY_RESOLUTION #define DEFAULT_SCREEN_WIDTH STATIC_SCREEN_WIDTH #define DEFAULT_SCREEN_HEIGHT STATIC_SCREEN_HEIGHT From 030f63ecb8acb6060ae2f55740c31e131b48b45e Mon Sep 17 00:00:00 2001 From: Chief <PikeRAlpha@yahoo.com> Date: Fri, 19 Jun 2015 14:54:12 +0200 Subject: [PATCH 516/623] Adding support for El Capitan --- Makefile | 17 +++++--- i386/boot2/boot.c | 22 ++++++---- i386/boot2/bootlogo.h | 2 +- i386/boot2/drivers.c | 7 ++-- i386/libsaio/asm.s | 6 +-- i386/libsaio/bootstruct.c | 24 ++++++++--- i386/libsaio/bootstruct.h | 86 +++++++++++++++++++++++++++++++-------- i386/libsaio/efi.c | 6 +-- i386/libsaio/platform.h | 13 +++--- 9 files changed, 131 insertions(+), 52 deletions(-) diff --git a/Makefile b/Makefile index 5826971..be71745 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ # - Cleanups and output changed (Pike R. Alpha, November 2012). # - Yosemite support added (Pike R. Alpha, June 2014). # - Changed default from Mavericks to Yosemite (Pike R. Alpha, June 2014). +# - El Capitan support added (Pike R. Alpha, June 2015). # # @@ -54,16 +55,20 @@ VPATH = $(OBJROOT):$(SYMROOT) ifeq ($(MAKECMDGOALS),) # - # No OS build target given. Build for Yosemite (default). + # No OS build target given. Build for El Capitan (default). # - MAKEGOAL = yosemite - MAKE_TARGET_OS = 26; - MAKE_TARGET_OS_VER = 10.10 + MAKEGOAL = el-capitan + MAKE_TARGET_OS = 62; + MAKE_TARGET_OS_VER = 10.11 else # # Setting MAKE_TARGET_OS and MAKEGOAL based on OS build target. # - ifeq ($(MAKECMDGOALS), yosemite) + ifeq ($(MAKECMDGOALS), el-capitan) + MAKEGOAL = el-capitan + MAKE_TARGET_OS = 62; + MAKE_TARGET_OS_VER = 10.11 + else ifeq ($(MAKECMDGOALS), yosemite) MAKEGOAL = yosemite MAKE_TARGET_OS = 26; MAKE_TARGET_OS_VER = 10.10 @@ -87,7 +92,7 @@ else endif # -# Export our make goal i.e. yosemite, mavericks, mountain-lion, lion or legacy (snow-leopard or leopard). +# Export our make goal i.e. El Capitan, Yosemite, Mavericks, Mountain Lion, Lion or legacy (Snow Leopard or Leopard). # export MAKEGOAL diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 4ec8e12..2155e68 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -58,6 +58,11 @@ #include "sl.h" #include "libsa.h" +#if DISABLE_LEGACY_XHCI + #include "pci.h" + #include "xhci.h" +#endif + //============================================================================== // Local adler32 function. @@ -316,12 +321,13 @@ void boot(int biosdev) gVerboseMode = getValueForBootKey(kernelFlags, kVerboseModeFlag, &val, &length) || getValueForBootKey(kernelFlags, kSingleUserModeFlag, &val, &length); - /* if (gVerboseMode) + if (gVerboseMode) { + _BOOT_DEBUG_DUMP("Notice: -s (single user mode) and/or -v (verbose mode) specified!\n"); #if (DEBUG_BOOT == false) setVideoMode(VGA_TEXT_MODE); #endif - } */ + } // Check for -x (safe) flag. if (getValueForBootKey(kernelFlags, kSafeModeFlag, &val, &length)) @@ -456,11 +462,11 @@ void boot(int biosdev) * We cannot use the kernelcache from the Yosemite installer, not yet, * and thus we load: /System/Library/Caches/Startup/kernelcache instead */ -#if (MAKE_TARGET_OS == YOSEMITE) +#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan. // Installation directory located? if (flushCaches == false) // && (gPlatform.BootVolume->flags != kBVFlagInstallVolume)) { -#endif // #if (MAKE_TARGET_OS == YOSEMITE) +#endif // #if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) _BOOT_DEBUG_DUMP("Checking Kernel Cache key in com.apple.Boot.plist\n"); if (getValueForKey(kKernelCacheKey, &val, &length, &bootInfo->bootConfig)) @@ -485,9 +491,9 @@ void boot(int biosdev) gPlatform.KernelCacheSpecified = true; } } -#if (MAKE_TARGET_OS == YOSEMITE) +#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan. } -#endif // #if (MAKE_TARGET_OS == YOSEMITE) +#endif // #if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) #endif if (getBoolForKey(kQuietBootKey, &quietBootMode, &bootInfo->bootConfig) && !quietBootMode) @@ -540,7 +546,7 @@ void boot(int biosdev) { sprintf(bootFile, "%s", bootInfo->bootFile); } */ -#if (MAKE_TARGET_OS == YOSEMITE) +#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan. // else // { sprintf(bootFile, "/System/Library/Kernels/%s", bootInfo->bootFile); @@ -592,7 +598,7 @@ void boot(int biosdev) _BOOT_DEBUG_DUMP("adler32: %08X\n", adler32); -#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set (like Lion). +#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set (like Lion). _BOOT_DEBUG_DUMP("Checking for kernelcache...\n"); diff --git a/i386/boot2/bootlogo.h b/i386/boot2/bootlogo.h index 2fb9b65..00a96b4 100755 --- a/i386/boot2/bootlogo.h +++ b/i386/boot2/bootlogo.h @@ -18,7 +18,7 @@ #define MAX(x, y) ((x) > (y) ? (x) : (y)) -#if ((MAKE_TARGET_OS == YOSEMITE) && (BLACKMODE == 1)) +#if (((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) && (BLACKMODE == 1)) // // LZVN packed data for white Apple logo (blackmode). diff --git a/i386/boot2/drivers.c b/i386/boot2/drivers.c index 5df6cbc..ae5c409 100755 --- a/i386/boot2/drivers.c +++ b/i386/boot2/drivers.c @@ -199,7 +199,7 @@ long loadDrivers(char * dirSpec) if ((gKextLoadStatus & 1) == 0) { -#if ((MAKE_TARGET_OS & MAVERICKS) == MAVERICKS) // Mavericks and Yosemite specifics. +#if ((MAKE_TARGET_OS & MAVERICKS) == MAVERICKS) // Mavericks, Yosemite and El Capitan specifics. _DRIVERS_DEBUG_DUMP("\nCalling loadKexts(\"/Library/Extensions\");\n"); /* For Mavericks we first load the signed kexts. @@ -626,6 +626,7 @@ static long loadMatchedModules(void) AllocateMemoryRange(segName, driverAddr, driverLength); } } + module = module->nextModule; } @@ -914,7 +915,7 @@ long decodeKernel(void *fileLoadBuffer, entry_t *rentry, char **raddr, int *rsiz if (kernel_header->signature == OSSwapBigToHostConstInt32('comp')) { if (kernel_header->compressType != OSSwapBigToHostConstInt32('lzss') -#if (MAKE_TARGET_OS == YOSEMITE) +#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan && kernel_header->compressType != OSSwapBigToHostConstInt32('lzvn') #endif ) @@ -939,7 +940,7 @@ long decodeKernel(void *fileLoadBuffer, entry_t *rentry, char **raddr, int *rsiz uncompressedSize = OSSwapBigToHostInt32(kernel_header->uncompressedSize); fileLoadBuffer = malloc(uncompressedSize); -#if (MAKE_TARGET_OS == YOSEMITE) +#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan if (kernel_header->compressType == OSSwapBigToHostConstInt32('lzvn')) { void *tmpBuffer = malloc(uncompressedSize); diff --git a/i386/libsaio/asm.s b/i386/libsaio/asm.s index e8c312b..cc6e08d 100755 --- a/i386/libsaio/asm.s +++ b/i386/libsaio/asm.s @@ -334,7 +334,7 @@ LABEL(_halt) call _bgetc jmp _halt -#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks, Mountain Lion and Lion +#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks, Mountain Lion and Lion // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // disableIRQs() // @@ -368,7 +368,7 @@ LABEL(_disableIRQs) // Passes boot arguments in %eax. // LABEL(_startMachKernel) -#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks, Lion and Mountain Lion +#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks, Lion and Mountain Lion call _disableIRQs // Taking care of an early reboot bug. #endif push %ebp @@ -428,7 +428,7 @@ LABEL(__switch_stack) ret -#if (MAKE_TARGET_OS == YOSEMITE) +#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // computeRand() // diff --git a/i386/libsaio/bootstruct.c b/i386/libsaio/bootstruct.c index e4fb55b..744a55b 100755 --- a/i386/libsaio/bootstruct.c +++ b/i386/libsaio/bootstruct.c @@ -88,12 +88,12 @@ void initKernelBootConfig(void) // EFI selection is based on the CPU type. bootArgs->efiMode = (gPlatform.ArchCPUType == CPU_TYPE_X86_64) ? kBootArgsEfiMode64 : kBootArgsEfiMode32; -#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. // Lion's new debug output (replacing a couple of former boot arguments). bootArgs->debugMode = EFI_DEBUG_MODE; // Defined in config/settings.h #endif -#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. // Adding a 16 KB log space. bootArgs->performanceDataSize = 0; bootArgs->performanceDataStart = 0; @@ -104,6 +104,8 @@ void initKernelBootConfig(void) bootArgs->bootMemSize = 0; bootArgs->bootMemStart = 0; + +#if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) bootArgs->flags = 0; #if REBOOT_ON_PANIC @@ -118,8 +120,17 @@ void initKernelBootConfig(void) bootArgs->flags |= kBootArgsFlagBlackTheme; // (kBootArgsFlagBlack + kBootArgsFlagBlackTheme); #endif - bootArgs->kslide = 0; +#endif // #if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) + +#if ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN) + bootArgs->flags |= (kBootArgsFlagCSRBoot + kBootArgsFlagCSRActiveConfig + kBootArgsFlagCSRConfigMode); + + bootArgs->csrActiveConfig = CSR_VALID_FLAGS; + bootArgs->csrCapabilities = (kBootArgsFlagCSRBoot + kBootArgsFlagLoginUI + kBootArgsFlagInstallUI); #endif + + bootArgs->kslide = 0; +#endif // #if ((MAKE_TARGET_OS & LION) == LION) } @@ -200,7 +211,7 @@ void finalizeKernelBootConfig(void) bootArgs->deviceTreeP = (uint32_t)addr; bootArgs->deviceTreeLength = size; -/* #if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. +/* #if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. // Adding a 16 KB log space. bootArgs->performanceDataSize = 0; bootArgs->performanceDataStart = 0; @@ -216,8 +227,9 @@ void finalizeKernelBootConfig(void) bootArgs->kslide = 0; #endif */ -#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. - bootArgs->FSBFrequency = gPlatform.CPU.FSBFrequency; +#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. + bootArgs->PhysicalMemorySize = (1024 * 1024 * 1024); + bootArgs->FSBFrequency = gPlatform.CPU.FSBFrequency; #endif } diff --git a/i386/libsaio/bootstruct.h b/i386/libsaio/bootstruct.h index abc1864..479bd14 100755 --- a/i386/libsaio/bootstruct.h +++ b/i386/libsaio/bootstruct.h @@ -20,6 +20,11 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ + * + * Updates: + * + * - Yosemite support added (Pike R. Alpha, June 2014). + * - El Capitan support added (Pike R. Alpha, June 2015). */ #ifndef __BOOTSTRUCT_H @@ -30,7 +35,7 @@ #include "bios.h" #include "platform.h" -#if (MAKE_TARGET_OS == YOSEMITE) +#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // El Capitan and Yosemite #define kDefaultKernel "kernel" #else #define kDefaultKernel "mach_kernel" @@ -38,19 +43,60 @@ // Bitfields for boot_args->flags #ifndef kBootArgsFlagRebootOnPanic - #define kBootArgsFlagRebootOnPanic (1 << 0) + #define kBootArgsFlagRebootOnPanic (1 << 0) #endif #ifndef kBootArgsFlagHiDPI - #define kBootArgsFlagHiDPI (1 << 1) + #define kBootArgsFlagHiDPI (1 << 1) #endif #ifndef kBootArgsFlagBlack - #define kBootArgsFlagBlack (1 << 2) + #define kBootArgsFlagBlack (1 << 2) #endif +#ifndef kBootArgsFlagCSRActiveConfig + #define kBootArgsFlagCSRActiveConfig (1 << 3) +#endif + +#ifndef kBootArgsFlagCSRConfigMode + #define kBootArgsFlagCSRConfigMode (1 << 4) +#endif + +#ifndef kBootArgsFlagCSRBoot + #define kBootArgsFlagCSRBoot (1 << 5) +#endif + +/* #define kBootArgsFlagBlackBg (1 << 6) */ + #ifndef kBootArgsFlagBlackTheme - #define kBootArgsFlagBlackTheme (1 << 6) + #define kBootArgsFlagBlackTheme (1 << 6) +#endif + +#ifndef kBootArgsFlagLoginUI + #define kBootArgsFlagLoginUI (1 << 7) +#endif + +#ifndef kBootArgsFlagInstallUI + #define kBootArgsFlagInstallUI (1 << 8) +#endif + +#ifndef CSR_VALID_FLAGS + /* Rootless configuration flags */ + #define CSR_ALLOW_UNTRUSTED_KEXTS (1 << 0) + #define CSR_ALLOW_UNRESTRICTED_FS (1 << 1) + #define CSR_ALLOW_TASK_FOR_PID (1 << 2) + #define CSR_ALLOW_KERNEL_DEBUGGER (1 << 3) + #define CSR_ALLOW_APPLE_INTERNAL (1 << 4) + #define CSR_ALLOW_UNRESTRICTED_DTRACE (1 << 5) + #define CSR_ALLOW_UNRESTRICTED_NVRAM (1 << 6) + + #define CSR_VALID_FLAGS (CSR_ALLOW_UNTRUSTED_KEXTS | \ + CSR_ALLOW_UNRESTRICTED_FS | \ + CSR_ALLOW_TASK_FOR_PID | \ + CSR_ALLOW_KERNEL_DEBUGGER | \ + CSR_ALLOW_APPLE_INTERNAL | \ + CSR_ALLOW_UNRESTRICTED_DTRACE | \ + CSR_ALLOW_UNRESTRICTED_NVRAM) #endif // Snapshot constants with supported version / revision info. @@ -164,13 +210,12 @@ typedef struct boot_args_new uint16_t Revision; // Revision of boot_args structure. uint16_t Version; // Version of boot_args structure. -#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. uint8_t efiMode; // 32 = 32-bit, 64 = 64-bit. uint8_t debugMode; // Bit field with behavior changes. -// #if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) -#if (MAKE_TARGET_OS & MOUNTAIN_LION) +#if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) uint16_t flags; #else uint8_t __reserved1[2]; @@ -195,13 +240,13 @@ typedef struct boot_args_new uint32_t efiRuntimeServicesPageStart; // Physical address of defragmented runtime pages. uint32_t efiRuntimeServicesPageCount; -#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. uint64_t efiRuntimeServicesVirtualPageStart; // Virtual address of defragmented runtime pages. #endif uint32_t efiSystemTable; // Physical address of system table in runtime area. -#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. uint32_t kslide; uint32_t performanceDataStart; // Physical address of log. @@ -215,13 +260,20 @@ typedef struct boot_args_new uint64_t PhysicalMemorySize; uint64_t FSBFrequency; - -// #if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) -#if (MAKE_TARGET_OS & MOUNTAIN_LION) + uint64_t pciConfigSpaceBaseAddress; - uint32_t pciConfigSpaceStartBusNumber; - uint32_t pciConfigSpaceEndBusNumber; - uint32_t __reserved4[730]; + uint32_t pciConfigSpaceStartBusNumber; + uint32_t pciConfigSpaceEndBusNumber; + +#if ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN) + uint32_t csrActiveConfig; + uint32_t csrCapabilities; + uint32_t boot_SMC_plimit; + uint16_t bootProgressMeterStart; + uint16_t bootProgressMeterEnd; + uint32_t __reserved4[726]; +#elif ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) + uint32_t __reserved4[730]; #else uint32_t __reserved4[734]; #endif @@ -235,7 +287,7 @@ typedef struct boot_args_new uint64_t efiRuntimeServicesVirtualPageStart; // Virtual address of defragmented runtime pages. uint32_t __reserved3[2]; -#endif +#endif // #if ((MAKE_TARGET_OS & LION) == LION) } kernel_boot_args; kernel_boot_args *bootArgs; diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index 500256c..59f0c80 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -188,7 +188,7 @@ void initEFITree(void) DT__AddProperty(chosenNode, "machine-signature", sizeof(MACHINE_SIGNATURE), (EFI_UINT8*) &MACHINE_SIGNATURE); -#if (MAKE_TARGET_OS == YOSEMITE) +#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // El Capitan and Yosemite UInt8 index = 0; EFI_UINT16 PMTimerValue = 0; uint64_t randomValue, tempValue, cpuTick; @@ -255,14 +255,14 @@ void initEFITree(void) } #endif -#if ((MAKE_TARGET_OS & LION) == LION) // Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. // Used by boot.efi - cosmetic only node/properties on hacks. Node * kernelCompatNode = DT__AddChild(efiNode, "kernel-compatibility"); static EFI_UINT8 const COMPAT_MODE[] = { 0x01, 0x00, 0x00, 0x00 }; - #if ((MAKE_TARGET_OS == MAVERICKS) || (MAKE_TARGET_OS == YOSEMITE)) + #if ((MAKE_TARGET_OS & MAVERICKS) == MAVERICKS) // El Capitan, Yosemite and Mavericks. DT__AddProperty(kernelCompatNode, "x86_64", sizeof(COMPAT_MODE), (EFI_UINT8*) &COMPAT_MODE); #else DT__AddProperty(kernelCompatNode, "i386", sizeof(COMPAT_MODE), (EFI_UINT8*) &COMPAT_MODE); diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 83827fc..59954e2 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -3,10 +3,11 @@ * * Updates: * - * - SMBIOS data logic moved to preprocessor code (PikerAlpha, October 2012). - * - Now includes: RevoBoot/libsaoi/i386/SMBIOS/model_data.h (PikerAlpha, October 2012). - * - DDR4 support added (PikerAlpha, June 2014). - * - Yosemite support added (PikerAlpha, June 2014). + * - SMBIOS data logic moved to preprocessor code (Pike R. Alpha, October 2012). + * - Now includes: RevoBoot/libsaoi/i386/SMBIOS/model_data.h (Pike R. Alpha, October 2012). + * - DDR4 support added (Pike R. Alpha, June 2014). + * - Yosemite support added (Pike R. Alpha, June 2014). + * - El Capitan support added (Pike R. Alpha, June 2015). * */ @@ -30,6 +31,7 @@ #define MOUNTAIN_LION 6 // Mountain Lion (includes Lion changes). #define MAVERICKS 10 // Mavericks (includes Lion changes). #define YOSEMITE 26 // Yosemite (incl. Lion/Mavericks changes). +#define EL_CAPITAN 62 // El Capitan (incl. Lion/Mavericks/Yosemite changes). //------------------------------------------------------------------------------ @@ -76,7 +78,8 @@ #define IMAC_152 (IMAC | (10 << 15)) #define IMAC_151 IMAC // Defaults to iMac15,1 -#define MACBOOK_41 MACBOOK // Defaults to MacBook4,1 +#define MACBOOK_41 (MACBOOK | ( 1 << 15)) +#define MACBOOK_81 (MACBOOK | ( 2 << 15)) // Defaults to MacBook8,1 #define MACBOOK_AIR_41 (MACBOOK_AIR | (1 << 15)) #define MACBOOK_AIR_42 (MACBOOK_AIR | (2 << 15)) From e7a2e6616ef905e2bf27f2418bce378369367c43 Mon Sep 17 00:00:00 2001 From: Chief <PikeRAlpha@yahoo.com> Date: Fri, 19 Jun 2015 14:54:28 +0200 Subject: [PATCH 517/623] Cleanups --- .gitignore | 5 +++++ i386/libsaio/acpi/patcher.h | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 98d0a72..966d393 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,8 @@ i386/libsaio/cpu/tools/PMinfoBackup i386/libsaio/smbios/tools/smbios2struct3 i386/libsaio/smbios/tools/smbios2struct4 +*OLD* +*BAK* +*test* +BACKUP + diff --git a/i386/libsaio/acpi/patcher.h b/i386/libsaio/acpi/patcher.h index 6db8895..16ca822 100644 --- a/i386/libsaio/acpi/patcher.h +++ b/i386/libsaio/acpi/patcher.h @@ -21,7 +21,7 @@ #endif -// #if VERIFY_OPREGION_GNVS_ADDRESS +#if VERIFY_OPREGION_GNVS_ADDRESS //============================================================================== unsigned int search64bitPattern(unsigned int aStartAddress, int aNumberOfBytes, uint64_t aSearchPattern) @@ -41,7 +41,7 @@ unsigned int search64bitPattern(unsigned int aStartAddress, int aNumberOfBytes, return 0; // Not found! } -// #endif // VERIFY_OPREGION_GNVS_ADDRESS +#endif // VERIFY_OPREGION_GNVS_ADDRESS #if (LOAD_EXTRA_ACPI_TABLES && (LOAD_DSDT_TABLE_FROM_EXTRA_ACPI || LOAD_SSDT_TABLE_FROM_EXTRA_ACPI)) @@ -281,7 +281,7 @@ bool patchFACPTable(ENTRIES * xsdtEntries, int tableIndex, int dropOffset) #elif STATIC_DSDT_TABLE_INJECTION || (LOAD_EXTRA_ACPI_TABLES && LOAD_DSDT_TABLE_FROM_EXTRA_ACPI) patchedFADT->DSDT = (uint32_t)customTables[DSDT].tableAddress; // The original DSDT without DSDT table injection! -// #if VERIFY_OPREGION_GNVS_ADDRESS +#if VERIFY_OPREGION_GNVS_ADDRESS #define OP_REGION_GNVS_ADDRESS_LE 0x0C0053564E47805B // First try to locate the OperationRegion (GNVS, SystemMemory, 0xNNNNNNNN, 0xNNNN) in the factory DSDT. unsigned int opRegFactoryDSDTAddress = search64bitPattern(factoryFADT->DSDT + sizeof(ACPI_DSDT), 2000, OP_REGION_GNVS_ADDRESS_LE); @@ -317,7 +317,7 @@ bool patchFACPTable(ENTRIES * xsdtEntries, int tableIndex, int dropOffset) _ACPI_DEBUG_SLEEP(1); } -// #endif // VERIFY_OPREGION_GNVS_ADDRESS +#endif // VERIFY_OPREGION_GNVS_ADDRESS _ACPI_DEBUG_DUMP("Replacing factory DSDT with "); From 2aae3b45f3672b1e58ff4294ec651efc3cdf81d0 Mon Sep 17 00:00:00 2001 From: Chief <PikeRAlpha@yahoo.com> Date: Sat, 20 Jun 2015 11:54:17 +0200 Subject: [PATCH 518/623] Removed a global and some other minor changes --- i386/boot2/boot.c | 12 ++++++------ i386/boot2/drivers.c | 8 ++++---- i386/config/settings-template.h | 10 ++++++++-- i386/libsaio/load.c | 14 ++++++-------- i386/libsaio/platform.c | 4 +--- i386/libsaio/platform.h | 11 +++++++---- i386/libsaio/sl.h | 3 --- 7 files changed, 32 insertions(+), 30 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 2155e68..6ae02b2 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -229,7 +229,7 @@ void boot(int biosdev) printf("\nModel: %s\n", gPlatform.ModelID); #if ((MAKE_TARGET_OS & LION) != LION) - printf("\ngArchCPUType (CPU): %s\n", (gArchCPUType == CPU_TYPE_X86_64) ? "x86_64" : "i386"); + printf("\nArchCPUType (CPU): %s\n", (gPlatform.ArchCPUType == CPU_TYPE_X86_64) ? "x86_64" : "i386"); sleep(3); // Silent sleep. #endif #endif @@ -312,9 +312,9 @@ void boot(int biosdev) // Is 'arch=<i386/x86_64>' specified as kernel flag? if (getValueForBootKey(kernelFlags, "arch", &val, &length)) // && len >= 4) { - gArchCPUType = (strncmp(val, "x86_64", 6) == 0) ? CPU_TYPE_X86_64 : CPU_TYPE_I386; + gPlatform.ArchCPUType = (strncmp(val, "x86_64", 6) == 0) ? CPU_TYPE_X86_64 : CPU_TYPE_I386; - _BOOT_DEBUG_DUMP("gArchCPUType (c.a.B.plist): %s\n", (gArchCPUType == CPU_TYPE_X86_64) ? "x86_64" : "i386"); + _BOOT_DEBUG_DUMP("ArchCPUType (c.a.B.plist): %s\n", (gPlatform.ArchCPUType == CPU_TYPE_X86_64) ? "x86_64" : "i386"); } // Check for -v (verbose) and -s (single user mode) flags. @@ -655,7 +655,7 @@ void boot(int biosdev) // Create path to pre-linked kernel. sprintf(preLinkedKernelPath, "%s/%s_%s.%08lX", gPlatform.KernelCachePath, kKernelCache, - ((gArchCPUType == CPU_TYPE_X86_64) ? "x86_64" : "i386"), adler32); + ((gPlatform.ArchCPUType == CPU_TYPE_X86_64) ? "x86_64" : "i386"), adler32); // Check if this file exists. if ((GetFileInfo(NULL, preLinkedKernelPath, &flags, &cachetime) == 0) && ((flags & kFileTypeMask) == kFileTypeFlat)) @@ -694,11 +694,11 @@ void boot(int biosdev) retStatus = LoadThinFatFile(bootFile, &fileLoadBuffer); #if SUPPORT_32BIT_MODE - if (retStatus <= 0 && gArchCPUType == CPU_TYPE_X86_64) + if (retStatus <= 0 && gPlatform.ArchCPUType == CPU_TYPE_X86_64) { _BOOT_DEBUG_DUMP("Load failed for arch=x86_64, trying arch=i386 now.\n"); - gArchCPUType = CPU_TYPE_I386; + gPlatform.ArchCPUType = CPU_TYPE_I386; retStatus = LoadThinFatFile(bootFile, &fileLoadBuffer); } diff --git a/i386/boot2/drivers.c b/i386/boot2/drivers.c index ae5c409..4d9a3cb 100755 --- a/i386/boot2/drivers.c +++ b/i386/boot2/drivers.c @@ -969,17 +969,17 @@ long decodeKernel(void *fileLoadBuffer, entry_t *rentry, char **raddr, int *rsiz ret = ThinFatFile(&fileLoadBuffer, &len); - if (ret == 0 && len == 0 && gArchCPUType == CPU_TYPE_X86_64) + if (ret == 0 && len == 0 && gPlatform.ArchCPUType == CPU_TYPE_X86_64) { - gArchCPUType = CPU_TYPE_I386; + gPlatform.ArchCPUType = CPU_TYPE_I386; ret = ThinFatFile(&fileLoadBuffer, &len); } ret = DecodeMachO(fileLoadBuffer, rentry, raddr, rsize); - if (ret < 0 && gArchCPUType == CPU_TYPE_X86_64) + if (ret < 0 && gPlatform.ArchCPUType == CPU_TYPE_X86_64) { - gArchCPUType = CPU_TYPE_I386; + gPlatform.ArchCPUType = CPU_TYPE_I386; ret = DecodeMachO(fileLoadBuffer, rentry, raddr, rsize); } diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 8426894..a393ef7 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -229,6 +229,8 @@ // only to give us feedback for a future release of RevoBoot. #endif +#define DISABLE_LEGACY_XHCI 0 // Set to 0 by default. Change this to 1 when you need to disable legacy XHCI. + #define DEBUG_BOOT 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. @@ -359,17 +361,20 @@ #define STATIC_SCREEN_HEIGHT 1200 // Used (in RevoBoot v1.0.35 and greater) when USE_STATIC_DISPLAY_RESOLUTION is 1 and when // USE_STATIC_DISPLAY_RESOLUTION is 0 but getResolutionFromEDID() isn't supported (failed). +#define BLACKMODE 1 // Show white Apple logo on a black background. Set to 0 for gray mode. + #define DEBUG_BOOT_GRAPHICS 0 // Set to 0 by default. Use 1 when to see debug info. //------------------------------------------------------------ STRINGTABLE.H ---------------------------------------------------------------- #define INSTALL_ESD_SUPPORT 0 // Set to 0 by default. Setting this to 1 will make RevoBoot search in specific directories - // for com.apple.Boot.plist – required for Mac like Lion OS X installations. + // for com.apple.Boot.plist – required for Mac like installations of OS X. #if (RECOVERY_HD_SUPPORT == 1 && INSTALL_ESD_SUPPORT == 0) #define INSTALL_ESD_SUPPORT 1 // This setting is mandatory for RECOVERY_HD_SUPPORT #endif + //-------------------------------------------------------------- SMBIOS.C ------------------------------------------------------------------ @@ -421,7 +426,8 @@ #if USE_STATIC_SMBIOS_DATA // Do nothing. -#elif OVERRIDE_DYNAMIC_MEMORY_DETECTION +#elif OVERRIDE_DYNAMIC_MEMORY_DETECTION // See settings under SMBIOS.c + // Setup RAM module info. Please note that you may have to expand this when you have more RAM modules. #define STATIC_RAM_SLOTS 4 // Number of RAM slots on mainboard. diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index 0f537bb..ffba2ef 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -70,8 +70,6 @@ static long DecodeSymbolTable(long cmdBase); static unsigned long gBinaryAddress; -cpu_type_t gArchCPUType = 0; // CPU_TYPE_I386; - //============================================================================== // Public function. @@ -115,7 +113,7 @@ long ThinFatFile(void **binary, unsigned long *length) fapsize = fap->size; } - if (fapcputype == gArchCPUType) + if (fapcputype == gPlatform.ArchCPUType) { *binary = (void *) ((unsigned long)*binary + fapoffset); size = fapsize; @@ -160,14 +158,14 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) sleep(5); #endif - /* if ((gArchCPUType == CPU_TYPE_I386 && mH->magic != MH_MAGIC) || - (gArchCPUType == CPU_TYPE_X86_64 && mH->magic != MH_MAGIC_64)) + /* if ((gPlatform.ArchCPUType == CPU_TYPE_I386 && mH->magic != MH_MAGIC) || + (gPlatform.ArchCPUType == CPU_TYPE_X86_64 && mH->magic != MH_MAGIC_64)) { error("Mach-O file has bad magic number\n"); return -1; } */ - switch (gArchCPUType) + switch (gPlatform.ArchCPUType) { case CPU_TYPE_I386: @@ -202,7 +200,7 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) return -1; } - /* cmdstart = (unsigned long)gBinaryAddress + (gArchCPUType == CPU_TYPE_I386) ? sizeof(struct mach_header) : + /* cmdstart = (unsigned long)gBinaryAddress + (gPlatform.ArchCPUType == CPU_TYPE_I386) ? sizeof(struct mach_header) : sizeof(struct mach_header_64); */ cmdBase = cmdstart; ncmds = mH->ncmds; @@ -564,7 +562,7 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l static long DecodeUnixThread(long cmdBase, unsigned int *entry) { - switch (gArchCPUType) + switch (gPlatform.ArchCPUType) { case CPU_TYPE_I386: { diff --git a/i386/libsaio/platform.c b/i386/libsaio/platform.c index aa95208..149bd4f 100644 --- a/i386/libsaio/platform.c +++ b/i386/libsaio/platform.c @@ -166,11 +166,9 @@ void initPlatform(int biosDevice, bool bootRecoveryHD) * DHP: Booting with arch=i386 <i>and</i> setting this to CPU_TYPE_I386 * and setting the EFI_64_BIT directive in private_data to 0 allowed me * to boot in EFI32 mode. Even with my 64 bit configuration. Pretty sweet. - * - * Note to self: Get rid of gArchCPUType (global alarm) fast. */ - gPlatform.ArchCPUType = gArchCPUType = getArchCPUType(); + gPlatform.ArchCPUType = getArchCPUType(); gPlatform.AddressWidth = (gPlatform.ArchCPUType == CPU_TYPE_X86_64) ? 8 : 4; diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 59954e2..3813207 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -130,8 +130,13 @@ //------------------------------------------------------------------------------ -#define kKernelCachePath "/System/Library/Caches/com.apple.kext.caches/Startup" -#define kKernelCache "kernelcache" +#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan. + #define kKernelCachePath "/System/Library/Prelinkedkernels" + #define kKernelCache "prelinkedkernel" +#else + #define kKernelCachePath "/System/Library/Caches/com.apple.kext.caches/Startup" + #define kKernelCache "kernelcache" +#endif //------------------------------------------------------------------------------ @@ -366,8 +371,6 @@ typedef struct _PlatformInfo_t extern void initCPUStruct(void); /* platform.c */ -extern cpu_type_t gArchCPUType; // DHP: Fix / remove me! - extern PlatformInfo_t gPlatform; extern void initPlatform(int biosDevice, bool bootRecoveryHD); diff --git a/i386/libsaio/sl.h b/i386/libsaio/sl.h index 2706a24..79715e0 100755 --- a/i386/libsaio/sl.h +++ b/i386/libsaio/sl.h @@ -65,7 +65,4 @@ enum extern void * gFSLoadAddress; -// Used in: boot/drivers/load.c -extern cpu_type_t gArchCPUType; // Formerly known as archCpuType. - #endif /* !__LIBSAIO_SL_H */ From 4facc3ccdc369f12185da8b678a513f306443ace Mon Sep 17 00:00:00 2001 From: Chief <PikeRAlpha@yahoo.com> Date: Sun, 21 Jun 2015 18:44:56 +0200 Subject: [PATCH 519/623] Fix bootArgs->PhysicalMemorySize and typo --- i386/libsaio/bootstruct.c | 2 +- i386/libsaio/platform.c | 1 + i386/libsaio/platform.h | 3 ++- i386/libsaio/smbios/dynamic_data.h | 13 +++++++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/bootstruct.c b/i386/libsaio/bootstruct.c index 744a55b..551b41e 100755 --- a/i386/libsaio/bootstruct.c +++ b/i386/libsaio/bootstruct.c @@ -228,7 +228,7 @@ void finalizeKernelBootConfig(void) #endif */ #if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. - bootArgs->PhysicalMemorySize = (1024 * 1024 * 1024); + bootArgs->PhysicalMemorySize = gPlatform.RAM.MemorySize; bootArgs->FSBFrequency = gPlatform.CPU.FSBFrequency; #endif } diff --git a/i386/libsaio/platform.c b/i386/libsaio/platform.c index 149bd4f..3ecf4ce 100644 --- a/i386/libsaio/platform.c +++ b/i386/libsaio/platform.c @@ -229,6 +229,7 @@ void initPlatform(int biosDevice, bool bootRecoveryHD) gPlatform.UUID = NULL; // Will be initialized in RevoBoot/i386/libsaio/smbios/[dynamic/static]_data.h gPlatform.RAM.SlotCount = 0; // Will be initialized further down (used in smbios/dynamic_data.h) + gPlatform.RAM.MemorySize = 0; // Will be initialized in setupSMBIOS() #if USE_STATIC_SMBIOS_DATA // We don't have to do anything when static SMBIOS data is used. diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 3813207..2752850 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -131,7 +131,7 @@ //------------------------------------------------------------------------------ #if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan. - #define kKernelCachePath "/System/Library/Prelinkedkernels" + #define kKernelCachePath "/System/Library/PrelinkedKernels" #define kKernelCache "prelinkedkernel" #else #define kKernelCachePath "/System/Library/Caches/com.apple.kext.caches/Startup" @@ -309,6 +309,7 @@ typedef struct _PlatformInfo_t uint8_t Channels; // Channel Configuration Single, Dual or Triple uint8_t SlotCount; // Previously NoSlots; - Maximum no of slots available uint8_t Type; // Standard SMBIOS v2.5 Memory Type + uint64_t MemorySize; // Initialised in setupSMBIOS() and used in initKernelBootConfig() /* Remove me */ char * BrandString; // Branding String Memory Controller RamSlotInfo_t MODULE[MAX_SLOTS]; // Information about each slot diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index 54fcc90..53f8bd6 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -345,6 +345,19 @@ void setupSMBIOS(void) memcpy(gPlatform.UUID, ((SMBSystemInformation *)factoryHeader)->uuid, 16); #endif } + else if (currentStructureType == kSMBTypeMemoryDevice) + { + UInt64 memorySize = 0; +#if DYNAMIC_RAM_OVERRIDE_SIZE + memorySize = getRAMSize(); +#else + memorySize = ((SMBMemoryDevice *)factoryHeader)->memorySize; +#endif + if (memorySize > 0 && memorySize < 0xffff) + { + gPlatform.RAM.MemorySize += (memorySize << ((memorySize & 0x8000) ? 10 : 20)); + } + } // Init handle in the new header. newHeader->handle = ++handle; From 1d2e38e16ef5312362e90e0575e94f4edd73ef0f Mon Sep 17 00:00:00 2001 From: Chief <PikeRAlpha@yahoo.com> Date: Sun, 21 Jun 2015 23:33:20 +0200 Subject: [PATCH 520/623] Also init gPlatform.RAM.MemorySize when static SMBIOS data is used --- i386/libsaio/smbios.c | 20 ++++++++++++++++---- i386/libsaio/smbios/dynamic_data.h | 1 - 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/i386/libsaio/smbios.c b/i386/libsaio/smbios.c index ea22a46..7877b45 100755 --- a/i386/libsaio/smbios.c +++ b/i386/libsaio/smbios.c @@ -13,7 +13,7 @@ */ #include "platform.h" - +#include "smbios/smbios.h" #if USE_STATIC_SMBIOS_DATA //============================================================================== @@ -78,12 +78,24 @@ void setupSMBIOS(void) while (structureEnd > (structurePtr + sizeof(SMBStructHeader))) { struct SMBStructHeader * header = (struct SMBStructHeader *) structurePtr; + SMBByte currentStructureType = header->type; + + if (currentStructureType == kSMBTypeMemoryDevice) + { + UInt64 memorySize = 0; +#if DYNAMIC_RAM_OVERRIDE_SIZE + memorySize = getRAMSize(); +#else + memorySize = ((SMBMemoryDevice *)header)->memorySize; +#endif + if (memorySize > 0 && memorySize < 0xffff) + { + gPlatform.RAM.MemorySize += (memorySize << ((memorySize & 0x8000) ? 10 : 20)); + } + } #if SET_MAX_STRUCTURE_LENGTH char * stringsPtr = structurePtr; - #if DEBUG_SMBIOS - SMBByte currentStructureType = header->type; - #endif #endif // Skip the formatted area of the structure. structurePtr += header->length; diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index 53f8bd6..53116b6 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -41,7 +41,6 @@ #include "libsaio.h" -#include "smbios.h" #include "model_data.h" #define IOSERVICE_PLATFORM_FEATURE 0x0000000000000001 From 4541d17179688f109592c35ee8483a2a415cc6a2 Mon Sep 17 00:00:00 2001 From: Chief <PikeRAlpha@yahoo.com> Date: Tue, 14 Jul 2015 12:58:50 +0200 Subject: [PATCH 521/623] Allow untrusted kexts to load in DP3 --- i386/libsaio/bootstruct.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/bootstruct.c b/i386/libsaio/bootstruct.c index 551b41e..f316d6b 100755 --- a/i386/libsaio/bootstruct.c +++ b/i386/libsaio/bootstruct.c @@ -123,10 +123,11 @@ void initKernelBootConfig(void) #endif // #if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) #if ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN) - bootArgs->flags |= (kBootArgsFlagCSRBoot + kBootArgsFlagCSRActiveConfig + kBootArgsFlagCSRConfigMode); + bootArgs->flags |= kBootArgsFlagCSRActiveConfig; - bootArgs->csrActiveConfig = CSR_VALID_FLAGS; - bootArgs->csrCapabilities = (kBootArgsFlagCSRBoot + kBootArgsFlagLoginUI + kBootArgsFlagInstallUI); + bootArgs->csrActiveConfig = CSR_ALLOW_UNTRUSTED_KEXTS; + bootArgs->csrCapabilities = CSR_VALID_FLAGS; + bootArgs->boot_SMC_plimit = 0; #endif bootArgs->kslide = 0; From 8e400325a933c2cfafb189b73ba6d252bdd40c5f Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Tue, 15 Sep 2015 02:12:32 +0200 Subject: [PATCH 522/623] Improved kernel version detection. --- i386/libsaio/platform.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 2752850..22d99d1 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -204,7 +204,16 @@ typedef struct _PlatformInfo_t char * OSVersion; // OS version initialized with "10.6" in platform.c and // later updated in boot.c with the actual version info. - + + struct KERNEL // Initialised in initKernelVersionInfo() + { + uint8_t versionMajor; + + uint8_t versionMinor; + + uint8_t versionRevision; + } KERNEL; + char * ModelID; // Initialized in platform.c and used in boot.c char * CommaLessModelID; // Initialized in platform.c and used in i386/libsaio/ACPI/patcher.h, char * KextFileName; // Initialized and used in drivers.c From 6c8069fa40ebba77d8743994172401a8a807368d Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Tue, 15 Sep 2015 02:13:43 +0200 Subject: [PATCH 523/623] Improved kernel version detection. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – Removed old kernel/kext patch code. – Cleanups and improved 32-bit support. --- i386/libsaio/load.c | 464 +++++++++++++++++++------------------------- 1 file changed, 200 insertions(+), 264 deletions(-) diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index ffba2ef..e2fe7dd 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -31,6 +31,7 @@ #include <mach-o/fat.h> #include <mach-o/loader.h> +#include <mach-o/nlist.h> #include <mach/machine/thread_status.h> #include <sl.h> @@ -47,20 +48,11 @@ #define NVRAM_GUID_UINT64 0x3530454445314434 #define OPTIONS_STRING_UINT64 0x736e6f6974706f2f -/*** - * Tip: Reverse bytes if you search for the IDs with grep/HexEdit. - */ -// #define APPLE_HDA_PATCH_ID 0x11D419843D107410 10.9.2 and 10.9.3 -// #define APPLE_HDA_PATCH_ID 0x11D419843D397410 -// #define APPLE_HDA_TARGET_ID 0x10EC08923D397410 - -// #define APPLE_HDA_CONTROLLER_PATCH_ID 0x30EB617500000C0C -// #define APPLE_HDA_CONTROLLER_TARGET_ID 0x0EEB617500000C0C - // Load MKext(s) or separate kexts (default behaviour / behavior). bool gLoadKernelDrivers = true; // Private functions. +static long initKernelVersionInfo(unsigned long cmdbase, long listSize, unsigned int textSegmentVMAddress); static long DecodeSegment(long cmdBase, unsigned int*load_addr, unsigned int *load_size); static long DecodeUnixThread(long cmdBase, unsigned int *entry); @@ -135,94 +127,105 @@ long ThinFatFile(void **binary, unsigned long *length) long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) { - struct mach_header *mH; - unsigned long ncmds, cmdBase, cmd, cmdsize, cmdstart; - unsigned int vmaddr = ~0; - unsigned int vmend = 0; - unsigned long cnt; - long ret = -1; - unsigned int entry = 0; - - gBinaryAddress = (unsigned long)binary; - mH = (struct mach_header *)(gBinaryAddress); - -#if DEBUG - printf("In DecodeMachO()\n"); - printf("magic: %x\n", (unsigned)mH->magic); - printf("cputype: %x\n", (unsigned)mH->cputype); - printf("cpusubtype: %x\n", (unsigned)mH->cpusubtype); - printf("filetype: %x\n", (unsigned)mH->filetype); - printf("ncmds: %x\n", (unsigned)mH->ncmds); - printf("sizeofcmds: %x\n", (unsigned)mH->sizeofcmds); - printf("flags: %x\n", (unsigned)mH->flags); - sleep(5); -#endif + long ret = -1; - /* if ((gPlatform.ArchCPUType == CPU_TYPE_I386 && mH->magic != MH_MAGIC) || - (gPlatform.ArchCPUType == CPU_TYPE_X86_64 && mH->magic != MH_MAGIC_64)) - { - error("Mach-O file has bad magic number\n"); - return -1; - } */ - - switch (gPlatform.ArchCPUType) - { - case CPU_TYPE_I386: - - if (mH->magic != MH_MAGIC) - { - error("Mach-O (i386) file has bad magic number\n"); - return -1; - } + unsigned int vmaddr = ~0; + unsigned int vmend = 0; + unsigned int entry = 0; + unsigned int load_addr = 0; + unsigned int load_size = 0; + unsigned int textSegmentVMAddress = 0; - cmdstart = (unsigned long)gBinaryAddress + sizeof(struct mach_header); - break; - case CPU_TYPE_X86_64: + unsigned long ncmds = 0; + unsigned long cmdBase = 0; + unsigned long cmd = 0; + unsigned long cmdsize = 0; + unsigned long cmdstart = 0; + unsigned long cnt = 0; + unsigned long listSize = 0; - if (mH->magic != MH_MAGIC_64 && mH->magic == MH_MAGIC) - { - return -1; - } + gBinaryAddress = (unsigned long)binary; - if (mH->magic != MH_MAGIC_64) - { - error("Mach-O file (x86_64) has bad magic number\n"); - return -1; - } + if (gPlatform.ArchCPUType == CPU_TYPE_X86_64) + { + struct mach_header_64 * machHeader = (struct mach_header_64 *)(gBinaryAddress); - cmdstart = (unsigned long)gBinaryAddress + sizeof(struct mach_header_64); - break; + if (machHeader->magic != MH_MAGIC_64) + { + error("Mach-O file(X86_64) has a bad magic number!\n"); + return -1; + } - default: + listSize = sizeof(struct nlist_64); + cmdstart = (unsigned long)gBinaryAddress + sizeof(struct mach_header_64); +#if DEBUG + printf("In DecodeMachO()\n"); + printf("magic: %x\n", (unsigned)machHeader->magic); + printf("cputype: %x\n", (unsigned)machHeader->cputype); + printf("cpusubtype: %x\n", (unsigned)machHeader->cpusubtype); + printf("filetype: %x\n", (unsigned)machHeader->filetype); + printf("ncmds: %x\n", (unsigned)machHeader->ncmds); + printf("sizeofcmds: %x\n", (unsigned)machHeader->sizeofcmds); + printf("flags: %x\n", (unsigned)machHeader->flags); + sleep(5); +#endif + ncmds = machHeader->ncmds; + } + else // if (gPlatform.ArchCPUType == CPU_TYPE_I386) + { + struct mach_header * machHeader = (struct mach_header *)(gBinaryAddress); - error("Unknown CPU type\n"); + if (machHeader->magic != MH_MAGIC) + { + error("Mach-O file(i386) has a bad magic number!\n"); return -1; + } + + listSize = sizeof(struct nlist); + cmdstart = (unsigned long)gBinaryAddress + sizeof(struct mach_header); +#if DEBUG + printf("In DecodeMachO()\n"); + printf("magic: %x\n", (unsigned)machHeader->magic); + printf("cputype: %x\n", (unsigned)machHeader->cputype); + printf("cpusubtype: %x\n", (unsigned)machHeader->cpusubtype); + printf("filetype: %x\n", (unsigned)machHeader->filetype); + printf("ncmds: %x\n", (unsigned)machHeader->ncmds); + printf("sizeofcmds: %x\n", (unsigned)machHeader->sizeofcmds); + printf("flags: %x\n", (unsigned)machHeader->flags); + sleep(5); +#endif + ncmds = machHeader->ncmds; } - /* cmdstart = (unsigned long)gBinaryAddress + (gPlatform.ArchCPUType == CPU_TYPE_I386) ? sizeof(struct mach_header) : - sizeof(struct mach_header_64); */ cmdBase = cmdstart; - ncmds = mH->ncmds; for (cnt = 0; cnt < ncmds; cnt++) { cmd = ((long *)cmdBase)[0]; cmdsize = ((long *)cmdBase)[1]; - unsigned int load_addr; - unsigned int load_size; switch (cmd) { case LC_SEGMENT: case LC_SEGMENT_64: - ret = DecodeSegment(cmdBase, &load_addr, &load_size); + // Returns 1 for __TEXT segment. + if (DecodeSegment(cmdBase, &load_addr, &load_size)) + { + textSegmentVMAddress = load_addr; + ret = 0; + } - if (ret == 0 && load_size != 0 && load_addr >= KERNEL_ADDR) + if (load_size != 0 && load_addr >= KERNEL_ADDR) { vmaddr = min(vmaddr, load_addr); vmend = max(vmend, load_addr + load_size); } + + break; + + case LC_SYMTAB: + initKernelVersionInfo(cmdBase, listSize, textSegmentVMAddress); break; case LC_MAIN: /* Mountain Lion's replacement for LC_UNIXTHREAD */ @@ -230,9 +233,6 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) ret = DecodeUnixThread(cmdBase, &entry); break; - case LC_SYMTAB: - break; - default: #if NOTDEF printf("Ignoring cmd type %d.\n", (unsigned)cmd); @@ -275,67 +275,135 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) } -/* #if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION_NEW) //============================================================================== -// -// Kernel patch routine for iMessage -// -// This segment will be replaced by random data (since 18 April 2011) and released -// when the kernel is done with it. Meaning that our data is short lived as well. -if (strncmp(segname, "__KLD", 5) == 0) +// Private function. Called from DecodeMachO() + +static long initKernelVersionInfo(unsigned long cmdBase, long listSize, unsigned int textSegmentVMAddress) { - uint32_t index = 0; - uint32_t offset = sizeof(struct segment_command_64); - - while(offset < segCmd->cmdsize) + struct symtab_command * symtab = (struct symtab_command *)cmdBase; + + /* + * Reverse search is quicker for symbols at the end of the symbol table (example with 20496 symbols): + * + * _version_revision is symbol 18865 – first target symbol, iterated symbols: 1631 + * _version_minor is symbol 18863 – second target symbol, iterated symbols: 1633 + * _version_major is symbol 18862 – last target symbol, iterated symbols: 1634 + * + * versus: + * + * _version_major is symbol 18862 – first target symbol, iterated symbols: 18862 + * _version_minor is symbol 18863 – ssecond target symbol, iterated symbols: 18863 + * _version_revision is symbol 18865 – last target symbol, iterated symbols: 18865 + */ + + const char * targetSymbols[] = { "_version_revision", "_version_minor", "_version_major" }; + + char * symbolName = NULL; + char * loadBuffer = (char *)gBinaryAddress; + + void * stringTable = (void *)(gBinaryAddress + symtab->stroff); + + short index = 0; + + long symbolOffset = 0; + long symbolLength = 0; + long symbolNumber = symtab->nsyms; + + uint32_t pointer = gBinaryAddress + symtab->symoff + ((symtab->nsyms - 1) * listSize); + + if (gPlatform.ArchCPUType == CPU_TYPE_X86_64) { - struct section_64 *section = (struct section_64 *)((char *)segCmd + offset); - offset += sizeof(struct section_64); - - if (strncmp((char *)section->sectname, "__cstring", 9) == 0) + struct nlist_64 * nl = (struct nlist_64 *)pointer; + + while (symbolNumber > 0) { - uint64_t sectionStart = (fileaddr + index); - uint64_t sectionEnd = (fileaddr + filesize); - - unsigned char * baseAddress = (unsigned char *)sectionStart; + nl = (struct nlist_64 *)pointer; - // Search for the NVRAM GUID. - for (; baseAddress <= (unsigned char *)sectionEnd; baseAddress++) + if (nl->n_sect && nl->n_value) { - if (*(uint64_t *)baseAddress == NVRAM_GUID_UINT64) + symbolName = (char *)stringTable + nl->n_un.n_strx; + symbolLength = strlen(symbolName); + symbolOffset = (nl->n_value - textSegmentVMAddress); + + if (symbolLength) { - // Zero out NVRAM GUID - bzero((char *)baseAddress, 36); - // Replace/inject GUID replacement - memcpy((char *)baseAddress, "NVRAM", 5); - // Point to the end of the (former) NVRAM GUID string - baseAddress += 36; - - // Search for "/options" after the GUID. - for (; baseAddress <= (unsigned char *)sectionEnd; baseAddress++) + if (strcmp(symbolName, targetSymbols[index]) == 0) { - if (*(uint64_t *)baseAddress == OPTIONS_STRING_UINT64) + switch(index) { - // Rename /option to /RevoEFI (just temporarily) - memcpy((unsigned char *)baseAddress, "/RevoEFI", 8); - // Prepare to break out early. - baseAddress = (unsigned char *)(sectionEnd + 1); - // Done. - break; + case 0: + gPlatform.KERNEL.versionRevision = (uint8_t)loadBuffer[symbolOffset]; + index++; + break; + + case 1: + gPlatform.KERNEL.versionMinor = (uint8_t)loadBuffer[symbolOffset]; + index++; + break; + + case 2: + gPlatform.KERNEL.versionMajor = (uint8_t)loadBuffer[symbolOffset]; + symbolNumber = 0; + break; } } } } + + symbolNumber--; + pointer -= listSize; } - else + } + else // 32-bit compatibility code. + { + struct nlist * nl = (struct nlist *)pointer; + + while (symbolNumber > 0) { - // Skip unwanted sections (which makes us a little faster). - index += section->size; + nl = (struct nlist *)pointer; + + if (nl->n_sect && nl->n_value) + { + symbolName = (char *)stringTable + nl->n_un.n_strx; + symbolLength = strlen(symbolName); + symbolOffset = (nl->n_value - textSegmentVMAddress); + + if (symbolLength) + { + if (strcmp(symbolName, targetSymbols[index]) == 0) + { + switch(index) + { + case 0: + gPlatform.KERNEL.versionRevision = (uint8_t)loadBuffer[symbolOffset]; + index++; + break; + + case 1: + gPlatform.KERNEL.versionMinor = (uint8_t)loadBuffer[symbolOffset]; + index++; + break; + + case 2: + gPlatform.KERNEL.versionMajor = (uint8_t)loadBuffer[symbolOffset]; + symbolNumber = 0; + break; + } + } + } + } + + symbolNumber--; + pointer -= listSize; } } -} -#endif */ +#if DEBUG + printf("gPlatform.KERNEL.versionMmR: %d.%d.%d\n", gPlatform.KERNEL.versionMajor, gPlatform.KERNEL.versionMinor, gPlatform.KERNEL.versionRevision); + sleep(5); +#endif + return 0; +} //============================================================================== // Private function. Called from DecodeMachO() @@ -343,169 +411,34 @@ if (strncmp(segname, "__KLD", 5) == 0) static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *load_size) { - char *segname; - long vmsize, filesize; - unsigned long vmaddr, fileaddr; + char *segname = NULL; + + long retValue = 0; + long vmsize = 0; + long filesize = 0; + + unsigned long vmaddr = 0; + unsigned long fileaddr = 0; if (((long *)cmdBase)[0] == LC_SEGMENT_64) { struct segment_command_64 *segCmd = (struct segment_command_64 *)cmdBase; - vmaddr = (segCmd->vmaddr & 0x3fffffff); vmsize = segCmd->vmsize; fileaddr = (gBinaryAddress + segCmd->fileoff); filesize = segCmd->filesize; segname = segCmd->segname; - -#if ((MAKE_TARGET_OS & LION) == LION) - // - // Kernel patch routine for iMessage (LION, MOUNTAIN_LION, MAVERICKS and YOSEMITE). - // - #if IMESSAGE_PATCH_ENABLED - // - // This segment will be replaced by random data (since 18 April 2011) and released - // when the kernel is done with it. Meaning that our data is short lived as well. - // - if (strncmp(segname, "__KLD", 5) == 0) - { - // printf ("__KLD found!\n"); - - uint32_t index = 0; - uint32_t offset = sizeof(struct segment_command_64); - - while(offset < segCmd->cmdsize) - { - struct section_64 *section = (struct section_64 *)((char *)segCmd + offset); - offset += sizeof(struct section_64); - - if (strncmp((char *)section->sectname, "__cstring", 9) == 0) - { - // printf ("__KLD found!\n"); - - uint64_t sectionStart = (fileaddr + index); - uint64_t sectionEnd = (fileaddr + filesize); - - unsigned char * baseAddress = (unsigned char *)sectionStart; - - // Search for the NVRAM GUID. - for (; baseAddress <= (unsigned char *)sectionEnd; baseAddress++) - { - if (*(uint64_t *)baseAddress == NVRAM_GUID_UINT64) - { - // printf ("NVRAM GUID found!\n"); - - // Zero out NVRAM GUID - bzero((char *)baseAddress, 36); - // Replace/inject GUID replacement - memcpy((char *)baseAddress, "NVRAM", 5); - // Point to the end of the (former) NVRAM GUID string - baseAddress += 36; - - // Search for "/options" after the GUID. - for (; baseAddress <= (unsigned char *)sectionEnd; baseAddress++) - { - if (*(uint64_t *)baseAddress == OPTIONS_STRING_UINT64) - { - // printf ("/options renamed to /RevoEFI!\n"); - - // Rename /options to /RevoEFI (just temporarily) - memcpy((unsigned char *)baseAddress, "/RevoEFI", 8); - // Prepare to break out early. - baseAddress = (unsigned char *)(sectionEnd + 1); - // Done. - break; - } - } - } - } - } - else - { - // Skip unwanted sections (which makes us a little faster). - index += section->size; - } - } -#if DEBUG - sleep(5); -#endif - } - #endif // #if IMESSAGE_PATCH_ENABLED - -#if KERNELCACHE_PATCHING_ENABLED - #if IMESSAGE_PATCH_ENABLED - else - #endif - if (strncmp(segname, "__PRELINK_TEXT", 14) == 0) - { - // printf("Target segname found: __PRELINK_TEXT\n"); - - uint32_t index2 = 0; - uint32_t offset2 = sizeof(struct segment_command_64); - - while(offset2 < segCmd->cmdsize) - { - struct section_64 *section2 = (struct section_64 *)((char *)segCmd + offset2); - offset2 += sizeof(struct section_64); - - if (strncmp((char *)section2->sectname, "__text", 6) == 0) - { - // printf("Target section found: __PRELINK_TEXT\n"); - - uint64_t sectionStart2 = (fileaddr + index2); - uint64_t sectionEnd2 = (fileaddr + filesize); - - unsigned char * baseAddress2 = (unsigned char *)sectionStart2; - - // Search for APPLE_HDA_PATCH_ID byte sequence. - for (; baseAddress2 <= (unsigned char *)sectionEnd2; baseAddress2++) - { -#ifdef APPLE_HDA_PATCH_ID - if (*(uint64_t *)baseAddress2 == APPLE_HDA_PATCH_ID) - { - // printf("DO APPLE_HDA_PATCH_ID\n"); - // Replace APPLE_HDA_PATCH_ID with APPLE_HDA_TARGET_ID - *(uint64_t *)baseAddress2 = APPLE_HDA_TARGET_ID; - } -#endif - -#ifdef APPLE_HDA_CONTROLLER_PATCH_ID - #if APPLE_HDA_PATCH_ID - else if - #else - if - #endif - (*(uint64_t *)baseAddress2 == APPLE_HDA_CONTROLLER_PATCH_ID) - { - // printf("DO APPLE_HDA_CONTROLLER_PATCH_ID\n"); - // Replace APPLE_HDA_CONTROLLER_PATCH_ID with APPLE_HDA_CONTROLLER_TARGET_ID - *(uint64_t *)baseAddress2 = APPLE_HDA_CONTROLLER_TARGET_ID; - } -#endif - } - } - else - { - // Skip unwanted sections. - index2 += section2->size; - } - } - // printf("sleeping for 2 seconds!\n"); - // sleep(2); - } -#endif // #if KERNELCACHE_PATCH_ENABLED -#endif // #if ((MAKE_TARGET_OS & LION) == LION) } else { struct segment_command *segCmd = (struct segment_command *)cmdBase; - vmaddr = (segCmd->vmaddr & 0x3fffffff); - vmsize = segCmd->vmsize; + vmsize = segCmd->vmsize; fileaddr = (gBinaryAddress + segCmd->fileoff); filesize = segCmd->filesize; segname = segCmd->segname; } - + // Pre-flight checks. if (vmsize && filesize) { @@ -528,9 +461,12 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l printf("Sleeping for 5 seconds...\n"); sleep(5); #endif - // Make boot() skip kernel / MKext(s) loading. gLoadKernelDrivers = false; } + else if (strncmp(segname, "__TEXT", 6) == 0) + { + retValue = 1; + } // Copy from file load area. if (filesize > 0) @@ -553,7 +489,7 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l *load_size = 0; } - return 0; + return retValue; } From cd783afe443f2693f4084a99eedb1a2efeacb771 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Thu, 17 Sep 2015 08:03:16 +0200 Subject: [PATCH 524/623] Comment only changes. --- i386/libsaio/bootstruct.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/i386/libsaio/bootstruct.h b/i386/libsaio/bootstruct.h index 479bd14..23c9e8e 100755 --- a/i386/libsaio/bootstruct.h +++ b/i386/libsaio/bootstruct.h @@ -55,40 +55,40 @@ #endif #ifndef kBootArgsFlagCSRActiveConfig - #define kBootArgsFlagCSRActiveConfig (1 << 3) + #define kBootArgsFlagCSRActiveConfig (1 << 3) // 8 #endif #ifndef kBootArgsFlagCSRConfigMode - #define kBootArgsFlagCSRConfigMode (1 << 4) + #define kBootArgsFlagCSRConfigMode (1 << 4) // 16 #endif #ifndef kBootArgsFlagCSRBoot - #define kBootArgsFlagCSRBoot (1 << 5) + #define kBootArgsFlagCSRBoot (1 << 5) // 32 #endif /* #define kBootArgsFlagBlackBg (1 << 6) */ #ifndef kBootArgsFlagBlackTheme - #define kBootArgsFlagBlackTheme (1 << 6) + #define kBootArgsFlagBlackTheme (1 << 6) // 64 #endif #ifndef kBootArgsFlagLoginUI - #define kBootArgsFlagLoginUI (1 << 7) + #define kBootArgsFlagLoginUI (1 << 7) // 128 #endif #ifndef kBootArgsFlagInstallUI - #define kBootArgsFlagInstallUI (1 << 8) + #define kBootArgsFlagInstallUI (1 << 8) // 256 #endif #ifndef CSR_VALID_FLAGS /* Rootless configuration flags */ - #define CSR_ALLOW_UNTRUSTED_KEXTS (1 << 0) - #define CSR_ALLOW_UNRESTRICTED_FS (1 << 1) - #define CSR_ALLOW_TASK_FOR_PID (1 << 2) - #define CSR_ALLOW_KERNEL_DEBUGGER (1 << 3) - #define CSR_ALLOW_APPLE_INTERNAL (1 << 4) - #define CSR_ALLOW_UNRESTRICTED_DTRACE (1 << 5) - #define CSR_ALLOW_UNRESTRICTED_NVRAM (1 << 6) + #define CSR_ALLOW_UNTRUSTED_KEXTS (1 << 0) // 1 + #define CSR_ALLOW_UNRESTRICTED_FS (1 << 1) // 2 + #define CSR_ALLOW_TASK_FOR_PID (1 << 2) // 4 + #define CSR_ALLOW_KERNEL_DEBUGGER (1 << 3) // 8 + #define CSR_ALLOW_APPLE_INTERNAL (1 << 4) // 16 + #define CSR_ALLOW_UNRESTRICTED_DTRACE (1 << 5) // 32 + #define CSR_ALLOW_UNRESTRICTED_NVRAM (1 << 6) // 64 #define CSR_VALID_FLAGS (CSR_ALLOW_UNTRUSTED_KEXTS | \ CSR_ALLOW_UNRESTRICTED_FS | \ From 1284678b5e09d3a8da4787101c228a1dbe61cfbd Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Thu, 17 Sep 2015 08:05:40 +0200 Subject: [PATCH 525/623] Adding new __TEXT,cstring (C String Literal). --- i386/libsaio/bootstruct.h | 1 + 1 file changed, 1 insertion(+) diff --git a/i386/libsaio/bootstruct.h b/i386/libsaio/bootstruct.h index 23c9e8e..fcea25c 100755 --- a/i386/libsaio/bootstruct.h +++ b/i386/libsaio/bootstruct.h @@ -89,6 +89,7 @@ #define CSR_ALLOW_APPLE_INTERNAL (1 << 4) // 16 #define CSR_ALLOW_UNRESTRICTED_DTRACE (1 << 5) // 32 #define CSR_ALLOW_UNRESTRICTED_NVRAM (1 << 6) // 64 + #define CSR_ALLOW_DEVICE_CONFIGURATION (1 << 7) // 128 #define CSR_VALID_FLAGS (CSR_ALLOW_UNTRUSTED_KEXTS | \ CSR_ALLOW_UNRESTRICTED_FS | \ From d132f48ba95c3793cc1a153a7727d805b06d2fac Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Tue, 27 Oct 2015 04:08:06 +0100 Subject: [PATCH 526/623] Cleanups checksum8 calls. --- i386/libsa/string.c | 2 +- i386/libsaio/acpi/patcher.h | 10 +++++----- i386/libsaio/acpi/ssdt_pr_generator.h | 2 +- i386/libsaio/smbios/dynamic_data.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/i386/libsa/string.c b/i386/libsa/string.c index fcd2b64..5001837 100755 --- a/i386/libsa/string.c +++ b/i386/libsa/string.c @@ -397,7 +397,7 @@ uint8_t checksum8(void * start, unsigned int length) csum += *cp++; } - return csum; + return (256 - csum); // ((255 - csum) + 1); } diff --git a/i386/libsaio/acpi/patcher.h b/i386/libsaio/acpi/patcher.h index 16ca822..8a402fb 100644 --- a/i386/libsaio/acpi/patcher.h +++ b/i386/libsaio/acpi/patcher.h @@ -217,7 +217,7 @@ void overrideACPIMethods(ACPI_FADT *patchedFADT) } // Fix checksum. patchedDSDT->Checksum = 0; - patchedDSDT->Checksum = 256 - checksum8(patchedDSDT, sizeof(patchedDSDT)); + patchedDSDT->Checksum = checksum8(patchedDSDT, sizeof(patchedDSDT)); // We're done. Using the patched factory DSDT now. patchedFADT->DSDT = patchedFADT->X_DSDT = (uint32_t)patchedDSDT; @@ -366,7 +366,7 @@ bool patchFACPTable(ENTRIES * xsdtEntries, int tableIndex, int dropOffset) customTables[FACS].table = NULL; #endif // STATIC_FACS_TABLE_INJECTION patchedFADT->Checksum = 0; - patchedFADT->Checksum = 256 - checksum8(patchedFADT, sizeof(ACPI_FADT)); + patchedFADT->Checksum = checksum8(patchedFADT, sizeof(ACPI_FADT)); xsdtEntries[tableIndex - dropOffset] = (uint32_t)patchedFADT; @@ -613,17 +613,17 @@ void setupACPI(void) // Patch the checksum of the new XSDP table. patchedXSDT->Checksum = 0; - patchedXSDT->Checksum = 256 - checksum8(patchedXSDT, patchedXSDT->Length); + patchedXSDT->Checksum = checksum8(patchedXSDT, patchedXSDT->Length); // Patch the checksum of the new RSDP table. patchedRSDP->Checksum = 0; - patchedRSDP->Checksum = 256 - checksum8(patchedRSDP, 20); + patchedRSDP->Checksum = checksum8(patchedRSDP, 20); // Patch the (extended) checksum of the RSDP for table revision 1 and greater. if (patchedRSDP->Revision) { patchedRSDP->ExtendedChecksum = 0; - patchedRSDP->ExtendedChecksum = 256 - checksum8(patchedRSDP, patchedRSDP->Length); + patchedRSDP->ExtendedChecksum = checksum8(patchedRSDP, patchedRSDP->Length); } } diff --git a/i386/libsaio/acpi/ssdt_pr_generator.h b/i386/libsaio/acpi/ssdt_pr_generator.h index 417ad3e..e58f2c4 100644 --- a/i386/libsaio/acpi/ssdt_pr_generator.h +++ b/i386/libsaio/acpi/ssdt_pr_generator.h @@ -681,7 +681,7 @@ void generateSSDT_PR(void) header->Length = bufferSize; header->Checksum = 0; - header->Checksum = 256 - checksum8(buffer, header->Length); + header->Checksum = checksum8(buffer, header->Length); //-------------------------------------------------------------------------- // Updating customTables with the required data. diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index 53116b6..ce7eeaf 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -555,8 +555,8 @@ void setupSMBIOS(void) newEPS->dmi.tableLength = (newtablesPtr - (char *)newEPS->dmi.tableAddress); // Calculate new checksums. - newEPS->dmi.checksum = 256 - checksum8(&newEPS->dmi, sizeof(newEPS->dmi)); - newEPS->checksum = 256 - checksum8(newEPS, sizeof(* newEPS)); + newEPS->dmi.checksum = checksum8(&newEPS->dmi, sizeof(newEPS->dmi)); + newEPS->checksum = checksum8(newEPS, sizeof(* newEPS)); _SMBIOS_DEBUG_DUMP("newEPS->dmi.structureCount: %d - tableLength: %d\n", newEPS->dmi.structureCount, newEPS->dmi.tableLength); From f400721ad9ee13de9a515be0ddca7b6a0e57d207 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Tue, 27 Oct 2015 04:12:47 +0100 Subject: [PATCH 527/623] Cleanups checksum8 calls. --- i386/libsaio/smbios.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/smbios.c b/i386/libsaio/smbios.c index 7877b45..fb4be53 100755 --- a/i386/libsaio/smbios.c +++ b/i386/libsaio/smbios.c @@ -137,8 +137,8 @@ void setupSMBIOS(void) _SMBIOS_DEBUG_DUMP("newEPS->dmi.structureCount: %d\nnewEPS.dmi.tableLength: %d\n", newEPS->dmi.structureCount, newEPS->dmi.tableLength); // Take care of possible checksum errors - newEPS->dmi.checksum = 256 - checksum8(&newEPS->dmi, sizeof(newEPS->dmi)); - newEPS->checksum = 256 - checksum8(newEPS, sizeof(* newEPS)); + newEPS->dmi.checksum = checksum8(&newEPS->dmi, sizeof(newEPS->dmi)); + newEPS->checksum = checksum8(newEPS, sizeof(* newEPS)); // Used to update the EFI Configuration Table (in efi.c) which is // what AppleSMBIOS.kext reads to setup the SMBIOS table for OS X. From cb8750e127c63e32ad148f93571e282a3089aa66 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Tue, 27 Oct 2015 04:13:24 +0100 Subject: [PATCH 528/623] Updating template file. --- i386/config/settings-template.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index a393ef7..0f2315b 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -363,6 +363,8 @@ #define BLACKMODE 1 // Show white Apple logo on a black background. Set to 0 for gray mode. +#define UISCALE_2X 0 // Set to 0 by default. Use 1 for HiDPI mode. + #define DEBUG_BOOT_GRAPHICS 0 // Set to 0 by default. Use 1 when to see debug info. @@ -421,6 +423,24 @@ #define DEBUG_SMBIOS 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. + +//---------------------------------------------------------------- LOAD.C ------------------------------------------------------------------ + +#define PATCH_KEXT_LOADING 1 // Set to 1 by default. + +#define LOAD_EXECUTABLE_TARGET_UINT64 0x487074db8548c389ULL // 89c34885db747048 revered in HexEdit +#define LOAD_EXECUTABLE_PATCH_UINT64 0x4812ebdb8548c389ULL + +#define PATCH_XCPI_SCOPE_MSRS 0 // Set to 0 by default. + +#define XCPM_SCOPE_MSRS_TARGET_UINT64 0x00000002000000E2ULL + +#define PATCH_LOAD_EXTRA_KEXTS 0 // Set to 0 by default. + +#define READ_STARTUP_EXTENSIONS_TARGET_UINT64 0xe805eb00000025e8ULL // e825000000eb05e8 revered in HexEdit +#define READ_STARTUP_EXTENSIONS_PATCH_UINT64 0xe8909000000025e8ULL + + //-------------------------------------------------------------- PLATFORM.C ---------------------------------------------------------------- From 8bc693b690bfaa04bb310dbe0d2c72d1a31fbca5 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Tue, 27 Oct 2015 04:59:55 +0100 Subject: [PATCH 529/623] Moving RecoveryHD code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – Cleanups/command/white space only changes. – SIP Installer support. – Missing Broadwell and Skylake code. – Kernel patches for PM and kextloading added. --- i386/boot2/boot.c | 72 +++--- i386/boot2/boot.h | 2 +- i386/boot2/bootlogo.c | 2 +- i386/libsaio/bootstruct.h | 3 +- i386/libsaio/cpu.c | 2 +- i386/libsaio/cpu/Intel/dynamic_data.h | 32 ++- i386/libsaio/cpu/essentials.h | 8 + i386/libsaio/efi.c | 5 + i386/libsaio/load.c | 345 +++++++++++++++++++------- i386/libsaio/platform.c | 27 +- i386/libsaio/platform.h | 13 +- 11 files changed, 356 insertions(+), 155 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 6ae02b2..8d1603c 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -166,7 +166,7 @@ void boot(int biosdev) bool haveCABootPlist = false; bool quietBootMode = true; - bool bootRecoveryHD = false; + bool kernelSpecified = false; void *fileLoadBuffer = (void *)kLoadAddr; @@ -190,37 +190,7 @@ void boot(int biosdev) long flags, cachetime; #endif -#if DEBUG_STATE_ENABLED - extern void setVideoMode(int mode); - setVideoMode(VGA_TEXT_MODE); -#endif - -#if RECOVERY_HD_SUPPORT - #if DEBUG_BOOT - printf("RecoveryHD boot support enabled\n"); - #endif - - while (readKeyboardStatus()) - { - int key = (bgetc() & 0xff); - #if DEBUG_BOOT - printf("key: %d\n", key); - #endif - if ((key |= 0x20) == 'r') - { - bootRecoveryHD = true; - #if DEBUG_BOOT - printf("RecoveryHD boot support is active\n"); - #endif - } - } -#if DEBUG_BOOT - printf("bootRecoveryHD: %s\n", bootRecoveryHD ? "True" : "False"); -#endif - initPlatform(biosdev, true); -#else - initPlatform(biosdev, false); -#endif + initPlatform(biosdev); #if DEBUG_BOOT /* @@ -235,7 +205,7 @@ void boot(int biosdev) #endif #if (DEBUG_STATE_ENABLED == 0) - showBootLogo(bootRecoveryHD); + showBootLogo(); #endif #if (LOAD_MODEL_SPECIFIC_EFI_DATA == 0 && BLACKMODE == 0) @@ -391,6 +361,7 @@ void boot(int biosdev) else { _BOOT_DEBUG_DUMP("No com.apple.Boot.plist found.\n"); + _BOOT_DEBUG_SLEEP(5); } // Was a target drive (per UUID) specified in com.apple.Boot.plist? @@ -475,10 +446,18 @@ void boot(int biosdev) _BOOT_DEBUG_DUMP("length: %d, val: %s\n", length, val); #if RECOVERY_HD_SUPPORT // XXX: Required for booting from the Recovery HD. +#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan. + // FIXME: This static check sucks! + if (strncmp(val, "\\com.apple.recovery.boot\\prelinkedkernel", length) == 0) + { + val = "/com.apple.recovery.boot/prelinkedkernel"; + } +#else if (strncmp(val, "\\com.apple.recovery.boot\\kernelcache", length) == 0) { val = "/com.apple.recovery.boot/kernelcache"; } +#endif // #if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan. #endif if (length && GetFileInfo(NULL, val, &flags, &cachetime) == 0) { @@ -493,6 +472,16 @@ void boot(int biosdev) } #if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan. } + else + { + if (getValueForKey(kKernelNameKey, &val, &length, &bootInfo->bootConfig)) + { + _BOOT_DEBUG_DUMP("Kernel key located in com.apple.Boot.plist\n"); + _BOOT_DEBUG_DUMP("length: %d, val: %s\n", length, val); + strcpy(bootFile, val); + kernelSpecified = true; + } + } #endif // #if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) #endif @@ -541,16 +530,19 @@ void boot(int biosdev) { _BOOT_DEBUG_DUMP("Warning: kernelcache will be ignored!\n"); - /* True when 'Kernel Cache' is set in com.apple.Boot.plist + // True when 'Kernel Cache' is set in com.apple.Boot.plist if (gPlatform.KernelCacheSpecified == true) { sprintf(bootFile, "%s", bootInfo->bootFile); - } */ + } #if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan. -// else -// { - sprintf(bootFile, "/System/Library/Kernels/%s", bootInfo->bootFile); -// } + else + { + if (!kernelSpecified) + { + sprintf(bootFile, "/System/Library/Kernels/%s", bootInfo->bootFile); + } + } #endif } else @@ -778,7 +770,7 @@ void boot(int biosdev) // _BOOT_DEBUG_SLEEP(6); // Switch to graphics mode and show the (white) Apple logo on a black/gray background. - showBootLogo(bootRecoveryHD); + showBootLogo(); } _BOOT_DEBUG_DUMP("execKernel-8\n"); diff --git a/i386/boot2/boot.h b/i386/boot2/boot.h index a09b6da..c7604bc 100755 --- a/i386/boot2/boot.h +++ b/i386/boot2/boot.h @@ -104,7 +104,7 @@ extern char bootPrompt[]; * bootlogo.c */ -extern void showBootLogo(bool aBootRecoveryHDFlag); +extern void showBootLogo(); /* * fake_efi.c diff --git a/i386/boot2/bootlogo.c b/i386/boot2/bootlogo.c index a2ec585..1d837f3 100755 --- a/i386/boot2/bootlogo.c +++ b/i386/boot2/bootlogo.c @@ -144,7 +144,7 @@ int convertImage(unsigned short width, unsigned short height, const unsigned cha //============================================================================== -void showBootLogo(bool aBootRecoveryHDFlag) +void showBootLogo() { setVideoMode(GRAPHICS_MODE); diff --git a/i386/libsaio/bootstruct.h b/i386/libsaio/bootstruct.h index fcea25c..d8f5dd0 100755 --- a/i386/libsaio/bootstruct.h +++ b/i386/libsaio/bootstruct.h @@ -97,7 +97,8 @@ CSR_ALLOW_KERNEL_DEBUGGER | \ CSR_ALLOW_APPLE_INTERNAL | \ CSR_ALLOW_UNRESTRICTED_DTRACE | \ - CSR_ALLOW_UNRESTRICTED_NVRAM) + CSR_ALLOW_UNRESTRICTED_NVRAM | \ + CSR_ALLOW_DEVICE_CONFIGURATION) #endif // Snapshot constants with supported version / revision info. diff --git a/i386/libsaio/cpu.c b/i386/libsaio/cpu.c index 219374f..2f76821 100644 --- a/i386/libsaio/cpu.c +++ b/i386/libsaio/cpu.c @@ -203,7 +203,7 @@ void checkFlexRatioMSR(void) if (msr & bit(16)) // Flex ratio enabled? { uint8_t flexRatio = ((msr >> 8) & 0xff); - + // Sanity checks. if (flexRatio < gPlatform.CPU.MinBusRatio || flexRatio > gPlatform.CPU.MaxBusRatio) { diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index af6309e..d3ad72c 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -369,6 +369,12 @@ void initCPUStruct(void) hiBit = 31; break; + case CPU_MODEL_SKYLAKE: + case CPU_MODEL_SKYLAKE_H_S: + CoreBridgeType = SKYLAKE; + hiBit = 31; + break; + case CPU_MODEL_NEHALEM: case CPU_MODEL_NEHALEM_EX: case CPU_MODEL_FIELDS: @@ -420,7 +426,7 @@ void initCPUStruct(void) requestMaxTurbo(maxBusRatio); } - if (CoreBridgeType) // (SandyBridge || IvyBridge || Haswell || Broadwell) + if (CoreBridgeType) // (SandyBridge || IvyBridge || Haswell || Broadwell || SkyLake) { // gPlatform.CPU.Type += CoreBridgeType; @@ -428,25 +434,17 @@ void initCPUStruct(void) gPlatform.CPU.TDP = getTDP(); #endif qpiSpeed = 0; // No QPI but DMI for Sandy Bridge and greater processors. - - // Disable C1/C3 state auto demotion i.e. it won't change C3/C6/C7 requests to C1/C3. - // wrmsr64(MSR_PKG_CST_CONFIG_CONTROL, 0x1E000003ULL); - - // Disable EIST Hardware coordination (letting AICPUPM.kext handle it). - // msr = rdmsr64(MSR_MISC_PWR_MGMT); - // wrmsr64(MSR_MISC_PWR_MGMT, (msr | 1)); - // Disable I/O MWAIT Redirection. - // msr = rdmsr64(MSR_PKG_CST_CONFIG_CONTROL); - // wrmsr64(MSR_MISC_PWR_MGMT, (msr & 0xFFFEFBFF)); + // Check bit-15 of MSR 0xE2 to see if it is locked. + msr = rdmsr64(MSR_PKG_CST_CONFIG_CONTROL); - // wrmsr64(MSR_PKG_POWER_LIMIT, 0x4283E800DD8230); - // wrmsr64(MSR_PP0_CURRENT_CONFIG, 0x40101414000002F8); - // wrmsr64(MSR_PP0_POWER_LIMIT, 0); - // wrmsr64(MSR_PP1_POWER_LIMIT, 0); - - // wrmsr64(MSR_TURBO_RATIO_LIMIT, 0x25252525); +#if PATCH_XCPI_SCOPE_MSRS + gPlatform.CPU.CstConfigMsrLocked = (msr & 0x8000); +#endif +#if DEBUG_CPU + printf("MSR_PKG_CST_CONFIG_CONTROL(locked): 0x%x\n", msr); +#endif checkFlexRatioMSR(); } #endif // #if INTEL_CORE_TECHNOLOGY diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index 75ff4c5..72653f2 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -183,12 +183,20 @@ #define CPU_MODEL_HASWELL_ULT 0x45 #define CPU_MODEL_CRYSTALWELL 0x46 +#define CPU_MODEL_BROADWELL 0x3D +#define CPU_MODEL_BROADWELL_ULX 0x3D #define CPU_MODEL_BROADWELL_ULT 0x3D +#define CPU_MODEL_BROADWELL_H 0x47 +#define CPU_MODEL_BRYSTALWELL 0x4C + +#define CPU_MODEL_SKYLAKE 0x4E +#define CPU_MODEL_SKYLAKE_H_S 0x5E #define DALES_BRIDGE 1 #define SANDY_BRIDGE 2 #define IVY_BRIDGE 4 #define HASWELL 8 #define BROADWELL 16 +#define SKYLAKE 32 #endif /* !__LIBSAIO_CPU_ESSENTIALS_H */ diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index 59f0c80..fc34646 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -131,6 +131,7 @@ void initEFITree(void) { _EFI_DEBUG_DUMP("Adding FSBFrequency property (%dMHz)\n", (gPlatform.CPU.FSBFrequency / 1000)); DT__AddProperty(platformNode, "FSBFrequency", sizeof(uint64_t), &gPlatform.CPU.FSBFrequency); + // DT__AddProperty(platformNode, "ARTFrequency", sizeof(uint64_t), &gPlatform.CPU.FSBFrequency); } Node * chosenNode = DT__AddChild(gPlatform.DT.RootNode, "chosen"); @@ -252,6 +253,10 @@ void initEFITree(void) // jne 0x17e55 (next) DT__AddProperty(chosenNode, "random-seed", sizeof(seedBuffer), (EFI_UINT8*) &seedBuffer); + + DT__AddProperty(chosenNode, "booter-name", 12, "bootbase.efi"); + DT__AddProperty(chosenNode, "booter-version", 11, "version:307"); + DT__AddProperty(chosenNode, "booter-build-time", 28, "Fri Sep 4 15:34:00 PDT 2015"); } #endif diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index e2fe7dd..6f42695 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -45,19 +45,22 @@ #define LC_MAIN (0x28|LC_REQ_DYLD) /* replacement for LC_UNIXTHREAD */ #endif -#define NVRAM_GUID_UINT64 0x3530454445314434 -#define OPTIONS_STRING_UINT64 0x736e6f6974706f2f - // Load MKext(s) or separate kexts (default behaviour / behavior). bool gLoadKernelDrivers = true; // Private functions. -static long initKernelVersionInfo(unsigned long cmdbase, long listSize, unsigned int textSegmentVMAddress); +#if (PATCH_KEXT_LOADING && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) + static long patchLoadExecutable(unsigned long cmdBase, long listSize, unsigned long textSegmentAddress, unsigned long vldSegmentAddress); +#endif + +static long initKernelVersionInfo(unsigned long cmdbase, long listSize, unsigned int textSegmentAddress); static long DecodeSegment(long cmdBase, unsigned int*load_addr, unsigned int *load_size); static long DecodeUnixThread(long cmdBase, unsigned int *entry); +#define ADD_SYMTAB 1 + #if ADD_SYMTAB -static long DecodeSymbolTable(long cmdBase); + static long DecodeSymbolTable(long cmdBase); #endif static unsigned long gBinaryAddress; @@ -127,23 +130,24 @@ long ThinFatFile(void **binary, unsigned long *length) long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) { - long ret = -1; - - unsigned int vmaddr = ~0; - unsigned int vmend = 0; - unsigned int entry = 0; - unsigned int load_addr = 0; - unsigned int load_size = 0; - unsigned int textSegmentVMAddress = 0; - - - unsigned long ncmds = 0; - unsigned long cmdBase = 0; - unsigned long cmd = 0; - unsigned long cmdsize = 0; - unsigned long cmdstart = 0; - unsigned long cnt = 0; - unsigned long listSize = 0; + long ret = -1; + long sectionNumber = 0; + + unsigned int vmaddr = ~0; + unsigned int vmend = 0; + unsigned int entry = 0; + unsigned int load_addr = 0; + unsigned int load_size = 0; + unsigned int textSegmentAddress = 0; + unsigned int vldSegmentAddress = 0; + + unsigned long ncmds = 0; + unsigned long cmdBase = 0; + unsigned long cmd = 0; + unsigned long cmdsize = 0; + unsigned long cmdstart = 0; + unsigned long cnt = 0; + unsigned long listSize = 0; gBinaryAddress = (unsigned long)binary; @@ -209,10 +213,16 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) { case LC_SEGMENT: case LC_SEGMENT_64: - // Returns 1 for __TEXT segment. - if (DecodeSegment(cmdBase, &load_addr, &load_size)) + sectionNumber = DecodeSegment(cmdBase, &load_addr, &load_size); + + if (sectionNumber == 1) // __TEXT,__text + { + textSegmentAddress = cmdBase; + ret = 0; + } + else if (sectionNumber == 25) // __KLD,__text { - textSegmentVMAddress = load_addr; + vldSegmentAddress = cmdBase; ret = 0; } @@ -223,9 +233,12 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) } break; - + case LC_SYMTAB: - initKernelVersionInfo(cmdBase, listSize, textSegmentVMAddress); + initKernelVersionInfo(cmdBase, listSize, textSegmentAddress); +#if (PATCH_KEXT_LOADING && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) + patchLoadExecutable(cmdBase, listSize, textSegmentAddress, vldSegmentAddress); +#endif break; case LC_MAIN: /* Mountain Lion's replacement for LC_UNIXTHREAD */ @@ -274,6 +287,163 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) return ret; } +#if (PATCH_KEXT_LOADING && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) + +//============================================================================== +// Private function. Called from DecodeMachO() + +static long patchLoadExecutable(unsigned long cmdBase, long listSize, unsigned long textSegmentAddress, unsigned long vldSegmentAddress) +{ + // printf("patchLoadExecutable() called\n"); + // sleep(1); + + char * symbolName = NULL; + + // Skip the first 3000 symbols, to make it located our target quicker. + int skippedSymbolCount = 0; // (3000 * listSize); + + long symbolNumber = 0; + + struct symtab_command * symtab = (struct symtab_command *)cmdBase; + struct segment_command_64 * textSegment = (struct segment_command_64 *)textSegmentAddress; + // struct segment_command_64 * vldSegment = (struct segment_command_64 *)vldSegmentAddress; + + void * stringTable = (void *)(gBinaryAddress + symtab->stroff); + + uint32_t pointer = (gBinaryAddress + symtab->symoff + skippedSymbolCount); + + while (symbolNumber < symtab->nsyms) + { + struct nlist_64 * nl = (struct nlist_64 *)pointer; + +#if PATCH_KEXT_LOADING + if ((nl->n_sect == 1 /* __TEXT,__text */) && nl->n_value) + { + symbolName = (char *)stringTable + nl->n_un.n_strx; + + if (strcmp(symbolName, "__ZN6OSKext14loadExecutableEv") == 0) + { + int64_t offset = (nl->n_value - textSegment->vmaddr); + uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); + uint64_t endAddress = (startAddress + 0x200); + + /* printf("__ZN6OSKext14loadExecutableEv found!\n"); + printf("offset..............: 0x%llx\n", offset); + printf("textSegment->vmaddr.: 0x%llx\n", textSegment->vmaddr); + printf("textSegment->fileoff: 0x%llx\n", textSegment->fileoff); + printf("startAddress........: 0x%llx\n", startAddress); + printf("endAddress..........: 0x%llx\n", endAddress); + sleep(5); */ + + unsigned char * p = (unsigned char *)startAddress; + + for (; p <= (unsigned char *)endAddress; p++) + { + if (*(uint64_t *)p == LOAD_EXECUTABLE_TARGET_UINT64) + { + /* printf("Found @ 0x%llx ", (uint64_t)p - startAddress); + printf("Symbol-number: %ld\n", (symbolNumber + (skippedSymbolCount / listSize) + 1)); + sleep(3); */ + + *(uint64_t *)p = LOAD_EXECUTABLE_PATCH_UINT64; + p = (unsigned char *)endAddress; + } + } + } + } +#endif + +#if PATCH_XCPI_SCOPE_MSRS + #if PATCH_KEXT_LOADING + else + #endif + if (((nl->n_sect == 8 /* __DATA,__data */) && nl->n_value) && gPlatform.CPU.CstConfigMsrLocked) + { + symbolName = (char *)stringTable + nl->n_un.n_strx; + + if (strcmp(symbolName, "_xcpm_core_scope_msrs") == 0) + { + int64_t offset = (nl->n_value - textSegment->vmaddr); + uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); + uint64_t endAddress = (startAddress + 0x3f); + + /* printf("_xcpm_core_scope_msrs found!\n"); + printf("offset..............: 0x%llx\n", offset); + printf("textSegment->vmaddr.: 0x%llx\n", textSegment->vmaddr); + printf("textSegment->fileoff: 0x%llx\n", textSegment->fileoff); + printf("startAddress........: 0x%llx\n", startAddress); + printf("endAddress..........: 0x%llx\n", endAddress); + sleep(5); */ + + unsigned char * p = (unsigned char *)startAddress; + + for (; p <= (unsigned char *)endAddress; p++) + { + // Note: We don't need this check. + if (*(uint64_t *)p == XCPM_SCOPE_MSRS_TARGET_UINT64) + { + /* printf("Found @ 0x%llx ", (uint64_t)p - startAddress); + printf("Symbol-number: %ld\n", (symbolNumber + (skippedSymbolCount / listSize) + 1)); + sleep(3); */ + + *(uint64_t *)p = 0x0000000000000000ULL; + p += 0x30; + *(uint64_t *)p = 0x0000000000000000ULL; + p += 0x30; + *(uint64_t *)p = 0x0000000000000000ULL; + p = (unsigned char *)endAddress; + } + } + } + } +#endif + +#if PATCH_LOAD_EXTRA_KEXTS + #if (PATCH_KEXT_LOADING || PATCH_XCPI_SCOPE_MSRS) + else + #endif + if ((nl->n_sect == 25 / * __KLD,__text * /) && nl->n_value) + { + symbolName = (char *)stringTable + nl->n_un.n_strx; + + if (strcmp(symbolName, "__ZN12KLDBootstrap21readStartupExtensionsEv") == 0) + { + int64_t offset = (nl->n_value - textSegment->vmaddr); + uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); + uint64_t endAddress = (startAddress + 0x3f); + + /* printf("__ZN12KLDBootstrap21readStartupExtensionsEv found!\n"); + printf("offset..............: 0x%llx\n", offset); + printf("vldSegment->vmaddr..: 0x%llx\n", vldSegment->vmaddr); + printf("vldSegment->fileoff.: 0x%llx\n", vldSegment->fileoff); + printf("startAddress........: 0x%llx\n", startAddress); + printf("endAddress..........: 0x%llx\n", endAddress); + sleep(5); */ + + unsigned char * p = (unsigned char *)startAddress; + + for (; p <= (unsigned char *)endAddress; p++) + { + if (*(uint64_t *)p == READ_STARTUP_EXTENSIONS_TARGET_UINT64) + { + /* printf("Found @ 0x%llx ", (uint64_t)p - startAddress); + printf("Symbol-number: %ld\n", (symbolNumber + (skippedSymbolCount / listSize) + 1)); + sleep(3); */ + + *(uint64_t *)p = READ_STARTUP_EXTENSIONS_PATCH_UINT64; + p = (unsigned char *)endAddress; + } + } + } + } +#endif + symbolNumber++; + pointer += listSize; // Point to next symbol. + } + + return 0; +} +#endif //============================================================================== // Private function. Called from DecodeMachO() @@ -311,41 +481,40 @@ static long initKernelVersionInfo(unsigned long cmdBase, long listSize, unsigned uint32_t pointer = gBinaryAddress + symtab->symoff + ((symtab->nsyms - 1) * listSize); +#if ((MAKE_TARGET_OS & SNOW_LEOPARD) == SNOW_LEOPARD) if (gPlatform.ArchCPUType == CPU_TYPE_X86_64) { +#endif struct nlist_64 * nl = (struct nlist_64 *)pointer; while (symbolNumber > 0) { nl = (struct nlist_64 *)pointer; - if (nl->n_sect && nl->n_value) + if ((nl->n_sect == 2 /* __TEXT,__const */) && nl->n_value) { symbolName = (char *)stringTable + nl->n_un.n_strx; symbolLength = strlen(symbolName); symbolOffset = (nl->n_value - textSegmentVMAddress); - if (symbolLength) + if (symbolLength && (strcmp(symbolName, targetSymbols[index]) == 0)) { - if (strcmp(symbolName, targetSymbols[index]) == 0) + switch(index) { - switch(index) - { - case 0: - gPlatform.KERNEL.versionRevision = (uint8_t)loadBuffer[symbolOffset]; - index++; - break; - - case 1: - gPlatform.KERNEL.versionMinor = (uint8_t)loadBuffer[symbolOffset]; - index++; - break; - - case 2: - gPlatform.KERNEL.versionMajor = (uint8_t)loadBuffer[symbolOffset]; - symbolNumber = 0; - break; - } + case 0: + gPlatform.KERNEL.versionRevision = (uint8_t)loadBuffer[symbolOffset]; + index++; + break; + + case 1: + gPlatform.KERNEL.versionMinor = (uint8_t)loadBuffer[symbolOffset]; + index++; + break; + + case 2: + gPlatform.KERNEL.versionMajor = (uint8_t)loadBuffer[symbolOffset]; + symbolNumber = 0; + break; } } } @@ -353,6 +522,7 @@ static long initKernelVersionInfo(unsigned long cmdBase, long listSize, unsigned symbolNumber--; pointer -= listSize; } +#if ((MAKE_TARGET_OS & SNOW_LEOPARD) == SNOW_LEOPARD) } else // 32-bit compatibility code. { @@ -362,33 +532,30 @@ static long initKernelVersionInfo(unsigned long cmdBase, long listSize, unsigned { nl = (struct nlist *)pointer; - if (nl->n_sect && nl->n_value) + if ((nl->n_sect == 2 /* __TEXT,__const */) && nl->n_value) { symbolName = (char *)stringTable + nl->n_un.n_strx; symbolLength = strlen(symbolName); symbolOffset = (nl->n_value - textSegmentVMAddress); - if (symbolLength) + if (symbolLength && (strcmp(symbolName, targetSymbols[index]) == 0)) { - if (strcmp(symbolName, targetSymbols[index]) == 0) + switch(index) { - switch(index) - { - case 0: - gPlatform.KERNEL.versionRevision = (uint8_t)loadBuffer[symbolOffset]; - index++; - break; - - case 1: - gPlatform.KERNEL.versionMinor = (uint8_t)loadBuffer[symbolOffset]; - index++; - break; - - case 2: - gPlatform.KERNEL.versionMajor = (uint8_t)loadBuffer[symbolOffset]; - symbolNumber = 0; - break; - } + case 0: + gPlatform.KERNEL.versionRevision = (uint8_t)loadBuffer[symbolOffset]; + index++; + break; + + case 1: + gPlatform.KERNEL.versionMinor = (uint8_t)loadBuffer[symbolOffset]; + index++; + break; + + case 2: + gPlatform.KERNEL.versionMajor = (uint8_t)loadBuffer[symbolOffset]; + symbolNumber = 0; + break; } } } @@ -397,6 +564,8 @@ static long initKernelVersionInfo(unsigned long cmdBase, long listSize, unsigned pointer -= listSize; } } +#endif + #if DEBUG printf("gPlatform.KERNEL.versionMmR: %d.%d.%d\n", gPlatform.KERNEL.versionMajor, gPlatform.KERNEL.versionMinor, gPlatform.KERNEL.versionRevision); sleep(5); @@ -411,32 +580,32 @@ static long initKernelVersionInfo(unsigned long cmdBase, long listSize, unsigned static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *load_size) { - char *segname = NULL; + char *segmentName = NULL; - long retValue = 0; - long vmsize = 0; - long filesize = 0; + long retValue = 0; + long vmsize = 0; + long filesize = 0; - unsigned long vmaddr = 0; - unsigned long fileaddr = 0; + unsigned long vmaddr = 0; + unsigned long fileAddress = 0; if (((long *)cmdBase)[0] == LC_SEGMENT_64) { struct segment_command_64 *segCmd = (struct segment_command_64 *)cmdBase; - vmaddr = (segCmd->vmaddr & 0x3fffffff); - vmsize = segCmd->vmsize; - fileaddr = (gBinaryAddress + segCmd->fileoff); - filesize = segCmd->filesize; - segname = segCmd->segname; + vmaddr = (segCmd->vmaddr & 0x3fffffff); + vmsize = segCmd->vmsize; + fileAddress = (gBinaryAddress + segCmd->fileoff); + filesize = segCmd->filesize; + segmentName = segCmd->segname; } else { struct segment_command *segCmd = (struct segment_command *)cmdBase; - vmaddr = (segCmd->vmaddr & 0x3fffffff); - vmsize = segCmd->vmsize; - fileaddr = (gBinaryAddress + segCmd->fileoff); - filesize = segCmd->filesize; - segname = segCmd->segname; + vmaddr = (segCmd->vmaddr & 0x3fffffff); + vmsize = segCmd->vmsize; + fileAddress = (gBinaryAddress + segCmd->fileoff); + filesize = segCmd->filesize; + segmentName = segCmd->segname; } // Pre-flight checks. @@ -454,7 +623,7 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l * __PRELINK_TEXT, __PRELINK_STATE, __PRELINK_INFO versus __PRELINK in 10.5 */ - if (gLoadKernelDrivers && strncmp(segname, "__PRELINK", 9) == 0) + if (gLoadKernelDrivers && strncmp(segmentName, "__PRELINK", 9) == 0) { #if DEBUG printf("Setting: gLoadKernelDrivers to false.\n"); @@ -463,15 +632,19 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l #endif gLoadKernelDrivers = false; } - else if (strncmp(segname, "__TEXT", 6) == 0) + else if (strncmp(segmentName, "__TEXT", 6) == 0) { retValue = 1; } + else if (strncmp(segmentName, "__KLD", 5) == 0) + { + retValue = 25; + } // Copy from file load area. if (filesize > 0) { - bcopy((char *)fileaddr, (char *)vmaddr, vmsize > filesize ? filesize : vmsize); + bcopy((char *)fileAddress, (char *)vmaddr, vmsize > filesize ? filesize : vmsize); } // Zero space at the end of the segment. diff --git a/i386/libsaio/platform.c b/i386/libsaio/platform.c index 3ecf4ce..a01bceb 100644 --- a/i386/libsaio/platform.c +++ b/i386/libsaio/platform.c @@ -125,12 +125,11 @@ void enableHPET(void) //============================================================================== // Public function. Called from boot/common_boot only. -void initPlatform(int biosDevice, bool bootRecoveryHD) +void initPlatform(int biosDevice) { memset(&gPlatform, 0, sizeof(gPlatform)); gPlatform.BootMode = kBootModeQuiet; // no longer defaults to 0 aka kBootModeNormal - gPlatform.BootRecoveryHD = bootRecoveryHD; // Copied from cpu/dynamic_data.h to make printf work this early on. #if DEBUG_STATE_ENABLED @@ -284,11 +283,29 @@ void initPlatform(int biosDevice, bool bootRecoveryHD) _PLATFORM_DEBUG_SLEEP(5); #endif + initKernelBootConfig(); + #if RECOVERY_HD_SUPPORT - _PLATFORM_DEBUG_DUMP("gPlatform.BootRecoveryHD: %s\n", gPlatform.BootRecoveryHD ? "True" : "False"); -#endif + int version = 1; - initKernelBootConfig(); + printf("\nRecovery HD boot support enabled\n"); + printf("Recovery HD boot support is: enabled in version %d!\n", version); + + int key = (bgetc() & 0xff); + printf("key: %d\n", key); + + if ( ((key |= 0x20) == 0x33) || ((key |= 0x20) == 114) ) + { + gPlatform.BootRecoveryHD = true; + gPlatform.BootMode = kBootModeNormal; + } + + printf("gPlatform.BootRecoveryHD: %s\n", gPlatform.BootRecoveryHD ? "True" : "False"); + sleep(1); +#else + gPlatform.BootMode = kBootModeNormal; + gPlatform.BootRecoveryHD = false; +#endif #if (LOAD_MODEL_SPECIFIC_EFI_DATA || BLACKMODE) /* diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 22d99d1..6ecfbfb 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -75,8 +75,11 @@ #define IMAC_142 (IMAC | ( 7 << 15)) #define IMAC_143 (IMAC | ( 8 << 15)) #define IMAC_144 (IMAC | ( 9 << 15)) -#define IMAC_152 (IMAC | (10 << 15)) -#define IMAC_151 IMAC // Defaults to iMac15,1 +#define IMAC_151 (IMAC | (10 << 15)) +#define IMAC_152 (IMAC | (11 << 15)) +#define IMAC_161 (IMAC | (12 << 15)) +#define IMAC_162 (IMAC | (13 << 15)) +#define IMAC_171 IMAC // Defaults to iMac17,1 #define MACBOOK_41 (MACBOOK | ( 1 << 15)) #define MACBOOK_81 (MACBOOK | ( 2 << 15)) // Defaults to MacBook8,1 @@ -252,6 +255,10 @@ typedef struct _PlatformInfo_t struct CPU { bool Mobile; // Set to true (in cpu/dynamic_data.h) for Mobile CPU's. + +#if PATCH_XCPI_SCOPE_MSRS + bool CstConfigMsrLocked; // Initialised in cpu/dynamic_data.h and used in load.c +#endif uint16_t Type; // CPU type ('cpu-type') used in the SMBIOS patcher. uint32_t Features; // CPU Features like MMX, SSE2, VT, MobileCPU uint32_t Vendor; // Vendor @@ -383,7 +390,7 @@ extern void initCPUStruct(void); /* platform.c */ extern PlatformInfo_t gPlatform; -extern void initPlatform(int biosDevice, bool bootRecoveryHD); +extern void initPlatform(int biosDevice); extern cpu_type_t getArchCPUType(void); From fd3f8e4574267cef579bdfafaa52037dcc6b6bb8 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Tue, 27 Oct 2015 05:22:54 +0100 Subject: [PATCH 530/623] Whitespace only change. --- i386/libsaio/load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index 6f42695..903ff10 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -402,7 +402,7 @@ static long patchLoadExecutable(unsigned long cmdBase, long listSize, unsigned l #if (PATCH_KEXT_LOADING || PATCH_XCPI_SCOPE_MSRS) else #endif - if ((nl->n_sect == 25 / * __KLD,__text * /) && nl->n_value) + if ((nl->n_sect == 25 /* __KLD,__text */) && nl->n_value) { symbolName = (char *)stringTable + nl->n_un.n_strx; From 0ef1ff7600399d8c1f7b5d6817f6600ff1f7f1aa Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Mon, 2 Nov 2015 14:27:34 +0100 Subject: [PATCH 531/623] Preparations for ART support. --- i386/libsaio/efi.c | 6 +++++- i386/libsaio/platform.h | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index fc34646..04bb88a 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -131,7 +131,11 @@ void initEFITree(void) { _EFI_DEBUG_DUMP("Adding FSBFrequency property (%dMHz)\n", (gPlatform.CPU.FSBFrequency / 1000)); DT__AddProperty(platformNode, "FSBFrequency", sizeof(uint64_t), &gPlatform.CPU.FSBFrequency); - // DT__AddProperty(platformNode, "ARTFrequency", sizeof(uint64_t), &gPlatform.CPU.FSBFrequency); + } + + if (gPlatform.XHCI.ARTFrequency) + { + DT__AddProperty(platformNode, "ARTFrequency", sizeof(uint64_t), &gPlatform.XHCI.ARTFrequency); } Node * chosenNode = DT__AddChild(gPlatform.DT.RootNode, "chosen"); diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 6ecfbfb..e563a8e 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -379,6 +379,11 @@ typedef struct _PlatformInfo_t } DMI; */ } SMBIOS; + struct XHCI + { + uint64_t ARTFrequency; + } XHCI; + } PlatformInfo_t; From e9e33081bc633f5e0cd660e4ab08e9936a710cd8 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Mon, 2 Nov 2015 14:28:47 +0100 Subject: [PATCH 532/623] Add selective SSDT table drop support. --- i386/libsaio/acpi/patcher.h | 56 +++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 11 deletions(-) diff --git a/i386/libsaio/acpi/patcher.h b/i386/libsaio/acpi/patcher.h index 8a402fb..9f4ae0d 100644 --- a/i386/libsaio/acpi/patcher.h +++ b/i386/libsaio/acpi/patcher.h @@ -290,9 +290,9 @@ bool patchFACPTable(ENTRIES * xsdtEntries, int tableIndex, int dropOffset) { // Yes. Get the GNVS address. unsigned int factoryDSDT_GNVS_Address = (*(uint32_t *)(opRegFactoryDSDTAddress + 8)); - - _ACPI_DEBUG_DUMP("GNVS address (0x%x) found @: 0x%x\n", factoryDSDT_GNVS_Address, opRegFactoryDSDTAddress); - +#if (DEBUG_ACPI || DUMP_OPREGION_GNVS_ADDRESS) + printf("GNVS address (0x%x) found @: 0x%x\n", factoryDSDT_GNVS_Address, opRegFactoryDSDTAddress); +#endif // Now try to locate the OperationRegion (GNVS, SystemMemory, 0xNNNNNNNN, 0xNNNN) in the patched DSDT. unsigned int opRegPatchedDSDTAddress = search64bitPattern(patchedFADT->DSDT + sizeof(ACPI_DSDT), 2000, OP_REGION_GNVS_ADDRESS_LE); @@ -300,9 +300,9 @@ bool patchFACPTable(ENTRIES * xsdtEntries, int tableIndex, int dropOffset) { // Yes. Get the GNVS address. unsigned int patchedDSDT_GNVS_Address = (*(uint32_t *)(opRegPatchedDSDTAddress + 8)); - - _ACPI_DEBUG_DUMP("GNVS address (0x%x) found @: 0x%08x\n", patchedDSDT_GNVS_Address, opRegPatchedDSDTAddress); - +#if (DEBUG_ACPI || DUMP_OPREGION_GNVS_ADDRESS) + printf("GNVS address (0x%x) found @: 0x%08x\n", patchedDSDT_GNVS_Address, opRegPatchedDSDTAddress); +#endif // Are both GNVS address values the same? if (patchedDSDT_GNVS_Address != factoryDSDT_GNVS_Address) { @@ -314,8 +314,9 @@ bool patchFACPTable(ENTRIES * xsdtEntries, int tableIndex, int dropOffset) _ACPI_DEBUG_DUMP("Done.\n"); } } - - _ACPI_DEBUG_SLEEP(1); +#if (DEBUG_ACPI || DUMP_OPREGION_GNVS_ADDRESS) + sleep(1); +#endif } #endif // VERIFY_OPREGION_GNVS_ADDRESS @@ -410,6 +411,10 @@ void setupACPI(void) _ACPI_DEBUG_DUMP("\n"); +#if DROP_SELECTED_SSDT_TABLE + const char * oemTableIdTargets[] = OEM_TABLE_ID_TARGETS; +#endif + int cti = 0; // CustomTableIndex for (; customTables[cti].table; cti++) @@ -537,9 +542,38 @@ void setupACPI(void) } else if (essentialTables[idx].action & kDropTable) { - _ACPI_DEBUG_DUMP("Dropping table: %s (on request)\n", tableName); - - dropOffset++; +#if DROP_SELECTED_SSDT_TABLE + short tid = 0; + + if (tableSignature == SSDT_TABLE_SIGNATURE) + { + ACPI_SSDT * currentTable = (ACPI_SSDT *)table; + + _ACPI_DEBUG_DUMP("Checking SSDT(%s)\n", currentTable->OEMTableId); + + do + { + if (strncmp(currentTable->OEMTableId, oemTableIdTargets[tid], strlen(currentTable->OEMTableId)) == 0) + { + _ACPI_DEBUG_DUMP("Dropping table: %s (on request)\n", tableName); + + dropOffset++; + + break; + } + + tid++; + } while (oemTableIdTargets[tid] != 0); + } + else + { +#endif + _ACPI_DEBUG_DUMP("Dropping table: %s (on request)\n", tableName); + + dropOffset++; +#if DROP_SELECTED_SSDT_TABLE + } +#endif } } From 5f09555201c8c9fb2cc3479470af151d1de39a71 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Mon, 2 Nov 2015 14:29:05 +0100 Subject: [PATCH 533/623] White space only change. --- i386/libsaio/sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/sys.c b/i386/libsaio/sys.c index 4cc4a40..a086505 100755 --- a/i386/libsaio/sys.c +++ b/i386/libsaio/sys.c @@ -467,7 +467,7 @@ int open(const char * path, int flags) // Load entire file into memory. Unnecessary open() calls must be avoided. gFSLoadAddress = io->i_buf; io->i_filesize = bvr->fs_loadfile(bvr, (char *)filePath); - + if (io->i_filesize > 0) { return fdesc; @@ -665,7 +665,7 @@ int closedir(struct dirstuff * dirp) //============================================================================== -int readdir(struct dirstuff * dirp, const char ** name, long * flags,long * time) +int readdir(struct dirstuff * dirp, const char ** name, long * flags, long * time) { return dirp->dir_bvr->fs_getdirentry(dirp->dir_bvr, /* dirPath */ dirp->dir_path, From 62d46b0856f9af69c197f98d6bdd6301a01688a3 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Mon, 2 Nov 2015 14:29:31 +0100 Subject: [PATCH 534/623] Adding some new model data. --- i386/libsaio/smbios/model_data.h | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 92823c8..b01388f 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -85,12 +85,35 @@ #define SMB_PRODUCT_NAME "iMac15,2" #define SMB_BOARD_PRODUCT "Mac-FA842E06C61E91C5" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '5', ',', '2' } - #else // Defaults to iMac 15,1 - // Intel Core i5-4690 @ 3.50 GHz + #elif (TARGET_MODEL == IMAC_151) + // Intel Core i5-4690 @ 3.5 GHz #define SMB_BIOS_VERSION "IM151.88Z.0207.B00.1409291931" #define SMB_PRODUCT_NAME "iMac15,1" #define SMB_BOARD_PRODUCT "Mac-42FD25EABCABB274" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '5', ',', '1' } + #elif (TARGET_MODEL == IMAC_162) + // Intel Core i5-5575R @ 2.8 GHz & Intel Core i5-5675R @ 3.1 GHz + // Intel Iris Pro Graphics 6200 + // (21.5inch Late 2015) + #define SMB_BIOS_VERSION "IM162.88Z.0206.B00.1508281353" + #define SMB_PRODUCT_NAME "iMac16,2" + #define SMB_BOARD_PRODUCT "Mac-FFE5EF870D7BA81A" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '6', ',', '2' } + #elif (TARGET_MODEL == IMAC_171) + // Intel Core i5-6500 @ 3.2 GHz + // AMD Radeon R9 M390 + // (Retina 5k, 27inch Late 2015) + #define SMB_BIOS_VERSION "IM171.88Z.0105.B00.1509221819" + #define SMB_PRODUCT_NAME "iMac17,1" + #define SMB_BOARD_PRODUCT "Mac-DB15BD556843C820" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '7', ',', '1' } + /* #elif (TARGET_MODEL == IMAC_171) // Intel Core i5-6600 @ 3.3 GHz + // AMD Radeon R9 M395 + // (Retina 5k, 27inch Late 2015) + #define SMB_BIOS_VERSION "IM171.88Z.0105.B00.1509221819" + #define SMB_PRODUCT_NAME "iMac17,1" + #define SMB_BOARD_PRODUCT "Mac-B809C3757DA9BB8D" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '7', ',', '1' } */ #endif // ------------------------------------------------------------------------------------- #endif From 9e19f730adb7b6977e01b721164d506bfef8b1ec Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <chief@www.vumc.nl> Date: Mon, 11 Jan 2016 14:15:26 +0100 Subject: [PATCH 535/623] Adding new SMBOemSMCVersion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – Missing RAM types added. – Also reworded some of the comments. --- i386/libsaio/smbios/smbios.h | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/i386/libsaio/smbios/smbios.h b/i386/libsaio/smbios/smbios.h index f7ddf95..3be110f 100755 --- a/i386/libsaio/smbios/smbios.h +++ b/i386/libsaio/smbios/smbios.h @@ -481,10 +481,16 @@ static const char * SMBMemoryDeviceTypes[] = "DDR SDRAM", /* 12h DDR */ "DDR2 SDRAM", /* 13h DDR2 */ "DDR2 FB-DIMM", /* 14h DDR2 FB-DIMM */ - "RAM", /* 15h unused */ - "RAM", /* 16h unused */ - "RAM", /* 17h unused */ + "RESERVED", /* 15h Reserved */ + "RESERVED", /* 16h Reserved */ + "RESERVED", /* 17h Reserved */ "DDR3", /* 18h DDR3, chosen in [5776134] */ + "FBD2", /* 19h FBD2 */ + "DDR4", /* 1Ah DDR4 */ + "LPDDR", /* 1Bh LPDDR */ + "LPDDR2", /* 1Ch LPDDR2 */ + "LPDDR3", /* 1Dh LPDDR3 */ + "LPDDR3", /* 1Eh LPDDR5 */ }; static const int kSMBMemoryDeviceTypeCount = sizeof(SMBMemoryDeviceTypes) / sizeof(SMBMemoryDeviceTypes[0]); @@ -492,31 +498,40 @@ static const int kSMBMemoryDeviceTypeCount = sizeof(SMBMemoryDeviceTypes) / size // -// OEM Processor Type (Apple Specific - Type 0x83/131) +// OEM – Apple Processor Type (type 0x83/131) // struct SMBOemProcessorType { SMB_STRUCT_HEADER - SMBWord ProcessorType; + SMBWord ProcessorType; } __attribute__((packed)) SMBOemProcessorType; // -// OEM Processor Bus Speed (Apple Specific - Type 0x84/132) +// OEM – Apple Processor Bus Speed (type 0x84/132) // struct SMBOemProcessorBusSpeed { SMB_STRUCT_HEADER - SMBWord ProcessorBusSpeed; // MT/s unit + SMBWord ProcessorBusSpeed; // MT/s unit } __attribute__((packed)) SMBOemProcessorBusSpeed; // -// OEM Platform Feature (Apple Specific - Type 0x85/133 / AppleSMBIOS-43) +// OEM – Apple Platform Features (type 0x85/133 / AppleSMBIOS-43) // struct SMBOemPlatformFeature { SMB_STRUCT_HEADER - SMBWord PlatformFeature; + SMBWord PlatformFeature; } __attribute__((packed)) SMBOemPlatformFeature; + +// +// OEM – Apple SMC Version (type 0x86/134) +// +struct SMBOemSMCVersion +{ + SMB_STRUCT_HEADER + SMBString SMCVersion +} __attribute__((packed)) SMBOemSMCVersion; From 9546e0c460da21c9bc24c3b7490b9ca811f852c5 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <chief@www.vumc.nl> Date: Mon, 11 Jan 2016 14:16:21 +0100 Subject: [PATCH 536/623] Comment only change. --- i386/libsaio/load.c | 2 +- i386/libsaio/smbios.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index 903ff10..7603c43 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -379,7 +379,7 @@ static long patchLoadExecutable(unsigned long cmdBase, long listSize, unsigned l for (; p <= (unsigned char *)endAddress; p++) { - // Note: We don't need this check. + // Note: We don't really need this check. if (*(uint64_t *)p == XCPM_SCOPE_MSRS_TARGET_UINT64) { /* printf("Found @ 0x%llx ", (uint64_t)p - startAddress); diff --git a/i386/libsaio/smbios.c b/i386/libsaio/smbios.c index fb4be53..0830aa2 100755 --- a/i386/libsaio/smbios.c +++ b/i386/libsaio/smbios.c @@ -136,7 +136,7 @@ void setupSMBIOS(void) */ _SMBIOS_DEBUG_DUMP("newEPS->dmi.structureCount: %d\nnewEPS.dmi.tableLength: %d\n", newEPS->dmi.structureCount, newEPS->dmi.tableLength); - // Take care of possible checksum errors + // Calculate checksums newEPS->dmi.checksum = checksum8(&newEPS->dmi, sizeof(newEPS->dmi)); newEPS->checksum = checksum8(newEPS, sizeof(* newEPS)); From f71e890cf7012423168660baac311d0787262902 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <chief@www.vumc.nl> Date: Mon, 11 Jan 2016 14:18:08 +0100 Subject: [PATCH 537/623] Taking care of the bus frequency error. --- i386/libsaio/smbios/getters.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/i386/libsaio/smbios/getters.h b/i386/libsaio/smbios/getters.h index 09739a5..3867e2c 100755 --- a/i386/libsaio/smbios/getters.h +++ b/i386/libsaio/smbios/getters.h @@ -95,6 +95,11 @@ static SMBWord getFSBFrequency(void) { _SMBIOS_DEBUG_DUMP("In getFSBFrequency() = %d Hz\n", (gPlatform.CPU.FSBFrequency < 100500000) ? 0 : (gPlatform.CPU.FSBFrequency / 1000000)); + if (gPlatform.CPU.QPISpeed == 0) + { + return ((gPlatform.CPU.FSBFrequency / 1000000) / 4); + } + /* * Returning zero (0) here is invalid, but we can get away with it because * of XNU's check in tsc_init() which effectively catches the invalid value From efa5a66cbaeb31886cb1c40746f83700051b08fb Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <chief@www.vumc.nl> Date: Mon, 11 Jan 2016 15:59:54 +0100 Subject: [PATCH 538/623] Typo --- i386/libsaio/smbios/smbios.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/smbios/smbios.h b/i386/libsaio/smbios/smbios.h index 3be110f..3ff3953 100755 --- a/i386/libsaio/smbios/smbios.h +++ b/i386/libsaio/smbios/smbios.h @@ -533,5 +533,5 @@ struct SMBOemPlatformFeature struct SMBOemSMCVersion { SMB_STRUCT_HEADER - SMBString SMCVersion + SMBString SMCVersion; } __attribute__((packed)) SMBOemSMCVersion; From 4a341a04f6108bb5f4a1180db92825d79342ab7a Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <chief@www.vumc.nl> Date: Mon, 11 Jan 2016 17:17:07 +0100 Subject: [PATCH 539/623] SMBIOS extractor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – for use with: dmidecode --from-file SMBIOS.bin --- i386/libsaio/smbios/tools/smbiosXtract.c | 115 +++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100755 i386/libsaio/smbios/tools/smbiosXtract.c diff --git a/i386/libsaio/smbios/tools/smbiosXtract.c b/i386/libsaio/smbios/tools/smbiosXtract.c new file mode 100755 index 0000000..dbdec80 --- /dev/null +++ b/i386/libsaio/smbios/tools/smbiosXtract.c @@ -0,0 +1,115 @@ +/* + * + * Name : smbiosXtract + * Version : 0.0.1 + * Type : Command line tool + * Copyright : Pike R. Alpha (c) 2016 + * Description : SMBIOS extractor for use with: dmidecode --from-file SMBIOS.bin + * + * Usage : sudo ./smbiosXtract + * + * Compile with : cc smbiosXtract.c -o smbiosXtract -Wall -framework IOKit -framework CoreFoundation + * + * Updates : None so far. + * + */ + +#include <stdio.h> +#include <stdlib.h> +#include <sys/file.h> +#include <sys/stat.h> + +#include <IOKit/IOKitLib.h> +#include <CoreFoundation/CoreFoundation.h> + +#include "../smbios.h" + +//============================================================================== + +uint8_t checksum8(const uint8_t *cp, uint8_t length) +{ + uint8_t sum = 0; + uint8_t i = 0; + + for (; i < length; i++) + { + sum += *cp++; + } + + return sum; +} + +//============================================================================== + +int main(void) +{ + char dirspec[128]; + int filedesc = 0; + + mach_port_t masterPort; + io_service_t service = MACH_PORT_NULL; + CFDataRef dataRef; + + UInt8 entryPointLength = 0; + UInt16 tableLength = 0; + UInt32 bytesWritten = 0; + + IOMasterPort(MACH_PORT_NULL, &masterPort); + + //================================================================================== + + service = IOServiceGetMatchingService(masterPort, IOServiceMatching("AppleSMBIOS")); + + if (service) + { + dataRef = (CFDataRef) IORegistryEntryCreateCFProperty(service, CFSTR("SMBIOS-EPS"), kCFAllocatorDefault, kNilOptions); + + if (dataRef) + { + struct SMBEntryPoint * eps = (struct SMBEntryPoint *) CFDataGetBytePtr(dataRef); + entryPointLength = eps->entryPointLength; + tableLength = eps->dmi.tableLength; + + // Point table address to data. + eps->dmi.tableAddress = 0x20; + + // Zero out checksums. + eps->checksum = 0; + eps->dmi.checksum = 0; + + // Recalculate checksums. + eps->dmi.checksum = (256 - checksum8(CFDataGetBytePtr(dataRef) + 0x10, 0x0f)); + eps->checksum = (256 - checksum8(CFDataGetBytePtr(dataRef), 0x1f)); + + sprintf (dirspec, "SMBIOS.bin"); + filedesc = open(dirspec, O_WRONLY|O_CREAT|O_TRUNC, 0644); + + if (filedesc == -1) + { + printf("Error: Unable to open SMBIOS.bin!\n"); + close (filedesc); + CFRelease(dataRef); + } + else + { + bytesWritten = write(filedesc, (char *)CFDataGetBytePtr(dataRef), (entryPointLength + 1)); + close (filedesc); + CFRelease(dataRef); + dataRef = (CFDataRef) IORegistryEntryCreateCFProperty(service, CFSTR("SMBIOS"), kCFAllocatorDefault, kNilOptions); + + if (dataRef) + { + filedesc = open(dirspec, O_WRONLY|O_APPEND, 0644); + bytesWritten += write(filedesc, (char *)CFDataGetBytePtr(dataRef), tableLength); + printf("%d bytes written to SMBIOS.bin for use with: dmidecode --from-dump SMBIOS.bin\n", bytesWritten); + close (filedesc); + CFRelease(dataRef); + } + } + } + + IOObjectRelease(service); + } + + exit(0); +} From 5d4c440f7b8e2adc293d714142cab1de1731426b Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sat, 18 Jun 2016 13:49:29 +0200 Subject: [PATCH 540/623] Removing old debug output. --- i386/libsaio/hfs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/hfs.c b/i386/libsaio/hfs.c index b04f54e..676d176 100755 --- a/i386/libsaio/hfs.c +++ b/i386/libsaio/hfs.c @@ -514,8 +514,6 @@ long HFSGetFileBlock(CICell ih, char *filePath, unsigned long long *firstBlock) if ((result == -1) || ((flags & kFileTypeMask) != kFileTypeFlat)) { - printf("HFS: Resolve path %s failed\n", filePath); - return -1L; } @@ -586,8 +584,6 @@ static long ReadFile(void * file, uint64_t * length, void * base, uint64_t offse if (offset > fileLength) { - printf("Offset is too large.\n"); - return -1L; } @@ -918,6 +914,7 @@ static long ReadBTreeEntry(long btree, void * key, char * entry, long * dirIndex extent = (HFSExtentDescriptor *)&gHFSMDB->drCTExtRec; extentSize = SWAP_BE32(gHFSMDB->drCTFlSize); } + extentFile = kHFSCatalogFileID; } else @@ -1026,6 +1023,7 @@ static long ReadBTreeEntry(long btree, void * key, char * entry, long * dirIndex if (result != 0) { free(nodeBuf); + return -1; } From e83801f1913cb4596c88a566052b11c9332a6a21 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sat, 18 Jun 2016 13:49:55 +0200 Subject: [PATCH 541/623] Adding support for Sierra. --- Makefile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index be71745..230ee11 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ # - Yosemite support added (Pike R. Alpha, June 2014). # - Changed default from Mavericks to Yosemite (Pike R. Alpha, June 2014). # - El Capitan support added (Pike R. Alpha, June 2015). +# - Sierra support added (Pike R. Alpha, June 2016). # # @@ -55,16 +56,20 @@ VPATH = $(OBJROOT):$(SYMROOT) ifeq ($(MAKECMDGOALS),) # - # No OS build target given. Build for El Capitan (default). + # No OS build target given. Build for Sierra (default). # - MAKEGOAL = el-capitan - MAKE_TARGET_OS = 62; - MAKE_TARGET_OS_VER = 10.11 + MAKEGOAL = sierra + MAKE_TARGET_OS = 126; + MAKE_TARGET_OS_VER = 10.12 else # # Setting MAKE_TARGET_OS and MAKEGOAL based on OS build target. # - ifeq ($(MAKECMDGOALS), el-capitan) + ifeq ($(MAKECMDGOALS), sierra) + MAKEGOAL = sierra + MAKE_TARGET_OS = 126; + MAKE_TARGET_OS_VER = 10.12 + else ifeq ($(MAKECMDGOALS), el-capitan) MAKEGOAL = el-capitan MAKE_TARGET_OS = 62; MAKE_TARGET_OS_VER = 10.11 @@ -92,7 +97,7 @@ else endif # -# Export our make goal i.e. El Capitan, Yosemite, Mavericks, Mountain Lion, Lion or legacy (Snow Leopard or Leopard). +# Export our make goal i.e. Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion, Lion or legacy (Snow Leopard or Leopard). # export MAKEGOAL From 0e1a00e0c31dcf0f5f794991669b26c2b03b7617 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sat, 18 Jun 2016 13:50:51 +0200 Subject: [PATCH 542/623] Sierra/Skylake support and some missing model data added. --- i386/libsaio/platform.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index e563a8e..9a86c4d 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -30,8 +30,9 @@ #define LION 2 // Lion (the default). #define MOUNTAIN_LION 6 // Mountain Lion (includes Lion changes). #define MAVERICKS 10 // Mavericks (includes Lion changes). -#define YOSEMITE 26 // Yosemite (incl. Lion/Mavericks changes). -#define EL_CAPITAN 62 // El Capitan (incl. Lion/Mavericks/Yosemite changes). +#define YOSEMITE 26 // Yosemite (includes Lion and Mavericks changes). +#define EL_CAPITAN 62 // El Capitan (includes Lion/Mavericks and Yosemite changes). +#define SIERRA 126 // Sierra (includes Lion/Mavericks/Yosemite and El Capitan changes). //------------------------------------------------------------------------------ @@ -82,7 +83,9 @@ #define IMAC_171 IMAC // Defaults to iMac17,1 #define MACBOOK_41 (MACBOOK | ( 1 << 15)) -#define MACBOOK_81 (MACBOOK | ( 2 << 15)) // Defaults to MacBook8,1 +#define MACBOOK_81 (MACBOOK | ( 2 << 15)) +#define MACBOOK_82 (MACBOOK | ( 3 << 15)) +#define MACBOOK_91 MACBOOK // Defaults to MacBook9,1 #define MACBOOK_AIR_41 (MACBOOK_AIR | (1 << 15)) #define MACBOOK_AIR_42 (MACBOOK_AIR | (2 << 15)) @@ -104,7 +107,10 @@ #define MACBOOK_PRO_111 (MACBOOK_PRO | ( 9 << 15)) #define MACBOOK_PRO_112 (MACBOOK_PRO | (10 << 15)) #define MACBOOK_PRO_113 (MACBOOK_PRO | (11 << 15)) -#define MACBOOK_PRO_121 MACBOOK_PRO // Defaults to MacBookPro12,1 +#define MACBOOK_PRO_114 (MACBOOK_PRO | (12 << 15)) +#define MACBOOK_PRO_115 (MACBOOK_PRO | (13 << 15)) +#define MACBOOK_PRO_121 (MACBOOK_PRO | (14 << 15)) +#define MACBOOK_PRO_131 MACBOOK_PRO // Defaults to MacBookPro13,1 #define MACMINI_41 (MACMINI | (1 << 15)) #define MACMINI_51 (MACMINI | (2 << 15)) @@ -280,7 +286,8 @@ typedef struct _PlatformInfo_t uint64_t TSCFrequency; // TSC Frequency Hz uint64_t FSBFrequency; // FSB Frequency Hz uint64_t CPUFrequency; // CPU Frequency Hz - + uint64_t ARTFrequency; // ART Frequency Hz + uint32_t QPISpeed; // QuickPath Interconnect Bus Speed uint8_t NumberOfTurboRatios; // Jeroen: initialized in cpu.c and used in ACPI/ssdt_pr_generator.h @@ -378,12 +385,7 @@ typedef struct _PlatformInfo_t UInt8 CcdRevision; } DMI; */ } SMBIOS; - - struct XHCI - { - uint64_t ARTFrequency; - } XHCI; - + } PlatformInfo_t; From 43fe6c02466bef530c91f8813d43b80b49de66a6 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sat, 18 Jun 2016 13:51:53 +0200 Subject: [PATCH 543/623] Variable name change (for Skylake). --- i386/libsaio/efi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index 04bb88a..abc05d2 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -133,9 +133,9 @@ void initEFITree(void) DT__AddProperty(platformNode, "FSBFrequency", sizeof(uint64_t), &gPlatform.CPU.FSBFrequency); } - if (gPlatform.XHCI.ARTFrequency) + if (gPlatform.CPU.ARTFrequency) { - DT__AddProperty(platformNode, "ARTFrequency", sizeof(uint64_t), &gPlatform.XHCI.ARTFrequency); + DT__AddProperty(platformNode, "ARTFrequency", sizeof(uint64_t), &gPlatform.CPU.ARTFrequency); } Node * chosenNode = DT__AddChild(gPlatform.DT.RootNode, "chosen"); From 62852b0d1b18e8cbe82e4f77f0ef970e15449f9d Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sat, 18 Jun 2016 13:52:21 +0200 Subject: [PATCH 544/623] Skylake/new Xeons support. --- i386/libsaio/cpu/essentials.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index 72653f2..afa7011 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -77,6 +77,8 @@ #define MSR_TEMPERATURE_TARGET 0x01A2 #define MSR_MISC_PWR_MGMT 0x01AA #define MSR_TURBO_RATIO_LIMIT 0x01AD +#define MSR_TURBO_RATIO_LIMIT_1 0x01AE +#define MSR_TURBO_RATIO_LIMIT_2 0x01AF #define IA32_ENERGY_PERF_BIAS 0x01B0 #define IA32_PLATFORM_DCA_CAP 0x01F8 @@ -148,17 +150,19 @@ // CPUID leaf index values (pointing to the right spot in CPUID/LEAF array). -#define LEAF_0 0 // DHP: Formerly known as CPUID_n +#define LEAF_0 0 // Basic CPUID Information #define LEAF_1 1 #define LEAF_2 2 -#define LEAF_4 3 -#define LEAF_5 4 -#define LEAF_6 5 -#define LEAF_B 6 -#define LEAF_80 7 -#define LEAF_81 8 - -#define MAX_CPUID_LEAVES 9 // DHP: Formerly known as MAX_CPUID +#define LEAF_4 3 // Deterministic Cache Parameters Leaf +#define LEAF_5 4 // MONITOR/MWAIT Leaf +#define LEAF_6 5 // Thermal and Power Management Leaf +#define LEAF_B 6 // Extended Topology Enumeration Leaf +#define LEAF_15 7 // Time Stamp Counter/Core Crystal Clock Information-leaf +#define LEAF_16 8 // Processor Frequency Information Leaf +#define LEAF_80 9 // Extended Function CPUID Information +#define LEAF_81 10 + +#define MAX_CPUID_LEAVES 11 // DHP: Formerly known as MAX_CPUID /* Copied from: xnu/osfmk/i386/cpuid.h */ #define CPU_MODEL_YONAH 0x0E From cffba42e268518c15805da625fdd70c0085a2a11 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sat, 18 Jun 2016 13:52:34 +0200 Subject: [PATCH 545/623] New Xeons support. --- i386/libsaio/cpu.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/i386/libsaio/cpu.c b/i386/libsaio/cpu.c index 2f76821..ab7af82 100644 --- a/i386/libsaio/cpu.c +++ b/i386/libsaio/cpu.c @@ -81,6 +81,36 @@ void initTurboRatios() // Westmere-EX support (E7-2820/E7-2830). gPlatform.CPU.CoreTurboRatio[6] = ((msr >> 48) & 0xff); gPlatform.CPU.CoreTurboRatio[7] = ((msr >> 56) & 0xff); +#endif + +#if STATIC_CPU_NumCores >= 10 // 20 threads. + msr = rdmsr64(MSR_TURBO_RATIO_LIMIT_1); + + gPlatform.CPU.CoreTurboRatio[8] = bitfield32(msr, 7, 0); + gPlatform.CPU.CoreTurboRatio[9] = bitfield32(msr, 15, 8); +#endif + +#if STATIC_CPU_NumCores >= 12 // 24 threads. + gPlatform.CPU.CoreTurboRatio[10] = bitfield32(msr, 23, 16); + gPlatform.CPU.CoreTurboRatio[11] = bitfield32(msr, 31, 24); +#endif + +#if STATIC_CPU_NumCores >= 16 // 32 threads. + gPlatform.CPU.CoreTurboRatio[12] = ((msr >> 32) & 0xff); + gPlatform.CPU.CoreTurboRatio[13] = ((msr >> 40) & 0xff); + gPlatform.CPU.CoreTurboRatio[14] = ((msr >> 48) & 0xff); + gPlatform.CPU.CoreTurboRatio[15] = ((msr >> 56) & 0xff); +#endif + +#if STATIC_CPU_NumCores >= 18 // 36 threads. + // Intel® Xeon® Processor E5 v3 Family (0x3F – based on the Haswell-E microarchitecture) + // Intel® Xeon® Processor E7 v2 Family (0x3E – based on the Ivy Bridge-E microarchitecture) + // can check bit-64 to see if the two extra Turbo MSR's are being used or not. + msr = rdmsr64(MSR_TURBO_RATIO_LIMIT_2); + + gPlatform.CPU.CoreTurboRatio[16] = bitfield32(msr, 7, 0); + gPlatform.CPU.CoreTurboRatio[17] = bitfield32(msr, 15, 8); + #endif } From d33fbe8ad38cc27d80b2d95508b624d257005816 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sat, 18 Jun 2016 13:52:45 +0200 Subject: [PATCH 546/623] Skylake support. --- i386/libsaio/cpu/Intel/dynamic_data.h | 162 ++++++++++++++++---------- 1 file changed, 99 insertions(+), 63 deletions(-) diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index d3ad72c..6d7eb2c 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -21,92 +21,119 @@ #define DEFAULT_FSB 100000 // Hardcoded to 100MHz #define BASE_NHM_CLOCK_SOURCE 133333333ULL +#define BASE_ART_CLOCK_SOURCE 24000000ULL // 24Mhz //============================================================================== // Measures TSC frequency using the i8254 Programmable Interval Timer counter 2 static uint64_t getTSCFrequency(void) { - // DFE: This constant comes from older xnu: - #define CLKNUM 1193182 // formerly 1193167 - - // DFE: These two constants come from Linux except CLOCK_TICK_RATE replaced with CLKNUM - #define CALIBRATE_TIME_MSEC 30 - #define CALIBRATE_LATCH ((CLKNUM * CALIBRATE_TIME_MSEC + 1000/2)/1000) - + int i; + + uint64_t retval = 0; uint64_t tscStart; uint64_t tscEnd; uint64_t tscDelta = 0xffffffffffffffffULL; + unsigned long pollCount; - uint64_t retval = 0; - int i; - - /* Time how many TSC ticks elapse in 30 msec using the 8254 PIT - * counter 2. We run this loop 3 times to make sure the cache - * is hot and we take the minimum delta from all of the runs. - * That is to say that we're biased towards measuring the minimum - * number of TSC ticks that occur while waiting for the timer to - * expire. That theoretically helps avoid inconsistencies when - * running under a VM if the TSC is not virtualized and the host - * steals time. The TSC is normally virtualized for VMware. - */ - - for (i = 0; i < 10; ++i) + + if (getCachedCPUID(LEAF_0, eax) > 0x14) // Intel Skylake Processors. { - enable_PIT2(); - set_PIT2_mode0(CALIBRATE_LATCH); - tscStart = rdtsc64(); - pollCount = poll_PIT2_gate(); - tscEnd = rdtsc64(); - /* The poll loop must have run at least a few times for accuracy */ - - if (pollCount <= 1) +#if DEBUG_CPU + printf("LEAF_15[eax]: 0x%x\n", getCachedCPUID(LEAF_15, eax)); // 0x02 (numerator is always 2) + printf("LEAF_15[ebx]: 0x%x\n", getCachedCPUID(LEAF_15, ebx)); // 0x11c (denominator i.e. 284 = 3.4GHz and 334 = 4GHz) + printf("LEAF_15[ecx]: 0x%x\n", getCachedCPUID(LEAF_15, ecx)); // 0x00 (frequency = Intel reserved) + printf("LEAF_15[edx]: 0x%x\n", getCachedCPUID(LEAF_15, edx)); // 0x00 + + printf("LEAF_16[eax]: 0x%x\n", getCachedCPUID(LEAF_16, eax)); // 0xd48 (clock speed i.e. 3408MHz for the i7-6700) + printf("LEAF_16[ebx]: 0x%x\n", getCachedCPUID(LEAF_16, ebx)); // 0xfa0 (maximum turbo clock speed i.e. 4GHz for the i7-6700) + printf("LEAF_16[ecx]: 0x%x\n", getCachedCPUID(LEAF_16, ecx)); // 0x64 (bus speed i.e. 100MHz) + printf("LEAF_16[edx]: 0x%x\n", getCachedCPUID(LEAF_16, edx)); // 0x00 +#endif + // + // Examples: + // + // 24000000 * 284 / 2 = 3408000000 for the Intel i7-6700 @ 3.4GHz + // 24000000 * 334 / 2 = 4008000000 for the Intel i7-6700K @ 4.0GHz + // + return (BASE_ART_CLOCK_SOURCE * getCachedCPUID(LEAF_15, ebx) / getCachedCPUID(LEAF_15, eax)); + } + else + { + // DFE: This constant comes from older xnu: + #define CLKNUM 1193182 // formerly 1193167 + + // DFE: These two constants come from Linux except CLOCK_TICK_RATE replaced with CLKNUM + #define CALIBRATE_TIME_MSEC 30 + #define CALIBRATE_LATCH ((CLKNUM * CALIBRATE_TIME_MSEC + 1000/2)/1000) + + /* Time how many TSC ticks elapse in 30 msec using the 8254 PIT + * counter 2. We run this loop 3 times to make sure the cache + * is hot and we take the minimum delta from all of the runs. + * That is to say that we're biased towards measuring the minimum + * number of TSC ticks that occur while waiting for the timer to + * expire. That theoretically helps avoid inconsistencies when + * running under a VM if the TSC is not virtualized and the host + * steals time. The TSC is normally virtualized for VMware. + */ + + for (i = 0; i < 10; ++i) { - continue; + enable_PIT2(); + set_PIT2_mode0(CALIBRATE_LATCH); + tscStart = rdtsc64(); + pollCount = poll_PIT2_gate(); + tscEnd = rdtsc64(); + /* The poll loop must have run at least a few times for accuracy */ + + if (pollCount <= 1) + { + continue; + } + + /* The TSC must increment at LEAST once every millisecond. We + * should have waited exactly 30 msec so the TSC delta should + * be >= 30. Anything less and the processor is way too slow. + */ + + if ((tscEnd - tscStart) <= CALIBRATE_TIME_MSEC) + { + continue; + } + + // tscDelta = min(tscDelta, (tscEnd - tscStart)) + if ((tscEnd - tscStart) < tscDelta) + { + tscDelta = tscEnd - tscStart; + } } - /* The TSC must increment at LEAST once every millisecond. We - * should have waited exactly 30 msec so the TSC delta should - * be >= 30. Anything less and the processor is way too slow. + /* tscDelta is now the least number of TSC ticks the processor made in + * a timespan of 0.03 s (e.g. 30 milliseconds) + * Linux thus divides by 30 which gives the answer in kiloHertz because + * 1 / ms = kHz. But we're xnu and most of the rest of the code uses + * Hz so we need to convert our milliseconds to seconds. Since we're + * dividing by the milliseconds, we simply multiply by 1000. + */ + + /* Unlike linux, we're not limited to 32-bit, but we do need to take care + * that we're going to multiply by 1000 first so we do need at least some + * arithmetic headroom. For now, 32-bit should be enough. + * Also unlike Linux, our compiler can do 64-bit integer arithmetic. */ - if ((tscEnd - tscStart) <= CALIBRATE_TIME_MSEC) + if (tscDelta > (1ULL << 32)) { - continue; + retval = 0; } - - // tscDelta = min(tscDelta, (tscEnd - tscStart)) - if ((tscEnd - tscStart) < tscDelta) + else { - tscDelta = tscEnd - tscStart; + retval = tscDelta * 1000 / 30; } - } - /* tscDelta is now the least number of TSC ticks the processor made in - * a timespan of 0.03 s (e.g. 30 milliseconds) - * Linux thus divides by 30 which gives the answer in kiloHertz because - * 1 / ms = kHz. But we're xnu and most of the rest of the code uses - * Hz so we need to convert our milliseconds to seconds. Since we're - * dividing by the milliseconds, we simply multiply by 1000. - */ - - /* Unlike linux, we're not limited to 32-bit, but we do need to take care - * that we're going to multiply by 1000 first so we do need at least some - * arithmetic headroom. For now, 32-bit should be enough. - * Also unlike Linux, our compiler can do 64-bit integer arithmetic. - */ - - if (tscDelta > (1ULL << 32)) - { - retval = 0; - } - else - { - retval = tscDelta * 1000 / 30; + disable_PIT2(); } - disable_PIT2(); - return retval; } @@ -195,6 +222,9 @@ void initCPUStruct(void) _CPU_DEBUG_SLEEP(5); #endif + do_cpuid(0x00000015, gPlatform.CPU.ID[LEAF_15]); + do_cpuid(0x00000016, gPlatform.CPU.ID[LEAF_16]); + #if DEBUG_TSS_SUPPORT do_cpuid(0x00000006, gPlatform.CPU.ID[LEAF_6]); // Thermal and Power Leaf (Function 06h). @@ -373,6 +403,12 @@ void initCPUStruct(void) case CPU_MODEL_SKYLAKE_H_S: CoreBridgeType = SKYLAKE; hiBit = 31; + // gPlatform.CPU.ARTFrequency = (3427489466 * 2 / 284) = 24137249,76056338028169 MHz + // 3427489466 / 34 = 100808513,705882352941176 + // 100808498 * 2 = 201616996 + // 201616996 / 284 = 709919 + // 709919 * 284 = 201616996 / 2 = 100808498 + gPlatform.CPU.ARTFrequency = 0; // BASE_ART_CLOCK_SOURCE; // (tscFrequency * getCachedCPUID(LEAF_x15, eax) / getCachedCPUID(LEAF_x15, ebx)); break; case CPU_MODEL_NEHALEM: From 2ee66b396e9564f8c2364e1eb3039830384c0ae1 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sat, 18 Jun 2016 13:53:57 +0200 Subject: [PATCH 547/623] Minor/unimportant changes. --- i386/boot2/bootlogo.c | 4 ++-- i386/boot2/drivers.c | 13 +++++++++---- i386/boot2/options.c | 1 + i386/libsaio/pci.h | 11 +++++++++-- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/i386/boot2/bootlogo.c b/i386/boot2/bootlogo.c index 1d837f3..2fd5609 100755 --- a/i386/boot2/bootlogo.c +++ b/i386/boot2/bootlogo.c @@ -37,7 +37,7 @@ unsigned long lookUpCLUTIndex(unsigned char index) { long colorIndex = (index * 3); -#if BLACKMODE +#if (((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) && (BLACKMODE == 1)) // Yosemite, El Capitan and Sierra. long red = AppleLogoBlackClut[ colorIndex ]; long green = AppleLogoBlackClut[ colorIndex++ ]; long blue = AppleLogoBlackClut[ colorIndex++ ]; @@ -148,7 +148,7 @@ void showBootLogo() { setVideoMode(GRAPHICS_MODE); -#if BLACKMODE +#if (((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) && (BLACKMODE == 1)) // Yosemite, El Capitan and Sierra. setBackgroundColor(0x030000); uint32_t compressedSize = sizeof(AppleLogoBlackPacked); void *logoData = (void *)AppleLogoBlackPacked; diff --git a/i386/boot2/drivers.c b/i386/boot2/drivers.c index 4d9a3cb..3e68dd5 100755 --- a/i386/boot2/drivers.c +++ b/i386/boot2/drivers.c @@ -355,12 +355,17 @@ static int loadKexts(char * targetFolder, bool isPluginRun) { sprintf(gPlatform.KextFileName, "%s/%s", targetFolder, dirEntryName); -// #if DEBUG_DRIVERS if (strlen(gPlatform.KextFileName) >= MAX_KEXT_PATH_LENGTH) { stop("Error: gPlatform.KextFileName >= %d chars. Change MAX_KEXT_PATH_LENGTH!", MAX_KEXT_PATH_LENGTH); } -// #endif + +#if DEBUG_DRIVERS + if (!isPluginRun && ((strcmp(dirEntryName, "AppleEmulator.kext") == 0) || (strcmp(dirEntryName, "FakeSMC.kext") == 0))) + { + printf("loadKext(%s) found\n", dirEntryName); + } +#endif // Determine bundle type. isBundleType2 = (GetFileInfo(gPlatform.KextFileName, "Contents", &dirEntryFlags, &dirEntryTime) == 0); @@ -396,7 +401,7 @@ static int loadKexts(char * targetFolder, bool isPluginRun) static int loadPlist(char * targetFolder, bool isBundleType2) { ModulePtr module; - TagPtr personalities; + TagPtr personalities = NULL; char * plistBuffer = NULL; char * tmpExecutablePath = NULL; @@ -962,7 +967,7 @@ long decodeKernel(void *fileLoadBuffer, entry_t *rentry, char **raddr, int *rsiz if (OSSwapBigToHostInt32(kernel_header->adler32) != localAdler32(fileLoadBuffer, uncompressedSize)) { - printf("Adler mismatch, is 0x%x but 0x%x is expected\n", localAdler32(fileLoadBuffer, uncompressedSize)); + printf("Adler mismatch, is 0x%x but 0x%x is expected\n", OSSwapBigToHostInt32(kernel_header->adler32), localAdler32(fileLoadBuffer, uncompressedSize)); return -1; } } diff --git a/i386/boot2/options.c b/i386/boot2/options.c index 5cb0c1d..fffa8eb 100755 --- a/i386/boot2/options.c +++ b/i386/boot2/options.c @@ -92,6 +92,7 @@ void getAndProcessBootArguments(char * configKernelFlags) int bootModes[6] = { -1, kBootModeNormal, kBootModeNormal, -1, kBootModeSafe, kBootModeNormal }; const char * bootFlags[6] = { "", kVerboseModeFlag, kSingleUserModeFlag, "", kSafeModeFlag, kIgnoreCachesFlag }; + bzero(gBootArgs, sizeof(gBootArgs)); skipblanks(&cp); while (readKeyboardStatus()) diff --git a/i386/libsaio/pci.h b/i386/libsaio/pci.h index e48456a..f472f38 100755 --- a/i386/libsaio/pci.h +++ b/i386/libsaio/pci.h @@ -20,12 +20,20 @@ uint32_t pciConfigRead( uint8_t readType, uint32_t pciAddress, uint8_t pciRegist //============================================================================== // Note: Currently only called from: i386/libsaio/cpu/dynamic_data.h +static inline uint8_t pciConfigRead8(uint32_t pciAddress, uint8_t pciRegister) +{ + return (uint8_t)pciConfigRead(READ_BYTE, pciAddress, pciRegister); +} + +//============================================================================== +// Note: Currently only called from: i386/libsaio/cpu/dynamic_data.h + + static inline uint16_t pciConfigRead16(uint32_t pciAddress, uint8_t pciRegister) { return (uint16_t)pciConfigRead(READ_WORD, pciAddress, pciRegister); } - //============================================================================== // Note: Currently only called from: i386/libsaio/cpu/dynamic_data.h @@ -33,4 +41,3 @@ static inline uint32_t pciConfigRead32(uint32_t pciAddress, uint8_t pciRegister) { return (uint32_t)pciConfigRead(READ_LONG, pciAddress, pciRegister); } - From 86c740e6182da9cb58911964c709004cdc6d2784 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sat, 18 Jun 2016 13:55:10 +0200 Subject: [PATCH 548/623] SIP changes. --- i386/libsaio/bootstruct.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/i386/libsaio/bootstruct.h b/i386/libsaio/bootstruct.h index d8f5dd0..a5439e1 100755 --- a/i386/libsaio/bootstruct.h +++ b/i386/libsaio/bootstruct.h @@ -101,6 +101,13 @@ CSR_ALLOW_DEVICE_CONFIGURATION) #endif +/* CSR capabilities that a booter can give to the system */ +#define CSR_CAPABILITY_UNLIMITED (1 << 0) +#define CSR_CAPABILITY_CONFIG (1 << 1) +#define CSR_CAPABILITY_APPLE_INTERNAL (1 << 2) + +#define CSR_VALID_CAPABILITIES (CSR_CAPABILITY_UNLIMITED | CSR_CAPABILITY_CONFIG | CSR_CAPABILITY_APPLE_INTERNAL) + // Snapshot constants with supported version / revision info. #define kBootArgsVersion_SnowLeopard 1 #define kBootArgsRevision_SnowLeopard 6 From fc469aa54304cf9f407368bed8cf16469666b881 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sat, 18 Jun 2016 13:56:18 +0200 Subject: [PATCH 549/623] Don't set bootArgs->flags to kBootArgsFlagBlack --- i386/libsaio/bootstruct.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/i386/libsaio/bootstruct.c b/i386/libsaio/bootstruct.c index f316d6b..fd2a351 100755 --- a/i386/libsaio/bootstruct.c +++ b/i386/libsaio/bootstruct.c @@ -123,10 +123,12 @@ void initKernelBootConfig(void) #endif // #if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) #if ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN) - bootArgs->flags |= kBootArgsFlagCSRActiveConfig; + bootArgs->flags |= (kBootArgsFlagCSRConfigMode + kBootArgsFlagCSRBoot); + + bootArgs->csrActiveConfig = CSR_ALLOW_DEVICE_CONFIGURATION; + + bootArgs->csrCapabilities = CSR_CAPABILITY_UNLIMITED; - bootArgs->csrActiveConfig = CSR_ALLOW_UNTRUSTED_KEXTS; - bootArgs->csrCapabilities = CSR_VALID_FLAGS; bootArgs->boot_SMC_plimit = 0; #endif @@ -212,7 +214,7 @@ void finalizeKernelBootConfig(void) bootArgs->deviceTreeP = (uint32_t)addr; bootArgs->deviceTreeLength = size; -/* #if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. +#if ((MAKE_TARGET_OS & LION) == LION) // All OS versions greater than Lion have bit 1 set. // Adding a 16 KB log space. bootArgs->performanceDataSize = 0; bootArgs->performanceDataStart = 0; @@ -224,9 +226,12 @@ void finalizeKernelBootConfig(void) bootArgs->bootMemSize = 0; bootArgs->bootMemStart = 0; - bootArgs->flags = kBootArgsFlagBlack; bootArgs->kslide = 0; -#endif */ +#endif + +#if (((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) && (BLACKMODE == 1)) + bootArgs->flags |= kBootArgsFlagBlack; +#endif #if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. bootArgs->PhysicalMemorySize = gPlatform.RAM.MemorySize; From bcf30eece7b8e293af595e558b527924bd731144 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sat, 18 Jun 2016 14:00:42 +0200 Subject: [PATCH 550/623] Catch installation issues. --- i386/libsaio/stringTable.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/stringTable.c b/i386/libsaio/stringTable.c index e8ac319..2558523 100755 --- a/i386/libsaio/stringTable.c +++ b/i386/libsaio/stringTable.c @@ -357,6 +357,10 @@ long loadConfigFile(const char * configFile, config_file_t *config) { return EFI_SUCCESS; } + else + { + error("ERROR: failed to parse: com.apple.Boot.plist"); + } } return (long)(EFI_INVALID_PARAMETER | EFI_NOT_FOUND); @@ -376,8 +380,8 @@ long loadCABootPlist(void) #endif #if INSTALL_ESD_SUPPORT - ".IABootFiles", "OS X Install Data", + ".IABootFiles", "Mac OS X Install Data", #endif "Library/Preferences/SystemConfiguration" // The default. @@ -405,10 +409,26 @@ long loadCABootPlist(void) end++; #endif #endif + char dirSpec[80]; + + sprintf(dirSpec, "/.IABootFiles/", BIOS_DEV_UNIT(gPlatform.BootVolume), gPlatform.BootVolume->part_no); + +#if DEBUG_BOOT + long flagss, time; + + if (GetFileInfo(dirSpec, "com.apple.Boot.plist", &flagss, &time) == 0) + { + printf("/.IABootFiles/com.apple.Boot.plist found on bvr->part_no: %d\n", gPlatform.BootVolume->part_no); + sleep(3); + } +#endif + for (; i < len; i++) { bzero(path, 80); sprintf(path, "/%s/%s", dirspec[i], "com.apple.Boot.plist"); + + // Try to load com.apple.Boot.plist retValue = loadConfigFile(path, &bootInfo->bootConfig); if (retValue == EFI_SUCCESS) @@ -420,6 +440,7 @@ long loadCABootPlist(void) gPlatform.BootVolume->flags = kBVFlagInstallVolume; } #endif + #if (APPLE_RAID_SUPPORT || CORE_STORAGE_SUPPORT) if (strncmp(path, "/com.apple.boot.", 16) == 0) { From 506dc8a4a509dbb375d07f01557777cf109cd6f3 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sat, 18 Jun 2016 14:03:00 +0200 Subject: [PATCH 551/623] Whitespace and comment changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – make sure that we have a kernel/prelinkedkernel to load. --- i386/boot2/boot.c | 78 ++++++++++++++++++++++++++++++----------------- 1 file changed, 50 insertions(+), 28 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 8d1603c..e7f50b2 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -166,7 +166,6 @@ void boot(int biosdev) bool haveCABootPlist = false; bool quietBootMode = true; - bool kernelSpecified = false; void *fileLoadBuffer = (void *)kLoadAddr; @@ -186,9 +185,10 @@ void boot(int biosdev) #if PRE_LINKED_KERNEL_SUPPORT bool mayUseKernelCache = false; bool flushCaches = false; + bool kernelSpecified = false; +#endif long flags, cachetime; -#endif initPlatform(biosdev); @@ -433,7 +433,7 @@ void boot(int biosdev) * We cannot use the kernelcache from the Yosemite installer, not yet, * and thus we load: /System/Library/Caches/Startup/kernelcache instead */ -#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan. +#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite, El Capitan and Sierra. // Installation directory located? if (flushCaches == false) // && (gPlatform.BootVolume->flags != kBVFlagInstallVolume)) { @@ -446,7 +446,7 @@ void boot(int biosdev) _BOOT_DEBUG_DUMP("length: %d, val: %s\n", length, val); #if RECOVERY_HD_SUPPORT // XXX: Required for booting from the Recovery HD. -#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan. +#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite, El Capitan and Sierra. // FIXME: This static check sucks! if (strncmp(val, "\\com.apple.recovery.boot\\prelinkedkernel", length) == 0) { @@ -457,8 +457,8 @@ void boot(int biosdev) { val = "/com.apple.recovery.boot/kernelcache"; } -#endif // #if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan. -#endif +#endif // #if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite, El Capitan and Sierra. +#endif // #if RECOVERY_HD_SUPPORT if (length && GetFileInfo(NULL, val, &flags, &cachetime) == 0) { _BOOT_DEBUG_DUMP("Kernel Cache set to: %s\n", val); @@ -470,7 +470,7 @@ void boot(int biosdev) gPlatform.KernelCacheSpecified = true; } } -#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan. +#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite, El Capitan and Sierra. } else { @@ -484,7 +484,15 @@ void boot(int biosdev) } #endif // #if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) -#endif +#else // #if PRELINKED_KERNEL_SUPPORT + #if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite, El Capitan and Sierra. + sprintf(bootFile, "/System/Library/Kernels/%s", bootInfo->bootFile); + #else + // Set to mach_kernel for Mavericks and earlier versions of OS X. + sprintf(bootFile, "/%s", bootInfo->bootFile); + #endif +#endif // #if PRELINKED_KERNEL_SUPPORT + if (getBoolForKey(kQuietBootKey, &quietBootMode, &bootInfo->bootConfig) && !quietBootMode) { gPlatform.BootMode = kBootModeNormal; // Reversed from: gPlatform.BootMode |= kBootModeQuiet; @@ -535,7 +543,7 @@ void boot(int biosdev) { sprintf(bootFile, "%s", bootInfo->bootFile); } -#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite and El Capitan. +#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite, El Capitan and Sierra. else { if (!kernelSpecified) @@ -590,7 +598,7 @@ void boot(int biosdev) _BOOT_DEBUG_DUMP("adler32: %08X\n", adler32); -#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set (like Lion). +#if ((MAKE_TARGET_OS & LION) == LION) // Sierra, El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set (like Lion). _BOOT_DEBUG_DUMP("Checking for kernelcache...\n"); @@ -615,8 +623,14 @@ void boot(int biosdev) if (mayUseKernelCache == false) { - sprintf(bootFile, "/System/Library/Kernels/%s", bootInfo->bootFile); _BOOT_DEBUG_DUMP("No kernelcache found, will load: %s!\n", bootInfo->bootFile); + +#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite, El Capitan and Sierra. + sprintf(bootFile, "/System/Library/Kernels/%s", bootInfo->bootFile); +#else + // Set to mach_kernel for Mavericks and earlier versions of OS X. + sprintf(bootFile, "/%s", bootInfo->bootFile); +#endif } free(preLinkedKernelPath); @@ -675,31 +689,41 @@ void boot(int biosdev) #endif // PRE_LINKED_KERNEL_SUPPORT /* - * The bootFile normally points to (mach_)kernel but it will be empty when a - * pre-linked kernel was processed, and that is why we check the length here. + * The 'bootFile' normally points to (mach_)kernel but will be empty when + * a prelinkedkernel was processed, or when prelinkedkernel support is + * disabled in the settings file, which is why we check the length here. */ - if (strlen(bootFile)) + if (strlen(bootFile) == 0) { - _BOOT_DEBUG_DUMP("About to load: %s\n", bootFile); +#if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // Yosemite, El Capitan and Sierra. + sprintf(bootFile, "/System/Library/Kernels/%s", bootInfo->bootFile); +#else + // Set to mach_kernel for Mavericks and earlier versions of OS X. + sprintf(bootFile, "/%s", bootInfo->bootFile); +#endif + if (GetFileInfo(NULL, bootFile, &flags, &cachetime)) + { + stop("ERROR: %s not found!\n", bootFile); + } + } - retStatus = LoadThinFatFile(bootFile, &fileLoadBuffer); + _BOOT_DEBUG_DUMP("About to load: %s\n", bootFile); -#if SUPPORT_32BIT_MODE - if (retStatus <= 0 && gPlatform.ArchCPUType == CPU_TYPE_X86_64) - { - _BOOT_DEBUG_DUMP("Load failed for arch=x86_64, trying arch=i386 now.\n"); + retStatus = LoadThinFatFile(bootFile, &fileLoadBuffer); - gPlatform.ArchCPUType = CPU_TYPE_I386; +#if SUPPORT_32BIT_MODE + if (retStatus <= 0 && gPlatform.ArchCPUType == CPU_TYPE_X86_64) + { + _BOOT_DEBUG_DUMP("Load failed for arch=x86_64, trying arch=i386 now.\n"); - retStatus = LoadThinFatFile(bootFile, &fileLoadBuffer); - } + gPlatform.ArchCPUType = CPU_TYPE_I386; - _BOOT_DEBUG_DUMP("LoadStatus(%d): %s\n", retStatus, bootFile); -#endif // SUPPORT_32BIT_MODE + retStatus = LoadThinFatFile(bootFile, &fileLoadBuffer); } +#endif // SUPPORT_32BIT_MODE - _BOOT_DEBUG_ELSE_DUMP("bootFile empty!\n"); // Should not happen, but helped me once already. + _BOOT_DEBUG_DUMP("LoadStatus(%d): %s\n", retStatus, bootFile); /* * Time to fire up the kernel - previously known as execKernel() @@ -753,7 +777,6 @@ void boot(int biosdev) sleep(kBootErrorTimeout); } #endif - _BOOT_DEBUG_DUMP("execKernel-6\n"); finalizeKernelBootConfig(); @@ -766,7 +789,6 @@ void boot(int biosdev) // Did we switch to graphics mode yet (think verbose mode)? if (gVerboseMode || bootArgs->Video.v_display != GRAPHICS_MODE) { - // _BOOT_DEBUG_SLEEP(6); // Switch to graphics mode and show the (white) Apple logo on a black/gray background. From ddd489b47fa07d52b47edd39f80eb4b9f62f3ba3 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Wed, 29 Jun 2016 15:48:20 +0200 Subject: [PATCH 552/623] Renaming a preprocessor directive. --- i386/boot2/boot.c | 18 +++++++++--------- i386/libsaio/platform.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index e7f50b2..5bb964a 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -182,7 +182,7 @@ void boot(int biosdev) bootFile[0] = '\0'; rootUUID[0] = '\0'; -#if PRE_LINKED_KERNEL_SUPPORT +#if PRELINKED_KERNEL_SUPPORT bool mayUseKernelCache = false; bool flushCaches = false; bool kernelSpecified = false; @@ -309,7 +309,7 @@ void boot(int biosdev) if (getValueForBootKey(kernelFlags, kIgnoreCachesFlag, &val, &length)) { _BOOT_DEBUG_DUMP("Notice: -f (flush cache) specified!\n"); -#if PRE_LINKED_KERNEL_SUPPORT +#if PRELINKED_KERNEL_SUPPORT flushCaches = true; #endif } @@ -428,7 +428,7 @@ void boot(int biosdev) if (haveCABootPlist) // Check boolean before doing more time consuming tasks. { -#if PRE_LINKED_KERNEL_SUPPORT +#if PRELINKED_KERNEL_SUPPORT /* * We cannot use the kernelcache from the Yosemite installer, not yet, * and thus we load: /System/Library/Caches/Startup/kernelcache instead @@ -517,7 +517,7 @@ void boot(int biosdev) _BOOT_DEBUG_DUMP("bootInfo->bootFile: %s\n", bootInfo->bootFile); _BOOT_DEBUG_SLEEP(5); */ -#if PRE_LINKED_KERNEL_SUPPORT +#if PRELINKED_KERNEL_SUPPORT _BOOT_DEBUG_DUMP("gPlatform.BootMode = %d\n", gPlatform.BootMode); // Preliminary checks to prevent us from doing useless things. @@ -526,10 +526,10 @@ void boot(int biosdev) _BOOT_DEBUG_DUMP("mayUseKernelCache = %s\n", mayUseKernelCache ? "true" : "false"); /* - * A pre-linked kernel, or kernelcache, requires you to have all essential kexts for your + * A prelinkedkernel or kernelcache requires you to have all essential kexts for your * configuration, including FakeSMC.kext in: /System/Library/Extensions/ * Not in /Extra/Extensions/ because this directory will be ignored, completely when a - * pre-linked kernel or kernelcache is used! + * prelinkedkernel or kernelcache is used! * * Note: Not following this word of advise will render your system incapable of booting! */ @@ -566,7 +566,7 @@ void boot(int biosdev) */ sprintf(bootFile, "%s", gPlatform.KernelCachePath); } - else // Try to find a prelinked-kernel/kernelcache + else // Try to find a prelinkedkernel/kernelcache { char * preLinkedKernelPath = malloc(128); @@ -584,7 +584,7 @@ void boot(int biosdev) { static char adler32Key[PLATFORM_NAME_LEN + ROOT_PATH_LEN]; - _BOOT_DEBUG_DUMP("Checking for pre-linked kernel...\n"); + _BOOT_DEBUG_DUMP("Checking for prelinkedkernel...\n"); // Zero out platform info (name and kernel root path). bzero(adler32Key, sizeof(adler32Key)); @@ -686,7 +686,7 @@ void boot(int biosdev) } #endif // #if ((MAKE_TARGET_OS & LION) == LION) -#endif // PRE_LINKED_KERNEL_SUPPORT +#endif // PRELINKED_KERNEL_SUPPORT /* * The 'bootFile' normally points to (mach_)kernel but will be empty when diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 9a86c4d..381a99b 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -230,7 +230,7 @@ typedef struct _PlatformInfo_t char * KextPlistSpec; // Initialized and used in drivers.c char * KernelCachePath; // Initialized in platform.c and used in boot.c, driver.c char * HelperPath; // Initialized in stringTable.c and used in boot.c -#if PRE_LINKED_KERNEL_SUPPORT +#if PRELINKED_KERNEL_SUPPORT bool KernelCacheSpecified; // Set to indicate that a full path is specified. #endif From eec1931ce5ddd88d913351e81dd23a87f2cb17ab Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Wed, 29 Jun 2016 15:50:06 +0200 Subject: [PATCH 553/623] Sierra kernel patch (fixed endAddress). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – Comment only change. – Debug only output change. --- i386/libsaio/load.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index 7603c43..9b24a4d 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -294,12 +294,14 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) static long patchLoadExecutable(unsigned long cmdBase, long listSize, unsigned long textSegmentAddress, unsigned long vldSegmentAddress) { - // printf("patchLoadExecutable() called\n"); - // sleep(1); +#if (DEBUG_BOOT && PATCH_KEXT_LOADING && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) + printf("patchLoadExecutable() called\n"); + sleep(1); +#endif char * symbolName = NULL; - // Skip the first 3000 symbols, to make it located our target quicker. + // Skip the first 3000 symbols, to speed up the search process. int skippedSymbolCount = 0; // (3000 * listSize); long symbolNumber = 0; @@ -325,7 +327,7 @@ static long patchLoadExecutable(unsigned long cmdBase, long listSize, unsigned l { int64_t offset = (nl->n_value - textSegment->vmaddr); uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); - uint64_t endAddress = (startAddress + 0x200); + uint64_t endAddress = (startAddress + 0x300); /* printf("__ZN6OSKext14loadExecutableEv found!\n"); printf("offset..............: 0x%llx\n", offset); From 32a6205fd6a473483666bdbc8f420e433ce55931 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Wed, 29 Jun 2016 15:51:05 +0200 Subject: [PATCH 554/623] Add support for loading kexts from: /Extra/Extensions/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – Debug only change. --- i386/boot2/drivers.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/i386/boot2/drivers.c b/i386/boot2/drivers.c index 3e68dd5..6006dae 100755 --- a/i386/boot2/drivers.c +++ b/i386/boot2/drivers.c @@ -197,6 +197,21 @@ long loadDrivers(char * dirSpec) { _DRIVERS_DEBUG_DUMP("gKextLoadStatus != 3\n"); +#if (PATCH_LOAD_EXTRA_KEXTS && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) // El Capitan and Sierra. + // Yes we do. Start by looking for kexts in: /Extra/Extensions/ + if ((gKextLoadStatus & 2) == 0) + { + _DRIVERS_DEBUG_DUMP("Calling loadKexts(\"/Extra/Extensions\");\n"); + + if (loadKexts("/Extra/Extensions", 0) == EFI_SUCCESS) + { + _DRIVERS_DEBUG_DUMP("loadKexts(2) OK.\n"); + } + + _DRIVERS_DEBUG_DUMP("\n"); + } +#endif + // Now progress to the system kexts. if ((gKextLoadStatus & 1) == 0) { #if ((MAKE_TARGET_OS & MAVERICKS) == MAVERICKS) // Mavericks, Yosemite and El Capitan specifics. @@ -205,14 +220,14 @@ long loadDrivers(char * dirSpec) /* For Mavericks we first load the signed kexts. if (loadKexts("/Library/Extensions", 0) == EFI_SUCCESS) { - _DRIVERS_DEBUG_DUMP("loadKexts(1) OK.\n"); + _DRIVERS_DEBUG_DUMP("loadKexts(2) OK.\n"); } */ #endif _DRIVERS_DEBUG_DUMP("\nCalling loadKexts(\"/System/Library/Extensions\");\n"); // System kexts if (loadKexts("/System/Library/Extensions", 0) == EFI_SUCCESS) { - _DRIVERS_DEBUG_DUMP("loadKexts(2) OK.\n"); + _DRIVERS_DEBUG_DUMP("loadKexts(3) OK.\n"); } _DRIVERS_DEBUG_DUMP("\n"); } @@ -361,7 +376,10 @@ static int loadKexts(char * targetFolder, bool isPluginRun) } #if DEBUG_DRIVERS - if (!isPluginRun && ((strcmp(dirEntryName, "AppleEmulator.kext") == 0) || (strcmp(dirEntryName, "FakeSMC.kext") == 0))) + // Show essential kexts. + if (!isPluginRun && ((strcmp(dirEntryName, "AppleEmulator.kext") == 0) || + (strcmp(dirEntryName, "FakeSMC.kext") == 0) || + (strcmp(dirEntryName, "IONVMeFamily.kext") == 0))) { printf("loadKext(%s) found\n", dirEntryName); } From 7b9852d1836333e040d821126bd8de817cfc8380 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Wed, 29 Jun 2016 15:51:24 +0200 Subject: [PATCH 555/623] First change for APFS support. --- i386/libsaio/disk.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/i386/libsaio/disk.c b/i386/libsaio/disk.c index 6a84793..6f19f72 100644 --- a/i386/libsaio/disk.c +++ b/i386/libsaio/disk.c @@ -177,6 +177,10 @@ EFI_GUID const GPT_HFSX_GUID = { 0x5265636F, 0x7665, 0x11AA, { 0xAA, 0x11, 0x EFI_GUID const GPT_CORESTORAGE_GUID = { 0x53746F72, 0x6167, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; #endif +#if APFS_SUPPORT + // Aople File System (7C3457EF-0000-11AA-AA11-00306543ECAC) + EFI_GUID const APFS_GUID = { 0x7C3457EF, 0x0000, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; +#endif //============================================================================== From 845fa810cc5a6ca51eeadb1c8e88041dd933538d Mon Sep 17 00:00:00 2001 From: Alex James <theracermaster@gmail.com> Date: Sun, 24 Jul 2016 20:28:20 -0500 Subject: [PATCH 556/623] Add additional iMac/MacBook/Mac mini/Mac Pro model data. --- i386/libsaio/platform.h | 17 +-- i386/libsaio/smbios/model_data.h | 235 ++++++++++++++++++++++--------- 2 files changed, 174 insertions(+), 78 deletions(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 381a99b..6e09088 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -72,14 +72,15 @@ #define IMAC_122 (IMAC | ( 3 << 15)) #define IMAC_131 (IMAC | ( 4 << 15)) #define IMAC_132 (IMAC | ( 5 << 15)) -#define IMAC_141 (IMAC | ( 6 << 15)) -#define IMAC_142 (IMAC | ( 7 << 15)) -#define IMAC_143 (IMAC | ( 8 << 15)) -#define IMAC_144 (IMAC | ( 9 << 15)) -#define IMAC_151 (IMAC | (10 << 15)) -#define IMAC_152 (IMAC | (11 << 15)) -#define IMAC_161 (IMAC | (12 << 15)) -#define IMAC_162 (IMAC | (13 << 15)) +#define IMAC_133 (IMAC | ( 6 << 15)) +#define IMAC_141 (IMAC | ( 7 << 15)) +#define IMAC_142 (IMAC | ( 8 << 15)) +#define IMAC_143 (IMAC | ( 9 << 15)) +#define IMAC_144 (IMAC | (10 << 15)) +#define IMAC_151 (IMAC | (11 << 15)) +#define IMAC_152 (IMAC | (12 << 15)) +#define IMAC_161 (IMAC | (13 << 15)) +#define IMAC_162 (IMAC | (14 << 15)) #define IMAC_171 IMAC // Defaults to iMac17,1 #define MACBOOK_41 (MACBOOK | ( 1 << 15)) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index b01388f..34f170e 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -34,83 +34,139 @@ // ------------------------------------------------------------------------------------- #define SMB_FAMILY "iMac" - #if (TARGET_MODEL == IMAC_111) - #define SMB_BIOS_VERSION "IM111.88Z.0034.B00.0910301727" + #if (TARGET_MODEL == IMAC_111) // 27-inch, Late 2009 + // Intel Core i5-750 @ 2.66 GHz - 4 cores / 4 threads + // Intel Core i7-860 @ 2.80 GHz - 4 cores / 8 threads + // ATI Radeon HD 4850 + #define SMB_BIOS_VERSION "IM111.88Z.0034.B04.1509231906" #define SMB_PRODUCT_NAME "iMac11,1" #define SMB_BOARD_PRODUCT "Mac-F2268DAE" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '1', ',', '1' } - #elif (TARGET_MODEL == IMAC_121) - #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" + #elif (TARGET_MODEL == IMAC_121) // 21.5-inch, Mid 2011 + // Intel Core i3-2100 @ 3.10 GHz - 2 cores / 4 threads + // Intel Core i5-2400S @ 2.50 GHz - 4 cores / 4 threads + // Intel Core i5-2500S @ 2.70 GHz - 4 cores / 4 threads + // Intel Core i7-2600S @ 2.80 GHz - 4 cores / 8 threads + // AMD Radeon HD 6750M & AMD Radeon HD 6770M + #define SMB_BIOS_VERSION "IM121.88Z.0047.B23.1510261412" #define SMB_PRODUCT_NAME "iMac12,1" #define SMB_BOARD_PRODUCT "Mac-942B5BF58194151B" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '1' } - #elif (TARGET_MODEL == IMAC_122) - #define SMB_BIOS_VERSION "IM121.88Z.0047.B1D.1110171110" + #elif (TARGET_MODEL == IMAC_122) // 27-inch, Mid 2011 + // Intel Core i5-2400 @ 3.10 GHz - 4 cores / 4 threads + // Intel Core i5-2500S @ 2.70 GHz - 4 cores / 4 threads + // Intel Core i7-2600 @ 3.40 GHz - 4 cores / 8 threads + // AMD Radeon HD 6770M & AMD Radeon HD 6970M + #define SMB_BIOS_VERSION "IM121.88Z.0047.B23.1510261412" #define SMB_PRODUCT_NAME "iMac12,2" #define SMB_BOARD_PRODUCT "Mac-942B59F58194171B" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '2' } - #elif (TARGET_MODEL == IMAC_131) - #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" + #elif (TARGET_MODEL == IMAC_131) // 21.5-inch, Late 2012 + // Intel Core i5-3335S @ 2.70 GHz - 4 cores / 4 threads + // Intel Core i5-3470S @ 2.90 GHz - 4 cores / 4 threads + // Intel Core i7-3770S @ 3.10 GHz - 4 cores / 8 threads + // NVIDIA GeForce GT 640M & NVIDIA GeForce GT 650M + #define SMB_BIOS_VERSION "IM131.88Z.010A.B09.1509111558" #define SMB_PRODUCT_NAME "iMac13,1" #define SMB_BOARD_PRODUCT "Mac-00BE6ED71E35EB86" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '1' } - #elif (TARGET_MODEL == IMAC_132) - #define SMB_BIOS_VERSION "IM131.88Z.00CE.B00.1203281326" + #elif (TARGET_MODEL == IMAC_132) // 27-inch, Late 2012 + // Intel Core i5-3470S @ 2.9 GHz - 4 cores / 4 threads + // Intel Core i5-3470 @ 3.2 GHz - 4 cores / 4 threads + // Intel Core i7-3770 @ 3.4 GHz - 4 cores / 8 threads + // NVIDIA GeForce GTX 660M, NVIDIA GeForce GTX 675MX & NVIDIA GeForce GTX 680MX + #define SMB_BIOS_VERSION "IM131.88Z.010A.B09.1509111558" #define SMB_PRODUCT_NAME "iMac13,2" #define SMB_BOARD_PRODUCT "Mac-FC02E91DDD3FA6A4" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '2' } - #elif (TARGET_MODEL == IMAC_141) - #define SMB_BIOS_VERSION "IM141.88Z.0118.B00.1309031248" + #elif (TARGET_MODEL == IMAC_133) // 21.5-inch, Early 2013 (Education) + // Intel Core i3-3225 @ 3.30 GHz - 2 cores / 4 threads + // Intel HD Graphics 4000 + #define SMB_BIOS_VERSION "IM131.88Z.010A.B09.1509111558" + #define SMB_PRODUCT_NAME "iMac13,3" + #define SMB_BOARD_PRODUCT "Mac-7DF2A3B5E5D671ED" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '3' } + #elif (TARGET_MODEL == IMAC_141) // 21.5-inch, Late 2013 + // Intel Core i5-4570R @ 2.70 GHz - 4 cores / 4 threads + // Intel Iris Pro Graphics 5200 + #define SMB_BIOS_VERSION "IM141.88Z.0118.B13.1602221714" #define SMB_PRODUCT_NAME "iMac14,1" #define SMB_BOARD_PRODUCT "Mac-031B6874CF7F642A" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '1' } - #elif (TARGET_MODEL == IMAC_142) - #define SMB_BIOS_VERSION "IM141.88Z.0118.B00.1309031249" + #elif (TARGET_MODEL == IMAC_142) // 27-inch, Late 2013 + // Intel Core i5-4570 @ 3.20 GHz - 4 cores / 4 threads + // Intel Core i5-4670 @ 3.40 GHz - 4 cores / 4 threads + // Intel Core i7-4771 @ 3.50 GHz - 4 cores / 8 threads + // NVIDIA GeForce GT 755M, NVIDIA GeForce GTX 775M & NVIDIA GeForce GTX 780M + #define SMB_BIOS_VERSION "IM142.88Z.0118.B13.1602221716" #define SMB_PRODUCT_NAME "iMac14,2" #define SMB_BOARD_PRODUCT "Mac-27ADBB7B4CEE8E61" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '2' } - #elif (TARGET_MODEL == IMAC_143) - #define SMB_BIOS_VERSION "IM143.88Z.0118.B00.1309031249" + #elif (TARGET_MODEL == IMAC_143) // 21.5-inch, Late 2013 + // Intel Core i5-4570S @ 2.80 GHz - 4 cores / 4 threads + // Intel Core i7-4770S @ 3.10 GHz - 4 cores / 8 threads + // NVIDIA GeForce GT 750M + #define SMB_BIOS_VERSION "IM143.88Z.0118.B13.1602221716" #define SMB_PRODUCT_NAME "iMac14,3" #define SMB_BOARD_PRODUCT "Mac-77EB7D7DAF985301" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '3' } - #elif (TARGET_MODEL == IMAC_144) - #define SMB_BIOS_VERSION "IM144.88Z.0179.B03.1405241029" + #elif (TARGET_MODEL == IMAC_144) // 21.5-inch, Mid 2014 + // Intel Core i5-4260U @ 1.40 GHz - 2 cores / 4 threads + // Intel HD Graphics 5000 + #define SMB_BIOS_VERSION "IM144.88Z.0179.B13.1602221719" #define SMB_PRODUCT_NAME "iMac14,4" #define SMB_BOARD_PRODUCT "Mac-81E3E92DD6088272" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '4' } - #elif (TARGET_MODEL == IMAC_152) - // Intel Core i7-4790K @ 4 GHz - #define SMB_BIOS_VERSION "IM151.88Z.0207.B00.1409291931" - #define SMB_PRODUCT_NAME "iMac15,2" - #define SMB_BOARD_PRODUCT "Mac-FA842E06C61E91C5" - #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '5', ',', '2' } - #elif (TARGET_MODEL == IMAC_151) - // Intel Core i5-4690 @ 3.5 GHz - #define SMB_BIOS_VERSION "IM151.88Z.0207.B00.1409291931" + #elif (TARGET_MODEL == IMAC_151) // Retina 5K, 27-inch, Late 2014 + // Intel Core i5-4690 @ 3.50 GHz - 4 cores / 4 threads + // Intel Core i7-4790K @ 4.00 GHz - 4 cores / 8 threads + // AMD Radeon R9 M290X, AMD Radeon R9 M295X + #define SMB_BIOS_VERSION "IM151.88Z.0207.B06.1602221600" #define SMB_PRODUCT_NAME "iMac15,1" #define SMB_BOARD_PRODUCT "Mac-42FD25EABCABB274" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '5', ',', '1' } - #elif (TARGET_MODEL == IMAC_162) - // Intel Core i5-5575R @ 2.8 GHz & Intel Core i5-5675R @ 3.1 GHz + #elif (TARGET_MODEL == IMAC_152) // Retina 5K, 27-inch, Mid 2015 + // Intel Core i5-4590 @ 3.30 GHz - 4 cores / 4 threads + // AMD Radeon R9 M290 + #define SMB_BIOS_VERSION "IM151.88Z.0207.B06.1602221600" + #define SMB_PRODUCT_NAME "iMac15,2" + #define SMB_BOARD_PRODUCT "Mac-FA842E06C61E91C5" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '5', ',', '2' } + #elif (TARGET_MODEL == IMAC_161) // 21.5-inch, Late 2015 + // Intel Core i5-5250U @ 1.60 GHz - 2 cores / 4 threads + // Intel HD Graphics 6000 + #define SMB_BIOS_VERSION "IM161.88Z.0207.B03.1602181033" + #define SMB_PRODUCT_NAME "iMac16,1" + #define SMB_BOARD_PRODUCT "Mac-A369DDC4E67F1C45" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '6', ',', '1' } + #elif (TARGET_MODEL == IMAC_162) // Retina 5K, 21.5-inch, Late 2015 + // Intel Core i5-5575R @ 2.80 GHz - 4 cores / 4 threads + // Intel Core i5-5675R @ 3.10 GHz - 4 cores / 4 threads + // Intel Core i7-5775R @ 3.30 GHz - 4 cores / 8 threads // Intel Iris Pro Graphics 6200 - // (21.5inch Late 2015) #define SMB_BIOS_VERSION "IM162.88Z.0206.B00.1508281353" #define SMB_PRODUCT_NAME "iMac16,2" #define SMB_BOARD_PRODUCT "Mac-FFE5EF870D7BA81A" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '6', ',', '2' } - #elif (TARGET_MODEL == IMAC_171) - // Intel Core i5-6500 @ 3.2 GHz + #else // Defaults to iMac17,1 (Retina 5K, 27-inch, Late 2015) + // Intel Core i5-6500 @ 3.20 GHz - 4 cores / 4 threads + // AMD Radeon R9 M380 + #define SMB_BIOS_VERSION "IM171.88Z.0105.B08.1604111319" + #define SMB_PRODUCT_NAME "iMac17,1" + #define SMB_BOARD_PRODUCT "Mac-65CE76090165799A" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '7', ',', '1' } + /* #elif (TARGET_MODEL == IMAC_171) // Retina 5K, 27-inch, Late 2015 + // Intel Core i5-6500 @ 3.20 GHz - 4 cores / 4 threads // AMD Radeon R9 M390 - // (Retina 5k, 27inch Late 2015) - #define SMB_BIOS_VERSION "IM171.88Z.0105.B00.1509221819" + #define SMB_BIOS_VERSION "IM171.88Z.0105.B08.1604111319" #define SMB_PRODUCT_NAME "iMac17,1" #define SMB_BOARD_PRODUCT "Mac-DB15BD556843C820" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '7', ',', '1' } - /* #elif (TARGET_MODEL == IMAC_171) // Intel Core i5-6600 @ 3.3 GHz - // AMD Radeon R9 M395 - // (Retina 5k, 27inch Late 2015) - #define SMB_BIOS_VERSION "IM171.88Z.0105.B00.1509221819" + #elif (TARGET_MODEL == IMAC_171) // Retina 5K, 27-inch, Late 2015 + // Intel Core i5-6600 @ 3.30 GHz - 4 cores / 4 threads + // Intel Core i7-6700K @ 4.00 GHz - 4 cores / 8 threads + // AMD Radeon R9 M395 & AMD Radeon R9 M395X + #define SMB_BIOS_VERSION "IM171.88Z.0105.B08.1604111319" #define SMB_PRODUCT_NAME "iMac17,1" #define SMB_BOARD_PRODUCT "Mac-B809C3757DA9BB8D" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '7', ',', '1' } */ @@ -130,10 +186,20 @@ #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', '4', ',', '1' } #elif (TARGET_MODEL == MACBOOK_81) // Intel Core M-5Y31 @ 1.10 GHz (2 cores, 4 threads) - #define SMB_BIOS_VERSION "MB81.88Z.0164.B02.1503241252" + // Intel Core M-5Y51 @ 1.20 GHz (2 cores, 4 threads) + // Intel Core M-5Y71 @ 1.30 GHz (2 cores, 4 threads) + #define SMB_BIOS_VERSION "MB81.88Z.0164.B13.1602161331" #define SMB_PRODUCT_NAME "MacBook8,1" #define SMB_BOARD_PRODUCT "Mac-BE0E8AC46FE800CC" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', '8', ',', '1' } + #else // Defaults to MacBook9,1 + // Intel Core m3-6Y30 @ 1.10 GHz (2 cores, 4 threads) + // Intel Core m5-6Y54 @ 1.20 GHz (2 cores, 4 threads) + // Intel Core m7-6Y75 @ 1.30 GHz (2 cores, 4 threads) + #define SMB_BIOS_VERSION "MB91.88Z.0154.B04.1604191425" + #define SMB_PRODUCT_NAME "MacBook9,1" + #define SMB_BOARD_PRODUCT "Mac-9AE82516C7C6B903" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', '9', ',', '1' } #endif // ------------------------------------------------------------------------------------- #endif @@ -146,41 +212,55 @@ #if (TARGET_MODEL == MACBOOK_AIR_41) // Intel Core i5-2467M @ 1.6GHz (2 cores - 4 threads) // Intel Core i7-2677M @ 1.8GHz (2 cores - 4 threads) - #define SMB_BIOS_VERSION "MBA41.88Z.0077.B08.1109011050" + #define SMB_BIOS_VERSION "MBA41.88Z.0077.B14.1510261805" #define SMB_PRODUCT_NAME "MacBookAir4,1" #define SMB_BOARD_PRODUCT "Mac-C08A6BB70A942AC2" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '4', ',', '1' } #elif (TARGET_MODEL == MACBOOK_AIR_42) // Intel Core i5-2557M @ 1.7GHz (2 cores - 4 threads) // Intel Core i7-2677M @ 1.8GHz (2 cores - 4 threads) - #define SMB_BIOS_VERSION "MBA41.88Z.0077.B08.1109011050" + #define SMB_BIOS_VERSION "MBA41.88Z.0077.B14.1510261805" #define SMB_PRODUCT_NAME "MacBookAir4,2" #define SMB_BOARD_PRODUCT "Mac-742912EFDBEE19B3" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '4', ',', '2' } + #elif (TARGET_MODEL == MACBOOK_AIR_51) + // Intel Core i5-3317U @ 1.7GHz (2 cores - 4 threads) + // Intel Core i7-3667U @ 2.0GHz (2 cores - 4 threads) + #define SMB_BIOS_VERSION "MBA51.88Z.00EF.B04.1509111654" + #define SMB_PRODUCT_NAME "MacBookAir5,1" + #define SMB_BOARD_PRODUCT "Mac-66F35F19FE2A0D05" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '5', ',', '1' } + #elif (TARGET_MODEL == MACBOOK_AIR_52) + // Intel Core i5-3317U @ 1.7GHz (2 cores - 4 threads) + // Intel Core i7-3667U @ 2.0GHz (2 cores - 4 threads) + #define SMB_BIOS_VERSION "MBA51.88Z.00EF.B04.1509111654" + #define SMB_PRODUCT_NAME "MacBookAir5,2" + #define SMB_BOARD_PRODUCT "Mac-2E6FAB96566FE58C" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '5', ',', '2' } #elif (TARGET_MODEL == MACBOOK_AIR_61) - // Intel Core i5-4250U @ 1.30 GHz (2 cores - 4 threads) - // Intel Core i7-4650U @ 1.70 GHz (2 cores - 4 threads) - #define SMB_BIOS_VERSION "MBA61.88Z.0099.B12.1405241030" + // Intel Core i5-3427U @ 1.8GHz (2 cores - 4 threads) + // Intel Core i7-4650U @ 1.7GHz (2 cores - 4 threads) + #define SMB_BIOS_VERSION "MBA61.88Z.0099.B22.1602221559" #define SMB_PRODUCT_NAME "MacBookAir6,1" #define SMB_BOARD_PRODUCT "Mac-35C1E88140C3E6CF" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '6', ',', '1' } #elif (TARGET_MODEL == MACBOOK_AIR_62) // Intel Core i5-4250U @ 1.30 GHz (2 cores - 4 threads) // Intel Core i7-4650U @ 1.70 GHz (2 cores - 4 threads) - #define SMB_BIOS_VERSION "MBA61.88Z.0099.B12.1405241030" + #define SMB_BIOS_VERSION "MBA61.88Z.0099.B22.1602221559" #define SMB_PRODUCT_NAME "MacBookAir6,2" #define SMB_BOARD_PRODUCT "Mac-7DF21CB3ED6977E5" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '6', ',', '2' } #elif (TARGET_MODEL == MACBOOK_AIR_71) // Intel Core i5-5250U @ 1.60 GHz (2 cores - 4 threads) - #define SMB_BIOS_VERSION "MBA71.88Z.0166.B00.1502131457" + #define SMB_BIOS_VERSION "MBA71.88Z.0166.B12.1602221953" #define SMB_PRODUCT_NAME "MacBookAir7,1" #define SMB_BOARD_PRODUCT "Mac-9F18E312C5C2BF0B" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '7', ',', '1' } #else // Defaults to MacBookAir7,2 // Intel Core i5-5250U @ 1.60 GHz (2 cores - 4 threads) // Intel Core i7-5650U @ 2.20 GHz (2 cores - 4 threads) - #define SMB_BIOS_VERSION "MBA71.88Z.0166.B00.1502131457" + #define SMB_BIOS_VERSION "MBA71.88Z.0166.B12.1602221953" #define SMB_PRODUCT_NAME "MacBookAir7,2" #define SMB_BOARD_PRODUCT "Mac-937CB26E2E02BB01" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'A', 'i', 'r', '7', ',', '2' } @@ -194,34 +274,34 @@ #define SMB_FAMILY "MacBookPro" #if(TARGET_MODEL == MACBOOK_PRO_61) - #define SMB_BIOS_VERSION "MBP61.88Z.0057.B0C.1007261552" + #define SMB_BIOS_VERSION "MBP61.88Z.0057.B11.1509232013" #define SMB_PRODUCT_NAME "MacBookPro6,1" #define SMB_BOARD_PRODUCT "Mac-F22589C8" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '6', ',', '1' } #elif (TARGET_MODEL == MACBOOK_PRO_81) - #define SMB_BIOS_VERSION "MBP81.88Z.0047.B27.1201241646" + #define SMB_BIOS_VERSION "MBP81.88Z.0047.B2C.1510261540" #define SMB_PRODUCT_NAME "MacBookPro8,1" #define SMB_BOARD_PRODUCT "Mac-94245B3640C91C81" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '8', ',', '1' } #elif (TARGET_MODEL == MACBOOK_PRO_82) - #define SMB_BIOS_VERSION "MBP81.88Z.0047.B27.1201241646" + #define SMB_BIOS_VERSION "MBP81.88Z.0047.B2C.1510261540" #define SMB_PRODUCT_NAME "MacBookPro8,2" #define SMB_BOARD_PRODUCT "Mac-94245A3940C91C80" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '8', ',', '2' } #elif (TARGET_MODEL == MACBOOK_PRO_83) - #define SMB_BIOS_VERSION "MBP81.88Z.0047.B27.1201241646" + #define SMB_BIOS_VERSION "MBP81.88Z.0047.B2C.1510261540" #define SMB_PRODUCT_NAME "MacBookPro8,3" #define SMB_BOARD_PRODUCT "Mac-942459F5819B171B" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '8', ',', '3' } #elif (TARGET_MODEL == MACBOOK_PRO_91) // Intel Core i7-3820QM @ 2.70 GHz - 4 cores / 8 threads. - #define SMB_BIOS_VERSION "MBP91.88Z.00D3.B02.1203281326" + #define SMB_BIOS_VERSION "MBP91.88Z.00D3.B0D.1602221713" #define SMB_PRODUCT_NAME "MacBookPro9,1" #define SMB_BOARD_PRODUCT "Mac-4B7AC7E43945597E" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '9', ',', '1' } #elif (TARGET_MODEL == MACBOOK_PRO_92) // Intel Core i7-3820QM @ 2.70 GHz - 4 cores / 8 threads. - #define SMB_BIOS_VERSION "MBP91.88Z.00D3.B02.1203281326" + #define SMB_BIOS_VERSION "MBP91.88Z.00D3.B0D.1602221713" #define SMB_PRODUCT_NAME "MacBookPro9,2" #define SMB_BOARD_PRODUCT "Mac-6F01561E16C75D06" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '9', ',', '2' } @@ -229,14 +309,14 @@ // Intel Core i7-3635QM @ 2.40 GHz - 4 cores / 8 threads. // Intel Core i7-3740QM @ 2.70 GHz - 4 cores / 8 threads. // Intel Core i7-3840QM @ 2.80 GHz - 4 cores / 8 threads. - #define SMB_BIOS_VERSION "MBP101.88Z.00EE.B03.1212211437" + #define SMB_BIOS_VERSION "MBP101.88Z.00EE.B0A.1509111559" #define SMB_PRODUCT_NAME "MacBookPro10,1" #define SMB_BOARD_PRODUCT "Mac-C3EC7CD22292981F" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '0', ',', '1' } #elif (TARGET_MODEL == MACBOOK_PRO_102) // Intel Core i5-3230QM @ 2.60 GHz - 2 cores / 4 threads. // Intel Core i7-3540QM @ 3.00 GHz - 2 cores / 4 threads. - #define SMB_BIOS_VERSION "MBP102.88Z.0106.B03.1211161133" + #define SMB_BIOS_VERSION "MBP102.88Z.0106.B0A.1509130955" #define SMB_PRODUCT_NAME "MacBookPro10,2" #define SMB_BOARD_PRODUCT "Mac-AFD8A9D944EA4843" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '0', ',', '2' } @@ -244,27 +324,42 @@ // Intel Core i5-4258U @ 2.40 GHz - 2 cores / 4 threads. // Intel Core i5-4288U @ 2.60 GHz - 2 cores / 4 threads. // Intel Core i7-4558U @ 2.80 GHz - 2 cores / 4 threads. - #define SMB_BIOS_VERSION "MBP111.88Z.0138.B07.1402121134" + #define SMB_BIOS_VERSION "MBP111.88Z.0138.B17.1602221718" #define SMB_PRODUCT_NAME "MacBookPro11,1" #define SMB_BOARD_PRODUCT "Mac-189A3D4F975D5FFC" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '1', ',', '1' } #elif (TARGET_MODEL == MACBOOK_PRO_112) // Intel Core i7-4750HQ @ 2.00 GHz - 4 cores / 8 threads. // Intel Core i7-4950HQ @ 2.40 GHz - 4 cores / 8 threads. - #define SMB_BIOS_VERSION "MBP112.88Z.0138.B02.1310181745" + #define SMB_BIOS_VERSION "MBP112.88Z.0138.B17.1602221600" #define SMB_PRODUCT_NAME "MacBookPro11,2" #define SMB_BOARD_PRODUCT "Mac-3CBD00234E554E41" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '1', ',', '2' } #elif (TARGET_MODEL == MACBOOK_PRO_113) // Intel Core i7-4850HQ @ 2.30 GHz - 4 cores / 8 threads. // Intel Core i7-4960HQ @ 2.60 GHz - 4 cores / 8 threads. - #define SMB_BIOS_VERSION "MBP112.88Z.0138.B08.1406081756" + #define SMB_BIOS_VERSION "MBP112.88Z.0138.B17.1602221600" #define SMB_PRODUCT_NAME "MacBookPro11,3" #define SMB_BOARD_PRODUCT "Mac-2BD1B31983FE1663" - #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '2', ',', '1' } - #else + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '1', ',', '3' } + #elif (TARGET_MODEL == MACBOOK_PRO_114) + // Intel Core i7-4770HQ @ 2.20 GHz - 4 cores / 8 threads. + // Intel Core i7-4870HQ @ 2.50 GHz - 4 cores / 8 threads. + // Intel Core i7-4980HQ @ 2.80 GHz - 4 cores / 8 threads. + #define SMB_BIOS_VERSION "MBP114.88Z.0172.B09.1602151732" + #define SMB_PRODUCT_NAME "MacBookPro11,3" + #define SMB_BOARD_PRODUCT "Mac-06F11FD93F0323C5" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '1', ',', '4' } + #elif (TARGET_MODEL == MACBOOK_PRO_115) + // Intel Core i7-4870HQ @ 2.50 GHz - 4 cores / 8 threads. + // Intel Core i7-4980HQ @ 2.80 GHz - 4 cores / 8 threads. + #define SMB_BIOS_VERSION "MBP114.88Z.0172.B09.1602151732" + #define SMB_PRODUCT_NAME "MacBookPro11,5" + #define SMB_BOARD_PRODUCT "Mac-06F11F11946D27C5" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '1', ',', '5' } + #else // Defaults to MacBookPro12,1 // Intel Core i5-5257U @ 2.70 GHz - 2 cores / 4 threads. - #define SMB_BIOS_VERSION "MBP121.88Z.0167.B00.1502132146" + #define SMB_BIOS_VERSION "MBP121.88Z.0167.B16.1602111810" #define SMB_PRODUCT_NAME "MacBookPro12,1" #define SMB_BOARD_PRODUCT "Mac-E43C1C25D4880AD6" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '2', ',', '1' } @@ -285,36 +380,36 @@ #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '4', ',', '1' } #elif (TARGET_MODEL == MACMINI_51) // Intel Core i5-2415M @ 2.3 GHz (2 cores - 4 threads) - #define SMB_BIOS_VERSION "MM51.88Z.0077.B10.1201241549" + #define SMB_BIOS_VERSION "MM51.88Z.0077.B14.1510261805" #define SMB_PRODUCT_NAME "Macmini5,1" #define SMB_BOARD_PRODUCT "Mac-8ED6AF5B48C039E1" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '5', ',', '1' } #elif (TARGET_MODEL == MACMINI_52) // Intel Core i5-2520M @ 2.5GHz (2 cores - 4 threads) - #define SMB_BIOS_VERSION "MM51.88Z.0077.B10.1201241549" + #define SMB_BIOS_VERSION "MM51.88Z.0077.B14.1510261805" #define SMB_PRODUCT_NAME "Macmini5,2" #define SMB_BOARD_PRODUCT "Mac-4BC72D62AD45599E" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '5', ',', '2' } #elif (TARGET_MODEL == MACMINI_53) // Intel Core i7-2635QM @ 2.0GHz (4 cores - 8 threads) - #define SMB_BIOS_VERSION "MM51.88Z.0077.B10.1201241549" + #define SMB_BIOS_VERSION "MM51.88Z.0077.B14.1510261805" #define SMB_PRODUCT_NAME "Macmini5,3" #define SMB_BOARD_PRODUCT "Mac-7BA5B2794B2CDB12" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '5', ',', '3' } #elif (TARGET_MODEL == MACMINI_61) // Intel Core i5-3210M @ 2.50 GH (2 cores - 4 theeads) - #define SMB_BIOS_VERSION "MM61.88Z.0106.B03.1211161202" + #define SMB_BIOS_VERSION "MM61.88Z.0106.B0A.1509111654" #define SMB_PRODUCT_NAME "Macmini6,1" #define SMB_BOARD_PRODUCT "Mac-031AEE4D24BFF0B1" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '1' } #elif (TARGET_MODEL == MACMINI_62) // Intel Core i7-3615QM @ 2.30 GHz (4 cores - 8 threads) - #define SMB_BIOS_VERSION "MM61.88Z.0106.B03.1211161202" + #define SMB_BIOS_VERSION "MM61.88Z.0106.B0A.1509111654" #define SMB_PRODUCT_NAME "Macmini6,2" #define SMB_BOARD_PRODUCT "Mac-F65AE981FFA204ED" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '6', ',', '2' } #else // Defaults to Macmini7,1 - #define SMB_BIOS_VERSION "MM71.88Z.0220.B00.1409291751" + #define SMB_BIOS_VERSION "MM71.88Z.0220.B07.1602221546" #define SMB_PRODUCT_NAME "Macmini7,1" #define SMB_BOARD_PRODUCT "Mac-35C5E08120C7EEAF" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'm', 'i', 'n', 'i', '7', ',', '1' } @@ -333,7 +428,7 @@ #define SMB_BOARD_PRODUCT "Mac-F4208DC8" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '3', ',', '1' } #elif (TARGET_MODEL == MACPRO_41) - #define SMB_BIOS_VERSION "MP41.88Z.0081.B04.0903051113" + #define SMB_BIOS_VERSION "MP41.88Z.0081.B08.1001221313" #define SMB_PRODUCT_NAME "MacPro4,1" #define SMB_BOARD_PRODUCT "Mac-F221BEC8" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '4', ',', '1' } @@ -343,10 +438,10 @@ #define SMB_BOARD_PRODUCT "Mac-F221BEC8" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '5', ',', '1' } #else // Defaults to MacPro6,1 - #define SMB_BIOS_VERSION "MP61.88Z.0116.B04.1312061508" + #define SMB_BIOS_VERSION "MP61.88Z.0116.B17.1602221600" #define SMB_PRODUCT_NAME "MacPro6,1" #define SMB_BOARD_PRODUCT "Mac-F60DEB81FF30ACF6" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '6', ',', '1' } #endif // ------------------------------------------------------------------------------------- -#endif \ No newline at end of file +#endif From c3f20cd9c4a7df0eb0f6e7d068bf85330d004b2b Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Thu, 4 Aug 2016 01:23:14 +0200 Subject: [PATCH 557/623] Update from local tree MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – Warning: DYNAMIC_RAM_OVERRIDE_SIZE is renamed to STATIC_RAM_OVERRIDE_SIZE (fix your settings file). --- i386/boot2/graphics.c | 15 +++--- i386/libsaio/acpi/patcher.h | 5 +- i386/libsaio/bootstruct.c | 71 +++++++++++++++++---------- i386/libsaio/bootstruct.h | 2 + i386/libsaio/cpu.c | 12 ++++- i386/libsaio/cpu/Intel/dynamic_data.h | 12 +++-- i386/libsaio/cpu/essentials.h | 5 +- i386/libsaio/efi.c | 17 ++++--- i386/libsaio/platform.c | 20 ++++++-- i386/libsaio/smbios.c | 2 +- i386/libsaio/smbios/dynamic_data.h | 19 ++++--- 11 files changed, 118 insertions(+), 62 deletions(-) diff --git a/i386/boot2/graphics.c b/i386/boot2/graphics.c index 165e777..55673ec 100755 --- a/i386/boot2/graphics.c +++ b/i386/boot2/graphics.c @@ -93,7 +93,7 @@ static unsigned short getVESAModeWithProperties(unsigned short width, unsigned s #if DEBUG printf("Mode %x: %dx%dx%d mm:%d attr:%x\n", * modePtr, modeInfo.XResolution, modeInfo.YResolution, modeInfo.BitsPerPixel, modeInfo.MemoryModel, modeInfo.ModeAttributes); - sleep(1); + sleep(10); #endif // Filter out unwanted modes based on mode attributes. @@ -212,7 +212,7 @@ long setVESAGraphicsMode(unsigned short width, unsigned short height, unsigned c { VBEModeInfoBlock minfo; - unsigned short mode = 280; // Default to 1024 * 768 * 32 (1920 * 1200 * 32 would be 330) + unsigned short mode = 280; // Defaults to 1024 * 768 * 32 (1920 * 1200 * 32 would be 330) unsigned short vesaVersion; long status = (long)EFI_UNSUPPORTED; @@ -224,7 +224,8 @@ long setVESAGraphicsMode(unsigned short width, unsigned short height, unsigned c 0, &minfo, &vesaVersion); #if DEBUG printf("\nsetVESAGraphicsMode: %d\n%d\n%d\n%d\n%d\n%x\n%x\nSleeping for 25 seconds...", mode, minfo.XResolution, - minfo.YResolution, minfo.BitsPerPixel, minfo.BytesPerScanline, minfo.PhysBasePtr_low, minfo.PhysBasePtr_high); + minfo.YResolution, minfo.BitsPerPixel, minfo.BytesPerScanline, minfo.PhysBasePtr_low, minfo.PhysBasePtr_high, VBEMakeUInt32(minfo.PhysBasePtr)); + sleep(25); #endif if (mode == modeEndOfList) @@ -248,10 +249,10 @@ long setVESAGraphicsMode(unsigned short width, unsigned short height, unsigned c // Update bootArgs with the data provided by the selected VESA mode. bootArgs->Video.v_display = GRAPHICS_MODE; - bootArgs->Video.v_width = minfo.XResolution; /* 1920 or 1600 */ - bootArgs->Video.v_height = minfo.YResolution; /* 1200 or 900 */ - bootArgs->Video.v_depth = minfo.BitsPerPixel; /* 32 */ - bootArgs->Video.v_rowBytes = minfo.BytesPerScanline; /* 7680 or 6400 */ + bootArgs->Video.v_width = minfo.XResolution; /* Examples: 1920, 1600, 1680 */ + bootArgs->Video.v_height = minfo.YResolution; /* Examples: 1200, 1050 900 */ + bootArgs->Video.v_depth = minfo.BitsPerPixel; /* Examples: 8, 30, 32 */ + bootArgs->Video.v_rowBytes = minfo.BytesPerScanline; /* Examples: 7680, 6720, 6400 */ bootArgs->Video.v_baseAddr = VBEMakeUInt32(minfo.PhysBasePtr); } while (0); diff --git a/i386/libsaio/acpi/patcher.h b/i386/libsaio/acpi/patcher.h index 9f4ae0d..79aca88 100644 --- a/i386/libsaio/acpi/patcher.h +++ b/i386/libsaio/acpi/patcher.h @@ -49,10 +49,11 @@ unsigned int search64bitPattern(unsigned int aStartAddress, int aNumberOfBytes, int loadACPITable(int tableIndex) { - char dirSpec[48] = ""; + char dirSpec[48]; long fileSize = 0; void * tableAddress = (void *)kLoadAddr; - + + bzero(dirSpec, 48); #if LOAD_MODEL_SPECIFIC_ACPI_DATA // Example: /Extra/ACPI/DSDT-MacBookPro101.aml // 0123456789 0123456789 0123456789 1 diff --git a/i386/libsaio/bootstruct.c b/i386/libsaio/bootstruct.c index fd2a351..541786f 100755 --- a/i386/libsaio/bootstruct.c +++ b/i386/libsaio/bootstruct.c @@ -95,44 +95,62 @@ void initKernelBootConfig(void) #if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. // Adding a 16 KB log space. - bootArgs->performanceDataSize = 0; - bootArgs->performanceDataStart = 0; + bootArgs->performanceDataSize = 0; + bootArgs->performanceDataStart = 0; // AppleKeyStore.kext - bootArgs->keyStoreDataSize = 0; - bootArgs->keyStoreDataStart = 0; + bootArgs->keyStoreDataSize = 0; + bootArgs->keyStoreDataStart = 0; - bootArgs->bootMemSize = 0; - bootArgs->bootMemStart = 0; + bootArgs->bootMemSize = 0; + bootArgs->bootMemStart = 0; #if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) - bootArgs->flags = 0; + bootArgs->flags = 0; #if REBOOT_ON_PANIC - bootArgs->flags = kBootArgsFlagRebootOnPanic; + bootArgs- >flags |= kBootArgsFlagRebootOnPanic; #endif #if UISCALE_2X - bootArgs->flags |= kBootArgsFlagHiDPI; + bootArgs->flags |= kBootArgsFlagHiDPI; #endif #if BLACKMODE - bootArgs->flags |= kBootArgsFlagBlackTheme; // (kBootArgsFlagBlack + kBootArgsFlagBlackTheme); + bootArgs->flags |= kBootArgsFlagBlackTheme; // (kBootArgsFlagBlack + kBootArgsFlagBlackTheme); #endif #endif // #if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) -#if ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN) - bootArgs->flags |= (kBootArgsFlagCSRConfigMode + kBootArgsFlagCSRBoot); +#if ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN) // El Capitan and Sierra + bootArgs->flags |= (kBootArgsFlagCSRConfigMode + kBootArgsFlagCSRBoot); - bootArgs->csrActiveConfig = CSR_ALLOW_DEVICE_CONFIGURATION; + bootArgs->csrActiveConfig = CSR_ALLOW_DEVICE_CONFIGURATION; - bootArgs->csrCapabilities = CSR_CAPABILITY_UNLIMITED; + bootArgs->csrCapabilities = CSR_CAPABILITY_UNLIMITED; - bootArgs->boot_SMC_plimit = 0; -#endif + bootArgs->boot_SMC_plimit = 0; + bootArgs->bootProgressMeterStart = 0; + bootArgs->bootProgressMeterEnd = 1024; - bootArgs->kslide = 0; +/* enum + { + kProgressMeterMax = 1024, + kProgressMeterEnd = 512, + }; + + if (bootArgs->flags & kBootArgsFlagInstallUI) + { + // Values from 0 to 1024 + vc_progress_meter_start = (bootargs->bootProgressMeterStart * kProgressMeterMax) / 65535; + vc_progress_meter_end = (bootargs->bootProgressMeterEnd * kProgressMeterMax) / 65535; + + bootArgs->bootProgressMeterStart = 0; + bootArgs->bootProgressMeterEnd = 1024; + } */ + +#endif + bootArgs->kslide = 0; #endif // #if ((MAKE_TARGET_OS & LION) == LION) } @@ -220,18 +238,21 @@ void finalizeKernelBootConfig(void) bootArgs->performanceDataStart = 0; // AppleKeyStore.kext - bootArgs->keyStoreDataSize = 0; - bootArgs->keyStoreDataStart = 0; + bootArgs->keyStoreDataSize = 0; + bootArgs->keyStoreDataStart = 0; - bootArgs->bootMemSize = 0; - bootArgs->bootMemStart = 0; + bootArgs->bootMemSize = 0; + bootArgs->bootMemStart = 0; - bootArgs->kslide = 0; + bootArgs->kslide = 0; #endif -#if (((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) && (BLACKMODE == 1)) - bootArgs->flags |= kBootArgsFlagBlack; -#endif +/* #if (((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) && (BLACKMODE == 1)) + // + // Note: Hides the white progressbar and efi://chosen/IOProgressBackbuffer is missing. + // + bootArgs->flags |= kBootArgsFlagBlack; +#endif */ #if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. bootArgs->PhysicalMemorySize = gPlatform.RAM.MemorySize; diff --git a/i386/libsaio/bootstruct.h b/i386/libsaio/bootstruct.h index a5439e1..9b16402 100755 --- a/i386/libsaio/bootstruct.h +++ b/i386/libsaio/bootstruct.h @@ -70,10 +70,12 @@ #ifndef kBootArgsFlagBlackTheme #define kBootArgsFlagBlackTheme (1 << 6) // 64 + // Selects the white progressbar (xnu/osfmk/console/video_console.c) #endif #ifndef kBootArgsFlagLoginUI #define kBootArgsFlagLoginUI (1 << 7) // 128 + // Selects the white progressbar (xnu/osfmk/console/video_console.c) #endif #ifndef kBootArgsFlagInstallUI diff --git a/i386/libsaio/cpu.c b/i386/libsaio/cpu.c index ab7af82..dff29ff 100644 --- a/i386/libsaio/cpu.c +++ b/i386/libsaio/cpu.c @@ -233,7 +233,9 @@ void checkFlexRatioMSR(void) if (msr & bit(16)) // Flex ratio enabled? { uint8_t flexRatio = ((msr >> 8) & 0xff); - +#if DEBUG_CPU + printf("MSR(%x) Flex ratio enabled!\n", MSR_FLEX_RATIO); +#endif // Sanity checks. if (flexRatio < gPlatform.CPU.MinBusRatio || flexRatio > gPlatform.CPU.MaxBusRatio) { @@ -246,6 +248,14 @@ void checkFlexRatioMSR(void) gPlatform.CPU.MaxBusRatio = flexRatio; } } +#if DEBUG_CPU + else + { + printf("MSR(%x) Flex ratio NOT Enabled\n", MSR_FLEX_RATIO); + } + + sleep(1); +#endif } #endif // INTEL_CORE_TECHNOLOGY diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index 6d7eb2c..22c14bd 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -393,14 +393,20 @@ void initCPUStruct(void) hiBit = 31; break; -// case CPU_MODEL_BROADWELL: - case CPU_MODEL_BROADWELL_ULT: + case CPU_MODEL_BROADWELL: +// case CPU_MODEL_BROADWELL_ULT: + case CPU_MODEL_BROADWELL_H: + case CPU_MODEL_BRYSTALWELL: + case CPU_MODEL_BROADWELL_E: + CoreBridgeType = BROADWELL; hiBit = 31; break; case CPU_MODEL_SKYLAKE: - case CPU_MODEL_SKYLAKE_H_S: +// case CPU_MODEL_SKYLAKE_ULT: +// case CPU_MODEL_SKYLAKE_ULX: + case CPU_MODEL_SKYLAKE_DT: CoreBridgeType = SKYLAKE; hiBit = 31; // gPlatform.CPU.ARTFrequency = (3427489466 * 2 / 284) = 24137249,76056338028169 MHz diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index afa7011..2c8671d 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -192,9 +192,12 @@ #define CPU_MODEL_BROADWELL_ULT 0x3D #define CPU_MODEL_BROADWELL_H 0x47 #define CPU_MODEL_BRYSTALWELL 0x4C +#define CPU_MODEL_BROADWELL_E 0x4F #define CPU_MODEL_SKYLAKE 0x4E -#define CPU_MODEL_SKYLAKE_H_S 0x5E +#define CPU_MODEL_SKYLAKE_ULT 0x4E +#define CPU_MODEL_SKYLAKE_ULX 0x4E +#define CPU_MODEL_SKYLAKE_DT 0x5E #define DALES_BRIDGE 1 #define SANDY_BRIDGE 2 diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index abc05d2..a90389e 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -75,6 +75,7 @@ void initEFITree(void) DT__AddProperty(gPlatform.DT.RootNode, "model", 5, ACPI); DT__AddProperty(gPlatform.DT.RootNode, "compatible", 5, ACPI); + // DT__AddProperty(gPlatform.DT.RootNode, "has-safe-sleep", 1, 0); Node * efiNode = DT__AddChild(gPlatform.DT.RootNode, "efi"); @@ -126,6 +127,7 @@ void initEFITree(void) DT__AddProperty(platformNode, "StartupPowerEvents", sizeof(STARTUP_POWER_EVENTS), (EFI_UINT8*) &STARTUP_POWER_EVENTS); DT__AddProperty(platformNode, "InitialTSC", sizeof(uint64_t), &gPlatform.CPU.TSCFrequency); DT__AddProperty(platformNode, "SystemSerialNumber", sizeof(SYSTEM_SERIAL_NUMBER), (EFI_CHAR16*) SYSTEM_SERIAL_NUMBER); + // DT__AddProperty(platformNode, "nv-edid", sizeof(EFI_UINT8), (EFI_CHAR8*) 0); if (gPlatform.CPU.FSBFrequency) { @@ -222,7 +224,8 @@ void initEFITree(void) } else { - EFI_UINT8 seedBuffer[64] = {0}; + EFI_UINT8 seedBufferAlternative[64]; + bzero(seedBufferAlternative, 64); // // Main loop to get the 64 bytes. // @@ -246,7 +249,7 @@ void initEFITree(void) rdi = (rdi ^ rcx); // xor %rcx, %rdi rdi = (rdi ^ rdx); // xor %rdx, %rdi - seedBuffer[index] = (rdi & 0xff); // mov %dil, (%r15,%r12,1) + seedBufferAlternative[index] = (rdi & 0xff); // mov %dil, (%r15,%r12,1) edi = (edi & 0x2f); // and $0x2f, %edi edi = (edi + esi); // add %esi, %edi @@ -256,12 +259,12 @@ void initEFITree(void) } while (index < 64); // cmp %r14d, %r12d // jne 0x17e55 (next) - DT__AddProperty(chosenNode, "random-seed", sizeof(seedBuffer), (EFI_UINT8*) &seedBuffer); - - DT__AddProperty(chosenNode, "booter-name", 12, "bootbase.efi"); - DT__AddProperty(chosenNode, "booter-version", 11, "version:307"); - DT__AddProperty(chosenNode, "booter-build-time", 28, "Fri Sep 4 15:34:00 PDT 2015"); + DT__AddProperty(chosenNode, "random-seed", sizeof(seedBufferAlternative), (EFI_UINT8*) &seedBufferAlternative); } + + DT__AddProperty(chosenNode, "booter-name", 12, "bootbase.efi"); + DT__AddProperty(chosenNode, "booter-version", 11, "version:307"); + DT__AddProperty(chosenNode, "booter-build-time", 28, "Fri Sep 4 15:34:00 PDT 2015"); #endif #if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. diff --git a/i386/libsaio/platform.c b/i386/libsaio/platform.c index a01bceb..1389c22 100644 --- a/i386/libsaio/platform.c +++ b/i386/libsaio/platform.c @@ -238,25 +238,27 @@ void initPlatform(int biosDevice) const char * ramPartNumber[] = STATIC_RAM_PART_NUMBERS; const char * ramSerialNumber[] = STATIC_RAM_SERIAL_NUMBERS; -#if DYNAMIC_RAM_OVERRIDE_SIZE - int ramSize[] = DYNAMIC_RAM_OVERRIDE_SIZES; +#if STATIC_RAM_OVERRIDE_SIZE + int ramSize[] = STATIC_RAM_OVERRIDE_SIZES; #endif int i = 0; + int populatedSlotCount = 0; // Loop through the static RAM vendors (might be different). for (; i < STATIC_RAM_SLOTS; i++) { gPlatform.RAM.SlotCount++; - // We check for "N/A" so make sure you use that in config/settings.h + // We check for "N/A" so make sure you use that in config/settings.h for unused RAM banks. if (strcmp(ramVendor[i], "N/A") != 0) { _PLATFORM_DEBUG_DUMP("Slot:%d, ", i); + populatedSlotCount++; gPlatform.RAM.MODULE[i].InUse = true; - gPlatform.RAM.MODULE[i].Type = DYNAMIC_RAM_OVERRIDE_TYPE; -#if DYNAMIC_RAM_OVERRIDE_SIZE + gPlatform.RAM.MODULE[i].Type = STATIC_RAM_OVERRIDE_TYPE; +#if STATIC_RAM_OVERRIDE_SIZE gPlatform.RAM.MODULE[i].Size = ramSize[i]; _PLATFORM_DEBUG_DUMP("Size:%d, ", gPlatform.RAM.MODULE[i].Size); @@ -269,12 +271,20 @@ void initPlatform(int biosDevice) gPlatform.RAM.MODULE[i].Vendor, gPlatform.RAM.MODULE[i].PartNumber, gPlatform.RAM.MODULE[i].SerialNumber); + _PLATFORM_DEBUG_SLEEP(2); } else { // Properly initialized for: smbios/dynamic_data.h which relies on it. gPlatform.RAM.MODULE[i].InUse = false; } + + _PLATFORM_DEBUG_SLEEP(1); + } + + if (populatedSlotCount < 2) + { + stop("At least 2 RAM banks required, check vendors in configuration file)!\n"); } _PLATFORM_DEBUG_DUMP("Static data for %d RAM BANKS used.\n", gPlatform.RAM.SlotCount); diff --git a/i386/libsaio/smbios.c b/i386/libsaio/smbios.c index 0830aa2..d4bf1b0 100755 --- a/i386/libsaio/smbios.c +++ b/i386/libsaio/smbios.c @@ -83,7 +83,7 @@ void setupSMBIOS(void) if (currentStructureType == kSMBTypeMemoryDevice) { UInt64 memorySize = 0; -#if DYNAMIC_RAM_OVERRIDE_SIZE +#if STATIC_RAM_OVERRIDE_SIZE memorySize = getRAMSize(); #else memorySize = ((SMBMemoryDevice *)header)->memorySize; diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index ce7eeaf..3acb01f 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -160,7 +160,7 @@ struct SMBProperty SMBProperties[] = //---------------------------------------------------------------------------------------------------- -#if DYNAMIC_RAM_OVERRIDE_ERROR_HANDLE +#if STATIC_RAM_OVERRIDE_ERROR_HANDLE // Handle or instance number associated with any error that was previously detected for the device. // If the system does not provide the error information structure, then this field contains FFFEh; // otherwise this field contains either FFFFh (if no error was detected) or the handle (number) of @@ -168,18 +168,18 @@ struct SMBProperty SMBProperties[] = { kSMBTypeMemoryDevice, 0x06, kSMBWord, .plainData = 0xFFFE }, #endif -#if DYNAMIC_RAM_OVERRIDE_SIZE +#if STATIC_RAM_OVERRIDE_SIZE { kSMBTypeMemoryDevice, 0x0c, kSMBWord, .getSMBWord = getRAMSize }, #endif { kSMBTypeMemoryDevice, 0x10, kSMBString, .getSMBString = NULL }, { kSMBTypeMemoryDevice, 0x11, kSMBString, .getSMBString = NULL }, -#if DYNAMIC_RAM_OVERRIDE_TYPE +#if STATIC_RAM_OVERRIDE_TYPE { kSMBTypeMemoryDevice, 0x12, kSMBByte, .getSMBByte = getRAMType }, #endif -#if DYNAMIC_RAM_OVERRIDE_FREQUENCY +#if STATIC_RAM_OVERRIDE_FREQUENCY { kSMBTypeMemoryDevice, 0x15, kSMBWord, .getSMBWord = getRAMFrequency }, #endif @@ -206,14 +206,13 @@ void setupSMBIOS(void) // return; //-------------------------------------------------------------------------- - // Allocate 1 page of kernel memory (sufficient for a stripped SMBIOS table). - void * kernelMemory = (void *)AllocateKernelMemory(8192); // 4096); + // Allocate 4 pages of kernel memory (enough for a stripped SMBIOS table). + void * kernelMemory = (void *)AllocateKernelMemory(8192); // 4096 // Setup a new Entry Point Structure at the beginning of the newly allocated memory page. struct SMBEntryPoint * newEPS = (struct SMBEntryPoint *) kernelMemory; - // Clear the first K bytes (new table will be even shorter). - bzero(kernelMemory, 1024); + bzero(kernelMemory, 8192); newEPS->anchor[0] = 0x5f; // _ newEPS->anchor[1] = 0x53; // S @@ -289,7 +288,7 @@ void setupSMBIOS(void) newtablesPtr += 8; } -#if (DYNAMIC_RAM_OVERRIDE_ERROR_HANDLE || DYNAMIC_RAM_OVERRIDE_SIZE || DYNAMIC_RAM_OVERRIDE_TYPE || DYNAMIC_RAM_OVERRIDE_FREQUENCY) +#if (STATIC_RAM_OVERRIDE_ERROR_HANDLE || STATIC_RAM_OVERRIDE_SIZE || STATIC_RAM_OVERRIDE_TYPE || STATIC_RAM_OVERRIDE_FREQUENCY) requiredStructures[17].stop = (sizeof(SMBProperties) / sizeof(SMBProperties[0])) -1; #endif @@ -347,7 +346,7 @@ void setupSMBIOS(void) else if (currentStructureType == kSMBTypeMemoryDevice) { UInt64 memorySize = 0; -#if DYNAMIC_RAM_OVERRIDE_SIZE +#if STATIC_RAM_OVERRIDE_SIZE memorySize = getRAMSize(); #else memorySize = ((SMBMemoryDevice *)factoryHeader)->memorySize; From aed86396895ba7eb4d691b73e7dbffae9f7e2366 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Thu, 4 Aug 2016 01:28:47 +0200 Subject: [PATCH 558/623] Update from local tree MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – Warning: Review required for getFSBFrequency() --- i386/libsaio/smbios/getters.h | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/i386/libsaio/smbios/getters.h b/i386/libsaio/smbios/getters.h index 3867e2c..0d6008d 100755 --- a/i386/libsaio/smbios/getters.h +++ b/i386/libsaio/smbios/getters.h @@ -27,12 +27,12 @@ #define NOT_AVAILABLE "N/A" #define RAM_SLOT_EMPTY "" -#ifndef DYNAMIC_RAM_OVERRIDE_TYPE - #define DYNAMIC_RAM_OVERRIDE_TYPE SMB_MEM_TYPE_DDR3 +#ifndef STATIC_RAM_OVERRIDE_TYPE + #define STATIC_RAM_OVERRIDE_TYPE SMB_MEM_TYPE_DDR3 #endif -#ifndef DYNAMIC_RAM_OVERRIDE_FREQUENCY - #define DYNAMIC_RAM_OVERRIDE_FREQUENCY 1066 +#ifndef STATIC_RAM_OVERRIDE_FREQUENCY + #define STATIC_RAM_OVERRIDE_FREQUENCY 1066 #endif /*============================================================================== @@ -93,7 +93,8 @@ static inline struct SMBEntryPoint * getEPSAddress(void) static SMBWord getFSBFrequency(void) { - _SMBIOS_DEBUG_DUMP("In getFSBFrequency() = %d Hz\n", (gPlatform.CPU.FSBFrequency < 100500000) ? 0 : (gPlatform.CPU.FSBFrequency / 1000000)); + // _SMBIOS_DEBUG_DUMP("In getFSBFrequency() = %d Hz\n", (gPlatform.CPU.FSBFrequency < 100500000) ? 0 : (gPlatform.CPU.FSBFrequency / 1000000)); + _SMBIOS_DEBUG_DUMP("In getFSBFrequency() = %d Hz\n", (gPlatform.CPU.FSBFrequency == 0) ? 0 : (gPlatform.CPU.FSBFrequency / 1000000)); if (gPlatform.CPU.QPISpeed == 0) { @@ -112,7 +113,7 @@ static SMBWord getFSBFrequency(void) * (for example) report 412 MHz instead of 103 MHz. */ - return (gPlatform.CPU.FSBFrequency < 100500000) ? 0 : (gPlatform.CPU.FSBFrequency / 1000000); + return 100; // (gPlatform.CPU.FSBFrequency < 100500000) ? 0 : (gPlatform.CPU.FSBFrequency / 1000000); } @@ -136,8 +137,8 @@ static SMBWord getCPUType(void) } -//============================================================================== #if OVERRIDE_DYNAMIC_MEMORY_DETECTION +//============================================================================== int getSlotNumber(int slotNumber) { @@ -156,7 +157,7 @@ int getSlotNumber(int slotNumber) } #if DEBUG_SMBIOS - // sleep(1); // Silent sleep (for debug only / slows down the process). + sleep(1); // Silent sleep (for debug only / slows down the process). #endif return slotNumber; @@ -164,8 +165,8 @@ int getSlotNumber(int slotNumber) #endif +#if STATIC_RAM_OVERRIDE_SIZE //============================================================================== -#if DYNAMIC_RAM_OVERRIDE_SIZE static SMBWord getRAMSize(void) { @@ -183,28 +184,28 @@ static SMBWord getRAMSize(void) #endif +#if STATIC_RAM_OVERRIDE_TYPE //============================================================================== -#if DYNAMIC_RAM_OVERRIDE_TYPE static SMBByte getRAMType(void) { #if (DEBUG_SMBIOS == 2) - _SMBIOS_DEBUG_DUMP("In getRAMType() = %s\n", SMBMemoryDeviceTypes[DYNAMIC_RAM_OVERRIDE_TYPE]); + _SMBIOS_DEBUG_DUMP("In getRAMType() = %s\n", SMBMemoryDeviceTypes[STATIC_RAM_OVERRIDE_TYPE]); #endif - return DYNAMIC_RAM_OVERRIDE_TYPE; + return STATIC_RAM_OVERRIDE_TYPE; } #endif +#if STATIC_RAM_OVERRIDE_FREQUENCY //============================================================================== -#if DYNAMIC_RAM_OVERRIDE_FREQUENCY static SMBWord getRAMFrequency(void) { - _SMBIOS_DEBUG_DUMP("In getRAMFrequency() = %d\n", DYNAMIC_RAM_OVERRIDE_FREQUENCY); + _SMBIOS_DEBUG_DUMP("In getRAMFrequency() = %d\n", STATIC_RAM_OVERRIDE_FREQUENCY); - return DYNAMIC_RAM_OVERRIDE_FREQUENCY; + return STATIC_RAM_OVERRIDE_FREQUENCY; } #endif From cabc85f0ed86b5e2d3a7388c62d327ad0f3a6e97 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Thu, 4 Aug 2016 01:29:19 +0200 Subject: [PATCH 559/623] Keeping AppleAPIC.kext ready for the undo. --- i386/boot2/boot.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 5bb964a..4d07c85 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -63,6 +63,10 @@ #include "xhci.h" #endif +#if PATCH_APIC_RET + #include "backup/apic.h" +#endif + //============================================================================== // Local adler32 function. @@ -786,17 +790,20 @@ void boot(int biosdev) #if DISABLE_LEGACY_XHCI disableLegacyXHCI(); #endif + +#if PATCH_APIC_RET + patchApicRedirectionTables(); +#endif + // Did we switch to graphics mode yet (think verbose mode)? if (gVerboseMode || bootArgs->Video.v_display != GRAPHICS_MODE) { - // _BOOT_DEBUG_SLEEP(6); - // Switch to graphics mode and show the (white) Apple logo on a black/gray background. showBootLogo(); + + _BOOT_DEBUG_SLEEP(5); } - _BOOT_DEBUG_DUMP("execKernel-8\n"); - startMachKernel(kernelEntry, bootArgs); // asm.s } From 7da67793401d0122f639aa09d23cc9a89da91563 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Thu, 4 Aug 2016 13:40:01 +0200 Subject: [PATCH 560/623] Updating settings template. --- i386/config/settings-template.h | 40 +++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 0f2315b..cc6a4c8 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -35,6 +35,11 @@ * - STATIC_SYSTEM_ID renamed to SMB_STATIC_SYSTEM_UUID and moved to SMBIOS section (Pike R. Alpha, January 2013). * - Renamed LION_INSTALL_SUPPORT to INSTALL_ESD_SUPPORT (Pike R. Alpha, April 2013). * - Renamed LION_RECOVERY_SUPPORT to RECOVERY_HD_SUPPORT (Pike R. Alpha, October 2013). + * - PRE_LINKED_KERNEL_SUPPORT renamed to PRELINKED_KERNEL_SUPPORT (Pike R. Alpha, October 2015). + * - DYNAMIC_RAM_OVERRIDE_TYPE renamed to STATIC_RAM_OVERRIDE_TYPE (Pike R. Alpha, July 2016). + * - DYNAMIC_RAM_OVERRIDE_SIZE renamed to STATIC_RAM_OVERRIDE_SIZE + * - DYNAMIC_RAM_OVERRIDE_SIZES renamed to STATIC_RAM_OVERRIDE_SIZES + * - DYNAMIC_RAM_OVERRIDE_FREQUENCY renamed to STATIC_RAM_OVERRIDE_FREQUENCY */ @@ -124,7 +129,7 @@ // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. -#define LOAD_DSDT_TABLE_FROM_EXTRA_ACPI 0 // Set to 0 by default. Use 1 when your setup requires a modified DSDT table +#define LOAD_DSDT_TABLE_FROM_EXTRA_ACPI 0 // Set to 0 by default. Use 1 when your setup requires a modified DSDT table // and you want to load: /Extra/ACPI/dsdt.aml instead of injecting a static // DSDT table from: RevoBoot/i386/config/ACPI/data.h // @@ -192,6 +197,20 @@ #define DROP_FACTORY_SSDT_TABLES 0 // Set to 0 by default. Use 1 with caution (might disable CPU Power Management). #endif +#if DROP_FACTORY_SSDT_TABLES + #define DROP_SELECTED_SSDT_TABLE 1 // Set to 0 by default. + // + // Haswell (example) + // + // #define OEM_TABLE_ID_TARGETS { "CpuPm", "Cpu0Ist", 0 } + // + // Skylake (example) + // + // #define OEM_TABLE_ID_TARGETS { "sensrhub", "Ther_Rvp", "SaSsdt ", "CpuSsdt", "PtidDevc", "SataTabl", "xh_rvp10", 0 } + // #define OEM_TABLE_ID_TARGETS { "sensrhub", "Ther_Rvp", "PtidDevc", "SataTabl", "xh_rvp10", 0 } + #define OEM_TABLE_ID_TARGETS { "SataTabl", "PmMgt", 0 } +#endif + #define REPLACE_EXISTING_SSDT_TABLES 0 // Set to 0 by default. Use 1 with caution (might disable CPU Power Management). // // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1. @@ -201,6 +220,11 @@ // Note: Don't forget to set PATCH_ACPI_TABLE_DATA to 1 and keep in mind that this can // only change the headers of injected/replaced tables. Not the factory tables. +#define VERIFY_OPREGION_GNVS_ADDRESS 1 // Set to 0 by default. + +#if VERIFY_OPREGION_GNVS_ADDRESS + #define DUMP_OPREGION_GNVS_ADDRESS 0 // Set to 0 by default. +#endif #define DEBUG_ACPI 0 // Set to 0 by default. Use 1 when things don't seem to work for you. @@ -208,7 +232,7 @@ //--------------------------------------------------------------- BOOT.C ------------------------------------------------------------------- -#define PRE_LINKED_KERNEL_SUPPORT 1 // Set to 1 by default. Change this to 0 to disable the use of pre-linked kernels. +#define PRELINKED_KERNEL_SUPPORT 1 // Set to 1 by default. Change this to 0 to disable the use of pre-linked kernels. #define MUST_ENABLE_A20 0 // Set to 0 by default. Change this to 1 when your hardware requires it. @@ -216,8 +240,8 @@ #define RECOVERY_HD_SUPPORT 0 // Set to 0 by default. Change this to 1 to make RevoBoot search for the 'Recovery HD' // partition and, when available, boot from it. -#if (RECOVERY_HD_SUPPORT == 1 && PRE_LINKED_KERNEL_SUPPORT == 0) - #define PRE_LINKED_KERNEL_SUPPORT 1 +#if (RECOVERY_HD_SUPPORT == 1 && PRELINKED_KERNEL_SUPPORT == 0) + #define PRELINKED_KERNEL_SUPPORT 1 #endif #define STARTUP_DISK_SUPPORT 0 // Set to 0 by default. Change this to 1 for System Preference/Startup Disk support. @@ -474,4 +498,12 @@ #define DEBUG_PLATFORM 0 // Set to 0 by default. Change this to 1 when things don't seem to work for you. +//---------------------------------------------------------------- XHCI.H ------------------------------------------------------------------ + +#define DISABLE_LEGACY_XHCI 0 // Set to 0 by default. Change this to 1 when you need to disable legacy XHCI. + +#define DEBUG_XHCI 0 + + + //================================================================= END ==================================================================== From f1629451a1be4f3b803dcd80e3d0844699e60045 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Fri, 5 Aug 2016 14:14:39 +0200 Subject: [PATCH 561/623] Typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – PATCH_XCPI_SCOPE_MSRS renamed to PATCH_XCPM_SCOPE_MSRS --- i386/libsaio/cpu/Intel/dynamic_data.h | 2 +- i386/libsaio/platform.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index 22c14bd..3b2992a 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -480,7 +480,7 @@ void initCPUStruct(void) // Check bit-15 of MSR 0xE2 to see if it is locked. msr = rdmsr64(MSR_PKG_CST_CONFIG_CONTROL); -#if PATCH_XCPI_SCOPE_MSRS +#if PATCH_XCPM_SCOPE_MSRS gPlatform.CPU.CstConfigMsrLocked = (msr & 0x8000); #endif diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 6e09088..163bd2f 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -263,7 +263,7 @@ typedef struct _PlatformInfo_t { bool Mobile; // Set to true (in cpu/dynamic_data.h) for Mobile CPU's. -#if PATCH_XCPI_SCOPE_MSRS +#if PATCH_XCPM_SCOPE_MSRS bool CstConfigMsrLocked; // Initialised in cpu/dynamic_data.h and used in load.c #endif uint16_t Type; // CPU type ('cpu-type') used in the SMBIOS patcher. From a9f538a87fc5b9226fff5288a74f3bc772a3697c Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Fri, 5 Aug 2016 14:17:00 +0200 Subject: [PATCH 562/623] Typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – PATCH_XCPI_SCOPE_MSRS renamed to PATCH_XCPM_SCOPE_MSRS --- i386/config/settings-template.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index cc6a4c8..506a204 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -40,6 +40,7 @@ * - DYNAMIC_RAM_OVERRIDE_SIZE renamed to STATIC_RAM_OVERRIDE_SIZE * - DYNAMIC_RAM_OVERRIDE_SIZES renamed to STATIC_RAM_OVERRIDE_SIZES * - DYNAMIC_RAM_OVERRIDE_FREQUENCY renamed to STATIC_RAM_OVERRIDE_FREQUENCY + * - PATCH_XCPI_SCOPE_MSRS renamed to PATCH_XCPM_SCOPE_MSRS */ @@ -455,7 +456,7 @@ #define LOAD_EXECUTABLE_TARGET_UINT64 0x487074db8548c389ULL // 89c34885db747048 revered in HexEdit #define LOAD_EXECUTABLE_PATCH_UINT64 0x4812ebdb8548c389ULL -#define PATCH_XCPI_SCOPE_MSRS 0 // Set to 0 by default. +#define PATCH_XCPM_SCOPE_MSRS 0 // Set to 0 by default. #define XCPM_SCOPE_MSRS_TARGET_UINT64 0x00000002000000E2ULL From d3fdff483dd0ae6e00942513f1bfb8573b16d2d6 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Wed, 10 Aug 2016 16:46:59 +0200 Subject: [PATCH 563/623] New processor models. --- i386/libsaio/cpu/essentials.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index 2c8671d..ad3e4a3 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -193,12 +193,17 @@ #define CPU_MODEL_BROADWELL_H 0x47 #define CPU_MODEL_BRYSTALWELL 0x4C #define CPU_MODEL_BROADWELL_E 0x4F +#define CPU_MODEL_BROADWELL_DE 0x56 #define CPU_MODEL_SKYLAKE 0x4E #define CPU_MODEL_SKYLAKE_ULT 0x4E #define CPU_MODEL_SKYLAKE_ULX 0x4E +#define CPU_MODEL_SKYLAKE_X 0x55 #define CPU_MODEL_SKYLAKE_DT 0x5E +#define CPU_MODEL_KABYLAKE 0x8E +#define CPU_MODEL_KABYLAKE_DT 0x9E + #define DALES_BRIDGE 1 #define SANDY_BRIDGE 2 #define IVY_BRIDGE 4 From 15b45c4c7f9865cbc510b127950e6de0268c486b Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Wed, 10 Aug 2016 16:53:30 +0200 Subject: [PATCH 564/623] Additional changes for new processor models. --- i386/libsaio/cpu/Intel/dynamic_data.h | 10 ++++++++-- i386/libsaio/cpu/essentials.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index 3b2992a..b9df711 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -398,7 +398,7 @@ void initCPUStruct(void) case CPU_MODEL_BROADWELL_H: case CPU_MODEL_BRYSTALWELL: case CPU_MODEL_BROADWELL_E: - + case CPU_MODEL_BROADWELL_DE: CoreBridgeType = BROADWELL; hiBit = 31; break; @@ -407,6 +407,7 @@ void initCPUStruct(void) // case CPU_MODEL_SKYLAKE_ULT: // case CPU_MODEL_SKYLAKE_ULX: case CPU_MODEL_SKYLAKE_DT: + case CPU_MODEL_SKYLAKE_X: CoreBridgeType = SKYLAKE; hiBit = 31; // gPlatform.CPU.ARTFrequency = (3427489466 * 2 / 284) = 24137249,76056338028169 MHz @@ -417,6 +418,11 @@ void initCPUStruct(void) gPlatform.CPU.ARTFrequency = 0; // BASE_ART_CLOCK_SOURCE; // (tscFrequency * getCachedCPUID(LEAF_x15, eax) / getCachedCPUID(LEAF_x15, ebx)); break; + case CPU_MODEL_KABYLAKE: + case CPU_MODEL_KABYLAKE_DT: + CoreBridgeType = KABYLAKE; + hiBit = 31; + case CPU_MODEL_NEHALEM: case CPU_MODEL_NEHALEM_EX: case CPU_MODEL_FIELDS: @@ -468,7 +474,7 @@ void initCPUStruct(void) requestMaxTurbo(maxBusRatio); } - if (CoreBridgeType) // (SandyBridge || IvyBridge || Haswell || Broadwell || SkyLake) + if (CoreBridgeType) // (SandyBridge || IvyBridge || Haswell || Broadwell || SkyLake || KabyLake) { // gPlatform.CPU.Type += CoreBridgeType; diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index ad3e4a3..c038081 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -210,5 +210,6 @@ #define HASWELL 8 #define BROADWELL 16 #define SKYLAKE 32 +#define KABYLAKE 64 #endif /* !__LIBSAIO_CPU_ESSENTIALS_H */ From 6c984d2c950a0127f74adb4edc37ddd38627c95b Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Mon, 15 Aug 2016 10:31:16 +0200 Subject: [PATCH 565/623] Unimportant change; only renaming a variable. --- i386/boot2/boot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 4d07c85..38e1505 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -171,7 +171,7 @@ void boot(int biosdev) bool haveCABootPlist = false; bool quietBootMode = true; - void *fileLoadBuffer = (void *)kLoadAddr; + void *loadBuffer = (void *)kLoadAddr; char bootFile[256]; char rootUUID[37]; @@ -676,7 +676,7 @@ void boot(int biosdev) if (LoadFile((const char *)preLinkedKernelPath)) { retStatus = 1; - fileLoadBuffer = (void *)kLoadAddr; + loadBuffer = (void *)kLoadAddr; bootFile[0] = 0; } @@ -714,7 +714,7 @@ void boot(int biosdev) _BOOT_DEBUG_DUMP("About to load: %s\n", bootFile); - retStatus = LoadThinFatFile(bootFile, &fileLoadBuffer); + retStatus = LoadThinFatFile(bootFile, &loadBuffer); #if SUPPORT_32BIT_MODE if (retStatus <= 0 && gPlatform.ArchCPUType == CPU_TYPE_X86_64) @@ -723,7 +723,7 @@ void boot(int biosdev) gPlatform.ArchCPUType = CPU_TYPE_I386; - retStatus = LoadThinFatFile(bootFile, &fileLoadBuffer); + retStatus = LoadThinFatFile(bootFile, &loadBuffer); } #endif // SUPPORT_32BIT_MODE @@ -745,7 +745,7 @@ void boot(int biosdev) _BOOT_DEBUG_DUMP("execKernel-1\n"); - if (decodeKernel(fileLoadBuffer, &kernelEntry, (char **) &bootArgs->kaddr, (int *)&bootArgs->ksize) != 0) + if (decodeKernel(loadBuffer, &kernelEntry, (char **) &bootArgs->kaddr, (int *)&bootArgs->ksize) != 0) { stop("DecodeKernel() failed!"); } From a506e70fda1b304f26b77c601bacfb9159da83ff Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Mon, 15 Aug 2016 10:32:41 +0200 Subject: [PATCH 566/623] Use Lower Camel Case for function names. --- i386/boot2/drivers.c | 16 ++++++++++------ i386/libsaio/saio_internal.h | 5 +++-- i386/libsaio/saio_types.h | 2 +- i386/libsaio/sys.c | 7 ++++--- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/i386/boot2/drivers.c b/i386/boot2/drivers.c index 6006dae..6d1c2be 100755 --- a/i386/boot2/drivers.c +++ b/i386/boot2/drivers.c @@ -27,6 +27,10 @@ * Copyright (c) 2000 Apple Computer, Inc. * * DRI: Josh de Cesare + * + * Updates: + * - Use Lower Camel Case for function names (Pike R. Alpha, July 2016) + * */ #include <mach-o/fat.h> @@ -106,7 +110,7 @@ static long matchLibraries(void); #ifdef NOTDEF static ModulePtr findModule(char *name); - static void ThinFatFile(void **loadAddrP, unsigned long *lengthP); + static void thinFatFile(void **loadAddrP, unsigned long *lengthP); #endif static long parseXML(char *buffer, ModulePtr *module, TagPtr *personalities); @@ -608,7 +612,7 @@ static long loadMatchedModules(void) //driverModuleAddr = (void *)kLoadAddr; //if (length != 0) //{ - // ThinFatFile(&driverModuleAddr, &length); + // thinFatFile(&driverModuleAddr, &length); //} // Make room in the image area. @@ -990,20 +994,20 @@ long decodeKernel(void *fileLoadBuffer, entry_t *rentry, char **raddr, int *rsiz } } - ret = ThinFatFile(&fileLoadBuffer, &len); + ret = thinFatFile(&fileLoadBuffer, &len); if (ret == 0 && len == 0 && gPlatform.ArchCPUType == CPU_TYPE_X86_64) { gPlatform.ArchCPUType = CPU_TYPE_I386; - ret = ThinFatFile(&fileLoadBuffer, &len); + ret = thinFatFile(&fileLoadBuffer, &len); } - ret = DecodeMachO(fileLoadBuffer, rentry, raddr, rsize); + ret = decodeMachO(fileLoadBuffer, rentry, raddr, rsize); if (ret < 0 && gPlatform.ArchCPUType == CPU_TYPE_X86_64) { gPlatform.ArchCPUType = CPU_TYPE_I386; - ret = DecodeMachO(fileLoadBuffer, rentry, raddr, rsize); + ret = decodeMachO(fileLoadBuffer, rentry, raddr, rsize); } #if DEBUG_DRIVERS diff --git a/i386/libsaio/saio_internal.h b/i386/libsaio/saio_internal.h index 1a4f627..eecf89b 100755 --- a/i386/libsaio/saio_internal.h +++ b/i386/libsaio/saio_internal.h @@ -26,6 +26,7 @@ * - loadBinaryData(load.c) and toLowerCase(string.c) added (PikerAlpha, October 2012). * - Tidied up (spaces -> tabs) (PikerAlpha, October 2012). * - Stripped (unnecessary) argument from loadSystemConfig (PikerAlpha, April 2013). + * - Use Lower Camel Case for function names (Pike R. Alpha, July 2016) * */ @@ -145,8 +146,8 @@ extern void utf_decodestr(const u_int8_t *utf8p, u_int16_t *ucsp, u_int16_t *uc /* load.c */ extern bool gLoadKernelDrivers; -extern long ThinFatFile(void **binary, unsigned long *length); -extern long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize); +extern long thinFatFile(void **binary, unsigned long *length); +extern long decodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize); extern long loadBinaryData(char *aFilePath, void **aMemoryAddress); diff --git a/i386/libsaio/saio_types.h b/i386/libsaio/saio_types.h index 90e67c3..7b4942c 100755 --- a/i386/libsaio/saio_types.h +++ b/i386/libsaio/saio_types.h @@ -65,7 +65,7 @@ typedef struct Tag typedef struct { char plist[4096]; // buffer for plist - TagPtr dictionary; // buffer for xml dictionary + TagPtr dictionary; // buffer for XML dictionary bool canOverride; // flag to mark a dictionary can be overriden } config_file_t; diff --git a/i386/libsaio/sys.c b/i386/libsaio/sys.c index a086505..65af47d 100755 --- a/i386/libsaio/sys.c +++ b/i386/libsaio/sys.c @@ -53,7 +53,8 @@ * Copyright 2007 VMware Inc. "Preboot" ramdisk support added by David Elliott * * Updates: - * - Cleanups, white space and layout changes (PikerAlpha, November2012) + * - Cleanups, white space and layout changes (Pike R. Alpha, November 2012) + * - Use Lower Camel Case for function names (Pike R. Alpha, July 2016) * */ @@ -206,7 +207,7 @@ long LoadThinFatFile(const char *fileSpec, void **binary) if (length > 0) { - if (ThinFatFile(binary, &length) == 0) + if (thinFatFile(binary, &length) == 0) { if (length == 0) { @@ -237,7 +238,7 @@ long LoadThinFatFile(const char *fileSpec, void **binary) if (length > 0) { - ThinFatFile(binary, &length); + thinFatFile(binary, &length); } } From a221cc2693d93ac35a6f963b0133ea2e0505c447 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Mon, 15 Aug 2016 10:39:37 +0200 Subject: [PATCH 567/623] New debug output (moved over from load.c). --- i386/boot2/debug.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/i386/boot2/debug.h b/i386/boot2/debug.h index f298e41..3da5c24 100755 --- a/i386/boot2/debug.h +++ b/i386/boot2/debug.h @@ -109,5 +109,37 @@ #endif +#if DEBUG_KERNEL_PATCHER + #define DEBUG_SYMBOL_FOUND(symbol, offset, vmaddr, fileoff, start, end) \ + printf("Symbol %s found!\n", symbol); \ + printf("offset..............: 0x%llx\n", offset); \ + printf("textSegment->vmaddr.: 0x%llx\n", vmaddr); \ + printf("textSegment->fileoff: 0x%llx\n", fileoff); \ + printf("startAddress........: 0x%llx\n", start); \ + printf("endAddress..........: 0x%llx\n", end); \ + sleep(3); + + #define DEBUG_PATCH_STATUS(symbol, address, number, seconds) \ + printf("Patched %s(0x%llx) symbol-number: %ld\n", symbol, address, number); \ + \ + if (seconds) \ + { \ + sleep(seconds); \ + } + + #define DEBUG_DISABLED_MSR(msr, seconds) \ + printf("Disabling MSR: 0x%x\n"); \ + \ + if (seconds) \ + { \ + sleep(seconds); \ + } + +#else + #define DEBUG_SYMBOL_FOUND(symbol, offset, vmaddr, fileoff, start, end) + #define DEBUG_SYMBOL_PATCH(symbol, address, number, seconds) + #define DEBUG_DISABLE_MSR(msr, seconds) +#endif + #endif // __REVO_DEBUG_H From 924fba83426b7689e990217ae5322b95164fc3ce Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Mon, 15 Aug 2016 11:20:06 +0200 Subject: [PATCH 568/623] Another big update. --- i386/libsaio/load.c | 444 +++++++++++++++++++++++++++++++++----------- 1 file changed, 335 insertions(+), 109 deletions(-) diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index 9b24a4d..00153b0 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -24,8 +24,17 @@ * Copyright (c) 1998-2003 Apple Computer, Inc. * * Updates: - * - White space changes (PikerAlpha, November 2012) - * - Mountain Lion kernel patch for iMessage implemented (PikerAlpha, January 2013) + * - White space changes (Pike R. Alpha, November 2012) + * - Mountain Lion kernel patch for iMessage implemented (Pike R. Alpha, January 2013) + * - Patch for __ZN6OSKext14loadExecutableEv added (Pike R. Alpha, 2015) + * - Patch for __ZN12KLDBootstrap21readStartupExtensionsEv added. + * - Use Lower Camel Case for function names (Pike R. Alpha, July 2016) + * - Add _cpuid_set_info/_xcpm_bootstrap/_xcpm_idle to patches. + * - Dump global gBinaryAddress and use loadAddress argument. + * - New and improved patching routines (getting ready for smarter patching). + * - Renamed patchLoadExecutable to patchKernel (Pike R. Alpha, August 2016) + * - New and improved debug output (see also boot2/debug.h) + * - Made some preparations to move patchKernel() to patcher.c * */ @@ -49,27 +58,25 @@ bool gLoadKernelDrivers = true; // Private functions. -#if (PATCH_KEXT_LOADING && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) - static long patchLoadExecutable(unsigned long cmdBase, long listSize, unsigned long textSegmentAddress, unsigned long vldSegmentAddress); +#if (PATCH_KERNEL && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) + static long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize, unsigned long textSegmentAddress, unsigned long vldSegmentAddress); #endif -static long initKernelVersionInfo(unsigned long cmdbase, long listSize, unsigned int textSegmentAddress); -static long DecodeSegment(long cmdBase, unsigned int*load_addr, unsigned int *load_size); -static long DecodeUnixThread(long cmdBase, unsigned int *entry); +static long initKernelVersionInfo(unsigned long loadAddress, unsigned long cmdbase, long listSize, unsigned int textSegmentAddress); +static long decodeSegment(unsigned long loadAddress, long cmdBase, unsigned int*load_addr, unsigned int *load_size); +static long decodeUnixThread(long cmdBase, unsigned int *entry); #define ADD_SYMTAB 1 #if ADD_SYMTAB - static long DecodeSymbolTable(long cmdBase); + static long decodeSymbolTable(unsigned long loadAddress, long cmdBase); #endif -static unsigned long gBinaryAddress; - //============================================================================== // Public function. -long ThinFatFile(void **binary, unsigned long *length) +long thinFatFile(void **binary, unsigned long *length) { unsigned long nfat, swapped, size = 0; struct fat_header *fhp = (struct fat_header *)*binary; @@ -126,9 +133,9 @@ long ThinFatFile(void **binary, unsigned long *length) //============================================================================== -// Called from DecodeKernel() in drivers.c +// Called from decodeKernel() in drivers.c -long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) +long decodeMachO(void *fileLoadBuffer, entry_t *rentry, char **raddr, int *rsize) { long ret = -1; long sectionNumber = 0; @@ -149,11 +156,11 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) unsigned long cnt = 0; unsigned long listSize = 0; - gBinaryAddress = (unsigned long)binary; + unsigned long loadAddress = (unsigned long)fileLoadBuffer; if (gPlatform.ArchCPUType == CPU_TYPE_X86_64) { - struct mach_header_64 * machHeader = (struct mach_header_64 *)(gBinaryAddress); + struct mach_header_64 * machHeader = (struct mach_header_64 *)(loadAddress); if (machHeader->magic != MH_MAGIC_64) { @@ -162,9 +169,9 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) } listSize = sizeof(struct nlist_64); - cmdstart = (unsigned long)gBinaryAddress + sizeof(struct mach_header_64); + cmdstart = loadAddress + sizeof(struct mach_header_64); #if DEBUG - printf("In DecodeMachO()\n"); + printf("In decodeMachO()\n"); printf("magic: %x\n", (unsigned)machHeader->magic); printf("cputype: %x\n", (unsigned)machHeader->cputype); printf("cpusubtype: %x\n", (unsigned)machHeader->cpusubtype); @@ -176,9 +183,10 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) #endif ncmds = machHeader->ncmds; } +#if ((MAKE_TARGET_OS & SNOW_LEOPARD) == SNOW_LEOPARD) else // if (gPlatform.ArchCPUType == CPU_TYPE_I386) { - struct mach_header * machHeader = (struct mach_header *)(gBinaryAddress); + struct mach_header * machHeader = (struct mach_header *)(loadAddress); if (machHeader->magic != MH_MAGIC) { @@ -187,9 +195,9 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) } listSize = sizeof(struct nlist); - cmdstart = (unsigned long)gBinaryAddress + sizeof(struct mach_header); + cmdstart = loadAddress + sizeof(struct mach_header); #if DEBUG - printf("In DecodeMachO()\n"); + printf("In decodeMachO()\n"); printf("magic: %x\n", (unsigned)machHeader->magic); printf("cputype: %x\n", (unsigned)machHeader->cputype); printf("cpusubtype: %x\n", (unsigned)machHeader->cpusubtype); @@ -201,6 +209,7 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) #endif ncmds = machHeader->ncmds; } +#endif cmdBase = cmdstart; @@ -213,7 +222,7 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) { case LC_SEGMENT: case LC_SEGMENT_64: - sectionNumber = DecodeSegment(cmdBase, &load_addr, &load_size); + sectionNumber = decodeSegment(loadAddress, cmdBase, &load_addr, &load_size); if (sectionNumber == 1) // __TEXT,__text { @@ -235,15 +244,15 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) break; case LC_SYMTAB: - initKernelVersionInfo(cmdBase, listSize, textSegmentAddress); -#if (PATCH_KEXT_LOADING && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) - patchLoadExecutable(cmdBase, listSize, textSegmentAddress, vldSegmentAddress); + initKernelVersionInfo(loadAddress, cmdBase, listSize, textSegmentAddress); +#if (PATCH_KERNEL && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) + patchKernel(loadAddress, cmdBase, listSize, textSegmentAddress, vldSegmentAddress); #endif break; case LC_MAIN: /* Mountain Lion's replacement for LC_UNIXTHREAD */ case LC_UNIXTHREAD: - ret = DecodeUnixThread(cmdBase, &entry); + ret = decodeUnixThread(cmdBase, &entry); break; default: @@ -275,7 +284,7 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) if (cmd == LC_SYMTAB) { - if (DecodeSymbolTable(cmdBase) != 0) + if (decodeSymbolTable(loadAddress, cmdBase) != 0) { return -1; } @@ -287,15 +296,15 @@ long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) return ret; } -#if (PATCH_KEXT_LOADING && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) +#if (PATCH_KERNEL && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) //============================================================================== -// Private function. Called from DecodeMachO() +// Private function. Called from decodeMachO() -static long patchLoadExecutable(unsigned long cmdBase, long listSize, unsigned long textSegmentAddress, unsigned long vldSegmentAddress) +static long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize, unsigned long textSegmentAddress, unsigned long vldSegmentAddress) { -#if (DEBUG_BOOT && PATCH_KEXT_LOADING && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) - printf("patchLoadExecutable() called\n"); +#if DEBUG_KERNEL_PATCHER + printf("patchKernel() called\n"); sleep(1); #endif @@ -308,100 +317,325 @@ static long patchLoadExecutable(unsigned long cmdBase, long listSize, unsigned l struct symtab_command * symtab = (struct symtab_command *)cmdBase; struct segment_command_64 * textSegment = (struct segment_command_64 *)textSegmentAddress; - // struct segment_command_64 * vldSegment = (struct segment_command_64 *)vldSegmentAddress; +#if PRELINKED_KERNEL_SUPPORT + struct segment_command_64 * vldSegment = (struct segment_command_64 *)vldSegmentAddress; +#endif + void * stringTable = (void *)(loadAddress + symtab->stroff); - void * stringTable = (void *)(gBinaryAddress + symtab->stroff); + const uint16_t targetMSRs[] = { 0xE2, 0x01A0, /* 0x01FC, */ 0x01AA, 0x0620, /* 0x064C, */ 0x063A, 0x0642 }; - uint32_t pointer = (gBinaryAddress + symtab->symoff + skippedSymbolCount); + uint32_t pointer = (loadAddress + symtab->symoff + skippedSymbolCount); while (symbolNumber < symtab->nsyms) { struct nlist_64 * nl = (struct nlist_64 *)pointer; -#if PATCH_KEXT_LOADING +#if PATCH_KEXT_LOADING || PATCH_CPUID_SET_INFO + int64_t offset = 0; + uint64_t startAddress = 0; + uint64_t endAddress = 0; + if ((nl->n_sect == 1 /* __TEXT,__text */) && nl->n_value) { symbolName = (char *)stringTable + nl->n_un.n_strx; - +#if PATCH_KEXT_LOADING if (strcmp(symbolName, "__ZN6OSKext14loadExecutableEv") == 0) { - int64_t offset = (nl->n_value - textSegment->vmaddr); - uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); - uint64_t endAddress = (startAddress + 0x300); - - /* printf("__ZN6OSKext14loadExecutableEv found!\n"); - printf("offset..............: 0x%llx\n", offset); - printf("textSegment->vmaddr.: 0x%llx\n", textSegment->vmaddr); - printf("textSegment->fileoff: 0x%llx\n", textSegment->fileoff); - printf("startAddress........: 0x%llx\n", startAddress); - printf("endAddress..........: 0x%llx\n", endAddress); - sleep(5); */ + offset = (nl->n_value - textSegment->vmaddr); + startAddress = (uint64_t)(textSegment->vmaddr + offset); + endAddress = (startAddress + 0x300); unsigned char * p = (unsigned char *)startAddress; + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) + for (; p <= (unsigned char *)endAddress; p++) { - if (*(uint64_t *)p == LOAD_EXECUTABLE_TARGET_UINT64) + // + // New search pattern: 0x48xx74db854c3789 + // + if ((*(uint32_t *)p == 0x8548c389) && (*(uint16_t *)(p+4) == 0x74db) && (*(uint8_t *)(p+7) == 0x48)) { - /* printf("Found @ 0x%llx ", (uint64_t)p - startAddress); - printf("Symbol-number: %ld\n", (symbolNumber + (skippedSymbolCount / listSize) + 1)); - sleep(3); */ + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + *(uint64_t *)p = 0x4812ebdb8548c389; + p = (unsigned char *)endAddress; + } - *(uint64_t *)p = LOAD_EXECUTABLE_PATCH_UINT64; + /* Old search patterns – macOS Sierra DP1 = 89 c3 48 85 db 74 77 48 in HexEdit + if (*(uint64_t *)p == 0x487774db8548e789) + { // ^^^^ + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + *(uint64_t *)p = 0x4812ebdb8548e789; // 89 c3 48 85 db eb 12 48 in HexEdit + // ^^^^ p = (unsigned char *)endAddress; } + else if (*(uint64_t *)p == 0x487174db8548c389) // macOS Sierra DP[2-5] = 89 c3 48 85 db 74 77 48 in HexEdit + { + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + *(uint64_t *)p = 0x4812ebdb8548c389; + // ^^^^ + p = (unsigned char *)endAddress; + } */ } } - } -#endif +#endif // #if PATCH_KEXT_LOADING -#if PATCH_XCPI_SCOPE_MSRS +#if PATCH_CPUID_SET_INFO #if PATCH_KEXT_LOADING + else + #endif + if (strcmp(symbolName, "_cpuid_set_info") == 0) + { + offset = (nl->n_value - textSegment->vmaddr); + startAddress = (uint64_t)(textSegment->vmaddr + offset); + endAddress = (startAddress + 0x2100); + + unsigned char * p = (unsigned char *)startAddress; + + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) + + for (; p <= (unsigned char *)endAddress; p++) + { + // Broadwell E (0x4F) -> Broadwell (0x47) => 0x4F-0x47 = 0x08 -> change 0xE9 into 0xE1 + // Haswell E (0x3F) -> Haswell (0x3C) => 0x3F-0x3C = 0x03 -> change 0xE9 into 0xE6 + // Ivy Bridge E (0x3E) -> Ivy Bridge (0x3A) => 0x3E-0x3A = 0x04 -> change 0xE9 into 0xE5 + + if (*(uint64_t *)p == 0xf883e9c083c4b60f) // Reversed 0f b6 c4 83 c0 e9 83 f8 (47) (8 bytes). + { // ^^ ^^ + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + // 0xff - 0xe9 = 0x16 + 0x01 = 0x17 + (0x4f - 0x47 = 0x08) = 0x1f (0x4f - 0x1f = 0x38) + *(uint64_t *)p = 0xf8839000000030b8; // Reversed b8 30 00 00 00 90 83 f8 (47) (8 bytes). + p = (unsigned char *)endAddress; + } + else if (*(uint64_t *)p == 0xf883f1c083c4b60f) // Reversed 0f b6 c4 83 c0 f1 83 f8 (47) (8 bytes). + { // ^^ ^^ + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + // 0xff - 0xf1 = 0x0e + 0x01 = 0x0f + (0x4f - 0x47 = 0x08) = 0x17 (0x4f - 0x17 = 0x38) + *(uint64_t *)p = 0xf8839000000038b8; // Reversed b8 38 00 00 00 90 83 f8 (47) (8 bytes). + p = (unsigned char *)endAddress; + } + + /* Broadwell_E (0x4F) -> Broadwell (0x47) + if (*(uint64_t *)p == 0x47f883e9c083c4b6) // Reversed (0f) b6 c4 83 c0 e9 83 f8 47 (8 bytes). + { // ^^ ^^ + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + *(uint64_t *)p = 0x47f883e1c083c4b6; // Reversed (0f) b6 c4 83 c0 e1 83 f8 47 (8 bytes). + p = (unsigned char *)endAddress; + } + else if (*(uint64_t *)p == 0x4ff883f1c083c4b6) // Reversed (0f) b6 c4 83 c0 f1 83 f8 4f (8 bytes). + { // ^^ ^^ + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + *(uint64_t *)p = 0x4ff883e9c083c4b6; // Reversed (0f) b6 c4 83 c0 e9 83 f8 4F (8 bytes). + p = (unsigned char *)endAddress; + } */ + } + } +#endif + else if (strcmp(symbolName, "_xcpm_bootstrap") == 0) + { + offset = (nl->n_value - textSegment->vmaddr); + startAddress = (uint64_t)(textSegment->vmaddr + offset); + endAddress = (startAddress + 0x100); + + unsigned char * p = (unsigned char *)startAddress; + + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) + + for (; p <= (unsigned char *)endAddress; p++) + { + if (*(uint64_t *)p == 0x1c7722fb83c4c383) // Reversed of HexEdit: 83 C3 C4 83 FB 22 77 1C + { // ˆˆ ˆˆ + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + *(uint64_t *)p = 0x1c7722fb83bcc383; // Reversed of HexEdit: 83 C3 BC 83 FB 22 77 1C + // ˆˆ ˆˆ + } + } + } + + else if (strcmp(symbolName, "_xcpm_idle") == 0) + { + offset = (nl->n_value - textSegment->vmaddr); + startAddress = (uint64_t)(textSegment->vmaddr + offset); + endAddress = (startAddress + 0x200); + + unsigned char * p = (unsigned char *)startAddress; + + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) + + for (; p <= (unsigned char *)endAddress; p++) + { + if (*(uint64_t *)p == 0x300f000000e2b920)// (48 C1 EA) 20 B9 E2 00 00 00 0F 30 reversed + { + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + *(uint64_t *)p = 0x9090000000e2b920; // Reversed (48 C1 EA) 20 B9 E2 00 00 00 90 90 (8 bytes). + } + } + } + } +#endif // #if PATCH_KEXT_LOADING || PATCH_CPUID_SET_INFO + +#if PATCH_XCPM_SCOPE_MSRS + #if PATCH_KEXT_LOADING || PATCH_CPUID_SET_INFO else #endif if (((nl->n_sect == 8 /* __DATA,__data */) && nl->n_value) && gPlatform.CPU.CstConfigMsrLocked) { + UInt8 repeat = 0; + symbolName = (char *)stringTable + nl->n_un.n_strx; - - if (strcmp(symbolName, "_xcpm_core_scope_msrs") == 0) + + if (strcmp(symbolName, "_xcpm_SMT_scope_msrs") == 0) + { + int64_t offset = (nl->n_value - textSegment->vmaddr); + uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); + + unsigned char * p = (unsigned char *)startAddress; + + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, 0) + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + // + // Zero out MSR 0xE2 (and MSR 0x01A0 + // + for (repeat = 0; repeat < 8; repeat++) + { + *(uint64_t *)p = 0x0000000000000000ULL; + p += 0x08; + } + } + else if (strcmp(symbolName, "_xcpm_core_scope_msrs") == 0) { int64_t offset = (nl->n_value - textSegment->vmaddr); uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); - uint64_t endAddress = (startAddress + 0x3f); - /* printf("_xcpm_core_scope_msrs found!\n"); - printf("offset..............: 0x%llx\n", offset); - printf("textSegment->vmaddr.: 0x%llx\n", textSegment->vmaddr); - printf("textSegment->fileoff: 0x%llx\n", textSegment->fileoff); - printf("startAddress........: 0x%llx\n", startAddress); - printf("endAddress..........: 0x%llx\n", endAddress); - sleep(5); */ + unsigned char * p = (unsigned char *)startAddress; + + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, 0) + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + // + // Zero out CPU bits of MSR 0xE2 + // + // *(uint64_t *) = 0x0000000000000000ULL; + *(uint32_t *)(p + 4) = 0x00000000UL; + // + // Skip to second MSR 0xE2 + // + p += 0x30; + // + // Zero out CPU bits of MSR 0xE2 + // + // *(uint64_t *) = 0x0000000000000000ULL; + *(uint32_t *)(p + 4) = 0x00000000UL; + } + else if (strcmp(symbolName, "_xcpm_pkg_scope_msrs") == 0) + { + int64_t offset = (nl->n_value - textSegment->vmaddr); + uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); unsigned char * p = (unsigned char *)startAddress; - for (; p <= (unsigned char *)endAddress; p++) + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, 0) + + // + // New way of patching. + // + for (unsigned char target_msr = 0; target_msr < 7; target_msr++) { - // Note: We don't really need this check. - if (*(uint64_t *)p == XCPM_SCOPE_MSRS_TARGET_UINT64) + // + // Secondary for-loop to find MSRs that we need to disable. + // + for (unsigned char msr_to_disable = 0; msr_to_disable < 6; msr_to_disable++) { - /* printf("Found @ 0x%llx ", (uint64_t)p - startAddress); - printf("Symbol-number: %ld\n", (symbolNumber + (skippedSymbolCount / listSize) + 1)); - sleep(3); */ - - *(uint64_t *)p = 0x0000000000000000ULL; - p += 0x30; - *(uint64_t *)p = 0x0000000000000000ULL; - p += 0x30; - *(uint64_t *)p = 0x0000000000000000ULL; - p = (unsigned char *)endAddress; + // + // Is this a MSR that we need to disable? + // + if (*(uint16_t *)p == targetMSRs[msr_to_disable]) + { + // + // Yes. + // + DEBUG_DISABLED_MSR(targetMSRs[msr_to_disable], 1) + // + // Zero out the 32-bit CPU-bits field. + // + *(uint32_t *)(p + 4) = 0x00000000UL; + // + // The MSR is now disabled. Break out of secondary for loop. + // + break; + } } + + p += 0x30; } + + /* Old way of patching. + // + // Zero out MSR 0x01A0 + // + *(uint64_t *)p = 0x0000000000000000ULL; + // + // Skip to MSR 0x01FC + // + p += 0x30; + // + // Zero out MSR 0x01FC + // + // *(uint64_t *)p = 0x0000000000000000ULL; + // + // Skip to MSR 0x01AA + // + p += 0x30; + // + // Zero out MSR 0x01AA + // + *(uint64_t *)p = 0x0000000000000000ULL; + // + // Skip to MSR 0x0620 + // + p += 0x30; + // + // Zero out MSR 0x0620 + // + *(uint64_t *)p = 0x0000000000000000ULL; + // + // Skip to MSR 0x064C + // + p += 0x30; + // + // Zero out MSR 0x064C + // + // *(uint64_t *)p = 0x0000000000000000ULL; + // + // Skip to MSR 0x063A + // + p += 0x30; + // + // Zero out MSR 0x063A + // + *(uint64_t *)p = 0x0000000000000000ULL; + // + // Skip to MSR 0x0642 + // + p += 0x30; + // + // Zero out MSR 0x0642 + // + *(uint64_t *)p = 0x0000000000000000ULL; */ } } -#endif +#endif // #if PATCH_XCPM_SCOPE_MSRS -#if PATCH_LOAD_EXTRA_KEXTS - #if (PATCH_KEXT_LOADING || PATCH_XCPI_SCOPE_MSRS) +#if (PATCH_LOAD_EXTRA_KEXTS && PRELINKED_KERNEL_SUPPORT) + #if (PATCH_KEXT_LOADING || PATCH_XCPM_SCOPE_MSRS) else #endif if ((nl->n_sect == 25 /* __KLD,__text */) && nl->n_value) @@ -414,25 +648,17 @@ static long patchLoadExecutable(unsigned long cmdBase, long listSize, unsigned l uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); uint64_t endAddress = (startAddress + 0x3f); - /* printf("__ZN12KLDBootstrap21readStartupExtensionsEv found!\n"); - printf("offset..............: 0x%llx\n", offset); - printf("vldSegment->vmaddr..: 0x%llx\n", vldSegment->vmaddr); - printf("vldSegment->fileoff.: 0x%llx\n", vldSegment->fileoff); - printf("startAddress........: 0x%llx\n", startAddress); - printf("endAddress..........: 0x%llx\n", endAddress); - sleep(5); */ - unsigned char * p = (unsigned char *)startAddress; - + + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) + for (; p <= (unsigned char *)endAddress; p++) { - if (*(uint64_t *)p == READ_STARTUP_EXTENSIONS_TARGET_UINT64) + if (*(uint64_t *)p == 0xe805eb00000025e8) { - /* printf("Found @ 0x%llx ", (uint64_t)p - startAddress); - printf("Symbol-number: %ld\n", (symbolNumber + (skippedSymbolCount / listSize) + 1)); - sleep(3); */ + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - *(uint64_t *)p = READ_STARTUP_EXTENSIONS_PATCH_UINT64; + *(uint64_t *)p = 0xe8909000000025e8; p = (unsigned char *)endAddress; } } @@ -448,9 +674,9 @@ static long patchLoadExecutable(unsigned long cmdBase, long listSize, unsigned l #endif //============================================================================== -// Private function. Called from DecodeMachO() +// Private function. Called from decodeMachO() -static long initKernelVersionInfo(unsigned long cmdBase, long listSize, unsigned int textSegmentVMAddress) +static long initKernelVersionInfo(unsigned long loadAddress, unsigned long cmdBase, long listSize, unsigned int textSegmentVMAddress) { struct symtab_command * symtab = (struct symtab_command *)cmdBase; @@ -471,9 +697,9 @@ static long initKernelVersionInfo(unsigned long cmdBase, long listSize, unsigned const char * targetSymbols[] = { "_version_revision", "_version_minor", "_version_major" }; char * symbolName = NULL; - char * loadBuffer = (char *)gBinaryAddress; + char * loadBuffer = (char *)loadAddress; - void * stringTable = (void *)(gBinaryAddress + symtab->stroff); + void * stringTable = (void *)(loadAddress + symtab->stroff); short index = 0; @@ -481,7 +707,7 @@ static long initKernelVersionInfo(unsigned long cmdBase, long listSize, unsigned long symbolLength = 0; long symbolNumber = symtab->nsyms; - uint32_t pointer = gBinaryAddress + symtab->symoff + ((symtab->nsyms - 1) * listSize); + uint32_t pointer = loadAddress + symtab->symoff + ((symtab->nsyms - 1) * listSize); #if ((MAKE_TARGET_OS & SNOW_LEOPARD) == SNOW_LEOPARD) if (gPlatform.ArchCPUType == CPU_TYPE_X86_64) @@ -577,10 +803,10 @@ static long initKernelVersionInfo(unsigned long cmdBase, long listSize, unsigned } //============================================================================== -// Private function. Called from DecodeMachO() +// Private function. Called from decodeMachO() // Refactoring and segment name fix for OS X 10.6+ by DHP in 2010. -static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *load_size) +static long decodeSegment(unsigned long loadAddress, long cmdBase, unsigned int *load_addr, unsigned int *load_size) { char *segmentName = NULL; @@ -596,7 +822,7 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l struct segment_command_64 *segCmd = (struct segment_command_64 *)cmdBase; vmaddr = (segCmd->vmaddr & 0x3fffffff); vmsize = segCmd->vmsize; - fileAddress = (gBinaryAddress + segCmd->fileoff); + fileAddress = (loadAddress + segCmd->fileoff); filesize = segCmd->filesize; segmentName = segCmd->segname; } @@ -605,7 +831,7 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l struct segment_command *segCmd = (struct segment_command *)cmdBase; vmaddr = (segCmd->vmaddr & 0x3fffffff); vmsize = segCmd->vmsize; - fileAddress = (gBinaryAddress + segCmd->fileoff); + fileAddress = (loadAddress + segCmd->fileoff); filesize = segCmd->filesize; segmentName = segCmd->segname; } @@ -669,9 +895,9 @@ static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *l //============================================================================== -// Private function. Called from DecodeMachO() +// Private function. Called from decodeMachO() -static long DecodeUnixThread(long cmdBase, unsigned int *entry) +static long decodeUnixThread(long cmdBase, unsigned int *entry) { switch (gPlatform.ArchCPUType) { @@ -709,9 +935,9 @@ static long DecodeUnixThread(long cmdBase, unsigned int *entry) #if ADD_SYMTAB //============================================================================== -// Private function. Called from DecodeMachO() +// Private function. Called from decodeMachO() -static long DecodeSymbolTable(long cmdBase) +static long decodeSymbolTable(unsigned long loadAddress, long cmdBase) { long tmpAddr, symsSize, totalSize; long gSymbolTableAddr; @@ -742,7 +968,7 @@ static long DecodeSymbolTable(long cmdBase) symTableSave->stroff = tmpAddr + symsSize; symTableSave->strsize = symTab->strsize; - bcopy((char *)(gBinaryAddress + symTab->symoff), (char *)tmpAddr, totalSize); + bcopy((char *)(loadAddress + symTab->symoff), (char *)tmpAddr, totalSize); return 0; } From 34f20eff4fa89d366c4f909b7a656189302510d3 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Mon, 15 Aug 2016 11:57:00 +0200 Subject: [PATCH 569/623] Comments and white space changes. --- i386/libsaio/load.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index 00153b0..f1496e1 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -320,6 +320,7 @@ static long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long l #if PRELINKED_KERNEL_SUPPORT struct segment_command_64 * vldSegment = (struct segment_command_64 *)vldSegmentAddress; #endif + void * stringTable = (void *)(loadAddress + symtab->stroff); const uint16_t targetMSRs[] = { 0xE2, 0x01A0, /* 0x01FC, */ 0x01AA, 0x0620, /* 0x064C, */ 0x063A, 0x0642 }; @@ -372,7 +373,7 @@ static long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long l p = (unsigned char *)endAddress; } else if (*(uint64_t *)p == 0x487174db8548c389) // macOS Sierra DP[2-5] = 89 c3 48 85 db 74 77 48 in HexEdit - { + { // ^^^^ DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) *(uint64_t *)p = 0x4812ebdb8548c389; @@ -460,7 +461,7 @@ static long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long l } } - else if (strcmp(symbolName, "_xcpm_idle") == 0) + else if (strcmp(symbolName, "_xcpm_idle") == 0) // 2 MSRs (0xE2, 0xE2) { offset = (nl->n_value - textSegment->vmaddr); startAddress = (uint64_t)(textSegment->vmaddr + offset); @@ -476,7 +477,8 @@ static long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long l { DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - *(uint64_t *)p = 0x9090000000e2b920; // Reversed (48 C1 EA) 20 B9 E2 00 00 00 90 90 (8 bytes). + // *(uint64_t *)p = 0x9090000000e2b920; // Reversed (48 C1 EA) 20 B9 E2 00 00 00 90 90 (8 bytes). + *(uint32_t *)p = 0x90900000; // Reversed 00 00 90 90 (4 bytes). } } } @@ -493,7 +495,7 @@ static long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long l symbolName = (char *)stringTable + nl->n_un.n_strx; - if (strcmp(symbolName, "_xcpm_SMT_scope_msrs") == 0) + if (strcmp(symbolName, "_xcpm_SMT_scope_msrs") == 0) // 11 MSRs (0xE2, 0x01A0, 0x01B0, 0x01B0, 0x01B0, 0x0609, 0x038D, 0x038F, 0x0187, 0x0188, 0x0189) { int64_t offset = (nl->n_value - textSegment->vmaddr); uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); @@ -503,7 +505,7 @@ static long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long l DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, 0) DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) // - // Zero out MSR 0xE2 (and MSR 0x01A0 + // Zero out MSR 0xE2 and MSR 0x01A0 // for (repeat = 0; repeat < 8; repeat++) { @@ -511,7 +513,7 @@ static long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long l p += 0x08; } } - else if (strcmp(symbolName, "_xcpm_core_scope_msrs") == 0) + else if (strcmp(symbolName, "_xcpm_core_scope_msrs") == 0) // 2 MSRs (0xE2, 0xE2) { int64_t offset = (nl->n_value - textSegment->vmaddr); uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); @@ -535,15 +537,19 @@ static long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long l // *(uint64_t *) = 0x0000000000000000ULL; *(uint32_t *)(p + 4) = 0x00000000UL; } - else if (strcmp(symbolName, "_xcpm_pkg_scope_msrs") == 0) + else if (strcmp(symbolName, "_xcpm_pkg_scope_msrs") == 0) // 7 MSRs (0x01A0, 0x01FC, 0x01AA, 0x0620, 0x064C, 0x063A, 0x0642) { + // + // 0x064C MSR_TURBO_ACTIVATION_RATIO (Ivy Bridge Haswell E) + // 0x063A MSR_PP0_POLICY + // 0x0642 MSR_PP1_POLICY (not supported for server platform) + // int64_t offset = (nl->n_value - textSegment->vmaddr); uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); unsigned char * p = (unsigned char *)startAddress; - + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, 0) - // // New way of patching. // From 5bbcb26428bc4f0c690f4441d864abdf8781e803 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Mon, 15 Aug 2016 12:04:34 +0200 Subject: [PATCH 570/623] Moving patchKernel to patcher.c --- i386/libsaio/Makefile | 19 +- i386/libsaio/load.c | 388 +-------------------------------- i386/libsaio/patcher.c | 400 +++++++++++++++++++++++++++++++++++ i386/libsaio/saio_internal.h | 4 + 4 files changed, 415 insertions(+), 396 deletions(-) create mode 100755 i386/libsaio/patcher.c diff --git a/i386/libsaio/Makefile b/i386/libsaio/Makefile index 5aec3e6..0e37b22 100644 --- a/i386/libsaio/Makefile +++ b/i386/libsaio/Makefile @@ -3,15 +3,16 @@ # # Updates: # -# - Major cleanup (PikerAlpha, October 2012). -# - DMAKE_TARGET_MODEL added (PikerAlpha, October 2012). -# - Static data selectors added (PikerAlpha, October 2012). -# - STATIC_DATA_FILENAME added (PikerAlpha, October 2012). -# - Output added for rm/ar/ranlib actions (PikerAlpha, November 2012). +# - Major cleanup (Pike R. Alpha, October 2012). +# - DMAKE_TARGET_MODEL added (Pike R. Alpha, October 2012). +# - Static data selectors added (Pike R. Alpha, October 2012). +# - STATIC_DATA_FILENAME added (Pike R> Alpha, October 2012). +# - Output added for rm/ar/ranlib actions (Pike R> Alpha, November 2012). # - Enabled clang compilation (dgsga, PikerAlpha, November 2012. Credits to Evan Lojewski for original work). -# - Output change and now using libtool instead of ar/ranlib (PikerAlpha, November 2012). -# - SAIO_OBJS changed / base64.o added (PikerAlpha, November 2012). -# - MAKE_TARGET_OS_VER added (PikerAlpha, June 2014). +# - Output change and now using libtool instead of ar/ranlib (Pike R. Alpha, November 2012). +# - SAIO_OBJS changed / base64.o added (Pike R. Alpha, November 2012). +# - MAKE_TARGET_OS_VER added (Pike R. Alpha, June 2014). +# - patcher.c added (Pike R. Alpha, August 2016). include ../MakePaths.dir @@ -41,7 +42,7 @@ INC = -I. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) VPATH = $(OBJROOT):$(SYMROOT) SAIO_OBJS = table.o asm.o bios.o biosfn.o guid.o disk.o sys.o cache.o \ - bootstruct.o base64.o stringTable.o load.o pci.o allocate.o \ + bootstruct.o base64.o stringTable.o patcher.o load.o pci.o allocate.o \ vbe.o hfs.o hfs_compare.o xml.o md5c.o device_tree.o cpu.o \ platform.o acpi.o smbios.o efi.o console.o diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index f1496e1..4ca61f9 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -35,6 +35,7 @@ * - Renamed patchLoadExecutable to patchKernel (Pike R. Alpha, August 2016) * - New and improved debug output (see also boot2/debug.h) * - Made some preparations to move patchKernel() to patcher.c + * - Moved function patchKernel to patcher.c * */ @@ -57,11 +58,6 @@ // Load MKext(s) or separate kexts (default behaviour / behavior). bool gLoadKernelDrivers = true; -// Private functions. -#if (PATCH_KERNEL && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) - static long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize, unsigned long textSegmentAddress, unsigned long vldSegmentAddress); -#endif - static long initKernelVersionInfo(unsigned long loadAddress, unsigned long cmdbase, long listSize, unsigned int textSegmentAddress); static long decodeSegment(unsigned long loadAddress, long cmdBase, unsigned int*load_addr, unsigned int *load_size); static long decodeUnixThread(long cmdBase, unsigned int *entry); @@ -296,388 +292,6 @@ long decodeMachO(void *fileLoadBuffer, entry_t *rentry, char **raddr, int *rsize return ret; } -#if (PATCH_KERNEL && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) - -//============================================================================== -// Private function. Called from decodeMachO() - -static long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize, unsigned long textSegmentAddress, unsigned long vldSegmentAddress) -{ -#if DEBUG_KERNEL_PATCHER - printf("patchKernel() called\n"); - sleep(1); -#endif - - char * symbolName = NULL; - - // Skip the first 3000 symbols, to speed up the search process. - int skippedSymbolCount = 0; // (3000 * listSize); - - long symbolNumber = 0; - - struct symtab_command * symtab = (struct symtab_command *)cmdBase; - struct segment_command_64 * textSegment = (struct segment_command_64 *)textSegmentAddress; -#if PRELINKED_KERNEL_SUPPORT - struct segment_command_64 * vldSegment = (struct segment_command_64 *)vldSegmentAddress; -#endif - - void * stringTable = (void *)(loadAddress + symtab->stroff); - - const uint16_t targetMSRs[] = { 0xE2, 0x01A0, /* 0x01FC, */ 0x01AA, 0x0620, /* 0x064C, */ 0x063A, 0x0642 }; - - uint32_t pointer = (loadAddress + symtab->symoff + skippedSymbolCount); - - while (symbolNumber < symtab->nsyms) - { - struct nlist_64 * nl = (struct nlist_64 *)pointer; - -#if PATCH_KEXT_LOADING || PATCH_CPUID_SET_INFO - int64_t offset = 0; - uint64_t startAddress = 0; - uint64_t endAddress = 0; - - if ((nl->n_sect == 1 /* __TEXT,__text */) && nl->n_value) - { - symbolName = (char *)stringTable + nl->n_un.n_strx; -#if PATCH_KEXT_LOADING - if (strcmp(symbolName, "__ZN6OSKext14loadExecutableEv") == 0) - { - offset = (nl->n_value - textSegment->vmaddr); - startAddress = (uint64_t)(textSegment->vmaddr + offset); - endAddress = (startAddress + 0x300); - - unsigned char * p = (unsigned char *)startAddress; - - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) - - for (; p <= (unsigned char *)endAddress; p++) - { - // - // New search pattern: 0x48xx74db854c3789 - // - if ((*(uint32_t *)p == 0x8548c389) && (*(uint16_t *)(p+4) == 0x74db) && (*(uint8_t *)(p+7) == 0x48)) - { - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - - *(uint64_t *)p = 0x4812ebdb8548c389; - p = (unsigned char *)endAddress; - } - - /* Old search patterns – macOS Sierra DP1 = 89 c3 48 85 db 74 77 48 in HexEdit - if (*(uint64_t *)p == 0x487774db8548e789) - { // ^^^^ - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - - *(uint64_t *)p = 0x4812ebdb8548e789; // 89 c3 48 85 db eb 12 48 in HexEdit - // ^^^^ - p = (unsigned char *)endAddress; - } - else if (*(uint64_t *)p == 0x487174db8548c389) // macOS Sierra DP[2-5] = 89 c3 48 85 db 74 77 48 in HexEdit - { // ^^^^ - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - - *(uint64_t *)p = 0x4812ebdb8548c389; - // ^^^^ - p = (unsigned char *)endAddress; - } */ - } - } -#endif // #if PATCH_KEXT_LOADING - -#if PATCH_CPUID_SET_INFO - #if PATCH_KEXT_LOADING - else - #endif - if (strcmp(symbolName, "_cpuid_set_info") == 0) - { - offset = (nl->n_value - textSegment->vmaddr); - startAddress = (uint64_t)(textSegment->vmaddr + offset); - endAddress = (startAddress + 0x2100); - - unsigned char * p = (unsigned char *)startAddress; - - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) - - for (; p <= (unsigned char *)endAddress; p++) - { - // Broadwell E (0x4F) -> Broadwell (0x47) => 0x4F-0x47 = 0x08 -> change 0xE9 into 0xE1 - // Haswell E (0x3F) -> Haswell (0x3C) => 0x3F-0x3C = 0x03 -> change 0xE9 into 0xE6 - // Ivy Bridge E (0x3E) -> Ivy Bridge (0x3A) => 0x3E-0x3A = 0x04 -> change 0xE9 into 0xE5 - - if (*(uint64_t *)p == 0xf883e9c083c4b60f) // Reversed 0f b6 c4 83 c0 e9 83 f8 (47) (8 bytes). - { // ^^ ^^ - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - - // 0xff - 0xe9 = 0x16 + 0x01 = 0x17 + (0x4f - 0x47 = 0x08) = 0x1f (0x4f - 0x1f = 0x38) - *(uint64_t *)p = 0xf8839000000030b8; // Reversed b8 30 00 00 00 90 83 f8 (47) (8 bytes). - p = (unsigned char *)endAddress; - } - else if (*(uint64_t *)p == 0xf883f1c083c4b60f) // Reversed 0f b6 c4 83 c0 f1 83 f8 (47) (8 bytes). - { // ^^ ^^ - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - - // 0xff - 0xf1 = 0x0e + 0x01 = 0x0f + (0x4f - 0x47 = 0x08) = 0x17 (0x4f - 0x17 = 0x38) - *(uint64_t *)p = 0xf8839000000038b8; // Reversed b8 38 00 00 00 90 83 f8 (47) (8 bytes). - p = (unsigned char *)endAddress; - } - - /* Broadwell_E (0x4F) -> Broadwell (0x47) - if (*(uint64_t *)p == 0x47f883e9c083c4b6) // Reversed (0f) b6 c4 83 c0 e9 83 f8 47 (8 bytes). - { // ^^ ^^ - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - - *(uint64_t *)p = 0x47f883e1c083c4b6; // Reversed (0f) b6 c4 83 c0 e1 83 f8 47 (8 bytes). - p = (unsigned char *)endAddress; - } - else if (*(uint64_t *)p == 0x4ff883f1c083c4b6) // Reversed (0f) b6 c4 83 c0 f1 83 f8 4f (8 bytes). - { // ^^ ^^ - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - - *(uint64_t *)p = 0x4ff883e9c083c4b6; // Reversed (0f) b6 c4 83 c0 e9 83 f8 4F (8 bytes). - p = (unsigned char *)endAddress; - } */ - } - } -#endif - else if (strcmp(symbolName, "_xcpm_bootstrap") == 0) - { - offset = (nl->n_value - textSegment->vmaddr); - startAddress = (uint64_t)(textSegment->vmaddr + offset); - endAddress = (startAddress + 0x100); - - unsigned char * p = (unsigned char *)startAddress; - - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) - - for (; p <= (unsigned char *)endAddress; p++) - { - if (*(uint64_t *)p == 0x1c7722fb83c4c383) // Reversed of HexEdit: 83 C3 C4 83 FB 22 77 1C - { // ˆˆ ˆˆ - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - - *(uint64_t *)p = 0x1c7722fb83bcc383; // Reversed of HexEdit: 83 C3 BC 83 FB 22 77 1C - // ˆˆ ˆˆ - } - } - } - - else if (strcmp(symbolName, "_xcpm_idle") == 0) // 2 MSRs (0xE2, 0xE2) - { - offset = (nl->n_value - textSegment->vmaddr); - startAddress = (uint64_t)(textSegment->vmaddr + offset); - endAddress = (startAddress + 0x200); - - unsigned char * p = (unsigned char *)startAddress; - - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) - - for (; p <= (unsigned char *)endAddress; p++) - { - if (*(uint64_t *)p == 0x300f000000e2b920)// (48 C1 EA) 20 B9 E2 00 00 00 0F 30 reversed - { - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - - // *(uint64_t *)p = 0x9090000000e2b920; // Reversed (48 C1 EA) 20 B9 E2 00 00 00 90 90 (8 bytes). - *(uint32_t *)p = 0x90900000; // Reversed 00 00 90 90 (4 bytes). - } - } - } - } -#endif // #if PATCH_KEXT_LOADING || PATCH_CPUID_SET_INFO - -#if PATCH_XCPM_SCOPE_MSRS - #if PATCH_KEXT_LOADING || PATCH_CPUID_SET_INFO - else - #endif - if (((nl->n_sect == 8 /* __DATA,__data */) && nl->n_value) && gPlatform.CPU.CstConfigMsrLocked) - { - UInt8 repeat = 0; - - symbolName = (char *)stringTable + nl->n_un.n_strx; - - if (strcmp(symbolName, "_xcpm_SMT_scope_msrs") == 0) // 11 MSRs (0xE2, 0x01A0, 0x01B0, 0x01B0, 0x01B0, 0x0609, 0x038D, 0x038F, 0x0187, 0x0188, 0x0189) - { - int64_t offset = (nl->n_value - textSegment->vmaddr); - uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); - - unsigned char * p = (unsigned char *)startAddress; - - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, 0) - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - // - // Zero out MSR 0xE2 and MSR 0x01A0 - // - for (repeat = 0; repeat < 8; repeat++) - { - *(uint64_t *)p = 0x0000000000000000ULL; - p += 0x08; - } - } - else if (strcmp(symbolName, "_xcpm_core_scope_msrs") == 0) // 2 MSRs (0xE2, 0xE2) - { - int64_t offset = (nl->n_value - textSegment->vmaddr); - uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); - - unsigned char * p = (unsigned char *)startAddress; - - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, 0) - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - // - // Zero out CPU bits of MSR 0xE2 - // - // *(uint64_t *) = 0x0000000000000000ULL; - *(uint32_t *)(p + 4) = 0x00000000UL; - // - // Skip to second MSR 0xE2 - // - p += 0x30; - // - // Zero out CPU bits of MSR 0xE2 - // - // *(uint64_t *) = 0x0000000000000000ULL; - *(uint32_t *)(p + 4) = 0x00000000UL; - } - else if (strcmp(symbolName, "_xcpm_pkg_scope_msrs") == 0) // 7 MSRs (0x01A0, 0x01FC, 0x01AA, 0x0620, 0x064C, 0x063A, 0x0642) - { - // - // 0x064C MSR_TURBO_ACTIVATION_RATIO (Ivy Bridge Haswell E) - // 0x063A MSR_PP0_POLICY - // 0x0642 MSR_PP1_POLICY (not supported for server platform) - // - int64_t offset = (nl->n_value - textSegment->vmaddr); - uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); - - unsigned char * p = (unsigned char *)startAddress; - - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, 0) - // - // New way of patching. - // - for (unsigned char target_msr = 0; target_msr < 7; target_msr++) - { - // - // Secondary for-loop to find MSRs that we need to disable. - // - for (unsigned char msr_to_disable = 0; msr_to_disable < 6; msr_to_disable++) - { - // - // Is this a MSR that we need to disable? - // - if (*(uint16_t *)p == targetMSRs[msr_to_disable]) - { - // - // Yes. - // - DEBUG_DISABLED_MSR(targetMSRs[msr_to_disable], 1) - // - // Zero out the 32-bit CPU-bits field. - // - *(uint32_t *)(p + 4) = 0x00000000UL; - // - // The MSR is now disabled. Break out of secondary for loop. - // - break; - } - } - - p += 0x30; - } - - /* Old way of patching. - // - // Zero out MSR 0x01A0 - // - *(uint64_t *)p = 0x0000000000000000ULL; - // - // Skip to MSR 0x01FC - // - p += 0x30; - // - // Zero out MSR 0x01FC - // - // *(uint64_t *)p = 0x0000000000000000ULL; - // - // Skip to MSR 0x01AA - // - p += 0x30; - // - // Zero out MSR 0x01AA - // - *(uint64_t *)p = 0x0000000000000000ULL; - // - // Skip to MSR 0x0620 - // - p += 0x30; - // - // Zero out MSR 0x0620 - // - *(uint64_t *)p = 0x0000000000000000ULL; - // - // Skip to MSR 0x064C - // - p += 0x30; - // - // Zero out MSR 0x064C - // - // *(uint64_t *)p = 0x0000000000000000ULL; - // - // Skip to MSR 0x063A - // - p += 0x30; - // - // Zero out MSR 0x063A - // - *(uint64_t *)p = 0x0000000000000000ULL; - // - // Skip to MSR 0x0642 - // - p += 0x30; - // - // Zero out MSR 0x0642 - // - *(uint64_t *)p = 0x0000000000000000ULL; */ - } - } -#endif // #if PATCH_XCPM_SCOPE_MSRS - -#if (PATCH_LOAD_EXTRA_KEXTS && PRELINKED_KERNEL_SUPPORT) - #if (PATCH_KEXT_LOADING || PATCH_XCPM_SCOPE_MSRS) - else - #endif - if ((nl->n_sect == 25 /* __KLD,__text */) && nl->n_value) - { - symbolName = (char *)stringTable + nl->n_un.n_strx; - - if (strcmp(symbolName, "__ZN12KLDBootstrap21readStartupExtensionsEv") == 0) - { - int64_t offset = (nl->n_value - textSegment->vmaddr); - uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); - uint64_t endAddress = (startAddress + 0x3f); - - unsigned char * p = (unsigned char *)startAddress; - - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) - - for (; p <= (unsigned char *)endAddress; p++) - { - if (*(uint64_t *)p == 0xe805eb00000025e8) - { - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - - *(uint64_t *)p = 0xe8909000000025e8; - p = (unsigned char *)endAddress; - } - } - } - } -#endif - symbolNumber++; - pointer += listSize; // Point to next symbol. - } - - return 0; -} -#endif //============================================================================== // Private function. Called from decodeMachO() diff --git a/i386/libsaio/patcher.c b/i386/libsaio/patcher.c new file mode 100755 index 0000000..f81ac6e --- /dev/null +++ b/i386/libsaio/patcher.c @@ -0,0 +1,400 @@ +/* + * Copyright (c) 2016 Pike R. Alpha. All rights reserved. + * + * Updates: + * - Moved function patchKernel from load.c to patcher.c (Pike R. Alpha, August 2016) + * + */ + +#include <mach-o/fat.h> +#include <mach-o/loader.h> +#include <mach-o/nlist.h> + +#include "platform.h" + +#if (PATCH_KERNEL && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) + +#define PATCH_KEXT_LOADING 1 + + +//============================================================================== +// Called from decodeMachO() + +long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize, unsigned long textSegmentAddress, unsigned long vldSegmentAddress) +{ +#if DEBUG_KERNEL_PATCHER + printf("patchKernel() called\n"); + sleep(1); +#endif + + char * symbolName = NULL; + + // Skip the first 3000 symbols, to speed up the search process. + int skippedSymbolCount = 0; // (3000 * listSize); + + long symbolNumber = 0; + + struct symtab_command * symtab = (struct symtab_command *)cmdBase; + struct segment_command_64 * textSegment = (struct segment_command_64 *)textSegmentAddress; +#if PRELINKED_KERNEL_SUPPORT + struct segment_command_64 * vldSegment = (struct segment_command_64 *)vldSegmentAddress; +#endif + + void * stringTable = (void *)(loadAddress + symtab->stroff); + + const uint16_t targetMSRs[] = { 0xE2, 0x01A0, /* 0x01FC, */ 0x01AA, 0x0620, /* 0x064C, */ 0x063A, 0x0642 }; + + uint32_t pointer = (loadAddress + symtab->symoff + skippedSymbolCount); + + while (symbolNumber < symtab->nsyms) + { + struct nlist_64 * nl = (struct nlist_64 *)pointer; + +#if PATCH_KEXT_LOADING || PATCH_CPUID_SET_INFO + int64_t offset = 0; + uint64_t startAddress = 0; + uint64_t endAddress = 0; + + if ((nl->n_sect == 1 /* __TEXT,__text */) && nl->n_value) + { + symbolName = (char *)stringTable + nl->n_un.n_strx; +#if PATCH_KEXT_LOADING + if (strcmp(symbolName, "__ZN6OSKext14loadExecutableEv") == 0) + { + offset = (nl->n_value - textSegment->vmaddr); + startAddress = (uint64_t)(textSegment->vmaddr + offset); + endAddress = (startAddress + 0x300); + + unsigned char * p = (unsigned char *)startAddress; + + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) + + for (; p <= (unsigned char *)endAddress; p++) + { + // + // New search pattern: 0x48xx74db854c3789 + // + if ((*(uint32_t *)p == 0x8548c389) && (*(uint16_t *)(p+4) == 0x74db) && (*(uint8_t *)(p+7) == 0x48)) + { + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + *(uint64_t *)p = 0x4812ebdb8548c389; + p = (unsigned char *)endAddress; + } + + /* Old search patterns – macOS Sierra DP1 = 89 c3 48 85 db 74 77 48 in HexEdit + if (*(uint64_t *)p == 0x487774db8548e789) + { // ^^^^ + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + *(uint64_t *)p = 0x4812ebdb8548e789; // 89 c3 48 85 db eb 12 48 in HexEdit + // ^^^^ + p = (unsigned char *)endAddress; + } + else if (*(uint64_t *)p == 0x487174db8548c389) // macOS Sierra DP[2-5] = 89 c3 48 85 db 74 77 48 in HexEdit + { // ^^^^ + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + *(uint64_t *)p = 0x4812ebdb8548c389; + // ^^^^ + p = (unsigned char *)endAddress; + } */ + } + } +#endif // #if PATCH_KEXT_LOADING + +#if PATCH_CPUID_SET_INFO + #if PATCH_KEXT_LOADING + else + #endif + if (strcmp(symbolName, "_cpuid_set_info") == 0) + { + offset = (nl->n_value - textSegment->vmaddr); + startAddress = (uint64_t)(textSegment->vmaddr + offset); + endAddress = (startAddress + 0x2100); + + unsigned char * p = (unsigned char *)startAddress; + + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) + + for (; p <= (unsigned char *)endAddress; p++) + { + // Broadwell E (0x4F) -> Broadwell (0x47) => 0x4F-0x47 = 0x08 -> change 0xE9 into 0xE1 + // Haswell E (0x3F) -> Haswell (0x3C) => 0x3F-0x3C = 0x03 -> change 0xE9 into 0xE6 + // Ivy Bridge E (0x3E) -> Ivy Bridge (0x3A) => 0x3E-0x3A = 0x04 -> change 0xE9 into 0xE5 + + if (*(uint64_t *)p == 0xf883e9c083c4b60f) // Reversed 0f b6 c4 83 c0 e9 83 f8 (47) (8 bytes). + { // ^^ ^^ + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + // 0xff - 0xe9 = 0x16 + 0x01 = 0x17 + (0x4f - 0x47 = 0x08) = 0x1f (0x4f - 0x1f = 0x38) + *(uint64_t *)p = 0xf8839000000030b8; // Reversed b8 30 00 00 00 90 83 f8 (47) (8 bytes). + p = (unsigned char *)endAddress; + } + else if (*(uint64_t *)p == 0xf883f1c083c4b60f) // Reversed 0f b6 c4 83 c0 f1 83 f8 (47) (8 bytes). + { // ^^ ^^ + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + // 0xff - 0xf1 = 0x0e + 0x01 = 0x0f + (0x4f - 0x47 = 0x08) = 0x17 (0x4f - 0x17 = 0x38) + *(uint64_t *)p = 0xf8839000000038b8; // Reversed b8 38 00 00 00 90 83 f8 (47) (8 bytes). + p = (unsigned char *)endAddress; + } + + /* Broadwell_E (0x4F) -> Broadwell (0x47) + if (*(uint64_t *)p == 0x47f883e9c083c4b6) // Reversed (0f) b6 c4 83 c0 e9 83 f8 47 (8 bytes). + { // ^^ ^^ + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + *(uint64_t *)p = 0x47f883e1c083c4b6; // Reversed (0f) b6 c4 83 c0 e1 83 f8 47 (8 bytes). + p = (unsigned char *)endAddress; + } + else if (*(uint64_t *)p == 0x4ff883f1c083c4b6) // Reversed (0f) b6 c4 83 c0 f1 83 f8 4f (8 bytes). + { // ^^ ^^ + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + *(uint64_t *)p = 0x4ff883e9c083c4b6; // Reversed (0f) b6 c4 83 c0 e9 83 f8 4F (8 bytes). + p = (unsigned char *)endAddress; + } */ + } + } +#endif + else if (strcmp(symbolName, "_xcpm_bootstrap") == 0) + { + offset = (nl->n_value - textSegment->vmaddr); + startAddress = (uint64_t)(textSegment->vmaddr + offset); + endAddress = (startAddress + 0x100); + + unsigned char * p = (unsigned char *)startAddress; + + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) + + for (; p <= (unsigned char *)endAddress; p++) + { + if (*(uint64_t *)p == 0x1c7722fb83c4c383) // Reversed of HexEdit: 83 C3 C4 83 FB 22 77 1C + { // ˆˆ ˆˆ + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + *(uint64_t *)p = 0x1c7722fb83bcc383; // Reversed of HexEdit: 83 C3 BC 83 FB 22 77 1C + // ˆˆ ˆˆ + } + } + } + + else if (strcmp(symbolName, "_xcpm_idle") == 0) // 2 MSRs (0xE2, 0xE2) + { + offset = (nl->n_value - textSegment->vmaddr); + startAddress = (uint64_t)(textSegment->vmaddr + offset); + endAddress = (startAddress + 0x200); + + unsigned char * p = (unsigned char *)startAddress; + + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) + + for (; p <= (unsigned char *)endAddress; p++) + { + if (*(uint64_t *)p == 0x300f000000e2b920)// (48 C1 EA) 20 B9 E2 00 00 00 0F 30 reversed + { + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + // *(uint64_t *)p = 0x9090000000e2b920; // Reversed (48 C1 EA) 20 B9 E2 00 00 00 90 90 (8 bytes). + *(uint32_t *)p = 0x90900000; // Reversed 00 00 90 90 (4 bytes). + } + } + } + } +#endif // #if PATCH_KEXT_LOADING || PATCH_CPUID_SET_INFO + +#if PATCH_XCPM_SCOPE_MSRS + #if PATCH_KEXT_LOADING || PATCH_CPUID_SET_INFO + else + #endif + if (((nl->n_sect == 8 /* __DATA,__data */) && nl->n_value) && gPlatform.CPU.CstConfigMsrLocked) + { + UInt8 repeat = 0; + + symbolName = (char *)stringTable + nl->n_un.n_strx; + + if (strcmp(symbolName, "_xcpm_SMT_scope_msrs") == 0) // 11 MSRs (0xE2, 0x01A0, 0x01B0, 0x01B0, 0x01B0, 0x0609, 0x038D, 0x038F, 0x0187, 0x0188, 0x0189) + { + int64_t offset = (nl->n_value - textSegment->vmaddr); + uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); + + unsigned char * p = (unsigned char *)startAddress; + + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, 0) + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + // + // Zero out MSR 0xE2 and MSR 0x01A0 + // + for (repeat = 0; repeat < 8; repeat++) + { + *(uint64_t *)p = 0x0000000000000000ULL; + p += 0x08; + } + } + else if (strcmp(symbolName, "_xcpm_core_scope_msrs") == 0) // 2 MSRs (0xE2, 0xE2) + { + int64_t offset = (nl->n_value - textSegment->vmaddr); + uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); + + unsigned char * p = (unsigned char *)startAddress; + + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, 0) + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + // + // Zero out CPU bits of MSR 0xE2 + // + // *(uint64_t *) = 0x0000000000000000ULL; + *(uint32_t *)(p + 4) = 0x00000000UL; + // + // Skip to second MSR 0xE2 + // + p += 0x30; + // + // Zero out CPU bits of MSR 0xE2 + // + // *(uint64_t *) = 0x0000000000000000ULL; + *(uint32_t *)(p + 4) = 0x00000000UL; + } + else if (strcmp(symbolName, "_xcpm_pkg_scope_msrs") == 0) // 7 MSRs (0x01A0, 0x01FC, 0x01AA, 0x0620, 0x064C, 0x063A, 0x0642) + { + // + // 0x064C MSR_TURBO_ACTIVATION_RATIO (Ivy Bridge Haswell E) + // 0x063A MSR_PP0_POLICY + // 0x0642 MSR_PP1_POLICY (not supported for server platform) + // + int64_t offset = (nl->n_value - textSegment->vmaddr); + uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); + + unsigned char * p = (unsigned char *)startAddress; + + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, 0) + // + // New way of patching. + // + for (unsigned char target_msr = 0; target_msr < 7; target_msr++) + { + // + // Secondary for-loop to find MSRs that we need to disable. + // + for (unsigned char msr_to_disable = 0; msr_to_disable < 6; msr_to_disable++) + { + // + // Is this a MSR that we need to disable? + // + if (*(uint16_t *)p == targetMSRs[msr_to_disable]) + { + // + // Yes. + // + DEBUG_DISABLED_MSR(targetMSRs[msr_to_disable], 1) + // + // Zero out the 32-bit CPU-bits field. + // + *(uint32_t *)(p + 4) = 0x00000000UL; + // + // The MSR is now disabled. Break out of secondary for loop. + // + break; + } + } + + p += 0x30; + } + + /* Old way of patching. + // + // Zero out MSR 0x01A0 + // + *(uint64_t *)p = 0x0000000000000000ULL; + // + // Skip to MSR 0x01FC + // + p += 0x30; + // + // Zero out MSR 0x01FC + // + // *(uint64_t *)p = 0x0000000000000000ULL; + // + // Skip to MSR 0x01AA + // + p += 0x30; + // + // Zero out MSR 0x01AA + // + *(uint64_t *)p = 0x0000000000000000ULL; + // + // Skip to MSR 0x0620 + // + p += 0x30; + // + // Zero out MSR 0x0620 + // + *(uint64_t *)p = 0x0000000000000000ULL; + // + // Skip to MSR 0x064C + // + p += 0x30; + // + // Zero out MSR 0x064C + // + // *(uint64_t *)p = 0x0000000000000000ULL; + // + // Skip to MSR 0x063A + // + p += 0x30; + // + // Zero out MSR 0x063A + // + *(uint64_t *)p = 0x0000000000000000ULL; + // + // Skip to MSR 0x0642 + // + p += 0x30; + // + // Zero out MSR 0x0642 + // + *(uint64_t *)p = 0x0000000000000000ULL; */ + } + } +#endif // #if PATCH_XCPM_SCOPE_MSRS + +#if (PATCH_LOAD_EXTRA_KEXTS && PRELINKED_KERNEL_SUPPORT) + #if (PATCH_KEXT_LOADING || PATCH_XCPM_SCOPE_MSRS) + else + #endif + if ((nl->n_sect == 25 /* __KLD,__text */) && nl->n_value) + { + symbolName = (char *)stringTable + nl->n_un.n_strx; + + if (strcmp(symbolName, "__ZN12KLDBootstrap21readStartupExtensionsEv") == 0) + { + int64_t offset = (nl->n_value - textSegment->vmaddr); + uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); + uint64_t endAddress = (startAddress + 0x3f); + + unsigned char * p = (unsigned char *)startAddress; + + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) + + for (; p <= (unsigned char *)endAddress; p++) + { + if (*(uint64_t *)p == 0xe805eb00000025e8) + { + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + + *(uint64_t *)p = 0xe8909000000025e8; + p = (unsigned char *)endAddress; + } + } + } + } +#endif // #if (PATCH_LOAD_EXTRA_KEXTS && PRELINKED_KERNEL_SUPPORT) + + symbolNumber++; + pointer += listSize; // Point to next symbol. + } + + return 0; +} +#endif diff --git a/i386/libsaio/saio_internal.h b/i386/libsaio/saio_internal.h index eecf89b..7f3590c 100755 --- a/i386/libsaio/saio_internal.h +++ b/i386/libsaio/saio_internal.h @@ -151,6 +151,10 @@ extern long decodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize extern long loadBinaryData(char *aFilePath, void **aMemoryAddress); +/* patcher.c */ +extern long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize, unsigned long textSegmentAddress, unsigned long vldSegmentAddress); + + /* memory.c */ long AllocateKernelMemory(long inSize); long AllocateMemoryRange(char * rangeName, long start, long length); From c343e416b38889c8b4e869c9ced841fa5cbd6754 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Mon, 15 Aug 2016 14:55:38 +0200 Subject: [PATCH 571/623] Show MSR number instead of 0x00. --- i386/boot2/debug.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/i386/boot2/debug.h b/i386/boot2/debug.h index 3da5c24..bb7c4b7 100755 --- a/i386/boot2/debug.h +++ b/i386/boot2/debug.h @@ -127,12 +127,12 @@ sleep(seconds); \ } - #define DEBUG_DISABLED_MSR(msr, seconds) \ - printf("Disabling MSR: 0x%x\n"); \ - \ - if (seconds) \ - { \ - sleep(seconds); \ + #define DEBUG_DISABLED_MSR(msr, seconds) \ + printf("Disabling MSR: 0x%x\n", msr); \ + \ + if (seconds) \ + { \ + sleep(seconds); \ } #else From dddac45c2c8ac6153fef5cc9734987d157c793d8 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Mon, 15 Aug 2016 17:31:23 +0200 Subject: [PATCH 572/623] Cleanups --- i386/boot2/debug.h | 16 ++-- i386/libsaio/patcher.c | 172 +++++++++++++---------------------------- 2 files changed, 60 insertions(+), 128 deletions(-) diff --git a/i386/boot2/debug.h b/i386/boot2/debug.h index bb7c4b7..a039698 100755 --- a/i386/boot2/debug.h +++ b/i386/boot2/debug.h @@ -117,14 +117,14 @@ printf("textSegment->fileoff: 0x%llx\n", fileoff); \ printf("startAddress........: 0x%llx\n", start); \ printf("endAddress..........: 0x%llx\n", end); \ - sleep(3); - - #define DEBUG_PATCH_STATUS(symbol, address, number, seconds) \ - printf("Patched %s(0x%llx) symbol-number: %ld\n", symbol, address, number); \ - \ - if (seconds) \ - { \ - sleep(seconds); \ + sleep(1); + + #define DEBUG_PATCH_STATUS(symbol, address, seconds) \ + printf("Patched %s(@ 0x%x)\n", symbol, address); \ + \ + if (seconds) \ + { \ + sleep(seconds); \ } #define DEBUG_DISABLED_MSR(msr, seconds) \ diff --git a/i386/libsaio/patcher.c b/i386/libsaio/patcher.c index f81ac6e..4fd3d1c 100755 --- a/i386/libsaio/patcher.c +++ b/i386/libsaio/patcher.c @@ -3,6 +3,7 @@ * * Updates: * - Moved function patchKernel from load.c to patcher.c (Pike R. Alpha, August 2016) + * - Cleanups/removed some of the old style patches (more to follow). * */ @@ -28,8 +29,10 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize #endif char * symbolName = NULL; - - // Skip the first 3000 symbols, to speed up the search process. + unsigned char * p = NULL; + // + // Option to skip first nth symbols (speeds up the search process). + // int skippedSymbolCount = 0; // (3000 * listSize); long symbolNumber = 0; @@ -46,14 +49,21 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize uint32_t pointer = (loadAddress + symtab->symoff + skippedSymbolCount); + int64_t offset = 0; + + uint64_t startAddress = 0; + uint64_t endAddress = 0; + // + // Main while loop. + // while (symbolNumber < symtab->nsyms) { struct nlist_64 * nl = (struct nlist_64 *)pointer; #if PATCH_KEXT_LOADING || PATCH_CPUID_SET_INFO - int64_t offset = 0; - uint64_t startAddress = 0; - uint64_t endAddress = 0; + offset = 0; + startAddress = 0; + endAddress = 0; if ((nl->n_sect == 1 /* __TEXT,__text */) && nl->n_value) { @@ -65,40 +75,22 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize startAddress = (uint64_t)(textSegment->vmaddr + offset); endAddress = (startAddress + 0x300); - unsigned char * p = (unsigned char *)startAddress; + p = (unsigned char *)startAddress; DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) for (; p <= (unsigned char *)endAddress; p++) { // - // New search pattern: 0x48xx74db854c3789 + // Search pattern: 0x48xx74db854c3789 // if ((*(uint32_t *)p == 0x8548c389) && (*(uint16_t *)(p+4) == 0x74db) && (*(uint8_t *)(p+7) == 0x48)) { - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) *(uint64_t *)p = 0x4812ebdb8548c389; p = (unsigned char *)endAddress; } - - /* Old search patterns – macOS Sierra DP1 = 89 c3 48 85 db 74 77 48 in HexEdit - if (*(uint64_t *)p == 0x487774db8548e789) - { // ^^^^ - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - - *(uint64_t *)p = 0x4812ebdb8548e789; // 89 c3 48 85 db eb 12 48 in HexEdit - // ^^^^ - p = (unsigned char *)endAddress; - } - else if (*(uint64_t *)p == 0x487174db8548c389) // macOS Sierra DP[2-5] = 89 c3 48 85 db 74 77 48 in HexEdit - { // ^^^^ - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - - *(uint64_t *)p = 0x4812ebdb8548c389; - // ^^^^ - p = (unsigned char *)endAddress; - } */ } } #endif // #if PATCH_KEXT_LOADING @@ -113,7 +105,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize startAddress = (uint64_t)(textSegment->vmaddr + offset); endAddress = (startAddress + 0x2100); - unsigned char * p = (unsigned char *)startAddress; + p = (unsigned char *)startAddress; DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) @@ -123,9 +115,12 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize // Haswell E (0x3F) -> Haswell (0x3C) => 0x3F-0x3C = 0x03 -> change 0xE9 into 0xE6 // Ivy Bridge E (0x3E) -> Ivy Bridge (0x3A) => 0x3E-0x3A = 0x04 -> change 0xE9 into 0xE5 + // + // TODO: Port the patch routine from Vector. + // if (*(uint64_t *)p == 0xf883e9c083c4b60f) // Reversed 0f b6 c4 83 c0 e9 83 f8 (47) (8 bytes). { // ^^ ^^ - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) // 0xff - 0xe9 = 0x16 + 0x01 = 0x17 + (0x4f - 0x47 = 0x08) = 0x1f (0x4f - 0x1f = 0x38) *(uint64_t *)p = 0xf8839000000030b8; // Reversed b8 30 00 00 00 90 83 f8 (47) (8 bytes). @@ -133,28 +128,12 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize } else if (*(uint64_t *)p == 0xf883f1c083c4b60f) // Reversed 0f b6 c4 83 c0 f1 83 f8 (47) (8 bytes). { // ^^ ^^ - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) // 0xff - 0xf1 = 0x0e + 0x01 = 0x0f + (0x4f - 0x47 = 0x08) = 0x17 (0x4f - 0x17 = 0x38) *(uint64_t *)p = 0xf8839000000038b8; // Reversed b8 38 00 00 00 90 83 f8 (47) (8 bytes). p = (unsigned char *)endAddress; } - - /* Broadwell_E (0x4F) -> Broadwell (0x47) - if (*(uint64_t *)p == 0x47f883e9c083c4b6) // Reversed (0f) b6 c4 83 c0 e9 83 f8 47 (8 bytes). - { // ^^ ^^ - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - - *(uint64_t *)p = 0x47f883e1c083c4b6; // Reversed (0f) b6 c4 83 c0 e1 83 f8 47 (8 bytes). - p = (unsigned char *)endAddress; - } - else if (*(uint64_t *)p == 0x4ff883f1c083c4b6) // Reversed (0f) b6 c4 83 c0 f1 83 f8 4f (8 bytes). - { // ^^ ^^ - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) - - *(uint64_t *)p = 0x4ff883e9c083c4b6; // Reversed (0f) b6 c4 83 c0 e9 83 f8 4F (8 bytes). - p = (unsigned char *)endAddress; - } */ } } #endif @@ -164,15 +143,18 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize startAddress = (uint64_t)(textSegment->vmaddr + offset); endAddress = (startAddress + 0x100); - unsigned char * p = (unsigned char *)startAddress; + p = (unsigned char *)startAddress; DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) for (; p <= (unsigned char *)endAddress; p++) { + // + // TODO: Port the patch routine from Vector. + // if (*(uint64_t *)p == 0x1c7722fb83c4c383) // Reversed of HexEdit: 83 C3 C4 83 FB 22 77 1C { // ˆˆ ˆˆ - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) *(uint64_t *)p = 0x1c7722fb83bcc383; // Reversed of HexEdit: 83 C3 BC 83 FB 22 77 1C // ˆˆ ˆˆ @@ -186,7 +168,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize startAddress = (uint64_t)(textSegment->vmaddr + offset); endAddress = (startAddress + 0x200); - unsigned char * p = (unsigned char *)startAddress; + p = (unsigned char *)startAddress; DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) @@ -194,10 +176,9 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize { if (*(uint64_t *)p == 0x300f000000e2b920)// (48 C1 EA) 20 B9 E2 00 00 00 0F 30 reversed { - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) - // *(uint64_t *)p = 0x9090000000e2b920; // Reversed (48 C1 EA) 20 B9 E2 00 00 00 90 90 (8 bytes). - *(uint32_t *)p = 0x90900000; // Reversed 00 00 90 90 (4 bytes). + *(uint32_t *)(p + 4) = 0x90900000; // Reversed 00 00 90 90 (4 bytes). } } } @@ -219,15 +200,19 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize int64_t offset = (nl->n_value - textSegment->vmaddr); uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); - unsigned char * p = (unsigned char *)startAddress; + p = (unsigned char *)startAddress; - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, 0) - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, startAddress) + // + // TODO: Port the patch routine from Vector. + // // // Zero out MSR 0xE2 and MSR 0x01A0 // for (repeat = 0; repeat < 8; repeat++) { + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) + *(uint64_t *)p = 0x0000000000000000ULL; p += 0x08; } @@ -237,14 +222,16 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize int64_t offset = (nl->n_value - textSegment->vmaddr); uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); - unsigned char * p = (unsigned char *)startAddress; + p = (unsigned char *)startAddress; - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, 0) - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, startAddress) + // + // TODO: Port the patch routine from Vector. + // + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) // // Zero out CPU bits of MSR 0xE2 // - // *(uint64_t *) = 0x0000000000000000ULL; *(uint32_t *)(p + 4) = 0x00000000UL; // // Skip to second MSR 0xE2 @@ -253,7 +240,6 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize // // Zero out CPU bits of MSR 0xE2 // - // *(uint64_t *) = 0x0000000000000000ULL; *(uint32_t *)(p + 4) = 0x00000000UL; } else if (strcmp(symbolName, "_xcpm_pkg_scope_msrs") == 0) // 7 MSRs (0x01A0, 0x01FC, 0x01AA, 0x0620, 0x064C, 0x063A, 0x0642) @@ -266,18 +252,18 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize int64_t offset = (nl->n_value - textSegment->vmaddr); uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); - unsigned char * p = (unsigned char *)startAddress; + p = (unsigned char *)startAddress; - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, 0) + DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, startAddress) // - // New way of patching. + // TODO: Port the patch routine from Vector. // - for (unsigned char target_msr = 0; target_msr < 7; target_msr++) + for (short target_msr = 0; target_msr < 7; target_msr++) { // // Secondary for-loop to find MSRs that we need to disable. // - for (unsigned char msr_to_disable = 0; msr_to_disable < 6; msr_to_disable++) + for (short msr_to_disable = 0; msr_to_disable < 6; msr_to_disable++) { // // Is this a MSR that we need to disable? @@ -301,60 +287,6 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize p += 0x30; } - - /* Old way of patching. - // - // Zero out MSR 0x01A0 - // - *(uint64_t *)p = 0x0000000000000000ULL; - // - // Skip to MSR 0x01FC - // - p += 0x30; - // - // Zero out MSR 0x01FC - // - // *(uint64_t *)p = 0x0000000000000000ULL; - // - // Skip to MSR 0x01AA - // - p += 0x30; - // - // Zero out MSR 0x01AA - // - *(uint64_t *)p = 0x0000000000000000ULL; - // - // Skip to MSR 0x0620 - // - p += 0x30; - // - // Zero out MSR 0x0620 - // - *(uint64_t *)p = 0x0000000000000000ULL; - // - // Skip to MSR 0x064C - // - p += 0x30; - // - // Zero out MSR 0x064C - // - // *(uint64_t *)p = 0x0000000000000000ULL; - // - // Skip to MSR 0x063A - // - p += 0x30; - // - // Zero out MSR 0x063A - // - *(uint64_t *)p = 0x0000000000000000ULL; - // - // Skip to MSR 0x0642 - // - p += 0x30; - // - // Zero out MSR 0x0642 - // - *(uint64_t *)p = 0x0000000000000000ULL; */ } } #endif // #if PATCH_XCPM_SCOPE_MSRS @@ -373,7 +305,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); uint64_t endAddress = (startAddress + 0x3f); - unsigned char * p = (unsigned char *)startAddress; + p = (unsigned char *)startAddress; DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) @@ -381,7 +313,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize { if (*(uint64_t *)p == 0xe805eb00000025e8) { - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), (symbolNumber + (skippedSymbolCount / listSize) + 1), 1) + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) *(uint64_t *)p = 0xe8909000000025e8; p = (unsigned char *)endAddress; From 7ea65dd50bfd811765379f75d73b1bdc109237a1 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Tue, 16 Aug 2016 22:58:39 +0200 Subject: [PATCH 573/623] Comment only changes. --- i386/libsaio/saio_internal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/saio_internal.h b/i386/libsaio/saio_internal.h index 7f3590c..7d3789b 100755 --- a/i386/libsaio/saio_internal.h +++ b/i386/libsaio/saio_internal.h @@ -23,9 +23,9 @@ * * Updates: * - * - loadBinaryData(load.c) and toLowerCase(string.c) added (PikerAlpha, October 2012). - * - Tidied up (spaces -> tabs) (PikerAlpha, October 2012). - * - Stripped (unnecessary) argument from loadSystemConfig (PikerAlpha, April 2013). + * - loadBinaryData(load.c) and toLowerCase(string.c) added (Pike R. Alpha, October 2012). + * - Tidied up (spaces -> tabs) (Pike R. Alpha, October 2012). + * - Stripped (unnecessary) argument from loadSystemConfig (Pike R. Alpha, April 2013). * - Use Lower Camel Case for function names (Pike R. Alpha, July 2016) * */ From fd487eb0c9dc5847e3090bd2be24a845bb4ec12a Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Tue, 16 Aug 2016 23:01:30 +0200 Subject: [PATCH 574/623] Essential patches should always be available. --- i386/libsaio/cpu/Intel/dynamic_data.h | 4 +--- i386/libsaio/cpu/essentials.h | 2 +- i386/libsaio/platform.h | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index b9df711..2f5c47e 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -388,6 +388,7 @@ void initCPUStruct(void) break; case CPU_MODEL_HASWELL: + case CPU_MODEL_HASWELL_E: case CPU_MODEL_HASWELL_ULT: CoreBridgeType = HASWELL; hiBit = 31; @@ -486,10 +487,7 @@ void initCPUStruct(void) // Check bit-15 of MSR 0xE2 to see if it is locked. msr = rdmsr64(MSR_PKG_CST_CONFIG_CONTROL); -#if PATCH_XCPM_SCOPE_MSRS gPlatform.CPU.CstConfigMsrLocked = (msr & 0x8000); -#endif - #if DEBUG_CPU printf("MSR_PKG_CST_CONFIG_CONTROL(locked): 0x%x\n", msr); #endif diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index c038081..65204a2 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -183,7 +183,7 @@ #define CPU_MODEL_IB_CORE_XEON 0x3E #define CPU_MODEL_HASWELL 0x3C -#define CPU_MODEL_HASWELL_SVR 0x3F +#define CPU_MODEL_HASWELL_E 0x3F #define CPU_MODEL_HASWELL_ULT 0x45 #define CPU_MODEL_CRYSTALWELL 0x46 diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 163bd2f..3ae3531 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -262,10 +262,8 @@ typedef struct _PlatformInfo_t struct CPU { bool Mobile; // Set to true (in cpu/dynamic_data.h) for Mobile CPU's. - -#if PATCH_XCPM_SCOPE_MSRS bool CstConfigMsrLocked; // Initialised in cpu/dynamic_data.h and used in load.c -#endif + uint16_t Type; // CPU type ('cpu-type') used in the SMBIOS patcher. uint32_t Features; // CPU Features like MMX, SSE2, VT, MobileCPU uint32_t Vendor; // Vendor From e30e008adfea0afea2d4bd16c16ae56c62870b5a Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Tue, 16 Aug 2016 23:01:51 +0200 Subject: [PATCH 575/623] Port from Vector. --- i386/libsaio/patcher.c | 353 ++++++++++++++++++++++++----------------- 1 file changed, 209 insertions(+), 144 deletions(-) diff --git a/i386/libsaio/patcher.c b/i386/libsaio/patcher.c index 4fd3d1c..10078ca 100755 --- a/i386/libsaio/patcher.c +++ b/i386/libsaio/patcher.c @@ -4,6 +4,11 @@ * Updates: * - Moved function patchKernel from load.c to patcher.c (Pike R. Alpha, August 2016) * - Cleanups/removed some of the old style patches (more to follow). + * - Function disableMSRs added. + * - Patch bit mask added to speedup the main while loop. + * - Reducing the number of compiler derectives (make it much easier to handle). + * - Latest source code from Vector implemented. + * - Checks added to catch errors in config.h (think MacPro61.h etc). * */ @@ -14,10 +19,50 @@ #include "platform.h" #if (PATCH_KERNEL && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) +//============================================================================== +// Called from patchKernel() -#define PATCH_KEXT_LOADING 1 - +void disableMSRs(unsigned char * aPointer, uint8_t aNumberOfTargetMSRs) +{ + // + // Array with target MSRs that we need to disable. + // + const uint16_t targetMSRs[] = { 0xE2, 0x01A0, /* 0x01FC, */ 0x01AA, 0x0620, /* 0x064C, */ 0x063A, 0x0642 }; + // + // Main for-loop. + // + for (char x = 0; x < aNumberOfTargetMSRs; x++) + { + // + // Secondary for-loop to find MSRs that we need to disable. + // + for (uint8_t y = 0; y < (sizeof(targetMSRs) / sizeof(short)); y++) + { + // + // Target MSR? + // + if (*(uint16_t *)aPointer == targetMSRs[y]) + { + // + // Yes. + // + DEBUG_DISABLED_MSR(targetMSRs[y], 1) + // + // Zero out the 32-bit CPU-bits field. + // + *(uint32_t *)(aPointer + 4) = 0x00000000UL; + // + // Done (MSR is disabled). + // + break; + } + } + + aPointer += 0x30; + } +} + //============================================================================== // Called from decodeMachO() @@ -37,291 +82,311 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize long symbolNumber = 0; + uint32_t targetSections = 9; + uint32_t targetPatches = 1; + struct symtab_command * symtab = (struct symtab_command *)cmdBase; struct segment_command_64 * textSegment = (struct segment_command_64 *)textSegmentAddress; #if PRELINKED_KERNEL_SUPPORT struct segment_command_64 * vldSegment = (struct segment_command_64 *)vldSegmentAddress; + + targetSections |= 25; #endif void * stringTable = (void *)(loadAddress + symtab->stroff); - const uint16_t targetMSRs[] = { 0xE2, 0x01A0, /* 0x01FC, */ 0x01AA, 0x0620, /* 0x064C, */ 0x063A, 0x0642 }; - uint32_t pointer = (loadAddress + symtab->symoff + skippedSymbolCount); - + int64_t offset = 0; uint64_t startAddress = 0; uint64_t endAddress = 0; + + uint8_t cpuid_set_info_ModelCorrection = 0; + uint8_t xcpm_bootstrap_ModelCorrection = 0; + +#if (PATCH_CPUID_SET_INFO == 0) + switch (gPlatform.CPU.Model) + { + case CPU_MODEL_BROADWELL_E: + targetPatches += 2; + cpuid_set_info_ModelCorrection = -8; + break; + } +#else + targetPatches += 2; + cpuid_set_info_ModelCorrection = PATCH_CPUID_SET_INFO; +#endif + +#if (PATCH_XCPM_BOOTSTRAP == 0) + switch (gPlatform.CPU.Model) + { + case CPU_MODEL_IB_CORE: + targetPatches += 4; + xcpm_bootstrap_ModelCorrection = -1; + break; + + case CPU_MODEL_IB_CORE_EX: + targetPatches += 4; + xcpm_bootstrap_ModelCorrection = -2; + break; + + case CPU_MODEL_HASWELL_E: + targetPatches += 4; + xcpm_bootstrap_ModelCorrection = -3; + break; + + case CPU_MODEL_BROADWELL_E: + targetPatches += 4; + xcpm_bootstrap_ModelCorrection = -8; + break; + } +#else + targetPatches += 4; + xcpm_bootstrap_ModelCorrection = PATCH_XCPM_BOOTSTRAP; +#endif + // + // Is MSR(0xE2) locked (bit-15 set)? + // + if (gPlatform.CPU.CstConfigMsrLocked) + { + // + // Yes. Enable patches: _xcpm_idle(8), _xcpm_SMT_scope_msrs(16), _xcpm_core_scope_msrs(32), _xcpm_pkg_scope_msrs(64) + // + targetPatches += 120; + } // // Main while loop. // - while (symbolNumber < symtab->nsyms) + while ((symbolNumber < symtab->nsyms) && targetSections) { struct nlist_64 * nl = (struct nlist_64 *)pointer; -#if PATCH_KEXT_LOADING || PATCH_CPUID_SET_INFO offset = 0; startAddress = 0; endAddress = 0; - if ((nl->n_sect == 1 /* __TEXT,__text */) && nl->n_value) + if (nl->n_sect == 1 && nl->n_value && (targetSections & nl->n_sect)) // __TEXT,__text { symbolName = (char *)stringTable + nl->n_un.n_strx; -#if PATCH_KEXT_LOADING - if (strcmp(symbolName, "__ZN6OSKext14loadExecutableEv") == 0) + + if ((targetPatches & 1) && strcmp(symbolName, "__ZN6OSKext14loadExecutableEv") == 0) { offset = (nl->n_value - textSegment->vmaddr); startAddress = (uint64_t)(textSegment->vmaddr + offset); endAddress = (startAddress + 0x300); - p = (unsigned char *)startAddress; - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) - for (; p <= (unsigned char *)endAddress; p++) + for (p = (unsigned char *)startAddress; p <= (unsigned char *)endAddress; p++) { // - // Search pattern: 0x48xx74db854c3789 + // Search pattern: 89 C3 48 85 DB 74 71 48 (in HexEdit) // - if ((*(uint32_t *)p == 0x8548c389) && (*(uint16_t *)(p+4) == 0x74db) && (*(uint8_t *)(p+7) == 0x48)) + if ((*(uint32_t *)p == 0x8548c389) && (*(uint16_t *)(p + 4) == 0x74db) && (*(uint8_t *)(p + 7) == 0x48)) { DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) *(uint64_t *)p = 0x4812ebdb8548c389; + // ^^^^ + // + // Done. Disable this patch. + // p = (unsigned char *)endAddress; + targetPatches =~ 1; } } } -#endif // #if PATCH_KEXT_LOADING - -#if PATCH_CPUID_SET_INFO - #if PATCH_KEXT_LOADING - else - #endif - if (strcmp(symbolName, "_cpuid_set_info") == 0) + else if ((targetPatches & 2) && strcmp(symbolName, "_cpuid_set_info") == 0) { offset = (nl->n_value - textSegment->vmaddr); startAddress = (uint64_t)(textSegment->vmaddr + offset); endAddress = (startAddress + 0x2100); - p = (unsigned char *)startAddress; - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) - for (; p <= (unsigned char *)endAddress; p++) + for (p = (unsigned char *)startAddress; p <= (unsigned char *)endAddress; p++) { - // Broadwell E (0x4F) -> Broadwell (0x47) => 0x4F-0x47 = 0x08 -> change 0xE9 into 0xE1 - // Haswell E (0x3F) -> Haswell (0x3C) => 0x3F-0x3C = 0x03 -> change 0xE9 into 0xE6 - // Ivy Bridge E (0x3E) -> Ivy Bridge (0x3A) => 0x3E-0x3A = 0x04 -> change 0xE9 into 0xE5 - // - // TODO: Port the patch routine from Vector. + // Search pattern: 0F B6 C4 83 C0 E9 83 F8 (in HexEdit). // - if (*(uint64_t *)p == 0xf883e9c083c4b60f) // Reversed 0f b6 c4 83 c0 e9 83 f8 (47) (8 bytes). - { // ^^ ^^ + if ((*(uint32_t *)p == 0x83c4b60f) && (*(uint8_t *)(p + 4) == 0xc0) && (*(uint16_t *)(p + 6) == 0xf883)) + { DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) - // 0xff - 0xe9 = 0x16 + 0x01 = 0x17 + (0x4f - 0x47 = 0x08) = 0x1f (0x4f - 0x1f = 0x38) - *(uint64_t *)p = 0xf8839000000030b8; // Reversed b8 30 00 00 00 90 83 f8 (47) (8 bytes). - p = (unsigned char *)endAddress; - } - else if (*(uint64_t *)p == 0xf883f1c083c4b60f) // Reversed 0f b6 c4 83 c0 f1 83 f8 (47) (8 bytes). - { // ^^ ^^ - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) - - // 0xff - 0xf1 = 0x0e + 0x01 = 0x0f + (0x4f - 0x47 = 0x08) = 0x17 (0x4f - 0x17 = 0x38) - *(uint64_t *)p = 0xf8839000000038b8; // Reversed b8 38 00 00 00 90 83 f8 (47) (8 bytes). + // *(uint8_t *)(p + 5) = (*(uint8_t *)(p + 5) + PATCH_CPUID_SET_INFO); + *(uint8_t *)(p + 5) = (*(uint8_t *)(p + 5) + cpuid_set_info_ModelCorrection); + // + // Done. Disable this patch. + // p = (unsigned char *)endAddress; + targetPatches =~ 2; } } } -#endif - else if (strcmp(symbolName, "_xcpm_bootstrap") == 0) + else if ((targetPatches & 4) && strcmp(symbolName, "_xcpm_bootstrap") == 0) { offset = (nl->n_value - textSegment->vmaddr); startAddress = (uint64_t)(textSegment->vmaddr + offset); endAddress = (startAddress + 0x100); - p = (unsigned char *)startAddress; - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) - for (; p <= (unsigned char *)endAddress; p++) + for (p = (unsigned char *)startAddress; p <= (unsigned char *)endAddress; p++) { // - // TODO: Port the patch routine from Vector. + // Search pattern: 83 C3 xx 83 FB 22 77 1C (in HexEdit). // - if (*(uint64_t *)p == 0x1c7722fb83c4c383) // Reversed of HexEdit: 83 C3 C4 83 FB 22 77 1C - { // ˆˆ ˆˆ + if ((*(uint16_t *)p == 0xc383) && (*(uint32_t *)(p + 3) == 0x7722fb83) && (*(uint8_t *)(p + 7) == 0x1C)) + { DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) - *(uint64_t *)p = 0x1c7722fb83bcc383; // Reversed of HexEdit: 83 C3 BC 83 FB 22 77 1C - // ˆˆ ˆˆ + // *(uint8_t *)(p + 2) = (*(uint8_t *)(p + 2) + PATCH_XCPM_BOOTSTRAP); + *(uint8_t *)(p + 2) = (*(uint8_t *)(p + 2) + xcpm_bootstrap_ModelCorrection); + // + // Done. Disable this patch. + // + p = (unsigned char *)endAddress; + targetPatches =~ 4; } } } - - else if (strcmp(symbolName, "_xcpm_idle") == 0) // 2 MSRs (0xE2, 0xE2) + else if ((targetPatches & 8) && strcmp(symbolName, "_xcpm_idle") == 0) // 2 MSRs (0xE2, 0xE2) { offset = (nl->n_value - textSegment->vmaddr); startAddress = (uint64_t)(textSegment->vmaddr + offset); endAddress = (startAddress + 0x200); - p = (unsigned char *)startAddress; - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) - for (; p <= (unsigned char *)endAddress; p++) + for (p = (unsigned char *)startAddress; p <= (unsigned char *)endAddress; p++) { if (*(uint64_t *)p == 0x300f000000e2b920)// (48 C1 EA) 20 B9 E2 00 00 00 0F 30 reversed { DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) *(uint32_t *)(p + 4) = 0x90900000; // Reversed 00 00 90 90 (4 bytes). + // + // Done. Disable this patch. + // + p = (unsigned char *)endAddress; + targetPatches =~ 8; } } } + // + // Are we done patching for this section? + // + if (targetPatches == 0) + { + // + // Yes. Disable this section. + // + targetSections =~ nl->n_sect; + } } -#endif // #if PATCH_KEXT_LOADING || PATCH_CPUID_SET_INFO - -#if PATCH_XCPM_SCOPE_MSRS - #if PATCH_KEXT_LOADING || PATCH_CPUID_SET_INFO - else - #endif - if (((nl->n_sect == 8 /* __DATA,__data */) && nl->n_value) && gPlatform.CPU.CstConfigMsrLocked) + else if (nl->n_sect == 8 && nl->n_value && (targetSections & nl->n_sect)) // __DATA,__data { - UInt8 repeat = 0; - symbolName = (char *)stringTable + nl->n_un.n_strx; - if (strcmp(symbolName, "_xcpm_SMT_scope_msrs") == 0) // 11 MSRs (0xE2, 0x01A0, 0x01B0, 0x01B0, 0x01B0, 0x0609, 0x038D, 0x038F, 0x0187, 0x0188, 0x0189) + if ((targetPatches & 16) && strcmp(symbolName, "_xcpm_SMT_scope_msrs") == 0) { + // + // 11 MSRs (0xE2, 0x01A0, 0x01B0, 0x01B0, 0x01B0, 0x0609, 0x038D, 0x038F, 0x0187, 0x0188, 0x0189) + // int64_t offset = (nl->n_value - textSegment->vmaddr); uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); - p = (unsigned char *)startAddress; - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, startAddress) // - // TODO: Port the patch routine from Vector. + // Disable MSR's from config.h // + disableMSRs((unsigned char *)startAddress, 11); // - // Zero out MSR 0xE2 and MSR 0x01A0 + // Done. Disable this patch. // - for (repeat = 0; repeat < 8; repeat++) - { - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) - - *(uint64_t *)p = 0x0000000000000000ULL; - p += 0x08; - } + targetPatches =~ 16; } - else if (strcmp(symbolName, "_xcpm_core_scope_msrs") == 0) // 2 MSRs (0xE2, 0xE2) + else if ((targetPatches & 32) && strcmp(symbolName, "_xcpm_core_scope_msrs") == 0) { + // + // 2 MSRs (0xE2, 0xE2) + // int64_t offset = (nl->n_value - textSegment->vmaddr); uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); - p = (unsigned char *)startAddress; - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, startAddress) // - // TODO: Port the patch routine from Vector. + // Disable MSR's from config.h // - DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) + disableMSRs((unsigned char *)startAddress, 2); // - // Zero out CPU bits of MSR 0xE2 + // Done. Disable this patch. // - *(uint32_t *)(p + 4) = 0x00000000UL; - // - // Skip to second MSR 0xE2 - // - p += 0x30; - // - // Zero out CPU bits of MSR 0xE2 - // - *(uint32_t *)(p + 4) = 0x00000000UL; + targetPatches =~ 32; } - else if (strcmp(symbolName, "_xcpm_pkg_scope_msrs") == 0) // 7 MSRs (0x01A0, 0x01FC, 0x01AA, 0x0620, 0x064C, 0x063A, 0x0642) + else if ((targetPatches & 64) && strcmp(symbolName, "_xcpm_pkg_scope_msrs") == 0) { // - // 0x064C MSR_TURBO_ACTIVATION_RATIO (Ivy Bridge Haswell E) - // 0x063A MSR_PP0_POLICY - // 0x0642 MSR_PP1_POLICY (not supported for server platform) + // 7 MSRs (0x01A0, 0x01FC, 0x01AA, 0x0620, 0x064C, 0x063A, 0x0642) // int64_t offset = (nl->n_value - textSegment->vmaddr); uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); - p = (unsigned char *)startAddress; - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, startAddress) // - // TODO: Port the patch routine from Vector. + // Disable MSR's from config.h // - for (short target_msr = 0; target_msr < 7; target_msr++) - { - // - // Secondary for-loop to find MSRs that we need to disable. - // - for (short msr_to_disable = 0; msr_to_disable < 6; msr_to_disable++) - { - // - // Is this a MSR that we need to disable? - // - if (*(uint16_t *)p == targetMSRs[msr_to_disable]) - { - // - // Yes. - // - DEBUG_DISABLED_MSR(targetMSRs[msr_to_disable], 1) - // - // Zero out the 32-bit CPU-bits field. - // - *(uint32_t *)(p + 4) = 0x00000000UL; - // - // The MSR is now disabled. Break out of secondary for loop. - // - break; - } - } - - p += 0x30; - } + disableMSRs((unsigned char *)startAddress, 7); + // + // Done. Disable this patch. + // + targetPatches =~ 64; + + } + // + // Are we done patching for this section? + // + if ((targetPatches & 112) == 0) + { + // + // Yes. Disable this section. + // + targetSections =~ nl->n_sect; } } -#endif // #if PATCH_XCPM_SCOPE_MSRS - -#if (PATCH_LOAD_EXTRA_KEXTS && PRELINKED_KERNEL_SUPPORT) - #if (PATCH_KEXT_LOADING || PATCH_XCPM_SCOPE_MSRS) - else - #endif - if ((nl->n_sect == 25 /* __KLD,__text */) && nl->n_value) +#if PRELINKED_KERNEL_SUPPORT + else if (nl->n_sect == 25 && nl->n_value && (targetSections & nl->n_sect)) // __KLD,__text { symbolName = (char *)stringTable + nl->n_un.n_strx; - if (strcmp(symbolName, "__ZN12KLDBootstrap21readStartupExtensionsEv") == 0) + if ((targetPatches & 128) && strcmp(symbolName, "__ZN12KLDBootstrap21readStartupExtensionsEv") == 0) { int64_t offset = (nl->n_value - textSegment->vmaddr); uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); uint64_t endAddress = (startAddress + 0x3f); - p = (unsigned char *)startAddress; - DEBUG_SYMBOL_FOUND(symbolName, offset, textSegment->vmaddr, textSegment->fileoff, startAddress, endAddress) - for (; p <= (unsigned char *)endAddress; p++) + for (p = (unsigned char *)startAddress; p <= (unsigned char *)endAddress; p++) { - if (*(uint64_t *)p == 0xe805eb00000025e8) - { + if (*(uint64_t *)p == 0xe805eb00000025e8) // E8 25 00 00 00 EB 05 E8 (in HexEdit) + { // ^^^^ DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) - *(uint64_t *)p = 0xe8909000000025e8; + *(uint64_t *)p = 0xe8909000000025e8; // E8 25 00 00 00 90 90 E8 (in HexEdit) + // ^^^^ + // + // Disable this section. + // p = (unsigned char *)endAddress; + targetPatches =~ 128; + targetSections =~ nl->n_sect; } } } } -#endif // #if (PATCH_LOAD_EXTRA_KEXTS && PRELINKED_KERNEL_SUPPORT) +#endif // #if PRELINKED_KERNEL_SUPPORT symbolNumber++; pointer += listSize; // Point to next symbol. From 64a01c24d07dbc6d1b620adbe71b76808c643a0a Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Tue, 16 Aug 2016 23:17:41 +0200 Subject: [PATCH 576/623] Updated settings template. --- i386/config/settings-template.h | 34 +++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 506a204..dfd0ae6 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -41,6 +41,8 @@ * - DYNAMIC_RAM_OVERRIDE_SIZES renamed to STATIC_RAM_OVERRIDE_SIZES * - DYNAMIC_RAM_OVERRIDE_FREQUENCY renamed to STATIC_RAM_OVERRIDE_FREQUENCY * - PATCH_XCPI_SCOPE_MSRS renamed to PATCH_XCPM_SCOPE_MSRS + * - PATCH_XCPI_SCOPE_MSRS removed (Pike R. Alpha, August 2016). + * - PATCH_KERNEL, DEBUG_KERNEL_PATCHER, PATCH_XCPM_BOOTSTRAP and PATCH_CPUID_SET_INFO added. */ @@ -423,7 +425,7 @@ #define TARGET_MODEL MACMINI // Set to MACMINI by default. Supported models are: // - // IMAC and IMAC_131, IMAC_122, IMAC_111, IMAC_121 + // IMAC and IMAC_171, IMAC_16n, IMAC_15n, IMAC_14n, IMAC_131, IMAC_12n, IMAC_111 // MACBOOK and MACBOOK_41 // MACBOOKAIR and MACBOOKAIR_42, MACBOOKAIR_41 // MACBOOKPRO and MACBOOKPRO_101, MACBOOKPRO_91, MACBOOKPRO_83, MACBOOKPRO_82, @@ -449,21 +451,29 @@ -//---------------------------------------------------------------- LOAD.C ------------------------------------------------------------------ +//-------------------------------------------------------------- PATCHER.C ----------------------------------------------------------------- -#define PATCH_KEXT_LOADING 1 // Set to 1 by default. - -#define LOAD_EXECUTABLE_TARGET_UINT64 0x487074db8548c389ULL // 89c34885db747048 revered in HexEdit -#define LOAD_EXECUTABLE_PATCH_UINT64 0x4812ebdb8548c389ULL - -#define PATCH_XCPM_SCOPE_MSRS 0 // Set to 0 by default. +#define PATCH_KERNEL 1 // Set to 1 by default. + // + // Note: A value of 0 will trigger a panic without a prelinkedkernel, and your computer may + // not boot without patches. -#define XCPM_SCOPE_MSRS_TARGET_UINT64 0x00000002000000E2ULL + // + // Override value examples: + // + // Use -8 for Broadwell E to Broadwell H + // Use -3 for Haswell E to Haswell + // Use 3 for Ivy Bridge to Haswell (untested and unconfirmed). + // Use 2 for Ivy Bridge E to Haswell (untested and unconfirmed). + // +#define PATCH_XCPM_BOOTSTRAP 0 // Set to 0 by default. Change this to the value that you want for your processor. -#define PATCH_LOAD_EXTRA_KEXTS 0 // Set to 0 by default. +#define PATCH_CPUID_SET_INFO 0 // Set to 0 by default. Change this to the value that you want for your processor. + // + // Note: Not required for Haswell E and Ivy Bridge E processors. + // -#define READ_STARTUP_EXTENSIONS_TARGET_UINT64 0xe805eb00000025e8ULL // e825000000eb05e8 revered in HexEdit -#define READ_STARTUP_EXTENSIONS_PATCH_UINT64 0xe8909000000025e8ULL +#define DEBUG_KERNEL_PATCHER 0 // Set to 0 by default. Use 1 to trace patches (symbol name, address and number). //-------------------------------------------------------------- PLATFORM.C ---------------------------------------------------------------- From e2db0e0b50628432689481dd655576df9d194724 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Thu, 18 Aug 2016 08:59:16 +0200 Subject: [PATCH 577/623] Fine-grained debug output. --- i386/boot2/debug.h | 14 +++++++++----- i386/config/settings-template.h | 7 +++++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/i386/boot2/debug.h b/i386/boot2/debug.h index a039698..fe868df 100755 --- a/i386/boot2/debug.h +++ b/i386/boot2/debug.h @@ -109,7 +109,7 @@ #endif -#if DEBUG_KERNEL_PATCHER +#if (DEBUG_KERNEL_PATCHER & 1) #define DEBUG_SYMBOL_FOUND(symbol, offset, vmaddr, fileoff, start, end) \ printf("Symbol %s found!\n", symbol); \ printf("offset..............: 0x%llx\n", offset); \ @@ -118,7 +118,11 @@ printf("startAddress........: 0x%llx\n", start); \ printf("endAddress..........: 0x%llx\n", end); \ sleep(1); +#else + #define DEBUG_SYMBOL_FOUND(symbol, offset, vmaddr, fileoff, start, end) +#endif +#if (DEBUG_KERNEL_PATCHER & 2) #define DEBUG_PATCH_STATUS(symbol, address, seconds) \ printf("Patched %s(@ 0x%x)\n", symbol, address); \ \ @@ -126,7 +130,11 @@ { \ sleep(seconds); \ } +#else + #define DEBUG_SYMBOL_PATCH(symbol, address, number, seconds) +#endif +#if (DEBUG_KERNEL_PATCHER & 4) #define DEBUG_DISABLED_MSR(msr, seconds) \ printf("Disabling MSR: 0x%x\n", msr); \ \ @@ -134,12 +142,8 @@ { \ sleep(seconds); \ } - #else - #define DEBUG_SYMBOL_FOUND(symbol, offset, vmaddr, fileoff, start, end) - #define DEBUG_SYMBOL_PATCH(symbol, address, number, seconds) #define DEBUG_DISABLE_MSR(msr, seconds) #endif #endif // __REVO_DEBUG_H - diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index dfd0ae6..1d9cd1f 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -473,8 +473,11 @@ // Note: Not required for Haswell E and Ivy Bridge E processors. // -#define DEBUG_KERNEL_PATCHER 0 // Set to 0 by default. Use 1 to trace patches (symbol name, address and number). - +#define DEBUG_KERNEL_PATCHER 0 // Set to 0 by default, and the following bits can be set: + // + // A value of 1 (bit-0) shows the symbol name, offset and address range. + // A value of 2 (bit-1) shows the patch status. + // A value of 4 (bit-2) shows the disabled MSR's. //-------------------------------------------------------------- PLATFORM.C ---------------------------------------------------------------- From ddd1a1f8f975b47ef65657652aa05fcabb572474 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Thu, 18 Aug 2016 11:41:46 +0200 Subject: [PATCH 578/623] Fix for non-debug builds. --- i386/boot2/debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/boot2/debug.h b/i386/boot2/debug.h index fe868df..0c439ed 100755 --- a/i386/boot2/debug.h +++ b/i386/boot2/debug.h @@ -131,7 +131,7 @@ sleep(seconds); \ } #else - #define DEBUG_SYMBOL_PATCH(symbol, address, number, seconds) + #define DEBUG_PATCH_STATUS(symbol, address, seconds) #endif #if (DEBUG_KERNEL_PATCHER & 4) @@ -143,7 +143,7 @@ sleep(seconds); \ } #else - #define DEBUG_DISABLE_MSR(msr, seconds) + #define DEBUG_DISABLED_MSR(msr, seconds) #endif #endif // __REVO_DEBUG_H From b47b6dd09b734a9fdc0aa602edfde2e9deb76393 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Thu, 18 Aug 2016 11:43:30 +0200 Subject: [PATCH 579/623] Commenting out old compiler directive. --- i386/boot2/drivers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/boot2/drivers.c b/i386/boot2/drivers.c index 6d1c2be..dcac46a 100755 --- a/i386/boot2/drivers.c +++ b/i386/boot2/drivers.c @@ -201,7 +201,8 @@ long loadDrivers(char * dirSpec) { _DRIVERS_DEBUG_DUMP("gKextLoadStatus != 3\n"); -#if (PATCH_LOAD_EXTRA_KEXTS && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) // El Capitan and Sierra. +// #if (PATCH_LOAD_EXTRA_KEXTS && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) // El Capitan and Sierra. +#if ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN) // El Capitan and Sierra. // Yes we do. Start by looking for kexts in: /Extra/Extensions/ if ((gKextLoadStatus & 2) == 0) { From 913b1551a0f7df5c6471a2554c169733c33c955c Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sat, 20 Aug 2016 16:49:08 +0200 Subject: [PATCH 580/623] Brushing off some of the collected dust... --- i386/boot2/bootlogo.c | 18 ++++++------- i386/libsaio/bootstruct.c | 2 +- i386/libsaio/cpu/Intel/dynamic_data.h | 7 ++--- i386/libsaio/disk.c | 11 ++++++-- i386/libsaio/efi.c | 17 +++++++----- i386/libsaio/hfs.c | 37 +++++++++++++-------------- i386/libsaio/load.c | 4 +-- i386/libsaio/sys.c | 13 +++------- 8 files changed, 56 insertions(+), 53 deletions(-) diff --git a/i386/boot2/bootlogo.c b/i386/boot2/bootlogo.c index 2fd5609..649de2d 100755 --- a/i386/boot2/bootlogo.c +++ b/i386/boot2/bootlogo.c @@ -89,20 +89,20 @@ void setBackgroundColor(uint32_t aBackGroundColor) void drawDataRectangle(unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char *data) { - unsigned short drawWidth; - long pixelBytes = VIDEO(depth) / 8; - unsigned char * vram = (unsigned char *) VIDEO(baseAddr) + VIDEO(rowBytes) * y + pixelBytes * x; + char * vram = (char *) VIDEO(baseAddr) + VIDEO(rowBytes) * y + pixelBytes * x; - drawWidth = MIN(width, VIDEO(width) - x); height = MIN(height, VIDEO(height) - y); - - while (height--) + + if (data) { - bcopy( data, vram, width * pixelBytes ); - vram += VIDEO(rowBytes); - data += width * pixelBytes; + while (height--) + { + bcopy(data, vram, (width * pixelBytes)); + vram += VIDEO(rowBytes); + data += (width * pixelBytes); + } } } diff --git a/i386/libsaio/bootstruct.c b/i386/libsaio/bootstruct.c index 541786f..902635c 100755 --- a/i386/libsaio/bootstruct.c +++ b/i386/libsaio/bootstruct.c @@ -38,7 +38,7 @@ PrivateBootInfo_t *bootInfo; void initKernelBootConfig(void) { - bootArgs = (kernel_boot_args *)malloc(sizeof(boot_args)); + bootArgs = (kernel_boot_args *)malloc(sizeof(kernel_boot_args)); bootInfo = (PrivateBootInfo_t *)malloc(sizeof(PrivateBootInfo_t)); if (bootArgs == 0 || bootInfo == 0) diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index 2f5c47e..3485e43 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -192,14 +192,12 @@ void initCPUStruct(void) // bool IvyBridge = false; uint8_t CoreBridgeType = 0; - uint8_t maxcoef, maxdiv, currcoef, currdiv; + uint8_t maxdiv, currcoef, currdiv; uint32_t qpiSpeed = 0; uint64_t tscFrequency, fsbFrequency, cpuFrequency, msr; - maxcoef = maxdiv = currcoef = currdiv = 0; - // Get and cache CPUID data. do_cpuid( 0x00000000, gPlatform.CPU.ID[LEAF_0]); // Vendor-ID and Largest Standard Function (Function 0h). do_cpuid( 0x00000001, gPlatform.CPU.ID[LEAF_1]); // Feature Information (Function 01h). @@ -423,6 +421,7 @@ void initCPUStruct(void) case CPU_MODEL_KABYLAKE_DT: CoreBridgeType = KABYLAKE; hiBit = 31; + break; case CPU_MODEL_NEHALEM: case CPU_MODEL_NEHALEM_EX: @@ -499,6 +498,8 @@ void initCPUStruct(void) } else // For all other (mostly older) Intel CPU models. { + uint8_t maxcoef = maxdiv = currcoef = currdiv = 0; + //-------------------------------------------------------------------------- // Get core and thread count - the old way. diff --git a/i386/libsaio/disk.c b/i386/libsaio/disk.c index 6f19f72..85b902f 100644 --- a/i386/libsaio/disk.c +++ b/i386/libsaio/disk.c @@ -741,9 +741,16 @@ BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr) } } } - _DISK_DEBUG_ELSE_DUMP("Failed to read boot sector from BIOS device %02xh\n", biosdev); + else + { + _DISK_DEBUG_DUMP("Failed to read boot sector from BIOS device %02xh\n", biosdev); + + if (buffer) + { + free(buffer); + } + } - free(buffer); *countPtr = 0; _DISK_DEBUG_SLEEP(5); diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index a90389e..970def0 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -196,14 +196,17 @@ void initEFITree(void) DT__AddProperty(chosenNode, "machine-signature", sizeof(MACHINE_SIGNATURE), (EFI_UINT8*) &MACHINE_SIGNATURE); #if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // El Capitan and Yosemite - UInt8 index = 0; - EFI_UINT16 PMTimerValue = 0; - uint64_t randomValue, tempValue, cpuTick; + UInt8 index = 0; + + uint64_t randomValue = 0; + uint64_t cpuTick = 0; + + EFI_UINT16 PMTimerValue = 0; + EFI_UINT32 ecx, esi, edi = 0; - EFI_UINT32 rcx, rdx, rsi, rdi; + EFI_UINT32 rcx, rdx, rdi, rsi = 0; - randomValue = tempValue = ecx = esi = edi = 0; // xor %ecx, %ecx - rcx = rdx = rsi = rdi = cpuTick = 0; + ecx = 0; // xor %ecx, %ecx // LEAF_1 - Feature Information (Function 01h). if (gPlatform.CPU.ID[LEAF_1][2] & 0x40000000) // Checking ecx:bit-30 @@ -249,7 +252,7 @@ void initEFITree(void) rdi = (rdi ^ rcx); // xor %rcx, %rdi rdi = (rdi ^ rdx); // xor %rdx, %rdi - seedBufferAlternative[index] = (rdi & 0xff); // mov %dil, (%r15,%r12,1) + seedBufferAlternative[index] = (rdi & 0xff); // mov %dil, (%r15,%r12,1) edi = (edi & 0x2f); // and $0x2f, %edi edi = (edi + esi); // add %esi, %edi diff --git a/i386/libsaio/hfs.c b/i386/libsaio/hfs.c index 676d176..3da5ff2 100755 --- a/i386/libsaio/hfs.c +++ b/i386/libsaio/hfs.c @@ -761,7 +761,7 @@ static long GetCatalogEntry(long * dirIndex, char ** name, long * flags, long * void *extent; char *nodeBuf, *testKey, *entry; - BTNodeDescriptor *node; + BTNodeDescriptor *node = NULL; if (gIsHFSPlus) { @@ -774,9 +774,13 @@ static long GetCatalogEntry(long * dirIndex, char ** name, long * flags, long * extentSize = SWAP_BE32(gHFSMDB->drCTFlSize); } - nodeSize = SWAP_BE16(gBTHeaders[kBTreeCatalog]->nodeSize); - nodeBuf = (char *)malloc(nodeSize); - node = (BTNodeDescriptor *)nodeBuf; + nodeSize = SWAP_BE16(gBTHeaders[kBTreeCatalog]->nodeSize); + nodeBuf = (char *)malloc(nodeSize); + + if (nodeBuf) + { + node = (BTNodeDescriptor *)nodeBuf; + } index = *dirIndex % nodeSize; curNode = *dirIndex / nodeSize; @@ -793,8 +797,7 @@ static long GetCatalogEntry(long * dirIndex, char ** name, long * flags, long * } else { - strncpy(gTempStr, (const char *)&((HFSCatalogKey *)testKey)->nodeName[1], - ((HFSCatalogKey *)testKey)->nodeName[0]); + strncpy(gTempStr, (const char *)&((HFSCatalogKey *)testKey)->nodeName[1], ((HFSCatalogKey *)testKey)->nodeName[0]); gTempStr[((HFSCatalogKey *)testKey)->nodeName[0]] = '\0'; } @@ -804,7 +807,7 @@ static long GetCatalogEntry(long * dirIndex, char ** name, long * flags, long * // Update dirIndex. index++; - if (index == SWAP_BE16(node->numRecords)) + if (node && (index == SWAP_BE16(node->numRecords))) { index = 0; curNode = SWAP_BE32(node->fLink); @@ -832,13 +835,6 @@ static long ReadCatalogEntry(char * fileName, long dirID, void * entry, long * d if (gIsHFSPlus) { hfsPlusKey->parentID = SWAP_BE32(dirID); - length = strlen(fileName); - - if (length > 255) - { - length = 255; - } - utf_decodestr((u_int8_t *)fileName, hfsPlusKey->nodeName.unicode, &(hfsPlusKey->nodeName.length), 512); } else @@ -896,7 +892,7 @@ static long ReadBTreeEntry(long btree, void * key, char * entry, long * dirIndex long nodeSize, result = 0, entrySize = 0; long curNode, index = 0, lowerBound, upperBound; long extentSize; - char *testKey, *recordData; + char *testKey, *recordData = NULL; char *nodeBuf; BTNodeDescriptor *node; @@ -1009,7 +1005,7 @@ static long ReadBTreeEntry(long btree, void * key, char * entry, long * dirIndex } // Found the closest key... Recurse on it if this is an index node. - if (node->kind == kBTIndexNode) + if (recordData && node->kind == kBTIndexNode) { curNode = SWAP_BE32( *((long *)recordData) ); } @@ -1060,9 +1056,12 @@ static long ReadBTreeEntry(long btree, void * key, char * entry, long * dirIndex entrySize = sizeof(HFSExtentRecord); } } - - bcopy(recordData, entry, entrySize); - + + if (recordData) + { + bcopy(recordData, entry, entrySize); + } + // Update dirIndex. if (dirIndex != 0) { diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index 4ca61f9..4c0f76e 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -333,11 +333,9 @@ static long initKernelVersionInfo(unsigned long loadAddress, unsigned long cmdBa if (gPlatform.ArchCPUType == CPU_TYPE_X86_64) { #endif - struct nlist_64 * nl = (struct nlist_64 *)pointer; - while (symbolNumber > 0) { - nl = (struct nlist_64 *)pointer; + struct nlist_64 * nl = (struct nlist_64 *)pointer; if ((nl->n_sect == 2 /* __TEXT,__const */) && nl->n_value) { diff --git a/i386/libsaio/sys.c b/i386/libsaio/sys.c index 65af47d..f86b30a 100755 --- a/i386/libsaio/sys.c +++ b/i386/libsaio/sys.c @@ -272,7 +272,6 @@ long CreateUUIDString(uint8_t uubytes[], int nbytes, char *uuidStr) // generate the text: e.g. 5EB1869F-C4FA-3502-BDEB-3B8ED5D87292 - i = 0; fmtbase = 0; for (fmtidx = 0; fmtidx < sizeof(uuidfmt); fmtidx++) @@ -715,7 +714,7 @@ BVRef getBootVolumeRef(const char * path, const char ** outPath) { const char * cp; BVRef bvr = gPlatform.RootVolume; - int biosdev = gPlatform.BIOSDevice; + int biosdev; // Search for left parenthesis in the path specification. @@ -910,25 +909,21 @@ BVRef getTargetRootVolume(char *rootUUID) #define FIRST_HDD_TO_CHECK 0x80 #define LAST_HDD_TO_CHECK 0x86 // Limits drive scanning to 6 (top). - BVRef bvr = NULL; - BVRef chain = gPlatform.BootPartitionChain; - - int _bvCount = 0; int hdIndex = FIRST_HDD_TO_CHECK; while(hdIndex <= LAST_HDD_TO_CHECK) { if (testBiosread(hdIndex, 0) == 0) { - _bvCount = 0; + int _bvCount = 0; scanBootVolumes(hdIndex, &_bvCount); if (_bvCount) { - chain = getBVChainForBIOSDev(hdIndex); + BVRef chain = getBVChainForBIOSDev(hdIndex); // Traverse back from the last to the first partition in the chain. - for (bvr = chain; bvr; bvr = bvr->next) + for (BVRef bvr = chain; bvr; bvr = bvr->next) { if ((bvr->biosdev == hdIndex) && ((bvr->flags & kBVFlagSystemVolume) || (bvr->flags & kBVFlagInstallVolume))) { From 9444db5beb05eddebad8450dbf272eb107cf7971 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sat, 20 Aug 2016 16:49:36 +0200 Subject: [PATCH 581/623] Moving targetMSRs to configuration file --- i386/config/settings-template.h | 3 +++ i386/libsaio/patcher.c | 21 +++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/i386/config/settings-template.h b/i386/config/settings-template.h index 1d9cd1f..2df55d1 100755 --- a/i386/config/settings-template.h +++ b/i386/config/settings-template.h @@ -43,6 +43,7 @@ * - PATCH_XCPI_SCOPE_MSRS renamed to PATCH_XCPM_SCOPE_MSRS * - PATCH_XCPI_SCOPE_MSRS removed (Pike R. Alpha, August 2016). * - PATCH_KERNEL, DEBUG_KERNEL_PATCHER, PATCH_XCPM_BOOTSTRAP and PATCH_CPUID_SET_INFO added. + * - Moving targetMSRs to configuration file. */ @@ -473,6 +474,8 @@ // Note: Not required for Haswell E and Ivy Bridge E processors. // +#define TARGET_XCPM_SCOPE_MSRS { 0xE2, 0x01A0, /* 0x01FC, */ 0x01AA, 0x0620, /* 0x064C, */ 0x063A, 0x0642 } + #define DEBUG_KERNEL_PATCHER 0 // Set to 0 by default, and the following bits can be set: // // A value of 1 (bit-0) shows the symbol name, offset and address range. diff --git a/i386/libsaio/patcher.c b/i386/libsaio/patcher.c index 10078ca..d251f06 100755 --- a/i386/libsaio/patcher.c +++ b/i386/libsaio/patcher.c @@ -9,9 +9,14 @@ * - Reducing the number of compiler derectives (make it much easier to handle). * - Latest source code from Vector implemented. * - Checks added to catch errors in config.h (think MacPro61.h etc). + * - Moving targetMSRs to configuration file. * */ +// +// TODO: Add and verify patch data for El Capitan and make diableMSRs smarter. +// + #include <mach-o/fat.h> #include <mach-o/loader.h> #include <mach-o/nlist.h> @@ -25,9 +30,9 @@ void disableMSRs(unsigned char * aPointer, uint8_t aNumberOfTargetMSRs) { // - // Array with target MSRs that we need to disable. + // Array from configuration file with target MSRs that need to be disable. // - const uint16_t targetMSRs[] = { 0xE2, 0x01A0, /* 0x01FC, */ 0x01AA, 0x0620, /* 0x064C, */ 0x063A, 0x0642 }; + const uint16_t targetMSRs[] = TARGET_XCPM_SCOPE_MSRS; // // Main for-loop. // @@ -121,22 +126,22 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize #if (PATCH_XCPM_BOOTSTRAP == 0) switch (gPlatform.CPU.Model) { - case CPU_MODEL_IB_CORE: + case CPU_MODEL_IB_CORE: // Verification required! targetPatches += 4; xcpm_bootstrap_ModelCorrection = -1; break; - case CPU_MODEL_IB_CORE_EX: + case CPU_MODEL_IB_CORE_EX: // Verification required! targetPatches += 4; xcpm_bootstrap_ModelCorrection = -2; break; - case CPU_MODEL_HASWELL_E: + case CPU_MODEL_HASWELL_E: // Confirmed working in El Capitan and Sierra. targetPatches += 4; xcpm_bootstrap_ModelCorrection = -3; break; - case CPU_MODEL_BROADWELL_E: + case CPU_MODEL_BROADWELL_E: // Confirmed working in El Capitan and Sierra. targetPatches += 4; xcpm_bootstrap_ModelCorrection = -8; break; @@ -162,10 +167,6 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize { struct nlist_64 * nl = (struct nlist_64 *)pointer; - offset = 0; - startAddress = 0; - endAddress = 0; - if (nl->n_sect == 1 && nl->n_value && (targetSections & nl->n_sect)) // __TEXT,__text { symbolName = (char *)stringTable + nl->n_un.n_strx; From f6e9af58f54c68be033dcb472787b13e68af98fd Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sat, 20 Aug 2016 18:46:53 +0200 Subject: [PATCH 582/623] Fix enabling/disabling of patch sets. --- i386/libsaio/patcher.c | 46 +++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/i386/libsaio/patcher.c b/i386/libsaio/patcher.c index d251f06..9779427 100755 --- a/i386/libsaio/patcher.c +++ b/i386/libsaio/patcher.c @@ -160,6 +160,13 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize // targetPatches += 120; } + else + { + // + // No. Enabling a limited patch set. + // + targetPatches += 80; + } // // Main while loop. // @@ -194,7 +201,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize // Done. Disable this patch. // p = (unsigned char *)endAddress; - targetPatches =~ 1; + targetPatches -= 1; } } } @@ -221,7 +228,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize // Done. Disable this patch. // p = (unsigned char *)endAddress; - targetPatches =~ 2; + targetPatches -= 2; } } } @@ -248,12 +255,13 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize // Done. Disable this patch. // p = (unsigned char *)endAddress; - targetPatches =~ 4; + targetPatches -= 4; } } } else if ((targetPatches & 8) && strcmp(symbolName, "_xcpm_idle") == 0) // 2 MSRs (0xE2, 0xE2) { + uint8_t patch_count = 0; offset = (nl->n_value - textSegment->vmaddr); startAddress = (uint64_t)(textSegment->vmaddr + offset); endAddress = (startAddress + 0x200); @@ -264,14 +272,20 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize { if (*(uint64_t *)p == 0x300f000000e2b920)// (48 C1 EA) 20 B9 E2 00 00 00 0F 30 reversed { + patch_count++; + DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) *(uint32_t *)(p + 4) = 0x90900000; // Reversed 00 00 90 90 (4 bytes). - // - // Done. Disable this patch. - // - p = (unsigned char *)endAddress; - targetPatches =~ 8; + + if (patch_count == 2) + { + // + // Done. Disable this patch. + // + p = (unsigned char *)endAddress; + targetPatches -= 8; + } } } } @@ -283,7 +297,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize // // Yes. Disable this section. // - targetSections =~ nl->n_sect; + targetSections -= nl->n_sect; } } else if (nl->n_sect == 8 && nl->n_value && (targetSections & nl->n_sect)) // __DATA,__data @@ -306,7 +320,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize // // Done. Disable this patch. // - targetPatches =~ 16; + targetPatches -= 16; } else if ((targetPatches & 32) && strcmp(symbolName, "_xcpm_core_scope_msrs") == 0) { @@ -324,7 +338,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize // // Done. Disable this patch. // - targetPatches =~ 32; + targetPatches -= 32; } else if ((targetPatches & 64) && strcmp(symbolName, "_xcpm_pkg_scope_msrs") == 0) { @@ -342,18 +356,18 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize // // Done. Disable this patch. // - targetPatches =~ 64; + targetPatches -= 64; } // // Are we done patching for this section? // - if ((targetPatches & 112) == 0) + if (targetPatches == 0) { // // Yes. Disable this section. // - targetSections =~ nl->n_sect; + targetSections -= nl->n_sect; } } #if PRELINKED_KERNEL_SUPPORT @@ -381,8 +395,8 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize // Disable this section. // p = (unsigned char *)endAddress; - targetPatches =~ 128; - targetSections =~ nl->n_sect; + targetPatches -= 128; + targetSections -= nl->n_sect; } } } From 7cf65b3a66782385f0173b8667c36c5b6a9404c9 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sat, 20 Aug 2016 22:00:27 +0200 Subject: [PATCH 583/623] More dust... --- i386/boot2/drivers.c | 5 ++++- i386/libsaio/vbe.c | 19 ++++++++++--------- i386/libsaio/xml.c | 16 +++++----------- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/i386/boot2/drivers.c b/i386/boot2/drivers.c index dcac46a..c760fb4 100755 --- a/i386/boot2/drivers.c +++ b/i386/boot2/drivers.c @@ -1003,7 +1003,10 @@ long decodeKernel(void *fileLoadBuffer, entry_t *rentry, char **raddr, int *rsiz ret = thinFatFile(&fileLoadBuffer, &len); } - ret = decodeMachO(fileLoadBuffer, rentry, raddr, rsize); + if (ret && len) + { + ret = decodeMachO(fileLoadBuffer, rentry, raddr, rsize); + } if (ret < 0 && gPlatform.ArchCPUType == CPU_TYPE_X86_64) { diff --git a/i386/libsaio/vbe.c b/i386/libsaio/vbe.c index 412e3bf..1285e6a 100755 --- a/i386/libsaio/vbe.c +++ b/i386/libsaio/vbe.c @@ -109,6 +109,8 @@ unsigned long getResolutionFromEDID(void) UInt8 targetBlock = 0; const UInt8 header[] = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 }; + bzero(data, 128); + do { bb.intno = 0x10; @@ -132,10 +134,9 @@ unsigned long getResolutionFromEDID(void) } #if DEBUG_BOOT_GRAPHICS - short i = 0; short r = 0; - for (i = 0; i < 128; i++) + for (short i = 0; i < 128; i++) { printf(" %02x", data[i]); @@ -146,15 +147,15 @@ unsigned long getResolutionFromEDID(void) r = 0; printf("\n"); } - } - sleep(1); -#endif - if (data[126] == 0) - { - targetBlock = 0; - } + sleep(1); + if (data[126] == 0) + { + targetBlock = 0; + } + } +#endif return (((data[56] | ((data[58] & 0xF0) << 4)) << 16) | (data[59] | ((data[61] & 0xF0) << 4))); } else diff --git a/i386/libsaio/xml.c b/i386/libsaio/xml.c index a373393..5c528cb 100755 --- a/i386/libsaio/xml.c +++ b/i386/libsaio/xml.c @@ -642,13 +642,11 @@ void XMLFreeTag(TagPtr tag) static char * NewSymbol(char * string) { - static SymbolPtr lastGuy = 0; - // Look for string in the list of symbols. SymbolPtr symbol = FindSymbol(string, 0); // Add new symbol. - if (symbol == 0) + if (symbol == NULL) { symbol = (SymbolPtr)malloc(sizeof(Symbol) + 1 + strlen(string)); @@ -661,6 +659,9 @@ static char * NewSymbol(char * string) // Add the symbol to the list. symbol->next = gSymbolsHead; gSymbolsHead = symbol; + + // Update the refCount. + symbol->refCount++; } else { @@ -668,14 +669,7 @@ static char * NewSymbol(char * string) } } - // Update the refCount and return the string. - symbol->refCount++; - - if (lastGuy && lastGuy->next != 0) - { - stop ("xml.c"); - } - + // Return the string return symbol->string; } From 5a1ad5baa4e9f41f7399a1779d66ec6c8c563220 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sun, 21 Aug 2016 11:29:06 +0200 Subject: [PATCH 584/623] Sierra target compilation --- i386/boot2/boot.c | 4 +- i386/boot2/bootlogo.h | 2 +- i386/boot2/graphics.c | 30 +++---- i386/libsaio/bootstruct.c | 2 +- i386/libsaio/bootstruct.h | 164 +++++++++++++++++++++++--------------- i386/libsaio/console.c | 8 +- i386/libsaio/hfs.c | 2 +- i386/libsaio/platform.c | 3 +- i386/libsaio/xml.c | 2 +- 9 files changed, 126 insertions(+), 91 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 38e1505..9e021f8 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -189,7 +189,7 @@ void boot(int biosdev) #if PRELINKED_KERNEL_SUPPORT bool mayUseKernelCache = false; bool flushCaches = false; - bool kernelSpecified = false; + bool kernelSpecified = false; #endif long flags, cachetime; @@ -796,7 +796,7 @@ void boot(int biosdev) #endif // Did we switch to graphics mode yet (think verbose mode)? - if (gVerboseMode || bootArgs->Video.v_display != GRAPHICS_MODE) + if (gVerboseMode || bootArgs->Video_V1.v_display != GRAPHICS_MODE) { // Switch to graphics mode and show the (white) Apple logo on a black/gray background. showBootLogo(); diff --git a/i386/boot2/bootlogo.h b/i386/boot2/bootlogo.h index 00a96b4..342fa85 100755 --- a/i386/boot2/bootlogo.h +++ b/i386/boot2/bootlogo.h @@ -2,7 +2,7 @@ #define APPLE_LOGO_WIDTH 84 #define APPLE_LOGO_HEIGHT 103 -#define VIDEO(x) (bootArgs->Video.v_ ## x) +#define VIDEO(x) (bootArgs->Video_V1.v_ ## x) /* * Used in showBootLogo(). Now using the VIDEO() macro instead of the static diff --git a/i386/boot2/graphics.c b/i386/boot2/graphics.c index 55673ec..4c77f5b 100755 --- a/i386/boot2/graphics.c +++ b/i386/boot2/graphics.c @@ -35,7 +35,7 @@ bool inGraphicsMode(void) { - return (bootArgs->Video.v_display == GRAPHICS_MODE); + return (bootArgs->Video_V1.v_display == GRAPHICS_MODE); } @@ -195,12 +195,12 @@ static int setVESATextMode(unsigned short cols, unsigned short rows, unsigned ch // Update bootArgs with the data provided by the selected VESA mode. - bootArgs->Video.v_display = VGA_TEXT_MODE; - bootArgs->Video.v_width = minfo.XResolution; - bootArgs->Video.v_height = minfo.YResolution; - bootArgs->Video.v_depth = 8; - bootArgs->Video.v_baseAddr = 0xb8000; - bootArgs->Video.v_rowBytes = 0x8000; + bootArgs->Video_V1.v_display = VGA_TEXT_MODE; + bootArgs->Video_V1.v_width = minfo.XResolution; + bootArgs->Video_V1.v_height = minfo.YResolution; + bootArgs->Video_V1.v_depth = 8; + bootArgs->Video_V1.v_baseAddr = 0xb8000; + bootArgs->Video_V1.v_rowBytes = 0x8000; return EFI_SUCCESS; // always return success } @@ -248,12 +248,12 @@ long setVESAGraphicsMode(unsigned short width, unsigned short height, unsigned c } // Update bootArgs with the data provided by the selected VESA mode. - bootArgs->Video.v_display = GRAPHICS_MODE; - bootArgs->Video.v_width = minfo.XResolution; /* Examples: 1920, 1600, 1680 */ - bootArgs->Video.v_height = minfo.YResolution; /* Examples: 1200, 1050 900 */ - bootArgs->Video.v_depth = minfo.BitsPerPixel; /* Examples: 8, 30, 32 */ - bootArgs->Video.v_rowBytes = minfo.BytesPerScanline; /* Examples: 7680, 6720, 6400 */ - bootArgs->Video.v_baseAddr = VBEMakeUInt32(minfo.PhysBasePtr); + bootArgs->Video_V1.v_display = GRAPHICS_MODE; + bootArgs->Video_V1.v_width = minfo.XResolution; /* Examples: 1920, 1600, 1680 */ + bootArgs->Video_V1.v_height = minfo.YResolution; /* Examples: 1200, 1050 900 */ + bootArgs->Video_V1.v_depth = minfo.BitsPerPixel; /* Examples: 8, 30, 32 */ + bootArgs->Video_V1.v_rowBytes = minfo.BytesPerScanline; /* Examples: 7680, 6720, 6400 */ + bootArgs->Video_V1.v_baseAddr = VBEMakeUInt32(minfo.PhysBasePtr); } while (0); @@ -346,7 +346,7 @@ void setVideoMode(int mode) { if ((status = initGraphicsMode()) == EFI_SUCCESS) { - bootArgs->Video.v_display = (gVerboseMode) ? /* 2 */ FB_TEXT_MODE : /* 1 */ GRAPHICS_MODE; + bootArgs->Video_V1.v_display = (gVerboseMode) ? /* 2 */ FB_TEXT_MODE : /* 1 */ GRAPHICS_MODE; } } @@ -356,6 +356,6 @@ void setVideoMode(int mode) params[1] = 25; setVESATextMode(params[0], params[1], 4); - bootArgs->Video.v_display = VGA_TEXT_MODE; + bootArgs->Video_V1.v_display = VGA_TEXT_MODE; } } diff --git a/i386/libsaio/bootstruct.c b/i386/libsaio/bootstruct.c index 902635c..2801ec0 100755 --- a/i386/libsaio/bootstruct.c +++ b/i386/libsaio/bootstruct.c @@ -71,7 +71,7 @@ void initKernelBootConfig(void) } bootInfo->configEnd = bootInfo->config; - bootArgs->Video.v_display = VGA_TEXT_MODE; + bootArgs->Video_V1.v_display = VGA_TEXT_MODE; // What Lion species is screaming here? if ((gPlatform.OSType & LION) == LION) diff --git a/i386/libsaio/bootstruct.h b/i386/libsaio/bootstruct.h index 9b16402..7dfbdce 100755 --- a/i386/libsaio/bootstruct.h +++ b/i386/libsaio/bootstruct.h @@ -25,6 +25,7 @@ * * - Yosemite support added (Pike R. Alpha, June 2014). * - El Capitan support added (Pike R. Alpha, June 2015). + * - Sierra support added (Pike R. Alpha, August 2016). */ #ifndef __BOOTSTRUCT_H @@ -35,6 +36,34 @@ #include "bios.h" #include "platform.h" +/* + * Video information (from boot.h) + */ + +struct Boot_Video_V1 +{ + uint32_t v_baseAddr; // Base address (32-bit) of video memory. + uint32_t v_display; // Display Code (if Applicable. + uint32_t v_rowBytes; // Number of bytes per pixel row. + uint32_t v_width; // Width. + uint32_t v_height; // Height. + uint32_t v_depth; // Pixel Depth. +}; +typedef struct Boot_Video_V1 Boot_Video_V1; + +struct Boot_Video_V2 +{ + uint32_t v_display; // Display Code (if Applicable. + uint32_t v_rowBytes; // Number of bytes per pixel row. + uint32_t v_width; // Width. + uint32_t v_height; // Height. + uint32_t v_depth; // Pixel Depth. + uint32_t v_resv[7]; // Reserved. + uint32_t v_baseAddr; // Base address (64-bit) of video memory. +}; +typedef struct Boot_Video_V2 Boot_Video_V2; + + #if ((MAKE_TARGET_OS & YOSEMITE) == YOSEMITE) // El Capitan and Yosemite #define kDefaultKernel "kernel" #else @@ -192,25 +221,25 @@ enum */ typedef struct PrivateBootInfo { - int convmem; // conventional memory - int extmem; // extended memory + int convmem; // conventional memory + int extmem; // extended memory - char bootFile[128]; // kernel file name + char bootFile[128]; // kernel file name - unsigned long memoryMapCount; - MemoryRange memoryMap[kMemoryMapCountMax]; + unsigned long memoryMapCount; + MemoryRange memoryMap[kMemoryMapCountMax]; - PCI_bus_info_t pciInfo; + PCI_bus_info_t pciInfo; - char * configEnd; // pointer to end of config files - char config[CONFIG_SIZE]; + char * configEnd; // pointer to end of config files + char config[CONFIG_SIZE]; - config_file_t bootConfig; // com.apple.Boot.plist + config_file_t bootConfig; // com.apple.Boot.plist - config_file_t smbiosConfig; // smbios.plist + config_file_t smbiosConfig; // smbios.plist #if RAMDISK_SUPPORT - config_file_t ramdiskConfig; // RAMDisk.plist + config_file_t ramdiskConfig; // RAMDisk.plist #endif } PrivateBootInfo_t; @@ -218,86 +247,93 @@ extern PrivateBootInfo_t *bootInfo; typedef struct boot_args_new { - uint16_t Revision; // Revision of boot_args structure. - uint16_t Version; // Version of boot_args structure. + uint16_t Revision; // Revision of boot_args structure. + uint16_t Version; // Version of boot_args structure. -#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. - uint8_t efiMode; // 32 = 32-bit, 64 = 64-bit. +#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. + uint8_t efiMode; // 32 = 32-bit, 64 = 64-bit. - uint8_t debugMode; // Bit field with behavior changes. + uint8_t debugMode; // Bit field with behavior changes. #if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) - uint16_t flags; + uint16_t flags; #else - uint8_t __reserved1[2]; + uint8_t __reserved1[2]; #endif #endif - char CommandLine[BOOT_LINE_LENGTH]; // Passed in command line. - - uint32_t MemoryMap; // Physical address of memory map. - uint32_t MemoryMapSize; - uint32_t MemoryMapDescriptorSize; - uint32_t MemoryMapDescriptorVersion; + char CommandLine[BOOT_LINE_LENGTH]; // Passed in command line. - Boot_Video Video; // Video Information. - - uint32_t deviceTreeP; // Physical address of flattened device tree. - uint32_t deviceTreeLength; // Length of flattened tree. - - uint32_t kaddr; // Physical address of beginning of kernel text. - uint32_t ksize; // Size of combined kernel text+data+efi. - - uint32_t efiRuntimeServicesPageStart; // Physical address of defragmented runtime pages. - uint32_t efiRuntimeServicesPageCount; + uint32_t MemoryMap; // Physical address of memory map. + uint32_t MemoryMapSize; + uint32_t MemoryMapDescriptorSize; + uint32_t MemoryMapDescriptorVersion; + + Boot_Video_V1 Video_V1; // Video V1 Information. + + uint32_t deviceTreeP; // Physical address of flattened device tree. + uint32_t deviceTreeLength; // Length of flattened tree. -#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. - uint64_t efiRuntimeServicesVirtualPageStart; // Virtual address of defragmented runtime pages. + uint32_t kaddr; // Physical address of beginning of kernel text. + uint32_t ksize; // Size of combined kernel text+data+efi. + + uint32_t efiRuntimeServicesPageStart; // Physical address of defragmented runtime pages. + uint32_t efiRuntimeServicesPageCount; + +#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. + uint64_t efiRuntimeServicesVirtualPageStart; // Virtual address of defragmented runtime pages. #endif - uint32_t efiSystemTable; // Physical address of system table in runtime area. + uint32_t efiSystemTable; // Physical address of system table in runtime area. + +#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. + uint32_t kslide; -#if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. - uint32_t kslide; + uint32_t performanceDataStart; // Physical address of log. + uint32_t performanceDataSize; - uint32_t performanceDataStart; // Physical address of log. - uint32_t performanceDataSize; + uint32_t keyStoreDataStart; // Physical address of key store data. + uint32_t keyStoreDataSize; - uint32_t keyStoreDataStart; // Physical address of key store data. - uint32_t keyStoreDataSize; + uint64_t bootMemStart; // Physical address of interperter boot memory. + uint64_t bootMemSize; - uint64_t bootMemStart; // Physical address of interperter boot memory. - uint64_t bootMemSize; + uint64_t PhysicalMemorySize; + uint64_t FSBFrequency; - uint64_t PhysicalMemorySize; - uint64_t FSBFrequency; + uint64_t pciConfigSpaceBaseAddress; + uint32_t pciConfigSpaceStartBusNumber; + uint32_t pciConfigSpaceEndBusNumber; + +#if ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN) // El Capitan and Sierra. + uint32_t csrActiveConfig; + uint32_t csrCapabilities; + uint32_t boot_SMC_plimit; + uint16_t bootProgressMeterStart; + uint16_t bootProgressMeterEnd; +#endif - uint64_t pciConfigSpaceBaseAddress; - uint32_t pciConfigSpaceStartBusNumber; - uint32_t pciConfigSpaceEndBusNumber; +#if ((MAKE_TARGET_OS & SIERRA) == SIERRA) // Sierra only. + Boot_Video_V2 Video_V2; // Video V2 Information. -#if ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN) - uint32_t csrActiveConfig; - uint32_t csrCapabilities; - uint32_t boot_SMC_plimit; - uint16_t bootProgressMeterStart; - uint16_t bootProgressMeterEnd; - uint32_t __reserved4[726]; + uint32_t __reserved4[712]; +#elif ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN) + uint32_t __reserved4[726]; #elif ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) - uint32_t __reserved4[730]; + uint32_t __reserved4[730]; #else - uint32_t __reserved4[734]; + uint32_t __reserved4[734]; #endif #else - uint8_t efiMode; // 32 = 32-bit, 64 = 64-bit. + uint8_t efiMode; // 32 = 32-bit, 64 = 64-bit. - uint8_t __reserved1[3]; - uint32_t __reserved2[3]; + uint8_t __reserved1[3]; + uint32_t __reserved2[3]; - uint64_t efiRuntimeServicesVirtualPageStart; // Virtual address of defragmented runtime pages. + uint64_t efiRuntimeServicesVirtualPageStart; // Virtual address of defragmented runtime pages. - uint32_t __reserved3[2]; + uint32_t __reserved3[2]; #endif // #if ((MAKE_TARGET_OS & LION) == LION) } kernel_boot_args; diff --git a/i386/libsaio/console.c b/i386/libsaio/console.c index 0d5db5d..ded983b 100755 --- a/i386/libsaio/console.c +++ b/i386/libsaio/console.c @@ -118,7 +118,7 @@ int printf(const char * fmt, ...) va_list ap; va_start(ap, fmt); - if (bootArgs->Video.v_display == VGA_TEXT_MODE) + if (bootArgs->Video_V1.v_display == VGA_TEXT_MODE) { prf(fmt, ap, putchar, 0); } @@ -139,7 +139,7 @@ int verbose(const char * fmt, ...) { va_start(ap, fmt); - if (bootArgs->Video.v_display == VGA_TEXT_MODE) + if (bootArgs->Video_V1.v_display == VGA_TEXT_MODE) { prf(fmt, ap, putchar, 0); } @@ -159,7 +159,7 @@ int error(const char * fmt, ...) gErrors = true; va_start(ap, fmt); - if (bootArgs->Video.v_display == VGA_TEXT_MODE) + if (bootArgs->Video_V1.v_display == VGA_TEXT_MODE) { prf(fmt, ap, putchar, 0); } @@ -179,7 +179,7 @@ void stop(const char * fmt, ...) printf("\n"); va_start(ap, fmt); - if (bootArgs->Video.v_display == VGA_TEXT_MODE) + if (bootArgs->Video_V1.v_display == VGA_TEXT_MODE) { prf(fmt, ap, putchar, 0); } diff --git a/i386/libsaio/hfs.c b/i386/libsaio/hfs.c index 3da5ff2..48c6ee4 100755 --- a/i386/libsaio/hfs.c +++ b/i386/libsaio/hfs.c @@ -1075,7 +1075,7 @@ static long ReadBTreeEntry(long btree, void * key, char * entry, long * dirIndex *dirIndex = curNode * nodeSize + index; } - + free(nodeBuf); return 0; diff --git a/i386/libsaio/platform.c b/i386/libsaio/platform.c index 1389c22..77c037a 100644 --- a/i386/libsaio/platform.c +++ b/i386/libsaio/platform.c @@ -242,11 +242,10 @@ void initPlatform(int biosDevice) int ramSize[] = STATIC_RAM_OVERRIDE_SIZES; #endif - int i = 0; int populatedSlotCount = 0; // Loop through the static RAM vendors (might be different). - for (; i < STATIC_RAM_SLOTS; i++) + for (int i = 0; i < STATIC_RAM_SLOTS; i++) { gPlatform.RAM.SlotCount++; diff --git a/i386/libsaio/xml.c b/i386/libsaio/xml.c index 5c528cb..de4e601 100755 --- a/i386/libsaio/xml.c +++ b/i386/libsaio/xml.c @@ -665,7 +665,7 @@ static char * NewSymbol(char * string) } else { - stop ("xml.c"); + stop ("xml.c (symbol == NULL)"); } } From eda92fb18a5f7abec065cc49ac43a8ef65d6738d Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sun, 21 Aug 2016 12:23:13 +0200 Subject: [PATCH 585/623] Fix wrong var size. --- i386/libsaio/bootstruct.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/bootstruct.h b/i386/libsaio/bootstruct.h index 7dfbdce..1c9a419 100755 --- a/i386/libsaio/bootstruct.h +++ b/i386/libsaio/bootstruct.h @@ -59,7 +59,7 @@ struct Boot_Video_V2 uint32_t v_height; // Height. uint32_t v_depth; // Pixel Depth. uint32_t v_resv[7]; // Reserved. - uint32_t v_baseAddr; // Base address (64-bit) of video memory. + uint64_t v_baseAddr; // Base address (64-bit) of video memory. }; typedef struct Boot_Video_V2 Boot_Video_V2; From bc0545eba3c496fbc9e81bd5cce074a114baa770 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sun, 21 Aug 2016 13:51:54 +0200 Subject: [PATCH 586/623] Fix regression from commit 7cf65b3 --- i386/libsaio/xml.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/i386/libsaio/xml.c b/i386/libsaio/xml.c index de4e601..98061d4 100755 --- a/i386/libsaio/xml.c +++ b/i386/libsaio/xml.c @@ -22,8 +22,9 @@ * @APPLE_LICENSE_HEADER_END@ * * Updates: - * - Cleanups, white space and layout changes (PikerAlpha, November 2012) - * - New/improved kXMLTagData support (PikerAlpha, November 2012) + * - Cleanups, white space and layout changes (Pike R. Alpha, November 2012) + * - New/improved kXMLTagData support (Pike R. Alpha, November 2012) + * - Cleanups and regression in function NewSymbol fixed (Pike R. Alpha, August 2016) * */ @@ -659,15 +660,18 @@ static char * NewSymbol(char * string) // Add the symbol to the list. symbol->next = gSymbolsHead; gSymbolsHead = symbol; - - // Update the refCount. - symbol->refCount++; } else { stop ("xml.c (symbol == NULL)"); } } + + if (symbol) + { + // Update the refCount. + symbol->refCount++; + } // Return the string return symbol->string; From 9cd39b7772a29bc685bd9d162cfe0bf703ab9321 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <PikeRAlpha@yahoo.com> Date: Sun, 21 Aug 2016 13:52:56 +0200 Subject: [PATCH 587/623] Check size of the boot_args structures. --- i386/libsaio/bootstruct.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/i386/libsaio/bootstruct.c b/i386/libsaio/bootstruct.c index 2801ec0..f7773f4 100755 --- a/i386/libsaio/bootstruct.c +++ b/i386/libsaio/bootstruct.c @@ -41,6 +41,11 @@ void initKernelBootConfig(void) bootArgs = (kernel_boot_args *)malloc(sizeof(kernel_boot_args)); bootInfo = (PrivateBootInfo_t *)malloc(sizeof(PrivateBootInfo_t)); + if (sizeof(kernel_boot_args) != sizeof(boot_args)) + { + stop("Size of kernel_boot_args != boot_args\n"); + } + if (bootArgs == 0 || bootInfo == 0) { stop("Couldn't allocate boot info\n"); From d4f4354f4d4c8b07ea7f365ae1bda27390e6545c Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@bryans-iMac-on-M2.local> Date: Fri, 28 Oct 2016 02:37:14 +0200 Subject: [PATCH 588/623] New MacBook Pro SMBIOS data. --- i386/libsaio/platform.h | 4 +++- i386/libsaio/smbios/model_data.h | 20 +++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 3ae3531..9c540b3 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -111,7 +111,9 @@ #define MACBOOK_PRO_114 (MACBOOK_PRO | (12 << 15)) #define MACBOOK_PRO_115 (MACBOOK_PRO | (13 << 15)) #define MACBOOK_PRO_121 (MACBOOK_PRO | (14 << 15)) -#define MACBOOK_PRO_131 MACBOOK_PRO // Defaults to MacBookPro13,1 +#define MACBOOK_PRO_131 (MACBOOK_PRO | (15 << 15)) +#define MACBOOK_PRO_132 (MACBOOK_PRO | (16 << 15)) +#define MACBOOK_PRO_133 MACBOOK_PRO // Defaults to MacBookPro13,3 #define MACMINI_41 (MACMINI | (1 << 15)) #define MACMINI_51 (MACMINI | (2 << 15)) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 34f170e..feff835 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -357,12 +357,30 @@ #define SMB_PRODUCT_NAME "MacBookPro11,5" #define SMB_BOARD_PRODUCT "Mac-06F11F11946D27C5" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '1', ',', '5' } - #else // Defaults to MacBookPro12,1 + #elif (TARGET_MODEL == MACBOOK_PRO_121) // Intel Core i5-5257U @ 2.70 GHz - 2 cores / 4 threads. #define SMB_BIOS_VERSION "MBP121.88Z.0167.B16.1602111810" #define SMB_PRODUCT_NAME "MacBookPro12,1" #define SMB_BOARD_PRODUCT "Mac-E43C1C25D4880AD6" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '2', ',', '1' } + #elif (TARGET_MODEL == MACBOOK_PRO_131) + // Intel Core... + #define SMB_BIOS_VERSION "MBP131.88Z.0205.B02.1610121536" + #define SMB_PRODUCT_NAME "MacBookPro13,1" + #define SMB_BOARD_PRODUCT "Mac-473D31EABEB93F9B" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '3', ',', '1' } + #elif (TARGET_MODEL == MACBOOK_PRO_132) + // Intel Core... + #define SMB_BIOS_VERSION "MBP132.88Z.0223.B00.1610201042" + #define SMB_PRODUCT_NAME "MacBookPro13,2" + #define SMB_BOARD_PRODUCT "Mac-66E35819EE2D0D05" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '3', ',', '2' } + #else // Defaults to MacBookPro13,3 + // Intel Core i7-6... + #define SMB_BIOS_VERSION "MBP133.88Z.0223.B00.1610201042" + #define SMB_PRODUCT_NAME "MacBookPro13,3" + #define SMB_BOARD_PRODUCT "Mac-A5C67F76ED83108C" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '3', ',', '3' } #endif // ------------------------------------------------------------------------------------- #endif From 84d3f425b75ae7534346cae6d449c306ffa4670a Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@bryans-iMac-on-M2.local> Date: Sat, 29 Oct 2016 10:26:38 +0200 Subject: [PATCH 589/623] Comments only change. --- i386/libsaio/smbios/model_data.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index feff835..e16fd66 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -364,19 +364,27 @@ #define SMB_BOARD_PRODUCT "Mac-E43C1C25D4880AD6" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '2', ',', '1' } #elif (TARGET_MODEL == MACBOOK_PRO_131) - // Intel Core... + // 13-inch without Touch Bar / Touch ID + // Intel Core i5-6360U 2.0 GHz (max Turbo Boost 3.1 GHz) + // Intel Core i7-6660U 2.4 GHz (max Turbo Boost 3.4 GHz) #define SMB_BIOS_VERSION "MBP131.88Z.0205.B02.1610121536" #define SMB_PRODUCT_NAME "MacBookPro13,1" #define SMB_BOARD_PRODUCT "Mac-473D31EABEB93F9B" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '3', ',', '1' } #elif (TARGET_MODEL == MACBOOK_PRO_132) - // Intel Core... + // 13-inch with Touch Bar / Touch ID + // Intel Core i5-6267U 2.9 GHz (max Turbo Boost 3.3 GHz) + // Intel Core i5-6287U 3.1 GHz (max Turbo Boost 3.5 GHz) + // Intel Core i7-6567U 3.3 GHz (max Turbo Boost 3.6 GHz) #define SMB_BIOS_VERSION "MBP132.88Z.0223.B00.1610201042" #define SMB_PRODUCT_NAME "MacBookPro13,2" #define SMB_BOARD_PRODUCT "Mac-66E35819EE2D0D05" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '3', ',', '2' } #else // Defaults to MacBookPro13,3 - // Intel Core i7-6... + // 15-inch with Touch Bar / Touch ID + // Intel Core i7-6700HQ 2.6 GHz (max Turbo Boost 3.5 GHz) + // Intel Core i7-6820HQ 2.7 GHz (max Turbo Boost 3.6 GHz) + // Intel Core i7-6920HQ 2.9 GHz (max Turbo Boost 3.8 GHz) #define SMB_BIOS_VERSION "MBP133.88Z.0223.B00.1610201042" #define SMB_PRODUCT_NAME "MacBookPro13,3" #define SMB_BOARD_PRODUCT "Mac-A5C67F76ED83108C" From e67da6d867fa7bc7ae38b838d3f617c9f575d0dc Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@bryans-iMac-on-M2.local> Date: Sun, 30 Oct 2016 14:14:57 +0100 Subject: [PATCH 590/623] Updating firmware version info. --- i386/libsaio/smbios/model_data.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index e16fd66..1776cc0 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -121,14 +121,14 @@ // Intel Core i5-4690 @ 3.50 GHz - 4 cores / 4 threads // Intel Core i7-4790K @ 4.00 GHz - 4 cores / 8 threads // AMD Radeon R9 M290X, AMD Radeon R9 M295X - #define SMB_BIOS_VERSION "IM151.88Z.0207.B06.1602221600" + #define SMB_BIOS_VERSION "IM151.88Z.0207.B07.1607221823" #define SMB_PRODUCT_NAME "iMac15,1" #define SMB_BOARD_PRODUCT "Mac-42FD25EABCABB274" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '5', ',', '1' } #elif (TARGET_MODEL == IMAC_152) // Retina 5K, 27-inch, Mid 2015 // Intel Core i5-4590 @ 3.30 GHz - 4 cores / 4 threads // AMD Radeon R9 M290 - #define SMB_BIOS_VERSION "IM151.88Z.0207.B06.1602221600" + #define SMB_BIOS_VERSION "IM151.88Z.0207.B07.1607221823" #define SMB_PRODUCT_NAME "iMac15,2" #define SMB_BOARD_PRODUCT "Mac-FA842E06C61E91C5" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '5', ',', '2' } @@ -144,14 +144,14 @@ // Intel Core i5-5675R @ 3.10 GHz - 4 cores / 4 threads // Intel Core i7-5775R @ 3.30 GHz - 4 cores / 8 threads // Intel Iris Pro Graphics 6200 - #define SMB_BIOS_VERSION "IM162.88Z.0206.B00.1508281353" + #define SMB_BIOS_VERSION "IM162.88Z.0206.B01.1607221823" #define SMB_PRODUCT_NAME "iMac16,2" #define SMB_BOARD_PRODUCT "Mac-FFE5EF870D7BA81A" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '6', ',', '2' } #else // Defaults to iMac17,1 (Retina 5K, 27-inch, Late 2015) // Intel Core i5-6500 @ 3.20 GHz - 4 cores / 4 threads // AMD Radeon R9 M380 - #define SMB_BIOS_VERSION "IM171.88Z.0105.B08.1604111319" + #define SMB_BIOS_VERSION "IM171.88Z.0105.B09.1607221343" #define SMB_PRODUCT_NAME "iMac17,1" #define SMB_BOARD_PRODUCT "Mac-65CE76090165799A" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '7', ',', '1' } @@ -188,7 +188,7 @@ // Intel Core M-5Y31 @ 1.10 GHz (2 cores, 4 threads) // Intel Core M-5Y51 @ 1.20 GHz (2 cores, 4 threads) // Intel Core M-5Y71 @ 1.30 GHz (2 cores, 4 threads) - #define SMB_BIOS_VERSION "MB81.88Z.0164.B13.1602161331" + #define SMB_BIOS_VERSION "MB81.88Z.0164.B18.1608121416" #define SMB_PRODUCT_NAME "MacBook8,1" #define SMB_BOARD_PRODUCT "Mac-BE0E8AC46FE800CC" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', '8', ',', '1' } @@ -464,7 +464,7 @@ #define SMB_BOARD_PRODUCT "Mac-F221BEC8" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '5', ',', '1' } #else // Defaults to MacPro6,1 - #define SMB_BIOS_VERSION "MP61.88Z.0116.B17.1602221600" + #define SMB_BIOS_VERSION "MP61.88Z.0116.B20.1610051057" #define SMB_PRODUCT_NAME "MacPro6,1" #define SMB_BOARD_PRODUCT "Mac-F60DEB81FF30ACF6" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'P', 'r', 'o', '6', ',', '1' } From e11b0a7c01f4c25f571301914279492c890ca57c Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@bryans-iMac-on-M2.local> Date: Fri, 17 Feb 2017 10:16:35 +0100 Subject: [PATCH 591/623] Comment only changes. --- i386/libsaio/bootstruct.h | 18 ++++++++++-------- i386/libsaio/cpu/Intel/dynamic_data.h | 12 ++++++------ i386/libsaio/platform.c | 6 +++--- i386/libsaio/smbios/model_data.h | 6 +++--- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/i386/libsaio/bootstruct.h b/i386/libsaio/bootstruct.h index 1c9a419..e39998d 100755 --- a/i386/libsaio/bootstruct.h +++ b/i386/libsaio/bootstruct.h @@ -43,7 +43,7 @@ struct Boot_Video_V1 { uint32_t v_baseAddr; // Base address (32-bit) of video memory. - uint32_t v_display; // Display Code (if Applicable. + uint32_t v_display; // Display Code (if Applicable). uint32_t v_rowBytes; // Number of bytes per pixel row. uint32_t v_width; // Width. uint32_t v_height; // Height. @@ -53,7 +53,7 @@ typedef struct Boot_Video_V1 Boot_Video_V1; struct Boot_Video_V2 { - uint32_t v_display; // Display Code (if Applicable. + uint32_t v_display; // Display Code (if Applicable). uint32_t v_rowBytes; // Number of bytes per pixel row. uint32_t v_width; // Width. uint32_t v_height; // Height. @@ -72,15 +72,15 @@ typedef struct Boot_Video_V2 Boot_Video_V2; // Bitfields for boot_args->flags #ifndef kBootArgsFlagRebootOnPanic - #define kBootArgsFlagRebootOnPanic (1 << 0) + #define kBootArgsFlagRebootOnPanic (1 << 0) // 1 #endif #ifndef kBootArgsFlagHiDPI - #define kBootArgsFlagHiDPI (1 << 1) + #define kBootArgsFlagHiDPI (1 << 1) // 2 #endif #ifndef kBootArgsFlagBlack - #define kBootArgsFlagBlack (1 << 2) + #define kBootArgsFlagBlack (1 << 2) // 4 (Boot without the white progressbar) #endif #ifndef kBootArgsFlagCSRActiveConfig @@ -121,6 +121,7 @@ typedef struct Boot_Video_V2 Boot_Video_V2; #define CSR_ALLOW_UNRESTRICTED_DTRACE (1 << 5) // 32 #define CSR_ALLOW_UNRESTRICTED_NVRAM (1 << 6) // 64 #define CSR_ALLOW_DEVICE_CONFIGURATION (1 << 7) // 128 + #define CSR_ALLOW_ANY_RECOVERY_OS (1 << 8) // 256 #define CSR_VALID_FLAGS (CSR_ALLOW_UNTRUSTED_KEXTS | \ CSR_ALLOW_UNRESTRICTED_FS | \ @@ -129,7 +130,8 @@ typedef struct Boot_Video_V2 Boot_Video_V2; CSR_ALLOW_APPLE_INTERNAL | \ CSR_ALLOW_UNRESTRICTED_DTRACE | \ CSR_ALLOW_UNRESTRICTED_NVRAM | \ - CSR_ALLOW_DEVICE_CONFIGURATION) + CSR_ALLOW_DEVICE_CONFIGURATION | \ + CSR_ALLOW_ANY_RECOVERY_OS) #endif /* CSR capabilities that a booter can give to the system */ @@ -269,7 +271,7 @@ typedef struct boot_args_new uint32_t MemoryMapDescriptorSize; uint32_t MemoryMapDescriptorVersion; - Boot_Video_V1 Video_V1; // Video V1 Information. + Boot_Video_V1 Video_V1; // Video V1 Information (for backward compatibility). uint32_t deviceTreeP; // Physical address of flattened device tree. uint32_t deviceTreeLength; // Length of flattened tree. @@ -314,7 +316,7 @@ typedef struct boot_args_new #endif #if ((MAKE_TARGET_OS & SIERRA) == SIERRA) // Sierra only. - Boot_Video_V2 Video_V2; // Video V2 Information. + Boot_Video_V2 Video_V2; // Video V2 Information (with a 64-bit v_baseAddr). uint32_t __reserved4[712]; #elif ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN) diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index 3485e43..005ffb8 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -40,14 +40,14 @@ static uint64_t getTSCFrequency(void) if (getCachedCPUID(LEAF_0, eax) > 0x14) // Intel Skylake Processors. { #if DEBUG_CPU - printf("LEAF_15[eax]: 0x%x\n", getCachedCPUID(LEAF_15, eax)); // 0x02 (numerator is always 2) - printf("LEAF_15[ebx]: 0x%x\n", getCachedCPUID(LEAF_15, ebx)); // 0x11c (denominator i.e. 284 = 3.4GHz and 334 = 4GHz) - printf("LEAF_15[ecx]: 0x%x\n", getCachedCPUID(LEAF_15, ecx)); // 0x00 (frequency = Intel reserved) + printf("LEAF_15[eax]: 0x%x\n", getCachedCPUID(LEAF_15, eax)); // 0x02 (numerator is always 2) + printf("LEAF_15[ebx]: 0x%x\n", getCachedCPUID(LEAF_15, ebx)); // 0x11c (denominator i.e. 284 = 3.4GHz and 334 = 4GHz) + printf("LEAF_15[ecx]: 0x%x\n", getCachedCPUID(LEAF_15, ecx)); // 0x00 (frequency = Intel reserved) printf("LEAF_15[edx]: 0x%x\n", getCachedCPUID(LEAF_15, edx)); // 0x00 - printf("LEAF_16[eax]: 0x%x\n", getCachedCPUID(LEAF_16, eax)); // 0xd48 (clock speed i.e. 3408MHz for the i7-6700) - printf("LEAF_16[ebx]: 0x%x\n", getCachedCPUID(LEAF_16, ebx)); // 0xfa0 (maximum turbo clock speed i.e. 4GHz for the i7-6700) - printf("LEAF_16[ecx]: 0x%x\n", getCachedCPUID(LEAF_16, ecx)); // 0x64 (bus speed i.e. 100MHz) + printf("LEAF_16[eax]: 0x%x\n", getCachedCPUID(LEAF_16, eax)); // 0xd48 (clock speed i.e. 3408MHz for the i7-6700) + printf("LEAF_16[ebx]: 0x%x\n", getCachedCPUID(LEAF_16, ebx)); // 0xfa0 (maximum turbo clock speed i.e. 4GHz for the i7-6700) + printf("LEAF_16[ecx]: 0x%x\n", getCachedCPUID(LEAF_16, ecx)); // 0x64 (bus speed i.e. 100MHz) printf("LEAF_16[edx]: 0x%x\n", getCachedCPUID(LEAF_16, edx)); // 0x00 #endif // diff --git a/i386/libsaio/platform.c b/i386/libsaio/platform.c index 77c037a..c6b4f42 100644 --- a/i386/libsaio/platform.c +++ b/i386/libsaio/platform.c @@ -4,9 +4,9 @@ * * Updates: * - * - STATIC_SMBIOS_MODEL_ID renamed to SMB_PRODUCT_NAME (PikerAlpha, October 2012). - * - Yosemite support added (PikerAlpha, June 2014). - * - Replaced hard-coded OS version control with a flexible one (PikerAlpha, June 2014). + * - STATIC_SMBIOS_MODEL_ID renamed to SMB_PRODUCT_NAME (Pike R. Alpha, October 2012). + * - Yosemite support added (Pike R. Alpha, June 2014). + * - Replaced hard-coded OS version control with a flexible one (Pike R. Alpha, June 2014). * */ diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 1776cc0..802d8f3 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -382,9 +382,9 @@ #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '3', ',', '2' } #else // Defaults to MacBookPro13,3 // 15-inch with Touch Bar / Touch ID - // Intel Core i7-6700HQ 2.6 GHz (max Turbo Boost 3.5 GHz) - // Intel Core i7-6820HQ 2.7 GHz (max Turbo Boost 3.6 GHz) - // Intel Core i7-6920HQ 2.9 GHz (max Turbo Boost 3.8 GHz) + // Intel Core i7-6700HQ 2.6 GHz (max Turbo Boost 3.5 GHz) 45W + // Intel Core i7-6820HQ 2.7 GHz (max Turbo Boost 3.6 GHz) 45W + // Intel Core i7-6920HQ 2.9 GHz (max Turbo Boost 3.8 GHz) 45W #define SMB_BIOS_VERSION "MBP133.88Z.0223.B00.1610201042" #define SMB_PRODUCT_NAME "MacBookPro13,3" #define SMB_BOARD_PRODUCT "Mac-A5C67F76ED83108C" From 4c74f7794987b3630fe89aee9445b9a829347760 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@bryans-iMac-on-M2.local> Date: Fri, 17 Feb 2017 10:17:31 +0100 Subject: [PATCH 592/623] Adding forgotten macOS support. --- i386/libsaio/stringTable.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/stringTable.c b/i386/libsaio/stringTable.c index 2558523..1575848 100755 --- a/i386/libsaio/stringTable.c +++ b/i386/libsaio/stringTable.c @@ -380,6 +380,7 @@ long loadCABootPlist(void) #endif #if INSTALL_ESD_SUPPORT + "macOS Install Data", "OS X Install Data", ".IABootFiles", "Mac OS X Install Data", @@ -403,7 +404,7 @@ long loadCABootPlist(void) int len = (sizeof(dirspec) / sizeof(dirspec[0])); #if INSTALL_ESD_SUPPORT int start = 0; - int end = 3; + int end = 4; #if RECOVERY_HD_SUPPORT start++; end++; From 05ff1ff680bea384da6203e935885b3a430e7adb Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@bryans-iMac-on-M2.local> Date: Fri, 17 Feb 2017 10:18:25 +0100 Subject: [PATCH 593/623] Use correct format for booter properties. --- i386/libsaio/efi.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/efi.c b/i386/libsaio/efi.c index 970def0..4b83600 100755 --- a/i386/libsaio/efi.c +++ b/i386/libsaio/efi.c @@ -98,6 +98,8 @@ void initEFITree(void) // Satisfying AppleACPIPlatform.kext static EFI_UINT8 const DEVICE_PATHS_SUPPORTED[] = { 0x01, 0x00, 0x00, 0x00 }; + DT__AddProperty(platformNode, "device-colors", sizeof(DEVICE_PATHS_SUPPORTED), (EFI_UINT8*) &DEVICE_PATHS_SUPPORTED); + DT__AddProperty(platformNode, "DevicePathsSupported", sizeof(DEVICE_PATHS_SUPPORTED), (EFI_UINT8*) &DEVICE_PATHS_SUPPORTED); // The use of sizeof() here is mandatory (to prevent breakage). @@ -265,9 +267,27 @@ void initEFITree(void) DT__AddProperty(chosenNode, "random-seed", sizeof(seedBufferAlternative), (EFI_UINT8*) &seedBufferAlternative); } - DT__AddProperty(chosenNode, "booter-name", 12, "bootbase.efi"); - DT__AddProperty(chosenNode, "booter-version", 11, "version:307"); - DT__AddProperty(chosenNode, "booter-build-time", 28, "Fri Sep 4 15:34:00 PDT 2015"); + static EFI_UINT8 const booterName[] = + { + 0x62, 0x6f, 0x6f, 0x74, 0x2e, 0x65, 0x66, 0x69, 0x00 + }; + + DT__AddProperty(chosenNode, "booter-name", sizeof(booterName), (EFI_UINT8*) &booterName); + + static EFI_UINT8 const booterVersion[] = + { + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x33, 0x32, 0x34, 0x2e, 0x33, 0x30, 0x2e, 0x32, 0x00 + }; + + DT__AddProperty(chosenNode, "booter-version", sizeof(booterVersion), (EFI_UINT8*) &booterVersion); + + static EFI_UINT8 const booterBuildTime[] = + { + 0x54, 0x68, 0x75, 0x20, 0x4E, 0x6F, 0x76, 0x20, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3A, 0x34, 0x33, 0x3A, + 0x32, 0x38, 0x20, 0x50, 0x53, 0x54, 0x20, 0x32, 0x30, 0x31, 0x36, 0x00 + }; + + DT__AddProperty(chosenNode, "booter-build-time", sizeof(booterBuildTime), (EFI_UINT8*) &booterBuildTime); #endif #if ((MAKE_TARGET_OS & LION) == LION) // El Capitan, Yosemite, Mavericks and Mountain Lion also have bit 1 set like Lion. From 8b44d51e4ee5a1accd2ffa8e75916a632c096b1c Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@bryans-iMac-on-M2.local> Date: Fri, 17 Feb 2017 10:20:55 +0100 Subject: [PATCH 594/623] Make debug data more visible. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – Wait 1 second after displaying a row of bytes. --- i386/libsaio/vbe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/i386/libsaio/vbe.c b/i386/libsaio/vbe.c index 1285e6a..8797c3b 100755 --- a/i386/libsaio/vbe.c +++ b/i386/libsaio/vbe.c @@ -146,10 +146,9 @@ unsigned long getResolutionFromEDID(void) { r = 0; printf("\n"); + sleep(1); } - sleep(1); - if (data[126] == 0) { targetBlock = 0; From 63fdb6570b334bdb2100c973ce75147de0ed62b6 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@bryans-iMac-on-M2.local> Date: Fri, 17 Feb 2017 10:21:16 +0100 Subject: [PATCH 595/623] Adding back a removed function. --- i386/libsaio/biosfn.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/i386/libsaio/biosfn.c b/i386/libsaio/biosfn.c index 61f09c5..3da65e9 100755 --- a/i386/libsaio/biosfn.c +++ b/i386/libsaio/biosfn.c @@ -644,3 +644,14 @@ void delay(int ms) bb.edx.rr = ms & 0xFFFF; bios(&bb); } + + +//============================================================================== + +void setCursorType(int type) +{ + bb.intno = 0x10; + bb.eax.r.h = 0x01; + bb.ecx.rr = type; + bios(&bb); +} From 558d315bd7652e2a0e61cb93cb7ba2bd0ed32d4e Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@bryans-iMac-on-M2.local> Date: Wed, 29 Mar 2017 12:02:11 +0200 Subject: [PATCH 596/623] Fix path names --- i386/libsaio/cpu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/cpu.c b/i386/libsaio/cpu.c index dff29ff..0fb5cd8 100644 --- a/i386/libsaio/cpu.c +++ b/i386/libsaio/cpu.c @@ -263,17 +263,17 @@ void checkFlexRatioMSR(void) #if USE_STATIC_CPU_DATA #if CPU_VENDOR_ID == CPU_VENDOR_INTEL - #include "cpu/intel/static_data.h" + #include "cpu/Intel/static_data.h" #else - #include "cpu/amd/static_data.h" + #include "cpu/AMD/static_data.h" #endif #else #if CPU_VENDOR_ID == CPU_VENDOR_INTEL - #include "cpu/intel/dynamic_data.h" + #include "cpu/Intel/dynamic_data.h" #else - #include "cpu/amd/dynamic_data.h" + #include "cpu/AMD/dynamic_data.h" #endif #endif From b1261e836c6103f0a5e6e8a18f6fc0fb2e8b9c11 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@bryans-iMac-on-M2.local> Date: Wed, 29 Mar 2017 12:46:15 +0200 Subject: [PATCH 597/623] Support for macOS 10.13 added (preliminary) --- Makefile | 22 ++++++++++++++++------ i386/libsaio/platform.h | 5 +++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 230ee11..ea146b3 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ # - Changed default from Mavericks to Yosemite (Pike R. Alpha, June 2014). # - El Capitan support added (Pike R. Alpha, June 2015). # - Sierra support added (Pike R. Alpha, June 2016). +# - macOS 10.13 support added (Pike R. Alpha, March 2017). # # @@ -50,25 +51,34 @@ EXCLUDE = --exclude=.DS_Store --exclude=sym --exclude=obj --exclude=*.sh VPATH = $(OBJROOT):$(SYMROOT) +OS_TYPE = "OS\ X" + # # Check if OS build target is specified (example: make mountain-lion). # ifeq ($(MAKECMDGOALS),) # - # No OS build target given. Build for Sierra (default). + # No OS build target given. Build for CodeName (default). # - MAKEGOAL = sierra - MAKE_TARGET_OS = 126; - MAKE_TARGET_OS_VER = 10.12 + MAKEGOAL = codename + MAKE_TARGET_OS = 254; + MAKE_TARGET_OS_VER = 10.13 + OS_TYPE = "macOS" else # # Setting MAKE_TARGET_OS and MAKEGOAL based on OS build target. # - ifeq ($(MAKECMDGOALS), sierra) + ifeq ($(MAKECMDGOALS), codename) + MAKEGOAL = codename + MAKE_TARGET_OS = 254; + MAKE_TARGET_OS_VER = 10.13 + OS_TYPE = "macOS" + else ifeq ($(MAKECMDGOALS), sierra) MAKEGOAL = sierra MAKE_TARGET_OS = 126; MAKE_TARGET_OS_VER = 10.12 + OS_TYPE = "macOS" else ifeq ($(MAKECMDGOALS), el-capitan) MAKEGOAL = el-capitan MAKE_TARGET_OS = 62; @@ -201,7 +211,7 @@ $(MAKEGOAL): # # normal make goal # - @printf "\nCompiling RevoBoot, setup for a $(MODEL) running OS X $(MAKE_TARGET_OS_VER) ($@)\n" >&2; + @printf "\nCompiling RevoBoot, setup for a $(MODEL) running $(OS_TYPE) $(MAKE_TARGET_OS_VER) ($@)\n" >&2; @if [ ! -f $(CONFIG_DIR)/$(MAKE_ACPI_DATA_FILE) ]; then \ echo "\t[CP] $(CONFIG_DIR)/ACPI/data-template.h $(CONFIG_DIR)/$(MAKE_ACPI_DATA_FILE)"; \ diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 9c540b3..ffd6c66 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -33,6 +33,7 @@ #define YOSEMITE 26 // Yosemite (includes Lion and Mavericks changes). #define EL_CAPITAN 62 // El Capitan (includes Lion/Mavericks and Yosemite changes). #define SIERRA 126 // Sierra (includes Lion/Mavericks/Yosemite and El Capitan changes). +#define CODENAME 254 // CodeName (includes Lion/Mavericks/Yosemite/El Capitan and Sierra changes). //------------------------------------------------------------------------------ @@ -81,6 +82,7 @@ #define IMAC_152 (IMAC | (12 << 15)) #define IMAC_161 (IMAC | (13 << 15)) #define IMAC_162 (IMAC | (14 << 15)) +#define IMAC_181 (IMAC | (15 << 15)) #define IMAC_171 IMAC // Defaults to iMac17,1 #define MACBOOK_41 (MACBOOK | ( 1 << 15)) @@ -121,13 +123,16 @@ #define MACMINI_53 (MACMINI | (4 << 15)) #define MACMINI_61 (MACMINI | (5 << 15)) #define MACMINI_62 (MACMINI | (6 << 15)) +#define MACMINI_81 (MACMINI | (7 << 15)) #define MACMINI_71 MACMINI // Defaults to Macmini7,1 #define MACPRO_31 (MACPRO | (1 << 15)) #define MACPRO_41 (MACPRO | (2 << 15)) #define MACPRO_51 (MACPRO | (3 << 15)) +#define MACPRO_71 (MACPRO | (4 << 15)) #define MACPRO_61 MACPRO // Defaults to MacPro6,1 + #if ((TARGET_MODEL & MACPRO) == MACPRO) #define PM_PROFILE_OVERRIDE 3 #else From afc40cd271c6344ed2ba25561785f0f46234ffac Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@bryans-iMac-on-M2.local> Date: Wed, 29 Mar 2017 12:48:51 +0200 Subject: [PATCH 598/623] Cleanups --- i386/libsaio/bootstruct.c | 15 +++++++------- i386/libsaio/load.c | 2 +- i386/libsaio/patcher.c | 42 +++++++++++++++++++++++++++++---------- 3 files changed, 40 insertions(+), 19 deletions(-) diff --git a/i386/libsaio/bootstruct.c b/i386/libsaio/bootstruct.c index f7773f4..8f15e4f 100755 --- a/i386/libsaio/bootstruct.c +++ b/i386/libsaio/bootstruct.c @@ -43,7 +43,7 @@ void initKernelBootConfig(void) if (sizeof(kernel_boot_args) != sizeof(boot_args)) { - stop("Size of kernel_boot_args != boot_args\n"); + printf("Warning: sizeof(%d != %d)\n", sizeof(kernel_boot_args), sizeof(boot_args)); } if (bootArgs == 0 || bootInfo == 0) @@ -62,9 +62,7 @@ void initKernelBootConfig(void) // Get system memory map. Also update the size of the // conventional/extended memory for backwards compatibility. - bootInfo->memoryMapCount = getMemoryMap(bootInfo->memoryMap, kMemoryMapCountMax, - (unsigned long *) &bootInfo->convmem, - (unsigned long *) &bootInfo->extmem); + bootInfo->memoryMapCount = getMemoryMap(bootInfo->memoryMap, kMemoryMapCountMax, (unsigned long *) &bootInfo->convmem, (unsigned long *) &bootInfo->extmem); if (bootInfo->memoryMapCount == 0) { @@ -76,8 +74,10 @@ void initKernelBootConfig(void) } bootInfo->configEnd = bootInfo->config; - bootArgs->Video_V1.v_display = VGA_TEXT_MODE; + bootArgs->Video_V1.v_display = VGA_TEXT_MODE; + // bootArgs->Video_V2.v_display = VGA_TEXT_MODE; + // What Lion species is screaming here? if ((gPlatform.OSType & LION) == LION) { @@ -122,7 +122,7 @@ void initKernelBootConfig(void) #endif #if BLACKMODE - bootArgs->flags |= kBootArgsFlagBlackTheme; // (kBootArgsFlagBlack + kBootArgsFlagBlackTheme); + bootArgs->flags |= kBootArgsFlagBlackTheme; #endif #endif // #if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) @@ -135,8 +135,9 @@ void initKernelBootConfig(void) bootArgs->csrCapabilities = CSR_CAPABILITY_UNLIMITED; bootArgs->boot_SMC_plimit = 0; + bootArgs->bootProgressMeterStart = 0; - bootArgs->bootProgressMeterEnd = 1024; + bootArgs->bootProgressMeterEnd = 0; // 1024; /* enum { diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index 4c0f76e..9f8a579 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -241,7 +241,7 @@ long decodeMachO(void *fileLoadBuffer, entry_t *rentry, char **raddr, int *rsize case LC_SYMTAB: initKernelVersionInfo(loadAddress, cmdBase, listSize, textSegmentAddress); -#if (PATCH_KERNEL && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) +#if ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN) patchKernel(loadAddress, cmdBase, listSize, textSegmentAddress, vldSegmentAddress); #endif break; diff --git a/i386/libsaio/patcher.c b/i386/libsaio/patcher.c index 9779427..81d8396 100755 --- a/i386/libsaio/patcher.c +++ b/i386/libsaio/patcher.c @@ -23,7 +23,16 @@ #include "platform.h" -#if (PATCH_KERNEL && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) +#ifndef PATCH_CPUID_SET_INFO + #define PATCH_CPUID_SET_INFO -1 +#endif + +#ifndef PATCH_XCPM_BOOTSTRAP + #define PATCH_XCPM_BOOTSTRAP -1 +#endif + + +#if (PATCH_KERNEL_XCPM && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) //============================================================================== // Called from patchKernel() @@ -66,17 +75,18 @@ void disableMSRs(unsigned char * aPointer, uint8_t aNumberOfTargetMSRs) aPointer += 0x30; } } +#endif + - //============================================================================== // Called from decodeMachO() long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize, unsigned long textSegmentAddress, unsigned long vldSegmentAddress) { -#if DEBUG_KERNEL_PATCHER - printf("patchKernel() called\n"); - sleep(1); -#endif + #if DEBUG_KERNEL_PATCHER + printf("patchKernel(%d/%d/%d) called\n", PRELINKED_KERNEL_SUPPORT, PATCH_CPUID_SET_INFO, PATCH_XCPM_BOOTSTRAP); + sleep(1); + #endif char * symbolName = NULL; unsigned char * p = NULL; @@ -93,7 +103,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize struct symtab_command * symtab = (struct symtab_command *)cmdBase; struct segment_command_64 * textSegment = (struct segment_command_64 *)textSegmentAddress; #if PRELINKED_KERNEL_SUPPORT - struct segment_command_64 * vldSegment = (struct segment_command_64 *)vldSegmentAddress; + // struct segment_command_64 * vldSegment = (struct segment_command_64 *)vldSegmentAddress; targetSections |= 25; #endif @@ -107,6 +117,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize uint64_t startAddress = 0; uint64_t endAddress = 0; +#if (PATCH_KERNEL_XCPM && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) uint8_t cpuid_set_info_ModelCorrection = 0; uint8_t xcpm_bootstrap_ModelCorrection = 0; @@ -145,11 +156,15 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize targetPatches += 4; xcpm_bootstrap_ModelCorrection = -8; break; + + default: + return 0; } #else targetPatches += 4; xcpm_bootstrap_ModelCorrection = PATCH_XCPM_BOOTSTRAP; #endif + // // Is MSR(0xE2) locked (bit-15 set)? // @@ -167,6 +182,8 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize // targetPatches += 80; } +#endif // #if (PATCH_KERNEL_XCPM && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) + // // Main while loop. // @@ -174,7 +191,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize { struct nlist_64 * nl = (struct nlist_64 *)pointer; - if (nl->n_sect == 1 && nl->n_value && (targetSections & nl->n_sect)) // __TEXT,__text + if (nl->n_sect == 1 && nl->n_value && (targetSections & nl->n_sect)) // __TEXT,__text { symbolName = (char *)stringTable + nl->n_un.n_strx; @@ -205,6 +222,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize } } } +#if (PATCH_KERNEL_XCPM && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) else if ((targetPatches & 2) && strcmp(symbolName, "_cpuid_set_info") == 0) { offset = (nl->n_value - textSegment->vmaddr); @@ -289,6 +307,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize } } } +#endif // #if (PATCH_KERNEL_XCPM && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) // // Are we done patching for this section? // @@ -300,10 +319,11 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize targetSections -= nl->n_sect; } } - else if (nl->n_sect == 8 && nl->n_value && (targetSections & nl->n_sect)) // __DATA,__data + else if (nl->n_sect == 8 && nl->n_value && (targetSections & nl->n_sect)) // __DATA,__data { symbolName = (char *)stringTable + nl->n_un.n_strx; +#if (PATCH_KERNEL_XCPM && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) if ((targetPatches & 16) && strcmp(symbolName, "_xcpm_SMT_scope_msrs") == 0) { // @@ -359,6 +379,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize targetPatches -= 64; } +#endif // #if (PATCH_KERNEL_XCPM && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) // // Are we done patching for this section? // @@ -371,7 +392,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize } } #if PRELINKED_KERNEL_SUPPORT - else if (nl->n_sect == 25 && nl->n_value && (targetSections & nl->n_sect)) // __KLD,__text + else if (nl->n_sect == 25 && nl->n_value && (targetSections & nl->n_sect)) // __KLD,__text { symbolName = (char *)stringTable + nl->n_un.n_strx; @@ -409,4 +430,3 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize return 0; } -#endif From ad75fe3167ebe0a8c33081ff1b9ccc9402b9e468 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@Bryans-iMac.local> Date: Tue, 6 Jun 2017 23:51:06 +0200 Subject: [PATCH 599/623] Data for new iMac18,x and MacBookPro14,x --- i386/libsaio/smbios/model_data.h | 81 +++++++++++++++++++++----------- 1 file changed, 54 insertions(+), 27 deletions(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 802d8f3..924a84b 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -16,13 +16,14 @@ * - Dynamic and static SMBIOS data gathering added by DHP in 2010. * - Complete rewrite / overhaul by DHP in Februari 2011. * - Coding style changes by DHP in Februari 2011. - * - Model data stripped and simplified (PikerAlpha, October 2012). - * - EFI/SMBIOS data logic moved to preprocessor code (PikerAlpha, October 2012). - * - SMB_PRODUCT_NAME renamed/moved over from settings.h (PikerAlpha, October 2012). - * - EFI_MODEL_NAME renamed/moved over from settings.h (PikerAlpha, October 2012). - * - Data for new MacBookPro and Macmini added (PikerAlpha, October 2012). - * - Data for iMac13,2 and MacBookPro9,2 added (PikerAlpha, October 2013). - * - Typo in SMB_BOARD_PRODUCT for iMac12,n fixed (PikerAlpha, April 2013). + * - Model data stripped and simplified (Pike R. Alpha, October 2012). + * - EFI/SMBIOS data logic moved to preprocessor code (Pike R. Alpha, October 2012). + * - SMB_PRODUCT_NAME renamed/moved over from settings.h (Pike R. Alpha, October 2012). + * - EFI_MODEL_NAME renamed/moved over from settings.h (Pike R. Alpha, October 2012). + * - Data for new MacBookPro and Macmini added (Pike R. Alpha, October 2012). + * - Data for iMac13,2 and MacBookPro9,2 added (Pike R. Alpha, October 2013). + * - Typo in SMB_BOARD_PRODUCT for iMac12,n fixed (Pike R. Alpha, April 2013). + * - Data for new iMac18,x and MacBookPro14,x added (Pike R. Alpha, June 2017). * * Credits: * - blackosx, DB1, dgsga, FKA, humph, scrax and STLVNUB (testers). @@ -148,28 +149,28 @@ #define SMB_PRODUCT_NAME "iMac16,2" #define SMB_BOARD_PRODUCT "Mac-FFE5EF870D7BA81A" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '6', ',', '2' } - #else // Defaults to iMac17,1 (Retina 5K, 27-inch, Late 2015) + #elif (TARGET_MODEL == IMAC_171) // (Retina 5K, 27-inch, Late 2015) // Intel Core i5-6500 @ 3.20 GHz - 4 cores / 4 threads // AMD Radeon R9 M380 #define SMB_BIOS_VERSION "IM171.88Z.0105.B09.1607221343" #define SMB_PRODUCT_NAME "iMac17,1" #define SMB_BOARD_PRODUCT "Mac-65CE76090165799A" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '7', ',', '1' } - /* #elif (TARGET_MODEL == IMAC_171) // Retina 5K, 27-inch, Late 2015 - // Intel Core i5-6500 @ 3.20 GHz - 4 cores / 4 threads - // AMD Radeon R9 M390 - #define SMB_BIOS_VERSION "IM171.88Z.0105.B08.1604111319" - #define SMB_PRODUCT_NAME "iMac17,1" - #define SMB_BOARD_PRODUCT "Mac-DB15BD556843C820" - #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '7', ',', '1' } - #elif (TARGET_MODEL == IMAC_171) // Retina 5K, 27-inch, Late 2015 - // Intel Core i5-6600 @ 3.30 GHz - 4 cores / 4 threads - // Intel Core i7-6700K @ 4.00 GHz - 4 cores / 8 threads - // AMD Radeon R9 M395 & AMD Radeon R9 M395X - #define SMB_BIOS_VERSION "IM171.88Z.0105.B08.1604111319" - #define SMB_PRODUCT_NAME "iMac17,1" - #define SMB_BOARD_PRODUCT "Mac-B809C3757DA9BB8D" - #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '7', ',', '1' } */ + #elif (TARGET_MODEL == IMAC_181) // Retina 5K, 27-inch, 2017 + #define SMB_BIOS_VERSION "IM181.88Z.0145.B07.1705082121" + #define SMB_PRODUCT_NAME "iMac18,1" + #define SMB_BOARD_PRODUCT "Mac-4B682C642B45593E" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '8', ',', '1' } + #elif (TARGET_MODEL == IMAC_182) // Retina 5K, 27-inch, 2017 + #define SMB_BIOS_VERSION "IM182.88Z.0145.B07.1705082121" + #define SMB_PRODUCT_NAME "iMac18,2" + #define SMB_BOARD_PRODUCT "Mac-77F17D7DA9285301" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '8', ',', '2' } + #else // Defaults to iMac18,3 Retina 5K, 27-inch, 2017 + #define SMB_BIOS_VERSION "IM183.88Z.0145.B07.1705082121" + #define SMB_PRODUCT_NAME "iMac18,3" + #define SMB_BOARD_PRODUCT "Mac-BE088AF8C5EB4FA2" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '8', ',', '3' } #endif // ------------------------------------------------------------------------------------- #endif @@ -380,15 +381,41 @@ #define SMB_PRODUCT_NAME "MacBookPro13,2" #define SMB_BOARD_PRODUCT "Mac-66E35819EE2D0D05" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '3', ',', '2' } - #else // Defaults to MacBookPro13,3 + #elif (TARGET_MODEL == MACBOOK_PRO_133) // 15-inch with Touch Bar / Touch ID - // Intel Core i7-6700HQ 2.6 GHz (max Turbo Boost 3.5 GHz) 45W - // Intel Core i7-6820HQ 2.7 GHz (max Turbo Boost 3.6 GHz) 45W - // Intel Core i7-6920HQ 2.9 GHz (max Turbo Boost 3.8 GHz) 45W + // Intel Core i7-6700HQ 2.6 GHz (max Turbo Boost 3.5 GHz) + // Intel Core i7-6820HQ 2.7 GHz (max Turbo Boost 3.6 GHz) + // Intel Core i7-6920HQ 2.9 GHz (max Turbo Boost 3.8 GHz) #define SMB_BIOS_VERSION "MBP133.88Z.0223.B00.1610201042" #define SMB_PRODUCT_NAME "MacBookPro13,3" #define SMB_BOARD_PRODUCT "Mac-A5C67F76ED83108C" #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '3', ',', '3' } + #elif (TARGET_MODEL == MACBOOK_PRO_141) + // 13-inch without Touch Bar / Touch ID + // Intel Core i5-7360U 2.3 GHz (max Turbo Boost 3.6 GHz) + // Intel Core i7-7660U 2.5 GHz (max Turbo Boost 4.0 GHz) + #define SMB_BIOS_VERSION "MBP141.88Z.0160.B00.1705082121" + #define SMB_PRODUCT_NAME "MacBookPro14,1" + #define SMB_BOARD_PRODUCT "Mac-B4831CEBD52A0C4C" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '4', ',', '1' } + #elif (TARGET_MODEL == MACBOOK_PRO_142) + // 13-inch with Touch Bar / Touch ID + // Intel Core i5-7267U 3.1 GHz (max Turbo Boost 3.5 GHz) + // Intel Core i5-7287U 3.3 GHz (max Turbo Boost 3.7 GHz) + // Intel Core i7-7567U 3.5 GHz (max Turbo Boost 4.0 GHz) + #define SMB_BIOS_VERSION "MBP142.88Z.0160.B00.1705082121" + #define SMB_PRODUCT_NAME "MacBookPro14,2" + #define SMB_BOARD_PRODUCT "Mac-CAD6701F7CEA0921 " + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '4', ',', '2' } + #else // Defaults to MacBookPro14,3 + // 15-inch with Touch Bar / Touch ID + // Intel Core i7-7700HQ 2.8 GHz (max Turbo Boost 3.8 GHz) + // Intel Core i7-7820HQ 2.9 GHz (max Turbo Boost 3.9 GHz) + // Intel Core i7-7920HQ 3.1 GHz (max Turbo Boost 4.1 GHz) + #define SMB_BIOS_VERSION "MBP143.88Z.0160.B00.1705090111" + #define SMB_PRODUCT_NAME "MacBookPro14,3" + #define SMB_BOARD_PRODUCT "Mac-551B86E5744E2388" + #define EFI_MODEL_NAME { 'M', 'a', 'c', 'B', 'o', 'o', 'k', 'P', 'r', 'o', '1', '4', ',', '3' } #endif // ------------------------------------------------------------------------------------- #endif From ffa14604924c287196cfc122f85d0b8ca93ba48e Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@Bryans-iMac.local> Date: Tue, 6 Jun 2017 23:59:40 +0200 Subject: [PATCH 600/623] Update macOS name --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ea146b3..b8905d2 100644 --- a/Makefile +++ b/Makefile @@ -59,9 +59,9 @@ OS_TYPE = "OS\ X" ifeq ($(MAKECMDGOALS),) # - # No OS build target given. Build for CodeName (default). + # No OS build target given. Build for High Sierra (default). # - MAKEGOAL = codename + MAKEGOAL = high-sierra MAKE_TARGET_OS = 254; MAKE_TARGET_OS_VER = 10.13 OS_TYPE = "macOS" @@ -69,8 +69,8 @@ else # # Setting MAKE_TARGET_OS and MAKEGOAL based on OS build target. # - ifeq ($(MAKECMDGOALS), codename) - MAKEGOAL = codename + ifeq ($(MAKECMDGOALS), high-sierra) + MAKEGOAL = high-sierra MAKE_TARGET_OS = 254; MAKE_TARGET_OS_VER = 10.13 OS_TYPE = "macOS" From 3fc3c668ebfe390c0f68efed73b1acef1558d202 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@Bryans-iMac.local> Date: Wed, 7 Jun 2017 00:00:40 +0200 Subject: [PATCH 601/623] Fix macOS name and add new model data --- i386/libsaio/platform.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index ffd6c66..76257e2 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -33,7 +33,7 @@ #define YOSEMITE 26 // Yosemite (includes Lion and Mavericks changes). #define EL_CAPITAN 62 // El Capitan (includes Lion/Mavericks and Yosemite changes). #define SIERRA 126 // Sierra (includes Lion/Mavericks/Yosemite and El Capitan changes). -#define CODENAME 254 // CodeName (includes Lion/Mavericks/Yosemite/El Capitan and Sierra changes). +#define HIGH_SIERRA 254 // High Sierra (includes Lion/Mavericks/Yosemite/El Capitan and Sierra changes). //------------------------------------------------------------------------------ @@ -82,8 +82,10 @@ #define IMAC_152 (IMAC | (12 << 15)) #define IMAC_161 (IMAC | (13 << 15)) #define IMAC_162 (IMAC | (14 << 15)) -#define IMAC_181 (IMAC | (15 << 15)) -#define IMAC_171 IMAC // Defaults to iMac17,1 +#define IMAC_171 (IMAC | (15 << 15)) +#define IMAC_181 (IMAC | (16 << 15)) +#define IMAC_182 (IMAC | (17 << 15)) +#define IMAC_183 IMAC // Defaults to iMac18,3 #define MACBOOK_41 (MACBOOK | ( 1 << 15)) #define MACBOOK_81 (MACBOOK | ( 2 << 15)) @@ -115,7 +117,10 @@ #define MACBOOK_PRO_121 (MACBOOK_PRO | (14 << 15)) #define MACBOOK_PRO_131 (MACBOOK_PRO | (15 << 15)) #define MACBOOK_PRO_132 (MACBOOK_PRO | (16 << 15)) -#define MACBOOK_PRO_133 MACBOOK_PRO // Defaults to MacBookPro13,3 +#define MACBOOK_PRO_133 (MACBOOK_PRO | (17 << 15)) +#define MACBOOK_PRO_141 (MACBOOK_PRO | (18 << 15)) +#define MACBOOK_PRO_142 (MACBOOK_PRO | (19 << 15)) +#define MACBOOK_PRO_143 MACBOOK_PRO // Defaults to MacBookPro14,3 #define MACMINI_41 (MACMINI | (1 << 15)) #define MACMINI_51 (MACMINI | (2 << 15)) From 0ae4d48ce402089f2c847bde702ff5092d3629c3 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@Bryans-iMac.local> Date: Tue, 13 Jun 2017 14:00:22 +0200 Subject: [PATCH 602/623] High Sierra installer fix. --- i386/libsaio/stringTable.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/stringTable.c b/i386/libsaio/stringTable.c index 1575848..1d9ca20 100755 --- a/i386/libsaio/stringTable.c +++ b/i386/libsaio/stringTable.c @@ -380,7 +380,11 @@ long loadCABootPlist(void) #endif #if INSTALL_ESD_SUPPORT + #if ((MAKE_TARGET_OS & HIGH_SIERRA) == HIGH_SIERRA) + "macOS Install Data/Locked Files/Boot Files", + #else "macOS Install Data", + #endif "OS X Install Data", ".IABootFiles", "Mac OS X Install Data", @@ -435,7 +439,7 @@ long loadCABootPlist(void) if (retValue == EFI_SUCCESS) { #if INSTALL_ESD_SUPPORT - if (i > start && i < end) + if (i >= start && i < end) { // Installation data directory located gPlatform.BootVolume->flags = kBVFlagInstallVolume; From 6162c15f5d59036881e227bd61553734a4e07fcd Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@Bryans-iMac.local> Date: Tue, 13 Jun 2017 14:00:46 +0200 Subject: [PATCH 603/623] Add missing script. --- c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/c b/c index 1928ec4..c55419b 100755 --- a/c +++ b/c @@ -1,3 +1,58 @@ -sudo cp sym/i386/boot /Volumes/$1/ -sudo diskutil unmount /Volumes/$1 +#!/bin/sh +# +# Bash script executed from: RevoBoot/i386/boot2/Makefile +# +# +# Version 1.1 - Copyright (c) 2013-2017 by Pike R. Alpha +# +# Updates: +# - v1.1 Improved output (Pike R. Alpha, June 2017). +# + +let index=0 + +# +# Collect available volume name. +# +targetVolumes=($(ls /Volumes | sort)) + +echo "\nAvailable target volumes:\n" + +for volume in "${targetVolumes[@]}" +do + echo "[$index] $volume" + let index++ +done + +echo "" + +# +# Ask to select a target volume. +# +read -p "Select a target volume for the boot file: " volumeNumber + +# +# Verify selection. +# +if [ $volumeNumber -gt $index ]; + then + printf "\nError: Invalid Option ($volumeNumber)!\nAborting ...\n" + exit 0 + else + echo "Copying RevoBoot/sym/i386/boot to: /Volumes/${targetVolumes[$volumeNumber]}/" + sudo cp ../../sym/i386/boot "/Volumes/${targetVolumes[$volumeNumber]}/" + # + # Compare files. + # + cmp -s ../../sym/i386/boot /Volumes/${targetVolumes[$volumeNumber]}/boot + # + # Check status (zero is ok). + # + if [[ $? -ne 0 ]]; + then + echo "Error: Copying boot file failed!" + else + echo "Done!" + fi +fi From 14809f77ef59f8f1217bb38e40d65dc15618f357 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@Bryans-iMac.local> Date: Tue, 13 Jun 2017 14:01:34 +0200 Subject: [PATCH 604/623] Call copy script from Makefile. --- i386/boot2/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/i386/boot2/Makefile b/i386/boot2/Makefile index 4e12262..6d11e76 100644 --- a/i386/boot2/Makefile +++ b/i386/boot2/Makefile @@ -84,6 +84,8 @@ boot: $(OBJS) exit 1;\ else \ echo "=========== boot is $$size bytes ============"; \ - fi) + fi) \ + + @../../c include ../MakeInc.dir From 6545cc2d8561aedfb8d89d028bc2195f07071614 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@Bryans-iMac.local> Date: Tue, 13 Jun 2017 14:02:26 +0200 Subject: [PATCH 605/623] Adding a forgotten update. --- i386/libsaio/smbios/smbios.h | 1 + 1 file changed, 1 insertion(+) diff --git a/i386/libsaio/smbios/smbios.h b/i386/libsaio/smbios/smbios.h index 3ff3953..c28c1b0 100755 --- a/i386/libsaio/smbios/smbios.h +++ b/i386/libsaio/smbios/smbios.h @@ -110,6 +110,7 @@ enum { kSMBTypeOemProcessorType = 131, kSMBTypeOemProcessorBusSpeed = 132, kSMBTypeOemPlatformFeature = 133, + kSMBTypeOemSMCVersion = 134, // Structures dropped by RevoBoot. kSMBUnused = 255 From 2535cf254897a6957b8bfec6794a4023d0a228ea Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@Bryans-iMac.local> Date: Tue, 13 Jun 2017 14:03:03 +0200 Subject: [PATCH 606/623] More SMBIOS data updates. --- i386/libsaio/smbios/model_data.h | 41 +++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 924a84b..708737d 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -39,7 +39,7 @@ // Intel Core i5-750 @ 2.66 GHz - 4 cores / 4 threads // Intel Core i7-860 @ 2.80 GHz - 4 cores / 8 threads // ATI Radeon HD 4850 - #define SMB_BIOS_VERSION "IM111.88Z.0034.B04.1509231906" + #define SMB_BIOS_VERSION "IM111.88Z.0034.B12.1705021416" #define SMB_PRODUCT_NAME "iMac11,1" #define SMB_BOARD_PRODUCT "Mac-F2268DAE" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '1', ',', '1' } @@ -49,7 +49,7 @@ // Intel Core i5-2500S @ 2.70 GHz - 4 cores / 4 threads // Intel Core i7-2600S @ 2.80 GHz - 4 cores / 8 threads // AMD Radeon HD 6750M & AMD Radeon HD 6770M - #define SMB_BIOS_VERSION "IM121.88Z.0047.B23.1510261412" + #define SMB_BIOS_VERSION "IM121.88Z.0047.B33.1705101231" #define SMB_PRODUCT_NAME "iMac12,1" #define SMB_BOARD_PRODUCT "Mac-942B5BF58194151B" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '1' } @@ -58,7 +58,7 @@ // Intel Core i5-2500S @ 2.70 GHz - 4 cores / 4 threads // Intel Core i7-2600 @ 3.40 GHz - 4 cores / 8 threads // AMD Radeon HD 6770M & AMD Radeon HD 6970M - #define SMB_BIOS_VERSION "IM121.88Z.0047.B23.1510261412" + #define SMB_BIOS_VERSION "IM121.88Z.0047.B33.1705101231" #define SMB_PRODUCT_NAME "iMac12,2" #define SMB_BOARD_PRODUCT "Mac-942B59F58194171B" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '2', ',', '2' } @@ -67,7 +67,7 @@ // Intel Core i5-3470S @ 2.90 GHz - 4 cores / 4 threads // Intel Core i7-3770S @ 3.10 GHz - 4 cores / 8 threads // NVIDIA GeForce GT 640M & NVIDIA GeForce GT 650M - #define SMB_BIOS_VERSION "IM131.88Z.010A.B09.1509111558" + #define SMB_BIOS_VERSION "IM131.88Z.010A.B1C.1705011311" #define SMB_PRODUCT_NAME "iMac13,1" #define SMB_BOARD_PRODUCT "Mac-00BE6ED71E35EB86" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '1' } @@ -76,21 +76,21 @@ // Intel Core i5-3470 @ 3.2 GHz - 4 cores / 4 threads // Intel Core i7-3770 @ 3.4 GHz - 4 cores / 8 threads // NVIDIA GeForce GTX 660M, NVIDIA GeForce GTX 675MX & NVIDIA GeForce GTX 680MX - #define SMB_BIOS_VERSION "IM131.88Z.010A.B09.1509111558" + #define SMB_BIOS_VERSION "IM131.88Z.010A.B1C.1705011311" #define SMB_PRODUCT_NAME "iMac13,2" #define SMB_BOARD_PRODUCT "Mac-FC02E91DDD3FA6A4" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '2' } #elif (TARGET_MODEL == IMAC_133) // 21.5-inch, Early 2013 (Education) // Intel Core i3-3225 @ 3.30 GHz - 2 cores / 4 threads // Intel HD Graphics 4000 - #define SMB_BIOS_VERSION "IM131.88Z.010A.B09.1509111558" + #define SMB_BIOS_VERSION "IM131.88Z.010A.B1C.1705011311" #define SMB_PRODUCT_NAME "iMac13,3" #define SMB_BOARD_PRODUCT "Mac-7DF2A3B5E5D671ED" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '3', ',', '3' } #elif (TARGET_MODEL == IMAC_141) // 21.5-inch, Late 2013 // Intel Core i5-4570R @ 2.70 GHz - 4 cores / 4 threads // Intel Iris Pro Graphics 5200 - #define SMB_BIOS_VERSION "IM141.88Z.0118.B13.1602221714" + #define SMB_BIOS_VERSION "IM141.88Z.0118.B46.1705011412" #define SMB_PRODUCT_NAME "iMac14,1" #define SMB_BOARD_PRODUCT "Mac-031B6874CF7F642A" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '1' } @@ -99,7 +99,7 @@ // Intel Core i5-4670 @ 3.40 GHz - 4 cores / 4 threads // Intel Core i7-4771 @ 3.50 GHz - 4 cores / 8 threads // NVIDIA GeForce GT 755M, NVIDIA GeForce GTX 775M & NVIDIA GeForce GTX 780M - #define SMB_BIOS_VERSION "IM142.88Z.0118.B13.1602221716" + #define SMB_BIOS_VERSION "IM142.88Z.0118.B46.1705011513" #define SMB_PRODUCT_NAME "iMac14,2" #define SMB_BOARD_PRODUCT "Mac-27ADBB7B4CEE8E61" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '2' } @@ -114,7 +114,7 @@ #elif (TARGET_MODEL == IMAC_144) // 21.5-inch, Mid 2014 // Intel Core i5-4260U @ 1.40 GHz - 2 cores / 4 threads // Intel HD Graphics 5000 - #define SMB_BIOS_VERSION "IM144.88Z.0179.B13.1602221719" + #define SMB_BIOS_VERSION "IM144.88Z.0179.B30.1705011718" #define SMB_PRODUCT_NAME "iMac14,4" #define SMB_BOARD_PRODUCT "Mac-81E3E92DD6088272" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '4', ',', '4' } @@ -122,21 +122,21 @@ // Intel Core i5-4690 @ 3.50 GHz - 4 cores / 4 threads // Intel Core i7-4790K @ 4.00 GHz - 4 cores / 8 threads // AMD Radeon R9 M290X, AMD Radeon R9 M295X - #define SMB_BIOS_VERSION "IM151.88Z.0207.B07.1607221823" + #define SMB_BIOS_VERSION "IM151.88Z.0207.B26.1705011718" #define SMB_PRODUCT_NAME "iMac15,1" #define SMB_BOARD_PRODUCT "Mac-42FD25EABCABB274" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '5', ',', '1' } #elif (TARGET_MODEL == IMAC_152) // Retina 5K, 27-inch, Mid 2015 // Intel Core i5-4590 @ 3.30 GHz - 4 cores / 4 threads // AMD Radeon R9 M290 - #define SMB_BIOS_VERSION "IM151.88Z.0207.B07.1607221823" + #define SMB_BIOS_VERSION "IM151.88Z.0207.B26.1705011718" #define SMB_PRODUCT_NAME "iMac15,2" #define SMB_BOARD_PRODUCT "Mac-FA842E06C61E91C5" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '5', ',', '2' } #elif (TARGET_MODEL == IMAC_161) // 21.5-inch, Late 2015 // Intel Core i5-5250U @ 1.60 GHz - 2 cores / 4 threads // Intel HD Graphics 6000 - #define SMB_BIOS_VERSION "IM161.88Z.0207.B03.1602181033" + #define SMB_BIOS_VERSION "IM161.88Z.0207.B19.1705011046" #define SMB_PRODUCT_NAME "iMac16,1" #define SMB_BOARD_PRODUCT "Mac-A369DDC4E67F1C45" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '6', ',', '1' } @@ -145,14 +145,14 @@ // Intel Core i5-5675R @ 3.10 GHz - 4 cores / 4 threads // Intel Core i7-5775R @ 3.30 GHz - 4 cores / 8 threads // Intel Iris Pro Graphics 6200 - #define SMB_BIOS_VERSION "IM162.88Z.0206.B01.1607221823" + #define SMB_BIOS_VERSION "IM162.88Z.0206.B19.1705011413" #define SMB_PRODUCT_NAME "iMac16,2" #define SMB_BOARD_PRODUCT "Mac-FFE5EF870D7BA81A" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '6', ',', '2' } #elif (TARGET_MODEL == IMAC_171) // (Retina 5K, 27-inch, Late 2015) // Intel Core i5-6500 @ 3.20 GHz - 4 cores / 4 threads // AMD Radeon R9 M380 - #define SMB_BIOS_VERSION "IM171.88Z.0105.B09.1607221343" + #define SMB_BIOS_VERSION "IM171.88Z.0105.B25.1704292104" #define SMB_PRODUCT_NAME "iMac17,1" #define SMB_BOARD_PRODUCT "Mac-65CE76090165799A" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '7', ',', '1' } @@ -498,3 +498,16 @@ #endif // ------------------------------------------------------------------------------------- #endif + +#if TARGET_MODEL & IMACPRO // 64 +// ------------------------------------------------------------------------------------- + #define SMB_FAMILY "iMacPro" + + #if (TARGET_MODEL == IMACPRO_10) + #define SMB_BIOS_VERSION "IMP10.88Z.0058.B00.1705091711" + #define SMB_PRODUCT_NAME "iMacPro1,1" + #define SMB_BOARD_PRODUCT "Mac-CF21D135A7D34AA6" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', 'P', 'r', 'o', '1', ',', '0' } + #endif +// ------------------------------------------------------------------------------------- +#endif From 3b8b3492d3ce515ccbef13d513a4bf23345b4a6f Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@Bryans-iMac.local> Date: Tue, 13 Jun 2017 14:03:26 +0200 Subject: [PATCH 607/623] High Sierra compatibility. --- i386/libsaio/bootstruct.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/bootstruct.h b/i386/libsaio/bootstruct.h index e39998d..69623f4 100755 --- a/i386/libsaio/bootstruct.h +++ b/i386/libsaio/bootstruct.h @@ -315,7 +315,14 @@ typedef struct boot_args_new uint16_t bootProgressMeterEnd; #endif -#if ((MAKE_TARGET_OS & SIERRA) == SIERRA) // Sierra only. +#if ((MAKE_TARGET_OS & HIGH_SIERRA) == HIGH_SIERRA) // High Sierra only. + Boot_Video_V2 Video_V2; // Video V2 Information (with a 64-bit v_baseAddr). + + uint32_t apfsDataStart; // Physical address of apfs volume key structure. + uint32_t apfsDataSize; + + uint32_t __reserved4[710]; +#elif ((MAKE_TARGET_OS & SIERRA) == SIERRA) // Sierra only. Boot_Video_V2 Video_V2; // Video V2 Information (with a 64-bit v_baseAddr). uint32_t __reserved4[712]; From 1debc5ea5c21da8102d81a52bfe8d4ae14b3d66b Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@Bryans-iMac.local> Date: Tue, 13 Jun 2017 14:04:37 +0200 Subject: [PATCH 608/623] High Sierra Installer fix. --- i386/libsaio/bootstruct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/bootstruct.c b/i386/libsaio/bootstruct.c index 8f15e4f..5061fbf 100755 --- a/i386/libsaio/bootstruct.c +++ b/i386/libsaio/bootstruct.c @@ -128,11 +128,11 @@ void initKernelBootConfig(void) #endif // #if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) #if ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN) // El Capitan and Sierra - bootArgs->flags |= (kBootArgsFlagCSRConfigMode + kBootArgsFlagCSRBoot); + bootArgs->flags |= (kBootArgsFlagCSRActiveConfig + kBootArgsFlagCSRConfigMode + kBootArgsFlagCSRBoot + kBootArgsFlagInstallUI); bootArgs->csrActiveConfig = CSR_ALLOW_DEVICE_CONFIGURATION; - bootArgs->csrCapabilities = CSR_CAPABILITY_UNLIMITED; + bootArgs->csrCapabilities = CSR_VALID_FLAGS; // CSR_CAPABILITY_UNLIMITED; bootArgs->boot_SMC_plimit = 0; From 35a183bea91ede7929984a3b8145bd00c4cde8da Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@Bryans-iMac.local> Date: Tue, 13 Jun 2017 14:07:03 +0200 Subject: [PATCH 609/623] WIP SMBIOS changes. --- i386/libsaio/smbios/dynamic_data.h | 70 +++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index 3acb01f..b59cb27 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -252,7 +252,7 @@ void setupSMBIOS(void) SMBWord handle = 1; //------------------------------------------------------------------------------ - // Add SMBOemProcessorType structure. + // Add SMBOemProcessorType structure (131) struct SMBStructHeader * newHeader = (struct SMBStructHeader *) newtablesPtr; @@ -269,7 +269,41 @@ void setupSMBIOS(void) newtablesPtr += 8; //------------------------------------------------------------------------------ - // Add SMBOemProcessorBusSpeed structure (when we have something to inject). + // Add SMBFirmwareVolume structure (128). + + newHeader = (struct SMBStructHeader *) newtablesPtr; + + newHeader->type = kSMBTypeFirmwareVolume; + newHeader->length = 6; + newHeader->handle = handle; + + newtablesPtr += 4; + + struct SMBFirmwareVolume * firmwareVolume = (struct SMBFirmwareVolume *) newtablesPtr; + + firmwareVolume->RegionCount = 1; + firmwareVolume->Reserved[0] = 0x00; + firmwareVolume->Reserved[1] = 0x00; + firmwareVolume->Reserved[2] = 0x00; + firmwareVolume->FirmwareFeatures = 0xC003FF37; // getFirmwareFeatures(); + firmwareVolume->FirmwareFeaturesMask = 0xFFFFFFFF; // getFirmwareFeaturesEx(); + firmwareVolume->RegionType[0] = FW_REGION_MAIN; + firmwareVolume->RegionType[1] = FW_REGION_RESERVED; + firmwareVolume->RegionType[2] = FW_REGION_RESERVED; + firmwareVolume->RegionType[3] = FW_REGION_RESERVED; + firmwareVolume->RegionType[4] = FW_REGION_RESERVED; + firmwareVolume->RegionType[5] = FW_REGION_RESERVED; + firmwareVolume->RegionType[6] = FW_REGION_RESERVED; + firmwareVolume->RegionType[7] = FW_REGION_RESERVED; + + // Update EPS + newEPS->dmi.tableLength += sizeof(firmwareVolume); + newEPS->dmi.structureCount++; + + newtablesPtr += sizeof(firmwareVolume); + + //------------------------------------------------------------------------------ + // Add SMBOemProcessorBusSpeed structure (132/when we have something to inject). if (gPlatform.CPU.QPISpeed) { @@ -287,6 +321,38 @@ void setupSMBIOS(void) newtablesPtr += 8; } + + //------------------------------------------------------------------------------ + // Add SMBOemPlatformFeature structure (133). + + newHeader = (struct SMBStructHeader *) newtablesPtr; + + newHeader->type = kSMBTypeOemPlatformFeature; + newHeader->length = 6; + newHeader->handle = ++handle; + + *((uint16_t *)(((char *)newHeader) + 4)) = 0xFFFF; + + // Update EPS + newEPS->dmi.tableLength += 8; + newEPS->dmi.structureCount++; + + newtablesPtr += 8; + + /*------------------------------------------------------------------------------ + // Add SMBOemSMCVersion structure (134). + + newHeader = (struct SMBStructHeader *) newtablesPtr; + + newHeader->type = kSMBTypeOemSMCVersion; + newHeader->length = 6; + newHeader->handle = ++handle; + + // Update EPS + newEPS->dmi.tableLength += 8; + newEPS->dmi.structureCount++; + + newtablesPtr += 8; */ #if (STATIC_RAM_OVERRIDE_ERROR_HANDLE || STATIC_RAM_OVERRIDE_SIZE || STATIC_RAM_OVERRIDE_TYPE || STATIC_RAM_OVERRIDE_FREQUENCY) requiredStructures[17].stop = (sizeof(SMBProperties) / sizeof(SMBProperties[0])) -1; From cf3da97001c8827f7726616c42f76d33724a6b1c Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@Bryans-iMac.local> Date: Wed, 14 Jun 2017 07:14:13 +0200 Subject: [PATCH 610/623] Updating script to v1.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – Fix typo. – Ask to reboot --- c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/c b/c index c55419b..4cb5f46 100755 --- a/c +++ b/c @@ -4,16 +4,17 @@ # Bash script executed from: RevoBoot/i386/boot2/Makefile # # -# Version 1.1 - Copyright (c) 2013-2017 by Pike R. Alpha +# Version 1.2 - Copyright (c) 2013-2017 by Pike R. Alpha # # Updates: # - v1.1 Improved output (Pike R. Alpha, June 2017). -# +# - v1.2 Fix typo (Pike R. Alpha, June 2017). +# - Now also asks if you want to reboot. let index=0 # -# Collect available volume name. +# Collect available volume names. # targetVolumes=($(ls /Volumes | sort)) @@ -53,6 +54,14 @@ if [ $volumeNumber -gt $index ]; then echo "Error: Copying boot file failed!" else - echo "Done!" + echo "" + read -p "Do you want to reboot now (y/n) ?" shouldReboot + + if [ $shouldReboot == "y" ]; + then + sudo reboot now + else + echo "Done!" + fi fi fi From 7c0cd56cfd22d7cda27b0bdf2cb7e8a71282e461 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@Bryans-iMac.local> Date: Wed, 14 Jun 2017 07:15:31 +0200 Subject: [PATCH 611/623] Adding a few new getters --- i386/libsaio/smbios/getters.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/i386/libsaio/smbios/getters.h b/i386/libsaio/smbios/getters.h index 0d6008d..6117fbe 100755 --- a/i386/libsaio/smbios/getters.h +++ b/i386/libsaio/smbios/getters.h @@ -333,7 +333,7 @@ static const char * getBIOSDate(void) const char * retValue = biosDate; - return retValue; // Example: "01/24/2012"; + return "05/01/2017"; // retValue; // Example: "01/24/2012"; } //============================================================================== @@ -367,3 +367,24 @@ static SMBByte getBoardType(void) return 0x0a; #endif } + +//============================================================================== + +static SMBDWord getFirmwareFeatures(void) +{ + return 0xE907F537; +} + +//============================================================================== + +static SMBDWord getFirmwareFeaturesEx(void) +{ + return 0xFFFFFFFF; +} + +//============================================================================== + +static SMBDWord getROMFeatures(void) +{ + return 0xFFFFFFFF; +} From 532e81238307562984da7e2e57194e5d108d3320 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@Bryans-iMac.local> Date: Wed, 14 Jun 2017 07:21:45 +0200 Subject: [PATCH 612/623] Fixed SMBFirmwareVolume and moved some code --- i386/libsaio/smbios/dynamic_data.h | 104 ++++++++++++----------------- 1 file changed, 43 insertions(+), 61 deletions(-) diff --git a/i386/libsaio/smbios/dynamic_data.h b/i386/libsaio/smbios/dynamic_data.h index b59cb27..f607040 100755 --- a/i386/libsaio/smbios/dynamic_data.h +++ b/i386/libsaio/smbios/dynamic_data.h @@ -8,17 +8,18 @@ * - Complete rewrite / overhaul by DHP in Februari 2011. * - More work, including bug fixes by DHP in Februari 2011. * - Do more with cleaner and faster code in less bytes (DHP in March 2012). - * - SMBIOS data logic moved to preprocessor code (PikerAlpha, October 2012). - * - SMBProperties changed for speed and simplicity (PikerAlpha, October 2012). - * - Calls with SMBProperties.keyString cleaned up (PikerAlpha, October 2012). - * - Fixed requiredStructures.start/stop values (PikerAlpha, October 2012). - * - STATIC_SMSERIALNUMBER renamed to SMB_SYSTEM_SERIAL_NUMBER (PikerAlpha, October 2012). - * - Removed some unused experimental code snippets (PikerAlpha, November 2012). - * - Option SET_MAX_STRUCTURE_LENGTH to verify/fix newEPS->maxStructureSize (PikerAlpha, November 2012). - * - Allow DEBUG_SMBIOS = 2 to filter out some of the output (PikerAlpha, November 2012). - * - Pre-compiler directive PROBOARD removed, which is required for iMessage (PikerAlpha, January 2013). - * - SMBStructure.start[2] was 13 but should have been 11 (PikerAlpha, January 2013). - * - Override factory SystemID when (PikerAlpha, January 2013). + * - SMBIOS data logic moved to preprocessor code (Pike R. Alpha, October 2012). + * - SMBProperties changed for speed and simplicity (Pike R. Alpha, October 2012). + * - Calls with SMBProperties.keyString cleaned up (Pike R. Alpha, October 2012). + * - Fixed requiredStructures.start/stop values (Pike R. Alpha, October 2012). + * - STATIC_SMSERIALNUMBER renamed to SMB_SYSTEM_SERIAL_NUMBER (Pike R. Alpha, October 2012). + * - Removed some unused experimental code snippets (Pike R. Alpha, November 2012). + * - Option SET_MAX_STRUCTURE_LENGTH to verify/fix newEPS->maxStructureSize (Pike R. Alpha, November 2012). + * - Allow DEBUG_SMBIOS = 2 to filter out some of the output (Pike R. Alpha, November 2012). + * - Pre-compiler directive PROBOARD removed, which is required for iMessage (Pike R. Alpha, January 2013). + * - SMBStructure.start[2] was 13 but should have been 11 (Pike R. Alpha, January 2013). + * - Override factory SystemID when (Pike R. Alpha, January 2013). + * - Add table type 128 for High Sierra (Pike R. Alpha, June 2017). * * Credits: * - Kabyl (see notes in source code) @@ -271,36 +272,34 @@ void setupSMBIOS(void) //------------------------------------------------------------------------------ // Add SMBFirmwareVolume structure (128). - newHeader = (struct SMBStructHeader *) newtablesPtr; + struct SMBFirmwareVolume * firmwareVolume = (struct SMBFirmwareVolume *) newtablesPtr; - newHeader->type = kSMBTypeFirmwareVolume; - newHeader->length = 6; - newHeader->handle = handle; + bzero(firmwareVolume, sizeof(struct SMBFirmwareVolume)); - newtablesPtr += 4; + firmwareVolume->header.type = kSMBTypeFirmwareVolume; + firmwareVolume->header.length = sizeof(struct SMBFirmwareVolume); + firmwareVolume->header.handle = ++handle; - struct SMBFirmwareVolume * firmwareVolume = (struct SMBFirmwareVolume *) newtablesPtr; - - firmwareVolume->RegionCount = 1; - firmwareVolume->Reserved[0] = 0x00; - firmwareVolume->Reserved[1] = 0x00; - firmwareVolume->Reserved[2] = 0x00; - firmwareVolume->FirmwareFeatures = 0xC003FF37; // getFirmwareFeatures(); - firmwareVolume->FirmwareFeaturesMask = 0xFFFFFFFF; // getFirmwareFeaturesEx(); - firmwareVolume->RegionType[0] = FW_REGION_MAIN; + firmwareVolume->RegionCount = (SMBByte) 1; + firmwareVolume->Reserved[0] = (SMBByte) 0; + firmwareVolume->Reserved[1] = (SMBByte) 0; + firmwareVolume->Reserved[2] = (SMBByte) 0; + firmwareVolume->FirmwareFeatures = getFirmwareFeatures(); + firmwareVolume->FirmwareFeaturesMask = getFirmwareFeaturesEx(); + /* firmwareVolume->RegionType[0] = FW_REGION_MAIN; firmwareVolume->RegionType[1] = FW_REGION_RESERVED; firmwareVolume->RegionType[2] = FW_REGION_RESERVED; firmwareVolume->RegionType[3] = FW_REGION_RESERVED; firmwareVolume->RegionType[4] = FW_REGION_RESERVED; firmwareVolume->RegionType[5] = FW_REGION_RESERVED; firmwareVolume->RegionType[6] = FW_REGION_RESERVED; - firmwareVolume->RegionType[7] = FW_REGION_RESERVED; - + firmwareVolume->RegionType[7] = FW_REGION_RESERVED; */ + // Update EPS - newEPS->dmi.tableLength += sizeof(firmwareVolume); + newEPS->dmi.tableLength += sizeof(struct SMBFirmwareVolume) + 2; newEPS->dmi.structureCount++; - newtablesPtr += sizeof(firmwareVolume); + newtablesPtr += sizeof(struct SMBFirmwareVolume) + 2; //------------------------------------------------------------------------------ // Add SMBOemProcessorBusSpeed structure (132/when we have something to inject). @@ -322,38 +321,6 @@ void setupSMBIOS(void) newtablesPtr += 8; } - //------------------------------------------------------------------------------ - // Add SMBOemPlatformFeature structure (133). - - newHeader = (struct SMBStructHeader *) newtablesPtr; - - newHeader->type = kSMBTypeOemPlatformFeature; - newHeader->length = 6; - newHeader->handle = ++handle; - - *((uint16_t *)(((char *)newHeader) + 4)) = 0xFFFF; - - // Update EPS - newEPS->dmi.tableLength += 8; - newEPS->dmi.structureCount++; - - newtablesPtr += 8; - - /*------------------------------------------------------------------------------ - // Add SMBOemSMCVersion structure (134). - - newHeader = (struct SMBStructHeader *) newtablesPtr; - - newHeader->type = kSMBTypeOemSMCVersion; - newHeader->length = 6; - newHeader->handle = ++handle; - - // Update EPS - newEPS->dmi.tableLength += 8; - newEPS->dmi.structureCount++; - - newtablesPtr += 8; */ - #if (STATIC_RAM_OVERRIDE_ERROR_HANDLE || STATIC_RAM_OVERRIDE_SIZE || STATIC_RAM_OVERRIDE_TYPE || STATIC_RAM_OVERRIDE_FREQUENCY) requiredStructures[17].stop = (sizeof(SMBProperties) / sizeof(SMBProperties[0])) -1; #endif @@ -600,6 +567,21 @@ void setupSMBIOS(void) newtablesPtr += 0x0E; + /*------------------------------------------------------------------------------ + // Add SMBOemSMCVersion structure (134). + + newHeader = (struct SMBStructHeader *) newtablesPtr; + + newHeader->type = kSMBTypeOemSMCVersion; + newHeader->length = 6; + newHeader->handle = ++handle; + + // Update EPS + newEPS->dmi.tableLength += 8; + newEPS->dmi.structureCount++; + + newtablesPtr += 8; */ + //------------------------------------------------------------------------------ // Add EndOfTable structure. From 32b9377762a55266324c597abe1139c8a0d1f354 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@Bryans-iMac.local> Date: Wed, 14 Jun 2017 07:34:14 +0200 Subject: [PATCH 613/623] Quick messy patch for High Sierra --- i386/libsaio/patcher.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/i386/libsaio/patcher.c b/i386/libsaio/patcher.c index 81d8396..7f3692b 100755 --- a/i386/libsaio/patcher.c +++ b/i386/libsaio/patcher.c @@ -105,7 +105,9 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize #if PRELINKED_KERNEL_SUPPORT // struct segment_command_64 * vldSegment = (struct segment_command_64 *)vldSegmentAddress; - targetSections |= 25; + // targetSections |= 25; // El Capitan + // targetSections |= 26; // Sierra + targetSections |= 27; // High Sierra #endif void * stringTable = (void *)(loadAddress + symtab->stroff); @@ -177,10 +179,17 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize } else { +#if PRELINKED_KERNEL_SUPPORT + // + // Yes. Enable patche: _xcpm_SMT_scope_msrs(16), _xcpm_pkg_scope_msrs(64), __ZN12KLDBootstrap21readStartupExtensionsEv(128) + // + targetPatches += 208; +#else // - // No. Enabling a limited patch set. + // No. Enabling a limited patch set: _xcpm_SMT_scope_msrs(16), _xcpm_pkg_scope_msrs(64) // targetPatches += 80; +#endif } #endif // #if (PATCH_KERNEL_XCPM && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) @@ -392,12 +401,14 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize } } #if PRELINKED_KERNEL_SUPPORT - else if (nl->n_sect == 25 && nl->n_value && (targetSections & nl->n_sect)) // __KLD,__text + else if (/* nl->n_sect == 27 && */ nl->n_value /* && (targetSections & nl->n_sect) */) // __KLD,__text { symbolName = (char *)stringTable + nl->n_un.n_strx; - - if ((targetPatches & 128) && strcmp(symbolName, "__ZN12KLDBootstrap21readStartupExtensionsEv") == 0) + + if (/* (targetPatches & 128) && */ strcmp(symbolName, "__ZN12KLDBootstrap21readStartupExtensionsEv") == 0) { + printf("nl->n_sect: %ld\n", nl->n_sect); + int64_t offset = (nl->n_value - textSegment->vmaddr); uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); uint64_t endAddress = (startAddress + 0x3f); @@ -416,7 +427,7 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize // Disable this section. // p = (unsigned char *)endAddress; - targetPatches -= 128; + // targetPatches -= 128; targetSections -= nl->n_sect; } } From 0f15ebe1442d8743d0f67f33a3a0f41f70e779a3 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <chief@Chiefs-iMac.local> Date: Mon, 3 Jul 2017 01:13:41 +0200 Subject: [PATCH 614/623] iMac now defaults to iMac19,1 --- i386/libsaio/platform.h | 3 ++- i386/libsaio/smbios/model_data.h | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/platform.h b/i386/libsaio/platform.h index 76257e2..b66030f 100644 --- a/i386/libsaio/platform.h +++ b/i386/libsaio/platform.h @@ -85,7 +85,8 @@ #define IMAC_171 (IMAC | (15 << 15)) #define IMAC_181 (IMAC | (16 << 15)) #define IMAC_182 (IMAC | (17 << 15)) -#define IMAC_183 IMAC // Defaults to iMac18,3 +#define IMAC_183 (IMAC | (18 << 15)) +#define IMAC_191 IMAC // Defaults to iMac19,1 #define MACBOOK_41 (MACBOOK | ( 1 << 15)) #define MACBOOK_81 (MACBOOK | ( 2 << 15)) diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index 708737d..e7820d1 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -166,11 +166,16 @@ #define SMB_PRODUCT_NAME "iMac18,2" #define SMB_BOARD_PRODUCT "Mac-77F17D7DA9285301" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '8', ',', '2' } - #else // Defaults to iMac18,3 Retina 5K, 27-inch, 2017 + #elif (TARGET_MODEL == IMAC_183) // Defaults to iMac18,3 Retina 5K, 27-inch, 2017 #define SMB_BIOS_VERSION "IM183.88Z.0145.B07.1705082121" #define SMB_PRODUCT_NAME "iMac18,3" #define SMB_BOARD_PRODUCT "Mac-BE088AF8C5EB4FA2" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '8', ',', '3' } + #else // Defaults to iMac19,1 Retina 5K, 27-inch, 2017 + #define SMB_BIOS_VERSION "IM191.88Z.0058.B00.1705091711" + #define SMB_PRODUCT_NAME "iMac19,1" + #define SMB_BOARD_PRODUCT "Mac-CF21D135A7D34AA6" + #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '9', ',', '1' } #endif // ------------------------------------------------------------------------------------- #endif From 52aca1b65129a73b58ca10bbce1417a78b94a166 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <chief@Chiefs-iMac.local> Date: Mon, 3 Jul 2017 01:14:07 +0200 Subject: [PATCH 615/623] More precise search pattern. --- i386/libsaio/patcher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/libsaio/patcher.c b/i386/libsaio/patcher.c index 7f3692b..acbb919 100755 --- a/i386/libsaio/patcher.c +++ b/i386/libsaio/patcher.c @@ -216,7 +216,9 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize { // // Search pattern: 89 C3 48 85 DB 74 71 48 (in HexEdit) + // Search pattern: 89 C3 48 85 DB 74 69 48 8b 03 48 89 df ff 50 28 (in HexEdit for High Sierra DP1) // + // if ((*(uint32_t *)p == 0x8548c389) && (*(uint16_t *)(p + 4) == 0x74db) && (*(uint8_t *)(p + 7) == 0x48) && (*(uint64_t *)(p + 8) == 0x2850ffdf8948038b)) if ((*(uint32_t *)p == 0x8548c389) && (*(uint16_t *)(p + 4) == 0x74db) && (*(uint8_t *)(p + 7) == 0x48)) { DEBUG_PATCH_STATUS(symbolName, ((uint64_t)p - startAddress), 1) @@ -407,8 +409,6 @@ long patchKernel(unsigned long loadAddress, unsigned long cmdBase, long listSize if (/* (targetPatches & 128) && */ strcmp(symbolName, "__ZN12KLDBootstrap21readStartupExtensionsEv") == 0) { - printf("nl->n_sect: %ld\n", nl->n_sect); - int64_t offset = (nl->n_value - textSegment->vmaddr); uint64_t startAddress = (uint64_t)(textSegment->vmaddr + offset); uint64_t endAddress = (startAddress + 0x3f); From 5ed5d5659c46683a8f550b00290264bdc7806d2b Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <chief@Chiefs-iMac.local> Date: Mon, 3 Jul 2017 01:14:21 +0200 Subject: [PATCH 616/623] Fix extensions issue. --- i386/boot2/drivers.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/i386/boot2/drivers.c b/i386/boot2/drivers.c index c760fb4..f904a94 100755 --- a/i386/boot2/drivers.c +++ b/i386/boot2/drivers.c @@ -384,6 +384,7 @@ static int loadKexts(char * targetFolder, bool isPluginRun) // Show essential kexts. if (!isPluginRun && ((strcmp(dirEntryName, "AppleEmulator.kext") == 0) || (strcmp(dirEntryName, "FakeSMC.kext") == 0) || + (strcmp(dirEntryName, "AppleSMC.kext") == 0) || (strcmp(dirEntryName, "IONVMeFamily.kext") == 0))) { printf("loadKext(%s) found\n", dirEntryName); @@ -399,7 +400,7 @@ static int loadKexts(char * targetFolder, bool isPluginRun) { // Setup plug-ins path. sprintf(gPlatform.KextFileSpec, "%s/%sPlugIns", gPlatform.KextFileName, (isBundleType2) ? "Contents/" : ""); - + // #if DEBUG_DRIVERS if (strlen(gPlatform.KextFileSpec) >= MAX_KEXT_PATH_LENGTH) { @@ -808,7 +809,7 @@ static bool isLoadableInSafeBoot(char * OSBundleRequired) static long parseXML(char * buffer, ModulePtr * module, TagPtr * personalities) { long length, pos = 0; - TagPtr moduleDict, required; + TagPtr moduleDict, required, identifier; ModulePtr tmpModule; while (1) @@ -887,8 +888,17 @@ static long parseXML(char * buffer, ModulePtr * module, TagPtr * personalities) // if ((required == 0) || (required->type != kTagTypeString) || !isLoadableInSafeBoot(required->string)) // if ( (required != NULL) && (required->type == kTagTypeString) && !strcmp(required->string, "Safe Boot")) { - XMLFreeTag(moduleDict); - return -2; + identifier = XMLGetProperty(moduleDict, "CFBundleIdentifier"); + + if (strcmp(identifier->string, "com.apple.driver.AppleSMC") == 0) + { + _DRIVERS_DEBUG_DUMP("Forced load of: AppleSMC.kext\n"); + } + else + { + XMLFreeTag(moduleDict); + return -2; + } } // tmpModule = (ModulePtr)malloc(sizeof(Module)); From ee72a32e8f93f9a393c0e3c78f46f6d65b1946d5 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <chief@Chiefs-iMac.local> Date: Mon, 31 Jul 2017 20:19:52 +0200 Subject: [PATCH 617/623] Helper tools --- fdisk440 | Bin 0 -> 89044 bytes i | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100755 fdisk440 create mode 100755 i diff --git a/fdisk440 b/fdisk440 new file mode 100755 index 0000000000000000000000000000000000000000..f2d042f668b23d8d5dbb0ea3b56af152e61ddd19 GIT binary patch literal 89044 zcmeFa4R}=5wFZ1b0t^tDXi=j@In*Ga5D20O%1_7)nP?J_5Jd%s{7gtBB$&(ySR;v( z#2gQUv_)%swe_}EskMdMDn<oNgc7v0Mdh|psYNfX2Zw5`UVbh4-gobPW==xX-rnzf zzUMv<1Ly2@)>(V)wbx#I?X}lAGkNXwi#s$;>xW|?jzmpML9y{5PRR+t)eGDfT>fl7 zaX8L?&T8PS2F_~WtOm|%;H(DDYT&E}&T8PS2F_~WtOm|%;H(Dzk7?j{C;xU@ZTv+N z;2g-`*k99{G%W%9f9+Zve*e78Z0~K}`EwneW18R#KCHJ6C%=Dzci{pD5$h~f*C^R8 zni2=Get$5qI!H)<de<-ix~7F7Q27v<u(0X0B(2_t{r=iDD~hWt{k6eRF_67^yj!4Y zF39$77CLBGLg`XG28cSW>@N>gt_;-l!NWqIh9YBPdA>}JlG<QRMb$FZMsGQe-mGb_ zq-xsHIf_6POvKn9zduy9s-mjYUr|+74P<W~tw8#KZ}r<X&Meu-VPNX_domYfI_|Fo zY>x*@+Xh(j<M)@YsVtSSygsx3aNbzjO9#ZMkKbQ~agf8YGFWql48tMA7|;%1+LH&z zU|ftxWzm=M@PNk_(0Y3DU_Y*j@hB|{7O4vqXXxTi)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~a}>oX(!pac ztBR|lu%@AMwO>k*GV8*n+c#yQPA2NLn4f-qZj_(RUPlmzbuv^X>YT1)O-weOy3Baj zG_LZi<81uO$TM=ZiD&9)6OY8vCLZ0B(J%-3Xqm2j$`KtKea5ooS8snC4%KVz?Pvvz zH?xt!InwL=>?eY#o_-~2!$Cs+4s70xqjC<-0!KPHa>Lc=4=ru(1j|Gr6Sbic%0x7y zF>16%OgYs{IGg+7J;un5{qTN-751<_fbKq6(?;uBR6dvvLp5TKCeYC^j@BAxTG33) znrY&ss;~uAMrX6BTD45G>1a$dO<$(j9NHv0T2@CZTG!-_tV64;-s^P@K4QH$ReeYs zFs!nxdaoP$v{AJ!Lu%s4^;80z9@)sCWavo643=b+B%>l3Bc;bo(jJ*1l^NHV!I5Je zlpars?|!t0VVud<iO$F0+3pYa;5gM-5VZ?u{GoQGI|kF#D;u``!LIe82o6|dm!W$F z7@YmSvojesMo>c|bQz9LCDY+#s=Z&2G1Qrm2%t}&d9^y;6|4!j1aK~;-|uh!axj9? zoZqib^roQ`fyDq;NkLUj`epvMKnPv6AFYV7Sr^B-_u2}PjiBYA6s?Of;kY~)1F>+( z@;B>(DK!-8NP<YD2TwJCZR6?M{<bz8NQQxD8`1(TUz^Gp+B0%^sj)>HLJ*r#UAM|t z$pJA`aXK8FgCX3Fo;MV3i6NvN(O?i`)=sH-_$EUO`g<8uLJ>!Z6X8=6h=cJ6{%FUv zhq|IfyNoy*i?rbQ!xj!<Xl{qMd>c#;h@;)eSQt9kLg3w{yoMnf)J&rQE2R(%BgArC Swjam&g2pG3M;A1%iTodb>7~H{ literal 0 HcmV?d00001 diff --git a/i b/i new file mode 100755 index 0000000..608be42 --- /dev/null +++ b/i @@ -0,0 +1,71 @@ +#!/bin/sh + +# +# Bash script to install boot files. +# +# +# Version 1.2 - Copyright (c) 2013-2017 by Pike R. Alpha +# +# Updates: +# - 1.1 Verbose output added. +# - 1.2 Check files/run nasm for missing boot files. +# + +pwd=$(pwd) + +if [ ! -e i386/boot0/boot0 ]; + then + cd i386/boot0 + echo "Running nasm for boot0 ..." + nasm boot0.s -o boot0 + cd "${pwd}" +fi + +if [ ! -e i386/boot0/boot1h ]; + then + cd "i386/boot1" + echo "Running nasm for boot1h ..." + nasm boot1h.s -o boot1h + cd "${pwd}" +fi + +let index=0 + +if [[ -e "i386/boot0/boot0" && -e "i386/boot1/boot1h" ]]; + then + # + # Collect available volume names. + # + cd /Volumes/ + targetVolumes=(*) + cd "${pwd}" + + echo "\nAvailable target volumes:\n" + + for volume in "${targetVolumes[@]}" + do + echo "[$index] $volume" + let index++ + done + + echo "" + + # + # Ask to select a target volume. + # + read -p "Select a target volume for the boot files: " volumeNumber + + # + # Path to target volume. + # + targetVolume="/Volumes/${targetVolumes[$volumeNumber]}" + + # + # Get device identifier. + # + disk=$(diskutil info "${targetVolume}" | awk '$1$2$3 == "PartofWhole:" { print $4 }') + + sudo ./fdisk440 -f i386/boot0/boot0 -u -y "/dev/r${disk}" + + sudo dd if=i386/boot1/boot1h of="/dev/r${disk}s2" +fi From 328a5ed2f947d4118b93da96dc05a5f9dc971914 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <chief@Chiefs-iMac.local> Date: Mon, 31 Jul 2017 20:20:35 +0200 Subject: [PATCH 618/623] No more sleep after logo --- i386/boot2/boot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 9e021f8..797bac3 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -798,10 +798,10 @@ void boot(int biosdev) // Did we switch to graphics mode yet (think verbose mode)? if (gVerboseMode || bootArgs->Video_V1.v_display != GRAPHICS_MODE) { + // _BOOT_DEBUG_SLEEP(5); + // Switch to graphics mode and show the (white) Apple logo on a black/gray background. showBootLogo(); - - _BOOT_DEBUG_SLEEP(5); } startMachKernel(kernelEntry, bootArgs); // asm.s From ad921dfda9ebe7b6480b8ddd403496d6dc704025 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <chief@Chiefs-iMac.local> Date: Mon, 31 Jul 2017 20:21:07 +0200 Subject: [PATCH 619/623] Return BIOS date instead of a fixed value --- i386/libsaio/smbios/getters.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/libsaio/smbios/getters.h b/i386/libsaio/smbios/getters.h index 6117fbe..6be3b51 100755 --- a/i386/libsaio/smbios/getters.h +++ b/i386/libsaio/smbios/getters.h @@ -333,7 +333,7 @@ static const char * getBIOSDate(void) const char * retValue = biosDate; - return "05/01/2017"; // retValue; // Example: "01/24/2012"; + return retValue; // Example: "01/24/2012"; } //============================================================================== From eb53c9abf026cd27effae2f40f2fcc4abf45cc1b Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <chief@Chiefs-iMac.local> Date: Mon, 31 Jul 2017 20:22:48 +0200 Subject: [PATCH 620/623] Improved HS support --- i386/libsaio/bootstruct.c | 9 +++++--- i386/libsaio/bootstruct.h | 44 +++++++++++++++++++++++++++++---------- 2 files changed, 39 insertions(+), 14 deletions(-) diff --git a/i386/libsaio/bootstruct.c b/i386/libsaio/bootstruct.c index 5061fbf..7d05a14 100755 --- a/i386/libsaio/bootstruct.c +++ b/i386/libsaio/bootstruct.c @@ -127,12 +127,15 @@ void initKernelBootConfig(void) #endif // #if ((MAKE_TARGET_OS & MOUNTAIN_LION) == MOUNTAIN_LION) -#if ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN) // El Capitan and Sierra +#if ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN) // El Capitan, Sierra and High Sierra. + // csr_init() checks for: kBootArgsFlagCSRActiveConfig and kBootArgsFlagCSRConfigMode + // csr_get_active_config() checks for: kBootArgsFlagCSRActiveConfig + // csr_check(csr_config_t mask) checks for: kBootArgsFlagCSRConfigMode bootArgs->flags |= (kBootArgsFlagCSRActiveConfig + kBootArgsFlagCSRConfigMode + kBootArgsFlagCSRBoot + kBootArgsFlagInstallUI); - bootArgs->csrActiveConfig = CSR_ALLOW_DEVICE_CONFIGURATION; + bootArgs->csrActiveConfig = CSR_ALWAYS_ENFORCED_FLAGS; - bootArgs->csrCapabilities = CSR_VALID_FLAGS; // CSR_CAPABILITY_UNLIMITED; + bootArgs->csrCapabilities = CSR_VALID_CAPABILITIES; bootArgs->boot_SMC_plimit = 0; diff --git a/i386/libsaio/bootstruct.h b/i386/libsaio/bootstruct.h index 69623f4..c08994e 100755 --- a/i386/libsaio/bootstruct.h +++ b/i386/libsaio/bootstruct.h @@ -26,6 +26,7 @@ * - Yosemite support added (Pike R. Alpha, June 2014). * - El Capitan support added (Pike R. Alpha, June 2015). * - Sierra support added (Pike R. Alpha, August 2016). + * - High Sierra support added (Pike R. Alpha, June 2017). */ #ifndef __BOOTSTRUCT_H @@ -111,8 +112,12 @@ typedef struct Boot_Video_V2 Boot_Video_V2; #define kBootArgsFlagInstallUI (1 << 8) // 256 #endif +#ifndef kBootArgsFlagUnknownHS + #define kBootArgsFlagUnknownHS (1 << 9) // 512 (High Sierra only) +#endif + +/* SIP (System Integrity Protection) booter configuration flags */ #ifndef CSR_VALID_FLAGS - /* Rootless configuration flags */ #define CSR_ALLOW_UNTRUSTED_KEXTS (1 << 0) // 1 #define CSR_ALLOW_UNRESTRICTED_FS (1 << 1) // 2 #define CSR_ALLOW_TASK_FOR_PID (1 << 2) // 4 @@ -122,18 +127,35 @@ typedef struct Boot_Video_V2 Boot_Video_V2; #define CSR_ALLOW_UNRESTRICTED_NVRAM (1 << 6) // 64 #define CSR_ALLOW_DEVICE_CONFIGURATION (1 << 7) // 128 #define CSR_ALLOW_ANY_RECOVERY_OS (1 << 8) // 256 - - #define CSR_VALID_FLAGS (CSR_ALLOW_UNTRUSTED_KEXTS | \ - CSR_ALLOW_UNRESTRICTED_FS | \ - CSR_ALLOW_TASK_FOR_PID | \ - CSR_ALLOW_KERNEL_DEBUGGER | \ - CSR_ALLOW_APPLE_INTERNAL | \ - CSR_ALLOW_UNRESTRICTED_DTRACE | \ - CSR_ALLOW_UNRESTRICTED_NVRAM | \ - CSR_ALLOW_DEVICE_CONFIGURATION | \ - CSR_ALLOW_ANY_RECOVERY_OS) + #define CSR_ALLOW_UNKNOWN_HS (1 << 9) // 512 (High Sierra only) + + #if ((MAKE_TARGET_OS & HIGH_SIERRA) == HIGH_SIERRA) + #define CSR_VALID_FLAGS (CSR_ALLOW_UNTRUSTED_KEXTS | \ + CSR_ALLOW_UNRESTRICTED_FS | \ + CSR_ALLOW_TASK_FOR_PID | \ + CSR_ALLOW_KERNEL_DEBUGGER | \ + CSR_ALLOW_APPLE_INTERNAL | \ + CSR_ALLOW_UNRESTRICTED_DTRACE | \ + CSR_ALLOW_UNRESTRICTED_NVRAM | \ + CSR_ALLOW_DEVICE_CONFIGURATION | \ + CSR_ALLOW_ANY_RECOVERY_OS | \ + CSR_ALLOW_UNKNOWN_HS) + #else + #define CSR_VALID_FLAGS (CSR_ALLOW_UNTRUSTED_KEXTS | \ + CSR_ALLOW_UNRESTRICTED_FS | \ + CSR_ALLOW_TASK_FOR_PID | \ + CSR_ALLOW_KERNEL_DEBUGGER | \ + CSR_ALLOW_APPLE_INTERNAL | \ + CSR_ALLOW_UNRESTRICTED_DTRACE | \ + CSR_ALLOW_UNRESTRICTED_NVRAM | \ + CSR_ALLOW_DEVICE_CONFIGURATION | \ + CSR_ALLOW_ANY_RECOVERY_OS) + #endif #endif +/* Used in csr_check(csr_config_t mask) */ +#define CSR_ALWAYS_ENFORCED_FLAGS (CSR_ALLOW_DEVICE_CONFIGURATION | CSR_ALLOW_ANY_RECOVERY_OS) + /* CSR capabilities that a booter can give to the system */ #define CSR_CAPABILITY_UNLIMITED (1 << 0) #define CSR_CAPABILITY_CONFIG (1 << 1) From 8cd99f49b4fbc4074e50be1928ff176677781265 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@Bryans-iMac.local> Date: Fri, 15 Sep 2017 21:28:42 +0200 Subject: [PATCH 621/623] Updating script to v1.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – Improved volume name support. Thanks to ‘M’. --- c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/c b/c index 4cb5f46..de746e2 100755 --- a/c +++ b/c @@ -4,19 +4,36 @@ # Bash script executed from: RevoBoot/i386/boot2/Makefile # # -# Version 1.2 - Copyright (c) 2013-2017 by Pike R. Alpha +# Version 1.3 - Copyright (c) 2013-2017 by Pike R. Alpha # # Updates: -# - v1.1 Improved output (Pike R. Alpha, June 2017). -# - v1.2 Fix typo (Pike R. Alpha, June 2017). -# - Now also asks if you want to reboot. +# - v1.1 Improved output (Pike R. Alpha, June 2017). +# - v1.2 Fix typo (Pike R. Alpha, June 2017). +# - Now also asks if you want to reboot. +# - v1.3 Improved volume name support. Thanks to 'M': +# - https://pikeralpha.wordpress.com/2017/06/22/script-to-upgrade-macos-high-sierra-dp1-to-dp2/#comment-10216 let index=0 +# +# Get currect working directory. +# +workingDirectory=$(pwd) + +# +# Change additional shell optional behavior (expand unmatched names to a null string). +# +shopt -s nullglob + +# +# Change to Volumes folder. +# +cd /Volumes + # # Collect available volume names. # -targetVolumes=($(ls /Volumes | sort)) +targetVolumes=(*) echo "\nAvailable target volumes:\n" @@ -41,6 +58,7 @@ if [ $volumeNumber -gt $index ]; printf "\nError: Invalid Option ($volumeNumber)!\nAborting ...\n" exit 0 else + cd "${workingDirectory}" echo "Copying RevoBoot/sym/i386/boot to: /Volumes/${targetVolumes[$volumeNumber]}/" sudo cp ../../sym/i386/boot "/Volumes/${targetVolumes[$volumeNumber]}/" # From bbf679eea70ef533b4290e4d4f43570272c48de7 Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@iMac-Pro.local> Date: Fri, 13 Oct 2017 01:39:47 +0200 Subject: [PATCH 622/623] Whitespace changes and some minor changes. --- i386/boot2/boot.c | 12 ++++++++++++ i386/boot2/drivers.c | 4 ++-- i386/boot2/graphics.c | 10 ++++++++-- i386/libsaio/bootstruct.h | 4 ++-- i386/libsaio/cpu/Intel/dynamic_data.h | 4 ++-- i386/libsaio/cpu/essentials.h | 6 +++++- 6 files changed, 31 insertions(+), 9 deletions(-) diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 797bac3..0056cc6 100755 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -340,6 +340,18 @@ void boot(int biosdev) gPlatform.BootVolume->flags |= kBVFlagInstallVolume; } + else if (getValueForBootKey(kernelFlags, "auth-root-dmg", &val, &length)) + { + _BOOT_DEBUG_DUMP("Target auth-root-dmg=%s\n", val); + + gPlatform.BootVolume->flags |= kBVFlagInstallVolume; + } + else if (getValueForBootKey(kernelFlags, "rp=file:///", &val, &length)) + { + _BOOT_DEBUG_DUMP("Target rp=%s\n", val); + + gPlatform.BootVolume->flags |= kBVFlagInstallVolume; + } else { gPlatform.BootVolume->flags = ~kBVFlagInstallVolume; diff --git a/i386/boot2/drivers.c b/i386/boot2/drivers.c index f904a94..c675718 100755 --- a/i386/boot2/drivers.c +++ b/i386/boot2/drivers.c @@ -384,7 +384,7 @@ static int loadKexts(char * targetFolder, bool isPluginRun) // Show essential kexts. if (!isPluginRun && ((strcmp(dirEntryName, "AppleEmulator.kext") == 0) || (strcmp(dirEntryName, "FakeSMC.kext") == 0) || - (strcmp(dirEntryName, "AppleSMC.kext") == 0) || + (strcmp(dirEntryName, "AppleSMC.kext") == 0) || (strcmp(dirEntryName, "IONVMeFamily.kext") == 0))) { printf("loadKext(%s) found\n", dirEntryName); @@ -400,7 +400,7 @@ static int loadKexts(char * targetFolder, bool isPluginRun) { // Setup plug-ins path. sprintf(gPlatform.KextFileSpec, "%s/%sPlugIns", gPlatform.KextFileName, (isBundleType2) ? "Contents/" : ""); - + // #if DEBUG_DRIVERS if (strlen(gPlatform.KextFileSpec) >= MAX_KEXT_PATH_LENGTH) { diff --git a/i386/boot2/graphics.c b/i386/boot2/graphics.c index 4c77f5b..3277b01 100755 --- a/i386/boot2/graphics.c +++ b/i386/boot2/graphics.c @@ -239,6 +239,12 @@ long setVESAGraphicsMode(unsigned short width, unsigned short height, unsigned c { break; } +#if DEBUG_BOOT_GRAPHICS + else + { + printf ("VESA Graphics mode: %d\n", mode); + } +#endif // Is this required for buggy Video BIOS implementations? If so for which adapter? @@ -250,8 +256,8 @@ long setVESAGraphicsMode(unsigned short width, unsigned short height, unsigned c // Update bootArgs with the data provided by the selected VESA mode. bootArgs->Video_V1.v_display = GRAPHICS_MODE; bootArgs->Video_V1.v_width = minfo.XResolution; /* Examples: 1920, 1600, 1680 */ - bootArgs->Video_V1.v_height = minfo.YResolution; /* Examples: 1200, 1050 900 */ - bootArgs->Video_V1.v_depth = minfo.BitsPerPixel; /* Examples: 8, 30, 32 */ + bootArgs->Video_V1.v_height = minfo.YResolution; /* Examples: 1200, 1050 900 */ + bootArgs->Video_V1.v_depth = minfo.BitsPerPixel; /* Examples: 8, 30, 32, 64 */ bootArgs->Video_V1.v_rowBytes = minfo.BytesPerScanline; /* Examples: 7680, 6720, 6400 */ bootArgs->Video_V1.v_baseAddr = VBEMakeUInt32(minfo.PhysBasePtr); } diff --git a/i386/libsaio/bootstruct.h b/i386/libsaio/bootstruct.h index c08994e..3281cb9 100755 --- a/i386/libsaio/bootstruct.h +++ b/i386/libsaio/bootstruct.h @@ -127,7 +127,7 @@ typedef struct Boot_Video_V2 Boot_Video_V2; #define CSR_ALLOW_UNRESTRICTED_NVRAM (1 << 6) // 64 #define CSR_ALLOW_DEVICE_CONFIGURATION (1 << 7) // 128 #define CSR_ALLOW_ANY_RECOVERY_OS (1 << 8) // 256 - #define CSR_ALLOW_UNKNOWN_HS (1 << 9) // 512 (High Sierra only) + #define CSR_ALLOW_UNAPPROVED_KEXTS (1 << 9) // 512 (High Sierra only) #if ((MAKE_TARGET_OS & HIGH_SIERRA) == HIGH_SIERRA) #define CSR_VALID_FLAGS (CSR_ALLOW_UNTRUSTED_KEXTS | \ @@ -139,7 +139,7 @@ typedef struct Boot_Video_V2 Boot_Video_V2; CSR_ALLOW_UNRESTRICTED_NVRAM | \ CSR_ALLOW_DEVICE_CONFIGURATION | \ CSR_ALLOW_ANY_RECOVERY_OS | \ - CSR_ALLOW_UNKNOWN_HS) + CSR_ALLOW_UNAPPROVED_KEXTS) #else #define CSR_VALID_FLAGS (CSR_ALLOW_UNTRUSTED_KEXTS | \ CSR_ALLOW_UNRESTRICTED_FS | \ diff --git a/i386/libsaio/cpu/Intel/dynamic_data.h b/i386/libsaio/cpu/Intel/dynamic_data.h index 005ffb8..5b80535 100644 --- a/i386/libsaio/cpu/Intel/dynamic_data.h +++ b/i386/libsaio/cpu/Intel/dynamic_data.h @@ -406,7 +406,7 @@ void initCPUStruct(void) // case CPU_MODEL_SKYLAKE_ULT: // case CPU_MODEL_SKYLAKE_ULX: case CPU_MODEL_SKYLAKE_DT: - case CPU_MODEL_SKYLAKE_X: + case CPU_MODEL_SKYLAKE_W: CoreBridgeType = SKYLAKE; hiBit = 31; // gPlatform.CPU.ARTFrequency = (3427489466 * 2 / 284) = 24137249,76056338028169 MHz @@ -588,7 +588,7 @@ void initCPUStruct(void) } } -#if DEBUG_CPU +#if (DEBUG_CPU && INTEL_CORE_TECHNOLOGY == 0) gPlatform.CPU.MaxCoef = maxcoef; gPlatform.CPU.MaxDiv = maxdiv; gPlatform.CPU.CurrCoef = currcoef; diff --git a/i386/libsaio/cpu/essentials.h b/i386/libsaio/cpu/essentials.h index 65204a2..ebc8f03 100755 --- a/i386/libsaio/cpu/essentials.h +++ b/i386/libsaio/cpu/essentials.h @@ -198,12 +198,16 @@ #define CPU_MODEL_SKYLAKE 0x4E #define CPU_MODEL_SKYLAKE_ULT 0x4E #define CPU_MODEL_SKYLAKE_ULX 0x4E -#define CPU_MODEL_SKYLAKE_X 0x55 #define CPU_MODEL_SKYLAKE_DT 0x5E +#define CPU_MODEL_SKYLAKE_W 0x55 #define CPU_MODEL_KABYLAKE 0x8E +#define CPU_MODEL_KABYLAKE_ULT 0x8E +#define CPU_MODEL_KABYLAKE_ULX 0x8E #define CPU_MODEL_KABYLAKE_DT 0x9E +#define CPU_MODEL_CANNONLAKE 0x66 + #define DALES_BRIDGE 1 #define SANDY_BRIDGE 2 #define IVY_BRIDGE 4 From 613d72be66f09d9cec27913625a9fba63d197bfc Mon Sep 17 00:00:00 2001 From: "Pike R. Alpha" <bryan@iMac-Pro.local> Date: Sun, 15 Oct 2017 13:16:18 +0200 Subject: [PATCH 623/623] Some minor changes carried over from another drive. --- i386/libsaio/load.c | 2 +- i386/libsaio/smbios/getters.h | 10 +++++++++- i386/libsaio/smbios/model_data.h | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index 9f8a579..4c0f76e 100755 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -241,7 +241,7 @@ long decodeMachO(void *fileLoadBuffer, entry_t *rentry, char **raddr, int *rsize case LC_SYMTAB: initKernelVersionInfo(loadAddress, cmdBase, listSize, textSegmentAddress); -#if ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN) +#if (PATCH_KERNEL && ((MAKE_TARGET_OS & EL_CAPITAN) == EL_CAPITAN)) patchKernel(loadAddress, cmdBase, listSize, textSegmentAddress, vldSegmentAddress); #endif break; diff --git a/i386/libsaio/smbios/getters.h b/i386/libsaio/smbios/getters.h index 6be3b51..17ae79e 100755 --- a/i386/libsaio/smbios/getters.h +++ b/i386/libsaio/smbios/getters.h @@ -372,7 +372,15 @@ static SMBByte getBoardType(void) static SMBDWord getFirmwareFeatures(void) { - return 0xE907F537; + return 0xE80FE137; + /* + * With 0xE907F537 you'll get: + * + * OSInstaller[574]: ROM Features returned: 3909612855 + * OSInstaller[574]: ROM does not support APFS + * + * Note: It is bit-19 (0x80000) that adds support for APFS. + */ } //============================================================================== diff --git a/i386/libsaio/smbios/model_data.h b/i386/libsaio/smbios/model_data.h index e7820d1..50f2040 100644 --- a/i386/libsaio/smbios/model_data.h +++ b/i386/libsaio/smbios/model_data.h @@ -172,7 +172,7 @@ #define SMB_BOARD_PRODUCT "Mac-BE088AF8C5EB4FA2" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '8', ',', '3' } #else // Defaults to iMac19,1 Retina 5K, 27-inch, 2017 - #define SMB_BIOS_VERSION "IM191.88Z.0058.B00.1705091711" + #define SMB_BIOS_VERSION "IM191.88Z.0058.B00.1708081711" #define SMB_PRODUCT_NAME "iMac19,1" #define SMB_BOARD_PRODUCT "Mac-CF21D135A7D34AA6" #define EFI_MODEL_NAME { 'i', 'M', 'a', 'c', '1', '9', ',', '1' }